@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
package/src/types.d.ts CHANGED
@@ -14,7 +14,7 @@ export type { AlertOptions, ActionHandler, AlertForm, AlertFormContext, AlertMes
14
14
  export type { DashboardOptions, CustomToolbar, DashboardButtonContext, CustomToolbarButtonContext, } from './AdaptableOptions/DashboardOptions';
15
15
  export type { EditOptions, ValidationResult, SmartEditCustomOperation, SmartEditOperation, SmartEditOperationContext, } from './AdaptableOptions/EditOptions';
16
16
  export type { ActionRowButtonOptions, ActionRowFormOptions, ActionRowParamContext, ActionRowParamFieldContext, CreateActionRowFormContext, EditActionRowFormContext, ActionColumnContext, ActionColumn, ActionColumnSettings, ActionOptions, ActionRowFormContext, ActionRowButtonType, ActionRowButtonConfigurationContext, ActionRowButtonsContext, } from './AdaptableOptions/ActionOptions';
17
- export type { ExportOptions, SystemExportDestination, SystemExportDestinations, CustomDestination, ServerReport, DataFormatType, ExportFormContext, ReportContext, } from './AdaptableOptions/ExportOptions';
17
+ export type { ExportOptions, SystemExportDestination, SystemExportDestinations, CustomDestination, ServerReport, DataFormatType, ExportFormContext, ReportContext, ExportableColumnContext, } from './AdaptableOptions/ExportOptions';
18
18
  export type { GeneralOptions, ColumnValuesComparer, DataSet, DataSetFormContext, UnbalancedGroupsKeyContext, Holidays, HolidayContext, } from './AdaptableOptions/GeneralOptions';
19
19
  export type { Glue42PluginOptions } from './AdaptableOptions/Glue42PluginOptions';
20
20
  export type { IPushPullPluginOptions } from './AdaptableOptions/IPushPullPluginOptions';
@@ -53,7 +53,7 @@ export type { CalculatedColumnApi } from './Api/CalculatedColumnApi';
53
53
  export type { CellSummaryApi } from './Api/CellSummaryApi';
54
54
  export type { ColumnApi } from './Api/ColumnApi';
55
55
  export type { ActionApi } from './Api/ActionApi';
56
- export type { ChartingApi } from './Api/ChartingApi';
56
+ export type { ChartingApi, ChartingOpenState } from './Api/ChartingApi';
57
57
  export type { ConfigApi } from './Api/ConfigApi';
58
58
  export type { CustomSortApi } from './Api/CustomSortApi';
59
59
  export type { DashboardApi } from './Api/DashboardApi';
@@ -133,7 +133,7 @@ export type { AdaptableMessageType } from './PredefinedConfig/Common/AdaptableMe
133
133
  export type { AdaptableObject, AdaptableObjectTag, AdaptableObjectLookupCriteria, } from './PredefinedConfig/Common/AdaptableObject';
134
134
  export type { SuspendableObject } from './PredefinedConfig/Common/SuspendableObject';
135
135
  export type { AdaptableQuery, AdaptableAggregatedBooleanQuery, AdaptableAggregatedScalarQuery, AdaptableBooleanQuery, AdaptableObservableQuery, AdaptableScalarQuery, } from './PredefinedConfig/Common/AdaptableQuery';
136
- export type { AdaptablePredicate, AdaptablePredicateDef, PredicateModuleScope, PredicateDefHandlerParams, PredicateDefInput, PredicateDefToStringParams, ColumnFilterDef, } from './PredefinedConfig/Common/AdaptablePredicate';
136
+ export type { AdaptablePredicate, AdaptableColumnPredicate, AdaptablePredicateDef, PredicateModuleScope, PredicateDefHandlerParams, PredicateDefInput, PredicateDefToStringParams, ColumnFilterDef, } from './PredefinedConfig/Common/AdaptablePredicate';
137
137
  export type { FDC3Context, InstrumentContext, InstrumentListContext, PositionContext, PortfolioContext, ContactContext, ContactListContext, CountryContext, OrganizationContext, AdaptableFDC3EventInfo, FDC3ContextType, CustomFDC3Context, ContextData, } from './PredefinedConfig/Common/FDC3Context';
138
138
  export type { AdaptableScope } from './PredefinedConfig/Common/AdaptableScope';
139
139
  export type { AdaptableStyle } from './PredefinedConfig/Common/AdaptableStyle';
@@ -152,7 +152,7 @@ export type { BaseContext } from './PredefinedConfig/Common/BaseContext';
152
152
  export type { FormContext } from './PredefinedConfig/Common/FormContext';
153
153
  export type { Schedule } from './PredefinedConfig/Common/Schedule';
154
154
  export type { ButtonStyle } from './PredefinedConfig/Common/ButtonStyle';
155
- export type { AdaptableModule, AdaptableToolPanel, AdaptableQLModule, AdaptableSettingsPanel, AdaptableDashboardToolbar, AdaptableStatusBarPanel, AdaptableColumnType, } from './PredefinedConfig/Common/Types';
155
+ export type { AdaptableModule, AdaptableToolPanel, AdaptableQLModule, AdaptableSettingsPanel, AdaptableDashboardToolbar, AdaptableStatusBarPanel, AdaptableColumnType, AdaptableModuleButton, } from './PredefinedConfig/Common/Types';
156
156
  export type { ChartDefinition, ChartingState, ChartingAggFunc, } from './PredefinedConfig/ChartingState';
157
157
  export type { CustomSort, CustomSortState } from './PredefinedConfig/CustomSortState';
158
158
  export type { DashboardState, DashboardTab, AdaptableCoordinate, } from './PredefinedConfig/DashboardState';
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "14.0.2";
1
+ declare const _default: "14.0.4";
2
2
  export default _default;
package/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = '14.0.2'; // PLEASE DONT UPDATE THIS!!! - will be updated at build time with the correct version
3
+ exports.default = '14.0.4'; // PLEASE DONT UPDATE THIS!!! - will be updated at build time with the correct version
@@ -1,9 +0,0 @@
1
- import * as React from 'react';
2
- import { AlertDefinition } from '../../../types';
3
- export interface BaseAlertRulesWizardSectionProps<T> {
4
- onChange: (data: T) => void;
5
- module: 'alert';
6
- wholeRowScope?: boolean;
7
- children?: React.ReactNode;
8
- }
9
- export declare const BaseAlertRulesWizardSection: <T extends AlertDefinition>(props: BaseAlertRulesWizardSectionProps<T>) => JSX.Element;
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BaseAlertRulesWizardSection = 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
- const BaseAlertRulesWizardSection = (props) => {
9
- const { data, api, moduleInfo } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
10
- const wholeRowScope = props.wholeRowScope != null ? props.wholeRowScope : api.scopeApi.scopeIsAll(data.Scope);
11
- let predicateDefs = api.alertApi.internalApi.getAlertPredicateDefsForScope(data.Scope);
12
- // move Any to the beginning of the list, so it is alwasy the default
13
- predicateDefs = [...predicateDefs].sort((a, b) => (a.id === 'Any' ? -1 : b.id === 'Any' ? 1 : 0));
14
- return (React.createElement(EntityRulesEditor_1.EntityRulesEditor, { module: moduleInfo.ModuleName, defaultPredicateId: "Any", data: data, predicateDefs: predicateDefs, onChange: props.onChange, showAggregation: !wholeRowScope ? false : true, showObservable: !wholeRowScope ? false : true, showBoolean: true, showPredicate: true, descriptions: {
15
- selectPredicate: 'Create an Alert Rule - to be applied when data changes',
16
- useBooleanQuery: (React.createElement(React.Fragment, null,
17
- "Use an BooleanQuery if ",
18
- React.createElement("i", null, "Scope"),
19
- " is 'All Columns' - so any data change may be evaluated in a complex BooleanExpression")),
20
- useObservableQuery: (React.createElement(React.Fragment, null,
21
- "Use an ObservableQuery if ",
22
- React.createElement("i", null, "Scope"),
23
- " is 'All Columns' - so any data change may be evaluated in a complex ObservableExpression")),
24
- useAggregationQuery: (React.createElement(React.Fragment, null,
25
- "Use an AggregatedBooleanQuery if ",
26
- React.createElement("i", null, "Scope"),
27
- " is 'All Columns' - so any data change may be evaluated in a complex AggregatedBooleanExpression")),
28
- } }));
29
- };
30
- exports.BaseAlertRulesWizardSection = BaseAlertRulesWizardSection;
@@ -1,86 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PredicatesEditor = void 0;
4
- const tslib_1 = require("tslib");
5
- const React = tslib_1.__importStar(require("react"));
6
- const rebass_1 = require("rebass");
7
- const HelpBlock_1 = tslib_1.__importDefault(require("../../../components/HelpBlock"));
8
- const AdaptableContext_1 = require("../../AdaptableContext");
9
- const ButtonInfo_1 = require("../Buttons/ButtonInfo");
10
- const DocumentationLinkConstants_1 = require("../../../Utilities/Constants/DocumentationLinkConstants");
11
- const PredicateEditor_1 = require("../PredicateEditor/PredicateEditor");
12
- const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
13
- const Tag_1 = require("../../../components/Tag");
14
- const PredicatesEditor = (props) => {
15
- var _a, _b, _c, _d;
16
- const { api } = (0, AdaptableContext_1.useAdaptable)();
17
- const showDocumentationLinks = api.internalApi.isDocumentationLinksDisplayed();
18
- const predicateDefs = props.predicateDefs
19
- // filter out already used ones
20
- .filter((predicateDef) => {
21
- var _a, _b;
22
- return !((_b = (_a = props.data.Rule) === null || _a === void 0 ? void 0 : _a.Predicates) === null || _b === void 0 ? void 0 : _b.some((item) => item.PredicateId === predicateDef.id));
23
- });
24
- const handleAddNewPredicate = () => {
25
- var _a;
26
- props.onChange(Object.assign(Object.assign({}, props.data), { Rule: {
27
- Predicates: [
28
- ...(((_a = props.data.Rule) === null || _a === void 0 ? void 0 : _a.Predicates) || []),
29
- {
30
- PredicateId: predicateDefs[0].id,
31
- Inputs: [],
32
- },
33
- ],
34
- } }));
35
- };
36
- return (React.createElement(React.Fragment, null,
37
- React.createElement(rebass_1.Flex, { mb: 2, justifyContent: "space-between" },
38
- React.createElement(rebass_1.Text, { fontSize: 2, mb: 2 }, props.descriptions.selectPredicate),
39
- React.createElement(SimpleButton_1.default, { disabled: !((_b = (_a = props.data.Rule) === null || _a === void 0 ? void 0 : _a.Predicates) === null || _b === void 0 ? void 0 : _b.length), onClick: handleAddNewPredicate, icon: "plus", variant: "raised" }, "Add Predicate")),
40
- (((_d = (_c = props.data.Rule) === null || _c === void 0 ? void 0 : _c.Predicates) === null || _d === void 0 ? void 0 : _d.length) ? props.data.Rule.Predicates : [null]).map((predicate, index) => {
41
- var _a, _b;
42
- const handleClear = () => {
43
- var _a, _b;
44
- const newPredicates = (_b = (_a = props.data.Rule) === null || _a === void 0 ? void 0 : _a.Predicates) === null || _b === void 0 ? void 0 : _b.filter((prevPredicate) => prevPredicate !== predicate);
45
- props.onChange(Object.assign(Object.assign({}, props.data), { Rule: {
46
- Predicates: newPredicates,
47
- } }));
48
- };
49
- const predicateDefsIncludingCurrent = [...predicateDefs];
50
- const currentPredicateDef = props.predicateDefs.find((item) => item.id === (predicate === null || predicate === void 0 ? void 0 : predicate.PredicateId));
51
- if (currentPredicateDef) {
52
- predicateDefsIncludingCurrent.push(currentPredicateDef);
53
- }
54
- return (React.createElement(rebass_1.Box, { mb: 3, key: index },
55
- index > 0 && React.createElement(Tag_1.Tag, { mb: 2 }, "AND"),
56
- React.createElement(rebass_1.Flex, { justifyContent: "center", alignItems: "flex-start", width: "100%" },
57
- React.createElement(rebass_1.Box, { flex: 1 },
58
- React.createElement(PredicateEditor_1.PredicateEditor, { columnId: 'ColumnIds' in props.data.Scope ? (_b = (_a = props.data.Scope) === null || _a === void 0 ? void 0 : _a.ColumnIds) === null || _b === void 0 ? void 0 : _b[0] : null, predicateDefs: predicateDefsIncludingCurrent, predicate: predicate, onChange: (newPredicateDef) => {
59
- var _a, _b;
60
- let newPredicates = [];
61
- if (predicate) {
62
- newPredicates = (_b = (_a = props.data.Rule) === null || _a === void 0 ? void 0 : _a.Predicates) === null || _b === void 0 ? void 0 : _b.map((prevPredicate) => {
63
- if (prevPredicate === predicate) {
64
- return newPredicateDef;
65
- }
66
- return prevPredicate;
67
- });
68
- }
69
- else {
70
- // no previous predicate, e.g. it was cleared
71
- newPredicates = [newPredicateDef];
72
- }
73
- props.onChange(Object.assign(Object.assign({}, props.data), { Rule: {
74
- Predicates: newPredicates,
75
- } }));
76
- }, onClear: handleClear })),
77
- React.createElement(SimpleButton_1.default, { disabled: !predicate, ml: 2, onClick: handleClear, icon: "delete" }))));
78
- }),
79
- showDocumentationLinks && (React.createElement(HelpBlock_1.default, { "data-name": "query-documentation", mt: 3, mb: 2, style: {
80
- fontSize: 'var(--ab-font-size-3)',
81
- padding: 0,
82
- } },
83
- React.createElement(ButtonInfo_1.ButtonInfo, { mr: 2, onClick: () => window.open(DocumentationLinkConstants_1.PredicateDocsLink, '_blank') }),
84
- "See Predicate documentation for more details and examples"))));
85
- };
86
- exports.PredicatesEditor = PredicatesEditor;