@adaptabletools/adaptable-plugin-master-detail-aggrid-cjs 23.0.4 → 23.0.5-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/package.json +1 -1
- package/src/DetailCellRenderer.js +0 -11
package/package.json
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DetailCellRenderer = void 0;
|
|
4
4
|
const AdaptableAgGrid_1 = require("@adaptabletools/adaptable-cjs/src/agGrid/AdaptableAgGrid");
|
|
5
|
-
// @ts-ignore because we override the private setDetailGrid() method
|
|
6
|
-
// TODO: add interface to implement
|
|
7
5
|
class DetailCellRenderer {
|
|
8
6
|
adaptableApi;
|
|
9
7
|
adaptableDestroyed = false;
|
|
@@ -16,7 +14,6 @@ class DetailCellRenderer {
|
|
|
16
14
|
this.eGui = document.createElement('div');
|
|
17
15
|
this.eGui.classList.add('ag-details-row');
|
|
18
16
|
this.eGui.classList.add('ag-details-row-fixed-height');
|
|
19
|
-
// Ag Grid logic
|
|
20
17
|
const agGridContainer = document.createElement('div');
|
|
21
18
|
this.eGui.appendChild(agGridContainer);
|
|
22
19
|
const masterAdaptable = params.context.__adaptable;
|
|
@@ -25,19 +22,15 @@ class DetailCellRenderer {
|
|
|
25
22
|
detailGridOptions.detailCellRenderer = DetailCellRenderer;
|
|
26
23
|
const agGridTheme = masterAdaptable.agGridAdapter.getGridOption('theme');
|
|
27
24
|
detailGridOptions.theme = agGridTheme;
|
|
28
|
-
// Adaptable logic
|
|
29
25
|
const adaptableContainerId = `adaptable-detail-${params.node?.rowIndex}`;
|
|
30
26
|
const adaptableContainer = document.createElement('div');
|
|
31
27
|
adaptableContainer.id = adaptableContainerId;
|
|
32
|
-
// Attach Adaptable
|
|
33
28
|
this.eGui.prepend(adaptableContainer);
|
|
34
29
|
const initialState = detailAdaptableOptions.initialState;
|
|
35
|
-
// AG Grid modules are already registered
|
|
36
30
|
const agGridModules = masterAdaptable.agGridModulesAdapter.getAgGridRegisteredModules();
|
|
37
31
|
this.adaptableApi = await AdaptableAgGrid_1.AdaptableAgGrid._initInternal({
|
|
38
32
|
adaptableOptions: {
|
|
39
33
|
licenseKey: masterAdaptable.api.optionsApi.getLicenseKey(),
|
|
40
|
-
// provide adaptableId just in case, but normally it should be provided by the user in detailAdaptableOptions
|
|
41
34
|
adaptableId: `${masterAdaptable.adaptableOptions.adaptableId} Detail`,
|
|
42
35
|
...detailAdaptableOptions,
|
|
43
36
|
initialState: {
|
|
@@ -100,10 +93,6 @@ class DetailCellRenderer {
|
|
|
100
93
|
this.adaptableApi = undefined;
|
|
101
94
|
}
|
|
102
95
|
}
|
|
103
|
-
/**
|
|
104
|
-
* Code mostly copied over from https://github.com/ag-grid/ag-grid/blob/latest/enterprise-modules/master-detail/src/masterDetail/detailCellRendererCtrl.ts#L142
|
|
105
|
-
* So the detail grid works with the ag-grid api
|
|
106
|
-
*/
|
|
107
96
|
loadRowData() {
|
|
108
97
|
this.loadRowDataVersion++;
|
|
109
98
|
const versionThisCall = this.loadRowDataVersion;
|