@adaptabletools/adaptable 13.0.0-canary.9 → 13.0.1

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 (243) hide show
  1. package/base.css +1454 -840
  2. package/base.css.map +1 -0
  3. package/bundle.cjs.js +238 -220
  4. package/index.css +1505 -850
  5. package/index.css.map +1 -0
  6. package/package.json +6 -6
  7. package/publishTimestamp.d.ts +1 -1
  8. package/publishTimestamp.js +1 -1
  9. package/src/AdaptableInterfaces/IAdaptable.d.ts +3 -0
  10. package/src/AdaptableOptions/AdaptableQLOptions.d.ts +30 -6
  11. package/src/AdaptableOptions/ExportOptions.d.ts +2 -2
  12. package/src/AdaptableOptions/GeneralOptions.d.ts +0 -5
  13. package/src/AdaptableOptions/LayoutOptions.d.ts +2 -1
  14. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +2 -2
  15. package/src/Api/AdaptableApi.d.ts +2 -5
  16. package/src/Api/ColumnApi.d.ts +8 -2
  17. package/src/Api/ConfigApi.d.ts +0 -5
  18. package/src/Api/ExportApi.d.ts +6 -6
  19. package/src/Api/FormatColumnApi.d.ts +46 -73
  20. package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -2
  21. package/src/Api/Implementation/AdaptableApiImpl.js +2 -3
  22. package/src/Api/Implementation/AlertApiImpl.js +9 -4
  23. package/src/Api/Implementation/ColumnApiImpl.d.ts +2 -1
  24. package/src/Api/Implementation/ColumnApiImpl.js +15 -11
  25. package/src/Api/Implementation/ConfigApiImpl.d.ts +0 -2
  26. package/src/Api/Implementation/ConfigApiImpl.js +0 -11
  27. package/src/Api/Implementation/ExportApiImpl.d.ts +4 -4
  28. package/src/Api/Implementation/ExportApiImpl.js +14 -14
  29. package/src/Api/Implementation/FlashingCellApiImpl.js +4 -1
  30. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +24 -22
  31. package/src/Api/Implementation/FormatColumnApiImpl.js +57 -224
  32. package/src/Api/Implementation/InternalApiImpl.d.ts +1 -1
  33. package/src/Api/Implementation/InternalApiImpl.js +4 -3
  34. package/src/Api/Implementation/QueryLanguageApiImpl.d.ts +2 -1
  35. package/src/Api/Implementation/QueryLanguageApiImpl.js +9 -15
  36. package/src/Api/Implementation/ScopeApiImpl.d.ts +1 -1
  37. package/src/Api/Implementation/StyledColumnApiImpl.d.ts +25 -0
  38. package/src/Api/Implementation/StyledColumnApiImpl.js +193 -0
  39. package/src/Api/InternalApi.d.ts +1 -1
  40. package/src/Api/QueryLanguageApi.d.ts +3 -2
  41. package/src/Api/ScopeApi.d.ts +1 -1
  42. package/src/Api/StyledColumnApi.d.ts +106 -0
  43. package/src/Api/{ConditionalStyleApi.js → StyledColumnApi.js} +0 -0
  44. package/src/PredefinedConfig/AdaptableState.d.ts +2 -0
  45. package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
  46. package/src/PredefinedConfig/Common/Types.d.ts +3 -3
  47. package/src/PredefinedConfig/Common/Types.js +1 -0
  48. package/src/PredefinedConfig/FormatColumnState.d.ts +6 -90
  49. package/src/PredefinedConfig/PredefinedConfig.d.ts +5 -0
  50. package/src/PredefinedConfig/StyledColumnState.d.ts +119 -0
  51. package/src/{Strategy/Interface/IConditionalStyleModule.js → PredefinedConfig/StyledColumnState.js} +0 -0
  52. package/src/Redux/ActionsReducers/PluginsRedux.d.ts +4 -4
  53. package/src/Redux/ActionsReducers/PluginsRedux.js +5 -5
  54. package/src/Redux/ActionsReducers/StyledColumnRedux.d.ts +49 -0
  55. package/src/Redux/ActionsReducers/StyledColumnRedux.js +92 -0
  56. package/src/Redux/DeadRedux.d.ts +6 -0
  57. package/src/Redux/DeadRedux.js +19 -1
  58. package/src/Redux/Store/AdaptableStore.js +9 -8
  59. package/src/Strategy/ConditionalStyleModule.d.ts +2 -27
  60. package/src/Strategy/ConditionalStyleModule.js +0 -219
  61. package/src/Strategy/FormatColumnModule.d.ts +0 -2
  62. package/src/Strategy/FormatColumnModule.js +30 -221
  63. package/src/Strategy/LayoutModule.js +0 -4
  64. package/src/Strategy/StyledColumnModule.d.ts +24 -0
  65. package/src/Strategy/StyledColumnModule.js +165 -0
  66. package/src/Strategy/Utilities/FormatColumn/getFormatColumnStyleViewItems.js +1 -16
  67. package/src/Strategy/Utilities/getScopeViewItems.js +1 -1
  68. package/src/Utilities/Constants/ModuleConstants.d.ts +3 -0
  69. package/src/Utilities/Constants/ModuleConstants.js +4 -1
  70. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +1 -3
  71. package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -1
  72. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.d.ts +1 -4
  73. package/src/Utilities/ObjectFactory.d.ts +5 -2
  74. package/src/Utilities/ObjectFactory.js +14 -6
  75. package/src/Utilities/Services/ModuleService.js +2 -2
  76. package/src/Utilities/Services/QueryLanguageService.js +1 -1
  77. package/src/Utilities/Services/ReportService.js +6 -6
  78. package/src/View/AdaptablePopover/index.js +1 -1
  79. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +15 -14
  80. package/src/View/Alert/Wizard/AlertButtonsEditor.js +24 -1
  81. package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +6 -5
  82. package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +3 -3
  83. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +3 -3
  84. package/src/View/Alert/Wizard/isValidAlertRules.js +1 -1
  85. package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
  86. package/src/View/CalculatedColumn/CalculatedColumnSummary.d.ts +1 -1
  87. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +1 -1
  88. package/src/View/Components/AdaptableObjectRow/index.js +1 -6
  89. package/src/View/Components/Buttons/ButtonInfo.d.ts +1 -3
  90. package/src/View/Components/Buttons/ButtonInfo.js +3 -5
  91. package/src/View/Components/EntityRulesEditor/index.js +8 -17
  92. package/src/View/Components/FilterForm/FilterForm.js +11 -16
  93. package/src/View/Components/FilterForm/ListBoxFilterForm.js +2 -1
  94. package/src/View/Components/FilterForm/QuickFilterForm.js +7 -13
  95. package/src/View/Components/NewScopeComponent.js +3 -3
  96. package/src/View/Components/Panels/PanelWithButton.js +1 -5
  97. package/src/View/Components/Panels/PanelWithImage.js +1 -5
  98. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +2 -2
  99. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.d.ts +1 -0
  100. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +3 -16
  101. package/src/View/Components/Popups/AdaptablePopup/PopupPanel.js +1 -1
  102. package/src/View/Components/Popups/AdaptablePopupTeamSharing.js +5 -5
  103. package/src/View/Components/RangesComponent.d.ts +8 -1
  104. package/src/View/Components/RangesComponent.js +60 -24
  105. package/src/View/Components/ScopeComponent.js +6 -6
  106. package/src/View/Components/Selectors/ColumnSelector.d.ts +1 -0
  107. package/src/View/Components/Selectors/ColumnSelector.js +2 -1
  108. package/src/View/Components/Selectors/ColumnValueSelector.js +2 -2
  109. package/src/View/Components/StyleComponent.js +14 -19
  110. package/src/View/Components/ToolPanel/AdaptableToolPanel.d.ts +1 -11
  111. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +21 -9
  112. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
  113. package/src/View/Components/ToolPanel/ToolPanelPopup.d.ts +1 -1
  114. package/src/View/Dashboard/DashboardPopup.js +1 -1
  115. package/src/View/DataSet/DataSetSelector.js +1 -1
  116. package/src/View/DataSet/DataSetViewPanel.d.ts +1 -1
  117. package/src/View/Export/ExportViewPanel.d.ts +1 -1
  118. package/src/View/Export/ExportViewPanel.js +4 -4
  119. package/src/View/Export/ReportExportDropdown.js +1 -1
  120. package/src/View/Export/Wizard/ReportNameWizardSection.js +10 -11
  121. package/src/View/Filter/FilterSummary.d.ts +1 -1
  122. package/src/View/Filter/FilterViewPanel.d.ts +1 -1
  123. package/src/View/FlashingCell/FlashingCellStyle.js +3 -3
  124. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +3 -3
  125. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +6 -6
  126. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +4 -4
  127. package/src/View/FormatColumn/FormatColumnSummary.js +1 -1
  128. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +27 -27
  129. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +4 -5
  130. package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +1 -1
  131. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +2 -6
  132. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +3 -3
  133. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +6 -300
  134. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +3 -10
  135. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +7 -7
  136. package/src/View/GridInfo/ColumnInfoComponent.js +26 -18
  137. package/src/View/GridInfo/GridInfoPopup.js +10 -9
  138. package/src/View/Layout/LayoutRadioSelector.js +1 -1
  139. package/src/View/Layout/LayoutViewPanel.d.ts +1 -1
  140. package/src/View/Layout/Wizard/Components/ColumnLabels.js +1 -1
  141. package/src/View/Layout/Wizard/sections/AggregationsSection.js +1 -1
  142. package/src/View/Layout/Wizard/sections/ColumnsSection.js +7 -6
  143. package/src/View/Layout/Wizard/sections/SettingsSection.js +2 -2
  144. package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.js +1 -1
  145. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +3 -3
  146. package/src/View/Query/QueryViewPanel.d.ts +1 -1
  147. package/src/View/Query/Wizard/NamedQuerySettingsWizardSection.js +1 -1
  148. package/src/View/QuickSearch/QuickSearchPopup.js +2 -2
  149. package/src/View/QuickSearch/QuickSearchViewPanel.d.ts +1 -1
  150. package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +5 -5
  151. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsGlue42.js +1 -1
  152. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsIPushPull.js +5 -5
  153. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsOpenFin.js +1 -1
  154. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +5 -5
  155. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +2 -2
  156. package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +3 -3
  157. package/src/View/SmartEdit/SmartEditPopup.js +3 -3
  158. package/src/View/SpecialColumnSettingsWizardStep.js +10 -10
  159. package/src/View/StateManagement/StateManagementPopup.js +4 -4
  160. package/src/View/StatusBar/StatusBarPopup.js +1 -1
  161. package/src/View/StyledColumn/Wizard/StyledColumnWizard.d.ts +7 -0
  162. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +77 -0
  163. package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.d.ts +9 -0
  164. package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +65 -0
  165. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection.d.ts +9 -0
  166. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection.js +234 -0
  167. package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.d.ts +7 -0
  168. package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +59 -0
  169. package/src/View/SystemStatus/SystemStatusEntityRow.js +4 -6
  170. package/src/View/SystemStatus/SystemStatusViewPanel.d.ts +1 -1
  171. package/src/View/TeamSharing/SharedEntityObjectView.js +1 -1
  172. package/src/View/TeamSharing/TeamSharingApplyButton.js +1 -1
  173. package/src/View/Theme/ThemePopup.js +1 -1
  174. package/src/View/Wizard/OnePageAdaptableWizard.d.ts +1 -1
  175. package/src/View/Wizard/OnePageAdaptableWizard.js +1 -2
  176. package/src/agGrid/ActionColumnRenderer.d.ts +2 -0
  177. package/src/agGrid/ActionColumnRenderer.js +94 -62
  178. package/src/agGrid/Adaptable.d.ts +10 -11
  179. package/src/agGrid/Adaptable.js +164 -222
  180. package/src/agGrid/CheckboxRenderer.js +1 -1
  181. package/src/agGrid/FilterWrapper.js +60 -16
  182. package/src/agGrid/FloatingFilterWrapper.d.ts +2 -2
  183. package/src/agGrid/FloatingFilterWrapper.js +71 -32
  184. package/src/agGrid/PercentBarRenderer.d.ts +6 -2
  185. package/src/agGrid/PercentBarRenderer.js +19 -17
  186. package/src/agGrid/agGridHelper.d.ts +6 -2
  187. package/src/agGrid/agGridHelper.js +17 -17
  188. package/src/agGrid/createAgStatusPanelComponent.d.ts +1 -1
  189. package/src/agGrid/createAgStatusPanelComponent.js +17 -0
  190. package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +4 -1
  191. package/src/agGrid/editors/AdaptableDateEditor/index.js +84 -17
  192. package/src/agGrid/editors/AdaptableNumberEditor/InternalAdaptableNumberEditor.js +1 -1
  193. package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +2 -3
  194. package/src/agGrid/editors/AdaptableNumberEditor/index.js +78 -27
  195. package/src/agGrid/weightedAverage.js +19 -11
  196. package/src/components/CheckBox/index.js +7 -2
  197. package/src/components/Datepicker/index.d.ts +1 -1
  198. package/src/components/DragAndDropContext/TabList.js +1 -1
  199. package/src/components/DragAndDropContext/UnusedPanel.js +3 -2
  200. package/src/components/ExpressionEditor/BaseEditorInput.js +13 -32
  201. package/src/components/ExpressionEditor/index.js +9 -17
  202. package/src/components/FormLayout/index.js +1 -1
  203. package/src/components/StylePreview.js +2 -1
  204. package/src/components/icons/brush.d.ts +3 -0
  205. package/src/components/icons/brush.js +7 -0
  206. package/src/components/icons/index.js +2 -0
  207. package/src/metamodel/adaptable.metamodel.d.ts +113 -57
  208. package/src/metamodel/adaptable.metamodel.js +1 -1
  209. package/src/renderReactRoot.d.ts +2 -0
  210. package/src/renderReactRoot.js +11 -9
  211. package/src/types.d.ts +5 -5
  212. package/themes/dark.css +8 -4
  213. package/themes/dark.css.map +1 -0
  214. package/themes/light.css +4 -1
  215. package/themes/light.css.map +1 -0
  216. package/version.d.ts +1 -1
  217. package/version.js +1 -1
  218. package/src/AdaptableComponents.d.ts +0 -1
  219. package/src/AdaptableComponents.js +0 -5
  220. package/src/Api/ConditionalStyleApi.d.ts +0 -86
  221. package/src/Api/Implementation/ConditionalStyleApiImpl.d.ts +0 -29
  222. package/src/Api/Implementation/ConditionalStyleApiImpl.js +0 -98
  223. package/src/Redux/ActionsReducers/ConditionalStyleRedux.d.ts +0 -49
  224. package/src/Redux/ActionsReducers/ConditionalStyleRedux.js +0 -95
  225. package/src/Strategy/Interface/IConditionalStyleModule.d.ts +0 -6
  226. package/src/Strategy/Utilities/getStyleViewItems.d.ts +0 -2
  227. package/src/Strategy/Utilities/getStyleViewItems.js +0 -16
  228. package/src/View/ConditionalStyle/ConditionalStylePopupHeader.d.ts +0 -2
  229. package/src/View/ConditionalStyle/ConditionalStylePopupHeader.js +0 -18
  230. package/src/View/ConditionalStyle/ConditionalStyleSummary.d.ts +0 -25
  231. package/src/View/ConditionalStyle/ConditionalStyleSummary.js +0 -108
  232. package/src/View/ConditionalStyle/Wizard/ConditionalStyleRuleWizardSection.d.ts +0 -9
  233. package/src/View/ConditionalStyle/Wizard/ConditionalStyleRuleWizardSection.js +0 -42
  234. package/src/View/ConditionalStyle/Wizard/ConditionalStyleScopeWizardSection.d.ts +0 -8
  235. package/src/View/ConditionalStyle/Wizard/ConditionalStyleScopeWizardSection.js +0 -43
  236. package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.d.ts +0 -8
  237. package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.js +0 -29
  238. package/src/View/ConditionalStyle/Wizard/ConditionalStyleStyleWizardSection.d.ts +0 -8
  239. package/src/View/ConditionalStyle/Wizard/ConditionalStyleStyleWizardSection.js +0 -23
  240. package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.d.ts +0 -6
  241. package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.js +0 -114
  242. package/src/View/ConditionalStyle/Wizard/DEFAULT_PREDICATE_ID_FOR_CONDITIONAL_STYLE.d.ts +0 -1
  243. package/src/View/ConditionalStyle/Wizard/DEFAULT_PREDICATE_ID_FOR_CONDITIONAL_STYLE.js +0 -4
@@ -4,333 +4,39 @@ exports.FormatColumnStyleWizardSection = exports.renderFormatColumnStyleSummary
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const rebass_1 = require("rebass");
7
- const HelpBlock_1 = tslib_1.__importDefault(require("../../../components/HelpBlock"));
8
- const CheckBox_1 = require("../../../components/CheckBox");
9
7
  const StyleHelper_1 = require("../../../Utilities/Helpers/StyleHelper");
10
8
  const StyleComponent_1 = require("../../Components/StyleComponent");
11
9
  const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
12
- const Tabs_1 = require("../../../components/Tabs");
13
- const Radio_1 = tslib_1.__importDefault(require("../../../components/Radio"));
14
- const RangesComponent_1 = require("../../Components/RangesComponent");
15
- const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
16
- const ColorPicker_1 = require("../../ColorPicker");
17
- const UIHelper_1 = tslib_1.__importStar(require("../../UIHelper"));
18
- const StyleVisualItem_1 = require("../../Components/StyleVisualItem");
10
+ const UIHelper_1 = tslib_1.__importDefault(require("../../UIHelper"));
19
11
  const isFormatColumnStyleValid = (data, api) => {
20
- var _a, _b, _c, _d, _e;
21
- if (!data.ColumnStyle &&
22
- data.Style &&
12
+ if (data.Style &&
23
13
  UIHelper_1.default.IsEmptyStyle(data.Style) &&
24
14
  data.DisplayFormat === undefined &&
25
15
  data.CellAlignment === undefined &&
26
16
  !api.scopeApi.isSingleBooleanColumnScope(data.Scope)) {
27
17
  return 'No format applied';
28
18
  }
29
- if ((_c = (_b = (_a = data.ColumnStyle) === null || _a === void 0 ? void 0 : _a.PercentBarStyle) === null || _b === void 0 ? void 0 : _b.CellRanges) === null || _c === void 0 ? void 0 : _c.length) {
30
- if (data.ColumnStyle.PercentBarStyle.CellRanges.some((cellRange) => cellRange.Min == undefined || cellRange.Max == undefined)) {
31
- return 'Invalid Cell Range';
32
- }
33
- }
34
- if ((_e = (_d = data.ColumnStyle) === null || _d === void 0 ? void 0 : _d.PercentBarStyle) === null || _e === void 0 ? void 0 : _e.ColumnComparison) {
35
- if (data.ColumnStyle.PercentBarStyle.ColumnComparison.MinValue == undefined ||
36
- data.ColumnStyle.PercentBarStyle.ColumnComparison.MaxValue == undefined) {
37
- return 'Invalid Column Comparison Range';
38
- }
39
- }
40
19
  return true;
41
20
  };
42
21
  exports.isFormatColumnStyleValid = isFormatColumnStyleValid;
43
22
  const toStyle = (style) => {
44
23
  return Object.assign(Object.assign({}, (0, StyleHelper_1.convertAdaptableStyleToCSS)(style !== null && style !== void 0 ? style : {})), { borderWidth: (style === null || style === void 0 ? void 0 : style.BorderColor) ? 2 : 0, borderStyle: 'solid' });
45
24
  };
46
- const getRanges = (ranges) => {
47
- return ranges.map((r, i) => (React.createElement(rebass_1.Flex, { key: i, alignItems: "center", mr: 3 },
48
- React.createElement(rebass_1.Box, { mr: 1 },
49
- r.Min,
50
- " to ",
51
- r.Max,
52
- ' '),
53
- React.createElement(StyleVisualItem_1.StyleVisualItem, { Style: {
54
- BackColor: r.Color,
55
- ForeColor: r.Color,
56
- } }))));
57
- };
58
- const getColumnComparison = (columnComparison, api) => {
59
- return (React.createElement(rebass_1.Flex, { key: 'cc', alignItems: "center", mr: 3 },
60
- React.createElement(rebass_1.Box, { mr: 1 },
61
- "Min Value:",
62
- ' ',
63
- isNaN(Number(columnComparison.MinValue))
64
- ? '[' + api.columnApi.getFriendlyNameFromColumnId(String(columnComparison.MinValue)) + ']'
65
- : columnComparison.MinValue,
66
- ' ',
67
- ", Max Value:",
68
- ' ',
69
- isNaN(Number(columnComparison.MaxValue))
70
- ? '[' + api.columnApi.getFriendlyNameFromColumnId(String(columnComparison.MaxValue)) + ']'
71
- : columnComparison.MaxValue,
72
- ' '),
73
- React.createElement(StyleVisualItem_1.StyleVisualItem, { Style: {
74
- BackColor: columnComparison.Color,
75
- ForeColor: columnComparison.Color,
76
- } })));
77
- };
78
25
  const renderFormatColumnStyleWizardSummary = (data) => {
79
26
  const { api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
80
27
  return (0, exports.renderFormatColumnStyleSummary)(data, api);
81
28
  };
82
29
  exports.renderFormatColumnStyleWizardSummary = renderFormatColumnStyleWizardSummary;
83
30
  const renderFormatColumnStyleSummary = (data, api) => {
84
- if (data.ColumnStyle) {
85
- if (data.ColumnStyle.CheckBoxStyle) {
86
- return 'Checkbox Style';
87
- }
88
- if (data.ColumnStyle.GradientStyle) {
89
- if (data.ColumnStyle.GradientStyle.CellRanges) {
90
- return getRanges(data.ColumnStyle.GradientStyle.CellRanges);
91
- }
92
- if (data.ColumnStyle.GradientStyle.ColumnComparison) {
93
- return getColumnComparison(data.ColumnStyle.GradientStyle.ColumnComparison, api);
94
- }
95
- }
96
- if (data.ColumnStyle.PercentBarStyle) {
97
- if (data.ColumnStyle.PercentBarStyle.CellRanges) {
98
- return getRanges(data.ColumnStyle.PercentBarStyle.CellRanges);
99
- }
100
- if (data.ColumnStyle.PercentBarStyle.ColumnComparison) {
101
- return getColumnComparison(data.ColumnStyle.PercentBarStyle.ColumnComparison, api);
102
- }
103
- }
104
- if (data.Style == null || UIHelper_1.default.IsEmptyStyle(data.Style)) {
105
- return '[None]';
106
- }
107
- return React.createElement(StyleVisualItem_1.StyleVisualItem, { Style: data.Style });
108
- }
109
- return (React.createElement(rebass_1.Text, { padding: 2, style: toStyle(data.Style) }, "Preview result"));
31
+ return (React.createElement(rebass_1.Text, { className: "ab-FormatPreview", padding: 2, style: toStyle(data.Style) }, "Preview result"));
110
32
  };
111
33
  exports.renderFormatColumnStyleSummary = renderFormatColumnStyleSummary;
112
34
  function FormatColumnStyleWizardSection(props) {
113
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7;
35
+ var _a;
114
36
  const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
115
- const singleNumericColumn = api.scopeApi.isSingleNumericColumnScope(data.Scope);
116
- const onlyBooleanColumnsInScope = api.scopeApi.areAllBooleanColumnsInScope(data.Scope) ||
117
- api.scopeApi.scopeHasOnlyBooleanDataType(data.Scope);
118
- const onPercentBarCellTextCellValueChanged = (checked) => {
119
- var _a;
120
- let percentBarStyle = (_a = data.ColumnStyle) === null || _a === void 0 ? void 0 : _a.PercentBarStyle;
121
- if (checked) {
122
- if (!percentBarStyle.CellText) {
123
- percentBarStyle.CellText = ['CellValue'];
124
- }
125
- else {
126
- percentBarStyle.CellText.push('CellValue');
127
- }
128
- }
129
- else {
130
- if (percentBarStyle.CellText && percentBarStyle.CellText.includes('PercentageValue')) {
131
- percentBarStyle.CellText = ['PercentageValue'];
132
- }
133
- else {
134
- percentBarStyle.CellText = [];
135
- }
136
- }
137
- props.onChange(Object.assign(Object.assign({}, data), { ColumnStyle: {
138
- PercentBarStyle: percentBarStyle,
139
- } }));
140
- };
141
- const onPercentBarCellTextPercentValueChanged = (checked) => {
142
- var _a;
143
- let percentBarStyle = (_a = data.ColumnStyle) === null || _a === void 0 ? void 0 : _a.PercentBarStyle;
144
- if (checked) {
145
- if (!percentBarStyle.CellText) {
146
- percentBarStyle.CellText = ['PercentageValue'];
147
- }
148
- else {
149
- percentBarStyle.CellText.push('PercentageValue');
150
- }
151
- }
152
- else {
153
- if (percentBarStyle.CellText && percentBarStyle.CellText.includes('CellValue')) {
154
- percentBarStyle.CellText = ['CellValue'];
155
- }
156
- else {
157
- percentBarStyle.CellText = [];
158
- }
159
- }
160
- props.onChange(Object.assign(Object.assign({}, data), { ColumnStyle: {
161
- PercentBarStyle: percentBarStyle,
162
- } }));
163
- };
164
- const onPercentBarToolTipTextCellValueChanged = (checked) => {
165
- var _a;
166
- let percentBarStyle = (_a = data.ColumnStyle) === null || _a === void 0 ? void 0 : _a.PercentBarStyle;
167
- if (checked) {
168
- if (!percentBarStyle.ToolTipText) {
169
- percentBarStyle.ToolTipText = ['CellValue'];
170
- }
171
- else {
172
- percentBarStyle.ToolTipText.push('CellValue');
173
- }
174
- }
175
- else {
176
- if (percentBarStyle.ToolTipText && percentBarStyle.ToolTipText.includes('PercentageValue')) {
177
- percentBarStyle.ToolTipText = ['PercentageValue'];
178
- }
179
- else {
180
- percentBarStyle.ToolTipText = [];
181
- }
182
- }
183
- props.onChange(Object.assign(Object.assign({}, data), { ColumnStyle: {
184
- PercentBarStyle: percentBarStyle,
185
- } }));
186
- };
187
- const onPercentBarToolTipTextPercentValueChanged = (checked) => {
188
- var _a;
189
- let percentBarStyle = (_a = data.ColumnStyle) === null || _a === void 0 ? void 0 : _a.PercentBarStyle;
190
- if (checked) {
191
- if (!percentBarStyle.ToolTipText) {
192
- percentBarStyle.ToolTipText = ['PercentageValue'];
193
- }
194
- else {
195
- percentBarStyle.ToolTipText.push('PercentageValue');
196
- }
197
- }
198
- else {
199
- if (percentBarStyle.ToolTipText && percentBarStyle.ToolTipText.includes('CellValue')) {
200
- percentBarStyle.ToolTipText = ['CellValue'];
201
- }
202
- else {
203
- percentBarStyle.ToolTipText = [];
204
- }
205
- }
206
- props.onChange(Object.assign(Object.assign({}, data), { ColumnStyle: {
207
- PercentBarStyle: percentBarStyle,
208
- } }));
209
- };
210
- const onUpdatePercentBarStyleColumnComparison = (columnComparison) => {
211
- let ColumnStyle = {
212
- PercentBarStyle: {
213
- ColumnComparison: columnComparison,
214
- },
215
- };
216
- props.onChange(Object.assign(Object.assign({}, data), { ColumnStyle }));
217
- };
218
- const onUsePercentStyleColorCheckChanged = (checked) => {
219
- var _a;
220
- let percentBarStyle = (_a = data.ColumnStyle) === null || _a === void 0 ? void 0 : _a.PercentBarStyle;
221
- percentBarStyle.BackColor = checked ? (0, UIHelper_1.getHexForName)(UIHelper_1.GRAY) : null;
222
- props.onChange(Object.assign(Object.assign({}, data), { ColumnStyle: {
223
- PercentBarStyle: percentBarStyle,
224
- } }));
225
- };
226
- const onForeColorSelectChange = (color) => {
227
- var _a;
228
- let percentBarStyle = (_a = data.ColumnStyle) === null || _a === void 0 ? void 0 : _a.PercentBarStyle;
229
- percentBarStyle.BackColor = color;
230
- props.onChange(Object.assign(Object.assign({}, data), { ColumnStyle: {
231
- PercentBarStyle: percentBarStyle,
232
- } }));
233
- };
234
- const onUpdatePercentBarStyleRanges = (ranges) => {
235
- let ColumnStyle = {
236
- PercentBarStyle: {
237
- CellRanges: ranges,
238
- },
239
- };
240
- props.onChange(Object.assign(Object.assign({}, data), { ColumnStyle }));
241
- };
242
- const onUpdateGradientStyleRanges = (ranges) => {
243
- let ColumnStyle = {
244
- GradientStyle: {
245
- CellRanges: ranges,
246
- },
247
- };
248
- props.onChange(Object.assign(Object.assign({}, data), { ColumnStyle }));
249
- };
250
- const onUpdateGradientStyleColumnComparison = (columnComparison) => {
251
- let ColumnStyle = {
252
- GradientStyle: {
253
- ColumnComparison: columnComparison,
254
- },
255
- };
256
- props.onChange(Object.assign(Object.assign({}, data), { ColumnStyle }));
257
- };
258
- const onStyleTypeChanged = (event) => {
259
- let e = event.target;
260
- if (e.value == 'Gradient') {
261
- props.onChange(Object.assign(Object.assign({}, data), { ColumnStyle: {
262
- GradientStyle: {
263
- CellRanges: api.scopeApi.createCellColorRangesForScope(data.Scope),
264
- },
265
- } }));
266
- }
267
- else if (e.value == 'PercentBar') {
268
- props.onChange(Object.assign(Object.assign({}, data), { ColumnStyle: {
269
- PercentBarStyle: {
270
- CellRanges: api.scopeApi.createCellColorRangesForScope(data.Scope),
271
- },
272
- } }));
273
- }
274
- else if (e.value == 'None') {
275
- const newData = Object.assign({}, data);
276
- delete newData.ColumnStyle;
277
- props.onChange(newData);
278
- }
279
- };
280
- const onlyStandardStyleAvailable = Boolean(data.Rule);
281
37
  return (React.createElement(React.Fragment, null,
282
- onlyBooleanColumnsInScope && (React.createElement(Tabs_1.Tabs, null,
283
- React.createElement(Tabs_1.Tabs.Tab, null, "CheckBox Column"),
284
- React.createElement(Tabs_1.Tabs.Content, null,
285
- React.createElement(HelpBlock_1.default, { fontSize: 2 }, "Shows each cell in the Column as a Checkbox"),
286
- ' ',
287
- React.createElement(CheckBox_1.CheckBox, { marginLeft: 2, checked: !!((_a = data.ColumnStyle) === null || _a === void 0 ? void 0 : _a.CheckBoxStyle), onChange: (CheckBoxStyle) => {
288
- const formatColumn = Object.assign(Object.assign({}, data), { ColumnStyle: {
289
- CheckBoxStyle,
290
- } });
291
- if (!CheckBoxStyle) {
292
- delete formatColumn.ColumnStyle;
293
- }
294
- props.onChange(formatColumn);
295
- } }, "Display Column As CheckBox")))),
296
- singleNumericColumn && !onlyStandardStyleAvailable ? (React.createElement(React.Fragment, null,
297
- React.createElement(Tabs_1.Tabs, null,
298
- React.createElement(Tabs_1.Tabs.Tab, null, "Create a Format Column Style"),
299
- React.createElement(Tabs_1.Tabs.Content, null,
300
- React.createElement(rebass_1.Flex, { flexDirection: "row" },
301
- React.createElement(Radio_1.default, { marginLeft: 2, value: "None", checked: !data.ColumnStyle, onChange: (checked, e) => onStyleTypeChanged(e) }, "Standard"),
302
- ' ',
303
- React.createElement(Radio_1.default, { marginLeft: 3, value: "Gradient", checked: !!((_b = data.ColumnStyle) === null || _b === void 0 ? void 0 : _b.GradientStyle), onChange: (checked, e) => onStyleTypeChanged(e) }, "Gradient"),
304
- ' ',
305
- React.createElement(Radio_1.default, { marginLeft: 3, value: "PercentBar", checked: !!((_c = data.ColumnStyle) === null || _c === void 0 ? void 0 : _c.PercentBarStyle), onChange: (checked, e) => onStyleTypeChanged(e) },
306
- "Percent Bar",
307
- ' '),
308
- ' '))),
309
- ((_d = data.ColumnStyle) === null || _d === void 0 ? void 0 : _d.GradientStyle) && (React.createElement(RangesComponent_1.RangesComponent, { api: api, scope: data === null || data === void 0 ? void 0 : data.Scope, showRangeDirection: true, ranges: (_f = (_e = data.ColumnStyle) === null || _e === void 0 ? void 0 : _e.GradientStyle) === null || _f === void 0 ? void 0 : _f.CellRanges, columnComparison: (_h = (_g = data === null || data === void 0 ? void 0 : data.ColumnStyle) === null || _g === void 0 ? void 0 : _g.GradientStyle) === null || _h === void 0 ? void 0 : _h.ColumnComparison, updateRanges: (ranges) => onUpdateGradientStyleRanges(ranges), updateColumnComparison: (columnComparison) => onUpdateGradientStyleColumnComparison(columnComparison) })),
310
- ((_j = data.ColumnStyle) === null || _j === void 0 ? void 0 : _j.PercentBarStyle) && (React.createElement(React.Fragment, null,
311
- React.createElement(RangesComponent_1.RangesComponent, { api: api, scope: data === null || data === void 0 ? void 0 : data.Scope, showRangeDirection: false, ranges: (_l = (_k = data.ColumnStyle) === null || _k === void 0 ? void 0 : _k.PercentBarStyle) === null || _l === void 0 ? void 0 : _l.CellRanges, columnComparison: (_o = (_m = data === null || data === void 0 ? void 0 : data.ColumnStyle) === null || _m === void 0 ? void 0 : _m.PercentBarStyle) === null || _o === void 0 ? void 0 : _o.ColumnComparison, updateRanges: (ranges) => onUpdatePercentBarStyleRanges(ranges), updateColumnComparison: (columnComparison) => onUpdatePercentBarStyleColumnComparison(columnComparison) }),
312
- React.createElement(FormLayout_1.default, { marginLeft: 2, marginTop: 2 },
313
- React.createElement(FormLayout_1.FormRow, { label: "Cell Display:" },
314
- React.createElement(CheckBox_1.CheckBox, { marginLeft: 2, checked: (_r = (_q = (_p = data.ColumnStyle) === null || _p === void 0 ? void 0 : _p.PercentBarStyle) === null || _q === void 0 ? void 0 : _q.CellText) === null || _r === void 0 ? void 0 : _r.includes('CellValue'), onChange: (checked) => onPercentBarCellTextCellValueChanged(checked) }, "Cell Value"),
315
- ' ',
316
- React.createElement(CheckBox_1.CheckBox, { marginLeft: 3, checked: (_u = (_t = (_s = data.ColumnStyle) === null || _s === void 0 ? void 0 : _s.PercentBarStyle) === null || _t === void 0 ? void 0 : _t.CellText) === null || _u === void 0 ? void 0 : _u.includes('PercentageValue'), onChange: (checked) => onPercentBarCellTextPercentValueChanged(checked) },
317
- "Percent Value",
318
- ' '),
319
- ' '),
320
- React.createElement(FormLayout_1.FormRow, { label: "ToolTip Display:" },
321
- React.createElement(CheckBox_1.CheckBox, { marginLeft: 2, checked: (_x = (_w = (_v = data.ColumnStyle) === null || _v === void 0 ? void 0 : _v.PercentBarStyle) === null || _w === void 0 ? void 0 : _w.ToolTipText) === null || _x === void 0 ? void 0 : _x.includes('CellValue'), onChange: (checked) => onPercentBarToolTipTextCellValueChanged(checked) }, "Cell Value"),
322
- ' ',
323
- React.createElement(CheckBox_1.CheckBox, { marginLeft: 3, checked: (_0 = (_z = (_y = data.ColumnStyle) === null || _y === void 0 ? void 0 : _y.PercentBarStyle) === null || _z === void 0 ? void 0 : _z.ToolTipText) === null || _0 === void 0 ? void 0 : _0.includes('PercentageValue'), onChange: (checked) => onPercentBarToolTipTextPercentValueChanged(checked) },
324
- "Percent Value",
325
- ' '),
326
- ' '),
327
- React.createElement(FormLayout_1.FormRow, { label: `Back ${api.internalApi.getCorrectEnglishVariant('Colour')}` },
328
- React.createElement(rebass_1.Flex, { alignItems: "center", marginLeft: 2 },
329
- React.createElement(CheckBox_1.CheckBox, { checked: !!((_2 = (_1 = data.ColumnStyle) === null || _1 === void 0 ? void 0 : _1.PercentBarStyle) === null || _2 === void 0 ? void 0 : _2.BackColor), onChange: (checked) => onUsePercentStyleColorCheckChanged(checked), mr: 2 }),
330
- ((_4 = (_3 = data.ColumnStyle) === null || _3 === void 0 ? void 0 : _3.PercentBarStyle) === null || _4 === void 0 ? void 0 : _4.BackColor) !== undefined && (React.createElement(ColorPicker_1.ColorPicker, { api: api, value: (_6 = (_5 = data.ColumnStyle) === null || _5 === void 0 ? void 0 : _5.PercentBarStyle) === null || _6 === void 0 ? void 0 : _6.BackColor, onChange: (x) => onForeColorSelectChange(x) }))))),
331
- React.createElement(rebass_1.Flex, { flexDirection: "row", padding: 2 }))))) : null,
332
- !data.ColumnStyle ? (React.createElement(StyleComponent_1.StyleComponent, { headless: true, api: api, Style: (_7 = data.Style) !== null && _7 !== void 0 ? _7 : {}, UpdateStyle: (Style) => {
38
+ React.createElement(StyleComponent_1.StyleComponent, { headless: true, api: api, Style: (_a = data.Style) !== null && _a !== void 0 ? _a : {}, UpdateStyle: (Style) => {
333
39
  props.onChange(Object.assign(Object.assign({}, data), { Style }));
334
- } })) : null));
40
+ } })));
335
41
  }
336
42
  exports.FormatColumnStyleWizardSection = FormatColumnStyleWizardSection;
@@ -65,13 +65,6 @@ const adjustDisplayFormat = (formatColumn, api) => {
65
65
  };
66
66
  const adjustFormatColumn = (formatColumn, api) => {
67
67
  formatColumn = adjustDisplayFormat(formatColumn, api);
68
- if (!api.scopeApi.isSingleNumericColumnScope(formatColumn.Scope) &&
69
- !(api.scopeApi.areAllBooleanColumnsInScope(formatColumn.Scope) ||
70
- api.scopeApi.scopeHasOnlyBooleanDataType(formatColumn.Scope))) {
71
- // when people change the scope and select more than one (numeric) column
72
- // we have to discard any column style we might have
73
- delete formatColumn.ColumnStyle;
74
- }
75
68
  return formatColumn;
76
69
  };
77
70
  function FormatColumnWizard(props) {
@@ -108,7 +101,7 @@ function FormatColumnWizard(props) {
108
101
  return (React.createElement(OnePageAdaptableWizard_1.OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, data: formatColumn, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
109
102
  {
110
103
  title: 'Scope',
111
- details: 'Apply formatting to: one or more Columns or Data Types or the whole row',
104
+ details: 'Select which Columns will be formatted',
112
105
  isValid: NewScopeComponent_1.isScopeValid,
113
106
  renderSummary: FormatColumnScopeWizardSection_1.renderFormatColumnScopeSummary,
114
107
  render: () => {
@@ -121,14 +114,14 @@ function FormatColumnWizard(props) {
121
114
  return abObject.Rule ? (0, EntityRulesEditor_1.isRuleValid)(abObject, api, context) : true;
122
115
  },
123
116
  title: 'Condition',
124
- details: 'Build the rules when Format column should be applied',
117
+ details: 'Build a Rule when the Format Column should be applied',
125
118
  render: () => {
126
119
  return (React.createElement(FormatColumnRuleWizardSection_1.FormatColumnRuleWizardSection, { onChange: setFormatColumn, defaultPredicateId: constants_1.DEFAULT_PREDICATE_ID_FOR_FORMAT_COLUMN }));
127
120
  },
128
121
  },
129
122
  {
130
123
  title: 'Style',
131
- details: 'Format Column Style',
124
+ details: 'Create a Style for the Format Column',
132
125
  isValid: FormatColumnStyleWizardSection_1.isFormatColumnStyleValid,
133
126
  renderSummary: FormatColumnStyleWizardSection_1.renderFormatColumnStyleWizardSummary,
134
127
  render: () => {
@@ -106,15 +106,15 @@ const FreeTextColumnSettingsWizardSection = (props) => {
106
106
  return (React.createElement(React.Fragment, null,
107
107
  React.createElement(FormLayout_1.default, null,
108
108
  React.createElement(FormLayout_1.FormRow, { label: "ColumnId" },
109
- React.createElement(Input_1.default, { autoFocus: !inEdit, value: data.ColumnId || '', style: { width: '100%', maxWidth: 500 }, disabled: inEdit, type: "text", placeholder: "Enter an id", onChange: (e) => handleColumnIdChange(e) })),
109
+ React.createElement(Input_1.default, { "data-name": "column-id", autoFocus: !inEdit, value: data.ColumnId || '', style: { width: '100%', maxWidth: 500 }, disabled: inEdit, type: "text", placeholder: "Enter an id", onChange: (e) => handleColumnIdChange(e) })),
110
110
  React.createElement(FormLayout_1.FormRow, { label: "Column Name" },
111
- React.createElement(Input_1.default, { autoFocus: inEdit, onFocus: () => {
111
+ React.createElement(Input_1.default, { "data-name": "column-name", autoFocus: inEdit, onFocus: () => {
112
112
  setColumnNameFocused(true);
113
113
  }, onBlur: () => {
114
114
  setColumnNameFocused(false);
115
115
  }, value: ColumnNameFocused ? data.FriendlyName || '' : data.FriendlyName || data.ColumnId || '', style: { width: '100%', maxWidth: 500 }, type: "text", placeholder: "Enter a name", onChange: (e) => handleColumnNameChange(e) })),
116
116
  React.createElement(FormLayout_1.FormRow, { label: "Type" },
117
- React.createElement(DropdownButton_1.default, { style: {
117
+ React.createElement(DropdownButton_1.default, { "data-name": "column-type-dropdown", style: {
118
118
  width: '300px',
119
119
  whiteSpace: 'normal',
120
120
  overflow: 'hidden',
@@ -124,9 +124,9 @@ const FreeTextColumnSettingsWizardSection = (props) => {
124
124
  label: item.label,
125
125
  onClick: () => handleDataTypeChange(item.value),
126
126
  })) }, data.DataType ? data.DataType : 'Select Data Type')),
127
- React.createElement(FormLayout_1.FormRow, { label: "Default Value" }, data.DataType === 'Boolean' ? (React.createElement(CheckBox_1.CheckBox, { checked: !!data.DefaultValue, onChange: (DefaultValue) => {
127
+ React.createElement(FormLayout_1.FormRow, { label: "Default Value" }, data.DataType === 'Boolean' ? (React.createElement(CheckBox_1.CheckBox, { "data-name": "column-default-value-checkbox", checked: !!data.DefaultValue, onChange: (DefaultValue) => {
128
128
  props.onChange(Object.assign(Object.assign({}, data), { DefaultValue }));
129
- } })) : (React.createElement(AdaptableInput_1.default, { value: data.DataType === 'Date' && data.DefaultValue
129
+ } })) : (React.createElement(AdaptableInput_1.default, { "data-name": "column-default-value", value: data.DataType === 'Date' && data.DefaultValue
130
130
  ? (0, DateHelper_1.parseToISO)(data.DefaultValue, Pattern) || ''
131
131
  : data.DefaultValue || '', style: { width: '100%', maxWidth: 500 }, type: data.DataType === 'Number' ? 'number' : data.DataType === 'Date' ? 'date' : 'text', placeholder: "Default Column Value (not required)", onChange: (e) => handleDefaultValueChange(e) }))),
132
132
  React.createElement(FormLayout_1.FormRow, { label: "Header Tooltip" },
@@ -135,8 +135,8 @@ const FreeTextColumnSettingsWizardSection = (props) => {
135
135
  }) })),
136
136
  ' ',
137
137
  data.DataType == 'String' && (React.createElement(FormLayout_1.FormRow, { label: "Editor Type" },
138
- React.createElement(Radio_1.default, { value: "Inline", checked: data.TextEditor == 'Inline', onChange: (_, e) => onDynamicSelectChanged(e), marginRight: 2 }, "Inline Editor"),
139
- React.createElement(Radio_1.default, { value: "Large", checked: data.TextEditor == 'Large', onChange: (_, e) => onDynamicSelectChanged(e) }, "Large Editor")))),
138
+ React.createElement(Radio_1.default, { "data-name": "inline-editor", value: "Inline", checked: data.TextEditor == 'Inline', onChange: (_, e) => onDynamicSelectChanged(e), marginRight: 2 }, "Inline Editor"),
139
+ React.createElement(Radio_1.default, { "data-name": "large-editor", value: "Large", checked: data.TextEditor == 'Large', onChange: (_, e) => onDynamicSelectChanged(e) }, "Large Editor")))),
140
140
  ErrorMessage ? (React.createElement(ErrorBox_1.default, { mt: 2, mb: 2 }, ErrorMessage)) : null,
141
141
  React.createElement(rebass_1.Box, { mt: 2 },
142
142
  React.createElement(SpecialColumnSettingsWizardStep_1.SpecialColumnSettingsWizardStep, { isEditable: true, settings: data.FreeTextColumnSettings, onChange: handleSpecialColumnSettingsChange }))));
@@ -6,7 +6,6 @@ const React = tslib_1.__importStar(require("react"));
6
6
  const rebass_1 = require("rebass");
7
7
  const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
8
8
  const CustomSortSummary_1 = require("../CustomSort/CustomSortSummary");
9
- const ConditionalStyleSummary_1 = require("../ConditionalStyle/ConditionalStyleSummary");
10
9
  const FilterSummary_1 = require("../Filter/FilterSummary");
11
10
  const PlusMinusSummary_1 = require("../PlusMinus/PlusMinusSummary");
12
11
  const FormatColumnSummary_1 = require("../FormatColumn/FormatColumnSummary");
@@ -18,7 +17,7 @@ const GeneralConstants = tslib_1.__importStar(require("../../Utilities/Constants
18
17
  const ArrayExtensions_1 = require("../../Utilities/Extensions/ArrayExtensions");
19
18
  const FreeTextColumnSummary_1 = require("../FreeTextColumn/FreeTextColumnSummary");
20
19
  const Panel_1 = tslib_1.__importDefault(require("../../components/Panel"));
21
- const WizardSummaryPage_1 = require("../Components/WizardSummaryPage");
20
+ const InfiniteTable_1 = require("../../components/InfiniteTable");
22
21
  class ColumnInfoComponent extends React.Component {
23
22
  constructor(props) {
24
23
  super(props);
@@ -33,7 +32,7 @@ class ColumnInfoComponent extends React.Component {
33
32
  let selectedColumnId = this.state.SelectedColumn
34
33
  ? this.state.SelectedColumn.columnId
35
34
  : null;
36
- let keyValuePairs = [
35
+ const keyValuePairs = [
37
36
  {
38
37
  Key: 'Column Id',
39
38
  Value: this.state.SelectedColumn ? this.state.SelectedColumn.columnId : null,
@@ -90,7 +89,18 @@ class ColumnInfoComponent extends React.Component {
90
89
  Key: 'Grouped',
91
90
  Value: this.state.SelectedColumn ? this.state.SelectedColumn.isGrouped : null,
92
91
  },
93
- ];
92
+ ]
93
+ .map((keyValuePair) => {
94
+ return {
95
+ Key: keyValuePair.Key,
96
+ Value: keyValuePair.Value === true ? 'Yes' : keyValuePair.Value,
97
+ };
98
+ })
99
+ .filter((x) => x.Value);
100
+ const columnsMap = {
101
+ Key: { field: 'Key', header: 'Property', defaultFlex: 1 },
102
+ Value: { field: 'Value', header: 'Value', defaultFlex: 3 },
103
+ };
94
104
  let moduleService = this.props.api.internalApi.getModuleService();
95
105
  let summaries = [];
96
106
  if (this.state.SelectedColumn) {
@@ -100,12 +110,6 @@ class ColumnInfoComponent extends React.Component {
100
110
  : '' },
101
111
  React.createElement(CustomSortSummary_1.CustomSortSummary, { key: ModuleConstants.CustomSortModuleId, summarisedColumn: this.state.SelectedColumn, teamSharingActivated: this.props.teamSharingActivated, accessLevel: this.getAccessLevel(ModuleConstants.CustomSortModuleId), api: this.props.api, moduleInfo: moduleService.getModuleInfoByModule(ModuleConstants.CustomSortModuleId) })));
102
112
  }
103
- if (this.isModuleAvailable(ModuleConstants.ConditionalStyleModuleId)) {
104
- summaries.push(React.createElement("div", { key: ModuleConstants.ConditionalStyleModuleId, className: this.isModuleReadOnly(ModuleConstants.ConditionalStyleModuleId)
105
- ? GeneralConstants.READ_ONLY_STYLE
106
- : '' },
107
- React.createElement(ConditionalStyleSummary_1.ConditionalStyleSummary, { key: ModuleConstants.ConditionalStyleModuleId, summarisedColumn: this.state.SelectedColumn, teamSharingActivated: this.props.teamSharingActivated, accessLevel: this.getAccessLevel(ModuleConstants.ConditionalStyleModuleId), api: this.props.api, moduleInfo: moduleService.getModuleInfoByModule(ModuleConstants.ConditionalStyleModuleId) })));
108
- }
109
113
  if (this.isModuleAvailable(ModuleConstants.FilterModuleId)) {
110
114
  summaries.push(React.createElement("div", { key: ModuleConstants.FilterModuleId, className: this.isModuleReadOnly(ModuleConstants.FilterModuleId)
111
115
  ? GeneralConstants.READ_ONLY_STYLE
@@ -141,14 +145,18 @@ class ColumnInfoComponent extends React.Component {
141
145
  summarisedColumn: this.state.SelectedColumn, accessLevel: this.getAccessLevel(ModuleConstants.CalculatedColumnModuleId), api: this.props.api, moduleInfo: moduleService.getModuleInfoByModule(ModuleConstants.CalculatedColumnModuleId) })));
142
146
  }
143
147
  }
144
- return (React.createElement(Panel_1.default, { header: "Column Info", margin: 2, "data-name": "column-component" },
145
- React.createElement(rebass_1.Flex, { flexDirection: "row", alignItems: "center", marginBottom: 2 },
146
- React.createElement(rebass_1.Box, { flex: 1, marginLeft: 2 },
147
- React.createElement(ColumnSelector_1.ColumnSelector, { SelectedColumnIds: [selectedColumnId], ColumnList: this.props.api.columnApi.getColumns(), onColumnChange: (columns) => this.onColumnSelectedChanged(columns), SelectionMode: Enums_1.SelectionMode.Single }))),
148
- React.createElement(rebass_1.Flex, { flex: 1, style: { overflow: 'auto', width: '100%' } }, this.state.SelectedColumn && false && (
149
- // not working but we should have the ability to create a grid without doing summary page
150
- React.createElement(WizardSummaryPage_1.WizardSummaryPage, { KeyValuePairs: keyValuePairs, header: 'Column Properties' }))),
151
- React.createElement(rebass_1.Flex, { flex: 1, style: { overflow: 'auto', width: '100%' } }, this.state.SelectedColumn && (React.createElement(AdaptableObjectCollection_1.AdaptableObjectCollection, { style: { width: '100%' }, colItems: colItems, items: summaries })))));
148
+ return (React.createElement(Panel_1.default, { flex: 1, header: "Column Info", margin: 2, "data-name": "column-component" },
149
+ React.createElement(rebass_1.Flex, { height: "100%", flexDirection: "column" },
150
+ React.createElement(rebass_1.Flex, { flexDirection: "row", alignItems: "center", marginBottom: 2 },
151
+ React.createElement(rebass_1.Box, { flex: 1, marginLeft: 2 },
152
+ React.createElement(ColumnSelector_1.ColumnSelector, { SelectedColumnIds: [selectedColumnId], ColumnList: this.props.api.columnApi.getColumns(), onColumnChange: (columns) => this.onColumnSelectedChanged(columns), SelectionMode: Enums_1.SelectionMode.Single }))),
153
+ React.createElement(rebass_1.Flex, { flex: 1, style: { overflow: 'auto', width: '100%' } }, this.state.SelectedColumn && (React.createElement(AdaptableObjectCollection_1.AdaptableObjectCollection, { style: { width: '100%' }, colItems: colItems, items: summaries }))),
154
+ React.createElement(rebass_1.Box, { flex: 1, mt: 2 }, this.state.SelectedColumn && (React.createElement(InfiniteTable_1.DataSource, { data: keyValuePairs, primaryKey: "Key" },
155
+ React.createElement(InfiniteTable_1.InfiniteTable, { domProps: {
156
+ style: {
157
+ height: '100%',
158
+ },
159
+ }, columns: columnsMap })))))));
152
160
  }
153
161
  onColumnSelectedChanged(columns) {
154
162
  this.setState({ SelectedColumn: columns.length > 0 ? columns[0] : null });
@@ -104,14 +104,15 @@ const GridInfoPopup = (props) => {
104
104
  const showRadioButtons = [showGridSummary, showAdaptableOptions, showColumnInfo, showAdaptableObjects].filter((item) => item).length > 1;
105
105
  const baseClassName = 'ab-GridInfo';
106
106
  return (React.createElement(PopupPanel_1.PopupPanel, { className: baseClassName, headerText: 'Grid Info', glyphicon: 'info' },
107
- React.createElement(rebass_1.Flex, { className: `${baseClassName}__header`, marginBottom: 2, padding: 3 }, showRadioButtons && (React.createElement(React.Fragment, null,
108
- showGridSummary && (React.createElement(Radio_1.default, { className: `${baseClassName}__option-radio`, "data-name": "radioButton-GridSummary", marginRight: 3, value: "GridSummary", checked: state.ActiveTab == 'GridSummary', onChange: (_, e) => onShowGridSummaryChanged('GridSummary') }, "Summary")),
109
- showAdaptableOptions && (React.createElement(Radio_1.default, { "data-name": "radioButton-AdaptableOptions", marginRight: 3, value: "AdaptableOptions", checked: state.ActiveTab == 'AdaptableOptions', onChange: (_, e) => onShowGridSummaryChanged('AdaptableOptions') }, "Options")),
110
- showColumnInfo && (React.createElement(Radio_1.default, { "data-name": "radioButton-Column", marginRight: 3, value: "Column", checked: state.ActiveTab == 'ColumnInfo', onChange: (_, e) => onShowGridSummaryChanged('ColumnInfo') }, "Columns")),
111
- showAdaptableObjects && (React.createElement(Radio_1.default, { "data-name": "radioButton-Column", value: "Column", checked: state.ActiveTab == 'AdaptableObjectsSummary', onChange: (_, e) => onShowGridSummaryChanged('AdaptableObjectsSummary') }, "Objects"))))),
112
- state.ActiveTab == 'GridSummary' && (React.createElement(AdaptableObjectCollection_1.AdaptableObjectCollection, { margin: 2, colItems: propValueColItems, items: gridSummaries })),
113
- state.ActiveTab == 'AdaptableOptions' && React.createElement(AdaptableOptionsComponent_1.AdaptableOptionsComponent, { api: props.api }),
114
- state.ActiveTab == 'ColumnInfo' && (React.createElement(ColumnInfoComponent_1.ColumnInfoComponent, { api: props.api, teamSharingActivated: props.teamSharingActivated, column: state.CurrentColumn })),
115
- state.ActiveTab === 'AdaptableObjectsSummary' && React.createElement(AdaptableObjectsSummary_1.AdaptableObjectsSummary, null)));
107
+ React.createElement(rebass_1.Flex, { flexDirection: "column", flex: 1, height: "100%" },
108
+ React.createElement(rebass_1.Flex, { className: `${baseClassName}__header`, marginBottom: 2, padding: 3 }, showRadioButtons && (React.createElement(React.Fragment, null,
109
+ showGridSummary && (React.createElement(Radio_1.default, { className: `${baseClassName}__option-radio`, "data-name": "radioButton-GridSummary", marginRight: 3, value: "GridSummary", checked: state.ActiveTab == 'GridSummary', onChange: (_, e) => onShowGridSummaryChanged('GridSummary') }, "Summary")),
110
+ showAdaptableOptions && (React.createElement(Radio_1.default, { "data-name": "radioButton-AdaptableOptions", marginRight: 3, value: "AdaptableOptions", checked: state.ActiveTab == 'AdaptableOptions', onChange: (_, e) => onShowGridSummaryChanged('AdaptableOptions') }, "Options")),
111
+ showColumnInfo && (React.createElement(Radio_1.default, { "data-name": "radioButton-Column", marginRight: 3, value: "Column", checked: state.ActiveTab == 'ColumnInfo', onChange: (_, e) => onShowGridSummaryChanged('ColumnInfo') }, "Columns")),
112
+ showAdaptableObjects && (React.createElement(Radio_1.default, { "data-name": "radioButton-Column", value: "Column", checked: state.ActiveTab == 'AdaptableObjectsSummary', onChange: (_, e) => onShowGridSummaryChanged('AdaptableObjectsSummary') }, "Objects"))))),
113
+ state.ActiveTab == 'GridSummary' && (React.createElement(AdaptableObjectCollection_1.AdaptableObjectCollection, { margin: 2, colItems: propValueColItems, items: gridSummaries })),
114
+ state.ActiveTab == 'AdaptableOptions' && React.createElement(AdaptableOptionsComponent_1.AdaptableOptionsComponent, { api: props.api }),
115
+ state.ActiveTab == 'ColumnInfo' && (React.createElement(ColumnInfoComponent_1.ColumnInfoComponent, { api: props.api, teamSharingActivated: props.teamSharingActivated, column: state.CurrentColumn })),
116
+ state.ActiveTab === 'AdaptableObjectsSummary' && React.createElement(AdaptableObjectsSummary_1.AdaptableObjectsSummary, null))));
116
117
  };
117
118
  exports.GridInfoPopup = GridInfoPopup;
@@ -14,6 +14,6 @@ const LayoutRadioSelector = ({ data }) => {
14
14
  const handleToggle = React.useCallback(() => {
15
15
  adaptable.api.layoutApi.setLayout(data.Name);
16
16
  }, [isSelected]);
17
- return React.createElement(Radio_1.default, { id: data.Name, disabled: isDisabled, checked: isSelected, onClick: handleToggle });
17
+ return (React.createElement(Radio_1.default, { "data-name": "layout-select-button", "data-value": data.Name, disabled: isDisabled, checked: isSelected, onClick: handleToggle }));
18
18
  };
19
19
  exports.LayoutRadioSelector = LayoutRadioSelector;
@@ -15,5 +15,5 @@ declare class LayoutViewPanelComponent extends React.Component<LayoutViewPanelCo
15
15
  render(): any;
16
16
  private onSaveLayout;
17
17
  }
18
- export declare let LayoutViewPanelControl: import("react-redux").ConnectedComponent<typeof LayoutViewPanelComponent, import("react-redux").Omit<React.ClassAttributes<LayoutViewPanelComponent> & LayoutViewPanelComponentProps, "api" | "Layouts" | "moduleInfo" | "accessLevel" | "viewType" | "onSelectLayout" | "onSaveLayout" | "CurrentDraftLayout" | "CanSave" | "CurrentLayoutName"> & LayoutViewPanelComponentProps>;
18
+ export declare let LayoutViewPanelControl: import("react-redux").ConnectedComponent<typeof LayoutViewPanelComponent, import("react-redux").Omit<React.ClassAttributes<LayoutViewPanelComponent> & LayoutViewPanelComponentProps, "api" | "accessLevel" | "moduleInfo" | "Layouts" | "viewType" | "onSelectLayout" | "onSaveLayout" | "CurrentDraftLayout" | "CanSave" | "CurrentLayoutName"> & LayoutViewPanelComponentProps>;
19
19
  export {};
@@ -19,7 +19,7 @@ const ColumnLabels = (props) => {
19
19
  const flexProps = {
20
20
  [flexDirection === 'row' ? 'alignItems' : 'justifyContent']: 'center',
21
21
  };
22
- return (React.createElement(rebass_1.Flex, Object.assign({ flexDirection: flexDirection }, flexProps, { width: "100%" }),
22
+ return (React.createElement(rebass_1.Flex, Object.assign({ className: "ab-LayoutEditor__Legend", flexDirection: flexDirection }, flexProps, { width: "100%" }),
23
23
  showTitle ? (React.createElement(rebass_1.Text, { mr: 2 }, (0, AdaptableContext_1.useAdaptable)().api.internalApi.getCorrectEnglishVariant('Behaviours:'))) : null,
24
24
  labels.map((l, index) => {
25
25
  const enabled = !!l;
@@ -33,7 +33,7 @@ const AggregationsSectionSummary = () => {
33
33
  let content = null;
34
34
  if (entires.length) {
35
35
  content = (React.createElement(FormLayout_1.default, null, entires.map(([columnId, aggregation]) => (React.createElement(FormLayout_1.FormRow, { key: columnId, label: adaptable.api.columnApi.getFriendlyNameFromColumnId(columnId) },
36
- React.createElement(Tag_1.Tag, null, aggregation /* TODO fix for Bogdan */))))));
36
+ React.createElement(Tag_1.Tag, null, typeof aggregation === 'object' ? aggregation.type : aggregation))))));
37
37
  }
38
38
  else {
39
39
  content = React.createElement(Tag_1.Tag, null, "No Aggregations");