@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
@@ -6,8 +6,8 @@ const Icon_1 = require("../components/Icon");
6
6
  const icons_1 = require("../components/icons");
7
7
  const ArrayExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/ArrayExtensions"));
8
8
  const GeneralConstants_1 = require("../Utilities/Constants/GeneralConstants");
9
- const parameterizedAggregationColumnMenu_1 = require("../Aggregation/parameterizedAggregationColumnMenu");
10
- const parameterizedAggregationHelpers_1 = require("../Aggregation/parameterizedAggregationHelpers");
9
+ const buildValueAggregationMenuItem_1 = require("./buildValueAggregationMenuItem");
10
+ const createAgGridIcon_1 = require("./createAgGridIcon");
11
11
  class AgGridMenuAdapter {
12
12
  _adaptableInstance;
13
13
  constructor(_adaptableInstance) {
@@ -59,42 +59,25 @@ class AgGridMenuAdapter {
59
59
  .filter(Boolean);
60
60
  }
61
61
  // 2. if not, return the default context menu
62
- let defaultContextMenu = [
63
- ...agGridMenuItems,
62
+ // AG Grid does not allow customizing the built-in `valueAggSubMenu`, so we
63
+ // replace it with an Adaptable-built equivalent that also offers a Weighted
64
+ // Average aggregation (with a submenu to pick the weight column).
65
+ // Weighted Average is never used in Pivot Layouts, so we leave the AG Grid
66
+ // default item untouched there.
67
+ const isPivotLayout = this.adaptableApi.layoutApi.isCurrentLayoutPivot();
68
+ const mappedAgGridMenuItems = agGridMenuItems.map((itemName) => itemName === 'valueAggSubMenu' && !isPivotLayout
69
+ ? {
70
+ ...(0, buildValueAggregationMenuItem_1.buildValueAggregationMenuItem)(this.adaptableApi, menuContext),
71
+ icon: (0, createAgGridIcon_1.createAgGridIcon)('aggregation'),
72
+ }
73
+ : itemName);
74
+ const defaultContextMenu = [
75
+ ...mappedAgGridMenuItems,
64
76
  'separator',
65
77
  ...defaultColumnMenuStructure.map((adaptableItem) => this.mapAdaptableMenuItemToAgGridMenuDefinition(adaptableItem)),
66
78
  ];
67
- defaultContextMenu = this.injectParameterizedAggregationColumnMenuItems(defaultContextMenu, adaptableColumn);
68
79
  return this.removeConsecutiveSeparators(defaultContextMenu);
69
80
  }
70
- injectParameterizedAggregationColumnMenuItems(menuItems, column) {
71
- const consolidatedAggregationMenuItem = (0, parameterizedAggregationColumnMenu_1.buildConsolidatedAggregationColumnMenuItem)(this.adaptableApi, column, (columnId, parameterizedAgg) => {
72
- this.adaptableApi.layoutApi.setColumnParameterizedAggregation(columnId, parameterizedAgg);
73
- }, (columnId, aggFunc) => {
74
- this.adaptableApi.layoutApi.updateCurrentLayout((layout) => {
75
- if (aggFunc == null) {
76
- (0, parameterizedAggregationHelpers_1.removeColumnAggregationFromLayout)(layout, columnId);
77
- }
78
- else {
79
- (0, parameterizedAggregationHelpers_1.upsertColumnAggregationInLayout)(layout, columnId, aggFunc);
80
- }
81
- return layout;
82
- });
83
- this.adaptableApi.agGridApi.setColumnAggFunc(columnId, aggFunc);
84
- });
85
- if (!consolidatedAggregationMenuItem) {
86
- return menuItems;
87
- }
88
- consolidatedAggregationMenuItem.icon = this.mapAdaptableIconToAgGridIcon({ name: 'equation' });
89
- const originalValueAggMenuIndex = menuItems.findIndex((item) => (0, parameterizedAggregationColumnMenu_1.isValueAggregationMenuItem)(item));
90
- const menuItemsWithoutValueAgg = menuItems.filter((item) => !(0, parameterizedAggregationColumnMenu_1.isValueAggregationMenuItem)(item));
91
- const result = [...menuItemsWithoutValueAgg];
92
- const insertIndex = originalValueAggMenuIndex !== -1
93
- ? Math.min(originalValueAggMenuIndex, result.length)
94
- : (0, parameterizedAggregationColumnMenu_1.findParameterizedAggMenuInsertIndex)(menuItemsWithoutValueAgg);
95
- result.splice(insertIndex, 0, consolidatedAggregationMenuItem);
96
- return result;
97
- }
98
81
  buildContextMenu(params, originalGetContextMenuItems) {
99
82
  if (!params.column) {
100
83
  return [];
@@ -273,7 +256,7 @@ class AgGridMenuAdapter {
273
256
  ? () => this.adaptableApi.internalApi.dispatchReduxAction(fullMenuItem.reduxAction)
274
257
  : undefined,
275
258
  icon: this.mapAdaptableIconToAgGridIcon(fullMenuItem.icon, {
276
- fill: 'var(--ab-color-text-on-primary)',
259
+ fill: 'var(--ab-color-primary-foreground)',
277
260
  }),
278
261
  subMenu: fullMenuItem.subItems?.map((subMenuItem) => this.mapAdaptableMenuItemToAgGridMenuDefinition(subMenuItem)),
279
262
  };
@@ -286,7 +269,7 @@ class AgGridMenuAdapter {
286
269
  return {
287
270
  name: customMenuItem.label,
288
271
  icon: this.mapAdaptableIconToAgGridIcon(customMenuItem.icon, {
289
- fill: 'var(--ab-color-text-on-primary)',
272
+ fill: 'var(--ab-color-primary-foreground)',
290
273
  }),
291
274
  disabled: customMenuItem.disabled,
292
275
  subMenu: !customMenuItem.disabled
@@ -314,7 +297,7 @@ class AgGridMenuAdapter {
314
297
  name: userMenuItem.label,
315
298
  action: () => (userMenuItem.onClick ? userMenuItem.onClick(menuContext) : null),
316
299
  icon: this.mapAdaptableIconToAgGridIcon(userMenuItem.icon, {
317
- fill: 'var(--ab-color-text-on-primary)',
300
+ fill: 'var(--ab-color-primary-foreground)',
318
301
  }),
319
302
  disabled: userMenuItem.disabled,
320
303
  subMenu: userMenuItem.subMenuItems
@@ -739,7 +722,7 @@ class AgGridMenuAdapter {
739
722
  }
740
723
  else {
741
724
  return (0, icons_1.iconToString)(icon, {
742
- fill: 'var(--ab-color-text-on-primary)',
725
+ fill: 'var(--ab-color-primary-foreground)',
743
726
  });
744
727
  }
745
728
  }
@@ -0,0 +1,19 @@
1
+ import { MenuItemDef } from 'ag-grid-enterprise';
2
+ import { AdaptableApi } from '../types';
3
+ import { ColumnMenuContext } from '../AdaptableState/Common/Menu';
4
+ /**
5
+ * Builds the replacement for AG Grid's built-in `valueAggSubMenu` column menu item.
6
+ *
7
+ * AG Grid does not allow customizing the built-in submenu, so we rebuild an
8
+ * equivalent one: the column's existing aggregation functions plus a
9
+ * `Weighted Average` item whose submenu lists the numeric columns that can be
10
+ * used as the weight parameter.
11
+ *
12
+ * Both standard and weighted selections persist through the current Layout
13
+ * (`updateCurrentLayout`), so the existing `weightedAvg` aggFunc can read the
14
+ * chosen `weightedColumnId` back from the Layout.
15
+ *
16
+ * Weighted Average is never used in Pivot Layouts, so this only deals with the
17
+ * Table Layout aggregations and the caller skips it entirely in Pivot mode.
18
+ */
19
+ export declare function buildValueAggregationMenuItem(adaptableApi: AdaptableApi, menuContext: ColumnMenuContext): MenuItemDef;
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buildValueAggregationMenuItem = buildValueAggregationMenuItem;
4
+ const AggregationColumns_1 = require("../AdaptableState/Common/AggregationColumns");
5
+ const toFuncLabel = (funcName) => {
6
+ if (funcName === 'avg') {
7
+ return 'Average';
8
+ }
9
+ if (funcName === 'weightedAvg') {
10
+ return 'Weighted Average';
11
+ }
12
+ return funcName ? funcName.charAt(0).toUpperCase() + funcName.slice(1) : funcName;
13
+ };
14
+ /**
15
+ * Builds the replacement for AG Grid's built-in `valueAggSubMenu` column menu item.
16
+ *
17
+ * AG Grid does not allow customizing the built-in submenu, so we rebuild an
18
+ * equivalent one: the column's existing aggregation functions plus a
19
+ * `Weighted Average` item whose submenu lists the numeric columns that can be
20
+ * used as the weight parameter.
21
+ *
22
+ * Both standard and weighted selections persist through the current Layout
23
+ * (`updateCurrentLayout`), so the existing `weightedAvg` aggFunc can read the
24
+ * chosen `weightedColumnId` back from the Layout.
25
+ *
26
+ * Weighted Average is never used in Pivot Layouts, so this only deals with the
27
+ * Table Layout aggregations and the caller skips it entirely in Pivot mode.
28
+ */
29
+ function buildValueAggregationMenuItem(adaptableApi, menuContext) {
30
+ const column = menuContext.adaptableColumn;
31
+ const columnId = column.columnId;
32
+ const currentLayout = adaptableApi.layoutApi.getCurrentLayout();
33
+ const aggregationColumns = currentLayout.TableAggregationColumns || [];
34
+ const currentAggFunc = aggregationColumns.find((agg) => agg.ColumnId === columnId)?.AggFunc;
35
+ let activeAggFuncName;
36
+ if (currentAggFunc != null) {
37
+ const aggFuncName = (0, AggregationColumns_1.getAggFuncName)(currentAggFunc);
38
+ activeAggFuncName = aggFuncName === true ? column.aggregationFunction : aggFuncName;
39
+ }
40
+ const activeWeightColumnId = (0, AggregationColumns_1.isWeightedAverageAggregation)(currentAggFunc)
41
+ ? currentAggFunc.weightedColumnId
42
+ : undefined;
43
+ const applyAggregation = (aggFuncValue) => {
44
+ const upsert = (cols) => {
45
+ const list = cols ? [...cols] : [];
46
+ const index = list.findIndex((col) => col.ColumnId === columnId);
47
+ if (index >= 0) {
48
+ list[index] = { ...list[index], AggFunc: aggFuncValue };
49
+ }
50
+ else {
51
+ list.push({ ColumnId: columnId, AggFunc: aggFuncValue });
52
+ }
53
+ return list;
54
+ };
55
+ adaptableApi.layoutApi.updateCurrentLayout((layout) => {
56
+ const tableLayout = layout;
57
+ return {
58
+ ...tableLayout,
59
+ TableAggregationColumns: upsert(tableLayout.TableAggregationColumns),
60
+ };
61
+ });
62
+ };
63
+ const removeAggregation = () => {
64
+ adaptableApi.layoutApi.updateCurrentLayout((layout) => {
65
+ const tableLayout = layout;
66
+ return {
67
+ ...tableLayout,
68
+ TableAggregationColumns: (tableLayout.TableAggregationColumns || []).filter((col) => col.ColumnId !== columnId),
69
+ };
70
+ });
71
+ };
72
+ // 'None' clears any aggregation for the column and is checked when none is set
73
+ const subMenu = [
74
+ {
75
+ name: 'None',
76
+ checked: activeAggFuncName == null,
77
+ action: () => removeAggregation(),
78
+ },
79
+ ];
80
+ // getDisplayAggFuncNames already positions weightedAvg right after 'avg'
81
+ // (and only includes it when the column is eligible)
82
+ const aggFuncItems = (0, AggregationColumns_1.getDisplayAggFuncNames)(column).map((funcName) => {
83
+ // Weighted Average needs a weight column parameter, so instead of a plain
84
+ // action it gets a submenu listing the numeric columns usable as the weight.
85
+ if (funcName === AggregationColumns_1.WEIGHTED_AVERAGE_AGG_FN_NAME) {
86
+ const weightColumnItems = adaptableApi.columnApi
87
+ .getNumericColumns()
88
+ .filter((numericColumn) => numericColumn.columnId !== columnId)
89
+ .map((numericColumn) => ({
90
+ name: numericColumn.friendlyName ?? numericColumn.columnId,
91
+ checked: activeWeightColumnId === numericColumn.columnId,
92
+ action: () => applyAggregation({
93
+ type: 'weightedAverage',
94
+ weightedColumnId: numericColumn.columnId,
95
+ }),
96
+ }));
97
+ return {
98
+ name: 'Weighted Average',
99
+ checked: activeAggFuncName === AggregationColumns_1.WEIGHTED_AVERAGE_AGG_FN_NAME,
100
+ subMenu: weightColumnItems,
101
+ };
102
+ }
103
+ return {
104
+ name: toFuncLabel(funcName),
105
+ checked: activeAggFuncName === funcName,
106
+ action: () => applyAggregation(funcName),
107
+ };
108
+ });
109
+ subMenu.push(...aggFuncItems);
110
+ return {
111
+ name: 'Value Aggregation',
112
+ subMenu,
113
+ };
114
+ }
@@ -18,6 +18,12 @@ import { AdaptableColumn } from '../../AdaptableState/Common/AdaptableColumn';
18
18
  * is configured for case-insensitive matching.
19
19
  */
20
20
  export declare const resolveEffectiveIconStyleMappings: (iconStyle: IconStyle | undefined) => IconStyleMapping[];
21
+ /**
22
+ * Mapping list for wizard / settings summaries: custom mappings first so
23
+ * user-authored entries are always visible, then any remaining preset
24
+ * entries (after override filtering).
25
+ */
26
+ export declare const resolveIconStyleMappingsForSummaryPreview: (iconStyle: IconStyle | undefined) => IconStyleMapping[];
21
27
  export declare const getIconRendererForColumn: (styledColumn: StyledColumn, abColumn: AdaptableColumn, api: AdaptableApi) => any;
22
28
  /** Helper exposed for the tooltip getter in `AgGridColumnAdapter`. */
23
29
  export declare const findIconStyleMappingForValue: (iconStyle: IconStyle | undefined, cellValue: any) => IconStyleMapping | undefined;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.findIconStyleMappingForValue = exports.getIconRendererForColumn = exports.resolveEffectiveIconStyleMappings = void 0;
3
+ exports.findIconStyleMappingForValue = exports.getIconRendererForColumn = exports.resolveIconStyleMappingsForSummaryPreview = exports.resolveEffectiveIconStyleMappings = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const Icon_1 = require("../../components/Icon");
@@ -12,6 +12,25 @@ const iconStyledColumnColumnSupport_1 = require("../../Utilities/Helpers/iconSty
12
12
  const AdaptableLogger_1 = require("../AdaptableLogger");
13
13
  const DEFAULT_SIZE = 18;
14
14
  const DEFAULT_GAP = 4;
15
+ const normaliseIconMappingKey = (key, matchMode) => {
16
+ if (typeof key === 'string' && matchMode === 'CaseInsensitive') {
17
+ return key.toLowerCase();
18
+ }
19
+ return key;
20
+ };
21
+ const resolveIconStyleMappingParts = (iconStyle) => {
22
+ const presetMappings = iconStyle.Preset
23
+ ? (0, IconStylePresets_1.getIconStylePresetMappings)(iconStyle.Preset)
24
+ : [];
25
+ const userMappings = iconStyle.Mappings ?? [];
26
+ if (presetMappings.length === 0 || userMappings.length === 0) {
27
+ return { presetMappings, userMappings };
28
+ }
29
+ const matchMode = iconStyle.MatchMode ?? 'Exact';
30
+ const overrideKeys = new Set(userMappings.map((m) => normaliseIconMappingKey(m.Key, matchMode)));
31
+ const filteredPreset = presetMappings.filter((p) => !overrideKeys.has(normaliseIconMappingKey(p.Key, matchMode)));
32
+ return { presetMappings: filteredPreset, userMappings };
33
+ };
15
34
  /**
16
35
  * Resolve the **effective** mapping list for an `IconStyle`:
17
36
  *
@@ -31,26 +50,36 @@ const DEFAULT_GAP = 4;
31
50
  const resolveEffectiveIconStyleMappings = (iconStyle) => {
32
51
  if (!iconStyle)
33
52
  return [];
34
- const presetMappings = iconStyle.Preset
35
- ? (0, IconStylePresets_1.getIconStylePresetMappings)(iconStyle.Preset)
36
- : [];
37
- const userMappings = iconStyle.Mappings ?? [];
53
+ const { presetMappings, userMappings } = resolveIconStyleMappingParts(iconStyle);
38
54
  if (presetMappings.length === 0)
39
55
  return userMappings;
40
- if (userMappings.length === 0)
41
- return presetMappings;
42
- const matchMode = iconStyle.MatchMode ?? 'Exact';
43
- const normaliseKey = (k) => {
44
- if (typeof k === 'string' && matchMode === 'CaseInsensitive') {
45
- return k.toLowerCase();
46
- }
47
- return k;
48
- };
49
- const overrideKeys = new Set(userMappings.map((m) => normaliseKey(m.Key)));
50
- const filteredPreset = presetMappings.filter((p) => !overrideKeys.has(normaliseKey(p.Key)));
51
- return [...filteredPreset, ...userMappings];
56
+ if (userMappings.length === 0) {
57
+ return iconStyle.Preset ? (0, IconStylePresets_1.getIconStylePresetMappings)(iconStyle.Preset) : [];
58
+ }
59
+ return [...presetMappings, ...userMappings];
52
60
  };
53
61
  exports.resolveEffectiveIconStyleMappings = resolveEffectiveIconStyleMappings;
62
+ /**
63
+ * Mapping list for wizard / settings summaries: custom mappings first so
64
+ * user-authored entries are always visible, then any remaining preset
65
+ * entries (after override filtering).
66
+ */
67
+ const resolveIconStyleMappingsForSummaryPreview = (iconStyle) => {
68
+ if (!iconStyle)
69
+ return [];
70
+ const { presetMappings, userMappings } = resolveIconStyleMappingParts(iconStyle);
71
+ if (userMappings.length === 0) {
72
+ if (presetMappings.length > 0) {
73
+ return presetMappings;
74
+ }
75
+ return iconStyle.Preset ? (0, IconStylePresets_1.getIconStylePresetMappings)(iconStyle.Preset) : [];
76
+ }
77
+ if (presetMappings.length === 0) {
78
+ return userMappings;
79
+ }
80
+ return [...userMappings, ...presetMappings];
81
+ };
82
+ exports.resolveIconStyleMappingsForSummaryPreview = resolveIconStyleMappingsForSummaryPreview;
54
83
  /**
55
84
  * Look up `cellValue` in the mapping list using the configured match mode.
56
85
  *
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Creates an AG Grid icon element for the given icon name.
3
+ *
4
+ * Mimics AG Grid's internal icon creation, producing a
5
+ * `<span class="ag-icon ag-icon-{name}" role="presentation" unselectable="on">`
6
+ * so the icon picks up AG Grid's own icon font/theme styling.
7
+ *
8
+ * @see https://github.com/ag-grid/ag-grid/blob/5ca14e73188f6f52fd7d545d595c067bf1b72168/packages/ag-grid-community/src/utils/icon.ts#L139
9
+ */
10
+ export declare function createAgGridIcon(name: string): HTMLElement;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createAgGridIcon = createAgGridIcon;
4
+ /**
5
+ * Creates an AG Grid icon element for the given icon name.
6
+ *
7
+ * Mimics AG Grid's internal icon creation, producing a
8
+ * `<span class="ag-icon ag-icon-{name}" role="presentation" unselectable="on">`
9
+ * so the icon picks up AG Grid's own icon font/theme styling.
10
+ *
11
+ * @see https://github.com/ag-grid/ag-grid/blob/5ca14e73188f6f52fd7d545d595c067bf1b72168/packages/ag-grid-community/src/utils/icon.ts#L139
12
+ */
13
+ function createAgGridIcon(name) {
14
+ const element = document.createElement('span');
15
+ element.className = `ag-icon ag-icon-${name}`;
16
+ element.setAttribute('role', 'presentation');
17
+ element.setAttribute('unselectable', 'on');
18
+ return element;
19
+ }
@@ -23,6 +23,6 @@ function UnusedItem({ unusedItem, disabled }) {
23
23
  const title = currentItem ? currentItem.Title : unusedItem;
24
24
  return ((0, jsx_runtime_1.jsx)(dnd_1.DragList.DraggableItem, { id: unusedItem, children: (itemDomProps) => {
25
25
  const { onPointerDown, ...restDomProps } = itemDomProps;
26
- return ((0, jsx_runtime_1.jsx)("div", { "data-name": "unused-item", ...restDomProps, ...(disabled ? {} : { onPointerDown }), className: (0, clsx_1.default)('twa:rounded-md twa:text-sm twa:text-text-on-primary twa:p-2 twa:select-none', 'twa:bg-primary', restDomProps.className), children: title }));
26
+ return ((0, jsx_runtime_1.jsx)("div", { "data-name": "unused-item", ...restDomProps, ...(disabled ? {} : { onPointerDown }), className: (0, clsx_1.default)('twa:rounded-md twa:text-sm twa:text-primary-foreground twa:p-2 twa:select-none', 'twa:bg-primary', restDomProps.className), children: title }));
27
27
  } }));
28
28
  }
@@ -155,7 +155,7 @@ const FunctionsDropdown = ({ expressionFunctions, baseClassName }) => {
155
155
  return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { onMouseEnter: () => setOverFunction(functionName), onClick: () => hidePopup(), children: functionName === 'VAR' ? ((0, jsx_runtime_1.jsx)(VarEditorButton, { className: buttonClassName }, functionName)) : ((0, jsx_runtime_1.jsx)(EditorButton_1.default, { data: getEditorButtonData(functionName), className: buttonClassName, children: functionName }, functionName)) }, functionName));
156
156
  })
157
157
  .filter(Boolean);
158
- return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: (0, clsx_1.default)('twa:mb-2 twa:mx-1', fns.length === 0 ? 'twa:hidden' : ''), children: [(0, jsx_runtime_1.jsx)(Tag_1.Tag, { className: "twa:mb-1 twa:bg-primarylight twa:text-text-on-primary twa:w-full", children: StringExtensions_1.default.Humanize(groupName) }), fns] }, groupName));
158
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: (0, clsx_1.default)('twa:mb-2 twa:mx-1', fns.length === 0 ? 'twa:hidden' : ''), children: [(0, jsx_runtime_1.jsx)(Tag_1.Tag, { className: "twa:mb-1 twa:bg-primarylight twa:text-primary-foreground twa:w-full", children: StringExtensions_1.default.Humanize(groupName) }), fns] }, groupName));
159
159
  }) })] }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: (0, clsx_1.default)(`${baseClassName}__dropdown-functions-description `, `twa:flex-1 twa:p-2 twa:w-[600px] twa:max-w-[60vw]`, `twa:rounded-standard twa:shadow-sm twa:overflow-auto twa:h-auto`, 'twa:bg-primarylight twa:text-primary-foreground'), children: overFunction ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Tag_1.Tag, { className: "twa:bg-accent twa:text-accent-foreground", children: overFunction }), (0, jsx_runtime_1.jsx)(ExpressionFunctionDocumentation_1.ExpressionFunctionDocumentation, { expressionFunction: expressionFunctions[overFunction] })] })) : ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { className: "twa:size-full twa:items-center twa:justify-center twa:text-2 twa:italic", children: (0, jsx_runtime_1.jsxs)("ul", { children: [(0, jsx_runtime_1.jsxs)("li", { children: ["Hover over a Function to learn more", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {})] }), (0, jsx_runtime_1.jsx)("li", { children: "Click a Function to add it to the Expression in the Editor" })] }) })) })] })] })), children: (0, jsx_runtime_1.jsx)(SimpleButton_1.default, { "data-name": "expression-dropdown", icon: "arrow-down", iconPosition: 'end', className: "twa:mr-1", children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { className: "twa:mr-1 twa:text-2", children: (0, jsx_runtime_1.jsx)(icons_1.Icon, { name: "equation" }) }) }) }));
160
160
  };
161
161
  function BaseEditorInput(props) {
@@ -4,7 +4,7 @@ exports.ExpressionFunctionDocumentation = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const Tag_1 = require("../Tag");
6
6
  const Flex_1 = require("../Flex");
7
- const signatureClassName = 'twa:m-0 twa:whitespace-pre-wrap twa:bg-primary twa:text-text-on-primary twa:rounded-standard twa:p-1 twa:inline-block';
7
+ const signatureClassName = 'twa:m-0 twa:whitespace-pre-wrap twa:bg-primary twa:text-primary-foreground twa:rounded-standard twa:p-1 twa:inline-block';
8
8
  const ExpressionFunctionDocumentation = (props) => {
9
9
  return props.expressionFunction ? ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { "data-name": "expression-editor-documentation", className: "twa:my-2 twa:p-2 twa:rounded-standard twa:leading-normal", children: [props.expressionFunction.description && ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:mb-3 twa:font-bold twa:whitespace-pre-wrap", "data-name": "expression-editor-documentation-description", children: props.expressionFunction.description })), props.expressionFunction.signatures && ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { "data-name": "expression-editor-documentation-signatures", children: [(0, jsx_runtime_1.jsx)("b", { children: "Signatures" }), (0, jsx_runtime_1.jsx)("ul", { className: "twa:flex twa:flex-col twa:gap-1", children: props.expressionFunction.signatures.map((signature, index) => ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)("pre", { className: signatureClassName, children: signature }) }, index))) })] })), props.expressionFunction.examples && ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { "data-name": "expression-editor-documentation-examples", children: [(0, jsx_runtime_1.jsx)("b", { children: "Examples" }), (0, jsx_runtime_1.jsx)("ul", { className: "twa:flex twa:flex-col twa:gap-1", children: props.expressionFunction.examples.map((example, index) => ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)("pre", { className: signatureClassName, children: example }) }, index))) })] })), props.expressionFunction.returnType && ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { "data-name": "expression-editor-documentation-examples", children: [(0, jsx_runtime_1.jsx)("b", { children: "Return Type" }), (0, jsx_runtime_1.jsx)(Tag_1.Tag, { className: "twa:bg-accentlight twa:text-accent twa:ml-3 twa:rounded-full twa:py-1", children: props.expressionFunction.returnType })] }))] })) : null;
10
10
  };
@@ -30,7 +30,7 @@ exports.NumberInput = React.forwardRef((props, ref) => {
30
30
  // only set when a valid numer
31
31
  props.onChange(newVal);
32
32
  }
33
- }, []);
33
+ }, [props.onChange]);
34
34
  React.useEffect(() => {
35
35
  setValue(props.value);
36
36
  }, [props.value]);
@@ -23,7 +23,7 @@ const Body = ({ children, bodyScroll, variant, className, style, }) => {
23
23
  bodyScroll = 'auto';
24
24
  }
25
25
  const bodyCls = (0, clsx_1.default)(DEFAULT_BODY_CLS, `${exports.baseClassName}__body`, variant && `${exports.baseClassName}__body--variant-${variant}`, bodyScroll ? `twa:overflow-auto` : null, {
26
- 'twa:bg-primarylight twa:text-text-on-primary twa:border-0': variant === 'modern',
26
+ 'twa:bg-primarylight twa:text-primary-foreground twa:border-0': variant === 'modern',
27
27
  }, className);
28
28
  return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { style: style, className: bodyCls, children: children }));
29
29
  };
@@ -82,11 +82,11 @@ const SimpleButton = React.forwardRef((givenProps, theRef) => {
82
82
  'twa:*:z-1',
83
83
  // all svgs inside should be aligned middle
84
84
  'twa:[&_svg]:align-middle',
85
- // 'twa:text-text-on-primary',
85
+ // 'twa:text-primary-foreground',
86
86
  // the text variant has the background applied on the before pseudo element
87
87
  // so let's configure the before pseudo element for all buttons here
88
88
  'twa:before:content-[""] twa:before:absolute twa:before:inset-0 twa:before:block', 'twa:before:z-0 twa:before:pointer-events-none twa:before:rounded-[inherit]', 'twa:outline-none twa:focus-visible:border-ring twa:focus-visible:ring-3 twa:focus-visible:ring-ring/50', disabled ? `${exports.baseClassName}--disabled` : '', `${exports.baseClassName}--variant-${variant}`, `${exports.baseClassName}--tone-${tone}`, 'twa:transition-opacity twa:duration-200', {
89
- 'twa:text-text-on-primary': tone == 'neutral',
89
+ 'twa:text-primary-foreground': tone == 'neutral',
90
90
  'twa:text-inherit': tone === 'none',
91
91
  'twa:text-success': tone === 'success',
92
92
  'twa:text-accent': tone === 'accent',
@@ -99,11 +99,11 @@ const SimpleButton = React.forwardRef((givenProps, theRef) => {
99
99
  ? 'twa:bg-background twa:border-input-border twa:border'
100
100
  : '', variant === 'raised'
101
101
  ? {
102
- 'twa:text-text-on-primary twa:shadow-(--ab-cmp-simple-button__box-shadow) twa:hover:not-disabled:shadow-(--ab-cmp-simple-button__hover-box-shadow) twa:transition-(--ab-cmp-simple-button__transition) twa:duration-200 twa:focus:shadow-(--ab-focus__box-shadow)': true,
102
+ 'twa:text-primary-foreground twa:shadow-(--ab-cmp-simple-button__box-shadow) twa:hover:not-disabled:shadow-(--ab-cmp-simple-button__hover-box-shadow) twa:transition-(--ab-cmp-simple-button__transition) twa:duration-200 twa:focus:shadow-(--ab-focus__box-shadow)': true,
103
103
  'twa:bg-success twa:text-text-on-success': tone == 'success',
104
104
  'twa:bg-accent twa:text-accent-foreground': tone == 'accent',
105
105
  'twa:bg-transparent': tone == 'none',
106
- 'twa:bg-primary twa:text-text-on-primary': tone == 'neutral',
106
+ 'twa:bg-primary twa:text-primary-foreground': tone == 'neutral',
107
107
  'twa:bg-error twa:text-text-on-error': tone == 'error',
108
108
  'twa:bg-warn twa:text-text-on-warn': tone == 'warning',
109
109
  'twa:bg-info twa:text-text-on-info': tone == 'info',
@@ -44,7 +44,7 @@ const Toggle = ({ onPressedChange, pressed, icon, children, ...rest }) => {
44
44
  // backgrounds
45
45
  {
46
46
  'twa:text-inherit twa:bg-transparent': !pressed,
47
- 'twa:hover:bg-primarylight twa:hover:text-text-on-primary': !pressed,
47
+ 'twa:hover:bg-primarylight twa:hover:text-primary-foreground': !pressed,
48
48
  [`${baseClassName}--pressed`]: pressed,
49
49
  'twa:bg-accent twa:hover:bg-accent/90 twa:text-accent-foreground': pressed,
50
50
  }, {
@@ -24,7 +24,7 @@ const ToggleGroup = (props) => {
24
24
  activeIndex: index,
25
25
  }));
26
26
  }, []);
27
- return ((0, jsx_runtime_1.jsx)(exports.ToggleGroupContext.Provider, { value: context, children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { ref: ref, tabIndex: 0, className: (0, clsx_1.default)('ab-Toggle-Group twa:shadow-sm', 'twa:bg-primary twa:text-text-on-primary', 'twa:rounded-standard twa:overflow-hidden', 'twa:inline-flex twa:w-fit', 'twa:focus:outline-0',
27
+ return ((0, jsx_runtime_1.jsx)(exports.ToggleGroupContext.Provider, { value: context, children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { ref: ref, tabIndex: 0, className: (0, clsx_1.default)('ab-Toggle-Group twa:shadow-sm', 'twa:bg-primary twa:text-primary-foreground', 'twa:rounded-standard twa:overflow-hidden', 'twa:inline-flex twa:w-fit', 'twa:focus:outline-0',
28
28
  // make the shadow of child Toggle buttons invisible when the group is not focused
29
29
  'twa:not-focus-within:[--ab-focus-light__box-shadow:none]', 'twa:not-focus-within:[--ab-focus__box-shadow:none]'), onMouseDown: (event) => {
30
30
  const index = context.toggleButtons.findIndex((btn) => (0, contains_1.default)(btn.node, event.target));
package/src/env.js CHANGED
@@ -2,6 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = {
4
4
  NEXT_PUBLIC_INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
5
- PUBLISH_TIMESTAMP: 1780948225860 || Date.now(),
6
- VERSION: "23.0.0-canary.4" || '--current-version--',
5
+ PUBLISH_TIMESTAMP: 1781163743848 || Date.now(),
6
+ VERSION: "23.0.0-canary.6" || '--current-version--',
7
7
  };
@@ -13,7 +13,6 @@ const destructurePivotColumnId_1 = require("./destructurePivotColumnId");
13
13
  const isPivotAggTotalColumn_1 = require("./isPivotAggTotalColumn");
14
14
  const isPivotGrandTotal_1 = require("./isPivotGrandTotal");
15
15
  const isPivotColumnTotal_1 = require("./isPivotColumnTotal");
16
- const ParameterizedAggregationRegistry_1 = require("../../Aggregation/ParameterizedAggregationRegistry");
17
16
  const devTools_1 = require("../../devTools");
18
17
  exports.PIVOT_ANY_TOTAL_COL_TYPE = 'pivotAnyTotal';
19
18
  exports.PIVOT_GRAND_TOTAL_COL_TYPE = 'pivotGrandTotal';
@@ -526,24 +525,18 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
526
525
  });
527
526
  }
528
527
  if (gridState.aggregation) {
529
- TableAggregationColumns = gridState.aggregation.aggregationModel
530
- .map((agg) => {
528
+ TableAggregationColumns = gridState.aggregation.aggregationModel.map((agg) => {
531
529
  const prevAggForColumn = prevAggColumnsMap?.[agg.colId];
532
530
  if (prevAggForColumn && prevAggForColumn.AggFunc.aggFunc === agg.aggFunc) {
533
531
  return prevAggForColumn;
534
532
  }
535
- // Parameterized aggs require layout metadata (e.g. weight column); ignore incomplete picks.
536
- if ((0, ParameterizedAggregationRegistry_1.isParameterizedAggFuncName)(agg.aggFunc)) {
537
- return prevAggForColumn ?? null;
538
- }
539
533
  return {
540
534
  ColumnId: agg.colId,
541
535
  AggFunc: {
542
536
  aggFunc: agg.aggFunc,
543
537
  },
544
538
  };
545
- })
546
- .filter(Boolean);
539
+ });
547
540
  }
548
541
  // if there's a current layout set
549
542
  // we want to only return the AG Grid columns that are also in the current layout
@@ -792,15 +792,6 @@ export declare const ADAPTABLE_METAMODEL: {
792
792
  };
793
793
  AdaptableTheme: {
794
794
  k: string;
795
- p: ({
796
- n: string;
797
- k: string;
798
- o: boolean;
799
- } | {
800
- n: string;
801
- k: string;
802
- o?: undefined;
803
- })[];
804
795
  };
805
796
  AdaptableToolPanel: {
806
797
  k: string;
@@ -3808,6 +3799,9 @@ export declare const ADAPTABLE_METAMODEL: {
3808
3799
  o: boolean;
3809
3800
  }[];
3810
3801
  };
3802
+ NumberScopeDataType: {
3803
+ k: string;
3804
+ };
3811
3805
  NumericStyledColumn: {
3812
3806
  k: string;
3813
3807
  p: ({
@@ -3860,9 +3854,6 @@ export declare const ADAPTABLE_METAMODEL: {
3860
3854
  k: string;
3861
3855
  }[];
3862
3856
  };
3863
- ParameterizedAggFunc: {
3864
- k: string;
3865
- };
3866
3857
  PercentBarStyle: {
3867
3858
  k: string;
3868
3859
  p: ({
@@ -3983,11 +3974,6 @@ export declare const ADAPTABLE_METAMODEL: {
3983
3974
  k: string;
3984
3975
  o: boolean;
3985
3976
  r: string;
3986
- } | {
3987
- n: string;
3988
- k: string;
3989
- r: string;
3990
- o?: undefined;
3991
3977
  })[];
3992
3978
  };
3993
3979
  PlusMinusOptions: {
@@ -4655,9 +4641,6 @@ export declare const ADAPTABLE_METAMODEL: {
4655
4641
  k: string;
4656
4642
  }[];
4657
4643
  };
4658
- ShortcutScopeDataType: {
4659
- k: string;
4660
- };
4661
4644
  ShortcutState: {
4662
4645
  k: string;
4663
4646
  p: {
@@ -4918,6 +4901,26 @@ export declare const ADAPTABLE_METAMODEL: {
4918
4901
  o?: undefined;
4919
4902
  })[];
4920
4903
  };
4904
+ SystemThemeEntry: {
4905
+ k: string;
4906
+ };
4907
+ SystemThemeName: {
4908
+ k: string;
4909
+ };
4910
+ SystemThemeOptions: {
4911
+ k: string;
4912
+ p: ({
4913
+ n: string;
4914
+ k: string;
4915
+ o: boolean;
4916
+ r?: undefined;
4917
+ } | {
4918
+ n: string;
4919
+ k: string;
4920
+ r: string;
4921
+ o?: undefined;
4922
+ })[];
4923
+ };
4921
4924
  TableAggregationColumns: {
4922
4925
  k: string;
4923
4926
  };
@@ -5010,14 +5013,28 @@ export declare const ADAPTABLE_METAMODEL: {
5010
5013
  k: string;
5011
5014
  }[];
5012
5015
  };
5013
- ThemeState: {
5016
+ ThemeSelectedInfo: {
5014
5017
  k: string;
5015
5018
  p: {
5016
5019
  n: string;
5017
5020
  k: string;
5018
- o: boolean;
5021
+ r: string;
5019
5022
  }[];
5020
5023
  };
5024
+ ThemeState: {
5025
+ k: string;
5026
+ p: ({
5027
+ n: string;
5028
+ k: string;
5029
+ o: boolean;
5030
+ r: string;
5031
+ } | {
5032
+ n: string;
5033
+ k: string;
5034
+ o: boolean;
5035
+ r?: undefined;
5036
+ })[];
5037
+ };
5021
5038
  ToastPositions: {
5022
5039
  k: string;
5023
5040
  };
@@ -5180,13 +5197,6 @@ export declare const ADAPTABLE_METAMODEL: {
5180
5197
  VueFrameworkComponent: {
5181
5198
  k: string;
5182
5199
  };
5183
- WeightedAverageAggregation: {
5184
- k: string;
5185
- p: {
5186
- n: string;
5187
- k: string;
5188
- }[];
5189
- };
5190
5200
  WindowPosition: {
5191
5201
  k: string;
5192
5202
  };