UNPKG

@progress/kendo-react-scheduler

Version:

React Scheduler brings the functionality of Outlook's Calendar to a single UI component. KendoReact Scheduler package

61 lines (60 loc) 2.19 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import * as e from "react"; import * as k from "react-dom"; import { Dialog as L, DialogActionsBar as b } from "@progress/kendo-react-dialogs"; import { useLocalization as E } from "@progress/kendo-react-intl"; import { editorCancel as s, messages as a, editorDelete as m, deleteConfirmation as u, deleteDialogTitle as g } from "../messages/index.mjs"; import { canUseDOM as y } from "@progress/kendo-react-common"; import { Button as d } from "@progress/kendo-react-buttons"; const z = e.forwardRef( (c, f) => { const { onClose: l, onCancel: n, onConfirm: r } = c, i = e.useRef(null); e.useImperativeHandle(i, () => ({ props: c })), e.useImperativeHandle( f, () => i.current ); const t = E(), C = t.toLanguageString(s, a[s]), v = t.toLanguageString(m, a[m]), p = t.toLanguageString(u, a[u]), D = t.toLanguageString(g, a[g]), R = e.useCallback( ({ syntheticEvent: o }) => { if (!l) return; const h = { syntheticEvent: o, value: null, target: i.current }; l.call(void 0, h); }, [l] ), M = e.useCallback( (o) => { n && n.call(void 0, { syntheticEvent: o, value: null }); }, [n] ), S = e.useCallback( (o) => { r && r.call(void 0, { syntheticEvent: o, value: null }); }, [r] ); return y ? k.createPortal( /* @__PURE__ */ e.createElement(L, { title: D, onClose: R }, p, /* @__PURE__ */ e.createElement(b, null, /* @__PURE__ */ e.createElement(d, { onClick: M }, C), /* @__PURE__ */ e.createElement(d, { onClick: S }, v))), document && document.body ) : null; } ); z.displayName = "KendoReactSchedulerRemoveDialog"; export { z as SchedulerRemoveDialog };