@adaptabletools/adaptable 11.0.1 → 11.0.2-canary.0
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/bundle.cjs.js +29 -29
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -1
- package/src/agGrid/Adaptable.d.ts +1 -1
- package/src/agGrid/Adaptable.js +22 -2
- package/src/agGrid/CheckboxRenderer.js +7 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.2-canary.0",
|
|
4
4
|
"description": "Powerful data-agnostic HTML5 datagrid add-on that sits on top of an underlying grid component and provides all the rich functionality that advanced users expect from their DataGrids and Data Tables",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
package/publishTimestamp.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: 1646400837857;
|
|
2
2
|
export default _default;
|
package/publishTimestamp.js
CHANGED
|
@@ -109,7 +109,7 @@ export interface IAdaptable {
|
|
|
109
109
|
redrawBody(): void;
|
|
110
110
|
redrawHeader(): void;
|
|
111
111
|
redrawRow(rowNode: RowNode): void;
|
|
112
|
-
refreshCells(rowNodes: RowNode[], columns: (string | any)[], forceUpdate: boolean): void;
|
|
112
|
+
refreshCells(rowNodes: RowNode[], columns: (string | any)[], forceUpdate: boolean, suppressFlash?: boolean): void;
|
|
113
113
|
setSelectedCells(): SelectedCellInfo | undefined;
|
|
114
114
|
setSelectedRows(): SelectedRowInfo | undefined;
|
|
115
115
|
jumpToRow(rowNode: RowNode): void;
|
|
@@ -187,7 +187,7 @@ export declare class Adaptable implements IAdaptable {
|
|
|
187
187
|
redrawBody(): void;
|
|
188
188
|
redrawHeader(): void;
|
|
189
189
|
redrawRow(rowNode: RowNode): void;
|
|
190
|
-
refreshCells(rowNodes: RowNode[], columns: (string | Column)[], forceUpdate: boolean): void;
|
|
190
|
+
refreshCells(rowNodes: RowNode[], columns: (string | Column)[], forceUpdate: boolean, suppressFlash?: boolean): void;
|
|
191
191
|
jumpToRow(rowNode: RowNode): void;
|
|
192
192
|
jumpToColumn(columnId: string): void;
|
|
193
193
|
jumpToCell(columnId: string, rowNode: RowNode): void;
|
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -1507,7 +1507,8 @@ class Adaptable {
|
|
|
1507
1507
|
return selectedRowInfo;
|
|
1508
1508
|
}
|
|
1509
1509
|
setValue(dataChangedInfo) {
|
|
1510
|
-
// note: because we use
|
|
1510
|
+
// note: because we use RowNode.setDataValue() this will cause Validation to fire
|
|
1511
|
+
// see https://www.ag-grid.com/javascript-data-grid/change-detection/#triggering-value-change-detection
|
|
1511
1512
|
let newValue;
|
|
1512
1513
|
let dataType = dataChangedInfo.column.dataType;
|
|
1513
1514
|
newValue =
|
|
@@ -1959,7 +1960,7 @@ class Adaptable {
|
|
|
1959
1960
|
LoggingHelper_1.ConsoleLogError('ag-grid redrawRows was unable to find some row nodes. Tried to redraw row node: ', rowNode, ex);
|
|
1960
1961
|
}
|
|
1961
1962
|
}
|
|
1962
|
-
refreshCells(rowNodes, columns, forceUpdate) {
|
|
1963
|
+
refreshCells(rowNodes, columns, forceUpdate, suppressFlash = false) {
|
|
1963
1964
|
const api = this.gridOptions.api;
|
|
1964
1965
|
// in order to get a fresh reference to rowNodes
|
|
1965
1966
|
// rowNodes = this.getRowNodesForPrimaryKeys(
|
|
@@ -1969,6 +1970,7 @@ class Adaptable {
|
|
|
1969
1970
|
rowNodes,
|
|
1970
1971
|
columns: columns,
|
|
1971
1972
|
force: forceUpdate,
|
|
1973
|
+
suppressFlash,
|
|
1972
1974
|
};
|
|
1973
1975
|
api.refreshCells(refreshCellParams);
|
|
1974
1976
|
}
|
|
@@ -2519,6 +2521,24 @@ class Adaptable {
|
|
|
2519
2521
|
}
|
|
2520
2522
|
}
|
|
2521
2523
|
});
|
|
2524
|
+
/**
|
|
2525
|
+
* Use Case: Data (cell/row) has changed
|
|
2526
|
+
* Action: Any CheckboxFormatColumns need to be updated, as their disabled state may have changed
|
|
2527
|
+
*/
|
|
2528
|
+
this.gridOptions.api.addGlobalListener((type) => {
|
|
2529
|
+
if ([all_modules_1.Events.EVENT_CELL_VALUE_CHANGED, all_modules_1.Events.EVENT_ROW_VALUE_CHANGED].includes(type)) {
|
|
2530
|
+
const activeCheckboxColumnIds = this.api.columnApi
|
|
2531
|
+
.getColumns()
|
|
2532
|
+
.filter((aColumn) => {
|
|
2533
|
+
const checkboxFormatColumn = this.api.formatColumnApi.getCheckBoxStyleFormatColumn(aColumn);
|
|
2534
|
+
return checkboxFormatColumn && !checkboxFormatColumn.IsSuspended;
|
|
2535
|
+
})
|
|
2536
|
+
.map((aColumn) => aColumn.columnId);
|
|
2537
|
+
if (activeCheckboxColumnIds.length) {
|
|
2538
|
+
this.refreshCells(null, activeCheckboxColumnIds, true, true);
|
|
2539
|
+
}
|
|
2540
|
+
}
|
|
2541
|
+
});
|
|
2522
2542
|
/**
|
|
2523
2543
|
* Row and Cell listeners created in 2020
|
|
2524
2544
|
* These have supplanted many of the events we previously had and simplified things
|
|
@@ -31,7 +31,13 @@ exports.getCheckboxRendererForColumn = (columnId, isColumnReadOnly, api) => {
|
|
|
31
31
|
return this.eGui;
|
|
32
32
|
};
|
|
33
33
|
CheckboxRenderer.prototype.refresh = function () {
|
|
34
|
-
|
|
34
|
+
// by returning FALSE, AG Grid will remove the component from the DOM
|
|
35
|
+
// and (re)create a new component in its place with the new value & disabled state
|
|
36
|
+
return false;
|
|
37
|
+
};
|
|
38
|
+
CheckboxRenderer.prototype.destroy = function () {
|
|
39
|
+
var _a, _b;
|
|
40
|
+
(_b = (_a = this.eGui) === null || _a === void 0 ? void 0 : _a.firstChild) === null || _b === void 0 ? void 0 : _b.removeEventListener('click', this.checkedHandler);
|
|
35
41
|
};
|
|
36
42
|
return CheckboxRenderer;
|
|
37
43
|
};
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "11.0.
|
|
1
|
+
declare const _default: "11.0.2-canary.0";
|
|
2
2
|
export default _default;
|
package/version.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = '11.0.
|
|
3
|
+
exports.default = '11.0.2-canary.0'; // PLEASE DONT UPDATE THIS!!! - will be updated at build time with the correct version
|