@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,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
|
},
|
|
@@ -125,7 +119,7 @@ exports.DefaultAdaptableOptions = {
|
|
|
125
119
|
exportFormatType: 'rawValue',
|
|
126
120
|
exportDateFormat: undefined,
|
|
127
121
|
customDestinations: undefined,
|
|
128
|
-
|
|
122
|
+
serverReports: undefined,
|
|
129
123
|
appendFileTimestamp: false,
|
|
130
124
|
systemExportDestinations: [
|
|
131
125
|
Enums_1.ExportDestination.Excel,
|
|
@@ -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);
|
|
@@ -2,8 +2,6 @@ import { ExpressionFunction } from '../../parser/src/types';
|
|
|
2
2
|
/**
|
|
3
3
|
* List of all the Observable Functions available in AdaptableQL
|
|
4
4
|
*/
|
|
5
|
-
export declare type ObservableFunctionName = 'WHERE' | 'COL' | 'TIMEFRAME' |
|
|
6
|
-
declare type ObservableFunction = 'ROW_CHANGE' | 'GRID_CHANGE';
|
|
7
|
-
declare type ChangeFunction = 'MAX' | 'MIN' | 'NONE' | 'COUNT';
|
|
5
|
+
export declare type ObservableFunctionName = 'WHERE' | 'COL' | 'TIMEFRAME' | 'ROW_CHANGE' | 'GRID_CHANGE' | 'MAX' | 'MIN' | 'NONE' | 'COUNT';
|
|
8
6
|
export declare const observableExpressionFunctions: Record<ObservableFunctionName, ExpressionFunction>;
|
|
9
|
-
export
|
|
7
|
+
export declare const observableExpressionFunctionNames: ObservableFunctionName[];
|
|
@@ -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 {};
|
|
@@ -28,6 +28,7 @@ import { ColumnFilter, CustomDisplayFormatterContext, FlashingCellDefinition, Gr
|
|
|
28
28
|
import { RowNode } from '@ag-grid-community/core';
|
|
29
29
|
import { AdaptableApi } from '../../types';
|
|
30
30
|
import { ToastOptions } from '../components/Toastify';
|
|
31
|
+
import { StyledColumn } from '../PredefinedConfig/StyledColumnState';
|
|
31
32
|
export declare function CreateEmptyCustomSort(): CustomSort;
|
|
32
33
|
export declare function CreateEmptyCalculatedColumn(): CalculatedColumn;
|
|
33
34
|
export declare function CreateEmptyNamedQuery(expression?: string): NamedQuery;
|
|
@@ -39,7 +40,7 @@ export declare function CreateEmptyAlertDefinition(): AlertDefinition;
|
|
|
39
40
|
export declare function CreateEmptyFlashingCellDefinition(): FlashingCellDefinition;
|
|
40
41
|
export declare function CreateInternalAlertDefinitionForMessages(messageType: AdaptableMessageType, alertProperties?: AlertProperties): AlertDefinition;
|
|
41
42
|
export declare function CreateEmptyReport(): Report;
|
|
42
|
-
export declare function
|
|
43
|
+
export declare function CreateServerReport(reportName: string): Report;
|
|
43
44
|
export declare function CreateEmptyBaseSchedule(scheduleType: ScheduleType): BaseSchedule;
|
|
44
45
|
export declare function CreateEmptyReminderSchedule(): ReminderSchedule;
|
|
45
46
|
export declare function CreateEmptyReportSchedule(): ReportSchedule;
|
|
@@ -64,6 +65,7 @@ export declare function CreateEmptyStyle(): AdaptableStyle;
|
|
|
64
65
|
export declare function CreateSystemStatusMessageInfo(message: string, type: AdaptableMessageType, furtherInfo?: string): SystemStatusMessageInfo;
|
|
65
66
|
export declare function CreateEmptyCellSummmary(): CellSummmary;
|
|
66
67
|
export declare function CreateColumnFilter(ColumnId: string, PredicateId: SystemFilterPredicateId, Inputs: any[]): ColumnFilter;
|
|
68
|
+
export declare function CreateEmptyStyledColumn(): StyledColumn;
|
|
67
69
|
export declare function CreateCustomDisplayFormatterContext(value: any, node: RowNode, abColumn: AdaptableColumn, api: AdaptableApi): CustomDisplayFormatterContext;
|
|
68
70
|
export declare function CreateToastOptions(notificationsOptions: NotificationsOptions, { onClose, containerId }: {
|
|
69
71
|
onClose?: VoidFunction;
|
|
@@ -80,7 +82,7 @@ export declare const ObjectFactory: {
|
|
|
80
82
|
CreateEmptyAlertDefinition: typeof CreateEmptyAlertDefinition;
|
|
81
83
|
CreateEmptyFlashingCellDefinition: typeof CreateEmptyFlashingCellDefinition;
|
|
82
84
|
CreateInternalAlertDefinitionForMessages: typeof CreateInternalAlertDefinitionForMessages;
|
|
83
|
-
|
|
85
|
+
CreateServerReport: typeof CreateServerReport;
|
|
84
86
|
CreateEmptyReport: typeof CreateEmptyReport;
|
|
85
87
|
CreateEmptyBaseSchedule: typeof CreateEmptyBaseSchedule;
|
|
86
88
|
CreateEmptyReminderSchedule: typeof CreateEmptyReminderSchedule;
|
|
@@ -106,5 +108,6 @@ export declare const ObjectFactory: {
|
|
|
106
108
|
CreateSystemStatusMessageInfo: typeof CreateSystemStatusMessageInfo;
|
|
107
109
|
CreateToastOptions: typeof CreateToastOptions;
|
|
108
110
|
CreateCustomDisplayFormatterContext: typeof CreateCustomDisplayFormatterContext;
|
|
111
|
+
CreateEmptyStyledColumn: typeof CreateEmptyStyledColumn;
|
|
109
112
|
};
|
|
110
113
|
export default ObjectFactory;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ObjectFactory = exports.CreateToastOptions = exports.CreateCustomDisplayFormatterContext = exports.CreateColumnFilter = exports.CreateEmptyCellSummmary = exports.CreateSystemStatusMessageInfo = exports.CreateEmptyStyle = exports.CreateEmptyLayout = exports.CreateEmptyFreeTextColumn = exports.CreateEmptyFormatColumn = exports.CreateEmptyConditionalStyle = exports.CreateEmptyShortcut = exports.CreateEmptySchedule = exports.CreateReportSchedule = exports.CreateGlue42Schedule = exports.CreateIPushPullSchedule = exports.CreateEmptyOpenFinSchedule = exports.CreateEmptyGlue42Schedule = exports.CreateEmptyIPushPullSchedule = exports.CreateEmptyOpenFinReport = exports.CreateEmptyGlue42Report = exports.CreateEmptyIPushPullReport = exports.CreateEmptyReportSchedule = exports.CreateEmptyReminderSchedule = exports.CreateEmptyBaseSchedule = exports.
|
|
3
|
+
exports.ObjectFactory = exports.CreateToastOptions = exports.CreateCustomDisplayFormatterContext = exports.CreateEmptyStyledColumn = exports.CreateColumnFilter = exports.CreateEmptyCellSummmary = exports.CreateSystemStatusMessageInfo = exports.CreateEmptyStyle = exports.CreateEmptyLayout = exports.CreateEmptyFreeTextColumn = exports.CreateEmptyFormatColumn = exports.CreateEmptyConditionalStyle = exports.CreateEmptyShortcut = exports.CreateEmptySchedule = exports.CreateReportSchedule = exports.CreateGlue42Schedule = exports.CreateIPushPullSchedule = exports.CreateEmptyOpenFinSchedule = exports.CreateEmptyGlue42Schedule = exports.CreateEmptyIPushPullSchedule = exports.CreateEmptyOpenFinReport = exports.CreateEmptyGlue42Report = exports.CreateEmptyIPushPullReport = exports.CreateEmptyReportSchedule = exports.CreateEmptyReminderSchedule = exports.CreateEmptyBaseSchedule = exports.CreateServerReport = exports.CreateEmptyReport = exports.CreateInternalAlertDefinitionForMessages = exports.CreateEmptyFlashingCellDefinition = exports.CreateEmptyAlertDefinition = exports.CreateRowChangedAlert = exports.CreateCellChangedAlert = exports.CreateGenericAlert = exports.CreateEmptyPlusMinusNudge = exports.CreateEmptyNamedQuery = exports.CreateEmptyCalculatedColumn = exports.CreateEmptyCustomSort = void 0;
|
|
4
4
|
const Enums_1 = require("../PredefinedConfig/Common/Enums");
|
|
5
5
|
const GeneralConstants_1 = require("./Constants/GeneralConstants");
|
|
6
6
|
const Uuid_1 = require("../PredefinedConfig/Uuid");
|
|
@@ -130,7 +130,7 @@ function CreateEmptyReport() {
|
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
132
|
exports.CreateEmptyReport = CreateEmptyReport;
|
|
133
|
-
function
|
|
133
|
+
function CreateServerReport(reportName) {
|
|
134
134
|
return {
|
|
135
135
|
Uuid: (0, Uuid_1.createUuid)(),
|
|
136
136
|
Name: reportName,
|
|
@@ -140,7 +140,7 @@ function CreateCustomReport(reportName) {
|
|
|
140
140
|
Query: undefined,
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
|
-
exports.
|
|
143
|
+
exports.CreateServerReport = CreateServerReport;
|
|
144
144
|
function CreateEmptyBaseSchedule(scheduleType) {
|
|
145
145
|
return {
|
|
146
146
|
Uuid: (0, Uuid_1.createUuid)(),
|
|
@@ -291,7 +291,6 @@ function CreateEmptyFormatColumn() {
|
|
|
291
291
|
Style: CreateEmptyStyle(),
|
|
292
292
|
DisplayFormat: undefined,
|
|
293
293
|
CellAlignment: undefined,
|
|
294
|
-
HeaderName: undefined,
|
|
295
294
|
};
|
|
296
295
|
}
|
|
297
296
|
exports.CreateEmptyFormatColumn = CreateEmptyFormatColumn;
|
|
@@ -328,8 +327,8 @@ function CreateEmptyStyle() {
|
|
|
328
327
|
BackColor: undefined,
|
|
329
328
|
ForeColor: undefined,
|
|
330
329
|
BorderColor: undefined,
|
|
331
|
-
FontWeight:
|
|
332
|
-
FontStyle:
|
|
330
|
+
FontWeight: undefined,
|
|
331
|
+
FontStyle: undefined,
|
|
333
332
|
FontSize: undefined,
|
|
334
333
|
ClassName: GeneralConstants_1.EMPTY_STRING,
|
|
335
334
|
};
|
|
@@ -368,6 +367,13 @@ function CreateColumnFilter(ColumnId, PredicateId, Inputs) {
|
|
|
368
367
|
};
|
|
369
368
|
}
|
|
370
369
|
exports.CreateColumnFilter = CreateColumnFilter;
|
|
370
|
+
function CreateEmptyStyledColumn() {
|
|
371
|
+
return {
|
|
372
|
+
Uuid: (0, Uuid_1.createUuid)(),
|
|
373
|
+
ColumnId: GeneralConstants_1.EMPTY_STRING,
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
exports.CreateEmptyStyledColumn = CreateEmptyStyledColumn;
|
|
371
377
|
function CreateCustomDisplayFormatterContext(value, node, abColumn, api) {
|
|
372
378
|
return {
|
|
373
379
|
adaptableColumn: abColumn,
|
|
@@ -441,7 +447,7 @@ exports.ObjectFactory = {
|
|
|
441
447
|
CreateEmptyAlertDefinition,
|
|
442
448
|
CreateEmptyFlashingCellDefinition,
|
|
443
449
|
CreateInternalAlertDefinitionForMessages,
|
|
444
|
-
|
|
450
|
+
CreateServerReport,
|
|
445
451
|
CreateEmptyReport,
|
|
446
452
|
CreateEmptyBaseSchedule,
|
|
447
453
|
CreateEmptyReminderSchedule,
|
|
@@ -467,5 +473,6 @@ exports.ObjectFactory = {
|
|
|
467
473
|
CreateSystemStatusMessageInfo,
|
|
468
474
|
CreateToastOptions,
|
|
469
475
|
CreateCustomDisplayFormatterContext,
|
|
476
|
+
CreateEmptyStyledColumn,
|
|
470
477
|
};
|
|
471
478
|
exports.default = exports.ObjectFactory;
|
|
@@ -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;
|
|
@@ -141,6 +141,8 @@ class ModuleService {
|
|
|
141
141
|
return learnUrl + 'integrations-ipushpull';
|
|
142
142
|
case 'OpenFin':
|
|
143
143
|
return learnUrl + 'integrations-openfin';
|
|
144
|
+
case 'StyledColumn':
|
|
145
|
+
return learnUrl + 'handbook-styled-column-overview';
|
|
144
146
|
default:
|
|
145
147
|
return 'good';
|
|
146
148
|
}
|
|
@@ -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;
|