@adaptabletools/adaptable-cjs 23.0.0-canary.8 → 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 (276) hide show
  1. package/index.css +29 -14
  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/StyledColumns/BulletChartStyle.d.ts +5 -5
  9. package/src/AdaptableState/StyledColumns/Common/{BarChartCellText.d.ts → BarStyleProperties.d.ts} +34 -10
  10. package/src/AdaptableState/StyledColumns/GradientStyle.d.ts +2 -2
  11. package/src/AdaptableState/StyledColumns/PercentBarStyle.d.ts +2 -2
  12. package/src/AdaptableState/StyledColumns/RangeBarStyle.d.ts +5 -5
  13. package/src/Api/Implementation/AlertApiImpl.js +1 -1
  14. package/src/Api/Implementation/ChartingApiImpl.js +5 -5
  15. package/src/Api/Implementation/ExportApiImpl.js +1 -1
  16. package/src/Api/Implementation/LayoutHelpers.js +2 -3
  17. package/src/Api/Implementation/QuickSearchApiImpl.js +4 -4
  18. package/src/Api/Implementation/ThemeApiImpl.js +2 -2
  19. package/src/Api/Internal/ActionColumnInternalApi.js +2 -2
  20. package/src/Api/Internal/AlertInternalApi.js +1 -1
  21. package/src/Api/Internal/ChartingInternalApi.js +2 -2
  22. package/src/Api/Internal/ColumnInternalApi.js +2 -2
  23. package/src/Api/Internal/EventInternalApi.js +3 -4
  24. package/src/Api/Internal/ExportInternalApi.js +2 -2
  25. package/src/Api/Internal/FormatColumnInternalApi.js +4 -4
  26. package/src/Api/Internal/GridInternalApi.js +1 -1
  27. package/src/Api/Internal/StyledColumnInternalApi.js +6 -6
  28. package/src/Redux/ActionsReducers/ExportRedux.js +1 -1
  29. package/src/Redux/ActionsReducers/InternalRedux.js +1 -1
  30. package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +2 -3
  31. package/src/Redux/Store/AdaptableReduxMerger.js +7 -9
  32. package/src/Redux/Store/AdaptableStore.js +5 -5
  33. package/src/Strategy/AdaptableModuleBase.d.ts +1 -1
  34. package/src/Strategy/AdaptableModuleBase.js +1 -1
  35. package/src/Strategy/AlertModule.d.ts +1 -1
  36. package/src/Strategy/AlertModule.js +2 -2
  37. package/src/Strategy/BulkUpdateModule.d.ts +1 -1
  38. package/src/Strategy/CalculatedColumnModule.d.ts +2 -2
  39. package/src/Strategy/CellSummaryModule.d.ts +2 -2
  40. package/src/Strategy/ChartingModule.d.ts +1 -1
  41. package/src/Strategy/ChartingModule.js +4 -4
  42. package/src/Strategy/ColumnInfoModule.d.ts +2 -2
  43. package/src/Strategy/CommentModule.d.ts +1 -1
  44. package/src/Strategy/CustomSortModule.d.ts +1 -1
  45. package/src/Strategy/ExportModule.js +2 -2
  46. package/src/Strategy/FlashingCellModule.d.ts +1 -1
  47. package/src/Strategy/FreeTextColumnModule.d.ts +1 -1
  48. package/src/Strategy/GridInfoModule.d.ts +2 -2
  49. package/src/Strategy/LayoutModule.js +2 -2
  50. package/src/Strategy/NoteModule.d.ts +1 -1
  51. package/src/Strategy/PlusMinusModule.d.ts +1 -1
  52. package/src/Strategy/PlusMinusModule.js +8 -8
  53. package/src/Strategy/SettingsPanelModule.d.ts +2 -2
  54. package/src/Strategy/SmartEditModule.d.ts +1 -1
  55. package/src/Strategy/SystemStatusModule.d.ts +2 -2
  56. package/src/Strategy/TeamSharingModule.js +4 -4
  57. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +2 -3
  58. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +2 -2
  59. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +2 -3
  60. package/src/Utilities/Extensions/ArrayExtensions.d.ts +32 -0
  61. package/src/Utilities/Extensions/ArrayExtensions.js +54 -1
  62. package/src/Utilities/Extensions/NumberExtensions.d.ts +21 -0
  63. package/src/Utilities/Extensions/NumberExtensions.js +78 -0
  64. package/src/Utilities/Extensions/ObjectExtensions.d.ts +44 -0
  65. package/src/Utilities/Extensions/ObjectExtensions.js +277 -0
  66. package/src/Utilities/Extensions/StringExtensions.d.ts +26 -0
  67. package/src/Utilities/Extensions/StringExtensions.js +49 -3
  68. package/src/Utilities/Helpers/AdaptableHelper.js +7 -7
  69. package/src/Utilities/Helpers/{alertFormHelper.js → AlertHelper.js} +1 -1
  70. package/src/Utilities/Helpers/DateHelper.js +2 -2
  71. package/src/Utilities/Helpers/{FormatHelper.js → DisplayFormatHelper.js} +5 -5
  72. package/src/Utilities/Helpers/Helper.d.ts +0 -6
  73. package/src/Utilities/Helpers/Helper.js +0 -38
  74. package/src/Utilities/Helpers/{QuickSearchStyleHelper.js → QuickSearchHelper.js} +2 -3
  75. package/src/Utilities/Helpers/{ScheduleHelper.d.ts → Scheduling/ScheduleHelper.d.ts} +1 -1
  76. package/src/Utilities/Helpers/{ScheduleHelper.js → Scheduling/ScheduleHelper.js} +1 -1
  77. package/src/Utilities/Helpers/{ScheduleJobManager.d.ts → Scheduling/ScheduleJobManager.d.ts} +1 -1
  78. package/src/Utilities/Helpers/{ScheduleJobRunner.d.ts → Scheduling/ScheduleJobRunner.d.ts} +1 -1
  79. package/src/Utilities/Helpers/{ScheduledAlertHelper.d.ts → Scheduling/ScheduledAlertHelper.d.ts} +1 -1
  80. package/src/Utilities/Helpers/{ScheduledAlertHelper.js → Scheduling/ScheduledAlertHelper.js} +4 -4
  81. package/src/Utilities/Helpers/{ScheduledJobsMiddlewareHelper.d.ts → Scheduling/ScheduledJobsMiddlewareHelper.d.ts} +1 -1
  82. package/src/Utilities/Helpers/{ScheduledJobsMiddlewareHelper.js → Scheduling/ScheduledJobsMiddlewareHelper.js} +1 -1
  83. package/src/Utilities/Helpers/{ScheduledReportHelper.d.ts → Scheduling/ScheduledReportHelper.d.ts} +1 -1
  84. package/src/Utilities/Helpers/{ScheduledReportHelper.js → Scheduling/ScheduledReportHelper.js} +1 -1
  85. package/src/Utilities/Helpers/SettingsPanelHelper.d.ts +5 -0
  86. package/src/Utilities/{Defaults/DefaultSettingsPanel.js → Helpers/SettingsPanelHelper.js} +16 -1
  87. package/src/Utilities/Helpers/StyledColumns/BarStylesHelper.d.ts +63 -0
  88. package/src/Utilities/Helpers/{barChartCellText.js → StyledColumns/BarStylesHelper.js} +48 -47
  89. package/src/Utilities/Helpers/{StyledColumnGradientHelper.d.ts → StyledColumns/GradientStyleHelper.d.ts} +4 -4
  90. package/src/Utilities/Helpers/{StyledColumnGradientHelper.js → StyledColumns/GradientStyleHelper.js} +9 -9
  91. package/src/Utilities/Helpers/{IconStylePresets.d.ts → StyledColumns/IconStyleHelper.d.ts} +6 -1
  92. package/src/Utilities/Helpers/{IconStylePresets.js → StyledColumns/IconStyleHelper.js} +16 -0
  93. package/src/Utilities/Helpers/{percentBarPreviewHelper.d.ts → StyledColumns/PercentBarStyleHelper.d.ts} +2 -2
  94. package/src/Utilities/Helpers/{percentBarPreviewHelper.js → StyledColumns/PercentBarStyleHelper.js} +11 -12
  95. package/src/Utilities/Helpers/{SparklineOptionsHelper.js → StyledColumns/SparklineStyleHelper.js} +1 -1
  96. package/src/Utilities/Helpers/StyledColumns/StyledColumnHelper.d.ts +52 -0
  97. package/src/Utilities/Helpers/StyledColumns/StyledColumnHelper.js +124 -0
  98. package/src/Utilities/Helpers/TimingHelper.d.ts +34 -0
  99. package/src/Utilities/{utils/debounce.js → Helpers/TimingHelper.js} +25 -9
  100. package/src/Utilities/ObjectFactory.js +1 -1
  101. package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +2 -0
  102. package/src/Utilities/Services/CalculatedColumnExpressionService.js +118 -2
  103. package/src/Utilities/Services/LicenseService/index.js +1 -1
  104. package/src/Utilities/Services/RowSummaryService.d.ts +1 -1
  105. package/src/Utilities/Services/RowSummaryService.js +6 -6
  106. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +2 -2
  107. package/src/View/Alert/Utilities/getAlertType.js +1 -1
  108. package/src/View/Alert/Utilities/getDefaultAlertDefinition.js +1 -1
  109. package/src/View/Alert/Utilities/mapAlertDefinition.js +1 -1
  110. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +1 -1
  111. package/src/View/Alert/Wizard/AlertButtonsEditor.js +3 -3
  112. package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +3 -3
  113. package/src/View/Alert/Wizard/AlertRulesWizardSection.js +1 -1
  114. package/src/View/Alert/Wizard/AlertScheduledWizardSection.js +1 -1
  115. package/src/View/Alert/Wizard/AlertScopeWizardSection.js +1 -1
  116. package/src/View/Alert/Wizard/AlertWizard.js +1 -1
  117. package/src/View/Alert/Wizard/isValidAlertRules.js +1 -1
  118. package/src/View/Charting/ChartingWizard/AgChargingWizard/PreviewChartSection.js +2 -2
  119. package/src/View/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +2 -2
  120. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +2 -2
  121. package/src/View/Comments/CommentsEditor.js +2 -2
  122. package/src/View/Comments/CommentsPopup.js +2 -2
  123. package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +2 -2
  124. package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.js +2 -2
  125. package/src/View/Components/ColumnFilter/components/FloatingFilterInputList.js +2 -2
  126. package/src/View/Components/Forms/AdaptableFormControlTextClear.js +2 -1
  127. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +2 -2
  128. package/src/View/Components/Popups/AdaptablePopupAlert.js +2 -2
  129. package/src/View/Components/Popups/Utilities.js +5 -5
  130. package/src/View/Components/RangesComponent.d.ts +3 -3
  131. package/src/View/Components/RangesComponent.js +5 -9
  132. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +3 -3
  133. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +2 -3
  134. package/src/View/Dashboard/CustomDashboardButton.js +2 -3
  135. package/src/View/Dashboard/Dashboard.js +2 -2
  136. package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +2 -2
  137. package/src/View/DataChangeHistory/DataChangeHistoryTable.js +2 -2
  138. package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +2 -2
  139. package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +2 -2
  140. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +13 -13
  141. package/src/View/FormatColumn/Wizard/FormatColumnPreview.js +4 -4
  142. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +2 -2
  143. package/src/View/Layout/LayoutViewPanel.js +2 -2
  144. package/src/View/Note/NoteEditor.js +2 -2
  145. package/src/View/Note/NotePopup.js +2 -2
  146. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +7 -7
  147. package/src/View/QuickSearch/QuickSearchPopup.js +4 -4
  148. package/src/View/QuickSearch/useQuickSearchDebounced.js +2 -3
  149. package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +1 -1
  150. package/src/View/SpecialColumnSettingsWizardStep.js +2 -2
  151. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +16 -20
  152. package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +8 -8
  153. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +4 -4
  154. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +14 -16
  155. package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.js +14 -14
  156. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/{BarChartCellTextLayoutEditor.d.ts → BarStyleCellTextLayoutEditor.d.ts} +4 -4
  157. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextLayoutEditor.js +37 -0
  158. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/{BarChartCellTextPreview.d.ts → BarStyleCellTextPreview.d.ts} +6 -6
  159. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/{BarChartCellTextPreview.js → BarStyleCellTextPreview.js} +9 -9
  160. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.d.ts +2 -2
  161. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.js +7 -9
  162. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +7 -7
  163. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.js +4 -4
  164. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.js +19 -17
  165. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +7 -7
  166. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.js +2 -2
  167. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +11 -15
  168. package/src/View/UIHelper.js +1 -1
  169. package/src/View/Wizard/OnePageAdaptableWizard.js +2 -2
  170. package/src/View/Wizard/OnePageWizards.js +3 -1
  171. package/src/agGrid/AdaptableAgGrid.js +11 -11
  172. package/src/agGrid/AgGridColumnAdapter.js +30 -29
  173. package/src/agGrid/AgGridExportAdapter.js +3 -3
  174. package/src/agGrid/AgGridMenuAdapter.js +129 -4
  175. package/src/agGrid/cellRenderers/BadgeRenderer.js +2 -2
  176. package/src/agGrid/cellRenderers/BulletChartRenderer.js +8 -8
  177. package/src/agGrid/cellRenderers/IconRenderer.js +7 -8
  178. package/src/agGrid/cellRenderers/PercentBarRenderer.js +9 -9
  179. package/src/agGrid/cellRenderers/RangeBarRenderer.js +10 -11
  180. package/src/agGrid/cellRenderers/RatingRenderer.js +6 -6
  181. package/src/agGrid/editors/AdaptableDateEditor/index.js +3 -3
  182. package/src/components/ColorPicker/ColorPicker.js +2 -2
  183. package/src/components/Datepicker/index.js +2 -2
  184. package/src/components/FormLayout/index.js +2 -2
  185. package/src/components/OverlayTrigger/index.js +2 -2
  186. package/src/env.js +2 -2
  187. package/src/layout-manager/src/isLayoutEqual.js +4 -5
  188. package/src/metamodel/adaptable.metamodel.d.ts +41 -8
  189. package/src/metamodel/adaptable.metamodel.js +1 -1
  190. package/src/migration/VersionUpgrade23.js +2 -2
  191. package/src/types.d.ts +3 -3
  192. package/tsconfig.cjs.tsbuildinfo +1 -1
  193. package/src/AdaptableState/StyledColumns/Common/BarChartCellText.js +0 -7
  194. package/src/AdaptableState/StyledColumns/Common/BarChartMarker.d.ts +0 -24
  195. package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +0 -3
  196. package/src/Utilities/Helpers/barChartCellText.d.ts +0 -63
  197. package/src/Utilities/Helpers/iconStyledColumnColumnSupport.d.ts +0 -5
  198. package/src/Utilities/Helpers/iconStyledColumnColumnSupport.js +0 -18
  199. package/src/Utilities/Helpers/resolveSettingsPanelNavigation.d.ts +0 -3
  200. package/src/Utilities/Helpers/resolveSettingsPanelNavigation.js +0 -19
  201. package/src/Utilities/Helpers/styledColumnRowKindSupport.d.ts +0 -25
  202. package/src/Utilities/Helpers/styledColumnRowKindSupport.js +0 -70
  203. package/src/Utilities/Services/CalculatedColumnSyntheticChange.d.ts +0 -4
  204. package/src/Utilities/Services/CalculatedColumnSyntheticChange.js +0 -120
  205. package/src/Utilities/utils/chunk.d.ts +0 -6
  206. package/src/Utilities/utils/chunk.js +0 -20
  207. package/src/Utilities/utils/clamp.d.ts +0 -5
  208. package/src/Utilities/utils/clamp.js +0 -10
  209. package/src/Utilities/utils/cloneDeepWith.d.ts +0 -9
  210. package/src/Utilities/utils/cloneDeepWith.js +0 -70
  211. package/src/Utilities/utils/debounce.d.ts +0 -20
  212. package/src/Utilities/utils/flatten.d.ts +0 -5
  213. package/src/Utilities/utils/flatten.js +0 -10
  214. package/src/Utilities/utils/flattenDeep.d.ts +0 -5
  215. package/src/Utilities/utils/flattenDeep.js +0 -10
  216. package/src/Utilities/utils/get.d.ts +0 -6
  217. package/src/Utilities/utils/get.js +0 -38
  218. package/src/Utilities/utils/index.d.ts +0 -22
  219. package/src/Utilities/utils/index.js +0 -48
  220. package/src/Utilities/utils/isArray.d.ts +0 -6
  221. package/src/Utilities/utils/isArray.js +0 -8
  222. package/src/Utilities/utils/isEqual.d.ts +0 -5
  223. package/src/Utilities/utils/isEqual.js +0 -127
  224. package/src/Utilities/utils/isObject.d.ts +0 -6
  225. package/src/Utilities/utils/isObject.js +0 -12
  226. package/src/Utilities/utils/isPlainObject.d.ts +0 -6
  227. package/src/Utilities/utils/isPlainObject.js +0 -20
  228. package/src/Utilities/utils/kebabCase.d.ts +0 -5
  229. package/src/Utilities/utils/kebabCase.js +0 -12
  230. package/src/Utilities/utils/merge.d.ts +0 -11
  231. package/src/Utilities/utils/merge.js +0 -44
  232. package/src/Utilities/utils/mergeWith.d.ts +0 -7
  233. package/src/Utilities/utils/mergeWith.js +0 -50
  234. package/src/Utilities/utils/orderBy.d.ts +0 -8
  235. package/src/Utilities/utils/orderBy.js +0 -33
  236. package/src/Utilities/utils/parseInt.d.ts +0 -6
  237. package/src/Utilities/utils/parseInt.js +0 -12
  238. package/src/Utilities/utils/sentenceCase.d.ts +0 -6
  239. package/src/Utilities/utils/sentenceCase.js +0 -19
  240. package/src/Utilities/utils/startCase.d.ts +0 -5
  241. package/src/Utilities/utils/startCase.js +0 -15
  242. package/src/Utilities/utils/throttle.d.ts +0 -17
  243. package/src/Utilities/utils/throttle.js +0 -23
  244. package/src/Utilities/utils/toNumber.d.ts +0 -5
  245. package/src/Utilities/utils/toNumber.js +0 -42
  246. package/src/Utilities/utils/uniq.d.ts +0 -7
  247. package/src/Utilities/utils/uniq.js +0 -12
  248. package/src/Utilities/utils/uniqBy.d.ts +0 -8
  249. package/src/Utilities/utils/uniqBy.js +0 -25
  250. package/src/Utilities/utils/words.d.ts +0 -7
  251. package/src/Utilities/utils/words.js +0 -13
  252. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarChartCellTextLayoutEditor.js +0 -40
  253. package/src/agGrid/buildValueAggregationMenuItem.d.ts +0 -19
  254. package/src/agGrid/buildValueAggregationMenuItem.js +0 -114
  255. package/src/agGrid/cellRenderers/shouldRenderStyledColumnOnRow.d.ts +0 -30
  256. package/src/agGrid/cellRenderers/shouldRenderStyledColumnOnRow.js +0 -58
  257. package/src/agGrid/createAgGridIcon.d.ts +0 -10
  258. package/src/agGrid/createAgGridIcon.js +0 -19
  259. /package/src/{Utilities → AdaptableState/Aggregations}/only.d.ts +0 -0
  260. /package/src/{Utilities → AdaptableState/Aggregations}/only.js +0 -0
  261. /package/src/{Utilities → AdaptableState/Aggregations}/weightedAverage.d.ts +0 -0
  262. /package/src/AdaptableState/StyledColumns/Common/{BarChartMarker.js → BarStyleProperties.js} +0 -0
  263. /package/src/Utilities/Helpers/{ActionColumnWidthHelper.d.ts → ActionColumnHelper.d.ts} +0 -0
  264. /package/src/Utilities/Helpers/{ActionColumnWidthHelper.js → ActionColumnHelper.js} +0 -0
  265. /package/src/Utilities/Helpers/{alertFormHelper.d.ts → AlertHelper.d.ts} +0 -0
  266. /package/src/Utilities/Helpers/{chartingHelper.d.ts → ChartHelper.d.ts} +0 -0
  267. /package/src/Utilities/Helpers/{chartingHelper.js → ChartHelper.js} +0 -0
  268. /package/src/Utilities/Helpers/{FormatHelper.d.ts → DisplayFormatHelper.d.ts} +0 -0
  269. /package/src/Utilities/Helpers/{plusMinusTriggerKeys.d.ts → PlusMinusHelper.d.ts} +0 -0
  270. /package/src/Utilities/Helpers/{plusMinusTriggerKeys.js → PlusMinusHelper.js} +0 -0
  271. /package/src/Utilities/Helpers/{QuickSearchStyleHelper.d.ts → QuickSearchHelper.d.ts} +0 -0
  272. /package/src/Utilities/Helpers/{ScheduleJobManager.js → Scheduling/ScheduleJobManager.js} +0 -0
  273. /package/src/Utilities/Helpers/{ScheduleJobRunner.js → Scheduling/ScheduleJobRunner.js} +0 -0
  274. /package/src/Utilities/Helpers/{SparklineOptionsHelper.d.ts → StyledColumns/SparklineStyleHelper.d.ts} +0 -0
  275. /package/src/Utilities/Helpers/{ThemeHelpers.d.ts → ThemeHelper.d.ts} +0 -0
  276. /package/src/Utilities/Helpers/{ThemeHelpers.js → ThemeHelper.js} +0 -0
@@ -21,8 +21,8 @@ const RangeBarRangesSummaryPreview_1 = require("./StyledColumnWizardStyleSection
21
21
  const StyledColumnRangeBarPreview_1 = require("./StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview");
22
22
  const Card_1 = require("../../../components/Card");
23
23
  const SummaryColorTag_1 = require("../../Wizard/SummaryColorTag");
24
- const barChartCellText_1 = require("../../../Utilities/Helpers/barChartCellText");
25
- const BarChartCellTextLayoutEditor_1 = require("./StyledColumnWizardStyleSection/Components/BarChartCellTextLayoutEditor");
24
+ const BarStylesHelper_1 = require("../../../Utilities/Helpers/StyledColumns/BarStylesHelper");
25
+ const BarStyleCellTextLayoutEditor_1 = require("./StyledColumnWizardStyleSection/Components/BarStyleCellTextLayoutEditor");
26
26
  const RANGE_STYLE_FORM_SIZES = ['200px', '1fr'];
27
27
  const BOUND_MODE_LABELS = {
28
28
  Number: 'Fixed Number',
@@ -110,14 +110,10 @@ const RangeBarBoundInput = ({ api, value, optional, fallbackNumber, excludeColum
110
110
  'twa:[&_.ab-Input]:w-full twa:[&_.ab-Input]:rounded-l-none!',
111
111
  'twa:[&_[data-slot=input-group]]:w-full! twa:[&_[data-slot=input-group]]:rounded-l-none!',
112
112
  ].join(' ');
113
- return ((0, jsx_runtime_1.jsxs)(InputGroup_1.InputGroup, { Component: Flex_1.Flex, className: "twa:items-stretch twa:max-w-[22rem]", children: [(0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { className: `twa:w-[150px] twa:max-w-none twa:shrink-0 twa:box-border${hasEditor ? ' twa:rounded-r-none!' : ''}`, disabled: disabled, value: mode, items: items, onValueChange: (v) => handleModeChange(v) }), hasEditor && (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: editorWrapperClassName, children: editor })] }));
113
+ return ((0, jsx_runtime_1.jsxs)(InputGroup_1.InputGroup, { Component: Flex_1.Flex, className: "twa:items-stretch twa:max-w-[22rem]", children: [(0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { className: `twa:w-[150px] twa:max-w-none twa:shrink-0 twa:box-border${hasEditor ? 'twa:rounded-r-none!' : ''}`, disabled: disabled, value: mode, items: items, onValueChange: (v) => handleModeChange(v) }), hasEditor && (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: editorWrapperClassName, children: editor })] }));
114
114
  };
115
- const formatRangeBarCellTextSummary = (cellText) => cellText
116
- ?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value'))
117
- .join(' + ') ?? '';
118
- const formatRangeBarToolTipSummary = (toolTipText) => toolTipText
119
- ?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value'))
120
- .join(' + ') ?? '';
115
+ const formatRangeBarCellTextSummary = (cellText) => cellText?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value')).join(' + ') ?? '';
116
+ const formatRangeBarToolTipSummary = (toolTipText) => toolTipText?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value')).join(' + ') ?? '';
121
117
  const getStyledColumnRangeBarRangeViewValues = (data) => {
122
118
  const range = data.RangeBarStyle;
123
119
  if (!range) {
@@ -182,10 +178,10 @@ const buildStyledColumnRangeBarDisplaySummaryStrings = (range, options) => {
182
178
  if (range.BackColor) {
183
179
  items.push(`Back Colour: ${range.BackColor}`);
184
180
  }
185
- if ((0, barChartCellText_1.hasBarChartCellTextConfigured)(range.CellTextProperties)) {
186
- const tokens = (0, barChartCellText_1.getActiveBarChartCellTextTokens)(range.CellTextProperties);
181
+ if ((0, BarStylesHelper_1.hasBarStyleCellTextConfigured)(range.CellTextProperties)) {
182
+ const tokens = (0, BarStylesHelper_1.getActiveBarStyleCellTextTokens)(range.CellTextProperties);
187
183
  items.push(`Cell Text: ${formatRangeBarCellTextSummary(tokens)}`);
188
- const layoutSummary = (0, barChartCellText_1.formatBarChartCellTextLayoutSummary)((0, barChartCellText_1.resolveBarChartCellTextLayout)(range.CellTextProperties));
184
+ const layoutSummary = (0, BarStylesHelper_1.formatBarStyleCellTextLayoutSummary)((0, BarStylesHelper_1.resolveBarStyleCellTextLayout)(range.CellTextProperties));
189
185
  if (layoutSummary) {
190
186
  items.push(`Placement: ${layoutSummary}`);
191
187
  }
@@ -381,7 +377,9 @@ const StyledColumnWizardRangeBarSection = (props) => {
381
377
  const resolvedBoundValues = {
382
378
  'Col-Min': minMaxRangeValues?.min,
383
379
  'Col-Max': minMaxRangeValues?.max,
384
- 'Col-Avg': column ? api.styledColumnApi.internalApi.getAvgValueForNumericColumn(column) : undefined,
380
+ 'Col-Avg': column
381
+ ? api.styledColumnApi.internalApi.getAvgValueForNumericColumn(column)
382
+ : undefined,
385
383
  'Col-Median': column
386
384
  ? api.styledColumnApi.internalApi.getMedianValueForNumericColumn(column)
387
385
  : undefined,
@@ -448,11 +446,11 @@ const StyledColumnWizardRangeBarSection = (props) => {
448
446
  };
449
447
  // -- Cell text -------------------------------------------------------------
450
448
  const toggleCellText = (token, show) => {
451
- update((0, barChartCellText_1.toggleBarChartCellTextToken)(range.CellTextProperties, token, show));
449
+ update((0, BarStylesHelper_1.toggleBarStyleCellTextToken)(range.CellTextProperties, token, show));
452
450
  };
453
451
  const onCellTextPlacementChange = (token, patch) => {
454
452
  update({
455
- CellTextProperties: (0, barChartCellText_1.patchBarChartCellTextPlacement)(range.CellTextProperties, token, patch),
453
+ CellTextProperties: (0, BarStylesHelper_1.patchBarStyleCellTextPlacement)(range.CellTextProperties, token, patch),
456
454
  });
457
455
  };
458
456
  const toggleToolTipText = (token, checked) => {
@@ -501,6 +499,6 @@ const StyledColumnWizardRangeBarSection = (props) => {
501
499
  { value: 'Clamp', label: 'Clamp to edge' },
502
500
  { value: 'Overflow', label: 'Show outside' },
503
501
  { value: 'Hide', label: 'Hide marker' },
504
- ] }) }) }), outOfRangeMode === 'Clamp' && ((0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: `Out-of-range ${api.internalApi.getCorrectEnglishVariant('Colour')}:`, children: (0, jsx_runtime_1.jsx)(ColorPicker_1.OptionalColorPicker, { disabled: disabled, api: api, value: range.OutOfRange?.Color, defaultColor: "crimson", onChange: (c) => updateOutOfRangeProperties({ Color: c }) }) }))] }) })] }), (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: "Text & Tooltip" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Optional cell-text overlay and AG Grid tooltip content." })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsxs)(FormLayout_1.default, { sizes: [...RANGE_STYLE_FORM_SIZES], children: [(0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Cell Text Layout:", children: (0, jsx_runtime_1.jsx)(BarChartCellTextLayoutEditor_1.BarChartCellTextLayoutEditor, { disabled: disabled, cellTextProperties: range.CellTextProperties, onToggle: toggleCellText, onPlacementChange: onCellTextPlacementChange }) }), (0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { label: "Tooltip Display:", children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: disabled, checked: range.ToolTipText?.includes('CellValue'), onChange: (checked) => toggleToolTipText('CellValue', checked), children: "Cell Value" }), ' ', (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: disabled, className: "twa:ml-3", checked: range.ToolTipText?.includes('PercentageValue'), onChange: (checked) => toggleToolTipText('PercentageValue', checked), children: "Percent Value" })] })] }) })] }), (0, jsx_runtime_1.jsx)(StyledColumnRangeBarPreview_1.StyledColumnRangeBarPreviewCard, { data: data })] }))] }));
502
+ ] }) }) }), outOfRangeMode === 'Clamp' && ((0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: `Out-of-range ${api.internalApi.getCorrectEnglishVariant('Colour')}:`, children: (0, jsx_runtime_1.jsx)(ColorPicker_1.OptionalColorPicker, { disabled: disabled, api: api, value: range.OutOfRange?.Color, defaultColor: "crimson", onChange: (c) => updateOutOfRangeProperties({ Color: c }) }) }))] }) })] }), (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: "Text & Tooltip" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Optional cell-text overlay and AG Grid tooltip content." })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsxs)(FormLayout_1.default, { sizes: [...RANGE_STYLE_FORM_SIZES], children: [(0, jsx_runtime_1.jsx)(BarStyleCellTextLayoutEditor_1.BarStyleCellTextLayoutEditor, { disabled: disabled, cellTextProperties: range.CellTextProperties, onToggle: toggleCellText, onPlacementChange: onCellTextPlacementChange }), (0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { label: "Tooltip Display:", children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: disabled, checked: range.ToolTipText?.includes('CellValue'), onChange: (checked) => toggleToolTipText('CellValue', checked), children: "Cell Value" }), ' ', (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: disabled, className: "twa:ml-3", checked: range.ToolTipText?.includes('PercentageValue'), onChange: (checked) => toggleToolTipText('PercentageValue', checked), children: "Percent Value" })] })] }) })] }), (0, jsx_runtime_1.jsx)(StyledColumnRangeBarPreview_1.StyledColumnRangeBarPreviewCard, { data: data })] }))] }));
505
503
  };
506
504
  exports.StyledColumnWizardRangeBarSection = StyledColumnWizardRangeBarSection;
@@ -10,8 +10,8 @@ const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
10
10
  const Flex_1 = require("../../../components/Flex");
11
11
  const CheckBox_1 = require("../../../components/CheckBox");
12
12
  const utils_1 = require("../../../lib/utils");
13
- const styledColumnRowKindSupport_1 = require("../../../Utilities/Helpers/styledColumnRowKindSupport");
14
- const iconStyledColumnColumnSupport_1 = require("../../../Utilities/Helpers/iconStyledColumnColumnSupport");
13
+ const StyledColumnHelper_1 = require("../../../Utilities/Helpers/StyledColumns/StyledColumnHelper");
14
+ const IconStyleHelper_1 = require("../../../Utilities/Helpers/StyledColumns/IconStyleHelper");
15
15
  const CollapsibleWizardCard_1 = require("../../Wizard/CollapsibleWizardCard");
16
16
  // ---------------------------------------------------------------------------
17
17
  // Row-kind helpers
@@ -37,23 +37,23 @@ const defaultRowKindIncluded = (styledColumn, kind) => {
37
37
  if (styledColumn.BadgeStyle) {
38
38
  return true;
39
39
  }
40
- if (!(0, styledColumnRowKindSupport_1.isStyledColumnRowKindSupported)(styledColumn, kind)) {
40
+ if (!(0, StyledColumnHelper_1.isStyledColumnRowKindSupported)(styledColumn, kind)) {
41
41
  return false;
42
42
  }
43
43
  return kind !== 'Group';
44
44
  };
45
45
  const isRowKindIncluded = (styledColumn, kind) => {
46
- if (!(0, styledColumnRowKindSupport_1.isStyledColumnRowKindSupported)(styledColumn, kind)) {
46
+ if (!(0, StyledColumnHelper_1.isStyledColumnRowKindSupported)(styledColumn, kind)) {
47
47
  return false;
48
48
  }
49
49
  const scope = styledColumn.RowScope;
50
50
  if (scope) {
51
- return !scope[styledColumnRowKindSupport_1.STYLED_COLUMN_ROW_KIND_EXCLUDE_KEY[kind]];
51
+ return !scope[StyledColumnHelper_1.STYLED_COLUMN_ROW_KIND_EXCLUDE_KEY[kind]];
52
52
  }
53
53
  return defaultRowKindIncluded(styledColumn, kind);
54
54
  };
55
55
  const collectIncludedRowKinds = (styledColumn) => {
56
- return styledColumnRowKindSupport_1.STYLED_COLUMN_ROW_KINDS.filter((k) => isRowKindIncluded(styledColumn, k));
56
+ return StyledColumnHelper_1.STYLED_COLUMN_ROW_KINDS.filter((k) => isRowKindIncluded(styledColumn, k));
57
57
  };
58
58
  // ---------------------------------------------------------------------------
59
59
  // Summary
@@ -86,7 +86,7 @@ const isValidStyledColumnScope = (data, api) => {
86
86
  return 'Please select a column for the Styled Column.';
87
87
  }
88
88
  if (data.IconStyle &&
89
- (0, iconStyledColumnColumnSupport_1.isUnsupportedColumnDataTypeForIconStyle)(api.columnApi.getColumnDataTypeForColumnId(data.ColumnId))) {
89
+ (0, IconStyleHelper_1.isUnsupportedColumnDataTypeForIconStyle)(api.columnApi.getColumnDataTypeForColumnId(data.ColumnId))) {
90
90
  return 'Icon Style applies to scalar cell values only. Choose a numeric or plain text column, or use Badge Style for array columns.';
91
91
  }
92
92
  if (collectIncludedRowKinds(data).length === 0) {
@@ -95,15 +95,15 @@ const isValidStyledColumnScope = (data, api) => {
95
95
  return true;
96
96
  };
97
97
  exports.isValidStyledColumnScope = isValidStyledColumnScope;
98
- const StyledColumnRowScopePanel = ({ data, onRowKindChange, }) => ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "column", className: "twa:items-start twa:px-1 twa:py-1", style: { rowGap: 'calc(var(--ab-base-space) * 2)' }, children: styledColumnRowKindSupport_1.STYLED_COLUMN_ROW_KINDS.map((kind) => {
99
- const supported = (0, styledColumnRowKindSupport_1.isStyledColumnRowKindSupported)(data, kind);
100
- const disabledReason = (0, styledColumnRowKindSupport_1.getStyledColumnRowKindDisabledReason)(data, kind);
98
+ const StyledColumnRowScopePanel = ({ data, onRowKindChange, }) => ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "column", className: "twa:items-start twa:px-1 twa:py-1", style: { rowGap: 'calc(var(--ab-base-space) * 2)' }, children: StyledColumnHelper_1.STYLED_COLUMN_ROW_KINDS.map((kind) => {
99
+ const supported = (0, StyledColumnHelper_1.isStyledColumnRowKindSupported)(data, kind);
100
+ const disabledReason = (0, StyledColumnHelper_1.getStyledColumnRowKindDisabledReason)(data, kind);
101
101
  return ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": `include-${kind.toLowerCase()}-rows-checkbox`, disabled: !supported, title: disabledReason, checked: isRowKindIncluded(data, kind), onChange: (checked) => onRowKindChange(kind, checked), children: ROW_KIND_LABELS[kind] }, kind));
102
102
  }) }));
103
103
  const StyledColumnWizardScopeSection = (props) => {
104
104
  const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
105
105
  React.useEffect(() => {
106
- const next = (0, styledColumnRowKindSupport_1.sanitizeStyledColumnRowScope)(data);
106
+ const next = (0, StyledColumnHelper_1.sanitizeStyledColumnRowScope)(data);
107
107
  if (!next) {
108
108
  return;
109
109
  }
@@ -131,7 +131,7 @@ const StyledColumnWizardScopeSection = (props) => {
131
131
  return;
132
132
  }
133
133
  const dt = api.columnApi.getColumnDataTypeForColumnId(data.ColumnId);
134
- if ((0, iconStyledColumnColumnSupport_1.isUnsupportedColumnDataTypeForIconStyle)(dt)) {
134
+ if ((0, IconStyleHelper_1.isUnsupportedColumnDataTypeForIconStyle)(dt)) {
135
135
  props.onChange({
136
136
  ...data,
137
137
  ColumnId: undefined,
@@ -201,7 +201,7 @@ const StyledColumnWizardScopeSection = (props) => {
201
201
  props.onChange(newStyledColumn);
202
202
  };
203
203
  const handleRowKindChange = (kind, include) => {
204
- if (!(0, styledColumnRowKindSupport_1.isStyledColumnRowKindSupported)(data, kind)) {
204
+ if (!(0, StyledColumnHelper_1.isStyledColumnRowKindSupported)(data, kind)) {
205
205
  return;
206
206
  }
207
207
  const baseScope = data.RowScope ?? {
@@ -212,7 +212,7 @@ const StyledColumnWizardScopeSection = (props) => {
212
212
  };
213
213
  const nextScope = {
214
214
  ...baseScope,
215
- [styledColumnRowKindSupport_1.STYLED_COLUMN_ROW_KIND_EXCLUDE_KEY[kind]]: !include,
215
+ [StyledColumnHelper_1.STYLED_COLUMN_ROW_KIND_EXCLUDE_KEY[kind]]: !include,
216
216
  };
217
217
  props.onChange({
218
218
  ...data,
@@ -1,9 +1,9 @@
1
1
  import * as React from 'react';
2
- import { BarChartCellTextPlacement, BarChartCellTextProperties } from '../../../../../AdaptableState/StyledColumns/Common/BarChartCellText';
2
+ import { BarStyleCellTextPlacement, BarStyleCellTextProperties } from '../../../../../AdaptableState/StyledColumns/Common/BarStyleProperties';
3
3
  import { CellTextOption } from '../../../../../AdaptableState/StyledColumns/Common/CellTextOptions';
4
- export declare const BarChartCellTextLayoutEditor: React.FunctionComponent<{
4
+ export declare const BarStyleCellTextLayoutEditor: React.FunctionComponent<{
5
5
  disabled?: boolean;
6
- cellTextProperties?: BarChartCellTextProperties;
6
+ cellTextProperties?: BarStyleCellTextProperties;
7
7
  onToggle: (token: CellTextOption, show: boolean) => void;
8
- onPlacementChange: (token: CellTextOption, patch: Partial<BarChartCellTextPlacement>) => void;
8
+ onPlacementChange: (token: CellTextOption, patch: Partial<BarStyleCellTextPlacement>) => void;
9
9
  }>;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BarStyleCellTextLayoutEditor = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const BarStylesHelper_1 = require("../../../../../Utilities/Helpers/StyledColumns/BarStylesHelper");
6
+ const CheckBox_1 = require("../../../../../components/CheckBox");
7
+ const Flex_1 = require("../../../../../components/Flex");
8
+ const FormLayout_1 = require("../../../../../components/FormLayout");
9
+ const NewSelect_1 = require("../../../../../components/NewSelect");
10
+ const HORIZONTAL_CHOICES = [
11
+ { value: 'Left', label: 'Left' },
12
+ { value: 'Center', label: 'Center' },
13
+ { value: 'Right', label: 'Right' },
14
+ ];
15
+ const VERTICAL_CHOICES = [
16
+ { value: 'Above', label: 'Above Bar' },
17
+ { value: 'Below', label: 'Below Bar' },
18
+ { value: 'Merged', label: 'Merged' },
19
+ ];
20
+ const ROWS = [
21
+ { token: 'CellValue', label: 'Cell Value:', key: 'CellValue' },
22
+ { token: 'PercentageValue', label: 'Percent Value:', key: 'PercentValue' },
23
+ ];
24
+ const BarStyleCellTextLayoutEditor = ({ disabled, cellTextProperties, onToggle, onPlacementChange }) => {
25
+ const layout = (0, BarStylesHelper_1.resolveBarStyleCellTextLayout)(cellTextProperties);
26
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: ROWS.map(({ token, label, key }) => {
27
+ const placement = layout[key];
28
+ const isShown = Boolean(placement);
29
+ const rowDisabled = disabled || !isShown;
30
+ return ((0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: label, children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:gap-3", children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: disabled, checked: isShown, onChange: (checked) => onToggle(token, checked) }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:w-[140px]", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { className: "twa:w-full", disabled: rowDisabled, value: placement?.Horizontal ?? 'Left', onValueChange: (v) => onPlacementChange(token, {
31
+ Horizontal: v,
32
+ }), items: HORIZONTAL_CHOICES }) }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:w-[140px]", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { className: "twa:w-full", disabled: rowDisabled, value: placement?.Vertical ?? 'Below', onValueChange: (v) => onPlacementChange(token, {
33
+ Vertical: v,
34
+ }), items: VERTICAL_CHOICES }) })] }) }, token));
35
+ }) }));
36
+ };
37
+ exports.BarStyleCellTextLayoutEditor = BarStyleCellTextLayoutEditor;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- import { BarChartCellTextProperties } from '../../../../../AdaptableState/StyledColumns/Common/BarChartCellText';
3
- import { BarChartCellTextLabels } from '../../../../../Utilities/Helpers/barChartCellText';
2
+ import { BarStyleCellTextProperties } from '../../../../../AdaptableState/StyledColumns/Common/BarStyleProperties';
3
+ import { BarStyleCellTextLabels } from '../../../../../Utilities/Helpers/StyledColumns/BarStylesHelper';
4
4
  /**
5
5
  * Preview of the per-value cell-text layout. Renders three potential bands:
6
6
  * - `Above` slots (above the bar)
@@ -11,13 +11,13 @@ import { BarChartCellTextLabels } from '../../../../../Utilities/Helpers/barChar
11
11
  * stable. When `vertical` is provided, only the band matching that value is
12
12
  * rendered (used by the preview cards to position bands around the bar).
13
13
  */
14
- export declare const BarChartCellTextPreview: React.FunctionComponent<{
14
+ export declare const BarStyleCellTextPreview: React.FunctionComponent<{
15
15
  className?: string;
16
16
  style?: React.CSSProperties;
17
- cellTextProperties?: BarChartCellTextProperties;
18
- labels: BarChartCellTextLabels;
17
+ cellTextProperties?: BarStyleCellTextProperties;
18
+ labels: BarStyleCellTextLabels;
19
19
  mergedOverlayClassName?: string;
20
20
  /** Render only the band matching this vertical position. */
21
21
  vertical?: 'Above' | 'Below' | 'Merged';
22
22
  }>;
23
- export declare const shouldShowBarChartCellTextOutsideBar: (cellTextProperties: BarChartCellTextProperties | undefined, hasCellText: boolean) => boolean;
23
+ export declare const shouldShowBarStyleCellTextOutsideBar: (cellTextProperties: BarStyleCellTextProperties | undefined, hasCellText: boolean) => boolean;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.shouldShowBarChartCellTextOutsideBar = exports.BarChartCellTextPreview = void 0;
3
+ exports.shouldShowBarStyleCellTextOutsideBar = exports.BarStyleCellTextPreview = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const barChartCellText_1 = require("../../../../../Utilities/Helpers/barChartCellText");
5
+ const BarStylesHelper_1 = require("../../../../../Utilities/Helpers/StyledColumns/BarStylesHelper");
6
6
  const Flex_1 = require("../../../../../components/Flex");
7
7
  const HORIZONTAL_ORDER = ['Left', 'Center', 'Right'];
8
8
  const HORIZONTAL_JUSTIFY = {
@@ -36,11 +36,11 @@ const CellTextRow = ({ className, style, slots }) => ((0, jsx_runtime_1.jsx)(Fle
36
36
  * stable. When `vertical` is provided, only the band matching that value is
37
37
  * rendered (used by the preview cards to position bands around the bar).
38
38
  */
39
- const BarChartCellTextPreview = ({ className, style, cellTextProperties, labels, mergedOverlayClassName, vertical }) => {
39
+ const BarStyleCellTextPreview = ({ className, style, cellTextProperties, labels, mergedOverlayClassName, vertical }) => {
40
40
  if (!labels.cellValue && !labels.percentage) {
41
41
  return null;
42
42
  }
43
- const slots = (0, barChartCellText_1.resolveBarChartCellTextSlots)(cellTextProperties, labels);
43
+ const slots = (0, BarStylesHelper_1.resolveBarStyleCellTextSlots)(cellTextProperties, labels);
44
44
  if (!slots.length) {
45
45
  return null;
46
46
  }
@@ -51,12 +51,12 @@ const BarChartCellTextPreview = ({ className, style, cellTextProperties, labels,
51
51
  const usedClassName = vertical === 'Merged' ? mergedOverlayClassName ?? className : className;
52
52
  return ((0, jsx_runtime_1.jsx)(CellTextRow, { className: usedClassName, style: style, slots: bandSlots.map((s) => ({ horizontal: s.horizontal, text: s.text })) }));
53
53
  };
54
- exports.BarChartCellTextPreview = BarChartCellTextPreview;
55
- const shouldShowBarChartCellTextOutsideBar = (cellTextProperties, hasCellText) => {
56
- if (!hasCellText || !(0, barChartCellText_1.hasBarChartCellTextConfigured)(cellTextProperties)) {
54
+ exports.BarStyleCellTextPreview = BarStyleCellTextPreview;
55
+ const shouldShowBarStyleCellTextOutsideBar = (cellTextProperties, hasCellText) => {
56
+ if (!hasCellText || !(0, BarStylesHelper_1.hasBarStyleCellTextConfigured)(cellTextProperties)) {
57
57
  return false;
58
58
  }
59
- const { hasAbove, hasBelow } = (0, barChartCellText_1.getBarChartCellTextSlotPresence)(cellTextProperties);
59
+ const { hasAbove, hasBelow } = (0, BarStylesHelper_1.getBarStyleCellTextSlotPresence)(cellTextProperties);
60
60
  return hasAbove || hasBelow;
61
61
  };
62
- exports.shouldShowBarChartCellTextOutsideBar = shouldShowBarChartCellTextOutsideBar;
62
+ exports.shouldShowBarStyleCellTextOutsideBar = shouldShowBarStyleCellTextOutsideBar;
@@ -1,11 +1,11 @@
1
1
  import * as React from 'react';
2
2
  import { CellColorRange, ColumnComparison, NumericStyledColumn } from '../../../../../AdaptableState/StyledColumns/Common/NumericStyledColumn';
3
- import { GradientStyle, GradientZeroCentredColors } from '../../../../../AdaptableState/StyledColumns/GradientStyle';
3
+ import { GradientStyle, ZeroCentredColors } from '../../../../../AdaptableState/StyledColumns/GradientStyle';
4
4
  import { AdaptableApi } from '../../../../../types';
5
5
  export declare function gradientRangeStripCss(color: string, reverseGradient: boolean, minAlpha: number, maxAlpha: number): string;
6
6
  export interface GradientRangesSummaryPreviewProps {
7
7
  ranges?: CellColorRange[];
8
- zeroCentred?: GradientZeroCentredColors;
8
+ zeroCentred?: ZeroCentredColors;
9
9
  rangeValueType: NumericStyledColumn['RangeValueType'];
10
10
  gradientStyle?: Pick<GradientStyle, 'MinAlpha' | 'MaxAlpha'>;
11
11
  }
@@ -8,7 +8,7 @@ const tinycolor2_1 = tslib_1.__importDefault(require("tinycolor2"));
8
8
  const Flex_1 = require("../../../../../components/Flex");
9
9
  const Tag_1 = require("../../../../../components/Tag");
10
10
  const StyleHelper_1 = require("../../../../../Utilities/Helpers/StyleHelper");
11
- const StyledColumnGradientHelper_1 = require("../../../../../Utilities/Helpers/StyledColumnGradientHelper");
11
+ const GradientStyleHelper_1 = require("../../../../../Utilities/Helpers/StyledColumns/GradientStyleHelper");
12
12
  function clamp01(n) {
13
13
  if (Number.isNaN(n)) {
14
14
  return 0;
@@ -39,14 +39,14 @@ function zeroCentredSplitPreview(negativeColor, positiveColor, postfix, minA, ma
39
39
  * `Col-Min..0` + `0..Col-Max` pairs render as a single split strip.
40
40
  */
41
41
  const GradientRangesSummaryPreview = (props) => {
42
- const minA = props.gradientStyle?.MinAlpha ?? StyledColumnGradientHelper_1.DEFAULT_GRADIENT_MIN_ALPHA;
43
- const maxA = props.gradientStyle?.MaxAlpha ?? StyledColumnGradientHelper_1.DEFAULT_GRADIENT_MAX_ALPHA;
42
+ const minA = props.gradientStyle?.MinAlpha ?? GradientStyleHelper_1.DEFAULT_GRADIENT_MIN_ALPHA;
43
+ const maxA = props.gradientStyle?.MaxAlpha ?? GradientStyleHelper_1.DEFAULT_GRADIENT_MAX_ALPHA;
44
44
  const postfix = (props.rangeValueType ?? 'Number') === 'Percentage' ? '%' : '';
45
45
  if (props.zeroCentred) {
46
46
  return zeroCentredSplitPreview(props.zeroCentred.NegativeColor, props.zeroCentred.PositiveColor, postfix, minA, maxA);
47
47
  }
48
48
  const ranges = props.ranges ?? [];
49
- if ((0, StyledColumnGradientHelper_1.isDivergingZeroCellRanges)(ranges)) {
49
+ if ((0, GradientStyleHelper_1.isDivergingZeroCellRanges)(ranges)) {
50
50
  const [r0, r1] = ranges;
51
51
  return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-2", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:flex-wrap twa:gap-2", children: [(0, jsx_runtime_1.jsxs)(Tag_1.Tag, { children: [r0.Min, postfix, " \u2192 ", r0.Max, postfix] }), (0, jsx_runtime_1.jsxs)(Tag_1.Tag, { children: [r1.Min, postfix, " \u2192 ", r1.Max, postfix] })] }), (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: `${stripClassName} twa:w-[200px]`, children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex-1", style: {
52
52
  background: gradientRangeStripCss(r0.Color, !!r0.ReverseGradient, minA, maxA),
@@ -60,11 +60,9 @@ const GradientRangesSummaryPreview = (props) => {
60
60
  };
61
61
  exports.GradientRangesSummaryPreview = GradientRangesSummaryPreview;
62
62
  const GradientColumnComparisonSummaryPreview = (props) => {
63
- const minA = props.gradientStyle?.MinAlpha ?? StyledColumnGradientHelper_1.DEFAULT_GRADIENT_MIN_ALPHA;
64
- const maxA = props.gradientStyle?.MaxAlpha ?? StyledColumnGradientHelper_1.DEFAULT_GRADIENT_MAX_ALPHA;
65
- const fmt = (v) => isNaN(Number(v))
66
- ? `[${props.api.columnApi.getFriendlyNameForColumnId(String(v))}]`
67
- : v;
63
+ const minA = props.gradientStyle?.MinAlpha ?? GradientStyleHelper_1.DEFAULT_GRADIENT_MIN_ALPHA;
64
+ const maxA = props.gradientStyle?.MaxAlpha ?? GradientStyleHelper_1.DEFAULT_GRADIENT_MAX_ALPHA;
65
+ const fmt = (v) => isNaN(Number(v)) ? `[${props.api.columnApi.getFriendlyNameForColumnId(String(v))}]` : v;
68
66
  return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-2", children: [(0, jsx_runtime_1.jsxs)(Tag_1.Tag, { children: ["Min: ", fmt(props.columnComparison.MinValue), " \u2014 Max: ", fmt(props.columnComparison.MaxValue)] }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: `${stripClassName} twa:w-[200px]`, style: {
69
67
  background: gradientRangeStripCss(props.columnComparison.Color, false, minA, maxA),
70
68
  } })] }));
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.hasBulletChartRangesConfigured = exports.StyledColumnBulletPreviewCard = exports.StyledColumnBulletPreview = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const StyleHelper_1 = require("../../../../../Utilities/Helpers/StyleHelper");
6
- const barChartCellText_1 = require("../../../../../Utilities/Helpers/barChartCellText");
6
+ const BarStylesHelper_1 = require("../../../../../Utilities/Helpers/StyledColumns/BarStylesHelper");
7
7
  const Flex_1 = require("../../../../../components/Flex");
8
8
  const Card_1 = require("../../../../../components/Card");
9
9
  const Tag_1 = require("../../../../../components/Tag");
10
10
  const StyledColumnChartListPreviews_1 = require("./StyledColumnChartListPreviews");
11
- const BarChartCellTextPreview_1 = require("./BarChartCellTextPreview");
11
+ const BarStyleCellTextPreview_1 = require("./BarStyleCellTextPreview");
12
12
  const PREVIEW_CELL_CLASS = 'ab-BulletPreviewCell twa:inline-flex twa:items-center twa:min-w-[180px] twa:min-h-[36px] twa:px-2 twa:py-1 twa:rounded-standard twa:border twa:border-[color-mix(in_srgb,var(--ab-color-foreground)_15%,transparent)]';
13
13
  const getBulletPreviewSample = (bullet) => {
14
14
  const ranges = bullet.CellRanges ?? [];
@@ -31,10 +31,10 @@ const getBulletPreviewSample = (bullet) => {
31
31
  const BulletChartPreviewContent = ({ bullet, }) => {
32
32
  const { sampleValue, valueFraction } = getBulletPreviewSample(bullet);
33
33
  const cellTextProperties = bullet.CellTextProperties;
34
- const labels = (0, barChartCellText_1.buildBarChartCellTextLabels)(cellTextProperties, Number.isInteger(sampleValue) ? String(sampleValue) : sampleValue.toFixed(1), `${(valueFraction * 100).toFixed(0)}%`);
35
- const hasCellText = (0, barChartCellText_1.hasBarChartCellTextConfigured)(cellTextProperties) &&
34
+ const labels = (0, BarStylesHelper_1.buildBarStyleCellTextLabels)(cellTextProperties, Number.isInteger(sampleValue) ? String(sampleValue) : sampleValue.toFixed(1), `${(valueFraction * 100).toFixed(0)}%`);
35
+ const hasCellText = (0, BarStylesHelper_1.hasBarStyleCellTextConfigured)(cellTextProperties) &&
36
36
  Boolean(labels.cellValue || labels.percentage);
37
- const presence = (0, barChartCellText_1.getBarChartCellTextSlotPresence)(cellTextProperties);
37
+ const presence = (0, BarStylesHelper_1.getBarStyleCellTextSlotPresence)(cellTextProperties);
38
38
  const fontStyle = bullet.Font ? (0, StyleHelper_1.convertAdaptableStyleToCSS)(bullet.Font) : undefined;
39
39
  const isVertical = bullet.Orientation === 'Vertical';
40
40
  const cellTextClassName = 'ab-BulletChart__text twa:text-2 twa:leading-tight twa:truncate twa:max-w-full';
@@ -42,9 +42,9 @@ const BulletChartPreviewContent = ({ bullet, }) => {
42
42
  // Merged-only with no outside bands → relative container so the overlay sits
43
43
  // on top of the chart, matching the runtime renderer's behaviour.
44
44
  if (hasCellText && presence.hasMerged && !presence.hasAbove && !presence.hasBelow) {
45
- return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "ab-BulletChart__wrapper twa:relative twa:inline-flex", children: [chartEl, (0, jsx_runtime_1.jsx)(BarChartCellTextPreview_1.BarChartCellTextPreview, { mergedOverlayClassName: "ab-BulletChart__text twa:absolute twa:inset-x-0 twa:top-1/2 twa:-translate-y-1/2 twa:px-1 twa:text-2 twa:truncate twa:pointer-events-none", style: fontStyle, cellTextProperties: cellTextProperties, labels: labels, vertical: "Merged" })] }));
45
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "ab-BulletChart__wrapper twa:relative twa:inline-flex", children: [chartEl, (0, jsx_runtime_1.jsx)(BarStyleCellTextPreview_1.BarStyleCellTextPreview, { mergedOverlayClassName: "ab-BulletChart__text twa:absolute twa:inset-x-0 twa:top-1/2 twa:-translate-y-1/2 twa:px-1 twa:text-2 twa:truncate twa:pointer-events-none", style: fontStyle, cellTextProperties: cellTextProperties, labels: labels, vertical: "Merged" })] }));
46
46
  }
47
- return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: "ab-BulletChart__wrapper twa:relative", flexDirection: "column", alignItems: isVertical ? 'center' : 'stretch', style: { justifyContent: 'center', gap: hasCellText ? 2 : 0 }, children: [hasCellText && presence.hasAbove && ((0, jsx_runtime_1.jsx)(BarChartCellTextPreview_1.BarChartCellTextPreview, { className: cellTextClassName, style: fontStyle, cellTextProperties: cellTextProperties, labels: labels, vertical: "Above" })), (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:relative twa:w-full", style: { display: 'inline-flex' }, children: [chartEl, hasCellText && presence.hasMerged && ((0, jsx_runtime_1.jsx)(BarChartCellTextPreview_1.BarChartCellTextPreview, { mergedOverlayClassName: "ab-BulletChart__text twa:absolute twa:inset-x-0 twa:top-1/2 twa:-translate-y-1/2 twa:px-1 twa:text-2 twa:truncate twa:pointer-events-none", style: fontStyle, cellTextProperties: cellTextProperties, labels: labels, vertical: "Merged" }))] }), hasCellText && presence.hasBelow && ((0, jsx_runtime_1.jsx)(BarChartCellTextPreview_1.BarChartCellTextPreview, { className: cellTextClassName, style: fontStyle, cellTextProperties: cellTextProperties, labels: labels, vertical: "Below" }))] }));
47
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: "ab-BulletChart__wrapper twa:relative", flexDirection: "column", alignItems: isVertical ? 'center' : 'stretch', style: { justifyContent: 'center', gap: hasCellText ? 2 : 0 }, children: [hasCellText && presence.hasAbove && ((0, jsx_runtime_1.jsx)(BarStyleCellTextPreview_1.BarStyleCellTextPreview, { className: cellTextClassName, style: fontStyle, cellTextProperties: cellTextProperties, labels: labels, vertical: "Above" })), (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:relative twa:w-full", style: { display: 'inline-flex' }, children: [chartEl, hasCellText && presence.hasMerged && ((0, jsx_runtime_1.jsx)(BarStyleCellTextPreview_1.BarStyleCellTextPreview, { mergedOverlayClassName: "ab-BulletChart__text twa:absolute twa:inset-x-0 twa:top-1/2 twa:-translate-y-1/2 twa:px-1 twa:text-2 twa:truncate twa:pointer-events-none", style: fontStyle, cellTextProperties: cellTextProperties, labels: labels, vertical: "Merged" }))] }), hasCellText && presence.hasBelow && ((0, jsx_runtime_1.jsx)(BarStyleCellTextPreview_1.BarStyleCellTextPreview, { className: cellTextClassName, style: fontStyle, cellTextProperties: cellTextProperties, labels: labels, vertical: "Below" }))] }));
48
48
  };
49
49
  const StyledColumnBulletPreview = ({ data }) => {
50
50
  const bullet = data.BulletChartStyle;
@@ -6,7 +6,7 @@ const Flex_1 = require("../../../../../components/Flex");
6
6
  const Card_1 = require("../../../../../components/Card");
7
7
  const Tag_1 = require("../../../../../components/Tag");
8
8
  const AdaptableContext_1 = require("../../../../AdaptableContext");
9
- const StyledColumnGradientHelper_1 = require("../../../../../Utilities/Helpers/StyledColumnGradientHelper");
9
+ const GradientStyleHelper_1 = require("../../../../../Utilities/Helpers/StyledColumns/GradientStyleHelper");
10
10
  const formatPreviewValue = (value) => {
11
11
  if (Number.isInteger(value)) {
12
12
  return value.toLocaleString();
@@ -20,15 +20,15 @@ const StyledColumnGradientPreview = ({ data, api: apiProp }) => {
20
20
  if (!gs) {
21
21
  return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Gradient Style" });
22
22
  }
23
- if (!(0, StyledColumnGradientHelper_1.hasGradientRangesConfigured)(gs)) {
23
+ if (!(0, GradientStyleHelper_1.hasGradientRangesConfigured)(gs)) {
24
24
  return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "Define ranges before previewing" });
25
25
  }
26
- const sampleValues = (0, StyledColumnGradientHelper_1.getGradientPreviewSampleValues)(data, api);
26
+ const sampleValues = (0, GradientStyleHelper_1.getGradientPreviewSampleValues)(data, api);
27
27
  if (!sampleValues.length) {
28
28
  return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No preview available" });
29
29
  }
30
30
  const rowNode = api.gridApi?.getRowNodeForIndex(0) ?? null;
31
- return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "stretch", className: "twa:flex-wrap twa:gap-2", children: sampleValues.map((value) => ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "ab-GradientPreviewCell twa:px-2 twa:py-1 twa:min-w-[56px] twa:text-2 twa:text-center twa:rounded-standard twa:border twa:border-[color-mix(in_srgb,var(--ab-color-foreground)_15%,transparent)]", style: (0, StyledColumnGradientHelper_1.getGradientPreviewCellStyle)(value, data, api, rowNode), children: formatPreviewValue(value) }, value))) }));
31
+ return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "stretch", className: "twa:flex-wrap twa:gap-2", children: sampleValues.map((value) => ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "ab-GradientPreviewCell twa:px-2 twa:py-1 twa:min-w-[56px] twa:text-2 twa:text-center twa:rounded-standard twa:border twa:border-[color-mix(in_srgb,var(--ab-color-foreground)_15%,transparent)]", style: (0, GradientStyleHelper_1.getGradientPreviewCellStyle)(value, data, api, rowNode), children: formatPreviewValue(value) }, value))) }));
32
32
  };
33
33
  exports.StyledColumnGradientPreview = StyledColumnGradientPreview;
34
34
  const StyledColumnGradientPreviewCard = ({ data }) => ((0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsx)(Card_1.Card.Title, { children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Preview" }) }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsx)(exports.StyledColumnGradientPreview, { data: data }) })] }));
@@ -3,41 +3,43 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StyledColumnPercentBarPreviewCard = exports.StyledColumnPercentBarPreview = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const StyleHelper_1 = require("../../../../../Utilities/Helpers/StyleHelper");
6
- const percentBarPreviewHelper_1 = require("../../../../../Utilities/Helpers/percentBarPreviewHelper");
7
- const barChartCellText_1 = require("../../../../../Utilities/Helpers/barChartCellText");
6
+ const PercentBarStyleHelper_1 = require("../../../../../Utilities/Helpers/StyledColumns/PercentBarStyleHelper");
7
+ const BarStylesHelper_1 = require("../../../../../Utilities/Helpers/StyledColumns/BarStylesHelper");
8
8
  const Flex_1 = require("../../../../../components/Flex");
9
9
  const Card_1 = require("../../../../../components/Card");
10
10
  const Tag_1 = require("../../../../../components/Tag");
11
- const BarChartCellTextPreview_1 = require("./BarChartCellTextPreview");
11
+ const BarStyleCellTextPreview_1 = require("./BarStyleCellTextPreview");
12
12
  const PREVIEW_CELL_CLASS = 'ab-PercentBarPreviewCell twa:w-[72px] twa:min-h-[32px] twa:px-1 twa:py-1 twa:rounded-standard twa:border twa:border-[color-mix(in_srgb,var(--ab-color-foreground)_15%,transparent)]';
13
13
  const PercentBarPreviewCell = ({ styledColumn, value, min, max }) => {
14
14
  const pb = styledColumn.PercentBarStyle;
15
- const { barLeftPercent, barWidthPercent, percentageValue, barColor } = (0, percentBarPreviewHelper_1.getPercentBarPreviewGeometry)(value, pb, min, max);
16
- const trackColor = (0, percentBarPreviewHelper_1.getPercentBarPreviewTrackColor)(pb);
17
- const fillColor = (0, percentBarPreviewHelper_1.getPercentBarPreviewResolvedBarColor)(barColor);
15
+ const { barLeftPercent, barWidthPercent, percentageValue, barColor } = (0, PercentBarStyleHelper_1.getPercentBarPreviewGeometry)(value, pb, min, max);
16
+ const trackColor = (0, PercentBarStyleHelper_1.getPercentBarPreviewTrackColor)(pb);
17
+ const fillColor = (0, PercentBarStyleHelper_1.getPercentBarPreviewResolvedBarColor)(barColor);
18
18
  const cellTextProperties = pb.CellTextProperties;
19
- const labels = (0, barChartCellText_1.buildBarChartCellTextLabels)(cellTextProperties, Number.isInteger(value) ? String(value) : value.toFixed(1), `${percentageValue.toFixed(0)}%`);
20
- const hasCellText = (0, barChartCellText_1.hasBarChartCellTextConfigured)(cellTextProperties) &&
19
+ const labels = (0, BarStylesHelper_1.buildBarStyleCellTextLabels)(cellTextProperties, Number.isInteger(value) ? String(value) : value.toFixed(1), `${percentageValue.toFixed(0)}%`);
20
+ const hasCellText = (0, BarStylesHelper_1.hasBarStyleCellTextConfigured)(cellTextProperties) &&
21
21
  Boolean(labels.cellValue || labels.percentage);
22
- const presence = (0, barChartCellText_1.getBarChartCellTextSlotPresence)(cellTextProperties);
22
+ const presence = (0, BarStylesHelper_1.getBarStyleCellTextSlotPresence)(cellTextProperties);
23
23
  const fontStyle = pb.Font ? (0, StyleHelper_1.convertAdaptableStyleToCSS)(pb.Font) : undefined;
24
24
  const cellTextClassName = 'ab-PercentBar__text twa:text-2 twa:leading-tight twa:truncate';
25
- const barEl = ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "ab-PercentBar__bar twa:relative twa:flex-1 twa:min-h-[6px]", style: trackColor ? { background: (0, percentBarPreviewHelper_1.getPercentBarPreviewResolvedBarColor)(trackColor) } : undefined, children: [fillColor && ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "ab-PercentBar__barInside twa:absolute twa:top-0 twa:h-full", style: {
25
+ const barEl = ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "ab-PercentBar__bar twa:relative twa:flex-1 twa:min-h-[6px]", style: trackColor ? { background: (0, PercentBarStyleHelper_1.getPercentBarPreviewResolvedBarColor)(trackColor) } : undefined, children: [fillColor && ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "ab-PercentBar__barInside twa:absolute twa:top-0 twa:h-full", style: {
26
26
  background: fillColor,
27
27
  left: `${barLeftPercent.toFixed(2)}%`,
28
28
  width: `${barWidthPercent.toFixed(2)}%`,
29
- } })), hasCellText && presence.hasMerged && ((0, jsx_runtime_1.jsx)(BarChartCellTextPreview_1.BarChartCellTextPreview, { mergedOverlayClassName: "ab-PercentBar__text twa:absolute twa:inset-x-0 twa:top-1/2 twa:-translate-y-1/2 twa:px-1 twa:text-2 twa:truncate", style: fontStyle, cellTextProperties: cellTextProperties, labels: labels, vertical: "Merged" }))] }));
29
+ } })), hasCellText && presence.hasMerged && ((0, jsx_runtime_1.jsx)(BarStyleCellTextPreview_1.BarStyleCellTextPreview, { mergedOverlayClassName: "ab-PercentBar__text twa:absolute twa:inset-x-0 twa:top-1/2 twa:-translate-y-1/2 twa:px-1 twa:text-2 twa:truncate", style: fontStyle, cellTextProperties: cellTextProperties, labels: labels, vertical: "Merged" }))] }));
30
30
  return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: `ab-PercentBar__wrapper ${PREVIEW_CELL_CLASS}`, flexDirection: "column", style: {
31
31
  justifyContent: 'center',
32
- height: (0, BarChartCellTextPreview_1.shouldShowBarChartCellTextOutsideBar)(cellTextProperties, hasCellText) ? '100%' : undefined,
33
- }, children: [hasCellText && presence.hasAbove && ((0, jsx_runtime_1.jsx)(BarChartCellTextPreview_1.BarChartCellTextPreview, { className: cellTextClassName, style: fontStyle, cellTextProperties: cellTextProperties, labels: labels, vertical: "Above" })), barEl, hasCellText && presence.hasBelow && ((0, jsx_runtime_1.jsx)(BarChartCellTextPreview_1.BarChartCellTextPreview, { className: cellTextClassName, style: fontStyle, cellTextProperties: cellTextProperties, labels: labels, vertical: "Below" }))] }));
32
+ height: (0, BarStyleCellTextPreview_1.shouldShowBarStyleCellTextOutsideBar)(cellTextProperties, hasCellText)
33
+ ? '100%'
34
+ : undefined,
35
+ }, children: [hasCellText && presence.hasAbove && ((0, jsx_runtime_1.jsx)(BarStyleCellTextPreview_1.BarStyleCellTextPreview, { className: cellTextClassName, style: fontStyle, cellTextProperties: cellTextProperties, labels: labels, vertical: "Above" })), barEl, hasCellText && presence.hasBelow && ((0, jsx_runtime_1.jsx)(BarStyleCellTextPreview_1.BarStyleCellTextPreview, { className: cellTextClassName, style: fontStyle, cellTextProperties: cellTextProperties, labels: labels, vertical: "Below" }))] }));
34
36
  };
35
37
  const StyledColumnPercentBarPreview = ({ data }) => {
36
38
  const pb = data.PercentBarStyle;
37
39
  if (!pb) {
38
40
  return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Percent Bar Style" });
39
41
  }
40
- if (!(0, percentBarPreviewHelper_1.hasPercentBarRangesConfigured)(pb)) {
42
+ if (!(0, PercentBarStyleHelper_1.hasPercentBarRangesConfigured)(pb)) {
41
43
  return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "Define ranges before previewing" });
42
44
  }
43
45
  let min;
@@ -50,13 +52,13 @@ const StyledColumnPercentBarPreview = ({ data }) => {
50
52
  max = cmpMax;
51
53
  }
52
54
  else {
53
- ({ min, max } = (0, percentBarPreviewHelper_1.getPercentBarPreviewScale)(pb));
55
+ ({ min, max } = (0, PercentBarStyleHelper_1.getPercentBarPreviewScale)(pb));
54
56
  }
55
57
  }
56
58
  else {
57
- ({ min, max } = (0, percentBarPreviewHelper_1.getPercentBarPreviewScale)(pb));
59
+ ({ min, max } = (0, PercentBarStyleHelper_1.getPercentBarPreviewScale)(pb));
58
60
  }
59
- const sampleValues = (0, percentBarPreviewHelper_1.getPercentBarPreviewSampleValues)(pb);
61
+ const sampleValues = (0, PercentBarStyleHelper_1.getPercentBarPreviewSampleValues)(pb);
60
62
  return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "stretch", className: "twa:flex-wrap twa:gap-2", children: sampleValues.map((value) => ((0, jsx_runtime_1.jsx)(PercentBarPreviewCell, { styledColumn: data, value: value, min: min, max: max }, value))) }));
61
63
  };
62
64
  exports.StyledColumnPercentBarPreview = StyledColumnPercentBarPreview;
@@ -2,12 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StyledColumnRangeBarPreviewCard = exports.StyledColumnRangeBarPreview = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const barChartCellText_1 = require("../../../../../Utilities/Helpers/barChartCellText");
5
+ const BarStylesHelper_1 = require("../../../../../Utilities/Helpers/StyledColumns/BarStylesHelper");
6
6
  const Flex_1 = require("../../../../../components/Flex");
7
7
  const Card_1 = require("../../../../../components/Card");
8
8
  const Tag_1 = require("../../../../../components/Tag");
9
9
  const StyledColumnChartListPreviews_1 = require("./StyledColumnChartListPreviews");
10
- const BarChartCellTextPreview_1 = require("./BarChartCellTextPreview");
10
+ const BarStyleCellTextPreview_1 = require("./BarStyleCellTextPreview");
11
11
  const PREVIEW_CELL_CLASS = 'ab-RangeBarPreviewCell twa:inline-flex twa:items-center twa:min-w-[180px] twa:min-h-[36px] twa:px-2 twa:py-1 twa:rounded-standard twa:border twa:border-[color-mix(in_srgb,var(--ab-color-foreground)_15%,transparent)]';
12
12
  const getRangeBarPreviewSample = (range) => {
13
13
  let min = 0;
@@ -28,17 +28,17 @@ const getRangeBarPreviewSample = (range) => {
28
28
  const RangeBarPreviewContent = ({ range }) => {
29
29
  const { sampleValue, valueFraction } = getRangeBarPreviewSample(range);
30
30
  const cellTextProperties = range.CellTextProperties;
31
- const labels = (0, barChartCellText_1.buildBarChartCellTextLabels)(cellTextProperties, Number.isInteger(sampleValue) ? String(sampleValue) : sampleValue.toFixed(1), `${(valueFraction * 100).toFixed(0)}%`);
32
- const hasCellText = (0, barChartCellText_1.hasBarChartCellTextConfigured)(cellTextProperties) &&
31
+ const labels = (0, BarStylesHelper_1.buildBarStyleCellTextLabels)(cellTextProperties, Number.isInteger(sampleValue) ? String(sampleValue) : sampleValue.toFixed(1), `${(valueFraction * 100).toFixed(0)}%`);
32
+ const hasCellText = (0, BarStylesHelper_1.hasBarStyleCellTextConfigured)(cellTextProperties) &&
33
33
  Boolean(labels.cellValue || labels.percentage);
34
- const presence = (0, barChartCellText_1.getBarChartCellTextSlotPresence)(cellTextProperties);
34
+ const presence = (0, BarStylesHelper_1.getBarStyleCellTextSlotPresence)(cellTextProperties);
35
35
  const isVertical = range.Orientation === 'Vertical';
36
36
  const cellTextClassName = 'ab-RangeBar__text twa:text-2 twa:leading-tight twa:truncate twa:max-w-full';
37
37
  const chartEl = (0, jsx_runtime_1.jsx)(StyledColumnChartListPreviews_1.StyledColumnRangeBarListPreview, { range: range });
38
38
  if (hasCellText && presence.hasMerged && !presence.hasAbove && !presence.hasBelow) {
39
- return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "ab-RangeBar__wrapper twa:relative twa:inline-flex", children: [chartEl, (0, jsx_runtime_1.jsx)(BarChartCellTextPreview_1.BarChartCellTextPreview, { mergedOverlayClassName: "ab-RangeBar__text twa:absolute twa:inset-x-0 twa:top-1/2 twa:-translate-y-1/2 twa:px-1 twa:text-2 twa:truncate twa:pointer-events-none", cellTextProperties: cellTextProperties, labels: labels, vertical: "Merged" })] }));
39
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "ab-RangeBar__wrapper twa:relative twa:inline-flex", children: [chartEl, (0, jsx_runtime_1.jsx)(BarStyleCellTextPreview_1.BarStyleCellTextPreview, { mergedOverlayClassName: "ab-RangeBar__text twa:absolute twa:inset-x-0 twa:top-1/2 twa:-translate-y-1/2 twa:px-1 twa:text-2 twa:truncate twa:pointer-events-none", cellTextProperties: cellTextProperties, labels: labels, vertical: "Merged" })] }));
40
40
  }
41
- return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: "ab-RangeBar__wrapper twa:relative", flexDirection: "column", alignItems: isVertical ? 'center' : 'stretch', style: { justifyContent: 'center', gap: hasCellText ? 2 : 0 }, children: [hasCellText && presence.hasAbove && ((0, jsx_runtime_1.jsx)(BarChartCellTextPreview_1.BarChartCellTextPreview, { className: cellTextClassName, cellTextProperties: cellTextProperties, labels: labels, vertical: "Above" })), (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:relative twa:w-full", style: { display: 'inline-flex' }, children: [chartEl, hasCellText && presence.hasMerged && ((0, jsx_runtime_1.jsx)(BarChartCellTextPreview_1.BarChartCellTextPreview, { mergedOverlayClassName: "ab-RangeBar__text twa:absolute twa:inset-x-0 twa:top-1/2 twa:-translate-y-1/2 twa:px-1 twa:text-2 twa:truncate twa:pointer-events-none", cellTextProperties: cellTextProperties, labels: labels, vertical: "Merged" }))] }), hasCellText && presence.hasBelow && ((0, jsx_runtime_1.jsx)(BarChartCellTextPreview_1.BarChartCellTextPreview, { className: cellTextClassName, cellTextProperties: cellTextProperties, labels: labels, vertical: "Below" }))] }));
41
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: "ab-RangeBar__wrapper twa:relative", flexDirection: "column", alignItems: isVertical ? 'center' : 'stretch', style: { justifyContent: 'center', gap: hasCellText ? 2 : 0 }, children: [hasCellText && presence.hasAbove && ((0, jsx_runtime_1.jsx)(BarStyleCellTextPreview_1.BarStyleCellTextPreview, { className: cellTextClassName, cellTextProperties: cellTextProperties, labels: labels, vertical: "Above" })), (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:relative twa:w-full", style: { display: 'inline-flex' }, children: [chartEl, hasCellText && presence.hasMerged && ((0, jsx_runtime_1.jsx)(BarStyleCellTextPreview_1.BarStyleCellTextPreview, { mergedOverlayClassName: "ab-RangeBar__text twa:absolute twa:inset-x-0 twa:top-1/2 twa:-translate-y-1/2 twa:px-1 twa:text-2 twa:truncate twa:pointer-events-none", cellTextProperties: cellTextProperties, labels: labels, vertical: "Merged" }))] }), hasCellText && presence.hasBelow && ((0, jsx_runtime_1.jsx)(BarStyleCellTextPreview_1.BarStyleCellTextPreview, { className: cellTextClassName, cellTextProperties: cellTextProperties, labels: labels, vertical: "Below" }))] }));
42
42
  };
43
43
  const StyledColumnRangeBarPreview = ({ data }) => {
44
44
  const range = data.RangeBarStyle;
@@ -7,7 +7,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
7
7
  const React = tslib_1.__importStar(require("react"));
8
8
  const ag_charts_enterprise_1 = require("ag-charts-enterprise");
9
9
  const AdaptableHelper_1 = require("../../../../../Utilities/Helpers/AdaptableHelper");
10
- const SparklineOptionsHelper_1 = require("../../../../../Utilities/Helpers/SparklineOptionsHelper");
10
+ const SparklineStyleHelper_1 = require("../../../../../Utilities/Helpers/StyledColumns/SparklineStyleHelper");
11
11
  const StyleHelper_1 = require("../../../../../Utilities/Helpers/StyleHelper");
12
12
  const Flex_1 = require("../../../../../components/Flex");
13
13
  const Card_1 = require("../../../../../components/Card");
@@ -44,7 +44,7 @@ const buildSparklinePreviewOptions = (sparklineStyle, container, data, width, he
44
44
  const sanitized = AdaptableHelper_1.AdaptableHelper.removeAdaptableObjectPrimitives({
45
45
  ...persisted,
46
46
  });
47
- const options = (0, SparklineOptionsHelper_1.resolveSparklineOptionsForRender)({
47
+ const options = (0, SparklineStyleHelper_1.resolveSparklineOptionsForRender)({
48
48
  ...sanitized,
49
49
  type: sanitized.type ?? 'line',
50
50
  container,