@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
@@ -233,8 +233,7 @@ export interface SparklineStyle {
233
233
  */
234
234
  options?: AgSparklineOptions;
235
235
  /**
236
- * Optional cell box styling (background colour, border, border radius)
237
- * applied to the cell behind the sparkline chart.
236
+ * Optional cell box styling applied to the cell behind the sparkline chart.
238
237
  *
239
238
  * When set, this property "claims" the Cell slice for the column: any
240
239
  * Format Column matching this column has its Cell-box properties stripped.
@@ -472,7 +471,7 @@ export interface BadgeStyle {
472
471
  */
473
472
  OverflowMode?: BadgeOverflowMode;
474
473
  /**
475
- * Optional cell-box styling applied to grid cell **behind** the badges. *
474
+ * Optional cell-box styling applied to grid cell **behind** the badges
476
475
  */
477
476
  Cell?: CellBoxStyle;
478
477
  /**
@@ -760,8 +759,7 @@ export interface RangeBarMarker {
760
759
  /**
761
760
  * Marker shape.
762
761
  *
763
- * @defaultValue `'Diamond'` for the cell-value marker, `'Line'` for the
764
- * reference marker.
762
+ * @defaultValue `'Diamond'` for cell-value marker, `'Line'` for reference marker
765
763
  */
766
764
  Shape?: 'Line' | 'Triangle' | 'Dot' | 'Diamond';
767
765
  /**
@@ -1,57 +1,62 @@
1
1
  import { BaseState } from './BaseState';
2
2
  import { AdaptableObject } from './Common/AdaptableObject';
3
3
  import { TypeHint } from './Common/Types';
4
+ /**
5
+ * Shipped AdapTable theme names.
6
+ */
7
+ export type SystemThemeName = TypeHint<string, 'light' | 'dark' | 'os'>;
4
8
  /**
5
9
  * Theme section of Adaptable State
6
10
  */
7
11
  export interface ThemeState extends BaseState {
8
12
  /**
9
- * Name of current theme (or theme to set at startup); leave blank if using 'Light Theme', set to 'dark' for 'Dark Theme' or provide name of Custom Theme
13
+ * Name of current Theme or theme set at startup; leave blank if using 'Light Theme', set to 'dark' for 'Dark Theme'
10
14
  */
11
- CurrentTheme?: TypeHint<string, 'light' | 'dark' | 'os'>;
15
+ CurrentTheme?: SystemThemeName;
12
16
  /**
13
- * Which, if any, of the 2 themes shipped by Adaptable should be available; leave unset to provide both, or an empty array to provide neither.
17
+ * Which shipped themes are available; pass theme name string, or `{ Name, AgThemeMode? }` to pair a custom AG Grid theme mode; leave unset for all shipped themes
14
18
  */
15
- SystemThemes?: (AdaptableTheme | string)[];
19
+ SystemThemes?: (SystemThemeEntry | AdaptableTheme)[];
16
20
  /**
17
- * Custom themes (of type AdaptableTheme) provided by developers
21
+ * Custom themes provided by developers (deprecated)
22
+ *
23
+ * @deprecated Will be removed in next major version. Customise shipped `light` / `dark` themes via CSS variable overrides instead.
18
24
  */
19
25
  UserThemes?: AdaptableTheme[];
20
26
  }
21
27
  /**
22
- * Used for creating User (i.e. Custom) Themes
28
+ * Pairing options between AG Grid and AdapTable themes
23
29
  */
24
- export interface AdaptableTheme extends AdaptableObject {
30
+ export interface SystemThemeOptions {
25
31
  /**
26
- * Name of the Theme as it appears in the Theme toolbar and tool panel
32
+ * Shipped theme this entry configures: `light`, `dark`, or `os`
27
33
  */
28
- Name: string;
34
+ Name: SystemThemeName;
29
35
  /**
30
- * Description of Theme - will appear in Theme Toolbar and Toolpanel
36
+ * AG Grid theme mode to apply when this theme is selected; valid values are `light`, `dark`, `dark-blue` or any custom theme mode defined in AG Grid
31
37
  */
32
- Description: string;
38
+ AgThemeMode?: TypeHint<string, 'light' | 'dark' | 'dark-blue'>;
33
39
  /**
34
- * Ag Grid theme to apply when loading theme; relevant only when using the legacy AG Grid themes
40
+ * Ag Grid theme to apply when loading theme; relevant only when using legacy AG Grid themes
35
41
  *
36
- * @deprecated no longer used with the new AG Grid Theming API
42
+ * @deprecated no longer used with new AG Grid Theming API
37
43
  */
38
44
  AgGridClassName?: string;
39
- /**
40
- * Variables to be applied at runtime
41
- */
45
+ }
46
+ /**
47
+ * Configures a shipped system theme: a theme name, or an object with AG Grid pairing options
48
+ */
49
+ export type SystemThemeEntry = SystemThemeName | SystemThemeOptions;
50
+ /**
51
+ * Used for creating Custom Themes (deprecated)
52
+ *
53
+ * @deprecated User-defined themes are deprecated; customise shipped themes via CSS variables and use SystemThemeOptions for AG Grid pairing
54
+ */
55
+ export interface AdaptableTheme extends AdaptableObject {
56
+ Name: string;
57
+ Description: string;
58
+ AgGridClassName?: string;
42
59
  CSSVariables?: Record<string, string>;
43
- /**
44
- * Base theme variant to derive custom theme from.
45
- * Use `light` to inherit from Adaptable Light Theme or `dark` for Adaptable Dark Theme.
46
- * When creating custom themes, specifying a variant ensures proper inheritance of base theme styles.
47
- */
48
60
  Variant?: 'light' | 'dark';
49
- /**
50
- * AG Grid theme mode to apply when this theme is selected.
51
- * Valid values are `light`, `dark`, `dark-blue` or any custom theme mode defined in AG Grid.
52
- * When set, adds a data-ag-theme-mode attribute to the document body.
53
- *
54
- * @see https://www.ag-grid.com/javascript-data-grid/theming-colors/#theme-modes
55
- */
56
61
  AgThemeMode?: TypeHint<string, 'light' | 'dark' | 'dark-blue'>;
57
62
  }
@@ -1,4 +1,4 @@
1
- import { AdaptableReadyInfo, AdaptableStateChangedInfo, AdaptableStateReloadedInfo, BeforeAdaptableStateChangeInfo, AlertFiredInfo, CalculatedColumnChangedInfo, CellChangedInfo, CellSelectionChangedInfo, ChartChangedInfo, ColumnFilterAppliedInfo, CommentChangedInfo, CustomToolbarConfiguredInfo, DashboardChangedInfo, DataImportedInfo, DataSetSelectedInfo, Fdc3MessageInfo, FlashingCellDisplayedInfo, GridFilterAppliedInfo, GridSortedInfo, LayoutChangedInfo, LiveDataChangedInfo, RowChangedInfo, RowFormSubmittedInfo, RowSelectionChangedInfo, ReportScheduleRanInfo, SystemStatusMessageDisplayedInfo, TeamSharingEntityChangedInfo, ThemeChangedInfo } from '../types';
1
+ import { AdaptableReadyInfo, AdaptableStateChangedInfo, AdaptableStateReloadedInfo, BeforeAdaptableStateChangeInfo, AlertFiredInfo, CalculatedColumnChangedInfo, CellChangedInfo, CellSelectionChangedInfo, ChartChangedInfo, ColumnFilterAppliedInfo, CommentChangedInfo, CustomToolbarConfiguredInfo, DashboardChangedInfo, DataImportedInfo, DataSetSelectedInfo, Fdc3MessageInfo, FlashingCellDisplayedInfo, GridFilterAppliedInfo, GridSortedInfo, LayoutChangedInfo, LiveDataChangedInfo, RowChangedInfo, RowFormSubmittedInfo, RowSelectionChangedInfo, ReportScheduleRanInfo, SystemStatusMessageDisplayedInfo, TeamSharingEntityChangedInfo, ThemeChangedInfo, ThemeSelectedInfo } from '../types';
2
2
  /**
3
3
  * Responsible for publishing the many Events that AdapTable fires
4
4
  */
@@ -115,15 +115,28 @@ export interface EventApi {
115
115
  * Unsubscribe from RowSelectionChanged
116
116
  */
117
117
  off(eventName: 'RowSelectionChanged', callback: (rowSelectionChangedInfo: RowSelectionChangedInfo) => void): void;
118
+ /**
119
+ * Event fired whenever a shipped theme (`light`, `dark`, or `os`) is selected or re-applied
120
+ * @param eventName ThemeSelected
121
+ * @param callback ThemeSelectedInfo containing the active system theme name
122
+ * @returns the unsubscribe function
123
+ */
124
+ on(eventName: 'ThemeSelected', callback: (themeSelectedInfo: ThemeSelectedInfo) => void): VoidFunction;
125
+ /**
126
+ * Unsubscribe from ThemeSelected
127
+ */
128
+ off(eventName: 'ThemeSelected', callback: (themeSelectedInfo: ThemeSelectedInfo) => void): void;
118
129
  /**
119
130
  * Event fired whenever the selected theme of AdapTable is changed
120
131
  * @param eventName ThemeChanged
121
132
  * @param callback ThemeChangedInfo which just contains the name of the current Theme
122
133
  * @returns the unsubscribe function
134
+ * @deprecated Use `ThemeSelected` instead. Will be removed in the next major version.
123
135
  */
124
136
  on(eventName: 'ThemeChanged', callback: (themeChangedInfo: ThemeChangedInfo) => void): VoidFunction;
125
137
  /**
126
138
  * Unsubscribe from ThemeChanged
139
+ * @deprecated Use `ThemeSelected` instead.
127
140
  */
128
141
  off(eventName: 'ThemeChanged', callback: (themeChangedInfo: ThemeChangedInfo) => void): void;
129
142
  /**
@@ -2,14 +2,20 @@ import { AdaptableTheme } from '../../AdaptableState/ThemeState';
2
2
  import { BaseContext } from '../../types';
3
3
  /**
4
4
  * Object returned by the `ThemeChanged` event
5
+ *
6
+ * @deprecated Use {@link ThemeSelectedInfo} and the `ThemeSelected` event instead. Will be removed in the next major version.
5
7
  */
6
8
  export interface ThemeChangedInfo extends BaseContext {
7
9
  /**
8
10
  * Current Theme: either name of a System Theme or a Custom Theme object
11
+ *
12
+ * @deprecated Use `ThemeSelectedInfo.theme` instead.
9
13
  */
10
14
  theme: AdaptableTheme | string;
11
15
  /**
12
16
  * What caused Event to fire: "ThemeSelected" or "ThemeEdited"
17
+ *
18
+ * @deprecated No longer required — use the `ThemeSelected` event for theme selection.
13
19
  */
14
20
  trigger: 'ThemeSelected' | 'ThemeEdited';
15
21
  }
@@ -0,0 +1,11 @@
1
+ import { SystemThemeName } from '../../AdaptableState/ThemeState';
2
+ import { BaseContext } from '../../types';
3
+ /**
4
+ * Object returned by the `ThemeSelected` event
5
+ */
6
+ export interface ThemeSelectedInfo extends BaseContext {
7
+ /**
8
+ * Shipped theme that is now active: `light`, `dark`, or `os`
9
+ */
10
+ theme: SystemThemeName;
11
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const ApiBase_1 = require("./ApiBase");
6
6
  const Emitter_1 = tslib_1.__importDefault(require("../../Utilities/Emitter"));
7
7
  const EventInternalApi_1 = require("../Internal/EventInternalApi");
8
+ const logDeprecation_1 = require("../../Utilities/logDeprecation");
8
9
  class EventApiImpl extends ApiBase_1.ApiBase {
9
10
  emitter;
10
11
  internalApi;
@@ -19,6 +20,9 @@ class EventApiImpl extends ApiBase_1.ApiBase {
19
20
  this.emitter.destroy();
20
21
  }
21
22
  on = (eventName, callback) => {
23
+ if (eventName === 'ThemeChanged') {
24
+ (0, logDeprecation_1.logDeprecation)(this._adaptable.logger, 'EventApi', 'ThemeChanged', undefined, "The 'ThemeChanged' event is deprecated. Subscribe to 'ThemeSelected' instead.");
25
+ }
22
26
  let result;
23
27
  if (eventName === 'AdaptableReady') {
24
28
  this.emitter.onIncludeFiredOnce(eventName).then(callback);
@@ -7,7 +7,6 @@ import { ModuleParams } from '../../View/Components/SharedProps/ModuleViewPopupP
7
7
  import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
8
8
  import { LayoutInternalApi } from '../Internal/LayoutInternalApi';
9
9
  import { ExtendedLayout } from '../../AdaptableState/Common/ExtendedLayout';
10
- import { ParameterizedAggFunc } from '../../AdaptableState/Common/AggregationColumns';
11
10
  export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
12
11
  internalApi: LayoutInternalApi;
13
12
  constructor(_adaptable: IAdaptable);
@@ -45,6 +44,5 @@ export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
45
44
  deleteLayout(layout: Layout): void;
46
45
  deleteLayoutByName(layoutName: string): void;
47
46
  removeColumnFromCurrentLayout(columnId: string): void;
48
- setColumnParameterizedAggregation(columnId: string, parameterizedAgg: ParameterizedAggFunc): void;
49
47
  addColumnToCurrentLayout(columnId: string): void;
50
48
  }
@@ -10,8 +10,6 @@ const Uuid_1 = require("../../AdaptableState/Uuid");
10
10
  const PopupRedux_1 = require("../../Redux/ActionsReducers/PopupRedux");
11
11
  const LayoutInternalApi_1 = require("../Internal/LayoutInternalApi");
12
12
  const LayoutHelpers_1 = require("./LayoutHelpers");
13
- const ParameterizedAggregationRegistry_1 = require("../../Aggregation/ParameterizedAggregationRegistry");
14
- const parameterizedAggregationHelpers_1 = require("../../Aggregation/parameterizedAggregationHelpers");
15
13
  const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
16
14
  class LayoutApiImpl extends ApiBase_1.ApiBase {
17
15
  internalApi;
@@ -460,18 +458,6 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
460
458
  }
461
459
  }
462
460
  }
463
- setColumnParameterizedAggregation(columnId, parameterizedAgg) {
464
- const definition = (0, ParameterizedAggregationRegistry_1.getParameterizedAggregationDefinition)(parameterizedAgg.type);
465
- if (!definition || !definition.isComplete(parameterizedAgg)) {
466
- this.logWarn(`Cannot apply parameterized aggregation '${parameterizedAgg.type}' — required arguments are missing.`);
467
- return;
468
- }
469
- this.updateCurrentLayout((layout) => {
470
- (0, parameterizedAggregationHelpers_1.upsertColumnAggregationInLayout)(layout, columnId, parameterizedAgg);
471
- return layout;
472
- });
473
- this.getAgGridApi()?.setColumnAggFunc(columnId, definition.agGridAggFuncName);
474
- }
475
461
  addColumnToCurrentLayout(columnId) {
476
462
  const column = this.getColumnApi().getColumnWithColumnId(columnId);
477
463
  if (column) {
@@ -16,6 +16,8 @@ export declare const normalizeTableLayout: (tableLayout: TableLayout, options?:
16
16
  isTree: boolean;
17
17
  }) => TableLayout;
18
18
  export declare const normalizePivotLayout: (pivotLayout: PivotLayout) => PivotLayout;
19
+ /** Clears module-scoped dedupe state when a new Adaptable instance starts (e.g. Playwright retries). */
20
+ export declare const resetLayoutHelperErrorOnceMessages: () => void;
19
21
  export declare const getLayoutRowGroupValuesExceptionGroupKeys: (layout: TableLayout | PivotLayout) => any[][];
20
22
  export declare const toRowGroupValuesForLayoutState: (rowGroupValuesModel: TableLayoutModel["RowGroupValues"]) => TableLayout["RowGroupValues"];
21
23
  export declare const toRowGroupValuesForLayoutModel: (rowGroupValuesState: TableLayout["RowGroupValues"]) => TableLayoutModel["RowGroupValues"];
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isPivotLayout = exports.pivotLayoutModelToPivotLayout = exports.tableLayoutModelToTableLayout = exports.pivotLayoutToPivotLayoutModel = exports.tableLayoutToTableLayoutModel = exports.checkForDuplicateColumns = exports.toRowGroupValuesForLayoutModel = exports.toRowGroupValuesForLayoutState = exports.getLayoutRowGroupValuesExceptionGroupKeys = exports.normalizePivotLayout = exports.normalizeTableLayout = exports.normalizeLayout = exports.areLayoutsEqual = exports.layoutModelToLayoutState = exports.layoutStateToLayoutModel = void 0;
3
+ exports.isPivotLayout = exports.pivotLayoutModelToPivotLayout = exports.tableLayoutModelToTableLayout = exports.pivotLayoutToPivotLayoutModel = exports.tableLayoutToTableLayoutModel = exports.checkForDuplicateColumns = exports.toRowGroupValuesForLayoutModel = exports.toRowGroupValuesForLayoutState = exports.getLayoutRowGroupValuesExceptionGroupKeys = exports.resetLayoutHelperErrorOnceMessages = exports.normalizePivotLayout = exports.normalizeTableLayout = exports.normalizeLayout = exports.areLayoutsEqual = exports.layoutModelToLayoutState = exports.layoutStateToLayoutModel = void 0;
4
4
  exports.columnWidthsToColumnSizing = columnWidthsToColumnSizing;
5
5
  const tslib_1 = require("tslib");
6
6
  const isEqual_1 = tslib_1.__importDefault(require("../../Utilities/utils/isEqual"));
7
7
  const isPivotLayoutModel_1 = require("../../layout-manager/src/isPivotLayoutModel");
8
8
  const normalizeLayoutModel_1 = require("../../layout-manager/src/normalizeLayoutModel");
9
9
  const simplifyLayoutModel_1 = require("../../layout-manager/src/simplifyLayoutModel");
10
- const ParameterizedAggregationRegistry_1 = require("../../Aggregation/ParameterizedAggregationRegistry");
10
+ const AggregationColumns_1 = require("../../AdaptableState/Common/AggregationColumns");
11
11
  const AdaptableHelper_1 = require("../../Utilities/Helpers/AdaptableHelper");
12
12
  function columnWidthsToColumnSizing(columnWidths) {
13
13
  if (!columnWidths) {
@@ -94,6 +94,11 @@ const normalizePivotLayout = (pivotLayout) => {
94
94
  };
95
95
  exports.normalizePivotLayout = normalizePivotLayout;
96
96
  const errorOnceMessages = new Map();
97
+ /** Clears module-scoped dedupe state when a new Adaptable instance starts (e.g. Playwright retries). */
98
+ const resetLayoutHelperErrorOnceMessages = () => {
99
+ errorOnceMessages.clear();
100
+ };
101
+ exports.resetLayoutHelperErrorOnceMessages = resetLayoutHelperErrorOnceMessages;
97
102
  const errorOnce = (message) => {
98
103
  if (errorOnceMessages.get(message)) {
99
104
  return;
@@ -353,7 +358,10 @@ const pivotLayoutToPivotLayoutModel = (pivotLayout) => {
353
358
  };
354
359
  exports.pivotLayoutToPivotLayoutModel = pivotLayoutToPivotLayoutModel;
355
360
  function toAggFunc(aggFunc) {
356
- return (0, ParameterizedAggregationRegistry_1.aggregationValueToColumnAggregationModel)(aggFunc);
361
+ if ((0, AggregationColumns_1.isWeightedAverageAggregation)(aggFunc)) {
362
+ return { aggFunc: AggregationColumns_1.WEIGHTED_AVERAGE_AGG_FN_NAME, weightedColumnId: aggFunc.weightedColumnId };
363
+ }
364
+ return { aggFunc };
357
365
  }
358
366
  const tableLayoutModelToTableLayout = (layoutModel) => {
359
367
  const tableLayout = {
@@ -459,11 +467,14 @@ const tableLayoutModelToTableLayout = (layoutModel) => {
459
467
  };
460
468
  exports.tableLayoutModelToTableLayout = tableLayoutModelToTableLayout;
461
469
  function toAggregationColumnValue(columnAggregationModel) {
462
- const parameterizedValue = (0, ParameterizedAggregationRegistry_1.aggregationValueFromColumnAggregationModel)(columnAggregationModel);
463
- if (parameterizedValue !== undefined) {
464
- return parameterizedValue;
465
- }
466
- return columnAggregationModel.aggFunc;
470
+ return columnAggregationModel &&
471
+ typeof columnAggregationModel.aggFunc === 'string' &&
472
+ (0, AggregationColumns_1.isWeightedAverageAggFuncName)(columnAggregationModel.aggFunc)
473
+ ? {
474
+ type: 'weightedAverage',
475
+ weightedColumnId: columnAggregationModel.weightedColumnId,
476
+ }
477
+ : columnAggregationModel.aggFunc;
467
478
  }
468
479
  const pivotLayoutModelToPivotLayout = (layoutModel) => {
469
480
  const pivotLayout = {
@@ -1,6 +1,6 @@
1
1
  import { ApiBase } from './ApiBase';
2
2
  import { ThemeApi } from '../ThemeApi';
3
- import { AdaptableTheme, ThemeState } from '../../AdaptableState/ThemeState';
3
+ import { AdaptableTheme, SystemThemeEntry, ThemeState } from '../../AdaptableState/ThemeState';
4
4
  import { ThemeInternalApi } from '../Internal/ThemeInternalApi';
5
5
  import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
6
6
  export declare class ThemeApiImpl extends ApiBase implements ThemeApi {
@@ -12,7 +12,7 @@ export declare class ThemeApiImpl extends ApiBase implements ThemeApi {
12
12
  loadDarkTheme(): void;
13
13
  getCurrentTheme(): string;
14
14
  getCurrentThemeObject(): AdaptableTheme;
15
- setSystemThemes(systemThemes: AdaptableTheme[]): void;
15
+ setSystemThemes(systemThemes: SystemThemeEntry[]): void;
16
16
  setUserThemes(userThemes: AdaptableTheme[]): void;
17
17
  getSystemThemes(): AdaptableTheme[];
18
18
  applyCurrentTheme(): void;
@@ -24,4 +24,5 @@ export declare class ThemeApiImpl extends ApiBase implements ThemeApi {
24
24
  editTheme(theme: AdaptableTheme): void;
25
25
  addUserTheme(theme: AdaptableTheme): void;
26
26
  deleteUserTheme(theme: AdaptableTheme): void;
27
+ private warnUserThemesDeprecated;
27
28
  }
@@ -5,10 +5,10 @@ const tslib_1 = require("tslib");
5
5
  const ThemeRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/ThemeRedux"));
6
6
  const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
7
7
  const ApiBase_1 = require("./ApiBase");
8
- const themes_1 = require("../../themes");
9
8
  const ThemeInternalApi_1 = require("../Internal/ThemeInternalApi");
10
9
  const AdaptableHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/AdaptableHelper"));
11
10
  const logDeprecation_1 = require("../../Utilities/logDeprecation");
11
+ const ThemeHelpers_1 = require("../../Utilities/Helpers/ThemeHelpers");
12
12
  class ThemeApiImpl extends ApiBase_1.ApiBase {
13
13
  internalApi;
14
14
  constructor(_adaptable) {
@@ -38,32 +38,30 @@ class ThemeApiImpl extends ApiBase_1.ApiBase {
38
38
  this.dispatchAction(ThemeRedux.ThemeSetSystemThemes(systemThemes));
39
39
  }
40
40
  setUserThemes(userThemes) {
41
+ this.warnUserThemesDeprecated();
41
42
  this.dispatchAction(ThemeRedux.ThemeSetUserThemes(userThemes));
42
43
  }
43
44
  getSystemThemes() {
44
45
  const themes = this.getAdaptableState().Theme.SystemThemes ?? [];
45
- return themes.map((theme) => {
46
- if (typeof theme === 'string') {
47
- const description = themes_1.StaticThemes.find((staticTheme) => staticTheme.Name === theme)?.Description ?? theme;
48
- return {
49
- Name: theme,
50
- Description: description,
51
- };
52
- }
53
- return theme;
54
- });
46
+ return themes.map((theme) => (0, ThemeHelpers_1.systemThemeEntryToAdaptableTheme)(theme, this._adaptable.logger));
55
47
  }
56
48
  applyCurrentTheme() {
57
- const currentTheme = this.getThemes().filter((theme) => typeof theme === 'string'
58
- ? theme === this.getCurrentTheme()
59
- : theme.Name === this.getCurrentTheme())[0];
49
+ const currentThemeName = this.getCurrentTheme();
50
+ const currentTheme = this.getThemes().find((theme) => theme.Name === currentThemeName);
60
51
  if (!currentTheme) {
61
52
  return;
62
53
  }
63
54
  this._adaptable.applyAdaptableTheme(currentTheme);
64
- this.getEventApi().internalApi.fireThemeChangedEvent(currentTheme, 'ThemeSelected');
55
+ if (this.internalApi.isSystemTheme(currentThemeName)) {
56
+ this.getEventApi().internalApi.fireThemeSelectedEvent(currentThemeName);
57
+ this.getEventApi().internalApi.fireThemeChangedEvent(currentTheme, 'ThemeSelected');
58
+ }
59
+ else {
60
+ this.getEventApi().internalApi.fireThemeChangedEvent(currentTheme, 'ThemeSelected');
61
+ }
65
62
  }
66
63
  getUserThemes() {
64
+ this.warnUserThemesDeprecated();
67
65
  return this.getAdaptableState().Theme.UserThemes ?? [];
68
66
  }
69
67
  getThemes() {
@@ -80,6 +78,7 @@ class ThemeApiImpl extends ApiBase_1.ApiBase {
80
78
  return this._adaptable.agGridThemeAdapter.getAgGridCurrentThemeClassNames();
81
79
  }
82
80
  editTheme(theme) {
81
+ this.warnUserThemesDeprecated();
83
82
  this.dispatchAction(ThemeRedux.ThemeEdit(theme));
84
83
  this.getEventApi().internalApi.fireThemeChangedEvent(theme, 'ThemeEdited');
85
84
  const currentTheme = this.getCurrentTheme();
@@ -88,11 +87,16 @@ class ThemeApiImpl extends ApiBase_1.ApiBase {
88
87
  }
89
88
  }
90
89
  addUserTheme(theme) {
90
+ this.warnUserThemesDeprecated();
91
91
  AdaptableHelper_1.default.addAdaptableObjectPrimitives(theme);
92
92
  this.dispatchAction(ThemeRedux.ThemeAdd(theme));
93
93
  }
94
94
  deleteUserTheme(theme) {
95
+ this.warnUserThemesDeprecated();
95
96
  this.dispatchAction(ThemeRedux.ThemeDelete(theme));
96
97
  }
98
+ warnUserThemesDeprecated() {
99
+ (0, logDeprecation_1.logDeprecation)(this._adaptable.logger, 'ThemeState', 'UserThemes', undefined, 'UserThemes is deprecated and will be removed in the next major version. Customise shipped light/dark themes via CSS variable overrides instead.');
100
+ }
97
101
  }
98
102
  exports.ThemeApiImpl = ThemeApiImpl;
@@ -2,6 +2,7 @@ import { IRowNode } from 'ag-grid-enterprise';
2
2
  import * as Redux from 'redux';
3
3
  import { CellDataChangedInfo } from '../../AdaptableState/Common/CellDataChangedInfo';
4
4
  import { AdaptableAlert, AdaptableFlashingCell, AdaptablePersistentState, AdaptableSharedEntity, AdaptableState, AdaptableTheme, CalculatedColumn, CreatedRowInfo, DashboardState, DataImportedInfo, DataSet, DeletedRowInfo, EditedRowInfo, LayoutState, RowDataChangedInfo, ReportSchedule, SystemStatusMessageInfo } from '../../types';
5
+ import { SystemThemeName } from '../../AdaptableState/ThemeState';
5
6
  import { ApiBase } from '../Implementation/ApiBase';
6
7
  import { LayoutChangedAction } from '../Events/LayoutChanged';
7
8
  export declare class EventInternalApi extends ApiBase {
@@ -10,6 +11,7 @@ export declare class EventInternalApi extends ApiBase {
10
11
  fireRowChangedEvent(rowDataChangedInfo: RowDataChangedInfo): void;
11
12
  fireDashboardChangedEvent(trigger: string, oldDashboardState: DashboardState, newDashboardState: DashboardState): void;
12
13
  fireAlertFiredEvent(alertToFire: AdaptableAlert): void;
14
+ fireThemeSelectedEvent(theme: SystemThemeName): void;
13
15
  fireThemeChangedEvent(theme: AdaptableTheme, trigger: 'ThemeSelected' | 'ThemeEdited'): void;
14
16
  fireLayoutChangedEvent(trigger: LayoutChangedAction, oldState: LayoutState, newState: LayoutState): void;
15
17
  fireScheduledReportRanEvent(reportSchedule: ReportSchedule): void;
@@ -80,8 +80,15 @@ class EventInternalApi extends ApiBase_1.ApiBase {
80
80
  };
81
81
  this.getEventApi().emit('AlertFired', alertFiredInfo);
82
82
  }
83
+ fireThemeSelectedEvent(theme) {
84
+ const themeSelectedInfo = {
85
+ ...this.getAdaptableInternalApi().buildBaseContext(),
86
+ theme,
87
+ };
88
+ this.getEventApi().emit('ThemeSelected', themeSelectedInfo);
89
+ }
83
90
  fireThemeChangedEvent(theme, trigger) {
84
- let themeChangedInfo = {
91
+ const themeChangedInfo = {
85
92
  ...this.getAdaptableInternalApi().buildBaseContext(),
86
93
  trigger: trigger,
87
94
  theme: theme,
@@ -4,10 +4,10 @@ import { BadgeStyle, BadgeStyleDefinition, CellColorRange, ColumnComparison, Num
4
4
  import { IRowNode } from 'ag-grid-enterprise';
5
5
  import { PredicateDefHandlerContext } from '../../types';
6
6
  export declare class StyledColumnInternalApi extends ApiBase {
7
- getMinValueForNumericColumn(column: AdaptableColumn): number | undefined;
8
- getMaxValueForNumericColumn(column: AdaptableColumn): number | undefined;
9
- getAvgValueForNumericColumn(column: AdaptableColumn): number | undefined;
10
- getMedianValueForNumericColumn(column: AdaptableColumn): number | undefined;
7
+ getMinValueForNumericColumn(column: AdaptableColumn | undefined): number | undefined;
8
+ getMaxValueForNumericColumn(column: AdaptableColumn | undefined): number | undefined;
9
+ getAvgValueForNumericColumn(column: AdaptableColumn | undefined): number | undefined;
10
+ getMedianValueForNumericColumn(column: AdaptableColumn | undefined): number | undefined;
11
11
  /**
12
12
  * Gets the Minimum Value to display for a Styled Column
13
13
  * @param styledColumn Styled Column to check
@@ -15,25 +15,25 @@ const isDynamicRangeEndpoint = (value) => typeof value === 'string' &&
15
15
  DYNAMIC_RANGE_ENDPOINTS.includes(value);
16
16
  class StyledColumnInternalApi extends ApiBase_1.ApiBase {
17
17
  getMinValueForNumericColumn(column) {
18
- if (column.dataType !== 'number') {
18
+ if (!column || column.dataType !== 'number') {
19
19
  return undefined;
20
20
  }
21
21
  return this._adaptable.getMinMaxCachedValueForColumn(column, 'min');
22
22
  }
23
23
  getMaxValueForNumericColumn(column) {
24
- if (column.dataType !== 'number') {
24
+ if (!column || column.dataType !== 'number') {
25
25
  return undefined;
26
26
  }
27
27
  return this._adaptable.getMinMaxCachedValueForColumn(column, 'max');
28
28
  }
29
29
  getAvgValueForNumericColumn(column) {
30
- if (column.dataType !== 'number') {
30
+ if (!column || column.dataType !== 'number') {
31
31
  return undefined;
32
32
  }
33
33
  return this._adaptable.getMinMaxCachedValueForColumn(column, 'avg');
34
34
  }
35
35
  getMedianValueForNumericColumn(column) {
36
- if (column.dataType !== 'number') {
36
+ if (!column || column.dataType !== 'number') {
37
37
  return undefined;
38
38
  }
39
39
  return this._adaptable.getMinMaxCachedValueForColumn(column, 'median');
@@ -3,5 +3,4 @@ export declare class ThemeInternalApi extends ApiBase {
3
3
  isSystemTheme(themeName: string): boolean;
4
4
  getThemeClassName(theme: string): string;
5
5
  getDOMPreferredColorScheme(): 'dark' | 'light';
6
- openInWindow(): void;
7
6
  }
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ThemeInternalApi = void 0;
4
- const windowFactory_1 = require("../../View/Components/Popups/WindowPopups/windowFactory");
5
4
  const ApiBase_1 = require("../Implementation/ApiBase");
6
5
  class ThemeInternalApi extends ApiBase_1.ApiBase {
7
6
  isSystemTheme(themeName) {
@@ -15,14 +14,5 @@ class ThemeInternalApi extends ApiBase_1.ApiBase {
15
14
  getDOMPreferredColorScheme() {
16
15
  return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
17
16
  }
18
- openInWindow() {
19
- this.getAdaptableInternalApi().showPopupWindow({
20
- id: windowFactory_1.SHOW_THEME_EDITOR,
21
- title: 'Theme',
22
- icon: 'theme',
23
- factoryId: windowFactory_1.SHOW_THEME_EDITOR,
24
- popupProps: {},
25
- });
26
- }
27
17
  }
28
18
  exports.ThemeInternalApi = ThemeInternalApi;
@@ -1,4 +1,4 @@
1
- import { AdaptableColumn, ColumnSort, ParameterizedAggFunc, PivotLayout, TableLayout } from '../../types';
1
+ import { AdaptableColumn, ColumnSort, PivotLayout, TableLayout } from '../../types';
2
2
  import { ExtendedLayout } from '../AdaptableState/Common/ExtendedLayout';
3
3
  import { LayoutState, Layout } from '../AdaptableState/LayoutState';
4
4
  /**
@@ -180,11 +180,4 @@ export interface LayoutApi {
180
180
  * @param columnId Column to add
181
181
  */
182
182
  addColumnToCurrentLayout(columnId: string): void;
183
- /**
184
- * Sets a parameterized aggregation (e.g. Weighted Average with a weight column) on a value column
185
- * in the current Layout and applies it to the grid.
186
- * @param columnId Value column being aggregated
187
- * @param parameterizedAgg Parameterized aggregation definition (must be complete)
188
- */
189
- setColumnParameterizedAggregation(columnId: string, parameterizedAgg: ParameterizedAggFunc): void;
190
183
  }
@@ -1,4 +1,4 @@
1
- import { AdaptableTheme, ThemeState } from '../AdaptableState/ThemeState';
1
+ import { AdaptableTheme, SystemThemeEntry, ThemeState } from '../AdaptableState/ThemeState';
2
2
  /**
3
3
  * Provides run-time access to the Theme Module and associated state
4
4
  */
@@ -41,21 +41,24 @@ export interface ThemeApi {
41
41
  *
42
42
  * @param systemThemes system themes to use ('light', 'dark', both, or none)
43
43
  */
44
- setSystemThemes(systemThemes: AdaptableTheme[]): void;
44
+ setSystemThemes(systemThemes: SystemThemeEntry[]): void;
45
45
  /**
46
46
  * Sets available User Themes
47
47
  *
48
48
  * @param userThemes User themes to set - each has name, description
49
+ * @deprecated Will be removed in the next major version.
49
50
  */
50
51
  setUserThemes(userThemes: AdaptableTheme[]): void;
51
52
  /**
52
53
  * Adds a User Theme to State
53
54
  * @param theme
55
+ * @deprecated Will be removed in the next major version.
54
56
  */
55
57
  addUserTheme(theme: AdaptableTheme): void;
56
58
  /**
57
59
  * Deletes a User Theme from State
58
60
  * @param theme
61
+ * @deprecated Will be removed in the next major version.
59
62
  */
60
63
  deleteUserTheme(theme: AdaptableTheme): void;
61
64
  /**
@@ -64,6 +67,7 @@ export interface ThemeApi {
64
67
  getSystemThemes(): AdaptableTheme[];
65
68
  /**
66
69
  * Retrieves User Themes in State
70
+ * @deprecated Will be removed in the next major version.
67
71
  */
68
72
  getUserThemes(): AdaptableTheme[];
69
73
  /**
@@ -1,5 +1,5 @@
1
1
  import * as Redux from 'redux';
2
- import { ThemeState, AdaptableTheme } from '../../AdaptableState/ThemeState';
2
+ import { ThemeState, AdaptableTheme, SystemThemeEntry } from '../../AdaptableState/ThemeState';
3
3
  /**
4
4
  * @ReduxAction System Themes have been set
5
5
  */
@@ -29,7 +29,7 @@ export declare const THEME_ADD = "THEME_ADD";
29
29
  */
30
30
  export declare const THEME_DELETE = "THEME_DELETE";
31
31
  export interface ThemeSetSystemThemesAction extends Redux.Action {
32
- SystemThemes: AdaptableTheme[];
32
+ SystemThemes: SystemThemeEntry[];
33
33
  }
34
34
  export interface ThemeSetUserThemesAction extends Redux.Action {
35
35
  UserThemes: AdaptableTheme[];
@@ -52,7 +52,7 @@ export interface ThemeAddUserThemeAction extends Redux.Action {
52
52
  export interface ThemeDeleteUserThemeAction extends Redux.Action {
53
53
  theme: AdaptableTheme;
54
54
  }
55
- export declare const ThemeSetSystemThemes: (SystemThemes: AdaptableTheme[]) => ThemeSetSystemThemesAction;
55
+ export declare const ThemeSetSystemThemes: (SystemThemes: SystemThemeEntry[]) => ThemeSetSystemThemesAction;
56
56
  export declare const ThemeSetUserThemes: (UserThemes: AdaptableTheme[]) => ThemeSetUserThemesAction;
57
57
  export declare const ThemeSelect: (Theme: string) => ThemeSelectAction;
58
58
  export declare const ThemeReady: (themeState: ThemeState) => ThemeReadyAction;