@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
@@ -3,14 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StyledColumnWizardTypeSection = exports.renderStyledColumnTypeSummary = exports.renderStyledColumnSettingsSummary = exports.getStyledColumnWizardTitle = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
- const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
7
- const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
8
6
  const Tag_1 = require("../../../components/Tag");
9
7
  const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
10
8
  const AdaptableContext_1 = require("../../AdaptableContext");
11
9
  const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
12
- const TypeRadio_1 = require("../../Wizard/TypeRadio");
13
10
  const Flex_1 = require("../../../components/Flex");
11
+ const StyledColumnTypeThumbnail_1 = require("./StyledColumnTypeThumbnail");
12
+ const WizardTypeSelection_1 = require("../../Wizard/WizardTypeSelection");
14
13
  const TYPE_LABELS = {
15
14
  Gradient: 'Gradient Column',
16
15
  PercentBar: 'Percent Bar',
@@ -21,6 +20,88 @@ const TYPE_LABELS = {
21
20
  RangeBar: 'Range Bar',
22
21
  Icon: 'Icon',
23
22
  };
23
+ const STYLED_COLUMN_TYPE_GROUPS = [
24
+ {
25
+ title: 'Labels & icons',
26
+ types: ['badge', 'icon', 'rating'],
27
+ },
28
+ {
29
+ title: 'Bars & ranges',
30
+ types: ['percent', 'bullet', 'rangeBar'],
31
+ },
32
+ {
33
+ title: 'Colour',
34
+ types: ['gradient'],
35
+ },
36
+ {
37
+ title: 'Charts',
38
+ types: ['sparkline'],
39
+ },
40
+ ];
41
+ const STYLED_COLUMN_TYPE_OPTIONS = [
42
+ {
43
+ type: 'badge',
44
+ label: 'Badge',
45
+ columnTypes: ['Any Column'],
46
+ description: 'Render cell values as badges',
47
+ isSelected: (data) => Boolean(data.BadgeStyle),
48
+ },
49
+ {
50
+ type: 'icon',
51
+ label: 'Icon',
52
+ columnTypes: ['Any Column'],
53
+ description: 'Map values to icons',
54
+ isSelected: (data) => Boolean(data.IconStyle),
55
+ },
56
+ {
57
+ type: 'rating',
58
+ label: 'Rating',
59
+ columnTypes: ['Numeric Column'],
60
+ description: 'Provide visual rating indicators',
61
+ isSelected: (data) => Boolean(data.RatingStyle),
62
+ },
63
+ {
64
+ type: 'gradient',
65
+ label: 'Gradient',
66
+ columnTypes: ['Numeric Column'],
67
+ description: 'Colour cells by value ranges',
68
+ isSelected: (data) => Boolean(data.GradientStyle),
69
+ },
70
+ {
71
+ type: 'percent',
72
+ label: 'Percent Bar',
73
+ columnTypes: ['Numeric Column'],
74
+ description: 'Draw a bar sized to the value',
75
+ isSelected: (data) => Boolean(data.PercentBarStyle),
76
+ },
77
+ {
78
+ type: 'bullet',
79
+ label: 'Bullet Chart',
80
+ columnTypes: ['Numeric Column'],
81
+ description: 'Bar with target and bands',
82
+ isSelected: (data) => Boolean(data.BulletChartStyle),
83
+ },
84
+ {
85
+ type: 'rangeBar',
86
+ label: 'Range Bar',
87
+ columnTypes: ['Numeric Column'],
88
+ description: 'Show value on a min–max track',
89
+ isSelected: (data) => Boolean(data.RangeBarStyle),
90
+ },
91
+ {
92
+ type: 'sparkline',
93
+ label: 'Sparkline',
94
+ columnTypes: ['Numeric Array Column'],
95
+ description: 'Display a mini chart in the cell',
96
+ isSelected: (data) => Boolean(data.SparklineStyle),
97
+ },
98
+ ];
99
+ const STYLED_COLUMN_TYPE_COUNT = STYLED_COLUMN_TYPE_OPTIONS.length;
100
+ const STYLED_COLUMN_TYPE_OPTION_BY_KEY = STYLED_COLUMN_TYPE_OPTIONS.reduce((map, option) => {
101
+ map.set(option.type, option);
102
+ return map;
103
+ }, new Map());
104
+ const STYLED_COLUMN_TYPE_KEYS = STYLED_COLUMN_TYPE_GROUPS.flatMap((group) => group.types);
24
105
  /**
25
106
  * Wizard-header title for each Styled Column type. Reads as a complete
26
107
  * subject so it works as a top-level title in the wizard frame
@@ -85,6 +166,7 @@ exports.renderStyledColumnTypeSummary = exports.renderStyledColumnSettingsSummar
85
166
  const StyledColumnWizardTypeSection = (props) => {
86
167
  const { data } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
87
168
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
169
+ const sparklinesAvailable = adaptable.api.styledColumnApi.canDisplaySparklines();
88
170
  const onNameChange = (event) => {
89
171
  props.onChange({
90
172
  ...data,
@@ -129,8 +211,6 @@ const StyledColumnWizardTypeSection = (props) => {
129
211
  newStyledColumn.RatingStyle = {};
130
212
  break;
131
213
  case 'rangeBar':
132
- // Range Bar requires Min and Max — seed sensible defaults so the
133
- // wizard's Style step opens with a valid configuration.
134
214
  newStyledColumn.RangeBarStyle = {
135
215
  Min: 'Col-Min',
136
216
  Max: 'Col-Max',
@@ -145,6 +225,13 @@ const StyledColumnWizardTypeSection = (props) => {
145
225
  newStyledColumn.ColumnId = null;
146
226
  props.onChange(newStyledColumn);
147
227
  };
148
- return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", "data-name": "styled-column-type", className: "twa:h-full twa:p-2", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-5 twa:font-medium twa:mb-3", children: "Settings" }), (0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "row", className: "twa:mb-4", children: (0, jsx_runtime_1.jsx)(FormLayout_1.default, { className: "twa:max-w-[420px] twa:w-full", children: (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Name", children: (0, jsx_runtime_1.jsx)(Input_1.default, { className: "twa:w-full", "data-name": "styled-column-name", onChange: onNameChange, value: data?.Name ?? '' }) }) }) }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-5 twa:font-medium twa:mb-2", children: "Type" }), (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", children: [(0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { text: "Badge", description: "Display the column's values as Badges (All Columns)", checked: Boolean(data.BadgeStyle), onClick: () => handleTypeChange('badge') }), (0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { text: "Rating", description: "Render values as row of icons (or stars, hearts etc.) (Numeric Columns)", checked: Boolean(data.RatingStyle), onClick: () => handleTypeChange('rating') }), (0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { text: "Gradient", description: "Colour each cell in the column using a Gradient value (Numeric Columns)", checked: Boolean(data.GradientStyle), onClick: () => handleTypeChange('gradient') }), (0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { text: "Percent Bar", description: "Display a coloured Bar where the width is based on the cell (Numeric Columns)", checked: Boolean(data.PercentBarStyle), onClick: () => handleTypeChange('percent') }), (0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { text: "Bullet Chart", description: "Show a bar with target marker and qualitative bands per cell (Numeric Columns)", checked: Boolean(data.BulletChartStyle), onClick: () => handleTypeChange('bullet') }), (0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { text: "Range Bar", description: "Show where values sit between Min & Max (per-row or column) (Numeric Columns)", checked: Boolean(data.RangeBarStyle), onClick: () => handleTypeChange('rangeBar') }), (0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { text: "Icon", description: "Map cell values to icons (e.g. flag for country) (All Columns)", checked: Boolean(data.IconStyle), onClick: () => handleTypeChange('icon') }), (0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { text: "Sparkline", description: "Render Column as a Sparkline (Numeric Array Columns)", checked: Boolean(data.SparklineStyle), disabled: !adaptable.api.styledColumnApi.canDisplaySparklines(), disabledTooltip: "Requires the AG Grid Sparklines module to be registered.", onClick: () => handleTypeChange('sparkline') })] })] }));
228
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", "data-name": "styled-column-type", className: "twa:h-full twa:min-h-0 twa:p-2 twa:gap-2", children: [(0, jsx_runtime_1.jsx)(WizardTypeSelection_1.WizardNameFieldSection, { value: data?.Name ?? '', onChange: onNameChange, inputDataName: "styled-column-name" }), (0, jsx_runtime_1.jsx)(WizardTypeSelection_1.WizardTypeSelectionSection, { headingId: "styled-column-type-heading", title: "Style Type", dataName: "styled-column-type-grid", columns: (0, WizardTypeSelection_1.getWizardTypeSelectionGridColumns)(STYLED_COLUMN_TYPE_COUNT), intro: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Click a card to choose one of ", STYLED_COLUMN_TYPE_COUNT, " style types for how values in the Column should be rendered"] }), children: STYLED_COLUMN_TYPE_KEYS.map((typeKey) => {
229
+ const option = STYLED_COLUMN_TYPE_OPTION_BY_KEY.get(typeKey);
230
+ const isSparkline = typeKey === 'sparkline';
231
+ const disabled = isSparkline && !sparklinesAvailable;
232
+ return ((0, jsx_runtime_1.jsx)(WizardTypeSelection_1.WizardTypeSelectionCard, { label: option.label, description: option.description, selected: option.isSelected(data), disabled: disabled, disabledTooltip: disabled
233
+ ? 'Requires the AG Grid Sparklines module to be registered.'
234
+ : undefined, dataName: `styled-column-type-${option.type}`, minHeightClassName: "twa:min-h-[168px]", onSelect: () => handleTypeChange(option.type), footer: (0, jsx_runtime_1.jsx)(StyledColumnTypeThumbnail_1.StyledColumnTypeThumbnail, { type: option.type }), children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "row", className: "twa:flex-wrap twa:gap-1", children: option.columnTypes.map((columnType) => ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: columnType }, columnType))) }) }, option.type));
235
+ }) })] }));
149
236
  };
150
237
  exports.StyledColumnWizardTypeSection = StyledColumnWizardTypeSection;
@@ -26,7 +26,6 @@ export declare function getMessageTypeByStatusColour(statusColour: StatusColour)
26
26
  export declare function getButtonToneByMessageType(messageType: AdaptableMessageType): 'success' | 'error' | 'neutral' | 'none' | 'warning' | 'info' | 'accent';
27
27
  export declare function getGlyphByMessageType(messageType: AdaptableMessageType): AdaptableSystemIconName;
28
28
  export declare function getColorByMessageType(messageType: AdaptableMessageType): string;
29
- export declare function getCSSColorByMessageType(messageType: AdaptableMessageType): string;
30
29
  export declare function getStyleForStatusColour(statusColour: StatusColour): CSSProperties;
31
30
  export declare function getStyleForMessageType(messageType: AdaptableMessageType): CSSProperties;
32
31
  export declare function getGlyphForStatusColour(statusColour: StatusColour): string;
@@ -67,7 +66,6 @@ export declare const UIHelper: {
67
66
  getGlyphForMessageType: typeof getGlyphForMessageType;
68
67
  getStyleForMessageType: typeof getStyleForMessageType;
69
68
  getMessageTypeFromAdaptableAlerts: typeof getMessageTypeFromAdaptableAlerts;
70
- getCSSColorByMessageType: typeof getCSSColorByMessageType;
71
69
  getButtonColourForAdaptableAlerts: typeof getButtonColourForAdaptableAlerts;
72
70
  getButtonTextColourForArrayandMessageType: typeof getButtonTextColourForArrayandMessageType;
73
71
  getButtonTextColourForMessageType: typeof getButtonTextColourForMessageType;
@@ -16,7 +16,6 @@ exports.getMessageTypeByStatusColour = getMessageTypeByStatusColour;
16
16
  exports.getButtonToneByMessageType = getButtonToneByMessageType;
17
17
  exports.getGlyphByMessageType = getGlyphByMessageType;
18
18
  exports.getColorByMessageType = getColorByMessageType;
19
- exports.getCSSColorByMessageType = getCSSColorByMessageType;
20
19
  exports.getStyleForStatusColour = getStyleForStatusColour;
21
20
  exports.getStyleForMessageType = getStyleForMessageType;
22
21
  exports.getGlyphForStatusColour = getGlyphForStatusColour;
@@ -54,7 +53,7 @@ function getSwatchColorPaletteEntries() {
54
53
  /** Theme semantic colours for the Colour Picker (resolved at runtime per active theme). */
55
54
  function getThemeSemanticColorPaletteEntries() {
56
55
  return [
57
- 'var(--ab-color-error)',
56
+ 'var(--ab-color-destructive)',
58
57
  'var(--ab-color-warn)',
59
58
  'var(--ab-color-success)',
60
59
  'var(--ab-color-info)',
@@ -170,7 +169,7 @@ function getGlyphByMessageType(messageType) {
170
169
  function getColorByMessageType(messageType) {
171
170
  switch (messageType) {
172
171
  case 'Error':
173
- return 'var(--ab-color-error)';
172
+ return 'var(--ab-color-destructive)';
174
173
  case 'Warning':
175
174
  return 'var(--ab-color-warn)';
176
175
  case 'Success':
@@ -179,20 +178,6 @@ function getColorByMessageType(messageType) {
179
178
  return 'var(--ab-color-info)';
180
179
  }
181
180
  }
182
- function getCSSColorByMessageType(messageType) {
183
- switch (messageType) {
184
- case 'Error':
185
- return 'error';
186
- case 'Warning':
187
- return 'warn';
188
- case 'Success':
189
- return 'success';
190
- case 'Info':
191
- return 'info';
192
- default:
193
- return '';
194
- }
195
- }
196
181
  function getStyleForStatusColour(statusColour) {
197
182
  let result;
198
183
  switch (statusColour) {
@@ -213,7 +198,7 @@ function getStyleForStatusColour(statusColour) {
213
198
  break;
214
199
  case Enums_1.StatusColour.Error:
215
200
  result = {
216
- fill: 'var(--ab-color-error)',
201
+ fill: 'var(--ab-color-destructive)',
217
202
  };
218
203
  break;
219
204
  }
@@ -242,7 +227,7 @@ function getStyleForMessageType(messageType) {
242
227
  break;
243
228
  case 'Error':
244
229
  result = {
245
- fill: 'var(--ab-color-error)',
230
+ fill: 'var(--ab-color-destructive)',
246
231
  };
247
232
  break;
248
233
  }
@@ -357,13 +342,13 @@ function getButtonTextColourForArrayandMessageType(adaptableAlerts, messageType)
357
342
  function getButtonTextColourForMessageType(messageType) {
358
343
  switch (messageType) {
359
344
  case 'Info':
360
- return 'var( --ab-color-text-on-info)';
345
+ return 'var( --ab-color-info-foreground)';
361
346
  case 'Success':
362
- return 'var( --ab-color-text-on-success)';
347
+ return 'var( --ab-color-success-foreground)';
363
348
  case 'Warning':
364
- return 'var( --ab-color-text-on-warn)';
349
+ return 'var( --ab-color-warn-foreground)';
365
350
  case 'Error':
366
- return 'var( --ab-color-text-on-error)';
351
+ return 'var( --ab-color-destructive-foreground)';
367
352
  }
368
353
  }
369
354
  function getNumericCSSVariableValue(stringValue, defaultValue) {
@@ -417,7 +402,6 @@ exports.UIHelper = {
417
402
  getGlyphForMessageType,
418
403
  getStyleForMessageType,
419
404
  getMessageTypeFromAdaptableAlerts,
420
- getCSSColorByMessageType,
421
405
  getButtonColourForAdaptableAlerts,
422
406
  getButtonTextColourForArrayandMessageType,
423
407
  getButtonTextColourForMessageType,
@@ -0,0 +1,68 @@
1
+ import * as React from 'react';
2
+ import { type CollapsibleWizardCardSurface } from '../../Utilities/wizardSelection';
3
+ export interface CollapsibleWizardCardProps {
4
+ title: React.ReactNode;
5
+ /** Help text in the header when expanded. */
6
+ help?: React.ReactNode;
7
+ /**
8
+ * Help text in the header when collapsed. Uses `help` when omitted.
9
+ * Pass `false` to hide collapsed header help.
10
+ */
11
+ collapsedHelp?: React.ReactNode | false;
12
+ /** Shown in the card body while collapsed — typically tags or a short value summary. */
13
+ summary: React.ReactNode;
14
+ /** One-line value shown in the header when another card in the accordion is expanded. */
15
+ compactSummary?: React.ReactNode;
16
+ /** When true, `compactSummary` remains interactive (e.g. toggle buttons). */
17
+ compactSummaryInteractive?: boolean;
18
+ /** Full-opacity visual in the header row (all states) — e.g. a live badge preview. */
19
+ headerVisual?: React.ReactNode;
20
+ /** Trailing header controls (all states) — e.g. delete. Clicks do not toggle expand. */
21
+ headerActions?: React.ReactNode;
22
+ children: React.ReactNode;
23
+ defaultExpanded?: boolean;
24
+ expanded?: boolean;
25
+ /** When true, only the header row is shown (another card in the accordion is expanded). */
26
+ compact?: boolean;
27
+ /** When true, the expanded card grows to fill remaining section height (for scrollable lists). */
28
+ fillAvailable?: boolean;
29
+ onExpandedChange?: (expanded: boolean) => void;
30
+ className?: string;
31
+ bodyClassName?: string;
32
+ /** `panel` = Layout wizard (same bg as parent); `popup` = module popups (Dashboard). */
33
+ surface?: CollapsibleWizardCardSurface;
34
+ 'data-name'?: string;
35
+ }
36
+ export type WizardCardAccordionBinding = {
37
+ expanded: boolean;
38
+ compact: boolean;
39
+ fillAvailable: boolean;
40
+ onExpandedChange: (expanded: boolean) => void;
41
+ };
42
+ export type WizardCardAccordionBindCardOptions = {
43
+ /** When expanded, grow to fill remaining section height. Default: false. */
44
+ fillAvailable?: boolean;
45
+ };
46
+ export type WizardCardAccordionOptions = {
47
+ /** Section default for `fillAvailable` when not set per card. Default: false. */
48
+ fillExpandedCard?: boolean;
49
+ };
50
+ export type WizardCardAccordionBindCard = (id: string, options?: WizardCardAccordionBindCardOptions) => WizardCardAccordionBinding;
51
+ export declare function getWizardAccordionSectionClassName(hasExpandedCard: boolean, fillExpandedCard?: boolean): string;
52
+ export declare function renderCompactColumnTags(columnIds: string[], getFriendlyName: (columnId: string) => string, options?: {
53
+ maxVisible?: number;
54
+ emptyLabel?: string;
55
+ }): React.ReactNode;
56
+ export declare const CollapsibleWizardCard: React.FC<CollapsibleWizardCardProps>;
57
+ export declare function useWizardCardAccordion(initialExpandedId: string | null, options?: WizardCardAccordionOptions): {
58
+ expandedId: string;
59
+ hasExpandedCard: boolean;
60
+ expandedFillsSpace: boolean;
61
+ bindCard: WizardCardAccordionBindCard;
62
+ fillExpandedCard: boolean;
63
+ setExpandedId: React.Dispatch<React.SetStateAction<string>>;
64
+ };
65
+ /** Collapsed card body: selected value tag(s) only — no description text. */
66
+ export declare const CollapsibleWizardValueSummary: React.FC<{
67
+ value: React.ReactNode;
68
+ }>;
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CollapsibleWizardValueSummary = exports.CollapsibleWizardCard = void 0;
4
+ exports.getWizardAccordionSectionClassName = getWizardAccordionSectionClassName;
5
+ exports.renderCompactColumnTags = renderCompactColumnTags;
6
+ exports.useWizardCardAccordion = useWizardCardAccordion;
7
+ const tslib_1 = require("tslib");
8
+ const jsx_runtime_1 = require("react/jsx-runtime");
9
+ const React = tslib_1.__importStar(require("react"));
10
+ const Card_1 = require("../../components/Card");
11
+ const utils_1 = require("../../lib/utils");
12
+ const wizardSelection_1 = require("../../Utilities/wizardSelection");
13
+ const Flex_1 = require("../../components/Flex");
14
+ const useProperty_1 = tslib_1.__importDefault(require("../../components/utils/useProperty"));
15
+ const Tag_1 = require("../../components/Tag");
16
+ const Icon_1 = require("../../components/Icon");
17
+ const twUtils_1 = require("../../components/twUtils");
18
+ function getWizardAccordionSectionClassName(hasExpandedCard, fillExpandedCard = true) {
19
+ return (0, utils_1.cn)('twa:h-full twa:min-h-0 twa:flex twa:flex-col twa:gap-2', hasExpandedCard && fillExpandedCard ? 'twa:overflow-hidden' : 'twa:overflow-y-auto');
20
+ }
21
+ function renderCompactColumnTags(columnIds, getFriendlyName, options) {
22
+ const { maxVisible = 5, emptyLabel = 'None' } = options ?? {};
23
+ if (!columnIds.length) {
24
+ return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: emptyLabel });
25
+ }
26
+ const visibleIds = columnIds.slice(0, maxVisible);
27
+ const remainder = columnIds.length - visibleIds.length;
28
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:gap-1 twa:min-w-0 twa:overflow-hidden", children: [visibleIds.map((columnId) => ((0, jsx_runtime_1.jsx)(Tag_1.ColumnTag, { className: "twa:shrink-0", children: getFriendlyName(columnId) }, columnId))), remainder > 0 ? ((0, jsx_runtime_1.jsxs)("span", { className: "twa:text-xs twa:opacity-70 twa:shrink-0", children: ["+", remainder] })) : null] }));
29
+ }
30
+ const CollapsibleWizardCard = (props) => {
31
+ const { title, help, collapsedHelp, summary, compactSummary, compactSummaryInteractive = false, headerVisual, headerActions, children, defaultExpanded = false, compact = false, fillAvailable = false, className, bodyClassName, surface = 'popup', 'data-name': dataName, } = props;
32
+ const [expanded, setExpanded] = (0, useProperty_1.default)(props, 'expanded', defaultExpanded, {
33
+ onChange: props.onExpandedChange,
34
+ });
35
+ const showSummary = !expanded && !compact;
36
+ const collapsedHeaderInline = collapsedHelp === false ? undefined : collapsedHelp ?? help;
37
+ const headerInline = expanded ? help : compact ? compactSummary : collapsedHeaderInline;
38
+ const isInteractiveCompactSummary = compact && compactSummaryInteractive;
39
+ const toggleExpanded = () => setExpanded(!expanded);
40
+ const handleTitleKeyDown = (event) => {
41
+ if (event.key === 'Enter' || event.key === ' ') {
42
+ event.preventDefault();
43
+ toggleExpanded();
44
+ }
45
+ };
46
+ return ((0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: (0, utils_1.cn)('ab-CollapsibleWizardCard twa:border twa:transition-[border-color,background-color]', expanded
47
+ ? (0, wizardSelection_1.getCollapsibleWizardCardExpandedClasses)(surface)
48
+ : (0, wizardSelection_1.getCollapsibleWizardCardCollapsedClasses)(surface), compact && 'ab-CollapsibleWizardCard--compact twa:p-0!', fillAvailable
49
+ ? 'twa:flex-1 twa:min-h-0 twa:flex twa:flex-col twa:overflow-hidden'
50
+ : 'twa:shrink-0', className), children: [(0, jsx_runtime_1.jsx)(Card_1.Card.Title, { className: "twa:p-0", border: !compact, children: (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: (0, utils_1.cn)('twa:flex twa:flex-row twa:items-center twa:gap-2 twa:w-full twa:px-2 twa:cursor-pointer twa:rounded-standard twa:hover:bg-primary', { 'twa:py-2': true, 'twa:mb-0.5': !compact && !expanded },
51
+ // `targetOwn.focusOutline` uses a Tailwind `ring` (an *outward* box-shadow).
52
+ // In compact/collapsed mode the card sets `p-0!`, so this header sits flush
53
+ // against the card edge; combined with the card's `overflow-hidden` the
54
+ // outward ring is painted outside the border-box and clipped away. Draw it
55
+ // inset so it stays inside the element and is always visible.
56
+ twUtils_1.targetOwn.focusOutline, 'twa:focus-visible:ring-inset'), "data-name": dataName, onClick: toggleExpanded, onKeyDown: handleTitleKeyDown, tabIndex: 0, "aria-expanded": expanded, role: "button", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:flex twa:flex-row twa:items-center twa:gap-2 twa:shrink-0 twa:cursor-pointer twa:select-none", children: [(0, jsx_runtime_1.jsx)(Icon_1.IconComponent, { icon: { name: expanded ? 'collapse' : 'expand' } }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: title })] }), headerVisual ? ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex-1 twa:min-w-0 twa:flex twa:justify-end twa:items-center twa:overflow-hidden twa:pointer-events-none", children: headerVisual })) : headerInline ? ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: (0, utils_1.cn)('twa:flex-1 twa:min-w-0 twa:font-normal', isInteractiveCompactSummary
57
+ ? 'twa:flex twa:justify-end twa:items-center twa:overflow-visible'
58
+ : (0, utils_1.cn)('twa:text-xs twa:opacity-70 twa:pointer-events-none twa:cursor-default', compact ? 'twa:overflow-hidden' : 'twa:truncate')), children: headerInline })) : ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex-1 twa:min-w-0" })), headerActions ? ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:shrink-0", onClick: (event) => event.stopPropagation(), children: headerActions })) : null] }) }), expanded ? ((0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: (0, utils_1.cn)('twa:p-1', bodyClassName, fillAvailable && 'twa:max-h-none! twa:flex-1 twa:min-h-0'), children: children })) : showSummary ? ((0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", gap: 1, children: summary })) : null] }));
59
+ };
60
+ exports.CollapsibleWizardCard = CollapsibleWizardCard;
61
+ function useWizardCardAccordion(initialExpandedId, options) {
62
+ const fillExpandedCard = options?.fillExpandedCard ?? false;
63
+ const cardFillByIdRef = React.useRef({});
64
+ const [expandedId, setExpandedId] = React.useState(initialExpandedId);
65
+ const hasExpandedCard = expandedId !== null;
66
+ const bindCard = React.useCallback((id, cardOptions) => {
67
+ const shouldFillWhenExpanded = cardOptions?.fillAvailable ?? fillExpandedCard;
68
+ cardFillByIdRef.current[id] = shouldFillWhenExpanded;
69
+ return {
70
+ expanded: expandedId === id,
71
+ compact: hasExpandedCard && expandedId !== id,
72
+ fillAvailable: expandedId === id && shouldFillWhenExpanded,
73
+ onExpandedChange: (expanded) => {
74
+ setExpandedId(expanded ? id : null);
75
+ },
76
+ };
77
+ }, [expandedId, hasExpandedCard, fillExpandedCard]);
78
+ const expandedFillsSpace = expandedId != null && cardFillByIdRef.current[expandedId] === true;
79
+ return {
80
+ expandedId,
81
+ hasExpandedCard,
82
+ expandedFillsSpace,
83
+ bindCard,
84
+ fillExpandedCard,
85
+ setExpandedId,
86
+ };
87
+ }
88
+ /** Collapsed card body: selected value tag(s) only — no description text. */
89
+ const CollapsibleWizardValueSummary = ({ value }) => (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: value });
90
+ exports.CollapsibleWizardValueSummary = CollapsibleWizardValueSummary;
@@ -6,7 +6,7 @@ const tslib_1 = require("tslib");
6
6
  const jsx_runtime_1 = require("react/jsx-runtime");
7
7
  const React = tslib_1.__importStar(require("react"));
8
8
  const react_1 = require("react");
9
- const clsx_1 = tslib_1.__importDefault(require("clsx"));
9
+ const utils_1 = require("../../lib/utils");
10
10
  const Dialog_1 = tslib_1.__importDefault(require("../../components/Dialog"));
11
11
  const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
12
12
  const useProperty_1 = tslib_1.__importDefault(require("../../components/utils/useProperty"));
@@ -90,7 +90,7 @@ const OnePageWizard = (props) => {
90
90
  };
91
91
  const handleNavigation = (0, useKeyboardNavigation_1.useKeyboardNavigation)(setCurrentSection, visibleSections);
92
92
  const selectedNodeRef = (0, react_1.useRef)(null);
93
- const selectedFeedback = ((0, jsx_runtime_1.jsx)("div", { ref: selectedNodeRef, onKeyDown: (event) => handleNavigation(event), tabIndex: 0, className: (0, clsx_1.default)('ab-OnePageWizard__selected-title-overlay', 'twa:absolute twa:rounded-standard twa:select-none twa:bg-accent twa:transition-top twa:duration-200', twUtils_1.targetOwn.focusOutline) }));
93
+ const selectedFeedback = ((0, jsx_runtime_1.jsx)("div", { ref: selectedNodeRef, onKeyDown: (event) => handleNavigation(event), tabIndex: 0, className: (0, utils_1.cn)('ab-OnePageWizard__selected-title-overlay', 'twa:absolute twa:rounded-standard twa:select-none twa:bg-accent twa:transition-top twa:duration-200', twUtils_1.targetOwn.focusOutline) }));
94
94
  const sizeOwnerRef = (0, react_1.useRef)(null);
95
95
  const [width, setWidth] = (0, react_1.useState)(0);
96
96
  (0, ResizeObserver_1.useResizeObserver)(sizeOwnerRef, ({ width }) => {
@@ -144,7 +144,7 @@ const OnePageWizard = (props) => {
144
144
  }
145
145
  }
146
146
  }
147
- }, children: (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: (0, clsx_1.default)('ab-OnePageWizard twa:flex twa:flex-col twa:h-full twa:w-[90vw] twa:max-w-[1200px]', 'twa:bg-primarylight twa:text-primary-foreground'), "data-name": props.name, style: props.style, children: [(props.moduleName || activeSectionDetails) && ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: (0, clsx_1.default)('ab-OnePageWizard__header', ONE_PAGE_WIZARD_SECTION_GRID, 'twa:items-start twa:my-3 twa:px-2'), children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "ab-OnePageWizard__module-name twa:min-w-0 twa:pl-3 twa:font-bold", children: props.moduleName }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "ab-OnePageWizard__details twa:min-w-0 twa:pr-2 twa:text-4", children: activeSectionDetails })] })), (0, jsx_runtime_1.jsx)(Flex_1.Box, { as: "hr", className: "ab-OnePageWizard__module-separator twa:w-full twa:border-0 twa:border-t twa:border-t-input-border twa:mb-2" }), (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: (0, clsx_1.default)(ONE_PAGE_WIZARD_SECTION_GRID, 'twa:flex-1 twa:min-h-0 twa:overflow-auto twa:items-stretch'), children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "ab-OnePageWizard__section-title-container twa:min-h-0 twa:min-w-0 twa:overflow-auto twa:p-3 twa:relative", ref: sizeOwnerRef, style: props.titleContainerStyle, children: [visibleSections.map((section, index) => {
147
+ }, children: (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: (0, utils_1.cn)('ab-OnePageWizard twa:flex twa:flex-col twa:h-full twa:w-[90vw] twa:max-w-[1200px]', 'twa:bg-primarylight twa:text-primary-foreground'), "data-name": props.name, style: props.style, children: [(props.moduleName || activeSectionDetails) && ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: (0, utils_1.cn)('ab-OnePageWizard__header', ONE_PAGE_WIZARD_SECTION_GRID, 'twa:items-start twa:my-3 twa:px-2'), children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "ab-OnePageWizard__module-name twa:min-w-0 twa:pl-3 twa:font-bold", children: props.moduleName }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "ab-OnePageWizard__details twa:min-w-0 twa:pr-2 twa:text-4", children: activeSectionDetails })] })), (0, jsx_runtime_1.jsx)(Flex_1.Box, { as: "hr", className: "ab-OnePageWizard__module-separator twa:w-full twa:border-0 twa:border-t twa:border-t-input-border twa:mb-2" }), (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: (0, utils_1.cn)(ONE_PAGE_WIZARD_SECTION_GRID, 'twa:flex-1 twa:min-h-0 twa:overflow-auto twa:items-stretch'), children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "ab-OnePageWizard__section-title-container twa:min-h-0 twa:min-w-0 twa:overflow-auto twa:p-3 twa:relative", ref: sizeOwnerRef, style: props.titleContainerStyle, children: [visibleSections.map((section, index) => {
148
148
  if (section === '-') {
149
149
  return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { as: "hr", className: "ab-OnePageWizard__section-separator twa:mt-2 twa:w-full twa:border-t twa:border-t-input-border" }, `${index}-`));
150
150
  }
@@ -152,7 +152,7 @@ const OnePageWizard = (props) => {
152
152
  navIndexMap.set(navIndex, index);
153
153
  const active = index === currentSection;
154
154
  const disabled = false; //!active && !currentSectionValid;
155
- return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: (0, clsx_1.default)('ab-OnePageWizard__section-title twa:p-2', {
155
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: (0, utils_1.cn)('ab-OnePageWizard__section-title twa:p-2', {
156
156
  'twa:cursor-auto': disabled,
157
157
  'twa:cursor-pointer': !disabled,
158
158
  'twa:z-10': true,
@@ -171,7 +171,7 @@ const OnePageWizard = (props) => {
171
171
  return;
172
172
  }
173
173
  setCurrentSection(index);
174
- }, children: [(0, jsx_runtime_1.jsx)(KeyHint_1.KeyHint, { className: "twa:mr-2 twa:inline-block twa:text-color-accent-foreground", children: navIndex }), (0, jsx_runtime_1.jsx)("div", { className: "twa:flex-1", children: section.title }), (0, jsx_runtime_1.jsx)(icons_1.Icon, { name: "error", className: (0, clsx_1.default)('twa:ml-2', validSectionsMap.get(index) !== true ? 'twa:visible' : 'twa:invisible') })] }, section.title));
175
- }), selectedFeedback, (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex-1" }), (0, jsx_runtime_1.jsxs)(KeyHint_1.KeyHint, { className: "ab-OnePageWizard__key-hint twa:leading-normal", children: [(0, isMacLike_1.isMacLike)() ? 'Cmd' : 'Ctrl', " + #", (0, jsx_runtime_1.jsx)("br", {}), "or arrow keys", (0, jsx_runtime_1.jsx)("br", {}), "to navigate"] })] }), (0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "column", className: "ab-OnePageWizard__section-container twa:min-h-0 twa:min-w-0 twa:flex-1", children: renderSection(currentSection) })] }), (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", alignItems: "center", className: "ab-WizardDialog__footer ab-OnePageWizard__footer twa:p-2", children: [(0, jsx_runtime_1.jsx)(SimpleButton_1.default, { tone: "neutral", variant: "text", "data-name": "close", onClick: () => props.onHide?.(), tooltip: props.closeTooltip ?? 'Close wizard', accessLevel: GeneralConstants_1.ACCESS_LEVEL_FULL, children: props.closeText ?? 'CLOSE' }), (0, jsx_runtime_1.jsx)(KeyHint_1.KeyHint, { className: "twa:ml-2", children: "Esc" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "ab-OnePageWizard__error twa:text-2 twa:mr-3 twa:flex-1 twa:text-error twa:text-end", children: firstErrorMessage }), (0, jsx_runtime_1.jsx)(SimpleButton_1.default, { tone: "accent", "data-name": "finish", variant: "raised", disabled: canFinish !== true, onClick: () => handleClickFinish(), icon: 'check', accessLevel: GeneralConstants_1.ACCESS_LEVEL_FULL, children: props.finishText ?? 'Finish' })] })] }) }) }) }));
174
+ }, children: [(0, jsx_runtime_1.jsx)(KeyHint_1.KeyHint, { className: "twa:mr-2 twa:inline-block twa:text-accent-foreground", children: navIndex }), (0, jsx_runtime_1.jsx)("div", { className: "twa:flex-1", children: section.title }), (0, jsx_runtime_1.jsx)(icons_1.Icon, { name: "error", className: (0, utils_1.cn)('twa:ml-2', validSectionsMap.get(index) !== true ? 'twa:visible' : 'twa:invisible') })] }, section.title));
175
+ }), selectedFeedback, (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex-1" }), (0, jsx_runtime_1.jsxs)(KeyHint_1.KeyHint, { className: "ab-OnePageWizard__key-hint twa:leading-normal", children: [(0, isMacLike_1.isMacLike)() ? 'Cmd' : 'Ctrl', " + #", (0, jsx_runtime_1.jsx)("br", {}), "or arrow keys", (0, jsx_runtime_1.jsx)("br", {}), "to navigate"] })] }), (0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "column", className: "ab-OnePageWizard__section-container twa:min-h-0 twa:min-w-0 twa:flex-1", children: renderSection(currentSection) })] }), (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", alignItems: "center", className: "ab-WizardDialog__footer ab-OnePageWizard__footer twa:p-2", children: [(0, jsx_runtime_1.jsx)(SimpleButton_1.default, { tone: "neutral", variant: "text", "data-name": "close", onClick: () => props.onHide?.(), tooltip: props.closeTooltip ?? 'Close wizard', accessLevel: GeneralConstants_1.ACCESS_LEVEL_FULL, children: props.closeText ?? 'CLOSE' }), (0, jsx_runtime_1.jsx)(KeyHint_1.KeyHint, { className: "twa:ml-2", children: "Esc" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "ab-OnePageWizard__error twa:text-2 twa:mr-3 twa:flex-1 twa:text-destructive twa:text-end", children: firstErrorMessage }), (0, jsx_runtime_1.jsx)(SimpleButton_1.default, { tone: "accent", "data-name": "finish", variant: "raised", disabled: canFinish !== true, onClick: () => handleClickFinish(), icon: 'check', accessLevel: GeneralConstants_1.ACCESS_LEVEL_FULL, children: props.finishText ?? 'Finish' })] })] }) }) }) }));
176
176
  };
177
177
  exports.OnePageWizard = OnePageWizard;
@@ -0,0 +1,24 @@
1
+ import * as React from 'react';
2
+ import type { AdaptableIcon } from '../../types';
3
+ export type SummaryLabelValueItem = {
4
+ label: string;
5
+ value: string;
6
+ /** When set on an Icon summary row, renders the icon glyph instead of the name. */
7
+ icon?: AdaptableIcon;
8
+ };
9
+ export declare const isSummaryColorLabel: (label: string) => boolean;
10
+ /** Labels whose label + value render together inside a single tag (colours, font traits). */
11
+ export declare const isSummaryInTagLabel: (label: string) => boolean;
12
+ export declare const ColorSummarySquare: React.FC<{
13
+ color: string;
14
+ className?: string;
15
+ }>;
16
+ export declare const renderSummaryLabelValueTagContent: (label: string, value: string, icon?: AdaptableIcon) => React.ReactNode;
17
+ export declare const parseSummaryLabelValueString: (item: string) => {
18
+ label: string;
19
+ value: string;
20
+ } | null;
21
+ export declare const renderSummaryStringTagContent: (item: string) => React.ReactNode;
22
+ export declare const renderSummaryStringTags: (items: string[]) => React.JSX.Element;
23
+ export declare const summaryStringsToTagContents: (items: string[]) => React.ReactNode[];
24
+ export declare const renderSummaryLabelValueTags: (items: SummaryLabelValueItem[]) => React.JSX.Element;
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.renderSummaryLabelValueTags = exports.summaryStringsToTagContents = exports.renderSummaryStringTags = exports.renderSummaryStringTagContent = exports.parseSummaryLabelValueString = exports.renderSummaryLabelValueTagContent = exports.ColorSummarySquare = exports.isSummaryInTagLabel = exports.isSummaryColorLabel = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const Flex_1 = require("../../components/Flex");
6
+ const Tag_1 = require("../../components/Tag");
7
+ const StyleHelper_1 = require("../../Utilities/Helpers/StyleHelper");
8
+ const icons_1 = require("../../components/icons");
9
+ const AdaptableIconComponent_1 = require("../Components/AdaptableIconComponent");
10
+ const COLOR_SQUARE_CLASS = 'twa:h-3 twa:w-3 twa:rounded-sm twa:shrink-0 twa:border twa:border-[color-mix(in_srgb,var(--ab-color-foreground)_20%,transparent)]';
11
+ const isSummaryColorLabel = (label) => /\bColou?r$/i.test(label.trim());
12
+ exports.isSummaryColorLabel = isSummaryColorLabel;
13
+ const isIconSummaryLabel = (label) => label.trim() === 'Icon';
14
+ /** Labels whose label + value render together inside a single tag (colours, font traits). */
15
+ const isSummaryInTagLabel = (label) => {
16
+ const trimmed = label.trim();
17
+ return ((0, exports.isSummaryColorLabel)(trimmed) ||
18
+ isIconSummaryLabel(trimmed) ||
19
+ trimmed === 'Font Weight' ||
20
+ trimmed === 'Font Style');
21
+ };
22
+ exports.isSummaryInTagLabel = isSummaryInTagLabel;
23
+ const ColorSummarySquare = ({ color, className, }) => ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: className ?? COLOR_SQUARE_CLASS, style: { background: (0, StyleHelper_1.getVariableColor)(color) }, "aria-hidden": true }));
24
+ exports.ColorSummarySquare = ColorSummarySquare;
25
+ const SummaryIconVisual = ({ icon, value }) => {
26
+ if (icon) {
27
+ return ((0, jsx_runtime_1.jsx)(AdaptableIconComponent_1.AdaptableIconComponent, { icon: { ...icon, size: icon.size ?? 14 } }));
28
+ }
29
+ if (value && value in icons_1.allIcons) {
30
+ return ((0, jsx_runtime_1.jsx)(icons_1.Icon, { "aria-hidden": true, name: value, size: 14, className: "twa:shrink-0" }));
31
+ }
32
+ return null;
33
+ };
34
+ const isSummaryIconVisualAvailable = (icon, value) => Boolean(icon || (value && value in icons_1.allIcons));
35
+ const isFontWeightLabel = (label) => label.trim() === 'Font Weight';
36
+ const isFontStyleLabel = (label) => label.trim() === 'Font Style';
37
+ const renderSummaryLabelValueTagContent = (label, value, icon) => {
38
+ if ((0, exports.isSummaryColorLabel)(label)) {
39
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:gap-1.5", children: [label, (0, jsx_runtime_1.jsx)(exports.ColorSummarySquare, { color: value })] }));
40
+ }
41
+ if (isIconSummaryLabel(label)) {
42
+ if (isSummaryIconVisualAvailable(icon, value)) {
43
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:gap-1.5", children: [label, (0, jsx_runtime_1.jsx)(SummaryIconVisual, { icon: icon, value: value })] }));
44
+ }
45
+ }
46
+ if (isFontWeightLabel(label) && value === 'Bold') {
47
+ return (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-bold", children: `${label}: ${value}` });
48
+ }
49
+ if (isFontStyleLabel(label) && value === 'Italic') {
50
+ return (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:italic", children: `${label}: ${value}` });
51
+ }
52
+ return `${label}: ${value}`;
53
+ };
54
+ exports.renderSummaryLabelValueTagContent = renderSummaryLabelValueTagContent;
55
+ const parseSummaryLabelValueString = (item) => {
56
+ const colonIndex = item.indexOf(': ');
57
+ if (colonIndex <= 0) {
58
+ return null;
59
+ }
60
+ return {
61
+ label: item.slice(0, colonIndex),
62
+ value: item.slice(colonIndex + 2),
63
+ };
64
+ };
65
+ exports.parseSummaryLabelValueString = parseSummaryLabelValueString;
66
+ const renderSummaryStringTagContent = (item) => {
67
+ const parsed = (0, exports.parseSummaryLabelValueString)(item);
68
+ if (!parsed) {
69
+ return item;
70
+ }
71
+ return (0, exports.renderSummaryLabelValueTagContent)(parsed.label, parsed.value);
72
+ };
73
+ exports.renderSummaryStringTagContent = renderSummaryStringTagContent;
74
+ const renderSummaryStringTags = (items) => ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "center", className: "twa:flex-wrap twa:gap-2", children: items.map((item) => ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: (0, exports.renderSummaryStringTagContent)(item) }, item))) }));
75
+ exports.renderSummaryStringTags = renderSummaryStringTags;
76
+ const summaryStringsToTagContents = (items) => items.map((item) => (0, exports.renderSummaryStringTagContent)(item));
77
+ exports.summaryStringsToTagContents = summaryStringsToTagContents;
78
+ const renderSummaryLabelValueTags = (items) => ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "center", className: "twa:gap-1 twa:flex-wrap", children: items.map(({ label, value, icon }) => ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: (0, exports.renderSummaryLabelValueTagContent)(label, value, icon) }, `${label}-${value}`))) }));
79
+ exports.renderSummaryLabelValueTags = renderSummaryLabelValueTags;
@@ -0,0 +1,34 @@
1
+ import * as React from 'react';
2
+ export declare const 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";
3
+ export declare const getWizardTypeSelectionGridColumns: (choiceCount: number) => 2 | 3;
4
+ export type WizardTypeSelectionCardProps = {
5
+ label: string;
6
+ description?: string;
7
+ selected: boolean;
8
+ disabled?: boolean;
9
+ disabledTooltip?: string;
10
+ dataName: string;
11
+ minHeightClassName?: string;
12
+ onSelect: () => void;
13
+ children?: React.ReactNode;
14
+ footer?: React.ReactNode;
15
+ };
16
+ export declare const WizardTypeSelectionCard: React.FunctionComponent<WizardTypeSelectionCardProps>;
17
+ export type WizardTypeSelectionSectionProps = {
18
+ headingId: string;
19
+ title: string;
20
+ intro: React.ReactNode;
21
+ columns: 2 | 3;
22
+ dataName?: string;
23
+ className?: string;
24
+ children: React.ReactNode;
25
+ };
26
+ export declare const WizardTypeSelectionSection: React.FunctionComponent<WizardTypeSelectionSectionProps>;
27
+ export type WizardNameFieldSectionProps = {
28
+ value: string;
29
+ onChange: (event: React.SyntheticEvent) => void;
30
+ inputDataName?: string;
31
+ placeholder?: string;
32
+ };
33
+ export declare const WizardNameFieldSection: React.FunctionComponent<WizardNameFieldSectionProps>;
34
+ export declare const WizardTypeSelectionPreviewFrame: React.FunctionComponent<React.PropsWithChildren>;