@univerjs-pro/sheets-pivot 0.4.2 → 0.5.0-nightly.202411091605

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.
Files changed (77) hide show
  1. package/README.md +13 -15
  2. package/lib/cjs/facade.js +1 -0
  3. package/lib/cjs/index.js +1 -1
  4. package/lib/cjs/locale/en-US.js +1 -0
  5. package/lib/cjs/locale/fa-IR.js +1 -0
  6. package/lib/cjs/locale/ru-RU.js +1 -0
  7. package/lib/cjs/locale/vi-VN.js +1 -0
  8. package/lib/cjs/locale/zh-CN.js +1 -0
  9. package/lib/cjs/locale/zh-TW.js +1 -0
  10. package/lib/es/facade.js +1 -0
  11. package/lib/es/index.js +1 -1
  12. package/lib/es/locale/en-US.js +1 -0
  13. package/lib/es/locale/fa-IR.js +1 -0
  14. package/lib/es/locale/ru-RU.js +1 -0
  15. package/lib/es/locale/vi-VN.js +1 -0
  16. package/lib/es/locale/zh-CN.js +1 -0
  17. package/lib/es/locale/zh-TW.js +1 -0
  18. package/lib/types/index.d.ts +1158 -29
  19. package/lib/umd/facade.js +1 -0
  20. package/lib/umd/index.js +1 -1
  21. package/lib/umd/locale/en-US.js +1 -0
  22. package/lib/umd/locale/fa-IR.js +1 -0
  23. package/lib/umd/locale/ru-RU.js +1 -0
  24. package/lib/umd/locale/vi-VN.js +1 -0
  25. package/lib/umd/locale/zh-CN.js +1 -0
  26. package/lib/umd/locale/zh-TW.js +1 -0
  27. package/package.json +39 -20
  28. package/lib/locale/en-US.json +0 -30
  29. package/lib/locale/fa-IR.json +0 -30
  30. package/lib/locale/ru-RU.json +0 -30
  31. package/lib/locale/vi-VN.json +0 -30
  32. package/lib/locale/zh-CN.json +0 -30
  33. package/lib/locale/zh-TW.json +0 -30
  34. package/lib/types/commands/command/add-pivot-table-with-config.command.d.ts +0 -3
  35. package/lib/types/commands/command/util.d.ts +0 -12
  36. package/lib/types/commands/mutations/add-pivot-field.mutation.d.ts +0 -3
  37. package/lib/types/commands/mutations/add-pivot-table.mutation.d.ts +0 -3
  38. package/lib/types/commands/mutations/change-apply-util.d.ts +0 -15
  39. package/lib/types/commands/mutations/pivot-data-communication.mutation.d.ts +0 -7
  40. package/lib/types/commands/mutations/remove-pivot-field.mutation.d.ts +0 -3
  41. package/lib/types/commands/mutations/remove-pivot-table.mutation.d.ts +0 -3
  42. package/lib/types/commands/mutations/rename-pivot-field.mutation.d.ts +0 -3
  43. package/lib/types/commands/mutations/set-pivot-collapse.mutation.d.ts +0 -3
  44. package/lib/types/commands/mutations/set-pivot-field-format.mutation.d.ts +0 -3
  45. package/lib/types/commands/mutations/set-pivot-filter.mutation.d.ts +0 -3
  46. package/lib/types/commands/mutations/set-pivot-option.mutation.d.ts +0 -3
  47. package/lib/types/commands/mutations/set-pivot-position.mutation.d.ts +0 -3
  48. package/lib/types/commands/mutations/set-pivot-sort.mutation.d.ts +0 -3
  49. package/lib/types/commands/mutations/set-pivot-subtotal-type.mutation.d.ts +0 -3
  50. package/lib/types/commands/mutations/update-field-position.mutation.d.ts +0 -3
  51. package/lib/types/commands/mutations/update-pivot-field-source-info.mutation.d.ts +0 -3
  52. package/lib/types/commands/mutations/update-pivot-table-source.mutation.d.ts +0 -3
  53. package/lib/types/commands/mutations/update-value-position.mutation.d.ts +0 -3
  54. package/lib/types/commands/operations/pivot-table-dirty-view.operation.d.ts +0 -3
  55. package/lib/types/common/const.d.ts +0 -64
  56. package/lib/types/const/const.d.ts +0 -99
  57. package/lib/types/const/template.d.ts +0 -885
  58. package/lib/types/const/type.d.ts +0 -522
  59. package/lib/types/controllers/config.schema.d.ts +0 -6
  60. package/lib/types/controllers/const.d.ts +0 -1
  61. package/lib/types/controllers/sheets-pivot-caculate.controller.d.ts +0 -44
  62. package/lib/types/controllers/sheets-pivot-rpc.controller.d.ts +0 -20
  63. package/lib/types/locale/en-US.d.ts +0 -3
  64. package/lib/types/locale/fa-IR.d.ts +0 -3
  65. package/lib/types/locale/ru-RU.d.ts +0 -3
  66. package/lib/types/locale/vi-VN.d.ts +0 -3
  67. package/lib/types/locale/zh-CN.d.ts +0 -31
  68. package/lib/types/locale/zh-TW.d.ts +0 -3
  69. package/lib/types/models/sheets-pivot-config-model.d.ts +0 -58
  70. package/lib/types/models/sheets-pivot-data-field-manager.d.ts +0 -77
  71. package/lib/types/models/sheets-pivot-data-source-model.d.ts +0 -101
  72. package/lib/types/models/sheets-pivot-table-adaptor-model.d.ts +0 -54
  73. package/lib/types/models/view-util.d.ts +0 -16
  74. package/lib/types/plugin.d.ts +0 -17
  75. package/lib/types/services/sheets-pivot-rpc.service.d.ts +0 -11
  76. package/lib/types/services/sheets-pivot-table.service.d.ts +0 -10
  77. package/lib/types/util.d.ts +0 -52
package/README.md CHANGED
@@ -7,28 +7,26 @@
7
7
 
8
8
  ## Introduction
9
9
 
10
- `@univerjs/sheet-pivot` provides a user interface for filtering in sheets.
10
+ A pivot table is a powerful data analysis tool used for quickly and dynamically summarizing and analyzing large volumes of data. It allows users to group, filter, sort, and aggregate raw data across different dimensions, revealing patterns and trends within the data. By dragging and dropping fields to define rows, columns, and values, users can create cross-tabulated tables for multi-level data summarization. Common functions include sum, count, average, maximum/minimum, and more, enabling users to derive valuable insights from complex data. Pivot tables are ideal for scenarios such as financial analysis, business monitoring, and sales data reporting.
11
11
 
12
12
  ## Usage
13
13
 
14
- You should use this plugin with the `@univerjs/sheets-filter` package.
15
-
16
- ```ts
17
- import '@univerjs/sheet-pivot/lib/index.css';
18
-
19
- import { UniverSheetsFilterPlugin } from '@univerjs/sheets-filter';
20
- import { UniverSheetsFilterUIPlugin } from '@univerjs/sheet-pivot';
21
-
22
- univer.registerPlugin(UniverSheetsFilterPlugin);
23
- univer.registerPlugin(UniverSheetsFilterUIPlugin);
24
- ```
25
-
26
14
  ### Installation
27
15
 
28
16
  ```shell
29
17
  # Using npm
30
- npm install @univerjs/sheet-pivot
18
+ npm install @univerjs/sheet-pivot-ui @univerjs/sheet-pivot
31
19
 
32
20
  # Using pnpm
33
- pnpm add @univerjs/sheet-pivot
21
+ pnpm add @univerjs/sheet-pivot-ui @univerjs/sheet-pivot
22
+ ```
23
+
24
+ ### Import
25
+
26
+ ```ts
27
+ import { UniverSheetsPivotTablePlugin } from '@univerjs-pro/sheets-pivot';
28
+ import { UniverSheetsPivotTableUIPlugin } from '@univerjs-pro/sheets-pivot-ui';
29
+
30
+ univer.registerPlugin(UniverSheetsPivotTablePlugin);
31
+ univer.registerPlugin(UniverSheetsPivotTableUIPlugin);
34
32
  ```
@@ -0,0 +1 @@
1
+ 'use strict';const _0x2f5678=_0x2fa9;function _0x2fa9(_0x2e7e51,_0x190b32){const _0x2aaf31=_0x2aaf();return _0x2fa9=function(_0x2fa958,_0x5f209a){_0x2fa958=_0x2fa958-0xdc;let _0x1b50e0=_0x2aaf31[_0x2fa958];return _0x1b50e0;},_0x2fa9(_0x2e7e51,_0x190b32);}(function(_0x4e4954,_0x34c8a4){const _0x89a748=_0x2fa9,_0x1bcd59=_0x4e4954();while(!![]){try{const _0x40eca8=parseInt(_0x89a748(0x10e))/0x1*(parseInt(_0x89a748(0x107))/0x2)+-parseInt(_0x89a748(0xf3))/0x3+-parseInt(_0x89a748(0x103))/0x4+-parseInt(_0x89a748(0xec))/0x5+parseInt(_0x89a748(0x113))/0x6*(-parseInt(_0x89a748(0xef))/0x7)+parseInt(_0x89a748(0x105))/0x8*(-parseInt(_0x89a748(0xe1))/0x9)+parseInt(_0x89a748(0xee))/0xa*(parseInt(_0x89a748(0x111))/0xb);if(_0x40eca8===_0x34c8a4)break;else _0x1bcd59['push'](_0x1bcd59['shift']());}catch(_0x53f337){_0x1bcd59['push'](_0x1bcd59['shift']());}}}(_0x2aaf,0x5a847));function _0x2aaf(){const _0x2a7eef=['number','executeCommand','ICommandService','79433BhJang','getPivotTableByCell','RemovePivotFieldCommand','9449aJfrhy','remove','30kqBOwV','addPivotTable','_injector','updateValuePosition','@univerjs-pro/sheets-pivot','setLabelSort','33489uhkSxM','SetPivotSubtotalTypeMutation','subUnitId','SetPivotSortCommand','MovePivotFieldCommand','RenamePivotFieldMutation','getPivotTableIdByCell','addField','FPivotTable','pivotTableId','renameField','3117280CZzKAv','getCollection','28990qrlTgw','969227TooBuW','syncExecuteCommand','@univerjs-pro/engine-pivot','removeField','1057440yVXjbo','setLabelManualFilter','SheetsPivotTableAdaptorModel','AddPivotFieldCommand','fieldIds','getConfig','Module','toStringTag','AddPivotTableCommand','generateHexNumber','updateFieldPosition','unitId','UpdatePivotValuePositionCommand','setSubtotalType','defineProperty','SheetsPivotTableConfigModel','34388KIEmZY','SetPivotFilterCommand','1464EufsuN','@univerjs/core','6VPBymf','get','FWorkbook','getPivotTableConfig'];_0x2aaf=function(){return _0x2a7eef;};return _0x2aaf();}var C=Object[_0x2f5678(0x101)],g=(_0x1e7891,_0x3cba02,_0x41a63c)=>_0x3cba02 in _0x1e7891?C(_0x1e7891,_0x3cba02,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x41a63c}):_0x1e7891[_0x3cba02]=_0x41a63c,l=(_0x173655,_0x4f1c48,_0xbf555e)=>g(_0x173655,typeof _0x4f1c48!='symbol'?_0x4f1c48+'':_0x4f1c48,_0xbf555e);Object['defineProperty'](exports,Symbol[_0x2f5678(0xfa)],{'value':_0x2f5678(0xf9)});const r=require(_0x2f5678(0x106)),b=require('@univerjs/sheets/facade'),P=require(_0x2f5678(0xf1)),a=require(_0x2f5678(0xdf));class I{constructor(_0x3be19e,_0xd3f583,_0x5ed0b7,_0x52b93a){const _0x1f632c=_0x2f5678;l(this,_0x1f632c(0xfe)),l(this,_0x1f632c(0xe3)),l(this,_0x1f632c(0xea)),l(this,'_injector'),(this['unitId']=_0x3be19e,this[_0x1f632c(0xe3)]=_0xd3f583,this[_0x1f632c(0xea)]=_0x5ed0b7,this[_0x1f632c(0xdd)]=_0x52b93a);}[_0x2f5678(0xf8)](){const _0x343b45=_0x2f5678;return this[_0x343b45(0xdd)][_0x343b45(0x108)](a['SheetsPivotTableConfigModel'])[_0x343b45(0x10a)](this[_0x343b45(0xfe)],this[_0x343b45(0xe3)],this['pivotTableId']);}async[_0x2f5678(0x112)](){const _0x4d167a=_0x2f5678;return await this['_injector'][_0x4d167a(0x108)](r[_0x4d167a(0x10d)])[_0x4d167a(0xf0)](a['RemovePivotTableMutation']['id'],{'unitId':this[_0x4d167a(0xfe)],'subUnitId':this[_0x4d167a(0xe3)],'pivotTableId':this[_0x4d167a(0xea)]});}async[_0x2f5678(0xe8)](_0x3a113a,_0x4cf898,_0x29a9a8){const _0x1d89d7=_0x2f5678,_0x29071f=this[_0x1d89d7(0xdd)],_0x456c88=this[_0x1d89d7(0xfe)],_0x3441fb=this[_0x1d89d7(0xe3)],_0x3c69f7=this[_0x1d89d7(0xea)],_0x2c2e5c=_0x29071f['get'](r[_0x1d89d7(0x10d)]),_0x461a9e=_0x29071f[_0x1d89d7(0x108)](a[_0x1d89d7(0x102)]),_0x32f271=_0x461a9e[_0x1d89d7(0x10a)](_0x456c88,_0x3441fb,_0x3c69f7),_0x22f3db=_0x461a9e[_0x1d89d7(0xed)](_0x456c88,_0x3c69f7);if(!_0x32f271||!_0x22f3db)return!0x1;let _0x43dfbe=_0x3a113a;typeof _0x43dfbe==_0x1d89d7(0x10b)&&(_0x43dfbe=_0x461a9e[_0x1d89d7(0xed)](_0x456c88,_0x3c69f7)[_0x1d89d7(0xf7)][_0x3a113a]);const _0x59933a={'unitId':_0x456c88,'subUnitId':_0x3441fb,'pivotTableId':_0x3c69f7,'dataFieldId':_0x43dfbe,'fieldArea':_0x4cf898,'index':_0x29a9a8};return _0x2c2e5c['executeCommand'](a[_0x1d89d7(0xf6)]['id'],_0x59933a);}async[_0x2f5678(0xf2)](_0x4bd961){const _0x1c6dd4=_0x2f5678,_0x6e73fa=this[_0x1c6dd4(0xdd)],_0x2aef79=this['unitId'],_0x2698bd=this[_0x1c6dd4(0xe3)],_0x482189=this[_0x1c6dd4(0xea)],_0x5c8ba4=_0x6e73fa[_0x1c6dd4(0x108)](r['ICommandService']),_0x48fafb={'unitId':_0x2aef79,'subUnitId':_0x2698bd,'pivotTableId':_0x482189,'fieldIds':_0x4bd961};return _0x5c8ba4[_0x1c6dd4(0x10c)](a[_0x1c6dd4(0x110)]['id'],_0x48fafb);}async[_0x2f5678(0xfd)](_0x136237,_0x1b4950,_0x2b5898){const _0x49867d=_0x2f5678,_0x493732=this[_0x49867d(0xdd)],_0x5a6fd0=this[_0x49867d(0xfe)],_0xf0a4fc=this[_0x49867d(0xe3)],_0x317a37=this[_0x49867d(0xea)],_0x1b0a1d=_0x493732[_0x49867d(0x108)](r[_0x49867d(0x10d)]),_0x1ed7e0={'unitId':_0x5a6fd0,'subUnitId':_0xf0a4fc,'pivotTableId':_0x317a37,'fieldId':_0x136237,'area':_0x1b4950,'index':_0x2b5898};return _0x1b0a1d[_0x49867d(0x10c)](a[_0x49867d(0xe5)]['id'],_0x1ed7e0);}async[_0x2f5678(0xde)](_0x263e09,_0x39f7e5){const _0x3bbe5e=_0x2f5678,_0x55e6aa=this[_0x3bbe5e(0xdd)],_0x5d2fae=this[_0x3bbe5e(0xfe)],_0x373bad=this[_0x3bbe5e(0xe3)],_0x133bdf=this[_0x3bbe5e(0xea)],_0x86d1ed=_0x55e6aa[_0x3bbe5e(0x108)](r[_0x3bbe5e(0x10d)]),_0x58cfcb={'unitId':_0x5d2fae,'subUnitId':_0x373bad,'pivotTableId':_0x133bdf,'position':_0x263e09,'index':_0x39f7e5};return _0x86d1ed[_0x3bbe5e(0x10c)](a[_0x3bbe5e(0xff)]['id'],_0x58cfcb);}async[_0x2f5678(0x100)](_0x3fedd4,_0x28308d){const _0x1db070=_0x2f5678,_0x27295a=this[_0x1db070(0xdd)],_0x39d121=this[_0x1db070(0xfe)],_0x2fa41f=this[_0x1db070(0xe3)],_0x37b45d=this[_0x1db070(0xea)],_0x55653a=_0x27295a[_0x1db070(0x108)](r['ICommandService']),_0x52fbbe={'unitId':_0x39d121,'subUnitId':_0x2fa41f,'pivotTableId':_0x37b45d,'fieldId':_0x3fedd4,'subtotalType':_0x28308d};return _0x55653a[_0x1db070(0x10c)](a[_0x1db070(0xe2)]['id'],_0x52fbbe);}async[_0x2f5678(0xe0)](_0x2e6f29,_0x2e40c7){const _0x151411=_0x2f5678,_0x43ff3c=this[_0x151411(0xdd)],_0x5b4abc=this[_0x151411(0xfe)],_0x2767bc=this[_0x151411(0xe3)],_0x45a6e4=this[_0x151411(0xea)],_0x37b943=_0x43ff3c[_0x151411(0x108)](r[_0x151411(0x10d)]),_0x39e645={'unitId':_0x5b4abc,'subUnitId':_0x2767bc,'tableFieldId':_0x2e6f29,'pivotTableId':_0x45a6e4,'info':_0x2e40c7};return _0x37b943[_0x151411(0x10c)](a[_0x151411(0xe4)]['id'],_0x39e645);}async[_0x2f5678(0xf4)](_0x236cb5,_0x8ead47,_0x5d8da4){const _0x30bf7e=_0x2f5678,_0x3fdbb7=this[_0x30bf7e(0xdd)],_0x131339=this[_0x30bf7e(0xfe)],_0x18fda5=this[_0x30bf7e(0xe3)],_0x189b08=this[_0x30bf7e(0xea)],_0x2b96c1=_0x3fdbb7['get'](r['ICommandService']),_0x524a8f={'unitId':_0x131339,'subUnitId':_0x18fda5,'pivotTableId':_0x189b08,'tableFieldId':_0x236cb5,'items':_0x8ead47,'isAll':_0x5d8da4};return _0x2b96c1[_0x30bf7e(0x10c)](a[_0x30bf7e(0x104)]['id'],_0x524a8f);}async[_0x2f5678(0xeb)](_0xbf31b1,_0x1e07c2){const _0xf30f39=_0x2f5678,_0x2da8cd=this['_injector'],_0x41859c=this[_0xf30f39(0xfe)],_0x94e4c1=this[_0xf30f39(0xe3)],_0x3b7891=this['pivotTableId'],_0x293eb0=_0x2da8cd[_0xf30f39(0x108)](r['ICommandService']),_0x1a3996={'unitId':_0x41859c,'subUnitId':_0x94e4c1,'pivotTableId':_0x3b7891,'fieldId':_0xbf31b1,'name':_0x1e07c2};return _0x293eb0[_0xf30f39(0x10c)](a[_0xf30f39(0xe6)]['id'],_0x1a3996);}}class S extends b[_0x2f5678(0x109)]{async[_0x2f5678(0xdc)](_0x598885,_0x3c006c,_0x45b21f){const _0x2eb643=_0x2f5678,_0x5af990=this[_0x2eb643(0xdd)],_0x46a8d2=_0x5af990[_0x2eb643(0x108)](r[_0x2eb643(0x10d)]),_0xef6234=P[_0x2eb643(0xfc)](0x8),_0x5eb904={'positionType':_0x3c006c,'pivotTableId':_0xef6234,'pivotTableConfig':{'targetCellInfo':_0x45b21f,'sourceRangeInfo':_0x598885,'isEmpty':!0x0}};if(await _0x46a8d2['executeCommand'](a[_0x2eb643(0xfb)]['id'],_0x5eb904))return new I(_0x45b21f[_0x2eb643(0xfe)],_0x45b21f[_0x2eb643(0xe3)],_0xef6234,_0x5af990);}[_0x2f5678(0x10f)](_0x8ab7a8,_0x30cbb3,_0x152aab,_0x144ceb){const _0x15c864=_0x2f5678,_0x258445=this[_0x15c864(0xdd)],_0xc64034=_0x258445['get'](a[_0x15c864(0xf5)])[_0x15c864(0xe7)](_0x8ab7a8,_0x30cbb3,_0x152aab,_0x144ceb);if(_0xc64034)return new I(_0x8ab7a8,_0x30cbb3,_0xc64034,_0x258445);}}b[_0x2f5678(0x109)]['extend'](S),exports[_0x2f5678(0xe9)]=I;