@adaptabletools/adaptable 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.esm.tsbuildinfo +1 -1
|
@@ -14,7 +14,7 @@ export class AdaptableInternalApi extends ApiBase {
|
|
|
14
14
|
}
|
|
15
15
|
getAdaptableJSXElement() {
|
|
16
16
|
var _a;
|
|
17
|
-
return (_a = this.
|
|
17
|
+
return (_a = this._adaptable._PRIVATE_adaptableJSXElement) !== null && _a !== void 0 ? _a : null;
|
|
18
18
|
}
|
|
19
19
|
// Popup Redux Actions
|
|
20
20
|
showPopupConfirmation(confirmation) {
|
|
@@ -62,9 +62,9 @@ export class AdaptableInternalApi extends ApiBase {
|
|
|
62
62
|
return this.getAdaptableState().Grid.IsGridInTreeMode;
|
|
63
63
|
}
|
|
64
64
|
getToolbarTitle() {
|
|
65
|
-
let toolbarTitle = this.
|
|
65
|
+
let toolbarTitle = this._adaptable.api.dashboardApi.getDashboardState().DashboardTitle;
|
|
66
66
|
if (StringExtensions.IsNullOrEmpty(toolbarTitle)) {
|
|
67
|
-
toolbarTitle = this.
|
|
67
|
+
toolbarTitle = this.getOptions().adaptableId;
|
|
68
68
|
if (toolbarTitle == ADAPTABLE_ID) {
|
|
69
69
|
toolbarTitle = 'Adaptable ';
|
|
70
70
|
}
|
|
@@ -76,62 +76,65 @@ export class AdaptableInternalApi extends ApiBase {
|
|
|
76
76
|
return Object.assign(Object.assign({}, config), { rowData: (_a = config.rowNode) === null || _a === void 0 ? void 0 : _a.data, changedAt: Date.now() });
|
|
77
77
|
}
|
|
78
78
|
getAdaptableInstance() {
|
|
79
|
-
return this.
|
|
79
|
+
return this._adaptable;
|
|
80
|
+
}
|
|
81
|
+
getAgGridAdapter() {
|
|
82
|
+
return this._adaptable.agGridAdapter;
|
|
80
83
|
}
|
|
81
84
|
getPredefinedConfig() {
|
|
82
|
-
return this.
|
|
85
|
+
return this.getOptions().predefinedConfig;
|
|
83
86
|
}
|
|
84
87
|
getState() {
|
|
85
88
|
return this.getAdaptableState();
|
|
86
89
|
}
|
|
87
90
|
getValidationService() {
|
|
88
|
-
return this.
|
|
91
|
+
return this._adaptable.ValidationService;
|
|
89
92
|
}
|
|
90
93
|
getModuleService() {
|
|
91
|
-
return this.
|
|
94
|
+
return this._adaptable.ModuleService;
|
|
92
95
|
}
|
|
93
96
|
getDataService() {
|
|
94
|
-
return this.
|
|
97
|
+
return this._adaptable.DataService;
|
|
95
98
|
}
|
|
96
99
|
getCellPopupService() {
|
|
97
|
-
return this.
|
|
100
|
+
return this._adaptable.CellPopupService;
|
|
98
101
|
}
|
|
99
102
|
getCalculatedColumnExpressionService() {
|
|
100
|
-
return this.
|
|
103
|
+
return this._adaptable.CalculatedColumnExpressionService;
|
|
101
104
|
}
|
|
102
105
|
getQueryLanguageService() {
|
|
103
|
-
return this.
|
|
106
|
+
return this._adaptable.QueryLanguageService;
|
|
104
107
|
}
|
|
105
108
|
getAlertService() {
|
|
106
|
-
return this.
|
|
109
|
+
return this._adaptable.AlertService;
|
|
107
110
|
}
|
|
108
111
|
getTeamSharingService() {
|
|
109
|
-
return this.
|
|
112
|
+
return this._adaptable.TeamSharingService;
|
|
110
113
|
}
|
|
111
114
|
getMetamodelService() {
|
|
112
|
-
return this.
|
|
115
|
+
return this._adaptable.MetamodelService;
|
|
113
116
|
}
|
|
114
117
|
getRowEditService() {
|
|
115
|
-
return this.
|
|
118
|
+
return this._adaptable.RowEditService;
|
|
116
119
|
}
|
|
117
120
|
getFdc3Service() {
|
|
118
|
-
return this.
|
|
121
|
+
return this._adaptable.Fdc3Service;
|
|
119
122
|
}
|
|
120
123
|
getFlashingCellService() {
|
|
121
|
-
return this.
|
|
124
|
+
return this._adaptable.FlashingCellService;
|
|
122
125
|
}
|
|
123
126
|
getModules() {
|
|
124
|
-
return this.
|
|
127
|
+
return this._adaptable.adaptableModules;
|
|
125
128
|
}
|
|
126
129
|
getModuleFriendlyName(adaptableModule) {
|
|
127
130
|
var _a, _b;
|
|
128
|
-
return ((_b = (_a = this.
|
|
131
|
+
return ((_b = (_a = this._adaptable.ModuleService.getModuleInfoByModule(adaptableModule)) === null || _a === void 0 ? void 0 : _a.FriendlyName) !== null && _b !== void 0 ? _b : adaptableModule);
|
|
129
132
|
}
|
|
130
133
|
forAllRowNodesDo(func, config) {
|
|
131
|
-
this.
|
|
134
|
+
this._adaptable.forAllRowNodesDo(func, config);
|
|
132
135
|
}
|
|
133
136
|
forAllVisibleRowNodesDo(func, config) {
|
|
134
|
-
this.
|
|
137
|
+
this._adaptable.forAllVisibleRowNodesDo(func, config);
|
|
135
138
|
}
|
|
136
139
|
getLabelForButton(button, context) {
|
|
137
140
|
if (!button.label) {
|
|
@@ -190,24 +193,24 @@ export class AdaptableInternalApi extends ApiBase {
|
|
|
190
193
|
return buttonIcon;
|
|
191
194
|
}
|
|
192
195
|
isDocumentationLinksDisplayed() {
|
|
193
|
-
return this.
|
|
196
|
+
return this.getUserInterfaceOptions().showDocumentationLinks;
|
|
194
197
|
}
|
|
195
198
|
// the row data which is used to preview the expression evaluation (usually the first row data)
|
|
196
199
|
getQueryPreviewData() {
|
|
197
200
|
var _a;
|
|
198
|
-
const firstRowNode = this.
|
|
201
|
+
const firstRowNode = this._adaptable.api.gridApi.getFirstRowNode();
|
|
199
202
|
if (firstRowNode == undefined) {
|
|
200
203
|
return {};
|
|
201
204
|
}
|
|
202
205
|
const firstRowData = (_a = Object.assign({}, firstRowNode === null || firstRowNode === void 0 ? void 0 : firstRowNode.data)) !== null && _a !== void 0 ? _a : {};
|
|
203
206
|
// handle CalcCols which are not persisted in the rowModel
|
|
204
|
-
this.
|
|
205
|
-
const columnRawValue = this.
|
|
207
|
+
this._adaptable.api.calculatedColumnApi.getCalculatedColumns().forEach((calculatedColumn) => {
|
|
208
|
+
const columnRawValue = this._adaptable.api.gridApi.getRawValueFromRowNode(firstRowNode, calculatedColumn.ColumnId);
|
|
206
209
|
firstRowData[calculatedColumn.ColumnId] = columnRawValue;
|
|
207
210
|
});
|
|
208
211
|
// handle FreeTextCols which are not persisted in the rowModel
|
|
209
|
-
this.
|
|
210
|
-
const columnRawValue = this.
|
|
212
|
+
this._adaptable.api.freeTextColumnApi.getFreeTextColumns().forEach((freeTextColumn) => {
|
|
213
|
+
const columnRawValue = this._adaptable.api.gridApi.getRawValueFromRowNode(firstRowNode, freeTextColumn.ColumnId);
|
|
211
214
|
firstRowData[freeTextColumn.ColumnId] = columnRawValue;
|
|
212
215
|
});
|
|
213
216
|
return firstRowData;
|
|
@@ -215,25 +218,25 @@ export class AdaptableInternalApi extends ApiBase {
|
|
|
215
218
|
createFrameworkComponent(containerDomNode, frameworkComponent, componentType) {
|
|
216
219
|
const createComponentFn = () =>
|
|
217
220
|
// delegate the logic to framework wrapper
|
|
218
|
-
this.
|
|
221
|
+
this._adaptable._emitSync('FrameworkComponentChange', {
|
|
219
222
|
command: 'create',
|
|
220
223
|
containerDomNode,
|
|
221
224
|
frameworkComponent,
|
|
222
225
|
componentType,
|
|
223
226
|
});
|
|
224
|
-
if (this.
|
|
227
|
+
if (this.isAdapTableReady()) {
|
|
225
228
|
createComponentFn();
|
|
226
229
|
}
|
|
227
230
|
else {
|
|
228
231
|
// adaptable may not be initialized yet if the framework component is part of the initial render
|
|
229
232
|
// AFL 2021.10.14 - not really sure if this is necessary anymore?! (see the other changes in this commit)
|
|
230
|
-
waitForCondition(() => this.
|
|
233
|
+
waitForCondition(() => this.isAdapTableReady()).then(() => {
|
|
231
234
|
createComponentFn();
|
|
232
235
|
});
|
|
233
236
|
}
|
|
234
237
|
}
|
|
235
238
|
destroyFrameworkComponent(containerDomNode, frameworkComponent, componentType) {
|
|
236
|
-
this.
|
|
239
|
+
this._adaptable._emitSync('FrameworkComponentChange', {
|
|
237
240
|
command: 'destroy',
|
|
238
241
|
containerDomNode,
|
|
239
242
|
frameworkComponent,
|
|
@@ -241,7 +244,7 @@ export class AdaptableInternalApi extends ApiBase {
|
|
|
241
244
|
});
|
|
242
245
|
}
|
|
243
246
|
initializeDataChangeHistory() {
|
|
244
|
-
if (this.
|
|
247
|
+
if (this.getDataChangeHistoryOptions().activeByDefault) {
|
|
245
248
|
this.dispatchAction(SystemRedux.SystemDataChangeHistoryEnable());
|
|
246
249
|
}
|
|
247
250
|
else {
|
|
@@ -258,7 +261,7 @@ export class AdaptableInternalApi extends ApiBase {
|
|
|
258
261
|
catch (error) {
|
|
259
262
|
errorHandlingFn === null || errorHandlingFn === void 0 ? void 0 : errorHandlingFn();
|
|
260
263
|
this.getUserInterfaceApi().hideProgressIndicator();
|
|
261
|
-
this.
|
|
264
|
+
this.logError('Unexpected error while executing a function with a progress indicator', error);
|
|
262
265
|
}
|
|
263
266
|
}, 16);
|
|
264
267
|
}
|
|
@@ -282,34 +285,36 @@ export class AdaptableInternalApi extends ApiBase {
|
|
|
282
285
|
return [...(layoutTags || []), ...(objectTags || [])];
|
|
283
286
|
}
|
|
284
287
|
getObjectTags() {
|
|
285
|
-
|
|
288
|
+
const userInterfaceOptions = this.getUserInterfaceOptions();
|
|
289
|
+
if (!this.getUserInterfaceOptions().objectTags) {
|
|
286
290
|
return;
|
|
287
291
|
}
|
|
288
|
-
if (Array.isArray(
|
|
289
|
-
return
|
|
292
|
+
if (Array.isArray(userInterfaceOptions.objectTags)) {
|
|
293
|
+
return userInterfaceOptions.objectTags;
|
|
290
294
|
}
|
|
291
|
-
if (typeof
|
|
295
|
+
if (typeof userInterfaceOptions.objectTags === 'function') {
|
|
292
296
|
// sanitize the provided tags, just to be sure that the user does NOT break the UI
|
|
293
|
-
return
|
|
297
|
+
return userInterfaceOptions
|
|
294
298
|
.objectTags(this.buildBaseContext())
|
|
295
299
|
.filter((tag) => typeof tag === 'string');
|
|
296
300
|
}
|
|
297
301
|
}
|
|
298
302
|
getLayoutTags() {
|
|
299
303
|
var _a;
|
|
300
|
-
|
|
304
|
+
const layoutOptions = this.getLayoutOptions();
|
|
305
|
+
if (!((_a = layoutOptions.layoutTagOptions) === null || _a === void 0 ? void 0 : _a.autoGenerateTagsForLayouts)) {
|
|
301
306
|
return;
|
|
302
307
|
}
|
|
303
|
-
if (
|
|
304
|
-
|
|
305
|
-
|
|
308
|
+
if (layoutOptions.layoutTagOptions.autoGenerateTagsForLayouts === true) {
|
|
309
|
+
return this.getLayoutApi()
|
|
310
|
+
.getLayouts()
|
|
311
|
+
.map((layout) => {
|
|
306
312
|
return layout.Name;
|
|
307
313
|
});
|
|
308
314
|
}
|
|
309
|
-
if (typeof
|
|
310
|
-
.
|
|
311
|
-
const
|
|
312
|
-
const customGeneratedTags = this.adaptable.adaptableOptions.layoutOptions.layoutTagOptions.autoGenerateTagsForLayouts(autoGenerateTagsForLayoutsContext);
|
|
315
|
+
if (typeof layoutOptions.layoutTagOptions.autoGenerateTagsForLayouts === 'function') {
|
|
316
|
+
const autoGenerateTagsForLayoutsContext = Object.assign({ layouts: this._adaptable.api.layoutApi.getLayouts(), objectTags: this.getAdaptableApi().userInterfaceApi.getAdaptableObjectTags() }, this.buildBaseContext());
|
|
317
|
+
const customGeneratedTags = layoutOptions.layoutTagOptions.autoGenerateTagsForLayouts(autoGenerateTagsForLayoutsContext);
|
|
313
318
|
// sanitize the provided tags, just to be sure that the user does NOT break the UI
|
|
314
319
|
return customGeneratedTags.filter((tag) => typeof tag === 'string');
|
|
315
320
|
}
|
|
@@ -335,10 +340,10 @@ export class AdaptableInternalApi extends ApiBase {
|
|
|
335
340
|
if (!query) {
|
|
336
341
|
return '';
|
|
337
342
|
}
|
|
338
|
-
const displayColumnFriendlyNames = (_a = this.
|
|
343
|
+
const displayColumnFriendlyNames = (_a = this.getExpressionOptions()) === null || _a === void 0 ? void 0 : _a.displayColumnFriendlyNamesForExpressions;
|
|
339
344
|
return displayColumnFriendlyNames
|
|
340
|
-
? this.
|
|
341
|
-
: this.
|
|
345
|
+
? this._adaptable.api.expressionApi.getAdaptableQueryExpressionWithColumnFriendlyNames(query)
|
|
346
|
+
: this._adaptable.api.expressionApi.getAdaptableQueryExpression(query);
|
|
342
347
|
}
|
|
343
348
|
deleteConditionalStyles(conditionalStyles) {
|
|
344
349
|
conditionalStyles.forEach((cs) => {
|
|
@@ -471,7 +476,7 @@ export class AdaptableInternalApi extends ApiBase {
|
|
|
471
476
|
};
|
|
472
477
|
}
|
|
473
478
|
if (!actionColumn) {
|
|
474
|
-
actionColumn = (_a = this.
|
|
479
|
+
actionColumn = (_a = this._adaptable.api.actionColumnApi
|
|
475
480
|
.getActionColumns()) === null || _a === void 0 ? void 0 : _a.find((ac) => ac.columnId == colDef.colId);
|
|
476
481
|
}
|
|
477
482
|
if (!(actionColumn === null || actionColumn === void 0 ? void 0 : actionColumn.actionColumnButton)) {
|
|
@@ -80,8 +80,7 @@ export class AlertInternalApi extends ApiBase {
|
|
|
80
80
|
* @param alertToFire Alerts which has just triggered
|
|
81
81
|
*/
|
|
82
82
|
publishAlertFiredEvent(alertToFire) {
|
|
83
|
-
const
|
|
84
|
-
const alertFiredInfo = Object.assign({ alert: alertToFire }, this.getAdaptableApi().internalApi.buildBaseContext());
|
|
83
|
+
const alertFiredInfo = Object.assign({ alert: alertToFire }, this.getAdaptableInternalApi().buildBaseContext());
|
|
85
84
|
this.getEventApi().emit('AlertFired', alertFiredInfo);
|
|
86
85
|
}
|
|
87
86
|
/**
|
|
@@ -333,7 +332,7 @@ export class AlertInternalApi extends ApiBase {
|
|
|
333
332
|
*/
|
|
334
333
|
getCustomAlertDescription(alertDefinition, dataChangedInfo) {
|
|
335
334
|
var _a;
|
|
336
|
-
const alertMessageFunction = (_a = this.
|
|
335
|
+
const alertMessageFunction = (_a = this.getAlertOptions()) === null || _a === void 0 ? void 0 : _a.alertMessageText;
|
|
337
336
|
if (alertMessageFunction) {
|
|
338
337
|
const alertMessageContext = {
|
|
339
338
|
alertDefinition: alertDefinition,
|
|
@@ -354,7 +353,7 @@ export class AlertInternalApi extends ApiBase {
|
|
|
354
353
|
*/
|
|
355
354
|
getCustomAlertMessageHeader(alertDefinition, dataChangedInfo) {
|
|
356
355
|
var _a;
|
|
357
|
-
const alertMessageFunction = (_a = this.
|
|
356
|
+
const alertMessageFunction = (_a = this.getAlertOptions()) === null || _a === void 0 ? void 0 : _a.alertMessageHeader;
|
|
358
357
|
if (alertMessageFunction) {
|
|
359
358
|
const returnText = alertMessageFunction({
|
|
360
359
|
alertDefinition,
|
|
@@ -378,7 +377,7 @@ export class AlertInternalApi extends ApiBase {
|
|
|
378
377
|
var _a, _b, _c, _d;
|
|
379
378
|
let ruleDescription = ((_b = (_a = alertDefinition.Rule) === null || _a === void 0 ? void 0 : _a.Predicates) === null || _b === void 0 ? void 0 : _b.length)
|
|
380
379
|
? (_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 ')
|
|
381
|
-
: this.
|
|
380
|
+
: this.getAdaptableInternalApi().getAdaptableQueryExpressionText(alertDefinition.Rule);
|
|
382
381
|
return ruleDescription;
|
|
383
382
|
}
|
|
384
383
|
/**
|
|
@@ -434,14 +433,14 @@ export class AlertInternalApi extends ApiBase {
|
|
|
434
433
|
adaptableAlertForm.buttons = (_b = adaptableAlertForm.buttons) === null || _b === void 0 ? void 0 : _b.map((button) => {
|
|
435
434
|
let buttonStyle = isActionForm
|
|
436
435
|
? button.ButtonStyle
|
|
437
|
-
: this.
|
|
436
|
+
: this.getAdaptableInternalApi().getStyleForButton(button, context);
|
|
438
437
|
if (defaultMessageType && !(buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.tone)) {
|
|
439
438
|
// force the button tone to be the alert tone, if the tone is missing from button style (or button style non-existent)
|
|
440
439
|
buttonStyle = Object.assign(Object.assign({}, buttonStyle), { tone: defaultMessageType.toLowerCase() });
|
|
441
440
|
}
|
|
442
441
|
let label = isActionForm
|
|
443
442
|
? button.Label
|
|
444
|
-
: this.
|
|
443
|
+
: this.getAdaptableInternalApi().getLabelForButton(button, context);
|
|
445
444
|
return Object.assign(Object.assign({}, button), { buttonStyle,
|
|
446
445
|
label });
|
|
447
446
|
});
|
|
@@ -557,7 +556,7 @@ export class AlertInternalApi extends ApiBase {
|
|
|
557
556
|
var _a;
|
|
558
557
|
const predicateDefHandlerContext = Object.assign({ value: dataChangedEvent.newValue, oldValue: dataChangedEvent.oldValue,
|
|
559
558
|
// TODO send real display value
|
|
560
|
-
displayValue: null, node: dataChangedEvent.rowNode, column: dataChangedEvent.column }, this.
|
|
559
|
+
displayValue: null, node: dataChangedEvent.rowNode, column: dataChangedEvent.column }, this.getAdaptableInternalApi().buildBaseContext());
|
|
561
560
|
return this.getAdaptableApi().predicateApi.handleColumnPredicates((_a = alert.Rule) === null || _a === void 0 ? void 0 : _a.Predicates, predicateDefHandlerContext, defaultNoPredicateReturn);
|
|
562
561
|
}
|
|
563
562
|
isAlertDefinitionForRowChangeEvent(alertDefinition) {
|
|
@@ -676,7 +675,8 @@ export class AlertInternalApi extends ApiBase {
|
|
|
676
675
|
}
|
|
677
676
|
}
|
|
678
677
|
if (text.indexOf('[context') !== -1) {
|
|
679
|
-
const agGridContext = (_c = (_b = this.
|
|
678
|
+
const agGridContext = (_c = (_b = this.getAdaptableInternalApi()
|
|
679
|
+
.getAgGridAdapter()).getGridOption) === null || _c === void 0 ? void 0 : _c.call(_b, 'context');
|
|
680
680
|
const agGridContextKeys = Helper.extractContextKeysFromText(text);
|
|
681
681
|
for (const key of agGridContextKeys) {
|
|
682
682
|
if (agGridContext[key]) {
|
|
@@ -10,7 +10,9 @@ export class CalculatedColumnInternalApi extends ApiBase {
|
|
|
10
10
|
*/
|
|
11
11
|
getCalculatedColumnModuleReferences(calculatedColumn) {
|
|
12
12
|
const references = [];
|
|
13
|
-
this.
|
|
13
|
+
this.getAdaptableInternalApi()
|
|
14
|
+
.getModules()
|
|
15
|
+
.forEach((module) => {
|
|
14
16
|
if (module
|
|
15
17
|
.getModuleCalculatedColumnReferences()
|
|
16
18
|
.some((moduleReference) => moduleReference.Uuid === calculatedColumn.Uuid)) {
|
|
@@ -81,7 +83,7 @@ export class CalculatedColumnInternalApi extends ApiBase {
|
|
|
81
83
|
}
|
|
82
84
|
fireCalculatedColumnChangedEvent(trigger, calculatedColumn) {
|
|
83
85
|
const adaptableApi = this.getAdaptableApi();
|
|
84
|
-
const calculatedColumnChangedInfo = Object.assign({ actionName: trigger, calculatedColumn: calculatedColumn, calculatedColumnExpressionAST: adaptableApi.expressionApi.getASTForExpression(this.getExpressionFromCalculatedColumn(calculatedColumn)) }, this.
|
|
86
|
+
const calculatedColumnChangedInfo = Object.assign({ actionName: trigger, calculatedColumn: calculatedColumn, calculatedColumnExpressionAST: adaptableApi.expressionApi.getASTForExpression(this.getExpressionFromCalculatedColumn(calculatedColumn)) }, this.getAdaptableInternalApi().buildBaseContext());
|
|
85
87
|
this.getAdaptableApi().eventApi.emit('CalculatedColumnChanged', calculatedColumnChangedInfo);
|
|
86
88
|
}
|
|
87
89
|
getColDefsForCalculatedColumns() {
|
|
@@ -92,9 +94,9 @@ export class CalculatedColumnInternalApi extends ApiBase {
|
|
|
92
94
|
.map((calculatedColumn) => {
|
|
93
95
|
const calculatedColumnSettings = Object.assign(Object.assign({}, defaultCalculatedColumnSettings), calculatedColumn.CalculatedColumnSettings);
|
|
94
96
|
if (!calculatedColumnSettings.DataType) {
|
|
95
|
-
calculatedColumnSettings.DataType = this.
|
|
96
|
-
.
|
|
97
|
-
.
|
|
97
|
+
calculatedColumnSettings.DataType = this.getAdaptableInternalApi()
|
|
98
|
+
.getCalculatedColumnExpressionService()
|
|
99
|
+
.getCalculatedColumnDataType(calculatedColumn.Query);
|
|
98
100
|
}
|
|
99
101
|
const columnTypes = [
|
|
100
102
|
AB_SPECIAL_COLUMN,
|
|
@@ -114,9 +116,9 @@ export class CalculatedColumnInternalApi extends ApiBase {
|
|
|
114
116
|
StringExtensions.IsNotNullOrEmpty(calculatedColumn.Query.AggregatedScalarExpression)) {
|
|
115
117
|
return (_b = params.data) === null || _b === void 0 ? void 0 : _b[calculatedColumn.ColumnId];
|
|
116
118
|
}
|
|
117
|
-
return this.
|
|
118
|
-
.
|
|
119
|
-
.
|
|
119
|
+
return this.getAdaptableInternalApi()
|
|
120
|
+
.getCalculatedColumnExpressionService()
|
|
121
|
+
.evaluateCalculatedColumnQuery(calculatedColumn, params.node);
|
|
120
122
|
};
|
|
121
123
|
const newColDef = {
|
|
122
124
|
headerName: calculatedColumn.FriendlyName
|
|
@@ -141,7 +143,7 @@ export class CalculatedColumnInternalApi extends ApiBase {
|
|
|
141
143
|
if (calculatedColumnSettings.ShowToolTip != null &&
|
|
142
144
|
calculatedColumnSettings.ShowToolTip == true) {
|
|
143
145
|
newColDef.tooltipValueGetter = () => {
|
|
144
|
-
return this.
|
|
146
|
+
return this.getAdaptableInternalApi().getAdaptableQueryExpressionText(calculatedColumn.Query);
|
|
145
147
|
};
|
|
146
148
|
}
|
|
147
149
|
if (calculatedColumnSettings.HeaderToolTip) {
|
|
@@ -6,7 +6,7 @@ export class ChartingInternalApi extends ApiBase {
|
|
|
6
6
|
? document.querySelector(chartContainer.element)
|
|
7
7
|
: chartContainer === null || chartContainer === void 0 ? void 0 : chartContainer.element;
|
|
8
8
|
if (!element && typeof (chartContainer === null || chartContainer === void 0 ? void 0 : chartContainer.element) === 'string') {
|
|
9
|
-
this.
|
|
9
|
+
this.getAdatableLogger().consoleLogByMessageType(`Chart container element not found: ${chartContainer.element}`, 'Error');
|
|
10
10
|
return null;
|
|
11
11
|
}
|
|
12
12
|
return element;
|
|
@@ -100,7 +100,7 @@ export class ColumnFilterInternalApi extends ApiBase {
|
|
|
100
100
|
}
|
|
101
101
|
let value = gridCell.normalisedValue;
|
|
102
102
|
const predicateDefHandlerContext = Object.assign({ value: value, oldValue: null, displayValue: gridCell.displayValue, node,
|
|
103
|
-
column }, this.
|
|
103
|
+
column }, this.getAdaptableInternalApi().buildBaseContext());
|
|
104
104
|
return this.getAdaptableApi().predicateApi.handlePredicate(columnFilter.Predicate, predicateDefHandlerContext, true);
|
|
105
105
|
}
|
|
106
106
|
/**
|
|
@@ -163,16 +163,14 @@ export class ColumnFilterInternalApi extends ApiBase {
|
|
|
163
163
|
* Fires Column Filter Applied Event - typically used to enable filtering on the server
|
|
164
164
|
*/
|
|
165
165
|
fireColumnFilterAppliedEvent() {
|
|
166
|
-
if (this.
|
|
167
|
-
const
|
|
168
|
-
const columnFilterAppliedInfo = Object.assign({ columnFilters: this.getColumnFilterApi().getColumnFilters() }, this.getAdaptableApi().internalApi.buildBaseContext());
|
|
166
|
+
if (this.isAdapTableReady()) {
|
|
167
|
+
const columnFilterAppliedInfo = Object.assign({ columnFilters: this.getColumnFilterApi().getColumnFilters() }, this.getAdaptableInternalApi().buildBaseContext());
|
|
169
168
|
this.getAdaptableApi().eventApi.emit('ColumnFilterApplied', columnFilterAppliedInfo);
|
|
170
169
|
}
|
|
171
170
|
}
|
|
172
171
|
fireGridFilterAppliedEvent() {
|
|
173
|
-
if (this.
|
|
174
|
-
const
|
|
175
|
-
const gridFilterAppliedInfo = Object.assign({ columnFilters: this.getColumnFilterApi().getColumnFilters() }, this.getAdaptableApi().internalApi.buildBaseContext());
|
|
172
|
+
if (this.isAdapTableReady()) {
|
|
173
|
+
const gridFilterAppliedInfo = Object.assign({ columnFilters: this.getColumnFilterApi().getColumnFilters() }, this.getAdaptableInternalApi().buildBaseContext());
|
|
176
174
|
this.getAdaptableApi().eventApi.emit('GridFilterApplied', gridFilterAppliedInfo);
|
|
177
175
|
}
|
|
178
176
|
}
|
|
@@ -199,7 +197,7 @@ export class ColumnFilterInternalApi extends ApiBase {
|
|
|
199
197
|
getFilterValuesMaxNumberOfItems(column) {
|
|
200
198
|
const maxFilterValues = this.getColumnFilterOptions().valuesFilterOptions.maxFilterValuesToDisplay;
|
|
201
199
|
if (typeof maxFilterValues === 'function') {
|
|
202
|
-
const columnFilterContext = Object.assign(Object.assign({}, this.
|
|
200
|
+
const columnFilterContext = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { column: column });
|
|
203
201
|
return maxFilterValues(columnFilterContext);
|
|
204
202
|
}
|
|
205
203
|
else {
|
|
@@ -212,7 +210,7 @@ export class ColumnFilterInternalApi extends ApiBase {
|
|
|
212
210
|
const availablePredicates = this.getPredicateApi().getPredicateDefsByModuleScope('columnFilter');
|
|
213
211
|
let predicateIds = [];
|
|
214
212
|
if (typeof (valuesFilterPredicateOptions === null || valuesFilterPredicateOptions === void 0 ? void 0 : valuesFilterPredicateOptions.predicates) === 'function') {
|
|
215
|
-
const columnFilterContext = Object.assign(Object.assign({}, this.
|
|
213
|
+
const columnFilterContext = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { column: column });
|
|
216
214
|
predicateIds = valuesFilterPredicateOptions.predicates(columnFilterContext);
|
|
217
215
|
}
|
|
218
216
|
else if (Array.isArray(valuesFilterPredicateOptions === null || valuesFilterPredicateOptions === void 0 ? void 0 : valuesFilterPredicateOptions.predicates)) {
|
|
@@ -12,7 +12,7 @@ export class ColumnInternalApi extends ApiBase {
|
|
|
12
12
|
* @param columnId Column to use
|
|
13
13
|
*/
|
|
14
14
|
getAgGridColumnType(columnId) {
|
|
15
|
-
return this.
|
|
15
|
+
return this._adaptable.getAgGridColumnType(columnId);
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* Retrieves a list providing the Friendly Name / Caption for all columns
|
|
@@ -40,12 +40,12 @@ export class ColumnInternalApi extends ApiBase {
|
|
|
40
40
|
* @param columnId columnId to look up
|
|
41
41
|
*/
|
|
42
42
|
getAgGridColumnForAdaptableColumn(columnId) {
|
|
43
|
-
return this.
|
|
43
|
+
return this._adaptable.getAgGridColumnForColumnId(columnId);
|
|
44
44
|
}
|
|
45
45
|
getActiveColumnComparator(columnId, customSort, customSortComparer) {
|
|
46
46
|
if ((!customSort || (customSort === null || customSort === void 0 ? void 0 : customSort.IsSuspended)) && !customSortComparer) {
|
|
47
47
|
// defaults to AG-Grid column definition comparator if no CustomSort is defined&active
|
|
48
|
-
const colDefComparator = this.
|
|
48
|
+
const colDefComparator = this._adaptable.agGridColumnAdapter.getUserColDefProperty(columnId, 'comparator');
|
|
49
49
|
return colDefComparator;
|
|
50
50
|
}
|
|
51
51
|
// CustomSort Comparer function takes precedence over CustomSort SortedValues
|
|
@@ -7,11 +7,11 @@ export class CustomSortInternalApi extends ApiBase {
|
|
|
7
7
|
}
|
|
8
8
|
getDefaultCustomSortComparer(columnId, columnValues) {
|
|
9
9
|
// have to return a function that may not have access to this
|
|
10
|
-
const
|
|
10
|
+
const gridApi = this.getGridApi();
|
|
11
11
|
return function compareItemsOfCustomSort(valueA, valueB, nodeA, nodeB) {
|
|
12
12
|
var _a, _b;
|
|
13
|
-
let firstElementValueString = (_a = (nodeA &&
|
|
14
|
-
let secondElementValueString = (_b = (nodeB &&
|
|
13
|
+
let firstElementValueString = (_a = (nodeA && gridApi.getDisplayValueFromRowNode(nodeA, columnId))) !== null && _a !== void 0 ? _a : valueA;
|
|
14
|
+
let secondElementValueString = (_b = (nodeB && gridApi.getDisplayValueFromRowNode(nodeB, columnId))) !== null && _b !== void 0 ? _b : valueB;
|
|
15
15
|
let indexFirstElement = columnValues.indexOf(firstElementValueString);
|
|
16
16
|
let containsFirstElement = indexFirstElement >= 0;
|
|
17
17
|
let indexSecondElement = columnValues.indexOf(secondElementValueString);
|
|
@@ -26,7 +26,7 @@ export class DashboardInternalApi extends ApiBase {
|
|
|
26
26
|
}
|
|
27
27
|
return visibleInOldState && !visibleInNewState;
|
|
28
28
|
};
|
|
29
|
-
const dashboardChangedInfo = Object.assign(Object.assign({}, this.
|
|
29
|
+
const dashboardChangedInfo = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { actionName: trigger, oldDashboardState,
|
|
30
30
|
newDashboardState,
|
|
31
31
|
isToolbarStateChangedToVisible,
|
|
32
32
|
isToolbarStateChangedToHidden });
|
|
@@ -65,13 +65,14 @@ export class DashboardInternalApi extends ApiBase {
|
|
|
65
65
|
return `ab-CustomToolbar__${customToolbarName}__component`;
|
|
66
66
|
}
|
|
67
67
|
getModuleToolbars() {
|
|
68
|
+
const moduleService = this.getAdaptableInternalApi().getModuleService();
|
|
68
69
|
return ALL_TOOLBARS.filter((moduleName) => {
|
|
69
|
-
return
|
|
70
|
+
return moduleService.isModuleAvailable(moduleName);
|
|
70
71
|
}).map((moduleName) => {
|
|
71
72
|
var _a, _b;
|
|
72
73
|
return {
|
|
73
74
|
id: moduleName,
|
|
74
|
-
friendlyName: (_b = (_a =
|
|
75
|
+
friendlyName: (_b = (_a = moduleService.getModuleInfoByModule(moduleName)) === null || _a === void 0 ? void 0 : _a.FriendlyName) !== null && _b !== void 0 ? _b : moduleName,
|
|
75
76
|
};
|
|
76
77
|
});
|
|
77
78
|
}
|
|
@@ -54,8 +54,8 @@ export class DataImportInternalApi extends ApiBase {
|
|
|
54
54
|
publishDataImportedEvent(importData, addedRows, updatedRows) {
|
|
55
55
|
const dataImportedInfo = Object.assign({ importData,
|
|
56
56
|
addedRows,
|
|
57
|
-
updatedRows }, this.
|
|
58
|
-
this.
|
|
57
|
+
updatedRows }, this.getAdaptableInternalApi().buildBaseContext());
|
|
58
|
+
this.getAdaptableInternalApi().dispatchReduxAction(SystemRedux.DataImportCompleted(dataImportedInfo));
|
|
59
59
|
this.getEventApi().emit('DataImported', dataImportedInfo);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
@@ -5,8 +5,8 @@ export class DataSetInternalApi extends ApiBase {
|
|
|
5
5
|
* @param dataSet Data Set which has been selected
|
|
6
6
|
*/
|
|
7
7
|
fireDataSetSelectedEvent(dataSet) {
|
|
8
|
-
if (this.
|
|
9
|
-
const dataSetSelectedInfo = Object.assign(Object.assign({}, this.
|
|
8
|
+
if (this.isAdapTableReady()) {
|
|
9
|
+
const dataSetSelectedInfo = Object.assign(Object.assign({}, this.getAdaptableInternalApi().buildBaseContext()), { dataSet });
|
|
10
10
|
this.getAdaptableApi().eventApi.emit('DataSetSelected', dataSetSelectedInfo);
|
|
11
11
|
}
|
|
12
12
|
}
|