@adaptabletools/adaptable 12.1.6 → 12.1.8-canary.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/base.css +11 -49
  2. package/bundle.cjs.js +106 -106
  3. package/index.css +13 -60
  4. package/package.json +1 -1
  5. package/publishTimestamp.d.ts +1 -1
  6. package/publishTimestamp.js +1 -1
  7. package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -0
  8. package/src/AdaptableOptions/ColumnOptions.d.ts +2 -4
  9. package/src/AdaptableOptions/FilterOptions.d.ts +12 -0
  10. package/src/AdaptableOptions/FinancePluginOptions.d.ts +22 -1
  11. package/src/AdaptableOptions/StateOptions.d.ts +25 -12
  12. package/src/Api/ColumnApi.d.ts +5 -0
  13. package/src/Api/ExportApi.d.ts +5 -0
  14. package/src/Api/FilterApi.d.ts +23 -0
  15. package/src/Api/FlashingCellApi.d.ts +8 -0
  16. package/src/Api/GridApi.d.ts +1 -0
  17. package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -0
  18. package/src/Api/Implementation/ColumnApiImpl.js +5 -1
  19. package/src/Api/Implementation/ExportApiImpl.d.ts +3 -1
  20. package/src/Api/Implementation/ExportApiImpl.js +19 -3
  21. package/src/Api/Implementation/FilterApiImpl.d.ts +5 -0
  22. package/src/Api/Implementation/FilterApiImpl.js +35 -3
  23. package/src/Api/Implementation/FlashingCellApiImpl.d.ts +1 -0
  24. package/src/Api/Implementation/FlashingCellApiImpl.js +4 -0
  25. package/src/Api/Implementation/GridApiImpl.d.ts +1 -0
  26. package/src/Api/Implementation/InternalApiImpl.d.ts +0 -1
  27. package/src/Api/Implementation/InternalApiImpl.js +0 -3
  28. package/src/Api/Implementation/PredicateApiImpl.js +4 -0
  29. package/src/Api/Implementation/QueryLanguageApiImpl.js +9 -1
  30. package/src/Api/InternalApi.d.ts +0 -1
  31. package/src/Api/SystemStatusApi.d.ts +1 -1
  32. package/src/Api/ToolPanelApi.d.ts +1 -1
  33. package/src/PredefinedConfig/CalculatedColumnState.d.ts +2 -2
  34. package/src/PredefinedConfig/Common/AdaptablePredicate.js +30 -10
  35. package/src/PredefinedConfig/Common/AdaptableQuery.js +1 -1
  36. package/src/PredefinedConfig/Common/AggregationColumns.d.ts +6 -0
  37. package/src/PredefinedConfig/Common/AggregationColumns.js +4 -0
  38. package/src/PredefinedConfig/Common/ColumnFilter.d.ts +2 -2
  39. package/src/PredefinedConfig/Common/Enums.d.ts +0 -15
  40. package/src/PredefinedConfig/Common/Enums.js +1 -18
  41. package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +6 -6
  42. package/src/PredefinedConfig/ExportState.d.ts +12 -4
  43. package/src/PredefinedConfig/LayoutState.d.ts +2 -1
  44. package/src/PredefinedConfig/PopupState.d.ts +1 -2
  45. package/src/Redux/ActionsReducers/AlertRedux.d.ts +1 -1
  46. package/src/Redux/ActionsReducers/AlertRedux.js +1 -1
  47. package/src/Redux/ActionsReducers/ConditionalStyleRedux.d.ts +1 -1
  48. package/src/Redux/ActionsReducers/ConditionalStyleRedux.js +1 -1
  49. package/src/Redux/ActionsReducers/CustomSortRedux.d.ts +1 -1
  50. package/src/Redux/ActionsReducers/CustomSortRedux.js +1 -1
  51. package/src/Redux/ActionsReducers/FlashingCellRedux.d.ts +1 -1
  52. package/src/Redux/ActionsReducers/FlashingCellRedux.js +1 -1
  53. package/src/Redux/ActionsReducers/FormatColumnRedux.d.ts +1 -1
  54. package/src/Redux/ActionsReducers/FormatColumnRedux.js +1 -1
  55. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +28 -0
  56. package/src/Redux/ActionsReducers/LayoutRedux.js +80 -2
  57. package/src/Redux/ActionsReducers/PlusMinusRedux.d.ts +1 -1
  58. package/src/Redux/ActionsReducers/PlusMinusRedux.js +1 -1
  59. package/src/Redux/ActionsReducers/PopupRedux.d.ts +0 -2
  60. package/src/Redux/ActionsReducers/PopupRedux.js +1 -28
  61. package/src/Redux/ActionsReducers/ScheduleRedux.d.ts +5 -5
  62. package/src/Redux/ActionsReducers/ScheduleRedux.js +5 -5
  63. package/src/Redux/ActionsReducers/ShortcutRedux.d.ts +1 -1
  64. package/src/Redux/ActionsReducers/ShortcutRedux.js +1 -1
  65. package/src/Redux/ActionsReducers/SystemRedux.d.ts +1 -2
  66. package/src/Redux/ActionsReducers/SystemRedux.js +1 -2
  67. package/src/Redux/Store/AdaptableStore.js +20 -6
  68. package/src/Strategy/AlertModule.d.ts +1 -0
  69. package/src/Strategy/AlertModule.js +20 -0
  70. package/src/Strategy/CalculatedColumnModule.js +2 -2
  71. package/src/Strategy/ExportModule.d.ts +0 -1
  72. package/src/Strategy/ExportModule.js +0 -16
  73. package/src/Strategy/FilterModule.js +6 -0
  74. package/src/Strategy/FlashingCellModule.js +2 -2
  75. package/src/Strategy/Interface/IModule.d.ts +4 -0
  76. package/src/Strategy/LayoutModule.js +20 -20
  77. package/src/Strategy/Utilities/FormatColumn/getFormatColumnStyleViewItems.js +16 -1
  78. package/src/Strategy/Utilities/Layout/getLayoutFilterViewItems.js +15 -11
  79. package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +1 -0
  80. package/src/Utilities/Constants/DocumentationLinkConstants.js +2 -1
  81. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +2 -0
  82. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.d.ts +12 -2
  83. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +30 -66
  84. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +22 -6
  85. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +423 -220
  86. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.d.ts +7 -1
  87. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +23 -7
  88. package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.d.ts +0 -1
  89. package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +6 -54
  90. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +17 -5
  91. package/src/Utilities/Helpers/CalendarHelper.js +10 -7
  92. package/src/Utilities/Helpers/DateHelper.d.ts +0 -26
  93. package/src/Utilities/Helpers/DateHelper.js +2 -32
  94. package/src/Utilities/Interface/MessagePopups.d.ts +0 -4
  95. package/src/Utilities/ObjectFactory.d.ts +6 -4
  96. package/src/Utilities/ObjectFactory.js +30 -17
  97. package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +25 -0
  98. package/src/Utilities/Services/AggregatedScalarLiveValue.js +103 -0
  99. package/src/Utilities/Services/AlertService.d.ts +0 -1
  100. package/src/Utilities/Services/AlertService.js +5 -17
  101. package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +4 -4
  102. package/src/Utilities/Services/CalculatedColumnExpressionService.js +29 -154
  103. package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.d.ts +2 -2
  104. package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +6 -3
  105. package/src/Utilities/Services/QueryLanguageService.d.ts +6 -3
  106. package/src/Utilities/Services/QueryLanguageService.js +23 -6
  107. package/src/Utilities/Services/ReportService.js +47 -46
  108. package/src/View/AdaptableView.js +1 -2
  109. package/src/View/CalculatedColumn/Utilities/getCalculatedColumnSettingsTags.d.ts +2 -0
  110. package/src/View/CalculatedColumn/Utilities/{getCalculatedColumnSettingTags.js → getCalculatedColumnSettingsTags.js} +5 -3
  111. package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.d.ts +10 -0
  112. package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.js +80 -0
  113. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +21 -15
  114. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.d.ts +1 -2
  115. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +10 -53
  116. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +14 -3
  117. package/src/View/Components/AdaptableDateInput/index.js +1 -1
  118. package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +42 -6
  119. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +1 -1
  120. package/src/View/Components/EntityRulesEditor/index.js +26 -5
  121. package/src/View/Components/FilterForm/FilterForm.js +8 -4
  122. package/src/View/Components/FilterForm/ListBoxFilterForm.js +1 -0
  123. package/src/View/Components/FilterForm/QuickFilterForm.js +10 -6
  124. package/src/View/Components/PermittedValuesSelector/PermitedValuesSelector.d.ts +9 -0
  125. package/src/View/Components/PermittedValuesSelector/PermitedValuesSelector.js +28 -0
  126. package/src/View/Components/PermittedValuesSelector/index.d.ts +1 -0
  127. package/src/View/Components/PermittedValuesSelector/index.js +5 -0
  128. package/src/View/Components/Popups/AdaptablePopup/Navigation.js +2 -2
  129. package/src/View/Components/Popups/AdaptableToaster.js +2 -7
  130. package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +0 -1
  131. package/src/View/Components/Popups/WindowPopups/windowFactory.js +1 -4
  132. package/src/View/Export/ExportViewPanel.d.ts +1 -2
  133. package/src/View/Export/ExportViewPanel.js +2 -6
  134. package/src/View/Export/Wizard/ReportColumnTypeWizard.d.ts +1 -2
  135. package/src/View/Export/Wizard/ReportColumnTypeWizard.js +11 -12
  136. package/src/View/Export/Wizard/ReportRowTypeWizard.d.ts +1 -2
  137. package/src/View/Export/Wizard/ReportRowTypeWizard.js +12 -13
  138. package/src/View/Export/Wizard/ReportSettingsWizard.js +1 -2
  139. package/src/View/Filter/FilterViewPanel.js +20 -4
  140. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +1 -1
  141. package/src/View/FreeTextColumn/FreeTextColumnSummary.js +1 -2
  142. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +1 -1
  143. package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +1 -1
  144. package/src/View/Layout/Wizard/{LayoutEditor → Components}/ColumnLabels.d.ts +0 -0
  145. package/src/View/Layout/Wizard/{LayoutEditor → Components}/ColumnLabels.js +0 -0
  146. package/src/View/Layout/Wizard/LayoutWizard.js +1 -0
  147. package/src/View/Layout/Wizard/sections/AggregationsSection.d.ts +1 -0
  148. package/src/View/Layout/Wizard/sections/AggregationsSection.js +69 -8
  149. package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
  150. package/src/View/Query/QueryViewPanel.js +1 -1
  151. package/src/agGrid/Adaptable.d.ts +11 -3
  152. package/src/agGrid/Adaptable.js +224 -150
  153. package/src/agGrid/agGridHelper.d.ts +1 -0
  154. package/src/agGrid/agGridHelper.js +5 -3
  155. package/src/agGrid/agGridMenuHelper.d.ts +1 -0
  156. package/src/agGrid/agGridMenuHelper.js +4 -2
  157. package/src/agGrid/weightedAverage.d.ts +6 -0
  158. package/src/agGrid/weightedAverage.js +66 -0
  159. package/src/bundle-dependencies/bundles/react-toastify/index.js +1 -1
  160. package/src/components/ExpressionEditor/BaseEditorInput.d.ts +1 -0
  161. package/src/components/ExpressionEditor/BaseEditorInput.js +2 -3
  162. package/src/components/ExpressionEditor/EditorInput.d.ts +1 -1
  163. package/src/components/ExpressionEditor/EditorInput.js +24 -4
  164. package/src/components/ExpressionEditor/{EditorInputReactive.d.ts → EditorInputWithWhereClause.d.ts} +3 -3
  165. package/src/components/ExpressionEditor/{EditorInputReactive.js → EditorInputWithWhereClause.js} +6 -5
  166. package/src/components/ExpressionEditor/editorButtonsAggregatedBoolean.d.ts +2 -0
  167. package/src/components/ExpressionEditor/{editorButtonsReactive.js → editorButtonsAggregatedBoolean.js} +22 -37
  168. package/src/components/ExpressionEditor/editorButtonsAggregatedScalar.js +5 -10
  169. package/src/components/ExpressionEditor/editorButtonsCumulativeAggregatedScalar.d.ts +2 -0
  170. package/src/components/ExpressionEditor/editorButtonsCumulativeAggregatedScalar.js +50 -0
  171. package/src/components/ExpressionEditor/editorButtonsObservable.d.ts +2 -0
  172. package/src/components/ExpressionEditor/editorButtonsObservable.js +40 -0
  173. package/src/components/ExpressionEditor/index.d.ts +1 -1
  174. package/src/components/ExpressionEditor/index.js +26 -5
  175. package/src/metamodel/adaptable.metamodel.d.ts +55 -1
  176. package/src/metamodel/adaptable.metamodel.js +1 -1
  177. package/src/types.d.ts +3 -3
  178. package/version.d.ts +1 -1
  179. package/version.js +1 -1
  180. package/src/View/CalculatedColumn/Utilities/getCalculatedColumnSettingTags.d.ts +0 -2
  181. package/src/View/Layout/LayoutEditorStandalonePopup.d.ts +0 -3
  182. package/src/View/Layout/LayoutEditorStandalonePopup.js +0 -78
  183. package/src/View/Layout/Wizard/LayoutEditor/ColumnList.d.ts +0 -27
  184. package/src/View/Layout/Wizard/LayoutEditor/ColumnList.js +0 -86
  185. package/src/View/Layout/Wizard/LayoutEditor/ColumnSortList.d.ts +0 -16
  186. package/src/View/Layout/Wizard/LayoutEditor/ColumnSortList.js +0 -89
  187. package/src/View/Layout/Wizard/LayoutEditor/PivotList.d.ts +0 -15
  188. package/src/View/Layout/Wizard/LayoutEditor/PivotList.js +0 -70
  189. package/src/View/Layout/Wizard/LayoutEditor/RowGroupsList.d.ts +0 -15
  190. package/src/View/Layout/Wizard/LayoutEditor/RowGroupsList.js +0 -70
  191. package/src/View/Layout/Wizard/LayoutEditor/droppableIds.d.ts +0 -7
  192. package/src/View/Layout/Wizard/LayoutEditor/droppableIds.js +0 -11
  193. package/src/View/Layout/Wizard/LayoutEditor/getItemStyle.d.ts +0 -6
  194. package/src/View/Layout/Wizard/LayoutEditor/getItemStyle.js +0 -26
  195. package/src/View/Layout/Wizard/LayoutEditor/index.d.ts +0 -9
  196. package/src/View/Layout/Wizard/LayoutEditor/index.js +0 -367
  197. package/src/View/Layout/Wizard/LayoutEditor/reducer.d.ts +0 -28
  198. package/src/View/Layout/Wizard/LayoutEditor/reducer.js +0 -46
  199. package/src/View/Layout/Wizard/LayoutEditor/utils.d.ts +0 -10
  200. package/src/View/Layout/Wizard/LayoutEditor/utils.js +0 -14
  201. package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +0 -30
  202. package/src/View/Layout/Wizard/LayoutEditorWizard.js +0 -132
  203. package/src/components/ExpressionEditor/editorButtonsReactive.d.ts +0 -2
@@ -65,7 +65,6 @@ export interface InternalApi {
65
65
  }): void;
66
66
  isDocumentationLinksDisplayed(): boolean;
67
67
  hidePopupScreen(): void;
68
- hidePopupAlert(): void;
69
68
  setColumns(columns: AdaptableColumn[]): void;
70
69
  setSettingPanelModuleMenuItems(menuItems: AdaptableMenuItem[]): void;
71
70
  setModuleButtonMenuItems(menuItems: AdaptableMenuItem[]): void;
@@ -24,7 +24,7 @@ export interface SystemStatusApi {
24
24
  */
25
25
  setInfoSystemStatus(statusMessage: string, furtherInformation?: string): void;
26
26
  /**
27
- * Opens System Status popup
27
+ * Opens Settings Panel with System Status section selected and visible
28
28
  */
29
29
  showSystemStatusPopup(): void;
30
30
  /**
@@ -11,7 +11,7 @@ export interface ToolPanelApi {
11
11
  */
12
12
  getToolPanelState(): ToolPanelState;
13
13
  /**
14
- * Opens the Tool Panel popup
14
+ * Opens Settings Panel with Tool Panel section selected and visible
15
15
  */
16
16
  showToolPanelPopup(): void;
17
17
  /**
@@ -31,7 +31,7 @@ export interface CalculatedColumn extends AdaptableObject {
31
31
  /**
32
32
  * Scalar/AggregatedScalar Query used by AdapTableQL to evaluate Column's value
33
33
  */
34
- Query?: AdaptableCalculatedColumnQuery;
34
+ Query: AdaptableCalculatedColumnQuery;
35
35
  }
36
36
  /**
37
37
  * Set of optional properties that define a Calculated Column's behaviour
@@ -40,7 +40,7 @@ export interface CalculatedColumnSettings extends SpecialColumnSettings {
40
40
  /**
41
41
  * Expression's return value DataType; inferred by AdapTable but settable by User
42
42
  */
43
- DataType?: 'String' | 'Number' | 'Boolean' | 'Date';
43
+ DataType: 'String' | 'Number' | 'Boolean' | 'Date';
44
44
  /**
45
45
  * Show underlying Expression as ToolTip when hovering over a cell
46
46
  * @defaultValue false
@@ -16,6 +16,7 @@ const isAfter_1 = tslib_1.__importDefault(require("date-fns/isAfter"));
16
16
  const isBefore_1 = tslib_1.__importDefault(require("date-fns/isBefore"));
17
17
  const isSameDay_1 = tslib_1.__importDefault(require("date-fns/isSameDay"));
18
18
  const CalendarHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/CalendarHelper"));
19
+ const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
19
20
  const DateHelper_1 = require("../../Utilities/Helpers/DateHelper");
20
21
  /**
21
22
  * Array of Predicate Defs which are shipped by AdapTable
@@ -26,7 +27,7 @@ exports.SystemPredicateDefs = [
26
27
  label: 'Values',
27
28
  icon: { text: 'IN' },
28
29
  columnScope: { DataTypes: ['String', 'Number', 'Date'] },
29
- moduleScope: ['filter'],
30
+ moduleScope: ['filter', 'conditionalstyle', 'alert'],
30
31
  handler: ({ inputs, column, value }) => {
31
32
  if (inputs.length === 0) {
32
33
  return true;
@@ -52,7 +53,7 @@ exports.SystemPredicateDefs = [
52
53
  label: 'Exclude Values',
53
54
  icon: { text: '!IN' },
54
55
  columnScope: { DataTypes: ['String', 'Number', 'Date'] },
55
- moduleScope: ['filter'],
56
+ moduleScope: ['filter', 'conditionalstyle', 'alert'],
56
57
  handler: ({ inputs, column, value }) => {
57
58
  // basically negation of IN
58
59
  if (inputs.length === 0) {
@@ -134,7 +135,12 @@ exports.SystemPredicateDefs = [
134
135
  icon: { text: '=0' },
135
136
  columnScope: { DataTypes: ['Number'] },
136
137
  moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
137
- handler: ({ value }) => Number(value) == 0,
138
+ handler: ({ value }) => {
139
+ if (typeof value === 'string' && !StringExtensions_1.default.IsNumeric(value)) {
140
+ return false;
141
+ }
142
+ return Number(value) === 0;
143
+ },
138
144
  },
139
145
  {
140
146
  id: 'Equals',
@@ -143,7 +149,14 @@ exports.SystemPredicateDefs = [
143
149
  columnScope: { DataTypes: ['Number'] },
144
150
  moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
145
151
  inputs: [{ type: 'number' }],
146
- handler: ({ value, inputs }) => Number(value) === Number(inputs[0]),
152
+ handler: ({ value, inputs }) => {
153
+ const input = inputs[0];
154
+ if ((typeof value === 'string' && !StringExtensions_1.default.IsNumeric(value)) ||
155
+ (typeof input === 'string' && !StringExtensions_1.default.IsNumeric(input))) {
156
+ return false;
157
+ }
158
+ return Number(value) === Number(inputs[0]);
159
+ },
147
160
  toString: ({ inputs }) => `= ${inputs[0]}`,
148
161
  shortcuts: ['='],
149
162
  },
@@ -154,7 +167,14 @@ exports.SystemPredicateDefs = [
154
167
  columnScope: { DataTypes: ['Number'] },
155
168
  moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
156
169
  inputs: [{ type: 'number' }],
157
- handler: ({ value, inputs }) => Number(value) !== Number(inputs[0]),
170
+ handler: ({ value, inputs }) => {
171
+ const input = inputs[0];
172
+ if ((typeof value === 'string' && !StringExtensions_1.default.IsNumeric(value)) ||
173
+ (typeof input === 'string' && !StringExtensions_1.default.IsNumeric(input))) {
174
+ return false;
175
+ }
176
+ return Number(value) !== Number(inputs[0]);
177
+ },
158
178
  toString: ({ inputs }) => `!= ${inputs[0]}`,
159
179
  shortcuts: ['!='],
160
180
  },
@@ -397,7 +417,7 @@ exports.SystemPredicateDefs = [
397
417
  columnScope: { DataTypes: ['Date'] },
398
418
  moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
399
419
  inputs: [{ type: 'date' }],
400
- handler: ({ value, inputs }) => isAfter_1.default(DateHelper_1.parseFilterValueDate(value), DateHelper_1.parseFilterInputDate(inputs[0])),
420
+ handler: ({ value, inputs }) => isAfter_1.default(DateHelper_1.parseDateValue(value), DateHelper_1.parseDateValue(inputs[0])),
401
421
  toString: ({ inputs }) => `> ${inputs[0]}`,
402
422
  },
403
423
  {
@@ -407,7 +427,7 @@ exports.SystemPredicateDefs = [
407
427
  columnScope: { DataTypes: ['Date'] },
408
428
  moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
409
429
  inputs: [{ type: 'date' }],
410
- handler: ({ value, inputs }) => isBefore_1.default(DateHelper_1.parseFilterValueDate(value), DateHelper_1.parseFilterInputDate(inputs[0])),
430
+ handler: ({ value, inputs }) => isBefore_1.default(DateHelper_1.parseDateValue(value), DateHelper_1.parseDateValue(inputs[0])),
411
431
  toString: ({ inputs }) => `< ${inputs[0]}`,
412
432
  },
413
433
  {
@@ -417,7 +437,7 @@ exports.SystemPredicateDefs = [
417
437
  columnScope: { DataTypes: ['Date'] },
418
438
  moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
419
439
  inputs: [{ type: 'date' }],
420
- handler: ({ value, inputs }) => isSameDay_1.default(DateHelper_1.parseFilterValueDate(value), DateHelper_1.parseFilterInputDate(inputs[0])),
440
+ handler: ({ value, inputs }) => isSameDay_1.default(DateHelper_1.parseDateValue(value), DateHelper_1.parseDateValue(inputs[0])),
421
441
  toString: ({ inputs }) => `= ${inputs[0]}`,
422
442
  },
423
443
  {
@@ -427,7 +447,7 @@ exports.SystemPredicateDefs = [
427
447
  columnScope: { DataTypes: ['Date'] },
428
448
  moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
429
449
  inputs: [{ type: 'date' }],
430
- handler: ({ value, inputs }) => !isSameDay_1.default(DateHelper_1.parseFilterValueDate(value), DateHelper_1.parseFilterInputDate(inputs[0])),
450
+ handler: ({ value, inputs }) => !isSameDay_1.default(DateHelper_1.parseDateValue(value), DateHelper_1.parseDateValue(inputs[0])),
431
451
  toString: ({ inputs }) => `!= ${inputs[0]}`,
432
452
  },
433
453
  {
@@ -436,7 +456,7 @@ exports.SystemPredicateDefs = [
436
456
  icon: { name: 'calendar' },
437
457
  columnScope: { DataTypes: ['Date'] },
438
458
  moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
439
- handler: ({ value, api }) => isSameDay_1.default(DateHelper_1.parseFilterValueDate(value), CalendarHelper_1.default.getNextWorkingDay()),
459
+ handler: ({ value, api }) => isSameDay_1.default(DateHelper_1.parseDateValue(value), CalendarHelper_1.default.getNextWorkingDay()),
440
460
  },
441
461
  {
442
462
  id: 'LastWorkDay',
@@ -2,6 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isReactiveQuery = void 0;
4
4
  const isReactiveQuery = (query) => {
5
- return !!query.ObservableExpression || !!query.AggregatedBooleanExpression;
5
+ return !!query.ObservableExpression;
6
6
  };
7
7
  exports.isReactiveQuery = isReactiveQuery;
@@ -0,0 +1,6 @@
1
+ export declare const WEIGHTED_AVERAGE_AGG_FN_NAME = "weightedAvg";
2
+ export interface WeightedAverageAggregation {
3
+ type: 'weightedAverage';
4
+ weightedColumnId: string;
5
+ }
6
+ export declare type AggregationColumns = Record<string, string | true | WeightedAverageAggregation>;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WEIGHTED_AVERAGE_AGG_FN_NAME = void 0;
4
+ exports.WEIGHTED_AVERAGE_AGG_FN_NAME = 'weightedAvg';
@@ -1,9 +1,9 @@
1
- import { AdaptableObject, AdaptablePredicate } from '../../types';
1
+ import { SuspendableObject, AdaptablePredicate } from '../../types';
2
2
  import { TypeHint } from './Types';
3
3
  /**
4
4
  * Defines a Filter applied on a Column using a Predicate
5
5
  */
6
- export interface ColumnFilter extends AdaptableObject {
6
+ export interface ColumnFilter extends SuspendableObject {
7
7
  /**
8
8
  * Column where Filter should be applied
9
9
  */
@@ -13,21 +13,6 @@ export declare enum MathOperation {
13
13
  Multiply = "Multiply",
14
14
  Divide = "Divide"
15
15
  }
16
- export declare enum ReportColumnScope {
17
- AllColumns = "AllColumns",
18
- VisibleColumns = "VisibleColumns",
19
- SelectedColumns = "SelectedColumns",
20
- ScopeColumns = "ScopeColumns",
21
- CustomColumns = "CustomColumns"
22
- }
23
- export declare enum ReportRowScope {
24
- AllRows = "AllRows",
25
- VisibleRows = "VisibleRows",
26
- SelectedCellRows = "SelectedCellRows",
27
- SelectedRows = "SelectedRows",
28
- ExpressionRows = "ExpressionRows",
29
- CustomRows = "CustomRows"
30
- }
31
16
  export declare enum ExportDestination {
32
17
  Excel = "Excel",
33
18
  CSV = "CSV",
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  // General Enums
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.ChangeDirection = exports.FilterOnDataChangeOptions = exports.SummaryOperation = exports.StatusColour = exports.ColumnMenuTab = exports.FontSize = exports.FontStyle = exports.FontWeight = exports.SelectionMode = exports.SortOrder = exports.ScheduleType = exports.ExportDestination = exports.ReportRowScope = exports.ReportColumnScope = exports.MathOperation = exports.DataType = void 0;
4
+ exports.ChangeDirection = exports.FilterOnDataChangeOptions = exports.SummaryOperation = exports.StatusColour = exports.ColumnMenuTab = exports.FontSize = exports.FontStyle = exports.FontWeight = exports.SelectionMode = exports.SortOrder = exports.ScheduleType = exports.ExportDestination = exports.MathOperation = exports.DataType = void 0;
5
5
  var DataType;
6
6
  (function (DataType) {
7
7
  DataType["String"] = "String";
@@ -20,23 +20,6 @@ var MathOperation;
20
20
  MathOperation["Divide"] = "Divide";
21
21
  })(MathOperation = exports.MathOperation || (exports.MathOperation = {}));
22
22
  // Enums used in Strategies
23
- var ReportColumnScope;
24
- (function (ReportColumnScope) {
25
- ReportColumnScope["AllColumns"] = "AllColumns";
26
- ReportColumnScope["VisibleColumns"] = "VisibleColumns";
27
- ReportColumnScope["SelectedColumns"] = "SelectedColumns";
28
- ReportColumnScope["ScopeColumns"] = "ScopeColumns";
29
- ReportColumnScope["CustomColumns"] = "CustomColumns";
30
- })(ReportColumnScope = exports.ReportColumnScope || (exports.ReportColumnScope = {}));
31
- var ReportRowScope;
32
- (function (ReportRowScope) {
33
- ReportRowScope["AllRows"] = "AllRows";
34
- ReportRowScope["VisibleRows"] = "VisibleRows";
35
- ReportRowScope["SelectedCellRows"] = "SelectedCellRows";
36
- ReportRowScope["SelectedRows"] = "SelectedRows";
37
- ReportRowScope["ExpressionRows"] = "ExpressionRows";
38
- ReportRowScope["CustomRows"] = "CustomRows";
39
- })(ReportRowScope = exports.ReportRowScope || (exports.ReportRowScope = {}));
40
23
  var ExportDestination;
41
24
  (function (ExportDestination) {
42
25
  ExportDestination["Excel"] = "Excel";
@@ -8,32 +8,32 @@ export interface SpecialColumnSettings {
8
8
  Width?: number;
9
9
  /**
10
10
  * Whether Column is filterable
11
- * @defaultValue true
11
+ * @defaultValue false
12
12
  */
13
13
  Filterable?: boolean;
14
14
  /**
15
15
  * Whether Column can be resized (by dragging column header edges)
16
- * @defaultValue true
16
+ * @defaultValue false
17
17
  */
18
18
  Resizable?: boolean;
19
19
  /**
20
20
  * Whether Column can be grouped
21
- * @defaultValue true
21
+ * @defaultValue false
22
22
  */
23
23
  Groupable?: boolean;
24
24
  /**
25
25
  * Whether Column is sortable
26
- * @defaultValue true
26
+ * @defaultValue false
27
27
  */
28
28
  Sortable?: boolean;
29
29
  /**
30
30
  * Whether Column can be used when grid is in pivot mode
31
- * @defaultValue true
31
+ * @defaultValue false
32
32
  */
33
33
  Pivotable?: boolean;
34
34
  /**
35
35
  * Whether Column can be used in an aggregation when grouping
36
- * @defaultValue true
36
+ * @defaultValue false
37
37
  */
38
38
  Aggregatable?: boolean;
39
39
  /**
@@ -29,13 +29,13 @@ export interface Report extends AdaptableObject {
29
29
  */
30
30
  Name: SystemReportName | string;
31
31
  /**
32
- * Columns to display: options are 'AllColumns', 'VisibleColumns', 'SelectedColumns', 'ScopeColumns', 'CustomColumns'
32
+ * Columns to display: options are 'AllColumns', 'VisibleColumns', 'SelectedColumns', 'ScopeColumns'
33
33
  */
34
- ReportColumnScope: 'AllColumns' | 'VisibleColumns' | 'SelectedColumns' | 'ScopeColumns' | 'CustomColumns';
34
+ ReportColumnScope: ReportColumnScope;
35
35
  /**
36
- * Rows to export: options are 'AllRows', 'VisibleRows', 'SelectedCellRows', 'SelectedRows', 'ExpressionRows', 'CustomRows'
36
+ * Rows to export: options are 'AllRows', 'VisibleRows', 'SelectedCellRows', 'SelectedRows', 'ExpressionRows'
37
37
  */
38
- ReportRowScope: 'AllRows' | 'VisibleRows' | 'SelectedCellRows' | 'SelectedRows' | 'ExpressionRows' | 'CustomRows';
38
+ ReportRowScope: ReportRowScope;
39
39
  /**
40
40
  * Columns Scope; only required if `ReportColumnScope` is 'ScopeColumns'
41
41
  */
@@ -79,6 +79,14 @@ export interface ReportData {
79
79
  * Names of Reports provided by AdapTable
80
80
  */
81
81
  export declare type SystemReportName = 'Visual Data' | 'All Data' | 'Current Data' | 'Selected Cells' | 'Selected Rows';
82
+ /**
83
+ * Columns to be included in a Report
84
+ */
85
+ export declare type ReportColumnScope = 'AllColumns' | 'VisibleColumns' | 'SelectedColumns' | 'ScopeColumns';
86
+ /**
87
+ * AG Grid Row Data to be included in a Report
88
+ */
89
+ export declare type ReportRowScope = 'AllRows' | 'VisibleRows' | 'SelectedCellRows' | 'SelectedRows' | 'ExpressionRows';
82
90
  /**
83
91
  * Array containing all System Report names
84
92
  */
@@ -2,6 +2,7 @@ import { ConfigState } from './ConfigState';
2
2
  import { AdaptableObject } from './Common/AdaptableObject';
3
3
  import { ColumnSort } from './Common/ColumnSort';
4
4
  import { ColumnFilter } from '../types';
5
+ import { AggregationColumns } from './Common/AggregationColumns';
5
6
  /**
6
7
  * Predefined Configuration for the Layout Module
7
8
  */
@@ -52,7 +53,7 @@ export interface Layout extends AdaptableObject {
52
53
  /**
53
54
  * Columns showing aggregated values in grouped rows; first value in record is Column name and second is either the agg func (e.g. sum, avg etc.) or 'true' (to use default aggfunc)
54
55
  */
55
- AggregationColumns?: Record<string, string | true>;
56
+ AggregationColumns?: AggregationColumns;
56
57
  /**
57
58
  * Whether pivoting should be enabled in the Grid when this Layout loads
58
59
  */
@@ -1,4 +1,4 @@
1
- import { ScreenPopup, AlertPopup, ConfirmationPopup, PromptPopup, LoadingPopup, WindowPopup, FormPopup } from '../Utilities/Interface/MessagePopups';
1
+ import { ScreenPopup, ConfirmationPopup, PromptPopup, LoadingPopup, WindowPopup, FormPopup } from '../Utilities/Interface/MessagePopups';
2
2
  import { InternalState } from './InternalState';
3
3
  /**
4
4
  * Internal state to manage open popups - NOT persisted by Redux
@@ -7,7 +7,6 @@ export interface PopupState extends InternalState {
7
7
  ScreenPopup: ScreenPopup;
8
8
  WindowPopup: WindowPopup;
9
9
  FormPopup: FormPopup;
10
- AlertPopup: AlertPopup;
11
10
  ConfirmationPopup: ConfirmationPopup;
12
11
  PromptPopup: PromptPopup;
13
12
  LoadingPopup: LoadingPopup;
@@ -17,7 +17,7 @@ export declare const ALERT_DEFINITION_DELETE = "ALERT_DEFINITION_DELETE";
17
17
  */
18
18
  export declare const ALERT_DEFINITION_SUSPEND = "ALERT_DEFINITION_SUSPEND";
19
19
  /**
20
- * @ReduxAction Alert Definition is un-suspended, or activated
20
+ * @ReduxAction Alert Definition is unsuspended, or activated
21
21
  */
22
22
  export declare const ALERT_DEFINITION_UNSUSPEND = "ALERT_DEFINITION_UNSUSPEND";
23
23
  export declare const ALERT_CLEAR_FLASHING_CELLS = "ALERT_CLEAR_FLASHING_CELLS";
@@ -22,7 +22,7 @@ exports.ALERT_DEFINITION_DELETE = 'ALERT_DEFINITION_DELETE';
22
22
  */
23
23
  exports.ALERT_DEFINITION_SUSPEND = 'ALERT_DEFINITION_SUSPEND';
24
24
  /**
25
- * @ReduxAction Alert Definition is un-suspended, or activated
25
+ * @ReduxAction Alert Definition is unsuspended, or activated
26
26
  */
27
27
  exports.ALERT_DEFINITION_UNSUSPEND = 'ALERT_DEFINITION_UNSUSPEND';
28
28
  exports.ALERT_CLEAR_FLASHING_CELLS = 'ALERT_CLEAR_FLASHING_CELLS';
@@ -21,7 +21,7 @@ export declare const CONDITIONAL_STYLE_READY = "CONDITIONAL_STYLE_READY";
21
21
  */
22
22
  export declare const CONDITIONAL_STYLE_SUSPEND = "CONDITIONAL_STYLE_SUSPEND";
23
23
  /**
24
- * @ReduxAction Conditional Style is un-suspended, or activated
24
+ * @ReduxAction Conditional Style is unsuspended, or activated
25
25
  */
26
26
  export declare const CONDITIONAL_STYLE_UNSUSPEND = "CONDITIONAL_STYLE_UNSUSPEND";
27
27
  export interface ConditionalStyleAction extends Redux.Action {
@@ -26,7 +26,7 @@ exports.CONDITIONAL_STYLE_READY = 'CONDITIONAL_STYLE_READY';
26
26
  */
27
27
  exports.CONDITIONAL_STYLE_SUSPEND = 'CONDITIONAL_STYLE_SUSPEND';
28
28
  /**
29
- * @ReduxAction Conditional Style is un-suspended, or activated
29
+ * @ReduxAction Conditional Style is unsuspended, or activated
30
30
  */
31
31
  exports.CONDITIONAL_STYLE_UNSUSPEND = 'CONDITIONAL_STYLE_UNSUSPEND';
32
32
  const ConditionalStyleAdd = (conditionalStyle) => ({
@@ -17,7 +17,7 @@ export declare const CUSTOM_SORT_DELETE = "CUSTOM_SORT_DELETE";
17
17
  */
18
18
  export declare const CUSTOM_SORT_SUSPEND = "CUSTOM_SORT_SUSPEND";
19
19
  /**
20
- * @ReduxAction A Custom Sort has been un-suspended (activated)
20
+ * @ReduxAction A Custom Sort has been unsuspended (activated)
21
21
  */
22
22
  export declare const CUSTOM_SORT_UNSUSPEND = "CUSTOM_SORT_UNSUSPEND";
23
23
  /**
@@ -22,7 +22,7 @@ exports.CUSTOM_SORT_DELETE = 'CUSTOM_SORT_DELETE';
22
22
  */
23
23
  exports.CUSTOM_SORT_SUSPEND = 'CUSTOM_SORT_SUSPEND';
24
24
  /**
25
- * @ReduxAction A Custom Sort has been un-suspended (activated)
25
+ * @ReduxAction A Custom Sort has been unsuspended (activated)
26
26
  */
27
27
  exports.CUSTOM_SORT_UNSUSPEND = 'CUSTOM_SORT_UNSUSPEND';
28
28
  /**
@@ -18,7 +18,7 @@ export declare const FLASHING_CELL_DEFINITION_DELETE = "FLASHING_CELL_DEFINITION
18
18
  */
19
19
  export declare const FLASHING_CELL_DEFINITION_SUSPEND = "FLASHING_CELL_DEFINITION_SUSPEND";
20
20
  /**
21
- * @ReduxAction Flashing Cell Definition is un-suspended, or activated
21
+ * @ReduxAction Flashing Cell Definition is unsuspended, or activated
22
22
  */
23
23
  export declare const FLASHING_CELL_DEFINITION_UNSUSPEND = "FLASHING_CELL_DEFINITION_UNSUSPEND";
24
24
  /**
@@ -21,7 +21,7 @@ exports.FLASHING_CELL_DEFINITION_DELETE = 'FLASHING_CELL_DEFINITION_DELETE';
21
21
  */
22
22
  exports.FLASHING_CELL_DEFINITION_SUSPEND = 'FLASHING_CELL_DEFINITION_SUSPEND';
23
23
  /**
24
- * @ReduxAction Flashing Cell Definition is un-suspended, or activated
24
+ * @ReduxAction Flashing Cell Definition is unsuspended, or activated
25
25
  */
26
26
  exports.FLASHING_CELL_DEFINITION_UNSUSPEND = 'FLASHING_CELL_DEFINITION_UNSUSPEND';
27
27
  /**
@@ -21,7 +21,7 @@ export declare const FORMAT_COLUMN_READY = "FORMAT_COLUMN_READY";
21
21
  */
22
22
  export declare const FORMAT_COLUMN_SUSPEND = "FORMAT_COLUMN_SUSPEND";
23
23
  /**
24
- * @ReduxAction FormatColumn Module is un-suspended, or activated
24
+ * @ReduxAction FormatColumn Module is unsuspended, or activated
25
25
  */
26
26
  export declare const FORMAT_COLUMN_UNSUSPEND = "FORMAT_COLUMN_UNSUSPEND";
27
27
  export interface FormatColumnAction extends Redux.Action {
@@ -26,7 +26,7 @@ exports.FORMAT_COLUMN_READY = 'FORMAT_COLUMN_READY';
26
26
  */
27
27
  exports.FORMAT_COLUMN_SUSPEND = 'FORMAT_COLUMN_SUSPEND';
28
28
  /**
29
- * @ReduxAction FormatColumn Module is un-suspended, or activated
29
+ * @ReduxAction FormatColumn Module is unsuspended, or activated
30
30
  */
31
31
  exports.FORMAT_COLUMN_UNSUSPEND = 'FORMAT_COLUMN_UNSUSPEND';
32
32
  const FormatColumnAdd = (formatColumn) => ({
@@ -46,6 +46,22 @@ export declare const LAYOUT_COLUMN_FILTER_CLEAR_ALL = "LAYOUT_COLUMN_FILTER_CLEA
46
46
  * @ReduxAction A Column Filter has been cleared
47
47
  */
48
48
  export declare const LAYOUT_COLUMN_FILTER_CLEAR = "LAYOUT_COLUMN_FILTER_CLEAR";
49
+ /**
50
+ * @ReduxAction Filter is suspended
51
+ */
52
+ export declare const LAYOUT_COLUMN_FILTER_SUSPEND = "LAYOUT_COLUMN_FILTER_SUSPEND";
53
+ /**
54
+ * @ReduxAction Filter is un-suspended, or activated
55
+ */
56
+ export declare const LAYOUT_COLUMN_FILTER_UNSUSPEND = "LAYOUT_COLUMN_FILTER_UNSUSPEND";
57
+ /**
58
+ * @ReduxAction Filter is suspended
59
+ */
60
+ export declare const LAYOUT_COLUMN_FILTER_SUSPEND_ALL = "LAYOUT_COLUMN_FILTER_SUSPEND_ALL";
61
+ /**
62
+ * @ReduxAction Filter is un-suspended, or activated
63
+ */
64
+ export declare const LAYOUT_COLUMN_FILTER_UNSUSPEND_ALL = "LAYOUT_COLUMN_FILTER_UNSUSPEND_ALL";
49
65
  export interface LayoutColumnFilterAction extends Redux.Action {
50
66
  columnFilter: ColumnFilter;
51
67
  }
@@ -59,11 +75,23 @@ export interface LayoutColumnFilterClearAction extends LayoutColumnFilterAction
59
75
  }
60
76
  export interface LayoutColumnFilterClearAllAction extends Redux.Action {
61
77
  }
78
+ export interface LayoutColumnFilterSuspendAction extends LayoutColumnFilterAction {
79
+ }
80
+ export interface LayoutColumnFilterSuspendAllAction extends Redux.Action {
81
+ }
82
+ export interface LayoutColumnFilterUnSuspendAction extends LayoutColumnFilterAction {
83
+ }
84
+ export interface LayoutColumnFilterUnSuspendAllAction extends Redux.Action {
85
+ }
62
86
  export declare const LayoutColumnFilterAdd: (columnFilter: ColumnFilter) => LayoutColumnFilterAddAction;
63
87
  export declare const LayoutColumnFilterEdit: (columnFilter: ColumnFilter) => LayoutColumnFilterEditAction;
64
88
  export declare const LayoutColumnFilterSet: (columnFilter: ColumnFilter) => LayoutColumnFilterSetAction;
65
89
  export declare const LayoutColumnFilterClearAll: () => LayoutColumnFilterClearAllAction;
66
90
  export declare const LayoutColumnFilterClear: (columnFilter: ColumnFilter) => LayoutColumnFilterClearAction;
91
+ export declare const LayoutColumnFilterSuspend: (columnFilter: ColumnFilter) => LayoutColumnFilterSuspendAction;
92
+ export declare const LayoutColumnFilterUnSuspend: (columnFilter: ColumnFilter) => LayoutColumnFilterUnSuspendAction;
93
+ export declare const LayoutColumnFilterSuspendAll: () => LayoutColumnFilterSuspendAllAction;
94
+ export declare const LayoutColumnFilterUnSuspendAll: () => LayoutColumnFilterUnSuspendAllAction;
67
95
  /**
68
96
  * @ReduxAction A new caption / header has been set for a Column in the Layout
69
97
  */
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LayoutReducer = exports.getColumnFilterSelector = exports.LayoutReady = exports.LayoutSelect = exports.LayoutRemoveColumn = exports.LayoutSetColumnCaption = exports.LayoutSave = exports.LayoutDelete = exports.LayoutAdd = exports.LAYOUT_READY = exports.LAYOUT_SET_COLUMN_CAPTION = exports.LayoutColumnFilterClear = exports.LayoutColumnFilterClearAll = exports.LayoutColumnFilterSet = exports.LayoutColumnFilterEdit = exports.LayoutColumnFilterAdd = exports.LAYOUT_COLUMN_FILTER_CLEAR = exports.LAYOUT_COLUMN_FILTER_CLEAR_ALL = exports.LAYOUT_COLUMN_FILTER_SET = exports.LAYOUT_COLUMN_FILTER_EDIT = exports.LAYOUT_COLUMN_FILTER_ADD = exports.LAYOUT_REMOVE_COLUMN = exports.LAYOUT_SAVE = exports.LAYOUT_SELECT = exports.LAYOUT_DELETE = exports.LAYOUT_EDIT = exports.LAYOUT_ADD = void 0;
3
+ exports.LayoutReducer = exports.getColumnFilterSelector = exports.LayoutReady = exports.LayoutSelect = exports.LayoutRemoveColumn = exports.LayoutSetColumnCaption = exports.LayoutSave = exports.LayoutDelete = exports.LayoutAdd = exports.LAYOUT_READY = exports.LAYOUT_SET_COLUMN_CAPTION = exports.LayoutColumnFilterUnSuspendAll = exports.LayoutColumnFilterSuspendAll = exports.LayoutColumnFilterUnSuspend = exports.LayoutColumnFilterSuspend = exports.LayoutColumnFilterClear = exports.LayoutColumnFilterClearAll = exports.LayoutColumnFilterSet = exports.LayoutColumnFilterEdit = exports.LayoutColumnFilterAdd = exports.LAYOUT_COLUMN_FILTER_UNSUSPEND_ALL = exports.LAYOUT_COLUMN_FILTER_SUSPEND_ALL = exports.LAYOUT_COLUMN_FILTER_UNSUSPEND = exports.LAYOUT_COLUMN_FILTER_SUSPEND = exports.LAYOUT_COLUMN_FILTER_CLEAR = exports.LAYOUT_COLUMN_FILTER_CLEAR_ALL = exports.LAYOUT_COLUMN_FILTER_SET = exports.LAYOUT_COLUMN_FILTER_EDIT = exports.LAYOUT_COLUMN_FILTER_ADD = exports.LAYOUT_REMOVE_COLUMN = exports.LAYOUT_SAVE = exports.LAYOUT_SELECT = exports.LAYOUT_DELETE = exports.LAYOUT_EDIT = exports.LAYOUT_ADD = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
6
6
  const AdaptableHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/AdaptableHelper"));
@@ -48,6 +48,22 @@ exports.LAYOUT_COLUMN_FILTER_CLEAR_ALL = 'LAYOUT_COLUMN_FILTER_CLEAR_ALL';
48
48
  * @ReduxAction A Column Filter has been cleared
49
49
  */
50
50
  exports.LAYOUT_COLUMN_FILTER_CLEAR = 'LAYOUT_COLUMN_FILTER_CLEAR';
51
+ /**
52
+ * @ReduxAction Filter is suspended
53
+ */
54
+ exports.LAYOUT_COLUMN_FILTER_SUSPEND = 'LAYOUT_COLUMN_FILTER_SUSPEND';
55
+ /**
56
+ * @ReduxAction Filter is un-suspended, or activated
57
+ */
58
+ exports.LAYOUT_COLUMN_FILTER_UNSUSPEND = 'LAYOUT_COLUMN_FILTER_UNSUSPEND';
59
+ /**
60
+ * @ReduxAction Filter is suspended
61
+ */
62
+ exports.LAYOUT_COLUMN_FILTER_SUSPEND_ALL = 'LAYOUT_COLUMN_FILTER_SUSPEND_ALL';
63
+ /**
64
+ * @ReduxAction Filter is un-suspended, or activated
65
+ */
66
+ exports.LAYOUT_COLUMN_FILTER_UNSUSPEND_ALL = 'LAYOUT_COLUMN_FILTER_UNSUSPEND_ALL';
51
67
  // Column Filter Methods
52
68
  const LayoutColumnFilterAdd = (columnFilter) => ({
53
69
  type: exports.LAYOUT_COLUMN_FILTER_ADD,
@@ -73,6 +89,24 @@ const LayoutColumnFilterClear = (columnFilter) => ({
73
89
  columnFilter,
74
90
  });
75
91
  exports.LayoutColumnFilterClear = LayoutColumnFilterClear;
92
+ const LayoutColumnFilterSuspend = (columnFilter) => ({
93
+ type: exports.LAYOUT_COLUMN_FILTER_SUSPEND,
94
+ columnFilter,
95
+ });
96
+ exports.LayoutColumnFilterSuspend = LayoutColumnFilterSuspend;
97
+ const LayoutColumnFilterUnSuspend = (columnFilter) => ({
98
+ type: exports.LAYOUT_COLUMN_FILTER_UNSUSPEND,
99
+ columnFilter,
100
+ });
101
+ exports.LayoutColumnFilterUnSuspend = LayoutColumnFilterUnSuspend;
102
+ const LayoutColumnFilterSuspendAll = () => ({
103
+ type: exports.LAYOUT_COLUMN_FILTER_SUSPEND_ALL,
104
+ });
105
+ exports.LayoutColumnFilterSuspendAll = LayoutColumnFilterSuspendAll;
106
+ const LayoutColumnFilterUnSuspendAll = () => ({
107
+ type: exports.LAYOUT_COLUMN_FILTER_UNSUSPEND_ALL,
108
+ });
109
+ exports.LayoutColumnFilterUnSuspendAll = LayoutColumnFilterUnSuspendAll;
76
110
  /**
77
111
  * @ReduxAction A new caption / header has been set for a Column in the Layout
78
112
  */
@@ -133,7 +167,7 @@ const initialState = {
133
167
  Layouts: GeneralConstants_1.EMPTY_ARRAY,
134
168
  };
135
169
  const LayoutReducer = (state = initialState, action) => {
136
- var _a, _b, _c, _d;
170
+ var _a, _b, _c, _d, _e, _f, _g, _h;
137
171
  let layouts;
138
172
  const currentLayout = state.Layouts.find((layout) => layout.Name === state.CurrentLayout);
139
173
  switch (action.type) {
@@ -256,6 +290,50 @@ const LayoutReducer = (state = initialState, action) => {
256
290
  });
257
291
  return Object.assign(Object.assign({}, state), { Layouts });
258
292
  }
293
+ case exports.LAYOUT_COLUMN_FILTER_SUSPEND: {
294
+ const actionTypedSuspend = action;
295
+ const columnFilters = ((_e = currentLayout.ColumnFilters) !== null && _e !== void 0 ? _e : []).map((abObject) => abObject.Uuid === actionTypedSuspend.columnFilter.Uuid
296
+ ? Object.assign(Object.assign({}, abObject), { IsSuspended: true }) : abObject);
297
+ const Layouts = state.Layouts.map((layout) => {
298
+ if (layout.Name === currentLayout.Name) {
299
+ return Object.assign(Object.assign({}, layout), { ColumnFilters: columnFilters });
300
+ }
301
+ return layout;
302
+ });
303
+ return Object.assign(Object.assign({}, state), { Layouts });
304
+ }
305
+ case exports.LAYOUT_COLUMN_FILTER_UNSUSPEND: {
306
+ const actionTypedSuspend = action;
307
+ const columnFilters = ((_f = currentLayout.ColumnFilters) !== null && _f !== void 0 ? _f : []).map((abObject) => abObject.Uuid === actionTypedSuspend.columnFilter.Uuid
308
+ ? Object.assign(Object.assign({}, abObject), { IsSuspended: false }) : abObject);
309
+ const Layouts = state.Layouts.map((layout) => {
310
+ if (layout.Name === currentLayout.Name) {
311
+ return Object.assign(Object.assign({}, layout), { ColumnFilters: columnFilters });
312
+ }
313
+ return layout;
314
+ });
315
+ return Object.assign(Object.assign({}, state), { Layouts });
316
+ }
317
+ case exports.LAYOUT_COLUMN_FILTER_SUSPEND_ALL: {
318
+ const columnFilters = ((_g = currentLayout.ColumnFilters) !== null && _g !== void 0 ? _g : []).map((abObject) => (Object.assign(Object.assign({}, abObject), { IsSuspended: true })));
319
+ const Layouts = state.Layouts.map((layout) => {
320
+ if (layout.Name === currentLayout.Name) {
321
+ return Object.assign(Object.assign({}, layout), { ColumnFilters: columnFilters });
322
+ }
323
+ return layout;
324
+ });
325
+ return Object.assign(Object.assign({}, state), { Layouts });
326
+ }
327
+ case exports.LAYOUT_COLUMN_FILTER_UNSUSPEND_ALL: {
328
+ const columnFilters = ((_h = currentLayout.ColumnFilters) !== null && _h !== void 0 ? _h : []).map((abObject) => (Object.assign(Object.assign({}, abObject), { IsSuspended: false })));
329
+ const Layouts = state.Layouts.map((layout) => {
330
+ if (layout.Name === currentLayout.Name) {
331
+ return Object.assign(Object.assign({}, layout), { ColumnFilters: columnFilters });
332
+ }
333
+ return layout;
334
+ });
335
+ return Object.assign(Object.assign({}, state), { Layouts });
336
+ }
259
337
  default:
260
338
  return state;
261
339
  }
@@ -22,7 +22,7 @@ export declare const PLUS_MINUS_RULE_DELETE = "PLUS_MINUS_RULE_DELETE";
22
22
  */
23
23
  export declare const PLUS_MINUS_RULE_SUSPEND = "PLUS_MINUS_RULE_SUSPEND";
24
24
  /**
25
- * @ReduxAction A Plus Minus Rule has been un-suspended
25
+ * @ReduxAction A Plus Minus Rule has been unsuspended
26
26
  */
27
27
  export declare const PLUS_MINUS_RULE_UNSUSPEND = "PLUS_MINUS_RULE_UNSUSPEND";
28
28
  /**