@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
@@ -67,7 +67,7 @@ const FlashingCellWizard = (props) => {
67
67
  {
68
68
  details: 'Set Name, Duration and Target Properties',
69
69
  isValid: FlashingCellSettingsWizardSection_1.isSettingsValid,
70
- render: () => ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:p-2", children: (0, jsx_runtime_1.jsx)(FlashingCellSettingsWizardSection_1.FlashingAlertSettingsWizardSection, { onChange: setFlashingCell }) })),
70
+ render: () => (0, jsx_runtime_1.jsx)(FlashingCellSettingsWizardSection_1.FlashingAlertSettingsWizardSection, { onChange: setFlashingCell }),
71
71
  renderSummary: FlashingCellSettingsWizardSection_1.renderFlashingAlertSettingsSummary,
72
72
  title: 'Settings',
73
73
  },
@@ -87,9 +87,9 @@ const FlashingCellWizard = (props) => {
87
87
  },
88
88
  {
89
89
  details: 'Choose Flash Styles for Up, Down and Neutral Changes',
90
- render: () => ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:p-2", children: (0, jsx_runtime_1.jsx)(FlashingCellStyleWizardSection_1.FlashingAlertStyleWizardSection, { onStyleChange: (styleName, style) => {
91
- updateStyles[styleName](style);
92
- } }) })),
90
+ render: () => ((0, jsx_runtime_1.jsx)(FlashingCellStyleWizardSection_1.FlashingAlertStyleWizardSection, { onStyleChange: (styleName, style) => {
91
+ updateStyles[styleName](style);
92
+ } })),
93
93
  renderSummary: FlashingCellStyleWizardSection_1.renderFlashingAlertStyleSummary,
94
94
  title: 'Flash Styles',
95
95
  },
@@ -10,7 +10,14 @@ export interface FormatColumnFormatWizardState {
10
10
  DisplayFormat: AdaptableFormat;
11
11
  NumericFormat?: 'Percent' | 'Thousand' | 'Million' | 'Dollar' | 'Sterling' | undefined;
12
12
  }
13
+ type DisplayFormatSummaryItem = {
14
+ label: string;
15
+ value: string;
16
+ };
17
+ export declare const getFormatColumnDisplayFormatSummaryItems: (data: FormatColumn) => DisplayFormatSummaryItem[];
18
+ export declare const hasFormatColumnDisplayFormat: (data: FormatColumn) => boolean;
13
19
  export declare const getFormatColumnFormatSummaryValue: (data: FormatColumn) => string;
14
20
  export declare const renderFormatColumnFormatSummary: (data: FormatColumn) => React.JSX.Element;
15
21
  export declare const getFormatDisplayTypeForScope: (scope: ColumnScope, api: AdaptableApi) => "number" | "date" | "text" | undefined;
16
22
  export declare const FormatColumnFormatWizardSection: (props: FormatColumnFormatWizardSectionProps) => React.JSX.Element;
23
+ export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FormatColumnFormatWizardSection = exports.getFormatDisplayTypeForScope = exports.renderFormatColumnFormatSummary = exports.getFormatColumnFormatSummaryValue = void 0;
3
+ exports.FormatColumnFormatWizardSection = exports.getFormatDisplayTypeForScope = exports.renderFormatColumnFormatSummary = exports.getFormatColumnFormatSummaryValue = exports.hasFormatColumnDisplayFormat = exports.getFormatColumnDisplayFormatSummaryItems = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const uniq_1 = tslib_1.__importDefault(require("../../../Utilities/utils/uniq"));
@@ -35,24 +35,124 @@ const DateFormatPresets = [
35
35
  'yyyyMMdd',
36
36
  'HH:mm:ss',
37
37
  ];
38
- const getFormatColumnFormatSummaryValue = (data) => {
39
- let content = 'N/A';
38
+ const NUMERIC_PRESET_LABELS = {
39
+ Percentage: 'Percentage',
40
+ Thousand: 'K (Thousand)',
41
+ Million: 'M (Million)',
42
+ Billion: 'B (Billion)',
43
+ BasisPoints: 'bps (Basis Pts)',
44
+ Dollar: 'Dollar',
45
+ Sterling: 'Sterling',
46
+ Euro: 'Euro',
47
+ Yen: 'Yen',
48
+ Bitcoin: 'Bitcoin',
49
+ Integer: 'Integer',
50
+ Decimal: 'Decimal',
51
+ Accounting: 'Accounting',
52
+ FXRate: 'FX Rate',
53
+ Scientific: 'Scientific',
54
+ };
55
+ const appendDisplayFormatItem = (items, label, value) => {
56
+ if (value == null || value === '' || value === false) {
57
+ return;
58
+ }
59
+ items.push({ label, value: String(value) });
60
+ };
61
+ const appendNumberFormatOptions = (items, options) => {
62
+ appendDisplayFormatItem(items, 'Fraction Digits', options.FractionDigits);
63
+ appendDisplayFormatItem(items, 'Fraction Separator', options.FractionSeparator);
64
+ appendDisplayFormatItem(items, 'Integer Digits', options.IntegerDigits);
65
+ appendDisplayFormatItem(items, 'Integer Separator', options.IntegerSeparator);
66
+ appendDisplayFormatItem(items, 'Prefix', options.Prefix);
67
+ appendDisplayFormatItem(items, 'Suffix', options.Suffix);
68
+ appendDisplayFormatItem(items, 'Content', options.Content);
69
+ if (options.Multiplier != null && options.Multiplier !== 1) {
70
+ items.push({ label: 'Multiplier', value: String(options.Multiplier) });
71
+ }
72
+ appendDisplayFormatItem(items, 'Parentheses', options.Parentheses);
73
+ appendDisplayFormatItem(items, 'Truncate', options.Truncate);
74
+ appendDisplayFormatItem(items, 'Absolute Value', options.Abs);
75
+ appendDisplayFormatItem(items, 'Ceiling', options.Ceiling);
76
+ appendDisplayFormatItem(items, 'Floor', options.Floor);
77
+ appendDisplayFormatItem(items, 'Round', options.Round);
78
+ appendDisplayFormatItem(items, 'Empty', options.Empty);
79
+ if (options.Notation === 'scientific') {
80
+ items.push({ label: 'Notation', value: 'Scientific' });
81
+ }
82
+ if (options.CustomDisplayFormats?.length) {
83
+ items.push({
84
+ label: 'Custom Formats',
85
+ value: options.CustomDisplayFormats.join(', '),
86
+ });
87
+ }
88
+ };
89
+ const appendStringFormatOptions = (items, options) => {
90
+ appendDisplayFormatItem(items, 'Case', options.Case);
91
+ appendDisplayFormatItem(items, 'Trim', options.Trim);
92
+ appendDisplayFormatItem(items, 'Prefix', options.Prefix);
93
+ appendDisplayFormatItem(items, 'Suffix', options.Suffix);
94
+ appendDisplayFormatItem(items, 'Content', options.Content);
95
+ appendDisplayFormatItem(items, 'Empty', options.Empty);
96
+ if (options.CustomDisplayFormats?.length) {
97
+ items.push({
98
+ label: 'Custom Formats',
99
+ value: options.CustomDisplayFormats.join(', '),
100
+ });
101
+ }
102
+ };
103
+ const getFormatColumnDisplayFormatSummaryItems = (data) => {
104
+ if (data.DisplayFormat == null) {
105
+ return [];
106
+ }
107
+ if ((0, AdaptableFormatPresets_1.isAdaptableNumericFormatPreset)(data.DisplayFormat)) {
108
+ return [{ label: '', value: `${NUMERIC_PRESET_LABELS[data.DisplayFormat]} Preset` }];
109
+ }
40
110
  const resolved = (0, AdaptableFormatPresets_1.resolveDisplayFormat)(data.DisplayFormat);
41
111
  if (!resolved) {
42
- content = 'N/A';
112
+ return [];
43
113
  }
44
- else {
45
- if (resolved.Formatter === 'NumberFormatter') {
46
- content = FormatHelper_1.default.NumberFormatter(GeneralConstants_1.DEFAULT_DOUBLE_DISPLAY_VALUE, resolved.Options);
114
+ const items = [];
115
+ if (resolved.Formatter === 'NumberFormatter') {
116
+ appendNumberFormatOptions(items, resolved.Options);
117
+ if (!items.length) {
118
+ items.push({ label: '', value: 'Number Format' });
47
119
  }
48
- if (resolved.Formatter === 'DateFormatter') {
49
- content = FormatHelper_1.default.DateFormatter(new Date(), resolved.Options);
120
+ return items;
121
+ }
122
+ if (resolved.Formatter === 'DateFormatter') {
123
+ const options = resolved.Options;
124
+ appendDisplayFormatItem(items, 'Pattern', options.Pattern);
125
+ if (options.CustomDisplayFormats?.length) {
126
+ items.push({
127
+ label: 'Custom Formats',
128
+ value: options.CustomDisplayFormats.join(', '),
129
+ });
130
+ }
131
+ if (!items.length) {
132
+ items.push({ label: '', value: 'Date Format' });
50
133
  }
51
- if (resolved.Formatter === 'StringFormatter') {
52
- content = FormatHelper_1.default.StringFormatter(GeneralConstants_1.DEFAULT_STRING_DISPLAY_VALUE, resolved.Options);
134
+ return items;
135
+ }
136
+ if (resolved.Formatter === 'StringFormatter') {
137
+ appendStringFormatOptions(items, resolved.Options);
138
+ if (!items.length) {
139
+ items.push({ label: '', value: 'String Format' });
53
140
  }
141
+ return items;
54
142
  }
55
- return content;
143
+ return items;
144
+ };
145
+ exports.getFormatColumnDisplayFormatSummaryItems = getFormatColumnDisplayFormatSummaryItems;
146
+ const hasFormatColumnDisplayFormat = (data) => (0, exports.getFormatColumnDisplayFormatSummaryItems)(data).length > 0;
147
+ exports.hasFormatColumnDisplayFormat = hasFormatColumnDisplayFormat;
148
+ const getFormatColumnFormatSummaryValue = (data) => {
149
+ const items = (0, exports.getFormatColumnDisplayFormatSummaryItems)(data);
150
+ if (!items.length) {
151
+ return 'No Display Format';
152
+ }
153
+ return items
154
+ .map(({ label, value }) => (label ? `${label}: ${value}` : value))
155
+ .join(', ');
56
156
  };
57
157
  exports.getFormatColumnFormatSummaryValue = getFormatColumnFormatSummaryValue;
58
158
  const renderCustomFormatter = (data, customFormatter, setFormatOption) => {
@@ -69,7 +169,14 @@ const renderCustomFormatter = (data, customFormatter, setFormatOption) => {
69
169
  } }) }, customFormatter.id));
70
170
  };
71
171
  const renderFormatColumnFormatSummary = (data) => {
72
- return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: (0, exports.getFormatColumnFormatSummaryValue)(data) });
172
+ const items = (0, exports.getFormatColumnDisplayFormatSummaryItems)(data);
173
+ if (!items.length) {
174
+ return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Display Format" });
175
+ }
176
+ if (items.length === 1 && !items[0].label) {
177
+ return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: items[0].value });
178
+ }
179
+ return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex twa:flex-col twa:gap-2", children: items.map(({ label, value }) => ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: [label, " ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: value })] }, label))) }));
73
180
  };
74
181
  exports.renderFormatColumnFormatSummary = renderFormatColumnFormatSummary;
75
182
  const getFormatDisplayTypeForScope = (scope, api) => {
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+ import { FormatColumn } from '../../../AdaptableState/FormatColumnState';
3
+ import { AdaptableApi } from '../../../Api/AdaptableApi';
4
+ /** Today's date as sample text — no Display Format options applied. */
5
+ export declare const getFormatColumnPreviewDateSampleText: () => string;
6
+ export declare const getFormatColumnStylePreviewText: (formatColumn: FormatColumn, api: AdaptableApi) => string;
7
+ export declare const getFormatColumnPreviewSampleValue: (formatColumn: FormatColumn, api: AdaptableApi) => string | number;
8
+ export declare const getFormatColumnPreviewText: (formatColumn: FormatColumn, api: AdaptableApi) => string;
9
+ export declare const FormatColumnPreviewContent: React.FunctionComponent<{
10
+ formatColumn: FormatColumn;
11
+ api: AdaptableApi;
12
+ }>;
13
+ export declare const renderFormatColumnPreviewSummary: (formatColumn: FormatColumn, api: AdaptableApi) => React.JSX.Element;
14
+ export declare const FormatColumnPreview: React.FunctionComponent;
15
+ export declare const FormatColumnPreviewSummaryCard: React.FunctionComponent;
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FormatColumnPreviewSummaryCard = exports.FormatColumnPreview = exports.renderFormatColumnPreviewSummary = exports.FormatColumnPreviewContent = exports.getFormatColumnPreviewText = exports.getFormatColumnPreviewSampleValue = exports.getFormatColumnStylePreviewText = exports.getFormatColumnPreviewDateSampleText = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ const AdaptableFormatPresets_1 = require("../../../AdaptableState/Common/AdaptableFormatPresets");
7
+ const GeneralConstants_1 = require("../../../Utilities/Constants/GeneralConstants");
8
+ const FormatHelper_1 = tslib_1.__importDefault(require("../../../Utilities/Helpers/FormatHelper"));
9
+ const StyleHelper_1 = require("../../../Utilities/Helpers/StyleHelper");
10
+ const Card_1 = require("../../../components/Card");
11
+ const Flex_1 = require("../../../components/Flex");
12
+ const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
13
+ const FormatColumnFormatWizardSection_1 = require("./FormatColumnFormatWizardSection");
14
+ const toFormatColumnPreviewStyle = (formatColumn) => {
15
+ const style = formatColumn.Style ?? {};
16
+ return {
17
+ ...(0, StyleHelper_1.convertAdaptableStyleToCSS)(style),
18
+ borderWidth: style.BorderColor ? 2 : 0,
19
+ borderStyle: 'solid',
20
+ textAlign: style.Alignment ? style.Alignment.toLowerCase() : undefined,
21
+ };
22
+ };
23
+ /** Today's date as sample text — no Display Format options applied. */
24
+ const getFormatColumnPreviewDateSampleText = () => new Date().toLocaleDateString();
25
+ exports.getFormatColumnPreviewDateSampleText = getFormatColumnPreviewDateSampleText;
26
+ const getFormatColumnStylePreviewText = (formatColumn, api) => {
27
+ const formatType = (0, FormatColumnFormatWizardSection_1.getFormatDisplayTypeForScope)(formatColumn.Scope, api);
28
+ if (formatType === 'number') {
29
+ return String(GeneralConstants_1.DEFAULT_DOUBLE_DISPLAY_VALUE);
30
+ }
31
+ if (formatType === 'date') {
32
+ return (0, exports.getFormatColumnPreviewDateSampleText)();
33
+ }
34
+ return GeneralConstants_1.DEFAULT_STRING_DISPLAY_VALUE;
35
+ };
36
+ exports.getFormatColumnStylePreviewText = getFormatColumnStylePreviewText;
37
+ const getFormatColumnPreviewSampleValue = (formatColumn, api) => {
38
+ const formatType = (0, FormatColumnFormatWizardSection_1.getFormatDisplayTypeForScope)(formatColumn.Scope, api);
39
+ if (formatType === 'number') {
40
+ return GeneralConstants_1.DEFAULT_DOUBLE_DISPLAY_VALUE;
41
+ }
42
+ if (formatType === 'date') {
43
+ return (0, exports.getFormatColumnPreviewDateSampleText)();
44
+ }
45
+ return GeneralConstants_1.DEFAULT_STRING_DISPLAY_VALUE;
46
+ };
47
+ exports.getFormatColumnPreviewSampleValue = getFormatColumnPreviewSampleValue;
48
+ const getFormatColumnPreviewText = (formatColumn, api) => {
49
+ const sample = (0, exports.getFormatColumnPreviewSampleValue)(formatColumn, api);
50
+ const resolved = (0, AdaptableFormatPresets_1.resolveDisplayFormat)(formatColumn.DisplayFormat);
51
+ if (!resolved) {
52
+ return String(sample);
53
+ }
54
+ if (resolved.Formatter === 'NumberFormatter' && typeof sample === 'number') {
55
+ return FormatHelper_1.default.NumberFormatter(sample, resolved.Options) ?? String(sample);
56
+ }
57
+ if (resolved.Formatter === 'DateFormatter') {
58
+ return FormatHelper_1.default.DateFormatter(new Date(), resolved.Options) ?? String(sample);
59
+ }
60
+ if (resolved.Formatter === 'StringFormatter' && typeof sample === 'string') {
61
+ return FormatHelper_1.default.StringFormatter(sample, resolved.Options) ?? sample;
62
+ }
63
+ return String(sample);
64
+ };
65
+ exports.getFormatColumnPreviewText = getFormatColumnPreviewText;
66
+ const FormatColumnPreviewContent = ({ formatColumn, api }) => ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "ab-FormatPreview twa:p-2 twa:inline-block", style: toFormatColumnPreviewStyle(formatColumn), children: (0, exports.getFormatColumnPreviewText)(formatColumn, api) }));
67
+ exports.FormatColumnPreviewContent = FormatColumnPreviewContent;
68
+ const renderFormatColumnPreviewSummary = (formatColumn, api) => (0, jsx_runtime_1.jsx)(exports.FormatColumnPreviewContent, { formatColumn: formatColumn, api: api });
69
+ exports.renderFormatColumnPreviewSummary = renderFormatColumnPreviewSummary;
70
+ const FormatColumnPreview = () => {
71
+ const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
72
+ return (0, jsx_runtime_1.jsx)(exports.FormatColumnPreviewContent, { formatColumn: data, api: api });
73
+ };
74
+ exports.FormatColumnPreview = FormatColumnPreview;
75
+ const FormatColumnPreviewSummaryCard = () => {
76
+ return ((0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsx)(Card_1.Card.Title, { children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Preview" }) }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsx)(exports.FormatColumnPreview, {}) })] }));
77
+ };
78
+ exports.FormatColumnPreviewSummaryCard = FormatColumnPreviewSummaryCard;
@@ -1,8 +1,12 @@
1
1
  import * as React from 'react';
2
2
  import { FormatColumn } from '../../../../types';
3
+ import { AdaptableApi } from '../../../Api/AdaptableApi';
3
4
  type FormatColumnRuleWizardSectionProps = {
4
5
  onChange: (data: FormatColumn) => void;
5
6
  defaultPredicateId: string;
6
7
  };
8
+ export declare const hasFormatColumnCondition: (formatColumn: FormatColumn) => boolean;
9
+ export declare const renderFormatColumnConditionSummary: (formatColumn: FormatColumn, api: AdaptableApi) => React.JSX.Element;
10
+ export declare const renderFormatColumnConditionWizardSummary: (formatColumn: FormatColumn) => React.JSX.Element;
7
11
  export declare function FormatColumnRuleWizardSection(props: FormatColumnRuleWizardSectionProps): React.JSX.Element;
8
12
  export {};
@@ -1,11 +1,45 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.renderFormatColumnConditionWizardSummary = exports.renderFormatColumnConditionSummary = exports.hasFormatColumnCondition = void 0;
3
4
  exports.FormatColumnRuleWizardSection = FormatColumnRuleWizardSection;
4
5
  const tslib_1 = require("tslib");
5
6
  const jsx_runtime_1 = require("react/jsx-runtime");
6
7
  const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
7
8
  const EntityRulesEditor_1 = require("../../Components/EntityRulesEditor");
8
9
  const HelpBlock_1 = tslib_1.__importDefault(require("../../../components/HelpBlock"));
10
+ const Flex_1 = require("../../../components/Flex");
11
+ const Tag_1 = require("../../../components/Tag");
12
+ const hasFormatColumnCondition = (formatColumn) => {
13
+ const rule = formatColumn.Rule;
14
+ if (!rule) {
15
+ return false;
16
+ }
17
+ return Boolean(rule.Predicates?.length ||
18
+ rule.BooleanExpression ||
19
+ ('ObservableExpression' in rule && rule.ObservableExpression) ||
20
+ ('AggregatedBooleanExpression' in rule && rule.AggregatedBooleanExpression));
21
+ };
22
+ exports.hasFormatColumnCondition = hasFormatColumnCondition;
23
+ const renderFormatColumnConditionSummary = (formatColumn, api) => {
24
+ if (formatColumn.Target === 'columnHeader') {
25
+ return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Condition" });
26
+ }
27
+ if (!(0, exports.hasFormatColumnCondition)(formatColumn)) {
28
+ return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Condition" });
29
+ }
30
+ const rule = formatColumn.Rule;
31
+ if (rule?.Predicates?.length) {
32
+ return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex twa:flex-col twa:gap-2", children: rule.Predicates.map((predicate, index) => ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: api.predicateApi.predicateToString(predicate) }, index))) }));
33
+ }
34
+ const expressionText = api.internalApi.getAdaptableQueryExpressionText(rule);
35
+ return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: expressionText || 'No Condition' });
36
+ };
37
+ exports.renderFormatColumnConditionSummary = renderFormatColumnConditionSummary;
38
+ const renderFormatColumnConditionWizardSummary = (formatColumn) => {
39
+ const { api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
40
+ return (0, exports.renderFormatColumnConditionSummary)(formatColumn, api);
41
+ };
42
+ exports.renderFormatColumnConditionWizardSummary = renderFormatColumnConditionWizardSummary;
9
43
  function FormatColumnRuleWizardSection(props) {
10
44
  const { data, api, moduleInfo } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
11
45
  if (data.Target && data.Target === 'columnHeader') {
@@ -5,6 +5,8 @@ const tslib_1 = require("tslib");
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const NewScopeComponent_1 = require("../../Components/NewScopeComponent");
7
7
  const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
8
+ const AdaptableContext_1 = require("../../AdaptableContext");
9
+ const AdaptableColumn_1 = require("../../../AdaptableState/Common/AdaptableColumn");
8
10
  const ColumnScope_1 = require("../../../AdaptableState/Common/ColumnScope");
9
11
  const Flex_1 = require("../../../components/Flex");
10
12
  const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
@@ -33,15 +35,18 @@ const isRowKindIncluded = (data, kind) => {
33
35
  const collectIncludedRowKinds = (data) => {
34
36
  return FORMAT_COLUMN_ROW_KINDS.filter((k) => isRowKindIncluded(data, k));
35
37
  };
36
- const renderFormatColumnScopeSummary = (data) => {
38
+ const FormatColumnScopeSummaryContent = ({ data, }) => {
39
+ const adaptable = (0, AdaptableContext_1.useAdaptable)();
40
+ const scopeApi = adaptable.api.columnScopeApi;
41
+ const scope = data.Scope;
42
+ const columnsInScope = scopeApi.getColumnsInScope(scope);
37
43
  const showRows = data.Target === 'cell';
38
44
  const includedKinds = collectIncludedRowKinds(data);
39
45
  const allKinds = includedKinds.length === 4;
40
- return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:pr-2 twa:py-2", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { children: (0, NewScopeComponent_1.renderScopeSummary)(data.Scope, {
41
- scopeWholeRow: 'Matching rows will be formatted',
42
- scopeColumns: 'Cells in selected columns will be formatted',
43
- scopeDataTypes: 'Cells in columns with these Data Types will be formatted',
44
- }) }), showRows && ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mt-3", children: ["Rows:", ' ', allKinds ? ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "All" })) : includedKinds.length === 0 ? ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "None" })) : (includedKinds.map((k) => ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { className: "twa:mr-1", children: k }, k))))] }))] }));
46
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:flex twa:flex-col twa:gap-3", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { children: scopeApi.scopeIsAll(scope) ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Columns ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "All" })] })) : 'ColumnIds' in scope ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Columns", ' ', columnsInScope.length ? (columnsInScope.map((column) => ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { className: "twa:mr-1", children: column.friendlyName }, column.columnId)))) : ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "None" }))] })) : 'DataTypes' in scope ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Data Types", ' ', scope.DataTypes.length ? (scope.DataTypes.map((dataType) => ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { className: "twa:mr-1", children: (0, AdaptableColumn_1.getColumnTypeFriendlyName)(dataType) }, dataType)))) : ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "None" }))] })) : null }), showRows && ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: ["Rows", ' ', allKinds ? ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "All" })) : includedKinds.length === 0 ? ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "None" })) : (includedKinds.map((k) => ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { className: "twa:mr-1", children: k }, k))))] }))] }));
47
+ };
48
+ const renderFormatColumnScopeSummary = (data) => {
49
+ return (0, jsx_runtime_1.jsx)(FormatColumnScopeSummaryContent, { data: data });
45
50
  };
46
51
  exports.renderFormatColumnScopeSummary = renderFormatColumnScopeSummary;
47
52
  // ---------------------------------------------------------------------------
@@ -12,7 +12,7 @@ const Card_1 = require("../../../components/Card");
12
12
  const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
13
13
  const TypeRadio_1 = require("../../Wizard/TypeRadio");
14
14
  const renderFormatColumnSettingsSummary = (data) => {
15
- return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:p-2", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mt-3", children: ["Name ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: data.Name })] }), (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mt-3", children: ["Target", ' ', (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: !data.Target || data.Target === 'cell' ? 'Column Cells' : 'Column Header' })] }), ' ', (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mt-3", children: ["Apply on Column Groups:", ' ', (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: !data.ColumnGroupScope || data.ColumnGroupScope === 'Both'
15
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexWrap: "wrap", alignItems: "center", className: "twa:gap-x-4 twa:gap-y-2", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: ["Name ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: data.Name })] }), (0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: ["Target", ' ', (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: !data.Target || data.Target === 'cell' ? 'Column Cells' : 'Column Header' })] }), (0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: ["Column Groups", ' ', (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: !data.ColumnGroupScope || data.ColumnGroupScope === 'Both'
16
16
  ? 'Always'
17
17
  : data.ColumnGroupScope })] })] }));
18
18
  };
@@ -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,14 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.renderFormatColumnStyleSummary = exports.renderFormatColumnStyleWizardSummary = exports.isFormatColumnStyleValid = void 0;
3
+ exports.renderFormatColumnStyleSummary = exports.renderFormatColumnStyleWizardSummary = exports.getFormatColumnStyleViewValues = exports.hasFormatColumnStyle = exports.isFormatColumnStyleValid = void 0;
4
4
  exports.FormatColumnStyleWizardSection = FormatColumnStyleWizardSection;
5
5
  const tslib_1 = require("tslib");
6
6
  const jsx_runtime_1 = require("react/jsx-runtime");
7
- const StyleHelper_1 = require("../../../Utilities/Helpers/StyleHelper");
8
7
  const StyleComponent_1 = require("../../Components/StyleComponent");
9
8
  const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
10
9
  const UIHelper_1 = tslib_1.__importDefault(require("../../UIHelper"));
10
+ const StringExtensions_1 = tslib_1.__importDefault(require("../../../Utilities/Extensions/StringExtensions"));
11
11
  const Flex_1 = require("../../../components/Flex");
12
+ const Tag_1 = require("../../../components/Tag");
13
+ const FormatColumnPreview_1 = require("./FormatColumnPreview");
12
14
  const isFormatColumnStyleValid = (data, api) => {
13
15
  if (data.Style &&
14
16
  UIHelper_1.default.IsEmptyStyle(data.Style) &&
@@ -19,27 +21,76 @@ const isFormatColumnStyleValid = (data, api) => {
19
21
  return true;
20
22
  };
21
23
  exports.isFormatColumnStyleValid = isFormatColumnStyleValid;
22
- const toStyle = (data) => {
23
- return {
24
- ...(0, StyleHelper_1.convertAdaptableStyleToCSS)(data.Style ?? {}),
25
- borderWidth: data.Style?.BorderColor ? 2 : 0,
26
- borderStyle: 'solid',
27
- // ToDO abcdefg
28
- textAlign: data.Style?.Alignment ? data.Style.Alignment.toLowerCase() : undefined,
29
- };
24
+ const getFormatColumnStyleSummaryItems = (formatColumn) => {
25
+ const style = formatColumn.Style;
26
+ if (!style) {
27
+ return [];
28
+ }
29
+ if (StringExtensions_1.default.IsNotNullOrEmpty(style.ClassName)) {
30
+ return [{ label: 'Class Name', value: style.ClassName }];
31
+ }
32
+ const items = [];
33
+ if (style.BackColor) {
34
+ items.push({ label: 'Back Colour', value: style.BackColor });
35
+ }
36
+ if (style.ForeColor) {
37
+ items.push({ label: 'Fore Colour', value: style.ForeColor });
38
+ }
39
+ if (style.BorderColor) {
40
+ items.push({ label: 'Border Colour', value: style.BorderColor });
41
+ }
42
+ if (style.BorderRadius != null) {
43
+ items.push({ label: 'Border Radius', value: String(style.BorderRadius) });
44
+ }
45
+ if (style.FontWeight === 'Bold') {
46
+ items.push({ label: 'Font Weight', value: 'Bold' });
47
+ }
48
+ if (style.FontStyle === 'Italic') {
49
+ items.push({ label: 'Font Style', value: 'Italic' });
50
+ }
51
+ if (style.TextDecoration && style.TextDecoration !== 'None') {
52
+ items.push({ label: 'Text Decoration', value: style.TextDecoration });
53
+ }
54
+ if (style.FontSize) {
55
+ items.push({ label: 'Font Size', value: style.FontSize });
56
+ }
57
+ if (style.Alignment && style.Alignment !== 'Default') {
58
+ items.push({ label: 'Alignment', value: style.Alignment });
59
+ }
60
+ return items;
61
+ };
62
+ const hasFormatColumnStyle = (formatColumn) => {
63
+ if (formatColumn.Style == null || UIHelper_1.default.IsEmptyStyle(formatColumn.Style)) {
64
+ return false;
65
+ }
66
+ return getFormatColumnStyleSummaryItems(formatColumn).length > 0;
67
+ };
68
+ exports.hasFormatColumnStyle = hasFormatColumnStyle;
69
+ const getFormatColumnStyleViewValues = (formatColumn) => {
70
+ return getFormatColumnStyleSummaryItems(formatColumn).map(({ label, value }) => `${label}: ${value}`);
30
71
  };
72
+ exports.getFormatColumnStyleViewValues = getFormatColumnStyleViewValues;
31
73
  const renderFormatColumnStyleWizardSummary = (data) => {
32
74
  const { api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
33
75
  return (0, exports.renderFormatColumnStyleSummary)(data, api);
34
76
  };
35
77
  exports.renderFormatColumnStyleWizardSummary = renderFormatColumnStyleWizardSummary;
36
- const renderFormatColumnStyleSummary = (data, api) => {
37
- return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "ab-FormatPreview twa:p-2", style: toStyle(data), children: "Preview result" }));
78
+ const renderFormatColumnStyleSummary = (data, _api) => {
79
+ const hasStyle = data.Style != null && UIHelper_1.default.IsNotEmptyStyle(data.Style);
80
+ if (!hasStyle) {
81
+ return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Style" });
82
+ }
83
+ const items = getFormatColumnStyleSummaryItems(data);
84
+ if (!items.length) {
85
+ return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Style" });
86
+ }
87
+ return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:grid twa:grid-cols-2 twa:gap-2", children: items.map(({ label, value }) => ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: [label, " ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: value })] }, label))) }));
38
88
  };
39
89
  exports.renderFormatColumnStyleSummary = renderFormatColumnStyleSummary;
40
90
  function FormatColumnStyleWizardSection(props) {
41
91
  const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
42
- return ((0, jsx_runtime_1.jsx)(StyleComponent_1.StyleComponent, { headless: true, api: api, Style: data.Style ?? {}, UpdateStyle: (Style) => {
92
+ const previewText = (0, FormatColumnPreview_1.getFormatColumnStylePreviewText)(data, api);
93
+ return ((0, jsx_runtime_1.jsx)(StyleComponent_1.StyleComponent, { headless: true, api: api, previewText: previewText, Style: data.Style ?? {}, UpdateStyle: (Style) => {
43
94
  props.onChange({ ...data, Style });
44
95
  } }));
45
96
  }
@@ -24,6 +24,7 @@ const constants_1 = require("./constants");
24
24
  const ObjectExtensions_1 = require("../../../Utilities/Extensions/ObjectExtensions");
25
25
  const AdaptableFormatPresets_1 = require("../../../AdaptableState/Common/AdaptableFormatPresets");
26
26
  const Flex_1 = require("../../../components/Flex");
27
+ const FormatColumnPreview_1 = require("./FormatColumnPreview");
27
28
  const adjustDisplayFormat = (fc, api) => {
28
29
  const formatColumn = { ...fc };
29
30
  let formatDataType = (0, FormatColumnFormatWizardSection_1.getFormatDisplayTypeForScope)(formatColumn.Scope, api);
@@ -157,6 +158,7 @@ function FormatColumnWizard(props) {
157
158
  },
158
159
  title: 'Condition',
159
160
  details: 'Build a Rule when the Format Column should be applied',
161
+ renderSummary: FormatColumnRuleWizardSection_1.renderFormatColumnConditionWizardSummary,
160
162
  render: () => {
161
163
  return ((0, jsx_runtime_1.jsx)(FormatColumnRuleWizardSection_1.FormatColumnRuleWizardSection, { onChange: setFormatColumn, defaultPredicateId: constants_1.DEFAULT_PREDICATE_ID_FOR_FORMAT_COLUMN }));
162
164
  },
@@ -189,7 +191,7 @@ function FormatColumnWizard(props) {
189
191
  {
190
192
  details: 'Review the Format Column',
191
193
  render: () => {
192
- return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:p-2", children: (0, jsx_runtime_1.jsx)(OnePageAdaptableWizard_1.OnePageWizardSummary, {}) }));
194
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:p-2 twa:flex twa:flex-col twa:gap-3", children: [(0, jsx_runtime_1.jsx)(OnePageAdaptableWizard_1.OnePageWizardSummary, {}), (0, jsx_runtime_1.jsx)(FormatColumnPreview_1.FormatColumnPreviewSummaryCard, {})] }));
193
195
  },
194
196
  title: 'Summary',
195
197
  },
@@ -0,0 +1,2 @@
1
+ import { FreeTextColumnSettings } from '../../../AdaptableState/FreeTextColumnState';
2
+ export declare const getFreeTextColumnSettingsTags: (settings: FreeTextColumnSettings) => string[];
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getFreeTextColumnSettingsTags = void 0;
4
+ const getFreeTextColumnSettingsTags = (settings) => {
5
+ const { DataType, Width, Filterable, Resizable, Groupable, Sortable, Pivotable, Aggregatable } = settings ?? {};
6
+ const colTypes = settings?.ColumnTypes ? settings.ColumnTypes.join(', ') : '';
7
+ return [
8
+ DataType ? `DataType: ${DataType}` : null,
9
+ Width ? `Width: ${Width}px` : null,
10
+ Pivotable ? 'Pivotable' : null,
11
+ Filterable ? 'Filterable' : null,
12
+ Resizable ? 'Resizable' : null,
13
+ Groupable ? 'Groupable' : null,
14
+ Sortable ? 'Sortable' : null,
15
+ Aggregatable ? 'Aggregatable' : null,
16
+ colTypes ? `Column Types: ${colTypes}` : null,
17
+ ].filter(Boolean);
18
+ };
19
+ exports.getFreeTextColumnSettingsTags = getFreeTextColumnSettingsTags;
@@ -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;