@univerjs-pro/sheets-pivot 1.3.0 → 1.4.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.
Files changed (108) 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/cjs/plugin-BEqPlwOa.js +1 -0
  23. package/lib/cjs/plugin-Bcso0Fyb.js +1 -0
  24. package/lib/cjs/worker.js +1 -0
  25. package/lib/es/facade.js +1 -1
  26. package/lib/es/index.js +1 -1
  27. package/lib/es/locale/ar-SA.js +1 -1
  28. package/lib/es/locale/ca-ES.js +1 -1
  29. package/lib/es/locale/de-DE.js +1 -1
  30. package/lib/es/locale/en-US.js +1 -1
  31. package/lib/es/locale/es-ES.js +1 -1
  32. package/lib/es/locale/fa-IR.js +1 -1
  33. package/lib/es/locale/fr-FR.js +1 -1
  34. package/lib/es/locale/id-ID.js +1 -1
  35. package/lib/es/locale/it-IT.js +1 -1
  36. package/lib/es/locale/ja-JP.js +1 -1
  37. package/lib/es/locale/ko-KR.js +1 -1
  38. package/lib/es/locale/pl-PL.js +1 -1
  39. package/lib/es/locale/pt-BR.js +1 -1
  40. package/lib/es/locale/ru-RU.js +1 -1
  41. package/lib/es/locale/sk-SK.js +1 -1
  42. package/lib/es/locale/vi-VN.js +1 -1
  43. package/lib/es/locale/zh-CN.js +1 -1
  44. package/lib/es/locale/zh-HK.js +1 -1
  45. package/lib/es/locale/zh-TW.js +1 -1
  46. package/lib/es/plugin-BtMniDHc.js +1 -0
  47. package/lib/es/plugin-qOgShIxC.js +1 -0
  48. package/lib/es/worker.js +1 -0
  49. package/lib/facade.js +1 -1
  50. package/lib/index.js +1 -1
  51. package/lib/locale/ar-SA.js +1 -1
  52. package/lib/locale/ca-ES.js +1 -1
  53. package/lib/locale/de-DE.js +1 -1
  54. package/lib/locale/en-US.js +1 -1
  55. package/lib/locale/es-ES.js +1 -1
  56. package/lib/locale/fa-IR.js +1 -1
  57. package/lib/locale/fr-FR.js +1 -1
  58. package/lib/locale/id-ID.js +1 -1
  59. package/lib/locale/it-IT.js +1 -1
  60. package/lib/locale/ja-JP.js +1 -1
  61. package/lib/locale/ko-KR.js +1 -1
  62. package/lib/locale/pl-PL.js +1 -1
  63. package/lib/locale/pt-BR.js +1 -1
  64. package/lib/locale/ru-RU.js +1 -1
  65. package/lib/locale/sk-SK.js +1 -1
  66. package/lib/locale/vi-VN.js +1 -1
  67. package/lib/locale/zh-CN.js +1 -1
  68. package/lib/locale/zh-HK.js +1 -1
  69. package/lib/locale/zh-TW.js +1 -1
  70. package/lib/plugin-BtMniDHc.js +1 -0
  71. package/lib/plugin-qOgShIxC.js +1 -0
  72. package/lib/types/commands/command/date-group-util.d.ts +3 -1
  73. package/lib/types/commands/command/set-pivot-date-filter.command.d.ts +11 -0
  74. package/lib/types/commands/command/set-pivot-filter.command.d.ts +2 -0
  75. package/lib/types/commands/mutations/change-apply-util.d.ts +1 -1
  76. package/lib/types/const/const.d.ts +4 -3
  77. package/lib/types/const/template.d.ts +21 -21
  78. package/lib/types/const/type.d.ts +44 -3
  79. package/lib/types/facade/f-pivot-table.d.ts +28 -1
  80. package/lib/types/index.d.ts +8 -5
  81. package/lib/types/models/sheets-pivot-config-model.d.ts +1 -1
  82. package/lib/types/plugin.d.ts +1 -1
  83. package/lib/types/services/sheets-pivot-table.service.d.ts +16 -2
  84. package/lib/types/util.d.ts +1 -1
  85. package/lib/types/worker.d.ts +1 -0
  86. package/lib/umd/facade.js +1 -1
  87. package/lib/umd/index.js +1 -1
  88. package/lib/umd/locale/ar-SA.js +1 -1
  89. package/lib/umd/locale/ca-ES.js +1 -1
  90. package/lib/umd/locale/de-DE.js +1 -1
  91. package/lib/umd/locale/en-US.js +1 -1
  92. package/lib/umd/locale/es-ES.js +1 -1
  93. package/lib/umd/locale/fa-IR.js +1 -1
  94. package/lib/umd/locale/fr-FR.js +1 -1
  95. package/lib/umd/locale/id-ID.js +1 -1
  96. package/lib/umd/locale/it-IT.js +1 -1
  97. package/lib/umd/locale/ja-JP.js +1 -1
  98. package/lib/umd/locale/ko-KR.js +1 -1
  99. package/lib/umd/locale/pl-PL.js +1 -1
  100. package/lib/umd/locale/pt-BR.js +1 -1
  101. package/lib/umd/locale/ru-RU.js +1 -1
  102. package/lib/umd/locale/sk-SK.js +1 -1
  103. package/lib/umd/locale/vi-VN.js +1 -1
  104. package/lib/umd/locale/zh-CN.js +1 -1
  105. package/lib/umd/locale/zh-HK.js +1 -1
  106. package/lib/umd/locale/zh-TW.js +1 -1
  107. package/lib/worker.js +1 -0
  108. package/package.json +21 -16
@@ -1,5 +1,7 @@
1
- import type { IFieldsCollectionJSON, IPivotTableSnapshot } from '@univerjs-pro/engine-pivot';
1
+ import type { IBaseGroupFieldJSON, IFieldsCollectionJSON, IPivotTableSnapshot, PivotTable } from '@univerjs-pro/engine-pivot';
2
2
  import { PivotDateGroupFieldDateTypeEnum, PivotTableFiledAreaEnum } from '@univerjs-pro/engine-pivot';
3
+ /** Removes date-group dimensions from a preview, retaining each original source on its axis. */
4
+ export declare function removePivotDateGroups(pivotTable: PivotTable): IBaseGroupFieldJSON[];
3
5
  export declare const PIVOT_DATE_GROUP_TYPES: PivotDateGroupFieldDateTypeEnum[];
4
6
  export interface IPivotDateGroupContext {
5
7
  kind: 'source-date' | 'date-group';
@@ -0,0 +1,11 @@
1
+ import type { IPivotTableCustomFilter } from '@univerjs-pro/engine-pivot';
2
+ import type { ICommand } from '@univerjs/core';
3
+ export interface ISetPivotDateFilterCommandParams {
4
+ unitId: string;
5
+ subUnitId: string;
6
+ pivotTableId: string;
7
+ tableFieldId: string;
8
+ /** Undefined clears only an existing fixed date condition. */
9
+ filterInfo: IPivotTableCustomFilter | undefined;
10
+ }
11
+ export declare const SetPivotDateFilterCommand: ICommand<ISetPivotDateFilterCommandParams>;
@@ -26,5 +26,7 @@ export interface ISetPivotFilterCommandParams {
26
26
  * @property {boolean} isAll The flag to set all items. True means all items, false means only the items in the items array.
27
27
  */
28
28
  isAll?: boolean;
29
+ /** Clears every filter category on this source field, not only the checklist selection. */
30
+ clearAllFilters?: boolean;
29
31
  }
30
32
  export declare const SetPivotFilterCommand: ICommand<ISetPivotFilterCommandParams>;
@@ -1,6 +1,6 @@
1
1
  import type { IPivotTableSnapshot } from '@univerjs-pro/engine-pivot';
2
- import type { IAddPivotFieldMutationParams, IRemovePivotFieldMutationParams, IRenamePivotFieldMutationParams, ISetPivotCollapseMutation, ISetPivotFieldFormatMutationParams, ISetPivotFilterMutationParams, ISetPivotLayoutMutationParams, ISetPivotOptionMutationParams, ISetPivotShowDataAsMutationParams, ISetPivotSortMutationParams, ISetPivotSubtotalTypeMutationParams, ISetPivotValueFilterMutationParams, IUpdateFieldPositionMutationParams, IUpdatePivotFieldSourceInfoMutationParams, IUpdateValuePositionMutationParams } from '../../const/type';
3
2
  import { PivotTableFiledAreaEnum } from '@univerjs-pro/engine-pivot';
3
+ import type { IAddPivotFieldMutationParams, IRemovePivotFieldMutationParams, IRenamePivotFieldMutationParams, ISetPivotCollapseMutation, ISetPivotFieldFormatMutationParams, ISetPivotFilterMutationParams, ISetPivotLayoutMutationParams, ISetPivotOptionMutationParams, ISetPivotShowDataAsMutationParams, ISetPivotSortMutationParams, ISetPivotSubtotalTypeMutationParams, ISetPivotValueFilterMutationParams, IUpdateFieldPositionMutationParams, IUpdatePivotFieldSourceInfoMutationParams, IUpdateValuePositionMutationParams } from '../../const/type';
4
4
  export declare function getFieldListByArea(config: IPivotTableSnapshot, area: PivotTableFiledAreaEnum): string[];
5
5
  export declare function applyAddFieldChangeSet(config: IPivotTableSnapshot, change: IAddPivotFieldMutationParams): void;
6
6
  export declare function applyRemoveFieldChangeSet(config: IPivotTableSnapshot, change: IRemovePivotFieldMutationParams): void;
@@ -1,9 +1,9 @@
1
1
  import type { IPivotTableDateGroupInfo, IPivotTableNumberGroupInfo, IPivotViewCellData, IPivotViewValueType, PivotView, PivotViewItem } from '@univerjs-pro/engine-pivot';
2
2
  import type { Injector, IRange } from '@univerjs/core';
3
- import type enUS from '../locale/en-US';
4
- import type { IAdjustPivotTableRes, IPivotTableConfig, IThemeStyle } from './type';
5
3
  import { PivotDateGroupFieldDateTypeEnum } from '@univerjs-pro/engine-pivot';
6
4
  import { DateSystem } from '@univerjs/core';
5
+ import type enUS from '../locale/en-US';
6
+ import type { IAdjustPivotTableRes, IPivotTableConfig, IThemeStyle } from './type';
7
7
  export declare const BUILD_TIMESTAMP: number;
8
8
  export declare const PIVOT_ICON_OFFSET = 16;
9
9
  export declare const DEFAULT_PIVOT_NUMBER = 1;
@@ -62,7 +62,7 @@ export declare const defaultThemeStyle: IThemeStyle;
62
62
  export declare function getDateGroupDisplayArgs(dateType: PivotDateGroupFieldDateTypeEnum, dateStr: string): string[] | undefined;
63
63
  export declare function getExcelDateGroupStr(injector: Injector, group: IPivotTableDateGroupInfo, key: number, dateSystem: DateSystem): string;
64
64
  export declare function getNumberGroupStr(injector: Injector, group: IPivotTableNumberGroupInfo, key: number | string): string;
65
- export declare const generatorAdjustPositionData: (injector: Injector, data: PivotView, pivotTableConfig: IPivotTableConfig, textInfo: Record<string, string>, direction?: "ltr" | "rtl", dateSystem?: DateSystem) => IAdjustPivotTableRes;
65
+ export declare const generatorAdjustPositionData: (injector: Injector, data: PivotView, pivotTableConfig: IPivotTableConfig, textInfo: Record<string, string>, direction?: 'ltr' | 'rtl', dateSystem?: DateSystem) => IAdjustPivotTableRes;
66
66
  export declare function transFromCellValue(cellData: IPivotViewCellData, isValue: boolean, format: string | undefined, textInfo: Record<string, string>, multipleGrandTotalLabel?: string, subtotalLabel?: string, dateSystem?: DateSystem): IPivotViewValueType;
67
67
  export declare function formatPivotRenderText(textInfo: Record<string, string>, templateKey: string, fallbackTemplate: string, ...args: unknown[]): string;
68
68
  export declare function transformErrorValue(value: IPivotViewValueType): string | number | import("@univerjs-pro/engine-pivot/types/layout-type.js").IPivotViewPrefixValue | undefined;
@@ -88,6 +88,7 @@ export declare enum PivotDisplayDataType {
88
88
  UpdateValuePosition = "updateValuePosition",
89
89
  DrillDown = "drillDown",
90
90
  SetValuePivotFilter = "setValuePivotFilter",
91
+ SetPivotDateFilter = "setPivotDateFilter",
91
92
  SetPivotTableConfig = "setPivotTableConfig",
92
93
  ResetPivotTable = "resetPivotTable",
93
94
  SetOption = "setOption",
@@ -297,27 +297,27 @@ export declare const template: {
297
297
  isBottomTotal: boolean;
298
298
  colPathMap: {
299
299
  '': number;
300
- 'E2-%$%-\u9ED1\u9F99\u6C5F': number;
301
- 'E2-%$%-\u9ED1\u9F99\u6C5F-&&-86-%$%-fruit': number;
302
- 'E2-%$%-\u798F\u5EFA': number;
303
- 'E2-%$%-\u798F\u5EFA-&&-86-%$%-fruit': number;
304
- 'E2-%$%-\u6CB3\u5357': number;
305
- 'E2-%$%-\u6CB3\u5357-&&-86-%$%-fruit': number;
306
- 'E2-%$%-\u9655\u897F': number;
307
- 'E2-%$%-\u9655\u897F-&&-86-%$%-fruit': number;
308
- 'E2-%$%-\u5E7F\u897F': number;
309
- 'E2-%$%-\u5E7F\u897F-&&-86-%$%-fruit': number;
310
- 'E2-%$%-\u8FBD\u5B81': number;
311
- 'E2-%$%-\u8FBD\u5B81-&&-86-%$%-fruit': number;
312
- 'E2-%$%-\u5E7F\u4E1C': number;
313
- 'E2-%$%-\u5E7F\u4E1C-&&-86-%$%-fruit': number;
314
- 'E2-%$%-\u6CB3\u5357-&&-86-%$%-vegetable': number;
315
- 'E2-%$%-\u798F\u5EFA-&&-86-%$%-vegetable': number;
316
- 'E2-%$%-\u8FBD\u5B81-&&-86-%$%-vegetable': number;
317
- 'E2-%$%-\u9ED1\u9F99\u6C5F-&&-86-%$%-vegetable': number;
318
- 'E2-%$%-\u5E7F\u897F-&&-86-%$%-vegetable': number;
319
- 'E2-%$%-\u5E7F\u4E1C-&&-86-%$%-vegetable': number;
320
- 'E2-%$%-\u9655\u897F-&&-86-%$%-vegetable': number;
300
+ 'E2-%$%-黑龙江': number;
301
+ 'E2-%$%-黑龙江-&&-86-%$%-fruit': number;
302
+ 'E2-%$%-福建': number;
303
+ 'E2-%$%-福建-&&-86-%$%-fruit': number;
304
+ 'E2-%$%-河南': number;
305
+ 'E2-%$%-河南-&&-86-%$%-fruit': number;
306
+ 'E2-%$%-陕西': number;
307
+ 'E2-%$%-陕西-&&-86-%$%-fruit': number;
308
+ 'E2-%$%-广西': number;
309
+ 'E2-%$%-广西-&&-86-%$%-fruit': number;
310
+ 'E2-%$%-辽宁': number;
311
+ 'E2-%$%-辽宁-&&-86-%$%-fruit': number;
312
+ 'E2-%$%-广东': number;
313
+ 'E2-%$%-广东-&&-86-%$%-fruit': number;
314
+ 'E2-%$%-河南-&&-86-%$%-vegetable': number;
315
+ 'E2-%$%-福建-&&-86-%$%-vegetable': number;
316
+ 'E2-%$%-辽宁-&&-86-%$%-vegetable': number;
317
+ 'E2-%$%-黑龙江-&&-86-%$%-vegetable': number;
318
+ 'E2-%$%-广西-&&-86-%$%-vegetable': number;
319
+ 'E2-%$%-广东-&&-86-%$%-vegetable': number;
320
+ 'E2-%$%-陕西-&&-86-%$%-vegetable': number;
321
321
  };
322
322
  })[];
323
323
  };
@@ -1,5 +1,6 @@
1
- import type { DataField, FieldsCollection, IBaseGroupFieldJSON, IDataFieldManagerBaseJSON, IExcelDateGrouping, IFieldsCollectionJSON, ILabelViewHeaderMapItem, IManualGroup, INumberGrouping, IPivotTableChangeSet, IPivotTableFilterInfo, IPivotTableLabelFieldJSON, IPivotTableOptions, IPivotTableShowDataAsInfo, IPivotTableSnapshot, IPivotTableSortInfo, IPivotTableValueFieldJSON, IPivotTableValueFilter, IPivotViewInfo, IPivotViewJSON, IPivotViewValueType, PivotCellStyleTypeEnum, PivotDataFieldDataTypeEnum, PivotDateGroupFieldDateTypeEnum, PivotLayoutTypeEnum, PivotSubtotalTypeEnum, PivotTableChangeTypeEnum, PivotTableFiledAreaEnum, PivotTableValuePositionEnum, PivotView } from '@univerjs-pro/engine-pivot';
1
+ import type { DataField, FieldsCollection, IBaseGroupFieldJSON, IDataFieldManagerBaseJSON, IExcelDateGrouping, IFieldsCollectionJSON, ILabelViewHeaderMapItem, IManualGroup, INumberGrouping, IPivotTableChangeSet, IPivotTableCustomFilter, IPivotTableFilterInfo, IPivotTableLabelFieldJSON, IPivotTableOptions, IPivotTableShowDataAsInfo, IPivotTableSnapshot, IPivotTableSortInfo, IPivotTableValueFieldJSON, IPivotTableValueFilter, IPivotViewInfo, IPivotViewJSON, IPivotViewValueType, PivotCellStyleTypeEnum, PivotDataFieldDataTypeEnum, PivotDateGroupFieldDateTypeEnum, PivotLayoutTypeEnum, PivotSubtotalTypeEnum, PivotTableChangeTypeEnum, PivotTableConditionFilter, PivotTableFiledAreaEnum, PivotTableValuePositionEnum, PivotView } from '@univerjs-pro/engine-pivot';
2
2
  import type { CellValueType, ICellData, IRange, IStyleData, IUndoRedoCommandInfosByInterceptor, IUnitRangeName, Nullable, ObjectMatrix } from '@univerjs/core';
3
+ import type { IMutationPairGroup } from '../commands/command/util';
3
4
  import type { PivotDisplayDataType, PositionType } from './const';
4
5
  export interface IPivotPerformCheckParams {
5
6
  cellInfo: IPivotCellPositionInfo;
@@ -14,13 +15,44 @@ export interface IPivotManualFilterCoordinationParams {
14
15
  items: string[];
15
16
  partialItems?: string[];
16
17
  isAll?: boolean;
18
+ clearAllFilters?: boolean;
17
19
  }
18
20
  export interface IPivotManualFilterCoordinationResult {
19
21
  handled: boolean;
20
22
  result: boolean;
21
23
  }
24
+ export type PivotDateFilterCoordinationParams = {
25
+ unitId: string;
26
+ subUnitId: string;
27
+ tableFieldId: string;
28
+ filterInfo: IPivotTableCustomFilter | undefined;
29
+ } & ({
30
+ pivotTableId: string;
31
+ pivotChartId?: never;
32
+ } | {
33
+ pivotChartId: string;
34
+ pivotTableId?: never;
35
+ });
22
36
  export declare const PIVOT_PERFORM_CHECK: import("@univerjs/core").IAsyncInterceptor<boolean, IPivotPerformCheckParams>;
23
- export declare const PIVOT_MANUAL_FILTER_COORDINATION: import("@univerjs/core").IAsyncInterceptor<IPivotManualFilterCoordinationResult, IPivotManualFilterCoordinationParams>;
37
+ export declare const PIVOT_MANUAL_FILTER_COORDINATION: import("@univerjs/core").IAsyncInterceptor<IPivotManualFilterCoordinationResult, IPivotManualFilterCoordinationParams | (Omit<IPivotManualFilterCoordinationParams, "pivotTableId"> & {
38
+ pivotChartId: string;
39
+ pivotTableId?: never;
40
+ })>;
41
+ export declare const PIVOT_DATE_FILTER_COORDINATION: import("@univerjs/core").IAsyncInterceptor<IPivotManualFilterCoordinationResult, PivotDateFilterCoordinationParams>;
42
+ export interface IPivotOptionFilterCoordinationResult extends IUndoRedoCommandInfosByInterceptor {
43
+ groups: IMutationPairGroup[];
44
+ validate: () => void;
45
+ }
46
+ export declare const PIVOT_OPTION_FILTER_COORDINATION: import("@univerjs/core").IAsyncInterceptor<IPivotOptionFilterCoordinationResult, {
47
+ unitId: string;
48
+ subUnitId: string;
49
+ } & ({
50
+ pivotTableId: string;
51
+ pivotChartId?: never;
52
+ } | {
53
+ pivotChartId: string;
54
+ pivotTableId?: never;
55
+ })>;
24
56
  export declare const PIVOT_MUTATION_GENERATE: import("@univerjs/core").IInterceptor<IUndoRedoCommandInfosByInterceptor, IPivotPerformCheckParams>;
25
57
  export declare const PIVOT_FIELD_REMOVE_COORDINATION: import("@univerjs/core").IInterceptor<string[], {
26
58
  unitId: string;
@@ -188,7 +220,8 @@ export interface ISetPivotFilterMutationParams {
188
220
  subUnitId: string;
189
221
  pivotTableId: string;
190
222
  fieldId: string;
191
- filterInfo: IPivotTableFilterInfo;
223
+ filterInfo: IPivotTableFilterInfo | undefined;
224
+ conditionFilter?: PivotTableConditionFilter | null;
192
225
  isAll?: boolean;
193
226
  }
194
227
  export interface ISetPivotValueFilterMutationParams {
@@ -386,6 +419,8 @@ export interface IGetAddPivotFieldDataParams {
386
419
  index: number;
387
420
  }
388
421
  export interface IPivotDisplayFilterInfo {
422
+ conditionFilter?: PivotTableConditionFilter;
423
+ supportsDateFilter?: boolean;
389
424
  tableFieldId: string;
390
425
  pivotTableId: string;
391
426
  items: string[];
@@ -442,6 +477,7 @@ export interface IGetPivotFilterDataParams {
442
477
  items: string[];
443
478
  partialItems?: string[];
444
479
  isAll?: boolean;
480
+ clearAllFilters?: boolean;
445
481
  }
446
482
  export interface IGetPivotValueFilterDataParams {
447
483
  tableFieldId: string;
@@ -523,6 +559,10 @@ export interface IGetPivotDataLocalMutationParams extends IPivotLocalMutationBas
523
559
  resetPivotTable?: IResetPivotTableDataParams;
524
560
  drillDown?: IGetPivotDrillDownDataParams;
525
561
  setValuePivotFilter?: IGetPivotValueFilterDataParams;
562
+ setPivotDateFilter?: {
563
+ tableFieldId: string;
564
+ filterInfo: IPivotTableCustomFilter | undefined;
565
+ };
526
566
  setOptions?: IGetPivotOptionParams;
527
567
  setPivotLayout?: IGetPivotLayoutParams;
528
568
  setPivotDateGroup?: IGetPivotDateGroupParams;
@@ -560,6 +600,7 @@ export interface IPivotDisplayResult {
560
600
  };
561
601
  drillDown?: IPivotDrillDownInfo;
562
602
  setValuePivotFilter?: IPivotDisplayBaseInfo;
603
+ setPivotDateFilter?: IPivotDisplayBaseInfo;
563
604
  setPivotTableConfig?: IPivotDisplayBaseInfo;
564
605
  resetPivotTable?: IPivotDisplayBaseInfo;
565
606
  setPivotOption?: IPivotDisplayBaseInfo;
@@ -1,4 +1,4 @@
1
- import type { IExcelDateGrouping, IManualGroup, INumberGrouping, IPivotTableLabelFieldJSON, IPivotTableOptions, IPivotTableShowDataAsInfo, IPivotTableSortInfo, IPivotTableValueFieldJSON, IPivotTableValueFilter, IValueFilterInfoItem, PivotDataFieldDataTypeEnum, PivotDateGroupFieldDateTypeEnum, PivotDateGroupingMode, PivotSubtotalTypeEnum, PivotTableValuePositionEnum } from '@univerjs-pro/engine-pivot';
1
+ import type { IExcelDateGrouping, IManualGroup, INumberGrouping, IPivotTableCustomFilter, IPivotTableLabelFieldJSON, IPivotTableOptions, IPivotTableShowDataAsInfo, IPivotTableSortInfo, IPivotTableValueFieldJSON, IPivotTableValueFilter, IValueFilterInfoItem, PivotDataFieldDataTypeEnum, PivotDateGroupFieldDateTypeEnum, PivotDateGroupingMode, 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
4
  import { PivotLayoutTypeEnum, PivotTableFiledAreaEnum } from '@univerjs-pro/engine-pivot';
@@ -861,6 +861,33 @@ export declare class FPivotTable extends FBase {
861
861
  * ```
862
862
  */
863
863
  clearValueFilter(fieldId: string): Promise<boolean>;
864
+ /**
865
+ * Gets a detached fixed date condition for a label field.
866
+ * @param {string} fieldId The table-field identifier.
867
+ * @returns {IPivotTableCustomFilter | undefined} The date condition, or undefined when absent.
868
+ */
869
+ getDateFilter(fieldId: string): IPivotTableCustomFilter | undefined;
870
+ /**
871
+ * Sets a fixed date condition through an undoable command. Whole-day comparison defaults to false.
872
+ * @param {string} fieldId The table-field identifier.
873
+ * @param {Omit<IPivotTableCustomFilter, 'type'>} [filterInfo] The date condition. Omit to clear only a date condition.
874
+ * @returns {Promise<boolean>} Whether the condition was applied without overwriting an active slicer filter.
875
+ * @example
876
+ * ```ts
877
+ * await pivotTable.setDateFilter(fieldId, {
878
+ * operator: univerAPI.Enum.ST_PivotFilterOperatorEnum.dateEqual,
879
+ * expected: 45293,
880
+ * useWholeDay: true,
881
+ * });
882
+ * ```
883
+ */
884
+ setDateFilter(fieldId: string, filterInfo?: Omit<IPivotTableCustomFilter, 'type'>): Promise<boolean>;
885
+ /**
886
+ * Clears only an existing fixed date condition through command.
887
+ * @param {string} fieldId The table-field identifier.
888
+ * @returns {Promise<boolean>} Whether a date condition was cleared.
889
+ */
890
+ clearDateFilter(fieldId: string): Promise<boolean>;
864
891
  /**
865
892
  * @description Rename the pivot table field.
866
893
  * @param {string} fieldId - The field id.
@@ -4,7 +4,7 @@ export type { IAddPivotFieldCommandParams } from './commands/command/add-pivot-f
4
4
  export { AddPivotTableWithConfigCommand } from './commands/command/add-pivot-table-with-config.command';
5
5
  export { AddPivotTableCommand } from './commands/command/add-pivot-table.command';
6
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';
7
+ export { getPivotDateGroupContext, isPivotDateGroupTypeDisabled, PIVOT_DATE_GROUP_TYPES, removePivotDateGroups, } from './commands/command/date-group-util';
8
8
  export type { IPivotDateGroupContext } from './commands/command/date-group-util';
9
9
  export { MovePivotFieldCommand } from './commands/command/move-pivot-field.command';
10
10
  export type { IMovePivotFieldCommandParams } from './commands/command/move-pivot-field.command';
@@ -19,6 +19,7 @@ export { SetPivotCollapseByFieldCommand } from './commands/command/set-pivot-col
19
19
  export type { ISetPivotCollapseByFieldCommandParams } from './commands/command/set-pivot-collapse-by-field.command';
20
20
  export { SetPivotCollapseCommand } from './commands/command/set-pivot-collapse.command';
21
21
  export type { ISetPivotCollapseCommandParams } from './commands/command/set-pivot-collapse.command';
22
+ export { SetPivotDateFilterCommand } from './commands/command/set-pivot-date-filter.command';
22
23
  export { SetPivotDateGroupCommand } from './commands/command/set-pivot-date-group.command';
23
24
  export { SetPivotExcelDateGroupCommand } from './commands/command/set-pivot-excel-date-group.command';
24
25
  export { SetPivotFieldsConfigCommand } from './commands/command/set-pivot-fields-config.command';
@@ -39,6 +40,8 @@ export { UpdatePivotTableSourceRangeCommand } from './commands/command/update-pi
39
40
  export type { IUpdatePivotTableSourceRangeCommandParams } from './commands/command/update-pivot-source.command';
40
41
  export { UpdatePivotValuePositionCommand } from './commands/command/update-value-position.command';
41
42
  export type { IUpdatePivotValuePositionCommandParams } from './commands/command/update-value-position.command';
43
+ export { applyChangeSet, executeWithRollback } from './commands/command/util';
44
+ export type { IMutationPairGroup } from './commands/command/util';
42
45
  export { AddPivotFieldMutation } from './commands/mutations/add-pivot-field.mutation';
43
46
  export { AddPivotTableMutation } from './commands/mutations/add-pivot-table.mutation';
44
47
  export { SendPivotViewLocalMutation } from './commands/mutations/pivot-data-communication.mutation';
@@ -59,9 +62,9 @@ export { UpdatePivotTableSourceRangeMutation } from './commands/mutations/update
59
62
  export { UpdateValuePositionMutation } from './commands/mutations/update-value-position.mutation';
60
63
  export { SHEETS_PIVOT_PLUGIN_CONFIG_KEY } from './config/config';
61
64
  export type { IUniverSheetsPivotConfig } from './config/config';
62
- export { BLANK_ROW_COUNT, getAdjustRangesPosition, PivotDisplayDataType, PositionType, SHEET_PIVOT_TABLE_PLUGIN, } from './const/const';
63
- export type { IAddPivotTableMutationParams, IPivotCellPositionInfo, IPivotCollectionChange, IPivotManualFilterCoordinationParams, IPivotManualFilterCoordinationResult, IPivotPanelDataInfo, IPivotPanelSourceList, IPivotPanelTableListItemBase, IPivotRangesInfo, IPivotReportScope, IPivotTableAddedEventParams, IPivotTableCellData, IPivotTableConfig, IPivotTableMatrixInfo, IPivotTableMovedEventParams, IPivotTableRemovedEventParams, IPivotTableRenderedEventParams, IPivotViewUpdateInfo, IRemovePivotTableMutationParams, ISendPivotViewLocalMutationParams, ISetPivotLayoutMutationParams, ISetPivotOptionMutationParams, IUnitRangeNameWithSubUnitId, } from './const/type';
64
- export { PIVOT_FIELD_REMOVE_COORDINATION, PIVOT_MANUAL_FILTER_COORDINATION, PivotTableOperationEnum, } from './const/type';
65
+ export { BLANK_ROW_COUNT, getAdjustRangesPosition, getExcelDateGroupStr, PivotDisplayDataType, PositionType, SHEET_PIVOT_TABLE_PLUGIN, } from './const/const';
66
+ export type { IAddPivotTableMutationParams, IPivotCellPositionInfo, IPivotCollectionChange, IPivotManualFilterCoordinationParams, IPivotManualFilterCoordinationResult, IPivotOptionFilterCoordinationResult, IPivotPanelDataInfo, IPivotPanelSourceList, IPivotPanelTableListItemBase, IPivotRangesInfo, IPivotReportScope, IPivotTableAddedEventParams, IPivotTableCellData, IPivotTableConfig, IPivotTableMatrixInfo, IPivotTableMovedEventParams, IPivotTableRemovedEventParams, IPivotTableRenderedEventParams, IPivotViewUpdateInfo, IRemovePivotTableMutationParams, ISendPivotViewLocalMutationParams, ISetPivotFilterMutationParams, ISetPivotLayoutMutationParams, ISetPivotOptionMutationParams, ISetPivotValueFilterMutationParams, IUnitRangeNameWithSubUnitId, } from './const/type';
67
+ export { PIVOT_DATE_FILTER_COORDINATION, PIVOT_FIELD_REMOVE_COORDINATION, PIVOT_MANUAL_FILTER_COORDINATION, PIVOT_OPTION_FILTER_COORDINATION, PivotTableOperationEnum, } from './const/type';
65
68
  export { PivotCalculatorController } from './controllers/sheets-pivot-caculate.controller';
66
69
  export { getOrCreatePivotSheetCopyPlan, PIVOT_SHEET_COPY_CONTEXT_KEY, remapPivotReportDataFields, } from './models/pivot-sheet-copy-plan';
67
70
  export type { IPivotSheetCopyPlan, IPivotSheetCopyPlanEntry, IPivotSheetCopyScope, IPivotSheetCopySource, IPivotSheetDataFieldCopyContext, } from './models/pivot-sheet-copy-plan';
@@ -70,7 +73,7 @@ export { SheetsPivotTableConfigModel } from './models/sheets-pivot-config-model'
70
73
  export { SheetsPivotDataSourceModel } from './models/sheets-pivot-data-source-model';
71
74
  export { SheetsPivotTableAdaptorModel } from './models/sheets-pivot-table-adaptor-model';
72
75
  export { UniverSheetsPivotTablePlugin } from './plugin';
73
- export { compilePivotRecordFilter, getSlicerSelectionFromPivotManualFilter } from './record-filter-bridge';
76
+ export { compilePivotRecordFilter, getPivotRecordFilterItemState, getSlicerSelectionFromPivotManualFilter } from './record-filter-bridge';
74
77
  export { SheetsPivotCacheService } from './services/sheets-pivot-cache.service';
75
78
  export { SheetsPivotRPCService } from './services/sheets-pivot-rpc.service';
76
79
  export { SheetsPivotTableService } from './services/sheets-pivot-table.service';
@@ -24,7 +24,7 @@ export declare class SheetsPivotTableConfigModel extends Disposable {
24
24
  private readonly _runtimeState$;
25
25
  readonly runtimeState$: import("rxjs").Observable<{
26
26
  unitId: string;
27
- state: "initializing" | "ready" | "error";
27
+ state: 'initializing' | 'ready' | 'error';
28
28
  }>;
29
29
  private _pivotTableRangeInfo;
30
30
  private _pivotTableMatrixInfo;
@@ -1,6 +1,6 @@
1
- import type { IUniverSheetsPivotConfig } from './config/config';
2
1
  import { ICommandService, IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
3
2
  import { DataSyncPrimaryController } from '@univerjs/rpc';
3
+ import type { IUniverSheetsPivotConfig } from './config/config';
4
4
  export declare class UniverSheetsPivotTablePlugin extends Plugin {
5
5
  private readonly _config;
6
6
  readonly _injector: Injector;
@@ -1,13 +1,27 @@
1
- import type { IPivotPerformCheckParams } from '../const/type';
2
1
  import { AsyncInterceptorManager, Disposable, InterceptorManager, LocaleService } from '@univerjs/core';
3
2
  import { SheetInterceptorService } from '@univerjs/sheets';
3
+ import type { IPivotPerformCheckParams } from '../const/type';
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
8
  private _localeService;
9
9
  readonly asyncInterceptor: AsyncInterceptorManager<{
10
- PIVOT_MANUAL_FILTER_COORDINATION: import("@univerjs/core").IAsyncInterceptor<import("..").IPivotManualFilterCoordinationResult, import("..").IPivotManualFilterCoordinationParams>;
10
+ PIVOT_DATE_FILTER_COORDINATION: import("@univerjs/core").IAsyncInterceptor<import("..").IPivotManualFilterCoordinationResult, import("../const/type").PivotDateFilterCoordinationParams>;
11
+ PIVOT_MANUAL_FILTER_COORDINATION: import("@univerjs/core").IAsyncInterceptor<import("..").IPivotManualFilterCoordinationResult, import("..").IPivotManualFilterCoordinationParams | (Omit<import("..").IPivotManualFilterCoordinationParams, "pivotTableId"> & {
12
+ pivotChartId: string;
13
+ pivotTableId?: never;
14
+ })>;
15
+ PIVOT_OPTION_FILTER_COORDINATION: import("@univerjs/core").IAsyncInterceptor<import("..").IPivotOptionFilterCoordinationResult, {
16
+ unitId: string;
17
+ subUnitId: string;
18
+ } & ({
19
+ pivotTableId: string;
20
+ pivotChartId?: never;
21
+ } | {
22
+ pivotChartId: string;
23
+ pivotTableId?: never;
24
+ })>;
11
25
  PIVOT_PERFORM_CHECK: import("@univerjs/core").IAsyncInterceptor<boolean, IPivotPerformCheckParams>;
12
26
  }>;
13
27
  readonly interceptor: InterceptorManager<{
@@ -13,7 +13,7 @@ export declare const generateDefaultEmptyCache: (textOptions: {
13
13
  }, startCell: {
14
14
  row: number;
15
15
  col: number;
16
- }, direction?: "ltr" | "rtl") => {
16
+ }, direction?: 'ltr' | 'rtl') => {
17
17
  matrixCache: ObjectMatrix<IPivotTableCellData>;
18
18
  rangesCache: IPivotRangesInfo;
19
19
  };
@@ -0,0 +1 @@
1
+ export { UniverSheetsPivotTablePlugin } from './plugin';