@adaptabletools/adaptable 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 +27 -2
  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 +1 -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 +17 -7
  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 +14 -7
  34. package/src/Strategy/LayoutModule.js +13 -8
  35. package/src/Strategy/StyledColumnModule.js +64 -36
  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 +65 -0
  41. package/src/Utilities/Helpers/StyledColumnGradientHelper.d.ts +23 -1
  42. package/src/Utilities/Helpers/StyledColumnGradientHelper.js +204 -0
  43. package/src/Utilities/Helpers/ThemeHelpers.d.ts +5 -0
  44. package/src/Utilities/Helpers/ThemeHelpers.js +38 -0
  45. package/src/Utilities/Helpers/percentBarPreviewHelper.d.ts +19 -0
  46. package/src/Utilities/Helpers/percentBarPreviewHelper.js +143 -0
  47. package/src/Utilities/ObjectFactory.d.ts +1 -3
  48. package/src/Utilities/ObjectFactory.js +0 -8
  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 +114 -103
  52. package/src/View/Alert/Wizard/AlertMessageWizardSection.js +13 -14
  53. package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +55 -55
  54. package/src/View/Alert/Wizard/AlertRulesWizardSection.js +3 -2
  55. package/src/View/Alert/Wizard/AlertScheduledWizardSection.js +2 -2
  56. package/src/View/Alert/Wizard/AlertScopeWizardSection.js +31 -39
  57. package/src/View/Alert/Wizard/AlertTypeWizardSection.js +3 -4
  58. package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.js +9 -13
  59. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +30 -17
  60. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +7 -9
  61. package/src/View/CalculatedColumn/Wizard/CalculatedColumnTypeSection.js +3 -3
  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 +21 -0
  69. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.d.ts +1 -0
  70. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +10 -7
  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 +0 -1
  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 +6 -4
  87. package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadTextSection.js +3 -2
  88. package/src/View/DataImport/DataImportWizard/sections/ValidationSection.js +5 -15
  89. package/src/View/Export/Wizard/ReportColumnsWizardSection.js +24 -26
  90. package/src/View/Export/Wizard/ReportNameWizardSection.js +10 -13
  91. package/src/View/Export/Wizard/ReportRowsWizardSection.js +20 -22
  92. package/src/View/Export/Wizard/ScheduledReportSettings.d.ts +2 -0
  93. package/src/View/Export/Wizard/ScheduledReportSettings.js +13 -13
  94. package/src/View/Export/Wizard/ScheduledReportWizard.js +4 -5
  95. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +8 -6
  96. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +21 -22
  97. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +20 -11
  98. package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.js +21 -5
  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 +117 -12
  102. package/src/View/FormatColumn/Wizard/FormatColumnPreview.d.ts +15 -0
  103. package/src/View/FormatColumn/Wizard/FormatColumnPreview.js +66 -0
  104. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +4 -0
  105. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +30 -0
  106. package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +13 -8
  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 +62 -13
  110. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +5 -3
  111. package/src/View/FreeTextColumn/Utilities/getFreeTextColumnSettingsTags.d.ts +2 -0
  112. package/src/View/FreeTextColumn/Utilities/getFreeTextColumnSettingsTags.js +15 -0
  113. package/src/View/FreeTextColumn/Wizard/FreeTextColumnDefinitionWizardSection.d.ts +10 -0
  114. package/src/View/FreeTextColumn/Wizard/FreeTextColumnDefinitionWizardSection.js +53 -0
  115. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +2 -3
  116. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +33 -68
  117. package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +15 -11
  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 +115 -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 +11 -11
  125. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.d.ts +1 -2
  126. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +101 -52
  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 +4 -5
  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 +9 -14
  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 +43 -13
  139. package/src/View/PlusMinus/Wizard/PlusMinusScopeWizardSection.js +11 -18
  140. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.d.ts +2 -6
  141. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +6 -22
  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 +11 -18
  145. package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +17 -6
  146. package/src/View/Shortcut/Wizard/ShortcutWizard.js +3 -3
  147. package/src/View/Shortcut/shortcutOperations.d.ts +3 -0
  148. package/src/View/Shortcut/shortcutOperations.js +28 -0
  149. package/src/View/SpecialColumnSettingsWizardStep.js +9 -8
  150. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +5 -0
  151. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +24 -15
  152. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.d.ts +10 -2
  153. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +96 -16
  154. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.d.ts +14 -0
  155. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.js +45 -24
  156. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.d.ts +2 -3
  157. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +108 -33
  158. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +21 -13
  159. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.d.ts +5 -0
  160. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +121 -23
  161. package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.d.ts +1 -0
  162. package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +34 -11
  163. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.d.ts +5 -0
  164. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +86 -12
  165. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.d.ts +5 -0
  166. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +121 -34
  167. package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.d.ts +1 -0
  168. package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +55 -75
  169. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.d.ts +5 -0
  170. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.js +16 -0
  171. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.js +7 -13
  172. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarColumnComparisonPreview.js +5 -5
  173. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarRangesPreview.js +4 -3
  174. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.d.ts +5 -4
  175. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.js +12 -14
  176. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.d.ts +5 -0
  177. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.js +16 -0
  178. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.d.ts +3 -0
  179. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +31 -3
  180. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.d.ts +9 -0
  181. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +58 -0
  182. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.d.ts +10 -0
  183. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.js +30 -0
  184. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.d.ts +10 -0
  185. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.js +91 -0
  186. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.d.ts +8 -0
  187. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.js +52 -0
  188. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.d.ts +8 -0
  189. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +53 -0
  190. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.d.ts +18 -0
  191. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.js +58 -0
  192. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.d.ts +10 -0
  193. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.js +126 -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 +52 -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 +7 -21
  202. package/src/agGrid/AdaptableAgGrid.d.ts +1 -0
  203. package/src/agGrid/AdaptableAgGrid.js +36 -26
  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 +111 -0
  211. package/src/agGrid/cellRenderers/IconRenderer.d.ts +6 -0
  212. package/src/agGrid/cellRenderers/IconRenderer.js +43 -15
  213. package/src/agGrid/createAgGridIcon.d.ts +10 -0
  214. package/src/agGrid/createAgGridIcon.js +16 -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.esm.tsbuildinfo +1 -1
  231. package/src/Aggregation/ParameterizedAggregationRegistry.d.ts +0 -35
  232. package/src/Aggregation/ParameterizedAggregationRegistry.js +0 -63
  233. package/src/Aggregation/definitions/weightedAverageAggregationDefinition.d.ts +0 -3
  234. package/src/Aggregation/definitions/weightedAverageAggregationDefinition.js +0 -55
  235. package/src/Aggregation/parameterizedAggregationColumnMenu.d.ts +0 -8
  236. package/src/Aggregation/parameterizedAggregationColumnMenu.js +0 -137
  237. package/src/Aggregation/parameterizedAggregationHeader.d.ts +0 -13
  238. package/src/Aggregation/parameterizedAggregationHeader.js +0 -60
  239. package/src/Aggregation/parameterizedAggregationHelpers.d.ts +0 -23
  240. package/src/Aggregation/parameterizedAggregationHelpers.js +0 -111
  241. package/src/Aggregation/parameterizedAggregationWizardHelpers.d.ts +0 -9
  242. package/src/Aggregation/parameterizedAggregationWizardHelpers.js +0 -66
  243. package/src/Aggregation/validateParameterizedAggregations.d.ts +0 -4
  244. package/src/Aggregation/validateParameterizedAggregations.js +0 -20
  245. package/src/View/Layout/Wizard/sections/ParameterizedAggFuncPicker.d.ts +0 -12
  246. package/src/View/Layout/Wizard/sections/ParameterizedAggFuncPicker.js +0 -43
  247. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgeSettings.d.ts +0 -5
  248. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgeSettings.js +0 -28
  249. package/src/View/Theme/VariantSelector.d.ts +0 -8
  250. package/src/View/Theme/VariantSelector.js +0 -20
@@ -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 @@
1
+ export {};
@@ -1,6 +1,7 @@
1
1
  import { ApiBase } from './ApiBase';
2
2
  import Emitter from '../../Utilities/Emitter';
3
3
  import { EventInternalApi } from '../Internal/EventInternalApi';
4
+ import { logDeprecation } from '../../Utilities/logDeprecation';
4
5
  export class EventApiImpl extends ApiBase {
5
6
  emitter;
6
7
  internalApi;
@@ -15,6 +16,9 @@ export class EventApiImpl extends ApiBase {
15
16
  this.emitter.destroy();
16
17
  }
17
18
  on = (eventName, callback) => {
19
+ if (eventName === 'ThemeChanged') {
20
+ logDeprecation(this._adaptable.logger, 'EventApi', 'ThemeChanged', undefined, "The 'ThemeChanged' event is deprecated. Subscribe to 'ThemeSelected' instead.");
21
+ }
18
22
  let result;
19
23
  if (eventName === 'AdaptableReady') {
20
24
  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
  }
@@ -6,8 +6,6 @@ import { createUuid } from '../../AdaptableState/Uuid';
6
6
  import { PopupShowPrompt } from '../../Redux/ActionsReducers/PopupRedux';
7
7
  import { LayoutInternalApi } from '../Internal/LayoutInternalApi';
8
8
  import { isPivotLayout, normalizeLayout } from './LayoutHelpers';
9
- import { getParameterizedAggregationDefinition } from '../../Aggregation/ParameterizedAggregationRegistry';
10
- import { upsertColumnAggregationInLayout } from '../../Aggregation/parameterizedAggregationHelpers';
11
9
  import { ERROR_LAYOUT } from '../../Utilities/Constants/GeneralConstants';
12
10
  export class LayoutApiImpl extends ApiBase {
13
11
  internalApi;
@@ -456,18 +454,6 @@ export class LayoutApiImpl extends ApiBase {
456
454
  }
457
455
  }
458
456
  }
459
- setColumnParameterizedAggregation(columnId, parameterizedAgg) {
460
- const definition = getParameterizedAggregationDefinition(parameterizedAgg.type);
461
- if (!definition || !definition.isComplete(parameterizedAgg)) {
462
- this.logWarn(`Cannot apply parameterized aggregation '${parameterizedAgg.type}' — required arguments are missing.`);
463
- return;
464
- }
465
- this.updateCurrentLayout((layout) => {
466
- upsertColumnAggregationInLayout(layout, columnId, parameterizedAgg);
467
- return layout;
468
- });
469
- this.getAgGridApi()?.setColumnAggFunc(columnId, definition.agGridAggFuncName);
470
- }
471
457
  addColumnToCurrentLayout(columnId) {
472
458
  const column = this.getColumnApi().getColumnWithColumnId(columnId);
473
459
  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"];
@@ -2,7 +2,7 @@ import isEqual from '../../Utilities/utils/isEqual';
2
2
  import { isPivotLayoutModel } from '../../layout-manager/src/isPivotLayoutModel';
3
3
  import { normalizeTableLayoutModel, normalizePivotLayoutModel, } from '../../layout-manager/src/normalizeLayoutModel';
4
4
  import { simplifyTableLayoutModel, simplifyPivotLayoutModel, } from '../../layout-manager/src/simplifyLayoutModel';
5
- import { aggregationValueFromColumnAggregationModel, aggregationValueToColumnAggregationModel, } from '../../Aggregation/ParameterizedAggregationRegistry';
5
+ import { isWeightedAverageAggregation, WEIGHTED_AVERAGE_AGG_FN_NAME, isWeightedAverageAggFuncName, } from '../../AdaptableState/Common/AggregationColumns';
6
6
  import { removeAdaptableObjectPrimitivesInlineDeep } from '../../Utilities/Helpers/AdaptableHelper';
7
7
  export function columnWidthsToColumnSizing(columnWidths) {
8
8
  if (!columnWidths) {
@@ -83,6 +83,10 @@ export const normalizePivotLayout = (pivotLayout) => {
83
83
  return pivotLayout;
84
84
  };
85
85
  const errorOnceMessages = new Map();
86
+ /** Clears module-scoped dedupe state when a new Adaptable instance starts (e.g. Playwright retries). */
87
+ export const resetLayoutHelperErrorOnceMessages = () => {
88
+ errorOnceMessages.clear();
89
+ };
86
90
  const errorOnce = (message) => {
87
91
  if (errorOnceMessages.get(message)) {
88
92
  return;
@@ -336,7 +340,10 @@ export const pivotLayoutToPivotLayoutModel = (pivotLayout) => {
336
340
  return result;
337
341
  };
338
342
  function toAggFunc(aggFunc) {
339
- return aggregationValueToColumnAggregationModel(aggFunc);
343
+ if (isWeightedAverageAggregation(aggFunc)) {
344
+ return { aggFunc: WEIGHTED_AVERAGE_AGG_FN_NAME, weightedColumnId: aggFunc.weightedColumnId };
345
+ }
346
+ return { aggFunc };
340
347
  }
341
348
  export const tableLayoutModelToTableLayout = (layoutModel) => {
342
349
  const tableLayout = {
@@ -441,11 +448,14 @@ export const tableLayoutModelToTableLayout = (layoutModel) => {
441
448
  return tableLayout;
442
449
  };
443
450
  function toAggregationColumnValue(columnAggregationModel) {
444
- const parameterizedValue = aggregationValueFromColumnAggregationModel(columnAggregationModel);
445
- if (parameterizedValue !== undefined) {
446
- return parameterizedValue;
447
- }
448
- return columnAggregationModel.aggFunc;
451
+ return columnAggregationModel &&
452
+ typeof columnAggregationModel.aggFunc === 'string' &&
453
+ isWeightedAverageAggFuncName(columnAggregationModel.aggFunc)
454
+ ? {
455
+ type: 'weightedAverage',
456
+ weightedColumnId: columnAggregationModel.weightedColumnId,
457
+ }
458
+ : columnAggregationModel.aggFunc;
449
459
  }
450
460
  export const pivotLayoutModelToPivotLayout = (layoutModel) => {
451
461
  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
  }
@@ -1,10 +1,10 @@
1
1
  import * as ThemeRedux from '../../Redux/ActionsReducers/ThemeRedux';
2
2
  import * as ModuleConstants from '../../Utilities/Constants/ModuleConstants';
3
3
  import { ApiBase } from './ApiBase';
4
- import { StaticThemes } from '../../themes';
5
4
  import { ThemeInternalApi } from '../Internal/ThemeInternalApi';
6
5
  import AdaptableHelper from '../../Utilities/Helpers/AdaptableHelper';
7
6
  import { logDeprecation } from '../../Utilities/logDeprecation';
7
+ import { systemThemeEntryToAdaptableTheme } from '../../Utilities/Helpers/ThemeHelpers';
8
8
  export class ThemeApiImpl extends ApiBase {
9
9
  internalApi;
10
10
  constructor(_adaptable) {
@@ -34,32 +34,30 @@ export class ThemeApiImpl extends ApiBase {
34
34
  this.dispatchAction(ThemeRedux.ThemeSetSystemThemes(systemThemes));
35
35
  }
36
36
  setUserThemes(userThemes) {
37
+ this.warnUserThemesDeprecated();
37
38
  this.dispatchAction(ThemeRedux.ThemeSetUserThemes(userThemes));
38
39
  }
39
40
  getSystemThemes() {
40
41
  const themes = this.getAdaptableState().Theme.SystemThemes ?? [];
41
- return themes.map((theme) => {
42
- if (typeof theme === 'string') {
43
- const description = StaticThemes.find((staticTheme) => staticTheme.Name === theme)?.Description ?? theme;
44
- return {
45
- Name: theme,
46
- Description: description,
47
- };
48
- }
49
- return theme;
50
- });
42
+ return themes.map((theme) => systemThemeEntryToAdaptableTheme(theme, this._adaptable.logger));
51
43
  }
52
44
  applyCurrentTheme() {
53
- const currentTheme = this.getThemes().filter((theme) => typeof theme === 'string'
54
- ? theme === this.getCurrentTheme()
55
- : theme.Name === this.getCurrentTheme())[0];
45
+ const currentThemeName = this.getCurrentTheme();
46
+ const currentTheme = this.getThemes().find((theme) => theme.Name === currentThemeName);
56
47
  if (!currentTheme) {
57
48
  return;
58
49
  }
59
50
  this._adaptable.applyAdaptableTheme(currentTheme);
60
- this.getEventApi().internalApi.fireThemeChangedEvent(currentTheme, 'ThemeSelected');
51
+ if (this.internalApi.isSystemTheme(currentThemeName)) {
52
+ this.getEventApi().internalApi.fireThemeSelectedEvent(currentThemeName);
53
+ this.getEventApi().internalApi.fireThemeChangedEvent(currentTheme, 'ThemeSelected');
54
+ }
55
+ else {
56
+ this.getEventApi().internalApi.fireThemeChangedEvent(currentTheme, 'ThemeSelected');
57
+ }
61
58
  }
62
59
  getUserThemes() {
60
+ this.warnUserThemesDeprecated();
63
61
  return this.getAdaptableState().Theme.UserThemes ?? [];
64
62
  }
65
63
  getThemes() {
@@ -76,6 +74,7 @@ export class ThemeApiImpl extends ApiBase {
76
74
  return this._adaptable.agGridThemeAdapter.getAgGridCurrentThemeClassNames();
77
75
  }
78
76
  editTheme(theme) {
77
+ this.warnUserThemesDeprecated();
79
78
  this.dispatchAction(ThemeRedux.ThemeEdit(theme));
80
79
  this.getEventApi().internalApi.fireThemeChangedEvent(theme, 'ThemeEdited');
81
80
  const currentTheme = this.getCurrentTheme();
@@ -84,10 +83,15 @@ export class ThemeApiImpl extends ApiBase {
84
83
  }
85
84
  }
86
85
  addUserTheme(theme) {
86
+ this.warnUserThemesDeprecated();
87
87
  AdaptableHelper.addAdaptableObjectPrimitives(theme);
88
88
  this.dispatchAction(ThemeRedux.ThemeAdd(theme));
89
89
  }
90
90
  deleteUserTheme(theme) {
91
+ this.warnUserThemesDeprecated();
91
92
  this.dispatchAction(ThemeRedux.ThemeDelete(theme));
92
93
  }
94
+ warnUserThemesDeprecated() {
95
+ 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.');
96
+ }
93
97
  }
@@ -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;
@@ -76,8 +76,15 @@ export class EventInternalApi extends ApiBase {
76
76
  };
77
77
  this.getEventApi().emit('AlertFired', alertFiredInfo);
78
78
  }
79
+ fireThemeSelectedEvent(theme) {
80
+ const themeSelectedInfo = {
81
+ ...this.getAdaptableInternalApi().buildBaseContext(),
82
+ theme,
83
+ };
84
+ this.getEventApi().emit('ThemeSelected', themeSelectedInfo);
85
+ }
79
86
  fireThemeChangedEvent(theme, trigger) {
80
- let themeChangedInfo = {
87
+ const themeChangedInfo = {
81
88
  ...this.getAdaptableInternalApi().buildBaseContext(),
82
89
  trigger: trigger,
83
90
  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
@@ -11,25 +11,25 @@ const isDynamicRangeEndpoint = (value) => typeof value === 'string' &&
11
11
  DYNAMIC_RANGE_ENDPOINTS.includes(value);
12
12
  export class StyledColumnInternalApi extends ApiBase {
13
13
  getMinValueForNumericColumn(column) {
14
- if (column.dataType !== 'number') {
14
+ if (!column || column.dataType !== 'number') {
15
15
  return undefined;
16
16
  }
17
17
  return this._adaptable.getMinMaxCachedValueForColumn(column, 'min');
18
18
  }
19
19
  getMaxValueForNumericColumn(column) {
20
- if (column.dataType !== 'number') {
20
+ if (!column || column.dataType !== 'number') {
21
21
  return undefined;
22
22
  }
23
23
  return this._adaptable.getMinMaxCachedValueForColumn(column, 'max');
24
24
  }
25
25
  getAvgValueForNumericColumn(column) {
26
- if (column.dataType !== 'number') {
26
+ if (!column || column.dataType !== 'number') {
27
27
  return undefined;
28
28
  }
29
29
  return this._adaptable.getMinMaxCachedValueForColumn(column, 'avg');
30
30
  }
31
31
  getMedianValueForNumericColumn(column) {
32
- if (column.dataType !== 'number') {
32
+ if (!column || column.dataType !== 'number') {
33
33
  return undefined;
34
34
  }
35
35
  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,4 +1,3 @@
1
- import { SHOW_THEME_EDITOR } from '../../View/Components/Popups/WindowPopups/windowFactory';
2
1
  import { ApiBase } from '../Implementation/ApiBase';
3
2
  export class ThemeInternalApi extends ApiBase {
4
3
  isSystemTheme(themeName) {
@@ -12,13 +11,4 @@ export class ThemeInternalApi extends ApiBase {
12
11
  getDOMPreferredColorScheme() {
13
12
  return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
14
13
  }
15
- openInWindow() {
16
- this.getAdaptableInternalApi().showPopupWindow({
17
- id: SHOW_THEME_EDITOR,
18
- title: 'Theme',
19
- icon: 'theme',
20
- factoryId: SHOW_THEME_EDITOR,
21
- popupProps: {},
22
- });
23
- }
24
14
  }
@@ -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;