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

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 (317) hide show
  1. package/index.css +98 -17
  2. package/package.json +1 -1
  3. package/src/{Utilities → AdaptableState/Aggregations}/weightedAverage.js +1 -1
  4. package/src/AdaptableState/Common/Enums.d.ts +0 -12
  5. package/src/AdaptableState/Common/Enums.js +0 -15
  6. package/src/{Utilities → AdaptableState/Common}/MenuItem.d.ts +4 -4
  7. package/src/{Utilities → AdaptableState/Common}/MenuItem.js +1 -1
  8. package/src/AdaptableState/StyledColumnState.d.ts +8 -850
  9. package/src/AdaptableState/StyledColumnState.js +1 -9
  10. package/src/AdaptableState/StyledColumns/BadgeStyle.d.ts +143 -0
  11. package/src/AdaptableState/StyledColumns/BadgeStyle.js +9 -0
  12. package/src/AdaptableState/StyledColumns/BulletChartStyle.d.ts +147 -0
  13. package/src/AdaptableState/StyledColumns/BulletChartStyle.js +1 -0
  14. package/src/AdaptableState/StyledColumns/Common/BarStyleProperties.d.ts +84 -0
  15. package/src/AdaptableState/StyledColumns/Common/BarStyleProperties.js +5 -0
  16. package/src/AdaptableState/StyledColumns/Common/CellTextOptions.d.ts +13 -0
  17. package/src/AdaptableState/StyledColumns/Common/CellTextOptions.js +6 -0
  18. package/src/AdaptableState/StyledColumns/Common/NumericStyledColumn.d.ts +79 -0
  19. package/src/AdaptableState/StyledColumns/Common/NumericStyledColumn.js +9 -0
  20. package/src/AdaptableState/StyledColumns/GradientStyle.d.ts +48 -0
  21. package/src/AdaptableState/StyledColumns/GradientStyle.js +1 -0
  22. package/src/AdaptableState/StyledColumns/IconStyle.d.ts +158 -0
  23. package/src/AdaptableState/StyledColumns/IconStyle.js +1 -0
  24. package/src/AdaptableState/StyledColumns/PercentBarStyle.d.ts +32 -0
  25. package/src/AdaptableState/StyledColumns/PercentBarStyle.js +1 -0
  26. package/src/AdaptableState/StyledColumns/RangeBarStyle.d.ts +155 -0
  27. package/src/AdaptableState/StyledColumns/RangeBarStyle.js +1 -0
  28. package/src/AdaptableState/StyledColumns/RatingStyle.d.ts +111 -0
  29. package/src/AdaptableState/StyledColumns/RatingStyle.js +1 -0
  30. package/src/AdaptableState/StyledColumns/SparklineStyle.d.ts +21 -0
  31. package/src/AdaptableState/StyledColumns/SparklineStyle.js +1 -0
  32. package/src/Api/ColumnScopeApi.d.ts +1 -1
  33. package/src/Api/Implementation/AlertApiImpl.js +1 -1
  34. package/src/Api/Implementation/ChartingApiImpl.js +1 -1
  35. package/src/Api/Implementation/ColumnScopeApiImpl.d.ts +1 -1
  36. package/src/Api/Implementation/ExportApiImpl.js +1 -1
  37. package/src/Api/Implementation/LayoutHelpers.js +1 -1
  38. package/src/Api/Implementation/QuickSearchApiImpl.js +1 -1
  39. package/src/Api/Implementation/ThemeApiImpl.js +1 -1
  40. package/src/Api/Internal/ActionColumnInternalApi.js +1 -1
  41. package/src/Api/Internal/AlertInternalApi.js +1 -1
  42. package/src/Api/Internal/ChartingInternalApi.js +1 -1
  43. package/src/Api/Internal/ColumnInternalApi.js +1 -1
  44. package/src/Api/Internal/EventInternalApi.js +1 -1
  45. package/src/Api/Internal/ExportInternalApi.js +1 -1
  46. package/src/Api/Internal/FormatColumnInternalApi.js +1 -1
  47. package/src/Api/Internal/GridInternalApi.js +1 -1
  48. package/src/Api/Internal/StyledColumnInternalApi.d.ts +3 -1
  49. package/src/Api/Internal/StyledColumnInternalApi.js +1 -1
  50. package/src/Redux/ActionsReducers/ExportRedux.js +1 -1
  51. package/src/Redux/ActionsReducers/InternalRedux.js +1 -1
  52. package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +1 -1
  53. package/src/Redux/Store/AdaptableReduxMerger.js +2 -4
  54. package/src/Redux/Store/AdaptableStore.js +3 -3
  55. package/src/Strategy/AdaptableModuleBase.d.ts +1 -1
  56. package/src/Strategy/AdaptableModuleBase.js +1 -1
  57. package/src/Strategy/AlertModule.d.ts +1 -1
  58. package/src/Strategy/AlertModule.js +2 -2
  59. package/src/Strategy/BulkUpdateModule.d.ts +1 -1
  60. package/src/Strategy/CalculatedColumnModule.d.ts +2 -2
  61. package/src/Strategy/CellSummaryModule.d.ts +2 -2
  62. package/src/Strategy/ChartingModule.d.ts +1 -1
  63. package/src/Strategy/ChartingModule.js +1 -1
  64. package/src/Strategy/ColumnInfoModule.d.ts +2 -2
  65. package/src/Strategy/CommentModule.d.ts +1 -1
  66. package/src/Strategy/CustomSortModule.d.ts +1 -1
  67. package/src/Strategy/ExportModule.js +2 -2
  68. package/src/Strategy/FlashingCellModule.d.ts +1 -1
  69. package/src/Strategy/FreeTextColumnModule.d.ts +1 -1
  70. package/src/Strategy/GridInfoModule.d.ts +2 -2
  71. package/src/Strategy/LayoutModule.js +1 -1
  72. package/src/Strategy/NoteModule.d.ts +1 -1
  73. package/src/Strategy/PlusMinusModule.d.ts +1 -1
  74. package/src/Strategy/PlusMinusModule.js +1 -1
  75. package/src/Strategy/SettingsPanelModule.d.ts +2 -2
  76. package/src/Strategy/SmartEditModule.d.ts +1 -1
  77. package/src/Strategy/SystemStatusModule.d.ts +2 -2
  78. package/src/Strategy/TeamSharingModule.js +2 -2
  79. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +1 -1
  80. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +1 -1
  81. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +1 -1
  82. package/src/Utilities/Extensions/ArrayExtensions.d.ts +32 -0
  83. package/src/Utilities/Extensions/ArrayExtensions.js +49 -0
  84. package/src/Utilities/Extensions/NumberExtensions.d.ts +21 -0
  85. package/src/Utilities/Extensions/NumberExtensions.js +74 -0
  86. package/src/Utilities/Extensions/ObjectExtensions.d.ts +44 -0
  87. package/src/Utilities/Extensions/ObjectExtensions.js +271 -0
  88. package/src/Utilities/Extensions/StringExtensions.d.ts +26 -0
  89. package/src/Utilities/Extensions/StringExtensions.js +44 -1
  90. package/src/Utilities/Helpers/AdaptableHelper.js +2 -2
  91. package/src/Utilities/Helpers/{alertFormHelper.js → AlertHelper.js} +1 -1
  92. package/src/Utilities/Helpers/DateHelper.js +1 -1
  93. package/src/Utilities/Helpers/{FormatHelper.js → DisplayFormatHelper.js} +1 -1
  94. package/src/Utilities/Helpers/Helper.d.ts +0 -6
  95. package/src/Utilities/Helpers/Helper.js +0 -35
  96. package/src/Utilities/Helpers/{QuickSearchStyleHelper.js → QuickSearchHelper.js} +1 -1
  97. package/src/Utilities/Helpers/{ScheduleHelper.d.ts → Scheduling/ScheduleHelper.d.ts} +1 -1
  98. package/src/Utilities/Helpers/{ScheduleHelper.js → Scheduling/ScheduleHelper.js} +1 -1
  99. package/src/Utilities/Helpers/{ScheduleJobManager.d.ts → Scheduling/ScheduleJobManager.d.ts} +1 -1
  100. package/src/Utilities/Helpers/{ScheduleJobRunner.d.ts → Scheduling/ScheduleJobRunner.d.ts} +1 -1
  101. package/src/Utilities/Helpers/{ScheduledAlertHelper.d.ts → Scheduling/ScheduledAlertHelper.d.ts} +1 -1
  102. package/src/Utilities/Helpers/{ScheduledAlertHelper.js → Scheduling/ScheduledAlertHelper.js} +4 -4
  103. package/src/Utilities/Helpers/{ScheduledJobsMiddlewareHelper.d.ts → Scheduling/ScheduledJobsMiddlewareHelper.d.ts} +1 -1
  104. package/src/Utilities/Helpers/{ScheduledJobsMiddlewareHelper.js → Scheduling/ScheduledJobsMiddlewareHelper.js} +1 -1
  105. package/src/Utilities/Helpers/{ScheduledReportHelper.d.ts → Scheduling/ScheduledReportHelper.d.ts} +1 -1
  106. package/src/Utilities/Helpers/{ScheduledReportHelper.js → Scheduling/ScheduledReportHelper.js} +1 -1
  107. package/src/Utilities/Helpers/SettingsPanelHelper.d.ts +5 -0
  108. package/src/Utilities/{Defaults/DefaultSettingsPanel.js → Helpers/SettingsPanelHelper.js} +14 -0
  109. package/src/Utilities/Helpers/StyledColumns/BarStylesHelper.d.ts +63 -0
  110. package/src/Utilities/Helpers/StyledColumns/BarStylesHelper.js +317 -0
  111. package/src/Utilities/Helpers/{StyledColumnGradientHelper.d.ts → StyledColumns/GradientStyleHelper.d.ts} +4 -2
  112. package/src/Utilities/Helpers/{StyledColumnGradientHelper.js → StyledColumns/GradientStyleHelper.js} +3 -3
  113. package/src/Utilities/Helpers/{IconStylePresets.d.ts → StyledColumns/IconStyleHelper.d.ts} +6 -1
  114. package/src/Utilities/Helpers/{IconStylePresets.js → StyledColumns/IconStyleHelper.js} +15 -0
  115. package/src/Utilities/Helpers/{percentBarPreviewHelper.d.ts → StyledColumns/PercentBarStyleHelper.d.ts} +2 -1
  116. package/src/Utilities/Helpers/{percentBarPreviewHelper.js → StyledColumns/PercentBarStyleHelper.js} +7 -12
  117. package/src/Utilities/Helpers/{SparklineOptionsHelper.js → StyledColumns/SparklineStyleHelper.js} +1 -1
  118. package/src/Utilities/Helpers/StyledColumns/StyledColumnHelper.d.ts +52 -0
  119. package/src/{agGrid/cellRenderers/shouldRenderStyledColumnOnRow.js → Utilities/Helpers/StyledColumns/StyledColumnHelper.js} +64 -2
  120. package/src/Utilities/Helpers/TimingHelper.d.ts +34 -0
  121. package/src/Utilities/{utils/debounce.js → Helpers/TimingHelper.js} +23 -9
  122. package/src/Utilities/ObjectFactory.js +1 -1
  123. package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +2 -0
  124. package/src/Utilities/Services/CalculatedColumnExpressionService.js +114 -1
  125. package/src/Utilities/Services/LicenseService/index.js +1 -1
  126. package/src/Utilities/Services/RowSummaryService.d.ts +1 -1
  127. package/src/Utilities/Services/RowSummaryService.js +4 -4
  128. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +1 -1
  129. package/src/View/Alert/Utilities/getAlertType.js +1 -1
  130. package/src/View/Alert/Utilities/getDefaultAlertDefinition.js +1 -1
  131. package/src/View/Alert/Utilities/mapAlertDefinition.js +1 -1
  132. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +1 -1
  133. package/src/View/Alert/Wizard/AlertButtonsEditor.js +160 -127
  134. package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +3 -3
  135. package/src/View/Alert/Wizard/AlertRulesWizardSection.js +1 -1
  136. package/src/View/Alert/Wizard/AlertScheduledWizardSection.js +1 -1
  137. package/src/View/Alert/Wizard/AlertScopeWizardSection.js +1 -1
  138. package/src/View/Alert/Wizard/AlertWizard.js +10 -2
  139. package/src/View/Alert/Wizard/isValidAlertRules.js +1 -1
  140. package/src/View/Charting/ChartingWizard/AgChargingWizard/PreviewChartSection.js +1 -1
  141. package/src/View/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +1 -1
  142. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +1 -1
  143. package/src/View/Comments/CommentsEditor.js +1 -1
  144. package/src/View/Comments/CommentsPopup.js +1 -1
  145. package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +3 -2
  146. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +3 -2
  147. package/src/View/Components/AdaptableObjectList/objectListActionButtonStyles.d.ts +2 -0
  148. package/src/View/Components/AdaptableObjectList/objectListActionButtonStyles.js +2 -0
  149. package/src/View/Components/Buttons/EntityListActionButtons.js +1 -1
  150. package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.d.ts +1 -0
  151. package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.js +8 -8
  152. package/src/View/Components/ColumnFilter/ColumnFilter.js +14 -1
  153. package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +1 -1
  154. package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.js +1 -1
  155. package/src/View/Components/ColumnFilter/components/FloatingFilterInputList.js +1 -1
  156. package/src/View/Components/Forms/AdaptableFormControlTextClear.js +2 -1
  157. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +1 -1
  158. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +1 -1
  159. package/src/View/Components/Popups/AdaptablePopupAlert.js +1 -1
  160. package/src/View/Components/Popups/Utilities.js +1 -1
  161. package/src/View/Components/RangesComponent.d.ts +4 -3
  162. package/src/View/Components/RangesComponent.js +3 -7
  163. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -1
  164. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
  165. package/src/View/Dashboard/CustomDashboardButton.js +1 -1
  166. package/src/View/Dashboard/Dashboard.js +1 -1
  167. package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +1 -1
  168. package/src/View/DataChangeHistory/DataChangeHistoryTable.js +1 -1
  169. package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +1 -1
  170. package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +1 -1
  171. package/src/View/Export/ExportSchedulesTab.js +3 -4
  172. package/src/View/Filter/FilterViewPanel.js +1 -1
  173. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +3 -3
  174. package/src/View/FormatColumn/Wizard/FormatColumnPreview.js +1 -1
  175. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +1 -1
  176. package/src/View/Layout/LayoutViewPanel.js +1 -1
  177. package/src/View/Layout/Wizard/sections/RowSummarySection.js +129 -103
  178. package/src/View/Note/NoteEditor.js +1 -1
  179. package/src/View/Note/NotePopup.js +1 -1
  180. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +1 -1
  181. package/src/View/QuickSearch/QuickSearchPopup.js +1 -1
  182. package/src/View/QuickSearch/useQuickSearchDebounced.js +1 -1
  183. package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +1 -1
  184. package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
  185. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +1 -1
  186. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +36 -30
  187. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.d.ts +1 -3
  188. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +79 -68
  189. package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +1 -1
  190. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +39 -12
  191. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +92 -52
  192. package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.js +2 -2
  193. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextLayoutEditor.d.ts +9 -0
  194. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextLayoutEditor.js +33 -0
  195. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextPreview.d.ts +23 -0
  196. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextPreview.js +57 -0
  197. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.d.ts +1 -1
  198. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.d.ts +3 -2
  199. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.js +2 -4
  200. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.d.ts +1 -1
  201. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +3 -2
  202. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.d.ts +2 -1
  203. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +13 -17
  204. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnChartListPreviews.d.ts +2 -1
  205. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnChartListPreviews.js +5 -5
  206. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.js +1 -1
  207. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.js +2 -2
  208. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.js +16 -7
  209. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +11 -17
  210. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.d.ts +2 -1
  211. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.js +1 -1
  212. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +20 -60
  213. package/src/View/UIHelper.js +1 -1
  214. package/src/View/Wizard/OnePageAdaptableWizard.js +1 -1
  215. package/src/View/Wizard/OnePageWizards.js +3 -1
  216. package/src/agGrid/AdaptableAgGrid.js +6 -6
  217. package/src/agGrid/AgGridColumnAdapter.js +16 -14
  218. package/src/agGrid/AgGridExportAdapter.js +1 -1
  219. package/src/agGrid/AgGridMenuAdapter.js +127 -2
  220. package/src/agGrid/cellRenderers/BadgeRenderer.js +8 -6
  221. package/src/agGrid/cellRenderers/BulletChartRenderer.js +45 -44
  222. package/src/agGrid/cellRenderers/IconRenderer.d.ts +2 -1
  223. package/src/agGrid/cellRenderers/IconRenderer.js +15 -14
  224. package/src/agGrid/cellRenderers/PercentBarRenderer.js +26 -98
  225. package/src/agGrid/cellRenderers/RangeBarRenderer.js +52 -50
  226. package/src/agGrid/cellRenderers/RatingRenderer.js +2 -2
  227. package/src/agGrid/editors/AdaptableDateEditor/index.js +1 -1
  228. package/src/components/ColorPicker/ColorPicker.js +1 -1
  229. package/src/components/Datepicker/index.js +1 -1
  230. package/src/components/FormLayout/index.js +1 -1
  231. package/src/components/OverlayTrigger/index.js +1 -1
  232. package/src/env.js +2 -2
  233. package/src/layout-manager/src/isLayoutEqual.js +1 -1
  234. package/src/metamodel/adaptable.metamodel.d.ts +118 -19
  235. package/src/metamodel/adaptable.metamodel.js +1 -1
  236. package/src/migration/VersionUpgrade23.d.ts +27 -31
  237. package/src/migration/VersionUpgrade23.js +110 -29
  238. package/src/types.d.ts +12 -1
  239. package/tsconfig.esm.tsbuildinfo +1 -1
  240. package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +0 -3
  241. package/src/Utilities/Helpers/iconStyledColumnColumnSupport.d.ts +0 -5
  242. package/src/Utilities/Helpers/iconStyledColumnColumnSupport.js +0 -15
  243. package/src/Utilities/Helpers/resolveSettingsPanelNavigation.d.ts +0 -3
  244. package/src/Utilities/Helpers/resolveSettingsPanelNavigation.js +0 -15
  245. package/src/Utilities/Helpers/styledColumnRowKindSupport.d.ts +0 -25
  246. package/src/Utilities/Helpers/styledColumnRowKindSupport.js +0 -63
  247. package/src/Utilities/Services/CalculatedColumnSyntheticChange.d.ts +0 -4
  248. package/src/Utilities/Services/CalculatedColumnSyntheticChange.js +0 -115
  249. package/src/Utilities/utils/chunk.d.ts +0 -6
  250. package/src/Utilities/utils/chunk.js +0 -17
  251. package/src/Utilities/utils/clamp.d.ts +0 -5
  252. package/src/Utilities/utils/clamp.js +0 -7
  253. package/src/Utilities/utils/cloneDeepWith.d.ts +0 -9
  254. package/src/Utilities/utils/cloneDeepWith.js +0 -67
  255. package/src/Utilities/utils/debounce.d.ts +0 -20
  256. package/src/Utilities/utils/flatten.d.ts +0 -5
  257. package/src/Utilities/utils/flatten.js +0 -7
  258. package/src/Utilities/utils/flattenDeep.d.ts +0 -5
  259. package/src/Utilities/utils/flattenDeep.js +0 -7
  260. package/src/Utilities/utils/get.d.ts +0 -6
  261. package/src/Utilities/utils/get.js +0 -35
  262. package/src/Utilities/utils/index.d.ts +0 -22
  263. package/src/Utilities/utils/index.js +0 -22
  264. package/src/Utilities/utils/isArray.d.ts +0 -6
  265. package/src/Utilities/utils/isArray.js +0 -6
  266. package/src/Utilities/utils/isEqual.d.ts +0 -5
  267. package/src/Utilities/utils/isEqual.js +0 -124
  268. package/src/Utilities/utils/isObject.d.ts +0 -6
  269. package/src/Utilities/utils/isObject.js +0 -9
  270. package/src/Utilities/utils/isPlainObject.d.ts +0 -6
  271. package/src/Utilities/utils/isPlainObject.js +0 -17
  272. package/src/Utilities/utils/kebabCase.d.ts +0 -5
  273. package/src/Utilities/utils/kebabCase.js +0 -8
  274. package/src/Utilities/utils/merge.d.ts +0 -11
  275. package/src/Utilities/utils/merge.js +0 -40
  276. package/src/Utilities/utils/mergeWith.d.ts +0 -7
  277. package/src/Utilities/utils/mergeWith.js +0 -46
  278. package/src/Utilities/utils/orderBy.d.ts +0 -8
  279. package/src/Utilities/utils/orderBy.js +0 -30
  280. package/src/Utilities/utils/parseInt.d.ts +0 -6
  281. package/src/Utilities/utils/parseInt.js +0 -9
  282. package/src/Utilities/utils/sentenceCase.d.ts +0 -6
  283. package/src/Utilities/utils/sentenceCase.js +0 -15
  284. package/src/Utilities/utils/startCase.d.ts +0 -5
  285. package/src/Utilities/utils/startCase.js +0 -11
  286. package/src/Utilities/utils/throttle.d.ts +0 -17
  287. package/src/Utilities/utils/throttle.js +0 -19
  288. package/src/Utilities/utils/toNumber.d.ts +0 -5
  289. package/src/Utilities/utils/toNumber.js +0 -39
  290. package/src/Utilities/utils/uniq.d.ts +0 -7
  291. package/src/Utilities/utils/uniq.js +0 -9
  292. package/src/Utilities/utils/uniqBy.d.ts +0 -8
  293. package/src/Utilities/utils/uniqBy.js +0 -22
  294. package/src/Utilities/utils/words.d.ts +0 -7
  295. package/src/Utilities/utils/words.js +0 -10
  296. package/src/agGrid/buildValueAggregationMenuItem.d.ts +0 -19
  297. package/src/agGrid/buildValueAggregationMenuItem.js +0 -111
  298. package/src/agGrid/cellRenderers/shouldRenderStyledColumnOnRow.d.ts +0 -30
  299. package/src/agGrid/createAgGridIcon.d.ts +0 -10
  300. package/src/agGrid/createAgGridIcon.js +0 -16
  301. /package/src/{Utilities → AdaptableState/Aggregations}/only.d.ts +0 -0
  302. /package/src/{Utilities → AdaptableState/Aggregations}/only.js +0 -0
  303. /package/src/{Utilities → AdaptableState/Aggregations}/weightedAverage.d.ts +0 -0
  304. /package/src/Utilities/Helpers/{ActionColumnWidthHelper.d.ts → ActionColumnHelper.d.ts} +0 -0
  305. /package/src/Utilities/Helpers/{ActionColumnWidthHelper.js → ActionColumnHelper.js} +0 -0
  306. /package/src/Utilities/Helpers/{alertFormHelper.d.ts → AlertHelper.d.ts} +0 -0
  307. /package/src/Utilities/Helpers/{chartingHelper.d.ts → ChartHelper.d.ts} +0 -0
  308. /package/src/Utilities/Helpers/{chartingHelper.js → ChartHelper.js} +0 -0
  309. /package/src/Utilities/Helpers/{FormatHelper.d.ts → DisplayFormatHelper.d.ts} +0 -0
  310. /package/src/Utilities/Helpers/{plusMinusTriggerKeys.d.ts → PlusMinusHelper.d.ts} +0 -0
  311. /package/src/Utilities/Helpers/{plusMinusTriggerKeys.js → PlusMinusHelper.js} +0 -0
  312. /package/src/Utilities/Helpers/{QuickSearchStyleHelper.d.ts → QuickSearchHelper.d.ts} +0 -0
  313. /package/src/Utilities/Helpers/{ScheduleJobManager.js → Scheduling/ScheduleJobManager.js} +0 -0
  314. /package/src/Utilities/Helpers/{ScheduleJobRunner.js → Scheduling/ScheduleJobRunner.js} +0 -0
  315. /package/src/Utilities/Helpers/{SparklineOptionsHelper.d.ts → StyledColumns/SparklineStyleHelper.d.ts} +0 -0
  316. /package/src/Utilities/Helpers/{ThemeHelpers.d.ts → ThemeHelper.d.ts} +0 -0
  317. /package/src/Utilities/Helpers/{ThemeHelpers.js → ThemeHelper.js} +0 -0
@@ -9,7 +9,6 @@ import { RangesComponent } from '../../Components/RangesComponent';
9
9
  import { ColumnSelector } from '../../Components/Selectors/ColumnSelector';
10
10
  import { getGraySwatchColor } from '../../UIHelper';
11
11
  import { useOnePageAdaptableWizardContext } from '../../Wizard/OnePageAdaptableWizard';
12
- import ArrayExtensions from '../../../Utilities/Extensions/ArrayExtensions';
13
12
  import AdaptableInput from '../../Components/AdaptableInput';
14
13
  import { Box, Flex } from '../../../components/Flex';
15
14
  import { BulletRangesSummaryPreview } from './StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview';
@@ -18,10 +17,9 @@ import { SingleSelect } from '../../../components/NewSelect';
18
17
  import { getCellFontStyleSummaryItems, StyledColumnFontStyleEditor, } from './StyledColumnSliceStyleEditors';
19
18
  import { Card } from '../../../components/Card';
20
19
  import { renderSummaryStringTags } from '../../Wizard/SummaryColorTag';
20
+ import { formatBarStyleCellTextLayoutSummary, getActiveBarStyleCellTextTokens, hasBarStyleCellTextConfigured, patchBarStyleCellTextPlacement, resolveBarStyleCellTextLayout, toggleBarStyleCellTextToken, } from '../../../Utilities/Helpers/StyledColumns/BarStylesHelper';
21
+ import { BarStyleCellTextLayoutEditor } from './StyledColumnWizardStyleSection/Components/BarStyleCellTextLayoutEditor';
21
22
  const BULLET_STYLE_FORM_SIZES = ['200px', '1fr'];
22
- // ---------------------------------------------------------------------------
23
- // Summary helpers
24
- // ---------------------------------------------------------------------------
25
23
  const getTargetSummary = (target) => {
26
24
  if (target == undefined) {
27
25
  return null;
@@ -53,12 +51,8 @@ const formatBulletOriginLabel = (origin) => {
53
51
  }
54
52
  return origin;
55
53
  };
56
- const formatBulletCellTextSummary = (cellText) => cellText
57
- ?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value'))
58
- .join(' + ') ?? '';
59
- const formatBulletToolTipSummary = (toolTipText) => toolTipText
60
- ?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value'))
61
- .join(' + ') ?? '';
54
+ const formatBulletCellTextSummary = (cellText) => cellText?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value')).join(' + ') ?? '';
55
+ const formatBulletToolTipSummary = (toolTipText) => toolTipText?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value')).join(' + ') ?? '';
62
56
  export const getStyledColumnBulletRangesViewValues = (data) => {
63
57
  const bullet = data.BulletChartStyle;
64
58
  if (!bullet) {
@@ -73,11 +67,12 @@ export const getStyledColumnBulletRangesViewValues = (data) => {
73
67
  };
74
68
  const buildStyledColumnBulletStyleSummaryStrings = (bullet, options) => {
75
69
  const items = [];
76
- const targetSummary = getTargetSummary(bullet.Target);
70
+ const targetProperties = bullet.TargetProperties;
71
+ const targetSummary = getTargetSummary(targetProperties?.Target);
77
72
  if (targetSummary) {
78
73
  items.push(`Target: ${targetSummary}`);
79
74
  }
80
- const marker = bullet.TargetMarker;
75
+ const marker = targetProperties?.Marker;
81
76
  if (marker?.Shape && marker.Shape !== 'Line') {
82
77
  items.push(`Target Marker Shape: ${marker.Shape}`);
83
78
  }
@@ -90,19 +85,24 @@ const buildStyledColumnBulletStyleSummaryStrings = (bullet, options) => {
90
85
  if (bullet.Orientation === 'Vertical') {
91
86
  items.push('Orientation: Vertical');
92
87
  }
93
- if (bullet.BarColor) {
94
- items.push(`Bar Colour: ${bullet.BarColor}`);
88
+ const barProperties = bullet.Bar;
89
+ if (barProperties?.Color) {
90
+ items.push(`Bar Colour: ${barProperties.Color}`);
95
91
  }
96
- if (bullet.BarHeight != null) {
97
- items.push(`${bullet.Orientation === 'Vertical' ? 'Bar Width' : 'Bar Height'}: ${bullet.BarHeight}px`);
92
+ if (barProperties?.Height != null) {
93
+ items.push(`${bullet.Orientation === 'Vertical' ? 'Bar Width' : 'Bar Height'}: ${barProperties.Height}px`);
98
94
  }
99
95
  items.push(`Origin: ${formatBulletOriginLabel(bullet.Origin)}`);
100
96
  if (bullet.BackColor) {
101
97
  items.push(`Back Colour: ${bullet.BackColor}`);
102
98
  }
103
- if (bullet.CellText?.length) {
104
- items.push(`Cell Text: ${formatBulletCellTextSummary(bullet.CellText)}`);
105
- items.push(`Cell Text Position: ${bullet.CellTextPosition ?? 'Below'}`);
99
+ if (hasBarStyleCellTextConfigured(bullet.CellTextProperties)) {
100
+ const tokens = getActiveBarStyleCellTextTokens(bullet.CellTextProperties);
101
+ items.push(`Cell Text: ${formatBulletCellTextSummary(tokens)}`);
102
+ const layoutSummary = formatBarStyleCellTextLayoutSummary(resolveBarStyleCellTextLayout(bullet.CellTextProperties));
103
+ if (layoutSummary) {
104
+ items.push(`Placement: ${layoutSummary}`);
105
+ }
106
106
  }
107
107
  else if (options.includeEmptyCellText) {
108
108
  items.push('Cell Text: None');
@@ -260,59 +260,70 @@ export const StyledColumnWizardBulletSection = (props) => {
260
260
  });
261
261
  }, [data, bullet]);
262
262
  // -- Target ----------------------------------------------------------------
263
- const currentMode = getSimpleTargetMode(bullet.Target);
263
+ const currentMode = getSimpleTargetMode(bullet.TargetProperties?.Target);
264
+ const updateTargetProperties = (patch) => {
265
+ const merged = {
266
+ ...bullet.TargetProperties,
267
+ ...patch,
268
+ };
269
+ // Strip the wrapper when nothing meaningful is left.
270
+ const isEmpty = merged.Target == undefined && merged.Marker == undefined;
271
+ update({ TargetProperties: isEmpty ? undefined : merged });
272
+ };
273
+ const setTarget = (target) => updateTargetProperties({ Target: target });
264
274
  const handleTargetModeChange = (mode) => {
265
275
  if (mode === 'None') {
266
- const next = { ...bullet };
267
- delete next.Target;
268
- props.onChange({ ...data, BulletChartStyle: next });
276
+ setTarget(undefined);
269
277
  return;
270
278
  }
271
279
  if (mode === 'Col-Avg' || mode === 'Col-Median') {
272
- update({ Target: mode });
280
+ setTarget(mode);
273
281
  return;
274
282
  }
275
283
  if (mode === 'Number') {
276
- update({ Target: minMaxRangeValues?.max ?? 0 });
284
+ setTarget(minMaxRangeValues?.max ?? 0);
277
285
  return;
278
286
  }
279
287
  if (mode === 'Column') {
280
288
  // Use the first available numeric column (excluding the styled column itself)
281
- const candidate = api.columnApi
282
- .getNumericColumns()
283
- .find((c) => c.columnId !== data.ColumnId);
284
- update({ Target: candidate?.columnId ?? '' });
289
+ const candidate = api.columnApi.getNumericColumns().find((c) => c.columnId !== data.ColumnId);
290
+ setTarget(candidate?.columnId ?? '');
285
291
  return;
286
292
  }
287
293
  };
288
294
  const handleNumericTargetChange = (value) => {
289
- if (value == undefined || isNaN(value)) {
290
- update({ Target: 0 });
291
- }
292
- else {
293
- update({ Target: value });
294
- }
295
+ setTarget(value == undefined || isNaN(value) ? 0 : value);
295
296
  };
296
297
  const handleColumnTargetChange = (columnId) => {
297
- update({ Target: columnId });
298
+ setTarget(columnId);
299
+ };
300
+ // -- Bar -------------------------------------------------------------------
301
+ const updateBar = (patch) => {
302
+ const merged = {
303
+ ...bullet.Bar,
304
+ ...patch,
305
+ };
306
+ const isEmpty = merged.Color == undefined && merged.Height == undefined;
307
+ update({ Bar: isEmpty ? undefined : merged });
298
308
  };
299
309
  // -- Marker ----------------------------------------------------------------
300
310
  const updateMarker = (patch) => {
301
- update({
302
- TargetMarker: {
311
+ updateTargetProperties({
312
+ Marker: {
303
313
  Shape: 'Line',
304
- ...bullet.TargetMarker,
314
+ ...bullet.TargetProperties?.Marker,
305
315
  ...patch,
306
316
  },
307
317
  });
308
318
  };
309
319
  // -- Cell text -------------------------------------------------------------
310
- const toggleCellText = (token, checked) => {
311
- const current = bullet.CellText ?? [];
312
- const next = checked
313
- ? Array.from(new Set([...current, token]))
314
- : current.filter((t) => t !== token);
315
- update({ CellText: next });
320
+ const toggleCellText = (token, show) => {
321
+ update(toggleBarStyleCellTextToken(bullet.CellTextProperties, token, show));
322
+ };
323
+ const onCellTextPlacementChange = (token, patch) => {
324
+ update({
325
+ CellTextProperties: patchBarStyleCellTextPlacement(bullet.CellTextProperties, token, patch),
326
+ });
316
327
  };
317
328
  const toggleToolTipText = (token, checked) => {
318
329
  const current = bullet.ToolTipText ?? [];
@@ -321,9 +332,6 @@ export const StyledColumnWizardBulletSection = (props) => {
321
332
  : current.filter((t) => t !== token);
322
333
  update({ ToolTipText: next });
323
334
  };
324
- const handleCellTextPositionChange = (pos) => {
325
- update({ CellTextPosition: pos });
326
- };
327
335
  // -------------------------------------------------------------------------
328
336
  // Render
329
337
  // -------------------------------------------------------------------------
@@ -336,22 +344,29 @@ export const StyledColumnWizardBulletSection = (props) => {
336
344
  if (variant === 'ranges') {
337
345
  return (_jsx(Box, { children: _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Ranges" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Define qualitative bands for the bullet scale" })] }), _jsx(Card.Body, { children: _jsx(RangesComponent, { disabled: disabled, minMaxRangeValues: minMaxRangeValues, api: api, scope: scope, ranges: bullet.CellRanges, rangeValueType: bullet.RangeValueType, onRangeValueTypeChange: onRangeValueTypeChange, columnComparison: bullet.ColumnComparison, updateRanges: onUpdateRanges, updateColumnComparison: onUpdateColumnComparison, hideColumnComparison: true }) })] }) }));
338
346
  }
339
- const numericTargetValue = typeof bullet.Target === 'number'
340
- ? bullet.Target
341
- : typeof bullet.Target?.Value === 'number'
342
- ? bullet.Target.Value
347
+ const primaryTarget = Array.isArray(bullet.TargetProperties?.Target)
348
+ ? bullet.TargetProperties?.Target?.[0]
349
+ : bullet.TargetProperties?.Target;
350
+ const numericTargetValue = typeof primaryTarget === 'number'
351
+ ? primaryTarget
352
+ : typeof primaryTarget?.Value === 'number'
353
+ ? primaryTarget.Value
343
354
  : undefined;
344
- const columnTargetValue = typeof bullet.Target === 'string' && bullet.Target !== 'Col-Avg' && bullet.Target !== 'Col-Median'
345
- ? bullet.Target
346
- : typeof bullet.Target?.Value === 'string'
347
- ? bullet.Target.Value
355
+ const columnTargetValue = typeof primaryTarget === 'string' &&
356
+ primaryTarget !== 'Col-Avg' &&
357
+ primaryTarget !== 'Col-Median'
358
+ ? primaryTarget
359
+ : typeof primaryTarget?.Value === 'string'
360
+ ? primaryTarget.Value
348
361
  : undefined;
362
+ const markerCfg = bullet.TargetProperties?.Marker;
349
363
  const marker = {
350
- Shape: bullet.TargetMarker?.Shape ?? 'Line',
351
- Color: bullet.TargetMarker?.Color ?? '',
352
- Size: bullet.TargetMarker?.Size ?? (bullet.TargetMarker?.Shape === 'Line' ? 2 : 8),
364
+ Shape: markerCfg?.Shape ?? 'Line',
365
+ Color: markerCfg?.Color ?? '',
366
+ Size: markerCfg?.Size ?? (markerCfg?.Shape === 'Line' ? 2 : 8),
353
367
  };
354
- const cellTextDisabled = ArrayExtensions.IsNullOrEmpty(bullet.CellText) || disabled;
368
+ const cellTextProperties = bullet.CellTextProperties;
369
+ const cellTextDisabled = !hasBarStyleCellTextConfigured(cellTextProperties) || disabled;
355
370
  return (_jsxs(Box, { children: [_jsxs(Card, { shadow: false, className: "twa:mb-3", 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-[520px]", children: "Select a target value for the bullet scale" })] }), _jsx(Card.Body, { children: _jsxs(FormLayout, { sizes: [...BULLET_STYLE_FORM_SIZES], children: [_jsx(FormRow, { label: "Target:", children: _jsx(Box, { className: "twa:max-w-[180px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: currentMode, onValueChange: (v) => handleTargetModeChange(v), items: [
356
371
  { value: 'None', label: 'None' },
357
372
  { value: 'Number', label: 'Fixed Number' },
@@ -361,9 +376,9 @@ export const StyledColumnWizardBulletSection = (props) => {
361
376
  ] }) }) }), currentMode === 'Number' && (_jsx(FormRow, { label: "Target Value:", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(AdaptableInput, { type: "number", value: numericTargetValue ?? '', onChange: (e) => handleNumericTargetChange(e.target.value === '' ? undefined : Number(e.target.value)) }) }) })), currentMode === 'Column' && (_jsx(FormRow, { label: "Target Column:", children: _jsx(Box, { className: "twa:max-w-[220px]", children: _jsx(ColumnSelector, { type: "number", value: columnTargetValue ?? '', onChange: handleColumnTargetChange, filterColumn: (c) => c.columnId !== data.ColumnId, placeholder: "Select numeric column" }) }) })), currentMode !== 'None' && (_jsxs(_Fragment, { children: [_jsx(FormRow, { label: "Marker Shape:", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: marker.Shape, onValueChange: (s) => updateMarker({ Shape: s }), items: MARKER_SHAPES.map((s) => ({ value: s.value, label: s.label })) }) }) }), _jsx(FormRow, { label: "Marker Colour:", children: _jsx(ColorPicker, { disabled: disabled, api: api, value: marker.Color || undefined, onChange: (c) => updateMarker({ Color: c }) }) }), _jsx(FormRow, { label: "Marker Size:", children: _jsx(Box, { className: "twa:max-w-[100px]", children: _jsx(AdaptableInput, { type: "number", min: 1, value: marker.Size, onChange: (e) => updateMarker({ Size: Number(e.target.value) }) }) }) })] }))] }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Bar" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Set the bar orientation and height" })] }), _jsx(Card.Body, { children: _jsxs(FormLayout, { sizes: [...BULLET_STYLE_FORM_SIZES], children: [_jsx(FormRow, { label: "Orientation:", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: bullet.Orientation ?? 'Horizontal', onValueChange: (v) => update({ Orientation: v }), items: [
362
377
  { value: 'Horizontal', label: 'Horizontal' },
363
378
  { value: 'Vertical', label: 'Vertical' },
364
- ] }) }) }), bullet.Orientation === 'Vertical' && (_jsx(FormRow, { label: "", children: _jsxs(Box, { className: "twa:text-xs twa:text-neutral-500", children: ["Tip: vertical bullet charts need a tall row height to be readable (we recommend at least 60px). Set ", _jsx("code", { children: "rowHeight" }), " on ", _jsx("code", { children: " gridOptions " }), " or use", ' ', _jsx("code", { children: "getRowHeight" }), "."] }) })), _jsx(FormRow, { label: "Bar Colour:", children: _jsx(ColorPicker, { disabled: disabled, api: api, value: bullet.BarColor, onChange: (c) => update({ BarColor: c }) }) }), _jsx(FormRow, { label: bullet.Orientation === 'Vertical' ? 'Bar Width (px):' : 'Bar Height (px):', children: _jsx(Box, { className: "twa:max-w-[100px]", children: _jsx(AdaptableInput, { type: "number", min: 1, value: bullet.BarHeight ?? '', onChange: (e) => update({
365
- BarHeight: e.target.value === '' ? undefined : Number(e.target.value),
366
- }), placeholder: "8" }) }) }), _jsx(FormRow, { label: "Origin:", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: typeof bullet.Origin === 'number' ? 'Number' : (bullet.Origin ?? 'Auto'), onValueChange: (v) => {
379
+ ] }) }) }), bullet.Orientation === 'Vertical' && (_jsx(FormRow, { label: "", children: _jsxs(Box, { className: "twa:text-xs twa:text-neutral-500", children: ["Tip: vertical bullet charts need a tall row height to be readable (we recommend at least 60px). Set ", _jsx("code", { children: "rowHeight" }), " on ", _jsx("code", { children: " gridOptions " }), " or use", ' ', _jsx("code", { children: "getRowHeight" }), "."] }) })), _jsx(FormRow, { label: "Bar Colour:", children: _jsx(ColorPicker, { disabled: disabled, api: api, value: bullet.Bar?.Color, onChange: (c) => updateBar({ Color: c }) }) }), _jsx(FormRow, { label: bullet.Orientation === 'Vertical' ? 'Bar Width (px):' : 'Bar Height (px):', children: _jsx(Box, { className: "twa:max-w-[100px]", children: _jsx(AdaptableInput, { type: "number", min: 1, value: bullet.Bar?.Height ?? '', onChange: (e) => updateBar({
380
+ Height: e.target.value === '' ? undefined : Number(e.target.value),
381
+ }), placeholder: "8" }) }) }), _jsx(FormRow, { label: "Origin:", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: typeof bullet.Origin === 'number' ? 'Number' : bullet.Origin ?? 'Auto', onValueChange: (v) => {
367
382
  if (v === 'Auto' || v === 'Zero') {
368
383
  update({ Origin: v });
369
384
  }
@@ -373,11 +388,7 @@ export const StyledColumnWizardBulletSection = (props) => {
373
388
  }, items: [
374
389
  { value: 'Auto', label: 'Auto' },
375
390
  { value: 'Zero', label: 'Zero' },
376
- ] }) }) })] }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Cell Text" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Choose whether to display text in the cell (and if so, then position and font))" })] }), _jsxs(Card.Body, { children: [_jsxs(FormLayout, { sizes: [...BULLET_STYLE_FORM_SIZES], children: [_jsxs(FormRow, { label: "Cell Display:", children: [_jsx(CheckBox, { disabled: disabled, checked: bullet.CellText?.includes('CellValue'), onChange: (checked) => toggleCellText('CellValue', checked), children: "Cell Value" }), ' ', _jsx(CheckBox, { disabled: disabled, className: "twa:ml-3", checked: bullet.CellText?.includes('PercentageValue'), onChange: (checked) => toggleCellText('PercentageValue', checked), children: "Percent Value" })] }), _jsx(FormRow, { label: "Cell Display Position:", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", disabled: cellTextDisabled, value: bullet.CellTextPosition ?? 'Below', onValueChange: (v) => handleCellTextPositionChange(v), items: [
377
- { value: 'Above', label: 'Above Bar' },
378
- { value: 'Below', label: 'Below Bar' },
379
- { value: 'Merged', label: 'Merged' },
380
- ] }) }) })] }), _jsx(Box, { className: `twa:mt-3 twa:pt-3 twa:border-t twa:border-foreground/15 ${cellTextDisabled ? 'twa:opacity-50' : ''}`, children: _jsx(StyledColumnFontStyleEditor, { api: api, disabled: cellTextDisabled, value: bullet.Font, onChange: (next) => {
391
+ ] }) }) })] }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Cell Text" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Pick which values to display and where each one sits around the bar" })] }), _jsxs(Card.Body, { children: [_jsx(FormLayout, { sizes: [...BULLET_STYLE_FORM_SIZES], children: _jsx(BarStyleCellTextLayoutEditor, { disabled: disabled, cellTextProperties: cellTextProperties, onToggle: toggleCellText, onPlacementChange: onCellTextPlacementChange }) }), _jsx(Box, { className: `twa:mt-3 twa:pt-3 twa:border-t twa:border-foreground/15 ${cellTextDisabled ? 'twa:opacity-50' : ''}`, children: _jsx(StyledColumnFontStyleEditor, { api: api, disabled: cellTextDisabled, value: bullet.Font, onChange: (next) => {
381
392
  if (next) {
382
393
  update({ Font: next });
383
394
  }
@@ -7,7 +7,7 @@ import { Tag } from '../../../components/Tag';
7
7
  import { useOnePageAdaptableWizardContext } from '../../Wizard/OnePageAdaptableWizard';
8
8
  import { Box, Flex } from '../../../components/Flex';
9
9
  import { NumberInput } from '../../../components/Input/NumberInput';
10
- import { DEFAULT_GRADIENT_MAX_ALPHA, DEFAULT_GRADIENT_MIN_ALPHA, } from '../../../Utilities/Helpers/StyledColumnGradientHelper';
10
+ import { DEFAULT_GRADIENT_MAX_ALPHA, DEFAULT_GRADIENT_MIN_ALPHA, } from '../../../Utilities/Helpers/StyledColumns/GradientStyleHelper';
11
11
  import { getCellFontStyleSummaryItems, StyledColumnFontStyleEditor, } from './StyledColumnSliceStyleEditors';
12
12
  import { Card } from '../../../components/Card';
13
13
  import { renderSummaryStringTags } from '../../Wizard/SummaryColorTag';
@@ -14,7 +14,7 @@ import { IconSelectorPanel } from '../../../components/IconSelector';
14
14
  import { useOnePageAdaptableWizardContext } from '../../Wizard/OnePageAdaptableWizard';
15
15
  import { useAdaptable } from '../../AdaptableContext';
16
16
  import { AdaptableIconComponent } from '../../Components/AdaptableIconComponent';
17
- import { ICON_STYLE_PRESET_DESCRIPTIONS, ICON_STYLE_PRESET_LABELS, getIconStylePresetMappings, } from '../../../Utilities/Helpers/IconStylePresets';
17
+ import { ICON_STYLE_PRESET_DESCRIPTIONS, ICON_STYLE_PRESET_LABELS, getIconStylePresetMappings, } from '../../../Utilities/Helpers/StyledColumns/IconStyleHelper';
18
18
  import { resolveEffectiveIconStyleMappings, resolveIconStyleMappingsForSummaryPreview } from '../../../agGrid/cellRenderers/IconRenderer';
19
19
  import { Card } from '../../../components/Card';
20
20
  import { renderSummaryStringTags } from '../../Wizard/SummaryColorTag';
@@ -78,8 +78,9 @@ export const getStyledColumnIconMappingsViewValues = (data) => {
78
78
  if (ic.MatchMode && ic.MatchMode !== 'Exact') {
79
79
  items.push(`Match Mode: ${ic.MatchMode}`);
80
80
  }
81
- if (ic.Fallback && ic.Fallback !== 'Hide') {
82
- items.push(`Fallback: ${ic.Fallback}`);
81
+ const fallbackMode = ic.FallbackProperties?.Mode;
82
+ if (fallbackMode && fallbackMode !== 'Hide') {
83
+ items.push(`Fallback: ${fallbackMode}`);
83
84
  }
84
85
  return items;
85
86
  };
@@ -91,9 +92,10 @@ const buildStyledColumnIconStyleSummaryStrings = (ic, options) => {
91
92
  if (ic.Gap != null) {
92
93
  items.push(`Gap: ${ic.Gap}px`);
93
94
  }
94
- if (ic.CellText?.length) {
95
- items.push(`Cell Text: ${formatIconCellTextSummary(ic.CellText)}`);
96
- items.push(`Cell Text Position: ${ic.CellTextPosition ?? 'After'}`);
95
+ const ctp = ic.CellTextProperties;
96
+ if (ctp?.CellText?.length) {
97
+ items.push(`Cell Text: ${formatIconCellTextSummary(ctp.CellText)}`);
98
+ items.push(`Cell Text Position: ${ctp.CellTextPosition ?? 'After'}`);
97
99
  }
98
100
  else if (options.includeEmptyCellText) {
99
101
  items.push('Cell Text: None');
@@ -253,12 +255,35 @@ export const StyledColumnWizardIconSection = (props) => {
253
255
  // -----------------------------------------------------------------------
254
256
  // CellText helpers
255
257
  // -----------------------------------------------------------------------
258
+ const updateCellTextProperties = (patch) => {
259
+ const merged = {
260
+ ...iconStyle.CellTextProperties,
261
+ ...patch,
262
+ };
263
+ // Strip the wrapper when both inner properties are unset, so empty state
264
+ // serialises cleanly.
265
+ const isEmpty = !merged.CellText?.length && merged.CellTextPosition == undefined;
266
+ update({ CellTextProperties: isEmpty ? undefined : merged });
267
+ };
256
268
  const toggleCellText = (token, checked) => {
257
- const current = iconStyle.CellText ?? [];
269
+ const current = iconStyle.CellTextProperties?.CellText ?? [];
258
270
  const next = checked
259
271
  ? Array.from(new Set([...current, token]))
260
272
  : current.filter((t) => t !== token);
261
- update({ CellText: next });
273
+ updateCellTextProperties({ CellText: next });
274
+ };
275
+ // -----------------------------------------------------------------------
276
+ // Fallback helpers
277
+ // -----------------------------------------------------------------------
278
+ const updateFallbackProperties = (patch) => {
279
+ const merged = {
280
+ ...iconStyle.FallbackProperties,
281
+ ...patch,
282
+ };
283
+ // Strip the wrapper when there's nothing to remember; the renderer
284
+ // already defaults to `Mode: 'Hide'` when `FallbackProperties` is unset.
285
+ const isEmpty = (merged.Mode == undefined || merged.Mode === 'Hide') && merged.Icon == undefined;
286
+ update({ FallbackProperties: isEmpty ? undefined : merged });
262
287
  };
263
288
  const toggleToolTipText = (token, checked) => {
264
289
  const current = iconStyle.ToolTipText ?? [];
@@ -287,14 +312,14 @@ export const StyledColumnWizardIconSection = (props) => {
287
312
  }), placeholder: "Tooltip label (optional)" }) }), _jsx(Box, { className: "twa:w-8 twa:shrink-0 twa:flex twa:justify-center", children: _jsx(SimpleButton, { icon: "delete", variant: "text", tooltip: "Remove mapping", onClick: () => removeMapping(i) }) })] }, i)))] })), _jsx(Box, { className: "twa:mt-2", children: _jsx(ButtonNew, { onClick: addMapping, children: "Add Mapping" }) })] })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Matching" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "How keys are compared to cell values, and what to render when no mapping matches" })] }), _jsx(Card.Body, { children: _jsxs(FormLayout, { children: [_jsx(FormRow, { label: "Match Mode:", children: _jsx(Box, { className: "twa:max-w-[200px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: iconStyle.MatchMode ?? 'Exact', onValueChange: (v) => update({ MatchMode: v }), items: [
288
313
  { value: 'Exact', label: 'Exact Match Required' },
289
314
  { value: 'CaseInsensitive', label: 'Case-insensitive (strings)' },
290
- ] }) }) }), _jsx(FormRow, { label: "Fallback:", children: _jsx(Box, { className: "twa:max-w-[200px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: iconStyle.Fallback ?? 'Hide', onValueChange: (v) => update({ Fallback: v }), items: [
315
+ ] }) }) }), _jsx(FormRow, { label: "Fallback:", children: _jsx(Box, { className: "twa:max-w-[200px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: iconStyle.FallbackProperties?.Mode ?? 'Hide', onValueChange: (v) => updateFallbackProperties({ Mode: v }), items: [
291
316
  { value: 'Hide', label: 'Show No Value' },
292
317
  { value: 'ShowText', label: 'Show Raw Value' },
293
318
  { value: 'Icon', label: 'Show Fallback Icon' },
294
- ] }) }) }), iconStyle.Fallback === 'Icon' && (_jsx(FormRow, { label: "Fallback Icon:", children: _jsx(IconPickerButton, { value: iconStyle.FallbackIcon, onChange: (next) => update({ FallbackIcon: next }) }) }))] }) })] })] }));
319
+ ] }) }) }), iconStyle.FallbackProperties?.Mode === 'Icon' && (_jsx(FormRow, { label: "Fallback Icon:", children: _jsx(IconPickerButton, { value: iconStyle.FallbackProperties?.Icon, onChange: (next) => updateFallbackProperties({ Icon: next }) }) }))] }) })] })] }));
295
320
  }
296
321
  // ----- Style variant (wizard step title: "Style") ------------------------
297
- const cellText = iconStyle.CellText ?? [];
322
+ const cellText = iconStyle.CellTextProperties?.CellText ?? [];
298
323
  const toolTipText = iconStyle.ToolTipText ?? [];
299
324
  const cellTextDisabled = cellText.length === 0;
300
325
  return (_jsxs(Box, { children: [_jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsx(Card.Title, { children: "Sizing" }), _jsx(Card.Body, { children: _jsxs(FormLayout, { sizes: [...STYLE_FORM_SIZES], children: [_jsx(FormRow, { label: "Icon Size (px):", children: _jsx(Box, { className: "twa:max-w-[100px]", children: _jsx(Input, { type: "number", min: 8, step: 1, value: iconStyle.Size ?? '', placeholder: "18", className: "twa:w-full", onChange: (event) => {
@@ -307,7 +332,9 @@ export const StyledColumnWizardIconSection = (props) => {
307
332
  update({
308
333
  Size: Number.isFinite(parsed) && parsed >= 8 ? parsed : undefined,
309
334
  });
310
- } }) }) }), _jsx(FormRow, { label: "Gap (px):", children: _jsx(Box, { className: "twa:max-w-[100px]", children: _jsx(NumberInput, { value: iconStyle.Gap ?? '', placeholder: "4", min: 0, step: 1, onChange: (value) => update({ Gap: typeof value === 'number' ? value : undefined }) }) }) })] }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Cell Text" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Optionally show the raw value or the matched description alongside the icon (e.g. flag plus label)." })] }), _jsxs(Card.Body, { children: [_jsxs(FormLayout, { sizes: [...STYLE_FORM_SIZES], children: [_jsxs(FormRow, { label: "Cell Display:", children: [_jsx(CheckBox, { checked: cellText.includes('CellValue'), onChange: (checked) => toggleCellText('CellValue', checked), children: "Cell Value" }), ' ', _jsx(CheckBox, { className: "twa:ml-3", checked: cellText.includes('IconDescription'), onChange: (checked) => toggleCellText('IconDescription', checked), children: "Description" })] }), _jsx(FormRow, { label: "Position:", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: iconStyle.CellTextPosition ?? 'After', onValueChange: (v) => update({ CellTextPosition: v }), items: [
335
+ } }) }) }), _jsx(FormRow, { label: "Gap (px):", children: _jsx(Box, { className: "twa:max-w-[100px]", children: _jsx(NumberInput, { value: iconStyle.Gap ?? '', placeholder: "4", min: 0, step: 1, onChange: (value) => update({ Gap: typeof value === 'number' ? value : undefined }) }) }) })] }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Cell Text" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Optionally show the raw value or the matched description alongside the icon (e.g. flag plus label)." })] }), _jsxs(Card.Body, { children: [_jsxs(FormLayout, { sizes: [...STYLE_FORM_SIZES], children: [_jsxs(FormRow, { label: "Cell Display:", children: [_jsx(CheckBox, { checked: cellText.includes('CellValue'), onChange: (checked) => toggleCellText('CellValue', checked), children: "Cell Value" }), ' ', _jsx(CheckBox, { className: "twa:ml-3", checked: cellText.includes('IconDescription'), onChange: (checked) => toggleCellText('IconDescription', checked), children: "Description" })] }), _jsx(FormRow, { label: "Position:", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: iconStyle.CellTextProperties?.CellTextPosition ?? 'After', onValueChange: (v) => updateCellTextProperties({
336
+ CellTextPosition: v,
337
+ }), items: [
311
338
  { value: 'Before', label: 'Before' },
312
339
  { value: 'After', label: 'After' },
313
340
  { value: 'Above', label: 'Above' },