@progress/kendo-react-spreadsheet
Version:
KendoReact Spreadsheet package
9 lines (8 loc) • 1.52 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 i=require("react"),m=require("@progress/kendo-react-buttons"),l=require("@progress/kendo-svg-icons"),d=require("./utils.js"),f=require("@progress/kendo-react-common"),g=require("@progress/kendo-react-intl"),r=require("../messages.js");function p(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const a=p(i),c=e=>{const{spreadsheetRef:t}=e,o=a.useCallback(n=>{const s=n.item.value||null;setTimeout(()=>{if(t.current){const u={command:"PropertyChangeCommand",options:{property:"format",value:s}};t.current.executeCommand(u)}},0)},[]);return a.createElement(m.DropDownButton,{icon:"custom-format",svgIcon:l.customFormatIcon,fillMode:"flat",onItemClick:o,items:d.FORMATS,title:g.useLocalization().toLanguageString(r.keys.format,r.messages[r.keys.format]),text:a.createElement(f.IconWrap,{name:"caret-alt-down"})})};c.displayName="Format";exports.Format=c;