@adaptabletools/adaptable 13.0.0-canary.1 → 13.0.0-canary.11

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 (179) hide show
  1. package/agGrid.d.ts +23 -1
  2. package/agGrid.js +23 -1
  3. package/base.css +1 -0
  4. package/bundle.cjs.js +169 -169
  5. package/index.css +1 -0
  6. package/package.json +3 -3
  7. package/publishTimestamp.d.ts +1 -1
  8. package/publishTimestamp.js +1 -1
  9. package/src/AdaptableInterfaces/IAdaptable.d.ts +8 -3
  10. package/src/AdaptableOptions/AdaptableOptions.d.ts +0 -2
  11. package/src/AdaptableOptions/AdaptableQLOptions.d.ts +118 -26
  12. package/src/AdaptableOptions/FinsemblePluginOptions.d.ts +32 -0
  13. package/src/AdaptableOptions/FinsemblePluginOptions.js +2 -0
  14. package/src/AdaptableOptions/GeneralOptions.d.ts +5 -0
  15. package/src/Api/ConditionalStyleApi.d.ts +20 -42
  16. package/src/Api/ConfigApi.d.ts +1 -2
  17. package/src/Api/FinsembleApi.d.ts +10 -0
  18. package/src/Api/FinsembleApi.js +2 -0
  19. package/src/Api/FormatColumnApi.d.ts +47 -3
  20. package/src/Api/Implementation/ColumnApiImpl.js +5 -7
  21. package/src/Api/Implementation/DashboardApiImpl.js +2 -3
  22. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +18 -1
  23. package/src/Api/Implementation/FormatColumnApiImpl.js +98 -15
  24. package/src/Api/Implementation/InternalApiImpl.d.ts +1 -0
  25. package/src/Api/Implementation/InternalApiImpl.js +4 -0
  26. package/src/Api/Implementation/PluginsApiImpl.d.ts +2 -0
  27. package/src/Api/Implementation/PluginsApiImpl.js +6 -0
  28. package/src/Api/Implementation/QueryLanguageApiImpl.d.ts +2 -3
  29. package/src/Api/Implementation/QueryLanguageApiImpl.js +9 -18
  30. package/src/Api/Implementation/SystemStatusApiImpl.js +1 -2
  31. package/src/Api/Implementation/ToolPanelApiImpl.d.ts +3 -1
  32. package/src/Api/Implementation/ToolPanelApiImpl.js +8 -0
  33. package/src/Api/InternalApi.d.ts +1 -0
  34. package/src/Api/PluginsApi.d.ts +5 -0
  35. package/src/Api/QueryLanguageApi.d.ts +3 -7
  36. package/src/Api/ToolPanelApi.d.ts +10 -1
  37. package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +1 -1
  38. package/src/PredefinedConfig/Common/AdaptablePredicate.js +37 -37
  39. package/src/PredefinedConfig/ConditionalStyleState.d.ts +10 -19
  40. package/src/PredefinedConfig/FormatColumnState.d.ts +19 -6
  41. package/src/PredefinedConfig/PredefinedConfig.d.ts +1 -0
  42. package/src/Redux/ActionsReducers/FormatColumnRedux.d.ts +14 -0
  43. package/src/Redux/ActionsReducers/FormatColumnRedux.js +43 -1
  44. package/src/Redux/Store/AdaptableStore.js +2 -0
  45. package/src/Strategy/ConditionalStyleModule.d.ts +2 -0
  46. package/src/Strategy/ConditionalStyleModule.js +6 -0
  47. package/src/Strategy/DataChangeHistoryModule.d.ts +1 -0
  48. package/src/Strategy/DataChangeHistoryModule.js +12 -0
  49. package/src/Strategy/FormatColumnModule.d.ts +4 -9
  50. package/src/Strategy/FormatColumnModule.js +52 -2
  51. package/src/Strategy/Interface/IModule.d.ts +11 -10
  52. package/src/Strategy/Utilities/Alert/getAlertBehaviourViewItems.d.ts +2 -2
  53. package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.d.ts +1 -1
  54. package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +3 -4
  55. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +6 -11
  56. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.d.ts +3 -2
  57. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +3 -1
  58. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +1 -0
  59. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +3 -1
  60. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.d.ts +1 -0
  61. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +3 -1
  62. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.d.ts +1 -0
  63. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -1
  64. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -0
  65. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +3 -1
  66. package/src/Utilities/Extensions/TypeExtensions.d.ts +1 -0
  67. package/src/Utilities/Extensions/TypeExtensions.js +5 -0
  68. package/src/Utilities/ObjectFactory.js +0 -1
  69. package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +14 -4
  70. package/src/Utilities/Services/{LicenseService.d.ts → LicenseService/index.d.ts} +3 -3
  71. package/src/Utilities/Services/LicenseService/index.js +1 -0
  72. package/src/Utilities/Services/LicenseService/shouldLogThankYouMessage.d.ts +1 -0
  73. package/src/Utilities/Services/LicenseService/shouldLogThankYouMessage.js +15 -0
  74. package/src/Utilities/Services/QueryLanguageService.d.ts +3 -3
  75. package/src/Utilities/Services/QueryLanguageService.js +88 -39
  76. package/src/Utilities/license/LicenseDetails.d.ts +1 -1
  77. package/src/Utilities/license/decode.d.ts +1 -0
  78. package/src/Utilities/license/decode.js +1 -1
  79. package/src/View/AdaptablePopover/index.d.ts +2 -2
  80. package/src/View/AdaptableView.d.ts +3 -3
  81. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/Components/FormBox.d.ts +1 -1
  82. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.d.ts +1 -1
  83. package/src/View/AdaptableWizardView/index.d.ts +1 -1
  84. package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +3 -3
  85. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +3 -3
  86. package/src/View/ColorPicker.d.ts +1 -5
  87. package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
  88. package/src/View/Components/Buttons/ButtonEdit.d.ts +1 -1
  89. package/src/View/Components/EntityRulesEditor/index.d.ts +2 -1
  90. package/src/View/Components/EntityRulesEditor/index.js +29 -19
  91. package/src/View/Components/NewScopeComponent.js +2 -2
  92. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.d.ts +1 -1
  93. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.d.ts +2 -2
  94. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.d.ts +1 -1
  95. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +1 -0
  96. package/src/View/Components/Popups/AdaptablePopup/Navigation.d.ts +1 -1
  97. package/src/View/Components/Popups/AdaptablePopup/PopupPanel.d.ts +1 -1
  98. package/src/View/Components/Popups/AdaptablePopup/TopBar.d.ts +1 -1
  99. package/src/View/Components/Popups/AdaptablePopupPrompt.d.ts +1 -1
  100. package/src/View/Components/RangesComponent.d.ts +6 -0
  101. package/src/View/Components/RangesComponent.js +54 -18
  102. package/src/View/Components/ScopeComponent.js +2 -2
  103. package/src/View/Components/ToolPanel/AdaptableToolPanel.d.ts +4 -0
  104. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +5 -2
  105. package/src/View/ConditionalStyle/ConditionalStylePopupHeader.d.ts +2 -0
  106. package/src/View/ConditionalStyle/ConditionalStylePopupHeader.js +18 -0
  107. package/src/View/ConditionalStyle/Wizard/ConditionalStyleRuleWizardSection.js +3 -3
  108. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +3 -3
  109. package/src/View/FormatColumn/MoveFormatColumn.d.ts +7 -0
  110. package/src/View/FormatColumn/MoveFormatColumn.js +27 -0
  111. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +2 -2
  112. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +8 -0
  113. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +29 -0
  114. package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +21 -3
  115. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +0 -22
  116. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +18 -4
  117. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +15 -2
  118. package/src/View/FormatColumn/Wizard/constants.d.ts +1 -0
  119. package/src/View/FormatColumn/Wizard/constants.js +4 -0
  120. package/src/View/Layout/Wizard/sections/AggregationsSection.js +1 -1
  121. package/src/View/Layout/Wizard/sections/SettingsSection.d.ts +2 -2
  122. package/src/View/License/LicenseWatermark.d.ts +1 -1
  123. package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.js +1 -1
  124. package/src/View/StateManagement/components/ClearButton.d.ts +1 -1
  125. package/src/View/StateManagement/components/LoadButton.d.ts +1 -1
  126. package/src/View/StatusBar/StatusBarPanel.d.ts +4 -4
  127. package/src/View/Wizard/OnePageAdaptableWizard.d.ts +3 -3
  128. package/src/View/Wizard/OnePageAdaptableWizard.js +2 -2
  129. package/src/View/Wizard/OnePageWizards.d.ts +3 -3
  130. package/src/View/Wizard/OnePageWizards.js +2 -2
  131. package/src/agGrid/ActionColumnRenderer.d.ts +1 -0
  132. package/src/agGrid/ActionColumnRenderer.js +5 -5
  133. package/src/agGrid/Adaptable.d.ts +16 -2
  134. package/src/agGrid/Adaptable.js +167 -85
  135. package/src/agGrid/FilterWrapper.js +5 -5
  136. package/src/agGrid/FloatingFilterWrapper.js +3 -4
  137. package/src/agGrid/agGridHelper.js +12 -13
  138. package/src/agGrid/createAgStatusPanelComponent.d.ts +1 -0
  139. package/src/agGrid/createAgStatusPanelComponent.js +3 -3
  140. package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +1 -0
  141. package/src/agGrid/editors/AdaptableDateEditor/index.js +3 -3
  142. package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +1 -0
  143. package/src/agGrid/editors/AdaptableNumberEditor/index.js +3 -3
  144. package/src/components/CheckBox/index.d.ts +1 -1
  145. package/src/components/Datepicker/index.d.ts +1 -1
  146. package/src/components/Dialog/index.d.ts +4 -2
  147. package/src/components/Dialog/index.js +2 -2
  148. package/src/components/DropdownButton/index.d.ts +21 -4
  149. package/src/components/DropdownButton/index.js +5 -6
  150. package/src/components/ExpressionEditor/BaseEditorInput.d.ts +1 -1
  151. package/src/components/ExpressionEditor/EditorInput.js +1 -1
  152. package/src/components/ExpressionEditor/EditorInputWithWhereClause.js +1 -1
  153. package/src/components/Input/index.d.ts +1 -1
  154. package/src/components/List/ListGroupItem/index.d.ts +4 -2
  155. package/src/components/Loader/Loader.d.ts +2 -2
  156. package/src/components/Logo/index.d.ts +1 -1
  157. package/src/components/Modal/index.d.ts +1 -1
  158. package/src/components/PopupWithFooter.d.ts +2 -2
  159. package/src/components/ProgressIndicator/ProgressIndicator.d.ts +1 -1
  160. package/src/components/SelectList.d.ts +1 -1
  161. package/src/components/SimpleButton/index.d.ts +4 -5
  162. package/src/components/SimpleButton/index.js +3 -2
  163. package/src/components/StylePreview.d.ts +1 -1
  164. package/src/components/Tag/Tag.d.ts +1 -1
  165. package/src/components/Textarea/index.d.ts +6 -4
  166. package/src/components/ToggleButton/index.d.ts +1 -1
  167. package/src/components/WindowModal/WindowModal.d.ts +1 -1
  168. package/src/components/icons/index.d.ts +3 -2
  169. package/src/components/icons/layout.d.ts +2 -1
  170. package/src/components/utils/useContainerScrollObserver/index.d.ts +1 -1
  171. package/src/metamodel/adaptable.metamodel.d.ts +112 -64
  172. package/src/metamodel/adaptable.metamodel.js +1 -1
  173. package/src/parser/src/types.d.ts +6 -3
  174. package/src/renderReactRoot.d.ts +3 -0
  175. package/src/renderReactRoot.js +54 -0
  176. package/src/types.d.ts +4 -2
  177. package/version.d.ts +1 -1
  178. package/version.js +1 -1
  179. package/src/Utilities/Services/LicenseService.js +0 -1
@@ -111,6 +111,7 @@ const AdaptablePopupModuleView = (props) => {
111
111
  "s not available in current Layout")));
112
112
  };
113
113
  return (React.createElement(PopupPanel_1.PopupPanel, { glyphicon: moduleInfo.Glyph, infoLink: moduleInfo.HelpPage, headerText: moduleInfo.FriendlyName, button: newButton, infoLinkDisabled: !props.api.internalApi.isDocumentationLinksDisplayed() },
114
+ moduleViewProperties.HeaderComponent && React.createElement(moduleViewProperties.HeaderComponent, null),
114
115
  toggleButtonShowLayoutAssociatedObjects(),
115
116
  (items === null || items === void 0 ? void 0 : items.length) ? (React.createElement(AdaptableObjectList_1.AdaptableObjectList, { module: props.module, items: items })) : (React.createElement(EmptyContent_1.default, null, emptyContent !== null && emptyContent !== void 0 ? emptyContent : `Click 'New' to create a new ${moduleInfo.FriendlyName}`)),
116
117
  isWizardOpen && EditWizard && (React.createElement(EditWizard, { abObjectType: abObjectType, moduleInfo: moduleInfo, data: null, popupParams: props.popupParams, configEntities: null, onCloseWizard: handleWizardClose, onFinishWizard: handleWizardClose }))));
@@ -7,5 +7,5 @@ interface NavigationProps {
7
7
  activeItem: string;
8
8
  customSettingsPanels?: CustomSettingsPanel[];
9
9
  }
10
- export declare const Navigation: React.FunctionComponent<NavigationProps>;
10
+ export declare const Navigation: React.FunctionComponent<React.PropsWithChildren<NavigationProps>>;
11
11
  export {};
@@ -8,4 +8,4 @@ export interface PanelWithButtonProps {
8
8
  infoLink?: string;
9
9
  infoLinkDisabled?: boolean;
10
10
  }
11
- export declare const PopupPanel: React.FunctionComponent<PanelWithButtonProps>;
11
+ export declare const PopupPanel: React.FunctionComponent<React.PropsWithChildren<PanelWithButtonProps>>;
@@ -3,5 +3,5 @@ import { SettingsPanelOptions } from '../../../../AdaptableOptions/SettingsPanel
3
3
  interface TopBarProps {
4
4
  icon: SettingsPanelOptions['icon'];
5
5
  }
6
- export declare const TopBar: React.FunctionComponent<TopBarProps>;
6
+ export declare const TopBar: React.FunctionComponent<React.PropsWithChildren<TopBarProps>>;
7
7
  export default TopBar;
@@ -8,4 +8,4 @@ export interface AdaptablePopupPromptProps {
8
8
  onConfirmActionCreator?: (inputText: string) => Action;
9
9
  defaultValue?: string;
10
10
  }
11
- export declare const AdaptablePopupPrompt: React.FunctionComponent<AdaptablePopupPromptProps>;
11
+ export declare const AdaptablePopupPrompt: React.FunctionComponent<React.PropsWithChildren<AdaptablePopupPromptProps>>;
@@ -10,6 +10,10 @@ export interface RangesComponentProps extends React.ClassAttributes<RangesCompon
10
10
  showRangeDirection: boolean;
11
11
  updateRanges: (ranges: CellColorRange[]) => void;
12
12
  updateColumnComparison: (columnComparison?: ColumnComparison) => void;
13
+ minMaxRangeValues: {
14
+ min: number;
15
+ max: number;
16
+ };
13
17
  }
14
18
  export interface RangesComponentState {
15
19
  ranges: CellColorRange[];
@@ -25,6 +29,8 @@ export declare class RangesComponent extends React.Component<RangesComponentProp
25
29
  changeRangeColor(index: number, value: string): void;
26
30
  changeRangeDirectionUp(index: number, checked: boolean): void;
27
31
  removeRange(index: number): void;
32
+ setRangeColMin(range: CellColorRange): void;
33
+ setRangeColMax(range: CellColorRange): void;
28
34
  addRange(): void;
29
35
  changeColumnComparisonMinValue(event: React.FormEvent<any>): void;
30
36
  private onMinColumnSelectedChanged;
@@ -54,20 +54,25 @@ class RangesComponent extends React.Component {
54
54
  this.state.rangesType == 'Standard' && (React.createElement(Tabs_1.Tabs, { autoFocus: false, marginTop: 2 },
55
55
  React.createElement(Tabs_1.Tabs.Tab, null, "Ranges"),
56
56
  React.createElement(Tabs_1.Tabs.Content, null, (_a = this.state.ranges) === null || _a === void 0 ? void 0 :
57
- _a.map((range, index) => (React.createElement(rebass_1.Flex, { key: index, mb: 2, "data-name": "percent-bar-range" },
58
- React.createElement(Input_1.default, { type: "number", value: range.Min, onChange: (event) => {
59
- const { value } = event.target;
60
- this.changeRangeMin(index, value);
61
- }, mr: 2 }),
62
- React.createElement(Input_1.default, { type: "number", value: range.Max, onChange: (event) => {
63
- const { value } = event.target;
64
- this.changeRangeMax(index, value);
65
- }, mr: 2 }),
66
- React.createElement(ColorPicker_1.ColorPicker, { api: this.props.api, value: range.Color, onChange: (color) => {
67
- this.changeRangeColor(index, color);
68
- }, mr: 2, height: "100%" }),
69
- this.props.showRangeDirection && (React.createElement(CheckBox_1.CheckBox, { marginLeft: 2, marginRight: 2, checked: range.ReverseGradient && range.ReverseGradient == true, onChange: (checked) => this.changeRangeDirectionUp(index, checked) }, "Reverse Gradient")),
70
- React.createElement(SimpleButton_1.default, { icon: "delete", disabled: this.state.ranges && this.state.ranges.length == 1, onClick: () => this.removeRange(index) })))),
57
+ _a.map((range, index, list) => (React.createElement(React.Fragment, null,
58
+ React.createElement(rebass_1.Flex, { mb: 1 },
59
+ index === 0 && (React.createElement(CheckBox_1.CheckBox, { onClick: () => this.setRangeColMin(range), margin: 0, checked: range.Min === 'Col-Min', mr: 3 }, "Col Min")),
60
+ React.createElement(rebass_1.Box, null),
61
+ index === list.length - 1 && (React.createElement(CheckBox_1.CheckBox, { onClick: () => this.setRangeColMax(range), margin: 0, checked: range.Max === 'Col-Max' }, "Col Max"))),
62
+ React.createElement(rebass_1.Flex, { key: index, mb: 2, "data-name": "percent-bar-range" },
63
+ React.createElement(Input_1.default, { type: typeof range.Min == 'number' ? 'number' : 'text', disabled: range.Min === 'Col-Min', value: range.Min, onChange: (event) => {
64
+ const { value } = event.target;
65
+ this.changeRangeMin(index, value);
66
+ }, mr: 2 }),
67
+ React.createElement(Input_1.default, { value: range.Max, type: typeof range.Max == 'number' ? 'number' : 'text', disabled: range.Max === 'Col-Max', onChange: (event) => {
68
+ const { value } = event.target;
69
+ this.changeRangeMax(index, value);
70
+ }, mr: 2 }),
71
+ React.createElement(ColorPicker_1.ColorPicker, { api: this.props.api, value: range.Color, onChange: (color) => {
72
+ this.changeRangeColor(index, color);
73
+ }, mr: 2, height: "100%" }),
74
+ this.props.showRangeDirection && (React.createElement(CheckBox_1.CheckBox, { checked: range.ReverseGradient && range.ReverseGradient == true, onChange: (checked) => this.changeRangeDirectionUp(index, checked) }, "Reverse Gradient")),
75
+ React.createElement(SimpleButton_1.default, { ml: 2, icon: "delete", disabled: this.state.ranges && this.state.ranges.length == 1, onClick: () => this.removeRange(index) }))))),
71
76
  React.createElement("div", null,
72
77
  React.createElement(SimpleButton_1.default, { variant: "raised", "data-name": "add", onClick: () => this.addRange() }, "Add New Range"))))),
73
78
  this.state.rangesType == 'ColumnComparison' && (React.createElement(Tabs_1.Tabs, { autoFocus: false, marginTop: 2 },
@@ -144,14 +149,45 @@ class RangesComponent extends React.Component {
144
149
  ranges.splice(index, 1);
145
150
  this.props.updateRanges(ranges);
146
151
  }
152
+ setRangeColMin(range) {
153
+ const newRanges = this.state.ranges.map((rangeItem) => {
154
+ if (rangeItem === range) {
155
+ let newMin = rangeItem.Min === 'Col-Min' ? this.props.minMaxRangeValues.min : 'Col-Min';
156
+ return Object.assign(Object.assign({}, rangeItem), { Min: newMin });
157
+ }
158
+ return rangeItem;
159
+ });
160
+ this.setState({ ranges: newRanges }, () => this.props.updateRanges(this.state.ranges));
161
+ }
162
+ setRangeColMax(range) {
163
+ const newRanges = this.state.ranges.map((rangeItem) => {
164
+ if (rangeItem === range) {
165
+ let newMax = rangeItem.Max === 'Col-Max' ? this.props.minMaxRangeValues.max : 'Col-Max';
166
+ return Object.assign(Object.assign({}, rangeItem), { Max: newMax });
167
+ }
168
+ return rangeItem;
169
+ });
170
+ this.setState({ ranges: newRanges }, () => this.props.updateRanges(this.state.ranges));
171
+ }
147
172
  addRange() {
148
173
  const lastRange = this.state.ranges[this.state.ranges.length - 1];
149
- this.state.ranges.push({
150
- Min: lastRange.Max == 'Col-Max' ? 0 : lastRange.Max,
174
+ let previousRange = lastRange;
175
+ let Min = null;
176
+ if (lastRange.Max === 'Col-Max') {
177
+ Min = this.props.minMaxRangeValues.max;
178
+ previousRange = Object.assign(Object.assign({}, previousRange), { Max: this.props.minMaxRangeValues.max });
179
+ }
180
+ else {
181
+ Min = lastRange.Max;
182
+ }
183
+ const newRange = {
184
+ Min,
151
185
  Max: lastRange.Max,
152
186
  Color: (0, UIHelper_1.getHexForName)(UIHelper_1.GRAY),
153
- }),
154
- this.props.updateRanges(this.state.ranges);
187
+ };
188
+ const newRanges = [...this.state.ranges.slice(0, -1), previousRange, newRange];
189
+ // this.state.ranges.push(newRange);
190
+ this.setState({ ranges: newRanges }, () => this.props.updateRanges(this.state.ranges));
155
191
  }
156
192
  changeColumnComparisonMinValue(event) {
157
193
  let e = event.target;
@@ -32,9 +32,9 @@ class ScopeComponent extends React.Component {
32
32
  React.createElement(HelpBlock_1.default, { marginBottom: 1 }, displayMessage),
33
33
  ' ',
34
34
  React.createElement(rebass_1.Flex, { flexDirection: "row", alignItems: "center", padding: 2 },
35
- React.createElement(Radio_1.default, { value: "Row", checked: this.state.ScopeChoice == 'All', onChange: (checked, e) => this.onScopeSelectChanged(e) }, "Whole Row"),
35
+ React.createElement(Radio_1.default, { value: "Row", checked: this.state.ScopeChoice == 'All', onChange: (checked, e) => this.onScopeSelectChanged(e) }, "All Columns"),
36
36
  ' ',
37
- React.createElement(Radio_1.default, { marginLeft: 3, value: "Column", checked: this.state.ScopeChoice == 'Column', onChange: (checked, e) => this.onScopeSelectChanged(e) }, "Column(s)"),
37
+ React.createElement(Radio_1.default, { marginLeft: 3, value: "Column", checked: this.state.ScopeChoice == 'Column', onChange: (checked, e) => this.onScopeSelectChanged(e) }, "Selected Column(s)"),
38
38
  ' ',
39
39
  React.createElement(Radio_1.default, { marginLeft: 3, value: "DataType", checked: this.state.ScopeChoice == 'DataType', onChange: (checked, e) => this.onScopeSelectChanged(e) }, "DataType(s)")),
40
40
  this.state.ScopeChoice == 'Column' && (React.createElement(rebass_1.Box, { marginBottom: 2, "data-name": "column-scope" },
@@ -27,17 +27,21 @@ export declare const ConnectedAdaptableToolPanel: import("react-redux").Connecte
27
27
  export declare const getAdaptableToolPanelAgGridComponent: (adaptable?: IAdaptable) => {
28
28
  new (): {
29
29
  gui: HTMLElement;
30
+ unmountReactRoot?: VoidFunction;
30
31
  init(params?: IToolPanelParams): void;
31
32
  getGui(): HTMLElement;
32
33
  refresh(): void;
34
+ destroy(): void;
33
35
  };
34
36
  };
35
37
  export declare const AdaptableToolPanelAgGridComponent: {
36
38
  new (): {
37
39
  gui: HTMLElement;
40
+ unmountReactRoot?: VoidFunction;
38
41
  init(params?: IToolPanelParams): void;
39
42
  getGui(): HTMLElement;
40
43
  refresh(): void;
44
+ destroy(): void;
41
45
  };
42
46
  };
43
47
  export {};
@@ -7,7 +7,6 @@ const kebabCase_1 = tslib_1.__importDefault(require("lodash/kebabCase"));
7
7
  const ToolPanelRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/ToolPanelRedux"));
8
8
  const SystemRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/SystemRedux"));
9
9
  const react_redux_1 = require("react-redux");
10
- const react_dom_1 = require("react-dom");
11
10
  const rebass_1 = require("rebass");
12
11
  const ArrayExtensions_1 = tslib_1.__importDefault(require("../../../Utilities/Extensions/ArrayExtensions"));
13
12
  const icons_1 = require("../../../components/icons");
@@ -238,7 +237,7 @@ const getAdaptableToolPanelAgGridComponent = (adaptable) => {
238
237
  this.gui.className = 'ag-adaptable-panel';
239
238
  this.gui.style.width = '100%';
240
239
  this.gui.style.overflow = 'auto';
241
- (0, react_dom_1.render)((0, renderWithAdaptableContext_1.renderWithAdaptableContext)(React.createElement(exports.ConnectedAdaptableToolPanel, { api: api, teamSharingActivated: false }), Adaptable), this.gui);
240
+ this.unmountReactRoot = Adaptable.renderReactRoot((0, renderWithAdaptableContext_1.renderWithAdaptableContext)(React.createElement(exports.ConnectedAdaptableToolPanel, { api: api, teamSharingActivated: false }), Adaptable), this.gui);
242
241
  }
243
242
  getGui() {
244
243
  if (!this.gui) {
@@ -249,6 +248,10 @@ const getAdaptableToolPanelAgGridComponent = (adaptable) => {
249
248
  refresh() {
250
249
  // no refresh logic needed
251
250
  }
251
+ destroy() {
252
+ var _a;
253
+ (_a = this.unmountReactRoot) === null || _a === void 0 ? void 0 : _a.call(this);
254
+ }
252
255
  };
253
256
  };
254
257
  exports.getAdaptableToolPanelAgGridComponent = getAdaptableToolPanelAgGridComponent;
@@ -0,0 +1,2 @@
1
+ import * as React from 'react';
2
+ export declare const ConditionalStylePopupHeader: React.FunctionComponent;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConditionalStylePopupHeader = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = tslib_1.__importStar(require("react"));
6
+ const HelpBlock_1 = tslib_1.__importDefault(require("../../components/HelpBlock"));
7
+ const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
8
+ const AdaptableContext_1 = require("../AdaptableContext");
9
+ const ConditionalStylePopupHeader = () => {
10
+ const adaptable = (0, AdaptableContext_1.useAdaptable)();
11
+ return (React.createElement(HelpBlock_1.default, null,
12
+ "Conditional Styles are deprecated, use",
13
+ ' ',
14
+ React.createElement(SimpleButton_1.default, { onClick: () => adaptable.api.settingsPanelApi.showSettingsPanel('FormatColumn'), variant: "outlined" }, "Format Columns"),
15
+ ' ',
16
+ "instead."));
17
+ };
18
+ exports.ConditionalStylePopupHeader = ConditionalStylePopupHeader;
@@ -28,15 +28,15 @@ function ConditionalStyleRuleWizardSection(props) {
28
28
  useBooleanQuery: (React.createElement(React.Fragment, null,
29
29
  "Use an BooleanQuery if ",
30
30
  React.createElement("i", null, "Scope"),
31
- " is 'Whole Row' - so any data change may be evaluated in a complex BooleanExpression")),
31
+ " is 'All Columns' - so any data change may be evaluated in a complex BooleanExpression")),
32
32
  useObservableQuery: (React.createElement(React.Fragment, null,
33
33
  "Use an ObservableQuery if ",
34
34
  React.createElement("i", null, "Scope"),
35
- " is 'Whole Row' - so any data change may be evaluated in a complex ObservableExpression")),
35
+ " is 'All Columns' - so any data change may be evaluated in a complex ObservableExpression")),
36
36
  useAggregationQuery: (React.createElement(React.Fragment, null,
37
37
  "Use an AggregatedBooleanQuery if ",
38
38
  React.createElement("i", null, "Scope"),
39
- " is 'Whole Row' - so any data change may be evaluated in a complex AggregatedBooleanExpression")),
39
+ " is 'All Columns' - so any data change may be evaluated in a complex AggregatedBooleanExpression")),
40
40
  } })));
41
41
  }
42
42
  exports.ConditionalStyleRuleWizardSection = ConditionalStyleRuleWizardSection;
@@ -36,15 +36,15 @@ const FlashingAlertRulesWizardSection = (props) => {
36
36
  useBooleanQuery: (React.createElement(React.Fragment, null,
37
37
  "Use an BooleanQuery if ",
38
38
  React.createElement("i", null, "Scope"),
39
- " is 'Whole Row' - so any data change may be evaluated in a complex BooleanExpression")),
39
+ " is 'All Columns' - so any data change may be evaluated in a complex BooleanExpression")),
40
40
  useObservableQuery: (React.createElement(React.Fragment, null,
41
41
  "Use an ObservableQuery if ",
42
42
  React.createElement("i", null, "Scope"),
43
- " is 'Whole Row' - so any data change may be evaluated in a complex ObservableExpression")),
43
+ " is 'All Columns' - so any data change may be evaluated in a complex ObservableExpression")),
44
44
  useAggregationQuery: (React.createElement(React.Fragment, null,
45
45
  "Use an AggregatedBooleanQuery if ",
46
46
  React.createElement("i", null, "Scope"),
47
- " is 'Whole Row' - so any data change may be evaluated in a complex AggregatedBooleanExpression")),
47
+ " is 'All Columns' - so any data change may be evaluated in a complex AggregatedBooleanExpression")),
48
48
  } }));
49
49
  };
50
50
  exports.FlashingAlertRulesWizardSection = FlashingAlertRulesWizardSection;
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import { AccessLevel, FormatColumn } from '../../types';
3
+ export declare const MoveFormatColumn: React.FunctionComponent<{
4
+ data: FormatColumn;
5
+ id?: string;
6
+ accessLevel: AccessLevel;
7
+ }>;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MoveFormatColumn = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = tslib_1.__importStar(require("react"));
6
+ const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
7
+ const FormatColumnRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/FormatColumnRedux"));
8
+ const react_redux_1 = require("react-redux");
9
+ const AdaptableContext_1 = require("../AdaptableContext");
10
+ const MoveFormatColumn = (props) => {
11
+ const dispatch = (0, react_redux_1.useDispatch)();
12
+ const adaptable = (0, AdaptableContext_1.useAdaptable)();
13
+ const formatColumn = adaptable.api.formatColumnApi.getAllFormatColumn();
14
+ const handleMoveUp = React.useCallback(() => {
15
+ dispatch(FormatColumnRedux.FormatColumnMoveUp(props.data));
16
+ }, []);
17
+ const handleMoveDown = React.useCallback(() => {
18
+ dispatch(FormatColumnRedux.FormatColumnMoveDown(props.data));
19
+ }, []);
20
+ if ((formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.length) <= 1) {
21
+ return React.createElement(React.Fragment, null);
22
+ }
23
+ return (React.createElement(React.Fragment, null,
24
+ React.createElement(SimpleButton_1.default, { "data-id": "move-up", title: "move up", onClick: handleMoveUp, variant: "text", icon: "arrow-up" }),
25
+ React.createElement(SimpleButton_1.default, { "data-name": "move-down", title: "move down", onClick: handleMoveDown, variant: "text", icon: "arrow-down" })));
26
+ };
27
+ exports.MoveFormatColumn = MoveFormatColumn;
@@ -125,7 +125,7 @@ const getFormatDisplayTypeForScope = (scope, api) => {
125
125
  }
126
126
  // need to see if all columns are numeric or date
127
127
  if ('ColumnIds' in scope) {
128
- const columns = scope.ColumnIds.map((c) => api.columnApi.getColumnFromId(c));
128
+ const columns = scope.ColumnIds.map((c) => api.columnApi.getColumnFromId(c)).filter(Boolean);
129
129
  const columnDataTypes = (0, uniq_1.default)(columns.map((c) => c.dataType));
130
130
  if (columnDataTypes.length == 1 && columnDataTypes[0] == 'Number') {
131
131
  return 'Number';
@@ -389,7 +389,7 @@ const FormatColumnFormatWizardSection = (props) => {
389
389
  return renderStringFormat(data, update, setFormatOption, customScopedFormatters, formatColumnApi);
390
390
  }
391
391
  return (React.createElement(HelpBlock_1.default, { margin: 3 },
392
- "Setting a Display Format is only available if ",
392
+ "Setting a Display Format is only possible if ",
393
393
  React.createElement("b", null, "all"),
394
394
  " the columns in Scope are Numeric, String or Date."));
395
395
  };
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { FormatColumn } from '../../../../types';
3
+ declare type FormatColumnRuleWizardSectionProps = {
4
+ onChange: (data: FormatColumn) => void;
5
+ defaultPredicateId: string;
6
+ };
7
+ export declare function FormatColumnRuleWizardSection(props: FormatColumnRuleWizardSectionProps): JSX.Element;
8
+ export {};
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FormatColumnRuleWizardSection = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = tslib_1.__importStar(require("react"));
6
+ const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
7
+ const EntityRulesEditor_1 = require("../../Components/EntityRulesEditor");
8
+ function FormatColumnRuleWizardSection(props) {
9
+ const { data, api, moduleInfo } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
10
+ const hasIncompatibleStyle = Boolean(data.ColumnStyle);
11
+ return (React.createElement(EntityRulesEditor_1.EntityRulesEditor, { module: moduleInfo.ModuleName, defaultPredicateId: props.defaultPredicateId,
12
+ // TODO see what is this
13
+ predicateDefs: api.formatColumnApi.getFormatColumnDefsForScope(data.Scope), showNoRule: true, showBoolean: !hasIncompatibleStyle, showAggregation: false, showObservable: false, showPredicate: !hasIncompatibleStyle && !api.scopeApi.scopeIsAll(data.Scope), data: data, onChange: (formatColumn) => props.onChange(formatColumn), descriptions: {
14
+ selectPredicate: 'Select a Format Column Rule - to be applied when data changes',
15
+ useBooleanQuery: (React.createElement(React.Fragment, null,
16
+ "Use an BooleanQuery if ",
17
+ React.createElement("i", null, "Scope"),
18
+ " is 'All Columns' - so any data change may be evaluated in a complex BooleanExpression")),
19
+ useObservableQuery: (React.createElement(React.Fragment, null,
20
+ "Use an ObservableQuery if ",
21
+ React.createElement("i", null, "Scope"),
22
+ " is 'All Columns' - so any data change may be evaluated in a complex ObservableExpression")),
23
+ useAggregationQuery: (React.createElement(React.Fragment, null,
24
+ "Use an AggregatedBooleanQuery if ",
25
+ React.createElement("i", null, "Scope"),
26
+ " is 'All Columns' - so any data change may be evaluated in a complex AggregatedBooleanExpression")),
27
+ } }));
28
+ }
29
+ exports.FormatColumnRuleWizardSection = FormatColumnRuleWizardSection;
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const NewScopeComponent_1 = require("../../Components/NewScopeComponent");
7
7
  const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
8
+ const constants_1 = require("./constants");
8
9
  const renderFormatColumnScopeSummary = (data) => {
9
10
  return (0, NewScopeComponent_1.renderScopeSummary)(data.Scope, {
10
11
  scopeWholeRow: 'Matching rows will be formatted',
@@ -14,12 +15,29 @@ const renderFormatColumnScopeSummary = (data) => {
14
15
  };
15
16
  exports.renderFormatColumnScopeSummary = renderFormatColumnScopeSummary;
16
17
  const FormatColumnScopeWizardSection = (props) => {
17
- const { data } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
18
+ const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
18
19
  return (React.createElement(NewScopeComponent_1.NewScopeComponent, { descriptions: {
19
- rowScope: 'Apply a style to an entire row',
20
+ rowScope: 'Format all columns in the row',
20
21
  columnScope: 'Select columns to format',
21
22
  }, scope: data.Scope, updateScope: (Scope) => {
22
- props.onChange(Object.assign(Object.assign({}, data), { Scope }));
23
+ var _a;
24
+ const newData = Object.assign(Object.assign({}, data), { Scope });
25
+ const wholeRow = api.scopeApi.scopeIsAll(Scope);
26
+ if ((_a = newData.Rule) === null || _a === void 0 ? void 0 : _a.Predicate) {
27
+ if (wholeRow) {
28
+ // if scope is whole row, a predicate cannot be present, so we set the rule
29
+ // to be a boolean expression
30
+ delete newData.Rule.Predicate;
31
+ newData.Rule.BooleanExpression = '';
32
+ }
33
+ else {
34
+ // if scope is not whole row, if you have a predicate, reset it
35
+ newData.Rule.Predicate = {
36
+ PredicateId: constants_1.DEFAULT_PREDICATE_ID_FOR_FORMAT_COLUMN,
37
+ };
38
+ }
39
+ }
40
+ props.onChange(newData);
23
41
  } }));
24
42
  };
25
43
  exports.FormatColumnScopeWizardSection = FormatColumnScopeWizardSection;
@@ -6,13 +6,9 @@ const React = tslib_1.__importStar(require("react"));
6
6
  const rebass_1 = require("rebass");
7
7
  const DropdownButton_1 = tslib_1.__importDefault(require("../../../components/DropdownButton"));
8
8
  const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
9
- const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
10
9
  const CheckBox_1 = require("../../../components/CheckBox");
11
10
  const Tabs_1 = require("../../../components/Tabs");
12
11
  const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
13
- const StringExtensions_1 = tslib_1.__importDefault(require("../../../Utilities/Extensions/StringExtensions"));
14
- const react_1 = require("react");
15
- const LoggingHelper_1 = require("../../../Utilities/Helpers/LoggingHelper");
16
12
  const Tag_1 = require("../../../components/Tag");
17
13
  let alignmentOptions = [
18
14
  { value: 'Left', label: 'Left' },
@@ -25,9 +21,6 @@ const renderFormatColumnSettingsSummary = (data) => {
25
21
  React.createElement(rebass_1.Text, null,
26
22
  "Cell alignment ",
27
23
  React.createElement(Tag_1.Tag, null, (_a = data.CellAlignment) !== null && _a !== void 0 ? _a : 'default')),
28
- data.HeaderName ? (React.createElement(rebass_1.Text, { mt: 3 },
29
- "Header name ",
30
- React.createElement(Tag_1.Tag, null, data.HeaderName))) : null,
31
24
  React.createElement(rebass_1.Text, { mt: 3 },
32
25
  "Include grouped rows ",
33
26
  React.createElement(Tag_1.Tag, null, data.IncludeGroupedRows ? 'yes' : 'no'))));
@@ -41,18 +34,6 @@ const FormatColumnSettingsWizardSection = (props) => {
41
34
  const onIncludeGroupedRowsChanged = (IncludeGroupedRows) => {
42
35
  props.onChange(Object.assign(Object.assign({}, data), { IncludeGroupedRows }));
43
36
  };
44
- const onHeaderNameChanged = (event) => {
45
- let e = event.target;
46
- props.onChange(Object.assign(Object.assign({}, data), { HeaderName: e.value }));
47
- };
48
- const [hasHeaderName, setHasHeaderName] = (0, react_1.useState)(false);
49
- (0, react_1.useEffect)(() => {
50
- const hasCustomHeaderName = StringExtensions_1.default.IsNotNullOrEmpty(data.HeaderName);
51
- setHasHeaderName(hasCustomHeaderName);
52
- if (hasCustomHeaderName) {
53
- (0, LoggingHelper_1.ConsoleLogWarning)(`DEPRECATED: The 'FormatColumn.HeaderName' property is deprecated; use a Layout custom Column Header instead!`);
54
- }
55
- }, []);
56
37
  return (React.createElement(Tabs_1.Tabs, null,
57
38
  React.createElement(Tabs_1.Tabs.Tab, null, "Format"),
58
39
  React.createElement(Tabs_1.Tabs.Content, null,
@@ -70,9 +51,6 @@ const FormatColumnSettingsWizardSection = (props) => {
70
51
  label: item.label,
71
52
  onClick: () => onCellAlignmentSelectChanged(item.value),
72
53
  })), columns: ['label'] }, data.CellAlignment ? data.CellAlignment : 'Select Option')),
73
- hasHeaderName && api.scopeApi.isSingleColumnScope(data.Scope) && (React.createElement(FormLayout_1.FormRow, { label: "Header Name" },
74
- React.createElement(Input_1.default, { value: data.HeaderName, onChange: (e) => onHeaderNameChanged(e), style: { minWidth: '15rem' } }),
75
- ' ')),
76
54
  React.createElement(FormLayout_1.FormRow, { label: "Include Grouped Rows:" },
77
55
  React.createElement(rebass_1.Flex, { alignItems: "center", marginLeft: 2 },
78
56
  React.createElement(CheckBox_1.CheckBox, { checked: data.IncludeGroupedRows, onChange: onIncludeGroupedRowsChanged, mr: 2 }))))))));
@@ -22,7 +22,6 @@ const isFormatColumnStyleValid = (data, api) => {
22
22
  data.Style &&
23
23
  UIHelper_1.default.IsEmptyStyle(data.Style) &&
24
24
  data.DisplayFormat === undefined &&
25
- data.HeaderName === undefined &&
26
25
  data.CellAlignment === undefined &&
27
26
  !api.scopeApi.isSingleBooleanColumnScope(data.Scope)) {
28
27
  return 'No format applied';
@@ -114,6 +113,20 @@ function FormatColumnStyleWizardSection(props) {
114
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;
115
114
  const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
116
115
  const singleNumericColumn = api.scopeApi.isSingleNumericColumnScope(data.Scope);
116
+ const minMaxRangeValues = React.useMemo(() => {
117
+ if (!singleNumericColumn) {
118
+ return null;
119
+ }
120
+ if (!('ColumnIds' in data.Scope)) {
121
+ return null;
122
+ }
123
+ const [columnId] = data.Scope.ColumnIds;
124
+ const column = api.columnApi.getColumnFromId(columnId);
125
+ return {
126
+ min: api.columnApi.getMinValueForNumericColumn(column),
127
+ max: api.columnApi.getMaxValueForNumericColumn(column),
128
+ };
129
+ }, [singleNumericColumn]);
117
130
  const onlyBooleanColumnsInScope = api.scopeApi.areAllBooleanColumnsInScope(data.Scope) ||
118
131
  api.scopeApi.scopeHasOnlyBooleanDataType(data.Scope);
119
132
  const onPercentBarCellTextCellValueChanged = (checked) => {
@@ -278,6 +291,7 @@ function FormatColumnStyleWizardSection(props) {
278
291
  props.onChange(newData);
279
292
  }
280
293
  };
294
+ const onlyStandardStyleAvailable = Boolean(data.Rule);
281
295
  return (React.createElement(React.Fragment, null,
282
296
  onlyBooleanColumnsInScope && (React.createElement(Tabs_1.Tabs, null,
283
297
  React.createElement(Tabs_1.Tabs.Tab, null, "CheckBox Column"),
@@ -293,7 +307,7 @@ function FormatColumnStyleWizardSection(props) {
293
307
  }
294
308
  props.onChange(formatColumn);
295
309
  } }, "Display Column As CheckBox")))),
296
- singleNumericColumn ? (React.createElement(React.Fragment, null,
310
+ singleNumericColumn && !onlyStandardStyleAvailable ? (React.createElement(React.Fragment, null,
297
311
  React.createElement(Tabs_1.Tabs, null,
298
312
  React.createElement(Tabs_1.Tabs.Tab, null, "Create a Format Column Style"),
299
313
  React.createElement(Tabs_1.Tabs.Content, null,
@@ -306,9 +320,9 @@ function FormatColumnStyleWizardSection(props) {
306
320
  "Percent Bar",
307
321
  ' '),
308
322
  ' '))),
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) })),
323
+ ((_d = data.ColumnStyle) === null || _d === void 0 ? void 0 : _d.GradientStyle) && (React.createElement(RangesComponent_1.RangesComponent, { minMaxRangeValues: minMaxRangeValues, 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
324
  ((_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) }),
325
+ React.createElement(RangesComponent_1.RangesComponent, { minMaxRangeValues: minMaxRangeValues, 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
326
  React.createElement(FormLayout_1.default, { marginLeft: 2, marginTop: 2 },
313
327
  React.createElement(FormLayout_1.FormRow, { label: "Cell Display:" },
314
328
  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"),
@@ -17,6 +17,9 @@ const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/Obje
17
17
  const react_redux_1 = require("react-redux");
18
18
  const FormatColumnRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/FormatColumnRedux"));
19
19
  const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
20
+ const EntityRulesEditor_1 = require("../../Components/EntityRulesEditor");
21
+ const FormatColumnRuleWizardSection_1 = require("./FormatColumnRuleWizardSection");
22
+ const constants_1 = require("./constants");
20
23
  const adjustDisplayFormat = (formatColumn, api) => {
21
24
  formatColumn = Object.assign({}, formatColumn);
22
25
  const formatDataType = (0, FormatColumnFormatWizardSection_1.getFormatDisplayTypeForScope)(formatColumn.Scope, api);
@@ -105,7 +108,7 @@ function FormatColumnWizard(props) {
105
108
  return (React.createElement(OnePageAdaptableWizard_1.OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, data: formatColumn, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
106
109
  {
107
110
  title: 'Scope',
108
- details: 'Apply formatting to: one or more Columns or Data Types or the whole row',
111
+ details: 'Select which Columns will be formatted',
109
112
  isValid: NewScopeComponent_1.isScopeValid,
110
113
  renderSummary: FormatColumnScopeWizardSection_1.renderFormatColumnScopeSummary,
111
114
  render: () => {
@@ -113,9 +116,19 @@ function FormatColumnWizard(props) {
113
116
  React.createElement(FormatColumnScopeWizardSection_1.FormatColumnScopeWizardSection, { onChange: setFormatColumn })));
114
117
  },
115
118
  },
119
+ {
120
+ isValid: (abObject, api, context) => {
121
+ return abObject.Rule ? (0, EntityRulesEditor_1.isRuleValid)(abObject, api, context) : true;
122
+ },
123
+ title: 'Condition',
124
+ details: 'Build a Rule when the Format Column should be applied',
125
+ render: () => {
126
+ return (React.createElement(FormatColumnRuleWizardSection_1.FormatColumnRuleWizardSection, { onChange: setFormatColumn, defaultPredicateId: constants_1.DEFAULT_PREDICATE_ID_FOR_FORMAT_COLUMN }));
127
+ },
128
+ },
116
129
  {
117
130
  title: 'Style',
118
- details: 'Format Column Style',
131
+ details: 'Create a Style for the Format Column',
119
132
  isValid: FormatColumnStyleWizardSection_1.isFormatColumnStyleValid,
120
133
  renderSummary: FormatColumnStyleWizardSection_1.renderFormatColumnStyleWizardSummary,
121
134
  render: () => {
@@ -0,0 +1 @@
1
+ export declare const DEFAULT_PREDICATE_ID_FOR_FORMAT_COLUMN = "NonBlanks";
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DEFAULT_PREDICATE_ID_FOR_FORMAT_COLUMN = void 0;
4
+ exports.DEFAULT_PREDICATE_ID_FOR_FORMAT_COLUMN = 'NonBlanks';
@@ -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))))));
36
+ React.createElement(Tag_1.Tag, null, aggregation /* TODO fix for Bogdan */))))));
37
37
  }
38
38
  else {
39
39
  content = React.createElement(Tag_1.Tag, null, "No Aggregations");
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import { Layout } from '../../../../../types';
3
- export declare const SettingsSectionSummary: React.FunctionComponent;
3
+ export declare const SettingsSectionSummary: React.FunctionComponent<React.PropsWithChildren<unknown>>;
4
4
  interface SettingsSectionProps {
5
5
  onChange: (data: Layout) => void;
6
6
  }
7
- export declare const SettingsSection: React.FunctionComponent<SettingsSectionProps>;
7
+ export declare const SettingsSection: React.FunctionComponent<React.PropsWithChildren<SettingsSectionProps>>;
8
8
  export {};
@@ -1,2 +1,2 @@
1
1
  import * as React from 'react';
2
- export declare const LicenseWatermark: React.FunctionComponent;
2
+ export declare const LicenseWatermark: React.FunctionComponent<React.PropsWithChildren<unknown>>;