@univerjs-pro/sheets-chart 1.0.0-alpha.8 → 1.0.0-beta.1
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/cjs/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/ar-SA.js +1 -1
- package/lib/cjs/locale/ca-ES.js +1 -1
- package/lib/cjs/locale/de-DE.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/es-ES.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/id-ID.js +1 -1
- package/lib/cjs/locale/it-IT.js +1 -1
- package/lib/cjs/locale/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.js +1 -1
- package/lib/cjs/locale/pl-PL.js +1 -1
- package/lib/cjs/locale/pt-BR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/sk-SK.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-HK.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/ar-SA.js +1 -1
- package/lib/es/locale/ca-ES.js +1 -1
- package/lib/es/locale/de-DE.js +1 -1
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/es-ES.js +1 -1
- package/lib/es/locale/fa-IR.js +1 -1
- package/lib/es/locale/fr-FR.js +1 -1
- package/lib/es/locale/id-ID.js +1 -1
- package/lib/es/locale/it-IT.js +1 -1
- package/lib/es/locale/ja-JP.js +1 -1
- package/lib/es/locale/ko-KR.js +1 -1
- package/lib/es/locale/pl-PL.js +1 -1
- package/lib/es/locale/pt-BR.js +1 -1
- package/lib/es/locale/ru-RU.js +1 -1
- package/lib/es/locale/sk-SK.js +1 -1
- package/lib/es/locale/vi-VN.js +1 -1
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/es/locale/zh-HK.js +1 -1
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/facade.js +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/ar-SA.js +1 -1
- package/lib/locale/ca-ES.js +1 -1
- package/lib/locale/de-DE.js +1 -1
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/es-ES.js +1 -1
- package/lib/locale/fa-IR.js +1 -1
- package/lib/locale/fr-FR.js +1 -1
- package/lib/locale/id-ID.js +1 -1
- package/lib/locale/it-IT.js +1 -1
- package/lib/locale/ja-JP.js +1 -1
- package/lib/locale/ko-KR.js +1 -1
- package/lib/locale/pl-PL.js +1 -1
- package/lib/locale/pt-BR.js +1 -1
- package/lib/locale/ru-RU.js +1 -1
- package/lib/locale/sk-SK.js +1 -1
- package/lib/locale/vi-VN.js +1 -1
- package/lib/locale/zh-CN.js +1 -1
- package/lib/locale/zh-HK.js +1 -1
- package/lib/locale/zh-TW.js +1 -1
- package/lib/types/chart-builder/{sheet-chart-builder-adapter.d.ts → sheet-chart-config-adapter.d.ts} +17 -8
- package/lib/types/chart-builder/types.d.ts +5 -1
- package/lib/types/chart-source/chart-source.d.ts +2 -0
- package/lib/types/chart-source/source-util.d.ts +5 -21
- package/lib/types/commands/chart-persisted-context.d.ts +3 -0
- package/lib/types/commands/commands/sheets-chart-update-config.command.d.ts +7 -3
- package/lib/types/commands/mutations/sheets-chart-update-config.mutation.d.ts +3 -3
- package/lib/types/common/util.d.ts +2 -0
- package/lib/types/config/config.d.ts +2 -2
- package/lib/types/facade/f-enum.d.ts +27 -0
- package/lib/types/facade/f-worksheet.d.ts +134 -0
- package/lib/types/facade/index.d.ts +3 -3
- package/lib/types/index.d.ts +8 -3
- package/lib/types/locale/en-US.d.ts +37 -2
- package/lib/types/plugin.d.ts +0 -1
- package/lib/types/services/chart-model.service.d.ts +13 -14
- package/lib/types/services/sheet-chart-range-watcher.d.ts +5 -5
- package/lib/types/services/sheets-chart.service.d.ts +7 -5
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/id-ID.js +1 -1
- package/lib/umd/locale/it-IT.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/pl-PL.js +1 -1
- package/lib/umd/locale/pt-BR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +10 -9
- package/lib/types/chart-builder/index.d.ts +0 -10
- package/lib/types/chart-builder/sheet-chart-builder.d.ts +0 -17
- package/lib/types/chart-builder/sheet-chart-create-spec.d.ts +0 -6
- package/lib/types/facade/chart/f-sheet-chart-builder.d.ts +0 -83
- package/lib/types/facade/chart/f-sheet-charts.d.ts +0 -100
- package/lib/types/facade/chart/index.d.ts +0 -2
- package/lib/types/facade/chart/sheet-chart-command-adapter.d.ts +0 -13
- package/lib/types/facade/f-worksheet-charts.d.ts +0 -12
- package/lib/types/models/chart-model.d.ts +0 -22
package/lib/es/locale/zh-TW.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0xa5ae37=_0x1183;(function(_0x3d00a1,_0x117974){const _0xa64fcf=_0x1183,_0x5dac38=_0x3d00a1();while(!![]){try{const _0x4c4857=parseInt(_0xa64fcf(0x151))/0x1*(-parseInt(_0xa64fcf(0x138))/0x2)+-parseInt(_0xa64fcf(0x148))/0x3*(parseInt(_0xa64fcf(0x132))/0x4)+-parseInt(_0xa64fcf(0x12d))/0x5*(-parseInt(_0xa64fcf(0x13b))/0x6)+parseInt(_0xa64fcf(0x136))/0x7+-parseInt(_0xa64fcf(0x129))/0x8+-parseInt(_0xa64fcf(0x14f))/0x9+parseInt(_0xa64fcf(0x12a))/0xa*(parseInt(_0xa64fcf(0x13f))/0xb);if(_0x4c4857===_0x117974)break;else _0x5dac38['push'](_0x5dac38['shift']());}catch(_0x2336e9){_0x5dac38['push'](_0x5dac38['shift']());}}}(_0x3dce,0xdfe5e));function _0x1183(_0x35a232,_0x4023de){_0x35a232=_0x35a232-0x129;const _0x3dce67=_0x3dce();let _0x1183fa=_0x3dce67[_0x35a232];return _0x1183fa;}function _0x3dce(){const _0x3fc9e8=['最大值','168aQhCoN','選取的欄位無法構成這個圖表所需的有效資料結構。','這個圖表需要更多標籤欄位。','關係數','33BRZaKo','最高價','旭日圖至少需要一個階層欄位和一個數值欄位。','選取的圖表欄位已無法使用。','儀表圖需要一個標籤欄位,而且只能有一個數值欄位。','儀表圖至少需要一個有限數值。','弦圖需要不同的來源與目標欄位,並可選擇一個與兩者不同的數值欄位。','第三四分位數','這個圖表需要更多數值欄位。','1452rOGfcg','累積占比','自身值','類別\x20{0}','儀表圖設定無效,請檢查刻度範圍、分段區間、比例和尺寸。','關聯值','最小值','202428oAXgOF','關係圖資料來源為額外新增類型欄在第二欄的共詞矩陣','2YeZjIb','8047112bhuZLd','11264410ErZPVr','收盤價','最低價','31905cuoFrJ','弦圖設定無效,請檢查角度、半徑、不透明度和尺寸。','開盤價','氣泡圖至少需要2欄,X軸、Y軸。','請先添加系列開始數據可視化','10312wDtLkm','第一四分位數','(空)','這個圖表類型沒有欄位使用規則。','7997822mnLnFj','OHLC\x20數列','1507318MyTuxu','中位數'];_0x3dce=function(){return _0x3fc9e8;};return _0x3dce();}const e={'sheets-chart':{'seriesDefaultName':'系列\x20{0}','categoryDefaultName':_0xa5ae37(0x14b),'blank':_0xa5ae37(0x134),'msg':{'emptyTips':_0xa5ae37(0x131),'sankeyCircularTips':'桑基圖不能包含循環數據'},'bubble':{'emptyTips':_0xa5ae37(0x130)},'relation':{'emptyTips':_0xa5ae37(0x150)},'cloud':{'word':'詞','frequency':'頻率'},'waterfall':{'positive':'正值','negative':'負值','subtotal':'小計'},'pareto':{'lineName':_0xa5ae37(0x149)},'boxplot':{'min':_0xa5ae37(0x14e),'q1':_0xa5ae37(0x133),'median':_0xa5ae37(0x139),'q3':_0xa5ae37(0x146),'max':_0xa5ae37(0x13a)},'candlestick':{'series':_0xa5ae37(0x137),'category':'Category','open':_0xa5ae37(0x12f),'high':_0xa5ae37(0x140),'low':_0xa5ae37(0x12c),'close':_0xa5ae37(0x12b)},'histogram':{'frequency':'頻數'},'pie':{'aggregateOther':'其他','aggregateMembers':'成員'},'treemap':{'hierarchy':'階層欄位','value':'數值欄位','ownValue':_0xa5ae37(0x14a),'children':'子項','diagnostic':'矩形樹圖至少需要一個階層欄位和一個數值欄位。'},'sunburst':{'hierarchy':'階層','value':'Value','ownValue':_0xa5ae37(0x14a),'children':'子項','diagnostic':_0xa5ae37(0x141)},'gauge':{'label':'標籤','value':'Value','emptyDiagnostic':_0xa5ae37(0x144),'mappingDiagnostic':_0xa5ae37(0x143),'configDiagnostic':_0xa5ae37(0x14c)},'chord':{'emptyDiagnostic':'弦圖至少需要兩個不同節點之間的一條正權重關係。','mappingDiagnostic':_0xa5ae37(0x145),'configDiagnostic':_0xa5ae37(0x12e),'source':'來源','target':'目標','value':'Value','count':_0xa5ae37(0x13e),'associatedValue':_0xa5ae37(0x14d)},'chartField':{'missingCategoryFields':_0xa5ae37(0x13d),'missingSeriesFields':_0xa5ae37(0x147),'invalidFieldIndex':_0xa5ae37(0x142),'invalidValueFieldType':'選取的數值欄位不包含數值資料。','invalidDataStructure':_0xa5ae37(0x13c),'unsupportedChartType':_0xa5ae37(0x135)}}};export{e as default};
|
package/lib/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x5586bc=_0x178a;(function(_0x4410bf,_0x50a183){const _0x45d63f=_0x178a,_0x43e41d=_0x4410bf();while(!![]){try{const _0x57f263=-parseInt(_0x45d63f(0xf4))/0x1+-parseInt(_0x45d63f(0xfb))/0x2+parseInt(_0x45d63f(0xdf))/0x3*(parseInt(_0x45d63f(0xe8))/0x4)+parseInt(_0x45d63f(0xe3))/0x5+-parseInt(_0x45d63f(0xd8))/0x6*(-parseInt(_0x45d63f(0xe1))/0x7)+parseInt(_0x45d63f(0xf3))/0x8+-parseInt(_0x45d63f(0xf8))/0x9;if(_0x57f263===_0x50a183)break;else _0x43e41d['push'](_0x43e41d['shift']());}catch(_0x2b58b6){_0x43e41d['push'](_0x43e41d['shift']());}}}(_0x46bb,0x5795e));import{FWorksheet as _0x2fdd14}from'@univerjs/sheets/facade';import{ChartThemeService as _0x226503,DEFAULT_CHART_TYPE as _0xdb99c0,DataOrientation as _0x1b6364,DetachedChartBuilderAdapter as _0x467ed9,IChartRenderModelManagerService as _0x4cbbfa,chartTypeToBits as _0x3ccc6c,resolveChartRenderModelImageExportInput as _0x183a1f,toChartModelConfig as _0x5a37d4}from'@univerjs-pro/engine-chart';import{FChartBuilderBase as _0x3b2230,FChartsBase as _0x4d21eb,HostBuilderComposer as _0x485146,getChartBuilderConstructor as _0x34c17c,getChartBuilderPendingConfig as _0x39f09e}from'@univerjs-pro/engine-chart/facade';import{ChartDiagnosticSeverity as _0x5626eb,ChartSourceKind as _0x610818,ChartSourceOrientation as _0x32fbb5,ChartUpdateSourceCommand as _0x1c32fd,InsertChartCommand as _0x1a19ea,SheetChartBuilder as _0x5eef78,SheetChartBuilderAdapter as _0x5310b4,SheetsChartService as _0x5c9906,resolveInitialChartPosition as _0x1564e9,resolveSourceSeries as _0x56dee6,resolveSourceSpec as _0x2a95d1,toSheetChartCreateSpec as _0x2aae71}from'@univerjs-pro/sheets-chart';import{DrawingTypeEnum as _0x55e5a0,ICommandService as _0x3683f2,LocaleService as _0x54f6fd,generateRandomId as _0x5d2fa9}from'@univerjs/core';import{ISheetDrawingService as _0x248e1d,RemoveSheetDrawingCommand as _0x345e2}from'@univerjs/sheets-drawing';import{FEnum as _0x24d80e}from'@univerjs/core/facade';function N(_0x334f91){const _0x54d327=_0x178a;return class extends _0x334f91{get[_0x54d327(0xfe)](){const _0x21faca=_0x54d327;return this[_0x21faca(0x11c)];}['setSource'](_0x115961){const _0x4986a9=_0x54d327;return this[_0x4986a9(0xfe)][_0x4986a9(0x104)](_0x115961),this;}[_0x54d327(0x11e)](){const _0x141721=_0x54d327;return this[_0x141721(0xfe)]['getSource']();}[_0x54d327(0x106)](_0x51a69d){const _0x859bd7=_0x54d327;return this[_0x859bd7(0xfe)]['setLayout']({'anchor':_0x51a69d}),this;}[_0x54d327(0x103)](_0x370952,_0x212c47){const _0x558e2a=_0x54d327;return this['_sheetBuilder'][_0x558e2a(0xd2)]({'position':{'x':_0x370952,'y':_0x212c47}}),this;}[_0x54d327(0xd1)](_0x1695dc,_0x285d11){const _0xf2344d=_0x54d327;return this[_0xf2344d(0xfe)][_0xf2344d(0xd2)]({'size':{'width':_0x1695dc,'height':_0x285d11}}),this;}};}const P=new _0x485146(_0x343384=>N(_0x343384));function _0x178a(_0x2e7da3,_0x2a6549){_0x2e7da3=_0x2e7da3-0xce;const _0x46bb1a=_0x46bb();let _0x178ac5=_0x46bb1a[_0x2e7da3];return _0x178ac5;}var F=class{constructor(_0x37fb53,_0x2a4dc1,_0x3d22c5,_0x1b087e){const _0x2018f5=_0x178a;this[_0x2018f5(0xd6)]=_0x37fb53,this[_0x2018f5(0xf9)]=_0x2a4dc1,this['chartId']=_0x3d22c5,this[_0x2018f5(0x100)]=_0x1b087e;}['getChartId'](){return this['chartId'];}[_0x5586bc(0x11d)](){const _0xce7c4b=_0x5586bc;return this[_0xce7c4b(0x112)];}['getRange'](){const _0x5e538f=_0x5586bc;var _0x6d035b;return(_0x6d035b=this[_0x5e538f(0x100)][_0x5e538f(0x10b)](_0x5c9906)[_0x5e538f(0xf6)](this['chartId']))==null?void 0x0:_0x6d035b[_0x5e538f(0xf5)][_0x5e538f(0xe0)]();}[_0x5586bc(0xf7)](_0xc914dc){const _0x5efa22=_0x5586bc;return this[_0x5efa22(0x100)][_0x5efa22(0x10b)](_0x3683f2)[_0x5efa22(0xdd)](_0x1c32fd['id'],{'unitId':this[_0x5efa22(0xd6)],'chartModelId':this[_0x5efa22(0x112)],'range':_0xc914dc});}['getSeriesData'](){const _0x139020=_0x5586bc;var _0x229588;return(_0x229588=this[_0x139020(0x100)]['get'](_0x5c9906)['getChartModel'](this[_0x139020(0x112)]))==null||(_0x229588=_0x229588[_0x139020(0xce)])==null?void 0x0:_0x229588[_0x139020(0xd5)];}[_0x5586bc(0xff)](){const _0x302b5d=_0x5586bc;var _0x5d3939;return(_0x5d3939=this[_0x302b5d(0x100)][_0x302b5d(0x10b)](_0x5c9906)['getChartModel'](this[_0x302b5d(0x112)]))==null||(_0x5d3939=_0x5d3939[_0x302b5d(0xce)])==null?void 0x0:_0x5d3939[_0x302b5d(0x10e)];}async['exportImage'](_0x404768){const _0x270ff8=_0x5586bc;var _0x358e0f,_0x5b9360,_0x31c197,_0x4fe239;let _0x4dec44=this[_0x270ff8(0x100)][_0x270ff8(0x10b)](_0x5c9906)[_0x270ff8(0xf6)](this['chartId']);if(!_0x4dec44||!this[_0x270ff8(0x100)][_0x270ff8(0x10d)](_0x248e1d))return null;let _0x1ef454=this[_0x270ff8(0x100)][_0x270ff8(0x10b)](_0x248e1d)['getDrawingByParam']({'unitId':this[_0x270ff8(0xd6)],'subUnitId':this[_0x270ff8(0xf9)],'drawingId':this[_0x270ff8(0x112)]}),_0x3c101d=_0x183a1f({'runtime':{'chartId':this[_0x270ff8(0x112)],'model':_0x4dec44},'direction':this['_injector']['get'](_0x54f6fd)['getDirection'](),'width':(_0x358e0f=_0x1ef454==null||(_0x5b9360=_0x1ef454['transform'])==null?void 0x0:_0x5b9360['width'])==null?0x0:_0x358e0f,'height':(_0x31c197=_0x1ef454==null||(_0x4fe239=_0x1ef454[_0x270ff8(0x116)])==null?void 0x0:_0x4fe239['height'])==null?0x0:_0x31c197});return _0x3c101d?this['_injector']['get'](_0x4cbbfa)[_0x270ff8(0xed)](_0x3c101d,_0x404768):null;}['remove'](){const _0x2e3422=_0x5586bc;return this[_0x2e3422(0x100)][_0x2e3422(0x10b)](_0x3683f2)[_0x2e3422(0xdd)](_0x345e2['id'],{'unitId':this['unitId'],'drawings':[{'unitId':this[_0x2e3422(0xd6)],'subUnitId':this[_0x2e3422(0xf9)],'drawingId':this[_0x2e3422(0x112)],'drawingType':_0x55e5a0['DRAWING_CHART']}]});}},I=class{constructor(_0x5b4b0a){const _0x3826c1=_0x5586bc;this[_0x3826c1(0xe7)]=_0x5b4b0a;}async[_0x5586bc(0xdb)](_0x18bcbb){const _0x13b968=_0x5586bc;var _0x232a6e,_0x481631,_0x42ca49,_0x589540,_0x53d5e0;let _0x34c4fc=this['_sourceContext'](),_0x55104c=[],_0x22b062=_0x2a95d1(_0x18bcbb[_0x13b968(0xeb)],_0x34c4fc,_0x55104c);if(!_0x22b062||_0x55104c['some'](_0x41137c=>_0x41137c['severity']===_0x5626eb[_0x13b968(0xd3)]))throw Error(_0x55104c[_0x13b968(0xe4)](_0x1177fd=>_0x1177fd[_0x13b968(0x105)])['join'](';\x20')||_0x13b968(0x110));let _0x4455b2=_0x5d2fa9(),_0x11a088=_0x5a37d4(_0x18bcbb,{'series':_0x56dee6(_0x22b062,_0x34c4fc,(_0x232a6e=(_0x481631=_0x18bcbb['mapping'])==null?void 0x0:_0x481631['categoryIndex'])==null?0x0:_0x232a6e)}),_0x315f1b=_0x1564e9({'unitId':_0x34c4fc['unitId'],'subUnitId':_0x34c4fc['subUnitId'],'injector':this[_0x13b968(0xe7)][_0x13b968(0xf1)]()},_0x18bcbb,_0x55104c),_0x231320={'unitId':_0x34c4fc[_0x13b968(0xd6)],'subUnitId':_0x34c4fc[_0x13b968(0xf9)],'chartId':_0x4455b2,'chartType':_0x3ccc6c(_0x18bcbb['type']),'source':_0x22b062['kind']===_0x610818['Range']?_0x22b062[_0x13b968(0x102)]:_0x22b062[_0x13b968(0x10c)],'position':_0x315f1b,'width':(_0x42ca49=_0x18bcbb[_0x13b968(0xfc)])==null?void 0x0:_0x42ca49['width'],'height':(_0x589540=_0x18bcbb[_0x13b968(0xfc)])==null?void 0x0:_0x589540['height'],'theme':(_0x53d5e0=_0x18bcbb[_0x13b968(0x10a)])==null?void 0x0:_0x53d5e0,'config':{'unitId':_0x34c4fc['unitId'],'chartModelId':_0x4455b2,'style':_0x11a088['style'],'context':_0x11a088[_0x13b968(0x113)],'dataAggregation':_0x11a088[_0x13b968(0x111)]}};if(!await this['_worksheet'][_0x13b968(0xf1)]()[_0x13b968(0x10b)](_0x3683f2)[_0x13b968(0xdd)](_0x1a19ea['id'],_0x231320))throw Error(_0x13b968(0x11f));return new F(_0x34c4fc['unitId'],_0x34c4fc[_0x13b968(0xf9)],_0x4455b2,this[_0x13b968(0xe7)]['getInject']());}['get'](_0xa90e82){const _0x2af316=_0x5586bc;let {unitId:_0x242f57,subUnitId:_0x44bb7c}=this[_0x2af316(0xe2)](),_0x3e651d=this['_worksheet']['getInject']()[_0x2af316(0x10b)](_0x5c9906);return _0x3e651d[_0x2af316(0xf6)](_0xa90e82)&&_0x3e651d[_0x2af316(0xcf)](_0x242f57,_0xa90e82)===_0x44bb7c?new F(_0x242f57,_0x44bb7c,_0xa90e82,this['_worksheet']['getInject']()):null;}[_0x5586bc(0xea)](){const _0x56b837=_0x5586bc;let {unitId:_0x11b5b4,subUnitId:_0x554068}=this[_0x56b837(0xe2)]();return this[_0x56b837(0xe7)][_0x56b837(0xf1)]()[_0x56b837(0x10b)](_0x5c9906)[_0x56b837(0xdc)](_0x11b5b4,_0x554068)[_0x56b837(0xfa)](Boolean)[_0x56b837(0xe4)](_0x12b0cb=>new F(_0x11b5b4,_0x554068,_0x12b0cb['id'],this['_worksheet'][_0x56b837(0xf1)]()));}[_0x5586bc(0xd7)](_0x51e81a){const _0x201feb=_0x5586bc;let _0x1655d6=typeof _0x51e81a=='string'?this[_0x201feb(0x10b)](_0x51e81a):_0x51e81a;return _0x1655d6?this[_0x201feb(0xe7)][_0x201feb(0xf1)]()[_0x201feb(0x10b)](_0x3683f2)['executeCommand'](_0x345e2['id'],{'unitId':_0x1655d6[_0x201feb(0xd6)],'drawings':[{'unitId':_0x1655d6[_0x201feb(0xd6)],'subUnitId':_0x1655d6['subUnitId'],'drawingId':_0x1655d6[_0x201feb(0x112)],'drawingType':_0x55e5a0['DRAWING_CHART']}]}):Promise[_0x201feb(0xfd)](!0x1);}[_0x5586bc(0xe2)](){const _0x5331ae=_0x5586bc;let _0x526430=this['_worksheet']['getWorkbook'](),_0x528761=this[_0x5331ae(0xe7)][_0x5331ae(0xf1)]()[_0x5331ae(0x10b)](_0x5c9906);return{'unitId':_0x526430[_0x5331ae(0xd4)](),'subUnitId':this[_0x5331ae(0xe7)][_0x5331ae(0x11a)](),'workbook':_0x526430,'resolveAutoIsRowDirection':_0xb5a343=>_0x528761['getChartSuggestion'](_0xb5a343)[_0x5331ae(0xe9)]===_0x1b6364[_0x5331ae(0x117)]};}};function L(_0x5deb30){'@babel/helpers - typeof';const _0x14aa60=_0x5586bc;return L=typeof Symbol=='function'&&typeof Symbol[_0x14aa60(0x118)]==_0x14aa60(0x108)?function(_0x4fefa3){return typeof _0x4fefa3;}:function(_0x4169d8){const _0xc81122=_0x14aa60;return _0x4169d8&&typeof Symbol==_0xc81122(0x101)&&_0x4169d8['constructor']===Symbol&&_0x4169d8!==Symbol[_0xc81122(0xda)]?_0xc81122(0x108):typeof _0x4169d8;},L(_0x5deb30);}function R(_0x526975,_0x8acd5e){const _0xc23af3=_0x5586bc;if(L(_0x526975)!='object'||!_0x526975)return _0x526975;var _0x4310bb=_0x526975[Symbol[_0xc23af3(0x11b)]];if(_0x4310bb!==void 0x0){var _0x34ee99=_0x4310bb[_0xc23af3(0xe5)](_0x526975,_0x8acd5e||'default');if(L(_0x34ee99)!=_0xc23af3(0x115))return _0x34ee99;throw TypeError(_0xc23af3(0xe6));}return(_0x8acd5e===_0xc23af3(0xf2)?String:Number)(_0x526975);}function z(_0x4fb861){const _0xd9ffd5=_0x5586bc;var _0x3c3787=R(_0x4fb861,_0xd9ffd5(0xf2));return L(_0x3c3787)==_0xd9ffd5(0x108)?_0x3c3787:_0x3c3787+'';}function B(_0x507964,_0x470fbc,_0x160099){const _0x26677c=_0x5586bc;return(_0x470fbc=z(_0x470fbc))in _0x507964?Object[_0x26677c(0xd0)](_0x507964,_0x470fbc,{'value':_0x160099,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x507964[_0x470fbc]=_0x160099,_0x507964;}var V=class extends _0x467ed9{constructor(_0x2e1806,_0x2e48e3){const _0x5e04be=_0x5586bc;super(_0x2e1806,_0x5e04be(0xf0)),this[_0x5e04be(0x107)]=_0x2e48e3;}[_0x5586bc(0xec)](_0x347382){return this['rejectCommit']();}[_0x5586bc(0xee)](_0xd2da47){const _0xa4979b=_0x5586bc;return this[_0xa4979b(0x107)](_0xd2da47);}},H=class extends _0x4d21eb{constructor(_0xfcb647){const _0x1f186f=_0x5586bc;super(),this[_0x1f186f(0xe7)]=_0xfcb647,B(this,_0x1f186f(0xde),void 0x0),this['_commands']=new I(_0xfcb647);}[_0x5586bc(0xdb)](){const _0x2af19a=_0x5586bc;let _0x53f9d8=_0x5d2fa9(),_0x52f214={'id':_0x53f9d8,'type':_0xdb99c0,'series':{}},_0x11a722=new _0x5eef78(_0x53f9d8,_0x52f214,new V(_0x52f214,_0x1c3ae1=>new _0x5310b4({'unitId':this['_worksheet']['getWorkbook']()['getUnitId'](),'subUnitId':this[_0x2af19a(0xe7)][_0x2af19a(0x11a)](),'chartId':_0x53f9d8,'injector':this[_0x2af19a(0xe7)][_0x2af19a(0xf1)]()})[_0x2af19a(0xee)](_0x1c3ae1)));return P['create'](_0x11a722,_0x3b2230);}async['insert'](_0x4fe6ea){const _0x7aadb5=_0x5586bc;let _0x1a4160=_0x4fe6ea['describe']();if(!_0x1a4160['source'])throw Error(_0x7aadb5(0xef));let _0x29445f=_0x2aae71(_0x1a4160,_0x39f09e(_0x4fe6ea)),_0x45fda5=await this['_commands'][_0x7aadb5(0xdb)](_0x29445f);return this[_0x7aadb5(0x114)](_0x45fda5);}[_0x5586bc(0x10b)](_0x2a52b6){const _0x176fbc=_0x5586bc;let _0x332ec6=this[_0x176fbc(0xde)][_0x176fbc(0x10b)](_0x2a52b6);return _0x332ec6?this[_0x176fbc(0x114)](_0x332ec6):null;}[_0x5586bc(0xea)](){const _0x1c8116=_0x5586bc;return this[_0x1c8116(0xde)][_0x1c8116(0xea)]()[_0x1c8116(0xe4)](_0xae1ce6=>this[_0x1c8116(0x114)](_0xae1ce6));}[_0x5586bc(0xd7)](_0x2a8432){const _0x387a2d=_0x5586bc;return this[_0x387a2d(0xde)][_0x387a2d(0xd7)](typeof _0x2a8432=='string'?_0x2a8432:_0x2a8432[_0x387a2d(0x11d)]());}[_0x5586bc(0xd9)](_0x2cc202,_0x440a4e){const _0xfca26=_0x5586bc;this[_0xfca26(0xe7)]['getInject']()[_0xfca26(0x10b)](_0x226503)['registerTheme'](_0x2cc202,_0x440a4e);}[_0x5586bc(0x114)](_0x414ca2){const _0x45e2e9=_0x5586bc;let _0x91a146=new _0x5310b4({'unitId':_0x414ca2[_0x45e2e9(0xd6)],'subUnitId':_0x414ca2[_0x45e2e9(0xf9)],'chartId':_0x414ca2[_0x45e2e9(0x112)],'injector':this['_worksheet'][_0x45e2e9(0xf1)]()}),_0x43ed75=_0x91a146['describe'](),_0x1eb31a=new _0x5eef78(_0x414ca2['getId'](),_0x43ed75,_0x91a146),_0x12da4e=_0x34c17c(_0x43ed75[_0x45e2e9(0x109)]);return P[_0x45e2e9(0xdb)](_0x1eb31a,_0x12da4e);}},U=class extends _0x2fdd14{get[_0x5586bc(0x10f)](){return new H(this);}};_0x2fdd14['extend'](U);var W=class extends _0x24d80e{get[_0x5586bc(0x119)](){return _0x32fbb5;}};_0x24d80e['extend'](W);function _0x46bb(){const _0x5f71f5=['chartId','context','_wrap','object','transform','Row','iterator','ChartSourceOrientation','getSheetId','toPrimitive','_builder','getId','getSource','Failed\x20to\x20create\x20Sheet\x20chart.','config','getSubUnitId','defineProperty','setSize','setLayout','Error','getUnitId','series','unitId','remove','933858FuFNar','registerTheme','prototype','create','getUnitChartModels','executeCommand','_commands','18ipgazl','getRangeInfo','7fcsqSX','_sourceContext','179780SzsIhW','map','call','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_worksheet','324368YLzknr','orient','list','source','commitHost','exportImage','resolveSource','Sheet\x20chart\x20source\x20is\x20required\x20before\x20insert().','Insert\x20the\x20Sheet\x20chart\x20before\x20calling\x20commit().','getInject','string','5047552gByFtB','114208xzGHYp','dataSource','getChartModel','updateRange','5316543HMLOpk','subUnitId','filter','490820UBiVwu','size','resolve','_sheetBuilder','getCategoryData','_injector','function','rangeInfo','setAbsolutePosition','setSource','message','setPosition','_resolveSource','symbol','type','theme','get','ranges','has','category','charts','Invalid\x20Sheet\x20chart\x20source.','dataAggregation'];_0x46bb=function(){return _0x5f71f5;};return _0x46bb();}export{H as FSheetCharts};
|
|
1
|
+
const _0xb9d434=_0x4736;(function(_0x548a7d,_0x8b70c8){const _0x55d89d=_0x4736,_0x7ae91a=_0x548a7d();while(!![]){try{const _0x393b47=-parseInt(_0x55d89d(0xdc))/0x1*(parseInt(_0x55d89d(0xe5))/0x2)+parseInt(_0x55d89d(0xd0))/0x3*(parseInt(_0x55d89d(0xd9))/0x4)+-parseInt(_0x55d89d(0xd2))/0x5+parseInt(_0x55d89d(0x107))/0x6*(-parseInt(_0x55d89d(0xf8))/0x7)+parseInt(_0x55d89d(0x104))/0x8*(-parseInt(_0x55d89d(0xd4))/0x9)+-parseInt(_0x55d89d(0x103))/0xa*(parseInt(_0x55d89d(0xe8))/0xb)+parseInt(_0x55d89d(0xde))/0xc;if(_0x393b47===_0x8b70c8)break;else _0x7ae91a['push'](_0x7ae91a['shift']());}catch(_0x22fc90){_0x7ae91a['push'](_0x7ae91a['shift']());}}}(_0x2de3,0xa65e4));import{DataOrientation as _0x46746f,chartTypeToBits as _0x43b8f0,toChartModelConfig as _0x231b6c}from'@univerjs-pro/engine-chart';import{FChart as _0x2f0cc8,createChartBuilder as _0x3ec7a3}from'@univerjs-pro/engine-chart/facade';import{ChartDiagnosticSeverity as _0x262e7f,ChartSourceKind as _0x17b603,ChartSourceOrientation as _0x5cc9bf,InsertChartCommand as _0x405634,SheetChartConfigAdapter as _0x33fd5c,SheetsChartService as _0x131e9e,resolveInitialChartPosition as _0x459274,resolveSourceSeries as _0x7dbc78,resolveSourceSpec as _0x32e321}from'@univerjs-pro/sheets-chart';import{ICommandService as _0x18a423,generateRandomId as _0x961028}from'@univerjs/core';import{FWorksheet as _0x288439}from'@univerjs/sheets/facade';import{FEnum as _0x2087f4}from'@univerjs/core/facade';function _0x2de3(){const _0xe19a26=['severity','4zGNsoK','Invalid\x20Sheet\x20chart\x20source.','width','21881uxKSHa','Range','57697584uxeIwv','mapping','height','getRange','Row','message','insertChart','118nNKFCx','theme','orient','66srwrCO','join','kind','categoryIndex','ChartSourceOrientation','map','_chartSourceContext','_injector','extend','Error','ranges','dataSource','subUnitId','getInject','unitId','getSubUnitId','1295DkLpnq','dataAggregation','some','_createSheetAdapter','source','getUnitId','size','anchor','chartId','getRangeInfo','style','1550290ePjYFz','40lyYibi','executeCommand','getChartSuggestion','42702ucAYtP','Failed\x20to\x20create\x20Sheet\x20chart.','getChart','setPosition','context','filter','73761ejPmrv','Insert\x20the\x20Sheet\x20chart\x20before\x20updating\x20it.','482835fgmiJM','type','930438CSkENA','createInstance','get','commitHost'];_0x2de3=function(){return _0xe19a26;};return _0x2de3();}var v=class extends _0x2f0cc8{constructor(_0x24e567,_0x4230f9,_0x48809e,_0x417770){const _0x334130=_0x4736;super(_0x48809e,()=>new _0x33fd5c({'unitId':_0x24e567,'subUnitId':_0x4230f9,'chartId':_0x48809e,'injector':_0x417770}),(_0x33fcce,_0x42d867,_0x1b38e1)=>_0x3ec7a3({'info':_0x33fcce,'description':_0x42d867,'type':_0x1b38e1,'normalizeSource':_0x348064=>_0x348064,'extension':({setInfo:_0x57839f})=>({'setPosition'(_0x1347fb){const _0x548b52=_0x4736;return _0x57839f(_0x548b52(0xff),_0x1347fb),this;}})}),_0x417770),this[_0x334130(0xf6)]=_0x24e567,this[_0x334130(0xf4)]=_0x4230f9,this[_0x334130(0x100)]=_0x48809e;}[_0xb9d434(0xe1)](){const _0x2133b2=_0xb9d434;var _0x2858fa;return(_0x2858fa=this[_0x2133b2(0xef)][_0x2133b2(0xd6)](_0x131e9e)['getChartModel'](this[_0x2133b2(0x100)]))==null?void 0x0:_0x2858fa[_0x2133b2(0xf3)][_0x2133b2(0x101)]();}[_0xb9d434(0x10a)](_0x5ae9ff){const _0x30eb86=_0xb9d434;return this[_0x30eb86(0xfb)]()[_0x30eb86(0xd7)]({'layout':{'anchor':_0x5ae9ff}}),this;}[_0xb9d434(0xfb)](){const _0x28f427=_0xb9d434;return new _0x33fd5c({'unitId':this[_0x28f427(0xf6)],'subUnitId':this[_0x28f427(0xf4)],'chartId':this[_0x28f427(0x100)],'injector':this[_0x28f427(0xef)]});}},y=class extends _0x288439{['newChart'](_0x3c2b18){const _0x44c790=_0xb9d434;return _0x3ec7a3({'type':_0x3c2b18,'injector':this[_0x44c790(0xef)],'commitError':_0x44c790(0xd1),'normalizeSource':_0x7e15cb=>_0x7e15cb,'createInfo':()=>({'anchor':void 0x0}),'extension':({setInfo:_0x157179})=>({'setPosition'(_0x3469e5){const _0x9af2cb=_0x44c790;return _0x157179(_0x9af2cb(0xff),_0x3469e5),this;}})});}async[_0xb9d434(0xe4)](_0x5d9cec){const _0x3c1934=_0xb9d434;var _0x574252,_0x5ac4ac,_0x2bea6c;let {config:_0xa7b634,dataSource:_0x5e794c,anchor:_0x177ef3,position:_0x34c5f8,size:_0x1fc85d}=_0x5d9cec,_0x21547d={..._0xa7b634,'source':_0x5e794c,'anchor':_0x177ef3,'position':_0x34c5f8,'size':_0x1fc85d},_0x40bb2d=this['_chartSourceContext'](),_0x5ace14=[],_0x27c70f=_0x32e321(_0x21547d[_0x3c1934(0xfc)],_0x40bb2d,_0x5ace14);if(!_0x27c70f||_0x5ace14[_0x3c1934(0xfa)](_0x4167b7=>_0x4167b7[_0x3c1934(0xd8)]===_0x262e7f[_0x3c1934(0xf1)]))throw Error(_0x5ace14[_0x3c1934(0xed)](_0x1002ae=>_0x1002ae[_0x3c1934(0xe3)])[_0x3c1934(0xe9)](';\x20')||_0x3c1934(0xda));let _0x322abd=_0x961028(),_0x20fbd1=_0x231b6c(_0x21547d,{'series':_0x7dbc78(_0x27c70f,_0x40bb2d,((_0x574252=_0x21547d[_0x3c1934(0xdf)])==null?void 0x0:_0x574252[_0x3c1934(0xeb)])??0x0)}),_0x2bf9fa=_0x459274({'unitId':_0x40bb2d[_0x3c1934(0xf6)],'subUnitId':_0x40bb2d[_0x3c1934(0xf4)],'injector':this[_0x3c1934(0xf5)]()},_0x21547d,_0x5ace14),_0x53fc41={'unitId':_0x40bb2d[_0x3c1934(0xf6)],'subUnitId':_0x40bb2d[_0x3c1934(0xf4)],'chartId':_0x322abd,'chartType':_0x43b8f0(_0x21547d[_0x3c1934(0xd3)]),'source':_0x27c70f[_0x3c1934(0xea)]===_0x17b603[_0x3c1934(0xdd)]?_0x27c70f['rangeInfo']:_0x27c70f[_0x3c1934(0xf2)],'position':_0x2bf9fa,'width':(_0x5ac4ac=_0x21547d[_0x3c1934(0xfe)])==null?void 0x0:_0x5ac4ac[_0x3c1934(0xdb)],'height':(_0x2bea6c=_0x21547d[_0x3c1934(0xfe)])==null?void 0x0:_0x2bea6c[_0x3c1934(0xe0)],'theme':_0x21547d[_0x3c1934(0xe6)]??void 0x0,'config':{'unitId':_0x40bb2d[_0x3c1934(0xf6)],'chartModelId':_0x322abd,'style':_0x20fbd1[_0x3c1934(0x102)],'context':_0x20fbd1[_0x3c1934(0xce)],'dataAggregation':_0x20fbd1[_0x3c1934(0xf9)]}};if(!await this[_0x3c1934(0xf5)]()[_0x3c1934(0xd6)](_0x18a423)[_0x3c1934(0x105)](_0x405634['id'],_0x53fc41))throw Error(_0x3c1934(0x108));return this[_0x3c1934(0xef)][_0x3c1934(0xd5)](v,_0x40bb2d['unitId'],_0x40bb2d[_0x3c1934(0xf4)],_0x322abd,this[_0x3c1934(0xef)]);}[_0xb9d434(0x109)](_0x3c7a1c){const _0x1d05d4=_0xb9d434;let {unitId:_0x275e78,subUnitId:_0x507b2f}=this['_chartSourceContext'](),_0x4153c5=this[_0x1d05d4(0xf5)]()[_0x1d05d4(0xd6)](_0x131e9e);return _0x4153c5['getChartModel'](_0x3c7a1c)&&_0x4153c5[_0x1d05d4(0xf7)](_0x275e78,_0x3c7a1c)===_0x507b2f?this[_0x1d05d4(0xef)][_0x1d05d4(0xd5)](v,_0x275e78,_0x507b2f,_0x3c7a1c,this[_0x1d05d4(0xef)]):null;}['getCharts'](){const _0x5c828d=_0xb9d434;let {unitId:_0x52be60,subUnitId:_0x14a598}=this['_chartSourceContext']();return this['getInject']()[_0x5c828d(0xd6)](_0x131e9e)['getUnitChartModels'](_0x52be60,_0x14a598)[_0x5c828d(0xcf)](Boolean)[_0x5c828d(0xed)](_0x4b8942=>this[_0x5c828d(0xef)][_0x5c828d(0xd5)](v,_0x52be60,_0x14a598,_0x4b8942['id'],this['_injector']));}[_0xb9d434(0xee)](){const _0x16d42e=_0xb9d434;let _0x3e942b=this['getWorkbook'](),_0x55ecec=this[_0x16d42e(0xf5)]()[_0x16d42e(0xd6)](_0x131e9e);return{'unitId':_0x3e942b[_0x16d42e(0xfd)](),'subUnitId':this['getSheetId'](),'workbook':_0x3e942b,'resolveAutoIsRowDirection':_0x401d2a=>_0x55ecec[_0x16d42e(0x106)](_0x401d2a)[_0x16d42e(0xe7)]===_0x46746f[_0x16d42e(0xe2)]};}};_0x288439[_0xb9d434(0xf0)](y);var b=class extends _0x2087f4{get[_0xb9d434(0xec)](){return _0x5cc9bf;}};_0x2087f4[_0xb9d434(0xf0)](b);function _0x4736(_0xc51aab,_0x26ff26){_0xc51aab=_0xc51aab-0xce;const _0x2de3c1=_0x2de3();let _0x473639=_0x2de3c1[_0xc51aab];return _0x473639;}export{v as FSheetChart};
|