@adaptabletools/adaptable 14.0.2 → 14.0.4

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 (216) hide show
  1. package/base.css +7 -1
  2. package/base.css.map +1 -1
  3. package/bundle.cjs.js +170 -169
  4. package/index.css +76 -62
  5. package/index.css.map +1 -1
  6. package/package.json +2 -2
  7. package/publishTimestamp.d.ts +1 -1
  8. package/publishTimestamp.js +1 -1
  9. package/src/AdaptableOptions/ActionOptions.d.ts +3 -0
  10. package/src/AdaptableOptions/AdaptablePlugin.d.ts +3 -0
  11. package/src/AdaptableOptions/AdaptablePlugin.js +3 -0
  12. package/src/AdaptableOptions/AdaptableQLOptions.d.ts +6 -5
  13. package/src/AdaptableOptions/ChartingOptions.d.ts +1 -1
  14. package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +26 -26
  15. package/src/AdaptableOptions/ExportOptions.d.ts +17 -3
  16. package/src/AdaptableOptions/ExpressionOptions.d.ts +18 -18
  17. package/src/AdaptableOptions/PredicateOptions.d.ts +4 -4
  18. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +5 -3
  19. package/src/Api/ActionApi.d.ts +2 -2
  20. package/src/Api/CalculatedColumnApi.d.ts +9 -0
  21. package/src/Api/ChartingApi.d.ts +41 -14
  22. package/src/Api/ColumnApi.d.ts +4 -0
  23. package/src/Api/DataSetApi.d.ts +2 -2
  24. package/src/Api/EventApi.d.ts +15 -1
  25. package/src/Api/Events/ChartStateChangeInfo.d.ts +5 -0
  26. package/src/Api/Events/ChartStateChangeInfo.js +2 -0
  27. package/src/Api/ExportApi.d.ts +5 -0
  28. package/src/Api/FilterApi.d.ts +10 -8
  29. package/src/Api/Implementation/ActionApiImpl.d.ts +1 -1
  30. package/src/Api/Implementation/ActionApiImpl.js +3 -3
  31. package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +2 -0
  32. package/src/Api/Implementation/CalculatedColumnApiImpl.js +24 -0
  33. package/src/Api/Implementation/ChartingApiImpl.d.ts +16 -2
  34. package/src/Api/Implementation/ChartingApiImpl.js +54 -2
  35. package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -0
  36. package/src/Api/Implementation/ColumnApiImpl.js +3 -0
  37. package/src/Api/Implementation/ExportApiImpl.d.ts +2 -0
  38. package/src/Api/Implementation/ExportApiImpl.js +10 -0
  39. package/src/Api/Implementation/FilterApiImpl.js +0 -2
  40. package/src/Api/Implementation/PredicateApiImpl.d.ts +6 -4
  41. package/src/Api/Implementation/PredicateApiImpl.js +20 -1
  42. package/src/Api/Implementation/QueryApiImpl.js +8 -2
  43. package/src/Api/Internal/AdaptableInternalApi.d.ts +7 -1
  44. package/src/Api/Internal/AdaptableInternalApi.js +2 -1
  45. package/src/Api/Internal/AlertInternalApi.js +1 -1
  46. package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +2 -0
  47. package/src/Api/Internal/CalculatedColumnInternalApi.js +9 -0
  48. package/src/Api/Internal/ChartingInternalApi.d.ts +6 -0
  49. package/src/Api/Internal/ChartingInternalApi.js +24 -0
  50. package/src/Api/Internal/FormatColumnInternalApi.d.ts +5 -0
  51. package/src/Api/Internal/FormatColumnInternalApi.js +25 -1
  52. package/src/Api/PredicateApi.d.ts +17 -1
  53. package/src/PredefinedConfig/AlertState.d.ts +5 -2
  54. package/src/PredefinedConfig/Common/AdaptableAlert.d.ts +6 -0
  55. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +15 -11
  56. package/src/PredefinedConfig/Common/AdaptableForm.d.ts +6 -0
  57. package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
  58. package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +6 -0
  59. package/src/PredefinedConfig/Common/AdaptableQuery.d.ts +15 -0
  60. package/src/PredefinedConfig/Common/Enums.d.ts +2 -1
  61. package/src/PredefinedConfig/Common/Enums.js +1 -0
  62. package/src/PredefinedConfig/Common/FDC3Context.d.ts +3 -0
  63. package/src/PredefinedConfig/Common/Types.d.ts +21 -6
  64. package/src/PredefinedConfig/Common/Types.js +1 -3
  65. package/src/PredefinedConfig/ExportState.d.ts +2 -2
  66. package/src/PredefinedConfig/FlashingCellState.d.ts +2 -2
  67. package/src/PredefinedConfig/FormatColumnState.d.ts +3 -2
  68. package/src/PredefinedConfig/FreeTextColumnState.d.ts +1 -1
  69. package/src/PredefinedConfig/PredefinedConfig.d.ts +4 -4
  70. package/src/PredefinedConfig/StyledColumnState.d.ts +1 -1
  71. package/src/PredefinedConfig/ThemeState.d.ts +0 -4
  72. package/src/Redux/ActionsReducers/PopupRedux.d.ts +2 -0
  73. package/src/Redux/ActionsReducers/PopupRedux.js +2 -0
  74. package/src/Redux/ActionsReducers/StatusBarRedux.d.ts +2 -2
  75. package/src/Redux/ActionsReducers/StatusBarRedux.js +4 -4
  76. package/src/Redux/Store/AdaptableStore.js +1 -11
  77. package/src/Strategy/AlertModule.js +7 -3
  78. package/src/Strategy/ChartingModule.js +5 -3
  79. package/src/Strategy/ExportModule.d.ts +1 -0
  80. package/src/Strategy/ExportModule.js +43 -0
  81. package/src/Strategy/FlashingCellModule.js +1 -1
  82. package/src/Strategy/FormatColumnModule.js +7 -2
  83. package/src/Strategy/Interface/IModule.d.ts +1 -1
  84. package/src/Strategy/LayoutModule.js +8 -1
  85. package/src/Strategy/StyledColumnModule.js +5 -0
  86. package/src/Strategy/ThemeModule.js +8 -2
  87. package/src/Strategy/Utilities/Alert/getAlertPreviewViewItems.js +2 -2
  88. package/src/Strategy/Utilities/Alert/getAlertTypeViewItems.d.ts +5 -0
  89. package/src/Strategy/Utilities/Alert/getAlertTypeViewItems.js +13 -0
  90. package/src/Strategy/Utilities/getObjectTagsViewItems.js +3 -3
  91. package/src/Utilities/Constants/ModuleConstants.d.ts +0 -3
  92. package/src/Utilities/Constants/ModuleConstants.js +2 -5
  93. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +2 -1
  94. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.d.ts +1 -1
  95. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +3 -1
  96. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +1 -1
  97. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +64 -3
  98. package/src/Utilities/Interface/MessagePopups.d.ts +1 -0
  99. package/src/Utilities/Services/AggregatedScalarLiveValue.js +13 -0
  100. package/src/Utilities/Services/ChartingService.d.ts +8 -0
  101. package/src/Utilities/Services/ChartingService.js +15 -0
  102. package/src/Utilities/Services/ReportService.js +1 -1
  103. package/src/View/AdaptableViewFactory.js +1 -1
  104. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +5 -4
  105. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsActionColumnsForm.js +1 -1
  106. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.js +6 -5
  107. package/src/View/Alert/Utilities/getAlertType.d.ts +15 -0
  108. package/src/View/Alert/Utilities/getAlertType.js +58 -0
  109. package/src/View/Alert/Utilities/getAvailablePredicates.d.ts +3 -0
  110. package/src/View/Alert/Utilities/getAvailablePredicates.js +19 -0
  111. package/src/View/Alert/Utilities/getDefaultAlertDefinition.d.ts +37 -0
  112. package/src/View/Alert/Utilities/getDefaultAlertDefinition.js +32 -0
  113. package/src/View/Alert/Utilities/mapAlertDefinition.d.ts +2 -0
  114. package/src/View/Alert/Utilities/mapAlertDefinition.js +38 -0
  115. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.d.ts +4 -2
  116. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +18 -11
  117. package/src/View/Alert/Wizard/AlertButtonsEditor.d.ts +2 -0
  118. package/src/View/Alert/Wizard/AlertButtonsEditor.js +15 -6
  119. package/src/View/Alert/Wizard/AlertMessageWizardSection.d.ts +10 -0
  120. package/src/View/Alert/Wizard/AlertMessageWizardSection.js +57 -0
  121. package/src/View/Alert/Wizard/{AlertDisplayWizardSection.d.ts → AlertNotificationWizardSection.d.ts} +7 -5
  122. package/src/View/Alert/Wizard/{AlertDisplayWizardSection.js → AlertNotificationWizardSection.js} +12 -50
  123. package/src/View/Alert/Wizard/AlertRulesWizardSection.d.ts +7 -4
  124. package/src/View/Alert/Wizard/AlertRulesWizardSection.js +66 -6
  125. package/src/View/Alert/Wizard/AlertScopeWizardSection.d.ts +2 -0
  126. package/src/View/Alert/Wizard/AlertScopeWizardSection.js +41 -2
  127. package/src/View/Alert/Wizard/AlertTypeWizardSection.d.ts +9 -0
  128. package/src/View/Alert/Wizard/AlertTypeWizardSection.js +27 -0
  129. package/src/View/Alert/Wizard/AlertWizard.js +53 -98
  130. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.d.ts +1 -6
  131. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +4 -39
  132. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +1 -1
  133. package/src/View/{Components/Charting → Charting}/ChartingStatusBarPopover.d.ts +0 -0
  134. package/src/View/{Components/Charting → Charting}/ChartingStatusBarPopover.js +2 -2
  135. package/src/View/{Components/Charting → Charting}/ChartingViewPanel.d.ts +1 -1
  136. package/src/View/{Components/Charting → Charting}/ChartingViewPanel.js +0 -0
  137. package/src/View/{Components/Charting → Charting}/ChartingWizard/ChartingWizard.d.ts +2 -2
  138. package/src/View/{Components/Charting → Charting}/ChartingWizard/ChartingWizard.js +12 -2
  139. package/src/View/{Components/Charting → Charting}/ChartingWizard/PreviewChartSection.d.ts +1 -1
  140. package/src/View/{Components/Charting → Charting}/ChartingWizard/PreviewChartSection.js +2 -2
  141. package/src/View/{Components/Charting → Charting}/ChartingWizard/SettingsSection.d.ts +1 -1
  142. package/src/View/{Components/Charting → Charting}/ChartingWizard/SettingsSection.js +4 -4
  143. package/src/View/{Components/Charting → Charting}/DeleteChartButton.d.ts +1 -1
  144. package/src/View/{Components/Charting → Charting}/DeleteChartButton.js +3 -3
  145. package/src/View/{Components/Charting → Charting}/EditChartButton.d.ts +1 -1
  146. package/src/View/{Components/Charting → Charting}/EditChartButton.js +3 -3
  147. package/src/View/{Components/Charting → Charting}/ShowChartButton.d.ts +1 -1
  148. package/src/View/{Components/Charting → Charting}/ShowChartButton.js +5 -5
  149. package/src/View/{Components/Charting → Charting}/useChartState.d.ts +1 -1
  150. package/src/View/{Components/Charting → Charting}/useChartState.js +5 -5
  151. package/src/View/{Components/Charting → Charting}/useChartingElements.d.ts +1 -1
  152. package/src/View/{Components/Charting → Charting}/useChartingElements.js +6 -6
  153. package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicateEditor.d.ts +12 -0
  154. package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicateEditor.js +85 -0
  155. package/src/View/Components/EntityRulesEditor/{PredicatesEditor.d.ts → EntityRulePredicatesEditor/EntityRulePredicatesEditor.d.ts} +6 -4
  156. package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicatesEditor.js +87 -0
  157. package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/index.d.ts +1 -0
  158. package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/index.js +5 -0
  159. package/src/View/Components/EntityRulesEditor/Utilities.js +7 -1
  160. package/src/View/Components/EntityRulesEditor/index.d.ts +4 -2
  161. package/src/View/Components/EntityRulesEditor/index.js +27 -10
  162. package/src/View/Components/FilterForm/FilterForm.js +6 -7
  163. package/src/View/Components/FilterForm/QuickFilterForm.js +13 -9
  164. package/src/View/Components/NewScopeComponent.d.ts +9 -5
  165. package/src/View/Components/NewScopeComponent.js +19 -10
  166. package/src/View/Components/Popups/WindowPopups/WindowPopups.js +2 -2
  167. package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +1 -0
  168. package/src/View/Components/Popups/WindowPopups/windowFactory.js +4 -1
  169. package/src/View/Components/PredicateEditor/PredicateEditor.js +16 -5
  170. package/src/View/Components/PreviewResultsPanel.js +30 -3
  171. package/src/View/CustomSort/Wizard/CustomSortWizard.js +1 -1
  172. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +3 -0
  173. package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +1 -1
  174. package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +1 -1
  175. package/src/View/Export/ExportTablePopup.d.ts +3 -0
  176. package/src/View/Export/ExportTablePopup.js +59 -0
  177. package/src/View/Export/Wizard/NewReportWizard.js +1 -1
  178. package/src/View/Export/Wizard/ReportColumnsWizardSection.js +1 -1
  179. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +1 -1
  180. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +2 -2
  181. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +1 -1
  182. package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +1 -1
  183. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +1 -1
  184. package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +1 -1
  185. package/src/View/GridInfo/GridInfoPopup.js +4 -4
  186. package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +1 -1
  187. package/src/View/Query/Wizard/NamedQueryWizard.js +1 -1
  188. package/src/View/Schedule/Wizard/ScheduleWizard.js +1 -1
  189. package/src/View/Shortcut/Wizard/ShortcutWizard.js +1 -1
  190. package/src/View/StatusBar/StatusBarPanel.d.ts +3 -4
  191. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +7 -4
  192. package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +5 -5
  193. package/src/View/TeamSharing/TeamSharingApplyButton.js +1 -1
  194. package/src/View/Theme/ThemeStatusPanelPopover.js +10 -2
  195. package/src/View/Wizard/TypeRadio.d.ts +7 -0
  196. package/src/View/Wizard/TypeRadio.js +12 -0
  197. package/src/agGrid/Adaptable.d.ts +3 -1
  198. package/src/agGrid/Adaptable.js +28 -4
  199. package/src/agGrid/agGridHelper.d.ts +1 -0
  200. package/src/agGrid/agGridHelper.js +15 -0
  201. package/src/components/ExpressionEditor/EditorInputWithWhereClause.js +4 -0
  202. package/src/components/ExpressionEditor/editorButtonsAggregatedBoolean.js +5 -0
  203. package/src/components/ExpressionEditor/editorButtonsAggregatedScalar.js +5 -0
  204. package/src/components/icons/index.js +4 -0
  205. package/src/components/icons/visibility-off.d.ts +3 -0
  206. package/src/components/icons/visibility-off.js +7 -0
  207. package/src/components/icons/visibility.d.ts +3 -0
  208. package/src/components/icons/visibility.js +8 -0
  209. package/src/metamodel/adaptable.metamodel.d.ts +139 -0
  210. package/src/metamodel/adaptable.metamodel.js +1 -1
  211. package/src/types.d.ts +4 -4
  212. package/version.d.ts +1 -1
  213. package/version.js +1 -1
  214. package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.d.ts +0 -9
  215. package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +0 -30
  216. package/src/View/Components/EntityRulesEditor/PredicatesEditor.js +0 -86
@@ -12,7 +12,7 @@ const AlertRulesWizardSection_1 = require("./AlertRulesWizardSection");
12
12
  const isValidAlertRules_1 = require("./isValidAlertRules");
13
13
  const AlertBehaviourWizardSection_1 = require("./AlertBehaviourWizardSection");
14
14
  const GeneralConstants_1 = require("../../../Utilities/Constants/GeneralConstants");
15
- const AlertDisplayWizardSection_1 = require("./AlertDisplayWizardSection");
15
+ const AlertMessageWizardSection_1 = require("./AlertMessageWizardSection");
16
16
  const BaseAlertScopeWizardSection_1 = require("./BaseAlertScopeWizardSection");
17
17
  const NewScopeComponent_1 = require("../../Components/NewScopeComponent");
18
18
  const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
@@ -20,7 +20,15 @@ const react_redux_1 = require("react-redux");
20
20
  const AlertRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/AlertRedux"));
21
21
  const AdaptableContext_1 = require("../../AdaptableContext");
22
22
  const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
23
+ const AlertTypeWizardSection_1 = require("./AlertTypeWizardSection");
24
+ const getAlertType_1 = require("../Utilities/getAlertType");
25
+ const mapAlertDefinition_1 = require("../Utilities/mapAlertDefinition");
26
+ const getDefaultAlertDefinition_1 = require("../Utilities/getDefaultAlertDefinition");
27
+ const AlertNotificationWizardSection_1 = require("./AlertNotificationWizardSection");
23
28
  const AlertWizard = (props) => {
29
+ const { api } = (0, AdaptableContext_1.useAdaptable)();
30
+ const dispatch = (0, react_redux_1.useDispatch)();
31
+ const behaviourSpelling = api.internalApi.getCorrectEnglishVariant('Behaviour');
24
32
  const [alertDefinition, setAlertDefinition] = (0, react_1.useState)(() => {
25
33
  var _a;
26
34
  const alertDefinition = props.data
@@ -35,86 +43,12 @@ const AlertWizard = (props) => {
35
43
  alertDefinition.MessageType = (_a = alertDefinition.MessageType) !== null && _a !== void 0 ? _a : GeneralConstants_1.ALERT_DEFAULT_MESSAGE_TYPE;
36
44
  return alertDefinition;
37
45
  });
38
- const { api } = (0, AdaptableContext_1.useAdaptable)();
39
- const updateAlertDefinition = (alertDefinition) => {
46
+ // Alert type is based initialy on data, but can be changed by the user
47
+ // the default objects do not neccesary have enough information to determine the type
48
+ const [alertType, setAlertType] = (0, react_1.useState)(() => {
40
49
  var _a;
41
- // we need to adjust the alert actions&behaviours based on the predicate type(row/cell based)
42
- const isAddedRowChangeAlert = api.alertApi.internalApi.isAlertDefinitionForAddedRowChangeEvent(alertDefinition);
43
- const isRemovedRowChangeAlert = api.alertApi.internalApi.isAlertDefinitionForRemovedRowChangeEvent(alertDefinition);
44
- const isCellChangeAlert = !isAddedRowChangeAlert && !isRemovedRowChangeAlert;
45
- // map FormButton Actions
46
- const mapValidButtonActions = (alertAction) => {
47
- if (isCellChangeAlert) {
48
- if (alertAction === 'highlight-row') {
49
- return 'highlight-cell';
50
- }
51
- if (alertAction === 'jump-to-row') {
52
- return 'jump-to-cell';
53
- }
54
- return alertAction;
55
- }
56
- if (isAddedRowChangeAlert) {
57
- if (alertAction === 'highlight-cell') {
58
- return 'highlight-row';
59
- }
60
- if (alertAction === 'jump-to-cell') {
61
- return 'jump-to-row';
62
- }
63
- if (alertAction === 'jump-to-column' || alertAction === 'undo') {
64
- return null;
65
- }
66
- return alertAction;
67
- }
68
- if (isRemovedRowChangeAlert) {
69
- if (alertAction === 'highlight-cell' ||
70
- alertAction === 'jump-to-cell' ||
71
- alertAction === 'highlight-row' ||
72
- alertAction === 'jump-to-row' ||
73
- alertAction === 'jump-to-column' ||
74
- alertAction === 'undo') {
75
- return null;
76
- }
77
- return alertAction;
78
- }
79
- };
80
- if (alertDefinition.AlertForm && typeof alertDefinition.AlertForm !== 'string') {
81
- const alertButtons = (_a = alertDefinition.AlertForm) === null || _a === void 0 ? void 0 : _a.Buttons;
82
- alertButtons === null || alertButtons === void 0 ? void 0 : alertButtons.forEach((alertButton) => {
83
- const alertAction = alertButton.Action;
84
- if (Array.isArray(alertAction)) {
85
- alertButton.Action = alertAction
86
- .map(mapValidButtonActions)
87
- .filter(Boolean);
88
- }
89
- else {
90
- alertButton.Action = mapValidButtonActions(alertAction);
91
- }
92
- });
93
- }
94
- // map Alert Properties(Behaviour)
95
- if (isCellChangeAlert) {
96
- alertDefinition.AlertProperties.HighlightCell = alertDefinition.AlertProperties.HighlightRow;
97
- delete alertDefinition.AlertProperties.HighlightRow;
98
- alertDefinition.AlertProperties.JumpToCell = alertDefinition.AlertProperties.JumpToRow;
99
- delete alertDefinition.AlertProperties.JumpToRow;
100
- }
101
- if (isAddedRowChangeAlert) {
102
- alertDefinition.AlertProperties.HighlightRow = alertDefinition.AlertProperties.HighlightCell;
103
- delete alertDefinition.AlertProperties.HighlightCell;
104
- alertDefinition.AlertProperties.JumpToRow = alertDefinition.AlertProperties.JumpToCell;
105
- delete alertDefinition.AlertProperties.JumpToCell;
106
- delete alertDefinition.AlertProperties.PreventEdit;
107
- }
108
- if (isRemovedRowChangeAlert) {
109
- delete alertDefinition.AlertProperties.PreventEdit;
110
- delete alertDefinition.AlertProperties.HighlightRow;
111
- delete alertDefinition.AlertProperties.JumpToRow;
112
- delete alertDefinition.AlertProperties.HighlightCell;
113
- delete alertDefinition.AlertProperties.JumpToCell;
114
- }
115
- setAlertDefinition(alertDefinition);
116
- };
117
- const dispatch = (0, react_redux_1.useDispatch)();
50
+ return (_a = (0, getAlertType_1.getAlertType)(alertDefinition)) !== null && _a !== void 0 ? _a : getAlertType_1.AlertType.DataChange;
51
+ });
118
52
  const handleFinish = () => {
119
53
  if (props.data) {
120
54
  dispatch(AlertRedux.AlertDefinitionEdit(alertDefinition));
@@ -124,44 +58,65 @@ const AlertWizard = (props) => {
124
58
  }
125
59
  props.onCloseWizard();
126
60
  };
127
- const behaviourSpelling = api.internalApi.getCorrectEnglishVariant('Behaviour');
61
+ const updateAlertDefinition = (newAlertDefinition) => {
62
+ setAlertDefinition((0, mapAlertDefinition_1.mapAlertDefinition)(api, newAlertDefinition));
63
+ };
64
+ const handleAlertTypeChange = (newAlertType) => {
65
+ setAlertType(newAlertType);
66
+ setAlertDefinition((0, getDefaultAlertDefinition_1.getDefaultAlertDefinition)(alertDefinition, newAlertType));
67
+ };
128
68
  return (React.createElement(OnePageAdaptableWizard_1.OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, data: alertDefinition, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
129
69
  {
70
+ title: 'Type',
71
+ details: (React.createElement(React.Fragment, null,
72
+ "Select ",
73
+ React.createElement("b", null, "what"),
74
+ " type of change in AdapTable will cause the Alert to fire")),
75
+ render: () => (React.createElement(rebass_1.Box, { padding: 2 },
76
+ React.createElement(AlertTypeWizardSection_1.AlertTypeWizardSection, { alertType: alertType, onAlertTypeChange: handleAlertTypeChange }))),
77
+ renderSummary: () => (0, AlertTypeWizardSection_1.renderAlertTypeSummary)(alertType),
78
+ },
79
+ {
80
+ title: 'Trigger',
81
+ isVisible: () => alertType === getAlertType_1.AlertType.DataChange,
130
82
  details: (React.createElement(React.Fragment, null,
131
83
  "Specify ",
132
- React.createElement("b", null, "which"),
84
+ React.createElement("b", null, "where"),
133
85
  " data changes should trigger the Alert")),
134
86
  isValid: NewScopeComponent_1.isScopeValid,
135
- render: () => React.createElement(AlertScopeWizardSection_1.AlertScopeWizardSection, { onChange: setAlertDefinition }),
136
- renderSummary: BaseAlertScopeWizardSection_1.renderBaseAlertScopeSummary,
137
- title: 'Trigger',
87
+ render: () => (React.createElement(AlertScopeWizardSection_1.AlertScopeWizardSection, { alertType: alertType, onChange: setAlertDefinition })),
88
+ renderSummary: BaseAlertScopeWizardSection_1.renderScopeSummary,
138
89
  },
139
90
  {
140
- details: (React.createElement(React.Fragment, null,
141
- "Build the rules ",
142
- React.createElement("b", null, "when"),
143
- " the Alert should trigger")),
91
+ title: 'Rule',
92
+ details: (0, AlertRulesWizardSection_1.getRuleStepDescription)(alertType),
144
93
  isValid: isValidAlertRules_1.isValidAlertRules,
145
- render: () => React.createElement(AlertRulesWizardSection_1.AlertRulesWizardSection, { onChange: updateAlertDefinition, module: "alert" }),
94
+ render: () => (React.createElement(AlertRulesWizardSection_1.AlertRulesWizardSection, { alertType: alertType, onChange: updateAlertDefinition, module: "alert" })),
146
95
  renderSummary: AlertRulesWizardSection_1.renderAlertRulesSummary,
147
- title: 'Rule',
148
96
  },
149
97
  {
150
- details: "Select the Alert's Message Type and Notification option",
98
+ title: 'Message',
99
+ details: "Select the Alert's Message Type and Text",
151
100
  render: () => (React.createElement(rebass_1.Box, { padding: 2 },
152
- React.createElement(AlertDisplayWizardSection_1.AlertDisplayWizardSection, { onChange: setAlertDefinition }))),
153
- renderSummary: AlertDisplayWizardSection_1.renderAlertDisplaySummary,
154
- title: 'Type & Display',
101
+ React.createElement(AlertMessageWizardSection_1.AlertMessageWizardSection, { alertType: alertType, onChange: setAlertDefinition }))),
102
+ renderSummary: AlertMessageWizardSection_1.renderAlertMessageSummary,
103
+ },
104
+ {
105
+ title: 'Notification',
106
+ details: 'Create a Notification for the Alert',
107
+ render: () => (React.createElement(rebass_1.Box, { padding: 2 },
108
+ React.createElement(AlertNotificationWizardSection_1.AlertNotificationWizardSection, { alertType: alertType, onChange: setAlertDefinition }))),
109
+ renderSummary: AlertNotificationWizardSection_1.renderAlertNotificationSummary,
155
110
  },
156
111
  {
157
- details: 'Configure ' + behaviourSpelling + ' for the Alert',
158
112
  title: behaviourSpelling,
113
+ details: 'Configure ' + behaviourSpelling + ' for the Alert',
159
114
  render: () => (React.createElement(rebass_1.Box, { padding: 2 },
160
- React.createElement(AlertBehaviourWizardSection_1.AlertBehaviourWizardSection, { onChange: setAlertDefinition }))),
115
+ React.createElement(AlertBehaviourWizardSection_1.AlertBehaviourWizardSection, { alertType: alertType, onChange: setAlertDefinition }))),
161
116
  renderSummary: AlertBehaviourWizardSection_1.renderAlertBehaviourWizardSummary,
162
117
  },
163
118
  {
164
- details: 'Select Alert tags',
119
+ details: 'Select Alert Tags',
165
120
  title: 'Tags',
166
121
  isVisible: () => api.internalApi.shouldDisplayTagSections(),
167
122
  render: () => (React.createElement(rebass_1.Box, { padding: 2 },
@@ -1,9 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { AlertDefinition } from '../../../PredefinedConfig/AlertState';
3
3
  import { FlashingCellDefinition } from '../../../../types';
4
- declare type BaseAlertScopeWizardSectionProps<T extends AlertDefinition> = {
5
- onChange: (data: T) => void;
6
- };
7
- export declare const BaseAlertScopeWizardSection: <T extends AlertDefinition>(props: BaseAlertScopeWizardSectionProps<T>) => JSX.Element;
8
- export declare const renderBaseAlertScopeSummary: (data: AlertDefinition | FlashingCellDefinition) => JSX.Element;
9
- export {};
4
+ export declare const renderScopeSummary: (data: AlertDefinition | FlashingCellDefinition) => JSX.Element;
@@ -1,47 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.renderBaseAlertScopeSummary = exports.BaseAlertScopeWizardSection = void 0;
3
+ exports.renderScopeSummary = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const rebass_1 = require("rebass");
7
7
  const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
8
- const NewScopeComponent_1 = require("../../Components/NewScopeComponent");
9
8
  const ValueSelector_1 = require("../../Components/ValueSelector");
10
- const BaseAlertScopeWizardSection = (props) => {
11
- const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
12
- return (React.createElement(rebass_1.Flex, { flexDirection: "column", style: { height: '100%' }, padding: 2 },
13
- React.createElement(NewScopeComponent_1.NewScopeComponent, { descriptions: {
14
- rowScope: 'Changes in any Column in the row will trigger an Alert',
15
- columnScope: 'Changes in selected Columns will trigger an Alert',
16
- }, scope: data.Scope, updateScope: (Scope) => {
17
- const newData = Object.assign(Object.assign({}, data), { Scope });
18
- if (newData.Rule.Predicates) {
19
- // when scope is changed, reset the rule to predicate of any
20
- // if it was set to a predicate before
21
- newData.Rule = {
22
- Predicates: [{ PredicateId: 'Any' }],
23
- };
24
- }
25
- if (newData.Rule.ObservableExpression !== undefined && !api.scopeApi.scopeIsAll(Scope)) {
26
- // if it had observable expression and the scope is changed to partial
27
- // we need to reset to not be an observable expression, as observable is not supported
28
- // for partial scope
29
- delete newData.Rule.ObservableExpression;
30
- newData.Rule.BooleanExpression = '';
31
- }
32
- if (newData.Rule.AggregatedBooleanExpression !== undefined &&
33
- !api.scopeApi.scopeIsAll(Scope)) {
34
- // if it had aggregation expression and the scope is changed to partial
35
- // we need to reset to not be an aggregation expression, as aggregation is not supported
36
- // for partial scope
37
- delete newData.Rule.AggregatedBooleanExpression;
38
- newData.Rule.BooleanExpression = '';
39
- }
40
- props.onChange(newData);
41
- } })));
42
- };
43
- exports.BaseAlertScopeWizardSection = BaseAlertScopeWizardSection;
44
- const renderBaseAlertScopeSummary = (data) => {
9
+ const renderScopeSummary = (data) => {
45
10
  const { api: { scopeApi }, } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
46
11
  const columnsInScope = scopeApi.getColumnsForScope(data.Scope);
47
12
  return (React.createElement(React.Fragment, null,
@@ -53,7 +18,7 @@ const renderBaseAlertScopeSummary = (data) => {
53
18
  React.createElement(rebass_1.Text, { fontSize: 2, mb: columnsInScope.length ? 2 : 0 }, "Changes in selected columns will trigger an alert"),
54
19
  columnsInScope.length ? (React.createElement(ValueSelector_1.ValueOptionsTags, { options: columnsInScope, value: columnsInScope.map((c) => c.columnId), toLabel: (c) => c.friendlyName, allowWrap: true, readOnly: true, renderLabel: (c) => React.createElement(React.Fragment, null, c), toIdentifier: (c) => c.columnId })) : null)) : null),
55
20
  React.createElement(rebass_1.Box, null, 'DataTypes' in data.Scope ? (React.createElement(React.Fragment, null,
56
- React.createElement(rebass_1.Text, { fontSize: 2, mb: 2 }, "Changes in columns of the selected data-types trigger an alert"),
21
+ React.createElement(rebass_1.Text, { fontSize: 2, mb: 2 }, "Changes in Columns with these Data Types trigger an Alert"),
57
22
  React.createElement(ValueSelector_1.ValueOptionsTags, { readOnly: true, options: data.Scope.DataTypes, value: data.Scope.DataTypes, toLabel: (c) => c, allowWrap: true, renderLabel: (c) => React.createElement(React.Fragment, null, `DataType: ${c}`), toIdentifier: (c) => c }))) : null)));
58
23
  };
59
- exports.renderBaseAlertScopeSummary = renderBaseAlertScopeSummary;
24
+ exports.renderScopeSummary = renderScopeSummary;
@@ -74,7 +74,7 @@ const CalculatedColumnWizard = (props) => {
74
74
  },
75
75
  },
76
76
  {
77
- details: 'Select Calculated Column tags',
77
+ details: 'Select Calculated Column Tags',
78
78
  title: 'Tags',
79
79
  isVisible: () => adaptable.api.internalApi.shouldDisplayTagSections(),
80
80
  render: () => (React.createElement(rebass_1.Box, { padding: 2 },
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ChartingStatusBarPopover = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
- const AdaptableContext_1 = require("../../AdaptableContext");
7
- const ModuleConstants = tslib_1.__importStar(require("../../../Utilities/Constants/ModuleConstants"));
6
+ const AdaptableContext_1 = require("../AdaptableContext");
7
+ const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
8
8
  const useChartingElements_1 = require("./useChartingElements");
9
9
  const rebass_1 = require("rebass");
10
10
  const ChartingStatusBarPopover = (props) => {
@@ -1,3 +1,3 @@
1
1
  import * as React from 'react';
2
- import { ViewPanelProps } from '../SharedProps/ViewPanelProps';
2
+ import { ViewPanelProps } from '../Components/SharedProps/ViewPanelProps';
3
3
  export declare const ChartingViewPanel: React.FunctionComponent<ViewPanelProps>;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- import { ChartDefinition } from '../../../../types';
3
- import { AdaptableOnePageWizardProps } from '../../../Wizard/Interface/IAdaptableWizard';
2
+ import { ChartDefinition } from '../../../types';
3
+ import { AdaptableOnePageWizardProps } from '../../Wizard/Interface/IAdaptableWizard';
4
4
  export interface ChartingWizardProps extends AdaptableOnePageWizardProps<ChartDefinition> {
5
5
  }
6
6
  export declare const ChartingWizard: React.FunctionComponent<ChartingWizardProps>;
@@ -4,10 +4,11 @@ exports.ChartingWizard = void 0;
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 AdaptableContext_1 = require("../../../AdaptableContext");
8
- const OnePageAdaptableWizard_1 = require("../../../Wizard/OnePageAdaptableWizard");
7
+ const AdaptableContext_1 = require("../../AdaptableContext");
8
+ const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
9
9
  const PreviewChartSection_1 = require("./PreviewChartSection");
10
10
  const SettingsSection_1 = require("./SettingsSection");
11
+ const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
11
12
  const ChartingWizard = (props) => {
12
13
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
13
14
  const [chartDefinition, setChartDefinition] = React.useState(() => {
@@ -26,6 +27,15 @@ const ChartingWizard = (props) => {
26
27
  render: () => (React.createElement(rebass_1.Box, { padding: 2 },
27
28
  React.createElement(SettingsSection_1.SettingsSection, { chartDefinition: chartDefinition, onChange: setChartDefinition }))),
28
29
  },
30
+ {
31
+ details: 'Select Chart Tags',
32
+ title: 'Tags',
33
+ isVisible: () => adaptable.api.internalApi.shouldDisplayTagSections(),
34
+ render: () => (React.createElement(rebass_1.Box, { padding: 2 },
35
+ React.createElement(ObjectTagsWizardSection_1.ObjectTagsWizardSection, { onChange: setChartDefinition }))),
36
+ renderSummary: ObjectTagsWizardSection_1.renderObjectTagsSummary,
37
+ },
38
+ '-',
29
39
  {
30
40
  title: 'Preview Chart',
31
41
  details: 'Chart Preview',
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { ChartDefinition } from '../../../../types';
2
+ import { ChartDefinition } from '../../../types';
3
3
  export declare const PreviewChartSection: React.FunctionComponent<{
4
4
  chartDefinition: ChartDefinition;
5
5
  onChange: (chartDefinition: ChartDefinition) => void;
@@ -5,8 +5,8 @@ const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const react_redux_1 = require("react-redux");
7
7
  const isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
8
- const SystemRedux = tslib_1.__importStar(require("../../../../Redux/ActionsReducers/SystemRedux"));
9
- const AdaptableContext_1 = require("../../../AdaptableContext");
8
+ const SystemRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/SystemRedux"));
9
+ const AdaptableContext_1 = require("../../AdaptableContext");
10
10
  const PreviewChartSection = (props) => {
11
11
  const currentChartModels = (0, react_redux_1.useSelector)((state) => SystemRedux.SystemChartingCurrentChartModelsSelector(state.System));
12
12
  const [localChartId, setLocalChartId] = React.useState(null);
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { AdaptableApi, ChartDefinition } from '../../../../types';
2
+ import { AdaptableApi, ChartDefinition } from '../../../types';
3
3
  export declare const isSettingsValid: (chartDefinition: ChartDefinition, api: AdaptableApi) => true | string;
4
4
  export interface SettingsSectionProps {
5
5
  chartDefinition: ChartDefinition;
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SettingsSection = exports.isSettingsValid = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
- const CheckBox_1 = require("../../../../components/CheckBox");
7
- const DropdownButton_1 = tslib_1.__importDefault(require("../../../../components/DropdownButton"));
8
- const FormLayout_1 = tslib_1.__importStar(require("../../../../components/FormLayout"));
9
- const AdaptableInput_1 = tslib_1.__importDefault(require("../../AdaptableInput"));
6
+ const CheckBox_1 = require("../../../components/CheckBox");
7
+ const DropdownButton_1 = tslib_1.__importDefault(require("../../../components/DropdownButton"));
8
+ const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
9
+ const AdaptableInput_1 = tslib_1.__importDefault(require("../../Components/AdaptableInput"));
10
10
  const isSettingsValid = (chartDefinition, api) => {
11
11
  if (!chartDefinition.Name) {
12
12
  return 'Name is mandatory';
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { AccessLevel, ChartDefinition } from '../../../types';
2
+ import { AccessLevel, ChartDefinition } from '../../types';
3
3
  export interface ButtonDeleteProps {
4
4
  chart: ChartDefinition;
5
5
  accessLevel: AccessLevel;
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DeleteChartButton = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
- const ButtonDelete_1 = require("../Buttons/ButtonDelete");
7
- const ChartingRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/ChartingRedux"));
6
+ const ButtonDelete_1 = require("../Components/Buttons/ButtonDelete");
7
+ const ChartingRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/ChartingRedux"));
8
8
  const DeleteChartButton = (props) => {
9
9
  var _a;
10
- return (React.createElement(ButtonDelete_1.ButtonDelete, { iconSize: props.iconSize, disabled: !props.chart, ConfirmAction: ChartingRedux.ChartingDeleteChart((_a = props.chart) === null || _a === void 0 ? void 0 : _a.Name), ConfirmationMsg: `Are you sure you want to delete this Charts?`, ConfirmationTitle: 'Delete Charts', accessLevel: props.accessLevel }));
10
+ return (React.createElement(ButtonDelete_1.ButtonDelete, { iconSize: props.iconSize, disabled: !props.chart, ConfirmAction: ChartingRedux.ChartingDeleteChart((_a = props.chart) === null || _a === void 0 ? void 0 : _a.Name), ConfirmationMsg: `Are you sure you want to delete this Charts?`, ConfirmationTitle: 'Delete Charts', accessLevel: props.accessLevel, tooltip: "Delete Chart" }));
11
11
  };
12
12
  exports.DeleteChartButton = DeleteChartButton;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { AccessLevel, ChartDefinition } from '../../../types';
2
+ import { AccessLevel, ChartDefinition } from '../../types';
3
3
  export interface EditChartButtonProps {
4
4
  chart: ChartDefinition;
5
5
  accessLevel: AccessLevel;
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EditChartButton = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
- const PopupRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/PopupRedux"));
7
- const ButtonEdit_1 = require("../Buttons/ButtonEdit");
8
- const ModuleConstants = tslib_1.__importStar(require("../../../Utilities/Constants/ModuleConstants"));
6
+ const PopupRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/PopupRedux"));
7
+ const ButtonEdit_1 = require("../Components/Buttons/ButtonEdit");
8
+ const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
9
9
  const react_redux_1 = require("react-redux");
10
10
  const EditChartButton = (props) => {
11
11
  const dispatch = (0, react_redux_1.useDispatch)();
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { AdaptableObject } from '../../../types';
2
+ import { AdaptableObject } from '../../types';
3
3
  export declare const ShowChartButton: React.FunctionComponent<{
4
4
  data: AdaptableObject;
5
5
  }>;
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ShowChartButton = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
- const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
7
- const AdaptableContext_1 = require("../../AdaptableContext");
8
- const DropdownButton_1 = tslib_1.__importDefault(require("../../../components/DropdownButton"));
6
+ const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
7
+ const AdaptableContext_1 = require("../AdaptableContext");
8
+ const DropdownButton_1 = tslib_1.__importDefault(require("../../components/DropdownButton"));
9
9
  const useChartState_1 = require("./useChartState");
10
10
  const ShowChartButton = (props) => {
11
11
  var _a, _b;
@@ -13,10 +13,10 @@ const ShowChartButton = (props) => {
13
13
  const chartContainers = (_b = (_a = adaptable.adaptableOptions) === null || _a === void 0 ? void 0 : _a.chartingOptions) === null || _b === void 0 ? void 0 : _b.chartContainers;
14
14
  const { isOpen, showChart, closeChart } = (0, useChartState_1.useChartState)(props.data);
15
15
  if (isOpen) {
16
- return (React.createElement(SimpleButton_1.default, { "data-name": "close-chart-button", onClick: closeChart, variant: "raised", tone: "error" }, "Close"));
16
+ return (React.createElement(SimpleButton_1.default, { "data-name": "close-chart-button", onClick: closeChart, variant: "text", tone: "error", icon: "visibility-off", tooltip: "Hide Chart" }));
17
17
  }
18
18
  if (!(chartContainers === null || chartContainers === void 0 ? void 0 : chartContainers.length)) {
19
- return (React.createElement(SimpleButton_1.default, { "data-name": "show-chart-button", onClick: () => showChart(), variant: "text", tone: "success" }, "Open"));
19
+ return (React.createElement(SimpleButton_1.default, { "data-name": "show-chart-button", onClick: () => showChart(), variant: "text", tone: "success", icon: "visibility", tooltip: "Show Chart" }));
20
20
  }
21
21
  const containerOptions = [
22
22
  {
@@ -1,4 +1,4 @@
1
- import { ChartDefinition } from '../../../types';
1
+ import { ChartDefinition } from '../../types';
2
2
  export declare const useChartState: (chartDefinition?: ChartDefinition) => {
3
3
  isOpen: boolean;
4
4
  showChart: (chartContainer?: {
@@ -4,20 +4,20 @@ exports.useChartState = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const react_redux_1 = require("react-redux");
7
- const AdaptableContext_1 = require("../../AdaptableContext");
8
- const SystemRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/SystemRedux"));
9
- const LoggingHelper_1 = require("../../../Utilities/Helpers/LoggingHelper");
7
+ const AdaptableContext_1 = require("../AdaptableContext");
8
+ const SystemRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/SystemRedux"));
9
+ const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
10
10
  const useChartState = (chartDefinition) => {
11
11
  const [chartRef, setChartRef] = React.useState(null);
12
12
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
13
13
  const currentChartModels = (0, react_redux_1.useSelector)((state) => SystemRedux.SystemChartingCurrentChartModelsSelector(state.System));
14
14
  React.useEffect(() => {
15
- var _a;
15
+ var _a, _b;
16
16
  if (!chartDefinition) {
17
17
  setChartRef(null);
18
18
  return;
19
19
  }
20
- const currentChartRef = (_a = adaptable.api.chartingApi.getChartRef(chartDefinition.Model.chartId)) !== null && _a !== void 0 ? _a : null;
20
+ const currentChartRef = (_b = adaptable.api.chartingApi.getChartRef((_a = chartDefinition === null || chartDefinition === void 0 ? void 0 : chartDefinition.Model) === null || _a === void 0 ? void 0 : _a.chartId)) !== null && _b !== void 0 ? _b : null;
21
21
  setChartRef(currentChartRef);
22
22
  }, [currentChartModels, chartDefinition]);
23
23
  const closeAlreadyOpenedChartsInContainer = (element) => {
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { AccessLevel, ChartDefinition } from '../../../types';
2
+ import { AccessLevel, ChartDefinition } from '../../types';
3
3
  export declare const useChartingElements: ({ elementType, accessLevel, size, }: {
4
4
  elementType: string;
5
5
  accessLevel: AccessLevel;
@@ -4,11 +4,11 @@ exports.useChartingElements = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const react_redux_1 = require("react-redux");
7
- const AdaptableContext_1 = require("../../AdaptableContext");
8
- const DropdownButton_1 = tslib_1.__importDefault(require("../../../components/DropdownButton"));
9
- const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
10
- const ChartingRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/ChartingRedux"));
11
- const AdaptableHelper_1 = tslib_1.__importDefault(require("../../../Utilities/Helpers/AdaptableHelper"));
7
+ const AdaptableContext_1 = require("../AdaptableContext");
8
+ const DropdownButton_1 = tslib_1.__importDefault(require("../../components/DropdownButton"));
9
+ const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
10
+ const ChartingRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/ChartingRedux"));
11
+ const AdaptableHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/AdaptableHelper"));
12
12
  const useChartState_1 = require("./useChartState");
13
13
  const DeleteChartButton_1 = require("./DeleteChartButton");
14
14
  const EditChartButton_1 = require("./EditChartButton");
@@ -75,7 +75,7 @@ const useChartingElements = ({ elementType, accessLevel, size = 'normal', }) =>
75
75
  }
76
76
  const chartSelector = (React.createElement(DropdownButton_1.default, { style: style, width: "100%", columns: ['label'], className: `ab-${elementType}__Chart__select`, items: options, disabled: !hasCharts }, content));
77
77
  const containerSelector = Boolean(chartContainers === null || chartContainers === void 0 ? void 0 : chartContainers.length) && (React.createElement(DropdownButton_1.default, { style: style, width: "100%", columns: ['label'], items: containerOptions, disabled: !isSelectedChart }, (selectedContainer === null || selectedContainer === void 0 ? void 0 : selectedContainer.name) || 'Ag Grid Window'));
78
- const chartButton = (React.createElement(SimpleButton_1.default, { style: style, mr: 1, onClick: () => (isOpen ? closeChart() : showChart(selectedContainer)), disabled: !Boolean(selectedChart), variant: 'outlined', tone: 'neutral' }, isOpen ? 'Close' : 'Open'));
78
+ const chartButton = (React.createElement(SimpleButton_1.default, { style: style, mr: 1, onClick: () => (isOpen ? closeChart() : showChart(selectedContainer)), disabled: !Boolean(selectedChart), variant: 'text', tone: 'neutral', icon: isOpen ? 'visibility-off' : 'visibility', tooltip: isOpen ? 'Hide Chart' : 'Show Chart' }));
79
79
  const deleteButton = (React.createElement(DeleteChartButton_1.DeleteChartButton, { iconSize: iconSize, chart: selectedChart, accessLevel: chartAccessLevel }));
80
80
  const editButton = (React.createElement(EditChartButton_1.EditChartButton, { iconSize: iconSize, chart: selectedChart, accessLevel: chartAccessLevel, isOpen: isOpen }));
81
81
  return {
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import { AdaptableColumnPredicate, AdaptablePredicateDef } from '../../../../types';
3
+ import { EntityRulePredicatesEditorProps } from './EntityRulePredicatesEditor';
4
+ export interface EntityPredicateEditorProps {
5
+ data: EntityRulePredicatesEditorProps['data'];
6
+ predicate?: AdaptableColumnPredicate;
7
+ onChange: EntityRulePredicatesEditorProps['onChange'];
8
+ predicateDefs: AdaptablePredicateDef[];
9
+ getPredicateDefsForColId?: (colId: string) => AdaptablePredicateDef[];
10
+ columnPredicateEnabled: boolean;
11
+ }
12
+ export declare const EntityRulePredicateEditor: React.FC<EntityPredicateEditorProps>;