@sap/ux-specification 1.96.26 → 1.96.28
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/dist/documentation/v2/v2-AnalyticalListPage.html +1 -1
- package/dist/documentation/v2/v2-ApplicationV2.html +1 -1
- package/dist/documentation/v2/v2-ListReport.html +1 -1
- package/dist/documentation/v2/v2-ObjectPage.html +1 -1
- package/dist/documentation/v2/v2-OverviewPage.html +1 -1
- package/dist/documentation/v4/v4-ApplicationV4.html +1 -1
- package/dist/documentation/v4/v4-BuildingBlocks.html +60 -0
- package/dist/documentation/v4/v4-FreestylePage.html +1 -1
- package/dist/documentation/v4/v4-ListReport.html +1 -1
- package/dist/documentation/v4/v4-ObjectPage.html +1 -1
- package/dist/index-min.js +262 -48
- package/dist/index-min.js.map +3 -3
- package/dist/package.json +111 -0
- package/dist/schemas/v2/ObjectPageConfig.json +4 -4
- package/dist/schemas/v4/BuildingBlocksConfig.json +750 -0
- package/dist/schemas/v4/ListReportConfig.json +38 -15
- package/dist/schemas/v4/ObjectPageConfig.json +309 -59
- package/dist/scripts/macros/api.d.ts +9 -0
- package/dist/scripts/macros/api.d.ts.map +1 -0
- package/dist/scripts/macros/api.js +161 -0
- package/dist/scripts/macros/api.js.map +1 -0
- package/dist/scripts/macros/cmd.d.ts +7 -0
- package/dist/scripts/macros/cmd.d.ts.map +1 -0
- package/dist/scripts/macros/cmd.js +49 -0
- package/dist/scripts/macros/cmd.js.map +1 -0
- package/dist/scripts/macros/corrections.d.ts +18 -0
- package/dist/scripts/macros/corrections.d.ts.map +1 -0
- package/dist/scripts/macros/corrections.js +188 -0
- package/dist/scripts/macros/corrections.js.map +1 -0
- package/dist/scripts/macros/index.d.ts +2 -0
- package/dist/scripts/macros/index.d.ts.map +1 -0
- package/dist/scripts/macros/index.js +8 -0
- package/dist/scripts/macros/index.js.map +1 -0
- package/dist/scripts/macros/schema.d.ts +9 -0
- package/dist/scripts/macros/schema.d.ts.map +1 -0
- package/dist/scripts/macros/schema.js +201 -0
- package/dist/scripts/macros/schema.js.map +1 -0
- package/dist/scripts/macros/types.d.ts +77 -0
- package/dist/scripts/macros/types.d.ts.map +1 -0
- package/dist/scripts/macros/types.js +14 -0
- package/dist/scripts/macros/types.js.map +1 -0
- package/dist/src/api.d.ts.map +1 -1
- package/dist/src/api.js +9 -2
- package/dist/src/api.js.map +1 -1
- package/dist/src/project.d.ts +1 -0
- package/dist/src/project.d.ts.map +1 -1
- package/dist/src/project.js +6 -4
- package/dist/src/project.js.map +1 -1
- package/dist/src/specification/schemaAccess.d.ts.map +1 -1
- package/dist/src/specification/schemaAccess.js +16 -3
- package/dist/src/specification/schemaAccess.js.map +1 -1
- package/dist/src/sync/common/appProvider.d.ts +12 -0
- package/dist/src/sync/common/appProvider.d.ts.map +1 -1
- package/dist/src/sync/common/appProvider.js +51 -18
- package/dist/src/sync/common/appProvider.js.map +1 -1
- package/dist/src/sync/common/generate/objectPage.d.ts +10 -6
- package/dist/src/sync/common/generate/objectPage.d.ts.map +1 -1
- package/dist/src/sync/common/generate/objectPage.js +224 -115
- package/dist/src/sync/common/generate/objectPage.js.map +1 -1
- package/dist/src/sync/common/generate/utils.d.ts +8 -8
- package/dist/src/sync/common/generate/utils.d.ts.map +1 -1
- package/dist/src/sync/common/generate/utils.js +40 -38
- package/dist/src/sync/common/generate/utils.js.map +1 -1
- package/dist/src/sync/common/i18n.json +2 -1
- package/dist/src/sync/common/importProject.d.ts.map +1 -1
- package/dist/src/sync/common/importProject.js +67 -31
- package/dist/src/sync/common/importProject.js.map +1 -1
- package/dist/src/sync/common/types.d.ts +6 -0
- package/dist/src/sync/common/types.d.ts.map +1 -0
- package/dist/src/sync/common/types.js +3 -0
- package/dist/src/sync/common/types.js.map +1 -0
- package/dist/src/sync/common/utils.d.ts +26 -5
- package/dist/src/sync/common/utils.d.ts.map +1 -1
- package/dist/src/sync/common/utils.js +72 -18
- package/dist/src/sync/common/utils.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageHeader.d.ts +2 -2
- package/dist/src/sync/v2/export/controls/ObjectPageHeader.d.ts.map +1 -1
- package/dist/src/sync/v2/generate/analyticalListReport.d.ts.map +1 -1
- package/dist/src/sync/v2/generate/analyticalListReport.js +1 -0
- package/dist/src/sync/v2/generate/analyticalListReport.js.map +1 -1
- package/dist/src/sync/v2/generate/listReport.d.ts.map +1 -1
- package/dist/src/sync/v2/generate/listReport.js +1 -0
- package/dist/src/sync/v2/generate/listReport.js.map +1 -1
- package/dist/src/sync/v2/generate/objectPage.d.ts.map +1 -1
- package/dist/src/sync/v2/generate/objectPage.js +75 -40
- package/dist/src/sync/v2/generate/objectPage.js.map +1 -1
- package/dist/src/sync/v2/generate/utils.d.ts +1 -1
- package/dist/src/sync/v2/generate/utils.d.ts.map +1 -1
- package/dist/src/sync/v2/generate/utils.js +22 -19
- package/dist/src/sync/v2/generate/utils.js.map +1 -1
- package/dist/src/sync/v4/application.d.ts +3 -0
- package/dist/src/sync/v4/application.d.ts.map +1 -1
- package/dist/src/sync/v4/application.js +13 -1
- package/dist/src/sync/v4/application.js.map +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageFooter.d.ts +9 -0
- package/dist/src/sync/v4/export/controls/ObjectPageFooter.d.ts.map +1 -0
- package/dist/src/sync/v4/export/controls/ObjectPageFooter.js +10 -0
- package/dist/src/sync/v4/export/controls/ObjectPageFooter.js.map +1 -0
- package/dist/src/sync/v4/export/controls/ObjectPageFooterAction.d.ts +23 -0
- package/dist/src/sync/v4/export/controls/ObjectPageFooterAction.d.ts.map +1 -0
- package/dist/src/sync/v4/export/controls/ObjectPageFooterAction.js +124 -0
- package/dist/src/sync/v4/export/controls/ObjectPageFooterAction.js.map +1 -0
- package/dist/src/sync/v4/export/controls/ObjectPageForm.d.ts +10 -3
- package/dist/src/sync/v4/export/controls/ObjectPageForm.d.ts.map +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageForm.js +39 -1
- package/dist/src/sync/v4/export/controls/ObjectPageForm.js.map +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageFormAction.d.ts +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageFormAction.js +8 -8
- package/dist/src/sync/v4/export/controls/ObjectPageHeader.d.ts +5 -0
- package/dist/src/sync/v4/export/controls/ObjectPageHeader.d.ts.map +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageHeader.js +4 -1
- package/dist/src/sync/v4/export/controls/ObjectPageHeader.js.map +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageHeaderAction.d.ts +23 -0
- package/dist/src/sync/v4/export/controls/ObjectPageHeaderAction.d.ts.map +1 -0
- package/dist/src/sync/v4/export/controls/ObjectPageHeaderAction.js +124 -0
- package/dist/src/sync/v4/export/controls/ObjectPageHeaderAction.js.map +1 -0
- package/dist/src/sync/v4/export/controls/ObjectPageTableColumn.d.ts +1 -2
- package/dist/src/sync/v4/export/controls/ObjectPageTableColumn.d.ts.map +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageTableColumn.js +0 -10
- package/dist/src/sync/v4/export/controls/ObjectPageTableColumn.js.map +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageToolBarAction.d.ts +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageToolBarAction.d.ts.map +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageToolBarAction.js +9 -9
- package/dist/src/sync/v4/export/controls/ObjectPageToolBarAction.js.map +1 -1
- package/dist/src/sync/v4/export/controls/Table.js +1 -1
- package/dist/src/sync/v4/export/controls/Table.js.map +1 -1
- package/dist/src/sync/v4/export/controls/ToolBar.d.ts +2 -2
- package/dist/src/sync/v4/export/controls/ToolBar.d.ts.map +1 -1
- package/dist/src/sync/v4/export/controls/ToolBarAction.d.ts +6 -1
- package/dist/src/sync/v4/export/controls/ToolBarAction.d.ts.map +1 -1
- package/dist/src/sync/v4/export/controls/ToolBarAction.js +33 -9
- package/dist/src/sync/v4/export/controls/ToolBarAction.js.map +1 -1
- package/dist/src/sync/v4/export/controls/index.d.ts +4 -0
- package/dist/src/sync/v4/export/controls/index.d.ts.map +1 -1
- package/dist/src/sync/v4/export/controls/index.js +4 -0
- package/dist/src/sync/v4/export/controls/index.js.map +1 -1
- package/dist/src/sync/v4/export/export.d.ts +1 -0
- package/dist/src/sync/v4/export/export.d.ts.map +1 -1
- package/dist/src/sync/v4/export/export.js +11 -6
- package/dist/src/sync/v4/export/export.js.map +1 -1
- package/dist/src/sync/v4/export/fpmCustomPage.d.ts +11 -0
- package/dist/src/sync/v4/export/fpmCustomPage.d.ts.map +1 -0
- package/dist/src/sync/v4/export/fpmCustomPage.js +131 -0
- package/dist/src/sync/v4/export/fpmCustomPage.js.map +1 -0
- package/dist/src/sync/v4/export/manifest.js +1 -1
- package/dist/src/sync/v4/export/manifest.js.map +1 -1
- package/dist/src/sync/v4/export/pages/ObjectPage.d.ts +1 -0
- package/dist/src/sync/v4/export/pages/ObjectPage.d.ts.map +1 -1
- package/dist/src/sync/v4/export/pages/ObjectPage.js.map +1 -1
- package/dist/src/sync/v4/generate/fpmCustomPage.d.ts +10 -0
- package/dist/src/sync/v4/generate/fpmCustomPage.d.ts.map +1 -0
- package/dist/src/sync/v4/generate/fpmCustomPage.js +266 -0
- package/dist/src/sync/v4/generate/fpmCustomPage.js.map +1 -0
- package/dist/src/sync/v4/generate/generate.d.ts +13 -1
- package/dist/src/sync/v4/generate/generate.d.ts.map +1 -1
- package/dist/src/sync/v4/generate/generate.js +22 -1
- package/dist/src/sync/v4/generate/generate.js.map +1 -1
- package/dist/src/sync/v4/generate/index.d.ts +2 -1
- package/dist/src/sync/v4/generate/index.d.ts.map +1 -1
- package/dist/src/sync/v4/generate/index.js +4 -1
- package/dist/src/sync/v4/generate/index.js.map +1 -1
- package/dist/src/sync/v4/generate/listReport.d.ts.map +1 -1
- package/dist/src/sync/v4/generate/listReport.js +26 -10
- package/dist/src/sync/v4/generate/listReport.js.map +1 -1
- package/dist/src/sync/v4/generate/objectPage.d.ts.map +1 -1
- package/dist/src/sync/v4/generate/objectPage.js +112 -34
- package/dist/src/sync/v4/generate/objectPage.js.map +1 -1
- package/dist/src/sync/v4/import/app/appProvider.d.ts +2 -1
- package/dist/src/sync/v4/import/app/appProvider.d.ts.map +1 -1
- package/dist/src/sync/v4/import/app/appProvider.js +2 -2
- package/dist/src/sync/v4/import/app/appProvider.js.map +1 -1
- package/dist/src/sync/v4/import/app/baseAppProvider.d.ts +7 -2
- package/dist/src/sync/v4/import/app/baseAppProvider.d.ts.map +1 -1
- package/dist/src/sync/v4/import/app/baseAppProvider.js +27 -7
- package/dist/src/sync/v4/import/app/baseAppProvider.js.map +1 -1
- package/dist/src/sync/v4/import/app/freestyleProvider.d.ts +2 -1
- package/dist/src/sync/v4/import/app/freestyleProvider.d.ts.map +1 -1
- package/dist/src/sync/v4/import/app/freestyleProvider.js +2 -2
- package/dist/src/sync/v4/import/app/freestyleProvider.js.map +1 -1
- package/dist/src/sync/v4/import/index.d.ts +1 -0
- package/dist/src/sync/v4/import/index.d.ts.map +1 -1
- package/dist/src/sync/v4/import/index.js +1 -0
- package/dist/src/sync/v4/import/index.js.map +1 -1
- package/dist/src/sync/v4/import/pages/fpmCustomPage.d.ts +9 -0
- package/dist/src/sync/v4/import/pages/fpmCustomPage.d.ts.map +1 -0
- package/dist/src/sync/v4/import/pages/fpmCustomPage.js +102 -0
- package/dist/src/sync/v4/import/pages/fpmCustomPage.js.map +1 -0
- package/dist/src/sync/v4/import/pages/objectPage.d.ts +2 -1
- package/dist/src/sync/v4/import/pages/objectPage.d.ts.map +1 -1
- package/dist/src/sync/v4/import/pages/objectPage.js +84 -43
- package/dist/src/sync/v4/import/pages/objectPage.js.map +1 -1
- package/dist/src/sync/v4/utils/macros.d.ts +29 -0
- package/dist/src/sync/v4/utils/macros.d.ts.map +1 -0
- package/dist/src/sync/v4/utils/macros.js +113 -0
- package/dist/src/sync/v4/utils/macros.js.map +1 -0
- package/dist/src/sync/v4/utils/utils.d.ts +11 -1
- package/dist/src/sync/v4/utils/utils.d.ts.map +1 -1
- package/dist/src/sync/v4/utils/utils.js +95 -8
- package/dist/src/sync/v4/utils/utils.js.map +1 -1
- package/package.json +16 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appProvider.js","sourceRoot":"","sources":["../../../../src/sync/common/appProvider.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"appProvider.js","sourceRoot":"","sources":["../../../../src/sync/common/appProvider.ts"],"names":[],"mappings":";;;AAWA,wEAQqC;AACrC,mCAA4C;AAE5C;;;;GAIG;AACH,SAAS,iBAAiB,CAAC,IAAuB;IAC9C,MAAM,UAAU,GAAI,IAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IAC3D,OAAO,UAAU,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAC7C,CAAC;AAED;;;;;GAKG;AACH,SAAS,WAAW,CAAC,IAAuB,EAAE,GAAgB;IAC1D,MAAM,QAAQ,GAAI,IAAgB,EAAE,IAAI,EAAE,QAAQ,IAAK,GAAG,CAAC,QAA2B,EAAE,QAAQ,CAAC;IACjG,OAAO,QAAQ,IAAI,kCAAS,CAAC,GAAG,CAAC;AACrC,CAAC;AAED;;;;;GAKG;AACH,SAAS,oBAAoB,CAAC,IAAuB,EAAE,GAAgB;IACnE,OAAO,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;AAChD,CAAC;AAED;;;;;;GAMG;AACH,SAAS,WAAW,CAChB,IAAuB,EACvB,GAAgB,EAChB,QAAkB;IAElB,MAAM,aAAa,GAAG,CAAC,SAAiB,EAAY,EAAE;QAClD,OAAO,SAAS,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IACxD,CAAC,CAAC;IACF,MAAM,WAAW,GAA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AAU,CAAC,IAAI,CAAC;aACpC;iBAAM;gBACH,MAAM,iBAAiB,GAAG,yBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBAC3D,MAAM,CAAC,OAAO,GAAG,iBAAiB,CAAC,IAAI,CAAC;aAC3C;SACJ;QACD,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,QAAQ,KAAK,mCAAU,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,QAAQ,KAAK,mCAAU,CAAC,aAAa,EAAE;YACnG,IAAI,CAAC,uBAAuB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;SAC9C;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;IAED;;;;OAIG;IACK,uBAAuB,CAAC,IAAa,EAAE,MAAwB;QACnE,MAAM,SAAS,GAAG,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QACpD,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC;IACjC,CAAC;CACJ;AAlGD,kCAkGC"}
|
|
@@ -5,13 +5,14 @@ import type { Definition } from 'typescript-json-schema';
|
|
|
5
5
|
/**
|
|
6
6
|
* Adds definitions for forms in object page sections to the app schema
|
|
7
7
|
* @param {SectionType} sectionType - prefix to distinguish Section and HeaderSection
|
|
8
|
-
* @param {FacetConfig} section -
|
|
8
|
+
* @param {FacetConfig} section - section definition, as prepared from the annotations
|
|
9
9
|
* @param {object} appSchemaSection - current definition of facet or section in the JSON schema
|
|
10
10
|
* @param {object} appSchema - app specific schema that gets enhanced
|
|
11
11
|
* @param {FioriElementsVersion} version - Fiori Elements version
|
|
12
|
+
* @param {string} facetKey - facet key
|
|
12
13
|
* @returns {string | undefined} target id of form
|
|
13
14
|
*/
|
|
14
|
-
export declare function handleForm(sectionType: SectionType, section: FacetConfig, appSchemaSection: Definition, appSchema: Definition, version: FioriElementsVersion,
|
|
15
|
+
export declare function handleForm(sectionType: SectionType, section: FacetConfig, appSchemaSection: Definition, appSchema: Definition, version: FioriElementsVersion, facetKey: string): string | undefined;
|
|
15
16
|
/**
|
|
16
17
|
* Replaces an alias in an annotation ID or reference, based on the AVT references' list
|
|
17
18
|
* @param annotationIdentifier - annotation ID or reference
|
|
@@ -25,23 +26,26 @@ export declare function replaceAlias(annotationIdentifier: string, oDataServiceA
|
|
|
25
26
|
* @param entityType - entity type by AVT
|
|
26
27
|
* @returns an object comprising action name and action id
|
|
27
28
|
*/
|
|
28
|
-
export declare function getActionNameAndId(
|
|
29
|
+
export declare function getActionNameAndId(item: any, entityType: EntityType, oDataServiceAVT: ConvertedMetadata): {
|
|
29
30
|
actionName: string;
|
|
30
31
|
actionId: string;
|
|
32
|
+
namespace: string;
|
|
31
33
|
};
|
|
32
34
|
/**
|
|
33
35
|
* Add Object Page Footer Action Buttons to app-specific schema
|
|
34
36
|
*
|
|
35
37
|
* @param {object} appSchema Schema of the app
|
|
36
|
-
* @param {
|
|
37
|
-
* @param {
|
|
38
|
+
* @param {GenerateAppSchemaParameters} generateParameters - Schema parameters
|
|
39
|
+
* @param {FioriElementsVersion} version - Fiori elements versions
|
|
40
|
+
* @param {function} addFooterActionCallBack - Callback function, either V2 or V4
|
|
38
41
|
*/
|
|
39
|
-
export declare function addFooterActions(appSchema: Definition, generateParameters: GenerateAppSchemaParameters): void;
|
|
42
|
+
export declare function addFooterActions(appSchema: Definition, generateParameters: GenerateAppSchemaParameters, version: FioriElementsVersion, addFooterActionCallBack: any): void;
|
|
40
43
|
/**
|
|
41
44
|
* Add Object Page Header Action Buttons to app-specific schema
|
|
42
45
|
* @param {object} appSchema Schema of the app
|
|
43
46
|
* @param {EntityType} entityType - current entity type
|
|
44
47
|
* @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
|
|
48
|
+
* @param {function} addHeaderActionCallBack - Callback function, either V2 or V4
|
|
45
49
|
*/
|
|
46
50
|
export declare function addHeaderActions(appSchema: Definition, entityType: EntityType, oDataServiceAVT: ConvertedMetadata, addHeaderActionCallBack: any): void;
|
|
47
51
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objectPage.d.ts","sourceRoot":"","sources":["../../../../../src/sync/common/generate/objectPage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAI3F,OAAO,KAAK,EAAE,WAAW,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"objectPage.d.ts","sourceRoot":"","sources":["../../../../../src/sync/common/generate/objectPage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAI3F,OAAO,KAAK,EAAE,WAAW,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAE5F,OAAO,EAGH,oBAAoB,EAGpB,WAAW,EAEd,MAAM,6BAA6B,CAAC;AASrC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAmTzD;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CACtB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,WAAW,EACpB,gBAAgB,EAAE,UAAU,EAC5B,SAAS,EAAE,UAAU,EACrB,OAAO,EAAE,oBAAoB,EAC7B,QAAQ,EAAE,MAAM,GACjB,MAAM,GAAG,SAAS,CAwDpB;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,oBAAoB,EAAE,MAAM,EAAE,eAAe,EAAE,iBAAiB,GAAG,MAAM,CAarG;AAED;;;;;GAKG;AAEH,wBAAgB,kBAAkB,CAC9B,IAAI,EAAE,GAAG,EACT,UAAU,EAAE,UAAU,EACtB,eAAe,EAAE,iBAAiB,GACnC;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CA0B7D;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC5B,SAAS,EAAE,UAAU,EACrB,kBAAkB,EAAE,2BAA2B,EAC/C,OAAO,EAAE,oBAAoB,EAC7B,uBAAuB,KAAA,GACxB,IAAI,CAuCN;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC5B,SAAS,EAAE,UAAU,EACrB,UAAU,EAAE,UAAU,EACtB,eAAe,EAAE,iBAAiB,EAClC,uBAAuB,KAAA,GACxB,IAAI,CAkCN;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,GAAG,IAAI,CAUzF;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,iBAAiB,GAAG,SAAS,GAAG,SAAS,CAMlH"}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.determineEntitySetOfFacet = exports.addCommonHeaderSchema = exports.addHeaderActions = exports.addFooterActions = exports.getActionNameAndId = exports.replaceAlias = exports.handleForm = void 0;
|
|
4
4
|
const StableIdHelper_1 = require("../../v4/utils/StableIdHelper");
|
|
5
5
|
const ux_specification_types_1 = require("@sap/ux-specification-types");
|
|
6
|
+
const ux_specification_types_2 = require("@sap/ux-specification-types");
|
|
6
7
|
const __1 = require("..");
|
|
7
8
|
/**
|
|
8
9
|
* Copies the field properties from the generic definition to the specific field definition
|
|
@@ -12,7 +13,7 @@ const __1 = require("..");
|
|
|
12
13
|
* @param {string} fieldDefinition - the unique ID for the given field definition
|
|
13
14
|
*/
|
|
14
15
|
function copyFieldProperties(version, appSchema, field, fieldDefinition) {
|
|
15
|
-
if (version ===
|
|
16
|
+
if (version === ux_specification_types_2.FioriElementsVersion.v4 && appSchema['definitions']['Field']) {
|
|
16
17
|
switch (field.$Type) {
|
|
17
18
|
case "com.sap.vocabularies.UI.v1.DataField" /* DataField */:
|
|
18
19
|
case "com.sap.vocabularies.UI.v1.DataFieldForAnnotation" /* DataFieldForAnnotation */:
|
|
@@ -24,7 +25,7 @@ function copyFieldProperties(version, appSchema, field, fieldDefinition) {
|
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
|
-
else if (version ===
|
|
28
|
+
else if (version === ux_specification_types_2.FioriElementsVersion.v2 && appSchema['definitions']['Field']) {
|
|
28
29
|
switch (field.$Type) {
|
|
29
30
|
case "com.sap.vocabularies.UI.v1.DataField" /* DataField */:
|
|
30
31
|
case "com.sap.vocabularies.UI.v1.DataFieldForAnnotation" /* DataFieldForAnnotation */:
|
|
@@ -45,16 +46,102 @@ function copyFieldProperties(version, appSchema, field, fieldDefinition) {
|
|
|
45
46
|
* @returns the field definition name in schema
|
|
46
47
|
*/
|
|
47
48
|
function determineFieldDefinitionName(version, fieldReferenceId, targetID, fieldReference) {
|
|
48
|
-
const fieldReferenceType = version ===
|
|
49
|
+
const fieldReferenceType = version === ux_specification_types_2.FioriElementsVersion.v2 && fieldReferenceId && fieldReferenceId.includes('::')
|
|
49
50
|
? fieldReferenceId.split('::')[0].replace('DataField', 'Field')
|
|
50
51
|
: undefined;
|
|
51
|
-
if (version ===
|
|
52
|
+
if (version === ux_specification_types_2.FioriElementsVersion.v2) {
|
|
52
53
|
return `${fieldReferenceType}<${targetID}::${fieldReference}>`;
|
|
53
54
|
}
|
|
54
55
|
else {
|
|
55
56
|
return `${targetID}::${fieldReference}`;
|
|
56
57
|
}
|
|
57
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Add th keys and targt tag for Datafield*
|
|
61
|
+
* @param field - the given field definition
|
|
62
|
+
* @param appSchema - the app schema to be updated
|
|
63
|
+
* @param schemaKeyOfField - key for the given field in the app schema
|
|
64
|
+
*/
|
|
65
|
+
function addKeysTagForDataField(field, appSchema, schemaKeyOfField) {
|
|
66
|
+
if (typeof field.Value !== 'string' && field.Value.type === 'Path') {
|
|
67
|
+
appSchema.definitions[schemaKeyOfField][ux_specification_types_2.SchemaTag.keys] = [
|
|
68
|
+
{
|
|
69
|
+
name: 'Value',
|
|
70
|
+
value: field.Value.path
|
|
71
|
+
}
|
|
72
|
+
];
|
|
73
|
+
appSchema.definitions[schemaKeyOfField][ux_specification_types_2.SchemaTag.target] = field.Value.$target
|
|
74
|
+
? field.Value.$target.fullyQualifiedName.split('/')[0]
|
|
75
|
+
: field.Value.targetString.split('/')[0];
|
|
76
|
+
}
|
|
77
|
+
else if (typeof field.Value === 'string' && field.Value) {
|
|
78
|
+
appSchema.definitions[schemaKeyOfField][ux_specification_types_2.SchemaTag.keys] = [
|
|
79
|
+
{
|
|
80
|
+
name: 'Value',
|
|
81
|
+
value: field.Value
|
|
82
|
+
}
|
|
83
|
+
];
|
|
84
|
+
appSchema.definitions[schemaKeyOfField][ux_specification_types_2.SchemaTag.target] = field.fullyQualifiedName.split('@')[0];
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Adds the "keys" tag to a field definition in schema
|
|
89
|
+
* @param field - the given field definition
|
|
90
|
+
* @param appSchema - the app schema to be updated
|
|
91
|
+
* @param schemaKeyOfField - key for the given field in the app schema
|
|
92
|
+
*/
|
|
93
|
+
function addKeysTagToField(field, appSchema, schemaKeyOfField) {
|
|
94
|
+
if (field.$Type === "com.sap.vocabularies.UI.v1.DataField" /* DataField */ ||
|
|
95
|
+
field.$Type === "com.sap.vocabularies.UI.v1.DataFieldWithUrl" /* DataFieldWithUrl */ ||
|
|
96
|
+
field.$Type === "com.sap.vocabularies.UI.v1.DataFieldWithNavigationPath" /* DataFieldWithNavigationPath */) {
|
|
97
|
+
addKeysTagForDataField(field, appSchema, schemaKeyOfField);
|
|
98
|
+
}
|
|
99
|
+
else if (field.$Type === "com.sap.vocabularies.UI.v1.DataFieldForAnnotation" /* DataFieldForAnnotation */) {
|
|
100
|
+
appSchema.definitions[schemaKeyOfField][ux_specification_types_2.SchemaTag.keys] = [
|
|
101
|
+
{
|
|
102
|
+
name: 'Target',
|
|
103
|
+
value: field.Target.value
|
|
104
|
+
}
|
|
105
|
+
];
|
|
106
|
+
appSchema.definitions[schemaKeyOfField][ux_specification_types_2.SchemaTag.target] =
|
|
107
|
+
field.Target.$target.fullyQualifiedName.split('@')[0];
|
|
108
|
+
}
|
|
109
|
+
else if (field.$Type === "com.sap.vocabularies.UI.v1.DataFieldForAction" /* DataFieldForAction */) {
|
|
110
|
+
const separator = field.Action.lastIndexOf('.');
|
|
111
|
+
if (separator === -1) {
|
|
112
|
+
appSchema.definitions[schemaKeyOfField][ux_specification_types_2.SchemaTag.keys] = [
|
|
113
|
+
{
|
|
114
|
+
name: 'Action',
|
|
115
|
+
value: field.Action
|
|
116
|
+
}
|
|
117
|
+
];
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
appSchema.definitions[schemaKeyOfField][ux_specification_types_2.SchemaTag.keys] = [
|
|
121
|
+
{
|
|
122
|
+
name: 'Action',
|
|
123
|
+
value: field.Action.substring(separator + 1, field.Action.length)
|
|
124
|
+
}
|
|
125
|
+
];
|
|
126
|
+
appSchema.definitions[schemaKeyOfField][ux_specification_types_2.SchemaTag.target] = field.Action.substring(0, separator);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
else if (field.$Type === "com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation" /* DataFieldForIntentBasedNavigation */) {
|
|
130
|
+
appSchema.definitions[schemaKeyOfField][ux_specification_types_2.SchemaTag.keys] = [
|
|
131
|
+
{
|
|
132
|
+
name: 'SemanticObject',
|
|
133
|
+
value: field.SemanticObject
|
|
134
|
+
}
|
|
135
|
+
];
|
|
136
|
+
if (field.Action) {
|
|
137
|
+
appSchema.definitions[schemaKeyOfField][ux_specification_types_2.SchemaTag.keys].push({
|
|
138
|
+
name: 'Action',
|
|
139
|
+
value: field.Action
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
appSchema.definitions[schemaKeyOfField][ux_specification_types_2.SchemaTag.target] = field.fullyQualifiedName.split('@')[0];
|
|
143
|
+
}
|
|
144
|
+
}
|
|
58
145
|
/**
|
|
59
146
|
* Adds a field definition to the app specific schema
|
|
60
147
|
* @param {string} sectionType - prefix to distinguish Section and HeaderSection
|
|
@@ -68,49 +155,51 @@ function determineFieldDefinitionName(version, fieldReferenceId, targetID, field
|
|
|
68
155
|
function addField(sectionType, appSchema, field, targetID, key, section, version, withActions = true) {
|
|
69
156
|
// Calculate field reference
|
|
70
157
|
const fieldReferenceId = StableIdHelper_1.getStableIdPartFromDataField(field);
|
|
71
|
-
const fieldReference = version ===
|
|
158
|
+
const fieldReference = version === ux_specification_types_2.FioriElementsVersion.v2 && fieldReferenceId && fieldReferenceId.includes('::')
|
|
72
159
|
? fieldReferenceId.split('::').splice(1).join('::')
|
|
73
160
|
: fieldReferenceId;
|
|
74
161
|
// Determine field definition name
|
|
75
|
-
const
|
|
162
|
+
const schemaKeyOfField = determineFieldDefinitionName(version, fieldReferenceId, targetID, fieldReference);
|
|
76
163
|
// Evaluate field type, set field reference of properties of fields' or actions' definition
|
|
77
164
|
if (!field || !field.$Type) {
|
|
78
165
|
return;
|
|
79
166
|
}
|
|
80
167
|
else if (field.$Type === "com.sap.vocabularies.UI.v1.DataFieldForAction" /* DataFieldForAction */ ||
|
|
81
168
|
field.$Type === "com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation" /* DataFieldForIntentBasedNavigation */) {
|
|
82
|
-
if (withActions && sectionType ===
|
|
83
|
-
const actionsDefinition = __1.prepareRef(`${sectionType}${
|
|
169
|
+
if (withActions && sectionType === ux_specification_types_2.SectionType.Section) {
|
|
170
|
+
const actionsDefinition = __1.prepareRef(`${sectionType}${ux_specification_types_2.DefinitionName.Actions}<${targetID}>`);
|
|
84
171
|
const fieldInSchema = (appSchema.definitions[actionsDefinition].properties[fieldReference] =
|
|
85
172
|
{
|
|
86
|
-
$ref: `${__1.DEFINITION_LINK_PREFIX}${
|
|
173
|
+
$ref: `${__1.DEFINITION_LINK_PREFIX}${schemaKeyOfField}`
|
|
87
174
|
});
|
|
88
|
-
fieldInSchema[
|
|
175
|
+
fieldInSchema[ux_specification_types_2.SchemaTag.propertyIndex] = parseInt(key);
|
|
89
176
|
}
|
|
90
177
|
}
|
|
91
178
|
else {
|
|
92
|
-
const fieldsDefinition = __1.prepareRef(`${sectionType}${
|
|
179
|
+
const fieldsDefinition = __1.prepareRef(`${sectionType}${ux_specification_types_2.DefinitionName.Fields}<${targetID}>`);
|
|
93
180
|
appSchema.definitions[fieldsDefinition]['properties'][fieldReference] = {
|
|
94
|
-
$ref: `${__1.DEFINITION_LINK_PREFIX}${
|
|
181
|
+
$ref: `${__1.DEFINITION_LINK_PREFIX}${schemaKeyOfField}`,
|
|
95
182
|
propertyIndex: parseInt(key)
|
|
96
183
|
};
|
|
97
184
|
}
|
|
98
185
|
// Now set up the field definition
|
|
99
|
-
appSchema.definitions[
|
|
186
|
+
appSchema.definitions[schemaKeyOfField] = {
|
|
100
187
|
type: 'object',
|
|
101
188
|
properties: {},
|
|
102
189
|
description: __1.getDataFieldDescription(field, section.entityType),
|
|
103
190
|
additionalProperties: false
|
|
104
191
|
};
|
|
105
192
|
//Add tags
|
|
106
|
-
appSchema
|
|
107
|
-
appSchema.definitions[
|
|
108
|
-
appSchema.definitions[
|
|
109
|
-
|
|
193
|
+
addKeysTagToField(field, appSchema, schemaKeyOfField);
|
|
194
|
+
appSchema.definitions[schemaKeyOfField][ux_specification_types_2.SchemaTag.annotationPath] = `/${section.entityType.fullyQualifiedName}/${field.fullyQualifiedName.split(section.entityType.fullyQualifiedName)[1]}`;
|
|
195
|
+
appSchema.definitions[schemaKeyOfField][ux_specification_types_2.SchemaTag.annotationType] = field.$Type;
|
|
196
|
+
appSchema.definitions[schemaKeyOfField][ux_specification_types_2.SchemaTag.isViewNode] = true;
|
|
197
|
+
__1.addDataTypeToDefinition(appSchema.definitions[schemaKeyOfField], field);
|
|
110
198
|
// Copy the generic definition of field properties to the specific one
|
|
111
|
-
copyFieldProperties(version, appSchema, field,
|
|
199
|
+
copyFieldProperties(version, appSchema, field, schemaKeyOfField);
|
|
112
200
|
if (field.$Type === "com.sap.vocabularies.UI.v1.DataFieldForAction" /* DataFieldForAction */ && appSchema.definitions?.['FormAction']) {
|
|
113
|
-
appSchema.definitions[
|
|
201
|
+
appSchema.definitions[schemaKeyOfField].$ref = `${__1.DEFINITION_LINK_PREFIX}${ux_specification_types_2.DefinitionName.FormAction}`;
|
|
202
|
+
delete appSchema.definitions[schemaKeyOfField].properties;
|
|
114
203
|
}
|
|
115
204
|
}
|
|
116
205
|
/**
|
|
@@ -131,82 +220,118 @@ function determineTargetIdOfForm(section) {
|
|
|
131
220
|
}
|
|
132
221
|
return targetID;
|
|
133
222
|
}
|
|
223
|
+
/**
|
|
224
|
+
* Adds the specific definitions of the form fields to a schema
|
|
225
|
+
* @param {FacetConfig} section - section definition, as prepared from the annotations
|
|
226
|
+
* @param {SectionType} sectionType - prefix to distinguish Section and HeaderSection
|
|
227
|
+
* @param {object} appSchema - app specific schema that gets enhanced
|
|
228
|
+
* @param {string } targetID - target id of form
|
|
229
|
+
* @param {FioriElementsVersion} version - Fiori Elements version
|
|
230
|
+
* @param {boolean} withActions - indicates that actions shall be considered
|
|
231
|
+
*/
|
|
232
|
+
function addFieldsToFormDefinition(section, sectionType, appSchema, targetID, version, withActions) {
|
|
233
|
+
if (section.base === ux_specification_types_2.FacetBase.Identification) {
|
|
234
|
+
for (const key in section.target) {
|
|
235
|
+
const field = section.target[key];
|
|
236
|
+
if (field) {
|
|
237
|
+
addField(sectionType, appSchema, field, targetID, key, section, version, withActions);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
else {
|
|
242
|
+
for (const key in section.target['Data']) {
|
|
243
|
+
const field = section.target['Data'][key];
|
|
244
|
+
addField(sectionType, appSchema, field, targetID, key, section, version);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Adds the schema tags for a form definition
|
|
250
|
+
* @param {FacetConfig} section - section definition, as prepared from the annotations
|
|
251
|
+
* @param {object} appSchema - app specific schema that gets enhanced
|
|
252
|
+
* @param {string} formDefinitionKey - key of the form definition in schema
|
|
253
|
+
*/
|
|
254
|
+
function addTagsToFormDefinition(section, appSchema, formDefinitionKey) {
|
|
255
|
+
if (section.target) {
|
|
256
|
+
const targetValue = section.target['qualifier']
|
|
257
|
+
? `${section.target['term']}#${section.target['qualifier']}`
|
|
258
|
+
: `${section.target['term']}`;
|
|
259
|
+
appSchema.definitions[formDefinitionKey][ux_specification_types_2.SchemaTag.keys] = [
|
|
260
|
+
{
|
|
261
|
+
name: ux_specification_types_1.SchemaKeyName.target,
|
|
262
|
+
value: targetValue.replace(/com.sap.vocabularies.UI.v1./g, '')
|
|
263
|
+
}
|
|
264
|
+
];
|
|
265
|
+
appSchema.definitions[formDefinitionKey][ux_specification_types_2.SchemaTag.target] = section.target['fullyQualifiedName'].split('@')[0];
|
|
266
|
+
}
|
|
267
|
+
appSchema.definitions[formDefinitionKey][ux_specification_types_2.SchemaTag.isViewNode] = true;
|
|
268
|
+
if (section.entityType?.name) {
|
|
269
|
+
appSchema.definitions[formDefinitionKey][ux_specification_types_2.SchemaTag.annotationPath] = __1.createAnnotationPath(section.entityType.fullyQualifiedName, section.target['term'], section.target['qualifier']);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
134
272
|
/**
|
|
135
273
|
* Adds definitions for forms in object page sections to the app schema
|
|
136
274
|
* @param {SectionType} sectionType - prefix to distinguish Section and HeaderSection
|
|
137
|
-
* @param {FacetConfig} section -
|
|
275
|
+
* @param {FacetConfig} section - section definition, as prepared from the annotations
|
|
138
276
|
* @param {object} appSchemaSection - current definition of facet or section in the JSON schema
|
|
139
277
|
* @param {object} appSchema - app specific schema that gets enhanced
|
|
140
278
|
* @param {FioriElementsVersion} version - Fiori Elements version
|
|
279
|
+
* @param {string} facetKey - facet key
|
|
141
280
|
* @returns {string | undefined} target id of form
|
|
142
281
|
*/
|
|
143
|
-
function handleForm(sectionType, section, appSchemaSection, appSchema, version,
|
|
282
|
+
function handleForm(sectionType, section, appSchemaSection, appSchema, version, facetKey) {
|
|
144
283
|
if (!section.target) {
|
|
145
284
|
return;
|
|
146
285
|
}
|
|
147
286
|
const targetID = determineTargetIdOfForm(section);
|
|
148
|
-
const
|
|
149
|
-
const
|
|
150
|
-
const
|
|
287
|
+
const formDefinitionKey = __1.prepareRef(`${sectionType}${ux_specification_types_2.DefinitionName.Form}<${targetID}>`);
|
|
288
|
+
const fieldsDefinitionKey = __1.prepareRef(`${sectionType}${ux_specification_types_2.DefinitionName.Fields}<${targetID}>`);
|
|
289
|
+
const actionsDefinitionKey = __1.prepareRef(`${sectionType}${ux_specification_types_2.DefinitionName.Actions}<${targetID}>`);
|
|
290
|
+
const withActions = section.base === ux_specification_types_2.FacetBase.Identification && facetKey.indexOf('#') < 0 ? false : true;
|
|
151
291
|
// Form definition
|
|
152
|
-
appSchemaSection.properties
|
|
153
|
-
if (sectionType ===
|
|
154
|
-
appSchema
|
|
292
|
+
appSchemaSection.properties.form = { $ref: `${__1.DEFINITION_LINK_PREFIX}${formDefinitionKey}` };
|
|
293
|
+
if (sectionType === ux_specification_types_2.SectionType.Section && withActions) {
|
|
294
|
+
appSchema.definitions[formDefinitionKey] = {
|
|
155
295
|
type: 'object',
|
|
156
296
|
properties: {
|
|
157
297
|
actions: {
|
|
158
|
-
$ref: `${__1.DEFINITION_LINK_PREFIX}${
|
|
298
|
+
$ref: `${__1.DEFINITION_LINK_PREFIX}${actionsDefinitionKey}`
|
|
159
299
|
},
|
|
160
|
-
fields: { $ref: `${__1.DEFINITION_LINK_PREFIX}${
|
|
300
|
+
fields: { $ref: `${__1.DEFINITION_LINK_PREFIX}${fieldsDefinitionKey}` }
|
|
161
301
|
},
|
|
162
302
|
description: 'Form',
|
|
163
303
|
additionalProperties: false
|
|
164
304
|
};
|
|
165
|
-
appSchema
|
|
305
|
+
appSchema.definitions[actionsDefinitionKey] = {
|
|
166
306
|
type: 'object',
|
|
167
307
|
properties: {},
|
|
168
308
|
description: 'Actions',
|
|
169
309
|
additionalProperties: false
|
|
170
310
|
};
|
|
171
|
-
appSchema
|
|
311
|
+
appSchema.definitions[actionsDefinitionKey][ux_specification_types_2.SchemaTag.isViewNode] = true;
|
|
172
312
|
}
|
|
173
313
|
else {
|
|
174
|
-
appSchema
|
|
314
|
+
appSchema.definitions[formDefinitionKey] = {
|
|
175
315
|
type: 'object',
|
|
176
316
|
properties: {
|
|
177
|
-
fields: { $ref: `${__1.DEFINITION_LINK_PREFIX}${
|
|
317
|
+
fields: { $ref: `${__1.DEFINITION_LINK_PREFIX}${fieldsDefinitionKey}` }
|
|
178
318
|
},
|
|
179
319
|
description: 'Form',
|
|
180
320
|
additionalProperties: false
|
|
181
321
|
};
|
|
182
322
|
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
appSchema.definitions[formDefinition][ux_specification_types_1.SchemaTag.annotationPath] = __1.createAnnotationPath(section.entityType.fullyQualifiedName, section.target['term'], section.target['qualifier']);
|
|
186
|
-
}
|
|
323
|
+
//Add schema tags
|
|
324
|
+
addTagsToFormDefinition(section, appSchema, formDefinitionKey);
|
|
187
325
|
// Fields definition
|
|
188
|
-
appSchema.definitions[
|
|
326
|
+
appSchema.definitions[fieldsDefinitionKey] = {
|
|
189
327
|
type: 'object',
|
|
190
328
|
properties: {},
|
|
191
329
|
description: 'Fields',
|
|
192
330
|
additionalProperties: false
|
|
193
331
|
};
|
|
194
|
-
appSchema.definitions[
|
|
332
|
+
appSchema.definitions[fieldsDefinitionKey][ux_specification_types_2.SchemaTag.isViewNode] = true;
|
|
195
333
|
// Add fields
|
|
196
|
-
|
|
197
|
-
for (const key in section.target) {
|
|
198
|
-
const field = section.target[key];
|
|
199
|
-
if (field) {
|
|
200
|
-
addField(sectionType, appSchema, field, targetID, key, section, version, withActions);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
else {
|
|
205
|
-
for (const key in section.target['Data']) {
|
|
206
|
-
const field = section.target['Data'][key];
|
|
207
|
-
addField(sectionType, appSchema, field, targetID, key, section, version);
|
|
208
|
-
}
|
|
209
|
-
}
|
|
334
|
+
addFieldsToFormDefinition(section, sectionType, appSchema, targetID, version, withActions);
|
|
210
335
|
return targetID;
|
|
211
336
|
}
|
|
212
337
|
exports.handleForm = handleForm;
|
|
@@ -237,86 +362,71 @@ exports.replaceAlias = replaceAlias;
|
|
|
237
362
|
* @param entityType - entity type by AVT
|
|
238
363
|
* @returns an object comprising action name and action id
|
|
239
364
|
*/
|
|
240
|
-
function getActionNameAndId(
|
|
241
|
-
|
|
365
|
+
function getActionNameAndId(item, entityType, oDataServiceAVT) {
|
|
366
|
+
const action = replaceAlias(item.Action, oDataServiceAVT);
|
|
367
|
+
let relevantAction = action;
|
|
368
|
+
let separatorIndex = action.indexOf('(');
|
|
369
|
+
if (separatorIndex > 0) {
|
|
370
|
+
relevantAction = action.substring(0, separatorIndex);
|
|
371
|
+
}
|
|
372
|
+
separatorIndex = relevantAction.lastIndexOf('/');
|
|
242
373
|
if (separatorIndex === -1) {
|
|
243
|
-
separatorIndex =
|
|
374
|
+
separatorIndex = relevantAction.lastIndexOf('.');
|
|
244
375
|
}
|
|
245
|
-
let actionName, actionId;
|
|
376
|
+
let actionName, actionId, namespace;
|
|
246
377
|
if (separatorIndex > -1) {
|
|
247
|
-
actionName =
|
|
248
|
-
|
|
378
|
+
actionName = relevantAction.substring(separatorIndex + 1);
|
|
379
|
+
namespace = relevantAction.substring(0, separatorIndex);
|
|
380
|
+
actionId = `${relevantAction.substring(0, separatorIndex)}::${actionName}`;
|
|
249
381
|
}
|
|
250
382
|
else {
|
|
251
|
-
actionName =
|
|
252
|
-
|
|
253
|
-
|
|
383
|
+
actionName = relevantAction;
|
|
384
|
+
namespace = item.fullyQualifiedName.split('@')[0];
|
|
385
|
+
if (actionName && actionName !== '') {
|
|
386
|
+
actionId = `${namespace.substring(0, namespace.length - 1)}::${actionName}`;
|
|
387
|
+
}
|
|
254
388
|
}
|
|
255
|
-
return { actionName, actionId };
|
|
389
|
+
return { actionName, actionId, namespace };
|
|
256
390
|
}
|
|
257
391
|
exports.getActionNameAndId = getActionNameAndId;
|
|
258
392
|
/**
|
|
259
393
|
* Add Object Page Footer Action Buttons to app-specific schema
|
|
260
394
|
*
|
|
261
395
|
* @param {object} appSchema Schema of the app
|
|
262
|
-
* @param {
|
|
263
|
-
* @param {
|
|
396
|
+
* @param {GenerateAppSchemaParameters} generateParameters - Schema parameters
|
|
397
|
+
* @param {FioriElementsVersion} version - Fiori elements versions
|
|
398
|
+
* @param {function} addFooterActionCallBack - Callback function, either V2 or V4
|
|
264
399
|
*/
|
|
265
|
-
function addFooterActions(appSchema, generateParameters) {
|
|
266
|
-
appSchema.definitions[
|
|
400
|
+
function addFooterActions(appSchema, generateParameters, version, addFooterActionCallBack) {
|
|
401
|
+
appSchema.definitions[ux_specification_types_2.DefinitionName.ObjectPageFooter] = JSON.parse(JSON.stringify(appSchema.definitions[`${ux_specification_types_2.DefinitionName.ObjectPageFooter}<ObjectPageFooterActions>`]));
|
|
267
402
|
// Change reference of footer
|
|
268
403
|
appSchema.properties['footer'] = {
|
|
269
|
-
$ref: `${__1.DEFINITION_LINK_PREFIX}${
|
|
404
|
+
$ref: `${__1.DEFINITION_LINK_PREFIX}${ux_specification_types_2.DefinitionName.ObjectPageFooter}`
|
|
270
405
|
};
|
|
271
406
|
// Add action to configuration
|
|
272
|
-
appSchema.definitions[
|
|
273
|
-
$ref: `${__1.DEFINITION_LINK_PREFIX}${
|
|
407
|
+
appSchema.definitions[ux_specification_types_2.DefinitionName.ObjectPageFooter].properties[ux_specification_types_2.PropertyName.actions] = {
|
|
408
|
+
$ref: `${__1.DEFINITION_LINK_PREFIX}${ux_specification_types_2.DefinitionName.FooterActions}`
|
|
274
409
|
};
|
|
275
|
-
const footerActions = (appSchema.definitions[
|
|
410
|
+
const footerActions = (appSchema.definitions[ux_specification_types_2.DefinitionName.FooterActions] = {
|
|
276
411
|
type: 'object',
|
|
277
412
|
properties: {},
|
|
278
413
|
description: 'Actions',
|
|
279
414
|
additionalProperties: false
|
|
280
415
|
});
|
|
281
|
-
footerActions[
|
|
282
|
-
const alias = __1.findAlias(
|
|
416
|
+
footerActions[ux_specification_types_2.SchemaTag.isViewNode] = true;
|
|
417
|
+
const alias = __1.findAlias(ux_specification_types_2.UIVOCABULARY, generateParameters.serviceAVT);
|
|
283
418
|
const entityType = generateParameters.entitySet.entityType;
|
|
284
419
|
const actionAnnotation = alias && entityType.annotations?.[alias]?.Identification;
|
|
285
420
|
if (actionAnnotation) {
|
|
286
421
|
const convertedIdentification = actionAnnotation.fullyQualifiedName.replace(`@${"com.sap.vocabularies.UI.v1.Identification" /* Identification */}`, `/@${"com.sap.vocabularies.UI.v1.Identification" /* Identification */}`);
|
|
287
|
-
footerActions[
|
|
288
|
-
actionAnnotation.forEach((
|
|
289
|
-
if (item['Determining'] && item.$Type === "com.sap.vocabularies.UI.v1.DataFieldForAction" /* DataFieldForAction */) {
|
|
290
|
-
const { actionName, actionId } = getActionNameAndId(item.Action, entityType);
|
|
291
|
-
const description = item.Label || actionName;
|
|
292
|
-
const actionDefinitionKey = __1.prepareRef(`${ux_specification_types_1.DefinitionName.ObjectPageFooterAction}<${actionId}>`);
|
|
293
|
-
if (appSchema.definitions[ux_specification_types_1.DefinitionName.ObjectPageFooterAction]) {
|
|
294
|
-
appSchema.definitions[actionDefinitionKey] = {
|
|
295
|
-
...JSON.parse(JSON.stringify(appSchema.definitions[ux_specification_types_1.DefinitionName.ObjectPageFooterAction])),
|
|
296
|
-
description,
|
|
297
|
-
annotationPath: `/${convertedIdentification}/${index}`
|
|
298
|
-
};
|
|
299
|
-
}
|
|
300
|
-
else {
|
|
301
|
-
appSchema.definitions[actionDefinitionKey] = {
|
|
302
|
-
type: 'object',
|
|
303
|
-
properties: {},
|
|
304
|
-
description: description
|
|
305
|
-
};
|
|
306
|
-
appSchema.definitions[actionDefinitionKey][ux_specification_types_1.SchemaTag.isViewNode] = true;
|
|
307
|
-
appSchema.definitions[actionDefinitionKey][ux_specification_types_1.SchemaTag.annotationPath] = `/${convertedIdentification}/${index}`;
|
|
308
|
-
}
|
|
309
|
-
footerActions.properties[actionId] = {
|
|
310
|
-
$ref: `${__1.DEFINITION_LINK_PREFIX}${actionDefinitionKey}`
|
|
311
|
-
};
|
|
312
|
-
}
|
|
313
|
-
});
|
|
422
|
+
footerActions[ux_specification_types_2.SchemaTag.annotationPath] = `/${convertedIdentification}`;
|
|
423
|
+
actionAnnotation.forEach(addFooterActionCallBack(entityType, appSchema, footerActions, convertedIdentification));
|
|
314
424
|
}
|
|
315
425
|
else {
|
|
316
|
-
footerActions[
|
|
426
|
+
footerActions[ux_specification_types_2.SchemaTag.annotationPath] = `/${entityType.fullyQualifiedName}/@${"com.sap.vocabularies.UI.v1.Identification" /* Identification */}`;
|
|
317
427
|
}
|
|
318
|
-
delete appSchema.definitions[
|
|
319
|
-
delete appSchema.definitions[`${
|
|
428
|
+
delete appSchema.definitions[ux_specification_types_2.DefinitionName.ObjectPageFooterActions];
|
|
429
|
+
delete appSchema.definitions[`${ux_specification_types_2.DefinitionName.ObjectPageFooter}<${ux_specification_types_2.DefinitionName.ObjectPageFooterActions}>`];
|
|
320
430
|
}
|
|
321
431
|
exports.addFooterActions = addFooterActions;
|
|
322
432
|
/**
|
|
@@ -324,34 +434,33 @@ exports.addFooterActions = addFooterActions;
|
|
|
324
434
|
* @param {object} appSchema Schema of the app
|
|
325
435
|
* @param {EntityType} entityType - current entity type
|
|
326
436
|
* @param {ConvertedMetadata} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
|
|
437
|
+
* @param {function} addHeaderActionCallBack - Callback function, either V2 or V4
|
|
327
438
|
*/
|
|
328
439
|
function addHeaderActions(appSchema, entityType, oDataServiceAVT, addHeaderActionCallBack) {
|
|
329
|
-
appSchema.definitions[
|
|
330
|
-
$ref: `${__1.DEFINITION_LINK_PREFIX}${
|
|
440
|
+
appSchema.definitions[ux_specification_types_2.DefinitionName.ObjectPageHeader].properties[ux_specification_types_2.PropertyName.actions] = {
|
|
441
|
+
$ref: `${__1.DEFINITION_LINK_PREFIX}${ux_specification_types_2.DefinitionName.HeaderActions}`
|
|
331
442
|
};
|
|
332
|
-
const headerActions = (appSchema.definitions[
|
|
443
|
+
const headerActions = (appSchema.definitions[ux_specification_types_2.DefinitionName.HeaderActions] = {
|
|
333
444
|
type: 'object',
|
|
334
445
|
properties: {},
|
|
335
446
|
description: 'Actions',
|
|
336
447
|
additionalProperties: false
|
|
337
448
|
});
|
|
338
|
-
headerActions[
|
|
339
|
-
const alias = __1.findAlias(
|
|
449
|
+
headerActions[ux_specification_types_2.SchemaTag.isViewNode] = true;
|
|
450
|
+
const alias = __1.findAlias(ux_specification_types_2.UIVOCABULARY, oDataServiceAVT);
|
|
340
451
|
const identification = alias &&
|
|
341
452
|
entityType.annotations &&
|
|
342
453
|
entityType.annotations[alias] &&
|
|
343
454
|
entityType.annotations[alias].Identification;
|
|
344
455
|
if (identification) {
|
|
345
|
-
headerActions[
|
|
456
|
+
headerActions[ux_specification_types_2.SchemaTag.annotationPath] =
|
|
346
457
|
'/' +
|
|
347
458
|
identification.fullyQualifiedName.replace(`@${"com.sap.vocabularies.UI.v1.Identification" /* Identification */}`, `/@${"com.sap.vocabularies.UI.v1.Identification" /* Identification */}`);
|
|
348
459
|
identification.forEach(addHeaderActionCallBack(entityType, appSchema, identification, headerActions, oDataServiceAVT));
|
|
349
460
|
}
|
|
350
461
|
else {
|
|
351
|
-
headerActions[
|
|
462
|
+
headerActions[ux_specification_types_2.SchemaTag.annotationPath] = `/${entityType.fullyQualifiedName}/@${"com.sap.vocabularies.UI.v1.Identification" /* Identification */}`;
|
|
352
463
|
}
|
|
353
|
-
delete appSchema.definitions[ux_specification_types_1.DefinitionName.GenericActions];
|
|
354
|
-
delete appSchema.definitions[`${ux_specification_types_1.DefinitionName.ObjectPageHeader}<${ux_specification_types_1.DefinitionName.GenericActions}>`];
|
|
355
464
|
}
|
|
356
465
|
exports.addHeaderActions = addHeaderActions;
|
|
357
466
|
/**
|
|
@@ -361,10 +470,10 @@ exports.addHeaderActions = addHeaderActions;
|
|
|
361
470
|
*/
|
|
362
471
|
function addCommonHeaderSchema(appSchema, entityType) {
|
|
363
472
|
appSchema.properties['header'] = {
|
|
364
|
-
$ref: `${__1.DEFINITION_LINK_PREFIX}${
|
|
473
|
+
$ref: `${__1.DEFINITION_LINK_PREFIX}${ux_specification_types_2.DefinitionName.ObjectPageHeader}`
|
|
365
474
|
};
|
|
366
|
-
appSchema.definitions[
|
|
367
|
-
appSchema.definitions[
|
|
475
|
+
appSchema.definitions[ux_specification_types_2.DefinitionName.ObjectPageHeader] = JSON.parse(JSON.stringify(appSchema.definitions[`${ux_specification_types_2.DefinitionName.ObjectPageHeader}`]));
|
|
476
|
+
appSchema.definitions[ux_specification_types_2.DefinitionName.ObjectPageHeader][ux_specification_types_2.SchemaTag.annotationPath] = `/${entityType.fullyQualifiedName}/@${"com.sap.vocabularies.UI.v1.HeaderInfo" /* HeaderInfo */}`;
|
|
368
477
|
}
|
|
369
478
|
exports.addCommonHeaderSchema = addCommonHeaderSchema;
|
|
370
479
|
/**
|