@adaptabletools/adaptable 17.0.0-canary.0 → 17.0.0-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 (398) hide show
  1. package/base.css +1203 -1207
  2. package/base.css.map +1 -1
  3. package/index.css +28 -1989
  4. package/index.css.map +1 -1
  5. package/package.json +10 -108
  6. package/src/AdaptableInterfaces/AdaptableNoCodeWizard.d.ts +2 -2
  7. package/src/AdaptableInterfaces/IAdaptable.d.ts +16 -11
  8. package/src/AdaptableOptions/ActionRowOptions.d.ts +25 -3
  9. package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +3 -3
  10. package/src/AdaptableOptions/AdaptableOptions.d.ts +10 -1
  11. package/src/AdaptableOptions/AdaptablePlugin.d.ts +1 -1
  12. package/src/AdaptableOptions/AlertOptions.d.ts +2 -2
  13. package/src/AdaptableOptions/ColumnFilterOptions.d.ts +110 -91
  14. package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +1 -1
  15. package/src/AdaptableOptions/DateInputOptions.d.ts +1 -1
  16. package/src/AdaptableOptions/EditOptions.d.ts +2 -2
  17. package/src/AdaptableOptions/ExportOptions.d.ts +3 -3
  18. package/src/AdaptableOptions/ExpressionOptions.d.ts +2 -2
  19. package/src/AdaptableOptions/Fdc3Options.d.ts +10 -4
  20. package/src/AdaptableOptions/GridFilterOptions.d.ts +18 -0
  21. package/src/AdaptableOptions/LayoutOptions.d.ts +1 -1
  22. package/src/AdaptableOptions/MenuOptions.d.ts +10 -4
  23. package/src/AdaptableOptions/NotificationsOptions.d.ts +1 -1
  24. package/src/AdaptableOptions/QuickSearchOptions.d.ts +4 -4
  25. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +1 -16
  26. package/src/Api/ColumnApi.d.ts +4 -0
  27. package/src/Api/ColumnFilterApi.d.ts +2 -5
  28. package/src/Api/DashboardApi.d.ts +0 -11
  29. package/src/Api/EventApi.d.ts +2 -30
  30. package/src/Api/Events/ActionRowSubmitted.d.ts +1 -5
  31. package/src/Api/Events/AdaptableSearchState.d.ts +2 -7
  32. package/src/Api/Events/Fdc3MessageInfo.d.ts +1 -1
  33. package/src/Api/Events/GridFilterApplied.d.ts +2 -1
  34. package/src/Api/ExportApi.d.ts +0 -4
  35. package/src/Api/GridFilterApi.d.ts +26 -8
  36. package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -0
  37. package/src/Api/Implementation/ColumnApiImpl.js +4 -0
  38. package/src/Api/Implementation/ColumnFilterApiImpl.d.ts +1 -1
  39. package/src/Api/Implementation/ColumnFilterApiImpl.js +3 -3
  40. package/src/Api/Implementation/ConfigApiImpl.js +1 -2
  41. package/src/Api/Implementation/DashboardApiImpl.d.ts +0 -2
  42. package/src/Api/Implementation/DashboardApiImpl.js +0 -14
  43. package/src/Api/Implementation/ExportApiImpl.d.ts +0 -1
  44. package/src/Api/Implementation/ExportApiImpl.js +0 -3
  45. package/src/Api/Implementation/GridApiImpl.js +2 -2
  46. package/src/Api/Implementation/GridFilterApiImpl.d.ts +6 -1
  47. package/src/Api/Implementation/GridFilterApiImpl.js +22 -3
  48. package/src/Api/Implementation/NamedQueryApiImpl.d.ts +2 -5
  49. package/src/Api/Implementation/NamedQueryApiImpl.js +2 -2
  50. package/src/Api/Implementation/OptionsApiImpl.d.ts +2 -1
  51. package/src/Api/Implementation/OptionsApiImpl.js +3 -0
  52. package/src/Api/Implementation/UserInterfaceApiImpl.js +2 -2
  53. package/src/Api/Internal/ActionRowInternalApi.d.ts +1 -0
  54. package/src/Api/Internal/ActionRowInternalApi.js +17 -3
  55. package/src/Api/Internal/AlertInternalApi.d.ts +1 -7
  56. package/src/Api/Internal/ColumnFilterInternalApi.d.ts +2 -2
  57. package/src/Api/Internal/ColumnFilterInternalApi.js +9 -9
  58. package/src/Api/Internal/ColumnInternalApi.d.ts +0 -10
  59. package/src/Api/Internal/ColumnInternalApi.js +0 -28
  60. package/src/Api/Internal/Fdc3InternalApi.d.ts +2 -2
  61. package/src/Api/Internal/FormatColumnInternalApi.js +6 -6
  62. package/src/Api/Internal/GridFilterInternalApi.d.ts +1 -1
  63. package/src/Api/Internal/GridFilterInternalApi.js +5 -5
  64. package/src/Api/Internal/GridInternalApi.js +31 -9
  65. package/src/Api/Internal/LayoutInternalApi.js +8 -0
  66. package/src/Api/Internal/PredicateInternalApi.js +3 -3
  67. package/src/Api/Internal/StyledColumnInternalApi.d.ts +0 -3
  68. package/src/Api/Internal/StyledColumnInternalApi.js +0 -27
  69. package/src/Api/NamedQueryApi.d.ts +6 -5
  70. package/src/Api/OptionsApi.d.ts +5 -1
  71. package/src/PredefinedConfig/AlertState.d.ts +6 -6
  72. package/src/PredefinedConfig/CalculatedColumnState.d.ts +1 -1
  73. package/src/PredefinedConfig/ChartingState.d.ts +4 -1
  74. package/src/PredefinedConfig/Common/AdaptableAlert.d.ts +2 -2
  75. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +1 -1
  76. package/src/PredefinedConfig/Common/AdaptableComparerFunction.d.ts +2 -2
  77. package/src/PredefinedConfig/Common/AdaptableForm.d.ts +2 -2
  78. package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +1 -1
  79. package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +2 -2
  80. package/src/PredefinedConfig/Common/AdaptableMessageType.d.ts +1 -1
  81. package/src/PredefinedConfig/Common/AdaptableObject.d.ts +1 -1
  82. package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +3 -3
  83. package/src/PredefinedConfig/Common/AdaptablePredicate.js +45 -58
  84. package/src/PredefinedConfig/Common/AdaptableQuery.d.ts +1 -1
  85. package/src/PredefinedConfig/Common/AdaptableScope.d.ts +5 -5
  86. package/src/PredefinedConfig/Common/AggregationColumns.d.ts +1 -1
  87. package/src/PredefinedConfig/Common/ColumnFilter.d.ts +2 -2
  88. package/src/PredefinedConfig/Common/Entitlement.d.ts +1 -1
  89. package/src/PredefinedConfig/Common/Fdc3Context.d.ts +133 -37
  90. package/src/PredefinedConfig/Common/Fdc3Intent.d.ts +4 -4
  91. package/src/PredefinedConfig/Common/Schedule.d.ts +2 -2
  92. package/src/PredefinedConfig/Common/Types.d.ts +15 -15
  93. package/src/PredefinedConfig/ExportState.d.ts +4 -4
  94. package/src/PredefinedConfig/FlashingCellState.d.ts +4 -4
  95. package/src/PredefinedConfig/FormatColumnState.d.ts +4 -27
  96. package/src/PredefinedConfig/NotesState.d.ts +2 -2
  97. package/src/PredefinedConfig/PredefinedConfig.d.ts +0 -5
  98. package/src/PredefinedConfig/ShortcutState.d.ts +1 -1
  99. package/src/PredefinedConfig/StyledColumnState.d.ts +8 -13
  100. package/src/PredefinedConfig/SystemState.d.ts +3 -3
  101. package/src/PredefinedConfig/TeamSharingState.d.ts +3 -3
  102. package/src/PredefinedConfig/ToolPanelState.d.ts +1 -1
  103. package/src/PredefinedConfig/Uuid.d.ts +1 -1
  104. package/src/Redux/ActionsReducers/GridRedux.d.ts +6 -1
  105. package/src/Redux/ActionsReducers/GridRedux.js +18 -0
  106. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +37 -16
  107. package/src/Redux/ActionsReducers/LayoutRedux.js +69 -16
  108. package/src/Redux/Store/AdaptableReduxMerger.d.ts +1 -1
  109. package/src/Redux/Store/AdaptableStore.d.ts +2 -2
  110. package/src/Redux/Store/AdaptableStore.js +46 -19
  111. package/src/Strategy/AdaptableModuleBase.d.ts +0 -1
  112. package/src/Strategy/AdaptableModuleBase.js +0 -30
  113. package/src/Strategy/AlertModule.js +1 -1
  114. package/src/Strategy/ChartingModule.js +8 -5
  115. package/src/Strategy/ColumnFilterModule.d.ts +2 -0
  116. package/src/Strategy/ColumnFilterModule.js +78 -40
  117. package/src/Strategy/CustomSortModule.js +1 -1
  118. package/src/Strategy/FlashingCellModule.js +1 -1
  119. package/src/Strategy/Interface/IModule.d.ts +3 -3
  120. package/src/Strategy/LayoutModule.js +5 -0
  121. package/src/Strategy/StyledColumnModule.js +2 -53
  122. package/src/Utilities/Constants/GeneralConstants.d.ts +3 -0
  123. package/src/Utilities/Constants/GeneralConstants.js +3 -0
  124. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +31 -23
  125. package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +1 -1
  126. package/src/Utilities/Defaults/DefaultSettingsPanel.js +2 -2
  127. package/src/Utilities/Emitter.d.ts +2 -2
  128. package/src/Utilities/Emitter.js +2 -2
  129. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.d.ts +3 -3
  130. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +3 -3
  131. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.d.ts +1 -1
  132. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +55 -5
  133. package/src/Utilities/ExpressionFunctions/dateUtils.d.ts +1 -0
  134. package/src/Utilities/ExpressionFunctions/dateUtils.js +9 -0
  135. package/src/Utilities/ExpressionFunctions/deepMap.d.ts +3 -3
  136. package/src/Utilities/ExpressionFunctions/deepMap.js +7 -7
  137. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.d.ts +1 -1
  138. package/src/Utilities/ExpressionFunctions/groupingMap.d.ts +7 -7
  139. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.d.ts +1 -1
  140. package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.d.ts +7 -7
  141. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
  142. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +11 -1
  143. package/src/Utilities/Extensions/TypeExtensions.d.ts +8 -8
  144. package/src/Utilities/Helpers/AdaptableHelper.js +4 -0
  145. package/src/Utilities/ObjectFactory.js +1 -1
  146. package/src/Utilities/Services/EntitlementService.d.ts +0 -1
  147. package/src/Utilities/Services/EntitlementService.js +0 -8
  148. package/src/Utilities/Services/Interface/IAlertService.d.ts +3 -3
  149. package/src/Utilities/Services/Interface/IEntitlementService.d.ts +0 -6
  150. package/src/Utilities/Services/Interface/IMetamodelService.d.ts +1 -1
  151. package/src/Utilities/Services/LicenseService/index.js +181 -1
  152. package/src/Utilities/Services/MetamodelService.js +1 -1
  153. package/src/Utilities/Services/ModuleService.js +1 -1
  154. package/src/Utilities/license/LicenseDetails.d.ts +1 -1
  155. package/src/Utilities/license/decode.js +65 -1
  156. package/src/Utilities/license/hashing.js +43 -1
  157. package/src/Utilities/logDeprecation.d.ts +5 -3
  158. package/src/View/AdaptablePopover/index.d.ts +1 -0
  159. package/src/View/AdaptablePopover/index.js +1 -1
  160. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.js +1 -1
  161. package/src/View/Alert/AlertEmptyView.js +1 -1
  162. package/src/View/Alert/Utilities/getAvailablePredicates.js +1 -1
  163. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.d.ts +1 -1
  164. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +20 -4
  165. package/src/View/Alert/Wizard/AlertButtonsEditor.d.ts +1 -1
  166. package/src/View/Alert/Wizard/AlertButtonsEditor.js +21 -24
  167. package/src/View/Alert/Wizard/AlertMessageWizardSection.d.ts +1 -1
  168. package/src/View/Alert/Wizard/AlertNotificationWizardSection.d.ts +1 -1
  169. package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +1 -1
  170. package/src/View/Alert/Wizard/AlertRulesWizardSection.js +1 -1
  171. package/src/View/Alert/Wizard/AlertScopeWizardSection.d.ts +1 -1
  172. package/src/View/Alert/Wizard/AlertScopeWizardSection.js +1 -1
  173. package/src/View/Alert/Wizard/AlertTypeWizardSection.d.ts +1 -1
  174. package/src/View/Alert/Wizard/AlertWizard.js +1 -1
  175. package/src/View/Alert/Wizard/isValidAlertRules.js +1 -1
  176. package/src/View/BulkUpdate/BulkUpdatePopup.js +3 -9
  177. package/src/View/BulkUpdate/BulkUpdateViewPanel.js +2 -2
  178. package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.d.ts +1 -1
  179. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.d.ts +1 -1
  180. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.d.ts +1 -1
  181. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +9 -18
  182. package/src/View/CalculatedColumn/Wizard/CalculatedColumnTypeSection.d.ts +1 -1
  183. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.d.ts +1 -1
  184. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +2 -2
  185. package/src/View/CellSummary/CellSummaryStatusBarSubPanelPopover.js +5 -1
  186. package/src/View/CellSummary/CellSummaryViewPanel.js +5 -5
  187. package/src/View/ColumnInfo/ColumnInfo.js +7 -8
  188. package/src/View/Components/AdaptableDateInput/index.d.ts +2 -2
  189. package/src/View/Components/AdaptableInput/index.d.ts +1 -1
  190. package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +2 -2
  191. package/src/View/Components/Buttons/ButtonBase/index.d.ts +1 -1
  192. package/src/View/Components/Buttons/ButtonOpen.d.ts +5 -0
  193. package/src/View/Components/Buttons/ButtonOpen.js +7 -0
  194. package/src/View/Components/Buttons/ButtonUnsuspend.d.ts +8 -0
  195. package/src/View/Components/Buttons/ButtonUnsuspend.js +17 -0
  196. package/src/View/Components/CellPopup/index.d.ts +1 -1
  197. package/src/View/Components/ColumnSelector/index.d.ts +1 -1
  198. package/src/View/Components/EntityRulesEditor/index.d.ts +2 -2
  199. package/src/View/Components/EntityRulesEditor/index.js +11 -3
  200. package/src/View/Components/ExternalRenderer.d.ts +1 -1
  201. package/src/View/Components/FilterForm/FilterForm.js +24 -24
  202. package/src/View/Components/FilterForm/QuickFilterForm.js +3 -3
  203. package/src/View/Components/FilterForm/QuickFilterValues.d.ts +2 -2
  204. package/src/View/Components/FilterForm/QuickFilterValues.js +2 -2
  205. package/src/View/Components/FilterForm/Waiting.d.ts +1 -1
  206. package/src/View/Components/Forms/AdaptableFormControlTextClear.d.ts +1 -1
  207. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +1 -1
  208. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +2 -2
  209. package/src/View/Components/PredicateEditor/PredicateEditor.js +10 -10
  210. package/src/View/Components/RangesComponent.js +11 -8
  211. package/src/View/Components/Selectors/ColumnSelector.d.ts +12 -17
  212. package/src/View/Components/Selectors/ColumnSelector.js +23 -42
  213. package/src/View/Components/Selectors/ColumnSelectorOld.d.ts +18 -0
  214. package/src/View/Components/Selectors/ColumnSelectorOld.js +46 -0
  215. package/src/View/Components/Selectors/ColumnValueSelector.d.ts +4 -23
  216. package/src/View/Components/Selectors/ColumnValueSelector.js +34 -126
  217. package/src/View/Components/Selectors/PermittedValuesSelector.d.ts +13 -0
  218. package/src/View/Components/Selectors/PermittedValuesSelector.js +46 -0
  219. package/src/View/Components/StyleComponent.d.ts +2 -3
  220. package/src/View/Components/StyleComponent.js +37 -40
  221. package/src/View/Components/ToolPanel/ToolPanelPopup.js +2 -2
  222. package/src/View/Components/ToolPanel/ToolPanelWrapper.d.ts +1 -1
  223. package/src/View/Components/ValueSelector/index.d.ts +2 -2
  224. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.d.ts +1 -1
  225. package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.d.ts +1 -1
  226. package/src/View/CustomSort/Wizard/CustomSortWizard.js +1 -1
  227. package/src/View/Dashboard/DashboardPopup.js +4 -4
  228. package/src/View/Dashboard/DashboardToolbarFactory.js +0 -1
  229. package/src/View/Dashboard/PinnedDashboard.js +6 -3
  230. package/src/View/Dashboard/PinnedToolbarsSelector.js +1 -1
  231. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +3 -1
  232. package/src/View/DataImport/DataImportPopup.js +1 -1
  233. package/src/View/DataImport/DataImportWizard/DataImportWizard.d.ts +1 -1
  234. package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadSection.d.ts +1 -1
  235. package/src/View/DataSet/DataSetViewPanel.js +3 -2
  236. package/src/View/Export/ExportViewPanel.js +12 -9
  237. package/src/View/Export/Wizard/ReportColumnsWizardSection.d.ts +1 -1
  238. package/src/View/Export/Wizard/ReportNameWizardSection.d.ts +1 -1
  239. package/src/View/Export/Wizard/ReportRowsWizardSection.d.ts +1 -1
  240. package/src/View/Filter/FilterViewPanel.js +1 -1
  241. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +1 -1
  242. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.d.ts +1 -1
  243. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +2 -2
  244. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.d.ts +1 -1
  245. package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.d.ts +1 -1
  246. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +8 -8
  247. package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +1 -1
  248. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +1 -1
  249. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +10 -9
  250. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +1 -1
  251. package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.d.ts +1 -1
  252. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.d.ts +1 -1
  253. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +1 -1
  254. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +3 -1
  255. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +1 -1
  256. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +7 -17
  257. package/src/View/GridFilter/GridFilterExpressionEditor.js +62 -9
  258. package/src/View/GridFilter/GridFilterPopup.js +36 -6
  259. package/src/View/GridFilter/GridFilterStatusbar.js +0 -1
  260. package/src/View/GridFilter/GridFilterViewPanel.d.ts +2 -26
  261. package/src/View/GridFilter/GridFilterViewPanel.js +49 -150
  262. package/src/View/GridFilter/NamedQuerySelector.d.ts +16 -0
  263. package/src/View/GridFilter/NamedQuerySelector.js +50 -0
  264. package/src/View/GridFilter/useGridFilterExpressionEditor.d.ts +24 -0
  265. package/src/View/GridFilter/useGridFilterExpressionEditor.js +123 -0
  266. package/src/View/GridFilter/useGridFilterOptionsForExpressionEditor.d.ts +4 -0
  267. package/src/View/GridFilter/useGridFilterOptionsForExpressionEditor.js +27 -0
  268. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +5 -3
  269. package/src/View/Layout/LayoutViewPanel.js +4 -3
  270. package/src/View/Layout/SaveLayoutButton.js +2 -1
  271. package/src/View/Layout/Wizard/LayoutWizard.js +10 -0
  272. package/src/View/Layout/Wizard/sections/FilterSection.js +15 -17
  273. package/src/View/Layout/Wizard/sections/GridFilterSection.d.ts +9 -0
  274. package/src/View/Layout/Wizard/sections/GridFilterSection.js +37 -0
  275. package/src/View/License/LicenseWatermark.js +61 -1
  276. package/src/View/NamedQuery/EditCurrentQueryButton.js +1 -1
  277. package/src/View/NamedQuery/Wizard/NamedQuerySettingsWizardSection.js +1 -1
  278. package/src/View/NamedQuery/Wizard/NamedQueryWizard.js +2 -2
  279. package/src/View/QuickSearch/QuickSearchPopup.js +1 -1
  280. package/src/View/QuickSearch/useQuickSearchDebounced.d.ts +1 -1
  281. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +5 -2
  282. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.d.ts +1 -1
  283. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +6 -5
  284. package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +6 -7
  285. package/src/View/Shortcut/Wizard/ShortcutWizard.js +4 -3
  286. package/src/View/SmartEdit/SmartEditViewPanel.js +7 -5
  287. package/src/View/SpecialColumnSettingsWizardStep.js +4 -1
  288. package/src/View/StateManagement/StateManagementPopup.js +6 -6
  289. package/src/View/StatusBar/StatusBarPopup.js +1 -1
  290. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +16 -8
  291. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +20 -23
  292. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +2 -3
  293. package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.d.ts +1 -1
  294. package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +7 -5
  295. package/src/View/StyledColumn/Wizard/StyledColumnWizardSettingsSection.d.ts +1 -1
  296. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +4 -4
  297. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +0 -8
  298. package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +2 -9
  299. package/src/View/SystemStatus/SystemStatusViewPanel.js +1 -1
  300. package/src/View/SystemStatus/Utilities/getStatusItemStyle.js +1 -1
  301. package/src/View/Theme/ThemeEditor.d.ts +1 -1
  302. package/src/View/Theme/ThemeViewPanel.js +4 -3
  303. package/src/View/UIHelper.d.ts +1 -1
  304. package/src/View/Wizard/ObjectTagsWizardSection.d.ts +1 -1
  305. package/src/View/Wizard/OnePageAdaptableWizard.d.ts +1 -1
  306. package/src/View/Wizard/OnePageWizards.d.ts +2 -2
  307. package/src/agGrid/Adaptable.d.ts +20 -17
  308. package/src/agGrid/Adaptable.js +192 -189
  309. package/src/agGrid/AdaptableLogger.js +14 -14
  310. package/src/agGrid/CheckboxRenderer.d.ts +5 -0
  311. package/src/agGrid/CheckboxRenderer.js +5 -1
  312. package/src/agGrid/ColumnSetupInfo.d.ts +1 -1
  313. package/src/agGrid/agGridHelper.d.ts +0 -1
  314. package/src/agGrid/agGridHelper.js +15 -13
  315. package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.d.ts +2 -2
  316. package/src/agGrid/editors/AdaptableNumberEditor/InternalAdaptableNumberEditor.d.ts +2 -2
  317. package/src/components/CheckBox/index.d.ts +1 -1
  318. package/src/components/ColorPicker/ColorPicker.d.ts +2 -2
  319. package/src/components/ContainerProps.d.ts +2 -2
  320. package/src/components/Dashboard/Dashboard.d.ts +2 -2
  321. package/src/components/Dashboard/DashboardTab.d.ts +1 -1
  322. package/src/components/Dashboard/DashboardToolbar.d.ts +1 -1
  323. package/src/components/Datepicker/index.d.ts +2 -2
  324. package/src/components/Dialog/index.d.ts +2 -2
  325. package/src/components/Dropdown/index.d.ts +2 -2
  326. package/src/components/DropdownButton/DropdownButtonItem.d.ts +1 -1
  327. package/src/components/DropdownButton/index.d.ts +1 -1
  328. package/src/components/DropdownButton/renderItem.d.ts +1 -1
  329. package/src/components/DropdownButton/useExpanded.d.ts +1 -1
  330. package/src/components/EllipsisContainer/index.d.ts +1 -1
  331. package/src/components/EmptyContent/index.d.ts +1 -1
  332. package/src/components/ExpressionEditor/BaseEditorInput.js +1 -1
  333. package/src/components/ExpressionEditor/NamedQueryContext.d.ts +1 -1
  334. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilder.js +45 -15
  335. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.d.ts +7 -2
  336. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +48 -33
  337. package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.d.ts +1 -1
  338. package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +6 -6
  339. package/src/components/ExpressionEditor/QueryBuilder/booleanExpressions.js +2 -0
  340. package/src/components/ExpressionEditor/QueryBuilder/utils.d.ts +2 -1
  341. package/src/components/ExpressionEditor/QueryBuilder/utils.js +30 -0
  342. package/src/components/ExpressionEditor/index.d.ts +2 -1
  343. package/src/components/ExpressionEditor/index.js +81 -59
  344. package/src/components/FormLayout/index.d.ts +4 -4
  345. package/src/components/Input/NumberInput.d.ts +1 -1
  346. package/src/components/Input/index.d.ts +2 -2
  347. package/src/components/List/ListGroupItem/index.d.ts +2 -2
  348. package/src/components/Modal/Backdrop.d.ts +2 -2
  349. package/src/components/OverlayTrigger/index.d.ts +1 -1
  350. package/src/components/Panel/index.d.ts +1 -1
  351. package/src/components/Radio/index.d.ts +1 -1
  352. package/src/components/ResizeObserver/index.d.ts +1 -1
  353. package/src/components/Select/Select.d.ts +30 -0
  354. package/src/components/Select/Select.js +128 -0
  355. package/src/components/Select/index.d.ts +1 -0
  356. package/src/components/Select/index.js +1 -0
  357. package/src/components/SelectableList/index.d.ts +1 -1
  358. package/src/components/Tabs/index.d.ts +3 -3
  359. package/src/components/Textarea/index.d.ts +1 -1
  360. package/src/components/Toggle/Toggle.d.ts +1 -1
  361. package/src/components/WarningBox/index.d.ts +4 -0
  362. package/src/components/WarningBox/index.js +7 -0
  363. package/src/components/WindowModal/WindowModal.d.ts +2 -2
  364. package/src/components/icons/DefaultIcon.d.ts +1 -1
  365. package/src/components/icons/index.js +2 -0
  366. package/src/components/icons/resume.d.ts +3 -0
  367. package/src/components/icons/resume.js +4 -0
  368. package/src/components/utils/useContainerScrollObserver/index.d.ts +1 -1
  369. package/src/components/utils/uuid.d.ts +1 -1
  370. package/src/metamodel/adaptable-metamodel-model.d.ts +2 -2
  371. package/src/metamodel/adaptable.metamodel.d.ts +330 -27
  372. package/src/metamodel/adaptable.metamodel.js +9435 -1
  373. package/src/parser/src/predicate/mapExpressionToQlPredicate.js +1 -1
  374. package/src/parser/src/predicate/mapQlPredicateToExpression.js +3 -0
  375. package/src/parser/src/predicate/types.d.ts +2 -2
  376. package/src/parser/src/types.d.ts +23 -11
  377. package/src/renderReactRoot.d.ts +2 -4
  378. package/src/renderReactRoot.js +5 -46
  379. package/src/types.d.ts +6 -6
  380. package/themes/dark.css +1 -1
  381. package/themes/dark.css.map +1 -1
  382. package/themes/light.css +1 -1
  383. package/themes/light.css.map +1 -1
  384. package/tsconfig.esm.tsbuildinfo +1 -0
  385. package/publishTimestamp.d.ts +0 -2
  386. package/publishTimestamp.js +0 -1
  387. package/src/AdaptableOptions/FilterOptions.d.ts +0 -216
  388. package/src/AdaptableOptions/FinancePluginOptions.d.ts +0 -6
  389. package/src/AdaptableOptions/FinancePluginOptions.js +0 -1
  390. package/src/Api/Events/ChexboxColumnClicked.d.ts +0 -24
  391. package/src/Api/Events/ChexboxColumnClicked.js +0 -1
  392. package/src/Api/Events/QueryRun.d.ts +0 -15
  393. package/src/Api/Events/QueryRun.js +0 -1
  394. package/src/PredefinedConfig/ConditionalStyleState.d.ts +0 -41
  395. package/src/PredefinedConfig/ConditionalStyleState.js +0 -1
  396. package/version.d.ts +0 -2
  397. package/version.js +0 -1
  398. /package/src/AdaptableOptions/{FilterOptions.js → GridFilterOptions.js} +0 -0
@@ -8,3 +8,12 @@ export const normalizeDateParams = (args) => {
8
8
  }
9
9
  return [first, second];
10
10
  };
11
+ export const normalizeDateParam = (args) => {
12
+ if (typeof args === 'string') {
13
+ args = new Date(args);
14
+ }
15
+ if (typeof args === 'number') {
16
+ args = new Date(args);
17
+ }
18
+ return args;
19
+ };
@@ -1,10 +1,10 @@
1
- declare type VoidFn = () => void;
2
- declare type Pair<KeyType, ValueType> = {
1
+ type VoidFn = () => void;
2
+ type Pair<KeyType, ValueType> = {
3
3
  value?: ValueType;
4
4
  map?: Map<KeyType, Pair<KeyType, ValueType>>;
5
5
  revision?: number;
6
6
  };
7
- export declare type DeepMapVisitFn<KeyType, ValueType> = (pair: Pair<KeyType, ValueType>, keys: KeyType[], next: VoidFn) => void;
7
+ export type DeepMapVisitFn<KeyType, ValueType> = (pair: Pair<KeyType, ValueType>, keys: KeyType[], next: VoidFn) => void;
8
8
  export declare class DeepMap<KeyType, ValueType> {
9
9
  private map;
10
10
  private length;
@@ -1,5 +1,12 @@
1
1
  const SORT_ASC_REVISION = (p1, p2) => sortAscending(p1.revision, p2.revision);
2
2
  export class DeepMap {
3
+ static clone(map) {
4
+ const clone = new DeepMap();
5
+ map.visit((pair, keys) => {
6
+ clone.set(keys, pair.value);
7
+ });
8
+ return clone;
9
+ }
3
10
  constructor(initial) {
4
11
  this.map = new Map();
5
12
  this.length = 0;
@@ -39,13 +46,6 @@ export class DeepMap {
39
46
  });
40
47
  }
41
48
  }
42
- static clone(map) {
43
- const clone = new DeepMap();
44
- map.visit((pair, keys) => {
45
- clone.set(keys, pair.value);
46
- });
47
- return clone;
48
- }
49
49
  set(keys, value) {
50
50
  let currentMap = this.map;
51
51
  if (!keys.length) {
@@ -16,7 +16,7 @@ export declare const isTextSearchCaseInsensitive: (context: ExpressionContext) =
16
16
  export declare const getDataChangeLog$: (context: ExpressionContext, columnNameFilter: string) => Observable<CellDataChangedInfo>;
17
17
  export declare const getGridChangeLog$: (context: ExpressionContext, gridChangeType: GridDataChangedInfo['rowTrigger']) => Observable<GridDataChangedInfo>;
18
18
  export declare const handleWhereFunction: (args: ExpressionNode[], context: ExpressionContext) => any;
19
- export declare type ExpressionNode = any;
19
+ export type ExpressionNode = any;
20
20
  export declare const evaluateExpressionNode: (expressionNode: ExpressionNode, context: ExpressionContext, filterFn?: (item: any) => boolean) => any;
21
21
  export declare const extractColumnParameter: (consumingFunctionName: string, args: BaseParameter[]) => ColumnParameter;
22
22
  export declare const extractColumnParameters: (consumingFunctionName: string, args: BaseParameter[]) => ColumnParameter[];
@@ -1,15 +1,15 @@
1
1
  import { DeepMap } from './deepMap';
2
- export declare type GroupKeyType<T extends any = any> = T;
3
- export declare type GroupBy<DataType, KeyType> = {
2
+ export type GroupKeyType<T extends any = any> = T;
3
+ export type GroupBy<DataType, KeyType> = {
4
4
  field: keyof DataType;
5
5
  toKey?: (value: any, data: DataType) => GroupKeyType<KeyType>;
6
6
  };
7
- export declare type GroupParams<DataType, KeyType> = {
7
+ export type GroupParams<DataType, KeyType> = {
8
8
  groupBy: GroupBy<DataType, KeyType>[];
9
9
  defaultToKey?: (value: any, item: DataType) => GroupKeyType<KeyType>;
10
10
  reducers?: Record<string, DataSourceAggregationReducer<DataType, any>>;
11
11
  };
12
- export declare type DataSourceAggregationReducer<T, AggregationResultType> = {
12
+ export type DataSourceAggregationReducer<T, AggregationResultType> = {
13
13
  name?: string;
14
14
  field?: keyof T;
15
15
  initialValue?: AggregationResultType;
@@ -17,18 +17,18 @@ export declare type DataSourceAggregationReducer<T, AggregationResultType> = {
17
17
  reducer: string | ((accumulator: any, value: any, data: T) => AggregationResultType | any);
18
18
  done?: (accumulatedValue: AggregationResultType | any, array: T[]) => AggregationResultType;
19
19
  };
20
- export declare type DataGroupResult<DataType, KeyType extends any> = {
20
+ export type DataGroupResult<DataType, KeyType extends any> = {
21
21
  deepMap: DeepMap<GroupKeyType<KeyType>, DeepMapGroupValueType<DataType, KeyType>>;
22
22
  groupParams: GroupParams<DataType, KeyType>;
23
23
  initialData: DataType[];
24
24
  reducerResults?: Record<string, any>;
25
25
  };
26
- export declare type DeepMapGroupValueType<DataType, KeyType> = {
26
+ export type DeepMapGroupValueType<DataType, KeyType> = {
27
27
  items: DataType[];
28
28
  commonData?: Partial<DataType>;
29
29
  reducerResults: Record<string, any>;
30
30
  };
31
- export declare type AggregationReducerResult<AggregationResultType extends any = any> = {
31
+ export type AggregationReducerResult<AggregationResultType extends any = any> = {
32
32
  value: AggregationResultType;
33
33
  id: string;
34
34
  };
@@ -2,6 +2,6 @@ import { ExpressionFunction } from '../../parser/src/types';
2
2
  /**
3
3
  * List of all the Observable Functions available in AdaptableQL
4
4
  */
5
- export declare type ObservableFunctionName = 'WHERE' | 'COL' | 'TIMEFRAME' | 'ROW_CHANGE' | 'ROW_ADDED' | 'GRID_CHANGE' | 'ROW_REMOVED' | 'MAX' | 'MIN' | 'NONE' | 'COUNT';
5
+ export type ObservableFunctionName = 'WHERE' | 'COL' | 'TIMEFRAME' | 'ROW_CHANGE' | 'ROW_ADDED' | 'GRID_CHANGE' | 'ROW_REMOVED' | 'MAX' | 'MIN' | 'NONE' | 'COUNT';
6
6
  export declare const observableExpressionFunctions: Record<ObservableFunctionName, ExpressionFunction>;
7
7
  export declare const observableExpressionFunctionNames: ObservableFunctionName[];
@@ -1,15 +1,15 @@
1
1
  import { DeepMap } from './deepMap';
2
- export declare type GroupKeyType<T extends any = any> = T;
3
- export declare type GroupBy<DataType, KeyType> = {
2
+ export type GroupKeyType<T extends any = any> = T;
3
+ export type GroupBy<DataType, KeyType> = {
4
4
  field: keyof DataType & string;
5
5
  toKey?: (value: any, data: DataType) => GroupKeyType<KeyType>;
6
6
  };
7
- export declare type AggregateParams<DataType, KeyType> = {
7
+ export type AggregateParams<DataType, KeyType> = {
8
8
  reducers: Record<string, DataAggregationReducer<DataType, any>>;
9
9
  groupBy?: GroupBy<DataType, KeyType>[];
10
10
  defaultToKey?: (value: any, item: DataType) => GroupKeyType<KeyType>;
11
11
  };
12
- export declare type DataAggregationReducer<T, AggregationResultType> = {
12
+ export type DataAggregationReducer<T, AggregationResultType> = {
13
13
  name?: string;
14
14
  field?: keyof T & string;
15
15
  initialValue?: AggregationResultType;
@@ -17,16 +17,16 @@ export declare type DataAggregationReducer<T, AggregationResultType> = {
17
17
  reducer: string | ((accumulator: any, value: any, data: T, dataIndex: number) => AggregationResultType | any);
18
18
  done?: (accumulatedValue: AggregationResultType | any, array: T[]) => AggregationResultType;
19
19
  };
20
- export declare type DataAggregationResult<DataType, KeyType extends any> = {
20
+ export type DataAggregationResult<DataType, KeyType extends any> = {
21
21
  deepMap: DeepMap<GroupKeyType<KeyType>, DeepMapAggregationValueType<DataType, KeyType>>;
22
22
  aggregateParams: AggregateParams<DataType, KeyType>;
23
23
  initialData: DataType[];
24
24
  reducerResults?: Record<string, AggregationReducerResult>;
25
25
  };
26
- export declare type DeepMapAggregationValueType<DataType, KeyType> = {
26
+ export type DeepMapAggregationValueType<DataType, KeyType> = {
27
27
  items: DataType[];
28
28
  commonData?: Partial<DataType>;
29
29
  reducerResults: Record<string, AggregationReducerResult>;
30
30
  };
31
- export declare type AggregationReducerResult = number;
31
+ export type AggregationReducerResult = number;
32
32
  export declare function aggregate<DataType, KeyType = any>(aggregateParams: AggregateParams<DataType, KeyType>, data: DataType[]): DataAggregationResult<DataType, KeyType>;
@@ -2,6 +2,6 @@ import { ExpressionFunction } from '../../parser/src/types';
2
2
  /**
3
3
  * List of all the Scalar Functions available in AdaptableQL
4
4
  */
5
- export declare type ScalarFunctionName = 'ADD' | 'SUB' | 'MUL' | 'DIV' | 'MOD' | 'POW' | 'ABS' | 'CEILING' | 'FLOOR' | 'ROUND' | 'MIN' | 'MAX' | 'AVG' | 'DATE' | 'NOW' | 'TODAY' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR' | 'ADD_DAYS' | 'ADD_WEEKS' | 'ADD_MONTHS' | 'ADD_YEARS' | 'DIFF_DAYS' | 'DIFF_WEEKS' | 'DIFF_MONTHS' | 'DIFF_YEARS' | 'SUB_STRING' | 'REPLACE' | 'COALESCE' | 'NULL' | 'LEN' | 'UPPER' | 'LOWER' | 'CONCAT' | 'IF' | 'CASE' | 'COL' | 'VAR' | 'TO_ARRAY' | 'QUERY' | 'IS_BLANK';
5
+ export type ScalarFunctionName = 'ADD' | 'SUB' | 'MUL' | 'DIV' | 'MOD' | 'POW' | 'ABS' | 'CEILING' | 'FLOOR' | 'ROUND' | 'MIN' | 'MAX' | 'AVG' | 'DATE' | 'NOW' | 'TODAY' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR' | 'ADD_DAYS' | 'ADD_WEEKS' | 'ADD_MONTHS' | 'ADD_YEARS' | 'DIFF_DAYS' | 'DIFF_WEEKS' | 'DIFF_MONTHS' | 'DIFF_YEARS' | 'SUB_STRING' | 'REPLACE' | 'COALESCE' | 'NULL' | 'LEN' | 'UPPER' | 'LOWER' | 'CONCAT' | 'IF' | 'CASE' | 'COL' | 'VAR' | 'TO_ARRAY' | 'QUERY' | 'IS_BLANK' | 'IS_NOT_BLANK';
6
6
  export declare const scalarExpressionFunctions: Record<ScalarFunctionName, ExpressionFunction>;
7
7
  export declare const scalarExpressionFunctionNames: ScalarFunctionName[];
@@ -140,11 +140,21 @@ export const scalarExpressionFunctions = {
140
140
  return args[0] === undefined || args[0] === null || args[0] === '';
141
141
  },
142
142
  category: 'special',
143
- description: 'Returns true is input value is undefined, null or an empty string',
143
+ description: 'Returns true if input value is undefined, null, or an empty string',
144
144
  signatures: ['IS_BLANK(input: any)'],
145
145
  examples: ['IS_BLANK([col1])'],
146
146
  returnType: 'boolean',
147
147
  },
148
+ IS_NOT_BLANK: {
149
+ handler(args) {
150
+ return args[0] !== undefined && args[0] !== null && (String)(args[0]).trim() !== '';
151
+ },
152
+ category: 'special',
153
+ description: 'Returns true if input value is not empty',
154
+ signatures: ['IS_NOT_BLANK(input: any)'],
155
+ examples: ['IS_NOT_BLANK([col1])'],
156
+ returnType: 'boolean',
157
+ },
148
158
  ABS: {
149
159
  handler(args) {
150
160
  return sanitizeNumericResult(Math.abs(args[0]));
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Get the keys of FirstType without any keys of SecondType.
3
3
  */
4
- declare type Without<FirstType, SecondType> = {
4
+ type Without<FirstType, SecondType> = {
5
5
  [KeyType in Exclude<keyof FirstType, keyof SecondType>]?: never;
6
6
  };
7
7
  /**
@@ -13,7 +13,7 @@ declare type Without<FirstType, SecondType> = {
13
13
  *
14
14
  * @see https://github.com/maninak/ts-xor/tree/master#description
15
15
  */
16
- export declare type XOR<FirstType, SecondType> = FirstType | SecondType extends object ? (Without<FirstType, SecondType> & SecondType) | (Without<SecondType, FirstType> & FirstType) : FirstType | SecondType;
16
+ export type XOR<FirstType, SecondType> = FirstType | SecondType extends object ? (Without<FirstType, SecondType> & SecondType) | (Without<SecondType, FirstType> & FirstType) : FirstType | SecondType;
17
17
  /**
18
18
  * Create a type where at least one of the properties of a type(can be any property) is required to exist.
19
19
  * Optionally the set of required properties may be restricted with the second generic type.
@@ -38,11 +38,11 @@ export declare type XOR<FirstType, SecondType> = FirstType | SecondType extends
38
38
  *
39
39
  * @see https://stackoverflow.com/a/49725198
40
40
  */
41
- export declare type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
41
+ export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
42
42
  [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
43
43
  }[Keys];
44
44
  /** Similar to the builtin Extract, but checks the filter strictly */
45
- export declare type StrictExtract<T, U extends Partial<T>> = Extract<T, U>;
45
+ export type StrictExtract<T, U extends Partial<T>> = Extract<T, U>;
46
46
  /**
47
47
  * DeepRequired
48
48
  *
@@ -66,13 +66,13 @@ export declare type StrictExtract<T, U extends Partial<T>> = Extract<T, U>;
66
66
  * };
67
67
  * type RequiredNestedProps = DeepRequired<NestedProps>;
68
68
  */
69
- export declare type DeepRequired<T> = T extends (...args: any[]) => any ? T : T extends any[] ? _DeepRequiredArray<T[number]> : T extends object ? _DeepRequiredObject<T> : T;
69
+ export type DeepRequired<T> = T extends (...args: any[]) => any ? T : T extends any[] ? _DeepRequiredArray<T[number]> : T extends object ? _DeepRequiredObject<T> : T;
70
70
  export interface _DeepRequiredArray<T> extends Array<DeepRequired<NonUndefined<T>>> {
71
71
  }
72
- export declare type _DeepRequiredObject<T> = {
72
+ export type _DeepRequiredObject<T> = {
73
73
  [P in keyof T]-?: DeepRequired<NonUndefined<T[P]>>;
74
74
  };
75
- export declare type NonUndefined<A> = A extends undefined ? never : A;
75
+ export type NonUndefined<A> = A extends undefined ? never : A;
76
76
  export declare const getTypedKeys: <T extends string>(input: Record<T, any>) => T[];
77
- export declare type OneOf<T extends any[]> = T extends [infer Only] ? Only : T extends [infer A, infer B, ...infer Rest] ? OneOf<[XOR<A, B>, ...Rest]> : never;
77
+ export type OneOf<T extends any[]> = T extends [infer Only] ? Only : T extends [infer A, infer B, ...infer Rest] ? OneOf<[XOR<A, B>, ...Rest]> : never;
78
78
  export {};
@@ -31,6 +31,10 @@ export function assignAdaptableOptions(adaptableOptions) {
31
31
  returnedAdaptableOptions.groupingOptions = Object.assign({}, DefaultAdaptableOptions.groupingOptions, adaptableOptions.groupingOptions);
32
32
  returnedAdaptableOptions.quickSearchOptions = Object.assign({}, DefaultAdaptableOptions.quickSearchOptions, adaptableOptions.quickSearchOptions);
33
33
  returnedAdaptableOptions.columnFilterOptions = Object.assign({}, DefaultAdaptableOptions.columnFilterOptions, adaptableOptions.columnFilterOptions);
34
+ returnedAdaptableOptions.columnFilterOptions.quickFilterOptions = Object.assign({}, DefaultAdaptableOptions.columnFilterOptions.quickFilterOptions, returnedAdaptableOptions.columnFilterOptions.quickFilterOptions);
35
+ returnedAdaptableOptions.columnFilterOptions.filterFormOptions = Object.assign({}, DefaultAdaptableOptions.columnFilterOptions.filterFormOptions, returnedAdaptableOptions.columnFilterOptions.filterFormOptions);
36
+ returnedAdaptableOptions.columnFilterOptions.valuesFilterOptions = Object.assign({}, DefaultAdaptableOptions.columnFilterOptions.valuesFilterOptions, returnedAdaptableOptions.columnFilterOptions.valuesFilterOptions);
37
+ returnedAdaptableOptions.gridFilterOptions = Object.assign({}, DefaultAdaptableOptions.gridFilterOptions, adaptableOptions.gridFilterOptions);
34
38
  returnedAdaptableOptions.userInterfaceOptions = Object.assign({}, DefaultAdaptableOptions.userInterfaceOptions, adaptableOptions.userInterfaceOptions);
35
39
  returnedAdaptableOptions.userInterfaceOptions.dateInputOptions = Object.assign({}, DefaultAdaptableOptions.userInterfaceOptions.dateInputOptions, returnedAdaptableOptions.userInterfaceOptions.dateInputOptions);
36
40
  returnedAdaptableOptions.menuOptions = Object.assign({}, DefaultAdaptableOptions.menuOptions, adaptableOptions.menuOptions);
@@ -89,7 +89,7 @@ export function CreateEmptyFlashingCellDefinition() {
89
89
  Rule: {
90
90
  Predicates: [
91
91
  {
92
- PredicateId: 'Any',
92
+ PredicateId: 'AnyChange',
93
93
  },
94
94
  ],
95
95
  },
@@ -10,6 +10,5 @@ export declare class EntitlementService implements IEntitlementService {
10
10
  isModuleFullEntitlement(adaptableModule: AdaptableModule): boolean;
11
11
  isModuleReadOnlyEntitlement(adaptableModule: AdaptableModule): boolean;
12
12
  getEntitlementAccessLevelForModule(adaptableModule: AdaptableModule): AccessLevel;
13
- isGridInfoSectionVisible(section: 'GridSummary' | 'AdaptableOptions' | 'ColumnInfo'): boolean;
14
13
  destroy(): void;
15
14
  }
@@ -57,14 +57,6 @@ export class EntitlementService {
57
57
  }
58
58
  return 'Full';
59
59
  }
60
- isGridInfoSectionVisible(section) {
61
- if (this.isModuleHiddenEntitlement('GridInfo')) {
62
- return false;
63
- }
64
- return this.adaptableApi.optionsApi
65
- .getUserInterfaceOptions()
66
- .gridInfoSections.includes(section);
67
- }
68
60
  destroy() {
69
61
  // TO DO
70
62
  }
@@ -2,13 +2,13 @@ import { AlertDefinition } from '../../../PredefinedConfig/AlertState';
2
2
  import { CellDataChangedInfo } from '../../../PredefinedConfig/Common/CellDataChangedInfo';
3
3
  import { GridDataChangedInfo } from '../../../types';
4
4
  import { IAdaptableService } from './IAdaptableService';
5
- export declare type ReactiveAlertInfo = ReactiveGridDataChangedAlertInfo | ReactiveCellDataChangedAlertInfo;
6
- export declare type ReactiveGridDataChangedAlertInfo = {
5
+ export type ReactiveAlertInfo = ReactiveGridDataChangedAlertInfo | ReactiveCellDataChangedAlertInfo;
6
+ export type ReactiveGridDataChangedAlertInfo = {
7
7
  type: 'gridDataChangedAlert';
8
8
  alertDefinition: AlertDefinition;
9
9
  gridChangeLogEntry: GridDataChangedInfo;
10
10
  };
11
- export declare type ReactiveCellDataChangedAlertInfo = {
11
+ export type ReactiveCellDataChangedAlertInfo = {
12
12
  type: 'cellDataChangedAlert';
13
13
  alertDefinition: AlertDefinition;
14
14
  cellChangeLogEntry: CellDataChangedInfo;
@@ -1,16 +1,10 @@
1
1
  import { IAdaptableService } from './IAdaptableService';
2
2
  import { AdaptableModule } from '../../../PredefinedConfig/Common/Types';
3
3
  import { AccessLevel } from '../../../PredefinedConfig/Common/Entitlement';
4
- import { GridInfoSection } from '../../../types';
5
4
  export interface IEntitlementService extends IAdaptableService {
6
5
  setModulesEntitlements(): void;
7
6
  isModuleHiddenEntitlement(adaptableModule: AdaptableModule): boolean;
8
7
  isModuleFullEntitlement(adaptableModule: AdaptableModule): boolean;
9
8
  isModuleReadOnlyEntitlement(adaptableModule: AdaptableModule): boolean;
10
9
  getEntitlementAccessLevelForModule(adaptableModule: AdaptableModule): AccessLevel;
11
- /**
12
- * No longer used
13
- * @deprecated
14
- */
15
- isGridInfoSectionVisible(section: GridInfoSection): boolean;
16
10
  }
@@ -1,7 +1,7 @@
1
1
  import { AdaptableOptions } from '../../../../types';
2
2
  import { MetamodelItemPropertyKind } from '../../../metamodel/adaptable-metamodel-model';
3
3
  import { IAdaptableService } from './IAdaptableService';
4
- export declare type GridInfoOptions = Map<string, {
4
+ export type GridInfoOptions = Map<string, {
5
5
  containerLabel: string;
6
6
  items: GridInfoOption[];
7
7
  }>;
@@ -1 +1,181 @@
1
- import{SystemLicenseDisablePersistence as e,SystemLicenseShowWatermark as a}from"../../../Redux/ActionsReducers/SystemRedux";import{PopupShowAlert as t}from"../../../Redux/ActionsReducers/PopupRedux";import o from"../../ObjectFactory";import s from"lodash/clamp";import{LicenseDocsLink as i}from"../../Constants/DocumentationLinkConstants";import{decode as n,GENERIC_APP_NAME as r}from"../../license/decode";import{shouldLogThankYouMessage as l}from"./shouldLogThankYouMessage";const c="sales@adaptabletools.com",d=10,p=864e5;export var LicenseValidityType;!function(e){e.INVALID_LICENSE="INVALID_LICENSE",e.NO_LICENSE="NO_LICENSE",e.NON_PRODUCTION_VALID="NON_PRODUCTION_VALID",e.NON_PRODUCTION_EXPIRED_IN_SCOPE="NON_PRODUCTION_EXPIRED_IN_SCOPE",e.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE="NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE",e.COMMERCIAL_VALID="COMMERCIAL_VALID",e.COMMERCIAL_EXPIRED_IN_SCOPE="COMMERCIAL_EXPIRED_IN_SCOPE",e.COMMERCIAL_EXPIRED_OUT_OF_SCOPE="COMMERCIAL_EXPIRED_OUT_OF_SCOPE"}(LicenseValidityType||(LicenseValidityType={}));const E=/(https):\/\/\d+\-\d+\-\d+\-(sandpack\.codesandbox\.io)/g,I=/(https):\/\/\S+(\.csb\.app)/g,h=/(https):\/\/\S+(\.adaptabletools\.com)/g,_="undefined"!=typeof window?window.location.origin:"",O=()=>{const[e,a,t]=Array.from(E.exec(_)||[]);return"https"===a&&"sandpack.codesandbox.io"===t},A=()=>{const[e,a,t]=Array.from(I.exec(_)||[]);return"https"===a&&".csb.app"===t},L=()=>{const[e,a,t]=Array.from(h.exec(_)||[]);return"https"===a&&".adaptabletools.com"===t};export class LicenseService{constructor(e,a,t){this.adaptable=e,this.adaptable=e;let o=null;if(a)try{o=n(a)}catch(e){o=e}O()||A()||L()||this.handleLicenseValidation(o,this.getValidityType(o,t))}getValidityType(e,a){if(!e)return LicenseValidityType.NO_LICENSE;if(e instanceof Error)return LicenseValidityType.INVALID_LICENSE;const t=new Date(a.publishedAt),o=new Date(e.end),s=o<new Date,i=e.trial;let n=null;return n=s?o>t?i?LicenseValidityType.NON_PRODUCTION_EXPIRED_IN_SCOPE:LicenseValidityType.COMMERCIAL_EXPIRED_IN_SCOPE:i?LicenseValidityType.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE:LicenseValidityType.COMMERCIAL_EXPIRED_OUT_OF_SCOPE:i?LicenseValidityType.NON_PRODUCTION_VALID:LicenseValidityType.COMMERCIAL_VALID,n}handleLicenseValidation(e,a){var t;const o=new Date;o.setHours(0,0,0,0);let n=0;e instanceof Error||!(null==e?void 0:e.end)||(n=Math.floor(((null===(t=null==e?void 0:e.end)||void 0===t?void 0:t.getTime())-o.getTime())/p),n=s(n,0,1/0));let E="",I="";!e||e instanceof Error||!e.appName||e.appName==r||(E=e.appName,I=" for application [APP_NAME]");const h=(e,a=i,t=c,o=n,s=E)=>e.replace("[LINK]",a).replace("[EMAIL]",t).replace("[APP_NAME]",s).replace("[DAYS]",`${o}`);switch(a){case"NO_LICENSE":case"NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE":this.adaptable.logger.consoleLogByMessageType(h("This instance of AdapTable does not have a license, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("No AdapTable License found."),this.showWatermark("This instance of AdapTable does not have a license, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"INVALID_LICENSE":this.adaptable.logger.consoleLogByMessageType(h("This instance of AdapTable seems to use a corrupted License, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("Corrupted AdapTable License found."),this.showWatermark("This instance of AdapTable has a corrupted License, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"NON_PRODUCTION_VALID":this.adaptable.logger.consoleLogByMessageType(h("This AdapTable trial license expires in [DAYS] days. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Info");break;case"NON_PRODUCTION_EXPIRED_IN_SCOPE":this.adaptable.logger.consoleLogByMessageType(h("This AdapTable trial license has now expired. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Warning"),this.showWatermark("AdapTable License has expired");break;case"COMMERCIAL_VALID":if(n<=d)this.adaptable.logger.consoleLogByMessageType(h(`This AdapTable license${I} expires in [DAYS] days. Please contact [EMAIL] to renew (giving you access to Support and Updates)`),"Info");else try{l()&&this.adaptable.logger.consoleLogByMessageType(h(`Thank you for using a valid AdapTable license${I}. Your license will expire in [DAYS] days.`),"Info")}catch(e){}break;case"COMMERCIAL_EXPIRED_IN_SCOPE":this.adaptable.logger.consoleLogByMessageType(h(`This AdapTable license${I} has expired. Please contact [EMAIL] if you wish to renew (giving you access to Support and Updates)`),"Warning");break;case"COMMERCIAL_EXPIRED_OUT_OF_SCOPE":this.adaptable.logger.consoleLogByMessageType(h(`This AdapTable license${I} has expired. Adaptable version was published after the license expired. Please contact [EMAIL] if you wish to renew your license.`),"Error"),this.showNotification("Adaptable License has expired"),this.showWatermark("Adaptable License has expired")}}showNotification(e){this.adaptable.api.internalApi.dispatchReduxAction(t({alertType:"generic",header:"License Error",message:e,alertDefinition:o.CreateInternalAlertDefinitionForMessages("Error")}))}showWatermark(e){this.adaptable.api.internalApi.dispatchReduxAction(a(e))}disableStatePersistence(){this.adaptable.api.internalApi.dispatchReduxAction(e())}destroy(){}}
1
+ import { SystemLicenseDisablePersistence, SystemLicenseShowWatermark, } from '../../../Redux/ActionsReducers/SystemRedux';
2
+ import { PopupShowAlert } from '../../../Redux/ActionsReducers/PopupRedux';
3
+ import ObjectFactory from '../../ObjectFactory';
4
+ import clamp from 'lodash/clamp';
5
+ import { LicenseDocsLink } from '../../Constants/DocumentationLinkConstants';
6
+ import { decode as decodeLicense, GENERIC_APP_NAME } from '../../license/decode';
7
+ import { shouldLogThankYouMessage } from './shouldLogThankYouMessage';
8
+ const EMAIL = 'sales@adaptabletools.com';
9
+ const COMMERCIAL_LICENSE_SHOW_INFO_DAYS_BEFORE_EXPIRE = 10;
10
+ const DAY_IN_MS = 1000 * 60 * 60 * 24;
11
+ export var LicenseValidityType;
12
+ (function (LicenseValidityType) {
13
+ LicenseValidityType["INVALID_LICENSE"] = "INVALID_LICENSE";
14
+ LicenseValidityType["NO_LICENSE"] = "NO_LICENSE";
15
+ LicenseValidityType["NON_PRODUCTION_VALID"] = "NON_PRODUCTION_VALID";
16
+ LicenseValidityType["NON_PRODUCTION_EXPIRED_IN_SCOPE"] = "NON_PRODUCTION_EXPIRED_IN_SCOPE";
17
+ LicenseValidityType["NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE"] = "NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE";
18
+ LicenseValidityType["COMMERCIAL_VALID"] = "COMMERCIAL_VALID";
19
+ LicenseValidityType["COMMERCIAL_EXPIRED_IN_SCOPE"] = "COMMERCIAL_EXPIRED_IN_SCOPE";
20
+ LicenseValidityType["COMMERCIAL_EXPIRED_OUT_OF_SCOPE"] = "COMMERCIAL_EXPIRED_OUT_OF_SCOPE";
21
+ })(LicenseValidityType || (LicenseValidityType = {}));
22
+ const SANDPACK_REGEX = /(https):\/\/\d+\-\d+\-\d+\-(sandpack\.codesandbox\.io)/g;
23
+ const SANDBOX_REGEX = /(https):\/\/\S+(\.csb\.app)/g;
24
+ const DEMO_REGEX = /(https):\/\/\S+(\.adaptabletools\.com)/g;
25
+ const origin = typeof window !== 'undefined' ? window.location.origin : '';
26
+ const isInsideSandpack = () => {
27
+ const [_fullUrl, protocol, sandpackUrl] = Array.from(SANDPACK_REGEX.exec(origin) || []);
28
+ return protocol === 'https' && sandpackUrl === 'sandpack.codesandbox.io';
29
+ };
30
+ const isInsideSandbox = () => {
31
+ const [_fullUrl, protocol, sandboxUrl] = Array.from(SANDBOX_REGEX.exec(origin) || []);
32
+ return protocol === 'https' && sandboxUrl === '.csb.app';
33
+ };
34
+ const isDemoApp = () => {
35
+ const [_fullUrl, protocol, demoAppUrl] = Array.from(DEMO_REGEX.exec(origin) || []);
36
+ return protocol === 'https' && demoAppUrl === '.adaptabletools.com';
37
+ };
38
+ export class LicenseService {
39
+ constructor(adaptable, licenseKey, packageDetails) {
40
+ this.adaptable = adaptable;
41
+ this.adaptable = adaptable;
42
+ let details = null;
43
+ if (licenseKey) {
44
+ try {
45
+ details = decodeLicense(licenseKey);
46
+ }
47
+ catch (error) {
48
+ details = error;
49
+ }
50
+ }
51
+ if (!isInsideSandpack() && !isInsideSandbox() && !isDemoApp()) {
52
+ this.handleLicenseValidation(details, this.getValidityType(details, packageDetails));
53
+ }
54
+ }
55
+ getValidityType(details, packageDetails) {
56
+ if (!details) {
57
+ return LicenseValidityType.NO_LICENSE;
58
+ }
59
+ if (details instanceof Error) {
60
+ return LicenseValidityType.INVALID_LICENSE;
61
+ }
62
+ const currentVersionReleaseDate = new Date(packageDetails.publishedAt);
63
+ const licenseEndDate = new Date(details.end);
64
+ const currentDate = new Date();
65
+ const isExpired = licenseEndDate < currentDate;
66
+ const isTrial = details.trial;
67
+ const isScope = licenseEndDate > currentVersionReleaseDate;
68
+ let validityType = null;
69
+ if (isExpired) {
70
+ if (isScope) {
71
+ if (isTrial) {
72
+ validityType = LicenseValidityType.NON_PRODUCTION_EXPIRED_IN_SCOPE;
73
+ }
74
+ else {
75
+ validityType = LicenseValidityType.COMMERCIAL_EXPIRED_IN_SCOPE;
76
+ }
77
+ }
78
+ else {
79
+ if (isTrial) {
80
+ validityType = LicenseValidityType.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE;
81
+ }
82
+ else {
83
+ validityType = LicenseValidityType.COMMERCIAL_EXPIRED_OUT_OF_SCOPE;
84
+ }
85
+ }
86
+ }
87
+ else {
88
+ if (isTrial) {
89
+ validityType = LicenseValidityType.NON_PRODUCTION_VALID;
90
+ }
91
+ else {
92
+ validityType = LicenseValidityType.COMMERCIAL_VALID;
93
+ }
94
+ }
95
+ return validityType;
96
+ }
97
+ handleLicenseValidation(details, validityType) {
98
+ var _a;
99
+ const nowAtMidnight = new Date();
100
+ nowAtMidnight.setHours(0, 0, 0, 0);
101
+ let daysLeft = 0;
102
+ if (!(details instanceof Error) && (details === null || details === void 0 ? void 0 : details.end)) {
103
+ daysLeft = Math.floor((((_a = details === null || details === void 0 ? void 0 : details.end) === null || _a === void 0 ? void 0 : _a.getTime()) - nowAtMidnight.getTime()) / DAY_IN_MS);
104
+ daysLeft = clamp(daysLeft, 0, Infinity);
105
+ }
106
+ let APP_NAME = '';
107
+ let forApp = '';
108
+ if (details &&
109
+ !(details instanceof Error) &&
110
+ details.appName &&
111
+ details.appName != GENERIC_APP_NAME) {
112
+ APP_NAME = details.appName;
113
+ forApp = ` for application [APP_NAME]`;
114
+ }
115
+ const annotateMessage = (message, link = LicenseDocsLink, email = EMAIL, days = daysLeft, appName = APP_NAME) => {
116
+ return message
117
+ .replace('[LINK]', link)
118
+ .replace('[EMAIL]', email)
119
+ .replace('[APP_NAME]', appName)
120
+ .replace('[DAYS]', `${days}`);
121
+ };
122
+ switch (validityType) {
123
+ case 'NO_LICENSE':
124
+ case 'NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE':
125
+ this.adaptable.logger.consoleLogByMessageType(annotateMessage('This instance of AdapTable does not have a license, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK].'), 'Error');
126
+ this.showNotification('No AdapTable License found.');
127
+ this.showWatermark('This instance of AdapTable does not have a license, and some functionality has therefore been removed.');
128
+ this.disableStatePersistence();
129
+ break;
130
+ case 'INVALID_LICENSE':
131
+ this.adaptable.logger.consoleLogByMessageType(annotateMessage('This instance of AdapTable seems to use a corrupted License, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK].'), 'Error');
132
+ this.showNotification('Corrupted AdapTable License found.');
133
+ this.showWatermark(`This instance of AdapTable has a corrupted License, and some functionality has therefore been removed.`);
134
+ this.disableStatePersistence();
135
+ break;
136
+ case 'NON_PRODUCTION_VALID':
137
+ this.adaptable.logger.consoleLogByMessageType(annotateMessage('This AdapTable trial license expires in [DAYS] days. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK].'), 'Info');
138
+ break;
139
+ case 'NON_PRODUCTION_EXPIRED_IN_SCOPE':
140
+ this.adaptable.logger.consoleLogByMessageType(annotateMessage('This AdapTable trial license has now expired. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK].'), 'Warning');
141
+ this.showWatermark('AdapTable License has expired');
142
+ break;
143
+ case 'COMMERCIAL_VALID':
144
+ if (daysLeft <= COMMERCIAL_LICENSE_SHOW_INFO_DAYS_BEFORE_EXPIRE) {
145
+ this.adaptable.logger.consoleLogByMessageType(annotateMessage(`This AdapTable license${forApp} expires in [DAYS] days. Please contact [EMAIL] to renew (giving you access to Support and Updates)`), 'Info');
146
+ }
147
+ else {
148
+ try {
149
+ if (shouldLogThankYouMessage()) {
150
+ this.adaptable.logger.consoleLogByMessageType(annotateMessage(`Thank you for using a valid AdapTable license${forApp}. Your license will expire in [DAYS] days.`), 'Info');
151
+ }
152
+ }
153
+ catch (ex) { }
154
+ }
155
+ break;
156
+ case 'COMMERCIAL_EXPIRED_IN_SCOPE':
157
+ this.adaptable.logger.consoleLogByMessageType(annotateMessage(`This AdapTable license${forApp} has expired. Please contact [EMAIL] if you wish to renew (giving you access to Support and Updates)`), 'Warning');
158
+ break;
159
+ case 'COMMERCIAL_EXPIRED_OUT_OF_SCOPE':
160
+ this.adaptable.logger.consoleLogByMessageType(annotateMessage(`This AdapTable license${forApp} has expired. Adaptable version was published after the license expired. Please contact [EMAIL] if you wish to renew your license.`), 'Error');
161
+ this.showNotification('Adaptable License has expired');
162
+ this.showWatermark('Adaptable License has expired');
163
+ break;
164
+ }
165
+ }
166
+ showNotification(text) {
167
+ this.adaptable.api.internalApi.dispatchReduxAction(PopupShowAlert({
168
+ alertType: 'generic',
169
+ header: 'License Error',
170
+ message: text,
171
+ alertDefinition: ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
172
+ }));
173
+ }
174
+ showWatermark(text) {
175
+ this.adaptable.api.internalApi.dispatchReduxAction(SystemLicenseShowWatermark(text));
176
+ }
177
+ disableStatePersistence() {
178
+ this.adaptable.api.internalApi.dispatchReduxAction(SystemLicenseDisablePersistence());
179
+ }
180
+ destroy() { }
181
+ }
@@ -46,7 +46,7 @@ export class MetamodelService {
46
46
  Object.entries(optionsObject).forEach(([optionKey, optionValue]) => {
47
47
  var _a;
48
48
  if (optionKey === 'gridOptions') {
49
- validationErrors.push('gridOptions was removed from AdapTable Options in Version 16 and is no longer used');
49
+ validationErrors.push('gridOptions was removed from Adaptable Options in Version 16 and is no longer used');
50
50
  return;
51
51
  }
52
52
  if (optionKey === '_gridOptions' || optionKey === 'fdc3Options') {
@@ -116,7 +116,7 @@ export class ModuleService {
116
116
  case 'PlusMinus':
117
117
  return learnUrl + 'handbook-editing-plus-minus';
118
118
  case 'NamedQuery':
119
- return learnUrl + 'handbook-grid-filter';
119
+ return learnUrl + 'handbook-named-queries';
120
120
  case 'QuickSearch':
121
121
  return learnUrl + 'handbook-quick-search';
122
122
  case 'Schedule':
@@ -1,4 +1,4 @@
1
- export declare type LicenseDetails = {
1
+ export type LicenseDetails = {
2
2
  start: Date;
3
3
  end: Date;
4
4
  owner: string;
@@ -1 +1,65 @@
1
- import{compute_string as e}from"./hashing";const t=()=>new Error("Invalid License");export const GENERIC_APP_NAME="GenericAdaptableApp";export const fieldsToLicenseDetails=e=>{var a;const r=e.reduce(((e,t)=>(e.set(t.name,t.value),e)),new Map),n={start:new Date(r.get("StartDate")),end:new Date(r.get("EndDate")),owner:r.get("Owner"),appName:r.get("AppName")||GENERIC_APP_NAME,timestamp:r.get("TS")?Number(r.get("TS")):0,trial:"true"===r.get("Trial"),ref:null!==(a=r.get("Ref"))&&void 0!==a?a:""};if(!(n.start&&n.end&&n.owner&&"boolean"==typeof n.trial&&n.ref))throw t();return n};export const decode=a=>{let r="",n=a.split("|").map((e=>{let[t,a]=e.split("=");return"C"===t&&(r=a),{name:t,value:a}}));if(!r)throw t();const o=r.split(",").reverse(),s=o.pop();o.forEach(((a,r)=>{const o=n[r];if(e(o.value)!==a)throw t()}));const i=[...n];i.pop();const p=i.map((e=>`${e.name}=${e.value}`)).join("|");if(e(p)!==s)throw t();return n=n.map((e=>Object.assign(Object.assign({},e),{value:decodeURI(e.value)}))),fieldsToLicenseDetails(n)};
1
+ import { compute_string } from './hashing';
2
+ const getGenericError = () => new Error('Invalid License');
3
+ export const GENERIC_APP_NAME = 'GenericAdaptableApp';
4
+ export const fieldsToLicenseDetails = (fields) => {
5
+ var _a;
6
+ const fieldsMap = fields.reduce((acc, field) => {
7
+ acc.set(field.name, field.value);
8
+ return acc;
9
+ }, new Map());
10
+ const details = {
11
+ start: new Date(fieldsMap.get('StartDate')),
12
+ end: new Date(fieldsMap.get('EndDate')),
13
+ owner: fieldsMap.get('Owner'),
14
+ appName: fieldsMap.get('AppName') || GENERIC_APP_NAME,
15
+ timestamp: fieldsMap.get('TS') ? Number(fieldsMap.get('TS')) : 0,
16
+ trial: fieldsMap.get('Trial') === 'true' ? true : false,
17
+ ref: (_a = fieldsMap.get('Ref')) !== null && _a !== void 0 ? _a : '',
18
+ };
19
+ if (!details.start ||
20
+ !details.end ||
21
+ !details.owner ||
22
+ typeof details.trial !== 'boolean' ||
23
+ !details.ref) {
24
+ throw getGenericError();
25
+ }
26
+ return details;
27
+ };
28
+ export const decode = (licenseKey) => {
29
+ let crc = '';
30
+ let fields = licenseKey.split('|').map((part) => {
31
+ let [name, value] = part.split('=');
32
+ if (name === 'C') {
33
+ crc = value;
34
+ }
35
+ return {
36
+ name,
37
+ value,
38
+ };
39
+ });
40
+ if (!crc) {
41
+ throw getGenericError();
42
+ }
43
+ const crcParts = crc.split(',').reverse();
44
+ const overallCrc = crcParts.pop();
45
+ crcParts.forEach((fieldCrc, index) => {
46
+ const field = fields[index];
47
+ if (compute_string(field.value) !== fieldCrc) {
48
+ throw getGenericError();
49
+ }
50
+ });
51
+ const fieldsWithoutC = [...fields];
52
+ fieldsWithoutC.pop();
53
+ const fieldsWithoutCString = fieldsWithoutC
54
+ .map((field) => {
55
+ return `${field.name}=${field.value}`;
56
+ })
57
+ .join('|');
58
+ if (compute_string(fieldsWithoutCString) !== overallCrc) {
59
+ throw getGenericError();
60
+ }
61
+ fields = fields.map((f) => {
62
+ return Object.assign(Object.assign({}, f), { value: decodeURI(f.value) });
63
+ });
64
+ return fieldsToLicenseDetails(fields);
65
+ };