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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (277) hide show
  1. package/index.css +116 -61
  2. package/package.json +9 -4
  3. package/src/AdaptableOptions/DefaultAdaptableOptions.js +0 -4
  4. package/src/AdaptableOptions/EditOptions.d.ts +2 -2
  5. package/src/AdaptableOptions/FilterOptions.d.ts +0 -7
  6. package/src/AdaptableState/Common/AdaptableForm.d.ts +18 -1
  7. package/src/AdaptableState/Common/AdaptableForm.js +34 -0
  8. package/src/AdaptableState/Common/AggregationColumns.d.ts +14 -6
  9. package/src/AdaptableState/Common/AggregationColumns.js +30 -3
  10. package/src/AdaptableState/Common/CellDataChangedInfo.d.ts +3 -2
  11. package/src/AdaptableState/Common/ColumnScope.d.ts +4 -0
  12. package/src/AdaptableState/Common/Enums.d.ts +5 -10
  13. package/src/AdaptableState/Common/Enums.js +5 -11
  14. package/src/AdaptableState/PlusMinusState.d.ts +3 -3
  15. package/src/AdaptableState/ShortcutState.d.ts +2 -6
  16. package/src/AdaptableState/StyledColumnState.d.ts +3 -5
  17. package/src/AdaptableState/ThemeState.d.ts +33 -28
  18. package/src/Api/EventApi.d.ts +14 -1
  19. package/src/Api/Events/ThemeChanged.d.ts +6 -0
  20. package/src/Api/Events/ThemeSelected.d.ts +11 -0
  21. package/src/Api/Events/ThemeSelected.js +2 -0
  22. package/src/Api/Implementation/EventApiImpl.js +4 -0
  23. package/src/Api/Implementation/LayoutApiImpl.d.ts +0 -2
  24. package/src/Api/Implementation/LayoutApiImpl.js +0 -14
  25. package/src/Api/Implementation/LayoutHelpers.d.ts +2 -0
  26. package/src/Api/Implementation/LayoutHelpers.js +31 -8
  27. package/src/Api/Implementation/ThemeApiImpl.d.ts +3 -2
  28. package/src/Api/Implementation/ThemeApiImpl.js +19 -15
  29. package/src/Api/Internal/EventInternalApi.d.ts +2 -0
  30. package/src/Api/Internal/EventInternalApi.js +8 -1
  31. package/src/Api/Internal/StyledColumnInternalApi.d.ts +4 -4
  32. package/src/Api/Internal/StyledColumnInternalApi.js +4 -4
  33. package/src/Api/Internal/ThemeInternalApi.d.ts +0 -1
  34. package/src/Api/Internal/ThemeInternalApi.js +0 -10
  35. package/src/Api/LayoutApi.d.ts +1 -8
  36. package/src/Api/ThemeApi.d.ts +6 -2
  37. package/src/Redux/ActionsReducers/ThemeRedux.d.ts +3 -3
  38. package/src/Strategy/CalculatedColumnModule.js +3 -1
  39. package/src/Strategy/FormatColumnModule.js +12 -5
  40. package/src/Strategy/LayoutModule.js +13 -8
  41. package/src/Strategy/StyledColumnModule.js +58 -30
  42. package/src/Utilities/Constants/ReduxConstants.d.ts +2 -2
  43. package/src/Utilities/Constants/ReduxConstants.js +1 -14
  44. package/src/Utilities/Helpers/FormatHelper.js +20 -1
  45. package/src/Utilities/Helpers/SparklineOptionsHelper.d.ts +7 -0
  46. package/src/Utilities/Helpers/SparklineOptionsHelper.js +68 -0
  47. package/src/Utilities/Helpers/StyledColumnGradientHelper.d.ts +23 -1
  48. package/src/Utilities/Helpers/StyledColumnGradientHelper.js +212 -1
  49. package/src/Utilities/Helpers/ThemeHelpers.d.ts +5 -0
  50. package/src/Utilities/Helpers/ThemeHelpers.js +43 -0
  51. package/src/Utilities/Helpers/percentBarPreviewHelper.d.ts +19 -0
  52. package/src/Utilities/Helpers/percentBarPreviewHelper.js +155 -0
  53. package/src/Utilities/ObjectFactory.d.ts +1 -3
  54. package/src/Utilities/ObjectFactory.js +0 -9
  55. package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +1 -0
  56. package/src/Utilities/Services/CalculatedColumnExpressionService.js +7 -0
  57. package/src/Utilities/Services/CalculatedColumnSyntheticChange.d.ts +4 -0
  58. package/src/Utilities/Services/CalculatedColumnSyntheticChange.js +120 -0
  59. package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.d.ts +1 -0
  60. package/src/Utilities/Services/ThemeService.js +1 -1
  61. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +17 -16
  62. package/src/View/Alert/Wizard/AlertButtonsEditor.js +113 -102
  63. package/src/View/Alert/Wizard/AlertMessageWizardSection.js +12 -13
  64. package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +54 -54
  65. package/src/View/Alert/Wizard/AlertRulesWizardSection.js +4 -3
  66. package/src/View/Alert/Wizard/AlertScheduledWizardSection.js +1 -1
  67. package/src/View/Alert/Wizard/AlertScopeWizardSection.js +29 -37
  68. package/src/View/Alert/Wizard/AlertTypeWizardSection.js +2 -3
  69. package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.js +9 -13
  70. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +28 -15
  71. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +7 -9
  72. package/src/View/CalculatedColumn/Wizard/CalculatedColumnTypeSection.js +2 -2
  73. package/src/View/CellSummary/CellSummaryViewPanel.js +1 -1
  74. package/src/View/Charting/ChartingWizard/AgChargingWizard/AgChargingWizard.js +3 -10
  75. package/src/View/Charting/ChartingWizard/AgChargingWizard/PreviewChartSection.js +1 -1
  76. package/src/View/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +35 -52
  77. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/ExternalChartingWizard.js +4 -31
  78. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/PreviewChartSection.d.ts +5 -0
  79. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/PreviewChartSection.js +26 -0
  80. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.d.ts +1 -0
  81. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +9 -6
  82. package/src/View/Comments/CommentsEditor.js +1 -1
  83. package/src/View/Components/ColumnFilter/ColumnFilterWindow.js +1 -1
  84. package/src/View/Components/ModuleProfile.js +1 -1
  85. package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +0 -1
  86. package/src/View/Components/Popups/WindowPopups/windowFactory.js +1 -2
  87. package/src/View/Components/RangesComponent.d.ts +7 -2
  88. package/src/View/Components/RangesComponent.js +94 -22
  89. package/src/View/Components/Selectors/ColumnSelector.js +5 -0
  90. package/src/View/Components/StyleComponent.d.ts +1 -0
  91. package/src/View/Components/StyleComponent.js +1 -1
  92. package/src/View/Components/ValueSelector/index.js +70 -57
  93. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +8 -13
  94. package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +8 -8
  95. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -1
  96. package/src/View/DataImport/DataImportWizard/sections/ColumnsSection.js +11 -12
  97. package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadSection.js +5 -4
  98. package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadTextSection.js +2 -1
  99. package/src/View/DataImport/DataImportWizard/sections/ValidationSection.js +4 -15
  100. package/src/View/Export/Wizard/ReportColumnsWizardSection.js +24 -27
  101. package/src/View/Export/Wizard/ReportNameWizardSection.js +8 -11
  102. package/src/View/Export/Wizard/ReportRowsWizardSection.js +19 -22
  103. package/src/View/Export/Wizard/ScheduledReportSettings.d.ts +2 -0
  104. package/src/View/Export/Wizard/ScheduledReportSettings.js +12 -12
  105. package/src/View/Export/Wizard/ScheduledReportWizard.js +2 -3
  106. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +8 -6
  107. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +22 -21
  108. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +20 -11
  109. package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.js +19 -3
  110. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +4 -4
  111. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +7 -0
  112. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +120 -13
  113. package/src/View/FormatColumn/Wizard/FormatColumnPreview.d.ts +15 -0
  114. package/src/View/FormatColumn/Wizard/FormatColumnPreview.js +78 -0
  115. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +4 -0
  116. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +34 -0
  117. package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +11 -6
  118. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +1 -1
  119. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +3 -1
  120. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +64 -13
  121. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +3 -1
  122. package/src/View/FreeTextColumn/Utilities/getFreeTextColumnSettingsTags.d.ts +2 -0
  123. package/src/View/FreeTextColumn/Utilities/getFreeTextColumnSettingsTags.js +19 -0
  124. package/src/View/FreeTextColumn/Wizard/FreeTextColumnDefinitionWizardSection.d.ts +10 -0
  125. package/src/View/FreeTextColumn/Wizard/FreeTextColumnDefinitionWizardSection.js +60 -0
  126. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +2 -3
  127. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +35 -70
  128. package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +14 -10
  129. package/src/View/Layout/LayoutViewPanel.js +23 -21
  130. package/src/View/Layout/TransposedPopup.js +2 -2
  131. package/src/View/Layout/Wizard/LayoutWizard.js +3 -3
  132. package/src/View/Layout/Wizard/sections/AggregationsSection.d.ts +2 -3
  133. package/src/View/Layout/Wizard/sections/AggregationsSection.js +116 -26
  134. package/src/View/Layout/Wizard/sections/ColumnsSection.js +79 -79
  135. package/src/View/Layout/Wizard/sections/FilterSection.js +31 -32
  136. package/src/View/Layout/Wizard/sections/GridFilterSection.js +10 -10
  137. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.d.ts +1 -2
  138. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +101 -51
  139. package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +9 -8
  140. package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.js +4 -4
  141. package/src/View/Layout/Wizard/sections/RowGroupingSection.js +36 -33
  142. package/src/View/Layout/Wizard/sections/RowSelectionSection.js +2 -2
  143. package/src/View/Layout/Wizard/sections/RowSummarySection.js +95 -73
  144. package/src/View/Layout/Wizard/sections/SettingsSection.js +3 -4
  145. package/src/View/Layout/Wizard/sections/SortSection.js +2 -2
  146. package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +1 -1
  147. package/src/View/NamedQuery/Wizard/NamedQuerySettingsWizardSection.js +7 -12
  148. package/src/View/NamedQuery/Wizard/NamedQueryWizard.js +1 -3
  149. package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.d.ts +4 -0
  150. package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.js +45 -12
  151. package/src/View/PlusMinus/Wizard/PlusMinusScopeWizardSection.js +10 -17
  152. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.d.ts +2 -6
  153. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +5 -21
  154. package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +15 -21
  155. package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +2 -2
  156. package/src/View/Shortcut/Wizard/ShortcutScopeWizardSection.js +10 -17
  157. package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +16 -5
  158. package/src/View/Shortcut/Wizard/ShortcutWizard.js +2 -2
  159. package/src/View/Shortcut/shortcutOperations.d.ts +3 -0
  160. package/src/View/Shortcut/shortcutOperations.js +32 -1
  161. package/src/View/SpecialColumnSettingsWizardStep.js +7 -6
  162. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +5 -0
  163. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +26 -16
  164. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.d.ts +10 -2
  165. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +100 -15
  166. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.d.ts +14 -0
  167. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.js +48 -25
  168. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.d.ts +2 -3
  169. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +109 -33
  170. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +20 -12
  171. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.d.ts +5 -0
  172. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +124 -23
  173. package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.d.ts +1 -0
  174. package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +35 -11
  175. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.d.ts +5 -0
  176. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +88 -11
  177. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.d.ts +5 -0
  178. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +125 -35
  179. package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.d.ts +1 -0
  180. package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +55 -74
  181. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.d.ts +5 -0
  182. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.js +20 -0
  183. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.js +6 -12
  184. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarColumnComparisonPreview.js +5 -5
  185. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarRangesPreview.js +2 -1
  186. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.d.ts +5 -4
  187. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.js +11 -13
  188. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.d.ts +5 -0
  189. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.js +20 -0
  190. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.d.ts +3 -0
  191. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +32 -3
  192. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.d.ts +9 -0
  193. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +64 -0
  194. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.d.ts +10 -0
  195. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.js +35 -0
  196. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.d.ts +10 -0
  197. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.js +96 -0
  198. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.d.ts +8 -0
  199. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.js +57 -0
  200. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.d.ts +8 -0
  201. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +58 -0
  202. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.d.ts +18 -0
  203. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.js +66 -0
  204. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.d.ts +10 -0
  205. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.js +133 -0
  206. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardRangesSection.js +12 -5
  207. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.d.ts +1 -5
  208. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +53 -29
  209. package/src/View/SystemStatus/Utilities/getStatusItemStyle.js +1 -1
  210. package/src/View/Theme/ThemePopup.d.ts +2 -14
  211. package/src/View/Theme/ThemePopup.js +1 -36
  212. package/src/View/UIHelper.js +1 -1
  213. package/src/View/Wizard/OnePageAdaptableWizard.js +6 -20
  214. package/src/View/renderWithAdaptableContext.js +1 -2
  215. package/src/agGrid/AdaptableAgGrid.d.ts +1 -1
  216. package/src/agGrid/AdaptableAgGrid.js +36 -41
  217. package/src/agGrid/AgGridAdapter.d.ts +1 -1
  218. package/src/agGrid/AgGridAdapter.js +27 -17
  219. package/src/agGrid/AgGridColumnAdapter.js +10 -19
  220. package/src/agGrid/AgGridMenuAdapter.d.ts +0 -1
  221. package/src/agGrid/AgGridMenuAdapter.js +20 -37
  222. package/src/agGrid/buildValueAggregationMenuItem.d.ts +19 -0
  223. package/src/agGrid/buildValueAggregationMenuItem.js +114 -0
  224. package/src/agGrid/cellRenderers/IconRenderer.d.ts +6 -0
  225. package/src/agGrid/cellRenderers/IconRenderer.js +46 -17
  226. package/src/agGrid/createAgGridIcon.d.ts +10 -0
  227. package/src/agGrid/createAgGridIcon.js +19 -0
  228. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +10 -5
  229. package/src/components/Combobox/VirtualizedList.js +5 -5
  230. package/src/components/Combobox/comboboxUtils.d.ts +4 -1
  231. package/src/components/Combobox/comboboxUtils.js +2 -0
  232. package/src/components/Combobox/index.d.ts +1 -0
  233. package/src/components/Combobox/index.js +36 -16
  234. package/src/components/DragAndDropContext/UnusedPanel.js +1 -1
  235. package/src/components/ExpressionEditor/BaseEditorInput.js +1 -1
  236. package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +1 -1
  237. package/src/components/Input/NumberInput.js +1 -1
  238. package/src/components/Panel/index.js +1 -1
  239. package/src/components/SimpleButton/index.js +4 -4
  240. package/src/components/Toggle/Toggle.js +1 -1
  241. package/src/components/Toggle/ToggleGroup.js +1 -1
  242. package/src/components/Tree/TreeDropdown/index.js +1 -5
  243. package/src/env.js +2 -2
  244. package/src/layout-manager/src/LayoutManagerModel.d.ts +5 -1
  245. package/src/layout-manager/src/index.js +2 -9
  246. package/src/metamodel/adaptable.metamodel.d.ts +39 -46
  247. package/src/metamodel/adaptable.metamodel.js +1 -1
  248. package/src/types.d.ts +5 -5
  249. package/themes/dark.css +1 -68
  250. package/themes/light.css +1 -5
  251. package/tsconfig.cjs.tsbuildinfo +1 -1
  252. package/src/AdaptableState/Common/FilterActionOnDataChange.d.ts +0 -17
  253. package/src/AdaptableState/Common/FilterActionOnDataChange.js +0 -5
  254. package/src/Aggregation/ParameterizedAggregationRegistry.d.ts +0 -35
  255. package/src/Aggregation/ParameterizedAggregationRegistry.js +0 -74
  256. package/src/Aggregation/definitions/weightedAverageAggregationDefinition.d.ts +0 -3
  257. package/src/Aggregation/definitions/weightedAverageAggregationDefinition.js +0 -58
  258. package/src/Aggregation/parameterizedAggregationColumnMenu.d.ts +0 -8
  259. package/src/Aggregation/parameterizedAggregationColumnMenu.js +0 -143
  260. package/src/Aggregation/parameterizedAggregationHeader.d.ts +0 -13
  261. package/src/Aggregation/parameterizedAggregationHeader.js +0 -65
  262. package/src/Aggregation/parameterizedAggregationHelpers.d.ts +0 -23
  263. package/src/Aggregation/parameterizedAggregationHelpers.js +0 -121
  264. package/src/Aggregation/parameterizedAggregationWizardHelpers.d.ts +0 -9
  265. package/src/Aggregation/parameterizedAggregationWizardHelpers.js +0 -74
  266. package/src/Aggregation/validateParameterizedAggregations.d.ts +0 -4
  267. package/src/Aggregation/validateParameterizedAggregations.js +0 -25
  268. package/src/View/AdaptableComputedCSSVarsContext.d.ts +0 -12
  269. package/src/View/AdaptableComputedCSSVarsContext.js +0 -36
  270. package/src/View/Layout/Wizard/sections/ParameterizedAggFuncPicker.d.ts +0 -12
  271. package/src/View/Layout/Wizard/sections/ParameterizedAggFuncPicker.js +0 -48
  272. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgeSettings.d.ts +0 -5
  273. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgeSettings.js +0 -32
  274. package/src/View/Theme/VariantSelector.d.ts +0 -8
  275. package/src/View/Theme/VariantSelector.js +0 -25
  276. package/src/components/Select/CSSNumericVariableWatch.d.ts +0 -11
  277. package/src/components/Select/CSSNumericVariableWatch.js +0 -51
@@ -1,74 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getAdaptableAggFuncNamesForColumn = getAdaptableAggFuncNamesForColumn;
4
- exports.buildAggregationColumnsMap = buildAggregationColumnsMap;
5
- exports.resolveAggFuncValueFromWizardSelection = resolveAggFuncValueFromWizardSelection;
6
- exports.upsertColumnAggregationEntry = upsertColumnAggregationEntry;
7
- exports.getParameterizedArgColumnLabel = getParameterizedArgColumnLabel;
8
- exports.formatParameterizedArgSelectionLabel = formatParameterizedArgSelectionLabel;
9
- const AggregationColumns_1 = require("../AdaptableState/Common/AggregationColumns");
10
- const ParameterizedAggregationRegistry_1 = require("./ParameterizedAggregationRegistry");
11
- function getAdaptableAggFuncNamesForColumn(column) {
12
- return (0, ParameterizedAggregationRegistry_1.getParameterizedAggregationDefinitions)()
13
- .filter((definition) => definition.isAvailableForColumn(column))
14
- .map((definition) => definition.agGridAggFuncName);
15
- }
16
- function buildAggregationColumnsMap(entries, allColumnsMap) {
17
- return (entries || []).reduce((acc, { ColumnId: colId, AggFunc }) => {
18
- if (typeof AggFunc === 'boolean') {
19
- const defaultFn = allColumnsMap[colId]?.aggregationFunction;
20
- acc[colId] = typeof defaultFn === 'string' ? defaultFn : '';
21
- }
22
- else if ((0, ParameterizedAggregationRegistry_1.isParameterizedAggregation)(AggFunc)) {
23
- const fnName = (0, AggregationColumns_1.getAggFuncName)(AggFunc);
24
- acc[colId] = typeof fnName === 'string' ? fnName : '';
25
- }
26
- else if (typeof AggFunc === 'string') {
27
- acc[colId] = AggFunc;
28
- }
29
- return acc;
30
- }, {});
31
- }
32
- function resolveAggFuncValueFromWizardSelection(fnName) {
33
- const definition = (0, ParameterizedAggregationRegistry_1.getParameterizedAggregationDefinitionByAgGridName)(fnName);
34
- if (definition) {
35
- return definition.createInitialDefinition();
36
- }
37
- return fnName;
38
- }
39
- function upsertColumnAggregationEntry(entries, columnId, aggFunc) {
40
- let aggCols = [...(entries || [])];
41
- let found = false;
42
- aggCols = aggCols.map((entry) => {
43
- if (entry.ColumnId === columnId) {
44
- found = true;
45
- return { ColumnId: columnId, AggFunc: aggFunc };
46
- }
47
- return entry;
48
- });
49
- if (!found) {
50
- aggCols.push({ ColumnId: columnId, AggFunc: aggFunc });
51
- }
52
- return aggCols;
53
- }
54
- function getParameterizedArgColumnLabel(aggFuncName) {
55
- return (0, ParameterizedAggregationRegistry_1.getParameterizedAggregationDefinitionByAgGridName)(aggFuncName)?.argColumnLabel ?? 'Argument';
56
- }
57
- function formatParameterizedArgSelectionLabel(api, valueColumnId, aggValue) {
58
- if (!(0, ParameterizedAggregationRegistry_1.isParameterizedAggregation)(aggValue)) {
59
- return 'Select';
60
- }
61
- const definition = (0, ParameterizedAggregationRegistry_1.getParameterizedAggregationDefinition)(aggValue.type);
62
- if (!definition) {
63
- return 'Select';
64
- }
65
- if (definition.isComplete(aggValue) && definition.formatSummaryLabel) {
66
- const shortLabel = definition.formatSummaryLabel(api, valueColumnId, aggValue);
67
- const argPart = shortLabel.match(/\(([^)]+)\)/)?.[1];
68
- if (argPart?.includes('-')) {
69
- return argPart.split('-').slice(1).join('-');
70
- }
71
- return argPart ?? 'Select';
72
- }
73
- return `Select ${definition.argColumnLabel ?? 'value'}`;
74
- }
@@ -1,4 +0,0 @@
1
- import { Layout, PivotLayout, TableLayout } from '../AdaptableState/LayoutState';
2
- export declare function validateParameterizedAggregationsInLayout(layout: Layout): true | string;
3
- export declare function validateTableLayoutAggregations(layout: TableLayout): true | string;
4
- export declare function validatePivotLayoutAggregations(layout: PivotLayout): true | string;
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateParameterizedAggregationsInLayout = validateParameterizedAggregationsInLayout;
4
- exports.validateTableLayoutAggregations = validateTableLayoutAggregations;
5
- exports.validatePivotLayoutAggregations = validatePivotLayoutAggregations;
6
- const ParameterizedAggregationRegistry_1 = require("./ParameterizedAggregationRegistry");
7
- const parameterizedAggregationHelpers_1 = require("./parameterizedAggregationHelpers");
8
- function validateParameterizedAggregationsInLayout(layout) {
9
- const entries = (0, parameterizedAggregationHelpers_1.getAggregationColumnsFromLayout)(layout) || [];
10
- for (const { AggFunc } of entries) {
11
- if ((0, ParameterizedAggregationRegistry_1.isParameterizedAggregation)(AggFunc)) {
12
- const definition = (0, ParameterizedAggregationRegistry_1.getParameterizedAggregationDefinition)(AggFunc.type);
13
- if (definition && !definition.isComplete(AggFunc)) {
14
- return `${definition.label} requires all arguments to be selected.`;
15
- }
16
- }
17
- }
18
- return true;
19
- }
20
- function validateTableLayoutAggregations(layout) {
21
- return validateParameterizedAggregationsInLayout(layout);
22
- }
23
- function validatePivotLayoutAggregations(layout) {
24
- return validateParameterizedAggregationsInLayout(layout);
25
- }
@@ -1,12 +0,0 @@
1
- import * as React from 'react';
2
- declare const computedCSSVarNames: readonly ["--ab-cmp-select-menu__max-width", "--ab-cmp-select-menu__min-width", "--ab-cmp-select-menu__max-height"];
3
- type AdaptableComputedCSSVars = {
4
- [key in (typeof computedCSSVarNames)[number]]: string | number;
5
- };
6
- export declare const AdaptableComputedCSSVarsContext: React.Context<AdaptableComputedCSSVars>;
7
- export declare const WithAdaptableComputedCSSVars: ({ children }: {
8
- children: React.ReactNode;
9
- }) => React.JSX.Element;
10
- export declare const useAdaptableComputedCSSVars: () => AdaptableComputedCSSVars;
11
- export declare const useAdaptableComputedCSSVar: (varName: (typeof computedCSSVarNames)[number]) => string | number;
12
- export {};
@@ -1,36 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useAdaptableComputedCSSVar = exports.useAdaptableComputedCSSVars = exports.WithAdaptableComputedCSSVars = exports.AdaptableComputedCSSVarsContext = void 0;
4
- const tslib_1 = require("tslib");
5
- const jsx_runtime_1 = require("react/jsx-runtime");
6
- const React = tslib_1.__importStar(require("react"));
7
- const CSSNumericVariableWatch_1 = require("../components/Select/CSSNumericVariableWatch");
8
- const debounce_1 = tslib_1.__importDefault(require("../Utilities/utils/debounce"));
9
- const react_1 = require("react");
10
- const computedCSSVarNames = [
11
- '--ab-cmp-select-menu__max-width',
12
- '--ab-cmp-select-menu__min-width',
13
- '--ab-cmp-select-menu__max-height',
14
- ];
15
- const defaultValues = Object.fromEntries(computedCSSVarNames.map((varName) => [varName, 0]));
16
- exports.AdaptableComputedCSSVarsContext = React.createContext(defaultValues);
17
- const WithAdaptableComputedCSSVars = ({ children }) => {
18
- const [computedCSSVars, doSetComputedCSSVars] = React.useState(defaultValues);
19
- const setComputedCSSVars = (0, react_1.useMemo)(() => {
20
- return (0, debounce_1.default)(doSetComputedCSSVars, 300, { leading: false, trailing: true });
21
- }, [doSetComputedCSSVars]);
22
- return ((0, jsx_runtime_1.jsxs)(exports.AdaptableComputedCSSVarsContext.Provider, { value: computedCSSVars, children: [children, computedCSSVarNames.map((varName) => ((0, jsx_runtime_1.jsx)(CSSNumericVariableWatch_1.CSSNumericVariableWatch, { varName: varName, onChange: (value) => {
23
- setComputedCSSVars((prev) => ({ ...prev, [varName]: value }));
24
- } }, varName)))] }));
25
- };
26
- exports.WithAdaptableComputedCSSVars = WithAdaptableComputedCSSVars;
27
- const useAdaptableComputedCSSVars = () => {
28
- const context = React.useContext(exports.AdaptableComputedCSSVarsContext);
29
- return context;
30
- };
31
- exports.useAdaptableComputedCSSVars = useAdaptableComputedCSSVars;
32
- const useAdaptableComputedCSSVar = (varName) => {
33
- const context = React.useContext(exports.AdaptableComputedCSSVarsContext);
34
- return context?.[varName];
35
- };
36
- exports.useAdaptableComputedCSSVar = useAdaptableComputedCSSVar;
@@ -1,12 +0,0 @@
1
- import * as React from 'react';
2
- import { AdaptableColumn } from '../../../../AdaptableState/Common/AdaptableColumn';
3
- import { AggregationColumnValue, TableAggregationColumns } from '../../../../AdaptableState/Common/AggregationColumns';
4
- export declare const ParameterizedAggFuncPicker: React.FunctionComponent<{
5
- column: AdaptableColumn;
6
- aggValue?: AggregationColumnValue;
7
- aggregationColumnsMap: Record<string, string>;
8
- numberColumns: AdaptableColumn[];
9
- aggregationEntries: TableAggregationColumns;
10
- onChangeEntries: (entries: TableAggregationColumns) => void;
11
- availableAggregationFunctions?: string[];
12
- }>;
@@ -1,48 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ParameterizedAggFuncPicker = void 0;
4
- const tslib_1 = require("tslib");
5
- const jsx_runtime_1 = require("react/jsx-runtime");
6
- const DropdownButton_1 = tslib_1.__importDefault(require("../../../../components/DropdownButton"));
7
- const ParameterizedAggregationRegistry_1 = require("../../../../Aggregation/ParameterizedAggregationRegistry");
8
- const parameterizedAggregationWizardHelpers_1 = require("../../../../Aggregation/parameterizedAggregationWizardHelpers");
9
- const AdaptableContext_1 = require("../../../AdaptableContext");
10
- const Flex_1 = require("../../../../components/Flex");
11
- const ParameterizedAggFuncPicker = (props) => {
12
- const adaptable = (0, AdaptableContext_1.useAdaptable)();
13
- const adaptableAggFunctions = (0, parameterizedAggregationWizardHelpers_1.getAdaptableAggFuncNamesForColumn)(props.column);
14
- const availableAggregationFunctions = props.availableAggregationFunctions ?? props.column.availableAggregationFunctions ?? [];
15
- const aggOptions = [
16
- ...new Set([...availableAggregationFunctions, ...adaptableAggFunctions]),
17
- ].map((fnName) => ({
18
- label: fnName,
19
- onClick: () => {
20
- const aggFuncValue = (0, parameterizedAggregationWizardHelpers_1.resolveAggFuncValueFromWizardSelection)(fnName);
21
- props.onChangeEntries((0, parameterizedAggregationWizardHelpers_1.upsertColumnAggregationEntry)(props.aggregationEntries, props.column.columnId, aggFuncValue));
22
- },
23
- }));
24
- const currentAggFnName = props.aggregationColumnsMap[props.column.columnId];
25
- const parameterizedDefinition = currentAggFnName
26
- ? (0, ParameterizedAggregationRegistry_1.getParameterizedAggregationDefinitionByAgGridName)(currentAggFnName)
27
- : undefined;
28
- const numericColumnsOptions = props.numberColumns
29
- .filter((col) => col.columnId !== props.column.columnId)
30
- .map((col) => {
31
- return {
32
- label: col.friendlyName,
33
- onClick: () => {
34
- const definition = parameterizedDefinition;
35
- if (!definition?.createDefinition) {
36
- return;
37
- }
38
- props.onChangeEntries((0, parameterizedAggregationWizardHelpers_1.upsertColumnAggregationEntry)(props.aggregationEntries, props.column.columnId, definition.createDefinition(col.columnId)));
39
- },
40
- };
41
- });
42
- const argSelectionLabel = (0, parameterizedAggregationWizardHelpers_1.formatParameterizedArgSelectionLabel)(adaptable.api, props.column.columnId, props.aggValue);
43
- if (!props.aggValue) {
44
- return null;
45
- }
46
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(DropdownButton_1.default, { columns: ['label'], items: aggOptions, className: "twa:ml-2", children: currentAggFnName }), parameterizedDefinition && ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: "twa:bg-primary twa:ml-3", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { children: (0, parameterizedAggregationWizardHelpers_1.getParameterizedArgColumnLabel)(currentAggFnName) }), ' ', (0, jsx_runtime_1.jsx)(DropdownButton_1.default, { columns: ['label'], items: numericColumnsOptions, className: "twa:ml-2", children: argSelectionLabel })] }))] }));
47
- };
48
- exports.ParameterizedAggFuncPicker = ParameterizedAggFuncPicker;
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- import { StyledColumn } from '../../../../../types';
3
- export declare const StyledColumnBadgeSettings: React.FunctionComponent<React.PropsWithChildren<{
4
- data: StyledColumn;
5
- }>>;
@@ -1,32 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StyledColumnBadgeSettings = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const Tag_1 = require("../../../../../components/Tag");
6
- const AdaptableContext_1 = require("../../../../AdaptableContext");
7
- const Flex_1 = require("../../../../../components/Flex");
8
- const StyledColumnBadgeSettings = ({ data }) => {
9
- const adaptable = (0, AdaptableContext_1.useAdaptable)();
10
- const badgeStyle = data.BadgeStyle;
11
- if (!badgeStyle || !badgeStyle.Badges || badgeStyle.Badges.length === 0) {
12
- return (0, jsx_runtime_1.jsx)("div", { children: "No Badges Defined" });
13
- }
14
- const density = badgeStyle.Density ?? 'Normal';
15
- const spacing = typeof badgeStyle.Spacing === 'number' ? badgeStyle.Spacing : null;
16
- const overflowMode = badgeStyle.OverflowMode ?? 'Truncate';
17
- return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: "twa:my-1 twa:flex-wrap twa:gap-2", children: [(0, jsx_runtime_1.jsxs)(Tag_1.Tag, { children: ["Density: ", density] }), spacing != null && (0, jsx_runtime_1.jsxs)(Tag_1.Tag, { children: ["Spacing: ", spacing, "px"] }), (0, jsx_runtime_1.jsxs)(Tag_1.Tag, { children: ["Overflow: ", overflowMode] })] }), badgeStyle.Badges.map((badge, index) => {
18
- let ruleString = 'No Rule';
19
- if (badge.Predicate) {
20
- ruleString = adaptable.api.predicateApi.predicateToString(badge.Predicate);
21
- }
22
- if (badge.Expression) {
23
- ruleString = badge.Expression.BooleanExpression;
24
- }
25
- const iconOnly = badge.Icon && badge.IconOnly;
26
- const hasIconPosition = badge.Icon && badge.IconPosition;
27
- const iconPosition = hasIconPosition ? 'Icon Position: ' + badge.IconPosition : '';
28
- const shape = badge.Shape;
29
- return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:my-2", children: [(0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: ruleString }), shape && (0, jsx_runtime_1.jsx)(Tag_1.Tag, { className: "twa:ml-2", children: `Shape: ${shape}` }), iconOnly && (0, jsx_runtime_1.jsx)(Tag_1.Tag, { className: "twa:ml-2", children: 'Icon Only' }), hasIconPosition && (0, jsx_runtime_1.jsx)(Tag_1.Tag, { className: "twa:ml-2", children: iconPosition }), typeof badge.IconGap === 'number' && ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { className: "twa:ml-2", children: `Icon Gap: ${badge.IconGap}px` }))] }, index));
30
- })] }));
31
- };
32
- exports.StyledColumnBadgeSettings = StyledColumnBadgeSettings;
@@ -1,8 +0,0 @@
1
- import * as React from 'react';
2
- import { AdaptableTheme } from '../../types';
3
- export interface VariantSelectorProps {
4
- theme: AdaptableTheme;
5
- onChange: (variant: AdaptableTheme['Variant'] | null) => void;
6
- disabled?: boolean;
7
- }
8
- export declare const VariantSelector: React.FunctionComponent<VariantSelectorProps>;
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.VariantSelector = void 0;
4
- const tslib_1 = require("tslib");
5
- const jsx_runtime_1 = require("react/jsx-runtime");
6
- const DropdownButton_1 = tslib_1.__importDefault(require("../../components/DropdownButton"));
7
- const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
8
- const AdaptableContext_1 = require("../AdaptableContext");
9
- const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
10
- const VariantSelector = (props) => {
11
- const adaptable = (0, AdaptableContext_1.useAdaptable)();
12
- const systemTemes = adaptable.api.themeApi
13
- .getSystemThemes()
14
- .filter((theme) => theme.Name !== GeneralConstants_1.OS_THEME);
15
- const options = systemTemes.map((theme) => ({
16
- label: theme.Description,
17
- value: theme.Name,
18
- onClick: () => props.onChange(theme.Name),
19
- }));
20
- const label = props.theme.Variant
21
- ? options.find((theme) => theme.value === props.theme.Variant)?.label
22
- : 'Select a theme';
23
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(DropdownButton_1.default, { className: "twa:mr-2", columns: ['label'], items: options, disabled: props.disabled, children: label }), (0, jsx_runtime_1.jsx)(SimpleButton_1.default, { onClick: () => props.onChange(null), disabled: !props.theme.Variant || props.disabled, hidden: props.disabled, icon: "delete" })] }));
24
- };
25
- exports.VariantSelector = VariantSelector;
@@ -1,11 +0,0 @@
1
- import * as React from 'react';
2
- type CSSVariableWatcherProps = {
3
- varName: string;
4
- onChange: (value: number) => void;
5
- allowInts?: boolean;
6
- };
7
- export declare const useCSSVariableWatch: (params: CSSVariableWatcherProps & {
8
- ref: React.MutableRefObject<HTMLElement | null>;
9
- }) => void;
10
- export declare const CSSNumericVariableWatch: (props: CSSVariableWatcherProps) => React.JSX.Element;
11
- export {};
@@ -1,51 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CSSNumericVariableWatch = exports.useCSSVariableWatch = void 0;
4
- const tslib_1 = require("tslib");
5
- const jsx_runtime_1 = require("react/jsx-runtime");
6
- const React = tslib_1.__importStar(require("react"));
7
- const react_1 = require("react");
8
- const ResizeObserver_1 = require("../ResizeObserver");
9
- const WRAPPER_STYLE = {
10
- position: 'absolute',
11
- pointerEvents: 'none',
12
- width: 0,
13
- height: 0,
14
- lineHeight: 0,
15
- fontSize: 0,
16
- overflow: 'hidden',
17
- };
18
- const useCSSVariableWatch = (params) => {
19
- const lastValueRef = (0, react_1.useRef)(0);
20
- const onResize = React.useCallback(({ height }) => {
21
- if (height != null && height !== lastValueRef.current) {
22
- lastValueRef.current = height;
23
- params.onChange(height);
24
- }
25
- }, [params.onChange]);
26
- (0, ResizeObserver_1.useResizeObserver)(params.ref, onResize, { earlyAttach: true });
27
- React.useLayoutEffect(() => {
28
- const value = params.ref.current.getBoundingClientRect().height;
29
- if (value != null) {
30
- lastValueRef.current = value;
31
- return params.onChange(value);
32
- }
33
- else {
34
- console.warn(`Specified variable ${params.varName} not found or does not have a numeric value.`);
35
- }
36
- }, []);
37
- };
38
- exports.useCSSVariableWatch = useCSSVariableWatch;
39
- const CSSNumericVariableWatch = (props) => {
40
- const domRef = (0, react_1.useRef)(null);
41
- (0, exports.useCSSVariableWatch)({
42
- ...props,
43
- ref: domRef,
44
- });
45
- const height = props.varName.startsWith('var(') ? props.varName : `var(${props.varName})`;
46
- const { allowInts = false } = props;
47
- return ((0, jsx_runtime_1.jsx)("div", { "data-name": "css-variable-watcher", "data-var": props.varName, style: WRAPPER_STYLE, children: (0, jsx_runtime_1.jsx)("div", { ref: domRef, style: {
48
- height: allowInts ? `calc(1px * ${height})` : height, // we do multiplication in order to support integer (without px) values as well
49
- } }) }));
50
- };
51
- exports.CSSNumericVariableWatch = CSSNumericVariableWatch;