@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
@@ -1,13 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useQuickSearchDebounced = void 0;
4
- const tslib_1 = require("tslib");
5
4
  const react_1 = require("react");
6
- const debounce_1 = tslib_1.__importDefault(require("../../Utilities/utils/debounce"));
5
+ const TimingHelper_1 = require("../../Utilities/Helpers/TimingHelper");
7
6
  const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
8
7
  const useQuickSearchDebounced = (props) => {
9
8
  const [searchText, setSearchText] = (0, react_1.useState)(props.QuickSearchText ?? '');
10
- const debouncedRunQuickSearch = (0, react_1.useMemo)(() => (0, debounce_1.default)(props.onRunQuickSearch, GeneralConstants_1.QUICK_SEARCH_DEBOUNCE_TIME), [props.onRunQuickSearch]);
9
+ const debouncedRunQuickSearch = (0, react_1.useMemo)(() => (0, TimingHelper_1.debounce)(props.onRunQuickSearch, GeneralConstants_1.QUICK_SEARCH_DEBOUNCE_TIME), [props.onRunQuickSearch]);
11
10
  (0, react_1.useEffect)(() => {
12
11
  setSearchText(props.QuickSearchText);
13
12
  }, [props.QuickSearchText]);
@@ -13,7 +13,7 @@ const Flex_1 = require("../../../components/Flex");
13
13
  const Card_1 = require("../../../components/Card");
14
14
  const NewSelect_1 = require("../../../components/NewSelect");
15
15
  const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
16
- const ScheduleHelper_1 = require("../../../Utilities/Helpers/ScheduleHelper");
16
+ const ScheduleHelper_1 = require("../../../Utilities/Helpers/Scheduling/ScheduleHelper");
17
17
  const isScheduleValid = (holder) => {
18
18
  if (!holder?.Schedule) {
19
19
  return 'Schedule is not specified';
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SpecialColumnSettingsWizardStep = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
- const chunk_1 = tslib_1.__importDefault(require("../Utilities/utils/chunk"));
6
+ const ArrayExtensions_1 = require("../Utilities/Extensions/ArrayExtensions");
7
7
  const CheckBox_1 = require("../components/CheckBox");
8
8
  const FormLayout_1 = tslib_1.__importStar(require("../components/FormLayout"));
9
9
  const AdaptableContext_1 = require("./AdaptableContext");
@@ -39,6 +39,6 @@ const SpecialColumnSettingsWizardStep = (props) => {
39
39
  { name: 'first', size: '30%' },
40
40
  { size: '30%', name: 'second' },
41
41
  { size: '30%', name: 'third' },
42
- ], children: [(0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "filterable", checked: Filterable, onChange: (Filterable) => onSettingsChange({ Filterable }), disabled: !adaptable.api.optionsApi.getFilterOptions().enableFilterOnSpecialColumns, children: "Filterable" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "resizable", checked: Resizable, onChange: (Resizable) => onSettingsChange({ Resizable }), children: "Resizable" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "groupable", checked: Groupable, onChange: (Groupable) => onSettingsChange({ Groupable }), children: "Groupable" })] }), (0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "sortable", checked: Sortable, onChange: (Sortable) => onSettingsChange({ Sortable }), children: "Sortable" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "pivotable", checked: Pivotable, onChange: (Pivotable) => onSettingsChange({ Pivotable }), children: "Pivotable" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "aggregatable", checked: Aggregatable, onChange: (Aggregatable) => onSettingsChange({ Aggregatable }), children: "Aggregatable" })] }), (0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "suppres-smenu", checked: SuppressMenu, onChange: (SuppressMenu) => onSettingsChange({ SuppressMenu }), children: "Suppress Menu" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "suppres-movable", checked: SuppressMovable, onChange: (SuppressMovable) => onSettingsChange({ SuppressMovable }), children: "Suppress Movable" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: true, checked: props.isEditable, children: "Editable" })] })] }) })] }), Boolean(possibleColumnTypes?.length) && ((0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Column Types" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Assign custom column types to this column" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(FormLayout_1.default, { columns: [{ name: 'first', size: '30%' }, { name: 'second' }], children: (0, chunk_1.default)(possibleColumnTypes ?? [], 2)?.map(([first, second]) => ((0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { children: [first && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": first, onChange: (checked) => handleColumnTypeChange(first, checked), checked: props.settings?.ColumnTypes?.includes?.(first), children: first })), second && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": second, onChange: (checked) => handleColumnTypeChange(second, checked), checked: props.settings?.ColumnTypes?.includes?.(second), children: second }))] }, first))) }) })] }))] }));
42
+ ], children: [(0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "filterable", checked: Filterable, onChange: (Filterable) => onSettingsChange({ Filterable }), disabled: !adaptable.api.optionsApi.getFilterOptions().enableFilterOnSpecialColumns, children: "Filterable" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "resizable", checked: Resizable, onChange: (Resizable) => onSettingsChange({ Resizable }), children: "Resizable" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "groupable", checked: Groupable, onChange: (Groupable) => onSettingsChange({ Groupable }), children: "Groupable" })] }), (0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "sortable", checked: Sortable, onChange: (Sortable) => onSettingsChange({ Sortable }), children: "Sortable" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "pivotable", checked: Pivotable, onChange: (Pivotable) => onSettingsChange({ Pivotable }), children: "Pivotable" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "aggregatable", checked: Aggregatable, onChange: (Aggregatable) => onSettingsChange({ Aggregatable }), children: "Aggregatable" })] }), (0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "suppres-smenu", checked: SuppressMenu, onChange: (SuppressMenu) => onSettingsChange({ SuppressMenu }), children: "Suppress Menu" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "suppres-movable", checked: SuppressMovable, onChange: (SuppressMovable) => onSettingsChange({ SuppressMovable }), children: "Suppress Movable" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: true, checked: props.isEditable, children: "Editable" })] })] }) })] }), Boolean(possibleColumnTypes?.length) && ((0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Column Types" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Assign custom column types to this column" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(FormLayout_1.default, { columns: [{ name: 'first', size: '30%' }, { name: 'second' }], children: (0, ArrayExtensions_1.chunk)(possibleColumnTypes ?? [], 2)?.map(([first, second]) => ((0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { children: [first && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": first, onChange: (checked) => handleColumnTypeChange(first, checked), checked: props.settings?.ColumnTypes?.includes?.(first), children: first })), second && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": second, onChange: (checked) => handleColumnTypeChange(second, checked), checked: props.settings?.ColumnTypes?.includes?.(second), children: second }))] }, first))) }) })] }))] }));
43
43
  };
44
44
  exports.SpecialColumnSettingsWizardStep = SpecialColumnSettingsWizardStep;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { AdaptableApi } from '../../../Api/AdaptableApi';
3
- import { BadgePillStyle } from '../../../AdaptableState/StyledColumnState';
3
+ import { BadgePillStyle } from '../../../AdaptableState/StyledColumns/BadgeStyle';
4
4
  export interface BadgePillStyleEditorProps {
5
5
  api: AdaptableApi;
6
6
  /** Current pill style (may be undefined / partial). */
@@ -61,32 +61,47 @@ const getBadgeDefinitionSummaryItems = (badge, api) => {
61
61
  items.push({ label: 'Rule', value: rule });
62
62
  items.push({ label: 'Shape', value: badge.Shape ?? 'Rounded' });
63
63
  items.push(...(0, BadgePillStyleEditor_1.getBadgePillStyleSummaryItems)(badge.PillStyle));
64
- if (badge.Icon) {
64
+ const iconProps = badge.IconProperties;
65
+ if (iconProps?.Icon) {
65
66
  items.push({
66
67
  label: 'Icon',
67
- value: 'name' in badge.Icon ? badge.Icon.name : 'Custom',
68
- icon: badge.Icon,
68
+ value: 'name' in iconProps.Icon ? iconProps.Icon.name : 'Custom',
69
+ icon: iconProps.Icon,
69
70
  });
70
71
  }
71
- if (badge.IconOnly) {
72
+ if (iconProps?.IconOnly) {
72
73
  items.push({ label: 'Icon Only', value: 'Yes' });
73
74
  }
74
- if (badge.Icon && badge.IconPosition) {
75
- items.push({ label: 'Icon Position', value: badge.IconPosition });
75
+ if (iconProps?.Icon && iconProps.Position) {
76
+ items.push({ label: 'Icon Position', value: iconProps.Position });
76
77
  }
77
- if (typeof badge.IconGap === 'number') {
78
- items.push({ label: 'Icon Gap', value: `${badge.IconGap}px` });
78
+ if (typeof iconProps?.Gap === 'number') {
79
+ items.push({ label: 'Icon Gap', value: `${iconProps.Gap}px` });
79
80
  }
80
81
  return items;
81
82
  };
82
- const BadgePreview = ({ badge, density, previewValue }) => ((0, jsx_runtime_1.jsx)(Badge_1.Badge, { pillStyle: badge.PillStyle, icon: badge.Icon, iconPosition: badge.IconPosition, shape: badge.Shape, density: density, iconGap: badge.IconGap, children: badge.IconOnly ? '' : previewValue }));
83
+ const BadgePreview = ({ badge, density, previewValue }) => ((0, jsx_runtime_1.jsx)(Badge_1.Badge, { pillStyle: badge.PillStyle, icon: badge.IconProperties?.Icon, iconPosition: badge.IconProperties?.Position, shape: badge.Shape, density: density, iconGap: badge.IconProperties?.Gap, children: badge.IconProperties?.IconOnly ? '' : previewValue }));
83
84
  const BadgeCardSummary = ({ badge, api }) => ((0, jsx_runtime_1.jsx)(CollapsibleWizardCard_1.CollapsibleWizardValueSummary, { value: (0, SummaryColorTag_1.renderSummaryLabelValueTags)(getBadgeDefinitionSummaryItems(badge, api)) }));
84
85
  const BadgeEditorForm = (props) => {
85
86
  const { api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
86
87
  const { badge, columnId, onChange } = props;
87
88
  const predicateDefs = api.styledColumnApi.internalApi.getBadgePredicateDefsForColumn(columnId);
88
89
  const currentShape = badge.Shape ?? 'Rounded';
89
- const hasIcon = Boolean(badge.Icon);
90
+ const iconProps = badge.IconProperties;
91
+ const hasIcon = Boolean(iconProps?.Icon);
92
+ const updateIconProperties = (patch) => {
93
+ const next = {
94
+ ...(iconProps ?? { Icon: undefined }),
95
+ ...patch,
96
+ };
97
+ if (!next.Icon) {
98
+ const cleaned = { ...badge };
99
+ delete cleaned.IconProperties;
100
+ onChange(cleaned);
101
+ return;
102
+ }
103
+ onChange({ ...badge, IconProperties: next });
104
+ };
90
105
  return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-2", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Shape" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Define shape of the corners for this badge" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsx)(Radio_1.RadioGroup, { orientation: "horizontal", name: `ab-badge-shape-${columnId}`, value: currentShape, onRadioChange: (value) => onChange({ ...badge, Shape: value }), className: "twa:gap-3", children: SHAPE_CHOICES.map((choice) => ((0, jsx_runtime_1.jsx)(Radio_1.default, { value: choice.value, children: choice.label }, choice.value))) }) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Style" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Colours and font styling for the badge pill" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsx)(BadgePillStyleEditor_1.BadgePillStyleEditor, { embedded: true, api: api, value: badge.PillStyle, onChange: (next) => {
91
106
  if (next) {
92
107
  onChange({ ...badge, PillStyle: next });
@@ -104,31 +119,23 @@ const BadgeEditorForm = (props) => {
104
119
  }, onClear: () => onChange({
105
120
  ...badge,
106
121
  Predicate: undefined,
107
- }) })) : ((0, jsx_runtime_1.jsx)(ErrorBox_1.default, { children: "Select a column first" })) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Icon" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Optional icon inside the badge \u2014 position and spacing apply once an icon is selected" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsxs)(FormLayout_1.default, { children: [(0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Icon", children: !badge.Icon || 'name' in badge.Icon ? ((0, jsx_runtime_1.jsx)(AdaptableIconSelector_1.AdaptableIconSelector, { value: badge?.Icon && 'name' in badge.Icon ? badge.Icon.name : undefined, onChange: (iconName) => {
122
+ }) })) : ((0, jsx_runtime_1.jsx)(ErrorBox_1.default, { children: "Select a column first" })) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Icon" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Optional icon inside the badge \u2014 position and spacing apply once an icon is selected" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsxs)(FormLayout_1.default, { children: [(0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Icon", children: !iconProps?.Icon || 'name' in iconProps.Icon ? ((0, jsx_runtime_1.jsx)(AdaptableIconSelector_1.AdaptableIconSelector, { value: iconProps?.Icon && 'name' in iconProps.Icon ? iconProps.Icon.name : undefined, onChange: (iconName) => {
108
123
  if (iconName) {
109
- onChange({
110
- ...badge,
111
- Icon: {
112
- name: iconName,
113
- },
124
+ updateIconProperties({
125
+ Icon: { name: iconName },
114
126
  });
115
127
  }
116
128
  else {
117
- onChange({
118
- ...badge,
119
- Icon: undefined,
120
- IconOnly: undefined,
121
- IconPosition: undefined,
122
- IconGap: undefined,
123
- });
129
+ const cleaned = { ...badge };
130
+ delete cleaned.IconProperties;
131
+ onChange(cleaned);
124
132
  }
125
- } })) : ((0, jsx_runtime_1.jsx)(AdaptableIconComponent_1.AdaptableIconComponent, { icon: badge.Icon })) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Icon Position", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[160px]", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { disabled: !hasIcon, className: "twa:w-full", value: badge.IconPosition ?? 'Start', onValueChange: (v) => onChange({ ...badge, IconPosition: v }), items: [
133
+ } })) : ((0, jsx_runtime_1.jsx)(AdaptableIconComponent_1.AdaptableIconComponent, { icon: iconProps.Icon })) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Icon Position", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[160px]", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { disabled: !hasIcon, className: "twa:w-full", value: iconProps?.Position ?? 'Start', onValueChange: (v) => updateIconProperties({ Position: v }), items: [
126
134
  { value: 'Start', label: 'Start' },
127
135
  { value: 'End', label: 'End' },
128
- ] }) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Show Icon Only", children: (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: !hasIcon, checked: badge.IconOnly, onClick: () => onChange({ ...badge, IconOnly: !badge.IconOnly }) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Icon Gap", children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:gap-2", children: [(0, jsx_runtime_1.jsx)(NumberInput_1.NumberInput, { disabled: !hasIcon || badge.IconOnly, value: badge.IconGap ?? '', placeholder: "auto", step: 1, min: 0, style: { width: 70 }, onChange: (value) => {
129
- onChange({
130
- ...badge,
131
- IconGap: typeof value === 'number' && value >= 0 ? value : undefined,
136
+ ] }) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Show Icon Only", children: (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: !hasIcon, checked: iconProps?.IconOnly, onClick: () => updateIconProperties({ IconOnly: !iconProps?.IconOnly }) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Icon Gap", children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:gap-2", children: [(0, jsx_runtime_1.jsx)(NumberInput_1.NumberInput, { disabled: !hasIcon || iconProps?.IconOnly, value: iconProps?.Gap ?? '', placeholder: "auto", step: 1, min: 0, style: { width: 70 }, onChange: (value) => {
137
+ updateIconProperties({
138
+ Gap: typeof value === 'number' && value >= 0 ? value : undefined,
132
139
  });
133
140
  } }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70", children: "px between icon and text \u2014 leave blank to follow Density" })] }) })] }) })] })] }));
134
141
  };
@@ -198,8 +205,7 @@ const StyledColumnBadgeSection = (props) => {
198
205
  ? api.columnApi.getColumnDataTypeForColumnId(data.ColumnId)
199
206
  : 'text';
200
207
  const previewValue = getBadgePreviewValue(dataType);
201
- const initialExpandedCardId = badges.length === 1 ? badgeCardId(0) : null;
202
- const { bindCard, hasExpandedCard, expandedFillsSpace, expandedId, setExpandedId } = (0, CollapsibleWizardCard_1.useWizardCardAccordion)(initialExpandedCardId);
208
+ const { bindCard, hasExpandedCard, expandedFillsSpace, expandedId, setExpandedId } = (0, CollapsibleWizardCard_1.useWizardCardAccordion)(null);
203
209
  const handleAddBadge = () => {
204
210
  const newIndex = badges.length;
205
211
  props.onChange({
@@ -13,9 +13,7 @@ export interface StyledColumnFontStyleEditorProps {
13
13
  disabled?: boolean;
14
14
  /**
15
15
  * When true, the Alignment row is omitted entirely. Used by Styled Columns
16
- * that own horizontal alignment elsewhere (e.g. Percent Bar's "Auto / Left /
17
- * Center / Right" controls drive `CellTextAlignment`, so showing a second
18
- * Alignment row inside the font editor is confusing).
16
+ * that own horizontal alignment elsewhere (e.g. Badge row layout).
19
17
  */
20
18
  hideAlignment?: boolean;
21
19
  }
@@ -13,7 +13,6 @@ const RangesComponent_1 = require("../../Components/RangesComponent");
13
13
  const ColumnSelector_1 = require("../../Components/Selectors/ColumnSelector");
14
14
  const UIHelper_1 = require("../../UIHelper");
15
15
  const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
16
- const ArrayExtensions_1 = tslib_1.__importDefault(require("../../../Utilities/Extensions/ArrayExtensions"));
17
16
  const AdaptableInput_1 = tslib_1.__importDefault(require("../../Components/AdaptableInput"));
18
17
  const Flex_1 = require("../../../components/Flex");
19
18
  const BulletRangesSummaryPreview_1 = require("./StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview");
@@ -22,10 +21,9 @@ const NewSelect_1 = require("../../../components/NewSelect");
22
21
  const StyledColumnSliceStyleEditors_1 = require("./StyledColumnSliceStyleEditors");
23
22
  const Card_1 = require("../../../components/Card");
24
23
  const SummaryColorTag_1 = require("../../Wizard/SummaryColorTag");
24
+ const BarStylesHelper_1 = require("../../../Utilities/Helpers/StyledColumns/BarStylesHelper");
25
+ const BarStyleCellTextLayoutEditor_1 = require("./StyledColumnWizardStyleSection/Components/BarStyleCellTextLayoutEditor");
25
26
  const BULLET_STYLE_FORM_SIZES = ['200px', '1fr'];
26
- // ---------------------------------------------------------------------------
27
- // Summary helpers
28
- // ---------------------------------------------------------------------------
29
27
  const getTargetSummary = (target) => {
30
28
  if (target == undefined) {
31
29
  return null;
@@ -57,12 +55,8 @@ const formatBulletOriginLabel = (origin) => {
57
55
  }
58
56
  return origin;
59
57
  };
60
- const formatBulletCellTextSummary = (cellText) => cellText
61
- ?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value'))
62
- .join(' + ') ?? '';
63
- const formatBulletToolTipSummary = (toolTipText) => toolTipText
64
- ?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value'))
65
- .join(' + ') ?? '';
58
+ const formatBulletCellTextSummary = (cellText) => cellText?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value')).join(' + ') ?? '';
59
+ const formatBulletToolTipSummary = (toolTipText) => toolTipText?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value')).join(' + ') ?? '';
66
60
  const getStyledColumnBulletRangesViewValues = (data) => {
67
61
  const bullet = data.BulletChartStyle;
68
62
  if (!bullet) {
@@ -78,11 +72,12 @@ const getStyledColumnBulletRangesViewValues = (data) => {
78
72
  exports.getStyledColumnBulletRangesViewValues = getStyledColumnBulletRangesViewValues;
79
73
  const buildStyledColumnBulletStyleSummaryStrings = (bullet, options) => {
80
74
  const items = [];
81
- const targetSummary = getTargetSummary(bullet.Target);
75
+ const targetProperties = bullet.TargetProperties;
76
+ const targetSummary = getTargetSummary(targetProperties?.Target);
82
77
  if (targetSummary) {
83
78
  items.push(`Target: ${targetSummary}`);
84
79
  }
85
- const marker = bullet.TargetMarker;
80
+ const marker = targetProperties?.Marker;
86
81
  if (marker?.Shape && marker.Shape !== 'Line') {
87
82
  items.push(`Target Marker Shape: ${marker.Shape}`);
88
83
  }
@@ -95,19 +90,24 @@ const buildStyledColumnBulletStyleSummaryStrings = (bullet, options) => {
95
90
  if (bullet.Orientation === 'Vertical') {
96
91
  items.push('Orientation: Vertical');
97
92
  }
98
- if (bullet.BarColor) {
99
- items.push(`Bar Colour: ${bullet.BarColor}`);
93
+ const barProperties = bullet.Bar;
94
+ if (barProperties?.Color) {
95
+ items.push(`Bar Colour: ${barProperties.Color}`);
100
96
  }
101
- if (bullet.BarHeight != null) {
102
- items.push(`${bullet.Orientation === 'Vertical' ? 'Bar Width' : 'Bar Height'}: ${bullet.BarHeight}px`);
97
+ if (barProperties?.Height != null) {
98
+ items.push(`${bullet.Orientation === 'Vertical' ? 'Bar Width' : 'Bar Height'}: ${barProperties.Height}px`);
103
99
  }
104
100
  items.push(`Origin: ${formatBulletOriginLabel(bullet.Origin)}`);
105
101
  if (bullet.BackColor) {
106
102
  items.push(`Back Colour: ${bullet.BackColor}`);
107
103
  }
108
- if (bullet.CellText?.length) {
109
- items.push(`Cell Text: ${formatBulletCellTextSummary(bullet.CellText)}`);
110
- items.push(`Cell Text Position: ${bullet.CellTextPosition ?? 'Below'}`);
104
+ if ((0, BarStylesHelper_1.hasBarStyleCellTextConfigured)(bullet.CellTextProperties)) {
105
+ const tokens = (0, BarStylesHelper_1.getActiveBarStyleCellTextTokens)(bullet.CellTextProperties);
106
+ items.push(`Cell Text: ${formatBulletCellTextSummary(tokens)}`);
107
+ const layoutSummary = (0, BarStylesHelper_1.formatBarStyleCellTextLayoutSummary)((0, BarStylesHelper_1.resolveBarStyleCellTextLayout)(bullet.CellTextProperties));
108
+ if (layoutSummary) {
109
+ items.push(`Placement: ${layoutSummary}`);
110
+ }
111
111
  }
112
112
  else if (options.includeEmptyCellText) {
113
113
  items.push('Cell Text: None');
@@ -270,59 +270,70 @@ const StyledColumnWizardBulletSection = (props) => {
270
270
  });
271
271
  }, [data, bullet]);
272
272
  // -- Target ----------------------------------------------------------------
273
- const currentMode = getSimpleTargetMode(bullet.Target);
273
+ const currentMode = getSimpleTargetMode(bullet.TargetProperties?.Target);
274
+ const updateTargetProperties = (patch) => {
275
+ const merged = {
276
+ ...bullet.TargetProperties,
277
+ ...patch,
278
+ };
279
+ // Strip the wrapper when nothing meaningful is left.
280
+ const isEmpty = merged.Target == undefined && merged.Marker == undefined;
281
+ update({ TargetProperties: isEmpty ? undefined : merged });
282
+ };
283
+ const setTarget = (target) => updateTargetProperties({ Target: target });
274
284
  const handleTargetModeChange = (mode) => {
275
285
  if (mode === 'None') {
276
- const next = { ...bullet };
277
- delete next.Target;
278
- props.onChange({ ...data, BulletChartStyle: next });
286
+ setTarget(undefined);
279
287
  return;
280
288
  }
281
289
  if (mode === 'Col-Avg' || mode === 'Col-Median') {
282
- update({ Target: mode });
290
+ setTarget(mode);
283
291
  return;
284
292
  }
285
293
  if (mode === 'Number') {
286
- update({ Target: minMaxRangeValues?.max ?? 0 });
294
+ setTarget(minMaxRangeValues?.max ?? 0);
287
295
  return;
288
296
  }
289
297
  if (mode === 'Column') {
290
298
  // Use the first available numeric column (excluding the styled column itself)
291
- const candidate = api.columnApi
292
- .getNumericColumns()
293
- .find((c) => c.columnId !== data.ColumnId);
294
- update({ Target: candidate?.columnId ?? '' });
299
+ const candidate = api.columnApi.getNumericColumns().find((c) => c.columnId !== data.ColumnId);
300
+ setTarget(candidate?.columnId ?? '');
295
301
  return;
296
302
  }
297
303
  };
298
304
  const handleNumericTargetChange = (value) => {
299
- if (value == undefined || isNaN(value)) {
300
- update({ Target: 0 });
301
- }
302
- else {
303
- update({ Target: value });
304
- }
305
+ setTarget(value == undefined || isNaN(value) ? 0 : value);
305
306
  };
306
307
  const handleColumnTargetChange = (columnId) => {
307
- update({ Target: columnId });
308
+ setTarget(columnId);
309
+ };
310
+ // -- Bar -------------------------------------------------------------------
311
+ const updateBar = (patch) => {
312
+ const merged = {
313
+ ...bullet.Bar,
314
+ ...patch,
315
+ };
316
+ const isEmpty = merged.Color == undefined && merged.Height == undefined;
317
+ update({ Bar: isEmpty ? undefined : merged });
308
318
  };
309
319
  // -- Marker ----------------------------------------------------------------
310
320
  const updateMarker = (patch) => {
311
- update({
312
- TargetMarker: {
321
+ updateTargetProperties({
322
+ Marker: {
313
323
  Shape: 'Line',
314
- ...bullet.TargetMarker,
324
+ ...bullet.TargetProperties?.Marker,
315
325
  ...patch,
316
326
  },
317
327
  });
318
328
  };
319
329
  // -- Cell text -------------------------------------------------------------
320
- const toggleCellText = (token, checked) => {
321
- const current = bullet.CellText ?? [];
322
- const next = checked
323
- ? Array.from(new Set([...current, token]))
324
- : current.filter((t) => t !== token);
325
- update({ CellText: next });
330
+ const toggleCellText = (token, show) => {
331
+ update((0, BarStylesHelper_1.toggleBarStyleCellTextToken)(bullet.CellTextProperties, token, show));
332
+ };
333
+ const onCellTextPlacementChange = (token, patch) => {
334
+ update({
335
+ CellTextProperties: (0, BarStylesHelper_1.patchBarStyleCellTextPlacement)(bullet.CellTextProperties, token, patch),
336
+ });
326
337
  };
327
338
  const toggleToolTipText = (token, checked) => {
328
339
  const current = bullet.ToolTipText ?? [];
@@ -331,9 +342,6 @@ const StyledColumnWizardBulletSection = (props) => {
331
342
  : current.filter((t) => t !== token);
332
343
  update({ ToolTipText: next });
333
344
  };
334
- const handleCellTextPositionChange = (pos) => {
335
- update({ CellTextPosition: pos });
336
- };
337
345
  // -------------------------------------------------------------------------
338
346
  // Render
339
347
  // -------------------------------------------------------------------------
@@ -346,22 +354,29 @@ const StyledColumnWizardBulletSection = (props) => {
346
354
  if (variant === 'ranges') {
347
355
  return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { children: (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Ranges" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Define qualitative bands for the bullet scale" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(RangesComponent_1.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 }) })] }) }));
348
356
  }
349
- const numericTargetValue = typeof bullet.Target === 'number'
350
- ? bullet.Target
351
- : typeof bullet.Target?.Value === 'number'
352
- ? bullet.Target.Value
357
+ const primaryTarget = Array.isArray(bullet.TargetProperties?.Target)
358
+ ? bullet.TargetProperties?.Target?.[0]
359
+ : bullet.TargetProperties?.Target;
360
+ const numericTargetValue = typeof primaryTarget === 'number'
361
+ ? primaryTarget
362
+ : typeof primaryTarget?.Value === 'number'
363
+ ? primaryTarget.Value
353
364
  : undefined;
354
- const columnTargetValue = typeof bullet.Target === 'string' && bullet.Target !== 'Col-Avg' && bullet.Target !== 'Col-Median'
355
- ? bullet.Target
356
- : typeof bullet.Target?.Value === 'string'
357
- ? bullet.Target.Value
365
+ const columnTargetValue = typeof primaryTarget === 'string' &&
366
+ primaryTarget !== 'Col-Avg' &&
367
+ primaryTarget !== 'Col-Median'
368
+ ? primaryTarget
369
+ : typeof primaryTarget?.Value === 'string'
370
+ ? primaryTarget.Value
358
371
  : undefined;
372
+ const markerCfg = bullet.TargetProperties?.Marker;
359
373
  const marker = {
360
- Shape: bullet.TargetMarker?.Shape ?? 'Line',
361
- Color: bullet.TargetMarker?.Color ?? '',
362
- Size: bullet.TargetMarker?.Size ?? (bullet.TargetMarker?.Shape === 'Line' ? 2 : 8),
374
+ Shape: markerCfg?.Shape ?? 'Line',
375
+ Color: markerCfg?.Color ?? '',
376
+ Size: markerCfg?.Size ?? (markerCfg?.Shape === 'Line' ? 2 : 8),
363
377
  };
364
- const cellTextDisabled = ArrayExtensions_1.default.IsNullOrEmpty(bullet.CellText) || disabled;
378
+ const cellTextProperties = bullet.CellTextProperties;
379
+ const cellTextDisabled = !(0, BarStylesHelper_1.hasBarStyleCellTextConfigured)(cellTextProperties) || disabled;
365
380
  return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: [(0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Target" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Select a target value for the bullet scale" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsxs)(FormLayout_1.default, { sizes: [...BULLET_STYLE_FORM_SIZES], children: [(0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Target:", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[180px]", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { className: "twa:w-full", value: currentMode, onValueChange: (v) => handleTargetModeChange(v), items: [
366
381
  { value: 'None', label: 'None' },
367
382
  { value: 'Number', label: 'Fixed Number' },
@@ -371,9 +386,9 @@ const StyledColumnWizardBulletSection = (props) => {
371
386
  ] }) }) }), currentMode === 'Number' && ((0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Target Value:", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[160px]", children: (0, jsx_runtime_1.jsx)(AdaptableInput_1.default, { type: "number", value: numericTargetValue ?? '', onChange: (e) => handleNumericTargetChange(e.target.value === '' ? undefined : Number(e.target.value)) }) }) })), currentMode === 'Column' && ((0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Target Column:", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[220px]", children: (0, jsx_runtime_1.jsx)(ColumnSelector_1.ColumnSelector, { type: "number", value: columnTargetValue ?? '', onChange: handleColumnTargetChange, filterColumn: (c) => c.columnId !== data.ColumnId, placeholder: "Select numeric column" }) }) })), currentMode !== 'None' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Marker Shape:", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[160px]", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { className: "twa:w-full", value: marker.Shape, onValueChange: (s) => updateMarker({ Shape: s }), items: MARKER_SHAPES.map((s) => ({ value: s.value, label: s.label })) }) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Marker Colour:", children: (0, jsx_runtime_1.jsx)(ColorPicker_1.ColorPicker, { disabled: disabled, api: api, value: marker.Color || undefined, onChange: (c) => updateMarker({ Color: c }) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Marker Size:", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[100px]", children: (0, jsx_runtime_1.jsx)(AdaptableInput_1.default, { type: "number", min: 1, value: marker.Size, onChange: (e) => updateMarker({ Size: Number(e.target.value) }) }) }) })] }))] }) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Bar" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Set the bar orientation and height" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsxs)(FormLayout_1.default, { sizes: [...BULLET_STYLE_FORM_SIZES], children: [(0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Orientation:", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[160px]", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { className: "twa:w-full", value: bullet.Orientation ?? 'Horizontal', onValueChange: (v) => update({ Orientation: v }), items: [
372
387
  { value: 'Horizontal', label: 'Horizontal' },
373
388
  { value: 'Vertical', label: 'Vertical' },
374
- ] }) }) }), bullet.Orientation === 'Vertical' && ((0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "", children: (0, jsx_runtime_1.jsxs)(Flex_1.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 ", (0, jsx_runtime_1.jsx)("code", { children: "rowHeight" }), " on ", (0, jsx_runtime_1.jsx)("code", { children: " gridOptions " }), " or use", ' ', (0, jsx_runtime_1.jsx)("code", { children: "getRowHeight" }), "."] }) })), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Bar Colour:", children: (0, jsx_runtime_1.jsx)(ColorPicker_1.ColorPicker, { disabled: disabled, api: api, value: bullet.BarColor, onChange: (c) => update({ BarColor: c }) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: bullet.Orientation === 'Vertical' ? 'Bar Width (px):' : 'Bar Height (px):', children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[100px]", children: (0, jsx_runtime_1.jsx)(AdaptableInput_1.default, { type: "number", min: 1, value: bullet.BarHeight ?? '', onChange: (e) => update({
375
- BarHeight: e.target.value === '' ? undefined : Number(e.target.value),
376
- }), placeholder: "8" }) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Origin:", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[160px]", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { className: "twa:w-full", value: typeof bullet.Origin === 'number' ? 'Number' : (bullet.Origin ?? 'Auto'), onValueChange: (v) => {
389
+ ] }) }) }), bullet.Orientation === 'Vertical' && ((0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "", children: (0, jsx_runtime_1.jsxs)(Flex_1.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 ", (0, jsx_runtime_1.jsx)("code", { children: "rowHeight" }), " on ", (0, jsx_runtime_1.jsx)("code", { children: " gridOptions " }), " or use", ' ', (0, jsx_runtime_1.jsx)("code", { children: "getRowHeight" }), "."] }) })), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Bar Colour:", children: (0, jsx_runtime_1.jsx)(ColorPicker_1.ColorPicker, { disabled: disabled, api: api, value: bullet.Bar?.Color, onChange: (c) => updateBar({ Color: c }) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: bullet.Orientation === 'Vertical' ? 'Bar Width (px):' : 'Bar Height (px):', children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[100px]", children: (0, jsx_runtime_1.jsx)(AdaptableInput_1.default, { type: "number", min: 1, value: bullet.Bar?.Height ?? '', onChange: (e) => updateBar({
390
+ Height: e.target.value === '' ? undefined : Number(e.target.value),
391
+ }), placeholder: "8" }) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Origin:", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[160px]", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { className: "twa:w-full", value: typeof bullet.Origin === 'number' ? 'Number' : bullet.Origin ?? 'Auto', onValueChange: (v) => {
377
392
  if (v === 'Auto' || v === 'Zero') {
378
393
  update({ Origin: v });
379
394
  }
@@ -383,11 +398,7 @@ const StyledColumnWizardBulletSection = (props) => {
383
398
  }, items: [
384
399
  { value: 'Auto', label: 'Auto' },
385
400
  { value: 'Zero', label: 'Zero' },
386
- ] }) }) })] }) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Cell Text" }), (0, jsx_runtime_1.jsx)(Flex_1.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))" })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card.Body, { children: [(0, jsx_runtime_1.jsxs)(FormLayout_1.default, { sizes: [...BULLET_STYLE_FORM_SIZES], children: [(0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { label: "Cell Display:", children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: disabled, checked: bullet.CellText?.includes('CellValue'), onChange: (checked) => toggleCellText('CellValue', checked), children: "Cell Value" }), ' ', (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: disabled, className: "twa:ml-3", checked: bullet.CellText?.includes('PercentageValue'), onChange: (checked) => toggleCellText('PercentageValue', checked), children: "Percent Value" })] }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Cell Display Position:", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[160px]", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { className: "twa:w-full", disabled: cellTextDisabled, value: bullet.CellTextPosition ?? 'Below', onValueChange: (v) => handleCellTextPositionChange(v), items: [
387
- { value: 'Above', label: 'Above Bar' },
388
- { value: 'Below', label: 'Below Bar' },
389
- { value: 'Merged', label: 'Merged' },
390
- ] }) }) })] }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: `twa:mt-3 twa:pt-3 twa:border-t twa:border-foreground/15 ${cellTextDisabled ? 'twa:opacity-50' : ''}`, children: (0, jsx_runtime_1.jsx)(StyledColumnSliceStyleEditors_1.StyledColumnFontStyleEditor, { api: api, disabled: cellTextDisabled, value: bullet.Font, onChange: (next) => {
401
+ ] }) }) })] }) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Cell Text" }), (0, jsx_runtime_1.jsx)(Flex_1.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" })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card.Body, { children: [(0, jsx_runtime_1.jsx)(FormLayout_1.default, { sizes: [...BULLET_STYLE_FORM_SIZES], children: (0, jsx_runtime_1.jsx)(BarStyleCellTextLayoutEditor_1.BarStyleCellTextLayoutEditor, { disabled: disabled, cellTextProperties: cellTextProperties, onToggle: toggleCellText, onPlacementChange: onCellTextPlacementChange }) }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: `twa:mt-3 twa:pt-3 twa:border-t twa:border-foreground/15 ${cellTextDisabled ? 'twa:opacity-50' : ''}`, children: (0, jsx_runtime_1.jsx)(StyledColumnSliceStyleEditors_1.StyledColumnFontStyleEditor, { api: api, disabled: cellTextDisabled, value: bullet.Font, onChange: (next) => {
391
402
  if (next) {
392
403
  update({ Font: next });
393
404
  }
@@ -11,7 +11,7 @@ const Tag_1 = require("../../../components/Tag");
11
11
  const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
12
12
  const Flex_1 = require("../../../components/Flex");
13
13
  const NumberInput_1 = require("../../../components/Input/NumberInput");
14
- const StyledColumnGradientHelper_1 = require("../../../Utilities/Helpers/StyledColumnGradientHelper");
14
+ const GradientStyleHelper_1 = require("../../../Utilities/Helpers/StyledColumns/GradientStyleHelper");
15
15
  const StyledColumnSliceStyleEditors_1 = require("./StyledColumnSliceStyleEditors");
16
16
  const Card_1 = require("../../../components/Card");
17
17
  const SummaryColorTag_1 = require("../../Wizard/SummaryColorTag");
@@ -23,8 +23,8 @@ function formatGradientToolTipSummary(opts) {
23
23
  .join(' + ');
24
24
  }
25
25
  const buildStyledColumnGradientStyleSummaryStrings = (gs, options) => {
26
- const minA = gs.MinAlpha ?? StyledColumnGradientHelper_1.DEFAULT_GRADIENT_MIN_ALPHA;
27
- const maxA = gs.MaxAlpha ?? StyledColumnGradientHelper_1.DEFAULT_GRADIENT_MAX_ALPHA;
26
+ const minA = gs.MinAlpha ?? GradientStyleHelper_1.DEFAULT_GRADIENT_MIN_ALPHA;
27
+ const maxA = gs.MaxAlpha ?? GradientStyleHelper_1.DEFAULT_GRADIENT_MAX_ALPHA;
28
28
  const items = [`Alpha: ${minA} → ${maxA}`];
29
29
  if (gs.AutoContrastText) {
30
30
  items.push('Auto Contrast: On');
@@ -90,10 +90,10 @@ const StyledColumnWizardGradientSection = (props) => {
90
90
  patchGradient({ ToolTipText: next });
91
91
  }
92
92
  };
93
- const minAlphaDisplay = gs.MinAlpha ?? StyledColumnGradientHelper_1.DEFAULT_GRADIENT_MIN_ALPHA;
94
- const maxAlphaDisplay = gs.MaxAlpha ?? StyledColumnGradientHelper_1.DEFAULT_GRADIENT_MAX_ALPHA;
95
- return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: [(0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Transparency" }), (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[480px]", children: ["Used at low and high ends of range; defaults are ", StyledColumnGradientHelper_1.DEFAULT_GRADIENT_MIN_ALPHA, " &", ' ', StyledColumnGradientHelper_1.DEFAULT_GRADIENT_MAX_ALPHA, " (Min 0 fades out lowest values)"] })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(FormLayout_1.default, { sizes: [...STYLE_FORM_SIZES], children: (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Alpha range:", children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:ml-2 twa:flex-wrap twa:gap-3", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:gap-1", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-sm", children: "Min" }), (0, jsx_runtime_1.jsx)(NumberInput_1.NumberInput, { disabled: disabled, className: "twa:w-20", value: minAlphaDisplay, min: 0, max: 1, step: 0.05, onChange: (v) => {
96
- if (v === StyledColumnGradientHelper_1.DEFAULT_GRADIENT_MIN_ALPHA) {
93
+ const minAlphaDisplay = gs.MinAlpha ?? GradientStyleHelper_1.DEFAULT_GRADIENT_MIN_ALPHA;
94
+ const maxAlphaDisplay = gs.MaxAlpha ?? GradientStyleHelper_1.DEFAULT_GRADIENT_MAX_ALPHA;
95
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: [(0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Transparency" }), (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[480px]", children: ["Used at low and high ends of range; defaults are ", GradientStyleHelper_1.DEFAULT_GRADIENT_MIN_ALPHA, " &", ' ', GradientStyleHelper_1.DEFAULT_GRADIENT_MAX_ALPHA, " (Min 0 fades out lowest values)"] })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(FormLayout_1.default, { sizes: [...STYLE_FORM_SIZES], children: (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Alpha range:", children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:ml-2 twa:flex-wrap twa:gap-3", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:gap-1", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-sm", children: "Min" }), (0, jsx_runtime_1.jsx)(NumberInput_1.NumberInput, { disabled: disabled, className: "twa:w-20", value: minAlphaDisplay, min: 0, max: 1, step: 0.05, onChange: (v) => {
96
+ if (v === GradientStyleHelper_1.DEFAULT_GRADIENT_MIN_ALPHA) {
97
97
  const { MinAlpha: _m, ...rest } = gs;
98
98
  props.onChange({ ...data, GradientStyle: rest });
99
99
  }
@@ -101,7 +101,7 @@ const StyledColumnWizardGradientSection = (props) => {
101
101
  patchGradient({ MinAlpha: v });
102
102
  }
103
103
  } })] }), (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:gap-1", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-sm", children: "Max" }), (0, jsx_runtime_1.jsx)(NumberInput_1.NumberInput, { disabled: disabled, className: "twa:w-20", value: maxAlphaDisplay, min: 0, max: 1, step: 0.05, onChange: (v) => {
104
- if (v === StyledColumnGradientHelper_1.DEFAULT_GRADIENT_MAX_ALPHA) {
104
+ if (v === GradientStyleHelper_1.DEFAULT_GRADIENT_MAX_ALPHA) {
105
105
  const { MaxAlpha: _m, ...rest } = gs;
106
106
  props.onChange({ ...data, GradientStyle: rest });
107
107
  }