@adaptabletools/adaptable 18.1.12 → 18.1.13
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 +18 -7
- package/src/env.js +2 -2
- package/src/types.d.ts +1 -1
- package/tsconfig.esm.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "18.1.
|
|
3
|
+
"version": "18.1.13",
|
|
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
|
/**
|
|
@@ -53,13 +53,13 @@ export class GridApiImpl extends ApiBase {
|
|
|
53
53
|
}
|
|
54
54
|
async updateGridData(dataRows, dataUpdateConfig) {
|
|
55
55
|
const rowNodes = await this.adaptable.updateRows(dataRows, dataUpdateConfig);
|
|
56
|
-
this.internalApi.fireGridDataChangedEvent(dataRows, rowNodes, '
|
|
56
|
+
this.internalApi.fireGridDataChangedEvent(dataRows, rowNodes, 'Update');
|
|
57
57
|
return rowNodes;
|
|
58
58
|
}
|
|
59
59
|
async addOrUpdateGridData(dataRows, dataUpdateConfig) {
|
|
60
60
|
const { added, updated } = await this.adaptable.addOrUpdateRows(dataRows, dataUpdateConfig);
|
|
61
61
|
if (ArrayExtensions.IsNotNullOrEmpty(updated)) {
|
|
62
|
-
this.internalApi.fireGridDataChangedEvent(dataRows, updated, '
|
|
62
|
+
this.internalApi.fireGridDataChangedEvent(dataRows, updated, 'Update');
|
|
63
63
|
}
|
|
64
64
|
if (ArrayExtensions.IsNotNullOrEmpty(added)) {
|
|
65
65
|
this.internalApi.fireGridDataChangedEvent(dataRows, added, 'Add');
|
|
@@ -38,12 +38,16 @@ export class LayoutApiImpl extends ApiBase {
|
|
|
38
38
|
return this.getCurrentLayout().RowGroupedColumns;
|
|
39
39
|
}
|
|
40
40
|
setLayout(layoutName) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
var _a;
|
|
42
|
+
if (StringExtensions.IsNullOrEmpty(layoutName)) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
if (((_a = this.getLayoutOptions()) === null || _a === void 0 ? void 0 : _a.autoSaveLayouts) && layoutName === this.getCurrentLayoutName()) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
let layout = this.getLayoutByName(layoutName);
|
|
49
|
+
if (this.checkItemExists(layout, layoutName, 'Layout')) {
|
|
50
|
+
this.dispatchAction(LayoutRedux.LayoutSelect(layoutName));
|
|
47
51
|
}
|
|
48
52
|
}
|
|
49
53
|
getCurrentLayout() {
|
|
@@ -39,7 +39,7 @@ export class AlertModule extends AdaptableModuleBase {
|
|
|
39
39
|
this.handleCellDataChanged(cellDataChangedInfo);
|
|
40
40
|
});
|
|
41
41
|
this.api.eventApi.on('GridDataChanged', (gridDataChangedInfo) => {
|
|
42
|
-
if (gridDataChangedInfo.rowTrigger === '
|
|
42
|
+
if (gridDataChangedInfo.rowTrigger === 'Update') {
|
|
43
43
|
// changed row alerts should be handled by standard 'AnyChange' Predicate
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
@@ -148,6 +148,10 @@ export const QuickFilterValues = (props) => {
|
|
|
148
148
|
display: 'flex',
|
|
149
149
|
flexFlow: 'column',
|
|
150
150
|
flexWrap: 'nowrap',
|
|
151
|
+
}, handleClasses: {
|
|
152
|
+
right: 'ab-QuickFilter-resize-handle ab-QuickFilter-resize-handle--right',
|
|
153
|
+
bottom: 'ab-QuickFilter-resize-handle ab-QuickFilter-resize-handle--bottom',
|
|
154
|
+
bottomRight: 'ab-QuickFilter-resize-handle ab-QuickFilter-resize-handle--bottom-right',
|
|
151
155
|
}, enable: {
|
|
152
156
|
top: false,
|
|
153
157
|
right: true,
|
|
@@ -8,7 +8,7 @@ import Emitter from '../Utilities/Emitter';
|
|
|
8
8
|
import { applyDefaultAdaptableOptions } from './defaultAdaptableOptions';
|
|
9
9
|
import { AgGridAdapter } from './AgGridAdapter';
|
|
10
10
|
import * as GeneralConstants from '../Utilities/Constants/GeneralConstants';
|
|
11
|
-
import { AB_FDC3_COLUMN, AB_SPECIAL_COLUMN, ADAPTABLE_ROW_ACTION_BUTTONS, AUTOGENERATED_PK_COLUMN, DARK_THEME, DEFAULT_LAYOUT, GROUP_PATH_SEPARATOR, HALF_SECOND, LIGHT_THEME, } from '../Utilities/Constants/GeneralConstants';
|
|
11
|
+
import { AB_FDC3_COLUMN, AB_SPECIAL_COLUMN, ADAPTABLE_ROW_ACTION_BUTTONS, AG_GRID_GROUPED_COLUMN, AUTOGENERATED_PK_COLUMN, DARK_THEME, DEFAULT_LAYOUT, GROUP_PATH_SEPARATOR, HALF_SECOND, LIGHT_THEME, } from '../Utilities/Constants/GeneralConstants';
|
|
12
12
|
import { DataService } from '../Utilities/Services/DataService';
|
|
13
13
|
import { AdaptableStore } from '../Redux/Store/AdaptableStore';
|
|
14
14
|
import { AdaptableApiImpl } from '../Api/Implementation/AdaptableApiImpl';
|
|
@@ -435,7 +435,7 @@ export class AdaptableAgGrid {
|
|
|
435
435
|
normaliseLayoutState(state, gridOptions) {
|
|
436
436
|
var _a, _b, _c, _d, _e, _f;
|
|
437
437
|
if (this.shouldCreateDefaultLayout(state, this.adaptableOptions)) {
|
|
438
|
-
const defaultLayout = this.createDefaultLayout(state, gridOptions.columnDefs);
|
|
438
|
+
const defaultLayout = this.createDefaultLayout(state, gridOptions.columnDefs, gridOptions.autoGroupColumnDef);
|
|
439
439
|
const layoutState = state.Layout || {};
|
|
440
440
|
const availableLayouts = layoutState.Layouts || [];
|
|
441
441
|
availableLayouts.push(defaultLayout);
|
|
@@ -3730,9 +3730,9 @@ export class AdaptableAgGrid {
|
|
|
3730
3730
|
}
|
|
3731
3731
|
return !((_c = layoutState.Layouts) === null || _c === void 0 ? void 0 : _c.length);
|
|
3732
3732
|
}
|
|
3733
|
-
createDefaultLayout(state,
|
|
3734
|
-
var _a, _b;
|
|
3735
|
-
const allColumnDefs = this.agGridAdapter.getFlattenedColDefs(
|
|
3733
|
+
createDefaultLayout(state, agGridColDefs, agGridAutoGroupColDef) {
|
|
3734
|
+
var _a, _b, _c;
|
|
3735
|
+
const allColumnDefs = this.agGridAdapter.getFlattenedColDefs(agGridColDefs);
|
|
3736
3736
|
const defaultLayout = ObjectFactory.CreateEmptyLayout({
|
|
3737
3737
|
Name: DEFAULT_LAYOUT,
|
|
3738
3738
|
Columns: allColumnDefs.map((c) => c.colId),
|
|
@@ -3756,12 +3756,23 @@ export class AdaptableAgGrid {
|
|
|
3756
3756
|
return acc;
|
|
3757
3757
|
}, []),
|
|
3758
3758
|
});
|
|
3759
|
+
// handle optional 'gridOptions.autoGroupColumnDefs' parameter
|
|
3760
|
+
if (agGridAutoGroupColDef && ((_a = defaultLayout.RowGroupedColumns) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
3761
|
+
defaultLayout.Columns = [AG_GRID_GROUPED_COLUMN, ...defaultLayout.Columns];
|
|
3762
|
+
}
|
|
3763
|
+
if (agGridAutoGroupColDef === null || agGridAutoGroupColDef === void 0 ? void 0 : agGridAutoGroupColDef.pinned) {
|
|
3764
|
+
defaultLayout.PinnedColumnsMap[AG_GRID_GROUPED_COLUMN] =
|
|
3765
|
+
agGridAutoGroupColDef.pinned === true ? 'left' : agGridAutoGroupColDef.pinned;
|
|
3766
|
+
}
|
|
3767
|
+
if (agGridAutoGroupColDef === null || agGridAutoGroupColDef === void 0 ? void 0 : agGridAutoGroupColDef.width) {
|
|
3768
|
+
defaultLayout.ColumnWidthMap[AG_GRID_GROUPED_COLUMN] = agGridAutoGroupColDef.width;
|
|
3769
|
+
}
|
|
3759
3770
|
// ADD special columns
|
|
3760
|
-
const calculatedColumns = ((
|
|
3771
|
+
const calculatedColumns = ((_b = state.CalculatedColumn) === null || _b === void 0 ? void 0 : _b.CalculatedColumns) || [];
|
|
3761
3772
|
if (calculatedColumns.length) {
|
|
3762
3773
|
defaultLayout.Columns.push(...calculatedColumns.map((c) => c.ColumnId));
|
|
3763
3774
|
}
|
|
3764
|
-
const freeTextColumns = ((
|
|
3775
|
+
const freeTextColumns = ((_c = state.FreeTextColumn) === null || _c === void 0 ? void 0 : _c.FreeTextColumns) || [];
|
|
3765
3776
|
if (freeTextColumns.length) {
|
|
3766
3777
|
defaultLayout.Columns.push(...freeTextColumns.map((c) => c.ColumnId));
|
|
3767
3778
|
}
|
package/src/env.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
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" || '',
|
|
3
|
-
PUBLISH_TIMESTAMP:
|
|
4
|
-
VERSION: "18.1.
|
|
3
|
+
PUBLISH_TIMESTAMP: 1722341695319 || Date.now(),
|
|
4
|
+
VERSION: "18.1.13" || '--current-version--',
|
|
5
5
|
};
|
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';
|