@univerjs/sheets-numfmt-ui 0.10.4 → 0.10.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(C,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("@univerjs/core"),require("@univerjs/engine-render"),require("@univerjs/sheets-numfmt"),require("@univerjs/sheets-ui"),require("@univerjs/sheets"),require("@univerjs/ui"),require("rxjs"),require("rxjs/operators"),require("react/jsx-runtime"),require("react"),require("@univerjs/design")):typeof define=="function"&&define.amd?define(["exports","@univerjs/core","@univerjs/engine-render","@univerjs/sheets-numfmt","@univerjs/sheets-ui","@univerjs/sheets","@univerjs/ui","rxjs","rxjs/operators","react/jsx-runtime","react","@univerjs/design"],a):(C=typeof globalThis<"u"?globalThis:C||self,a(C.UniverSheetsNumfmtUi={},C.UniverCore,C.UniverEngineRender,C.UniverSheetsNumfmt,C.UniverSheetsUi,C.UniverSheets,C.UniverUi,C.rxjs,C.rxjs.operators,C.React,C.React,C.UniverDesign))})(this,function(C,a,$,v,D,g,_,x,B,c,S,E){"use strict";var at=Object.defineProperty;var st=(C,a,$)=>a in C?at(C,a,{enumerable:!0,configurable:!0,writable:!0,value:$}):C[a]=$;var G=(C,a,$)=>st(C,typeof a!="symbol"?a+"":a,$);const te={};var de=Object.getOwnPropertyDescriptor,ve=(e,t,r,n)=>{for(var i=n>1?void 0:n?de(t,r):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(i=o(i)||i);return i},j=(e,t)=>(r,n)=>t(r,n,e);const K="SHEET_NUMFMT_ALERT";let Z=class extends a.Disposable{constructor(e,t,r,n,i,s,o){super(),this._context=e,this._hoverManagerService=t,this._cellAlertManagerService=r,this._localeService=n,this._zenZoneService=i,this._numfmtService=s,this._configService=o,this._init()}_init(){this._initCellAlertPopup(),this._initZenService()}_initCellAlertPopup(){this.disposeWithMe(this._hoverManagerService.currentCell$.pipe(x.debounceTime(100)).subscribe(e=>{var t,r;if(e){const n=e.location,i=this._context.unit,s=i.getActiveSheet();if(!s)return;const o=n.unitId,l=n.subUnitId;let m;const u=s.getCell(n.row,n.col);if(u!=null&&u.s){const f=i.getStyles().get(u.s);f!=null&&f.n&&(m=f.n)}if(m||(m=this._numfmtService.getValue(o,l,n.row,n.col)),!m){this._hideAlert();return}if(a.isTextFormat(m.pattern)&&a.Tools.isDefine(u==null?void 0:u.v)&&a.isRealNum(u.v)){if((t=this._configService.getConfig(v.SHEETS_NUMFMT_PLUGIN_CONFIG_KEY))!=null&&t.disableTextFormatAlert)return;const f=this._cellAlertManagerService.currentAlert.get(K),d=(r=f==null?void 0:f.alert)==null?void 0:r.location;if(d&&d.row===n.row&&d.col===n.col&&d.subUnitId===n.subUnitId&&d.unitId===n.unitId)return;this._cellAlertManagerService.showAlert({type:D.CellAlertType.ERROR,title:this._localeService.t("info.error"),message:this._localeService.t("info.forceStringInfo"),location:n,width:200,height:74,key:K});return}}this._hideAlert()}))}_initZenService(){this.disposeWithMe(this._zenZoneService.visible$.subscribe(e=>{e&&this._hideAlert()}))}_hideAlert(){this._cellAlertManagerService.removeAlert(K)}};Z=ve([j(1,a.Inject(D.HoverManagerService)),j(2,a.Inject(D.CellAlertManagerService)),j(3,a.Inject(a.LocaleService)),j(4,_.IZenZoneService),j(5,a.Inject(g.INumfmtService)),j(6,a.IConfigService)],Z);const Y={id:"sheet.operation.close.numfmt.panel",type:a.CommandType.OPERATION,handler:()=>!0},F={id:"sheet.operation.open.numfmt.panel",type:a.CommandType.OPERATION,handler:e=>(e.get(A).openPanel(),!0)};var fe=Object.getOwnPropertyDescriptor,pe=(e,t,r,n)=>{for(var i=n>1?void 0:n?fe(t,r):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(i=o(i)||i);return i},he=(e,t)=>(r,n)=>t(r,n,e);const z=S.createContext([]);let H=class{constructor(e){this._localStorageService=e}_getKey(e){return`userHabitController_${e}`}async addHabit(e,t){const r=this._getKey(e);return this._localStorageService.getItem(r).then(n=>{n||this._localStorageService.setItem(r,t)})}markHabit(e,t){const r=this._getKey(e);this._localStorageService.getItem(r).then(n=>{if(n){const i=n.findIndex(s=>s===t);i>-1&&n.splice(i,1),n.unshift(t),this._localStorageService.setItem(r,n)}})}async getHabit(e,t){const r=this._getKey(e),n=await this._localStorageService.getItem(r);if(t&&n){const i=n.map((s,o,l)=>{const m=l.length;return{value:s,priority:m-o}});return t.sort((s,o)=>{var u,f;const l=((u=i.find(d=>d.value===s))==null?void 0:u.priority)||-1;return(((f=i.find(d=>d.value===o))==null?void 0:f.priority)||-1)-l})}return n||[]}deleteHabit(e){this._localStorageService.removeItem(e)}};H=pe([he(0,a.Inject(a.ILocalStorageService))],H);const ne="numfmtCurrency",ge=e=>{const t=_.useDependency(H),[r,n]=S.useState(v.currencySymbols);return S.useEffect(()=>{t.addHabit("numfmtCurrency",[]).then(()=>{t.getHabit(ne,[...v.currencySymbols]).then(s=>{n(s),e&&e(s)})})},[]),{userHabitCurrency:r,mark:s=>{t.markHabit(ne,s)}}},Se=()=>{const e=S.useRef([]),[t,r]=S.useState({});return S.useEffect(()=>{e.current.forEach(i=>{i()}),e.current=[]},[t]),i=>{e.current.push(i),r({})}},ye=e=>!!v.getCurrencyType(e)&&e.startsWith("_("),_e=e=>{const{defaultPattern:t,action:r,onChange:n}=e,[i,s]=S.useState(()=>v.getDecimalFromPattern(t||"",2)),o=S.useContext(z),[l,m]=S.useState(()=>v.getCurrencyType(t)||o[0]),u=S.useMemo(()=>o.map(b=>({label:b,value:b})),[]),d=_.useDependency(a.LocaleService).t;r.current=()=>v.setPatternDecimal(`_("${l}"* #,##0${i>0?".0":""}_)`,i);const h=b=>{m(b),n(v.setPatternDecimal(`_("${b}"* #,##0${i>0?".0":""}_)`,i))},y=b=>{const p=b||0;s(p),n(v.setPatternDecimal(`_("${l}"* #,##0${p>0?".0":""}_)`,p))};return c.jsxs("div",{children:[c.jsxs("div",{className:"univer-mt-4 univer-flex univer-justify-between",children:[c.jsxs("div",{className:"option",children:[c.jsx("div",{className:"univer-text-sm univer-text-gray-400",children:d("sheet.numfmt.decimalLength")}),c.jsx("div",{className:"univer-mt-2 univer-w-32",children:c.jsx(E.InputNumber,{value:i,step:1,precision:0,max:20,min:0,onChange:y})})]}),c.jsxs("div",{className:"option",children:[c.jsx("div",{className:"univer-text-sm univer-text-gray-400",children:d("sheet.numfmt.currencyType")}),c.jsx("div",{className:"univer-mt-2 univer-w-36",children:c.jsx(E.Select,{options:u,value:l,onChange:h})})]})]}),c.jsx("div",{className:"univer-mt-4 univer-text-sm univer-text-gray-400",children:d("sheet.numfmt.accountingDes")})]})},Ce=e=>!!v.getCurrencyType(e)&&!e.startsWith("_("),be=e=>{const r=_.useDependency(a.LocaleService).t,n=S.useContext(z),[i,s]=S.useState(()=>v.getCurrencyType(e.defaultPattern)||n[0]),[o,l]=S.useState(()=>v.getDecimalFromPattern(e.defaultPattern||"",2)),[m,u]=S.useState(()=>{var I;const p=v.getCurrencyFormatOptions(i);return((I=p.find(M=>a.isPatternEqualWithoutDecimal(M.value,e.defaultPattern)))==null?void 0:I.value)||p[0].value}),f=S.useMemo(()=>v.getCurrencyFormatOptions(i),[i]),d=S.useMemo(()=>n.map(p=>({label:p,value:p})),[n]);e.action.current=()=>v.setPatternDecimal(m,o);const h=p=>{if(p===void 0)return;s(p);const P=v.getCurrencyFormatOptions(p)[0].value;u(P),e.onChange(v.setPatternDecimal(P,o))},y=p=>{p!==void 0&&(u(p),e.onChange(v.setPatternDecimal(p,o)))},b=p=>{l(p||0),e.onChange(v.setPatternDecimal(m,p||0))};return c.jsxs("div",{children:[c.jsxs("div",{className:"univer-mt-4 univer-flex univer-justify-between",children:[c.jsxs("div",{className:"option",children:[c.jsx("div",{className:"univer-text-sm univer-text-gray-400",children:r("sheet.numfmt.decimalLength")}),c.jsx("div",{className:"univer-mt-2 univer-w-32",children:c.jsx(E.InputNumber,{value:o,max:20,min:0,onChange:b})})]}),c.jsxs("div",{className:"option",children:[c.jsx("div",{className:"univer-text-sm univer-text-gray-400",children:r("sheet.numfmt.currencyType")}),c.jsx("div",{className:"univer-mt-2 univer-w-36",children:c.jsx(E.Select,{value:i,options:d,onChange:h})})]})]}),c.jsx("div",{className:"label univer-mt-4",children:r("sheet.numfmt.negType")}),c.jsx("div",{className:"univer-mt-2",children:c.jsx(E.SelectList,{value:m,options:f,onChange:y})}),c.jsx("div",{className:"univer-mt-4 univer-text-sm univer-text-gray-400",children:r("sheet.numfmt.currencyDes")})]})};var N=function(){return N=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},N.apply(this,arguments)},Ie=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},re=S.forwardRef(function(e,t){var r=e.icon,n=e.id,i=e.className,s=e.extend,o=Ie(e,["icon","id","className","extend"]),l="univerjs-icon univerjs-icon-".concat(n," ").concat(i||"").trim(),m=S.useRef("_".concat(Pe()));return ie(r,"".concat(n),{defIds:r.defIds,idSuffix:m.current},N({ref:t,className:l},o),s)});function ie(e,t,r,n,i){return S.createElement(e.tag,N(N({key:t},Te(e,r,i)),n),(Ee(e,r).children||[]).map(function(s,o){return ie(s,"".concat(t,"-").concat(e.tag,"-").concat(o),r,void 0,i)}))}function Te(e,t,r){var n=N({},e.attrs);r!=null&&r.colorChannel1&&n.fill==="colorChannel1"&&(n.fill=r.colorChannel1),e.tag==="mask"&&n.id&&(n.id=n.id+t.idSuffix),Object.entries(n).forEach(function(s){var o=s[0],l=s[1];o==="mask"&&typeof l=="string"&&(n[o]=l.replace(/url\(#(.*)\)/,"url(#$1".concat(t.idSuffix,")")))});var i=t.defIds;return!i||i.length===0||(e.tag==="use"&&n["xlink:href"]&&(n["xlink:href"]=n["xlink:href"]+t.idSuffix),Object.entries(n).forEach(function(s){var o=s[0],l=s[1];typeof l=="string"&&(n[o]=l.replace(/url\(#(.*)\)/,"url(#$1".concat(t.idSuffix,")")))})),n}function Ee(e,t){var r,n=t.defIds;return!n||n.length===0?e:e.tag==="defs"&&(!((r=e.children)===null||r===void 0)&&r.length)?N(N({},e),{children:e.children.map(function(i){return typeof i.attrs.id=="string"&&n&&n.includes(i.attrs.id)?N(N({},i),{attrs:N(N({},i.attrs),{id:i.attrs.id+t.idSuffix})}):i})}):e}function Pe(){return Math.random().toString(36).substring(2,8)}re.displayName="UniverIcon";var Me={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M14.1544 3.75557C14.3887 3.98988 14.3887 4.36978 14.1544 4.6041L6.51409 12.2444C6.40157 12.3569 6.24896 12.4201 6.08983 12.4201C5.9307 12.4201 5.77808 12.3569 5.66556 12.2444L1.84541 8.42425C1.6111 8.18993 1.6111 7.81003 1.84541 7.57572C2.07973 7.34141 2.45963 7.34141 2.69394 7.57572L6.08983 10.9716L13.3059 3.75557C13.5402 3.52126 13.9201 3.52126 14.1544 3.75557Z",fillRule:"evenodd",clipRule:"evenodd"}}]},ae=S.forwardRef(function(e,t){return S.createElement(re,Object.assign({},e,{id:"check-mark-icon",ref:t,icon:Me}))});ae.displayName="CheckMarkIcon";const X="customFormat",J="numfmt_custom_pattern";function De(e){const{defaultPattern:t,action:r,onChange:n}=e,i=_.useDependency(H),s=_.useDependency(a.ILocalStorageService),o=_.useDependency(a.LocaleService),[l,m]=S.useState(t);r.current=()=>(i.markHabit(X,l),s.getItem(J).then((y=[])=>{const b=[...new Set([l,...y||[]])].splice(0,10).filter(p=>!!p);s.setItem(J,b)}),l);const[u,f]=S.useState([]);S.useEffect(()=>{s.getItem(J).then(y=>{const b=[...v.CURRENCYFORMAT.map(p=>p.suffix("$")),...v.DATEFMTLISG.map(p=>p.suffix),...v.NUMBERFORMAT.map(p=>p.suffix)];b.push(...y||[]),i.addHabit(X,[]).finally(()=>{i.getHabit(X,b).then(p=>{f([...new Set(p)])})})})},[]);const d=y=>{m(y),n(y)},h=()=>{n(l)};return c.jsxs("div",{children:[c.jsx("div",{className:"univer-mt-4 univer-text-sm univer-text-gray-400",children:o.t("sheet.numfmt.customFormat")}),c.jsx(E.Input,{placeholder:o.t("sheet.numfmt.customFormat"),onBlur:h,value:l,onChange:m,className:"univer-mt-2 univer-w-full"}),c.jsx("div",{className:E.clsx("univer-mt-2 univer-max-h-[400px] univer-overflow-auto univer-rounded-lg univer-p-2",E.borderClassName),children:u.map(y=>c.jsxs("div",{onClick:()=>d(y),className:"univer-flex univer-cursor-pointer univer-items-center univer-gap-1.5 univer-py-1.5 univer-text-sm",children:[c.jsx("div",{className:"univer-flex univer-w-4 univer-items-center univer-text-primary-600",children:l===y&&c.jsx(ae,{})}),c.jsx("div",{children:y})]},y))}),c.jsx("div",{className:"univer-mt-3 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",children:o.t("sheet.numfmt.customFormatDes")})]})}const Ne=e=>{const t=a.numfmt.getFormatInfo(e);return v.getDateFormatOptions().map(r=>r.value).includes(e)||["date","datetime","time"].includes(t.type)};function we(e){const{onChange:t,defaultPattern:r}=e,n=S.useMemo(v.getDateFormatOptions,[]),i=_.useDependency(a.LocaleService),[s,o]=S.useState(()=>{if(r){const m=n.find(u=>u.value===r);if(m)return m.value}return n[0].value});e.action.current=()=>s;const l=m=>{m!==void 0&&(o(m),t(m))};return c.jsxs("div",{children:[c.jsx("div",{className:"univer-mt-4 univer-text-sm univer-text-gray-400",children:i.t("sheet.numfmt.dateType")}),c.jsx("div",{className:"univer-mt-2",children:c.jsx(E.SelectList,{value:s,options:n,onChange:l})}),c.jsx("div",{className:"univer-mt-3.5 univer-text-sm/5 univer-text-gray-600 dark:!univer-text-gray-200",children:i.t("sheet.numfmt.dateDes")})]})}const xe=e=>!e,Oe=e=>{const r=_.useDependency(a.LocaleService).t;return e.action.current=()=>"",c.jsx("div",{children:c.jsx("div",{className:"univer-mt-3.5 univer-text-sm/5 univer-text-gray-600 dark:!univer-text-gray-200",children:r("sheet.numfmt.generalDes")})})},Ue=e=>v.getNumberFormatOptions().some(t=>a.isPatternEqualWithoutDecimal(t.value,e));function ke(e){const t=_.useDependency(a.LocaleService),r=S.useMemo(v.getNumberFormatOptions,[]),[n,i]=S.useState(()=>v.getDecimalFromPattern(e.defaultPattern||"",0)),[s,o]=S.useState(()=>{const d=r.find(h=>a.isPatternEqualWithoutDecimal(h.value,e.defaultPattern||""));return(d==null?void 0:d.value)||r[0].value}),l=S.useMemo(()=>v.setPatternDecimal(s,Number(n||0)),[s,n]),m=S.useMemo(()=>!v.isPatternHasDecimal(s),[s]),u=d=>{i(d||0),e.onChange(v.setPatternDecimal(s,Number(d||0)))},f=d=>{d!==void 0&&(i(v.getDecimalFromPattern(d,0)),o(d),e.onChange(d))};return e.action.current=()=>l,c.jsxs("div",{children:[c.jsx("div",{className:"univer-mt-4 univer-text-sm univer-text-gray-400",children:t.t("sheet.numfmt.decimalLength")}),c.jsx("div",{className:"univer-mt-2",children:c.jsx(E.InputNumber,{disabled:m,value:n,max:20,min:0,onChange:u})}),c.jsxs("div",{className:"univer-mt-4 univer-text-sm univer-text-gray-400",children:[" ",t.t("sheet.numfmt.negType")]}),c.jsx("div",{className:"univer-mt-2",children:c.jsx(E.SelectList,{onChange:f,options:r,value:s})}),c.jsx("div",{className:"univer-mt-3.5 univer-text-sm/5 univer-text-gray-600 dark:!univer-text-gray-200",children:t.t("sheet.numfmt.thousandthPercentileDes")})]})}const $e=e=>{const{defaultValue:t,defaultPattern:r,row:n,col:i}=e.value,s=_.useDependency(a.LocaleService),o=S.useRef(()=>""),l=s.t,m=Se(),u=S.useMemo(()=>[{label:"sheet.numfmt.general",component:Oe},{label:"sheet.numfmt.accounting",component:_e},{label:"sheet.numfmt.currency",component:be},{label:"sheet.numfmt.date",component:we},{label:"sheet.numfmt.thousandthPercentile",component:ke},{label:"sheet.numfmt.customFormat",component:De}].map(T=>({...T,label:l(T.label)})),[]),[f,d]=S.useState(I),[h,y]=S.useState(()=>`${n}_${i}`),{mark:b,userHabitCurrency:p}=ge(()=>y(`${n}_${i}_userCurrency'`)),P=S.useMemo(()=>{var T;return(T=u.find(L=>L.label===f))==null?void 0:T.component},[f]);function I(){return[xe,ye,Ce,Ne,Ue].reduce((L,rt,it)=>L||(rt(r)?u[it].label:""),"")||u[0].label}const M=u.map(T=>({label:T.label,value:T.label})),O=T=>{d(T),m(()=>e.onChange({type:"change",value:o.current()||""}))},U=S.useCallback(T=>{e.onChange({type:"change",value:T})},[]),k=()=>{const T=o.current()||"",L=v.getCurrencyType(T);L&&b(L),e.onChange({type:"confirm",value:T})},W=()=>{e.onChange({type:"cancel",value:""})},ee={onChange:U,defaultValue:t,defaultPattern:r,action:o};return S.useEffect(()=>{d(I()),y(`${n}_${i}`)},[n,i]),c.jsxs("div",{className:E.clsx("univer-flex univer-h-full univer-flex-col univer-justify-between univer-overflow-y-auto univer-pb-5",E.scrollbarClassName),children:[c.jsxs("div",{children:[c.jsx("div",{className:"univer-mt-3.5 univer-text-sm univer-text-gray-400",children:l("sheet.numfmt.numfmtType")}),c.jsx("div",{className:"univer-mt-2",children:c.jsx(E.Select,{className:"univer-w-full",value:f,options:M,onChange:O})}),c.jsx("div",{children:P&&c.jsx(z.Provider,{value:p,children:S.createElement(P,{...ee,key:h})})})]}),c.jsxs("div",{className:"univer-mb-5 univer-mt-3.5 univer-flex univer-justify-end",children:[c.jsx(E.Button,{onClick:W,className:"univer-mr-3",children:l("sheet.numfmt.cancel")}),c.jsx(E.Button,{variant:"primary",onClick:k,children:l("sheet.numfmt.confirm")})]})]})};var je=Object.getOwnPropertyDescriptor,Le=(e,t,r,n)=>{for(var i=n>1?void 0:n?je(t,r):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(i=o(i)||i);return i},w=(e,t)=>(r,n)=>t(r,n,e);const se="SHEET_NUMFMT_PANEL";let A=class extends a.Disposable{constructor(t,r,n,i,s,o,l,m,u,f,d){super();G(this,"_previewPattern","");G(this,"_sidebarDisposable",null);this._sheetInterceptorService=t,this._themeService=r,this._univerInstanceService=n,this._commandService=i,this._selectionManagerService=s,this._renderManagerService=o,this._numfmtService=l,this._componentManager=m,this._sidebarService=u,this._localeService=f,this._sheetsNumfmtCellContentController=d,this._initRealTimeRenderingInterceptor(),this._initPanel(),this._initCommands(),this._initCloseListener(),this._commandExecutedListener(),this._initNumfmtLocalChange()}_initNumfmtLocalChange(){this.disposeWithMe(x.merge(this._sheetsNumfmtCellContentController.locale$,this._localeService.currentLocale$).subscribe(()=>{this._forceUpdate()}))}openPanel(){var P;const t=this._sidebarService,r=this._selectionManagerService,n=this._commandService,i=this._univerInstanceService,s=this._numfmtService,o=this._localeService,m=(((P=r.getCurrentSelections())==null?void 0:P.map(I=>I.range))||[])[0];if(!m)return!1;const u=i.getCurrentUnitForType(a.UniverInstanceType.UNIVER_SHEET),f=u.getActiveSheet();if(!f)return!1;const d=f.getCellRaw(m.startRow,m.startColumn),h=s.getValue(u.getUnitId(),f.getSheetId(),m.startRow,m.startColumn);let y="";h&&(y=h.pattern);const b=(d==null?void 0:d.t)===a.CellValueType.NUMBER?d.v:12345678,p={onChange:I=>{var M;if(I.type==="change")this._previewPattern=I.value,this._forceUpdate();else if(I.type==="confirm"){const O=((M=r.getCurrentSelections())==null?void 0:M.map(W=>W.range))||[],U={values:[]},k=v.getPatternType(I.value);O.forEach(W=>{a.Range.foreach(W,(ee,T)=>{U.values.push({row:ee,col:T,pattern:I.value,type:k})})}),n.executeCommand(v.SetNumfmtCommand.id,U),t.close()}else I.type==="cancel"&&t.close()},value:{defaultPattern:y,defaultValue:b,row:m.startRow,col:m.startColumn}};return this._sidebarDisposable=t.open({header:{title:o.t("sheet.numfmt.title")},children:{label:se,...p},onClose:()=>{this._forceUpdate(),n.executeCommand(Y.id)}}),!0}_forceUpdate(t){var n;const r=this._renderManagerService.getRenderById(t!=null?t:this._univerInstanceService.getCurrentUnitForType(a.UniverInstanceType.UNIVER_SHEET).getUnitId());r==null||r.with(D.SheetSkeletonManagerService).reCalculate(),(n=r==null?void 0:r.mainComponent)==null||n.makeDirty()}_initCommands(){[F,Y].forEach(t=>{this.disposeWithMe(this._commandService.registerCommand(t))})}_initPanel(){this.disposeWithMe(this._componentManager.register(se,$e))}_initRealTimeRenderingInterceptor(){const t=new x.Observable(n=>{this._commandService.onCommandExecuted(i=>{i.id===F.id&&n.next(!0),i.id===Y.id&&n.next(!1)})}),r=x.combineLatest([t,this._selectionManagerService.selectionMoveEnd$.pipe(B.map(n=>n?n.map(i=>i.range):[]))]);this.disposeWithMe(a.toDisposable(r.pipe(B.switchMap(([n,i])=>new x.Observable(s=>{const o=new a.DisposableCollection;return n&&i.length&&s.next({selectionRanges:i,disposableCollection:o}),()=>{o.dispose()}})),B.tap(()=>{this._previewPattern=null})).subscribe(({disposableCollection:n,selectionRanges:i})=>{var o,l;const s=this._univerInstanceService.getCurrentUnitForType(a.UniverInstanceType.UNIVER_SHEET);this.openPanel(),n.add(this._sheetInterceptorService.intercept(g.INTERCEPTOR_POINT.CELL_CONTENT,{priority:99,effect:a.InterceptorEffectEnum.Value|a.InterceptorEffectEnum.Style,handler:(m,u,f)=>{var b;const{row:d,col:h}=u,y=f(m)||{};if(i.find(p=>p.startColumn<=h&&p.endColumn>=h&&p.startRow<=d&&p.endRow>=d)){const p=u.worksheet.getCellRaw(d,h),P=p==null?void 0:p.v,I=p==null?void 0:p.t;if(P==null||I!==a.CellValueType.NUMBER||this._previewPattern===null)return y;const M=v.getPatternPreviewIgnoreGeneral(this._previewPattern,P,this._sheetsNumfmtCellContentController.locale);if(M.color){const O=(b=this._themeService.getColorFromTheme(`${M.color}.500`))!=null?b:M.color;return{...y,v:M.result,t:a.CellValueType.STRING,s:{cl:{rgb:O}}}}return{...y,v:M.result,t:a.CellValueType.STRING}}return y}})),(l=(o=this._renderManagerService.getRenderById(s.getUnitId()))==null?void 0:o.mainComponent)==null||l.makeDirty()})))}_commandExecutedListener(){const t=[g.RemoveNumfmtMutation.id,g.SetNumfmtMutation.id];this.disposeWithMe(new x.Observable(r=>{const n=this._commandService.onCommandExecuted(i=>{if(t.includes(i.id)){const s=i.params;r.next(s.unitId)}});return()=>n.dispose()}).pipe(B.debounceTime(16)).subscribe(r=>this._forceUpdate(r)))}_initCloseListener(){this._univerInstanceService.getCurrentTypeOfUnit$(a.UniverInstanceType.UNIVER_SHEET).subscribe(t=>{var r;t||((r=this._sidebarDisposable)==null||r.dispose(),this._sidebarDisposable=null)})}};A=Le([w(0,a.Inject(g.SheetInterceptorService)),w(1,a.Inject(a.ThemeService)),w(2,a.IUniverInstanceService),w(3,a.ICommandService),w(4,a.Inject(g.SheetsSelectionsService)),w(5,$.IRenderManagerService),w(6,g.INumfmtService),w(7,a.Inject(_.ComponentManager)),w(8,_.ISidebarService),w(9,a.Inject(a.LocaleService)),w(10,a.Inject(v.SheetsNumfmtCellContentController))],A);var Fe=Object.getOwnPropertyDescriptor,He=(e,t,r,n)=>{for(var i=n>1?void 0:n?Fe(t,r):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(i=o(i)||i);return i},R=(e,t)=>(r,n)=>t(r,n,e);const Ae=()=>{let e=[];return{add:(i,s,o,l,m)=>e.push({unitId:i,subUnitId:s,row:o,col:l,value:m}),getEffects:()=>e,clean:()=>{e=[]}}};let V=class extends a.Disposable{constructor(t,r,n,i,s){super();G(this,"_collectEffectMutation",Ae());this._sheetInterceptorService=t,this._numfmtService=r,this._univerInstanceService=n,this._injector=i,this._editorBridgeService=s,this._initInterceptorEditorStart(),this._initInterceptorEditorEnd(),this._initInterceptorCommands()}_initInterceptorEditorStart(){this._editorBridgeService&&this.disposeWithMe(a.toDisposable(this._sheetInterceptorService.writeCellInterceptor.intercept(g.BEFORE_CELL_EDIT,{handler:(t,r,n)=>{const i=r.row,s=r.col,o=this._numfmtService.getValue(r.unitId,r.subUnitId,i,s);if(o)switch(v.getPatternType(o.pattern)){case"scientific":case"currency":case"grouped":case"number":{const m=r.worksheet.getCellRaw(i,s);return n&&n(m)}case"percent":case"date":case"time":case"datetime":default:return n&&n(t)}return n(t)}})))}_initInterceptorEditorEnd(){this.disposeWithMe(a.toDisposable(this._sheetInterceptorService.writeCellInterceptor.intercept(g.AFTER_CELL_EDIT,{handler:(t,r,n)=>{var m,u,f;this._collectEffectMutation.clean();const i=this._numfmtService.getValue(r.unitId,r.subUnitId,r.row,r.col);if(!(t!=null&&t.v)&&!(t!=null&&t.p)||a.isTextFormat(i==null?void 0:i.pattern)||t.t===a.CellValueType.FORCE_STRING)return n(t);const s=(m=t.p)==null?void 0:m.body,o=(f=(u=t==null?void 0:t.p)==null?void 0:u.body)!=null&&f.dataStream?t.p.body.dataStream.replace(/\r\n$/,""):String(t.v),l=a.numfmt.parseDate(o)||a.numfmt.parseTime(o)||a.numfmt.parseNumber(o);if(s)if(Re(s)){const{dataStream:d}=s,h=d.replace(/\r\n$/,""),y=Number(h);if(Number.isNaN(y)&&!l)return n(t)}else return n(t);if(l){if(!l.z&&a.willLoseNumericPrecision(o))return n({...t,p:void 0,v:o,t:a.CellValueType.FORCE_STRING});l.z&&this._collectEffectMutation.add(r.unitId,r.subUnitId,r.row,r.col,{pattern:l.z});const d=Number(l.v);return n({...t,p:void 0,v:d,t:a.CellValueType.NUMBER})}return n(t)}})))}_initInterceptorCommands(){const t=this;this.disposeWithMe(this._sheetInterceptorService.interceptCommand({getMutations(r){var n;switch(r.id){case g.SetRangeValuesCommand.id:{const i=t._univerInstanceService.getCurrentUnitForType(a.UniverInstanceType.UNIVER_SHEET),s=i.getUnitId(),o=(n=i.getActiveSheet())==null?void 0:n.getSheetId();if(!o)return{redos:[],undos:[]};const l=t._collectEffectMutation.getEffects();if(t._collectEffectMutation.clean(),!l.length)return{redos:[],undos:[]};const m=l.filter(h=>{var y;return!!((y=h.value)!=null&&y.pattern)}).map(h=>({row:h.row,col:h.col,pattern:h.value.pattern})),u=l.filter(h=>{var y;return!((y=h.value)!=null&&y.pattern)}).map(h=>({startRow:h.row,endColumn:h.col,startColumn:h.col,endRow:h.row})),f=[],d=[];if(m.length){const h={id:g.SetNumfmtMutation.id,params:g.transformCellsToRange(s,o,m)};f.push(h),d.push(...g.factorySetNumfmtUndoMutation(t._injector,h.params))}if(u.length){const h={id:g.RemoveNumfmtMutation.id,params:{unitId:s,subUnitId:o,ranges:u}};f.push(h),d.push(...g.factoryRemoveNumfmtUndoMutation(t._injector,h.params))}return{redos:f,undos:d.reverse()}}}return{redos:[],undos:[]}}}))}};V=He([R(0,a.Inject(g.SheetInterceptorService)),R(1,a.Inject(g.INumfmtService)),R(2,a.Inject(a.IUniverInstanceService)),R(3,a.Inject(a.Injector)),R(4,a.Optional(D.IEditorBridgeService))],V);function Re(e){const{textRuns:t=[],paragraphs:r=[],customRanges:n,customBlocks:i=[]}=e,s=["va"];return!(t.some(o=>!!(o.ts&&Object.keys(o.ts).some(m=>s.includes(m))))||r.some(o=>o.bullet)||r.length>=2||n!=null&&n.length||i.length>0)}const oe=e=>[{label:"sheet.numfmt.general",pattern:null},{label:"sheet.numfmt.text",pattern:a.DEFAULT_TEXT_FORMAT_EXCEL},"|",{label:"sheet.numfmt.number",pattern:"0"},{label:"sheet.numfmt.percent",pattern:"0.00%"},{label:"sheet.numfmt.scientific",pattern:"0.00E+00"},"|",{label:"sheet.numfmt.accounting",pattern:`"${e}" #,##0.00_);[Red]("${e}"#,##0.00)`},{label:"sheet.numfmt.financialValue",pattern:"#,##0.00;[Red]#,##0.00"},{label:"sheet.numfmt.currency",pattern:`"${e}"#,##0.00_);[Red]("${e}"#,##0.00)`},{label:"sheet.numfmt.roundingCurrency",pattern:`"${e}"#,##0;[Red]"${e}"#,##0`},"|",{label:"sheet.numfmt.date",pattern:"yyyy-mm-dd;@"},{label:"sheet.numfmt.time",pattern:'am/pm h":"mm":"ss'},{label:"sheet.numfmt.dateTime",pattern:"yyyy-m-d am/pm h:mm"},{label:"sheet.numfmt.timeDuration",pattern:"h:mm:ss"},"|",{label:"sheet.numfmt.moreFmt",pattern:""}],We=e=>({icon:new x.Observable(t=>{const r=e.get(a.LocaleService);return t.next(v.getCurrencySymbolIconByLocale(r.getCurrentLocale()).icon),r.localeChanged$.subscribe(()=>{t.next(v.getCurrencySymbolIconByLocale(r.getCurrentLocale()).icon)})}),id:v.SetCurrencyCommand.id,title:"sheet.numfmt.currency",tooltip:"sheet.numfmt.currency",type:_.MenuItemType.BUTTON,hidden$:_.getMenuHiddenObservable(e,a.UniverInstanceType.UNIVER_SHEET),disabled$:D.getCurrentRangeDisable$(e,{workbookTypes:[g.WorkbookEditablePermission],worksheetTypes:[g.WorksheetEditPermission,g.WorksheetSetCellStylePermission],rangeTypes:[g.RangeProtectionPermissionEditPoint]})}),Be=e=>({icon:"AddDigitsIcon",id:v.AddDecimalCommand.id,title:"sheet.numfmt.addDecimal",tooltip:"sheet.numfmt.addDecimal",type:_.MenuItemType.BUTTON,hidden$:_.getMenuHiddenObservable(e,a.UniverInstanceType.UNIVER_SHEET),disabled$:D.getCurrentRangeDisable$(e,{workbookTypes:[g.WorkbookEditablePermission],worksheetTypes:[g.WorksheetEditPermission,g.WorksheetSetCellStylePermission],rangeTypes:[g.RangeProtectionPermissionEditPoint]})}),Ve=e=>({icon:"ReduceDigitsIcon",id:v.SubtractDecimalCommand.id,title:"sheet.numfmt.subtractDecimal",tooltip:"sheet.numfmt.subtractDecimal",type:_.MenuItemType.BUTTON,hidden$:_.getMenuHiddenObservable(e,a.UniverInstanceType.UNIVER_SHEET),disabled$:D.getCurrentRangeDisable$(e,{workbookTypes:[g.WorkbookEditablePermission],worksheetTypes:[g.WorksheetEditPermission,g.WorksheetSetCellStylePermission],rangeTypes:[g.RangeProtectionPermissionEditPoint]})}),qe=e=>({icon:"PercentIcon",id:v.SetPercentCommand.id,title:"sheet.numfmt.percent",tooltip:"sheet.numfmt.percent",type:_.MenuItemType.BUTTON,hidden$:_.getMenuHiddenObservable(e,a.UniverInstanceType.UNIVER_SHEET),disabled$:D.getCurrentRangeDisable$(e,{workbookTypes:[g.WorkbookEditablePermission],worksheetTypes:[g.WorksheetEditPermission,g.WorksheetSetCellStylePermission],rangeTypes:[g.RangeProtectionPermissionEditPoint]})}),Ge=e=>{const t=e.get(a.IUniverInstanceService),r=e.get(a.ICommandService),n=e.get(a.LocaleService),i=e.get(g.SheetsSelectionsService),s=[g.RemoveNumfmtMutation.id,g.SetNumfmtMutation.id],o=D.deriveStateFromActiveSheet$(t,"",({workbook:l,worksheet:m})=>new x.Observable(u=>x.merge(i.selectionMoveEnd$,a.fromCallback(r.onCommandExecuted.bind(r)).pipe(x.filter(([f])=>s.includes(f.id)))).subscribe(()=>{var d,h;const f=i.getCurrentSelections();if(f&&f[0]){const y=f[0].range,b=y.startRow,p=y.startColumn,P=(h=l.getStyles().get((d=m.getCell(b,p))==null?void 0:d.s))==null?void 0:h.n,I=P==null?void 0:P.pattern,M=v.getCurrencySymbolByLocale(n.getCurrentLocale());let O=n.t("sheet.numfmt.general");if(a.isDefaultFormat(I)){u.next(O);return}if(I){const U=oe(M).filter(k=>typeof k=="object"&&k.pattern).find(k=>a.isPatternEqualWithoutDecimal(I,k.pattern));U&&typeof U=="object"&&U.pattern?O=n.t(U.label):O=n.t("sheet.numfmt.moreFmt")}u.next(O)}})));return{label:ce,id:F.id,tooltip:"sheet.numfmt.title",type:_.MenuItemType.SELECTOR,slot:!0,selections:[{label:{name:le,hoverable:!1,selectable:!1}}],value$:o,hidden$:_.getMenuHiddenObservable(e,a.UniverInstanceType.UNIVER_SHEET),disabled$:D.getCurrentRangeDisable$(e,{workbookTypes:[g.WorkbookEditablePermission],worksheetTypes:[g.WorksheetSetCellStylePermission,g.WorksheetEditPermission],rangeTypes:[g.RangeProtectionPermissionEditPoint]})}},ce="sheet.numfmt.moreNumfmtType",le="sheet.numfmt.moreNumfmtType.options",Ke=e=>{const{value:t}=e,r=_.useDependency(a.LocaleService),n=t!=null?t:r.t("sheet.numfmt.general");return c.jsx("span",{className:"univer-text-sm",children:n})},Ze=()=>{const e=_.useDependency(a.ICommandService),t=_.useDependency(a.LocaleService),r=_.useDependency(_.ILayoutService),n=_.useDependency(v.SheetsNumfmtCellContentController),i=_.useDependency(g.SheetsSelectionsService),s=u=>{const f=i.getCurrentLastSelection();if(!f)return;const d=f.range,h=[];a.Range.foreach(d,(y,b)=>{u?h.push({row:y,col:b,pattern:u,type:v.getPatternType(u)}):h.push({row:y,col:b})}),e.executeCommand(v.SetNumfmtCommand.id,{values:h}),r.focus()},o=S.useMemo(()=>{const u=v.localeCurrencySymbolMap.get(t.getCurrentLocale());return oe(u)},[t]),l=u=>{if(u===0)s(null);else if(u===o.length-1)e.executeCommand(F.id),r.focus();else{const f=o[u];f.pattern&&s(f.pattern)}},m=1220;return c.jsx("div",{className:"univer-grid univer-gap-1 univer-p-1.5",children:o.map((u,f)=>u==="|"?c.jsx(E.Separator,{},f):c.jsxs("div",{className:"univer-flex univer-h-7 univer-items-center univer-justify-between univer-gap-6 univer-rounded univer-px-2 univer-text-sm hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-700",onClick:()=>{l(f)},children:[c.jsx("span",{children:t.t(u.label)}),c.jsx("span",{className:"univer-text-xs univer-text-gray-500",children:u.pattern?v.getPatternPreview(u.pattern||"",m,n.locale).result.trim():""})]},f))})},Ye={[_.RibbonDataGroup.FORMULAS]:{[v.SetCurrencyCommand.id]:{order:0,menuItemFactory:We},[v.AddDecimalCommand.id]:{order:1,menuItemFactory:Be},[v.SubtractDecimalCommand.id]:{order:2,menuItemFactory:Ve},[v.SetPercentCommand.id]:{order:3,menuItemFactory:qe},[F.id]:{order:4,menuItemFactory:Ge}}};var ze=Object.getOwnPropertyDescriptor,Xe=(e,t,r,n)=>{for(var i=n>1?void 0:n?ze(t,r):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(i=o(i)||i);return i},ue=(e,t)=>(r,n)=>t(r,n,e);let q=class extends a.Disposable{constructor(e,t){super(),this._componentManager=e,this._menuManagerService=t,this._initMenu()}_initMenu(){this._menuManagerService.mergeMenu(Ye),[[ce,Ke],[le,Ze]].forEach(([e,t])=>{this.disposeWithMe(this._componentManager.register(e,t))})}};q=Xe([ue(0,a.Inject(_.ComponentManager)),ue(1,_.IMenuManagerService)],q);var Je=Object.defineProperty,Qe=Object.getOwnPropertyDescriptor,et=(e,t,r)=>t in e?Je(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tt=(e,t,r,n)=>{for(var i=n>1?void 0:n?Qe(t,r):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(i=o(i)||i);return i},Q=(e,t)=>(r,n)=>t(r,n,e),me=(e,t,r)=>et(e,typeof t!="symbol"?t+"":t,r);const nt="SHEET_NUMFMT_UI_PLUGIN";C.UniverSheetsNumfmtUIPlugin=class extends a.Plugin{constructor(t=te,r,n,i){super(),this._config=t,this._injector=r,this._configService=n,this._renderManagerService=i;const{menu:s,...o}=a.merge({},te,this._config);s&&this._configService.setConfig("menu",s,{merge:!0}),this._configService.setConfig("sheets-numfmt-ui.config",o)}onStarting(){a.registerDependencies(this._injector,[[A],[V],[H],[q]])}onRendered(){this._registerRenderModules(),a.touchDependencies(this._injector,[[A],[V],[q]])}_registerRenderModules(){[[Z]].forEach(r=>{this.disposeWithMe(this._renderManagerService.registerRenderModule(a.UniverInstanceType.UNIVER_SHEET,r))})}},me(C.UniverSheetsNumfmtUIPlugin,"pluginName",nt),me(C.UniverSheetsNumfmtUIPlugin,"type",a.UniverInstanceType.UNIVER_SHEET),C.UniverSheetsNumfmtUIPlugin=tt([a.DependentOn(D.UniverSheetsUIPlugin,v.UniverSheetsNumfmtPlugin),Q(1,a.Inject(a.Injector)),Q(2,a.IConfigService),Q(3,$.IRenderManagerService)],C.UniverSheetsNumfmtUIPlugin),Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})});
1
+ (function(C,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("@univerjs/core"),require("@univerjs/engine-render"),require("@univerjs/sheets-numfmt"),require("@univerjs/sheets-ui"),require("@univerjs/sheets"),require("@univerjs/ui"),require("rxjs"),require("rxjs/operators"),require("react/jsx-runtime"),require("react"),require("@univerjs/design")):typeof define=="function"&&define.amd?define(["exports","@univerjs/core","@univerjs/engine-render","@univerjs/sheets-numfmt","@univerjs/sheets-ui","@univerjs/sheets","@univerjs/ui","rxjs","rxjs/operators","react/jsx-runtime","react","@univerjs/design"],a):(C=typeof globalThis<"u"?globalThis:C||self,a(C.UniverSheetsNumfmtUi={},C.UniverCore,C.UniverEngineRender,C.UniverSheetsNumfmt,C.UniverSheetsUi,C.UniverSheets,C.UniverUi,C.rxjs,C.rxjs.operators,C.React,C.React,C.UniverDesign))})(this,(function(C,a,$,v,D,g,_,x,B,c,S,E){"use strict";var at=Object.defineProperty;var st=(C,a,$)=>a in C?at(C,a,{enumerable:!0,configurable:!0,writable:!0,value:$}):C[a]=$;var G=(C,a,$)=>st(C,typeof a!="symbol"?a+"":a,$);const te={};var me=Object.getOwnPropertyDescriptor,ve=(e,t,r,n)=>{for(var i=n>1?void 0:n?me(t,r):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(i=o(i)||i);return i},j=(e,t)=>(r,n)=>t(r,n,e);const K="SHEET_NUMFMT_ALERT";let Z=class extends a.Disposable{constructor(e,t,r,n,i,s,o){super(),this._context=e,this._hoverManagerService=t,this._cellAlertManagerService=r,this._localeService=n,this._zenZoneService=i,this._numfmtService=s,this._configService=o,this._init()}_init(){this._initCellAlertPopup(),this._initZenService()}_initCellAlertPopup(){this.disposeWithMe(this._hoverManagerService.currentCell$.pipe(x.debounceTime(100)).subscribe(e=>{var t,r;if(e){const n=e.location,i=this._context.unit,s=i.getActiveSheet();if(!s)return;const o=n.unitId,l=n.subUnitId;let d;const u=s.getCell(n.row,n.col);if(u!=null&&u.s){const f=i.getStyles().get(u.s);f!=null&&f.n&&(d=f.n)}if(d||(d=this._numfmtService.getValue(o,l,n.row,n.col)),!d){this._hideAlert();return}if(a.isTextFormat(d.pattern)&&a.Tools.isDefine(u==null?void 0:u.v)&&a.isRealNum(u.v)){if((t=this._configService.getConfig(v.SHEETS_NUMFMT_PLUGIN_CONFIG_KEY))!=null&&t.disableTextFormatAlert)return;const f=this._cellAlertManagerService.currentAlert.get(K),m=(r=f==null?void 0:f.alert)==null?void 0:r.location;if(m&&m.row===n.row&&m.col===n.col&&m.subUnitId===n.subUnitId&&m.unitId===n.unitId)return;this._cellAlertManagerService.showAlert({type:D.CellAlertType.ERROR,title:this._localeService.t("info.error"),message:this._localeService.t("info.forceStringInfo"),location:n,width:200,height:74,key:K});return}}this._hideAlert()}))}_initZenService(){this.disposeWithMe(this._zenZoneService.visible$.subscribe(e=>{e&&this._hideAlert()}))}_hideAlert(){this._cellAlertManagerService.removeAlert(K)}};Z=ve([j(1,a.Inject(D.HoverManagerService)),j(2,a.Inject(D.CellAlertManagerService)),j(3,a.Inject(a.LocaleService)),j(4,_.IZenZoneService),j(5,a.Inject(g.INumfmtService)),j(6,a.IConfigService)],Z);const Y={id:"sheet.operation.close.numfmt.panel",type:a.CommandType.OPERATION,handler:()=>!0},F={id:"sheet.operation.open.numfmt.panel",type:a.CommandType.OPERATION,handler:e=>(e.get(A).openPanel(),!0)};var fe=Object.getOwnPropertyDescriptor,pe=(e,t,r,n)=>{for(var i=n>1?void 0:n?fe(t,r):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(i=o(i)||i);return i},he=(e,t)=>(r,n)=>t(r,n,e);const z=S.createContext([]);let H=class{constructor(e){this._localStorageService=e}_getKey(e){return`userHabitController_${e}`}async addHabit(e,t){const r=this._getKey(e);return this._localStorageService.getItem(r).then(n=>{n||this._localStorageService.setItem(r,t)})}markHabit(e,t){const r=this._getKey(e);this._localStorageService.getItem(r).then(n=>{if(n){const i=n.findIndex(s=>s===t);i>-1&&n.splice(i,1),n.unshift(t),this._localStorageService.setItem(r,n)}})}async getHabit(e,t){const r=this._getKey(e),n=await this._localStorageService.getItem(r);if(t&&n){const i=n.map((s,o,l)=>{const d=l.length;return{value:s,priority:d-o}});return t.sort((s,o)=>{var u,f;const l=((u=i.find(m=>m.value===s))==null?void 0:u.priority)||-1;return(((f=i.find(m=>m.value===o))==null?void 0:f.priority)||-1)-l})}return n||[]}deleteHabit(e){this._localStorageService.removeItem(e)}};H=pe([he(0,a.Inject(a.ILocalStorageService))],H);const ne="numfmtCurrency",ge=e=>{const t=_.useDependency(H),[r,n]=S.useState(v.currencySymbols);return S.useEffect(()=>{t.addHabit("numfmtCurrency",[]).then(()=>{t.getHabit(ne,[...v.currencySymbols]).then(s=>{n(s),e&&e(s)})})},[]),{userHabitCurrency:r,mark:s=>{t.markHabit(ne,s)}}},Se=()=>{const e=S.useRef([]),[t,r]=S.useState({});return S.useEffect(()=>{e.current.forEach(i=>{i()}),e.current=[]},[t]),i=>{e.current.push(i),r({})}},ye=e=>!!v.getCurrencyType(e)&&e.startsWith("_("),_e=e=>{const{defaultPattern:t,action:r,onChange:n}=e,[i,s]=S.useState(()=>v.getDecimalFromPattern(t||"",2)),o=S.useContext(z),[l,d]=S.useState(()=>v.getCurrencyType(t)||o[0]),u=S.useMemo(()=>o.map(b=>({label:b,value:b})),[]),m=_.useDependency(a.LocaleService).t;r.current=()=>v.setPatternDecimal(`_("${l}"* #,##0${i>0?".0":""}_)`,i);const h=b=>{d(b),n(v.setPatternDecimal(`_("${b}"* #,##0${i>0?".0":""}_)`,i))},y=b=>{const p=b||0;s(p),n(v.setPatternDecimal(`_("${l}"* #,##0${p>0?".0":""}_)`,p))};return c.jsxs("div",{children:[c.jsxs("div",{className:"univer-mt-4 univer-flex univer-justify-between",children:[c.jsxs("div",{className:"option",children:[c.jsx("div",{className:"univer-text-sm univer-text-gray-400",children:m("sheet.numfmt.decimalLength")}),c.jsx("div",{className:"univer-mt-2 univer-w-32",children:c.jsx(E.InputNumber,{value:i,step:1,precision:0,max:20,min:0,onChange:y})})]}),c.jsxs("div",{className:"option",children:[c.jsx("div",{className:"univer-text-sm univer-text-gray-400",children:m("sheet.numfmt.currencyType")}),c.jsx("div",{className:"univer-mt-2 univer-w-36",children:c.jsx(E.Select,{options:u,value:l,onChange:h})})]})]}),c.jsx("div",{className:"univer-mt-4 univer-text-sm univer-text-gray-400",children:m("sheet.numfmt.accountingDes")})]})},Ce=e=>!!v.getCurrencyType(e)&&!e.startsWith("_("),be=e=>{const r=_.useDependency(a.LocaleService).t,n=S.useContext(z),[i,s]=S.useState(()=>v.getCurrencyType(e.defaultPattern)||n[0]),[o,l]=S.useState(()=>v.getDecimalFromPattern(e.defaultPattern||"",2)),[d,u]=S.useState(()=>{var I;const p=v.getCurrencyFormatOptions(i);return((I=p.find(M=>a.isPatternEqualWithoutDecimal(M.value,e.defaultPattern)))==null?void 0:I.value)||p[0].value}),f=S.useMemo(()=>v.getCurrencyFormatOptions(i),[i]),m=S.useMemo(()=>n.map(p=>({label:p,value:p})),[n]);e.action.current=()=>v.setPatternDecimal(d,o);const h=p=>{if(p===void 0)return;s(p);const P=v.getCurrencyFormatOptions(p)[0].value;u(P),e.onChange(v.setPatternDecimal(P,o))},y=p=>{p!==void 0&&(u(p),e.onChange(v.setPatternDecimal(p,o)))},b=p=>{l(p||0),e.onChange(v.setPatternDecimal(d,p||0))};return c.jsxs("div",{children:[c.jsxs("div",{className:"univer-mt-4 univer-flex univer-justify-between",children:[c.jsxs("div",{className:"option",children:[c.jsx("div",{className:"univer-text-sm univer-text-gray-400",children:r("sheet.numfmt.decimalLength")}),c.jsx("div",{className:"univer-mt-2 univer-w-32",children:c.jsx(E.InputNumber,{value:o,max:20,min:0,onChange:b})})]}),c.jsxs("div",{className:"option",children:[c.jsx("div",{className:"univer-text-sm univer-text-gray-400",children:r("sheet.numfmt.currencyType")}),c.jsx("div",{className:"univer-mt-2 univer-w-36",children:c.jsx(E.Select,{value:i,options:m,onChange:h})})]})]}),c.jsx("div",{className:"label univer-mt-4",children:r("sheet.numfmt.negType")}),c.jsx("div",{className:"univer-mt-2",children:c.jsx(E.SelectList,{value:d,options:f,onChange:y})}),c.jsx("div",{className:"univer-mt-4 univer-text-sm univer-text-gray-400",children:r("sheet.numfmt.currencyDes")})]})};var w=function(){return w=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},w.apply(this,arguments)},Ie=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},re=S.forwardRef(function(e,t){var r=e.icon,n=e.id,i=e.className,s=e.extend,o=Ie(e,["icon","id","className","extend"]),l="univerjs-icon univerjs-icon-".concat(n," ").concat(i||"").trim(),d=S.useRef("_".concat(Pe()));return ie(r,"".concat(n),{defIds:r.defIds,idSuffix:d.current},w({ref:t,className:l},o),s)});function ie(e,t,r,n,i){return S.createElement(e.tag,w(w({key:t},Te(e,r,i)),n),(Ee(e,r).children||[]).map(function(s,o){return ie(s,"".concat(t,"-").concat(e.tag,"-").concat(o),r,void 0,i)}))}function Te(e,t,r){var n=w({},e.attrs);r!=null&&r.colorChannel1&&n.fill==="colorChannel1"&&(n.fill=r.colorChannel1),e.tag==="mask"&&n.id&&(n.id=n.id+t.idSuffix),Object.entries(n).forEach(function(s){var o=s[0],l=s[1];o==="mask"&&typeof l=="string"&&(n[o]=l.replace(/url\(#(.*)\)/,"url(#$1".concat(t.idSuffix,")")))});var i=t.defIds;return!i||i.length===0||(e.tag==="use"&&n["xlink:href"]&&(n["xlink:href"]=n["xlink:href"]+t.idSuffix),Object.entries(n).forEach(function(s){var o=s[0],l=s[1];typeof l=="string"&&(n[o]=l.replace(/url\(#(.*)\)/,"url(#$1".concat(t.idSuffix,")")))})),n}function Ee(e,t){var r,n=t.defIds;return!n||n.length===0?e:e.tag==="defs"&&(!((r=e.children)===null||r===void 0)&&r.length)?w(w({},e),{children:e.children.map(function(i){return typeof i.attrs.id=="string"&&n&&n.includes(i.attrs.id)?w(w({},i),{attrs:w(w({},i.attrs),{id:i.attrs.id+t.idSuffix})}):i})}):e}function Pe(){return Math.random().toString(36).substring(2,8)}re.displayName="UniverIcon";var Me={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M14.1544 3.75557C14.3887 3.98988 14.3887 4.36978 14.1544 4.6041L6.51409 12.2444C6.40157 12.3569 6.24896 12.4201 6.08983 12.4201C5.9307 12.4201 5.77808 12.3569 5.66556 12.2444L1.84541 8.42425C1.6111 8.18993 1.6111 7.81003 1.84541 7.57572C2.07973 7.34141 2.45963 7.34141 2.69394 7.57572L6.08983 10.9716L13.3059 3.75557C13.5402 3.52126 13.9201 3.52126 14.1544 3.75557Z",fillRule:"evenodd",clipRule:"evenodd"}}]},ae=S.forwardRef(function(e,t){return S.createElement(re,Object.assign({},e,{id:"check-mark-icon",ref:t,icon:Me}))});ae.displayName="CheckMarkIcon";const X="customFormat",J="numfmt_custom_pattern";function De(e){const{defaultPattern:t,action:r,onChange:n}=e,i=_.useDependency(H),s=_.useDependency(a.ILocalStorageService),o=_.useDependency(a.LocaleService),[l,d]=S.useState(t);r.current=()=>(i.markHabit(X,l),s.getItem(J).then((y=[])=>{const b=[...new Set([l,...y||[]])].splice(0,10).filter(p=>!!p);s.setItem(J,b)}),l);const[u,f]=S.useState([]);S.useEffect(()=>{s.getItem(J).then(y=>{const b=[...v.CURRENCYFORMAT.map(p=>p.suffix("$")),...v.DATEFMTLISG.map(p=>p.suffix),...v.NUMBERFORMAT.map(p=>p.suffix)];b.push(...y||[]),i.addHabit(X,[]).finally(()=>{i.getHabit(X,b).then(p=>{f([...new Set(p)])})})})},[]);const m=y=>{d(y),n(y)},h=()=>{n(l)};return c.jsxs("div",{children:[c.jsx("div",{className:"univer-mt-4 univer-text-sm univer-text-gray-400",children:o.t("sheet.numfmt.customFormat")}),c.jsx(E.Input,{placeholder:o.t("sheet.numfmt.customFormat"),onBlur:h,value:l,onChange:d,className:"univer-mt-2 univer-w-full"}),c.jsx("div",{className:E.clsx("univer-mt-2 univer-max-h-[400px] univer-overflow-auto univer-rounded-lg univer-p-2",E.borderClassName),children:u.map(y=>c.jsxs("div",{onClick:()=>m(y),className:"univer-flex univer-cursor-pointer univer-items-center univer-gap-1.5 univer-py-1.5 univer-text-sm",children:[c.jsx("div",{className:"univer-flex univer-w-4 univer-items-center univer-text-primary-600",children:l===y&&c.jsx(ae,{})}),c.jsx("div",{children:y})]},y))}),c.jsx("div",{className:"univer-mt-3 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",children:o.t("sheet.numfmt.customFormatDes")})]})}const we=e=>{const t=a.numfmt.getFormatInfo(e);return v.getDateFormatOptions().map(r=>r.value).includes(e)||["date","datetime","time"].includes(t.type)};function Ne(e){const{onChange:t,defaultPattern:r}=e,n=S.useMemo(v.getDateFormatOptions,[]),i=_.useDependency(a.LocaleService),[s,o]=S.useState(()=>{if(r){const d=n.find(u=>u.value===r);if(d)return d.value}return n[0].value});e.action.current=()=>s;const l=d=>{d!==void 0&&(o(d),t(d))};return c.jsxs("div",{children:[c.jsx("div",{className:"univer-mt-4 univer-text-sm univer-text-gray-400",children:i.t("sheet.numfmt.dateType")}),c.jsx("div",{className:"univer-mt-2",children:c.jsx(E.SelectList,{value:s,options:n,onChange:l})}),c.jsx("div",{className:"univer-mt-3.5 univer-text-sm/5 univer-text-gray-600 dark:!univer-text-gray-200",children:i.t("sheet.numfmt.dateDes")})]})}const xe=e=>!e,Oe=e=>{const r=_.useDependency(a.LocaleService).t;return e.action.current=()=>"",c.jsx("div",{children:c.jsx("div",{className:"univer-mt-3.5 univer-text-sm/5 univer-text-gray-600 dark:!univer-text-gray-200",children:r("sheet.numfmt.generalDes")})})},Ue=e=>v.getNumberFormatOptions().some(t=>a.isPatternEqualWithoutDecimal(t.value,e));function ke(e){const t=_.useDependency(a.LocaleService),r=S.useMemo(v.getNumberFormatOptions,[]),[n,i]=S.useState(()=>v.getDecimalFromPattern(e.defaultPattern||"",0)),[s,o]=S.useState(()=>{const m=r.find(h=>a.isPatternEqualWithoutDecimal(h.value,e.defaultPattern||""));return(m==null?void 0:m.value)||r[0].value}),l=S.useMemo(()=>v.setPatternDecimal(s,Number(n||0)),[s,n]),d=S.useMemo(()=>!v.isPatternHasDecimal(s),[s]),u=m=>{i(m||0),e.onChange(v.setPatternDecimal(s,Number(m||0)))},f=m=>{m!==void 0&&(i(v.getDecimalFromPattern(m,0)),o(m),e.onChange(m))};return e.action.current=()=>l,c.jsxs("div",{children:[c.jsx("div",{className:"univer-mt-4 univer-text-sm univer-text-gray-400",children:t.t("sheet.numfmt.decimalLength")}),c.jsx("div",{className:"univer-mt-2",children:c.jsx(E.InputNumber,{disabled:d,value:n,max:20,min:0,onChange:u})}),c.jsxs("div",{className:"univer-mt-4 univer-text-sm univer-text-gray-400",children:[" ",t.t("sheet.numfmt.negType")]}),c.jsx("div",{className:"univer-mt-2",children:c.jsx(E.SelectList,{onChange:f,options:r,value:s})}),c.jsx("div",{className:"univer-mt-3.5 univer-text-sm/5 univer-text-gray-600 dark:!univer-text-gray-200",children:t.t("sheet.numfmt.thousandthPercentileDes")})]})}const $e=e=>{const{defaultValue:t,defaultPattern:r,row:n,col:i}=e.value,s=_.useDependency(a.LocaleService),o=S.useRef(()=>""),l=s.t,d=Se(),u=S.useMemo(()=>[{label:"sheet.numfmt.general",component:Oe},{label:"sheet.numfmt.accounting",component:_e},{label:"sheet.numfmt.currency",component:be},{label:"sheet.numfmt.date",component:Ne},{label:"sheet.numfmt.thousandthPercentile",component:ke},{label:"sheet.numfmt.customFormat",component:De}].map(T=>({...T,label:l(T.label)})),[]),[f,m]=S.useState(I),[h,y]=S.useState(()=>`${n}_${i}`),{mark:b,userHabitCurrency:p}=ge(()=>y(`${n}_${i}_userCurrency'`)),P=S.useMemo(()=>{var T;return(T=u.find(L=>L.label===f))==null?void 0:T.component},[f]);function I(){return[xe,ye,Ce,we,Ue].reduce((L,rt,it)=>L||(rt(r)?u[it].label:""),"")||u[0].label}const M=u.map(T=>({label:T.label,value:T.label})),O=T=>{m(T),d(()=>e.onChange({type:"change",value:o.current()||""}))},U=S.useCallback(T=>{e.onChange({type:"change",value:T})},[]),k=()=>{const T=o.current()||"",L=v.getCurrencyType(T);L&&b(L),e.onChange({type:"confirm",value:T})},W=()=>{e.onChange({type:"cancel",value:""})},ee={onChange:U,defaultValue:t,defaultPattern:r,action:o};return S.useEffect(()=>{m(I()),y(`${n}_${i}`)},[n,i]),c.jsxs("div",{className:E.clsx("univer-flex univer-h-full univer-flex-col univer-justify-between univer-overflow-y-auto univer-pb-5",E.scrollbarClassName),children:[c.jsxs("div",{children:[c.jsx("div",{className:"univer-mt-3.5 univer-text-sm univer-text-gray-400",children:l("sheet.numfmt.numfmtType")}),c.jsx("div",{className:"univer-mt-2",children:c.jsx(E.Select,{className:"univer-w-full",value:f,options:M,onChange:O})}),c.jsx("div",{children:P&&c.jsx(z.Provider,{value:p,children:S.createElement(P,{...ee,key:h})})})]}),c.jsxs("div",{className:"univer-mb-5 univer-mt-3.5 univer-flex univer-justify-end",children:[c.jsx(E.Button,{onClick:W,className:"univer-mr-3",children:l("sheet.numfmt.cancel")}),c.jsx(E.Button,{variant:"primary",onClick:k,children:l("sheet.numfmt.confirm")})]})]})};var je=Object.getOwnPropertyDescriptor,Le=(e,t,r,n)=>{for(var i=n>1?void 0:n?je(t,r):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(i=o(i)||i);return i},N=(e,t)=>(r,n)=>t(r,n,e);const se="SHEET_NUMFMT_PANEL";let A=class extends a.Disposable{constructor(t,r,n,i,s,o,l,d,u,f,m){super();G(this,"_previewPattern","");G(this,"_sidebarDisposable",null);this._sheetInterceptorService=t,this._themeService=r,this._univerInstanceService=n,this._commandService=i,this._selectionManagerService=s,this._renderManagerService=o,this._numfmtService=l,this._componentManager=d,this._sidebarService=u,this._localeService=f,this._sheetsNumfmtCellContentController=m,this._initRealTimeRenderingInterceptor(),this._initPanel(),this._initCommands(),this._initCloseListener(),this._commandExecutedListener(),this._initNumfmtLocalChange()}_initNumfmtLocalChange(){this.disposeWithMe(x.merge(this._sheetsNumfmtCellContentController.locale$,this._localeService.currentLocale$).subscribe(()=>{this._forceUpdate()}))}openPanel(){var P;const t=this._sidebarService,r=this._selectionManagerService,n=this._commandService,i=this._univerInstanceService,s=this._numfmtService,o=this._localeService,d=(((P=r.getCurrentSelections())==null?void 0:P.map(I=>I.range))||[])[0];if(!d)return!1;const u=i.getCurrentUnitForType(a.UniverInstanceType.UNIVER_SHEET),f=u.getActiveSheet();if(!f)return!1;const m=f.getCellRaw(d.startRow,d.startColumn),h=s.getValue(u.getUnitId(),f.getSheetId(),d.startRow,d.startColumn);let y="";h&&(y=h.pattern);const b=(m==null?void 0:m.t)===a.CellValueType.NUMBER?m.v:12345678,p={onChange:I=>{var M;if(I.type==="change")this._previewPattern=I.value,this._forceUpdate();else if(I.type==="confirm"){const O=((M=r.getCurrentSelections())==null?void 0:M.map(W=>W.range))||[],U={values:[]},k=v.getPatternType(I.value);O.forEach(W=>{a.Range.foreach(W,(ee,T)=>{U.values.push({row:ee,col:T,pattern:I.value,type:k})})}),n.executeCommand(v.SetNumfmtCommand.id,U),t.close()}else I.type==="cancel"&&t.close()},value:{defaultPattern:y,defaultValue:b,row:d.startRow,col:d.startColumn}};return this._sidebarDisposable=t.open({header:{title:o.t("sheet.numfmt.title")},children:{label:se,...p},onClose:()=>{this._forceUpdate(),n.executeCommand(Y.id)}}),!0}_forceUpdate(t){var n;const r=this._renderManagerService.getRenderById(t!=null?t:this._univerInstanceService.getCurrentUnitForType(a.UniverInstanceType.UNIVER_SHEET).getUnitId());r==null||r.with(D.SheetSkeletonManagerService).reCalculate(),(n=r==null?void 0:r.mainComponent)==null||n.makeDirty()}_initCommands(){[F,Y].forEach(t=>{this.disposeWithMe(this._commandService.registerCommand(t))})}_initPanel(){this.disposeWithMe(this._componentManager.register(se,$e))}_initRealTimeRenderingInterceptor(){const t=new x.Observable(n=>{this._commandService.onCommandExecuted(i=>{i.id===F.id&&n.next(!0),i.id===Y.id&&n.next(!1)})}),r=x.combineLatest([t,this._selectionManagerService.selectionMoveEnd$.pipe(B.map(n=>n?n.map(i=>i.range):[]))]);this.disposeWithMe(a.toDisposable(r.pipe(B.switchMap(([n,i])=>new x.Observable(s=>{const o=new a.DisposableCollection;return n&&i.length&&s.next({selectionRanges:i,disposableCollection:o}),()=>{o.dispose()}})),B.tap(()=>{this._previewPattern=null})).subscribe(({disposableCollection:n,selectionRanges:i})=>{var o,l;const s=this._univerInstanceService.getCurrentUnitForType(a.UniverInstanceType.UNIVER_SHEET);this.openPanel(),n.add(this._sheetInterceptorService.intercept(g.INTERCEPTOR_POINT.CELL_CONTENT,{priority:99,effect:a.InterceptorEffectEnum.Value|a.InterceptorEffectEnum.Style,handler:(d,u,f)=>{var b;const{row:m,col:h}=u,y=f(d)||{};if(i.find(p=>p.startColumn<=h&&p.endColumn>=h&&p.startRow<=m&&p.endRow>=m)){const p=u.worksheet.getCellRaw(m,h),P=p==null?void 0:p.v,I=p==null?void 0:p.t;if(P==null||I!==a.CellValueType.NUMBER||this._previewPattern===null)return y;const M=v.getPatternPreviewIgnoreGeneral(this._previewPattern,P,this._sheetsNumfmtCellContentController.locale);if(M.color){const O=(b=this._themeService.getColorFromTheme(`${M.color}.500`))!=null?b:M.color;return{...y,v:M.result,t:a.CellValueType.STRING,s:{cl:{rgb:O}}}}return{...y,v:M.result,t:a.CellValueType.STRING}}return y}})),(l=(o=this._renderManagerService.getRenderById(s.getUnitId()))==null?void 0:o.mainComponent)==null||l.makeDirty()})))}_commandExecutedListener(){const t=[g.RemoveNumfmtMutation.id,g.SetNumfmtMutation.id];this.disposeWithMe(new x.Observable(r=>{const n=this._commandService.onCommandExecuted(i=>{if(t.includes(i.id)){const s=i.params;r.next(s.unitId)}});return()=>n.dispose()}).pipe(B.debounceTime(16)).subscribe(r=>this._forceUpdate(r)))}_initCloseListener(){this._univerInstanceService.getCurrentTypeOfUnit$(a.UniverInstanceType.UNIVER_SHEET).subscribe(t=>{var r;t||((r=this._sidebarDisposable)==null||r.dispose(),this._sidebarDisposable=null)})}};A=Le([N(0,a.Inject(g.SheetInterceptorService)),N(1,a.Inject(a.ThemeService)),N(2,a.IUniverInstanceService),N(3,a.ICommandService),N(4,a.Inject(g.SheetsSelectionsService)),N(5,$.IRenderManagerService),N(6,g.INumfmtService),N(7,a.Inject(_.ComponentManager)),N(8,_.ISidebarService),N(9,a.Inject(a.LocaleService)),N(10,a.Inject(v.SheetsNumfmtCellContentController))],A);var Fe=Object.getOwnPropertyDescriptor,He=(e,t,r,n)=>{for(var i=n>1?void 0:n?Fe(t,r):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(i=o(i)||i);return i},R=(e,t)=>(r,n)=>t(r,n,e);const Ae=()=>{let e=[];return{add:(i,s,o,l,d)=>e.push({unitId:i,subUnitId:s,row:o,col:l,value:d}),getEffects:()=>e,clean:()=>{e=[]}}};let V=class extends a.Disposable{constructor(t,r,n,i,s){super();G(this,"_collectEffectMutation",Ae());this._sheetInterceptorService=t,this._numfmtService=r,this._univerInstanceService=n,this._injector=i,this._editorBridgeService=s,this._initInterceptorEditorStart(),this._initInterceptorEditorEnd(),this._initInterceptorCommands()}_initInterceptorEditorStart(){this._editorBridgeService&&this.disposeWithMe(a.toDisposable(this._sheetInterceptorService.writeCellInterceptor.intercept(g.BEFORE_CELL_EDIT,{handler:(t,r,n)=>{const i=r.row,s=r.col,o=this._numfmtService.getValue(r.unitId,r.subUnitId,i,s);if(o)switch(v.getPatternType(o.pattern)){case"scientific":case"currency":case"grouped":case"number":{const d=r.worksheet.getCellRaw(i,s);return n&&n(d)}case"percent":case"date":case"time":case"datetime":default:return n&&n(t)}return n(t)}})))}_initInterceptorEditorEnd(){this.disposeWithMe(a.toDisposable(this._sheetInterceptorService.writeCellInterceptor.intercept(g.AFTER_CELL_EDIT,{handler:(t,r,n)=>{var d,u,f;this._collectEffectMutation.clean();const i=this._numfmtService.getValue(r.unitId,r.subUnitId,r.row,r.col);if(!(t!=null&&t.v)&&!(t!=null&&t.p)||a.isTextFormat(i==null?void 0:i.pattern)||t.t===a.CellValueType.FORCE_STRING)return n(t);const s=(d=t.p)==null?void 0:d.body,o=(f=(u=t==null?void 0:t.p)==null?void 0:u.body)!=null&&f.dataStream?t.p.body.dataStream.replace(/\r\n$/,""):String(t.v),l=v.getNumfmtParseValueFilter(o);if(s)if(Re(s)){const{dataStream:m}=s,h=m.replace(/\r\n$/,""),y=Number(h);if(Number.isNaN(y)&&!l)return n(t)}else return n(t);if(l){if(!l.z&&a.willLoseNumericPrecision(o))return n({...t,p:void 0,v:o,t:a.CellValueType.FORCE_STRING});l.z&&this._collectEffectMutation.add(r.unitId,r.subUnitId,r.row,r.col,{pattern:l.z});const m=Number(l.v);return n({...t,p:void 0,v:m,t:a.CellValueType.NUMBER})}return n(t)}})))}_initInterceptorCommands(){const t=this;this.disposeWithMe(this._sheetInterceptorService.interceptCommand({getMutations(r){var n;switch(r.id){case g.SetRangeValuesCommand.id:{const i=t._univerInstanceService.getCurrentUnitForType(a.UniverInstanceType.UNIVER_SHEET),s=i.getUnitId(),o=(n=i.getActiveSheet())==null?void 0:n.getSheetId();if(!o)return{redos:[],undos:[]};const l=t._collectEffectMutation.getEffects();if(t._collectEffectMutation.clean(),!l.length)return{redos:[],undos:[]};const d=l.filter(h=>{var y;return!!((y=h.value)!=null&&y.pattern)}).map(h=>({row:h.row,col:h.col,pattern:h.value.pattern})),u=l.filter(h=>{var y;return!((y=h.value)!=null&&y.pattern)}).map(h=>({startRow:h.row,endColumn:h.col,startColumn:h.col,endRow:h.row})),f=[],m=[];if(d.length){const h={id:g.SetNumfmtMutation.id,params:g.transformCellsToRange(s,o,d)};f.push(h),m.push(...g.factorySetNumfmtUndoMutation(t._injector,h.params))}if(u.length){const h={id:g.RemoveNumfmtMutation.id,params:{unitId:s,subUnitId:o,ranges:u}};f.push(h),m.push(...g.factoryRemoveNumfmtUndoMutation(t._injector,h.params))}return{redos:f,undos:m.reverse()}}}return{redos:[],undos:[]}}}))}};V=He([R(0,a.Inject(g.SheetInterceptorService)),R(1,a.Inject(g.INumfmtService)),R(2,a.Inject(a.IUniverInstanceService)),R(3,a.Inject(a.Injector)),R(4,a.Optional(D.IEditorBridgeService))],V);function Re(e){const{textRuns:t=[],paragraphs:r=[],customRanges:n,customBlocks:i=[]}=e,s=["va"];return!(t.some(o=>!!(o.ts&&Object.keys(o.ts).some(d=>s.includes(d))))||r.some(o=>o.bullet)||r.length>=2||n!=null&&n.length||i.length>0)}const oe=e=>[{label:"sheet.numfmt.general",pattern:null},{label:"sheet.numfmt.text",pattern:a.DEFAULT_TEXT_FORMAT_EXCEL},"|",{label:"sheet.numfmt.number",pattern:"0"},{label:"sheet.numfmt.percent",pattern:"0.00%"},{label:"sheet.numfmt.scientific",pattern:"0.00E+00"},"|",{label:"sheet.numfmt.accounting",pattern:`"${e}" #,##0.00_);[Red]("${e}"#,##0.00)`},{label:"sheet.numfmt.financialValue",pattern:"#,##0.00;[Red]#,##0.00"},{label:"sheet.numfmt.currency",pattern:`"${e}"#,##0.00_);[Red]("${e}"#,##0.00)`},{label:"sheet.numfmt.roundingCurrency",pattern:`"${e}"#,##0;[Red]"${e}"#,##0`},"|",{label:"sheet.numfmt.date",pattern:"yyyy-mm-dd;@"},{label:"sheet.numfmt.time",pattern:'am/pm h":"mm":"ss'},{label:"sheet.numfmt.dateTime",pattern:"yyyy-m-d am/pm h:mm"},{label:"sheet.numfmt.timeDuration",pattern:"h:mm:ss"},"|",{label:"sheet.numfmt.moreFmt",pattern:""}],We=e=>({icon:new x.Observable(t=>{const r=e.get(a.LocaleService);return t.next(v.getCurrencySymbolIconByLocale(r.getCurrentLocale()).icon),r.localeChanged$.subscribe(()=>{t.next(v.getCurrencySymbolIconByLocale(r.getCurrentLocale()).icon)})}),id:v.SetCurrencyCommand.id,title:"sheet.numfmt.currency",tooltip:"sheet.numfmt.currency",type:_.MenuItemType.BUTTON,hidden$:_.getMenuHiddenObservable(e,a.UniverInstanceType.UNIVER_SHEET),disabled$:D.getCurrentRangeDisable$(e,{workbookTypes:[g.WorkbookEditablePermission],worksheetTypes:[g.WorksheetEditPermission,g.WorksheetSetCellStylePermission],rangeTypes:[g.RangeProtectionPermissionEditPoint]})}),Be=e=>({icon:"AddDigitsIcon",id:v.AddDecimalCommand.id,title:"sheet.numfmt.addDecimal",tooltip:"sheet.numfmt.addDecimal",type:_.MenuItemType.BUTTON,hidden$:_.getMenuHiddenObservable(e,a.UniverInstanceType.UNIVER_SHEET),disabled$:D.getCurrentRangeDisable$(e,{workbookTypes:[g.WorkbookEditablePermission],worksheetTypes:[g.WorksheetEditPermission,g.WorksheetSetCellStylePermission],rangeTypes:[g.RangeProtectionPermissionEditPoint]})}),Ve=e=>({icon:"ReduceDigitsIcon",id:v.SubtractDecimalCommand.id,title:"sheet.numfmt.subtractDecimal",tooltip:"sheet.numfmt.subtractDecimal",type:_.MenuItemType.BUTTON,hidden$:_.getMenuHiddenObservable(e,a.UniverInstanceType.UNIVER_SHEET),disabled$:D.getCurrentRangeDisable$(e,{workbookTypes:[g.WorkbookEditablePermission],worksheetTypes:[g.WorksheetEditPermission,g.WorksheetSetCellStylePermission],rangeTypes:[g.RangeProtectionPermissionEditPoint]})}),qe=e=>({icon:"PercentIcon",id:v.SetPercentCommand.id,title:"sheet.numfmt.percent",tooltip:"sheet.numfmt.percent",type:_.MenuItemType.BUTTON,hidden$:_.getMenuHiddenObservable(e,a.UniverInstanceType.UNIVER_SHEET),disabled$:D.getCurrentRangeDisable$(e,{workbookTypes:[g.WorkbookEditablePermission],worksheetTypes:[g.WorksheetEditPermission,g.WorksheetSetCellStylePermission],rangeTypes:[g.RangeProtectionPermissionEditPoint]})}),Ge=e=>{const t=e.get(a.IUniverInstanceService),r=e.get(a.ICommandService),n=e.get(a.LocaleService),i=e.get(g.SheetsSelectionsService),s=[g.RemoveNumfmtMutation.id,g.SetNumfmtMutation.id],o=D.deriveStateFromActiveSheet$(t,"",({workbook:l,worksheet:d})=>new x.Observable(u=>x.merge(i.selectionMoveEnd$,a.fromCallback(r.onCommandExecuted.bind(r)).pipe(x.filter(([f])=>s.includes(f.id)))).subscribe(()=>{var m,h;const f=i.getCurrentSelections();if(f&&f[0]){const y=f[0].range,b=y.startRow,p=y.startColumn,P=(h=l.getStyles().get((m=d.getCell(b,p))==null?void 0:m.s))==null?void 0:h.n,I=P==null?void 0:P.pattern,M=v.getCurrencySymbolByLocale(n.getCurrentLocale());let O=n.t("sheet.numfmt.general");if(a.isDefaultFormat(I)){u.next(O);return}if(I){const U=oe(M).filter(k=>typeof k=="object"&&k.pattern).find(k=>a.isPatternEqualWithoutDecimal(I,k.pattern));U&&typeof U=="object"&&U.pattern?O=n.t(U.label):O=n.t("sheet.numfmt.moreFmt")}u.next(O)}})));return{label:ce,id:F.id,tooltip:"sheet.numfmt.title",type:_.MenuItemType.SELECTOR,slot:!0,selections:[{label:{name:le,hoverable:!1,selectable:!1}}],value$:o,hidden$:_.getMenuHiddenObservable(e,a.UniverInstanceType.UNIVER_SHEET),disabled$:D.getCurrentRangeDisable$(e,{workbookTypes:[g.WorkbookEditablePermission],worksheetTypes:[g.WorksheetSetCellStylePermission,g.WorksheetEditPermission],rangeTypes:[g.RangeProtectionPermissionEditPoint]})}},ce="sheet.numfmt.moreNumfmtType",le="sheet.numfmt.moreNumfmtType.options",Ke=e=>{const{value:t}=e,r=_.useDependency(a.LocaleService),n=t!=null?t:r.t("sheet.numfmt.general");return c.jsx("span",{className:"univer-text-sm",children:n})},Ze=()=>{const e=_.useDependency(a.ICommandService),t=_.useDependency(a.LocaleService),r=_.useDependency(_.ILayoutService),n=_.useDependency(v.SheetsNumfmtCellContentController),i=_.useDependency(g.SheetsSelectionsService),s=u=>{const f=i.getCurrentLastSelection();if(!f)return;const m=f.range,h=[];a.Range.foreach(m,(y,b)=>{u?h.push({row:y,col:b,pattern:u,type:v.getPatternType(u)}):h.push({row:y,col:b})}),e.executeCommand(v.SetNumfmtCommand.id,{values:h}),r.focus()},o=S.useMemo(()=>{const u=v.localeCurrencySymbolMap.get(t.getCurrentLocale());return oe(u)},[t]),l=u=>{if(u===0)s(null);else if(u===o.length-1)e.executeCommand(F.id),r.focus();else{const f=o[u];f.pattern&&s(f.pattern)}},d=1220;return c.jsx("div",{className:"univer-grid univer-gap-1 univer-p-1.5",children:o.map((u,f)=>u==="|"?c.jsx(E.Separator,{},f):c.jsxs("div",{className:"univer-flex univer-h-7 univer-items-center univer-justify-between univer-gap-6 univer-rounded univer-px-2 univer-text-sm hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-700",onClick:()=>{l(f)},children:[c.jsx("span",{children:t.t(u.label)}),c.jsx("span",{className:"univer-text-xs univer-text-gray-500",children:u.pattern?v.getPatternPreview(u.pattern||"",d,n.locale).result.trim():""})]},f))})},Ye={[_.RibbonDataGroup.FORMULAS]:{[v.SetCurrencyCommand.id]:{order:0,menuItemFactory:We},[v.AddDecimalCommand.id]:{order:1,menuItemFactory:Be},[v.SubtractDecimalCommand.id]:{order:2,menuItemFactory:Ve},[v.SetPercentCommand.id]:{order:3,menuItemFactory:qe},[F.id]:{order:4,menuItemFactory:Ge}}};var ze=Object.getOwnPropertyDescriptor,Xe=(e,t,r,n)=>{for(var i=n>1?void 0:n?ze(t,r):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(i=o(i)||i);return i},ue=(e,t)=>(r,n)=>t(r,n,e);let q=class extends a.Disposable{constructor(e,t){super(),this._componentManager=e,this._menuManagerService=t,this._initMenu()}_initMenu(){this._menuManagerService.mergeMenu(Ye),[[ce,Ke],[le,Ze]].forEach(([e,t])=>{this.disposeWithMe(this._componentManager.register(e,t))})}};q=Xe([ue(0,a.Inject(_.ComponentManager)),ue(1,_.IMenuManagerService)],q);var Je=Object.defineProperty,Qe=Object.getOwnPropertyDescriptor,et=(e,t,r)=>t in e?Je(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tt=(e,t,r,n)=>{for(var i=n>1?void 0:n?Qe(t,r):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(i=o(i)||i);return i},Q=(e,t)=>(r,n)=>t(r,n,e),de=(e,t,r)=>et(e,typeof t!="symbol"?t+"":t,r);const nt="SHEET_NUMFMT_UI_PLUGIN";C.UniverSheetsNumfmtUIPlugin=class extends a.Plugin{constructor(t=te,r,n,i){super(),this._config=t,this._injector=r,this._configService=n,this._renderManagerService=i;const{menu:s,...o}=a.merge({},te,this._config);s&&this._configService.setConfig("menu",s,{merge:!0}),this._configService.setConfig("sheets-numfmt-ui.config",o)}onStarting(){a.registerDependencies(this._injector,[[A],[V],[H],[q]])}onRendered(){this._registerRenderModules(),a.touchDependencies(this._injector,[[A],[V],[q]])}_registerRenderModules(){[[Z]].forEach(r=>{this.disposeWithMe(this._renderManagerService.registerRenderModule(a.UniverInstanceType.UNIVER_SHEET,r))})}},de(C.UniverSheetsNumfmtUIPlugin,"pluginName",nt),de(C.UniverSheetsNumfmtUIPlugin,"type",a.UniverInstanceType.UNIVER_SHEET),C.UniverSheetsNumfmtUIPlugin=tt([a.DependentOn(D.UniverSheetsUIPlugin,v.UniverSheetsNumfmtPlugin),Q(1,a.Inject(a.Injector)),Q(2,a.IConfigService),Q(3,$.IRenderManagerService)],C.UniverSheetsNumfmtUIPlugin),Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})}));
@@ -1 +1 @@
1
- (function(e,a){typeof exports=="object"&&typeof module<"u"?module.exports=a():typeof define=="function"&&define.amd?define(a):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsNumfmtUiCaES=a())})(this,function(){"use strict";return{sheet:{numfmt:{title:"Format de nombre",numfmtType:"Tipus de format",cancel:"Cancel·lar",confirm:"Confirmar",general:"General",accounting:"Comptabilitat",text:"Text",number:"Nombre",percent:"Percentatge",scientific:"Científic",currency:"Moneda",date:"Data",time:"Hora",thousandthPercentile:"Separador de milers",preview:"Previsualització",dateTime:"Data i hora",decimalLength:"Decimals",currencyType:"Símbol de moneda",moreFmt:"Formats",financialValue:"Valor financer",roundingCurrency:"Arrodonir la moneda",timeDuration:"Durada",currencyDes:"El format de moneda s'utilitza per representar valors monetaris generals. El format de comptabilitat alinea una columna de valors amb els punts decimals.",accountingDes:"El format de nombre de comptabilitat alinea una columna de valors amb símbols de moneda i punts decimals.",dateType:"Tipus de data",dateDes:"El format de data presenta valors de sèries de data i hora com a valors de data.",negType:"Tipus de nombre negatiu",generalDes:"El format regular no conté cap format de nombre específic.",thousandthPercentileDes:"El format de separador de milers s'utilitza per a la representació de nombres ordinaris. Els formats monetaris i de comptabilitat proporcionen un format especialitzat per a càlculs de valors monetaris.",addDecimal:"Augmentar decimals",subtractDecimal:"Disminuir decimals",customFormat:"Format personalitzat",customFormatDes:"Genera formats de nombre personalitzats basats en els existents."}}}});
1
+ (function(e,a){typeof exports=="object"&&typeof module<"u"?module.exports=a():typeof define=="function"&&define.amd?define(a):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsNumfmtUiCaES=a())})(this,(function(){"use strict";return{sheet:{numfmt:{title:"Format de nombre",numfmtType:"Tipus de format",cancel:"Cancel·lar",confirm:"Confirmar",general:"General",accounting:"Comptabilitat",text:"Text",number:"Nombre",percent:"Percentatge",scientific:"Científic",currency:"Moneda",date:"Data",time:"Hora",thousandthPercentile:"Separador de milers",preview:"Previsualització",dateTime:"Data i hora",decimalLength:"Decimals",currencyType:"Símbol de moneda",moreFmt:"Formats",financialValue:"Valor financer",roundingCurrency:"Arrodonir la moneda",timeDuration:"Durada",currencyDes:"El format de moneda s'utilitza per representar valors monetaris generals. El format de comptabilitat alinea una columna de valors amb els punts decimals.",accountingDes:"El format de nombre de comptabilitat alinea una columna de valors amb símbols de moneda i punts decimals.",dateType:"Tipus de data",dateDes:"El format de data presenta valors de sèries de data i hora com a valors de data.",negType:"Tipus de nombre negatiu",generalDes:"El format regular no conté cap format de nombre específic.",thousandthPercentileDes:"El format de separador de milers s'utilitza per a la representació de nombres ordinaris. Els formats monetaris i de comptabilitat proporcionen un format especialitzat per a càlculs de valors monetaris.",addDecimal:"Augmentar decimals",subtractDecimal:"Disminuir decimals",customFormat:"Format personalitzat",customFormatDes:"Genera formats de nombre personalitzats basats en els existents."}}}}));
@@ -1 +1 @@
1
- (function(e,n){typeof exports=="object"&&typeof module<"u"?module.exports=n():typeof define=="function"&&define.amd?define(n):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsNumfmtUiEnUS=n())})(this,function(){"use strict";return{sheet:{numfmt:{title:"Number format",numfmtType:"Format types",cancel:"Cancel",confirm:"Confirm",general:"General",accounting:"Accounting",text:"Text",number:"Number",percent:"Percentage",scientific:"Scientific",currency:"Currency",date:"Date",time:"Time",thousandthPercentile:"Thousands separator",preview:"Preview",dateTime:"Date and time",decimalLength:"Decimal places",currencyType:"Currency Symbol",moreFmt:"Formats",financialValue:"Financial value",roundingCurrency:"Rounding up the currency",timeDuration:"Duration Time",currencyDes:"The currency format is used to represent general currency values. The accounting format aligns a column of values with decimal points",accountingDes:"The accounting number format aligns a column of values with currency symbols and decimal points",dateType:"Date Type",dateDes:"The date format presents date and time series values as date values.",negType:"A negative number type",generalDes:"The regular format does not contain any specific number format.",thousandthPercentileDes:"The percentile format is used for the representation of ordinary numbers. Monetary and accounting formats provide a specialized format for monetary value calculations.",addDecimal:"Increase decimal places",subtractDecimal:"Decreasing decimal places",customFormat:"Custom Format",customFormatDes:"Generate custom number formats based on existing formats."}}}});
1
+ (function(e,n){typeof exports=="object"&&typeof module<"u"?module.exports=n():typeof define=="function"&&define.amd?define(n):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsNumfmtUiEnUS=n())})(this,(function(){"use strict";return{sheet:{numfmt:{title:"Number format",numfmtType:"Format types",cancel:"Cancel",confirm:"Confirm",general:"General",accounting:"Accounting",text:"Text",number:"Number",percent:"Percentage",scientific:"Scientific",currency:"Currency",date:"Date",time:"Time",thousandthPercentile:"Thousands separator",preview:"Preview",dateTime:"Date and time",decimalLength:"Decimal places",currencyType:"Currency Symbol",moreFmt:"Formats",financialValue:"Financial value",roundingCurrency:"Rounding up the currency",timeDuration:"Duration Time",currencyDes:"The currency format is used to represent general currency values. The accounting format aligns a column of values with decimal points",accountingDes:"The accounting number format aligns a column of values with currency symbols and decimal points",dateType:"Date Type",dateDes:"The date format presents date and time series values as date values.",negType:"A negative number type",generalDes:"The regular format does not contain any specific number format.",thousandthPercentileDes:"The percentile format is used for the representation of ordinary numbers. Monetary and accounting formats provide a specialized format for monetary value calculations.",addDecimal:"Increase decimal places",subtractDecimal:"Decreasing decimal places",customFormat:"Custom Format",customFormatDes:"Generate custom number formats based on existing formats."}}}}));
@@ -1 +1 @@
1
- (function(e,o){typeof exports=="object"&&typeof module<"u"?module.exports=o():typeof define=="function"&&define.amd?define(o):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsNumfmtUiEsES=o())})(this,function(){"use strict";return{sheet:{numfmt:{title:"Formato de número",numfmtType:"Tipos de formato",cancel:"Cancelar",confirm:"Confirmar",general:"General",accounting:"Contabilidad",text:"Texto",number:"Número",percent:"Porcentaje",scientific:"Científico",currency:"Moneda",date:"Fecha",time:"Hora",thousandthPercentile:"Separador de miles",preview:"Vista previa",dateTime:"Fecha y hora",decimalLength:"Decimales",currencyType:"Símbolo de moneda",moreFmt:"Formatos",financialValue:"Valor financiero",roundingCurrency:"Redondear la moneda",timeDuration:"Duración",currencyDes:"El formato de moneda se utiliza para representar valores monetarios generales. El formato de contabilidad alinea una columna de valores con los puntos decimales.",accountingDes:"El formato de número de contabilidad alinea una columna de valores con símbolos de moneda y puntos decimales.",dateType:"Tipo de fecha",dateDes:"El formato de fecha presenta valores de series de fecha y hora como valores de fecha.",negType:"Tipo de número negativo",generalDes:"El formato regular no contiene ningún formato de número específico.",thousandthPercentileDes:"El formato de separador de miles se utiliza para la representación de números ordinarios. Los formatos monetarios y de contabilidad proporcionan un formato especializado para cálculos de valores monetarios.",addDecimal:"Aumentar decimales",subtractDecimal:"Disminuir decimales",customFormat:"Formato personalizado",customFormatDes:"Generar formatos de número personalizados basados en los existentes."}}}});
1
+ (function(e,o){typeof exports=="object"&&typeof module<"u"?module.exports=o():typeof define=="function"&&define.amd?define(o):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsNumfmtUiEsES=o())})(this,(function(){"use strict";return{sheet:{numfmt:{title:"Formato de número",numfmtType:"Tipos de formato",cancel:"Cancelar",confirm:"Confirmar",general:"General",accounting:"Contabilidad",text:"Texto",number:"Número",percent:"Porcentaje",scientific:"Científico",currency:"Moneda",date:"Fecha",time:"Hora",thousandthPercentile:"Separador de miles",preview:"Vista previa",dateTime:"Fecha y hora",decimalLength:"Decimales",currencyType:"Símbolo de moneda",moreFmt:"Formatos",financialValue:"Valor financiero",roundingCurrency:"Redondear la moneda",timeDuration:"Duración",currencyDes:"El formato de moneda se utiliza para representar valores monetarios generales. El formato de contabilidad alinea una columna de valores con los puntos decimales.",accountingDes:"El formato de número de contabilidad alinea una columna de valores con símbolos de moneda y puntos decimales.",dateType:"Tipo de fecha",dateDes:"El formato de fecha presenta valores de series de fecha y hora como valores de fecha.",negType:"Tipo de número negativo",generalDes:"El formato regular no contiene ningún formato de número específico.",thousandthPercentileDes:"El formato de separador de miles se utiliza para la representación de números ordinarios. Los formatos monetarios y de contabilidad proporcionan un formato especializado para cálculos de valores monetarios.",addDecimal:"Aumentar decimales",subtractDecimal:"Disminuir decimales",customFormat:"Formato personalizado",customFormatDes:"Generar formatos de número personalizados basados en los existentes."}}}}));
@@ -1 +1 @@
1
- (function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsNumfmtUiFaIR=t())})(this,function(){"use strict";return{sheet:{numfmt:{title:"قالب‌بندی عدد",numfmtType:"انواع قالب‌بندی",cancel:"انصراف",confirm:"تایید",general:"عمومی",accounting:"حسابداری",text:"متن",number:"عدد",percent:"درصد",scientific:"علمی",currency:"ارز",date:"تاریخ",time:"زمان",thousandthPercentile:"جداساز هزارتایی",preview:"پیش‌نمایش",dateTime:"تاریخ و زمان",decimalLength:"اعشار",currencyType:"نماد ارز",moreFmt:"قالب‌ها",financialValue:"مقدار مالی",roundingCurrency:"گرد کردن ارز",timeDuration:"مدت زمان",currencyDes:"قالب‌بندی ارز برای نمایش مقادیر عمومی ارز استفاده می‌شود. قالب‌بندی حسابداری ستونی از مقادیر را با اعشار تراز می‌کند.",accountingDes:"قالب‌بندی عددی حسابداری ستونی از مقادیر را با نمادهای ارز و اعشار تراز می‌کند.",dateType:"نوع تاریخ",dateDes:"قالب‌بندی تاریخ مقادیر سری تاریخ و زمان را به عنوان مقادیر تاریخ ارائه می‌دهد.",negType:"نوع عدد منفی",generalDes:"قالب‌بندی معمولی حاوی هیچ قالب‌بندی عدد خاصی نیست.",thousandthPercentileDes:"قالب‌بندی درصدی برای نمایش اعداد معمولی استفاده می‌شود. قالب‌بندی‌های پولی و حسابداری قالب تخصصی برای محاسبات مقدار پولی ارائه می‌دهند.",addDecimal:"افزایش اعشار",subtractDecimal:"کاهش اعشار",customFormat:"قالب‌بندی سفارشی",customFormatDes:"ایجاد قالب‌بندی‌های عددی سفارشی بر اساس قالب‌بندی‌های موجود."}}}});
1
+ (function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsNumfmtUiFaIR=t())})(this,(function(){"use strict";return{sheet:{numfmt:{title:"قالب‌بندی عدد",numfmtType:"انواع قالب‌بندی",cancel:"انصراف",confirm:"تایید",general:"عمومی",accounting:"حسابداری",text:"متن",number:"عدد",percent:"درصد",scientific:"علمی",currency:"ارز",date:"تاریخ",time:"زمان",thousandthPercentile:"جداساز هزارتایی",preview:"پیش‌نمایش",dateTime:"تاریخ و زمان",decimalLength:"اعشار",currencyType:"نماد ارز",moreFmt:"قالب‌ها",financialValue:"مقدار مالی",roundingCurrency:"گرد کردن ارز",timeDuration:"مدت زمان",currencyDes:"قالب‌بندی ارز برای نمایش مقادیر عمومی ارز استفاده می‌شود. قالب‌بندی حسابداری ستونی از مقادیر را با اعشار تراز می‌کند.",accountingDes:"قالب‌بندی عددی حسابداری ستونی از مقادیر را با نمادهای ارز و اعشار تراز می‌کند.",dateType:"نوع تاریخ",dateDes:"قالب‌بندی تاریخ مقادیر سری تاریخ و زمان را به عنوان مقادیر تاریخ ارائه می‌دهد.",negType:"نوع عدد منفی",generalDes:"قالب‌بندی معمولی حاوی هیچ قالب‌بندی عدد خاصی نیست.",thousandthPercentileDes:"قالب‌بندی درصدی برای نمایش اعداد معمولی استفاده می‌شود. قالب‌بندی‌های پولی و حسابداری قالب تخصصی برای محاسبات مقدار پولی ارائه می‌دهند.",addDecimal:"افزایش اعشار",subtractDecimal:"کاهش اعشار",customFormat:"قالب‌بندی سفارشی",customFormatDes:"ایجاد قالب‌بندی‌های عددی سفارشی بر اساس قالب‌بندی‌های موجود."}}}}));
@@ -1 +1 @@
1
- (function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsNumfmtUiFrFR=t())})(this,function(){"use strict";return{sheet:{numfmt:{title:"Format de nombre",numfmtType:"Types de format",cancel:"Annuler",confirm:"Confirmer",general:"Général",accounting:"Comptabilité",text:"Texte",number:"Nombre",percent:"Pourcentage",scientific:"Scientifique",currency:"Devise",date:"Date",time:"Heure",thousandthPercentile:"Séparateur de milliers",preview:"Aperçu",dateTime:"Date et heure",decimalLength:"Nombre de décimales",currencyType:"Symbole de devise",moreFmt:"Formats",financialValue:"Valeur financière",roundingCurrency:"Arrondir la devise",timeDuration:"Durée",currencyDes:"Le format de devise est utilisé pour représenter des valeurs monétaires générales. Le format de comptabilité aligne une colonne de valeurs avec des points décimaux",accountingDes:"Le format de nombre de comptabilité aligne une colonne de valeurs avec des symboles de devise et des points décimaux",dateType:"Type de date",dateDes:"Le format de date présente les valeurs de la série date et heure sous forme de valeurs de date.",negType:"Type de nombre négatif",generalDes:"Le format général ne contient aucun format de nombre spécifique.",thousandthPercentileDes:"Le format de percentile est utilisé pour la représentation des nombres ordinaires. Les formats monétaires et comptables fournissent un format spécialisé pour les calculs de valeurs monétaires.",addDecimal:"Augmenter les décimales",subtractDecimal:"Diminuer les décimales",customFormat:"Format personnalisé",customFormatDes:"Générer des formats de nombre personnalisés basés sur des formats existants."}}}});
1
+ (function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsNumfmtUiFrFR=t())})(this,(function(){"use strict";return{sheet:{numfmt:{title:"Format de nombre",numfmtType:"Types de format",cancel:"Annuler",confirm:"Confirmer",general:"Général",accounting:"Comptabilité",text:"Texte",number:"Nombre",percent:"Pourcentage",scientific:"Scientifique",currency:"Devise",date:"Date",time:"Heure",thousandthPercentile:"Séparateur de milliers",preview:"Aperçu",dateTime:"Date et heure",decimalLength:"Nombre de décimales",currencyType:"Symbole de devise",moreFmt:"Formats",financialValue:"Valeur financière",roundingCurrency:"Arrondir la devise",timeDuration:"Durée",currencyDes:"Le format de devise est utilisé pour représenter des valeurs monétaires générales. Le format de comptabilité aligne une colonne de valeurs avec des points décimaux",accountingDes:"Le format de nombre de comptabilité aligne une colonne de valeurs avec des symboles de devise et des points décimaux",dateType:"Type de date",dateDes:"Le format de date présente les valeurs de la série date et heure sous forme de valeurs de date.",negType:"Type de nombre négatif",generalDes:"Le format général ne contient aucun format de nombre spécifique.",thousandthPercentileDes:"Le format de percentile est utilisé pour la représentation des nombres ordinaires. Les formats monétaires et comptables fournissent un format spécialisé pour les calculs de valeurs monétaires.",addDecimal:"Augmenter les décimales",subtractDecimal:"Diminuer les décimales",customFormat:"Format personnalisé",customFormatDes:"Générer des formats de nombre personnalisés basés sur des formats existants."}}}}));
@@ -1 +1 @@
1
- (function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsNumfmtUiKoKR=t())})(this,function(){"use strict";return{sheet:{numfmt:{title:"숫자 서식",numfmtType:"서식 종류",cancel:"취소",confirm:"확인",general:"일반",accounting:"회계",text:"텍스트",number:"숫자",percent:"백분율",scientific:"과학적 표기",currency:"통화",date:"날짜",time:"시간",thousandthPercentile:"천 단위 구분기호",preview:"미리보기",dateTime:"날짜 및 시간",decimalLength:"소수점 자리수",currencyType:"통화 기호",moreFmt:"기타 서식",financialValue:"재무 값",roundingCurrency:"통화 반올림",timeDuration:"시간 길이",currencyDes:"통화 서식은 일반적인 통화 값을 표시하는 데 사용됩니다. 회계 서식은 소수점에 맞춰 값을 정렬합니다.",accountingDes:"회계 숫자 서식은 통화 기호와 소수점에 맞춰 값을 정렬합니다.",dateType:"날짜 유형",dateDes:"날짜 서식은 날짜 및 시간 값을 날짜 형식으로 표시합니다.",negType:"음수 표시 형식",generalDes:"일반 서식은 특정 숫자 서식이 적용되지 않습니다.",thousandthPercentileDes:"백분율 서식은 일반 숫자를 표시할 때 사용됩니다. 통화 및 회계 서식은 금액 계산에 특화되어 있습니다.",addDecimal:"소수점 자리수 늘리기",subtractDecimal:"소수점 자리수 줄이기",customFormat:"사용자 지정 서식",customFormatDes:"기존 서식을 기반으로 사용자 지정 숫자 서식을 만듭니다."}}}});
1
+ (function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsNumfmtUiKoKR=t())})(this,(function(){"use strict";return{sheet:{numfmt:{title:"숫자 서식",numfmtType:"서식 종류",cancel:"취소",confirm:"확인",general:"일반",accounting:"회계",text:"텍스트",number:"숫자",percent:"백분율",scientific:"과학적 표기",currency:"통화",date:"날짜",time:"시간",thousandthPercentile:"천 단위 구분기호",preview:"미리보기",dateTime:"날짜 및 시간",decimalLength:"소수점 자리수",currencyType:"통화 기호",moreFmt:"기타 서식",financialValue:"재무 값",roundingCurrency:"통화 반올림",timeDuration:"시간 길이",currencyDes:"통화 서식은 일반적인 통화 값을 표시하는 데 사용됩니다. 회계 서식은 소수점에 맞춰 값을 정렬합니다.",accountingDes:"회계 숫자 서식은 통화 기호와 소수점에 맞춰 값을 정렬합니다.",dateType:"날짜 유형",dateDes:"날짜 서식은 날짜 및 시간 값을 날짜 형식으로 표시합니다.",negType:"음수 표시 형식",generalDes:"일반 서식은 특정 숫자 서식이 적용되지 않습니다.",thousandthPercentileDes:"백분율 서식은 일반 숫자를 표시할 때 사용됩니다. 통화 및 회계 서식은 금액 계산에 특화되어 있습니다.",addDecimal:"소수점 자리수 늘리기",subtractDecimal:"소수점 자리수 줄이기",customFormat:"사용자 지정 서식",customFormatDes:"기존 서식을 기반으로 사용자 지정 숫자 서식을 만듭니다."}}}}));
@@ -1 +1 @@
1
- (function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsNumfmtUiRuRU=t())})(this,function(){"use strict";return{sheet:{numfmt:{title:"Формат числа",numfmtType:"Типы форматов",cancel:"Отмена",confirm:"Подтвердить",general:"Общий",accounting:"Бухгалтерский",text:"Текст",number:"Число",percent:"Процент",scientific:"Экспоненциальный",currency:"Валюта",date:"Дата",time:"Время",thousandthPercentile:"Разделитель тысяч",preview:"Предпросмотр",dateTime:"Дата и время",decimalLength:"Десятичные знаки",currencyType:"Символ валюты",moreFmt:"Другие форматы",financialValue:"Финансовое значение",roundingCurrency:"Округление валюты",timeDuration:"Продолжительность времени",currencyDes:"Формат валюты используется для представления общих значений валюты. Формат бухгалтерского учета выравнивает столбец значений по десятичным точкам.",accountingDes:"Формат бухгалтерских чисел выравнивает столбец значений по символам валюты и десятичным точкам.",dateType:"Тип даты",dateDes:"Формат даты представляет значения времени и даты как значения даты.",negType:"Тип отрицательного числа",generalDes:"Обычный формат не содержит никакого специфического формата числа.",thousandthPercentileDes:"Формат процента используется для представления обычных чисел. Монетарные и бухгалтерские форматы предоставляют специальный формат для вычислений монетарных значений.",addDecimal:"Увеличить количество десятичных знаков",subtractDecimal:"Уменьшить количество десятичных знаков",customFormat:"Custom Format",customFormatDes:"Generate custom number formats based on existing formats."}}}});
1
+ (function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsNumfmtUiRuRU=t())})(this,(function(){"use strict";return{sheet:{numfmt:{title:"Формат числа",numfmtType:"Типы форматов",cancel:"Отмена",confirm:"Подтвердить",general:"Общий",accounting:"Бухгалтерский",text:"Текст",number:"Число",percent:"Процент",scientific:"Экспоненциальный",currency:"Валюта",date:"Дата",time:"Время",thousandthPercentile:"Разделитель тысяч",preview:"Предпросмотр",dateTime:"Дата и время",decimalLength:"Десятичные знаки",currencyType:"Символ валюты",moreFmt:"Другие форматы",financialValue:"Финансовое значение",roundingCurrency:"Округление валюты",timeDuration:"Продолжительность времени",currencyDes:"Формат валюты используется для представления общих значений валюты. Формат бухгалтерского учета выравнивает столбец значений по десятичным точкам.",accountingDes:"Формат бухгалтерских чисел выравнивает столбец значений по символам валюты и десятичным точкам.",dateType:"Тип даты",dateDes:"Формат даты представляет значения времени и даты как значения даты.",negType:"Тип отрицательного числа",generalDes:"Обычный формат не содержит никакого специфического формата числа.",thousandthPercentileDes:"Формат процента используется для представления обычных чисел. Монетарные и бухгалтерские форматы предоставляют специальный формат для вычислений монетарных значений.",addDecimal:"Увеличить количество десятичных знаков",subtractDecimal:"Уменьшить количество десятичных знаков",customFormat:"Custom Format",customFormatDes:"Generate custom number formats based on existing formats."}}}}));
@@ -1 +1 @@
1
- (function(n,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(n=typeof globalThis<"u"?globalThis:n||self,n.UniverSheetsNumfmtUiViVN=t())})(this,function(){"use strict";return{sheet:{numfmt:{title:"Định dạng số",numfmtType:"Loại định dạng",cancel:"Hủy bỏ",confirm:"Xác nhận",general:"Chung",accounting:"Kế toán",text:"Văn bản",number:"Số",percent:"Phần trăm",scientific:"Chính xác",currency:"Tiền tệ",date:"Ngày",time:"Thời gian",thousandthPercentile:"Phân vị phần nghìn",preview:"Xem trước",dateTime:"Ngày giờ",decimalLength:"Số chữ số thập phân",currencyType:"Loại tiền tệ",moreFmt:"Nhiều định dạng hơn",financialValue:"Giá trị tài chính",roundingCurrency:"Tiền tệ làm tròn",timeDuration:"Thời lượng",currencyDes:"Định dạng tiền tệ được sử dụng để biểu thị các giá trị tiền tệ thông thường. Định dạng kế toán có thể căn chỉnh các giá trị trong một cột với dấu thập phân.",accountingDes:"Định dạng số kế toán có thể căn chỉnh các ký hiệu tiền tệ và dấu thập phân trong một cột các giá trị.",dateType:"Loại ngày",dateDes:"Định dạng ngày biểu thị các giá trị chuỗi ngày và thời gian dưới dạng giá trị ngày.",negType:"Loại số âm",generalDes:"Định dạng chung không chứa bất kỳ định dạng số cụ thể nào.",thousandthPercentileDes:"Định dạng phân vị phần nghìn được sử dụng để biểu thị các số thông thường. Các định dạng tiền tệ và kế toán cung cấp các định dạng chuyên dụng để tính toán giá trị tiền tệ.",addDecimal:"Thêm chữ số thập phân",subtractDecimal:"Giảm chữ số thập phân",customFormat:"Custom Format",customFormatDes:"Generate custom number formats based on existing formats."}}}});
1
+ (function(n,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(n=typeof globalThis<"u"?globalThis:n||self,n.UniverSheetsNumfmtUiViVN=t())})(this,(function(){"use strict";return{sheet:{numfmt:{title:"Định dạng số",numfmtType:"Loại định dạng",cancel:"Hủy bỏ",confirm:"Xác nhận",general:"Chung",accounting:"Kế toán",text:"Văn bản",number:"Số",percent:"Phần trăm",scientific:"Chính xác",currency:"Tiền tệ",date:"Ngày",time:"Thời gian",thousandthPercentile:"Phân vị phần nghìn",preview:"Xem trước",dateTime:"Ngày giờ",decimalLength:"Số chữ số thập phân",currencyType:"Loại tiền tệ",moreFmt:"Nhiều định dạng hơn",financialValue:"Giá trị tài chính",roundingCurrency:"Tiền tệ làm tròn",timeDuration:"Thời lượng",currencyDes:"Định dạng tiền tệ được sử dụng để biểu thị các giá trị tiền tệ thông thường. Định dạng kế toán có thể căn chỉnh các giá trị trong một cột với dấu thập phân.",accountingDes:"Định dạng số kế toán có thể căn chỉnh các ký hiệu tiền tệ và dấu thập phân trong một cột các giá trị.",dateType:"Loại ngày",dateDes:"Định dạng ngày biểu thị các giá trị chuỗi ngày và thời gian dưới dạng giá trị ngày.",negType:"Loại số âm",generalDes:"Định dạng chung không chứa bất kỳ định dạng số cụ thể nào.",thousandthPercentileDes:"Định dạng phân vị phần nghìn được sử dụng để biểu thị các số thông thường. Các định dạng tiền tệ và kế toán cung cấp các định dạng chuyên dụng để tính toán giá trị tiền tệ.",addDecimal:"Thêm chữ số thập phân",subtractDecimal:"Giảm chữ số thập phân",customFormat:"Custom Format",customFormatDes:"Generate custom number formats based on existing formats."}}}}));
@@ -1 +1 @@
1
- (function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsNumfmtUiZhCN=t())})(this,function(){"use strict";return{sheet:{numfmt:{title:"数字格式",numfmtType:"格式类型",cancel:"取消",confirm:"确认",general:"常规",accounting:"会计",text:"文本",number:"数值",percent:"百分比",scientific:"科学记数",currency:"货币",date:"日期",time:"时间",thousandthPercentile:"千分位符",preview:"示例",dateTime:"日期时间",decimalLength:"小数位数",currencyType:"货币类型",moreFmt:"更多格式",financialValue:"财务数值",roundingCurrency:"货币取整",timeDuration:"持续时间",currencyDes:"货币格式用于表示一般货币数值。会计格式可以对一列数值进行小数点对齐",accountingDes:"会计数字格式可对一列数值进行货币符号和小数点对齐",dateType:"日期类型",dateDes:"日期格式将日期和时间系列数值品示为日期值。",negType:"负数类型",generalDes:"常规格式不包含任何特定的数字格式。",thousandthPercentileDes:"千分位符格式用于一般数字的表示。货币和会计格式则提供货币值计算的专用格式。",addDecimal:"增加小数位",subtractDecimal:"减少小数位",customFormat:"自定义格式",customFormatDes:"根据现有格式生成自定义数字格式。"}}}});
1
+ (function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsNumfmtUiZhCN=t())})(this,(function(){"use strict";return{sheet:{numfmt:{title:"数字格式",numfmtType:"格式类型",cancel:"取消",confirm:"确认",general:"常规",accounting:"会计",text:"文本",number:"数值",percent:"百分比",scientific:"科学记数",currency:"货币",date:"日期",time:"时间",thousandthPercentile:"千分位符",preview:"示例",dateTime:"日期时间",decimalLength:"小数位数",currencyType:"货币类型",moreFmt:"更多格式",financialValue:"财务数值",roundingCurrency:"货币取整",timeDuration:"持续时间",currencyDes:"货币格式用于表示一般货币数值。会计格式可以对一列数值进行小数点对齐",accountingDes:"会计数字格式可对一列数值进行货币符号和小数点对齐",dateType:"日期类型",dateDes:"日期格式将日期和时间系列数值品示为日期值。",negType:"负数类型",generalDes:"常规格式不包含任何特定的数字格式。",thousandthPercentileDes:"千分位符格式用于一般数字的表示。货币和会计格式则提供货币值计算的专用格式。",addDecimal:"增加小数位",subtractDecimal:"减少小数位",customFormat:"自定义格式",customFormatDes:"根据现有格式生成自定义数字格式。"}}}}));
@@ -1 +1 @@
1
- (function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsNumfmtUiZhTW=t())})(this,function(){"use strict";return{sheet:{numfmt:{title:"數字格式",numfmtType:"格式類型",cancel:"取消",confirm:"確認",general:"常規",accounting:"會計",text:"文字",number:"數值",percent:"百分比",scientific:"工程型",currency:"貨幣",date:"日期",time:"時間",thousandthPercentile:"千分位符",preview:"範例",dateTime:"日期時間",decimalLength:"小數位數",currencyType:"貨幣類型",moreFmt:"更多格式",financialValue:"財務數值",roundingCurrency:"貨幣取整",timeDuration:"持續時間",currencyDes:"貨幣格式用來表示一般貨幣數值。會計格式可以對一列數值進行小數點對齊",accountingDes:"會計數字格式可對一列數值進行貨幣符號和小數點對齊",dateType:"日期類型",dateDes:"日期格式將日期和時間系列數值品顯示為日期值。",negType:"負數型別",generalDes:"常規格式不包含任何特定的數字格式。",thousandthPercentileDes:"千分位符號格式用於一般數字的表示。貨幣和會計格式則提供貨幣值計算的專用格式。",addDecimal:"增加小數位",subtractDecimal:"減少小數位",customFormat:"Custom Format",customFormatDes:"Generate custom number formats based on existing formats."}}}});
1
+ (function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsNumfmtUiZhTW=t())})(this,(function(){"use strict";return{sheet:{numfmt:{title:"數字格式",numfmtType:"格式類型",cancel:"取消",confirm:"確認",general:"常規",accounting:"會計",text:"文字",number:"數值",percent:"百分比",scientific:"工程型",currency:"貨幣",date:"日期",time:"時間",thousandthPercentile:"千分位符",preview:"範例",dateTime:"日期時間",decimalLength:"小數位數",currencyType:"貨幣類型",moreFmt:"更多格式",financialValue:"財務數值",roundingCurrency:"貨幣取整",timeDuration:"持續時間",currencyDes:"貨幣格式用來表示一般貨幣數值。會計格式可以對一列數值進行小數點對齊",accountingDes:"會計數字格式可對一列數值進行貨幣符號和小數點對齊",dateType:"日期類型",dateDes:"日期格式將日期和時間系列數值品顯示為日期值。",negType:"負數型別",generalDes:"常規格式不包含任何特定的數字格式。",thousandthPercentileDes:"千分位符號格式用於一般數字的表示。貨幣和會計格式則提供貨幣值計算的專用格式。",addDecimal:"增加小數位",subtractDecimal:"減少小數位",customFormat:"Custom Format",customFormatDes:"Generate custom number formats based on existing formats."}}}}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs/sheets-numfmt-ui",
3
- "version": "0.10.4",
3
+ "version": "0.10.5",
4
4
  "private": false,
5
5
  "description": "UniverSheet numfmt plugin",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -55,24 +55,24 @@
55
55
  },
56
56
  "dependencies": {
57
57
  "@univerjs/icons": "^0.4.6",
58
- "@univerjs/core": "0.10.4",
59
- "@univerjs/design": "0.10.4",
60
- "@univerjs/engine-render": "0.10.4",
61
- "@univerjs/sheets-numfmt": "0.10.4",
62
- "@univerjs/sheets": "0.10.4",
63
- "@univerjs/sheets-ui": "0.10.4",
64
- "@univerjs/ui": "0.10.4"
58
+ "@univerjs/core": "0.10.5",
59
+ "@univerjs/sheets": "0.10.5",
60
+ "@univerjs/design": "0.10.5",
61
+ "@univerjs/engine-render": "0.10.5",
62
+ "@univerjs/sheets-numfmt": "0.10.5",
63
+ "@univerjs/sheets-ui": "0.10.5",
64
+ "@univerjs/ui": "0.10.5"
65
65
  },
66
66
  "devDependencies": {
67
67
  "postcss": "^8.5.6",
68
68
  "react": "18.3.1",
69
69
  "rxjs": "^7.8.2",
70
70
  "tailwindcss": "3.4.17",
71
- "typescript": "^5.8.3",
72
- "vite": "^7.0.6",
71
+ "typescript": "^5.9.2",
72
+ "vite": "^7.1.3",
73
73
  "vitest": "^3.2.4",
74
- "@univerjs-infra/shared": "0.10.4",
75
- "@univerjs/engine-formula": "0.10.4"
74
+ "@univerjs-infra/shared": "0.10.5",
75
+ "@univerjs/engine-formula": "0.10.5"
76
76
  },
77
77
  "scripts": {
78
78
  "test": "vitest run",