tor-univer-sheet 1.2.5 → 1.2.7
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/dist/tor-univer-sheet.es.js +298 -268
- package/dist/tor-univer-sheet.umd.js +1 -1
- package/dist/types/index.d.ts +54 -15
- package/dist/univer-styles.css +175 -14
- package/package.json +22 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(t,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("@univerjs/presets"),require("@univerjs/core"),require("@univerjs/sheets"),require("@univerjs/ui"),require("@univerjs/ui-adapter-vue3"),require("@univerjs/preset-sheets-advanced"),require("@univerjs/presets/preset-sheets-conditional-formatting"),require("@univerjs/presets/preset-sheets-core"),require("@univerjs/presets/preset-sheets-data-validation"),require("@univerjs/presets/preset-sheets-drawing"),require("@univerjs/presets/preset-sheets-filter"),require("@univerjs/presets/preset-sheets-hyper-link"),require("@univerjs/preset-sheets-note"),require("@univerjs/preset-sheets-core/locales/zh-CN"),require("@univerjs/preset-sheets-advanced/locales/zh-CN"),require("@univerjs/presets/preset-sheets-conditional-formatting/locales/zh-CN"),require("@univerjs/presets/preset-sheets-core/locales/zh-CN"),require("@univerjs/presets/preset-sheets-data-validation/locales/zh-CN"),require("@univerjs/preset-sheets-drawing/locales/zh-CN"),require("@univerjs/presets/preset-sheets-drawing/locales/zh-CN"),require("@univerjs/presets/preset-sheets-filter/locales/zh-CN"),require("@univerjs/presets/preset-sheets-hyper-link/locales/zh-CN"),require("@univerjs/preset-sheets-note/locales/zh-CN"),require("dayjs"),require("decimal.js")):typeof define=="function"&&define.amd?define(["exports","@univerjs/presets","@univerjs/core","@univerjs/sheets","@univerjs/ui","@univerjs/ui-adapter-vue3","@univerjs/preset-sheets-advanced","@univerjs/presets/preset-sheets-conditional-formatting","@univerjs/presets/preset-sheets-core","@univerjs/presets/preset-sheets-data-validation","@univerjs/presets/preset-sheets-drawing","@univerjs/presets/preset-sheets-filter","@univerjs/presets/preset-sheets-hyper-link","@univerjs/preset-sheets-note","@univerjs/preset-sheets-core/locales/zh-CN","@univerjs/preset-sheets-advanced/locales/zh-CN","@univerjs/presets/preset-sheets-conditional-formatting/locales/zh-CN","@univerjs/presets/preset-sheets-core/locales/zh-CN","@univerjs/presets/preset-sheets-data-validation/locales/zh-CN","@univerjs/preset-sheets-drawing/locales/zh-CN","@univerjs/presets/preset-sheets-drawing/locales/zh-CN","@univerjs/presets/preset-sheets-filter/locales/zh-CN","@univerjs/presets/preset-sheets-hyper-link/locales/zh-CN","@univerjs/preset-sheets-note/locales/zh-CN","dayjs","decimal.js"],h):(t=typeof globalThis<"u"?globalThis:t||self,h(t.TorUniverSheet={},t.presets,t.core,t.sheets,t.ui,t.uiAdapterVue3,t.presetSheetsAdvanced,t.presetSheetsConditionalFormatting,t.presetSheetsCore,t.presetSheetsDataValidation,t.presetSheetsDrawing,t.presetSheetsFilter,t.presetSheetsHyperLink,t.presetSheetsNote,t.zhCN$9,t.zhCN,t.zhCN$3,t.zhCN$4,t.zhCN$5,t.zhCN$1,t.zhCN$6,t.zhCN$7,t.zhCN$8,t.zhCN$2,t.dayjs,t.Decimal))})(this,(function(t,h,X,ne,L,se,oe,ie,ae,ue,ce,le,fe,me,de,he,ye,ge,ve,be,pe,Ye,De,Ce,y,_){"use strict";const Pe=(e,n)=>{for(const s of n)e[s]=null},x=()=>{if(typeof crypto=="object"){if(typeof crypto.randomUUID=="function")return crypto.randomUUID();if(typeof crypto.getRandomValues=="function"&&typeof Uint8Array=="function"){const s=r=>{const c=Number(r);return(c^crypto.getRandomValues(new Uint8Array(1))[0]&15>>c/4).toString(16)};return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,s)}}let e=new Date().getTime(),n=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,s=>{let r=Math.random()*16;return e>0?(r=(e+r)%16|0,e=Math.floor(e/16)):(r=(n+r)%16|0,n=Math.floor(n/16)),(s==="x"?r:r&3|8).toString(16)})};function Me(e){return{...e?.workbookData,id:e?.id||x(),name:e?.name||"未命名",appVersion:e?.appVersion||"1.0.0"}}const Ne=Object.prototype.toString,ee=(e,n)=>Ne.call(e)===`[object ${n}]`,je=e=>typeof e<"u",we=e=>!je(e),Se=e=>e!==null&&ee(e,"Object"),F=e=>e==null||typeof e>"u"?!0:W(e)||ke(e)?e.length===0:e instanceof Map||e instanceof Set?e.size===0:Se(e)?Object.keys(e).length===0:!1,Te=e=>e===null,Oe=e=>we(e)||Te(e),ke=e=>ee(e,"String"),W=e=>e&&Array.isArray(e);class Ie{value;constructor(n){this.value=new _(n)}add(n){return this.value=this.value.add(n||0),this}subtract(n){return this.value=this.value.sub(n||0),this}multiply(n){return this.value=this.value.mul(n||0),this}divide(n){const s=new _(n);if(s.isZero())throw new Error("除数是0");return this.value=this.value.div(s),this}toFixed(n,s){return this.value=new _(this.value.toFixed(n,s)),this}valueOf(){return this.value}toString(){return this.value.toString()}toNumber(){return this.value.toNumber()}}function U(e=0){return new Ie(e)}var te=(e=>(e.无="no",e.年="year",e.月="month",e.周="week",e.天="day",e.班组="shift",e.小时="hour",e.半小时="half_hour",e))(te||{}),re=(e=>(e.view="view",e.edit="edit",e))(re||{});async function Ue(e,n){if(!n)return Promise.reject("日期不能为空");switch(e){case"year":if(W(n))return Promise.resolve(n);const s=y(n);if(!s.isValid())return Promise.reject("无效的日期格式");const r=s.year(),c=`${r}-01`,o=`${r}-12`;return Promise.resolve([c,o]);case"month":if(W(n))return Promise.resolve(n);const g=y(n);if(!g.isValid())return Promise.reject("无效的日期格式");const j=g.startOf("month").format("YYYY-MM-DD"),a=g.endOf("month").format("YYYY-MM-DD");return Promise.resolve([j,a]);case"day":if(W(n))return Promise.resolve(n);const v=y(n);if(!v.isValid())return Promise.reject("无效的日期格式");const b=v.startOf("day").format("YYYY-MM-DD HH:mm:ss"),f=v.endOf("day").format("YYYY-MM-DD HH:mm:ss");return Promise.resolve([b,f]);default:return Promise.reject("不支持的周期类型")}}function H(e,n,s){return s?y(n).diff(y(e),s):0}function J(e,n,s){if(!s)throw new Error("日期类型不能为空");const r={year:"YYYY",month:"YYYY-MM",day:"YYYY-MM-DD",hour:"HH:mm:ss"}[s];return y(e).subtract(n,s).format(r)}function k(e,n,s,r){const c="YYYY-MM-DD HH:mm:ss",o=E(e,n,s,r),g=y(o);if(n==="month"){const a=g.month();return a===0?[g.startOf("month").format(c),g.date(25).endOf("day").format(c)]:a===11?[g.subtract(1,"month").date(26).startOf("day").format(c),g.endOf("month").format(c)]:[g.subtract(1,"month").date(26).startOf("day").format(c),g.date(25).endOf("day").format(c)]}const j={year:"year",day:"day",hour:"hour"};return[g.startOf(j[n]).format(c),g.endOf(j[n]).format(c)]}function E(e,n,s,r){const c={year:"YYYY",month:"YYYY-MM",day:"YYYY-MM-DD",hour:"YYYY-MM-DD HH:mm:ss"}[n];return y(e,c).add(s*r,n).format(c)}function P(e,n,s){return e[n]||(e[n]={}),e[n][s]||(e[n][s]={}),e[n][s]}async function ze(e){if(!e)throw new Error("cellData is required");const n=Object.entries(e).reduce((s,r)=>{const[c,o]=r;for(const[g,j]of Object.entries(o)){const{custom:a,v,t:b,s:f}=j;if(!a)continue;const{cellType:G}=a,l=!a.hasOwnProperty("writeBack")||F(a?.writeBack)?!0:a.writeBack;if(G==="indicator"){const z=P(s,c,g);z.custom={...a,required:F(a?.required)?!1:a?.required,defaultShift:F(a?.defaultShift)?!1:a?.defaultShift,forwardPush:F(a?.forwardPush)?!1:a?.forwardPush,forwardPushTimes:F(a?.useDefaultEndDate)?0:a?.forwardPushTimes,useDefaultEndDate:F(a?.useDefaultEndDate)?!1:a?.useDefaultEndDate,copyType:F(a?.copyType)?"":a?.copyType,writeBack:l},z.s=f,z.t=b,z.v=v||""}}return s},{});return!n||F(n)?Promise.reject(new Error("No data found")):Promise.resolve(n)}function Z(e,n){return e.replace(/\$\{([^}]+)\}/g,(s,r)=>{try{const c=Object.keys(n),o=Object.values(n);return new Function(...c,`return ${r};`)(...o)}catch(c){return console.error(`表达式执行失败: ${r}`,c),s}})}function qe({acc:e,params:n,initRowNum:s,initColNum:r,cellData:c}){const{rangeData:o,currentDay:g,extraArgs:j}=n,a=j?.teamData||{},{cycleType:v,timeIncrement:b,forwardPush:f,forwardPushTimes:G,copyType:l,copyInterval:z,defaultShift:Y,templateStr:I,useDefaultEndDate:Q}=c.custom;let M=0;switch(v){case"day":{let i="";if(f&&(i=J(o[0],G,"day")),!l){let m="";f?m=i:m=o[0];const u=P(e,s,r);u.v=I?Z(I,{businessDate:m,dayjs:y}):y(m).format("YYYY-MM-DD"),u.t=h.CellValueType.STRING,u.s="tor-time-cell-style";break}f?M=H(i,o[0],"day"):(M=H(o[0],o[1],"day"),console.log("copyNum",M));for(let m=0;m<=Math.abs(M===0?1:M);m++){const u=m*(z+1);let w="";f?w=E(i,"day",m,b):w=E(o[0],"day",m,b);const D=l==="right"?s:s+u,R=l==="right"?r+u:r,B=P(e,D,R);B.v=I?Z(I,{businessDate:w,dayjs:y}):y(w).format("YYYY-MM-DD"),B.t=h.CellValueType.STRING,B.s="tor-time-cell-style"}break}case"month":{if(!l){const[i,m]=k(o[1],"month",0,1),u=P(e,s,r);u.v=y(m).format("YYYY-MM"),u.t=h.CellValueType.STRING,u.s="tor-time-cell-style";break}M=H(o[0],o[1],"month");for(let i=0;i<=Math.abs(M===0?1:M);i++){const m=i*(z+1),u=l==="right"?s:s+m,w=l==="right"?r+m:r,D=P(e,u,w);D.v=E(o[0],"month",i,b),D.t=h.CellValueType.STRING,D.s="tor-time-cell-style"}break}case"year":{let i="";if(f&&(i=J(o[0],G||0,"year")),!l){const m=f?i:o[0],[u,w]=k(m,"year",0,1),D=P(e,s,r),[,R]=k(o[1],"month",0,1);D.v=I?Z(I,{startTime:u,endTime:w,rangeData:o,dayjs:y}):m,D.t=h.CellValueType.STRING,D.s="tor-time-cell-style";break}f?M=H(i,o[0],"year"):M=H(o[0],o[1],"year");for(let m=0;m<=Math.abs(M===0?1:M);m++){const u=m*(z+1),w=l==="right"?s:s+u,D=l==="right"?r+u:r,[R,B]=k(o[0],"year",m,b),S=P(e,w,D),O=E(o[0],"year",m,b);S.v=I?Z(I,{startTime:R,endTime:B,rangeData:o,dayjs:y}):O,S.t=h.CellValueType.STRING,S.s="tor-time-cell-style"}break}case"hour":{if(!l){const i=P(e,s,r);if(i.t=h.CellValueType.STRING,i.s="tor-time-cell-style",Y){i.v=y(o[0]).add(1,"hour").format("YYYY-MM-DD HH:mm:ss");break}i.v=y(g).add(1,"hour").format("YYYY-MM-DD HH:mm:ss");break}M=H(o[0],o[1],"hour");for(let i=0;i<=Math.abs(M===0?1:M);i++){const m=i*(z+1),u=l==="right"?s:s+m,w=l==="right"?r+m:r,D=P(e,u,w);if(D.t=h.CellValueType.STRING,D.s="tor-time-cell-style",Y){const R=y(o[0]).add(1,"hour").format("YYYY-MM-DD HH:mm:ss");D.v=E(R,"hour",i,b);continue}D.v=E(y(g).add(1,"hour").format("YYYY-MM-DD HH:mm:ss"),"hour",i,b)}break}case"shift":{if(!l){const i=P(e,s,r);i.t=h.CellValueType.STRING,i.s="tor-time-cell-style",i.v=I?Z(I,{rangeData:o,dayjs:y}):o[0];break}if(!a.length)throw new Error("没有获取到当班数据");for(let i=0;i<a.length;i++){const m=a[i],{startDatetime:u,endDatetime:w}=m,D=i*(z+1),R=l==="right"?s:U(s).add(D).toNumber(),B=l==="right"?U(r).add(D).toNumber():r,S=P(e,R,B);S.s="tor-time-cell-style",S.v=I?Z(I,{team:m}):u}break}}}async function He(e,n){if(!e)return Promise.reject("没有可用的单元格数据");const{extraArgs:s,rangeData:r}=n;if(!r.length)return Promise.reject("处理时间范围失败, rangeData不能为空");const c=s?.teamData||[],{periodicityTime:o}=n,g=n?.currentDay||y().format("YYYY-MM-DD"),j=(v,b,f)=>o?f!=="MACH_CYCLE"?[v,b]:parseInt(o.split(":")[0],10)<12?[y(v).format("YYYY-MM-DD")+" "+o,y(b).add(1,"day").format("YYYY-MM-DD")+" "+o]:[y(v).subtract(1,"day").format("YYYY-MM-DD")+" "+o,y(b).format("YYYY-MM-DD")+" "+o]:[v,b],a=Object.entries(e).reduce((v,b)=>{const[f,G]=b;for(const[l,z]of Object.entries(G)){const{custom:Y}=z;if(!Y)continue;const{cellType:I,cycleType:Q,timeIncrement:M,forwardPush:i,forwardPushTimes:m,copyType:u,copyInterval:w,defaultShift:D,useDefaultStartDate:R,useDefaultEndDate:B}=Y;if(I==="time"){qe({acc:v,params:n,initRowNum:Number(f),initColNum:Number(l),cellData:z});continue}const S={cycleType:Q,indicatorName:Y.indicatorName,indicatorCode:Y.indicatorCode,indicatorId:Y.indicatorId,indicatorDimensionName:Y.indicatorDimensionName,indicatorDimensionConfig:Y.indicatorDimensionConfig,required:Oe(Y?.required)??!1,cellType:Y.cellType,defaultShift:Y?.defaultShift||!1,writeBack:F(Y?.writeBack)?!0:Y.writeBack,dimensionJson:Y?.dimensionJson||"",unit:Y?.unit||"",innerSyncWay:Y?.innerSyncWay||"",outSyncConfigId:Y?.outSyncConfigId||"",innerSyncStatus:Y?.innerSyncStatus||""};let O=0;switch(Q){case"day":{let d="";if(i&&(d=J(r[0],m||0,"day")),!u){const p=i?d:r[0],[N,C]=j(...k(p,"day",0,1),Y?.innerSyncWay),T=P(v,f,l);T.s="tor-indicator-cell-style",T.custom={...S,startTime:N,endTime:C};break}i?O=H(d,r[0],"day"):O=H(r[0],r[1],"day");for(let p=0;p<=Math.abs(O===0?1:O);p++){const N=p*(w+1),C=i?d:r[0],[T,V]=j(...k(C,"day",p,M),Y?.innerSyncWay),q=u==="right"?f:U(f).add(N).toNumber(),$=u==="right"?U(l).add(N).toNumber():l,A=P(v,q,$);A.s="tor-indicator-cell-style",A.custom={...S,startTime:T,endTime:V}}break}case"month":{if(!u){const[d,p]=k(r[1],"month",0,1),N=P(v,f,l);N.s="tor-indicator-cell-style",N.custom={...S,startTime:d,endTime:p};break}O=H(r[0],r[1],"month");for(let d=0;d<=Math.abs(O===0?1:O);d++){const p=d*(w+1),N=u==="right"?f:U(f).add(p).toNumber(),C=u==="right"?U(l).add(p).toNumber():l,[T,V]=k(r[0],"month",d,M),q=P(v,N,C);q.s="tor-indicator-cell-style",q.custom={...S,startTime:T,endTime:V}}break}case"year":{let d="",p="",N="";if(i){d=J(r[0],m||0,"year");const C=y(r[1]).format("MM");p=y(`${d}-${C+1}`).format("YYYY-MM"),N=y(`${d}-${C+2}`).format("YYYY-MM")}if(!u){const C=i?d:r[0],[T,V]=k(C,"year",0,1),q=P(v,f,l);q.s="tor-indicator-cell-style";const[,$]=k(p,"month",0,1),[A]=k(N,"month",0,1);q.custom={...S,startTime:R?A:T,endTime:B?$:V};break}i?O=H(d,r[0],"year"):O=H(r[0],r[1],"year");for(let C=0;C<=Math.abs(O===0?1:O);C++){const T=C*(w+1),V=u==="right"?f:U(f).add(T).toNumber(),q=u==="right"?U(l).add(T).toNumber():l,[$,A]=k(r[0],"year",C,M),K=P(v,V,q);K.s="tor-indicator-cell-style",K.custom={...S,startTime:$,endTime:A}}break}case"hour":{if(!u){const d=D?r[0]:r[0]??g,[p,N]=k(d,"hour",1,1),C=P(v,f,l);C.s="tor-indicator-cell-style",C.custom={...S,startTime:p,endTime:N};break}O=H(r[0],r[1],"hour");for(let d=0;d<=Math.abs(O===0?1:O);d++){const p=d*(w+1),N=u==="right"?f:U(f).add(p).toNumber(),C=u==="right"?U(l).add(p).toNumber():l,T=P(v,N,C);if(T.s="tor-indicator-cell-style",D){const A=y(r[0]).add(1,"hour").format("YYYY-MM-DD HH:mm:ss"),[K,Be]=k(A,"hour",d,M);T.custom={...S,startTime:K,endTime:Be};continue}const V=y(g).add(1,"hour").format("YYYY-MM-DD HH:mm:ss"),[q,$]=k(V,"hour",d,M);T.custom={...S,startTime:q,endTime:$}}break}case"shift":{if(!u){const[d,p]=r,N=P(v,f,l);N.s="tor-indicator-cell-style",N.custom={...S,startTime:d,endTime:p};break}if(!c.length)throw new Error("没有获取到当班数据");for(let d=0;d<c.length;d++){const p=c[d],{startDatetime:N,endDatetime:C}=p,T=d*(w+1),V=u==="right"?f:U(f).add(T).toNumber(),q=u==="right"?U(l).add(T).toNumber():l,$=P(v,V,q);$.s="tor-indicator-cell-style",$.custom={...S,startTime:N,endTime:C}}break}}}return v},{});return Promise.resolve(a)}function Ve(e){return Object.entries(e).reduce((s,[r,c])=>{const o=Math.max(...Object.keys(c).map(Number));return o>s?s=Number(o):s=Number(s)||0,s},0)}function Re(e,n){const s=JSON.parse(JSON.stringify(e||{}));for(const[r,c]of Object.entries(n)){s[r]||(s[r]={});for(const[o,g]of Object.entries(c)){const j=g,a=s[r]?.[o];a?s[r][o]={...a,...j,custom:{...a.custom,...j.custom},v:j.v||""}:s[r][o]=j}}return s}function $e(e,n){if(!n?.length||!e)return e;const s={};for(const r in e){const c=e[r];for(const o in c){const g=c[o];if(g?.custom?.cellType==="indicator"){const j=Number(r),a=Number(o);if(n.some(b=>j>=b.startRow&&j<=b.endRow&&a>=b.startColumn&&a<=b.endColumn)&&!n.some(f=>j===f.startRow&&a===f.startColumn))continue}s[r]||(s[r]={}),s[r][o]=g}}return s}const Fe="./style.css";Object.defineProperty(t,"CommandType",{enumerable:!0,get:()=>h.CommandType}),Object.defineProperty(t,"FEventName",{enumerable:!0,get:()=>h.FEventName}),Object.defineProperty(t,"FUniver",{enumerable:!0,get:()=>h.FUniver}),Object.defineProperty(t,"ICommandService",{enumerable:!0,get:()=>h.ICommandService}),Object.defineProperty(t,"IUniverInstanceService",{enumerable:!0,get:()=>h.IUniverInstanceService}),Object.defineProperty(t,"Inject",{enumerable:!0,get:()=>h.Inject}),Object.defineProperty(t,"Injector",{enumerable:!0,get:()=>h.Injector}),Object.defineProperty(t,"LocaleType",{enumerable:!0,get:()=>h.LocaleType}),Object.defineProperty(t,"Plugin",{enumerable:!0,get:()=>h.Plugin}),Object.defineProperty(t,"Univer",{enumerable:!0,get:()=>h.Univer}),Object.defineProperty(t,"UniverInstanceType",{enumerable:!0,get:()=>h.UniverInstanceType}),Object.defineProperty(t,"Workbook",{enumerable:!0,get:()=>h.Workbook}),Object.defineProperty(t,"createUniver",{enumerable:!0,get:()=>h.createUniver}),Object.defineProperty(t,"defaultTheme",{enumerable:!0,get:()=>h.defaultTheme}),Object.defineProperty(t,"greenTheme",{enumerable:!0,get:()=>h.greenTheme}),Object.defineProperty(t,"merge",{enumerable:!0,get:()=>h.merge}),Object.defineProperty(t,"mergeLocales",{enumerable:!0,get:()=>h.mergeLocales}),Object.defineProperty(t,"touchDependencies",{enumerable:!0,get:()=>h.touchDependencies}),Object.defineProperty(t,"BaselineOffset",{enumerable:!0,get:()=>X.BaselineOffset}),Object.defineProperty(t,"CommandService",{enumerable:!0,get:()=>X.CommandService}),Object.defineProperty(t,"SetRangeValuesCommand",{enumerable:!0,get:()=>ne.SetRangeValuesCommand}),Object.defineProperty(t,"ComponentManager",{enumerable:!0,get:()=>L.ComponentManager}),Object.defineProperty(t,"ContextMenuGroup",{enumerable:!0,get:()=>L.ContextMenuGroup}),Object.defineProperty(t,"ContextMenuPosition",{enumerable:!0,get:()=>L.ContextMenuPosition}),Object.defineProperty(t,"IMenuManagerService",{enumerable:!0,get:()=>L.IMenuManagerService}),Object.defineProperty(t,"MenuItemType",{enumerable:!0,get:()=>L.MenuItemType}),Object.defineProperty(t,"RibbonStartGroup",{enumerable:!0,get:()=>L.RibbonStartGroup}),Object.defineProperty(t,"UniverVue3AdapterPlugin",{enumerable:!0,get:()=>se.UniverVue3AdapterPlugin}),Object.defineProperty(t,"UniverSheetsAdvancedPreset",{enumerable:!0,get:()=>oe.UniverSheetsAdvancedPreset}),Object.defineProperty(t,"UniverSheetsConditionalFormattingPreset",{enumerable:!0,get:()=>ie.UniverSheetsConditionalFormattingPreset}),Object.defineProperty(t,"UniverSheetsCorePreset",{enumerable:!0,get:()=>ae.UniverSheetsCorePreset}),Object.defineProperty(t,"UniverSheetsDataValidationPreset",{enumerable:!0,get:()=>ue.UniverSheetsDataValidationPreset}),Object.defineProperty(t,"UniverSheetsDrawingPreset",{enumerable:!0,get:()=>ce.UniverSheetsDrawingPreset}),Object.defineProperty(t,"UniverSheetsFilterPreset",{enumerable:!0,get:()=>le.UniverSheetsFilterPreset}),Object.defineProperty(t,"UniverSheetsHyperLinkPreset",{enumerable:!0,get:()=>fe.UniverSheetsHyperLinkPreset}),Object.defineProperty(t,"UniverSheetsNotePreset",{enumerable:!0,get:()=>me.UniverSheetsNotePreset}),t.zhCN=de,t.UniverPresetSheetsAdvancedZhCN=he,t.sheetsConditionalFormattingZhCN=ye,t.sheetsCoreZhCN=ge,t.sheetsDataValidationZhCN=ve,t.UniverPresetSheetsDrawingZhCN=be,t.sheetsDrawingZhCN=pe,t.sheetsFilterZhCN=Ye,t.sheetsHyperLinkZhCN=De,t.UniverPresetSheetsNoteZhCN=Ce,t.CycleTypeEnum=te,t.ModeEnum=re,t.decimal=U,t.filterIndicatorsCell=ze,t.filterMergedIndicatorCells=$e,t.generateIndicatorsCells=He,t.generateUUID=x,t.getNumColumns=Ve,t.handleClearInput=Pe,t.initDateRange=Ue,t.mergeCellData=Re,t.stylePath=Fe,t.useData=Me,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
(function(e,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("@univerjs/presets"),require("@univerjs/core"),require("@univerjs/sheets"),require("@univerjs/ui"),require("@univerjs/ui-adapter-vue3"),require("@univerjs/preset-sheets-advanced"),require("@univerjs/preset-sheets-conditional-formatting"),require("@univerjs/presets/preset-sheets-core"),require("@univerjs/preset-sheets-data-validation"),require("@univerjs/preset-sheets-drawing"),require("@univerjs/preset-sheets-filter"),require("@univerjs/preset-sheets-hyper-link"),require("@univerjs/preset-sheets-note"),require("@univerjs/preset-sheets-sort"),require("@univerjs/preset-sheets-find-replace"),require("@univerjs/preset-sheets-thread-comment"),require("@univerjs/preset-sheets-table"),require("@univerjs/preset-sheets-collaboration"),require("@univerjs/watermark"),require("@univerjs/sheets-crosshair-highlight"),require("@univerjs-pro/live-share"),require("@univerjs/preset-sheets-core/locales/zh-CN"),require("@univerjs/preset-sheets-advanced/locales/zh-CN"),require("@univerjs/presets/preset-sheets-conditional-formatting/locales/zh-CN"),require("@univerjs/presets/preset-sheets-core/locales/zh-CN"),require("@univerjs/preset-sheets-drawing/locales/zh-CN"),require("@univerjs/preset-sheets-filter/locales/zh-CN"),require("@univerjs/preset-sheets-hyper-link/locales/zh-CN"),require("@univerjs/preset-sheets-note/locales/zh-CN"),require("@univerjs/presets/preset-sheets-filter/locales/zh-CN"),require("@univerjs/preset-sheets-sort/locales/zh-CN"),require("@univerjs/preset-sheets-data-validation/locales/zh-CN"),require("@univerjs/preset-sheets-find-replace/locales/zh-CN"),require("@univerjs/preset-sheets-thread-comment/locales/zh-CN"),require("@univerjs/preset-sheets-table/locales/zh-CN"),require("@univerjs/preset-sheets-collaboration/locales/zh-CN"),require("dayjs"),require("decimal.js")):typeof define=="function"&&define.amd?define(["exports","@univerjs/presets","@univerjs/core","@univerjs/sheets","@univerjs/ui","@univerjs/ui-adapter-vue3","@univerjs/preset-sheets-advanced","@univerjs/preset-sheets-conditional-formatting","@univerjs/presets/preset-sheets-core","@univerjs/preset-sheets-data-validation","@univerjs/preset-sheets-drawing","@univerjs/preset-sheets-filter","@univerjs/preset-sheets-hyper-link","@univerjs/preset-sheets-note","@univerjs/preset-sheets-sort","@univerjs/preset-sheets-find-replace","@univerjs/preset-sheets-thread-comment","@univerjs/preset-sheets-table","@univerjs/preset-sheets-collaboration","@univerjs/watermark","@univerjs/sheets-crosshair-highlight","@univerjs-pro/live-share","@univerjs/preset-sheets-core/locales/zh-CN","@univerjs/preset-sheets-advanced/locales/zh-CN","@univerjs/presets/preset-sheets-conditional-formatting/locales/zh-CN","@univerjs/presets/preset-sheets-core/locales/zh-CN","@univerjs/preset-sheets-drawing/locales/zh-CN","@univerjs/preset-sheets-filter/locales/zh-CN","@univerjs/preset-sheets-hyper-link/locales/zh-CN","@univerjs/preset-sheets-note/locales/zh-CN","@univerjs/presets/preset-sheets-filter/locales/zh-CN","@univerjs/preset-sheets-sort/locales/zh-CN","@univerjs/preset-sheets-data-validation/locales/zh-CN","@univerjs/preset-sheets-find-replace/locales/zh-CN","@univerjs/preset-sheets-thread-comment/locales/zh-CN","@univerjs/preset-sheets-table/locales/zh-CN","@univerjs/preset-sheets-collaboration/locales/zh-CN","dayjs","decimal.js"],d):(e=typeof globalThis<"u"?globalThis:e||self,d(e.TorUniverSheet={},e.presets,e.core,e.sheets,e.ui,e.uiAdapterVue3,e.presetSheetsAdvanced,e.presetSheetsConditionalFormatting,e.presetSheetsCore,e.presetSheetsDataValidation,e.presetSheetsDrawing,e.presetSheetsFilter,e.presetSheetsHyperLink,e.presetSheetsNote,e.presetSheetsSort,e.presetSheetsFindReplace,e.presetSheetsThreadComment,e.presetSheetsTable,e.presetSheetsCollaboration,e.watermark,e.sheetsCrosshairHighlight,e.liveShare,e.zhCN$e,e.zhCN,e.zhCN$b,e.zhCN$c,e.zhCN$3,e.zhCN$d,e.zhCN$6,e.zhCN$7,e.zhCN$4,e.zhCN$8,e.zhCN$2,e.zhCN$5,e.zhCN$a,e.zhCN$9,e.zhCN$1,e.dayjs,e.Decimal))})(this,(function(e,d,X,ne,G,se,ie,oe,ae,ue,ce,le,he,me,fe,de,ve,ye,be,ge,Ce,pe,Pe,je,Ye,Se,De,Ne,Me,we,Te,Oe,Ue,ke,ze,Ie,qe,v,_){"use strict";const He=(t,n)=>{for(const s of n)t[s]=null},x=()=>{if(typeof crypto=="object"){if(typeof crypto.randomUUID=="function")return crypto.randomUUID();if(typeof crypto.getRandomValues=="function"&&typeof Uint8Array=="function"){const s=r=>{const c=Number(r);return(c^crypto.getRandomValues(new Uint8Array(1))[0]&15>>c/4).toString(16)};return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,s)}}let t=new Date().getTime(),n=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,s=>{let r=Math.random()*16;return t>0?(r=(t+r)%16|0,t=Math.floor(t/16)):(r=(n+r)%16|0,n=Math.floor(n/16)),(s==="x"?r:r&3|8).toString(16)})};function Re(t){return{...t?.workbookData,id:t?.id||x(),name:t?.name||"未命名",appVersion:t?.appVersion||"1.0.0"}}const Ve=Object.prototype.toString,ee=(t,n)=>Ve.call(t)===`[object ${n}]`,$e=t=>typeof t<"u",Fe=t=>!$e(t),Be=t=>t!==null&&ee(t,"Object"),F=t=>t==null||typeof t>"u"?!0:W(t)||Ee(t)?t.length===0:t instanceof Map||t instanceof Set?t.size===0:Be(t)?Object.keys(t).length===0:!1,Ae=t=>t===null,Ze=t=>Fe(t)||Ae(t),Ee=t=>ee(t,"String"),W=t=>t&&Array.isArray(t);class Ge{value;constructor(n){this.value=new _(n)}add(n){return this.value=this.value.add(n||0),this}subtract(n){return this.value=this.value.sub(n||0),this}multiply(n){return this.value=this.value.mul(n||0),this}divide(n){const s=new _(n);if(s.isZero())throw new Error("除数是0");return this.value=this.value.div(s),this}toFixed(n,s){return this.value=new _(this.value.toFixed(n,s)),this}valueOf(){return this.value}toString(){return this.value.toString()}toNumber(){return this.value.toNumber()}}function z(t=0){return new Ge(t)}var te=(t=>(t.无="no",t.年="year",t.月="month",t.周="week",t.天="day",t.班组="shift",t.小时="hour",t.半小时="half_hour",t))(te||{}),re=(t=>(t.view="view",t.edit="edit",t))(re||{});async function Le(t,n){if(!n)return Promise.reject("日期不能为空");switch(t){case"year":if(W(n))return Promise.resolve(n);const s=v(n);if(!s.isValid())return Promise.reject("无效的日期格式");const r=s.year(),c=`${r}-01`,i=`${r}-12`;return Promise.resolve([c,i]);case"month":if(W(n))return Promise.resolve(n);const b=v(n);if(!b.isValid())return Promise.reject("无效的日期格式");const N=b.startOf("month").format("YYYY-MM-DD"),a=b.endOf("month").format("YYYY-MM-DD");return Promise.resolve([N,a]);case"day":if(W(n))return Promise.resolve(n);const y=v(n);if(!y.isValid())return Promise.reject("无效的日期格式");const g=y.startOf("day").format("YYYY-MM-DD HH:mm:ss"),h=y.endOf("day").format("YYYY-MM-DD HH:mm:ss");return Promise.resolve([g,h]);default:return Promise.reject("不支持的周期类型")}}function H(t,n,s){return s?v(n).diff(v(t),s):0}function J(t,n,s){if(!s)throw new Error("日期类型不能为空");const r={year:"YYYY",month:"YYYY-MM",day:"YYYY-MM-DD",hour:"HH:mm:ss"}[s];return v(t).subtract(n,s).format(r)}function U(t,n,s,r){const c="YYYY-MM-DD HH:mm:ss",i=Z(t,n,s,r),b=v(i);if(n==="month"){const a=b.month();return a===0?[b.startOf("month").format(c),b.date(25).endOf("day").format(c)]:a===11?[b.subtract(1,"month").date(26).startOf("day").format(c),b.endOf("month").format(c)]:[b.subtract(1,"month").date(26).startOf("day").format(c),b.date(25).endOf("day").format(c)]}const N={year:"year",day:"day",hour:"hour"};return[b.startOf(N[n]).format(c),b.endOf(N[n]).format(c)]}function Z(t,n,s,r){const c={year:"YYYY",month:"YYYY-MM",day:"YYYY-MM-DD",hour:"YYYY-MM-DD HH:mm:ss"}[n];return v(t,c).add(s*r,n).format(c)}function Y(t,n,s){return t[n]||(t[n]={}),t[n][s]||(t[n][s]={}),t[n][s]}async function We(t){if(!t)throw new Error("cellData is required");const n=Object.entries(t).reduce((s,r)=>{const[c,i]=r;for(const[b,N]of Object.entries(i)){const{custom:a,v:y,t:g,s:h}=N;if(!a)continue;const{cellType:E}=a,l=!a.hasOwnProperty("writeBack")||F(a?.writeBack)?!0:a.writeBack;if(E==="indicator"){const I=Y(s,c,b);I.custom={...a,required:F(a?.required)?!1:a?.required,defaultShift:F(a?.defaultShift)?!1:a?.defaultShift,forwardPush:F(a?.forwardPush)?!1:a?.forwardPush,forwardPushTimes:F(a?.useDefaultEndDate)?0:a?.forwardPushTimes,useDefaultEndDate:F(a?.useDefaultEndDate)?!1:a?.useDefaultEndDate,copyType:F(a?.copyType)?"":a?.copyType,writeBack:l},I.s=h,I.t=g,I.v=y||""}}return s},{});return!n||F(n)?Promise.reject(new Error("No data found")):Promise.resolve(n)}function L(t,n){return t.replace(/\$\{([^}]+)\}/g,(s,r)=>{try{const c=Object.keys(n),i=Object.values(n);return new Function(...c,`return ${r};`)(...i)}catch(c){return console.error(`表达式执行失败: ${r}`,c),s}})}function Je({acc:t,params:n,initRowNum:s,initColNum:r,cellData:c}){const{rangeData:i,currentDay:b,extraArgs:N}=n,a=N?.teamData||{},{cycleType:y,timeIncrement:g,forwardPush:h,forwardPushTimes:E,copyType:l,copyInterval:I,defaultShift:p,templateStr:k,useDefaultEndDate:Q}=c.custom;let S=0;switch(y){case"day":{let o="";if(h&&(o=J(i[0],E,"day")),!l){let m="";h?m=o:m=i[0];const u=Y(t,s,r);u.v=k?L(k,{businessDate:m,dayjs:v}):v(m).format("YYYY-MM-DD"),u.t=d.CellValueType.STRING,u.s="tor-time-cell-style";break}h?S=H(o,i[0],"day"):(S=H(i[0],i[1],"day"),console.log("copyNum",S));for(let m=0;m<=Math.abs(S===0?1:S);m++){const u=m*(I+1);let M="";h?M=Z(o,"day",m,g):M=Z(i[0],"day",m,g);const P=l==="right"?s:s+u,V=l==="right"?r+u:r,B=Y(t,P,V);B.v=k?L(k,{businessDate:M,dayjs:v}):v(M).format("YYYY-MM-DD"),B.t=d.CellValueType.STRING,B.s="tor-time-cell-style"}break}case"month":{if(!l){const[o,m]=U(i[1],"month",0,1),u=Y(t,s,r);u.v=v(m).format("YYYY-MM"),u.t=d.CellValueType.STRING,u.s="tor-time-cell-style";break}S=H(i[0],i[1],"month");for(let o=0;o<=Math.abs(S===0?1:S);o++){const m=o*(I+1),u=l==="right"?s:s+m,M=l==="right"?r+m:r,P=Y(t,u,M);P.v=Z(i[0],"month",o,g),P.t=d.CellValueType.STRING,P.s="tor-time-cell-style"}break}case"year":{let o="";if(h&&(o=J(i[0],E||0,"year")),!l){const m=h?o:i[0],[u,M]=U(m,"year",0,1),P=Y(t,s,r),[,V]=U(i[1],"month",0,1);P.v=k?L(k,{startTime:u,endTime:M,rangeData:i,dayjs:v}):m,P.t=d.CellValueType.STRING,P.s="tor-time-cell-style";break}h?S=H(o,i[0],"year"):S=H(i[0],i[1],"year");for(let m=0;m<=Math.abs(S===0?1:S);m++){const u=m*(I+1),M=l==="right"?s:s+u,P=l==="right"?r+u:r,[V,B]=U(i[0],"year",m,g),w=Y(t,M,P),O=Z(i[0],"year",m,g);w.v=k?L(k,{startTime:V,endTime:B,rangeData:i,dayjs:v}):O,w.t=d.CellValueType.STRING,w.s="tor-time-cell-style"}break}case"hour":{if(!l){const o=Y(t,s,r);if(o.t=d.CellValueType.STRING,o.s="tor-time-cell-style",p){o.v=v(i[0]).add(1,"hour").format("YYYY-MM-DD HH:mm:ss");break}o.v=v(b).add(1,"hour").format("YYYY-MM-DD HH:mm:ss");break}S=H(i[0],i[1],"hour");for(let o=0;o<=Math.abs(S===0?1:S);o++){const m=o*(I+1),u=l==="right"?s:s+m,M=l==="right"?r+m:r,P=Y(t,u,M);if(P.t=d.CellValueType.STRING,P.s="tor-time-cell-style",p){const V=v(i[0]).add(1,"hour").format("YYYY-MM-DD HH:mm:ss");P.v=Z(V,"hour",o,g);continue}P.v=Z(v(b).add(1,"hour").format("YYYY-MM-DD HH:mm:ss"),"hour",o,g)}break}case"shift":{if(!l){const o=Y(t,s,r);o.t=d.CellValueType.STRING,o.s="tor-time-cell-style",o.v=k?L(k,{rangeData:i,dayjs:v}):i[0];break}if(!a.length)throw new Error("没有获取到当班数据");for(let o=0;o<a.length;o++){const m=a[o],{startDatetime:u,endDatetime:M}=m,P=o*(I+1),V=l==="right"?s:z(s).add(P).toNumber(),B=l==="right"?z(r).add(P).toNumber():r,w=Y(t,V,B);w.s="tor-time-cell-style",w.v=k?L(k,{team:m}):u}break}}}async function Ke(t,n){if(!t)return Promise.reject("没有可用的单元格数据");const{extraArgs:s,rangeData:r}=n;if(!r.length)return Promise.reject("处理时间范围失败, rangeData不能为空");const c=s?.teamData||[],{periodicityTime:i}=n,b=n?.currentDay||v().format("YYYY-MM-DD"),N=(y,g,h)=>i?h!=="MACH_CYCLE"?[y,g]:parseInt(i.split(":")[0],10)<12?[v(y).format("YYYY-MM-DD")+" "+i,v(g).add(1,"day").format("YYYY-MM-DD")+" "+i]:[v(y).subtract(1,"day").format("YYYY-MM-DD")+" "+i,v(g).format("YYYY-MM-DD")+" "+i]:[y,g],a=Object.entries(t).reduce((y,g)=>{const[h,E]=g;for(const[l,I]of Object.entries(E)){const{custom:p}=I;if(!p)continue;const{cellType:k,cycleType:Q,timeIncrement:S,forwardPush:o,forwardPushTimes:m,copyType:u,copyInterval:M,defaultShift:P,useDefaultStartDate:V,useDefaultEndDate:B}=p;if(k==="time"){Je({acc:y,params:n,initRowNum:Number(h),initColNum:Number(l),cellData:I});continue}const w={cycleType:Q,indicatorName:p.indicatorName,indicatorCode:p.indicatorCode,indicatorId:p.indicatorId,indicatorDimensionName:p.indicatorDimensionName,indicatorDimensionConfig:p.indicatorDimensionConfig,required:Ze(p?.required)??!1,cellType:p.cellType,defaultShift:p?.defaultShift||!1,writeBack:F(p?.writeBack)?!0:p.writeBack,dimensionJson:p?.dimensionJson||"",unit:p?.unit||"",innerSyncWay:p?.innerSyncWay||"",outSyncConfigId:p?.outSyncConfigId||"",innerSyncStatus:p?.innerSyncStatus||""};let O=0;switch(Q){case"day":{let f="";if(o&&(f=J(r[0],m||0,"day")),!u){const C=o?f:r[0],[D,j]=N(...U(C,"day",0,1),p?.innerSyncWay),T=Y(y,h,l);T.s="tor-indicator-cell-style",T.custom={...w,startTime:D,endTime:j};break}o?O=H(f,r[0],"day"):O=H(r[0],r[1],"day");for(let C=0;C<=Math.abs(O===0?1:O);C++){const D=C*(M+1),j=o?f:r[0],[T,R]=N(...U(j,"day",C,S),p?.innerSyncWay),q=u==="right"?h:z(h).add(D).toNumber(),$=u==="right"?z(l).add(D).toNumber():l,A=Y(y,q,$);A.s="tor-indicator-cell-style",A.custom={...w,startTime:T,endTime:R}}break}case"month":{if(!u){const[f,C]=U(r[1],"month",0,1),D=Y(y,h,l);D.s="tor-indicator-cell-style",D.custom={...w,startTime:f,endTime:C};break}O=H(r[0],r[1],"month");for(let f=0;f<=Math.abs(O===0?1:O);f++){const C=f*(M+1),D=u==="right"?h:z(h).add(C).toNumber(),j=u==="right"?z(l).add(C).toNumber():l,[T,R]=U(r[0],"month",f,S),q=Y(y,D,j);q.s="tor-indicator-cell-style",q.custom={...w,startTime:T,endTime:R}}break}case"year":{let f="",C="",D="";if(o){f=J(r[0],m||0,"year");const j=v(r[1]).format("MM");C=v(`${f}-${j+1}`).format("YYYY-MM"),D=v(`${f}-${j+2}`).format("YYYY-MM")}if(!u){const j=o?f:r[0],[T,R]=U(j,"year",0,1),q=Y(y,h,l);q.s="tor-indicator-cell-style";const[,$]=U(C,"month",0,1),[A]=U(D,"month",0,1);q.custom={...w,startTime:V?A:T,endTime:B?$:R};break}o?O=H(f,r[0],"year"):O=H(r[0],r[1],"year");for(let j=0;j<=Math.abs(O===0?1:O);j++){const T=j*(M+1),R=u==="right"?h:z(h).add(T).toNumber(),q=u==="right"?z(l).add(T).toNumber():l,[$,A]=U(r[0],"year",j,S),K=Y(y,R,q);K.s="tor-indicator-cell-style",K.custom={...w,startTime:$,endTime:A}}break}case"hour":{if(!u){const f=P?r[0]:r[0]??b,[C,D]=U(f,"hour",1,1),j=Y(y,h,l);j.s="tor-indicator-cell-style",j.custom={...w,startTime:C,endTime:D};break}O=H(r[0],r[1],"hour");for(let f=0;f<=Math.abs(O===0?1:O);f++){const C=f*(M+1),D=u==="right"?h:z(h).add(C).toNumber(),j=u==="right"?z(l).add(C).toNumber():l,T=Y(y,D,j);if(T.s="tor-indicator-cell-style",P){const A=v(r[0]).add(1,"hour").format("YYYY-MM-DD HH:mm:ss"),[K,et]=U(A,"hour",f,S);T.custom={...w,startTime:K,endTime:et};continue}const R=v(b).add(1,"hour").format("YYYY-MM-DD HH:mm:ss"),[q,$]=U(R,"hour",f,S);T.custom={...w,startTime:q,endTime:$}}break}case"shift":{if(!u){const[f,C]=r,D=Y(y,h,l);D.s="tor-indicator-cell-style",D.custom={...w,startTime:f,endTime:C};break}if(!c.length)throw new Error("没有获取到当班数据");for(let f=0;f<c.length;f++){const C=c[f],{startDatetime:D,endDatetime:j}=C,T=f*(M+1),R=u==="right"?h:z(h).add(T).toNumber(),q=u==="right"?z(l).add(T).toNumber():l,$=Y(y,R,q);$.s="tor-indicator-cell-style",$.custom={...w,startTime:D,endTime:j}}break}}}return y},{});return Promise.resolve(a)}function _e(t){return Object.entries(t).reduce((s,[r,c])=>{const i=Math.max(...Object.keys(c).map(Number));return i>s?s=Number(i):s=Number(s)||0,s},0)}function Qe(t,n){const s=JSON.parse(JSON.stringify(t||{}));for(const[r,c]of Object.entries(n)){s[r]||(s[r]={});for(const[i,b]of Object.entries(c)){const N=b??{},a=s[r]?.[i];if(a){const y={...a,...N,custom:{...a.custom,...N.custom},v:N.v||""};s[r][i]=y}else s[r][i]=N}}return s}function Xe(t,n){if(!n?.length||!t)return t;const s={};for(const r in t){const c=t[r];for(const i in c){const b=c[i];if(b?.custom?.cellType==="indicator"){const N=Number(r),a=Number(i);if(n.some(g=>N>=g.startRow&&N<=g.endRow&&a>=g.startColumn&&a<=g.endColumn)&&!n.some(h=>N===h.startRow&&a===h.startColumn))continue}s[r]||(s[r]={}),s[r][i]=b}}return s}const xe="./style.css";Object.defineProperty(e,"CommandType",{enumerable:!0,get:()=>d.CommandType}),Object.defineProperty(e,"FEventName",{enumerable:!0,get:()=>d.FEventName}),Object.defineProperty(e,"FUniver",{enumerable:!0,get:()=>d.FUniver}),Object.defineProperty(e,"ICommandService",{enumerable:!0,get:()=>d.ICommandService}),Object.defineProperty(e,"IUniverInstanceService",{enumerable:!0,get:()=>d.IUniverInstanceService}),Object.defineProperty(e,"Inject",{enumerable:!0,get:()=>d.Inject}),Object.defineProperty(e,"Injector",{enumerable:!0,get:()=>d.Injector}),Object.defineProperty(e,"LocaleType",{enumerable:!0,get:()=>d.LocaleType}),Object.defineProperty(e,"Plugin",{enumerable:!0,get:()=>d.Plugin}),Object.defineProperty(e,"Univer",{enumerable:!0,get:()=>d.Univer}),Object.defineProperty(e,"UniverInstanceType",{enumerable:!0,get:()=>d.UniverInstanceType}),Object.defineProperty(e,"Workbook",{enumerable:!0,get:()=>d.Workbook}),Object.defineProperty(e,"createUniver",{enumerable:!0,get:()=>d.createUniver}),Object.defineProperty(e,"defaultTheme",{enumerable:!0,get:()=>d.defaultTheme}),Object.defineProperty(e,"greenTheme",{enumerable:!0,get:()=>d.greenTheme}),Object.defineProperty(e,"merge",{enumerable:!0,get:()=>d.merge}),Object.defineProperty(e,"mergeLocales",{enumerable:!0,get:()=>d.mergeLocales}),Object.defineProperty(e,"touchDependencies",{enumerable:!0,get:()=>d.touchDependencies}),Object.defineProperty(e,"BaselineOffset",{enumerable:!0,get:()=>X.BaselineOffset}),Object.defineProperty(e,"CommandService",{enumerable:!0,get:()=>X.CommandService}),Object.defineProperty(e,"SetRangeValuesCommand",{enumerable:!0,get:()=>ne.SetRangeValuesCommand}),Object.defineProperty(e,"ComponentManager",{enumerable:!0,get:()=>G.ComponentManager}),Object.defineProperty(e,"ContextMenuGroup",{enumerable:!0,get:()=>G.ContextMenuGroup}),Object.defineProperty(e,"ContextMenuPosition",{enumerable:!0,get:()=>G.ContextMenuPosition}),Object.defineProperty(e,"IMenuManagerService",{enumerable:!0,get:()=>G.IMenuManagerService}),Object.defineProperty(e,"MenuItemType",{enumerable:!0,get:()=>G.MenuItemType}),Object.defineProperty(e,"RibbonStartGroup",{enumerable:!0,get:()=>G.RibbonStartGroup}),Object.defineProperty(e,"UniverVue3AdapterPlugin",{enumerable:!0,get:()=>se.UniverVue3AdapterPlugin}),Object.defineProperty(e,"UniverSheetsAdvancedPreset",{enumerable:!0,get:()=>ie.UniverSheetsAdvancedPreset}),Object.defineProperty(e,"UniverSheetsConditionalFormattingPreset",{enumerable:!0,get:()=>oe.UniverSheetsConditionalFormattingPreset}),Object.defineProperty(e,"UniverSheetsCorePreset",{enumerable:!0,get:()=>ae.UniverSheetsCorePreset}),Object.defineProperty(e,"UniverSheetsDataValidationPreset",{enumerable:!0,get:()=>ue.UniverSheetsDataValidationPreset}),Object.defineProperty(e,"UniverSheetsDrawingPreset",{enumerable:!0,get:()=>ce.UniverSheetsDrawingPreset}),Object.defineProperty(e,"UniverSheetsFilterPreset",{enumerable:!0,get:()=>le.UniverSheetsFilterPreset}),Object.defineProperty(e,"UniverSheetsHyperLinkPreset",{enumerable:!0,get:()=>he.UniverSheetsHyperLinkPreset}),Object.defineProperty(e,"UniverSheetsNotePreset",{enumerable:!0,get:()=>me.UniverSheetsNotePreset}),Object.defineProperty(e,"UniverSheetsSortPreset",{enumerable:!0,get:()=>fe.UniverSheetsSortPreset}),Object.defineProperty(e,"UniverSheetsFindReplacePreset",{enumerable:!0,get:()=>de.UniverSheetsFindReplacePreset}),Object.defineProperty(e,"UniverSheetsThreadCommentPreset",{enumerable:!0,get:()=>ve.UniverSheetsThreadCommentPreset}),Object.defineProperty(e,"UniverSheetsTablePreset",{enumerable:!0,get:()=>ye.UniverSheetsTablePreset}),Object.defineProperty(e,"UniverSheetsCollaborationPreset",{enumerable:!0,get:()=>be.UniverSheetsCollaborationPreset}),Object.defineProperty(e,"UniverWatermarkPlugin",{enumerable:!0,get:()=>ge.UniverWatermarkPlugin}),Object.defineProperty(e,"UniverSheetsCrosshairHighlightPlugin",{enumerable:!0,get:()=>Ce.UniverSheetsCrosshairHighlightPlugin}),Object.defineProperty(e,"UniverLiveSharePlugin",{enumerable:!0,get:()=>pe.UniverLiveSharePlugin}),e.zhCN=Pe,e.UniverPresetSheetsAdvancedZhCN=je,e.sheetsConditionalFormattingZhCN=Ye,e.sheetsCoreZhCN=Se,e.UniverPresetSheetsDrawingZhCN=De,e.sheetsFilterZhCN=Ne,e.UniverPresetSheetsHyperLinkZhCN=Me,e.UniverPresetSheetsNoteZhCN=we,e.UniverPresetSheetsFilterZhCN=Te,e.UniverPresetSheetsSortZhCN=Oe,e.UniverPresetSheetsDataValidationZhCN=Ue,e.UniverPresetSheetsFindReplaceZhCN=ke,e.UniverPresetSheetsThreadCommentZhCN=ze,e.UniverPresetSheetsTableZhCN=Ie,e.UniverPresetSheetsCollaborationZhCN=qe,e.CycleTypeEnum=te,e.ModeEnum=re,e.decimal=z,e.filterIndicatorsCell=We,e.filterMergedIndicatorCells=Xe,e.generateIndicatorsCells=Ke,e.generateUUID=x,e.getNumColumns=_e,e.handleClearInput=He,e.initDateRange=Le,e.mergeCellData=Qe,e.stylePath=xe,e.useData=Re,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
|
package/dist/types/index.d.ts
CHANGED
|
@@ -36,25 +36,38 @@ import { RibbonStartGroup } from '@univerjs/ui';
|
|
|
36
36
|
import { SetRangeValuesCommand } from '@univerjs/sheets';
|
|
37
37
|
import { default as sheetsConditionalFormattingZhCN } from '@univerjs/presets/preset-sheets-conditional-formatting/locales/zh-CN';
|
|
38
38
|
import { default as sheetsCoreZhCN } from '@univerjs/presets/preset-sheets-core/locales/zh-CN';
|
|
39
|
-
import { default as
|
|
40
|
-
import { default as sheetsDrawingZhCN } from '@univerjs/presets/preset-sheets-drawing/locales/zh-CN';
|
|
41
|
-
import { default as sheetsFilterZhCN } from '@univerjs/presets/preset-sheets-filter/locales/zh-CN';
|
|
42
|
-
import { default as sheetsHyperLinkZhCN } from '@univerjs/presets/preset-sheets-hyper-link/locales/zh-CN';
|
|
39
|
+
import { default as sheetsFilterZhCN } from '@univerjs/preset-sheets-filter/locales/zh-CN';
|
|
43
40
|
import { touchDependencies } from '@univerjs/presets';
|
|
44
41
|
import { Univer } from '@univerjs/presets';
|
|
45
42
|
import { UniverInstanceType } from '@univerjs/presets';
|
|
43
|
+
import { UniverLiveSharePlugin } from '@univerjs-pro/live-share';
|
|
46
44
|
import { default as UniverPresetSheetsAdvancedZhCN } from '@univerjs/preset-sheets-advanced/locales/zh-CN';
|
|
45
|
+
import { default as UniverPresetSheetsCollaborationZhCN } from '@univerjs/preset-sheets-collaboration/locales/zh-CN';
|
|
46
|
+
import { default as UniverPresetSheetsDataValidationZhCN } from '@univerjs/preset-sheets-data-validation/locales/zh-CN';
|
|
47
47
|
import { default as UniverPresetSheetsDrawingZhCN } from '@univerjs/preset-sheets-drawing/locales/zh-CN';
|
|
48
|
+
import { default as UniverPresetSheetsFilterZhCN } from '@univerjs/presets/preset-sheets-filter/locales/zh-CN';
|
|
49
|
+
import { default as UniverPresetSheetsFindReplaceZhCN } from '@univerjs/preset-sheets-find-replace/locales/zh-CN';
|
|
50
|
+
import { default as UniverPresetSheetsHyperLinkZhCN } from '@univerjs/preset-sheets-hyper-link/locales/zh-CN';
|
|
48
51
|
import { default as UniverPresetSheetsNoteZhCN } from '@univerjs/preset-sheets-note/locales/zh-CN';
|
|
52
|
+
import { default as UniverPresetSheetsSortZhCN } from '@univerjs/preset-sheets-sort/locales/zh-CN';
|
|
53
|
+
import { default as UniverPresetSheetsTableZhCN } from '@univerjs/preset-sheets-table/locales/zh-CN';
|
|
54
|
+
import { default as UniverPresetSheetsThreadCommentZhCN } from '@univerjs/preset-sheets-thread-comment/locales/zh-CN';
|
|
49
55
|
import { UniverSheetsAdvancedPreset } from '@univerjs/preset-sheets-advanced';
|
|
50
|
-
import {
|
|
56
|
+
import { UniverSheetsCollaborationPreset } from '@univerjs/preset-sheets-collaboration';
|
|
57
|
+
import { UniverSheetsConditionalFormattingPreset } from '@univerjs/preset-sheets-conditional-formatting';
|
|
51
58
|
import { UniverSheetsCorePreset } from '@univerjs/presets/preset-sheets-core';
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
59
|
+
import { UniverSheetsCrosshairHighlightPlugin } from '@univerjs/sheets-crosshair-highlight';
|
|
60
|
+
import { UniverSheetsDataValidationPreset } from '@univerjs/preset-sheets-data-validation';
|
|
61
|
+
import { UniverSheetsDrawingPreset } from '@univerjs/preset-sheets-drawing';
|
|
62
|
+
import { UniverSheetsFilterPreset } from '@univerjs/preset-sheets-filter';
|
|
63
|
+
import { UniverSheetsFindReplacePreset } from '@univerjs/preset-sheets-find-replace';
|
|
64
|
+
import { UniverSheetsHyperLinkPreset } from '@univerjs/preset-sheets-hyper-link';
|
|
56
65
|
import { UniverSheetsNotePreset } from '@univerjs/preset-sheets-note';
|
|
66
|
+
import { UniverSheetsSortPreset } from '@univerjs/preset-sheets-sort';
|
|
67
|
+
import { UniverSheetsTablePreset } from '@univerjs/preset-sheets-table';
|
|
68
|
+
import { UniverSheetsThreadCommentPreset } from '@univerjs/preset-sheets-thread-comment';
|
|
57
69
|
import { UniverVue3AdapterPlugin } from '@univerjs/ui-adapter-vue3';
|
|
70
|
+
import { UniverWatermarkPlugin } from '@univerjs/watermark';
|
|
58
71
|
import { Workbook } from '@univerjs/presets';
|
|
59
72
|
import { default as zhCN } from '@univerjs/preset-sheets-core/locales/zh-CN';
|
|
60
73
|
|
|
@@ -240,14 +253,8 @@ export { sheetsConditionalFormattingZhCN }
|
|
|
240
253
|
|
|
241
254
|
export { sheetsCoreZhCN }
|
|
242
255
|
|
|
243
|
-
export { sheetsDataValidationZhCN }
|
|
244
|
-
|
|
245
|
-
export { sheetsDrawingZhCN }
|
|
246
|
-
|
|
247
256
|
export { sheetsFilterZhCN }
|
|
248
257
|
|
|
249
|
-
export { sheetsHyperLinkZhCN }
|
|
250
|
-
|
|
251
258
|
export declare const stylePath = "./style.css";
|
|
252
259
|
|
|
253
260
|
export declare type TeamDataType = {
|
|
@@ -269,24 +276,48 @@ export { Univer }
|
|
|
269
276
|
|
|
270
277
|
export { UniverInstanceType }
|
|
271
278
|
|
|
279
|
+
export { UniverLiveSharePlugin }
|
|
280
|
+
|
|
272
281
|
export { UniverPresetSheetsAdvancedZhCN }
|
|
273
282
|
|
|
283
|
+
export { UniverPresetSheetsCollaborationZhCN }
|
|
284
|
+
|
|
285
|
+
export { UniverPresetSheetsDataValidationZhCN }
|
|
286
|
+
|
|
274
287
|
export { UniverPresetSheetsDrawingZhCN }
|
|
275
288
|
|
|
289
|
+
export { UniverPresetSheetsFilterZhCN }
|
|
290
|
+
|
|
291
|
+
export { UniverPresetSheetsFindReplaceZhCN }
|
|
292
|
+
|
|
293
|
+
export { UniverPresetSheetsHyperLinkZhCN }
|
|
294
|
+
|
|
276
295
|
export { UniverPresetSheetsNoteZhCN }
|
|
277
296
|
|
|
297
|
+
export { UniverPresetSheetsSortZhCN }
|
|
298
|
+
|
|
299
|
+
export { UniverPresetSheetsTableZhCN }
|
|
300
|
+
|
|
301
|
+
export { UniverPresetSheetsThreadCommentZhCN }
|
|
302
|
+
|
|
278
303
|
export { UniverSheetsAdvancedPreset }
|
|
279
304
|
|
|
305
|
+
export { UniverSheetsCollaborationPreset }
|
|
306
|
+
|
|
280
307
|
export { UniverSheetsConditionalFormattingPreset }
|
|
281
308
|
|
|
282
309
|
export { UniverSheetsCorePreset }
|
|
283
310
|
|
|
311
|
+
export { UniverSheetsCrosshairHighlightPlugin }
|
|
312
|
+
|
|
284
313
|
export { UniverSheetsDataValidationPreset }
|
|
285
314
|
|
|
286
315
|
export { UniverSheetsDrawingPreset }
|
|
287
316
|
|
|
288
317
|
export { UniverSheetsFilterPreset }
|
|
289
318
|
|
|
319
|
+
export { UniverSheetsFindReplacePreset }
|
|
320
|
+
|
|
290
321
|
export { UniverSheetsHyperLinkPreset }
|
|
291
322
|
|
|
292
323
|
export { UniverSheetsNotePreset }
|
|
@@ -305,8 +336,16 @@ export declare interface UniverSheetsProps {
|
|
|
305
336
|
templateMenu?: any;
|
|
306
337
|
}
|
|
307
338
|
|
|
339
|
+
export { UniverSheetsSortPreset }
|
|
340
|
+
|
|
341
|
+
export { UniverSheetsTablePreset }
|
|
342
|
+
|
|
343
|
+
export { UniverSheetsThreadCommentPreset }
|
|
344
|
+
|
|
308
345
|
export { UniverVue3AdapterPlugin }
|
|
309
346
|
|
|
347
|
+
export { UniverWatermarkPlugin }
|
|
348
|
+
|
|
310
349
|
export declare function useData(data: UseDataType): IWorkbookData;
|
|
311
350
|
|
|
312
351
|
export declare type UseDataType = {
|