@adaptabletools/adaptable 16.2.1 → 16.2.2
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 +143 -143
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/Api/Implementation/ColumnApiImpl.js +1 -2
- package/src/Api/Implementation/DashboardApiImpl.js +2 -0
- package/src/Api/Internal/DashboardInternalApi.js +11 -1
- package/src/agGrid/Adaptable.js +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/agGrid/GroupCellRenderer.d.ts +0 -5
- package/src/agGrid/GroupCellRenderer.js +0 -82
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "16.2.
|
|
3
|
+
"version": "16.2.2",
|
|
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",
|
package/publishTimestamp.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: 1701089574640;
|
|
2
2
|
export default _default;
|
package/publishTimestamp.js
CHANGED
|
@@ -4,7 +4,6 @@ exports.ColumnApiImpl = 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"));
|
|
7
|
-
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
8
7
|
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/ArrayExtensions"));
|
|
9
8
|
const ColumnInternalApi_1 = require("../Internal/ColumnInternalApi");
|
|
10
9
|
class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
@@ -58,7 +57,7 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
58
57
|
// put this here as there might be other indicators we are not aware of
|
|
59
58
|
// perhaps with non auto groups ?
|
|
60
59
|
//https://www.ag-grid.com/javascript-grid-grouping/
|
|
61
|
-
return columnId === null || columnId === void 0 ? void 0 : columnId.startsWith(
|
|
60
|
+
return columnId === null || columnId === void 0 ? void 0 : columnId.startsWith(GeneralConstants.AG_GRID_GROUPED_COLUMN);
|
|
62
61
|
}
|
|
63
62
|
isAutoPivotColumn(columnId) {
|
|
64
63
|
// put this here as there might be other indicators we are not aware of?
|
|
@@ -60,9 +60,11 @@ class DashboardApiImpl extends ApiBase_1.ApiBase {
|
|
|
60
60
|
return document.getElementById(this.internalApi.getCustomToolbarRenderContainerId(customToolbarName));
|
|
61
61
|
}
|
|
62
62
|
if (customToolbar.toolbarButtons) {
|
|
63
|
+
this.logWarn(`(get/set)CustomToolbarHTMLElement(${customToolbarName}) should only be used in Vanilla AdapTable for toolbars created via a 'render' function! For React/Adaptable components let the framework renderer handle it!`);
|
|
63
64
|
return document.getElementById(this.internalApi.getCustomToolbarButtonsContainerId(customToolbarName));
|
|
64
65
|
}
|
|
65
66
|
if (customToolbar.frameworkComponent) {
|
|
67
|
+
this.logWarn(`(get/set)CustomToolbarHTMLElement(${customToolbarName}) should only be used in Vanilla AdapTable for toolbars created via a 'render' function! For React/Adaptable components let the framework renderer handle it!`);
|
|
66
68
|
return document.getElementById(this.internalApi.getCustomToolbarComponentContainerId(customToolbarName));
|
|
67
69
|
}
|
|
68
70
|
}
|
|
@@ -12,11 +12,21 @@ class DashboardInternalApi extends ApiBase_1.ApiBase {
|
|
|
12
12
|
const isToolbarStateChangedToVisible = (toolbarName) => {
|
|
13
13
|
const visibleInNewState = this.isToolbarInActiveTab(toolbarName, newDashboardState);
|
|
14
14
|
const visibleInOldState = this.isToolbarInActiveTab(toolbarName, oldDashboardState);
|
|
15
|
+
if (visibleInNewState && visibleInOldState) {
|
|
16
|
+
// check for dashboard collapse/expand/hidden changes
|
|
17
|
+
return ((oldDashboardState.IsCollapsed && !newDashboardState.IsCollapsed) ||
|
|
18
|
+
(oldDashboardState.IsHidden && !newDashboardState.IsHidden));
|
|
19
|
+
}
|
|
15
20
|
return visibleInNewState && !visibleInOldState;
|
|
16
21
|
};
|
|
17
22
|
const isToolbarStateChangedToHidden = (toolbarName) => {
|
|
18
23
|
const visibleInNewState = this.isToolbarInActiveTab(toolbarName, newDashboardState);
|
|
19
24
|
const visibleInOldState = this.isToolbarInActiveTab(toolbarName, oldDashboardState);
|
|
25
|
+
if (visibleInNewState && visibleInOldState) {
|
|
26
|
+
// check for dashboard collapse/expand/hidden changes
|
|
27
|
+
return ((!oldDashboardState.IsCollapsed && newDashboardState.IsCollapsed) ||
|
|
28
|
+
(!oldDashboardState.IsHidden && newDashboardState.IsHidden));
|
|
29
|
+
}
|
|
20
30
|
return visibleInOldState && !visibleInNewState;
|
|
21
31
|
};
|
|
22
32
|
const dashboardChangedInfo = {
|
|
@@ -30,7 +40,7 @@ class DashboardInternalApi extends ApiBase_1.ApiBase {
|
|
|
30
40
|
adaptableId: this.adaptable.api.optionsApi.getAdaptableId(),
|
|
31
41
|
};
|
|
32
42
|
if (!(0, isEqual_1.default)(oldDashboardState, newDashboardState)) {
|
|
33
|
-
this.adaptable.api.eventApi.
|
|
43
|
+
setTimeout(() => this.adaptable.api.eventApi.emit('DashboardChanged', dashboardChangedInfo));
|
|
34
44
|
}
|
|
35
45
|
}
|
|
36
46
|
isToolbarInActiveTab(toolbarName, dashboardState) {
|
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -1626,7 +1626,7 @@ class Adaptable {
|
|
|
1626
1626
|
.columnApi.getColumnState()
|
|
1627
1627
|
.reduce((acc, col) => {
|
|
1628
1628
|
var _a;
|
|
1629
|
-
if (col.colId
|
|
1629
|
+
if (this.api.columnApi.isAutoRowGroupColumn(col.colId)) {
|
|
1630
1630
|
const widthInLayout = (_a = layout.ColumnWidthMap) === null || _a === void 0 ? void 0 : _a[col.colId];
|
|
1631
1631
|
if (widthInLayout && widthInLayout !== col.width) {
|
|
1632
1632
|
acc.push(Object.assign(Object.assign({}, col), { width: widthInLayout }));
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "16.2.
|
|
1
|
+
declare const _default: "16.2.2";
|
|
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 = '16.2.
|
|
3
|
+
exports.default = '16.2.2'; // PLEASE DONT UPDATE THIS!!! - will be updated at build time with the correct version
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AdaptableGroupCellRenderer = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const core_1 = require("@ag-grid-community/core");
|
|
6
|
-
const ArrayExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/ArrayExtensions"));
|
|
7
|
-
const GeneralConstants_1 = require("../Utilities/Constants/GeneralConstants");
|
|
8
|
-
const TEMPLATE =
|
|
9
|
-
/* html */
|
|
10
|
-
`<span class="ag-cell-wrapper">
|
|
11
|
-
<span class="ag-group-expanded" ref="eExpanded"></span>
|
|
12
|
-
<span class="ag-group-contracted" ref="eContracted"></span>
|
|
13
|
-
<span class="ag-group-checkbox ag-invisible" ref="eCheckbox"></span>
|
|
14
|
-
<span class="ag-group-value" ref="eValue"></span>
|
|
15
|
-
<span class="ag-group-child-count" ref="eChildCount"></span>
|
|
16
|
-
</span>`;
|
|
17
|
-
class AdaptableGroupCellRenderer extends core_1.GroupCellRenderer {
|
|
18
|
-
constructor() {
|
|
19
|
-
super();
|
|
20
|
-
this.setTemplate(TEMPLATE);
|
|
21
|
-
}
|
|
22
|
-
init(params) {
|
|
23
|
-
//@ts-ignore
|
|
24
|
-
this.params = params;
|
|
25
|
-
//@ts-ignore
|
|
26
|
-
if (this.gridOptionsWrapper.isGroupIncludeTotalFooter()) {
|
|
27
|
-
//@ts-ignore
|
|
28
|
-
this.assignBlankValueToGroupFooterCell(params);
|
|
29
|
-
}
|
|
30
|
-
//@ts-ignore
|
|
31
|
-
const embeddedRowMismatch = this.isEmbeddedRowMismatch();
|
|
32
|
-
// This allows for empty strings to appear as groups since
|
|
33
|
-
// it will only return for null or undefined.
|
|
34
|
-
const nullValue = params.value == null;
|
|
35
|
-
let skipCell = false;
|
|
36
|
-
// if the groupCellRenderer is inside of a footer and groupHideOpenParents is true
|
|
37
|
-
// we should only display the groupCellRenderer if the current column is the rowGroupedColumn
|
|
38
|
-
if (
|
|
39
|
-
//@ts-ignore
|
|
40
|
-
this.gridOptionsWrapper.isGroupIncludeFooter() &&
|
|
41
|
-
//@ts-ignore
|
|
42
|
-
this.gridOptionsWrapper.isGroupHideOpenParents()) {
|
|
43
|
-
const node = params.node;
|
|
44
|
-
if (node.footer) {
|
|
45
|
-
const showRowGroup = params.colDef && params.colDef.showRowGroup;
|
|
46
|
-
const rowGroupColumnId = node.rowGroupColumn && node.rowGroupColumn.getColId();
|
|
47
|
-
skipCell = showRowGroup !== rowGroupColumnId;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
let skipExpandTool = false;
|
|
51
|
-
if (params.node.leafGroup == true) {
|
|
52
|
-
const displayedCols = params.columnApi.getAllDisplayedColumns();
|
|
53
|
-
if (displayedCols && displayedCols.length > 0) {
|
|
54
|
-
const nonGroupingCols = displayedCols.map((col) => {
|
|
55
|
-
if (!col.getColId().startsWith(GeneralConstants_1.AG_GRID_GROUPED_COLUMN)) {
|
|
56
|
-
return col;
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
skipExpandTool = ArrayExtensions_1.default.IsNullOrEmpty(nonGroupingCols.filter((c) => c != undefined));
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
//@ts-ignore
|
|
63
|
-
this.cellIsBlank = embeddedRowMismatch || nullValue || skipCell;
|
|
64
|
-
//@ts-ignore
|
|
65
|
-
if (this.cellIsBlank) {
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
//@ts-ignore
|
|
69
|
-
this.setupDragOpenParents();
|
|
70
|
-
if (!skipExpandTool) {
|
|
71
|
-
//@ts-ignore
|
|
72
|
-
this.addExpandAndContract();
|
|
73
|
-
}
|
|
74
|
-
//@ts-ignore
|
|
75
|
-
this.addCheckboxIfNeeded();
|
|
76
|
-
//@ts-ignore
|
|
77
|
-
this.addValueElement();
|
|
78
|
-
//@ts-ignore
|
|
79
|
-
this.setupIndent();
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
exports.AdaptableGroupCellRenderer = AdaptableGroupCellRenderer;
|