@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
@@ -3,17 +3,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SettingsSection = exports.isSettingsValid = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
- const FormLayout_1 = tslib_1.__importStar(require("../../../../components/FormLayout"));
7
6
  const chartingHelper_1 = require("../../../../Utilities/Helpers/chartingHelper");
8
- const AdaptableInput_1 = tslib_1.__importDefault(require("../../../Components/AdaptableInput"));
7
+ const Flex_1 = require("../../../../components/Flex");
8
+ const Card_1 = require("../../../../components/Card");
9
+ const Input_1 = tslib_1.__importDefault(require("../../../../components/Input"));
10
+ const PreviewChartSection_1 = require("./PreviewChartSection");
9
11
  const isSettingsValid = (chartDefinition, api) => {
10
12
  return (0, chartingHelper_1.validateChartName)(api, chartDefinition.Name, chartDefinition.Uuid);
11
13
  };
12
14
  exports.isSettingsValid = isSettingsValid;
13
15
  const SettingsSection = (props) => {
14
- return ((0, jsx_runtime_1.jsx)(FormLayout_1.default, { children: (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Name", children: (0, jsx_runtime_1.jsx)(AdaptableInput_1.default, { value: props.chartDefinition.Name, onChange: (e) => props.onChange({
15
- ...props.chartDefinition,
16
- Name: e.target.value,
17
- }) }) }) }));
16
+ const { chartDefinition, onChange, showPreview } = props;
17
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-3 twa:h-full twa:min-h-0", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Name" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Provide a unique name for the chart" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsx)(Input_1.default, { "data-name": "chart-name", className: "twa:max-w-[300px] twa:w-full", value: chartDefinition.Name ?? '', placeholder: "Enter chart name", onChange: (event) => onChange({
18
+ ...chartDefinition,
19
+ Name: event.target.value,
20
+ }) }) })] }), showPreview ? ((0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:flex-1 twa:min-h-0", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Preview" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Live preview of the external chart" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:flex-1 twa:min-h-[280px]", children: (0, jsx_runtime_1.jsx)(PreviewChartSection_1.PreviewChartSection, { chartDefinition: chartDefinition }) })] })) : null] }));
18
21
  };
19
22
  exports.SettingsSection = SettingsSection;
@@ -57,7 +57,7 @@ const CommentsEditor = (props) => {
57
57
  const formatDate = (date, format) => {
58
58
  return FormatHelper_1.default.DateFormatter(date, { Pattern: format });
59
59
  };
60
- return ((0, jsx_runtime_1.jsxs)(Panel_1.default, { color: "var(--ab-color-text-on-primary)", onClick: () => props.enableEditMode(), className: "ab-CommentPopup twa:min-w-[250px]", onKeyDown: (event) => {
60
+ return ((0, jsx_runtime_1.jsxs)(Panel_1.default, { color: "var(--ab-color-primary-foreground)", onClick: () => props.enableEditMode(), className: "ab-CommentPopup twa:min-w-[250px]", onKeyDown: (event) => {
61
61
  if (event.key === 'Escape') {
62
62
  api.commentApi.hideCommentsPopup();
63
63
  }
@@ -32,6 +32,6 @@ const ColumnFilterWindow = (props) => {
32
32
  return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { children: [label, (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex-1" }), (0, jsx_runtime_1.jsx)(AdaptableIconComponent_1.AdaptableIconComponent, { icon: { name: 'filter' } })] }));
33
33
  }
34
34
  return label;
35
- }, onChange: (column) => setColumnId(column), filterColumn: (column) => column.queryable, isMulti: false, value: columnId }) }) }) }), (0, jsx_runtime_1.jsx)(AdaptableColumnFilter_1.AdaptableColumnFilter, { columnId: columnId, location: 'filterForm' })] }));
35
+ }, onChange: (column) => setColumnId(column), filterColumn: (column) => column.queryable, value: columnId }) }) }) }), (0, jsx_runtime_1.jsx)(AdaptableColumnFilter_1.AdaptableColumnFilter, { columnId: columnId, location: 'filterForm' })] }));
36
36
  };
37
37
  exports.ColumnFilterWindow = ColumnFilterWindow;
@@ -8,7 +8,7 @@ const icons_1 = require("../../components/icons");
8
8
  class ModuleProfile extends React.Component {
9
9
  render() {
10
10
  return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { name: this.props.moduleInfo.Glyph, style: {
11
- fill: 'var(--ab-color-text-on-primary)',
11
+ fill: 'var(--ab-color-primary-foreground)',
12
12
  } }), ' ', this.props.moduleInfo.FriendlyName] }));
13
13
  }
14
14
  }
@@ -1,7 +1,6 @@
1
1
  import { WindowPopupChildProps } from './WindowPopups';
2
2
  export declare const WINDOW_GRID_FILTER_EDITOR = "WINDOW_GRID_FILTER_EDITOR";
3
3
  export declare const SHOW_PIVOT_COLUMN_DETAILS = "SHOW_PIVOT_COLUMN_DETAILS";
4
- export declare const SHOW_THEME_EDITOR = "SHOW_THEME_EDITOR";
5
4
  export declare const WINDOW_SHOW_TRANSPOSED_VIEW = "WINDOW_SHOW_TRANSPOSED_VIEW";
6
5
  export declare const COLUMN_FILTER_WINDOW = "COLUMN_FILTER_WINDOW";
7
6
  export declare const windowFactory: Record<string, React.FunctionComponent<WindowPopupChildProps>>;
@@ -1,13 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.windowFactory = exports.COLUMN_FILTER_WINDOW = exports.WINDOW_SHOW_TRANSPOSED_VIEW = exports.SHOW_THEME_EDITOR = exports.SHOW_PIVOT_COLUMN_DETAILS = exports.WINDOW_GRID_FILTER_EDITOR = void 0;
3
+ exports.windowFactory = exports.COLUMN_FILTER_WINDOW = exports.WINDOW_SHOW_TRANSPOSED_VIEW = exports.SHOW_PIVOT_COLUMN_DETAILS = exports.WINDOW_GRID_FILTER_EDITOR = void 0;
4
4
  const GridFilterWindowPopup_1 = require("../../../GridFilter/GridFilterWindowPopup");
5
5
  const PivotDetailsPopoup_1 = require("../../../Layout/PivotDetailsPopoup");
6
6
  const TransposedPopup_1 = require("../../../Layout/TransposedPopup");
7
7
  const ColumnFilterWindow_1 = require("../../ColumnFilter/ColumnFilterWindow");
8
8
  exports.WINDOW_GRID_FILTER_EDITOR = 'WINDOW_GRID_FILTER_EDITOR';
9
9
  exports.SHOW_PIVOT_COLUMN_DETAILS = 'SHOW_PIVOT_COLUMN_DETAILS';
10
- exports.SHOW_THEME_EDITOR = 'SHOW_THEME_EDITOR';
11
10
  exports.WINDOW_SHOW_TRANSPOSED_VIEW = 'WINDOW_SHOW_TRANSPOSED_VIEW';
12
11
  exports.COLUMN_FILTER_WINDOW = 'COLUMN_FILTER_WINDOW';
13
12
  exports.windowFactory = {
@@ -14,7 +14,7 @@ export interface RangesComponentProps extends React.ClassAttributes<RangesCompon
14
14
  minMaxRangeValues: {
15
15
  min: number;
16
16
  max: number;
17
- };
17
+ } | null;
18
18
  disabled?: boolean;
19
19
  /**
20
20
  * When true, the user may delete every band so `ranges` becomes `[]`.
@@ -45,7 +45,7 @@ export interface RangesComponentProps extends React.ClassAttributes<RangesCompon
45
45
  showRangeDirection?: boolean;
46
46
  }
47
47
  export interface RangesComponentState {
48
- rangesType: 'NumberRange' | 'PercentageRange' | 'ZeroCentred' | 'ColumnComparison';
48
+ rangesType: 'None' | 'NumberRange' | 'PercentageRange' | 'ZeroCentred' | 'ColumnComparison';
49
49
  }
50
50
  export declare class RangesComponent extends React.Component<RangesComponentProps, RangesComponentState> {
51
51
  constructor(props: RangesComponentProps);
@@ -60,6 +60,11 @@ export declare class RangesComponent extends React.Component<RangesComponentProp
60
60
  setRangeColMin(range: CellColorRange): void;
61
61
  setRangeColMax(range: CellColorRange): void;
62
62
  addRange(): void;
63
+ /**
64
+ * When there is exactly one band spanning the full scale (Col-Min→Col-Max or
65
+ * 0→100), split at the midpoint instead of at the column maximum.
66
+ */
67
+ private splitFullSpanRangeAtMidpoint;
63
68
  changeColumnComparisonMinValue(value: number): void;
64
69
  private onMinColumnSelectedChanged;
65
70
  changeColumnComparisonMaxValue(value: number): void;
@@ -19,14 +19,16 @@ const DEFAULT_ZERO_CENTRED_COLORS = {
19
19
  NegativeColor: 'rgba(220, 53, 69, 0.55)',
20
20
  PositiveColor: 'rgba(40, 167, 69, 0.55)',
21
21
  };
22
+ const hasConfiguredRanges = (ranges) => (ranges?.length ?? 0) > 0;
22
23
  /**
23
- * Decide which of the four range tabs should be active given the current props.
24
+ * Decide which range tab should be active given the current props.
24
25
  *
25
26
  * Precedence:
26
27
  * 1. `columnComparison` set → Column Comparison tab
27
28
  * 2. Zero Centred set + supported → Zero Centred tab
28
- * 3. `rangeValueType === 'Percentage'`Percentage Range tab
29
- * 4. otherwise Number Range tab (default for new styles)
29
+ * 3. `allowEmptyRanges` + no bands No Ranges tab
30
+ * 4. `rangeValueType === 'Percentage'` Percentage Range tab
31
+ * 5. otherwise → Number Range tab (default for new styles)
30
32
  */
31
33
  function deriveInitialRangesType(props) {
32
34
  if (props.columnComparison) {
@@ -35,6 +37,9 @@ function deriveInitialRangesType(props) {
35
37
  if (props.showZeroCentredTab && props.zeroCentred) {
36
38
  return 'ZeroCentred';
37
39
  }
40
+ if (props.allowEmptyRanges && !hasConfiguredRanges(props.ranges)) {
41
+ return 'None';
42
+ }
38
43
  return props.rangeValueType === 'Percentage' ? 'PercentageRange' : 'NumberRange';
39
44
  }
40
45
  class RangesComponent extends React.Component {
@@ -70,6 +75,7 @@ class RangesComponent extends React.Component {
70
75
  // vs Percentage Range tab) instead of an inline radio. The inner content
71
76
  // is shared between the two range tabs and parameterised on this flag.
72
77
  const isRangeValueTypeNumber = this.state.rangesType === 'NumberRange';
78
+ const renderNoneContent = () => ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2 twa:opacity-70 twa:py-2 twa:max-w-[520px]", children: "No coloured bands configured" }));
73
79
  const renderRangesContent = () => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [this.props.ranges?.map((range, index, list) => ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "end", className: "twa:mb-2", "data-name": "percent-bar-range", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", children: [isRangeValueTypeNumber && index === 0 && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { onClick: () => this.setRangeColMin(range), checked: range.Min === 'Col-Min', className: "twa:mt-0 twa:mb-1 twa:text-3", disabled: this.props.disabled, children: "Col Min" })), (0, jsx_runtime_1.jsx)(NumberInput_1.NumberInput, { disabled: this.props.disabled ||
74
80
  range.Min === 'Col-Min' ||
75
81
  (index === 0 && !isRangeValueTypeNumber), value: range.Min, onChange: (value) => {
@@ -101,7 +107,7 @@ class RangesComponent extends React.Component {
101
107
  const tabFlex = { flex: 1 };
102
108
  const radioCls = 'twa:m-0 twa:align-baseline';
103
109
  const renderTabRadio = (label, value) => ((0, jsx_runtime_1.jsx)(Radio_1.default, { tabIndex: -1, className: radioCls, checked: this.state.rangesType === value, children: label }));
104
- return ((0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { autoFocus: false, className: "twa:mt-2", value: this.state.rangesType, onValueChange: (v) => this.handleRangesModeTab(v), children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Tab, { value: "NumberRange", style: tabFlex, children: renderTabRadio('Number Range', 'NumberRange') }), (0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Tab, { value: "PercentageRange", style: tabFlex, children: renderTabRadio('Percentage Range', 'PercentageRange') }), this.props.showZeroCentredTab && ((0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Tab, { value: "ZeroCentred", style: tabFlex, children: renderTabRadio('Zero Centred Range', 'ZeroCentred') })), !this.props.hideColumnComparison && ((0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Tab, { value: "ColumnComparison", style: tabFlex, children: renderTabRadio('Column Comparison', 'ColumnComparison') })), (0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Content, { value: "NumberRange", children: renderRangesContent() }), (0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Content, { value: "PercentageRange", children: renderRangesContent() }), this.props.showZeroCentredTab && ((0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Content, { value: "ZeroCentred", children: renderZeroCentredContent() })), !this.props.hideColumnComparison && ((0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Content, { value: "ColumnComparison", children: renderColumnComparisonContent() }))] }));
110
+ return ((0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { autoFocus: false, className: "twa:mt-2", value: this.state.rangesType, onValueChange: (v) => this.handleRangesModeTab(v), children: [this.props.allowEmptyRanges && ((0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Tab, { value: "None", style: tabFlex, children: renderTabRadio('No Ranges', 'None') })), (0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Tab, { value: "NumberRange", style: tabFlex, children: renderTabRadio('Number Range', 'NumberRange') }), (0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Tab, { value: "PercentageRange", style: tabFlex, children: renderTabRadio('Percentage Range', 'PercentageRange') }), this.props.showZeroCentredTab && ((0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Tab, { value: "ZeroCentred", style: tabFlex, children: renderTabRadio('Zero Centred Range', 'ZeroCentred') })), !this.props.hideColumnComparison && ((0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Tab, { value: "ColumnComparison", style: tabFlex, children: renderTabRadio('Column Comparison', 'ColumnComparison') })), this.props.allowEmptyRanges && ((0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Content, { value: "None", children: renderNoneContent() })), (0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Content, { value: "NumberRange", children: renderRangesContent() }), (0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Content, { value: "PercentageRange", children: renderRangesContent() }), this.props.showZeroCentredTab && ((0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Content, { value: "ZeroCentred", children: renderZeroCentredContent() })), !this.props.hideColumnComparison && ((0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Content, { value: "ColumnComparison", children: renderColumnComparisonContent() }))] }));
105
111
  }
106
112
  componentDidUpdate(prevProps) {
107
113
  const wasComparison = !!prevProps.columnComparison;
@@ -129,12 +135,31 @@ class RangesComponent extends React.Component {
129
135
  rangesType: this.props.rangeValueType === 'Percentage' ? 'PercentageRange' : 'NumberRange',
130
136
  });
131
137
  }
138
+ if (this.props.allowEmptyRanges) {
139
+ const hadRanges = hasConfiguredRanges(prevProps.ranges);
140
+ const hasRanges = hasConfiguredRanges(this.props.ranges);
141
+ if (!hadRanges && hasRanges && this.state.rangesType === 'None') {
142
+ this.setState({
143
+ rangesType: this.props.rangeValueType === 'Percentage' ? 'PercentageRange' : 'NumberRange',
144
+ });
145
+ }
146
+ else if (hadRanges &&
147
+ !hasRanges &&
148
+ this.state.rangesType !== 'ColumnComparison' &&
149
+ this.state.rangesType !== 'ZeroCentred') {
150
+ this.setState({ rangesType: 'None' });
151
+ }
152
+ }
132
153
  }
133
154
  handleRangesModeTab(value) {
134
155
  if (value === this.state.rangesType) {
135
156
  return;
136
157
  }
137
158
  this.setState({ rangesType: value });
159
+ if (value === 'None') {
160
+ this.props.updateRanges([]);
161
+ return;
162
+ }
138
163
  if (value === 'ColumnComparison') {
139
164
  const columnComparison = {
140
165
  Color: (0, UIHelper_1.getGraySwatchColor)(),
@@ -202,7 +227,9 @@ class RangesComponent extends React.Component {
202
227
  setRangeColMin(range) {
203
228
  const newRanges = this.props.ranges.map((rangeItem) => {
204
229
  if (rangeItem === range) {
205
- let newMin = rangeItem.Min === 'Col-Min' ? this.props.minMaxRangeValues.min : 'Col-Min';
230
+ let newMin = rangeItem.Min === 'Col-Min'
231
+ ? (this.props.minMaxRangeValues?.min ?? 0)
232
+ : 'Col-Min';
206
233
  return {
207
234
  ...rangeItem,
208
235
  Min: newMin,
@@ -236,32 +263,51 @@ class RangesComponent extends React.Component {
236
263
  const existingRanges = this.props.ranges ?? [];
237
264
  if (existingRanges.length === 0) {
238
265
  const isPercentage = this.props.rangeValueType === 'Percentage';
239
- const min = isPercentage ? 0 : this.props.minMaxRangeValues?.min ?? 0;
240
- const max = isPercentage ? 100 : this.props.minMaxRangeValues?.max ?? 100;
241
- const mid = Math.round((min + max) / 2);
242
- const seedRanges = [
243
- {
244
- Min: isPercentage ? 0 : 'Col-Min',
245
- Max: mid,
246
- Color: 'rgba(128, 128, 128, 0.25)',
247
- },
248
- {
249
- Min: mid,
250
- Max: isPercentage ? 100 : 'Col-Max',
251
- Color: 'rgba(128, 128, 128, 0.55)',
252
- },
253
- ];
266
+ const seedRanges = this.props.allowEmptyRanges
267
+ ? [
268
+ {
269
+ Min: isPercentage ? 0 : 'Col-Min',
270
+ Max: isPercentage ? 100 : 'Col-Max',
271
+ Color: (0, UIHelper_1.getGraySwatchColor)(),
272
+ },
273
+ ]
274
+ : (() => {
275
+ const min = isPercentage ? 0 : this.props.minMaxRangeValues?.min ?? 0;
276
+ const max = isPercentage ? 100 : this.props.minMaxRangeValues?.max ?? 100;
277
+ const mid = Math.round((min + max) / 2);
278
+ return [
279
+ {
280
+ Min: isPercentage ? 0 : 'Col-Min',
281
+ Max: mid,
282
+ Color: 'rgba(128, 128, 128, 0.25)',
283
+ },
284
+ {
285
+ Min: mid,
286
+ Max: isPercentage ? 100 : 'Col-Max',
287
+ Color: 'rgba(128, 128, 128, 0.55)',
288
+ },
289
+ ];
290
+ })();
254
291
  this.props.updateRanges(seedRanges);
255
292
  return;
256
293
  }
294
+ // Splitting a single full-width band at the midpoint is easier to reason
295
+ // about than anchoring the break at the column maximum (e.g. tradeId 1–200 → 100).
296
+ if (existingRanges.length === 1) {
297
+ const splitAtMidpoint = this.splitFullSpanRangeAtMidpoint(existingRanges[0]);
298
+ if (splitAtMidpoint) {
299
+ this.props.updateRanges(splitAtMidpoint);
300
+ return;
301
+ }
302
+ }
257
303
  const lastRange = existingRanges[existingRanges.length - 1];
258
304
  let previousRange = lastRange;
259
305
  let Min = null;
260
306
  if (lastRange.Max === 'Col-Max') {
261
- Min = this.props.minMaxRangeValues.max;
307
+ Min = this.props.minMaxRangeValues?.max ?? 100;
262
308
  previousRange = {
263
309
  ...previousRange,
264
- Max: this.props.minMaxRangeValues.max,
310
+ Max: this.props.minMaxRangeValues?.max ?? 100,
265
311
  };
266
312
  }
267
313
  else {
@@ -275,6 +321,32 @@ class RangesComponent extends React.Component {
275
321
  const newRanges = [...existingRanges.slice(0, -1), previousRange, newRange];
276
322
  this.props.updateRanges(newRanges);
277
323
  }
324
+ /**
325
+ * When there is exactly one band spanning the full scale (Col-Min→Col-Max or
326
+ * 0→100), split at the midpoint instead of at the column maximum.
327
+ */
328
+ splitFullSpanRangeAtMidpoint(onlyRange) {
329
+ const isPercentage = this.props.rangeValueType === 'Percentage';
330
+ if (isPercentage) {
331
+ if (onlyRange.Min !== 0 || onlyRange.Max !== 100) {
332
+ return null;
333
+ }
334
+ return [
335
+ { ...onlyRange, Max: 50 },
336
+ { Min: 50, Max: 100, Color: (0, UIHelper_1.getGraySwatchColor)() },
337
+ ];
338
+ }
339
+ if (onlyRange.Min !== 'Col-Min' || onlyRange.Max !== 'Col-Max') {
340
+ return null;
341
+ }
342
+ const min = this.props.minMaxRangeValues?.min ?? 0;
343
+ const max = this.props.minMaxRangeValues?.max ?? 100;
344
+ const mid = Math.round((min + max) / 2);
345
+ return [
346
+ { ...onlyRange, Max: mid },
347
+ { Min: mid, Max: 'Col-Max', Color: (0, UIHelper_1.getGraySwatchColor)() },
348
+ ];
349
+ }
278
350
  changeColumnComparisonMinValue(value) {
279
351
  const { columnComparison } = this.props;
280
352
  columnComparison.MinValue = value;
@@ -19,6 +19,7 @@ const ColumnSelector = function (props) {
19
19
  return {
20
20
  label,
21
21
  textLabel,
22
+ tooltip: textLabel,
22
23
  value: column.columnId,
23
24
  };
24
25
  })
@@ -35,7 +36,11 @@ const ColumnSelector = function (props) {
35
36
  virtualized: true,
36
37
  items: options,
37
38
  showClear: false,
39
+ showItemTooltip: true,
38
40
  onValueChange: (colId) => {
41
+ if (colId === null) {
42
+ return;
43
+ }
39
44
  props.onChange(colId);
40
45
  },
41
46
  value: props.value,
@@ -8,6 +8,7 @@ export interface StyleComponentProps {
8
8
  api: AdaptableApi;
9
9
  headless?: boolean;
10
10
  hidePreview?: boolean;
11
+ previewText?: React.ReactNode;
11
12
  headerText?: string;
12
13
  Style: AdaptableStyle;
13
14
  UpdateStyle: (style: AdaptableStyle) => void;
@@ -191,6 +191,6 @@ const StyleComponent = (props) => {
191
191
  label: enumName,
192
192
  value: enumName,
193
193
  })),
194
- ], value: componentStyle.FontSize?.toString() ?? '', onValueChange: (value) => onFontSizeChange(value) }) }), (0, jsx_runtime_1.jsx)("span", { children: "Alignment" }), (0, jsx_runtime_1.jsxs)(Toggle_1.ToggleGroup, { children: [(0, jsx_runtime_1.jsx)(Toggle_1.Toggle, { icon: "align-left", pressed: componentStyle.Alignment === 'Left', onPressedChange: (pressed) => pressed ? onAlignmentChange('Left') : onAlignmentChange('Default') }), (0, jsx_runtime_1.jsx)(Toggle_1.Toggle, { icon: "align-center", pressed: componentStyle.Alignment === 'Center', onPressedChange: (pressed) => pressed ? onAlignmentChange('Center') : onAlignmentChange('Default') }), (0, jsx_runtime_1.jsx)(Toggle_1.Toggle, { icon: "align-right", pressed: componentStyle.Alignment === 'Right', onPressedChange: (pressed) => pressed ? onAlignmentChange('Right') : onAlignmentChange('Default') })] })] }) }) })), !props.hidePreview && ((0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsx)(Card_1.Card.Title, { children: "Preview" }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:grid twa:place-items-center", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:p-2 twa:inline-block", children: (0, jsx_runtime_1.jsx)(StylePreview_1.StylePreview, { className: "twa:mt-0", styleObject: componentStyle }) }) })] }))] }));
194
+ ], value: componentStyle.FontSize?.toString() ?? '', onValueChange: (value) => onFontSizeChange(value) }) }), (0, jsx_runtime_1.jsx)("span", { children: "Alignment" }), (0, jsx_runtime_1.jsxs)(Toggle_1.ToggleGroup, { children: [(0, jsx_runtime_1.jsx)(Toggle_1.Toggle, { icon: "align-left", pressed: componentStyle.Alignment === 'Left', onPressedChange: (pressed) => pressed ? onAlignmentChange('Left') : onAlignmentChange('Default') }), (0, jsx_runtime_1.jsx)(Toggle_1.Toggle, { icon: "align-center", pressed: componentStyle.Alignment === 'Center', onPressedChange: (pressed) => pressed ? onAlignmentChange('Center') : onAlignmentChange('Default') }), (0, jsx_runtime_1.jsx)(Toggle_1.Toggle, { icon: "align-right", pressed: componentStyle.Alignment === 'Right', onPressedChange: (pressed) => pressed ? onAlignmentChange('Right') : onAlignmentChange('Default') })] })] }) }) })), !props.hidePreview && ((0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsx)(Card_1.Card.Title, { children: "Preview" }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:grid twa:place-items-center", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:p-2 twa:inline-block", children: (0, jsx_runtime_1.jsx)(StylePreview_1.StylePreview, { className: "twa:mt-0", styleObject: componentStyle, children: props.previewText }) }) })] }))] }));
195
195
  };
196
196
  exports.StyleComponent = StyleComponent;
@@ -51,40 +51,66 @@ function ValueSelector(props) {
51
51
  toIdentifier,
52
52
  value,
53
53
  });
54
- const notifyChange = (0, react_1.useCallback)(() => {
55
- const newSelection = [...selectedMap.keys()];
54
+ const reorderEnabled = allowReorder !== false;
55
+ const commitSelection = (0, react_1.useCallback)((nextMap) => {
56
+ const newSelection = [...nextMap.keys()];
56
57
  if (!newSelection.length && selectedOnly) {
57
58
  setSelectedOnly(false);
58
59
  }
59
- onChange(newSelection, new Map(selectedMap));
60
- }, [onChange, selectedOnly, selectedMap]);
60
+ onChange(newSelection, nextMap);
61
+ }, [onChange, selectedOnly, setSelectedOnly]);
62
+ const updateSelection = (0, react_1.useCallback)((updater) => {
63
+ const nextMap = new Map(selectedMap);
64
+ updater(nextMap);
65
+ commitSelection(nextMap);
66
+ }, [commitSelection, selectedMap]);
67
+ const filteredOptions = (0, react_1.useMemo)(() => {
68
+ return options.filter((option) => {
69
+ let result = true;
70
+ if (filter) {
71
+ result = filter(option, searchInputValue);
72
+ }
73
+ result = result && (selectedOnly ? selectedMap.has(toIdentifier(option)) : true);
74
+ return result;
75
+ });
76
+ }, [filter, options, searchInputValue, selectedMap, selectedOnly, toIdentifier]);
77
+ const renderOptionRow = (option, index, reorderable, itemDomProps) => {
78
+ const identifier = toIdentifier(option);
79
+ const label = !reorderEnabled ? preparedToLabel(option) : null;
80
+ const { onPointerDown, className: itemClassName, ...restDomProps } = itemDomProps ?? {};
81
+ return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "center", "data-index": index, "data-id": identifier, "data-name": "option", ...restDomProps, className: (0, clsx_1.default)('twa:bg-primary twa:text-primary-foreground twa:rounded-standard twa:p-2', {
82
+ 'twa:mt-1': index,
83
+ 'twa:mt-0': !index,
84
+ }, itemClassName, `${baseClassName}__option`), children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", alignItems: "center", className: "twa:flex-1", children: [reorderable ? ((0, jsx_runtime_1.jsx)(Flex_1.Box, { onPointerDown: onPointerDown, className: "twa:mr-3", children: (0, jsx_runtime_1.jsx)(icons_1.Icon, { name: "drag", style: { cursor: 'grab' } }) })) : null, singleSelect ? ((0, jsx_runtime_1.jsx)(Radio_1.default, { checked: selectedMap.has(identifier), "data-name": identifier, onChange: (checked) => {
85
+ updateSelection((next) => {
86
+ next.clear();
87
+ if (checked) {
88
+ next.set(identifier, option);
89
+ }
90
+ });
91
+ }, children: label })) : ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": identifier, disabled: disabled || (isOptionDisabled ? isOptionDisabled(option) : false), onChange: (checked) => {
92
+ updateSelection((next) => {
93
+ if (checked) {
94
+ next.set(identifier, option);
95
+ }
96
+ else {
97
+ next.delete(identifier);
98
+ }
99
+ });
100
+ }, checked: selectedMap.has(identifier), children: label })), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:ml-2 twa:flex-1", children: reorderEnabled ? preparedToLabel(option) : null })] }) }));
101
+ };
61
102
  const renderOption = (option, index) => {
62
103
  const identifier = toIdentifier(option);
63
- const label = !allowReorder ? preparedToLabel(option) : null;
64
104
  const reorderable = typeof allowReorder === 'function' ? allowReorder(option) : allowReorder;
105
+ if (!reorderEnabled) {
106
+ return ((0, jsx_runtime_1.jsx)(React.Fragment, { children: renderOptionRow(option, index, false) }, identifier));
107
+ }
65
108
  return ((0, jsx_runtime_1.jsx)(dnd_1.DragList.DraggableItem, { id: `${identifier}`, children: (itemDomProps) => {
66
109
  const { onPointerDown, ...restDomProps } = itemDomProps;
67
- return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "center", "data-index": index, "data-id": identifier, "data-name": "option", ...restDomProps, className: (0, clsx_1.default)('twa:bg-primary twa:text-text-on-primary twa:rounded-standard twa:p-2', {
68
- 'twa:mt-1': index,
69
- 'twa:mt-0': !index,
70
- }, restDomProps.className, `${baseClassName}__option`), children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", alignItems: "center", className: "twa:flex-1", children: [reorderable ? ((0, jsx_runtime_1.jsx)(Flex_1.Box, { onPointerDown: onPointerDown, className: "twa:mr-3", children: (0, jsx_runtime_1.jsx)(icons_1.Icon, { name: "drag", style: { cursor: 'grab' } }) })) : null, singleSelect ? ((0, jsx_runtime_1.jsx)(Radio_1.default, { checked: selectedMap.has(identifier), "data-name": identifier, onChange: (checked) => {
71
- if (checked) {
72
- selectedMap.clear();
73
- selectedMap.set(identifier, option);
74
- }
75
- else {
76
- selectedMap.delete(identifier);
77
- }
78
- notifyChange();
79
- }, children: label })) : ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": identifier, disabled: disabled || (isOptionDisabled ? isOptionDisabled(option) : false), onChange: (checked) => {
80
- if (checked) {
81
- selectedMap.set(identifier, option);
82
- }
83
- else {
84
- selectedMap.delete(identifier);
85
- }
86
- notifyChange();
87
- }, checked: selectedMap.has(identifier), children: label })), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:ml-2 twa:flex-1", children: allowReorder ? preparedToLabel(option) : null })] }) }));
110
+ return renderOptionRow(option, index, reorderable, {
111
+ onPointerDown: reorderable ? onPointerDown : undefined,
112
+ ...restDomProps,
113
+ });
88
114
  } }, identifier));
89
115
  };
90
116
  const showOnlySelectedCheckbox = ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: !value.length, checked: selectedOnly, onChange: setSelectedOnly, children: showSelectedOnlyLabel ?? 'Show Selected Only' }));
@@ -92,60 +118,47 @@ function ValueSelector(props) {
92
118
  ...props,
93
119
  showOnlySelectedCheckbox,
94
120
  onSelectAll: () => {
95
- options.forEach((option) => {
96
- selectedMap.set(toIdentifier(option), option);
121
+ updateSelection((next) => {
122
+ options.forEach((option) => {
123
+ next.set(toIdentifier(option), option);
124
+ });
97
125
  });
98
- notifyChange();
99
126
  },
100
127
  onClearOption: (id) => {
101
- selectedMap.delete(id);
102
- notifyChange();
128
+ updateSelection((next) => {
129
+ next.delete(id);
130
+ });
103
131
  },
104
132
  onClear: () => {
105
- selectedMap.clear();
106
- notifyChange();
133
+ updateSelection((next) => {
134
+ next.clear();
135
+ });
107
136
  },
108
137
  };
109
- return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { style: props.style, className: (0, clsx_1.default)('twa:flex-1', baseClassName), flexDirection: "column", children: [(0, jsx_runtime_1.jsx)(Flex_1.Flex, { className: "twa:mb-1", children: showFilterInput && filter ? ((0, jsx_runtime_1.jsx)(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { value: searchInputValue, OnTextChange: setSearchInputValue, placeholder: "Type to search", inputClassName: "twa:p-3", className: "twa:flex-1 twa:m-[3px]" })) : ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex-1" })) }), (0, exports.renderSelectionSection)(selectionSectionProps), (0, jsx_runtime_1.jsx)(dnd_1.DragDropProvider, { children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { className: `${baseClassName}__body twa:flex-1 twa:overflow-auto`, flexDirection: "column", children: (0, jsx_runtime_1.jsx)(dnd_1.DragList, { dragListId: "value-selector", orientation: "vertical", onDragProxyMove: dnd_1.defaultDragProxyMove, onDragProxySetup: ({ proxyElement }) => {
138
+ const optionList = ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { className: `${baseClassName}__body twa:flex-1 twa:overflow-auto`, flexDirection: "column", children: (0, jsx_runtime_1.jsx)("div", { children: filteredOptions.map(renderOption) }) }));
139
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { style: props.style, className: (0, clsx_1.default)('twa:flex-1', baseClassName), flexDirection: "column", children: [(0, jsx_runtime_1.jsx)(Flex_1.Flex, { className: "twa:mb-1", children: showFilterInput && filter ? ((0, jsx_runtime_1.jsx)(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { value: searchInputValue, OnTextChange: setSearchInputValue, placeholder: "Type to search", inputClassName: "twa:p-3", className: "twa:flex-1 twa:m-[3px]" })) : ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex-1" })) }), (0, exports.renderSelectionSection)(selectionSectionProps), reorderEnabled ? ((0, jsx_runtime_1.jsx)(dnd_1.DragDropProvider, { children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { className: `${baseClassName}__body twa:flex-1 twa:overflow-auto`, flexDirection: "column", children: (0, jsx_runtime_1.jsx)(dnd_1.DragList, { dragListId: "value-selector", orientation: "vertical", onDragProxyMove: dnd_1.defaultDragProxyMove, onDragProxySetup: ({ proxyElement }) => {
110
140
  proxyElement.classList.add('twa:shadow-md');
111
141
  }, onDrop: (_sortedIndexes) => {
112
142
  const selection = [];
113
143
  const extraKeys = [];
114
- for (const [key, value] of selectedMap) {
115
- if (value != null) {
144
+ for (const [key, mapValue] of selectedMap) {
145
+ if (mapValue != null) {
116
146
  selection.push(key);
117
147
  }
118
148
  else {
119
- // null/non-existent keys have to be stored separately
120
149
  extraKeys.push(key);
121
150
  }
122
151
  }
123
- const clone = new Map(selectedMap);
124
- // const newSelection: ID_TYPE[] = ArrayExtensions.reorderArray(
125
- // selection,
126
- // dragIndex,
127
- // dropIndex
128
- // );
129
152
  const newSelection = _sortedIndexes
130
153
  .map((index) => selection[index])
131
154
  .filter((x) => x != null);
132
155
  newSelection.push(...extraKeys);
133
- selectedMap.clear();
156
+ const nextMap = new Map();
134
157
  newSelection.forEach((key) => {
135
- selectedMap.set(key, clone.get(key));
158
+ nextMap.set(key, selectedMap.get(key));
136
159
  });
137
- notifyChange();
138
- }, children: (listDomProps) => ((0, jsx_runtime_1.jsx)("div", { ...listDomProps, children: options
139
- .filter((option) => {
140
- let result = true;
141
- if (filter) {
142
- result = filter(option, searchInputValue);
143
- }
144
- result =
145
- result && (selectedOnly ? selectedMap.has(toIdentifier(option)) : true);
146
- return result;
147
- })
148
- .map(renderOption) })) }) }) })] }));
160
+ commitSelection(nextMap);
161
+ }, children: (listDomProps) => (0, jsx_runtime_1.jsx)("div", { ...listDomProps, children: filteredOptions.map(renderOption) }) }) }) })) : (optionList)] }));
149
162
  }
150
163
  const renderSelectionSection = (props) => {
151
164
  const { value, options, disabled, singleSelect, toLabel, toIdentifier, } = props;
@@ -4,14 +4,13 @@ exports.CustomSortColumnWizardSection = exports.isValidCustomSortColumn = export
4
4
  const tslib_1 = require("tslib");
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const React = tslib_1.__importStar(require("react"));
7
- const Tabs_1 = require("../../../components/Tabs");
8
7
  const Tag_1 = require("../../../components/Tag");
9
8
  const ColumnSelector_1 = require("../../Components/ColumnSelector");
10
9
  const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
11
10
  const Flex_1 = require("../../../components/Flex");
12
- const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
13
11
  const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
14
12
  const AdaptableFormControlTextClear_1 = require("../../Components/Forms/AdaptableFormControlTextClear");
13
+ const Card_1 = require("../../../components/Card");
15
14
  const renderCustomSortColumn = (data) => {
16
15
  const { api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
17
16
  return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:text-2 twa:py-2 twa:pr-2", children: [(0, jsx_runtime_1.jsxs)(Tag_1.Tag, { className: "twa:mr-2", children: ["Name: ", data.Name] }), (0, jsx_runtime_1.jsxs)(Tag_1.Tag, { children: ["Column: ", api.columnApi.getFriendlyNameForColumnId(data.ColumnId)] })] }));
@@ -34,16 +33,12 @@ const CustomSortColumnWizardSection = (props) => {
34
33
  const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
35
34
  const sortableCols = React.useMemo(() => {
36
35
  const sortableColumns = api.columnApi.getSortableColumns();
37
- const nonComparerSortableColumns = sortableColumns.filter((c) => {
38
- return api.customSortApi.internalApi.columnHasCustomSortComparer(c.columnId);
39
- });
40
36
  const customSorts = api.customSortApi.getCustomSorts();
41
37
  const columnSortComparers = api.optionsApi.getCustomSortOptions().customSortComparers || [];
42
38
  const usedColumnIds = [
43
39
  ...customSorts.map((customSort) => customSort.ColumnId),
44
40
  ...columnSortComparers.map((comparer) => api.columnScopeApi.getColumnIdsInScope(comparer.scope)),
45
41
  ];
46
- // filter out used colum ids, but include the current one
47
42
  return sortableColumns.filter((column) => {
48
43
  if (api.customSortApi.internalApi.columnHasCustomSortComparer(column.columnId)) {
49
44
  return false;
@@ -63,12 +58,12 @@ const CustomSortColumnWizardSection = (props) => {
63
58
  Name: event.target.value,
64
59
  });
65
60
  };
66
- return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", style: { height: '100%' }, children: [(0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { className: "twa:mb-3", children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Tab, { children: "Settings" }), (0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Content, { children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "row", children: (0, jsx_runtime_1.jsx)(FormLayout_1.default, { className: "twa:max-w-[300px] twa:w-full", children: (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Name", children: (0, jsx_runtime_1.jsx)(Input_1.default, { className: "twa:w-full", "data-name": "custom-sort-name", onChange: onNameChange, value: data?.Name ?? '' }) }) }) }) })] }), (0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { style: { flex: 1, minHeight: 0 }, children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Tab, { children: "Column" }), (0, jsx_runtime_1.jsxs)(Tabs_1.Tabs.Content, { children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", alignItems: "center", className: "twa:p-2", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2", children: "Columns" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex-3" }), (0, jsx_runtime_1.jsx)(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { value: columnsSearchText, OnTextChange: setColumnsSearchText, placeholder: "Type to search columns", style: { flex: 1 } })] }), (0, jsx_runtime_1.jsx)(ColumnSelector_1.NewColumnSelector, { columnFilterText: columnsSearchText, availableColumns: sortableCols, selected: data.ColumnId ? [data.ColumnId] : [], singleSelect: true, onChange: (ids) => {
67
- props.onChange({
68
- ...data,
69
- SortedValues: [],
70
- ColumnId: ids[0],
71
- });
72
- }, allowReorder: false })] })] })] }));
61
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:h-full", children: [(0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-3 twa:shrink-0", children: (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Name" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Provide a unique name for the Custom Sort" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsx)(Input_1.default, { className: "twa:max-w-[300px] twa:w-full", "data-name": "custom-sort-name", onChange: onNameChange, value: data?.Name ?? '' }) })] }) }), (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:flex-1 twa:min-h-0", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", alignItems: "center", className: "twa:p-2 twa:gap-3 twa:border-b twa:mb-2 twa:border-b-foreground/20", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-5 twa:font-medium", children: "Column" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:max-w-[520px]", children: "Select the column to apply the Custom Sort to" })] }), (0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "row", alignItems: "center", className: "twa:px-2 twa:pb-2 twa:gap-2", children: (0, jsx_runtime_1.jsx)(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { value: columnsSearchText, OnTextChange: setColumnsSearchText, placeholder: "Type to search columns", className: "twa:flex-1" }) }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex-1 twa:min-h-0 twa:overflow-auto twa:px-2 twa:pb-2", children: (0, jsx_runtime_1.jsx)(ColumnSelector_1.NewColumnSelector, { columnFilterText: columnsSearchText, availableColumns: sortableCols, selected: data.ColumnId ? [data.ColumnId] : [], singleSelect: true, onChange: (ids) => {
62
+ props.onChange({
63
+ ...data,
64
+ SortedValues: [],
65
+ ColumnId: ids[0],
66
+ });
67
+ }, allowReorder: false }) })] })] }));
73
68
  };
74
69
  exports.CustomSortColumnWizardSection = CustomSortColumnWizardSection;