@adaptabletools/adaptable-cjs 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 +1 -1
  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 +11 -28
  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 +17 -1
  28. package/src/Strategy/Utilities/Export/getExportRowsViewItems.d.ts +1 -0
  29. package/src/Strategy/Utilities/Export/getExportRowsViewItems.js +5 -1
  30. package/src/Strategy/Utilities/Layout/aggregationSummaryHelpers.d.ts +11 -0
  31. package/src/Strategy/Utilities/Layout/aggregationSummaryHelpers.js +111 -0
  32. package/src/Strategy/Utilities/Layout/columnsSummaryHelpers.d.ts +48 -0
  33. package/src/Strategy/Utilities/Layout/columnsSummaryHelpers.js +177 -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 +97 -0
  38. package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +3 -5
  39. package/src/Utilities/Defaults/DefaultSettingsPanel.js +48 -42
  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 +30 -1
  44. package/src/Utilities/Helpers/StyledColumnGradientHelper.js +6 -4
  45. package/src/Utilities/Helpers/resolveSettingsPanelNavigation.d.ts +3 -0
  46. package/src/Utilities/Helpers/resolveSettingsPanelNavigation.js +19 -0
  47. package/src/Utilities/getScopeViewItems.js +2 -0
  48. package/src/Utilities/wizardSelection.d.ts +10 -0
  49. package/src/Utilities/wizardSelection.js +22 -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 +1 -6
  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 +30 -7
  66. package/src/View/Alert/Wizard/AlertWizard.js +3 -3
  67. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.d.ts +2 -1
  68. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +3 -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 +29 -3
  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 -3
  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 +1 -2
  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 +3 -8
  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 +2 -2
  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 -4
  102. package/src/View/Components/Popups/AdaptablePopup/TopBar.js +2 -3
  103. package/src/View/Components/Popups/AdaptablePopup/settingsPanelNavigationTypes.d.ts +11 -0
  104. package/src/View/Components/Popups/AdaptablePopup/settingsPanelNavigationTypes.js +5 -0
  105. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.d.ts +3 -1
  106. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +27 -28
  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 -3
  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 +30 -63
  114. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +9 -6
  115. package/src/View/Components/ToolPanel/ToolPanelPopup.d.ts +3 -13
  116. package/src/View/Components/ToolPanel/ToolPanelPopup.js +5 -80
  117. package/src/View/Components/ToolPanel/ToolPanelPopupSections.d.ts +17 -0
  118. package/src/View/Components/ToolPanel/ToolPanelPopupSections.js +81 -0
  119. package/src/View/Components/ValueSelector/index.d.ts +29 -0
  120. package/src/View/Components/ValueSelector/index.js +112 -29
  121. package/src/View/Components/wizardColumnListStyles.d.ts +10 -0
  122. package/src/View/Components/wizardColumnListStyles.js +13 -0
  123. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.d.ts +2 -1
  124. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +4 -6
  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 +73 -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 +99 -0
  135. package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +5 -3
  136. package/src/View/DataChangeHistory/buildActionColumnButton.js +33 -41
  137. package/src/View/DataChangeHistory/dataChangeHistoryHelpers.d.ts +15 -0
  138. package/src/View/DataChangeHistory/dataChangeHistoryHelpers.js +46 -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 +4 -5
  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 +2 -7
  147. package/src/View/Export/Wizard/ReportRowsWizardSection.d.ts +2 -1
  148. package/src/View/Export/Wizard/ReportRowsWizardSection.js +2 -5
  149. package/src/View/FlashingCell/FlashingCellStyle.d.ts +4 -2
  150. package/src/View/FlashingCell/FlashingCellStyle.js +5 -3
  151. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.d.ts +2 -1
  152. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +5 -9
  153. package/src/View/FlashingCell/Wizard/FlashingCellScopeSummary.d.ts +9 -0
  154. package/src/View/FlashingCell/Wizard/FlashingCellScopeSummary.js +10 -0
  155. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.d.ts +1 -1
  156. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +5 -1
  157. package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.d.ts +0 -5
  158. package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.js +3 -8
  159. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +1 -2
  160. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +1 -1
  161. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +101 -44
  162. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +0 -1
  163. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +1 -6
  164. package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +55 -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 -9
  168. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +4 -9
  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 -3
  174. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +2 -2
  175. package/src/View/Layout/LayoutViewPanel.js +2 -2
  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 +77 -33
  179. package/src/View/Layout/Wizard/sections/ColumnsSection.d.ts +4 -1
  180. package/src/View/Layout/Wizard/sections/ColumnsSection.js +154 -275
  181. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.d.ts +4 -1
  182. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +146 -143
  183. package/src/View/Layout/Wizard/sections/PivotColumnsSection.d.ts +5 -2
  184. package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +22 -10
  185. package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.d.ts +4 -1
  186. package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.js +21 -10
  187. package/src/View/Layout/Wizard/sections/RowGroupingSection.d.ts +5 -2
  188. package/src/View/Layout/Wizard/sections/RowGroupingSection.js +23 -12
  189. package/src/View/Layout/Wizard/sections/RowSelectionSection.js +7 -3
  190. package/src/View/Layout/Wizard/sections/RowSummarySection.js +10 -10
  191. package/src/View/Layout/Wizard/sections/SortSection.d.ts +12 -2
  192. package/src/View/Layout/Wizard/sections/SortSection.js +43 -18
  193. package/src/View/Layout/Wizard/sections/columnLayoutCards.d.ts +20 -0
  194. package/src/View/Layout/Wizard/sections/columnLayoutCards.js +167 -0
  195. package/src/View/Layout/Wizard/sections/columnLayoutHelpers.d.ts +30 -0
  196. package/src/View/Layout/Wizard/sections/columnLayoutHelpers.js +216 -0
  197. package/src/View/Layout/Wizard/sections/layoutWizardAccordionHelpers.d.ts +8 -0
  198. package/src/View/Layout/Wizard/sections/layoutWizardAccordionHelpers.js +72 -0
  199. package/src/View/Layout/Wizard/sections/layoutWizardColumns.d.ts +11 -0
  200. package/src/View/Layout/Wizard/sections/layoutWizardColumns.js +57 -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 -13
  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 +11 -0
  217. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +2 -0
  218. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +13 -10
  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 +7 -13
  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 +54 -0
  225. package/src/View/StyledColumn/Wizard/StyledColumnWizard.d.ts +2 -0
  226. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +28 -6
  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 +97 -42
  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 +31 -45
  234. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +10 -5
  235. package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +93 -6
  236. package/src/View/UIHelper.d.ts +0 -2
  237. package/src/View/UIHelper.js +8 -24
  238. package/src/View/Wizard/CollapsibleWizardCard.d.ts +68 -0
  239. package/src/View/Wizard/CollapsibleWizardCard.js +90 -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 +79 -0
  243. package/src/View/Wizard/WizardTypeSelection.d.ts +34 -0
  244. package/src/View/Wizard/WizardTypeSelection.js +40 -0
  245. package/src/View/Wizard/rowGroupSummaryTags.d.ts +18 -0
  246. package/src/View/Wizard/rowGroupSummaryTags.js +21 -0
  247. package/src/View/Wizard/scopeSummaryTags.d.ts +6 -0
  248. package/src/View/Wizard/scopeSummaryTags.js +38 -0
  249. package/src/agGrid/AdaptableAgGrid.js +1 -1
  250. package/src/agGrid/AgGridAdapter.js +0 -5
  251. package/src/agGrid/AgGridColumnAdapter.js +1 -1
  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 -7
  255. package/src/components/CheckBox/index.js +2 -3
  256. package/src/components/CodeBlock/index.js +2 -3
  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 +31 -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 +4 -1
  269. package/src/components/DragAndDropContext/ModuleManager.d.ts +15 -3
  270. package/src/components/DragAndDropContext/ModuleManager.js +43 -4
  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 +13 -9
  275. package/src/components/DragAndDropContext/dragScope.d.ts +6 -0
  276. package/src/components/DragAndDropContext/dragScope.js +34 -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 -3
  281. package/src/components/ErrorBox/index.js +2 -3
  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 +9 -9
  285. package/src/components/FieldWrap/index.js +2 -3
  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 -4
  289. package/src/components/IconSelector/IconSelector.d.ts +8 -0
  290. package/src/components/IconSelector/IconSelector.js +13 -8
  291. package/src/components/IconSelector/index.d.ts +1 -0
  292. package/src/components/IconSelector/index.js +3 -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 -3
  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 +16 -5
  303. package/src/components/Tag/columnScopeTagHelpers.d.ts +8 -0
  304. package/src/components/Tag/columnScopeTagHelpers.js +12 -0
  305. package/src/components/Tag/index.d.ts +1 -1
  306. package/src/components/Tag/index.js +3 -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 -5
  312. package/src/components/Tree/TreeDropdown/index.js +3 -5
  313. package/src/components/WarningBox/index.js +2 -3
  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.cjs.tsbuildinfo +1 -1
  326. package/src/View/DataChangeHistory/DataChangeHistoryGrid.d.ts +0 -17
  327. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +0 -295
  328. package/src/components/DropdownButton/DropdownButtonItem.d.ts +0 -12
  329. package/src/components/DropdownButton/DropdownButtonItem.js +0 -2
  330. package/src/components/DropdownButton/renderItem.d.ts +0 -14
  331. package/src/components/DropdownButton/renderItem.js +0 -14
  332. package/src/components/DropdownButton/useExpanded.d.ts +0 -24
  333. package/src/components/DropdownButton/useExpanded.js +0 -59
  334. package/src/components/NewDropdownButton/index.d.ts +0 -27
  335. package/src/components/NewDropdownButton/index.js +0 -28
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WizardTypeSelectionPreviewFrame = exports.WizardNameFieldSection = exports.WizardTypeSelectionSection = exports.WizardTypeSelectionCard = exports.getWizardTypeSelectionGridColumns = exports.WIZARD_TYPE_SELECTION_PREVIEW_FRAME_CLASS = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ const Input_1 = tslib_1.__importDefault(require("../../components/Input"));
7
+ const Flex_1 = require("../../components/Flex");
8
+ const Card_1 = require("../../components/Card");
9
+ const utils_1 = require("../../lib/utils");
10
+ exports.WIZARD_TYPE_SELECTION_PREVIEW_FRAME_CLASS = 'twa:flex twa:w-full twa:min-h-[32px] twa:items-center twa:justify-center twa:overflow-hidden twa:rounded-standard twa:border twa:border-[color-mix(in_srgb,var(--ab-color-foreground)_15%,transparent)] twa:bg-[color-mix(in_srgb,var(--ab-color-primary)_35%,transparent)] twa:px-2 twa:py-1';
11
+ const getWizardTypeSelectionGridColumns = (choiceCount) => choiceCount === 4 ? 2 : 3;
12
+ exports.getWizardTypeSelectionGridColumns = getWizardTypeSelectionGridColumns;
13
+ const WizardTypeSelectionCard = ({ label, description, selected, disabled, disabledTooltip, dataName, minHeightClassName = 'twa:min-h-[108px]', onSelect, children, footer, }) => {
14
+ const handleActivate = () => {
15
+ if (!disabled) {
16
+ onSelect();
17
+ }
18
+ };
19
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { role: "radio", tabIndex: disabled ? -1 : 0, "aria-checked": selected, "aria-disabled": disabled, "data-name": dataName, className: (0, utils_1.cn)('ab-WizardTypeSelectionCard group twa:relative twa:h-full twa:rounded-standard twa:border twa:border-primarydark/32 twa:bg-card twa:text-card-foreground twa:outline-none twa:transition-colors twa:focus-visible:ring-2 twa:focus-visible:ring-accent', minHeightClassName, disabled
20
+ ? 'twa:cursor-not-allowed twa:opacity-60'
21
+ : 'twa:cursor-pointer hover:twa:border-accent/55 hover:twa:bg-accent/5', selected &&
22
+ 'twa:after:pointer-events-none twa:after:absolute twa:after:inset-0 twa:after:rounded-standard twa:after:border-2 twa:after:border-[var(--ab-cmp-wizard-type-selection-card__selected-border)] twa:after:bg-[var(--ab-cmp-wizard-type-selection-card__selected-overlay)]'), onClick: handleActivate, onKeyDown: (event) => {
23
+ if (disabled) {
24
+ return;
25
+ }
26
+ if (event.key === 'Enter' || event.key === ' ') {
27
+ event.preventDefault();
28
+ onSelect();
29
+ }
30
+ }, children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { "aria-hidden": true, className: (0, utils_1.cn)('twa:pointer-events-none twa:absolute twa:top-2.5 twa:right-2.5 twa:z-10 twa:size-4 twa:rounded-full twa:border-2 twa:transition-colors', selected
31
+ ? 'twa:border-[var(--ab-cmp-wizard-type-selection-card__selected-border)] twa:bg-[var(--ab-cmp-wizard-type-selection-card__selected-border)]'
32
+ : 'twa:border-primarydark/35 twa:bg-base group-hover:twa:border-accent/55'), children: selected ? ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:absolute twa:inset-0 twa:m-auto twa:size-1.5 twa:rounded-full twa:bg-[var(--ab-cmp-wizard-type-selection-card__selected-indicator-inner)]" })) : null }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, style: { backgroundColor: 'transparent' }, className: "twa:flex twa:h-full twa:flex-col twa:justify-between twa:p-3 twa:pr-7", gap: 0, children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: label }), children, description || disabledTooltip ? ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: [description ? ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:leading-snug twa:opacity-70", children: description })) : null, disabled && disabledTooltip ? ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:mt-1 twa:text-1 twa:leading-snug twa:italic twa:opacity-80", children: disabledTooltip })) : null] })) : null, footer] })] }));
33
+ };
34
+ exports.WizardTypeSelectionCard = WizardTypeSelectionCard;
35
+ const WizardTypeSelectionSection = ({ headingId, title, intro, columns, dataName, className, children }) => ((0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, gap: 1, className: (0, utils_1.cn)('twa:flex-1 twa:min-h-0', className), children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { gap: 1, border: false, className: "twa:flex-col twa:items-start twa:px-1 twa:pb-1", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { id: headingId, className: "twa:font-medium", children: title }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:mt-1.5 twa:text-xs twa:font-normal twa:opacity-70", children: intro })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:min-h-0 twa:overflow-y-auto twa:p-1 twa:pt-0", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { "data-name": dataName, className: (0, utils_1.cn)('twa:grid twa:gap-2', columns === 2 ? 'twa:grid-cols-2' : 'twa:grid-cols-3'), role: "radiogroup", "aria-labelledby": headingId, children: children }) })] }));
36
+ exports.WizardTypeSelectionSection = WizardTypeSelectionSection;
37
+ const WizardNameFieldSection = ({ value, onChange, inputDataName = 'wizard-name', placeholder = 'Enter Name', }) => ((0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, gap: 1, className: "twa:bg-card twa:text-card-foreground", children: [(0, jsx_runtime_1.jsx)(Card_1.Card.Title, { gap: 1, border: false, className: "twa:px-1 twa:pb-1", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Name" }) }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsx)(Input_1.default, { className: "twa:w-full twa:max-w-[420px]", "data-name": inputDataName, onChange: onChange, placeholder: placeholder, value: value }) })] }));
38
+ exports.WizardNameFieldSection = WizardNameFieldSection;
39
+ const WizardTypeSelectionPreviewFrame = ({ children, }) => ((0, jsx_runtime_1.jsx)(Flex_1.Box, { "aria-hidden": true, className: exports.WIZARD_TYPE_SELECTION_PREVIEW_FRAME_CLASS, children: children }));
40
+ exports.WizardTypeSelectionPreviewFrame = WizardTypeSelectionPreviewFrame;
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ import { AdaptableApi, Layout } from '../../types';
3
+ export declare const TableRowGroupSummaryTags: React.FC<{
4
+ layout: Layout;
5
+ api: AdaptableApi;
6
+ }>;
7
+ export declare const PivotRowGroupSummaryTags: React.FC<{
8
+ layout: Layout;
9
+ api: AdaptableApi;
10
+ }>;
11
+ export declare const TableRowGroupSummaryView: React.FC<{
12
+ layout: Layout;
13
+ api: AdaptableApi;
14
+ }>;
15
+ export declare const PivotRowGroupSummaryView: React.FC<{
16
+ layout: Layout;
17
+ api: AdaptableApi;
18
+ }>;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PivotRowGroupSummaryView = exports.TableRowGroupSummaryView = exports.PivotRowGroupSummaryTags = exports.TableRowGroupSummaryTags = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const Tag_1 = require("../../components/Tag");
6
+ const Flex_1 = require("../../components/Flex");
7
+ const rowGroupSummaryHelpers_1 = require("../../Strategy/Utilities/Layout/rowGroupSummaryHelpers");
8
+ const TableRowGroupSummaryTags = ({ layout, api, }) => {
9
+ const columnIds = layout.RowGroupedColumns ?? [];
10
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexWrap: "wrap", alignItems: "center", className: "twa:gap-1", children: [!columnIds.length ? ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Row Grouped Columns" })) : (columnIds.map((columnId) => ((0, jsx_runtime_1.jsx)(Tag_1.ColumnTag, { children: api.columnApi.getFriendlyNameForColumnId(columnId) }, columnId)))), (0, jsx_runtime_1.jsxs)(Tag_1.Tag, { children: ["Display Type: ", (0, rowGroupSummaryHelpers_1.getRowGroupDisplayTypeLabel)(layout)] }), (0, jsx_runtime_1.jsxs)(Tag_1.Tag, { children: ["Behaviour: ", (0, rowGroupSummaryHelpers_1.getRowGroupBehaviorLabel)(layout)] })] }));
11
+ };
12
+ exports.TableRowGroupSummaryTags = TableRowGroupSummaryTags;
13
+ const PivotRowGroupSummaryTags = ({ layout, api, }) => {
14
+ const columnIds = layout.PivotGroupedColumns ?? [];
15
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexWrap: "wrap", alignItems: "center", className: "twa:gap-1", children: [!columnIds.length ? ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Row Grouped Columns" })) : (columnIds.map((columnId) => ((0, jsx_runtime_1.jsx)(Tag_1.ColumnTag, { children: api.columnApi.getFriendlyNameForColumnId(columnId) }, columnId)))), (0, jsx_runtime_1.jsxs)(Tag_1.Tag, { children: ["Behaviour: ", (0, rowGroupSummaryHelpers_1.getRowGroupBehaviorLabel)(layout)] })] }));
16
+ };
17
+ exports.PivotRowGroupSummaryTags = PivotRowGroupSummaryTags;
18
+ const TableRowGroupSummaryView = (props) => (0, jsx_runtime_1.jsx)(exports.TableRowGroupSummaryTags, { ...props });
19
+ exports.TableRowGroupSummaryView = TableRowGroupSummaryView;
20
+ const PivotRowGroupSummaryView = (props) => (0, jsx_runtime_1.jsx)(exports.PivotRowGroupSummaryTags, { ...props });
21
+ exports.PivotRowGroupSummaryView = PivotRowGroupSummaryView;
@@ -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,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ScopeSummaryTags = exports.getScopeSummaryTagVariant = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const AdaptableColumn_1 = require("../../AdaptableState/Common/AdaptableColumn");
6
+ const Tag_1 = require("../../components/Tag");
7
+ const Flex_1 = require("../../components/Flex");
8
+ const AdaptableContext_1 = require("../AdaptableContext");
9
+ var columnScopeTagHelpers_1 = require("../../components/Tag/columnScopeTagHelpers");
10
+ Object.defineProperty(exports, "getScopeSummaryTagVariant", { enumerable: true, get: function () { return columnScopeTagHelpers_1.getScopeViewItemsTagVariant; } });
11
+ const ScopeSummaryTags = ({ scope }) => {
12
+ const { api } = (0, AdaptableContext_1.useAdaptable)();
13
+ const scopeApi = api.columnScopeApi;
14
+ const columnsInScope = scopeApi.getColumnsInScope(scope);
15
+ if (scopeApi.scopeIsAll(scope)) {
16
+ return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "All Columns" });
17
+ }
18
+ if ('ColumnIds' in scope) {
19
+ if (!columnsInScope.length) {
20
+ return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "None" });
21
+ }
22
+ return ((0, jsx_runtime_1.jsx)(Tag_1.TagList, { tags: columnsInScope.map((c) => c.friendlyName), variant: "column" }));
23
+ }
24
+ if ('DataTypes' in scope) {
25
+ if (!scope.DataTypes.length) {
26
+ return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "None" });
27
+ }
28
+ return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexWrap: "wrap", className: "twa:gap-1", children: scope.DataTypes.map((dataType) => ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: (0, AdaptableColumn_1.getColumnTypeFriendlyName)(dataType) }, dataType))) }));
29
+ }
30
+ if ('ColumnTypes' in scope) {
31
+ if (!scope.ColumnTypes.length) {
32
+ return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "None" });
33
+ }
34
+ return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexWrap: "wrap", className: "twa:gap-1", children: scope.ColumnTypes.map((columnType) => ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: columnType }, columnType))) }));
35
+ }
36
+ return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "None" });
37
+ };
38
+ exports.ScopeSummaryTags = ScopeSummaryTags;
@@ -1442,7 +1442,7 @@ class AdaptableAgGrid {
1442
1442
  // dataType: 'Number',
1443
1443
  // AG Grid requires either dataType or numberFormat to be set for Numbers
1444
1444
  numberFormat: {
1445
- format: '0.###############',
1445
+ format: `#,##0.00`,
1446
1446
  },
1447
1447
  });
1448
1448
  // store original excel styles, we will have to revert to them after each VISUAL EXPORT
@@ -590,11 +590,6 @@ class AgGridAdapter {
590
590
  return 'unknown';
591
591
  }
592
592
  let dataType = 'unknown';
593
- // get the column type if already in store (and not unknown)
594
- const existingColumn = this.adaptableApi.columnApi.getColumnWithColumnId(agColumn.getId(), logWarning);
595
- if (existingColumn && existingColumn.dataType !== 'unknown') {
596
- return existingColumn.dataType;
597
- }
598
593
  // check for colDef dataType
599
594
  const colDefDataType = agColumn.getColDef().cellDataType;
600
595
  if (typeof colDefDataType === 'string' && agGridDataTypeDefinitions_1.ALL_ADAPTABLE_DATA_TYPES.includes(colDefDataType)) {
@@ -1446,7 +1446,7 @@ class AgGridColumnAdapter {
1446
1446
  const bg = (0, tinycolor2_1.default)(preparedColor).setAlpha(alpha);
1447
1447
  style.backgroundColor = bg.toRgbString();
1448
1448
  if (gradientStyle.AutoContrastText) {
1449
- style.color = bg.getLuminance() > 0.45 ? '#111111' : '#ffffff';
1449
+ style.color = (0, StyleHelper_1.getAutoContrastTextColor)(preparedColor, alpha);
1450
1450
  }
1451
1451
  }
1452
1452
  }
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ActionColumnRenderer = exports.ReactActionColumnRenderer = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
- const DropdownButton_1 = tslib_1.__importDefault(require("../../components/DropdownButton"));
6
+ const DropdownButton_1 = require("../../components/DropdownButton");
7
7
  const React = tslib_1.__importStar(require("react"));
8
8
  const Icon_1 = require("../../components/Icon");
9
9
  const AdaptableButton_1 = require("../../View/Components/AdaptableButton");
@@ -17,10 +17,7 @@ function getActionColumnButtonProps(button, index, adaptableApi, context, rerend
17
17
  }
18
18
  const buttonLabel = adaptableApi.internalApi.getLabelForButton(button, context);
19
19
  const buttonTooltip = adaptableApi.internalApi.getTooltipForButton(button, context);
20
- const identifier = button.label ??
21
- button.icon?.name ??
22
- button.tooltip ??
23
- `${index + 1}`;
20
+ const identifier = button.label ?? button.icon?.name ?? button.tooltip ?? `${index + 1}`;
24
21
  return {
25
22
  button,
26
23
  buttonLabel,
@@ -56,7 +53,7 @@ const ActionColumnDropdown = (props) => {
56
53
  });
57
54
  return {
58
55
  label: buttonLabel || buttonTooltip,
59
- icon: menuIcon ? ((0, jsx_runtime_1.jsx)(Icon_1.IconComponent, { icon: menuIcon })) : undefined,
56
+ icon: menuIcon ? (0, jsx_runtime_1.jsx)(Icon_1.IconComponent, { icon: menuIcon }) : undefined,
60
57
  disabled,
61
58
  onClick: () => {
62
59
  actionButton.onClick?.(actionButton, context);
@@ -68,7 +65,7 @@ const ActionColumnDropdown = (props) => {
68
65
  if (!items.length) {
69
66
  return null;
70
67
  }
71
- return ((0, jsx_runtime_1.jsx)(DropdownButton_1.default, { "data-name": "action-column-dropdown", variant: "outlined", tone: "neutral", items: items, collapseOnItemClick: true, listMinWidth: 140, showToggleIcon: true, accessLevel: GeneralConstants_1.ACCESS_LEVEL_FULL, children: dropdownLabel }));
68
+ return ((0, jsx_runtime_1.jsx)(DropdownButton_1.NewDropdownButton, { "data-name": "action-column-dropdown", variant: "outlined", tone: "neutral", items: items, accessLevel: GeneralConstants_1.ACCESS_LEVEL_FULL, children: dropdownLabel }));
72
69
  };
73
70
  const ActionColumnCellContent = (props) => {
74
71
  const { buttons, actionColumn, adaptableApi, context, rerender } = props;
@@ -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
  }