@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,4 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from 'react';
2
3
  import uniq from '../../../Utilities/utils/uniq';
3
4
  import clamp from '../../../Utilities/utils/clamp';
4
5
  import HelpBlock from '../../../components/HelpBlock';
@@ -22,6 +23,8 @@ import { FormatColumnPlaceholderDocsLink } from '../../../Utilities/Constants/Do
22
23
  import { PIVOT_AGGREGATION_TOTAL_COLUMN_TYPE, PIVOT_ANY_TOTAL_COLUMN_TYPE, PIVOT_COLUMN_TOTAL_COLUMN_TYPE, PIVOT_GRAND_TOTAL_COLUMN_TYPE, } from '../../../AdaptableState/Common/AdaptableColumn';
23
24
  import { Box, Flex } from '../../../components/Flex';
24
25
  import { Card } from '../../../components/Card';
26
+ import { isObjectEmpty } from '../../../Utilities/Extensions/ObjectExtensions';
27
+ import { DataSource, InfiniteTableGrid, } from '../../../components/InfiniteTable';
25
28
  const DateFormatPresets = [
26
29
  'MM/dd/yyyy',
27
30
  'dd-MM-yyyy',
@@ -61,6 +64,12 @@ const appendNumberFormatOptions = (items, options) => {
61
64
  appendDisplayFormatItem(items, 'Integer Separator', options.IntegerSeparator);
62
65
  appendDisplayFormatItem(items, 'Prefix', options.Prefix);
63
66
  appendDisplayFormatItem(items, 'Suffix', options.Suffix);
67
+ if (options.ZeroDisplay !== undefined && options.ZeroDisplay !== '0') {
68
+ items.push({
69
+ label: 'Zero Display',
70
+ value: options.ZeroDisplay === '' ? 'Blank' : options.ZeroDisplay,
71
+ });
72
+ }
64
73
  appendDisplayFormatItem(items, 'Content', options.Content);
65
74
  if (options.Multiplier != null && options.Multiplier !== 1) {
66
75
  items.push({ label: 'Multiplier', value: String(options.Multiplier) });
@@ -101,7 +110,14 @@ export const getFormatColumnDisplayFormatSummaryItems = (data) => {
101
110
  return [];
102
111
  }
103
112
  if (isAdaptableNumericFormatPreset(data.DisplayFormat)) {
104
- return [{ label: '', value: `${NUMERIC_PRESET_LABELS[data.DisplayFormat]} Preset` }];
113
+ return [{ label: 'Preset', value: NUMERIC_PRESET_LABELS[data.DisplayFormat] }];
114
+ }
115
+ // Wizard materialises an empty { Formatter, Options: {} } shell while editing;
116
+ // treat it as unset (same as handleFinish in FormatColumnWizard).
117
+ if (data.DisplayFormat &&
118
+ typeof data.DisplayFormat === 'object' &&
119
+ isObjectEmpty(data.DisplayFormat.Options)) {
120
+ return [];
105
121
  }
106
122
  const resolved = resolveDisplayFormat(data.DisplayFormat);
107
123
  if (!resolved) {
@@ -110,9 +126,6 @@ export const getFormatColumnDisplayFormatSummaryItems = (data) => {
110
126
  const items = [];
111
127
  if (resolved.Formatter === 'NumberFormatter') {
112
128
  appendNumberFormatOptions(items, resolved.Options);
113
- if (!items.length) {
114
- items.push({ label: '', value: 'Number Format' });
115
- }
116
129
  return items;
117
130
  }
118
131
  if (resolved.Formatter === 'DateFormatter') {
@@ -124,29 +137,21 @@ export const getFormatColumnDisplayFormatSummaryItems = (data) => {
124
137
  value: options.CustomDisplayFormats.join(', '),
125
138
  });
126
139
  }
127
- if (!items.length) {
128
- items.push({ label: '', value: 'Date Format' });
129
- }
130
140
  return items;
131
141
  }
132
142
  if (resolved.Formatter === 'StringFormatter') {
133
143
  appendStringFormatOptions(items, resolved.Options);
134
- if (!items.length) {
135
- items.push({ label: '', value: 'String Format' });
136
- }
137
144
  return items;
138
145
  }
139
146
  return items;
140
147
  };
141
148
  export const hasFormatColumnDisplayFormat = (data) => getFormatColumnDisplayFormatSummaryItems(data).length > 0;
142
- export const getFormatColumnFormatSummaryValue = (data) => {
149
+ export const getFormatColumnFormatSummaryTagValues = (data) => {
143
150
  const items = getFormatColumnDisplayFormatSummaryItems(data);
144
151
  if (!items.length) {
145
- return 'No Display Format';
152
+ return [];
146
153
  }
147
- return items
148
- .map(({ label, value }) => (label ? `${label}: ${value}` : value))
149
- .join(', ');
154
+ return items.map(({ label, value }) => (label ? `${label}: ${value}` : value));
150
155
  };
151
156
  const renderCustomFormatter = (data, customFormatter, setFormatOption) => {
152
157
  const resolved = resolveDisplayFormat(data.DisplayFormat);
@@ -162,14 +167,11 @@ const renderCustomFormatter = (data, customFormatter, setFormatOption) => {
162
167
  } }) }, customFormatter.id));
163
168
  };
164
169
  export const renderFormatColumnFormatSummary = (data) => {
165
- const items = getFormatColumnDisplayFormatSummaryItems(data);
166
- if (!items.length) {
170
+ const tagValues = getFormatColumnFormatSummaryTagValues(data);
171
+ if (!tagValues.length) {
167
172
  return _jsx(Tag, { children: "No Display Format" });
168
173
  }
169
- if (items.length === 1 && !items[0].label) {
170
- return _jsx(Tag, { children: items[0].value });
171
- }
172
- return (_jsx(Box, { className: "twa:flex twa:flex-col twa:gap-2", children: items.map(({ label, value }) => (_jsxs(Box, { children: [label, " ", _jsx(Tag, { children: value })] }, label))) }));
174
+ return (_jsx(Flex, { alignItems: "center", className: "twa:flex-wrap twa:gap-2", children: tagValues.map((tag) => (_jsx(Tag, { children: tag }, tag))) }));
173
175
  };
174
176
  export const getFormatDisplayTypeForScope = (scope, api) => {
175
177
  if (scope == undefined) {
@@ -266,27 +268,61 @@ export const getFormatDisplayTypeForScope = (scope, api) => {
266
268
  }
267
269
  return undefined;
268
270
  };
271
+ const NUMBER_FORMAT_INPUT_CLASS = 'twa:w-[72px] twa:min-w-[72px] twa:max-w-[72px]';
272
+ const NUMBER_FORMAT_LABEL_COLUMN = {
273
+ name: 'label',
274
+ className: 'ab-FormLayout_column--label twa:whitespace-nowrap',
275
+ };
276
+ const NUMBER_FORMAT_CHECKBOX_CHILDREN_COLUMN = {
277
+ name: 'children',
278
+ className: 'twa:pl-2',
279
+ };
280
+ const NUMBER_FORMAT_VALUE_CHILDREN_COLUMN = {
281
+ name: 'children',
282
+ className: 'twa:pl-2',
283
+ };
284
+ const NUMBER_FORMAT_DIGIT_FORM_SIZES = ['148px', '72px'];
285
+ const NUMBER_FORMAT_VALUE_FORM_SIZES = ['92px', '72px'];
286
+ const NUMBER_FORMAT_CHECKBOX_FORM_SIZES = ['72px', 'auto'];
287
+ const DATE_FORMAT_PRESET_ROW_HEIGHT = 32;
288
+ const DATE_FORMAT_PRESET_HEADER_HEIGHT = 40;
289
+ const DateFormatPresetsTable = ({ onApplyPattern }) => {
290
+ const rows = React.useMemo(() => DateFormatPresets.map((pattern) => ({
291
+ pattern,
292
+ formattedDate: FormatHelper.DateFormatter(new Date(), { Pattern: pattern }) ?? '',
293
+ })), []);
294
+ const columns = React.useMemo(() => ({
295
+ pattern: {
296
+ field: 'pattern',
297
+ header: 'Pattern',
298
+ defaultFlex: 1,
299
+ renderMenuIcon: false,
300
+ },
301
+ formattedDate: {
302
+ field: 'formattedDate',
303
+ header: 'Formatted Date',
304
+ defaultFlex: 1,
305
+ renderMenuIcon: false,
306
+ },
307
+ apply: {
308
+ field: 'pattern',
309
+ header: '',
310
+ defaultWidth: 80,
311
+ align: 'center',
312
+ renderMenuIcon: false,
313
+ render: ({ data }) => (_jsx(SimpleButton, { "data-name": "apply-format-pattern", "data-value": data.pattern, onClick: () => onApplyPattern(data.pattern), children: "Apply" })),
314
+ },
315
+ }), [onApplyPattern]);
316
+ const tableHeight = DATE_FORMAT_PRESET_HEADER_HEIGHT + rows.length * DATE_FORMAT_PRESET_ROW_HEIGHT;
317
+ return (_jsx(DataSource, { data: rows, primaryKey: "pattern", children: _jsx(InfiniteTableGrid, { sortable: false, domProps: { style: { height: tableHeight, width: '100%' } }, columns: columns }) }));
318
+ };
269
319
  const renderDateFormat = (data, _onChange, setFormatOption, scopedCustomFormatters) => {
270
320
  const resolved = resolveDisplayFormat(data.DisplayFormat);
271
321
  if (resolved?.Formatter !== 'DateFormatter') {
272
322
  return null;
273
323
  }
274
- return (_jsxs(Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-3", children: [_jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Format" }), _jsxs(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: ["Either create your own date pattern, or pick one of the presets below \u2014 see the", ' ', _jsx("a", { href: "https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table", target: "_blank", children: "available symbols" }), "."] })] }), _jsx(Card.Body, { children: _jsx(FormLayout, { children: _jsxs(FormRow, { label: "Pattern", children: [_jsx(Input, { "data-name": "pattern", value: resolved.Options.Pattern ?? '', onChange: (e) => setFormatOption('Pattern', e.currentTarget.value), className: "twa:mr-2" }), _jsx("span", { children: resolved.Options.Pattern &&
275
- FormatHelper.DateFormatter(new Date(), resolved.Options, true) })] }) }) })] }), scopedCustomFormatters.length > 0 && (_jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Custom Formats" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Apply a developer-defined formatter to this Column" })] }), _jsx(Card.Body, { children: _jsx(FormLayout, { children: scopedCustomFormatters.map((formatter) => renderCustomFormatter(data, formatter, setFormatOption)) }) })] })), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Presets" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Apply a common date pattern as a starting point" })] }), _jsxs(Card.Body, { children: [_jsx(AdaptableObjectRow, { style: { fontWeight: 'bold' }, colItems: [
276
- { Content: 'Pattern', Size: 1 },
277
- { Content: 'Formatted Date', Size: 1 },
278
- { Content: '', Size: 1 },
279
- ] }), DateFormatPresets.map((Pattern, index) => (_jsx(AdaptableObjectRow, { colItems: [
280
- { Content: Pattern, Size: 1 },
281
- {
282
- Content: FormatHelper.DateFormatter(new Date(), { Pattern }),
283
- Size: 1,
284
- },
285
- {
286
- Content: (_jsx(SimpleButton, { "data-name": "apply-format-pattern", "data-value": Pattern, onClick: () => setFormatOption('Pattern', Pattern), children: "Apply" })),
287
- Size: 1,
288
- },
289
- ] }, index)))] })] })] }));
324
+ return (_jsxs(Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-3", children: [_jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Format" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Enter a Unicode date pattern (e.g. dd/MM/yyyy), or pick a preset below" })] }), _jsx(Card.Body, { children: _jsx(FormLayout, { children: _jsxs(FormRow, { label: "Pattern", children: [_jsx(Input, { "data-name": "pattern", value: resolved.Options.Pattern ?? '', onChange: (e) => setFormatOption('Pattern', e.currentTarget.value), className: "twa:mr-2" }), _jsx("span", { children: resolved.Options.Pattern &&
325
+ FormatHelper.DateFormatter(new Date(), resolved.Options, true) })] }) }) })] }), scopedCustomFormatters.length > 0 && (_jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Custom Formats" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Apply a developer-defined formatter to this Column" })] }), _jsx(Card.Body, { children: _jsx(FormLayout, { children: scopedCustomFormatters.map((formatter) => renderCustomFormatter(data, formatter, setFormatOption)) }) })] })), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Presets" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Apply a common date pattern as a starting point" })] }), _jsx(Card.Body, { className: "twa:px-0 twa:pt-0 twa:pb-1", children: _jsx(DateFormatPresetsTable, { onApplyPattern: (pattern) => setFormatOption('Pattern', pattern) }) })] })] }));
290
326
  };
291
327
  const renderNumberFormat = (data, onChange, setFormatOption, scopedCustomFormatters, api) => {
292
328
  const resolved = resolveDisplayFormat(data.DisplayFormat);
@@ -300,7 +336,9 @@ const renderNumberFormat = (data, onChange, setFormatOption, scopedCustomFormatt
300
336
  const setPreset = (preset) => {
301
337
  onChange({ DisplayFormat: preset });
302
338
  };
303
- const activePreset = isAdaptableNumericFormatPreset(data.DisplayFormat) ? data.DisplayFormat : undefined;
339
+ const activePreset = isAdaptableNumericFormatPreset(data.DisplayFormat)
340
+ ? data.DisplayFormat
341
+ : undefined;
304
342
  const IS_PERCENT = activePreset === 'Percentage';
305
343
  const IS_THOUSAND = activePreset === 'Thousand';
306
344
  const IS_MILLION = activePreset === 'Million';
@@ -317,13 +355,27 @@ const renderNumberFormat = (data, onChange, setFormatOption, scopedCustomFormatt
317
355
  const IS_FX_RATE = activePreset === 'FXRate';
318
356
  const IS_SCIENTIFIC = activePreset === 'Scientific';
319
357
  const showDocumentationLinks = api.internalApi.isDocumentationLinksDisplayed();
320
- return (_jsxs(Flex, { flexDirection: "column", "data-name": 'format-column-display-format', className: "twa:gap-3 twa:p-3", children: [_jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Presets" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Pick a common numeric preset as a starting point" })] }), _jsx(Card.Body, { children: _jsxs(Flex, { flexDirection: "row", className: "twa:m-2", children: [_jsxs(Flex, { flexDirection: "column", className: "twa:mr-6", children: [_jsx(Radio, { "data-name": "preset-dollar", className: "twa:my-1", checked: IS_DOLLAR, onChange: () => setPreset('Dollar'), children: "Dollar" }), _jsx(Radio, { "data-name": "preset-sterling", className: "twa:my-1", checked: IS_STERLING, onChange: () => setPreset('Sterling'), children: "Sterling" }), _jsx(Radio, { "data-name": "preset-euro", className: "twa:my-1", checked: IS_EURO, onChange: () => setPreset('Euro'), children: "Euro" }), _jsx(Radio, { "data-name": "preset-yen", className: "twa:my-1", checked: IS_YEN, onChange: () => setPreset('Yen'), children: "Yen" })] }), _jsxs(Flex, { flexDirection: "column", className: "twa:mr-6", children: [_jsx(Radio, { "data-name": "preset-thousand", className: "twa:my-1", checked: IS_THOUSAND, onChange: () => setPreset('Thousand'), children: "K (Thousand)" }), _jsx(Radio, { "data-name": "preset-million", className: "twa:my-1", checked: IS_MILLION, onChange: () => setPreset('Million'), children: "M (Million)" }), _jsx(Radio, { "data-name": "preset-billion", className: "twa:my-1", checked: IS_BILLION, onChange: () => setPreset('Billion'), children: "B (Billion)" }), _jsx(Radio, { "data-name": "preset-basis-points", className: "twa:my-1", checked: IS_BASIS_POINTS, onChange: () => setPreset('BasisPoints'), children: "bps (Basis Pts)" })] }), _jsxs(Flex, { flexDirection: "column", className: "twa:mr-6", children: [_jsx(Radio, { "data-name": "preset-integer", className: "twa:my-1", checked: IS_INTEGER, onChange: () => setPreset('Integer'), children: "Integer" }), _jsx(Radio, { "data-name": "preset-decimal", className: "twa:my-1", checked: IS_DECIMAL, onChange: () => setPreset('Decimal'), children: "Decimal" }), _jsx(Radio, { "data-name": "preset-percentage", className: "twa:my-1", checked: IS_PERCENT, onChange: () => setPreset('Percentage'), children: "Percentage" }), _jsx(Radio, { "data-name": "preset-scientific", className: "twa:my-1", checked: IS_SCIENTIFIC, onChange: () => setPreset('Scientific'), children: "Scientific" })] }), _jsxs(Flex, { flexDirection: "column", children: [_jsx(Radio, { "data-name": "preset-accounting", className: "twa:my-1", checked: IS_ACCOUNTING, onChange: () => setPreset('Accounting'), children: "Accounting" }), _jsx(Radio, { "data-name": "preset-fx-rate", className: "twa:my-1", checked: IS_FX_RATE, onChange: () => setPreset('FXRate'), children: "FX Rate" }), _jsx(Radio, { "data-name": "preset-bitcoin", className: "twa:my-1", checked: IS_BITCOIN, onChange: () => setPreset('Bitcoin'), children: "Bitcoin" })] })] }) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Format" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Fine-tune digits, separators, prefix / suffix and rounding behaviour" })] }), _jsx(Card.Body, { children: _jsxs(Flex, { flexDirection: "row", children: [_jsxs(FormLayout, { className: "twa:mr-3", children: [_jsx(FormRow, { label: "Fraction Digits", children: _jsx(Input, { "data-name": "fraction-digits", type: "number", min: "0", value: typeof resolved.Options.FractionDigits === 'number'
358
+ return (_jsxs(Flex, { flexDirection: "column", "data-name": 'format-column-display-format', className: "twa:gap-3 twa:p-3", children: [_jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Presets" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Pick a common numeric preset as a starting point" })] }), _jsx(Card.Body, { children: _jsxs(Flex, { flexDirection: "row", className: "twa:m-2", children: [_jsxs(Flex, { flexDirection: "column", className: "twa:mr-6", children: [_jsx(Radio, { "data-name": "preset-dollar", className: "twa:my-1", checked: IS_DOLLAR, onChange: () => setPreset('Dollar'), children: "Dollar" }), _jsx(Radio, { "data-name": "preset-sterling", className: "twa:my-1", checked: IS_STERLING, onChange: () => setPreset('Sterling'), children: "Sterling" }), _jsx(Radio, { "data-name": "preset-euro", className: "twa:my-1", checked: IS_EURO, onChange: () => setPreset('Euro'), children: "Euro" }), _jsx(Radio, { "data-name": "preset-yen", className: "twa:my-1", checked: IS_YEN, onChange: () => setPreset('Yen'), children: "Yen" })] }), _jsxs(Flex, { flexDirection: "column", className: "twa:mr-6", children: [_jsx(Radio, { "data-name": "preset-thousand", className: "twa:my-1", checked: IS_THOUSAND, onChange: () => setPreset('Thousand'), children: "K (Thousand)" }), _jsx(Radio, { "data-name": "preset-million", className: "twa:my-1", checked: IS_MILLION, onChange: () => setPreset('Million'), children: "M (Million)" }), _jsx(Radio, { "data-name": "preset-billion", className: "twa:my-1", checked: IS_BILLION, onChange: () => setPreset('Billion'), children: "B (Billion)" }), _jsx(Radio, { "data-name": "preset-basis-points", className: "twa:my-1", checked: IS_BASIS_POINTS, onChange: () => setPreset('BasisPoints'), children: "bps (Basis Pts)" })] }), _jsxs(Flex, { flexDirection: "column", className: "twa:mr-6", children: [_jsx(Radio, { "data-name": "preset-integer", className: "twa:my-1", checked: IS_INTEGER, onChange: () => setPreset('Integer'), children: "Integer" }), _jsx(Radio, { "data-name": "preset-decimal", className: "twa:my-1", checked: IS_DECIMAL, onChange: () => setPreset('Decimal'), children: "Decimal" }), _jsx(Radio, { "data-name": "preset-percentage", className: "twa:my-1", checked: IS_PERCENT, onChange: () => setPreset('Percentage'), children: "Percentage" }), _jsx(Radio, { "data-name": "preset-scientific", className: "twa:my-1", checked: IS_SCIENTIFIC, onChange: () => setPreset('Scientific'), children: "Scientific" })] }), _jsxs(Flex, { flexDirection: "column", children: [_jsx(Radio, { "data-name": "preset-accounting", className: "twa:my-1", checked: IS_ACCOUNTING, onChange: () => setPreset('Accounting'), children: "Accounting" }), _jsx(Radio, { "data-name": "preset-fx-rate", className: "twa:my-1", checked: IS_FX_RATE, onChange: () => setPreset('FXRate'), children: "FX Rate" }), _jsx(Radio, { "data-name": "preset-bitcoin", className: "twa:my-1", checked: IS_BITCOIN, onChange: () => setPreset('Bitcoin'), children: "Bitcoin" })] })] }) })] }), _jsxs(Card, { shadow: false, className: "twa:pl-0", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Format" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Fine-tune digits, separators, prefix / suffix and rounding behaviour" })] }), _jsx(Card.Body, { className: "twa:px-0 twa:pt-0 twa:pb-1", children: _jsxs(Box, { className: "twa:flex twa:flex-row twa:items-start twa:-ml-0.5", children: [_jsxs(FormLayout, { sizes: NUMBER_FORMAT_DIGIT_FORM_SIZES, columns: [NUMBER_FORMAT_LABEL_COLUMN, { name: 'children' }], className: "twa:mr-6 twa:shrink-0", children: [_jsx(FormRow, { label: "Fraction Digits", children: _jsx(Input, { className: NUMBER_FORMAT_INPUT_CLASS, "data-name": "fraction-digits", type: "number", min: "0", value: typeof resolved.Options.FractionDigits === 'number'
321
359
  ? resolved.Options.FractionDigits
322
360
  : '', onChange: (e) => setFormatOption('FractionDigits', StringExtensions.IsNumeric(e.currentTarget.value)
323
361
  ? clamp(Number(e.currentTarget.value), 0, 20)
324
- : undefined) }) }), _jsx(FormRow, { label: "Integer Digits", children: _jsx(Input, { "data-name": "integer-digits", type: "number", min: "0", value: resolved.Options.IntegerDigits, onChange: (e) => setFormatOption('IntegerDigits', StringExtensions.IsNumeric(e.currentTarget.value)
362
+ : undefined) }) }), _jsx(FormRow, { label: "Integer Digits", children: _jsx(Input, { className: NUMBER_FORMAT_INPUT_CLASS, "data-name": "integer-digits", type: "number", min: "0", value: resolved.Options.IntegerDigits, onChange: (e) => setFormatOption('IntegerDigits', StringExtensions.IsNumeric(e.currentTarget.value)
325
363
  ? clamp(Number(e.currentTarget.value), 0, 20)
326
- : undefined) }) }), _jsx(FormRow, { label: "Fraction Separator", children: _jsx(Input, { "data-name": "fraction-separator", value: resolved.Options.FractionSeparator ?? '', onChange: (e) => setFormatOption('FractionSeparator', e.currentTarget.value) }) }), _jsx(FormRow, { label: "Integer Separator", children: _jsx(Input, { "data-name": "integer-separator", value: resolved.Options.IntegerSeparator ?? '', onChange: (e) => setFormatOption('IntegerSeparator', e.currentTarget.value) }) }), _jsx(FormRow, { label: "Multiplier", children: _jsx(Input, { "data-name": "multiplier", type: "number", value: resolved.Options.Multiplier, onChange: (e) => setFormatOption('Multiplier', Number(e.currentTarget.value)) }) })] }), _jsxs(FormLayout, { className: "twa:mr-3", children: [_jsx(FormRow, { label: "Prefix", children: _jsx(Input, { "data-name": "prefix", value: resolved.Options.Prefix ?? '', onChange: (e) => setFormatOption('Prefix', e.currentTarget.value) }) }), _jsx(FormRow, { label: "Suffix", children: _jsx(Input, { "data-name": "suffix", value: resolved.Options.Suffix ?? '', onChange: (e) => setFormatOption('Suffix', e.currentTarget.value) }) }), _jsx(FormRow, { label: "Parentheses", children: _jsx(CheckBox, { "data-name": "parentheses-checkbox", checked: resolved.Options.Parentheses, onChange: (checked) => setFormatOption('Parentheses', checked) }) }), _jsx(FormRow, { label: "Empty", children: _jsx(CheckBox, { "data-name": "empty-checkbox", checked: resolved.Options.Empty, onChange: (checked) => setFormatOption('Empty', checked) }) })] }), _jsxs(FormLayout, { children: [_jsx(FormRow, { label: "Truncate", children: _jsx(CheckBox, { "data-name": "truncate-checkbox", checked: resolved.Options.Truncate, onChange: (checked) => setFormatOption('Truncate', checked) }) }), _jsx(FormRow, { label: "Round", children: _jsx(CheckBox, { "data-name": "round-checkbox", checked: resolved.Options.Round, onChange: (checked) => setFormatOption('Round', checked) }) }), _jsx(FormRow, { label: "Ceiling", children: _jsx(CheckBox, { "data-name": "ceiling-checkbox", checked: resolved.Options.Ceiling, onChange: (checked) => setFormatOption('Ceiling', checked) }) }), _jsx(FormRow, { label: "Floor", children: _jsx(CheckBox, { "data-name": "floor-checkbox", checked: resolved.Options.Floor, onChange: (checked) => setFormatOption('Floor', checked) }) }), _jsx(FormRow, { label: "Absolute", children: _jsx(CheckBox, { "data-name": "abs-checkbox", checked: resolved.Options.Abs, onChange: (checked) => setFormatOption('Abs', checked) }) }), _jsx(FormRow, { label: "Scientific", children: _jsx(CheckBox, { "data-name": "scientific-checkbox", checked: resolved.Options.Notation === 'scientific', onChange: (checked) => setFormatOption('Notation', checked ? 'scientific' : undefined) }) })] })] }) })] }), scopedCustomFormatters.length > 0 && (_jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Custom Formats" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Apply a developer-defined formatter to this Column" })] }), _jsx(Card.Body, { children: _jsx(Flex, { flexDirection: "row", children: _jsx(FormLayout, { children: scopedCustomFormatters.map((formatter) => renderCustomFormatter(data, formatter, setFormatOption)) }) }) })] })), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Dynamic Content" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Provide dynamic content through the use of Placeholders" })] }), _jsx(Card.Body, { children: _jsxs(FormLayout, { className: "twa:m-2", children: [_jsxs(FormRow, { label: "", children: [_jsx(Textarea, { className: "twa:min-w-[300px] twa:mt-2", rows: 3, placeholder: "", type: 'text', autoFocus: false, value: resolved.Options.Content?.toString() ?? '', onChange: (e) => setFormatOption('Content', e.currentTarget.value) }), showDocumentationLinks && (_jsxs(HelpBlock, { "data-name": "query-documentation", className: "twa:mt-3 twa:mb-2 twa:p-0 twa:text-3", children: [_jsx(ButtonInfo, { className: "twa:mr-2", onClick: () => window.open(FormatColumnPlaceholderDocsLink, '_blank') }), "Learn more about using placeholders"] }))] }), ' '] }) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Examples" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Preview the formatter against sample values" })] }), _jsxs(Card.Body, { children: [_jsx(AdaptableObjectRow, { className: "twa:font-bold", colItems: [
364
+ : undefined) }) }), _jsx(FormRow, { label: "Fraction Separator", children: _jsx(Input, { className: NUMBER_FORMAT_INPUT_CLASS, "data-name": "fraction-separator", value: resolved.Options.FractionSeparator ?? '', onChange: (e) => setFormatOption('FractionSeparator', e.currentTarget.value) }) }), _jsx(FormRow, { label: "Integer Separator", children: _jsx(Input, { className: NUMBER_FORMAT_INPUT_CLASS, "data-name": "integer-separator", value: resolved.Options.IntegerSeparator ?? '', onChange: (e) => setFormatOption('IntegerSeparator', e.currentTarget.value) }) })] }), _jsxs(FormLayout, { sizes: NUMBER_FORMAT_VALUE_FORM_SIZES, columns: [NUMBER_FORMAT_LABEL_COLUMN, NUMBER_FORMAT_VALUE_CHILDREN_COLUMN], className: "twa:mr-5 twa:shrink-0", children: [_jsx(FormRow, { label: "Multiplier", children: _jsx(Input, { className: NUMBER_FORMAT_INPUT_CLASS, "data-name": "multiplier", type: "number", value: resolved.Options.Multiplier, onChange: (e) => setFormatOption('Multiplier', Number(e.currentTarget.value)) }) }), _jsx(FormRow, { label: "Prefix", children: _jsx(Input, { className: NUMBER_FORMAT_INPUT_CLASS, "data-name": "prefix", value: resolved.Options.Prefix ?? '', onChange: (e) => setFormatOption('Prefix', e.currentTarget.value) }) }), _jsx(FormRow, { label: "Suffix", children: _jsx(Input, { className: NUMBER_FORMAT_INPUT_CLASS, "data-name": "suffix", value: resolved.Options.Suffix ?? '', onChange: (e) => setFormatOption('Suffix', e.currentTarget.value) }) }), _jsx(FormRow, { label: "Zero Display", children: _jsx(Input, { className: NUMBER_FORMAT_INPUT_CLASS, "data-name": "zero-display", value: resolved.Options.ZeroDisplay === undefined ||
365
+ resolved.Options.ZeroDisplay === '0'
366
+ ? '0'
367
+ : resolved.Options.ZeroDisplay, onChange: (e) => {
368
+ const value = e.currentTarget.value;
369
+ if (value === '') {
370
+ setFormatOption('ZeroDisplay', '');
371
+ }
372
+ else if (value === '0') {
373
+ setFormatOption('ZeroDisplay', undefined);
374
+ }
375
+ else {
376
+ setFormatOption('ZeroDisplay', value);
377
+ }
378
+ } }) })] }), _jsxs(Flex, { className: "twa:gap-2 twa:shrink-0", children: [_jsxs(FormLayout, { sizes: NUMBER_FORMAT_CHECKBOX_FORM_SIZES, columns: [NUMBER_FORMAT_LABEL_COLUMN, NUMBER_FORMAT_CHECKBOX_CHILDREN_COLUMN], children: [_jsx(FormRow, { label: "Parentheses", children: _jsx(CheckBox, { "data-name": "parentheses-checkbox", checked: resolved.Options.Parentheses, onChange: (checked) => setFormatOption('Parentheses', checked) }) }), _jsx(FormRow, { label: "Empty", children: _jsx(CheckBox, { "data-name": "empty-checkbox", checked: resolved.Options.Empty, onChange: (checked) => setFormatOption('Empty', checked) }) }), _jsx(FormRow, { label: "Truncate", children: _jsx(CheckBox, { "data-name": "truncate-checkbox", checked: resolved.Options.Truncate, onChange: (checked) => setFormatOption('Truncate', checked) }) }), _jsx(FormRow, { label: "Round", children: _jsx(CheckBox, { "data-name": "round-checkbox", checked: resolved.Options.Round, onChange: (checked) => setFormatOption('Round', checked) }) })] }), _jsxs(FormLayout, { sizes: NUMBER_FORMAT_CHECKBOX_FORM_SIZES, columns: [NUMBER_FORMAT_LABEL_COLUMN, { name: 'children' }], children: [_jsx(FormRow, { label: "Ceiling", children: _jsx(CheckBox, { "data-name": "ceiling-checkbox", checked: resolved.Options.Ceiling, onChange: (checked) => setFormatOption('Ceiling', checked) }) }), _jsx(FormRow, { label: "Floor", children: _jsx(CheckBox, { "data-name": "floor-checkbox", checked: resolved.Options.Floor, onChange: (checked) => setFormatOption('Floor', checked) }) }), _jsx(FormRow, { label: "Absolute", children: _jsx(CheckBox, { "data-name": "abs-checkbox", checked: resolved.Options.Abs, onChange: (checked) => setFormatOption('Abs', checked) }) }), _jsx(FormRow, { label: "Scientific", children: _jsx(CheckBox, { "data-name": "scientific-checkbox", checked: resolved.Options.Notation === 'scientific', onChange: (checked) => setFormatOption('Notation', checked ? 'scientific' : undefined) }) })] })] })] }) })] }), scopedCustomFormatters.length > 0 && (_jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Custom Formats" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Apply a developer-defined formatter to this Column" })] }), _jsx(Card.Body, { children: _jsx(Flex, { flexDirection: "row", children: _jsx(FormLayout, { children: scopedCustomFormatters.map((formatter) => renderCustomFormatter(data, formatter, setFormatOption)) }) }) })] })), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Dynamic Content" }), _jsxs(Flex, { alignItems: "center", className: "twa:gap-1 twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: [_jsx(Box, { children: "Provide dynamic content through the use of Placeholders" }), showDocumentationLinks && (_jsx(ButtonInfo, { variant: "text", tone: "accent", tooltip: "Learn more about using placeholders", onClick: () => window.open(FormatColumnPlaceholderDocsLink, '_blank') }))] })] }), _jsx(Card.Body, { children: _jsxs(FormLayout, { className: "twa:m-2", children: [_jsx(FormRow, { label: "", children: _jsx(Textarea, { className: "twa:min-w-[300px] twa:mt-2", rows: 3, placeholder: "", type: 'text', autoFocus: false, value: resolved.Options.Content?.toString() ?? '', onChange: (e) => setFormatOption('Content', e.currentTarget.value) }) }), ' '] }) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Examples" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Preview the formatter against sample values" })] }), _jsxs(Card.Body, { children: [_jsx(AdaptableObjectRow, { className: "twa:font-bold", colItems: [
327
379
  { Content: 'Raw Number', Size: 1 },
328
380
  { Content: 'Formatted Number', Size: 1 },
329
381
  ] }), _jsx(AdaptableObjectRow, { colItems: [
@@ -344,6 +396,12 @@ const renderNumberFormat = (data, onChange, setFormatOption, scopedCustomFormatt
344
396
  Content: FormatHelper.NumberFormatter(0.123, resolved.Options),
345
397
  Size: 1,
346
398
  },
399
+ ] }), _jsx(AdaptableObjectRow, { colItems: [
400
+ { Content: '0', Size: 1 },
401
+ {
402
+ Content: FormatHelper.NumberFormatter(0, resolved.Options),
403
+ Size: 1,
404
+ },
347
405
  ] })] })] })] }));
348
406
  };
349
407
  const renderStringFormat = (data, _onChange, setFormatOption, scopedCustomFormatters, api) => {
@@ -368,7 +426,6 @@ const renderStringFormat = (data, _onChange, setFormatOption, scopedCustomFormat
368
426
  export const FormatColumnFormatWizardSection = (props) => {
369
427
  const { data } = useOnePageAdaptableWizardContext();
370
428
  const adaptable = useAdaptable();
371
- const formatColumnApi = adaptable.api.formatColumnApi;
372
429
  const customDisplayFormatters = adaptable.api.optionsApi.getFormatColumnOptions().customDisplayFormatters ?? [];
373
430
  const update = (updated) => {
374
431
  props.onChange({ ...data, ...updated });
@@ -7,6 +7,5 @@ type FormatColumnRuleWizardSectionProps = {
7
7
  };
8
8
  export declare const hasFormatColumnCondition: (formatColumn: FormatColumn) => boolean;
9
9
  export declare const renderFormatColumnConditionSummary: (formatColumn: FormatColumn, api: AdaptableApi) => React.JSX.Element;
10
- export declare const renderFormatColumnConditionWizardSummary: (formatColumn: FormatColumn) => React.JSX.Element;
11
10
  export declare function FormatColumnRuleWizardSection(props: FormatColumnRuleWizardSectionProps): React.JSX.Element;
12
11
  export {};
@@ -28,10 +28,6 @@ export const renderFormatColumnConditionSummary = (formatColumn, api) => {
28
28
  const expressionText = api.internalApi.getAdaptableQueryExpressionText(rule);
29
29
  return _jsx(Tag, { children: expressionText || 'No Condition' });
30
30
  };
31
- export const renderFormatColumnConditionWizardSummary = (formatColumn) => {
32
- const { api } = useOnePageAdaptableWizardContext();
33
- return renderFormatColumnConditionSummary(formatColumn, api);
34
- };
35
31
  export function FormatColumnRuleWizardSection(props) {
36
32
  const { data, api, moduleInfo } = useOnePageAdaptableWizardContext();
37
33
  if (data.Target && data.Target === 'columnHeader') {
@@ -5,15 +5,16 @@ import { useAdaptable } from '../../AdaptableContext';
5
5
  import { getColumnTypeFriendlyName } from '../../../AdaptableState/Common/AdaptableColumn';
6
6
  import { isScopeColumnIds } from '../../../AdaptableState/Common/ColumnScope';
7
7
  import { Box, Flex } from '../../../components/Flex';
8
- import FormLayout, { FormRow } from '../../../components/FormLayout';
9
8
  import { CheckBox } from '../../../components/CheckBox';
10
- import { Tag } from '../../../components/Tag';
9
+ import { ColumnTag, Tag } from '../../../components/Tag';
10
+ import { CollapsibleWizardCard, CollapsibleWizardValueSummary, getWizardAccordionSectionClassName, renderCompactColumnTags, useWizardCardAccordion, } from '../../Wizard/CollapsibleWizardCard';
11
+ import { cn } from '../../../lib/utils';
11
12
  const FORMAT_COLUMN_ROW_KINDS = ['Data', 'Group', 'Summary', 'Total'];
12
13
  const ROW_KIND_LABELS = {
13
- Data: 'Data (leaf) rows',
14
- Group: 'Group rows',
15
- Summary: 'Summary rows',
16
- Total: 'Total rows',
14
+ Data: 'Data (leaf) Rows',
15
+ Group: 'Group Rows',
16
+ Summary: 'Summary Rows',
17
+ Total: 'Total Rows',
17
18
  };
18
19
  const ROW_KIND_EXCLUDE_KEY = {
19
20
  Data: 'ExcludeDataRows',
@@ -31,6 +32,18 @@ const isRowKindIncluded = (data, kind) => {
31
32
  const collectIncludedRowKinds = (data) => {
32
33
  return FORMAT_COLUMN_ROW_KINDS.filter((k) => isRowKindIncluded(data, k));
33
34
  };
35
+ const isFormatColumnColumnsScopeConfigured = (scope, scopeApi) => {
36
+ if (scopeApi.scopeIsAll(scope)) {
37
+ return true;
38
+ }
39
+ if ('ColumnIds' in scope) {
40
+ return scope.ColumnIds.length > 0;
41
+ }
42
+ if ('DataTypes' in scope) {
43
+ return scope.DataTypes.length > 0;
44
+ }
45
+ return false;
46
+ };
34
47
  const FormatColumnScopeSummaryContent = ({ data, }) => {
35
48
  const adaptable = useAdaptable();
36
49
  const scopeApi = adaptable.api.columnScopeApi;
@@ -39,23 +52,45 @@ const FormatColumnScopeSummaryContent = ({ data, }) => {
39
52
  const showRows = data.Target === 'cell';
40
53
  const includedKinds = collectIncludedRowKinds(data);
41
54
  const allKinds = includedKinds.length === 4;
42
- return (_jsxs(Box, { className: "twa:flex twa:flex-col twa:gap-3", children: [_jsx(Box, { children: scopeApi.scopeIsAll(scope) ? (_jsxs(_Fragment, { children: ["Columns ", _jsx(Tag, { children: "All" })] })) : 'ColumnIds' in scope ? (_jsxs(_Fragment, { children: ["Columns", ' ', columnsInScope.length ? (columnsInScope.map((column) => (_jsx(Tag, { className: "twa:mr-1", children: column.friendlyName }, column.columnId)))) : (_jsx(Tag, { children: "None" }))] })) : 'DataTypes' in scope ? (_jsxs(_Fragment, { children: ["Data Types", ' ', scope.DataTypes.length ? (scope.DataTypes.map((dataType) => (_jsx(Tag, { className: "twa:mr-1", children: getColumnTypeFriendlyName(dataType) }, dataType)))) : (_jsx(Tag, { children: "None" }))] })) : null }), showRows && (_jsxs(Box, { children: ["Rows", ' ', allKinds ? (_jsx(Tag, { children: "All" })) : includedKinds.length === 0 ? (_jsx(Tag, { children: "None" })) : (includedKinds.map((k) => (_jsx(Tag, { className: "twa:mr-1", children: k }, k))))] }))] }));
55
+ return (_jsxs(Box, { className: "twa:flex twa:flex-col twa:gap-3", children: [_jsx(Box, { children: scopeApi.scopeIsAll(scope) ? (_jsxs(_Fragment, { children: ["Columns ", _jsx(Tag, { children: "All" })] })) : 'ColumnIds' in scope ? (_jsxs(_Fragment, { children: ["Columns", ' ', columnsInScope.length ? (columnsInScope.map((column) => (_jsx(ColumnTag, { className: "twa:mr-1", children: column.friendlyName }, column.columnId)))) : (_jsx(Tag, { children: "None" }))] })) : 'DataTypes' in scope ? (_jsxs(_Fragment, { children: ["Data Types", ' ', scope.DataTypes.length ? (scope.DataTypes.map((dataType) => (_jsx(Tag, { className: "twa:mr-1", children: getColumnTypeFriendlyName(dataType) }, dataType)))) : (_jsx(Tag, { children: "None" }))] })) : null }), showRows && (_jsxs(Box, { children: ["Rows", ' ', allKinds ? (_jsx(Tag, { children: "All" })) : includedKinds.length === 0 ? (_jsx(Tag, { children: "None" })) : (includedKinds.map((k) => (_jsx(Tag, { className: "twa:mr-1", children: k }, k))))] }))] }));
43
56
  };
44
57
  export const renderFormatColumnScopeSummary = (data) => {
45
58
  return _jsx(FormatColumnScopeSummaryContent, { data: data });
46
59
  };
60
+ const FormatColumnColumnsScopeSummary = ({ data, }) => {
61
+ const adaptable = useAdaptable();
62
+ const scopeApi = adaptable.api.columnScopeApi;
63
+ const scope = data.Scope;
64
+ const columnsInScope = scopeApi.getColumnsInScope(scope);
65
+ if (scopeApi.scopeIsAll(scope)) {
66
+ return _jsx(CollapsibleWizardValueSummary, { value: _jsx(Tag, { children: "All columns in the row" }) });
67
+ }
68
+ if ('ColumnIds' in scope) {
69
+ return (_jsx(CollapsibleWizardValueSummary, { value: columnsInScope.length ? (_jsx(Flex, { flexWrap: "wrap", className: "twa:gap-1", children: columnsInScope.map((column) => (_jsx(ColumnTag, { children: column.friendlyName }, column.columnId))) })) : (_jsx(Tag, { children: "None" })) }));
70
+ }
71
+ if ('DataTypes' in scope) {
72
+ return (_jsx(CollapsibleWizardValueSummary, { value: scope.DataTypes.length ? (_jsx(Flex, { flexWrap: "wrap", className: "twa:gap-1", children: scope.DataTypes.map((dataType) => (_jsx(Tag, { children: getColumnTypeFriendlyName(dataType) }, dataType))) })) : (_jsx(Tag, { children: "None" })) }));
73
+ }
74
+ return null;
75
+ };
76
+ const FormatColumnRowsScopeSummary = ({ data, }) => {
77
+ const includedKinds = collectIncludedRowKinds(data);
78
+ const allKinds = includedKinds.length === 4;
79
+ return (_jsx(CollapsibleWizardValueSummary, { value: allKinds ? (_jsx(Tag, { children: "All" })) : includedKinds.length === 0 ? (_jsx(Tag, { children: "None" })) : (_jsx(Flex, { flexWrap: "wrap", className: "twa:gap-1", children: includedKinds.map((kind) => (_jsx(Tag, { children: ROW_KIND_LABELS[kind] }, kind))) })) }));
80
+ };
81
+ const FormatColumnRowScopePanel = ({ data, onRowKindChange, }) => (_jsx(Flex, { flexDirection: "column", className: "twa:items-start twa:px-1 twa:py-1", style: { rowGap: 'calc(var(--ab-base-space) * 2)' }, children: FORMAT_COLUMN_ROW_KINDS.map((kind) => (_jsx(CheckBox, { "data-name": `include-${kind.toLowerCase()}-rows-checkbox`, checked: isRowKindIncluded(data, kind), onChange: (checked) => onRowKindChange(kind, checked), children: ROW_KIND_LABELS[kind] }, kind))) }));
47
82
  // ---------------------------------------------------------------------------
48
83
  // Section
49
84
  // ---------------------------------------------------------------------------
50
85
  export const FormatColumnScopeWizardSection = (props) => {
51
86
  const { data, api } = useOnePageAdaptableWizardContext();
87
+ const adaptable = useAdaptable();
88
+ const scopeApi = adaptable.api.columnScopeApi;
52
89
  const handleScopeChange = (Scope) => {
53
90
  const newData = { ...data, Scope };
54
91
  const wholeRow = api.columnScopeApi.scopeIsAll(Scope);
55
92
  if (newData.Rule?.Predicates?.length) {
56
93
  if (wholeRow) {
57
- // if scope is whole row, a predicate cannot be present, so we set the rule
58
- // to be a boolean expression
59
94
  delete newData.Rule.Predicates;
60
95
  newData.Rule.BooleanExpression = '';
61
96
  }
@@ -63,8 +98,6 @@ export const FormatColumnScopeWizardSection = (props) => {
63
98
  const validPredicateIds = new Set(api.formatColumnApi.internalApi.getFormatColumnDefsForScope(Scope).map((def) => def.id));
64
99
  newData.Rule = {
65
100
  Predicates: newData.Rule.Predicates.filter((p) => validPredicateIds.has(p.PredicateId)).filter((predicate) => {
66
- // if there are more than 1 column, then we must eliminate the IN/NotIn predicates
67
- // TODO: this should NOT be required, but the ColumnValueSelector does NOT support creatable values right now
68
101
  if (isScopeColumnIds(Scope) && Scope.ColumnIds.length > 1) {
69
102
  return predicate.PredicateId !== 'In' && predicate.PredicateId !== 'NotIn';
70
103
  }
@@ -85,8 +118,16 @@ export const FormatColumnScopeWizardSection = (props) => {
85
118
  });
86
119
  };
87
120
  const showRowToggles = data.Target === 'cell';
88
- return (_jsxs(Flex, { flexDirection: "column", style: { height: '100%' }, children: [_jsxs(Flex, { flexDirection: "column", className: "twa:flex-1 twa:min-h-0", children: [_jsxs(Flex, { flexDirection: "row", alignItems: "center", className: "twa:p-2 twa:gap-3 twa:border-b twa:mb-2 twa:border-b-foreground/20", children: [_jsx(Box, { className: "twa:text-5 twa:font-medium", children: "Columns" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70", children: "Which Columns the Format Column will be applied to" })] }), _jsx(Box, { className: "twa:flex-1 twa:min-h-0 twa:overflow-auto twa:p-2", children: _jsx(NewScopeComponent, { descriptions: {
89
- rowScope: 'Format all columns in the row',
90
- columnScope: 'Select columns to format',
91
- }, scope: data.Scope, updateScope: handleScopeChange }) })] }), showRowToggles && (_jsxs(Box, { className: "twa:border-t twa:border-border twa:py-3 twa:shrink-0", children: [_jsxs(Flex, { alignItems: "center", className: "twa:gap-3 twa:px-2 twa:pb-2 twa:mb-3 twa:flex-wrap twa:border-b twa:border-b-foreground/20", children: [_jsx(Box, { className: "twa:text-5 twa:font-medium", children: "Rows" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:max-w-[520px]", children: "Which kinds of Rows the Format Column will be applied to" })] }), _jsx(Flex, { flexDirection: "row", className: "twa:gap-6 twa:flex-wrap", children: [FORMAT_COLUMN_ROW_KINDS.slice(0, 2), FORMAT_COLUMN_ROW_KINDS.slice(2)].map((rowKindGroup, groupIndex) => (_jsx(Box, { className: "twa:flex-1 twa:min-w-[220px]", children: _jsx(FormLayout, { sizes: ['180px', '1fr'], children: rowKindGroup.map((kind) => (_jsx(FormRow, { label: `${ROW_KIND_LABELS[kind]}:`, children: _jsx(Flex, { alignItems: "center", className: "twa:ml-2", children: _jsx(CheckBox, { "data-name": `include-${kind.toLowerCase()}-rows-checkbox`, className: "twa:mr-2", checked: isRowKindIncluded(data, kind), onChange: (checked) => handleRowKindChange(kind, checked) }) }) }, kind))) }) }, groupIndex))) })] }))] }));
121
+ const scope = data.Scope;
122
+ const columnsScopeConfigured = isFormatColumnColumnsScopeConfigured(scope, scopeApi);
123
+ const includedRowKinds = collectIncludedRowKinds(data);
124
+ const allRowKindsIncluded = includedRowKinds.length === 4;
125
+ const initialExpandedCardId = columnsScopeConfigured ? null : 'columns';
126
+ const { bindCard, hasExpandedCard, expandedFillsSpace } = useWizardCardAccordion(initialExpandedCardId, { fillExpandedCard: true });
127
+ const columnsCompactSummary = scopeApi.scopeIsAll(scope) ? (_jsx(Tag, { children: "All columns" })) : 'ColumnIds' in scope ? (renderCompactColumnTags(scope.ColumnIds, (columnId) => adaptable.api.columnApi.getFriendlyNameForColumnId(columnId), { emptyLabel: 'No columns' })) : 'DataTypes' in scope ? (_jsx(Flex, { alignItems: "center", className: "twa:gap-1 twa:min-w-0 twa:overflow-hidden", children: scope.DataTypes.length ? (scope.DataTypes.map((dataType) => (_jsx(Tag, { className: "twa:shrink-0", children: getColumnTypeFriendlyName(dataType) }, dataType)))) : (_jsx(Tag, { children: "None" })) })) : null;
128
+ const rowsCompactSummary = allRowKindsIncluded ? (_jsx(Tag, { children: "All" })) : includedRowKinds.length === 0 ? (_jsx(Tag, { children: "None" })) : (_jsx(Flex, { alignItems: "center", className: "twa:gap-1 twa:min-w-0 twa:overflow-hidden", children: includedRowKinds.map((kind) => (_jsx(Tag, { className: "twa:shrink-0", children: kind }, kind))) }));
129
+ return (_jsxs(Box, { className: cn(getWizardAccordionSectionClassName(hasExpandedCard, expandedFillsSpace), 'twa:p-2'), children: [_jsx(CollapsibleWizardCard, { ...bindCard('columns', { fillAvailable: true }), surface: "panel", "data-name": "format-column-scope-columns", title: "Columns", help: "Which Columns the Format Column will be applied to", collapsedHelp: "Columns the Format Column applies to", compactSummary: columnsCompactSummary, summary: _jsx(FormatColumnColumnsScopeSummary, { data: data }), className: "twa:overflow-hidden twa:flex twa:flex-col", bodyClassName: "twa:min-h-[200px] twa:max-h-[420px] twa:overflow-hidden twa:flex twa:flex-col twa:!pt-0 twa:!pb-0 twa:px-1", children: _jsx(Box, { className: "twa:flex-1 twa:min-h-0 twa:overflow-auto twa:h-full", children: _jsx(NewScopeComponent, { descriptions: {
130
+ rowScope: 'Format all Columns in the Row',
131
+ columnScope: 'Select Columns to format',
132
+ }, scope: data.Scope, updateScope: handleScopeChange }) }) }), showRowToggles && (_jsx(CollapsibleWizardCard, { ...bindCard('rows'), surface: "panel", "data-name": "format-column-scope-rows", title: "Rows", help: "Which kinds of Rows the Format Column will be applied to", collapsedHelp: "Row kinds the Format Column applies to", compactSummary: rowsCompactSummary, summary: _jsx(FormatColumnRowsScopeSummary, { data: data }), children: _jsx(FormatColumnRowScopePanel, { data: data, onRowKindChange: handleRowKindChange }) }))] }));
92
133
  };
@@ -57,7 +57,7 @@ export const FormatColumnSettingsWizardSection = (props) => {
57
57
  });
58
58
  };
59
59
  const behaviourSpellingVariant = api.internalApi.getCorrectEnglishVariant('Behaviour');
60
- return (_jsxs(Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-3", children: [_jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Name" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Provide a unique name for the Format Column" })] }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(Input, { ref: nameInputRef, className: "twa:max-w-[300px] twa:w-full", "data-name": "format-column-name", onChange: onNameChange, value: data?.Name ?? '' }) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Target" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[700px]", children: "Choose whether Format Column applies to Column Cells or Column Header (latter doesn't support Conditions)" })] }), _jsx(Card.Body, { children: _jsxs(Flex, { flexDirection: "column", children: [_jsx(TypeRadio, { "data-name": "target-column-cell", text: 'Column Cells', description: "", checked: currentTarget === 'cell', onClick: () => handleTargetChange('cell') }), _jsx(TypeRadio, { "data-name": "target-column-header", text: 'Column Header', description: "", checked: currentTarget === 'columnHeader', onClick: () => handleTargetChange('columnHeader') })] }) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsxs(Box, { className: "twa:font-medium", children: ["Column Group ", behaviourSpellingVariant] }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Choose when the Format Column is applied to the Column Group" })] }), _jsx(Card.Body, { children: _jsxs(RadioGroup, { value: data.ColumnGroupScope || 'Both', name: "columnGroupScope", orientation: "horizontal", onRadioChange: (columnGroupScope) => {
60
+ return (_jsxs(Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-3", children: [_jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Name" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Provide a unique name for the Format Column" })] }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(Input, { ref: nameInputRef, className: "twa:max-w-[300px] twa:w-full", "data-name": "format-column-name", onChange: onNameChange, value: data?.Name ?? '' }) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Target" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[700px]", children: "Choose whether Format Column applies to Column Cells or Column Header (latter doesn't support Conditions)" })] }), _jsx(Card.Body, { children: _jsxs(Flex, { flexDirection: "column", children: [_jsx(TypeRadio, { "data-name": "target-column-cell", text: 'Column Cells', description: "", checked: currentTarget === 'cell', onClick: () => handleTargetChange('cell') }), _jsx(TypeRadio, { "data-name": "target-column-header", text: 'Column Header', description: "", checked: currentTarget === 'columnHeader', onClick: () => handleTargetChange('columnHeader') })] }) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsxs(Box, { className: "twa:font-medium", children: ["Column Group ", behaviourSpellingVariant] }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Choose when the Format Column is applied in a Column Group" })] }), _jsx(Card.Body, { children: _jsxs(RadioGroup, { value: data.ColumnGroupScope || 'Both', name: "columnGroupScope", orientation: "horizontal", onRadioChange: (columnGroupScope) => {
61
61
  props.onChange({
62
62
  ...data,
63
63
  ColumnGroupScope: columnGroupScope,
@@ -6,8 +6,7 @@ type FormatColumnStyleWizardSectionProps = {
6
6
  onChange: (data: FormatColumn) => void;
7
7
  };
8
8
  export declare const hasFormatColumnStyle: (formatColumn: FormatColumn) => boolean;
9
- export declare const getFormatColumnStyleViewValues: (formatColumn: FormatColumn) => string[];
10
- export declare const renderFormatColumnStyleWizardSummary: (data: FormatColumn) => React.JSX.Element;
11
- export declare const renderFormatColumnStyleSummary: (data: FormatColumn, _api: AdaptableApi) => React.JSX.Element;
9
+ export declare const getFormatColumnStyleViewValues: (formatColumn: FormatColumn) => React.ReactNode[];
10
+ export declare const renderFormatColumnStyleSummary: (data: FormatColumn) => React.JSX.Element;
12
11
  export declare function FormatColumnStyleWizardSection(props: FormatColumnStyleWizardSectionProps): React.JSX.Element;
13
12
  export {};
@@ -1,10 +1,11 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { StyleComponent } from '../../Components/StyleComponent';
3
3
  import { useOnePageAdaptableWizardContext } from '../../Wizard/OnePageAdaptableWizard';
4
4
  import UIHelper from '../../UIHelper';
5
5
  import StringExtensions from '../../../Utilities/Extensions/StringExtensions';
6
6
  import { Box } from '../../../components/Flex';
7
7
  import { Tag } from '../../../components/Tag';
8
+ import { isSummaryInTagLabel, renderSummaryLabelValueTagContent, summaryStringsToTagContents, } from '../../Wizard/SummaryColorTag';
8
9
  import { getFormatColumnStylePreviewText } from './FormatColumnPreview';
9
10
  export const isFormatColumnStyleValid = (data, api) => {
10
11
  if (data.Style &&
@@ -60,13 +61,9 @@ export const hasFormatColumnStyle = (formatColumn) => {
60
61
  return getFormatColumnStyleSummaryItems(formatColumn).length > 0;
61
62
  };
62
63
  export const getFormatColumnStyleViewValues = (formatColumn) => {
63
- return getFormatColumnStyleSummaryItems(formatColumn).map(({ label, value }) => `${label}: ${value}`);
64
+ return summaryStringsToTagContents(getFormatColumnStyleSummaryItems(formatColumn).map(({ label, value }) => `${label}: ${value}`));
64
65
  };
65
- export const renderFormatColumnStyleWizardSummary = (data) => {
66
- const { api } = useOnePageAdaptableWizardContext();
67
- return renderFormatColumnStyleSummary(data, api);
68
- };
69
- export const renderFormatColumnStyleSummary = (data, _api) => {
66
+ export const renderFormatColumnStyleSummary = (data) => {
70
67
  const hasStyle = data.Style != null && UIHelper.IsNotEmptyStyle(data.Style);
71
68
  if (!hasStyle) {
72
69
  return _jsx(Tag, { children: "No Style" });
@@ -75,7 +72,7 @@ export const renderFormatColumnStyleSummary = (data, _api) => {
75
72
  if (!items.length) {
76
73
  return _jsx(Tag, { children: "No Style" });
77
74
  }
78
- return (_jsx(Box, { className: "twa:grid twa:grid-cols-2 twa:gap-2", children: items.map(({ label, value }) => (_jsxs(Box, { children: [label, " ", _jsx(Tag, { children: value })] }, label))) }));
75
+ return (_jsx(Box, { className: "twa:grid twa:grid-cols-2 twa:gap-2", children: items.map(({ label, value }) => (_jsx(Box, { children: isSummaryInTagLabel(label) ? (_jsx(Tag, { children: renderSummaryLabelValueTagContent(label, value) })) : (_jsxs(_Fragment, { children: [label, " ", _jsx(Tag, { children: value })] })) }, label))) }));
79
76
  };
80
77
  export function FormatColumnStyleWizardSection(props) {
81
78
  const { data, api } = useOnePageAdaptableWizardContext();
@@ -4,7 +4,7 @@ import { useState } from 'react';
4
4
  import { OnePageAdaptableWizard, OnePageWizardSummary } from '../../Wizard/OnePageAdaptableWizard';
5
5
  import { cloneObject } from '../../../Utilities/Helpers/Helper';
6
6
  import { FormatColumnScopeWizardSection, renderFormatColumnScopeSummary, } from './FormatColumnScopeWizardSection';
7
- import { FormatColumnStyleWizardSection, isFormatColumnStyleValid, renderFormatColumnStyleWizardSummary, } from './FormatColumnStyleWizardSection';
7
+ import { FormatColumnStyleWizardSection, isFormatColumnStyleValid, renderFormatColumnStyleSummary, } from './FormatColumnStyleWizardSection';
8
8
  import { FormatColumnFormatWizardSection, getFormatDisplayTypeForScope, renderFormatColumnFormatSummary, } from './FormatColumnFormatWizardSection';
9
9
  import { useAdaptable } from '../../AdaptableContext';
10
10
  import { FormatColumnSettingsWizardSection, renderFormatColumnSettingsSummary, } from './FormatColumnSettingsWizardSection';
@@ -15,11 +15,11 @@ import { useDispatch } from 'react-redux';
15
15
  import * as FormatColumnRedux from '../../../Redux/ActionsReducers/FormatColumnRedux';
16
16
  import { ObjectTagsWizardSection, renderObjectTagsSummary, } from '../../Wizard/ObjectTagsWizardSection';
17
17
  import { isAdaptableRuleValid } from '../../Components/EntityRulesEditor/Utilities';
18
- import { FormatColumnRuleWizardSection, renderFormatColumnConditionWizardSummary } from './FormatColumnRuleWizardSection';
18
+ import { FormatColumnRuleWizardSection, renderFormatColumnConditionSummary, } from './FormatColumnRuleWizardSection';
19
19
  import { DEFAULT_PREDICATE_ID_FOR_FORMAT_COLUMN } from './constants';
20
20
  import { isObjectEmpty } from '../../../Utilities/Extensions/ObjectExtensions';
21
- import { isAdaptableNumericFormatPreset, } from '../../../AdaptableState/Common/AdaptableFormatPresets';
22
- import { Box, Flex } from '../../../components/Flex';
21
+ import { isAdaptableNumericFormatPreset } from '../../../AdaptableState/Common/AdaptableFormatPresets';
22
+ import { Box } from '../../../components/Flex';
23
23
  import { FormatColumnPreviewSummaryCard } from './FormatColumnPreview';
24
24
  const adjustDisplayFormat = (fc, api) => {
25
25
  const formatColumn = { ...fc };
@@ -101,10 +101,7 @@ export function FormatColumnWizard(props) {
101
101
  // DisplayFormat object so we don't persist an empty shell. Preset
102
102
  // strings are always meaningful and should never be removed here.
103
103
  const df = formatColumn?.DisplayFormat;
104
- if (df &&
105
- !isAdaptableNumericFormatPreset(df) &&
106
- df.Options &&
107
- isObjectEmpty(df.Options)) {
104
+ if (df && !isAdaptableNumericFormatPreset(df) && df.Options && isObjectEmpty(df.Options)) {
108
105
  delete formatColumn.DisplayFormat;
109
106
  }
110
107
  if (formatColumn.Style && isObjectEmpty(formatColumn.Style)) {
@@ -141,9 +138,7 @@ export function FormatColumnWizard(props) {
141
138
  details: 'Select which Columns and Rows will be formatted',
142
139
  isValid: isScopeValid,
143
140
  renderSummary: renderFormatColumnScopeSummary,
144
- render: () => {
145
- return (_jsx(Flex, { flexDirection: "column", className: "twa:h-full", children: _jsx(FormatColumnScopeWizardSection, { onChange: setFormatColumn }) }));
146
- },
141
+ render: () => _jsx(FormatColumnScopeWizardSection, { onChange: setFormatColumn }),
147
142
  },
148
143
  {
149
144
  isValid: (abObject, api, context) => {
@@ -154,7 +149,7 @@ export function FormatColumnWizard(props) {
154
149
  },
155
150
  title: 'Condition',
156
151
  details: 'Build a Rule when the Format Column should be applied',
157
- renderSummary: renderFormatColumnConditionWizardSummary,
152
+ renderSummary: renderFormatColumnConditionSummary,
158
153
  render: () => {
159
154
  return (_jsx(FormatColumnRuleWizardSection, { onChange: setFormatColumn, defaultPredicateId: DEFAULT_PREDICATE_ID_FOR_FORMAT_COLUMN }));
160
155
  },
@@ -163,7 +158,7 @@ export function FormatColumnWizard(props) {
163
158
  title: 'Style',
164
159
  details: 'Create a Style',
165
160
  isValid: isFormatColumnStyleValid,
166
- renderSummary: renderFormatColumnStyleWizardSummary,
161
+ renderSummary: renderFormatColumnStyleSummary,
167
162
  render: () => {
168
163
  return (_jsx(Box, { className: "twa:p-2", children: _jsx(FormatColumnStyleWizardSection, { onChange: setFormatColumn }) }));
169
164
  },
@@ -1,8 +1,7 @@
1
1
  export const getFreeTextColumnSettingsTags = (settings) => {
2
- const { DataType, Width, Filterable, Resizable, Groupable, Sortable, Pivotable, Aggregatable } = settings ?? {};
2
+ const { Width, Filterable, Resizable, Groupable, Sortable, Pivotable, Aggregatable, SuppressMenu, SuppressMovable, } = settings ?? {};
3
3
  const colTypes = settings?.ColumnTypes ? settings.ColumnTypes.join(', ') : '';
4
4
  return [
5
- DataType ? `DataType: ${DataType}` : null,
6
5
  Width ? `Width: ${Width}px` : null,
7
6
  Pivotable ? 'Pivotable' : null,
8
7
  Filterable ? 'Filterable' : null,
@@ -10,6 +9,8 @@ export const getFreeTextColumnSettingsTags = (settings) => {
10
9
  Groupable ? 'Groupable' : null,
11
10
  Sortable ? 'Sortable' : null,
12
11
  Aggregatable ? 'Aggregatable' : null,
12
+ SuppressMenu ? 'Suppress Menu' : null,
13
+ SuppressMovable ? 'Suppress Movable' : null,
13
14
  colTypes ? `Column Types: ${colTypes}` : null,
14
15
  ].filter(Boolean);
15
16
  };