@adaptabletools/adaptable-cjs 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 (318) hide show
  1. package/index.css +98 -17
  2. package/package.json +1 -1
  3. package/src/{Utilities → AdaptableState/Aggregations}/weightedAverage.js +2 -3
  4. package/src/AdaptableState/Common/Enums.d.ts +0 -12
  5. package/src/AdaptableState/Common/Enums.js +1 -16
  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 +0 -10
  10. package/src/AdaptableState/StyledColumns/BadgeStyle.d.ts +143 -0
  11. package/src/AdaptableState/StyledColumns/BadgeStyle.js +12 -0
  12. package/src/AdaptableState/StyledColumns/BulletChartStyle.d.ts +147 -0
  13. package/src/AdaptableState/StyledColumns/BulletChartStyle.js +2 -0
  14. package/src/AdaptableState/StyledColumns/Common/BarStyleProperties.d.ts +84 -0
  15. package/src/AdaptableState/StyledColumns/Common/BarStyleProperties.js +6 -0
  16. package/src/AdaptableState/StyledColumns/Common/CellTextOptions.d.ts +13 -0
  17. package/src/AdaptableState/StyledColumns/Common/CellTextOptions.js +7 -0
  18. package/src/AdaptableState/StyledColumns/Common/NumericStyledColumn.d.ts +79 -0
  19. package/src/AdaptableState/StyledColumns/Common/NumericStyledColumn.js +10 -0
  20. package/src/AdaptableState/StyledColumns/GradientStyle.d.ts +48 -0
  21. package/src/AdaptableState/StyledColumns/GradientStyle.js +2 -0
  22. package/src/AdaptableState/StyledColumns/IconStyle.d.ts +158 -0
  23. package/src/AdaptableState/StyledColumns/IconStyle.js +2 -0
  24. package/src/AdaptableState/StyledColumns/PercentBarStyle.d.ts +32 -0
  25. package/src/AdaptableState/StyledColumns/PercentBarStyle.js +2 -0
  26. package/src/AdaptableState/StyledColumns/RangeBarStyle.d.ts +155 -0
  27. package/src/AdaptableState/StyledColumns/RangeBarStyle.js +2 -0
  28. package/src/AdaptableState/StyledColumns/RatingStyle.d.ts +111 -0
  29. package/src/AdaptableState/StyledColumns/RatingStyle.js +2 -0
  30. package/src/AdaptableState/StyledColumns/SparklineStyle.d.ts +21 -0
  31. package/src/AdaptableState/StyledColumns/SparklineStyle.js +2 -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 +5 -5
  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 +2 -3
  38. package/src/Api/Implementation/QuickSearchApiImpl.js +4 -4
  39. package/src/Api/Implementation/ThemeApiImpl.js +2 -2
  40. package/src/Api/Internal/ActionColumnInternalApi.js +2 -2
  41. package/src/Api/Internal/AlertInternalApi.js +1 -1
  42. package/src/Api/Internal/ChartingInternalApi.js +2 -2
  43. package/src/Api/Internal/ColumnInternalApi.js +2 -2
  44. package/src/Api/Internal/EventInternalApi.js +3 -4
  45. package/src/Api/Internal/ExportInternalApi.js +2 -2
  46. package/src/Api/Internal/FormatColumnInternalApi.js +4 -4
  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 +6 -6
  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 +2 -3
  53. package/src/Redux/Store/AdaptableReduxMerger.js +7 -9
  54. package/src/Redux/Store/AdaptableStore.js +5 -5
  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 +4 -4
  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 +2 -2
  72. package/src/Strategy/NoteModule.d.ts +1 -1
  73. package/src/Strategy/PlusMinusModule.d.ts +1 -1
  74. package/src/Strategy/PlusMinusModule.js +8 -8
  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 +4 -4
  79. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +2 -3
  80. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +2 -2
  81. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +2 -3
  82. package/src/Utilities/Extensions/ArrayExtensions.d.ts +32 -0
  83. package/src/Utilities/Extensions/ArrayExtensions.js +54 -1
  84. package/src/Utilities/Extensions/NumberExtensions.d.ts +21 -0
  85. package/src/Utilities/Extensions/NumberExtensions.js +78 -0
  86. package/src/Utilities/Extensions/ObjectExtensions.d.ts +44 -0
  87. package/src/Utilities/Extensions/ObjectExtensions.js +277 -0
  88. package/src/Utilities/Extensions/StringExtensions.d.ts +26 -0
  89. package/src/Utilities/Extensions/StringExtensions.js +49 -3
  90. package/src/Utilities/Helpers/AdaptableHelper.js +7 -7
  91. package/src/Utilities/Helpers/{alertFormHelper.js → AlertHelper.js} +1 -1
  92. package/src/Utilities/Helpers/DateHelper.js +2 -2
  93. package/src/Utilities/Helpers/{FormatHelper.js → DisplayFormatHelper.js} +5 -5
  94. package/src/Utilities/Helpers/Helper.d.ts +0 -6
  95. package/src/Utilities/Helpers/Helper.js +0 -38
  96. package/src/Utilities/Helpers/{QuickSearchStyleHelper.js → QuickSearchHelper.js} +2 -3
  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} +16 -1
  109. package/src/Utilities/Helpers/StyledColumns/BarStylesHelper.d.ts +63 -0
  110. package/src/Utilities/Helpers/StyledColumns/BarStylesHelper.js +334 -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} +9 -9
  113. package/src/Utilities/Helpers/{IconStylePresets.d.ts → StyledColumns/IconStyleHelper.d.ts} +6 -1
  114. package/src/Utilities/Helpers/{IconStylePresets.js → StyledColumns/IconStyleHelper.js} +16 -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} +11 -17
  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/Utilities/Helpers/StyledColumns/StyledColumnHelper.js +124 -0
  120. package/src/Utilities/Helpers/TimingHelper.d.ts +34 -0
  121. package/src/Utilities/{utils/debounce.js → Helpers/TimingHelper.js} +25 -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 +118 -2
  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 +6 -6
  128. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +2 -2
  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 +159 -126
  134. package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +4 -4
  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 +2 -2
  141. package/src/View/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +2 -2
  142. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +2 -2
  143. package/src/View/Comments/CommentsEditor.js +2 -2
  144. package/src/View/Comments/CommentsPopup.js +2 -2
  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 +6 -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 +2 -2
  154. package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.js +2 -2
  155. package/src/View/Components/ColumnFilter/components/FloatingFilterInputList.js +2 -2
  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 +2 -2
  159. package/src/View/Components/Popups/AdaptablePopupAlert.js +2 -2
  160. package/src/View/Components/Popups/Utilities.js +5 -5
  161. package/src/View/Components/RangesComponent.d.ts +4 -3
  162. package/src/View/Components/RangesComponent.js +5 -9
  163. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +3 -3
  164. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +2 -3
  165. package/src/View/Dashboard/CustomDashboardButton.js +2 -3
  166. package/src/View/Dashboard/Dashboard.js +2 -2
  167. package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +2 -2
  168. package/src/View/DataChangeHistory/DataChangeHistoryTable.js +2 -2
  169. package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +2 -2
  170. package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +2 -2
  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 +13 -13
  174. package/src/View/FormatColumn/Wizard/FormatColumnPreview.js +4 -4
  175. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +2 -2
  176. package/src/View/Layout/LayoutViewPanel.js +2 -2
  177. package/src/View/Layout/Wizard/sections/RowSummarySection.js +128 -102
  178. package/src/View/Note/NoteEditor.js +2 -2
  179. package/src/View/Note/NotePopup.js +2 -2
  180. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +7 -7
  181. package/src/View/QuickSearch/QuickSearchPopup.js +4 -4
  182. package/src/View/QuickSearch/useQuickSearchDebounced.js +2 -3
  183. package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +1 -1
  184. package/src/View/SpecialColumnSettingsWizardStep.js +2 -2
  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 +8 -8
  190. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +42 -15
  191. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +92 -52
  192. package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.js +14 -14
  193. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextLayoutEditor.d.ts +9 -0
  194. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextLayoutEditor.js +37 -0
  195. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextPreview.d.ts +23 -0
  196. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextPreview.js +62 -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 +7 -9
  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 +4 -4
  207. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.js +2 -2
  208. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.js +24 -15
  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 +2 -2
  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 +2 -2
  215. package/src/View/Wizard/OnePageWizards.js +3 -1
  216. package/src/agGrid/AdaptableAgGrid.js +11 -11
  217. package/src/agGrid/AgGridColumnAdapter.js +30 -28
  218. package/src/agGrid/AgGridExportAdapter.js +3 -3
  219. package/src/agGrid/AgGridMenuAdapter.js +129 -4
  220. package/src/agGrid/cellRenderers/BadgeRenderer.js +9 -7
  221. package/src/agGrid/cellRenderers/BulletChartRenderer.js +47 -46
  222. package/src/agGrid/cellRenderers/IconRenderer.d.ts +2 -1
  223. package/src/agGrid/cellRenderers/IconRenderer.js +20 -19
  224. package/src/agGrid/cellRenderers/PercentBarRenderer.js +29 -101
  225. package/src/agGrid/cellRenderers/RangeBarRenderer.js +54 -52
  226. package/src/agGrid/cellRenderers/RatingRenderer.js +6 -6
  227. package/src/agGrid/editors/AdaptableDateEditor/index.js +3 -3
  228. package/src/components/ColorPicker/ColorPicker.js +2 -2
  229. package/src/components/Datepicker/index.js +2 -2
  230. package/src/components/FormLayout/index.js +2 -2
  231. package/src/components/OverlayTrigger/index.js +2 -2
  232. package/src/env.js +2 -2
  233. package/src/layout-manager/src/isLayoutEqual.js +4 -5
  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.cjs.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 -18
  243. package/src/Utilities/Helpers/resolveSettingsPanelNavigation.d.ts +0 -3
  244. package/src/Utilities/Helpers/resolveSettingsPanelNavigation.js +0 -19
  245. package/src/Utilities/Helpers/styledColumnRowKindSupport.d.ts +0 -25
  246. package/src/Utilities/Helpers/styledColumnRowKindSupport.js +0 -70
  247. package/src/Utilities/Services/CalculatedColumnSyntheticChange.d.ts +0 -4
  248. package/src/Utilities/Services/CalculatedColumnSyntheticChange.js +0 -120
  249. package/src/Utilities/utils/chunk.d.ts +0 -6
  250. package/src/Utilities/utils/chunk.js +0 -20
  251. package/src/Utilities/utils/clamp.d.ts +0 -5
  252. package/src/Utilities/utils/clamp.js +0 -10
  253. package/src/Utilities/utils/cloneDeepWith.d.ts +0 -9
  254. package/src/Utilities/utils/cloneDeepWith.js +0 -70
  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 -10
  258. package/src/Utilities/utils/flattenDeep.d.ts +0 -5
  259. package/src/Utilities/utils/flattenDeep.js +0 -10
  260. package/src/Utilities/utils/get.d.ts +0 -6
  261. package/src/Utilities/utils/get.js +0 -38
  262. package/src/Utilities/utils/index.d.ts +0 -22
  263. package/src/Utilities/utils/index.js +0 -48
  264. package/src/Utilities/utils/isArray.d.ts +0 -6
  265. package/src/Utilities/utils/isArray.js +0 -8
  266. package/src/Utilities/utils/isEqual.d.ts +0 -5
  267. package/src/Utilities/utils/isEqual.js +0 -127
  268. package/src/Utilities/utils/isObject.d.ts +0 -6
  269. package/src/Utilities/utils/isObject.js +0 -12
  270. package/src/Utilities/utils/isPlainObject.d.ts +0 -6
  271. package/src/Utilities/utils/isPlainObject.js +0 -20
  272. package/src/Utilities/utils/kebabCase.d.ts +0 -5
  273. package/src/Utilities/utils/kebabCase.js +0 -12
  274. package/src/Utilities/utils/merge.d.ts +0 -11
  275. package/src/Utilities/utils/merge.js +0 -44
  276. package/src/Utilities/utils/mergeWith.d.ts +0 -7
  277. package/src/Utilities/utils/mergeWith.js +0 -50
  278. package/src/Utilities/utils/orderBy.d.ts +0 -8
  279. package/src/Utilities/utils/orderBy.js +0 -33
  280. package/src/Utilities/utils/parseInt.d.ts +0 -6
  281. package/src/Utilities/utils/parseInt.js +0 -12
  282. package/src/Utilities/utils/sentenceCase.d.ts +0 -6
  283. package/src/Utilities/utils/sentenceCase.js +0 -19
  284. package/src/Utilities/utils/startCase.d.ts +0 -5
  285. package/src/Utilities/utils/startCase.js +0 -15
  286. package/src/Utilities/utils/throttle.d.ts +0 -17
  287. package/src/Utilities/utils/throttle.js +0 -23
  288. package/src/Utilities/utils/toNumber.d.ts +0 -5
  289. package/src/Utilities/utils/toNumber.js +0 -42
  290. package/src/Utilities/utils/uniq.d.ts +0 -7
  291. package/src/Utilities/utils/uniq.js +0 -12
  292. package/src/Utilities/utils/uniqBy.d.ts +0 -8
  293. package/src/Utilities/utils/uniqBy.js +0 -25
  294. package/src/Utilities/utils/words.d.ts +0 -7
  295. package/src/Utilities/utils/words.js +0 -13
  296. package/src/agGrid/buildValueAggregationMenuItem.d.ts +0 -19
  297. package/src/agGrid/buildValueAggregationMenuItem.js +0 -114
  298. package/src/agGrid/cellRenderers/shouldRenderStyledColumnOnRow.d.ts +0 -30
  299. package/src/agGrid/cellRenderers/shouldRenderStyledColumnOnRow.js +0 -58
  300. package/src/agGrid/createAgGridIcon.d.ts +0 -10
  301. package/src/agGrid/createAgGridIcon.js +0 -19
  302. /package/src/{Utilities → AdaptableState/Aggregations}/only.d.ts +0 -0
  303. /package/src/{Utilities → AdaptableState/Aggregations}/only.js +0 -0
  304. /package/src/{Utilities → AdaptableState/Aggregations}/weightedAverage.d.ts +0 -0
  305. /package/src/Utilities/Helpers/{ActionColumnWidthHelper.d.ts → ActionColumnHelper.d.ts} +0 -0
  306. /package/src/Utilities/Helpers/{ActionColumnWidthHelper.js → ActionColumnHelper.js} +0 -0
  307. /package/src/Utilities/Helpers/{alertFormHelper.d.ts → AlertHelper.d.ts} +0 -0
  308. /package/src/Utilities/Helpers/{chartingHelper.d.ts → ChartHelper.d.ts} +0 -0
  309. /package/src/Utilities/Helpers/{chartingHelper.js → ChartHelper.js} +0 -0
  310. /package/src/Utilities/Helpers/{FormatHelper.d.ts → DisplayFormatHelper.d.ts} +0 -0
  311. /package/src/Utilities/Helpers/{plusMinusTriggerKeys.d.ts → PlusMinusHelper.d.ts} +0 -0
  312. /package/src/Utilities/Helpers/{plusMinusTriggerKeys.js → PlusMinusHelper.js} +0 -0
  313. /package/src/Utilities/Helpers/{QuickSearchStyleHelper.d.ts → QuickSearchHelper.d.ts} +0 -0
  314. /package/src/Utilities/Helpers/{ScheduleJobManager.js → Scheduling/ScheduleJobManager.js} +0 -0
  315. /package/src/Utilities/Helpers/{ScheduleJobRunner.js → Scheduling/ScheduleJobRunner.js} +0 -0
  316. /package/src/Utilities/Helpers/{SparklineOptionsHelper.d.ts → StyledColumns/SparklineStyleHelper.d.ts} +0 -0
  317. /package/src/Utilities/Helpers/{ThemeHelpers.d.ts → ThemeHelper.d.ts} +0 -0
  318. /package/src/Utilities/Helpers/{ThemeHelpers.js → ThemeHelper.js} +0 -0
@@ -6,8 +6,133 @@ const Icon_1 = require("../components/Icon");
6
6
  const icons_1 = require("../components/icons");
7
7
  const ArrayExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/ArrayExtensions"));
8
8
  const GeneralConstants_1 = require("../Utilities/Constants/GeneralConstants");
9
- const buildValueAggregationMenuItem_1 = require("./buildValueAggregationMenuItem");
10
- const createAgGridIcon_1 = require("./createAgGridIcon");
9
+ const AggregationColumns_1 = require("../AdaptableState/Common/AggregationColumns");
10
+ /**
11
+ * Creates an AG Grid icon element for the given icon name.
12
+ *
13
+ * Mimics AG Grid's internal icon creation, producing a
14
+ * `<span class="ag-icon ag-icon-{name}" role="presentation" unselectable="on">`
15
+ * so the icon picks up AG Grid's own icon font/theme styling.
16
+ *
17
+ * @see https://github.com/ag-grid/ag-grid/blob/5ca14e73188f6f52fd7d545d595c067bf1b72168/packages/ag-grid-community/src/utils/icon.ts#L139
18
+ */
19
+ function createAgGridIcon(name) {
20
+ const element = document.createElement('span');
21
+ element.className = `ag-icon ag-icon-${name}`;
22
+ element.setAttribute('role', 'presentation');
23
+ element.setAttribute('unselectable', 'on');
24
+ return element;
25
+ }
26
+ const toFuncLabel = (funcName) => {
27
+ if (funcName === 'avg') {
28
+ return 'Average';
29
+ }
30
+ if (funcName === 'weightedAvg') {
31
+ return 'Weighted Average';
32
+ }
33
+ return funcName ? funcName.charAt(0).toUpperCase() + funcName.slice(1) : funcName;
34
+ };
35
+ /**
36
+ * Builds the replacement for AG Grid's built-in `valueAggSubMenu` column menu item.
37
+ *
38
+ * AG Grid does not allow customizing the built-in submenu, so we rebuild an
39
+ * equivalent one: the column's existing aggregation functions plus a
40
+ * `Weighted Average` item whose submenu lists the numeric columns that can be
41
+ * used as the weight parameter.
42
+ *
43
+ * Both standard and weighted selections persist through the current Layout
44
+ * (`updateCurrentLayout`), so the existing `weightedAvg` aggFunc can read the
45
+ * chosen `weightedColumnId` back from the Layout.
46
+ *
47
+ * Weighted Average is never used in Pivot Layouts, so this only deals with the
48
+ * Table Layout aggregations and the caller skips it entirely in Pivot mode.
49
+ */
50
+ function buildValueAggregationMenuItem(adaptableApi, menuContext) {
51
+ const column = menuContext.adaptableColumn;
52
+ const columnId = column.columnId;
53
+ const currentLayout = adaptableApi.layoutApi.getCurrentLayout();
54
+ const aggregationColumns = currentLayout.TableAggregationColumns || [];
55
+ const currentAggFunc = aggregationColumns.find((agg) => agg.ColumnId === columnId)?.AggFunc;
56
+ let activeAggFuncName;
57
+ if (currentAggFunc != null) {
58
+ const aggFuncName = (0, AggregationColumns_1.getAggFuncName)(currentAggFunc);
59
+ activeAggFuncName = aggFuncName === true ? column.aggregationFunction : aggFuncName;
60
+ }
61
+ const activeWeightColumnId = (0, AggregationColumns_1.isWeightedAverageAggregation)(currentAggFunc)
62
+ ? currentAggFunc.weightedColumnId
63
+ : undefined;
64
+ const applyAggregation = (aggFuncValue) => {
65
+ const upsert = (cols) => {
66
+ const list = cols ? [...cols] : [];
67
+ const index = list.findIndex((col) => col.ColumnId === columnId);
68
+ if (index >= 0) {
69
+ list[index] = { ...list[index], AggFunc: aggFuncValue };
70
+ }
71
+ else {
72
+ list.push({ ColumnId: columnId, AggFunc: aggFuncValue });
73
+ }
74
+ return list;
75
+ };
76
+ adaptableApi.layoutApi.updateCurrentLayout((layout) => {
77
+ const tableLayout = layout;
78
+ return {
79
+ ...tableLayout,
80
+ TableAggregationColumns: upsert(tableLayout.TableAggregationColumns),
81
+ };
82
+ });
83
+ };
84
+ const removeAggregation = () => {
85
+ adaptableApi.layoutApi.updateCurrentLayout((layout) => {
86
+ const tableLayout = layout;
87
+ return {
88
+ ...tableLayout,
89
+ TableAggregationColumns: (tableLayout.TableAggregationColumns || []).filter((col) => col.ColumnId !== columnId),
90
+ };
91
+ });
92
+ };
93
+ // 'None' clears any aggregation for the column and is checked when none is set
94
+ const subMenu = [
95
+ {
96
+ name: 'None',
97
+ checked: activeAggFuncName == null,
98
+ action: () => removeAggregation(),
99
+ },
100
+ ];
101
+ // getDisplayAggFuncNames already positions weightedAvg right after 'avg'
102
+ // (and only includes it when the column is eligible)
103
+ const aggFuncItems = (0, AggregationColumns_1.getDisplayAggFuncNames)(column).map((funcName) => {
104
+ // Weighted Average needs a weight column parameter, so instead of a plain
105
+ // action it gets a submenu listing the numeric columns usable as the weight.
106
+ if (funcName === AggregationColumns_1.WEIGHTED_AVERAGE_AGG_FN_NAME) {
107
+ const weightColumnItems = adaptableApi.columnApi
108
+ .getNumericColumns()
109
+ .filter((numericColumn) => numericColumn.columnId !== columnId)
110
+ .map((numericColumn) => ({
111
+ name: numericColumn.friendlyName ?? numericColumn.columnId,
112
+ checked: activeWeightColumnId === numericColumn.columnId,
113
+ action: () => applyAggregation({
114
+ type: 'weightedAverage',
115
+ weightedColumnId: numericColumn.columnId,
116
+ }),
117
+ }));
118
+ return {
119
+ name: 'Weighted Average',
120
+ checked: activeAggFuncName === AggregationColumns_1.WEIGHTED_AVERAGE_AGG_FN_NAME,
121
+ subMenu: weightColumnItems,
122
+ };
123
+ }
124
+ return {
125
+ name: toFuncLabel(funcName),
126
+ checked: activeAggFuncName === funcName,
127
+ action: () => applyAggregation(funcName),
128
+ };
129
+ });
130
+ subMenu.push(...aggFuncItems);
131
+ return {
132
+ name: 'Value Aggregation',
133
+ subMenu,
134
+ };
135
+ }
11
136
  class AgGridMenuAdapter {
12
137
  _adaptableInstance;
13
138
  constructor(_adaptableInstance) {
@@ -67,8 +192,8 @@ class AgGridMenuAdapter {
67
192
  const isPivotLayout = this.adaptableApi.layoutApi.isCurrentLayoutPivot();
68
193
  const mappedAgGridMenuItems = agGridMenuItems.map((itemName) => itemName === 'valueAggSubMenu' && !isPivotLayout
69
194
  ? {
70
- ...(0, buildValueAggregationMenuItem_1.buildValueAggregationMenuItem)(this.adaptableApi, menuContext),
71
- icon: (0, createAgGridIcon_1.createAgGridIcon)('aggregation'),
195
+ ...buildValueAggregationMenuItem(this.adaptableApi, menuContext),
196
+ icon: createAgGridIcon('aggregation'),
72
197
  }
73
198
  : itemName);
74
199
  const defaultContextMenu = [
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const Badge_1 = require("../../View/Components/Badge");
6
6
  const renderWithAdaptableContext_1 = require("../../View/renderWithAdaptableContext");
7
7
  const React = tslib_1.__importStar(require("react"));
8
- const shouldRenderStyledColumnOnRow_1 = require("./shouldRenderStyledColumnOnRow");
8
+ const StyledColumnHelper_1 = require("../../Utilities/Helpers/StyledColumns/StyledColumnHelper");
9
9
  const OVERFLOW_CLASS = {
10
10
  Truncate: 'ab-Badge__wrapper--truncate',
11
11
  Wrap: 'ab-Badge__wrapper--wrap',
@@ -56,7 +56,7 @@ const getBadgeRendererForColumn = (styledColumn, abColumn, api) => {
56
56
  this.eGui.style.setProperty('justify-content', rowJustify);
57
57
  this.eGui.style.setProperty('width', '100%');
58
58
  }
59
- if (!(0, shouldRenderStyledColumnOnRow_1.shouldRenderStyledColumnOnRow)(styledColumn, params.node, adaptableApi)) {
59
+ if (!(0, StyledColumnHelper_1.shouldRenderStyledColumnOnRow)(styledColumn, params.node, adaptableApi)) {
60
60
  const formattedValue = params.formatValue?.(params.value) ?? params.value ?? '';
61
61
  this.eGui.innerHTML = formattedValue;
62
62
  return;
@@ -87,7 +87,9 @@ const getBadgeRendererForColumn = (styledColumn, abColumn, api) => {
87
87
  ...adaptableApi.internalApi.buildBaseContext(),
88
88
  };
89
89
  const badge = api.styledColumnApi.internalApi.getApplicableBadge(badgeStyle, predicateDefHandlerContext);
90
- const formattedValue = badge?.IconOnly ? '' : params.formatValue?.(value) ?? value ?? '';
90
+ const formattedValue = badge?.IconProperties?.IconOnly
91
+ ? ''
92
+ : params.formatValue?.(value) ?? value ?? '';
91
93
  const isNullValue = formattedValue === '' || formattedValue === null || formattedValue === undefined;
92
94
  if (!isNullValue) {
93
95
  const config = { value: formattedValue };
@@ -117,7 +119,7 @@ const getBadgeRendererForColumn = (styledColumn, abColumn, api) => {
117
119
  this.eGui.innerHTML = formattedValue;
118
120
  return;
119
121
  }
120
- if (badge.IconOnly) {
122
+ if (badge.IconProperties?.IconOnly) {
121
123
  formattedValue = '';
122
124
  }
123
125
  this.renderBadges([
@@ -141,11 +143,11 @@ const getBadgeRendererForColumn = (styledColumn, abColumn, api) => {
141
143
  key: index,
142
144
  pillStyle: badge.PillStyle,
143
145
  children: value,
144
- icon: badge.Icon,
145
- iconPosition: badge.IconPosition ?? 'start',
146
+ icon: badge.IconProperties?.Icon,
147
+ iconPosition: badge.IconProperties?.Position ?? 'start',
146
148
  shape: badge.Shape,
147
149
  density: badgeStyle.Density ?? 'Normal',
148
- iconGap: badge.IconGap,
150
+ iconGap: badge.IconProperties?.Gap,
149
151
  });
150
152
  });
151
153
  this.unmountReactRoot = api.internalApi
@@ -3,8 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getBulletChartRendererForColumn = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const Helper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/Helper"));
6
- const clamp_1 = tslib_1.__importDefault(require("../../Utilities/utils/clamp"));
7
- const shouldRenderStyledColumnOnRow_1 = require("./shouldRenderStyledColumnOnRow");
6
+ const NumberExtensions_1 = require("../../Utilities/Extensions/NumberExtensions");
7
+ const BarStylesHelper_1 = require("../../Utilities/Helpers/StyledColumns/BarStylesHelper");
8
+ const StyledColumnHelper_1 = require("../../Utilities/Helpers/StyledColumns/StyledColumnHelper");
8
9
  const SVG_NS = 'http://www.w3.org/2000/svg';
9
10
  const DEFAULT_BAR_HEIGHT = 8;
10
11
  const DEFAULT_BAND_HEIGHT = 14;
@@ -56,19 +57,18 @@ const normaliseMarker = (override, base) => {
56
57
  };
57
58
  };
58
59
  const resolveTargets = (bulletStyle, styledColumn, abColumn, rowNode, api) => {
59
- if (bulletStyle.Target == undefined) {
60
+ const targetSpec = bulletStyle.TargetProperties?.Target;
61
+ if (targetSpec == undefined) {
60
62
  return [];
61
63
  }
62
- const targets = Array.isArray(bulletStyle.Target)
63
- ? bulletStyle.Target
64
- : [bulletStyle.Target];
64
+ const targets = Array.isArray(targetSpec) ? targetSpec : [targetSpec];
65
65
  const resolved = [];
66
66
  for (const target of targets) {
67
67
  const value = resolveTargetValue(target, styledColumn, abColumn, rowNode, api);
68
68
  if (value == undefined || isNaN(value)) {
69
69
  continue;
70
70
  }
71
- const marker = normaliseMarker(isTargetDefinition(target) ? target.Marker : undefined, bulletStyle.TargetMarker);
71
+ const marker = normaliseMarker(isTargetDefinition(target) ? target.Marker : undefined, bulletStyle.TargetProperties?.Marker);
72
72
  resolved.push({
73
73
  value,
74
74
  marker,
@@ -106,7 +106,7 @@ const toFraction = (value, min, max) => {
106
106
  if (max === min) {
107
107
  return 0;
108
108
  }
109
- return (0, clamp_1.default)((value - min) / (max - min), 0, 1);
109
+ return (0, NumberExtensions_1.clamp)((value - min) / (max - min), 0, 1);
110
110
  };
111
111
  const getBulletChartRendererForColumn = (styledColumn, abColumn, api) => {
112
112
  if (!styledColumn.BulletChartStyle) {
@@ -117,7 +117,7 @@ const getBulletChartRendererForColumn = (styledColumn, abColumn, api) => {
117
117
  eGui;
118
118
  init(params) {
119
119
  // Defer to the shared row-scope helper.
120
- if (!(0, shouldRenderStyledColumnOnRow_1.shouldRenderStyledColumnOnRow)(styledColumn, params.node, api)) {
120
+ if (!(0, StyledColumnHelper_1.shouldRenderStyledColumnOnRow)(styledColumn, params.node, api)) {
121
121
  if (params.value != undefined) {
122
122
  this.eGui = document.createElement('div');
123
123
  this.eGui.append(String(params.value));
@@ -156,10 +156,10 @@ const getBulletChartRendererForColumn = (styledColumn, abColumn, api) => {
156
156
  // `BarThickness` is the bar's *short* axis (height in horizontal,
157
157
  // width in vertical). `BandThickness` is the matching short-axis
158
158
  // size of the surrounding bands.
159
- const barThickness = bulletStyle.BarHeight ?? DEFAULT_BAR_HEIGHT;
159
+ const barThickness = bulletStyle.Bar?.Height ?? DEFAULT_BAR_HEIGHT;
160
160
  const bandThickness = Math.max(barThickness + 6, DEFAULT_BAND_HEIGHT);
161
- const hasCellText = bulletStyle.CellText && bulletStyle.CellText.length > 0;
162
- const isTextMerged = bulletStyle.CellTextPosition === 'Merged';
161
+ const cellTextProperties = bulletStyle.CellTextProperties;
162
+ const hasCellText = (0, BarStylesHelper_1.hasBarStyleCellTextConfigured)(cellTextProperties);
163
163
  // Map a 0..1 value fraction onto the long-axis viewBox (0..100).
164
164
  // In horizontal: 0 -> left, 1 -> right.
165
165
  // In vertical: 0 -> bottom, 1 -> top (SVG y origin is at the top so
@@ -176,7 +176,7 @@ const getBulletChartRendererForColumn = (styledColumn, abColumn, api) => {
176
176
  this.eGui.style.alignItems = isVertical ? 'center' : 'stretch';
177
177
  this.eGui.style.justifyContent = 'center';
178
178
  this.eGui.style.position = 'relative';
179
- this.eGui.style.height = hasCellText && !isTextMerged ? '80%' : '100%';
179
+ this.eGui.style.height = '100%';
180
180
  // SVG chart - we let `preserveAspectRatio="none"` stretch the long axis
181
181
  // (viewBox 0..100) to fill the cell while the short axis stays fixed
182
182
  // in pixels.
@@ -247,7 +247,7 @@ const getBulletChartRendererForColumn = (styledColumn, abColumn, api) => {
247
247
  const barCrossOffset = (bandThickness - barThickness) / 2;
248
248
  const bar = document.createElementNS(SVG_NS, 'rect');
249
249
  setRectAxes(bar, Math.min(valueCoord, originCoord), Math.abs(valueCoord - originCoord), barCrossOffset, barThickness);
250
- bar.setAttribute('fill', bulletStyle.BarColor ?? DEFAULT_BAR_COLOR);
250
+ bar.setAttribute('fill', bulletStyle.Bar?.Color ?? DEFAULT_BAR_COLOR);
251
251
  bar.setAttribute('class', 'ab-BulletChart__bar');
252
252
  svg.appendChild(bar);
253
253
  // Target markers
@@ -259,39 +259,40 @@ const getBulletChartRendererForColumn = (styledColumn, abColumn, api) => {
259
259
  svg.appendChild(marker);
260
260
  }
261
261
  }
262
- this.eGui.appendChild(svg);
262
+ // Wrap the SVG in a positioned container so a `Merged` text row can
263
+ // be absolute-positioned to the centre of the *bar* (matching Percent
264
+ // Bar's behaviour) instead of falling through to the wrapper centre,
265
+ // which would otherwise overlap an `Above` / `Below` band.
266
+ const svgContainer = document.createElement('div');
267
+ svgContainer.style.position = 'relative';
268
+ svgContainer.style.display = 'flex';
269
+ svgContainer.style.alignItems = 'center';
270
+ svgContainer.style.justifyContent = 'center';
271
+ // Horizontal: take the SVG's natural (bandThickness) height.
272
+ // Vertical: stretch to fill the wrapper so the SVG's `height: 100%`
273
+ // resolves against a real size.
274
+ if (isVertical) {
275
+ svgContainer.style.flex = '1 1 auto';
276
+ svgContainer.style.minHeight = '0';
277
+ }
278
+ else {
279
+ svgContainer.style.flex = '0 0 auto';
280
+ }
281
+ svgContainer.appendChild(svg);
282
+ this.eGui.appendChild(svgContainer);
263
283
  if (hasCellText) {
264
- const textEl = document.createElement('div');
265
- textEl.className = 'ab-BulletChart__text';
266
- textEl.style.lineHeight = '1.2';
267
- const parts = [];
268
- if (bulletStyle.CellText.includes('CellValue')) {
269
- parts.push(params.formatValue?.(cellValue) ?? String(cellValue));
270
- }
271
- if (bulletStyle.CellText.includes('PercentageValue')) {
272
- parts.push(`${(valueFraction * 100).toFixed(0)}%`);
273
- }
274
- textEl.innerText = parts.join(' ');
275
- switch (bulletStyle.CellTextPosition) {
276
- case 'Above':
277
- this.eGui.prepend(textEl);
278
- break;
279
- case 'Merged':
280
- textEl.style.position = 'absolute';
281
- textEl.style.top = '50%';
282
- textEl.style.transform = 'translateY(-50%)';
283
- textEl.style.left = '0';
284
- textEl.style.right = '0';
285
- textEl.style.paddingLeft = '5px';
286
- textEl.style.paddingRight = '5px';
287
- textEl.style.pointerEvents = 'none';
288
- this.eGui.appendChild(textEl);
289
- break;
290
- case 'Below':
291
- default:
292
- this.eGui.appendChild(textEl);
293
- break;
294
- }
284
+ // See PercentBarRenderer: `params.formatValue` on a column without a
285
+ // `valueFormatter` returns the raw value (a number here), so coerce
286
+ // to string before it flows into the helpers.
287
+ const formattedCellValue = String(params.formatValue?.(cellValue) ?? cellValue);
288
+ const labels = (0, BarStylesHelper_1.buildBarStyleCellTextLabels)(cellTextProperties, formattedCellValue, `${(valueFraction * 100).toFixed(0)}%`);
289
+ (0, BarStylesHelper_1.mountBarStyleCellText)({
290
+ wrapperEl: this.eGui,
291
+ mergedOverlayEl: svgContainer,
292
+ textClassName: 'ab-BulletChart__text',
293
+ cellTextProperties,
294
+ labels,
295
+ });
295
296
  }
296
297
  }
297
298
  getGui() {
@@ -1,4 +1,5 @@
1
- import { IconStyle, IconStyleMapping, StyledColumn } from '../../AdaptableState/StyledColumnState';
1
+ import { StyledColumn } from '../../AdaptableState/StyledColumnState';
2
+ import { IconStyle, IconStyleMapping } from '../../AdaptableState/StyledColumns/IconStyle';
2
3
  import { AdaptableApi } from '../../Api/AdaptableApi';
3
4
  import { AdaptableColumn } from '../../AdaptableState/Common/AdaptableColumn';
4
5
  /**
@@ -6,9 +6,8 @@ const React = tslib_1.__importStar(require("react"));
6
6
  const Icon_1 = require("../../components/Icon");
7
7
  const renderWithAdaptableContext_1 = require("../../View/renderWithAdaptableContext");
8
8
  const Helper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/Helper"));
9
- const IconStylePresets_1 = require("../../Utilities/Helpers/IconStylePresets");
10
- const shouldRenderStyledColumnOnRow_1 = require("./shouldRenderStyledColumnOnRow");
11
- const iconStyledColumnColumnSupport_1 = require("../../Utilities/Helpers/iconStyledColumnColumnSupport");
9
+ const IconStyleHelper_1 = require("../../Utilities/Helpers/StyledColumns/IconStyleHelper");
10
+ const StyledColumnHelper_1 = require("../../Utilities/Helpers/StyledColumns/StyledColumnHelper");
12
11
  const AdaptableLogger_1 = require("../AdaptableLogger");
13
12
  const DEFAULT_SIZE = 18;
14
13
  const DEFAULT_GAP = 4;
@@ -20,7 +19,7 @@ const normaliseIconMappingKey = (key, matchMode) => {
20
19
  };
21
20
  const resolveIconStyleMappingParts = (iconStyle) => {
22
21
  const presetMappings = iconStyle.Preset
23
- ? (0, IconStylePresets_1.getIconStylePresetMappings)(iconStyle.Preset)
22
+ ? (0, IconStyleHelper_1.getIconStylePresetMappings)(iconStyle.Preset)
24
23
  : [];
25
24
  const userMappings = iconStyle.Mappings ?? [];
26
25
  if (presetMappings.length === 0 || userMappings.length === 0) {
@@ -54,7 +53,7 @@ const resolveEffectiveIconStyleMappings = (iconStyle) => {
54
53
  if (presetMappings.length === 0)
55
54
  return userMappings;
56
55
  if (userMappings.length === 0) {
57
- return iconStyle.Preset ? (0, IconStylePresets_1.getIconStylePresetMappings)(iconStyle.Preset) : [];
56
+ return iconStyle.Preset ? (0, IconStyleHelper_1.getIconStylePresetMappings)(iconStyle.Preset) : [];
58
57
  }
59
58
  return [...presetMappings, ...userMappings];
60
59
  };
@@ -72,7 +71,7 @@ const resolveIconStyleMappingsForSummaryPreview = (iconStyle) => {
72
71
  if (presetMappings.length > 0) {
73
72
  return presetMappings;
74
73
  }
75
- return iconStyle.Preset ? (0, IconStylePresets_1.getIconStylePresetMappings)(iconStyle.Preset) : [];
74
+ return iconStyle.Preset ? (0, IconStyleHelper_1.getIconStylePresetMappings)(iconStyle.Preset) : [];
76
75
  }
77
76
  if (presetMappings.length === 0) {
78
77
  return userMappings;
@@ -192,14 +191,16 @@ const getIconRendererForColumn = (styledColumn, abColumn, api) => {
192
191
  if (!styledColumn.IconStyle) {
193
192
  return;
194
193
  }
195
- if ((0, iconStyledColumnColumnSupport_1.isUnsupportedColumnDataTypeForIconStyle)(abColumn.dataType)) {
194
+ if ((0, IconStyleHelper_1.isUnsupportedColumnDataTypeForIconStyle)(abColumn.dataType)) {
196
195
  (0, AdaptableLogger_1.errorOnce)(`[AdapTable] Icon Styled Column (“${styledColumn.Name || styledColumn.ColumnId || 'unnamed'}” on column ${styledColumn.ColumnId}) is not supported when the column data type is ${abColumn.dataType}. Use Badge Style for array columns, or remove IconStyle from this column.`);
197
196
  return undefined;
198
197
  }
199
198
  const iconStyle = styledColumn.IconStyle;
200
199
  const size = iconStyle.Size ?? DEFAULT_SIZE;
201
200
  const gap = iconStyle.Gap ?? DEFAULT_GAP;
202
- const textPosition = iconStyle.CellTextPosition ?? 'After';
201
+ const cellTextProperties = iconStyle.CellTextProperties;
202
+ const textPosition = cellTextProperties?.CellTextPosition ?? 'After';
203
+ const cellTextTokens = cellTextProperties?.CellText ?? [];
203
204
  const matchMode = iconStyle.MatchMode ?? 'Exact';
204
205
  // Resolve once at column-setup time. Cheap; recomputed when the column
205
206
  // is reconfigured (which is when this factory is re-invoked anyway).
@@ -222,7 +223,7 @@ const getIconRendererForColumn = (styledColumn, abColumn, api) => {
222
223
  // Defer to the shared row-scope helper so behaviour is uniform
223
224
  // across every Styled Column type and `StyledColumn.RowScope` can
224
225
  // override the default ("leaf rows only" for Icon).
225
- if (!(0, shouldRenderStyledColumnOnRow_1.shouldRenderStyledColumnOnRow)(styledColumn, params.node, adaptableApi)) {
226
+ if (!(0, StyledColumnHelper_1.shouldRenderStyledColumnOnRow)(styledColumn, params.node, adaptableApi)) {
226
227
  if (params.value != undefined) {
227
228
  this.eGui.append(String(params.value));
228
229
  }
@@ -236,16 +237,15 @@ const getIconRendererForColumn = (styledColumn, abColumn, api) => {
236
237
  const formatted = params.formatValue?.(cellValue) ??
237
238
  (cellValue != undefined ? String(cellValue) : '');
238
239
  // `CellText` describes the *companion text alongside a matched icon*.
239
- // `Fallback` describes *what to do when no mapping matches*. They are
240
- // independent: when there is no match, `Fallback` decides on its own
241
- // — `CellText` does not get to override `Fallback: 'Hide'`.
240
+ // `FallbackProperties.Mode` describes *what to do when no mapping matches*.
241
+ // They are independent: when there is no match, the fallback decides
242
+ // on its own — `CellText` does not get to override `Mode: 'Hide'`.
242
243
  let iconSpec;
243
244
  let text;
244
245
  let descriptionForTooltip;
245
246
  if (matched) {
246
247
  iconSpec = matched.Icon;
247
248
  descriptionForTooltip = matched.Description;
248
- const cellTextTokens = iconStyle.CellText ?? [];
249
249
  const textParts = [];
250
250
  if (cellTextTokens.includes('CellValue') && formatted) {
251
251
  textParts.push(formatted);
@@ -256,17 +256,18 @@ const getIconRendererForColumn = (styledColumn, abColumn, api) => {
256
256
  text = textParts.length > 0 ? textParts.join(' · ') : undefined;
257
257
  }
258
258
  else if (!cellValueIsEmpty) {
259
- // Unmatched, non-empty cell: defer entirely to `Fallback`.
260
- const fallback = iconStyle.Fallback ?? 'Hide';
261
- if (fallback === 'ShowText') {
259
+ // Unmatched, non-empty cell: defer entirely to the fallback config.
260
+ const fallbackMode = iconStyle.FallbackProperties?.Mode ?? 'Hide';
261
+ const fallbackIcon = iconStyle.FallbackProperties?.Icon;
262
+ if (fallbackMode === 'ShowText') {
262
263
  text = formatted || undefined;
263
264
  }
264
- else if (fallback === 'Icon' && iconStyle.FallbackIcon) {
265
- iconSpec = iconStyle.FallbackIcon;
265
+ else if (fallbackMode === 'Icon' && fallbackIcon) {
266
+ iconSpec = fallbackIcon;
266
267
  }
267
268
  // 'Hide' (and the unsupported permutations) render nothing.
268
269
  }
269
- // else: empty cell → render nothing, regardless of `Fallback`.
270
+ // else: empty cell → render nothing, regardless of fallback config.
270
271
  // If we have nothing to draw, leave the cell empty (and skip mounting
271
272
  // a React root for this row).
272
273
  if (!iconSpec && !text) {