@univerjs-pro/engine-pivot 0.2.11 → 0.2.12

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.
@@ -9,5 +9,7 @@ export declare const GlobalConfig: {
9
9
  COl_ROOT_PATH: string;
10
10
  ROW_ROOT_PATH: string;
11
11
  BLANK_PLACEHOLDER: string;
12
+ isDev: boolean;
12
13
  };
13
14
  export declare const setBlankPlaceholder: (value: string) => string;
15
+ export declare const setDevMode: (value: boolean) => boolean;
@@ -214,6 +214,17 @@ export declare class PivotTable {
214
214
  index: number;
215
215
  };
216
216
  private _getTupleCache;
217
+ /**
218
+ * Find the tupleItem in the cache that matches the position order according to the passed array,
219
+ * and after obtaining the row number array marked on it,
220
+ * summarize and sort to get all the relevant source data rows
221
+ *
222
+ * The key point here is that `dimensionIdList` and `dimensionTableIdList` are one-to-one index corresponding
223
+ *
224
+ * @param {string[][]} -A two-dimensional array with path and tableFieldId
225
+ * @returns {number[]} -Sorted row numbers
226
+ */
227
+ getIndexesByPathStr(tuple: string[][]): number[];
217
228
  query(config?: IPivotTableQueryData): PivotView;
218
229
  toJSON(): IPivotTableSnapshot;
219
230
  fromJSON(data: IPivotTableSnapshot): void;
@@ -5,7 +5,7 @@ export interface ITupleItem {
5
5
  path: string[];
6
6
  types: PivotDataFieldDataTypeEnum[];
7
7
  tuple: IMeasureTupleItem;
8
- indexes: [];
8
+ indexes: number[];
9
9
  summary?: Record<string, ITupleItemSummary>;
10
10
  }
11
11
  export interface ITPivotTupleInfo {
@@ -16,7 +16,13 @@ export declare function isBlankValue(value: unknown): value is null | undefined;
16
16
  * @param {PivotTableFiledAreaEnum} area - the test area
17
17
  * @returns {boolean} - return true if the area is in dim
18
18
  */
19
- export declare function isDimArea(area: PivotTableFiledAreaEnum): area is PivotTableFiledAreaEnum.Column | PivotTableFiledAreaEnum.Row | PivotTableFiledAreaEnum.Filter | PivotTableFiledAreaEnum.Hidden;
19
+ export declare function isDimArea(area: PivotTableFiledAreaEnum): boolean;
20
+ /**
21
+ * - judge the area type is in row or column
22
+ * @param {PivotTableFiledAreaEnum} area - the test area
23
+ * @returns {boolean} - return true if the area is in value
24
+ */
25
+ export declare function isRowOrColumnArea(area: PivotTableFiledAreaEnum): boolean;
20
26
  /**
21
27
  * - Get the auto display name of the value field.
22
28
  * @description - which may use prefix text like excel
@@ -94,7 +100,7 @@ export declare function getFilterStatusAndValue(filterInfo: IPivotTableFilterInf
94
100
  * @param {IPivotTableSortInfo} sortInfo the sort info
95
101
  * @returns {PivotCellStyleTypeEnum} the cell style type
96
102
  */
97
- export declare function getDimFilterSortStatus(filterInfo: IPivotTableFilterInfo | undefined, sortInfo: IPivotTableSortInfo): PivotCellStyleTypeEnum.FilteredSortNone | PivotCellStyleTypeEnum.FilteredSortAsc | PivotCellStyleTypeEnum.FilteredSortDesc | PivotCellStyleTypeEnum.FilterNoneSortNone | PivotCellStyleTypeEnum.FilterNoneSortAsc | PivotCellStyleTypeEnum.FilterNoneSortDesc;
103
+ export declare function getDimFilterSortStatus(filterInfo: IPivotTableFilterInfo | undefined, sortInfo: IPivotTableSortInfo): PivotCellStyleTypeEnum;
98
104
  /**
99
105
  * - use the paths and value index to get the unique key of in layout pivot view, which use same rule to create the key in pivot engine
100
106
  * @param {string[]} paths - the paths of the cell