@univerjs-pro/sheets-pivot 0.24.0 → 0.25.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 -0
- package/lib/cjs/locale/ca-ES.js +1 -1
- package/lib/cjs/locale/de-DE.js +1 -0
- 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 -0
- package/lib/cjs/locale/it-IT.js +1 -0
- 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 -0
- package/lib/cjs/locale/pt-BR.js +1 -0
- 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 -0
- 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 -0
- package/lib/es/locale/ca-ES.js +1 -1
- package/lib/es/locale/de-DE.js +1 -0
- 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 -0
- package/lib/es/locale/it-IT.js +1 -0
- 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 -0
- package/lib/es/locale/pt-BR.js +1 -0
- 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 -0
- 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 -0
- package/lib/locale/ca-ES.js +1 -1
- package/lib/locale/de-DE.js +1 -0
- 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 -0
- package/lib/locale/it-IT.js +1 -0
- package/lib/locale/ja-JP.js +1 -1
- package/lib/locale/ko-KR.js +1 -1
- package/lib/locale/pl-PL.js +1 -0
- package/lib/locale/pt-BR.js +1 -0
- 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 -0
- package/lib/locale/zh-TW.js +1 -1
- package/lib/types/commands/command/remove-pivot-table.command.d.ts +17 -0
- package/lib/types/facade/f-enum.d.ts +29 -1
- package/lib/types/facade/f-generic-pivot-table.d.ts +22 -22
- package/lib/types/facade/f-pivot-table.d.ts +338 -42
- package/lib/types/facade/f-workbook.d.ts +12 -17
- package/lib/types/facade/f-worksheet.d.ts +3 -2
- package/lib/types/index.d.ts +3 -1
- package/lib/types/locale/ar-SA.d.ts +3 -0
- package/lib/types/locale/ca-ES.d.ts +1 -1
- package/lib/types/locale/de-DE.d.ts +3 -0
- package/lib/types/locale/en-US.d.ts +1 -0
- package/lib/types/locale/es-ES.d.ts +1 -1
- package/lib/types/locale/fr-FR.d.ts +1 -1
- package/lib/types/locale/id-ID.d.ts +3 -0
- package/lib/types/locale/it-IT.d.ts +3 -0
- package/lib/types/locale/pl-PL.d.ts +3 -0
- package/lib/types/locale/pt-BR.d.ts +3 -0
- package/lib/types/locale/zh-HK.d.ts +3 -0
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ar-SA.js +1 -0
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -0
- 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 -0
- package/lib/umd/locale/it-IT.js +1 -0
- 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 -0
- package/lib/umd/locale/pt-BR.js +1 -0
- 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 -0
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +10 -10
|
@@ -28,9 +28,9 @@ export declare class FGenericPivotTable {
|
|
|
28
28
|
* ]
|
|
29
29
|
* const pivot = univerAPI.generatePivotTable(sourceData);
|
|
30
30
|
* // The returned labelField can be used to call settings for filtering, sorting, etc.
|
|
31
|
-
* const labelField = pivot.addFieldWithName('区域', PivotTableFiledAreaEnum.Row);
|
|
31
|
+
* const labelField = pivot.addFieldWithName('区域', univerAPI.Enum.PivotTableFiledAreaEnum.Row);
|
|
32
32
|
* // The returned valueField can be used to set the summary mode, display mode, etc.
|
|
33
|
-
* const valueField = pivot.addFieldWithName('数量', PivotTableFiledAreaEnum.Value);
|
|
33
|
+
* const valueField = pivot.addFieldWithName('数量', univerAPI.Enum.PivotTableFiledAreaEnum.Value);
|
|
34
34
|
* ```
|
|
35
35
|
*/
|
|
36
36
|
addFieldWithName(name: string, area: PivotTableFiledAreaEnum): PivotTableLabelField | PivotTableValueField;
|
|
@@ -48,19 +48,19 @@ export declare class FGenericPivotTable {
|
|
|
48
48
|
* ]
|
|
49
49
|
* const pivot = univerAPI.generatePivotTable(sourceData);
|
|
50
50
|
* pivot.addFilterFieldWithName('数量',{
|
|
51
|
-
* type: PivotFilterTypeEnum.CustomFilter,
|
|
52
|
-
* operator:
|
|
51
|
+
* type: univerAPI.Enum.PivotFilterTypeEnum.CustomFilter,
|
|
52
|
+
* operator: univerAPI.Enum.PivotFilterOperatorEnum.valueEqual,
|
|
53
53
|
* expected: 38,
|
|
54
54
|
* });
|
|
55
|
-
* pivot.addFieldWithName('区域',PivotTableFiledAreaEnum.Row);
|
|
56
|
-
* pivot.addFieldWithName('数量',PivotTableFiledAreaEnum.Value);
|
|
55
|
+
* pivot.addFieldWithName('区域', univerAPI.Enum.PivotTableFiledAreaEnum.Row);
|
|
56
|
+
* pivot.addFieldWithName('数量', univerAPI.Enum.PivotTableFiledAreaEnum.Value);
|
|
57
57
|
* // At this time, there will only be one data with a value equal to 38
|
|
58
58
|
* const res = pivot.getResultByCalculate().dataArr;
|
|
59
59
|
* console.log('debugger res',res);
|
|
60
60
|
*
|
|
61
61
|
* pivot.reset();
|
|
62
|
-
* pivot.addFieldWithName('区域',PivotTableFiledAreaEnum.Row);
|
|
63
|
-
* pivot.addFieldWithName('数量',PivotTableFiledAreaEnum.Value);
|
|
62
|
+
* pivot.addFieldWithName('区域', univerAPI.Enum.PivotTableFiledAreaEnum.Row);
|
|
63
|
+
* pivot.addFieldWithName('数量', univerAPI.Enum.PivotTableFiledAreaEnum.Value);
|
|
64
64
|
* // There will only be two pieces of data at this time
|
|
65
65
|
* const resNew = pivot.getResultByCalculate().dataArr;
|
|
66
66
|
* console.log('debugger res new',resNew);
|
|
@@ -80,8 +80,8 @@ export declare class FGenericPivotTable {
|
|
|
80
80
|
* ["北部", "辽宁", "沈阳", "fruit", "葡萄", 45, "2023-08-31"]
|
|
81
81
|
* ]
|
|
82
82
|
* const pivot = univerAPI.generatePivotTable(sourceData);
|
|
83
|
-
* pivot.addFieldWithName('区域',PivotTableFiledAreaEnum.Row);
|
|
84
|
-
* pivot.addValueFieldWithName('数量',{subtotal: PivotSubtotalTypeEnum.average});
|
|
83
|
+
* pivot.addFieldWithName('区域', univerAPI.Enum.PivotTableFiledAreaEnum.Row);
|
|
84
|
+
* pivot.addValueFieldWithName('数量', { subtotal: univerAPI.Enum.PivotSubtotalTypeEnum.average });
|
|
85
85
|
* const res = pivot.getResultByCalculate().dataArr;
|
|
86
86
|
* console.log('debugger res',res);
|
|
87
87
|
* ```
|
|
@@ -99,7 +99,7 @@ export declare class FGenericPivotTable {
|
|
|
99
99
|
* ["北部", "辽宁", "沈阳", "fruit", "葡萄", 45, "2023-08-31"]
|
|
100
100
|
* ]
|
|
101
101
|
* const pivot = univerAPI.generatePivotTable(sourceData);
|
|
102
|
-
* const labelField = pivot.addFieldWithName('区域', PivotTableFiledAreaEnum.Row);
|
|
102
|
+
* const labelField = pivot.addFieldWithName('区域', univerAPI.Enum.PivotTableFiledAreaEnum.Row);
|
|
103
103
|
* // There is a `区域` in the row dimension of the pivot table
|
|
104
104
|
* const dimensionInfo = pivot.getDimensionInfo();
|
|
105
105
|
* pivot.removeFieldWithName('区域');
|
|
@@ -122,9 +122,9 @@ export declare class FGenericPivotTable {
|
|
|
122
122
|
* ["北部", "辽宁", "沈阳", "fruit", "葡萄", 45, "2023-08-31"]
|
|
123
123
|
* ]
|
|
124
124
|
* const pivot = univerAPI.generatePivotTable(sourceData);
|
|
125
|
-
* const rowField = pivot.addFieldWithName('区域', PivotTableFiledAreaEnum.Row);
|
|
126
|
-
* const columnField = pivot.addFieldWithName('省份', PivotTableFiledAreaEnum.Row);
|
|
127
|
-
* const valueField = pivot.addFieldWithName('数量', PivotTableFiledAreaEnum.Value);
|
|
125
|
+
* const rowField = pivot.addFieldWithName('区域', univerAPI.Enum.PivotTableFiledAreaEnum.Row);
|
|
126
|
+
* const columnField = pivot.addFieldWithName('省份', univerAPI.Enum.PivotTableFiledAreaEnum.Row);
|
|
127
|
+
* const valueField = pivot.addFieldWithName('数量', univerAPI.Enum.PivotTableFiledAreaEnum.Value);
|
|
128
128
|
* const result = pivot.getResultByCalculate({showRowGrandTotal: true, showRowSubTotal: true}).dataArr;
|
|
129
129
|
* console.log('debugger', result);
|
|
130
130
|
* ```
|
|
@@ -149,7 +149,7 @@ export declare class FGenericPivotTable {
|
|
|
149
149
|
* ["北部", "辽宁", "沈阳", "fruit", "葡萄", 45, "2023-08-31"]
|
|
150
150
|
* ]
|
|
151
151
|
* const pivot = univerAPI.generatePivotTable(sourceData);
|
|
152
|
-
* const rowField = pivot.addFieldWithName('区域', PivotTableFiledAreaEnum.Row);
|
|
152
|
+
* const rowField = pivot.addFieldWithName('区域', univerAPI.Enum.PivotTableFiledAreaEnum.Row);
|
|
153
153
|
* pivot.reset();
|
|
154
154
|
* // The dimension information returns empty because it is reset.
|
|
155
155
|
* const newDimensionInfo = pivot.getDimensionInfo();
|
|
@@ -168,9 +168,9 @@ export declare class FGenericPivotTable {
|
|
|
168
168
|
* ["北部", "辽宁", "沈阳", "fruit", "葡萄", 45, "2023-08-31"]
|
|
169
169
|
* ]
|
|
170
170
|
* const pivot = univerAPI.generatePivotTable(sourceData);
|
|
171
|
-
* const rowField = pivot.addFieldWithName('区域', PivotTableFiledAreaEnum.Row);
|
|
172
|
-
* const valueField = pivot.addFieldWithName('数量', PivotTableFiledAreaEnum.Value);
|
|
173
|
-
* pivot.reset(PivotTableFiledAreaEnum.Row);
|
|
171
|
+
* const rowField = pivot.addFieldWithName('区域', univerAPI.Enum.PivotTableFiledAreaEnum.Row);
|
|
172
|
+
* const valueField = pivot.addFieldWithName('数量', univerAPI.Enum.PivotTableFiledAreaEnum.Value);
|
|
173
|
+
* pivot.reset(univerAPI.Enum.PivotTableFiledAreaEnum.Row);
|
|
174
174
|
* // The returned dimension information only contains the value dimension because the row dimension is reset.
|
|
175
175
|
* const newDimensionInfo = pivot.getDimensionInfo();
|
|
176
176
|
* console.log('debugger', newDimensionInfo)
|
|
@@ -191,7 +191,7 @@ export declare class FGenericPivotTable {
|
|
|
191
191
|
* ]
|
|
192
192
|
* const pivot = univerAPI.generatePivotTable(sourceData);
|
|
193
193
|
* const dataType = pivot.getFieldDataTypeByColumnIndex(4);
|
|
194
|
-
* console.log('debugger', dataType); // PivotDataFieldDataTypeEnum.number
|
|
194
|
+
* console.log('debugger', dataType); // univerAPI.Enum.PivotDataFieldDataTypeEnum.number
|
|
195
195
|
* ```
|
|
196
196
|
*/
|
|
197
197
|
getFieldDataTypeByColumnIndex(index: number): PivotDataFieldDataTypeEnum | undefined;
|
|
@@ -209,7 +209,7 @@ export declare class FGenericPivotTable {
|
|
|
209
209
|
* ]
|
|
210
210
|
* const pivot = univerAPI.generatePivotTable(sourceData);
|
|
211
211
|
* const dataType = pivot.getFieldDataTypeByFieldName('数量');
|
|
212
|
-
* console.log('debugger', dataType); // PivotDataFieldDataTypeEnum.number
|
|
212
|
+
* console.log('debugger', dataType); // univerAPI.Enum.PivotDataFieldDataTypeEnum.number
|
|
213
213
|
* ```
|
|
214
214
|
*/
|
|
215
215
|
getFieldDataTypeByFieldName(name: string): PivotDataFieldDataTypeEnum | undefined;
|
|
@@ -224,8 +224,8 @@ export declare class FGenericPivotTable {
|
|
|
224
224
|
* ["北部", "辽宁", "沈阳", "fruit", "葡萄", 45, "2023-08-31"]
|
|
225
225
|
* ]
|
|
226
226
|
* const pivot = univerAPI.generatePivotTable(sourceData);
|
|
227
|
-
* pivot.addFieldWithName('商品', PivotTableFiledAreaEnum.Column);
|
|
228
|
-
* pivot.addFieldWithName('区域', PivotTableFiledAreaEnum.Row);
|
|
227
|
+
* pivot.addFieldWithName('商品', univerAPI.Enum.PivotTableFiledAreaEnum.Column);
|
|
228
|
+
* pivot.addFieldWithName('区域', univerAPI.Enum.PivotTableFiledAreaEnum.Row);
|
|
229
229
|
* const newDimensionInfo = pivot.getDimensionInfo();
|
|
230
230
|
* console.log('debugger', newDimensionInfo);
|
|
231
231
|
* ```
|