@adaptabletools/adaptable 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 +2 -2
  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 +10 -0
  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 +2 -2
  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 +2 -2
  63. package/src/View/Layout/Wizard/sections/RowSummarySection.js +2 -2
  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 +41 -118
  75. package/src/agGrid/AgGridAdapter.d.ts +1 -1
  76. package/src/agGrid/AgGridAdapter.js +7 -8
  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 +122 -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.esm.tsbuildinfo +1 -1
@@ -1,15 +1,12 @@
1
- import groupBy from 'lodash/groupBy';
2
1
  import { ApiBase } from '../Implementation/ApiBase';
2
+ import { createGrid, } from 'ag-grid-enterprise';
3
3
  import { createUuid } from '../../PredefinedConfig/Uuid';
4
4
  import { ALL_DATA_REPORT, CURRENT_LAYOUT_REPORT, SELECTED_DATA_REPORT, SYSTEM_EXPORT_DESTINATIONS, SYSTEM_REPORT_NAMES, } from '../../Utilities/Constants/GeneralConstants';
5
- import { ExportModuleId } from '../../Utilities/Constants/ModuleConstants';
6
- import ArrayExtensions from '../../Utilities/Extensions/ArrayExtensions';
7
5
  import StringExtensions from '../../Utilities/Extensions/StringExtensions';
8
6
  import FormatHelper, { DateFormatter } from '../../Utilities/Helpers/FormatHelper';
9
7
  import Helper from '../../Utilities/Helpers/Helper';
10
8
  import * as PopupRedux from '../../Redux/ActionsReducers/PopupRedux';
11
9
  import { SystemExportBegin, SystemExportEnd } from '../../Redux/ActionsReducers/InternalRedux';
12
- import { errorOnce } from '../../agGrid/AdaptableLogger';
13
10
  export class ExportInternalApi extends ApiBase {
14
11
  /**
15
12
  * Value Items for Report Name Selection
@@ -113,7 +110,7 @@ export class ExportInternalApi extends ApiBase {
113
110
  // format is customized based on column data type
114
111
  switch (columnDataType) {
115
112
  case 'text':
116
- return dataFormatDataType.string;
113
+ return dataFormatDataType.text;
117
114
  case 'number':
118
115
  return dataFormatDataType.number;
119
116
  case 'date':
@@ -211,7 +208,6 @@ export class ExportInternalApi extends ApiBase {
211
208
  return `[${report.Name}]`;
212
209
  }
213
210
  else {
214
- // FIXME AFL: maybe fihnd a better description?
215
211
  switch (report.ReportRowScope) {
216
212
  case 'AllRows':
217
213
  return '[All Rows]';
@@ -224,138 +220,12 @@ export class ExportInternalApi extends ApiBase {
224
220
  }
225
221
  }
226
222
  }
227
- getReportDataColumns(report, includePrimaryKey = false) {
228
- let reportColumns = [];
229
- let gridColumns = this.getAdaptableApi().columnApi.getExportableColumns();
230
- if (this.getAdaptableApi().exportApi.isExternalReport(report)) {
231
- return reportColumns;
232
- }
233
- // first get the cols depending on the Column Scope
234
- switch (report.ReportColumnScope) {
235
- case 'AllColumns':
236
- reportColumns = gridColumns;
237
- break;
238
- case 'VisibleColumns':
239
- reportColumns = gridColumns.filter((c) => c.visible);
240
- break;
241
- case 'SelectedColumns':
242
- // we extract the selected columns from the grid columns to preserve the grid column order
243
- const selectedColumnIds = this.getAdaptableApi()
244
- .gridApi.getSelectedCellInfo()
245
- .columns.map((column) => column.columnId);
246
- reportColumns = gridColumns.filter((gridColumn) => selectedColumnIds.includes(gridColumn.columnId));
247
- break;
248
- case 'ScopeColumns':
249
- if ('ColumnIds' in report.Scope) {
250
- reportColumns = report.Scope.ColumnIds.map((columnId) => this.getAdaptableApi().columnApi.getColumnWithColumnId(columnId)).filter((c) => c);
251
- }
252
- else {
253
- reportColumns = this.getAdaptableApi().columnScopeApi.getColumnsInScope(report.Scope);
254
- }
255
- break;
256
- }
257
- if (includePrimaryKey) {
258
- const pkColumn = reportColumns.find((column) => column.columnId === this.getAdaptableApi().optionsApi.getPrimaryKey());
259
- // TODO simplify after we fix the IsPrimaryKey bug
260
- // const pkColumn = reportColumns.find(column => column.IsPrimaryKey);
261
- if (!pkColumn && !!this.getAdaptableApi().columnApi.getPrimaryKeyColumn()) {
262
- reportColumns.push(this.getAdaptableApi().columnApi.getPrimaryKeyColumn());
263
- }
264
- }
265
- return reportColumns;
266
- }
267
- getReportDataRows(report, columns, includePrimaryKey) {
268
- if (ArrayExtensions.IsNullOrEmpty(columns)) {
269
- return [];
270
- }
271
- const columnIds = columns.map((column) => column.columnId);
272
- const resultRowData = [];
273
- switch (report.ReportRowScope) {
274
- case 'AllRows':
275
- this.getAdaptableInternalApi().forAllRowNodesDo((rowNode) => {
276
- resultRowData.push(this.getRowObjectForColumnIds(rowNode, columnIds, report.Name));
277
- });
278
- break;
279
- case 'VisibleRows':
280
- this.getAdaptableInternalApi().forAllVisibleRowNodesDo((rowNode) => {
281
- resultRowData.push(this.getRowObjectForColumnIds(rowNode, columnIds, report.Name));
282
- });
283
- break;
284
- case 'ExpressionRows':
285
- this.getAdaptableInternalApi().forAllRowNodesDo((rowNode) => {
286
- try {
287
- if (this.getAdaptableApi()
288
- .internalApi.getQueryLanguageService()
289
- .evaluateBooleanExpression(report.Query?.BooleanExpression, ExportModuleId, rowNode)) {
290
- resultRowData.push(this.getRowObjectForColumnIds(rowNode, columnIds, report.Name));
291
- }
292
- }
293
- catch (error) {
294
- errorOnce(error.message);
295
- }
296
- });
297
- break;
298
- case 'SelectedRows':
299
- // CellSelection
300
- const selectedCellInfo = this.getAdaptableApi().gridApi.getSelectedCellInfo();
301
- const { gridCells: GridCells } = selectedCellInfo;
302
- let selectedCellsByPrimaryKey = groupBy(GridCells, 'primaryKeyValue');
303
- // we iterate over all visibleRowNodes to preserve the current order
304
- this.getAdaptableInternalApi().forAllVisibleRowNodesDo((rowNode) => {
305
- const rowPrimaryKeyValue = this.getAdaptableApi().gridApi.getPrimaryKeyValueForRowNode(rowNode);
306
- const selectedRowCells = selectedCellsByPrimaryKey[rowPrimaryKeyValue];
307
- if (selectedRowCells) {
308
- const selectedRowColumnIds = selectedRowCells.map((rowCell) => rowCell.column.columnId);
309
- const selectedColumnIds = columnIds.filter((columnId) => selectedRowColumnIds.includes(columnId));
310
- const row = this.getRowObjectForColumnIds(rowNode, selectedColumnIds, report.Name);
311
- if (includePrimaryKey) {
312
- row[this.getAdaptableApi().optionsApi.getPrimaryKey()] = rowPrimaryKeyValue;
313
- }
314
- resultRowData.push(row);
315
- }
316
- });
317
- // Row Selection
318
- const selectedRowInfo = this.getAdaptableApi().gridApi.getSelectedRowInfo();
319
- const selectedGridRowPrimaryKeys = selectedRowInfo?.gridRows
320
- ?.filter((gr) => gr.rowInfo.isGroup == false)
321
- .map((gridRow) => gridRow.primaryKeyValue) ?? [];
322
- if (selectedGridRowPrimaryKeys.length) {
323
- this.getAdaptableInternalApi().forAllRowNodesDo((rowNode) => {
324
- const rowPrimaryKeyValue = this.getAdaptableApi().gridApi.getPrimaryKeyValueForRowNode(rowNode);
325
- if (selectedGridRowPrimaryKeys.includes(rowPrimaryKeyValue)) {
326
- resultRowData.push(this.getRowObjectForColumnIds(rowNode, columnIds, report.Name));
327
- }
328
- });
329
- }
330
- break;
331
- }
332
- return resultRowData;
333
- }
334
- getReportData(report, includePrimaryKey = false) {
335
- if (this.getAdaptableApi().exportApi.isExternalReport(report)) {
336
- return this.getAdaptableApi().exportApi.runExternalReport(report.Name);
337
- }
338
- const columns = this.getReportDataColumns(report, includePrimaryKey);
339
- const rows = this.getReportDataRows(report, columns, includePrimaryKey);
340
- return { columns, rows };
341
- }
342
- getReportDataAsArray(report, includePrimaryKey = false) {
343
- const reportData = this.getReportData(report, includePrimaryKey);
344
- return this.convertReportDataToArray(reportData);
345
- }
346
223
  convertReportDataToArray(reportData) {
347
224
  return [
348
225
  reportData.columns.map((column) => column.friendlyName),
349
- ...reportData.rows.map((row) => reportData.columns.map((column) => row[column.columnId])),
226
+ ...reportData.rows.map((row) => reportData.columns.map((column) => row[column.field ?? column.columnId])),
350
227
  ];
351
228
  }
352
- getRowObjectForColumnIds(rowNode, columnIds, reportName) {
353
- return columnIds.reduce((result, columnId) => {
354
- // FIXME AFL if this method remains, 'false' should be replaced with dynamic value
355
- result[columnId] = this.getCellExportValueFromRowNode(rowNode, columnId, false);
356
- return result;
357
- }, {});
358
- }
359
229
  publishLiveLiveDataChangedEvent(reportDestination, liveDataTrigger, liveReport) {
360
230
  const liveDataChangedInfo = {
361
231
  ...this.getAdaptableInternalApi().buildBaseContext(),
@@ -429,9 +299,8 @@ export class ExportInternalApi extends ApiBase {
429
299
  this.sendReportToCustomDestination(reportResult, report, format, destination);
430
300
  }
431
301
  if (destination === 'Download') {
432
- if (format === 'Excel' || format === 'VisualExcel') {
433
- this.logWarn(`Download of Excel files should already be handed by internal APIs, something went wrong`);
434
- return;
302
+ if (reportResult.type === 'excel') {
303
+ Helper.createDownloadedFile(reportResult.data, this.getReportFileName(report.Name, format, destination), 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
435
304
  }
436
305
  if (reportResult.type === 'csv') {
437
306
  Helper.createDownloadedFile(reportResult.data, this.getReportFileName(report.Name, format, destination), 'text/csv;encoding:utf-8');
@@ -490,4 +359,104 @@ export class ExportInternalApi extends ApiBase {
490
359
  exportDestination,
491
360
  };
492
361
  }
362
+ createCellCsv(cellContent) {
363
+ return {
364
+ data: {
365
+ value: cellContent != undefined ? String(cellContent) : null,
366
+ },
367
+ };
368
+ }
369
+ createCellExcel(cellContent, cellType) {
370
+ return {
371
+ data: {
372
+ value: cellContent != undefined ? String(cellContent) : null,
373
+ type: cellType,
374
+ },
375
+ };
376
+ }
377
+ createCellHeader(cellContent) {
378
+ return {
379
+ data: {
380
+ value: cellContent != undefined ? String(cellContent) : null,
381
+ type: 'String',
382
+ },
383
+ };
384
+ }
385
+ getExternalReportData(externalReportName, reportFormat, exportDestination) {
386
+ const externalReport = this.getExportApi()
387
+ .getExternalReports()
388
+ ?.find((cr) => cr.name == externalReportName);
389
+ if (!externalReport) {
390
+ this.logWarn(`External Report '${externalReportName}' not found!`);
391
+ return undefined;
392
+ }
393
+ return externalReport.onExport({
394
+ ...this.buildBaseExportContext(externalReportName, reportFormat, exportDestination),
395
+ convertToExcel: this.buildExcelConverter(externalReportName, reportFormat, exportDestination),
396
+ convertToCsv: this.buildCsvConverter(externalReportName, reportFormat, exportDestination),
397
+ getGridReportColumns: this.buildGridReportColumns(),
398
+ });
399
+ }
400
+ buildGridReportColumns() {
401
+ return () => this.getAdaptableApi().columnApi.getColumns();
402
+ }
403
+ buildExcelConverter(externalReportName, reportFormat, exportDestination) {
404
+ return (reportData) => {
405
+ return this.executeGridExport(reportData, externalReportName, reportFormat, exportDestination, (gridApi, exportParams) => gridApi.getDataAsExcel({ ...exportParams }));
406
+ };
407
+ }
408
+ buildCsvConverter(externalReportName, reportFormat, exportDestination) {
409
+ return (reportData) => {
410
+ const csvParams = this.buildCsvExportParams(externalReportName, reportFormat, exportDestination);
411
+ return this.executeGridExport(reportData, externalReportName, reportFormat, exportDestination, (gridApi, exportParams) => gridApi.getDataAsCsv({ ...exportParams, ...csvParams }));
412
+ };
413
+ }
414
+ executeGridExport(reportData, externalReportName, reportFormat, exportDestination, exportFn) {
415
+ const htmlDivElement = document.createElement('div');
416
+ let ephemeralGridApi = null;
417
+ try {
418
+ const columnDefs = reportData.columns.map((col) => ({
419
+ colId: col.columnId,
420
+ field: col.field ?? col.columnId,
421
+ headerName: col.friendlyName ?? col.columnId,
422
+ type: col.dataType ?? 'text',
423
+ }));
424
+ const gridOptions = { columnDefs, rowData: reportData.rows };
425
+ const gridParams = {
426
+ modules: this.getAdaptableApi()
427
+ .internalApi.getAdaptableInstance()
428
+ .getAgGridRegisteredModules(),
429
+ };
430
+ htmlDivElement.style.display = 'none';
431
+ document.body.appendChild(htmlDivElement);
432
+ ephemeralGridApi = createGrid(htmlDivElement, gridOptions, gridParams);
433
+ const exportParams = {
434
+ fileName: this.getReportFileName(externalReportName, reportFormat, exportDestination),
435
+ allColumns: true,
436
+ exportedRows: 'all',
437
+ };
438
+ return exportFn(ephemeralGridApi, exportParams);
439
+ }
440
+ catch (error) {
441
+ this.logWarn('Failed to export data:', error);
442
+ return null;
443
+ }
444
+ finally {
445
+ if (ephemeralGridApi) {
446
+ ephemeralGridApi.destroy();
447
+ }
448
+ if (htmlDivElement?.parentNode) {
449
+ document.body.removeChild(htmlDivElement);
450
+ }
451
+ }
452
+ }
453
+ buildCsvExportParams(externalReportName, reportFormat, exportDestination) {
454
+ const exportOptions = this.getAdaptableApi().optionsApi.getExportOptions();
455
+ const csvSeparator = typeof exportOptions.csvSeparator === 'function'
456
+ ? exportOptions.csvSeparator(this.buildBaseExportContext(externalReportName, reportFormat, exportDestination))
457
+ : exportOptions.csvSeparator;
458
+ return {
459
+ columnSeparator: csvSeparator,
460
+ };
461
+ }
493
462
  }
@@ -187,7 +187,7 @@ export class RowFormInternalApi extends ApiBase {
187
187
  }
188
188
  const returnValues = this.getGridApi().internalApi.getDistinctDisplayValuesForColumnOld(column.columnId);
189
189
  // FIXME add support for asynchronous custom select cell editor values
190
- // it involves refactoring the AdaptableForm & AdapatableFormComponent
190
+ // it involves refactoring the AdaptableForm & adaptableFormComponent
191
191
  // await this.getSelectCellEditorValuesForColumn(
192
192
  // column,
193
193
  // 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
  }
@@ -266,22 +266,6 @@ export const SystemPredicateDefs = [
266
266
  toString: ({ inputs }) => `Not Between ${inputs[0] ?? ''}:${inputs[1]}`,
267
267
  shortcuts: ['!:'],
268
268
  },
269
- {
270
- id: 'IsNumeric',
271
- label: 'Is Numeric',
272
- icon: { text: '1' },
273
- columnScope: { DataTypes: ['number'] },
274
- moduleScope: ['alert', 'flashingcell'],
275
- handler: ({ value }) => !isNaN(Number(value)),
276
- },
277
- {
278
- id: 'IsNotNumeric',
279
- label: 'Is Not Numeric',
280
- icon: { text: '1' },
281
- columnScope: { DataTypes: ['number'] },
282
- moduleScope: ['alert', 'flashingcell'],
283
- handler: ({ value }) => isNaN(Number(value)),
284
- },
285
269
  // String System Filters
286
270
  {
287
271
  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,5 +1,5 @@
1
1
  export const ROW_SUMMARY_ROW_ID = '__ROW_SUMMARY_ROW_ID';
2
- export const WEIGHTED_AVERAGE_AGGREATED_FUNCTION = 'WEIGHTED_AVERAGE';
2
+ export const WEIGHTED_AVERAGE_AGGREGATED_FUNCTION = 'WEIGHTED_AVERAGE';
3
3
  export const summarySupportedExpressions = [
4
4
  'MIN',
5
5
  'MAX',
@@ -11,5 +11,5 @@ export const summarySupportedExpressions = [
11
11
  'DISTINCT',
12
12
  'ONLY',
13
13
  'STD_DEVIATION',
14
- WEIGHTED_AVERAGE_AGGREATED_FUNCTION,
14
+ WEIGHTED_AVERAGE_AGGREGATED_FUNCTION,
15
15
  ];
@@ -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
  */
@@ -660,7 +660,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
660
660
  }
661
661
  return ret;
662
662
  }
663
- case InternalRedux.HIGHLIGHT_CELL_DELETE_ALL: {
663
+ case InternalRedux.HIGHLIGHT_ROW_DELETE_ALL: {
664
664
  const rowHighlightInfos = middlewareAPI.getState().Internal.RowHighlightInfo;
665
665
  const ret = next(action);
666
666
  rowHighlightInfos.forEach((rowHighlightInfo) => {
@@ -35,12 +35,12 @@ export class StyledColumnModule extends AdaptableModuleBase {
35
35
  // because if just one then it was created in AG Grid and we dont want to edit it
36
36
  }
37
37
  else {
38
- const hasSparklineStyle = styledColumn != null && styledColumn.SparkLineStyle != null;
38
+ const hasSparklineStyle = styledColumn != null && styledColumn.SparklineStyle != null;
39
39
  if (!hasSparklineStyle) {
40
40
  styledColumn = {
41
41
  ...ObjectFactory.CreateEmptyStyledColumn(),
42
42
  ColumnId: column.columnId,
43
- SparkLineStyle: {},
43
+ SparklineStyle: {},
44
44
  };
45
45
  }
46
46
  let label = hasSparklineStyle ? 'Edit ' : 'Create ';
@@ -48,7 +48,7 @@ export class StyledColumnModule extends AdaptableModuleBase {
48
48
  ? 'styled-column-sparkline-edit'
49
49
  : 'styled-column-sparkline-add';
50
50
  let popupParam = {
51
- action: sparklineColumnExists ? 'Edit' : 'New',
51
+ action: hasSparklineStyle ? 'Edit' : 'New',
52
52
  source: 'ColumnMenu',
53
53
  value: styledColumn,
54
54
  config: {
@@ -161,7 +161,7 @@ export class StyledColumnModule extends AdaptableModuleBase {
161
161
  else if (styledColumn.PercentBarStyle) {
162
162
  return 'percent';
163
163
  }
164
- else if (styledColumn.SparkLineStyle) {
164
+ else if (styledColumn.SparklineStyle) {
165
165
  return 'spark-line';
166
166
  }
167
167
  else if (styledColumn.BadgeStyle) {
@@ -248,7 +248,7 @@ export class StyledColumnModule extends AdaptableModuleBase {
248
248
  else if (styledColumn.PercentBarStyle) {
249
249
  type = 'Percent Bar';
250
250
  }
251
- else if (styledColumn.SparkLineStyle) {
251
+ else if (styledColumn.SparklineStyle) {
252
252
  type = 'Spark Line';
253
253
  }
254
254
  else if (styledColumn.BadgeStyle) {
@@ -264,7 +264,7 @@ export class StyledColumnModule extends AdaptableModuleBase {
264
264
  else if (styledColumn.PercentBarStyle) {
265
265
  type = 'styled-column-percent-bar-edit';
266
266
  }
267
- else if (styledColumn.SparkLineStyle) {
267
+ else if (styledColumn.SparklineStyle) {
268
268
  type = 'styled-column-sparkline-edit';
269
269
  }
270
270
  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;