@adaptabletools/adaptable 11.0.0-canary.2 → 11.0.0-canary.6
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 +1 -1
- package/agGrid.js +3 -3
- package/base.css +138 -68
- package/bundle.cjs.js +131 -127
- package/index.css +140 -68
- package/package.json +33 -33
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/AdaptableNoCodeWizard.d.ts +7 -5
- package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +1 -3
- package/src/AdaptableOptions/AdaptableOptions.d.ts +11 -2
- package/src/AdaptableOptions/AlertOptions.d.ts +82 -0
- package/src/AdaptableOptions/AlertOptions.js +2 -0
- package/src/AdaptableOptions/ContainerOptions.d.ts +2 -2
- package/src/AdaptableOptions/EntitlementOptions.d.ts +1 -1
- package/src/AdaptableOptions/FilterOptions.d.ts +1 -1
- package/src/AdaptableOptions/NotificationsOptions.d.ts +1 -78
- package/src/AdaptableOptions/QueryLanguageOptions.d.ts +3 -7
- package/src/AdaptableOptions/StateOptions.d.ts +2 -1
- package/src/AdaptableOptions/TeamSharingOptions.d.ts +2 -2
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +0 -3
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +3 -3
- package/src/Api/AdaptableApi.d.ts +6 -0
- package/src/Api/AlertApi.d.ts +2 -3
- package/src/Api/ColumnApi.d.ts +0 -4
- package/src/Api/EventApi.d.ts +8 -3
- package/src/Api/Events/GridDataChanged.d.ts +4 -2
- package/src/Api/Events/SystemStatusMessageDisplayed.d.ts +1 -1
- package/src/Api/FreeTextColumnApi.d.ts +0 -12
- package/src/Api/GridApi.d.ts +5 -4
- package/src/Api/IPushPullApi.d.ts +1 -1
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -1
- package/src/Api/Implementation/AdaptableApiImpl.js +2 -0
- package/src/Api/Implementation/AlertApiImpl.d.ts +1 -2
- package/src/Api/Implementation/AlertApiImpl.js +19 -10
- package/src/Api/Implementation/ApiBase.d.ts +2 -0
- package/src/Api/Implementation/ApiBase.js +3 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +0 -1
- package/src/Api/Implementation/ColumnApiImpl.js +0 -5
- package/src/Api/Implementation/DashboardApiImpl.js +1 -1
- package/src/Api/Implementation/FlashingCellApiImpl.js +2 -4
- package/src/Api/Implementation/FreeTextColumnApiImpl.d.ts +0 -5
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +0 -9
- package/src/Api/Implementation/GridApiImpl.d.ts +5 -4
- package/src/Api/Implementation/GridApiImpl.js +4 -0
- package/src/Api/Implementation/InternalApiImpl.js +2 -2
- package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -0
- package/src/Api/Implementation/LayoutApiImpl.js +12 -1
- package/src/Api/Implementation/QueryApiImpl.js +4 -1
- package/src/Api/Implementation/QueryLanguageApiImpl.d.ts +1 -1
- package/src/Api/Implementation/QueryLanguageApiImpl.js +6 -7
- package/src/Api/Implementation/SettingsPanelApiImpl.d.ts +7 -0
- package/src/Api/Implementation/SettingsPanelApiImpl.js +15 -0
- package/src/Api/LayoutApi.d.ts +7 -0
- package/src/Api/OpenFinApi.d.ts +5 -0
- package/src/Api/PluginsApi.d.ts +29 -0
- package/src/Api/QueryLanguageApi.d.ts +10 -10
- package/src/Api/SettingsPanelApi.d.ts +17 -0
- package/src/Api/SettingsPanelApi.js +2 -0
- package/src/Api/UserInterfaceApi.d.ts +5 -2
- package/src/PredefinedConfig/AlertState.d.ts +4 -6
- package/src/PredefinedConfig/CalculatedColumnState.d.ts +0 -1
- package/src/PredefinedConfig/Common/AdaptableQuery.d.ts +7 -4
- package/src/PredefinedConfig/Common/AdaptableQuery.js +3 -3
- package/src/PredefinedConfig/Common/CellHighlightInfo.d.ts +1 -12
- package/src/PredefinedConfig/Common/DataChangedInfo.d.ts +1 -1
- package/src/PredefinedConfig/Common/Enums.d.ts +0 -1
- package/src/PredefinedConfig/Common/Enums.js +0 -2
- package/src/PredefinedConfig/Common/FDC3Context.d.ts +4 -12
- package/src/PredefinedConfig/Common/RowHighlightInfo.d.ts +15 -0
- package/src/PredefinedConfig/Common/RowHighlightInfo.js +2 -0
- package/src/PredefinedConfig/Common/Types.d.ts +1 -1
- package/src/PredefinedConfig/CustomSortState.d.ts +0 -1
- package/src/PredefinedConfig/FlashingCellState.d.ts +5 -2
- package/src/PredefinedConfig/FreeTextColumnState.d.ts +1 -1
- package/src/PredefinedConfig/LayoutState.d.ts +0 -2
- package/src/PredefinedConfig/PredefinedConfig.d.ts +5 -2
- package/src/PredefinedConfig/SystemState.d.ts +2 -1
- package/src/Redux/ActionsReducers/ApplicationRedux.js +9 -3
- package/src/Redux/ActionsReducers/FlashingCellRedux.js +4 -8
- package/src/Redux/ActionsReducers/GridRedux.js +3 -1
- package/src/Redux/ActionsReducers/PopupRedux.js +13 -3
- package/src/Redux/ActionsReducers/QuickSearchRedux.js +3 -1
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +6 -5
- package/src/Redux/ActionsReducers/SystemRedux.js +16 -14
- package/src/Redux/ActionsReducers/ThemeRedux.js +3 -1
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +1 -1
- package/src/Redux/Store/AdaptableReduxMerger.js +5 -5
- package/src/Redux/Store/AdaptableStore.js +18 -6
- package/src/Strategy/AlertModule.js +14 -4
- package/src/Strategy/ConditionalStyleModule.js +4 -0
- package/src/Strategy/DataChangeHistoryModule.js +1 -1
- package/src/Strategy/FlashingCellModule.d.ts +1 -1
- package/src/Strategy/FlashingCellModule.js +34 -18
- package/src/Strategy/FreeTextColumnModule.d.ts +2 -2
- package/src/Strategy/FreeTextColumnModule.js +10 -0
- package/src/Strategy/LayoutModule.js +1 -6
- package/src/Strategy/TeamSharingModule.js +1 -1
- package/src/Strategy/ToolPanelModule.js +5 -3
- package/src/Strategy/Utilities/getFlashingTargetViewItems.d.ts +1 -1
- package/src/Strategy/Utilities/getFlashingTargetViewItems.js +3 -1
- package/src/Strategy/Utilities/getFormatColumnSettingsViewItems.js +1 -1
- package/src/Strategy/Utilities/getRuleViewItems.d.ts +0 -1
- package/src/Strategy/Utilities/getRuleViewItems.js +0 -1
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +8 -6
- package/src/Utilities/ExpressionFunctions/{aggregationExpressionFunctions.d.ts → aggregatedBooleanExpressionFunctions.d.ts} +1 -1
- package/src/Utilities/ExpressionFunctions/{aggregationExpressionFunctions.js → aggregatedBooleanExpressionFunctions.js} +4 -4
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +7 -0
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +42 -0
- package/src/Utilities/ExpressionFunctions/dateUtils.d.ts +1 -0
- package/src/Utilities/ExpressionFunctions/dateUtils.js +13 -0
- package/src/Utilities/ExpressionFunctions/deepMap.d.ts +35 -0
- package/src/Utilities/ExpressionFunctions/deepMap.js +283 -0
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +1 -1
- package/src/Utilities/ExpressionFunctions/groupingMap.d.ts +36 -0
- package/src/Utilities/ExpressionFunctions/groupingMap.js +104 -0
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +2 -3
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +13 -4
- package/src/Utilities/Extensions/StringExtensions.js +1 -1
- package/src/Utilities/Helpers/AdaptableHelper.js +3 -2
- package/src/Utilities/Helpers/CalendarHelper.js +220 -55
- package/src/Utilities/Interface/MessagePopups.d.ts +6 -2
- package/src/Utilities/ObjectFactory.js +5 -2
- package/src/Utilities/Services/AlertService.js +3 -3
- package/src/Utilities/Services/DataService.js +6 -1
- package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +2 -2
- package/src/Utilities/Services/LicenseService.js +1 -1
- package/src/Utilities/Services/QueryLanguageService.d.ts +2 -2
- package/src/Utilities/Services/QueryLanguageService.js +21 -16
- package/src/Utilities/Services/ReportService.js +7 -3
- package/src/Utilities/Services/TeamSharingService.js +5 -3
- package/src/View/AdaptablePopover/index.js +6 -1
- package/src/View/AdaptableView.js +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +5 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationForm.js +5 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/index.js +4 -1
- package/src/View/AdaptableWizardView/helper.js +5 -3
- package/src/View/Alert/Wizard/AlertButtonsEditor.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +5 -1
- package/src/View/Alert/Wizard/AlertRulesWizardSection.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertWizard.js +2 -2
- package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.d.ts +2 -3
- package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +3 -5
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +3 -2
- package/src/View/Alert/Wizard/isValidAlertRules.js +3 -3
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +17 -6
- package/src/View/CellSummary/CellSummaryViewPanel.js +1 -2
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +5 -2
- package/src/View/Components/EntityRulesEditor/index.js +9 -9
- package/src/View/Components/FilterForm/FilterForm.js +0 -2
- package/src/View/Components/FilterForm/QuickFilterForm.js +8 -7
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +1 -1
- package/src/View/Components/ModuleValueSelector/index.js +1 -1
- package/src/View/Components/Panels/PanelWithImage.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.d.ts +0 -3
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +45 -87
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.d.ts +11 -0
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +78 -0
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.d.ts +3 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +19 -6
- package/src/View/Components/Popups/AdaptablePopup/Navigation.d.ts +1 -3
- package/src/View/Components/Popups/AdaptablePopup/Navigation.js +5 -13
- package/src/View/Components/Popups/AdaptablePopup/TopBar.js +5 -4
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.d.ts +2 -0
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +44 -0
- package/src/View/Components/Popups/AdaptablePopupConfirmation.js +3 -1
- package/src/View/Components/Popups/AdaptablePopupPrompt.d.ts +5 -12
- package/src/View/Components/Popups/AdaptablePopupPrompt.js +38 -37
- package/src/View/Components/Popups/AdaptablePopupTeamSharing.js +4 -1
- package/src/View/Components/ScopeComponent.js +4 -1
- package/src/View/Components/SharedProps/ModuleViewPopupProps.d.ts +1 -1
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -1
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +6 -2
- package/src/View/Components/ToolPanel/ToolPanelPopup.js +7 -5
- package/src/View/Components/ToolPanel/ToolPanelWrapper.js +1 -1
- package/src/View/Components/ValueSelector/index.d.ts +2 -1
- package/src/View/Components/ValueSelector/index.js +5 -5
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleRuleWizardSection.js +2 -2
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.d.ts +8 -0
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.js +27 -0
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.js +17 -5
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +3 -1
- package/src/View/CustomSort/Wizard/CustomSortWizard.js +17 -5
- package/src/View/Dashboard/CustomToolbarWrapper.js +5 -1
- package/src/View/Dashboard/Dashboard.js +5 -5
- package/src/View/Dashboard/DashboardPopup.js +8 -6
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +2 -1
- package/src/View/Export/Wizard/NewReportWizard.js +13 -3
- package/src/View/Export/Wizard/ReportColumnTypeWizard.js +3 -1
- package/src/View/Export/Wizard/ReportRowTypeWizard.js +3 -1
- package/src/View/Filter/FilterViewPanel.d.ts +1 -4
- package/src/View/Filter/FilterViewPanel.js +1 -3
- package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +17 -26
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +19 -2
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +20 -5
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +11 -6
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +1 -2
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +12 -5
- package/src/View/GridInfo/AdaptableOptionsComponent.js +4 -1
- package/src/View/Layout/Wizard/LayoutEditor/index.js +5 -1
- package/src/View/Layout/Wizard/LayoutEditorWizard.js +7 -1
- package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +8 -2
- package/src/View/Query/ExpandedQueryPopup.js +9 -2
- package/src/View/Query/QueryViewPanel.js +15 -10
- package/src/View/Query/Wizard/NamedQueryWizard.js +6 -4
- package/src/View/QuickSearch/QuickSearchPopup.js +3 -3
- package/src/View/QuickSearch/useQuickSearchDebounced.js +1 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsSummary.js +12 -2
- package/src/View/Schedule/Wizard/ScheduleWizard.js +14 -14
- package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
- package/src/View/UIHelper.js +4 -1
- package/src/View/Wizard/AdaptableWizard.js +13 -4
- package/src/View/Wizard/Interface/IAdaptableWizard.d.ts +2 -0
- package/src/View/Wizard/OnePageAdaptableWizard.js +6 -2
- package/src/agGrid/Adaptable.d.ts +2 -5
- package/src/agGrid/Adaptable.js +127 -75
- package/src/agGrid/agGridHelper.js +3 -8
- package/src/agGrid/agGridMenuHelper.js +5 -9
- package/src/agGrid/editors/AdaptableDateEditor/index.js +1 -1
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +1 -1
- package/src/components/ApplicationIcon.d.ts +1 -0
- package/src/components/ApplicationIcon.js +2 -2
- package/src/components/Dashboard/Dashboard.js +4 -1
- package/src/components/Dashboard/DashboardManager.d.ts +5 -3
- package/src/components/Dashboard/DashboardManager.js +33 -27
- package/src/components/Dropdown/index.js +8 -1
- package/src/components/DropdownButton/renderItem.js +1 -1
- package/src/components/ExpressionEditor/EditorInputReactive.d.ts +1 -1
- package/src/components/ExpressionEditor/EditorInputReactive.js +4 -2
- package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +4 -1
- package/src/components/ExpressionEditor/index.d.ts +1 -1
- package/src/components/ExpressionEditor/index.js +12 -5
- package/src/components/FormLayout/index.js +1 -1
- package/src/components/OverlayTrigger/Overlay.js +1 -1
- package/src/components/SizedContainer/index.js +7 -1
- package/src/components/WindowModal/WindowModal.js +4 -1
- package/src/metamodel/adaptable.metamodel.d.ts +75 -24
- package/src/metamodel/adaptable.metamodel.js +223 -115
- package/src/types.d.ts +6 -3
- package/themes/dark.css +4 -4
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -160,6 +160,17 @@ class AdaptableStore {
|
|
|
160
160
|
case exports.LOAD_STATE:
|
|
161
161
|
const { State } = action;
|
|
162
162
|
Object.keys(State).forEach((key) => {
|
|
163
|
+
// this check should be removed in version 12 !!!
|
|
164
|
+
if (key === 'Chart') {
|
|
165
|
+
LoggingHelper_1.ConsoleLogWarning(`DEPRECATED: AdapTable Charts Plugin is deprecated! AG Grid built-in charts are fully supported & integrated in AdapTable.
|
|
166
|
+
|
|
167
|
+
Please contact 'support@adaptabletools.com' if you require any charting features that are not currently available.`);
|
|
168
|
+
}
|
|
169
|
+
if (key === 'SparklineColumn') {
|
|
170
|
+
LoggingHelper_1.ConsoleLogWarning(`DEPRECATED: AdapTable SparklineColumn is deprecated! AG Grid built-in Sparklines are fully supported & integrated in AdapTable.
|
|
171
|
+
|
|
172
|
+
Please contact 'support@adaptabletools.com' if you require any sparklines features that are not currently available.`);
|
|
173
|
+
}
|
|
163
174
|
state[key] = State[key];
|
|
164
175
|
});
|
|
165
176
|
break;
|
|
@@ -171,6 +182,7 @@ class AdaptableStore {
|
|
|
171
182
|
// If the user has remote storage set then we use Remote Engine, otherwise we use Local Enginge
|
|
172
183
|
// not sure we can do this as we need to be backwardly compatible with existing users so need to stick with adaptable id (which should be unique)
|
|
173
184
|
// const localStorageKey = 'adaptable-adaptable-state-' + adaptable.adaptableOptions.primaryKey;
|
|
185
|
+
const predefinedConfig = adaptable.adaptableOptions.predefinedConfig;
|
|
174
186
|
storageEngine = AdaptableReduxLocalStorageEngine_1.createEngine({
|
|
175
187
|
adaptableId: adaptable.adaptableOptions.adaptableId,
|
|
176
188
|
adaptableStateKey: adaptable.adaptableOptions.adaptableStateKey,
|
|
@@ -305,9 +317,9 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
|
|
|
305
317
|
/*******************
|
|
306
318
|
* FLASHING ALERT ACTIONS
|
|
307
319
|
*******************/
|
|
308
|
-
case SystemRedux.
|
|
309
|
-
case SystemRedux.
|
|
310
|
-
const { flashingCell: FlashingCell
|
|
320
|
+
case SystemRedux.SYSTEM_FLASHING_CELL_ADD:
|
|
321
|
+
case SystemRedux.SYSTEM_FLASHING_CELL_DELETE: {
|
|
322
|
+
const { flashingCell: FlashingCell } = action;
|
|
311
323
|
const { dataChangedInfo } = FlashingCell;
|
|
312
324
|
let ret = next(action);
|
|
313
325
|
if (dataChangedInfo) {
|
|
@@ -1075,7 +1087,7 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
|
|
|
1075
1087
|
case TeamSharingRedux.TEAMSHARING_IMPORT_ITEM: {
|
|
1076
1088
|
let returnAction = next(action);
|
|
1077
1089
|
const actionTyped = action;
|
|
1078
|
-
const [importStepActions, needsOverwriteConfirmation
|
|
1090
|
+
const [importStepActions, needsOverwriteConfirmation] = adaptable.api.internalApi
|
|
1079
1091
|
.getTeamSharingService()
|
|
1080
1092
|
.buildSharedEntityImportActions(actionTyped.SharedEntity);
|
|
1081
1093
|
const processImportAction = TeamSharingRedux.TeamSharingProcessImport(importStepActions);
|
|
@@ -1148,14 +1160,14 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
|
|
|
1148
1160
|
.getSharedEntities(adaptableId)
|
|
1149
1161
|
.then((sharedEntities) => {
|
|
1150
1162
|
// check if remote server has a newer revision
|
|
1151
|
-
const [localRevision, remoteRevision
|
|
1163
|
+
const [localRevision, remoteRevision] = adaptable.api.internalApi
|
|
1152
1164
|
.getTeamSharingService()
|
|
1153
1165
|
.getSharedEntityLocalAndRemoteRevisions(ChangedAdaptableObject.Uuid, sharedEntities);
|
|
1154
1166
|
if (remoteRevision > localRevision) {
|
|
1155
1167
|
// if remote has a newer version, we will NOT overwrite it
|
|
1156
1168
|
return;
|
|
1157
1169
|
}
|
|
1158
|
-
const [updatedSharedEntities, newActiveEntities
|
|
1170
|
+
const [updatedSharedEntities, newActiveEntities] = adaptable.api.internalApi
|
|
1159
1171
|
.getTeamSharingService()
|
|
1160
1172
|
.updateActiveSharedEntity(ChangedAdaptableObject, UserName, sharedEntities);
|
|
1161
1173
|
middlewareAPI.dispatch(TeamSharingRedux.TeamSharingLinkItem(...newActiveEntities));
|
|
@@ -19,12 +19,12 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
19
19
|
constructor(api) {
|
|
20
20
|
super(ModuleConstants.AlertModuleId, 'Alert', 'alert', 'AlertPopup', 'Get notified when things happen in Adaptable that you need to know about', api);
|
|
21
21
|
this.api.internalApi.getDataService().on('DataChanged', (dataChangedInfo) => {
|
|
22
|
-
if (dataChangedInfo.trigger === 'undo') {
|
|
22
|
+
if (dataChangedInfo.trigger === 'undo' || dataChangedInfo.trigger === 'aggChange') {
|
|
23
23
|
// do NOT handle reverted changes
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
|
-
if (this.api.internalApi.getAdaptableOptions().
|
|
27
|
-
|
|
26
|
+
if (this.api.internalApi.getAdaptableOptions().alertOptions.dataChangeDetectionPolicy ===
|
|
27
|
+
'formattedValue') {
|
|
28
28
|
const { oldValue, newValue } = dataChangedInfo;
|
|
29
29
|
const columnId = dataChangedInfo.column.columnId;
|
|
30
30
|
const oldFormattedValue = this.api.gridApi.getFormattedValueFromRawValue(columnId, oldValue);
|
|
@@ -63,8 +63,10 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
63
63
|
return this.api.queryApi.getReferencedNamedQueryNames(queryExpression);
|
|
64
64
|
}
|
|
65
65
|
updateOldConfig() {
|
|
66
|
+
var _a;
|
|
66
67
|
// 1. Make all (new) Flashing Alerts have a Predicate if none exists
|
|
67
|
-
const
|
|
68
|
+
const alertState = this.api.alertApi.getAlertState();
|
|
69
|
+
const flashingAlertDefinitions = alertState.FlashingAlertDefinitions;
|
|
68
70
|
const flashingCellDefinitions = this.api.flashingCellApi.getFlashingCellDefinitions();
|
|
69
71
|
if (ArrayExtensions_1.ArrayExtensions.IsEmpty(flashingCellDefinitions) &&
|
|
70
72
|
ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(flashingAlertDefinitions)) {
|
|
@@ -72,6 +74,14 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
72
74
|
// TODO: state does not clear
|
|
73
75
|
this.api.internalApi.clearFlashingCellState();
|
|
74
76
|
}
|
|
77
|
+
//migrate alert definitions with `AggregationExpression` (now `AggregatedBooleanExpression`)
|
|
78
|
+
(_a = alertState.AlertDefinitions) === null || _a === void 0 ? void 0 : _a.forEach((alertDefinition) => {
|
|
79
|
+
// @ts-ignore
|
|
80
|
+
const obsoleteAggregationExpression = alertDefinition.Rule['AggregationExpression'];
|
|
81
|
+
if (obsoleteAggregationExpression) {
|
|
82
|
+
alertDefinition.Rule.AggregatedBooleanExpression = obsoleteAggregationExpression;
|
|
83
|
+
}
|
|
84
|
+
});
|
|
75
85
|
}
|
|
76
86
|
addContextMenuItems(menuContext) {
|
|
77
87
|
const items = [];
|
|
@@ -191,6 +191,10 @@ class ConditionalStyleModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
191
191
|
getScopeViewItems_1.getScopeViewItems(conditionalStyle.Scope),
|
|
192
192
|
getStyleViewItems_1.getStyleViewItems(),
|
|
193
193
|
getRuleViewItems_1.getRuleViewItems(conditionalStyle.Rule, this.api),
|
|
194
|
+
{
|
|
195
|
+
name: 'Settings',
|
|
196
|
+
values: [`Include grouped rows: ${conditionalStyle.IncludeGroupedRows ? 'Yes' : 'No'}`],
|
|
197
|
+
},
|
|
194
198
|
],
|
|
195
199
|
abObject: conditionalStyle,
|
|
196
200
|
};
|
|
@@ -9,7 +9,7 @@ class DataChangeHistoryModule extends AdaptableModuleBase_1.AdaptableModuleBase
|
|
|
9
9
|
constructor(api) {
|
|
10
10
|
super(ModuleConstants.DataChangeHistoryModuleId, 'Data Changes', 'track-changes', 'DataChangeHistoryPopup', 'Provides an overview of all previous changes, giving the possibility to undo specific changes', api);
|
|
11
11
|
this.api.internalApi.getDataService().on('DataChanged', (dataChangedInfo) => {
|
|
12
|
-
if (dataChangedInfo.trigger !== 'undo') {
|
|
12
|
+
if (dataChangedInfo.trigger !== 'undo' && dataChangedInfo.trigger !== 'aggChange') {
|
|
13
13
|
if (this.shouldLogDataChange(dataChangedInfo)) {
|
|
14
14
|
this.api.internalApi.dispatchReduxAction(SystemRedux_1.SystemDataChangeHistoryAdd(dataChangedInfo));
|
|
15
15
|
}
|
|
@@ -18,8 +18,8 @@ export declare class FlashingCellModule extends AdaptableModuleBase implements I
|
|
|
18
18
|
addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
19
19
|
protected handleDataSourceChanged(dataChangedInfo: DataChangedInfo): void;
|
|
20
20
|
private showFlashingCellsForDefinitions;
|
|
21
|
+
private isFlashingTargetOnlyAggChange;
|
|
21
22
|
private getFlashingCellDefinitionsForDataChange;
|
|
22
|
-
private getBaseAlertDefinitionsForDataChange;
|
|
23
23
|
private isAlertPredicateTriggered;
|
|
24
24
|
getTeamSharingAction(): TeamSharingImportInfo<FlashingCellDefinition>;
|
|
25
25
|
toView(flashingCell: FlashingCellDefinition): AdaptableObjectView;
|
|
@@ -24,8 +24,8 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
24
24
|
}
|
|
25
25
|
// TODO: think about flashing row value only
|
|
26
26
|
// - flash for the underlying small data changes, but the visual does not
|
|
27
|
-
if (this.api.internalApi.getAdaptableOptions().
|
|
28
|
-
|
|
27
|
+
if (this.api.internalApi.getAdaptableOptions().alertOptions.dataChangeDetectionPolicy ===
|
|
28
|
+
'formattedValue') {
|
|
29
29
|
const { oldValue, newValue } = dataChangedInfo;
|
|
30
30
|
const columnId = dataChangedInfo.column.columnId;
|
|
31
31
|
const oldFormattedValue = this.api.gridApi.getFormattedValueFromRawValue(columnId, oldValue);
|
|
@@ -123,9 +123,13 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
123
123
|
direction = up ? 'up' : down ? 'down' : 'neutral';
|
|
124
124
|
}
|
|
125
125
|
flashingCellDefinitions.forEach((flashingCellDefinition) => {
|
|
126
|
-
|
|
126
|
+
var _a;
|
|
127
|
+
let flashTarget = this.api.flashingCellApi.getFlashingCellFlashTarget(flashingCellDefinition);
|
|
127
128
|
const flashColumnIds = { [dataChangedInfo.column.columnId]: true };
|
|
128
|
-
|
|
129
|
+
/**
|
|
130
|
+
* When flashing a row, all columns in that row are marked to flash.
|
|
131
|
+
*/
|
|
132
|
+
if (flashTarget === 'row' || ((_a = flashTarget === null || flashTarget === void 0 ? void 0 : flashTarget.includes) === null || _a === void 0 ? void 0 : _a.call(flashTarget, 'row'))) {
|
|
129
133
|
allColumnIds.forEach((colId) => {
|
|
130
134
|
flashColumnIds[colId] = true;
|
|
131
135
|
});
|
|
@@ -141,18 +145,30 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
141
145
|
});
|
|
142
146
|
});
|
|
143
147
|
}
|
|
144
|
-
|
|
145
|
-
|
|
148
|
+
isFlashingTargetOnlyAggChange(flashingCellDefinition) {
|
|
149
|
+
if (flashingCellDefinition.FlashTarget === 'aggFuncCell') {
|
|
150
|
+
return true;
|
|
151
|
+
}
|
|
152
|
+
return (Array.isArray(flashingCellDefinition.FlashTarget) &&
|
|
153
|
+
flashingCellDefinition.FlashTarget.length === 1 &&
|
|
154
|
+
flashingCellDefinition.FlashTarget.includes('aggFuncCell'));
|
|
146
155
|
}
|
|
147
|
-
|
|
148
|
-
|
|
156
|
+
getFlashingCellDefinitionsForDataChange(dataChangedEvent) {
|
|
157
|
+
const definitions = this.api.flashingCellApi.getActiveFlashingCellDefinitions();
|
|
158
|
+
const defaultNoPredicateReturn = false;
|
|
159
|
+
let relatedFlashingCellsDefinitions = definitions
|
|
149
160
|
.filter((v) => this.api.scopeApi.isColumnInScope(dataChangedEvent.column, v.Scope))
|
|
150
161
|
.filter((flashingCellDefinition) => !AdaptableQuery_1.isReactiveQuery(flashingCellDefinition.Rule));
|
|
151
|
-
let
|
|
152
|
-
if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
162
|
+
let triggeredFlashingCells = [];
|
|
163
|
+
if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(relatedFlashingCellsDefinitions)) {
|
|
164
|
+
relatedFlashingCellsDefinitions.forEach((flashingCellDefinition) => {
|
|
165
|
+
// for aggregation the data-change needs to be aggChange
|
|
166
|
+
if (dataChangedEvent.trigger !== 'aggChange' &&
|
|
167
|
+
this.isFlashingTargetOnlyAggChange(flashingCellDefinition)) {
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
if (flashingCellDefinition.Rule.BooleanExpression) {
|
|
171
|
+
let expression = flashingCellDefinition.Rule.BooleanExpression;
|
|
156
172
|
let rowNode = dataChangedEvent.rowNode;
|
|
157
173
|
if (!rowNode) {
|
|
158
174
|
rowNode = this.api.gridApi.getRowNodeForPrimaryKey(dataChangedEvent.primaryKeyValue);
|
|
@@ -163,15 +179,15 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
163
179
|
.getQueryLanguageService()
|
|
164
180
|
.evaluateBooleanExpression(expression, this.moduleInfo.ModuleName, rowNode);
|
|
165
181
|
if (isSatisfiedExpression) {
|
|
166
|
-
|
|
182
|
+
triggeredFlashingCells.push(flashingCellDefinition);
|
|
167
183
|
}
|
|
168
184
|
}
|
|
169
|
-
else if (this.isAlertPredicateTriggered(
|
|
170
|
-
|
|
185
|
+
else if (this.isAlertPredicateTriggered(flashingCellDefinition, dataChangedEvent, defaultNoPredicateReturn)) {
|
|
186
|
+
triggeredFlashingCells.push(flashingCellDefinition);
|
|
171
187
|
}
|
|
172
188
|
});
|
|
173
189
|
}
|
|
174
|
-
return
|
|
190
|
+
return triggeredFlashingCells;
|
|
175
191
|
}
|
|
176
192
|
isAlertPredicateTriggered(alert, dataChangedEvent, defaultNoPredicateReturn = false) {
|
|
177
193
|
return this.api.predicateApi.handlePredicate(alert.Rule.Predicate, {
|
|
@@ -194,7 +210,7 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
194
210
|
return {
|
|
195
211
|
items: [
|
|
196
212
|
Object.assign(Object.assign({}, getScopeViewItems_1.getScopeViewItems(flashingCell.Scope)), { label: 'Trigger' }),
|
|
197
|
-
getRuleViewItems_1.getRuleViewItems(flashingCell.Rule, this.api),
|
|
213
|
+
Object.assign(Object.assign({}, getRuleViewItems_1.getRuleViewItems(flashingCell.Rule, this.api)), { label: 'Rule', name: 'Rule' }),
|
|
198
214
|
getFlashingCellDurationViewItems_1.getFlashingCellDurationViewItems(flashingCell),
|
|
199
215
|
getFlashingTargetViewItems_1.getFlashingTargetViewItems(flashingCell),
|
|
200
216
|
getFlashingCellStyleViewItems_1.getFlashingCellStyleViewItems(),
|
|
@@ -7,12 +7,12 @@ import { TeamSharingImportInfo } from '../PredefinedConfig/TeamSharingState';
|
|
|
7
7
|
import { FreeTextColumn } from '../PredefinedConfig/FreeTextColumnState';
|
|
8
8
|
import { AdaptableObjectView, IModule } from './Interface/IModule';
|
|
9
9
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
10
|
-
import { AdaptableObject } from '../PredefinedConfig/Common/AdaptableObject';
|
|
11
10
|
export declare class FreeTextColumnModule extends AdaptableModuleBase implements IModule {
|
|
12
11
|
constructor(api: AdaptableApi);
|
|
13
12
|
isModuleAvailable(): boolean;
|
|
14
|
-
getModuleAdaptableObjects():
|
|
13
|
+
getModuleAdaptableObjects(): FreeTextColumn[];
|
|
15
14
|
hasNamedQueryReferences(): boolean;
|
|
15
|
+
updateOldConfig(): void;
|
|
16
16
|
addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
17
17
|
getTeamSharingAction(): TeamSharingImportInfo<FreeTextColumn>;
|
|
18
18
|
toView(freeTextColumn: FreeTextColumn): AdaptableObjectView;
|
|
@@ -21,6 +21,16 @@ class FreeTextColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
21
21
|
hasNamedQueryReferences() {
|
|
22
22
|
return false;
|
|
23
23
|
}
|
|
24
|
+
updateOldConfig() {
|
|
25
|
+
// make sure all default to type string
|
|
26
|
+
const allFreeTextColumns = this.getModuleAdaptableObjects();
|
|
27
|
+
for (const freeTextColumn of allFreeTextColumns) {
|
|
28
|
+
if (!freeTextColumn.DataType) {
|
|
29
|
+
const updatedFreeTextColumn = Object.assign(Object.assign({}, freeTextColumn), { DataType: 'String' });
|
|
30
|
+
this.api.freeTextColumnApi.editFreeTextColumn(updatedFreeTextColumn);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
24
34
|
addColumnMenuItems(column) {
|
|
25
35
|
if (column && this.isModuleEditable()) {
|
|
26
36
|
if (this.api.freeTextColumnApi
|
|
@@ -48,12 +48,7 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
48
48
|
}
|
|
49
49
|
if (column) {
|
|
50
50
|
if (!isReadOnlyLayout) {
|
|
51
|
-
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('Change Caption', 'edit', () =>
|
|
52
|
-
let newname = prompt('Enter a new Caption for the Column');
|
|
53
|
-
if (newname) {
|
|
54
|
-
this.api.layoutApi.setColumnCaption(column.columnId, newname);
|
|
55
|
-
}
|
|
56
|
-
}));
|
|
51
|
+
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('Change Caption', 'edit', () => this.api.layoutApi.showChangeColumnCaption(column)));
|
|
57
52
|
}
|
|
58
53
|
if (column.hideable) {
|
|
59
54
|
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('Hide Column', 'hide-column', () => {
|
|
@@ -7,7 +7,7 @@ const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/Mod
|
|
|
7
7
|
const isAdaptableObject_1 = require("../Utilities/isAdaptableObject");
|
|
8
8
|
const TeamSharingRedux_1 = require("../Redux/ActionsReducers/TeamSharingRedux");
|
|
9
9
|
const TeamSharingRedux = tslib_1.__importStar(require("../Redux/ActionsReducers/TeamSharingRedux"));
|
|
10
|
-
const isEqual_1 = tslib_1.__importDefault(require("lodash
|
|
10
|
+
const isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
|
|
11
11
|
const LayoutRedux_1 = require("../Redux/ActionsReducers/LayoutRedux");
|
|
12
12
|
class TeamSharingModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
13
13
|
constructor(api) {
|
|
@@ -15,8 +15,7 @@ class ToolPanelModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
15
15
|
if (!super.isModuleAvailable()) {
|
|
16
16
|
return false;
|
|
17
17
|
}
|
|
18
|
-
const toolPanelOptions = this.api.internalApi.getAdaptableOptions()
|
|
19
|
-
.toolPanelOptions;
|
|
18
|
+
const toolPanelOptions = this.api.internalApi.getAdaptableOptions().toolPanelOptions;
|
|
20
19
|
return (toolPanelOptions &&
|
|
21
20
|
toolPanelOptions.showAdaptableToolPanel &&
|
|
22
21
|
toolPanelOptions.showAdaptableToolPanel == true);
|
|
@@ -25,7 +24,10 @@ class ToolPanelModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
25
24
|
const deprecatedToolPanelConfigs = this.api.toolPanelApi.getToolPanelState().VisibleToolPanels;
|
|
26
25
|
if (deprecatedToolPanelConfigs === null || deprecatedToolPanelConfigs === void 0 ? void 0 : deprecatedToolPanelConfigs.length) {
|
|
27
26
|
LoggingHelper_1.LogAdaptableWarning(`Updating Obsolete VisibleToolPanels Config for ToolPanelState: [${deprecatedToolPanelConfigs}]`);
|
|
28
|
-
const migratedToolPanelConfigs = deprecatedToolPanelConfigs.map((toolPanel) => ({
|
|
27
|
+
const migratedToolPanelConfigs = deprecatedToolPanelConfigs.map((toolPanel) => ({
|
|
28
|
+
Name: toolPanel,
|
|
29
|
+
State: 'collapsed',
|
|
30
|
+
}));
|
|
29
31
|
this.api.internalApi.dispatchReduxAction(ToolPanelRedux_1.ToolPanelSetToolPanels(migratedToolPanelConfigs));
|
|
30
32
|
}
|
|
31
33
|
else if (!this.api.toolPanelApi.getToolPanelState().ToolPanels) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FlashingCellDefinition } from '../../../types';
|
|
2
2
|
export declare const getFlashingTargetViewItems: (flashingCell: FlashingCellDefinition) => {
|
|
3
3
|
name: string;
|
|
4
|
-
values: ("
|
|
4
|
+
values: import("../../PredefinedConfig/FlashingCellState").FlashTargetTypes[];
|
|
5
5
|
};
|
|
@@ -4,6 +4,8 @@ exports.getFlashingTargetViewItems = void 0;
|
|
|
4
4
|
exports.getFlashingTargetViewItems = (flashingCell) => {
|
|
5
5
|
return {
|
|
6
6
|
name: 'Target',
|
|
7
|
-
values:
|
|
7
|
+
values: Array.isArray(flashingCell.FlashTarget)
|
|
8
|
+
? flashingCell.FlashTarget
|
|
9
|
+
: [flashingCell.FlashTarget],
|
|
8
10
|
};
|
|
9
11
|
};
|
|
@@ -6,7 +6,7 @@ exports.getFormatColumnSettingsViewItems = (calculatedColumn) => {
|
|
|
6
6
|
const values = [
|
|
7
7
|
`Cell alignment: ${(_a = calculatedColumn.CellAlignment) !== null && _a !== void 0 ? _a : 'default'}`,
|
|
8
8
|
calculatedColumn.HeaderName && `Header name: ${calculatedColumn.HeaderName}`,
|
|
9
|
-
`Include grouped rows: ${calculatedColumn.IncludeGroupedRows ? '
|
|
9
|
+
`Include grouped rows: ${calculatedColumn.IncludeGroupedRows ? 'Yes' : 'No'}`,
|
|
10
10
|
].filter(Boolean);
|
|
11
11
|
return {
|
|
12
12
|
name: 'Settings',
|
|
@@ -8,7 +8,7 @@ const UIHelper_1 = tslib_1.__importStar(require("../../View/UIHelper"));
|
|
|
8
8
|
const booleanExpressionFunctions_1 = require("../ExpressionFunctions/booleanExpressionFunctions");
|
|
9
9
|
const scalarExpressionFunctions_1 = require("../ExpressionFunctions/scalarExpressionFunctions");
|
|
10
10
|
const observableExpressionFunctions_1 = require("../ExpressionFunctions/observableExpressionFunctions");
|
|
11
|
-
const
|
|
11
|
+
const aggregatedBooleanExpressionFunctions_1 = require("../ExpressionFunctions/aggregatedBooleanExpressionFunctions");
|
|
12
12
|
const AdaptablePredicate_1 = require("../../PredefinedConfig/Common/AdaptablePredicate");
|
|
13
13
|
const Enums_1 = require("../../PredefinedConfig/Common/Enums");
|
|
14
14
|
exports.DefaultAdaptableOptions = {
|
|
@@ -19,20 +19,22 @@ exports.DefaultAdaptableOptions = {
|
|
|
19
19
|
autogeneratePrimaryKey: false,
|
|
20
20
|
userName: GeneralConstants.USER_NAME,
|
|
21
21
|
predefinedConfig: undefined,
|
|
22
|
-
|
|
22
|
+
alertOptions: {
|
|
23
23
|
alertForms: undefined,
|
|
24
24
|
maxAlertsInStore: 20,
|
|
25
|
+
cellHighlightDuration: 3000,
|
|
26
|
+
dataChangeDetectionPolicy: 'rawValue',
|
|
27
|
+
actionHandlers: undefined,
|
|
28
|
+
},
|
|
29
|
+
notificationsOptions: {
|
|
25
30
|
maxNotifications: 3,
|
|
26
31
|
position: 'BottomRight',
|
|
27
32
|
duration: 3000,
|
|
28
|
-
cellHighlightDuration: 3000,
|
|
29
|
-
dataChangeDetectionPolicy: 'rawValue',
|
|
30
33
|
showProgressBar: false,
|
|
31
34
|
closeWhenClicked: false,
|
|
32
35
|
pauseWhenHovering: false,
|
|
33
36
|
isDraggable: false,
|
|
34
37
|
transition: 'Slide',
|
|
35
|
-
actionHandlers: undefined,
|
|
36
38
|
showApplicationIcon: false,
|
|
37
39
|
showSystemStatusMessageNotifications: false,
|
|
38
40
|
maxSystemMessagesInStore: 100,
|
|
@@ -210,7 +212,7 @@ exports.DefaultAdaptableOptions = {
|
|
|
210
212
|
defaultBooleanFunctions: booleanExpressionFunctions_1.booleanExpressionFunctions,
|
|
211
213
|
defaultScalarFunctions: scalarExpressionFunctions_1.scalarExpressionFunctions,
|
|
212
214
|
defaultObservableFunctions: observableExpressionFunctions_1.observableExpressionFunctions,
|
|
213
|
-
|
|
215
|
+
defaultAggregatedBooleanFunctions: aggregatedBooleanExpressionFunctions_1.aggregatedBooleanExpressionFunctions,
|
|
214
216
|
moduleExpressionFunctions: undefined,
|
|
215
217
|
queryableColumns: undefined,
|
|
216
218
|
performExpressionValidation: true,
|
|
@@ -2,5 +2,5 @@ import { ExpressionFunction } from '../../parser/src/types';
|
|
|
2
2
|
declare type AggregationFunctionName = 'WHERE' | 'COL' | AggregationFunction | ComparisonFunction;
|
|
3
3
|
declare type AggregationFunction = 'SUM';
|
|
4
4
|
declare type ComparisonFunction = 'EQ' | 'NEQ' | 'LT' | 'GT' | 'LTE' | 'GTE';
|
|
5
|
-
export declare const
|
|
5
|
+
export declare const aggregatedBooleanExpressionFunctions: Record<AggregationFunctionName, ExpressionFunction>;
|
|
6
6
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.aggregatedBooleanExpressionFunctions = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const rxjs_1 = require("rxjs");
|
|
6
|
-
const parseInt_1 = tslib_1.__importDefault(require("lodash
|
|
6
|
+
const parseInt_1 = tslib_1.__importDefault(require("lodash/parseInt"));
|
|
7
7
|
const ExpressionEvaluationError_1 = require("../../parser/src/ExpressionEvaluationError");
|
|
8
8
|
const operators_1 = require("rxjs/operators");
|
|
9
9
|
const expressionFunctionUtils_1 = require("./expressionFunctionUtils");
|
|
@@ -14,7 +14,7 @@ const aggregationScalarOperandMap = {
|
|
|
14
14
|
// 1. block containing a numeric value (any digits) (required)
|
|
15
15
|
// 2. block containing a single 'K', 'M' or 'B' letter (optional) (case insensitive)
|
|
16
16
|
const CRITERIA_REGEX = /^(?:\s*)(\d+)(K|M|B)?$/i;
|
|
17
|
-
exports.
|
|
17
|
+
exports.aggregatedBooleanExpressionFunctions = {
|
|
18
18
|
WHERE: {
|
|
19
19
|
handler(args, context) {
|
|
20
20
|
return expressionFunctionUtils_1.handleWhereFunction(args, context);
|
|
@@ -55,7 +55,7 @@ exports.aggregationExpressionFunctions = {
|
|
|
55
55
|
return handleAggregationCondition(args, context, '=', (aggregatedValue, conditionValue) => aggregatedValue === conditionValue);
|
|
56
56
|
},
|
|
57
57
|
isHiddenFromMenu: true,
|
|
58
|
-
description: 'Evaluates if the aggregation result
|
|
58
|
+
description: 'Evaluates if the aggregation result equals a numerical value defined either as a number or a string abbreviation for thousands(K), millions(M) or billions(B)',
|
|
59
59
|
signatures: [
|
|
60
60
|
'SUM() = number',
|
|
61
61
|
`SUM() = '%number%(K|M|B)'`,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ExpressionFunction } from '../../parser/src/types';
|
|
2
|
+
import { BaseParameter } from './expressionFunctionUtils';
|
|
3
|
+
export declare type AggregatedScalarFunctionName = 'CUMSUM' | 'OVER' | 'COL';
|
|
4
|
+
export interface OverParameter extends BaseParameter<'operand', 'OVER'> {
|
|
5
|
+
value: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const aggregatedScalarExpressionFunctions: Record<AggregatedScalarFunctionName, ExpressionFunction>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.aggregatedScalarExpressionFunctions = void 0;
|
|
4
|
+
const expressionFunctionUtils_1 = require("./expressionFunctionUtils");
|
|
5
|
+
exports.aggregatedScalarExpressionFunctions = {
|
|
6
|
+
CUMSUM: {
|
|
7
|
+
handler(args, context) {
|
|
8
|
+
const cumulatedColumnParameter = expressionFunctionUtils_1.extractColumnParameter('SUM', args);
|
|
9
|
+
expressionFunctionUtils_1.validateColumnType(cumulatedColumnParameter.value, ['Number'], 'CUMSUM', context.api);
|
|
10
|
+
const overColumnParameter = expressionFunctionUtils_1.extractParameter('CUMSUM', 'operand', ['OVER'], args);
|
|
11
|
+
// sort over all rowNodes by overColumn
|
|
12
|
+
// cumulate
|
|
13
|
+
//save to map
|
|
14
|
+
},
|
|
15
|
+
description: 'TODO',
|
|
16
|
+
signatures: ['TODO'],
|
|
17
|
+
examples: ['TODO'],
|
|
18
|
+
},
|
|
19
|
+
OVER: {
|
|
20
|
+
handler(args, context) {
|
|
21
|
+
const columnParameter = expressionFunctionUtils_1.extractColumnParameter('OVER', args);
|
|
22
|
+
expressionFunctionUtils_1.validateColumnType(columnParameter.value, ['Number', 'Date'], 'OVER', context.api);
|
|
23
|
+
const result = {
|
|
24
|
+
type: 'operand',
|
|
25
|
+
name: 'OVER',
|
|
26
|
+
value: columnParameter.value,
|
|
27
|
+
};
|
|
28
|
+
return result;
|
|
29
|
+
},
|
|
30
|
+
description: 'TODO',
|
|
31
|
+
signatures: ['TODO'],
|
|
32
|
+
examples: ['TODO'],
|
|
33
|
+
},
|
|
34
|
+
COL: {
|
|
35
|
+
handler(args, context) {
|
|
36
|
+
return expressionFunctionUtils_1.handleColumnFunction(args, context);
|
|
37
|
+
},
|
|
38
|
+
description: 'Returns the value of a column',
|
|
39
|
+
signatures: ['[colName]', 'COL(name: string)'],
|
|
40
|
+
examples: ['[col1]', 'COL("col1")'],
|
|
41
|
+
},
|
|
42
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const normalizeDateParams: (args: [string | number | Date, string | number | Date]) => [number | Date, number | Date];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.normalizeDateParams = void 0;
|
|
4
|
+
exports.normalizeDateParams = (args) => {
|
|
5
|
+
let [first, second] = args;
|
|
6
|
+
if (typeof first === 'string') {
|
|
7
|
+
first = new Date(first);
|
|
8
|
+
}
|
|
9
|
+
if (typeof second === 'string') {
|
|
10
|
+
second = new Date(second);
|
|
11
|
+
}
|
|
12
|
+
return [first, second];
|
|
13
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
declare type VoidFn = () => void;
|
|
2
|
+
declare type Pair<KeyType, ValueType> = {
|
|
3
|
+
value?: ValueType;
|
|
4
|
+
map?: Map<KeyType, Pair<KeyType, ValueType>>;
|
|
5
|
+
revision?: number;
|
|
6
|
+
};
|
|
7
|
+
export declare type DeepMapVisitFn<KeyType, ValueType> = (pair: Pair<KeyType, ValueType>, keys: KeyType[], next: VoidFn) => void;
|
|
8
|
+
export declare class DeepMap<KeyType, ValueType> {
|
|
9
|
+
private map;
|
|
10
|
+
private length;
|
|
11
|
+
private revision;
|
|
12
|
+
static clone<KeyType, ValueType>(map: DeepMap<KeyType, ValueType>): DeepMap<KeyType, ValueType>;
|
|
13
|
+
constructor(initial?: [KeyType[], ValueType][]);
|
|
14
|
+
set(keys: KeyType[] & {
|
|
15
|
+
length: Omit<number, 0>;
|
|
16
|
+
}, value: ValueType): this;
|
|
17
|
+
get(keys: KeyType[]): ValueType | undefined;
|
|
18
|
+
get size(): number;
|
|
19
|
+
clear(): void;
|
|
20
|
+
delete(keys: KeyType[]): boolean;
|
|
21
|
+
has(keys: KeyType[]): boolean;
|
|
22
|
+
private visitKey;
|
|
23
|
+
visit: (fn: DeepMapVisitFn<KeyType, ValueType>) => void;
|
|
24
|
+
visitDepthFirst: (fn: (value: ValueType, keys: KeyType[], indexInGroup: number, next?: VoidFn) => void) => void;
|
|
25
|
+
private visitWithNext;
|
|
26
|
+
private getArray;
|
|
27
|
+
values(): Generator<ValueType, void, unknown>;
|
|
28
|
+
keys(): Generator<KeyType[], void, unknown>;
|
|
29
|
+
entries(): Generator<[KeyType[], ValueType], void, unknown>;
|
|
30
|
+
topDownEntries(): [KeyType[], ValueType][];
|
|
31
|
+
topDownKeys(): KeyType[][];
|
|
32
|
+
topDownValues(): ValueType[];
|
|
33
|
+
private sortedIterator;
|
|
34
|
+
}
|
|
35
|
+
export {};
|