@adaptabletools/adaptable-cjs 23.0.0-canary.4 → 23.0.0-canary.6

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 (250) hide show
  1. package/index.css +117 -62
  2. package/package.json +9 -4
  3. package/src/AdaptableOptions/EditOptions.d.ts +2 -2
  4. package/src/AdaptableState/Common/AggregationColumns.d.ts +14 -6
  5. package/src/AdaptableState/Common/AggregationColumns.js +30 -3
  6. package/src/AdaptableState/Common/ColumnScope.d.ts +4 -0
  7. package/src/AdaptableState/Common/Enums.d.ts +5 -5
  8. package/src/AdaptableState/Common/Enums.js +4 -4
  9. package/src/AdaptableState/PlusMinusState.d.ts +3 -3
  10. package/src/AdaptableState/ShortcutState.d.ts +2 -6
  11. package/src/AdaptableState/StyledColumnState.d.ts +3 -5
  12. package/src/AdaptableState/ThemeState.d.ts +33 -28
  13. package/src/Api/EventApi.d.ts +14 -1
  14. package/src/Api/Events/ThemeChanged.d.ts +6 -0
  15. package/src/Api/Events/ThemeSelected.d.ts +11 -0
  16. package/src/Api/Events/ThemeSelected.js +2 -0
  17. package/src/Api/Implementation/EventApiImpl.js +4 -0
  18. package/src/Api/Implementation/LayoutApiImpl.d.ts +0 -2
  19. package/src/Api/Implementation/LayoutApiImpl.js +0 -14
  20. package/src/Api/Implementation/LayoutHelpers.d.ts +2 -0
  21. package/src/Api/Implementation/LayoutHelpers.js +19 -8
  22. package/src/Api/Implementation/ThemeApiImpl.d.ts +3 -2
  23. package/src/Api/Implementation/ThemeApiImpl.js +19 -15
  24. package/src/Api/Internal/EventInternalApi.d.ts +2 -0
  25. package/src/Api/Internal/EventInternalApi.js +8 -1
  26. package/src/Api/Internal/StyledColumnInternalApi.d.ts +4 -4
  27. package/src/Api/Internal/StyledColumnInternalApi.js +4 -4
  28. package/src/Api/Internal/ThemeInternalApi.d.ts +0 -1
  29. package/src/Api/Internal/ThemeInternalApi.js +0 -10
  30. package/src/Api/LayoutApi.d.ts +1 -8
  31. package/src/Api/ThemeApi.d.ts +6 -2
  32. package/src/Redux/ActionsReducers/ThemeRedux.d.ts +3 -3
  33. package/src/Strategy/FormatColumnModule.js +12 -5
  34. package/src/Strategy/LayoutModule.js +13 -8
  35. package/src/Strategy/StyledColumnModule.js +58 -30
  36. package/src/Utilities/Constants/ReduxConstants.d.ts +2 -2
  37. package/src/Utilities/Constants/ReduxConstants.js +1 -14
  38. package/src/Utilities/Helpers/FormatHelper.js +20 -1
  39. package/src/Utilities/Helpers/SparklineOptionsHelper.d.ts +7 -0
  40. package/src/Utilities/Helpers/SparklineOptionsHelper.js +68 -0
  41. package/src/Utilities/Helpers/StyledColumnGradientHelper.d.ts +23 -1
  42. package/src/Utilities/Helpers/StyledColumnGradientHelper.js +212 -1
  43. package/src/Utilities/Helpers/ThemeHelpers.d.ts +5 -0
  44. package/src/Utilities/Helpers/ThemeHelpers.js +43 -0
  45. package/src/Utilities/Helpers/percentBarPreviewHelper.d.ts +19 -0
  46. package/src/Utilities/Helpers/percentBarPreviewHelper.js +155 -0
  47. package/src/Utilities/ObjectFactory.d.ts +1 -3
  48. package/src/Utilities/ObjectFactory.js +0 -9
  49. package/src/Utilities/Services/ThemeService.js +1 -1
  50. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +17 -16
  51. package/src/View/Alert/Wizard/AlertButtonsEditor.js +113 -102
  52. package/src/View/Alert/Wizard/AlertMessageWizardSection.js +12 -13
  53. package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +54 -54
  54. package/src/View/Alert/Wizard/AlertRulesWizardSection.js +4 -3
  55. package/src/View/Alert/Wizard/AlertScheduledWizardSection.js +1 -1
  56. package/src/View/Alert/Wizard/AlertScopeWizardSection.js +29 -37
  57. package/src/View/Alert/Wizard/AlertTypeWizardSection.js +2 -3
  58. package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.js +9 -13
  59. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +28 -15
  60. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +7 -9
  61. package/src/View/CalculatedColumn/Wizard/CalculatedColumnTypeSection.js +2 -2
  62. package/src/View/CellSummary/CellSummaryViewPanel.js +1 -1
  63. package/src/View/Charting/ChartingWizard/AgChargingWizard/AgChargingWizard.js +3 -10
  64. package/src/View/Charting/ChartingWizard/AgChargingWizard/PreviewChartSection.js +1 -1
  65. package/src/View/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +32 -41
  66. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/ExternalChartingWizard.js +4 -31
  67. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/PreviewChartSection.d.ts +5 -0
  68. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/PreviewChartSection.js +26 -0
  69. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.d.ts +1 -0
  70. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +9 -6
  71. package/src/View/Comments/CommentsEditor.js +1 -1
  72. package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +0 -1
  73. package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.js +3 -1
  74. package/src/View/Components/ModuleProfile.js +1 -1
  75. package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +0 -1
  76. package/src/View/Components/Popups/WindowPopups/windowFactory.js +1 -2
  77. package/src/View/Components/RangesComponent.d.ts +7 -2
  78. package/src/View/Components/RangesComponent.js +94 -22
  79. package/src/View/Components/StyleComponent.d.ts +1 -0
  80. package/src/View/Components/StyleComponent.js +1 -1
  81. package/src/View/Components/ValueSelector/index.js +70 -57
  82. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +8 -13
  83. package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +8 -8
  84. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -1
  85. package/src/View/DataImport/DataImportWizard/sections/ColumnsSection.js +11 -12
  86. package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadSection.js +5 -4
  87. package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadTextSection.js +2 -1
  88. package/src/View/DataImport/DataImportWizard/sections/ValidationSection.js +4 -15
  89. package/src/View/Export/Wizard/ReportColumnsWizardSection.js +24 -27
  90. package/src/View/Export/Wizard/ReportNameWizardSection.js +8 -11
  91. package/src/View/Export/Wizard/ReportRowsWizardSection.js +19 -22
  92. package/src/View/Export/Wizard/ScheduledReportSettings.d.ts +2 -0
  93. package/src/View/Export/Wizard/ScheduledReportSettings.js +12 -12
  94. package/src/View/Export/Wizard/ScheduledReportWizard.js +2 -3
  95. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +8 -6
  96. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +19 -20
  97. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +20 -11
  98. package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.js +19 -3
  99. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +4 -4
  100. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +7 -0
  101. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +120 -13
  102. package/src/View/FormatColumn/Wizard/FormatColumnPreview.d.ts +15 -0
  103. package/src/View/FormatColumn/Wizard/FormatColumnPreview.js +78 -0
  104. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +4 -0
  105. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +34 -0
  106. package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +11 -6
  107. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +1 -1
  108. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +3 -1
  109. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +64 -13
  110. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +3 -1
  111. package/src/View/FreeTextColumn/Utilities/getFreeTextColumnSettingsTags.d.ts +2 -0
  112. package/src/View/FreeTextColumn/Utilities/getFreeTextColumnSettingsTags.js +19 -0
  113. package/src/View/FreeTextColumn/Wizard/FreeTextColumnDefinitionWizardSection.d.ts +10 -0
  114. package/src/View/FreeTextColumn/Wizard/FreeTextColumnDefinitionWizardSection.js +60 -0
  115. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +2 -3
  116. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +35 -70
  117. package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +14 -10
  118. package/src/View/Layout/TransposedPopup.js +2 -2
  119. package/src/View/Layout/Wizard/LayoutWizard.js +3 -3
  120. package/src/View/Layout/Wizard/sections/AggregationsSection.d.ts +2 -3
  121. package/src/View/Layout/Wizard/sections/AggregationsSection.js +116 -26
  122. package/src/View/Layout/Wizard/sections/ColumnsSection.js +79 -79
  123. package/src/View/Layout/Wizard/sections/FilterSection.js +31 -32
  124. package/src/View/Layout/Wizard/sections/GridFilterSection.js +10 -10
  125. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.d.ts +1 -2
  126. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +101 -51
  127. package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +9 -8
  128. package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.js +4 -4
  129. package/src/View/Layout/Wizard/sections/RowGroupingSection.js +36 -33
  130. package/src/View/Layout/Wizard/sections/RowSelectionSection.js +2 -2
  131. package/src/View/Layout/Wizard/sections/RowSummarySection.js +95 -73
  132. package/src/View/Layout/Wizard/sections/SettingsSection.js +3 -4
  133. package/src/View/Layout/Wizard/sections/SortSection.js +2 -2
  134. package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +1 -1
  135. package/src/View/NamedQuery/Wizard/NamedQuerySettingsWizardSection.js +7 -12
  136. package/src/View/NamedQuery/Wizard/NamedQueryWizard.js +1 -3
  137. package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.d.ts +4 -0
  138. package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.js +45 -12
  139. package/src/View/PlusMinus/Wizard/PlusMinusScopeWizardSection.js +10 -17
  140. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.d.ts +2 -6
  141. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +5 -21
  142. package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +15 -21
  143. package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +2 -2
  144. package/src/View/Shortcut/Wizard/ShortcutScopeWizardSection.js +10 -17
  145. package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +16 -5
  146. package/src/View/Shortcut/Wizard/ShortcutWizard.js +2 -2
  147. package/src/View/Shortcut/shortcutOperations.d.ts +3 -0
  148. package/src/View/Shortcut/shortcutOperations.js +32 -1
  149. package/src/View/SpecialColumnSettingsWizardStep.js +7 -6
  150. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +5 -0
  151. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +26 -16
  152. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.d.ts +10 -2
  153. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +100 -15
  154. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.d.ts +14 -0
  155. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.js +48 -25
  156. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.d.ts +2 -3
  157. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +109 -33
  158. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +20 -12
  159. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.d.ts +5 -0
  160. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +124 -23
  161. package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.d.ts +1 -0
  162. package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +35 -11
  163. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.d.ts +5 -0
  164. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +88 -11
  165. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.d.ts +5 -0
  166. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +125 -35
  167. package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.d.ts +1 -0
  168. package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +55 -74
  169. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.d.ts +5 -0
  170. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.js +20 -0
  171. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.js +6 -12
  172. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarColumnComparisonPreview.js +5 -5
  173. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarRangesPreview.js +2 -1
  174. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.d.ts +5 -4
  175. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.js +11 -13
  176. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.d.ts +5 -0
  177. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.js +20 -0
  178. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.d.ts +3 -0
  179. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +32 -3
  180. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.d.ts +9 -0
  181. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +64 -0
  182. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.d.ts +10 -0
  183. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.js +35 -0
  184. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.d.ts +10 -0
  185. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.js +96 -0
  186. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.d.ts +8 -0
  187. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.js +57 -0
  188. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.d.ts +8 -0
  189. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +58 -0
  190. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.d.ts +18 -0
  191. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.js +66 -0
  192. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.d.ts +10 -0
  193. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.js +133 -0
  194. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardRangesSection.js +12 -5
  195. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.d.ts +1 -5
  196. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +53 -29
  197. package/src/View/SystemStatus/Utilities/getStatusItemStyle.js +1 -1
  198. package/src/View/Theme/ThemePopup.d.ts +2 -14
  199. package/src/View/Theme/ThemePopup.js +1 -36
  200. package/src/View/UIHelper.js +1 -1
  201. package/src/View/Wizard/OnePageAdaptableWizard.js +6 -20
  202. package/src/agGrid/AdaptableAgGrid.d.ts +1 -0
  203. package/src/agGrid/AdaptableAgGrid.js +34 -24
  204. package/src/agGrid/AgGridAdapter.d.ts +1 -1
  205. package/src/agGrid/AgGridAdapter.js +27 -17
  206. package/src/agGrid/AgGridColumnAdapter.js +9 -15
  207. package/src/agGrid/AgGridMenuAdapter.d.ts +0 -1
  208. package/src/agGrid/AgGridMenuAdapter.js +20 -37
  209. package/src/agGrid/buildValueAggregationMenuItem.d.ts +19 -0
  210. package/src/agGrid/buildValueAggregationMenuItem.js +114 -0
  211. package/src/agGrid/cellRenderers/IconRenderer.d.ts +6 -0
  212. package/src/agGrid/cellRenderers/IconRenderer.js +46 -17
  213. package/src/agGrid/createAgGridIcon.d.ts +10 -0
  214. package/src/agGrid/createAgGridIcon.js +19 -0
  215. package/src/components/DragAndDropContext/UnusedPanel.js +1 -1
  216. package/src/components/ExpressionEditor/BaseEditorInput.js +1 -1
  217. package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +1 -1
  218. package/src/components/Input/NumberInput.js +1 -1
  219. package/src/components/Panel/index.js +1 -1
  220. package/src/components/SimpleButton/index.js +4 -4
  221. package/src/components/Toggle/Toggle.js +1 -1
  222. package/src/components/Toggle/ToggleGroup.js +1 -1
  223. package/src/env.js +2 -2
  224. package/src/layout-manager/src/index.js +2 -9
  225. package/src/metamodel/adaptable.metamodel.d.ts +39 -29
  226. package/src/metamodel/adaptable.metamodel.js +1 -1
  227. package/src/types.d.ts +5 -4
  228. package/themes/dark.css +1 -68
  229. package/themes/light.css +1 -5
  230. package/tsconfig.cjs.tsbuildinfo +1 -1
  231. package/src/Aggregation/ParameterizedAggregationRegistry.d.ts +0 -35
  232. package/src/Aggregation/ParameterizedAggregationRegistry.js +0 -74
  233. package/src/Aggregation/definitions/weightedAverageAggregationDefinition.d.ts +0 -3
  234. package/src/Aggregation/definitions/weightedAverageAggregationDefinition.js +0 -58
  235. package/src/Aggregation/parameterizedAggregationColumnMenu.d.ts +0 -8
  236. package/src/Aggregation/parameterizedAggregationColumnMenu.js +0 -143
  237. package/src/Aggregation/parameterizedAggregationHeader.d.ts +0 -13
  238. package/src/Aggregation/parameterizedAggregationHeader.js +0 -65
  239. package/src/Aggregation/parameterizedAggregationHelpers.d.ts +0 -23
  240. package/src/Aggregation/parameterizedAggregationHelpers.js +0 -121
  241. package/src/Aggregation/parameterizedAggregationWizardHelpers.d.ts +0 -9
  242. package/src/Aggregation/parameterizedAggregationWizardHelpers.js +0 -74
  243. package/src/Aggregation/validateParameterizedAggregations.d.ts +0 -4
  244. package/src/Aggregation/validateParameterizedAggregations.js +0 -25
  245. package/src/View/Layout/Wizard/sections/ParameterizedAggFuncPicker.d.ts +0 -12
  246. package/src/View/Layout/Wizard/sections/ParameterizedAggFuncPicker.js +0 -48
  247. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgeSettings.d.ts +0 -5
  248. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgeSettings.js +0 -32
  249. package/src/View/Theme/VariantSelector.d.ts +0 -8
  250. package/src/View/Theme/VariantSelector.js +0 -25
@@ -1,9 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DEFAULT_GRADIENT_MAX_ALPHA = exports.DEFAULT_GRADIENT_MIN_ALPHA = void 0;
3
+ exports.getGradientPreviewCellStyle = exports.getGradientPreviewSampleValues = exports.getZeroCentredGradientPreviewValues = exports.ZERO_CENTRED_GRADIENT_PREVIEW_VALUES = exports.ZERO_CENTRED_PREVIEW_SCALE_MAX = exports.ZERO_CENTRED_PREVIEW_SCALE_MIN = exports.STYLED_COLUMN_PREVIEW_SAMPLE_COUNT = exports.hasGradientRangesConfigured = exports.DEFAULT_GRADIENT_MAX_ALPHA = exports.DEFAULT_GRADIENT_MIN_ALPHA = void 0;
4
+ exports.isDivergingZeroCellRanges = isDivergingZeroCellRanges;
5
+ exports.isZeroCentredGradientStyle = isZeroCentredGradientStyle;
4
6
  exports.expandGradientCellRanges = expandGradientCellRanges;
5
7
  exports.gradientStyleRangeLookupValueType = gradientStyleRangeLookupValueType;
6
8
  exports.isNegativeZeroCentredBand = isNegativeZeroCentredBand;
9
+ const tslib_1 = require("tslib");
10
+ const tinycolor2_1 = tslib_1.__importDefault(require("tinycolor2"));
11
+ const StyleHelper_1 = require("./StyleHelper");
12
+ const StyleHelper_2 = require("./StyleHelper");
13
+ const clamp_1 = tslib_1.__importDefault(require("../utils/clamp"));
7
14
  /**
8
15
  * Default alpha at the **low** end of a Gradient range when `MinAlpha` is unset.
9
16
  * Slightly above zero so the bottom-edge value of every range still shows its
@@ -14,6 +21,210 @@ exports.DEFAULT_GRADIENT_MIN_ALPHA = 0.15;
14
21
  * Default alpha at the **high** end of a Gradient range when `MaxAlpha` is unset.
15
22
  */
16
23
  exports.DEFAULT_GRADIENT_MAX_ALPHA = 1;
24
+ const hasGradientRangesConfigured = (gs) => !!(gs?.ZeroCentred || gs?.CellRanges?.length || gs?.ColumnComparison);
25
+ exports.hasGradientRangesConfigured = hasGradientRangesConfigured;
26
+ const evenlySpacedValues = (min, max, count) => {
27
+ if (count <= 1) {
28
+ return [min];
29
+ }
30
+ const step = (max - min) / (count - 1);
31
+ return Array.from({ length: count }, (_, i) => min + step * i);
32
+ };
33
+ /** Number of sample cells shown in Gradient / Percent Bar style previews. */
34
+ exports.STYLED_COLUMN_PREVIEW_SAMPLE_COUNT = 6;
35
+ /** Illustrative zero-centred scale endpoints for preview geometry. */
36
+ exports.ZERO_CENTRED_PREVIEW_SCALE_MIN = -20;
37
+ exports.ZERO_CENTRED_PREVIEW_SCALE_MAX = 20;
38
+ /** @deprecated Use {@link getZeroCentredGradientPreviewValues} — kept for callers using endpoints. */
39
+ exports.ZERO_CENTRED_GRADIENT_PREVIEW_VALUES = evenlySpacedValues(exports.ZERO_CENTRED_PREVIEW_SCALE_MIN, exports.ZERO_CENTRED_PREVIEW_SCALE_MAX, exports.STYLED_COLUMN_PREVIEW_SAMPLE_COUNT);
40
+ const getZeroCentredGradientPreviewValues = () => evenlySpacedValues(exports.ZERO_CENTRED_PREVIEW_SCALE_MIN, exports.ZERO_CENTRED_PREVIEW_SCALE_MAX, exports.STYLED_COLUMN_PREVIEW_SAMPLE_COUNT);
41
+ exports.getZeroCentredGradientPreviewValues = getZeroCentredGradientPreviewValues;
42
+ function isDivergingZeroCellRanges(ranges) {
43
+ if (!ranges || ranges.length !== 2) {
44
+ return false;
45
+ }
46
+ const [a, b] = ranges;
47
+ return a.Max === 0 && b.Min === 0;
48
+ }
49
+ function isZeroCentredGradientStyle(gs) {
50
+ return !!(gs.ZeroCentred || isDivergingZeroCellRanges(gs.CellRanges));
51
+ }
52
+ /**
53
+ * Sample cell values for gradient preview strips — spread across the effective scale.
54
+ */
55
+ const getGradientPreviewSampleValues = (styledColumn, api) => {
56
+ const gs = styledColumn.GradientStyle;
57
+ if (!gs || !(0, exports.hasGradientRangesConfigured)(gs)) {
58
+ return [];
59
+ }
60
+ if (isZeroCentredGradientStyle(gs)) {
61
+ return (0, exports.getZeroCentredGradientPreviewValues)();
62
+ }
63
+ if (gs.ColumnComparison) {
64
+ const min = Number(gs.ColumnComparison.MinValue);
65
+ const max = Number(gs.ColumnComparison.MaxValue);
66
+ if (!Number.isNaN(min) && !Number.isNaN(max)) {
67
+ return evenlySpacedValues(min, max, exports.STYLED_COLUMN_PREVIEW_SAMPLE_COUNT);
68
+ }
69
+ return evenlySpacedValues(0, 100, exports.STYLED_COLUMN_PREVIEW_SAMPLE_COUNT);
70
+ }
71
+ const column = styledColumn.ColumnId
72
+ ? api.columnApi.getColumnWithColumnId(styledColumn.ColumnId)
73
+ : undefined;
74
+ if (!column) {
75
+ return evenlySpacedValues(0, 100, exports.STYLED_COLUMN_PREVIEW_SAMPLE_COUNT);
76
+ }
77
+ const colMin = api.styledColumnApi.internalApi.getMinValueForNumericColumn(column);
78
+ const colMax = api.styledColumnApi.internalApi.getMaxValueForNumericColumn(column);
79
+ if (colMin === colMax) {
80
+ return [colMin];
81
+ }
82
+ return evenlySpacedValues(colMin, colMax, exports.STYLED_COLUMN_PREVIEW_SAMPLE_COUNT);
83
+ };
84
+ exports.getGradientPreviewSampleValues = getGradientPreviewSampleValues;
85
+ const getZeroCentredPreviewColors = (gradientStyle) => {
86
+ if (gradientStyle.ZeroCentred) {
87
+ return {
88
+ negative: gradientStyle.ZeroCentred.NegativeColor,
89
+ positive: gradientStyle.ZeroCentred.PositiveColor,
90
+ };
91
+ }
92
+ const ranges = gradientStyle.CellRanges;
93
+ if (isDivergingZeroCellRanges(ranges)) {
94
+ return {
95
+ negative: ranges[0].Color,
96
+ positive: ranges[1].Color,
97
+ };
98
+ }
99
+ return null;
100
+ };
101
+ /**
102
+ * Zero-centred preview uses a fixed -20…20 illustrative scale so negative
103
+ * colours always appear — independent of whether the column currently has
104
+ * negative values (Col-Min may be above zero today).
105
+ */
106
+ const getZeroCentredGradientPreviewCellStyle = (cellValue, gradientStyle) => {
107
+ const colors = getZeroCentredPreviewColors(gradientStyle);
108
+ if (!colors) {
109
+ return {};
110
+ }
111
+ const previewMin = exports.ZERO_CENTRED_PREVIEW_SCALE_MIN;
112
+ const previewMax = exports.ZERO_CENTRED_PREVIEW_SCALE_MAX;
113
+ const syntheticRanges = [
114
+ { Min: previewMin, Max: 0, Color: colors.negative },
115
+ { Min: 0, Max: previewMax, Color: colors.positive },
116
+ ];
117
+ let matchingRange = null;
118
+ for (const range of syntheticRanges) {
119
+ const min = range.Min;
120
+ const max = range.Max;
121
+ if (cellValue >= min && cellValue <= max) {
122
+ matchingRange = range;
123
+ break;
124
+ }
125
+ }
126
+ if (!matchingRange) {
127
+ return {};
128
+ }
129
+ const min = matchingRange.Min;
130
+ const max = matchingRange.Max;
131
+ const reverseGradient = matchingRange.Min === previewMin && matchingRange.Max === 0;
132
+ const minAlphaBound = gradientStyle.MinAlpha ?? exports.DEFAULT_GRADIENT_MIN_ALPHA;
133
+ const maxAlphaBound = gradientStyle.MaxAlpha ?? exports.DEFAULT_GRADIENT_MAX_ALPHA;
134
+ const lo = Math.min((0, clamp_1.default)(minAlphaBound, 0, 1), (0, clamp_1.default)(maxAlphaBound, 0, 1));
135
+ const hi = Math.max((0, clamp_1.default)(minAlphaBound, 0, 1), (0, clamp_1.default)(maxAlphaBound, 0, 1));
136
+ const span = Math.abs(max - min);
137
+ let t = span === 0 ? 0.5 : (Number(cellValue) - min) / span;
138
+ t = (0, clamp_1.default)(t, 0, 1);
139
+ if (reverseGradient) {
140
+ t = 1 - t;
141
+ }
142
+ const alpha = Number((lo + t * (hi - lo)).toPrecision(4));
143
+ let style = {};
144
+ const bg = (0, tinycolor2_1.default)((0, StyleHelper_2.getVariableColor)(matchingRange.Color)).setAlpha(alpha);
145
+ style.backgroundColor = bg.toRgbString();
146
+ if (gradientStyle.AutoContrastText) {
147
+ style.color = bg.getLuminance() > 0.45 ? '#111111' : '#ffffff';
148
+ }
149
+ const autoContrastColor = gradientStyle.AutoContrastText && style.color ? style.color : undefined;
150
+ if (gradientStyle.Font) {
151
+ style = { ...style, ...(0, StyleHelper_1.convertAdaptableStyleToCSS)(gradientStyle.Font) };
152
+ }
153
+ if (autoContrastColor) {
154
+ style.color = autoContrastColor;
155
+ }
156
+ if (gradientStyle.Font?.Alignment && gradientStyle.Font.Alignment !== 'Default') {
157
+ style.textAlign = gradientStyle.Font.Alignment.toLowerCase();
158
+ }
159
+ return style;
160
+ };
161
+ /**
162
+ * Cell CSS for gradient preview — mirrors `AgGridColumnAdapter.getStyledColumnStyle` gradient path.
163
+ */
164
+ const getGradientPreviewCellStyle = (cellValue, styledColumn, api, rowNode) => {
165
+ const gradientStyle = styledColumn.GradientStyle;
166
+ if (!gradientStyle || !(0, exports.hasGradientRangesConfigured)(gradientStyle)) {
167
+ return {};
168
+ }
169
+ if (isZeroCentredGradientStyle(gradientStyle)) {
170
+ return getZeroCentredGradientPreviewCellStyle(cellValue, gradientStyle);
171
+ }
172
+ const column = styledColumn.ColumnId
173
+ ? api.columnApi.getColumnWithColumnId(styledColumn.ColumnId)
174
+ : undefined;
175
+ if (!column) {
176
+ return {};
177
+ }
178
+ const node = rowNode ?? api.gridApi?.getRowNodeForIndex(0) ?? null;
179
+ const internalApi = api.styledColumnApi.internalApi;
180
+ let style = {};
181
+ const min = internalApi.getNumericStyleMinValue(styledColumn, column, node, cellValue);
182
+ const max = internalApi.getNumericStyleMaxValue(styledColumn, column, node, cellValue);
183
+ let cellBackColor;
184
+ let reverseGradient = false;
185
+ if (gradientStyle.ColumnComparison) {
186
+ cellBackColor = gradientStyle.ColumnComparison.Color;
187
+ }
188
+ else {
189
+ const matchingRange = internalApi.findRangeForColumn(expandGradientCellRanges(gradientStyle), column, gradientStyleRangeLookupValueType(gradientStyle), cellValue);
190
+ if (matchingRange) {
191
+ cellBackColor = matchingRange.Color;
192
+ reverseGradient =
193
+ (!!gradientStyle.ZeroCentred && isNegativeZeroCentredBand(matchingRange)) ||
194
+ !!matchingRange.ReverseGradient;
195
+ }
196
+ }
197
+ const minAlphaBound = gradientStyle.MinAlpha ?? exports.DEFAULT_GRADIENT_MIN_ALPHA;
198
+ const maxAlphaBound = gradientStyle.MaxAlpha ?? exports.DEFAULT_GRADIENT_MAX_ALPHA;
199
+ const lo = Math.min((0, clamp_1.default)(minAlphaBound, 0, 1), (0, clamp_1.default)(maxAlphaBound, 0, 1));
200
+ const hi = Math.max((0, clamp_1.default)(minAlphaBound, 0, 1), (0, clamp_1.default)(maxAlphaBound, 0, 1));
201
+ const span = Math.abs(max - min);
202
+ let t = span === 0 ? 0.5 : (Number(cellValue) - min) / span;
203
+ t = (0, clamp_1.default)(t, 0, 1);
204
+ if (reverseGradient) {
205
+ t = 1 - t;
206
+ }
207
+ const alpha = Number((lo + t * (hi - lo)).toPrecision(4));
208
+ if (cellBackColor) {
209
+ const bg = (0, tinycolor2_1.default)((0, StyleHelper_2.getVariableColor)(cellBackColor)).setAlpha(alpha);
210
+ style.backgroundColor = bg.toRgbString();
211
+ if (gradientStyle.AutoContrastText) {
212
+ style.color = bg.getLuminance() > 0.45 ? '#111111' : '#ffffff';
213
+ }
214
+ }
215
+ const autoContrastColor = gradientStyle.AutoContrastText && style.color ? style.color : undefined;
216
+ if (gradientStyle.Font) {
217
+ style = { ...style, ...(0, StyleHelper_1.convertAdaptableStyleToCSS)(gradientStyle.Font) };
218
+ }
219
+ if (autoContrastColor) {
220
+ style.color = autoContrastColor;
221
+ }
222
+ if (gradientStyle.Font?.Alignment && gradientStyle.Font.Alignment !== 'Default') {
223
+ style.textAlign = gradientStyle.Font.Alignment.toLowerCase();
224
+ }
225
+ return style;
226
+ };
227
+ exports.getGradientPreviewCellStyle = getGradientPreviewCellStyle;
17
228
  /**
18
229
  * Effective cell ranges for gradient rendering / range lookup.
19
230
  * When `ZeroCentred` is set, expands to the canonical Col-Min…0 and 0…Col-Max bands.
@@ -0,0 +1,5 @@
1
+ import { AdaptableTheme, SystemThemeEntry } from '../../AdaptableState/ThemeState';
2
+ import { AdaptableLogger } from '../../agGrid/AdaptableLogger';
3
+ export declare function isLegacySystemThemeObject(theme: SystemThemeEntry | AdaptableTheme): theme is AdaptableTheme;
4
+ export declare function resolveSystemThemeDescription(name: string): string;
5
+ export declare function systemThemeEntryToAdaptableTheme(theme: SystemThemeEntry | AdaptableTheme, logger?: AdaptableLogger): AdaptableTheme;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isLegacySystemThemeObject = isLegacySystemThemeObject;
4
+ exports.resolveSystemThemeDescription = resolveSystemThemeDescription;
5
+ exports.systemThemeEntryToAdaptableTheme = systemThemeEntryToAdaptableTheme;
6
+ const themes_1 = require("../../themes");
7
+ const logDeprecation_1 = require("../logDeprecation");
8
+ const LEGACY_SYSTEM_THEME_PROPS = ['Description', 'CSSVariables', 'Variant'];
9
+ function isLegacySystemThemeObject(theme) {
10
+ if (typeof theme === 'string') {
11
+ return false;
12
+ }
13
+ return LEGACY_SYSTEM_THEME_PROPS.some((prop) => prop in theme && theme[prop] !== undefined);
14
+ }
15
+ function resolveSystemThemeDescription(name) {
16
+ return themes_1.StaticThemes.find((staticTheme) => staticTheme.Name === name)?.Description ?? name;
17
+ }
18
+ function systemThemeEntryToAdaptableTheme(theme, logger) {
19
+ if (typeof theme === 'string') {
20
+ return {
21
+ Name: theme,
22
+ Description: resolveSystemThemeDescription(theme),
23
+ };
24
+ }
25
+ if (isLegacySystemThemeObject(theme)) {
26
+ if (logger) {
27
+ (0, logDeprecation_1.logDeprecation)(logger, 'ThemeState', 'SystemThemes', undefined, 'Passing a full AdaptableTheme object in SystemThemes is deprecated. Use a theme name string or SystemThemeOptions (Name with AgThemeMode / AgGridClassName only).');
28
+ }
29
+ return {
30
+ Name: theme.Name,
31
+ Description: theme.Description ?? resolveSystemThemeDescription(theme.Name),
32
+ AgThemeMode: theme.AgThemeMode,
33
+ AgGridClassName: theme.AgGridClassName,
34
+ };
35
+ }
36
+ const options = theme;
37
+ return {
38
+ Name: options.Name,
39
+ Description: resolveSystemThemeDescription(options.Name),
40
+ AgThemeMode: options.AgThemeMode,
41
+ AgGridClassName: options.AgGridClassName,
42
+ };
43
+ }
@@ -0,0 +1,19 @@
1
+ import { PercentBarStyle, StyledColumn } from '../../AdaptableState/StyledColumnState';
2
+ export declare const hasPercentBarRangesConfigured: (pb: PercentBarStyle | undefined) => boolean;
3
+ /** Illustrative scale for preview — shows negatives when origin is Auto or Zero. */
4
+ export declare const getPercentBarPreviewScale: (pb: PercentBarStyle) => {
5
+ min: number;
6
+ max: number;
7
+ };
8
+ export declare const getPercentBarPreviewSampleValues: (pb: PercentBarStyle) => number[];
9
+ export type PercentBarPreviewGeometry = {
10
+ barLeftPercent: number;
11
+ barWidthPercent: number;
12
+ percentageValue: number;
13
+ barColor?: string;
14
+ };
15
+ export declare const getPercentBarPreviewGeometry: (numericValue: number, pb: PercentBarStyle, min: number, max: number) => PercentBarPreviewGeometry;
16
+ export declare const formatPercentBarPreviewCellText: (numericValue: number, percentageValue: number, pb: PercentBarStyle) => string;
17
+ export declare const getPercentBarPreviewTrackColor: (pb: PercentBarStyle) => string | undefined;
18
+ export declare const getPercentBarPreviewResolvedBarColor: (color: string | undefined) => string | undefined;
19
+ export declare const hasPercentBarStylePreview: (styledColumn: StyledColumn) => boolean;
@@ -0,0 +1,155 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.hasPercentBarStylePreview = exports.getPercentBarPreviewResolvedBarColor = exports.getPercentBarPreviewTrackColor = exports.formatPercentBarPreviewCellText = exports.getPercentBarPreviewGeometry = exports.getPercentBarPreviewSampleValues = exports.getPercentBarPreviewScale = exports.hasPercentBarRangesConfigured = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const StyleHelper_1 = require("./StyleHelper");
6
+ const clamp_1 = tslib_1.__importDefault(require("../utils/clamp"));
7
+ const StyledColumnGradientHelper_1 = require("./StyledColumnGradientHelper");
8
+ const evenlySpacedValues = (min, max, count) => {
9
+ if (count <= 1) {
10
+ return [min];
11
+ }
12
+ const step = (max - min) / (count - 1);
13
+ return Array.from({ length: count }, (_, i) => min + step * i);
14
+ };
15
+ const toFraction = (value, min, max) => {
16
+ if (max === min) {
17
+ return 0;
18
+ }
19
+ return (0, clamp_1.default)((value - min) / (max - min), 0, 1);
20
+ };
21
+ const resolveOrigin = (percentBarStyle, cellValue, min, max) => {
22
+ const origin = percentBarStyle.Origin ?? 'Auto';
23
+ if (typeof origin === 'number') {
24
+ return origin;
25
+ }
26
+ if (origin === 'Zero') {
27
+ return 0;
28
+ }
29
+ if (origin === 'Min') {
30
+ return min;
31
+ }
32
+ if (min < 0 || max < 0 || cellValue < 0) {
33
+ return 0;
34
+ }
35
+ return min;
36
+ };
37
+ const columnComparisonUsesCentredAxis = (origin) => {
38
+ const o = origin ?? 'Auto';
39
+ if (typeof o === 'number') {
40
+ return false;
41
+ }
42
+ return o === 'Zero' || o === 'Auto';
43
+ };
44
+ const resolveRangeEndpoint = (endpoint, scaleMin, scaleMax) => {
45
+ if (endpoint === 'Col-Min') {
46
+ return scaleMin;
47
+ }
48
+ if (endpoint === 'Col-Max') {
49
+ return scaleMax;
50
+ }
51
+ if (typeof endpoint === 'number') {
52
+ return endpoint;
53
+ }
54
+ return scaleMin;
55
+ };
56
+ const getPreviewBarColor = (value, pb, scaleMin, scaleMax) => {
57
+ if (pb.ColumnComparison) {
58
+ return pb.ColumnComparison.Color;
59
+ }
60
+ for (const range of pb.CellRanges ?? []) {
61
+ const rMin = resolveRangeEndpoint(range.Min, scaleMin, scaleMax);
62
+ const rMax = resolveRangeEndpoint(range.Max, scaleMin, scaleMax);
63
+ if (value >= Math.min(rMin, rMax) && value <= Math.max(rMin, rMax)) {
64
+ return range.Color;
65
+ }
66
+ }
67
+ return pb.CellRanges?.[0]?.Color;
68
+ };
69
+ const hasPercentBarRangesConfigured = (pb) => !!(pb?.CellRanges?.length || pb?.ColumnComparison);
70
+ exports.hasPercentBarRangesConfigured = hasPercentBarRangesConfigured;
71
+ /** Illustrative scale for preview — shows negatives when origin is Auto or Zero. */
72
+ const getPercentBarPreviewScale = (pb) => {
73
+ const origin = pb.Origin ?? 'Auto';
74
+ if (origin === 'Zero' || origin === 'Auto') {
75
+ return { min: StyledColumnGradientHelper_1.ZERO_CENTRED_PREVIEW_SCALE_MIN, max: StyledColumnGradientHelper_1.ZERO_CENTRED_PREVIEW_SCALE_MAX };
76
+ }
77
+ return { min: 0, max: 100 };
78
+ };
79
+ exports.getPercentBarPreviewScale = getPercentBarPreviewScale;
80
+ const getPercentBarPreviewSampleValues = (pb) => {
81
+ const { min, max } = (0, exports.getPercentBarPreviewScale)(pb);
82
+ return evenlySpacedValues(min, max, StyledColumnGradientHelper_1.STYLED_COLUMN_PREVIEW_SAMPLE_COUNT);
83
+ };
84
+ exports.getPercentBarPreviewSampleValues = getPercentBarPreviewSampleValues;
85
+ const getPercentBarPreviewGeometry = (numericValue, pb, min, max) => {
86
+ let percentageValue = 0;
87
+ let barLeftPercent = 0;
88
+ let barWidthPercent = 0;
89
+ if (pb.ColumnComparison) {
90
+ const absMax = Math.abs(max);
91
+ percentageValue = absMax === 0 ? 0 : (numericValue / absMax) * 100;
92
+ const magnitude = Math.min(100, Math.abs(percentageValue));
93
+ const origin = pb.Origin ?? 'Auto';
94
+ const isCentred = columnComparisonUsesCentredAxis(origin);
95
+ if (isCentred) {
96
+ const halfWidth = magnitude / 2;
97
+ if (percentageValue >= 0) {
98
+ barLeftPercent = 50;
99
+ barWidthPercent = halfWidth;
100
+ }
101
+ else {
102
+ barLeftPercent = 50 - halfWidth;
103
+ barWidthPercent = halfWidth;
104
+ }
105
+ }
106
+ else {
107
+ barLeftPercent = 0;
108
+ barWidthPercent = magnitude;
109
+ }
110
+ }
111
+ else if (max === min) {
112
+ percentageValue = 0;
113
+ barLeftPercent = 0;
114
+ barWidthPercent = 0;
115
+ }
116
+ else {
117
+ percentageValue = (((0, clamp_1.default)(numericValue, min, max) - min) / (max - min)) * 100;
118
+ const origin = resolveOrigin(pb, numericValue, min, max);
119
+ const valueFrac = toFraction(numericValue, min, max);
120
+ const originFrac = toFraction(origin, min, max);
121
+ const start = Math.min(valueFrac, originFrac);
122
+ const end = Math.max(valueFrac, originFrac);
123
+ barLeftPercent = start * 100;
124
+ barWidthPercent = (end - start) * 100;
125
+ }
126
+ return {
127
+ barLeftPercent,
128
+ barWidthPercent,
129
+ percentageValue,
130
+ barColor: getPreviewBarColor(numericValue, pb, min, max),
131
+ };
132
+ };
133
+ exports.getPercentBarPreviewGeometry = getPercentBarPreviewGeometry;
134
+ const formatPercentBarPreviewCellText = (numericValue, percentageValue, pb) => {
135
+ const parts = [];
136
+ if (pb.CellText?.includes('CellValue')) {
137
+ parts.push(Number.isInteger(numericValue) ? String(numericValue) : numericValue.toFixed(1));
138
+ }
139
+ if (pb.CellText?.includes('PercentageValue')) {
140
+ parts.push(`${percentageValue.toFixed(0)}%`);
141
+ }
142
+ return parts.join(' ');
143
+ };
144
+ exports.formatPercentBarPreviewCellText = formatPercentBarPreviewCellText;
145
+ const getPercentBarPreviewTrackColor = (pb) => {
146
+ if (pb.ColumnComparison) {
147
+ return pb.BackColor ?? undefined;
148
+ }
149
+ return pb.BackColor ?? undefined;
150
+ };
151
+ exports.getPercentBarPreviewTrackColor = getPercentBarPreviewTrackColor;
152
+ const getPercentBarPreviewResolvedBarColor = (color) => color ? (0, StyleHelper_1.getVariableColor)(color) : undefined;
153
+ exports.getPercentBarPreviewResolvedBarColor = getPercentBarPreviewResolvedBarColor;
154
+ const hasPercentBarStylePreview = (styledColumn) => (0, exports.hasPercentBarRangesConfigured)(styledColumn.PercentBarStyle);
155
+ exports.hasPercentBarStylePreview = hasPercentBarStylePreview;
@@ -16,7 +16,7 @@ import { PlusMinusNudge } from '../AdaptableState/PlusMinusState';
16
16
  import { Shortcut } from '../AdaptableState/ShortcutState';
17
17
  import { NotificationsOptions } from '../AdaptableOptions/NotificationsOptions';
18
18
  import { CellSummmaryInfo } from '../AdaptableState/Common/CellSummary';
19
- import { AdaptableTheme, ChartDefinition, ColumnFilter, CommentThread, CustomDisplayFormatterContext, FlashingCellDefinition, RowDataChangedInfo, SpecialColumnSettings, SystemFilterPredicateId } from '../types';
19
+ import { ChartDefinition, ColumnFilter, CommentThread, CustomDisplayFormatterContext, FlashingCellDefinition, RowDataChangedInfo, SpecialColumnSettings, SystemFilterPredicateId } from '../types';
20
20
  import { IRowNode } from 'ag-grid-enterprise';
21
21
  import { AdaptableApi, AdaptableComment, BadgeStyleDefinition, CellAddress, NamedQuery, PivotLayout, TableLayout } from '../../types';
22
22
  import { ToastOptions } from '../components/Toastify';
@@ -54,7 +54,6 @@ export declare function CreateEmptyStyledColumn(): StyledColumn;
54
54
  export declare function CreateDefaultStyledColumnBadge(): BadgeStyleDefinition;
55
55
  export declare function CreateEmptyChartDefinition(chartDefinition?: ChartDefinition): ChartDefinition;
56
56
  export declare function CreateCustomDisplayFormatterContext(value: any, node: IRowNode, abColumn: AdaptableColumn, api: AdaptableApi): CustomDisplayFormatterContext;
57
- export declare function CreateEmptyTheme(name?: string): AdaptableTheme;
58
57
  export declare function CreateEmptyCommentThread(cellAddress: CellAddress): CommentThread;
59
58
  export declare function CreateToastOptions(notificationsOptions: NotificationsOptions, { onClose, containerId }: {
60
59
  onClose?: VoidFunction;
@@ -91,7 +90,6 @@ export declare const ObjectFactory: {
91
90
  CreateEmptyStyledColumn: typeof CreateEmptyStyledColumn;
92
91
  CreateDefaultStyledColumnBadge: typeof CreateDefaultStyledColumnBadge;
93
92
  CreateEmptyChartDefinition: typeof CreateEmptyChartDefinition;
94
- CreateEmptyTheme: typeof CreateEmptyTheme;
95
93
  CreateEmptyCommentThread: typeof CreateEmptyCommentThread;
96
94
  CreateAdaptableComment: typeof CreateAdaptableComment;
97
95
  CreateDefaultSchedule: typeof CreateDefaultSchedule;
@@ -28,7 +28,6 @@ exports.CreateEmptyStyledColumn = CreateEmptyStyledColumn;
28
28
  exports.CreateDefaultStyledColumnBadge = CreateDefaultStyledColumnBadge;
29
29
  exports.CreateEmptyChartDefinition = CreateEmptyChartDefinition;
30
30
  exports.CreateCustomDisplayFormatterContext = CreateCustomDisplayFormatterContext;
31
- exports.CreateEmptyTheme = CreateEmptyTheme;
32
31
  exports.CreateEmptyCommentThread = CreateEmptyCommentThread;
33
32
  exports.CreateToastOptions = CreateToastOptions;
34
33
  exports.CreateDefaultSchedule = CreateDefaultSchedule;
@@ -322,13 +321,6 @@ function CreateCustomDisplayFormatterContext(value, node, abColumn, api) {
322
321
  ...api.internalApi.buildBaseContext(),
323
322
  };
324
323
  }
325
- function CreateEmptyTheme(name) {
326
- return {
327
- Uuid: (0, Uuid_1.createUuid)(),
328
- Name: name || 'Custom Theme',
329
- Description: name || 'Custom Theme',
330
- };
331
- }
332
324
  function CreateEmptyCommentThread(cellAddress) {
333
325
  return {
334
326
  ...cellAddress,
@@ -423,7 +415,6 @@ exports.ObjectFactory = {
423
415
  CreateEmptyStyledColumn,
424
416
  CreateDefaultStyledColumnBadge,
425
417
  CreateEmptyChartDefinition,
426
- CreateEmptyTheme,
427
418
  CreateEmptyCommentThread,
428
419
  CreateAdaptableComment,
429
420
  CreateDefaultSchedule,
@@ -23,7 +23,7 @@ class ThemeService {
23
23
  document.adoptedStyleSheets = [...document.adoptedStyleSheets].filter((sheet) => sheet !== this.styleSheetObject);
24
24
  }
25
25
  subscribe() {
26
- const themeChangedUnsubscribe = this.api.eventApi.on('ThemeChanged', this.onThemeChanged);
26
+ const themeChangedUnsubscribe = this.api.eventApi.on('ThemeSelected', this.onThemeChanged);
27
27
  const prefferedColorSchemeUnsubscribe = this.attachPrefferedColorSchemeListener();
28
28
  this.unsubscribe = () => {
29
29
  themeChangedUnsubscribe();
@@ -4,7 +4,6 @@ exports.AlertBehaviourWizardSection = exports.renderAlertBehaviourSummary = expo
4
4
  const tslib_1 = require("tslib");
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const ScheduledAlertHelper_1 = require("../../../Utilities/Helpers/ScheduledAlertHelper");
7
- const Tabs_1 = require("../../../components/Tabs");
8
7
  const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
9
8
  const CheckBox_1 = require("../../../components/CheckBox");
10
9
  const CodeBlock_1 = require("../../../components/CodeBlock");
@@ -17,6 +16,7 @@ const getAlertType_1 = require("../Utilities/getAlertType");
17
16
  const Flex_1 = require("../../../components/Flex");
18
17
  const Tag_1 = require("../../../components/Tag/Tag");
19
18
  const NewSelect_1 = require("../../../components/NewSelect");
19
+ const Card_1 = require("../../../components/Card");
20
20
  const HighlightStyle = (props) => {
21
21
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
22
22
  const options = [
@@ -90,6 +90,7 @@ const renderAlertBehaviourSummary = (alert, api, allowWrap = false) => {
90
90
  exports.renderAlertBehaviourSummary = renderAlertBehaviourSummary;
91
91
  const AlertBehaviourWizardSection = (props) => {
92
92
  const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
93
+ const behaviourSpellingVariant = api.internalApi.getCorrectEnglishVariant('Behaviour');
93
94
  const presentationProperties = data.AlertProperties ?? {};
94
95
  const ruleProperties = (0, ScheduledAlertHelper_1.isRuleBasedAlertDefinition)(data)
95
96
  ? (data.AlertProperties ?? {})
@@ -113,20 +114,20 @@ const AlertBehaviourWizardSection = (props) => {
113
114
  },
114
115
  });
115
116
  };
116
- return ((0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Tab, { children: api.internalApi.getCorrectEnglishVariant('Behaviour') }), (0, jsx_runtime_1.jsxs)(Tabs_1.Tabs.Content, { className: "twa:flex twa:flex-col twa:gap-1", children: [hasPreventCellEdit && ((0, jsx_runtime_1.jsxs)(CheckBox_1.CheckBox, { "data-name": "prevent-cell-edit", style: { alignItems: 'flex-start' }, checked: ruleProperties.PreventEdit, disabled: true, children: ["Prevent Cell Edit", (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2 twa:mt-1", children: "(automatically undo data change which triggered Alert)" })] })), hasHighlightCell && ((0, jsx_runtime_1.jsx)(HighlightStyle, { dataName: "highlight-cell", highlight: ruleProperties.HighlightCell, label: "Highlight Cell", onChange: (HighlightCell) => {
117
- onChange({ HighlightCell });
118
- } })), hasHighlightRow && ((0, jsx_runtime_1.jsx)(HighlightStyle, { dataName: "highlight-row", highlight: ruleProperties.HighlightRow, label: "Highlight Row", onChange: (HighlightRow) => {
119
- onChange({ HighlightRow });
120
- } })), hasJumpToCell && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "jump-to-cell", checked: ruleProperties.JumpToCell, onChange: (JumpToCell) => {
121
- onChange({ JumpToCell });
122
- }, children: "Jump To Cell" })), hasJumpToRow && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "jump-to-row", checked: ruleProperties.JumpToRow, onChange: (JumpToRow) => {
123
- onChange({ JumpToRow });
124
- }, children: "Jump To Row" })), showInSeparateDiv && ((0, jsx_runtime_1.jsxs)(CheckBox_1.CheckBox, { "data-name": "show-in-div", checked: presentationProperties.ShowInDiv, onChange: (ShowInDiv) => {
125
- onChange({ ShowInDiv });
126
- }, children: ["Show in separate ", (0, jsx_runtime_1.jsx)(CodeBlock_1.CodeBlock, { children: `<div />` }), " element"] })), logToConsole && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "log-to-console", checked: presentationProperties.LogToConsole, onChange: (LogToConsole) => {
127
- onChange({ LogToConsole });
128
- }, children: "Log To Console" })), showSystemStatusMessage && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "system-status-message", checked: presentationProperties.DisplaySystemStatusMessage, onChange: (DisplaySystemStatusMessage) => {
129
- onChange({ DisplaySystemStatusMessage });
130
- }, children: "Show as System Status Message" }))] })] }));
117
+ return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-3", 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: behaviourSpellingVariant }), (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: ["Configure ", behaviourSpellingVariant.toLowerCase(), "s for the Alert when it fires"] })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card.Body, { className: "twa:gap-1", children: [hasPreventCellEdit && ((0, jsx_runtime_1.jsxs)(CheckBox_1.CheckBox, { "data-name": "prevent-cell-edit", style: { alignItems: 'flex-start' }, checked: ruleProperties.PreventEdit, disabled: true, children: ["Prevent Cell Edit", (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2 twa:mt-1", children: "(automatically undo data change which triggered Alert)" })] })), hasHighlightCell && ((0, jsx_runtime_1.jsx)(HighlightStyle, { dataName: "highlight-cell", highlight: ruleProperties.HighlightCell, label: "Highlight Cell", onChange: (HighlightCell) => {
118
+ onChange({ HighlightCell });
119
+ } })), hasHighlightRow && ((0, jsx_runtime_1.jsx)(HighlightStyle, { dataName: "highlight-row", highlight: ruleProperties.HighlightRow, label: "Highlight Row", onChange: (HighlightRow) => {
120
+ onChange({ HighlightRow });
121
+ } })), hasJumpToCell && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "jump-to-cell", checked: ruleProperties.JumpToCell, onChange: (JumpToCell) => {
122
+ onChange({ JumpToCell });
123
+ }, children: "Jump To Cell" })), hasJumpToRow && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "jump-to-row", checked: ruleProperties.JumpToRow, onChange: (JumpToRow) => {
124
+ onChange({ JumpToRow });
125
+ }, children: "Jump To Row" })), showInSeparateDiv && ((0, jsx_runtime_1.jsxs)(CheckBox_1.CheckBox, { "data-name": "show-in-div", checked: presentationProperties.ShowInDiv, onChange: (ShowInDiv) => {
126
+ onChange({ ShowInDiv });
127
+ }, children: ["Show in separate ", (0, jsx_runtime_1.jsx)(CodeBlock_1.CodeBlock, { children: `<div />` }), " element"] })), logToConsole && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "log-to-console", checked: presentationProperties.LogToConsole, onChange: (LogToConsole) => {
128
+ onChange({ LogToConsole });
129
+ }, children: "Log To Console" })), showSystemStatusMessage && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "system-status-message", checked: presentationProperties.DisplaySystemStatusMessage, onChange: (DisplaySystemStatusMessage) => {
130
+ onChange({ DisplaySystemStatusMessage });
131
+ }, children: "Show as System Status Message" }))] })] }) }));
131
132
  };
132
133
  exports.AlertBehaviourWizardSection = AlertBehaviourWizardSection;