@sap-ux/fiori-mcp-server 0.0.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/LICENSE +201 -0
- package/README.md +99 -0
- package/dist/constant.d.ts +5 -0
- package/dist/constant.js +8 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +7 -0
- package/dist/page-editor-api/api.d.ts +48 -0
- package/dist/page-editor-api/api.js +93 -0
- package/dist/page-editor-api/index.d.ts +5 -0
- package/dist/page-editor-api/index.js +24 -0
- package/dist/page-editor-api/json-helper.d.ts +11 -0
- package/dist/page-editor-api/json-helper.js +64 -0
- package/dist/page-editor-api/parser/annotations.d.ts +9 -0
- package/dist/page-editor-api/parser/annotations.js +13 -0
- package/dist/page-editor-api/parser/index.d.ts +3 -0
- package/dist/page-editor-api/parser/index.js +19 -0
- package/dist/page-editor-api/parser/model/AggregationValidator.d.ts +64 -0
- package/dist/page-editor-api/parser/model/AggregationValidator.js +209 -0
- package/dist/page-editor-api/parser/model/ArrayAggregation.d.ts +49 -0
- package/dist/page-editor-api/parser/model/ArrayAggregation.js +122 -0
- package/dist/page-editor-api/parser/model/ObjectAggregation.d.ts +374 -0
- package/dist/page-editor-api/parser/model/ObjectAggregation.js +802 -0
- package/dist/page-editor-api/parser/model/PageEditModel.d.ts +223 -0
- package/dist/page-editor-api/parser/model/PageEditModel.js +954 -0
- package/dist/page-editor-api/parser/model/PageEditProperty.d.ts +38 -0
- package/dist/page-editor-api/parser/model/PageEditProperty.js +49 -0
- package/dist/page-editor-api/parser/model/RootAggregation.d.ts +24 -0
- package/dist/page-editor-api/parser/model/RootAggregation.js +54 -0
- package/dist/page-editor-api/parser/model/actions/ActionAggregation.d.ts +34 -0
- package/dist/page-editor-api/parser/model/actions/ActionAggregation.js +92 -0
- package/dist/page-editor-api/parser/model/actions/ActionsAggregation.d.ts +96 -0
- package/dist/page-editor-api/parser/model/actions/ActionsAggregation.js +252 -0
- package/dist/page-editor-api/parser/model/actions/index.d.ts +3 -0
- package/dist/page-editor-api/parser/model/actions/index.js +19 -0
- package/dist/page-editor-api/parser/model/additionalObjects/AdditionalObjectAggregation.d.ts +17 -0
- package/dist/page-editor-api/parser/model/additionalObjects/AdditionalObjectAggregation.js +26 -0
- package/dist/page-editor-api/parser/model/additionalObjects/AdditionalObjectsAggregation.d.ts +46 -0
- package/dist/page-editor-api/parser/model/additionalObjects/AdditionalObjectsAggregation.js +66 -0
- package/dist/page-editor-api/parser/model/additionalObjects/index.d.ts +3 -0
- package/dist/page-editor-api/parser/model/additionalObjects/index.js +19 -0
- package/dist/page-editor-api/parser/model/chart/ChartAggregation.d.ts +41 -0
- package/dist/page-editor-api/parser/model/chart/ChartAggregation.js +94 -0
- package/dist/page-editor-api/parser/model/chart/index.d.ts +2 -0
- package/dist/page-editor-api/parser/model/chart/index.js +18 -0
- package/dist/page-editor-api/parser/model/fields/ConnectedFieldsAggregation.d.ts +9 -0
- package/dist/page-editor-api/parser/model/fields/ConnectedFieldsAggregation.js +13 -0
- package/dist/page-editor-api/parser/model/fields/FieldAggregation.d.ts +25 -0
- package/dist/page-editor-api/parser/model/fields/FieldAggregation.js +42 -0
- package/dist/page-editor-api/parser/model/fields/FieldsAggregation.d.ts +22 -0
- package/dist/page-editor-api/parser/model/fields/FieldsAggregation.js +34 -0
- package/dist/page-editor-api/parser/model/fields/index.d.ts +4 -0
- package/dist/page-editor-api/parser/model/fields/index.js +20 -0
- package/dist/page-editor-api/parser/model/filter-fields/FilterFieldAggregation.d.ts +39 -0
- package/dist/page-editor-api/parser/model/filter-fields/FilterFieldAggregation.js +94 -0
- package/dist/page-editor-api/parser/model/filter-fields/FilterFieldsAggregation.d.ts +36 -0
- package/dist/page-editor-api/parser/model/filter-fields/FilterFieldsAggregation.js +59 -0
- package/dist/page-editor-api/parser/model/filter-fields/index.d.ts +3 -0
- package/dist/page-editor-api/parser/model/filter-fields/index.js +19 -0
- package/dist/page-editor-api/parser/model/index.d.ts +19 -0
- package/dist/page-editor-api/parser/model/index.js +35 -0
- package/dist/page-editor-api/parser/model/macros/MacrosRoot.d.ts +48 -0
- package/dist/page-editor-api/parser/model/macros/MacrosRoot.js +114 -0
- package/dist/page-editor-api/parser/model/macros/index.d.ts +2 -0
- package/dist/page-editor-api/parser/model/macros/index.js +18 -0
- package/dist/page-editor-api/parser/model/sections/HeaderSectionsAggregation.d.ts +31 -0
- package/dist/page-editor-api/parser/model/sections/HeaderSectionsAggregation.js +82 -0
- package/dist/page-editor-api/parser/model/sections/SectionAggregation.d.ts +78 -0
- package/dist/page-editor-api/parser/model/sections/SectionAggregation.js +131 -0
- package/dist/page-editor-api/parser/model/sections/SectionsAggregation.d.ts +135 -0
- package/dist/page-editor-api/parser/model/sections/SectionsAggregation.js +402 -0
- package/dist/page-editor-api/parser/model/sections/SectionsObjectAggregation.d.ts +50 -0
- package/dist/page-editor-api/parser/model/sections/SectionsObjectAggregation.js +119 -0
- package/dist/page-editor-api/parser/model/sections/SubSectionsAggregation.d.ts +39 -0
- package/dist/page-editor-api/parser/model/sections/SubSectionsAggregation.js +70 -0
- package/dist/page-editor-api/parser/model/sections/index.d.ts +6 -0
- package/dist/page-editor-api/parser/model/sections/index.js +22 -0
- package/dist/page-editor-api/parser/model/table/ColumnAggregation.d.ts +89 -0
- package/dist/page-editor-api/parser/model/table/ColumnAggregation.js +175 -0
- package/dist/page-editor-api/parser/model/table/ColumnsAggregation.d.ts +113 -0
- package/dist/page-editor-api/parser/model/table/ColumnsAggregation.js +293 -0
- package/dist/page-editor-api/parser/model/table/TableAggregation.d.ts +13 -0
- package/dist/page-editor-api/parser/model/table/TableAggregation.js +21 -0
- package/dist/page-editor-api/parser/model/table/ToolbarAggregation.d.ts +15 -0
- package/dist/page-editor-api/parser/model/table/ToolbarAggregation.js +22 -0
- package/dist/page-editor-api/parser/model/table/index.d.ts +5 -0
- package/dist/page-editor-api/parser/model/table/index.js +21 -0
- package/dist/page-editor-api/parser/model/table/utils.d.ts +12 -0
- package/dist/page-editor-api/parser/model/table/utils.js +44 -0
- package/dist/page-editor-api/parser/model/types/annotations.d.ts +63 -0
- package/dist/page-editor-api/parser/model/types/annotations.js +29 -0
- package/dist/page-editor-api/parser/model/types/common.d.ts +13 -0
- package/dist/page-editor-api/parser/model/types/common.js +3 -0
- package/dist/page-editor-api/parser/model/types/index.d.ts +220 -0
- package/dist/page-editor-api/parser/model/types/index.js +149 -0
- package/dist/page-editor-api/parser/model/utils/annotations.d.ts +38 -0
- package/dist/page-editor-api/parser/model/utils/annotations.js +120 -0
- package/dist/page-editor-api/parser/model/utils/i18n.d.ts +33 -0
- package/dist/page-editor-api/parser/model/utils/i18n.js +69 -0
- package/dist/page-editor-api/parser/model/utils/index.d.ts +6 -0
- package/dist/page-editor-api/parser/model/utils/index.js +22 -0
- package/dist/page-editor-api/parser/model/utils/object.d.ts +25 -0
- package/dist/page-editor-api/parser/model/utils/object.js +68 -0
- package/dist/page-editor-api/parser/model/utils/sort.d.ts +31 -0
- package/dist/page-editor-api/parser/model/utils/sort.js +18 -0
- package/dist/page-editor-api/parser/model/utils/utils.d.ts +94 -0
- package/dist/page-editor-api/parser/model/utils/utils.js +267 -0
- package/dist/page-editor-api/parser/model/views/ViewAggregation.d.ts +62 -0
- package/dist/page-editor-api/parser/model/views/ViewAggregation.js +112 -0
- package/dist/page-editor-api/parser/model/views/ViewsAggregation.d.ts +54 -0
- package/dist/page-editor-api/parser/model/views/ViewsAggregation.js +141 -0
- package/dist/page-editor-api/parser/model/views/index.d.ts +3 -0
- package/dist/page-editor-api/parser/model/views/index.js +19 -0
- package/dist/page-editor-api/parser/model/visual-filters/VisualFilterAggregation.d.ts +11 -0
- package/dist/page-editor-api/parser/model/visual-filters/VisualFilterAggregation.js +15 -0
- package/dist/page-editor-api/parser/model/visual-filters/VisualFiltersAggregation.d.ts +11 -0
- package/dist/page-editor-api/parser/model/visual-filters/VisualFiltersAggregation.js +15 -0
- package/dist/page-editor-api/parser/model/visual-filters/index.d.ts +3 -0
- package/dist/page-editor-api/parser/model/visual-filters/index.js +19 -0
- package/dist/page-editor-api/parser/tree.d.ts +135 -0
- package/dist/page-editor-api/parser/tree.js +464 -0
- package/dist/page-editor-api/project.d.ts +40 -0
- package/dist/page-editor-api/project.js +124 -0
- package/dist/page-editor-api/sapuxFtfsFileIO.d.ts +84 -0
- package/dist/page-editor-api/sapuxFtfsFileIO.js +195 -0
- package/dist/server.d.ts +35 -0
- package/dist/server.js +120 -0
- package/dist/tools/execute-functionality.d.ts +19 -0
- package/dist/tools/execute-functionality.js +175 -0
- package/dist/tools/functionalities/controller-extension/index.d.ts +4 -0
- package/dist/tools/functionalities/controller-extension/index.js +136 -0
- package/dist/tools/functionalities/functionalities.d.ts +4 -0
- package/dist/tools/functionalities/functionalities.js +19 -0
- package/dist/tools/functionalities/generate-fiori-ui-app/command.d.ts +9 -0
- package/dist/tools/functionalities/generate-fiori-ui-app/command.js +158 -0
- package/dist/tools/functionalities/generate-fiori-ui-app/generate-fiori-ui-app.d.ts +4 -0
- package/dist/tools/functionalities/generate-fiori-ui-app/generate-fiori-ui-app.js +240 -0
- package/dist/tools/functionalities/generate-fiori-ui-app/index.d.ts +2 -0
- package/dist/tools/functionalities/generate-fiori-ui-app/index.js +7 -0
- package/dist/tools/functionalities/index.d.ts +2 -0
- package/dist/tools/functionalities/index.js +18 -0
- package/dist/tools/functionalities/page/add-page.d.ts +5 -0
- package/dist/tools/functionalities/page/add-page.js +89 -0
- package/dist/tools/functionalities/page/application.d.ts +212 -0
- package/dist/tools/functionalities/page/application.js +616 -0
- package/dist/tools/functionalities/page/delete-page.d.ts +4 -0
- package/dist/tools/functionalities/page/delete-page.js +71 -0
- package/dist/tools/functionalities/page/index.d.ts +3 -0
- package/dist/tools/functionalities/page/index.js +10 -0
- package/dist/tools/functionalities/page/service.d.ts +82 -0
- package/dist/tools/functionalities/page/service.js +114 -0
- package/dist/tools/functionalities/page/serviceStore.d.ts +17 -0
- package/dist/tools/functionalities/page/serviceStore.js +34 -0
- package/dist/tools/functionalities/page/types.d.ts +42 -0
- package/dist/tools/functionalities/page/types.js +11 -0
- package/dist/tools/functionalities/page/utils.d.ts +12 -0
- package/dist/tools/functionalities/page/utils.js +63 -0
- package/dist/tools/get-functionality-details.d.ts +24 -0
- package/dist/tools/get-functionality-details.js +142 -0
- package/dist/tools/index.d.ts +7 -0
- package/dist/tools/index.js +55 -0
- package/dist/tools/input-schema/execute-functionality.json +28 -0
- package/dist/tools/input-schema/get-functionality-details.json +24 -0
- package/dist/tools/input-schema/index.d.ts +5 -0
- package/dist/tools/input-schema/index.js +15 -0
- package/dist/tools/input-schema/list-fiori-apps.json +12 -0
- package/dist/tools/input-schema/list-functionality.json +10 -0
- package/dist/tools/list-fiori-apps.d.ts +10 -0
- package/dist/tools/list-fiori-apps.js +33 -0
- package/dist/tools/list-functionalities.d.ts +10 -0
- package/dist/tools/list-functionalities.js +145 -0
- package/dist/tools/output-schema/execute-functionality.json +39 -0
- package/dist/tools/output-schema/get-functionality-details.json +142 -0
- package/dist/tools/output-schema/index.d.ts +5 -0
- package/dist/tools/output-schema/index.js +15 -0
- package/dist/tools/output-schema/list-fiori-apps.json +41 -0
- package/dist/tools/output-schema/list-functionality.json +37 -0
- package/dist/tools/utils.d.ts +16 -0
- package/dist/tools/utils.js +74 -0
- package/dist/types.d.ts +170 -0
- package/dist/types.js +3 -0
- package/package.json +63 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ObjectAggregation } from '../ObjectAggregation';
|
|
2
|
+
import { AggregationActions } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Represents an aggregation for additional object.
|
|
5
|
+
*/
|
|
6
|
+
export declare class AdditionalObjectAggregation extends ObjectAggregation {
|
|
7
|
+
actions: AggregationActions[];
|
|
8
|
+
/**
|
|
9
|
+
* Method returns display name of aggregation.
|
|
10
|
+
* Is used as display name in outline.
|
|
11
|
+
* Overwritten to avoid translation attempt and "startCase" format.
|
|
12
|
+
*
|
|
13
|
+
* @returns Display name of aggregation.
|
|
14
|
+
*/
|
|
15
|
+
getDisplayName(): string;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=AdditionalObjectAggregation.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdditionalObjectAggregation = void 0;
|
|
4
|
+
const ObjectAggregation_1 = require("../ObjectAggregation");
|
|
5
|
+
const types_1 = require("../types");
|
|
6
|
+
/**
|
|
7
|
+
* Represents an aggregation for additional object.
|
|
8
|
+
*/
|
|
9
|
+
class AdditionalObjectAggregation extends ObjectAggregation_1.ObjectAggregation {
|
|
10
|
+
actions = [types_1.AggregationActions.Delete];
|
|
11
|
+
/**
|
|
12
|
+
* Method returns display name of aggregation.
|
|
13
|
+
* Is used as display name in outline.
|
|
14
|
+
* Overwritten to avoid translation attempt and "startCase" format.
|
|
15
|
+
*
|
|
16
|
+
* @returns Display name of aggregation.
|
|
17
|
+
*/
|
|
18
|
+
getDisplayName() {
|
|
19
|
+
if (this.name) {
|
|
20
|
+
return this.name;
|
|
21
|
+
}
|
|
22
|
+
return super.getDisplayName();
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.AdditionalObjectAggregation = AdditionalObjectAggregation;
|
|
26
|
+
//# sourceMappingURL=AdditionalObjectAggregation.js.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { JSONSchema4 } from 'json-schema';
|
|
2
|
+
import type { PageConfig, PageType } from '@sap/ux-specification/dist/types/src';
|
|
3
|
+
import { ObjectAggregation } from '../ObjectAggregation';
|
|
4
|
+
import type { PageEditAggregationData } from '../ObjectAggregation';
|
|
5
|
+
import type { PageData, PropertyPath, PageAnnotations } from '../types';
|
|
6
|
+
import { AdditionalObjectAggregation } from './AdditionalObjectAggregation';
|
|
7
|
+
/**
|
|
8
|
+
* Represents an aggregation for additional objects.
|
|
9
|
+
*/
|
|
10
|
+
export declare class AdditionalObjectsAggregation extends ObjectAggregation {
|
|
11
|
+
sortableList: boolean;
|
|
12
|
+
childClass: typeof AdditionalObjectAggregation;
|
|
13
|
+
sortableCollection: string | undefined;
|
|
14
|
+
i18nKey: string;
|
|
15
|
+
/**
|
|
16
|
+
* Creates an instance of `AdditionalObjectsAggregation`.
|
|
17
|
+
*
|
|
18
|
+
* @param data Optional aggregation data object used to initialize properties.
|
|
19
|
+
* @param schema Optional JSON schema fragment associated with this aggregation.
|
|
20
|
+
*/
|
|
21
|
+
constructor(data?: PageEditAggregationData, schema?: JSONSchema4);
|
|
22
|
+
/**
|
|
23
|
+
* Method adds aggregation object.
|
|
24
|
+
* Overwritten to mark standard action.
|
|
25
|
+
*
|
|
26
|
+
* @param name Name of aggregation.
|
|
27
|
+
* @param aggregation Aggregation to add.
|
|
28
|
+
* @param path Array of path to aggregation.
|
|
29
|
+
* @param order Order index.
|
|
30
|
+
* @param overwrite Overwrite existing aggregation.
|
|
31
|
+
* @returns Added aggregation.
|
|
32
|
+
*/
|
|
33
|
+
addAggregation(name: string, aggregation: ObjectAggregation, path: PropertyPath, order?: number, overwrite?: boolean): ObjectAggregation;
|
|
34
|
+
/**
|
|
35
|
+
* Overwritten method for data update of object page actions
|
|
36
|
+
* Method receives current values for actions and detects custom actions.
|
|
37
|
+
*
|
|
38
|
+
* @param data Data which should be used for value population.
|
|
39
|
+
* @param page Page config data.
|
|
40
|
+
* @param pageType Page type.
|
|
41
|
+
* @param path Aggregation path.
|
|
42
|
+
* @param annotations Annotations data.
|
|
43
|
+
*/
|
|
44
|
+
updatePropertiesValues(data: PageData, page: PageConfig, pageType: PageType, path: PropertyPath, annotations: PageAnnotations): void;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=AdditionalObjectsAggregation.d.ts.map
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdditionalObjectsAggregation = void 0;
|
|
4
|
+
const ObjectAggregation_1 = require("../ObjectAggregation");
|
|
5
|
+
const types_1 = require("../types");
|
|
6
|
+
const AdditionalObjectAggregation_1 = require("./AdditionalObjectAggregation");
|
|
7
|
+
/**
|
|
8
|
+
* Represents an aggregation for additional objects.
|
|
9
|
+
*/
|
|
10
|
+
class AdditionalObjectsAggregation extends ObjectAggregation_1.ObjectAggregation {
|
|
11
|
+
sortableList = false;
|
|
12
|
+
childClass = AdditionalObjectAggregation_1.AdditionalObjectAggregation;
|
|
13
|
+
i18nKey = 'ADDITIONALOBJECTS';
|
|
14
|
+
/**
|
|
15
|
+
* Creates an instance of `AdditionalObjectsAggregation`.
|
|
16
|
+
*
|
|
17
|
+
* @param data Optional aggregation data object used to initialize properties.
|
|
18
|
+
* @param schema Optional JSON schema fragment associated with this aggregation.
|
|
19
|
+
*/
|
|
20
|
+
constructor(data, schema) {
|
|
21
|
+
super(data, schema);
|
|
22
|
+
// Custom creation form - check schema if supported
|
|
23
|
+
this.schemaCreationForms = [
|
|
24
|
+
{
|
|
25
|
+
name: types_1.AggregationCreationForm.Generic,
|
|
26
|
+
kind: types_1.SCHEMA_CREATION_FORM,
|
|
27
|
+
title: 'PAGE_EDITOR_OUTLINE_ADD_GENERIC_TITLE',
|
|
28
|
+
disabled: false
|
|
29
|
+
}
|
|
30
|
+
];
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Method adds aggregation object.
|
|
34
|
+
* Overwritten to mark standard action.
|
|
35
|
+
*
|
|
36
|
+
* @param name Name of aggregation.
|
|
37
|
+
* @param aggregation Aggregation to add.
|
|
38
|
+
* @param path Array of path to aggregation.
|
|
39
|
+
* @param order Order index.
|
|
40
|
+
* @param overwrite Overwrite existing aggregation.
|
|
41
|
+
* @returns Added aggregation.
|
|
42
|
+
*/
|
|
43
|
+
addAggregation(name, aggregation, path, order, overwrite) {
|
|
44
|
+
// Required for generic deletion(non annotation based deletion)
|
|
45
|
+
aggregation.custom = true;
|
|
46
|
+
return super.addAggregation(name, aggregation, path, order, overwrite);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Overwritten method for data update of object page actions
|
|
50
|
+
* Method receives current values for actions and detects custom actions.
|
|
51
|
+
*
|
|
52
|
+
* @param data Data which should be used for value population.
|
|
53
|
+
* @param page Page config data.
|
|
54
|
+
* @param pageType Page type.
|
|
55
|
+
* @param path Aggregation path.
|
|
56
|
+
* @param annotations Annotations data.
|
|
57
|
+
*/
|
|
58
|
+
updatePropertiesValues(data, page, pageType, path, annotations) {
|
|
59
|
+
super.updatePropertiesValues(data, page, pageType, path, annotations);
|
|
60
|
+
if (this.name) {
|
|
61
|
+
this.formSchema = this.additionalProperties?.aggregations[this.name];
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
exports.AdditionalObjectsAggregation = AdditionalObjectsAggregation;
|
|
66
|
+
//# sourceMappingURL=AdditionalObjectsAggregation.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./AdditionalObjectAggregation"), exports);
|
|
18
|
+
__exportStar(require("./AdditionalObjectsAggregation"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ObjectAggregation } from '../ObjectAggregation';
|
|
2
|
+
import type { PageData, PageAnnotations, PropertyPath } from '../types';
|
|
3
|
+
import type { PageConfig, PageType } from '@sap/ux-specification/dist/types/src';
|
|
4
|
+
/**
|
|
5
|
+
* Represents an aggregation for analytical chart objects.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ChartAggregation extends ObjectAggregation {
|
|
8
|
+
/**
|
|
9
|
+
* Refreshes internal data based on latest annotation node data.
|
|
10
|
+
*
|
|
11
|
+
* @param annotations
|
|
12
|
+
*/
|
|
13
|
+
updateAnnotationData(annotations: PageAnnotations | undefined): void;
|
|
14
|
+
/**
|
|
15
|
+
* Overwritten method for data update.
|
|
16
|
+
* Is used to detect if we need hide aggregation depending on received data.
|
|
17
|
+
* Method should be removed after action status fulfilled would consider full sync flow(18990).
|
|
18
|
+
*
|
|
19
|
+
* @param data Data which should be used for value population.
|
|
20
|
+
* @param page Page config data.
|
|
21
|
+
* @param pageType Page type.
|
|
22
|
+
* @param path Aggregation path.
|
|
23
|
+
* @param annotations Page annotations.
|
|
24
|
+
*/
|
|
25
|
+
updatePropertiesValues(data: PageData, page: PageConfig, pageType: PageType, path: PropertyPath, annotations?: PageAnnotations): void;
|
|
26
|
+
/**
|
|
27
|
+
* Method checks if deletion is supported depending on if spec support complex deletion or not.
|
|
28
|
+
*
|
|
29
|
+
* @param support Deletion support received from annotation.
|
|
30
|
+
* @returns Deletion support based on spec check.
|
|
31
|
+
*/
|
|
32
|
+
private getDeletionSupport;
|
|
33
|
+
/**
|
|
34
|
+
* Method checks if passed target annotation is considered as complex scenario and unsupported by older spec.
|
|
35
|
+
*
|
|
36
|
+
* @param value Value to check.
|
|
37
|
+
* @returns Is complex scenario.
|
|
38
|
+
*/
|
|
39
|
+
private isComplexScenario;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=ChartAggregation.d.ts.map
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ChartAggregation = void 0;
|
|
7
|
+
const i18next_1 = __importDefault(require("i18next"));
|
|
8
|
+
const ObjectAggregation_1 = require("../ObjectAggregation");
|
|
9
|
+
const types_1 = require("../types");
|
|
10
|
+
const RootAggregation_1 = require("../RootAggregation");
|
|
11
|
+
/**
|
|
12
|
+
* Represents an aggregation for analytical chart objects.
|
|
13
|
+
*/
|
|
14
|
+
class ChartAggregation extends ObjectAggregation_1.ObjectAggregation {
|
|
15
|
+
/**
|
|
16
|
+
* Refreshes internal data based on latest annotation node data.
|
|
17
|
+
*
|
|
18
|
+
* @param annotations
|
|
19
|
+
*/
|
|
20
|
+
updateAnnotationData(annotations) {
|
|
21
|
+
const chartDefs = annotations?.dialogsContext?.analyticalChartSupport;
|
|
22
|
+
this.actions = [];
|
|
23
|
+
if (chartDefs) {
|
|
24
|
+
const deletionSupport = this.getDeletionSupport(chartDefs);
|
|
25
|
+
const action = {
|
|
26
|
+
type: types_1.AggregationActions.Delete,
|
|
27
|
+
title: deletionSupport.deletionTooltip
|
|
28
|
+
};
|
|
29
|
+
action.disabled = !deletionSupport.deletionEnabled;
|
|
30
|
+
this.actions.push(action);
|
|
31
|
+
}
|
|
32
|
+
super.updateAnnotationData(annotations);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Overwritten method for data update.
|
|
36
|
+
* Is used to detect if we need hide aggregation depending on received data.
|
|
37
|
+
* Method should be removed after action status fulfilled would consider full sync flow(18990).
|
|
38
|
+
*
|
|
39
|
+
* @param data Data which should be used for value population.
|
|
40
|
+
* @param page Page config data.
|
|
41
|
+
* @param pageType Page type.
|
|
42
|
+
* @param path Aggregation path.
|
|
43
|
+
* @param annotations Page annotations.
|
|
44
|
+
*/
|
|
45
|
+
updatePropertiesValues(data, page, pageType, path, annotations) {
|
|
46
|
+
super.updatePropertiesValues(data, page, pageType, path, annotations);
|
|
47
|
+
// Can be removed after webview action status "fulfilled" would considers full sync flow(18990).
|
|
48
|
+
const hasAnnotationPathProperty = !!this.schema?.properties?.['annotationPath'];
|
|
49
|
+
if (hasAnnotationPathProperty && !data?.annotationPath) {
|
|
50
|
+
this.hidden = true;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Method checks if deletion is supported depending on if spec support complex deletion or not.
|
|
55
|
+
*
|
|
56
|
+
* @param support Deletion support received from annotation.
|
|
57
|
+
* @returns Deletion support based on spec check.
|
|
58
|
+
*/
|
|
59
|
+
getDeletionSupport(support = {}) {
|
|
60
|
+
if (support?.deletionEnabled) {
|
|
61
|
+
const root = this.findMatchingParent(RootAggregation_1.RootAggregation);
|
|
62
|
+
// Check if old spec
|
|
63
|
+
const isSpecSupportComplexDeletion = root?.schema?.properties?.['defaultTemplateAnnotationPath'];
|
|
64
|
+
if (!isSpecSupportComplexDeletion && root) {
|
|
65
|
+
// Check if complex scenario unsuported by old spec
|
|
66
|
+
const table = root.aggregations['table']?.value;
|
|
67
|
+
if (typeof table === 'object') {
|
|
68
|
+
const annotationPath = table?.annotationPath;
|
|
69
|
+
if (this.isComplexScenario(annotationPath)) {
|
|
70
|
+
support = {
|
|
71
|
+
deletionEnabled: false,
|
|
72
|
+
deletionTooltip: i18next_1.default.t('CHART_DELETION_UNSUPPORTED_BY_SPEC')
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return support;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Method checks if passed target annotation is considered as complex scenario and unsupported by older spec.
|
|
82
|
+
*
|
|
83
|
+
* @param value Value to check.
|
|
84
|
+
* @returns Is complex scenario.
|
|
85
|
+
*/
|
|
86
|
+
isComplexScenario(value) {
|
|
87
|
+
const parts = value.split('.');
|
|
88
|
+
const annotationTerm = parts[parts.length - 1] || '';
|
|
89
|
+
return (annotationTerm.startsWith('SelectionPresentationVariant') ||
|
|
90
|
+
annotationTerm.startsWith('PresentationVariant#'));
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
exports.ChartAggregation = ChartAggregation;
|
|
94
|
+
//# sourceMappingURL=ChartAggregation.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./ChartAggregation"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FieldAggregation } from './FieldAggregation';
|
|
2
|
+
/**
|
|
3
|
+
* Represents an aggregation for connected fields objects.
|
|
4
|
+
*/
|
|
5
|
+
export declare class ConnectedFieldsAggregation extends FieldAggregation {
|
|
6
|
+
sortableList: boolean;
|
|
7
|
+
childClass: typeof FieldAggregation;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=ConnectedFieldsAggregation.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConnectedFieldsAggregation = void 0;
|
|
4
|
+
const FieldAggregation_1 = require("./FieldAggregation");
|
|
5
|
+
/**
|
|
6
|
+
* Represents an aggregation for connected fields objects.
|
|
7
|
+
*/
|
|
8
|
+
class ConnectedFieldsAggregation extends FieldAggregation_1.FieldAggregation {
|
|
9
|
+
sortableList = true;
|
|
10
|
+
childClass = FieldAggregation_1.FieldAggregation;
|
|
11
|
+
}
|
|
12
|
+
exports.ConnectedFieldsAggregation = ConnectedFieldsAggregation;
|
|
13
|
+
//# sourceMappingURL=ConnectedFieldsAggregation.js.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ObjectAggregation } from '../ObjectAggregation';
|
|
2
|
+
import { SortingOptions, AggregationActions } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Represents an aggregation for field objects.
|
|
5
|
+
*/
|
|
6
|
+
export declare class FieldAggregation extends ObjectAggregation {
|
|
7
|
+
actions: AggregationActions[];
|
|
8
|
+
sortableItem: SortingOptions | undefined;
|
|
9
|
+
isViewNode: boolean;
|
|
10
|
+
sortableCollection: string | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Method returns display name of aggregation without applying i18n translation.
|
|
13
|
+
* Overwritten for column handling.
|
|
14
|
+
*
|
|
15
|
+
* @returns Display name of aggregation.
|
|
16
|
+
*/
|
|
17
|
+
protected getRawDisplayName(): string;
|
|
18
|
+
/**
|
|
19
|
+
* Method parses object path key and returns field name / technical id.
|
|
20
|
+
*
|
|
21
|
+
* @returns Field name / technical id.
|
|
22
|
+
*/
|
|
23
|
+
getTechnicalName(): string | undefined;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=FieldAggregation.d.ts.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FieldAggregation = void 0;
|
|
4
|
+
const ObjectAggregation_1 = require("../ObjectAggregation");
|
|
5
|
+
const types_1 = require("../types");
|
|
6
|
+
const utils_1 = require("../utils");
|
|
7
|
+
/**
|
|
8
|
+
* Represents an aggregation for field objects.
|
|
9
|
+
*/
|
|
10
|
+
class FieldAggregation extends ObjectAggregation_1.ObjectAggregation {
|
|
11
|
+
actions = [types_1.AggregationActions.Delete];
|
|
12
|
+
sortableItem = types_1.SortingOptions.Enabled;
|
|
13
|
+
isViewNode = true;
|
|
14
|
+
sortableCollection = 'fields';
|
|
15
|
+
/**
|
|
16
|
+
* Method returns display name of aggregation without applying i18n translation.
|
|
17
|
+
* Overwritten for column handling.
|
|
18
|
+
*
|
|
19
|
+
* @returns Display name of aggregation.
|
|
20
|
+
*/
|
|
21
|
+
getRawDisplayName() {
|
|
22
|
+
const displayName = super.getRawDisplayName();
|
|
23
|
+
if (!displayName) {
|
|
24
|
+
// Fallback when no label presented
|
|
25
|
+
const fieldName = this.getTechnicalName();
|
|
26
|
+
if (fieldName) {
|
|
27
|
+
return fieldName;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return displayName;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Method parses object path key and returns field name / technical id.
|
|
34
|
+
*
|
|
35
|
+
* @returns Field name / technical id.
|
|
36
|
+
*/
|
|
37
|
+
getTechnicalName() {
|
|
38
|
+
return (0, utils_1.getTechnicalIdFromPath)(this.path);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.FieldAggregation = FieldAggregation;
|
|
42
|
+
//# sourceMappingURL=FieldAggregation.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ObjectAggregation } from '../ObjectAggregation';
|
|
2
|
+
import { FieldAggregation } from './FieldAggregation';
|
|
3
|
+
import { AggregationCreationForm } from '../types';
|
|
4
|
+
import type { PageAnnotations } from '../types';
|
|
5
|
+
/**
|
|
6
|
+
* Represents an aggregation for fields objects.
|
|
7
|
+
*/
|
|
8
|
+
export declare class FieldsAggregation extends ObjectAggregation {
|
|
9
|
+
sortableList: boolean;
|
|
10
|
+
childClass: typeof FieldAggregation;
|
|
11
|
+
allowedAnnotationCreationForms: AggregationCreationForm[];
|
|
12
|
+
sortableCollection: string | undefined;
|
|
13
|
+
i18nKey: string;
|
|
14
|
+
/**
|
|
15
|
+
* Refreshes internal data based on annotation node data.
|
|
16
|
+
* Overwritten to keep child nodes order the same as they defined in connected fields template.
|
|
17
|
+
*
|
|
18
|
+
* @param annotations Page annotations.
|
|
19
|
+
*/
|
|
20
|
+
updateAnnotationData(annotations: PageAnnotations | undefined): void;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=FieldsAggregation.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FieldsAggregation = void 0;
|
|
4
|
+
const ObjectAggregation_1 = require("../ObjectAggregation");
|
|
5
|
+
const FieldAggregation_1 = require("./FieldAggregation");
|
|
6
|
+
const types_1 = require("../types");
|
|
7
|
+
/**
|
|
8
|
+
* Represents an aggregation for fields objects.
|
|
9
|
+
*/
|
|
10
|
+
class FieldsAggregation extends ObjectAggregation_1.ObjectAggregation {
|
|
11
|
+
sortableList = true;
|
|
12
|
+
childClass = FieldAggregation_1.FieldAggregation;
|
|
13
|
+
allowedAnnotationCreationForms = [
|
|
14
|
+
types_1.AggregationCreationForm.NativeField,
|
|
15
|
+
types_1.AggregationCreationForm.NativeContactField,
|
|
16
|
+
types_1.AggregationCreationForm.NativeConnectedFields
|
|
17
|
+
];
|
|
18
|
+
sortableCollection = 'fields';
|
|
19
|
+
i18nKey = 'FIELDS';
|
|
20
|
+
/**
|
|
21
|
+
* Refreshes internal data based on annotation node data.
|
|
22
|
+
* Overwritten to keep child nodes order the same as they defined in connected fields template.
|
|
23
|
+
*
|
|
24
|
+
* @param annotations Page annotations.
|
|
25
|
+
*/
|
|
26
|
+
updateAnnotationData(annotations) {
|
|
27
|
+
super.updateAnnotationData(annotations);
|
|
28
|
+
if (this.path[0] === 'header') {
|
|
29
|
+
this.allowedAnnotationCreationForms.splice(this.allowedAnnotationCreationForms.indexOf(types_1.AggregationCreationForm.NativeConnectedFields));
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.FieldsAggregation = FieldsAggregation;
|
|
34
|
+
//# sourceMappingURL=FieldsAggregation.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./FieldAggregation"), exports);
|
|
18
|
+
__exportStar(require("./FieldsAggregation"), exports);
|
|
19
|
+
__exportStar(require("./ConnectedFieldsAggregation"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { JSONSchema4 } from 'json-schema';
|
|
2
|
+
import { ObjectAggregation } from '../ObjectAggregation';
|
|
3
|
+
import { SortingOptions, AggregationActions } from '../types';
|
|
4
|
+
import type { PageEditProperty } from '../PageEditProperty';
|
|
5
|
+
/**
|
|
6
|
+
* Represents an aggregation for filter field objects.
|
|
7
|
+
*/
|
|
8
|
+
export declare class FilterFieldAggregation extends ObjectAggregation {
|
|
9
|
+
actions: AggregationActions[];
|
|
10
|
+
sortableItem: SortingOptions | undefined;
|
|
11
|
+
isViewNode: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Method returns display name of aggregation without applying i18n translation.
|
|
14
|
+
* Overwritten for column handling.
|
|
15
|
+
*
|
|
16
|
+
* @returns Display name of aggregation.
|
|
17
|
+
*/
|
|
18
|
+
protected getRawDisplayName(): string;
|
|
19
|
+
/**
|
|
20
|
+
* Method parses object path key and returns field name / technical id.
|
|
21
|
+
*
|
|
22
|
+
* @returns Field name / technical id.
|
|
23
|
+
*/
|
|
24
|
+
getTechnicalName(): string | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Public method to mark filter field as custom filter field.
|
|
27
|
+
*/
|
|
28
|
+
markAsCustomFilterField(): void;
|
|
29
|
+
/**
|
|
30
|
+
* Method adds property object.
|
|
31
|
+
* Overwritten to disable "property" property - it is done till we clarify how to handle it correctly.
|
|
32
|
+
*
|
|
33
|
+
* @param name Name of property.
|
|
34
|
+
* @param schema Schema object of property.
|
|
35
|
+
* @returns Instance of new property.
|
|
36
|
+
*/
|
|
37
|
+
addProperty(name: string, schema: JSONSchema4): PageEditProperty;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=FilterFieldAggregation.d.ts.map
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.FilterFieldAggregation = void 0;
|
|
7
|
+
const i18next_1 = __importDefault(require("i18next"));
|
|
8
|
+
const ObjectAggregation_1 = require("../ObjectAggregation");
|
|
9
|
+
const types_1 = require("../types");
|
|
10
|
+
const utils_1 = require("../utils");
|
|
11
|
+
/**
|
|
12
|
+
* Represents an aggregation for filter field objects.
|
|
13
|
+
*/
|
|
14
|
+
class FilterFieldAggregation extends ObjectAggregation_1.ObjectAggregation {
|
|
15
|
+
actions = [types_1.AggregationActions.Delete];
|
|
16
|
+
sortableItem = types_1.SortingOptions.Enabled;
|
|
17
|
+
isViewNode = true;
|
|
18
|
+
/**
|
|
19
|
+
* Method returns display name of aggregation without applying i18n translation.
|
|
20
|
+
* Overwritten for column handling.
|
|
21
|
+
*
|
|
22
|
+
* @returns Display name of aggregation.
|
|
23
|
+
*/
|
|
24
|
+
getRawDisplayName() {
|
|
25
|
+
const displayName = super.getRawDisplayName();
|
|
26
|
+
if (!displayName) {
|
|
27
|
+
// Fallback when no label presented
|
|
28
|
+
const fieldName = this.getTechnicalName();
|
|
29
|
+
if (fieldName) {
|
|
30
|
+
return fieldName;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return displayName;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Method parses object path key and returns field name / technical id.
|
|
37
|
+
*
|
|
38
|
+
* @returns Field name / technical id.
|
|
39
|
+
*/
|
|
40
|
+
getTechnicalName() {
|
|
41
|
+
const key = this.path[this.path.length - 1];
|
|
42
|
+
if (key) {
|
|
43
|
+
const separator = '::';
|
|
44
|
+
const parts = key.toString().split(separator);
|
|
45
|
+
const fieldName = parts[parts.length - 1];
|
|
46
|
+
if (fieldName) {
|
|
47
|
+
return fieldName;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Public method to mark filter field as custom filter field.
|
|
53
|
+
*/
|
|
54
|
+
markAsCustomFilterField() {
|
|
55
|
+
this.custom = true;
|
|
56
|
+
this.actions = [types_1.AggregationActions.OpenSource];
|
|
57
|
+
if (!this.isMacrosNode()) {
|
|
58
|
+
this.actions.push(types_1.AggregationActions.Delete);
|
|
59
|
+
}
|
|
60
|
+
this.sortableItem = types_1.SortingOptions.Enabled;
|
|
61
|
+
this.additionalText = i18next_1.default.t('PAGE_EDITOR_OUTLINE_NODE_DESC_CUSTOM_FILTER_FIELD');
|
|
62
|
+
this.i18nKey = this.parent?.i18nKey;
|
|
63
|
+
if (this.isMacrosNode()) {
|
|
64
|
+
// validate custom filterfield key
|
|
65
|
+
(0, utils_1.validateMacrosExtension)(this);
|
|
66
|
+
}
|
|
67
|
+
// Validate anchor
|
|
68
|
+
const anchor = this.properties.anchor;
|
|
69
|
+
if (anchor?.value) {
|
|
70
|
+
// Validate anchor if value exists
|
|
71
|
+
const validEntries = anchor.schema.oneOf || [];
|
|
72
|
+
if (!validEntries.some((entry) => entry.const === anchor.value)) {
|
|
73
|
+
(0, utils_1.validateExtension)(this, false, i18next_1.default.t('PAGE_EDITOR_CUSTOM_EXTENSION_NO_ANCHOR'));
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Method adds property object.
|
|
79
|
+
* Overwritten to disable "property" property - it is done till we clarify how to handle it correctly.
|
|
80
|
+
*
|
|
81
|
+
* @param name Name of property.
|
|
82
|
+
* @param schema Schema object of property.
|
|
83
|
+
* @returns Instance of new property.
|
|
84
|
+
*/
|
|
85
|
+
addProperty(name, schema) {
|
|
86
|
+
const property = super.addProperty(name, schema);
|
|
87
|
+
if (name === 'property') {
|
|
88
|
+
property.disabled = true;
|
|
89
|
+
}
|
|
90
|
+
return property;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
exports.FilterFieldAggregation = FilterFieldAggregation;
|
|
94
|
+
//# sourceMappingURL=FilterFieldAggregation.js.map
|