@adaptabletools/adaptable 24.0.0-canary.0 → 24.0.0-canary.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (393) hide show
  1. package/agGrid.d.ts +2 -3
  2. package/agGrid.js +2 -3
  3. package/aql.d.ts +132 -0
  4. package/aql.js +260 -0
  5. package/devtools.d.ts +237 -2
  6. package/index.css +323 -306
  7. package/index.d.ts +2 -3
  8. package/index.js +2 -3
  9. package/package.json +8 -7
  10. package/src/AdaptableInterfaces/IAdaptable.d.ts +4 -4
  11. package/src/AdaptableOptions/ActionColumnOptions.d.ts +24 -0
  12. package/src/AdaptableOptions/AdaptableOptions.d.ts +97 -69
  13. package/src/AdaptableOptions/AdaptablePlugin.d.ts +113 -1
  14. package/src/AdaptableOptions/AlertOptions.d.ts +0 -2
  15. package/src/AdaptableOptions/ChartingOptions.d.ts +11 -5
  16. package/src/AdaptableOptions/ColumnMenuOptions.d.ts +30 -0
  17. package/src/AdaptableOptions/ColumnOptions.d.ts +0 -2
  18. package/src/AdaptableOptions/CommentOptions.d.ts +12 -4
  19. package/src/AdaptableOptions/ContextMenuOptions.d.ts +31 -1
  20. package/src/AdaptableOptions/DashboardOptions.d.ts +0 -3
  21. package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +3 -2
  22. package/src/AdaptableOptions/DefaultAdaptableOptions.js +11 -5
  23. package/src/AdaptableOptions/EditOptions.d.ts +18 -2
  24. package/src/AdaptableOptions/ExportOptions.d.ts +23 -0
  25. package/src/AdaptableOptions/ExpressionOptions.d.ts +0 -3
  26. package/src/AdaptableOptions/Fdc3Options.d.ts +77 -3
  27. package/src/AdaptableOptions/FilterOptions.d.ts +13 -8
  28. package/src/AdaptableOptions/FlashingCellOptions.d.ts +3 -3
  29. package/src/AdaptableOptions/LayoutOptions.d.ts +16 -3
  30. package/src/AdaptableOptions/NotificationsOptions.d.ts +0 -1
  31. package/src/AdaptableOptions/QuickSearchOptions.d.ts +0 -2
  32. package/src/AdaptableOptions/RowFormOptions.d.ts +9 -0
  33. package/src/AdaptableOptions/SettingsPanelOptions.d.ts +16 -5
  34. package/src/AdaptableOptions/StateOptions.d.ts +37 -13
  35. package/src/AdaptableOptions/ToolPanelOptions.d.ts +0 -1
  36. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +89 -6
  37. package/src/AdaptableState/AdaptableState.d.ts +99 -3
  38. package/src/AdaptableState/AlertState.d.ts +20 -21
  39. package/src/AdaptableState/ApplicationState.d.ts +5 -3
  40. package/src/AdaptableState/BaseState.d.ts +9 -2
  41. package/src/AdaptableState/CalculatedColumnState.d.ts +10 -8
  42. package/src/AdaptableState/ChartingState.d.ts +10 -5
  43. package/src/AdaptableState/CommentState.d.ts +10 -4
  44. package/src/AdaptableState/Common/AdaptableAlert.d.ts +21 -2
  45. package/src/AdaptableState/Common/AdaptableAlert.js +9 -0
  46. package/src/AdaptableState/Common/AdaptableButton.d.ts +3 -1
  47. package/src/AdaptableState/Common/AdaptableColumn.d.ts +38 -1
  48. package/src/AdaptableState/Common/AdaptableFilterState.d.ts +3 -1
  49. package/src/AdaptableState/Common/AdaptableFlashingCell.d.ts +3 -1
  50. package/src/AdaptableState/Common/AdaptableForm.d.ts +9 -0
  51. package/src/AdaptableState/Common/AdaptableFormat.d.ts +27 -1
  52. package/src/AdaptableState/Common/AdaptableIcon.d.ts +4 -2
  53. package/src/AdaptableState/Common/AdaptableObject.d.ts +9 -1
  54. package/src/AdaptableState/Common/AdaptableQuery.d.ts +9 -0
  55. package/src/AdaptableState/Common/AdaptableStyle.d.ts +6 -8
  56. package/src/AdaptableState/Common/AggregationColumns.d.ts +15 -6
  57. package/src/AdaptableState/Common/ButtonStyle.d.ts +3 -1
  58. package/src/AdaptableState/Common/CellDataChangedInfo.d.ts +6 -2
  59. package/src/AdaptableState/Common/CellHighlightInfo.d.ts +4 -2
  60. package/src/AdaptableState/Common/CellSummary.d.ts +33 -0
  61. package/src/AdaptableState/Common/ColumnFilter.d.ts +3 -1
  62. package/src/AdaptableState/Common/ColumnHighlightInfo.d.ts +4 -2
  63. package/src/AdaptableState/Common/ColumnScope.d.ts +32 -1
  64. package/src/AdaptableState/Common/ColumnSetupInfo.d.ts +17 -0
  65. package/src/AdaptableState/Common/ColumnSort.d.ts +3 -1
  66. package/src/AdaptableState/Common/CompactCalculatedColumnEditorInfo.d.ts +3 -0
  67. package/src/AdaptableState/Common/DataChangedScope.d.ts +3 -1
  68. package/src/AdaptableState/Common/DataUpdateConfig.d.ts +3 -1
  69. package/src/AdaptableState/Common/Entitlement.d.ts +4 -2
  70. package/src/AdaptableState/Common/Enums.d.ts +21 -0
  71. package/src/AdaptableState/Common/ExtendedLayout.d.ts +3 -1
  72. package/src/AdaptableState/Common/Fdc3Context.d.ts +9 -0
  73. package/src/AdaptableState/Common/Fdc3Intent.d.ts +6 -0
  74. package/src/AdaptableState/Common/GridFilter.d.ts +3 -1
  75. package/src/AdaptableState/Common/MenuItem.d.ts +9 -0
  76. package/src/AdaptableState/Common/RowHighlightInfo.d.ts +4 -2
  77. package/src/AdaptableState/Common/RowScope.d.ts +3 -1
  78. package/src/AdaptableState/Common/RowSummary.d.ts +14 -4
  79. package/src/AdaptableState/Common/RowsHighlightInfo.d.ts +5 -3
  80. package/src/AdaptableState/Common/Schedule.d.ts +10 -2
  81. package/src/AdaptableState/Common/SpecialColumnSettings.d.ts +3 -1
  82. package/src/AdaptableState/Common/SystemStatusMessageInfo.d.ts +4 -2
  83. package/src/AdaptableState/Common/TransposeConfig.d.ts +1 -1
  84. package/src/AdaptableState/Common/Types.d.ts +9 -0
  85. package/src/AdaptableState/CustomSortState.d.ts +8 -5
  86. package/src/AdaptableState/DashboardState.d.ts +14 -10
  87. package/src/AdaptableState/ExportState.d.ts +12 -4
  88. package/src/AdaptableState/FlashingCellState.d.ts +8 -5
  89. package/src/AdaptableState/FormatColumnState.d.ts +28 -8
  90. package/src/AdaptableState/FreeTextColumnState.d.ts +14 -8
  91. package/src/AdaptableState/IPushPullState.d.ts +39 -3
  92. package/src/AdaptableState/InitialState.d.ts +9 -9
  93. package/src/AdaptableState/InternalState.d.ts +183 -3
  94. package/src/AdaptableState/LayoutState.d.ts +64 -21
  95. package/src/AdaptableState/NamedQueryState.d.ts +16 -4
  96. package/src/AdaptableState/NoteState.d.ts +7 -3
  97. package/src/AdaptableState/OpenFinState.d.ts +12 -2
  98. package/src/AdaptableState/PlusMinusState.d.ts +8 -4
  99. package/src/AdaptableState/PopupState.d.ts +29 -1
  100. package/src/AdaptableState/QuickSearchState.d.ts +9 -3
  101. package/src/AdaptableState/Selection/GridCell.d.ts +5 -3
  102. package/src/AdaptableState/Selection/GridCellRange.d.ts +8 -7
  103. package/src/AdaptableState/Selection/SelectedCellInfo.d.ts +1 -1
  104. package/src/AdaptableState/ShortcutState.d.ts +7 -3
  105. package/src/AdaptableState/StatusBarState.d.ts +7 -6
  106. package/src/AdaptableState/StyledColumnState.d.ts +46 -14
  107. package/src/AdaptableState/StyledColumns/GradientStyle.d.ts +4 -0
  108. package/src/AdaptableState/TeamSharingState.d.ts +46 -2
  109. package/src/AdaptableState/ThemeState.d.ts +24 -2
  110. package/src/AdaptableState/ToolPanelState.d.ts +10 -5
  111. package/src/AdaptableState/UserInterfaceState.d.ts +2 -2
  112. package/src/AdaptableState/Uuid.d.ts +6 -0
  113. package/src/Api/ActionColumnApi.d.ts +3 -1
  114. package/src/Api/AdaptableApi.d.ts +54 -50
  115. package/src/Api/AlertApi.d.ts +20 -12
  116. package/src/Api/ApplicationApi.d.ts +6 -2
  117. package/src/Api/BulkUpdateApi.d.ts +2 -1
  118. package/src/Api/CalculatedColumnApi.d.ts +4 -1
  119. package/src/Api/CalendarApi.d.ts +10 -0
  120. package/src/Api/CellSummaryApi.d.ts +9 -3
  121. package/src/Api/ChartingApi.d.ts +22 -7
  122. package/src/Api/ColumnApi.d.ts +71 -4
  123. package/src/Api/ColumnFilterApi.d.ts +13 -3
  124. package/src/Api/ColumnMenuApi.d.ts +13 -2
  125. package/src/Api/ColumnScopeApi.d.ts +27 -1
  126. package/src/Api/CommentApi.d.ts +10 -7
  127. package/src/Api/ContextMenuApi.d.ts +11 -1
  128. package/src/Api/CustomSortApi.d.ts +6 -2
  129. package/src/Api/DashboardApi.d.ts +30 -9
  130. package/src/Api/DataChangeHistoryApi.d.ts +9 -3
  131. package/src/Api/DataImportApi.d.ts +1 -1
  132. package/src/Api/EntitlementApi.d.ts +6 -1
  133. package/src/Api/EventApi.d.ts +67 -19
  134. package/src/Api/Events/AdaptableReady.d.ts +6 -2
  135. package/src/Api/Events/AdaptableStateChanged.d.ts +9 -5
  136. package/src/Api/Events/AdaptableStateReloaded.d.ts +7 -3
  137. package/src/Api/Events/AlertFired.d.ts +8 -2
  138. package/src/Api/Events/BeforeAdaptableStateChange.d.ts +6 -2
  139. package/src/Api/Events/CalculatedColumnChanged.d.ts +7 -3
  140. package/src/Api/Events/CellChanged.d.ts +6 -2
  141. package/src/Api/Events/CellSelectionChanged.d.ts +6 -2
  142. package/src/Api/Events/ChartChanged.d.ts +16 -8
  143. package/src/Api/Events/CommentChanged.d.ts +8 -2
  144. package/src/Api/Events/CustomToolbarConfigured.d.ts +6 -2
  145. package/src/Api/Events/DashboardChanged.d.ts +27 -6
  146. package/src/Api/Events/DataImported.d.ts +8 -4
  147. package/src/Api/Events/DataSetSelected.d.ts +6 -2
  148. package/src/Api/Events/Fdc3MessageInfo.d.ts +14 -4
  149. package/src/Api/Events/FlashingCellDisplayed.d.ts +6 -2
  150. package/src/Api/Events/GridFilterApplied.d.ts +11 -3
  151. package/src/Api/Events/GridSorted.d.ts +6 -2
  152. package/src/Api/Events/LayoutChanged.d.ts +41 -8
  153. package/src/Api/Events/LiveDataChanged.d.ts +21 -5
  154. package/src/Api/Events/NoteChanged.d.ts +5 -1
  155. package/src/Api/Events/ReportScheduleRan.d.ts +7 -3
  156. package/src/Api/Events/RowChanged.d.ts +6 -2
  157. package/src/Api/Events/RowFormSubmitted.d.ts +28 -12
  158. package/src/Api/Events/RowSelectionChanged.d.ts +6 -2
  159. package/src/Api/Events/SystemStatusMessageDisplayed.d.ts +6 -2
  160. package/src/Api/Events/TeamSharingEntityChanged.d.ts +6 -2
  161. package/src/Api/Events/ThemeSelected.d.ts +6 -2
  162. package/src/Api/ExportApi.d.ts +59 -32
  163. package/src/Api/ExpressionApi.d.ts +27 -16
  164. package/src/Api/Fdc3Api.d.ts +16 -3
  165. package/src/Api/FlashingCellApi.d.ts +6 -1
  166. package/src/Api/FormatColumnApi.d.ts +18 -11
  167. package/src/Api/FreeTextColumnApi.d.ts +4 -2
  168. package/src/Api/GridApi.d.ts +92 -19
  169. package/src/Api/IPushPullApi.d.ts +19 -2
  170. package/src/Api/Implementation/AlertApiImpl.d.ts +5 -5
  171. package/src/Api/Implementation/AlertApiImpl.js +26 -19
  172. package/src/Api/Implementation/ColumnScopeApiImpl.js +3 -3
  173. package/src/Api/Implementation/ExpressionApiImpl.d.ts +1 -3
  174. package/src/Api/Implementation/ExpressionApiImpl.js +5 -6
  175. package/src/Api/Implementation/QuickSearchApiImpl.js +2 -2
  176. package/src/Api/Implementation/StateApiImpl.d.ts +1 -1
  177. package/src/Api/Implementation/StateApiImpl.js +4 -3
  178. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +0 -1
  179. package/src/Api/Implementation/UserInterfaceApiImpl.js +9 -15
  180. package/src/Api/Internal/AdaptableInternalApi.d.ts +2 -2
  181. package/src/Api/Internal/AdaptableInternalApi.js +11 -7
  182. package/src/Api/Internal/AlertInternalApi.js +12 -7
  183. package/src/Api/Internal/CalculatedColumnInternalApi.js +1 -1
  184. package/src/Api/Internal/EventInternalApi.d.ts +2 -1
  185. package/src/Api/Internal/EventInternalApi.js +7 -0
  186. package/src/Api/Internal/StateInternalApi.d.ts +1 -1
  187. package/src/Api/Internal/StateInternalApi.js +6 -5
  188. package/src/Api/InteropioPluginApi.d.ts +2 -1
  189. package/src/Api/LayoutApi.d.ts +29 -15
  190. package/src/Api/NamedQueryApi.d.ts +10 -6
  191. package/src/Api/NoteApi.d.ts +15 -11
  192. package/src/Api/OpenFinApi.d.ts +8 -2
  193. package/src/Api/OptionsApi.d.ts +43 -1
  194. package/src/Api/PluginsApi.d.ts +6 -1
  195. package/src/Api/PlusMinusApi.d.ts +2 -1
  196. package/src/Api/QuickSearchApi.d.ts +6 -1
  197. package/src/Api/RowFormApi.d.ts +8 -7
  198. package/src/Api/ShortcutApi.d.ts +3 -1
  199. package/src/Api/SmartEditApi.d.ts +4 -1
  200. package/src/Api/StateApi.d.ts +32 -4
  201. package/src/Api/StatusBarApi.d.ts +2 -0
  202. package/src/Api/StyledColumnApi.d.ts +23 -12
  203. package/src/Api/SystemStatusApi.d.ts +18 -6
  204. package/src/Api/TeamSharingApi.d.ts +8 -1
  205. package/src/Api/ThemeApi.d.ts +17 -8
  206. package/src/Api/ToolPanelApi.d.ts +12 -7
  207. package/src/Api/UserInterfaceApi.d.ts +10 -5
  208. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +3 -3
  209. package/src/Redux/ActionsReducers/QuickSearchRedux.d.ts +9 -4
  210. package/src/Redux/ActionsReducers/QuickSearchRedux.js +12 -7
  211. package/src/Redux/Store/AdaptableReduxLocalStorageEngine.d.ts +8 -0
  212. package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +12 -12
  213. package/src/Redux/Store/AdaptableStore.d.ts +8 -5
  214. package/src/Redux/Store/AdaptableStore.js +75 -41
  215. package/src/Redux/Store/Interface/IAdaptableStore.d.ts +5 -5
  216. package/src/Redux/Store/Interface/IStorageEngine.d.ts +4 -4
  217. package/src/Redux/Store/StateOptionsGuards.d.ts +58 -0
  218. package/src/Redux/Store/StateOptionsGuards.js +112 -0
  219. package/src/Redux/Store/isTransientReduxAction.d.ts +5 -0
  220. package/src/Redux/Store/isTransientReduxAction.js +19 -0
  221. package/src/Strategy/AlertModule.js +2 -2
  222. package/src/Strategy/FormatColumnModule.js +2 -2
  223. package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +1 -0
  224. package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -0
  225. package/src/Utilities/Constants/ReduxConstants.d.ts +2 -2
  226. package/src/Utilities/Constants/ReduxConstants.js +5 -5
  227. package/src/Utilities/Helpers/AlertTypeHelper.d.ts +1 -1
  228. package/src/Utilities/Helpers/SettingsPanelHelper.d.ts +14 -0
  229. package/src/Utilities/Helpers/SettingsPanelHelper.js +37 -1
  230. package/src/Utilities/Helpers/UIHelper.d.ts +12 -14
  231. package/src/Utilities/Helpers/UIHelper.js +12 -35
  232. package/src/Utilities/ObjectFactory.js +3 -3
  233. package/src/Utilities/Services/QueryLanguageService.js +0 -2
  234. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +1 -1
  235. package/src/View/Components/Popups/AdaptablePopup/Navigation.js +9 -11
  236. package/src/View/Components/StyleComponent.js +2 -2
  237. package/src/View/Dashboard/Dashboard.d.ts +1 -1
  238. package/src/View/Dashboard/Dashboard.js +1 -1
  239. package/src/View/Dashboard/DashboardPopupSections.js +1 -1
  240. package/src/View/Filter/ColumnFilter/ColumnFilterNew.js +15 -11
  241. package/src/View/GridInfo/GridInfoPopup.js +62 -25
  242. package/src/View/QuickSearch/QuickSearchInput.js +1 -1
  243. package/src/View/QuickSearch/QuickSearchPopup.d.ts +1 -1
  244. package/src/View/QuickSearch/QuickSearchPopup.js +1 -1
  245. package/src/View/QuickSearch/Utilities/useQuickSearchDebounced.d.ts +2 -2
  246. package/src/View/StyledColumn/RangesComponent.js +13 -16
  247. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +0 -2
  248. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +2 -2
  249. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +2 -3
  250. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.d.ts +0 -3
  251. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.js +3 -3
  252. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +7 -11
  253. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +6 -6
  254. package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +2 -2
  255. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +2 -2
  256. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +8 -8
  257. package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +4 -4
  258. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardRangesSection.js +2 -2
  259. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +4 -4
  260. package/src/View/Wizard/CollapsibleWizardCard.d.ts +3 -1
  261. package/src/View/Wizard/CollapsibleWizardCard.js +17 -9
  262. package/src/agGrid/Adaptable.d.ts +0 -12
  263. package/src/agGrid/Adaptable.js +0 -52
  264. package/src/agGrid/AdaptableAgGrid.d.ts +4 -4
  265. package/src/agGrid/AdaptableAgGrid.js +2 -0
  266. package/src/agGrid/AdaptableFrameworkComponent.d.ts +12 -0
  267. package/src/agGrid/AdaptableLogger.d.ts +74 -1
  268. package/src/agGrid/AgGridColumnAdapter.d.ts +1 -1
  269. package/src/agGrid/AgGridColumnAdapter.js +7 -5
  270. package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +3 -0
  271. package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +3 -0
  272. package/src/agGrid/index.d.ts +1 -6
  273. package/src/agGrid/index.js +1 -3
  274. package/src/aql/ExpressionEvaluation.d.ts +27 -0
  275. package/src/aql/types.d.ts +22 -0
  276. package/src/components/ColorField/index.d.ts +13 -0
  277. package/src/components/ColorField/index.js +26 -0
  278. package/src/components/aql/CompactEditor/CompactEditor.js +1 -1
  279. package/src/components/aql/ExpressionEditor/BaseEditorInput.js +1 -1
  280. package/src/components/aql/ExpressionEditor/CompactExpressionToolbar.d.ts +5 -0
  281. package/src/components/aql/ExpressionEditor/CompactExpressionToolbar.js +12 -5
  282. package/src/components/aql/ExpressionEditor/ExpressionPreview.js +1 -1
  283. package/src/components/aql/ExpressionEditor/index.d.ts +3 -2
  284. package/src/components/aql/QueryBuilder/GroupEditor.js +1 -1
  285. package/src/components/aql/QueryBuilder/QueryBuilder.d.ts +5 -0
  286. package/src/components/aql/QueryBuilder/QueryBuilder.js +1 -1
  287. package/src/components/aql/QueryBuilder/QueryBuilderInputs.js +12 -2
  288. package/src/components/aql/QueryBuilder/context.d.ts +7 -0
  289. package/src/components/aql/QueryBuilder/context.js +3 -1
  290. package/src/env.js +2 -2
  291. package/src/layout-manager/src/normalizeLayoutModel.d.ts +1 -1
  292. package/src/layout-manager/src/simplifyLayoutModel.d.ts +1 -1
  293. package/src/migration/AdaptableUpgradeHelper.d.ts +7 -2
  294. package/src/migration/VersionUpgrade17.js +13 -8
  295. package/src/migration/VersionUpgrade24.d.ts +9 -0
  296. package/src/migration/VersionUpgrade24.js +27 -0
  297. package/src/migration/legacyAdaptableQuery.d.ts +29 -4
  298. package/src/setupDevTools.js +827 -111
  299. package/src/types.d.ts +2 -4
  300. package/tsconfig.esm.tsbuildinfo +1 -1
  301. package/upgrade.d.ts +1 -0
  302. package/upgrade.js +1 -0
  303. package/vendor/components/Button/index.d.ts +1 -1
  304. package/vendor/components/Button/index.d.ts.map +1 -1
  305. package/vendor/components/Button/index.js.map +1 -1
  306. package/vendor/components/CheckBox/index.d.ts +1 -1
  307. package/vendor/components/CheckBox/index.d.ts.map +1 -1
  308. package/vendor/components/CheckBox/index.js.map +1 -1
  309. package/vendor/components/ColorField/index.d.ts +53 -0
  310. package/vendor/components/ColorField/index.d.ts.map +1 -0
  311. package/vendor/components/ColorField/index.js +80 -0
  312. package/vendor/components/ColorField/index.js.map +1 -0
  313. package/vendor/components/ColorPicker/colorPickerTab.d.ts +4 -0
  314. package/vendor/components/ColorPicker/colorPickerTab.d.ts.map +1 -0
  315. package/vendor/components/ColorPicker/colorPickerTab.js +28 -0
  316. package/vendor/components/ColorPicker/colorPickerTab.js.map +1 -0
  317. package/vendor/components/ColorPicker/index.d.ts +98 -0
  318. package/vendor/components/ColorPicker/index.d.ts.map +1 -0
  319. package/vendor/components/ColorPicker/index.js +322 -0
  320. package/vendor/components/ColorPicker/index.js.map +1 -0
  321. package/vendor/components/ColorPicker/themeColors.d.ts +94 -0
  322. package/vendor/components/ColorPicker/themeColors.d.ts.map +1 -0
  323. package/vendor/components/ColorPicker/themeColors.js +240 -0
  324. package/vendor/components/ColorPicker/themeColors.js.map +1 -0
  325. package/vendor/components/Combobox/VirtualizedList.d.ts +1 -1
  326. package/vendor/components/Combobox/VirtualizedList.d.ts.map +1 -1
  327. package/vendor/components/Combobox/VirtualizedList.js.map +1 -1
  328. package/vendor/components/Combobox/comboboxUtils.d.ts +9 -0
  329. package/vendor/components/Combobox/comboboxUtils.d.ts.map +1 -1
  330. package/vendor/components/Combobox/comboboxUtils.js +41 -2
  331. package/vendor/components/Combobox/comboboxUtils.js.map +1 -1
  332. package/vendor/components/Combobox/index.d.ts +1 -1
  333. package/vendor/components/Combobox/index.d.ts.map +1 -1
  334. package/vendor/components/Combobox/index.js +14 -9
  335. package/vendor/components/Combobox/index.js.map +1 -1
  336. package/vendor/components/NumberInput/index.d.ts +51 -0
  337. package/vendor/components/NumberInput/index.d.ts.map +1 -0
  338. package/vendor/components/NumberInput/index.js +82 -0
  339. package/vendor/components/NumberInput/index.js.map +1 -0
  340. package/vendor/components/index.css +286 -24
  341. package/vendor/components/index.d.ts +6 -0
  342. package/vendor/components/index.d.ts.map +1 -1
  343. package/vendor/components/index.js +3 -0
  344. package/vendor/components/index.js.map +1 -1
  345. package/vendor/components/twMerge.d.ts +3 -2
  346. package/vendor/components/twMerge.d.ts.map +1 -1
  347. package/vendor/components/twMerge.js.map +1 -1
  348. package/vendor/components/ui/combobox.d.ts.map +1 -1
  349. package/vendor/components/ui/combobox.js +1 -1
  350. package/vendor/components/ui/combobox.js.map +1 -1
  351. package/vendor/components/ui/input-group.d.ts.map +1 -1
  352. package/vendor/components/ui/input-group.js +5 -4
  353. package/vendor/components/ui/input-group.js.map +1 -1
  354. package/src/AdaptableInterfaces/AdaptableNoCodeWizard.d.ts +0 -99
  355. package/src/AdaptableInterfaces/AdaptableNoCodeWizard.js +0 -1
  356. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableConfig.d.ts +0 -15
  357. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableConfig.js +0 -1
  358. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.d.ts +0 -19
  359. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +0 -337
  360. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/Components/FormBox.d.ts +0 -5
  361. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/Components/FormBox.js +0 -4
  362. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.d.ts +0 -30
  363. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +0 -162
  364. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.d.ts +0 -18
  365. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.js +0 -12
  366. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.d.ts +0 -8
  367. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +0 -131
  368. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.d.ts +0 -8
  369. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.js +0 -30
  370. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.d.ts +0 -6
  371. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.js +0 -80
  372. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.d.ts +0 -6
  373. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +0 -100
  374. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.d.ts +0 -11
  375. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.js +0 -8
  376. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/index.d.ts +0 -2
  377. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/index.js +0 -2
  378. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/useSelection.d.ts +0 -21
  379. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/useSelection.js +0 -63
  380. package/src/View/AdaptableWizardView/Utilities/Utils.d.ts +0 -1
  381. package/src/View/AdaptableWizardView/Utilities/Utils.js +0 -21
  382. package/src/View/AdaptableWizardView/Utilities/helper.d.ts +0 -19
  383. package/src/View/AdaptableWizardView/Utilities/helper.js +0 -81
  384. package/src/View/AdaptableWizardView/Wizard.d.ts +0 -57
  385. package/src/View/AdaptableWizardView/Wizard.js +0 -98
  386. package/src/View/AdaptableWizardView/index.d.ts +0 -4
  387. package/src/View/AdaptableWizardView/index.js +0 -4
  388. package/src/components/ColorPicker/ColorPicker.d.ts +0 -12
  389. package/src/components/ColorPicker/ColorPicker.js +0 -48
  390. package/src/components/ColorPicker/OptionalColorPicker.d.ts +0 -12
  391. package/src/components/ColorPicker/OptionalColorPicker.js +0 -13
  392. package/src/components/ColorPicker/index.d.ts +0 -2
  393. package/src/components/ColorPicker/index.js +0 -2
@@ -0,0 +1,19 @@
1
+ import * as CommentsRedux from '../ActionsReducers/CommentsRedux';
2
+ import * as InternalRedux from '../ActionsReducers/InternalRedux';
3
+ import * as PluginsRedux from '../ActionsReducers/PluginsRedux';
4
+ import * as PopupRedux from '../ActionsReducers/PopupRedux';
5
+ const collectActionTypes = (reduxModule) => {
6
+ return Object.values(reduxModule).filter((value) => typeof value === 'string');
7
+ };
8
+ const TRANSIENT_REDUX_ACTION_TYPES = new Set([
9
+ ...collectActionTypes(InternalRedux),
10
+ ...collectActionTypes(PopupRedux),
11
+ ...collectActionTypes(PluginsRedux),
12
+ ...collectActionTypes(CommentsRedux),
13
+ ]);
14
+ export function isTransientReduxAction(actionType) {
15
+ if (!actionType) {
16
+ return false;
17
+ }
18
+ return TRANSIENT_REDUX_ACTION_TYPES.has(actionType);
19
+ }
@@ -102,7 +102,7 @@ export class AlertModule extends AdaptableModuleBase {
102
102
  if (isScheduledAlertDefinition(alertDefinition)) {
103
103
  return [];
104
104
  }
105
- const queryExpression = this.api.expressionApi.getAdaptableQueryExpression(alertDefinition.Rule);
105
+ const queryExpression = alertDefinition.Rule;
106
106
  if (queryExpression) {
107
107
  return this.api.expressionApi.getColumnsFromExpression(queryExpression);
108
108
  }
@@ -117,7 +117,7 @@ export class AlertModule extends AdaptableModuleBase {
117
117
  if (isScheduledAlertDefinition(alertDefinition)) {
118
118
  return [];
119
119
  }
120
- const queryExpression = this.api.expressionApi.getAdaptableQueryExpression(alertDefinition.Rule);
120
+ const queryExpression = alertDefinition.Rule;
121
121
  if (!queryExpression) {
122
122
  return [];
123
123
  }
@@ -22,7 +22,7 @@ export class FormatColumnModule extends AdaptableModuleBase {
22
22
  return this.getLayoutExtensionModuleObjects('FormatColumn', () => this.api.formatColumnApi.getFormatColumns(), config);
23
23
  }
24
24
  getExplicitlyReferencedColumnIds(formatColumn) {
25
- const queryExpression = formatColumn.Rule && this.api.expressionApi.getAdaptableQueryExpression(formatColumn.Rule);
25
+ const queryExpression = formatColumn.Rule;
26
26
  if (queryExpression) {
27
27
  return this.api.expressionApi.getColumnsFromExpression(queryExpression);
28
28
  }
@@ -34,7 +34,7 @@ export class FormatColumnModule extends AdaptableModuleBase {
34
34
  return [];
35
35
  }
36
36
  getReferencedNamedQueryNames(formatColumn) {
37
- const queryExpression = formatColumn.Rule && this.api.expressionApi.getAdaptableQueryExpression(formatColumn.Rule);
37
+ const queryExpression = formatColumn.Rule;
38
38
  if (!queryExpression) {
39
39
  return [];
40
40
  }
@@ -16,3 +16,4 @@ export declare const AgGridModulesDocsLink = "https://www.adaptabletools.com/doc
16
16
  export declare const AlertMessageDocsLink = "https://www.adaptabletools.com/docs/handbook-alerting-message";
17
17
  export declare const FormatColumnPlaceholderDocsLink = "https://www.adaptabletools.com/docs/handbook-column-formatting-display-format-template";
18
18
  export declare const AgGridRequiredModulesDocsLink = "https://www.adaptabletools.com/docs/getting-started-aggrid-modules#mandatory-modules";
19
+ export declare const StatePersistenceDocsLink = "https://www.adaptabletools.com/docs/dev-guide-adaptable-state-persistence";
@@ -16,3 +16,4 @@ export const AgGridModulesDocsLink = `${HOST_URL_DOCS}/getting-started-aggrid-mo
16
16
  export const AlertMessageDocsLink = `${HOST_URL_DOCS}/handbook-alerting-message`;
17
17
  export const FormatColumnPlaceholderDocsLink = `${HOST_URL_DOCS}/handbook-column-formatting-display-format-template`;
18
18
  export const AgGridRequiredModulesDocsLink = `${HOST_URL_DOCS}/getting-started-aggrid-modules#mandatory-modules`;
19
+ export const StatePersistenceDocsLink = `${HOST_URL_DOCS}/dev-guide-adaptable-state-persistence`;
@@ -2,8 +2,8 @@ import { SummaryOperation } from '../../AdaptableState/Common/Enums';
2
2
  import { SystemThemeEntry } from '../../AdaptableState/ThemeState';
3
3
  export declare const CELL_SUMMARY_DEFAULT_OPERATION: SummaryOperation | string;
4
4
  export declare const QUICK_SEARCH_DEFAULT_TEXT_BACK_COLOR: string;
5
- export declare const QUICK_SEARCH_DEFAULT_CELL_BACK_COLOR: string;
6
- export declare const QUICK_SEARCH_DEFAULT_FORE_COLOR: string;
5
+ export declare const QUICK_SEARCH_DEFAULT_TEXT_FORE_COLOR: string;
7
6
  export declare const QUICK_SEARCH_DEFAULT_CURRENT_BACK_COLOR: string;
7
+ export declare const QUICK_SEARCH_DEFAULT_CURRENT_FORE_COLOR: string;
8
8
  export declare const SYSTEM_THEMES: SystemThemeEntry[];
9
9
  export declare const THEME_DEFAULT_CURRENT_THEME: string;
@@ -1,10 +1,10 @@
1
1
  import { SummaryOperation } from '../../AdaptableState/Common/Enums';
2
- import { getSwatchColorVar } from '../../Utilities/Helpers/UIHelper';
2
+ import { themeColorVar } from '../../Utilities/Helpers/UIHelper';
3
3
  import { LIGHT_THEME, DARK_THEME, OS_THEME } from './GeneralConstants';
4
4
  export const CELL_SUMMARY_DEFAULT_OPERATION = SummaryOperation.Sum;
5
- export const QUICK_SEARCH_DEFAULT_TEXT_BACK_COLOR = getSwatchColorVar(9);
6
- export const QUICK_SEARCH_DEFAULT_CELL_BACK_COLOR = getSwatchColorVar(10);
7
- export const QUICK_SEARCH_DEFAULT_FORE_COLOR = getSwatchColorVar(1);
8
- export const QUICK_SEARCH_DEFAULT_CURRENT_BACK_COLOR = getSwatchColorVar(20);
5
+ export const QUICK_SEARCH_DEFAULT_TEXT_BACK_COLOR = themeColorVar('quick-search-match');
6
+ export const QUICK_SEARCH_DEFAULT_TEXT_FORE_COLOR = themeColorVar('quick-search-match-foreground');
7
+ export const QUICK_SEARCH_DEFAULT_CURRENT_BACK_COLOR = themeColorVar('quick-search-current-match');
8
+ export const QUICK_SEARCH_DEFAULT_CURRENT_FORE_COLOR = themeColorVar('quick-search-current-match-foreground');
9
9
  export const SYSTEM_THEMES = [LIGHT_THEME, DARK_THEME, OS_THEME];
10
10
  export const THEME_DEFAULT_CURRENT_THEME = LIGHT_THEME;
@@ -31,4 +31,4 @@ export declare const inferAlertTypeFromDefinition: (alert: AlertDefinition, kind
31
31
  * otherwise inferred from Rule / Schedule shape.
32
32
  */
33
33
  export declare const getAlertType: (alert: AlertDefinition, kind?: ExpressionKind) => AlertType | null;
34
- export declare const getAlertTypeText: (alertType: AlertType) => "" | "Aggregation" | "Observable" | "Scheduled" | "Data Change" | "Relative Change" | "Data Validation" | "Row Change";
34
+ export declare const getAlertTypeText: (alertType: AlertType) => "" | "Observable" | "Aggregation" | "Scheduled" | "Data Change" | "Relative Change" | "Data Validation" | "Row Change";
@@ -1,6 +1,15 @@
1
1
  import { AdaptableApi } from '../../Api/AdaptableApi';
2
2
  import { SettingsPanelDisplayOptions, SettingsPanelNavigation, SettingsPanelNavigationGroup, SettingsPanelOptions } from '../../AdaptableOptions/SettingsPanelOptions';
3
3
  import { AdaptableIcon } from '../../types';
4
+ /** One Settings Panel sidebar module (visible for the current grid / entitlements). */
5
+ export type VisibleSettingsPanelNavigationItem = {
6
+ moduleName: string;
7
+ label: string;
8
+ };
9
+ export type VisibleSettingsPanelNavigationGroup = {
10
+ label: string;
11
+ items: VisibleSettingsPanelNavigationItem[];
12
+ };
4
13
  /**
5
14
  * True when `adaptableId` is the framework placeholder (`adaptable_id` or `adaptable_id_<n>`),
6
15
  * not a developer-supplied human name.
@@ -41,3 +50,8 @@ export declare const getSettingsPanelOpenIcon: (resolvedIcon: SettingsPanelOptio
41
50
  export declare const DEFAULT_SETTINGS_PANEL_NAVIGATION_GROUPS: SettingsPanelNavigationGroup[];
42
51
  export declare const buildDefaultSettingsPanelNavigation: (customPanelNames?: string[]) => SettingsPanelNavigation;
43
52
  export declare const resolveSettingsPanelNavigation: (api: AdaptableApi, settingsPanelOptions: SettingsPanelOptions) => SettingsPanelNavigation;
53
+ /**
54
+ * Settings Panel navigation groups containing only modules that appear in the
55
+ * panel sidebar (same rules as {@link useMenuItems} in AdaptablePopup).
56
+ */
57
+ export declare function resolveVisibleSettingsPanelNavigationGroups(api: AdaptableApi): VisibleSettingsPanelNavigationGroup[];
@@ -1,4 +1,4 @@
1
- import { ADAPTABLE_ID } from '../Constants/GeneralConstants';
1
+ import { ADAPTABLE_ID, STANDALONE_MODULE_POPUPS } from '../Constants/GeneralConstants';
2
2
  import { SettingsPanelFriendlyName } from '../Constants/ModuleConstants';
3
3
  import StringExtensions from '../Extensions/StringExtensions';
4
4
  export const isGenericAdaptableId = (adaptableId) => {
@@ -143,3 +143,39 @@ export const resolveSettingsPanelNavigation = (api, settingsPanelOptions) => {
143
143
  warnLegacyNavigationOnce(api);
144
144
  return convertLegacyFlatNavigationToGrouped(navigation);
145
145
  };
146
+ export function resolveVisibleSettingsPanelNavigationGroups(api) {
147
+ const settingsPanelOptions = api.optionsApi.getAdaptableOptions().settingsPanelOptions;
148
+ const navigation = resolveSettingsPanelNavigation(api, settingsPanelOptions ?? {});
149
+ const allMenuItems = api.internalApi.getInternalState().SettingsPanelModuleEntries ?? [];
150
+ const visibleItems = allMenuItems.filter((item) => item.category !== 'General' &&
151
+ item.category !== 'CustomSettingsPanel' &&
152
+ item.category !== 'Group' &&
153
+ !STANDALONE_MODULE_POPUPS.includes(item.category) &&
154
+ item.isVisible);
155
+ const moduleService = api.internalApi.getModuleService();
156
+ const groups = [];
157
+ for (const group of navigation.groups) {
158
+ const items = [];
159
+ for (const moduleName of group.items) {
160
+ const moduleId = String(moduleName);
161
+ const customSettingsPanel = settingsPanelOptions?.customSettingsPanels?.find((panel) => panel.name === moduleId);
162
+ if (customSettingsPanel) {
163
+ items.push({ moduleName: moduleId, label: customSettingsPanel.name });
164
+ continue;
165
+ }
166
+ const menuItem = visibleItems.find((item) => item.category === moduleId);
167
+ if (!menuItem) {
168
+ continue;
169
+ }
170
+ items.push({
171
+ moduleName: moduleId,
172
+ label: menuItem.label ??
173
+ moduleService.getModuleFriendlyName(moduleId),
174
+ });
175
+ }
176
+ if (items.length) {
177
+ groups.push({ label: group.label ?? '', items });
178
+ }
179
+ }
180
+ return groups;
181
+ }
@@ -6,15 +6,15 @@ import { Schedule, Weekday } from '../../AdaptableState/Common/Schedule';
6
6
  import { AdaptableColumnDataType, AdaptableSystemIconName } from '../../types';
7
7
  import { AdaptableAlert } from '../../AdaptableState/Common/AdaptableAlert';
8
8
  import { AdaptableMessageType } from '../../AdaptableState/Common/AdaptableMessageType';
9
- /** Generic swatch entries for the Colour Picker (resolved at runtime per active theme). */
10
- export declare function getSwatchColorVar(index: number): string;
11
- /** Default mid-gray from the theme swatch palette (`--ab-color-swatch-4`). */
12
- export declare function getGraySwatchColor(): string;
13
- export declare function getSwatchColorPaletteEntries(): string[];
14
- /** Theme semantic colours for the Colour Picker (resolved at runtime per active theme). */
15
- export declare function getThemeSemanticColorPaletteEntries(): string[];
16
- /** Swatch and theme semantic entries (default Colour Picker set). */
17
- export declare function getDefaultColorPalette(): string[];
9
+ /** A theme colour token as a CSS value: `themeColorVar('badge')` → `var(--ab-color-badge)`. */
10
+ export declare function themeColorVar(token: string): string;
11
+ /** Default colour of a new range in Range Bar, Bullet and Ranges styled columns. */
12
+ export declare function getDefaultRangeColor(): string;
13
+ /** Default colours for a new Gradient Zero Centred range (follows the theme). */
14
+ export declare function getDefaultZeroCentredColors(): {
15
+ NegativeColor: string;
16
+ PositiveColor: string;
17
+ };
18
18
  export declare function getEmptyConfigState(): EditableConfigEntityState;
19
19
  export declare function getDescriptionForDataType(dataType: AdaptableColumnDataType): "text" | "number" | "date";
20
20
  export declare function getPlaceholderForDataType(dataType: AdaptableColumnDataType): "Enter Value" | "Enter Number" | "Enter Date";
@@ -41,11 +41,9 @@ export declare function getCSSVariableValue(cssVariable: string): string | undef
41
41
  export declare function setCSSVariableValue(cssVariable: string, value: string): void;
42
42
  export declare function isBrowserDocumentAvailable(): boolean;
43
43
  export declare const UIHelper: {
44
- getSwatchColorVar: typeof getSwatchColorVar;
45
- getGraySwatchColor: typeof getGraySwatchColor;
46
- getSwatchColorPaletteEntries: typeof getSwatchColorPaletteEntries;
47
- getThemeSemanticColorPaletteEntries: typeof getThemeSemanticColorPaletteEntries;
48
- getDefaultColorPalette: typeof getDefaultColorPalette;
44
+ themeColorVar: typeof themeColorVar;
45
+ getDefaultRangeColor: typeof getDefaultRangeColor;
46
+ getDefaultZeroCentredColors: typeof getDefaultZeroCentredColors;
49
47
  getEmptyConfigState: typeof getEmptyConfigState;
50
48
  getDescriptionForDataType: typeof getDescriptionForDataType;
51
49
  getPlaceholderForDataType: typeof getPlaceholderForDataType;
@@ -3,38 +3,17 @@ import { FontWeight, FontStyle, StatusColour } from '../../AdaptableState/Common
3
3
  import { StringExtensions } from '../Extensions/StringExtensions';
4
4
  import { getScheduleDescription as getScheduleDescriptionFromHelper } from './Scheduling/ScheduleHelper';
5
5
  import ArrayExtensions from '../Extensions/ArrayExtensions';
6
- export function getSwatchColorVar(index) {
7
- return `var(--ab-color-swatch-${index})`;
6
+ export function themeColorVar(token) {
7
+ return `var(--ab-color-${token})`;
8
8
  }
9
- export function getGraySwatchColor() {
10
- return getSwatchColorVar(4);
9
+ export function getDefaultRangeColor() {
10
+ return themeColorVar('range-default');
11
11
  }
12
- export function getSwatchColorPaletteEntries() {
13
- return Array.from({ length: 20 }, (_, i) => getSwatchColorVar(i + 1));
14
- }
15
- export function getThemeSemanticColorPaletteEntries() {
16
- return [
17
- 'var(--ab-color-destructive)',
18
- 'var(--ab-color-warn)',
19
- 'var(--ab-color-success)',
20
- 'var(--ab-color-info)',
21
- 'var(--ab-color-accent)',
22
- 'var(--ab-color-palette-1)',
23
- 'var(--ab-color-palette-2)',
24
- 'var(--ab-color-palette-3)',
25
- 'var(--ab-color-palette-4)',
26
- 'var(--ab-color-palette-5)',
27
- 'var(--ab-color-palette-6)',
28
- 'var(--ab-color-palette-7)',
29
- 'var(--ab-color-palette-8)',
30
- 'var(--ab-color-palette-9)',
31
- 'var(--ab-color-palette-10)',
32
- 'var(--ab-color-palette-11)',
33
- 'var(--ab-color-palette-12)',
34
- ];
35
- }
36
- export function getDefaultColorPalette() {
37
- return [...getSwatchColorPaletteEntries(), ...getThemeSemanticColorPaletteEntries()];
12
+ export function getDefaultZeroCentredColors() {
13
+ return {
14
+ NegativeColor: themeColorVar('destructive'),
15
+ PositiveColor: themeColorVar('success'),
16
+ };
38
17
  }
39
18
  export function getEmptyConfigState() {
40
19
  return {
@@ -324,11 +303,9 @@ export function isBrowserDocumentAvailable() {
324
303
  return typeof window !== 'undefined' && typeof window.document !== 'undefined';
325
304
  }
326
305
  export const UIHelper = {
327
- getSwatchColorVar,
328
- getGraySwatchColor,
329
- getSwatchColorPaletteEntries,
330
- getThemeSemanticColorPaletteEntries,
331
- getDefaultColorPalette,
306
+ themeColorVar,
307
+ getDefaultRangeColor,
308
+ getDefaultZeroCentredColors,
332
309
  getEmptyConfigState,
333
310
  getDescriptionForDataType,
334
311
  getPlaceholderForDataType,
@@ -4,7 +4,7 @@ import { buildCronExpression } from './Helpers/Scheduling/ScheduleHelper';
4
4
  import { EMPTY_STRING } from './Constants/GeneralConstants';
5
5
  import { ALERT_DEFAULT_MESSAGE_TYPE, ALERT_DEFAULT_SHOW_POPUP, PLUS_MINUS_DEFAULT_NUDGE_VALUE, } from './Constants/ObjectDefaultConstants';
6
6
  import { Bounce, Flip, Slide, Zoom } from '../components/Toastify';
7
- import { getSwatchColorVar } from './Helpers/UIHelper';
7
+ import { themeColorVar } from './Helpers/UIHelper';
8
8
  import { isPivotLayout } from './Helpers/Layouts/LayoutHelper';
9
9
  export function CreateEmptyCustomSort() {
10
10
  return { Uuid: createUuid(), Name: EMPTY_STRING, ColumnId: EMPTY_STRING, SortedValues: [] };
@@ -250,8 +250,8 @@ export function CreateDefaultStyledColumnBadge() {
250
250
  return {
251
251
  Shape: 'Rounded',
252
252
  PillStyle: {
253
- BackColor: getSwatchColorVar(3),
254
- ForeColor: getSwatchColorVar(1),
253
+ BackColor: themeColorVar('badge'),
254
+ ForeColor: themeColorVar('badge-foreground'),
255
255
  },
256
256
  };
257
257
  }
@@ -784,8 +784,6 @@ export class QueryLanguageService {
784
784
  const columnFriendlyName = this.adaptableApi.columnApi.getFriendlyNameForColumnId(columnId);
785
785
  result = result.split(columnId).join(columnFriendlyName);
786
786
  }
787
- result = result.replace(/\$SCOPE\s*\(\s*\)/g, '$Column_Scope');
788
- result = result.replace(/\$SCOPE\b/g, '$Column_Scope');
789
787
  return result;
790
788
  }
791
789
  getNodesFromExpression(input, nodeType) {
@@ -121,5 +121,5 @@ export const CalculatedColumnExpressionWizardSection = (props) => {
121
121
  const showObservableHint = props.calculatedColumnType === 'Standard' &&
122
122
  props.onCalculatedColumnTypeChange != null &&
123
123
  expressionContainsObservableCall(data.Expression);
124
- return (_jsxs(ExpressionUseCaseCard, { title: getTypeTitle(props.calculatedColumnType), description: getTypeDescription(props.calculatedColumnType), examplesKind: getExamplesKind(props.calculatedColumnType), children: [_jsx(ExpressionEditor, { type: editorType, scalarVariant: isObservable ? 'observable' : undefined, module: moduleInfo.ModuleName, className: "twa:pl-0", value: data.Expression ?? '', onChange: (expression) => setCalculatedColumnExpression(expression), initialData: initialData, columns: columns, fields: isPerRow ? api.expressionApi.internalApi.getAvailableFields() : undefined, namedQueries: api.namedQueryApi.getNamedQueries(), isFullExpression: true, api: api, suppressTypeInfoCard: true, examplesKind: getExamplesKind(props.calculatedColumnType) }), showObservableHint ? (_jsxs(HelpBlock, { "data-name": "calculated-column-observable-hint", className: "twa:mt-2 twa:flex twa:items-center twa:gap-2 twa:text-3", children: [_jsx("span", { children: "This Expression uses observable (live) functions." }), _jsx(SimpleButton, { variant: "outlined", "data-name": "calculated-column-switch-to-observable", onClick: () => props.onCalculatedColumnTypeChange?.('Observable'), children: "Switch to Observable" })] })) : null] }));
124
+ return (_jsxs(ExpressionUseCaseCard, { title: getTypeTitle(props.calculatedColumnType), description: getTypeDescription(props.calculatedColumnType), examplesKind: getExamplesKind(props.calculatedColumnType), children: [_jsx(ExpressionEditor, { type: editorType, scalarVariant: isObservable ? 'observable' : undefined, suppressObservable: !isObservable, module: moduleInfo.ModuleName, className: "twa:pl-0", value: data.Expression ?? '', onChange: (expression) => setCalculatedColumnExpression(expression), initialData: initialData, columns: columns, fields: isPerRow ? api.expressionApi.internalApi.getAvailableFields() : undefined, namedQueries: api.namedQueryApi.getNamedQueries(), isFullExpression: true, api: api, suppressTypeInfoCard: true, examplesKind: getExamplesKind(props.calculatedColumnType) }), showObservableHint ? (_jsxs(HelpBlock, { "data-name": "calculated-column-observable-hint", className: "twa:mt-2 twa:flex twa:items-center twa:gap-2 twa:text-3", children: [_jsx("span", { children: "This Expression uses observable (live) functions." }), _jsx(SimpleButton, { variant: "outlined", "data-name": "calculated-column-switch-to-observable", onClick: () => props.onCalculatedColumnTypeChange?.('Observable'), children: "Switch to Observable" })] })) : null] }));
125
125
  };
@@ -10,7 +10,7 @@ import { getSettingsPanelNavigationItems } from './useMenuItems';
10
10
  import { isSettingsPanelNavigationItem, } from './settingsPanelNavigationTypes';
11
11
  import { SidebarTrigger } from '../../../../components/ui/sidebar';
12
12
  import { Flex } from '../../../../components/Flex';
13
- import { Input } from '../../../../components/ui/input';
13
+ import { AdaptableFormControlTextClear } from '../../Forms/AdaptableFormControlTextClear';
14
14
  import { Tooltip } from '../../../../components/Tooltip';
15
15
  import { resolveSettingsPanelDisplayOptions } from '../../../../Utilities/Helpers/SettingsPanelHelper';
16
16
  const navigationItemClassName = 'ab-Adaptable-Popup__Navigation__List__Item';
@@ -56,13 +56,7 @@ export const filterSettingsPanelNavigationEntries = (entries, query) => {
56
56
  }
57
57
  return filtered;
58
58
  };
59
- const NavigationItem = ({ menuItem, description, isActive, dataName, customPanelIcon, isCustomSettingsPanel, onAction, showModuleIcons, showModuleDescriptions, collapsed, }) => {
60
- const ref = useRef(null);
61
- useEffect(() => {
62
- if (isActive) {
63
- ref.current?.focus();
64
- }
65
- }, [isActive]);
59
+ const NavigationItem = ({ menuItem, description, isActive, dataName, customPanelIcon, isCustomSettingsPanel, onAction, showModuleIcons, showModuleDescriptions, collapsed, buttonRef, }) => {
66
60
  const visibleDescription = !collapsed && showModuleDescriptions ? description : undefined;
67
61
  let icon = null;
68
62
  if (isCustomSettingsPanel) {
@@ -82,7 +76,7 @@ const NavigationItem = ({ menuItem, description, isActive, dataName, customPanel
82
76
  return (_jsx("li", { className: cn(navigationItemClassName, {
83
77
  [`${navigationItemClassName}--active`]: isActive,
84
78
  [`${navigationItemClassName}--collapsed`]: collapsed,
85
- }), children: _jsxs("button", { ref: ref, type: "button", title: tooltip, "aria-label": menuItem.label, className: cn(`${navigationItemClassName}__Button ${targetOwn.focusOutline}`, {
79
+ }), children: _jsxs("button", { ref: buttonRef, type: "button", title: tooltip, "aria-label": menuItem.label, className: cn(`${navigationItemClassName}__Button ${targetOwn.focusOutline}`, {
86
80
  'twa:flex twa:flex-row twa:gap-2': true,
87
81
  'twa:items-start': Boolean(visibleDescription),
88
82
  'twa:items-center': !visibleDescription,
@@ -128,6 +122,10 @@ export const Navigation = (props) => {
128
122
  const { showModuleIcons, showModuleDescriptions, showNavigationSearch, enableCollapseView, } = displayOptions;
129
123
  const collapsed = enableCollapseView && (props.collapsed ?? false);
130
124
  const visibleMenuItems = useMemo(() => filterSettingsPanelNavigationEntries(props.menuItems, searchQuery), [props.menuItems, searchQuery]);
125
+ const activeButtonRef = useRef(null);
126
+ useEffect(() => {
127
+ activeButtonRef.current?.focus();
128
+ }, [props.activeItem]);
131
129
  const makeActive = (menuItem) => {
132
130
  dispatch(menuItem.reduxAction);
133
131
  };
@@ -167,7 +165,7 @@ export const Navigation = (props) => {
167
165
  'twa:justify-center twa:px-1 twa:pt-2 twa:pb-1': collapsed,
168
166
  'twa:px-2 twa:pt-2 twa:pb-1': !collapsed,
169
167
  'twa:justify-end': !collapsed && !showSearchInput,
170
- }), children: [showSearchInput ? (_jsx(Input, { "data-name": "settings-panel-nav-search", type: "search", value: searchQuery, onChange: (event) => setSearchQuery(event.currentTarget.value), placeholder: "Search...", "aria-label": "Search Settings Panel modules", className: "twa:h-8 twa:flex-1 twa:min-w-0 twa:text-2" })) : null, collapseTrigger] })) : null, _jsxs("ul", { className: "ab-Adaptable-Popup__Navigation__List twa:m-0 twa:list-none twa:py-3 twa:gap-1 twa:flex twa:flex-col twa:flex-1 twa:min-h-0 twa:overflow-auto", onKeyDown: handleKeyPress, children: [!hasVisibleItems ? (_jsx("li", { className: "twa:list-none twa:px-3 twa:py-2 twa:text-2 twa:opacity-70", children: collapsed ? null : 'No modules match' })) : null, visibleMenuItems.map((entry, index) => {
168
+ }), children: [showSearchInput ? (_jsx(AdaptableFormControlTextClear, { "data-name": "settings-panel-nav-search", value: searchQuery, OnTextChange: setSearchQuery, placeholder: "Search...", "aria-label": "Search Settings Panel modules", className: "twa:h-8 twa:flex-1 twa:min-w-0", inputClassName: "twa:text-2" })) : null, collapseTrigger] })) : null, _jsxs("ul", { className: "ab-Adaptable-Popup__Navigation__List twa:m-0 twa:list-none twa:py-3 twa:gap-1 twa:flex twa:flex-col twa:flex-1 twa:min-h-0 twa:overflow-auto", onKeyDown: handleKeyPress, children: [!hasVisibleItems ? (_jsx("li", { className: "twa:list-none twa:px-3 twa:py-2 twa:text-2 twa:opacity-70", children: collapsed ? null : 'No modules match' })) : null, visibleMenuItems.map((entry, index) => {
171
169
  if (entry.type === 'header') {
172
170
  if (collapsed) {
173
171
  return null;
@@ -181,6 +179,6 @@ export const Navigation = (props) => {
181
179
  const dataName = isCustomSettingsPanel
182
180
  ? `CSP-${menuItem.label}`
183
181
  : menuItem.category ?? menuItem.label;
184
- return (_jsx(NavigationItem, { menuItem: menuItem, description: entry.description, isActive: isActive, dataName: dataName, customPanelIcon: customPanelIcon, isCustomSettingsPanel: isCustomSettingsPanel, showModuleIcons: showModuleIcons, showModuleDescriptions: showModuleDescriptions, collapsed: collapsed, onAction: () => makeActive(menuItem) }, menuItem.label));
182
+ return (_jsx(NavigationItem, { menuItem: menuItem, description: entry.description, isActive: isActive, dataName: dataName, customPanelIcon: customPanelIcon, isCustomSettingsPanel: isCustomSettingsPanel, showModuleIcons: showModuleIcons, showModuleDescriptions: showModuleDescriptions, collapsed: collapsed, onAction: () => makeActive(menuItem), buttonRef: isActive ? activeButtonRef : undefined }, menuItem.label));
185
183
  })] })] }));
186
184
  };
@@ -1,6 +1,6 @@
1
1
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useState } from 'react';
3
- import { OptionalColorPicker } from '../../components/ColorPicker';
3
+ import { ColorField } from '../../components/ColorField';
4
4
  import HelpBlock from '../../components/HelpBlock';
5
5
  import Panel from '../../components/Panel';
6
6
  import { Tabs } from '../../components/Tabs';
@@ -131,7 +131,7 @@ export const StyleComponent = (props) => {
131
131
  const styleClassNames = props.api.userInterfaceApi.getStyleClassNames();
132
132
  const colourSpellingVariant = props.api.internalApi.getCorrectEnglishVariant('Colour');
133
133
  const coloursSpellingVariant = props.api.internalApi.getCorrectEnglishVariant('colours');
134
- const styleEditorGrid = (_jsxs(Card.Body, { gap: 2, className: "twa:grid twa:grid-cols-[auto_1fr_auto_1fr] twa:items-center twa:p-1", children: [_jsxs(Card.Title, { className: "twa:col-span-2 twa:self-stretch", children: [_jsxs(Box, { className: "twa:font-medium", children: [colourSpellingVariant, " & Border Properties"] }), _jsxs(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: ["Select ", coloursSpellingVariant, " and radius"] })] }), _jsxs("span", { children: ["Back ", colourSpellingVariant] }), _jsx(OptionalColorPicker, { api: props.api, value: componentStyle.BackColor, defaultColor: "#ffffff", onChange: onBackColorChange }), _jsxs("span", { className: "twa:row-start-3", children: ["Fore ", colourSpellingVariant] }), _jsx(OptionalColorPicker, { className: "twa:row-start-3", api: props.api, value: componentStyle.ForeColor, defaultColor: "#000000", onChange: onForeColorChange }), _jsxs("span", { className: "twa:row-start-4", children: ["Border ", colourSpellingVariant] }), _jsx(OptionalColorPicker, { className: "twa:row-start-4", api: props.api, value: componentStyle.BorderColor, defaultColor: "#000000", onChange: onBorderColorChange }), _jsx("span", { className: "twa:row-start-5", children: "Border Radius" }), _jsx(AdaptableInput, { className: "twa:w-[100px] twa:row-start-5", type: "number", min: "0", value: componentStyle.BorderRadius, onChange: (event) => {
134
+ const styleEditorGrid = (_jsxs(Card.Body, { gap: 2, className: "twa:grid twa:grid-cols-[auto_1fr_auto_1fr] twa:items-center twa:p-1", children: [_jsxs(Card.Title, { className: "twa:col-span-2 twa:self-stretch", children: [_jsxs(Box, { className: "twa:font-medium", children: [colourSpellingVariant, " & Border Properties"] }), _jsxs(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: ["Select ", coloursSpellingVariant, " and radius"] })] }), _jsxs("span", { children: ["Back ", colourSpellingVariant] }), _jsx(ColorField, { value: componentStyle.BackColor, defaultColor: "#ffffff", onChange: onBackColorChange }), _jsxs("span", { className: "twa:row-start-3", children: ["Fore ", colourSpellingVariant] }), _jsx(ColorField, { className: "twa:row-start-3", value: componentStyle.ForeColor, defaultColor: "#000000", onChange: onForeColorChange }), _jsxs("span", { className: "twa:row-start-4", children: ["Border ", colourSpellingVariant] }), _jsx(ColorField, { className: "twa:row-start-4", value: componentStyle.BorderColor, defaultColor: "#000000", onChange: onBorderColorChange }), _jsx("span", { className: "twa:row-start-5", children: "Border Radius" }), _jsx(AdaptableInput, { className: "twa:w-[100px] twa:row-start-5", type: "number", min: "0", value: componentStyle.BorderRadius, onChange: (event) => {
135
135
  const number = Number(event.target.value);
136
136
  if (isNaN(number)) {
137
137
  onBorderRadiusChange(0);
@@ -18,7 +18,7 @@ interface DashboardComponentProps extends ModuleViewPopupProps<any> {
18
18
  onSetIsCollapsed: (IsCollapsed: boolean) => DashboardRedux.DashboardSetIsCollapsedAction;
19
19
  onSetIsFloating: (IsFloating: boolean) => DashboardRedux.DashboardSetIsFloatingAction;
20
20
  onSetFloatingPosition: (FloatingPosition: AdaptableCoordinate) => DashboardRedux.DashboardSetFloatingPositionAction;
21
- onRunQuickSearch: (quickSearchText: string) => QuickSearchRedux.QuickSearchRunAction;
21
+ onRunQuickSearch: (quickSearchText: string) => QuickSearchRedux.QuickSearchRunAction | QuickSearchRedux.QuickSearchClearAction;
22
22
  onShowQuickSearchPopup: () => PopupRedux.PopupShowScreenAction;
23
23
  onShowDashboardPopup: () => PopupRedux.PopupShowScreenAction;
24
24
  }
@@ -126,7 +126,7 @@ function mapDispatchToProps(dispatch) {
126
126
  onSetIsCollapsed: (IsCollapsed) => dispatch(DashboardRedux.DashboardSetIsCollapsed(IsCollapsed)),
127
127
  onSetIsFloating: (IsFloating) => dispatch(DashboardRedux.DashboardSetIsFloating(IsFloating)),
128
128
  onSetFloatingPosition: (FloatingPosition) => dispatch(DashboardRedux.DashboardSetFloatingPosition(FloatingPosition)),
129
- onRunQuickSearch: (newQuickSearchText) => dispatch(QuickSearchRedux.QuickSearchRun(newQuickSearchText)),
129
+ onRunQuickSearch: (newQuickSearchText) => dispatch(QuickSearchRedux.QuickSearchTextAction(newQuickSearchText)),
130
130
  onShowQuickSearchPopup: () => dispatch(PopupRedux.PopupShowScreen(ModuleConstants.QuickSearchModuleId, 'QuickSearchPopup')),
131
131
  onShowDashboardPopup: () => dispatch(PopupRedux.PopupShowScreen(ModuleConstants.DashboardModuleId, 'DashboardPopup')),
132
132
  };
@@ -61,5 +61,5 @@ export const DashboardPopupSections = (props) => {
61
61
  return (_jsxs(Flex, { flexWrap: "wrap", alignItems: "center", className: "twa:gap-1", children: [_jsxs(Tag, { children: ["Tab: ", tab.Name] }), toolbarTitles.map((title, index) => (_jsx(Tag, { children: title }, `${tab.Name}-${title}-${index}`)))] }, tab.Uuid ?? tab.Name));
62
62
  }) })) : (_jsx(Tag, { children: "No Tabs Configured" }));
63
63
  const moduleButtonsSummary = moduleButtonLabels.length > 0 ? (_jsx(Flex, { flexWrap: "wrap", alignItems: "center", className: "twa:gap-1", children: moduleButtonLabels.map((label) => (_jsx(Tag, { children: label }, label))) })) : (_jsx(Tag, { children: "No Module Buttons" }));
64
- return (_jsxs(Flex, { flexDirection: "column", className: "twa:h-full twa:min-h-0 twa:gap-3 twa:overflow-y-auto", children: [props.areDashboardSettingsVisible && (_jsx(CollapsibleWizardCard, { ...bindCard('settings'), "data-name": "dashboard-settings", title: "Settings", help: "Control Dashboard visibility, expansion and floating mode", compactSummary: settingsToggles, compactSummaryInteractive: true, summary: settingsToggles, className: "twa:overflow-hidden", children: settingsToggles })), _jsx(CollapsibleWizardCard, { ...bindCard('pinned-toolbars'), "data-name": "dashboard-pinned-toolbars", title: "Pinned Toolbars", help: "Optional strip along the top of the grid \u2014 pin Toolbars you want always visible (e.g. Grid Filter)", compactSummary: renderCompactAccentTags(pinnedToolbarTitles, (title) => title, { emptyLabel: 'No Pinned Toolbars' }), summary: pinnedSummary, className: "twa:overflow-hidden twa:flex twa:flex-col", bodyClassName: "twa:min-h-[200px] twa:overflow-hidden", children: _jsx(PinnedToolbarsSelector, {}) }), _jsx(CollapsibleWizardCard, { ...bindCard('tabs-toolbars'), "data-name": "dashboard-tabs-toolbars", title: "Tabs & Toolbars", help: "Group Toolbars into named Tabs in the Dashboard header (independent of Pinned Toolbars)", compactSummary: renderCompactAccentTags(tabsCompactLabels, (label) => label, { emptyLabel: 'No Tabs Configured' }), summary: tabsSummary, className: "twa:overflow-hidden twa:flex twa:flex-col", bodyClassName: "twa:min-h-[280px] twa:overflow-hidden", children: _jsx(DashboardManagerUI, { disabled: props.isDashboardDisabled, availableToolbars: [...systemToolbars, ...customToolbars], tabs: tabs, onTabsChange: props.onDashboardSetTabs, api: api }) }), _jsx(CollapsibleWizardCard, { ...bindCard('module-buttons', { fillAvailable: true }), "data-name": "dashboard-module-buttons", title: "Module Buttons", help: "Buttons in the Dashboard header that open Module settings", compactSummary: renderCompactAccentTags(moduleButtonLabels, (label) => label, { emptyLabel: 'No Module Buttons' }), summary: moduleButtonsSummary, className: "twa:overflow-hidden twa:flex twa:flex-col", bodyClassName: "twa:min-h-[240px] twa:overflow-hidden twa:flex twa:flex-col twa:!pt-0 twa:!pb-0 twa:px-1", children: _jsx(ModuleValueSelector, { disabled: props.isDashboardDisabled, options: allModuleButtons, value: selectedModuleButtons, onChange: (selectedValues) => props.onDashboardSetModuleButtons(selectedValues) }) })] }));
64
+ return (_jsxs(Flex, { flexDirection: "column", className: "twa:h-full twa:min-h-0 twa:gap-3 twa:overflow-y-auto", children: [props.areDashboardSettingsVisible && (_jsx(CollapsibleWizardCard, { "data-name": "dashboard-settings", title: "Settings", help: "Control Dashboard visibility, expansion and floating mode", summary: settingsToggles, collapsible: false, className: "twa:overflow-hidden" })), _jsx(CollapsibleWizardCard, { ...bindCard('pinned-toolbars'), "data-name": "dashboard-pinned-toolbars", title: "Pinned Toolbars", help: "Optional strip along the top of the grid \u2014 pin Toolbars you want always visible (e.g. Grid Filter)", compactSummary: renderCompactAccentTags(pinnedToolbarTitles, (title) => title, { emptyLabel: 'No Pinned Toolbars' }), summary: pinnedSummary, className: "twa:overflow-hidden twa:flex twa:flex-col", bodyClassName: "twa:min-h-[200px] twa:overflow-hidden", children: _jsx(PinnedToolbarsSelector, {}) }), _jsx(CollapsibleWizardCard, { ...bindCard('tabs-toolbars'), "data-name": "dashboard-tabs-toolbars", title: "Tabs & Toolbars", help: "Group Toolbars into named Tabs in the Dashboard header (independent of Pinned Toolbars)", compactSummary: renderCompactAccentTags(tabsCompactLabels, (label) => label, { emptyLabel: 'No Tabs Configured' }), summary: tabsSummary, className: "twa:overflow-hidden twa:flex twa:flex-col", bodyClassName: "twa:min-h-[280px] twa:overflow-hidden", children: _jsx(DashboardManagerUI, { disabled: props.isDashboardDisabled, availableToolbars: [...systemToolbars, ...customToolbars], tabs: tabs, onTabsChange: props.onDashboardSetTabs, api: api }) }), _jsx(CollapsibleWizardCard, { ...bindCard('module-buttons', { fillAvailable: true }), "data-name": "dashboard-module-buttons", title: "Module Buttons", help: "Buttons in the Dashboard header that open Module settings", compactSummary: renderCompactAccentTags(moduleButtonLabels, (label) => label, { emptyLabel: 'No Module Buttons' }), summary: moduleButtonsSummary, className: "twa:overflow-hidden twa:flex twa:flex-col", bodyClassName: "twa:min-h-[240px] twa:overflow-hidden twa:flex twa:flex-col twa:!pt-0 twa:!pb-0 twa:px-1", children: _jsx(ModuleValueSelector, { disabled: props.isDashboardDisabled, options: allModuleButtons, value: selectedModuleButtons, onChange: (selectedValues) => props.onDashboardSetModuleButtons(selectedValues) }) })] }));
65
65
  };
@@ -1,11 +1,10 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
- import { clsx } from 'cn';
4
3
  import SimpleButton from '../../../components/SimpleButton';
5
4
  import { useAdaptable } from '../../AdaptableContext';
6
5
  import { Box, Flex } from '../../../components/Flex';
7
6
  import { twMerge } from '../../../twMerge';
8
- import { captureTab } from '../../../lib/utils';
7
+ import { captureTab, cn } from '../../../lib/utils';
9
8
  import * as ModuleConstants from '../../../Utilities/Constants/ModuleConstants';
10
9
  import { QueryBuilder } from '../../../components/aql/QueryBuilder';
11
10
  import { getQueryBuilderColumnOptions, getQueryBuilderFieldOptions, } from '../../../components/aql/QueryBuilder/qlGroupUtils';
@@ -33,8 +32,17 @@ export const ColumnFilterComponentNew = (props) => {
33
32
  }, [api, props.columnId]);
34
33
  const seededGroup = React.useMemo(() => foldInFilterFunctionsForEditing(props.columnId, props.qlGroup, operatorDefs), [props.columnId, resetNonce, operatorDefs]);
35
34
  const pendingGroupRef = React.useRef(null);
35
+ const clearAllFilters = React.useCallback(() => {
36
+ pendingGroupRef.current = null;
37
+ props.onClear();
38
+ setResetNonce((n) => n + 1);
39
+ }, [props.onClear]);
36
40
  const handlePredicateChange = (predicate) => {
37
41
  const group = unfoldInFilterFunctionsFromEditing(props.columnId, asColumnFilterGroup(predicate), operatorDefs);
42
+ if (group.children.length === 0) {
43
+ clearAllFilters();
44
+ return;
45
+ }
38
46
  if (manuallyApplyColumnFilter) {
39
47
  pendingGroupRef.current = group;
40
48
  api.eventApi.internalApi.fireColumnFilterChangedEvent({
@@ -58,14 +66,10 @@ export const ColumnFilterComponentNew = (props) => {
58
66
  pendingGroupRef.current = null;
59
67
  setResetNonce((n) => n + 1);
60
68
  };
61
- const clearAllFilters = () => {
62
- pendingGroupRef.current = null;
63
- props.onClear();
64
- setResetNonce((n) => n + 1);
65
- };
66
- const showClear = props.location !== 'filterForm';
67
- const showActions = !props.hideActionButtons && (showClear || manuallyApplyColumnFilter);
68
- return (_jsx(ColumnFilterOverlayHost, { location: props.location, children: _jsxs("div", { ref: rootRef, onKeyDown: handleFocusTrap, className: "twa:contents", children: [showActions && (_jsxs(Flex, { className: clsx('ab-ColumnFilter-actions twa:m-2', {
69
+ const clearAllOnCombinatorRow = props.location === 'columnMenu' || props.location === 'filtersToolPanel';
70
+ const rootHeaderEnd = React.useMemo(() => clearAllOnCombinatorRow ? (_jsx(SimpleButton, { "aria-label": "Clear All Filters", "data-name": "column-filter-clear-all", onClick: clearAllFilters, children: "Clear All" })) : undefined, [clearAllOnCombinatorRow, clearAllFilters]);
71
+ const showActions = !props.hideActionButtons && manuallyApplyColumnFilter;
72
+ return (_jsx(ColumnFilterOverlayHost, { location: props.location, children: _jsxs("div", { ref: rootRef, onKeyDown: handleFocusTrap, className: "twa:contents", children: [showActions && (_jsx(Flex, { className: cn('ab-ColumnFilter-actions twa:m-2', {
69
73
  'twa:mb-2': isEmbeddedColumnFilterLocation(props.location),
70
- }), justifyContent: "space-between", children: [showClear && (_jsx(Box, { className: "ab-ColumnFilter-action-clearall", children: _jsx(SimpleButton, { "aria-label": "Clear All Filters", onClick: clearAllFilters, children: "Clear All" }) })), manuallyApplyColumnFilter && (_jsxs(_Fragment, { children: [_jsx(Box, { className: "twa:flex-1", "data-name": "spacer" }), _jsx(Box, { className: "ab-ColumnFilter-action-reset twa:mr-2", children: _jsx(SimpleButton, { "aria-label": "Reset All", tone: "neutral", variant: "raised", onClick: resetFilter, children: "Reset" }) }), _jsx(Box, { className: "ab-ColumnFilter-action-apply", children: _jsx(SimpleButton, { "aria-label": "Apply Filter", tone: "accent", variant: "raised", onClick: applyFilter, children: "Apply" }) })] }))] })), _jsx(Box, { style: props.wrapperProps?.style, className: twMerge('ab-ColumnFilter twa:flex-1 twa:min-h-0 twa:overflow-auto twa:overflow-x-hidden twa:p-0.5 twa:gap-1 twa:flex twa:flex-col', props.location === 'filtersToolPanel' && 'ab-ColumnFilter--tool-panel', props.disabled ? 'twa:opacity-60 twa:pointer-events-none' : '', props.wrapperProps?.className), children: _jsx(QueryBuilder, { module: ModuleConstants.ColumnFilterModuleId, query: "", initialPredicate: seededGroup, onChange: noop, onPredicateChange: handlePredicateChange, getColumns: getColumns, getFields: getFields, subject: { mode: 'locked', columnId: props.columnId }, hideExpressionPreview: true, hideInlineAdd: true, hideAddGroup: true, hideLockedSubject: true, hideDragHandles: true, layout: getColumnFilterQueryBuilderLayout(props.location) }, `${props.columnId}:${resetNonce}`) })] }) }));
74
+ }), justifyContent: "space-between", children: manuallyApplyColumnFilter && (_jsxs(_Fragment, { children: [_jsx(Box, { className: "twa:flex-1", "data-name": "spacer" }), _jsx(Box, { className: "ab-ColumnFilter-action-reset twa:mr-2", children: _jsx(SimpleButton, { "aria-label": "Reset All", tone: "neutral", variant: "raised", onClick: resetFilter, children: "Reset" }) }), _jsx(Box, { className: "ab-ColumnFilter-action-apply", children: _jsx(SimpleButton, { "aria-label": "Apply Filter", tone: "accent", variant: "raised", onClick: applyFilter, children: "Apply" }) })] })) })), _jsx(Box, { style: props.wrapperProps?.style, className: twMerge('ab-ColumnFilter twa:flex-1 twa:min-h-0 twa:overflow-auto twa:overflow-x-hidden twa:p-0.5 twa:gap-1 twa:flex twa:flex-col', props.location === 'filtersToolPanel' && 'ab-ColumnFilter--tool-panel', props.disabled ? 'twa:opacity-60 twa:pointer-events-none' : '', props.wrapperProps?.className), children: _jsx(QueryBuilder, { module: ModuleConstants.ColumnFilterModuleId, query: "", initialPredicate: seededGroup, onChange: noop, onPredicateChange: handlePredicateChange, getColumns: getColumns, getFields: getFields, subject: { mode: 'locked', columnId: props.columnId }, hideExpressionPreview: true, hideInlineAdd: true, hideAddGroup: true, hideLockedSubject: true, hideDragHandles: true, layout: getColumnFilterQueryBuilderLayout(props.location), rootHeaderEnd: rootHeaderEnd }, `${props.columnId}:${resetNonce}`) })] }) }));
71
75
  };