@adaptabletools/adaptable-cjs 18.1.15-canary.0 → 19.0.0-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/Api/Implementation/LayoutApiImpl.d.ts +2 -0
- package/src/Api/Implementation/LayoutApiImpl.js +61 -0
- package/src/Api/LayoutApi.d.ts +7 -0
- package/src/PredefinedConfig/Common/ExtendedLayoutInfo.d.ts +12 -0
- package/src/PredefinedConfig/Common/ExtendedLayoutInfo.js +2 -0
- package/src/agGrid/AdaptableAgGrid.d.ts +1 -0
- package/src/agGrid/AdaptableAgGrid.js +16 -5
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +5 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +1 -0
- package/tsconfig.cjs.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable-cjs",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "19.0.0-canary.0",
|
|
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",
|
|
@@ -6,6 +6,7 @@ import { ColumnSort } from '../../PredefinedConfig/Common/ColumnSort';
|
|
|
6
6
|
import { ModuleParams } from '../../View/Components/SharedProps/ModuleViewPopupProps';
|
|
7
7
|
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
8
8
|
import { LayoutInternalApi } from '../Internal/LayoutInternalApi';
|
|
9
|
+
import { ExtendedLayoutInfo } from '../../PredefinedConfig/Common/ExtendedLayoutInfo';
|
|
9
10
|
export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
|
|
10
11
|
internalApi: LayoutInternalApi;
|
|
11
12
|
constructor(adaptable: IAdaptable);
|
|
@@ -22,6 +23,7 @@ export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
|
|
|
22
23
|
getCurrentLayoutColumnSort(columnId: string): ColumnSort['SortOrder'] | null;
|
|
23
24
|
getCurrentLayoutName(): string;
|
|
24
25
|
getLayoutByName(layoutName: string): Layout | null;
|
|
26
|
+
getExtendedLayoutByName(layoutName: string): ExtendedLayoutInfo | undefined;
|
|
25
27
|
getLayouts(): Layout[];
|
|
26
28
|
getLayoutById(id: Layout['Uuid']): Layout;
|
|
27
29
|
saveCurrentLayout(): void;
|
|
@@ -78,6 +78,67 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
|
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
+
getExtendedLayoutByName(layoutName) {
|
|
82
|
+
const layout = this.getLayoutByName(layoutName);
|
|
83
|
+
if (!layout) {
|
|
84
|
+
return undefined;
|
|
85
|
+
}
|
|
86
|
+
const config = {
|
|
87
|
+
includeLayoutNotAssociatedObjects: true,
|
|
88
|
+
associatedWithLayout: layoutName,
|
|
89
|
+
};
|
|
90
|
+
// cannot see a better way than to go through this module by module...
|
|
91
|
+
let extensions = [];
|
|
92
|
+
this.getAlertApi()
|
|
93
|
+
.getAlertDefinitions(config)
|
|
94
|
+
.forEach((obj) => {
|
|
95
|
+
extensions.push({ Module: 'Alert', Object: obj });
|
|
96
|
+
});
|
|
97
|
+
this.getCustomSortApi()
|
|
98
|
+
.getCustomSorts(config)
|
|
99
|
+
.forEach((obj) => {
|
|
100
|
+
extensions.push({ Module: 'CustomSort', Object: obj });
|
|
101
|
+
});
|
|
102
|
+
this.getFlashingCellApi()
|
|
103
|
+
.getFlashingCellDefinitions(config)
|
|
104
|
+
.forEach((obj) => {
|
|
105
|
+
extensions.push({ Module: 'FlashingCell', Object: obj });
|
|
106
|
+
});
|
|
107
|
+
this.getFormatColumnApi()
|
|
108
|
+
.getFormatColumns(config)
|
|
109
|
+
.forEach((obj) => {
|
|
110
|
+
extensions.push({ Module: 'FormatColumn', Object: obj });
|
|
111
|
+
});
|
|
112
|
+
this.getPlusMinusApi()
|
|
113
|
+
.getAllPlusMinus(config)
|
|
114
|
+
.forEach((obj) => {
|
|
115
|
+
extensions.push({ Module: 'PlusMinus', Object: obj });
|
|
116
|
+
});
|
|
117
|
+
this.getScheduleApi()
|
|
118
|
+
.getReminderSchedules(config)
|
|
119
|
+
.forEach((obj) => {
|
|
120
|
+
extensions.push({ Module: 'Schedule', Object: obj });
|
|
121
|
+
});
|
|
122
|
+
this.getScheduleApi()
|
|
123
|
+
.getReportSchedules(config)
|
|
124
|
+
.forEach((obj) => {
|
|
125
|
+
extensions.push({ Module: 'Schedule', Object: obj });
|
|
126
|
+
});
|
|
127
|
+
this.getShortcutApi()
|
|
128
|
+
.getShortcuts(config)
|
|
129
|
+
.forEach((obj) => {
|
|
130
|
+
extensions.push({ Module: 'Shortcut', Object: obj });
|
|
131
|
+
});
|
|
132
|
+
this.getStyledColumnApi()
|
|
133
|
+
.getStyledColumns(config)
|
|
134
|
+
.forEach((obj) => {
|
|
135
|
+
extensions.push({ Module: 'StyledColumn', Object: obj });
|
|
136
|
+
});
|
|
137
|
+
return {
|
|
138
|
+
Layout: layout,
|
|
139
|
+
Extensions: extensions,
|
|
140
|
+
};
|
|
141
|
+
}
|
|
81
142
|
getLayouts() {
|
|
82
143
|
var _a;
|
|
83
144
|
return (_a = this.getAdaptableState().Layout.Layouts) !== null && _a !== void 0 ? _a : [];
|
package/src/Api/LayoutApi.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AdaptableColumn, ColumnSort } from '../../types';
|
|
2
|
+
import { ExtendedLayoutInfo } from '../PredefinedConfig/Common/ExtendedLayoutInfo';
|
|
2
3
|
import { LayoutState, Layout } from '../PredefinedConfig/LayoutState';
|
|
3
4
|
/**
|
|
4
5
|
* Provides run-time access to the Layout Module and associated state
|
|
@@ -56,6 +57,12 @@ export interface LayoutApi {
|
|
|
56
57
|
* @returns layout
|
|
57
58
|
*/
|
|
58
59
|
getLayoutByName(layoutName: string): Layout | null;
|
|
60
|
+
/**
|
|
61
|
+
* Retrieves Layout with the given name
|
|
62
|
+
* @param layoutName Layout to retrieve
|
|
63
|
+
* @returns layout
|
|
64
|
+
*/
|
|
65
|
+
getExtendedLayoutByName(layoutName: string): ExtendedLayoutInfo | undefined;
|
|
59
66
|
/**
|
|
60
67
|
* Retrieves all Layouts in Adaptable State
|
|
61
68
|
* @returns layouts
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AdaptableModule, AdaptableObject, Layout } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Defines an Extended Layout - provides a Layout and all objects that refer to it
|
|
4
|
+
*/
|
|
5
|
+
export interface ExtendedLayoutInfo {
|
|
6
|
+
Layout: Layout;
|
|
7
|
+
Extensions: LayoutExtension[];
|
|
8
|
+
}
|
|
9
|
+
export interface LayoutExtension {
|
|
10
|
+
Module: AdaptableModule;
|
|
11
|
+
Object: AdaptableObject;
|
|
12
|
+
}
|
|
@@ -42,6 +42,7 @@ interface AdaptableInitInternalConfig<TData = any> {
|
|
|
42
42
|
export declare class AdaptableAgGrid implements IAdaptable {
|
|
43
43
|
logger: AdaptableLogger;
|
|
44
44
|
private _id;
|
|
45
|
+
private _agGridId;
|
|
45
46
|
lifecycleState: AdaptableLifecycleState;
|
|
46
47
|
variant: AdaptableVariant;
|
|
47
48
|
private emitter;
|
|
@@ -103,10 +103,15 @@ const GridOptionsService_updateGridOptions = core_1.GridOptionsService.prototype
|
|
|
103
103
|
const EventService_Prototype = core_1.EventService.prototype;
|
|
104
104
|
const EventService_wireBeans = EventService_Prototype.wireBeans;
|
|
105
105
|
// AG GRID obfuscates its internals, this is (currently) the best way to get hold of its internal services
|
|
106
|
-
|
|
106
|
+
const DANGER_AG_GRID_BEANS_MAP = {};
|
|
107
107
|
EventService_Prototype.wireBeans = function (beans) {
|
|
108
|
+
var _a;
|
|
108
109
|
EventService_wireBeans.apply(this, arguments);
|
|
109
|
-
|
|
110
|
+
const gridId = (_a = beans === null || beans === void 0 ? void 0 : beans.context) === null || _a === void 0 ? void 0 : _a.getGridId();
|
|
111
|
+
if (!gridId) {
|
|
112
|
+
console.error('CRITICAL: No gridId found in beans, this should never happen!');
|
|
113
|
+
}
|
|
114
|
+
DANGER_AG_GRID_BEANS_MAP[gridId] = beans;
|
|
110
115
|
};
|
|
111
116
|
LocalEventService_Prototype.dispatchEvent = function (event) {
|
|
112
117
|
LocalEventService_dispatchEvent.apply(this, arguments);
|
|
@@ -583,7 +588,9 @@ class AdaptableAgGrid {
|
|
|
583
588
|
* `gridId`
|
|
584
589
|
*/
|
|
585
590
|
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'gridId', (original_gridId) => {
|
|
586
|
-
|
|
591
|
+
const agGridId = original_gridId || this.adaptableOptions.adaptableId;
|
|
592
|
+
this._agGridId = agGridId;
|
|
593
|
+
return agGridId;
|
|
587
594
|
});
|
|
588
595
|
/**
|
|
589
596
|
* `getRowId`
|
|
@@ -3029,7 +3036,7 @@ class AdaptableAgGrid {
|
|
|
3029
3036
|
}
|
|
3030
3037
|
}
|
|
3031
3038
|
}
|
|
3032
|
-
|
|
3039
|
+
DANGER_AG_GRID_BEANS_MAP[this._agGridId] = null;
|
|
3033
3040
|
if ((config === null || config === void 0 ? void 0 : config.destroyApi) === true) {
|
|
3034
3041
|
(_b = this.agGridAdapter.getAgGridApi()) === null || _b === void 0 ? void 0 : _b.destroy();
|
|
3035
3042
|
}
|
|
@@ -4050,7 +4057,11 @@ class AdaptableAgGrid {
|
|
|
4050
4057
|
};
|
|
4051
4058
|
}
|
|
4052
4059
|
DANGER_getPrivateAgGridBeans() {
|
|
4053
|
-
|
|
4060
|
+
const beans = DANGER_AG_GRID_BEANS_MAP[this._agGridId];
|
|
4061
|
+
if (!beans) {
|
|
4062
|
+
this.logger.consoleError('Could not get hold of AgGridBeans! This is a critical error and will prevent Adaptable from working correctly.');
|
|
4063
|
+
}
|
|
4064
|
+
return beans;
|
|
4054
4065
|
}
|
|
4055
4066
|
}
|
|
4056
4067
|
exports.AdaptableAgGrid = AdaptableAgGrid;
|
package/src/env.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
4
|
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" || '',
|
|
5
|
-
PUBLISH_TIMESTAMP:
|
|
6
|
-
VERSION: "
|
|
5
|
+
PUBLISH_TIMESTAMP: 1724333963891 || Date.now(),
|
|
6
|
+
VERSION: "19.0.0-canary.0" || '--current-version--',
|
|
7
7
|
};
|
|
@@ -3251,6 +3251,11 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
3251
3251
|
noCode?: undefined;
|
|
3252
3252
|
})[];
|
|
3253
3253
|
};
|
|
3254
|
+
ExtendedLayoutInfo: {
|
|
3255
|
+
name: string;
|
|
3256
|
+
kind: string;
|
|
3257
|
+
desc: string;
|
|
3258
|
+
};
|
|
3254
3259
|
ExternalChartingContext: {
|
|
3255
3260
|
name: string;
|
|
3256
3261
|
kind: string;
|