@adaptabletools/adaptable 23.0.0-canary.5 → 23.0.0-canary.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (335) hide show
  1. package/icons/sort-asc.svg +1 -1
  2. package/index.css +756 -257
  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 +2 -2
  12. package/src/Api/Internal/AlertInternalApi.js +1 -1
  13. package/src/Api/Internal/DataSetInternalApi.d.ts +3 -0
  14. package/src/Api/Internal/DataSetInternalApi.js +73 -13
  15. package/src/Redux/Store/AdaptableStore.js +6 -4
  16. package/src/Strategy/CalculatedColumnModule.js +1 -0
  17. package/src/Strategy/ColumnFilterModule.js +1 -0
  18. package/src/Strategy/FlashingCellModule.js +6 -2
  19. package/src/Strategy/FormatColumnModule.js +2 -2
  20. package/src/Strategy/FreeTextColumnModule.js +38 -28
  21. package/src/Strategy/Interface/IModule.d.ts +3 -1
  22. package/src/Strategy/LayoutModule.js +15 -66
  23. package/src/Strategy/StyledColumnModule.js +12 -29
  24. package/src/Strategy/Utilities/CustomSort/getCustomSortColumnViewItems.d.ts +1 -0
  25. package/src/Strategy/Utilities/CustomSort/getCustomSortColumnViewItems.js +1 -0
  26. package/src/Strategy/Utilities/Export/getExportColumnsViewItems.d.ts +2 -0
  27. package/src/Strategy/Utilities/Export/getExportColumnsViewItems.js +14 -0
  28. package/src/Strategy/Utilities/Export/getExportRowsViewItems.d.ts +1 -0
  29. package/src/Strategy/Utilities/Export/getExportRowsViewItems.js +3 -0
  30. package/src/Strategy/Utilities/Layout/aggregationSummaryHelpers.d.ts +11 -0
  31. package/src/Strategy/Utilities/Layout/aggregationSummaryHelpers.js +105 -0
  32. package/src/Strategy/Utilities/Layout/columnsSummaryHelpers.d.ts +48 -0
  33. package/src/Strategy/Utilities/Layout/columnsSummaryHelpers.js +166 -0
  34. package/src/Strategy/Utilities/Layout/getLayoutSortViewItems.d.ts +1 -0
  35. package/src/Strategy/Utilities/Layout/getLayoutSortViewItems.js +1 -0
  36. package/src/Strategy/Utilities/Layout/rowGroupSummaryHelpers.d.ts +26 -0
  37. package/src/Strategy/Utilities/Layout/rowGroupSummaryHelpers.js +85 -0
  38. package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +3 -5
  39. package/src/Utilities/Defaults/DefaultSettingsPanel.js +46 -41
  40. package/src/Utilities/Helpers/FormatHelper.js +3 -0
  41. package/src/Utilities/Helpers/ScheduleHelper.js +2 -0
  42. package/src/Utilities/Helpers/StyleHelper.d.ts +18 -0
  43. package/src/Utilities/Helpers/StyleHelper.js +27 -0
  44. package/src/Utilities/Helpers/StyledColumnGradientHelper.js +7 -5
  45. package/src/Utilities/Helpers/resolveSettingsPanelNavigation.d.ts +3 -0
  46. package/src/Utilities/Helpers/resolveSettingsPanelNavigation.js +15 -0
  47. package/src/Utilities/getScopeViewItems.js +2 -0
  48. package/src/Utilities/wizardSelection.d.ts +10 -0
  49. package/src/Utilities/wizardSelection.js +15 -0
  50. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +2 -2
  51. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.js +2 -2
  52. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +3 -3
  53. package/src/View/Alert/AlertViewPanel.js +2 -2
  54. package/src/View/Alert/Utilities/getAlertButtonStyle.js +7 -4
  55. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.d.ts +0 -1
  56. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +0 -4
  57. package/src/View/Alert/Wizard/AlertButtonsEditor.js +2 -1
  58. package/src/View/Alert/Wizard/AlertMessageWizardSection.d.ts +1 -1
  59. package/src/View/Alert/Wizard/AlertMessageWizardSection.js +1 -2
  60. package/src/View/Alert/Wizard/AlertNotificationWizardSection.d.ts +1 -1
  61. package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +3 -4
  62. package/src/View/Alert/Wizard/AlertScheduledWizardSection.d.ts +1 -1
  63. package/src/View/Alert/Wizard/AlertScheduledWizardSection.js +1 -2
  64. package/src/View/Alert/Wizard/AlertTypeWizardSection.d.ts +1 -1
  65. package/src/View/Alert/Wizard/AlertTypeWizardSection.js +31 -7
  66. package/src/View/Alert/Wizard/AlertWizard.js +4 -4
  67. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.d.ts +2 -1
  68. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +4 -14
  69. package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
  70. package/src/View/BulkUpdate/BulkUpdateViewPanel.js +4 -6
  71. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.d.ts +1 -1
  72. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +1 -2
  73. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
  74. package/src/View/CalculatedColumn/Wizard/CalculatedColumnTypeSection.js +30 -4
  75. package/src/View/CellSummary/CellSummaryViewPanel.js +4 -4
  76. package/src/View/Charting/ShowChartButton.js +8 -8
  77. package/src/View/ColumnInfo/ColumnInfo.js +21 -1
  78. package/src/View/Components/AdaptableObjectCollection/index.js +2 -2
  79. package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +1 -1
  80. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +4 -4
  81. package/src/View/Components/AdaptableObjectRow/index.js +2 -2
  82. package/src/View/Components/Buttons/ButtonBase/index.js +2 -3
  83. package/src/View/Components/Buttons/ButtonNew.d.ts +2 -0
  84. package/src/View/Components/Buttons/ButtonNew.js +1 -1
  85. package/src/View/Components/Buttons/EntityListActionButtons.js +3 -3
  86. package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.js +2 -2
  87. package/src/View/Components/ColumnFilter/ColumnFilter.js +2 -3
  88. package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +0 -1
  89. package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.js +3 -1
  90. package/src/View/Components/ColumnFilter/components/ColumnFilterMenu.js +2 -2
  91. package/src/View/Components/ColumnSelector/index.d.ts +12 -0
  92. package/src/View/Components/ColumnSelector/index.js +30 -6
  93. package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicatesEditor.js +2 -2
  94. package/src/View/Components/ModuleValueSelector/index.js +2 -1
  95. package/src/View/Components/NewScopeComponent.js +4 -9
  96. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +5 -4
  97. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +4 -4
  98. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +1 -1
  99. package/src/View/Components/Popups/AdaptablePopup/Navigation.d.ts +3 -2
  100. package/src/View/Components/Popups/AdaptablePopup/Navigation.js +38 -28
  101. package/src/View/Components/Popups/AdaptablePopup/PopupPanel.js +3 -3
  102. package/src/View/Components/Popups/AdaptablePopup/TopBar.js +2 -2
  103. package/src/View/Components/Popups/AdaptablePopup/settingsPanelNavigationTypes.d.ts +11 -0
  104. package/src/View/Components/Popups/AdaptablePopup/settingsPanelNavigationTypes.js +1 -0
  105. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.d.ts +3 -1
  106. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +25 -27
  107. package/src/View/Components/PredicateEditor/PredicateEditor.js +1 -1
  108. package/src/View/Components/RangesComponent.d.ts +2 -4
  109. package/src/View/Components/RangesComponent.js +95 -66
  110. package/src/View/Components/ReorderDraggable/index.js +2 -2
  111. package/src/View/Components/Selectors/BulkUpdateValueSelector.d.ts +0 -2
  112. package/src/View/Components/Selectors/BulkUpdateValueSelector.js +3 -3
  113. package/src/View/Components/StyleComponent.js +32 -65
  114. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +10 -7
  115. package/src/View/Components/ToolPanel/ToolPanelPopup.d.ts +3 -13
  116. package/src/View/Components/ToolPanel/ToolPanelPopup.js +5 -81
  117. package/src/View/Components/ToolPanel/ToolPanelPopupSections.d.ts +17 -0
  118. package/src/View/Components/ToolPanel/ToolPanelPopupSections.js +76 -0
  119. package/src/View/Components/ValueSelector/index.d.ts +29 -0
  120. package/src/View/Components/ValueSelector/index.js +113 -30
  121. package/src/View/Components/wizardColumnListStyles.d.ts +10 -0
  122. package/src/View/Components/wizardColumnListStyles.js +10 -0
  123. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.d.ts +2 -1
  124. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +5 -7
  125. package/src/View/CustomSort/Wizard/CustomSortWizard.js +2 -2
  126. package/src/View/Dashboard/DashboardPopup.d.ts +1 -11
  127. package/src/View/Dashboard/DashboardPopup.js +3 -67
  128. package/src/View/Dashboard/DashboardPopupSections.d.ts +20 -0
  129. package/src/View/Dashboard/DashboardPopupSections.js +68 -0
  130. package/src/View/Dashboard/PinnedToolbarsSelector.js +2 -2
  131. package/src/View/DataChangeHistory/DataChangeHistoryPopup.d.ts +1 -6
  132. package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +8 -20
  133. package/src/View/DataChangeHistory/DataChangeHistoryTable.d.ts +8 -0
  134. package/src/View/DataChangeHistory/DataChangeHistoryTable.js +94 -0
  135. package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +5 -3
  136. package/src/View/DataChangeHistory/buildActionColumnButton.js +30 -39
  137. package/src/View/DataChangeHistory/dataChangeHistoryHelpers.d.ts +15 -0
  138. package/src/View/DataChangeHistory/dataChangeHistoryHelpers.js +37 -0
  139. package/src/View/DataImport/DataImportWizard/DataImportWizard.js +1 -1
  140. package/src/View/DataImport/DataImportWizard/sections/ColumnsSection.js +32 -19
  141. package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +1 -1
  142. package/src/View/DataSet/DataSetViewPanel.d.ts +2 -2
  143. package/src/View/Export/ExportDestinationPicker.js +3 -3
  144. package/src/View/Export/ExportViewPanel.js +2 -2
  145. package/src/View/Export/Wizard/ReportColumnsWizardSection.d.ts +2 -1
  146. package/src/View/Export/Wizard/ReportColumnsWizardSection.js +4 -9
  147. package/src/View/Export/Wizard/ReportRowsWizardSection.d.ts +2 -1
  148. package/src/View/Export/Wizard/ReportRowsWizardSection.js +3 -6
  149. package/src/View/FlashingCell/FlashingCellStyle.d.ts +4 -2
  150. package/src/View/FlashingCell/FlashingCellStyle.js +4 -2
  151. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.d.ts +2 -1
  152. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +7 -11
  153. package/src/View/FlashingCell/Wizard/FlashingCellScopeSummary.d.ts +9 -0
  154. package/src/View/FlashingCell/Wizard/FlashingCellScopeSummary.js +5 -0
  155. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.d.ts +1 -1
  156. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +1 -0
  157. package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.d.ts +0 -5
  158. package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.js +1 -5
  159. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +2 -3
  160. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +1 -1
  161. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +99 -42
  162. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +0 -1
  163. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +0 -4
  164. package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +56 -15
  165. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +1 -1
  166. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +2 -3
  167. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +5 -8
  168. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +8 -13
  169. package/src/View/FreeTextColumn/Utilities/getFreeTextColumnSettingsTags.js +3 -2
  170. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +1 -2
  171. package/src/View/GridFilter/GridFilterPopupUI/index.js +3 -2
  172. package/src/View/GridFilter/GridFilterViewPanel.js +5 -5
  173. package/src/View/GridInfo/GridInfoPopup/AdaptableObjectsSummary.js +2 -2
  174. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +2 -2
  175. package/src/View/Layout/LayoutViewPanel.js +1 -1
  176. package/src/View/Layout/Wizard/LayoutWizard.js +24 -28
  177. package/src/View/Layout/Wizard/sections/AggregationsSection.d.ts +13 -1
  178. package/src/View/Layout/Wizard/sections/AggregationsSection.js +73 -33
  179. package/src/View/Layout/Wizard/sections/ColumnsSection.d.ts +4 -1
  180. package/src/View/Layout/Wizard/sections/ColumnsSection.js +155 -276
  181. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.d.ts +4 -1
  182. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +148 -145
  183. package/src/View/Layout/Wizard/sections/PivotColumnsSection.d.ts +5 -2
  184. package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +24 -12
  185. package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.d.ts +4 -1
  186. package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.js +23 -12
  187. package/src/View/Layout/Wizard/sections/RowGroupingSection.d.ts +5 -2
  188. package/src/View/Layout/Wizard/sections/RowGroupingSection.js +19 -12
  189. package/src/View/Layout/Wizard/sections/RowSelectionSection.js +8 -4
  190. package/src/View/Layout/Wizard/sections/RowSummarySection.js +11 -11
  191. package/src/View/Layout/Wizard/sections/SortSection.d.ts +12 -2
  192. package/src/View/Layout/Wizard/sections/SortSection.js +41 -17
  193. package/src/View/Layout/Wizard/sections/columnLayoutCards.d.ts +20 -0
  194. package/src/View/Layout/Wizard/sections/columnLayoutCards.js +159 -0
  195. package/src/View/Layout/Wizard/sections/columnLayoutHelpers.d.ts +30 -0
  196. package/src/View/Layout/Wizard/sections/columnLayoutHelpers.js +201 -0
  197. package/src/View/Layout/Wizard/sections/layoutWizardAccordionHelpers.d.ts +8 -0
  198. package/src/View/Layout/Wizard/sections/layoutWizardAccordionHelpers.js +63 -0
  199. package/src/View/Layout/Wizard/sections/layoutWizardColumns.d.ts +11 -0
  200. package/src/View/Layout/Wizard/sections/layoutWizardColumns.js +52 -0
  201. package/src/View/License/LicenseWatermark.js +1 -1
  202. package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.d.ts +1 -1
  203. package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +1 -2
  204. package/src/View/Note/NoteEditor.js +2 -2
  205. package/src/View/QuickSearch/QuickSearchPopup.js +2 -3
  206. package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +1 -1
  207. package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +1 -1
  208. package/src/View/SmartEdit/SmartEditPopup.js +2 -2
  209. package/src/View/SmartEdit/SmartEditViewPanel.js +2 -2
  210. package/src/View/StateManagement/StateManagementPopup.js +1 -1
  211. package/src/View/StateManagement/components/ExportDropdown.d.ts +2 -2
  212. package/src/View/StateManagement/components/ExportDropdown.js +12 -12
  213. package/src/View/StatusBar/StatusBarPanel.js +2 -2
  214. package/src/View/StatusBar/StatusBarPopup.js +33 -5
  215. package/src/View/StatusBar/statusBarPanelHelpers.d.ts +2 -0
  216. package/src/View/StatusBar/statusBarPanelHelpers.js +7 -0
  217. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +2 -0
  218. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +14 -11
  219. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.d.ts +2 -2
  220. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +137 -119
  221. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.js +8 -14
  222. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +2 -1
  223. package/src/View/StyledColumn/Wizard/StyledColumnTypeThumbnail.d.ts +5 -0
  224. package/src/View/StyledColumn/Wizard/StyledColumnTypeThumbnail.js +50 -0
  225. package/src/View/StyledColumn/Wizard/StyledColumnWizard.d.ts +2 -0
  226. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +26 -5
  227. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +8 -17
  228. package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +2 -1
  229. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +46 -28
  230. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +98 -43
  231. package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +2 -1
  232. package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.d.ts +1 -1
  233. package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.js +32 -46
  234. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +11 -6
  235. package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +94 -7
  236. package/src/View/UIHelper.d.ts +0 -2
  237. package/src/View/UIHelper.js +8 -23
  238. package/src/View/Wizard/CollapsibleWizardCard.d.ts +68 -0
  239. package/src/View/Wizard/CollapsibleWizardCard.js +81 -0
  240. package/src/View/Wizard/OnePageWizards.js +6 -6
  241. package/src/View/Wizard/SummaryColorTag.d.ts +24 -0
  242. package/src/View/Wizard/SummaryColorTag.js +67 -0
  243. package/src/View/Wizard/WizardTypeSelection.d.ts +34 -0
  244. package/src/View/Wizard/WizardTypeSelection.js +31 -0
  245. package/src/View/Wizard/rowGroupSummaryTags.d.ts +18 -0
  246. package/src/View/Wizard/rowGroupSummaryTags.js +14 -0
  247. package/src/View/Wizard/scopeSummaryTags.d.ts +6 -0
  248. package/src/View/Wizard/scopeSummaryTags.js +33 -0
  249. package/src/agGrid/AdaptableAgGrid.js +1 -1
  250. package/src/agGrid/AgGridAdapter.js +0 -5
  251. package/src/agGrid/AgGridColumnAdapter.js +2 -2
  252. package/src/agGrid/cellRenderers/ActionColumnRenderer.js +4 -7
  253. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +1 -1
  254. package/src/components/Card/index.js +5 -6
  255. package/src/components/CheckBox/index.js +2 -3
  256. package/src/components/CodeBlock/index.js +2 -2
  257. package/src/components/ColorPicker/ColorPicker.d.ts +1 -0
  258. package/src/components/ColorPicker/ColorPicker.js +8 -6
  259. package/src/components/ColorPicker/OptionalColorPicker.d.ts +12 -0
  260. package/src/components/ColorPicker/OptionalColorPicker.js +26 -0
  261. package/src/components/ColorPicker/index.d.ts +1 -0
  262. package/src/components/ColorPicker/index.js +1 -0
  263. package/src/components/Combobox/comboboxUtils.d.ts +1 -0
  264. package/src/components/Combobox/index.js +19 -18
  265. package/src/components/Dashboard/DashboardManager.js +2 -4
  266. package/src/components/Dialog/index.js +4 -4
  267. package/src/components/DragAndDropContext/DragAndDropContext.d.ts +5 -0
  268. package/src/components/DragAndDropContext/DragAndDropContext.js +3 -0
  269. package/src/components/DragAndDropContext/ModuleManager.d.ts +15 -3
  270. package/src/components/DragAndDropContext/ModuleManager.js +47 -8
  271. package/src/components/DragAndDropContext/TabList.d.ts +11 -4
  272. package/src/components/DragAndDropContext/TabList.js +52 -38
  273. package/src/components/DragAndDropContext/UnusedPanel.d.ts +4 -3
  274. package/src/components/DragAndDropContext/UnusedPanel.js +15 -11
  275. package/src/components/DragAndDropContext/dragScope.d.ts +6 -0
  276. package/src/components/DragAndDropContext/dragScope.js +26 -0
  277. package/src/components/DragAndDropContext/types.d.ts +7 -0
  278. package/src/components/DropdownButton/index.d.ts +33 -25
  279. package/src/components/DropdownButton/index.js +24 -158
  280. package/src/components/EmptyContent/index.js +2 -2
  281. package/src/components/ErrorBox/index.js +2 -2
  282. package/src/components/ExpressionEditor/BaseEditorInput.js +3 -3
  283. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +3 -3
  284. package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +6 -6
  285. package/src/components/FieldWrap/index.js +2 -2
  286. package/src/components/Flex.js +2 -2
  287. package/src/components/FormLayout/index.d.ts +1 -1
  288. package/src/components/HelpBlock/index.js +3 -3
  289. package/src/components/IconSelector/IconSelector.d.ts +8 -0
  290. package/src/components/IconSelector/IconSelector.js +11 -7
  291. package/src/components/IconSelector/index.d.ts +1 -0
  292. package/src/components/IconSelector/index.js +1 -0
  293. package/src/components/Modal/index.js +2 -2
  294. package/src/components/NewSelect/index.js +11 -1
  295. package/src/components/Panel/index.js +7 -7
  296. package/src/components/Radio/index.d.ts +1 -1
  297. package/src/components/Radio/index.js +8 -6
  298. package/src/components/SimpleButton/index.js +7 -7
  299. package/src/components/StylePreview.js +2 -2
  300. package/src/components/Tabs/index.js +4 -4
  301. package/src/components/Tag/Tag.d.ts +16 -0
  302. package/src/components/Tag/Tag.js +14 -4
  303. package/src/components/Tag/columnScopeTagHelpers.d.ts +8 -0
  304. package/src/components/Tag/columnScopeTagHelpers.js +6 -0
  305. package/src/components/Tag/index.d.ts +1 -1
  306. package/src/components/Tag/index.js +1 -1
  307. package/src/components/Textarea/index.js +2 -3
  308. package/src/components/Toggle/Toggle.d.ts +2 -0
  309. package/src/components/Toggle/Toggle.js +14 -7
  310. package/src/components/Toggle/ToggleGroup.js +2 -2
  311. package/src/components/ToggleButton/index.js +4 -4
  312. package/src/components/Tree/TreeDropdown/index.js +3 -4
  313. package/src/components/WarningBox/index.js +2 -2
  314. package/src/components/icons/sort-asc.js +1 -1
  315. package/src/components/ui/button.d.ts +2 -2
  316. package/src/components/ui/combobox.d.ts +3 -1
  317. package/src/components/ui/combobox.js +2 -2
  318. package/src/components/ui/input-group.d.ts +1 -1
  319. package/src/components/ui/select.js +3 -2
  320. package/src/components/ui/textarea.js +1 -1
  321. package/src/env.js +2 -2
  322. package/src/layout-manager/src/index.js +7 -3
  323. package/src/metamodel/adaptable.metamodel.js +1 -1
  324. package/src/types.d.ts +1 -1
  325. package/tsconfig.esm.tsbuildinfo +1 -1
  326. package/src/View/DataChangeHistory/DataChangeHistoryGrid.d.ts +0 -17
  327. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +0 -290
  328. package/src/components/DropdownButton/DropdownButtonItem.d.ts +0 -12
  329. package/src/components/DropdownButton/DropdownButtonItem.js +0 -1
  330. package/src/components/DropdownButton/renderItem.d.ts +0 -14
  331. package/src/components/DropdownButton/renderItem.js +0 -11
  332. package/src/components/DropdownButton/useExpanded.d.ts +0 -24
  333. package/src/components/DropdownButton/useExpanded.js +0 -56
  334. package/src/components/NewDropdownButton/index.d.ts +0 -27
  335. package/src/components/NewDropdownButton/index.js +0 -24
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ColumnTag, Tag } from '../../components/Tag';
3
+ import { Flex } from '../../components/Flex';
4
+ import { getRowGroupBehaviorLabel, getRowGroupDisplayTypeLabel, } from '../../Strategy/Utilities/Layout/rowGroupSummaryHelpers';
5
+ export const TableRowGroupSummaryTags = ({ layout, api, }) => {
6
+ const columnIds = layout.RowGroupedColumns ?? [];
7
+ return (_jsxs(Flex, { flexWrap: "wrap", alignItems: "center", className: "twa:gap-1", children: [!columnIds.length ? (_jsx(Tag, { children: "No Row Grouped Columns" })) : (columnIds.map((columnId) => (_jsx(ColumnTag, { children: api.columnApi.getFriendlyNameForColumnId(columnId) }, columnId)))), _jsxs(Tag, { children: ["Display Type: ", getRowGroupDisplayTypeLabel(layout)] }), _jsxs(Tag, { children: ["Behaviour: ", getRowGroupBehaviorLabel(layout)] })] }));
8
+ };
9
+ export const PivotRowGroupSummaryTags = ({ layout, api, }) => {
10
+ const columnIds = layout.PivotGroupedColumns ?? [];
11
+ return (_jsxs(Flex, { flexWrap: "wrap", alignItems: "center", className: "twa:gap-1", children: [!columnIds.length ? (_jsx(Tag, { children: "No Row Grouped Columns" })) : (columnIds.map((columnId) => (_jsx(ColumnTag, { children: api.columnApi.getFriendlyNameForColumnId(columnId) }, columnId)))), _jsxs(Tag, { children: ["Behaviour: ", getRowGroupBehaviorLabel(layout)] })] }));
12
+ };
13
+ export const TableRowGroupSummaryView = (props) => _jsx(TableRowGroupSummaryTags, { ...props });
14
+ export const PivotRowGroupSummaryView = (props) => _jsx(PivotRowGroupSummaryTags, { ...props });
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ import { ColumnScope } from '../../AdaptableState/Common/ColumnScope';
3
+ export { getScopeViewItemsTagVariant as getScopeSummaryTagVariant } from '../../components/Tag/columnScopeTagHelpers';
4
+ export declare const ScopeSummaryTags: React.FC<{
5
+ scope: ColumnScope;
6
+ }>;
@@ -0,0 +1,33 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { getColumnTypeFriendlyName } from '../../AdaptableState/Common/AdaptableColumn';
3
+ import { Tag, TagList } from '../../components/Tag';
4
+ import { Flex } from '../../components/Flex';
5
+ import { useAdaptable } from '../AdaptableContext';
6
+ export { getScopeViewItemsTagVariant as getScopeSummaryTagVariant } from '../../components/Tag/columnScopeTagHelpers';
7
+ export const ScopeSummaryTags = ({ scope }) => {
8
+ const { api } = useAdaptable();
9
+ const scopeApi = api.columnScopeApi;
10
+ const columnsInScope = scopeApi.getColumnsInScope(scope);
11
+ if (scopeApi.scopeIsAll(scope)) {
12
+ return _jsx(Tag, { children: "All Columns" });
13
+ }
14
+ if ('ColumnIds' in scope) {
15
+ if (!columnsInScope.length) {
16
+ return _jsx(Tag, { children: "None" });
17
+ }
18
+ return (_jsx(TagList, { tags: columnsInScope.map((c) => c.friendlyName), variant: "column" }));
19
+ }
20
+ if ('DataTypes' in scope) {
21
+ if (!scope.DataTypes.length) {
22
+ return _jsx(Tag, { children: "None" });
23
+ }
24
+ return (_jsx(Flex, { flexWrap: "wrap", className: "twa:gap-1", children: scope.DataTypes.map((dataType) => (_jsx(Tag, { children: getColumnTypeFriendlyName(dataType) }, dataType))) }));
25
+ }
26
+ if ('ColumnTypes' in scope) {
27
+ if (!scope.ColumnTypes.length) {
28
+ return _jsx(Tag, { children: "None" });
29
+ }
30
+ return (_jsx(Flex, { flexWrap: "wrap", className: "twa:gap-1", children: scope.ColumnTypes.map((columnType) => (_jsx(Tag, { children: columnType }, columnType))) }));
31
+ }
32
+ return _jsx(Tag, { children: "None" });
33
+ };
@@ -1438,7 +1438,7 @@ export class AdaptableAgGrid {
1438
1438
  // dataType: 'Number',
1439
1439
  // AG Grid requires either dataType or numberFormat to be set for Numbers
1440
1440
  numberFormat: {
1441
- format: '0.###############',
1441
+ format: `#,##0.00`,
1442
1442
  },
1443
1443
  });
1444
1444
  // store original excel styles, we will have to revert to them after each VISUAL EXPORT
@@ -586,11 +586,6 @@ export class AgGridAdapter {
586
586
  return 'unknown';
587
587
  }
588
588
  let dataType = 'unknown';
589
- // get the column type if already in store (and not unknown)
590
- const existingColumn = this.adaptableApi.columnApi.getColumnWithColumnId(agColumn.getId(), logWarning);
591
- if (existingColumn && existingColumn.dataType !== 'unknown') {
592
- return existingColumn.dataType;
593
- }
594
589
  // check for colDef dataType
595
590
  const colDefDataType = agColumn.getColDef().cellDataType;
596
591
  if (typeof colDefDataType === 'string' && ALL_ADAPTABLE_DATA_TYPES.includes(colDefDataType)) {
@@ -2,7 +2,7 @@ import kebabCase from '../Utilities/utils/kebabCase';
2
2
  import { resolveDisplayFormat } from '../AdaptableState/Common/AdaptableFormatPresets';
3
3
  import merge from '../Utilities/utils/merge';
4
4
  import { resolveSparklineOptionsForRender } from '../Utilities/Helpers/SparklineOptionsHelper';
5
- import { convertAdaptableStyleToCSS, getVariableColor, hasCellBoxStyle, hasCellFontStyle, normalizeStyleForAgGrid, } from '../Utilities/Helpers/StyleHelper';
5
+ import { convertAdaptableStyleToCSS, getAutoContrastTextColor, getVariableColor, hasCellBoxStyle, hasCellFontStyle, normalizeStyleForAgGrid, } from '../Utilities/Helpers/StyleHelper';
6
6
  import StringExtensions from '../Utilities/Extensions/StringExtensions';
7
7
  import { ACTION_COLUMN_TYPE, CALCULATED_COLUMN_TYPE, FDC3_COLUMN_TYPE, FREE_TEXT_COLUMN_TYPE, } from '../AdaptableState/Common/AdaptableColumn';
8
8
  import tinycolor from 'tinycolor2';
@@ -1441,7 +1441,7 @@ export class AgGridColumnAdapter {
1441
1441
  const bg = tinycolor(preparedColor).setAlpha(alpha);
1442
1442
  style.backgroundColor = bg.toRgbString();
1443
1443
  if (gradientStyle.AutoContrastText) {
1444
- style.color = bg.getLuminance() > 0.45 ? '#111111' : '#ffffff';
1444
+ style.color = getAutoContrastTextColor(preparedColor, alpha);
1445
1445
  }
1446
1446
  }
1447
1447
  }
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
- import DropdownButton from '../../components/DropdownButton';
2
+ import { NewDropdownButton } from '../../components/DropdownButton';
3
3
  import * as React from 'react';
4
4
  import { IconComponent } from '../../components/Icon';
5
5
  import { ADAPTABLE_BUTTON_SURFACE_DEFAULTS, AdaptableButtonView, } from '../../View/Components/AdaptableButton';
@@ -13,10 +13,7 @@ function getActionColumnButtonProps(button, index, adaptableApi, context, rerend
13
13
  }
14
14
  const buttonLabel = adaptableApi.internalApi.getLabelForButton(button, context);
15
15
  const buttonTooltip = adaptableApi.internalApi.getTooltipForButton(button, context);
16
- const identifier = button.label ??
17
- button.icon?.name ??
18
- button.tooltip ??
19
- `${index + 1}`;
16
+ const identifier = button.label ?? button.icon?.name ?? button.tooltip ?? `${index + 1}`;
20
17
  return {
21
18
  button,
22
19
  buttonLabel,
@@ -52,7 +49,7 @@ const ActionColumnDropdown = (props) => {
52
49
  });
53
50
  return {
54
51
  label: buttonLabel || buttonTooltip,
55
- icon: menuIcon ? (_jsx(IconComponent, { icon: menuIcon })) : undefined,
52
+ icon: menuIcon ? _jsx(IconComponent, { icon: menuIcon }) : undefined,
56
53
  disabled,
57
54
  onClick: () => {
58
55
  actionButton.onClick?.(actionButton, context);
@@ -64,7 +61,7 @@ const ActionColumnDropdown = (props) => {
64
61
  if (!items.length) {
65
62
  return null;
66
63
  }
67
- return (_jsx(DropdownButton, { "data-name": "action-column-dropdown", variant: "outlined", tone: "neutral", items: items, collapseOnItemClick: true, listMinWidth: 140, showToggleIcon: true, accessLevel: ACCESS_LEVEL_FULL, children: dropdownLabel }));
64
+ return (_jsx(NewDropdownButton, { "data-name": "action-column-dropdown", variant: "outlined", tone: "neutral", items: items, accessLevel: ACCESS_LEVEL_FULL, children: dropdownLabel }));
68
65
  };
69
66
  const ActionColumnCellContent = (props) => {
70
67
  const { buttons, actionColumn, adaptableApi, context, rerender } = props;
@@ -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>;