@progress/kendo-react-gantt
Version:
React Gantt enables the display of self-referencing tabular data with many features. KendoReact Gantt package
9 lines (8 loc) • 1.84 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("react"),p=require("react-dom"),s=require("@progress/kendo-react-dialogs"),O=require("@progress/kendo-react-intl"),c=require("../messages/index.js"),q=require("@progress/kendo-react-common"),u=require("@progress/kendo-react-buttons");function d(n){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const l=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(o,t,l.get?l:{enumerable:!0,get:()=>n[t]})}}return o.default=n,Object.freeze(o)}const a=d(R),S=d(p),j=n=>{const{onClose:o,onCancel:t,onConfirm:l,dataItem:i}=n,m=O.useLocalization(),r=e=>m.toLanguageString(e,c.messages[e]),g=r(c.editorDelete),C=r(c.editorCancel),f=r(c.deleteConfirmation),D=r(c.deleteDialogTitle),v=a.useCallback(({syntheticEvent:e})=>{o&&o.call(void 0,{syntheticEvent:e,nativeEvent:e&&e.nativeEvent,dataItem:null})},[o]),b=a.useCallback(e=>{t&&t.call(void 0,{syntheticEvent:e,nativeEvent:e&&e.nativeEvent,dataItem:null})},[t]),k=a.useCallback(e=>{l&&l.call(void 0,{syntheticEvent:e,nativeEvent:e&&e.nativeEvent,dataItem:i})},[l,i]),M=a.createElement(s.Dialog,{title:D,onClose:v},f,a.createElement(s.DialogActionsBar,{layout:"end"},a.createElement(u.Button,{themeColor:"primary",onClick:k},g),a.createElement(u.Button,{onClick:b},C)));return q.canUseDOM?S.createPortal(M,document&&document.body):null};exports.GanttRemoveDialog=j;