@adaptabletools/adaptable 19.0.1 → 19.0.3
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/AdaptableInterfaces/IAdaptable.d.ts +1 -1
- package/src/AdaptableOptions/ActionRowOptions.d.ts +2 -2
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +2 -2
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +6 -2
- package/src/Api/ColumnApi.d.ts +14 -15
- package/src/Api/DataChangeHistoryApi.d.ts +5 -0
- package/src/Api/Events/GridSorted.d.ts +3 -3
- package/src/Api/GridApi.d.ts +63 -2
- package/src/Api/Implementation/ColumnApiImpl.d.ts +2 -2
- package/src/Api/Implementation/ColumnApiImpl.js +13 -30
- package/src/Api/Implementation/DataChangeHistoryApiImpl.d.ts +2 -0
- package/src/Api/Implementation/DataChangeHistoryApiImpl.js +5 -0
- package/src/Api/Implementation/GridApiImpl.d.ts +13 -2
- package/src/Api/Implementation/GridApiImpl.js +114 -1
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +1 -0
- package/src/Api/Implementation/UserInterfaceApiImpl.js +3 -0
- package/src/Api/Internal/ActionRowInternalApi.d.ts +1 -1
- package/src/Api/Internal/ActionRowInternalApi.js +10 -8
- package/src/Api/Internal/GridFilterInternalApi.js +4 -1
- package/src/Api/UserInterfaceApi.d.ts +6 -2
- package/src/Utilities/license/hashing.js +1 -1
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +1 -0
- package/src/agGrid/ActionColumnRenderer.d.ts +2 -0
- package/src/agGrid/ActionColumnRenderer.js +29 -3
- package/src/agGrid/AdaptableAgGrid.d.ts +3 -1
- package/src/agGrid/AdaptableAgGrid.js +24 -7
- package/src/agGrid/AgGridAdapter.d.ts +1 -0
- package/src/agGrid/AgGridAdapter.js +12 -0
- package/src/agGrid/AgGridColumnAdapter.d.ts +2 -0
- package/src/agGrid/AgGridColumnAdapter.js +24 -12
- package/src/agGrid/defaultAdaptableOptions.js +1 -0
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +2 -2
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/agGrid/CheckboxRenderer.d.ts +0 -16
- package/src/agGrid/CheckboxRenderer.js +0 -89
|
@@ -55,11 +55,15 @@ export interface UserInterfaceApi {
|
|
|
55
55
|
*/
|
|
56
56
|
getEditLookUpValuesForEditLookUpItem(editLookUpItem: EditLookUpPermittedValues, gridCell: GridCell): any[] | undefined;
|
|
57
57
|
/**
|
|
58
|
-
* Returns Style set for Editable
|
|
58
|
+
* Returns Style set for Editable Cells
|
|
59
59
|
*/
|
|
60
60
|
getEditableCellStyle(): AdaptableStyle | undefined;
|
|
61
61
|
/**
|
|
62
|
-
* Returns Style
|
|
62
|
+
* Returns Style for Cells that have been edited
|
|
63
|
+
*/
|
|
64
|
+
getEditedCellStyle(): AdaptableStyle | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* Returns Style set for ReadOnly Cells
|
|
63
67
|
*/
|
|
64
68
|
getReadOnlyCellStyle(): AdaptableStyle | undefined;
|
|
65
69
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const r=3988292384;function n(
|
|
1
|
+
const r=3988292384;function n(r=3988292384){var n,t,o,u=new Array;for(n=0;n<256;n++){for(o=n,t=8;t>0;t--)1&~o?o>>>=1:o=o>>>1^r;u[n]=o}return u}function t(){return 4294967295}function o(r,n,t){return n=n>>>8^r[t^255&n]}function u(r){return r=(r=~r)<0?4294967295+r+1:r}export function compute_string(r,e=3988292384){var c,f=n(e),i=0;for(i=t(),c=0;c<r.length;c++)i=o(f,i,r.charCodeAt(c));return`${i=u(i)}`}
|
|
@@ -39,6 +39,7 @@ export const GridInfoPopup = (props) => {
|
|
|
39
39
|
returnRows.push(createReadOnlyColItem(colItems, 'Column Filters', columnFilterDescription));
|
|
40
40
|
returnRows.push(createReadOnlyColItem(colItems, 'Grid Filter', gridFilterExpression));
|
|
41
41
|
returnRows.push(createReadOnlyColItem(colItems, 'All Rows', props.api.gridApi.getRowCount()));
|
|
42
|
+
returnRows.push(createReadOnlyColItem(colItems, 'Visible Rows', props.api.gridApi.getVisibleRowCount()));
|
|
42
43
|
returnRows.push(createReadOnlyColItem(colItems, 'Selected Rows', selectedRowInfo === null || selectedRowInfo === void 0 ? void 0 : selectedRowInfo.gridRows.length));
|
|
43
44
|
returnRows.push(createReadOnlyColItem(colItems, 'Visible Selected Rows', selectedRowInfo === null || selectedRowInfo === void 0 ? void 0 : selectedRowInfo.gridRows.filter((gr) => { var _a; return ((_a = gr.rowNode) === null || _a === void 0 ? void 0 : _a.displayed) == true; }).length));
|
|
44
45
|
returnRows.push(createReadOnlyColItem(colItems, 'All Columns', props.api.gridApi.getColumnCount()));
|
|
@@ -7,6 +7,8 @@ export declare class ActionColumnRenderer implements ICellRendererComp {
|
|
|
7
7
|
private eGui;
|
|
8
8
|
private eventListener;
|
|
9
9
|
private unmountReactRoot?;
|
|
10
|
+
private layoutSwitchUnsubscribe?;
|
|
11
|
+
private actionButtons;
|
|
10
12
|
init(params: ActionColumnCellRendererParams): void;
|
|
11
13
|
render(): void;
|
|
12
14
|
getGui(): HTMLElement;
|
|
@@ -2,6 +2,7 @@ import SimpleButton from '../components/SimpleButton';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useRerender } from '../components/utils/useRerender';
|
|
4
4
|
import { renderWithAdaptableContext } from '../View/renderWithAdaptableContext';
|
|
5
|
+
import { LAYOUT_SELECT } from '../Redux/ActionsReducers/LayoutRedux';
|
|
5
6
|
const ActionButtons = (props) => {
|
|
6
7
|
const { buttons, adaptableApi, context, rerender } = props;
|
|
7
8
|
return (React.createElement(React.Fragment, null, buttons.map((button, index) => {
|
|
@@ -65,6 +66,20 @@ export const ReactActionColumnRenderer = (props) => {
|
|
|
65
66
|
if (!shouldRender) {
|
|
66
67
|
return null;
|
|
67
68
|
}
|
|
69
|
+
// subscribe to the LayoutChange event and rerender on change
|
|
70
|
+
const unsubscribe = adaptable.api.eventApi.on('AdaptableStateChanged', (eventInfo) => {
|
|
71
|
+
if (eventInfo.actionName === LAYOUT_SELECT) {
|
|
72
|
+
if (eventInfo.oldState.Layout.CurrentLayout !== eventInfo.newState.Layout.CurrentLayout) {
|
|
73
|
+
rerender();
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
// unsubscribe on unmount
|
|
78
|
+
React.useEffect(() => {
|
|
79
|
+
return () => {
|
|
80
|
+
unsubscribe();
|
|
81
|
+
};
|
|
82
|
+
}, []);
|
|
68
83
|
const pkValue = adaptable.getPrimaryKeyValueFromRowNode(props.node, props.api);
|
|
69
84
|
const buttonContext = Object.assign(Object.assign({ actionColumn, primaryKeyValue: pkValue, rowNode: props.node }, adaptable.api.internalApi.buildBaseContext()), { data: props.data });
|
|
70
85
|
return (React.createElement("div", { className: "ab-ActionColumn" },
|
|
@@ -83,6 +98,7 @@ export class ActionColumnRenderer {
|
|
|
83
98
|
if (!actionColumn || !actionButtons.length) {
|
|
84
99
|
return;
|
|
85
100
|
}
|
|
101
|
+
this.actionButtons = actionButtons;
|
|
86
102
|
// create the cell
|
|
87
103
|
this.eGui = document.createElement('div');
|
|
88
104
|
this.eGui.className = 'ab-ActionColumn';
|
|
@@ -114,13 +130,22 @@ export class ActionColumnRenderer {
|
|
|
114
130
|
const eGui = this.eGui;
|
|
115
131
|
const doRender = () => {
|
|
116
132
|
this.unmountReactRoot = adaptable.renderReactRoot(renderWithAdaptableContext(ActionButtons({
|
|
117
|
-
buttons: actionButtons,
|
|
133
|
+
buttons: this.actionButtons,
|
|
118
134
|
context: buttonContext,
|
|
119
135
|
rerender: doRender,
|
|
120
136
|
adaptableApi: adaptable.api,
|
|
121
137
|
}), adaptable), eGui);
|
|
122
138
|
};
|
|
123
139
|
this.render = doRender;
|
|
140
|
+
this.layoutSwitchUnsubscribe = adaptable.api.eventApi.on('AdaptableStateChanged', (eventInfo) => {
|
|
141
|
+
if (eventInfo.actionName === LAYOUT_SELECT) {
|
|
142
|
+
if (eventInfo.oldState.Layout.CurrentLayout !== eventInfo.newState.Layout.CurrentLayout) {
|
|
143
|
+
const { actionButtons: freshActionButtons } = adaptable.api.internalApi.getActionButtonsAndActionColumn(params.colDef);
|
|
144
|
+
this.actionButtons = freshActionButtons;
|
|
145
|
+
doRender();
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
});
|
|
124
149
|
doRender();
|
|
125
150
|
}
|
|
126
151
|
// defined on init
|
|
@@ -138,8 +163,9 @@ export class ActionColumnRenderer {
|
|
|
138
163
|
}
|
|
139
164
|
// gets called when the cell is removed from the grid
|
|
140
165
|
destroy() {
|
|
141
|
-
var _a;
|
|
142
|
-
(_a = this.
|
|
166
|
+
var _a, _b;
|
|
167
|
+
(_a = this.layoutSwitchUnsubscribe) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
168
|
+
(_b = this.unmountReactRoot) === null || _b === void 0 ? void 0 : _b.call(this);
|
|
143
169
|
// do cleanup, remove event listener from button
|
|
144
170
|
if (this.eGui) {
|
|
145
171
|
this.eGui.removeEventListener('click', this.eventListener);
|
|
@@ -34,6 +34,7 @@ interface AdaptableInitInternalConfig<TData = any> {
|
|
|
34
34
|
gridOptions: GridOptions<TData>;
|
|
35
35
|
modules?: Module[];
|
|
36
36
|
isDetailGrid?: boolean;
|
|
37
|
+
isDetailGridForRowIndex?: number;
|
|
37
38
|
/**
|
|
38
39
|
* Adaptable init hook for rendering the React/Angular AG Grid component
|
|
39
40
|
*/
|
|
@@ -61,6 +62,7 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
61
62
|
_rawAdaptableOptions: AdaptableOptions;
|
|
62
63
|
adaptableOptions: AdaptableOptions;
|
|
63
64
|
_isDetailGrid: boolean;
|
|
65
|
+
_isDetailGridForIndex?: number;
|
|
64
66
|
agGridOptionsService: AgGridOptionsService;
|
|
65
67
|
agGridAdapter: AgGridAdapter;
|
|
66
68
|
agGridColumnAdapter: AgGridColumnAdapter;
|
|
@@ -249,7 +251,6 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
249
251
|
getRowNodeByIndex(index: number): IRowNode;
|
|
250
252
|
getAgGridStatusPanels(): import("@ag-grid-community/core").StatusPanelDef[];
|
|
251
253
|
setDataValue(value: any, column: AdaptableColumn, primaryKeyValue: any, rowNode?: IRowNode): void;
|
|
252
|
-
isCellEditable(rowNode: IRowNode, column: Column): boolean;
|
|
253
254
|
forAllRowNodesDo(func: (rowNode: IRowNode, rowIndex: number) => void, config?: {
|
|
254
255
|
includeGroupRows?: boolean;
|
|
255
256
|
filterFn?: (rowNode: IRowNode) => boolean;
|
|
@@ -285,6 +286,7 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
285
286
|
updateChart(chart: ChartDefinition): void;
|
|
286
287
|
getChartModels(): import("@ag-grid-community/core").ChartModel[];
|
|
287
288
|
getRowCount(): number;
|
|
289
|
+
getVisibleRowCount(): number;
|
|
288
290
|
getColumnCount(): number;
|
|
289
291
|
getVisibleColumnCount(): number;
|
|
290
292
|
isGridGroupable(): boolean;
|
|
@@ -269,6 +269,7 @@ export class AdaptableAgGrid {
|
|
|
269
269
|
var _a, _b;
|
|
270
270
|
// Phase 1: Preprocess Adaptable Options
|
|
271
271
|
this._isDetailGrid = config.isDetailGrid === true;
|
|
272
|
+
this._isDetailGridForIndex = config.isDetailGridForRowIndex;
|
|
272
273
|
this.lifecycleState = 'preprocessOptions';
|
|
273
274
|
this._rawAdaptableOptions = config.adaptableOptions;
|
|
274
275
|
if (StringExtensions.IsNullOrEmptyOrWhiteSpace(this._rawAdaptableOptions.adaptableId)) {
|
|
@@ -584,7 +585,10 @@ export class AdaptableAgGrid {
|
|
|
584
585
|
* `gridId`
|
|
585
586
|
*/
|
|
586
587
|
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'gridId', (original_gridId) => {
|
|
587
|
-
|
|
588
|
+
let agGridId = original_gridId || this.adaptableOptions.adaptableId;
|
|
589
|
+
if (this._isDetailGridForIndex != null) {
|
|
590
|
+
agGridId = `${agGridId}_detail-${this._isDetailGridForIndex}`;
|
|
591
|
+
}
|
|
588
592
|
this._agGridId = agGridId;
|
|
589
593
|
return agGridId;
|
|
590
594
|
});
|
|
@@ -978,6 +982,14 @@ export class AdaptableAgGrid {
|
|
|
978
982
|
original_processPivotResultColDef === null || original_processPivotResultColDef === void 0 ? void 0 : original_processPivotResultColDef(colDef);
|
|
979
983
|
};
|
|
980
984
|
});
|
|
985
|
+
/**
|
|
986
|
+
* `maintainColumnOrder`
|
|
987
|
+
*/
|
|
988
|
+
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'maintainColumnOrder', () => {
|
|
989
|
+
// see https://www.ag-grid.com/javascript-data-grid/column-updating-definitions/#maintain-column-order
|
|
990
|
+
// we want to always maintain the column order (provided by Adaptable Layouts), even when column definitions change
|
|
991
|
+
return true;
|
|
992
|
+
});
|
|
981
993
|
/**
|
|
982
994
|
* `columnTypes`
|
|
983
995
|
*/
|
|
@@ -1929,6 +1941,7 @@ export class AdaptableAgGrid {
|
|
|
1929
1941
|
return rawValue;
|
|
1930
1942
|
}
|
|
1931
1943
|
updateColumnModelAndRefreshGrid(config) {
|
|
1944
|
+
this.logger.info(`Updating Column Model and Refreshing Grid ${config ? `with config ${JSON.stringify(config)}` : ''}`);
|
|
1932
1945
|
if (config === null || config === void 0 ? void 0 : config.preemptiveColumnStateRefresh) {
|
|
1933
1946
|
this.deriveAdaptableColumnStateFromAgGrid();
|
|
1934
1947
|
}
|
|
@@ -2462,7 +2475,7 @@ export class AdaptableAgGrid {
|
|
|
2462
2475
|
let dataType = column.dataType;
|
|
2463
2476
|
newValue = dataType == 'Number' ? Number(value) : value;
|
|
2464
2477
|
if (dataType == undefined) {
|
|
2465
|
-
return; // no point continuing as probably a wrong
|
|
2478
|
+
return; // no point continuing as probably a wrong column
|
|
2466
2479
|
}
|
|
2467
2480
|
if (rowNode) {
|
|
2468
2481
|
rowNode.setDataValue(column.columnId, newValue);
|
|
@@ -2488,10 +2501,6 @@ export class AdaptableAgGrid {
|
|
|
2488
2501
|
}
|
|
2489
2502
|
}
|
|
2490
2503
|
}
|
|
2491
|
-
isCellEditable(rowNode, column) {
|
|
2492
|
-
// it's safe to rely on the AG Grid implementation because we override the colDef.editable property, which is in this case the single source of truth
|
|
2493
|
-
return column === null || column === void 0 ? void 0 : column.isCellEditable(rowNode);
|
|
2494
|
-
}
|
|
2495
2504
|
forAllRowNodesDo(func, config) {
|
|
2496
2505
|
this.agGridAdapter.getAgGridApi().forEachNode((rowNode, rowIndex) => {
|
|
2497
2506
|
const includeGroupRows = (config === null || config === void 0 ? void 0 : config.includeGroupRows) || !this.isGroupRowNode(rowNode);
|
|
@@ -2692,6 +2701,10 @@ export class AdaptableAgGrid {
|
|
|
2692
2701
|
return this.agGridAdapter.getAgGridApi().getChartModels();
|
|
2693
2702
|
}
|
|
2694
2703
|
getRowCount() {
|
|
2704
|
+
const allNodes = this.getAllRowNodes({ includeGroupRows: false });
|
|
2705
|
+
return allNodes.length;
|
|
2706
|
+
}
|
|
2707
|
+
getVisibleRowCount() {
|
|
2695
2708
|
return this.agGridAdapter.getAgGridApi().getDisplayedRowCount();
|
|
2696
2709
|
}
|
|
2697
2710
|
getColumnCount() {
|
|
@@ -3434,7 +3447,11 @@ export class AdaptableAgGrid {
|
|
|
3434
3447
|
});
|
|
3435
3448
|
perfApplyColumnState.end();
|
|
3436
3449
|
this.api.gridApi.setColumnSorts(layout.ColumnSorts);
|
|
3437
|
-
|
|
3450
|
+
if (shouldUpdatePivoted) {
|
|
3451
|
+
// simply setting PivotColumns fires an AG Grid 'modelChanged' event which cascades to a full row reload in SSRM
|
|
3452
|
+
// this includes the case when we simply set an empty array of pivot columns
|
|
3453
|
+
this.agGridAdapter.getAgGridApi().setPivotColumns(layout.PivotColumns || []);
|
|
3454
|
+
}
|
|
3438
3455
|
// aggrid 25.1.0 introduced a bug such that a layout that has a grouped column, if the column has enableRowGroup: true but not rowGroup: true
|
|
3439
3456
|
// the group column is not possitioned correctly at the start of the layout
|
|
3440
3457
|
// see the test in layout/layout-switch/"should be able to switch from grouped to non-grouped and back"
|
|
@@ -60,6 +60,7 @@ export declare class AgGridAdapter {
|
|
|
60
60
|
*/
|
|
61
61
|
assignColumnIdsToColDefs(colDefs?: (ColDef | ColGroupDef)[]): void;
|
|
62
62
|
patchColDefs(colDefs: (ColDef | ColGroupDef)[], patchFn: (colDef: ColDef) => void): void;
|
|
63
|
+
traverseColDefs(colDefs: (ColDef | ColGroupDef)[], modifyFn: (colDef: ColDef) => ColDef | null): (ColDef | ColGroupDef)[];
|
|
63
64
|
getDefaultColumnDefinition(): GridOptions['defaultColDef'];
|
|
64
65
|
_agGridApi_getValue(colKey: string | Column, rowNode: IRowNode, gridApi?: GridApi): any;
|
|
65
66
|
}
|
|
@@ -587,6 +587,18 @@ export class AgGridAdapter {
|
|
|
587
587
|
};
|
|
588
588
|
colDefs.forEach((colDef) => applyPatch(colDef));
|
|
589
589
|
}
|
|
590
|
+
traverseColDefs(colDefs, modifyFn) {
|
|
591
|
+
const applyModification = (colDef) => {
|
|
592
|
+
if ('children' in colDef) {
|
|
593
|
+
const updatedChildren = colDef.children.map(applyModification).filter(Boolean);
|
|
594
|
+
return Object.assign(Object.assign({}, colDef), { children: updatedChildren });
|
|
595
|
+
}
|
|
596
|
+
else {
|
|
597
|
+
return modifyFn(colDef);
|
|
598
|
+
}
|
|
599
|
+
};
|
|
600
|
+
return colDefs.map(applyModification).filter(Boolean);
|
|
601
|
+
}
|
|
590
602
|
getDefaultColumnDefinition() {
|
|
591
603
|
var _a, _b;
|
|
592
604
|
// for early init phase, gridApi might not be ready yet
|
|
@@ -36,6 +36,7 @@ export declare class AgGridColumnAdapter {
|
|
|
36
36
|
private isQuickSearchActive;
|
|
37
37
|
private getEditableCellClass;
|
|
38
38
|
private getReadonlyCellClass;
|
|
39
|
+
private getEditedCellClass;
|
|
39
40
|
private getAlertCellClass;
|
|
40
41
|
private getFlashingCellClass;
|
|
41
42
|
private getNoteCellClassName;
|
|
@@ -44,6 +45,7 @@ export declare class AgGridColumnAdapter {
|
|
|
44
45
|
private getQuickSearchCellStyle;
|
|
45
46
|
private getReadOnlyCellStyle;
|
|
46
47
|
private getEditableCellStyle;
|
|
48
|
+
private getEditedCellStyle;
|
|
47
49
|
/**
|
|
48
50
|
* The combination of styled column and format cells
|
|
49
51
|
* This functiond decides when the two can be merged.
|
|
@@ -138,6 +138,7 @@ export class AgGridColumnAdapter {
|
|
|
138
138
|
const isQuickSearchActive = hasQuickSearchStyleClassName && this.isQuickSearchActive(gridCell, params);
|
|
139
139
|
const editableClassName = this.getEditableCellClass(gridCell, params);
|
|
140
140
|
const readonlyClassName = this.getReadonlyCellClass(gridCell, params);
|
|
141
|
+
const editedClassName = this.getEditedCellClass(gridCell, params);
|
|
141
142
|
const highlightAlertClassName = this.getAlertCellClass(gridCell, params);
|
|
142
143
|
const flashingClassName = this.getFlashingCellClass(gridCell, params);
|
|
143
144
|
const styledColumn = this.adaptableApi.styledColumnApi.getStyledColumnForColumnId(colId);
|
|
@@ -152,6 +153,7 @@ export class AgGridColumnAdapter {
|
|
|
152
153
|
isQuickSearchActive ? quickSearchStyleClassName : null,
|
|
153
154
|
editableClassName,
|
|
154
155
|
readonlyClassName,
|
|
156
|
+
editedClassName,
|
|
155
157
|
highlightAlertClassName,
|
|
156
158
|
flashingClassName,
|
|
157
159
|
noteClassName,
|
|
@@ -174,7 +176,7 @@ export class AgGridColumnAdapter {
|
|
|
174
176
|
const gridCell = this.adaptableInstance.getGridCellFromRowNode(params.node, abColumn.columnId);
|
|
175
177
|
const isQuickSearchActive = hasQuickSearchStyle && this.isQuickSearchActive(gridCell, params);
|
|
176
178
|
const userDefined = typeof userCellStyle === 'function' ? userCellStyle(params) : userCellStyle;
|
|
177
|
-
const result = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, userDefined), this.getReadOnlyCellStyle(gridCell, params)), this.getEditableCellStyle(gridCell, params)), this.getFormatColumnAndStyledColumnCellStyle(gridCell, params)), (isQuickSearchActive ? quickSearchStyle : {})), this.getAlertCellStyle(gridCell, params)), this.getFlashingCellStyle(gridCell, params)), this.getCellHighlightStyle(gridCell, params));
|
|
179
|
+
const result = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, userDefined), this.getReadOnlyCellStyle(gridCell, params)), this.getEditableCellStyle(gridCell, params)), this.getEditedCellStyle(gridCell, params)), this.getFormatColumnAndStyledColumnCellStyle(gridCell, params)), (isQuickSearchActive ? quickSearchStyle : {})), this.getAlertCellStyle(gridCell, params)), this.getFlashingCellStyle(gridCell, params)), this.getCellHighlightStyle(gridCell, params));
|
|
178
180
|
return normalizeStyleForAgGrid(result);
|
|
179
181
|
};
|
|
180
182
|
return cellStyle;
|
|
@@ -424,19 +426,9 @@ export class AgGridColumnAdapter {
|
|
|
424
426
|
if (typeof userValue === 'boolean' && userValue === false) {
|
|
425
427
|
return userValue;
|
|
426
428
|
}
|
|
427
|
-
const cellEditableFn = this.adaptableOptions.editOptions.isCellEditable;
|
|
428
429
|
const editableCallback = (params) => {
|
|
429
|
-
// Adaptable Row Summarie rows are not editable
|
|
430
|
-
// if (params.node.data[ROW_SUMMARY_ROW_ID]) {
|
|
431
|
-
if (this.adaptableApi.gridApi.isSummaryNode(params.node)) {
|
|
432
|
-
return false;
|
|
433
|
-
}
|
|
434
|
-
if (!cellEditableFn) {
|
|
435
|
-
return typeof userValue === 'function' ? userValue(params) : userValue;
|
|
436
|
-
}
|
|
437
430
|
const gridCell = this.adaptableInstance.getGridCellFromRowNode(params.node, params.column.getColId());
|
|
438
|
-
|
|
439
|
-
return cellEditableFn(cellEditableContext);
|
|
431
|
+
return this.adaptableApi.gridApi.isCellEditable(gridCell);
|
|
440
432
|
};
|
|
441
433
|
return editableCallback;
|
|
442
434
|
});
|
|
@@ -586,6 +578,14 @@ export class AgGridColumnAdapter {
|
|
|
586
578
|
const isCellReadonly = !this.adaptableApi.gridApi.isCellEditable(gridCell);
|
|
587
579
|
return isCellReadonly ? readonlyCellStyle.ClassName : null;
|
|
588
580
|
}
|
|
581
|
+
getEditedCellClass(gridCell, params) {
|
|
582
|
+
const editedCellStyle = this.adaptableApi.userInterfaceApi.getEditedCellStyle();
|
|
583
|
+
if (!(editedCellStyle === null || editedCellStyle === void 0 ? void 0 : editedCellStyle.ClassName)) {
|
|
584
|
+
return null;
|
|
585
|
+
}
|
|
586
|
+
const isCellEdited = this.adaptableApi.gridApi.isCellEdited(gridCell);
|
|
587
|
+
return isCellEdited ? editedCellStyle.ClassName : null;
|
|
588
|
+
}
|
|
589
589
|
getAlertCellClass(gridCell, params) {
|
|
590
590
|
var _a, _b;
|
|
591
591
|
const alert = this.adaptableApi.alertApi.internalApi.getAdaptableAlertWithHighlightCell(gridCell.column.columnId, params.node);
|
|
@@ -686,6 +686,18 @@ export class AgGridColumnAdapter {
|
|
|
686
686
|
}
|
|
687
687
|
return undefined;
|
|
688
688
|
}
|
|
689
|
+
getEditedCellStyle(gridCell, params) {
|
|
690
|
+
const editedCellStyle = this.adaptableApi.userInterfaceApi.getEditedCellStyle();
|
|
691
|
+
if (!editedCellStyle) {
|
|
692
|
+
return undefined;
|
|
693
|
+
}
|
|
694
|
+
if (gridCell) {
|
|
695
|
+
if (this.adaptableApi.gridApi.isCellEdited(gridCell)) {
|
|
696
|
+
return convertAdaptableStyleToCSS(editedCellStyle);
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
return undefined;
|
|
700
|
+
}
|
|
689
701
|
/**
|
|
690
702
|
* The combination of styled column and format cells
|
|
691
703
|
* This functiond decides when the two can be merged.
|
|
@@ -284,6 +284,7 @@ const DefaultAdaptableOptions = {
|
|
|
284
284
|
colorPalette: UIHelper.getDefaultColors(),
|
|
285
285
|
editableCellStyle: undefined,
|
|
286
286
|
readOnlyCellStyle: undefined,
|
|
287
|
+
editedCellStyle: undefined,
|
|
287
288
|
styleClassNames: EMPTY_ARRAY,
|
|
288
289
|
permittedValues: undefined,
|
|
289
290
|
editLookUpItems: undefined,
|
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: "19.0.
|
|
3
|
+
PUBLISH_TIMESTAMP: 1728393013093 || Date.now(),
|
|
4
|
+
VERSION: "19.0.3" || '--current-version--',
|
|
5
5
|
};
|