@univerjs-pro/sheets-pivot 0.25.1 → 1.0.0-alpha.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.
Files changed (103) hide show
  1. package/lib/cjs/facade.js +1 -1
  2. package/lib/cjs/index.js +1 -1
  3. package/lib/cjs/locale/ar-SA.js +1 -1
  4. package/lib/cjs/locale/ca-ES.js +1 -1
  5. package/lib/cjs/locale/de-DE.js +1 -1
  6. package/lib/cjs/locale/en-US.js +1 -1
  7. package/lib/cjs/locale/es-ES.js +1 -1
  8. package/lib/cjs/locale/fa-IR.js +1 -1
  9. package/lib/cjs/locale/fr-FR.js +1 -1
  10. package/lib/cjs/locale/id-ID.js +1 -1
  11. package/lib/cjs/locale/it-IT.js +1 -1
  12. package/lib/cjs/locale/ja-JP.js +1 -1
  13. package/lib/cjs/locale/ko-KR.js +1 -1
  14. package/lib/cjs/locale/pl-PL.js +1 -1
  15. package/lib/cjs/locale/pt-BR.js +1 -1
  16. package/lib/cjs/locale/ru-RU.js +1 -1
  17. package/lib/cjs/locale/sk-SK.js +1 -1
  18. package/lib/cjs/locale/vi-VN.js +1 -1
  19. package/lib/cjs/locale/zh-CN.js +1 -1
  20. package/lib/cjs/locale/zh-HK.js +1 -1
  21. package/lib/cjs/locale/zh-TW.js +1 -1
  22. package/lib/es/facade.js +1 -1
  23. package/lib/es/index.js +1 -1
  24. package/lib/es/locale/ar-SA.js +1 -1
  25. package/lib/es/locale/ca-ES.js +1 -1
  26. package/lib/es/locale/de-DE.js +1 -1
  27. package/lib/es/locale/en-US.js +1 -1
  28. package/lib/es/locale/es-ES.js +1 -1
  29. package/lib/es/locale/fa-IR.js +1 -1
  30. package/lib/es/locale/fr-FR.js +1 -1
  31. package/lib/es/locale/id-ID.js +1 -1
  32. package/lib/es/locale/it-IT.js +1 -1
  33. package/lib/es/locale/ja-JP.js +1 -1
  34. package/lib/es/locale/ko-KR.js +1 -1
  35. package/lib/es/locale/pl-PL.js +1 -1
  36. package/lib/es/locale/pt-BR.js +1 -1
  37. package/lib/es/locale/ru-RU.js +1 -1
  38. package/lib/es/locale/sk-SK.js +1 -1
  39. package/lib/es/locale/vi-VN.js +1 -1
  40. package/lib/es/locale/zh-CN.js +1 -1
  41. package/lib/es/locale/zh-HK.js +1 -1
  42. package/lib/es/locale/zh-TW.js +1 -1
  43. package/lib/facade.js +1 -1
  44. package/lib/index.js +1 -1
  45. package/lib/locale/ar-SA.js +1 -1
  46. package/lib/locale/ca-ES.js +1 -1
  47. package/lib/locale/de-DE.js +1 -1
  48. package/lib/locale/en-US.js +1 -1
  49. package/lib/locale/es-ES.js +1 -1
  50. package/lib/locale/fa-IR.js +1 -1
  51. package/lib/locale/fr-FR.js +1 -1
  52. package/lib/locale/id-ID.js +1 -1
  53. package/lib/locale/it-IT.js +1 -1
  54. package/lib/locale/ja-JP.js +1 -1
  55. package/lib/locale/ko-KR.js +1 -1
  56. package/lib/locale/pl-PL.js +1 -1
  57. package/lib/locale/pt-BR.js +1 -1
  58. package/lib/locale/ru-RU.js +1 -1
  59. package/lib/locale/sk-SK.js +1 -1
  60. package/lib/locale/vi-VN.js +1 -1
  61. package/lib/locale/zh-CN.js +1 -1
  62. package/lib/locale/zh-HK.js +1 -1
  63. package/lib/locale/zh-TW.js +1 -1
  64. package/lib/types/bidi.d.ts +5 -0
  65. package/lib/types/commands/command/date-group-util.d.ts +15 -0
  66. package/lib/types/commands/command/set-pivot-date-group.command.d.ts +10 -0
  67. package/lib/types/commands/command/set-pivot-layout.command.d.ts +3 -0
  68. package/lib/types/commands/mutations/change-apply-util.d.ts +2 -1
  69. package/lib/types/commands/mutations/set-pivot-layout.mutation.d.ts +3 -0
  70. package/lib/types/{controllers/config.schema.d.ts → config/config.d.ts} +10 -0
  71. package/lib/types/const/const.d.ts +28 -4
  72. package/lib/types/const/type.d.ts +19 -1
  73. package/lib/types/controllers/sheets-pivot-caculate.controller.d.ts +4 -2
  74. package/lib/types/facade/f-enum.d.ts +5 -1
  75. package/lib/types/facade/f-generic-pivot-table.d.ts +23 -1
  76. package/lib/types/facade/f-pivot-table.d.ts +53 -1
  77. package/lib/types/index.d.ts +10 -3
  78. package/lib/types/locale/en-US.d.ts +11 -0
  79. package/lib/types/locale/types.d.ts +3 -0
  80. package/lib/types/plugin.d.ts +1 -1
  81. package/lib/types/services/sheets-pivot-table.service.d.ts +3 -2
  82. package/lib/umd/facade.js +1 -1
  83. package/lib/umd/index.js +1 -1
  84. package/lib/umd/locale/ar-SA.js +1 -1
  85. package/lib/umd/locale/ca-ES.js +1 -1
  86. package/lib/umd/locale/de-DE.js +1 -1
  87. package/lib/umd/locale/en-US.js +1 -1
  88. package/lib/umd/locale/es-ES.js +1 -1
  89. package/lib/umd/locale/fa-IR.js +1 -1
  90. package/lib/umd/locale/fr-FR.js +1 -1
  91. package/lib/umd/locale/id-ID.js +1 -1
  92. package/lib/umd/locale/it-IT.js +1 -1
  93. package/lib/umd/locale/ja-JP.js +1 -1
  94. package/lib/umd/locale/ko-KR.js +1 -1
  95. package/lib/umd/locale/pl-PL.js +1 -1
  96. package/lib/umd/locale/pt-BR.js +1 -1
  97. package/lib/umd/locale/ru-RU.js +1 -1
  98. package/lib/umd/locale/sk-SK.js +1 -1
  99. package/lib/umd/locale/vi-VN.js +1 -1
  100. package/lib/umd/locale/zh-CN.js +1 -1
  101. package/lib/umd/locale/zh-HK.js +1 -1
  102. package/lib/umd/locale/zh-TW.js +1 -1
  103. package/package.json +11 -11
@@ -1 +1 @@
1
- const _0x5b92e2=_0x5317;(function(_0x43252d,_0x4cfb69){const _0x26886a=_0x5317,_0x3f0d75=_0x43252d();while(!![]){try{const _0x15cb5c=parseInt(_0x26886a(0x181))/0x1*(-parseInt(_0x26886a(0x16f))/0x2)+-parseInt(_0x26886a(0x182))/0x3+parseInt(_0x26886a(0x177))/0x4+-parseInt(_0x26886a(0x17c))/0x5+-parseInt(_0x26886a(0x173))/0x6+parseInt(_0x26886a(0x168))/0x7*(-parseInt(_0x26886a(0x170))/0x8)+parseInt(_0x26886a(0x180))/0x9;if(_0x15cb5c===_0x4cfb69)break;else _0x3f0d75['push'](_0x3f0d75['shift']());}catch(_0x1a7745){_0x3f0d75['push'](_0x3f0d75['shift']());}}}(_0x4ba6,0x6a421));function _0x5317(_0x11ecf2,_0x36e8a1){_0x11ecf2=_0x11ecf2-0x163;const _0x4ba672=_0x4ba6();let _0x53175b=_0x4ba672[_0x11ecf2];return _0x53175b;}function _0x4ba6(){const _0x34c79e=['{0}年{1}月{2}日','{0}季度','平均值項:','{0}分','總體方差項:','乘積項:','10YXDylC','8OXojlg','{0}時','計數項:','1537656oPcRqy','年-月-日','數值計數項:','年-季度','401088oSsLQn','{0}時\x20{1}','{0}','求和項:','(其他)','846670uMBFtg','工作表','年-月','{0}{1}','17766855NCWNJP','84101DDcGSR','325002jjeIFg','{0}','總體標準差項:','方差項:','標準差項:','最大值項:','{0}{1}','4792795rGRzdo'];_0x4ba6=function(){return _0x34c79e;};return _0x4ba6();}const e={'sheets-pivot':{'sheet':_0x5b92e2(0x17d),'blankValue':'(空白)','otherValue':_0x5b92e2(0x17b),'columnName':'欄\x20','subTotalText':'小計','grandTotalText':'總計','valueText':'值','averageName':_0x5b92e2(0x16b),'countName':_0x5b92e2(0x172),'countNumsName':_0x5b92e2(0x175),'maxName':_0x5b92e2(0x166),'minName':'最小值項:','productName':_0x5b92e2(0x16e),'stdDevName':_0x5b92e2(0x165),'stdDevpName':_0x5b92e2(0x163),'sumName':_0x5b92e2(0x17a),'varName':_0x5b92e2(0x164),'varpName':_0x5b92e2(0x16d),'subTotal':'小計','grandTotal':'總計','value':'值','blank':'空白','other':'其他','emptyPivot':{'filter':'篩選','row':'行','column':'欄','values':'值'},'dateGroup':{'year':'年','month':'月','day':'日','hour':'小時','minute':'分鐘','quarter':'季度','monthDate':'月-日','yearQuarter':_0x5b92e2(0x176),'yearMonth':_0x5b92e2(0x17e),'yearMonthDate':_0x5b92e2(0x174)},'cellDateGroupDisplay':{'minute':_0x5b92e2(0x16c),'hour':_0x5b92e2(0x171),'hourMinute':_0x5b92e2(0x178),'date':_0x5b92e2(0x179),'month':_0x5b92e2(0x183),'monthDate':_0x5b92e2(0x167),'quarter':_0x5b92e2(0x16a),'year':'{0}','yearMonth':_0x5b92e2(0x17f),'yearMonthDate':_0x5b92e2(0x169),'yearQuarter':'{0}年{1}季度'}}};export{e as default};
1
+ const _0x3343db=_0x156b;function _0x156b(_0xdf8f49,_0x2bc100){_0xdf8f49=_0xdf8f49-0x1ad;const _0x486fa5=_0x486f();let _0x156b46=_0x486fa5[_0xdf8f49];return _0x156b46;}function _0x486f(){const _0x1fd3cc=['計數項:','460798SsuhBD','720540zCinhX','年-月','總體標準差項:','數值計數項:','年-月-日','最小值項:','1285172XURnRU','標準差項:','乘積項:','工作表','{0}\x20{1}','平均值項:','{0}','649443LhKVcf','求和項:','624092zVhjhZ','月-日','方差項:','2258112sbjQvU','{0}-Q{1}','3063380wpYdyo','{0}-{1}-{2}','4wNhUFb','(其他)','{0}-{1}'];_0x486f=function(){return _0x1fd3cc;};return _0x486f();}(function(_0x2c00b6,_0x35daa7){const _0x53c5c6=_0x156b,_0x378acd=_0x2c00b6();while(!![]){try{const _0x463d94=parseInt(_0x53c5c6(0x1ba))/0x1+-parseInt(_0x53c5c6(0x1af))/0x2+-parseInt(_0x53c5c6(0x1ad))/0x3*(parseInt(_0x53c5c6(0x1b6))/0x4)+parseInt(_0x53c5c6(0x1b4))/0x5+parseInt(_0x53c5c6(0x1bb))/0x6+parseInt(_0x53c5c6(0x1c1))/0x7+-parseInt(_0x53c5c6(0x1b2))/0x8;if(_0x463d94===_0x35daa7)break;else _0x378acd['push'](_0x378acd['shift']());}catch(_0x1e7edd){_0x378acd['push'](_0x378acd['shift']());}}}(_0x486f,0x8a461));const e={'sheets-pivot':{'sheet':_0x3343db(0x1c4),'blankValue':'(空白)','otherValue':_0x3343db(0x1b7),'columnName':'欄\x20','subTotalText':'小計','grandTotalText':'總計','valueText':'值','rowLabels':'行標籤','columnLabels':'列標籤','averageName':_0x3343db(0x1c6),'countName':_0x3343db(0x1b9),'countNumsName':_0x3343db(0x1be),'maxName':'最大值項:','minName':_0x3343db(0x1c0),'productName':_0x3343db(0x1c3),'stdDevName':_0x3343db(0x1c2),'stdDevpName':_0x3343db(0x1bd),'sumName':_0x3343db(0x1ae),'varName':_0x3343db(0x1b1),'varpName':'總體方差項:','subTotal':'小計','grandTotal':'總計','value':'值','blank':'空白','other':'其他','renderText':{'valueField':'{0}{1}','subtotal':_0x3343db(0x1c5),'grandTotal':'{0}\x20{1}','multipleGrandTotal':_0x3343db(0x1c7),'subtotalWithValue':_0x3343db(0x1c5)},'emptyPivot':{'filter':'篩選','row':'行','column':'欄','values':'值'},'dateGroup':{'year':'年','month':'月','day':'日','date':'日','hour':'小時','minute':'分鐘','hourMinute':'小時-分鐘','quarter':'季度','monthDate':_0x3343db(0x1b0),'yearQuarter':'年-季度','yearMonth':_0x3343db(0x1bc),'yearMonthDate':_0x3343db(0x1bf)},'cellDateGroupDisplay':{'minute':'{0}','hour':_0x3343db(0x1c7),'hourMinute':'{0}:{1}','date':'{0}','month':_0x3343db(0x1c7),'monthDate':_0x3343db(0x1b8),'quarter':'Q{0}','year':_0x3343db(0x1c7),'yearMonth':_0x3343db(0x1b8),'yearMonthDate':_0x3343db(0x1b5),'yearQuarter':_0x3343db(0x1b3)}}};export{e as default};
@@ -0,0 +1,5 @@
1
+ export declare const BIDI_ISOLATE_START = "\u2068";
2
+ export declare const BIDI_ISOLATE_END = "\u2069";
3
+ export declare function hasRTLText(value: unknown): boolean;
4
+ export declare function bidiIsolateText(value: unknown): string;
5
+ export declare function isolateTextForBidiContext(value: unknown, ...context: unknown[]): string;
@@ -0,0 +1,15 @@
1
+ import type { IFieldsCollectionJSON, IPivotTableSnapshot } from '@univerjs-pro/engine-pivot';
2
+ import { PivotDateGroupFieldDateTypeEnum, PivotTableFiledAreaEnum } from '@univerjs-pro/engine-pivot';
3
+ export declare const PIVOT_DATE_GROUP_TYPES: PivotDateGroupFieldDateTypeEnum[];
4
+ export interface IPivotDateGroupContext {
5
+ kind: 'source-date' | 'date-group';
6
+ area: PivotTableFiledAreaEnum.Row | PivotTableFiledAreaEnum.Column;
7
+ tableFieldId: string;
8
+ dataFieldId: string;
9
+ originalDataFieldId: string;
10
+ currentDateType?: PivotDateGroupFieldDateTypeEnum;
11
+ siblingDateTypes: PivotDateGroupFieldDateTypeEnum[];
12
+ insertIndex: number;
13
+ }
14
+ export declare function getPivotDateGroupContext(fieldsConfig: IPivotTableSnapshot | undefined, collection: IFieldsCollectionJSON | undefined, tableFieldId: string): IPivotDateGroupContext | undefined;
15
+ export declare function isPivotDateGroupTypeDisabled(context: IPivotDateGroupContext, dateType: PivotDateGroupFieldDateTypeEnum): boolean;
@@ -0,0 +1,10 @@
1
+ import type { PivotDateGroupFieldDateTypeEnum } from '@univerjs-pro/engine-pivot';
2
+ import type { ICommand } from '@univerjs/core';
3
+ export interface ISetPivotDateGroupCommandParams {
4
+ unitId: string;
5
+ subUnitId: string;
6
+ pivotTableId: string;
7
+ tableFieldId: string;
8
+ dateType: PivotDateGroupFieldDateTypeEnum;
9
+ }
10
+ export declare const SetPivotDateGroupCommand: ICommand<ISetPivotDateGroupCommandParams>;
@@ -0,0 +1,3 @@
1
+ import type { ICommand } from '@univerjs/core';
2
+ import type { ISetPivotLayoutMutationParams } from '../../const/type';
3
+ export declare const SetPivotLayoutCommand: ICommand<ISetPivotLayoutMutationParams>;
@@ -1,5 +1,5 @@
1
1
  import type { IPivotTableSnapshot } from '@univerjs-pro/engine-pivot';
2
- import type { IAddPivotFieldMutationParams, IRemovePivotFieldMutationParams, IRenamePivotFieldMutationParams, ISetPivotCollapseMutation, ISetPivotFieldFormatMutationParams, ISetPivotFilterMutationParams, ISetPivotOptionMutationParams, ISetPivotSortMutationParams, ISetPivotSubtotalTypeMutationParams, ISetPivotValueFilterMutationParams, IUpdateFieldPositionMutationParams, IUpdatePivotFieldSourceInfoMutationParams, IUpdateValuePositionMutationParams } from '../../const/type';
2
+ import type { IAddPivotFieldMutationParams, IRemovePivotFieldMutationParams, IRenamePivotFieldMutationParams, ISetPivotCollapseMutation, ISetPivotFieldFormatMutationParams, ISetPivotFilterMutationParams, ISetPivotLayoutMutationParams, ISetPivotOptionMutationParams, ISetPivotSortMutationParams, ISetPivotSubtotalTypeMutationParams, ISetPivotValueFilterMutationParams, IUpdateFieldPositionMutationParams, IUpdatePivotFieldSourceInfoMutationParams, IUpdateValuePositionMutationParams } from '../../const/type';
3
3
  import { PivotTableFiledAreaEnum } from '@univerjs-pro/engine-pivot';
4
4
  export declare function getFieldListByArea(config: IPivotTableSnapshot, area: PivotTableFiledAreaEnum): string[];
5
5
  export declare function applyAddFieldChangeSet(config: IPivotTableSnapshot, change: IAddPivotFieldMutationParams): void;
@@ -15,3 +15,4 @@ export declare function applyValuePositionChangeSet(config: IPivotTableSnapshot,
15
15
  export declare function applySourceInfoChangeSet(config: IPivotTableSnapshot, change: IUpdatePivotFieldSourceInfoMutationParams): void;
16
16
  export declare function applySetSortChangeSet(config: IPivotTableSnapshot, change: ISetPivotSortMutationParams): void;
17
17
  export declare function applySetOptionsChangeSet(config: IPivotTableSnapshot, change: ISetPivotOptionMutationParams): void;
18
+ export declare function applySetLayoutChangeSet(config: IPivotTableSnapshot, change: ISetPivotLayoutMutationParams): void;
@@ -0,0 +1,3 @@
1
+ import type { IMutation } from '@univerjs/core';
2
+ import type { ISetPivotLayoutMutationParams } from '../../const/type';
3
+ export declare const SetPivotLayoutMutation: IMutation<ISetPivotLayoutMutationParams>;
@@ -1,3 +1,4 @@
1
+ import { PivotDateGroupFieldDateSystemEnum } from '@univerjs-pro/engine-pivot';
1
2
  export declare const SHEETS_PIVOT_PLUGIN_CONFIG_KEY = "sheets-pivot.config";
2
3
  export declare const configSymbol: unique symbol;
3
4
  export interface IUniverSheetsPivotConfig {
@@ -7,5 +8,14 @@ export interface IUniverSheetsPivotConfig {
7
8
  * Define the maximum number of items that can be displayed in a single pivot table field. The default value is 1000.
8
9
  */
9
10
  maxLimitItemCount?: number;
11
+ /**
12
+ * Whether to create derived date group fields automatically when date fields are added to rows or columns.
13
+ * The default value is true.
14
+ */
15
+ autoDateGroup?: boolean;
16
+ /**
17
+ * Define the date system used for pivot date grouping calculations. The default value is Date1900.
18
+ */
19
+ dateSystem?: PivotDateGroupFieldDateSystemEnum;
10
20
  }
11
21
  export declare const defaultPluginConfig: IUniverSheetsPivotConfig;
@@ -1,7 +1,8 @@
1
1
  import type { IPivotViewCellData, IPivotViewValueType, PivotView, PivotViewItem } from '@univerjs-pro/engine-pivot';
2
2
  import type { Injector, IRange } from '@univerjs/core';
3
- import type zhCN from '../locale/zh-CN';
3
+ import type enUS from '../locale/en-US';
4
4
  import type { IAdjustPivotTableRes, IPivotTableConfig, IThemeStyle } from './type';
5
+ import { PivotDateGroupFieldDateTypeEnum } from '@univerjs-pro/engine-pivot';
5
6
  export declare const BUILD_TIMESTAMP: number;
6
7
  export declare const PIVOT_ICON_OFFSET = 16;
7
8
  export declare const DEFAULT_PIVOT_NUMBER = 1;
@@ -38,7 +39,7 @@ export declare enum PositionType {
38
39
  */
39
40
  New = "new"
40
41
  }
41
- export declare const localeTemplate: typeof zhCN;
42
+ export declare const localeTemplate: typeof enUS;
42
43
  export declare const PIVOT_TABLE_QUERY_DELAY = 30;
43
44
  export declare const defaultEmptyPivotFieldCellStyle: {
44
45
  bg: {
@@ -57,8 +58,10 @@ export declare const defaultEmptyPivotDataCellStyle: {
57
58
  tb: number;
58
59
  };
59
60
  export declare const defaultThemeStyle: IThemeStyle;
61
+ export declare function getDateGroupDisplayArgs(dateType: PivotDateGroupFieldDateTypeEnum, dateStr: string): string[] | undefined;
60
62
  export declare const generatorAdjustPositionData: (injector: Injector, data: PivotView, pivotTableConfig: IPivotTableConfig, textInfo: Record<string, string>) => IAdjustPivotTableRes;
61
- export declare function transFromCellValue(cellData: IPivotViewCellData, isValue: boolean, format: string | undefined, textInfo: Record<string, string>): IPivotViewValueType;
63
+ export declare function transFromCellValue(cellData: IPivotViewCellData, isValue: boolean, format: string | undefined, textInfo: Record<string, string>, multipleGrandTotalLabel?: string): IPivotViewValueType;
64
+ export declare function formatPivotRenderText(textInfo: Record<string, string>, templateKey: string, fallbackTemplate: string, ...args: unknown[]): string;
62
65
  export declare function transformErrorValue(value: IPivotViewValueType): string | number | import("@univerjs-pro/engine-pivot").IPivotViewPrefixValue | undefined;
63
66
  export declare function getAdjustRangesPosition(startCell: {
64
67
  row: number;
@@ -84,7 +87,9 @@ export declare enum PivotDisplayDataType {
84
87
  SetValuePivotFilter = "setValuePivotFilter",
85
88
  SetPivotTableConfig = "setPivotTableConfig",
86
89
  ResetPivotTable = "resetPivotTable",
87
- SetOption = "setOption"
90
+ SetOption = "setOption",
91
+ SetPivotLayout = "setPivotLayout",
92
+ SetPivotDateGroup = "setPivotDateGroup"
88
93
  }
89
94
  export declare const defaultTextInfo: {
90
95
  'sheets-pivot.blankValue': string;
@@ -92,6 +97,8 @@ export declare const defaultTextInfo: {
92
97
  'sheets-pivot.subTotalText': string;
93
98
  'sheets-pivot.grandTotalText': string;
94
99
  'sheets-pivot.valueText': string;
100
+ 'sheets-pivot.rowLabels': string;
101
+ 'sheets-pivot.columnLabels': string;
95
102
  'sheets-pivot.averageName': string;
96
103
  'sheets-pivot.countName': string;
97
104
  'sheets-pivot.countNumsName': string;
@@ -108,10 +115,27 @@ export declare const defaultTextInfo: {
108
115
  'sheets-pivot.value': string;
109
116
  'sheets-pivot.blank': string;
110
117
  'sheets-pivot.other': string;
118
+ 'sheets-pivot.renderText.valueField': string;
119
+ 'sheets-pivot.renderText.subtotal': string;
120
+ 'sheets-pivot.renderText.grandTotal': string;
121
+ 'sheets-pivot.renderText.multipleGrandTotal': string;
122
+ 'sheets-pivot.renderText.subtotalWithValue': string;
111
123
  'sheets-pivot.emptyPivot.filter': string;
112
124
  'sheets-pivot.emptyPivot.row': string;
113
125
  'sheets-pivot.emptyPivot.column': string;
114
126
  'sheets-pivot.emptyPivot.values': string;
127
+ 'sheets-pivot.dateGroup.year': string;
128
+ 'sheets-pivot.dateGroup.month': string;
129
+ 'sheets-pivot.dateGroup.day': string;
130
+ 'sheets-pivot.dateGroup.date': string;
131
+ 'sheets-pivot.dateGroup.hour': string;
132
+ 'sheets-pivot.dateGroup.minute': string;
133
+ 'sheets-pivot.dateGroup.hourMinute': string;
134
+ 'sheets-pivot.dateGroup.quarter': string;
135
+ 'sheets-pivot.dateGroup.monthDate': string;
136
+ 'sheets-pivot.dateGroup.yearQuarter': string;
137
+ 'sheets-pivot.dateGroup.yearMonth': string;
138
+ 'sheets-pivot.dateGroup.yearMonthDate': string;
115
139
  };
116
140
  export declare const defaultEmptyPivotGeneratedMutations: {
117
141
  undos: never[];
@@ -1,4 +1,4 @@
1
- import type { DataField, FieldsCollection, IBaseGroupFieldJSON, IDataFieldManagerBaseJSON, IFieldsCollectionJSON, ILabelViewHeaderMapItem, IPivotTableChangeSet, IPivotTableFilterInfo, IPivotTableLabelFieldJSON, IPivotTableOptions, IPivotTableSnapshot, IPivotTableSortInfo, IPivotTableValueFieldJSON, IPivotTableValueFilter, IPivotViewInfo, IPivotViewJSON, IPivotViewValueType, PivotCellStyleTypeEnum, PivotDataFieldDataTypeEnum, PivotSubtotalTypeEnum, PivotTableChangeTypeEnum, PivotTableFiledAreaEnum, PivotTableValuePositionEnum, PivotView } from '@univerjs-pro/engine-pivot';
1
+ import type { DataField, FieldsCollection, IBaseGroupFieldJSON, IDataFieldManagerBaseJSON, IFieldsCollectionJSON, ILabelViewHeaderMapItem, IPivotTableChangeSet, IPivotTableFilterInfo, IPivotTableLabelFieldJSON, IPivotTableOptions, IPivotTableSnapshot, IPivotTableSortInfo, IPivotTableValueFieldJSON, IPivotTableValueFilter, IPivotViewInfo, IPivotViewJSON, IPivotViewValueType, PivotCellStyleTypeEnum, PivotDataFieldDataTypeEnum, PivotDateGroupFieldDateTypeEnum, PivotLayoutTypeEnum, PivotSubtotalTypeEnum, PivotTableChangeTypeEnum, PivotTableFiledAreaEnum, PivotTableValuePositionEnum, PivotView } from '@univerjs-pro/engine-pivot';
2
2
  import type { CellValueType, ICellData, IRange, IStyleData, IUndoRedoCommandInfosByInterceptor, IUnitRangeName, Nullable, ObjectMatrix } from '@univerjs/core';
3
3
  import type { PivotDisplayDataType, PositionType } from './const';
4
4
  export interface IPivotPerformCheckParams {
@@ -99,6 +99,12 @@ export interface ISetPivotOptionMutationParams {
99
99
  pivotTableId: string;
100
100
  options: IPivotTableOptions;
101
101
  }
102
+ export interface ISetPivotLayoutMutationParams {
103
+ unitId: string;
104
+ subUnitId: string;
105
+ pivotTableId: string;
106
+ layout: PivotLayoutTypeEnum;
107
+ }
102
108
  export interface ISetPivotFieldFormatMutationParams {
103
109
  unitId: string;
104
110
  subUnitId: string;
@@ -389,6 +395,14 @@ export interface IGetPivotOptionParams {
389
395
  pivotTableId: string;
390
396
  info: IPivotTableOptions;
391
397
  }
398
+ export interface IGetPivotLayoutParams {
399
+ pivotTableId: string;
400
+ layout: PivotLayoutTypeEnum;
401
+ }
402
+ export interface IGetPivotDateGroupParams {
403
+ tableFieldId: string;
404
+ dateType: PivotDateGroupFieldDateTypeEnum;
405
+ }
392
406
  export interface IGetPivotDrillDownDataParams {
393
407
  tuple: string[][];
394
408
  }
@@ -429,6 +443,8 @@ export interface IGetPivotDataLocalMutationParams extends IPivotLocalMutationBas
429
443
  drillDown?: IGetPivotDrillDownDataParams;
430
444
  setValuePivotFilter?: IGetPivotValueFilterDataParams;
431
445
  setOptions?: IGetPivotOptionParams;
446
+ setPivotLayout?: IGetPivotLayoutParams;
447
+ setPivotDateGroup?: IGetPivotDateGroupParams;
432
448
  };
433
449
  }
434
450
  export interface IPivotDisplayResult {
@@ -452,6 +468,8 @@ export interface IPivotDisplayResult {
452
468
  setPivotTableConfig?: IPivotDisplayBaseInfo;
453
469
  resetPivotTable?: IPivotDisplayBaseInfo;
454
470
  setPivotOption?: IPivotDisplayBaseInfo;
471
+ setPivotLayout?: IPivotDisplayBaseInfo;
472
+ setPivotDateGroup?: IPivotDisplayBaseInfo;
455
473
  }
456
474
  export interface IPivotUpdatePivotSourceInfo {
457
475
  view: IPivotViewJSON;
@@ -1,6 +1,6 @@
1
1
  import type { IAllRuntimeData, IFeatureDirtyRangeType, IRuntimeUnitDataType } from '@univerjs/engine-formula';
2
2
  import type { ICurrentDataMatrix, IPivotCellPositionInfo, IUnitRangeNameWithSubUnitId } from '../const/type';
3
- import { Disposable, ICommandService, Injector } from '@univerjs/core';
3
+ import { Disposable, ICommandService, IConfigService, Injector } from '@univerjs/core';
4
4
  import { GlobalComputingStatusService, IFeatureCalculationManagerService } from '@univerjs/engine-formula';
5
5
  import { SheetsPivotDataSourceModel } from '../models/sheets-pivot-data-source-model';
6
6
  interface IPivotDirtyViewInfo {
@@ -14,7 +14,9 @@ export declare class PivotCalculatorController extends Disposable {
14
14
  private readonly _commandService;
15
15
  private readonly _globalComputingSrv;
16
16
  private readonly _injector;
17
- constructor(_sheetsPivotDataSourceModel: SheetsPivotDataSourceModel, _featureCalculationManagerService: IFeatureCalculationManagerService, _commandService: ICommandService, _globalComputingSrv: GlobalComputingStatusService, _injector: Injector);
17
+ private readonly _configService;
18
+ constructor(_sheetsPivotDataSourceModel: SheetsPivotDataSourceModel, _featureCalculationManagerService: IFeatureCalculationManagerService, _commandService: ICommandService, _globalComputingSrv: GlobalComputingStatusService, _injector: Injector, _configService: IConfigService);
19
+ private _isAutoDateGroupEnabled;
18
20
  _init(): void;
19
21
  private _globalSubject;
20
22
  private _globalComputedStartHelpFunc;
@@ -1,4 +1,4 @@
1
- import { PivotCallbackEnum, PivotCellStyleTypeEnum, PivotDataFieldDataTypeEnum, PivotDataFieldSortOperatorEnum, PivotDataFieldSortTypeEnum, PivotDataFieldTypeEnum, PivotDateGroupFieldDateSystemEnum, PivotDateGroupFieldDateTypeEnum, PivotFilterTypeEnum, PivotLayoutTypeEnum, PivotShowAsTypeEnum, PivotSubtotalTypeEnum, PivotTableChangeTypeEnum, PivotTableFiledAreaEnum, PivotTableValuePositionEnum, PivotViewCellValueTypeEnum, ST_PivotFilterOperatorEnum } from '@univerjs-pro/engine-pivot';
1
+ import { PivotCallbackEnum, PivotCellStyleTypeEnum, PivotDataFieldDataTypeEnum, PivotDataFieldSortOperatorEnum, PivotDataFieldSortTypeEnum, PivotDataFieldTypeEnum, PivotDateGroupFieldDateSystemEnum, PivotDateGroupFieldDateTypeEnum, PivotFilterTypeEnum, PivotLayoutTypeEnum, PivotShowAsTypeEnum, PivotSubtotalPositionEnum, PivotSubtotalTypeEnum, PivotTableChangeTypeEnum, PivotTableFiledAreaEnum, PivotTableValuePositionEnum, PivotViewCellValueTypeEnum, ST_PivotFilterOperatorEnum } from '@univerjs-pro/engine-pivot';
2
2
  import { PositionType } from '@univerjs-pro/sheets-pivot';
3
3
  /**
4
4
  * @ignore
@@ -58,6 +58,10 @@ export interface IFSheetsPivotEnumMixin {
58
58
  * Represents the layout type of a pivot table. {@link PivotLayoutTypeEnum}
59
59
  */
60
60
  PivotLayoutTypeEnum: typeof PivotLayoutTypeEnum;
61
+ /**
62
+ * Represents where row subtotals are displayed in outline layout. {@link PivotSubtotalPositionEnum}
63
+ */
64
+ PivotSubtotalPositionEnum: typeof PivotSubtotalPositionEnum;
61
65
  /**
62
66
  * Represents the callback execution timing of the pivot engine. {@link PivotCallbackEnum}
63
67
  */
@@ -1,4 +1,4 @@
1
- import type { IDataFieldValue, IPivotTableOptions, IPivotViewValueType, PivotTable, PivotTableLabelField, PivotTableValueField } from '@univerjs-pro/engine-pivot';
1
+ import type { IDataFieldValue, IPivotTableOptions, IPivotViewValueType, PivotLayoutTypeEnum, PivotTable, PivotTableLabelField, PivotTableValueField } from '@univerjs-pro/engine-pivot';
2
2
  import type { Injector } from '@univerjs/core';
3
3
  import type { IDataFieldDataArray, IDimensionInfo, IFGenericPivotFilterOptions, IPivotTableCubeConfig, IPivotTableValueOptions } from './type';
4
4
  import { DataFieldManager, PivotDataFieldDataTypeEnum, PivotTableFiledAreaEnum } from '@univerjs-pro/engine-pivot';
@@ -246,6 +246,28 @@ export declare class FGenericPivotTable {
246
246
  * ```
247
247
  */
248
248
  getPivotSourceData(): IDataFieldDataArray;
249
+ /**
250
+ * Get the layout type of the pivot table.
251
+ * @returns {PivotLayoutTypeEnum} The layout type of the pivot table.
252
+ * @example
253
+ * ```typescript
254
+ * const pivot = univerAPI.generatePivotTable(sourceData);
255
+ * const layout = pivot.getLayout();
256
+ * console.log(layout === univerAPI.Enum.PivotLayoutTypeEnum.tabular);
257
+ * ```
258
+ */
259
+ getLayout(): PivotLayoutTypeEnum;
260
+ /**
261
+ * Set the layout type of the pivot table.
262
+ * @param {PivotLayoutTypeEnum} layout - The layout type to be set.
263
+ * @returns {void}
264
+ * @example
265
+ * ```typescript
266
+ * const pivot = univerAPI.generatePivotTable(sourceData);
267
+ * pivot.setLayout(univerAPI.Enum.PivotLayoutTypeEnum.compact);
268
+ * ```
269
+ */
270
+ setLayout(layout: PivotLayoutTypeEnum): void;
249
271
  /**
250
272
  * Set the options of the pivot table.
251
273
  * @param {IPivotTableOptions} options - The options to be set.
@@ -1,7 +1,7 @@
1
1
  import type { IPivotTableLabelFieldJSON, IPivotTableOptions, IPivotTableSortInfo, IPivotTableValueFieldJSON, IPivotTableValueFilter, IValueFilterInfoItem, PivotDataFieldDataTypeEnum, PivotDateGroupFieldDateTypeEnum, PivotSubtotalTypeEnum, PivotTableValuePositionEnum } from '@univerjs-pro/engine-pivot';
2
2
  import type { IPivotTableConfig, IPivotTableMatrixInfo, IUnitRangeNameWithSubUnitId } from '@univerjs-pro/sheets-pivot';
3
3
  import type { Injector, IRange, Nullable } from '@univerjs/core';
4
- import { PivotTableFiledAreaEnum } from '@univerjs-pro/engine-pivot';
4
+ import { PivotLayoutTypeEnum, PivotTableFiledAreaEnum } from '@univerjs-pro/engine-pivot';
5
5
  interface IPivotTableDataFieldInfo {
6
6
  id: string;
7
7
  name: string;
@@ -138,6 +138,7 @@ export declare class FPivotTable {
138
138
  * @property {boolean} [mergeItems] Whether to merge repeated header items.
139
139
  * @property {boolean} [repeatRowLabels] Whether to repeat row labels.
140
140
  * @property {boolean} [showRowSubtotal] Whether to show row subtotals.
141
+ * @property {PivotSubtotalPositionEnum} [rowSubtotalPosition] Where row subtotals are displayed in outline layout.
141
142
  * @property {boolean} [showRowGrandTotal] Whether to show row grand totals.
142
143
  * @property {boolean} [showColSubtotal] Whether to show column subtotals.
143
144
  * @property {boolean} [showColGrandTotal] Whether to show column grand totals.
@@ -155,6 +156,21 @@ export declare class FPivotTable {
155
156
  * ```
156
157
  */
157
158
  getOptions(): IPivotTableOptions | undefined;
159
+ /**
160
+ * @description Get the pivot table layout type.
161
+ * @returns {PivotLayoutTypeEnum|undefined} The layout type, or undefined if the pivot table no longer exists.
162
+ *
163
+ * @example
164
+ * ```ts
165
+ * const fWorkbook = univerAPI.getActiveWorkbook();
166
+ * const fSheet = fWorkbook.getActiveSheet();
167
+ * const subUnitId = fSheet.getSheetId();
168
+ * const fPivotTable = fWorkbook.getPivotTableByCell(fWorkbook.getId(), subUnitId, 0, 8);
169
+ * const layout = fPivotTable?.getLayout();
170
+ * console.log(layout === univerAPI.Enum.PivotLayoutTypeEnum.tabular);
171
+ * ```
172
+ */
173
+ getLayout(): PivotLayoutTypeEnum | undefined;
158
174
  /**
159
175
  * @description Get the pivot table matrix cache generated by the last render.
160
176
  * @returns {IPivotTableMatrixInfo|undefined} The matrix cache or undefined if the pivot table has not rendered.
@@ -191,6 +207,7 @@ export declare class FPivotTable {
191
207
  * @property {boolean} [mergeItems] Whether to merge repeated header items.
192
208
  * @property {boolean} [repeatRowLabels] Whether to repeat row labels.
193
209
  * @property {boolean} [showRowSubtotal] Whether to show row subtotals.
210
+ * @property {PivotSubtotalPositionEnum} [rowSubtotalPosition] Where row subtotals are displayed in outline layout.
194
211
  * @property {boolean} [showRowGrandTotal] Whether to show row grand totals.
195
212
  * @property {boolean} [showColSubtotal] Whether to show column subtotals.
196
213
  * @property {boolean} [showColGrandTotal] Whether to show column grand totals.
@@ -211,6 +228,21 @@ export declare class FPivotTable {
211
228
  * ```
212
229
  */
213
230
  setOptions(options: IPivotTableOptions): Promise<boolean>;
231
+ /**
232
+ * @description Set the pivot table layout type through command. It keeps undo/redo, collaboration and render update paths consistent with panel operations.
233
+ * @param {PivotLayoutTypeEnum} layout The layout type to set.
234
+ * @returns {Promise<boolean>} Whether the pivot table layout is set successfully.
235
+ *
236
+ * @example
237
+ * ```ts
238
+ * const fWorkbook = univerAPI.getActiveWorkbook();
239
+ * const fSheet = fWorkbook.getActiveSheet();
240
+ * const subUnitId = fSheet.getSheetId();
241
+ * const fPivotTable = fWorkbook.getPivotTableByCell(fWorkbook.getId(), subUnitId, 0, 8);
242
+ * await fPivotTable?.setLayout(univerAPI.Enum.PivotLayoutTypeEnum.compact);
243
+ * ```
244
+ */
245
+ setLayout(layout: PivotLayoutTypeEnum): Promise<boolean>;
214
246
  /**
215
247
  * @description Update the source range of the pivot table through command.
216
248
  * @param {SourceInfo} dataRangeInfo The new source data range info.
@@ -243,6 +275,26 @@ export declare class FPivotTable {
243
275
  * ```
244
276
  */
245
277
  setSourceRange(dataRangeInfo: IUnitRangeNameWithSubUnitId): Promise<boolean>;
278
+ /**
279
+ * @description Update the source range of the pivot table through command. This is an alias of setSourceRange.
280
+ * @param {SourceInfo} dataRangeInfo The new source data range info.
281
+ * @returns {Promise<boolean>} Whether the source range is updated successfully.
282
+ *
283
+ * @example
284
+ * ```ts
285
+ * const fWorkbook = univerAPI.getActiveWorkbook();
286
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
287
+ * if (!fWorksheet) return;
288
+ * const fPivotTable = fWorkbook.getPivotTableByCell(fWorkbook.getId(), fWorksheet.getSheetId(), 0, 8);
289
+ * await fPivotTable?.updateSourceRange({
290
+ * unitId: fWorkbook.getId(),
291
+ * subUnitId: fWorksheet.getSheetId(),
292
+ * sheetName: fWorksheet.getSheetName(),
293
+ * range: { startRow: 0, endRow: 100, startColumn: 0, endColumn: 6 }
294
+ * });
295
+ * ```
296
+ */
297
+ updateSourceRange(dataRangeInfo: IUnitRangeNameWithSubUnitId): Promise<boolean>;
246
298
  /**
247
299
  * @description Clear the fields by provided field area or clear all fields.
248
300
  * @param {PivotTableFiledAreaEnum} [resetArea] The area of the field to reset or undefined to reset all fields.
@@ -1,8 +1,11 @@
1
+ export { BIDI_ISOLATE_END, BIDI_ISOLATE_START, bidiIsolateText, hasRTLText, isolateTextForBidiContext } from './bidi';
1
2
  export { AddPivotFieldCommand } from './commands/command/add-pivot-field.command';
2
3
  export type { IAddPivotFieldCommandParams } from './commands/command/add-pivot-field.command';
3
4
  export { AddPivotTableWithConfigCommand } from './commands/command/add-pivot-table-with-config.command';
4
5
  export { AddPivotTableCommand } from './commands/command/add-pivot-table.command';
5
6
  export type { IAddPivotTableCommandParams } from './commands/command/add-pivot-table.command';
7
+ export { getPivotDateGroupContext, isPivotDateGroupTypeDisabled, PIVOT_DATE_GROUP_TYPES } from './commands/command/date-group-util';
8
+ export type { IPivotDateGroupContext } from './commands/command/date-group-util';
6
9
  export { MovePivotFieldCommand } from './commands/command/move-pivot-field.command';
7
10
  export type { IMovePivotFieldCommandParams } from './commands/command/move-pivot-field.command';
8
11
  export { MovePivotTableCommand } from './commands/command/move-pivot-table.command';
@@ -17,10 +20,13 @@ export { ResetPivotFieldsConfigCommand } from './commands/command/reset-pivot-fi
17
20
  export type { IResetPivotFieldsConfigCommandParams } from './commands/command/reset-pivot-fields-config.command';
18
21
  export { SetPivotCollapseCommand } from './commands/command/set-pivot-collapse.command';
19
22
  export type { ISetPivotCollapseCommandParams } from './commands/command/set-pivot-collapse.command';
23
+ export { SetPivotDateGroupCommand } from './commands/command/set-pivot-date-group.command';
24
+ export type { ISetPivotDateGroupCommandParams } from './commands/command/set-pivot-date-group.command';
20
25
  export { SetPivotFieldsConfigCommand } from './commands/command/set-pivot-fields-config.command';
21
26
  export type { ISetPivotFieldsConfigCommandParams } from './commands/command/set-pivot-fields-config.command';
22
27
  export { SetPivotFilterCommand } from './commands/command/set-pivot-filter.command';
23
28
  export type { ISetPivotFilterCommandParams } from './commands/command/set-pivot-filter.command';
29
+ export { SetPivotLayoutCommand } from './commands/command/set-pivot-layout.command';
24
30
  export { SetPivotOptionCommand } from './commands/command/set-pivot-option.command';
25
31
  export { SetPivotSortCommand } from './commands/command/set-pivot-sort.command';
26
32
  export type { ISetPivotSortCommandParams } from './commands/command/set-pivot-sort.command';
@@ -43,6 +49,7 @@ export { RenamePivotFieldMutation } from './commands/mutations/rename-pivot-fiel
43
49
  export { SetPivotCollapseMutation } from './commands/mutations/set-pivot-collapse.mutation';
44
50
  export { SetPivotFieldFormatMutation } from './commands/mutations/set-pivot-field-format.mutation';
45
51
  export { SetPivotFilterMutation } from './commands/mutations/set-pivot-filter.mutation';
52
+ export { SetPivotLayoutMutation } from './commands/mutations/set-pivot-layout.mutation';
46
53
  export { SetPivotOptionMutation } from './commands/mutations/set-pivot-option.mutation';
47
54
  export { SetPivotPositionMutation } from './commands/mutations/set-pivot-position.mutation';
48
55
  export { SetPivotSortMutation } from './commands/mutations/set-pivot-sort.mutation';
@@ -53,12 +60,12 @@ export { UpdatePivotFieldSourceInfoMutation } from './commands/mutations/update-
53
60
  export { UpdatePivotTableSourceRangeMutation } from './commands/mutations/update-pivot-table-source.mutation';
54
61
  export { UpdateValuePositionMutation } from './commands/mutations/update-value-position.mutation';
55
62
  export { PivotTableViewDirtyMarkOperation } from './commands/operations/pivot-table-dirty-view.operation';
63
+ export { SHEETS_PIVOT_PLUGIN_CONFIG_KEY } from './config/config';
64
+ export type { IUniverSheetsPivotConfig } from './config/config';
56
65
  export { BLANK_ROW_COUNT, getAdjustRangesPosition, PivotDisplayDataType, PositionType, SHEET_PIVOT_TABLE_PLUGIN } from './const/const';
57
66
  export { DEFAULT_PIVOT_NUMBER, defaultThemeStyle, transFromCellValue } from './const/const';
58
- export type { IAddPivotFieldMutationParams, IAddPivotTableMutationParams, IPivotCellPositionInfo, IPivotPanelDataInfo, IPivotPanelSourceList, IPivotPanelTableListItemBase, IPivotRangesInfo, IPivotRenderCache, IPivotTableAddedEventParams, IPivotTableCellData, IPivotTableConfig, IPivotTableMatrixInfo, IPivotTableMovedEventParams, IPivotTableRemovedEventParams, IPivotTableRenderedEventParams, IPivotTableUpdatedEventParams, IPivotViewUpdateInfo, IRangePosition, IRemovePivotFieldMutationParams, IRemovePivotTableMutationParams, IRenamePivotFieldMutationParams, ISetPivotCollapseMutation, ISetPivotFieldFormatMutationParams, ISetPivotFilterMutationParams, ISetPivotOptionMutationParams, ISetPivotPositionMutationParams, ISetPivotSortMutationParams, ISetPivotSubtotalTypeMutationParams, ISetPivotValueFilterMutationParams, IUnitRangeNameWithSubUnitId, IUpdateFieldPositionMutationParams, IUpdatePivotFieldSourceInfoMutationParams, IUpdateValuePositionMutationParams, } from './const/type';
67
+ export type { IAddPivotFieldMutationParams, IAddPivotTableMutationParams, IPivotCellPositionInfo, IPivotPanelDataInfo, IPivotPanelSourceList, IPivotPanelTableListItemBase, IPivotRangesInfo, IPivotRenderCache, IPivotTableAddedEventParams, IPivotTableCellData, IPivotTableConfig, IPivotTableMatrixInfo, IPivotTableMovedEventParams, IPivotTableRemovedEventParams, IPivotTableRenderedEventParams, IPivotTableUpdatedEventParams, IPivotViewUpdateInfo, IRangePosition, IRemovePivotFieldMutationParams, IRemovePivotTableMutationParams, IRenamePivotFieldMutationParams, ISetPivotCollapseMutation, ISetPivotFieldFormatMutationParams, ISetPivotFilterMutationParams, ISetPivotLayoutMutationParams, ISetPivotOptionMutationParams, ISetPivotPositionMutationParams, ISetPivotSortMutationParams, ISetPivotSubtotalTypeMutationParams, ISetPivotValueFilterMutationParams, IUnitRangeNameWithSubUnitId, IUpdateFieldPositionMutationParams, IUpdatePivotFieldSourceInfoMutationParams, IUpdateValuePositionMutationParams, } from './const/type';
59
68
  export { PivotTableOperationEnum } from './const/type';
60
- export { SHEETS_PIVOT_PLUGIN_CONFIG_KEY } from './controllers/config.schema';
61
- export type { IUniverSheetsPivotConfig } from './controllers/config.schema';
62
69
  export { SheetsPivotTableConfigModel } from './models/sheets-pivot-config-model';
63
70
  export { SheetsPivotDataSourceModel } from './models/sheets-pivot-data-source-model';
64
71
  export { SheetsPivotTableAdaptorModel } from './models/sheets-pivot-table-adaptor-model';
@@ -7,6 +7,8 @@ declare const locale: {
7
7
  subTotalText: string;
8
8
  grandTotalText: string;
9
9
  valueText: string;
10
+ rowLabels: string;
11
+ columnLabels: string;
10
12
  averageName: string;
11
13
  countName: string;
12
14
  countNumsName: string;
@@ -23,6 +25,13 @@ declare const locale: {
23
25
  value: string;
24
26
  blank: string;
25
27
  other: string;
28
+ renderText: {
29
+ valueField: string;
30
+ subtotal: string;
31
+ grandTotal: string;
32
+ multipleGrandTotal: string;
33
+ subtotalWithValue: string;
34
+ };
26
35
  emptyPivot: {
27
36
  filter: string;
28
37
  row: string;
@@ -33,8 +42,10 @@ declare const locale: {
33
42
  year: string;
34
43
  month: string;
35
44
  day: string;
45
+ date: string;
36
46
  hour: string;
37
47
  minute: string;
48
+ hourMinute: string;
38
49
  quarter: string;
39
50
  monthDate: string;
40
51
  yearQuarter: string;
@@ -0,0 +1,3 @@
1
+ import type { LocaleLeafKeys } from '@univerjs/core';
2
+ import type enUS from './en-US';
3
+ export type LocaleKey = LocaleLeafKeys<typeof enUS>;
@@ -1,4 +1,4 @@
1
- import type { IUniverSheetsPivotConfig } from './controllers/config.schema';
1
+ import type { IUniverSheetsPivotConfig } from './config/config';
2
2
  import { ICommandService, IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
3
3
  import { DataSyncPrimaryController } from '@univerjs/rpc';
4
4
  export declare class UniverSheetsPivotTablePlugin extends Plugin {
@@ -1,17 +1,18 @@
1
1
  import type { IPivotPerformCheckParams } from '../const/type';
2
- import { AsyncInterceptorManager, Disposable, InterceptorManager } from '@univerjs/core';
2
+ import { AsyncInterceptorManager, Disposable, InterceptorManager, LocaleService } from '@univerjs/core';
3
3
  import { SheetInterceptorService } from '@univerjs/sheets';
4
4
  import { SheetsPivotTableAdaptorModel } from '../models/sheets-pivot-table-adaptor-model';
5
5
  export declare class SheetsPivotTableService extends Disposable {
6
6
  private _sheetInterceptorService;
7
7
  private _sheetsPivotTableAdaptorModel;
8
+ private _localeService;
8
9
  readonly asyncInterceptor: AsyncInterceptorManager<{
9
10
  PIVOT_PERFORM_CHECK: import("@univerjs/core").IAsyncInterceptor<boolean, IPivotPerformCheckParams>;
10
11
  }>;
11
12
  readonly interceptor: InterceptorManager<{
12
13
  PIVOT_MUTATION_GENERATE: import("@univerjs/core").IInterceptor<import("@univerjs/core").IUndoRedoCommandInfosByInterceptor, IPivotPerformCheckParams>;
13
14
  }>;
14
- constructor(_sheetInterceptorService: SheetInterceptorService, _sheetsPivotTableAdaptorModel: SheetsPivotTableAdaptorModel);
15
+ constructor(_sheetInterceptorService: SheetInterceptorService, _sheetsPivotTableAdaptorModel: SheetsPivotTableAdaptorModel, _localeService: LocaleService);
15
16
  private _init;
16
17
  getPivotPerformCheck(params: IPivotPerformCheckParams): Promise<import("@univerjs/core").Nullable<boolean>>;
17
18
  private _initViewModelBySheetInterceptor;