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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (250) hide show
  1. package/index.css +117 -62
  2. package/package.json +9 -4
  3. package/src/AdaptableOptions/EditOptions.d.ts +2 -2
  4. package/src/AdaptableState/Common/AggregationColumns.d.ts +14 -6
  5. package/src/AdaptableState/Common/AggregationColumns.js +30 -3
  6. package/src/AdaptableState/Common/ColumnScope.d.ts +4 -0
  7. package/src/AdaptableState/Common/Enums.d.ts +5 -5
  8. package/src/AdaptableState/Common/Enums.js +4 -4
  9. package/src/AdaptableState/PlusMinusState.d.ts +3 -3
  10. package/src/AdaptableState/ShortcutState.d.ts +2 -6
  11. package/src/AdaptableState/StyledColumnState.d.ts +3 -5
  12. package/src/AdaptableState/ThemeState.d.ts +33 -28
  13. package/src/Api/EventApi.d.ts +14 -1
  14. package/src/Api/Events/ThemeChanged.d.ts +6 -0
  15. package/src/Api/Events/ThemeSelected.d.ts +11 -0
  16. package/src/Api/Events/ThemeSelected.js +2 -0
  17. package/src/Api/Implementation/EventApiImpl.js +4 -0
  18. package/src/Api/Implementation/LayoutApiImpl.d.ts +0 -2
  19. package/src/Api/Implementation/LayoutApiImpl.js +0 -14
  20. package/src/Api/Implementation/LayoutHelpers.d.ts +2 -0
  21. package/src/Api/Implementation/LayoutHelpers.js +19 -8
  22. package/src/Api/Implementation/ThemeApiImpl.d.ts +3 -2
  23. package/src/Api/Implementation/ThemeApiImpl.js +19 -15
  24. package/src/Api/Internal/EventInternalApi.d.ts +2 -0
  25. package/src/Api/Internal/EventInternalApi.js +8 -1
  26. package/src/Api/Internal/StyledColumnInternalApi.d.ts +4 -4
  27. package/src/Api/Internal/StyledColumnInternalApi.js +4 -4
  28. package/src/Api/Internal/ThemeInternalApi.d.ts +0 -1
  29. package/src/Api/Internal/ThemeInternalApi.js +0 -10
  30. package/src/Api/LayoutApi.d.ts +1 -8
  31. package/src/Api/ThemeApi.d.ts +6 -2
  32. package/src/Redux/ActionsReducers/ThemeRedux.d.ts +3 -3
  33. package/src/Strategy/FormatColumnModule.js +12 -5
  34. package/src/Strategy/LayoutModule.js +13 -8
  35. package/src/Strategy/StyledColumnModule.js +58 -30
  36. package/src/Utilities/Constants/ReduxConstants.d.ts +2 -2
  37. package/src/Utilities/Constants/ReduxConstants.js +1 -14
  38. package/src/Utilities/Helpers/FormatHelper.js +20 -1
  39. package/src/Utilities/Helpers/SparklineOptionsHelper.d.ts +7 -0
  40. package/src/Utilities/Helpers/SparklineOptionsHelper.js +68 -0
  41. package/src/Utilities/Helpers/StyledColumnGradientHelper.d.ts +23 -1
  42. package/src/Utilities/Helpers/StyledColumnGradientHelper.js +212 -1
  43. package/src/Utilities/Helpers/ThemeHelpers.d.ts +5 -0
  44. package/src/Utilities/Helpers/ThemeHelpers.js +43 -0
  45. package/src/Utilities/Helpers/percentBarPreviewHelper.d.ts +19 -0
  46. package/src/Utilities/Helpers/percentBarPreviewHelper.js +155 -0
  47. package/src/Utilities/ObjectFactory.d.ts +1 -3
  48. package/src/Utilities/ObjectFactory.js +0 -9
  49. package/src/Utilities/Services/ThemeService.js +1 -1
  50. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +17 -16
  51. package/src/View/Alert/Wizard/AlertButtonsEditor.js +113 -102
  52. package/src/View/Alert/Wizard/AlertMessageWizardSection.js +12 -13
  53. package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +54 -54
  54. package/src/View/Alert/Wizard/AlertRulesWizardSection.js +4 -3
  55. package/src/View/Alert/Wizard/AlertScheduledWizardSection.js +1 -1
  56. package/src/View/Alert/Wizard/AlertScopeWizardSection.js +29 -37
  57. package/src/View/Alert/Wizard/AlertTypeWizardSection.js +2 -3
  58. package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.js +9 -13
  59. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +28 -15
  60. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +7 -9
  61. package/src/View/CalculatedColumn/Wizard/CalculatedColumnTypeSection.js +2 -2
  62. package/src/View/CellSummary/CellSummaryViewPanel.js +1 -1
  63. package/src/View/Charting/ChartingWizard/AgChargingWizard/AgChargingWizard.js +3 -10
  64. package/src/View/Charting/ChartingWizard/AgChargingWizard/PreviewChartSection.js +1 -1
  65. package/src/View/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +32 -41
  66. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/ExternalChartingWizard.js +4 -31
  67. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/PreviewChartSection.d.ts +5 -0
  68. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/PreviewChartSection.js +26 -0
  69. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.d.ts +1 -0
  70. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +9 -6
  71. package/src/View/Comments/CommentsEditor.js +1 -1
  72. package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +0 -1
  73. package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.js +3 -1
  74. package/src/View/Components/ModuleProfile.js +1 -1
  75. package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +0 -1
  76. package/src/View/Components/Popups/WindowPopups/windowFactory.js +1 -2
  77. package/src/View/Components/RangesComponent.d.ts +7 -2
  78. package/src/View/Components/RangesComponent.js +94 -22
  79. package/src/View/Components/StyleComponent.d.ts +1 -0
  80. package/src/View/Components/StyleComponent.js +1 -1
  81. package/src/View/Components/ValueSelector/index.js +70 -57
  82. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +8 -13
  83. package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +8 -8
  84. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -1
  85. package/src/View/DataImport/DataImportWizard/sections/ColumnsSection.js +11 -12
  86. package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadSection.js +5 -4
  87. package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadTextSection.js +2 -1
  88. package/src/View/DataImport/DataImportWizard/sections/ValidationSection.js +4 -15
  89. package/src/View/Export/Wizard/ReportColumnsWizardSection.js +24 -27
  90. package/src/View/Export/Wizard/ReportNameWizardSection.js +8 -11
  91. package/src/View/Export/Wizard/ReportRowsWizardSection.js +19 -22
  92. package/src/View/Export/Wizard/ScheduledReportSettings.d.ts +2 -0
  93. package/src/View/Export/Wizard/ScheduledReportSettings.js +12 -12
  94. package/src/View/Export/Wizard/ScheduledReportWizard.js +2 -3
  95. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +8 -6
  96. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +19 -20
  97. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +20 -11
  98. package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.js +19 -3
  99. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +4 -4
  100. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +7 -0
  101. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +120 -13
  102. package/src/View/FormatColumn/Wizard/FormatColumnPreview.d.ts +15 -0
  103. package/src/View/FormatColumn/Wizard/FormatColumnPreview.js +78 -0
  104. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +4 -0
  105. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +34 -0
  106. package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +11 -6
  107. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +1 -1
  108. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +3 -1
  109. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +64 -13
  110. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +3 -1
  111. package/src/View/FreeTextColumn/Utilities/getFreeTextColumnSettingsTags.d.ts +2 -0
  112. package/src/View/FreeTextColumn/Utilities/getFreeTextColumnSettingsTags.js +19 -0
  113. package/src/View/FreeTextColumn/Wizard/FreeTextColumnDefinitionWizardSection.d.ts +10 -0
  114. package/src/View/FreeTextColumn/Wizard/FreeTextColumnDefinitionWizardSection.js +60 -0
  115. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +2 -3
  116. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +35 -70
  117. package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +14 -10
  118. package/src/View/Layout/TransposedPopup.js +2 -2
  119. package/src/View/Layout/Wizard/LayoutWizard.js +3 -3
  120. package/src/View/Layout/Wizard/sections/AggregationsSection.d.ts +2 -3
  121. package/src/View/Layout/Wizard/sections/AggregationsSection.js +116 -26
  122. package/src/View/Layout/Wizard/sections/ColumnsSection.js +79 -79
  123. package/src/View/Layout/Wizard/sections/FilterSection.js +31 -32
  124. package/src/View/Layout/Wizard/sections/GridFilterSection.js +10 -10
  125. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.d.ts +1 -2
  126. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +101 -51
  127. package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +9 -8
  128. package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.js +4 -4
  129. package/src/View/Layout/Wizard/sections/RowGroupingSection.js +36 -33
  130. package/src/View/Layout/Wizard/sections/RowSelectionSection.js +2 -2
  131. package/src/View/Layout/Wizard/sections/RowSummarySection.js +95 -73
  132. package/src/View/Layout/Wizard/sections/SettingsSection.js +3 -4
  133. package/src/View/Layout/Wizard/sections/SortSection.js +2 -2
  134. package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +1 -1
  135. package/src/View/NamedQuery/Wizard/NamedQuerySettingsWizardSection.js +7 -12
  136. package/src/View/NamedQuery/Wizard/NamedQueryWizard.js +1 -3
  137. package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.d.ts +4 -0
  138. package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.js +45 -12
  139. package/src/View/PlusMinus/Wizard/PlusMinusScopeWizardSection.js +10 -17
  140. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.d.ts +2 -6
  141. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +5 -21
  142. package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +15 -21
  143. package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +2 -2
  144. package/src/View/Shortcut/Wizard/ShortcutScopeWizardSection.js +10 -17
  145. package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +16 -5
  146. package/src/View/Shortcut/Wizard/ShortcutWizard.js +2 -2
  147. package/src/View/Shortcut/shortcutOperations.d.ts +3 -0
  148. package/src/View/Shortcut/shortcutOperations.js +32 -1
  149. package/src/View/SpecialColumnSettingsWizardStep.js +7 -6
  150. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +5 -0
  151. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +26 -16
  152. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.d.ts +10 -2
  153. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +100 -15
  154. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.d.ts +14 -0
  155. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.js +48 -25
  156. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.d.ts +2 -3
  157. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +109 -33
  158. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +20 -12
  159. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.d.ts +5 -0
  160. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +124 -23
  161. package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.d.ts +1 -0
  162. package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +35 -11
  163. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.d.ts +5 -0
  164. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +88 -11
  165. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.d.ts +5 -0
  166. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +125 -35
  167. package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.d.ts +1 -0
  168. package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +55 -74
  169. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.d.ts +5 -0
  170. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.js +20 -0
  171. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.js +6 -12
  172. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarColumnComparisonPreview.js +5 -5
  173. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarRangesPreview.js +2 -1
  174. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.d.ts +5 -4
  175. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.js +11 -13
  176. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.d.ts +5 -0
  177. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.js +20 -0
  178. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.d.ts +3 -0
  179. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +32 -3
  180. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.d.ts +9 -0
  181. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +64 -0
  182. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.d.ts +10 -0
  183. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.js +35 -0
  184. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.d.ts +10 -0
  185. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.js +96 -0
  186. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.d.ts +8 -0
  187. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.js +57 -0
  188. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.d.ts +8 -0
  189. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +58 -0
  190. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.d.ts +18 -0
  191. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.js +66 -0
  192. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.d.ts +10 -0
  193. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.js +133 -0
  194. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardRangesSection.js +12 -5
  195. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.d.ts +1 -5
  196. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +53 -29
  197. package/src/View/SystemStatus/Utilities/getStatusItemStyle.js +1 -1
  198. package/src/View/Theme/ThemePopup.d.ts +2 -14
  199. package/src/View/Theme/ThemePopup.js +1 -36
  200. package/src/View/UIHelper.js +1 -1
  201. package/src/View/Wizard/OnePageAdaptableWizard.js +6 -20
  202. package/src/agGrid/AdaptableAgGrid.d.ts +1 -0
  203. package/src/agGrid/AdaptableAgGrid.js +34 -24
  204. package/src/agGrid/AgGridAdapter.d.ts +1 -1
  205. package/src/agGrid/AgGridAdapter.js +27 -17
  206. package/src/agGrid/AgGridColumnAdapter.js +9 -15
  207. package/src/agGrid/AgGridMenuAdapter.d.ts +0 -1
  208. package/src/agGrid/AgGridMenuAdapter.js +20 -37
  209. package/src/agGrid/buildValueAggregationMenuItem.d.ts +19 -0
  210. package/src/agGrid/buildValueAggregationMenuItem.js +114 -0
  211. package/src/agGrid/cellRenderers/IconRenderer.d.ts +6 -0
  212. package/src/agGrid/cellRenderers/IconRenderer.js +46 -17
  213. package/src/agGrid/createAgGridIcon.d.ts +10 -0
  214. package/src/agGrid/createAgGridIcon.js +19 -0
  215. package/src/components/DragAndDropContext/UnusedPanel.js +1 -1
  216. package/src/components/ExpressionEditor/BaseEditorInput.js +1 -1
  217. package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +1 -1
  218. package/src/components/Input/NumberInput.js +1 -1
  219. package/src/components/Panel/index.js +1 -1
  220. package/src/components/SimpleButton/index.js +4 -4
  221. package/src/components/Toggle/Toggle.js +1 -1
  222. package/src/components/Toggle/ToggleGroup.js +1 -1
  223. package/src/env.js +2 -2
  224. package/src/layout-manager/src/index.js +2 -9
  225. package/src/metamodel/adaptable.metamodel.d.ts +39 -29
  226. package/src/metamodel/adaptable.metamodel.js +1 -1
  227. package/src/types.d.ts +5 -4
  228. package/themes/dark.css +1 -68
  229. package/themes/light.css +1 -5
  230. package/tsconfig.cjs.tsbuildinfo +1 -1
  231. package/src/Aggregation/ParameterizedAggregationRegistry.d.ts +0 -35
  232. package/src/Aggregation/ParameterizedAggregationRegistry.js +0 -74
  233. package/src/Aggregation/definitions/weightedAverageAggregationDefinition.d.ts +0 -3
  234. package/src/Aggregation/definitions/weightedAverageAggregationDefinition.js +0 -58
  235. package/src/Aggregation/parameterizedAggregationColumnMenu.d.ts +0 -8
  236. package/src/Aggregation/parameterizedAggregationColumnMenu.js +0 -143
  237. package/src/Aggregation/parameterizedAggregationHeader.d.ts +0 -13
  238. package/src/Aggregation/parameterizedAggregationHeader.js +0 -65
  239. package/src/Aggregation/parameterizedAggregationHelpers.d.ts +0 -23
  240. package/src/Aggregation/parameterizedAggregationHelpers.js +0 -121
  241. package/src/Aggregation/parameterizedAggregationWizardHelpers.d.ts +0 -9
  242. package/src/Aggregation/parameterizedAggregationWizardHelpers.js +0 -74
  243. package/src/Aggregation/validateParameterizedAggregations.d.ts +0 -4
  244. package/src/Aggregation/validateParameterizedAggregations.js +0 -25
  245. package/src/View/Layout/Wizard/sections/ParameterizedAggFuncPicker.d.ts +0 -12
  246. package/src/View/Layout/Wizard/sections/ParameterizedAggFuncPicker.js +0 -48
  247. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgeSettings.d.ts +0 -5
  248. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgeSettings.js +0 -32
  249. package/src/View/Theme/VariantSelector.d.ts +0 -8
  250. package/src/View/Theme/VariantSelector.js +0 -25
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StyledColumnWizardStyleSection = exports.renderFormatColumnStyleWizardSummary = exports.renderStyledColumnStyleSummary = exports.StyledColumnWizardRangesSection = exports.renderStyledColumnRangesSummary = void 0;
3
+ exports.StyledColumnWizardStyleSection = exports.renderFormatColumnStyleWizardSummary = exports.renderStyledColumnStyleSummary = exports.getStyledColumnPercentBarStyleViewValues = exports.StyledColumnWizardRangesSection = exports.renderStyledColumnRangesSummary = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const CheckBox_1 = require("../../../../components/CheckBox");
@@ -16,6 +16,7 @@ const Radio_1 = tslib_1.__importStar(require("../../../../components/Radio"));
16
16
  const Toggle_1 = require("../../../../components/Toggle");
17
17
  const StyledColumnSliceStyleEditors_1 = require("../StyledColumnSliceStyleEditors");
18
18
  const Card_1 = require("../../../../components/Card");
19
+ const StyledColumnPercentBarPreview_1 = require("./Components/StyledColumnPercentBarPreview");
19
20
  // Re-export the Ranges section + summary for legacy import paths.
20
21
  var StyledColumnWizardRangesSection_1 = require("./StyledColumnWizardRangesSection");
21
22
  Object.defineProperty(exports, "renderStyledColumnRangesSummary", { enumerable: true, get: function () { return StyledColumnWizardRangesSection_1.renderStyledColumnRangesSummary; } });
@@ -24,47 +25,70 @@ Object.defineProperty(exports, "StyledColumnWizardRangesSection", { enumerable:
24
25
  // Summary helpers
25
26
  // ---------------------------------------------------------------------------
26
27
  const formatOriginLabel = (origin) => {
27
- if (origin == undefined)
28
+ if (origin == undefined) {
28
29
  return 'Auto';
29
- if (typeof origin === 'number')
30
+ }
31
+ if (typeof origin === 'number') {
30
32
  return `Custom (${origin})`;
33
+ }
31
34
  return origin;
32
35
  };
33
- const formatAlignmentLabel = (alignment) => {
34
- if (alignment == undefined)
35
- return 'Inherit';
36
- return alignment;
36
+ const formatPercentBarCellTextSummary = (cellText) => cellText
37
+ ?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value'))
38
+ .join(' + ') ?? '';
39
+ const formatPercentBarToolTipSummary = (toolTipText) => toolTipText
40
+ ?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value'))
41
+ .join(' + ') ?? '';
42
+ const buildStyledColumnPercentBarStyleSummaryStrings = (pb, options) => {
43
+ const items = [`Origin: ${formatOriginLabel(pb.Origin)}`];
44
+ if (pb.CellText?.length) {
45
+ items.push(`Cell Text: ${formatPercentBarCellTextSummary(pb.CellText)}`);
46
+ items.push(`Cell Text Position: ${pb.CellTextPosition ?? 'Below'}`);
47
+ if (pb.CellTextAlignment != null) {
48
+ items.push(`Cell Text Alignment: ${pb.CellTextAlignment}`);
49
+ }
50
+ }
51
+ else if (options.includeEmptyCellText) {
52
+ items.push('Cell Text: None');
53
+ }
54
+ if (pb.ToolTipText?.length) {
55
+ items.push(`Tooltip: ${formatPercentBarToolTipSummary(pb.ToolTipText)}`);
56
+ }
57
+ else if (options.includeEmptyTooltip) {
58
+ items.push('Tooltip: No Tooltip');
59
+ }
60
+ if (pb.BackColor) {
61
+ items.push(`Back Colour: ${pb.BackColor}`);
62
+ }
63
+ (0, StyledColumnSliceStyleEditors_1.getCellFontStyleSummaryItems)(pb.Font).forEach(({ label, value }) => {
64
+ items.push(`${label}: ${value}`);
65
+ });
66
+ return items;
37
67
  };
38
- const formatCellText = (cellText) => {
39
- if (!cellText || cellText.length === 0)
40
- return '—';
41
- return cellText.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value')).join(' + ');
68
+ const getStyledColumnPercentBarStyleViewValues = (data) => {
69
+ const pb = data.PercentBarStyle;
70
+ if (!pb) {
71
+ return [];
72
+ }
73
+ return buildStyledColumnPercentBarStyleSummaryStrings(pb, {
74
+ includeEmptyCellText: false,
75
+ includeEmptyTooltip: false,
76
+ });
42
77
  };
78
+ exports.getStyledColumnPercentBarStyleViewValues = getStyledColumnPercentBarStyleViewValues;
43
79
  /**
44
80
  * Compact summary of the *non-range* style properties of a Percent Bar.
45
- * (Gradient uses `renderStyledColumnGradientStyleSummary`.)
46
- *
47
- * Used by:
48
- * - the wizard's "Style" step `renderSummary`
49
- * - the Styled Column module's `toView` (read-only summary popup)
50
81
  */
51
82
  const renderStyledColumnStyleSummary = (data, _api) => {
52
83
  const pb = data.PercentBarStyle;
53
84
  if (!pb) {
54
85
  return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Styling Defined" });
55
86
  }
56
- const parts = [
57
- (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-2", children: ["Origin: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: formatOriginLabel(pb.Origin) })] }, "origin"),
58
- ];
59
- if (pb.CellText && pb.CellText.length > 0) {
60
- parts.push((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-2", children: ["Text: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: formatCellText(pb.CellText) }), " (", pb.CellTextPosition ?? 'Below', ")"] }, "text"));
61
- parts.push((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-2", children: ["Align: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: formatAlignmentLabel(pb.CellTextAlignment) })] }, "align"));
62
- }
63
- const fontTags = (0, StyledColumnSliceStyleEditors_1.renderFontStyleSummaryTags)(pb.Font);
64
- if (fontTags) {
65
- parts.push((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-2", children: ["Font: ", fontTags] }, "font"));
66
- }
67
- return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "center", className: "twa:flex-wrap", children: parts }));
87
+ const items = buildStyledColumnPercentBarStyleSummaryStrings(pb, {
88
+ includeEmptyCellText: true,
89
+ includeEmptyTooltip: true,
90
+ });
91
+ return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "center", className: "twa:flex-wrap twa:gap-2", children: items.map((item) => ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: item }, item))) }));
68
92
  };
69
93
  exports.renderStyledColumnStyleSummary = renderStyledColumnStyleSummary;
70
94
  // Legacy wrapper kept for any external consumers; safe no-op here.
@@ -178,6 +202,6 @@ const StyledColumnWizardStyleSection = (props) => {
178
202
  delete cleaned.Font;
179
203
  props.onChange({ ...data, PercentBarStyle: cleaned });
180
204
  }
181
- } }) })] })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Cell Style" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Configure Tooltip and Background Colour" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsxs)(FormLayout_1.default, { sizes: [...STYLE_FORM_SIZES], children: [(0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { label: "Tooltip Display:", children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: disabled, checked: pb.ToolTipText?.includes('CellValue'), onChange: (checked) => onToolTipTextChanged('CellValue', checked), children: "Cell Value" }), ' ', (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: disabled, className: "twa:ml-3", checked: pb.ToolTipText?.includes('PercentageValue'), onChange: (checked) => onToolTipTextChanged('PercentageValue', checked), children: "Percent Value" })] }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: `Back ${api.internalApi.getCorrectEnglishVariant('Colour')}:`, children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: disabled, checked: !!pb.BackColor, onChange: onUseBackColorChanged, className: "twa:mr-2" }), pb.BackColor != undefined && ((0, jsx_runtime_1.jsx)(ColorPicker_1.ColorPicker, { disabled: disabled, api: api, value: pb.BackColor, onChange: onBackColorChange }))] }) })] }) })] })] }));
205
+ } }) })] })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Cell Style" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Configure Tooltip and Background Colour" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsxs)(FormLayout_1.default, { sizes: [...STYLE_FORM_SIZES], children: [(0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { label: "Tooltip Display:", children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: disabled, checked: pb.ToolTipText?.includes('CellValue'), onChange: (checked) => onToolTipTextChanged('CellValue', checked), children: "Cell Value" }), ' ', (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: disabled, className: "twa:ml-3", checked: pb.ToolTipText?.includes('PercentageValue'), onChange: (checked) => onToolTipTextChanged('PercentageValue', checked), children: "Percent Value" })] }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: `Back ${api.internalApi.getCorrectEnglishVariant('Colour')}:`, children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: disabled, checked: !!pb.BackColor, onChange: onUseBackColorChanged, className: "twa:mr-2" }), pb.BackColor != undefined && ((0, jsx_runtime_1.jsx)(ColorPicker_1.ColorPicker, { disabled: disabled, api: api, value: pb.BackColor, onChange: onBackColorChange }))] }) })] }) })] }), (0, jsx_runtime_1.jsx)(StyledColumnPercentBarPreview_1.StyledColumnPercentBarPreviewCard, { data: data })] }));
182
206
  };
183
207
  exports.StyledColumnWizardStyleSection = StyledColumnWizardStyleSection;
@@ -7,7 +7,7 @@ const getStatusItemStyle = (systemStatusMessageInfo) => {
7
7
  const background = UIHelper_1.default.getColorByMessageType(systemStatusMessageInfo?.statusType ?? 'Success');
8
8
  const color = systemStatusMessageInfo
9
9
  ? UIHelper_1.default.getButtonTextColourForMessageType(systemStatusMessageInfo.statusType)
10
- : 'var(--ab-color-text-on-primary)';
10
+ : 'var(--ab-color-primary-foreground)';
11
11
  return {
12
12
  background,
13
13
  color,
@@ -1,19 +1,7 @@
1
1
  import * as React from 'react';
2
- import * as ThemeRedux from '../../Redux/ActionsReducers/ThemeRedux';
3
2
  import { ModuleViewPopupProps } from '../Components/SharedProps/ModuleViewPopupProps';
4
- import { AdaptableTheme } from '../../AdaptableState/ThemeState';
5
- interface ThemePopupProps extends ModuleViewPopupProps<ThemePopupComponent> {
6
- CurrentTheme: string;
7
- UserThemes: AdaptableTheme[];
8
- SelectTheme: (newTheme: string) => ThemeRedux.ThemeSelectAction;
9
- hideShowInWindow?: boolean;
10
- }
11
- declare class ThemePopupComponent extends React.Component<ThemePopupProps, {}> {
3
+ declare class ThemePopupComponent extends React.Component<ModuleViewPopupProps<ThemePopupComponent>, {}> {
12
4
  render(): React.JSX.Element;
13
- onChangeTheme(value: string): void;
14
- handleCreateNewTheme: (variant: "dark" | "light") => void;
15
5
  }
16
- export declare let ThemePopup: import("react-redux").ConnectedComponent<typeof ThemePopupComponent, {
17
- [x: string]: any;
18
- }>;
6
+ export declare let ThemePopup: typeof ThemePopupComponent;
19
7
  export {};
@@ -4,48 +4,13 @@ exports.ThemePopup = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const React = tslib_1.__importStar(require("react"));
7
- const react_redux_1 = require("react-redux");
8
- const ThemeRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/ThemeRedux"));
9
7
  const PopupPanel_1 = require("../Components/Popups/AdaptablePopup/PopupPanel");
10
8
  const FormLayout_1 = tslib_1.__importStar(require("../../components/FormLayout"));
11
- const ObjectFactory_1 = tslib_1.__importDefault(require("../../Utilities/ObjectFactory"));
12
- const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
13
9
  const ThemeSelector_1 = require("./ThemeSelector");
14
10
  const Flex_1 = require("../../components/Flex");
15
11
  class ThemePopupComponent extends React.Component {
16
12
  render() {
17
- const isCustomTheme = this.props.api.themeApi
18
- .getUserThemes()
19
- .some((theme) => theme.Name === this.props.CurrentTheme);
20
- const disabled = this.props.accessLevel === GeneralConstants_1.ACCESS_LEVEL_READ_ONLY;
21
13
  return ((0, jsx_runtime_1.jsx)(PopupPanel_1.PopupPanel, { headerText: this.props.moduleInfo.FriendlyName, glyphicon: this.props.moduleInfo.Glyph, infoLink: this.props.moduleInfo.HelpPage, infoLinkDisabled: !this.props.api.internalApi.isDocumentationLinksDisplayed(), children: (0, jsx_runtime_1.jsx)(FormLayout_1.default, { children: (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Select Current Theme:", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[150px]", children: (0, jsx_runtime_1.jsx)(ThemeSelector_1.ThemeSelector, {}) }) }) }) }));
22
14
  }
23
- onChangeTheme(value) {
24
- this.props.SelectTheme(value);
25
- }
26
- handleCreateNewTheme = (variant) => {
27
- let nthItem = this.props.UserThemes.length + 1;
28
- let name = 'Custom-Theme-' + nthItem;
29
- // make sure it is unique
30
- while (this.props.UserThemes.some((theme) => theme.Name === name)) {
31
- nthItem++;
32
- name = 'Custom-Theme-' + nthItem;
33
- }
34
- const newTheme = ObjectFactory_1.default.CreateEmptyTheme(name);
35
- newTheme.Variant = variant;
36
- this.props.api.themeApi.addUserTheme(newTheme);
37
- this.props.api.themeApi.loadTheme(newTheme.Name);
38
- };
39
- }
40
- function mapStateToProps(state, ownProps) {
41
- return {
42
- CurrentTheme: state.Theme.CurrentTheme,
43
- UserThemes: state.Theme.UserThemes,
44
- };
45
- }
46
- function mapDispatchToProps(dispatch) {
47
- return {
48
- SelectTheme: (newTheme) => dispatch(ThemeRedux.ThemeSelect(newTheme)),
49
- };
50
15
  }
51
- exports.ThemePopup = (0, react_redux_1.connect)(mapStateToProps, mapDispatchToProps)(ThemePopupComponent);
16
+ exports.ThemePopup = ThemePopupComponent;
@@ -350,7 +350,7 @@ function getButtonColourForAdaptableAlerts(adaptableAlerts, messageTypeColor) {
350
350
  }
351
351
  function getButtonTextColourForArrayandMessageType(adaptableAlerts, messageType) {
352
352
  if (ArrayExtensions_1.default.IsNullOrEmpty(adaptableAlerts)) {
353
- return 'text-on-primary';
353
+ return 'primary-foreground';
354
354
  }
355
355
  return this.getButtonTextColourForMessageType(messageType);
356
356
  }
@@ -8,9 +8,9 @@ const React = tslib_1.__importStar(require("react"));
8
8
  const react_1 = require("react");
9
9
  const react_redux_1 = require("react-redux");
10
10
  const NamedQueryRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/NamedQueryRedux"));
11
- const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
12
11
  const AdaptableContext_1 = require("../AdaptableContext");
13
- const Tabs_1 = require("../../components/Tabs");
12
+ const Card_1 = require("../../components/Card");
13
+ const ButtonEdit_1 = require("../Components/Buttons/ButtonEdit");
14
14
  const NamedQueryContext_1 = require("../../components/ExpressionEditor/NamedQueryContext");
15
15
  const OnePageWizards_1 = require("./OnePageWizards");
16
16
  const kebabCase_1 = tslib_1.__importDefault(require("../../Utilities/utils/kebabCase"));
@@ -83,20 +83,9 @@ const OnePageAdaptableWizard = (props) => {
83
83
  };
84
84
  exports.OnePageAdaptableWizard = OnePageAdaptableWizard;
85
85
  const OnePageWizardSummary = () => {
86
- const { sections, data, api, moduleInfo } = useOnePageAdaptableWizardContext();
87
- const { setCurrentSection } = (0, OnePageWizards_1.useOnePageWizardContext)();
88
- const [namedQuery] = (0, react_1.useState)(false);
89
- const renderEdit = (index) => ((0, jsx_runtime_1.jsx)(SimpleButton_1.default, { className: "twa:px-1 twa:inline-block twa:text-2 twa:underline", variant: "text", onClick: () => {
90
- setCurrentSection(index);
91
- }, children: "edit" }));
92
- const extraContext = {
93
- data,
94
- api,
95
- namedQuery,
96
- moduleInfo: moduleInfo,
97
- sections,
98
- };
99
- return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "ab-OnePageWizardSummary twa:flex twa:flex-col twa:gap-2", children: sections
86
+ const { data, api } = useOnePageAdaptableWizardContext();
87
+ const { sections: visibleSections, setCurrentSection } = (0, OnePageWizards_1.useOnePageWizardContext)();
88
+ return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "ab-OnePageWizardSummary twa:flex twa:flex-col twa:gap-3", children: visibleSections
100
89
  .map((section, index) => {
101
90
  if (section === '-') {
102
91
  return null;
@@ -104,10 +93,7 @@ const OnePageWizardSummary = () => {
104
93
  if (!section.renderSummary) {
105
94
  return null;
106
95
  }
107
- if (section.isVisible && !section.isVisible(data, api, extraContext)) {
108
- return null;
109
- }
110
- return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { keyboardNavigation: false, children: [(0, jsx_runtime_1.jsxs)(Tabs_1.Tabs.Tab, { children: [section.title, " ", renderEdit(index)] }), (0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Content, { children: section.renderSummary(data, api) })] }, index) }));
96
+ return ((0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { className: "twa:w-full", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium twa:flex-1", children: section.title }), (0, jsx_runtime_1.jsx)(ButtonEdit_1.ButtonEdit, { onClick: () => setCurrentSection(index) })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: section.renderSummary?.(data, api) })] }, `${section.title}-${index}`));
111
97
  })
112
98
  .filter(Boolean) }));
113
99
  };
@@ -360,6 +360,7 @@ export declare class AdaptableAgGrid implements IAdaptable {
360
360
  private hasFloatingFilterOnAtLeastOneColumn;
361
361
  getChartRef(chartId: string): ChartRef;
362
362
  updateLayoutInManagerAfterStoreHasChanged(layout?: Layout): void;
363
+ private getActiveAdaptableAggFuncForCol;
363
364
  private onRowDataChanged;
364
365
  private onCellDataChanged;
365
366
  private isUndoChange;
@@ -83,9 +83,6 @@ const DateHelper_1 = require("../Utilities/Helpers/DateHelper");
83
83
  const AgGridColumnAdapter_1 = require("./AgGridColumnAdapter");
84
84
  const getScrollbarSize_1 = tslib_1.__importDefault(require("../Utilities/getScrollbarSize"));
85
85
  const AggregationColumns_1 = require("../AdaptableState/Common/AggregationColumns");
86
- const ParameterizedAggregationRegistry_1 = require("../Aggregation/ParameterizedAggregationRegistry");
87
- const parameterizedAggregationHelpers_1 = require("../Aggregation/parameterizedAggregationHelpers");
88
- const parameterizedAggregationHeader_1 = require("../Aggregation/parameterizedAggregationHeader");
89
86
  const RowFormService_1 = require("../Utilities/Services/RowFormService");
90
87
  const EnvVars_1 = require("../EnvVars");
91
88
  const AdaptableUpgradeHelper_1 = require("../migration/AdaptableUpgradeHelper");
@@ -94,6 +91,7 @@ const AdaptableLoadingScreen_1 = require("../View/Components/Popups/AdaptableLoa
94
91
  const react_1 = require("react");
95
92
  const createAgStatusPanelComponent_1 = require("../Utilities/createAgStatusPanelComponent");
96
93
  const only_1 = require("../Utilities/only");
94
+ const weightedAverage_1 = require("../Utilities/weightedAverage");
97
95
  const RowSummary_1 = require("../AdaptableState/Common/RowSummary");
98
96
  const FlashingCellService_1 = require("../Utilities/Services/FlashingCellService");
99
97
  const AgGridExportAdapter_1 = require("./AgGridExportAdapter");
@@ -358,6 +356,7 @@ class AdaptableAgGrid {
358
356
  this._rawAdaptableOptions.adaptableId = `adaptable_id_${Date.now()}`;
359
357
  }
360
358
  this.logger = this.logger ?? new AdaptableLogger_1.AdaptableLogger(this._rawAdaptableOptions.adaptableId);
359
+ (0, LayoutHelpers_1.resetLayoutHelperErrorOnceMessages)();
361
360
  const adaptableId = this._rawAdaptableOptions.adaptableId;
362
361
  const initMarker = (0, devTools_1.getMarker)(adaptableId).track.Init.label.Init.start();
363
362
  const perfInitAdaptableAgGrid = this.logger.beginPerf(`Adaptable._initAdaptableAgGrid()`);
@@ -903,16 +902,7 @@ class AdaptableAgGrid {
903
902
  // #customize_header
904
903
  const defaultColDef = { ...original_defaultColDef };
905
904
  defaultColDef.headerValueGetter = (0, adaptableOverrideCheck_1.tagProvidedByAdaptable)((params) => {
906
- let columnHeaderName = this.api.columnApi.internalApi.getColumnHeaderName(params);
907
- const currentLayout = this.api.layoutApi.getCurrentLayout();
908
- if (params.column &&
909
- !currentLayout.SuppressAggFuncInHeader &&
910
- params.location === 'header') {
911
- const parameterizedParenthesisValue = (0, parameterizedAggregationHeader_1.getParameterizedAggregationHeaderParenthesisValue)(this.api, params.column.getColId(), currentLayout);
912
- if (parameterizedParenthesisValue) {
913
- columnHeaderName = parameterizedParenthesisValue;
914
- }
915
- }
905
+ const columnHeaderName = this.api.columnApi.internalApi.getColumnHeaderName(params);
916
906
  const formattedHeaderName = this.api.formatColumnApi.internalApi.formatColumnHeaderName(columnHeaderName, params);
917
907
  return formattedHeaderName;
918
908
  });
@@ -1126,16 +1116,17 @@ class AdaptableAgGrid {
1126
1116
  aggregationFunctions[AggregationColumns_1.ONLY_AGG_FN_NAME] = (params) => {
1127
1117
  return (0, only_1.only)(params);
1128
1118
  };
1129
- (0, ParameterizedAggregationRegistry_1.getParameterizedAggregationDefinitions)().forEach((definition) => {
1130
- aggregationFunctions[definition.agGridAggFuncName] = (params) => {
1131
- const columnId = params.column.getColId();
1132
- const parameterizedAggFunc = (0, parameterizedAggregationHelpers_1.getParameterizedAggForColumn)(columnId, this.api.layoutApi.getCurrentLayout());
1133
- if (!parameterizedAggFunc || parameterizedAggFunc.type !== definition.type) {
1134
- return undefined;
1135
- }
1136
- return (0, ParameterizedAggregationRegistry_1.computeParameterizedAggregation)(params, params.colDef.colId, parameterizedAggFunc);
1137
- };
1138
- });
1119
+ aggregationFunctions[AggregationColumns_1.WEIGHTED_AVERAGE_AGG_FN_NAME] = (params) => {
1120
+ const columnId = params.column.getColId();
1121
+ const adaptableAggFunc = this.getActiveAdaptableAggFuncForCol(columnId);
1122
+ if (!adaptableAggFunc) {
1123
+ return undefined;
1124
+ }
1125
+ if (adaptableAggFunc.type === 'weightedAverage') {
1126
+ return (0, weightedAverage_1.weightedAverage)(params, params.colDef.colId, adaptableAggFunc.weightedColumnId);
1127
+ }
1128
+ return undefined;
1129
+ };
1139
1130
  return aggregationFunctions;
1140
1131
  });
1141
1132
  /**
@@ -1451,7 +1442,7 @@ class AdaptableAgGrid {
1451
1442
  // dataType: 'Number',
1452
1443
  // AG Grid requires either dataType or numberFormat to be set for Numbers
1453
1444
  numberFormat: {
1454
- format: '0.###############',
1445
+ format: `#,##0.00`,
1455
1446
  },
1456
1447
  });
1457
1448
  // store original excel styles, we will have to revert to them after each VISUAL EXPORT
@@ -4044,6 +4035,25 @@ class AdaptableAgGrid {
4044
4035
  ],
4045
4036
  });
4046
4037
  }
4038
+ getActiveAdaptableAggFuncForCol(columnId) {
4039
+ if (!columnId) {
4040
+ return null;
4041
+ }
4042
+ const currentLayout = this.api.layoutApi.getCurrentLayout();
4043
+ const aggregationFunctionsColumnsMap = ((0, LayoutHelpers_1.isPivotLayout)(currentLayout)
4044
+ ? currentLayout.PivotAggregationColumns
4045
+ : currentLayout.TableAggregationColumns).reduce((acc, col) => {
4046
+ acc[col.ColumnId] = col.AggFunc;
4047
+ return acc;
4048
+ }, {});
4049
+ const adaptableAggFunc = aggregationFunctionsColumnsMap[columnId];
4050
+ if (typeof adaptableAggFunc === 'object' &&
4051
+ 'type' in adaptableAggFunc &&
4052
+ adaptableAggFunc.type === 'weightedAverage') {
4053
+ return adaptableAggFunc;
4054
+ }
4055
+ return null;
4056
+ }
4047
4057
  onRowDataChanged({ rowNode, oldData, newData, }) {
4048
4058
  if (oldData == null || oldData == undefined) {
4049
4059
  return;
@@ -50,6 +50,7 @@ export declare class AgGridAdapter {
50
50
  deriveSelectedRowInfoFromAgGrid(): SelectedRowInfo;
51
51
  isPinnedRowNode(rowNode: IRowNode): boolean;
52
52
  createAdaptableColumnFromAgGridColumn(agGridColumn: Column, colsToGroups: Record<string, AdaptableColumnGroup>): AdaptableColumn;
53
+ private getUserAllowedAggFuncs;
53
54
  private deriveAdaptableColumnDataType;
54
55
  private isColumnReadonly;
55
56
  private isColumnFieldonly;
@@ -57,7 +58,6 @@ export declare class AgGridAdapter {
57
58
  private isColumnRowGroupable;
58
59
  private isColumnPivotable;
59
60
  private isColumnAggregetable;
60
- private getUserAllowedAggFuncs;
61
61
  private getColumnAggregationFunctions;
62
62
  private isTreeColumn;
63
63
  private isColumnMoveable;
@@ -12,8 +12,7 @@ const agGridDataTypeDefinitions_1 = require("./agGridDataTypeDefinitions");
12
12
  const ColumnApiImpl_1 = require("../Api/Implementation/ColumnApiImpl");
13
13
  const isPivotColumnTotal_1 = require("../layout-manager/src/isPivotColumnTotal");
14
14
  const isPivotAggTotalColumn_1 = require("../layout-manager/src/isPivotAggTotalColumn");
15
- const ParameterizedAggregationRegistry_1 = require("../Aggregation/ParameterizedAggregationRegistry");
16
- const ParameterizedAggregationRegistry_2 = require("../Aggregation/ParameterizedAggregationRegistry");
15
+ const AggregationColumns_1 = require("../AdaptableState/Common/AggregationColumns");
17
16
  // AG GRID obfuscates its internals, this is (currently) the best way to get hold of its internal services
18
17
  const DANGER_AG_GRID_BEANS_MAP = {};
19
18
  const getColumnApiModule = () => ag_grid_enterprise_1.ColumnApiModule;
@@ -230,9 +229,8 @@ class AgGridAdapter {
230
229
  if (fctName === 'only') {
231
230
  return 'Only';
232
231
  }
233
- const parameterizedDefinition = (0, ParameterizedAggregationRegistry_1.getParameterizedAggregationDefinitionByAgGridName)(fctName);
234
- if (parameterizedDefinition) {
235
- return parameterizedDefinition.agGridAggFuncName;
232
+ if (fctName === 'weightedAvg') {
233
+ return 'Weighted Average';
236
234
  }
237
235
  return original_getDefaultFuncLabel.call(this, fctName);
238
236
  };
@@ -546,16 +544,23 @@ class AgGridAdapter {
546
544
  abColumn.exportable = this.isColumnExportable(abColumn);
547
545
  if (abColumn.aggregatable) {
548
546
  abColumn.availableAggregationFunctions = this.getColumnAggregationFunctions(colDef);
549
- const userAllowedAggFuncs = this.getUserAllowedAggFuncs(ColumnId);
550
- if (userAllowedAggFuncs) {
551
- abColumn.userAllowedAggFuncs = userAllowedAggFuncs;
552
- }
547
+ Object.defineProperty(abColumn, 'userAllowedAggFuncs', {
548
+ get: () => this.getUserAllowedAggFuncs(ColumnId),
549
+ enumerable: true,
550
+ configurable: true,
551
+ });
553
552
  if (typeof colDef.aggFunc === 'string') {
554
553
  abColumn.aggregationFunction = colDef.aggFunc;
555
554
  }
556
555
  }
557
556
  return abColumn;
558
557
  }
558
+ getUserAllowedAggFuncs(columnId) {
559
+ const userColumnAllowed = this._adaptableInstance?.agGridColumnAdapter?.getUserColDefProperty(columnId, 'allowedAggFuncs');
560
+ const userDefaultColDef = this.getUserGridOptionsProperty('defaultColDef');
561
+ const userAllowed = userColumnAllowed ?? userDefaultColDef?.allowedAggFuncs;
562
+ return Array.isArray(userAllowed) ? [...userAllowed] : undefined;
563
+ }
559
564
  deriveAdaptableColumnDataType(agColumn, logWarning = true) {
560
565
  // Some columns can have no ID or Title. we return string as a consequence but it needs testing
561
566
  if (!agColumn) {
@@ -688,12 +693,6 @@ class AgGridAdapter {
688
693
  }
689
694
  return false;
690
695
  }
691
- getUserAllowedAggFuncs(columnId) {
692
- const userColumnAllowed = this._adaptableInstance?.agGridColumnAdapter?.getUserColDefProperty(columnId, 'allowedAggFuncs');
693
- const userDefaultColDef = this.getUserGridOptionsProperty('defaultColDef');
694
- const userAllowed = userColumnAllowed ?? userDefaultColDef?.allowedAggFuncs;
695
- return Array.isArray(userAllowed) ? [...userAllowed] : undefined;
696
- }
697
696
  getColumnAggregationFunctions(colDef) {
698
697
  const defaultAggFuncs = ['sum', 'min', 'max', 'count', 'avg', 'first', 'last'];
699
698
  const hasAllowedAggFuncs = Array.isArray(colDef.allowedAggFuncs);
@@ -701,9 +700,20 @@ class AgGridAdapter {
701
700
  const gridOptionsAggFuncs = this.adaptableApi.agGridApi.getGridOption('aggFuncs') || {};
702
701
  const gridOptionsAggFuncNames = Object.keys(gridOptionsAggFuncs);
703
702
  if (!hasAllowedAggFuncs) {
704
- result.push(...gridOptionsAggFuncNames);
703
+ // we assume gridOptionsAggFuncNames includes 'weightedAvg' and 'only'
704
+ const customAggFuncNames = gridOptionsAggFuncNames.filter((name) => name !== AggregationColumns_1.WEIGHTED_AVERAGE_AGG_FN_NAME && name !== AggregationColumns_1.ONLY_AGG_FN_NAME);
705
+ // 'weightedAvg' is displayed right after 'avg'
706
+ const avgIndex = result.indexOf('avg');
707
+ if (avgIndex >= 0) {
708
+ result.splice(avgIndex + 1, 0, AggregationColumns_1.WEIGHTED_AVERAGE_AGG_FN_NAME);
709
+ }
710
+ else {
711
+ result.push(AggregationColumns_1.WEIGHTED_AVERAGE_AGG_FN_NAME);
712
+ }
713
+ result.push(...customAggFuncNames);
714
+ // 'only' is always the last element
715
+ result.push(AggregationColumns_1.ONLY_AGG_FN_NAME);
705
716
  }
706
- result = result.filter((func) => !(0, ParameterizedAggregationRegistry_2.isParameterizedAggFuncName)(func));
707
717
  return [...new Set(result)];
708
718
  }
709
719
  isTreeColumn(isGeneratedRowGroupColumn) {
@@ -6,6 +6,7 @@ const tslib_1 = require("tslib");
6
6
  const kebabCase_1 = tslib_1.__importDefault(require("../Utilities/utils/kebabCase"));
7
7
  const AdaptableFormatPresets_1 = require("../AdaptableState/Common/AdaptableFormatPresets");
8
8
  const merge_1 = tslib_1.__importDefault(require("../Utilities/utils/merge"));
9
+ const SparklineOptionsHelper_1 = require("../Utilities/Helpers/SparklineOptionsHelper");
9
10
  const StyleHelper_1 = require("../Utilities/Helpers/StyleHelper");
10
11
  const StringExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/StringExtensions"));
11
12
  const AdaptableColumn_1 = require("../AdaptableState/Common/AdaptableColumn");
@@ -31,7 +32,7 @@ const AgGridFilterAdapter_1 = require("./AgGridFilterAdapter");
31
32
  const AgGridFloatingFilterAdapter_1 = require("./AgGridFloatingFilterAdapter");
32
33
  const AdaptableLogger_1 = require("./AdaptableLogger");
33
34
  const iconStyledColumnColumnSupport_1 = require("../Utilities/Helpers/iconStyledColumnColumnSupport");
34
- const ParameterizedAggregationRegistry_1 = require("../Aggregation/ParameterizedAggregationRegistry");
35
+ const AggregationColumns_1 = require("../AdaptableState/Common/AggregationColumns");
35
36
  /**
36
37
  * CSS property keys produced by `convertAdaptableStyleToCSS` from a
37
38
  * `CellFontStyle` slice. Used to strip Format-Column-derived font CSS
@@ -557,7 +558,7 @@ class AgGridColumnAdapter {
557
558
  if (styledColumn && !styledColumn.IsSuspended) {
558
559
  if (styledColumn.SparklineStyle) {
559
560
  const sanitizedSparklineOptions = AdaptableHelper_1.AdaptableHelper.removeAdaptableObjectPrimitives(styledColumn.SparklineStyle.options);
560
- const sparklineOptions = (0, merge_1.default)({}, userDefined?.sparklineOptions, sanitizedSparklineOptions);
561
+ const sparklineOptions = (0, SparklineOptionsHelper_1.resolveSparklineOptionsForRender)((0, merge_1.default)({}, userDefined?.sparklineOptions, sanitizedSparklineOptions));
561
562
  return {
562
563
  ...userDefined,
563
564
  sparklineOptions,
@@ -576,8 +577,7 @@ class AgGridColumnAdapter {
576
577
  // Icon Style has its own tooltip vocabulary (`'CellValue'` /
577
578
  // `'IconDescription'`) so we handle it before falling through to the
578
579
  // numeric tooltip branch.
579
- if (styledColumn.IconStyle &&
580
- !(0, iconStyledColumnColumnSupport_1.isUnsupportedColumnDataTypeForIconStyle)(abColumn.dataType)) {
580
+ if (styledColumn.IconStyle && !(0, iconStyledColumnColumnSupport_1.isUnsupportedColumnDataTypeForIconStyle)(abColumn.dataType)) {
581
581
  const iconTokens = styledColumn.IconStyle.ToolTipText ?? [];
582
582
  if (iconTokens.length === 0) {
583
583
  return undefined;
@@ -655,9 +655,7 @@ class AgGridColumnAdapter {
655
655
  if (textOptions.includes('CellValue')) {
656
656
  returnValue = String(params.value ?? '');
657
657
  }
658
- if (textOptions.includes('PercentageValue') &&
659
- min != undefined &&
660
- max != undefined) {
658
+ if (textOptions.includes('PercentageValue') && min != undefined && max != undefined) {
661
659
  let percentageValue;
662
660
  if (styledColumn.PercentBarStyle?.ColumnComparison) {
663
661
  const absMax = Math.abs(max);
@@ -666,8 +664,7 @@ class AgGridColumnAdapter {
666
664
  else {
667
665
  const scaleSpan = max - min;
668
666
  const clamped = Helper_1.default.clamp(Number(params.value), min, max);
669
- percentageValue =
670
- scaleSpan === 0 ? 0 : ((clamped - min) / scaleSpan) * 100;
667
+ percentageValue = scaleSpan === 0 ? 0 : ((clamped - min) / scaleSpan) * 100;
671
668
  }
672
669
  returnValue += ` (${percentageValue.toFixed(0)}%)`;
673
670
  }
@@ -733,8 +730,7 @@ class AgGridColumnAdapter {
733
730
  if (!abColumn.availableAggregationFunctions) {
734
731
  return undefined;
735
732
  }
736
- return abColumn.availableAggregationFunctions.filter((func) => !(0, ParameterizedAggregationRegistry_1.isParameterizedAggFuncName)(func));
737
- // .filter((func) => func !== ONLY_AGG_FN_NAME);
733
+ return abColumn.availableAggregationFunctions.filter((func) => !(0, AggregationColumns_1.isWeightedAverageAggFuncName)(func));
738
734
  });
739
735
  }
740
736
  setupColumnType(columnSetupInfo) {
@@ -1468,8 +1464,7 @@ class AgGridColumnAdapter {
1468
1464
  // basis when a Gradient cell has a tinted background, even if the user
1469
1465
  // also set `Font.ForeColor` as a baseline.
1470
1466
  const autoContrastColor = gradientStyle?.AutoContrastText && style.color ? style.color : undefined;
1471
- const iconStyleFontApplies = styledColumn.IconStyle &&
1472
- !(0, iconStyledColumnColumnSupport_1.isUnsupportedColumnDataTypeForIconStyle)(abColumn.dataType);
1467
+ const iconStyleFontApplies = styledColumn.IconStyle && !(0, iconStyledColumnColumnSupport_1.isUnsupportedColumnDataTypeForIconStyle)(abColumn.dataType);
1473
1468
  const fontSlot = styledColumn.GradientStyle?.Font ??
1474
1469
  styledColumn.PercentBarStyle?.Font ??
1475
1470
  styledColumn.BulletChartStyle?.Font ??
@@ -1481,8 +1476,7 @@ class AgGridColumnAdapter {
1481
1476
  if (fontSlot) {
1482
1477
  style = { ...style, ...(0, StyleHelper_1.convertAdaptableStyleToCSS)(fontSlot) };
1483
1478
  }
1484
- const iconStyleCellApplies = styledColumn.IconStyle &&
1485
- !(0, iconStyledColumnColumnSupport_1.isUnsupportedColumnDataTypeForIconStyle)(abColumn.dataType);
1479
+ const iconStyleCellApplies = styledColumn.IconStyle && !(0, iconStyledColumnColumnSupport_1.isUnsupportedColumnDataTypeForIconStyle)(abColumn.dataType);
1486
1480
  const cellSlot = styledColumn.RatingStyle?.Cell ??
1487
1481
  styledColumn.SparklineStyle?.Cell ??
1488
1482
  styledColumn.BadgeStyle?.Cell ??
@@ -9,7 +9,6 @@ export declare class AgGridMenuAdapter {
9
9
  private get adaptableApi();
10
10
  destroy(): void;
11
11
  buildColumnMenu(params: GetMainMenuItemsParams, originalGetMainMenuItems: GetMainMenuItems): (DefaultMenuItem | MenuItemDef)[];
12
- private injectParameterizedAggregationColumnMenuItems;
13
12
  buildContextMenu(params: GetContextMenuItemsParams, originalGetContextMenuItems: GetContextMenuItems): (DefaultMenuItem | MenuItemDef)[];
14
13
  private mapAgGridItemTypeToAgGridMenuItem;
15
14
  private removeConsecutiveSeparators;