@adaptabletools/adaptable 14.0.3 → 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.
- package/base.css +7 -1
- package/base.css.map +1 -1
- package/bundle.cjs.js +170 -169
- package/index.css +76 -62
- package/index.css.map +1 -1
- package/package.json +2 -2
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableOptions/ActionOptions.d.ts +3 -0
- package/src/AdaptableOptions/AdaptablePlugin.d.ts +3 -0
- package/src/AdaptableOptions/AdaptablePlugin.js +3 -0
- package/src/AdaptableOptions/ChartingOptions.d.ts +1 -1
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +26 -26
- package/src/AdaptableOptions/ExportOptions.d.ts +17 -3
- package/src/Api/CalculatedColumnApi.d.ts +9 -0
- package/src/Api/ChartingApi.d.ts +41 -14
- package/src/Api/ColumnApi.d.ts +4 -0
- package/src/Api/DataSetApi.d.ts +2 -2
- package/src/Api/EventApi.d.ts +15 -1
- package/src/Api/Events/ChartStateChangeInfo.d.ts +5 -0
- package/src/Api/Events/ChartStateChangeInfo.js +2 -0
- package/src/Api/ExportApi.d.ts +5 -0
- package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +2 -0
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +24 -0
- package/src/Api/Implementation/ChartingApiImpl.d.ts +16 -2
- package/src/Api/Implementation/ChartingApiImpl.js +54 -2
- package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ColumnApiImpl.js +3 -0
- package/src/Api/Implementation/ExportApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ExportApiImpl.js +10 -0
- package/src/Api/Implementation/PredicateApiImpl.d.ts +6 -4
- package/src/Api/Implementation/PredicateApiImpl.js +20 -1
- package/src/Api/Implementation/QueryApiImpl.js +8 -2
- package/src/Api/Internal/AdaptableInternalApi.d.ts +7 -1
- package/src/Api/Internal/AdaptableInternalApi.js +2 -1
- package/src/Api/Internal/AlertInternalApi.js +1 -1
- package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +2 -0
- package/src/Api/Internal/CalculatedColumnInternalApi.js +9 -0
- package/src/Api/Internal/ChartingInternalApi.d.ts +6 -0
- package/src/Api/Internal/ChartingInternalApi.js +24 -0
- package/src/Api/Internal/FormatColumnInternalApi.d.ts +5 -0
- package/src/Api/Internal/FormatColumnInternalApi.js +25 -1
- package/src/Api/PredicateApi.d.ts +17 -1
- package/src/PredefinedConfig/AlertState.d.ts +5 -2
- package/src/PredefinedConfig/Common/AdaptableAlert.d.ts +6 -0
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +15 -11
- package/src/PredefinedConfig/Common/AdaptableForm.d.ts +6 -0
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +6 -0
- package/src/PredefinedConfig/Common/AdaptableQuery.d.ts +15 -0
- package/src/PredefinedConfig/Common/Enums.d.ts +2 -1
- package/src/PredefinedConfig/Common/Enums.js +1 -0
- package/src/PredefinedConfig/Common/FDC3Context.d.ts +3 -0
- package/src/PredefinedConfig/Common/Types.d.ts +21 -6
- package/src/PredefinedConfig/Common/Types.js +1 -3
- package/src/PredefinedConfig/FlashingCellState.d.ts +2 -2
- package/src/PredefinedConfig/FormatColumnState.d.ts +3 -2
- package/src/PredefinedConfig/FreeTextColumnState.d.ts +1 -1
- package/src/PredefinedConfig/PredefinedConfig.d.ts +4 -4
- package/src/PredefinedConfig/ThemeState.d.ts +0 -4
- package/src/Redux/ActionsReducers/PopupRedux.d.ts +2 -0
- package/src/Redux/ActionsReducers/PopupRedux.js +2 -0
- package/src/Redux/ActionsReducers/StatusBarRedux.d.ts +2 -2
- package/src/Redux/ActionsReducers/StatusBarRedux.js +4 -4
- package/src/Redux/Store/AdaptableStore.js +1 -11
- package/src/Strategy/AlertModule.js +7 -3
- package/src/Strategy/ChartingModule.js +5 -3
- package/src/Strategy/ExportModule.d.ts +1 -0
- package/src/Strategy/ExportModule.js +43 -0
- package/src/Strategy/FlashingCellModule.js +1 -1
- package/src/Strategy/FormatColumnModule.js +7 -2
- package/src/Strategy/Interface/IModule.d.ts +1 -1
- package/src/Strategy/LayoutModule.js +8 -1
- package/src/Strategy/StyledColumnModule.js +5 -0
- package/src/Strategy/ThemeModule.js +8 -2
- package/src/Strategy/Utilities/Alert/getAlertPreviewViewItems.js +2 -2
- package/src/Strategy/Utilities/Alert/getAlertTypeViewItems.d.ts +5 -0
- package/src/Strategy/Utilities/Alert/getAlertTypeViewItems.js +13 -0
- package/src/Strategy/Utilities/getObjectTagsViewItems.js +3 -3
- package/src/Utilities/Constants/ModuleConstants.d.ts +0 -3
- package/src/Utilities/Constants/ModuleConstants.js +2 -5
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +1 -0
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +3 -1
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +64 -3
- package/src/Utilities/Interface/MessagePopups.d.ts +1 -0
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +13 -0
- package/src/Utilities/Services/ChartingService.d.ts +8 -0
- package/src/Utilities/Services/ChartingService.js +15 -0
- package/src/Utilities/Services/ReportService.js +1 -1
- package/src/View/AdaptableViewFactory.js +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +3 -2
- package/src/View/Alert/Utilities/getAlertType.d.ts +15 -0
- package/src/View/Alert/Utilities/getAlertType.js +58 -0
- package/src/View/Alert/Utilities/getAvailablePredicates.d.ts +3 -0
- package/src/View/Alert/Utilities/getAvailablePredicates.js +19 -0
- package/src/View/Alert/Utilities/getDefaultAlertDefinition.d.ts +37 -0
- package/src/View/Alert/Utilities/getDefaultAlertDefinition.js +32 -0
- package/src/View/Alert/Utilities/mapAlertDefinition.d.ts +2 -0
- package/src/View/Alert/Utilities/mapAlertDefinition.js +38 -0
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.d.ts +4 -2
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +18 -11
- package/src/View/Alert/Wizard/AlertButtonsEditor.d.ts +2 -0
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +15 -6
- package/src/View/Alert/Wizard/AlertMessageWizardSection.d.ts +10 -0
- package/src/View/Alert/Wizard/AlertMessageWizardSection.js +57 -0
- package/src/View/Alert/Wizard/{AlertDisplayWizardSection.d.ts → AlertNotificationWizardSection.d.ts} +7 -5
- package/src/View/Alert/Wizard/{AlertDisplayWizardSection.js → AlertNotificationWizardSection.js} +12 -50
- package/src/View/Alert/Wizard/AlertRulesWizardSection.d.ts +7 -4
- package/src/View/Alert/Wizard/AlertRulesWizardSection.js +66 -6
- package/src/View/Alert/Wizard/AlertScopeWizardSection.d.ts +2 -0
- package/src/View/Alert/Wizard/AlertScopeWizardSection.js +41 -2
- package/src/View/Alert/Wizard/AlertTypeWizardSection.d.ts +9 -0
- package/src/View/Alert/Wizard/AlertTypeWizardSection.js +27 -0
- package/src/View/Alert/Wizard/AlertWizard.js +53 -98
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.d.ts +1 -6
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +4 -39
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +1 -1
- package/src/View/{Components/Charting → Charting}/ChartingStatusBarPopover.d.ts +0 -0
- package/src/View/{Components/Charting → Charting}/ChartingStatusBarPopover.js +2 -2
- package/src/View/{Components/Charting → Charting}/ChartingViewPanel.d.ts +1 -1
- package/src/View/{Components/Charting → Charting}/ChartingViewPanel.js +0 -0
- package/src/View/{Components/Charting → Charting}/ChartingWizard/ChartingWizard.d.ts +2 -2
- package/src/View/{Components/Charting → Charting}/ChartingWizard/ChartingWizard.js +12 -2
- package/src/View/{Components/Charting → Charting}/ChartingWizard/PreviewChartSection.d.ts +1 -1
- package/src/View/{Components/Charting → Charting}/ChartingWizard/PreviewChartSection.js +2 -2
- package/src/View/{Components/Charting → Charting}/ChartingWizard/SettingsSection.d.ts +1 -1
- package/src/View/{Components/Charting → Charting}/ChartingWizard/SettingsSection.js +4 -4
- package/src/View/{Components/Charting → Charting}/DeleteChartButton.d.ts +1 -1
- package/src/View/{Components/Charting → Charting}/DeleteChartButton.js +3 -3
- package/src/View/{Components/Charting → Charting}/EditChartButton.d.ts +1 -1
- package/src/View/{Components/Charting → Charting}/EditChartButton.js +3 -3
- package/src/View/{Components/Charting → Charting}/ShowChartButton.d.ts +1 -1
- package/src/View/{Components/Charting → Charting}/ShowChartButton.js +5 -5
- package/src/View/{Components/Charting → Charting}/useChartState.d.ts +1 -1
- package/src/View/{Components/Charting → Charting}/useChartState.js +5 -5
- package/src/View/{Components/Charting → Charting}/useChartingElements.d.ts +1 -1
- package/src/View/{Components/Charting → Charting}/useChartingElements.js +6 -6
- package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicateEditor.d.ts +12 -0
- package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicateEditor.js +85 -0
- package/src/View/Components/EntityRulesEditor/{PredicatesEditor.d.ts → EntityRulePredicatesEditor/EntityRulePredicatesEditor.d.ts} +6 -4
- package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicatesEditor.js +87 -0
- package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/index.d.ts +1 -0
- package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/index.js +5 -0
- package/src/View/Components/EntityRulesEditor/Utilities.js +7 -1
- package/src/View/Components/EntityRulesEditor/index.d.ts +4 -2
- package/src/View/Components/EntityRulesEditor/index.js +27 -10
- package/src/View/Components/NewScopeComponent.d.ts +9 -5
- package/src/View/Components/NewScopeComponent.js +19 -10
- package/src/View/Components/Popups/WindowPopups/WindowPopups.js +2 -2
- package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +1 -0
- package/src/View/Components/Popups/WindowPopups/windowFactory.js +4 -1
- package/src/View/Components/PredicateEditor/PredicateEditor.js +16 -5
- package/src/View/Components/PreviewResultsPanel.js +30 -3
- package/src/View/CustomSort/Wizard/CustomSortWizard.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +3 -0
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +1 -1
- package/src/View/Export/ExportTablePopup.d.ts +3 -0
- package/src/View/Export/ExportTablePopup.js +59 -0
- package/src/View/Export/Wizard/NewReportWizard.js +1 -1
- package/src/View/Export/Wizard/ReportColumnsWizardSection.js +1 -1
- package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +1 -1
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +1 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +1 -1
- package/src/View/GridInfo/GridInfoPopup.js +1 -1
- package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +1 -1
- package/src/View/Query/Wizard/NamedQueryWizard.js +1 -1
- package/src/View/Schedule/Wizard/ScheduleWizard.js +1 -1
- package/src/View/Shortcut/Wizard/ShortcutWizard.js +1 -1
- package/src/View/StatusBar/StatusBarPanel.d.ts +3 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +7 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +5 -5
- package/src/View/TeamSharing/TeamSharingApplyButton.js +1 -1
- package/src/View/Theme/ThemeStatusPanelPopover.js +10 -2
- package/src/View/Wizard/TypeRadio.d.ts +7 -0
- package/src/View/Wizard/TypeRadio.js +12 -0
- package/src/agGrid/Adaptable.d.ts +3 -1
- package/src/agGrid/Adaptable.js +28 -4
- package/src/agGrid/agGridHelper.d.ts +1 -0
- package/src/agGrid/agGridHelper.js +15 -0
- package/src/components/ExpressionEditor/EditorInputWithWhereClause.js +4 -0
- package/src/components/ExpressionEditor/editorButtonsAggregatedBoolean.js +5 -0
- package/src/components/ExpressionEditor/editorButtonsAggregatedScalar.js +5 -0
- package/src/components/icons/index.js +4 -0
- package/src/components/icons/visibility-off.d.ts +3 -0
- package/src/components/icons/visibility-off.js +7 -0
- package/src/components/icons/visibility.d.ts +3 -0
- package/src/components/icons/visibility.js +8 -0
- package/src/metamodel/adaptable.metamodel.d.ts +124 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +4 -4
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.d.ts +0 -9
- package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +0 -30
- 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.
|
|
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.
|
|
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;
|