@adaptabletools/adaptable-cjs 19.1.0 → 19.1.1
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/GridApi.d.ts +2 -1
- package/src/Api/Implementation/ActionColumnApiImpl.d.ts +0 -2
- package/src/Api/Implementation/ActionColumnApiImpl.js +1 -4
- package/src/Api/Implementation/ActionRowApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ActionRowApiImpl.js +4 -4
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -0
- package/src/Api/Implementation/AdaptableApiImpl.js +6 -0
- package/src/Api/Implementation/AlertApiImpl.d.ts +1 -1
- package/src/Api/Implementation/AlertApiImpl.js +16 -15
- package/src/Api/Implementation/ApiBase.d.ts +12 -3
- package/src/Api/Implementation/ApiBase.js +39 -24
- package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +3 -3
- package/src/Api/Implementation/CalendarApiImpl.js +1 -1
- package/src/Api/Implementation/ChartingApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ChartingApiImpl.js +9 -9
- package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ColumnApiImpl.js +18 -18
- package/src/Api/Implementation/ColumnFilterApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ColumnFilterApiImpl.js +7 -7
- package/src/Api/Implementation/ColumnMenuApiImpl.d.ts +0 -2
- package/src/Api/Implementation/ColumnMenuApiImpl.js +2 -5
- package/src/Api/Implementation/CommentsApiImpl.d.ts +1 -1
- package/src/Api/Implementation/CommentsApiImpl.js +6 -4
- package/src/Api/Implementation/ConfigApiImpl.js +23 -24
- package/src/Api/Implementation/ContextMenuApiImpl.d.ts +0 -2
- package/src/Api/Implementation/ContextMenuApiImpl.js +1 -4
- package/src/Api/Implementation/CustomSortApiImpl.d.ts +1 -1
- package/src/Api/Implementation/CustomSortApiImpl.js +3 -3
- package/src/Api/Implementation/DashboardApiImpl.d.ts +1 -1
- package/src/Api/Implementation/DashboardApiImpl.js +5 -5
- package/src/Api/Implementation/DataImportApiImpl.d.ts +1 -1
- package/src/Api/Implementation/DataImportApiImpl.js +3 -3
- package/src/Api/Implementation/DataSetApiImpl.d.ts +1 -1
- package/src/Api/Implementation/DataSetApiImpl.js +5 -5
- package/src/Api/Implementation/EntitlementApiImpl.d.ts +1 -1
- package/src/Api/Implementation/EntitlementApiImpl.js +5 -5
- package/src/Api/Implementation/EventApiImpl.d.ts +1 -1
- package/src/Api/Implementation/EventApiImpl.js +2 -2
- package/src/Api/Implementation/ExportApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ExportApiImpl.js +7 -7
- package/src/Api/Implementation/ExpressionApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ExpressionApiImpl.js +5 -5
- package/src/Api/Implementation/Fdc3ApiImpl.d.ts +1 -1
- package/src/Api/Implementation/Fdc3ApiImpl.js +4 -4
- package/src/Api/Implementation/FlashingCellApiImpl.d.ts +1 -1
- package/src/Api/Implementation/FlashingCellApiImpl.js +7 -7
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/FormatColumnApiImpl.js +4 -4
- package/src/Api/Implementation/FreeTextColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +4 -4
- package/src/Api/Implementation/GridApiImpl.d.ts +3 -2
- package/src/Api/Implementation/GridApiImpl.js +106 -103
- package/src/Api/Implementation/GridFilterApiImpl.d.ts +1 -1
- package/src/Api/Implementation/GridFilterApiImpl.js +4 -4
- package/src/Api/Implementation/LayoutApiImpl.d.ts +1 -1
- package/src/Api/Implementation/LayoutApiImpl.js +3 -3
- package/src/Api/Implementation/NamedQueryApiImpl.d.ts +1 -1
- package/src/Api/Implementation/NamedQueryApiImpl.js +3 -3
- package/src/Api/Implementation/NoteApiImpl.d.ts +1 -1
- package/src/Api/Implementation/NoteApiImpl.js +3 -3
- package/src/Api/Implementation/OptionsApiImpl.js +7 -7
- package/src/Api/Implementation/PluginsApiImpl.js +1 -1
- package/src/Api/Implementation/PlusMinusApiImpl.js +1 -1
- package/src/Api/Implementation/PredicateApiImpl.d.ts +1 -1
- package/src/Api/Implementation/PredicateApiImpl.js +4 -4
- package/src/Api/Implementation/ScheduleApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ScheduleApiImpl.js +3 -3
- package/src/Api/Implementation/SettingsPanelApiImpl.js +1 -1
- package/src/Api/Implementation/StatusBarApiImpl.js +1 -1
- package/src/Api/Implementation/StyledColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/StyledColumnApiImpl.js +4 -4
- package/src/Api/Implementation/SystemStatusApiImpl.d.ts +1 -1
- package/src/Api/Implementation/SystemStatusApiImpl.js +4 -4
- package/src/Api/Implementation/TeamSharingApiImpl.d.ts +1 -1
- package/src/Api/Implementation/TeamSharingApiImpl.js +11 -11
- package/src/Api/Implementation/ThemeApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ThemeApiImpl.js +8 -8
- package/src/Api/Implementation/ToolPanelApiImpl.js +2 -2
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +1 -1
- package/src/Api/Implementation/UserInterfaceApiImpl.js +5 -5
- package/src/Api/Internal/ActionRowInternalApi.js +8 -8
- package/src/Api/Internal/AdaptableInternalApi.d.ts +2 -0
- package/src/Api/Internal/AdaptableInternalApi.js +55 -50
- package/src/Api/Internal/AlertInternalApi.js +9 -9
- package/src/Api/Internal/CalculatedColumnInternalApi.js +11 -9
- package/src/Api/Internal/ChartingInternalApi.js +1 -1
- package/src/Api/Internal/ColumnFilterInternalApi.js +7 -9
- package/src/Api/Internal/ColumnInternalApi.js +3 -3
- package/src/Api/Internal/CustomSortInternalApi.js +3 -3
- package/src/Api/Internal/DashboardInternalApi.js +4 -3
- package/src/Api/Internal/DataImportInternalApi.js +2 -2
- package/src/Api/Internal/DataSetInternalApi.js +2 -2
- package/src/Api/Internal/ExportInternalApi.js +21 -22
- package/src/Api/Internal/ExpressionInternalApi.js +4 -4
- package/src/Api/Internal/Fdc3InternalApi.d.ts +0 -1
- package/src/Api/Internal/Fdc3InternalApi.js +9 -12
- package/src/Api/Internal/FlashingCellInternalApi.js +2 -2
- package/src/Api/Internal/FormatColumnInternalApi.js +2 -3
- package/src/Api/Internal/FreeTextColumnInternalApi.js +5 -2
- package/src/Api/Internal/GridFilterInternalApi.js +2 -2
- package/src/Api/Internal/GridInternalApi.js +26 -26
- package/src/Api/Internal/LayoutInternalApi.js +6 -5
- package/src/Api/Internal/NamedQueryInternalApi.js +2 -2
- package/src/Api/Internal/PredicateInternalApi.js +5 -5
- package/src/Api/Internal/ScheduleInternalApi.js +1 -1
- package/src/Api/Internal/StyledColumnInternalApi.js +2 -2
- package/src/Api/Internal/SystemStatusInternalApi.js +1 -1
- package/src/Api/Internal/TeamSharingInternalApi.js +2 -2
- package/src/Api/Internal/ThemeInternalApi.js +1 -1
- package/src/Strategy/NoteModule.d.ts +0 -1
- package/src/Strategy/NoteModule.js +4 -5
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +1 -1
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +1 -1
- package/src/Utilities/Services/CellPopupService.js +4 -4
- package/src/Utilities/Services/Fdc3Service.js +1 -3
- package/src/Utilities/Services/FlashingCellService.d.ts +0 -2
- package/src/Utilities/Services/FlashingCellService.js +2 -3
- package/src/Utilities/Services/RowEditService.js +3 -5
- package/src/View/Alert/AlertStatusSubPanel.js +4 -4
- package/src/View/Charting/ShowChartButton.js +4 -4
- package/src/View/DataImport/DataImportWizard/DataImportWizard.js +14 -13
- package/src/agGrid/FloatingFilterWrapper.js +4 -3
- package/src/components/Datepicker/index.d.ts +1 -1
- package/src/components/ExpressionEditor/DataTableEditor.js +3 -3
- package/src/components/ExpressionEditor/ExpressionPreview.js +4 -4
- package/src/env.js +2 -2
- package/tsconfig.cjs.tsbuildinfo +1 -1
|
@@ -18,7 +18,7 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
|
|
|
18
18
|
}
|
|
19
19
|
getAdaptableJSXElement() {
|
|
20
20
|
var _a;
|
|
21
|
-
return (_a = this.
|
|
21
|
+
return (_a = this._adaptable._PRIVATE_adaptableJSXElement) !== null && _a !== void 0 ? _a : null;
|
|
22
22
|
}
|
|
23
23
|
// Popup Redux Actions
|
|
24
24
|
showPopupConfirmation(confirmation) {
|
|
@@ -66,9 +66,9 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
|
|
|
66
66
|
return this.getAdaptableState().Grid.IsGridInTreeMode;
|
|
67
67
|
}
|
|
68
68
|
getToolbarTitle() {
|
|
69
|
-
let toolbarTitle = this.
|
|
69
|
+
let toolbarTitle = this._adaptable.api.dashboardApi.getDashboardState().DashboardTitle;
|
|
70
70
|
if (StringExtensions_1.default.IsNullOrEmpty(toolbarTitle)) {
|
|
71
|
-
toolbarTitle = this.
|
|
71
|
+
toolbarTitle = this.getOptions().adaptableId;
|
|
72
72
|
if (toolbarTitle == GeneralConstants_1.ADAPTABLE_ID) {
|
|
73
73
|
toolbarTitle = 'Adaptable ';
|
|
74
74
|
}
|
|
@@ -80,62 +80,65 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
|
|
|
80
80
|
return Object.assign(Object.assign({}, config), { rowData: (_a = config.rowNode) === null || _a === void 0 ? void 0 : _a.data, changedAt: Date.now() });
|
|
81
81
|
}
|
|
82
82
|
getAdaptableInstance() {
|
|
83
|
-
return this.
|
|
83
|
+
return this._adaptable;
|
|
84
|
+
}
|
|
85
|
+
getAgGridAdapter() {
|
|
86
|
+
return this._adaptable.agGridAdapter;
|
|
84
87
|
}
|
|
85
88
|
getPredefinedConfig() {
|
|
86
|
-
return this.
|
|
89
|
+
return this.getOptions().predefinedConfig;
|
|
87
90
|
}
|
|
88
91
|
getState() {
|
|
89
92
|
return this.getAdaptableState();
|
|
90
93
|
}
|
|
91
94
|
getValidationService() {
|
|
92
|
-
return this.
|
|
95
|
+
return this._adaptable.ValidationService;
|
|
93
96
|
}
|
|
94
97
|
getModuleService() {
|
|
95
|
-
return this.
|
|
98
|
+
return this._adaptable.ModuleService;
|
|
96
99
|
}
|
|
97
100
|
getDataService() {
|
|
98
|
-
return this.
|
|
101
|
+
return this._adaptable.DataService;
|
|
99
102
|
}
|
|
100
103
|
getCellPopupService() {
|
|
101
|
-
return this.
|
|
104
|
+
return this._adaptable.CellPopupService;
|
|
102
105
|
}
|
|
103
106
|
getCalculatedColumnExpressionService() {
|
|
104
|
-
return this.
|
|
107
|
+
return this._adaptable.CalculatedColumnExpressionService;
|
|
105
108
|
}
|
|
106
109
|
getQueryLanguageService() {
|
|
107
|
-
return this.
|
|
110
|
+
return this._adaptable.QueryLanguageService;
|
|
108
111
|
}
|
|
109
112
|
getAlertService() {
|
|
110
|
-
return this.
|
|
113
|
+
return this._adaptable.AlertService;
|
|
111
114
|
}
|
|
112
115
|
getTeamSharingService() {
|
|
113
|
-
return this.
|
|
116
|
+
return this._adaptable.TeamSharingService;
|
|
114
117
|
}
|
|
115
118
|
getMetamodelService() {
|
|
116
|
-
return this.
|
|
119
|
+
return this._adaptable.MetamodelService;
|
|
117
120
|
}
|
|
118
121
|
getRowEditService() {
|
|
119
|
-
return this.
|
|
122
|
+
return this._adaptable.RowEditService;
|
|
120
123
|
}
|
|
121
124
|
getFdc3Service() {
|
|
122
|
-
return this.
|
|
125
|
+
return this._adaptable.Fdc3Service;
|
|
123
126
|
}
|
|
124
127
|
getFlashingCellService() {
|
|
125
|
-
return this.
|
|
128
|
+
return this._adaptable.FlashingCellService;
|
|
126
129
|
}
|
|
127
130
|
getModules() {
|
|
128
|
-
return this.
|
|
131
|
+
return this._adaptable.adaptableModules;
|
|
129
132
|
}
|
|
130
133
|
getModuleFriendlyName(adaptableModule) {
|
|
131
134
|
var _a, _b;
|
|
132
|
-
return ((_b = (_a = this.
|
|
135
|
+
return ((_b = (_a = this._adaptable.ModuleService.getModuleInfoByModule(adaptableModule)) === null || _a === void 0 ? void 0 : _a.FriendlyName) !== null && _b !== void 0 ? _b : adaptableModule);
|
|
133
136
|
}
|
|
134
137
|
forAllRowNodesDo(func, config) {
|
|
135
|
-
this.
|
|
138
|
+
this._adaptable.forAllRowNodesDo(func, config);
|
|
136
139
|
}
|
|
137
140
|
forAllVisibleRowNodesDo(func, config) {
|
|
138
|
-
this.
|
|
141
|
+
this._adaptable.forAllVisibleRowNodesDo(func, config);
|
|
139
142
|
}
|
|
140
143
|
getLabelForButton(button, context) {
|
|
141
144
|
if (!button.label) {
|
|
@@ -194,24 +197,24 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
|
|
|
194
197
|
return buttonIcon;
|
|
195
198
|
}
|
|
196
199
|
isDocumentationLinksDisplayed() {
|
|
197
|
-
return this.
|
|
200
|
+
return this.getUserInterfaceOptions().showDocumentationLinks;
|
|
198
201
|
}
|
|
199
202
|
// the row data which is used to preview the expression evaluation (usually the first row data)
|
|
200
203
|
getQueryPreviewData() {
|
|
201
204
|
var _a;
|
|
202
|
-
const firstRowNode = this.
|
|
205
|
+
const firstRowNode = this._adaptable.api.gridApi.getFirstRowNode();
|
|
203
206
|
if (firstRowNode == undefined) {
|
|
204
207
|
return {};
|
|
205
208
|
}
|
|
206
209
|
const firstRowData = (_a = Object.assign({}, firstRowNode === null || firstRowNode === void 0 ? void 0 : firstRowNode.data)) !== null && _a !== void 0 ? _a : {};
|
|
207
210
|
// handle CalcCols which are not persisted in the rowModel
|
|
208
|
-
this.
|
|
209
|
-
const columnRawValue = this.
|
|
211
|
+
this._adaptable.api.calculatedColumnApi.getCalculatedColumns().forEach((calculatedColumn) => {
|
|
212
|
+
const columnRawValue = this._adaptable.api.gridApi.getRawValueFromRowNode(firstRowNode, calculatedColumn.ColumnId);
|
|
210
213
|
firstRowData[calculatedColumn.ColumnId] = columnRawValue;
|
|
211
214
|
});
|
|
212
215
|
// handle FreeTextCols which are not persisted in the rowModel
|
|
213
|
-
this.
|
|
214
|
-
const columnRawValue = this.
|
|
216
|
+
this._adaptable.api.freeTextColumnApi.getFreeTextColumns().forEach((freeTextColumn) => {
|
|
217
|
+
const columnRawValue = this._adaptable.api.gridApi.getRawValueFromRowNode(firstRowNode, freeTextColumn.ColumnId);
|
|
215
218
|
firstRowData[freeTextColumn.ColumnId] = columnRawValue;
|
|
216
219
|
});
|
|
217
220
|
return firstRowData;
|
|
@@ -219,25 +222,25 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
|
|
|
219
222
|
createFrameworkComponent(containerDomNode, frameworkComponent, componentType) {
|
|
220
223
|
const createComponentFn = () =>
|
|
221
224
|
// delegate the logic to framework wrapper
|
|
222
|
-
this.
|
|
225
|
+
this._adaptable._emitSync('FrameworkComponentChange', {
|
|
223
226
|
command: 'create',
|
|
224
227
|
containerDomNode,
|
|
225
228
|
frameworkComponent,
|
|
226
229
|
componentType,
|
|
227
230
|
});
|
|
228
|
-
if (this.
|
|
231
|
+
if (this.isAdapTableReady()) {
|
|
229
232
|
createComponentFn();
|
|
230
233
|
}
|
|
231
234
|
else {
|
|
232
235
|
// adaptable may not be initialized yet if the framework component is part of the initial render
|
|
233
236
|
// AFL 2021.10.14 - not really sure if this is necessary anymore?! (see the other changes in this commit)
|
|
234
|
-
(0, waitForCondition_1.waitForCondition)(() => this.
|
|
237
|
+
(0, waitForCondition_1.waitForCondition)(() => this.isAdapTableReady()).then(() => {
|
|
235
238
|
createComponentFn();
|
|
236
239
|
});
|
|
237
240
|
}
|
|
238
241
|
}
|
|
239
242
|
destroyFrameworkComponent(containerDomNode, frameworkComponent, componentType) {
|
|
240
|
-
this.
|
|
243
|
+
this._adaptable._emitSync('FrameworkComponentChange', {
|
|
241
244
|
command: 'destroy',
|
|
242
245
|
containerDomNode,
|
|
243
246
|
frameworkComponent,
|
|
@@ -245,7 +248,7 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
|
|
|
245
248
|
});
|
|
246
249
|
}
|
|
247
250
|
initializeDataChangeHistory() {
|
|
248
|
-
if (this.
|
|
251
|
+
if (this.getDataChangeHistoryOptions().activeByDefault) {
|
|
249
252
|
this.dispatchAction(SystemRedux.SystemDataChangeHistoryEnable());
|
|
250
253
|
}
|
|
251
254
|
else {
|
|
@@ -262,7 +265,7 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
|
|
|
262
265
|
catch (error) {
|
|
263
266
|
errorHandlingFn === null || errorHandlingFn === void 0 ? void 0 : errorHandlingFn();
|
|
264
267
|
this.getUserInterfaceApi().hideProgressIndicator();
|
|
265
|
-
this.
|
|
268
|
+
this.logError('Unexpected error while executing a function with a progress indicator', error);
|
|
266
269
|
}
|
|
267
270
|
}, 16);
|
|
268
271
|
}
|
|
@@ -286,34 +289,36 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
|
|
|
286
289
|
return [...(layoutTags || []), ...(objectTags || [])];
|
|
287
290
|
}
|
|
288
291
|
getObjectTags() {
|
|
289
|
-
|
|
292
|
+
const userInterfaceOptions = this.getUserInterfaceOptions();
|
|
293
|
+
if (!this.getUserInterfaceOptions().objectTags) {
|
|
290
294
|
return;
|
|
291
295
|
}
|
|
292
|
-
if (Array.isArray(
|
|
293
|
-
return
|
|
296
|
+
if (Array.isArray(userInterfaceOptions.objectTags)) {
|
|
297
|
+
return userInterfaceOptions.objectTags;
|
|
294
298
|
}
|
|
295
|
-
if (typeof
|
|
299
|
+
if (typeof userInterfaceOptions.objectTags === 'function') {
|
|
296
300
|
// sanitize the provided tags, just to be sure that the user does NOT break the UI
|
|
297
|
-
return
|
|
301
|
+
return userInterfaceOptions
|
|
298
302
|
.objectTags(this.buildBaseContext())
|
|
299
303
|
.filter((tag) => typeof tag === 'string');
|
|
300
304
|
}
|
|
301
305
|
}
|
|
302
306
|
getLayoutTags() {
|
|
303
307
|
var _a;
|
|
304
|
-
|
|
308
|
+
const layoutOptions = this.getLayoutOptions();
|
|
309
|
+
if (!((_a = layoutOptions.layoutTagOptions) === null || _a === void 0 ? void 0 : _a.autoGenerateTagsForLayouts)) {
|
|
305
310
|
return;
|
|
306
311
|
}
|
|
307
|
-
if (
|
|
308
|
-
|
|
309
|
-
|
|
312
|
+
if (layoutOptions.layoutTagOptions.autoGenerateTagsForLayouts === true) {
|
|
313
|
+
return this.getLayoutApi()
|
|
314
|
+
.getLayouts()
|
|
315
|
+
.map((layout) => {
|
|
310
316
|
return layout.Name;
|
|
311
317
|
});
|
|
312
318
|
}
|
|
313
|
-
if (typeof
|
|
314
|
-
.
|
|
315
|
-
const
|
|
316
|
-
const customGeneratedTags = this.adaptable.adaptableOptions.layoutOptions.layoutTagOptions.autoGenerateTagsForLayouts(autoGenerateTagsForLayoutsContext);
|
|
319
|
+
if (typeof layoutOptions.layoutTagOptions.autoGenerateTagsForLayouts === 'function') {
|
|
320
|
+
const autoGenerateTagsForLayoutsContext = Object.assign({ layouts: this._adaptable.api.layoutApi.getLayouts(), objectTags: this.getAdaptableApi().userInterfaceApi.getAdaptableObjectTags() }, this.buildBaseContext());
|
|
321
|
+
const customGeneratedTags = layoutOptions.layoutTagOptions.autoGenerateTagsForLayouts(autoGenerateTagsForLayoutsContext);
|
|
317
322
|
// sanitize the provided tags, just to be sure that the user does NOT break the UI
|
|
318
323
|
return customGeneratedTags.filter((tag) => typeof tag === 'string');
|
|
319
324
|
}
|
|
@@ -339,10 +344,10 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
|
|
|
339
344
|
if (!query) {
|
|
340
345
|
return '';
|
|
341
346
|
}
|
|
342
|
-
const displayColumnFriendlyNames = (_a = this.
|
|
347
|
+
const displayColumnFriendlyNames = (_a = this.getExpressionOptions()) === null || _a === void 0 ? void 0 : _a.displayColumnFriendlyNamesForExpressions;
|
|
343
348
|
return displayColumnFriendlyNames
|
|
344
|
-
? this.
|
|
345
|
-
: this.
|
|
349
|
+
? this._adaptable.api.expressionApi.getAdaptableQueryExpressionWithColumnFriendlyNames(query)
|
|
350
|
+
: this._adaptable.api.expressionApi.getAdaptableQueryExpression(query);
|
|
346
351
|
}
|
|
347
352
|
deleteConditionalStyles(conditionalStyles) {
|
|
348
353
|
conditionalStyles.forEach((cs) => {
|
|
@@ -475,7 +480,7 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
|
|
|
475
480
|
};
|
|
476
481
|
}
|
|
477
482
|
if (!actionColumn) {
|
|
478
|
-
actionColumn = (_a = this.
|
|
483
|
+
actionColumn = (_a = this._adaptable.api.actionColumnApi
|
|
479
484
|
.getActionColumns()) === null || _a === void 0 ? void 0 : _a.find((ac) => ac.columnId == colDef.colId);
|
|
480
485
|
}
|
|
481
486
|
if (!(actionColumn === null || actionColumn === void 0 ? void 0 : actionColumn.actionColumnButton)) {
|
|
@@ -84,8 +84,7 @@ class AlertInternalApi extends ApiBase_1.ApiBase {
|
|
|
84
84
|
* @param alertToFire Alerts which has just triggered
|
|
85
85
|
*/
|
|
86
86
|
publishAlertFiredEvent(alertToFire) {
|
|
87
|
-
const
|
|
88
|
-
const alertFiredInfo = Object.assign({ alert: alertToFire }, this.getAdaptableApi().internalApi.buildBaseContext());
|
|
87
|
+
const alertFiredInfo = Object.assign({ alert: alertToFire }, this.getAdaptableInternalApi().buildBaseContext());
|
|
89
88
|
this.getEventApi().emit('AlertFired', alertFiredInfo);
|
|
90
89
|
}
|
|
91
90
|
/**
|
|
@@ -337,7 +336,7 @@ class AlertInternalApi extends ApiBase_1.ApiBase {
|
|
|
337
336
|
*/
|
|
338
337
|
getCustomAlertDescription(alertDefinition, dataChangedInfo) {
|
|
339
338
|
var _a;
|
|
340
|
-
const alertMessageFunction = (_a = this.
|
|
339
|
+
const alertMessageFunction = (_a = this.getAlertOptions()) === null || _a === void 0 ? void 0 : _a.alertMessageText;
|
|
341
340
|
if (alertMessageFunction) {
|
|
342
341
|
const alertMessageContext = {
|
|
343
342
|
alertDefinition: alertDefinition,
|
|
@@ -358,7 +357,7 @@ class AlertInternalApi extends ApiBase_1.ApiBase {
|
|
|
358
357
|
*/
|
|
359
358
|
getCustomAlertMessageHeader(alertDefinition, dataChangedInfo) {
|
|
360
359
|
var _a;
|
|
361
|
-
const alertMessageFunction = (_a = this.
|
|
360
|
+
const alertMessageFunction = (_a = this.getAlertOptions()) === null || _a === void 0 ? void 0 : _a.alertMessageHeader;
|
|
362
361
|
if (alertMessageFunction) {
|
|
363
362
|
const returnText = alertMessageFunction({
|
|
364
363
|
alertDefinition,
|
|
@@ -382,7 +381,7 @@ class AlertInternalApi extends ApiBase_1.ApiBase {
|
|
|
382
381
|
var _a, _b, _c, _d;
|
|
383
382
|
let ruleDescription = ((_b = (_a = alertDefinition.Rule) === null || _a === void 0 ? void 0 : _a.Predicates) === null || _b === void 0 ? void 0 : _b.length)
|
|
384
383
|
? (_d = (_c = alertDefinition.Rule) === null || _c === void 0 ? void 0 : _c.Predicates) === null || _d === void 0 ? void 0 : _d.map((predicate) => this.getPredicateApi().predicateToString(predicate)).join(' AND ')
|
|
385
|
-
: this.
|
|
384
|
+
: this.getAdaptableInternalApi().getAdaptableQueryExpressionText(alertDefinition.Rule);
|
|
386
385
|
return ruleDescription;
|
|
387
386
|
}
|
|
388
387
|
/**
|
|
@@ -438,14 +437,14 @@ class AlertInternalApi extends ApiBase_1.ApiBase {
|
|
|
438
437
|
adaptableAlertForm.buttons = (_b = adaptableAlertForm.buttons) === null || _b === void 0 ? void 0 : _b.map((button) => {
|
|
439
438
|
let buttonStyle = isActionForm
|
|
440
439
|
? button.ButtonStyle
|
|
441
|
-
: this.
|
|
440
|
+
: this.getAdaptableInternalApi().getStyleForButton(button, context);
|
|
442
441
|
if (defaultMessageType && !(buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.tone)) {
|
|
443
442
|
// force the button tone to be the alert tone, if the tone is missing from button style (or button style non-existent)
|
|
444
443
|
buttonStyle = Object.assign(Object.assign({}, buttonStyle), { tone: defaultMessageType.toLowerCase() });
|
|
445
444
|
}
|
|
446
445
|
let label = isActionForm
|
|
447
446
|
? button.Label
|
|
448
|
-
: this.
|
|
447
|
+
: this.getAdaptableInternalApi().getLabelForButton(button, context);
|
|
449
448
|
return Object.assign(Object.assign({}, button), { buttonStyle,
|
|
450
449
|
label });
|
|
451
450
|
});
|
|
@@ -561,7 +560,7 @@ class AlertInternalApi extends ApiBase_1.ApiBase {
|
|
|
561
560
|
var _a;
|
|
562
561
|
const predicateDefHandlerContext = Object.assign({ value: dataChangedEvent.newValue, oldValue: dataChangedEvent.oldValue,
|
|
563
562
|
// TODO send real display value
|
|
564
|
-
displayValue: null, node: dataChangedEvent.rowNode, column: dataChangedEvent.column }, this.
|
|
563
|
+
displayValue: null, node: dataChangedEvent.rowNode, column: dataChangedEvent.column }, this.getAdaptableInternalApi().buildBaseContext());
|
|
565
564
|
return this.getAdaptableApi().predicateApi.handleColumnPredicates((_a = alert.Rule) === null || _a === void 0 ? void 0 : _a.Predicates, predicateDefHandlerContext, defaultNoPredicateReturn);
|
|
566
565
|
}
|
|
567
566
|
isAlertDefinitionForRowChangeEvent(alertDefinition) {
|
|
@@ -680,7 +679,8 @@ class AlertInternalApi extends ApiBase_1.ApiBase {
|
|
|
680
679
|
}
|
|
681
680
|
}
|
|
682
681
|
if (text.indexOf('[context') !== -1) {
|
|
683
|
-
const agGridContext = (_c = (_b = this.
|
|
682
|
+
const agGridContext = (_c = (_b = this.getAdaptableInternalApi()
|
|
683
|
+
.getAgGridAdapter()).getGridOption) === null || _c === void 0 ? void 0 : _c.call(_b, 'context');
|
|
684
684
|
const agGridContextKeys = Helper_1.default.extractContextKeysFromText(text);
|
|
685
685
|
for (const key of agGridContextKeys) {
|
|
686
686
|
if (agGridContext[key]) {
|
|
@@ -14,7 +14,9 @@ class CalculatedColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
14
14
|
*/
|
|
15
15
|
getCalculatedColumnModuleReferences(calculatedColumn) {
|
|
16
16
|
const references = [];
|
|
17
|
-
this.
|
|
17
|
+
this.getAdaptableInternalApi()
|
|
18
|
+
.getModules()
|
|
19
|
+
.forEach((module) => {
|
|
18
20
|
if (module
|
|
19
21
|
.getModuleCalculatedColumnReferences()
|
|
20
22
|
.some((moduleReference) => moduleReference.Uuid === calculatedColumn.Uuid)) {
|
|
@@ -85,7 +87,7 @@ class CalculatedColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
85
87
|
}
|
|
86
88
|
fireCalculatedColumnChangedEvent(trigger, calculatedColumn) {
|
|
87
89
|
const adaptableApi = this.getAdaptableApi();
|
|
88
|
-
const calculatedColumnChangedInfo = Object.assign({ actionName: trigger, calculatedColumn: calculatedColumn, calculatedColumnExpressionAST: adaptableApi.expressionApi.getASTForExpression(this.getExpressionFromCalculatedColumn(calculatedColumn)) }, this.
|
|
90
|
+
const calculatedColumnChangedInfo = Object.assign({ actionName: trigger, calculatedColumn: calculatedColumn, calculatedColumnExpressionAST: adaptableApi.expressionApi.getASTForExpression(this.getExpressionFromCalculatedColumn(calculatedColumn)) }, this.getAdaptableInternalApi().buildBaseContext());
|
|
89
91
|
this.getAdaptableApi().eventApi.emit('CalculatedColumnChanged', calculatedColumnChangedInfo);
|
|
90
92
|
}
|
|
91
93
|
getColDefsForCalculatedColumns() {
|
|
@@ -96,9 +98,9 @@ class CalculatedColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
96
98
|
.map((calculatedColumn) => {
|
|
97
99
|
const calculatedColumnSettings = Object.assign(Object.assign({}, defaultCalculatedColumnSettings), calculatedColumn.CalculatedColumnSettings);
|
|
98
100
|
if (!calculatedColumnSettings.DataType) {
|
|
99
|
-
calculatedColumnSettings.DataType = this.
|
|
100
|
-
.
|
|
101
|
-
.
|
|
101
|
+
calculatedColumnSettings.DataType = this.getAdaptableInternalApi()
|
|
102
|
+
.getCalculatedColumnExpressionService()
|
|
103
|
+
.getCalculatedColumnDataType(calculatedColumn.Query);
|
|
102
104
|
}
|
|
103
105
|
const columnTypes = [
|
|
104
106
|
GeneralConstants_1.AB_SPECIAL_COLUMN,
|
|
@@ -118,9 +120,9 @@ class CalculatedColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
118
120
|
StringExtensions_1.default.IsNotNullOrEmpty(calculatedColumn.Query.AggregatedScalarExpression)) {
|
|
119
121
|
return (_b = params.data) === null || _b === void 0 ? void 0 : _b[calculatedColumn.ColumnId];
|
|
120
122
|
}
|
|
121
|
-
return this.
|
|
122
|
-
.
|
|
123
|
-
.
|
|
123
|
+
return this.getAdaptableInternalApi()
|
|
124
|
+
.getCalculatedColumnExpressionService()
|
|
125
|
+
.evaluateCalculatedColumnQuery(calculatedColumn, params.node);
|
|
124
126
|
};
|
|
125
127
|
const newColDef = {
|
|
126
128
|
headerName: calculatedColumn.FriendlyName
|
|
@@ -145,7 +147,7 @@ class CalculatedColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
145
147
|
if (calculatedColumnSettings.ShowToolTip != null &&
|
|
146
148
|
calculatedColumnSettings.ShowToolTip == true) {
|
|
147
149
|
newColDef.tooltipValueGetter = () => {
|
|
148
|
-
return this.
|
|
150
|
+
return this.getAdaptableInternalApi().getAdaptableQueryExpressionText(calculatedColumn.Query);
|
|
149
151
|
};
|
|
150
152
|
}
|
|
151
153
|
if (calculatedColumnSettings.HeaderToolTip) {
|
|
@@ -9,7 +9,7 @@ class ChartingInternalApi extends ApiBase_1.ApiBase {
|
|
|
9
9
|
? document.querySelector(chartContainer.element)
|
|
10
10
|
: chartContainer === null || chartContainer === void 0 ? void 0 : chartContainer.element;
|
|
11
11
|
if (!element && typeof (chartContainer === null || chartContainer === void 0 ? void 0 : chartContainer.element) === 'string') {
|
|
12
|
-
this.
|
|
12
|
+
this.getAdatableLogger().consoleLogByMessageType(`Chart container element not found: ${chartContainer.element}`, 'Error');
|
|
13
13
|
return null;
|
|
14
14
|
}
|
|
15
15
|
return element;
|
|
@@ -104,7 +104,7 @@ class ColumnFilterInternalApi extends ApiBase_1.ApiBase {
|
|
|
104
104
|
}
|
|
105
105
|
let value = gridCell.normalisedValue;
|
|
106
106
|
const predicateDefHandlerContext = Object.assign({ value: value, oldValue: null, displayValue: gridCell.displayValue, node,
|
|
107
|
-
column }, this.
|
|
107
|
+
column }, this.getAdaptableInternalApi().buildBaseContext());
|
|
108
108
|
return this.getAdaptableApi().predicateApi.handlePredicate(columnFilter.Predicate, predicateDefHandlerContext, true);
|
|
109
109
|
}
|
|
110
110
|
/**
|
|
@@ -167,16 +167,14 @@ class ColumnFilterInternalApi extends ApiBase_1.ApiBase {
|
|
|
167
167
|
* Fires Column Filter Applied Event - typically used to enable filtering on the server
|
|
168
168
|
*/
|
|
169
169
|
fireColumnFilterAppliedEvent() {
|
|
170
|
-
if (this.
|
|
171
|
-
const
|
|
172
|
-
const columnFilterAppliedInfo = Object.assign({ columnFilters: this.getColumnFilterApi().getColumnFilters() }, this.getAdaptableApi().internalApi.buildBaseContext());
|
|
170
|
+
if (this.isAdapTableReady()) {
|
|
171
|
+
const columnFilterAppliedInfo = Object.assign({ columnFilters: this.getColumnFilterApi().getColumnFilters() }, this.getAdaptableInternalApi().buildBaseContext());
|
|
173
172
|
this.getAdaptableApi().eventApi.emit('ColumnFilterApplied', columnFilterAppliedInfo);
|
|
174
173
|
}
|
|
175
174
|
}
|
|
176
175
|
fireGridFilterAppliedEvent() {
|
|
177
|
-
if (this.
|
|
178
|
-
const
|
|
179
|
-
const gridFilterAppliedInfo = Object.assign({ columnFilters: this.getColumnFilterApi().getColumnFilters() }, this.getAdaptableApi().internalApi.buildBaseContext());
|
|
176
|
+
if (this.isAdapTableReady()) {
|
|
177
|
+
const gridFilterAppliedInfo = Object.assign({ columnFilters: this.getColumnFilterApi().getColumnFilters() }, this.getAdaptableInternalApi().buildBaseContext());
|
|
180
178
|
this.getAdaptableApi().eventApi.emit('GridFilterApplied', gridFilterAppliedInfo);
|
|
181
179
|
}
|
|
182
180
|
}
|
|
@@ -203,7 +201,7 @@ class ColumnFilterInternalApi extends ApiBase_1.ApiBase {
|
|
|
203
201
|
getFilterValuesMaxNumberOfItems(column) {
|
|
204
202
|
const maxFilterValues = this.getColumnFilterOptions().valuesFilterOptions.maxFilterValuesToDisplay;
|
|
205
203
|
if (typeof maxFilterValues === 'function') {
|
|
206
|
-
const columnFilterContext = Object.assign(Object.assign({}, this.
|
|
204
|
+
const columnFilterContext = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { column: column });
|
|
207
205
|
return maxFilterValues(columnFilterContext);
|
|
208
206
|
}
|
|
209
207
|
else {
|
|
@@ -216,7 +214,7 @@ class ColumnFilterInternalApi extends ApiBase_1.ApiBase {
|
|
|
216
214
|
const availablePredicates = this.getPredicateApi().getPredicateDefsByModuleScope('columnFilter');
|
|
217
215
|
let predicateIds = [];
|
|
218
216
|
if (typeof (valuesFilterPredicateOptions === null || valuesFilterPredicateOptions === void 0 ? void 0 : valuesFilterPredicateOptions.predicates) === 'function') {
|
|
219
|
-
const columnFilterContext = Object.assign(Object.assign({}, this.
|
|
217
|
+
const columnFilterContext = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { column: column });
|
|
220
218
|
predicateIds = valuesFilterPredicateOptions.predicates(columnFilterContext);
|
|
221
219
|
}
|
|
222
220
|
else if (Array.isArray(valuesFilterPredicateOptions === null || valuesFilterPredicateOptions === void 0 ? void 0 : valuesFilterPredicateOptions.predicates)) {
|
|
@@ -16,7 +16,7 @@ class ColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
16
16
|
* @param columnId Column to use
|
|
17
17
|
*/
|
|
18
18
|
getAgGridColumnType(columnId) {
|
|
19
|
-
return this.
|
|
19
|
+
return this._adaptable.getAgGridColumnType(columnId);
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* Retrieves a list providing the Friendly Name / Caption for all columns
|
|
@@ -44,12 +44,12 @@ class ColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
44
44
|
* @param columnId columnId to look up
|
|
45
45
|
*/
|
|
46
46
|
getAgGridColumnForAdaptableColumn(columnId) {
|
|
47
|
-
return this.
|
|
47
|
+
return this._adaptable.getAgGridColumnForColumnId(columnId);
|
|
48
48
|
}
|
|
49
49
|
getActiveColumnComparator(columnId, customSort, customSortComparer) {
|
|
50
50
|
if ((!customSort || (customSort === null || customSort === void 0 ? void 0 : customSort.IsSuspended)) && !customSortComparer) {
|
|
51
51
|
// defaults to AG-Grid column definition comparator if no CustomSort is defined&active
|
|
52
|
-
const colDefComparator = this.
|
|
52
|
+
const colDefComparator = this._adaptable.agGridColumnAdapter.getUserColDefProperty(columnId, 'comparator');
|
|
53
53
|
return colDefComparator;
|
|
54
54
|
}
|
|
55
55
|
// CustomSort Comparer function takes precedence over CustomSort SortedValues
|
|
@@ -10,11 +10,11 @@ class CustomSortInternalApi extends ApiBase_1.ApiBase {
|
|
|
10
10
|
}
|
|
11
11
|
getDefaultCustomSortComparer(columnId, columnValues) {
|
|
12
12
|
// have to return a function that may not have access to this
|
|
13
|
-
const
|
|
13
|
+
const gridApi = this.getGridApi();
|
|
14
14
|
return function compareItemsOfCustomSort(valueA, valueB, nodeA, nodeB) {
|
|
15
15
|
var _a, _b;
|
|
16
|
-
let firstElementValueString = (_a = (nodeA &&
|
|
17
|
-
let secondElementValueString = (_b = (nodeB &&
|
|
16
|
+
let firstElementValueString = (_a = (nodeA && gridApi.getDisplayValueFromRowNode(nodeA, columnId))) !== null && _a !== void 0 ? _a : valueA;
|
|
17
|
+
let secondElementValueString = (_b = (nodeB && gridApi.getDisplayValueFromRowNode(nodeB, columnId))) !== null && _b !== void 0 ? _b : valueB;
|
|
18
18
|
let indexFirstElement = columnValues.indexOf(firstElementValueString);
|
|
19
19
|
let containsFirstElement = indexFirstElement >= 0;
|
|
20
20
|
let indexSecondElement = columnValues.indexOf(secondElementValueString);
|
|
@@ -30,7 +30,7 @@ class DashboardInternalApi extends ApiBase_1.ApiBase {
|
|
|
30
30
|
}
|
|
31
31
|
return visibleInOldState && !visibleInNewState;
|
|
32
32
|
};
|
|
33
|
-
const dashboardChangedInfo = Object.assign(Object.assign({}, this.
|
|
33
|
+
const dashboardChangedInfo = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { actionName: trigger, oldDashboardState,
|
|
34
34
|
newDashboardState,
|
|
35
35
|
isToolbarStateChangedToVisible,
|
|
36
36
|
isToolbarStateChangedToHidden });
|
|
@@ -69,13 +69,14 @@ class DashboardInternalApi extends ApiBase_1.ApiBase {
|
|
|
69
69
|
return `ab-CustomToolbar__${customToolbarName}__component`;
|
|
70
70
|
}
|
|
71
71
|
getModuleToolbars() {
|
|
72
|
+
const moduleService = this.getAdaptableInternalApi().getModuleService();
|
|
72
73
|
return Types_1.ALL_TOOLBARS.filter((moduleName) => {
|
|
73
|
-
return
|
|
74
|
+
return moduleService.isModuleAvailable(moduleName);
|
|
74
75
|
}).map((moduleName) => {
|
|
75
76
|
var _a, _b;
|
|
76
77
|
return {
|
|
77
78
|
id: moduleName,
|
|
78
|
-
friendlyName: (_b = (_a =
|
|
79
|
+
friendlyName: (_b = (_a = moduleService.getModuleInfoByModule(moduleName)) === null || _a === void 0 ? void 0 : _a.FriendlyName) !== null && _b !== void 0 ? _b : moduleName,
|
|
79
80
|
};
|
|
80
81
|
});
|
|
81
82
|
}
|
|
@@ -58,8 +58,8 @@ class DataImportInternalApi extends ApiBase_1.ApiBase {
|
|
|
58
58
|
publishDataImportedEvent(importData, addedRows, updatedRows) {
|
|
59
59
|
const dataImportedInfo = Object.assign({ importData,
|
|
60
60
|
addedRows,
|
|
61
|
-
updatedRows }, this.
|
|
62
|
-
this.
|
|
61
|
+
updatedRows }, this.getAdaptableInternalApi().buildBaseContext());
|
|
62
|
+
this.getAdaptableInternalApi().dispatchReduxAction(SystemRedux.DataImportCompleted(dataImportedInfo));
|
|
63
63
|
this.getEventApi().emit('DataImported', dataImportedInfo);
|
|
64
64
|
}
|
|
65
65
|
}
|
|
@@ -8,8 +8,8 @@ class DataSetInternalApi extends ApiBase_1.ApiBase {
|
|
|
8
8
|
* @param dataSet Data Set which has been selected
|
|
9
9
|
*/
|
|
10
10
|
fireDataSetSelectedEvent(dataSet) {
|
|
11
|
-
if (this.
|
|
12
|
-
const dataSetSelectedInfo = Object.assign(Object.assign({}, this.
|
|
11
|
+
if (this.isAdapTableReady()) {
|
|
12
|
+
const dataSetSelectedInfo = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { dataSet });
|
|
13
13
|
this.getAdaptableApi().eventApi.emit('DataSetSelected', dataSetSelectedInfo);
|
|
14
14
|
}
|
|
15
15
|
}
|