@adaptabletools/adaptable-cjs 23.0.0-canary.3 → 23.0.0-canary.5

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 (277) hide show
  1. package/index.css +116 -61
  2. package/package.json +9 -4
  3. package/src/AdaptableOptions/DefaultAdaptableOptions.js +0 -4
  4. package/src/AdaptableOptions/EditOptions.d.ts +2 -2
  5. package/src/AdaptableOptions/FilterOptions.d.ts +0 -7
  6. package/src/AdaptableState/Common/AdaptableForm.d.ts +18 -1
  7. package/src/AdaptableState/Common/AdaptableForm.js +34 -0
  8. package/src/AdaptableState/Common/AggregationColumns.d.ts +14 -6
  9. package/src/AdaptableState/Common/AggregationColumns.js +30 -3
  10. package/src/AdaptableState/Common/CellDataChangedInfo.d.ts +3 -2
  11. package/src/AdaptableState/Common/ColumnScope.d.ts +4 -0
  12. package/src/AdaptableState/Common/Enums.d.ts +5 -10
  13. package/src/AdaptableState/Common/Enums.js +5 -11
  14. package/src/AdaptableState/PlusMinusState.d.ts +3 -3
  15. package/src/AdaptableState/ShortcutState.d.ts +2 -6
  16. package/src/AdaptableState/StyledColumnState.d.ts +3 -5
  17. package/src/AdaptableState/ThemeState.d.ts +33 -28
  18. package/src/Api/EventApi.d.ts +14 -1
  19. package/src/Api/Events/ThemeChanged.d.ts +6 -0
  20. package/src/Api/Events/ThemeSelected.d.ts +11 -0
  21. package/src/Api/Events/ThemeSelected.js +2 -0
  22. package/src/Api/Implementation/EventApiImpl.js +4 -0
  23. package/src/Api/Implementation/LayoutApiImpl.d.ts +0 -2
  24. package/src/Api/Implementation/LayoutApiImpl.js +0 -14
  25. package/src/Api/Implementation/LayoutHelpers.d.ts +2 -0
  26. package/src/Api/Implementation/LayoutHelpers.js +31 -8
  27. package/src/Api/Implementation/ThemeApiImpl.d.ts +3 -2
  28. package/src/Api/Implementation/ThemeApiImpl.js +19 -15
  29. package/src/Api/Internal/EventInternalApi.d.ts +2 -0
  30. package/src/Api/Internal/EventInternalApi.js +8 -1
  31. package/src/Api/Internal/StyledColumnInternalApi.d.ts +4 -4
  32. package/src/Api/Internal/StyledColumnInternalApi.js +4 -4
  33. package/src/Api/Internal/ThemeInternalApi.d.ts +0 -1
  34. package/src/Api/Internal/ThemeInternalApi.js +0 -10
  35. package/src/Api/LayoutApi.d.ts +1 -8
  36. package/src/Api/ThemeApi.d.ts +6 -2
  37. package/src/Redux/ActionsReducers/ThemeRedux.d.ts +3 -3
  38. package/src/Strategy/CalculatedColumnModule.js +3 -1
  39. package/src/Strategy/FormatColumnModule.js +12 -5
  40. package/src/Strategy/LayoutModule.js +13 -8
  41. package/src/Strategy/StyledColumnModule.js +58 -30
  42. package/src/Utilities/Constants/ReduxConstants.d.ts +2 -2
  43. package/src/Utilities/Constants/ReduxConstants.js +1 -14
  44. package/src/Utilities/Helpers/FormatHelper.js +20 -1
  45. package/src/Utilities/Helpers/SparklineOptionsHelper.d.ts +7 -0
  46. package/src/Utilities/Helpers/SparklineOptionsHelper.js +68 -0
  47. package/src/Utilities/Helpers/StyledColumnGradientHelper.d.ts +23 -1
  48. package/src/Utilities/Helpers/StyledColumnGradientHelper.js +212 -1
  49. package/src/Utilities/Helpers/ThemeHelpers.d.ts +5 -0
  50. package/src/Utilities/Helpers/ThemeHelpers.js +43 -0
  51. package/src/Utilities/Helpers/percentBarPreviewHelper.d.ts +19 -0
  52. package/src/Utilities/Helpers/percentBarPreviewHelper.js +155 -0
  53. package/src/Utilities/ObjectFactory.d.ts +1 -3
  54. package/src/Utilities/ObjectFactory.js +0 -9
  55. package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +1 -0
  56. package/src/Utilities/Services/CalculatedColumnExpressionService.js +7 -0
  57. package/src/Utilities/Services/CalculatedColumnSyntheticChange.d.ts +4 -0
  58. package/src/Utilities/Services/CalculatedColumnSyntheticChange.js +120 -0
  59. package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.d.ts +1 -0
  60. package/src/Utilities/Services/ThemeService.js +1 -1
  61. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +17 -16
  62. package/src/View/Alert/Wizard/AlertButtonsEditor.js +113 -102
  63. package/src/View/Alert/Wizard/AlertMessageWizardSection.js +12 -13
  64. package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +54 -54
  65. package/src/View/Alert/Wizard/AlertRulesWizardSection.js +4 -3
  66. package/src/View/Alert/Wizard/AlertScheduledWizardSection.js +1 -1
  67. package/src/View/Alert/Wizard/AlertScopeWizardSection.js +29 -37
  68. package/src/View/Alert/Wizard/AlertTypeWizardSection.js +2 -3
  69. package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.js +9 -13
  70. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +28 -15
  71. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +7 -9
  72. package/src/View/CalculatedColumn/Wizard/CalculatedColumnTypeSection.js +2 -2
  73. package/src/View/CellSummary/CellSummaryViewPanel.js +1 -1
  74. package/src/View/Charting/ChartingWizard/AgChargingWizard/AgChargingWizard.js +3 -10
  75. package/src/View/Charting/ChartingWizard/AgChargingWizard/PreviewChartSection.js +1 -1
  76. package/src/View/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +35 -52
  77. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/ExternalChartingWizard.js +4 -31
  78. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/PreviewChartSection.d.ts +5 -0
  79. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/PreviewChartSection.js +26 -0
  80. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.d.ts +1 -0
  81. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +9 -6
  82. package/src/View/Comments/CommentsEditor.js +1 -1
  83. package/src/View/Components/ColumnFilter/ColumnFilterWindow.js +1 -1
  84. package/src/View/Components/ModuleProfile.js +1 -1
  85. package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +0 -1
  86. package/src/View/Components/Popups/WindowPopups/windowFactory.js +1 -2
  87. package/src/View/Components/RangesComponent.d.ts +7 -2
  88. package/src/View/Components/RangesComponent.js +94 -22
  89. package/src/View/Components/Selectors/ColumnSelector.js +5 -0
  90. package/src/View/Components/StyleComponent.d.ts +1 -0
  91. package/src/View/Components/StyleComponent.js +1 -1
  92. package/src/View/Components/ValueSelector/index.js +70 -57
  93. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +8 -13
  94. package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +8 -8
  95. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -1
  96. package/src/View/DataImport/DataImportWizard/sections/ColumnsSection.js +11 -12
  97. package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadSection.js +5 -4
  98. package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadTextSection.js +2 -1
  99. package/src/View/DataImport/DataImportWizard/sections/ValidationSection.js +4 -15
  100. package/src/View/Export/Wizard/ReportColumnsWizardSection.js +24 -27
  101. package/src/View/Export/Wizard/ReportNameWizardSection.js +8 -11
  102. package/src/View/Export/Wizard/ReportRowsWizardSection.js +19 -22
  103. package/src/View/Export/Wizard/ScheduledReportSettings.d.ts +2 -0
  104. package/src/View/Export/Wizard/ScheduledReportSettings.js +12 -12
  105. package/src/View/Export/Wizard/ScheduledReportWizard.js +2 -3
  106. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +8 -6
  107. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +22 -21
  108. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +20 -11
  109. package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.js +19 -3
  110. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +4 -4
  111. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +7 -0
  112. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +120 -13
  113. package/src/View/FormatColumn/Wizard/FormatColumnPreview.d.ts +15 -0
  114. package/src/View/FormatColumn/Wizard/FormatColumnPreview.js +78 -0
  115. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +4 -0
  116. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +34 -0
  117. package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +11 -6
  118. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +1 -1
  119. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +3 -1
  120. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +64 -13
  121. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +3 -1
  122. package/src/View/FreeTextColumn/Utilities/getFreeTextColumnSettingsTags.d.ts +2 -0
  123. package/src/View/FreeTextColumn/Utilities/getFreeTextColumnSettingsTags.js +19 -0
  124. package/src/View/FreeTextColumn/Wizard/FreeTextColumnDefinitionWizardSection.d.ts +10 -0
  125. package/src/View/FreeTextColumn/Wizard/FreeTextColumnDefinitionWizardSection.js +60 -0
  126. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +2 -3
  127. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +35 -70
  128. package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +14 -10
  129. package/src/View/Layout/LayoutViewPanel.js +23 -21
  130. package/src/View/Layout/TransposedPopup.js +2 -2
  131. package/src/View/Layout/Wizard/LayoutWizard.js +3 -3
  132. package/src/View/Layout/Wizard/sections/AggregationsSection.d.ts +2 -3
  133. package/src/View/Layout/Wizard/sections/AggregationsSection.js +116 -26
  134. package/src/View/Layout/Wizard/sections/ColumnsSection.js +79 -79
  135. package/src/View/Layout/Wizard/sections/FilterSection.js +31 -32
  136. package/src/View/Layout/Wizard/sections/GridFilterSection.js +10 -10
  137. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.d.ts +1 -2
  138. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +101 -51
  139. package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +9 -8
  140. package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.js +4 -4
  141. package/src/View/Layout/Wizard/sections/RowGroupingSection.js +36 -33
  142. package/src/View/Layout/Wizard/sections/RowSelectionSection.js +2 -2
  143. package/src/View/Layout/Wizard/sections/RowSummarySection.js +95 -73
  144. package/src/View/Layout/Wizard/sections/SettingsSection.js +3 -4
  145. package/src/View/Layout/Wizard/sections/SortSection.js +2 -2
  146. package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +1 -1
  147. package/src/View/NamedQuery/Wizard/NamedQuerySettingsWizardSection.js +7 -12
  148. package/src/View/NamedQuery/Wizard/NamedQueryWizard.js +1 -3
  149. package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.d.ts +4 -0
  150. package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.js +45 -12
  151. package/src/View/PlusMinus/Wizard/PlusMinusScopeWizardSection.js +10 -17
  152. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.d.ts +2 -6
  153. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +5 -21
  154. package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +15 -21
  155. package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +2 -2
  156. package/src/View/Shortcut/Wizard/ShortcutScopeWizardSection.js +10 -17
  157. package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +16 -5
  158. package/src/View/Shortcut/Wizard/ShortcutWizard.js +2 -2
  159. package/src/View/Shortcut/shortcutOperations.d.ts +3 -0
  160. package/src/View/Shortcut/shortcutOperations.js +32 -1
  161. package/src/View/SpecialColumnSettingsWizardStep.js +7 -6
  162. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +5 -0
  163. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +26 -16
  164. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.d.ts +10 -2
  165. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +100 -15
  166. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.d.ts +14 -0
  167. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.js +48 -25
  168. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.d.ts +2 -3
  169. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +109 -33
  170. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +20 -12
  171. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.d.ts +5 -0
  172. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +124 -23
  173. package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.d.ts +1 -0
  174. package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +35 -11
  175. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.d.ts +5 -0
  176. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +88 -11
  177. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.d.ts +5 -0
  178. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +125 -35
  179. package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.d.ts +1 -0
  180. package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +55 -74
  181. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.d.ts +5 -0
  182. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.js +20 -0
  183. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.js +6 -12
  184. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarColumnComparisonPreview.js +5 -5
  185. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarRangesPreview.js +2 -1
  186. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.d.ts +5 -4
  187. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.js +11 -13
  188. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.d.ts +5 -0
  189. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.js +20 -0
  190. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.d.ts +3 -0
  191. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +32 -3
  192. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.d.ts +9 -0
  193. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +64 -0
  194. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.d.ts +10 -0
  195. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.js +35 -0
  196. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.d.ts +10 -0
  197. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.js +96 -0
  198. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.d.ts +8 -0
  199. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.js +57 -0
  200. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.d.ts +8 -0
  201. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +58 -0
  202. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.d.ts +18 -0
  203. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.js +66 -0
  204. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.d.ts +10 -0
  205. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.js +133 -0
  206. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardRangesSection.js +12 -5
  207. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.d.ts +1 -5
  208. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +53 -29
  209. package/src/View/SystemStatus/Utilities/getStatusItemStyle.js +1 -1
  210. package/src/View/Theme/ThemePopup.d.ts +2 -14
  211. package/src/View/Theme/ThemePopup.js +1 -36
  212. package/src/View/UIHelper.js +1 -1
  213. package/src/View/Wizard/OnePageAdaptableWizard.js +6 -20
  214. package/src/View/renderWithAdaptableContext.js +1 -2
  215. package/src/agGrid/AdaptableAgGrid.d.ts +1 -1
  216. package/src/agGrid/AdaptableAgGrid.js +36 -41
  217. package/src/agGrid/AgGridAdapter.d.ts +1 -1
  218. package/src/agGrid/AgGridAdapter.js +27 -17
  219. package/src/agGrid/AgGridColumnAdapter.js +10 -19
  220. package/src/agGrid/AgGridMenuAdapter.d.ts +0 -1
  221. package/src/agGrid/AgGridMenuAdapter.js +20 -37
  222. package/src/agGrid/buildValueAggregationMenuItem.d.ts +19 -0
  223. package/src/agGrid/buildValueAggregationMenuItem.js +114 -0
  224. package/src/agGrid/cellRenderers/IconRenderer.d.ts +6 -0
  225. package/src/agGrid/cellRenderers/IconRenderer.js +46 -17
  226. package/src/agGrid/createAgGridIcon.d.ts +10 -0
  227. package/src/agGrid/createAgGridIcon.js +19 -0
  228. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +10 -5
  229. package/src/components/Combobox/VirtualizedList.js +5 -5
  230. package/src/components/Combobox/comboboxUtils.d.ts +4 -1
  231. package/src/components/Combobox/comboboxUtils.js +2 -0
  232. package/src/components/Combobox/index.d.ts +1 -0
  233. package/src/components/Combobox/index.js +36 -16
  234. package/src/components/DragAndDropContext/UnusedPanel.js +1 -1
  235. package/src/components/ExpressionEditor/BaseEditorInput.js +1 -1
  236. package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +1 -1
  237. package/src/components/Input/NumberInput.js +1 -1
  238. package/src/components/Panel/index.js +1 -1
  239. package/src/components/SimpleButton/index.js +4 -4
  240. package/src/components/Toggle/Toggle.js +1 -1
  241. package/src/components/Toggle/ToggleGroup.js +1 -1
  242. package/src/components/Tree/TreeDropdown/index.js +1 -5
  243. package/src/env.js +2 -2
  244. package/src/layout-manager/src/LayoutManagerModel.d.ts +5 -1
  245. package/src/layout-manager/src/index.js +2 -9
  246. package/src/metamodel/adaptable.metamodel.d.ts +39 -46
  247. package/src/metamodel/adaptable.metamodel.js +1 -1
  248. package/src/types.d.ts +5 -5
  249. package/themes/dark.css +1 -68
  250. package/themes/light.css +1 -5
  251. package/tsconfig.cjs.tsbuildinfo +1 -1
  252. package/src/AdaptableState/Common/FilterActionOnDataChange.d.ts +0 -17
  253. package/src/AdaptableState/Common/FilterActionOnDataChange.js +0 -5
  254. package/src/Aggregation/ParameterizedAggregationRegistry.d.ts +0 -35
  255. package/src/Aggregation/ParameterizedAggregationRegistry.js +0 -74
  256. package/src/Aggregation/definitions/weightedAverageAggregationDefinition.d.ts +0 -3
  257. package/src/Aggregation/definitions/weightedAverageAggregationDefinition.js +0 -58
  258. package/src/Aggregation/parameterizedAggregationColumnMenu.d.ts +0 -8
  259. package/src/Aggregation/parameterizedAggregationColumnMenu.js +0 -143
  260. package/src/Aggregation/parameterizedAggregationHeader.d.ts +0 -13
  261. package/src/Aggregation/parameterizedAggregationHeader.js +0 -65
  262. package/src/Aggregation/parameterizedAggregationHelpers.d.ts +0 -23
  263. package/src/Aggregation/parameterizedAggregationHelpers.js +0 -121
  264. package/src/Aggregation/parameterizedAggregationWizardHelpers.d.ts +0 -9
  265. package/src/Aggregation/parameterizedAggregationWizardHelpers.js +0 -74
  266. package/src/Aggregation/validateParameterizedAggregations.d.ts +0 -4
  267. package/src/Aggregation/validateParameterizedAggregations.js +0 -25
  268. package/src/View/AdaptableComputedCSSVarsContext.d.ts +0 -12
  269. package/src/View/AdaptableComputedCSSVarsContext.js +0 -36
  270. package/src/View/Layout/Wizard/sections/ParameterizedAggFuncPicker.d.ts +0 -12
  271. package/src/View/Layout/Wizard/sections/ParameterizedAggFuncPicker.js +0 -48
  272. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgeSettings.d.ts +0 -5
  273. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgeSettings.js +0 -32
  274. package/src/View/Theme/VariantSelector.d.ts +0 -8
  275. package/src/View/Theme/VariantSelector.js +0 -25
  276. package/src/components/Select/CSSNumericVariableWatch.d.ts +0 -11
  277. package/src/components/Select/CSSNumericVariableWatch.js +0 -51
@@ -33,9 +33,10 @@ export interface CellDataChangedInfo<TData = any> {
33
33
  */
34
34
  rowData?: TData;
35
35
  /**
36
- * What triggered the change - user, background change or a reverted change?
36
+ * What triggered the change - user, background change, a reverted change, or a
37
+ * derived update on a Calculated Column whose source value changed?
37
38
  */
38
- trigger?: 'edit' | 'tick' | 'undo' | 'aggChange';
39
+ trigger?: 'edit' | 'tick' | 'undo' | 'aggChange' | 'calculatedColumnChange';
39
40
  /**
40
41
  * Whether the change was prevented by a validation rule
41
42
  */
@@ -1,4 +1,8 @@
1
1
  export type ScopeDataType = 'text' | 'number' | 'boolean' | 'date' | 'textArray' | 'numberArray';
2
+ /**
3
+ * Scope data type for modules that only apply to numeric columns (e.g. Shortcut, Plus/Minus).
4
+ */
5
+ export type NumberScopeDataType = 'number';
2
6
  export type ScopeAll = {
3
7
  All: true;
4
8
  };
@@ -38,21 +38,16 @@ export declare enum StatusColour {
38
38
  }
39
39
  export declare enum SummaryOperation {
40
40
  Sum = "Sum",
41
+ Max = "Max",
42
+ Min = "Min",
43
+ Count = "Count",
41
44
  Average = "Average",
45
+ Weighted_Average = "Weighted Average",
42
46
  Median = "Median",
43
47
  Mode = "Mode",
44
48
  Distinct = "Distinct",
45
- Max = "Max",
46
- Min = "Min",
47
- Count = "Count",
48
49
  Std_Deviation = "Std Deviation",
49
- Only = "Only",
50
- Weighted_Average = "Weighted Avg"
51
- }
52
- export declare enum FilterOnDataChangeOptions {
53
- Always = "Always",
54
- Never = "Never",
55
- Throttle = "Throttle"
50
+ Only = "Only"
56
51
  }
57
52
  export declare enum ChangeDirection {
58
53
  Up = "Up",
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  // General Enums
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.ChangeDirection = exports.FilterOnDataChangeOptions = exports.SummaryOperation = exports.StatusColour = exports.FontSize = exports.FontStyle = exports.FontWeight = exports.SelectionMode = exports.SortOrder = exports.ScheduleType = exports.MathOperation = void 0;
4
+ exports.ChangeDirection = exports.SummaryOperation = exports.StatusColour = exports.FontSize = exports.FontStyle = exports.FontWeight = exports.SelectionMode = exports.SortOrder = exports.ScheduleType = exports.MathOperation = void 0;
5
5
  var MathOperation;
6
6
  (function (MathOperation) {
7
7
  MathOperation["Add"] = "Add";
@@ -53,23 +53,17 @@ var StatusColour;
53
53
  var SummaryOperation;
54
54
  (function (SummaryOperation) {
55
55
  SummaryOperation["Sum"] = "Sum";
56
+ SummaryOperation["Max"] = "Max";
57
+ SummaryOperation["Min"] = "Min";
58
+ SummaryOperation["Count"] = "Count";
56
59
  SummaryOperation["Average"] = "Average";
60
+ SummaryOperation["Weighted_Average"] = "Weighted Average";
57
61
  SummaryOperation["Median"] = "Median";
58
62
  SummaryOperation["Mode"] = "Mode";
59
63
  SummaryOperation["Distinct"] = "Distinct";
60
- SummaryOperation["Max"] = "Max";
61
- SummaryOperation["Min"] = "Min";
62
- SummaryOperation["Count"] = "Count";
63
64
  SummaryOperation["Std_Deviation"] = "Std Deviation";
64
65
  SummaryOperation["Only"] = "Only";
65
- SummaryOperation["Weighted_Average"] = "Weighted Avg";
66
66
  })(SummaryOperation || (exports.SummaryOperation = SummaryOperation = {}));
67
- var FilterOnDataChangeOptions;
68
- (function (FilterOnDataChangeOptions) {
69
- FilterOnDataChangeOptions["Always"] = "Always";
70
- FilterOnDataChangeOptions["Never"] = "Never";
71
- FilterOnDataChangeOptions["Throttle"] = "Throttle";
72
- })(FilterOnDataChangeOptions || (exports.FilterOnDataChangeOptions = FilterOnDataChangeOptions = {}));
73
67
  var ChangeDirection;
74
68
  (function (ChangeDirection) {
75
69
  ChangeDirection["Up"] = "Up";
@@ -1,5 +1,5 @@
1
1
  import { BaseState } from './BaseState';
2
- import { ColumnScope } from './Common/ColumnScope';
2
+ import { ColumnScope, NumberScopeDataType } from './Common/ColumnScope';
3
3
  import { AdaptableBooleanQuery } from './Common/AdaptableQuery';
4
4
  import { SuspendableObject } from '../types';
5
5
  /**
@@ -20,9 +20,9 @@ export interface PlusMinusNudge extends SuspendableObject {
20
20
  */
21
21
  Name: string;
22
22
  /**
23
- * Where Rule is applied
23
+ * Numeric columns where the nudge is applied
24
24
  */
25
- Scope: ColumnScope;
25
+ Scope: ColumnScope<NumberScopeDataType>;
26
26
  /**
27
27
  * Amount by which to update cell when Rule is applied
28
28
  */
@@ -1,5 +1,5 @@
1
1
  import { BaseState } from './BaseState';
2
- import { ColumnScope } from './Common/ColumnScope';
2
+ import { ColumnScope, NumberScopeDataType } from './Common/ColumnScope';
3
3
  import { SuspendableObject } from '../types';
4
4
  /**
5
5
  * Adaptable State Section for Shortcut Module
@@ -10,10 +10,6 @@ export interface ShortcutState extends BaseState {
10
10
  */
11
11
  Shortcuts?: Shortcut[];
12
12
  }
13
- /**
14
- * Shortcut scope data type.
15
- */
16
- export type ShortcutScopeDataType = 'number';
17
13
  /**
18
14
  * Used to define a Shortcut as used in Shortcut State
19
15
  */
@@ -25,7 +21,7 @@ export interface Shortcut extends SuspendableObject {
25
21
  /**
26
22
  * Numeric Columns where Shortcut is applied
27
23
  */
28
- Scope: ColumnScope<ShortcutScopeDataType>;
24
+ Scope: ColumnScope<NumberScopeDataType>;
29
25
  /**
30
26
  * Key which triggers the Shortcut when pressed
31
27
  */
@@ -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;
@@ -263,6 +268,9 @@ const tableLayoutToTableLayoutModel = (tableLayout) => {
263
268
  if (tableLayout.Metadata) {
264
269
  result.Ignore_Metadata = tableLayout.Metadata;
265
270
  }
271
+ if (tableLayout.OpenCharts) {
272
+ result.Ignore_OpenCharts = tableLayout.OpenCharts;
273
+ }
266
274
  if (tableLayout.RowSummaries != null) {
267
275
  result.Ignore_RowSummaries = tableLayout.RowSummaries;
268
276
  }
@@ -343,11 +351,17 @@ const pivotLayoutToPivotLayoutModel = (pivotLayout) => {
343
351
  if (pivotLayout.Metadata) {
344
352
  result.Ignore_Metadata = pivotLayout.Metadata;
345
353
  }
354
+ if (pivotLayout.OpenCharts) {
355
+ result.Ignore_OpenCharts = pivotLayout.OpenCharts;
356
+ }
346
357
  return result;
347
358
  };
348
359
  exports.pivotLayoutToPivotLayoutModel = pivotLayoutToPivotLayoutModel;
349
360
  function toAggFunc(aggFunc) {
350
- 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 };
351
365
  }
352
366
  const tableLayoutModelToTableLayout = (layoutModel) => {
353
367
  const tableLayout = {
@@ -393,6 +407,9 @@ const tableLayoutModelToTableLayout = (layoutModel) => {
393
407
  if (layoutModel.Ignore_Metadata) {
394
408
  tableLayout.Metadata = layoutModel.Ignore_Metadata;
395
409
  }
410
+ if (layoutModel.Ignore_OpenCharts) {
411
+ tableLayout.OpenCharts = layoutModel.Ignore_OpenCharts;
412
+ }
396
413
  // if (layoutModel.RowGroupDisplayType) {
397
414
  tableLayout.RowGroupDisplayType = layoutModel.RowGroupDisplayType ?? 'single';
398
415
  // }
@@ -450,11 +467,14 @@ const tableLayoutModelToTableLayout = (layoutModel) => {
450
467
  };
451
468
  exports.tableLayoutModelToTableLayout = tableLayoutModelToTableLayout;
452
469
  function toAggregationColumnValue(columnAggregationModel) {
453
- const parameterizedValue = (0, ParameterizedAggregationRegistry_1.aggregationValueFromColumnAggregationModel)(columnAggregationModel);
454
- if (parameterizedValue !== undefined) {
455
- return parameterizedValue;
456
- }
457
- 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;
458
478
  }
459
479
  const pivotLayoutModelToPivotLayout = (layoutModel) => {
460
480
  const pivotLayout = {
@@ -499,6 +519,9 @@ const pivotLayoutModelToPivotLayout = (layoutModel) => {
499
519
  if (layoutModel.Ignore_Metadata) {
500
520
  pivotLayout.Metadata = layoutModel.Ignore_Metadata;
501
521
  }
522
+ if (layoutModel.Ignore_OpenCharts) {
523
+ pivotLayout.OpenCharts = layoutModel.Ignore_OpenCharts;
524
+ }
502
525
  if (layoutModel.PivotGroupedColumns) {
503
526
  pivotLayout.PivotGroupedColumns = layoutModel.PivotGroupedColumns;
504
527
  }
@@ -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,