@adaptabletools/adaptable 13.0.0-canary.2 → 13.0.0-canary.20
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/agGrid.d.ts +23 -1
- package/agGrid.js +23 -1
- package/base.css +1232 -733
- package/base.css.map +1 -0
- package/bundle.cjs.js +191 -174
- package/index.css +1250 -734
- package/index.css.map +1 -0
- package/package.json +5 -5
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +7 -3
- package/src/AdaptableOptions/AdaptableOptions.d.ts +0 -2
- package/src/AdaptableOptions/AdaptableQLOptions.d.ts +136 -27
- package/src/AdaptableOptions/ExportOptions.d.ts +2 -2
- package/src/AdaptableOptions/FinsemblePluginOptions.d.ts +32 -0
- package/src/AdaptableOptions/FinsemblePluginOptions.js +2 -0
- package/src/AdaptableOptions/LayoutOptions.d.ts +2 -1
- package/src/Api/AdaptableApi.d.ts +2 -0
- package/src/Api/ColumnApi.d.ts +8 -2
- package/src/Api/ConditionalStyleApi.d.ts +20 -42
- package/src/Api/ConfigApi.d.ts +1 -2
- package/src/Api/ExportApi.d.ts +6 -6
- package/src/Api/FinsembleApi.d.ts +10 -0
- package/src/Api/FinsembleApi.js +2 -0
- package/src/Api/FormatColumnApi.d.ts +76 -59
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -0
- package/src/Api/Implementation/AdaptableApiImpl.js +2 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +2 -1
- package/src/Api/Implementation/ColumnApiImpl.js +18 -14
- package/src/Api/Implementation/ExportApiImpl.d.ts +4 -4
- package/src/Api/Implementation/ExportApiImpl.js +14 -14
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +36 -17
- package/src/Api/Implementation/FormatColumnApiImpl.js +101 -185
- package/src/Api/Implementation/PluginsApiImpl.d.ts +2 -0
- package/src/Api/Implementation/PluginsApiImpl.js +6 -0
- package/src/Api/Implementation/QueryLanguageApiImpl.d.ts +2 -3
- package/src/Api/Implementation/QueryLanguageApiImpl.js +9 -18
- package/src/Api/Implementation/ScopeApiImpl.d.ts +1 -1
- package/src/Api/Implementation/StyledColumnApiImpl.d.ts +25 -0
- package/src/Api/Implementation/StyledColumnApiImpl.js +193 -0
- package/src/Api/Implementation/SystemStatusApiImpl.js +1 -2
- package/src/Api/Implementation/ToolPanelApiImpl.d.ts +3 -1
- package/src/Api/Implementation/ToolPanelApiImpl.js +8 -0
- package/src/Api/PluginsApi.d.ts +5 -0
- package/src/Api/QueryLanguageApi.d.ts +3 -7
- package/src/Api/ScopeApi.d.ts +1 -1
- package/src/Api/StyledColumnApi.d.ts +106 -0
- package/src/Api/StyledColumnApi.js +2 -0
- package/src/Api/ToolPanelApi.d.ts +10 -1
- package/src/PredefinedConfig/AdaptableState.d.ts +2 -0
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +37 -37
- package/src/PredefinedConfig/Common/Types.d.ts +3 -3
- package/src/PredefinedConfig/Common/Types.js +1 -0
- package/src/PredefinedConfig/ConditionalStyleState.d.ts +10 -19
- package/src/PredefinedConfig/FormatColumnState.d.ts +21 -92
- package/src/PredefinedConfig/PredefinedConfig.d.ts +6 -0
- package/src/PredefinedConfig/StyledColumnState.d.ts +119 -0
- package/src/PredefinedConfig/StyledColumnState.js +2 -0
- package/src/Redux/ActionsReducers/ConditionalStyleRedux.d.ts +0 -18
- package/src/Redux/ActionsReducers/ConditionalStyleRedux.js +0 -18
- package/src/Redux/ActionsReducers/FormatColumnRedux.d.ts +14 -0
- package/src/Redux/ActionsReducers/FormatColumnRedux.js +43 -1
- package/src/Redux/ActionsReducers/PluginsRedux.d.ts +4 -4
- package/src/Redux/ActionsReducers/PluginsRedux.js +5 -5
- package/src/Redux/ActionsReducers/StyledColumnRedux.d.ts +49 -0
- package/src/Redux/ActionsReducers/StyledColumnRedux.js +92 -0
- package/src/Redux/Store/AdaptableStore.js +9 -0
- package/src/Strategy/ConditionalStyleModule.d.ts +0 -2
- package/src/Strategy/ConditionalStyleModule.js +3 -27
- package/src/Strategy/DataChangeHistoryModule.d.ts +1 -0
- package/src/Strategy/DataChangeHistoryModule.js +12 -0
- package/src/Strategy/FormatColumnModule.d.ts +3 -10
- package/src/Strategy/FormatColumnModule.js +42 -183
- package/src/Strategy/Interface/IModule.d.ts +1 -0
- package/src/Strategy/StyledColumnModule.d.ts +24 -0
- package/src/Strategy/StyledColumnModule.js +165 -0
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.d.ts +1 -1
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +3 -4
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnStyleViewItems.js +1 -16
- package/src/Strategy/Utilities/getScopeViewItems.js +1 -1
- package/src/Utilities/Constants/ModuleConstants.d.ts +3 -0
- package/src/Utilities/Constants/ModuleConstants.js +4 -1
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +6 -12
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -0
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.d.ts +3 -2
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +3 -1
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +1 -0
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +3 -1
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.d.ts +1 -0
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +3 -1
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.d.ts +2 -4
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -0
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +3 -1
- package/src/Utilities/Extensions/TypeExtensions.d.ts +1 -0
- package/src/Utilities/Extensions/TypeExtensions.js +5 -0
- package/src/Utilities/ObjectFactory.d.ts +5 -2
- package/src/Utilities/ObjectFactory.js +14 -7
- package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +14 -4
- package/src/Utilities/Services/{LicenseService.d.ts → LicenseService/index.d.ts} +3 -3
- package/src/Utilities/Services/LicenseService/index.js +1 -0
- package/src/Utilities/Services/LicenseService/shouldLogThankYouMessage.d.ts +1 -0
- package/src/Utilities/Services/LicenseService/shouldLogThankYouMessage.js +15 -0
- package/src/Utilities/Services/ModuleService.js +2 -0
- package/src/Utilities/Services/QueryLanguageService.d.ts +3 -3
- package/src/Utilities/Services/QueryLanguageService.js +88 -39
- package/src/Utilities/Services/ReportService.js +6 -6
- package/src/Utilities/license/LicenseDetails.d.ts +1 -1
- package/src/Utilities/license/decode.d.ts +1 -0
- package/src/Utilities/license/decode.js +1 -1
- package/src/View/AdaptablePopover/index.js +1 -1
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +9 -9
- package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +6 -5
- package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +3 -3
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +3 -3
- package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
- package/src/View/CalculatedColumn/CalculatedColumnSummary.d.ts +1 -1
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +1 -1
- package/src/View/Components/AdaptableObjectRow/index.js +1 -6
- package/src/View/Components/Buttons/ButtonInfo.d.ts +1 -3
- package/src/View/Components/Buttons/ButtonInfo.js +3 -5
- package/src/View/Components/EntityRulesEditor/index.d.ts +2 -1
- package/src/View/Components/EntityRulesEditor/index.js +36 -35
- package/src/View/Components/FilterForm/FilterForm.js +11 -16
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +2 -1
- package/src/View/Components/FilterForm/QuickFilterForm.js +7 -13
- package/src/View/Components/NewScopeComponent.js +3 -3
- package/src/View/Components/Panels/PanelWithButton.js +1 -5
- package/src/View/Components/Panels/PanelWithImage.js +1 -5
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +2 -2
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.d.ts +1 -0
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +3 -16
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +1 -0
- package/src/View/Components/Popups/AdaptablePopup/PopupPanel.js +1 -1
- package/src/View/Components/Popups/AdaptablePopupTeamSharing.js +5 -5
- package/src/View/Components/RangesComponent.d.ts +8 -1
- package/src/View/Components/RangesComponent.js +60 -24
- package/src/View/Components/ScopeComponent.js +6 -6
- package/src/View/Components/Selectors/ColumnSelector.d.ts +1 -0
- package/src/View/Components/Selectors/ColumnSelector.js +2 -1
- package/src/View/Components/Selectors/ColumnValueSelector.js +2 -2
- package/src/View/Components/StyleComponent.js +14 -19
- package/src/View/Components/ToolPanel/AdaptableToolPanel.d.ts +3 -9
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +25 -10
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
- package/src/View/Components/ToolPanel/ToolPanelPopup.d.ts +1 -1
- package/src/View/ConditionalStyle/ConditionalStylePopupHeader.d.ts +2 -0
- package/src/View/ConditionalStyle/ConditionalStylePopupHeader.js +18 -0
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleRuleWizardSection.js +3 -3
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.js +1 -1
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.js +1 -11
- package/src/View/DataSet/DataSetSelector.js +1 -1
- package/src/View/DataSet/DataSetViewPanel.d.ts +1 -1
- package/src/View/Export/ExportViewPanel.d.ts +1 -1
- package/src/View/Export/ExportViewPanel.js +4 -4
- package/src/View/Export/ReportExportDropdown.js +1 -1
- package/src/View/Export/Wizard/ReportNameWizardSection.js +10 -11
- package/src/View/Filter/FilterSummary.d.ts +1 -1
- package/src/View/Filter/FilterViewPanel.d.ts +1 -1
- package/src/View/FlashingCell/FlashingCellStyle.js +3 -3
- package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +3 -3
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +6 -6
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +4 -4
- package/src/View/FormatColumn/FormatColumnSummary.js +1 -1
- package/src/View/FormatColumn/MoveFormatColumn.d.ts +7 -0
- package/src/View/FormatColumn/MoveFormatColumn.js +27 -0
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +28 -28
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +8 -0
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +28 -0
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +21 -3
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +2 -28
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +3 -3
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +6 -300
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +15 -9
- package/src/View/FormatColumn/Wizard/constants.d.ts +1 -0
- package/src/View/FormatColumn/Wizard/constants.js +4 -0
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +7 -7
- package/src/View/Layout/LayoutRadioSelector.js +1 -1
- package/src/View/Layout/LayoutViewPanel.d.ts +1 -1
- package/src/View/Layout/Wizard/Components/ColumnLabels.js +1 -1
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +1 -1
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +7 -6
- package/src/View/Layout/Wizard/sections/SettingsSection.js +2 -2
- package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.js +1 -1
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +3 -3
- package/src/View/Query/QueryViewPanel.d.ts +1 -1
- package/src/View/Query/Wizard/NamedQuerySettingsWizardSection.js +1 -1
- package/src/View/QuickSearch/QuickSearchPopup.js +2 -2
- package/src/View/QuickSearch/QuickSearchViewPanel.d.ts +1 -1
- package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +5 -5
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsGlue42.js +1 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsIPushPull.js +5 -5
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsOpenFin.js +1 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +5 -5
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +2 -2
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +3 -3
- package/src/View/SmartEdit/SmartEditPopup.js +3 -3
- package/src/View/SpecialColumnSettingsWizardStep.js +10 -10
- package/src/View/StateManagement/StateManagementPopup.js +4 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.d.ts +7 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +77 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.d.ts +9 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +65 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection.d.ts +9 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection.js +234 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.d.ts +7 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +59 -0
- package/src/View/SystemStatus/SystemStatusEntityRow.js +4 -6
- package/src/View/SystemStatus/SystemStatusViewPanel.d.ts +1 -1
- package/src/View/TeamSharing/SharedEntityObjectView.js +1 -1
- package/src/View/TeamSharing/TeamSharingApplyButton.js +1 -1
- package/src/View/Theme/ThemePopup.js +1 -1
- package/src/View/Wizard/OnePageAdaptableWizard.d.ts +1 -1
- package/src/View/Wizard/OnePageAdaptableWizard.js +1 -2
- package/src/agGrid/ActionColumnRenderer.d.ts +3 -0
- package/src/agGrid/ActionColumnRenderer.js +96 -64
- package/src/agGrid/Adaptable.d.ts +13 -9
- package/src/agGrid/Adaptable.js +207 -221
- package/src/agGrid/CheckboxRenderer.js +1 -1
- package/src/agGrid/FilterWrapper.js +60 -16
- package/src/agGrid/FloatingFilterWrapper.d.ts +2 -2
- package/src/agGrid/FloatingFilterWrapper.js +71 -32
- package/src/agGrid/PercentBarRenderer.d.ts +6 -2
- package/src/agGrid/PercentBarRenderer.js +19 -17
- package/src/agGrid/agGridHelper.d.ts +6 -2
- package/src/agGrid/agGridHelper.js +16 -15
- package/src/agGrid/createAgStatusPanelComponent.d.ts +1 -1
- package/src/agGrid/createAgStatusPanelComponent.js +17 -0
- package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +5 -1
- package/src/agGrid/editors/AdaptableDateEditor/index.js +87 -20
- package/src/agGrid/editors/AdaptableNumberEditor/InternalAdaptableNumberEditor.js +1 -1
- package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +3 -3
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +81 -30
- package/src/agGrid/weightedAverage.js +19 -11
- package/src/components/CheckBox/index.js +7 -2
- package/src/components/Datepicker/index.d.ts +1 -1
- package/src/components/ExpressionEditor/BaseEditorInput.d.ts +1 -1
- package/src/components/ExpressionEditor/BaseEditorInput.js +13 -32
- package/src/components/ExpressionEditor/EditorInput.js +1 -1
- package/src/components/ExpressionEditor/EditorInputWithWhereClause.js +1 -1
- package/src/components/ExpressionEditor/index.js +9 -17
- package/src/components/FormLayout/index.js +1 -1
- package/src/components/StylePreview.js +2 -1
- package/src/components/icons/brush.d.ts +3 -0
- package/src/components/icons/brush.js +7 -0
- package/src/components/icons/index.js +2 -0
- package/src/metamodel/adaptable.metamodel.d.ts +191 -95
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/parser/src/types.d.ts +6 -3
- package/src/renderReactRoot.d.ts +2 -0
- package/src/renderReactRoot.js +11 -9
- package/src/types.d.ts +8 -4
- package/themes/dark.css +8 -4
- package/themes/dark.css.map +1 -0
- package/themes/light.css +4 -1
- package/themes/light.css.map +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/AdaptableComponents.d.ts +0 -1
- package/src/AdaptableComponents.js +0 -5
- package/src/Utilities/Services/LicenseService.js +0 -1
|
@@ -5,7 +5,13 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const parser = tslib_1.__importStar(require("../../parser/src"));
|
|
6
6
|
const rxjs_1 = require("rxjs");
|
|
7
7
|
const LoggingHelper_1 = require("../Helpers/LoggingHelper");
|
|
8
|
+
const aggregatedScalarExpressionFunctions_1 = require("../ExpressionFunctions/aggregatedScalarExpressionFunctions");
|
|
9
|
+
const aggregatedBooleanExpressionFunctions_1 = require("../ExpressionFunctions/aggregatedBooleanExpressionFunctions");
|
|
8
10
|
const AggregatedScalarLiveValue_1 = require("./AggregatedScalarLiveValue");
|
|
11
|
+
const booleanExpressionFunctions_1 = require("../ExpressionFunctions/booleanExpressionFunctions");
|
|
12
|
+
const scalarExpressionFunctions_1 = require("../ExpressionFunctions/scalarExpressionFunctions");
|
|
13
|
+
const observableExpressionFunctions_1 = require("../ExpressionFunctions/observableExpressionFunctions");
|
|
14
|
+
const TypeExtensions_1 = require("../Extensions/TypeExtensions");
|
|
9
15
|
class QueryLanguageService {
|
|
10
16
|
constructor(adaptableApi) {
|
|
11
17
|
this.adaptableApi = adaptableApi;
|
|
@@ -16,7 +22,7 @@ class QueryLanguageService {
|
|
|
16
22
|
this.cacheModuleSpecificExpressionFunctions = new Map();
|
|
17
23
|
}
|
|
18
24
|
evaluateBooleanExpression(expression, module, rowNode) {
|
|
19
|
-
const moduleExpressionFunctions = this.
|
|
25
|
+
const moduleExpressionFunctions = this.getModuleExpressionFunctionsMap(module);
|
|
20
26
|
const booleanAndScalarFunctions = this.getBooleanAndScalarFunctions(moduleExpressionFunctions);
|
|
21
27
|
return parser.evaluate(expression, {
|
|
22
28
|
node: rowNode,
|
|
@@ -30,7 +36,7 @@ class QueryLanguageService {
|
|
|
30
36
|
return this.evaluateBooleanExpression(expression, module, rowNode);
|
|
31
37
|
}
|
|
32
38
|
evaluateAggregatedScalarExpression(expression, module) {
|
|
33
|
-
const aggregatedScalarFunctions = this.
|
|
39
|
+
const aggregatedScalarFunctions = this.getModuleExpressionFunctionsMap(module).aggregatedScalarFunctions;
|
|
34
40
|
return parser.evaluate(expression, {
|
|
35
41
|
node: null,
|
|
36
42
|
adaptableApi: this.adaptableApi,
|
|
@@ -39,7 +45,7 @@ class QueryLanguageService {
|
|
|
39
45
|
});
|
|
40
46
|
}
|
|
41
47
|
evaluateObservableExpression(reactiveExpression, module) {
|
|
42
|
-
const moduleExpressionFunctions = this.
|
|
48
|
+
const moduleExpressionFunctions = this.getModuleExpressionFunctionsMap(module);
|
|
43
49
|
const booleanAndScalarFunctions = this.getBooleanAndScalarFunctions(moduleExpressionFunctions);
|
|
44
50
|
const reactiveExpression$ = parser.evaluate(reactiveExpression, {
|
|
45
51
|
node: reactiveExpression,
|
|
@@ -51,12 +57,12 @@ class QueryLanguageService {
|
|
|
51
57
|
return reactiveExpression$;
|
|
52
58
|
}
|
|
53
59
|
evaluateAggregatedBooleanExpression(aggregationExpression, module) {
|
|
54
|
-
const
|
|
55
|
-
const booleanAndScalarFunctions = this.getBooleanAndScalarFunctions(
|
|
60
|
+
const moduleExpressionFunctionsMap = this.getModuleExpressionFunctionsMap(module);
|
|
61
|
+
const booleanAndScalarFunctions = this.getBooleanAndScalarFunctions(moduleExpressionFunctionsMap);
|
|
56
62
|
const aggregationEvaluation = parser.evaluate(aggregationExpression, {
|
|
57
63
|
node: aggregationExpression,
|
|
58
64
|
adaptableApi: this.adaptableApi,
|
|
59
|
-
functions:
|
|
65
|
+
functions: moduleExpressionFunctionsMap.aggregatedBooleanFunctions,
|
|
60
66
|
whereClauseFunctions: booleanAndScalarFunctions,
|
|
61
67
|
evaluateCustomQueryVariable: this.evaluateCustomQueryVariable,
|
|
62
68
|
});
|
|
@@ -89,7 +95,7 @@ class QueryLanguageService {
|
|
|
89
95
|
}
|
|
90
96
|
const { ast } = parser.parse(expression.trim());
|
|
91
97
|
const rootFn = ast[ast.length - 1];
|
|
92
|
-
const moduleExpressionFunctions = this.
|
|
98
|
+
const moduleExpressionFunctions = this.getModuleExpressionFunctionsMap(module);
|
|
93
99
|
const booleanAndScalarFunctions = this.getBooleanAndScalarFunctions(moduleExpressionFunctions);
|
|
94
100
|
if (rootFn.type === undefined || booleanAndScalarFunctions[rootFn.type] === undefined) {
|
|
95
101
|
const result = {
|
|
@@ -268,43 +274,86 @@ class QueryLanguageService {
|
|
|
268
274
|
}
|
|
269
275
|
// Returns the ExpressionFunctions available for the given Module as specified in the `QueryLanguageOptions.moduleExpressionFunctions`
|
|
270
276
|
// if there are no specific functions defined, it falls back to the default values
|
|
271
|
-
|
|
272
|
-
var _a, _b, _c
|
|
277
|
+
getModuleExpressionFunctionsMap(module) {
|
|
278
|
+
var _a, _b, _c;
|
|
279
|
+
const expressionOptions = this.adaptableApi.internalApi.getAdaptableOptions().adaptableQLOptions.expressionOptions;
|
|
280
|
+
if (module) {
|
|
281
|
+
let cachedResult = this.cacheModuleSpecificExpressionFunctions.get(module);
|
|
282
|
+
if (cachedResult) {
|
|
283
|
+
return cachedResult;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
const generalBooleanExpressionFunctions = this.extractMappedExpressionFunctions(booleanExpressionFunctions_1.booleanExpressionFunctions, expressionOptions.systemBooleanFunctions, expressionOptions.customBooleanFunctions);
|
|
287
|
+
const generalScalarExpressionFunctions = this.extractMappedExpressionFunctions(scalarExpressionFunctions_1.scalarExpressionFunctions, expressionOptions.systemScalarFunctions, expressionOptions.customScalarFunctions);
|
|
288
|
+
const generalObservableExpressionFunctions = this.extractMappedExpressionFunctions(observableExpressionFunctions_1.observableExpressionFunctions, expressionOptions.systemObservableFunctions);
|
|
289
|
+
const generalAggregatedBooleanExpressionFunctions = this.extractMappedExpressionFunctions(aggregatedBooleanExpressionFunctions_1.aggregatedBooleanExpressionFunctions, expressionOptions.systemAggregatedBooleanFunctions);
|
|
290
|
+
const generalAggregatedScalarExpressionFunctions = this.extractMappedExpressionFunctions(aggregatedScalarExpressionFunctions_1.aggregatedScalarExpressionFunctions, expressionOptions.systemAggregatedScalarFunctions);
|
|
273
291
|
if (!module) {
|
|
274
292
|
(0, LoggingHelper_1.LogAdaptableInfo)(`QueryLanguageService.getModuleExpressionFunctions() was called with an undefined 'module' param, this should never happen`);
|
|
275
293
|
return {
|
|
276
|
-
booleanFunctions:
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
294
|
+
booleanFunctions: generalBooleanExpressionFunctions,
|
|
295
|
+
scalarFunctions: generalScalarExpressionFunctions,
|
|
296
|
+
observableFunctions: generalObservableExpressionFunctions,
|
|
297
|
+
aggregatedBooleanFunctions: generalAggregatedBooleanExpressionFunctions,
|
|
298
|
+
aggregatedScalarFunctions: generalAggregatedScalarExpressionFunctions,
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
let moduleExpressionFunctions;
|
|
302
|
+
if (typeof expressionOptions.moduleExpressionFunctions === 'function') {
|
|
303
|
+
const context = {
|
|
304
|
+
adaptableApi: this.adaptableApi,
|
|
305
|
+
module,
|
|
306
|
+
availableBooleanFunctionNames: (0, TypeExtensions_1.getTypedKeys)(generalBooleanExpressionFunctions),
|
|
307
|
+
availableScalarFunctionNames: (0, TypeExtensions_1.getTypedKeys)(generalScalarExpressionFunctions),
|
|
308
|
+
availableObservableFunctionNames: (0, TypeExtensions_1.getTypedKeys)(generalObservableExpressionFunctions),
|
|
309
|
+
availableAggregatedBooleanFunctionNames: (0, TypeExtensions_1.getTypedKeys)(generalAggregatedBooleanExpressionFunctions),
|
|
310
|
+
availableAggregatedScalarFunctionNames: (0, TypeExtensions_1.getTypedKeys)(generalAggregatedScalarExpressionFunctions),
|
|
286
311
|
};
|
|
312
|
+
moduleExpressionFunctions = (_a = expressionOptions.moduleExpressionFunctions(context)) !== null && _a !== void 0 ? _a : {};
|
|
287
313
|
}
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
return cachedResult;
|
|
314
|
+
else {
|
|
315
|
+
moduleExpressionFunctions = (_c = (_b = expressionOptions.moduleExpressionFunctions) === null || _b === void 0 ? void 0 : _b[module]) !== null && _c !== void 0 ? _c : {};
|
|
291
316
|
}
|
|
292
|
-
const
|
|
293
|
-
.moduleExpressionFunctions
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
.defaultScalarFunctions,
|
|
299
|
-
observableFunctions: (_e = moduleSpecificOptions.observableFunctions) !== null && _e !== void 0 ? _e : this.adaptableApi.internalApi.getAdaptableOptions().adaptableQLOptions.expressionOptions
|
|
300
|
-
.defaultObservableFunctions,
|
|
301
|
-
aggregatedBooleanFunctions: (_f = moduleSpecificOptions.aggregatedBooleanFunctions) !== null && _f !== void 0 ? _f : this.adaptableApi.internalApi.getAdaptableOptions().adaptableQLOptions.expressionOptions
|
|
302
|
-
.defaultAggregatedBooleanFunctions,
|
|
303
|
-
aggregatedScalarFunctions: (_g = moduleSpecificOptions.aggregatedScalarFunctions) !== null && _g !== void 0 ? _g : this.adaptableApi.internalApi.getAdaptableOptions().adaptableQLOptions.expressionOptions
|
|
304
|
-
.defaultAggregatedScalarFunctions,
|
|
317
|
+
const moduleExpressionFunctionsMap = {
|
|
318
|
+
booleanFunctions: this.extractMappedExpressionFunctions(generalBooleanExpressionFunctions, moduleExpressionFunctions.systemBooleanFunctions, moduleExpressionFunctions.customBooleanFunctions),
|
|
319
|
+
scalarFunctions: this.extractMappedExpressionFunctions(generalScalarExpressionFunctions, moduleExpressionFunctions.systemScalarFunctions, moduleExpressionFunctions.customScalarFunctions),
|
|
320
|
+
observableFunctions: this.extractMappedExpressionFunctions(generalObservableExpressionFunctions, moduleExpressionFunctions.systemObservableFunctions),
|
|
321
|
+
aggregatedBooleanFunctions: this.extractMappedExpressionFunctions(generalAggregatedBooleanExpressionFunctions, moduleExpressionFunctions.systemAggregatedBooleanFunctions),
|
|
322
|
+
aggregatedScalarFunctions: this.extractMappedExpressionFunctions(generalAggregatedScalarExpressionFunctions, moduleExpressionFunctions.systemAggregatedScalarFunctions),
|
|
305
323
|
};
|
|
306
|
-
this.cacheModuleSpecificExpressionFunctions.set(module,
|
|
307
|
-
return
|
|
324
|
+
this.cacheModuleSpecificExpressionFunctions.set(module, moduleExpressionFunctionsMap);
|
|
325
|
+
return moduleExpressionFunctionsMap;
|
|
326
|
+
}
|
|
327
|
+
extractMappedExpressionFunctions(availableExpressionFunctions, systemFunctions, customFunctions) {
|
|
328
|
+
const systemFunctionNames = typeof systemFunctions === 'function'
|
|
329
|
+
? systemFunctions({
|
|
330
|
+
adaptableApi: this.adaptableApi,
|
|
331
|
+
availableExpressionFunctionNames: (0, TypeExtensions_1.getTypedKeys)(availableExpressionFunctions),
|
|
332
|
+
})
|
|
333
|
+
: systemFunctions;
|
|
334
|
+
let generalExpressionFunctions = {};
|
|
335
|
+
// add system functions
|
|
336
|
+
if (Array.isArray(systemFunctionNames)) {
|
|
337
|
+
// add only system functions specified by user
|
|
338
|
+
systemFunctionNames.forEach((systemFunctionName) => {
|
|
339
|
+
generalExpressionFunctions[systemFunctionName] =
|
|
340
|
+
availableExpressionFunctions[systemFunctionName];
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
else {
|
|
344
|
+
// add ALL system functions
|
|
345
|
+
generalExpressionFunctions = Object.assign({}, availableExpressionFunctions);
|
|
346
|
+
}
|
|
347
|
+
const customFunctionDefinitions = typeof customFunctions === 'function'
|
|
348
|
+
? customFunctions({
|
|
349
|
+
adaptableApi: this.adaptableApi,
|
|
350
|
+
availableExpressionFunctionNames: (0, TypeExtensions_1.getTypedKeys)(generalExpressionFunctions),
|
|
351
|
+
})
|
|
352
|
+
: customFunctions;
|
|
353
|
+
if (customFunctionDefinitions) {
|
|
354
|
+
generalExpressionFunctions = Object.assign(Object.assign({}, generalExpressionFunctions), customFunctionDefinitions);
|
|
355
|
+
}
|
|
356
|
+
return generalExpressionFunctions;
|
|
308
357
|
}
|
|
309
358
|
evaluateCustomQueryVariable(functionName, args) {
|
|
310
359
|
var _a, _b, _c;
|
|
@@ -317,8 +366,8 @@ class QueryLanguageService {
|
|
|
317
366
|
? customQueryVariableDefinition(context)
|
|
318
367
|
: customQueryVariableDefinition;
|
|
319
368
|
}
|
|
320
|
-
getBooleanAndScalarFunctions(
|
|
321
|
-
return Object.assign(Object.assign({},
|
|
369
|
+
getBooleanAndScalarFunctions(moduleExpressionFunctionsMap) {
|
|
370
|
+
return Object.assign(Object.assign({}, moduleExpressionFunctionsMap.booleanFunctions), moduleExpressionFunctionsMap.scalarFunctions);
|
|
322
371
|
}
|
|
323
372
|
getExpressionCacheKey(expression, module) {
|
|
324
373
|
return `${module}::${expression}`;
|
|
@@ -91,7 +91,7 @@ class ReportService {
|
|
|
91
91
|
}
|
|
92
92
|
GetReportColumnScopeShortDescription(report) {
|
|
93
93
|
var _a, _b;
|
|
94
|
-
if (this.adaptableApi.exportApi.
|
|
94
|
+
if (this.adaptableApi.exportApi.isServerReport(report)) {
|
|
95
95
|
return ['[Custom Columns]'];
|
|
96
96
|
}
|
|
97
97
|
switch (report.ReportColumnScope) {
|
|
@@ -109,7 +109,7 @@ class ReportService {
|
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
GetReportColumnScopeLongDescription(report) {
|
|
112
|
-
if (this.adaptableApi.exportApi.
|
|
112
|
+
if (this.adaptableApi.exportApi.isServerReport(report)) {
|
|
113
113
|
return '[Custom Columns]';
|
|
114
114
|
}
|
|
115
115
|
switch (report.ReportColumnScope) {
|
|
@@ -124,7 +124,7 @@ class ReportService {
|
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
GetReportExpressionDescription(report, cols) {
|
|
127
|
-
if (this.adaptableApi.exportApi.
|
|
127
|
+
if (this.adaptableApi.exportApi.isServerReport(report)) {
|
|
128
128
|
return '[Custom Data]';
|
|
129
129
|
}
|
|
130
130
|
if (this.IsSystemReport(report.Name)) {
|
|
@@ -160,7 +160,7 @@ class ReportService {
|
|
|
160
160
|
GetReportColumnsForReport(report, includePrimaryKey = false) {
|
|
161
161
|
let reportColumns = [];
|
|
162
162
|
let gridColumns = this.adaptableApi.columnApi.getColumns();
|
|
163
|
-
if (this.adaptableApi.exportApi.
|
|
163
|
+
if (this.adaptableApi.exportApi.isServerReport(report)) {
|
|
164
164
|
return reportColumns;
|
|
165
165
|
}
|
|
166
166
|
// first get the cols depending on the Column Scope
|
|
@@ -204,8 +204,8 @@ class ReportService {
|
|
|
204
204
|
friendlyName: column.friendlyName,
|
|
205
205
|
dataType: column.dataType,
|
|
206
206
|
}));
|
|
207
|
-
if (this.adaptableApi.exportApi.
|
|
208
|
-
return this.adaptableApi.exportApi.
|
|
207
|
+
if (this.adaptableApi.exportApi.isServerReport(report)) {
|
|
208
|
+
return this.adaptableApi.exportApi.runServerReport(report.Name);
|
|
209
209
|
}
|
|
210
210
|
if (ArrayExtensions_1.default.IsNullOrEmpty(columns)) {
|
|
211
211
|
return { columns: [], rows: [] };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.decode=exports.fieldsToLicenseDetails=void 0;const e=require("./hashing"),t=()=>new Error("Invalid License")
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.decode=exports.fieldsToLicenseDetails=exports.GENERIC_APP_NAME=void 0;const e=require("./hashing"),t=()=>new Error("Invalid License");exports.GENERIC_APP_NAME="GenericAdaptableApp";const r=e=>{var r;const s=e.reduce(((e,t)=>(e.set(t.name,t.value),e)),new Map),o={start:new Date(s.get("StartDate")),end:new Date(s.get("EndDate")),owner:s.get("Owner"),appName:s.get("AppName")||exports.GENERIC_APP_NAME,timestamp:s.get("TS")?Number(s.get("TS")):0,trial:"true"===s.get("Trial"),ref:null!==(r=s.get("Ref"))&&void 0!==r?r:""};if(!(o.start&&o.end&&o.owner&&"boolean"==typeof o.trial&&o.ref))throw t();return o};exports.fieldsToLicenseDetails=r;const s=r=>{let s="",o=r.split("|").map((e=>{let[t,r]=e.split("=");return"C"===t&&(s=r),{name:t,value:r}}));if(!s)throw t();const a=s.split(",").reverse(),n=a.pop();a.forEach(((r,s)=>{const a=o[s];if((0,e.compute_string)(a.value)!==r)throw t()}));const i=[...o];i.pop();const p=i.map((e=>`${e.name}=${e.value}`)).join("|");if((0,e.compute_string)(p)!==n)throw t();return o=o.map((e=>Object.assign(Object.assign({},e),{value:decodeURI(e.value)}))),(0,exports.fieldsToLicenseDetails)(o)};exports.decode=s;
|
|
@@ -36,7 +36,7 @@ class AdaptablePopover extends React.Component {
|
|
|
36
36
|
return (React.createElement(rebass_1.Flex, { alignItems: "center", className: this.props.className },
|
|
37
37
|
React.createElement(OverlayTrigger_1.default, { showTriangle: true, render: () => popoverClickRootClose, showEvent: (this.props.showEvent || 'mouseenter'), hideEvent: (this.props.hideEvent || 'mouseleave'), style: {
|
|
38
38
|
overflow: 'visible',
|
|
39
|
-
}, defaultZIndex: 100000 }, useButton ? (React.createElement(ButtonInfo_1.ButtonInfo, { style: iconStyle, onClick: () => null, icon: showIcon && icon, tooltip: this.props.tooltipText }, this.props.children)) : (React.createElement("div", { title: this.props.tooltipText, tabIndex: 0, style: { cursor: 'pointer', display: 'inline-block' } },
|
|
39
|
+
}, defaultZIndex: 100000 }, useButton ? (React.createElement(ButtonInfo_1.ButtonInfo, { style: iconStyle, variant: "text", onClick: () => null, icon: showIcon && icon, tooltip: this.props.tooltipText }, this.props.children)) : (React.createElement("div", { title: this.props.tooltipText, tabIndex: 0, style: { cursor: 'pointer', display: 'inline-block' } },
|
|
40
40
|
this.props.children,
|
|
41
41
|
showIcon && React.createElement(icons_1.Icon, { name: icon }))))));
|
|
42
42
|
}
|
|
@@ -32,7 +32,7 @@ const HighlightStyle = (props) => {
|
|
|
32
32
|
},
|
|
33
33
|
},
|
|
34
34
|
];
|
|
35
|
-
return (React.createElement(
|
|
35
|
+
return (React.createElement(rebass_1.Box, { "data-name": props.dataName },
|
|
36
36
|
React.createElement(rebass_1.Flex, null,
|
|
37
37
|
React.createElement(CheckBox_1.CheckBox, { mr: 2, style: { alignItems: 'flex-start' }, checked: Boolean(props.highlight), onChange: (checked) => {
|
|
38
38
|
props.onChange(checked);
|
|
@@ -99,35 +99,35 @@ const AlertBehaviourWizardSection = (props) => {
|
|
|
99
99
|
return (React.createElement(Tabs_1.Tabs, null,
|
|
100
100
|
React.createElement(Tabs_1.Tabs.Tab, null, api.internalApi.getCorrectEnglishVariant('Behaviour')),
|
|
101
101
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
102
|
-
cellChangedAlert && (React.createElement(CheckBox_1.CheckBox, { style: { alignItems: 'flex-start' }, checked: AlertProperties.PreventEdit, onChange: (PreventEdit) => {
|
|
102
|
+
cellChangedAlert && (React.createElement(CheckBox_1.CheckBox, { "data-name": "prevet-cell-edit", style: { alignItems: 'flex-start' }, checked: AlertProperties.PreventEdit, onChange: (PreventEdit) => {
|
|
103
103
|
onChange({
|
|
104
104
|
PreventEdit,
|
|
105
105
|
});
|
|
106
106
|
} },
|
|
107
107
|
"Prevent Cell Edit",
|
|
108
108
|
React.createElement(rebass_1.Text, { fontSize: 2, mt: 1 }, "(automatically undo data change which triggered Alert)"))),
|
|
109
|
-
cellChangedAlert && (React.createElement(HighlightStyle, { highlight: AlertProperties.HighlightCell, label: "Highlight Cell", onChange: (HighlightCell) => {
|
|
109
|
+
cellChangedAlert && (React.createElement(HighlightStyle, { dataName: "highlight-cell", highlight: AlertProperties.HighlightCell, label: "Highlight Cell", onChange: (HighlightCell) => {
|
|
110
110
|
onChange({ HighlightCell });
|
|
111
111
|
} })),
|
|
112
|
-
cellChangedAlert && (React.createElement(HighlightStyle, { highlight: AlertProperties.HighlightRow, label: "Highlight Row", onChange: (HighlightRow) => {
|
|
112
|
+
cellChangedAlert && (React.createElement(HighlightStyle, { dataName: "highlight-row", highlight: AlertProperties.HighlightRow, label: "Highlight Row", onChange: (HighlightRow) => {
|
|
113
113
|
onChange({ HighlightRow });
|
|
114
114
|
} })),
|
|
115
|
-
rowAddedAlert && (React.createElement(HighlightStyle, { highlight: AlertProperties.HighlightRow, label: "Highlight Row", onChange: (HighlightRow) => {
|
|
115
|
+
rowAddedAlert && (React.createElement(HighlightStyle, { dataName: "highlight-row", highlight: AlertProperties.HighlightRow, label: "Highlight Row", onChange: (HighlightRow) => {
|
|
116
116
|
onChange({ HighlightRow });
|
|
117
117
|
} })),
|
|
118
|
-
cellChangedAlert && (React.createElement(CheckBox_1.CheckBox, { checked: AlertProperties.JumpToCell, onChange: (JumpToCell) => {
|
|
118
|
+
cellChangedAlert && (React.createElement(CheckBox_1.CheckBox, { "data-name": "jump-to-cell", checked: AlertProperties.JumpToCell, onChange: (JumpToCell) => {
|
|
119
119
|
onChange({ JumpToCell });
|
|
120
120
|
} }, "Jump To Cell")),
|
|
121
|
-
rowAddedAlert && (React.createElement(CheckBox_1.CheckBox, { checked: AlertProperties.JumpToRow, onChange: (JumpToRow) => {
|
|
121
|
+
rowAddedAlert && (React.createElement(CheckBox_1.CheckBox, { "data-name": "jump-to-row", checked: AlertProperties.JumpToRow, onChange: (JumpToRow) => {
|
|
122
122
|
onChange({ JumpToRow });
|
|
123
123
|
} }, "Jump To Row")),
|
|
124
|
-
React.createElement(CheckBox_1.CheckBox, { checked: AlertProperties.ShowInDiv, onChange: (ShowInDiv) => {
|
|
124
|
+
React.createElement(CheckBox_1.CheckBox, { "data-name": "show-in-div", checked: AlertProperties.ShowInDiv, onChange: (ShowInDiv) => {
|
|
125
125
|
onChange({ ShowInDiv });
|
|
126
126
|
} },
|
|
127
127
|
"Show in separate ",
|
|
128
128
|
React.createElement(CodeBlock_1.CodeBlock, null, `<div />`),
|
|
129
129
|
" element"),
|
|
130
|
-
React.createElement(CheckBox_1.CheckBox, { checked: AlertProperties.LogToConsole, onChange: (LogToConsole) => {
|
|
130
|
+
React.createElement(CheckBox_1.CheckBox, { "data-name": "log-to-console", checked: AlertProperties.LogToConsole, onChange: (LogToConsole) => {
|
|
131
131
|
onChange({ LogToConsole });
|
|
132
132
|
} }, "Log To Console"))));
|
|
133
133
|
};
|
|
@@ -12,6 +12,7 @@ const AdaptablePopupAlert_1 = require("../../Components/Popups/AdaptablePopupAle
|
|
|
12
12
|
const AlertButtonsEditor_1 = require("./AlertButtonsEditor");
|
|
13
13
|
const CodeBlock_1 = require("../../../components/CodeBlock");
|
|
14
14
|
const AdaptableInput_1 = tslib_1.__importDefault(require("../../Components/AdaptableInput"));
|
|
15
|
+
const join_1 = tslib_1.__importDefault(require("../../../components/utils/join"));
|
|
15
16
|
const DEFAULT_BUTTONS = [
|
|
16
17
|
{
|
|
17
18
|
Label: 'OK',
|
|
@@ -53,7 +54,7 @@ const AlertPreview = (_a) => {
|
|
|
53
54
|
};
|
|
54
55
|
return result;
|
|
55
56
|
}, [alertDefinition]);
|
|
56
|
-
return (React.createElement(rebass_1.Box, Object.assign({}, boxProps, { style: Object.assign({ border: '1px solid var(--ab-color-inputborder)' }, boxProps.style) }),
|
|
57
|
+
return (React.createElement(rebass_1.Box, Object.assign({}, boxProps, { className: (0, join_1.default)(boxProps.className, 'ab-AlertPreview'), style: Object.assign({ border: '1px solid var(--ab-color-inputborder)' }, boxProps.style) }),
|
|
57
58
|
React.createElement(AdaptablePopupAlert_1.AdaptablePopupAlert, { headless: true, focusFirstButton: focusFirstButton, adaptableAlert: alertToPreview, onClose: () => { } })));
|
|
58
59
|
};
|
|
59
60
|
exports.AlertPreview = AlertPreview;
|
|
@@ -73,7 +74,7 @@ const AlertDisplayWizardSection = (props) => {
|
|
|
73
74
|
props.onChange(Object.assign(Object.assign({}, data), { MessageText: value }));
|
|
74
75
|
};
|
|
75
76
|
return (React.createElement(React.Fragment, null,
|
|
76
|
-
React.createElement(Tabs_1.Tabs,
|
|
77
|
+
React.createElement(Tabs_1.Tabs, { "data-name": "message-type" },
|
|
77
78
|
React.createElement(Tabs_1.Tabs.Tab, null, "Message Type"),
|
|
78
79
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
79
80
|
React.createElement(Radio_1.RadioGroup, { value: messageType, name: "messageType", orientation: "horizontal", onRadioChange: (MessageType) => {
|
|
@@ -83,7 +84,7 @@ const AlertDisplayWizardSection = (props) => {
|
|
|
83
84
|
React.createElement(Radio_1.default, { marginLeft: 4, value: "Success" }, "Success"),
|
|
84
85
|
React.createElement(Radio_1.default, { marginLeft: 4, value: "Warning" }, "Warning"),
|
|
85
86
|
React.createElement(Radio_1.default, { marginLeft: 4, value: "Error" }, "Error")))),
|
|
86
|
-
React.createElement(Tabs_1.Tabs, { mt: 2, mb: 3, autoFocus: false },
|
|
87
|
+
React.createElement(Tabs_1.Tabs, { "data-name": "message-text", mt: 2, mb: 3, autoFocus: false },
|
|
87
88
|
React.createElement(Tabs_1.Tabs.Tab, null, "Message Text"),
|
|
88
89
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
89
90
|
React.createElement(rebass_1.Text, { fontSize: 2, mt: 3, mb: 2 }, "The text to display as the Alert Message (leave blank to show automated Message based on Trigger and Condition)"),
|
|
@@ -91,7 +92,7 @@ const AlertDisplayWizardSection = (props) => {
|
|
|
91
92
|
React.createElement(AdaptableInput_1.default, { marginTop: 2, type: 'text', autoFocus: false, value: messageText,
|
|
92
93
|
// onChange={(e: any) => onPredicateInputChange(e, index)}
|
|
93
94
|
onChange: (e) => onMessageTextChange(e) }))),
|
|
94
|
-
React.createElement(Tabs_1.Tabs, { mt: 2, mb: 3, autoFocus: false },
|
|
95
|
+
React.createElement(Tabs_1.Tabs, { "data-name": "display-options", mt: 2, mb: 3, autoFocus: false },
|
|
95
96
|
React.createElement(Tabs_1.Tabs.Tab, null, "Display options"),
|
|
96
97
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
97
98
|
React.createElement(CheckBox_1.CheckBox, { checked: (_a = data.AlertProperties) === null || _a === void 0 ? void 0 : _a.DisplayNotification, onChange: (DisplayNotification) => {
|
|
@@ -104,7 +105,7 @@ const AlertDisplayWizardSection = (props) => {
|
|
|
104
105
|
((_b = data.AlertProperties) === null || _b === void 0 ? void 0 : _b.DisplayNotification) ? (typeof data.AlertForm === 'string' ? (React.createElement(rebass_1.Text, { fontSize: 2 }, "Alert buttons cannot be customized because form is dynamically driven")) : (React.createElement(AlertButtonsEditor_1.AlertButtonsEditor, { AlertButtons: ((_c = data.AlertForm) === null || _c === void 0 ? void 0 : _c.Buttons) || DEFAULT_BUTTONS, api: api, adaptableAlert: adaptableAlert, onChange: (buttons) => {
|
|
105
106
|
props.onChange(Object.assign(Object.assign({}, data), { AlertForm: Object.assign(Object.assign({}, data.AlertForm), { Buttons: buttons }) }));
|
|
106
107
|
} }))) : null)),
|
|
107
|
-
((_d = data.AlertProperties) === null || _d === void 0 ? void 0 : _d.DisplayNotification) ? (React.createElement(Tabs_1.Tabs, { autoFocus: false },
|
|
108
|
+
((_d = data.AlertProperties) === null || _d === void 0 ? void 0 : _d.DisplayNotification) ? (React.createElement(Tabs_1.Tabs, { "data-name": "alert-preview", autoFocus: false },
|
|
108
109
|
React.createElement(Tabs_1.Tabs.Tab, null, "Alert preview"),
|
|
109
110
|
React.createElement(Tabs_1.Tabs.Content, null, typeof data.AlertForm === 'string' ? (React.createElement(rebass_1.Text, { fontSize: 2 }, "Preview not available because form is dynamically driven")) : (React.createElement(exports.AlertPreview, { alertDefinition: data, api: api }))))) : null));
|
|
110
111
|
};
|
|
@@ -14,15 +14,15 @@ const BaseAlertRulesWizardSection = (props) => {
|
|
|
14
14
|
useBooleanQuery: (React.createElement(React.Fragment, null,
|
|
15
15
|
"Use an BooleanQuery if ",
|
|
16
16
|
React.createElement("i", null, "Scope"),
|
|
17
|
-
" is '
|
|
17
|
+
" is 'All Columns' - so any data change may be evaluated in a complex BooleanExpression")),
|
|
18
18
|
useObservableQuery: (React.createElement(React.Fragment, null,
|
|
19
19
|
"Use an ObservableQuery if ",
|
|
20
20
|
React.createElement("i", null, "Scope"),
|
|
21
|
-
" is '
|
|
21
|
+
" is 'All Columns' - so any data change may be evaluated in a complex ObservableExpression")),
|
|
22
22
|
useAggregationQuery: (React.createElement(React.Fragment, null,
|
|
23
23
|
"Use an AggregatedBooleanQuery if ",
|
|
24
24
|
React.createElement("i", null, "Scope"),
|
|
25
|
-
" is '
|
|
25
|
+
" is 'All Columns' - so any data change may be evaluated in a complex AggregatedBooleanExpression")),
|
|
26
26
|
} }));
|
|
27
27
|
};
|
|
28
28
|
exports.BaseAlertRulesWizardSection = BaseAlertRulesWizardSection;
|
|
@@ -11,8 +11,8 @@ const BaseAlertScopeWizardSection = (props) => {
|
|
|
11
11
|
const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
12
12
|
return (React.createElement(rebass_1.Flex, { flexDirection: "column", style: { height: '100%' }, padding: 2 },
|
|
13
13
|
React.createElement(NewScopeComponent_1.NewScopeComponent, { descriptions: {
|
|
14
|
-
rowScope: 'Changes
|
|
15
|
-
columnScope: 'Changes in selected
|
|
14
|
+
rowScope: 'Changes in any Column in the row will trigger an Alert',
|
|
15
|
+
columnScope: 'Changes in selected Columns will trigger an Alert',
|
|
16
16
|
}, scope: data.Scope, updateScope: (Scope) => {
|
|
17
17
|
const newData = Object.assign(Object.assign({}, data), { Scope });
|
|
18
18
|
if (newData.Rule.Predicate) {
|
|
@@ -47,7 +47,7 @@ const renderBaseAlertScopeSummary = (data) => {
|
|
|
47
47
|
return (React.createElement(React.Fragment, null,
|
|
48
48
|
React.createElement(rebass_1.Box, null,
|
|
49
49
|
React.createElement(rebass_1.Text, { fontSize: 2 }, scopeApi.scopeIsAll(data.Scope)
|
|
50
|
-
? 'Changes
|
|
50
|
+
? 'Changes to any Column in the row will trigger an Alert'
|
|
51
51
|
: null)),
|
|
52
52
|
React.createElement(rebass_1.Box, { style: { overflow: 'hidden' } }, 'ColumnIds' in data.Scope ? (React.createElement(React.Fragment, null,
|
|
53
53
|
React.createElement(rebass_1.Text, { fontSize: 2, mb: columnsInScope.length ? 2 : 0 }, "Changes in selected columns will trigger an alert"),
|
|
@@ -56,7 +56,7 @@ class BulkUpdatePopupComponent extends React.Component {
|
|
|
56
56
|
' ',
|
|
57
57
|
"Select from existing column values")),
|
|
58
58
|
React.createElement(rebass_1.Flex, { padding: 2, flexDirection: "row", alignItems: "center" },
|
|
59
|
-
React.createElement(rebass_1.Flex, { alignItems: "center", flexDirection: "row", flex: 1, marginRight: 2 }, this.state.useSelector ? (React.createElement(ColumnValueSelector_1.ColumnValueSelector, { selectedGridCells: this.props.SelectedGridCells, selectedColumnValue: this.props.BulkUpdateValue, selectedColumn: col, api: this.props.api, onColumnValueChange: (values) => this.onColumnValueSelectedChanged(values), allowNew: false, style: { width: '100%', maxWidth: 'inherit' } })) : (React.createElement(AdaptableInput_1.default, { style: { width: '100%' }, value: String(this.props.BulkUpdateValue), type: UIHelper_1.UIHelper.getDescriptionForDataType(col.dataType), placeholder: UIHelper_1.UIHelper.getPlaceHolderforDataType(col.dataType), onChange: (e) => this.onBulkUpdateValueChange(e) }))),
|
|
59
|
+
React.createElement(rebass_1.Flex, { alignItems: "center", flexDirection: "row", flex: 1, marginRight: 2 }, this.state.useSelector ? (React.createElement(ColumnValueSelector_1.ColumnValueSelector, { selectedGridCells: this.props.SelectedGridCells, selectedColumnValue: this.props.BulkUpdateValue, selectedColumn: col, api: this.props.api, onColumnValueChange: (values) => this.onColumnValueSelectedChanged(values), allowNew: false, style: { width: '100%', maxWidth: 'inherit' } })) : (React.createElement(AdaptableInput_1.default, { "data-name": "bulk-update", style: { width: '100%' }, value: String(this.props.BulkUpdateValue), type: UIHelper_1.UIHelper.getDescriptionForDataType(col.dataType), placeholder: UIHelper_1.UIHelper.getPlaceHolderforDataType(col.dataType), onChange: (e) => this.onBulkUpdateValueChange(e) }))),
|
|
60
60
|
React.createElement(SimpleButton_1.default, { disabled: StringExtensions_1.StringExtensions.IsNullOrEmpty(this.props.BulkUpdateValue) ||
|
|
61
61
|
this.props.PreviewInfo.previewValidationSummary.validationResult == 'All', onClick: () => {
|
|
62
62
|
this.onApplyClick();
|
|
@@ -15,4 +15,4 @@ export declare class CalculatedColumnSummaryComponent extends React.Component<Ca
|
|
|
15
15
|
onCloseWizard(): void;
|
|
16
16
|
onFinishWizard: (calculatedColumn: CalculatedColumn) => void;
|
|
17
17
|
}
|
|
18
|
-
export declare let CalculatedColumnSummary: import("react-redux").ConnectedComponent<typeof CalculatedColumnSummaryComponent, import("react-redux").Omit<React.ClassAttributes<CalculatedColumnSummaryComponent> & CalculatedColumnSummaryProps, "key" | "ref" | "onSuspend" | "api" | "
|
|
18
|
+
export declare let CalculatedColumnSummary: import("react-redux").ConnectedComponent<typeof CalculatedColumnSummaryComponent, import("react-redux").Omit<React.ClassAttributes<CalculatedColumnSummaryComponent> & CalculatedColumnSummaryProps, "key" | "ref" | "onSuspend" | "api" | "accessLevel" | "modalContainer" | "CalculatedColumns" | "moduleInfo" | "onShare" | "onUnSuspend" | "teamSharingActivated" | "popupParams" | "onClearPopupParams" | "onClosePopup" | "onEdit" | "summarisedColumn" | "onDeleteConfirm">>;
|
|
@@ -31,7 +31,7 @@ const AdaptableObjectListItemView = (props) => {
|
|
|
31
31
|
return (React.createElement(rebass_1.Flex, { "data-name": tag.name, key: `${index}-${tag.name}`, mb: 2, className: `${baseClassName}__row` },
|
|
32
32
|
React.createElement(rebass_1.Box, { className: `${baseClassName}__label`, mr: 3 },
|
|
33
33
|
labelEl,
|
|
34
|
-
props.showEditButton && (React.createElement(SimpleButton_1.default, { accessLevel: props.accessLevel, className: `${baseClassName}__edit-property`, ml: 1, icon: "edit", tooltip: "edit", iconSize: 18, variant: "text", onClick: () => {
|
|
34
|
+
props.showEditButton && (React.createElement(SimpleButton_1.default, { "data-name": `${tag.name}-edit-button`, accessLevel: props.accessLevel, className: `${baseClassName}__edit-property`, ml: 1, icon: "edit", tooltip: "edit", iconSize: 18, variant: "text", onClick: () => {
|
|
35
35
|
props.handleOnEdit(tag.name);
|
|
36
36
|
} }))),
|
|
37
37
|
React.createElement(rebass_1.Box, { flex: 1, className: `${baseClassName}__values` },
|
|
@@ -8,12 +8,7 @@ const rebass_1 = require("rebass");
|
|
|
8
8
|
const join_1 = tslib_1.__importDefault(require("../../../components/utils/join"));
|
|
9
9
|
class AdaptableObjectRow extends React.Component {
|
|
10
10
|
render() {
|
|
11
|
-
const colItems = this.props.colItems.map((colItem, index) => (React.createElement(rebass_1.Text, {
|
|
12
|
-
flex: colItem.Size,
|
|
13
|
-
whiteSpace: 'nowrap',
|
|
14
|
-
textOverflow: 'ellipsis',
|
|
15
|
-
overflow: 'hidden',
|
|
16
|
-
}, "data-name": "list-group-cell", paddingLeft: 1, paddingRight: 1 }, colItem.Content)));
|
|
11
|
+
const colItems = this.props.colItems.map((colItem, index) => (React.createElement(rebass_1.Text, { className: "ab-AdaptableObjectRow__cell", "data-name": "list-group-cell", key: index, title: typeof colItem.Content === 'string' ? colItem.Content : undefined, flex: colItem.Size, paddingLeft: 1, paddingRight: 1 }, colItem.Content)));
|
|
17
12
|
const className = (0, join_1.default)('ab-AdaptableObjectRow', this.props.isSuspended && 'ab-AdaptableObjectRow--is-suspended');
|
|
18
13
|
return (React.createElement(rebass_1.Flex, { className: className, onClick: this.props.onClick, style: this.props.style }, colItems));
|
|
19
14
|
}
|
|
@@ -4,6 +4,4 @@ export interface InfoButtonProps extends SimpleButtonProps {
|
|
|
4
4
|
glyph?: string;
|
|
5
5
|
tooltip?: string;
|
|
6
6
|
}
|
|
7
|
-
export declare
|
|
8
|
-
render(): JSX.Element;
|
|
9
|
-
}
|
|
7
|
+
export declare const ButtonInfo: React.FunctionComponent<InfoButtonProps>;
|
|
@@ -4,9 +4,7 @@ exports.ButtonInfo = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
}
|
|
7
|
+
const ButtonInfo = (props) => {
|
|
8
|
+
return (React.createElement(SimpleButton_1.default, Object.assign({ "data-name": "info", iconSize: 20, icon: "info", variant: "raised", tone: "accent" }, props)));
|
|
9
|
+
};
|
|
12
10
|
exports.ButtonInfo = ButtonInfo;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { FlexProps } from 'rebass';
|
|
3
|
-
import type {
|
|
3
|
+
import type { AdaptableApi, AdaptableModule, AdaptablePredicate, AdaptablePredicateDef, AdaptableScope } from '../../../types';
|
|
4
4
|
import type { XOR } from '../../../Utilities/Extensions/TypeExtensions';
|
|
5
5
|
import { AdaptableQuery } from '../../../PredefinedConfig/Common/AdaptableQuery';
|
|
6
6
|
import { OnePageAdaptableWizardContextType } from '../../Wizard/OnePageAdaptableWizard';
|
|
@@ -13,6 +13,7 @@ export declare const isRuleValid: (abObject: {
|
|
|
13
13
|
declare type EntityRulesEditorProps<T> = {
|
|
14
14
|
data: T;
|
|
15
15
|
module: AdaptableModule;
|
|
16
|
+
showNoRule?: boolean;
|
|
16
17
|
showPredicate?: boolean;
|
|
17
18
|
showObservable?: boolean;
|
|
18
19
|
showAggregation?: boolean;
|