@adaptabletools/adaptable-cjs 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 +0 -10
  13. package/src/AdaptableState/StyledColumns/BadgeStyle.d.ts +143 -0
  14. package/src/AdaptableState/StyledColumns/BadgeStyle.js +12 -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 +7 -0
  18. package/src/AdaptableState/StyledColumns/Common/BarChartMarker.d.ts +24 -0
  19. package/src/AdaptableState/StyledColumns/Common/BarChartMarker.js +6 -0
  20. package/src/AdaptableState/StyledColumns/Common/CellTextOptions.d.ts +13 -0
  21. package/src/AdaptableState/StyledColumns/Common/CellTextOptions.js +7 -0
  22. package/src/AdaptableState/StyledColumns/Common/NumericStyledColumn.d.ts +79 -0
  23. package/src/AdaptableState/StyledColumns/Common/NumericStyledColumn.js +10 -0
  24. package/src/AdaptableState/StyledColumns/GradientStyle.d.ts +48 -0
  25. package/src/AdaptableState/StyledColumns/GradientStyle.js +2 -0
  26. package/src/AdaptableState/StyledColumns/IconStyle.d.ts +158 -0
  27. package/src/AdaptableState/StyledColumns/IconStyle.js +2 -0
  28. package/src/AdaptableState/StyledColumns/PercentBarStyle.d.ts +32 -0
  29. package/src/AdaptableState/StyledColumns/PercentBarStyle.js +2 -0
  30. package/src/AdaptableState/StyledColumns/RangeBarStyle.d.ts +155 -0
  31. package/src/AdaptableState/StyledColumns/RangeBarStyle.js +2 -0
  32. package/src/AdaptableState/StyledColumns/RatingStyle.d.ts +111 -0
  33. package/src/AdaptableState/StyledColumns/RatingStyle.js +2 -0
  34. package/src/AdaptableState/StyledColumns/SparklineStyle.d.ts +21 -0
  35. package/src/AdaptableState/StyledColumns/SparklineStyle.js +2 -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 +1 -1
  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 +11 -28
  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 +17 -1
  55. package/src/Strategy/Utilities/Export/getExportRowsViewItems.d.ts +1 -0
  56. package/src/Strategy/Utilities/Export/getExportRowsViewItems.js +5 -1
  57. package/src/Strategy/Utilities/Layout/aggregationSummaryHelpers.d.ts +11 -0
  58. package/src/Strategy/Utilities/Layout/aggregationSummaryHelpers.js +111 -0
  59. package/src/Strategy/Utilities/Layout/columnsSummaryHelpers.d.ts +48 -0
  60. package/src/Strategy/Utilities/Layout/columnsSummaryHelpers.js +177 -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 +97 -0
  65. package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +3 -5
  66. package/src/Utilities/Defaults/DefaultSettingsPanel.js +48 -42
  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 +30 -1
  72. package/src/Utilities/Helpers/StyledColumnGradientHelper.d.ts +3 -1
  73. package/src/Utilities/Helpers/StyledColumnGradientHelper.js +6 -4
  74. package/src/Utilities/Helpers/barChartCellText.d.ts +63 -0
  75. package/src/Utilities/Helpers/barChartCellText.js +333 -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 +19 -0
  80. package/src/Utilities/getScopeViewItems.js +2 -0
  81. package/src/Utilities/wizardSelection.d.ts +10 -0
  82. package/src/Utilities/wizardSelection.js +22 -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 +1 -6
  90. package/src/View/Alert/Wizard/AlertButtonsEditor.js +159 -125
  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 +30 -7
  99. package/src/View/Alert/Wizard/AlertWizard.js +12 -4
  100. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.d.ts +2 -1
  101. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +3 -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 +29 -3
  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 -3
  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 +6 -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 +15 -3
  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 +3 -8
  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 +3 -3
  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 -4
  136. package/src/View/Components/Popups/AdaptablePopup/TopBar.js +2 -3
  137. package/src/View/Components/Popups/AdaptablePopup/settingsPanelNavigationTypes.d.ts +11 -0
  138. package/src/View/Components/Popups/AdaptablePopup/settingsPanelNavigationTypes.js +5 -0
  139. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.d.ts +3 -1
  140. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +27 -28
  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 -3
  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 +30 -63
  148. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +9 -6
  149. package/src/View/Components/ToolPanel/ToolPanelPopup.d.ts +3 -13
  150. package/src/View/Components/ToolPanel/ToolPanelPopup.js +5 -80
  151. package/src/View/Components/ToolPanel/ToolPanelPopupSections.d.ts +17 -0
  152. package/src/View/Components/ToolPanel/ToolPanelPopupSections.js +81 -0
  153. package/src/View/Components/ValueSelector/index.d.ts +29 -0
  154. package/src/View/Components/ValueSelector/index.js +112 -29
  155. package/src/View/Components/wizardColumnListStyles.d.ts +10 -0
  156. package/src/View/Components/wizardColumnListStyles.js +13 -0
  157. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.d.ts +2 -1
  158. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +4 -6
  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 +73 -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 +99 -0
  169. package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +5 -3
  170. package/src/View/DataChangeHistory/buildActionColumnButton.js +33 -41
  171. package/src/View/DataChangeHistory/dataChangeHistoryHelpers.d.ts +15 -0
  172. package/src/View/DataChangeHistory/dataChangeHistoryHelpers.js +46 -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 +4 -5
  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 +2 -7
  182. package/src/View/Export/Wizard/ReportRowsWizardSection.d.ts +2 -1
  183. package/src/View/Export/Wizard/ReportRowsWizardSection.js +2 -5
  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 +5 -3
  187. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.d.ts +2 -1
  188. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +5 -9
  189. package/src/View/FlashingCell/Wizard/FlashingCellScopeSummary.d.ts +9 -0
  190. package/src/View/FlashingCell/Wizard/FlashingCellScopeSummary.js +10 -0
  191. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.d.ts +1 -1
  192. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +5 -1
  193. package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.d.ts +0 -5
  194. package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.js +3 -8
  195. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +1 -2
  196. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +1 -1
  197. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +101 -44
  198. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +0 -1
  199. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +1 -6
  200. package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +55 -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 -9
  204. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +4 -9
  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 -3
  210. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +2 -2
  211. package/src/View/Layout/LayoutViewPanel.js +2 -2
  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 +77 -33
  215. package/src/View/Layout/Wizard/sections/ColumnsSection.d.ts +4 -1
  216. package/src/View/Layout/Wizard/sections/ColumnsSection.js +154 -275
  217. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.d.ts +4 -1
  218. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +146 -143
  219. package/src/View/Layout/Wizard/sections/PivotColumnsSection.d.ts +5 -2
  220. package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +22 -10
  221. package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.d.ts +4 -1
  222. package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.js +21 -10
  223. package/src/View/Layout/Wizard/sections/RowGroupingSection.d.ts +5 -2
  224. package/src/View/Layout/Wizard/sections/RowGroupingSection.js +23 -12
  225. package/src/View/Layout/Wizard/sections/RowSelectionSection.js +7 -3
  226. package/src/View/Layout/Wizard/sections/RowSummarySection.js +130 -104
  227. package/src/View/Layout/Wizard/sections/SortSection.d.ts +12 -2
  228. package/src/View/Layout/Wizard/sections/SortSection.js +43 -18
  229. package/src/View/Layout/Wizard/sections/columnLayoutCards.d.ts +20 -0
  230. package/src/View/Layout/Wizard/sections/columnLayoutCards.js +167 -0
  231. package/src/View/Layout/Wizard/sections/columnLayoutHelpers.d.ts +30 -0
  232. package/src/View/Layout/Wizard/sections/columnLayoutHelpers.js +216 -0
  233. package/src/View/Layout/Wizard/sections/layoutWizardAccordionHelpers.d.ts +8 -0
  234. package/src/View/Layout/Wizard/sections/layoutWizardAccordionHelpers.js +72 -0
  235. package/src/View/Layout/Wizard/sections/layoutWizardColumns.d.ts +11 -0
  236. package/src/View/Layout/Wizard/sections/layoutWizardColumns.js +57 -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 -13
  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 +11 -0
  253. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +3 -1
  254. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +13 -10
  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 +7 -13
  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 +54 -0
  262. package/src/View/StyledColumn/Wizard/StyledColumnWizard.d.ts +2 -0
  263. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +28 -6
  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 +172 -75
  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 +31 -45
  271. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarChartCellTextLayoutEditor.d.ts +9 -0
  272. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarChartCellTextLayoutEditor.js +40 -0
  273. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarChartCellTextPreview.d.ts +23 -0
  274. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarChartCellTextPreview.js +62 -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 +13 -6
  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 +26 -57
  288. package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +93 -6
  289. package/src/View/UIHelper.d.ts +0 -2
  290. package/src/View/UIHelper.js +8 -24
  291. package/src/View/Wizard/CollapsibleWizardCard.d.ts +68 -0
  292. package/src/View/Wizard/CollapsibleWizardCard.js +90 -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 +79 -0
  296. package/src/View/Wizard/WizardTypeSelection.d.ts +34 -0
  297. package/src/View/Wizard/WizardTypeSelection.js +40 -0
  298. package/src/View/Wizard/rowGroupSummaryTags.d.ts +18 -0
  299. package/src/View/Wizard/rowGroupSummaryTags.js +21 -0
  300. package/src/View/Wizard/scopeSummaryTags.d.ts +6 -0
  301. package/src/View/Wizard/scopeSummaryTags.js +38 -0
  302. package/src/agGrid/AgGridAdapter.js +0 -5
  303. package/src/agGrid/AgGridColumnAdapter.js +3 -2
  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 -7
  313. package/src/components/CheckBox/index.js +2 -3
  314. package/src/components/CodeBlock/index.js +2 -3
  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 +31 -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 +4 -1
  327. package/src/components/DragAndDropContext/ModuleManager.d.ts +15 -3
  328. package/src/components/DragAndDropContext/ModuleManager.js +43 -4
  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 +13 -9
  333. package/src/components/DragAndDropContext/dragScope.d.ts +6 -0
  334. package/src/components/DragAndDropContext/dragScope.js +34 -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 -3
  339. package/src/components/ErrorBox/index.js +2 -3
  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 +9 -9
  343. package/src/components/FieldWrap/index.js +2 -3
  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 -4
  347. package/src/components/IconSelector/IconSelector.d.ts +8 -0
  348. package/src/components/IconSelector/IconSelector.js +13 -8
  349. package/src/components/IconSelector/index.d.ts +1 -0
  350. package/src/components/IconSelector/index.js +3 -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 -3
  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 +16 -5
  361. package/src/components/Tag/columnScopeTagHelpers.d.ts +8 -0
  362. package/src/components/Tag/columnScopeTagHelpers.js +12 -0
  363. package/src/components/Tag/index.d.ts +1 -1
  364. package/src/components/Tag/index.js +3 -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 -5
  370. package/src/components/Tree/TreeDropdown/index.js +3 -5
  371. package/src/components/WarningBox/index.js +2 -3
  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.cjs.tsbuildinfo +1 -1
  387. package/src/View/DataChangeHistory/DataChangeHistoryGrid.d.ts +0 -17
  388. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +0 -295
  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 -14
  392. package/src/components/DropdownButton/useExpanded.d.ts +0 -24
  393. package/src/components/DropdownButton/useExpanded.js +0 -59
  394. package/src/components/NewDropdownButton/index.d.ts +0 -27
  395. package/src/components/NewDropdownButton/index.js +0 -28
  396. /package/src/{components/DropdownButton/DropdownButtonItem.js → AdaptableState/StyledColumns/BulletChartStyle.js} +0 -0
@@ -4,6 +4,7 @@ exports.getRangeBarRendererForColumn = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const Helper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/Helper"));
6
6
  const clamp_1 = tslib_1.__importDefault(require("../../Utilities/utils/clamp"));
7
+ const barChartCellText_1 = require("../../Utilities/Helpers/barChartCellText");
7
8
  const shouldRenderStyledColumnOnRow_1 = require("./shouldRenderStyledColumnOnRow");
8
9
  const SVG_NS = 'http://www.w3.org/2000/svg';
9
10
  const DEFAULT_TRACK_HEIGHT = 4;
@@ -100,8 +101,9 @@ const getRangeBarRendererForColumn = (styledColumn, abColumn, api) => {
100
101
  this.eGui.append(params.formatValue?.(rawCellValue) ?? String(rawCellValue));
101
102
  return;
102
103
  }
103
- const referenceValue = rangeStyle.Reference != undefined
104
- ? resolveBoundValue(rangeStyle.Reference, abColumn, params.node, api)
104
+ const referenceProperties = rangeStyle.Reference;
105
+ const referenceValue = referenceProperties?.Value != undefined
106
+ ? resolveBoundValue(referenceProperties.Value, abColumn, params.node, api)
105
107
  : undefined;
106
108
  // Markers - resolve user overrides against per-marker defaults.
107
109
  const valueMarker = normaliseMarker(rangeStyle.Marker, {
@@ -109,21 +111,24 @@ const getRangeBarRendererForColumn = (styledColumn, abColumn, api) => {
109
111
  Color: DEFAULT_VALUE_MARKER_COLOR,
110
112
  Size: DEFAULT_VALUE_MARKER_SIZE,
111
113
  });
112
- const referenceMarker = normaliseMarker(rangeStyle.ReferenceMarker, {
114
+ const referenceMarker = normaliseMarker(referenceProperties?.Marker, {
113
115
  Shape: 'Line',
114
116
  Color: DEFAULT_REFERENCE_MARKER_COLOR,
115
117
  Size: DEFAULT_LINE_MARKER_THICKNESS,
116
118
  });
117
119
  // Out-of-range handling
118
- const outOfRangeMode = rangeStyle.OutOfRangeMode ?? 'Clamp';
120
+ const outOfRangeProperties = rangeStyle.OutOfRange;
121
+ const outOfRangeMode = outOfRangeProperties?.Mode ?? 'Clamp';
122
+ const outOfRangeColor = outOfRangeProperties?.Color;
119
123
  const isOutOfRange = numericValue < min || numericValue > max;
120
124
  const hideValueMarker = isOutOfRange && outOfRangeMode === 'Hide';
121
125
  // Layout
122
126
  const isVertical = rangeStyle.Orientation === 'Vertical';
123
- const trackThickness = rangeStyle.TrackHeight ?? DEFAULT_TRACK_HEIGHT;
127
+ const trackProperties = rangeStyle.Track;
128
+ const trackThickness = trackProperties?.Height ?? DEFAULT_TRACK_HEIGHT;
124
129
  const bandThickness = Math.max(trackThickness + 6, DEFAULT_BAND_HEIGHT);
125
- const hasCellText = rangeStyle.CellText && rangeStyle.CellText.length > 0;
126
- const isTextMerged = rangeStyle.CellTextPosition === 'Merged';
130
+ const cellTextProperties = rangeStyle.CellTextProperties;
131
+ const hasCellText = (0, barChartCellText_1.hasBarChartCellTextConfigured)(cellTextProperties);
127
132
  // Map a 0..1 fraction onto the long-axis viewBox (0..100). Vertical
128
133
  // orientation inverts so that lower values appear at the bottom of
129
134
  // the cell, matching user expectation.
@@ -136,7 +141,7 @@ const getRangeBarRendererForColumn = (styledColumn, abColumn, api) => {
136
141
  this.eGui.style.alignItems = isVertical ? 'center' : 'stretch';
137
142
  this.eGui.style.justifyContent = 'center';
138
143
  this.eGui.style.position = 'relative';
139
- this.eGui.style.height = hasCellText && !isTextMerged ? '80%' : '100%';
144
+ this.eGui.style.height = '100%';
140
145
  const svg = document.createElementNS(SVG_NS, 'svg');
141
146
  svg.setAttribute('class', 'ab-RangeBar__svg');
142
147
  svg.setAttribute('preserveAspectRatio', 'none');
@@ -195,11 +200,11 @@ const getRangeBarRendererForColumn = (styledColumn, abColumn, api) => {
195
200
  const trackCrossOffset = (bandThickness - trackThickness) / 2;
196
201
  const track = document.createElementNS(SVG_NS, 'rect');
197
202
  setRectAxes(track, 0, 100, trackCrossOffset, trackThickness);
198
- track.setAttribute('fill', rangeStyle.TrackColor ?? DEFAULT_TRACK_COLOR);
203
+ track.setAttribute('fill', trackProperties?.Color ?? DEFAULT_TRACK_COLOR);
199
204
  track.setAttribute('class', 'ab-RangeBar__track');
200
205
  // Slight transparency by default so the track doesn't drown out the
201
- // band colours; honour explicit user TrackColor as-is.
202
- if (rangeStyle.TrackColor == undefined) {
206
+ // band colours; honour explicit user Track.Color as-is.
207
+ if (trackProperties?.Color == undefined) {
203
208
  // With no bands the cell background is often plain — the same muted
204
209
  // foreground at 0.35 opacity can disappear (only the accent marker reads).
205
210
  // Bands provide contrast underneath, so keep the subtle blend there.
@@ -228,8 +233,8 @@ const getRangeBarRendererForColumn = (styledColumn, abColumn, api) => {
228
233
  valueFraction = toFraction(numericValue, min, max);
229
234
  }
230
235
  const valueCoord = valueAxisCoord(valueFraction);
231
- const effectiveMarker = isOutOfRange && outOfRangeMode === 'Clamp' && rangeStyle.OutOfRangeColor
232
- ? { ...valueMarker, Color: rangeStyle.OutOfRangeColor }
236
+ const effectiveMarker = isOutOfRange && outOfRangeMode === 'Clamp' && outOfRangeColor
237
+ ? { ...valueMarker, Color: outOfRangeColor }
233
238
  : valueMarker;
234
239
  const markerEl = createMarkerElement(effectiveMarker, valueCoord, bandThickness, isVertical);
235
240
  if (markerEl) {
@@ -237,40 +242,38 @@ const getRangeBarRendererForColumn = (styledColumn, abColumn, api) => {
237
242
  svg.appendChild(markerEl);
238
243
  }
239
244
  }
240
- this.eGui.appendChild(svg);
245
+ // Wrap the SVG in a positioned container so a `Merged` text row sits
246
+ // centred on the *bar*, not on the cell — see BulletChartRenderer for
247
+ // the same fix and Percent Bar for the matching behaviour via its
248
+ // `barEl`.
249
+ const svgContainer = document.createElement('div');
250
+ svgContainer.style.position = 'relative';
251
+ svgContainer.style.display = 'flex';
252
+ svgContainer.style.alignItems = 'center';
253
+ svgContainer.style.justifyContent = 'center';
254
+ if (isVertical) {
255
+ svgContainer.style.flex = '1 1 auto';
256
+ svgContainer.style.minHeight = '0';
257
+ }
258
+ else {
259
+ svgContainer.style.flex = '0 0 auto';
260
+ }
261
+ svgContainer.appendChild(svg);
262
+ this.eGui.appendChild(svgContainer);
241
263
  if (hasCellText) {
242
- const textEl = document.createElement('div');
243
- textEl.className = 'ab-RangeBar__text';
244
- textEl.style.lineHeight = '1.2';
245
- const parts = [];
246
- if (rangeStyle.CellText.includes('CellValue')) {
247
- parts.push(params.formatValue?.(numericValue) ?? String(numericValue));
248
- }
249
- if (rangeStyle.CellText.includes('PercentageValue')) {
250
- const pct = (0, clamp_1.default)((numericValue - min) / (max - min), 0, 1) * 100;
251
- parts.push(`${pct.toFixed(0)}%`);
252
- }
253
- textEl.innerText = parts.join(' ');
254
- switch (rangeStyle.CellTextPosition) {
255
- case 'Above':
256
- this.eGui.prepend(textEl);
257
- break;
258
- case 'Merged':
259
- textEl.style.position = 'absolute';
260
- textEl.style.top = '50%';
261
- textEl.style.transform = 'translateY(-50%)';
262
- textEl.style.left = '0';
263
- textEl.style.right = '0';
264
- textEl.style.paddingLeft = '5px';
265
- textEl.style.paddingRight = '5px';
266
- textEl.style.pointerEvents = 'none';
267
- this.eGui.appendChild(textEl);
268
- break;
269
- case 'Below':
270
- default:
271
- this.eGui.appendChild(textEl);
272
- break;
273
- }
264
+ const pct = (0, clamp_1.default)((numericValue - min) / (max - min), 0, 1) * 100;
265
+ // See PercentBarRenderer: `params.formatValue` on a column without a
266
+ // `valueFormatter` returns the raw value (a number here), so coerce
267
+ // to string before it flows into the helpers.
268
+ const formattedCellValue = String(params.formatValue?.(numericValue) ?? numericValue);
269
+ const labels = (0, barChartCellText_1.buildBarChartCellTextLabels)(cellTextProperties, formattedCellValue, `${pct.toFixed(0)}%`);
270
+ (0, barChartCellText_1.mountBarChartCellText)({
271
+ wrapperEl: this.eGui,
272
+ mergedOverlayEl: svgContainer,
273
+ textClassName: 'ab-RangeBar__text',
274
+ cellTextProperties,
275
+ labels,
276
+ });
274
277
  }
275
278
  }
276
279
  getGui() {
@@ -281,7 +281,7 @@ function AdaptableFormComponent({ formDef, data, onChange, onButtonClick, displa
281
281
  if (!field.helpText && !error) {
282
282
  return control;
283
283
  }
284
- return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: [control, field.helpText && !error ? ((0, jsx_runtime_1.jsx)(Flex_1.Box, { id: helpId, className: "ab-Form_help twa:text-xs twa:opacity-70 twa:mt-1", children: field.helpText })) : null, error ? ((0, jsx_runtime_1.jsx)(Flex_1.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] }));
284
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: [control, field.helpText && !error ? ((0, jsx_runtime_1.jsx)(Flex_1.Box, { id: helpId, className: "ab-Form_help twa:text-xs twa:opacity-70 twa:mt-1", children: field.helpText })) : null, error ? ((0, jsx_runtime_1.jsx)(Flex_1.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] }));
285
285
  };
286
286
  // by default we have 2 columns: label & input
287
287
  const columns = formDef.config?.columns ?? [1, 2];
@@ -1,14 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Card = Card;
4
- const tslib_1 = require("tslib");
5
4
  const jsx_runtime_1 = require("react/jsx-runtime");
6
- const twMerge_1 = require("../../twMerge");
7
- const clsx_1 = tslib_1.__importDefault(require("clsx"));
5
+ const utils_1 = require("../../lib/utils");
8
6
  const Flex_1 = require("../Flex");
9
7
  function Card(props) {
10
8
  const { shadow = true, children, className, style, gap = 2 } = props;
11
- return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: (0, clsx_1.default)('twa:bg-background twa:text-foreground', 'ab-Card', 'twa:text-3', 'twa:rounded-standard twa:p-2', 'twa:flex twa:flex-col', {
9
+ return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: (0, utils_1.cn)('twa:bg-background twa:text-foreground', 'ab-Card', 'twa:text-3', 'twa:rounded-standard twa:p-2', 'twa:flex twa:flex-col', {
12
10
  'twa:shadow-sm': shadow,
13
11
  'twa:gap-0': gap === 0,
14
12
  'twa:gap-1': gap === 1,
@@ -20,7 +18,7 @@ function Card(props) {
20
18
  }
21
19
  const CardTitle = (props) => {
22
20
  const { children, className, gap = 2, border = true } = props;
23
- return ((0, jsx_runtime_1.jsx)("div", { className: (0, twMerge_1.twMerge)((0, clsx_1.default)('ab-Card__title', {
21
+ return ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)('ab-Card__title', {
24
22
  'twa:flex twa:flex-row': true,
25
23
  'twa:items-center': true,
26
24
  'twa:text-4 twa:px-2': true,
@@ -32,11 +30,11 @@ const CardTitle = (props) => {
32
30
  'twa:gap-3': gap === 3,
33
31
  'twa:gap-4': gap === 4,
34
32
  'twa:gap-8': gap === 8,
35
- }, className)), children: children }));
33
+ }, className), children: children }));
36
34
  };
37
35
  const CardBody = (props) => {
38
36
  const { children, gap, className } = props;
39
- return ((0, jsx_runtime_1.jsx)("div", { className: (0, clsx_1.default)('ab-Card__body', 'twa:overflow-auto twa:min-h-0', 'twa:flex-1 twa:flex twa:flex-col', {
37
+ return ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)('ab-Card__body', 'twa:overflow-auto twa:min-h-0', 'twa:flex-1 twa:flex twa:flex-col', {
40
38
  'twa:gap-0': gap === 0,
41
39
  'twa:gap-1': gap === 1,
42
40
  'twa:gap-2': gap === 2,
@@ -6,7 +6,6 @@ const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const React = tslib_1.__importStar(require("react"));
7
7
  const react_1 = require("react");
8
8
  const Flex_1 = require("../Flex");
9
- const clsx_1 = tslib_1.__importDefault(require("clsx"));
10
9
  const utils_1 = require("../../lib/utils");
11
10
  const twUtils_1 = require("../twUtils");
12
11
  const Square = (props) => {
@@ -48,10 +47,10 @@ const CheckBox = ({ children, checked, onChange, value, name, disabled, readOnly
48
47
  React.useEffect(() => {
49
48
  checkboxRef.current.indeterminate = indeterminate;
50
49
  }, [indeterminate]);
51
- let input = ((0, jsx_runtime_1.jsx)("input", { className: (0, clsx_1.default)(`ab-CheckBox-input twa:peer twa:align-middle twa:opacity-0`, {
50
+ let input = ((0, jsx_runtime_1.jsx)("input", { className: (0, utils_1.cn)(`ab-CheckBox-input twa:peer twa:align-middle twa:opacity-0`, {
52
51
  'twa:cursor-pointer': !readOnly && !disabled,
53
52
  }), ref: checkboxRef, disabled: disabled, readOnly: readOnly, checked: !!computedChecked, tabIndex: tabIndex, type: "checkbox", name: name, value: value, onChange: onInputChange }));
54
- return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { ...props, className: (0, clsx_1.default)('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, (0, jsx_runtime_1.jsx)(Square, { type: type, className: checkSquareClassName }), afterGap, after] }));
53
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { ...props, className: (0, utils_1.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, (0, jsx_runtime_1.jsx)(Square, { type: type, className: checkSquareClassName }), afterGap, after] }));
55
54
  };
56
55
  exports.CheckBox = CheckBox;
57
56
  const CheckBoxGroup = (props) => {
@@ -1,12 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CodeBlock = exports.baseClassName = void 0;
4
- const tslib_1 = require("tslib");
5
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const utils_1 = require("../../lib/utils");
6
6
  const Flex_1 = require("../Flex");
7
- const clsx_1 = tslib_1.__importDefault(require("clsx"));
8
7
  exports.baseClassName = 'ab-CodeBlock';
9
8
  const CodeBlock = (props) => {
10
- return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { as: "code", ...props, className: (0, clsx_1.default)('twa:p-1 twa:rounded-standard twa:bg-primary twa:text-primary-foreground', exports.baseClassName, props.className) }));
9
+ return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { as: "code", ...props, className: (0, utils_1.cn)('twa:p-1 twa:rounded-standard twa:bg-primary twa:text-primary-foreground', exports.baseClassName, props.className) }));
11
10
  };
12
11
  exports.CodeBlock = CodeBlock;
@@ -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'>;
@@ -6,15 +6,15 @@ const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const React = tslib_1.__importStar(require("react"));
7
7
  const react_1 = require("react");
8
8
  const debounce_1 = tslib_1.__importDefault(require("../../Utilities/utils/debounce"));
9
+ const utils_1 = require("../../lib/utils");
9
10
  const Input_1 = tslib_1.__importDefault(require("../Input"));
10
11
  const StyleHelper_1 = require("../../Utilities/Helpers/StyleHelper");
11
12
  const tinycolor2_1 = tslib_1.__importDefault(require("tinycolor2"));
12
13
  const Flex_1 = require("../Flex");
13
14
  const twMerge_1 = require("../../twMerge");
14
- const clsx_1 = tslib_1.__importDefault(require("clsx"));
15
15
  exports.ColorPicker = React.forwardRef((props, ref) => {
16
16
  const ColorPalette = props.api.userInterfaceApi.getColorPalette();
17
- let { api, value, includeAlpha = true, ...restProps } = props;
17
+ let { value, includeAlpha = true, className, ...restProps } = props;
18
18
  // Create a debounced version of onChange
19
19
  // we need this because moving the mouse A LOT in the custom color picker can break the React rendering
20
20
  const debouncedOnChange = (0, react_1.useCallback)((0, debounce_1.default)((color) => {
@@ -40,17 +40,19 @@ exports.ColorPicker = React.forwardRef((props, ref) => {
40
40
  return [(0, tinycolor2_1.default)(color).setAlpha(0).toRgbString(), (0, tinycolor2_1.default)(color).setAlpha(1).toRgbString()];
41
41
  }, [value]);
42
42
  const rangeBackround = `linear-gradient(90deg, ${preparedAlphaColor[0]} 0%, ${preparedAlphaColor[1]} 100%)`;
43
- const alpha = (0, tinycolor2_1.default)(value).getAlpha();
44
- return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: (0, clsx_1.default)('ColorPicker twa:items-center twa:gap-2', {
43
+ const alpha = (0, tinycolor2_1.default)((0, StyleHelper_1.getVariableColor)(value)).getAlpha();
44
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: (0, utils_1.cn)('ColorPicker twa:items-center twa:gap-2', {
45
45
  'twa:opacity-30': props.disabled,
46
- }, props.className), children: [(0, jsx_runtime_1.jsx)(Input_1.default, { ...restProps, as: undefined, disabled: props.disabled, className: (0, twMerge_1.twMerge)('twa:w-[70px] twa:p-0', restProps.className), onChange: (event) => {
46
+ }, className), children: [(0, jsx_runtime_1.jsx)(Input_1.default, { ...restProps, as: undefined, disabled: props.disabled, className: (0, twMerge_1.twMerge)('ab-ColorPicker-swatch'), onChange: (event) => {
47
47
  /**
48
48
  * The value is not in the map when the color is not in the palette.
49
49
  */
50
50
  const color = optionsMap[event.target.value] ?? event.target.value;
51
51
  debouncedOnChange(color);
52
52
  }, value: preparedValue, ref: ref, type: "color", list: "ABcolorChoices", title: props.title }), ABcolorChoices, includeAlpha && ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:gap-1", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { children: "Opacity" }), (0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "center", className: "twa:min-h-input", children: (0, jsx_runtime_1.jsx)(Input_1.default, { disabled: props.disabled, className: "ab-ColorPicker-range", style: { background: rangeBackround }, value: alpha, onChange: (event) => {
53
- const color = (0, tinycolor2_1.default)(value).setAlpha(event.target.value).toRgbString();
53
+ const color = (0, tinycolor2_1.default)((0, StyleHelper_1.getVariableColor)(value))
54
+ .setAlpha(event.target.value)
55
+ .toRgbString();
54
56
  debouncedOnChange(color);
55
57
  }, min: 0, max: 1, step: 0.01, type: "range" }) })] }))] }));
56
58
  });
@@ -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,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OptionalColorPicker = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ const react_1 = require("react");
7
+ const Flex_1 = require("../Flex");
8
+ const SimpleButton_1 = tslib_1.__importDefault(require("../SimpleButton"));
9
+ const twMerge_1 = require("../../twMerge");
10
+ const ColorPicker_1 = require("./ColorPicker");
11
+ const DEFAULT_COLOR = '#000000';
12
+ const OptionalColorPicker = (props) => {
13
+ const { api, value, onChange, defaultColor = DEFAULT_COLOR, disabled = false, includeAlpha = true, className, } = props;
14
+ const pickerRef = (0, react_1.useRef)(null);
15
+ const pendingOpenRef = (0, react_1.useRef)(false);
16
+ (0, react_1.useEffect)(() => {
17
+ if (pendingOpenRef.current && value && pickerRef.current) {
18
+ pendingOpenRef.current = false;
19
+ pickerRef.current.click();
20
+ }
21
+ }, [value]);
22
+ const handleActivate = () => {
23
+ pendingOpenRef.current = true;
24
+ onChange(defaultColor);
25
+ };
26
+ if (!value) {
27
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: (0, twMerge_1.twMerge)('OptionalColorPicker twa:gap-1', className), children: [(0, jsx_runtime_1.jsx)("button", { type: "button", disabled: disabled, className: "ab-OptionalColorPicker-empty", onClick: handleActivate, "aria-label": "Set colour", title: "Click to set colour" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2 twa:text-muted-foreground", children: "None" })] }));
28
+ }
29
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: (0, twMerge_1.twMerge)('OptionalColorPicker twa:gap-1', className), children: [(0, jsx_runtime_1.jsx)(ColorPicker_1.ColorPicker, { ref: pickerRef, api: api, value: value, disabled: disabled, includeAlpha: includeAlpha, onChange: onChange }), (0, jsx_runtime_1.jsx)(SimpleButton_1.default, { icon: "close", variant: "text", disabled: disabled, tooltip: "Clear colour", onClick: () => onChange(undefined) })] }));
30
+ };
31
+ exports.OptionalColorPicker = OptionalColorPicker;
@@ -1 +1,2 @@
1
1
  export * from './ColorPicker';
2
+ export * from './OptionalColorPicker';
@@ -2,3 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./ColorPicker"), exports);
5
+ tslib_1.__exportStar(require("./OptionalColorPicker"), exports);
@@ -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;
@@ -9,7 +9,6 @@ const utils_1 = require("../../lib/utils");
9
9
  const lucide_react_1 = require("lucide-react");
10
10
  const react_1 = require("react");
11
11
  const input_group_1 = require("../ui/input-group");
12
- const clsx_1 = tslib_1.__importDefault(require("clsx"));
13
12
  const comboboxUtils_1 = require("./comboboxUtils");
14
13
  const VirtualizedList_1 = require("./VirtualizedList");
15
14
  const CheckBox_1 = require("../CheckBox");
@@ -185,15 +184,15 @@ function useCreatable(props, allItems, itemByValue) {
185
184
  if (props.isCreatable && itemsToCreate.length > 0) {
186
185
  savingCreatableItem = true;
187
186
  itemsAllNumeric = allItems.every((item) => !item.creatable ? typeof item.value === 'number' : true);
187
+ newCreatedItems = itemsToCreate.map((item) => ({
188
+ ...item,
189
+ creatable: true,
190
+ created: true,
191
+ // if all other items are numeric, and the value for the created item is a valid number, then convert the value to a number
192
+ // we'll also have to correctly call onValueChange with the new value
193
+ value: itemsAllNumeric && !Number.isNaN(Number(item.value)) ? Number(item.value) : item.value,
194
+ }));
188
195
  setAlreadySavedCreatableItems((current) => {
189
- newCreatedItems = itemsToCreate.map((item) => ({
190
- ...item,
191
- creatable: true,
192
- created: true,
193
- // if all other items are numeric, and the value for the created item is a valid number, then convert the value to a number
194
- // we'll also have to correctly call onValueChange with the new value
195
- value: itemsAllNumeric && !Number.isNaN(Number(item.value)) ? Number(item.value) : item.value,
196
- }));
197
196
  const mergedItems = [...current, ...newCreatedItems];
198
197
  const seenValues = new Set();
199
198
  return mergedItems.filter((item) => {
@@ -361,7 +360,7 @@ const SingleCombobox_MenuListSearchable = (props) => {
361
360
  '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: (0, jsx_runtime_1.jsx)(combobox_1.ComboboxValue, { placeholder: (0, jsx_runtime_1.jsx)("span", { children: props.placeholder }), children: (value) => {
362
361
  return ((0, jsx_runtime_1.jsxs)(React.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { className: "twa:flex twa:flex-1 twa:truncate twa:text-left", "data-slot": "combobox-value", children: (0, jsx_runtime_1.jsx)(combobox_1.ComboboxValue, { placeholder: (0, jsx_runtime_1.jsx)("span", { children: props.placeholder }) }) }), (0, jsx_runtime_1.jsx)("input", { type: "hidden", "data-slot": "combobox-value-input", readOnly: true, value: value ? (0, comboboxUtils_1.getItemTextLabel)(value) : '' }), props.isLoading && ((0, jsx_runtime_1.jsx)(lucide_react_1.Loader2Icon, { className: "twa:size-4 twa:text-muted-foreground twa:animate-spin" })), value && showClear ? ((0, jsx_runtime_1.jsx)(combobox_1.ComboboxClear, { disabled: isDisabled, onMouseDown: (e) => {
363
362
  e.preventBaseUIHandler();
364
- } })) : ((0, jsx_runtime_1.jsx)(input_group_1.InputGroupButton, { size: "icon-xs", variant: "ghost", className: 'twa:min-h-auto!', children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDownIcon, { className: "twa:pointer-events-none twa:size-4 twa:shrink-0 twa:text-muted-foreground" }) }))] }));
363
+ } })) : props.showTrigger !== false ? ((0, jsx_runtime_1.jsx)(input_group_1.InputGroupButton, { size: "icon-xs", variant: "ghost", className: 'twa:min-h-auto!', children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDownIcon, { className: "twa:pointer-events-none twa:size-4 twa:shrink-0 twa:text-muted-foreground" }) })) : null] }));
365
364
  } }) }), (0, jsx_runtime_1.jsxs)(combobox_1.ComboboxContent, { anchor: anchor, style: getContentStyle({ maxLabelLength }), resizable: props.resizable, contentRef: contentRefCallback, className: props.contentClassName, children: [(0, jsx_runtime_1.jsx)(combobox_1.ComboboxInput, { className: searchInputClassName, placeholder: props.placeholder, showClear: false, showTrigger: false, disabled: isDisabled, ref: searchInputRef, onFocus: handleFocus, onBlur: handleBlur }), (0, jsx_runtime_1.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 })] })] }));
366
365
  };
367
366
  const SingleCombobox_SimpleSearchable = (props) => {
@@ -372,7 +371,7 @@ const SingleCombobox_SimpleSearchable = (props) => {
372
371
  const searchable = props.searchable === false ? false : 'inline';
373
372
  const isDisabled = props.disabled;
374
373
  const { allItems, itemByValue, maxLabelLength, inputValue, onInputValueChange, onValueChange, value, } = useGetAllItems(props);
375
- return ((0, jsx_runtime_1.jsxs)(AdaptableCombobox_Root, { ...props, value: value, itemByValue: itemByValue, inputValue: inputValue, onInputValueChange: onInputValueChange, onValueChange: onValueChange, allItems: allItems, children: [(0, jsx_runtime_1.jsx)(combobox_1.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 }), (0, jsx_runtime_1.jsx)(combobox_1.ComboboxContent, { anchor: anchor, style: getContentStyle({ maxLabelLength }), resizable: props.resizable, children: (0, jsx_runtime_1.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 }) })] }));
374
+ return ((0, jsx_runtime_1.jsxs)(AdaptableCombobox_Root, { ...props, value: value, itemByValue: itemByValue, inputValue: inputValue, onInputValueChange: onInputValueChange, onValueChange: onValueChange, allItems: allItems, children: [(0, jsx_runtime_1.jsx)(combobox_1.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 }), (0, jsx_runtime_1.jsx)(combobox_1.ComboboxContent, { anchor: anchor, style: getContentStyle({ maxLabelLength }), resizable: props.resizable, children: (0, jsx_runtime_1.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 }) })] }));
376
375
  };
377
376
  const MultiCombobox_SimpleSearchable = (props) => {
378
377
  const anchor = (0, combobox_1.useComboboxAnchor)();
@@ -405,13 +404,13 @@ const MultiCombobox_SimpleSearchable = (props) => {
405
404
  if (!menuOpen) {
406
405
  onOpenChange(true);
407
406
  }
408
- }, ref: anchor, className: (0, clsx_1.default)('twa:relative', props.className), children: (0, jsx_runtime_1.jsx)(combobox_1.ComboboxValue, { children: (selectedItems) => {
407
+ }, ref: anchor, className: (0, utils_1.cn)('twa:relative', props.className), children: (0, jsx_runtime_1.jsx)(combobox_1.ComboboxValue, { children: (selectedItems) => {
409
408
  const shouldKeepTrigger = props.searchable === false && selectedItems.length > 0;
410
409
  return ((0, jsx_runtime_1.jsxs)(React.Fragment, { children: [props.renderInputValues ? (props.renderInputValues(selectedItems)) : ((0, jsx_runtime_1.jsx)(MultiComboboxChips, { selectedItems: selectedItems, showClear: showClear })), props.renderInput !== false ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(combobox_1.ComboboxChipsInput, { placeholder: selectedItems.length > 0 ? '' : props.placeholder, readOnly: props.searchable === false, onFocus: props.onFocus, onBlur: props.onBlur, className: props.searchable === false && selectedItems.length > 0
411
410
  ? '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
412
- : 'twa:flex-1' }), props.searchable === false && selectedItems.length > 0 ? ((0, jsx_runtime_1.jsx)("div", { className: "twa:flex-1" })) : null, (0, jsx_runtime_1.jsx)("div", { "data-slot": "input-group", role: "group", className: "twa:group/input-group twa:z-10", children: (0, jsx_runtime_1.jsxs)(input_group_1.InputGroupAddon, { align: "inline-end", className: "twa:p-0 px twa:gap-0.5", children: [props.isLoading && ((0, jsx_runtime_1.jsx)(lucide_react_1.Loader2Icon, { className: "twa:size-4 twa:text-muted-foreground twa:animate-spin" })), (0, jsx_runtime_1.jsx)(input_group_1.InputGroupButton, { size: "icon-xs", variant: "ghost", render: (0, jsx_runtime_1.jsx)(combobox_1.ComboboxTrigger, { className: "twa:min-h-auto!" }), "data-slot": "combobox-toggle", className: (0, clsx_1.default)(`twa:data-pressed:bg-transparent`, shouldKeepTrigger
411
+ : 'twa:flex-1' }), props.searchable === false && selectedItems.length > 0 ? ((0, jsx_runtime_1.jsx)("div", { className: "twa:flex-1" })) : null, (0, jsx_runtime_1.jsx)("div", { "data-slot": "input-group", role: "group", className: "twa:group/input-group twa:z-10", children: (0, jsx_runtime_1.jsxs)(input_group_1.InputGroupAddon, { align: "inline-end", className: "twa:p-0 px twa:gap-0.5", children: [props.isLoading && ((0, jsx_runtime_1.jsx)(lucide_react_1.Loader2Icon, { className: "twa:size-4 twa:text-muted-foreground twa:animate-spin" })), props.showTrigger !== false ? ((0, jsx_runtime_1.jsx)(input_group_1.InputGroupButton, { size: "icon-xs", variant: "ghost", render: (0, jsx_runtime_1.jsx)(combobox_1.ComboboxTrigger, { className: "twa:min-h-auto!" }), "data-slot": "combobox-toggle", className: (0, utils_1.cn)(`twa:data-pressed:bg-transparent`, shouldKeepTrigger
413
412
  ? ''
414
- : 'twa:group-has-data-[slot=combobox-clear]/input-group:hidden'), disabled: isDisabled }), showClear && (0, jsx_runtime_1.jsx)(combobox_1.ComboboxClear, { disabled: isDisabled })] }) })] })) : null] }));
413
+ : 'twa:group-has-data-[slot=combobox-clear]/input-group:hidden'), disabled: isDisabled })) : null, showClear && (0, jsx_runtime_1.jsx)(combobox_1.ComboboxClear, { disabled: isDisabled })] }) })] })) : null] }));
415
414
  } }) }), (0, jsx_runtime_1.jsx)(combobox_1.ComboboxContent, { anchor: anchor, style: getContentStyle({ maxLabelLength }), resizable: props.resizable, children: (0, jsx_runtime_1.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 }) })] }));
416
415
  };
417
416
  const MultiComboboxChips = (props) => {
@@ -497,15 +496,15 @@ const MultiCombobox_MenuListSearchable = (props) => {
497
496
  hasFocusRef.current = false;
498
497
  props.onBlur?.();
499
498
  }
500
- }, className: (0, clsx_1.default)('twa:relative', props.className, _props?.className), children: (0, jsx_runtime_1.jsx)(combobox_1.ComboboxValue, { children: (selectedItems) => {
501
- return ((0, jsx_runtime_1.jsxs)(React.Fragment, { children: [props.renderInputValues ? (props.renderInputValues(selectedItems)) : ((0, jsx_runtime_1.jsx)(MultiComboboxChips, { selectedItems: selectedItems, showClear: showClear })), props.renderInput !== false ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(combobox_1.ComboboxChipsInput, { ref: chipsInputRef, placeholder: selectedItems.length > 0 ? '' : props.placeholder, readOnly: true, value: '', className: 'twa:flex-1' }) })) : ((0, jsx_runtime_1.jsx)("div", { className: "twa:flex-1" })), (0, jsx_runtime_1.jsx)("div", { "data-slot": "input-group", role: "group", className: "twa:group/input-group", children: (0, jsx_runtime_1.jsxs)(input_group_1.InputGroupAddon, { align: "inline-end", className: "twa:p-0 px", children: [props.isLoading && ((0, jsx_runtime_1.jsx)(lucide_react_1.Loader2Icon, { className: "twa:size-4 twa:text-muted-foreground twa:animate-spin" })), (0, jsx_runtime_1.jsx)(input_group_1.InputGroupButton, { size: "icon-xs", variant: "ghost", render: (0, jsx_runtime_1.jsx)(combobox_1.ComboboxTrigger, { className: "twa:min-h-auto!", ref: chevronRef, "data-slot": "combobox-toggle",
499
+ }, className: (0, utils_1.cn)('twa:relative', props.className, _props?.className), children: (0, jsx_runtime_1.jsx)(combobox_1.ComboboxValue, { children: (selectedItems) => {
500
+ return ((0, jsx_runtime_1.jsxs)(React.Fragment, { children: [props.renderInputValues ? (props.renderInputValues(selectedItems)) : ((0, jsx_runtime_1.jsx)(MultiComboboxChips, { selectedItems: selectedItems, showClear: showClear })), props.renderInput !== false ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(combobox_1.ComboboxChipsInput, { ref: chipsInputRef, placeholder: selectedItems.length > 0 ? '' : props.placeholder, readOnly: true, value: '', className: 'twa:flex-1' }) })) : ((0, jsx_runtime_1.jsx)("div", { className: "twa:flex-1" })), (0, jsx_runtime_1.jsx)("div", { "data-slot": "input-group", role: "group", className: "twa:group/input-group", children: (0, jsx_runtime_1.jsxs)(input_group_1.InputGroupAddon, { align: "inline-end", className: "twa:p-0 px", children: [props.isLoading && ((0, jsx_runtime_1.jsx)(lucide_react_1.Loader2Icon, { className: "twa:size-4 twa:text-muted-foreground twa:animate-spin" })), props.showTrigger !== false ? ((0, jsx_runtime_1.jsx)(input_group_1.InputGroupButton, { size: "icon-xs", variant: "ghost", render: (0, jsx_runtime_1.jsx)(combobox_1.ComboboxTrigger, { className: "twa:min-h-auto!", ref: chevronRef, "data-slot": "combobox-toggle",
502
501
  // we already have the role="combobox" on the parent
503
502
  // so we want to avoid the same role twice in the component,
504
503
  // hence we use the role="widget" here.
505
- role: "widget" }), "data-slot": "combobox-toggle", className: (0, clsx_1.default)(`twa:data-pressed:bg-transparent`, 'twa:group-has-data-[slot=combobox-clear]/input-group:hidden'), disabled: isDisabled }), showClear && (0, jsx_runtime_1.jsx)(combobox_1.ComboboxClear, { disabled: isDisabled })] }) })] }));
504
+ role: "widget" }), "data-slot": "combobox-toggle", className: (0, utils_1.cn)(`twa:data-pressed:bg-transparent`, 'twa:group-has-data-[slot=combobox-clear]/input-group:hidden'), disabled: isDisabled })) : null, showClear && (0, jsx_runtime_1.jsx)(combobox_1.ComboboxClear, { disabled: isDisabled })] }) })] }));
506
505
  } }) }));
507
506
  };
508
- return ((0, jsx_runtime_1.jsxs)(AdaptableCombobox_Root, { ...props, value: value, multiple: true, allItems: allItems, itemByValue: itemByValue, inputValue: inputValue, onInputValueChange: onInputValueChange, onValueChange: onValueChange, onOpenChange: onOpenChange, children: [props.renderInput === false ? ((0, jsx_runtime_1.jsx)(combobox_1.ComboboxTrigger, { nativeButton: false, render: renderChips })) : (renderChips(undefined)), (0, jsx_runtime_1.jsxs)(combobox_1.ComboboxContent, { anchor: anchor, style: getContentStyle({ maxLabelLength }), resizable: props.resizable, contentRef: contentRefCallback, children: [(0, jsx_runtime_1.jsx)(combobox_1.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'
507
+ return ((0, jsx_runtime_1.jsxs)(AdaptableCombobox_Root, { ...props, value: value, multiple: true, allItems: allItems, itemByValue: itemByValue, inputValue: inputValue, onInputValueChange: onInputValueChange, onValueChange: onValueChange, onOpenChange: onOpenChange, children: [props.renderInput === false ? ((0, jsx_runtime_1.jsx)(combobox_1.ComboboxTrigger, { nativeButton: false, render: renderChips, icon: props.showTrigger !== false ? undefined : null })) : (renderChips(undefined)), (0, jsx_runtime_1.jsxs)(combobox_1.ComboboxContent, { anchor: anchor, style: getContentStyle({ maxLabelLength }), resizable: props.resizable, contentRef: contentRefCallback, children: [(0, jsx_runtime_1.jsx)(combobox_1.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'
509
508
  ? props.renderSearchInputTrailing()
510
509
  : undefined }), (0, jsx_runtime_1.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 })] })] }));
511
510
  };
@@ -541,6 +540,8 @@ const GridFilterCombobox = (props) => {
541
540
  virtualized: true,
542
541
  resizable: true,
543
542
  showClear: false,
543
+ // don't show a chevron icon in the grid filter combobox
544
+ showTrigger: false,
544
545
  renderInputValues: (items) => {
545
546
  let children = items.map((item) => (0, comboboxUtils_1.getItemTextLabel)(item)).join(', ');
546
547
  if (items.length === 0) {
@@ -5,8 +5,6 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const ModuleManager_1 = require("../DragAndDropContext/ModuleManager");
7
7
  const DashboardManager = ({ tabs, onTabsChange, availableToolbars, api, disabled, }) => {
8
- const moduleService = api.internalApi.getModuleService();
9
- const moduleInfo = moduleService.getModuleInfoByModule('Dashboard');
10
8
  const moduleTabs = tabs.map((tab) => {
11
9
  return {
12
10
  Name: tab.Name,
@@ -19,7 +17,7 @@ const DashboardManager = ({ tabs, onTabsChange, availableToolbars, api, disabled
19
17
  Toolbars: tab.Items,
20
18
  }));
21
19
  onTabsChange(dashboardTabs);
22
- }, []);
23
- return ((0, jsx_runtime_1.jsx)(ModuleManager_1.ModuleManager, { availableItems: availableToolbars, disabled: disabled, onTabsChange: handleTabsChange, tabs: moduleTabs, tabsTitle: moduleInfo.FriendlyName + ' Tabs', unusedPanelTitle: 'Available Toolbars', dragItemText: "Drag into a Tab below" }));
20
+ }, [onTabsChange]);
21
+ return ((0, jsx_runtime_1.jsx)(ModuleManager_1.ModuleManager, { dragScope: "dashboard-tabs", layout: "rows", availableItems: availableToolbars, disabled: disabled, onTabsChange: handleTabsChange, tabs: moduleTabs }));
24
22
  };
25
23
  exports.default = DashboardManager;
@@ -4,6 +4,7 @@ exports.Dialog = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const React = tslib_1.__importStar(require("react"));
7
+ const utils_1 = require("../../lib/utils");
7
8
  const react_1 = require("react");
8
9
  const contains_1 = tslib_1.__importDefault(require("../utils/contains"));
9
10
  const captureTabNavigation_1 = tslib_1.__importDefault(require("../utils/captureTabNavigation"));
@@ -13,7 +14,6 @@ const useAutoFocus_1 = tslib_1.__importDefault(require("../utils/useAutoFocus"))
13
14
  const icons_1 = require("../icons");
14
15
  const WindowModal_1 = require("../WindowModal");
15
16
  const Flex_1 = require("../Flex");
16
- const clsx_1 = tslib_1.__importDefault(require("clsx"));
17
17
  const twUtils_1 = require("../twUtils");
18
18
  const baseClassName = 'ab-Dialog';
19
19
  exports.Dialog = React.forwardRef((props, dialogRef) => {
@@ -99,7 +99,7 @@ exports.Dialog = React.forwardRef((props, dialogRef) => {
99
99
  if (!isOpen) {
100
100
  return null;
101
101
  }
102
- const closeButton = showCloseButton ? ((0, jsx_runtime_1.jsx)(Flex_1.Box, { title: "Close dialog", onClick: () => setIsOpen(false), className: (0, clsx_1.default)(`${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: (0, jsx_runtime_1.jsx)(icons_1.Icon, { size: 20, name: "close" }) })) : null;
102
+ const closeButton = showCloseButton ? ((0, jsx_runtime_1.jsx)(Flex_1.Box, { title: "Close dialog", onClick: () => setIsOpen(false), className: (0, utils_1.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: (0, jsx_runtime_1.jsx)(icons_1.Icon, { size: 20, name: "close" }) })) : null;
103
103
  const setPreventDismissFlag = (e) => {
104
104
  if (dismissOnClickOutside) {
105
105
  e.nativeEvent.preventDialogDismiss = true;
@@ -110,8 +110,8 @@ exports.Dialog = React.forwardRef((props, dialogRef) => {
110
110
  if (boxProps && boxProps.onClick) {
111
111
  boxProps.onClick(e);
112
112
  }
113
- }, onKeyDown: onKeyDown, className: (0, clsx_1.default)('twa:relative', 'twa:bg-background', 'twa:text-foreground', 'twa:fill-foreground', 'twa:rounded-standard', 'twa:flex twa:flex-col', twUtils_1.targetOwn.focusOutline, twUtils_1.targetOwn.focusWithinOutline, baseClassName, modal ? `${baseClassName}--modal` : `${baseClassName}--not-modal`, className), ref: boxRef, children: [children, closeButton] }));
114
- const content = fixed ? ((0, jsx_runtime_1.jsx)("div", { onClick: setPreventDismissFlag, className: (0, clsx_1.default)(`${baseClassName}-fixed-wrapper`, 'twa:fixed twa:inset-0', 'twa:m-auto', 'twa:flex twa:items-center twa:justify-center'), children: box })) : (box);
113
+ }, onKeyDown: onKeyDown, className: (0, utils_1.cn)('twa:relative', 'twa:bg-background', 'twa:text-foreground', 'twa:fill-foreground', 'twa:rounded-standard', 'twa:flex twa:flex-col', twUtils_1.targetOwn.focusOutline, twUtils_1.targetOwn.focusWithinOutline, baseClassName, modal ? `${baseClassName}--modal` : `${baseClassName}--not-modal`, className), ref: boxRef, children: [children, closeButton] }));
114
+ const content = fixed ? ((0, jsx_runtime_1.jsx)("div", { onClick: setPreventDismissFlag, className: (0, utils_1.cn)(`${baseClassName}-fixed-wrapper`, 'twa:fixed twa:inset-0', 'twa:m-auto', 'twa:flex twa:items-center twa:justify-center'), children: box })) : (box);
115
115
  if (windowModal) {
116
116
  return (0, jsx_runtime_1.jsx)(WindowModal_1.WindowModal, { ...windowModalProps, children: content });
117
117
  }
@@ -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,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DragAndDropContext = void 0;
3
+ exports.DragAndDropContext = exports.DEFAULT_UNUSED_LIST_ID = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
+ exports.DEFAULT_UNUSED_LIST_ID = 'UNUSED';
6
7
  exports.DragAndDropContext = React.createContext({
7
8
  availableItems: [],
8
9
  permittedActions: {
@@ -11,4 +12,6 @@ exports.DragAndDropContext = React.createContext({
11
12
  dragAndDropTab: true,
12
13
  deleteTab: true,
13
14
  },
15
+ dragScope: 'default',
16
+ unusedListIds: [exports.DEFAULT_UNUSED_LIST_ID],
14
17
  });
@@ -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>;