@adaptabletools/adaptable-cjs 20.0.0-canary.0 → 20.0.0-canary.10

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.
Files changed (93) hide show
  1. package/base.css +317 -866
  2. package/base.css.map +1 -1
  3. package/index.css +317 -866
  4. package/index.css.map +1 -1
  5. package/package.json +3 -3
  6. package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -1
  7. package/src/AdaptableOptions/ActionColumnOptions.d.ts +2 -2
  8. package/src/AdaptableOptions/CellSummaryOptions.d.ts +1 -1
  9. package/src/AdaptableOptions/ContainerOptions.d.ts +0 -7
  10. package/src/AdaptableOptions/DefaultAdaptableOptions.js +2 -2
  11. package/src/AdaptableOptions/EditOptions.d.ts +14 -3
  12. package/src/AdaptableOptions/ExportOptions.d.ts +11 -20
  13. package/src/AdaptableOptions/FilterOptions.d.ts +2 -2
  14. package/src/AdaptableOptions/PredicateOptions.d.ts +4 -4
  15. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +7 -0
  16. package/src/Api/ColumnScopeApi.d.ts +2 -2
  17. package/src/Api/ExportApi.d.ts +1 -6
  18. package/src/Api/Fdc3Api.d.ts +5 -3
  19. package/src/Api/Implementation/AdaptableApiImpl.js +1 -0
  20. package/src/Api/Implementation/ColumnScopeApiImpl.d.ts +1 -1
  21. package/src/Api/Implementation/ColumnScopeApiImpl.js +1 -1
  22. package/src/Api/Implementation/ExportApiImpl.d.ts +1 -2
  23. package/src/Api/Implementation/ExportApiImpl.js +17 -10
  24. package/src/Api/Implementation/Fdc3ApiImpl.d.ts +3 -3
  25. package/src/Api/Implementation/Fdc3ApiImpl.js +4 -4
  26. package/src/Api/Implementation/LayoutHelpers.js +8 -27
  27. package/src/Api/Implementation/ScheduleApiImpl.js +1 -1
  28. package/src/Api/Implementation/StyledColumnApiImpl.js +1 -1
  29. package/src/Api/Implementation/ThemeApiImpl.js +3 -1
  30. package/src/Api/Internal/ActionColumnInternalApi.js +16 -19
  31. package/src/Api/Internal/AdaptableInternalApi.js +1 -1
  32. package/src/Api/Internal/EventInternalApi.js +6 -1
  33. package/src/Api/Internal/ExportInternalApi.d.ts +10 -6
  34. package/src/Api/Internal/ExportInternalApi.js +105 -136
  35. package/src/Api/Internal/RowFormInternalApi.js +1 -1
  36. package/src/Api/ThemeApi.d.ts +2 -0
  37. package/src/PredefinedConfig/AlertState.d.ts +1 -1
  38. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +5 -5
  39. package/src/PredefinedConfig/Common/AdaptableColumnContext.d.ts +1 -1
  40. package/src/PredefinedConfig/Common/AdaptablePredicate.js +0 -16
  41. package/src/PredefinedConfig/Common/RowSummary.d.ts +1 -1
  42. package/src/PredefinedConfig/Common/RowSummary.js +3 -3
  43. package/src/PredefinedConfig/ExportState.d.ts +10 -17
  44. package/src/PredefinedConfig/FlashingCellState.d.ts +1 -1
  45. package/src/PredefinedConfig/LayoutState.d.ts +20 -16
  46. package/src/PredefinedConfig/StyledColumnState.d.ts +1 -1
  47. package/src/Redux/Store/AdaptableStore.js +1 -1
  48. package/src/Strategy/StyledColumnModule.js +6 -6
  49. package/src/Utilities/Helpers/AdaptableHelper.d.ts +2 -0
  50. package/src/Utilities/Helpers/AdaptableHelper.js +12 -1
  51. package/src/Utilities/ObjectFactory.js +1 -0
  52. package/src/Utilities/Services/Fdc3Service.d.ts +2 -2
  53. package/src/Utilities/Services/Fdc3Service.js +7 -2
  54. package/src/Utilities/Services/RowSummaryService.js +1 -1
  55. package/src/Utilities/Services/ThemeService.d.ts +1 -1
  56. package/src/Utilities/Services/ThemeService.js +5 -5
  57. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +41 -0
  58. package/src/View/Components/ColumnFilter/utils.js +2 -2
  59. package/src/View/Components/FilterForm/ListBoxFilterForm.js +1 -1
  60. package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +4 -1
  61. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +7 -2
  62. package/src/View/Layout/Wizard/LayoutWizard.js +1 -1
  63. package/src/View/Layout/Wizard/sections/RowSummarySection.js +1 -1
  64. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.d.ts +2 -0
  65. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +18 -2
  66. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsSummary.js +4 -0
  67. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +2 -1
  68. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.d.ts +3 -4
  69. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +348 -191
  70. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +2 -2
  71. package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +1 -1
  72. package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +4 -4
  73. package/src/agGrid/AdaptableAgGrid.d.ts +3 -8
  74. package/src/agGrid/AdaptableAgGrid.js +40 -117
  75. package/src/agGrid/AgGridAdapter.d.ts +1 -1
  76. package/src/agGrid/AgGridAdapter.js +5 -6
  77. package/src/agGrid/AgGridColumnAdapter.js +6 -11
  78. package/src/agGrid/AgGridExportAdapter.d.ts +24 -1
  79. package/src/agGrid/AgGridExportAdapter.js +24 -25
  80. package/src/agGrid/AgGridThemeAdapter.d.ts +19 -0
  81. package/src/agGrid/AgGridThemeAdapter.js +126 -0
  82. package/src/agGrid/cellRenderers/BadgeRenderer.js +2 -1
  83. package/src/components/ColorPicker/ColorPicker.js +2 -2
  84. package/src/components/OverlayTrigger/useAgGridClassName.js +1 -1
  85. package/src/components/Select/Select.d.ts +1 -0
  86. package/src/components/Select/Select.js +29 -6
  87. package/src/env.js +2 -2
  88. package/src/metamodel/adaptable.metamodel.d.ts +26 -20
  89. package/src/metamodel/adaptable.metamodel.js +1 -1
  90. package/src/migration/VersionUpgrade20.d.ts +1 -0
  91. package/src/migration/VersionUpgrade20.js +103 -3
  92. package/src/types.d.ts +3 -3
  93. 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.string;
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 (format === 'Excel' || format === 'VisualExcel') {
437
- this.logWarn(`Download of Excel files should already be handed by internal APIs, something went wrong`);
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 & AdapatableFormComponent
193
+ // it involves refactoring the AdaptableForm & adaptableFormComponent
194
194
  // await this.getSelectCellEditorValuesForColumn(
195
195
  // column,
196
196
  // gridCell
@@ -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' | 'IsNumeric' | 'IsNotNumeric' | 'In' | 'NotIn' | 'AnyChange';
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';
@@ -4,11 +4,11 @@ export type AdaptableColumnDataType = BaseCellDataType | 'textArray' | 'numberAr
4
4
  /**
5
5
  * Column Types recognised by AdapTable; to be set in GridOptions
6
6
  */
7
- export type AdaptableColumnType = 'calculatedColumn' | 'freeTextColumn' | 'actionColumn' | 'fdc3Column';
8
- export declare const CALCULATED_COLUMN_TYPE: AdaptableColumnType;
9
- export declare const FREE_TEXT_COLUMN_TYPE: AdaptableColumnType;
10
- export declare const ACTION_COLUMN_TYPE: AdaptableColumnType;
11
- export declare const FDC3_COLUMN_TYPE: AdaptableColumnType;
7
+ export type AdaptableSpecialColumnType = 'calculatedColumn' | 'freeTextColumn' | 'actionColumn' | 'fdc3Column';
8
+ export declare const CALCULATED_COLUMN_TYPE: AdaptableSpecialColumnType;
9
+ export declare const FREE_TEXT_COLUMN_TYPE: AdaptableSpecialColumnType;
10
+ export declare const ACTION_COLUMN_TYPE: AdaptableSpecialColumnType;
11
+ export declare const FDC3_COLUMN_TYPE: AdaptableSpecialColumnType;
12
12
  /**
13
13
  * Base class for AdapTable Column containing most important properties
14
14
  */
@@ -5,7 +5,7 @@ import { BaseContext } from './BaseContext';
5
5
  */
6
6
  export interface AdaptableColumnContext<TData = any> extends BaseContext {
7
7
  /**
8
- * Column being filtered
8
+ * The current Column
9
9
  */
10
10
  column: AdaptableColumn<TData>;
11
11
  }
@@ -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',
@@ -1,7 +1,7 @@
1
1
  import { SuspendableObject } from './SuspendableObject';
2
2
  import { TypeHint } from './Types';
3
3
  export declare const ROW_SUMMARY_ROW_ID = "__ROW_SUMMARY_ROW_ID";
4
- export declare const WEIGHTED_AVERAGE_AGGREATED_FUNCTION = "WEIGHTED_AVERAGE";
4
+ export declare const WEIGHTED_AVERAGE_AGGREGATED_FUNCTION = "WEIGHTED_AVERAGE";
5
5
  export declare const summarySupportedExpressions: readonly ["MIN", "MAX", "SUM", "AVG", "COUNT", "MEDIAN", "MODE", "DISTINCT", "ONLY", "STD_DEVIATION", "WEIGHTED_AVERAGE"];
6
6
  export type SystemSummarySupportedExpression = (typeof summarySupportedExpressions)[number];
7
7
  export type SummarySupportedExpression = TypeHint<string, SystemSummarySupportedExpression>;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.summarySupportedExpressions = exports.WEIGHTED_AVERAGE_AGGREATED_FUNCTION = exports.ROW_SUMMARY_ROW_ID = void 0;
3
+ exports.summarySupportedExpressions = exports.WEIGHTED_AVERAGE_AGGREGATED_FUNCTION = exports.ROW_SUMMARY_ROW_ID = void 0;
4
4
  exports.ROW_SUMMARY_ROW_ID = '__ROW_SUMMARY_ROW_ID';
5
- exports.WEIGHTED_AVERAGE_AGGREATED_FUNCTION = 'WEIGHTED_AVERAGE';
5
+ exports.WEIGHTED_AVERAGE_AGGREGATED_FUNCTION = 'WEIGHTED_AVERAGE';
6
6
  exports.summarySupportedExpressions = [
7
7
  'MIN',
8
8
  'MAX',
@@ -14,5 +14,5 @@ exports.summarySupportedExpressions = [
14
14
  'DISTINCT',
15
15
  'ONLY',
16
16
  'STD_DEVIATION',
17
- exports.WEIGHTED_AVERAGE_AGGREATED_FUNCTION,
17
+ exports.WEIGHTED_AVERAGE_AGGREGATED_FUNCTION,
18
18
  ];
@@ -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
- * Additional data for a Custom Destination produced by a Dynamic Form
64
+ * Destination of Report to run on Schedule
65
65
  */
66
- ExportDestinationData?: AdaptableFormData;
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: AdaptableColumnBase[];
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
  */
@@ -72,4 +72,4 @@ export type SystemFlashingCellPredicateIds = SystemFlashingCellPredicateId[];
72
72
  /**
73
73
  * List of System Predicates available for Flashing Cells
74
74
  */
75
- export type SystemFlashingCellPredicateId = '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' | 'IsNumeric' | 'IsNotNumeric' | 'In' | 'NotIn' | 'AnyChange';
75
+ export type SystemFlashingCellPredicateId = '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';
@@ -51,7 +51,7 @@ export interface LayoutBase extends AdaptableObject {
51
51
  */
52
52
  ColumnHeaders?: ColumnStringMap;
53
53
  /**
54
- * Whether to include aggFunc name in the Column header: e.g. 'sum(Price)' will just be 'Price'
54
+ * Whether to include aggFunc name in Column header: e.g. 'sum(Price)' becomes 'Price'
55
55
  */
56
56
  SuppressAggFuncInHeader?: boolean;
57
57
  /**
@@ -88,7 +88,7 @@ export interface TableLayout extends LayoutBase {
88
88
  */
89
89
  RowSummaries?: RowSummary[];
90
90
  /**
91
- * Columns showing aggregated values in Group Rows; 1st value in record is Column name, 2nd is either aggfunc (e.g. sum, avg etc.) or 'true' (to use default aggfunc)
91
+ * Columns showing aggregated values in Grouped Rows; a record of ColumnId and aggfunc (e.g. sum) or 'true' (to use default aggfunc)
92
92
  */
93
93
  TableAggregationColumns?: TableAggregationColumns;
94
94
  /**
@@ -100,17 +100,21 @@ export interface TableLayout extends LayoutBase {
100
100
  */
101
101
  RowGroupDisplayType?: 'single' | 'multi';
102
102
  /**
103
- * Pivot Columns - can NOT be provided
103
+ * Pivot Columns - must NOT be provided
104
104
  */
105
105
  PivotColumns?: never;
106
106
  /**
107
- * Pivot Group Columns - can NOT be provided
107
+ * Pivot Group Columns - must NOT be provided
108
108
  */
109
109
  PivotGroupedColumns?: never;
110
110
  /**
111
- * Pivot Expansions - can NOT be provided
111
+ * Pivot Expansions - must NOT be provided
112
112
  */
113
113
  PivotExpandLevel?: never;
114
+ /**
115
+ * Pivot Aggregation Columns - must NOT be provided
116
+ */
117
+ PivotAggregationColumns?: never;
114
118
  }
115
119
  /**
116
120
  * Defines a Pivot-based Layout
@@ -133,31 +137,31 @@ export interface PivotLayout extends LayoutBase {
133
137
  */
134
138
  PivotGroupedColumns?: string[];
135
139
  /**
136
- * Table Columns - can NOT be provided
140
+ * Table Columns - must NOT be provided
137
141
  */
138
142
  TableColumns?: never;
139
143
  /**
140
- * Table Aggregation Columns - can NOT be provided
144
+ * Table Aggregation Columns - must NOT be provided
141
145
  */
142
146
  TableAggregationColumns?: never;
143
147
  /**
144
- * Row Grouped Columns Columns - can NOT be provided
148
+ * Row Grouped Columns Columns - must NOT be provided
145
149
  */
146
150
  RowGroupedColumns?: never;
147
151
  }
148
- /**
149
- * Object used for defining which Row Group Values are Expanded or Collapsed
150
- */
151
- export type RowGroupValuesWithExceptionKeys = {
152
- RowGroupDefaultBehavior: 'expanded' | 'collapsed';
153
- ExceptionGroupKeys?: any[][];
154
- };
155
152
  /**
156
153
  * Manages how (and which) Row Group values are stored
157
154
  */
158
155
  export type RowGroupValues = {
159
156
  RowGroupDefaultBehavior: 'always-expanded' | 'always-collapsed';
160
157
  } | RowGroupValuesWithExceptionKeys;
158
+ /**
159
+ * Defines which Row Group Values are expanded or collapsed
160
+ */
161
+ export type RowGroupValuesWithExceptionKeys = {
162
+ RowGroupDefaultBehavior: 'expanded' | 'collapsed';
163
+ ExceptionGroupKeys?: any[][];
164
+ };
161
165
  /**
162
166
  * Defines a map of Columns with a String value
163
167
  */
@@ -196,7 +200,7 @@ export interface LayoutOld extends AdaptableObject {
196
200
  GridFilter?: GridFilter;
197
201
  RowGroupedColumns?: string[];
198
202
  ExpandedRowGroupValues?: any[];
199
- TableAggregationColumns?: TableAggregationColumns;
203
+ AggregationColumns?: Record<string, string | true | any>;
200
204
  EnablePivot?: boolean;
201
205
  PivotColumns?: string[];
202
206
  PinnedColumnsMap?: {
@@ -32,7 +32,7 @@ export interface StyledColumn extends SuspendableObject {
32
32
  /**
33
33
  * Displays a Sparkline Chart in an array column
34
34
  */
35
- SparkLineStyle?: SparklineStyle;
35
+ SparklineStyle?: SparklineStyle;
36
36
  /**
37
37
  * Displays cell values in Column as a Badge
38
38
  */
@@ -667,7 +667,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
667
667
  }
668
668
  return ret;
669
669
  }
670
- case InternalRedux.HIGHLIGHT_CELL_DELETE_ALL: {
670
+ case InternalRedux.HIGHLIGHT_ROW_DELETE_ALL: {
671
671
  const rowHighlightInfos = middlewareAPI.getState().Internal.RowHighlightInfo;
672
672
  const ret = next(action);
673
673
  rowHighlightInfos.forEach((rowHighlightInfo) => {
@@ -39,12 +39,12 @@ class StyledColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
39
39
  // because if just one then it was created in AG Grid and we dont want to edit it
40
40
  }
41
41
  else {
42
- const hasSparklineStyle = styledColumn != null && styledColumn.SparkLineStyle != null;
42
+ const hasSparklineStyle = styledColumn != null && styledColumn.SparklineStyle != null;
43
43
  if (!hasSparklineStyle) {
44
44
  styledColumn = {
45
45
  ...ObjectFactory_1.default.CreateEmptyStyledColumn(),
46
46
  ColumnId: column.columnId,
47
- SparkLineStyle: {},
47
+ SparklineStyle: {},
48
48
  };
49
49
  }
50
50
  let label = hasSparklineStyle ? 'Edit ' : 'Create ';
@@ -52,7 +52,7 @@ class StyledColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
52
52
  ? 'styled-column-sparkline-edit'
53
53
  : 'styled-column-sparkline-add';
54
54
  let popupParam = {
55
- action: sparklineColumnExists ? 'Edit' : 'New',
55
+ action: hasSparklineStyle ? 'Edit' : 'New',
56
56
  source: 'ColumnMenu',
57
57
  value: styledColumn,
58
58
  config: {
@@ -165,7 +165,7 @@ class StyledColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
165
165
  else if (styledColumn.PercentBarStyle) {
166
166
  return 'percent';
167
167
  }
168
- else if (styledColumn.SparkLineStyle) {
168
+ else if (styledColumn.SparklineStyle) {
169
169
  return 'spark-line';
170
170
  }
171
171
  else if (styledColumn.BadgeStyle) {
@@ -252,7 +252,7 @@ class StyledColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
252
252
  else if (styledColumn.PercentBarStyle) {
253
253
  type = 'Percent Bar';
254
254
  }
255
- else if (styledColumn.SparkLineStyle) {
255
+ else if (styledColumn.SparklineStyle) {
256
256
  type = 'Spark Line';
257
257
  }
258
258
  else if (styledColumn.BadgeStyle) {
@@ -268,7 +268,7 @@ class StyledColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
268
268
  else if (styledColumn.PercentBarStyle) {
269
269
  type = 'styled-column-percent-bar-edit';
270
270
  }
271
- else if (styledColumn.SparkLineStyle) {
271
+ else if (styledColumn.SparklineStyle) {
272
272
  type = 'styled-column-sparkline-edit';
273
273
  }
274
274
  else if (styledColumn.BadgeStyle) {
@@ -4,6 +4,7 @@ import { AccessLevel } from '../../PredefinedConfig/Common/Entitlement';
4
4
  export declare function initPredefinedConfigWithUuids(predefinedConfig: PredefinedConfig): PredefinedConfig;
5
5
  export declare function getAccessLevelForObject(adaptableObject: AdaptableObject, moduleAccessLevel: AccessLevel): AccessLevel;
6
6
  export declare function addAdaptableObjectPrimitives<T extends AdaptableObject>(adaptableObject: T): T;
7
+ export declare function removeAdaptableObjectPrimitivesInline(target: any): any;
7
8
  export declare function removeAdaptableObjectPrimitives<T extends AdaptableObject>(adaptableObject: T): T;
8
9
  export declare function isAdaptableObject(object: unknown): object is AdaptableObject;
9
10
  export declare const AdaptableHelper: {
@@ -11,6 +12,7 @@ export declare const AdaptableHelper: {
11
12
  getAccessLevelForObject: typeof getAccessLevelForObject;
12
13
  addAdaptableObjectPrimitives: typeof addAdaptableObjectPrimitives;
13
14
  removeAdaptableObjectPrimitives: typeof removeAdaptableObjectPrimitives;
15
+ removeAdaptableObjectPrimitivesInline: typeof removeAdaptableObjectPrimitivesInline;
14
16
  isAdaptableObject: typeof isAdaptableObject;
15
17
  };
16
18
  export default AdaptableHelper;