@adaptabletools/adaptable-cjs 18.1.12 → 18.1.14
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/Api/Events/GridDataChanged.d.ts +2 -2
- package/src/Api/Implementation/GridApiImpl.js +2 -2
- package/src/Api/Implementation/LayoutApiImpl.js +10 -6
- package/src/Strategy/AlertModule.js +1 -1
- package/src/View/Components/FilterForm/QuickFilterValues.js +4 -0
- package/src/agGrid/AdaptableAgGrid.js +20 -6
- package/src/env.js +2 -2
- package/src/types.d.ts +1 -1
- package/tsconfig.cjs.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable-cjs",
|
|
3
|
-
"version": "18.1.
|
|
3
|
+
"version": "18.1.14",
|
|
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",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IRowNode } from '@ag-grid-community/core';
|
|
2
2
|
import { BaseEventInfo } from './BaseEventInfo';
|
|
3
|
-
export type GridDataChangeTrigger = 'Add' | '
|
|
3
|
+
export type GridDataChangeTrigger = 'Add' | 'Update' | 'Delete' | 'Load';
|
|
4
4
|
/**
|
|
5
5
|
* EventInfo returned by GridDataChanged event
|
|
6
6
|
*/ export interface GridDataChangedInfo<TData = any> extends BaseEventInfo {
|
|
@@ -13,7 +13,7 @@ export type GridDataChangeTrigger = 'Add' | 'Edit' | 'Delete' | 'Load';
|
|
|
13
13
|
*/
|
|
14
14
|
dataRows: TData[];
|
|
15
15
|
/**
|
|
16
|
-
* Trigger for row change: Load, Add,
|
|
16
|
+
* Trigger for row change: Load, Add, Update, or Delete
|
|
17
17
|
*/
|
|
18
18
|
rowTrigger: GridDataChangeTrigger;
|
|
19
19
|
/**
|
|
@@ -57,13 +57,13 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
57
57
|
}
|
|
58
58
|
async updateGridData(dataRows, dataUpdateConfig) {
|
|
59
59
|
const rowNodes = await this.adaptable.updateRows(dataRows, dataUpdateConfig);
|
|
60
|
-
this.internalApi.fireGridDataChangedEvent(dataRows, rowNodes, '
|
|
60
|
+
this.internalApi.fireGridDataChangedEvent(dataRows, rowNodes, 'Update');
|
|
61
61
|
return rowNodes;
|
|
62
62
|
}
|
|
63
63
|
async addOrUpdateGridData(dataRows, dataUpdateConfig) {
|
|
64
64
|
const { added, updated } = await this.adaptable.addOrUpdateRows(dataRows, dataUpdateConfig);
|
|
65
65
|
if (ArrayExtensions_1.default.IsNotNullOrEmpty(updated)) {
|
|
66
|
-
this.internalApi.fireGridDataChangedEvent(dataRows, updated, '
|
|
66
|
+
this.internalApi.fireGridDataChangedEvent(dataRows, updated, 'Update');
|
|
67
67
|
}
|
|
68
68
|
if (ArrayExtensions_1.default.IsNotNullOrEmpty(added)) {
|
|
69
69
|
this.internalApi.fireGridDataChangedEvent(dataRows, added, 'Add');
|
|
@@ -42,12 +42,16 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
|
|
|
42
42
|
return this.getCurrentLayout().RowGroupedColumns;
|
|
43
43
|
}
|
|
44
44
|
setLayout(layoutName) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
var _a;
|
|
46
|
+
if (StringExtensions_1.default.IsNullOrEmpty(layoutName)) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
if (((_a = this.getLayoutOptions()) === null || _a === void 0 ? void 0 : _a.autoSaveLayouts) && layoutName === this.getCurrentLayoutName()) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
let layout = this.getLayoutByName(layoutName);
|
|
53
|
+
if (this.checkItemExists(layout, layoutName, 'Layout')) {
|
|
54
|
+
this.dispatchAction(LayoutRedux.LayoutSelect(layoutName));
|
|
51
55
|
}
|
|
52
56
|
}
|
|
53
57
|
getCurrentLayout() {
|
|
@@ -43,7 +43,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
43
43
|
this.handleCellDataChanged(cellDataChangedInfo);
|
|
44
44
|
});
|
|
45
45
|
this.api.eventApi.on('GridDataChanged', (gridDataChangedInfo) => {
|
|
46
|
-
if (gridDataChangedInfo.rowTrigger === '
|
|
46
|
+
if (gridDataChangedInfo.rowTrigger === 'Update') {
|
|
47
47
|
// changed row alerts should be handled by standard 'AnyChange' Predicate
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
@@ -152,6 +152,10 @@ const QuickFilterValues = (props) => {
|
|
|
152
152
|
display: 'flex',
|
|
153
153
|
flexFlow: 'column',
|
|
154
154
|
flexWrap: 'nowrap',
|
|
155
|
+
}, handleClasses: {
|
|
156
|
+
right: 'ab-QuickFilter-resize-handle ab-QuickFilter-resize-handle--right',
|
|
157
|
+
bottom: 'ab-QuickFilter-resize-handle ab-QuickFilter-resize-handle--bottom',
|
|
158
|
+
bottomRight: 'ab-QuickFilter-resize-handle ab-QuickFilter-resize-handle--bottom-right',
|
|
155
159
|
}, enable: {
|
|
156
160
|
top: false,
|
|
157
161
|
right: true,
|
|
@@ -439,7 +439,7 @@ class AdaptableAgGrid {
|
|
|
439
439
|
normaliseLayoutState(state, gridOptions) {
|
|
440
440
|
var _a, _b, _c, _d, _e, _f;
|
|
441
441
|
if (this.shouldCreateDefaultLayout(state, this.adaptableOptions)) {
|
|
442
|
-
const defaultLayout = this.createDefaultLayout(state, gridOptions
|
|
442
|
+
const defaultLayout = this.createDefaultLayout(state, gridOptions);
|
|
443
443
|
const layoutState = state.Layout || {};
|
|
444
444
|
const availableLayouts = layoutState.Layouts || [];
|
|
445
445
|
availableLayouts.push(defaultLayout);
|
|
@@ -3734,9 +3734,11 @@ class AdaptableAgGrid {
|
|
|
3734
3734
|
}
|
|
3735
3735
|
return !((_c = layoutState.Layouts) === null || _c === void 0 ? void 0 : _c.length);
|
|
3736
3736
|
}
|
|
3737
|
-
createDefaultLayout(state,
|
|
3738
|
-
var _a, _b;
|
|
3739
|
-
const
|
|
3737
|
+
createDefaultLayout(state, agGridOptions) {
|
|
3738
|
+
var _a, _b, _c;
|
|
3739
|
+
const agGridColDefs = agGridOptions.columnDefs;
|
|
3740
|
+
const agGridAutoGroupColDef = agGridOptions.autoGroupColumnDef;
|
|
3741
|
+
const allColumnDefs = this.agGridAdapter.getFlattenedColDefs(agGridColDefs);
|
|
3740
3742
|
const defaultLayout = ObjectFactory_1.default.CreateEmptyLayout({
|
|
3741
3743
|
Name: GeneralConstants_1.DEFAULT_LAYOUT,
|
|
3742
3744
|
Columns: allColumnDefs.map((c) => c.colId),
|
|
@@ -3760,12 +3762,24 @@ class AdaptableAgGrid {
|
|
|
3760
3762
|
return acc;
|
|
3761
3763
|
}, []),
|
|
3762
3764
|
});
|
|
3765
|
+
// handle optional 'gridOptions.autoGroupColumnDefs' parameter
|
|
3766
|
+
if (agGridAutoGroupColDef &&
|
|
3767
|
+
(((_a = defaultLayout.RowGroupedColumns) === null || _a === void 0 ? void 0 : _a.length) || agGridOptions.treeData)) {
|
|
3768
|
+
defaultLayout.Columns = [GeneralConstants_1.AG_GRID_GROUPED_COLUMN, ...defaultLayout.Columns];
|
|
3769
|
+
}
|
|
3770
|
+
if (agGridAutoGroupColDef === null || agGridAutoGroupColDef === void 0 ? void 0 : agGridAutoGroupColDef.pinned) {
|
|
3771
|
+
defaultLayout.PinnedColumnsMap[GeneralConstants_1.AG_GRID_GROUPED_COLUMN] =
|
|
3772
|
+
agGridAutoGroupColDef.pinned === true ? 'left' : agGridAutoGroupColDef.pinned;
|
|
3773
|
+
}
|
|
3774
|
+
if (agGridAutoGroupColDef === null || agGridAutoGroupColDef === void 0 ? void 0 : agGridAutoGroupColDef.width) {
|
|
3775
|
+
defaultLayout.ColumnWidthMap[GeneralConstants_1.AG_GRID_GROUPED_COLUMN] = agGridAutoGroupColDef.width;
|
|
3776
|
+
}
|
|
3763
3777
|
// ADD special columns
|
|
3764
|
-
const calculatedColumns = ((
|
|
3778
|
+
const calculatedColumns = ((_b = state.CalculatedColumn) === null || _b === void 0 ? void 0 : _b.CalculatedColumns) || [];
|
|
3765
3779
|
if (calculatedColumns.length) {
|
|
3766
3780
|
defaultLayout.Columns.push(...calculatedColumns.map((c) => c.ColumnId));
|
|
3767
3781
|
}
|
|
3768
|
-
const freeTextColumns = ((
|
|
3782
|
+
const freeTextColumns = ((_c = state.FreeTextColumn) === null || _c === void 0 ? void 0 : _c.FreeTextColumns) || [];
|
|
3769
3783
|
if (freeTextColumns.length) {
|
|
3770
3784
|
defaultLayout.Columns.push(...freeTextColumns.map((c) => c.ColumnId));
|
|
3771
3785
|
}
|
package/src/env.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
4
|
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: "18.1.
|
|
5
|
+
PUBLISH_TIMESTAMP: 1722345350588 || Date.now(),
|
|
6
|
+
VERSION: "18.1.14" || '--current-version--',
|
|
7
7
|
};
|
package/src/types.d.ts
CHANGED
|
@@ -120,7 +120,7 @@ export type { FlashingCellDisplayedInfo } from './Api/Events/FlashingCellDisplay
|
|
|
120
120
|
export type { SystemStatusMessageDisplayedInfo } from './Api/Events/SystemStatusMessageDisplayed';
|
|
121
121
|
export type { CellChangedInfo } from './Api/Events/CellChanged';
|
|
122
122
|
export type { TeamSharingEntityChangedInfo } from './Api/Events/TeamSharingEntityChanged';
|
|
123
|
-
export type { GridDataChangedInfo } from './Api/Events/GridDataChanged';
|
|
123
|
+
export type { GridDataChangedInfo, GridDataChangeTrigger } from './Api/Events/GridDataChanged';
|
|
124
124
|
export type { LayoutChangedInfo } from './Api/Events/LayoutChanged';
|
|
125
125
|
export type { CalculatedColumnChangedInfo } from './Api/Events/CalculatedColumnChanged';
|
|
126
126
|
export type { CustomToolbarConfiguredInfo } from './Api/Events/CustomToolbarConfigured';
|