@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,36 @@
|
|
|
1
|
+
import type { JSONSchema4 } from 'json-schema';
|
|
2
|
+
import type { PageConfig, PageType } from '@sap/ux-specification/dist/types/src';
|
|
3
|
+
import type { PageData, PropertyPath, PageAnnotations } from '../types';
|
|
4
|
+
import { AggregationCreationForm } from '../types';
|
|
5
|
+
import { ObjectAggregation } from '../ObjectAggregation';
|
|
6
|
+
import type { PageEditAggregationData } from '../ObjectAggregation';
|
|
7
|
+
import { FilterFieldAggregation } from './FilterFieldAggregation';
|
|
8
|
+
export declare const VISUAL_FILTER_PROPERTY_NAME = "visualFilters";
|
|
9
|
+
/**
|
|
10
|
+
* Represents an aggregation for filter fields objects.
|
|
11
|
+
*/
|
|
12
|
+
export declare class FilterFieldsAggregation extends ObjectAggregation {
|
|
13
|
+
sortableList: boolean;
|
|
14
|
+
allowedAnnotationCreationForms: AggregationCreationForm[];
|
|
15
|
+
childClass: typeof FilterFieldAggregation;
|
|
16
|
+
i18nKey: string;
|
|
17
|
+
/**
|
|
18
|
+
* Creates an instance of `FilterFieldsAggregation`.
|
|
19
|
+
*
|
|
20
|
+
* @param data Optional aggregation data object used to initialize properties.
|
|
21
|
+
* @param schema Optional JSON schema fragment associated with this aggregation.
|
|
22
|
+
*/
|
|
23
|
+
constructor(data?: PageEditAggregationData, schema?: JSONSchema4);
|
|
24
|
+
/**
|
|
25
|
+
* Overwritten method for data update of object page actions
|
|
26
|
+
* Method receives current values for actions and detects custom actions.
|
|
27
|
+
*
|
|
28
|
+
* @param data Data which should be used for value population.
|
|
29
|
+
* @param page Page config data.
|
|
30
|
+
* @param pageType Page type.
|
|
31
|
+
* @param path Aggregation path.
|
|
32
|
+
* @param annotations Annotations data.
|
|
33
|
+
*/
|
|
34
|
+
updatePropertiesValues(data: PageData, page: PageConfig, pageType: PageType, path: PropertyPath, annotations: PageAnnotations): void;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=FilterFieldsAggregation.d.ts.map
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FilterFieldsAggregation = exports.VISUAL_FILTER_PROPERTY_NAME = void 0;
|
|
4
|
+
const types_1 = require("../types");
|
|
5
|
+
const ObjectAggregation_1 = require("../ObjectAggregation");
|
|
6
|
+
const FilterFieldAggregation_1 = require("./FilterFieldAggregation");
|
|
7
|
+
exports.VISUAL_FILTER_PROPERTY_NAME = 'visualFilters';
|
|
8
|
+
/**
|
|
9
|
+
* Represents an aggregation for filter fields objects.
|
|
10
|
+
*/
|
|
11
|
+
class FilterFieldsAggregation extends ObjectAggregation_1.ObjectAggregation {
|
|
12
|
+
sortableList = true;
|
|
13
|
+
allowedAnnotationCreationForms = [types_1.AggregationCreationForm.NativeFilterFields];
|
|
14
|
+
childClass = FilterFieldAggregation_1.FilterFieldAggregation;
|
|
15
|
+
i18nKey = 'FILTER_FIELDS';
|
|
16
|
+
/**
|
|
17
|
+
* Creates an instance of `FilterFieldsAggregation`.
|
|
18
|
+
*
|
|
19
|
+
* @param data Optional aggregation data object used to initialize properties.
|
|
20
|
+
* @param schema Optional JSON schema fragment associated with this aggregation.
|
|
21
|
+
*/
|
|
22
|
+
constructor(data, schema) {
|
|
23
|
+
super(data, schema);
|
|
24
|
+
const additionalProperties = schema?.additionalProperties;
|
|
25
|
+
if (typeof additionalProperties === 'object' && additionalProperties.$ref && !this.isMacrosNode()) {
|
|
26
|
+
this.schemaCreationForms = [
|
|
27
|
+
{
|
|
28
|
+
name: types_1.AggregationCreationForm.CustomFilterField,
|
|
29
|
+
kind: types_1.SCHEMA_CREATION_FORM,
|
|
30
|
+
title: 'PAGE_EDITOR_OUTLINE_ADD_CUSTOM_FILTER_FIELDS_TITLE',
|
|
31
|
+
disabled: false
|
|
32
|
+
}
|
|
33
|
+
];
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Overwritten method for data update of object page actions
|
|
38
|
+
* Method receives current values for actions and detects custom actions.
|
|
39
|
+
*
|
|
40
|
+
* @param data Data which should be used for value population.
|
|
41
|
+
* @param page Page config data.
|
|
42
|
+
* @param pageType Page type.
|
|
43
|
+
* @param path Aggregation path.
|
|
44
|
+
* @param annotations Annotations data.
|
|
45
|
+
*/
|
|
46
|
+
updatePropertiesValues(data, page, pageType, path, annotations) {
|
|
47
|
+
super.updatePropertiesValues(data, page, pageType, path, annotations);
|
|
48
|
+
this.formSchema = this.additionalProperties?.aggregations['selectionFields'];
|
|
49
|
+
const filterFields = data || {};
|
|
50
|
+
for (const id in filterFields) {
|
|
51
|
+
const filterField = this.aggregations[id];
|
|
52
|
+
if (filterField?.schema && !filterField.schema.annotationPath) {
|
|
53
|
+
filterField.markAsCustomFilterField();
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.FilterFieldsAggregation = FilterFieldsAggregation;
|
|
59
|
+
//# sourceMappingURL=FilterFieldsAggregation.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("./FilterFieldAggregation"), exports);
|
|
18
|
+
__exportStar(require("./FilterFieldsAggregation"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export * from './actions';
|
|
2
|
+
export * from './additionalObjects';
|
|
3
|
+
export * from './AggregationValidator';
|
|
4
|
+
export * from './ArrayAggregation';
|
|
5
|
+
export * from './chart';
|
|
6
|
+
export * from './fields';
|
|
7
|
+
export * from './filter-fields';
|
|
8
|
+
export * from './macros';
|
|
9
|
+
export * from './ObjectAggregation';
|
|
10
|
+
export * from './PageEditModel';
|
|
11
|
+
export * from './PageEditProperty';
|
|
12
|
+
export * from './RootAggregation';
|
|
13
|
+
export * from './sections';
|
|
14
|
+
export * from './table';
|
|
15
|
+
export * from './types';
|
|
16
|
+
export * from './utils';
|
|
17
|
+
export * from './views';
|
|
18
|
+
export * from './visual-filters';
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
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("./actions"), exports);
|
|
18
|
+
__exportStar(require("./additionalObjects"), exports);
|
|
19
|
+
__exportStar(require("./AggregationValidator"), exports);
|
|
20
|
+
__exportStar(require("./ArrayAggregation"), exports);
|
|
21
|
+
__exportStar(require("./chart"), exports);
|
|
22
|
+
__exportStar(require("./fields"), exports);
|
|
23
|
+
__exportStar(require("./filter-fields"), exports);
|
|
24
|
+
__exportStar(require("./macros"), exports);
|
|
25
|
+
__exportStar(require("./ObjectAggregation"), exports);
|
|
26
|
+
__exportStar(require("./PageEditModel"), exports);
|
|
27
|
+
__exportStar(require("./PageEditProperty"), exports);
|
|
28
|
+
__exportStar(require("./RootAggregation"), exports);
|
|
29
|
+
__exportStar(require("./sections"), exports);
|
|
30
|
+
__exportStar(require("./table"), exports);
|
|
31
|
+
__exportStar(require("./types"), exports);
|
|
32
|
+
__exportStar(require("./utils"), exports);
|
|
33
|
+
__exportStar(require("./views"), exports);
|
|
34
|
+
__exportStar(require("./visual-filters"), exports);
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { JSONSchema4 } from 'json-schema';
|
|
2
|
+
import { ObjectAggregation } from '../ObjectAggregation';
|
|
3
|
+
import type { PageEditAggregationData } from '../ObjectAggregation';
|
|
4
|
+
import type { CreationFormOptions, PageAnnotations } from '../types';
|
|
5
|
+
/**
|
|
6
|
+
* Represents an aggregation for macros objects.
|
|
7
|
+
*/
|
|
8
|
+
export declare class MacrosRootAggregation extends ObjectAggregation {
|
|
9
|
+
filePath?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Creates an instance of `MacrosRootAggregation`.
|
|
12
|
+
*
|
|
13
|
+
* @param data Optional aggregation data object used to initialize properties.
|
|
14
|
+
* @param schema Optional JSON schema fragment associated with this aggregation.
|
|
15
|
+
*/
|
|
16
|
+
constructor(data?: PageEditAggregationData, schema?: JSONSchema4);
|
|
17
|
+
/**
|
|
18
|
+
* Method returns forms(internal/build-in and external/guided-help) based on supported features.
|
|
19
|
+
*
|
|
20
|
+
* @returns Forms(internal/build-in and external/guided-help) based on supported features.
|
|
21
|
+
*/
|
|
22
|
+
private getCreationForms;
|
|
23
|
+
/**
|
|
24
|
+
* Public method returns display name of aggregation.
|
|
25
|
+
*
|
|
26
|
+
* @returns Display name of building blocks node.
|
|
27
|
+
*/
|
|
28
|
+
getDisplayName(): string;
|
|
29
|
+
/**
|
|
30
|
+
* Method provides creation options for macros elements.
|
|
31
|
+
*
|
|
32
|
+
* @returns Creation forms for macros node.
|
|
33
|
+
*/
|
|
34
|
+
protected getNativeNodeCreationForms(): CreationFormOptions[];
|
|
35
|
+
/**
|
|
36
|
+
* Method stores passed file path as source of macros node.
|
|
37
|
+
*
|
|
38
|
+
* @param filePath File path to set.
|
|
39
|
+
*/
|
|
40
|
+
setFilePath(filePath: string): void;
|
|
41
|
+
/**
|
|
42
|
+
* Refreshes internal data based on annotation node data.
|
|
43
|
+
*
|
|
44
|
+
* @param annotations Annotation node data
|
|
45
|
+
*/
|
|
46
|
+
updateAnnotationData(annotations: PageAnnotations | undefined): void;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=MacrosRoot.d.ts.map
|
|
@@ -0,0 +1,114 @@
|
|
|
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.MacrosRootAggregation = void 0;
|
|
7
|
+
const i18next_1 = __importDefault(require("i18next"));
|
|
8
|
+
const path_1 = require("path");
|
|
9
|
+
const ObjectAggregation_1 = require("../ObjectAggregation");
|
|
10
|
+
const types_1 = require("../types");
|
|
11
|
+
const project_access_1 = require("@sap-ux/project-access");
|
|
12
|
+
/**
|
|
13
|
+
* Represents an aggregation for macros objects.
|
|
14
|
+
*/
|
|
15
|
+
class MacrosRootAggregation extends ObjectAggregation_1.ObjectAggregation {
|
|
16
|
+
filePath;
|
|
17
|
+
/**
|
|
18
|
+
* Creates an instance of `MacrosRootAggregation`.
|
|
19
|
+
*
|
|
20
|
+
* @param data Optional aggregation data object used to initialize properties.
|
|
21
|
+
* @param schema Optional JSON schema fragment associated with this aggregation.
|
|
22
|
+
*/
|
|
23
|
+
constructor(data, schema) {
|
|
24
|
+
super(data, schema);
|
|
25
|
+
this.path = ['macros'];
|
|
26
|
+
this.isViewNode = true;
|
|
27
|
+
this.virtual = true;
|
|
28
|
+
this.allowedAnnotationCreationForms = [];
|
|
29
|
+
// Creatin forms
|
|
30
|
+
const forms = this.getCreationForms();
|
|
31
|
+
this.annotationCreationForms = forms.internal;
|
|
32
|
+
this.schemaCreationForms = forms.external;
|
|
33
|
+
const filePath = this.schema?.metadata?.filePath;
|
|
34
|
+
if (filePath) {
|
|
35
|
+
this.setFilePath(filePath);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Method returns forms(internal/build-in and external/guided-help) based on supported features.
|
|
40
|
+
*
|
|
41
|
+
* @returns Forms(internal/build-in and external/guided-help) based on supported features.
|
|
42
|
+
*/
|
|
43
|
+
getCreationForms() {
|
|
44
|
+
const forms = {
|
|
45
|
+
internal: [
|
|
46
|
+
{
|
|
47
|
+
name: types_1.AggregationCreationForm.MacrosChart,
|
|
48
|
+
kind: types_1.ANNOTATION_CREATION_FORM,
|
|
49
|
+
disabled: false,
|
|
50
|
+
title: 'ADD_BUILDING_BLOCK_CHART'
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: types_1.AggregationCreationForm.MacrosFilterBar,
|
|
54
|
+
kind: types_1.ANNOTATION_CREATION_FORM,
|
|
55
|
+
disabled: false,
|
|
56
|
+
title: 'ADD_BUILDING_BLOCK_FILTERBAR'
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: types_1.AggregationCreationForm.MacrosTable,
|
|
60
|
+
kind: types_1.ANNOTATION_CREATION_FORM,
|
|
61
|
+
disabled: false,
|
|
62
|
+
title: 'ADD_BUILDING_BLOCK_TABLE'
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
external: []
|
|
66
|
+
};
|
|
67
|
+
return forms;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Public method returns display name of aggregation.
|
|
71
|
+
*
|
|
72
|
+
* @returns Display name of building blocks node.
|
|
73
|
+
*/
|
|
74
|
+
getDisplayName() {
|
|
75
|
+
return i18next_1.default.t('PAGE_EDITOR_OUTLINE_NODE_BUILDING_BLOCK');
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Method provides creation options for macros elements.
|
|
79
|
+
*
|
|
80
|
+
* @returns Creation forms for macros node.
|
|
81
|
+
*/
|
|
82
|
+
getNativeNodeCreationForms() {
|
|
83
|
+
return this.annotationNodeId ? this.annotationCreationForms : [];
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Method stores passed file path as source of macros node.
|
|
87
|
+
*
|
|
88
|
+
* @param filePath File path to set.
|
|
89
|
+
*/
|
|
90
|
+
setFilePath(filePath) {
|
|
91
|
+
this.filePath = (0, path_1.join)(project_access_1.DirName.Webapp, filePath);
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Refreshes internal data based on annotation node data.
|
|
95
|
+
*
|
|
96
|
+
* @param annotations Annotation node data
|
|
97
|
+
*/
|
|
98
|
+
updateAnnotationData(annotations) {
|
|
99
|
+
super.updateAnnotationData(annotations);
|
|
100
|
+
// Check annotation creations forms
|
|
101
|
+
if (annotations?.dialogsContext?.analyticalChartSupport !== undefined) {
|
|
102
|
+
const form = this.annotationCreationForms.find((form) => form.name === types_1.AggregationCreationForm.MacrosChart);
|
|
103
|
+
if (form) {
|
|
104
|
+
form.disabled = !annotations.dialogsContext.analyticalChartSupport.creationEnabled;
|
|
105
|
+
if (form.disabled) {
|
|
106
|
+
// Add tooltip with disable reason
|
|
107
|
+
form.tooltip = annotations.dialogsContext.analyticalChartSupport.creationTooltip;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
exports.MacrosRootAggregation = MacrosRootAggregation;
|
|
114
|
+
//# sourceMappingURL=MacrosRoot.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("./MacrosRoot"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { JSONSchema4 } from 'json-schema';
|
|
2
|
+
import { SectionsObjectAggregation } from './SectionsObjectAggregation';
|
|
3
|
+
import type { PageEditAggregationData } from '../ObjectAggregation';
|
|
4
|
+
import type { PageData, PageAnnotations, PropertyPath } from '../types';
|
|
5
|
+
import { AggregationCreationForm } from '../types';
|
|
6
|
+
import type { PageConfig, PageType } from '@sap/ux-specification/dist/types/src';
|
|
7
|
+
/**
|
|
8
|
+
* Represents an aggregation for header sections objects.
|
|
9
|
+
*/
|
|
10
|
+
export declare class HeaderSectionsAggregation extends SectionsObjectAggregation {
|
|
11
|
+
allowedAnnotationCreationForms?: AggregationCreationForm[];
|
|
12
|
+
/**
|
|
13
|
+
* Creates an instance of `HeaderSectionsAggregation`.
|
|
14
|
+
*
|
|
15
|
+
* @param data Optional aggregation data object used to initialize properties.
|
|
16
|
+
* @param schema Optional JSON schema fragment associated with this aggregation.
|
|
17
|
+
*/
|
|
18
|
+
constructor(data?: PageEditAggregationData, schema?: JSONSchema4);
|
|
19
|
+
/**
|
|
20
|
+
* Overwritten method for data update of object page header sections
|
|
21
|
+
* Method receives current values for sections - loops custom sections array and appends existing/standard aggregations with custom section aggregations.
|
|
22
|
+
*
|
|
23
|
+
* @param data Data which should be used for value population.
|
|
24
|
+
* @param page Page config data.
|
|
25
|
+
* @param pageType Page type.
|
|
26
|
+
* @param path Aggregation path.
|
|
27
|
+
* @param annotations Page annotations.
|
|
28
|
+
*/
|
|
29
|
+
updatePropertiesValues(data: PageData, page: PageConfig, pageType: PageType, path: PropertyPath, annotations?: PageAnnotations): void;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=HeaderSectionsAggregation.d.ts.map
|
|
@@ -0,0 +1,82 @@
|
|
|
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.HeaderSectionsAggregation = void 0;
|
|
7
|
+
const i18next_1 = __importDefault(require("i18next"));
|
|
8
|
+
const SectionsObjectAggregation_1 = require("./SectionsObjectAggregation");
|
|
9
|
+
const types_1 = require("../types");
|
|
10
|
+
/**
|
|
11
|
+
* Represents an aggregation for header sections objects.
|
|
12
|
+
*/
|
|
13
|
+
class HeaderSectionsAggregation extends SectionsObjectAggregation_1.SectionsObjectAggregation {
|
|
14
|
+
allowedAnnotationCreationForms = [
|
|
15
|
+
types_1.AggregationCreationForm.NativeSection,
|
|
16
|
+
types_1.AggregationCreationForm.DataPointSection,
|
|
17
|
+
types_1.AggregationCreationForm.ProgressSection,
|
|
18
|
+
types_1.AggregationCreationForm.RatingSection,
|
|
19
|
+
types_1.AggregationCreationForm.ChartSection
|
|
20
|
+
];
|
|
21
|
+
/**
|
|
22
|
+
* Creates an instance of `HeaderSectionsAggregation`.
|
|
23
|
+
*
|
|
24
|
+
* @param data Optional aggregation data object used to initialize properties.
|
|
25
|
+
* @param schema Optional JSON schema fragment associated with this aggregation.
|
|
26
|
+
*/
|
|
27
|
+
constructor(data, schema) {
|
|
28
|
+
super(data, schema);
|
|
29
|
+
const additionalProperties = schema?.additionalProperties;
|
|
30
|
+
if (typeof additionalProperties === 'object' && additionalProperties.$ref) {
|
|
31
|
+
this.schemaCreationForms = [
|
|
32
|
+
{
|
|
33
|
+
name: types_1.AggregationCreationForm.CustomHeaderSection,
|
|
34
|
+
kind: types_1.SCHEMA_CREATION_FORM,
|
|
35
|
+
title: 'PAGE_EDITOR_OUTLINE_ADD_CUSTOM_SECTIONS_TITLE',
|
|
36
|
+
disabled: false
|
|
37
|
+
}
|
|
38
|
+
];
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Overwritten method for data update of object page header sections
|
|
43
|
+
* Method receives current values for sections - loops custom sections array and appends existing/standard aggregations with custom section aggregations.
|
|
44
|
+
*
|
|
45
|
+
* @param data Data which should be used for value population.
|
|
46
|
+
* @param page Page config data.
|
|
47
|
+
* @param pageType Page type.
|
|
48
|
+
* @param path Aggregation path.
|
|
49
|
+
* @param annotations Page annotations.
|
|
50
|
+
*/
|
|
51
|
+
updatePropertiesValues(data, page, pageType, path, annotations) {
|
|
52
|
+
super.updatePropertiesValues(data, page, pageType, path, annotations);
|
|
53
|
+
this.formSchema = this.additionalProperties?.aggregations?.['sections'];
|
|
54
|
+
const sections = data || {};
|
|
55
|
+
for (const id in sections) {
|
|
56
|
+
const section = this.aggregations[id];
|
|
57
|
+
if (section?.schema && !section.schema.annotationPath) {
|
|
58
|
+
const templateEdit = section.properties['templateEdit']?.value;
|
|
59
|
+
const template = section.properties['fragmentName']?.value;
|
|
60
|
+
let goToCodeAction;
|
|
61
|
+
if (typeof template === 'string' && typeof templateEdit === 'string') {
|
|
62
|
+
goToCodeAction = {
|
|
63
|
+
type: types_1.AggregationActions.OpenSource,
|
|
64
|
+
subActions: [
|
|
65
|
+
{
|
|
66
|
+
id: template,
|
|
67
|
+
text: i18next_1.default.t('CUSTOM_HEADER_SECTION_TEMPLATE')
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
id: templateEdit,
|
|
71
|
+
text: i18next_1.default.t('CUSTOM_HEADER_SECTION_TEMPLATE_EDIT')
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
section.markAsCustomSection(undefined, undefined, goToCodeAction);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
exports.HeaderSectionsAggregation = HeaderSectionsAggregation;
|
|
82
|
+
//# sourceMappingURL=HeaderSectionsAggregation.js.map
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { PageEditAggregationData } from '../ObjectAggregation';
|
|
2
|
+
import { ObjectAggregation } from '../ObjectAggregation';
|
|
3
|
+
import type { v2 } from '@sap/ux-specification/dist/types/src';
|
|
4
|
+
import type { JSONSchema4 } from 'json-schema';
|
|
5
|
+
import type { SupportedAggregationAction, SupportedAggregationActions } from '../types';
|
|
6
|
+
/**
|
|
7
|
+
* Represents an aggregation for section objects.
|
|
8
|
+
*/
|
|
9
|
+
export declare class SectionAggregation extends ObjectAggregation {
|
|
10
|
+
actions: SupportedAggregationActions;
|
|
11
|
+
private title?;
|
|
12
|
+
id?: string;
|
|
13
|
+
position?: string;
|
|
14
|
+
data?: v2.ObjectPageCustomSectionBase;
|
|
15
|
+
useDescriptionAsId?: boolean;
|
|
16
|
+
isViewNode: boolean;
|
|
17
|
+
sortableCollection: string | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Creates an instance of `SectionAggregation`.
|
|
20
|
+
*
|
|
21
|
+
* @param data Optional aggregation data object used to initialize properties.
|
|
22
|
+
* @param schema Optional JSON schema fragment associated with this aggregation.
|
|
23
|
+
*/
|
|
24
|
+
constructor(data?: PageEditAggregationData, schema?: JSONSchema4);
|
|
25
|
+
/**
|
|
26
|
+
* Setter for title.
|
|
27
|
+
*
|
|
28
|
+
* @param title Title.
|
|
29
|
+
*/
|
|
30
|
+
setTitle(title: string): void;
|
|
31
|
+
/**
|
|
32
|
+
* Setter for id.
|
|
33
|
+
*
|
|
34
|
+
* @param id Title.
|
|
35
|
+
*/
|
|
36
|
+
setId(id: string): void;
|
|
37
|
+
/**
|
|
38
|
+
* Method returns display name of aggregation without applying i18n translation.
|
|
39
|
+
* Overwritten for section handling.
|
|
40
|
+
*
|
|
41
|
+
* @returns Display name of aggregation.
|
|
42
|
+
*/
|
|
43
|
+
protected getRawDisplayName(): string;
|
|
44
|
+
/**
|
|
45
|
+
* Public method to read/determine section id.
|
|
46
|
+
*
|
|
47
|
+
* @param fallback Resolve id with V4 fallback solution by reading label/description.
|
|
48
|
+
* @returns Section id.
|
|
49
|
+
*/
|
|
50
|
+
getSectionId(fallback?: boolean): string | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* Public method to mark section as replaced with other section.
|
|
53
|
+
*
|
|
54
|
+
* @param replacedWith Section replaced with.
|
|
55
|
+
*/
|
|
56
|
+
markAsReplaced(replacedWith: string): void;
|
|
57
|
+
/**
|
|
58
|
+
* Public method to mark section as custom section.
|
|
59
|
+
*
|
|
60
|
+
* @param data Configuration of section(segment of page config).
|
|
61
|
+
* @param i18nKey I18n custom key.
|
|
62
|
+
* @param goCodeAction Go to code action.
|
|
63
|
+
*/
|
|
64
|
+
markAsCustomSection(data?: v2.ObjectPageCustomSectionBase, i18nKey?: string, goCodeAction?: SupportedAggregationAction): void;
|
|
65
|
+
/**
|
|
66
|
+
* Method parses object path key and returns field name / technical id.
|
|
67
|
+
*
|
|
68
|
+
* @returns Section id.
|
|
69
|
+
*/
|
|
70
|
+
getTechnicalName(): string | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* Protected method which returns name with additional formatting by removing 'SAP_ANNOTATION_NAMESPACE' from full name/id.
|
|
73
|
+
*
|
|
74
|
+
* @returns Name of aggregation.
|
|
75
|
+
*/
|
|
76
|
+
protected getFormattedName(): string | undefined;
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=SectionAggregation.d.ts.map
|