UNPKG

@progress/kendo-react-spreadsheet

Version:
9 lines (8 loc) 1.61 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("react"),p=require("@progress/kendo-react-buttons"),y=require("@progress/kendo-react-intl"),o=require("../messages.js"),a=require("@progress/kendo-svg-icons");function b(e){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(c,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return c.default=e,Object.freeze(c)}const i=b(I),l=e=>t=>{const{icon:n,svgIcon:d,titleKey:s,value:D}=e,{spreadsheetRef:r}=t,g=i.useCallback(()=>{if(r.current){const f={command:"AdjustDecimalsCommand",options:{value:D}};r.current.executeCommand(f)}},[]);return i.createElement(p.Button,{type:"button",icon:n,svgIcon:d,fillMode:"flat",onClick:g,title:y.useLocalization().toLanguageString(s,o.messages[s])})},u=l({icon:a.decimalIncreaseIcon.name,svgIcon:a.decimalIncreaseIcon,value:1,titleKey:o.keys.increaseDecimal});u.displayName="IncreaseDecimal";const m=l({icon:a.decimalDecreaseIcon.name,svgIcon:a.decimalDecreaseIcon,value:-1,titleKey:o.keys.decreaseDecimal});m.displayName="DecreaseDecimal";exports.DecreaseDecimal=m;exports.IncreaseDecimal=u;