@adaptabletools/adaptable 23.0.0-canary.4 → 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 (248) hide show
  1. package/index.css +116 -61
  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 +27 -2
  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 +1 -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 +17 -7
  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 +14 -7
  34. package/src/Strategy/LayoutModule.js +13 -8
  35. package/src/Strategy/StyledColumnModule.js +64 -36
  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 +65 -0
  41. package/src/Utilities/Helpers/StyledColumnGradientHelper.d.ts +23 -1
  42. package/src/Utilities/Helpers/StyledColumnGradientHelper.js +204 -0
  43. package/src/Utilities/Helpers/ThemeHelpers.d.ts +5 -0
  44. package/src/Utilities/Helpers/ThemeHelpers.js +38 -0
  45. package/src/Utilities/Helpers/percentBarPreviewHelper.d.ts +19 -0
  46. package/src/Utilities/Helpers/percentBarPreviewHelper.js +143 -0
  47. package/src/Utilities/ObjectFactory.d.ts +1 -3
  48. package/src/Utilities/ObjectFactory.js +0 -8
  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 +114 -103
  52. package/src/View/Alert/Wizard/AlertMessageWizardSection.js +13 -14
  53. package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +55 -55
  54. package/src/View/Alert/Wizard/AlertRulesWizardSection.js +3 -2
  55. package/src/View/Alert/Wizard/AlertScheduledWizardSection.js +2 -2
  56. package/src/View/Alert/Wizard/AlertScopeWizardSection.js +31 -39
  57. package/src/View/Alert/Wizard/AlertTypeWizardSection.js +3 -4
  58. package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.js +9 -13
  59. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +30 -17
  60. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +7 -9
  61. package/src/View/CalculatedColumn/Wizard/CalculatedColumnTypeSection.js +3 -3
  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 +21 -0
  69. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.d.ts +1 -0
  70. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +10 -7
  71. package/src/View/Comments/CommentsEditor.js +1 -1
  72. package/src/View/Components/ModuleProfile.js +1 -1
  73. package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +0 -1
  74. package/src/View/Components/Popups/WindowPopups/windowFactory.js +0 -1
  75. package/src/View/Components/RangesComponent.d.ts +7 -2
  76. package/src/View/Components/RangesComponent.js +94 -22
  77. package/src/View/Components/StyleComponent.d.ts +1 -0
  78. package/src/View/Components/StyleComponent.js +1 -1
  79. package/src/View/Components/ValueSelector/index.js +70 -57
  80. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +8 -13
  81. package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +8 -8
  82. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -1
  83. package/src/View/DataImport/DataImportWizard/sections/ColumnsSection.js +11 -12
  84. package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadSection.js +6 -4
  85. package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadTextSection.js +3 -2
  86. package/src/View/DataImport/DataImportWizard/sections/ValidationSection.js +5 -15
  87. package/src/View/Export/Wizard/ReportColumnsWizardSection.js +24 -26
  88. package/src/View/Export/Wizard/ReportNameWizardSection.js +10 -13
  89. package/src/View/Export/Wizard/ReportRowsWizardSection.js +20 -22
  90. package/src/View/Export/Wizard/ScheduledReportSettings.d.ts +2 -0
  91. package/src/View/Export/Wizard/ScheduledReportSettings.js +13 -13
  92. package/src/View/Export/Wizard/ScheduledReportWizard.js +4 -5
  93. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +8 -6
  94. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +21 -22
  95. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +20 -11
  96. package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.js +21 -5
  97. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +4 -4
  98. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +7 -0
  99. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +117 -12
  100. package/src/View/FormatColumn/Wizard/FormatColumnPreview.d.ts +15 -0
  101. package/src/View/FormatColumn/Wizard/FormatColumnPreview.js +66 -0
  102. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +4 -0
  103. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +30 -0
  104. package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +13 -8
  105. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +1 -1
  106. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +3 -1
  107. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +62 -13
  108. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +5 -3
  109. package/src/View/FreeTextColumn/Utilities/getFreeTextColumnSettingsTags.d.ts +2 -0
  110. package/src/View/FreeTextColumn/Utilities/getFreeTextColumnSettingsTags.js +15 -0
  111. package/src/View/FreeTextColumn/Wizard/FreeTextColumnDefinitionWizardSection.d.ts +10 -0
  112. package/src/View/FreeTextColumn/Wizard/FreeTextColumnDefinitionWizardSection.js +53 -0
  113. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +2 -3
  114. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +33 -68
  115. package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +15 -11
  116. package/src/View/Layout/TransposedPopup.js +2 -2
  117. package/src/View/Layout/Wizard/LayoutWizard.js +3 -3
  118. package/src/View/Layout/Wizard/sections/AggregationsSection.d.ts +2 -3
  119. package/src/View/Layout/Wizard/sections/AggregationsSection.js +115 -26
  120. package/src/View/Layout/Wizard/sections/ColumnsSection.js +79 -79
  121. package/src/View/Layout/Wizard/sections/FilterSection.js +31 -32
  122. package/src/View/Layout/Wizard/sections/GridFilterSection.js +11 -11
  123. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.d.ts +1 -2
  124. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +101 -52
  125. package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +9 -8
  126. package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.js +4 -4
  127. package/src/View/Layout/Wizard/sections/RowGroupingSection.js +36 -33
  128. package/src/View/Layout/Wizard/sections/RowSelectionSection.js +2 -2
  129. package/src/View/Layout/Wizard/sections/RowSummarySection.js +95 -73
  130. package/src/View/Layout/Wizard/sections/SettingsSection.js +4 -5
  131. package/src/View/Layout/Wizard/sections/SortSection.js +2 -2
  132. package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +1 -1
  133. package/src/View/NamedQuery/Wizard/NamedQuerySettingsWizardSection.js +9 -14
  134. package/src/View/NamedQuery/Wizard/NamedQueryWizard.js +1 -3
  135. package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.d.ts +4 -0
  136. package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.js +43 -13
  137. package/src/View/PlusMinus/Wizard/PlusMinusScopeWizardSection.js +11 -18
  138. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.d.ts +2 -6
  139. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +6 -22
  140. package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +15 -21
  141. package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +2 -2
  142. package/src/View/Shortcut/Wizard/ShortcutScopeWizardSection.js +11 -18
  143. package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +17 -6
  144. package/src/View/Shortcut/Wizard/ShortcutWizard.js +3 -3
  145. package/src/View/Shortcut/shortcutOperations.d.ts +3 -0
  146. package/src/View/Shortcut/shortcutOperations.js +28 -0
  147. package/src/View/SpecialColumnSettingsWizardStep.js +9 -8
  148. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +5 -0
  149. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +24 -15
  150. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.d.ts +10 -2
  151. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +96 -16
  152. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.d.ts +14 -0
  153. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.js +45 -24
  154. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.d.ts +2 -3
  155. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +108 -33
  156. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +21 -13
  157. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.d.ts +5 -0
  158. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +121 -23
  159. package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.d.ts +1 -0
  160. package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +34 -11
  161. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.d.ts +5 -0
  162. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +86 -12
  163. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.d.ts +5 -0
  164. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +121 -34
  165. package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.d.ts +1 -0
  166. package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +55 -75
  167. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.d.ts +5 -0
  168. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.js +16 -0
  169. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.js +7 -13
  170. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarColumnComparisonPreview.js +5 -5
  171. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarRangesPreview.js +4 -3
  172. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.d.ts +5 -4
  173. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.js +12 -14
  174. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.d.ts +5 -0
  175. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.js +16 -0
  176. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.d.ts +3 -0
  177. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +31 -3
  178. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.d.ts +9 -0
  179. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +58 -0
  180. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.d.ts +10 -0
  181. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.js +30 -0
  182. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.d.ts +10 -0
  183. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.js +91 -0
  184. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.d.ts +8 -0
  185. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.js +52 -0
  186. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.d.ts +8 -0
  187. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +53 -0
  188. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.d.ts +18 -0
  189. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.js +58 -0
  190. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.d.ts +10 -0
  191. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.js +126 -0
  192. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardRangesSection.js +12 -5
  193. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.d.ts +1 -5
  194. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +52 -29
  195. package/src/View/SystemStatus/Utilities/getStatusItemStyle.js +1 -1
  196. package/src/View/Theme/ThemePopup.d.ts +2 -14
  197. package/src/View/Theme/ThemePopup.js +1 -36
  198. package/src/View/UIHelper.js +1 -1
  199. package/src/View/Wizard/OnePageAdaptableWizard.js +7 -21
  200. package/src/agGrid/AdaptableAgGrid.d.ts +1 -0
  201. package/src/agGrid/AdaptableAgGrid.js +35 -25
  202. package/src/agGrid/AgGridAdapter.d.ts +1 -1
  203. package/src/agGrid/AgGridAdapter.js +27 -17
  204. package/src/agGrid/AgGridColumnAdapter.js +9 -15
  205. package/src/agGrid/AgGridMenuAdapter.d.ts +0 -1
  206. package/src/agGrid/AgGridMenuAdapter.js +20 -37
  207. package/src/agGrid/buildValueAggregationMenuItem.d.ts +19 -0
  208. package/src/agGrid/buildValueAggregationMenuItem.js +111 -0
  209. package/src/agGrid/cellRenderers/IconRenderer.d.ts +6 -0
  210. package/src/agGrid/cellRenderers/IconRenderer.js +43 -15
  211. package/src/agGrid/createAgGridIcon.d.ts +10 -0
  212. package/src/agGrid/createAgGridIcon.js +16 -0
  213. package/src/components/DragAndDropContext/UnusedPanel.js +1 -1
  214. package/src/components/ExpressionEditor/BaseEditorInput.js +1 -1
  215. package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +1 -1
  216. package/src/components/Input/NumberInput.js +1 -1
  217. package/src/components/Panel/index.js +1 -1
  218. package/src/components/SimpleButton/index.js +4 -4
  219. package/src/components/Toggle/Toggle.js +1 -1
  220. package/src/components/Toggle/ToggleGroup.js +1 -1
  221. package/src/env.js +2 -2
  222. package/src/layout-manager/src/index.js +2 -9
  223. package/src/metamodel/adaptable.metamodel.d.ts +39 -29
  224. package/src/metamodel/adaptable.metamodel.js +1 -1
  225. package/src/types.d.ts +5 -4
  226. package/themes/dark.css +1 -68
  227. package/themes/light.css +1 -5
  228. package/tsconfig.esm.tsbuildinfo +1 -1
  229. package/src/Aggregation/ParameterizedAggregationRegistry.d.ts +0 -35
  230. package/src/Aggregation/ParameterizedAggregationRegistry.js +0 -63
  231. package/src/Aggregation/definitions/weightedAverageAggregationDefinition.d.ts +0 -3
  232. package/src/Aggregation/definitions/weightedAverageAggregationDefinition.js +0 -55
  233. package/src/Aggregation/parameterizedAggregationColumnMenu.d.ts +0 -8
  234. package/src/Aggregation/parameterizedAggregationColumnMenu.js +0 -137
  235. package/src/Aggregation/parameterizedAggregationHeader.d.ts +0 -13
  236. package/src/Aggregation/parameterizedAggregationHeader.js +0 -60
  237. package/src/Aggregation/parameterizedAggregationHelpers.d.ts +0 -23
  238. package/src/Aggregation/parameterizedAggregationHelpers.js +0 -111
  239. package/src/Aggregation/parameterizedAggregationWizardHelpers.d.ts +0 -9
  240. package/src/Aggregation/parameterizedAggregationWizardHelpers.js +0 -66
  241. package/src/Aggregation/validateParameterizedAggregations.d.ts +0 -4
  242. package/src/Aggregation/validateParameterizedAggregations.js +0 -20
  243. package/src/View/Layout/Wizard/sections/ParameterizedAggFuncPicker.d.ts +0 -12
  244. package/src/View/Layout/Wizard/sections/ParameterizedAggFuncPicker.js +0 -43
  245. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgeSettings.d.ts +0 -5
  246. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgeSettings.js +0 -28
  247. package/src/View/Theme/VariantSelector.d.ts +0 -8
  248. package/src/View/Theme/VariantSelector.js +0 -20
@@ -1,6 +1,8 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { NewScopeComponent, renderScopeSummary } from '../../Components/NewScopeComponent';
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { NewScopeComponent } from '../../Components/NewScopeComponent';
3
3
  import { useOnePageAdaptableWizardContext } from '../../Wizard/OnePageAdaptableWizard';
4
+ import { useAdaptable } from '../../AdaptableContext';
5
+ import { getColumnTypeFriendlyName } from '../../../AdaptableState/Common/AdaptableColumn';
4
6
  import { isScopeColumnIds } from '../../../AdaptableState/Common/ColumnScope';
5
7
  import { Box, Flex } from '../../../components/Flex';
6
8
  import FormLayout, { FormRow } from '../../../components/FormLayout';
@@ -29,15 +31,18 @@ const isRowKindIncluded = (data, kind) => {
29
31
  const collectIncludedRowKinds = (data) => {
30
32
  return FORMAT_COLUMN_ROW_KINDS.filter((k) => isRowKindIncluded(data, k));
31
33
  };
32
- export const renderFormatColumnScopeSummary = (data) => {
34
+ const FormatColumnScopeSummaryContent = ({ data, }) => {
35
+ const adaptable = useAdaptable();
36
+ const scopeApi = adaptable.api.columnScopeApi;
37
+ const scope = data.Scope;
38
+ const columnsInScope = scopeApi.getColumnsInScope(scope);
33
39
  const showRows = data.Target === 'cell';
34
40
  const includedKinds = collectIncludedRowKinds(data);
35
41
  const allKinds = includedKinds.length === 4;
36
- return (_jsxs(Box, { className: "twa:pr-2 twa:py-2", children: [_jsx(Box, { children: renderScopeSummary(data.Scope, {
37
- scopeWholeRow: 'Matching rows will be formatted',
38
- scopeColumns: 'Cells in selected columns will be formatted',
39
- scopeDataTypes: 'Cells in columns with these Data Types will be formatted',
40
- }) }), showRows && (_jsxs(Box, { className: "twa:mt-3", children: ["Rows:", ' ', allKinds ? (_jsx(Tag, { children: "All" })) : includedKinds.length === 0 ? (_jsx(Tag, { children: "None" })) : (includedKinds.map((k) => (_jsx(Tag, { className: "twa:mr-1", children: k }, k))))] }))] }));
42
+ return (_jsxs(Box, { className: "twa:flex twa:flex-col twa:gap-3", children: [_jsx(Box, { children: scopeApi.scopeIsAll(scope) ? (_jsxs(_Fragment, { children: ["Columns ", _jsx(Tag, { children: "All" })] })) : 'ColumnIds' in scope ? (_jsxs(_Fragment, { children: ["Columns", ' ', columnsInScope.length ? (columnsInScope.map((column) => (_jsx(Tag, { className: "twa:mr-1", children: column.friendlyName }, column.columnId)))) : (_jsx(Tag, { children: "None" }))] })) : 'DataTypes' in scope ? (_jsxs(_Fragment, { children: ["Data Types", ' ', scope.DataTypes.length ? (scope.DataTypes.map((dataType) => (_jsx(Tag, { className: "twa:mr-1", children: getColumnTypeFriendlyName(dataType) }, dataType)))) : (_jsx(Tag, { children: "None" }))] })) : null }), showRows && (_jsxs(Box, { children: ["Rows", ' ', allKinds ? (_jsx(Tag, { children: "All" })) : includedKinds.length === 0 ? (_jsx(Tag, { children: "None" })) : (includedKinds.map((k) => (_jsx(Tag, { className: "twa:mr-1", children: k }, k))))] }))] }));
43
+ };
44
+ export const renderFormatColumnScopeSummary = (data) => {
45
+ return _jsx(FormatColumnScopeSummaryContent, { data: data });
41
46
  };
42
47
  // ---------------------------------------------------------------------------
43
48
  // Section
@@ -8,7 +8,7 @@ import { Card } from '../../../components/Card';
8
8
  import Input from '../../../components/Input';
9
9
  import { TypeRadio } from '../../Wizard/TypeRadio';
10
10
  export const renderFormatColumnSettingsSummary = (data) => {
11
- return (_jsxs(Box, { className: "twa:p-2", children: [_jsxs(Box, { className: "twa:mt-3", children: ["Name ", _jsx(Tag, { children: data.Name })] }), _jsxs(Box, { className: "twa:mt-3", children: ["Target", ' ', _jsx(Tag, { children: !data.Target || data.Target === 'cell' ? 'Column Cells' : 'Column Header' })] }), ' ', _jsxs(Box, { className: "twa:mt-3", children: ["Apply on Column Groups:", ' ', _jsx(Tag, { children: !data.ColumnGroupScope || data.ColumnGroupScope === 'Both'
11
+ return (_jsxs(Flex, { flexWrap: "wrap", alignItems: "center", className: "twa:gap-x-4 twa:gap-y-2", children: [_jsxs(Box, { children: ["Name ", _jsx(Tag, { children: data.Name })] }), _jsxs(Box, { children: ["Target", ' ', _jsx(Tag, { children: !data.Target || data.Target === 'cell' ? 'Column Cells' : 'Column Header' })] }), _jsxs(Box, { children: ["Column Groups", ' ', _jsx(Tag, { children: !data.ColumnGroupScope || data.ColumnGroupScope === 'Both'
12
12
  ? 'Always'
13
13
  : data.ColumnGroupScope })] })] }));
14
14
  };
@@ -5,7 +5,9 @@ export declare const isFormatColumnStyleValid: (data: FormatColumn, api: Adaptab
5
5
  type FormatColumnStyleWizardSectionProps = {
6
6
  onChange: (data: FormatColumn) => void;
7
7
  };
8
+ export declare const hasFormatColumnStyle: (formatColumn: FormatColumn) => boolean;
9
+ export declare const getFormatColumnStyleViewValues: (formatColumn: FormatColumn) => string[];
8
10
  export declare const renderFormatColumnStyleWizardSummary: (data: FormatColumn) => React.JSX.Element;
9
- export declare const renderFormatColumnStyleSummary: (data: FormatColumn, api: AdaptableApi) => React.JSX.Element;
11
+ export declare const renderFormatColumnStyleSummary: (data: FormatColumn, _api: AdaptableApi) => React.JSX.Element;
10
12
  export declare function FormatColumnStyleWizardSection(props: FormatColumnStyleWizardSectionProps): React.JSX.Element;
11
13
  export {};
@@ -1,9 +1,11 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { convertAdaptableStyleToCSS } from '../../../Utilities/Helpers/StyleHelper';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
2
  import { StyleComponent } from '../../Components/StyleComponent';
4
3
  import { useOnePageAdaptableWizardContext } from '../../Wizard/OnePageAdaptableWizard';
5
4
  import UIHelper from '../../UIHelper';
5
+ import StringExtensions from '../../../Utilities/Extensions/StringExtensions';
6
6
  import { Box } from '../../../components/Flex';
7
+ import { Tag } from '../../../components/Tag';
8
+ import { getFormatColumnStylePreviewText } from './FormatColumnPreview';
7
9
  export const isFormatColumnStyleValid = (data, api) => {
8
10
  if (data.Style &&
9
11
  UIHelper.IsEmptyStyle(data.Style) &&
@@ -13,25 +15,72 @@ export const isFormatColumnStyleValid = (data, api) => {
13
15
  }
14
16
  return true;
15
17
  };
16
- const toStyle = (data) => {
17
- return {
18
- ...convertAdaptableStyleToCSS(data.Style ?? {}),
19
- borderWidth: data.Style?.BorderColor ? 2 : 0,
20
- borderStyle: 'solid',
21
- // ToDO abcdefg
22
- textAlign: data.Style?.Alignment ? data.Style.Alignment.toLowerCase() : undefined,
23
- };
18
+ const getFormatColumnStyleSummaryItems = (formatColumn) => {
19
+ const style = formatColumn.Style;
20
+ if (!style) {
21
+ return [];
22
+ }
23
+ if (StringExtensions.IsNotNullOrEmpty(style.ClassName)) {
24
+ return [{ label: 'Class Name', value: style.ClassName }];
25
+ }
26
+ const items = [];
27
+ if (style.BackColor) {
28
+ items.push({ label: 'Back Colour', value: style.BackColor });
29
+ }
30
+ if (style.ForeColor) {
31
+ items.push({ label: 'Fore Colour', value: style.ForeColor });
32
+ }
33
+ if (style.BorderColor) {
34
+ items.push({ label: 'Border Colour', value: style.BorderColor });
35
+ }
36
+ if (style.BorderRadius != null) {
37
+ items.push({ label: 'Border Radius', value: String(style.BorderRadius) });
38
+ }
39
+ if (style.FontWeight === 'Bold') {
40
+ items.push({ label: 'Font Weight', value: 'Bold' });
41
+ }
42
+ if (style.FontStyle === 'Italic') {
43
+ items.push({ label: 'Font Style', value: 'Italic' });
44
+ }
45
+ if (style.TextDecoration && style.TextDecoration !== 'None') {
46
+ items.push({ label: 'Text Decoration', value: style.TextDecoration });
47
+ }
48
+ if (style.FontSize) {
49
+ items.push({ label: 'Font Size', value: style.FontSize });
50
+ }
51
+ if (style.Alignment && style.Alignment !== 'Default') {
52
+ items.push({ label: 'Alignment', value: style.Alignment });
53
+ }
54
+ return items;
55
+ };
56
+ export const hasFormatColumnStyle = (formatColumn) => {
57
+ if (formatColumn.Style == null || UIHelper.IsEmptyStyle(formatColumn.Style)) {
58
+ return false;
59
+ }
60
+ return getFormatColumnStyleSummaryItems(formatColumn).length > 0;
61
+ };
62
+ export const getFormatColumnStyleViewValues = (formatColumn) => {
63
+ return getFormatColumnStyleSummaryItems(formatColumn).map(({ label, value }) => `${label}: ${value}`);
24
64
  };
25
65
  export const renderFormatColumnStyleWizardSummary = (data) => {
26
66
  const { api } = useOnePageAdaptableWizardContext();
27
67
  return renderFormatColumnStyleSummary(data, api);
28
68
  };
29
- export const renderFormatColumnStyleSummary = (data, api) => {
30
- return (_jsx(Box, { className: "ab-FormatPreview twa:p-2", style: toStyle(data), children: "Preview result" }));
69
+ export const renderFormatColumnStyleSummary = (data, _api) => {
70
+ const hasStyle = data.Style != null && UIHelper.IsNotEmptyStyle(data.Style);
71
+ if (!hasStyle) {
72
+ return _jsx(Tag, { children: "No Style" });
73
+ }
74
+ const items = getFormatColumnStyleSummaryItems(data);
75
+ if (!items.length) {
76
+ return _jsx(Tag, { children: "No Style" });
77
+ }
78
+ return (_jsx(Box, { className: "twa:grid twa:grid-cols-2 twa:gap-2", children: items.map(({ label, value }) => (_jsxs(Box, { children: [label, " ", _jsx(Tag, { children: value })] }, label))) }));
31
79
  };
32
80
  export function FormatColumnStyleWizardSection(props) {
33
81
  const { data, api } = useOnePageAdaptableWizardContext();
34
- return (_jsx(StyleComponent, { headless: true, api: api, Style: data.Style ?? {}, UpdateStyle: (Style) => {
82
+ const previewText = getFormatColumnStylePreviewText(data, api);
83
+ return (_jsx(StyleComponent, { headless: true, api: api, previewText: previewText, Style: data.Style ?? {}, UpdateStyle: (Style) => {
35
84
  props.onChange({ ...data, Style });
36
85
  } }));
37
86
  }
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
3
  import { useState } from 'react';
4
4
  import { OnePageAdaptableWizard, OnePageWizardSummary } from '../../Wizard/OnePageAdaptableWizard';
@@ -15,11 +15,12 @@ import { useDispatch } from 'react-redux';
15
15
  import * as FormatColumnRedux from '../../../Redux/ActionsReducers/FormatColumnRedux';
16
16
  import { ObjectTagsWizardSection, renderObjectTagsSummary, } from '../../Wizard/ObjectTagsWizardSection';
17
17
  import { isAdaptableRuleValid } from '../../Components/EntityRulesEditor/Utilities';
18
- import { FormatColumnRuleWizardSection } from './FormatColumnRuleWizardSection';
18
+ import { FormatColumnRuleWizardSection, renderFormatColumnConditionWizardSummary } from './FormatColumnRuleWizardSection';
19
19
  import { DEFAULT_PREDICATE_ID_FOR_FORMAT_COLUMN } from './constants';
20
20
  import { isObjectEmpty } from '../../../Utilities/Extensions/ObjectExtensions';
21
21
  import { isAdaptableNumericFormatPreset, } from '../../../AdaptableState/Common/AdaptableFormatPresets';
22
22
  import { Box, Flex } from '../../../components/Flex';
23
+ import { FormatColumnPreviewSummaryCard } from './FormatColumnPreview';
23
24
  const adjustDisplayFormat = (fc, api) => {
24
25
  const formatColumn = { ...fc };
25
26
  let formatDataType = getFormatDisplayTypeForScope(formatColumn.Scope, api);
@@ -153,6 +154,7 @@ export function FormatColumnWizard(props) {
153
154
  },
154
155
  title: 'Condition',
155
156
  details: 'Build a Rule when the Format Column should be applied',
157
+ renderSummary: renderFormatColumnConditionWizardSummary,
156
158
  render: () => {
157
159
  return (_jsx(FormatColumnRuleWizardSection, { onChange: setFormatColumn, defaultPredicateId: DEFAULT_PREDICATE_ID_FOR_FORMAT_COLUMN }));
158
160
  },
@@ -185,7 +187,7 @@ export function FormatColumnWizard(props) {
185
187
  {
186
188
  details: 'Review the Format Column',
187
189
  render: () => {
188
- return (_jsx(Box, { className: "twa:p-2", children: _jsx(OnePageWizardSummary, {}) }));
190
+ return (_jsxs(Box, { className: "twa:p-2 twa:flex twa:flex-col twa:gap-3", children: [_jsx(OnePageWizardSummary, {}), _jsx(FormatColumnPreviewSummaryCard, {})] }));
189
191
  },
190
192
  title: 'Summary',
191
193
  },
@@ -0,0 +1,2 @@
1
+ import { FreeTextColumnSettings } from '../../../AdaptableState/FreeTextColumnState';
2
+ export declare const getFreeTextColumnSettingsTags: (settings: FreeTextColumnSettings) => string[];
@@ -0,0 +1,15 @@
1
+ export const getFreeTextColumnSettingsTags = (settings) => {
2
+ const { DataType, Width, Filterable, Resizable, Groupable, Sortable, Pivotable, Aggregatable } = settings ?? {};
3
+ const colTypes = settings?.ColumnTypes ? settings.ColumnTypes.join(', ') : '';
4
+ return [
5
+ DataType ? `DataType: ${DataType}` : null,
6
+ Width ? `Width: ${Width}px` : null,
7
+ Pivotable ? 'Pivotable' : null,
8
+ Filterable ? 'Filterable' : null,
9
+ Resizable ? 'Resizable' : null,
10
+ Groupable ? 'Groupable' : null,
11
+ Sortable ? 'Sortable' : null,
12
+ Aggregatable ? 'Aggregatable' : null,
13
+ colTypes ? `Column Types: ${colTypes}` : null,
14
+ ].filter(Boolean);
15
+ };
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ import { FreeTextColumn } from '../../../AdaptableState/FreeTextColumnState';
3
+ import { AdaptableApi } from '../../../Api/AdaptableApi';
4
+ export type FreeTextColumnDefinitionWizardSectionProps = {
5
+ onChange: (data: FreeTextColumn) => void;
6
+ isEdit: boolean;
7
+ };
8
+ export declare const renderFreeTextColumnDefinitionSummary: (data: FreeTextColumn) => React.JSX.Element;
9
+ export declare const isValidFreeTextColumnDefinition: (data: FreeTextColumn, api: AdaptableApi) => true | string;
10
+ export declare const FreeTextColumnDefinitionWizardSection: (props: FreeTextColumnDefinitionWizardSectionProps) => React.JSX.Element;
@@ -0,0 +1,53 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ import Input from '../../../components/Input';
4
+ import { Tag } from '../../../components/Tag';
5
+ import { useOnePageAdaptableWizardContext } from '../../Wizard/OnePageAdaptableWizard';
6
+ import { Box, Flex } from '../../../components/Flex';
7
+ import { Card } from '../../../components/Card';
8
+ export const renderFreeTextColumnDefinitionSummary = (data) => {
9
+ return (_jsxs(Box, { className: "twa:text-2 twa:grid twa:items-center twa:grid-cols-[auto_1fr] twa:gap-2", children: [_jsx(Box, { children: "Column Identifier:" }), _jsx(Box, { children: _jsx(Tag, { children: data.ColumnId }) }), data.FriendlyName ? (_jsxs(_Fragment, { children: [_jsx(Box, { children: "Column Name:" }), _jsx(Box, { children: _jsx(Tag, { children: data.FriendlyName ?? data.ColumnId }) })] })) : null] }));
10
+ };
11
+ export const isValidFreeTextColumnDefinition = (data, api) => {
12
+ const columns = api.columnApi.getUIAvailableColumns();
13
+ if (!data.ColumnId) {
14
+ return 'A Column Name is required';
15
+ }
16
+ const columnsWithSameIdCount = columns.filter((c) => c.columnId === data.ColumnId).length;
17
+ const hasAlreadyExistingId = data.Uuid ? columnsWithSameIdCount > 1 : columnsWithSameIdCount > 0;
18
+ return hasAlreadyExistingId ? 'A column with this Name already exists' : true;
19
+ };
20
+ export const FreeTextColumnDefinitionWizardSection = (props) => {
21
+ const { data } = useOnePageAdaptableWizardContext();
22
+ const [ColumnNameFocused, setColumnNameFocused] = useState(false);
23
+ const inEdit = props.isEdit;
24
+ const handleColumnIdChange = (event) => {
25
+ let e = event.target;
26
+ props.onChange({
27
+ ...data,
28
+ ColumnId: e.value,
29
+ });
30
+ };
31
+ const handleColumnNameChange = (event) => {
32
+ let e = event.target;
33
+ props.onChange({
34
+ ...data,
35
+ FriendlyName: e.value,
36
+ });
37
+ };
38
+ const handleSpecialColumnSettingsChange = (settings) => {
39
+ props.onChange({
40
+ ...data,
41
+ FreeTextColumnSettings: {
42
+ ...data.FreeTextColumnSettings,
43
+ ...settings,
44
+ },
45
+ });
46
+ };
47
+ const { HeaderToolTip } = data.FreeTextColumnSettings ?? {};
48
+ return (_jsx(Box, { "data-name": "free-text-column-definition", children: _jsxs(Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-3", children: [_jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Column Name" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Unique identifier for the Free Text Column" })] }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(Input, { "data-name": "column-id", value: data.ColumnId || '', className: "twa:max-w-[500px] twa:w-full", autoFocus: !inEdit, disabled: inEdit, type: "text", placeholder: "Enter a Column Name", onChange: handleColumnIdChange }) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Column Header" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Optional display name shown in the grid header" })] }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(Input, { "data-name": "column-name", autoFocus: inEdit, onFocus: () => setColumnNameFocused(true), onBlur: () => setColumnNameFocused(false), value: ColumnNameFocused
49
+ ? data.FriendlyName || ''
50
+ : data.FriendlyName || data.ColumnId || '', className: "twa:max-w-[500px] twa:w-full", type: "text", placeholder: "Enter a Column Header (optional)", onChange: handleColumnNameChange }) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Column Header Tooltip" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Optional text shown when hovering over the column header" })] }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(Input, { "data-name": "header-tooltip", type: "text", className: "twa:max-w-[500px] twa:w-full", value: HeaderToolTip, onChange: (e) => handleSpecialColumnSettingsChange({
51
+ HeaderToolTip: e.target.value,
52
+ }) }) })] })] }) }));
53
+ };
@@ -1,8 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { FreeTextColumn } from '../../../AdaptableState/FreeTextColumnState';
3
- import { AdaptableApi } from '../../../Api/AdaptableApi';
4
- export declare const renderFreeTextColumnSummary: (data: FreeTextColumn) => React.JSX.Element;
5
- export declare const isValidFreeTextColumn: (data: FreeTextColumn, api: AdaptableApi) => true | "A Column Name is required" | "A column with this Name already exists" | "A data type is required for the column";
3
+ export declare const renderFreeTextColumnSettingsSummary: (data: FreeTextColumn) => React.JSX.Element;
4
+ export declare const isValidFreeTextColumnSettings: (data: FreeTextColumn) => true | string;
6
5
  export type FreeTextColumnSettingsWizardSectionProps = {
7
6
  onChange: (data: FreeTextColumn) => void;
8
7
  isEdit: boolean;
@@ -1,9 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { useState } from 'react';
3
2
  import Input from '../../../components/Input';
4
- import ErrorBox from '../../../components/ErrorBox';
5
- import Radio from '../../../components/Radio';
6
- import FormLayout, { FormRow } from '../../../components/FormLayout';
3
+ import Radio, { RadioGroup } from '../../../components/Radio';
7
4
  import { useOnePageAdaptableWizardContext } from '../../Wizard/OnePageAdaptableWizard';
8
5
  import AdaptableInput from '../../Components/AdaptableInput';
9
6
  import { CheckBox } from '../../../components/CheckBox';
@@ -11,28 +8,24 @@ import { DateFormatter } from '../../../Utilities/Helpers/FormatHelper';
11
8
  import { parseToISO } from '../../../Utilities/Helpers/DateHelper';
12
9
  import { Tag } from '../../../components/Tag';
13
10
  import { SpecialColumnSettingsWizardStep } from '../../SpecialColumnSettingsWizardStep';
14
- import { Box } from '../../../components/Flex';
11
+ import { Box, Flex } from '../../../components/Flex';
15
12
  import { SingleSelect } from '../../../components/NewSelect';
16
- const options = [
13
+ import { Card } from '../../../components/Card';
14
+ import { TagList } from '../../../components/Tag/Tag';
15
+ import { getFreeTextColumnSettingsTags } from '../Utilities/getFreeTextColumnSettingsTags';
16
+ import { SummaryText } from '../../Wizard/OnePageAdaptableWizard';
17
+ const dataTypeOptions = [
17
18
  { value: 'number', label: 'Number' },
18
19
  { value: 'text', label: 'Text' },
19
20
  { value: 'date', label: 'Date' },
20
21
  { value: 'boolean', label: 'Boolean' },
21
22
  ];
22
- export const renderFreeTextColumnSummary = (data) => {
23
- return (_jsxs(Box, { className: "twa:text-2", children: [_jsxs(Box, { children: ["Column Identifier: ", _jsx(Tag, { children: data.ColumnId })] }), data.FriendlyName ? (_jsxs(Box, { className: "twa:mt-3", children: ["Column Name: ", _jsx(Tag, { children: data.FriendlyName ?? data.ColumnId })] })) : null, _jsxs(Box, { className: "twa:mt-3", children: ["Data Type: ", _jsx(Tag, { children: data.FreeTextColumnSettings.DataType })] }), data.DefaultValue !== undefined ? (_jsxs(Box, { className: "twa:mt-3", children: ["Default Value: ", _jsx(Tag, { children: data.DefaultValue })] })) : null, data.TextEditor !== undefined ? (_jsxs(Box, { className: "twa:mt-3", children: ["Editor Type: ", _jsx(Tag, { children: data.TextEditor })] })) : null] }));
23
+ export const renderFreeTextColumnSettingsSummary = (data) => {
24
+ const propertyTags = getFreeTextColumnSettingsTags(data.FreeTextColumnSettings);
25
+ return (_jsxs(_Fragment, { children: [_jsxs(SummaryText, { children: ["Data Type: ", _jsx(Tag, { children: data.FreeTextColumnSettings.DataType || 'Not specified' })] }), data.DefaultValue !== undefined ? (_jsxs(SummaryText, { children: ["Default Value: ", _jsx(Tag, { children: String(data.DefaultValue) })] })) : null, data.TextEditor !== undefined ? (_jsxs(SummaryText, { children: ["Editor Type: ", _jsx(Tag, { children: data.TextEditor })] })) : null, propertyTags.length ? (_jsx(Box, { className: "twa:mt-2", children: _jsx(TagList, { tags: propertyTags }) })) : null] }));
24
26
  };
25
- export const isValidFreeTextColumn = (data, api) => {
26
- const columns = api.columnApi.getUIAvailableColumns();
27
- if (!data.ColumnId) {
28
- return 'A Column Name is required';
29
- }
30
- const columnsWithSameIdCount = columns.filter((c) => c.columnId === data.ColumnId).length;
31
- const hasAlreadyExistingId = data.Uuid ? columnsWithSameIdCount > 1 : columnsWithSameIdCount > 0;
32
- if (hasAlreadyExistingId) {
33
- return 'A column with this Name already exists';
34
- }
35
- if (!data.FreeTextColumnSettings.DataType) {
27
+ export const isValidFreeTextColumnSettings = (data) => {
28
+ if (!data.FreeTextColumnSettings?.DataType) {
36
29
  return 'A data type is required for the column';
37
30
  }
38
31
  return true;
@@ -40,26 +33,6 @@ export const isValidFreeTextColumn = (data, api) => {
40
33
  export const FreeTextColumnSettingsWizardSection = (props) => {
41
34
  const { data, api } = useOnePageAdaptableWizardContext();
42
35
  const Pattern = api.optionsApi.getUserInterfaceOptions().dateInputOptions.dateFormat;
43
- const [ColumnNameFocused, setColumnNameFocused] = useState(false);
44
- const inEdit = props.isEdit;
45
- const validCheck = isValidFreeTextColumn(data, api);
46
- const ErrorMessage = validCheck === true ? null : validCheck;
47
- const handleColumnIdChange = (event) => {
48
- let e = event.target;
49
- const ColumnId = e.value;
50
- props.onChange({
51
- ...data,
52
- ColumnId,
53
- });
54
- };
55
- const handleColumnNameChange = (event) => {
56
- let e = event.target;
57
- const ColumnName = e.value;
58
- props.onChange({
59
- ...data,
60
- FriendlyName: ColumnName,
61
- });
62
- };
63
36
  const handleDataTypeChange = (DataType) => {
64
37
  const newData = {
65
38
  ...data,
@@ -74,14 +47,6 @@ export const FreeTextColumnSettingsWizardSection = (props) => {
74
47
  }
75
48
  props.onChange(newData);
76
49
  };
77
- const onDynamicSelectChanged = (event) => {
78
- let e = event.target;
79
- const TextEditor = e.value;
80
- props.onChange({
81
- ...data,
82
- TextEditor,
83
- });
84
- };
85
50
  const handleDefaultValueChange = (event) => {
86
51
  let e = event.target;
87
52
  let DefaultValue = e.value;
@@ -95,9 +60,7 @@ export const FreeTextColumnSettingsWizardSection = (props) => {
95
60
  DefaultValue,
96
61
  });
97
62
  };
98
- const handleSpecialColumnSettingsChange = (
99
- // settings: SpecialColumnSettings
100
- settings) => {
63
+ const handleSpecialColumnSettingsChange = (settings) => {
101
64
  props.onChange({
102
65
  ...data,
103
66
  FreeTextColumnSettings: {
@@ -106,22 +69,24 @@ export const FreeTextColumnSettingsWizardSection = (props) => {
106
69
  },
107
70
  });
108
71
  };
109
- return (_jsxs(_Fragment, { children: [_jsxs(FormLayout, { children: [_jsx(FormRow, { label: "Column Name", children: _jsx(Input, { "data-name": "column-id", autoFocus: !inEdit, value: data.ColumnId || '', style: { width: '100%', maxWidth: 500 }, disabled: inEdit, type: "text", placeholder: "Enter a Column Name", onChange: (e) => handleColumnIdChange(e) }) }), _jsx(FormRow, { label: "Column Header", children: _jsx(Input, { "data-name": "column-name", autoFocus: inEdit, onFocus: () => {
110
- setColumnNameFocused(true);
111
- }, onBlur: () => {
112
- setColumnNameFocused(false);
113
- }, value: ColumnNameFocused ? data.FriendlyName || '' : data.FriendlyName || data.ColumnId || '', style: { width: '100%', maxWidth: 500 }, type: "text", placeholder: "Enter a Column Header (optional)", onChange: (e) => handleColumnNameChange(e) }) }), _jsx(FormRow, { label: "Data Type", children: _jsx(Box, { className: "twa:max-w-[500px]", children: _jsx(SingleSelect, { "data-name": "column-type-dropdown", className: "twa:w-full", items: options, placeholder: "Select Data Type", value: data.FreeTextColumnSettings.DataType, onValueChange: (value) => handleDataTypeChange(value) }) }) }), _jsx(FormRow, { label: "Default Value", children: data.FreeTextColumnSettings.DataType === 'boolean' ? (_jsx(CheckBox, { "data-name": "column-default-value-checkbox", checked: !!data.DefaultValue, onChange: (DefaultValue) => {
114
- props.onChange({
115
- ...data,
116
- DefaultValue,
117
- });
118
- } })) : (_jsx(AdaptableInput, { "data-name": "column-default-value", value: data.FreeTextColumnSettings.DataType === 'date' && data.DefaultValue
119
- ? parseToISO(data.DefaultValue, Pattern) || ''
120
- : data.DefaultValue || '', className: "twa:w-full twa:max-w-[500px]", type: data.FreeTextColumnSettings.DataType === 'number'
121
- ? 'number'
122
- : data.FreeTextColumnSettings.DataType === 'date'
123
- ? 'date'
124
- : 'text', placeholder: "Enter a default value (optional)", onChange: (e) => handleDefaultValueChange(e) })) }), _jsx(FormRow, { label: "Header Tooltip", children: _jsx(Input, { "data-name": "header-tooltip", type: "text", style: { width: '100%', maxWidth: 500 }, value: data.FreeTextColumnSettings?.HeaderToolTip || '', onChange: (e) => handleSpecialColumnSettingsChange({
125
- HeaderToolTip: e.target.value,
126
- }) }) }), ' ', data.FreeTextColumnSettings.DataType == 'text' && (_jsxs(FormRow, { label: "Cell Editor", children: [_jsx(Radio, { "data-name": "inline-editor", value: "Inline", checked: data.TextEditor == 'Inline', onChange: (_, e) => onDynamicSelectChanged(e), className: "twa:mr-2", children: "Inline Editor" }), _jsx(Radio, { "data-name": "large-editor", value: "Large", checked: data.TextEditor == 'Large', onChange: (_, e) => onDynamicSelectChanged(e), children: "Large Editor" })] }))] }), ErrorMessage ? _jsx(ErrorBox, { className: "twa:my-2", children: ErrorMessage }) : null, _jsx(Box, { className: "twa:mt-2", children: _jsx(SpecialColumnSettingsWizardStep, { isEditable: true, settings: data.FreeTextColumnSettings, onChange: handleSpecialColumnSettingsChange }) })] }));
72
+ const { Width } = data.FreeTextColumnSettings ?? {};
73
+ return (_jsx(Box, { "data-name": "free-text-column-settings", children: _jsxs(Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-3", children: [_jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Data Type" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Choose the data type for values entered in this column" })] }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(SingleSelect, { "data-name": "column-type-dropdown", className: "twa:max-w-[300px]", items: dataTypeOptions, placeholder: "Select Data Type", value: data.FreeTextColumnSettings.DataType, onValueChange: (value) => handleDataTypeChange(value) }) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Default Value" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Optional initial value for each cell in the column" })] }), _jsx(Card.Body, { children: data.FreeTextColumnSettings.DataType === 'boolean' ? (_jsx(CheckBox, { "data-name": "column-default-value-checkbox", checked: !!data.DefaultValue, onChange: (DefaultValue) => {
74
+ props.onChange({
75
+ ...data,
76
+ DefaultValue,
77
+ });
78
+ } })) : (_jsx(AdaptableInput, { "data-name": "column-default-value", value: data.FreeTextColumnSettings.DataType === 'date' && data.DefaultValue
79
+ ? parseToISO(data.DefaultValue, Pattern) || ''
80
+ : data.DefaultValue || '', className: "twa:max-w-[500px] twa:w-full", type: data.FreeTextColumnSettings.DataType === 'number'
81
+ ? 'number'
82
+ : data.FreeTextColumnSettings.DataType === 'date'
83
+ ? 'date'
84
+ : 'text', placeholder: "Enter a default value (optional)", onChange: handleDefaultValueChange })) })] }), data.FreeTextColumnSettings.DataType === 'text' ? (_jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Cell Editor" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Choose how text values are edited in the grid" })] }), _jsx(Card.Body, { children: _jsxs(RadioGroup, { value: data.TextEditor ?? 'Inline', name: "textEditor", orientation: "horizontal", onRadioChange: (TextEditor) => {
85
+ props.onChange({
86
+ ...data,
87
+ TextEditor,
88
+ });
89
+ }, children: [_jsx(Radio, { className: "twa:ml-1", "data-name": "inline-editor", value: "Inline", children: "Inline Editor" }), _jsx(Radio, { className: "twa:ml-4", "data-name": "large-editor", value: "Large", children: "Large Editor" })] }) })] })) : null, _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Width" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Optional column width in pixels" })] }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(Input, { "data-name": "column-width", type: "number", className: "twa:max-w-[300px]", value: Width || '', onChange: (e) => handleSpecialColumnSettingsChange({
90
+ Width: Number(e.target.value),
91
+ }) }) })] }), _jsx(SpecialColumnSettingsWizardStep, { isEditable: true, settings: data.FreeTextColumnSettings, onChange: handleSpecialColumnSettingsChange })] }) }));
127
92
  };
@@ -2,7 +2,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useState } from 'react';
3
3
  import { OnePageAdaptableWizard, OnePageWizardSummary } from '../../Wizard/OnePageAdaptableWizard';
4
4
  import { cloneObject } from '../../../Utilities/Helpers/Helper';
5
- import { FreeTextColumnSettingsWizardSection, isValidFreeTextColumn, renderFreeTextColumnSummary, } from './FreeTextColumnSettingsWizardSection';
5
+ import { FreeTextColumnSettingsWizardSection, isValidFreeTextColumnSettings, renderFreeTextColumnSettingsSummary, } from './FreeTextColumnSettingsWizardSection';
6
+ import { FreeTextColumnDefinitionWizardSection, isValidFreeTextColumnDefinition, renderFreeTextColumnDefinitionSummary, } from './FreeTextColumnDefinitionWizardSection';
6
7
  import ObjectFactory from '../../../Utilities/ObjectFactory';
7
8
  import * as FreeTextColumnRedux from '../../../Redux/ActionsReducers/FreeTextColumnRedux';
8
9
  import { useDispatch, useSelector } from 'react-redux';
@@ -22,7 +23,7 @@ export const FreeTextColumnWizard = (props) => {
22
23
  return ObjectFactory.CreateEmptyFreeTextColumn(adaptable.api.gridApi.internalApi.deriveSpecialColumnSettingsFromAgGridDefaultColDef());
23
24
  });
24
25
  const dispatch = useDispatch();
25
- const isEdit = props.data || props.popupParams?.action === 'Edit';
26
+ const isEdit = Boolean(props.data) || props.popupParams?.action === 'Edit';
26
27
  const handleFinish = () => {
27
28
  if (isEdit) {
28
29
  dispatch(FreeTextColumnRedux.FreeTextColumnEdit(freeTextColumn));
@@ -33,13 +34,19 @@ export const FreeTextColumnWizard = (props) => {
33
34
  props.onFinishWizard(freeTextColumn);
34
35
  };
35
36
  return (_jsx(OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, data: freeTextColumn, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
37
+ {
38
+ title: 'Details',
39
+ details: 'Provide Free Text Column Details',
40
+ isValid: isValidFreeTextColumnDefinition,
41
+ renderSummary: renderFreeTextColumnDefinitionSummary,
42
+ render: () => (_jsx(Box, { className: "twa:p-2", children: _jsx(FreeTextColumnDefinitionWizardSection, { isEdit: isEdit, onChange: setFreeTextColumn }) })),
43
+ },
36
44
  {
37
45
  title: 'Settings',
38
- details: 'Configure the Free Text Column',
39
- isValid: isValidFreeTextColumn,
40
- render: () => {
41
- return (_jsx(Box, { className: "twa:p-2", children: _jsx(FreeTextColumnSettingsWizardSection, { isEdit: Boolean(props.data), onChange: setFreeTextColumn }) }));
42
- },
46
+ details: 'Specify Free Text Column Properties',
47
+ isValid: isValidFreeTextColumnSettings,
48
+ renderSummary: renderFreeTextColumnSettingsSummary,
49
+ render: () => (_jsx(Box, { className: "twa:p-2", children: _jsx(FreeTextColumnSettingsWizardSection, { isEdit: isEdit, onChange: setFreeTextColumn }) })),
43
50
  },
44
51
  {
45
52
  details: 'Select Free Text Column Tags',
@@ -51,10 +58,7 @@ export const FreeTextColumnWizard = (props) => {
51
58
  '-',
52
59
  {
53
60
  details: 'Review the Free Text Column',
54
- renderSummary: renderFreeTextColumnSummary,
55
- render: () => {
56
- return (_jsx(Box, { className: "twa:p-2", children: _jsx(OnePageWizardSummary, {}) }));
57
- },
61
+ render: () => (_jsx(Box, { className: "twa:p-2", children: _jsx(OnePageWizardSummary, {}) })),
58
62
  title: 'Summary',
59
63
  },
60
64
  ] }));
@@ -183,8 +183,8 @@ export const TransposedPopup = (props) => {
183
183
  modules,
184
184
  }).then((adaptableApi) => {
185
185
  transposedAdaptableApiRef.current = adaptableApi;
186
- adaptableApi.eventApi.on('ThemeChanged', (event) => {
187
- transposedAdaptableApiRef.current?.themeApi.loadTheme(typeof event.theme === 'object' ? event.theme.Name : event.theme);
186
+ adaptableApi.eventApi.on('ThemeSelected', (event) => {
187
+ transposedAdaptableApiRef.current?.themeApi.loadTheme(event.theme);
188
188
  });
189
189
  });
190
190
  }, [elevatedColumnId, adaptable]);
@@ -175,8 +175,7 @@ export const LayoutWizard = (props) => {
175
175
  {
176
176
  title: 'Row Groups',
177
177
  isVisible: () => layoutSupportedFeatures.RowGroupedColumns,
178
- isValid: areSummaryRowsValid,
179
- details: 'Configure Row Grouping',
178
+ details: 'Configure Row Grouping and Display Behaviour',
180
179
  renderSummary: () => _jsx(RowGroupingSectionSummary, {}),
181
180
  render: () => (_jsx(Box, { className: "twa:p-2 twa:h-full", children: _jsx(RowGroupingSection, { onChange: setLayout }) })),
182
181
  },
@@ -190,7 +189,7 @@ export const LayoutWizard = (props) => {
190
189
  {
191
190
  title: 'Aggregations',
192
191
  isVisible: () => layoutSupportedFeatures.TableAggregationColumns,
193
- details: 'Select Column Aggregations',
192
+ details: 'Select Aggregation Columns and Behaviour',
194
193
  renderSummary: () => _jsx(AggregationsSectionSummary, {}),
195
194
  isValid: (data) => isAggregationsSectionValid(data),
196
195
  render: () => (_jsx(Box, { className: "twa:p-2 twa:h-full", children: _jsx(AggregationsSection, { onChange: (layout) => {
@@ -229,6 +228,7 @@ export const LayoutWizard = (props) => {
229
228
  details: 'Configure Row Summaries',
230
229
  renderSummary: () => _jsx(RowSummarySectionSummary, {}),
231
230
  isVisible: () => layoutSupportedFeatures.RowSummaries,
231
+ isValid: areSummaryRowsValid,
232
232
  render: () => (_jsx(Box, { className: "twa:p-2 twa:h-full", children: _jsx(RowSummarySection, { onChange: setLayout }) })),
233
233
  },
234
234
  {
@@ -1,7 +1,6 @@
1
1
  import * as React from 'react';
2
- import { TableLayout } from '../../../../../types';
3
- import { validateTableLayoutAggregations } from '../../../../Aggregation/validateParameterizedAggregations';
4
- export declare const isAggregationsSectionValid: typeof validateTableLayoutAggregations;
2
+ import { Layout, TableLayout } from '../../../../../types';
3
+ export declare const isAggregationsSectionValid: (data: Layout) => true | string;
5
4
  export declare const AggregationsSectionSummary: React.FunctionComponent;
6
5
  interface AggregationsSectionProps {
7
6
  onChange: (data: TableLayout) => void;