@adaptabletools/adaptable 13.1.1 → 14.0.0-canary.1
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/README.md +1 -1
- package/base.css +7 -2
- package/base.css.map +1 -1
- package/bundle.cjs.js +180 -177
- package/index.css +11 -2
- package/index.css.map +1 -1
- package/package.json +2 -2
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +4 -1
- package/src/AdaptableOptions/ActionOptions.d.ts +4 -1
- package/src/AdaptableOptions/AdaptableQLOptions.d.ts +1 -9
- package/src/AdaptableOptions/AlertOptions.d.ts +6 -1
- package/src/AdaptableOptions/ChartingOptions.d.ts +1 -1
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +1 -1
- package/src/AdaptableOptions/ExportOptions.d.ts +1 -1
- package/src/AdaptableOptions/GeneralOptions.d.ts +8 -3
- package/src/AdaptableOptions/MasterDetailPluginOptions.d.ts +6 -4
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +1 -1
- package/src/Api/ActionApi.d.ts +14 -3
- package/src/Api/AdaptableApi.d.ts +0 -6
- package/src/Api/AlertApi.d.ts +127 -92
- package/src/Api/BulkUpdateApi.d.ts +9 -2
- package/src/Api/CalculatedColumnApi.d.ts +26 -21
- package/src/Api/CellSummaryApi.d.ts +15 -8
- package/src/Api/ChartingApi.d.ts +9 -2
- package/src/Api/ColumnApi.d.ts +153 -115
- package/src/Api/ConfigApi.d.ts +18 -18
- package/src/Api/CustomSortApi.d.ts +36 -7
- package/src/Api/DashboardApi.d.ts +12 -5
- package/src/Api/DataChangeHistoryApi.d.ts +8 -1
- package/src/Api/DataSetApi.d.ts +13 -3
- package/src/Api/EventApi.d.ts +2 -2
- package/src/Api/ExportApi.d.ts +30 -13
- package/src/Api/FilterApi.d.ts +74 -62
- package/src/Api/FlashingCellApi.d.ts +25 -9
- package/src/Api/FormatColumnApi.d.ts +76 -95
- package/src/Api/FreeTextColumnApi.d.ts +53 -21
- package/src/Api/GridApi.d.ts +57 -22
- package/src/Api/Implementation/ActionApiImpl.d.ts +9 -3
- package/src/Api/Implementation/ActionApiImpl.js +23 -11
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -2
- package/src/Api/Implementation/AdaptableApiImpl.js +5 -2
- package/src/Api/Implementation/AlertApiImpl.d.ts +57 -28
- package/src/Api/Implementation/AlertApiImpl.js +179 -197
- package/src/Api/Implementation/ApiBase.d.ts +43 -2
- package/src/Api/Implementation/ApiBase.js +129 -5
- package/src/Api/Implementation/ApplicationApiImpl.d.ts +1 -1
- package/src/Api/Implementation/BulkUpdateApiImpl.d.ts +1 -0
- package/src/Api/Implementation/BulkUpdateApiImpl.js +4 -1
- package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +7 -2
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +28 -37
- package/src/Api/Implementation/CellSummaryApiImpl.d.ts +1 -0
- package/src/Api/Implementation/CellSummaryApiImpl.js +6 -1
- package/src/Api/Implementation/ChartingApiImpl.d.ts +2 -2
- package/src/Api/Implementation/ChartingApiImpl.js +10 -4
- package/src/Api/Implementation/ColumnApiImpl.d.ts +22 -6
- package/src/Api/Implementation/ColumnApiImpl.js +184 -195
- package/src/Api/Implementation/ConfigApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ConfigApiImpl.js +1 -1
- package/src/Api/Implementation/CustomSortApiImpl.d.ts +16 -1
- package/src/Api/Implementation/CustomSortApiImpl.js +33 -7
- package/src/Api/Implementation/DashboardApiImpl.d.ts +6 -1
- package/src/Api/Implementation/DashboardApiImpl.js +11 -12
- package/src/Api/Implementation/DataChangeHistoryApiImpl.d.ts +1 -0
- package/src/Api/Implementation/DataChangeHistoryApiImpl.js +5 -0
- package/src/Api/Implementation/DataSetApiImpl.d.ts +6 -0
- package/src/Api/Implementation/DataSetApiImpl.js +17 -8
- package/src/Api/Implementation/EntitlementApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ExportApiImpl.d.ts +9 -1
- package/src/Api/Implementation/ExportApiImpl.js +34 -68
- package/src/Api/Implementation/FilterApiImpl.d.ts +10 -1
- package/src/Api/Implementation/FilterApiImpl.js +61 -157
- package/src/Api/Implementation/FlashingCellApiImpl.d.ts +8 -0
- package/src/Api/Implementation/FlashingCellApiImpl.js +23 -26
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +20 -15
- package/src/Api/Implementation/FormatColumnApiImpl.js +62 -153
- package/src/Api/Implementation/FreeTextColumnApiImpl.d.ts +13 -5
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +42 -27
- package/src/Api/Implementation/GridApiImpl.d.ts +15 -1
- package/src/Api/Implementation/GridApiImpl.js +117 -61
- package/src/Api/Implementation/LayoutApiImpl.d.ts +8 -7
- package/src/Api/Implementation/LayoutApiImpl.js +29 -112
- package/src/Api/Implementation/PluginsApiImpl.d.ts +1 -1
- package/src/Api/Implementation/PlusMinusApiImpl.d.ts +2 -1
- package/src/Api/Implementation/PlusMinusApiImpl.js +5 -0
- package/src/Api/Implementation/PredicateApiImpl.d.ts +8 -5
- package/src/Api/Implementation/PredicateApiImpl.js +33 -98
- package/src/Api/Implementation/QueryApiImpl.d.ts +7 -2
- package/src/Api/Implementation/QueryApiImpl.js +22 -44
- package/src/Api/Implementation/QueryLanguageApiImpl.d.ts +4 -0
- package/src/Api/Implementation/QueryLanguageApiImpl.js +5 -0
- package/src/Api/Implementation/QuickSearchApiImpl.d.ts +1 -0
- package/src/Api/Implementation/QuickSearchApiImpl.js +5 -0
- package/src/Api/Implementation/ScheduleApiImpl.d.ts +27 -0
- package/src/Api/Implementation/ScheduleApiImpl.js +86 -17
- package/src/Api/Implementation/ScopeApiImpl.js +9 -7
- package/src/Api/Implementation/SettingsPanelApiImpl.d.ts +2 -0
- package/src/Api/Implementation/SettingsPanelApiImpl.js +9 -0
- package/src/Api/Implementation/ShortcutApiImpl.d.ts +8 -1
- package/src/Api/Implementation/ShortcutApiImpl.js +25 -4
- package/src/Api/Implementation/SmartEditApiImpl.d.ts +1 -0
- package/src/Api/Implementation/SmartEditApiImpl.js +5 -0
- package/src/Api/Implementation/StyledColumnApiImpl.d.ts +14 -11
- package/src/Api/Implementation/StyledColumnApiImpl.js +40 -185
- package/src/Api/Implementation/SystemStatusApiImpl.d.ts +6 -1
- package/src/Api/Implementation/SystemStatusApiImpl.js +19 -12
- package/src/Api/Implementation/TeamSharingApiImpl.d.ts +6 -5
- package/src/Api/Implementation/TeamSharingApiImpl.js +15 -25
- package/src/Api/Implementation/ThemeApiImpl.d.ts +5 -1
- package/src/Api/Implementation/ThemeApiImpl.js +23 -4
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +2 -0
- package/src/Api/Implementation/UserInterfaceApiImpl.js +13 -4
- package/src/Api/Internal/ActionInternalApi.d.ts +23 -0
- package/src/Api/Internal/ActionInternalApi.js +198 -0
- package/src/Api/{Implementation/InternalApiImpl.d.ts → Internal/AdaptableInternalApi.d.ts} +7 -57
- package/src/Api/{Implementation/InternalApiImpl.js → Internal/AdaptableInternalApi.js} +28 -306
- package/src/Api/Internal/AlertInternalApi.d.ts +148 -0
- package/src/Api/Internal/AlertInternalApi.js +484 -0
- package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +24 -0
- package/src/Api/Internal/CalculatedColumnInternalApi.js +57 -0
- package/src/Api/Internal/ColumnInternalApi.d.ts +33 -0
- package/src/Api/Internal/ColumnInternalApi.js +67 -0
- package/src/Api/Internal/CustomSortInternalApi.d.ts +6 -0
- package/src/Api/Internal/CustomSortInternalApi.js +11 -0
- package/src/Api/Internal/DashboardInternalApi.d.ts +8 -0
- package/src/Api/Internal/DashboardInternalApi.js +26 -0
- package/src/Api/Internal/DataSetInternalApi.d.ts +9 -0
- package/src/Api/Internal/DataSetInternalApi.js +20 -0
- package/src/Api/Internal/ExportInternalApi.d.ts +11 -0
- package/src/Api/Internal/ExportInternalApi.js +73 -0
- package/src/Api/Internal/FilterInternalApi.d.ts +58 -0
- package/src/Api/Internal/FilterInternalApi.js +194 -0
- package/src/Api/Internal/FlashingCellInternalApi.d.ts +12 -0
- package/src/Api/Internal/FlashingCellInternalApi.js +56 -0
- package/src/Api/Internal/FormatColumnInternalApi.d.ts +109 -0
- package/src/Api/Internal/FormatColumnInternalApi.js +225 -0
- package/src/Api/Internal/FreeTextColumnInternalApi.d.ts +15 -0
- package/src/Api/Internal/FreeTextColumnInternalApi.js +44 -0
- package/src/Api/Internal/GridInternalApi.d.ts +82 -0
- package/src/Api/Internal/GridInternalApi.js +252 -0
- package/src/Api/Internal/LayoutInternalApi.d.ts +48 -0
- package/src/Api/Internal/LayoutInternalApi.js +163 -0
- package/src/Api/Internal/PredicateInternalApi.d.ts +37 -0
- package/src/Api/Internal/PredicateInternalApi.js +140 -0
- package/src/Api/Internal/QueryInternalApi.d.ts +17 -0
- package/src/Api/Internal/QueryInternalApi.js +57 -0
- package/src/Api/Internal/QueryLanguageInternalApi.d.ts +11 -0
- package/src/Api/Internal/QueryLanguageInternalApi.js +34 -0
- package/src/Api/Internal/StyledColumnInternalApi.d.ts +59 -0
- package/src/Api/Internal/StyledColumnInternalApi.js +249 -0
- package/src/Api/Internal/SystemStatusInternalApi.d.ts +11 -0
- package/src/Api/Internal/SystemStatusInternalApi.js +27 -0
- package/src/Api/Internal/TeamSharingInternalApi.d.ts +20 -0
- package/src/Api/Internal/TeamSharingInternalApi.js +66 -0
- package/src/Api/LayoutApi.d.ts +28 -44
- package/src/Api/PlusMinusApi.d.ts +9 -2
- package/src/Api/PredicateApi.d.ts +26 -10
- package/src/Api/QueryApi.d.ts +23 -18
- package/src/Api/QuickSearchApi.d.ts +5 -1
- package/src/Api/ScheduleApi.d.ts +97 -16
- package/src/Api/SettingsPanelApi.d.ts +12 -1
- package/src/Api/ShortcutApi.d.ts +28 -7
- package/src/Api/SmartEditApi.d.ts +8 -1
- package/src/Api/StyledColumnApi.d.ts +34 -54
- package/src/Api/SystemStatusApi.d.ts +12 -6
- package/src/Api/TeamSharingApi.d.ts +4 -17
- package/src/Api/ThemeApi.d.ts +25 -6
- package/src/Api/UserInterfaceApi.d.ts +13 -2
- package/src/PredefinedConfig/AlertState.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableColumn.js +4 -0
- package/src/PredefinedConfig/Common/AdaptableForm.d.ts +0 -5
- package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +10 -0
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableObject.d.ts +22 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +3 -0
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +5 -3
- package/src/PredefinedConfig/Common/FDC3Context.d.ts +0 -5
- package/src/PredefinedConfig/FlashingCellState.d.ts +1 -1
- package/src/PredefinedConfig/FormatColumnState.d.ts +1 -1
- package/src/PredefinedConfig/StyledColumnState.d.ts +9 -0
- package/src/PredefinedConfig/SystemState.d.ts +5 -0
- package/src/Redux/ActionsReducers/GridRedux.d.ts +18 -0
- package/src/Redux/ActionsReducers/GridRedux.js +65 -2
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +5 -0
- package/src/Redux/ActionsReducers/SystemRedux.js +17 -3
- package/src/Redux/Store/AdaptableStore.js +34 -26
- package/src/Strategy/AdaptableModuleBase.js +6 -6
- package/src/Strategy/AlertModule.d.ts +1 -6
- package/src/Strategy/AlertModule.js +37 -92
- package/src/Strategy/BulkUpdateModule.js +3 -3
- package/src/Strategy/CalculatedColumnModule.js +6 -6
- package/src/Strategy/ChartingModule.js +1 -1
- package/src/Strategy/CustomSortModule.js +4 -4
- package/src/Strategy/DashboardModule.js +2 -2
- package/src/Strategy/DataSetModule.js +1 -1
- package/src/Strategy/ExportModule.js +4 -4
- package/src/Strategy/FilterModule.js +7 -6
- package/src/Strategy/FlashingCellModule.d.ts +2 -0
- package/src/Strategy/FlashingCellModule.js +21 -5
- package/src/Strategy/FormatColumnModule.d.ts +1 -0
- package/src/Strategy/FormatColumnModule.js +29 -3
- package/src/Strategy/FreeTextColumnModule.js +3 -3
- package/src/Strategy/LayoutModule.js +18 -18
- package/src/Strategy/PlusMinusModule.js +2 -2
- package/src/Strategy/QueryModule.js +3 -3
- package/src/Strategy/ScheduleModule.js +10 -12
- package/src/Strategy/ShortcutModule.js +5 -5
- package/src/Strategy/SmartEditModule.js +3 -3
- package/src/Strategy/StyledColumnModule.js +9 -7
- package/src/Strategy/TeamSharingModule.js +3 -3
- package/src/Strategy/ThemeModule.js +1 -1
- package/src/Strategy/Utilities/CustomSort/getCustomSortColumnViewItems.js +1 -1
- package/src/Strategy/Utilities/Layout/getLayoutFilterViewItems.js +1 -1
- package/src/Strategy/Utilities/Layout/getLayoutSortViewItems.js +1 -1
- package/src/Strategy/Utilities/getRuleViewItems.d.ts +1 -1
- package/src/Strategy/Utilities/getRuleViewItems.js +4 -3
- package/src/Strategy/Utilities/getScopeViewItems.js +1 -1
- package/src/Strategy/Utilities/updateSingleToMultiplePredicates.d.ts +5 -0
- package/src/Strategy/Utilities/updateSingleToMultiplePredicates.js +12 -0
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +4 -3
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +8 -0
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +11 -0
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +73 -78
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.d.ts +3 -1
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +9 -5
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +12 -3
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +133 -28
- package/src/Utilities/Extensions/TypeExtensions.d.ts +1 -0
- package/src/Utilities/Helpers/AdaptableHelper.js +1 -1
- package/src/Utilities/Helpers/FormatHelper.js +13 -10
- package/src/Utilities/ObjectFactory.js +8 -6
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +1 -1
- package/src/Utilities/Services/ChartingService.js +2 -2
- package/src/Utilities/Services/DataService.js +1 -1
- package/src/Utilities/Services/Interface/IEntitlementService.d.ts +2 -1
- package/src/Utilities/Services/Interface/IRowEditService.d.ts +0 -5
- package/src/Utilities/Services/ModuleService.js +1 -1
- package/src/Utilities/Services/QueryLanguageService.js +2 -2
- package/src/Utilities/Services/ReportService.js +3 -3
- package/src/Utilities/Services/RowEditService.d.ts +0 -19
- package/src/Utilities/Services/RowEditService.js +4 -161
- package/src/Utilities/Services/TeamSharingService.js +3 -3
- package/src/Utilities/Services/ValidationService.js +9 -7
- package/src/Utilities/logDeprecation.d.ts +3 -0
- package/src/Utilities/logDeprecation.js +30 -0
- package/src/View/AdaptablePopover/index.d.ts +2 -0
- package/src/View/AdaptablePopover/index.js +6 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsActionColumnsForm.js +4 -2
- package/src/View/Alert/AlertEntityRow.js +1 -1
- package/src/View/Alert/AlertStatusSubPanel.js +1 -1
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +2 -2
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +2 -2
- package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +3 -3
- package/src/View/Alert/Wizard/AlertWizard.js +3 -3
- package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +4 -2
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +2 -2
- package/src/View/Alert/Wizard/isValidAlertRules.js +4 -3
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +3 -3
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.d.ts +1 -0
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +25 -4
- package/src/View/Components/Buttons/ButtonDelete.d.ts +1 -1
- package/src/View/Components/Charting/ChartingViewPanel.d.ts +2 -2
- package/src/View/Components/Charting/ChartingViewPanel.js +17 -3
- package/src/View/Components/Charting/ChartingWizard/ChartingWizard.js +2 -2
- package/src/View/Components/Charting/ChartingWizard/SettingsSection.js +1 -1
- package/src/View/Components/Charting/DeleteChartButton.d.ts +7 -0
- package/src/View/Components/Charting/DeleteChartButton.js +12 -0
- package/src/View/Components/Charting/EditChartButton.d.ts +8 -0
- package/src/View/Components/Charting/EditChartButton.js +21 -0
- package/src/View/Components/EntityRulesEditor/PredicatesEditor.d.ts +16 -0
- package/src/View/Components/EntityRulesEditor/PredicatesEditor.js +86 -0
- package/src/View/Components/EntityRulesEditor/Utilities.d.ts +6 -0
- package/src/View/Components/EntityRulesEditor/Utilities.js +21 -0
- package/src/View/Components/EntityRulesEditor/index.d.ts +4 -9
- package/src/View/Components/EntityRulesEditor/index.js +16 -90
- package/src/View/Components/ExpressionWizard.js +1 -1
- package/src/View/Components/ExternalRenderer.js +3 -1
- package/src/View/Components/FilterForm/FilterForm.js +3 -3
- package/src/View/Components/FilterForm/QuickFilterForm.js +5 -5
- package/src/View/Components/PermittedValuesSelector/PermitedValuesSelector.js +5 -6
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +2 -2
- package/src/View/Components/Popups/AdaptablePopupAlert.js +1 -1
- package/src/View/Components/Popups/AdaptablePopupConfirmation.d.ts +2 -12
- package/src/View/Components/Popups/AdaptablePopupConfirmation.js +46 -39
- package/src/View/Components/PredicateEditor/PredicateEditor.js +5 -5
- package/src/View/Components/ScopeComponent.js +3 -3
- package/src/View/Components/Selectors/ColumnValueSelector.js +1 -1
- package/src/View/Components/StyleComponent.js +42 -14
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -1
- package/src/View/CustomSort/CustomSortSummary.js +1 -1
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +2 -2
- package/src/View/CustomSort/Wizard/CustomSortSummaryWizard.js +1 -1
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +1 -1
- package/src/View/Dashboard/Dashboard.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +10 -1
- package/src/View/DataSet/DataSetSelector.js +1 -1
- package/src/View/DataSet/DataSetStatusPanelPopover.js +1 -1
- package/src/View/DataSet/DataSetViewPanel.js +1 -1
- package/src/View/Export/ExportSelector.js +2 -2
- package/src/View/Export/ExportViewPanel.js +2 -2
- package/src/View/Export/ReportExportDropdown.js +1 -1
- package/src/View/Export/Wizard/ReportNameWizardSection.js +1 -1
- package/src/View/Export/Wizard/ReportRowsWizardSection.js +1 -1
- package/src/View/Filter/FilterSummary.js +1 -1
- package/src/View/Filter/FilterViewPanel.js +1 -1
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +2 -2
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +4 -2
- package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +4 -3
- package/src/View/FormatColumn/MoveFormatColumn.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +11 -5
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +8 -6
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +3 -4
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +5 -19
- package/src/View/GridInfo/ColumnInfoComponent.js +1 -1
- package/src/View/GridInfo/GridInfoPopup.js +6 -6
- package/src/View/Layout/LayoutRadioSelector.js +1 -1
- package/src/View/Layout/LayoutStatusBarSubPanelPopover.js +1 -1
- package/src/View/Layout/LayoutViewPanel.js +1 -1
- package/src/View/Layout/PivotDetailsPopoup.js +1 -1
- package/src/View/Layout/SaveLayoutButton.js +1 -1
- package/src/View/Layout/Wizard/LayoutWizard.js +2 -2
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +4 -4
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +5 -5
- package/src/View/Layout/Wizard/sections/FilterSection.js +2 -2
- package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +2 -2
- package/src/View/Layout/Wizard/sections/RowGroupingSection.js +2 -2
- package/src/View/Layout/Wizard/sections/SortSection.js +1 -1
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.d.ts +1 -1
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +2 -2
- package/src/View/Query/ExpandedQueryPopup.js +1 -1
- package/src/View/Query/Wizard/NamedQueryExpressionWizardSection.js +1 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +2 -2
- package/src/View/Shortcut/Wizard/ShortcutWizard.js +1 -1
- package/src/View/SmartEdit/SmartEditViewPanel.js +1 -1
- package/src/View/StatusBar/StatusBarPanel.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +9 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarColumnComparisonPreview.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarColumnComparisonPreview.js +26 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarRangesPreview.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarRangesPreview.js +23 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.d.ts +8 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.js +25 -0
- package/src/View/StyledColumn/Wizard/{StyledColumnWizardStyleSection.d.ts → StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.d.ts} +2 -2
- package/src/View/StyledColumn/Wizard/{StyledColumnWizardStyleSection.js → StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js} +21 -19
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/index.d.ts +1 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/index.js +4 -0
- package/src/View/TeamSharing/SharedEntityDependencies.js +1 -1
- package/src/View/Theme/ThemeStatusPanelPopover.js +1 -1
- package/src/agGrid/ActionColumnRenderer.js +1 -1
- package/src/agGrid/Adaptable.d.ts +5 -3
- package/src/agGrid/Adaptable.js +106 -121
- package/src/agGrid/FilterWrapper.js +3 -3
- package/src/agGrid/FloatingFilterWrapper.js +3 -3
- package/src/agGrid/PercentBarRenderer.js +6 -6
- package/src/agGrid/agGridHelper.js +3 -3
- package/src/agGrid/agGridMenuHelper.js +3 -3
- package/src/agGrid/weightedAverage.js +2 -2
- package/src/components/ExpressionEditor/BaseEditorInput.js +92 -7
- package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +5 -1
- package/src/components/OverlayTrigger/index.js +6 -2
- package/src/components/OverlayTrigger/utils.d.ts +1 -1
- package/src/components/OverlayTrigger/utils.js +4 -4
- package/src/components/icons/index.js +2 -0
- package/src/components/icons/open-in-new.d.ts +3 -0
- package/src/components/icons/open-in-new.js +7 -0
- package/src/env.js +1 -3
- package/src/metamodel/adaptable.metamodel.d.ts +30 -10
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/parser/src/parser.js +644 -382
- package/src/parser/src/types.d.ts +9 -0
- package/src/types.d.ts +3 -3
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/Api/InternalApi.d.ts +0 -155
- package/src/Api/InternalApi.js +0 -2
|
@@ -28,6 +28,7 @@ exports.aggregatedBooleanExpressionFunctions = {
|
|
|
28
28
|
signatures: ['<main_query> WHERE <boolean_query>'],
|
|
29
29
|
examples: ['<main_query> WHERE <boolean_query>', '<main_query> WHERE QUERY("abc")'],
|
|
30
30
|
hasEagerEvaluation: true,
|
|
31
|
+
category: 'operator',
|
|
31
32
|
},
|
|
32
33
|
SUM: aggregatedScalarExpressionFunctions_1.aggregatedScalarExpressionFunctions['SUM'],
|
|
33
34
|
MIN: aggregatedScalarExpressionFunctions_1.aggregatedScalarExpressionFunctions['MIN'],
|
|
@@ -41,6 +42,7 @@ exports.aggregatedBooleanExpressionFunctions = {
|
|
|
41
42
|
description: 'References a column by its unique identifier',
|
|
42
43
|
signatures: ['[colName]', 'COL(name: string)'],
|
|
43
44
|
examples: ['[col1]', "COL('col1')"],
|
|
45
|
+
category: 'advanced',
|
|
44
46
|
},
|
|
45
47
|
EQ: {
|
|
46
48
|
handler(args, context) {
|
|
@@ -55,6 +57,7 @@ exports.aggregatedBooleanExpressionFunctions = {
|
|
|
55
57
|
`EQ(a: SUM(), b: '%number%(K|M|B)')`,
|
|
56
58
|
],
|
|
57
59
|
examples: [`SUM([col1]) = '5M'`, 'EQ( SUM([col1]), 250000)'],
|
|
60
|
+
category: 'comparison',
|
|
58
61
|
},
|
|
59
62
|
NEQ: {
|
|
60
63
|
handler(args, context) {
|
|
@@ -69,6 +72,7 @@ exports.aggregatedBooleanExpressionFunctions = {
|
|
|
69
72
|
`NEQ(a: SUM(), b: '%number%(K|M|B)')`,
|
|
70
73
|
],
|
|
71
74
|
examples: [`SUM([col1]) != '5M'`, 'NEQ( SUM([col1]), 250000)'],
|
|
75
|
+
category: 'comparison',
|
|
72
76
|
},
|
|
73
77
|
LT: {
|
|
74
78
|
handler(args, context) {
|
|
@@ -83,6 +87,7 @@ exports.aggregatedBooleanExpressionFunctions = {
|
|
|
83
87
|
`LT(a: SUM(), b: '%number%(K|M|B)')`,
|
|
84
88
|
],
|
|
85
89
|
examples: [`SUM([col1]) < '5M'`, 'LT( SUM([col1]), 250000)'],
|
|
90
|
+
category: 'comparison',
|
|
86
91
|
},
|
|
87
92
|
LTE: {
|
|
88
93
|
handler(args, context) {
|
|
@@ -97,6 +102,7 @@ exports.aggregatedBooleanExpressionFunctions = {
|
|
|
97
102
|
`LTE(a: SUM(), b: '%number%(K|M|B)')`,
|
|
98
103
|
],
|
|
99
104
|
examples: [`SUM([col1]) <= '5M'`, 'LTE( SUM([col1]), 250000)'],
|
|
105
|
+
category: 'comparison',
|
|
100
106
|
},
|
|
101
107
|
GT: {
|
|
102
108
|
handler(args, context) {
|
|
@@ -111,6 +117,7 @@ exports.aggregatedBooleanExpressionFunctions = {
|
|
|
111
117
|
`GT(a: SUM(), b: '%number%(K|M|B)')`,
|
|
112
118
|
],
|
|
113
119
|
examples: [`SUM([col1]) > '5M'`, 'GT( SUM([col1]), 250000)'],
|
|
120
|
+
category: 'comparison',
|
|
114
121
|
},
|
|
115
122
|
GTE: {
|
|
116
123
|
handler(args, context) {
|
|
@@ -125,6 +132,7 @@ exports.aggregatedBooleanExpressionFunctions = {
|
|
|
125
132
|
`GTE(a: SUM(), b: '%number%(K|M|B)')`,
|
|
126
133
|
],
|
|
127
134
|
examples: [`SUM([col1]) >= '5M'`, 'GTE( SUM([col1]), 250000)'],
|
|
135
|
+
category: 'comparison',
|
|
128
136
|
},
|
|
129
137
|
};
|
|
130
138
|
const buildBooleanAggregationParameter = (args, context, comparisonOperator, conditionFn) => {
|
|
@@ -55,6 +55,7 @@ exports.aggregatedScalarExpressionFunctions = {
|
|
|
55
55
|
'CUMUL( MIN([colNameA]), OVER( [colNameB] ))',
|
|
56
56
|
'CUMUL( MAX([colNameA]), OVER( [colNameB] ))',
|
|
57
57
|
],
|
|
58
|
+
category: 'cumulative',
|
|
58
59
|
},
|
|
59
60
|
SUM: {
|
|
60
61
|
handler(args, context) {
|
|
@@ -98,6 +99,7 @@ exports.aggregatedScalarExpressionFunctions = {
|
|
|
98
99
|
'SUM( COL(nameA: string), GROUP_BY( COL(nameB: string)))',
|
|
99
100
|
],
|
|
100
101
|
examples: ['SUM([colA])', 'SUM([colA], GROUP_BY([colB]))'],
|
|
102
|
+
category: 'aggregation',
|
|
101
103
|
},
|
|
102
104
|
PERCENTAGE: {
|
|
103
105
|
handler(args, context) {
|
|
@@ -164,6 +166,7 @@ exports.aggregatedScalarExpressionFunctions = {
|
|
|
164
166
|
'PERCENTAGE( [colNameA], SUM ( [colNameB] ))',
|
|
165
167
|
'PERCENTAGE( [colNameA], SUM ( [colNameB], GROUP_BY( [colNameC] )))',
|
|
166
168
|
],
|
|
169
|
+
category: 'aggregation',
|
|
167
170
|
},
|
|
168
171
|
AVG: {
|
|
169
172
|
handler(args, context) {
|
|
@@ -237,6 +240,7 @@ exports.aggregatedScalarExpressionFunctions = {
|
|
|
237
240
|
'AVG( COL(nameA: string), GROUP_BY( COL(nameB: string)))',
|
|
238
241
|
],
|
|
239
242
|
examples: ['AVG([colA])', 'AVG([colA], GROUP_BY([colB]))'],
|
|
243
|
+
category: 'aggregation',
|
|
240
244
|
},
|
|
241
245
|
MIN: {
|
|
242
246
|
handler(args, context) {
|
|
@@ -286,6 +290,7 @@ exports.aggregatedScalarExpressionFunctions = {
|
|
|
286
290
|
'MIN( COL(nameA: string), GROUP_BY( COL(nameB: string)))',
|
|
287
291
|
],
|
|
288
292
|
examples: ['MIN([colA])', 'MIN([colA], GROUP_BY([colB]))'],
|
|
293
|
+
category: 'aggregation',
|
|
289
294
|
},
|
|
290
295
|
MAX: {
|
|
291
296
|
handler(args, context) {
|
|
@@ -335,6 +340,7 @@ exports.aggregatedScalarExpressionFunctions = {
|
|
|
335
340
|
'MAX( COL(nameA: string), GROUP_BY( COL(nameB: string)))',
|
|
336
341
|
],
|
|
337
342
|
examples: ['MIN([colA])', 'MIN([colA], GROUP_BY([colB]))'],
|
|
343
|
+
category: 'aggregation',
|
|
338
344
|
},
|
|
339
345
|
QUANT: {
|
|
340
346
|
handler(args, context) {
|
|
@@ -466,6 +472,7 @@ exports.aggregatedScalarExpressionFunctions = {
|
|
|
466
472
|
`QUANT( COL('col1'), 100))`,
|
|
467
473
|
'QUANT( [col1], 4, GROUP_BY([col2]) )',
|
|
468
474
|
],
|
|
475
|
+
category: 'aggregation',
|
|
469
476
|
},
|
|
470
477
|
OVER: {
|
|
471
478
|
handler(args, context) {
|
|
@@ -481,6 +488,7 @@ exports.aggregatedScalarExpressionFunctions = {
|
|
|
481
488
|
description: 'Defines an accumulative dimension (order) for the enclosing cumulative aggregation',
|
|
482
489
|
signatures: ['OVER( [colName] )', 'OVER( COL(name: string))'],
|
|
483
490
|
examples: ['OVER( [colName] )', `OVER( COL('colName'))`],
|
|
491
|
+
category: 'cumulative',
|
|
484
492
|
},
|
|
485
493
|
WEIGHT: {
|
|
486
494
|
handler(args, context) {
|
|
@@ -496,6 +504,7 @@ exports.aggregatedScalarExpressionFunctions = {
|
|
|
496
504
|
description: 'Defines a weight for the enclosing AVG(Average) aggregation',
|
|
497
505
|
signatures: ['WEIGHT( [colName] )', 'WEIGHT( COL(name: string))'],
|
|
498
506
|
examples: ['WEIGHT( [colName] )', `WEIGHT( COL('colName'))`],
|
|
507
|
+
category: 'aggregation',
|
|
499
508
|
},
|
|
500
509
|
GROUP_BY: {
|
|
501
510
|
handler(args, context) {
|
|
@@ -510,6 +519,7 @@ exports.aggregatedScalarExpressionFunctions = {
|
|
|
510
519
|
description: 'Groups an aggregation operation within the rows that have the same value in the specified column',
|
|
511
520
|
signatures: ['GROUP_BY( [colName] )', 'GROUP_BY( COL(name: string))'],
|
|
512
521
|
examples: ['GROUP_BY( [colName] )', `GROUP_BY( COL('colName'))`],
|
|
522
|
+
category: 'advanced',
|
|
513
523
|
},
|
|
514
524
|
COL: {
|
|
515
525
|
handler(args, context) {
|
|
@@ -518,6 +528,7 @@ exports.aggregatedScalarExpressionFunctions = {
|
|
|
518
528
|
description: 'References a column by its unique identifier',
|
|
519
529
|
signatures: ['[colName]', 'COL(name: string)'],
|
|
520
530
|
examples: ['[col1]', 'COL("col1")'],
|
|
531
|
+
category: 'advanced',
|
|
521
532
|
},
|
|
522
533
|
};
|
|
523
534
|
const mapAggregationToCumulation = (aggregationParameter, overColumnParameter, context) => {
|
|
@@ -11,35 +11,72 @@ const ExpressionEvaluationError_1 = require("../../parser/src/ExpressionEvaluati
|
|
|
11
11
|
const expressionFunctionUtils_1 = require("./expressionFunctionUtils");
|
|
12
12
|
const TypeExtensions_1 = require("../Extensions/TypeExtensions");
|
|
13
13
|
exports.booleanExpressionFunctions = {
|
|
14
|
-
|
|
15
|
-
handler(args) {
|
|
16
|
-
|
|
14
|
+
QUERY: {
|
|
15
|
+
handler(args, context) {
|
|
16
|
+
var _a, _b;
|
|
17
|
+
const namedQueryName = args[0];
|
|
18
|
+
if (StringExtensions_1.default.IsNullOrEmpty(namedQueryName)) {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
const namedQuery = (_a = context.adaptableApi) === null || _a === void 0 ? void 0 : _a.queryApi.getNamedQueryByName(namedQueryName);
|
|
22
|
+
if (!namedQuery) {
|
|
23
|
+
throw new ExpressionEvaluationError_1.ExpressionEvaluationError('QUERY', `Named Query with name ${namedQueryName} not found!`);
|
|
24
|
+
}
|
|
25
|
+
// add query to call stack
|
|
26
|
+
if (!context.namedQueryCallStack) {
|
|
27
|
+
context.namedQueryCallStack = [];
|
|
28
|
+
}
|
|
29
|
+
context.namedQueryCallStack.push(namedQueryName);
|
|
30
|
+
//check if this Named Query is not already evaluated, in which case this would lead to an infinite evaluation cycle
|
|
31
|
+
const firstIndex = context.namedQueryCallStack.indexOf(namedQueryName);
|
|
32
|
+
const lastIndex = context.namedQueryCallStack.lastIndexOf(namedQueryName);
|
|
33
|
+
if (firstIndex !== lastIndex) {
|
|
34
|
+
const cycle = context.namedQueryCallStack.slice(firstIndex, lastIndex + 1);
|
|
35
|
+
throw new ExpressionEvaluationError_1.ExpressionEvaluationError(`${namedQueryName}`, ` contains a circular reference: ${cycle.join(' -> ')}`);
|
|
36
|
+
}
|
|
37
|
+
const queryEvaluationResult = (0, src_1.evaluate)(namedQuery.BooleanExpression, context);
|
|
38
|
+
// remove query name from callstack
|
|
39
|
+
(_b = context.namedQueryCallStack) === null || _b === void 0 ? void 0 : _b.pop();
|
|
40
|
+
return queryEvaluationResult;
|
|
17
41
|
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
42
|
+
category: 'advanced',
|
|
43
|
+
description: 'Returns the evaluation result of the Named Query with the given name',
|
|
44
|
+
signatures: ['QUERY("anyNamedQuery")'],
|
|
45
|
+
examples: ['QUERY("anyNamedQuery")'],
|
|
46
|
+
returnType: 'boolean',
|
|
23
47
|
},
|
|
24
48
|
AND: {
|
|
25
49
|
handler(args) {
|
|
26
50
|
return Boolean(args[0] && args[1]);
|
|
27
51
|
},
|
|
28
52
|
isHiddenFromMenu: true,
|
|
29
|
-
|
|
53
|
+
category: 'logic',
|
|
30
54
|
description: 'Returns true if both statements is true',
|
|
31
55
|
signatures: ['statement AND statement'],
|
|
32
56
|
examples: ['[col1] > 5 AND [col2] > 10'],
|
|
57
|
+
returnType: 'boolean',
|
|
58
|
+
},
|
|
59
|
+
OR: {
|
|
60
|
+
handler(args) {
|
|
61
|
+
return Boolean(args[0] || args[1]);
|
|
62
|
+
},
|
|
63
|
+
isHiddenFromMenu: true,
|
|
64
|
+
category: 'logic',
|
|
65
|
+
description: 'Returns true if either statements is true',
|
|
66
|
+
signatures: ['statement OR statement'],
|
|
67
|
+
examples: ['[col1] > 5 OR [col2] > 10'],
|
|
68
|
+
returnType: 'boolean',
|
|
33
69
|
},
|
|
34
70
|
NOT: {
|
|
35
71
|
handler(args) {
|
|
36
72
|
return Boolean(!args[0]);
|
|
37
73
|
},
|
|
38
74
|
isHiddenFromMenu: true,
|
|
39
|
-
|
|
75
|
+
category: 'logic',
|
|
40
76
|
description: 'Returns the negation of a statement',
|
|
41
77
|
signatures: ['!statement'],
|
|
42
78
|
examples: ['!([col1] > 5 AND [col2] > 10)'],
|
|
79
|
+
returnType: 'boolean',
|
|
43
80
|
},
|
|
44
81
|
EQ: {
|
|
45
82
|
handler(args, context) {
|
|
@@ -53,10 +90,11 @@ exports.booleanExpressionFunctions = {
|
|
|
53
90
|
return args[0] == args[1];
|
|
54
91
|
},
|
|
55
92
|
isHiddenFromMenu: true,
|
|
56
|
-
|
|
93
|
+
category: 'comparison',
|
|
57
94
|
description: 'Returns true if the 2 inputs are equal',
|
|
58
95
|
signatures: ['value = value', 'EQ(a: value, b: value)'],
|
|
59
96
|
examples: ['[col1] = 5', 'EQ([col1], 5)'],
|
|
97
|
+
returnType: 'boolean',
|
|
60
98
|
},
|
|
61
99
|
NEQ: {
|
|
62
100
|
handler(args, context) {
|
|
@@ -70,10 +108,11 @@ exports.booleanExpressionFunctions = {
|
|
|
70
108
|
return args[0] != args[1];
|
|
71
109
|
},
|
|
72
110
|
isHiddenFromMenu: true,
|
|
73
|
-
|
|
111
|
+
category: 'comparison',
|
|
74
112
|
description: 'Returns true if the 2 inputs are NOT equal',
|
|
75
113
|
signatures: ['value != value', 'NEQ(a: value, b: value)'],
|
|
76
114
|
examples: ['[col1] != 5', 'NEQ([col1], 5)'],
|
|
115
|
+
returnType: 'boolean',
|
|
77
116
|
},
|
|
78
117
|
LT: {
|
|
79
118
|
handler(args, context) {
|
|
@@ -87,7 +126,7 @@ exports.booleanExpressionFunctions = {
|
|
|
87
126
|
return args[0] < args[1];
|
|
88
127
|
},
|
|
89
128
|
isHiddenFromMenu: true,
|
|
90
|
-
|
|
129
|
+
category: 'comparison',
|
|
91
130
|
description: 'Returns true if the 1st input is less than 2nd input',
|
|
92
131
|
signatures: [
|
|
93
132
|
'number < number',
|
|
@@ -96,6 +135,7 @@ exports.booleanExpressionFunctions = {
|
|
|
96
135
|
'LT(a: date, b: date)',
|
|
97
136
|
],
|
|
98
137
|
examples: ['[col1] < 5', 'LT([col1], 5)'],
|
|
138
|
+
returnType: 'boolean',
|
|
99
139
|
},
|
|
100
140
|
LTE: {
|
|
101
141
|
handler(args, context) {
|
|
@@ -109,7 +149,7 @@ exports.booleanExpressionFunctions = {
|
|
|
109
149
|
return args[0] <= args[1];
|
|
110
150
|
},
|
|
111
151
|
isHiddenFromMenu: true,
|
|
112
|
-
|
|
152
|
+
category: 'comparison',
|
|
113
153
|
description: 'Returns true if 1st input is less than or equals 2nd input',
|
|
114
154
|
signatures: [
|
|
115
155
|
'number <= number',
|
|
@@ -118,6 +158,7 @@ exports.booleanExpressionFunctions = {
|
|
|
118
158
|
'LTE(a: date, b: date)',
|
|
119
159
|
],
|
|
120
160
|
examples: ['[col1] <= 5', 'LTE([col1], 5)'],
|
|
161
|
+
returnType: 'boolean',
|
|
121
162
|
},
|
|
122
163
|
GT: {
|
|
123
164
|
handler(args, context) {
|
|
@@ -131,7 +172,7 @@ exports.booleanExpressionFunctions = {
|
|
|
131
172
|
return args[0] > args[1];
|
|
132
173
|
},
|
|
133
174
|
isHiddenFromMenu: true,
|
|
134
|
-
|
|
175
|
+
category: 'comparison',
|
|
135
176
|
description: 'Returns true if the 1st input is greater than 2nd input',
|
|
136
177
|
signatures: [
|
|
137
178
|
'number > number',
|
|
@@ -140,6 +181,7 @@ exports.booleanExpressionFunctions = {
|
|
|
140
181
|
'GT(a: date, b: date)',
|
|
141
182
|
],
|
|
142
183
|
examples: ['[col1] > 5', 'GT([col1], 5)'],
|
|
184
|
+
returnType: 'boolean',
|
|
143
185
|
},
|
|
144
186
|
GTE: {
|
|
145
187
|
handler(args, context) {
|
|
@@ -153,7 +195,7 @@ exports.booleanExpressionFunctions = {
|
|
|
153
195
|
return args[0] >= args[1];
|
|
154
196
|
},
|
|
155
197
|
isHiddenFromMenu: true,
|
|
156
|
-
|
|
198
|
+
category: 'comparison',
|
|
157
199
|
description: 'Returns true if 1st input is greater than or equals 2nd input',
|
|
158
200
|
signatures: [
|
|
159
201
|
'number >= number',
|
|
@@ -162,6 +204,7 @@ exports.booleanExpressionFunctions = {
|
|
|
162
204
|
'GTE(a: date, b: date)',
|
|
163
205
|
],
|
|
164
206
|
examples: ['[col1] >= 5', 'GTE([col1], 5)'],
|
|
207
|
+
returnType: 'boolean',
|
|
165
208
|
},
|
|
166
209
|
BETWEEN: {
|
|
167
210
|
handler([input, lower, upper]) {
|
|
@@ -169,58 +212,64 @@ exports.booleanExpressionFunctions = {
|
|
|
169
212
|
throw new ExpressionEvaluationError_1.ExpressionEvaluationError('BETWEEN', 'arg 1 should be a number');
|
|
170
213
|
return input >= lower && input <= upper;
|
|
171
214
|
},
|
|
172
|
-
|
|
215
|
+
category: 'comparison',
|
|
173
216
|
description: 'Returns true if 1st input is between 2nd and 3rd inputs',
|
|
174
217
|
signatures: ['BETWEEN(input: number, lower: number, upper: number)'],
|
|
175
218
|
examples: ['BETWEEN(5, [col1], [col2])'],
|
|
219
|
+
returnType: 'boolean',
|
|
176
220
|
},
|
|
177
221
|
IN: {
|
|
178
222
|
handler([needle, haystack]) {
|
|
179
223
|
return haystack.includes(needle);
|
|
180
224
|
},
|
|
181
|
-
|
|
225
|
+
category: 'comparison',
|
|
182
226
|
description: 'Returns true if any input value is in the inputted column',
|
|
183
227
|
signatures: ['values IN (value, value, ...value)'],
|
|
184
228
|
examples: ['[col1] IN (5, 10, 17)'],
|
|
229
|
+
returnType: 'boolean',
|
|
185
230
|
},
|
|
186
231
|
IS_BLANK: {
|
|
187
232
|
handler(args) {
|
|
188
233
|
return args[0] === undefined || args[0] === null || args[0] === '';
|
|
189
234
|
},
|
|
190
|
-
|
|
235
|
+
category: 'comparison',
|
|
191
236
|
description: 'Returns true is input value is empty',
|
|
192
237
|
signatures: ['IS_BLANK(input: any)'],
|
|
193
238
|
examples: ['IS_BLANK([col1])'],
|
|
239
|
+
returnType: 'boolean',
|
|
194
240
|
},
|
|
195
241
|
CONTAINS: {
|
|
196
242
|
handler(args, context) {
|
|
197
243
|
const [first, second] = (0, expressionFunctionUtils_1.getStringValues)(context, String(args[0]), String(args[1]));
|
|
198
244
|
return first.indexOf(second) !== -1;
|
|
199
245
|
},
|
|
200
|
-
|
|
246
|
+
category: 'strings',
|
|
201
247
|
description: 'Returns true if 1st input contains 2nd input',
|
|
202
248
|
signatures: ['CONTAINS(a: string, b: string)'],
|
|
203
249
|
examples: ['CONTAINS([col1], "S")'],
|
|
250
|
+
returnType: 'boolean',
|
|
204
251
|
},
|
|
205
252
|
STARTS_WITH: {
|
|
206
253
|
handler(args, context) {
|
|
207
254
|
const [first, second] = (0, expressionFunctionUtils_1.getStringValues)(context, String(args[0]), String(args[1]));
|
|
208
255
|
return first.startsWith(second);
|
|
209
256
|
},
|
|
210
|
-
|
|
257
|
+
category: 'strings',
|
|
211
258
|
description: 'Returns true if 1st input starts with the 2nd input',
|
|
212
259
|
signatures: ['STARTS_WITH(a: string, b: string)'],
|
|
213
260
|
examples: ['STARTS_WITH([col1], "S")'],
|
|
261
|
+
returnType: 'boolean',
|
|
214
262
|
},
|
|
215
263
|
ENDS_WITH: {
|
|
216
264
|
handler(args, context) {
|
|
217
265
|
const [first, second] = (0, expressionFunctionUtils_1.getStringValues)(context, String(args[0]), String(args[1]));
|
|
218
266
|
return first.endsWith(second);
|
|
219
267
|
},
|
|
220
|
-
|
|
268
|
+
category: 'strings',
|
|
221
269
|
description: 'Returns true if 1st input ends with the 2nd input',
|
|
222
270
|
signatures: ['ENDS_WITH(a: string, b: string)'],
|
|
223
271
|
examples: ['ENDS_WITH([col1], "S")'],
|
|
272
|
+
returnType: 'boolean',
|
|
224
273
|
},
|
|
225
274
|
ANY_CONTAINS: {
|
|
226
275
|
handler(args, context) {
|
|
@@ -233,65 +282,11 @@ exports.booleanExpressionFunctions = {
|
|
|
233
282
|
return columnValue.indexOf(searchTerm) !== -1;
|
|
234
283
|
});
|
|
235
284
|
},
|
|
236
|
-
|
|
285
|
+
category: 'strings',
|
|
237
286
|
description: 'Returns true if any Column contains input',
|
|
238
287
|
signatures: ['ANY_CONTAINS(value)'],
|
|
239
288
|
examples: ['ANY_CONTAINS("abc")'],
|
|
240
|
-
|
|
241
|
-
/*
|
|
242
|
-
ANY_SEARCHABLE_CONTAINS: {
|
|
243
|
-
handler(args, context) {
|
|
244
|
-
const searchTerm = getStringValue(context, String(args[0]));
|
|
245
|
-
return context.api?.columnApi
|
|
246
|
-
.getVisibleColumns()
|
|
247
|
-
.filter((c) => !c.isExcludedFromQuickSearch)
|
|
248
|
-
.some((column) => {
|
|
249
|
-
const value = context.api?.gridApi.getDisplayValueFromRowNode(
|
|
250
|
-
context.node,
|
|
251
|
-
column.columnId
|
|
252
|
-
);
|
|
253
|
-
const columnValue = getStringValue(context, String(value));
|
|
254
|
-
return columnValue.indexOf(searchTerm) !== -1;
|
|
255
|
-
});
|
|
256
|
-
},
|
|
257
|
-
isPredicate: true,
|
|
258
|
-
description: 'Returns true if any Searchable Column contains input',
|
|
259
|
-
signatures: ['ANY_SEARCHABLE_CONTAINS(value)'],
|
|
260
|
-
examples: ['ANY_SEARCHABLE_CONTAINS("abc")'],
|
|
261
|
-
},
|
|
262
|
-
*/
|
|
263
|
-
QUERY: {
|
|
264
|
-
handler(args, context) {
|
|
265
|
-
var _a, _b;
|
|
266
|
-
const namedQueryName = args[0];
|
|
267
|
-
if (StringExtensions_1.default.IsNullOrEmpty(namedQueryName)) {
|
|
268
|
-
return false;
|
|
269
|
-
}
|
|
270
|
-
const namedQuery = (_a = context.adaptableApi) === null || _a === void 0 ? void 0 : _a.queryApi.getNamedQueryByName(namedQueryName);
|
|
271
|
-
if (!namedQuery) {
|
|
272
|
-
throw new ExpressionEvaluationError_1.ExpressionEvaluationError('QUERY', `Named Query with name ${namedQueryName} not found!`);
|
|
273
|
-
}
|
|
274
|
-
// add query to call stack
|
|
275
|
-
if (!context.namedQueryCallStack) {
|
|
276
|
-
context.namedQueryCallStack = [];
|
|
277
|
-
}
|
|
278
|
-
context.namedQueryCallStack.push(namedQueryName);
|
|
279
|
-
//check if this Named Query is not already evaluated, in which case this would lead to an infinite evaluation cycle
|
|
280
|
-
const firstIndex = context.namedQueryCallStack.indexOf(namedQueryName);
|
|
281
|
-
const lastIndex = context.namedQueryCallStack.lastIndexOf(namedQueryName);
|
|
282
|
-
if (firstIndex !== lastIndex) {
|
|
283
|
-
const cycle = context.namedQueryCallStack.slice(firstIndex, lastIndex + 1);
|
|
284
|
-
throw new ExpressionEvaluationError_1.ExpressionEvaluationError(`${namedQueryName}`, ` contains a circular reference: ${cycle.join(' -> ')}`);
|
|
285
|
-
}
|
|
286
|
-
const queryEvaluationResult = (0, src_1.evaluate)(namedQuery.BooleanExpression, context);
|
|
287
|
-
// remove query name from callstack
|
|
288
|
-
(_b = context.namedQueryCallStack) === null || _b === void 0 ? void 0 : _b.pop();
|
|
289
|
-
return queryEvaluationResult;
|
|
290
|
-
},
|
|
291
|
-
isPredicate: true,
|
|
292
|
-
description: 'Returns the evaluation result of the Named Query with the given name',
|
|
293
|
-
signatures: ['QUERY("anyNamedQuery")'],
|
|
294
|
-
examples: ['QUERY("anyNamedQuery")'],
|
|
289
|
+
returnType: 'boolean',
|
|
295
290
|
},
|
|
296
291
|
};
|
|
297
292
|
exports.booleanExpressionFunctionsNames = (0, TypeExtensions_1.getTypedKeys)(exports.booleanExpressionFunctions);
|
|
@@ -13,7 +13,9 @@ export declare const getStringValues: (context: ExpressionContext, ...stringArgu
|
|
|
13
13
|
export declare const getStringValue: (context: ExpressionContext, stringArgument: string) => string;
|
|
14
14
|
export declare const isTextSearchCaseInsensitive: (context: ExpressionContext) => boolean;
|
|
15
15
|
export declare const getDataChangeLog$: (context: ExpressionContext, columnNameFilter: string) => Observable<CellDataChangedInfo>;
|
|
16
|
-
export declare const handleWhereFunction: (args:
|
|
16
|
+
export declare const handleWhereFunction: (args: ExpressionNode[], context: ExpressionContext) => any;
|
|
17
|
+
export declare type ExpressionNode = any;
|
|
18
|
+
export declare const evaluateExpressionNode: (expressionNode: ExpressionNode, context: ExpressionContext, filterFn?: (item: any) => boolean) => any;
|
|
17
19
|
export declare const extractColumnParameter: (consumingFunctionName: string, args: BaseParameter[]) => ColumnParameter;
|
|
18
20
|
export declare const extractColumnParameters: (consumingFunctionName: string, args: BaseParameter[]) => ColumnParameter[];
|
|
19
21
|
export declare const extractParameter: <T extends BaseParameter<string, string>>(consumingFunctionName: string, allowedType: T["type"], allowedOperands: T["name"][], args: BaseParameter[], config?: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateColumnType = exports.getNumericValue = exports.handleColumnFunction = exports.extractParameters = exports.extractParameter = exports.extractColumnParameters = exports.extractColumnParameter = exports.handleWhereFunction = exports.getDataChangeLog$ = exports.isTextSearchCaseInsensitive = exports.getStringValue = exports.getStringValues = void 0;
|
|
3
|
+
exports.validateColumnType = exports.getNumericValue = exports.handleColumnFunction = exports.extractParameters = exports.extractParameter = exports.extractColumnParameters = exports.extractColumnParameter = exports.evaluateExpressionNode = exports.handleWhereFunction = exports.getDataChangeLog$ = exports.isTextSearchCaseInsensitive = exports.getStringValue = exports.getStringValues = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const ExpressionEvaluationError_1 = require("../../parser/src/ExpressionEvaluationError");
|
|
6
6
|
const StringExtensions_1 = tslib_1.__importDefault(require("../Extensions/StringExtensions"));
|
|
@@ -47,7 +47,11 @@ const handleWhereFunction = (args, context) => {
|
|
|
47
47
|
});
|
|
48
48
|
};
|
|
49
49
|
// observableExpressionResult
|
|
50
|
-
return (0,
|
|
50
|
+
return (0, exports.evaluateExpressionNode)(reactiveExpressionNode, context, filterFn);
|
|
51
|
+
};
|
|
52
|
+
exports.handleWhereFunction = handleWhereFunction;
|
|
53
|
+
const evaluateExpressionNode = (expressionNode, context, filterFn = context.filterFn) => {
|
|
54
|
+
return (0, evaluator_1.evaluateNode)(expressionNode, {
|
|
51
55
|
node: context.node,
|
|
52
56
|
adaptableApi: context.adaptableApi,
|
|
53
57
|
functions: context.functions,
|
|
@@ -55,7 +59,7 @@ const handleWhereFunction = (args, context) => {
|
|
|
55
59
|
evaluateCustomQueryVariable: context.adaptableApi.internalApi.getQueryLanguageService().evaluateCustomQueryVariable,
|
|
56
60
|
});
|
|
57
61
|
};
|
|
58
|
-
exports.
|
|
62
|
+
exports.evaluateExpressionNode = evaluateExpressionNode;
|
|
59
63
|
const extractColumnParameter = (consumingFunctionName, args) => {
|
|
60
64
|
return (0, exports.extractParameter)(consumingFunctionName, 'config', ['COL'], args);
|
|
61
65
|
};
|
|
@@ -109,14 +113,14 @@ const getNumericValue = (input) => {
|
|
|
109
113
|
};
|
|
110
114
|
exports.getNumericValue = getNumericValue;
|
|
111
115
|
const validateColumnType = (columnId, validColumnTypes, consumingFunction, api) => {
|
|
112
|
-
const columnType = api.columnApi.
|
|
116
|
+
const columnType = api.columnApi.getColumnDataTypeForColumnId(columnId);
|
|
113
117
|
if (!validColumnTypes.some((validType) => validType === columnType)) {
|
|
114
118
|
throw new ExpressionEvaluationError_1.ExpressionEvaluationError(consumingFunction, `expects a column of type ${validColumnTypes.join(' or ')}`);
|
|
115
119
|
}
|
|
116
120
|
};
|
|
117
121
|
exports.validateColumnType = validateColumnType;
|
|
118
122
|
const validateColumnId = (columnId, api) => {
|
|
119
|
-
const column = api.columnApi.
|
|
123
|
+
const column = api.columnApi.getColumnWithColumnId(columnId);
|
|
120
124
|
if (!column) {
|
|
121
125
|
throw new ExpressionEvaluationError_1.ExpressionEvaluationError('', `Column name "${columnId}" is not found`);
|
|
122
126
|
}
|
|
@@ -21,6 +21,7 @@ exports.observableExpressionFunctions = {
|
|
|
21
21
|
signatures: ['<main_query> WHERE <boolean_query>'],
|
|
22
22
|
examples: ['<main_query> WHERE <boolean_query>', '<main_query> WHERE QUERY("abc")'],
|
|
23
23
|
hasEagerEvaluation: true,
|
|
24
|
+
category: 'advanced',
|
|
24
25
|
},
|
|
25
26
|
ROW_CHANGE: {
|
|
26
27
|
handler(args, context) {
|
|
@@ -53,13 +54,14 @@ exports.observableExpressionFunctions = {
|
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
56
|
},
|
|
56
|
-
|
|
57
|
+
returnType: 'boolean',
|
|
57
58
|
description: 'Observes changes with each row in a distinct scope',
|
|
58
59
|
signatures: ['ROW_CHANGE(changeFunction: COUNT|MIN|MAX|NONE, timeframe:TIMEFRAME)'],
|
|
59
60
|
examples: [
|
|
60
61
|
"ROW_CHANGE( COUNT([columnName],2),TIMEFRAME('20s'))",
|
|
61
62
|
"ROW_CHANGE( MAX(COL('columnName')), TIMEFRAME('20s'))",
|
|
62
63
|
],
|
|
64
|
+
category: 'observable',
|
|
63
65
|
},
|
|
64
66
|
GRID_CHANGE: {
|
|
65
67
|
handler(args, context) {
|
|
@@ -94,13 +96,14 @@ exports.observableExpressionFunctions = {
|
|
|
94
96
|
}
|
|
95
97
|
}
|
|
96
98
|
},
|
|
97
|
-
|
|
99
|
+
returnType: 'boolean',
|
|
98
100
|
description: 'Observes changes with the entire grid in a single scope',
|
|
99
101
|
signatures: ['GRID_CHANGE(changeFunction: COUNT|MIN|MAX|NONE, timeframe:TIMEFRAME)'],
|
|
100
102
|
examples: [
|
|
101
103
|
"GRID_CHANGE( COUNT([columnName],2),TIMEFRAME('20s'))",
|
|
102
104
|
"GRID_CHANGE( MAX(COL('columnName')), TIMEFRAME('20s'))",
|
|
103
105
|
],
|
|
106
|
+
category: 'observable',
|
|
104
107
|
},
|
|
105
108
|
COL: {
|
|
106
109
|
handler(args, context) {
|
|
@@ -109,6 +112,7 @@ exports.observableExpressionFunctions = {
|
|
|
109
112
|
description: 'References a column by its unique identifier',
|
|
110
113
|
signatures: ['[colName]', 'COL(name: string)'],
|
|
111
114
|
examples: ['[col1]', "COL('col1')"],
|
|
115
|
+
category: 'advanced',
|
|
112
116
|
},
|
|
113
117
|
COUNT: {
|
|
114
118
|
handler(args) {
|
|
@@ -131,6 +135,7 @@ exports.observableExpressionFunctions = {
|
|
|
131
135
|
'COUNT(COL(name: string),changeCount: number)',
|
|
132
136
|
],
|
|
133
137
|
examples: ['COUNT([colName],2)', `COUNT(COL('col1'),10)`],
|
|
138
|
+
category: 'observable',
|
|
134
139
|
},
|
|
135
140
|
NONE: {
|
|
136
141
|
handler(args) {
|
|
@@ -145,6 +150,7 @@ exports.observableExpressionFunctions = {
|
|
|
145
150
|
description: 'Observes if a column value has NOT changed',
|
|
146
151
|
signatures: ['NONE([colName])', 'NONE(COL(name: string))'],
|
|
147
152
|
examples: ['NONE([colA])', `NONE(COL('col1'))`],
|
|
153
|
+
category: 'observable',
|
|
148
154
|
},
|
|
149
155
|
MIN: {
|
|
150
156
|
handler(args) {
|
|
@@ -159,6 +165,7 @@ exports.observableExpressionFunctions = {
|
|
|
159
165
|
description: 'Observes if the changed column value is the lowest',
|
|
160
166
|
signatures: ['MIN([colName])', 'MIN(COL(name: string))'],
|
|
161
167
|
examples: ['MIN([colA])', `MIN(COL('col1'))`],
|
|
168
|
+
category: 'observable',
|
|
162
169
|
},
|
|
163
170
|
MAX: {
|
|
164
171
|
handler(args) {
|
|
@@ -173,6 +180,7 @@ exports.observableExpressionFunctions = {
|
|
|
173
180
|
description: 'Observes if the changed column value is the highest',
|
|
174
181
|
signatures: ['MAX([colName])', 'MAX(COL(name: string))'],
|
|
175
182
|
examples: ['MAX([colA])', `MAX(COL('col1'))`],
|
|
183
|
+
category: 'observable',
|
|
176
184
|
},
|
|
177
185
|
TIMEFRAME: {
|
|
178
186
|
handler(args, context) {
|
|
@@ -211,6 +219,7 @@ exports.observableExpressionFunctions = {
|
|
|
211
219
|
"TIMEFRAME('%numeric_value%h')",
|
|
212
220
|
],
|
|
213
221
|
examples: ["TIMEFRAME('20s')", "TIMEFRAME('5m')", "TIMEFRAME('1h')"],
|
|
222
|
+
category: 'observable',
|
|
214
223
|
},
|
|
215
224
|
};
|
|
216
225
|
exports.observableExpressionFunctionNames = (0, TypeExtensions_1.getTypedKeys)(exports.observableExpressionFunctions);
|
|
@@ -248,7 +257,7 @@ const getDataChangedInfoStub = (context) => {
|
|
|
248
257
|
const primaryKeyValue = context.adaptableApi.gridApi.getPrimaryKeyValueForRowNode(rowNode);
|
|
249
258
|
const columnId = (_a = context.adaptableApi.columnApi.getQueryableColumns()[0]) === null || _a === void 0 ? void 0 : _a.columnId;
|
|
250
259
|
const oldValue = context.adaptableApi.gridApi.getCellRawValue(primaryKeyValue, columnId);
|
|
251
|
-
const column = context.adaptableApi.columnApi.
|
|
260
|
+
const column = context.adaptableApi.columnApi.getColumnWithColumnId(columnId);
|
|
252
261
|
const newValue = oldValue;
|
|
253
262
|
return {
|
|
254
263
|
changedAt: Date.now(),
|
|
@@ -2,6 +2,6 @@ import { ExpressionFunction } from '../../parser/src/types';
|
|
|
2
2
|
/**
|
|
3
3
|
* List of all the Scalar Functions available in AdaptableQL
|
|
4
4
|
*/
|
|
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';
|
|
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' | 'CASE' | 'COL' | 'VAR';
|
|
6
6
|
export declare const scalarExpressionFunctions: Record<ScalarFunctionName, ExpressionFunction>;
|
|
7
7
|
export declare const scalarExpressionFunctionNames: ScalarFunctionName[];
|