@adaptabletools/adaptable 23.0.0-canary.6 → 23.0.0-canary.8

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 (396) hide show
  1. package/icons/sort-asc.svg +1 -1
  2. package/index.css +828 -263
  3. package/package.json +1 -1
  4. package/src/AdaptableOptions/DataSetOptions.d.ts +26 -2
  5. package/src/AdaptableOptions/DefaultAdaptableOptions.js +0 -1
  6. package/src/AdaptableOptions/SettingsPanelOptions.d.ts +42 -10
  7. package/src/AdaptableState/Common/AdaptableFormat.d.ts +7 -0
  8. package/src/AdaptableState/Common/AdaptableMessageType.d.ts +1 -1
  9. package/src/AdaptableState/Common/Enums.d.ts +1 -1
  10. package/src/AdaptableState/Common/Enums.js +1 -1
  11. package/src/AdaptableState/StyledColumnState.d.ts +8 -850
  12. package/src/AdaptableState/StyledColumnState.js +1 -9
  13. package/src/AdaptableState/StyledColumns/BadgeStyle.d.ts +143 -0
  14. package/src/AdaptableState/StyledColumns/BadgeStyle.js +9 -0
  15. package/src/AdaptableState/StyledColumns/BulletChartStyle.d.ts +147 -0
  16. package/src/AdaptableState/StyledColumns/Common/BarChartCellText.d.ts +60 -0
  17. package/src/AdaptableState/StyledColumns/Common/BarChartCellText.js +6 -0
  18. package/src/AdaptableState/StyledColumns/Common/BarChartMarker.d.ts +24 -0
  19. package/src/AdaptableState/StyledColumns/Common/BarChartMarker.js +5 -0
  20. package/src/AdaptableState/StyledColumns/Common/CellTextOptions.d.ts +13 -0
  21. package/src/AdaptableState/StyledColumns/Common/CellTextOptions.js +6 -0
  22. package/src/AdaptableState/StyledColumns/Common/NumericStyledColumn.d.ts +79 -0
  23. package/src/AdaptableState/StyledColumns/Common/NumericStyledColumn.js +9 -0
  24. package/src/AdaptableState/StyledColumns/GradientStyle.d.ts +48 -0
  25. package/src/AdaptableState/StyledColumns/GradientStyle.js +1 -0
  26. package/src/AdaptableState/StyledColumns/IconStyle.d.ts +158 -0
  27. package/src/AdaptableState/StyledColumns/IconStyle.js +1 -0
  28. package/src/AdaptableState/StyledColumns/PercentBarStyle.d.ts +32 -0
  29. package/src/AdaptableState/StyledColumns/PercentBarStyle.js +1 -0
  30. package/src/AdaptableState/StyledColumns/RangeBarStyle.d.ts +155 -0
  31. package/src/AdaptableState/StyledColumns/RangeBarStyle.js +1 -0
  32. package/src/AdaptableState/StyledColumns/RatingStyle.d.ts +111 -0
  33. package/src/AdaptableState/StyledColumns/RatingStyle.js +1 -0
  34. package/src/AdaptableState/StyledColumns/SparklineStyle.d.ts +21 -0
  35. package/src/AdaptableState/StyledColumns/SparklineStyle.js +1 -0
  36. package/src/Api/ColumnScopeApi.d.ts +1 -1
  37. package/src/Api/Implementation/ColumnScopeApiImpl.d.ts +1 -1
  38. package/src/Api/Internal/AlertInternalApi.js +1 -1
  39. package/src/Api/Internal/DataSetInternalApi.d.ts +3 -0
  40. package/src/Api/Internal/DataSetInternalApi.js +73 -13
  41. package/src/Api/Internal/StyledColumnInternalApi.d.ts +3 -1
  42. package/src/Redux/Store/AdaptableStore.js +6 -4
  43. package/src/Strategy/CalculatedColumnModule.js +1 -0
  44. package/src/Strategy/ColumnFilterModule.js +1 -0
  45. package/src/Strategy/FlashingCellModule.js +6 -2
  46. package/src/Strategy/FormatColumnModule.js +2 -2
  47. package/src/Strategy/FreeTextColumnModule.js +38 -28
  48. package/src/Strategy/Interface/IModule.d.ts +3 -1
  49. package/src/Strategy/LayoutModule.js +15 -66
  50. package/src/Strategy/StyledColumnModule.js +12 -29
  51. package/src/Strategy/Utilities/CustomSort/getCustomSortColumnViewItems.d.ts +1 -0
  52. package/src/Strategy/Utilities/CustomSort/getCustomSortColumnViewItems.js +1 -0
  53. package/src/Strategy/Utilities/Export/getExportColumnsViewItems.d.ts +2 -0
  54. package/src/Strategy/Utilities/Export/getExportColumnsViewItems.js +14 -0
  55. package/src/Strategy/Utilities/Export/getExportRowsViewItems.d.ts +1 -0
  56. package/src/Strategy/Utilities/Export/getExportRowsViewItems.js +3 -0
  57. package/src/Strategy/Utilities/Layout/aggregationSummaryHelpers.d.ts +11 -0
  58. package/src/Strategy/Utilities/Layout/aggregationSummaryHelpers.js +105 -0
  59. package/src/Strategy/Utilities/Layout/columnsSummaryHelpers.d.ts +48 -0
  60. package/src/Strategy/Utilities/Layout/columnsSummaryHelpers.js +166 -0
  61. package/src/Strategy/Utilities/Layout/getLayoutSortViewItems.d.ts +1 -0
  62. package/src/Strategy/Utilities/Layout/getLayoutSortViewItems.js +1 -0
  63. package/src/Strategy/Utilities/Layout/rowGroupSummaryHelpers.d.ts +26 -0
  64. package/src/Strategy/Utilities/Layout/rowGroupSummaryHelpers.js +85 -0
  65. package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +3 -5
  66. package/src/Utilities/Defaults/DefaultSettingsPanel.js +46 -41
  67. package/src/Utilities/Helpers/FormatHelper.js +3 -0
  68. package/src/Utilities/Helpers/IconStylePresets.d.ts +1 -1
  69. package/src/Utilities/Helpers/ScheduleHelper.js +2 -0
  70. package/src/Utilities/Helpers/StyleHelper.d.ts +18 -0
  71. package/src/Utilities/Helpers/StyleHelper.js +27 -0
  72. package/src/Utilities/Helpers/StyledColumnGradientHelper.d.ts +3 -1
  73. package/src/Utilities/Helpers/StyledColumnGradientHelper.js +7 -5
  74. package/src/Utilities/Helpers/barChartCellText.d.ts +63 -0
  75. package/src/Utilities/Helpers/barChartCellText.js +316 -0
  76. package/src/Utilities/Helpers/percentBarPreviewHelper.d.ts +2 -1
  77. package/src/Utilities/Helpers/percentBarPreviewHelper.js +3 -8
  78. package/src/Utilities/Helpers/resolveSettingsPanelNavigation.d.ts +3 -0
  79. package/src/Utilities/Helpers/resolveSettingsPanelNavigation.js +15 -0
  80. package/src/Utilities/getScopeViewItems.js +2 -0
  81. package/src/Utilities/wizardSelection.d.ts +10 -0
  82. package/src/Utilities/wizardSelection.js +15 -0
  83. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +2 -2
  84. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.js +2 -2
  85. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +3 -3
  86. package/src/View/Alert/AlertViewPanel.js +2 -2
  87. package/src/View/Alert/Utilities/getAlertButtonStyle.js +7 -4
  88. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.d.ts +0 -1
  89. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +0 -4
  90. package/src/View/Alert/Wizard/AlertButtonsEditor.js +160 -126
  91. package/src/View/Alert/Wizard/AlertMessageWizardSection.d.ts +1 -1
  92. package/src/View/Alert/Wizard/AlertMessageWizardSection.js +1 -2
  93. package/src/View/Alert/Wizard/AlertNotificationWizardSection.d.ts +1 -1
  94. package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +4 -5
  95. package/src/View/Alert/Wizard/AlertScheduledWizardSection.d.ts +1 -1
  96. package/src/View/Alert/Wizard/AlertScheduledWizardSection.js +1 -2
  97. package/src/View/Alert/Wizard/AlertTypeWizardSection.d.ts +1 -1
  98. package/src/View/Alert/Wizard/AlertTypeWizardSection.js +31 -7
  99. package/src/View/Alert/Wizard/AlertWizard.js +13 -5
  100. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.d.ts +2 -1
  101. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +4 -14
  102. package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
  103. package/src/View/BulkUpdate/BulkUpdateViewPanel.js +4 -6
  104. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.d.ts +1 -1
  105. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +1 -2
  106. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
  107. package/src/View/CalculatedColumn/Wizard/CalculatedColumnTypeSection.js +30 -4
  108. package/src/View/CellSummary/CellSummaryViewPanel.js +4 -4
  109. package/src/View/Charting/ShowChartButton.js +8 -8
  110. package/src/View/ColumnInfo/ColumnInfo.js +21 -1
  111. package/src/View/Components/AdaptableObjectCollection/index.js +2 -2
  112. package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +3 -2
  113. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +7 -6
  114. package/src/View/Components/AdaptableObjectList/objectListActionButtonStyles.d.ts +2 -0
  115. package/src/View/Components/AdaptableObjectList/objectListActionButtonStyles.js +2 -0
  116. package/src/View/Components/AdaptableObjectRow/index.js +2 -2
  117. package/src/View/Components/Buttons/ButtonBase/index.js +2 -3
  118. package/src/View/Components/Buttons/ButtonNew.d.ts +2 -0
  119. package/src/View/Components/Buttons/ButtonNew.js +1 -1
  120. package/src/View/Components/Buttons/EntityListActionButtons.js +3 -3
  121. package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.d.ts +1 -0
  122. package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.js +9 -9
  123. package/src/View/Components/ColumnFilter/ColumnFilter.js +16 -4
  124. package/src/View/Components/ColumnFilter/components/ColumnFilterMenu.js +2 -2
  125. package/src/View/Components/ColumnSelector/index.d.ts +12 -0
  126. package/src/View/Components/ColumnSelector/index.js +30 -6
  127. package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicatesEditor.js +2 -2
  128. package/src/View/Components/ModuleValueSelector/index.js +2 -1
  129. package/src/View/Components/NewScopeComponent.js +4 -9
  130. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +5 -4
  131. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +4 -4
  132. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +2 -2
  133. package/src/View/Components/Popups/AdaptablePopup/Navigation.d.ts +3 -2
  134. package/src/View/Components/Popups/AdaptablePopup/Navigation.js +38 -28
  135. package/src/View/Components/Popups/AdaptablePopup/PopupPanel.js +3 -3
  136. package/src/View/Components/Popups/AdaptablePopup/TopBar.js +2 -2
  137. package/src/View/Components/Popups/AdaptablePopup/settingsPanelNavigationTypes.d.ts +11 -0
  138. package/src/View/Components/Popups/AdaptablePopup/settingsPanelNavigationTypes.js +1 -0
  139. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.d.ts +3 -1
  140. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +25 -27
  141. package/src/View/Components/PredicateEditor/PredicateEditor.js +1 -1
  142. package/src/View/Components/RangesComponent.d.ts +4 -5
  143. package/src/View/Components/RangesComponent.js +95 -66
  144. package/src/View/Components/ReorderDraggable/index.js +2 -2
  145. package/src/View/Components/Selectors/BulkUpdateValueSelector.d.ts +0 -2
  146. package/src/View/Components/Selectors/BulkUpdateValueSelector.js +3 -3
  147. package/src/View/Components/StyleComponent.js +32 -65
  148. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +10 -7
  149. package/src/View/Components/ToolPanel/ToolPanelPopup.d.ts +3 -13
  150. package/src/View/Components/ToolPanel/ToolPanelPopup.js +5 -81
  151. package/src/View/Components/ToolPanel/ToolPanelPopupSections.d.ts +17 -0
  152. package/src/View/Components/ToolPanel/ToolPanelPopupSections.js +76 -0
  153. package/src/View/Components/ValueSelector/index.d.ts +29 -0
  154. package/src/View/Components/ValueSelector/index.js +113 -30
  155. package/src/View/Components/wizardColumnListStyles.d.ts +10 -0
  156. package/src/View/Components/wizardColumnListStyles.js +10 -0
  157. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.d.ts +2 -1
  158. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +5 -7
  159. package/src/View/CustomSort/Wizard/CustomSortWizard.js +2 -2
  160. package/src/View/Dashboard/DashboardPopup.d.ts +1 -11
  161. package/src/View/Dashboard/DashboardPopup.js +3 -67
  162. package/src/View/Dashboard/DashboardPopupSections.d.ts +20 -0
  163. package/src/View/Dashboard/DashboardPopupSections.js +68 -0
  164. package/src/View/Dashboard/PinnedToolbarsSelector.js +2 -2
  165. package/src/View/DataChangeHistory/DataChangeHistoryPopup.d.ts +1 -6
  166. package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +8 -20
  167. package/src/View/DataChangeHistory/DataChangeHistoryTable.d.ts +8 -0
  168. package/src/View/DataChangeHistory/DataChangeHistoryTable.js +94 -0
  169. package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +5 -3
  170. package/src/View/DataChangeHistory/buildActionColumnButton.js +30 -39
  171. package/src/View/DataChangeHistory/dataChangeHistoryHelpers.d.ts +15 -0
  172. package/src/View/DataChangeHistory/dataChangeHistoryHelpers.js +37 -0
  173. package/src/View/DataImport/DataImportWizard/DataImportWizard.js +1 -1
  174. package/src/View/DataImport/DataImportWizard/sections/ColumnsSection.js +32 -19
  175. package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +1 -1
  176. package/src/View/DataSet/DataSetViewPanel.d.ts +2 -2
  177. package/src/View/Export/ExportDestinationPicker.js +3 -3
  178. package/src/View/Export/ExportSchedulesTab.js +3 -4
  179. package/src/View/Export/ExportViewPanel.js +2 -2
  180. package/src/View/Export/Wizard/ReportColumnsWizardSection.d.ts +2 -1
  181. package/src/View/Export/Wizard/ReportColumnsWizardSection.js +4 -9
  182. package/src/View/Export/Wizard/ReportRowsWizardSection.d.ts +2 -1
  183. package/src/View/Export/Wizard/ReportRowsWizardSection.js +3 -6
  184. package/src/View/Filter/FilterViewPanel.js +1 -1
  185. package/src/View/FlashingCell/FlashingCellStyle.d.ts +4 -2
  186. package/src/View/FlashingCell/FlashingCellStyle.js +4 -2
  187. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.d.ts +2 -1
  188. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +7 -11
  189. package/src/View/FlashingCell/Wizard/FlashingCellScopeSummary.d.ts +9 -0
  190. package/src/View/FlashingCell/Wizard/FlashingCellScopeSummary.js +5 -0
  191. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.d.ts +1 -1
  192. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +1 -0
  193. package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.d.ts +0 -5
  194. package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.js +1 -5
  195. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +2 -3
  196. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +1 -1
  197. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +99 -42
  198. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +0 -1
  199. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +0 -4
  200. package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +56 -15
  201. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +1 -1
  202. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +2 -3
  203. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +5 -8
  204. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +8 -13
  205. package/src/View/FreeTextColumn/Utilities/getFreeTextColumnSettingsTags.js +3 -2
  206. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +1 -2
  207. package/src/View/GridFilter/GridFilterPopupUI/index.js +3 -2
  208. package/src/View/GridFilter/GridFilterViewPanel.js +5 -5
  209. package/src/View/GridInfo/GridInfoPopup/AdaptableObjectsSummary.js +2 -2
  210. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +2 -2
  211. package/src/View/Layout/LayoutViewPanel.js +1 -1
  212. package/src/View/Layout/Wizard/LayoutWizard.js +24 -28
  213. package/src/View/Layout/Wizard/sections/AggregationsSection.d.ts +13 -1
  214. package/src/View/Layout/Wizard/sections/AggregationsSection.js +73 -33
  215. package/src/View/Layout/Wizard/sections/ColumnsSection.d.ts +4 -1
  216. package/src/View/Layout/Wizard/sections/ColumnsSection.js +155 -276
  217. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.d.ts +4 -1
  218. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +148 -145
  219. package/src/View/Layout/Wizard/sections/PivotColumnsSection.d.ts +5 -2
  220. package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +24 -12
  221. package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.d.ts +4 -1
  222. package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.js +23 -12
  223. package/src/View/Layout/Wizard/sections/RowGroupingSection.d.ts +5 -2
  224. package/src/View/Layout/Wizard/sections/RowGroupingSection.js +19 -12
  225. package/src/View/Layout/Wizard/sections/RowSelectionSection.js +8 -4
  226. package/src/View/Layout/Wizard/sections/RowSummarySection.js +132 -106
  227. package/src/View/Layout/Wizard/sections/SortSection.d.ts +12 -2
  228. package/src/View/Layout/Wizard/sections/SortSection.js +41 -17
  229. package/src/View/Layout/Wizard/sections/columnLayoutCards.d.ts +20 -0
  230. package/src/View/Layout/Wizard/sections/columnLayoutCards.js +159 -0
  231. package/src/View/Layout/Wizard/sections/columnLayoutHelpers.d.ts +30 -0
  232. package/src/View/Layout/Wizard/sections/columnLayoutHelpers.js +201 -0
  233. package/src/View/Layout/Wizard/sections/layoutWizardAccordionHelpers.d.ts +8 -0
  234. package/src/View/Layout/Wizard/sections/layoutWizardAccordionHelpers.js +63 -0
  235. package/src/View/Layout/Wizard/sections/layoutWizardColumns.d.ts +11 -0
  236. package/src/View/Layout/Wizard/sections/layoutWizardColumns.js +52 -0
  237. package/src/View/License/LicenseWatermark.js +1 -1
  238. package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.d.ts +1 -1
  239. package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +1 -2
  240. package/src/View/Note/NoteEditor.js +2 -2
  241. package/src/View/QuickSearch/QuickSearchPopup.js +2 -3
  242. package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +1 -1
  243. package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +1 -1
  244. package/src/View/SmartEdit/SmartEditPopup.js +2 -2
  245. package/src/View/SmartEdit/SmartEditViewPanel.js +2 -2
  246. package/src/View/StateManagement/StateManagementPopup.js +1 -1
  247. package/src/View/StateManagement/components/ExportDropdown.d.ts +2 -2
  248. package/src/View/StateManagement/components/ExportDropdown.js +12 -12
  249. package/src/View/StatusBar/StatusBarPanel.js +2 -2
  250. package/src/View/StatusBar/StatusBarPopup.js +33 -5
  251. package/src/View/StatusBar/statusBarPanelHelpers.d.ts +2 -0
  252. package/src/View/StatusBar/statusBarPanelHelpers.js +7 -0
  253. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +3 -1
  254. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +14 -11
  255. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.d.ts +2 -2
  256. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +143 -119
  257. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.d.ts +1 -3
  258. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.js +8 -14
  259. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +2 -1
  260. package/src/View/StyledColumn/Wizard/StyledColumnTypeThumbnail.d.ts +5 -0
  261. package/src/View/StyledColumn/Wizard/StyledColumnTypeThumbnail.js +50 -0
  262. package/src/View/StyledColumn/Wizard/StyledColumnWizard.d.ts +2 -0
  263. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +26 -5
  264. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +76 -70
  265. package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +2 -1
  266. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +83 -38
  267. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +173 -76
  268. package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +2 -1
  269. package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.d.ts +1 -1
  270. package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.js +32 -46
  271. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarChartCellTextLayoutEditor.d.ts +9 -0
  272. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarChartCellTextLayoutEditor.js +35 -0
  273. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarChartCellTextPreview.d.ts +23 -0
  274. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarChartCellTextPreview.js +57 -0
  275. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.d.ts +1 -1
  276. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.d.ts +2 -1
  277. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.d.ts +1 -1
  278. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +3 -2
  279. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.d.ts +2 -1
  280. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +13 -17
  281. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnChartListPreviews.d.ts +2 -1
  282. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnChartListPreviews.js +5 -5
  283. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.js +2 -2
  284. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.js +14 -7
  285. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +11 -17
  286. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.d.ts +2 -1
  287. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +27 -58
  288. package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +94 -7
  289. package/src/View/UIHelper.d.ts +0 -2
  290. package/src/View/UIHelper.js +8 -23
  291. package/src/View/Wizard/CollapsibleWizardCard.d.ts +68 -0
  292. package/src/View/Wizard/CollapsibleWizardCard.js +81 -0
  293. package/src/View/Wizard/OnePageWizards.js +6 -6
  294. package/src/View/Wizard/SummaryColorTag.d.ts +24 -0
  295. package/src/View/Wizard/SummaryColorTag.js +67 -0
  296. package/src/View/Wizard/WizardTypeSelection.d.ts +34 -0
  297. package/src/View/Wizard/WizardTypeSelection.js +31 -0
  298. package/src/View/Wizard/rowGroupSummaryTags.d.ts +18 -0
  299. package/src/View/Wizard/rowGroupSummaryTags.js +14 -0
  300. package/src/View/Wizard/scopeSummaryTags.d.ts +6 -0
  301. package/src/View/Wizard/scopeSummaryTags.js +33 -0
  302. package/src/agGrid/AgGridAdapter.js +0 -5
  303. package/src/agGrid/AgGridColumnAdapter.js +4 -3
  304. package/src/agGrid/cellRenderers/ActionColumnRenderer.js +4 -7
  305. package/src/agGrid/cellRenderers/BadgeRenderer.js +7 -5
  306. package/src/agGrid/cellRenderers/BulletChartRenderer.js +43 -42
  307. package/src/agGrid/cellRenderers/IconRenderer.d.ts +2 -1
  308. package/src/agGrid/cellRenderers/IconRenderer.js +13 -11
  309. package/src/agGrid/cellRenderers/PercentBarRenderer.js +24 -96
  310. package/src/agGrid/cellRenderers/RangeBarRenderer.js +49 -46
  311. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +1 -1
  312. package/src/components/Card/index.js +5 -6
  313. package/src/components/CheckBox/index.js +2 -3
  314. package/src/components/CodeBlock/index.js +2 -2
  315. package/src/components/ColorPicker/ColorPicker.d.ts +1 -0
  316. package/src/components/ColorPicker/ColorPicker.js +8 -6
  317. package/src/components/ColorPicker/OptionalColorPicker.d.ts +12 -0
  318. package/src/components/ColorPicker/OptionalColorPicker.js +26 -0
  319. package/src/components/ColorPicker/index.d.ts +1 -0
  320. package/src/components/ColorPicker/index.js +1 -0
  321. package/src/components/Combobox/comboboxUtils.d.ts +1 -0
  322. package/src/components/Combobox/index.js +19 -18
  323. package/src/components/Dashboard/DashboardManager.js +2 -4
  324. package/src/components/Dialog/index.js +4 -4
  325. package/src/components/DragAndDropContext/DragAndDropContext.d.ts +5 -0
  326. package/src/components/DragAndDropContext/DragAndDropContext.js +3 -0
  327. package/src/components/DragAndDropContext/ModuleManager.d.ts +15 -3
  328. package/src/components/DragAndDropContext/ModuleManager.js +47 -8
  329. package/src/components/DragAndDropContext/TabList.d.ts +11 -4
  330. package/src/components/DragAndDropContext/TabList.js +52 -38
  331. package/src/components/DragAndDropContext/UnusedPanel.d.ts +4 -3
  332. package/src/components/DragAndDropContext/UnusedPanel.js +15 -11
  333. package/src/components/DragAndDropContext/dragScope.d.ts +6 -0
  334. package/src/components/DragAndDropContext/dragScope.js +26 -0
  335. package/src/components/DragAndDropContext/types.d.ts +7 -0
  336. package/src/components/DropdownButton/index.d.ts +33 -25
  337. package/src/components/DropdownButton/index.js +24 -158
  338. package/src/components/EmptyContent/index.js +2 -2
  339. package/src/components/ErrorBox/index.js +2 -2
  340. package/src/components/ExpressionEditor/BaseEditorInput.js +3 -3
  341. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +3 -3
  342. package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +6 -6
  343. package/src/components/FieldWrap/index.js +2 -2
  344. package/src/components/Flex.js +2 -2
  345. package/src/components/FormLayout/index.d.ts +1 -1
  346. package/src/components/HelpBlock/index.js +3 -3
  347. package/src/components/IconSelector/IconSelector.d.ts +8 -0
  348. package/src/components/IconSelector/IconSelector.js +11 -7
  349. package/src/components/IconSelector/index.d.ts +1 -0
  350. package/src/components/IconSelector/index.js +1 -0
  351. package/src/components/Modal/index.js +2 -2
  352. package/src/components/NewSelect/index.js +11 -1
  353. package/src/components/Panel/index.js +7 -7
  354. package/src/components/Radio/index.d.ts +1 -1
  355. package/src/components/Radio/index.js +8 -6
  356. package/src/components/SimpleButton/index.js +7 -7
  357. package/src/components/StylePreview.js +2 -2
  358. package/src/components/Tabs/index.js +4 -4
  359. package/src/components/Tag/Tag.d.ts +16 -0
  360. package/src/components/Tag/Tag.js +14 -4
  361. package/src/components/Tag/columnScopeTagHelpers.d.ts +8 -0
  362. package/src/components/Tag/columnScopeTagHelpers.js +6 -0
  363. package/src/components/Tag/index.d.ts +1 -1
  364. package/src/components/Tag/index.js +1 -1
  365. package/src/components/Textarea/index.js +2 -3
  366. package/src/components/Toggle/Toggle.d.ts +2 -0
  367. package/src/components/Toggle/Toggle.js +14 -7
  368. package/src/components/Toggle/ToggleGroup.js +2 -2
  369. package/src/components/ToggleButton/index.js +4 -4
  370. package/src/components/Tree/TreeDropdown/index.js +3 -4
  371. package/src/components/WarningBox/index.js +2 -2
  372. package/src/components/icons/sort-asc.js +1 -1
  373. package/src/components/ui/button.d.ts +2 -2
  374. package/src/components/ui/combobox.d.ts +3 -1
  375. package/src/components/ui/combobox.js +2 -2
  376. package/src/components/ui/input-group.d.ts +1 -1
  377. package/src/components/ui/select.js +3 -2
  378. package/src/components/ui/textarea.js +1 -1
  379. package/src/env.js +2 -2
  380. package/src/layout-manager/src/index.js +7 -3
  381. package/src/metamodel/adaptable.metamodel.d.ts +80 -14
  382. package/src/metamodel/adaptable.metamodel.js +1 -1
  383. package/src/migration/VersionUpgrade23.d.ts +27 -31
  384. package/src/migration/VersionUpgrade23.js +110 -29
  385. package/src/types.d.ts +13 -2
  386. package/tsconfig.esm.tsbuildinfo +1 -1
  387. package/src/View/DataChangeHistory/DataChangeHistoryGrid.d.ts +0 -17
  388. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +0 -290
  389. package/src/components/DropdownButton/DropdownButtonItem.d.ts +0 -12
  390. package/src/components/DropdownButton/renderItem.d.ts +0 -14
  391. package/src/components/DropdownButton/renderItem.js +0 -11
  392. package/src/components/DropdownButton/useExpanded.d.ts +0 -24
  393. package/src/components/DropdownButton/useExpanded.js +0 -56
  394. package/src/components/NewDropdownButton/index.d.ts +0 -27
  395. package/src/components/NewDropdownButton/index.js +0 -24
  396. /package/src/{components/DropdownButton/DropdownButtonItem.js → AdaptableState/StyledColumns/BulletChartStyle.js} +0 -0
@@ -1,5 +1,6 @@
1
1
  import Helper from '../../Utilities/Helpers/Helper';
2
2
  import clamp from '../../Utilities/utils/clamp';
3
+ import { buildBarChartCellTextLabels, hasBarChartCellTextConfigured, mountBarChartCellText, } from '../../Utilities/Helpers/barChartCellText';
3
4
  import { shouldRenderStyledColumnOnRow } from './shouldRenderStyledColumnOnRow';
4
5
  const SVG_NS = 'http://www.w3.org/2000/svg';
5
6
  const DEFAULT_TRACK_HEIGHT = 4;
@@ -96,8 +97,9 @@ export const getRangeBarRendererForColumn = (styledColumn, abColumn, api) => {
96
97
  this.eGui.append(params.formatValue?.(rawCellValue) ?? String(rawCellValue));
97
98
  return;
98
99
  }
99
- const referenceValue = rangeStyle.Reference != undefined
100
- ? resolveBoundValue(rangeStyle.Reference, abColumn, params.node, api)
100
+ const referenceProperties = rangeStyle.Reference;
101
+ const referenceValue = referenceProperties?.Value != undefined
102
+ ? resolveBoundValue(referenceProperties.Value, abColumn, params.node, api)
101
103
  : undefined;
102
104
  // Markers - resolve user overrides against per-marker defaults.
103
105
  const valueMarker = normaliseMarker(rangeStyle.Marker, {
@@ -105,21 +107,24 @@ export const getRangeBarRendererForColumn = (styledColumn, abColumn, api) => {
105
107
  Color: DEFAULT_VALUE_MARKER_COLOR,
106
108
  Size: DEFAULT_VALUE_MARKER_SIZE,
107
109
  });
108
- const referenceMarker = normaliseMarker(rangeStyle.ReferenceMarker, {
110
+ const referenceMarker = normaliseMarker(referenceProperties?.Marker, {
109
111
  Shape: 'Line',
110
112
  Color: DEFAULT_REFERENCE_MARKER_COLOR,
111
113
  Size: DEFAULT_LINE_MARKER_THICKNESS,
112
114
  });
113
115
  // Out-of-range handling
114
- const outOfRangeMode = rangeStyle.OutOfRangeMode ?? 'Clamp';
116
+ const outOfRangeProperties = rangeStyle.OutOfRange;
117
+ const outOfRangeMode = outOfRangeProperties?.Mode ?? 'Clamp';
118
+ const outOfRangeColor = outOfRangeProperties?.Color;
115
119
  const isOutOfRange = numericValue < min || numericValue > max;
116
120
  const hideValueMarker = isOutOfRange && outOfRangeMode === 'Hide';
117
121
  // Layout
118
122
  const isVertical = rangeStyle.Orientation === 'Vertical';
119
- const trackThickness = rangeStyle.TrackHeight ?? DEFAULT_TRACK_HEIGHT;
123
+ const trackProperties = rangeStyle.Track;
124
+ const trackThickness = trackProperties?.Height ?? DEFAULT_TRACK_HEIGHT;
120
125
  const bandThickness = Math.max(trackThickness + 6, DEFAULT_BAND_HEIGHT);
121
- const hasCellText = rangeStyle.CellText && rangeStyle.CellText.length > 0;
122
- const isTextMerged = rangeStyle.CellTextPosition === 'Merged';
126
+ const cellTextProperties = rangeStyle.CellTextProperties;
127
+ const hasCellText = hasBarChartCellTextConfigured(cellTextProperties);
123
128
  // Map a 0..1 fraction onto the long-axis viewBox (0..100). Vertical
124
129
  // orientation inverts so that lower values appear at the bottom of
125
130
  // the cell, matching user expectation.
@@ -132,7 +137,7 @@ export const getRangeBarRendererForColumn = (styledColumn, abColumn, api) => {
132
137
  this.eGui.style.alignItems = isVertical ? 'center' : 'stretch';
133
138
  this.eGui.style.justifyContent = 'center';
134
139
  this.eGui.style.position = 'relative';
135
- this.eGui.style.height = hasCellText && !isTextMerged ? '80%' : '100%';
140
+ this.eGui.style.height = '100%';
136
141
  const svg = document.createElementNS(SVG_NS, 'svg');
137
142
  svg.setAttribute('class', 'ab-RangeBar__svg');
138
143
  svg.setAttribute('preserveAspectRatio', 'none');
@@ -191,11 +196,11 @@ export const getRangeBarRendererForColumn = (styledColumn, abColumn, api) => {
191
196
  const trackCrossOffset = (bandThickness - trackThickness) / 2;
192
197
  const track = document.createElementNS(SVG_NS, 'rect');
193
198
  setRectAxes(track, 0, 100, trackCrossOffset, trackThickness);
194
- track.setAttribute('fill', rangeStyle.TrackColor ?? DEFAULT_TRACK_COLOR);
199
+ track.setAttribute('fill', trackProperties?.Color ?? DEFAULT_TRACK_COLOR);
195
200
  track.setAttribute('class', 'ab-RangeBar__track');
196
201
  // Slight transparency by default so the track doesn't drown out the
197
- // band colours; honour explicit user TrackColor as-is.
198
- if (rangeStyle.TrackColor == undefined) {
202
+ // band colours; honour explicit user Track.Color as-is.
203
+ if (trackProperties?.Color == undefined) {
199
204
  // With no bands the cell background is often plain — the same muted
200
205
  // foreground at 0.35 opacity can disappear (only the accent marker reads).
201
206
  // Bands provide contrast underneath, so keep the subtle blend there.
@@ -224,8 +229,8 @@ export const getRangeBarRendererForColumn = (styledColumn, abColumn, api) => {
224
229
  valueFraction = toFraction(numericValue, min, max);
225
230
  }
226
231
  const valueCoord = valueAxisCoord(valueFraction);
227
- const effectiveMarker = isOutOfRange && outOfRangeMode === 'Clamp' && rangeStyle.OutOfRangeColor
228
- ? { ...valueMarker, Color: rangeStyle.OutOfRangeColor }
232
+ const effectiveMarker = isOutOfRange && outOfRangeMode === 'Clamp' && outOfRangeColor
233
+ ? { ...valueMarker, Color: outOfRangeColor }
229
234
  : valueMarker;
230
235
  const markerEl = createMarkerElement(effectiveMarker, valueCoord, bandThickness, isVertical);
231
236
  if (markerEl) {
@@ -233,40 +238,38 @@ export const getRangeBarRendererForColumn = (styledColumn, abColumn, api) => {
233
238
  svg.appendChild(markerEl);
234
239
  }
235
240
  }
236
- this.eGui.appendChild(svg);
241
+ // Wrap the SVG in a positioned container so a `Merged` text row sits
242
+ // centred on the *bar*, not on the cell — see BulletChartRenderer for
243
+ // the same fix and Percent Bar for the matching behaviour via its
244
+ // `barEl`.
245
+ const svgContainer = document.createElement('div');
246
+ svgContainer.style.position = 'relative';
247
+ svgContainer.style.display = 'flex';
248
+ svgContainer.style.alignItems = 'center';
249
+ svgContainer.style.justifyContent = 'center';
250
+ if (isVertical) {
251
+ svgContainer.style.flex = '1 1 auto';
252
+ svgContainer.style.minHeight = '0';
253
+ }
254
+ else {
255
+ svgContainer.style.flex = '0 0 auto';
256
+ }
257
+ svgContainer.appendChild(svg);
258
+ this.eGui.appendChild(svgContainer);
237
259
  if (hasCellText) {
238
- const textEl = document.createElement('div');
239
- textEl.className = 'ab-RangeBar__text';
240
- textEl.style.lineHeight = '1.2';
241
- const parts = [];
242
- if (rangeStyle.CellText.includes('CellValue')) {
243
- parts.push(params.formatValue?.(numericValue) ?? String(numericValue));
244
- }
245
- if (rangeStyle.CellText.includes('PercentageValue')) {
246
- const pct = clamp((numericValue - min) / (max - min), 0, 1) * 100;
247
- parts.push(`${pct.toFixed(0)}%`);
248
- }
249
- textEl.innerText = parts.join(' ');
250
- switch (rangeStyle.CellTextPosition) {
251
- case 'Above':
252
- this.eGui.prepend(textEl);
253
- break;
254
- case 'Merged':
255
- textEl.style.position = 'absolute';
256
- textEl.style.top = '50%';
257
- textEl.style.transform = 'translateY(-50%)';
258
- textEl.style.left = '0';
259
- textEl.style.right = '0';
260
- textEl.style.paddingLeft = '5px';
261
- textEl.style.paddingRight = '5px';
262
- textEl.style.pointerEvents = 'none';
263
- this.eGui.appendChild(textEl);
264
- break;
265
- case 'Below':
266
- default:
267
- this.eGui.appendChild(textEl);
268
- break;
269
- }
260
+ const pct = clamp((numericValue - min) / (max - min), 0, 1) * 100;
261
+ // See PercentBarRenderer: `params.formatValue` on a column without a
262
+ // `valueFormatter` returns the raw value (a number here), so coerce
263
+ // to string before it flows into the helpers.
264
+ const formattedCellValue = String(params.formatValue?.(numericValue) ?? numericValue);
265
+ const labels = buildBarChartCellTextLabels(cellTextProperties, formattedCellValue, `${pct.toFixed(0)}%`);
266
+ mountBarChartCellText({
267
+ wrapperEl: this.eGui,
268
+ mergedOverlayEl: svgContainer,
269
+ textClassName: 'ab-RangeBar__text',
270
+ cellTextProperties,
271
+ labels,
272
+ });
270
273
  }
271
274
  }
272
275
  getGui() {
@@ -276,7 +276,7 @@ export function AdaptableFormComponent({ formDef, data, onChange, onButtonClick,
276
276
  if (!field.helpText && !error) {
277
277
  return control;
278
278
  }
279
- return (_jsxs(Box, { children: [control, field.helpText && !error ? (_jsx(Box, { id: helpId, className: "ab-Form_help twa:text-xs twa:opacity-70 twa:mt-1", children: field.helpText })) : null, error ? (_jsx(Box, { id: errorId, role: "alert", "aria-live": "polite", className: "ab-Form_error twa:text-xs twa:mt-1", style: { color: 'var(--ab-color-error, #c00)' }, children: error })) : null] }));
279
+ return (_jsxs(Box, { children: [control, field.helpText && !error ? (_jsx(Box, { id: helpId, className: "ab-Form_help twa:text-xs twa:opacity-70 twa:mt-1", children: field.helpText })) : null, error ? (_jsx(Box, { id: errorId, role: "alert", "aria-live": "polite", className: "ab-Form_error twa:text-xs twa:mt-1", style: { color: 'var(--ab-color-destructive, #c00)' }, children: error })) : null] }));
280
280
  };
281
281
  // by default we have 2 columns: label & input
282
282
  const columns = formDef.config?.columns ?? [1, 2];
@@ -1,10 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { twMerge } from '../../twMerge';
3
- import clsx from 'clsx';
2
+ import { cn } from '../../lib/utils';
4
3
  import { Box } from '../Flex';
5
4
  export function Card(props) {
6
5
  const { shadow = true, children, className, style, gap = 2 } = props;
7
- return (_jsx(Box, { className: clsx('twa:bg-background twa:text-foreground', 'ab-Card', 'twa:text-3', 'twa:rounded-standard twa:p-2', 'twa:flex twa:flex-col', {
6
+ return (_jsx(Box, { className: cn('twa:bg-background twa:text-foreground', 'ab-Card', 'twa:text-3', 'twa:rounded-standard twa:p-2', 'twa:flex twa:flex-col', {
8
7
  'twa:shadow-sm': shadow,
9
8
  'twa:gap-0': gap === 0,
10
9
  'twa:gap-1': gap === 1,
@@ -16,7 +15,7 @@ export function Card(props) {
16
15
  }
17
16
  const CardTitle = (props) => {
18
17
  const { children, className, gap = 2, border = true } = props;
19
- return (_jsx("div", { className: twMerge(clsx('ab-Card__title', {
18
+ return (_jsx("div", { className: cn('ab-Card__title', {
20
19
  'twa:flex twa:flex-row': true,
21
20
  'twa:items-center': true,
22
21
  'twa:text-4 twa:px-2': true,
@@ -28,11 +27,11 @@ const CardTitle = (props) => {
28
27
  'twa:gap-3': gap === 3,
29
28
  'twa:gap-4': gap === 4,
30
29
  'twa:gap-8': gap === 8,
31
- }, className)), children: children }));
30
+ }, className), children: children }));
32
31
  };
33
32
  const CardBody = (props) => {
34
33
  const { children, gap, className } = props;
35
- return (_jsx("div", { className: clsx('ab-Card__body', 'twa:overflow-auto twa:min-h-0', 'twa:flex-1 twa:flex twa:flex-col', {
34
+ return (_jsx("div", { className: cn('ab-Card__body', 'twa:overflow-auto twa:min-h-0', 'twa:flex-1 twa:flex twa:flex-col', {
36
35
  'twa:gap-0': gap === 0,
37
36
  'twa:gap-1': gap === 1,
38
37
  'twa:gap-2': gap === 2,
@@ -2,7 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
3
  import { useRef, useState } from 'react';
4
4
  import { Box, Flex } from '../Flex';
5
- import clsx from 'clsx';
6
5
  import { cn } from '../../lib/utils';
7
6
  import { targetPeer } from '../twUtils';
8
7
  const Square = (props) => {
@@ -44,10 +43,10 @@ const CheckBox = ({ children, checked, onChange, value, name, disabled, readOnly
44
43
  React.useEffect(() => {
45
44
  checkboxRef.current.indeterminate = indeterminate;
46
45
  }, [indeterminate]);
47
- let input = (_jsx("input", { className: clsx(`ab-CheckBox-input twa:peer twa:align-middle twa:opacity-0`, {
46
+ let input = (_jsx("input", { className: cn(`ab-CheckBox-input twa:peer twa:align-middle twa:opacity-0`, {
48
47
  'twa:cursor-pointer': !readOnly && !disabled,
49
48
  }), ref: checkboxRef, disabled: disabled, readOnly: readOnly, checked: !!computedChecked, tabIndex: tabIndex, type: "checkbox", name: name, value: value, onChange: onInputChange }));
50
- return (_jsxs(Box, { ...props, className: clsx('twa:my-2', 'ab-CheckBox', `ab-CheckBox--${type}`, `ab-CheckBox--variant-${variant}`, disabled ? 'ab-CheckBox--disabled' : '', readOnly ? 'ab-CheckBox--readonly' : '', props.className), style: props.style, as: as, children: [before, beforeGap, input, _jsx(Square, { type: type, className: checkSquareClassName }), afterGap, after] }));
49
+ return (_jsxs(Box, { ...props, className: cn('twa:my-2', 'ab-CheckBox', `ab-CheckBox--${type}`, `ab-CheckBox--variant-${variant}`, disabled ? 'ab-CheckBox--disabled' : '', readOnly ? 'ab-CheckBox--readonly' : '', props.className), style: props.style, as: as, children: [before, beforeGap, input, _jsx(Square, { type: type, className: checkSquareClassName }), afterGap, after] }));
51
50
  };
52
51
  export const CheckBoxGroup = (props) => {
53
52
  const { orientation, ...flexProps } = props;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from '../../lib/utils';
2
3
  import { Box } from '../Flex';
3
- import clsx from 'clsx';
4
4
  export const baseClassName = 'ab-CodeBlock';
5
5
  export const CodeBlock = (props) => {
6
- return (_jsx(Box, { as: "code", ...props, className: clsx('twa:p-1 twa:rounded-standard twa:bg-primary twa:text-primary-foreground', baseClassName, props.className) }));
6
+ return (_jsx(Box, { as: "code", ...props, className: cn('twa:p-1 twa:rounded-standard twa:bg-primary twa:text-primary-foreground', baseClassName, props.className) }));
7
7
  };
@@ -5,6 +5,7 @@ import { BoxProps } from '../Flex';
5
5
  export type ColorPickerProps = Omit<HTMLProps<HTMLInputElement>, 'onChange'> & {
6
6
  api: AdaptableApi;
7
7
  onChange: (color: string) => void;
8
+ className?: string;
8
9
  value: string;
9
10
  includeAlpha?: boolean;
10
11
  } & Omit<BoxProps, 'onChange'>;
@@ -2,15 +2,15 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
3
  import { useCallback, useEffect } from 'react';
4
4
  import debounce from '../../Utilities/utils/debounce';
5
+ import { cn } from '../../lib/utils';
5
6
  import Input from '../Input';
6
7
  import { getVariableColor } from '../../Utilities/Helpers/StyleHelper';
7
8
  import tinycolor from 'tinycolor2';
8
9
  import { Box, Flex } from '../Flex';
9
10
  import { twMerge } from '../../twMerge';
10
- import clsx from 'clsx';
11
11
  export const ColorPicker = React.forwardRef((props, ref) => {
12
12
  const ColorPalette = props.api.userInterfaceApi.getColorPalette();
13
- let { api, value, includeAlpha = true, ...restProps } = props;
13
+ let { value, includeAlpha = true, className, ...restProps } = props;
14
14
  // Create a debounced version of onChange
15
15
  // we need this because moving the mouse A LOT in the custom color picker can break the React rendering
16
16
  const debouncedOnChange = useCallback(debounce((color) => {
@@ -36,17 +36,19 @@ export const ColorPicker = React.forwardRef((props, ref) => {
36
36
  return [tinycolor(color).setAlpha(0).toRgbString(), tinycolor(color).setAlpha(1).toRgbString()];
37
37
  }, [value]);
38
38
  const rangeBackround = `linear-gradient(90deg, ${preparedAlphaColor[0]} 0%, ${preparedAlphaColor[1]} 100%)`;
39
- const alpha = tinycolor(value).getAlpha();
40
- return (_jsxs(Flex, { className: clsx('ColorPicker twa:items-center twa:gap-2', {
39
+ const alpha = tinycolor(getVariableColor(value)).getAlpha();
40
+ return (_jsxs(Flex, { className: cn('ColorPicker twa:items-center twa:gap-2', {
41
41
  'twa:opacity-30': props.disabled,
42
- }, props.className), children: [_jsx(Input, { ...restProps, as: undefined, disabled: props.disabled, className: twMerge('twa:w-[70px] twa:p-0', restProps.className), onChange: (event) => {
42
+ }, className), children: [_jsx(Input, { ...restProps, as: undefined, disabled: props.disabled, className: twMerge('ab-ColorPicker-swatch'), onChange: (event) => {
43
43
  /**
44
44
  * The value is not in the map when the color is not in the palette.
45
45
  */
46
46
  const color = optionsMap[event.target.value] ?? event.target.value;
47
47
  debouncedOnChange(color);
48
48
  }, value: preparedValue, ref: ref, type: "color", list: "ABcolorChoices", title: props.title }), ABcolorChoices, includeAlpha && (_jsxs(Flex, { alignItems: "center", className: "twa:gap-1", children: [_jsx(Box, { children: "Opacity" }), _jsx(Flex, { alignItems: "center", className: "twa:min-h-input", children: _jsx(Input, { disabled: props.disabled, className: "ab-ColorPicker-range", style: { background: rangeBackround }, value: alpha, onChange: (event) => {
49
- const color = tinycolor(value).setAlpha(event.target.value).toRgbString();
49
+ const color = tinycolor(getVariableColor(value))
50
+ .setAlpha(event.target.value)
51
+ .toRgbString();
50
52
  debouncedOnChange(color);
51
53
  }, min: 0, max: 1, step: 0.01, type: "range" }) })] }))] }));
52
54
  });
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import { AdaptableApi } from '../../Api/AdaptableApi';
3
+ export type OptionalColorPickerProps = {
4
+ api: AdaptableApi;
5
+ value: string | undefined;
6
+ onChange: (color: string | undefined) => void;
7
+ defaultColor?: string;
8
+ disabled?: boolean;
9
+ includeAlpha?: boolean;
10
+ className?: string;
11
+ };
12
+ export declare const OptionalColorPicker: React.FC<OptionalColorPickerProps>;
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useRef } from 'react';
3
+ import { Box, Flex } from '../Flex';
4
+ import SimpleButton from '../SimpleButton';
5
+ import { twMerge } from '../../twMerge';
6
+ import { ColorPicker } from './ColorPicker';
7
+ const DEFAULT_COLOR = '#000000';
8
+ export const OptionalColorPicker = (props) => {
9
+ const { api, value, onChange, defaultColor = DEFAULT_COLOR, disabled = false, includeAlpha = true, className, } = props;
10
+ const pickerRef = useRef(null);
11
+ const pendingOpenRef = useRef(false);
12
+ useEffect(() => {
13
+ if (pendingOpenRef.current && value && pickerRef.current) {
14
+ pendingOpenRef.current = false;
15
+ pickerRef.current.click();
16
+ }
17
+ }, [value]);
18
+ const handleActivate = () => {
19
+ pendingOpenRef.current = true;
20
+ onChange(defaultColor);
21
+ };
22
+ if (!value) {
23
+ return (_jsxs(Flex, { alignItems: "center", className: twMerge('OptionalColorPicker twa:gap-1', className), children: [_jsx("button", { type: "button", disabled: disabled, className: "ab-OptionalColorPicker-empty", onClick: handleActivate, "aria-label": "Set colour", title: "Click to set colour" }), _jsx(Box, { className: "twa:text-2 twa:text-muted-foreground", children: "None" })] }));
24
+ }
25
+ return (_jsxs(Flex, { alignItems: "center", className: twMerge('OptionalColorPicker twa:gap-1', className), children: [_jsx(ColorPicker, { ref: pickerRef, api: api, value: value, disabled: disabled, includeAlpha: includeAlpha, onChange: onChange }), _jsx(SimpleButton, { icon: "close", variant: "text", disabled: disabled, tooltip: "Clear colour", onClick: () => onChange(undefined) })] }));
26
+ };
@@ -1 +1,2 @@
1
1
  export * from './ColorPicker';
2
+ export * from './OptionalColorPicker';
@@ -1 +1,2 @@
1
1
  export * from './ColorPicker';
2
+ export * from './OptionalColorPicker';
@@ -77,6 +77,7 @@ export type ComboboxCommonProps<T extends ComboboxItemType> = {
77
77
  */
78
78
  renderSearchInputTrailing?: React.ReactNode | (() => React.ReactNode);
79
79
  renderCheckboxIndicator?: boolean | null | ComboboxPrimitive.ItemIndicator.Props['render'];
80
+ showTrigger?: boolean;
80
81
  };
81
82
  export type AdaptableComboboxProps<T extends ComboboxItemType> = ComboboxCommonProps<T> & ComboboxDataProps<T>;
82
83
  export declare function valueToItem<T extends ComboboxItemType>(stringValue: T['value'] | undefined | null, lookup: Map<any, T>): T | undefined;
@@ -5,7 +5,6 @@ import { cn } from '../../lib/utils';
5
5
  import { ChevronDownIcon, Loader2Icon, PlusIcon } from 'lucide-react';
6
6
  import { useMemo } from 'react';
7
7
  import { InputGroupAddon, InputGroupButton } from '../ui/input-group';
8
- import clsx from 'clsx';
9
8
  import { getItemTextLabel, toStringValue, toStringValues, valueToItem, valueToItems, } from './comboboxUtils';
10
9
  import { VirtualizedList } from './VirtualizedList';
11
10
  import { CheckBox } from '../CheckBox';
@@ -180,15 +179,15 @@ function useCreatable(props, allItems, itemByValue) {
180
179
  if (props.isCreatable && itemsToCreate.length > 0) {
181
180
  savingCreatableItem = true;
182
181
  itemsAllNumeric = allItems.every((item) => !item.creatable ? typeof item.value === 'number' : true);
182
+ newCreatedItems = itemsToCreate.map((item) => ({
183
+ ...item,
184
+ creatable: true,
185
+ created: true,
186
+ // if all other items are numeric, and the value for the created item is a valid number, then convert the value to a number
187
+ // we'll also have to correctly call onValueChange with the new value
188
+ value: itemsAllNumeric && !Number.isNaN(Number(item.value)) ? Number(item.value) : item.value,
189
+ }));
183
190
  setAlreadySavedCreatableItems((current) => {
184
- newCreatedItems = itemsToCreate.map((item) => ({
185
- ...item,
186
- creatable: true,
187
- created: true,
188
- // if all other items are numeric, and the value for the created item is a valid number, then convert the value to a number
189
- // we'll also have to correctly call onValueChange with the new value
190
- value: itemsAllNumeric && !Number.isNaN(Number(item.value)) ? Number(item.value) : item.value,
191
- }));
192
191
  const mergedItems = [...current, ...newCreatedItems];
193
192
  const seenValues = new Set();
194
193
  return mergedItems.filter((item) => {
@@ -356,7 +355,7 @@ const SingleCombobox_MenuListSearchable = (props) => {
356
355
  'twa:flex twa:w-full twa:cursor-default twa:items-center twa:justify-between twa:gap-1.5 twa:rounded-input twa:border twa:border-input twa:bg-transparent twa:py-2 twa:pr-2 twa:pl-2.5 twa:text-sm twa:whitespace-nowrap twa:shadow-xs twa:transition-[color,box-shadow] twa:outline-none twa:select-none twa:focus:border-ring twa:focus:ring-3 twa:focus:ring-ring/50 twa:disabled:cursor-not-allowed twa:disabled:opacity-50 twa:data-placeholder:text-muted-foreground twa:h-9', triggerClassName), disabled: isDisabled, onFocus: handleFocus, onBlur: handleBlur, children: _jsx(ComboboxValue, { placeholder: _jsx("span", { children: props.placeholder }), children: (value) => {
357
356
  return (_jsxs(React.Fragment, { children: [_jsx("span", { className: "twa:flex twa:flex-1 twa:truncate twa:text-left", "data-slot": "combobox-value", children: _jsx(ComboboxValue, { placeholder: _jsx("span", { children: props.placeholder }) }) }), _jsx("input", { type: "hidden", "data-slot": "combobox-value-input", readOnly: true, value: value ? getItemTextLabel(value) : '' }), props.isLoading && (_jsx(Loader2Icon, { className: "twa:size-4 twa:text-muted-foreground twa:animate-spin" })), value && showClear ? (_jsx(ComboboxClear, { disabled: isDisabled, onMouseDown: (e) => {
358
357
  e.preventBaseUIHandler();
359
- } })) : (_jsx(InputGroupButton, { size: "icon-xs", variant: "ghost", className: 'twa:min-h-auto!', children: _jsx(ChevronDownIcon, { className: "twa:pointer-events-none twa:size-4 twa:shrink-0 twa:text-muted-foreground" }) }))] }));
358
+ } })) : props.showTrigger !== false ? (_jsx(InputGroupButton, { size: "icon-xs", variant: "ghost", className: 'twa:min-h-auto!', children: _jsx(ChevronDownIcon, { className: "twa:pointer-events-none twa:size-4 twa:shrink-0 twa:text-muted-foreground" }) })) : null] }));
360
359
  } }) }), _jsxs(ComboboxContent, { anchor: anchor, style: getContentStyle({ maxLabelLength }), resizable: props.resizable, contentRef: contentRefCallback, className: props.contentClassName, children: [_jsx(ComboboxInput, { className: searchInputClassName, placeholder: props.placeholder, showClear: false, showTrigger: false, disabled: isDisabled, ref: searchInputRef, onFocus: handleFocus, onBlur: handleBlur }), _jsx(AdaptableComboboxList, { renderItemLabel: props.renderItemLabel, searchable: props.searchable, emptyText: emptyText, groups: props.groups, virtualized: !!props.virtualized, showItemTooltip: !!props.showItemTooltip, open: props.open, isLoading: props.isLoading })] })] }));
361
360
  };
362
361
  const SingleCombobox_SimpleSearchable = (props) => {
@@ -367,7 +366,7 @@ const SingleCombobox_SimpleSearchable = (props) => {
367
366
  const searchable = props.searchable === false ? false : 'inline';
368
367
  const isDisabled = props.disabled;
369
368
  const { allItems, itemByValue, maxLabelLength, inputValue, onInputValueChange, onValueChange, value, } = useGetAllItems(props);
370
- return (_jsxs(AdaptableCombobox_Root, { ...props, value: value, itemByValue: itemByValue, inputValue: inputValue, onInputValueChange: onInputValueChange, onValueChange: onValueChange, allItems: allItems, children: [_jsx(ComboboxInput, { className: className, groupRef: anchor, placeholder: props.placeholder, showClear: showClear, showTrigger: true, isLoading: props.isLoading, disabled: isDisabled, readOnly: searchable === false, "aria-label": props.ariaLabel || props['aria-label'], "data-name": props['data-name'], onFocus: props.onFocus, onBlur: props.onBlur }), _jsx(ComboboxContent, { anchor: anchor, style: getContentStyle({ maxLabelLength }), resizable: props.resizable, children: _jsx(AdaptableComboboxList, { searchable: props.searchable, renderItemLabel: props.renderItemLabel, emptyText: emptyText, groups: props.groups, virtualized: !!props.virtualized, showItemTooltip: !!props.showItemTooltip, open: props.open, isLoading: props.isLoading }) })] }));
369
+ return (_jsxs(AdaptableCombobox_Root, { ...props, value: value, itemByValue: itemByValue, inputValue: inputValue, onInputValueChange: onInputValueChange, onValueChange: onValueChange, allItems: allItems, children: [_jsx(ComboboxInput, { className: className, groupRef: anchor, placeholder: props.placeholder, showClear: showClear, showTrigger: props.showTrigger !== false, isLoading: props.isLoading, disabled: isDisabled, readOnly: searchable === false, "aria-label": props.ariaLabel || props['aria-label'], "data-name": props['data-name'], onFocus: props.onFocus, onBlur: props.onBlur }), _jsx(ComboboxContent, { anchor: anchor, style: getContentStyle({ maxLabelLength }), resizable: props.resizable, children: _jsx(AdaptableComboboxList, { searchable: props.searchable, renderItemLabel: props.renderItemLabel, emptyText: emptyText, groups: props.groups, virtualized: !!props.virtualized, showItemTooltip: !!props.showItemTooltip, open: props.open, isLoading: props.isLoading }) })] }));
371
370
  };
372
371
  const MultiCombobox_SimpleSearchable = (props) => {
373
372
  const anchor = useComboboxAnchor();
@@ -400,13 +399,13 @@ const MultiCombobox_SimpleSearchable = (props) => {
400
399
  if (!menuOpen) {
401
400
  onOpenChange(true);
402
401
  }
403
- }, ref: anchor, className: clsx('twa:relative', props.className), children: _jsx(ComboboxValue, { children: (selectedItems) => {
402
+ }, ref: anchor, className: cn('twa:relative', props.className), children: _jsx(ComboboxValue, { children: (selectedItems) => {
404
403
  const shouldKeepTrigger = props.searchable === false && selectedItems.length > 0;
405
404
  return (_jsxs(React.Fragment, { children: [props.renderInputValues ? (props.renderInputValues(selectedItems)) : (_jsx(MultiComboboxChips, { selectedItems: selectedItems, showClear: showClear })), props.renderInput !== false ? (_jsxs(_Fragment, { children: [_jsx(ComboboxChipsInput, { placeholder: selectedItems.length > 0 ? '' : props.placeholder, readOnly: props.searchable === false, onFocus: props.onFocus, onBlur: props.onBlur, className: props.searchable === false && selectedItems.length > 0
406
405
  ? 'twa:absolute! twa:inset-0 twa:min-h-auto! twa:max-h-auto!' // so we fill the parent container and on click we can open the combobox as usual
407
- : 'twa:flex-1' }), props.searchable === false && selectedItems.length > 0 ? (_jsx("div", { className: "twa:flex-1" })) : null, _jsx("div", { "data-slot": "input-group", role: "group", className: "twa:group/input-group twa:z-10", children: _jsxs(InputGroupAddon, { align: "inline-end", className: "twa:p-0 px twa:gap-0.5", children: [props.isLoading && (_jsx(Loader2Icon, { className: "twa:size-4 twa:text-muted-foreground twa:animate-spin" })), _jsx(InputGroupButton, { size: "icon-xs", variant: "ghost", render: _jsx(ComboboxTrigger, { className: "twa:min-h-auto!" }), "data-slot": "combobox-toggle", className: clsx(`twa:data-pressed:bg-transparent`, shouldKeepTrigger
406
+ : 'twa:flex-1' }), props.searchable === false && selectedItems.length > 0 ? (_jsx("div", { className: "twa:flex-1" })) : null, _jsx("div", { "data-slot": "input-group", role: "group", className: "twa:group/input-group twa:z-10", children: _jsxs(InputGroupAddon, { align: "inline-end", className: "twa:p-0 px twa:gap-0.5", children: [props.isLoading && (_jsx(Loader2Icon, { className: "twa:size-4 twa:text-muted-foreground twa:animate-spin" })), props.showTrigger !== false ? (_jsx(InputGroupButton, { size: "icon-xs", variant: "ghost", render: _jsx(ComboboxTrigger, { className: "twa:min-h-auto!" }), "data-slot": "combobox-toggle", className: cn(`twa:data-pressed:bg-transparent`, shouldKeepTrigger
408
407
  ? ''
409
- : 'twa:group-has-data-[slot=combobox-clear]/input-group:hidden'), disabled: isDisabled }), showClear && _jsx(ComboboxClear, { disabled: isDisabled })] }) })] })) : null] }));
408
+ : 'twa:group-has-data-[slot=combobox-clear]/input-group:hidden'), disabled: isDisabled })) : null, showClear && _jsx(ComboboxClear, { disabled: isDisabled })] }) })] })) : null] }));
410
409
  } }) }), _jsx(ComboboxContent, { anchor: anchor, style: getContentStyle({ maxLabelLength }), resizable: props.resizable, children: _jsx(AdaptableComboboxList, { searchable: props.searchable, emptyText: emptyText, renderItemLabel: props.renderItemLabel, showSelectAllCheckbox: props.showSelectAllCheckbox, renderCheckboxIndicator: props.renderCheckboxIndicator ?? true, onCheckAllChange: onCheckAllChange, totalCount: allItems.length, groups: props.groups, virtualized: !!props.virtualized, showItemTooltip: !!props.showItemTooltip, open: props.open, isLoading: props.isLoading }) })] }));
411
410
  };
412
411
  const MultiComboboxChips = (props) => {
@@ -492,15 +491,15 @@ const MultiCombobox_MenuListSearchable = (props) => {
492
491
  hasFocusRef.current = false;
493
492
  props.onBlur?.();
494
493
  }
495
- }, className: clsx('twa:relative', props.className, _props?.className), children: _jsx(ComboboxValue, { children: (selectedItems) => {
496
- return (_jsxs(React.Fragment, { children: [props.renderInputValues ? (props.renderInputValues(selectedItems)) : (_jsx(MultiComboboxChips, { selectedItems: selectedItems, showClear: showClear })), props.renderInput !== false ? (_jsx(_Fragment, { children: _jsx(ComboboxChipsInput, { ref: chipsInputRef, placeholder: selectedItems.length > 0 ? '' : props.placeholder, readOnly: true, value: '', className: 'twa:flex-1' }) })) : (_jsx("div", { className: "twa:flex-1" })), _jsx("div", { "data-slot": "input-group", role: "group", className: "twa:group/input-group", children: _jsxs(InputGroupAddon, { align: "inline-end", className: "twa:p-0 px", children: [props.isLoading && (_jsx(Loader2Icon, { className: "twa:size-4 twa:text-muted-foreground twa:animate-spin" })), _jsx(InputGroupButton, { size: "icon-xs", variant: "ghost", render: _jsx(ComboboxTrigger, { className: "twa:min-h-auto!", ref: chevronRef, "data-slot": "combobox-toggle",
494
+ }, className: cn('twa:relative', props.className, _props?.className), children: _jsx(ComboboxValue, { children: (selectedItems) => {
495
+ return (_jsxs(React.Fragment, { children: [props.renderInputValues ? (props.renderInputValues(selectedItems)) : (_jsx(MultiComboboxChips, { selectedItems: selectedItems, showClear: showClear })), props.renderInput !== false ? (_jsx(_Fragment, { children: _jsx(ComboboxChipsInput, { ref: chipsInputRef, placeholder: selectedItems.length > 0 ? '' : props.placeholder, readOnly: true, value: '', className: 'twa:flex-1' }) })) : (_jsx("div", { className: "twa:flex-1" })), _jsx("div", { "data-slot": "input-group", role: "group", className: "twa:group/input-group", children: _jsxs(InputGroupAddon, { align: "inline-end", className: "twa:p-0 px", children: [props.isLoading && (_jsx(Loader2Icon, { className: "twa:size-4 twa:text-muted-foreground twa:animate-spin" })), props.showTrigger !== false ? (_jsx(InputGroupButton, { size: "icon-xs", variant: "ghost", render: _jsx(ComboboxTrigger, { className: "twa:min-h-auto!", ref: chevronRef, "data-slot": "combobox-toggle",
497
496
  // we already have the role="combobox" on the parent
498
497
  // so we want to avoid the same role twice in the component,
499
498
  // hence we use the role="widget" here.
500
- role: "widget" }), "data-slot": "combobox-toggle", className: clsx(`twa:data-pressed:bg-transparent`, 'twa:group-has-data-[slot=combobox-clear]/input-group:hidden'), disabled: isDisabled }), showClear && _jsx(ComboboxClear, { disabled: isDisabled })] }) })] }));
499
+ role: "widget" }), "data-slot": "combobox-toggle", className: cn(`twa:data-pressed:bg-transparent`, 'twa:group-has-data-[slot=combobox-clear]/input-group:hidden'), disabled: isDisabled })) : null, showClear && _jsx(ComboboxClear, { disabled: isDisabled })] }) })] }));
501
500
  } }) }));
502
501
  };
503
- return (_jsxs(AdaptableCombobox_Root, { ...props, value: value, multiple: true, allItems: allItems, itemByValue: itemByValue, inputValue: inputValue, onInputValueChange: onInputValueChange, onValueChange: onValueChange, onOpenChange: onOpenChange, children: [props.renderInput === false ? (_jsx(ComboboxTrigger, { nativeButton: false, render: renderChips })) : (renderChips(undefined)), _jsxs(ComboboxContent, { anchor: anchor, style: getContentStyle({ maxLabelLength }), resizable: props.resizable, contentRef: contentRefCallback, children: [_jsx(ComboboxInput, { placeholder: 'Filter...', showClear: false, ref: searchInputRef, showTrigger: false, disabled: isDisabled, onFocus: handleFocus, onBlur: handleBlur, role: "searchbox", className: 'twa:min-h-input', children: typeof props.renderSearchInputTrailing === 'function'
502
+ return (_jsxs(AdaptableCombobox_Root, { ...props, value: value, multiple: true, allItems: allItems, itemByValue: itemByValue, inputValue: inputValue, onInputValueChange: onInputValueChange, onValueChange: onValueChange, onOpenChange: onOpenChange, children: [props.renderInput === false ? (_jsx(ComboboxTrigger, { nativeButton: false, render: renderChips, icon: props.showTrigger !== false ? undefined : null })) : (renderChips(undefined)), _jsxs(ComboboxContent, { anchor: anchor, style: getContentStyle({ maxLabelLength }), resizable: props.resizable, contentRef: contentRefCallback, children: [_jsx(ComboboxInput, { placeholder: 'Filter...', showClear: false, ref: searchInputRef, showTrigger: false, disabled: isDisabled, onFocus: handleFocus, onBlur: handleBlur, role: "searchbox", className: 'twa:min-h-input', children: typeof props.renderSearchInputTrailing === 'function'
504
503
  ? props.renderSearchInputTrailing()
505
504
  : undefined }), _jsx(AdaptableComboboxList, { renderItemLabel: props.renderItemLabel, emptyText: emptyText, searchable: props.searchable, showSelectAllCheckbox: props.showSelectAllCheckbox, selectAllCheckboxValue: props.selectAllCheckboxValue, renderCheckboxIndicator: props.renderCheckboxIndicator ?? true, onCheckAllChange: onCheckAllChange, totalCount: allItems.length, groups: props.groups, virtualized: !!props.virtualized, showItemTooltip: !!props.showItemTooltip, open: props.open, isLoading: props.isLoading })] })] }));
506
505
  };
@@ -535,6 +534,8 @@ export const GridFilterCombobox = (props) => {
535
534
  virtualized: true,
536
535
  resizable: true,
537
536
  showClear: false,
537
+ // don't show a chevron icon in the grid filter combobox
538
+ showTrigger: false,
538
539
  renderInputValues: (items) => {
539
540
  let children = items.map((item) => getItemTextLabel(item)).join(', ');
540
541
  if (items.length === 0) {
@@ -2,8 +2,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
3
  import { ModuleManager } from '../DragAndDropContext/ModuleManager';
4
4
  const DashboardManager = ({ tabs, onTabsChange, availableToolbars, api, disabled, }) => {
5
- const moduleService = api.internalApi.getModuleService();
6
- const moduleInfo = moduleService.getModuleInfoByModule('Dashboard');
7
5
  const moduleTabs = tabs.map((tab) => {
8
6
  return {
9
7
  Name: tab.Name,
@@ -16,7 +14,7 @@ const DashboardManager = ({ tabs, onTabsChange, availableToolbars, api, disabled
16
14
  Toolbars: tab.Items,
17
15
  }));
18
16
  onTabsChange(dashboardTabs);
19
- }, []);
20
- return (_jsx(ModuleManager, { availableItems: availableToolbars, disabled: disabled, onTabsChange: handleTabsChange, tabs: moduleTabs, tabsTitle: moduleInfo.FriendlyName + ' Tabs', unusedPanelTitle: 'Available Toolbars', dragItemText: "Drag into a Tab below" }));
17
+ }, [onTabsChange]);
18
+ return (_jsx(ModuleManager, { dragScope: "dashboard-tabs", layout: "rows", availableItems: availableToolbars, disabled: disabled, onTabsChange: handleTabsChange, tabs: moduleTabs }));
21
19
  };
22
20
  export default DashboardManager;
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
+ import { cn } from '../../lib/utils';
3
4
  import { useRef, useEffect } from 'react';
4
5
  import contains from '../utils/contains';
5
6
  import captureTabNavigation from '../utils/captureTabNavigation';
@@ -9,7 +10,6 @@ import useAutoFocus from '../utils/useAutoFocus';
9
10
  import { Icon } from '../icons';
10
11
  import { WindowModal } from '../WindowModal';
11
12
  import { Box } from '../Flex';
12
- import clsx from 'clsx';
13
13
  import { targetOwn } from '../twUtils';
14
14
  const baseClassName = 'ab-Dialog';
15
15
  export const Dialog = React.forwardRef((props, dialogRef) => {
@@ -95,7 +95,7 @@ export const Dialog = React.forwardRef((props, dialogRef) => {
95
95
  if (!isOpen) {
96
96
  return null;
97
97
  }
98
- const closeButton = showCloseButton ? (_jsx(Box, { title: "Close dialog", onClick: () => setIsOpen(false), className: clsx(`${baseClassName}__close-button twa:p-1`, 'twa:text-accentlight', 'twa:text-shadow-[0_1px_0_#fff]', `twa:text-3 twa:cursor-pointer twa:leading-none twa:font-bold`, 'twa:absolute twa:top-[6px] twa:right-[6px]'), children: _jsx(Icon, { size: 20, name: "close" }) })) : null;
98
+ const closeButton = showCloseButton ? (_jsx(Box, { title: "Close dialog", onClick: () => setIsOpen(false), className: cn(`${baseClassName}__close-button twa:p-1`, 'twa:text-accentlight', 'twa:text-shadow-[0_1px_0_#fff]', `twa:text-3 twa:cursor-pointer twa:leading-none twa:font-bold`, 'twa:absolute twa:top-[6px] twa:right-[6px]'), children: _jsx(Icon, { size: 20, name: "close" }) })) : null;
99
99
  const setPreventDismissFlag = (e) => {
100
100
  if (dismissOnClickOutside) {
101
101
  e.nativeEvent.preventDialogDismiss = true;
@@ -106,8 +106,8 @@ export const Dialog = React.forwardRef((props, dialogRef) => {
106
106
  if (boxProps && boxProps.onClick) {
107
107
  boxProps.onClick(e);
108
108
  }
109
- }, onKeyDown: onKeyDown, className: clsx('twa:relative', 'twa:bg-background', 'twa:text-foreground', 'twa:fill-foreground', 'twa:rounded-standard', 'twa:flex twa:flex-col', targetOwn.focusOutline, targetOwn.focusWithinOutline, baseClassName, modal ? `${baseClassName}--modal` : `${baseClassName}--not-modal`, className), ref: boxRef, children: [children, closeButton] }));
110
- const content = fixed ? (_jsx("div", { onClick: setPreventDismissFlag, className: clsx(`${baseClassName}-fixed-wrapper`, 'twa:fixed twa:inset-0', 'twa:m-auto', 'twa:flex twa:items-center twa:justify-center'), children: box })) : (box);
109
+ }, onKeyDown: onKeyDown, className: cn('twa:relative', 'twa:bg-background', 'twa:text-foreground', 'twa:fill-foreground', 'twa:rounded-standard', 'twa:flex twa:flex-col', targetOwn.focusOutline, targetOwn.focusWithinOutline, baseClassName, modal ? `${baseClassName}--modal` : `${baseClassName}--not-modal`, className), ref: boxRef, children: [children, closeButton] }));
110
+ const content = fixed ? (_jsx("div", { onClick: setPreventDismissFlag, className: cn(`${baseClassName}-fixed-wrapper`, 'twa:fixed twa:inset-0', 'twa:m-auto', 'twa:flex twa:items-center twa:justify-center'), children: box })) : (box);
111
111
  if (windowModal) {
112
112
  return _jsx(WindowModal, { ...windowModalProps, children: content });
113
113
  }
@@ -1,7 +1,12 @@
1
1
  import * as React from 'react';
2
2
  import { ModuleManagerProps } from './ModuleManager';
3
3
  import { ModuleDraggableItem } from './types';
4
+ export declare const DEFAULT_UNUSED_LIST_ID = "UNUSED";
4
5
  export declare const DragAndDropContext: React.Context<{
5
6
  availableItems: ModuleDraggableItem[];
6
7
  permittedActions: ModuleManagerProps["permittedActions"];
8
+ /** Prefixes drag list / item ids so multiple ModuleManagers on one page do not interfere. */
9
+ dragScope: string;
10
+ /** Drag-list ids for unused / available item pools (accept-drop sources for toolbar lists). */
11
+ unusedListIds: string[];
7
12
  }>;
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ export const DEFAULT_UNUSED_LIST_ID = 'UNUSED';
2
3
  export const DragAndDropContext = React.createContext({
3
4
  availableItems: [],
4
5
  permittedActions: {
@@ -7,4 +8,6 @@ export const DragAndDropContext = React.createContext({
7
8
  dragAndDropTab: true,
8
9
  deleteTab: true,
9
10
  },
11
+ dragScope: 'default',
12
+ unusedListIds: [DEFAULT_UNUSED_LIST_ID],
10
13
  });
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { BaseModuleTab, ModuleDraggableItem } from './types';
2
+ import { BaseModuleTab, ModuleDraggableItem, UnusedItemGroup } from './types';
3
3
  export interface ModuleManagerProps {
4
4
  availableItems: ModuleDraggableItem[];
5
5
  filterOutSelectedItems?: boolean;
@@ -7,8 +7,12 @@ export interface ModuleManagerProps {
7
7
  disabled: boolean;
8
8
  onTabsChange: (tabs: BaseModuleTab[]) => void;
9
9
  tabs: BaseModuleTab[];
10
- unusedPanelTitle: string;
11
- dragItemText: string;
10
+ unusedPanelTitle?: string;
11
+ dragItemText?: string;
12
+ /** When set, renders multiple available-item pools instead of a single unused panel. */
13
+ unusedItemGroups?: UnusedItemGroup[];
14
+ /** Layout for `unusedItemGroups` when more than one group is provided. */
15
+ unusedItemGroupsLayout?: 'column' | 'row';
12
16
  tabsTitle?: string;
13
17
  permittedActions?: {
14
18
  createTab?: boolean;
@@ -16,5 +20,13 @@ export interface ModuleManagerProps {
16
20
  dragAndDropTab?: boolean;
17
21
  deleteTab?: boolean;
18
22
  };
23
+ /**
24
+ * `strip`: single horizontal drop row (e.g. pinned toolbars).
25
+ * `rows`: named tabs stacked vertically, each with a horizontal toolbar strip.
26
+ * `tabs`: multi-column tab editor (default, e.g. status bar).
27
+ */
28
+ layout?: 'tabs' | 'strip' | 'rows';
29
+ /** Unique per ModuleManager instance when more than one appears on the same screen. */
30
+ dragScope?: string;
19
31
  }
20
32
  export declare const ModuleManager: React.FunctionComponent<ModuleManagerProps>;