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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (396) hide show
  1. package/icons/sort-asc.svg +1 -1
  2. package/index.css +828 -263
  3. package/package.json +1 -1
  4. package/src/AdaptableOptions/DataSetOptions.d.ts +26 -2
  5. package/src/AdaptableOptions/DefaultAdaptableOptions.js +0 -1
  6. package/src/AdaptableOptions/SettingsPanelOptions.d.ts +42 -10
  7. package/src/AdaptableState/Common/AdaptableFormat.d.ts +7 -0
  8. package/src/AdaptableState/Common/AdaptableMessageType.d.ts +1 -1
  9. package/src/AdaptableState/Common/Enums.d.ts +1 -1
  10. package/src/AdaptableState/Common/Enums.js +1 -1
  11. package/src/AdaptableState/StyledColumnState.d.ts +8 -850
  12. package/src/AdaptableState/StyledColumnState.js +1 -9
  13. package/src/AdaptableState/StyledColumns/BadgeStyle.d.ts +143 -0
  14. package/src/AdaptableState/StyledColumns/BadgeStyle.js +9 -0
  15. package/src/AdaptableState/StyledColumns/BulletChartStyle.d.ts +147 -0
  16. package/src/AdaptableState/StyledColumns/Common/BarChartCellText.d.ts +60 -0
  17. package/src/AdaptableState/StyledColumns/Common/BarChartCellText.js +6 -0
  18. package/src/AdaptableState/StyledColumns/Common/BarChartMarker.d.ts +24 -0
  19. package/src/AdaptableState/StyledColumns/Common/BarChartMarker.js +5 -0
  20. package/src/AdaptableState/StyledColumns/Common/CellTextOptions.d.ts +13 -0
  21. package/src/AdaptableState/StyledColumns/Common/CellTextOptions.js +6 -0
  22. package/src/AdaptableState/StyledColumns/Common/NumericStyledColumn.d.ts +79 -0
  23. package/src/AdaptableState/StyledColumns/Common/NumericStyledColumn.js +9 -0
  24. package/src/AdaptableState/StyledColumns/GradientStyle.d.ts +48 -0
  25. package/src/AdaptableState/StyledColumns/GradientStyle.js +1 -0
  26. package/src/AdaptableState/StyledColumns/IconStyle.d.ts +158 -0
  27. package/src/AdaptableState/StyledColumns/IconStyle.js +1 -0
  28. package/src/AdaptableState/StyledColumns/PercentBarStyle.d.ts +32 -0
  29. package/src/AdaptableState/StyledColumns/PercentBarStyle.js +1 -0
  30. package/src/AdaptableState/StyledColumns/RangeBarStyle.d.ts +155 -0
  31. package/src/AdaptableState/StyledColumns/RangeBarStyle.js +1 -0
  32. package/src/AdaptableState/StyledColumns/RatingStyle.d.ts +111 -0
  33. package/src/AdaptableState/StyledColumns/RatingStyle.js +1 -0
  34. package/src/AdaptableState/StyledColumns/SparklineStyle.d.ts +21 -0
  35. package/src/AdaptableState/StyledColumns/SparklineStyle.js +1 -0
  36. package/src/Api/ColumnScopeApi.d.ts +1 -1
  37. package/src/Api/Implementation/ColumnScopeApiImpl.d.ts +1 -1
  38. package/src/Api/Internal/AlertInternalApi.js +1 -1
  39. package/src/Api/Internal/DataSetInternalApi.d.ts +3 -0
  40. package/src/Api/Internal/DataSetInternalApi.js +73 -13
  41. package/src/Api/Internal/StyledColumnInternalApi.d.ts +3 -1
  42. package/src/Redux/Store/AdaptableStore.js +6 -4
  43. package/src/Strategy/CalculatedColumnModule.js +1 -0
  44. package/src/Strategy/ColumnFilterModule.js +1 -0
  45. package/src/Strategy/FlashingCellModule.js +6 -2
  46. package/src/Strategy/FormatColumnModule.js +2 -2
  47. package/src/Strategy/FreeTextColumnModule.js +38 -28
  48. package/src/Strategy/Interface/IModule.d.ts +3 -1
  49. package/src/Strategy/LayoutModule.js +15 -66
  50. package/src/Strategy/StyledColumnModule.js +12 -29
  51. package/src/Strategy/Utilities/CustomSort/getCustomSortColumnViewItems.d.ts +1 -0
  52. package/src/Strategy/Utilities/CustomSort/getCustomSortColumnViewItems.js +1 -0
  53. package/src/Strategy/Utilities/Export/getExportColumnsViewItems.d.ts +2 -0
  54. package/src/Strategy/Utilities/Export/getExportColumnsViewItems.js +14 -0
  55. package/src/Strategy/Utilities/Export/getExportRowsViewItems.d.ts +1 -0
  56. package/src/Strategy/Utilities/Export/getExportRowsViewItems.js +3 -0
  57. package/src/Strategy/Utilities/Layout/aggregationSummaryHelpers.d.ts +11 -0
  58. package/src/Strategy/Utilities/Layout/aggregationSummaryHelpers.js +105 -0
  59. package/src/Strategy/Utilities/Layout/columnsSummaryHelpers.d.ts +48 -0
  60. package/src/Strategy/Utilities/Layout/columnsSummaryHelpers.js +166 -0
  61. package/src/Strategy/Utilities/Layout/getLayoutSortViewItems.d.ts +1 -0
  62. package/src/Strategy/Utilities/Layout/getLayoutSortViewItems.js +1 -0
  63. package/src/Strategy/Utilities/Layout/rowGroupSummaryHelpers.d.ts +26 -0
  64. package/src/Strategy/Utilities/Layout/rowGroupSummaryHelpers.js +85 -0
  65. package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +3 -5
  66. package/src/Utilities/Defaults/DefaultSettingsPanel.js +46 -41
  67. package/src/Utilities/Helpers/FormatHelper.js +3 -0
  68. package/src/Utilities/Helpers/IconStylePresets.d.ts +1 -1
  69. package/src/Utilities/Helpers/ScheduleHelper.js +2 -0
  70. package/src/Utilities/Helpers/StyleHelper.d.ts +18 -0
  71. package/src/Utilities/Helpers/StyleHelper.js +27 -0
  72. package/src/Utilities/Helpers/StyledColumnGradientHelper.d.ts +3 -1
  73. package/src/Utilities/Helpers/StyledColumnGradientHelper.js +7 -5
  74. package/src/Utilities/Helpers/barChartCellText.d.ts +63 -0
  75. package/src/Utilities/Helpers/barChartCellText.js +316 -0
  76. package/src/Utilities/Helpers/percentBarPreviewHelper.d.ts +2 -1
  77. package/src/Utilities/Helpers/percentBarPreviewHelper.js +3 -8
  78. package/src/Utilities/Helpers/resolveSettingsPanelNavigation.d.ts +3 -0
  79. package/src/Utilities/Helpers/resolveSettingsPanelNavigation.js +15 -0
  80. package/src/Utilities/getScopeViewItems.js +2 -0
  81. package/src/Utilities/wizardSelection.d.ts +10 -0
  82. package/src/Utilities/wizardSelection.js +15 -0
  83. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +2 -2
  84. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.js +2 -2
  85. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +3 -3
  86. package/src/View/Alert/AlertViewPanel.js +2 -2
  87. package/src/View/Alert/Utilities/getAlertButtonStyle.js +7 -4
  88. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.d.ts +0 -1
  89. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +0 -4
  90. package/src/View/Alert/Wizard/AlertButtonsEditor.js +160 -126
  91. package/src/View/Alert/Wizard/AlertMessageWizardSection.d.ts +1 -1
  92. package/src/View/Alert/Wizard/AlertMessageWizardSection.js +1 -2
  93. package/src/View/Alert/Wizard/AlertNotificationWizardSection.d.ts +1 -1
  94. package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +4 -5
  95. package/src/View/Alert/Wizard/AlertScheduledWizardSection.d.ts +1 -1
  96. package/src/View/Alert/Wizard/AlertScheduledWizardSection.js +1 -2
  97. package/src/View/Alert/Wizard/AlertTypeWizardSection.d.ts +1 -1
  98. package/src/View/Alert/Wizard/AlertTypeWizardSection.js +31 -7
  99. package/src/View/Alert/Wizard/AlertWizard.js +13 -5
  100. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.d.ts +2 -1
  101. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +4 -14
  102. package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
  103. package/src/View/BulkUpdate/BulkUpdateViewPanel.js +4 -6
  104. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.d.ts +1 -1
  105. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +1 -2
  106. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
  107. package/src/View/CalculatedColumn/Wizard/CalculatedColumnTypeSection.js +30 -4
  108. package/src/View/CellSummary/CellSummaryViewPanel.js +4 -4
  109. package/src/View/Charting/ShowChartButton.js +8 -8
  110. package/src/View/ColumnInfo/ColumnInfo.js +21 -1
  111. package/src/View/Components/AdaptableObjectCollection/index.js +2 -2
  112. package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +3 -2
  113. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +7 -6
  114. package/src/View/Components/AdaptableObjectList/objectListActionButtonStyles.d.ts +2 -0
  115. package/src/View/Components/AdaptableObjectList/objectListActionButtonStyles.js +2 -0
  116. package/src/View/Components/AdaptableObjectRow/index.js +2 -2
  117. package/src/View/Components/Buttons/ButtonBase/index.js +2 -3
  118. package/src/View/Components/Buttons/ButtonNew.d.ts +2 -0
  119. package/src/View/Components/Buttons/ButtonNew.js +1 -1
  120. package/src/View/Components/Buttons/EntityListActionButtons.js +3 -3
  121. package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.d.ts +1 -0
  122. package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.js +9 -9
  123. package/src/View/Components/ColumnFilter/ColumnFilter.js +16 -4
  124. package/src/View/Components/ColumnFilter/components/ColumnFilterMenu.js +2 -2
  125. package/src/View/Components/ColumnSelector/index.d.ts +12 -0
  126. package/src/View/Components/ColumnSelector/index.js +30 -6
  127. package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicatesEditor.js +2 -2
  128. package/src/View/Components/ModuleValueSelector/index.js +2 -1
  129. package/src/View/Components/NewScopeComponent.js +4 -9
  130. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +5 -4
  131. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +4 -4
  132. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +2 -2
  133. package/src/View/Components/Popups/AdaptablePopup/Navigation.d.ts +3 -2
  134. package/src/View/Components/Popups/AdaptablePopup/Navigation.js +38 -28
  135. package/src/View/Components/Popups/AdaptablePopup/PopupPanel.js +3 -3
  136. package/src/View/Components/Popups/AdaptablePopup/TopBar.js +2 -2
  137. package/src/View/Components/Popups/AdaptablePopup/settingsPanelNavigationTypes.d.ts +11 -0
  138. package/src/View/Components/Popups/AdaptablePopup/settingsPanelNavigationTypes.js +1 -0
  139. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.d.ts +3 -1
  140. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +25 -27
  141. package/src/View/Components/PredicateEditor/PredicateEditor.js +1 -1
  142. package/src/View/Components/RangesComponent.d.ts +4 -5
  143. package/src/View/Components/RangesComponent.js +95 -66
  144. package/src/View/Components/ReorderDraggable/index.js +2 -2
  145. package/src/View/Components/Selectors/BulkUpdateValueSelector.d.ts +0 -2
  146. package/src/View/Components/Selectors/BulkUpdateValueSelector.js +3 -3
  147. package/src/View/Components/StyleComponent.js +32 -65
  148. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +10 -7
  149. package/src/View/Components/ToolPanel/ToolPanelPopup.d.ts +3 -13
  150. package/src/View/Components/ToolPanel/ToolPanelPopup.js +5 -81
  151. package/src/View/Components/ToolPanel/ToolPanelPopupSections.d.ts +17 -0
  152. package/src/View/Components/ToolPanel/ToolPanelPopupSections.js +76 -0
  153. package/src/View/Components/ValueSelector/index.d.ts +29 -0
  154. package/src/View/Components/ValueSelector/index.js +113 -30
  155. package/src/View/Components/wizardColumnListStyles.d.ts +10 -0
  156. package/src/View/Components/wizardColumnListStyles.js +10 -0
  157. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.d.ts +2 -1
  158. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +5 -7
  159. package/src/View/CustomSort/Wizard/CustomSortWizard.js +2 -2
  160. package/src/View/Dashboard/DashboardPopup.d.ts +1 -11
  161. package/src/View/Dashboard/DashboardPopup.js +3 -67
  162. package/src/View/Dashboard/DashboardPopupSections.d.ts +20 -0
  163. package/src/View/Dashboard/DashboardPopupSections.js +68 -0
  164. package/src/View/Dashboard/PinnedToolbarsSelector.js +2 -2
  165. package/src/View/DataChangeHistory/DataChangeHistoryPopup.d.ts +1 -6
  166. package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +8 -20
  167. package/src/View/DataChangeHistory/DataChangeHistoryTable.d.ts +8 -0
  168. package/src/View/DataChangeHistory/DataChangeHistoryTable.js +94 -0
  169. package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +5 -3
  170. package/src/View/DataChangeHistory/buildActionColumnButton.js +30 -39
  171. package/src/View/DataChangeHistory/dataChangeHistoryHelpers.d.ts +15 -0
  172. package/src/View/DataChangeHistory/dataChangeHistoryHelpers.js +37 -0
  173. package/src/View/DataImport/DataImportWizard/DataImportWizard.js +1 -1
  174. package/src/View/DataImport/DataImportWizard/sections/ColumnsSection.js +32 -19
  175. package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +1 -1
  176. package/src/View/DataSet/DataSetViewPanel.d.ts +2 -2
  177. package/src/View/Export/ExportDestinationPicker.js +3 -3
  178. package/src/View/Export/ExportSchedulesTab.js +3 -4
  179. package/src/View/Export/ExportViewPanel.js +2 -2
  180. package/src/View/Export/Wizard/ReportColumnsWizardSection.d.ts +2 -1
  181. package/src/View/Export/Wizard/ReportColumnsWizardSection.js +4 -9
  182. package/src/View/Export/Wizard/ReportRowsWizardSection.d.ts +2 -1
  183. package/src/View/Export/Wizard/ReportRowsWizardSection.js +3 -6
  184. package/src/View/Filter/FilterViewPanel.js +1 -1
  185. package/src/View/FlashingCell/FlashingCellStyle.d.ts +4 -2
  186. package/src/View/FlashingCell/FlashingCellStyle.js +4 -2
  187. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.d.ts +2 -1
  188. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +7 -11
  189. package/src/View/FlashingCell/Wizard/FlashingCellScopeSummary.d.ts +9 -0
  190. package/src/View/FlashingCell/Wizard/FlashingCellScopeSummary.js +5 -0
  191. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.d.ts +1 -1
  192. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +1 -0
  193. package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.d.ts +0 -5
  194. package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.js +1 -5
  195. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +2 -3
  196. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +1 -1
  197. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +99 -42
  198. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +0 -1
  199. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +0 -4
  200. package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +56 -15
  201. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +1 -1
  202. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +2 -3
  203. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +5 -8
  204. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +8 -13
  205. package/src/View/FreeTextColumn/Utilities/getFreeTextColumnSettingsTags.js +3 -2
  206. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +1 -2
  207. package/src/View/GridFilter/GridFilterPopupUI/index.js +3 -2
  208. package/src/View/GridFilter/GridFilterViewPanel.js +5 -5
  209. package/src/View/GridInfo/GridInfoPopup/AdaptableObjectsSummary.js +2 -2
  210. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +2 -2
  211. package/src/View/Layout/LayoutViewPanel.js +1 -1
  212. package/src/View/Layout/Wizard/LayoutWizard.js +24 -28
  213. package/src/View/Layout/Wizard/sections/AggregationsSection.d.ts +13 -1
  214. package/src/View/Layout/Wizard/sections/AggregationsSection.js +73 -33
  215. package/src/View/Layout/Wizard/sections/ColumnsSection.d.ts +4 -1
  216. package/src/View/Layout/Wizard/sections/ColumnsSection.js +155 -276
  217. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.d.ts +4 -1
  218. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +148 -145
  219. package/src/View/Layout/Wizard/sections/PivotColumnsSection.d.ts +5 -2
  220. package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +24 -12
  221. package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.d.ts +4 -1
  222. package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.js +23 -12
  223. package/src/View/Layout/Wizard/sections/RowGroupingSection.d.ts +5 -2
  224. package/src/View/Layout/Wizard/sections/RowGroupingSection.js +19 -12
  225. package/src/View/Layout/Wizard/sections/RowSelectionSection.js +8 -4
  226. package/src/View/Layout/Wizard/sections/RowSummarySection.js +132 -106
  227. package/src/View/Layout/Wizard/sections/SortSection.d.ts +12 -2
  228. package/src/View/Layout/Wizard/sections/SortSection.js +41 -17
  229. package/src/View/Layout/Wizard/sections/columnLayoutCards.d.ts +20 -0
  230. package/src/View/Layout/Wizard/sections/columnLayoutCards.js +159 -0
  231. package/src/View/Layout/Wizard/sections/columnLayoutHelpers.d.ts +30 -0
  232. package/src/View/Layout/Wizard/sections/columnLayoutHelpers.js +201 -0
  233. package/src/View/Layout/Wizard/sections/layoutWizardAccordionHelpers.d.ts +8 -0
  234. package/src/View/Layout/Wizard/sections/layoutWizardAccordionHelpers.js +63 -0
  235. package/src/View/Layout/Wizard/sections/layoutWizardColumns.d.ts +11 -0
  236. package/src/View/Layout/Wizard/sections/layoutWizardColumns.js +52 -0
  237. package/src/View/License/LicenseWatermark.js +1 -1
  238. package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.d.ts +1 -1
  239. package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +1 -2
  240. package/src/View/Note/NoteEditor.js +2 -2
  241. package/src/View/QuickSearch/QuickSearchPopup.js +2 -3
  242. package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +1 -1
  243. package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +1 -1
  244. package/src/View/SmartEdit/SmartEditPopup.js +2 -2
  245. package/src/View/SmartEdit/SmartEditViewPanel.js +2 -2
  246. package/src/View/StateManagement/StateManagementPopup.js +1 -1
  247. package/src/View/StateManagement/components/ExportDropdown.d.ts +2 -2
  248. package/src/View/StateManagement/components/ExportDropdown.js +12 -12
  249. package/src/View/StatusBar/StatusBarPanel.js +2 -2
  250. package/src/View/StatusBar/StatusBarPopup.js +33 -5
  251. package/src/View/StatusBar/statusBarPanelHelpers.d.ts +2 -0
  252. package/src/View/StatusBar/statusBarPanelHelpers.js +7 -0
  253. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +3 -1
  254. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +14 -11
  255. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.d.ts +2 -2
  256. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +143 -119
  257. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.d.ts +1 -3
  258. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.js +8 -14
  259. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +2 -1
  260. package/src/View/StyledColumn/Wizard/StyledColumnTypeThumbnail.d.ts +5 -0
  261. package/src/View/StyledColumn/Wizard/StyledColumnTypeThumbnail.js +50 -0
  262. package/src/View/StyledColumn/Wizard/StyledColumnWizard.d.ts +2 -0
  263. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +26 -5
  264. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +76 -70
  265. package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +2 -1
  266. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +83 -38
  267. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +173 -76
  268. package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +2 -1
  269. package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.d.ts +1 -1
  270. package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.js +32 -46
  271. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarChartCellTextLayoutEditor.d.ts +9 -0
  272. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarChartCellTextLayoutEditor.js +35 -0
  273. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarChartCellTextPreview.d.ts +23 -0
  274. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarChartCellTextPreview.js +57 -0
  275. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.d.ts +1 -1
  276. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.d.ts +2 -1
  277. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.d.ts +1 -1
  278. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +3 -2
  279. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.d.ts +2 -1
  280. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +13 -17
  281. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnChartListPreviews.d.ts +2 -1
  282. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnChartListPreviews.js +5 -5
  283. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.js +2 -2
  284. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.js +14 -7
  285. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +11 -17
  286. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.d.ts +2 -1
  287. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +27 -58
  288. package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +94 -7
  289. package/src/View/UIHelper.d.ts +0 -2
  290. package/src/View/UIHelper.js +8 -23
  291. package/src/View/Wizard/CollapsibleWizardCard.d.ts +68 -0
  292. package/src/View/Wizard/CollapsibleWizardCard.js +81 -0
  293. package/src/View/Wizard/OnePageWizards.js +6 -6
  294. package/src/View/Wizard/SummaryColorTag.d.ts +24 -0
  295. package/src/View/Wizard/SummaryColorTag.js +67 -0
  296. package/src/View/Wizard/WizardTypeSelection.d.ts +34 -0
  297. package/src/View/Wizard/WizardTypeSelection.js +31 -0
  298. package/src/View/Wizard/rowGroupSummaryTags.d.ts +18 -0
  299. package/src/View/Wizard/rowGroupSummaryTags.js +14 -0
  300. package/src/View/Wizard/scopeSummaryTags.d.ts +6 -0
  301. package/src/View/Wizard/scopeSummaryTags.js +33 -0
  302. package/src/agGrid/AgGridAdapter.js +0 -5
  303. package/src/agGrid/AgGridColumnAdapter.js +4 -3
  304. package/src/agGrid/cellRenderers/ActionColumnRenderer.js +4 -7
  305. package/src/agGrid/cellRenderers/BadgeRenderer.js +7 -5
  306. package/src/agGrid/cellRenderers/BulletChartRenderer.js +43 -42
  307. package/src/agGrid/cellRenderers/IconRenderer.d.ts +2 -1
  308. package/src/agGrid/cellRenderers/IconRenderer.js +13 -11
  309. package/src/agGrid/cellRenderers/PercentBarRenderer.js +24 -96
  310. package/src/agGrid/cellRenderers/RangeBarRenderer.js +49 -46
  311. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +1 -1
  312. package/src/components/Card/index.js +5 -6
  313. package/src/components/CheckBox/index.js +2 -3
  314. package/src/components/CodeBlock/index.js +2 -2
  315. package/src/components/ColorPicker/ColorPicker.d.ts +1 -0
  316. package/src/components/ColorPicker/ColorPicker.js +8 -6
  317. package/src/components/ColorPicker/OptionalColorPicker.d.ts +12 -0
  318. package/src/components/ColorPicker/OptionalColorPicker.js +26 -0
  319. package/src/components/ColorPicker/index.d.ts +1 -0
  320. package/src/components/ColorPicker/index.js +1 -0
  321. package/src/components/Combobox/comboboxUtils.d.ts +1 -0
  322. package/src/components/Combobox/index.js +19 -18
  323. package/src/components/Dashboard/DashboardManager.js +2 -4
  324. package/src/components/Dialog/index.js +4 -4
  325. package/src/components/DragAndDropContext/DragAndDropContext.d.ts +5 -0
  326. package/src/components/DragAndDropContext/DragAndDropContext.js +3 -0
  327. package/src/components/DragAndDropContext/ModuleManager.d.ts +15 -3
  328. package/src/components/DragAndDropContext/ModuleManager.js +47 -8
  329. package/src/components/DragAndDropContext/TabList.d.ts +11 -4
  330. package/src/components/DragAndDropContext/TabList.js +52 -38
  331. package/src/components/DragAndDropContext/UnusedPanel.d.ts +4 -3
  332. package/src/components/DragAndDropContext/UnusedPanel.js +15 -11
  333. package/src/components/DragAndDropContext/dragScope.d.ts +6 -0
  334. package/src/components/DragAndDropContext/dragScope.js +26 -0
  335. package/src/components/DragAndDropContext/types.d.ts +7 -0
  336. package/src/components/DropdownButton/index.d.ts +33 -25
  337. package/src/components/DropdownButton/index.js +24 -158
  338. package/src/components/EmptyContent/index.js +2 -2
  339. package/src/components/ErrorBox/index.js +2 -2
  340. package/src/components/ExpressionEditor/BaseEditorInput.js +3 -3
  341. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +3 -3
  342. package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +6 -6
  343. package/src/components/FieldWrap/index.js +2 -2
  344. package/src/components/Flex.js +2 -2
  345. package/src/components/FormLayout/index.d.ts +1 -1
  346. package/src/components/HelpBlock/index.js +3 -3
  347. package/src/components/IconSelector/IconSelector.d.ts +8 -0
  348. package/src/components/IconSelector/IconSelector.js +11 -7
  349. package/src/components/IconSelector/index.d.ts +1 -0
  350. package/src/components/IconSelector/index.js +1 -0
  351. package/src/components/Modal/index.js +2 -2
  352. package/src/components/NewSelect/index.js +11 -1
  353. package/src/components/Panel/index.js +7 -7
  354. package/src/components/Radio/index.d.ts +1 -1
  355. package/src/components/Radio/index.js +8 -6
  356. package/src/components/SimpleButton/index.js +7 -7
  357. package/src/components/StylePreview.js +2 -2
  358. package/src/components/Tabs/index.js +4 -4
  359. package/src/components/Tag/Tag.d.ts +16 -0
  360. package/src/components/Tag/Tag.js +14 -4
  361. package/src/components/Tag/columnScopeTagHelpers.d.ts +8 -0
  362. package/src/components/Tag/columnScopeTagHelpers.js +6 -0
  363. package/src/components/Tag/index.d.ts +1 -1
  364. package/src/components/Tag/index.js +1 -1
  365. package/src/components/Textarea/index.js +2 -3
  366. package/src/components/Toggle/Toggle.d.ts +2 -0
  367. package/src/components/Toggle/Toggle.js +14 -7
  368. package/src/components/Toggle/ToggleGroup.js +2 -2
  369. package/src/components/ToggleButton/index.js +4 -4
  370. package/src/components/Tree/TreeDropdown/index.js +3 -4
  371. package/src/components/WarningBox/index.js +2 -2
  372. package/src/components/icons/sort-asc.js +1 -1
  373. package/src/components/ui/button.d.ts +2 -2
  374. package/src/components/ui/combobox.d.ts +3 -1
  375. package/src/components/ui/combobox.js +2 -2
  376. package/src/components/ui/input-group.d.ts +1 -1
  377. package/src/components/ui/select.js +3 -2
  378. package/src/components/ui/textarea.js +1 -1
  379. package/src/env.js +2 -2
  380. package/src/layout-manager/src/index.js +7 -3
  381. package/src/metamodel/adaptable.metamodel.d.ts +80 -14
  382. package/src/metamodel/adaptable.metamodel.js +1 -1
  383. package/src/migration/VersionUpgrade23.d.ts +27 -31
  384. package/src/migration/VersionUpgrade23.js +110 -29
  385. package/src/types.d.ts +13 -2
  386. package/tsconfig.esm.tsbuildinfo +1 -1
  387. package/src/View/DataChangeHistory/DataChangeHistoryGrid.d.ts +0 -17
  388. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +0 -290
  389. package/src/components/DropdownButton/DropdownButtonItem.d.ts +0 -12
  390. package/src/components/DropdownButton/renderItem.d.ts +0 -14
  391. package/src/components/DropdownButton/renderItem.js +0 -11
  392. package/src/components/DropdownButton/useExpanded.d.ts +0 -24
  393. package/src/components/DropdownButton/useExpanded.js +0 -56
  394. package/src/components/NewDropdownButton/index.d.ts +0 -27
  395. package/src/components/NewDropdownButton/index.js +0 -24
  396. /package/src/{components/DropdownButton/DropdownButtonItem.js → AdaptableState/StyledColumns/BulletChartStyle.js} +0 -0
@@ -1,10 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import DropdownButton from '../../../components/DropdownButton';
3
2
  import ErrorBox from '../../../components/ErrorBox';
4
3
  import FormLayout, { FormRow } from '../../../components/FormLayout';
5
- import HelpBlock from '../../../components/HelpBlock';
6
4
  import SimpleButton from '../../../components/SimpleButton';
5
+ import { ButtonNew } from '../../Components/Buttons/ButtonNew';
7
6
  import { Tag } from '../../../components/Tag';
7
+ import { renderSummaryLabelValueTags, renderSummaryStringTags, } from '../../Wizard/SummaryColorTag';
8
8
  import ObjectFactory from '../../../Utilities/ObjectFactory';
9
9
  import { AdaptableIconSelector } from '../../Components/AdaptableIconSelector';
10
10
  import { PredicateEditor } from '../../Components/PredicateEditor/PredicateEditor';
@@ -22,6 +22,9 @@ import { getCellBoxStyleSummaryItems, getCellFontStyleSummaryItems, StyledColumn
22
22
  import { Card } from '../../../components/Card';
23
23
  import { useAdaptable } from '../../AdaptableContext';
24
24
  import { StyledColumnBadgePreviewCard } from './StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview';
25
+ import { CollapsibleWizardCard, CollapsibleWizardValueSummary, getWizardAccordionSectionClassName, useWizardCardAccordion, } from '../../Wizard/CollapsibleWizardCard';
26
+ import { SingleSelect } from '../../../components/NewSelect';
27
+ import { cn } from '../../../lib/utils';
25
28
  const BADGE_STYLE_FORM_SIZES = ['200px', '1fr'];
26
29
  const SHAPE_CHOICES = [
27
30
  { value: 'Pill', label: 'Pill' },
@@ -38,97 +41,106 @@ const OVERFLOW_CHOICES = [
38
41
  { value: 'Wrap', label: 'Wrap', hint: 'Wrap onto subsequent lines' },
39
42
  { value: 'Scroll', label: 'Scroll', hint: 'Single line; cell scrolls horizontally' },
40
43
  ];
41
- const BadgeEditor = (props) => {
44
+ const badgeCardId = (index) => `badge-${index}`;
45
+ const getBadgePreviewValue = (dataType) => dataType === 'number' || dataType === 'numberArray'
46
+ ? `${DEFAULT_INTEGER_DISPLAY_VALUE}`
47
+ : DEFAULT_STRING_DISPLAY_VALUE;
48
+ const getBadgeDefinitionSummaryItems = (badge, api) => {
49
+ const items = [];
50
+ let rule = 'Always';
51
+ if (badge.Predicate) {
52
+ rule = api.predicateApi.predicateToString(badge.Predicate);
53
+ }
54
+ else if (badge.Expression) {
55
+ rule = badge.Expression.BooleanExpression;
56
+ }
57
+ items.push({ label: 'Rule', value: rule });
58
+ items.push({ label: 'Shape', value: badge.Shape ?? 'Rounded' });
59
+ items.push(...getBadgePillStyleSummaryItems(badge.PillStyle));
60
+ const iconProps = badge.IconProperties;
61
+ if (iconProps?.Icon) {
62
+ items.push({
63
+ label: 'Icon',
64
+ value: 'name' in iconProps.Icon ? iconProps.Icon.name : 'Custom',
65
+ icon: iconProps.Icon,
66
+ });
67
+ }
68
+ if (iconProps?.IconOnly) {
69
+ items.push({ label: 'Icon Only', value: 'Yes' });
70
+ }
71
+ if (iconProps?.Icon && iconProps.Position) {
72
+ items.push({ label: 'Icon Position', value: iconProps.Position });
73
+ }
74
+ if (typeof iconProps?.Gap === 'number') {
75
+ items.push({ label: 'Icon Gap', value: `${iconProps.Gap}px` });
76
+ }
77
+ return items;
78
+ };
79
+ const BadgePreview = ({ badge, density, previewValue }) => (_jsx(Badge, { pillStyle: badge.PillStyle, icon: badge.IconProperties?.Icon, iconPosition: badge.IconProperties?.Position, shape: badge.Shape, density: density, iconGap: badge.IconProperties?.Gap, children: badge.IconProperties?.IconOnly ? '' : previewValue }));
80
+ const BadgeCardSummary = ({ badge, api }) => (_jsx(CollapsibleWizardValueSummary, { value: renderSummaryLabelValueTags(getBadgeDefinitionSummaryItems(badge, api)) }));
81
+ const BadgeEditorForm = (props) => {
42
82
  const { api } = useOnePageAdaptableWizardContext();
43
- const { badge, columnId, onChange, density, index } = props;
83
+ const { badge, columnId, onChange } = props;
44
84
  const predicateDefs = api.styledColumnApi.internalApi.getBadgePredicateDefsForColumn(columnId);
45
- const dataType = api.columnApi.getColumnDataTypeForColumnId(columnId);
46
- const previewValue = dataType === 'number' || dataType == 'numberArray'
47
- ? DEFAULT_INTEGER_DISPLAY_VALUE
48
- : DEFAULT_STRING_DISPLAY_VALUE;
49
85
  const currentShape = badge.Shape ?? 'Rounded';
50
- return (_jsxs(Box, { className: "ab-Badge-Definition-Editor twa:mb-3 twa:rounded-standard twa:border twa:border-border twa:overflow-hidden twa:shadow-sm", children: [_jsxs(Flex, { alignItems: "center", className: "ab-Badge-Definition-Editor__header twa:px-3 twa:py-2 twa:border-b twa:border-border twa:gap-2", children: [_jsx(Box, { className: "twa:flex-1 twa:font-medium twa:text-3", children: `Badge ${index + 1}` }), _jsx(SimpleButton, { icon: "delete", variant: "text", tooltip: "Delete badge", onClick: props.onDelete })] }), _jsx(Box, { className: "twa:p-3", children: _jsxs(FormLayout, { children: [_jsx(FormRow, { label: "Preview", children: _jsx(Badge, { pillStyle: badge.PillStyle, icon: badge.Icon, iconPosition: badge.IconPosition, shape: badge.Shape, density: density, iconGap: badge.IconGap, children: badge.IconOnly ? '' : previewValue }) }), _jsx(FormRow, { label: "Shape", children: _jsx(Box, { className: "twa:ml-2", children: _jsx(RadioGroup, { orientation: "horizontal", name: `ab-badge-shape-${columnId}`, value: currentShape, onRadioChange: (value) => onChange({ ...badge, Shape: value }), className: "twa:gap-3", children: SHAPE_CHOICES.map((choice) => (_jsx(Radio, { value: choice.value, children: choice.label }, choice.value))) }) }) }), _jsx(FormRow, { label: "Style", children: _jsx(BadgePillStyleEditor, { api: api, value: badge.PillStyle, onChange: (next) => {
51
- if (next) {
52
- onChange({ ...badge, PillStyle: next });
53
- }
54
- else {
55
- const cleaned = { ...badge };
56
- delete cleaned.PillStyle;
57
- onChange(cleaned);
58
- }
59
- } }) }), _jsx(FormRow, { label: 'Rule', children: columnId ? (_jsxs(_Fragment, { children: [_jsx(HelpBlock, { className: "twa:text-2 twa:mb-1 twa:mt-2", children: "Create (optional) Rule for when the Badge is displayed; if no Rule provided Badge will always display (unless overriden by another Rule)" }), _jsx(PredicateEditor, { columnId: columnId, predicate: badge.Predicate, predicateDefs: predicateDefs, placeholder: "No Predicate Selected", onChange: (predicate) => {
60
- onChange({
61
- ...badge,
62
- Predicate: predicate,
63
- });
64
- }, onClear: () => onChange({
65
- ...badge,
66
- Predicate: undefined,
67
- }) })] })) : (_jsx(ErrorBox, { children: "Select a column first" })) }), _jsxs(FormRow, { label: "Icon", children: [_jsx(HelpBlock, { className: "twa:text-2 twa:mb-1 twa:mt-2", children: "Select (optional) Icon (and Icon position) to display in the Badge" }), ' ', !badge.Icon || 'name' in badge.Icon ? (_jsx(AdaptableIconSelector, { value: badge?.Icon && 'name' in badge?.Icon ? badge.Icon.name : undefined, onChange: (iconName) => {
68
- if (iconName) {
69
- onChange({
70
- ...badge,
71
- Icon: {
72
- name: iconName,
73
- },
74
- });
75
- }
76
- else {
77
- onChange({
78
- ...badge,
79
- Icon: undefined,
80
- });
81
- }
82
- } })) : (_jsx(AdaptableIconComponent, { icon: badge.Icon }))] }), badge.Icon && (_jsx(FormRow, { label: "Icon Position", children: _jsx(DropdownButton, { columns: ['label'], items: [
83
- {
84
- label: 'Start',
85
- onClick: () => onChange({ ...badge, IconPosition: 'Start' }),
86
- },
87
- {
88
- label: 'End',
89
- onClick: () => onChange({ ...badge, IconPosition: 'End' }),
90
- },
91
- ], children: badge.IconPosition ?? 'Start' }) })), badge.Icon && (_jsx(FormRow, { label: "Show Icon Only", children: _jsx(CheckBox, { checked: badge.IconOnly, onClick: () => onChange({ ...badge, IconOnly: !badge.IconOnly }) }) })), badge.Icon && !badge.IconOnly && (_jsx(FormRow, { label: "Icon Gap", children: _jsxs(Flex, { alignItems: "center", className: "twa:ml-2 twa:gap-2", children: [_jsx(NumberInput, { value: badge.IconGap ?? '', placeholder: "auto", step: 1, min: 0, style: { width: 70 }, onChange: (value) => {
92
- onChange({
93
- ...badge,
94
- IconGap: typeof value === 'number' && value >= 0 ? value : undefined,
95
- });
96
- } }), _jsx(Box, { className: "twa:text-xs twa:opacity-70", children: "px between icon and text \u2014 leave blank to follow Density" })] }) }))] }) })] }));
86
+ const iconProps = badge.IconProperties;
87
+ const hasIcon = Boolean(iconProps?.Icon);
88
+ const updateIconProperties = (patch) => {
89
+ const next = {
90
+ ...(iconProps ?? { Icon: undefined }),
91
+ ...patch,
92
+ };
93
+ if (!next.Icon) {
94
+ const cleaned = { ...badge };
95
+ delete cleaned.IconProperties;
96
+ onChange(cleaned);
97
+ return;
98
+ }
99
+ onChange({ ...badge, IconProperties: next });
100
+ };
101
+ return (_jsxs(Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-2", children: [_jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Shape" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Define shape of the corners for this badge" })] }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(RadioGroup, { orientation: "horizontal", name: `ab-badge-shape-${columnId}`, value: currentShape, onRadioChange: (value) => onChange({ ...badge, Shape: value }), className: "twa:gap-3", children: SHAPE_CHOICES.map((choice) => (_jsx(Radio, { value: choice.value, children: choice.label }, choice.value))) }) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Style" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Colours and font styling for the badge pill" })] }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(BadgePillStyleEditor, { embedded: true, api: api, value: badge.PillStyle, onChange: (next) => {
102
+ if (next) {
103
+ onChange({ ...badge, PillStyle: next });
104
+ }
105
+ else {
106
+ const cleaned = { ...badge };
107
+ delete cleaned.PillStyle;
108
+ onChange(cleaned);
109
+ }
110
+ } }) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Rule" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Optional rule for when this badge is displayed \u2014 leave empty for Badge to always show" })] }), _jsx(Card.Body, { className: "twa:p-1", children: columnId ? (_jsx(PredicateEditor, { columnId: columnId, predicate: badge.Predicate, predicateDefs: predicateDefs, placeholder: "No Predicate Selected", onChange: (predicate) => {
111
+ onChange({
112
+ ...badge,
113
+ Predicate: predicate,
114
+ });
115
+ }, onClear: () => onChange({
116
+ ...badge,
117
+ Predicate: undefined,
118
+ }) })) : (_jsx(ErrorBox, { children: "Select a column first" })) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Icon" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Optional icon inside the badge \u2014 position and spacing apply once an icon is selected" })] }), _jsx(Card.Body, { className: "twa:p-1", children: _jsxs(FormLayout, { children: [_jsx(FormRow, { label: "Icon", children: !iconProps?.Icon || 'name' in iconProps.Icon ? (_jsx(AdaptableIconSelector, { value: iconProps?.Icon && 'name' in iconProps.Icon ? iconProps.Icon.name : undefined, onChange: (iconName) => {
119
+ if (iconName) {
120
+ updateIconProperties({
121
+ Icon: { name: iconName },
122
+ });
123
+ }
124
+ else {
125
+ const cleaned = { ...badge };
126
+ delete cleaned.IconProperties;
127
+ onChange(cleaned);
128
+ }
129
+ } })) : (_jsx(AdaptableIconComponent, { icon: iconProps.Icon })) }), _jsx(FormRow, { label: "Icon Position", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { disabled: !hasIcon, className: "twa:w-full", value: iconProps?.Position ?? 'Start', onValueChange: (v) => updateIconProperties({ Position: v }), items: [
130
+ { value: 'Start', label: 'Start' },
131
+ { value: 'End', label: 'End' },
132
+ ] }) }) }), _jsx(FormRow, { label: "Show Icon Only", children: _jsx(CheckBox, { disabled: !hasIcon, checked: iconProps?.IconOnly, onClick: () => updateIconProperties({ IconOnly: !iconProps?.IconOnly }) }) }), _jsx(FormRow, { label: "Icon Gap", children: _jsxs(Flex, { alignItems: "center", className: "twa:gap-2", children: [_jsx(NumberInput, { disabled: !hasIcon || iconProps?.IconOnly, value: iconProps?.Gap ?? '', placeholder: "auto", step: 1, min: 0, style: { width: 70 }, onChange: (value) => {
133
+ updateIconProperties({
134
+ Gap: typeof value === 'number' && value >= 0 ? value : undefined,
135
+ });
136
+ } }), _jsx(Box, { className: "twa:text-xs twa:opacity-70", children: "px between icon and text \u2014 leave blank to follow Density" })] }) })] }) })] })] }));
97
137
  };
98
138
  export const getStyledColumnBadgeDefinitionViewValueGroups = (styledColumn, api) => {
99
139
  const badgeStyle = styledColumn.BadgeStyle;
100
140
  if (!badgeStyle?.Badges?.length) {
101
141
  return [];
102
142
  }
103
- return badgeStyle.Badges.map((badge, index) => {
104
- const items = [];
105
- let rule = 'Always';
106
- if (badge.Predicate) {
107
- rule = api.predicateApi.predicateToString(badge.Predicate);
108
- }
109
- else if (badge.Expression) {
110
- rule = badge.Expression.BooleanExpression;
111
- }
112
- items.push(`Badge ${index + 1}: ${rule}`);
113
- items.push(`Shape: ${badge.Shape ?? 'Rounded'}`);
114
- getBadgePillStyleSummaryItems(badge.PillStyle).forEach(({ label, value }) => {
115
- items.push(`${label}: ${value}`);
116
- });
117
- if (badge.Icon) {
118
- const iconName = 'name' in badge.Icon ? badge.Icon.name : 'Custom';
119
- items.push(`Icon: ${iconName}`);
120
- }
121
- if (badge.IconOnly) {
122
- items.push('Icon Only: Yes');
123
- }
124
- if (badge.Icon && badge.IconPosition) {
125
- items.push(`Icon Position: ${badge.IconPosition}`);
126
- }
127
- if (typeof badge.IconGap === 'number') {
128
- items.push(`Icon Gap: ${badge.IconGap}px`);
129
- }
130
- return items;
131
- });
143
+ return badgeStyle.Badges.map((badge) => getBadgeDefinitionSummaryItems(badge, api).map(({ label, value }) => `${label}: ${value}`));
132
144
  };
133
145
  export const getStyledColumnBadgeDefinitionViewValues = (styledColumn, api) => {
134
146
  return getStyledColumnBadgeDefinitionViewValueGroups(styledColumn, api).flat();
@@ -161,40 +173,66 @@ export const getStyledColumnBadgeStyleViewValues = (styledColumn, api) => {
161
173
  return items;
162
174
  };
163
175
  export const renderBadgeDefinitionSummaryTags = (styledColumn, api) => {
164
- const groups = getStyledColumnBadgeDefinitionViewValueGroups(styledColumn, api);
165
- if (!groups.length) {
176
+ const badges = styledColumn.BadgeStyle?.Badges;
177
+ if (!badges?.length) {
166
178
  return _jsx(Tag, { children: "No Badges Defined" });
167
179
  }
168
- return (_jsx(Flex, { flexDirection: "column", className: "twa:gap-2", children: groups.map((items, index) => (_jsx(Flex, { alignItems: "center", className: "twa:flex-wrap twa:gap-2", children: items.map((item, itemIndex) => (_jsx(Tag, { children: item }, `${index}-${itemIndex}`))) }, index))) }));
180
+ return (_jsx(Flex, { flexDirection: "column", className: "twa:gap-2", children: badges.map((badge, index) => (_jsxs(Flex, { alignItems: "center", className: "twa:flex-wrap twa:gap-2", children: [_jsxs(Tag, { className: "twa:shrink-0", children: ["Badge ", index + 1] }), renderSummaryLabelValueTags(getBadgeDefinitionSummaryItems(badge, api))] }, index))) }));
169
181
  };
170
182
  export const StyledColumnBadgeDefinitionsView = ({ data }) => {
171
183
  const { api } = useAdaptable();
172
184
  return renderBadgeDefinitionSummaryTags(data, api);
173
185
  };
174
186
  export const renderBadgeSummary = (styledColumn, api) => {
175
- if (!api) {
176
- const { api: adaptableApi } = useOnePageAdaptableWizardContext();
177
- api = adaptableApi;
178
- }
179
187
  return renderBadgeDefinitionSummaryTags(styledColumn, api);
180
188
  };
181
189
  export const StyledColumnBadgeSection = (props) => {
182
- const { data } = useOnePageAdaptableWizardContext();
190
+ const { data, api } = useOnePageAdaptableWizardContext();
183
191
  const badgeStyle = data?.BadgeStyle ?? {};
184
192
  const badges = badgeStyle.Badges ?? [];
185
193
  const currentDensity = badgeStyle.Density ?? 'Normal';
186
- return (_jsxs(Box, { children: [_jsx(Flex, { className: "twa:justify-end", children: _jsx(SimpleButton, { icon: "plus", onClick: () => {
187
- props.onChange({
188
- ...data,
189
- BadgeStyle: {
190
- ...badgeStyle,
191
- Badges: [...badges, ObjectFactory.CreateDefaultStyledColumnBadge()],
192
- },
193
- });
194
- }, children: "Add Badge" }) }), _jsx(Flex, { flexDirection: "column", className: "twa:p-2", children: badges.map((badge, index) => {
195
- const handleEditBadge = (badge) => {
194
+ const dataType = data.ColumnId
195
+ ? api.columnApi.getColumnDataTypeForColumnId(data.ColumnId)
196
+ : 'text';
197
+ const previewValue = getBadgePreviewValue(dataType);
198
+ const { bindCard, hasExpandedCard, expandedFillsSpace, expandedId, setExpandedId } = useWizardCardAccordion(null);
199
+ const handleAddBadge = () => {
200
+ const newIndex = badges.length;
201
+ props.onChange({
202
+ ...data,
203
+ BadgeStyle: {
204
+ ...badgeStyle,
205
+ Badges: [...badges, ObjectFactory.CreateDefaultStyledColumnBadge()],
206
+ },
207
+ });
208
+ setExpandedId(badgeCardId(newIndex));
209
+ };
210
+ const handleDeleteBadge = (index) => {
211
+ const cardId = badgeCardId(index);
212
+ const newBadges = [...badges];
213
+ newBadges.splice(index, 1);
214
+ props.onChange({
215
+ ...data,
216
+ BadgeStyle: {
217
+ ...badgeStyle,
218
+ Badges: newBadges,
219
+ },
220
+ });
221
+ if (expandedId === cardId) {
222
+ setExpandedId(null);
223
+ return;
224
+ }
225
+ if (expandedId?.startsWith('badge-')) {
226
+ const expandedIndex = Number(expandedId.replace('badge-', ''));
227
+ if (!Number.isNaN(expandedIndex) && expandedIndex > index) {
228
+ setExpandedId(badgeCardId(expandedIndex - 1));
229
+ }
230
+ }
231
+ };
232
+ return (_jsxs(Box, { className: cn(getWizardAccordionSectionClassName(hasExpandedCard, expandedFillsSpace), 'twa:p-2'), children: [_jsx(Flex, { className: "twa:justify-end twa:mb-2 twa:shrink-0", children: _jsx(ButtonNew, { onClick: handleAddBadge, children: "Add Badge" }) }), _jsx(Flex, { flexDirection: "column", className: "twa:gap-3 twa:min-h-0", children: badges.map((badge, index) => {
233
+ const handleEditBadge = (nextBadge) => {
196
234
  const newBadges = [...badges];
197
- newBadges[index] = badge;
235
+ newBadges[index] = nextBadge;
198
236
  props.onChange({
199
237
  ...data,
200
238
  BadgeStyle: {
@@ -203,17 +241,7 @@ export const StyledColumnBadgeSection = (props) => {
203
241
  },
204
242
  });
205
243
  };
206
- return (_jsx(BadgeEditor, { index: index, badge: badge, density: currentDensity, columnId: data.ColumnId, onChange: handleEditBadge, onDelete: () => {
207
- const newBadges = [...badges];
208
- newBadges.splice(index, 1);
209
- props.onChange({
210
- ...data,
211
- BadgeStyle: {
212
- ...badgeStyle,
213
- Badges: newBadges,
214
- },
215
- });
216
- } }, index));
244
+ return (_jsx(CollapsibleWizardCard, { ...bindCard(badgeCardId(index)), surface: "panel", "data-name": `styled-column-badge-${index}`, title: `Badge ${index + 1}`, collapsedHelp: false, headerVisual: _jsx(BadgePreview, { badge: badge, density: currentDensity, previewValue: previewValue }), headerActions: _jsx(SimpleButton, { icon: "delete", variant: "text", tooltip: "Delete badge", onClick: () => handleDeleteBadge(index) }), summary: _jsx(BadgeCardSummary, { badge: badge, api: api }), bodyClassName: "twa:!pt-0 twa:overflow-y-auto", children: _jsx(BadgeEditorForm, { badge: badge, columnId: data.ColumnId, onChange: handleEditBadge }) }, badgeCardId(index)));
217
245
  }) })] }));
218
246
  };
219
247
  export const StyledColumnBadgeStyleSection = (props) => {
@@ -260,13 +288,9 @@ export const StyledColumnBadgeStyleSection = (props) => {
260
288
  } }) })] })] }), _jsx(StyledColumnBadgePreviewCard, { data: data })] }));
261
289
  };
262
290
  export const renderBadgeStyleSummary = (styledColumn, api) => {
263
- if (!api) {
264
- const { api: adaptableApi } = useOnePageAdaptableWizardContext();
265
- api = adaptableApi;
266
- }
267
291
  const items = getStyledColumnBadgeStyleViewValues(styledColumn, api);
268
292
  if (!items.length) {
269
293
  return _jsx(Tag, { children: "No Style Defined" });
270
294
  }
271
- return (_jsx(Flex, { alignItems: "center", className: "twa:flex-wrap twa:gap-2", children: items.map((item) => (_jsx(Tag, { children: item }, item))) }));
295
+ return renderSummaryStringTags(items);
272
296
  };
@@ -13,9 +13,7 @@ export interface StyledColumnFontStyleEditorProps {
13
13
  disabled?: boolean;
14
14
  /**
15
15
  * When true, the Alignment row is omitted entirely. Used by Styled Columns
16
- * that own horizontal alignment elsewhere (e.g. Percent Bar's "Auto / Left /
17
- * Center / Right" controls drive `CellTextAlignment`, so showing a second
18
- * Alignment row inside the font editor is confusing).
16
+ * that own horizontal alignment elsewhere (e.g. Badge row layout).
19
17
  */
20
18
  hideAlignment?: boolean;
21
19
  }
@@ -1,12 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
- import { CheckBox } from '../../../components/CheckBox';
4
- import { ColorPicker } from '../../../components/ColorPicker';
3
+ import { OptionalColorPicker } from '../../../components/ColorPicker';
5
4
  import FormLayout, { FormRow } from '../../../components/FormLayout';
6
5
  import { Box, Flex } from '../../../components/Flex';
7
6
  import { NumberInput } from '../../../components/Input/NumberInput';
8
7
  import { SingleSelect } from '../../../components/NewSelect';
9
- import { Tag } from '../../../components/Tag';
8
+ import { renderSummaryLabelValueTags } from '../../Wizard/SummaryColorTag';
10
9
  import { Toggle, ToggleGroup } from '../../../components/Toggle';
11
10
  const FORM_SIZES = ['200px', '1fr'];
12
11
  const FONT_SIZE_ITEMS = [
@@ -46,18 +45,13 @@ export const StyledColumnFontStyleEditor = (props) => {
46
45
  props.onChange(next);
47
46
  }
48
47
  };
49
- const onForeColorChecked = (checked) => {
50
- if (checked) {
51
- update({ ForeColor: font.ForeColor ?? '#000000' });
52
- }
53
- else {
54
- update({ ForeColor: undefined });
55
- }
48
+ const onForeColorChange = (color) => {
49
+ update({ ForeColor: color });
56
50
  };
57
51
  const onAlignmentChange = (alignment) => {
58
52
  update({ Alignment: alignment });
59
53
  };
60
- return (_jsx(Box, { children: _jsxs(FormLayout, { className: "twa:ml-2", sizes: [...FORM_SIZES], children: [_jsx(FormRow, { label: "Text Colour:", children: _jsxs(Flex, { alignItems: "center", className: "twa:ml-2 twa:gap-2", children: [_jsx(CheckBox, { disabled: disabled, checked: !!font.ForeColor, onChange: (checked) => onForeColorChecked(checked), children: "Set" }), _jsx(ColorPicker, { disabled: disabled || !font.ForeColor, api: props.api, value: font.ForeColor || '#000000', onChange: (c) => update({ ForeColor: c }) })] }) }), _jsx(FormRow, { label: "Font:", children: _jsx(Box, { className: disabledClass, children: _jsxs(Flex, { alignItems: "center", className: "twa:ml-2 twa:gap-2 twa:flex-wrap", children: [_jsxs(ToggleGroup, { children: [_jsx(Toggle, { pressed: font.FontStyle === 'Italic', onPressedChange: (pressed) => update({ FontStyle: pressed ? 'Italic' : undefined }), icon: "italic" }), _jsx(Toggle, { pressed: font.FontWeight === 'Bold', onPressedChange: (pressed) => update({ FontWeight: pressed ? 'Bold' : undefined }), icon: "bold" })] }), _jsxs(ToggleGroup, { children: [_jsx(Toggle, { pressed: font.TextDecoration === 'Underline', onPressedChange: (pressed) => update({ TextDecoration: pressed ? 'Underline' : undefined }), icon: "underline" }), _jsx(Toggle, { pressed: font.TextDecoration === 'LineThrough', onPressedChange: (pressed) => update({ TextDecoration: pressed ? 'LineThrough' : undefined }), icon: "strikethrough" }), _jsx(Toggle, { pressed: font.TextDecoration === 'Overline', onPressedChange: (pressed) => update({ TextDecoration: pressed ? 'Overline' : undefined }), icon: "overline" })] }), _jsx(Box, { className: "twa:w-32", children: _jsx(SingleSelect, { placeholder: "Default size", items: FONT_SIZE_ITEMS, value: font.FontSize ?? '', onValueChange: (value) => update({
54
+ return (_jsx(Box, { children: _jsxs(FormLayout, { className: "twa:ml-2", sizes: [...FORM_SIZES], children: [_jsx(FormRow, { label: "Text Colour:", children: _jsx(OptionalColorPicker, { className: "twa:ml-2", disabled: disabled, api: props.api, value: font.ForeColor, defaultColor: "#000000", onChange: onForeColorChange }) }), _jsx(FormRow, { label: "Font:", children: _jsx(Box, { className: disabledClass, children: _jsxs(Flex, { alignItems: "center", className: "twa:ml-2 twa:gap-2 twa:flex-wrap", children: [_jsxs(Flex, { alignItems: "center", className: "twa:gap-2", children: [_jsx(Toggle, { standalone: true, pressed: font.FontStyle === 'Italic', onPressedChange: (pressed) => update({ FontStyle: pressed ? 'Italic' : undefined }), icon: "italic" }), _jsx(Toggle, { standalone: true, pressed: font.FontWeight === 'Bold', onPressedChange: (pressed) => update({ FontWeight: pressed ? 'Bold' : undefined }), icon: "bold" })] }), _jsxs(ToggleGroup, { children: [_jsx(Toggle, { pressed: font.TextDecoration === 'Underline', onPressedChange: (pressed) => update({ TextDecoration: pressed ? 'Underline' : undefined }), icon: "underline" }), _jsx(Toggle, { pressed: font.TextDecoration === 'LineThrough', onPressedChange: (pressed) => update({ TextDecoration: pressed ? 'LineThrough' : undefined }), icon: "strikethrough" }), _jsx(Toggle, { pressed: font.TextDecoration === 'Overline', onPressedChange: (pressed) => update({ TextDecoration: pressed ? 'Overline' : undefined }), icon: "overline" })] }), _jsx(Box, { className: "twa:w-32", children: _jsx(SingleSelect, { placeholder: "Default size", items: FONT_SIZE_ITEMS, value: font.FontSize ?? '', onValueChange: (value) => update({
61
55
  FontSize: (value || undefined),
62
56
  }) }) })] }) }) }), !hideAlignment && (_jsx(FormRow, { label: "Alignment:", children: _jsx(Box, { className: disabledClass, children: _jsx(Flex, { alignItems: "center", className: "twa:ml-2 twa:gap-2", children: _jsxs(ToggleGroup, { children: [_jsx(Toggle, { icon: "align-left", pressed: font.Alignment === 'Left', onPressedChange: (pressed) => onAlignmentChange(pressed ? 'Left' : undefined) }), _jsx(Toggle, { icon: "align-center", pressed: font.Alignment === 'Center', onPressedChange: (pressed) => onAlignmentChange(pressed ? 'Center' : undefined) }), _jsx(Toggle, { icon: "align-right", pressed: font.Alignment === 'Right', onPressedChange: (pressed) => onAlignmentChange(pressed ? 'Right' : undefined) })] }) }) }) }))] }) }));
63
57
  };
@@ -88,7 +82,7 @@ export const StyledColumnCellStyleEditor = (props) => {
88
82
  props.onChange(next);
89
83
  }
90
84
  };
91
- return (_jsx(Box, { children: _jsxs(FormLayout, { className: "twa:ml-2", sizes: [...FORM_SIZES], children: [_jsx(FormRow, { label: "Background:", children: _jsxs(Flex, { alignItems: "center", className: "twa:ml-2 twa:gap-2", children: [_jsx(CheckBox, { disabled: disabled, checked: !!cell.BackColor, onChange: (checked) => update({ BackColor: checked ? cell.BackColor ?? '#ffffff' : undefined }), children: "Set" }), _jsx(ColorPicker, { disabled: disabled || !cell.BackColor, api: props.api, value: cell.BackColor || '#ffffff', onChange: (c) => update({ BackColor: c }) })] }) }), _jsx(FormRow, { label: "Border colour:", children: _jsxs(Flex, { alignItems: "center", className: "twa:ml-2 twa:gap-2", children: [_jsx(CheckBox, { disabled: disabled, checked: !!cell.BorderColor, onChange: (checked) => update({ BorderColor: checked ? cell.BorderColor ?? '#000000' : undefined }), children: "Set" }), _jsx(ColorPicker, { disabled: disabled || !cell.BorderColor, api: props.api, value: cell.BorderColor || '#000000', onChange: (c) => update({ BorderColor: c }) })] }) }), _jsx(FormRow, { label: "Border radius:", children: _jsxs(Flex, { alignItems: "center", className: "twa:ml-2 twa:gap-2", children: [_jsx(NumberInput, { disabled: disabled, className: "twa:w-20", value: cell.BorderRadius, min: 0, max: 64, step: 1, onChange: (v) => update({ BorderRadius: v === undefined || isNaN(Number(v)) ? undefined : v }) }), _jsx(Box, { className: "twa:text-xs twa:opacity-70", children: "px" })] }) })] }) }));
85
+ return (_jsx(Box, { children: _jsxs(FormLayout, { className: "twa:ml-2", sizes: [...FORM_SIZES], children: [_jsx(FormRow, { label: "Background:", children: _jsx(OptionalColorPicker, { className: "twa:ml-2", disabled: disabled, api: props.api, value: cell.BackColor, defaultColor: "#ffffff", onChange: (c) => update({ BackColor: c }) }) }), _jsx(FormRow, { label: "Border colour:", children: _jsx(OptionalColorPicker, { className: "twa:ml-2", disabled: disabled, api: props.api, value: cell.BorderColor, defaultColor: "#000000", onChange: (c) => update({ BorderColor: c }) }) }), _jsx(FormRow, { label: "Border radius:", children: _jsxs(Flex, { alignItems: "center", className: "twa:ml-2 twa:gap-2", children: [_jsx(NumberInput, { disabled: disabled, className: "twa:w-20", value: cell.BorderRadius, min: 0, max: 64, step: 1, onChange: (v) => update({ BorderRadius: v === undefined || isNaN(Number(v)) ? undefined : v }) }), _jsx(Box, { className: "twa:text-xs twa:opacity-70", children: "px" })] }) })] }) }));
92
86
  };
93
87
  /**
94
88
  * Descriptive font properties for summary panels (`Label: value` strings).
@@ -126,7 +120,7 @@ export const renderFontStyleSummaryTags = (font) => {
126
120
  if (!items.length) {
127
121
  return null;
128
122
  }
129
- return (_jsx(Flex, { alignItems: "center", className: "twa:gap-1 twa:flex-wrap", children: items.map(({ label, value }) => (_jsx(Tag, { children: `${label}: ${value}` }, label))) }));
123
+ return renderSummaryLabelValueTags(items);
130
124
  };
131
125
  /**
132
126
  * Descriptive cell box properties for summary panels (`Label: value` strings).
@@ -155,5 +149,5 @@ export const renderCellStyleSummaryTags = (cell) => {
155
149
  if (!items.length) {
156
150
  return null;
157
151
  }
158
- return (_jsx(Flex, { alignItems: "center", className: "twa:gap-1 twa:flex-wrap", children: items.map(({ label, value }) => (_jsx(Tag, { children: `${label}: ${value}` }, label))) }));
152
+ return renderSummaryLabelValueTags(items);
159
153
  };
@@ -4,6 +4,7 @@ import { SingleSelect } from '../../../components/NewSelect';
4
4
  import { useOnePageAdaptableWizardContext } from '../../Wizard/OnePageAdaptableWizard';
5
5
  import FormLayout, { FormRow } from '../../../components/FormLayout';
6
6
  import { Tag } from '../../../components/Tag';
7
+ import { renderSummaryStringTags } from '../../Wizard/SummaryColorTag';
7
8
  import AdaptableInput from '../../Components/AdaptableInput';
8
9
  import { ColorPicker } from '../../../components/ColorPicker';
9
10
  import { CheckBox } from '../../../components/CheckBox';
@@ -95,7 +96,7 @@ export const renderSparklineSummary = (data) => {
95
96
  const items = buildStyledColumnSparklineStyleSummaryStrings(sparkline, {
96
97
  includeEmptyFeatures: true,
97
98
  });
98
- return (_jsx(Flex, { alignItems: "center", className: "twa:flex-wrap twa:gap-2", children: items.map((item) => (_jsx(Tag, { children: item }, item))) }));
99
+ return renderSummaryStringTags(items);
99
100
  };
100
101
  /**
101
102
  * Validation for the Sparkline Settings wizard step.
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export type StyledColumnTypeThumbnailKey = 'gradient' | 'percent' | 'sparkline' | 'badge' | 'bullet' | 'rating' | 'rangeBar' | 'icon';
3
+ export declare const StyledColumnTypeThumbnail: React.FunctionComponent<{
4
+ type: StyledColumnTypeThumbnailKey;
5
+ }>;
@@ -0,0 +1,50 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box } from '../../../components/Flex';
3
+ import { Badge } from '../../Components/Badge';
4
+ import { RatingPreview } from './StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview';
5
+ import { WIZARD_TYPE_SELECTION_PREVIEW_FRAME_CLASS } from '../../Wizard/WizardTypeSelection';
6
+ const THUMBNAIL_FRAME_CLASS = WIZARD_TYPE_SELECTION_PREVIEW_FRAME_CLASS;
7
+ const THUMBNAIL_SVG_CLASS = 'twa:block twa:h-[22px] twa:w-full';
8
+ const DEFAULT_BAR = 'var(--ab-color-accent, #07c)';
9
+ const DEFAULT_TRACK = 'color-mix(in srgb, var(--ab-color-foreground) 30%, transparent)';
10
+ const DEFAULT_MARKER = 'var(--ab-color-foreground, #333)';
11
+ const flagEmoji = (countryCodeAlpha2) => {
12
+ const cc = countryCodeAlpha2.toUpperCase();
13
+ if (cc.length !== 2) {
14
+ return cc;
15
+ }
16
+ const regionalIndicatorBase = 0x1f1a5;
17
+ return String.fromCodePoint(regionalIndicatorBase + cc.charCodeAt(0), regionalIndicatorBase + cc.charCodeAt(1));
18
+ };
19
+ const BadgeThumbnail = () => (_jsx(Box, { className: `${THUMBNAIL_FRAME_CLASS} twa:justify-start`, children: _jsxs("div", { className: "ab-Badge__wrapper ab-Badge__wrapper--truncate", style: { gap: 4 }, children: [_jsx(Badge, { pillStyle: { BackColor: '#e8f5e9', ForeColor: '#2e7d32' }, shape: "Pill", density: "Compact", children: "Buy" }), _jsx(Badge, { pillStyle: { BackColor: '#ffebee', ForeColor: '#c62828' }, shape: "Pill", density: "Compact", children: "Sell" })] }) }));
20
+ const IconThumbnail = () => (_jsx(Box, { className: THUMBNAIL_FRAME_CLASS, style: { gap: 10 }, children: ['US', 'GB', 'FR'].map((code) => (_jsx("span", { className: "ab-IconStyle__glyph", style: {
21
+ fontSize: 18,
22
+ lineHeight: 1,
23
+ display: 'inline-flex',
24
+ alignItems: 'center',
25
+ justifyContent: 'center',
26
+ }, children: flagEmoji(code) }, code))) }));
27
+ const RatingThumbnail = () => (_jsx(Box, { className: THUMBNAIL_FRAME_CLASS, children: _jsx(RatingPreview, { rating: { Max: 5, AllowHalf: true }, value: 3.5 }) }));
28
+ const GradientThumbnail = () => (_jsx(Box, { className: `${THUMBNAIL_FRAME_CLASS} twa:gap-1 twa:px-1`, children: [
29
+ { label: '42', background: '#63be7b' },
30
+ { label: '68', background: '#ffeb84' },
31
+ { label: '91', background: '#f8696b' },
32
+ ].map((cell) => (_jsx(Box, { className: "twa:flex-1 twa:rounded-sm twa:px-1 twa:py-0.5 twa:text-center twa:text-2 twa:leading-tight", style: { background: cell.background, color: '#1a1a1a' }, children: cell.label }, cell.label))) }));
33
+ const PercentBarThumbnail = () => (_jsx(Box, { className: THUMBNAIL_FRAME_CLASS, children: _jsx(Box, { className: "twa:relative twa:h-[6px] twa:w-full twa:rounded-sm", style: { background: DEFAULT_TRACK }, children: _jsx(Box, { className: "twa:absolute twa:top-0 twa:h-full twa:rounded-sm", style: { left: '8%', width: '62%', background: DEFAULT_BAR } }) }) }));
34
+ const BulletThumbnail = () => (_jsx(Box, { className: THUMBNAIL_FRAME_CLASS, children: _jsxs("svg", { className: THUMBNAIL_SVG_CLASS, viewBox: "0 0 100 22", preserveAspectRatio: "none", "aria-hidden": true, children: [_jsx("rect", { x: "0", y: "2", width: "33", height: "18", fill: "#f8696b", opacity: "0.45" }), _jsx("rect", { x: "33", y: "2", width: "34", height: "18", fill: "#ffeb84", opacity: "0.45" }), _jsx("rect", { x: "67", y: "2", width: "33", height: "18", fill: "#63be7b", opacity: "0.45" }), _jsx("rect", { x: "4", y: "7", width: "52", height: "8", rx: "1", fill: DEFAULT_BAR }), _jsx("line", { x1: "78", y1: "3", x2: "78", y2: "19", stroke: DEFAULT_MARKER, strokeWidth: "2.5", vectorEffect: "non-scaling-stroke" })] }) }));
35
+ const RangeBarThumbnail = () => (_jsx(Box, { className: THUMBNAIL_FRAME_CLASS, children: _jsxs("svg", { className: THUMBNAIL_SVG_CLASS, viewBox: "0 0 100 22", preserveAspectRatio: "none", "aria-hidden": true, children: [_jsx("rect", { x: "0", y: "0", width: "100", height: "22", fill: "transparent" }), _jsx("rect", { x: "2", y: "8", width: "96", height: "6", rx: "1", fill: DEFAULT_TRACK }), _jsx("line", { x1: "38", y1: "4", x2: "38", y2: "18", stroke: DEFAULT_MARKER, strokeWidth: "2", vectorEffect: "non-scaling-stroke" }), _jsx("polygon", { points: "72,4 82,11 72,18", fill: DEFAULT_BAR })] }) }));
36
+ const SparklineThumbnail = () => (_jsx(Box, { className: THUMBNAIL_FRAME_CLASS, children: _jsxs("svg", { className: THUMBNAIL_SVG_CLASS, viewBox: "0 0 100 22", preserveAspectRatio: "none", "aria-hidden": true, children: [_jsx("polyline", { points: "0,16 12,12 24,14 36,8 48,10 60,4 72,7 84,3 100,6", fill: "none", stroke: DEFAULT_BAR, strokeWidth: "1.75", vectorEffect: "non-scaling-stroke" }), _jsx("polygon", { points: "0,22 0,16 12,12 24,14 36,8 48,10 60,4 72,7 84,3 100,6 100,22", fill: DEFAULT_BAR, opacity: "0.15" })] }) }));
37
+ const THUMBNAIL_BY_TYPE = {
38
+ badge: BadgeThumbnail,
39
+ icon: IconThumbnail,
40
+ rating: RatingThumbnail,
41
+ gradient: GradientThumbnail,
42
+ percent: PercentBarThumbnail,
43
+ bullet: BulletThumbnail,
44
+ rangeBar: RangeBarThumbnail,
45
+ sparkline: SparklineThumbnail,
46
+ };
47
+ export const StyledColumnTypeThumbnail = ({ type }) => {
48
+ const Thumbnail = THUMBNAIL_BY_TYPE[type];
49
+ return (_jsx(Box, { "aria-hidden": true, className: "twa:w-full", children: _jsx(Thumbnail, {}) }));
50
+ };
@@ -4,4 +4,6 @@ import { StyledColumn } from '../../../AdaptableState/StyledColumnState';
4
4
  export interface StyledColumnWizardProps extends AdaptableOnePageWizardProps<StyledColumn> {
5
5
  isNew: boolean;
6
6
  }
7
+ /** First wizard step to open when editing an existing Styled Column (column menu, settings list, etc.). */
8
+ export declare const getStyledColumnEditDefaultSectionName: (styledColumn: StyledColumn) => string;
7
9
  export declare const StyledColumnWizard: (props: StyledColumnWizardProps) => React.JSX.Element;
@@ -53,10 +53,33 @@ const computeDefaultStyledColumnName = (sc) => {
53
53
  }
54
54
  return `${typeKey}-${sc.ColumnId || 'column'}`;
55
55
  };
56
+ /** First wizard step to open when editing an existing Styled Column (column menu, settings list, etc.). */
57
+ export const getStyledColumnEditDefaultSectionName = (styledColumn) => {
58
+ if (styledColumn.BadgeStyle) {
59
+ return 'Badges';
60
+ }
61
+ if (styledColumn.GradientStyle || styledColumn.PercentBarStyle) {
62
+ return 'Ranges';
63
+ }
64
+ if (styledColumn.BulletChartStyle) {
65
+ return 'Ranges';
66
+ }
67
+ if (styledColumn.RangeBarStyle) {
68
+ return 'Style';
69
+ }
70
+ if (styledColumn.IconStyle) {
71
+ return 'Mappings';
72
+ }
73
+ return 'Style';
74
+ };
56
75
  export const StyledColumnWizard = (props) => {
57
76
  const data = props.data ?? props.popupParams?.value;
58
77
  const popupDefaultCurrentSectionName = props?.popupParams?.config?.defaultCurrentSectionName ?? undefined;
59
- const defaultCurrentSectionName = props.defaultCurrentSectionName ?? popupDefaultCurrentSectionName;
78
+ const hasExistingData = Boolean(data);
79
+ const isEdit = hasExistingData && props.popupParams?.action !== 'New';
80
+ const defaultCurrentSectionName = props.defaultCurrentSectionName ??
81
+ popupDefaultCurrentSectionName ??
82
+ (isEdit ? getStyledColumnEditDefaultSectionName(data) : undefined);
60
83
  const allStyledColumns = useSelector((state) => state.StyledColumn?.StyledColumns ?? []);
61
84
  const [styledColumn, setStyledColumn] = useState(() => {
62
85
  if (data) {
@@ -111,7 +134,7 @@ export const StyledColumnWizard = (props) => {
111
134
  }
112
135
  else if (styledColumn.GradientStyle || styledColumn.PercentBarStyle) {
113
136
  specificSteps.push({
114
- details: 'Define the Cell Ranges or a Column Comparison',
137
+ details: 'Select type of Cell Range and configure contents',
115
138
  renderSummary: renderStyledColumnRangesSummary,
116
139
  render: () => (_jsx(Box, { className: "twa:p-2", children: _jsx(StyledColumnWizardRangesSection, { onChange: setStyledColumn }) })),
117
140
  title: 'Ranges',
@@ -269,9 +292,7 @@ export const StyledColumnWizard = (props) => {
269
292
  isValid: isValidStyledColumnScope,
270
293
  renderSummary: renderStyledColumnScopeSummary,
271
294
  details: 'Select the Column and Rows where Style should render',
272
- render: () => {
273
- return (_jsx(Box, { className: "twa:p-2 twa:h-full", children: _jsx(StyledColumnWizardScopeSection, { isNew: props.isNew, onChange: setStyledColumn }) }));
274
- },
295
+ render: () => (_jsx(StyledColumnWizardScopeSection, { isNew: props.isNew, onChange: setStyledColumn })),
275
296
  title: 'Scope',
276
297
  },
277
298
  ...specificSteps,