@adaptabletools/adaptable 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.
Files changed (118) hide show
  1. package/base.css +1288 -898
  2. package/base.css.map +1 -1
  3. package/index.css +428 -898
  4. package/index.css.map +1 -1
  5. package/package.json +4 -4
  6. package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -1
  7. package/src/AdaptableOptions/CellSummaryOptions.d.ts +1 -1
  8. package/src/AdaptableOptions/ContainerOptions.d.ts +0 -7
  9. package/src/AdaptableOptions/DashboardOptions.d.ts +1 -1
  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/PredicateOptions.d.ts +4 -4
  14. package/src/AdaptableOptions/QuickSearchOptions.d.ts +2 -2
  15. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +7 -0
  16. package/src/Api/ExportApi.d.ts +1 -6
  17. package/src/Api/Fdc3Api.d.ts +5 -3
  18. package/src/Api/Implementation/AdaptableApiImpl.js +1 -0
  19. package/src/Api/Implementation/ColumnFilterApiImpl.js +3 -3
  20. package/src/Api/Implementation/ExportApiImpl.d.ts +1 -2
  21. package/src/Api/Implementation/ExportApiImpl.js +17 -10
  22. package/src/Api/Implementation/Fdc3ApiImpl.d.ts +3 -3
  23. package/src/Api/Implementation/Fdc3ApiImpl.js +4 -4
  24. package/src/Api/Implementation/LayoutHelpers.js +8 -27
  25. package/src/Api/Implementation/PredicateApiImpl.js +1 -1
  26. package/src/Api/Implementation/ScheduleApiImpl.js +1 -1
  27. package/src/Api/Implementation/StyledColumnApiImpl.js +1 -1
  28. package/src/Api/Implementation/ThemeApiImpl.js +3 -1
  29. package/src/Api/Internal/ActionColumnInternalApi.js +16 -19
  30. package/src/Api/Internal/AdaptableInternalApi.js +1 -1
  31. package/src/Api/Internal/ColumnFilterInternalApi.js +2 -2
  32. package/src/Api/Internal/ColumnInternalApi.js +1 -2
  33. package/src/Api/Internal/EventInternalApi.js +6 -1
  34. package/src/Api/Internal/ExportInternalApi.d.ts +10 -6
  35. package/src/Api/Internal/ExportInternalApi.js +105 -136
  36. package/src/Api/Internal/RowFormInternalApi.js +1 -1
  37. package/src/Api/LayoutApi.d.ts +1 -1
  38. package/src/Api/ThemeApi.d.ts +2 -0
  39. package/src/PredefinedConfig/AlertState.d.ts +1 -1
  40. package/src/PredefinedConfig/Common/AdaptableColumnContext.d.ts +1 -1
  41. package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +1 -1
  42. package/src/PredefinedConfig/Common/AdaptablePredicate.js +13 -29
  43. package/src/PredefinedConfig/Common/ColumnFilter.d.ts +6 -2
  44. package/src/PredefinedConfig/ExportState.d.ts +10 -17
  45. package/src/PredefinedConfig/FlashingCellState.d.ts +1 -1
  46. package/src/PredefinedConfig/LayoutState.d.ts +17 -17
  47. package/src/PredefinedConfig/StyledColumnState.d.ts +1 -1
  48. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +4 -3
  49. package/src/Redux/ActionsReducers/LayoutRedux.js +3 -3
  50. package/src/Redux/Store/AdaptableStore.js +3 -3
  51. package/src/Strategy/ColumnFilterModule.js +4 -4
  52. package/src/Strategy/StyledColumnModule.js +6 -6
  53. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +1 -1
  54. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +3 -3
  55. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +13 -13
  56. package/src/Utilities/Helpers/AdaptableHelper.d.ts +2 -0
  57. package/src/Utilities/Helpers/AdaptableHelper.js +10 -0
  58. package/src/Utilities/Helpers/DateHelper.js +1 -2
  59. package/src/Utilities/Helpers/FormatHelper.js +18 -5
  60. package/src/Utilities/ObjectFactory.js +1 -0
  61. package/src/Utilities/Services/Fdc3Service.d.ts +2 -2
  62. package/src/Utilities/Services/Fdc3Service.js +7 -2
  63. package/src/Utilities/Services/ThemeService.d.ts +1 -1
  64. package/src/Utilities/Services/ThemeService.js +5 -5
  65. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +41 -0
  66. package/src/View/ColumnInfo/ColumnInfo.js +0 -1
  67. package/src/View/Comments/CommentsEditor.js +5 -2
  68. package/src/View/Comments/CommentsPopup.js +5 -2
  69. package/src/View/Components/ColumnFilter/ColumnFilter.d.ts +1 -1
  70. package/src/View/Components/ColumnFilter/ColumnFilter.js +4 -2
  71. package/src/View/Components/ColumnFilter/FloatingFilter.js +1 -1
  72. package/src/View/Components/ColumnFilter/LayoutColumnFilter.js +1 -1
  73. package/src/View/Components/ColumnFilter/useAdaptableFilterWrapper.d.ts +1 -1
  74. package/src/View/Components/ColumnFilter/useAdaptableFilterWrapper.js +6 -2
  75. package/src/View/Components/ColumnFilter/utils.js +2 -2
  76. package/src/View/Components/FilterForm/ListBoxFilterForm.js +3 -3
  77. package/src/View/Dashboard/CustomToolbar.js +2 -2
  78. package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +4 -1
  79. package/src/View/Filter/FilterSummary.js +1 -1
  80. package/src/View/GridInfo/GridInfoPopup/AdaptableObjectsSummary.js +6 -2
  81. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +7 -2
  82. package/src/View/Note/NotePopup.js +5 -2
  83. package/src/View/QuickSearch/QuickSearchPopup.js +2 -2
  84. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.d.ts +2 -0
  85. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +18 -2
  86. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsSummary.js +4 -0
  87. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +2 -1
  88. package/src/View/StatusBar/AdaptableStatusBar.js +7 -5
  89. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.d.ts +3 -4
  90. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +348 -191
  91. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +2 -2
  92. package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +1 -1
  93. package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +4 -4
  94. package/src/agGrid/AdaptableAgGrid.d.ts +4 -8
  95. package/src/agGrid/AdaptableAgGrid.js +72 -118
  96. package/src/agGrid/AgGridAdapter.d.ts +1 -1
  97. package/src/agGrid/AgGridAdapter.js +7 -8
  98. package/src/agGrid/AgGridColumnAdapter.js +5 -10
  99. package/src/agGrid/AgGridExportAdapter.d.ts +24 -1
  100. package/src/agGrid/AgGridExportAdapter.js +24 -25
  101. package/src/agGrid/AgGridThemeAdapter.d.ts +19 -0
  102. package/src/agGrid/AgGridThemeAdapter.js +122 -0
  103. package/src/agGrid/cellRenderers/BadgeRenderer.js +2 -1
  104. package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.js +1 -1
  105. package/src/components/ColorPicker/ColorPicker.js +2 -2
  106. package/src/components/Datepicker/DatepickerContext.d.ts +1 -0
  107. package/src/components/Datepicker/index.d.ts +1 -0
  108. package/src/components/Datepicker/index.js +1 -1
  109. package/src/components/OverlayTrigger/useAgGridClassName.js +1 -1
  110. package/src/components/Select/Select.d.ts +1 -0
  111. package/src/components/Select/Select.js +30 -7
  112. package/src/env.js +2 -2
  113. package/src/metamodel/adaptable.metamodel.d.ts +23 -15
  114. package/src/metamodel/adaptable.metamodel.js +1 -1
  115. package/src/migration/VersionUpgrade20.d.ts +3 -0
  116. package/src/migration/VersionUpgrade20.js +140 -12
  117. package/src/types.d.ts +3 -3
  118. package/tsconfig.esm.tsbuildinfo +1 -1
@@ -1,7 +1,7 @@
1
1
  import * as Redux from 'redux';
2
2
  import * as PluginsRedux from '../ActionsReducers/PluginsRedux';
3
3
  import * as PopupRedux from '../ActionsReducers/PopupRedux';
4
- import { PROGRESS_INDICATOR_HIDE, PROGRESS_INDICATOR_SHOW, } from '../ActionsReducers/PopupRedux';
4
+ import { PROGRESS_INDICATOR_HIDE, PROGRESS_INDICATOR_SHOW } from '../ActionsReducers/PopupRedux';
5
5
  import { createEngine as createEngineLocal } from './AdaptableReduxLocalStorageEngine';
6
6
  import { mergeReducer } from './AdaptableReduxMerger';
7
7
  import { isAdaptableCellChangedAlert, isAdaptableRowChangedAlert, } from '../../PredefinedConfig/Common/AdaptableAlert';
@@ -500,7 +500,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
500
500
  let returnAction = next(action);
501
501
  adaptable.api.gridApi.refreshAllCells(true);
502
502
  // if set then return a query on the text
503
- if (adaptable.adaptableOptions.quickSearchOptions.filterResultsAfterQuickSearch) {
503
+ if (adaptable.adaptableOptions.quickSearchOptions.filterGridAfterQuickSearch) {
504
504
  const actionTyped = action;
505
505
  const searchText = actionTyped.quickSearchText;
506
506
  if (StringExtensions.IsNotNullOrEmpty(searchText)) {
@@ -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) => {
@@ -55,7 +55,7 @@ export class ColumnFilterModule extends AdaptableModuleBase {
55
55
  }
56
56
  const existingColumnFilter = this.api.filterApi.columnFilterApi.getColumnFilterForColumn(column.columnId);
57
57
  if (existingColumnFilter) {
58
- columnFilterMenuItems.push(this.createMenuItemReduxAction('column-filter-clear', 'Clear Filter', 'close', LayoutRedux.LayoutColumnFilterClear(existingColumnFilter)));
58
+ columnFilterMenuItems.push(this.createMenuItemReduxAction('column-filter-clear', 'Clear Filter', 'close', LayoutRedux.LayoutColumnFilterClear(existingColumnFilter.ColumnId)));
59
59
  columnFilterMenuItems.push(this.createMenuItemReduxAction(existingColumnFilter.IsSuspended ? 'column-filter-unsuspend' : 'column-filter-suspend', existingColumnFilter.IsSuspended ? 'Unsuspend Filter' : 'Suspend Filter', existingColumnFilter.IsSuspended ? 'resume' : 'pause', existingColumnFilter.IsSuspended
60
60
  ? LayoutRedux.LayoutColumnFilterUnSuspend(existingColumnFilter)
61
61
  : LayoutRedux.LayoutColumnFilterSuspend(existingColumnFilter)));
@@ -88,7 +88,7 @@ export class ColumnFilterModule extends AdaptableModuleBase {
88
88
  }
89
89
  else {
90
90
  return [
91
- this.createMenuItemReduxAction('column-filter-clear', 'Clear Filter', 'close', LayoutRedux.LayoutColumnFilterClear(existingColumnFilter)),
91
+ this.createMenuItemReduxAction('column-filter-clear', 'Clear Filter', 'close', LayoutRedux.LayoutColumnFilterClear(existingColumnFilter.ColumnId)),
92
92
  this.createMenuItemClickFunction(existingColumnFilter.IsSuspended
93
93
  ? 'column-filter-unsuspend'
94
94
  : 'column-filter-suspend', existingColumnFilter.IsSuspended ? 'Unsuspend Filter' : 'Suspend Filter', existingColumnFilter.IsSuspended ? 'resume' : 'pause', existingColumnFilter.IsSuspended
@@ -145,8 +145,8 @@ export class ColumnFilterModule extends AdaptableModuleBase {
145
145
  getCompactUnSuspendAction: (columnFilter) => LayoutRedux.LayoutColumnFilterUnSuspend(columnFilter),
146
146
  getSuspendAllAction: () => LayoutRedux.LayoutColumnFilterSuspendAll(),
147
147
  getUnSuspendAllAction: () => LayoutRedux.LayoutColumnFilterUnSuspendAll(),
148
- getDeleteAction: LayoutRedux.LayoutColumnFilterClear,
149
- getCompactDeleteAction: LayoutRedux.LayoutColumnFilterClear,
148
+ getDeleteAction: (columnFilter) => LayoutRedux.LayoutColumnFilterClear(columnFilter.ColumnId),
149
+ getCompactDeleteAction: (columnFilter) => LayoutRedux.LayoutColumnFilterClear(columnFilter.ColumnId),
150
150
  getDeleteAllAction: LayoutRedux.LayoutColumnFilterClearAll,
151
151
  emptyView: `
152
152
  There are no Column Filters applied. \n
@@ -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) {
@@ -2,7 +2,7 @@ import { ExpressionEvaluationError } from '../../parser/src/ExpressionEvaluation
2
2
  import { SumArray } from '../Extensions/ArrayExtensions';
3
3
  import { getTypedKeys } from '../Extensions/TypeExtensions';
4
4
  import { extractColumnParameter, extractColumnParameters, extractParameter, getNumericValue, handleColumnFunction, validateColumnType, } from './expressionFunctionUtils';
5
- import isAfter from 'date-fns/isAfter';
5
+ import { isAfter } from 'date-fns';
6
6
  import { parseDateValue } from '../Helpers/DateHelper';
7
7
  export const aggregatedExpressionFunctions = [
8
8
  'SUM',
@@ -1,6 +1,6 @@
1
- import isAfter from 'date-fns/isAfter';
2
- import isBefore from 'date-fns/isBefore';
3
- import isEqual from 'date-fns/isEqual';
1
+ import { isAfter } from 'date-fns';
2
+ import { isBefore } from 'date-fns';
3
+ import { isEqual } from 'date-fns';
4
4
  import { ExpressionEvaluationError } from '../../parser/src/ExpressionEvaluationError';
5
5
  import { getStringValue, getStringValues } from './expressionFunctionUtils';
6
6
  import { getTypedKeys } from '../Extensions/TypeExtensions';
@@ -1,17 +1,17 @@
1
1
  import { ExpressionEvaluationError } from '../../parser/src/ExpressionEvaluationError';
2
- import parseISO from 'date-fns/parseISO';
3
- import startOfDay from 'date-fns/startOfDay';
4
- import startOfWeek from 'date-fns/startOfWeek';
5
- import startOfMonth from 'date-fns/startOfMonth';
6
- import startOfYear from 'date-fns/startOfYear';
7
- import addDays from 'date-fns/addDays';
8
- import addWeeks from 'date-fns/addWeeks';
9
- import addMonths from 'date-fns/addMonths';
10
- import addYears from 'date-fns/addYears';
11
- import differenceInDays from 'date-fns/differenceInDays';
12
- import differenceInWeeks from 'date-fns/differenceInWeeks';
13
- import differenceInMonths from 'date-fns/differenceInMonths';
14
- import differenceInYears from 'date-fns/differenceInYears';
2
+ import { parseISO } from 'date-fns';
3
+ import { startOfDay } from 'date-fns';
4
+ import { startOfWeek } from 'date-fns';
5
+ import { startOfMonth } from 'date-fns';
6
+ import { startOfYear } from 'date-fns';
7
+ import { addDays } from 'date-fns';
8
+ import { addWeeks } from 'date-fns';
9
+ import { addMonths } from 'date-fns';
10
+ import { addYears } from 'date-fns';
11
+ import { differenceInDays } from 'date-fns';
12
+ import { differenceInWeeks } from 'date-fns';
13
+ import { differenceInMonths } from 'date-fns';
14
+ import { differenceInYears } from 'date-fns';
15
15
  import { evaluateExpressionNode, getNumericValue, isTextSearchCaseInsensitive, } from './expressionFunctionUtils';
16
16
  import { normalizeDateParams } from './dateUtils';
17
17
  import StringExtensions from '../Extensions/StringExtensions';
@@ -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;
@@ -43,6 +43,15 @@ export function addAdaptableObjectPrimitives(adaptableObject) {
43
43
  adaptableObject.AdaptableVersion = GET_CURRENT_VERSION();
44
44
  return adaptableObject;
45
45
  }
46
+ export function removeAdaptableObjectPrimitivesInline(target) {
47
+ if (!target || typeof target !== 'object') {
48
+ return target;
49
+ }
50
+ delete target.Source;
51
+ delete target.Uuid;
52
+ delete target.AdaptableVersion;
53
+ return target;
54
+ }
46
55
  export function removeAdaptableObjectPrimitives(adaptableObject) {
47
56
  const clonedObject = structuredClone(adaptableObject);
48
57
  const sanitiseObject = (object) => {
@@ -70,6 +79,7 @@ export const AdaptableHelper = {
70
79
  getAccessLevelForObject,
71
80
  addAdaptableObjectPrimitives,
72
81
  removeAdaptableObjectPrimitives,
82
+ removeAdaptableObjectPrimitivesInline,
73
83
  isAdaptableObject,
74
84
  };
75
85
  export default AdaptableHelper;
@@ -1,5 +1,4 @@
1
- import parseISO from 'date-fns/parseISO';
2
- import parse from 'date-fns/parse';
1
+ import { parseISO, parse } from 'date-fns';
3
2
  import { DateFormatter } from './FormatHelper';
4
3
  import { AdaptableLogger } from '../../agGrid/AdaptableLogger';
5
4
  export const isValidDate = (date) => {
@@ -1,9 +1,9 @@
1
1
  // TODO inspect why the following is erroring on angular build
2
- // import dateFnsFormat from 'date-fns/format';
3
- import dateFnsFormat from 'date-fns/format';
2
+ import { format as dateFnsFormat } from 'date-fns';
4
3
  import { sentenceCase } from 'sentence-case';
5
4
  import { DEFAULT_DATE_FORMAT_PATTERN } from '../Constants/GeneralConstants';
6
5
  import Helper from './Helper';
6
+ import StringExtensions from '../Extensions/StringExtensions';
7
7
  export function NumberFormatter(input, options = {}, rowNode, column, api) {
8
8
  let preparedInput;
9
9
  if (options.Content) {
@@ -111,20 +111,33 @@ export function DateFormatter(input, options, strictFormatting = false) {
111
111
  }
112
112
  }
113
113
  export function StringFormatter(input, options = {}, rowNode, column, api) {
114
+ let normalisedTextInput = input;
115
+ if (input != undefined && typeof input !== 'string') {
116
+ const warningMessage = column
117
+ ? `StringFormatter: input '${input}' from column ${column.columnId} (${column.dataType}) is not a string, but a ${typeof input}`
118
+ : `StringFormatter: input '${input}' is not a string, received ${typeof input}`;
119
+ if (api) {
120
+ api.logWarn(warningMessage);
121
+ }
122
+ else {
123
+ console.warn(warningMessage);
124
+ }
125
+ normalisedTextInput = `${input}`;
126
+ }
114
127
  let preparedInput;
115
128
  if (options.Content) {
116
129
  const context = {
117
130
  column,
118
131
  rowNode,
119
- input,
132
+ input: normalisedTextInput,
120
133
  api,
121
134
  };
122
135
  preparedInput = formatPlaceholder(options.Content, context);
123
136
  }
124
137
  else {
125
- preparedInput = input;
138
+ preparedInput = normalisedTextInput;
126
139
  }
127
- if (preparedInput == null || preparedInput == undefined) {
140
+ if (StringExtensions.IsNullOrEmptyOrWhiteSpace(preparedInput)) {
128
141
  return undefined;
129
142
  }
130
143
  if (options.Empty) {
@@ -162,6 +162,7 @@ export function CreateEmptyReportSchedule() {
162
162
  Schedule: CreateEmptySchedule(),
163
163
  ReportName: EMPTY_STRING,
164
164
  ReportFormat: EMPTY_STRING,
165
+ ExportDestination: 'Download',
165
166
  };
166
167
  }
167
168
  export function CreateEmptyIPushPullReport() {
@@ -1,7 +1,7 @@
1
1
  import { IAdaptableService } from './Interface/IAdaptableService';
2
2
  import { AdaptableApi } from '../../Api/AdaptableApi';
3
3
  import { Fdc3Options } from '../../AdaptableOptions/Fdc3Options';
4
- import { AppIdentifier, DesktopAgent, IntentResolution } from '@finos/fdc3';
4
+ import { AppIdentifier, Channel, DesktopAgent, IntentResolution } from '@finos/fdc3';
5
5
  import { Context } from '@finos/fdc3/dist/context/ContextTypes';
6
6
  export declare class Fdc3Service implements IAdaptableService {
7
7
  private adaptableApi;
@@ -15,7 +15,7 @@ export declare class Fdc3Service implements IAdaptableService {
15
15
  destroy(): void;
16
16
  raiseIntent(intent: string, context: Context, app?: AppIdentifier): Promise<IntentResolution>;
17
17
  raiseIntentForContext(context: Context, app?: AppIdentifier): Promise<IntentResolution>;
18
- broadcast(context: Context): Promise<void>;
18
+ broadcast(context: Context, channel?: Channel): Promise<void>;
19
19
  private logFdc3Event;
20
20
  private logFdc3Error;
21
21
  private getFdc3Api;
@@ -131,7 +131,7 @@ export class Fdc3Service {
131
131
  this.logFdc3Error(error);
132
132
  }
133
133
  }
134
- broadcast(context) {
134
+ broadcast(context, channel) {
135
135
  if (!this.getDesktopAgent()) {
136
136
  return;
137
137
  }
@@ -144,7 +144,12 @@ export class Fdc3Service {
144
144
  context,
145
145
  };
146
146
  this.adaptableApi.eventApi.emit('Fdc3Message', payload);
147
- return this.getDesktopAgent().broadcast(context);
147
+ if (channel) {
148
+ return channel.broadcast(context);
149
+ }
150
+ else {
151
+ return this.getDesktopAgent().broadcast(context);
152
+ }
148
153
  }
149
154
  catch (error) {
150
155
  this.logFdc3Error(error);
@@ -5,10 +5,10 @@ export declare class ThemeService implements IThemeService {
5
5
  private unsubscribe;
6
6
  private styleSheetObject;
7
7
  constructor(api: AdaptableApi);
8
+ destroy(): void;
8
9
  subscribe(): void;
9
10
  onThemeChanged: () => void;
10
11
  applyNewThemeVariables(theme: AdaptableTheme): void;
11
- destroy(): void;
12
12
  showMissingThemeFiles(theme: AdaptableTheme): void;
13
13
  getDOMPrefferedColorScheme(): 'dark' | 'light';
14
14
  mapOsTheme(theme: AdaptableTheme | string): AdaptableTheme;
@@ -20,6 +20,11 @@ export class ThemeService {
20
20
  ];
21
21
  }
22
22
  }
23
+ destroy() {
24
+ this.api = null;
25
+ this.unsubscribe();
26
+ document.adoptedStyleSheets = [...document.adoptedStyleSheets].filter((sheet) => sheet !== this.styleSheetObject);
27
+ }
23
28
  subscribe() {
24
29
  const themeChangedUnsubscribe = this.api.eventApi.on('ThemeChanged', this.onThemeChanged);
25
30
  const prefferedColorSchemeUnsubscribe = this.attachPrefferedColorSchemeListener();
@@ -44,11 +49,6 @@ export class ThemeService {
44
49
  str += '}';
45
50
  this.styleSheetObject.replaceSync(str);
46
51
  }
47
- destroy() {
48
- this.api = null;
49
- this.unsubscribe();
50
- document.adoptedStyleSheets = [...document.adoptedStyleSheets].filter((sheet) => sheet !== this.styleSheetObject);
51
- }
52
52
  showMissingThemeFiles(theme) {
53
53
  // run time defined theme
54
54
  // because it may be an empty theme
@@ -42,6 +42,47 @@ export const ConfigurationWizard = (props) => {
42
42
  delete newColumn.caption;
43
43
  return newColumn;
44
44
  });
45
+ const columnDefs = adaptableConfig.gridOptions.columnDefs;
46
+ // handle the layout creation
47
+ let Layouts = newAdaptableOptions.predefinedConfig?.Layout?.Layouts || [];
48
+ const NewLayout = {
49
+ TableColumns: columnDefs.map((col) => col.colId ?? col.field),
50
+ Name: 'Default Layout',
51
+ };
52
+ let currentLayoutName = NewLayout.Name;
53
+ let found = false;
54
+ if (!Layouts.length) {
55
+ // no layouts, make this the only one
56
+ Layouts = [NewLayout];
57
+ }
58
+ else {
59
+ Layouts = Layouts.map((layout) => {
60
+ if (found) {
61
+ return layout;
62
+ }
63
+ if (layout.TableColumns?.length === 0) {
64
+ // when finding the first empty layout
65
+ // set its column to be those of the new layout
66
+ found = true;
67
+ // and grab the name so we can put it in the Layout.CurrentLayout state
68
+ currentLayoutName = layout.Name;
69
+ layout = { ...layout };
70
+ layout.TableColumns = NewLayout.TableColumns;
71
+ }
72
+ return layout;
73
+ });
74
+ if (!found) {
75
+ Layouts.push(NewLayout);
76
+ }
77
+ }
78
+ newAdaptableOptions.predefinedConfig = {
79
+ ...newAdaptableOptions.predefinedConfig,
80
+ Layout: {
81
+ ...newAdaptableOptions.predefinedConfig.Layout,
82
+ Layouts: Layouts,
83
+ CurrentLayout: currentLayoutName,
84
+ },
85
+ };
45
86
  newAdaptableOptions.primaryKey = columnsHandle.current.getPrimaryKey();
46
87
  }
47
88
  const newAdaptableConfig = {
@@ -205,7 +205,6 @@ const ModuleView = (props) => {
205
205
  }, moduleInfo: moduleInfo, data: null, configEntities: null, onCloseWizard: handleWizardClose, onFinishWizard: handleWizardClose }))));
206
206
  };
207
207
  export const ColumnInfo = (props) => {
208
- // const state = useSelector((state: AdaptableState) => state);
209
208
  const adaptable = useAdaptable();
210
209
  const [selectedColumnId, setSelectedColumnId] = React.useState(props.selectedColumnId);
211
210
  const column = adaptable.api.columnApi.getColumnWithColumnId(selectedColumnId);
@@ -8,7 +8,7 @@ import * as CommentsRedux from '../../Redux/ActionsReducers/CommentsRedux';
8
8
  import { CommentsAndNotesSelector } from '../../Redux/ActionsReducers/InternalRedux';
9
9
  import { useAdaptable } from '../AdaptableContext';
10
10
  import AdaptableInput from '../Components/AdaptableInput';
11
- import dateFnsFormat from 'date-fns/format';
11
+ import FormatHelper from '../../Utilities/Helpers/FormatHelper';
12
12
  // Edit Mode
13
13
  // [author] [edit, delete]
14
14
  // [text-editor] * this is different
@@ -48,6 +48,9 @@ export const CommentsEditor = (props) => {
48
48
  if (!commentThread) {
49
49
  return null;
50
50
  }
51
+ const formatDate = (date, format) => {
52
+ return FormatHelper.DateFormatter(date, { Pattern: format });
53
+ };
51
54
  return (React.createElement(Panel, { color: "var(--ab-color-text-on-primary)", onClick: () => props.enableEditMode(), minWidth: 250, className: "ab-CommentPopup", onKeyDown: (event) => {
52
55
  if (event.key === 'Escape') {
53
56
  api.commentApi.hideCommentsPopup();
@@ -75,7 +78,7 @@ export const CommentsEditor = (props) => {
75
78
  React.createElement(Flex, { mb: 2, alignItems: "center" },
76
79
  React.createElement(Box, null,
77
80
  React.createElement(Box, { "data-name": "comment-username", fontSize: 3, fontWeight: "bold" }, comment?.Author?.UserName),
78
- comment.Timestamp && (React.createElement(Box, { "data-name": "comment-timestamp", fontSize: 2 }, dateFnsFormat(comment.Timestamp, api.commentApi.internalApi.getCommentsDateFormat())))),
81
+ comment.Timestamp && (React.createElement(Box, { "data-name": "comment-timestamp", fontSize: 2 }, formatDate(comment.Timestamp, api.commentApi.internalApi.getCommentsDateFormat())))),
79
82
  React.createElement(Box, { flex: 1 }),
80
83
  React.createElement(SimpleButton, { variant: "text", icon: "edit", disabled: !isOwnComment || isReadOnlyModule, onClick: () => setActiveEditingComment(comment.Uuid) }),
81
84
  React.createElement(SimpleButton, { variant: "text", icon: "delete", disabled: !isOwnComment || isReadOnlyModule, onClick: () => {
@@ -3,10 +3,10 @@ import { useSelector } from 'react-redux';
3
3
  import { DataSource, InfiniteTable } from '../../components/InfiniteTable';
4
4
  import Panel from '../../components/Panel';
5
5
  import { Box, Flex } from 'rebass';
6
- import dateFnsFormat from 'date-fns/format';
7
6
  import { useAdaptable } from '../AdaptableContext';
8
7
  import { PopupPanel } from '../Components/Popups/AdaptablePopup/PopupPanel';
9
8
  import { AdaptableButtonComponent } from '../Components/AdaptableButton';
9
+ import FormatHelper from '../../Utilities/Helpers/FormatHelper';
10
10
  const tableDOMProps = {
11
11
  style: {
12
12
  minHeight: 160,
@@ -16,6 +16,9 @@ const tableDOMProps = {
16
16
  const CellComments = (props) => {
17
17
  const adaptable = useAdaptable();
18
18
  const isReadOnlyModule = adaptable.api.entitlementApi.getEntitlementAccessLevelForModule('Comment') === 'ReadOnly';
19
+ const formatDate = (date, format) => {
20
+ return FormatHelper.DateFormatter(date, { Pattern: format });
21
+ };
19
22
  const columnsMap = React.useMemo(() => {
20
23
  const columns = {
21
24
  author: {
@@ -27,7 +30,7 @@ const CellComments = (props) => {
27
30
  field: 'Timestamp',
28
31
  maxWidth: 150,
29
32
  valueGetter: (params) => {
30
- return dateFnsFormat(params.data.Timestamp, adaptable.api.commentApi.internalApi.getCommentsDateFormat());
33
+ return formatDate(params.data.Timestamp, adaptable.api.commentApi.internalApi.getCommentsDateFormat());
31
34
  },
32
35
  },
33
36
  text: {
@@ -6,7 +6,7 @@ interface ColumnFilterComponentProps {
6
6
  disabled?: boolean;
7
7
  predicate?: QlPredicate;
8
8
  predicateDefs: QlPredicateDef[];
9
- onPredicateChange: (predicate: QlPredicate) => void;
9
+ onPredicateChange: (predicate: QlPredicate | null) => void;
10
10
  wrapperProps?: BoxProps;
11
11
  }
12
12
  export declare const ColumnFilterComponent: React.FunctionComponent<ColumnFilterComponentProps>;
@@ -69,7 +69,9 @@ export const ColumnFilterComponent = (props) => {
69
69
  setPredicateNotYetApplied(undefined);
70
70
  };
71
71
  const onPredicateChange = (predicate) => {
72
- if (autoApplyColumnFilter) {
72
+ // even if autoApplyColumnFilter is false, when we explicitly clear the filter
73
+ // we want to apply the filter immediately
74
+ if (autoApplyColumnFilter || !predicate) {
73
75
  props.onPredicateChange(predicate);
74
76
  }
75
77
  else {
@@ -112,7 +114,7 @@ export const ColumnFilterComponent = (props) => {
112
114
  return (React.createElement(React.Fragment, null,
113
115
  React.createElement(Flex, { m: 2 },
114
116
  React.createElement(AndOrInput, { onChange: onCombineChange, operator: currentPredicate.operator }),
115
- React.createElement(SimpleButton, { ml: 2, onClick: () => onPredicateChange({ operator: 'AND', args: [] }) }, "Clear All")),
117
+ React.createElement(SimpleButton, { ml: 2, onClick: () => onPredicateChange(null) }, "Clear All")),
116
118
  React.createElement(Flex, { flexDirection: "column", className: "ab-ColumnFilter", flex: 1, minHeight: 0, ...props.wrapperProps },
117
119
  React.createElement(Box, { flex: 1, style: { overflow: 'auto' } },
118
120
  currentPredicate.args.map((predicate, index) => {
@@ -78,7 +78,7 @@ export const FloatingFilter = (props) => {
78
78
  } }))),
79
79
  isInlineEditable && (React.createElement(SimpleButton, { px: 0, onClick: () => {
80
80
  adaptable.api.filterApi.columnFilterApi.internalApi.openColumnFilterPopup(props.columnId);
81
- }, icon: "expand", variant: "text" })),
81
+ }, "data-name": "expand-filter", icon: "expand", variant: "text" })),
82
82
  (isMultiple ||
83
83
  !isPredicateEmpty(props.predicate.args[0], singleFilterPredicateDef)) && (React.createElement(SimpleButton, { "data-name": "clear-filter", p: 0, variant: "text", onClick: handleClear, icon: "close" }))));
84
84
  };
@@ -17,7 +17,7 @@ export const LayoutColumnFilter = (props) => {
17
17
  ...props.columnFilter,
18
18
  ColumnId: props.columnFilter.ColumnId,
19
19
  Predicates: newAdaptablePredicates,
20
- PredicatesLogic: newPredicate.operator,
20
+ PredicatesOperator: newPredicate.operator,
21
21
  };
22
22
  props.onColumnFilterChange(newFilter);
23
23
  };
@@ -6,7 +6,7 @@ export declare const useAdaptableFilterWrapper: (columnId: string, handleOnChang
6
6
  qlPredicateDefs: import("@adaptabletools/adaptable/src/parser/src/predicate/types").QlPredicateDef[];
7
7
  columnFilter: ColumnFilter;
8
8
  handleClear: () => LayoutRedux.LayoutColumnFilterClearAction;
9
- handlePredicateChange: (newPredicate: QlPredicate) => void;
9
+ handlePredicateChange: (newPredicate: QlPredicate | null) => void;
10
10
  handleOnChange: (adaptablePredicate: AdaptablePredicate[], logic?: QlLogicalOperator) => void;
11
11
  column: import("../../../types").AdaptableColumn<any>;
12
12
  };
@@ -31,7 +31,7 @@ export const useAdaptableFilterWrapper = (columnId, handleOnChangeOverride) => {
31
31
  ...columnFilter,
32
32
  ColumnId: columnId,
33
33
  Predicates: adaptablePredicate,
34
- PredicatesLogic: logic,
34
+ PredicatesOperator: logic,
35
35
  };
36
36
  if (handleOnChangeOverride) {
37
37
  handleOnChangeOverride(newFilter);
@@ -42,11 +42,15 @@ export const useAdaptableFilterWrapper = (columnId, handleOnChangeOverride) => {
42
42
  : LayoutRedux.LayoutColumnFilterAdd(newFilter));
43
43
  }
44
44
  };
45
- const handleClear = () => dispatch(LayoutRedux.LayoutColumnFilterClear(columnFilter));
45
+ const handleClear = React.useCallback(() => dispatch(LayoutRedux.LayoutColumnFilterClear(columnId)), [columnId]);
46
46
  /**
47
47
  * Converts a QlPredicate to an AdaptablePredicate and dispatches the change.
48
48
  */
49
49
  const handlePredicateChange = React.useCallback((newPredicate) => {
50
+ if (!newPredicate) {
51
+ handleClear();
52
+ return;
53
+ }
50
54
  const newAdaptablePredicates = newPredicate.args.map(mapQlPredicateToAdaptablePredicate);
51
55
  handleOnChange(newAdaptablePredicates, newPredicate.operator);
52
56
  }, [columnId]);
@@ -67,7 +67,7 @@ export const qlPredicateToString = (qlPredicate, predicateDefs) => {
67
67
  return str;
68
68
  };
69
69
  export const isPredicateEmpty = (predicate, predicateDef) => {
70
- if (!predicateDef.inputs || predicateDef.inputs.length === 0) {
70
+ if (!predicateDef?.inputs || predicateDef.inputs.length === 0) {
71
71
  return false;
72
72
  }
73
73
  return (!predicate ||
@@ -76,7 +76,7 @@ export const isPredicateEmpty = (predicate, predicateDef) => {
76
76
  predicate.args.every((arg) => arg == undefined));
77
77
  };
78
78
  export const mapColumnFilterToQlPredicate = (columnFilter, abColumn, qlPredicateDefs, columnFilterOptions) => {
79
- const combinator = columnFilter?.PredicatesLogic ?? 'AND';
79
+ const combinator = columnFilter?.PredicatesOperator ?? 'AND';
80
80
  const qlPredicate = {
81
81
  operator: combinator,
82
82
  args: (columnFilter?.Predicates ?? []).map?.(mapAdaptablePredicateToQlPredicate),
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { StringExtensions } from '../../../Utilities/Extensions/StringExtensions';
3
- import isDatesEqual from 'date-fns/isEqual';
3
+ import { isEqual } from 'date-fns';
4
4
  import { parseDateValue } from '../../../Utilities/Helpers/DateHelper';
5
5
  import join from '../../../components/utils/join';
6
6
  import { Select } from '../../../components/Select';
@@ -13,7 +13,7 @@ export const ColumnValuesSelect = (props) => {
13
13
  let isActive = selectedColumnValues.indexOf(distinctValue.value) >= 0;
14
14
  // special case for date objects, need to check against string values
15
15
  if (!isActive && distinctValue.value && distinctValue.value instanceof Date) {
16
- isActive = selectedColumnValues.some((dateStr) => isDatesEqual(parseDateValue(dateStr), parseDateValue(distinctValue.value)));
16
+ isActive = selectedColumnValues.some((dateStr) => isEqual(parseDateValue(dateStr), parseDateValue(distinctValue.value)));
17
17
  }
18
18
  const columnLabel = distinctValue.label;
19
19
  if (StringExtensions.IsNullOrEmpty(columnLabel)) {
@@ -24,7 +24,7 @@ export const ColumnValuesSelect = (props) => {
24
24
  }
25
25
  return true;
26
26
  });
27
- const component = (React.createElement(Select, { isMulti: true, searchable: true, closeMenuOnSelect: false, size: "small", menuStyle: {
27
+ const component = (React.createElement(Select, { isMulti: true, showHeaderSelectionCheckbox: true, searchable: true, closeMenuOnSelect: false, size: "small", menuStyle: {
28
28
  minWidth: `var(--ab-cmp-select-column-menu-${column.columnId}__min-width, var(--ab-cmp-select-column-menu__min-width, 260px))`,
29
29
  }, ...props.selectProps, options: options, value: value, isLoading: props.isLoading, onChange: props.onChange }));
30
30
  return (React.createElement("div", { className: join(baseClassName, props.isLoading && `${baseClassName}--loading`), onKeyDownCapture: (e) => {
@@ -87,8 +87,8 @@ export const CustomToolbarCmp = (props) => {
87
87
  };
88
88
  export const CustomToolbarWrapper = (props) => {
89
89
  const { api } = useAdaptable();
90
- return (React.createElement(PanelDashboard, { headerText: props.customToolbar.title ? props.customToolbar.title : '', showConfigureActionButton: props.customToolbar.toolbarActions?.find((b) => b == 'Configure') !=
91
- undefined, showCloseActionButton: props.customToolbar.toolbarActions?.find((b) => b == 'Close') != undefined, onConfigure: () => {
90
+ return (React.createElement(PanelDashboard, { headerText: props.customToolbar.title ? props.customToolbar.title : '', showConfigureActionButton: props.customToolbar.toolbarActions?.find((b) => b == 'configure') !=
91
+ undefined, showCloseActionButton: props.customToolbar.toolbarActions?.find((b) => b == 'close') != undefined, onConfigure: () => {
92
92
  const customToolbarConfiguredInfo = {
93
93
  ...api.internalApi.buildBaseContext(),
94
94
  customToolbar: props.customToolbar,
@@ -54,7 +54,10 @@ class DataChangeHistoryPopupComponent extends React.Component {
54
54
  this.props.api.dataChangeHistoryApi.clearDataChangeHistoryEntry(changeToBeUndone);
55
55
  }
56
56
  };
57
- const currentAgGridTheme = this.props.api.themeApi.getAgGridCurrentThemeName();
57
+ const agGridThemeMode = this.props.api.internalApi
58
+ .getAdaptableInstance()
59
+ .agGridThemeAdapter.getAgGridThemeMode();
60
+ const currentAgGridTheme = agGridThemeMode === 'legacy' ? this.props.api.themeApi.getAgGridCurrentThemeName() : '';
58
61
  return (React.createElement(PopupPanel, { headerText: this.props.moduleInfo.FriendlyName, glyphicon: this.props.moduleInfo.Glyph, infoLink: this.props.moduleInfo.HelpPage, infoLinkDisabled: !this.props.api.internalApi.isDocumentationLinksDisplayed() },
59
62
  React.createElement(Flex, { className: "ab-DataChangeHistoryPopup", flexDirection: "column", style: { height: '100%' } },
60
63
  React.createElement(Flex, { style: {