@univerjs-pro/sheets-chart 1.0.0-insiders.20260809-70eefdd → 1.0.0-rc.0
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} +20 -8
- package/lib/types/chart-builder/sheet-chart-source.d.ts +7 -4
- package/lib/types/chart-builder/types.d.ts +23 -7
- package/lib/types/chart-source/category-span-projection.d.ts +10 -0
- package/lib/types/chart-source/chart-context-lifecycle.d.ts +6 -0
- package/lib/types/chart-source/chart-source-header.d.ts +24 -0
- package/lib/types/chart-source/chart-source-key.d.ts +5 -0
- package/lib/types/chart-source/chart-source.d.ts +24 -30
- package/lib/types/chart-source/initial-chart-context.d.ts +7 -0
- package/lib/types/chart-source/initial-sheet-chart-source-inference.d.ts +41 -0
- package/lib/types/chart-source/sheet-chart-source-table.d.ts +17 -0
- package/lib/types/chart-source/source-util.d.ts +10 -16
- package/lib/types/commands/chart-persisted-context.d.ts +1 -1
- package/lib/types/commands/mutations/sheets-chart.mutation.d.ts +9 -7
- package/lib/types/common/util.d.ts +0 -1
- package/lib/types/config/config.d.ts +1 -4
- package/lib/types/controllers/sheets-chart.controller.d.ts +3 -1
- 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 +6 -8
- package/lib/types/locale/en-US.d.ts +3 -1
- package/lib/types/models/types.d.ts +27 -28
- package/lib/types/services/chart-model.service.d.ts +13 -14
- package/lib/types/services/sheet-chart-data-source-manager.d.ts +28 -0
- package/lib/types/services/sheet-chart-range-watcher-manager.d.ts +23 -0
- package/lib/types/services/sheets-chart.service.d.ts +24 -23
- 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 +12 -11
- 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/sheet-chart-command-adapter.d.ts +0 -13
- package/lib/types/facade/f-worksheet-charts.d.ts +0 -12
- package/lib/types/services/sheet-chart-range-watcher.d.ts +0 -22
package/lib/cjs/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x16c8e3=_0x1f56;(function(_0x33c98c,_0x4000d7){const _0x21f7b1=_0x1f56,_0x36cfff=_0x33c98c();while(!![]){try{const _0x35af35=-parseInt(_0x21f7b1(0x223))/0x1*(-parseInt(_0x21f7b1(0x208))/0x2)+parseInt(_0x21f7b1(0x1d2))/0x3+-parseInt(_0x21f7b1(0x1d8))/0x4+parseInt(_0x21f7b1(0x1fd))/0x5+parseInt(_0x21f7b1(0x1ea))/0x6*(parseInt(_0x21f7b1(0x1df))/0x7)+-parseInt(_0x21f7b1(0x20f))/0x8+-parseInt(_0x21f7b1(0x215))/0x9;if(_0x35af35===_0x4000d7)break;else _0x36cfff['push'](_0x36cfff['shift']());}catch(_0x4a358b){_0x36cfff['push'](_0x36cfff['shift']());}}}(_0x217b,0xe05ed),Object['defineProperty'](exports,Symbol[_0x16c8e3(0x1bb)],{'value':_0x16c8e3(0x1ed)}));let e=require('@univerjs/sheets/facade'),t=require('@univerjs-pro/engine-chart'),n=require('@univerjs-pro/engine-chart/facade'),r=require('@univerjs-pro/sheets-chart'),i=require('@univerjs/core'),a=require('@univerjs/sheets-drawing'),o=require('@univerjs/core/facade');function s(_0x3a1c7f){const _0x3b8a2d=_0x16c8e3;return class extends _0x3a1c7f{get[_0x3b8a2d(0x1c0)](){return this['_builder'];}[_0x3b8a2d(0x1ff)](_0x4f9052){const _0x3f0e31=_0x3b8a2d;return this[_0x3f0e31(0x1c0)][_0x3f0e31(0x1ff)](_0x4f9052),this;}[_0x3b8a2d(0x1fb)](){const _0x59fd19=_0x3b8a2d;return this[_0x59fd19(0x1c0)][_0x59fd19(0x1fb)]();}[_0x3b8a2d(0x1e4)](_0x4fd0cb){const _0x3de6dd=_0x3b8a2d;return this['_sheetBuilder'][_0x3de6dd(0x207)]({'anchor':_0x4fd0cb}),this;}['setAbsolutePosition'](_0x423e95,_0x55855f){const _0x387de5=_0x3b8a2d;return this[_0x387de5(0x1c0)][_0x387de5(0x207)]({'position':{'x':_0x423e95,'y':_0x55855f}}),this;}[_0x3b8a2d(0x1db)](_0x29d276,_0x53ff28){const _0x3d9595=_0x3b8a2d;return this[_0x3d9595(0x1c0)][_0x3d9595(0x207)]({'size':{'width':_0x29d276,'height':_0x53ff28}}),this;}};}const c=new n[(_0x16c8e3(0x20c))](_0xc1408d=>s(_0xc1408d));var l=class{constructor(_0x158515,_0x141deb,_0x2b739b,_0x1acf0b){const _0x48ba22=_0x16c8e3;this[_0x48ba22(0x1f5)]=_0x158515,this[_0x48ba22(0x1bc)]=_0x141deb,this['chartId']=_0x2b739b,this[_0x48ba22(0x20b)]=_0x1acf0b;}['getChartId'](){const _0x2bdc5a=_0x16c8e3;return this[_0x2bdc5a(0x212)];}['getId'](){return this['chartId'];}['getRange'](){const _0x1e357a=_0x16c8e3;var _0x1f8df3;return(_0x1f8df3=this[_0x1e357a(0x20b)]['get'](r[_0x1e357a(0x1e6)])[_0x1e357a(0x1fa)](this[_0x1e357a(0x212)]))==null?void 0x0:_0x1f8df3[_0x1e357a(0x1fe)]['getRangeInfo']();}[_0x16c8e3(0x1c1)](_0x4509bc){const _0x3974de=_0x16c8e3;return this[_0x3974de(0x20b)]['get'](i[_0x3974de(0x1f0)])['executeCommand'](r['ChartUpdateSourceCommand']['id'],{'unitId':this[_0x3974de(0x1f5)],'chartModelId':this[_0x3974de(0x212)],'range':_0x4509bc});}['getSeriesData'](){const _0x374b8f=_0x16c8e3;var _0x55bbcf;return(_0x55bbcf=this[_0x374b8f(0x20b)][_0x374b8f(0x1d9)](r['SheetsChartService'])[_0x374b8f(0x1fa)](this[_0x374b8f(0x212)]))==null||(_0x55bbcf=_0x55bbcf['config'])==null?void 0x0:_0x55bbcf[_0x374b8f(0x1cf)];}[_0x16c8e3(0x205)](){const _0x48684a=_0x16c8e3;var _0x239df2;return(_0x239df2=this[_0x48684a(0x20b)][_0x48684a(0x1d9)](r[_0x48684a(0x1e6)])[_0x48684a(0x1fa)](this[_0x48684a(0x212)]))==null||(_0x239df2=_0x239df2[_0x48684a(0x206)])==null?void 0x0:_0x239df2[_0x48684a(0x1f7)];}async['exportImage'](_0x13ecfd){const _0x4d15a0=_0x16c8e3;return new r[(_0x4d15a0(0x1e9))]({'unitId':this['unitId'],'subUnitId':this['subUnitId'],'chartId':this[_0x4d15a0(0x212)],'injector':this['_injector']})[_0x4d15a0(0x21b)](_0x13ecfd);}[_0x16c8e3(0x1f2)](){const _0x2e0eaf=_0x16c8e3;return this['_injector']['get'](i[_0x2e0eaf(0x1f0)])['executeCommand'](a[_0x2e0eaf(0x1d3)]['id'],{'unitId':this[_0x2e0eaf(0x1f5)],'drawings':[{'unitId':this[_0x2e0eaf(0x1f5)],'subUnitId':this[_0x2e0eaf(0x1bc)],'drawingId':this[_0x2e0eaf(0x212)],'drawingType':i[_0x2e0eaf(0x1c5)]['DRAWING_CHART']}]});}},u=class{constructor(_0x29cb4d){this['_worksheet']=_0x29cb4d;}async[_0x16c8e3(0x1c4)](_0x445678){const _0x2f2892=_0x16c8e3;var _0x5c58e6,_0x379a8b,_0x3297b0;let _0x380829=this[_0x2f2892(0x1dd)](),_0x5419a2=[],_0x3fc439=(0x0,r['resolveSourceSpec'])(_0x445678[_0x2f2892(0x1d0)],_0x380829,_0x5419a2);if(!_0x3fc439||_0x5419a2['some'](_0x133962=>_0x133962[_0x2f2892(0x209)]===r['ChartDiagnosticSeverity']['Error']))throw Error(_0x5419a2[_0x2f2892(0x21f)](_0x4b6e94=>_0x4b6e94[_0x2f2892(0x1c8)])[_0x2f2892(0x20a)](';\x20')||_0x2f2892(0x1eb));let _0x1c01c6=(0x0,i[_0x2f2892(0x221)])(),_0x4ac1ff=(0x0,t[_0x2f2892(0x1e8)])(_0x445678,{'series':(0x0,r[_0x2f2892(0x21e)])(_0x3fc439,_0x380829,((_0x5c58e6=_0x445678[_0x2f2892(0x1e7)])==null?void 0x0:_0x5c58e6[_0x2f2892(0x203)])??0x0)}),_0x294009=(0x0,r[_0x2f2892(0x20d)])({'unitId':_0x380829[_0x2f2892(0x1f5)],'subUnitId':_0x380829[_0x2f2892(0x1bc)],'injector':this[_0x2f2892(0x213)][_0x2f2892(0x1da)]()},_0x445678,_0x5419a2),_0x35763a={'unitId':_0x380829[_0x2f2892(0x1f5)],'subUnitId':_0x380829[_0x2f2892(0x1bc)],'chartId':_0x1c01c6,'chartType':(0x0,t[_0x2f2892(0x219)])(_0x445678[_0x2f2892(0x1c7)]),'source':_0x3fc439['kind']===r[_0x2f2892(0x220)][_0x2f2892(0x1ef)]?_0x3fc439['rangeInfo']:_0x3fc439[_0x2f2892(0x211)],'position':_0x294009,'width':(_0x379a8b=_0x445678[_0x2f2892(0x1ec)])==null?void 0x0:_0x379a8b[_0x2f2892(0x1e5)],'height':(_0x3297b0=_0x445678[_0x2f2892(0x1ec)])==null?void 0x0:_0x3297b0[_0x2f2892(0x1b9)],'theme':_0x445678[_0x2f2892(0x1ca)]??void 0x0,'config':{'unitId':_0x380829['unitId'],'chartModelId':_0x1c01c6,'style':_0x4ac1ff['style'],'context':_0x4ac1ff[_0x2f2892(0x1e1)],'dataAggregation':_0x4ac1ff[_0x2f2892(0x1e0)]}};if(!await this[_0x2f2892(0x213)][_0x2f2892(0x1da)]()[_0x2f2892(0x1d9)](i[_0x2f2892(0x1f0)])[_0x2f2892(0x1cb)](r[_0x2f2892(0x1de)]['id'],_0x35763a))throw Error('Failed\x20to\x20create\x20Sheet\x20chart.');return new l(_0x380829[_0x2f2892(0x1f5)],_0x380829[_0x2f2892(0x1bc)],_0x1c01c6,this[_0x2f2892(0x213)][_0x2f2892(0x1da)]());}[_0x16c8e3(0x1d9)](_0x606094){const _0x4c8c48=_0x16c8e3;let {unitId:_0x4ae44b,subUnitId:_0x2a6796}=this[_0x4c8c48(0x1dd)](),_0x2c21e6=this[_0x4c8c48(0x213)][_0x4c8c48(0x1da)]()[_0x4c8c48(0x1d9)](r[_0x4c8c48(0x1e6)]);return _0x2c21e6[_0x4c8c48(0x1fa)](_0x606094)&&_0x2c21e6['getSubUnitId'](_0x4ae44b,_0x606094)===_0x2a6796?new l(_0x4ae44b,_0x2a6796,_0x606094,this['_worksheet'][_0x4c8c48(0x1da)]()):null;}[_0x16c8e3(0x1f9)](){const _0x1334bd=_0x16c8e3;let {unitId:_0x1a8a08,subUnitId:_0x1c3b61}=this[_0x1334bd(0x1dd)]();return this['_worksheet'][_0x1334bd(0x1da)]()[_0x1334bd(0x1d9)](r[_0x1334bd(0x1e6)])['getUnitChartModels'](_0x1a8a08,_0x1c3b61)[_0x1334bd(0x1d1)](Boolean)['map'](_0x1089b5=>new l(_0x1a8a08,_0x1c3b61,_0x1089b5['id'],this['_worksheet'][_0x1334bd(0x1da)]()));}[_0x16c8e3(0x1f2)](_0x478020){const _0x3fce54=_0x16c8e3;let _0x47ce3d=typeof _0x478020==_0x3fce54(0x201)?this[_0x3fce54(0x1d9)](_0x478020):_0x478020;return _0x47ce3d?this['_worksheet']['getInject']()[_0x3fce54(0x1d9)](i[_0x3fce54(0x1f0)])['executeCommand'](a[_0x3fce54(0x1d3)]['id'],{'unitId':_0x47ce3d['unitId'],'drawings':[{'unitId':_0x47ce3d[_0x3fce54(0x1f5)],'subUnitId':_0x47ce3d[_0x3fce54(0x1bc)],'drawingId':_0x47ce3d['chartId'],'drawingType':i['DrawingTypeEnum'][_0x3fce54(0x1f4)]}]}):Promise['resolve'](!0x1);}['_sourceContext'](){const _0x3a6fba=_0x16c8e3;let _0x58e3c2=this[_0x3a6fba(0x213)][_0x3a6fba(0x218)](),_0x4b6804=this['_worksheet']['getInject']()['get'](r[_0x3a6fba(0x1e6)]);return{'unitId':_0x58e3c2[_0x3a6fba(0x224)](),'subUnitId':this['_worksheet'][_0x3a6fba(0x21a)](),'workbook':_0x58e3c2,'resolveAutoIsRowDirection':_0x1abf4d=>_0x4b6804[_0x3a6fba(0x1dc)](_0x1abf4d)[_0x3a6fba(0x1ce)]===t[_0x3a6fba(0x1f1)]['Row']};}};function d(_0x15276d){'@babel/helpers - typeof';const _0x101a09=_0x16c8e3;return d=typeof Symbol==_0x101a09(0x1d6)&&typeof Symbol[_0x101a09(0x222)]==_0x101a09(0x20e)?function(_0xb7d551){return typeof _0xb7d551;}:function(_0x28e19d){const _0x5b08dd=_0x101a09;return _0x28e19d&&typeof Symbol==_0x5b08dd(0x1d6)&&_0x28e19d[_0x5b08dd(0x1d4)]===Symbol&&_0x28e19d!==Symbol[_0x5b08dd(0x202)]?'symbol':typeof _0x28e19d;},d(_0x15276d);}function f(_0x31c6fb,_0x3cf148){const _0x5b8cf4=_0x16c8e3;if(d(_0x31c6fb)!=_0x5b8cf4(0x1bd)||!_0x31c6fb)return _0x31c6fb;var _0xa833ed=_0x31c6fb[Symbol[_0x5b8cf4(0x1cc)]];if(_0xa833ed!==void 0x0){var _0x4e8263=_0xa833ed[_0x5b8cf4(0x1ba)](_0x31c6fb,_0x3cf148||_0x5b8cf4(0x214));if(d(_0x4e8263)!=_0x5b8cf4(0x1bd))return _0x4e8263;throw TypeError(_0x5b8cf4(0x1b8));}return(_0x3cf148===_0x5b8cf4(0x201)?String:Number)(_0x31c6fb);}function p(_0x28dc33){const _0x58958d=_0x16c8e3;var _0x46019a=f(_0x28dc33,_0x58958d(0x201));return d(_0x46019a)==_0x58958d(0x20e)?_0x46019a:_0x46019a+'';}function _0x217b(){const _0x20d781=['updateRange','commitHost','SheetChartBuilder','create','DrawingTypeEnum','extend','type','message','registerTheme','theme','executeCommand','toPrimitive','FChartBuilderBase','orient','series','source','filter','4615638ojgqSC','RemoveSheetDrawingCommand','constructor','describe','function','charts','4850216cCJKfV','get','getInject','setSize','getChartSuggestion','_sourceContext','InsertChartCommand','7VnCDMl','dataAggregation','context','insert','getChartBuilderPendingConfig','setPosition','width','SheetsChartService','mapping','toChartModelConfig','SheetChartBuilderAdapter','886488MXTemj','Invalid\x20Sheet\x20chart\x20source.','size','Module','toSheetChartCreateSpec','Range','ICommandService','DataOrientation','remove','_wrap','DRAWING_CHART','unitId','getChartBuilderConstructor','category','_commands','list','getChartModel','getSource','DEFAULT_CHART_TYPE','2626535FrhQfl','dataSource','setSource','defineProperty','string','prototype','categoryIndex','ChartSourceOrientation','getCategoryData','config','setLayout','2DIzYEk','severity','join','_injector','HostBuilderComposer','resolveInitialChartPosition','symbol','3240368XWRXLn','rejectCommit','ranges','chartId','_worksheet','default','4913874thYzLT','_resolveSource','getId','getWorkbook','chartTypeToBits','getSheetId','exportImage','ChartThemeService','FWorksheet','resolveSourceSeries','map','ChartSourceKind','generateRandomId','iterator','871006JKoMpU','getUnitId','FEnum','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','height','call','toStringTag','subUnitId','object','FChartsBase','resolveSource','_sheetBuilder'];_0x217b=function(){return _0x20d781;};return _0x217b();}function m(_0x8add39,_0x25246d,_0x2b34a3){const _0x42aa6e=_0x16c8e3;return(_0x25246d=p(_0x25246d))in _0x8add39?Object[_0x42aa6e(0x200)](_0x8add39,_0x25246d,{'value':_0x2b34a3,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x8add39[_0x25246d]=_0x2b34a3,_0x8add39;}var h=class extends t['DetachedChartBuilderAdapter']{constructor(_0x3d8fcd,_0x3b9cec,_0x1868c9){const _0x1a6240=_0x16c8e3;super(_0x3d8fcd,'Insert\x20the\x20Sheet\x20chart\x20before\x20calling\x20commit().',_0x1868c9),this[_0x1a6240(0x216)]=_0x3b9cec;}[_0x16c8e3(0x1c2)](_0x424a3f){const _0x557e55=_0x16c8e3;return this[_0x557e55(0x210)]();}[_0x16c8e3(0x1bf)](_0x584cb4){return this['_resolveSource'](_0x584cb4);}},g=class extends n[_0x16c8e3(0x1be)]{constructor(_0x2c8ff6){const _0x9b7cc3=_0x16c8e3;super(),this[_0x9b7cc3(0x213)]=_0x2c8ff6,m(this,'_commands',void 0x0),this['_commands']=new u(_0x2c8ff6);}[_0x16c8e3(0x1c4)](){const _0x356179=_0x16c8e3;let _0x184696=(0x0,i['generateRandomId'])(),_0x15db01={'id':_0x184696,'type':t[_0x356179(0x1fc)],'series':{}},_0x29a9bd=this[_0x356179(0x213)][_0x356179(0x1da)](),_0x17784c=new r[(_0x356179(0x1c3))](_0x184696,_0x15db01,new h(_0x15db01,_0x4fa532=>new r[(_0x356179(0x1e9))]({'unitId':this[_0x356179(0x213)][_0x356179(0x218)]()[_0x356179(0x224)](),'subUnitId':this[_0x356179(0x213)][_0x356179(0x21a)](),'chartId':_0x184696,'injector':_0x29a9bd})[_0x356179(0x1bf)](_0x4fa532),_0x29a9bd));return c[_0x356179(0x1c4)](_0x17784c,n[_0x356179(0x1cd)]);}async[_0x16c8e3(0x1e2)](_0x14ff89){const _0x419ec7=_0x16c8e3;let _0x45abe6=_0x14ff89['describe']();if(!_0x45abe6[_0x419ec7(0x1d0)])throw Error('Sheet\x20chart\x20source\x20is\x20required\x20before\x20insert().');let _0x1baabe=(0x0,r[_0x419ec7(0x1ee)])(_0x45abe6,(0x0,n[_0x419ec7(0x1e3)])(_0x14ff89)),_0x50c10f=await this['_commands']['create'](_0x1baabe);return this[_0x419ec7(0x1f3)](_0x50c10f);}['get'](_0x3d8b71){const _0x111474=_0x16c8e3;let _0x243c70=this[_0x111474(0x1f8)][_0x111474(0x1d9)](_0x3d8b71);return _0x243c70?this[_0x111474(0x1f3)](_0x243c70):null;}[_0x16c8e3(0x1f9)](){const _0x4be2ed=_0x16c8e3;return this['_commands'][_0x4be2ed(0x1f9)]()['map'](_0x575896=>this[_0x4be2ed(0x1f3)](_0x575896));}[_0x16c8e3(0x1f2)](_0x5033e1){const _0x37af42=_0x16c8e3;return this[_0x37af42(0x1f8)]['remove'](typeof _0x5033e1==_0x37af42(0x201)?_0x5033e1:_0x5033e1[_0x37af42(0x217)]());}[_0x16c8e3(0x1c9)](_0x207922,_0x18f69c){const _0x425df5=_0x16c8e3;this[_0x425df5(0x213)][_0x425df5(0x1da)]()[_0x425df5(0x1d9)](t[_0x425df5(0x21c)])[_0x425df5(0x1c9)](_0x207922,_0x18f69c);}[_0x16c8e3(0x1f3)](_0x3e903e){const _0x22c7e8=_0x16c8e3;let _0x914f53=new r[(_0x22c7e8(0x1e9))]({'unitId':_0x3e903e[_0x22c7e8(0x1f5)],'subUnitId':_0x3e903e[_0x22c7e8(0x1bc)],'chartId':_0x3e903e[_0x22c7e8(0x212)],'injector':this[_0x22c7e8(0x213)][_0x22c7e8(0x1da)]()}),_0xcbf8da=_0x914f53[_0x22c7e8(0x1d5)](),_0x465016=new r[(_0x22c7e8(0x1c3))](_0x3e903e['getId'](),_0xcbf8da,_0x914f53),_0x510520=(0x0,n[_0x22c7e8(0x1f6)])(_0xcbf8da[_0x22c7e8(0x1c7)]);return c[_0x22c7e8(0x1c4)](_0x465016,_0x510520);}},_=class extends e[_0x16c8e3(0x21d)]{get[_0x16c8e3(0x1d7)](){return new g(this);}};function _0x1f56(_0x1e04d9,_0x4982f8){_0x1e04d9=_0x1e04d9-0x1b7;const _0x217b73=_0x217b();let _0x1f561d=_0x217b73[_0x1e04d9];return _0x1f561d;}e['FWorksheet']['extend'](_);var v=class extends o[_0x16c8e3(0x1b7)]{get[_0x16c8e3(0x204)](){return r['ChartSourceOrientation'];}};o['FEnum'][_0x16c8e3(0x1c6)](v),exports['FSheetCharts']=g;
|
|
1
|
+
const _0x301d8b=_0x3f8b;(function(_0x36710b,_0x2d583e){const _0x1224ad=_0x3f8b,_0x25365d=_0x36710b();while(!![]){try{const _0x4374dc=-parseInt(_0x1224ad(0x157))/0x1*(-parseInt(_0x1224ad(0x181))/0x2)+parseInt(_0x1224ad(0x167))/0x3*(-parseInt(_0x1224ad(0x14d))/0x4)+-parseInt(_0x1224ad(0x153))/0x5*(-parseInt(_0x1224ad(0x145))/0x6)+-parseInt(_0x1224ad(0x171))/0x7*(-parseInt(_0x1224ad(0x162))/0x8)+-parseInt(_0x1224ad(0x169))/0x9*(parseInt(_0x1224ad(0x13d))/0xa)+parseInt(_0x1224ad(0x175))/0xb*(-parseInt(_0x1224ad(0x174))/0xc)+-parseInt(_0x1224ad(0x161))/0xd;if(_0x4374dc===_0x2d583e)break;else _0x25365d['push'](_0x25365d['shift']());}catch(_0x53c58a){_0x25365d['push'](_0x25365d['shift']());}}}(_0x1ebe,0x61f23),Object[_0x301d8b(0x170)](exports,Symbol[_0x301d8b(0x186)],{'value':_0x301d8b(0x17f)}));let e=require('@univerjs-pro/engine-chart'),t=require('@univerjs-pro/engine-chart/facade'),n=require('@univerjs-pro/sheets-chart'),r=require('@univerjs/core'),i=require('@univerjs/sheets/facade'),a=require('@univerjs/core/facade');var o=class extends t['FChart']{constructor(_0x5926e0,_0x1a0661,_0x2ee9f3,_0x1a1daa){const _0x3094ec=_0x301d8b;super(_0x2ee9f3,()=>new n[(_0x3094ec(0x142))]({'unitId':_0x5926e0,'subUnitId':_0x1a0661,'chartId':_0x2ee9f3,'injector':_0x1a1daa}),(_0x356df9,_0x498d9b,_0x4f0cc9)=>(0x0,t[_0x3094ec(0x148)])({'info':_0x356df9,'description':_0x498d9b,'type':_0x4f0cc9,'normalizeSource':_0x2b9e1d=>_0x2b9e1d,'extension':({setInfo:_0x11276e})=>({'setPosition'(_0x38de53){const _0x546f95=_0x3094ec;return _0x11276e(_0x546f95(0x185),_0x38de53),this;}})}),_0x1a1daa),this[_0x3094ec(0x14c)]=_0x5926e0,this[_0x3094ec(0x143)]=_0x1a0661,this[_0x3094ec(0x16f)]=_0x2ee9f3;}[_0x301d8b(0x140)](){const _0x14238e=_0x301d8b;let _0x202379=this[_0x14238e(0x16c)][_0x14238e(0x17e)](n['SheetsChartService'])['getChartSourceSpec'](this[_0x14238e(0x16f)]);return _0x202379&&!Array['isArray'](_0x202379)?_0x202379:void 0x0;}[_0x301d8b(0x13c)](_0x1daec4){const _0x3e241d=_0x301d8b;return this[_0x3e241d(0x180)]()['commitHost']({'layout':{'anchor':_0x1daec4}}),this;}async[_0x301d8b(0x16a)](_0x493eec){const _0x36c86d=_0x301d8b;this[_0x36c86d(0x180)]()[_0x36c86d(0x16a)](_0x493eec);}[_0x301d8b(0x180)](){const _0x21e0a4=_0x301d8b;return new n[(_0x21e0a4(0x142))]({'unitId':this[_0x21e0a4(0x14c)],'subUnitId':this[_0x21e0a4(0x143)],'chartId':this['chartId'],'injector':this[_0x21e0a4(0x16c)]});}},s=class extends i['FWorksheet']{[_0x301d8b(0x156)](_0x3eb762){const _0x33b37f=_0x301d8b;return(0x0,t[_0x33b37f(0x148)])({'type':_0x3eb762,'injector':this[_0x33b37f(0x16c)],'commitError':_0x33b37f(0x13f),'normalizeSource':_0x14ebc7=>_0x14ebc7,'createInfo':()=>({'anchor':void 0x0}),'extension':({setInfo:_0xc8253f})=>({'setPosition'(_0x30b7fb){return _0xc8253f('anchor',_0x30b7fb),this;}})});}async[_0x301d8b(0x15f)](_0x1f210c){const _0x88673e=_0x301d8b;var _0x346408,_0x51d904,_0x1ffb63;let {config:_0x25705f,dataSource:_0x1374ea,anchor:_0x2012ee,position:_0x3142d4,size:_0x3085ad}=_0x1f210c,_0x5a18a3={..._0x25705f,'source':_0x1374ea,'anchor':_0x2012ee,'position':_0x3142d4,'size':_0x3085ad},_0x49b285=(0x0,e[_0x88673e(0x155)])(_0x5a18a3[_0x88673e(0x146)]),_0x595d00=this[_0x88673e(0x17b)](_0x49b285),_0x46eac7=[],_0x256b94=(0x0,n[_0x88673e(0x172)])(_0x5a18a3[_0x88673e(0x178)],_0x595d00,_0x46eac7);if(!_0x256b94||_0x46eac7[_0x88673e(0x14a)](_0x2b30db=>_0x2b30db[_0x88673e(0x13e)]===n['ChartDiagnosticSeverity'][_0x88673e(0x159)]))throw Error(_0x46eac7[_0x88673e(0x144)](_0x3f6f3f=>_0x3f6f3f[_0x88673e(0x17c)])['join'](';\x20')||_0x88673e(0x176));let _0x327b91=(0x0,r[_0x88673e(0x151)])(),_0x3773b6=(0x0,e[_0x88673e(0x168)])(_0x5a18a3,{'series':(0x0,n[_0x88673e(0x152)])(_0x256b94,_0x595d00,((_0x346408=_0x5a18a3['mapping'])==null?void 0x0:_0x346408['categoryIndex'])??0x0)}),_0x245fb1=(0x0,n[_0x88673e(0x15a)])({'unitId':_0x595d00[_0x88673e(0x14c)],'subUnitId':_0x595d00[_0x88673e(0x143)],'injector':this[_0x88673e(0x165)]()},_0x5a18a3,_0x46eac7),_0x36b8e9={'unitId':_0x595d00['unitId'],'subUnitId':_0x595d00[_0x88673e(0x143)],'chartId':_0x327b91,'chartType':_0x49b285,'source':_0x256b94[_0x88673e(0x15e)]===n[_0x88673e(0x16d)][_0x88673e(0x182)]?_0x256b94[_0x88673e(0x14f)]:_0x256b94[_0x88673e(0x150)],'position':_0x245fb1,'width':(_0x51d904=_0x5a18a3[_0x88673e(0x15d)])==null?void 0x0:_0x51d904[_0x88673e(0x163)],'height':(_0x1ffb63=_0x5a18a3[_0x88673e(0x15d)])==null?void 0x0:_0x1ffb63[_0x88673e(0x164)],'theme':_0x5a18a3[_0x88673e(0x15b)]??void 0x0,'config':{'unitId':_0x595d00[_0x88673e(0x14c)],'chartModelId':_0x327b91,'style':_0x3773b6[_0x88673e(0x166)],'context':_0x3773b6[_0x88673e(0x14b)],'dataAggregation':_0x3773b6['dataAggregation']}};if(!await this[_0x88673e(0x165)]()[_0x88673e(0x17e)](r[_0x88673e(0x13b)])[_0x88673e(0x14e)](n[_0x88673e(0x184)]['id'],_0x36b8e9))throw Error(_0x88673e(0x15c));return this[_0x88673e(0x16c)][_0x88673e(0x160)](o,_0x595d00[_0x88673e(0x14c)],_0x595d00['subUnitId'],_0x327b91,this[_0x88673e(0x16c)]);}[_0x301d8b(0x177)](_0x5a41c6){const _0x11de42=_0x301d8b;let {unitId:_0x5ae70f,subUnitId:_0x293d2d}=this[_0x11de42(0x17b)](),_0x45ccaf=this[_0x11de42(0x165)]()['get'](n[_0x11de42(0x149)]);return _0x45ccaf['getChartModel'](_0x5a41c6)&&_0x45ccaf[_0x11de42(0x141)](_0x5ae70f,_0x5a41c6)===_0x293d2d?this['_injector']['createInstance'](o,_0x5ae70f,_0x293d2d,_0x5a41c6,this[_0x11de42(0x16c)]):null;}[_0x301d8b(0x173)](){const _0x504d71=_0x301d8b;let {unitId:_0x113538,subUnitId:_0x485e64}=this['_chartSourceContext']();return this[_0x504d71(0x165)]()[_0x504d71(0x17e)](n[_0x504d71(0x149)])[_0x504d71(0x13a)](_0x113538,_0x485e64)['filter'](Boolean)[_0x504d71(0x144)](_0x3c79cb=>this[_0x504d71(0x16c)][_0x504d71(0x160)](o,_0x113538,_0x485e64,_0x3c79cb['id'],this['_injector']));}[_0x301d8b(0x17b)](_0x281d83){const _0x567ed5=_0x301d8b;let _0x371861=this[_0x567ed5(0x183)](),_0x52f3e5=this[_0x567ed5(0x165)]()[_0x567ed5(0x17e)](n['SheetsChartService']);return{'unitId':_0x371861[_0x567ed5(0x154)](),'subUnitId':this[_0x567ed5(0x17d)](),'workbook':_0x371861,'localeService':this[_0x567ed5(0x16c)]['get'](r[_0x567ed5(0x179)]),..._0x281d83===void 0x0?{}:{'inferInitialChartSource':_0x19b062=>_0x52f3e5['inferInitialChartSource'](_0x19b062,_0x281d83)}};}};i[_0x301d8b(0x16e)][_0x301d8b(0x17a)](s);var c=class extends a[_0x301d8b(0x158)]{get[_0x301d8b(0x16b)](){const _0x595732=_0x301d8b;return n[_0x595732(0x16b)];}};function _0x3f8b(_0x4877fb,_0x24d816){_0x4877fb=_0x4877fb-0x13a;const _0x1ebeac=_0x1ebe();let _0x3f8bd9=_0x1ebeac[_0x4877fb];return _0x3f8bd9;}function _0x1ebe(){const _0x1b5399=['Failed\x20to\x20create\x20Sheet\x20chart.','size','kind','insertChart','createInstance','1783379lWkNHP','546112tqzzmI','width','height','getInject','style','837FduLeA','toChartModelConfig','9iLgeGX','setHeader','ChartSourceOrientation','_injector','ChartSourceKind','FWorksheet','chartId','defineProperty','63lGlMHa','resolveSourceSpec','getCharts','472740zIqPag','55BfOvxo','Invalid\x20Sheet\x20chart\x20source.','getChart','source','LocaleService','extend','_chartSourceContext','message','getSheetId','get','Module','_createSheetAdapter','410354GwFHyj','Range','getWorkbook','InsertChartCommand','anchor','toStringTag','getUnitChartModels','ICommandService','setPosition','4872570KMdwjT','severity','Insert\x20the\x20Sheet\x20chart\x20before\x20updating\x20it.','getRange','getSubUnitId','SheetChartConfigAdapter','subUnitId','map','659094BJBJWk','type','FSheetChart','createChartBuilder','SheetsChartService','some','context','unitId','2096FdyIiE','executeCommand','rangeInfo','ranges','generateRandomId','resolveSourceSeries','25xmsJQL','getUnitId','chartTypeToBits','newChart','1zKEYal','FEnum','Error','resolveInitialChartPosition','theme'];_0x1ebe=function(){return _0x1b5399;};return _0x1ebe();}a[_0x301d8b(0x158)][_0x301d8b(0x17a)](c),exports[_0x301d8b(0x147)]=o;
|