@adaptabletools/adaptable 13.0.0-canary.1 → 13.0.0-canary.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agGrid.d.ts +23 -1
- package/agGrid.js +23 -1
- package/base.css +1 -0
- package/bundle.cjs.js +169 -169
- package/index.css +1 -0
- package/package.json +3 -3
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +8 -3
- package/src/AdaptableOptions/AdaptableOptions.d.ts +0 -2
- package/src/AdaptableOptions/AdaptableQLOptions.d.ts +118 -26
- package/src/AdaptableOptions/FinsemblePluginOptions.d.ts +32 -0
- package/src/AdaptableOptions/FinsemblePluginOptions.js +2 -0
- package/src/AdaptableOptions/GeneralOptions.d.ts +5 -0
- package/src/Api/ConditionalStyleApi.d.ts +20 -42
- package/src/Api/ConfigApi.d.ts +1 -2
- package/src/Api/FinsembleApi.d.ts +10 -0
- package/src/Api/FinsembleApi.js +2 -0
- package/src/Api/FormatColumnApi.d.ts +47 -3
- package/src/Api/Implementation/ColumnApiImpl.js +5 -7
- package/src/Api/Implementation/DashboardApiImpl.js +2 -3
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +18 -1
- package/src/Api/Implementation/FormatColumnApiImpl.js +98 -15
- package/src/Api/Implementation/InternalApiImpl.d.ts +1 -0
- package/src/Api/Implementation/InternalApiImpl.js +4 -0
- 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/SystemStatusApiImpl.js +1 -2
- package/src/Api/Implementation/ToolPanelApiImpl.d.ts +3 -1
- package/src/Api/Implementation/ToolPanelApiImpl.js +8 -0
- package/src/Api/InternalApi.d.ts +1 -0
- package/src/Api/PluginsApi.d.ts +5 -0
- package/src/Api/QueryLanguageApi.d.ts +3 -7
- package/src/Api/ToolPanelApi.d.ts +10 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +37 -37
- package/src/PredefinedConfig/ConditionalStyleState.d.ts +10 -19
- package/src/PredefinedConfig/FormatColumnState.d.ts +19 -6
- package/src/PredefinedConfig/PredefinedConfig.d.ts +1 -0
- package/src/Redux/ActionsReducers/FormatColumnRedux.d.ts +14 -0
- package/src/Redux/ActionsReducers/FormatColumnRedux.js +43 -1
- package/src/Redux/Store/AdaptableStore.js +2 -0
- package/src/Strategy/ConditionalStyleModule.d.ts +2 -0
- package/src/Strategy/ConditionalStyleModule.js +6 -0
- package/src/Strategy/DataChangeHistoryModule.d.ts +1 -0
- package/src/Strategy/DataChangeHistoryModule.js +12 -0
- package/src/Strategy/FormatColumnModule.d.ts +4 -9
- package/src/Strategy/FormatColumnModule.js +52 -2
- package/src/Strategy/Interface/IModule.d.ts +11 -10
- package/src/Strategy/Utilities/Alert/getAlertBehaviourViewItems.d.ts +2 -2
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.d.ts +1 -1
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +3 -4
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +6 -11
- 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 +1 -0
- 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.js +0 -1
- 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/QueryLanguageService.d.ts +3 -3
- package/src/Utilities/Services/QueryLanguageService.js +88 -39
- 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.d.ts +2 -2
- package/src/View/AdaptableView.d.ts +3 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/Components/FormBox.d.ts +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.d.ts +1 -1
- package/src/View/AdaptableWizardView/index.d.ts +1 -1
- package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +3 -3
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +3 -3
- package/src/View/ColorPicker.d.ts +1 -5
- package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonEdit.d.ts +1 -1
- package/src/View/Components/EntityRulesEditor/index.d.ts +2 -1
- package/src/View/Components/EntityRulesEditor/index.js +29 -19
- package/src/View/Components/NewScopeComponent.js +2 -2
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.d.ts +2 -2
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +1 -0
- package/src/View/Components/Popups/AdaptablePopup/Navigation.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopup/PopupPanel.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopup/TopBar.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopupPrompt.d.ts +1 -1
- package/src/View/Components/RangesComponent.d.ts +6 -0
- package/src/View/Components/RangesComponent.js +54 -18
- package/src/View/Components/ScopeComponent.js +2 -2
- package/src/View/Components/ToolPanel/AdaptableToolPanel.d.ts +4 -0
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +5 -2
- 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/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +3 -3
- package/src/View/FormatColumn/MoveFormatColumn.d.ts +7 -0
- package/src/View/FormatColumn/MoveFormatColumn.js +27 -0
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +8 -0
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +29 -0
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +21 -3
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +0 -22
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +18 -4
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +15 -2
- package/src/View/FormatColumn/Wizard/constants.d.ts +1 -0
- package/src/View/FormatColumn/Wizard/constants.js +4 -0
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +1 -1
- package/src/View/Layout/Wizard/sections/SettingsSection.d.ts +2 -2
- package/src/View/License/LicenseWatermark.d.ts +1 -1
- package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.js +1 -1
- package/src/View/StateManagement/components/ClearButton.d.ts +1 -1
- package/src/View/StateManagement/components/LoadButton.d.ts +1 -1
- package/src/View/StatusBar/StatusBarPanel.d.ts +4 -4
- package/src/View/Wizard/OnePageAdaptableWizard.d.ts +3 -3
- package/src/View/Wizard/OnePageAdaptableWizard.js +2 -2
- package/src/View/Wizard/OnePageWizards.d.ts +3 -3
- package/src/View/Wizard/OnePageWizards.js +2 -2
- package/src/agGrid/ActionColumnRenderer.d.ts +1 -0
- package/src/agGrid/ActionColumnRenderer.js +5 -5
- package/src/agGrid/Adaptable.d.ts +16 -2
- package/src/agGrid/Adaptable.js +167 -85
- package/src/agGrid/FilterWrapper.js +5 -5
- package/src/agGrid/FloatingFilterWrapper.js +3 -4
- package/src/agGrid/agGridHelper.js +12 -13
- package/src/agGrid/createAgStatusPanelComponent.d.ts +1 -0
- package/src/agGrid/createAgStatusPanelComponent.js +3 -3
- package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +1 -0
- package/src/agGrid/editors/AdaptableDateEditor/index.js +3 -3
- package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +1 -0
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +3 -3
- package/src/components/CheckBox/index.d.ts +1 -1
- package/src/components/Datepicker/index.d.ts +1 -1
- package/src/components/Dialog/index.d.ts +4 -2
- package/src/components/Dialog/index.js +2 -2
- package/src/components/DropdownButton/index.d.ts +21 -4
- package/src/components/DropdownButton/index.js +5 -6
- package/src/components/ExpressionEditor/BaseEditorInput.d.ts +1 -1
- package/src/components/ExpressionEditor/EditorInput.js +1 -1
- package/src/components/ExpressionEditor/EditorInputWithWhereClause.js +1 -1
- package/src/components/Input/index.d.ts +1 -1
- package/src/components/List/ListGroupItem/index.d.ts +4 -2
- package/src/components/Loader/Loader.d.ts +2 -2
- package/src/components/Logo/index.d.ts +1 -1
- package/src/components/Modal/index.d.ts +1 -1
- package/src/components/PopupWithFooter.d.ts +2 -2
- package/src/components/ProgressIndicator/ProgressIndicator.d.ts +1 -1
- package/src/components/SelectList.d.ts +1 -1
- package/src/components/SimpleButton/index.d.ts +4 -5
- package/src/components/SimpleButton/index.js +3 -2
- package/src/components/StylePreview.d.ts +1 -1
- package/src/components/Tag/Tag.d.ts +1 -1
- package/src/components/Textarea/index.d.ts +6 -4
- package/src/components/ToggleButton/index.d.ts +1 -1
- package/src/components/WindowModal/WindowModal.d.ts +1 -1
- package/src/components/icons/index.d.ts +3 -2
- package/src/components/icons/layout.d.ts +2 -1
- package/src/components/utils/useContainerScrollObserver/index.d.ts +1 -1
- package/src/metamodel/adaptable.metamodel.d.ts +112 -64
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/parser/src/types.d.ts +6 -3
- package/src/renderReactRoot.d.ts +3 -0
- package/src/renderReactRoot.js +54 -0
- package/src/types.d.ts +4 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/Utilities/Services/LicenseService.js +0 -1
|
@@ -2,12 +2,10 @@ import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
|
2
2
|
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
3
3
|
import { AdaptableMenuItem } from '../PredefinedConfig/Common/Menu';
|
|
4
4
|
import { TeamSharingImportInfo } from '../PredefinedConfig/TeamSharingState';
|
|
5
|
-
import * as FormatColumnRedux from '../Redux/ActionsReducers/FormatColumnRedux';
|
|
6
5
|
import { FormatColumn } from '../PredefinedConfig/FormatColumnState';
|
|
7
|
-
import { AdaptableObjectView, IModule } from './Interface/IModule';
|
|
6
|
+
import { AdaptableModuleView, AdaptableObjectView, IModule } from './Interface/IModule';
|
|
8
7
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
9
8
|
import { AdaptableObject } from '../PredefinedConfig/Common/AdaptableObject';
|
|
10
|
-
import { FormatColumnWizard } from '../View/FormatColumn/Wizard/FormatColumnWizard';
|
|
11
9
|
export declare class FormatColumnModule extends AdaptableModuleBase implements IModule {
|
|
12
10
|
constructor(api: AdaptableApi);
|
|
13
11
|
getModuleAdaptableObjects(config?: {
|
|
@@ -16,16 +14,13 @@ export declare class FormatColumnModule extends AdaptableModuleBase implements I
|
|
|
16
14
|
getExplicitlyReferencedColumnIds(formatColumn: FormatColumn): string[];
|
|
17
15
|
hasNamedQueryReferences(): boolean;
|
|
18
16
|
updateOldConfig(): void;
|
|
17
|
+
private updateConditionalStylesColumnsOldConfig;
|
|
18
|
+
private updateGradientColumnsOldConfig;
|
|
19
19
|
private getExistingFormatColumn;
|
|
20
20
|
addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
21
21
|
getTeamSharingAction(): TeamSharingImportInfo<FormatColumn>;
|
|
22
22
|
toView(formatColumn: FormatColumn): AdaptableObjectView;
|
|
23
23
|
toViewAll(): AdaptableObjectView[];
|
|
24
|
-
getViewProperties():
|
|
25
|
-
getDeleteAction: (formatColumn: FormatColumn) => FormatColumnRedux.FormatColumnDeleteAction;
|
|
26
|
-
getSuspendAction: (formatColumn: FormatColumn) => FormatColumnRedux.FormatColumnSuspendAction;
|
|
27
|
-
getUnSuspendAction: (formatColumn: FormatColumn) => FormatColumnRedux.FormatColumnSuspendAction;
|
|
28
|
-
getEditWizard(): typeof FormatColumnWizard;
|
|
29
|
-
};
|
|
24
|
+
getViewProperties(): AdaptableModuleView;
|
|
30
25
|
canBeAssociatedWithLayouts(): boolean;
|
|
31
26
|
}
|
|
@@ -13,6 +13,8 @@ const FormatColumnFormatWizardSection_1 = require("../View/FormatColumn/Wizard/F
|
|
|
13
13
|
const getFormatColumnSettingsViewItems_1 = require("./Utilities/FormatColumn/getFormatColumnSettingsViewItems");
|
|
14
14
|
const getFormatColumnStyleViewItems_1 = require("./Utilities/FormatColumn/getFormatColumnStyleViewItems");
|
|
15
15
|
const getObjectTagsViewItems_1 = require("./Utilities/getObjectTagsViewItems");
|
|
16
|
+
const getRuleViewItems_1 = require("./Utilities/getRuleViewItems");
|
|
17
|
+
const MoveFormatColumn_1 = require("../View/FormatColumn/MoveFormatColumn");
|
|
16
18
|
class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
17
19
|
constructor(api) {
|
|
18
20
|
super(ModuleConstants.FormatColumnModuleId, ModuleConstants.FormatColumnFriendlyName, 'format-column', 'FormatColumnPopup', 'Create a column style, display format or cell alignment', api);
|
|
@@ -58,8 +60,54 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
58
60
|
if ((_b = (_a = this.api.internalApi
|
|
59
61
|
.getState()
|
|
60
62
|
.FormatColumn) === null || _a === void 0 ? void 0 : _a.FormatColumns) === null || _b === void 0 ? void 0 : _b.some((formatColumn) => !!formatColumn.HeaderName)) {
|
|
61
|
-
(0, LoggingHelper_1.ConsoleLogWarning)(`
|
|
63
|
+
(0, LoggingHelper_1.ConsoleLogWarning)(`The 'FormatColumn.HeaderName' property was removed; use a Layout custom Column Header instead!`);
|
|
62
64
|
}
|
|
65
|
+
this.updateGradientColumnsOldConfig();
|
|
66
|
+
const keepDeprecatedConditionalStyles = this.api.internalApi.shouldKeepDeprecatedConditionalStyles();
|
|
67
|
+
if (!keepDeprecatedConditionalStyles) {
|
|
68
|
+
this.updateConditionalStylesColumnsOldConfig();
|
|
69
|
+
// update ConditionalStyle StatusBarPanel
|
|
70
|
+
const oldStatusBars = this.api.internalApi.getState().StatusBar.StatusBars;
|
|
71
|
+
let replaceConditionalStyleStatusBar = false;
|
|
72
|
+
const newStatusBars = oldStatusBars.map((statusBar) => (Object.assign(Object.assign({}, statusBar), { StatusBarPanels: [
|
|
73
|
+
...new Set(statusBar.StatusBarPanels.map((statusBarPanel) => {
|
|
74
|
+
if (statusBarPanel === 'ConditionalStyle') {
|
|
75
|
+
replaceConditionalStyleStatusBar = true;
|
|
76
|
+
return 'FormatColumn';
|
|
77
|
+
}
|
|
78
|
+
return statusBarPanel;
|
|
79
|
+
})),
|
|
80
|
+
] })));
|
|
81
|
+
if (replaceConditionalStyleStatusBar) {
|
|
82
|
+
this.api.statusBarApi.setStatusBarPanels(newStatusBars);
|
|
83
|
+
}
|
|
84
|
+
// update ConditionalStyle dashboard buttons
|
|
85
|
+
const dashboardModuleButtons = this.api.internalApi.getState().Dashboard.ModuleButtons;
|
|
86
|
+
if (dashboardModuleButtons.includes('ConditionalStyle')) {
|
|
87
|
+
dashboardModuleButtons[dashboardModuleButtons.indexOf('ConditionalStyle')] = 'FormatColumn';
|
|
88
|
+
this.api.dashboardApi.setModuleButtons([...new Set(dashboardModuleButtons)]);
|
|
89
|
+
}
|
|
90
|
+
// update ConditionalStyle toolPanel buttons
|
|
91
|
+
const toolPanelModuleButtons = this.api.internalApi.getState().ToolPanel.ModuleButtons;
|
|
92
|
+
if (toolPanelModuleButtons.includes('ConditionalStyle')) {
|
|
93
|
+
toolPanelModuleButtons[toolPanelModuleButtons.indexOf('ConditionalStyle')] = 'FormatColumn';
|
|
94
|
+
this.api.toolPanelApi.setModuleButtons([...new Set(dashboardModuleButtons)]);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
updateConditionalStylesColumnsOldConfig() {
|
|
99
|
+
var _a;
|
|
100
|
+
const oldConditionalStyles = (_a = this.api.internalApi.getState().ConditionalStyle) === null || _a === void 0 ? void 0 : _a.ConditionalStyles;
|
|
101
|
+
if (!(oldConditionalStyles === null || oldConditionalStyles === void 0 ? void 0 : oldConditionalStyles.length)) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
(0, LoggingHelper_1.ConsoleLogWarning)(`DEPRECATED: The 'ConditionalStyle.ConditionalStyles' property is deprecated; use 'FormatColumn' instead!`);
|
|
105
|
+
// remove conditional styles
|
|
106
|
+
this.api.conditionalStyleApi.deleteConditionalStyles(oldConditionalStyles);
|
|
107
|
+
// add as format column
|
|
108
|
+
this.api.formatColumnApi.addFormatColumns(oldConditionalStyles);
|
|
109
|
+
}
|
|
110
|
+
updateGradientColumnsOldConfig() {
|
|
63
111
|
let newFormatColumns = [];
|
|
64
112
|
let existingFormatColumns = [];
|
|
65
113
|
// 1. Convert Gradient Columns to Format Columns
|
|
@@ -241,6 +289,7 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
241
289
|
abObject: formatColumn,
|
|
242
290
|
items: [
|
|
243
291
|
(0, getScopeViewItems_1.getScopeViewItems)(formatColumn.Scope, this.api),
|
|
292
|
+
formatColumn.Rule && (0, getRuleViewItems_1.getRuleViewItems)(formatColumn.Rule, this.api),
|
|
244
293
|
{
|
|
245
294
|
name: 'Style',
|
|
246
295
|
view: () => (0, getFormatColumnStyleViewItems_1.getFormatColumnStyleViewItems)(formatColumn, this.api),
|
|
@@ -251,7 +300,7 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
251
300
|
},
|
|
252
301
|
(0, getFormatColumnSettingsViewItems_1.getFormatColumnSettingsViewItems)(formatColumn),
|
|
253
302
|
(0, getObjectTagsViewItems_1.getObjectTagsViewItems)(formatColumn, this.api),
|
|
254
|
-
],
|
|
303
|
+
].filter(Boolean),
|
|
255
304
|
};
|
|
256
305
|
}
|
|
257
306
|
toViewAll() {
|
|
@@ -261,6 +310,7 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
261
310
|
}
|
|
262
311
|
getViewProperties() {
|
|
263
312
|
return {
|
|
313
|
+
actions: [MoveFormatColumn_1.MoveFormatColumn],
|
|
264
314
|
getDeleteAction: FormatColumnRedux.FormatColumnDelete,
|
|
265
315
|
getSuspendAction: FormatColumnRedux.FormatColumnSuspend,
|
|
266
316
|
getUnSuspendAction: FormatColumnRedux.FormatColumnUnSuspend,
|
|
@@ -34,17 +34,17 @@ export interface AdaptableObjectItemView {
|
|
|
34
34
|
/**
|
|
35
35
|
* Custom name for the property name
|
|
36
36
|
*/
|
|
37
|
-
label?: string | React.FunctionComponent<{
|
|
37
|
+
label?: string | React.FunctionComponent<React.PropsWithChildren<{
|
|
38
38
|
data: AdaptableObject | SuspendableObject;
|
|
39
|
-
}
|
|
39
|
+
}>>;
|
|
40
40
|
/**
|
|
41
41
|
* How the item is rendered.
|
|
42
42
|
* Defaults to tags.
|
|
43
43
|
* Important to be a component so react can detect if it is the same component.
|
|
44
44
|
*/
|
|
45
|
-
view?: React.FunctionComponent<{
|
|
45
|
+
view?: React.FunctionComponent<React.PropsWithChildren<{
|
|
46
46
|
data: AdaptableObject | SuspendableObject;
|
|
47
|
-
}
|
|
47
|
+
}>>;
|
|
48
48
|
/**
|
|
49
49
|
* Values used for the component.
|
|
50
50
|
* Could be later extended to include an 'onChange' prop.
|
|
@@ -59,7 +59,7 @@ export interface AdaptableObjectView {
|
|
|
59
59
|
/**
|
|
60
60
|
* Used to render expanded content
|
|
61
61
|
*/
|
|
62
|
-
expand?: React.FunctionComponent
|
|
62
|
+
expand?: React.FunctionComponent<React.PropsWithChildren<unknown>>;
|
|
63
63
|
/**
|
|
64
64
|
* Reference to the underling object.
|
|
65
65
|
*/
|
|
@@ -77,10 +77,10 @@ export interface AdaptableObjectCompactView {
|
|
|
77
77
|
item: AdaptableObjectItemView;
|
|
78
78
|
abObject: AdaptableObject;
|
|
79
79
|
}
|
|
80
|
-
export declare type AdaptableModuleViewAction = React.FunctionComponent<{
|
|
80
|
+
export declare type AdaptableModuleViewAction = React.FunctionComponent<React.PropsWithChildren<{
|
|
81
81
|
data: AdaptableObject;
|
|
82
82
|
accessLevel: AccessLevel;
|
|
83
|
-
}
|
|
83
|
+
}>>;
|
|
84
84
|
export interface AdaptableModuleView {
|
|
85
85
|
/**
|
|
86
86
|
* List of actions.
|
|
@@ -88,6 +88,7 @@ export interface AdaptableModuleView {
|
|
|
88
88
|
*/
|
|
89
89
|
actions?: AdaptableModuleViewAction[];
|
|
90
90
|
onMount?: () => void;
|
|
91
|
+
HeaderComponent?: React.FunctionComponent;
|
|
91
92
|
onOpenEditPopup?: (abObject?: AdaptableObject) => void;
|
|
92
93
|
getDeleteAction?: (abObject: AdaptableObject) => Redux.Action;
|
|
93
94
|
getCompactDeleteAction?: (abObject: AdaptableObject) => Redux.Action;
|
|
@@ -98,9 +99,9 @@ export interface AdaptableModuleView {
|
|
|
98
99
|
getSuspendAllAction?: () => Redux.Action;
|
|
99
100
|
getUnSuspendAllAction?: () => Redux.Action;
|
|
100
101
|
getDeleteAllAction?: () => Redux.Action;
|
|
101
|
-
emptyView?: React.FunctionComponent<{
|
|
102
|
+
emptyView?: React.FunctionComponent<React.PropsWithChildren<{
|
|
102
103
|
module: IModule;
|
|
103
|
-
}
|
|
104
|
+
}>> | string;
|
|
104
105
|
newTooltipText?: string;
|
|
105
106
|
/**
|
|
106
107
|
* Specifieds the types of objects the module manages.
|
|
@@ -111,7 +112,7 @@ export interface AdaptableModuleView {
|
|
|
111
112
|
label?: string;
|
|
112
113
|
accessLevel?: AccessLevel;
|
|
113
114
|
}[];
|
|
114
|
-
getEditWizard?(abObject?: AdaptableObject): React.FunctionComponent<AdaptableOnePageWizardProps<AdaptableObject
|
|
115
|
+
getEditWizard?(abObject?: AdaptableObject): React.FunctionComponent<React.PropsWithChildren<AdaptableOnePageWizardProps<AdaptableObject>>>;
|
|
115
116
|
/**
|
|
116
117
|
* Specify status panel props.
|
|
117
118
|
* Can be extended to include custom rendereres.
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { AdaptableApi, AlertDefinition } from '../../../types';
|
|
3
3
|
export declare const getAlertBehaviourViewItems: (api: AdaptableApi) => {
|
|
4
4
|
name: string;
|
|
5
|
-
view: React.FunctionComponent<{
|
|
5
|
+
view: React.FunctionComponent<React.PropsWithChildren<{
|
|
6
6
|
data: AlertDefinition;
|
|
7
|
-
}
|
|
7
|
+
}>>;
|
|
8
8
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FormatColumn } from '../../../../types';
|
|
2
|
-
export declare const getFormatColumnSettingsViewItems: (
|
|
2
|
+
export declare const getFormatColumnSettingsViewItems: (formatColumn: FormatColumn) => {
|
|
3
3
|
name: string;
|
|
4
4
|
values: string[];
|
|
5
5
|
};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getFormatColumnSettingsViewItems = void 0;
|
|
4
|
-
const getFormatColumnSettingsViewItems = (
|
|
4
|
+
const getFormatColumnSettingsViewItems = (formatColumn) => {
|
|
5
5
|
var _a;
|
|
6
6
|
const values = [
|
|
7
|
-
`Cell alignment: ${(_a =
|
|
8
|
-
|
|
9
|
-
`Include grouped rows: ${calculatedColumn.IncludeGroupedRows ? 'Yes' : 'No'}`,
|
|
7
|
+
`Cell alignment: ${(_a = formatColumn.CellAlignment) !== null && _a !== void 0 ? _a : 'default'}`,
|
|
8
|
+
`Include grouped rows: ${formatColumn.IncludeGroupedRows ? 'Yes' : 'No'}`,
|
|
10
9
|
].filter(Boolean);
|
|
11
10
|
return {
|
|
12
11
|
name: 'Settings',
|
|
@@ -5,13 +5,8 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const GeneralConstants = tslib_1.__importStar(require("../Constants/GeneralConstants"));
|
|
6
6
|
const GeneralConstants_1 = require("../Constants/GeneralConstants");
|
|
7
7
|
const UIHelper_1 = tslib_1.__importStar(require("../../View/UIHelper"));
|
|
8
|
-
const booleanExpressionFunctions_1 = require("../ExpressionFunctions/booleanExpressionFunctions");
|
|
9
|
-
const scalarExpressionFunctions_1 = require("../ExpressionFunctions/scalarExpressionFunctions");
|
|
10
|
-
const observableExpressionFunctions_1 = require("../ExpressionFunctions/observableExpressionFunctions");
|
|
11
|
-
const aggregatedBooleanExpressionFunctions_1 = require("../ExpressionFunctions/aggregatedBooleanExpressionFunctions");
|
|
12
8
|
const AdaptablePredicate_1 = require("../../PredefinedConfig/Common/AdaptablePredicate");
|
|
13
9
|
const Enums_1 = require("../../PredefinedConfig/Common/Enums");
|
|
14
|
-
const aggregatedScalarExpressionFunctions_1 = require("../ExpressionFunctions/aggregatedScalarExpressionFunctions");
|
|
15
10
|
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
16
11
|
// change type to DeepRequired<AdaptableOptions> to check which properties have no default values defined
|
|
17
12
|
exports.DefaultAdaptableOptions = {
|
|
@@ -64,13 +59,12 @@ exports.DefaultAdaptableOptions = {
|
|
|
64
59
|
customPredicateDefs: [],
|
|
65
60
|
displayColumnFriendlyNamesForExpressions: true,
|
|
66
61
|
expressionOptions: {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
62
|
+
systemBooleanFunctions: undefined,
|
|
63
|
+
systemScalarFunctions: undefined,
|
|
64
|
+
systemObservableFunctions: undefined,
|
|
65
|
+
systemAggregatedBooleanFunctions: undefined,
|
|
66
|
+
systemAggregatedScalarFunctions: undefined,
|
|
72
67
|
moduleExpressionFunctions: undefined,
|
|
73
|
-
queryableColumns: undefined,
|
|
74
68
|
performExpressionValidation: true,
|
|
75
69
|
maxTimeframeSize: 28800000, // 8 hours
|
|
76
70
|
},
|
|
@@ -152,6 +146,7 @@ exports.DefaultAdaptableOptions = {
|
|
|
152
146
|
customSortComparers: undefined,
|
|
153
147
|
englishVariant: 'GB',
|
|
154
148
|
unbalancedGroupsKey: undefined,
|
|
149
|
+
keepDeprecatedConditionalStyles: false,
|
|
155
150
|
},
|
|
156
151
|
layoutOptions: {
|
|
157
152
|
includeExpandedRowGroups: false,
|
|
@@ -4,7 +4,7 @@ import { AggregatedScalarExpressionEvaluation } from './aggregatedScalarExpressi
|
|
|
4
4
|
/**
|
|
5
5
|
* List of all the Aggregation Functions available in AdaptableQL
|
|
6
6
|
*/
|
|
7
|
-
export declare type
|
|
7
|
+
export declare type AggregatedBooleanFunctionName = 'WHERE' | 'COL' | 'GROUP_BY' | AggregationFunction | ComparisonFunction;
|
|
8
8
|
declare type AggregationFunction = 'SUM' | 'MIN' | 'MAX' | 'AVG';
|
|
9
9
|
declare type ComparisonFunction = 'EQ' | 'NEQ' | 'LT' | 'GT' | 'LTE' | 'GTE';
|
|
10
10
|
export interface BooleanAggregationParameter extends BaseParameter<'aggregationBoolean', AggregationFunction> {
|
|
@@ -15,5 +15,6 @@ export interface BooleanAggregationParameter extends BaseParameter<'aggregationB
|
|
|
15
15
|
export interface ScalarAggregationOperand extends BaseParameter<'aggregationScalar', AggregationFunction> {
|
|
16
16
|
value: AggregatedScalarExpressionEvaluation;
|
|
17
17
|
}
|
|
18
|
-
export declare const aggregatedBooleanExpressionFunctions: Record<
|
|
18
|
+
export declare const aggregatedBooleanExpressionFunctions: Record<AggregatedBooleanFunctionName, ExpressionFunction>;
|
|
19
|
+
export declare const aggregatedBooleanExpressionFunctionNames: AggregatedBooleanFunctionName[];
|
|
19
20
|
export {};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.aggregatedBooleanExpressionFunctions = void 0;
|
|
3
|
+
exports.aggregatedBooleanExpressionFunctionNames = exports.aggregatedBooleanExpressionFunctions = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const parseInt_1 = tslib_1.__importDefault(require("lodash/parseInt"));
|
|
6
6
|
const ExpressionEvaluationError_1 = require("../../parser/src/ExpressionEvaluationError");
|
|
7
7
|
const expressionFunctionUtils_1 = require("./expressionFunctionUtils");
|
|
8
8
|
const aggregatedScalarExpressionFunctions_1 = require("./aggregatedScalarExpressionFunctions");
|
|
9
|
+
const TypeExtensions_1 = require("../Extensions/TypeExtensions");
|
|
9
10
|
const SUPPORTED_AGGREGATION_FNS = ['SUM', 'MIN', 'MAX', 'AVG'];
|
|
10
11
|
const aggregationScalarOperandMap = {
|
|
11
12
|
SUM: ['string', 'number'],
|
|
@@ -174,3 +175,4 @@ const extractScalarOperand = (consumingFunctionName, value, allowedTypes) => {
|
|
|
174
175
|
// numeric value
|
|
175
176
|
return (0, parseInt_1.default)(numericString) * numberUnitRatios[largeNumberUnit.toLowerCase()];
|
|
176
177
|
};
|
|
178
|
+
exports.aggregatedBooleanExpressionFunctionNames = (0, TypeExtensions_1.getTypedKeys)(exports.aggregatedBooleanExpressionFunctions);
|
|
@@ -42,4 +42,5 @@ export interface CumulatedAggregationValue {
|
|
|
42
42
|
export declare const cumulativeAggregatedExpressionFunctions: AggregatedScalarFunctionName[];
|
|
43
43
|
export declare const aggregatedExpressionFunctions: AggregatedScalarFunctionName[];
|
|
44
44
|
export declare const aggregatedScalarExpressionFunctions: Record<AggregatedScalarFunctionName, ExpressionFunction>;
|
|
45
|
+
export declare const aggregatedScalarExpressionFunctionNames: AggregatedScalarFunctionName[];
|
|
45
46
|
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.aggregatedScalarExpressionFunctions = exports.aggregatedExpressionFunctions = exports.cumulativeAggregatedExpressionFunctions = void 0;
|
|
3
|
+
exports.aggregatedScalarExpressionFunctionNames = exports.aggregatedScalarExpressionFunctions = exports.aggregatedExpressionFunctions = exports.cumulativeAggregatedExpressionFunctions = void 0;
|
|
4
4
|
const expressionFunctionUtils_1 = require("./expressionFunctionUtils");
|
|
5
5
|
const ExpressionEvaluationError_1 = require("../../parser/src/ExpressionEvaluationError");
|
|
6
|
+
const TypeExtensions_1 = require("../Extensions/TypeExtensions");
|
|
6
7
|
exports.cumulativeAggregatedExpressionFunctions = [
|
|
7
8
|
'CUMUL',
|
|
8
9
|
'OVER',
|
|
@@ -649,6 +650,7 @@ const mapAggregationToCumulation = (aggregationParameter, overColumnParameter, c
|
|
|
649
650
|
};
|
|
650
651
|
return cumulationExpressionEvaluation;
|
|
651
652
|
};
|
|
653
|
+
exports.aggregatedScalarExpressionFunctionNames = (0, TypeExtensions_1.getTypedKeys)(exports.aggregatedScalarExpressionFunctions);
|
|
652
654
|
// !! mutates expressionEvaluation
|
|
653
655
|
const addGroupByParams = (groupByColumnNames, expressionEvaluation) => {
|
|
654
656
|
if (groupByColumnNames === null || groupByColumnNames === void 0 ? void 0 : groupByColumnNames.length) {
|
|
@@ -4,3 +4,4 @@ import { ExpressionFunction } from '../../parser/src/types';
|
|
|
4
4
|
*/
|
|
5
5
|
export declare type BooleanFunctionName = 'EQ' | 'NEQ' | 'GT' | 'LT' | 'GTE' | 'LTE' | 'AND' | 'OR' | 'NOT' | 'BETWEEN' | 'IN' | 'IS_BLANK' | 'CONTAINS' | 'STARTS_WITH' | 'ENDS_WITH' | 'ANY_CONTAINS' | 'QUERY';
|
|
6
6
|
export declare const booleanExpressionFunctions: Record<BooleanFunctionName, ExpressionFunction>;
|
|
7
|
+
export declare const booleanExpressionFunctionsNames: BooleanFunctionName[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.booleanExpressionFunctions = void 0;
|
|
3
|
+
exports.booleanExpressionFunctionsNames = exports.booleanExpressionFunctions = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const isAfter_1 = tslib_1.__importDefault(require("date-fns/isAfter"));
|
|
6
6
|
const isBefore_1 = tslib_1.__importDefault(require("date-fns/isBefore"));
|
|
@@ -9,6 +9,7 @@ const StringExtensions_1 = tslib_1.__importDefault(require("../Extensions/String
|
|
|
9
9
|
const src_1 = require("../../parser/src");
|
|
10
10
|
const ExpressionEvaluationError_1 = require("../../parser/src/ExpressionEvaluationError");
|
|
11
11
|
const expressionFunctionUtils_1 = require("./expressionFunctionUtils");
|
|
12
|
+
const TypeExtensions_1 = require("../Extensions/TypeExtensions");
|
|
12
13
|
exports.booleanExpressionFunctions = {
|
|
13
14
|
OR: {
|
|
14
15
|
handler(args) {
|
|
@@ -293,3 +294,4 @@ exports.booleanExpressionFunctions = {
|
|
|
293
294
|
examples: ['QUERY("anyNamedQuery")'],
|
|
294
295
|
},
|
|
295
296
|
};
|
|
297
|
+
exports.booleanExpressionFunctionsNames = (0, TypeExtensions_1.getTypedKeys)(exports.booleanExpressionFunctions);
|
|
@@ -6,4 +6,5 @@ export declare type ObservableFunctionName = 'WHERE' | 'COL' | 'TIMEFRAME' | Obs
|
|
|
6
6
|
declare type ObservableFunction = 'ROW_CHANGE' | 'GRID_CHANGE';
|
|
7
7
|
declare type ChangeFunction = 'MAX' | 'MIN' | 'NONE' | 'COUNT';
|
|
8
8
|
export declare const observableExpressionFunctions: Record<ObservableFunctionName, ExpressionFunction>;
|
|
9
|
+
export declare const observableExpressionFunctionNames: ObservableFunctionName[];
|
|
9
10
|
export {};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.observableExpressionFunctions = void 0;
|
|
3
|
+
exports.observableExpressionFunctionNames = exports.observableExpressionFunctions = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const rxjs_1 = require("rxjs");
|
|
6
6
|
const operators_1 = require("rxjs/operators");
|
|
7
7
|
const parseInt_1 = tslib_1.__importDefault(require("lodash/parseInt"));
|
|
8
8
|
const ExpressionEvaluationError_1 = require("../../parser/src/ExpressionEvaluationError");
|
|
9
9
|
const expressionFunctionUtils_1 = require("./expressionFunctionUtils");
|
|
10
|
+
const TypeExtensions_1 = require("../Extensions/TypeExtensions");
|
|
10
11
|
// numeric value(digits) followed by a single 's', 'm' or 'h' letter (case insensitive)
|
|
11
12
|
const TIMEFRAME_REGEX = /^(\d+)(s|m|h)$/i;
|
|
12
13
|
const SYSTEM_MAX_TIMEFRAME_SIZE = 86400000; // 24h
|
|
@@ -212,6 +213,7 @@ exports.observableExpressionFunctions = {
|
|
|
212
213
|
examples: ["TIMEFRAME('20s')", "TIMEFRAME('5m')", "TIMEFRAME('1h')"],
|
|
213
214
|
},
|
|
214
215
|
};
|
|
216
|
+
exports.observableExpressionFunctionNames = (0, TypeExtensions_1.getTypedKeys)(exports.observableExpressionFunctions);
|
|
215
217
|
// return TRUE if the last(tail) element has the greatest value
|
|
216
218
|
const isLastElementMaxValue = (values) => {
|
|
217
219
|
const [tailValue] = values.slice(-1);
|
|
@@ -4,3 +4,4 @@ import { ExpressionFunction } from '../../parser/src/types';
|
|
|
4
4
|
*/
|
|
5
5
|
export declare type ScalarFunctionName = 'ADD' | 'SUB' | 'MUL' | 'DIV' | 'MOD' | 'POW' | 'MIN' | 'MAX' | 'AVG' | 'DATE' | 'NOW' | 'TODAY' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR' | 'ADD_DAYS' | 'ADD_WEEKS' | 'ADD_MONTHS' | 'ADD_YEARS' | 'DIFF_DAYS' | 'DIFF_WEEKS' | 'DIFF_MONTHS' | 'DIFF_YEARS' | 'SUB_STRING' | 'REPLACE' | 'COALESCE' | 'LEN' | 'UPPER' | 'LOWER' | 'CONCAT' | 'IF' | 'COL' | 'VAR';
|
|
6
6
|
export declare const scalarExpressionFunctions: Record<ScalarFunctionName, ExpressionFunction>;
|
|
7
|
+
export declare const scalarExpressionFunctionNames: ScalarFunctionName[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.scalarExpressionFunctions = void 0;
|
|
3
|
+
exports.scalarExpressionFunctionNames = exports.scalarExpressionFunctions = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const ExpressionEvaluationError_1 = require("../../parser/src/ExpressionEvaluationError");
|
|
6
6
|
const parseISO_1 = tslib_1.__importDefault(require("date-fns/parseISO"));
|
|
@@ -19,6 +19,7 @@ const differenceInYears_1 = tslib_1.__importDefault(require("date-fns/difference
|
|
|
19
19
|
const expressionFunctionUtils_1 = require("./expressionFunctionUtils");
|
|
20
20
|
const dateUtils_1 = require("./dateUtils");
|
|
21
21
|
const StringExtensions_1 = tslib_1.__importDefault(require("../Extensions/StringExtensions"));
|
|
22
|
+
const TypeExtensions_1 = require("../Extensions/TypeExtensions");
|
|
22
23
|
const sanitizeArguments = (values, allowNaN) => {
|
|
23
24
|
return values.filter((value) => value != undefined && value != null && value !== '' && (allowNaN || !isNaN(value)));
|
|
24
25
|
};
|
|
@@ -356,3 +357,4 @@ exports.scalarExpressionFunctions = {
|
|
|
356
357
|
examples: ['VAR(CURRENT_USER)', 'VAR(IS_VALID_VALUE, IS_BLANK([col1]), [col2] < [col3])'],
|
|
357
358
|
},
|
|
358
359
|
};
|
|
360
|
+
exports.scalarExpressionFunctionNames = (0, TypeExtensions_1.getTypedKeys)(exports.scalarExpressionFunctions);
|
|
@@ -73,4 +73,5 @@ export declare type _DeepRequiredObject<T> = {
|
|
|
73
73
|
[P in keyof T]-?: DeepRequired<NonUndefined<T[P]>>;
|
|
74
74
|
};
|
|
75
75
|
export declare type NonUndefined<A> = A extends undefined ? never : A;
|
|
76
|
+
export declare const getTypedKeys: <T extends string>(input: Record<T, any>) => T[];
|
|
76
77
|
export {};
|
|
@@ -3,9 +3,12 @@ import { IAdaptableService } from './IAdaptableService';
|
|
|
3
3
|
import { RowNode } from '@ag-grid-community/core';
|
|
4
4
|
import { CellDataChangedInfo } from '../../../PredefinedConfig/Common/CellDataChangedInfo';
|
|
5
5
|
import { AdaptableModule } from '../../../PredefinedConfig/Common/Types';
|
|
6
|
-
import { ScalarAggregationParameter } from '../../ExpressionFunctions/aggregatedScalarExpressionFunctions';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { AggregatedScalarFunctionName, ScalarAggregationParameter } from '../../ExpressionFunctions/aggregatedScalarExpressionFunctions';
|
|
7
|
+
import { AggregatedBooleanFunctionName, BooleanAggregationParameter } from '../../ExpressionFunctions/aggregatedBooleanExpressionFunctions';
|
|
8
|
+
import { BooleanFunctionName } from '../../ExpressionFunctions/booleanExpressionFunctions';
|
|
9
|
+
import { ScalarFunctionName } from '../../ExpressionFunctions/scalarExpressionFunctions';
|
|
10
|
+
import { ObservableFunctionName } from '../../ExpressionFunctions/observableExpressionFunctions';
|
|
11
|
+
import { ExpressionFunctionMap } from '../../../parser/src/types';
|
|
9
12
|
export interface IQueryLanguageService extends IAdaptableService {
|
|
10
13
|
evaluateBooleanExpression(expression: string, module: AdaptableModule, rowNode: RowNode): boolean;
|
|
11
14
|
evaluateScalarExpression(expression: string, module: AdaptableModule, rowNode: RowNode): any;
|
|
@@ -31,10 +34,17 @@ export interface IQueryLanguageService extends IAdaptableService {
|
|
|
31
34
|
errorMessage: string;
|
|
32
35
|
};
|
|
33
36
|
computeAggregatedBooleanValue(expression: string, module: AdaptableModule): boolean;
|
|
34
|
-
|
|
37
|
+
getModuleExpressionFunctionsMap(module: AdaptableModule): ModuleExpressionFunctionsMap;
|
|
35
38
|
getColumnsFromExpression(input: string): string[];
|
|
36
39
|
getNamedQueryNamesFromExpression(input: string): string[];
|
|
37
40
|
isCumulativeAggregate(input: string): boolean;
|
|
38
41
|
evaluateCustomQueryVariable(functionName: string, args?: any[]): any;
|
|
39
42
|
getExpressionWithColumnFriendlyNames(expression: string): string;
|
|
40
43
|
}
|
|
44
|
+
export interface ModuleExpressionFunctionsMap {
|
|
45
|
+
booleanFunctions?: ExpressionFunctionMap<BooleanFunctionName>;
|
|
46
|
+
scalarFunctions?: ExpressionFunctionMap<ScalarFunctionName>;
|
|
47
|
+
observableFunctions?: ExpressionFunctionMap<ObservableFunctionName>;
|
|
48
|
+
aggregatedBooleanFunctions?: ExpressionFunctionMap<AggregatedBooleanFunctionName>;
|
|
49
|
+
aggregatedScalarFunctions?: ExpressionFunctionMap<AggregatedScalarFunctionName>;
|
|
50
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IAdaptable } from '
|
|
2
|
-
import { LicenseDetails } from '
|
|
3
|
-
import { ILicenseService } from '
|
|
1
|
+
import { IAdaptable } from '../../../AdaptableInterfaces/IAdaptable';
|
|
2
|
+
import { LicenseDetails } from '../../license/LicenseDetails';
|
|
3
|
+
import { ILicenseService } from '../Interface/ILicenseService';
|
|
4
4
|
export declare enum LicenseValidityType {
|
|
5
5
|
INVALID_LICENSE = "INVALID_LICENSE",
|
|
6
6
|
NO_LICENSE = "NO_LICENSE",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LicenseService=exports.LicenseValidityType=void 0;const e=require("tslib"),a=require("../../../Redux/ActionsReducers/SystemRedux"),s=require("../../../Redux/ActionsReducers/PopupRedux"),t=e.__importDefault(require("../../ObjectFactory")),o=require("../../Helpers/LoggingHelper"),i=e.__importDefault(require("lodash/clamp")),n=require("../../Constants/DocumentationLinkConstants"),r=require("../../license/decode"),c=require("./shouldLogThankYouMessage"),l="sales@adaptabletools.com",d=10,p=864e5;var E;!function(e){e.INVALID_LICENSE="INVALID_LICENSE",e.NO_LICENSE="NO_LICENSE",e.NON_PRODUCTION_VALID="NON_PRODUCTION_VALID",e.NON_PRODUCTION_EXPIRED_IN_SCOPE="NON_PRODUCTION_EXPIRED_IN_SCOPE",e.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE="NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE",e.COMMERCIAL_VALID="COMMERCIAL_VALID",e.COMMERCIAL_EXPIRED_IN_SCOPE="COMMERCIAL_EXPIRED_IN_SCOPE",e.COMMERCIAL_EXPIRED_OUT_OF_SCOPE="COMMERCIAL_EXPIRED_OUT_OF_SCOPE"}(E=exports.LicenseValidityType||(exports.LicenseValidityType={}));const _=/(https):\/\/\d+\-\d+\-\d+\-(sandpack\.codesandbox\.io)/g,I=/(https):\/\/\S+(\.csb\.app)/g,O=/(https):\/\/\S+(\.adaptabletools\.com)/g,u="undefined"!=typeof window?window.location.origin:"",h=()=>{const[e,a,s]=Array.from(_.exec(u)||[]);return"https"===a&&"sandpack.codesandbox.io"===s},A=()=>{const[e,a,s]=Array.from(I.exec(u)||[]);return"https"===a&&".csb.app"===s},N=()=>{const[e,a,s]=Array.from(O.exec(u)||[]);return"https"===a&&".adaptabletools.com"===s};class L{constructor(e,a,s){this.adaptable=e,this.adaptable=e;let t=null;if(a)try{t=(0,r.decode)(a)}catch(e){t=e}h()||A()||N()||this.handleLicenseValidation(t,this.getValidityType(t,s))}getValidityType(e,a){if(!e)return E.NO_LICENSE;if(e instanceof Error)return E.INVALID_LICENSE;const s=new Date(a.publishedAt),t=new Date(e.end),o=t<new Date,i=e.trial;let n=null;return n=o?t>s?i?E.NON_PRODUCTION_EXPIRED_IN_SCOPE:E.COMMERCIAL_EXPIRED_IN_SCOPE:i?E.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE:E.COMMERCIAL_EXPIRED_OUT_OF_SCOPE:i?E.NON_PRODUCTION_VALID:E.COMMERCIAL_VALID,n}handleLicenseValidation(e,a){var s;const t=new Date;t.setHours(0,0,0,0);let d=0;e instanceof Error||!(null==e?void 0:e.end)||(d=Math.floor(((null===(s=null==e?void 0:e.end)||void 0===s?void 0:s.getTime())-t.getTime())/864e5),d=(0,i.default)(d,0,1/0));let p="",E="";!e||e instanceof Error||!e.appName||e.appName==r.GENERIC_APP_NAME||(p=e.appName,E=" for application [APP_NAME]");const _=(e,a=n.LicenseDocsLink,s=l,t=d,o=p)=>e.replace("[LINK]",a).replace("[EMAIL]",s).replace("[APP_NAME]",o).replace("[DAYS]",`${t}`);switch(a){case"NO_LICENSE":case"NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE":(0,o.ConsoleLogByMessageType)(_("This instance of AdapTable does not have a license, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("No AdapTable License found."),this.showWatermark("This instance of AdapTable does not have a license, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"INVALID_LICENSE":(0,o.ConsoleLogByMessageType)(_("This instance of AdapTable seems to use a corrupted License, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("Corrupted AdapTable License found."),this.showWatermark("This instance of AdapTable has a corrupted License, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"NON_PRODUCTION_VALID":(0,o.ConsoleLogByMessageType)(_("This AdapTable trial license expires in [DAYS] days. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Info");break;case"NON_PRODUCTION_EXPIRED_IN_SCOPE":(0,o.ConsoleLogByMessageType)(_("This AdapTable trial license has now expired. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Warning"),this.showWatermark("AdapTable License has expired");break;case"COMMERCIAL_VALID":if(d<=10)(0,o.ConsoleLogByMessageType)(_(`This AdapTable license${E} expires in [DAYS] days. Please contact [EMAIL] to renew (giving you access to Support and Updates)`),"Info");else try{(0,c.shouldLogThankYouMessage)()&&(0,o.ConsoleLogByMessageType)(_(`Thank you for using a valid AdapTable license${E}. Your license will expire in [DAYS] days.`),"Info")}catch(e){}break;case"COMMERCIAL_EXPIRED_IN_SCOPE":(0,o.ConsoleLogByMessageType)(_(`This AdapTable license${E} has expired. Please contact [EMAIL] if you wish to renew (giving you access to Support and Updates)`),"Warning");break;case"COMMERCIAL_EXPIRED_OUT_OF_SCOPE":(0,o.ConsoleLogByMessageType)(_(`This AdapTable license${E} has expired. Adaptable version was published after the license expired. Please contact [EMAIL] if you wish to renew your license.`),"Error"),this.showNotification("Adaptable License has expired"),this.showWatermark("Adaptable License has expired")}}showNotification(e){this.adaptable.api.internalApi.dispatchReduxAction((0,s.PopupShowAlert)({alertType:"generic",header:"License Error",message:e,alertDefinition:t.default.CreateInternalAlertDefinitionForMessages("Error")}))}showWatermark(e){this.adaptable.api.internalApi.dispatchReduxAction((0,a.SystemLicenseShowWatermark)(e))}disableStatePersistence(){this.adaptable.api.internalApi.dispatchReduxAction((0,a.SystemLicenseDisablePersistence)())}destroy(){}}exports.LicenseService=L;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function shouldLogThankYouMessage(): boolean;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.shouldLogThankYouMessage = void 0;
|
|
4
|
+
function shouldLogThankYouMessage() {
|
|
5
|
+
try {
|
|
6
|
+
if (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test') {
|
|
7
|
+
return true;
|
|
8
|
+
}
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
catch (ex) {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.shouldLogThankYouMessage = shouldLogThankYouMessage;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { IQueryLanguageService } from './Interface/IQueryLanguageService';
|
|
1
|
+
import { IQueryLanguageService, ModuleExpressionFunctionsMap } from './Interface/IQueryLanguageService';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
|
|
4
4
|
import { RowNode } from '@ag-grid-community/core';
|
|
5
5
|
import { AdaptableModule } from '../../PredefinedConfig/Common/Types';
|
|
6
|
-
import { ModuleExpressionFunctions } from '../../AdaptableOptions/AdaptableQLOptions';
|
|
7
6
|
import { ScalarAggregationParameter } from '../ExpressionFunctions/aggregatedScalarExpressionFunctions';
|
|
8
7
|
import { AdaptableApi } from '../../../types';
|
|
9
8
|
import { BooleanAggregationParameter } from '../ExpressionFunctions/aggregatedBooleanExpressionFunctions';
|
|
@@ -43,7 +42,8 @@ export declare class QueryLanguageService implements IQueryLanguageService {
|
|
|
43
42
|
getNamedQueryNamesFromExpression(input?: string): string[];
|
|
44
43
|
isCumulativeAggregate(input: string): boolean;
|
|
45
44
|
getExpressionWithColumnFriendlyNames(expression?: string): string;
|
|
46
|
-
|
|
45
|
+
getModuleExpressionFunctionsMap(module: AdaptableModule): ModuleExpressionFunctionsMap;
|
|
46
|
+
private extractMappedExpressionFunctions;
|
|
47
47
|
evaluateCustomQueryVariable(functionName: string, args?: any[]): any;
|
|
48
48
|
private getBooleanAndScalarFunctions;
|
|
49
49
|
private getExpressionCacheKey;
|