@adaptabletools/adaptable-cjs 20.0.5-canary.0 → 20.0.5
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/package.json +1 -1
- package/src/AdaptableState/Common/AggregationColumns.d.ts +1 -8
- package/src/AdaptableState/LayoutState.d.ts +0 -12
- package/src/Api/Implementation/ColumnApiImpl.d.ts +0 -1
- package/src/Api/Implementation/ColumnApiImpl.js +2 -13
- package/src/Api/Implementation/LayoutHelpers.js +2 -25
- package/src/Utilities/Constants/GeneralConstants.d.ts +0 -1
- package/src/Utilities/Constants/GeneralConstants.js +2 -3
- package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +29 -1
- package/src/agGrid/FilterWrapper.js +6 -4
- package/src/env.js +2 -2
- package/src/layout-manager/src/LayoutManagerModel.d.ts +20 -23
- package/src/layout-manager/src/index.d.ts +1 -18
- package/src/layout-manager/src/index.js +1 -287
- package/src/layout-manager/src/normalizeLayoutModel.js +0 -3
- package/tsconfig.cjs.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable-cjs",
|
|
3
|
-
"version": "20.0.5
|
|
3
|
+
"version": "20.0.5",
|
|
4
4
|
"description": "Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
|
@@ -12,14 +12,7 @@ export type TableAggregationColumns = {
|
|
|
12
12
|
/**
|
|
13
13
|
* Defines an Aggregated Column in a Pivot Layout
|
|
14
14
|
*/
|
|
15
|
-
export type PivotAggregationColumns =
|
|
16
|
-
ColumnId: string;
|
|
17
|
-
AggFunc: AggregationColumnValue;
|
|
18
|
-
TotalColumn?: boolean | 'before' | 'after' | {
|
|
19
|
-
PivotColumnId: string;
|
|
20
|
-
ShowTotal?: boolean | 'before' | 'after';
|
|
21
|
-
}[];
|
|
22
|
-
}[];
|
|
15
|
+
export type PivotAggregationColumns = TableAggregationColumns;
|
|
23
16
|
export declare const WEIGHTED_AVERAGE_AGG_FN_NAME = "weightedAvg";
|
|
24
17
|
/**
|
|
25
18
|
* Defines a Weighted Average Agg
|
|
@@ -148,18 +148,6 @@ export interface PivotLayout extends LayoutBase {
|
|
|
148
148
|
* Row Grouped Columns Columns - must NOT be provided
|
|
149
149
|
*/
|
|
150
150
|
RowGroupedColumns?: never;
|
|
151
|
-
/**
|
|
152
|
-
* Display Grand Total Row at the top or bottom of the Pivot Table
|
|
153
|
-
*/
|
|
154
|
-
GrandTotalRow?: 'top' | 'bottom' | boolean;
|
|
155
|
-
/**
|
|
156
|
-
* Display automatically calculated Totals of all Pivot Columns, in the position specified
|
|
157
|
-
*/
|
|
158
|
-
GrandTotalColumn?: 'before' | 'after' | boolean;
|
|
159
|
-
/**
|
|
160
|
-
* Display automatically calculated Totals within EACH Pivot Column Group, in the position specified
|
|
161
|
-
*/
|
|
162
|
-
PivotGroupTotalColumn?: 'before' | 'after' | boolean;
|
|
163
151
|
}
|
|
164
152
|
/**
|
|
165
153
|
* Manages how (and which) Row Group values are stored
|
|
@@ -11,7 +11,6 @@ export declare function generateAutoTreeSingleColumn(): AdaptableColumn;
|
|
|
11
11
|
export declare function generateAutoRowGroupColumnForColumn(column: AdaptableColumn): AdaptableColumn;
|
|
12
12
|
export declare function getFriendlyNameForPivotResultColumn(columnId: string): string;
|
|
13
13
|
export declare function isPivotResultColumn(columnId: string): boolean;
|
|
14
|
-
export declare function isPivotGrandTotalColumn(columnId: string): boolean;
|
|
15
14
|
export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
|
|
16
15
|
internalApi: ColumnInternalApi;
|
|
17
16
|
constructor(_adaptable: IAdaptable);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ColumnApiImpl = exports.
|
|
3
|
+
exports.ColumnApiImpl = exports.isPivotResultColumn = exports.getFriendlyNameForPivotResultColumn = exports.generateAutoRowGroupColumnForColumn = exports.generateAutoTreeSingleColumn = exports.generateAutoRowGroupSingleColumn = exports.isAutoRowGroupColumn = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const ApiBase_1 = require("./ApiBase");
|
|
6
6
|
const GeneralConstants = tslib_1.__importStar(require("../../Utilities/Constants/GeneralConstants"));
|
|
@@ -71,13 +71,6 @@ function generateAutoRowGroupColumnForColumn(column) {
|
|
|
71
71
|
}
|
|
72
72
|
exports.generateAutoRowGroupColumnForColumn = generateAutoRowGroupColumnForColumn;
|
|
73
73
|
function getFriendlyNameForPivotResultColumn(columnId) {
|
|
74
|
-
if (isPivotGrandTotalColumn(columnId)) {
|
|
75
|
-
return `[Grand Total] ${columnId
|
|
76
|
-
.split('_')
|
|
77
|
-
.slice(2)
|
|
78
|
-
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
|
|
79
|
-
.join(' ')}`;
|
|
80
|
-
}
|
|
81
74
|
return `[Pivot] ${columnId
|
|
82
75
|
.split('_')
|
|
83
76
|
.slice(1)
|
|
@@ -90,10 +83,6 @@ function isPivotResultColumn(columnId) {
|
|
|
90
83
|
return columnId?.startsWith(GeneralConstants.AG_GRID_PIVOT_COLUMN);
|
|
91
84
|
}
|
|
92
85
|
exports.isPivotResultColumn = isPivotResultColumn;
|
|
93
|
-
function isPivotGrandTotalColumn(columnId) {
|
|
94
|
-
return columnId?.startsWith(GeneralConstants.AG_GRID_PIVOT_GRAND_TOTAL_COLUMN);
|
|
95
|
-
}
|
|
96
|
-
exports.isPivotGrandTotalColumn = isPivotGrandTotalColumn;
|
|
97
86
|
class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
98
87
|
constructor(_adaptable) {
|
|
99
88
|
super(_adaptable);
|
|
@@ -157,7 +146,7 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
157
146
|
return isAutoRowGroupColumn(columnId);
|
|
158
147
|
}
|
|
159
148
|
isPivotResultColumn(columnId) {
|
|
160
|
-
return isPivotResultColumn(columnId)
|
|
149
|
+
return isPivotResultColumn(columnId);
|
|
161
150
|
}
|
|
162
151
|
isAutoRowGroupColumnForSingle(columnId) {
|
|
163
152
|
return columnId === normalizeLayoutModel_1.GROUP_COLUMN_ID__SINGLE;
|
|
@@ -209,16 +209,12 @@ const pivotLayoutToPivotLayoutModel = (pivotLayout) => {
|
|
|
209
209
|
ColumnPinning: pivotLayout.ColumnPinning,
|
|
210
210
|
PivotColumns: pivotLayout.PivotColumns,
|
|
211
211
|
PivotExpandLevel: pivotLayout.PivotExpandLevel,
|
|
212
|
-
PivotAggregationColumns: (pivotLayout.PivotAggregationColumns || []).map(({ ColumnId, AggFunc
|
|
212
|
+
PivotAggregationColumns: (pivotLayout.PivotAggregationColumns || []).map(({ ColumnId, AggFunc }) => {
|
|
213
213
|
return {
|
|
214
214
|
ColumnId,
|
|
215
215
|
AggFunc: toAggFunc(AggFunc),
|
|
216
|
-
TotalColumn,
|
|
217
216
|
};
|
|
218
217
|
}),
|
|
219
|
-
GrandTotalRow: pivotLayout.GrandTotalRow,
|
|
220
|
-
GrandTotalColumn: pivotLayout.GrandTotalColumn,
|
|
221
|
-
PivotGroupTotalColumn: pivotLayout.PivotGroupTotalColumn,
|
|
222
218
|
RowGroupValues: pivotLayout.RowGroupValues
|
|
223
219
|
? pivotLayout.RowGroupValues.RowGroupDefaultBehavior === 'always-collapsed' ||
|
|
224
220
|
pivotLayout.RowGroupValues.RowGroupDefaultBehavior === 'always-expanded'
|
|
@@ -344,29 +340,10 @@ const pivotLayoutModelToPivotLayout = (layoutModel, defaults) => {
|
|
|
344
340
|
else {
|
|
345
341
|
delete pivotLayout.RowGroupValues;
|
|
346
342
|
}
|
|
347
|
-
if (layoutModel.GrandTotalRow) {
|
|
348
|
-
pivotLayout.GrandTotalRow = layoutModel.GrandTotalRow;
|
|
349
|
-
}
|
|
350
|
-
else {
|
|
351
|
-
delete pivotLayout.GrandTotalRow;
|
|
352
|
-
}
|
|
353
|
-
if (layoutModel.GrandTotalColumn) {
|
|
354
|
-
pivotLayout.GrandTotalColumn = layoutModel.GrandTotalColumn;
|
|
355
|
-
}
|
|
356
|
-
else {
|
|
357
|
-
delete pivotLayout.GrandTotalColumn;
|
|
358
|
-
}
|
|
359
|
-
if (layoutModel.PivotGroupTotalColumn) {
|
|
360
|
-
pivotLayout.PivotGroupTotalColumn = layoutModel.PivotGroupTotalColumn;
|
|
361
|
-
}
|
|
362
|
-
else {
|
|
363
|
-
delete pivotLayout.PivotGroupTotalColumn;
|
|
364
|
-
}
|
|
365
343
|
if (layoutModel.PivotAggregationColumns) {
|
|
366
|
-
pivotLayout.PivotAggregationColumns = (layoutModel.PivotAggregationColumns || []).map(({ ColumnId, AggFunc
|
|
344
|
+
pivotLayout.PivotAggregationColumns = (layoutModel.PivotAggregationColumns || []).map(({ ColumnId, AggFunc }) => ({
|
|
367
345
|
ColumnId,
|
|
368
346
|
AggFunc: toAggregationColumnValue(AggFunc),
|
|
369
|
-
TotalColumn,
|
|
370
347
|
}));
|
|
371
348
|
}
|
|
372
349
|
else {
|
|
@@ -24,7 +24,6 @@ export declare const GROUP_PATH_SEPARATOR: string;
|
|
|
24
24
|
export declare const AG_GRID_GROUPED_COLUMN: string;
|
|
25
25
|
export declare const AG_GRID_SELECTION_COLUMN: string;
|
|
26
26
|
export declare const AG_GRID_PIVOT_COLUMN: string;
|
|
27
|
-
export declare const AG_GRID_PIVOT_GRAND_TOTAL_COLUMN: string;
|
|
28
27
|
export declare const AG_GRID_CHART_WINDOW = "AG Grid Window";
|
|
29
28
|
export declare const ADAPTABLE_FDC3_ACTION_COLUMN_FRIENDLY_NAME = "(FDC3ActionColumn)";
|
|
30
29
|
export declare const DEFAULT_DATE_FORMAT_PATTERN = "dd-MM-yyyy";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LAYOUT_NEW_TABLE_TOOLTIP = exports.THEME_STYLE = exports.SYSTEM_EXPORT_DESTINATIONS = exports.CLIPBOARD_EXPORT_DESTINATION = exports.DOWNLOAD_EXPORT_DESTINATION = exports.SELECT_REPORT_FORMAT_STRING = exports.SELECT_REPORT_STRING = exports.SYSTEM_REPORT_FORMATS = exports.JSON_FORMAT_REPORT = exports.CSV_FORMAT_REPORT = exports.VISUAL_EXCEL_FORMAT_REPORT = exports.EXCEL_FORMAT_REPORT = exports.SYSTEM_REPORT_NAMES = exports.SELECTED_DATA_REPORT = exports.CURRENT_LAYOUT_REPORT = exports.ALL_DATA_REPORT = exports.SERVER_VALIDATION_MESSAGE_TYPE = exports.SERVER_VALIDATION_HEADER = exports.DEFAULT_LIVE_REPORT_THROTTLE_TIME = exports.MENU_SEPARATOR = exports.QUICK_SEARCH_DEBOUNCE_TIME = exports.DEFAULT_DOUBLE_DISPLAY_VALUE = exports.DEFAULT_INTEGER_DISPLAY_VALUE = exports.DEFAULT_STRING_DISPLAY_VALUE = exports.DEFAULT_DATE_FORMAT_PATTERN_WITH_TIME = exports.DEFAULT_DATE_FORMAT_PATTERN = exports.ADAPTABLE_FDC3_ACTION_COLUMN_FRIENDLY_NAME = exports.AG_GRID_CHART_WINDOW = exports.
|
|
4
|
-
exports.OBSERVABLE_EXPRESSION_ROW_REMOVED = exports.OBSERVABLE_EXPRESSION_ROW_ADDED = exports.STANDALONE_MODULE_POPUPS = exports.LAYOUT_DELETE_TOOLTIP = exports.LAYOUT_CLONE_TOOLTIP = exports.LAYOUT_EDIT_TOOLTIP = exports.LAYOUT_SAVE_TOOLTIP = exports.LAYOUT_NEW_TABLE_OR_PIVOT_TOOLTIP =
|
|
3
|
+
exports.LAYOUT_NEW_PIVOT_TOOLTIP = exports.LAYOUT_NEW_TABLE_TOOLTIP = exports.THEME_STYLE = exports.SYSTEM_EXPORT_DESTINATIONS = exports.CLIPBOARD_EXPORT_DESTINATION = exports.DOWNLOAD_EXPORT_DESTINATION = exports.SELECT_REPORT_FORMAT_STRING = exports.SELECT_REPORT_STRING = exports.SYSTEM_REPORT_FORMATS = exports.JSON_FORMAT_REPORT = exports.CSV_FORMAT_REPORT = exports.VISUAL_EXCEL_FORMAT_REPORT = exports.EXCEL_FORMAT_REPORT = exports.SYSTEM_REPORT_NAMES = exports.SELECTED_DATA_REPORT = exports.CURRENT_LAYOUT_REPORT = exports.ALL_DATA_REPORT = exports.SERVER_VALIDATION_MESSAGE_TYPE = exports.SERVER_VALIDATION_HEADER = exports.DEFAULT_LIVE_REPORT_THROTTLE_TIME = exports.MENU_SEPARATOR = exports.QUICK_SEARCH_DEBOUNCE_TIME = exports.DEFAULT_DOUBLE_DISPLAY_VALUE = exports.DEFAULT_INTEGER_DISPLAY_VALUE = exports.DEFAULT_STRING_DISPLAY_VALUE = exports.DEFAULT_DATE_FORMAT_PATTERN_WITH_TIME = exports.DEFAULT_DATE_FORMAT_PATTERN = exports.ADAPTABLE_FDC3_ACTION_COLUMN_FRIENDLY_NAME = exports.AG_GRID_CHART_WINDOW = exports.AG_GRID_PIVOT_COLUMN = exports.AG_GRID_SELECTION_COLUMN = exports.AG_GRID_GROUPED_COLUMN = exports.GROUP_PATH_SEPARATOR = exports.QUARTER_SECOND = exports.HALF_SECOND = exports.EMPTY_ARRAY = exports.EMPTY_STRING = exports.READ_ONLY_STYLE = exports.AGGRID_TOOLPANEL_COLUMNS = exports.AGGRID_TOOLPANEL_FILTERS = exports.ADAPTABLE_TOOLPANEL_COMPONENT = exports.ADAPTABLE_TOOLPANEL_ID = exports.ADAPTABLE_ID = exports.ADAPTABLE = exports.ERROR_LAYOUT = exports.OS_THEME = exports.DARK_THEME = exports.LIGHT_THEME = exports.MISSING_COLUMN = exports.AUTOGENERATED_PK_COLUMN = void 0;
|
|
4
|
+
exports.OBSERVABLE_EXPRESSION_ROW_REMOVED = exports.OBSERVABLE_EXPRESSION_ROW_ADDED = exports.STANDALONE_MODULE_POPUPS = exports.LAYOUT_DELETE_TOOLTIP = exports.LAYOUT_CLONE_TOOLTIP = exports.LAYOUT_EDIT_TOOLTIP = exports.LAYOUT_SAVE_TOOLTIP = exports.LAYOUT_NEW_TABLE_OR_PIVOT_TOOLTIP = void 0;
|
|
5
5
|
exports.AUTOGENERATED_PK_COLUMN = '__ADAPTABLE_PK__';
|
|
6
6
|
exports.MISSING_COLUMN = ' [MISSING]';
|
|
7
7
|
exports.LIGHT_THEME = 'light';
|
|
@@ -27,7 +27,6 @@ exports.GROUP_PATH_SEPARATOR = '/';
|
|
|
27
27
|
exports.AG_GRID_GROUPED_COLUMN = 'ag-Grid-AutoColumn';
|
|
28
28
|
exports.AG_GRID_SELECTION_COLUMN = 'ag-Grid-SelectionColumn';
|
|
29
29
|
exports.AG_GRID_PIVOT_COLUMN = 'pivot_';
|
|
30
|
-
exports.AG_GRID_PIVOT_GRAND_TOTAL_COLUMN = 'PivotRowTotal_pivot_';
|
|
31
30
|
exports.AG_GRID_CHART_WINDOW = 'AG Grid Window';
|
|
32
31
|
exports.ADAPTABLE_FDC3_ACTION_COLUMN_FRIENDLY_NAME = '(FDC3ActionColumn)';
|
|
33
32
|
// FIXME AFL - load this from DateInputOptions
|
|
@@ -104,15 +104,43 @@ const ColumnFilterInput = ({ type, value, onChange: onChangeProp, onClear: onCle
|
|
|
104
104
|
// autoFocus has to be FALSE because if the input receives focus in the init phase,
|
|
105
105
|
// it may scroll the AG Grid header viewport into view and de-synchronize it (relative to the content viewport)
|
|
106
106
|
autoFocus: false, value: liveValue ?? '', onKeyDown: onKeyDown, showClearButton: false, onChange: (e) => {
|
|
107
|
+
const prevValue = `${liveValue}`;
|
|
107
108
|
const value = e.target.value;
|
|
108
109
|
if (value) {
|
|
109
110
|
if (type === 'number') {
|
|
110
111
|
let numericValue = parseFloat(value);
|
|
112
|
+
let liveValue = numericValue;
|
|
111
113
|
if (isNaN(numericValue)) {
|
|
112
114
|
numericValue = null;
|
|
115
|
+
liveValue = null;
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
const prevValueHasSeparator = prevValue.includes('.');
|
|
119
|
+
const newValueEndsWithSeparator = value.endsWith('.');
|
|
120
|
+
const newValueStartsWithSeparator = value.startsWith('.');
|
|
121
|
+
const newValueEndsWithZero = value.endsWith('0');
|
|
122
|
+
const separatorCount = (value.match(/[.,]/g) || []).length;
|
|
123
|
+
if (prevValueHasSeparator && separatorCount > 1) {
|
|
124
|
+
// not a valid number
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
if (newValueEndsWithSeparator) {
|
|
128
|
+
const valueWithoutLastChar = value.slice(0, -1);
|
|
129
|
+
if (numericValue === parseFloat(valueWithoutLastChar)) {
|
|
130
|
+
liveValue = value;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
if (newValueEndsWithZero) {
|
|
134
|
+
liveValue = value;
|
|
135
|
+
}
|
|
136
|
+
if (newValueStartsWithSeparator) {
|
|
137
|
+
if (numericValue === parseFloat('0' + value)) {
|
|
138
|
+
liveValue = value;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
113
141
|
}
|
|
114
142
|
onChange(numericValue);
|
|
115
|
-
setLiveValue(
|
|
143
|
+
setLiveValue(liveValue);
|
|
116
144
|
}
|
|
117
145
|
else {
|
|
118
146
|
onChange(value);
|
|
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const AdaptableColumnFilter_1 = require("../View/Components/ColumnFilter/AdaptableColumnFilter");
|
|
7
7
|
const renderWithAdaptableContext_1 = require("../View/renderWithAdaptableContext");
|
|
8
|
+
const getAgGridFilterNotifyModelFn_1 = require("./getAgGridFilterNotifyModelFn");
|
|
8
9
|
const FilterWrapperFactory = (adaptable) => {
|
|
9
10
|
function isFilterActive(colId) {
|
|
10
11
|
// we need this here
|
|
@@ -112,14 +113,15 @@ const FilterWrapperFactory = (adaptable) => {
|
|
|
112
113
|
this.unmountReactRoot?.();
|
|
113
114
|
const columnId = this.column.getColId();
|
|
114
115
|
let column = adaptable.api.columnApi.getColumnWithColumnId(columnId);
|
|
115
|
-
|
|
116
|
-
|
|
116
|
+
function getNotifyModel(colId, onModelChange) {
|
|
117
|
+
return (0, getAgGridFilterNotifyModelFn_1.getAgGridFilterNotifyModelFn)(adaptable.api, colId, onModelChange);
|
|
118
|
+
}
|
|
119
|
+
const notifyModel = getNotifyModel(columnId, this.params.filterChangedCallback);
|
|
117
120
|
if (column) {
|
|
118
121
|
this.unmountReactRoot = adaptable.renderReactRoot((0, renderWithAdaptableContext_1.renderWithAdaptableContext)(React.createElement(AdaptableColumnFilter_1.AdaptableColumnFilter, {
|
|
119
122
|
columnId,
|
|
120
123
|
wrapperProps: { p: 2 },
|
|
121
|
-
|
|
122
|
-
// onChange: notifyModel,
|
|
124
|
+
onChange: notifyModel,
|
|
123
125
|
}), adaptable),
|
|
124
126
|
// AdaptableColumnFilter(filterProps),
|
|
125
127
|
this.filterContainer);
|
package/src/env.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
4
|
NEXT_PUBLIC_INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
|
|
5
|
-
PUBLISH_TIMESTAMP:
|
|
6
|
-
VERSION: "20.0.5
|
|
5
|
+
PUBLISH_TIMESTAMP: 1744964832292 || Date.now(),
|
|
6
|
+
VERSION: "20.0.5" || '--current-version--',
|
|
7
7
|
};
|
|
@@ -62,17 +62,26 @@ export type ColumnAggregationModel = {
|
|
|
62
62
|
aggFunc: string | true;
|
|
63
63
|
weightedColumnId?: string;
|
|
64
64
|
};
|
|
65
|
-
export type
|
|
65
|
+
export type AggregationColumnsModel = {
|
|
66
66
|
ColumnId: string;
|
|
67
67
|
AggFunc: ColumnAggregationModel;
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
export
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
68
|
+
}[];
|
|
69
|
+
type RowSummaryPosition = 'Top' | 'Bottom';
|
|
70
|
+
export interface RowSummaryModel {
|
|
71
|
+
/**
|
|
72
|
+
* Where Row Summary appears - 'Top' or 'Bottom'
|
|
73
|
+
*/
|
|
74
|
+
Position?: RowSummaryPosition;
|
|
75
|
+
/**
|
|
76
|
+
* Map of Columns with Summary Expressions
|
|
77
|
+
*/
|
|
78
|
+
ColumnsMap: Record<string, string>;
|
|
79
|
+
/**
|
|
80
|
+
* Evaluates only currently filtered rows in the summary
|
|
81
|
+
* @defaultValue true
|
|
82
|
+
*/
|
|
83
|
+
IncludeOnlyFilteredRows?: boolean;
|
|
84
|
+
}
|
|
76
85
|
export interface TableLayoutModel extends BaseLayoutModel {
|
|
77
86
|
TableColumns: string[];
|
|
78
87
|
/**
|
|
@@ -87,7 +96,6 @@ export interface TableLayoutModel extends BaseLayoutModel {
|
|
|
87
96
|
* @defaultValue 'single'
|
|
88
97
|
*/
|
|
89
98
|
RowGroupDisplayType?: 'single' | 'multi';
|
|
90
|
-
PivotAggregationColumns?: never;
|
|
91
99
|
PivotColumns?: never;
|
|
92
100
|
PivotGroupedColumns?: never;
|
|
93
101
|
PivotExpandLevel?: never;
|
|
@@ -102,24 +110,13 @@ export interface PivotLayoutModel extends BaseLayoutModel {
|
|
|
102
110
|
/**
|
|
103
111
|
* Columns showing aggregated values in Group Rows; 1st value in record is Column name, 2nd is either aggfunc (e.g. sum, avg etc.) or 'true' (to use default aggfunc)
|
|
104
112
|
*/
|
|
105
|
-
PivotAggregationColumns?:
|
|
113
|
+
PivotAggregationColumns?: AggregationColumnsModel;
|
|
106
114
|
TableAggregationColumns?: never;
|
|
107
115
|
/**
|
|
108
116
|
* Columns which are row-grouped when the Layout is applied
|
|
109
117
|
*/
|
|
110
118
|
PivotGroupedColumns?: string[];
|
|
111
119
|
RowGroupedColumns?: never;
|
|
112
|
-
/**
|
|
113
|
-
* Display Grand Total Row at the top or bottom of the Pivot Table
|
|
114
|
-
*/
|
|
115
|
-
GrandTotalRow?: 'top' | 'bottom' | boolean;
|
|
116
|
-
/**
|
|
117
|
-
* Display Total of all Pivot Columns before or after the Pivot Columns
|
|
118
|
-
*/
|
|
119
|
-
GrandTotalColumn?: 'before' | 'after' | boolean;
|
|
120
|
-
/**
|
|
121
|
-
* Display automatically calculated Totals within EACH Pivot Column Group, in the position specified
|
|
122
|
-
*/
|
|
123
|
-
PivotGroupTotalColumn?: 'before' | 'after' | boolean;
|
|
124
120
|
}
|
|
125
121
|
export type LayoutModel = TableLayoutModel | PivotLayoutModel;
|
|
122
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ColumnState, GridApi, GridOptions, GridState } from 'ag-grid-enterprise';
|
|
2
2
|
import { PivotLayoutModel, TableLayoutModel } from './LayoutManagerModel';
|
|
3
3
|
import { LMEmitter } from './LMEmitter';
|
|
4
4
|
export type LayoutManagerOptions = {
|
|
@@ -69,24 +69,7 @@ export declare class LayoutManager<DATA_TYPE = any> extends LMEmitter {
|
|
|
69
69
|
private computeColumnOrderAndVisibility;
|
|
70
70
|
autoSizeColumns(columnIds?: string[]): false | string[];
|
|
71
71
|
private applyPivotLayout;
|
|
72
|
-
applyPivotTotals(layout: PivotLayoutModel): void;
|
|
73
72
|
applyPivotExpandLevel(layout: PivotLayoutModel): void;
|
|
74
73
|
private withSuppressColumnAnimation;
|
|
75
|
-
private setupPivotTotals;
|
|
76
|
-
private isPivotRowTotalColDef;
|
|
77
|
-
private patchGrandTotalColumn;
|
|
78
|
-
private isPivotGroupTotalColumn;
|
|
79
|
-
private patchPivotGroupTotalColumn;
|
|
80
|
-
private patchPivotTotalColumn;
|
|
81
|
-
destructurePivotColumnId(colDef: ColDef, currentModel: {
|
|
82
|
-
pivotColIds: string[];
|
|
83
|
-
aggColIds: string[];
|
|
84
|
-
}): '!unknown!' | {
|
|
85
|
-
pivotColumnIds: string[];
|
|
86
|
-
pivotKeys: string[];
|
|
87
|
-
pivotColumnId: string;
|
|
88
|
-
aggregationColumnId?: string;
|
|
89
|
-
};
|
|
90
|
-
private getPivotTotalColumnConfig;
|
|
91
74
|
}
|
|
92
75
|
export {};
|