@adaptabletools/adaptable 11.1.3 → 11.1.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/bundle.cjs.js +139 -139
- package/package.json +3 -3
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -1
- package/src/AdaptableOptions/AdaptableOptions.d.ts +49 -49
- package/src/AdaptableOptions/DashboardOptions.d.ts +1 -1
- package/src/AdaptableOptions/EditOptions.d.ts +4 -0
- package/src/AdaptableOptions/FinancePluginOptions.d.ts +139 -9
- package/src/AdaptableOptions/OpenFinPluginOptions.d.ts +3 -3
- package/src/AdaptableOptions/SmartEdit.d.ts +34 -0
- package/src/AdaptableOptions/SmartEdit.js +2 -0
- package/src/Api/AdaptableApi.d.ts +4 -1
- package/src/Api/EventApi.d.ts +1 -1
- package/src/Api/Implementation/ColumnApiImpl.js +5 -2
- package/src/Api/Implementation/FilterApiImpl.js +8 -2
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/FormatColumnApiImpl.js +11 -7
- package/src/Api/Implementation/GridApiImpl.d.ts +3 -3
- package/src/Api/Implementation/GridApiImpl.js +6 -8
- package/src/Api/Implementation/InternalApiImpl.d.ts +4 -0
- package/src/Api/Implementation/InternalApiImpl.js +9 -0
- package/src/Api/Implementation/ScopeApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ScopeApiImpl.js +12 -0
- package/src/Api/Implementation/SmartEditApiImpl.d.ts +3 -2
- package/src/Api/Implementation/ThemeApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ThemeApiImpl.js +3 -0
- package/src/Api/InternalApi.d.ts +4 -0
- package/src/Api/ScopeApi.d.ts +10 -0
- package/src/Api/SmartEditApi.d.ts +3 -2
- package/src/Api/ThemeApi.d.ts +4 -0
- package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +8 -0
- package/src/PredefinedConfig/Common/FDC3Context.d.ts +144 -3
- package/src/PredefinedConfig/Common/Menu.d.ts +4 -0
- package/src/PredefinedConfig/ExportState.d.ts +0 -5
- package/src/PredefinedConfig/PopupState.d.ts +2 -1
- package/src/PredefinedConfig/SystemState.d.ts +2 -5
- package/src/Redux/ActionsReducers/PopupRedux.d.ts +22 -3
- package/src/Redux/ActionsReducers/PopupRedux.js +42 -8
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +5 -23
- package/src/Redux/ActionsReducers/SystemRedux.js +3 -32
- package/src/Redux/Store/AdaptableStore.js +11 -1
- package/src/Strategy/AlertModule.js +5 -4
- package/src/Strategy/CalculatedColumnModule.js +1 -1
- package/src/Strategy/ExportModule.js +14 -4
- package/src/Strategy/SmartEditModule.d.ts +2 -2
- package/src/Strategy/SmartEditModule.js +24 -13
- package/src/Strategy/Utilities/getExportColumnsViewItems.js +1 -1
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +1 -1
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +4 -2
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +1 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +0 -3
- package/src/Utilities/Helpers/FormatHelper.js +6 -0
- package/src/Utilities/Interface/MessagePopups.d.ts +12 -0
- package/src/Utilities/Services/AlertService.d.ts +3 -3
- package/src/Utilities/Services/AlertService.js +6 -6
- package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +3 -3
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +20 -20
- package/src/Utilities/Services/EntitlementService.d.ts +3 -3
- package/src/Utilities/Services/EntitlementService.js +12 -8
- package/src/Utilities/Services/Interface/IReportService.d.ts +1 -1
- package/src/Utilities/Services/MetamodelService.d.ts +3 -3
- package/src/Utilities/Services/MetamodelService.js +4 -4
- package/src/Utilities/Services/ModuleService.d.ts +3 -3
- package/src/Utilities/Services/ModuleService.js +12 -12
- package/src/Utilities/Services/QueryLanguageService.d.ts +3 -3
- package/src/Utilities/Services/QueryLanguageService.js +20 -19
- package/src/Utilities/Services/ReportService.d.ts +4 -4
- package/src/Utilities/Services/ReportService.js +50 -44
- package/src/Utilities/Services/TeamSharingService.d.ts +3 -3
- package/src/Utilities/Services/TeamSharingService.js +19 -16
- package/src/Utilities/Services/ValidationService.d.ts +3 -3
- package/src/Utilities/Services/ValidationService.js +19 -17
- package/src/View/AdaptableView.js +2 -2
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +46 -9
- package/src/View/Alert/Wizard/AlertWizard.js +22 -24
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +5 -5
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +3 -3
- package/src/View/Components/Popups/FormPopups/FormPopups.d.ts +10 -0
- package/src/View/Components/Popups/FormPopups/FormPopups.js +37 -0
- package/src/View/Components/Popups/WindowPopups/WindowPopups.js +1 -1
- package/src/View/Components/Selectors/ColumnSelector.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +1 -3
- package/src/View/DataSource/DataSourceViewPanel.d.ts +3 -3
- package/src/View/DataSource/DataSourceViewPanel.js +15 -13
- package/src/View/Export/ExportViewPanel.d.ts +1 -3
- package/src/View/Export/ExportViewPanel.js +1 -17
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +5 -1
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +15 -2
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +2 -1
- package/src/View/GridInfo/AdaptableObjectsSummary.js +1 -1
- package/src/View/SmartEdit/SmartEditPopup.d.ts +3 -3
- package/src/View/SmartEdit/SmartEditPopup.js +15 -3
- package/src/View/SmartEdit/SmartEditViewPanel.d.ts +3 -4
- package/src/View/SmartEdit/SmartEditViewPanel.js +15 -6
- package/src/View/Wizard/OnePageAdaptableWizard.js +1 -1
- package/src/agGrid/Adaptable.d.ts +4 -4
- package/src/agGrid/Adaptable.js +37 -27
- package/src/agGrid/agGridMenuHelper.js +1 -0
- package/src/components/StylePreview.js +2 -2
- package/src/components/icons/analysis.d.ts +3 -0
- package/src/components/icons/analysis.js +8 -0
- package/src/components/icons/call.d.ts +3 -0
- package/src/components/icons/call.js +7 -0
- package/src/components/icons/chat.d.ts +3 -0
- package/src/components/icons/chat.js +8 -0
- package/src/components/icons/index.js +14 -0
- package/src/components/icons/instrument.d.ts +3 -0
- package/src/components/icons/instrument.js +8 -0
- package/src/components/icons/news.d.ts +3 -0
- package/src/components/icons/news.js +8 -0
- package/src/components/icons/person.d.ts +3 -0
- package/src/components/icons/person.js +7 -0
- package/src/components/icons/quote.d.ts +3 -0
- package/src/components/icons/quote.js +7 -0
- package/src/metamodel/adaptable.metamodel.d.ts +112 -5
- package/src/metamodel/adaptable.metamodel.js +219 -22
- package/src/types.d.ts +2 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/View/Export/ExportCustomDestinationDialog.d.ts +0 -11
- package/src/View/Export/ExportCustomDestinationDialog.js +0 -47
- package/src/View/Export/ExportCustomDestinationFormPopups.d.ts +0 -5
- package/src/View/Export/ExportCustomDestinationFormPopups.js +0 -15
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { GridInfoOptions, IMetamodelService } from './Interface/IMetamodelService';
|
|
2
|
-
import {
|
|
2
|
+
import { AdaptableApi } from '../../../types';
|
|
3
3
|
export declare class MetamodelService implements IMetamodelService {
|
|
4
|
-
private
|
|
4
|
+
private adaptableApi;
|
|
5
5
|
private gridInfoOptions;
|
|
6
|
-
constructor(
|
|
6
|
+
constructor(adaptableApi: AdaptableApi);
|
|
7
7
|
getGridInfoOptions(): GridInfoOptions;
|
|
8
8
|
private buildGridInfoOptions;
|
|
9
9
|
private mapGridInfoContainerItems;
|
|
@@ -4,10 +4,10 @@ exports.MetamodelService = void 0;
|
|
|
4
4
|
const adaptable_metamodel_1 = require("../../metamodel/adaptable.metamodel");
|
|
5
5
|
const DefaultAdaptableOptions_1 = require("../Defaults/DefaultAdaptableOptions");
|
|
6
6
|
class MetamodelService {
|
|
7
|
-
constructor(
|
|
8
|
-
this.
|
|
7
|
+
constructor(adaptableApi) {
|
|
8
|
+
this.adaptableApi = adaptableApi;
|
|
9
9
|
this.gridInfoOptions = new Map();
|
|
10
|
-
this.
|
|
10
|
+
this.adaptableApi = adaptableApi;
|
|
11
11
|
this.gridInfoOptions = this.buildGridInfoOptions();
|
|
12
12
|
}
|
|
13
13
|
getGridInfoOptions() {
|
|
@@ -17,7 +17,7 @@ class MetamodelService {
|
|
|
17
17
|
const gridInfoOptions = new Map();
|
|
18
18
|
const adaptableMetamodel = adaptable_metamodel_1.ADAPTABLE_METAMODEL;
|
|
19
19
|
const adaptableOptionsMetamodel = adaptableMetamodel['AdaptableOptions'];
|
|
20
|
-
const adaptableOptionsValues = this.
|
|
20
|
+
const adaptableOptionsValues = this.adaptableApi.internalApi.getAdaptableOptions();
|
|
21
21
|
const adaptableOptionsDefaultValues = DefaultAdaptableOptions_1.DefaultAdaptableOptions;
|
|
22
22
|
if (!adaptableOptionsMetamodel) {
|
|
23
23
|
// should never happen
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
2
1
|
import { AdaptableModule } from '../../types';
|
|
3
2
|
import { IModule, ModuleInfo, IModuleCollection } from '../../Strategy/Interface/IModule';
|
|
4
3
|
import { TeamSharingImportInfo } from '../../PredefinedConfig/TeamSharingState';
|
|
5
4
|
import { AdaptableObject } from '../../PredefinedConfig/Common/AdaptableObject';
|
|
6
5
|
import { IModuleService } from './Interface/IModuleService';
|
|
6
|
+
import { AdaptableApi } from '../../../types';
|
|
7
7
|
export declare class ModuleService implements IModuleService {
|
|
8
|
-
private
|
|
9
|
-
constructor(
|
|
8
|
+
private adaptableApi;
|
|
9
|
+
constructor(adaptableApi: AdaptableApi);
|
|
10
10
|
createModuleMenus(): void;
|
|
11
11
|
isModuleAvailable(adaptableModule: AdaptableModule): boolean;
|
|
12
12
|
isModuleEditable(adaptableModule: AdaptableModule): boolean;
|
|
@@ -5,14 +5,14 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const Helper_1 = tslib_1.__importDefault(require("../Helpers/Helper"));
|
|
6
6
|
const DocumentationLinkConstants_1 = require("../Constants/DocumentationLinkConstants");
|
|
7
7
|
class ModuleService {
|
|
8
|
-
constructor(
|
|
9
|
-
this.
|
|
10
|
-
this.
|
|
8
|
+
constructor(adaptableApi) {
|
|
9
|
+
this.adaptableApi = adaptableApi;
|
|
10
|
+
this.adaptableApi = adaptableApi;
|
|
11
11
|
}
|
|
12
12
|
createModuleMenus() {
|
|
13
13
|
const dropdownMenuItems = [];
|
|
14
14
|
const buttonMenuItems = [];
|
|
15
|
-
this.
|
|
15
|
+
this.getModuleCollection().forEach((module) => {
|
|
16
16
|
const dropdownMenuItem = module.addModuleMenuItem('ModuleMenu');
|
|
17
17
|
if (Helper_1.default.objectExists(dropdownMenuItem)) {
|
|
18
18
|
if (dropdownMenuItems.findIndex((m) => m.module == dropdownMenuItem.module) == -1) {
|
|
@@ -27,39 +27,39 @@ class ModuleService {
|
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
29
|
// store the main menu as we will re-use (and it never changes)
|
|
30
|
-
this.
|
|
31
|
-
this.
|
|
30
|
+
this.adaptableApi.internalApi.setModuleDropdownMenuItems(dropdownMenuItems);
|
|
31
|
+
this.adaptableApi.internalApi.setModuleButtonMenuItems(buttonMenuItems);
|
|
32
32
|
}
|
|
33
33
|
isModuleAvailable(adaptableModule) {
|
|
34
|
-
let module = this.
|
|
34
|
+
let module = this.getModuleCollection().get(adaptableModule);
|
|
35
35
|
if (!module) {
|
|
36
36
|
return false;
|
|
37
37
|
}
|
|
38
38
|
return module.isModuleAvailable();
|
|
39
39
|
}
|
|
40
40
|
isModuleEditable(adaptableModule) {
|
|
41
|
-
let module = this.
|
|
41
|
+
let module = this.getModuleCollection().get(adaptableModule);
|
|
42
42
|
if (!module) {
|
|
43
43
|
return false;
|
|
44
44
|
}
|
|
45
45
|
return module.isModuleEditable();
|
|
46
46
|
}
|
|
47
47
|
getTeamSharingAction(adaptableModule) {
|
|
48
|
-
let module = this.
|
|
48
|
+
let module = this.getModuleCollection().get(adaptableModule);
|
|
49
49
|
if (!module) {
|
|
50
50
|
return undefined;
|
|
51
51
|
}
|
|
52
52
|
return module.getTeamSharingAction();
|
|
53
53
|
}
|
|
54
54
|
getModuleById(adaptableModule) {
|
|
55
|
-
return this.
|
|
55
|
+
return this.getModuleCollection().get(adaptableModule);
|
|
56
56
|
}
|
|
57
57
|
getModuleInfoByModule(adaptableModule) {
|
|
58
58
|
const module = this.getModuleById(adaptableModule);
|
|
59
59
|
return module ? module.moduleInfo : undefined;
|
|
60
60
|
}
|
|
61
61
|
getModuleInfoByFriendlyName(friendlyName) {
|
|
62
|
-
for (let module of this.
|
|
62
|
+
for (let module of this.getModuleCollection().values()) {
|
|
63
63
|
let moduleInfo = module.moduleInfo;
|
|
64
64
|
if (moduleInfo && moduleInfo.FriendlyName == friendlyName) {
|
|
65
65
|
return moduleInfo;
|
|
@@ -72,7 +72,7 @@ class ModuleService {
|
|
|
72
72
|
return (_a = this.getModuleById(adaptableModule)) === null || _a === void 0 ? void 0 : _a.getPopupMaxWidth();
|
|
73
73
|
}
|
|
74
74
|
getModuleCollection() {
|
|
75
|
-
return this.
|
|
75
|
+
return this.adaptableApi.internalApi.getModules();
|
|
76
76
|
}
|
|
77
77
|
getModuleDocumentationPageByModule(adaptableModule) {
|
|
78
78
|
let url = `${DocumentationLinkConstants_1.HOST_URL_DOCS}/`;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { IQueryLanguageService } from './Interface/IQueryLanguageService';
|
|
2
|
-
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
3
2
|
import { Observable } from 'rxjs';
|
|
4
3
|
import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
|
|
5
4
|
import { RowNode } from '@ag-grid-community/all-modules';
|
|
6
5
|
import { AdaptableModule } from '../../PredefinedConfig/Common/Types';
|
|
7
6
|
import { ModuleExpressionFunctions } from '../../AdaptableOptions/AdaptableQLOptions';
|
|
8
7
|
import { AggregationParameter } from '../ExpressionFunctions/aggregatedScalarExpressionFunctions';
|
|
8
|
+
import { AdaptableApi } from '../../../types';
|
|
9
9
|
export declare class QueryLanguageService implements IQueryLanguageService {
|
|
10
|
-
private
|
|
10
|
+
private adaptableApi;
|
|
11
11
|
private cacheBooleanValidation;
|
|
12
12
|
private cacheObservableValidation;
|
|
13
13
|
private cacheAggregatedBooleanValidation;
|
|
14
14
|
private cacheAggregatedScalarValidation;
|
|
15
15
|
private cacheModuleSpecificExpressionFunctions;
|
|
16
|
-
constructor(
|
|
16
|
+
constructor(adaptableApi: AdaptableApi);
|
|
17
17
|
evaluateBooleanExpression(expression: string, module: AdaptableModule, rowNode: any): any;
|
|
18
18
|
evaluateScalarExpression(expression: string, module: AdaptableModule, rowNode: RowNode): any;
|
|
19
19
|
evaluateAggregatedScalarExpression(expression: string, module: AdaptableModule): AggregationParameter;
|
|
@@ -6,8 +6,8 @@ const parser = tslib_1.__importStar(require("../../parser/src"));
|
|
|
6
6
|
const rxjs_1 = require("rxjs");
|
|
7
7
|
const LoggingHelper_1 = require("../Helpers/LoggingHelper");
|
|
8
8
|
class QueryLanguageService {
|
|
9
|
-
constructor(
|
|
10
|
-
this.
|
|
9
|
+
constructor(adaptableApi) {
|
|
10
|
+
this.adaptableApi = adaptableApi;
|
|
11
11
|
this.cacheBooleanValidation = new Map();
|
|
12
12
|
this.cacheObservableValidation = new Map();
|
|
13
13
|
this.cacheAggregatedBooleanValidation = new Map();
|
|
@@ -19,7 +19,7 @@ class QueryLanguageService {
|
|
|
19
19
|
const booleanAndScalarFunctions = this.getBooleanAndScalarFunctions(moduleExpressionFunctions);
|
|
20
20
|
return parser.evaluate(expression, {
|
|
21
21
|
node: rowNode,
|
|
22
|
-
api: this.
|
|
22
|
+
api: this.adaptableApi,
|
|
23
23
|
functions: booleanAndScalarFunctions,
|
|
24
24
|
});
|
|
25
25
|
}
|
|
@@ -31,7 +31,7 @@ class QueryLanguageService {
|
|
|
31
31
|
const aggregatedScalarFunctions = this.getModuleExpressionFunctions(module).aggregatedScalarFunctions;
|
|
32
32
|
return parser.evaluate(expression, {
|
|
33
33
|
node: null,
|
|
34
|
-
api: this.
|
|
34
|
+
api: this.adaptableApi,
|
|
35
35
|
functions: aggregatedScalarFunctions,
|
|
36
36
|
});
|
|
37
37
|
}
|
|
@@ -40,7 +40,7 @@ class QueryLanguageService {
|
|
|
40
40
|
const booleanAndScalarFunctions = this.getBooleanAndScalarFunctions(moduleExpressionFunctions);
|
|
41
41
|
const reactiveExpression$ = parser.evaluate(reactiveExpression, {
|
|
42
42
|
node: reactiveExpression,
|
|
43
|
-
api: this.
|
|
43
|
+
api: this.adaptableApi,
|
|
44
44
|
functions: moduleExpressionFunctions.observableFunctions,
|
|
45
45
|
whereClauseFunctions: booleanAndScalarFunctions,
|
|
46
46
|
});
|
|
@@ -51,7 +51,7 @@ class QueryLanguageService {
|
|
|
51
51
|
const booleanAndScalarFunctions = this.getBooleanAndScalarFunctions(moduleExpressionFunctions);
|
|
52
52
|
const aggregationExpression$ = parser.evaluate(aggregationExpression, {
|
|
53
53
|
node: aggregationExpression,
|
|
54
|
-
api: this.
|
|
54
|
+
api: this.adaptableApi,
|
|
55
55
|
functions: moduleExpressionFunctions.aggregatedBooleanFunctions,
|
|
56
56
|
whereClauseFunctions: booleanAndScalarFunctions,
|
|
57
57
|
});
|
|
@@ -75,7 +75,7 @@ class QueryLanguageService {
|
|
|
75
75
|
}
|
|
76
76
|
const force = (_a = config === null || config === void 0 ? void 0 : config.force) !== null && _a !== void 0 ? _a : false;
|
|
77
77
|
// get searchOptions to see if validation should be performed
|
|
78
|
-
if (!this.
|
|
78
|
+
if (!this.adaptableApi.internalApi.getAdaptableOptions().adaptableQLOptions.expressionOptions
|
|
79
79
|
.performExpressionValidation &&
|
|
80
80
|
!force) {
|
|
81
81
|
const result = { isValid: true, errorMessage: '' };
|
|
@@ -103,7 +103,7 @@ class QueryLanguageService {
|
|
|
103
103
|
return result;
|
|
104
104
|
}
|
|
105
105
|
// evaluating the expression is the only way to catch circular named query references
|
|
106
|
-
let firstRowNode = this.
|
|
106
|
+
let firstRowNode = this.adaptableApi.gridApi.getFirstRowNode();
|
|
107
107
|
this.evaluateBooleanExpression(expression, module, firstRowNode);
|
|
108
108
|
const result = {
|
|
109
109
|
isValid: true,
|
|
@@ -243,15 +243,15 @@ class QueryLanguageService {
|
|
|
243
243
|
if (!module) {
|
|
244
244
|
LoggingHelper_1.LogAdaptableInfo(`QueryLanguageService.getModuleExpressionFunctions() was called with an undefined 'module' param, this should never happen`);
|
|
245
245
|
return {
|
|
246
|
-
booleanFunctions: this.
|
|
246
|
+
booleanFunctions: this.adaptableApi.internalApi.getAdaptableOptions().adaptableQLOptions.expressionOptions
|
|
247
247
|
.defaultBooleanFunctions,
|
|
248
|
-
scalarFunctions: this.
|
|
248
|
+
scalarFunctions: this.adaptableApi.internalApi.getAdaptableOptions().adaptableQLOptions.expressionOptions
|
|
249
249
|
.defaultScalarFunctions,
|
|
250
|
-
observableFunctions: this.
|
|
250
|
+
observableFunctions: this.adaptableApi.internalApi.getAdaptableOptions().adaptableQLOptions.expressionOptions
|
|
251
251
|
.defaultObservableFunctions,
|
|
252
|
-
aggregatedBooleanFunctions: this.
|
|
252
|
+
aggregatedBooleanFunctions: this.adaptableApi.internalApi.getAdaptableOptions().adaptableQLOptions.expressionOptions
|
|
253
253
|
.defaultAggregatedBooleanFunctions,
|
|
254
|
-
aggregatedScalarFunctions: this.
|
|
254
|
+
aggregatedScalarFunctions: this.adaptableApi.internalApi.getAdaptableOptions().adaptableQLOptions.expressionOptions
|
|
255
255
|
.defaultAggregatedScalarFunctions,
|
|
256
256
|
};
|
|
257
257
|
}
|
|
@@ -259,17 +259,18 @@ class QueryLanguageService {
|
|
|
259
259
|
if (cachedResult) {
|
|
260
260
|
return cachedResult;
|
|
261
261
|
}
|
|
262
|
-
const moduleSpecificOptions = (_b = (_a = this.
|
|
262
|
+
const moduleSpecificOptions = (_b = (_a = this.adaptableApi.internalApi.getAdaptableOptions().adaptableQLOptions.expressionOptions
|
|
263
263
|
.moduleExpressionFunctions) === null || _a === void 0 ? void 0 : _a[module]) !== null && _b !== void 0 ? _b : {};
|
|
264
264
|
const moduleSpecificFunctions = {
|
|
265
|
-
booleanFunctions: (_c = moduleSpecificOptions.booleanFunctions) !== null && _c !== void 0 ? _c : this.
|
|
265
|
+
booleanFunctions: (_c = moduleSpecificOptions.booleanFunctions) !== null && _c !== void 0 ? _c : this.adaptableApi.internalApi.getAdaptableOptions().adaptableQLOptions.expressionOptions
|
|
266
266
|
.defaultBooleanFunctions,
|
|
267
|
-
scalarFunctions: (_d = moduleSpecificOptions.scalarFunctions) !== null && _d !== void 0 ? _d : this.
|
|
268
|
-
|
|
267
|
+
scalarFunctions: (_d = moduleSpecificOptions.scalarFunctions) !== null && _d !== void 0 ? _d : this.adaptableApi.internalApi.getAdaptableOptions().adaptableQLOptions.expressionOptions
|
|
268
|
+
.defaultScalarFunctions,
|
|
269
|
+
observableFunctions: (_e = moduleSpecificOptions.observableFunctions) !== null && _e !== void 0 ? _e : this.adaptableApi.internalApi.getAdaptableOptions().adaptableQLOptions.expressionOptions
|
|
269
270
|
.defaultObservableFunctions,
|
|
270
|
-
aggregatedBooleanFunctions: (_f = moduleSpecificOptions.aggregatedBooleanFunctions) !== null && _f !== void 0 ? _f : this.
|
|
271
|
+
aggregatedBooleanFunctions: (_f = moduleSpecificOptions.aggregatedBooleanFunctions) !== null && _f !== void 0 ? _f : this.adaptableApi.internalApi.getAdaptableOptions().adaptableQLOptions.expressionOptions
|
|
271
272
|
.defaultAggregatedBooleanFunctions,
|
|
272
|
-
aggregatedScalarFunctions: (_g = moduleSpecificOptions.aggregatedScalarFunctions) !== null && _g !== void 0 ? _g : this.
|
|
273
|
+
aggregatedScalarFunctions: (_g = moduleSpecificOptions.aggregatedScalarFunctions) !== null && _g !== void 0 ? _g : this.adaptableApi.internalApi.getAdaptableOptions().adaptableQLOptions.expressionOptions
|
|
273
274
|
.defaultAggregatedScalarFunctions,
|
|
274
275
|
};
|
|
275
276
|
this.cacheModuleSpecificExpressionFunctions.set(module, moduleSpecificFunctions);
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
2
1
|
import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
|
|
3
2
|
import { Report, ReportData, SystemReportName } from '../../PredefinedConfig/ExportState';
|
|
4
3
|
import { IReportService } from './Interface/IReportService';
|
|
5
4
|
import { RowNode } from '@ag-grid-community/all-modules';
|
|
6
5
|
import { SystemExportDestination } from '../../AdaptableOptions/ExportOptions';
|
|
6
|
+
import { AdaptableApi } from '../../../types';
|
|
7
7
|
export declare class ReportService implements IReportService {
|
|
8
|
-
private
|
|
9
|
-
constructor(
|
|
8
|
+
private adaptableApi;
|
|
9
|
+
constructor(adaptableApi: AdaptableApi);
|
|
10
10
|
CreateSystemReport(systemReportName: SystemReportName): Report;
|
|
11
11
|
IsSystemReport(reportName: string): boolean;
|
|
12
12
|
IsSystemReportActive(reportName: SystemReportName): boolean;
|
|
13
13
|
IsSystemExportDestinationActive(exportDestination: SystemExportDestination): boolean;
|
|
14
|
-
GetReportColumnScopeShortDescription(report: Report): string;
|
|
14
|
+
GetReportColumnScopeShortDescription(report: Report): string[];
|
|
15
15
|
GetReportColumnScopeLongDescription(report: Report): string;
|
|
16
16
|
GetReportExpressionDescription(report: Report, cols: AdaptableColumn[]): string;
|
|
17
17
|
GetReportColumnsForReport(report: Report, includePrimaryKey?: boolean): AdaptableColumn[];
|
|
@@ -11,9 +11,9 @@ const FormatHelper_1 = tslib_1.__importStar(require("../Helpers/FormatHelper"));
|
|
|
11
11
|
const StringExtensions_1 = tslib_1.__importDefault(require("../Extensions/StringExtensions"));
|
|
12
12
|
const ModuleConstants_1 = require("../Constants/ModuleConstants");
|
|
13
13
|
class ReportService {
|
|
14
|
-
constructor(
|
|
15
|
-
this.
|
|
16
|
-
this.
|
|
14
|
+
constructor(adaptableApi) {
|
|
15
|
+
this.adaptableApi = adaptableApi;
|
|
16
|
+
this.adaptableApi = adaptableApi;
|
|
17
17
|
}
|
|
18
18
|
CreateSystemReport(systemReportName) {
|
|
19
19
|
switch (systemReportName) {
|
|
@@ -74,10 +74,10 @@ class ReportService {
|
|
|
74
74
|
}
|
|
75
75
|
IsSystemReportActive(reportName) {
|
|
76
76
|
if (reportName == GeneralConstants_1.SELECTED_CELLS_REPORT || reportName == GeneralConstants_1.SELECTED_ROWS_REPORT) {
|
|
77
|
-
return this.
|
|
77
|
+
return this.adaptableApi.gridApi.isGridSelectable();
|
|
78
78
|
}
|
|
79
79
|
if (reportName === GeneralConstants_1.VISUAL_DATA_REPORT) {
|
|
80
|
-
return this.
|
|
80
|
+
return this.adaptableApi.exportApi
|
|
81
81
|
.getAvailableExportDestinations()
|
|
82
82
|
.includes(Enums_1.ExportDestination.Excel);
|
|
83
83
|
}
|
|
@@ -85,22 +85,26 @@ class ReportService {
|
|
|
85
85
|
}
|
|
86
86
|
IsSystemExportDestinationActive(exportDestination) {
|
|
87
87
|
if (exportDestination === Enums_1.ExportDestination.Excel) {
|
|
88
|
-
return this.
|
|
88
|
+
return this.adaptableApi.exportApi.canExportToExcel();
|
|
89
89
|
}
|
|
90
90
|
return true;
|
|
91
91
|
}
|
|
92
92
|
GetReportColumnScopeShortDescription(report) {
|
|
93
|
+
var _a, _b;
|
|
93
94
|
switch (report.ReportColumnScope) {
|
|
94
95
|
case Enums_1.ReportColumnScope.AllColumns:
|
|
95
|
-
return '[All Columns]';
|
|
96
|
+
return ['[All Columns]'];
|
|
96
97
|
case Enums_1.ReportColumnScope.VisibleColumns:
|
|
97
|
-
return '[Visible Columns]';
|
|
98
|
+
return ['[Visible Columns]'];
|
|
98
99
|
case Enums_1.ReportColumnScope.SelectedColumns:
|
|
99
|
-
return '[Selected Columns]';
|
|
100
|
+
return ['[Selected Columns]'];
|
|
100
101
|
case Enums_1.ReportColumnScope.ScopeColumns:
|
|
101
|
-
|
|
102
|
+
if ('ColumnIds' in (report === null || report === void 0 ? void 0 : report.Scope)) {
|
|
103
|
+
return (_b = (_a = report.Scope.ColumnIds).map) === null || _b === void 0 ? void 0 : _b.call(_a, (columnId) => { var _a; return (_a = this.adaptableApi.columnApi.getFriendlyNameFromColumnId(columnId)) !== null && _a !== void 0 ? _a : columnId; });
|
|
104
|
+
}
|
|
105
|
+
return ['[Bespoke Columns]'];
|
|
102
106
|
case Enums_1.ReportColumnScope.CustomColumns:
|
|
103
|
-
return '[Custom Columns]';
|
|
107
|
+
return ['[Custom Columns]'];
|
|
104
108
|
}
|
|
105
109
|
}
|
|
106
110
|
GetReportColumnScopeLongDescription(report) {
|
|
@@ -112,7 +116,7 @@ class ReportService {
|
|
|
112
116
|
case Enums_1.ReportColumnScope.SelectedColumns:
|
|
113
117
|
return '[Selected Columns]';
|
|
114
118
|
case Enums_1.ReportColumnScope.ScopeColumns:
|
|
115
|
-
return this.
|
|
119
|
+
return this.adaptableApi.scopeApi.getScopeDescription(report.Scope);
|
|
116
120
|
case Enums_1.ReportColumnScope.CustomColumns:
|
|
117
121
|
return '[Custom Columns]';
|
|
118
122
|
}
|
|
@@ -153,7 +157,7 @@ class ReportService {
|
|
|
153
157
|
}
|
|
154
158
|
GetReportColumnsForReport(report, includePrimaryKey = false) {
|
|
155
159
|
let reportColumns = [];
|
|
156
|
-
let gridColumns = this.
|
|
160
|
+
let gridColumns = this.adaptableApi.columnApi.getColumns();
|
|
157
161
|
// first get the cols depending on the Column Scope
|
|
158
162
|
switch (report.ReportColumnScope) {
|
|
159
163
|
case Enums_1.ReportColumnScope.AllColumns:
|
|
@@ -164,17 +168,17 @@ class ReportService {
|
|
|
164
168
|
break;
|
|
165
169
|
case Enums_1.ReportColumnScope.SelectedColumns:
|
|
166
170
|
// we extract the selected columns from the grid columns to preserve the grid column order
|
|
167
|
-
const selectedColumnIds = this.
|
|
171
|
+
const selectedColumnIds = this.adaptableApi.gridApi
|
|
168
172
|
.getSelectedCellInfo()
|
|
169
173
|
.columns.map((column) => column.columnId);
|
|
170
174
|
reportColumns = gridColumns.filter((gridColumn) => selectedColumnIds.includes(gridColumn.columnId));
|
|
171
175
|
break;
|
|
172
176
|
case Enums_1.ReportColumnScope.ScopeColumns:
|
|
173
177
|
if ('ColumnIds' in report.Scope) {
|
|
174
|
-
reportColumns = report.Scope.ColumnIds.map((columnId) => this.
|
|
178
|
+
reportColumns = report.Scope.ColumnIds.map((columnId) => this.adaptableApi.columnApi.getColumnFromId(columnId)).filter((c) => c);
|
|
175
179
|
}
|
|
176
180
|
else {
|
|
177
|
-
reportColumns = this.
|
|
181
|
+
reportColumns = this.adaptableApi.scopeApi.getColumnsForScope(report.Scope);
|
|
178
182
|
}
|
|
179
183
|
break;
|
|
180
184
|
case Enums_1.ReportColumnScope.CustomColumns:
|
|
@@ -182,11 +186,11 @@ class ReportService {
|
|
|
182
186
|
break;
|
|
183
187
|
}
|
|
184
188
|
if (includePrimaryKey) {
|
|
185
|
-
const pkColumn = reportColumns.find((column) => column.columnId === this.
|
|
189
|
+
const pkColumn = reportColumns.find((column) => column.columnId === this.adaptableApi.internalApi.getAdaptableOptions().primaryKey);
|
|
186
190
|
// TODO simplify after we fix the IsPrimaryKey bug
|
|
187
191
|
// const pkColumn = reportColumns.find(column => column.IsPrimaryKey);
|
|
188
|
-
if (!pkColumn && !!this.
|
|
189
|
-
reportColumns.push(this.
|
|
192
|
+
if (!pkColumn && !!this.adaptableApi.columnApi.getPrimaryKeyColumn()) {
|
|
193
|
+
reportColumns.push(this.adaptableApi.columnApi.getPrimaryKeyColumn());
|
|
190
194
|
}
|
|
191
195
|
}
|
|
192
196
|
return reportColumns;
|
|
@@ -206,7 +210,7 @@ class ReportService {
|
|
|
206
210
|
const columnIds = columns.map((column) => column.columnId);
|
|
207
211
|
switch (report.ReportRowScope) {
|
|
208
212
|
case Enums_1.ReportRowScope.AllRows:
|
|
209
|
-
this.
|
|
213
|
+
this.adaptableApi.internalApi.forAllRowNodesDo((rowNode) => {
|
|
210
214
|
// skip row groups
|
|
211
215
|
if (!rowNode.group) {
|
|
212
216
|
data.rows.push(this.getRowObjectForColumnIds(rowNode, columnIds));
|
|
@@ -214,7 +218,7 @@ class ReportService {
|
|
|
214
218
|
});
|
|
215
219
|
break;
|
|
216
220
|
case Enums_1.ReportRowScope.VisibleRows:
|
|
217
|
-
this.
|
|
221
|
+
this.adaptableApi.internalApi.forAllVisibleRowNodesDo((rowNode) => {
|
|
218
222
|
// skip row groups
|
|
219
223
|
if (!rowNode.group) {
|
|
220
224
|
data.rows.push(this.getRowObjectForColumnIds(rowNode, columnIds));
|
|
@@ -222,9 +226,9 @@ class ReportService {
|
|
|
222
226
|
});
|
|
223
227
|
break;
|
|
224
228
|
case Enums_1.ReportRowScope.ExpressionRows:
|
|
225
|
-
this.
|
|
229
|
+
this.adaptableApi.internalApi.forAllRowNodesDo((rowNode) => {
|
|
226
230
|
var _a;
|
|
227
|
-
if (this.
|
|
231
|
+
if (this.adaptableApi.internalApi
|
|
228
232
|
.getQueryLanguageService()
|
|
229
233
|
.evaluateBooleanExpression((_a = report.Query) === null || _a === void 0 ? void 0 : _a.BooleanExpression, ModuleConstants_1.ExportModuleId, rowNode)) {
|
|
230
234
|
data.rows.push(this.getRowObjectForColumnIds(rowNode, columnIds));
|
|
@@ -232,30 +236,31 @@ class ReportService {
|
|
|
232
236
|
});
|
|
233
237
|
break;
|
|
234
238
|
case Enums_1.ReportRowScope.SelectedCellRows:
|
|
235
|
-
const selectedCellInfo = this.
|
|
239
|
+
const selectedCellInfo = this.adaptableApi.gridApi.getSelectedCellInfo();
|
|
236
240
|
const { gridCells: GridCells } = selectedCellInfo;
|
|
237
241
|
let selectedCellsByPrimaryKey = groupBy_1.default(GridCells, 'primaryKeyValue');
|
|
238
242
|
// we iterate over all visibleRowNodes to preserve the current order
|
|
239
|
-
this.
|
|
240
|
-
const rowPrimaryKeyValue = this.
|
|
243
|
+
this.adaptableApi.internalApi.forAllVisibleRowNodesDo((rowNode) => {
|
|
244
|
+
const rowPrimaryKeyValue = this.adaptableApi.gridApi.getPrimaryKeyValueForRowNode(rowNode);
|
|
241
245
|
const selectedRowCells = selectedCellsByPrimaryKey[rowPrimaryKeyValue];
|
|
242
246
|
if (selectedRowCells) {
|
|
243
247
|
const selectedRowColumnIds = selectedRowCells.map((rowCell) => rowCell.column.columnId);
|
|
244
248
|
const selectedColumnIds = columnIds.filter((columnId) => selectedRowColumnIds.includes(columnId));
|
|
245
249
|
const row = this.getRowObjectForColumnIds(rowNode, selectedColumnIds);
|
|
246
250
|
if (includePrimaryKey) {
|
|
247
|
-
row[this.
|
|
251
|
+
row[this.adaptableApi.internalApi.getAdaptableOptions().primaryKey] =
|
|
252
|
+
rowPrimaryKeyValue;
|
|
248
253
|
}
|
|
249
254
|
data.rows.push(row);
|
|
250
255
|
}
|
|
251
256
|
});
|
|
252
257
|
break;
|
|
253
258
|
case Enums_1.ReportRowScope.SelectedRows:
|
|
254
|
-
const selectedRowInfo = this.
|
|
259
|
+
const selectedRowInfo = this.adaptableApi.gridApi.getSelectedRowInfo();
|
|
255
260
|
const selectedGridRowPrimaryKeys = (_b = (_a = selectedRowInfo === null || selectedRowInfo === void 0 ? void 0 : selectedRowInfo.gridRows) === null || _a === void 0 ? void 0 : _a.filter((gr) => gr.rowInfo.isGroup == false).map((gridRow) => gridRow.primaryKeyValue)) !== null && _b !== void 0 ? _b : [];
|
|
256
261
|
if (selectedGridRowPrimaryKeys.length) {
|
|
257
|
-
this.
|
|
258
|
-
const rowPrimaryKeyValue = this.
|
|
262
|
+
this.adaptableApi.internalApi.forAllRowNodesDo((rowNode) => {
|
|
263
|
+
const rowPrimaryKeyValue = this.adaptableApi.gridApi.getPrimaryKeyValueForRowNode(rowNode);
|
|
259
264
|
if (selectedGridRowPrimaryKeys.includes(rowPrimaryKeyValue)) {
|
|
260
265
|
data.rows.push(this.getRowObjectForColumnIds(rowNode, columnIds));
|
|
261
266
|
}
|
|
@@ -263,7 +268,7 @@ class ReportService {
|
|
|
263
268
|
}
|
|
264
269
|
break;
|
|
265
270
|
case Enums_1.ReportRowScope.CustomRows:
|
|
266
|
-
const reportData = this.
|
|
271
|
+
const reportData = this.adaptableApi.exportApi.runCustomReport(report.Name);
|
|
267
272
|
return reportData;
|
|
268
273
|
// break;
|
|
269
274
|
}
|
|
@@ -287,21 +292,21 @@ class ReportService {
|
|
|
287
292
|
}
|
|
288
293
|
PublishLiveLiveDataChangedEvent(reportDestination, liveDataTrigger, liveReport) {
|
|
289
294
|
const liveDataChangedInfo = {
|
|
290
|
-
adaptableApi: this.
|
|
295
|
+
adaptableApi: this.adaptableApi,
|
|
291
296
|
reportDestination: reportDestination,
|
|
292
297
|
liveDataTrigger: liveDataTrigger,
|
|
293
298
|
liveReport: liveReport,
|
|
294
299
|
};
|
|
295
|
-
this.
|
|
300
|
+
this.adaptableApi.eventApi.emit('LiveDataChanged', liveDataChangedInfo);
|
|
296
301
|
}
|
|
297
302
|
getCellExportValueFromRowNode(rowNode, columnId) {
|
|
298
|
-
return this.getCellExportValueFromRawValue(this.
|
|
303
|
+
return this.getCellExportValueFromRawValue(this.adaptableApi.gridApi.getRawValueFromRowNode(rowNode, columnId), columnId);
|
|
299
304
|
}
|
|
300
305
|
getCellExportValueFromRawValue(cellRawValue, columnId) {
|
|
301
306
|
if (StringExtensions_1.default.IsNullOrEmpty(cellRawValue)) {
|
|
302
307
|
return cellRawValue;
|
|
303
308
|
}
|
|
304
|
-
const columnType = this.
|
|
309
|
+
const columnType = this.adaptableApi.columnApi.getColumnDataTypeFromColumnId(columnId);
|
|
305
310
|
// if this is a date column and there is a custom export date format provided, that will take precedence
|
|
306
311
|
if (columnType === 'Date' && !!this.getCustomExportDateFormat()) {
|
|
307
312
|
const exportDateFormat = this.getCustomExportDateFormat();
|
|
@@ -315,7 +320,7 @@ class ReportService {
|
|
|
315
320
|
}
|
|
316
321
|
getReportFileName(reportName) {
|
|
317
322
|
let fileName = StringExtensions_1.default.ReplaceEmptySpacesWithUnderscore(reportName);
|
|
318
|
-
if (this.
|
|
323
|
+
if (this.adaptableApi.internalApi.getAdaptableOptions().exportOptions.appendFileTimestamp) {
|
|
319
324
|
fileName = `${fileName}_${FormatHelper_1.DateFormatter(new Date(), {
|
|
320
325
|
Pattern: 'yyyyMMdd_HHmmss',
|
|
321
326
|
})}`;
|
|
@@ -326,7 +331,7 @@ class ReportService {
|
|
|
326
331
|
// TO DO
|
|
327
332
|
}
|
|
328
333
|
getCustomExportDateFormat() {
|
|
329
|
-
return this.
|
|
334
|
+
return this.adaptableApi.internalApi.getAdaptableOptions().exportOptions.exportDateFormat;
|
|
330
335
|
}
|
|
331
336
|
getCellExportValueFromRawValueByType(cellRawValue, columnId,
|
|
332
337
|
// default to rawValue if, for some reason, the configs provide invalid values
|
|
@@ -334,22 +339,23 @@ class ReportService {
|
|
|
334
339
|
return type === 'rawValue'
|
|
335
340
|
? cellRawValue
|
|
336
341
|
: // type === formattedValue
|
|
337
|
-
this.
|
|
342
|
+
this.adaptableApi.gridApi.getFormattedValueFromRawValue(columnId, cellRawValue);
|
|
338
343
|
}
|
|
339
344
|
computeCellExportValueFormat(columnType) {
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
345
|
+
const exportOptions = this.adaptableApi.internalApi.getAdaptableOptions().exportOptions;
|
|
346
|
+
if (exportOptions.exportFormatType === 'rawValue' ||
|
|
347
|
+
exportOptions.exportFormatType === 'formattedValue') {
|
|
348
|
+
return exportOptions.exportFormatType;
|
|
343
349
|
}
|
|
344
350
|
// format is customized based on column data type
|
|
345
351
|
switch (columnType) {
|
|
346
352
|
case 'String':
|
|
347
|
-
return
|
|
353
|
+
return exportOptions.exportFormatType.string;
|
|
348
354
|
case 'Number':
|
|
349
355
|
case 'NumberArray':
|
|
350
|
-
return
|
|
356
|
+
return exportOptions.exportFormatType.number;
|
|
351
357
|
case 'Date':
|
|
352
|
-
return
|
|
358
|
+
return exportOptions.exportFormatType.date;
|
|
353
359
|
default:
|
|
354
360
|
// default to rawValue for all other column types
|
|
355
361
|
return 'rawValue';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ITeamSharingService } from './Interface/ITeamSharingService';
|
|
2
|
-
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
3
2
|
import { AdaptableModule } from '../../PredefinedConfig/Common/Types';
|
|
4
3
|
import { AdaptableObject } from '../../PredefinedConfig/Common/AdaptableObject';
|
|
5
4
|
import { SharedEntity, SharedEntityConfig, SharedEntityActiveStatus, TeamSharingImportStep } from '../../PredefinedConfig/TeamSharingState';
|
|
6
5
|
import { TypeUuid } from '../../PredefinedConfig/Uuid';
|
|
6
|
+
import { AdaptableApi } from '../../../types';
|
|
7
7
|
export declare class TeamSharingService implements ITeamSharingService {
|
|
8
|
-
private
|
|
8
|
+
private adaptableApi;
|
|
9
9
|
private updateCheckTimerId;
|
|
10
|
-
constructor(
|
|
10
|
+
constructor(adaptableApi: AdaptableApi);
|
|
11
11
|
buildSharedEntityWithDependencies(adaptableObject: AdaptableObject, module: AdaptableModule, configuration: SharedEntityConfig): SharedEntity[];
|
|
12
12
|
getSharedEntityDependants(sharedEntityId: TypeUuid, sharedEntities: SharedEntity[]): SharedEntity[];
|
|
13
13
|
updateActiveSharedEntity(changedAdaptableObject: AdaptableObject, userName: string, sharedEntities: SharedEntity[]): [SharedEntity[], SharedEntity[]];
|