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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (250) hide show
  1. package/index.css +117 -62
  2. package/package.json +9 -4
  3. package/src/AdaptableOptions/EditOptions.d.ts +2 -2
  4. package/src/AdaptableState/Common/AggregationColumns.d.ts +14 -6
  5. package/src/AdaptableState/Common/AggregationColumns.js +30 -3
  6. package/src/AdaptableState/Common/ColumnScope.d.ts +4 -0
  7. package/src/AdaptableState/Common/Enums.d.ts +5 -5
  8. package/src/AdaptableState/Common/Enums.js +4 -4
  9. package/src/AdaptableState/PlusMinusState.d.ts +3 -3
  10. package/src/AdaptableState/ShortcutState.d.ts +2 -6
  11. package/src/AdaptableState/StyledColumnState.d.ts +3 -5
  12. package/src/AdaptableState/ThemeState.d.ts +33 -28
  13. package/src/Api/EventApi.d.ts +14 -1
  14. package/src/Api/Events/ThemeChanged.d.ts +6 -0
  15. package/src/Api/Events/ThemeSelected.d.ts +11 -0
  16. package/src/Api/Events/ThemeSelected.js +2 -0
  17. package/src/Api/Implementation/EventApiImpl.js +4 -0
  18. package/src/Api/Implementation/LayoutApiImpl.d.ts +0 -2
  19. package/src/Api/Implementation/LayoutApiImpl.js +0 -14
  20. package/src/Api/Implementation/LayoutHelpers.d.ts +2 -0
  21. package/src/Api/Implementation/LayoutHelpers.js +19 -8
  22. package/src/Api/Implementation/ThemeApiImpl.d.ts +3 -2
  23. package/src/Api/Implementation/ThemeApiImpl.js +19 -15
  24. package/src/Api/Internal/EventInternalApi.d.ts +2 -0
  25. package/src/Api/Internal/EventInternalApi.js +8 -1
  26. package/src/Api/Internal/StyledColumnInternalApi.d.ts +4 -4
  27. package/src/Api/Internal/StyledColumnInternalApi.js +4 -4
  28. package/src/Api/Internal/ThemeInternalApi.d.ts +0 -1
  29. package/src/Api/Internal/ThemeInternalApi.js +0 -10
  30. package/src/Api/LayoutApi.d.ts +1 -8
  31. package/src/Api/ThemeApi.d.ts +6 -2
  32. package/src/Redux/ActionsReducers/ThemeRedux.d.ts +3 -3
  33. package/src/Strategy/FormatColumnModule.js +12 -5
  34. package/src/Strategy/LayoutModule.js +13 -8
  35. package/src/Strategy/StyledColumnModule.js +58 -30
  36. package/src/Utilities/Constants/ReduxConstants.d.ts +2 -2
  37. package/src/Utilities/Constants/ReduxConstants.js +1 -14
  38. package/src/Utilities/Helpers/FormatHelper.js +20 -1
  39. package/src/Utilities/Helpers/SparklineOptionsHelper.d.ts +7 -0
  40. package/src/Utilities/Helpers/SparklineOptionsHelper.js +68 -0
  41. package/src/Utilities/Helpers/StyledColumnGradientHelper.d.ts +23 -1
  42. package/src/Utilities/Helpers/StyledColumnGradientHelper.js +212 -1
  43. package/src/Utilities/Helpers/ThemeHelpers.d.ts +5 -0
  44. package/src/Utilities/Helpers/ThemeHelpers.js +43 -0
  45. package/src/Utilities/Helpers/percentBarPreviewHelper.d.ts +19 -0
  46. package/src/Utilities/Helpers/percentBarPreviewHelper.js +155 -0
  47. package/src/Utilities/ObjectFactory.d.ts +1 -3
  48. package/src/Utilities/ObjectFactory.js +0 -9
  49. package/src/Utilities/Services/ThemeService.js +1 -1
  50. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +17 -16
  51. package/src/View/Alert/Wizard/AlertButtonsEditor.js +113 -102
  52. package/src/View/Alert/Wizard/AlertMessageWizardSection.js +12 -13
  53. package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +54 -54
  54. package/src/View/Alert/Wizard/AlertRulesWizardSection.js +4 -3
  55. package/src/View/Alert/Wizard/AlertScheduledWizardSection.js +1 -1
  56. package/src/View/Alert/Wizard/AlertScopeWizardSection.js +29 -37
  57. package/src/View/Alert/Wizard/AlertTypeWizardSection.js +2 -3
  58. package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.js +9 -13
  59. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +28 -15
  60. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +7 -9
  61. package/src/View/CalculatedColumn/Wizard/CalculatedColumnTypeSection.js +2 -2
  62. package/src/View/CellSummary/CellSummaryViewPanel.js +1 -1
  63. package/src/View/Charting/ChartingWizard/AgChargingWizard/AgChargingWizard.js +3 -10
  64. package/src/View/Charting/ChartingWizard/AgChargingWizard/PreviewChartSection.js +1 -1
  65. package/src/View/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +32 -41
  66. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/ExternalChartingWizard.js +4 -31
  67. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/PreviewChartSection.d.ts +5 -0
  68. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/PreviewChartSection.js +26 -0
  69. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.d.ts +1 -0
  70. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +9 -6
  71. package/src/View/Comments/CommentsEditor.js +1 -1
  72. package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +0 -1
  73. package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.js +3 -1
  74. package/src/View/Components/ModuleProfile.js +1 -1
  75. package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +0 -1
  76. package/src/View/Components/Popups/WindowPopups/windowFactory.js +1 -2
  77. package/src/View/Components/RangesComponent.d.ts +7 -2
  78. package/src/View/Components/RangesComponent.js +94 -22
  79. package/src/View/Components/StyleComponent.d.ts +1 -0
  80. package/src/View/Components/StyleComponent.js +1 -1
  81. package/src/View/Components/ValueSelector/index.js +70 -57
  82. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +8 -13
  83. package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +8 -8
  84. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -1
  85. package/src/View/DataImport/DataImportWizard/sections/ColumnsSection.js +11 -12
  86. package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadSection.js +5 -4
  87. package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadTextSection.js +2 -1
  88. package/src/View/DataImport/DataImportWizard/sections/ValidationSection.js +4 -15
  89. package/src/View/Export/Wizard/ReportColumnsWizardSection.js +24 -27
  90. package/src/View/Export/Wizard/ReportNameWizardSection.js +8 -11
  91. package/src/View/Export/Wizard/ReportRowsWizardSection.js +19 -22
  92. package/src/View/Export/Wizard/ScheduledReportSettings.d.ts +2 -0
  93. package/src/View/Export/Wizard/ScheduledReportSettings.js +12 -12
  94. package/src/View/Export/Wizard/ScheduledReportWizard.js +2 -3
  95. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +8 -6
  96. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +19 -20
  97. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +20 -11
  98. package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.js +19 -3
  99. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +4 -4
  100. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +7 -0
  101. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +120 -13
  102. package/src/View/FormatColumn/Wizard/FormatColumnPreview.d.ts +15 -0
  103. package/src/View/FormatColumn/Wizard/FormatColumnPreview.js +78 -0
  104. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +4 -0
  105. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +34 -0
  106. package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +11 -6
  107. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +1 -1
  108. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +3 -1
  109. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +64 -13
  110. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +3 -1
  111. package/src/View/FreeTextColumn/Utilities/getFreeTextColumnSettingsTags.d.ts +2 -0
  112. package/src/View/FreeTextColumn/Utilities/getFreeTextColumnSettingsTags.js +19 -0
  113. package/src/View/FreeTextColumn/Wizard/FreeTextColumnDefinitionWizardSection.d.ts +10 -0
  114. package/src/View/FreeTextColumn/Wizard/FreeTextColumnDefinitionWizardSection.js +60 -0
  115. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +2 -3
  116. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +35 -70
  117. package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +14 -10
  118. package/src/View/Layout/TransposedPopup.js +2 -2
  119. package/src/View/Layout/Wizard/LayoutWizard.js +3 -3
  120. package/src/View/Layout/Wizard/sections/AggregationsSection.d.ts +2 -3
  121. package/src/View/Layout/Wizard/sections/AggregationsSection.js +116 -26
  122. package/src/View/Layout/Wizard/sections/ColumnsSection.js +79 -79
  123. package/src/View/Layout/Wizard/sections/FilterSection.js +31 -32
  124. package/src/View/Layout/Wizard/sections/GridFilterSection.js +10 -10
  125. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.d.ts +1 -2
  126. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +101 -51
  127. package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +9 -8
  128. package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.js +4 -4
  129. package/src/View/Layout/Wizard/sections/RowGroupingSection.js +36 -33
  130. package/src/View/Layout/Wizard/sections/RowSelectionSection.js +2 -2
  131. package/src/View/Layout/Wizard/sections/RowSummarySection.js +95 -73
  132. package/src/View/Layout/Wizard/sections/SettingsSection.js +3 -4
  133. package/src/View/Layout/Wizard/sections/SortSection.js +2 -2
  134. package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +1 -1
  135. package/src/View/NamedQuery/Wizard/NamedQuerySettingsWizardSection.js +7 -12
  136. package/src/View/NamedQuery/Wizard/NamedQueryWizard.js +1 -3
  137. package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.d.ts +4 -0
  138. package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.js +45 -12
  139. package/src/View/PlusMinus/Wizard/PlusMinusScopeWizardSection.js +10 -17
  140. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.d.ts +2 -6
  141. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +5 -21
  142. package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +15 -21
  143. package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +2 -2
  144. package/src/View/Shortcut/Wizard/ShortcutScopeWizardSection.js +10 -17
  145. package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +16 -5
  146. package/src/View/Shortcut/Wizard/ShortcutWizard.js +2 -2
  147. package/src/View/Shortcut/shortcutOperations.d.ts +3 -0
  148. package/src/View/Shortcut/shortcutOperations.js +32 -1
  149. package/src/View/SpecialColumnSettingsWizardStep.js +7 -6
  150. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +5 -0
  151. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +26 -16
  152. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.d.ts +10 -2
  153. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +100 -15
  154. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.d.ts +14 -0
  155. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.js +48 -25
  156. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.d.ts +2 -3
  157. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +109 -33
  158. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +20 -12
  159. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.d.ts +5 -0
  160. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +124 -23
  161. package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.d.ts +1 -0
  162. package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +35 -11
  163. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.d.ts +5 -0
  164. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +88 -11
  165. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.d.ts +5 -0
  166. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +125 -35
  167. package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.d.ts +1 -0
  168. package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +55 -74
  169. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.d.ts +5 -0
  170. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.js +20 -0
  171. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.js +6 -12
  172. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarColumnComparisonPreview.js +5 -5
  173. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarRangesPreview.js +2 -1
  174. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.d.ts +5 -4
  175. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.js +11 -13
  176. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.d.ts +5 -0
  177. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.js +20 -0
  178. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.d.ts +3 -0
  179. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +32 -3
  180. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.d.ts +9 -0
  181. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +64 -0
  182. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.d.ts +10 -0
  183. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.js +35 -0
  184. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.d.ts +10 -0
  185. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.js +96 -0
  186. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.d.ts +8 -0
  187. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.js +57 -0
  188. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.d.ts +8 -0
  189. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +58 -0
  190. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.d.ts +18 -0
  191. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.js +66 -0
  192. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.d.ts +10 -0
  193. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.js +133 -0
  194. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardRangesSection.js +12 -5
  195. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.d.ts +1 -5
  196. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +53 -29
  197. package/src/View/SystemStatus/Utilities/getStatusItemStyle.js +1 -1
  198. package/src/View/Theme/ThemePopup.d.ts +2 -14
  199. package/src/View/Theme/ThemePopup.js +1 -36
  200. package/src/View/UIHelper.js +1 -1
  201. package/src/View/Wizard/OnePageAdaptableWizard.js +6 -20
  202. package/src/agGrid/AdaptableAgGrid.d.ts +1 -0
  203. package/src/agGrid/AdaptableAgGrid.js +34 -24
  204. package/src/agGrid/AgGridAdapter.d.ts +1 -1
  205. package/src/agGrid/AgGridAdapter.js +27 -17
  206. package/src/agGrid/AgGridColumnAdapter.js +9 -15
  207. package/src/agGrid/AgGridMenuAdapter.d.ts +0 -1
  208. package/src/agGrid/AgGridMenuAdapter.js +20 -37
  209. package/src/agGrid/buildValueAggregationMenuItem.d.ts +19 -0
  210. package/src/agGrid/buildValueAggregationMenuItem.js +114 -0
  211. package/src/agGrid/cellRenderers/IconRenderer.d.ts +6 -0
  212. package/src/agGrid/cellRenderers/IconRenderer.js +46 -17
  213. package/src/agGrid/createAgGridIcon.d.ts +10 -0
  214. package/src/agGrid/createAgGridIcon.js +19 -0
  215. package/src/components/DragAndDropContext/UnusedPanel.js +1 -1
  216. package/src/components/ExpressionEditor/BaseEditorInput.js +1 -1
  217. package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +1 -1
  218. package/src/components/Input/NumberInput.js +1 -1
  219. package/src/components/Panel/index.js +1 -1
  220. package/src/components/SimpleButton/index.js +4 -4
  221. package/src/components/Toggle/Toggle.js +1 -1
  222. package/src/components/Toggle/ToggleGroup.js +1 -1
  223. package/src/env.js +2 -2
  224. package/src/layout-manager/src/index.js +2 -9
  225. package/src/metamodel/adaptable.metamodel.d.ts +39 -29
  226. package/src/metamodel/adaptable.metamodel.js +1 -1
  227. package/src/types.d.ts +5 -4
  228. package/themes/dark.css +1 -68
  229. package/themes/light.css +1 -5
  230. package/tsconfig.cjs.tsbuildinfo +1 -1
  231. package/src/Aggregation/ParameterizedAggregationRegistry.d.ts +0 -35
  232. package/src/Aggregation/ParameterizedAggregationRegistry.js +0 -74
  233. package/src/Aggregation/definitions/weightedAverageAggregationDefinition.d.ts +0 -3
  234. package/src/Aggregation/definitions/weightedAverageAggregationDefinition.js +0 -58
  235. package/src/Aggregation/parameterizedAggregationColumnMenu.d.ts +0 -8
  236. package/src/Aggregation/parameterizedAggregationColumnMenu.js +0 -143
  237. package/src/Aggregation/parameterizedAggregationHeader.d.ts +0 -13
  238. package/src/Aggregation/parameterizedAggregationHeader.js +0 -65
  239. package/src/Aggregation/parameterizedAggregationHelpers.d.ts +0 -23
  240. package/src/Aggregation/parameterizedAggregationHelpers.js +0 -121
  241. package/src/Aggregation/parameterizedAggregationWizardHelpers.d.ts +0 -9
  242. package/src/Aggregation/parameterizedAggregationWizardHelpers.js +0 -74
  243. package/src/Aggregation/validateParameterizedAggregations.d.ts +0 -4
  244. package/src/Aggregation/validateParameterizedAggregations.js +0 -25
  245. package/src/View/Layout/Wizard/sections/ParameterizedAggFuncPicker.d.ts +0 -12
  246. package/src/View/Layout/Wizard/sections/ParameterizedAggFuncPicker.js +0 -48
  247. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgeSettings.d.ts +0 -5
  248. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgeSettings.js +0 -32
  249. package/src/View/Theme/VariantSelector.d.ts +0 -8
  250. package/src/View/Theme/VariantSelector.js +0 -25
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StyledColumnWizardGradientSection = exports.renderStyledColumnGradientStyleSummary = void 0;
3
+ exports.StyledColumnWizardGradientSection = exports.renderStyledColumnGradientStyleSummary = exports.getStyledColumnGradientStyleViewValues = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const React = tslib_1.__importStar(require("react"));
@@ -14,13 +14,39 @@ const NumberInput_1 = require("../../../components/Input/NumberInput");
14
14
  const StyledColumnGradientHelper_1 = require("../../../Utilities/Helpers/StyledColumnGradientHelper");
15
15
  const StyledColumnSliceStyleEditors_1 = require("./StyledColumnSliceStyleEditors");
16
16
  const Card_1 = require("../../../components/Card");
17
+ const StyledColumnGradientPreview_1 = require("./StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview");
17
18
  const STYLE_FORM_SIZES = ['200px', '1fr'];
18
- function formatToolTipText(opts) {
19
- if (!opts || opts.length === 0) {
20
- return '';
21
- }
22
- return opts.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value')).join(' + ');
19
+ function formatGradientToolTipSummary(opts) {
20
+ return opts
21
+ .map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value'))
22
+ .join(' + ');
23
23
  }
24
+ const buildStyledColumnGradientStyleSummaryStrings = (gs, options) => {
25
+ const minA = gs.MinAlpha ?? StyledColumnGradientHelper_1.DEFAULT_GRADIENT_MIN_ALPHA;
26
+ const maxA = gs.MaxAlpha ?? StyledColumnGradientHelper_1.DEFAULT_GRADIENT_MAX_ALPHA;
27
+ const items = [`Alpha: ${minA} → ${maxA}`];
28
+ if (gs.AutoContrastText) {
29
+ items.push('Auto Contrast: On');
30
+ }
31
+ if (gs.ToolTipText?.length) {
32
+ items.push(`Tooltip: ${formatGradientToolTipSummary(gs.ToolTipText)}`);
33
+ }
34
+ else if (options.includeEmptyTooltip) {
35
+ items.push('Tooltip: No Tooltip');
36
+ }
37
+ (0, StyledColumnSliceStyleEditors_1.getCellFontStyleSummaryItems)(gs.Font).forEach(({ label, value }) => {
38
+ items.push(`${label}: ${value}`);
39
+ });
40
+ return items;
41
+ };
42
+ const getStyledColumnGradientStyleViewValues = (data) => {
43
+ const gs = data.GradientStyle;
44
+ if (!gs) {
45
+ return [];
46
+ }
47
+ return buildStyledColumnGradientStyleSummaryStrings(gs, { includeEmptyTooltip: false });
48
+ };
49
+ exports.getStyledColumnGradientStyleViewValues = getStyledColumnGradientStyleViewValues;
24
50
  /**
25
51
  * Summary of Gradient-only style options (alpha bounds, auto-contrast, tooltip).
26
52
  */
@@ -29,10 +55,8 @@ const renderStyledColumnGradientStyleSummary = (data) => {
29
55
  if (!gs) {
30
56
  return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Styling Defined" });
31
57
  }
32
- const minA = gs.MinAlpha ?? StyledColumnGradientHelper_1.DEFAULT_GRADIENT_MIN_ALPHA;
33
- const maxA = gs.MaxAlpha ?? StyledColumnGradientHelper_1.DEFAULT_GRADIENT_MAX_ALPHA;
34
- const fontTags = (0, StyledColumnSliceStyleEditors_1.renderFontStyleSummaryTags)(gs.Font);
35
- return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:flex-wrap twa:gap-2", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: ["Alpha: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: minA }), " \u2192 ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: maxA })] }), gs.AutoContrastText && ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: ["Text: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "Auto contrast" })] })), (0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: ["Tooltip: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: formatToolTipText(gs.ToolTipText) })] }), fontTags && (0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: ["Font: ", fontTags] })] }));
58
+ const items = buildStyledColumnGradientStyleSummaryStrings(gs, { includeEmptyTooltip: true });
59
+ return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "center", className: "twa:flex-wrap twa:gap-2", children: items.map((item) => ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: item }, item))) }));
36
60
  };
37
61
  exports.renderStyledColumnGradientStyleSummary = renderStyledColumnGradientStyleSummary;
38
62
  const StyledColumnWizardGradientSection = (props) => {
@@ -91,6 +115,6 @@ const StyledColumnWizardGradientSection = (props) => {
91
115
  else {
92
116
  patchGradient({ AutoContrastText: true });
93
117
  }
94
- }, children: "Make text readable on tinted backgrounds" }) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Tooltip" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[600px]", children: "Set Tooltip properties" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(FormLayout_1.default, { sizes: [...STYLE_FORM_SIZES], children: (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Tooltip:", children: (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:ml-2", children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: disabled, checked: gs.ToolTipText?.includes('CellValue'), onChange: (checked) => onToolTipTextChanged('CellValue', checked), children: "Cell Value" }), ' ', (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: disabled, className: "twa:ml-3", checked: gs.ToolTipText?.includes('PercentageValue'), onChange: (checked) => onToolTipTextChanged('PercentageValue', checked), children: "Percent along scale" })] }) }) }) })] }), (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: "Font" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[480px]", children: "Optional font properties (takes precedence over Format Column)" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(StyledColumnSliceStyleEditors_1.StyledColumnFontStyleEditor, { api: api, disabled: disabled, value: gs.Font, onChange: onFontChange }) })] }), !data.ColumnId && ((0, jsx_runtime_1.jsx)(ErrorBox_1.default, { className: "twa:mt-2", children: "Select a column before changing Gradient style." }))] }));
118
+ }, children: "Make text readable on tinted backgrounds" }) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Tooltip" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[600px]", children: "Set Tooltip properties" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(FormLayout_1.default, { sizes: [...STYLE_FORM_SIZES], children: (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Tooltip:", children: (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:ml-2", children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: disabled, checked: gs.ToolTipText?.includes('CellValue'), onChange: (checked) => onToolTipTextChanged('CellValue', checked), children: "Cell Value" }), ' ', (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: disabled, className: "twa:ml-3", checked: gs.ToolTipText?.includes('PercentageValue'), onChange: (checked) => onToolTipTextChanged('PercentageValue', checked), children: "Percent along scale" })] }) }) }) })] }), (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: "Font" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[480px]", children: "Optional font properties (takes precedence over Format Column)" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(StyledColumnSliceStyleEditors_1.StyledColumnFontStyleEditor, { api: api, disabled: disabled, value: gs.Font, onChange: onFontChange }) })] }), (0, jsx_runtime_1.jsx)(StyledColumnGradientPreview_1.StyledColumnGradientPreviewCard, { data: data }), !data.ColumnId && ((0, jsx_runtime_1.jsx)(ErrorBox_1.default, { className: "twa:mt-2", children: "Select a column before changing Gradient style." }))] }));
95
119
  };
96
120
  exports.StyledColumnWizardGradientSection = StyledColumnWizardGradientSection;
@@ -1,7 +1,12 @@
1
1
  import * as React from 'react';
2
2
  import { StyledColumn } from '../../../AdaptableState/StyledColumnState';
3
+ export declare const getStyledColumnIconMappingsViewValues: (data: StyledColumn) => string[];
4
+ export declare const getStyledColumnIconStyleViewValues: (data: StyledColumn) => string[];
3
5
  /** Mappings step summary. */
4
6
  export declare const renderStyledColumnIconMappingsSummary: (data: StyledColumn) => React.JSX.Element;
7
+ export declare const StyledColumnIconMappingsView: React.FunctionComponent<React.PropsWithChildren<{
8
+ data: StyledColumn;
9
+ }>>;
5
10
  /** Style step summary (size, text, tooltip, font / cell). */
6
11
  export declare const renderStyledColumnIconStyleSummary: (data: StyledColumn) => React.JSX.Element;
7
12
  /**
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StyledColumnWizardIconSection = exports.isValidIconStyleMappings = exports.renderStyledColumnIconSummary = exports.renderStyledColumnIconStyleSummary = exports.renderStyledColumnIconMappingsSummary = void 0;
3
+ exports.StyledColumnWizardIconSection = exports.isValidIconStyleMappings = exports.renderStyledColumnIconSummary = exports.renderStyledColumnIconStyleSummary = exports.StyledColumnIconMappingsView = exports.renderStyledColumnIconMappingsSummary = exports.getStyledColumnIconStyleViewValues = exports.getStyledColumnIconMappingsViewValues = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const React = tslib_1.__importStar(require("react"));
@@ -19,6 +19,7 @@ const IconStylePresets_1 = require("../../../Utilities/Helpers/IconStylePresets"
19
19
  const IconRenderer_1 = require("../../../agGrid/cellRenderers/IconRenderer");
20
20
  const Card_1 = require("../../../components/Card");
21
21
  const StyledColumnSliceStyleEditors_1 = require("./StyledColumnSliceStyleEditors");
22
+ const StyledColumnIconPreview_1 = require("./StyledColumnWizardStyleSection/Components/StyledColumnIconPreview");
22
23
  const STYLE_FORM_SIZES = ['200px', '1fr'];
23
24
  const detectIconKind = (spec) => {
24
25
  if (typeof spec === 'string')
@@ -41,38 +42,114 @@ const previewIcon = (spec) => {
41
42
  // ---------------------------------------------------------------------------
42
43
  // Summary helpers (used by the wizard step header + Styled Columns list)
43
44
  // ---------------------------------------------------------------------------
45
+ const ICON_MAPPINGS_PREVIEW_CHIP_LIMIT = 6;
44
46
  const previewMapping = (mapping, index) => {
45
- return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:gap-1 twa:px-1.5 twa:py-0.5 twa:rounded twa:bg-[var(--ab-color-primary)] twa:text-[var(--ab-color-primarytext)]", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { children: previewIcon(mapping.Icon) }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-90", children: String(mapping.Key) })] }, index));
47
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:gap-1 twa:px-1.5 twa:py-0.5 twa:rounded twa:bg-[var(--ab-color-primary)] twa:text-[var(--ab-color-primarytext)]", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { children: previewIcon(mapping.Icon) }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-90", children: String(mapping.Key) })] }, `${String(mapping.Key)}-${index}`));
46
48
  };
47
49
  const renderMappingsPreview = (mappings) => {
48
50
  if (!mappings || mappings.length === 0) {
49
51
  return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No mappings" });
50
52
  }
51
- const previewItems = mappings.slice(0, 6).map((m, i) => previewMapping(m, i));
53
+ const previewItems = mappings.slice(0, ICON_MAPPINGS_PREVIEW_CHIP_LIMIT).map((m, i) => previewMapping(m, i));
52
54
  const remaining = mappings.length - previewItems.length;
53
55
  return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:gap-1 twa:flex-wrap", children: [previewItems, remaining > 0 && (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:text-xs twa:opacity-60", children: ["+", remaining, " more"] })] }));
54
56
  };
57
+ const formatIconCellTextSummary = (cellText) => cellText
58
+ ?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Description'))
59
+ .join(' + ') ?? '';
60
+ const formatIconToolTipSummary = (toolTipText) => toolTipText
61
+ ?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Description'))
62
+ .join(' + ') ?? '';
63
+ const getStyledColumnIconMappingsViewValues = (data) => {
64
+ const ic = data.IconStyle;
65
+ if (!ic) {
66
+ return [];
67
+ }
68
+ const effectiveMappings = (0, IconRenderer_1.resolveEffectiveIconStyleMappings)(ic);
69
+ const items = [`Mappings: ${effectiveMappings.length}`];
70
+ if (ic.Preset) {
71
+ items.push(`Preset: ${IconStylePresets_1.ICON_STYLE_PRESET_LABELS[ic.Preset]}`);
72
+ }
73
+ const customCount = ic.Mappings?.length ?? 0;
74
+ if (customCount > 0) {
75
+ items.push(`Custom Mappings: ${customCount}`);
76
+ }
77
+ if (ic.MatchMode && ic.MatchMode !== 'Exact') {
78
+ items.push(`Match Mode: ${ic.MatchMode}`);
79
+ }
80
+ if (ic.Fallback && ic.Fallback !== 'Hide') {
81
+ items.push(`Fallback: ${ic.Fallback}`);
82
+ }
83
+ return items;
84
+ };
85
+ exports.getStyledColumnIconMappingsViewValues = getStyledColumnIconMappingsViewValues;
86
+ const buildStyledColumnIconStyleSummaryStrings = (ic, options) => {
87
+ const items = [];
88
+ if (ic.Size != null) {
89
+ items.push(`Icon Size: ${ic.Size}px`);
90
+ }
91
+ if (ic.Gap != null) {
92
+ items.push(`Gap: ${ic.Gap}px`);
93
+ }
94
+ if (ic.CellText?.length) {
95
+ items.push(`Cell Text: ${formatIconCellTextSummary(ic.CellText)}`);
96
+ items.push(`Cell Text Position: ${ic.CellTextPosition ?? 'After'}`);
97
+ }
98
+ else if (options.includeEmptyCellText) {
99
+ items.push('Cell Text: None');
100
+ }
101
+ (0, StyledColumnSliceStyleEditors_1.getCellFontStyleSummaryItems)(ic.Font).forEach(({ label, value }) => {
102
+ items.push(`${label}: ${value}`);
103
+ });
104
+ (0, StyledColumnSliceStyleEditors_1.getCellBoxStyleSummaryItems)(ic.Cell).forEach(({ label, value }) => {
105
+ items.push(`${label}: ${value}`);
106
+ });
107
+ if (ic.ToolTipText?.length) {
108
+ items.push(`Tooltip: ${formatIconToolTipSummary(ic.ToolTipText)}`);
109
+ }
110
+ else if (options.includeEmptyTooltip) {
111
+ items.push('Tooltip: No Tooltip');
112
+ }
113
+ return items;
114
+ };
115
+ const getStyledColumnIconStyleViewValues = (data) => {
116
+ const ic = data.IconStyle;
117
+ if (!ic) {
118
+ return [];
119
+ }
120
+ return buildStyledColumnIconStyleSummaryStrings(ic, {
121
+ includeEmptyCellText: false,
122
+ includeEmptyTooltip: false,
123
+ });
124
+ };
125
+ exports.getStyledColumnIconStyleViewValues = getStyledColumnIconStyleViewValues;
55
126
  /** Mappings step summary. */
56
127
  const renderStyledColumnIconMappingsSummary = (data) => {
57
128
  const ic = data.IconStyle;
58
129
  if (!ic) {
59
130
  return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Icon Style defined" });
60
131
  }
61
- // Show the *effective* mapping count (preset + user) so the summary
62
- // matches what the renderer actually uses at runtime.
63
- const effectiveMappings = (0, IconRenderer_1.resolveEffectiveIconStyleMappings)(ic);
64
- const customCount = ic.Mappings?.length ?? 0;
65
- return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-2 twa:items-start", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:flex-wrap", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-1", children: [effectiveMappings.length, " ", effectiveMappings.length === 1 ? 'mapping' : 'mappings'] }), ic.Preset && ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-1", children: ["\u00B7 Preset: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: IconStylePresets_1.ICON_STYLE_PRESET_LABELS[ic.Preset] })] })), customCount > 0 && ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-1", children: ["\u00B7 Custom: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: customCount })] })), ic.MatchMode && ic.MatchMode !== 'Exact' && ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-1", children: ["\u00B7 Match: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: ic.MatchMode })] })), ic.Fallback && ic.Fallback !== 'Hide' && ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-1", children: ["\u00B7 Fallback: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: ic.Fallback })] }))] }), renderMappingsPreview(effectiveMappings)] }));
132
+ const tagItems = (0, exports.getStyledColumnIconMappingsViewValues)(data);
133
+ const previewMappings = (0, IconRenderer_1.resolveIconStyleMappingsForSummaryPreview)(ic);
134
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-2 twa:items-start", children: [(0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "center", className: "twa:flex-wrap twa:gap-2", children: tagItems.map((item) => ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: item }, item))) }), renderMappingsPreview(previewMappings)] }));
66
135
  };
67
136
  exports.renderStyledColumnIconMappingsSummary = renderStyledColumnIconMappingsSummary;
137
+ const StyledColumnIconMappingsView = ({ data }) => (0, exports.renderStyledColumnIconMappingsSummary)(data);
138
+ exports.StyledColumnIconMappingsView = StyledColumnIconMappingsView;
68
139
  /** Style step summary (size, text, tooltip, font / cell). */
69
140
  const renderStyledColumnIconStyleSummary = (data) => {
70
141
  const ic = data.IconStyle;
71
142
  if (!ic) {
72
143
  return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Icon Style defined" });
73
144
  }
74
- const cellText = ic.CellText ?? [];
75
- return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:flex-wrap", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-1", children: ["Size: ", (0, jsx_runtime_1.jsxs)(Tag_1.Tag, { children: [ic.Size ?? 18, "px"] })] }), cellText.length > 0 && ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-1", children: ["\u00B7 Text: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: cellText.join(', ') })] })), cellText.length > 0 && ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-1", children: ["\u00B7 Position: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: ic.CellTextPosition ?? 'After' })] })), ic.ToolTipText?.length > 0 && ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-1", children: ["\u00B7 Tooltip: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: ic.ToolTipText.join(', ') })] }))] }));
145
+ const items = buildStyledColumnIconStyleSummaryStrings(ic, {
146
+ includeEmptyCellText: true,
147
+ includeEmptyTooltip: true,
148
+ });
149
+ if (!items.length) {
150
+ return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Style Defined" });
151
+ }
152
+ return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "center", className: "twa:flex-wrap twa:gap-2", children: items.map((item) => ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: item }, item))) }));
76
153
  };
77
154
  exports.renderStyledColumnIconStyleSummary = renderStyledColumnIconStyleSummary;
78
155
  /**
@@ -248,7 +325,7 @@ const StyledColumnWizardIconSection = (props) => {
248
325
  { value: 'After', label: 'After' },
249
326
  { value: 'Above', label: 'Above' },
250
327
  { value: 'Below', label: 'Below' },
251
- ] }) }) })] }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: `twa:mt-3 twa:pt-3 twa:border-t twa:border-foreground/15 ${cellTextDisabled ? 'twa:opacity-50' : ''}`, children: (0, jsx_runtime_1.jsx)(StyledColumnSliceStyleEditors_1.StyledColumnFontStyleEditor, { api: api, disabled: disabled || cellTextDisabled, value: iconStyle.Font, onChange: onFontChange }) })] })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Tooltip" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Choose whether and how to display a tooltip" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(FormLayout_1.default, { sizes: [...STYLE_FORM_SIZES], children: (0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { label: "Tooltip Display:", children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { checked: toolTipText.includes('CellValue'), onChange: (checked) => toggleToolTipText('CellValue', checked), children: "Cell Value" }), ' ', (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { className: "twa:ml-3", checked: toolTipText.includes('IconDescription'), onChange: (checked) => toggleToolTipText('IconDescription', checked), children: "Description" })] }) }) })] }), (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: "Cell" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Optional cell box styling (overrides Format Column properties)" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(StyledColumnSliceStyleEditors_1.StyledColumnCellStyleEditor, { api: api, disabled: disabled, value: iconStyle.Cell, onChange: onCellChange }) })] })] }));
328
+ ] }) }) })] }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: `twa:mt-3 twa:pt-3 twa:border-t twa:border-foreground/15 ${cellTextDisabled ? 'twa:opacity-50' : ''}`, children: (0, jsx_runtime_1.jsx)(StyledColumnSliceStyleEditors_1.StyledColumnFontStyleEditor, { api: api, disabled: disabled || cellTextDisabled, value: iconStyle.Font, onChange: onFontChange }) })] })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Tooltip" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Choose whether and how to display a tooltip" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(FormLayout_1.default, { sizes: [...STYLE_FORM_SIZES], children: (0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { label: "Tooltip Display:", children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { checked: toolTipText.includes('CellValue'), onChange: (checked) => toggleToolTipText('CellValue', checked), children: "Cell Value" }), ' ', (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { className: "twa:ml-3", checked: toolTipText.includes('IconDescription'), onChange: (checked) => toggleToolTipText('IconDescription', checked), children: "Description" })] }) }) })] }), (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: "Cell" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Optional cell box styling (overrides Format Column properties)" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(StyledColumnSliceStyleEditors_1.StyledColumnCellStyleEditor, { api: api, disabled: disabled, value: iconStyle.Cell, onChange: onCellChange }) })] }), (0, jsx_runtime_1.jsx)(StyledColumnIconPreview_1.StyledColumnIconPreviewCard, { data: data })] }));
252
329
  };
253
330
  exports.StyledColumnWizardIconSection = StyledColumnWizardIconSection;
254
331
  const IconSpecEditorFields = (props) => {
@@ -1,7 +1,12 @@
1
1
  import * as React from 'react';
2
2
  import { StyledColumn } from '../../../AdaptableState/StyledColumnState';
3
+ export declare const getStyledColumnRangeBarRangeViewValues: (data: StyledColumn) => string[];
4
+ export declare const getStyledColumnRangeBarDisplayViewValues: (data: StyledColumn) => string[];
3
5
  /** Summary line for the Range wizard step (bounds + bands only). */
4
6
  export declare const renderStyledColumnRangeBarRangeStepSummary: (data: StyledColumn) => React.JSX.Element;
7
+ export declare const StyledColumnRangeBarRangeView: React.FunctionComponent<React.PropsWithChildren<{
8
+ data: StyledColumn;
9
+ }>>;
5
10
  /** Summary for the Display wizard step (markers, track, text). */
6
11
  export declare const renderStyledColumnRangeBarDisplayStepSummary: (data: StyledColumn) => React.JSX.Element;
7
12
  /**
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StyledColumnWizardRangeBarSection = exports.isValidRangeBarBounds = exports.renderStyledColumnRangeBarSummary = exports.renderStyledColumnRangeBarDisplayStepSummary = exports.renderStyledColumnRangeBarRangeStepSummary = void 0;
3
+ exports.StyledColumnWizardRangeBarSection = exports.isValidRangeBarBounds = exports.renderStyledColumnRangeBarSummary = exports.renderStyledColumnRangeBarDisplayStepSummary = exports.StyledColumnRangeBarRangeView = exports.renderStyledColumnRangeBarRangeStepSummary = exports.getStyledColumnRangeBarDisplayViewValues = exports.getStyledColumnRangeBarRangeViewValues = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const React = tslib_1.__importStar(require("react"));
@@ -18,7 +18,8 @@ const ArrayExtensions_1 = tslib_1.__importDefault(require("../../../Utilities/Ex
18
18
  const AdaptableInput_1 = tslib_1.__importDefault(require("../../Components/AdaptableInput"));
19
19
  const Flex_1 = require("../../../components/Flex");
20
20
  const NewSelect_1 = require("../../../components/NewSelect");
21
- const StyledColumnChartListPreviews_1 = require("./StyledColumnWizardStyleSection/Components/StyledColumnChartListPreviews");
21
+ const RangeBarRangesSummaryPreview_1 = require("./StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview");
22
+ const StyledColumnRangeBarPreview_1 = require("./StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview");
22
23
  const Card_1 = require("../../../components/Card");
23
24
  const RANGE_STYLE_FORM_SIZES = ['200px', '1fr'];
24
25
  const BOUND_MODE_LABELS = {
@@ -49,41 +50,125 @@ const summarizeBound = (bound) => {
49
50
  }
50
51
  return bound;
51
52
  };
52
- // ---------------------------------------------------------------------------
53
- // Summary helper (Wizard "Style" step header)
54
- // ---------------------------------------------------------------------------
53
+ const formatRangeBarCellTextSummary = (cellText) => cellText
54
+ ?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value'))
55
+ .join(' + ') ?? '';
56
+ const formatRangeBarToolTipSummary = (toolTipText) => toolTipText
57
+ ?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value'))
58
+ .join(' + ') ?? '';
59
+ const getStyledColumnRangeBarRangeViewValues = (data) => {
60
+ const range = data.RangeBarStyle;
61
+ if (!range) {
62
+ return [];
63
+ }
64
+ const items = [
65
+ `Min: ${summarizeBound(range.Min)}`,
66
+ `Max: ${summarizeBound(range.Max)}`,
67
+ ];
68
+ if (range.Reference != undefined) {
69
+ items.push(`Reference: ${summarizeBound(range.Reference)}`);
70
+ }
71
+ const bandCount = range.CellRanges?.length ?? 0;
72
+ if (bandCount > 0) {
73
+ items.push(`Bands: ${bandCount}`);
74
+ }
75
+ if (range.RangeValueType != null) {
76
+ items.push(`Range Value Type: ${range.RangeValueType}`);
77
+ }
78
+ return items;
79
+ };
80
+ exports.getStyledColumnRangeBarRangeViewValues = getStyledColumnRangeBarRangeViewValues;
81
+ const buildStyledColumnRangeBarDisplaySummaryStrings = (range, options) => {
82
+ const items = [];
83
+ const valueMarker = range.Marker;
84
+ const referenceMarker = range.ReferenceMarker;
85
+ items.push(`Value Marker Shape: ${valueMarker?.Shape ?? 'Diamond'}`);
86
+ if (valueMarker?.Color) {
87
+ items.push(`Value Marker Colour: ${valueMarker.Color}`);
88
+ }
89
+ if (valueMarker?.Size != null) {
90
+ items.push(`Value Marker Size: ${valueMarker.Size}px`);
91
+ }
92
+ if (range.Reference != undefined) {
93
+ items.push(`Reference Marker Shape: ${referenceMarker?.Shape ?? 'Line'}`);
94
+ if (referenceMarker?.Color) {
95
+ items.push(`Reference Marker Colour: ${referenceMarker.Color}`);
96
+ }
97
+ if (referenceMarker?.Size != null) {
98
+ items.push(`Reference Marker Size: ${referenceMarker.Size}px`);
99
+ }
100
+ }
101
+ if (range.Orientation === 'Vertical') {
102
+ items.push('Orientation: Vertical');
103
+ }
104
+ const outOfRangeMode = range.OutOfRangeMode ?? 'Clamp';
105
+ if (outOfRangeMode !== 'Clamp') {
106
+ items.push(`Out of Range: ${outOfRangeMode}`);
107
+ }
108
+ if (range.OutOfRangeColor) {
109
+ items.push(`Out of Range Colour: ${range.OutOfRangeColor}`);
110
+ }
111
+ if (range.TrackColor) {
112
+ items.push(`Track Colour: ${range.TrackColor}`);
113
+ }
114
+ if (range.TrackHeight != null) {
115
+ items.push(`Track Height: ${range.TrackHeight}px`);
116
+ }
117
+ if (range.BackColor) {
118
+ items.push(`Back Colour: ${range.BackColor}`);
119
+ }
120
+ if (range.CellText?.length) {
121
+ items.push(`Cell Text: ${formatRangeBarCellTextSummary(range.CellText)}`);
122
+ items.push(`Cell Text Position: ${range.CellTextPosition ?? 'Below'}`);
123
+ }
124
+ else if (options.includeEmptyCellText) {
125
+ items.push('Cell Text: None');
126
+ }
127
+ if (range.ToolTipText?.length) {
128
+ items.push(`Tooltip: ${formatRangeBarToolTipSummary(range.ToolTipText)}`);
129
+ }
130
+ else if (options.includeEmptyTooltip) {
131
+ items.push('Tooltip: No Tooltip');
132
+ }
133
+ return items;
134
+ };
135
+ const getStyledColumnRangeBarDisplayViewValues = (data) => {
136
+ const range = data.RangeBarStyle;
137
+ if (!range) {
138
+ return [];
139
+ }
140
+ return buildStyledColumnRangeBarDisplaySummaryStrings(range, {
141
+ includeEmptyCellText: false,
142
+ includeEmptyTooltip: false,
143
+ });
144
+ };
145
+ exports.getStyledColumnRangeBarDisplayViewValues = getStyledColumnRangeBarDisplayViewValues;
55
146
  /** Summary line for the Range wizard step (bounds + bands only). */
56
147
  const renderStyledColumnRangeBarRangeStepSummary = (data) => {
57
148
  const range = data.RangeBarStyle;
58
149
  if (!range) {
59
150
  return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Styling Defined" });
60
151
  }
61
- const bandCount = range.CellRanges?.length ?? 0;
62
- const hasReference = range.Reference != undefined;
63
- return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-2 twa:items-start", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:flex-wrap", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-1", children: ["Min: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: summarizeBound(range.Min) })] }), (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-1", children: ["\u00B7 Max: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: summarizeBound(range.Max) })] }), hasReference && ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-1", children: ["\u00B7 Ref: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: summarizeBound(range.Reference) })] })), bandCount > 0 && ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-1", children: ["\u00B7 ", bandCount, " ", bandCount === 1 ? 'band' : 'bands'] }))] }), (0, jsx_runtime_1.jsx)(StyledColumnChartListPreviews_1.StyledColumnRangeBarListPreview, { range: range })] }));
152
+ const tagItems = (0, exports.getStyledColumnRangeBarRangeViewValues)(data);
153
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-2 twa:items-start", children: [(0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "center", className: "twa:flex-wrap twa:gap-2", children: tagItems.map((item) => ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: item }, item))) }), (0, jsx_runtime_1.jsx)(RangeBarRangesSummaryPreview_1.RangeBarRangesSummaryPreview, { rangeStyle: range })] }));
64
154
  };
65
155
  exports.renderStyledColumnRangeBarRangeStepSummary = renderStyledColumnRangeBarRangeStepSummary;
156
+ const StyledColumnRangeBarRangeView = ({ data }) => (0, exports.renderStyledColumnRangeBarRangeStepSummary)(data);
157
+ exports.StyledColumnRangeBarRangeView = StyledColumnRangeBarRangeView;
66
158
  /** Summary for the Display wizard step (markers, track, text). */
67
159
  const renderStyledColumnRangeBarDisplayStepSummary = (data) => {
68
160
  const range = data.RangeBarStyle;
69
161
  if (!range) {
70
162
  return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Styling Defined" });
71
163
  }
72
- const isVertical = range.Orientation === 'Vertical';
73
- const mode = range.OutOfRangeMode ?? 'Clamp';
74
- const parts = [];
75
- parts.push((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-1", children: ["Value marker: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: range.Marker?.Shape ?? 'Diamond' })] }, "vm"));
76
- if (range.Reference != undefined) {
77
- parts.push((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-1", children: ["\u00B7 Ref marker: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: range.ReferenceMarker?.Shape ?? 'Line' })] }, "rm"));
78
- }
79
- if (isVertical) {
80
- parts.push((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-1", children: ["\u00B7 ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "vertical" })] }, "v"));
164
+ const items = buildStyledColumnRangeBarDisplaySummaryStrings(range, {
165
+ includeEmptyCellText: true,
166
+ includeEmptyTooltip: true,
167
+ });
168
+ if (!items.length) {
169
+ return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Display Defined" });
81
170
  }
82
- parts.push((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-1", children: ["\u00B7 Out: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: mode })] }, "orm"));
83
- if (range.CellText?.length) {
84
- parts.push((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-1", children: ["\u00B7 Text: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: range.CellText.join(', ') })] }, "ct"));
85
- }
86
- return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-2 twa:items-start", children: [(0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "center", className: "twa:flex-wrap", children: parts }), (0, jsx_runtime_1.jsx)(StyledColumnChartListPreviews_1.StyledColumnRangeBarListPreview, { range: range })] }));
171
+ return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "center", className: "twa:flex-wrap twa:gap-2", children: items.map((item) => ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: item }, item))) }));
87
172
  };
88
173
  exports.renderStyledColumnRangeBarDisplayStepSummary = renderStyledColumnRangeBarDisplayStepSummary;
89
174
  /**
@@ -94,10 +179,7 @@ const renderStyledColumnRangeBarSummary = (data) => {
94
179
  if (!range) {
95
180
  return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Styling Defined" });
96
181
  }
97
- const bandCount = range.CellRanges?.length ?? 0;
98
- const isVertical = range.Orientation === 'Vertical';
99
- const hasReference = range.Reference != undefined;
100
- return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-2 twa:items-start", children: [(0, jsx_runtime_1.jsx)(StyledColumnChartListPreviews_1.StyledColumnRangeBarListPreview, { range: range }), (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:flex-wrap", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-1", children: ["Min: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: summarizeBound(range.Min) })] }), (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-1", children: ["\u00B7 Max: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: summarizeBound(range.Max) })] }), hasReference && ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-1", children: ["\u00B7 Ref: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: summarizeBound(range.Reference) })] })), bandCount > 0 && ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-1", children: ["\u00B7 ", bandCount, " ", bandCount === 1 ? 'band' : 'bands'] })), isVertical && ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-1", children: ["\u00B7 ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "vertical" })] }))] })] }));
182
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-3 twa:items-start", children: [(0, exports.renderStyledColumnRangeBarRangeStepSummary)(data), (0, exports.renderStyledColumnRangeBarDisplayStepSummary)(data)] }));
101
183
  };
102
184
  exports.renderStyledColumnRangeBarSummary = renderStyledColumnRangeBarSummary;
103
185
  // ---------------------------------------------------------------------------
@@ -136,19 +218,25 @@ const MARKER_SHAPES = [
136
218
  ];
137
219
  const StyledColumnWizardRangeBarSection = (props) => {
138
220
  const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
139
- const minMaxRangeValues = React.useMemo(() => {
221
+ const column = React.useMemo(() => {
140
222
  const columnId = data.ColumnId;
141
- if (!columnId)
223
+ if (!columnId) {
224
+ return undefined;
225
+ }
226
+ return api.columnApi.getColumnWithColumnId(columnId);
227
+ }, [data.ColumnId, api]);
228
+ const minMaxRangeValues = React.useMemo(() => {
229
+ if (!column) {
142
230
  return null;
143
- const column = api.columnApi.getColumnWithColumnId(columnId);
231
+ }
144
232
  return {
145
233
  min: api.styledColumnApi.internalApi.getMinValueForNumericColumn(column),
146
234
  max: api.styledColumnApi.internalApi.getMaxValueForNumericColumn(column),
147
235
  };
148
- }, [data]);
236
+ }, [column, api]);
149
237
  const scope = { ColumnIds: [data.ColumnId] };
150
238
  const range = data.RangeBarStyle ?? {};
151
- const disabled = !data.ColumnId;
239
+ const disabled = !data.ColumnId || !column;
152
240
  // -------------------------------------------------------------------------
153
241
  // Updaters
154
242
  // -------------------------------------------------------------------------
@@ -278,8 +366,10 @@ const StyledColumnWizardRangeBarSection = (props) => {
278
366
  // -------------------------------------------------------------------------
279
367
  // Render
280
368
  // -------------------------------------------------------------------------
281
- if (!data.ColumnId) {
282
- return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { children: (0, jsx_runtime_1.jsx)(ErrorBox_1.default, { className: "twa:mt-2", children: "You need to select a column before styling." }) }));
369
+ if (!data.ColumnId || !column) {
370
+ return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { children: (0, jsx_runtime_1.jsx)(ErrorBox_1.default, { className: "twa:mt-2", children: !data.ColumnId
371
+ ? 'You need to select a column before styling.'
372
+ : `Column "${data.ColumnId}" was not found in the grid.` }) }));
283
373
  }
284
374
  const hasReference = range.Reference != undefined;
285
375
  const outOfRangeMode = range.OutOfRangeMode ?? 'Clamp';
@@ -299,7 +389,7 @@ const StyledColumnWizardRangeBarSection = (props) => {
299
389
  field: 'Reference',
300
390
  optional: true,
301
391
  fallbackNumber: minMaxRangeValues?.max ?? 0,
302
- })] }) })] }), (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: "Ranges" }), (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-700px]", children: ["Optional coloured segments drawn ", (0, jsx_runtime_1.jsx)("em", { children: "behind" }), " track to form qualitative scale;leave empty for a plain track"] })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(RangesComponent_1.RangesComponent, { allowEmptyRanges: true, disabled: disabled, minMaxRangeValues: minMaxRangeValues, api: api, scope: scope, ranges: range.CellRanges, rangeValueType: range.RangeValueType, onRangeValueTypeChange: onRangeValueTypeChange, columnComparison: range.ColumnComparison, updateRanges: onUpdateRanges, updateColumnComparison: onUpdateColumnComparison, hideColumnComparison: true }) })] })] })), !isRangeVariant && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Value Marker" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Drawn at the cell value's position along the track." })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsxs)(FormLayout_1.default, { sizes: [...RANGE_STYLE_FORM_SIZES], children: [(0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Shape:", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[160px]", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { className: "twa:w-full", value: valueMarker.Shape, onValueChange: (s) => updateValueMarker({ Shape: s }), items: MARKER_SHAPES.map((s) => ({ value: s.value, label: s.label })) }) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: `${api.internalApi.getCorrectEnglishVariant('Colour')}:`, children: (0, jsx_runtime_1.jsx)(ColorPicker_1.ColorPicker, { disabled: disabled, api: api, value: valueMarker.Color || undefined, onChange: (c) => updateValueMarker({ Color: c }) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Size:", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[100px]", children: (0, jsx_runtime_1.jsx)(AdaptableInput_1.default, { type: "number", min: 1, value: valueMarker.Size, onChange: (e) => updateValueMarker({ Size: Number(e.target.value) }) }) }) })] }) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Reference Marker" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: hasReference
392
+ })] }) })] }), (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: "Ranges" }), (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-700px]", children: ["Optional coloured segments drawn ", (0, jsx_runtime_1.jsx)("em", { children: "behind" }), " track to form qualitative scale;leave empty for a plain track"] })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(RangesComponent_1.RangesComponent, { allowEmptyRanges: true, disabled: disabled, minMaxRangeValues: minMaxRangeValues, api: api, scope: scope, ranges: range.CellRanges ?? [], rangeValueType: range.RangeValueType, onRangeValueTypeChange: onRangeValueTypeChange, columnComparison: range.ColumnComparison, updateRanges: onUpdateRanges, updateColumnComparison: onUpdateColumnComparison, hideColumnComparison: true }) })] })] })), !isRangeVariant && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Value Marker" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Drawn at the cell value's position along the track." })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsxs)(FormLayout_1.default, { sizes: [...RANGE_STYLE_FORM_SIZES], children: [(0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Shape:", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[160px]", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { className: "twa:w-full", value: valueMarker.Shape, onValueChange: (s) => updateValueMarker({ Shape: s }), items: MARKER_SHAPES.map((s) => ({ value: s.value, label: s.label })) }) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: `${api.internalApi.getCorrectEnglishVariant('Colour')}:`, children: (0, jsx_runtime_1.jsx)(ColorPicker_1.ColorPicker, { disabled: disabled, api: api, value: valueMarker.Color || undefined, onChange: (c) => updateValueMarker({ Color: c }) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Size:", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[100px]", children: (0, jsx_runtime_1.jsx)(AdaptableInput_1.default, { type: "number", min: 1, value: valueMarker.Size, onChange: (e) => updateValueMarker({ Size: Number(e.target.value) }) }) }) })] }) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Reference Marker" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: hasReference
303
393
  ? 'Drawn at the Reference value (e.g. previous close, target, midpoint).'
304
394
  : 'Optional second marker when a Reference bound is set on the Style step.' })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: hasReference ? ((0, jsx_runtime_1.jsxs)(FormLayout_1.default, { sizes: [...RANGE_STYLE_FORM_SIZES], children: [(0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Shape:", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[160px]", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { className: "twa:w-full", value: referenceMarker.Shape, onValueChange: (s) => updateReferenceMarker({ Shape: s }), items: MARKER_SHAPES.map((s) => ({ value: s.value, label: s.label })) }) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: `${api.internalApi.getCorrectEnglishVariant('Colour')}:`, children: (0, jsx_runtime_1.jsx)(ColorPicker_1.ColorPicker, { disabled: disabled, api: api, value: referenceMarker.Color || undefined, onChange: (c) => updateReferenceMarker({ Color: c }) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Size:", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[100px]", children: (0, jsx_runtime_1.jsx)(AdaptableInput_1.default, { type: "number", min: 1, value: referenceMarker.Size, onChange: (e) => updateReferenceMarker({ Size: Number(e.target.value) }) }) }) })] })) : ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-60 twa:max-w-[520px]", children: "Add a Reference value on the Style step (Bounds section) to enable this marker (e.g. previous close, target, midpoint)." })) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Track" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "The line representing the [Min, Max] interval, plus optional cell background." })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsxs)(FormLayout_1.default, { sizes: [...RANGE_STYLE_FORM_SIZES], children: [(0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Orientation:", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[160px]", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { className: "twa:w-full", value: range.Orientation ?? 'Horizontal', onValueChange: (v) => update({ Orientation: v }), items: [
305
395
  { value: 'Horizontal', label: 'Horizontal' },
@@ -314,6 +404,6 @@ const StyledColumnWizardRangeBarSection = (props) => {
314
404
  { label: 'Above Bar', onClick: () => handleCellTextPositionChange('Above') },
315
405
  { label: 'Below Bar', onClick: () => handleCellTextPositionChange('Below') },
316
406
  { label: 'Merged', onClick: () => handleCellTextPositionChange('Merged') },
317
- ], children: range.CellTextPosition ?? 'Below' }) }), (0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { label: "Tooltip Display:", children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: disabled, checked: range.ToolTipText?.includes('CellValue'), onChange: (checked) => toggleToolTipText('CellValue', checked), children: "Cell Value" }), ' ', (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: disabled, className: "twa:ml-3", checked: range.ToolTipText?.includes('PercentageValue'), onChange: (checked) => toggleToolTipText('PercentageValue', checked), children: "Percent Value" })] })] }) })] })] }))] }));
407
+ ], children: range.CellTextPosition ?? 'Below' }) }), (0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { label: "Tooltip Display:", children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: disabled, checked: range.ToolTipText?.includes('CellValue'), onChange: (checked) => toggleToolTipText('CellValue', checked), children: "Cell Value" }), ' ', (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: disabled, className: "twa:ml-3", checked: range.ToolTipText?.includes('PercentageValue'), onChange: (checked) => toggleToolTipText('PercentageValue', checked), children: "Percent Value" })] })] }) })] }), (0, jsx_runtime_1.jsx)(StyledColumnRangeBarPreview_1.StyledColumnRangeBarPreviewCard, { data: data })] }))] }));
318
408
  };
319
409
  exports.StyledColumnWizardRangeBarSection = StyledColumnWizardRangeBarSection;
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { StyledColumn } from '../../../AdaptableState/StyledColumnState';
3
+ export declare const getStyledColumnRatingStyleViewValues: (data: StyledColumn) => string[];
3
4
  export declare const renderStyledColumnRatingSummary: (data: StyledColumn) => React.JSX.Element;
4
5
  export declare const isValidRatingStyle: (data: StyledColumn) => true | string;
5
6
  export interface StyledColumnWizardRatingSectionProps {