@univerjs-pro/sheets-pivot 0.2.7

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 (51) hide show
  1. package/README.md +34 -0
  2. package/lib/cjs/index.js +1 -0
  3. package/lib/es/index.js +1 -0
  4. package/lib/locale/en-US.json +30 -0
  5. package/lib/locale/ru-RU.json +30 -0
  6. package/lib/locale/vi-VN.json +30 -0
  7. package/lib/locale/zh-CN.json +30 -0
  8. package/lib/locale/zh-TW.json +30 -0
  9. package/lib/types/commands/command/add-pivot-table-with-config.command.d.ts +4 -0
  10. package/lib/types/commands/command/util.d.ts +13 -0
  11. package/lib/types/commands/mutations/add-pivot-field.mutation.d.ts +4 -0
  12. package/lib/types/commands/mutations/add-pivot-table.mutation.d.ts +4 -0
  13. package/lib/types/commands/mutations/change-apply-util.d.ts +15 -0
  14. package/lib/types/commands/mutations/pivot-data-communication.mutation.d.ts +7 -0
  15. package/lib/types/commands/mutations/remove-pivot-field.mutation.d.ts +4 -0
  16. package/lib/types/commands/mutations/remove-pivot-table.mutation.d.ts +4 -0
  17. package/lib/types/commands/mutations/rename-pivot-field.mutation.d.ts +4 -0
  18. package/lib/types/commands/mutations/set-pivot-collapse.mutation.d.ts +4 -0
  19. package/lib/types/commands/mutations/set-pivot-field-format.mutation.d.ts +4 -0
  20. package/lib/types/commands/mutations/set-pivot-filter.mutation.d.ts +4 -0
  21. package/lib/types/commands/mutations/set-pivot-option.mutation.d.ts +4 -0
  22. package/lib/types/commands/mutations/set-pivot-position.mutation.d.ts +4 -0
  23. package/lib/types/commands/mutations/set-pivot-sort.mutation.d.ts +4 -0
  24. package/lib/types/commands/mutations/set-pivot-subtotal-type.mutation.d.ts +4 -0
  25. package/lib/types/commands/mutations/update-field-position.mutation.d.ts +4 -0
  26. package/lib/types/commands/mutations/update-pivot-field-source-info.mutation.d.ts +4 -0
  27. package/lib/types/commands/mutations/update-pivot-table-source.mutation.d.ts +4 -0
  28. package/lib/types/commands/mutations/update-value-position.mutation.d.ts +4 -0
  29. package/lib/types/commands/operations/pivot-table-dirty-view.operation.d.ts +4 -0
  30. package/lib/types/const/const.d.ts +95 -0
  31. package/lib/types/const/template.d.ts +886 -0
  32. package/lib/types/const/type.d.ts +492 -0
  33. package/lib/types/controllers/sheets-pivot-caculate.controller.d.ts +44 -0
  34. package/lib/types/controllers/sheets-pivot-rpc.controller.d.ts +21 -0
  35. package/lib/types/index.d.ts +28 -0
  36. package/lib/types/locale/en-US.d.ts +4 -0
  37. package/lib/types/locale/ru-RU.d.ts +4 -0
  38. package/lib/types/locale/vi-VN.d.ts +4 -0
  39. package/lib/types/locale/zh-CN.d.ts +31 -0
  40. package/lib/types/locale/zh-TW.d.ts +4 -0
  41. package/lib/types/models/sheets-pivot-config-model.d.ts +58 -0
  42. package/lib/types/models/sheets-pivot-data-field-manager.d.ts +99 -0
  43. package/lib/types/models/sheets-pivot-data-source-model.d.ts +136 -0
  44. package/lib/types/models/sheets-pivot-table-adaptor-model.d.ts +43 -0
  45. package/lib/types/models/view-util.d.ts +17 -0
  46. package/lib/types/plugin.d.ts +21 -0
  47. package/lib/types/services/sheets-pivot-rpc.service.d.ts +12 -0
  48. package/lib/types/services/sheets-pivot-table.service.d.ts +11 -0
  49. package/lib/types/util.d.ts +40 -0
  50. package/lib/umd/index.js +1 -0
  51. package/package.json +94 -0
@@ -0,0 +1,4 @@
1
+ import { IMutation } from '@univerjs/core';
2
+ import { IRemovePivotTableMutationParams } from '../../const/type';
3
+
4
+ export declare const RemovePivotTableMutation: IMutation<IRemovePivotTableMutationParams>;
@@ -0,0 +1,4 @@
1
+ import { IMutation } from '@univerjs/core';
2
+ import { IRenamePivotFieldMutationParams } from '../../const/type';
3
+
4
+ export declare const RenamePivotFieldMutation: IMutation<IRenamePivotFieldMutationParams>;
@@ -0,0 +1,4 @@
1
+ import { IMutation } from '@univerjs/core';
2
+ import { ISetPivotCollapseMutation } from '../../const/type';
3
+
4
+ export declare const SetPivotCollapseMutation: IMutation<ISetPivotCollapseMutation>;
@@ -0,0 +1,4 @@
1
+ import { IMutation } from '@univerjs/core';
2
+ import { ISetPivotFieldFormatMutationParams } from '../../const/type';
3
+
4
+ export declare const SetPivotFieldFormatMutation: IMutation<ISetPivotFieldFormatMutationParams>;
@@ -0,0 +1,4 @@
1
+ import { IMutation } from '@univerjs/core';
2
+ import { ISetPivotFilterMutationParams } from '../../const/type';
3
+
4
+ export declare const SetPivotFilterMutation: IMutation<ISetPivotFilterMutationParams>;
@@ -0,0 +1,4 @@
1
+ import { IMutation } from '@univerjs/core';
2
+ import { ISetPivotOptionMutationParams } from '../../const/type';
3
+
4
+ export declare const SetPivotOptionMutation: IMutation<ISetPivotOptionMutationParams>;
@@ -0,0 +1,4 @@
1
+ import { IMutation } from '@univerjs/core';
2
+ import { ISetPivotPositionMutationParams } from '../../const/type';
3
+
4
+ export declare const SetPivotPositionMutation: IMutation<ISetPivotPositionMutationParams>;
@@ -0,0 +1,4 @@
1
+ import { IMutation } from '@univerjs/core';
2
+ import { ISetPivotSortMutationParams } from '../../const/type';
3
+
4
+ export declare const SetPivotSortMutation: IMutation<ISetPivotSortMutationParams>;
@@ -0,0 +1,4 @@
1
+ import { IMutation } from '@univerjs/core';
2
+ import { ISetPivotSubtotalTypeMutationParams } from '../../const/type';
3
+
4
+ export declare const SetPivotSubtotalTypeMutation: IMutation<ISetPivotSubtotalTypeMutationParams>;
@@ -0,0 +1,4 @@
1
+ import { IMutation } from '@univerjs/core';
2
+ import { IUpdateFieldPositionMutationParams } from '../../const/type';
3
+
4
+ export declare const UpdateFieldPositionMutation: IMutation<IUpdateFieldPositionMutationParams>;
@@ -0,0 +1,4 @@
1
+ import { IMutation } from '@univerjs/core';
2
+ import { IUpdatePivotFieldSourceInfoMutationParams } from '../../const/type';
3
+
4
+ export declare const UpdatePivotFieldSourceInfoMutation: IMutation<IUpdatePivotFieldSourceInfoMutationParams>;
@@ -0,0 +1,4 @@
1
+ import { IMutation } from '@univerjs/core';
2
+ import { IUpdatePivotTableSourceRangeMutationParams } from '../../const/type';
3
+
4
+ export declare const UpdatePivotTableSourceRangeMutation: IMutation<IUpdatePivotTableSourceRangeMutationParams>;
@@ -0,0 +1,4 @@
1
+ import { IMutation } from '@univerjs/core';
2
+ import { IUpdateValuePositionMutationParams } from '../../const/type';
3
+
4
+ export declare const UpdateValuePositionMutation: IMutation<IUpdateValuePositionMutationParams>;
@@ -0,0 +1,4 @@
1
+ import { IMutation } from '@univerjs/core';
2
+ import { IPivotTableViewDirtyMarkOperationParams } from '../../const/type';
3
+
4
+ export declare const PivotTableViewDirtyMarkOperation: IMutation<IPivotTableViewDirtyMarkOperationParams>;
@@ -0,0 +1,95 @@
1
+ import { IPivotViewCellData, IPivotViewValueType, PivotView, PivotViewItem } from '@univerjs-pro/pivot-engine';
2
+ import { Injector, IRange } from '@univerjs/core';
3
+ import { default as zhCN } from '../locale/zh-CN';
4
+ import { IAdjustPivotTableRes, IPivotTableConfig, IThemeStyle } from './type';
5
+
6
+ export declare const SHEET_PIVOT_TABLE_PLUGIN = "SHEET_PIVOT_TABLE_PLUGIN";
7
+ export declare const BLANK_ROW_COUNT = 1;
8
+ export declare const BLANK_COL_COUNT = 1;
9
+ export declare const PIVOT_COL_HEADER_FROM = 1;
10
+ export declare const DEFAULT_FONT_LEFT_PADDING = 15;
11
+ export declare const DEFAULT_FIELD_BG_COLOR = "rgb(240,241,243)";
12
+ export declare const DEFAULT_DATA_BG_COLOR = "rgb(255,255,255)";
13
+ export declare const DEFAULT_PIVOT_BORDER_COLOR = "#b2b2b2";
14
+ export declare const DEFAULT_PIVOT_PAGE_VIEW_BG = "#f4f4f5";
15
+ export declare const DEFAULT_PIVOT_LEAF_VIEW_BG = "#f4f4f5";
16
+ export declare const DEFAULT_PIVOT_CORNER_VIEW_VG = "#eceeff";
17
+ export declare const DEFAULT_PIVOT_GRAND_TOTAL_BG = "#1d32e9";
18
+ export declare const DEFAULT_PIVOT_GRAND_TOTAL_CL = "#FFFFFF";
19
+ export declare const DEFAULT_PIVOT_SUB_TOTAL_BG = "#e6ebfa";
20
+ export declare const DEFAULT_PIVOT_COL_VIEW_BG = "#1d32e9";
21
+ export declare const DEFAULT_PIVOT_COL_VIEW_CL = "#FFFFFF";
22
+ export declare const DEFAULT_PIVOT_ROW_VIEW_BG = "#e6ebfb";
23
+ export declare const DEFAULT_PIVOT_DATA_VIEW_BG = "#e6ebfb";
24
+ export declare enum PositionType {
25
+ Exiting = "exiting",
26
+ New = "new"
27
+ }
28
+ export declare const localeTemplate: typeof zhCN;
29
+ export declare const PIVOT_TABLE_QUERY_DELAY = 30;
30
+ export declare const defaultEmptyPivotFieldCellStyle: {
31
+ bg: {
32
+ rgb: string;
33
+ };
34
+ ht: number;
35
+ vt: number;
36
+ tb: number;
37
+ };
38
+ export declare const defaultEmptyPivotDataCellStyle: {
39
+ bg: {
40
+ rgb: string;
41
+ };
42
+ ht: number;
43
+ vt: number;
44
+ tb: number;
45
+ };
46
+ export declare const defaultThemeStyle: IThemeStyle;
47
+ export declare const generatorAdjustPositionData: (injector: Injector, data: PivotView, pivotTableConfig: IPivotTableConfig, textInfo: Record<string, string>) => IAdjustPivotTableRes;
48
+ export declare function transFromCellValue(cellData: IPivotViewCellData, isValue: boolean, format: string | undefined, textInfo: Record<string, string>): IPivotViewValueType;
49
+ export declare function transformErrorValue(value: IPivotViewValueType): string | number | import('@univerjs-pro/pivot-engine').IPivotViewPrefixValue | undefined;
50
+ export declare function getAdjustRangesPosition(startCell: {
51
+ row: number;
52
+ col: number;
53
+ }, view: PivotViewItem, singleCellIsRange?: boolean, useLast?: boolean): IRange[];
54
+ export declare const SHEET_PIVOT_IN_MAIN_THREAD = "SHEET_PIVOT_IN_MAIN_THREAD";
55
+ export declare enum PivotDisplayDataType {
56
+ Filter = "filter",
57
+ Panel = "panel",
58
+ AddPivotField = "addPivotField",
59
+ AddPivotTableWithConfig = "AddPivotTableWithConfig",
60
+ AddPivotTable = "addPivotTable",
61
+ MovePivotField = "movePivotField",
62
+ RemovePivotField = "removePivotField",
63
+ SetPivotCollapse = "setPivotCollapse",
64
+ SetPivotFilter = "setPivotFilter",
65
+ SetPivotSort = "setPivotSort",
66
+ SetPivotSetting = "setPivotSetting",
67
+ UpdatePivotSource = "updatePivotSource",
68
+ UpdateValuePosition = "updateValuePosition"
69
+ }
70
+ export declare const defaultTextInfo: {
71
+ 'sheets-pivot.blankValue': string;
72
+ 'sheets-pivot.columnName': string;
73
+ 'sheets-pivot.subTotalText': string;
74
+ 'sheets-pivot.grandTotalText': string;
75
+ 'sheets-pivot.valueText': string;
76
+ 'sheets-pivot.averageName': string;
77
+ 'sheets-pivot.countName': string;
78
+ 'sheets-pivot.countNumsName': string;
79
+ 'sheets-pivot.maxName': string;
80
+ 'sheets-pivot.minName': string;
81
+ 'sheets-pivot.productName': string;
82
+ 'sheets-pivot.stdDevName': string;
83
+ 'sheets-pivot.stdDevpName': string;
84
+ 'sheets-pivot.sumName': string;
85
+ 'sheets-pivot.varName': string;
86
+ 'sheets-pivot.varpName': string;
87
+ 'sheets-pivot.subTotal': string;
88
+ 'sheets-pivot.grandTotal': string;
89
+ 'sheets-pivot.value': string;
90
+ 'sheets-pivot.blank': string;
91
+ 'sheets-pivot.emptyPivot.filter': string;
92
+ 'sheets-pivot.emptyPivot.row': string;
93
+ 'sheets-pivot.emptyPivot.column': string;
94
+ 'sheets-pivot.emptyPivot.values': string;
95
+ };