@adaptabletools/adaptable 13.0.0-canary.2 → 13.0.0-canary.20

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 (263) hide show
  1. package/agGrid.d.ts +23 -1
  2. package/agGrid.js +23 -1
  3. package/base.css +1232 -733
  4. package/base.css.map +1 -0
  5. package/bundle.cjs.js +191 -174
  6. package/index.css +1250 -734
  7. package/index.css.map +1 -0
  8. package/package.json +5 -5
  9. package/publishTimestamp.d.ts +1 -1
  10. package/publishTimestamp.js +1 -1
  11. package/src/AdaptableInterfaces/IAdaptable.d.ts +7 -3
  12. package/src/AdaptableOptions/AdaptableOptions.d.ts +0 -2
  13. package/src/AdaptableOptions/AdaptableQLOptions.d.ts +136 -27
  14. package/src/AdaptableOptions/ExportOptions.d.ts +2 -2
  15. package/src/AdaptableOptions/FinsemblePluginOptions.d.ts +32 -0
  16. package/src/AdaptableOptions/FinsemblePluginOptions.js +2 -0
  17. package/src/AdaptableOptions/LayoutOptions.d.ts +2 -1
  18. package/src/Api/AdaptableApi.d.ts +2 -0
  19. package/src/Api/ColumnApi.d.ts +8 -2
  20. package/src/Api/ConditionalStyleApi.d.ts +20 -42
  21. package/src/Api/ConfigApi.d.ts +1 -2
  22. package/src/Api/ExportApi.d.ts +6 -6
  23. package/src/Api/FinsembleApi.d.ts +10 -0
  24. package/src/Api/FinsembleApi.js +2 -0
  25. package/src/Api/FormatColumnApi.d.ts +76 -59
  26. package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -0
  27. package/src/Api/Implementation/AdaptableApiImpl.js +2 -0
  28. package/src/Api/Implementation/ColumnApiImpl.d.ts +2 -1
  29. package/src/Api/Implementation/ColumnApiImpl.js +18 -14
  30. package/src/Api/Implementation/ExportApiImpl.d.ts +4 -4
  31. package/src/Api/Implementation/ExportApiImpl.js +14 -14
  32. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +36 -17
  33. package/src/Api/Implementation/FormatColumnApiImpl.js +101 -185
  34. package/src/Api/Implementation/PluginsApiImpl.d.ts +2 -0
  35. package/src/Api/Implementation/PluginsApiImpl.js +6 -0
  36. package/src/Api/Implementation/QueryLanguageApiImpl.d.ts +2 -3
  37. package/src/Api/Implementation/QueryLanguageApiImpl.js +9 -18
  38. package/src/Api/Implementation/ScopeApiImpl.d.ts +1 -1
  39. package/src/Api/Implementation/StyledColumnApiImpl.d.ts +25 -0
  40. package/src/Api/Implementation/StyledColumnApiImpl.js +193 -0
  41. package/src/Api/Implementation/SystemStatusApiImpl.js +1 -2
  42. package/src/Api/Implementation/ToolPanelApiImpl.d.ts +3 -1
  43. package/src/Api/Implementation/ToolPanelApiImpl.js +8 -0
  44. package/src/Api/PluginsApi.d.ts +5 -0
  45. package/src/Api/QueryLanguageApi.d.ts +3 -7
  46. package/src/Api/ScopeApi.d.ts +1 -1
  47. package/src/Api/StyledColumnApi.d.ts +106 -0
  48. package/src/Api/StyledColumnApi.js +2 -0
  49. package/src/Api/ToolPanelApi.d.ts +10 -1
  50. package/src/PredefinedConfig/AdaptableState.d.ts +2 -0
  51. package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
  52. package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +1 -1
  53. package/src/PredefinedConfig/Common/AdaptablePredicate.js +37 -37
  54. package/src/PredefinedConfig/Common/Types.d.ts +3 -3
  55. package/src/PredefinedConfig/Common/Types.js +1 -0
  56. package/src/PredefinedConfig/ConditionalStyleState.d.ts +10 -19
  57. package/src/PredefinedConfig/FormatColumnState.d.ts +21 -92
  58. package/src/PredefinedConfig/PredefinedConfig.d.ts +6 -0
  59. package/src/PredefinedConfig/StyledColumnState.d.ts +119 -0
  60. package/src/PredefinedConfig/StyledColumnState.js +2 -0
  61. package/src/Redux/ActionsReducers/ConditionalStyleRedux.d.ts +0 -18
  62. package/src/Redux/ActionsReducers/ConditionalStyleRedux.js +0 -18
  63. package/src/Redux/ActionsReducers/FormatColumnRedux.d.ts +14 -0
  64. package/src/Redux/ActionsReducers/FormatColumnRedux.js +43 -1
  65. package/src/Redux/ActionsReducers/PluginsRedux.d.ts +4 -4
  66. package/src/Redux/ActionsReducers/PluginsRedux.js +5 -5
  67. package/src/Redux/ActionsReducers/StyledColumnRedux.d.ts +49 -0
  68. package/src/Redux/ActionsReducers/StyledColumnRedux.js +92 -0
  69. package/src/Redux/Store/AdaptableStore.js +9 -0
  70. package/src/Strategy/ConditionalStyleModule.d.ts +0 -2
  71. package/src/Strategy/ConditionalStyleModule.js +3 -27
  72. package/src/Strategy/DataChangeHistoryModule.d.ts +1 -0
  73. package/src/Strategy/DataChangeHistoryModule.js +12 -0
  74. package/src/Strategy/FormatColumnModule.d.ts +3 -10
  75. package/src/Strategy/FormatColumnModule.js +42 -183
  76. package/src/Strategy/Interface/IModule.d.ts +1 -0
  77. package/src/Strategy/StyledColumnModule.d.ts +24 -0
  78. package/src/Strategy/StyledColumnModule.js +165 -0
  79. package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.d.ts +1 -1
  80. package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +3 -4
  81. package/src/Strategy/Utilities/FormatColumn/getFormatColumnStyleViewItems.js +1 -16
  82. package/src/Strategy/Utilities/getScopeViewItems.js +1 -1
  83. package/src/Utilities/Constants/ModuleConstants.d.ts +3 -0
  84. package/src/Utilities/Constants/ModuleConstants.js +4 -1
  85. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +6 -12
  86. package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -0
  87. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.d.ts +3 -2
  88. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +3 -1
  89. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +1 -0
  90. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +3 -1
  91. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.d.ts +1 -0
  92. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +3 -1
  93. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.d.ts +2 -4
  94. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -1
  95. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -0
  96. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +3 -1
  97. package/src/Utilities/Extensions/TypeExtensions.d.ts +1 -0
  98. package/src/Utilities/Extensions/TypeExtensions.js +5 -0
  99. package/src/Utilities/ObjectFactory.d.ts +5 -2
  100. package/src/Utilities/ObjectFactory.js +14 -7
  101. package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +14 -4
  102. package/src/Utilities/Services/{LicenseService.d.ts → LicenseService/index.d.ts} +3 -3
  103. package/src/Utilities/Services/LicenseService/index.js +1 -0
  104. package/src/Utilities/Services/LicenseService/shouldLogThankYouMessage.d.ts +1 -0
  105. package/src/Utilities/Services/LicenseService/shouldLogThankYouMessage.js +15 -0
  106. package/src/Utilities/Services/ModuleService.js +2 -0
  107. package/src/Utilities/Services/QueryLanguageService.d.ts +3 -3
  108. package/src/Utilities/Services/QueryLanguageService.js +88 -39
  109. package/src/Utilities/Services/ReportService.js +6 -6
  110. package/src/Utilities/license/LicenseDetails.d.ts +1 -1
  111. package/src/Utilities/license/decode.d.ts +1 -0
  112. package/src/Utilities/license/decode.js +1 -1
  113. package/src/View/AdaptablePopover/index.js +1 -1
  114. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +9 -9
  115. package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +6 -5
  116. package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +3 -3
  117. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +3 -3
  118. package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
  119. package/src/View/CalculatedColumn/CalculatedColumnSummary.d.ts +1 -1
  120. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +1 -1
  121. package/src/View/Components/AdaptableObjectRow/index.js +1 -6
  122. package/src/View/Components/Buttons/ButtonInfo.d.ts +1 -3
  123. package/src/View/Components/Buttons/ButtonInfo.js +3 -5
  124. package/src/View/Components/EntityRulesEditor/index.d.ts +2 -1
  125. package/src/View/Components/EntityRulesEditor/index.js +36 -35
  126. package/src/View/Components/FilterForm/FilterForm.js +11 -16
  127. package/src/View/Components/FilterForm/ListBoxFilterForm.js +2 -1
  128. package/src/View/Components/FilterForm/QuickFilterForm.js +7 -13
  129. package/src/View/Components/NewScopeComponent.js +3 -3
  130. package/src/View/Components/Panels/PanelWithButton.js +1 -5
  131. package/src/View/Components/Panels/PanelWithImage.js +1 -5
  132. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +2 -2
  133. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.d.ts +1 -0
  134. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +3 -16
  135. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +1 -0
  136. package/src/View/Components/Popups/AdaptablePopup/PopupPanel.js +1 -1
  137. package/src/View/Components/Popups/AdaptablePopupTeamSharing.js +5 -5
  138. package/src/View/Components/RangesComponent.d.ts +8 -1
  139. package/src/View/Components/RangesComponent.js +60 -24
  140. package/src/View/Components/ScopeComponent.js +6 -6
  141. package/src/View/Components/Selectors/ColumnSelector.d.ts +1 -0
  142. package/src/View/Components/Selectors/ColumnSelector.js +2 -1
  143. package/src/View/Components/Selectors/ColumnValueSelector.js +2 -2
  144. package/src/View/Components/StyleComponent.js +14 -19
  145. package/src/View/Components/ToolPanel/AdaptableToolPanel.d.ts +3 -9
  146. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +25 -10
  147. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
  148. package/src/View/Components/ToolPanel/ToolPanelPopup.d.ts +1 -1
  149. package/src/View/ConditionalStyle/ConditionalStylePopupHeader.d.ts +2 -0
  150. package/src/View/ConditionalStyle/ConditionalStylePopupHeader.js +18 -0
  151. package/src/View/ConditionalStyle/Wizard/ConditionalStyleRuleWizardSection.js +3 -3
  152. package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.js +1 -1
  153. package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.js +1 -11
  154. package/src/View/DataSet/DataSetSelector.js +1 -1
  155. package/src/View/DataSet/DataSetViewPanel.d.ts +1 -1
  156. package/src/View/Export/ExportViewPanel.d.ts +1 -1
  157. package/src/View/Export/ExportViewPanel.js +4 -4
  158. package/src/View/Export/ReportExportDropdown.js +1 -1
  159. package/src/View/Export/Wizard/ReportNameWizardSection.js +10 -11
  160. package/src/View/Filter/FilterSummary.d.ts +1 -1
  161. package/src/View/Filter/FilterViewPanel.d.ts +1 -1
  162. package/src/View/FlashingCell/FlashingCellStyle.js +3 -3
  163. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +3 -3
  164. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +6 -6
  165. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +4 -4
  166. package/src/View/FormatColumn/FormatColumnSummary.js +1 -1
  167. package/src/View/FormatColumn/MoveFormatColumn.d.ts +7 -0
  168. package/src/View/FormatColumn/MoveFormatColumn.js +27 -0
  169. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +28 -28
  170. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +8 -0
  171. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +28 -0
  172. package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +21 -3
  173. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +2 -28
  174. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +3 -3
  175. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +6 -300
  176. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +15 -9
  177. package/src/View/FormatColumn/Wizard/constants.d.ts +1 -0
  178. package/src/View/FormatColumn/Wizard/constants.js +4 -0
  179. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +7 -7
  180. package/src/View/Layout/LayoutRadioSelector.js +1 -1
  181. package/src/View/Layout/LayoutViewPanel.d.ts +1 -1
  182. package/src/View/Layout/Wizard/Components/ColumnLabels.js +1 -1
  183. package/src/View/Layout/Wizard/sections/AggregationsSection.js +1 -1
  184. package/src/View/Layout/Wizard/sections/ColumnsSection.js +7 -6
  185. package/src/View/Layout/Wizard/sections/SettingsSection.js +2 -2
  186. package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.js +1 -1
  187. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +3 -3
  188. package/src/View/Query/QueryViewPanel.d.ts +1 -1
  189. package/src/View/Query/Wizard/NamedQuerySettingsWizardSection.js +1 -1
  190. package/src/View/QuickSearch/QuickSearchPopup.js +2 -2
  191. package/src/View/QuickSearch/QuickSearchViewPanel.d.ts +1 -1
  192. package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +5 -5
  193. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsGlue42.js +1 -1
  194. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsIPushPull.js +5 -5
  195. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsOpenFin.js +1 -1
  196. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +5 -5
  197. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +2 -2
  198. package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +3 -3
  199. package/src/View/SmartEdit/SmartEditPopup.js +3 -3
  200. package/src/View/SpecialColumnSettingsWizardStep.js +10 -10
  201. package/src/View/StateManagement/StateManagementPopup.js +4 -4
  202. package/src/View/StyledColumn/Wizard/StyledColumnWizard.d.ts +7 -0
  203. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +77 -0
  204. package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.d.ts +9 -0
  205. package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +65 -0
  206. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection.d.ts +9 -0
  207. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection.js +234 -0
  208. package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.d.ts +7 -0
  209. package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +59 -0
  210. package/src/View/SystemStatus/SystemStatusEntityRow.js +4 -6
  211. package/src/View/SystemStatus/SystemStatusViewPanel.d.ts +1 -1
  212. package/src/View/TeamSharing/SharedEntityObjectView.js +1 -1
  213. package/src/View/TeamSharing/TeamSharingApplyButton.js +1 -1
  214. package/src/View/Theme/ThemePopup.js +1 -1
  215. package/src/View/Wizard/OnePageAdaptableWizard.d.ts +1 -1
  216. package/src/View/Wizard/OnePageAdaptableWizard.js +1 -2
  217. package/src/agGrid/ActionColumnRenderer.d.ts +3 -0
  218. package/src/agGrid/ActionColumnRenderer.js +96 -64
  219. package/src/agGrid/Adaptable.d.ts +13 -9
  220. package/src/agGrid/Adaptable.js +207 -221
  221. package/src/agGrid/CheckboxRenderer.js +1 -1
  222. package/src/agGrid/FilterWrapper.js +60 -16
  223. package/src/agGrid/FloatingFilterWrapper.d.ts +2 -2
  224. package/src/agGrid/FloatingFilterWrapper.js +71 -32
  225. package/src/agGrid/PercentBarRenderer.d.ts +6 -2
  226. package/src/agGrid/PercentBarRenderer.js +19 -17
  227. package/src/agGrid/agGridHelper.d.ts +6 -2
  228. package/src/agGrid/agGridHelper.js +16 -15
  229. package/src/agGrid/createAgStatusPanelComponent.d.ts +1 -1
  230. package/src/agGrid/createAgStatusPanelComponent.js +17 -0
  231. package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +5 -1
  232. package/src/agGrid/editors/AdaptableDateEditor/index.js +87 -20
  233. package/src/agGrid/editors/AdaptableNumberEditor/InternalAdaptableNumberEditor.js +1 -1
  234. package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +3 -3
  235. package/src/agGrid/editors/AdaptableNumberEditor/index.js +81 -30
  236. package/src/agGrid/weightedAverage.js +19 -11
  237. package/src/components/CheckBox/index.js +7 -2
  238. package/src/components/Datepicker/index.d.ts +1 -1
  239. package/src/components/ExpressionEditor/BaseEditorInput.d.ts +1 -1
  240. package/src/components/ExpressionEditor/BaseEditorInput.js +13 -32
  241. package/src/components/ExpressionEditor/EditorInput.js +1 -1
  242. package/src/components/ExpressionEditor/EditorInputWithWhereClause.js +1 -1
  243. package/src/components/ExpressionEditor/index.js +9 -17
  244. package/src/components/FormLayout/index.js +1 -1
  245. package/src/components/StylePreview.js +2 -1
  246. package/src/components/icons/brush.d.ts +3 -0
  247. package/src/components/icons/brush.js +7 -0
  248. package/src/components/icons/index.js +2 -0
  249. package/src/metamodel/adaptable.metamodel.d.ts +191 -95
  250. package/src/metamodel/adaptable.metamodel.js +1 -1
  251. package/src/parser/src/types.d.ts +6 -3
  252. package/src/renderReactRoot.d.ts +2 -0
  253. package/src/renderReactRoot.js +11 -9
  254. package/src/types.d.ts +8 -4
  255. package/themes/dark.css +8 -4
  256. package/themes/dark.css.map +1 -0
  257. package/themes/light.css +4 -1
  258. package/themes/light.css.map +1 -0
  259. package/version.d.ts +1 -1
  260. package/version.js +1 -1
  261. package/src/AdaptableComponents.d.ts +0 -1
  262. package/src/AdaptableComponents.js +0 -5
  263. package/src/Utilities/Services/LicenseService.js +0 -1
@@ -0,0 +1,234 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StyledColumnWizardStyleSection = exports.renderStyledColumnStyleSummary = exports.renderFormatColumnStyleWizardSummary = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = tslib_1.__importStar(require("react"));
6
+ const rebass_1 = require("rebass");
7
+ const CheckBox_1 = require("../../../components/CheckBox");
8
+ const ErrorBox_1 = tslib_1.__importDefault(require("../../../components/ErrorBox"));
9
+ const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
10
+ const Tabs_1 = require("../../../components/Tabs");
11
+ const Tag_1 = require("../../../components/Tag");
12
+ const ColorPicker_1 = require("../../ColorPicker");
13
+ const RangesComponent_1 = require("../../Components/RangesComponent");
14
+ const StyleVisualItem_1 = require("../../Components/StyleVisualItem");
15
+ const UIHelper_1 = require("../../UIHelper");
16
+ const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
17
+ const renderFormatColumnStyleWizardSummary = (data) => {
18
+ const { api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
19
+ return (0, exports.renderStyledColumnStyleSummary)(data, api);
20
+ };
21
+ exports.renderFormatColumnStyleWizardSummary = renderFormatColumnStyleWizardSummary;
22
+ const getRanges = (ranges) => {
23
+ return ranges.map((r, i) => (React.createElement(rebass_1.Flex, { key: i, alignItems: "center", mr: 3 },
24
+ React.createElement(rebass_1.Box, { mr: 1 },
25
+ r.Min,
26
+ " to ",
27
+ r.Max,
28
+ ' '),
29
+ React.createElement(StyleVisualItem_1.StyleVisualItem, { Style: {
30
+ BackColor: r.Color,
31
+ ForeColor: r.Color,
32
+ } }))));
33
+ };
34
+ const getColumnComparison = (columnComparison, api) => {
35
+ return (React.createElement(rebass_1.Flex, { key: 'cc', alignItems: "center", mr: 3 },
36
+ React.createElement(rebass_1.Box, { mr: 1 },
37
+ "Min Value:",
38
+ ' ',
39
+ isNaN(Number(columnComparison.MinValue))
40
+ ? '[' + api.columnApi.getFriendlyNameFromColumnId(String(columnComparison.MinValue)) + ']'
41
+ : columnComparison.MinValue,
42
+ ' ',
43
+ ", Max Value:",
44
+ ' ',
45
+ isNaN(Number(columnComparison.MaxValue))
46
+ ? '[' + api.columnApi.getFriendlyNameFromColumnId(String(columnComparison.MaxValue)) + ']'
47
+ : columnComparison.MaxValue,
48
+ ' '),
49
+ React.createElement(StyleVisualItem_1.StyleVisualItem, { Style: {
50
+ BackColor: columnComparison.Color,
51
+ ForeColor: columnComparison.Color,
52
+ } })));
53
+ };
54
+ const renderStyledColumnStyleSummary = (data, api) => {
55
+ if (data.CheckBoxStyle) {
56
+ return React.createElement(Tag_1.Tag, null, "Checkbox Style");
57
+ }
58
+ if (data.GradientStyle) {
59
+ if (data.GradientStyle.CellRanges) {
60
+ return getRanges(data.GradientStyle.CellRanges);
61
+ }
62
+ if (data.GradientStyle.ColumnComparison) {
63
+ return getColumnComparison(data.GradientStyle.ColumnComparison, api);
64
+ }
65
+ }
66
+ if (data.PercentBarStyle) {
67
+ if (data.PercentBarStyle.CellRanges) {
68
+ return getRanges(data.PercentBarStyle.CellRanges);
69
+ }
70
+ if (data.PercentBarStyle.ColumnComparison) {
71
+ return getColumnComparison(data.PercentBarStyle.ColumnComparison, api);
72
+ }
73
+ }
74
+ return React.createElement(Tag_1.Tag, null, "No Styling Defined");
75
+ };
76
+ exports.renderStyledColumnStyleSummary = renderStyledColumnStyleSummary;
77
+ const StyledColumnWizardStyleSection = (props) => {
78
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
79
+ const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
80
+ const minMaxRangeValues = React.useMemo(() => {
81
+ const columnId = data.ColumnId;
82
+ if (!columnId) {
83
+ return null;
84
+ }
85
+ const column = api.columnApi.getColumnFromId(columnId);
86
+ return {
87
+ min: api.columnApi.getMinValueForNumericColumn(column),
88
+ max: api.columnApi.getMaxValueForNumericColumn(column),
89
+ };
90
+ }, [data]);
91
+ const scope = { ColumnIds: [data.ColumnId] }; // TODO: remove scope when format column columnStyle is removed
92
+ // gradient
93
+ const onUpdateGradientStyleRanges = (ranges) => {
94
+ const GradientStyle = {
95
+ CellRanges: ranges,
96
+ };
97
+ props.onChange(Object.assign(Object.assign({}, data), { GradientStyle }));
98
+ };
99
+ const onUpdateGradientStyleColumnComparison = (columnComparison) => {
100
+ const GradientStyle = {
101
+ ColumnComparison: columnComparison,
102
+ };
103
+ props.onChange(Object.assign(Object.assign({}, data), { GradientStyle }));
104
+ };
105
+ // percentbar
106
+ const onUpdatePercentBarStyleColumnComparison = (columnComparison) => {
107
+ const PercentBarStyle = Object.assign(Object.assign({}, data.PercentBarStyle), { ColumnComparison: columnComparison });
108
+ props.onChange(Object.assign(Object.assign({}, data), { PercentBarStyle }));
109
+ };
110
+ const onUpdatePercentBarStyleRanges = (ranges) => {
111
+ const PercentBarStyle = Object.assign(Object.assign({}, data.PercentBarStyle), { CellRanges: ranges });
112
+ props.onChange(Object.assign(Object.assign({}, data), { PercentBarStyle }));
113
+ };
114
+ const onPercentBarCellTextCellValueChanged = (checked) => {
115
+ let percentBarStyle = data === null || data === void 0 ? void 0 : data.PercentBarStyle;
116
+ if (checked) {
117
+ if (!percentBarStyle.CellText) {
118
+ percentBarStyle.CellText = ['CellValue'];
119
+ }
120
+ else {
121
+ percentBarStyle.CellText.push('CellValue');
122
+ }
123
+ }
124
+ else {
125
+ if (percentBarStyle.CellText && percentBarStyle.CellText.includes('PercentageValue')) {
126
+ percentBarStyle.CellText = ['PercentageValue'];
127
+ }
128
+ else {
129
+ percentBarStyle.CellText = [];
130
+ }
131
+ }
132
+ props.onChange(Object.assign(Object.assign({}, data), { PercentBarStyle: percentBarStyle }));
133
+ };
134
+ const onPercentBarCellTextPercentValueChanged = (checked) => {
135
+ let percentBarStyle = data === null || data === void 0 ? void 0 : data.PercentBarStyle;
136
+ if (checked) {
137
+ if (!percentBarStyle.CellText) {
138
+ percentBarStyle.CellText = ['PercentageValue'];
139
+ }
140
+ else {
141
+ percentBarStyle.CellText.push('PercentageValue');
142
+ }
143
+ }
144
+ else {
145
+ if (percentBarStyle.CellText && percentBarStyle.CellText.includes('CellValue')) {
146
+ percentBarStyle.CellText = ['CellValue'];
147
+ }
148
+ else {
149
+ percentBarStyle.CellText = [];
150
+ }
151
+ }
152
+ props.onChange(Object.assign(Object.assign({}, data), { PercentBarStyle: percentBarStyle }));
153
+ };
154
+ const onPercentBarToolTipTextCellValueChanged = (checked) => {
155
+ let percentBarStyle = data === null || data === void 0 ? void 0 : data.PercentBarStyle;
156
+ if (checked) {
157
+ if (!percentBarStyle.ToolTipText) {
158
+ percentBarStyle.ToolTipText = ['CellValue'];
159
+ }
160
+ else {
161
+ percentBarStyle.ToolTipText.push('CellValue');
162
+ }
163
+ }
164
+ else {
165
+ if (percentBarStyle.ToolTipText && percentBarStyle.ToolTipText.includes('PercentageValue')) {
166
+ percentBarStyle.ToolTipText = ['PercentageValue'];
167
+ }
168
+ else {
169
+ percentBarStyle.ToolTipText = [];
170
+ }
171
+ }
172
+ props.onChange(Object.assign(Object.assign({}, data), { PercentBarStyle: percentBarStyle }));
173
+ };
174
+ const onPercentBarToolTipTextPercentValueChanged = (checked) => {
175
+ let percentBarStyle = data.PercentBarStyle;
176
+ if (checked) {
177
+ if (!percentBarStyle.ToolTipText) {
178
+ percentBarStyle.ToolTipText = ['PercentageValue'];
179
+ }
180
+ else {
181
+ percentBarStyle.ToolTipText.push('PercentageValue');
182
+ }
183
+ }
184
+ else {
185
+ if (percentBarStyle.ToolTipText && percentBarStyle.ToolTipText.includes('CellValue')) {
186
+ percentBarStyle.ToolTipText = ['CellValue'];
187
+ }
188
+ else {
189
+ percentBarStyle.ToolTipText = [];
190
+ }
191
+ }
192
+ props.onChange(Object.assign(Object.assign({}, data), { PercentBarStyle: percentBarStyle }));
193
+ };
194
+ const onUsePercentStyleColorCheckChanged = (checked) => {
195
+ let percentBarStyle = data === null || data === void 0 ? void 0 : data.PercentBarStyle;
196
+ percentBarStyle.BackColor = checked ? (0, UIHelper_1.getHexForName)(UIHelper_1.GRAY) : null;
197
+ props.onChange(Object.assign(Object.assign({}, data), { PercentBarStyle: percentBarStyle }));
198
+ };
199
+ const onForeColorSelectChange = (color) => {
200
+ let percentBarStyle = data.PercentBarStyle;
201
+ percentBarStyle.BackColor = color;
202
+ props.onChange(Object.assign(Object.assign({}, data), { PercentBarStyle: percentBarStyle }));
203
+ };
204
+ const disabled = !data.ColumnId;
205
+ return (React.createElement(rebass_1.Box, null,
206
+ data.CheckBoxStyle && (React.createElement(Tabs_1.Tabs, null,
207
+ React.createElement(Tabs_1.Tabs.Tab, null, "Check Box Column"),
208
+ React.createElement(Tabs_1.Tabs.Content, null,
209
+ React.createElement(CheckBox_1.CheckBox, { marginLeft: 2, readOnly: true, checked: true }, "Display Column As CheckBox")))),
210
+ (data === null || data === void 0 ? void 0 : data.GradientStyle) && (React.createElement(RangesComponent_1.RangesComponent, { disabled: !data.ColumnId, minMaxRangeValues: minMaxRangeValues, api: api, scope: scope, showRangeDirection: true, ranges: (_a = data.GradientStyle) === null || _a === void 0 ? void 0 : _a.CellRanges, columnComparison: (_b = data === null || data === void 0 ? void 0 : data.GradientStyle) === null || _b === void 0 ? void 0 : _b.ColumnComparison, updateRanges: (ranges) => onUpdateGradientStyleRanges(ranges), updateColumnComparison: (columnComparison) => onUpdateGradientStyleColumnComparison(columnComparison) })),
211
+ data.PercentBarStyle && (React.createElement(React.Fragment, null,
212
+ React.createElement(RangesComponent_1.RangesComponent, { disabled: disabled, minMaxRangeValues: minMaxRangeValues, api: api, scope: scope, showRangeDirection: false, ranges: (_c = data.PercentBarStyle) === null || _c === void 0 ? void 0 : _c.CellRanges, columnComparison: (_d = data === null || data === void 0 ? void 0 : data.PercentBarStyle) === null || _d === void 0 ? void 0 : _d.ColumnComparison, updateRanges: (ranges) => onUpdatePercentBarStyleRanges(ranges), updateColumnComparison: (columnComparison) => onUpdatePercentBarStyleColumnComparison(columnComparison) }),
213
+ React.createElement(FormLayout_1.default, { marginLeft: 2, marginTop: 2 },
214
+ React.createElement(FormLayout_1.FormRow, { label: "Cell Display:" },
215
+ React.createElement(CheckBox_1.CheckBox, { disabled: disabled, marginLeft: 2, checked: (_f = (_e = data.PercentBarStyle) === null || _e === void 0 ? void 0 : _e.CellText) === null || _f === void 0 ? void 0 : _f.includes('CellValue'), onChange: (checked) => onPercentBarCellTextCellValueChanged(checked) }, "Cell Value"),
216
+ ' ',
217
+ React.createElement(CheckBox_1.CheckBox, { disabled: disabled, marginLeft: 3, checked: (_h = (_g = data === null || data === void 0 ? void 0 : data.PercentBarStyle) === null || _g === void 0 ? void 0 : _g.CellText) === null || _h === void 0 ? void 0 : _h.includes('PercentageValue'), onChange: (checked) => onPercentBarCellTextPercentValueChanged(checked) },
218
+ "Percent Value",
219
+ ' '),
220
+ ' '),
221
+ React.createElement(FormLayout_1.FormRow, { label: "ToolTip Display:" },
222
+ React.createElement(CheckBox_1.CheckBox, { disabled: disabled, marginLeft: 2, checked: (_k = (_j = data === null || data === void 0 ? void 0 : data.PercentBarStyle) === null || _j === void 0 ? void 0 : _j.ToolTipText) === null || _k === void 0 ? void 0 : _k.includes('CellValue'), onChange: (checked) => onPercentBarToolTipTextCellValueChanged(checked) }, "Cell Value"),
223
+ ' ',
224
+ React.createElement(CheckBox_1.CheckBox, { disabled: disabled, marginLeft: 3, checked: (_m = (_l = data === null || data === void 0 ? void 0 : data.PercentBarStyle) === null || _l === void 0 ? void 0 : _l.ToolTipText) === null || _m === void 0 ? void 0 : _m.includes('PercentageValue'), onChange: (checked) => onPercentBarToolTipTextPercentValueChanged(checked) },
225
+ "Percent Value",
226
+ ' '),
227
+ ' '),
228
+ React.createElement(FormLayout_1.FormRow, { label: `Back ${api.internalApi.getCorrectEnglishVariant('Colour')}` },
229
+ React.createElement(rebass_1.Flex, { alignItems: "center", marginLeft: 2 },
230
+ React.createElement(CheckBox_1.CheckBox, { disabled: disabled, checked: !!((_o = data.PercentBarStyle) === null || _o === void 0 ? void 0 : _o.BackColor), onChange: (checked) => onUsePercentStyleColorCheckChanged(checked), mr: 2 }),
231
+ ((_p = data.PercentBarStyle) === null || _p === void 0 ? void 0 : _p.BackColor) !== undefined && (React.createElement(ColorPicker_1.ColorPicker, { disabled: disabled, api: api, value: (_q = data.PercentBarStyle) === null || _q === void 0 ? void 0 : _q.BackColor, onChange: (x) => onForeColorSelectChange(x) }))))))),
232
+ !data.ColumnId && React.createElement(ErrorBox_1.default, { mt: 2 }, "You need to select a column before styling.")));
233
+ };
234
+ exports.StyledColumnWizardStyleSection = StyledColumnWizardStyleSection;
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import { StyledColumn } from '../../../PredefinedConfig/StyledColumnState';
3
+ export declare const renderStyledColumnTypeSummary: (data: StyledColumn) => JSX.Element;
4
+ export interface StyledColumnWizardTypeSectionProps {
5
+ onChange: (styledColumn: StyledColumn) => void;
6
+ }
7
+ export declare const StyledColumnWizardTypeSection: React.FunctionComponent<StyledColumnWizardTypeSectionProps>;
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StyledColumnWizardTypeSection = exports.renderStyledColumnTypeSummary = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = tslib_1.__importStar(require("react"));
6
+ const rebass_1 = require("rebass");
7
+ const Radio_1 = tslib_1.__importDefault(require("../../../components/Radio"));
8
+ const Tabs_1 = require("../../../components/Tabs");
9
+ const Tag_1 = require("../../../components/Tag");
10
+ const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
11
+ const renderStyledColumnTypeSummary = (data) => {
12
+ let type = null;
13
+ if (data.GradientStyle) {
14
+ type = 'Gradient Column';
15
+ }
16
+ else if (data.PercentBarStyle) {
17
+ type = 'Percent Bar';
18
+ }
19
+ else if (data.CheckBoxStyle) {
20
+ type = 'Check Box';
21
+ }
22
+ return (React.createElement(rebass_1.Text, { pr: 2, py: 2 },
23
+ "Type ",
24
+ React.createElement(Tag_1.Tag, null, type)));
25
+ };
26
+ exports.renderStyledColumnTypeSummary = renderStyledColumnTypeSummary;
27
+ const StyledColumnWizardTypeSection = (props) => {
28
+ const { data } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
29
+ const handleTypeChange = (type) => {
30
+ const newStyledColumn = Object.assign({}, data);
31
+ switch (type) {
32
+ case 'gradient':
33
+ newStyledColumn.GradientStyle = {};
34
+ delete newStyledColumn.PercentBarStyle;
35
+ delete newStyledColumn.CheckBoxStyle;
36
+ break;
37
+ case 'percent':
38
+ newStyledColumn.PercentBarStyle = {};
39
+ delete newStyledColumn.GradientStyle;
40
+ delete newStyledColumn.CheckBoxStyle;
41
+ break;
42
+ case 'checkbox':
43
+ newStyledColumn.CheckBoxStyle = true;
44
+ delete newStyledColumn.GradientStyle;
45
+ delete newStyledColumn.PercentBarStyle;
46
+ break;
47
+ }
48
+ newStyledColumn.ColumnId = null;
49
+ props.onChange(newStyledColumn);
50
+ };
51
+ return (React.createElement(rebass_1.Flex, { height: "100%", flexDirection: "column", "data-name": "styled-column-type" },
52
+ React.createElement(Tabs_1.Tabs, { autoFocus: false, padding: 2 },
53
+ React.createElement(Tabs_1.Tabs.Tab, null, "Type"),
54
+ React.createElement(Tabs_1.Tabs.Content, null,
55
+ React.createElement(Radio_1.default, { checked: Boolean(data.GradientStyle), onChange: () => handleTypeChange('gradient') }, "Gradient Column"),
56
+ React.createElement(Radio_1.default, { onChange: () => handleTypeChange('percent'), checked: Boolean(data.PercentBarStyle) }, "Percent Bar"),
57
+ React.createElement(Radio_1.default, { onChange: () => handleTypeChange('checkbox'), checked: Boolean(data.CheckBoxStyle) }, "Check Box")))));
58
+ };
59
+ exports.StyledColumnWizardTypeSection = StyledColumnWizardTypeSection;
@@ -7,6 +7,7 @@ const AdaptableObjectRow_1 = require("../Components/AdaptableObjectRow");
7
7
  const rebass_1 = require("rebass");
8
8
  const UIHelper_1 = tslib_1.__importDefault(require("../UIHelper"));
9
9
  const Helper_1 = require("../../Utilities/Helpers/Helper");
10
+ const join_1 = tslib_1.__importDefault(require("../../components/utils/join"));
10
11
  class SystemStatusEntityRow extends React.Component {
11
12
  render() {
12
13
  var _a;
@@ -15,15 +16,12 @@ class SystemStatusEntityRow extends React.Component {
15
16
  let messageTypeColor = UIHelper_1.default.getColorByMessageType((_a = systemStatus === null || systemStatus === void 0 ? void 0 : systemStatus.statusType) !== null && _a !== void 0 ? _a : 'Success');
16
17
  let colItems = (0, Helper_1.cloneObject)(this.props.colItems);
17
18
  colItems[0].Content = systemStatus ? (React.createElement("details", null,
18
- React.createElement(rebass_1.Flex, { title: systemStatus.statusFurtherInformation ? 'Click to see more' : '', style: {
19
- borderRadius: 'var(--ab__border-radius)',
20
- fontWeight: 'bold',
21
- cursor: systemStatus.statusFurtherInformation ? 'pointer' : 'auto',
22
- }, className: "ab-DashboardToolbar__SystemStatus__text", marginRight: 2, padding: 2, color: 'text-on-secondary', backgroundColor: messageTypeColor, fontSize: 'var( --ab-font-size-2)', alignItems: "center", as: "summary" },
19
+ React.createElement(rebass_1.Flex, { title: systemStatus.statusFurtherInformation ? 'Click to see more' : '', className: (0, join_1.default)('ab-DashboardToolbar__SystemStatus__text', systemStatus.statusFurtherInformation &&
20
+ 'ab-DashboardToolbar__SystemStatus__text--expandable'), backgroundColor: messageTypeColor, alignItems: "center", as: "summary" },
23
21
  systemStatus.statusMessage,
24
22
  " ",
25
23
  systemStatus.statusFurtherInformation ? '...' : ''),
26
- systemStatus.statusFurtherInformation ? (React.createElement(rebass_1.Box, { margin: 2, style: { whiteSpace: 'normal' } }, systemStatus.statusFurtherInformation)) : null)) : null;
24
+ systemStatus.statusFurtherInformation ? (React.createElement(rebass_1.Box, { className: "ab-DashboardToolbar__SystemStatus__further-information", margin: 2 }, systemStatus.statusFurtherInformation)) : null)) : null;
27
25
  colItems[1].Content = systemStatus.timestamp.toLocaleString();
28
26
  return React.createElement(AdaptableObjectRow_1.AdaptableObjectRow, { colItems: colItems });
29
27
  }
@@ -8,5 +8,5 @@ declare class SystemStatusViewPanelComponent extends React.Component<SystemStatu
8
8
  constructor(props: SystemStatusViewPanelComponentProps);
9
9
  render(): JSX.Element;
10
10
  }
11
- export declare let SystemStatusViewPanel: import("react-redux").ConnectedComponent<typeof SystemStatusViewPanelComponent, import("react-redux").Omit<React.ClassAttributes<SystemStatusViewPanelComponent> & SystemStatusViewPanelComponentProps, "api" | "moduleInfo" | "accessLevel" | "SystemStatusMessageInfos" | "viewType">>;
11
+ export declare let SystemStatusViewPanel: import("react-redux").ConnectedComponent<typeof SystemStatusViewPanelComponent, import("react-redux").Omit<React.ClassAttributes<SystemStatusViewPanelComponent> & SystemStatusViewPanelComponentProps, "api" | "accessLevel" | "moduleInfo" | "SystemStatusMessageInfos" | "viewType">>;
12
12
  export {};
@@ -19,7 +19,7 @@ const SharedEntityTypeItemView = (props) => {
19
19
  React.createElement(rebass_1.Flex, { mb: 2, mt: 2 },
20
20
  React.createElement(rebass_1.Flex, { mr: 2, alignItems: "center" },
21
21
  React.createElement(Tag_1.Tag, { style: { margin: 0 } }, props.data.Module)),
22
- isExpanded ? (React.createElement(SimpleButton_1.default, { onClick: () => setIsExpanded(false), icon: "arrow-up" }, "Collapse")) : (React.createElement(SimpleButton_1.default, { onClick: () => setIsExpanded(true), icon: "arrow-down" }, "Expand"))),
22
+ isExpanded ? (React.createElement(SimpleButton_1.default, { "data-name": "shared-entity-collapse-button", onClick: () => setIsExpanded(false), icon: "arrow-up" }, "Collapse")) : (React.createElement(SimpleButton_1.default, { "data-name": "shared-entity-epxand-button", onClick: () => setIsExpanded(true), icon: "arrow-down" }, "Expand"))),
23
23
  isExpanded && (React.createElement(rebass_1.Box, { as: "ul", padding: 0, className: "ab-Shared-Entity-Shared-Object" },
24
24
  React.createElement(AdaptableObjectList_1.AdaptableObjectListItem, { hideControls: true, data: item, module: module })))));
25
25
  };
@@ -10,6 +10,6 @@ const TeamSharingApplyButton = (props) => {
10
10
  const handleImport = React.useCallback(() => {
11
11
  adaptable.api.teamSharingApi.importSharedEntry(props.data);
12
12
  }, []);
13
- return (React.createElement(SimpleButton_1.default, { onClick: handleImport, variant: "text", tooltip: "Apply Adaptable Object", icon: "import-export" }));
13
+ return (React.createElement(SimpleButton_1.default, { "data-name": "shared-entity-apply-button", onClick: handleImport, variant: "text", tooltip: "Apply Adaptable Object", icon: "import-export" }));
14
14
  };
15
15
  exports.TeamSharingApplyButton = TeamSharingApplyButton;
@@ -38,7 +38,7 @@ class ThemePopupComponent extends React.Component {
38
38
  return (React.createElement(PopupPanel_1.PopupPanel, { headerText: this.props.moduleInfo.FriendlyName, glyphicon: this.props.moduleInfo.Glyph, infoLink: this.props.moduleInfo.HelpPage, infoLinkDisabled: !this.props.api.internalApi.isDocumentationLinksDisplayed() },
39
39
  React.createElement(FormLayout_1.default, null,
40
40
  React.createElement(FormLayout_1.FormRow, { label: "Current Theme:" },
41
- React.createElement(DropdownButton_1.default, { columns: ['label'], style: { width: '50%', minWidth: 200 }, placeholder: "Select theme", value: this.props.CurrentTheme, items: optionThemes, accessLevel: this.props.accessLevel }, currentThemeDescription)))));
41
+ React.createElement(DropdownButton_1.default, { "data-name": "select-theme-dropdown", columns: ['label'], style: { width: '50%', minWidth: 200 }, placeholder: "Select theme", value: this.props.CurrentTheme, items: optionThemes, accessLevel: this.props.accessLevel }, currentThemeDescription)))));
42
42
  }
43
43
  onChangeTheme(value) {
44
44
  this.props.SelectTheme(value);
@@ -22,7 +22,7 @@ export interface OnePageAdaptableWizardSection<ENTITY> {
22
22
  isValid?: (data: ENTITY, api: AdaptableApi, context: OnePageAdaptableWizardContextType<ENTITY>) => true | string;
23
23
  isVisible?: (data: ENTITY, api: AdaptableApi, context: OnePageAdaptableWizardContextType<ENTITY>) => boolean;
24
24
  render: (data: ENTITY, index: number) => React.ReactNode;
25
- renderSummary?: (data: ENTITY) => React.ReactNode;
25
+ renderSummary?: (data: ENTITY, api: AdaptableApi) => React.ReactNode;
26
26
  }
27
27
  export interface OnePageAdaptableWizardProps<ENTITY> {
28
28
  moduleInfo: ModuleInfo;
@@ -76,7 +76,6 @@ const OnePageAdaptableWizard = (props) => {
76
76
  exports.OnePageAdaptableWizard = OnePageAdaptableWizard;
77
77
  const OnePageWizardSummary = () => {
78
78
  const { setCurrentSection, sections, data } = (0, OnePageWizards_1.useOnePageWizardContext)();
79
- const { api } = useOnePageAdaptableWizardContext();
80
79
  const renderEdit = (index) => (React.createElement(SimpleButton_1.default, { px: 1, variant: "text", style: {
81
80
  textDecoration: 'underline',
82
81
  display: 'inline-block',
@@ -84,7 +83,7 @@ const OnePageWizardSummary = () => {
84
83
  }, onClick: () => {
85
84
  setCurrentSection(index);
86
85
  } }, "edit"));
87
- return (React.createElement(React.Fragment, null, sections
86
+ return (React.createElement(rebass_1.Box, { className: "ab-OnePageWizardSummary" }, sections
88
87
  .map((section, index) => {
89
88
  if (section === '-') {
90
89
  return null;
@@ -1,11 +1,14 @@
1
+ /// <reference types="react" />
1
2
  import { ICellRendererComp, ICellRendererParams } from '@ag-grid-community/core';
2
3
  import { ActionColumn } from '../AdaptableOptions/ActionOptions';
3
4
  interface ActionColumnCellRendererParams extends ICellRendererParams {
4
5
  actionColumn?: ActionColumn;
5
6
  }
7
+ export declare const ReactActionColumnRenderer: (props: ActionColumnCellRendererParams) => JSX.Element;
6
8
  export declare class ActionColumnRenderer implements ICellRendererComp {
7
9
  private eGui;
8
10
  private eventListener;
11
+ private unmountReactRoot?;
9
12
  init(params: ActionColumnCellRendererParams): void;
10
13
  render(): void;
11
14
  getGui(): HTMLElement;
@@ -1,77 +1,108 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ActionColumnRenderer = void 0;
3
+ exports.ActionColumnRenderer = exports.ReactActionColumnRenderer = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const SimpleButton_1 = tslib_1.__importDefault(require("../components/SimpleButton"));
6
- const react_dom_1 = require("react-dom");
7
6
  const React = tslib_1.__importStar(require("react"));
8
7
  const uuid_1 = require("../components/utils/uuid");
8
+ const useRerender_1 = require("../components/utils/useRerender");
9
+ function getActionButtonsAndActionColumn(adaptable, actionColumn, colId) {
10
+ var _a;
11
+ const actionCol = actionColumn
12
+ ? actionColumn
13
+ : (_a = adaptable.api.actionApi.getAllActionColumn()) === null || _a === void 0 ? void 0 : _a.find((ac) => ac.columnId == colId);
14
+ if (actionCol && actionCol.actionColumnButton) {
15
+ let actionButtons = Array.isArray(actionCol.actionColumnButton)
16
+ ? actionCol.actionColumnButton
17
+ : [actionCol.actionColumnButton];
18
+ if (!actionButtons.length) {
19
+ return;
20
+ }
21
+ // actionButtons don't have IDs, so we need to generate them to be used later as a react component key
22
+ actionButtons = actionButtons.map((actionButton) => (Object.assign(Object.assign({}, actionButton), { Uuid: (0, uuid_1.createUuid)() })));
23
+ return { actionButtons, actionColumn: actionCol };
24
+ }
25
+ return {
26
+ actionButtons: [],
27
+ actionColumn: actionCol,
28
+ };
29
+ }
30
+ const renderActionButtons = (buttons, adaptableApi, context, rerender) => {
31
+ return (React.createElement(React.Fragment, null, buttons.map((button, index) => {
32
+ var _a, _b;
33
+ if (button.hidden && button.hidden(button, context)) {
34
+ return;
35
+ }
36
+ const buttonIcon = adaptableApi.internalApi.getIconForButton(button, context, {
37
+ height: 15,
38
+ width: 15,
39
+ });
40
+ const buttonStyle = adaptableApi.internalApi.getStyleForButton(button, context);
41
+ const buttonLabel = adaptableApi.internalApi.getLabelForButton(button, context);
42
+ const buttonTooltip = adaptableApi.internalApi.getTooltipForButton(button, context);
43
+ const handleClick = () => {
44
+ var _a;
45
+ (_a = button.onClick) === null || _a === void 0 ? void 0 : _a.call(button, button, context);
46
+ // Timeout to let any updates to be done before re-rendering the component
47
+ setTimeout(() => {
48
+ // when called again it triggers a re-render
49
+ // https:reactjs.org/docs/react-dom.html#render
50
+ rerender();
51
+ }, 16);
52
+ };
53
+ const disabled = button.disabled && button.disabled(button, context);
54
+ return (React.createElement(SimpleButton_1.default, { key: button.Uuid, "data-name": `action-button-${index + 1}`, variant: (_a = buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.variant) !== null && _a !== void 0 ? _a : 'text', disabled: disabled, tooltip: buttonTooltip, icon: buttonIcon, tone: (_b = buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.tone) !== null && _b !== void 0 ? _b : 'none', onClick: handleClick, className: buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.className, accessLevel: 'Full' }, buttonLabel));
55
+ })));
56
+ };
57
+ const ReactActionColumnRenderer = (props) => {
58
+ const rerender = (0, useRerender_1.useRerender)();
59
+ const adaptable = props.api.__adaptable;
60
+ const { actionButtons, actionColumn } = getActionButtonsAndActionColumn(adaptable, props.actionColumn, props.colDef.colId);
61
+ if (!actionColumn || !actionButtons.length) {
62
+ return null;
63
+ }
64
+ if (adaptable.api.gridApi.isGroupRowNode(props.node) && !actionColumn.includeGroupedRows) {
65
+ return null;
66
+ }
67
+ const pkValue = adaptable.getPrimaryKeyValueFromRowNode(props.node);
68
+ const buttonContext = {
69
+ actionColumn,
70
+ primaryKeyValue: pkValue,
71
+ rowNode: props.node,
72
+ adaptableApi: adaptable.api,
73
+ };
74
+ return (React.createElement("div", { className: "ab-ActionColumn" }, renderActionButtons(actionButtons, adaptable.api, buttonContext, rerender)));
75
+ };
76
+ exports.ReactActionColumnRenderer = ReactActionColumnRenderer;
9
77
  class ActionColumnRenderer {
10
78
  // gets called once before the renderer is used
11
79
  init(params) {
12
- var _a;
13
80
  const adaptable = params.api.__adaptable;
14
- const actionCol = params.actionColumn
15
- ? params.actionColumn
16
- : (_a = adaptable.api.actionApi
17
- .getAllActionColumn()) === null || _a === void 0 ? void 0 : _a.find((ac) => ac.columnId == params.colDef.colId);
18
- if (actionCol && actionCol.actionColumnButton) {
19
- let actionButtons = Array.isArray(actionCol.actionColumnButton)
20
- ? actionCol.actionColumnButton
21
- : [actionCol.actionColumnButton];
22
- if (!actionButtons.length) {
23
- return;
24
- }
25
- // actionButtons don't have IDs, so we need to generate them to be used later as a react component key
26
- actionButtons = actionButtons.map((actionButton) => (Object.assign(Object.assign({}, actionButton), { Uuid: (0, uuid_1.createUuid)() })));
27
- // create the cell
28
- this.eGui = document.createElement('div');
29
- this.eGui.className = 'ab-ActionColumn';
30
- // if its a group node then only show if set to do so
31
- if (adaptable.api.gridApi.isGroupRowNode(params.node) && !actionCol.includeGroupedRows) {
32
- this.eGui.innerHTML = '';
33
- return;
34
- }
35
- const pkValue = adaptable.getPrimaryKeyValueFromRowNode(params.node);
36
- const buttonContext = {
37
- actionColumn: actionCol,
38
- primaryKeyValue: pkValue,
39
- rowNode: params.node,
40
- adaptableApi: adaptable.api,
41
- };
42
- const renderActionButtons = (buttons, adaptableApi, context) => {
43
- return (React.createElement(React.Fragment, null, buttons.map((button, index) => {
44
- var _a, _b;
45
- if (button.hidden && button.hidden(button, context)) {
46
- return;
47
- }
48
- const buttonIcon = adaptableApi.internalApi.getIconForButton(button, context, {
49
- height: 15,
50
- width: 15,
51
- });
52
- const buttonStyle = adaptableApi.internalApi.getStyleForButton(button, context);
53
- const buttonLabel = adaptableApi.internalApi.getLabelForButton(button, context);
54
- const buttonTooltip = adaptableApi.internalApi.getTooltipForButton(button, context);
55
- const handleClick = () => {
56
- button.onClick(button, context);
57
- // Timeout to let any updates to be done before re-rendering the component
58
- setTimeout(() => {
59
- // when called again it triggers a re-render
60
- // https:reactjs.org/docs/react-dom.html#render
61
- doRender();
62
- }, 16);
63
- };
64
- const disabled = button.disabled && button.disabled(button, context);
65
- return (React.createElement(SimpleButton_1.default, { key: button.Uuid, "data-name": `action-button-${index + 1}`, variant: (_a = buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.variant) !== null && _a !== void 0 ? _a : 'text', disabled: disabled, tooltip: buttonTooltip, icon: buttonIcon, tone: (_b = buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.tone) !== null && _b !== void 0 ? _b : 'none', onClick: handleClick, className: buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.className, accessLevel: 'Full' }, buttonLabel));
66
- })));
67
- };
68
- const eGui = this.eGui;
69
- function doRender() {
70
- (0, react_dom_1.render)(renderActionButtons(actionButtons, adaptable.api, buttonContext), eGui);
71
- }
72
- this.render = doRender;
73
- doRender();
81
+ const { actionButtons, actionColumn } = getActionButtonsAndActionColumn(adaptable, params.actionColumn, params.colDef.colId);
82
+ if (!actionColumn || !actionButtons.length) {
83
+ return;
74
84
  }
85
+ // create the cell
86
+ this.eGui = document.createElement('div');
87
+ this.eGui.className = 'ab-ActionColumn';
88
+ // if its a group node then only show if set to do so
89
+ if (adaptable.api.gridApi.isGroupRowNode(params.node) && !actionColumn.includeGroupedRows) {
90
+ this.eGui.innerHTML = '';
91
+ return;
92
+ }
93
+ const pkValue = adaptable.getPrimaryKeyValueFromRowNode(params.node);
94
+ const buttonContext = {
95
+ actionColumn,
96
+ primaryKeyValue: pkValue,
97
+ rowNode: params.node,
98
+ adaptableApi: adaptable.api,
99
+ };
100
+ const eGui = this.eGui;
101
+ const doRender = () => {
102
+ this.unmountReactRoot = adaptable.renderReactRoot(renderActionButtons(actionButtons, adaptable.api, buttonContext, doRender), eGui);
103
+ };
104
+ this.render = doRender;
105
+ doRender();
75
106
  }
76
107
  // defined on init
77
108
  // used to re-render in refresh
@@ -88,7 +119,8 @@ class ActionColumnRenderer {
88
119
  }
89
120
  // gets called when the cell is removed from the grid
90
121
  destroy() {
91
- (0, react_dom_1.unmountComponentAtNode)(this.eGui);
122
+ var _a;
123
+ (_a = this.unmountReactRoot) === null || _a === void 0 ? void 0 : _a.call(this);
92
124
  // do cleanup, remove event listener from button
93
125
  if (this.eGui) {
94
126
  this.eGui.removeEventListener('click', this.eventListener);