@adaptabletools/adaptable-cjs 20.0.0-canary.2 → 20.0.0-canary.21
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/base.css +1288 -898
- package/base.css.map +1 -1
- package/index.css +428 -898
- package/index.css.map +1 -1
- package/package.json +4 -4
- package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -1
- package/src/AdaptableOptions/CellSummaryOptions.d.ts +1 -1
- package/src/AdaptableOptions/ContainerOptions.d.ts +0 -7
- package/src/AdaptableOptions/DashboardOptions.d.ts +1 -1
- package/src/AdaptableOptions/DefaultAdaptableOptions.js +2 -2
- package/src/AdaptableOptions/EditOptions.d.ts +14 -3
- package/src/AdaptableOptions/ExportOptions.d.ts +11 -20
- package/src/AdaptableOptions/PredicateOptions.d.ts +4 -4
- package/src/AdaptableOptions/QuickSearchOptions.d.ts +2 -2
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +7 -0
- package/src/Api/ExportApi.d.ts +1 -6
- package/src/Api/Fdc3Api.d.ts +5 -3
- package/src/Api/Implementation/AdaptableApiImpl.js +1 -0
- package/src/Api/Implementation/ColumnFilterApiImpl.js +3 -3
- package/src/Api/Implementation/ExportApiImpl.d.ts +1 -2
- package/src/Api/Implementation/ExportApiImpl.js +17 -10
- package/src/Api/Implementation/Fdc3ApiImpl.d.ts +3 -3
- package/src/Api/Implementation/Fdc3ApiImpl.js +4 -4
- package/src/Api/Implementation/LayoutHelpers.js +8 -27
- package/src/Api/Implementation/PredicateApiImpl.js +1 -1
- package/src/Api/Implementation/ScheduleApiImpl.js +1 -1
- package/src/Api/Implementation/StyledColumnApiImpl.js +1 -1
- package/src/Api/Implementation/ThemeApiImpl.js +3 -1
- package/src/Api/Internal/ActionColumnInternalApi.js +16 -19
- package/src/Api/Internal/AdaptableInternalApi.js +1 -1
- package/src/Api/Internal/ColumnFilterInternalApi.js +2 -2
- package/src/Api/Internal/ColumnInternalApi.js +1 -2
- package/src/Api/Internal/EventInternalApi.js +6 -1
- package/src/Api/Internal/ExportInternalApi.d.ts +10 -6
- package/src/Api/Internal/ExportInternalApi.js +105 -136
- package/src/Api/Internal/RowFormInternalApi.js +1 -1
- package/src/Api/LayoutApi.d.ts +1 -1
- package/src/Api/ThemeApi.d.ts +2 -0
- package/src/PredefinedConfig/AlertState.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableColumnContext.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +32 -48
- package/src/PredefinedConfig/Common/ColumnFilter.d.ts +6 -2
- package/src/PredefinedConfig/ExportState.d.ts +10 -17
- package/src/PredefinedConfig/FlashingCellState.d.ts +1 -1
- package/src/PredefinedConfig/LayoutState.d.ts +17 -17
- package/src/PredefinedConfig/StyledColumnState.d.ts +1 -1
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +4 -3
- package/src/Redux/ActionsReducers/LayoutRedux.js +3 -3
- package/src/Redux/Store/AdaptableStore.js +2 -2
- package/src/Strategy/ColumnFilterModule.js +4 -4
- package/src/Strategy/StyledColumnModule.js +6 -6
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +5 -6
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +9 -10
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +27 -27
- package/src/Utilities/Helpers/AdaptableHelper.d.ts +2 -0
- package/src/Utilities/Helpers/AdaptableHelper.js +12 -1
- package/src/Utilities/Helpers/DateHelper.js +3 -5
- package/src/Utilities/Helpers/FormatHelper.js +19 -6
- package/src/Utilities/ObjectFactory.js +1 -0
- package/src/Utilities/Services/Fdc3Service.d.ts +2 -2
- package/src/Utilities/Services/Fdc3Service.js +7 -2
- package/src/Utilities/Services/ThemeService.d.ts +1 -1
- package/src/Utilities/Services/ThemeService.js +5 -5
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +41 -0
- package/src/View/ColumnInfo/ColumnInfo.js +0 -1
- package/src/View/Comments/CommentsEditor.js +5 -2
- package/src/View/Comments/CommentsPopup.js +5 -2
- package/src/View/Components/ColumnFilter/ColumnFilter.d.ts +1 -1
- package/src/View/Components/ColumnFilter/ColumnFilter.js +4 -2
- package/src/View/Components/ColumnFilter/FloatingFilter.js +1 -1
- package/src/View/Components/ColumnFilter/LayoutColumnFilter.js +1 -1
- package/src/View/Components/ColumnFilter/useAdaptableFilterWrapper.d.ts +1 -1
- package/src/View/Components/ColumnFilter/useAdaptableFilterWrapper.js +6 -2
- package/src/View/Components/ColumnFilter/utils.js +2 -2
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +3 -3
- package/src/View/Dashboard/CustomToolbar.js +2 -2
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +4 -1
- package/src/View/Filter/FilterSummary.js +1 -1
- package/src/View/GridInfo/GridInfoPopup/AdaptableObjectsSummary.js +6 -2
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +7 -2
- package/src/View/Note/NotePopup.js +5 -2
- package/src/View/QuickSearch/QuickSearchPopup.js +2 -2
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.d.ts +2 -0
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +18 -2
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsSummary.js +4 -0
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +2 -1
- package/src/View/StatusBar/AdaptableStatusBar.js +7 -5
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.d.ts +3 -4
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +348 -191
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +4 -4
- package/src/agGrid/AdaptableAgGrid.d.ts +4 -8
- package/src/agGrid/AdaptableAgGrid.js +71 -117
- package/src/agGrid/AgGridAdapter.d.ts +1 -1
- package/src/agGrid/AgGridAdapter.js +5 -6
- package/src/agGrid/AgGridColumnAdapter.js +5 -10
- package/src/agGrid/AgGridExportAdapter.d.ts +24 -1
- package/src/agGrid/AgGridExportAdapter.js +24 -25
- package/src/agGrid/AgGridThemeAdapter.d.ts +19 -0
- package/src/agGrid/AgGridThemeAdapter.js +126 -0
- package/src/agGrid/cellRenderers/BadgeRenderer.js +2 -1
- package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.js +2 -2
- package/src/components/ColorPicker/ColorPicker.js +2 -2
- package/src/components/Datepicker/DatepickerContext.d.ts +1 -0
- package/src/components/Datepicker/index.d.ts +1 -0
- package/src/components/OverlayTrigger/useAgGridClassName.js +1 -1
- package/src/components/Select/Select.d.ts +1 -0
- package/src/components/Select/Select.js +30 -7
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +23 -15
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/VersionUpgrade20.d.ts +3 -0
- package/src/migration/VersionUpgrade20.js +141 -12
- package/src/types.d.ts +3 -3
- package/tsconfig.cjs.tsbuildinfo +1 -1
|
@@ -2,18 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ExportInternalApi = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const groupBy_1 = tslib_1.__importDefault(require("lodash/groupBy"));
|
|
6
5
|
const ApiBase_1 = require("../Implementation/ApiBase");
|
|
6
|
+
const ag_grid_enterprise_1 = require("ag-grid-enterprise");
|
|
7
7
|
const Uuid_1 = require("../../PredefinedConfig/Uuid");
|
|
8
8
|
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
9
|
-
const ModuleConstants_1 = require("../../Utilities/Constants/ModuleConstants");
|
|
10
|
-
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/ArrayExtensions"));
|
|
11
9
|
const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
|
|
12
10
|
const FormatHelper_1 = tslib_1.__importStar(require("../../Utilities/Helpers/FormatHelper"));
|
|
13
11
|
const Helper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/Helper"));
|
|
14
12
|
const PopupRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/PopupRedux"));
|
|
15
13
|
const InternalRedux_1 = require("../../Redux/ActionsReducers/InternalRedux");
|
|
16
|
-
const AdaptableLogger_1 = require("../../agGrid/AdaptableLogger");
|
|
17
14
|
class ExportInternalApi extends ApiBase_1.ApiBase {
|
|
18
15
|
/**
|
|
19
16
|
* Value Items for Report Name Selection
|
|
@@ -117,7 +114,7 @@ class ExportInternalApi extends ApiBase_1.ApiBase {
|
|
|
117
114
|
// format is customized based on column data type
|
|
118
115
|
switch (columnDataType) {
|
|
119
116
|
case 'text':
|
|
120
|
-
return dataFormatDataType.
|
|
117
|
+
return dataFormatDataType.text;
|
|
121
118
|
case 'number':
|
|
122
119
|
return dataFormatDataType.number;
|
|
123
120
|
case 'date':
|
|
@@ -215,7 +212,6 @@ class ExportInternalApi extends ApiBase_1.ApiBase {
|
|
|
215
212
|
return `[${report.Name}]`;
|
|
216
213
|
}
|
|
217
214
|
else {
|
|
218
|
-
// FIXME AFL: maybe fihnd a better description?
|
|
219
215
|
switch (report.ReportRowScope) {
|
|
220
216
|
case 'AllRows':
|
|
221
217
|
return '[All Rows]';
|
|
@@ -228,138 +224,12 @@ class ExportInternalApi extends ApiBase_1.ApiBase {
|
|
|
228
224
|
}
|
|
229
225
|
}
|
|
230
226
|
}
|
|
231
|
-
getReportDataColumns(report, includePrimaryKey = false) {
|
|
232
|
-
let reportColumns = [];
|
|
233
|
-
let gridColumns = this.getAdaptableApi().columnApi.getExportableColumns();
|
|
234
|
-
if (this.getAdaptableApi().exportApi.isExternalReport(report)) {
|
|
235
|
-
return reportColumns;
|
|
236
|
-
}
|
|
237
|
-
// first get the cols depending on the Column Scope
|
|
238
|
-
switch (report.ReportColumnScope) {
|
|
239
|
-
case 'AllColumns':
|
|
240
|
-
reportColumns = gridColumns;
|
|
241
|
-
break;
|
|
242
|
-
case 'VisibleColumns':
|
|
243
|
-
reportColumns = gridColumns.filter((c) => c.visible);
|
|
244
|
-
break;
|
|
245
|
-
case 'SelectedColumns':
|
|
246
|
-
// we extract the selected columns from the grid columns to preserve the grid column order
|
|
247
|
-
const selectedColumnIds = this.getAdaptableApi()
|
|
248
|
-
.gridApi.getSelectedCellInfo()
|
|
249
|
-
.columns.map((column) => column.columnId);
|
|
250
|
-
reportColumns = gridColumns.filter((gridColumn) => selectedColumnIds.includes(gridColumn.columnId));
|
|
251
|
-
break;
|
|
252
|
-
case 'ScopeColumns':
|
|
253
|
-
if ('ColumnIds' in report.Scope) {
|
|
254
|
-
reportColumns = report.Scope.ColumnIds.map((columnId) => this.getAdaptableApi().columnApi.getColumnWithColumnId(columnId)).filter((c) => c);
|
|
255
|
-
}
|
|
256
|
-
else {
|
|
257
|
-
reportColumns = this.getAdaptableApi().columnScopeApi.getColumnsInScope(report.Scope);
|
|
258
|
-
}
|
|
259
|
-
break;
|
|
260
|
-
}
|
|
261
|
-
if (includePrimaryKey) {
|
|
262
|
-
const pkColumn = reportColumns.find((column) => column.columnId === this.getAdaptableApi().optionsApi.getPrimaryKey());
|
|
263
|
-
// TODO simplify after we fix the IsPrimaryKey bug
|
|
264
|
-
// const pkColumn = reportColumns.find(column => column.IsPrimaryKey);
|
|
265
|
-
if (!pkColumn && !!this.getAdaptableApi().columnApi.getPrimaryKeyColumn()) {
|
|
266
|
-
reportColumns.push(this.getAdaptableApi().columnApi.getPrimaryKeyColumn());
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
return reportColumns;
|
|
270
|
-
}
|
|
271
|
-
getReportDataRows(report, columns, includePrimaryKey) {
|
|
272
|
-
if (ArrayExtensions_1.default.IsNullOrEmpty(columns)) {
|
|
273
|
-
return [];
|
|
274
|
-
}
|
|
275
|
-
const columnIds = columns.map((column) => column.columnId);
|
|
276
|
-
const resultRowData = [];
|
|
277
|
-
switch (report.ReportRowScope) {
|
|
278
|
-
case 'AllRows':
|
|
279
|
-
this.getAdaptableInternalApi().forAllRowNodesDo((rowNode) => {
|
|
280
|
-
resultRowData.push(this.getRowObjectForColumnIds(rowNode, columnIds, report.Name));
|
|
281
|
-
});
|
|
282
|
-
break;
|
|
283
|
-
case 'VisibleRows':
|
|
284
|
-
this.getAdaptableInternalApi().forAllVisibleRowNodesDo((rowNode) => {
|
|
285
|
-
resultRowData.push(this.getRowObjectForColumnIds(rowNode, columnIds, report.Name));
|
|
286
|
-
});
|
|
287
|
-
break;
|
|
288
|
-
case 'ExpressionRows':
|
|
289
|
-
this.getAdaptableInternalApi().forAllRowNodesDo((rowNode) => {
|
|
290
|
-
try {
|
|
291
|
-
if (this.getAdaptableApi()
|
|
292
|
-
.internalApi.getQueryLanguageService()
|
|
293
|
-
.evaluateBooleanExpression(report.Query?.BooleanExpression, ModuleConstants_1.ExportModuleId, rowNode)) {
|
|
294
|
-
resultRowData.push(this.getRowObjectForColumnIds(rowNode, columnIds, report.Name));
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
catch (error) {
|
|
298
|
-
(0, AdaptableLogger_1.errorOnce)(error.message);
|
|
299
|
-
}
|
|
300
|
-
});
|
|
301
|
-
break;
|
|
302
|
-
case 'SelectedRows':
|
|
303
|
-
// CellSelection
|
|
304
|
-
const selectedCellInfo = this.getAdaptableApi().gridApi.getSelectedCellInfo();
|
|
305
|
-
const { gridCells: GridCells } = selectedCellInfo;
|
|
306
|
-
let selectedCellsByPrimaryKey = (0, groupBy_1.default)(GridCells, 'primaryKeyValue');
|
|
307
|
-
// we iterate over all visibleRowNodes to preserve the current order
|
|
308
|
-
this.getAdaptableInternalApi().forAllVisibleRowNodesDo((rowNode) => {
|
|
309
|
-
const rowPrimaryKeyValue = this.getAdaptableApi().gridApi.getPrimaryKeyValueForRowNode(rowNode);
|
|
310
|
-
const selectedRowCells = selectedCellsByPrimaryKey[rowPrimaryKeyValue];
|
|
311
|
-
if (selectedRowCells) {
|
|
312
|
-
const selectedRowColumnIds = selectedRowCells.map((rowCell) => rowCell.column.columnId);
|
|
313
|
-
const selectedColumnIds = columnIds.filter((columnId) => selectedRowColumnIds.includes(columnId));
|
|
314
|
-
const row = this.getRowObjectForColumnIds(rowNode, selectedColumnIds, report.Name);
|
|
315
|
-
if (includePrimaryKey) {
|
|
316
|
-
row[this.getAdaptableApi().optionsApi.getPrimaryKey()] = rowPrimaryKeyValue;
|
|
317
|
-
}
|
|
318
|
-
resultRowData.push(row);
|
|
319
|
-
}
|
|
320
|
-
});
|
|
321
|
-
// Row Selection
|
|
322
|
-
const selectedRowInfo = this.getAdaptableApi().gridApi.getSelectedRowInfo();
|
|
323
|
-
const selectedGridRowPrimaryKeys = selectedRowInfo?.gridRows
|
|
324
|
-
?.filter((gr) => gr.rowInfo.isGroup == false)
|
|
325
|
-
.map((gridRow) => gridRow.primaryKeyValue) ?? [];
|
|
326
|
-
if (selectedGridRowPrimaryKeys.length) {
|
|
327
|
-
this.getAdaptableInternalApi().forAllRowNodesDo((rowNode) => {
|
|
328
|
-
const rowPrimaryKeyValue = this.getAdaptableApi().gridApi.getPrimaryKeyValueForRowNode(rowNode);
|
|
329
|
-
if (selectedGridRowPrimaryKeys.includes(rowPrimaryKeyValue)) {
|
|
330
|
-
resultRowData.push(this.getRowObjectForColumnIds(rowNode, columnIds, report.Name));
|
|
331
|
-
}
|
|
332
|
-
});
|
|
333
|
-
}
|
|
334
|
-
break;
|
|
335
|
-
}
|
|
336
|
-
return resultRowData;
|
|
337
|
-
}
|
|
338
|
-
getReportData(report, includePrimaryKey = false) {
|
|
339
|
-
if (this.getAdaptableApi().exportApi.isExternalReport(report)) {
|
|
340
|
-
return this.getAdaptableApi().exportApi.runExternalReport(report.Name);
|
|
341
|
-
}
|
|
342
|
-
const columns = this.getReportDataColumns(report, includePrimaryKey);
|
|
343
|
-
const rows = this.getReportDataRows(report, columns, includePrimaryKey);
|
|
344
|
-
return { columns, rows };
|
|
345
|
-
}
|
|
346
|
-
getReportDataAsArray(report, includePrimaryKey = false) {
|
|
347
|
-
const reportData = this.getReportData(report, includePrimaryKey);
|
|
348
|
-
return this.convertReportDataToArray(reportData);
|
|
349
|
-
}
|
|
350
227
|
convertReportDataToArray(reportData) {
|
|
351
228
|
return [
|
|
352
229
|
reportData.columns.map((column) => column.friendlyName),
|
|
353
|
-
...reportData.rows.map((row) => reportData.columns.map((column) => row[column.columnId])),
|
|
230
|
+
...reportData.rows.map((row) => reportData.columns.map((column) => row[column.field ?? column.columnId])),
|
|
354
231
|
];
|
|
355
232
|
}
|
|
356
|
-
getRowObjectForColumnIds(rowNode, columnIds, reportName) {
|
|
357
|
-
return columnIds.reduce((result, columnId) => {
|
|
358
|
-
// FIXME AFL if this method remains, 'false' should be replaced with dynamic value
|
|
359
|
-
result[columnId] = this.getCellExportValueFromRowNode(rowNode, columnId, false);
|
|
360
|
-
return result;
|
|
361
|
-
}, {});
|
|
362
|
-
}
|
|
363
233
|
publishLiveLiveDataChangedEvent(reportDestination, liveDataTrigger, liveReport) {
|
|
364
234
|
const liveDataChangedInfo = {
|
|
365
235
|
...this.getAdaptableInternalApi().buildBaseContext(),
|
|
@@ -433,9 +303,8 @@ class ExportInternalApi extends ApiBase_1.ApiBase {
|
|
|
433
303
|
this.sendReportToCustomDestination(reportResult, report, format, destination);
|
|
434
304
|
}
|
|
435
305
|
if (destination === 'Download') {
|
|
436
|
-
if (
|
|
437
|
-
this.
|
|
438
|
-
return;
|
|
306
|
+
if (reportResult.type === 'excel') {
|
|
307
|
+
Helper_1.default.createDownloadedFile(reportResult.data, this.getReportFileName(report.Name, format, destination), 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
|
|
439
308
|
}
|
|
440
309
|
if (reportResult.type === 'csv') {
|
|
441
310
|
Helper_1.default.createDownloadedFile(reportResult.data, this.getReportFileName(report.Name, format, destination), 'text/csv;encoding:utf-8');
|
|
@@ -494,5 +363,105 @@ class ExportInternalApi extends ApiBase_1.ApiBase {
|
|
|
494
363
|
exportDestination,
|
|
495
364
|
};
|
|
496
365
|
}
|
|
366
|
+
createCellCsv(cellContent) {
|
|
367
|
+
return {
|
|
368
|
+
data: {
|
|
369
|
+
value: cellContent != undefined ? String(cellContent) : null,
|
|
370
|
+
},
|
|
371
|
+
};
|
|
372
|
+
}
|
|
373
|
+
createCellExcel(cellContent, cellType) {
|
|
374
|
+
return {
|
|
375
|
+
data: {
|
|
376
|
+
value: cellContent != undefined ? String(cellContent) : null,
|
|
377
|
+
type: cellType,
|
|
378
|
+
},
|
|
379
|
+
};
|
|
380
|
+
}
|
|
381
|
+
createCellHeader(cellContent) {
|
|
382
|
+
return {
|
|
383
|
+
data: {
|
|
384
|
+
value: cellContent != undefined ? String(cellContent) : null,
|
|
385
|
+
type: 'String',
|
|
386
|
+
},
|
|
387
|
+
};
|
|
388
|
+
}
|
|
389
|
+
getExternalReportData(externalReportName, reportFormat, exportDestination) {
|
|
390
|
+
const externalReport = this.getExportApi()
|
|
391
|
+
.getExternalReports()
|
|
392
|
+
?.find((cr) => cr.name == externalReportName);
|
|
393
|
+
if (!externalReport) {
|
|
394
|
+
this.logWarn(`External Report '${externalReportName}' not found!`);
|
|
395
|
+
return undefined;
|
|
396
|
+
}
|
|
397
|
+
return externalReport.onExport({
|
|
398
|
+
...this.buildBaseExportContext(externalReportName, reportFormat, exportDestination),
|
|
399
|
+
convertToExcel: this.buildExcelConverter(externalReportName, reportFormat, exportDestination),
|
|
400
|
+
convertToCsv: this.buildCsvConverter(externalReportName, reportFormat, exportDestination),
|
|
401
|
+
getGridReportColumns: this.buildGridReportColumns(),
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
buildGridReportColumns() {
|
|
405
|
+
return () => this.getAdaptableApi().columnApi.getColumns();
|
|
406
|
+
}
|
|
407
|
+
buildExcelConverter(externalReportName, reportFormat, exportDestination) {
|
|
408
|
+
return (reportData) => {
|
|
409
|
+
return this.executeGridExport(reportData, externalReportName, reportFormat, exportDestination, (gridApi, exportParams) => gridApi.getDataAsExcel({ ...exportParams }));
|
|
410
|
+
};
|
|
411
|
+
}
|
|
412
|
+
buildCsvConverter(externalReportName, reportFormat, exportDestination) {
|
|
413
|
+
return (reportData) => {
|
|
414
|
+
const csvParams = this.buildCsvExportParams(externalReportName, reportFormat, exportDestination);
|
|
415
|
+
return this.executeGridExport(reportData, externalReportName, reportFormat, exportDestination, (gridApi, exportParams) => gridApi.getDataAsCsv({ ...exportParams, ...csvParams }));
|
|
416
|
+
};
|
|
417
|
+
}
|
|
418
|
+
executeGridExport(reportData, externalReportName, reportFormat, exportDestination, exportFn) {
|
|
419
|
+
const htmlDivElement = document.createElement('div');
|
|
420
|
+
let ephemeralGridApi = null;
|
|
421
|
+
try {
|
|
422
|
+
const columnDefs = reportData.columns.map((col) => ({
|
|
423
|
+
colId: col.columnId,
|
|
424
|
+
field: col.field ?? col.columnId,
|
|
425
|
+
headerName: col.friendlyName ?? col.columnId,
|
|
426
|
+
type: col.dataType ?? 'text',
|
|
427
|
+
}));
|
|
428
|
+
const gridOptions = { columnDefs, rowData: reportData.rows };
|
|
429
|
+
const gridParams = {
|
|
430
|
+
modules: this.getAdaptableApi()
|
|
431
|
+
.internalApi.getAdaptableInstance()
|
|
432
|
+
.getAgGridRegisteredModules(),
|
|
433
|
+
};
|
|
434
|
+
htmlDivElement.style.display = 'none';
|
|
435
|
+
document.body.appendChild(htmlDivElement);
|
|
436
|
+
ephemeralGridApi = (0, ag_grid_enterprise_1.createGrid)(htmlDivElement, gridOptions, gridParams);
|
|
437
|
+
const exportParams = {
|
|
438
|
+
fileName: this.getReportFileName(externalReportName, reportFormat, exportDestination),
|
|
439
|
+
allColumns: true,
|
|
440
|
+
exportedRows: 'all',
|
|
441
|
+
};
|
|
442
|
+
return exportFn(ephemeralGridApi, exportParams);
|
|
443
|
+
}
|
|
444
|
+
catch (error) {
|
|
445
|
+
this.logWarn('Failed to export data:', error);
|
|
446
|
+
return null;
|
|
447
|
+
}
|
|
448
|
+
finally {
|
|
449
|
+
if (ephemeralGridApi) {
|
|
450
|
+
ephemeralGridApi.destroy();
|
|
451
|
+
}
|
|
452
|
+
if (htmlDivElement?.parentNode) {
|
|
453
|
+
document.body.removeChild(htmlDivElement);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
buildCsvExportParams(externalReportName, reportFormat, exportDestination) {
|
|
458
|
+
const exportOptions = this.getAdaptableApi().optionsApi.getExportOptions();
|
|
459
|
+
const csvSeparator = typeof exportOptions.csvSeparator === 'function'
|
|
460
|
+
? exportOptions.csvSeparator(this.buildBaseExportContext(externalReportName, reportFormat, exportDestination))
|
|
461
|
+
: exportOptions.csvSeparator;
|
|
462
|
+
return {
|
|
463
|
+
columnSeparator: csvSeparator,
|
|
464
|
+
};
|
|
465
|
+
}
|
|
497
466
|
}
|
|
498
467
|
exports.ExportInternalApi = ExportInternalApi;
|
|
@@ -190,7 +190,7 @@ class RowFormInternalApi extends ApiBase_1.ApiBase {
|
|
|
190
190
|
}
|
|
191
191
|
const returnValues = this.getGridApi().internalApi.getDistinctDisplayValuesForColumnOld(column.columnId);
|
|
192
192
|
// FIXME add support for asynchronous custom select cell editor values
|
|
193
|
-
// it involves refactoring the AdaptableForm &
|
|
193
|
+
// it involves refactoring the AdaptableForm & adaptableFormComponent
|
|
194
194
|
// await this.getSelectCellEditorValuesForColumn(
|
|
195
195
|
// column,
|
|
196
196
|
// gridCell
|
package/src/Api/LayoutApi.d.ts
CHANGED
|
@@ -176,7 +176,7 @@ export interface LayoutApi {
|
|
|
176
176
|
*/
|
|
177
177
|
addColumnToTableLayout(columnId: string, layoutName: string): void;
|
|
178
178
|
/**
|
|
179
|
-
* Adds a Column to Current Layout
|
|
179
|
+
* Adds a Column to Current (Table) Layout
|
|
180
180
|
* @param columnId Column to add
|
|
181
181
|
*/
|
|
182
182
|
addColumnToCurrentTableLayout(columnId: string): void;
|
package/src/Api/ThemeApi.d.ts
CHANGED
|
@@ -81,6 +81,8 @@ export interface ThemeApi {
|
|
|
81
81
|
openThemeSettingsPanel(): void;
|
|
82
82
|
/**
|
|
83
83
|
* Get the name of the current AG Grid theme
|
|
84
|
+
*
|
|
85
|
+
* @deprecated required only for legacy AG Grid themes, see https://www.ag-grid.com/javascript-data-grid/theming-v32/
|
|
84
86
|
*/
|
|
85
87
|
getAgGridCurrentThemeName(): string;
|
|
86
88
|
}
|
|
@@ -150,4 +150,4 @@ export type SystemAlertPredicateIds = SystemAlertPredicateId[];
|
|
|
150
150
|
/**
|
|
151
151
|
* List of System Predicates available for Alerts
|
|
152
152
|
*/
|
|
153
|
-
export type SystemAlertPredicateId = 'Blanks' | 'NonBlanks' | 'Equals' | 'NotEquals' | 'GreaterThan' | 'LessThan' | 'Positive' | 'Negative' | 'Zero' | 'Between' | 'NotBetween' | 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex' | 'Today' | 'Yesterday' | 'Tomorrow' | 'ThisWeek' | 'ThisMonth' | 'ThisQuarter' | 'ThisYear' | 'InPast' | 'InFuture' | 'Before' | 'After' | 'On' | 'NotOn' | 'NextWorkDay' | 'LastWorkDay' | 'WorkDay' | 'Holiday' | 'True' | 'False' | 'PercentChange' | '
|
|
153
|
+
export type SystemAlertPredicateId = 'Blanks' | 'NonBlanks' | 'Equals' | 'NotEquals' | 'GreaterThan' | 'LessThan' | 'Positive' | 'Negative' | 'Zero' | 'Between' | 'NotBetween' | 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex' | 'Today' | 'Yesterday' | 'Tomorrow' | 'ThisWeek' | 'ThisMonth' | 'ThisQuarter' | 'ThisYear' | 'InPast' | 'InFuture' | 'Before' | 'After' | 'On' | 'NotOn' | 'NextWorkDay' | 'LastWorkDay' | 'WorkDay' | 'Holiday' | 'True' | 'False' | 'PercentChange' | 'In' | 'NotIn' | 'AnyChange';
|
|
@@ -104,7 +104,7 @@ export interface PredicateDefHandlerContext extends BaseContext {
|
|
|
104
104
|
* Any (optional) inputs required to perform evaluation
|
|
105
105
|
*/
|
|
106
106
|
inputs?: any[];
|
|
107
|
-
|
|
107
|
+
predicatesOperator?: ColumnFilter['PredicatesOperator'];
|
|
108
108
|
}
|
|
109
109
|
/**
|
|
110
110
|
* Inputs required for a Predicate
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SystemBadgeStylePredicateIds = exports.SystemFlashingCellPredicateIds = exports.SystemFormatColumnPredicateIds = exports.SystemAlertPredicateIds = exports.SystemFilterPredicateIds = exports.SystemPredicateDefs = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
5
|
+
const date_fns_1 = require("date-fns");
|
|
6
|
+
const date_fns_2 = require("date-fns");
|
|
7
|
+
const date_fns_3 = require("date-fns");
|
|
8
|
+
const date_fns_4 = require("date-fns");
|
|
9
|
+
const date_fns_5 = require("date-fns");
|
|
10
|
+
const date_fns_6 = require("date-fns");
|
|
11
|
+
const date_fns_7 = require("date-fns");
|
|
12
|
+
const date_fns_8 = require("date-fns");
|
|
13
|
+
const date_fns_9 = require("date-fns");
|
|
14
|
+
const date_fns_10 = require("date-fns");
|
|
15
|
+
const date_fns_11 = require("date-fns");
|
|
16
|
+
const date_fns_12 = require("date-fns");
|
|
17
|
+
const date_fns_13 = require("date-fns");
|
|
18
18
|
const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
|
|
19
19
|
const DateHelper_1 = require("../../Utilities/Helpers/DateHelper");
|
|
20
20
|
const Helper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/Helper"));
|
|
@@ -56,10 +56,10 @@ exports.SystemPredicateDefs = [
|
|
|
56
56
|
if (column.dataType === 'date') {
|
|
57
57
|
return inputs.some((input) => {
|
|
58
58
|
if (adaptableApi.optionsApi.getPredicateOptions().evaluateValuesPredicateUsingTime) {
|
|
59
|
-
return (0,
|
|
59
|
+
return (0, date_fns_3.isEqual)(input, value);
|
|
60
60
|
}
|
|
61
61
|
else {
|
|
62
|
-
return (0,
|
|
62
|
+
return (0, date_fns_6.isSameDay)((0, DateHelper_1.parseDateValue)(input), (0, DateHelper_1.parseDateValue)(value));
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
65
|
}
|
|
@@ -116,12 +116,12 @@ exports.SystemPredicateDefs = [
|
|
|
116
116
|
if (column.dataType === 'date') {
|
|
117
117
|
if (adaptableApi.optionsApi.getPredicateOptions().evaluateValuesPredicateUsingTime) {
|
|
118
118
|
return inputs.every((input) => {
|
|
119
|
-
return !(0,
|
|
119
|
+
return !(0, date_fns_3.isEqual)(input, value);
|
|
120
120
|
});
|
|
121
121
|
}
|
|
122
122
|
else {
|
|
123
123
|
return inputs.every((input) => {
|
|
124
|
-
return !(0,
|
|
124
|
+
return !(0, date_fns_6.isSameDay)((0, DateHelper_1.parseDateValue)(input), (0, DateHelper_1.parseDateValue)(value));
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
127
|
}
|
|
@@ -270,22 +270,6 @@ exports.SystemPredicateDefs = [
|
|
|
270
270
|
toString: ({ inputs }) => `Not Between ${inputs[0] ?? ''}:${inputs[1]}`,
|
|
271
271
|
shortcuts: ['!:'],
|
|
272
272
|
},
|
|
273
|
-
{
|
|
274
|
-
id: 'IsNumeric',
|
|
275
|
-
label: 'Is Numeric',
|
|
276
|
-
icon: { text: '1' },
|
|
277
|
-
columnScope: { DataTypes: ['number'] },
|
|
278
|
-
moduleScope: ['alert', 'flashingcell'],
|
|
279
|
-
handler: ({ value }) => !isNaN(Number(value)),
|
|
280
|
-
},
|
|
281
|
-
{
|
|
282
|
-
id: 'IsNotNumeric',
|
|
283
|
-
label: 'Is Not Numeric',
|
|
284
|
-
icon: { text: '1' },
|
|
285
|
-
columnScope: { DataTypes: ['number'] },
|
|
286
|
-
moduleScope: ['alert', 'flashingcell'],
|
|
287
|
-
handler: ({ value }) => isNaN(Number(value)),
|
|
288
|
-
},
|
|
289
273
|
// String System Filters
|
|
290
274
|
{
|
|
291
275
|
id: 'Is',
|
|
@@ -414,7 +398,7 @@ exports.SystemPredicateDefs = [
|
|
|
414
398
|
icon: { name: 'calendar' },
|
|
415
399
|
columnScope: { DataTypes: ['date'] },
|
|
416
400
|
moduleScope: ['columnFilter', 'alert', 'flashingcell', 'formatColumn'],
|
|
417
|
-
handler: ({ value }) => (0,
|
|
401
|
+
handler: ({ value }) => (0, date_fns_11.isToday)((0, DateHelper_1.parseDateValue)(value)),
|
|
418
402
|
},
|
|
419
403
|
{
|
|
420
404
|
id: 'Yesterday',
|
|
@@ -422,7 +406,7 @@ exports.SystemPredicateDefs = [
|
|
|
422
406
|
icon: { name: 'calendar' },
|
|
423
407
|
columnScope: { DataTypes: ['date'] },
|
|
424
408
|
moduleScope: ['columnFilter', 'alert', 'flashingcell', 'formatColumn'],
|
|
425
|
-
handler: ({ value }) => (0,
|
|
409
|
+
handler: ({ value }) => (0, date_fns_13.isYesterday)((0, DateHelper_1.parseDateValue)(value)),
|
|
426
410
|
},
|
|
427
411
|
{
|
|
428
412
|
id: 'Tomorrow',
|
|
@@ -430,7 +414,7 @@ exports.SystemPredicateDefs = [
|
|
|
430
414
|
icon: { name: 'calendar' },
|
|
431
415
|
columnScope: { DataTypes: ['date'] },
|
|
432
416
|
moduleScope: ['columnFilter', 'alert', 'flashingcell', 'formatColumn'],
|
|
433
|
-
handler: ({ value }) => (0,
|
|
417
|
+
handler: ({ value }) => (0, date_fns_12.isTomorrow)((0, DateHelper_1.parseDateValue)(value)),
|
|
434
418
|
},
|
|
435
419
|
{
|
|
436
420
|
id: 'ThisWeek',
|
|
@@ -438,7 +422,7 @@ exports.SystemPredicateDefs = [
|
|
|
438
422
|
icon: { name: 'calendar' },
|
|
439
423
|
columnScope: { DataTypes: ['date'] },
|
|
440
424
|
moduleScope: ['columnFilter', 'alert', 'flashingcell', 'formatColumn'],
|
|
441
|
-
handler: ({ value }) => (0,
|
|
425
|
+
handler: ({ value }) => (0, date_fns_9.isThisWeek)((0, DateHelper_1.parseDateValue)(value)),
|
|
442
426
|
},
|
|
443
427
|
{
|
|
444
428
|
id: 'ThisMonth',
|
|
@@ -446,7 +430,7 @@ exports.SystemPredicateDefs = [
|
|
|
446
430
|
icon: { name: 'calendar' },
|
|
447
431
|
columnScope: { DataTypes: ['date'] },
|
|
448
432
|
moduleScope: ['columnFilter', 'alert', 'flashingcell', 'formatColumn'],
|
|
449
|
-
handler: ({ value }) => (0,
|
|
433
|
+
handler: ({ value }) => (0, date_fns_7.isThisMonth)((0, DateHelper_1.parseDateValue)(value)),
|
|
450
434
|
},
|
|
451
435
|
{
|
|
452
436
|
id: 'ThisQuarter',
|
|
@@ -454,7 +438,7 @@ exports.SystemPredicateDefs = [
|
|
|
454
438
|
icon: { name: 'calendar' },
|
|
455
439
|
columnScope: { DataTypes: ['date'] },
|
|
456
440
|
moduleScope: ['columnFilter', 'alert', 'flashingcell', 'formatColumn'],
|
|
457
|
-
handler: ({ value }) => (0,
|
|
441
|
+
handler: ({ value }) => (0, date_fns_8.isThisQuarter)((0, DateHelper_1.parseDateValue)(value)),
|
|
458
442
|
},
|
|
459
443
|
{
|
|
460
444
|
id: 'ThisYear',
|
|
@@ -462,7 +446,7 @@ exports.SystemPredicateDefs = [
|
|
|
462
446
|
icon: { name: 'calendar' },
|
|
463
447
|
columnScope: { DataTypes: ['date'] },
|
|
464
448
|
moduleScope: ['columnFilter', 'alert', 'flashingcell', 'formatColumn'],
|
|
465
|
-
handler: ({ value }) => (0,
|
|
449
|
+
handler: ({ value }) => (0, date_fns_10.isThisYear)((0, DateHelper_1.parseDateValue)(value)),
|
|
466
450
|
},
|
|
467
451
|
{
|
|
468
452
|
id: 'InPast',
|
|
@@ -470,7 +454,7 @@ exports.SystemPredicateDefs = [
|
|
|
470
454
|
icon: { name: 'calendar' },
|
|
471
455
|
columnScope: { DataTypes: ['date'] },
|
|
472
456
|
moduleScope: ['columnFilter', 'alert', 'flashingcell', 'formatColumn'],
|
|
473
|
-
handler: ({ value }) => (0,
|
|
457
|
+
handler: ({ value }) => (0, date_fns_5.isPast)((0, DateHelper_1.parseDateValue)(value)),
|
|
474
458
|
},
|
|
475
459
|
{
|
|
476
460
|
id: 'InFuture',
|
|
@@ -478,7 +462,7 @@ exports.SystemPredicateDefs = [
|
|
|
478
462
|
icon: { name: 'calendar' },
|
|
479
463
|
columnScope: { DataTypes: ['date'] },
|
|
480
464
|
moduleScope: ['columnFilter', 'alert', 'flashingcell', 'formatColumn'],
|
|
481
|
-
handler: ({ value }) => (0,
|
|
465
|
+
handler: ({ value }) => (0, date_fns_4.isFuture)((0, DateHelper_1.parseDateValue)(value)),
|
|
482
466
|
},
|
|
483
467
|
{
|
|
484
468
|
id: 'After',
|
|
@@ -487,7 +471,7 @@ exports.SystemPredicateDefs = [
|
|
|
487
471
|
columnScope: { DataTypes: ['date'] },
|
|
488
472
|
moduleScope: ['columnFilter', 'alert', 'flashingcell', 'formatColumn'],
|
|
489
473
|
inputs: [{ type: 'date' }],
|
|
490
|
-
handler: ({ value, inputs }) => (0,
|
|
474
|
+
handler: ({ value, inputs }) => (0, date_fns_1.isAfter)((0, DateHelper_1.parseDateValue)(value), (0, DateHelper_1.parseDateValue)(inputs[0])),
|
|
491
475
|
toString: ({ inputs }) => `> ${inputs[0] ?? ''}`,
|
|
492
476
|
},
|
|
493
477
|
{
|
|
@@ -497,7 +481,7 @@ exports.SystemPredicateDefs = [
|
|
|
497
481
|
columnScope: { DataTypes: ['date'] },
|
|
498
482
|
moduleScope: ['columnFilter', 'alert', 'flashingcell', 'formatColumn'],
|
|
499
483
|
inputs: [{ type: 'date' }],
|
|
500
|
-
handler: ({ value, inputs }) => (0,
|
|
484
|
+
handler: ({ value, inputs }) => (0, date_fns_2.isBefore)((0, DateHelper_1.parseDateValue)(value), (0, DateHelper_1.parseDateValue)(inputs[0])),
|
|
501
485
|
toString: ({ inputs }) => `< ${inputs[0] ?? ''}`,
|
|
502
486
|
},
|
|
503
487
|
{
|
|
@@ -507,7 +491,7 @@ exports.SystemPredicateDefs = [
|
|
|
507
491
|
columnScope: { DataTypes: ['date'] },
|
|
508
492
|
moduleScope: ['columnFilter', 'alert', 'flashingcell', 'formatColumn'],
|
|
509
493
|
inputs: [{ type: 'date' }],
|
|
510
|
-
handler: ({ value, inputs }) => (0,
|
|
494
|
+
handler: ({ value, inputs }) => (0, date_fns_6.isSameDay)((0, DateHelper_1.parseDateValue)(value), (0, DateHelper_1.parseDateValue)(inputs[0])),
|
|
511
495
|
toString: ({ inputs }) => `= ${inputs[0] ?? ''}`,
|
|
512
496
|
},
|
|
513
497
|
{
|
|
@@ -517,7 +501,7 @@ exports.SystemPredicateDefs = [
|
|
|
517
501
|
columnScope: { DataTypes: ['date'] },
|
|
518
502
|
moduleScope: ['columnFilter', 'alert', 'flashingcell', 'formatColumn'],
|
|
519
503
|
inputs: [{ type: 'date' }],
|
|
520
|
-
handler: ({ value, inputs }) => !(0,
|
|
504
|
+
handler: ({ value, inputs }) => !(0, date_fns_6.isSameDay)((0, DateHelper_1.parseDateValue)(value), (0, DateHelper_1.parseDateValue)(inputs[0])),
|
|
521
505
|
toString: ({ inputs }) => `!= ${inputs[0] ?? ''}`,
|
|
522
506
|
},
|
|
523
507
|
{
|
|
@@ -526,7 +510,7 @@ exports.SystemPredicateDefs = [
|
|
|
526
510
|
icon: { name: 'calendar' },
|
|
527
511
|
columnScope: { DataTypes: ['date'] },
|
|
528
512
|
moduleScope: ['columnFilter', 'alert', 'flashingcell', 'formatColumn'],
|
|
529
|
-
handler: ({ value, adaptableApi }) => (0,
|
|
513
|
+
handler: ({ value, adaptableApi }) => (0, date_fns_6.isSameDay)((0, DateHelper_1.parseDateValue)(value), adaptableApi.calendarApi.getNextWorkingDay()),
|
|
530
514
|
},
|
|
531
515
|
{
|
|
532
516
|
id: 'LastWorkDay',
|
|
@@ -534,7 +518,7 @@ exports.SystemPredicateDefs = [
|
|
|
534
518
|
icon: { name: 'calendar' },
|
|
535
519
|
columnScope: { DataTypes: ['date'] },
|
|
536
520
|
moduleScope: ['columnFilter', 'alert', 'flashingcell', 'formatColumn'],
|
|
537
|
-
handler: ({ value, adaptableApi }) => (0,
|
|
521
|
+
handler: ({ value, adaptableApi }) => (0, date_fns_6.isSameDay)((0, DateHelper_1.parseDateValue)(value), adaptableApi.calendarApi.getPreviousWorkingDay()),
|
|
538
522
|
},
|
|
539
523
|
{
|
|
540
524
|
id: 'WorkDay',
|
|
@@ -13,10 +13,10 @@ export interface ColumnFilter extends SuspendableObject {
|
|
|
13
13
|
*/
|
|
14
14
|
Predicates: ColumnFilterPredicate[];
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Logic used when combining multiple Predicates ('AND'|'OR')
|
|
17
17
|
* @defaultValue 'AND'
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
PredicatesOperator?: PredicatesOperator;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* A Predicate used in Column Filtering
|
|
@@ -24,6 +24,10 @@ export interface ColumnFilter extends SuspendableObject {
|
|
|
24
24
|
export interface ColumnFilterPredicate extends AdaptablePredicate {
|
|
25
25
|
PredicateId: TypeHint<string, SystemFilterPredicateId>;
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Logic used to join multiple Predicates
|
|
29
|
+
*/
|
|
30
|
+
export type PredicatesOperator = 'AND' | 'OR';
|
|
27
31
|
/**
|
|
28
32
|
* Array containing all System Filter Predicates
|
|
29
33
|
*/
|
|
@@ -3,9 +3,9 @@ import { BaseSchedule } from './Common/Schedule';
|
|
|
3
3
|
import { ColumnScope } from './Common/ColumnScope';
|
|
4
4
|
import { AdaptableColumnBase } from './Common/AdaptableColumn';
|
|
5
5
|
import { AdaptableObject } from './Common/AdaptableObject';
|
|
6
|
-
import { AdaptableFormData } from './Common/AdaptableForm';
|
|
7
6
|
import { AdaptableBooleanQuery } from './Common/AdaptableQuery';
|
|
8
7
|
import { TypeHint } from './Common/Types';
|
|
8
|
+
import { ExportDestinationType } from '../AdaptableOptions/ExportOptions';
|
|
9
9
|
/**
|
|
10
10
|
* Predefined Configuration for Export Module
|
|
11
11
|
*/
|
|
@@ -61,9 +61,15 @@ export interface ReportSchedule extends BaseSchedule {
|
|
|
61
61
|
*/
|
|
62
62
|
ReportFormat: ReportFormatType;
|
|
63
63
|
/**
|
|
64
|
-
*
|
|
64
|
+
* Destination of Report to run on Schedule
|
|
65
65
|
*/
|
|
66
|
-
|
|
66
|
+
ExportDestination?: ExportDestinationType;
|
|
67
|
+
}
|
|
68
|
+
export interface ReportColumn extends AdaptableColumnBase {
|
|
69
|
+
/**
|
|
70
|
+
* Field in the row to get cell data from; defaults to `columnId`
|
|
71
|
+
*/
|
|
72
|
+
field?: string;
|
|
67
73
|
}
|
|
68
74
|
/**
|
|
69
75
|
* Defines the data in a Report run by AdapTable
|
|
@@ -76,7 +82,7 @@ export interface ReportData {
|
|
|
76
82
|
/**
|
|
77
83
|
* Columns in the Report
|
|
78
84
|
*/
|
|
79
|
-
columns:
|
|
85
|
+
columns: ReportColumn[];
|
|
80
86
|
/**
|
|
81
87
|
* Group columns IDs in the Report
|
|
82
88
|
*/
|
|
@@ -86,19 +92,6 @@ export interface ReportData {
|
|
|
86
92
|
*/
|
|
87
93
|
pivotColumnIds?: string[];
|
|
88
94
|
}
|
|
89
|
-
/**
|
|
90
|
-
* Row Data in the Report
|
|
91
|
-
*/
|
|
92
|
-
export interface ReportRow {
|
|
93
|
-
/**
|
|
94
|
-
* Data for the row
|
|
95
|
-
*/
|
|
96
|
-
data: Record<string, any>;
|
|
97
|
-
/**
|
|
98
|
-
* Optional children rows for grouped data
|
|
99
|
-
*/
|
|
100
|
-
children?: ReportRow[];
|
|
101
|
-
}
|
|
102
95
|
/**
|
|
103
96
|
* System report names provided by AdapTable
|
|
104
97
|
*/
|