@adaptabletools/adaptable 11.0.0-canary.3 → 11.0.0-canary.7

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 (267) hide show
  1. package/agGrid.d.ts +5 -4
  2. package/agGrid.js +9 -7
  3. package/base.css +135 -69
  4. package/bundle.cjs.js +104 -99
  5. package/index.css +136 -69
  6. package/package.json +3 -3
  7. package/publishTimestamp.d.ts +1 -1
  8. package/publishTimestamp.js +1 -1
  9. package/src/AdaptableInterfaces/AdaptableNoCodeWizard.d.ts +7 -5
  10. package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -0
  11. package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +1 -3
  12. package/src/AdaptableOptions/AdaptableOptions.d.ts +14 -7
  13. package/src/AdaptableOptions/{QueryLanguageOptions.d.ts → AdaptableQLOptions.d.ts} +34 -9
  14. package/src/AdaptableOptions/{QueryLanguageOptions.js → AdaptableQLOptions.js} +0 -0
  15. package/src/AdaptableOptions/AlertOptions.d.ts +82 -0
  16. package/src/AdaptableOptions/AlertOptions.js +2 -0
  17. package/src/AdaptableOptions/ContainerOptions.d.ts +2 -2
  18. package/src/AdaptableOptions/FilterOptions.d.ts +1 -1
  19. package/src/AdaptableOptions/GeneralOptions.d.ts +0 -7
  20. package/src/AdaptableOptions/NotificationsOptions.d.ts +1 -78
  21. package/src/AdaptableOptions/SearchOptions.d.ts +0 -9
  22. package/src/AdaptableOptions/StateOptions.d.ts +9 -8
  23. package/src/AdaptableOptions/TeamSharingOptions.d.ts +2 -2
  24. package/src/AdaptableOptions/ToolPanelOptions.d.ts +0 -2
  25. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +3 -3
  26. package/src/Api/AdaptableApi.d.ts +6 -0
  27. package/src/Api/AlertApi.d.ts +2 -3
  28. package/src/Api/CalculatedColumnApi.d.ts +2 -9
  29. package/src/Api/ColumnApi.d.ts +0 -4
  30. package/src/Api/EventApi.d.ts +8 -3
  31. package/src/Api/Events/GridDataChanged.d.ts +4 -2
  32. package/src/Api/Events/SystemStatusMessageDisplayed.d.ts +1 -1
  33. package/src/Api/FreeTextColumnApi.d.ts +0 -12
  34. package/src/Api/GridApi.d.ts +13 -2
  35. package/src/Api/IPushPullApi.d.ts +1 -1
  36. package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -1
  37. package/src/Api/Implementation/AdaptableApiImpl.js +2 -0
  38. package/src/Api/Implementation/AlertApiImpl.d.ts +1 -2
  39. package/src/Api/Implementation/AlertApiImpl.js +19 -10
  40. package/src/Api/Implementation/ApiBase.d.ts +5 -2
  41. package/src/Api/Implementation/ApiBase.js +8 -2
  42. package/src/Api/Implementation/CalculatedColumnApiImpl.js +3 -4
  43. package/src/Api/Implementation/ColumnApiImpl.d.ts +0 -1
  44. package/src/Api/Implementation/ColumnApiImpl.js +0 -5
  45. package/src/Api/Implementation/FreeTextColumnApiImpl.d.ts +0 -5
  46. package/src/Api/Implementation/FreeTextColumnApiImpl.js +0 -9
  47. package/src/Api/Implementation/GridApiImpl.d.ts +4 -1
  48. package/src/Api/Implementation/GridApiImpl.js +27 -4
  49. package/src/Api/Implementation/InternalApiImpl.d.ts +2 -3
  50. package/src/Api/Implementation/InternalApiImpl.js +7 -6
  51. package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -0
  52. package/src/Api/Implementation/LayoutApiImpl.js +11 -0
  53. package/src/Api/Implementation/QueryApiImpl.js +4 -1
  54. package/src/Api/Implementation/QueryLanguageApiImpl.d.ts +4 -1
  55. package/src/Api/Implementation/QueryLanguageApiImpl.js +20 -8
  56. package/src/Api/Implementation/SettingsPanelApiImpl.d.ts +7 -0
  57. package/src/Api/Implementation/SettingsPanelApiImpl.js +15 -0
  58. package/src/Api/InternalApi.d.ts +2 -3
  59. package/src/Api/LayoutApi.d.ts +7 -0
  60. package/src/Api/OpenFinApi.d.ts +5 -0
  61. package/src/Api/PluginsApi.d.ts +29 -0
  62. package/src/Api/QueryApi.d.ts +2 -2
  63. package/src/Api/QueryLanguageApi.d.ts +23 -10
  64. package/src/Api/SettingsPanelApi.d.ts +16 -0
  65. package/src/Api/SettingsPanelApi.js +2 -0
  66. package/src/Api/UserInterfaceApi.d.ts +5 -2
  67. package/src/PredefinedConfig/AlertState.d.ts +8 -6
  68. package/src/PredefinedConfig/CalculatedColumnState.d.ts +8 -4
  69. package/src/PredefinedConfig/Common/AdaptableQuery.d.ts +7 -5
  70. package/src/PredefinedConfig/Common/AdaptableQuery.js +2 -6
  71. package/src/PredefinedConfig/Common/CellHighlightInfo.d.ts +1 -12
  72. package/src/PredefinedConfig/Common/Enums.d.ts +0 -1
  73. package/src/PredefinedConfig/Common/Enums.js +0 -2
  74. package/src/PredefinedConfig/Common/FDC3Context.d.ts +4 -12
  75. package/src/PredefinedConfig/Common/RowHighlightInfo.d.ts +15 -0
  76. package/src/PredefinedConfig/Common/RowHighlightInfo.js +2 -0
  77. package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +1 -1
  78. package/src/PredefinedConfig/Common/Types.d.ts +3 -1
  79. package/src/PredefinedConfig/Common/Types.js +1 -0
  80. package/src/PredefinedConfig/CustomSortState.d.ts +0 -1
  81. package/src/PredefinedConfig/FlashingCellState.d.ts +3 -1
  82. package/src/PredefinedConfig/FreeTextColumnState.d.ts +1 -1
  83. package/src/PredefinedConfig/LayoutState.d.ts +0 -2
  84. package/src/PredefinedConfig/PredefinedConfig.d.ts +5 -2
  85. package/src/PredefinedConfig/Selection/GridCellRange.d.ts +3 -1
  86. package/src/PredefinedConfig/SystemState.d.ts +2 -1
  87. package/src/Redux/ActionsReducers/ApplicationRedux.js +9 -3
  88. package/src/Redux/ActionsReducers/FlashingCellRedux.js +4 -8
  89. package/src/Redux/ActionsReducers/GridRedux.js +3 -1
  90. package/src/Redux/ActionsReducers/PopupRedux.js +13 -3
  91. package/src/Redux/ActionsReducers/QuickSearchRedux.js +3 -1
  92. package/src/Redux/ActionsReducers/SystemRedux.d.ts +6 -5
  93. package/src/Redux/ActionsReducers/SystemRedux.js +16 -14
  94. package/src/Redux/ActionsReducers/ThemeRedux.js +3 -1
  95. package/src/Redux/Store/AdaptableReduxMerger.js +1 -1
  96. package/src/Redux/Store/AdaptableStore.js +34 -8
  97. package/src/Strategy/AlertModule.js +16 -6
  98. package/src/Strategy/CalculatedColumnModule.js +4 -4
  99. package/src/Strategy/ChartingModule.d.ts +3 -3
  100. package/src/Strategy/ChartingModule.js +2 -2
  101. package/src/Strategy/ConditionalStyleModule.js +4 -0
  102. package/src/Strategy/FlashingCellModule.js +4 -4
  103. package/src/Strategy/FreeTextColumnModule.d.ts +2 -2
  104. package/src/Strategy/FreeTextColumnModule.js +11 -0
  105. package/src/Strategy/LayoutModule.js +1 -6
  106. package/src/Strategy/{SetingsPanelModule.d.ts → SettingsPanelModule.d.ts} +0 -0
  107. package/src/Strategy/{SetingsPanelModule.js → SettingsPanelModule.js} +0 -0
  108. package/src/Strategy/ToolPanelModule.js +5 -3
  109. package/src/Strategy/Utilities/getAlertPreviewViewItems.js +1 -1
  110. package/src/Strategy/Utilities/getExpressionViewItems.d.ts +2 -2
  111. package/src/Strategy/Utilities/getExpressionViewItems.js +2 -1
  112. package/src/Strategy/Utilities/getFormatColumnSettingsViewItems.js +1 -1
  113. package/src/Strategy/Utilities/getRuleViewItems.d.ts +0 -1
  114. package/src/Strategy/Utilities/getRuleViewItems.js +1 -3
  115. package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +2 -1
  116. package/src/Utilities/Constants/DocumentationLinkConstants.js +3 -2
  117. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +23 -17
  118. package/src/Utilities/ExpressionFunctions/{aggregationExpressionFunctions.d.ts → aggregatedBooleanExpressionFunctions.d.ts} +1 -1
  119. package/src/Utilities/ExpressionFunctions/{aggregationExpressionFunctions.js → aggregatedBooleanExpressionFunctions.js} +4 -4
  120. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +24 -0
  121. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +339 -0
  122. package/src/Utilities/ExpressionFunctions/dateUtils.d.ts +1 -0
  123. package/src/Utilities/ExpressionFunctions/dateUtils.js +13 -0
  124. package/src/Utilities/ExpressionFunctions/deepMap.d.ts +35 -0
  125. package/src/Utilities/ExpressionFunctions/deepMap.js +283 -0
  126. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.d.ts +2 -2
  127. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +8 -8
  128. package/src/Utilities/ExpressionFunctions/groupingMap.d.ts +35 -0
  129. package/src/Utilities/ExpressionFunctions/groupingMap.js +105 -0
  130. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +2 -2
  131. package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.d.ts +33 -0
  132. package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +154 -0
  133. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +13 -4
  134. package/src/Utilities/Helpers/AdaptableHelper.js +3 -1
  135. package/src/Utilities/Helpers/CalendarHelper.js +220 -55
  136. package/src/Utilities/Interface/MessagePopups.d.ts +6 -2
  137. package/src/Utilities/ObjectFactory.js +1 -0
  138. package/src/Utilities/Services/AlertService.js +8 -4
  139. package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +7 -3
  140. package/src/Utilities/Services/CalculatedColumnExpressionService.js +143 -18
  141. package/src/Utilities/Services/DataService.js +6 -1
  142. package/src/Utilities/Services/Interface/IAdaptableService.d.ts +1 -1
  143. package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.d.ts +6 -3
  144. package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +9 -3
  145. package/src/Utilities/Services/LicenseService.js +1 -1
  146. package/src/Utilities/Services/QueryLanguageService.d.ts +11 -4
  147. package/src/Utilities/Services/QueryLanguageService.js +92 -28
  148. package/src/Utilities/Services/ReportService.js +6 -2
  149. package/src/Utilities/Services/TeamSharingService.js +5 -3
  150. package/src/View/AdaptablePopover/index.js +6 -1
  151. package/src/View/AdaptableView.js +1 -1
  152. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +5 -1
  153. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationForm.js +10 -5
  154. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/index.js +4 -1
  155. package/src/View/AdaptableWizardView/helper.js +5 -3
  156. package/src/View/Alert/Wizard/AlertButtonsEditor.d.ts +1 -1
  157. package/src/View/Alert/Wizard/AlertButtonsEditor.js +5 -1
  158. package/src/View/Alert/Wizard/AlertDisplayWizardSection.d.ts +1 -0
  159. package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +2 -2
  160. package/src/View/Alert/Wizard/AlertWizard.js +2 -2
  161. package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +2 -2
  162. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +3 -2
  163. package/src/View/Alert/Wizard/isValidAlertRules.js +3 -3
  164. package/src/View/CalculatedColumn/CalculatedColumnSharedEntity.js +3 -3
  165. package/src/View/CalculatedColumn/CalculatedColumnSummary.js +2 -4
  166. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +43 -12
  167. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -2
  168. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +2 -2
  169. package/src/View/CellSummary/CellSummaryViewPanel.js +1 -2
  170. package/src/View/ColorPicker.d.ts +1 -1
  171. package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
  172. package/src/View/Components/AdaptableInput/index.d.ts +1 -1
  173. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +5 -2
  174. package/src/View/Components/Buttons/ButtonDelete.d.ts +1 -1
  175. package/src/View/Components/EntityRulesEditor/index.js +11 -12
  176. package/src/View/Components/FilterForm/FilterForm.js +0 -2
  177. package/src/View/Components/FilterForm/QuickFilterForm.js +6 -5
  178. package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +1 -1
  179. package/src/View/Components/Forms/AdaptableFormControlTextClear.d.ts +1 -1
  180. package/src/View/Components/Panels/PanelWithImage.d.ts +2 -2
  181. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.d.ts +0 -3
  182. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +45 -88
  183. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.d.ts +11 -0
  184. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +78 -0
  185. package/src/View/Components/Popups/AdaptablePopup/Navigation.d.ts +1 -3
  186. package/src/View/Components/Popups/AdaptablePopup/Navigation.js +5 -13
  187. package/src/View/Components/Popups/AdaptablePopup/TopBar.js +5 -4
  188. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.d.ts +2 -0
  189. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +44 -0
  190. package/src/View/Components/Popups/AdaptablePopupAlert.d.ts +1 -0
  191. package/src/View/Components/Popups/AdaptablePopupAlert.js +1 -1
  192. package/src/View/Components/Popups/AdaptablePopupConfirmation.js +3 -1
  193. package/src/View/Components/Popups/AdaptablePopupPrompt.d.ts +5 -12
  194. package/src/View/Components/Popups/AdaptablePopupPrompt.js +38 -37
  195. package/src/View/Components/Popups/AdaptablePopupTeamSharing.js +4 -1
  196. package/src/View/Components/ScopeComponent.js +4 -1
  197. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +5 -1
  198. package/src/View/Components/ToolPanel/ToolPanelPopup.js +3 -1
  199. package/src/View/Components/ToolPanel/ToolPanelWrapper.js +1 -1
  200. package/src/View/Components/ValueSelector/index.js +1 -1
  201. package/src/View/ConditionalStyle/Wizard/ConditionalStyleRuleWizardSection.js +2 -2
  202. package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.d.ts +8 -0
  203. package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.js +27 -0
  204. package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.js +7 -0
  205. package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +3 -1
  206. package/src/View/CustomSort/Wizard/CustomSortWizard.js +1 -1
  207. package/src/View/Dashboard/CustomToolbarWrapper.js +5 -1
  208. package/src/View/Dashboard/Dashboard.js +2 -3
  209. package/src/View/Dashboard/DashboardPopup.js +3 -1
  210. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +2 -1
  211. package/src/View/Export/Wizard/ReportColumnTypeWizard.js +3 -1
  212. package/src/View/Export/Wizard/ReportRowTypeWizard.js +3 -1
  213. package/src/View/Filter/FilterViewPanel.d.ts +1 -4
  214. package/src/View/Filter/FilterViewPanel.js +1 -3
  215. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +2 -2
  216. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +1 -1
  217. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +1 -1
  218. package/src/View/FreeTextColumn/FreeTextColumnSummary.js +1 -2
  219. package/src/View/GridInfo/AdaptableOptionsComponent.js +4 -1
  220. package/src/View/Layout/Wizard/LayoutEditor/index.js +6 -2
  221. package/src/View/Layout/Wizard/LayoutEditorWizard.js +7 -1
  222. package/src/View/License/LicenseWatermark.js +1 -1
  223. package/src/View/Query/ExpandedQueryPopup.js +9 -2
  224. package/src/View/Query/QueryViewPanel.js +3 -1
  225. package/src/View/Query/Wizard/NamedQueryWizard.js +3 -3
  226. package/src/View/QuickSearch/QuickSearchPopup.js +3 -3
  227. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsSummary.js +12 -2
  228. package/src/View/SpecialColumnSettingsWizardStep.js +1 -2
  229. package/src/View/UIHelper.js +4 -1
  230. package/src/View/Wizard/AdaptableWizard.js +12 -3
  231. package/src/View/Wizard/OnePageAdaptableWizard.js +5 -1
  232. package/src/agGrid/Adaptable.d.ts +3 -3
  233. package/src/agGrid/Adaptable.js +117 -77
  234. package/src/agGrid/agGridHelper.js +4 -9
  235. package/src/agGrid/agGridMenuHelper.js +4 -8
  236. package/src/agGrid/editors/AdaptableDateEditor/index.js +1 -1
  237. package/src/agGrid/editors/AdaptableNumberEditor/index.js +1 -1
  238. package/src/components/AdaptableFormComponent/AdaptableFormComponent.d.ts +4 -2
  239. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +4 -4
  240. package/src/components/ApplicationIcon.d.ts +1 -0
  241. package/src/components/ApplicationIcon.js +2 -2
  242. package/src/components/Dashboard/Dashboard.js +4 -1
  243. package/src/components/Datepicker/index.d.ts +1 -1
  244. package/src/components/Dropdown/index.js +8 -1
  245. package/src/components/ExpressionEditor/EditorInput.d.ts +1 -1
  246. package/src/components/ExpressionEditor/EditorInput.js +5 -2
  247. package/src/components/ExpressionEditor/EditorInputReactive.d.ts +1 -1
  248. package/src/components/ExpressionEditor/EditorInputReactive.js +4 -2
  249. package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +5 -2
  250. package/src/components/ExpressionEditor/editorButtonsAggregatedScalar.d.ts +2 -0
  251. package/src/components/ExpressionEditor/editorButtonsAggregatedScalar.js +45 -0
  252. package/src/components/ExpressionEditor/editorButtonsReactive.js +8 -13
  253. package/src/components/ExpressionEditor/index.d.ts +2 -1
  254. package/src/components/ExpressionEditor/index.js +20 -6
  255. package/src/components/Input/index.d.ts +1 -1
  256. package/src/components/List/ListGroupItem/index.d.ts +1 -1
  257. package/src/components/Logo/index.js +8 -7
  258. package/src/components/PopupWithFooter.d.ts +1 -1
  259. package/src/components/SizedContainer/index.js +7 -1
  260. package/src/components/Textarea/index.d.ts +1 -1
  261. package/src/components/WindowModal/WindowModal.js +4 -1
  262. package/src/metamodel/adaptable.metamodel.d.ts +114 -59
  263. package/src/metamodel/adaptable.metamodel.js +373 -242
  264. package/src/types.d.ts +9 -6
  265. package/themes/dark.css +4 -4
  266. package/version.d.ts +1 -1
  267. package/version.js +1 -1
@@ -17,6 +17,7 @@ const differenceInWeeks_1 = tslib_1.__importDefault(require("date-fns/difference
17
17
  const differenceInMonths_1 = tslib_1.__importDefault(require("date-fns/differenceInMonths"));
18
18
  const differenceInYears_1 = tslib_1.__importDefault(require("date-fns/differenceInYears"));
19
19
  const expressionFunctionUtils_1 = require("./expressionFunctionUtils");
20
+ const dateUtils_1 = require("./dateUtils");
20
21
  exports.scalarExpressionFunctions = {
21
22
  ADD: {
22
23
  handler(args) {
@@ -222,7 +223,9 @@ exports.scalarExpressionFunctions = {
222
223
  },
223
224
  DIFF_DAYS: {
224
225
  handler(args) {
225
- return differenceInDays_1.default(args[0], args[1]);
226
+ const [first, second] = dateUtils_1.normalizeDateParams(args);
227
+ const result = differenceInDays_1.default(first, second);
228
+ return isNaN(result) ? '' : result;
226
229
  },
227
230
  description: 'Returns the difference in days between 2 dates',
228
231
  signatures: ['DIFF_DAYS(a: date, b: date)'],
@@ -230,7 +233,9 @@ exports.scalarExpressionFunctions = {
230
233
  },
231
234
  DIFF_WEEKS: {
232
235
  handler(args) {
233
- return differenceInWeeks_1.default(args[0], args[1]);
236
+ const [first, second] = dateUtils_1.normalizeDateParams(args);
237
+ const result = differenceInWeeks_1.default(first, second);
238
+ return isNaN(result) ? '' : result;
234
239
  },
235
240
  description: 'Returns the difference in weeks between 2 dates',
236
241
  signatures: ['DIFF_WEEKS(a: date, b: date)'],
@@ -238,7 +243,9 @@ exports.scalarExpressionFunctions = {
238
243
  },
239
244
  DIFF_MONTHS: {
240
245
  handler(args) {
241
- return differenceInMonths_1.default(args[0], args[1]);
246
+ const [first, second] = dateUtils_1.normalizeDateParams(args);
247
+ const result = differenceInMonths_1.default(first, second);
248
+ return isNaN(result) ? '' : result;
242
249
  },
243
250
  description: 'Returns the difference in months between 2 dates',
244
251
  signatures: ['DIFF_MONTHS(a: date, b: date)'],
@@ -246,7 +253,9 @@ exports.scalarExpressionFunctions = {
246
253
  },
247
254
  DIFF_YEARS: {
248
255
  handler(args) {
249
- return differenceInYears_1.default(args[0], args[1]);
256
+ const [first, second] = dateUtils_1.normalizeDateParams(args);
257
+ const result = differenceInYears_1.default(first, second);
258
+ return isNaN(result) ? '' : result;
250
259
  },
251
260
  description: 'Returns the difference in years between 2 dates',
252
261
  signatures: ['DIFF_YEARS(a: date, b: date)'],
@@ -11,8 +11,11 @@ function assignAdaptableOptions(adaptableOptions) {
11
11
  var _a;
12
12
  const returnedAdaptableOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions, adaptableOptions);
13
13
  returnedAdaptableOptions.adaptableStateKey = (_a = returnedAdaptableOptions.adaptableStateKey) !== null && _a !== void 0 ? _a : returnedAdaptableOptions.adaptableId;
14
+ returnedAdaptableOptions.adaptableQLOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.adaptableQLOptions, adaptableOptions.adaptableQLOptions);
15
+ returnedAdaptableOptions.adaptableQLOptions.expressionOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.adaptableQLOptions.expressionOptions, returnedAdaptableOptions.adaptableQLOptions.expressionOptions);
14
16
  returnedAdaptableOptions.layoutOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.layoutOptions, adaptableOptions.layoutOptions);
15
17
  returnedAdaptableOptions.notificationsOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.notificationsOptions, adaptableOptions.notificationsOptions);
18
+ returnedAdaptableOptions.alertOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.alertOptions, adaptableOptions.alertOptions);
16
19
  returnedAdaptableOptions.flashingCellOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.flashingCellOptions, adaptableOptions.flashingCellOptions);
17
20
  returnedAdaptableOptions.entitlementOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.entitlementOptions, adaptableOptions.entitlementOptions);
18
21
  returnedAdaptableOptions.dashboardOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.dashboardOptions, adaptableOptions.dashboardOptions);
@@ -28,7 +31,6 @@ function assignAdaptableOptions(adaptableOptions) {
28
31
  returnedAdaptableOptions.exportOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.exportOptions, adaptableOptions.exportOptions);
29
32
  returnedAdaptableOptions.teamSharingOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.teamSharingOptions, adaptableOptions.teamSharingOptions);
30
33
  returnedAdaptableOptions.toolPanelOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.toolPanelOptions, adaptableOptions.toolPanelOptions);
31
- returnedAdaptableOptions.queryLanguageOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.queryLanguageOptions, adaptableOptions.queryLanguageOptions);
32
34
  returnedAdaptableOptions.dataChangeHistoryOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.dataChangeHistoryOptions, adaptableOptions.dataChangeHistoryOptions);
33
35
  returnedAdaptableOptions.settingsPanelOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.settingsPanelOptions, adaptableOptions.settingsPanelOptions);
34
36
  const { predefinedConfig } = returnedAdaptableOptions;
@@ -12,95 +12,260 @@ function getAvailableCalendars() {
12
12
  Name: 'United Kingdom',
13
13
  YearName: 2020,
14
14
  CalendarEntries: [
15
- { HolidayName: "New Year's Day", HolidayDate: new Date('January 01, 2020').toJSON() },
16
- { HolidayName: 'Good Friday', HolidayDate: new Date('April 10, 2020').toJSON() },
17
- { HolidayName: 'Easter Monday', HolidayDate: new Date('April 13, 2020').toJSON() },
18
- { HolidayName: 'Early May Bank Holiday', HolidayDate: new Date('May 8 2020').toJSON() },
19
- { HolidayName: 'Spring Bank Holiday', HolidayDate: new Date('May 25, 2020').toJSON() },
20
- { HolidayName: 'Summer Bank Holiday', HolidayDate: new Date('August 31, 2020').toJSON() },
21
- { HolidayName: 'Christmas Day', HolidayDate: new Date('December 25, 2020').toJSON() },
22
- { HolidayName: 'Boxing Day', HolidayDate: new Date('December 28, 2020').toJSON() },
15
+ {
16
+ HolidayName: "New Year's Day",
17
+ HolidayDate: new Date('January 01, 2020').toJSON(),
18
+ },
19
+ {
20
+ HolidayName: 'Good Friday',
21
+ HolidayDate: new Date('April 10, 2020').toJSON(),
22
+ },
23
+ {
24
+ HolidayName: 'Easter Monday',
25
+ HolidayDate: new Date('April 13, 2020').toJSON(),
26
+ },
27
+ {
28
+ HolidayName: 'Early May Bank Holiday',
29
+ HolidayDate: new Date('May 8 2020').toJSON(),
30
+ },
31
+ {
32
+ HolidayName: 'Spring Bank Holiday',
33
+ HolidayDate: new Date('May 25, 2020').toJSON(),
34
+ },
35
+ {
36
+ HolidayName: 'Summer Bank Holiday',
37
+ HolidayDate: new Date('August 31, 2020').toJSON(),
38
+ },
39
+ {
40
+ HolidayName: 'Christmas Day',
41
+ HolidayDate: new Date('December 25, 2020').toJSON(),
42
+ },
43
+ {
44
+ HolidayName: 'Boxing Day',
45
+ HolidayDate: new Date('December 28, 2020').toJSON(),
46
+ },
23
47
  ],
24
48
  },
25
49
  {
26
50
  Name: 'Germany',
27
51
  YearName: 2020,
28
52
  CalendarEntries: [
29
- { HolidayName: "New Year's Day", HolidayDate: new Date('January 01, 2020').toJSON() },
30
- { HolidayName: 'Good Friday', HolidayDate: new Date('April 10, 2020').toJSON() },
31
- { HolidayName: 'Easter Monday', HolidayDate: new Date('April 13, 2020').toJSON() },
32
- { HolidayName: 'Labour Day', HolidayDate: new Date('May 01 2020').toJSON() },
33
- { HolidayName: 'Ascension Day', HolidayDate: new Date('May 21 2020').toJSON() },
34
- { HolidayName: 'Whit Monday', HolidayDate: new Date('June 01, 2020').toJSON() },
35
- { HolidayName: 'German Unity Day', HolidayDate: new Date('October 03, 2020').toJSON() },
36
- { HolidayName: 'Christmas Day', HolidayDate: new Date('December 25, 2020').toJSON() },
37
- { HolidayName: "St Stephen's Day", HolidayDate: new Date('December 26, 2020').toJSON() },
53
+ {
54
+ HolidayName: "New Year's Day",
55
+ HolidayDate: new Date('January 01, 2020').toJSON(),
56
+ },
57
+ {
58
+ HolidayName: 'Good Friday',
59
+ HolidayDate: new Date('April 10, 2020').toJSON(),
60
+ },
61
+ {
62
+ HolidayName: 'Easter Monday',
63
+ HolidayDate: new Date('April 13, 2020').toJSON(),
64
+ },
65
+ {
66
+ HolidayName: 'Labour Day',
67
+ HolidayDate: new Date('May 01 2020').toJSON(),
68
+ },
69
+ {
70
+ HolidayName: 'Ascension Day',
71
+ HolidayDate: new Date('May 21 2020').toJSON(),
72
+ },
73
+ {
74
+ HolidayName: 'Whit Monday',
75
+ HolidayDate: new Date('June 01, 2020').toJSON(),
76
+ },
77
+ {
78
+ HolidayName: 'German Unity Day',
79
+ HolidayDate: new Date('October 03, 2020').toJSON(),
80
+ },
81
+ {
82
+ HolidayName: 'Christmas Day',
83
+ HolidayDate: new Date('December 25, 2020').toJSON(),
84
+ },
85
+ {
86
+ HolidayName: "St Stephen's Day",
87
+ HolidayDate: new Date('December 26, 2020').toJSON(),
88
+ },
38
89
  ],
39
90
  },
40
91
  {
41
92
  Name: 'France',
42
93
  YearName: 2020,
43
94
  CalendarEntries: [
44
- { HolidayName: 'New Years Day', HolidayDate: new Date('January 01, 2020').toJSON() },
45
- { HolidayName: 'Easter Monday', HolidayDate: new Date('April 13, 2020').toJSON() },
46
- { HolidayName: 'Labour Day', HolidayDate: new Date('May 01, 2020').toJSON() },
47
- { HolidayName: 'VE Day', HolidayDate: new Date('May 08, 2020').toJSON() },
48
- { HolidayName: 'Ascension Day', HolidayDate: new Date('May 21, 2020').toJSON() },
49
- { HolidayName: 'Whitmonday', HolidayDate: new Date('June 01, 2020').toJSON() },
50
- { HolidayName: 'Bastille Day', HolidayDate: new Date('July 14, 2020').toJSON() },
51
- { HolidayName: 'Assumption Day', HolidayDate: new Date('August 15, 2020').toJSON() },
52
- { HolidayName: 'All Saints Day', HolidayDate: new Date('November 01, 2020').toJSON() },
53
- { HolidayName: 'Armistice Day', HolidayDate: new Date('November 11, 2020').toJSON() },
54
- { HolidayName: 'Christmas Day', HolidayDate: new Date('December 25, 2020').toJSON() },
95
+ {
96
+ HolidayName: 'New Years Day',
97
+ HolidayDate: new Date('January 01, 2020').toJSON(),
98
+ },
99
+ {
100
+ HolidayName: 'Easter Monday',
101
+ HolidayDate: new Date('April 13, 2020').toJSON(),
102
+ },
103
+ {
104
+ HolidayName: 'Labour Day',
105
+ HolidayDate: new Date('May 01, 2020').toJSON(),
106
+ },
107
+ {
108
+ HolidayName: 'VE Day',
109
+ HolidayDate: new Date('May 08, 2020').toJSON(),
110
+ },
111
+ {
112
+ HolidayName: 'Ascension Day',
113
+ HolidayDate: new Date('May 21, 2020').toJSON(),
114
+ },
115
+ {
116
+ HolidayName: 'Whitmonday',
117
+ HolidayDate: new Date('June 01, 2020').toJSON(),
118
+ },
119
+ {
120
+ HolidayName: 'Bastille Day',
121
+ HolidayDate: new Date('July 14, 2020').toJSON(),
122
+ },
123
+ {
124
+ HolidayName: 'Assumption Day',
125
+ HolidayDate: new Date('August 15, 2020').toJSON(),
126
+ },
127
+ {
128
+ HolidayName: 'All Saints Day',
129
+ HolidayDate: new Date('November 01, 2020').toJSON(),
130
+ },
131
+ {
132
+ HolidayName: 'Armistice Day',
133
+ HolidayDate: new Date('November 11, 2020').toJSON(),
134
+ },
135
+ {
136
+ HolidayName: 'Christmas Day',
137
+ HolidayDate: new Date('December 25, 2020').toJSON(),
138
+ },
55
139
  ],
56
140
  },
57
141
  {
58
142
  Name: 'United States',
59
143
  YearName: 2020,
60
144
  CalendarEntries: [
61
- { HolidayName: 'New Years Day', HolidayDate: new Date('January 01, 2020').toJSON() },
145
+ {
146
+ HolidayName: 'New Years Day',
147
+ HolidayDate: new Date('January 01, 2020').toJSON(),
148
+ },
62
149
  {
63
150
  HolidayName: 'Martin Luther King Day',
64
151
  HolidayDate: new Date('January 20, 2020').toJSON(),
65
152
  },
66
- { HolidayName: 'Presidents Day', HolidayDate: new Date('February 17, 2020').toJSON() },
67
- { HolidayName: 'Memorial Day', HolidayDate: new Date('May 25, 2020').toJSON() },
68
- { HolidayName: 'Independence Day', HolidayDate: new Date('July 03, 2020').toJSON() },
69
- { HolidayName: 'Labour Day', HolidayDate: new Date('September 07, 2020').toJSON() },
70
- { HolidayName: 'Columbus Day', HolidayDate: new Date('October 12, 2020').toJSON() },
71
- { HolidayName: 'Veterans Day', HolidayDate: new Date('November 11, 2020').toJSON() },
72
- { HolidayName: 'Thanksgiving Day', HolidayDate: new Date('November 26, 2020').toJSON() },
73
- { HolidayName: 'Christmas Day', HolidayDate: new Date('December 25, 2020').toJSON() },
153
+ {
154
+ HolidayName: 'Presidents Day',
155
+ HolidayDate: new Date('February 17, 2020').toJSON(),
156
+ },
157
+ {
158
+ HolidayName: 'Memorial Day',
159
+ HolidayDate: new Date('May 25, 2020').toJSON(),
160
+ },
161
+ {
162
+ HolidayName: 'Independence Day',
163
+ HolidayDate: new Date('July 03, 2020').toJSON(),
164
+ },
165
+ {
166
+ HolidayName: 'Labour Day',
167
+ HolidayDate: new Date('September 07, 2020').toJSON(),
168
+ },
169
+ {
170
+ HolidayName: 'Columbus Day',
171
+ HolidayDate: new Date('October 12, 2020').toJSON(),
172
+ },
173
+ {
174
+ HolidayName: 'Veterans Day',
175
+ HolidayDate: new Date('November 11, 2020').toJSON(),
176
+ },
177
+ {
178
+ HolidayName: 'Thanksgiving Day',
179
+ HolidayDate: new Date('November 26, 2020').toJSON(),
180
+ },
181
+ {
182
+ HolidayName: 'Christmas Day',
183
+ HolidayDate: new Date('December 25, 2020').toJSON(),
184
+ },
74
185
  ],
75
186
  },
76
187
  {
77
188
  Name: 'Canada',
78
189
  YearName: 2020,
79
190
  CalendarEntries: [
80
- { HolidayName: 'New Years Day', HolidayDate: new Date('January 01, 2020').toJSON() },
81
- { HolidayName: 'Good Friday', HolidayDate: new Date('April 10, 2020').toJSON() },
82
- { HolidayName: 'Victoria Day', HolidayDate: new Date('May 18, 2020').toJSON() },
83
- { HolidayName: 'Canada Day', HolidayDate: new Date('July 01, 2020').toJSON() },
84
- { HolidayName: 'Labour Day', HolidayDate: new Date('September 07, 2020').toJSON() },
85
- { HolidayName: 'Thanksgiving', HolidayDate: new Date('October 12, 2020').toJSON() },
86
- { HolidayName: 'Rememberance Day', HolidayDate: new Date('November 11, 2020').toJSON() },
87
- { HolidayName: 'Christmas Day', HolidayDate: new Date('December 25, 2020').toJSON() },
88
- { HolidayName: 'Boxing Day', HolidayDate: new Date('December 26, 2020').toJSON() },
191
+ {
192
+ HolidayName: 'New Years Day',
193
+ HolidayDate: new Date('January 01, 2020').toJSON(),
194
+ },
195
+ {
196
+ HolidayName: 'Good Friday',
197
+ HolidayDate: new Date('April 10, 2020').toJSON(),
198
+ },
199
+ {
200
+ HolidayName: 'Victoria Day',
201
+ HolidayDate: new Date('May 18, 2020').toJSON(),
202
+ },
203
+ {
204
+ HolidayName: 'Canada Day',
205
+ HolidayDate: new Date('July 01, 2020').toJSON(),
206
+ },
207
+ {
208
+ HolidayName: 'Labour Day',
209
+ HolidayDate: new Date('September 07, 2020').toJSON(),
210
+ },
211
+ {
212
+ HolidayName: 'Thanksgiving',
213
+ HolidayDate: new Date('October 12, 2020').toJSON(),
214
+ },
215
+ {
216
+ HolidayName: 'Rememberance Day',
217
+ HolidayDate: new Date('November 11, 2020').toJSON(),
218
+ },
219
+ {
220
+ HolidayName: 'Christmas Day',
221
+ HolidayDate: new Date('December 25, 2020').toJSON(),
222
+ },
223
+ {
224
+ HolidayName: 'Boxing Day',
225
+ HolidayDate: new Date('December 26, 2020').toJSON(),
226
+ },
89
227
  ],
90
228
  },
91
229
  {
92
230
  Name: 'Singapore',
93
231
  YearName: 2020,
94
232
  CalendarEntries: [
95
- { HolidayName: 'New Years Day', HolidayDate: new Date('January 01, 2020').toJSON() },
96
- { HolidayName: 'Chinese New Year', HolidayDate: new Date('January 25, 2020').toJSON() },
97
- { HolidayName: 'Good Friday', HolidayDate: new Date('April 10, 2020').toJSON() },
98
- { HolidayName: 'Labour Day', HolidayDate: new Date('May 01, 2020').toJSON() },
99
- { HolidayName: 'Vesak Day', HolidayDate: new Date('May 07, 2020').toJSON() },
100
- { HolidayName: 'National Day', HolidayDate: new Date('August 09, 2020').toJSON() },
101
- { HolidayName: 'Hari Raya Haji', HolidayDate: new Date('August 10, 2020').toJSON() },
102
- { HolidayName: 'Deewali', HolidayDate: new Date('November 14, 2020').toJSON() },
103
- { HolidayName: 'Christmas Day', HolidayDate: new Date('December 25, 2020').toJSON() },
233
+ {
234
+ HolidayName: 'New Years Day',
235
+ HolidayDate: new Date('January 01, 2020').toJSON(),
236
+ },
237
+ {
238
+ HolidayName: 'Chinese New Year',
239
+ HolidayDate: new Date('January 25, 2020').toJSON(),
240
+ },
241
+ {
242
+ HolidayName: 'Good Friday',
243
+ HolidayDate: new Date('April 10, 2020').toJSON(),
244
+ },
245
+ {
246
+ HolidayName: 'Labour Day',
247
+ HolidayDate: new Date('May 01, 2020').toJSON(),
248
+ },
249
+ {
250
+ HolidayName: 'Vesak Day',
251
+ HolidayDate: new Date('May 07, 2020').toJSON(),
252
+ },
253
+ {
254
+ HolidayName: 'National Day',
255
+ HolidayDate: new Date('August 09, 2020').toJSON(),
256
+ },
257
+ {
258
+ HolidayName: 'Hari Raya Haji',
259
+ HolidayDate: new Date('August 10, 2020').toJSON(),
260
+ },
261
+ {
262
+ HolidayName: 'Deewali',
263
+ HolidayDate: new Date('November 14, 2020').toJSON(),
264
+ },
265
+ {
266
+ HolidayName: 'Christmas Day',
267
+ HolidayDate: new Date('December 25, 2020').toJSON(),
268
+ },
104
269
  ],
105
270
  },
106
271
  ];
@@ -19,7 +19,9 @@ export interface InputAction extends Action {
19
19
  export interface UIPrompt {
20
20
  Header: string;
21
21
  Msg: string;
22
- ConfirmAction: InputAction;
22
+ DefaultValue?: string;
23
+ ConfirmAction?: InputAction;
24
+ ConfirmActionCreator?: (inputText: string) => Action;
23
25
  }
24
26
  export interface ScreenPopup {
25
27
  ShowScreenPopup: boolean;
@@ -52,5 +54,7 @@ export interface PromptPopup {
52
54
  ShowPromptPopup: boolean;
53
55
  Header: string;
54
56
  Message: string;
55
- ConfirmAction: InputAction;
57
+ ConfirmAction?: InputAction;
58
+ DefaultValue?: string;
59
+ ConfirmActionCreator?: (inputText: string) => Action;
56
60
  }
@@ -280,6 +280,7 @@ function CreateEmptyFreeTextColumn(isFilterable) {
280
280
  DefaultValue: GeneralConstants_1.EMPTY_STRING,
281
281
  FreeTextStoredValues: [],
282
282
  TextEditor: 'Inline',
283
+ DataType: 'String',
283
284
  FreeTextColumnSettings: {
284
285
  Filterable: isFilterable,
285
286
  Resizable: true,
@@ -16,8 +16,12 @@ class AlertService {
16
16
  this.emitter = new Emitter_1.default();
17
17
  }
18
18
  createReactiveAlert(alertDefinition) {
19
- // if there is already an reactive alert for this definition, delete it (possible in case of editing definitions),
19
+ // if there is already a reactive alert for this definition, delete it (possible in case of editing definitions),
20
20
  this.deleteReactiveAlert(alertDefinition);
21
+ if (!alertDefinition.Rule.ObservableExpression &&
22
+ !alertDefinition.Rule.AggregatedBooleanExpression) {
23
+ return;
24
+ }
21
25
  const isValidExpression = this.isValidExpression(alertDefinition.Rule);
22
26
  if (!isValidExpression) {
23
27
  LoggingHelper_1.LogAdaptableWarning(`Could NOT create reactive alert due to invalid Rule definition!`, alertDefinition.Rule);
@@ -55,8 +59,8 @@ class AlertService {
55
59
  isValidExpression(rule) {
56
60
  return rule.ObservableExpression
57
61
  ? this.adaptable.api.queryLanguageApi.isValidObservableExpression(rule.ObservableExpression, ModuleConstants_1.AlertModuleId, `Invalid Alert rule with observable expression `)
58
- : rule.AggregationExpression
59
- ? this.adaptable.api.queryLanguageApi.isValidAggregationExpression(rule.AggregationExpression, ModuleConstants_1.AlertModuleId, `Invalid Alert rule with aggregation expression `)
62
+ : rule.AggregatedBooleanExpression
63
+ ? this.adaptable.api.queryLanguageApi.isValidAggregatedBooleanExpression(rule.AggregatedBooleanExpression, ModuleConstants_1.AlertModuleId, `Invalid Alert rule with aggregation expression `)
60
64
  : false;
61
65
  }
62
66
  evaluateReactiveExpression(rule) {
@@ -66,7 +70,7 @@ class AlertService {
66
70
  .evaluateObservableExpression(rule.ObservableExpression, ModuleConstants_1.AlertModuleId)
67
71
  : this.adaptable.api.internalApi
68
72
  .getQueryLanguageService()
69
- .evaluateAggregationExpression(rule.AggregationExpression, ModuleConstants_1.AlertModuleId);
73
+ .evaluateAggregatedBooleanExpression(rule.AggregatedBooleanExpression, ModuleConstants_1.AlertModuleId);
70
74
  }
71
75
  }
72
76
  exports.AlertService = AlertService;
@@ -1,11 +1,15 @@
1
1
  import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
2
2
  import { ICalculatedColumnExpressionService } from './Interface/ICalculatedColumnExpressionService';
3
3
  import { RowNode } from '@ag-grid-community/all-modules';
4
+ import { AdaptableCalculatedColumnQuery, CalculatedColumn } from '../../PredefinedConfig/CalculatedColumnState';
4
5
  export declare class CalculatedColumnExpressionService implements ICalculatedColumnExpressionService {
5
6
  private adaptable;
7
+ private aggregatedScalarCalculatedColumnsMap;
6
8
  constructor(adaptable: IAdaptable);
7
- GetCalculatedColumnDataType(expression: string): 'String' | 'Number' | 'Boolean' | 'Date';
8
- IsExpressionValid(expression: string): boolean;
9
- ComputeExpressionValue(expression: string, node: RowNode): any;
9
+ getCalculatedColumnDataType(calculatedColumnQuery: AdaptableCalculatedColumnQuery): 'String' | 'Number' | 'Boolean' | 'Date';
10
+ isCalculatedColumnQueryValid(calculatedColumnQuery: AdaptableCalculatedColumnQuery): boolean;
11
+ evaluateCalculatedColumnQuery(calculatedColumn: CalculatedColumn, node: RowNode): any;
12
+ createAggregatedScalarCalculatedColumn(calculatedColumn: CalculatedColumn): void;
13
+ destroyAggregatedScalarCalculatedColumn(calculatedColumn: CalculatedColumn): void;
10
14
  destroy(): void;
11
15
  }