@sap/ux-specification 1.96.25 → 1.96.26
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-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 +41 -41
- package/dist/index-min.js.map +3 -3
- package/dist/schemas/v2/AnalyticalListPageConfig.json +9 -0
- package/dist/schemas/v2/ListReportConfig.json +9 -0
- package/dist/schemas/v2/ObjectPageConfig.json +9 -0
- package/dist/schemas/v4/ListReportConfig.json +32 -32
- package/dist/schemas/v4/ObjectPageConfig.json +99 -23
- package/dist/scripts/to-json-schema.d.ts.map +1 -1
- package/dist/scripts/to-json-schema.js +9 -1
- package/dist/scripts/to-json-schema.js.map +1 -1
- package/dist/src/api.d.ts +1 -2
- package/dist/src/api.d.ts.map +1 -1
- package/dist/src/api.js +13 -5
- package/dist/src/api.js.map +1 -1
- package/dist/src/extensionLogger.d.ts +1 -24
- package/dist/src/extensionLogger.d.ts.map +1 -1
- package/dist/src/extensionLogger.js +5 -15
- package/dist/src/extensionLogger.js.map +1 -1
- package/dist/src/index.d.ts +0 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +0 -2
- package/dist/src/index.js.map +1 -1
- package/dist/src/project.d.ts +1 -2
- package/dist/src/project.d.ts.map +1 -1
- package/dist/src/project.js.map +1 -1
- package/dist/src/sync/common/appProvider.d.ts +1 -3
- package/dist/src/sync/common/appProvider.d.ts.map +1 -1
- package/dist/src/sync/common/appProvider.js +3 -4
- package/dist/src/sync/common/appProvider.js.map +1 -1
- package/dist/src/sync/common/decoration/control.d.ts +1 -1
- package/dist/src/sync/common/decoration/control.d.ts.map +1 -1
- package/dist/src/sync/common/decoration/control.js +12 -12
- package/dist/src/sync/common/decoration/control.js.map +1 -1
- package/dist/src/sync/common/decoration/decorators.d.ts +1 -1
- package/dist/src/sync/common/decoration/decorators.d.ts.map +1 -1
- package/dist/src/sync/common/decoration/flex.d.ts +1 -2
- package/dist/src/sync/common/decoration/flex.d.ts.map +1 -1
- package/dist/src/sync/common/decoration/flex.js.map +1 -1
- package/dist/src/sync/common/flexUtils.d.ts +1 -4
- package/dist/src/sync/common/flexUtils.d.ts.map +1 -1
- package/dist/src/sync/common/flexUtils.js.map +1 -1
- package/dist/src/sync/common/generate/objectPage.d.ts +3 -3
- package/dist/src/sync/common/generate/objectPage.d.ts.map +1 -1
- package/dist/src/sync/common/generate/objectPage.js +45 -43
- package/dist/src/sync/common/generate/objectPage.js.map +1 -1
- package/dist/src/sync/common/generate/utils.d.ts +20 -4
- package/dist/src/sync/common/generate/utils.d.ts.map +1 -1
- package/dist/src/sync/common/generate/utils.js +85 -27
- package/dist/src/sync/common/generate/utils.js.map +1 -1
- package/dist/src/sync/common/import/utils.d.ts +1 -2
- package/dist/src/sync/common/import/utils.d.ts.map +1 -1
- package/dist/src/sync/common/import/utils.js +4 -3
- package/dist/src/sync/common/import/utils.js.map +1 -1
- package/dist/src/sync/common/importProject.d.ts +1 -2
- package/dist/src/sync/common/importProject.d.ts.map +1 -1
- package/dist/src/sync/common/importProject.js +22 -23
- package/dist/src/sync/common/importProject.js.map +1 -1
- package/dist/src/sync/common/index.d.ts +0 -1
- package/dist/src/sync/common/index.d.ts.map +1 -1
- package/dist/src/sync/common/index.js +0 -1
- package/dist/src/sync/common/index.js.map +1 -1
- package/dist/src/sync/common/utils.d.ts +2 -12
- package/dist/src/sync/common/utils.d.ts.map +1 -1
- package/dist/src/sync/common/utils.js +38 -49
- package/dist/src/sync/common/utils.js.map +1 -1
- package/dist/src/sync/v2/application.d.ts.map +1 -1
- package/dist/src/sync/v2/application.js +1 -2
- package/dist/src/sync/v2/application.js.map +1 -1
- package/dist/src/sync/v2/export/controls/AnalyticalListPageChart.d.ts.map +1 -1
- package/dist/src/sync/v2/export/controls/AnalyticalListPageChart.js +1 -2
- package/dist/src/sync/v2/export/controls/AnalyticalListPageChart.js.map +1 -1
- package/dist/src/sync/v2/export/controls/Field.d.ts.map +1 -1
- package/dist/src/sync/v2/export/controls/Field.js.map +1 -1
- package/dist/src/sync/v2/export/controls/FilterBar.d.ts.map +1 -1
- package/dist/src/sync/v2/export/controls/FilterBar.js +4 -5
- package/dist/src/sync/v2/export/controls/FilterBar.js.map +1 -1
- package/dist/src/sync/v2/export/controls/FormAction.d.ts.map +1 -1
- package/dist/src/sync/v2/export/controls/FormAction.js.map +1 -1
- package/dist/src/sync/v2/export/controls/Fragment.d.ts +2 -4
- package/dist/src/sync/v2/export/controls/Fragment.d.ts.map +1 -1
- package/dist/src/sync/v2/export/controls/Fragment.js +12 -13
- package/dist/src/sync/v2/export/controls/Fragment.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageFooterAction.d.ts.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageFooterAction.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageHeaderAction.d.ts.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageHeaderAction.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.d.ts +1 -3
- package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.d.ts.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.js +2 -3
- package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageTable.d.ts +1 -2
- package/dist/src/sync/v2/export/controls/ObjectPageTable.d.ts.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageTable.js +3 -3
- package/dist/src/sync/v2/export/controls/ObjectPageTable.js.map +1 -1
- package/dist/src/sync/v2/export/controls/Table.d.ts +1 -2
- package/dist/src/sync/v2/export/controls/Table.d.ts.map +1 -1
- package/dist/src/sync/v2/export/controls/Table.js +6 -6
- package/dist/src/sync/v2/export/controls/Table.js.map +1 -1
- package/dist/src/sync/v2/export/controls/TableColumn.d.ts +1 -1
- package/dist/src/sync/v2/export/controls/TableColumn.js +1 -1
- package/dist/src/sync/v2/export/export.d.ts +1 -1
- package/dist/src/sync/v2/export/export.d.ts.map +1 -1
- package/dist/src/sync/v2/export/export.js +6 -6
- package/dist/src/sync/v2/export/export.js.map +1 -1
- package/dist/src/sync/v2/export/exportPage.d.ts +1 -2
- package/dist/src/sync/v2/export/exportPage.d.ts.map +1 -1
- package/dist/src/sync/v2/export/exportPage.js +1 -1
- package/dist/src/sync/v2/export/exportPage.js.map +1 -1
- package/dist/src/sync/v2/export/view-controller-generator.d.ts +1 -2
- package/dist/src/sync/v2/export/view-controller-generator.d.ts.map +1 -1
- package/dist/src/sync/v2/export/view-controller-generator.js +2 -2
- package/dist/src/sync/v2/export/view-controller-generator.js.map +1 -1
- package/dist/src/sync/v2/generate/analyticalListReport.d.ts +1 -1
- package/dist/src/sync/v2/generate/analyticalListReport.d.ts.map +1 -1
- package/dist/src/sync/v2/generate/analyticalListReport.js +10 -10
- package/dist/src/sync/v2/generate/analyticalListReport.js.map +1 -1
- package/dist/src/sync/v2/generate/generate.d.ts +1 -2
- package/dist/src/sync/v2/generate/generate.d.ts.map +1 -1
- package/dist/src/sync/v2/generate/generate.js +3 -3
- package/dist/src/sync/v2/generate/generate.js.map +1 -1
- package/dist/src/sync/v2/generate/listReport.d.ts +1 -1
- package/dist/src/sync/v2/generate/listReport.d.ts.map +1 -1
- package/dist/src/sync/v2/generate/listReport.js +5 -5
- package/dist/src/sync/v2/generate/listReport.js.map +1 -1
- package/dist/src/sync/v2/generate/objectPage.d.ts +1 -1
- package/dist/src/sync/v2/generate/objectPage.d.ts.map +1 -1
- package/dist/src/sync/v2/generate/objectPage.js +43 -41
- package/dist/src/sync/v2/generate/objectPage.js.map +1 -1
- package/dist/src/sync/v2/generate/utils.d.ts +2 -3
- package/dist/src/sync/v2/generate/utils.d.ts.map +1 -1
- package/dist/src/sync/v2/generate/utils.js +34 -24
- package/dist/src/sync/v2/generate/utils.js.map +1 -1
- package/dist/src/sync/v2/import/app/appProvider.d.ts +1 -3
- package/dist/src/sync/v2/import/app/appProvider.d.ts.map +1 -1
- package/dist/src/sync/v2/import/app/appProvider.js.map +1 -1
- package/dist/src/sync/v2/import/app/ovpProvider.d.ts +1 -2
- package/dist/src/sync/v2/import/app/ovpProvider.d.ts.map +1 -1
- package/dist/src/sync/v2/import/app/ovpProvider.js.map +1 -1
- package/dist/src/sync/v2/import/common/index.d.ts +1 -3
- package/dist/src/sync/v2/import/common/index.d.ts.map +1 -1
- package/dist/src/sync/v2/import/common/index.js +9 -9
- package/dist/src/sync/v2/import/common/index.js.map +1 -1
- package/dist/src/sync/v2/import/controls/table.d.ts.map +1 -1
- package/dist/src/sync/v2/import/controls/table.js +3 -4
- package/dist/src/sync/v2/import/controls/table.js.map +1 -1
- package/dist/src/sync/v2/import/pages/analyticalListPage.d.ts +1 -2
- package/dist/src/sync/v2/import/pages/analyticalListPage.d.ts.map +1 -1
- package/dist/src/sync/v2/import/pages/analyticalListPage.js +16 -16
- package/dist/src/sync/v2/import/pages/analyticalListPage.js.map +1 -1
- package/dist/src/sync/v2/import/pages/listReport.d.ts +1 -2
- package/dist/src/sync/v2/import/pages/listReport.d.ts.map +1 -1
- package/dist/src/sync/v2/import/pages/listReport.js +15 -15
- package/dist/src/sync/v2/import/pages/listReport.js.map +1 -1
- package/dist/src/sync/v2/import/pages/objectPage.d.ts +1 -1
- package/dist/src/sync/v2/import/pages/objectPage.d.ts.map +1 -1
- package/dist/src/sync/v2/import/pages/objectPage.js +31 -31
- package/dist/src/sync/v2/import/pages/objectPage.js.map +1 -1
- package/dist/src/sync/v2/import/utils.d.ts.map +1 -1
- package/dist/src/sync/v2/import/utils.js +1 -1
- package/dist/src/sync/v2/import/utils.js.map +1 -1
- package/dist/src/sync/v4/application.js +2 -2
- package/dist/src/sync/v4/application.js.map +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageForm.d.ts +9 -0
- package/dist/src/sync/v4/export/controls/ObjectPageForm.d.ts.map +1 -0
- package/dist/src/sync/v4/export/controls/ObjectPageForm.js +10 -0
- package/dist/src/sync/v4/export/controls/ObjectPageForm.js.map +1 -0
- package/dist/src/sync/v4/export/controls/ObjectPageFormAction.d.ts +10 -0
- package/dist/src/sync/v4/export/controls/ObjectPageFormAction.d.ts.map +1 -0
- package/dist/src/sync/v4/export/controls/ObjectPageFormAction.js +68 -0
- package/dist/src/sync/v4/export/controls/ObjectPageFormAction.js.map +1 -0
- package/dist/src/sync/v4/export/controls/ObjectPageTable.js +4 -4
- package/dist/src/sync/v4/export/controls/ObjectPageTable.js.map +1 -1
- package/dist/src/sync/v4/export/controls/Table.d.ts.map +1 -1
- package/dist/src/sync/v4/export/controls/Table.js +2 -1
- package/dist/src/sync/v4/export/controls/Table.js.map +1 -1
- package/dist/src/sync/v4/export/controls/index.d.ts +2 -0
- package/dist/src/sync/v4/export/controls/index.d.ts.map +1 -1
- package/dist/src/sync/v4/export/controls/index.js +2 -0
- package/dist/src/sync/v4/export/controls/index.js.map +1 -1
- package/dist/src/sync/v4/export/export.d.ts +1 -3
- package/dist/src/sync/v4/export/export.d.ts.map +1 -1
- package/dist/src/sync/v4/export/export.js +36 -36
- package/dist/src/sync/v4/export/export.js.map +1 -1
- package/dist/src/sync/v4/export/exportCustomColumn.d.ts +1 -1
- package/dist/src/sync/v4/export/exportCustomColumn.d.ts.map +1 -1
- package/dist/src/sync/v4/export/exportCustomColumn.js +3 -4
- package/dist/src/sync/v4/export/exportCustomColumn.js.map +1 -1
- package/dist/src/sync/v4/export/types.d.ts +1 -3
- package/dist/src/sync/v4/export/types.d.ts.map +1 -1
- package/dist/src/sync/v4/generate/freestylePage.d.ts +1 -1
- package/dist/src/sync/v4/generate/freestylePage.d.ts.map +1 -1
- package/dist/src/sync/v4/generate/generate.d.ts +2 -3
- package/dist/src/sync/v4/generate/generate.d.ts.map +1 -1
- package/dist/src/sync/v4/generate/generate.js +2 -2
- package/dist/src/sync/v4/generate/generate.js.map +1 -1
- package/dist/src/sync/v4/generate/listReport.d.ts +1 -1
- package/dist/src/sync/v4/generate/listReport.d.ts.map +1 -1
- package/dist/src/sync/v4/generate/listReport.js +116 -115
- 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 +189 -148
- package/dist/src/sync/v4/generate/objectPage.js.map +1 -1
- package/dist/src/sync/v4/import/app/appProvider.d.ts +1 -2
- package/dist/src/sync/v4/import/app/appProvider.d.ts.map +1 -1
- package/dist/src/sync/v4/import/app/appProvider.js.map +1 -1
- package/dist/src/sync/v4/import/app/baseAppProvider.d.ts +2 -4
- package/dist/src/sync/v4/import/app/baseAppProvider.d.ts.map +1 -1
- package/dist/src/sync/v4/import/app/baseAppProvider.js +3 -3
- package/dist/src/sync/v4/import/app/baseAppProvider.js.map +1 -1
- package/dist/src/sync/v4/import/app/freestyleProvider.d.ts +1 -2
- package/dist/src/sync/v4/import/app/freestyleProvider.d.ts.map +1 -1
- package/dist/src/sync/v4/import/app/freestyleProvider.js.map +1 -1
- package/dist/src/sync/v4/import/fragment.d.ts +1 -2
- package/dist/src/sync/v4/import/fragment.d.ts.map +1 -1
- package/dist/src/sync/v4/import/fragment.js.map +1 -1
- package/dist/src/sync/v4/import/pages/listReport.d.ts +1 -2
- package/dist/src/sync/v4/import/pages/listReport.d.ts.map +1 -1
- package/dist/src/sync/v4/import/pages/listReport.js +36 -36
- package/dist/src/sync/v4/import/pages/listReport.js.map +1 -1
- package/dist/src/sync/v4/import/pages/objectPage.d.ts +1 -2
- package/dist/src/sync/v4/import/pages/objectPage.d.ts.map +1 -1
- package/dist/src/sync/v4/import/pages/objectPage.js +78 -22
- package/dist/src/sync/v4/import/pages/objectPage.js.map +1 -1
- package/dist/src/sync/v4/utils/StableIdHelper.d.ts +4 -0
- package/dist/src/sync/v4/utils/StableIdHelper.d.ts.map +1 -1
- package/dist/src/sync/v4/utils/StableIdHelper.js +3 -11
- package/dist/src/sync/v4/utils/StableIdHelper.js.map +1 -1
- package/dist/src/sync/v4/utils/utils.d.ts +5 -6
- package/dist/src/sync/v4/utils/utils.d.ts.map +1 -1
- package/dist/src/sync/v4/utils/utils.js +109 -68
- package/dist/src/sync/v4/utils/utils.js.map +1 -1
- package/package.json +2 -18
- package/dist/src/apiTypes.d.ts +0 -335
- package/dist/src/apiTypes.d.ts.map +0 -1
- package/dist/src/apiTypes.js +0 -25
- package/dist/src/apiTypes.js.map +0 -1
- package/dist/src/sync/common/types.d.ts +0 -306
- package/dist/src/sync/common/types.d.ts.map +0 -1
- package/dist/src/sync/common/types.js +0 -176
- package/dist/src/sync/common/types.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../../../src/sync/v4/generate/generate.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../../../src/sync/v4/generate/generate.ts"],"names":[],"mappings":";;;AAAA,8CAA6D;AAC7D,wBAAsG;AAEtG,wEAAqF;AAErF;;;;;;;;;;;;GAYG;AACH,SAAgB,6BAA6B,CACzC,aAAqB,EACrB,SAAiB,EACjB,WAAuB,EACvB,QAAgB,EAChB,MAAwB,EACxB,SAAsB;IAEtB,MAAM,UAAU,GAAG,+BAAuB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAChE,MAAM,kBAAkB,GAAgC;QACpD,YAAY,EAAE,qCAAY,CAAC,sBAAsB;QACjD,oBAAoB,EAAE,6CAAoB,CAAC,EAAE;QAC7C,QAAQ;QACR,SAAS;QACT,UAAU;QACV,MAAM;KACT,CAAC;IACF,OAAO,6BAA0B,CAAC,kBAAkB,EAAE,aAAa,EAAE,SAAS,CAAC,CAAC;AACpF,CAAC;AAlBD,sEAkBC;AAED;;;;;;;;;;;GAWG;AACH,SAAgB,6BAA6B,CACzC,YAA0B,EAC1B,aAAqB,EACrB,aAAqB,EACrB,WAAuB,EACvB,MAAwB,EACxB,QAAiB;IAEjB,MAAM,UAAU,GAAG,+BAAuB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAChE,MAAM,SAAS,GAAG,UAAU,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,KAAK,aAAa,CAAC,CAAC;IACjF,MAAM,kBAAkB,GAAgC;QACpD,YAAY;QACZ,oBAAoB,EAAE,6CAAoB,CAAC,EAAE;QAC7C,QAAQ;QACR,UAAU;QACV,MAAM;KACT,CAAC;IAEF,MAAM,YAAY,GACd,YAAY,KAAK,qCAAY,CAAC,sBAAsB,CAAC,CAAC,CAAC,2BAAE,CAAC,0BAA0B,CAAC,CAAC,CAAC,2BAAE,CAAC,kBAAkB,CAAC;IACjH,OAAO,6BAA0B,CAAC,kBAAkB,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC;AAClG,CAAC;AArBD,sEAqBC;AAED;;;;;;;;;;GAUG;AACH,SAAgB,4BAA4B,CACxC,YAA0B,EAC1B,aAAqB,EACrB,WAAuB,EACvB,QAAiB,EACjB,cAAuB,EACvB,MAAwB;IAExB,MAAM,UAAU,GAAG,+BAAuB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAChE,MAAM,kBAAkB,GAAgC;QACpD,YAAY;QACZ,oBAAoB,EAAE,6CAAoB,CAAC,EAAE;QAC7C,QAAQ;QACR,UAAU;QACV,MAAM;KACT,CAAC;IACF,OAAO,4BAAyB,CAAC,kBAAkB,EAAE,aAAa,CAAC,CAAC;AACxE,CAAC;AAjBD,oEAiBC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GenerateAppSchemaParameters } from '
|
|
1
|
+
import type { GenerateAppSchemaParameters } from '@sap/ux-specification-types';
|
|
2
2
|
import type { EntitySet } from '@sap-ux/vocabularies-types';
|
|
3
3
|
/**
|
|
4
4
|
* Generates an app specific schema for the FE V4 ListReport from the generic schema.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listReport.d.ts","sourceRoot":"","sources":["../../../../../src/sync/v4/generate/listReport.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"listReport.d.ts","sourceRoot":"","sources":["../../../../../src/sync/v4/generate/listReport.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAM,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AACnF,OAAO,KAAK,EAAkB,SAAS,EAAc,MAAM,4BAA4B,CAAC;AA+6BxF;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CACtC,kBAAkB,EAAE,2BAA2B,EAC/C,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,MAAM,GACrB,MAAM,CAsCR"}
|
|
@@ -22,7 +22,7 @@ function addSelectionFields(entityType, appSchema, selectionFieldsAnnotation) {
|
|
|
22
22
|
if (!entityType) {
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
|
-
selectionFieldsDefinition[
|
|
25
|
+
selectionFieldsDefinition[ux_specification_types_1.SchemaTag.annotationPath] = common_1.createAnnotationPath(entityType.fullyQualifiedName, "com.sap.vocabularies.UI.v1.SelectionFields" /* SelectionFields */);
|
|
26
26
|
if (!selectionFieldsAnnotation) {
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
@@ -36,13 +36,14 @@ function addSelectionFields(entityType, appSchema, selectionFieldsAnnotation) {
|
|
|
36
36
|
selectionFieldsDefinition['properties'][fieldDefinition] = {
|
|
37
37
|
$ref: common_1.DEFINITION_LINK_PREFIX + fieldDefinition
|
|
38
38
|
};
|
|
39
|
-
selectionFieldsDefinition['properties'][fieldDefinition][
|
|
39
|
+
selectionFieldsDefinition['properties'][fieldDefinition][ux_specification_types_1.SchemaTag.propertyIndex] = i;
|
|
40
40
|
const dataType = common_1.determineDataType(selectionField);
|
|
41
41
|
appSchema['definitions'][fieldDefinition] = {
|
|
42
42
|
type: 'object',
|
|
43
43
|
properties: {},
|
|
44
44
|
description,
|
|
45
|
-
|
|
45
|
+
key: `Value: ${selectionField.value}`,
|
|
46
|
+
annotationPath: `${selectionFieldsDefinition[ux_specification_types_1.SchemaTag.annotationPath]}/${i}`,
|
|
46
47
|
isViewNode: true,
|
|
47
48
|
additionalProperties: false,
|
|
48
49
|
annotationType: selectionField?.type,
|
|
@@ -70,25 +71,25 @@ function defineActions(appSchema, schemaIdForActions, annotations, targetAnnotat
|
|
|
70
71
|
const actions = appSchema.definitions[schemaIdForActions];
|
|
71
72
|
actions.properties = {};
|
|
72
73
|
actions.additionalProperties = false;
|
|
73
|
-
const chartAnnotation = annotations[targetAnnotation?.split(`${
|
|
74
|
+
const chartAnnotation = annotations[targetAnnotation?.split(`${ux_specification_types_1.UIVOCABULARY}.`)[1]];
|
|
74
75
|
if (chartAnnotation && chartAnnotation.Actions) {
|
|
75
76
|
let i = 0;
|
|
76
77
|
chartAnnotation.Actions.forEach((actionRecord) => {
|
|
77
|
-
const actionDefinition = common_1.prepareRef(`${
|
|
78
|
+
const actionDefinition = common_1.prepareRef(`${ux_specification_types_1.DefinitionName.ChartToolBarAction}<${actionRecord.Action}>`);
|
|
78
79
|
const description = common_1.getDataFieldDescription(actionRecord, entityType);
|
|
79
|
-
const prefix = actionRecord.$Type.split(`${
|
|
80
|
+
const prefix = actionRecord.$Type.split(`${ux_specification_types_1.UIVOCABULARY}.`)[1];
|
|
80
81
|
const action = (actions.properties[`${prefix}::${actionRecord.Action}`] = {
|
|
81
82
|
$ref: common_1.DEFINITION_LINK_PREFIX + actionDefinition,
|
|
82
83
|
description
|
|
83
84
|
});
|
|
84
85
|
//Add tags
|
|
85
|
-
action[
|
|
86
|
-
action[
|
|
87
|
-
action[
|
|
86
|
+
action[ux_specification_types_1.SchemaTag.propertyIndex] = i;
|
|
87
|
+
action[ux_specification_types_1.SchemaTag.annotationType] = actionRecord.$Type;
|
|
88
|
+
action[ux_specification_types_1.SchemaTag.annotationPath] = `/${actionRecord.fullyQualifiedName}`;
|
|
88
89
|
//as ChartToolBarAction is an empty object, copy ViewToolBarAction and remove properties
|
|
89
|
-
appSchema.definitions[actionDefinition] = JSON.parse(JSON.stringify(appSchema.definitions[
|
|
90
|
+
appSchema.definitions[actionDefinition] = JSON.parse(JSON.stringify(appSchema.definitions[ux_specification_types_1.DefinitionName.ViewToolBarAction]));
|
|
90
91
|
appSchema.definitions[actionDefinition].properties = {};
|
|
91
|
-
appSchema.definitions[actionDefinition][
|
|
92
|
+
appSchema.definitions[actionDefinition][ux_specification_types_1.SchemaTag.annotationPath] = actionRecord.fullyQualifiedName;
|
|
92
93
|
i++;
|
|
93
94
|
});
|
|
94
95
|
}
|
|
@@ -112,7 +113,7 @@ function findTheRightVisualization(allVisualizations, alias, namespace, viewKey,
|
|
|
112
113
|
}
|
|
113
114
|
else if (viewKey === 'secondary') {
|
|
114
115
|
visualizationObject = allVisualizations.find((vis) => {
|
|
115
|
-
return vis['value'].indexOf(
|
|
116
|
+
return vis['value'].indexOf(ux_specification_types_1.FacetBase.LineItem) > -1;
|
|
116
117
|
});
|
|
117
118
|
}
|
|
118
119
|
else {
|
|
@@ -128,7 +129,7 @@ function findTheRightVisualization(allVisualizations, alias, namespace, viewKey,
|
|
|
128
129
|
targetAnnotation = `/${namespace}/${visualizationObject['$target'].fullyQualifiedName.split(namespace)[1]}`;
|
|
129
130
|
}
|
|
130
131
|
else if (visualization) {
|
|
131
|
-
targetAnnotation = `/${namespace}/` + visualization.replace(`UI`,
|
|
132
|
+
targetAnnotation = `/${namespace}/` + visualization.replace(`UI`, ux_specification_types_1.UIVOCABULARY);
|
|
132
133
|
}
|
|
133
134
|
}
|
|
134
135
|
return { visualization, targetAnnotation };
|
|
@@ -164,14 +165,14 @@ function analyzeChartAnnotation(namespace, annotationPath, annotationAVT, viewKe
|
|
|
164
165
|
function analyzeViewAnnotation(annotationPath, uIAnnotations, generateParameters, viewKey, visualizationType) {
|
|
165
166
|
let namespace = undefined, title;
|
|
166
167
|
const UILINEITEM = '@UI.LineItem';
|
|
167
|
-
const annotationInManifest = annotationPath?.split(`${
|
|
168
|
+
const annotationInManifest = annotationPath?.split(`${ux_specification_types_1.UIVOCABULARY}.`)[1];
|
|
168
169
|
const annotationAVT = annotationInManifest && uIAnnotations[annotationInManifest];
|
|
169
170
|
if (!annotationAVT) {
|
|
170
171
|
return { visualization: undefined, targetAnnotation: undefined, namespace, title: `View (${viewKey})` };
|
|
171
172
|
}
|
|
172
173
|
title = annotationAVT.Text;
|
|
173
174
|
namespace = annotationAVT.fullyQualifiedName.split('@com.sap.vocabularies.UI.v1.')[0];
|
|
174
|
-
const alias = common_1.findAlias(
|
|
175
|
+
const alias = common_1.findAlias(ux_specification_types_1.UIVOCABULARY, generateParameters.serviceAVT);
|
|
175
176
|
if (annotationInManifest.startsWith('PresentationVariant')) {
|
|
176
177
|
const { visualization, targetAnnotation } = findTheRightVisualization(annotationAVT.Visualizations, alias, namespace, viewKey, visualizationType);
|
|
177
178
|
title = title || `View (${viewKey})`;
|
|
@@ -181,7 +182,7 @@ function analyzeViewAnnotation(annotationPath, uIAnnotations, generateParameters
|
|
|
181
182
|
let { visualization, targetAnnotation } = findTheRightVisualization(annotationAVT.PresentationVariant.Visualizations, alias, namespace, viewKey, visualizationType);
|
|
182
183
|
if (!visualization) {
|
|
183
184
|
visualization = UILINEITEM; // default visualization
|
|
184
|
-
targetAnnotation = `/${namespace}/` + visualization.replace(`UI`,
|
|
185
|
+
targetAnnotation = `/${namespace}/` + visualization.replace(`UI`, ux_specification_types_1.UIVOCABULARY); // default targetAnnotation
|
|
185
186
|
}
|
|
186
187
|
title = title || `View (${viewKey})`;
|
|
187
188
|
return { visualization, targetAnnotation, namespace, title };
|
|
@@ -211,25 +212,25 @@ function analyzeViewAnnotation(annotationPath, uIAnnotations, generateParameters
|
|
|
211
212
|
* @param annotations - UI annotations, as determined by AVT
|
|
212
213
|
*/
|
|
213
214
|
function addALPChartView(appSchema, chartAnnotationPath, targetAnnotation, annotations) {
|
|
214
|
-
const chartView = appSchema.definitions[
|
|
215
|
-
appSchema.definitions[
|
|
216
|
-
delete appSchema.definitions[
|
|
215
|
+
const chartView = appSchema.definitions[ux_specification_types_1.DefinitionName.ALPChartView];
|
|
216
|
+
appSchema.definitions[ux_specification_types_1.DefinitionName.ALPChart] = JSON.parse(JSON.stringify(chartView));
|
|
217
|
+
delete appSchema.definitions[ux_specification_types_1.DefinitionName.ALPChart][ux_specification_types_1.SchemaTag.isViewNode];
|
|
217
218
|
if (targetAnnotation) {
|
|
218
|
-
appSchema.definitions[
|
|
219
|
+
appSchema.definitions[ux_specification_types_1.DefinitionName.ALPChart][ux_specification_types_1.SchemaTag.annotationPath] = targetAnnotation;
|
|
219
220
|
}
|
|
220
|
-
appSchema.definitions[
|
|
221
|
-
chartView.properties.annotationPath[
|
|
221
|
+
appSchema.definitions[ux_specification_types_1.DefinitionName.ALPChart].properties.annotationPath[ux_specification_types_1.SchemaTag.hidden] = true;
|
|
222
|
+
chartView.properties.annotationPath[ux_specification_types_1.SchemaTag.hidden] = true;
|
|
222
223
|
chartView.additionalProperties = false;
|
|
223
224
|
chartView.description = `Chart (key: primary)`;
|
|
224
225
|
chartView.title = `Chart`;
|
|
225
|
-
chartView.$ref = `${common_1.DEFINITION_LINK_PREFIX}${
|
|
226
|
+
chartView.$ref = `${common_1.DEFINITION_LINK_PREFIX}${ux_specification_types_1.DefinitionName.ALPChart}`;
|
|
226
227
|
if (chartAnnotationPath) {
|
|
227
|
-
const viewAnnotation = chartAnnotationPath.split(
|
|
228
|
+
const viewAnnotation = chartAnnotationPath.split(ux_specification_types_1.UIVOCABULARYDOT)[1];
|
|
228
229
|
const pathParts = annotations[viewAnnotation].fullyQualifiedName.split('@');
|
|
229
|
-
chartView[
|
|
230
|
+
chartView[ux_specification_types_1.SchemaTag.annotationPath] = `/${pathParts[0]}/@${pathParts[1]}`;
|
|
230
231
|
}
|
|
231
|
-
chartView[
|
|
232
|
-
chartView[
|
|
232
|
+
chartView[ux_specification_types_1.SchemaTag.artifactType] = ux_specification_types_1.ArtifactType.Manifest;
|
|
233
|
+
chartView[ux_specification_types_1.SchemaTag.key] = 'primary';
|
|
233
234
|
}
|
|
234
235
|
/**
|
|
235
236
|
* Adds the ALP views to the app-specific schema
|
|
@@ -243,49 +244,49 @@ function addALPChartView(appSchema, chartAnnotationPath, targetAnnotation, annot
|
|
|
243
244
|
function addALPViews(appSchema, viewsPaths, entityType, generateParameters, templateAnnotation, v4Page, tableDefinitionName) {
|
|
244
245
|
const annotations = entityType.annotations.UI;
|
|
245
246
|
//1. Chart View
|
|
246
|
-
const chartAnnotationPath = viewsPaths?.[0]?.['primary']?.[0]?.[
|
|
247
|
+
const chartAnnotationPath = viewsPaths?.[0]?.['primary']?.[0]?.[ux_specification_types_1.SchemaTag.annotationPath];
|
|
247
248
|
const { targetAnnotation } = analyzeViewAnnotation(chartAnnotationPath, annotations, generateParameters, 'primary');
|
|
248
249
|
addALPChartView(appSchema, chartAnnotationPath, targetAnnotation, annotations);
|
|
249
250
|
// Copy toolbar
|
|
250
251
|
const schemaIdForActions = `Actions<ALPChart>`;
|
|
251
|
-
appSchema.definitions[
|
|
252
|
+
appSchema.definitions[ux_specification_types_1.DefinitionName.ViewChartToolBar].properties.actions['$ref'] =
|
|
252
253
|
common_1.DEFINITION_LINK_PREFIX + schemaIdForActions;
|
|
253
254
|
defineActions(appSchema, schemaIdForActions, annotations, targetAnnotation, entityType);
|
|
254
255
|
//2. Table View
|
|
255
|
-
const { visualization: tableVisualization, targetAnnotation: target } = analyzeViewAnnotation(viewsPaths?.[0]?.['secondary']?.[0]?.[
|
|
256
|
+
const { visualization: tableVisualization, targetAnnotation: target } = analyzeViewAnnotation(viewsPaths?.[0]?.['secondary']?.[0]?.[ux_specification_types_1.SchemaTag.annotationPath], annotations, generateParameters, 'secondary');
|
|
256
257
|
const tableDefinition = appSchema.definitions[tableDefinitionName];
|
|
257
258
|
if (tableVisualization || templateAnnotation) {
|
|
258
|
-
tableDefinition.properties.toolBar['$ref'] = `${common_1.DEFINITION_LINK_PREFIX}${
|
|
259
|
+
tableDefinition.properties.toolBar['$ref'] = `${common_1.DEFINITION_LINK_PREFIX}${ux_specification_types_1.DefinitionName.ToolBarLR}`;
|
|
259
260
|
// Switch from generic column to specific definition
|
|
260
261
|
tableDefinition.properties['columns'] = {
|
|
261
|
-
$ref: common_1.DEFINITION_LINK_PREFIX +
|
|
262
|
+
$ref: common_1.DEFINITION_LINK_PREFIX + ux_specification_types_1.DefinitionName.LineItems
|
|
262
263
|
};
|
|
263
|
-
tableDefinition.properties.annotationPath[
|
|
264
|
+
tableDefinition.properties.annotationPath[ux_specification_types_1.SchemaTag.hidden] = true;
|
|
264
265
|
}
|
|
265
266
|
else {
|
|
266
267
|
tableDefinition.properties = {};
|
|
267
268
|
}
|
|
268
|
-
const tableView = appSchema.definitions[
|
|
269
|
-
appSchema.definitions[
|
|
270
|
-
delete appSchema.definitions[
|
|
269
|
+
const tableView = appSchema.definitions[ux_specification_types_1.DefinitionName.ALPTableView];
|
|
270
|
+
appSchema.definitions[ux_specification_types_1.DefinitionName.ALPTable] = JSON.parse(JSON.stringify(tableView));
|
|
271
|
+
delete appSchema.definitions[ux_specification_types_1.DefinitionName.ALPTable][ux_specification_types_1.SchemaTag.isViewNode];
|
|
271
272
|
tableView.additionalProperties = false;
|
|
272
273
|
tableView.description = `Table (key: secondary)`;
|
|
273
274
|
tableView.title = `Table`;
|
|
274
275
|
if (tableVisualization) {
|
|
275
276
|
delete tableView.properties;
|
|
276
|
-
tableView.$ref = `${common_1.DEFINITION_LINK_PREFIX}${
|
|
277
|
+
tableView.$ref = `${common_1.DEFINITION_LINK_PREFIX}${ux_specification_types_1.DefinitionName.ALPTable}`;
|
|
277
278
|
}
|
|
278
279
|
else if (!templateAnnotation) {
|
|
279
280
|
tableView.properties = {};
|
|
280
281
|
}
|
|
281
|
-
tableView[
|
|
282
|
+
tableView[ux_specification_types_1.SchemaTag.artifactType] = ux_specification_types_1.ArtifactType.Manifest;
|
|
282
283
|
let annotationTerm, viewAnnotation;
|
|
283
|
-
if (tableVisualization && tableVisualization.indexOf(
|
|
284
|
+
if (tableVisualization && tableVisualization.indexOf(ux_specification_types_1.FacetBase.LineItem) > -1) {
|
|
284
285
|
annotationTerm = tableVisualization.split('.')[1];
|
|
285
|
-
viewAnnotation = viewsPaths[0]['secondary'][0].annotationPath.split(
|
|
286
|
+
viewAnnotation = viewsPaths[0]['secondary'][0].annotationPath.split(ux_specification_types_1.UIVOCABULARYDOT)[1];
|
|
286
287
|
}
|
|
287
288
|
else if (templateAnnotation) {
|
|
288
|
-
annotationTerm = viewAnnotation = templateAnnotation.split(
|
|
289
|
+
annotationTerm = viewAnnotation = templateAnnotation.split(ux_specification_types_1.UIVOCABULARYDOT)[1];
|
|
289
290
|
}
|
|
290
291
|
if (annotationTerm) {
|
|
291
292
|
const dataForLineItem = {
|
|
@@ -293,19 +294,19 @@ function addALPViews(appSchema, viewsPaths, entityType, generateParameters, temp
|
|
|
293
294
|
lineItemAnnotation: entityType.annotations.UI[annotationTerm],
|
|
294
295
|
entityType,
|
|
295
296
|
oDataServiceAVT: generateParameters.serviceAVT,
|
|
296
|
-
lineItemId:
|
|
297
|
+
lineItemId: ux_specification_types_1.DefinitionName.LineItems
|
|
297
298
|
};
|
|
298
|
-
utils_1.addLineItemsTypeToSchema(dataForLineItem,
|
|
299
|
-
appSchema.definitions[
|
|
299
|
+
utils_1.addLineItemsTypeToSchema(dataForLineItem, ux_specification_types_1.DefinitionName.ViewTableColumn);
|
|
300
|
+
appSchema.definitions[ux_specification_types_1.DefinitionName.ALPTable][ux_specification_types_1.SchemaTag.annotationPath] = target;
|
|
300
301
|
const pathParts = annotations[viewAnnotation].fullyQualifiedName.split('@');
|
|
301
|
-
tableView[
|
|
302
|
-
tableView[
|
|
302
|
+
tableView[ux_specification_types_1.SchemaTag.annotationPath] = `/${pathParts[0]}/@${pathParts[1]}`;
|
|
303
|
+
tableView[ux_specification_types_1.SchemaTag.key] = 'secondary';
|
|
303
304
|
}
|
|
304
305
|
utils_1.addCustomColumnDefinition(appSchema, v4Page, generateParameters.logger);
|
|
305
306
|
// Table toolbar actions with custom actions
|
|
306
|
-
const schemaIdForToolbarActions = `${
|
|
307
|
+
const schemaIdForToolbarActions = `${ux_specification_types_1.DefinitionName.Actions}<${common_1.prepareRef(ux_specification_types_1.DefinitionName.LineItems)}>`;
|
|
307
308
|
utils_1.addCustomActionDefinition(appSchema, v4Page, generateParameters.logger, undefined, schemaIdForToolbarActions);
|
|
308
|
-
utils_1.addEnumForActionAnchor(appSchema, schemaIdForToolbarActions,
|
|
309
|
+
utils_1.addEnumForActionAnchor(appSchema, schemaIdForToolbarActions, ux_specification_types_1.DefinitionName.CustomActionPosition);
|
|
309
310
|
}
|
|
310
311
|
/**
|
|
311
312
|
* Modifies the app schema, adds the right line chart settings
|
|
@@ -314,21 +315,21 @@ function addALPViews(appSchema, viewsPaths, entityType, generateParameters, temp
|
|
|
314
315
|
* @returns the ID for the chart view in schema
|
|
315
316
|
*/
|
|
316
317
|
function addViewChartDefinitions(inputParameters, annotations) {
|
|
317
|
-
const idForChart = `${
|
|
318
|
-
inputParameters.appSchema.definitions[idForChart] = JSON.parse(JSON.stringify(inputParameters.appSchema.definitions[
|
|
319
|
-
delete inputParameters.appSchema.definitions[idForChart][
|
|
320
|
-
inputParameters.appSchema.definitions[idForChart][
|
|
318
|
+
const idForChart = `${ux_specification_types_1.DefinitionName.LRChartView}<${inputParameters.viewKey}>`;
|
|
319
|
+
inputParameters.appSchema.definitions[idForChart] = JSON.parse(JSON.stringify(inputParameters.appSchema.definitions[ux_specification_types_1.DefinitionName.LRChartView]));
|
|
320
|
+
delete inputParameters.appSchema.definitions[idForChart][ux_specification_types_1.SchemaTag.isViewNode];
|
|
321
|
+
inputParameters.appSchema.definitions[idForChart][ux_specification_types_1.SchemaTag.annotationPath] = inputParameters.targetAnnotation;
|
|
321
322
|
if (inputParameters.navPropName) {
|
|
322
323
|
inputParameters.appSchema.definitions[idForChart]['navigationProperty'] = inputParameters.navPropName;
|
|
323
324
|
}
|
|
324
325
|
//Copy toolbar
|
|
325
|
-
const idForToolbar = `${
|
|
326
|
-
inputParameters.appSchema.definitions[idForToolbar] = JSON.parse(JSON.stringify(inputParameters.appSchema.definitions[
|
|
326
|
+
const idForToolbar = `${ux_specification_types_1.DefinitionName.ViewChartToolBar}<${inputParameters.viewKey}>`;
|
|
327
|
+
inputParameters.appSchema.definitions[idForToolbar] = JSON.parse(JSON.stringify(inputParameters.appSchema.definitions[ux_specification_types_1.DefinitionName.ViewChartToolBar]));
|
|
327
328
|
inputParameters.appSchema.definitions[idForChart]['properties'].toolBar.$ref = `${common_1.DEFINITION_LINK_PREFIX}${idForToolbar}`;
|
|
328
329
|
//Copy actions
|
|
329
|
-
const schemaIdForActions = `${
|
|
330
|
+
const schemaIdForActions = `${ux_specification_types_1.DefinitionName.Actions}<${inputParameters.viewKey}>`;
|
|
330
331
|
defineActions(inputParameters.appSchema, schemaIdForActions, annotations, inputParameters.targetAnnotation, inputParameters.targetEntityType);
|
|
331
|
-
inputParameters.appSchema.definitions[idForToolbar]['properties'][
|
|
332
|
+
inputParameters.appSchema.definitions[idForToolbar]['properties'][ux_specification_types_1.PropertyName.actions]['$ref'] = `${common_1.DEFINITION_LINK_PREFIX}${schemaIdForActions}`;
|
|
332
333
|
return idForChart;
|
|
333
334
|
}
|
|
334
335
|
/**
|
|
@@ -342,9 +343,9 @@ function addViewChartDefinitions(inputParameters, annotations) {
|
|
|
342
343
|
*/
|
|
343
344
|
function addViewChart(inputParameters, UIAnnotations, appSchema, viewsDefinition, viewKey, title) {
|
|
344
345
|
const idForChart = addViewChartDefinitions(inputParameters, UIAnnotations);
|
|
345
|
-
appSchema.definitions[idForChart].properties.annotationPath[
|
|
346
|
-
appSchema.definitions[idForChart].properties.index[
|
|
347
|
-
appSchema.definitions[idForChart].properties.entitySet[
|
|
346
|
+
appSchema.definitions[idForChart].properties.annotationPath[ux_specification_types_1.SchemaTag.hidden] = true;
|
|
347
|
+
appSchema.definitions[idForChart].properties.index[ux_specification_types_1.SchemaTag.hidden] = true;
|
|
348
|
+
appSchema.definitions[idForChart].properties.entitySet[ux_specification_types_1.SchemaTag.hidden] = true;
|
|
348
349
|
const titleOnHover = `Chart View (key: ${viewKey})`;
|
|
349
350
|
viewsDefinition.properties[viewKey] = {
|
|
350
351
|
$ref: `${common_1.DEFINITION_LINK_PREFIX}${idForChart}`,
|
|
@@ -361,16 +362,16 @@ function addViewChart(inputParameters, UIAnnotations, appSchema, viewsDefinition
|
|
|
361
362
|
* @param {GenerateAppSchemaParameters} generateParameters - list of API input parameters
|
|
362
363
|
*/
|
|
363
364
|
function addViewLineItems(inputParameters, viewsDefinition, visualization, templateAnnotation, generateParameters) {
|
|
364
|
-
const tableId = `${
|
|
365
|
-
const viewId = `${
|
|
366
|
-
const lrTableView = common_1.parseSchemaDefinition(
|
|
367
|
-
delete lrTableView[
|
|
368
|
-
lrTableView[
|
|
365
|
+
const tableId = `${ux_specification_types_1.DefinitionName.LRTableView}<${inputParameters.viewKey}>`;
|
|
366
|
+
const viewId = `${ux_specification_types_1.DefinitionName.LineItemsOfView}::${inputParameters.viewKey}`;
|
|
367
|
+
const lrTableView = common_1.parseSchemaDefinition(ux_specification_types_1.DefinitionName.LRTableView, inputParameters.viewKey, inputParameters.appSchema);
|
|
368
|
+
delete lrTableView[ux_specification_types_1.SchemaTag.isViewNode];
|
|
369
|
+
lrTableView[ux_specification_types_1.SchemaTag.annotationPath] = inputParameters.targetAnnotation;
|
|
369
370
|
if (inputParameters.navPropName) {
|
|
370
371
|
lrTableView['navigationProperty'] = inputParameters.navPropName;
|
|
371
372
|
}
|
|
372
373
|
//Copy toolbar
|
|
373
|
-
common_1.addDefinitionRef(lrTableView.properties.toolBar,
|
|
374
|
+
common_1.addDefinitionRef(lrTableView.properties.toolBar, ux_specification_types_1.DefinitionName.ToolBar, viewId);
|
|
374
375
|
const title = `Table View (key: ${inputParameters.viewKey})`;
|
|
375
376
|
viewsDefinition.properties[inputParameters.viewKey] = {
|
|
376
377
|
$ref: `${common_1.DEFINITION_LINK_PREFIX}${tableId}`,
|
|
@@ -378,10 +379,10 @@ function addViewLineItems(inputParameters, viewsDefinition, visualization, templ
|
|
|
378
379
|
title
|
|
379
380
|
};
|
|
380
381
|
common_1.addDefinitionRef(lrTableView.properties.columns, viewId);
|
|
381
|
-
lrTableView.properties.annotationPath[
|
|
382
|
-
lrTableView.properties.index[
|
|
383
|
-
lrTableView.properties.entitySet[
|
|
384
|
-
const annotationTerm = visualization?.split('.')[1] || templateAnnotation.split(
|
|
382
|
+
lrTableView.properties.annotationPath[ux_specification_types_1.SchemaTag.hidden] = true;
|
|
383
|
+
lrTableView.properties.index[ux_specification_types_1.SchemaTag.hidden] = true;
|
|
384
|
+
lrTableView.properties.entitySet[ux_specification_types_1.SchemaTag.hidden] = true;
|
|
385
|
+
const annotationTerm = visualization?.split('.')[1] || templateAnnotation.split(ux_specification_types_1.UIVOCABULARYDOT)[1];
|
|
385
386
|
const dataForLineItem = {
|
|
386
387
|
appSchema: inputParameters.appSchema,
|
|
387
388
|
lineItemAnnotation: inputParameters.targetEntityType.annotations.UI[annotationTerm],
|
|
@@ -389,7 +390,7 @@ function addViewLineItems(inputParameters, viewsDefinition, visualization, templ
|
|
|
389
390
|
oDataServiceAVT: generateParameters.serviceAVT,
|
|
390
391
|
lineItemId: viewId
|
|
391
392
|
};
|
|
392
|
-
utils_1.addLineItemsTypeToSchema(dataForLineItem,
|
|
393
|
+
utils_1.addLineItemsTypeToSchema(dataForLineItem, ux_specification_types_1.DefinitionName.ViewTableColumn, ux_specification_types_1.DefinitionName.ViewCustomColumn, ux_specification_types_1.DefinitionName.ViewCustomAction);
|
|
393
394
|
}
|
|
394
395
|
/**
|
|
395
396
|
* Adds the schema tags to a given view
|
|
@@ -399,12 +400,12 @@ function addViewLineItems(inputParameters, viewsDefinition, visualization, templ
|
|
|
399
400
|
* @param view - the given view
|
|
400
401
|
*/
|
|
401
402
|
function addTagsToView(viewsDefinition, viewKey, namespace, view) {
|
|
402
|
-
viewsDefinition.properties[viewKey][
|
|
403
|
-
viewsDefinition.properties[viewKey][
|
|
404
|
-
? `/${namespace}/@${view[
|
|
403
|
+
viewsDefinition.properties[viewKey][ux_specification_types_1.SchemaTag.isViewNode] = true;
|
|
404
|
+
viewsDefinition.properties[viewKey][ux_specification_types_1.SchemaTag.annotationPath] = namespace
|
|
405
|
+
? `/${namespace}/@${view[ux_specification_types_1.SchemaTag.annotationPath]}`
|
|
405
406
|
: undefined;
|
|
406
|
-
viewsDefinition.properties[viewKey][
|
|
407
|
-
viewsDefinition.properties[viewKey][
|
|
407
|
+
viewsDefinition.properties[viewKey][ux_specification_types_1.SchemaTag.artifactType] = ux_specification_types_1.ArtifactType.Manifest;
|
|
408
|
+
viewsDefinition.properties[viewKey][ux_specification_types_1.SchemaTag.key] = viewKey;
|
|
408
409
|
}
|
|
409
410
|
/**
|
|
410
411
|
* Adjusts the entity type if a different entity set is maintained for a view
|
|
@@ -433,26 +434,26 @@ function getTargetEntityType(entitySet, view, generateParameters, entityType) {
|
|
|
433
434
|
* @param {SapUiAppPageV4} v4Page - the given page in manifest
|
|
434
435
|
*/
|
|
435
436
|
function addViewCustomExtensions(commonInputParameters, generateParameters, visualization, v4Page) {
|
|
436
|
-
const sectionId = `${
|
|
437
|
+
const sectionId = `${ux_specification_types_1.DefinitionName.LineItemsOfView}::${commonInputParameters.viewKey}`;
|
|
437
438
|
const navigationProperty = commonInputParameters.navPropName ? `${commonInputParameters.navPropName}/` : '';
|
|
438
439
|
const sectionIdInManifest = `${navigationProperty}@${"com.sap.vocabularies.UI.v1.LineItem" /* LineItem */}${visualization.split(ux_specification_types_1.Visualization.LineItem)[1]}`;
|
|
439
|
-
const viewColumnDefinition = common_1.parseSchemaDefinition(
|
|
440
|
-
common_1.addDefinitionRef(viewColumnDefinition.properties.position,
|
|
441
|
-
common_1.parseSchemaDefinition(
|
|
442
|
-
utils_1.addCustomColumnDefinition(commonInputParameters.appSchema, v4Page, generateParameters.logger, `${
|
|
443
|
-
utils_1.addFragmentEnumForAnchor(commonInputParameters.appSchema, sectionId, v4Page, `${
|
|
440
|
+
const viewColumnDefinition = common_1.parseSchemaDefinition(ux_specification_types_1.DefinitionName.ViewCustomColumn, sectionId, commonInputParameters.appSchema);
|
|
441
|
+
common_1.addDefinitionRef(viewColumnDefinition.properties.position, ux_specification_types_1.DefinitionName.ViewPosition, sectionId);
|
|
442
|
+
common_1.parseSchemaDefinition(ux_specification_types_1.DefinitionName.ViewPosition, sectionId, commonInputParameters.appSchema);
|
|
443
|
+
utils_1.addCustomColumnDefinition(commonInputParameters.appSchema, v4Page, generateParameters.logger, `${ux_specification_types_1.DefinitionName.ViewCustomColumn}<${sectionId}>`, sectionId, sectionIdInManifest);
|
|
444
|
+
utils_1.addFragmentEnumForAnchor(commonInputParameters.appSchema, sectionId, v4Page, `${ux_specification_types_1.DefinitionName.ViewPosition}<${sectionId}>`, sectionIdInManifest);
|
|
444
445
|
// Remove generic position
|
|
445
446
|
if (commonInputParameters.appSchema.definitions.Position) {
|
|
446
447
|
delete commonInputParameters.appSchema.definitions.Position;
|
|
447
448
|
delete commonInputParameters.appSchema.definitions.TableCustomColumn;
|
|
448
449
|
}
|
|
449
450
|
// Table toolbar actions with custom actions
|
|
450
|
-
const schemaIdForToolbarActions = `${
|
|
451
|
-
const customActionDefinitionKey = `${
|
|
451
|
+
const schemaIdForToolbarActions = `${ux_specification_types_1.DefinitionName.Actions}<${sectionId}>`;
|
|
452
|
+
const customActionDefinitionKey = `${ux_specification_types_1.DefinitionName.ViewCustomAction}<${sectionId}>`;
|
|
452
453
|
utils_1.addCustomActionDefinition(commonInputParameters.appSchema, v4Page, generateParameters.logger, customActionDefinitionKey, schemaIdForToolbarActions, sectionIdInManifest);
|
|
453
454
|
// Anchor selection
|
|
454
|
-
common_1.parseSchemaDefinition(
|
|
455
|
-
const customActionPositionDefinitionKey = `${
|
|
455
|
+
common_1.parseSchemaDefinition(ux_specification_types_1.DefinitionName.ViewCustomActionPosition, sectionId, commonInputParameters.appSchema);
|
|
456
|
+
const customActionPositionDefinitionKey = `${ux_specification_types_1.DefinitionName.ViewCustomActionPosition}<${sectionId}>`;
|
|
456
457
|
const customActionDefinition = commonInputParameters.appSchema.definitions[customActionDefinitionKey];
|
|
457
458
|
customActionDefinition.properties.position.$ref = `${common_1.DEFINITION_LINK_PREFIX}${customActionPositionDefinitionKey}`;
|
|
458
459
|
utils_1.addEnumForActionAnchor(commonInputParameters.appSchema, schemaIdForToolbarActions, customActionPositionDefinitionKey);
|
|
@@ -488,7 +489,7 @@ function addLRViewParts(visualization, viewsDefinition, commonInputParameters, g
|
|
|
488
489
|
description: commonInputParameters.title || titleOnHover,
|
|
489
490
|
title: titleOnHover,
|
|
490
491
|
// Default view - use table view reference as default
|
|
491
|
-
$ref: `${common_1.DEFINITION_LINK_PREFIX}${
|
|
492
|
+
$ref: `${common_1.DEFINITION_LINK_PREFIX}${ux_specification_types_1.DefinitionName.TableViewExtension}`
|
|
492
493
|
};
|
|
493
494
|
}
|
|
494
495
|
else {
|
|
@@ -497,7 +498,7 @@ function addLRViewParts(visualization, viewsDefinition, commonInputParameters, g
|
|
|
497
498
|
description: commonInputParameters.title || titleOnHover,
|
|
498
499
|
title: titleOnHover,
|
|
499
500
|
// Default view - use table view reference as default
|
|
500
|
-
$ref: `${common_1.DEFINITION_LINK_PREFIX}${
|
|
501
|
+
$ref: `${common_1.DEFINITION_LINK_PREFIX}${ux_specification_types_1.DefinitionName.LRTableView}`
|
|
501
502
|
};
|
|
502
503
|
}
|
|
503
504
|
}
|
|
@@ -520,19 +521,19 @@ function addLRViews(appSchema, viewsPaths, entityType, entitySet, generateParame
|
|
|
520
521
|
};
|
|
521
522
|
const viewsDefinition = appSchema.definitions.MultiTableModeV4;
|
|
522
523
|
for (const view of viewsPaths) {
|
|
523
|
-
if (!view[
|
|
524
|
+
if (!view[ux_specification_types_1.SchemaTag.key]) {
|
|
524
525
|
continue;
|
|
525
526
|
}
|
|
526
527
|
let navPropName = undefined;
|
|
527
528
|
const targetEntityType = getTargetEntityType(entitySet, view, generateParameters, entityType);
|
|
528
529
|
const uiAnnotations = targetEntityType.annotations.UI;
|
|
529
|
-
const { visualization, targetAnnotation, namespace, title } = analyzeViewAnnotation(view?.[
|
|
530
|
+
const { visualization, targetAnnotation, namespace, title } = analyzeViewAnnotation(view?.[ux_specification_types_1.SchemaTag.annotationPath], uiAnnotations, generateParameters, view[ux_specification_types_1.SchemaTag.key]);
|
|
530
531
|
if (view['entitySet']) {
|
|
531
532
|
navPropName = entityType.navigationProperties.find((np) => {
|
|
532
533
|
return np.targetTypeName === namespace;
|
|
533
534
|
})?.name;
|
|
534
535
|
}
|
|
535
|
-
const viewKey = common_1.prepareRef(view[
|
|
536
|
+
const viewKey = common_1.prepareRef(view[ux_specification_types_1.SchemaTag.key]);
|
|
536
537
|
const commonInputParameters = {
|
|
537
538
|
viewKey,
|
|
538
539
|
appSchema,
|
|
@@ -560,17 +561,17 @@ function adaptTableDefinition(appSchema, entityType, generateParameters, templat
|
|
|
560
561
|
const { visualization, targetAnnotation, namespace } = analyzeViewAnnotation(templateAnnotation, entityType.annotations.UI, generateParameters, undefined, ux_specification_types_1.Visualization.LineItem);
|
|
561
562
|
if (visualization) {
|
|
562
563
|
const annotationTerm = visualization.split('.')[1];
|
|
563
|
-
const annotationTermInSchema = `${
|
|
564
|
+
const annotationTermInSchema = `${ux_specification_types_1.DefinitionName.LineItems}OfSPV::${common_1.prepareRef(annotationTerm)}`;
|
|
564
565
|
const spvTable = (appSchema.definitions[`${tableDefinitionName}SPV`] = JSON.parse(JSON.stringify(appSchema.definitions[tableDefinitionName])));
|
|
565
|
-
delete spvTable[
|
|
566
|
-
common_1.addDefinitionRef(spvTable.properties.toolBar,
|
|
566
|
+
delete spvTable[ux_specification_types_1.SchemaTag.isViewNode];
|
|
567
|
+
common_1.addDefinitionRef(spvTable.properties.toolBar, ux_specification_types_1.DefinitionName.ToolBar, annotationTermInSchema);
|
|
567
568
|
// Switch from generic column to specific definition
|
|
568
|
-
spvTable[
|
|
569
|
+
spvTable[ux_specification_types_1.SchemaTag.annotationPath] = targetAnnotation;
|
|
569
570
|
spvTable.properties.columns = {};
|
|
570
571
|
common_1.addDefinitionRef(spvTable.properties.columns, annotationTermInSchema);
|
|
571
572
|
delete tableDefinition.properties;
|
|
572
573
|
common_1.addDefinitionRef(tableDefinition, `${tableDefinitionName}SPV`);
|
|
573
|
-
tableDefinition[
|
|
574
|
+
tableDefinition[ux_specification_types_1.SchemaTag.annotationPath] = `/${namespace}/@${templateAnnotation}`;
|
|
574
575
|
const lineItemAnnotation = entityType.annotations.UI[annotationTerm];
|
|
575
576
|
const dataForLineItem = {
|
|
576
577
|
appSchema,
|
|
@@ -587,33 +588,33 @@ function adaptTableDefinition(appSchema, entityType, generateParameters, templat
|
|
|
587
588
|
utils_1.addCustomColumnDefinition(appSchema, v4Page, generateParameters.logger, undefined, annotationTermInSchema, sectionIdInManifest);
|
|
588
589
|
utils_1.addFragmentEnumForAnchor(appSchema, annotationTermInSchema, v4Page, undefined, sectionIdInManifest);
|
|
589
590
|
// Table toolbar actions with custom actions
|
|
590
|
-
const schemaIdForToolbarActions = `${
|
|
591
|
-
const customColumnDefinitionName = common_1.getCustomExtensionDefinitionName(appSchema, annotationTermInSchema,
|
|
591
|
+
const schemaIdForToolbarActions = `${ux_specification_types_1.DefinitionName.Actions}<${annotationTermInSchema}>`;
|
|
592
|
+
const customColumnDefinitionName = common_1.getCustomExtensionDefinitionName(appSchema, annotationTermInSchema, ux_specification_types_1.DefinitionName.CustomAction);
|
|
592
593
|
utils_1.addCustomActionDefinition(appSchema, v4Page, generateParameters.logger, common_1.getDefinitionKey(customColumnDefinitionName), schemaIdForToolbarActions, sectionIdInManifest);
|
|
593
|
-
utils_1.addEnumForActionAnchor(appSchema, schemaIdForToolbarActions,
|
|
594
|
+
utils_1.addEnumForActionAnchor(appSchema, schemaIdForToolbarActions, ux_specification_types_1.DefinitionName.CustomActionPosition);
|
|
594
595
|
}
|
|
595
596
|
else {
|
|
596
|
-
tableDefinition.properties.toolBar['$ref'] = `${common_1.DEFINITION_LINK_PREFIX}${
|
|
597
|
+
tableDefinition.properties.toolBar['$ref'] = `${common_1.DEFINITION_LINK_PREFIX}${ux_specification_types_1.DefinitionName.ToolBarLR}`;
|
|
597
598
|
// Switch from generic column to specific definition
|
|
598
|
-
common_1.addDefinitionRef(tableDefinition.properties.columns,
|
|
599
|
+
common_1.addDefinitionRef(tableDefinition.properties.columns, ux_specification_types_1.DefinitionName.LineItems);
|
|
599
600
|
const lineItemAnnotation = entityType?.annotations?.[alias]?.LineItem;
|
|
600
601
|
const dataForLineItem = {
|
|
601
602
|
appSchema,
|
|
602
603
|
lineItemAnnotation,
|
|
603
604
|
entityType,
|
|
604
605
|
oDataServiceAVT: generateParameters.serviceAVT,
|
|
605
|
-
lineItemId:
|
|
606
|
+
lineItemId: ux_specification_types_1.DefinitionName.LineItems
|
|
606
607
|
};
|
|
607
608
|
utils_1.addLineItemsTypeToSchema(dataForLineItem);
|
|
608
609
|
utils_1.addCustomColumnDefinition(appSchema, v4Page, generateParameters.logger);
|
|
609
|
-
utils_1.addFragmentEnumForAnchor(appSchema,
|
|
610
|
+
utils_1.addFragmentEnumForAnchor(appSchema, ux_specification_types_1.DefinitionName.LineItems, v4Page);
|
|
610
611
|
if (lineItemAnnotation) {
|
|
611
|
-
tableDefinition[
|
|
612
|
+
tableDefinition[ux_specification_types_1.SchemaTag.annotationPath] = common_1.createAnnotationPath(entityType.fullyQualifiedName, lineItemAnnotation.term, lineItemAnnotation.qualifier);
|
|
612
613
|
}
|
|
613
614
|
// Table toolbar actions with custom actions
|
|
614
|
-
const schemaIdForActions = `${
|
|
615
|
+
const schemaIdForActions = `${ux_specification_types_1.DefinitionName.Actions}<${common_1.prepareRef(ux_specification_types_1.DefinitionName.LineItems)}>`;
|
|
615
616
|
utils_1.addCustomActionDefinition(appSchema, v4Page, generateParameters.logger, undefined, schemaIdForActions);
|
|
616
|
-
utils_1.addEnumForActionAnchor(appSchema, schemaIdForActions,
|
|
617
|
+
utils_1.addEnumForActionAnchor(appSchema, schemaIdForActions, ux_specification_types_1.DefinitionName.CustomActionPosition);
|
|
617
618
|
}
|
|
618
619
|
}
|
|
619
620
|
/**
|
|
@@ -623,13 +624,13 @@ function adaptTableDefinition(appSchema, entityType, generateParameters, templat
|
|
|
623
624
|
* @returns {string} annotation term
|
|
624
625
|
*/
|
|
625
626
|
function getDefaultAnnotationPath(v4Page, entityType, templateType) {
|
|
626
|
-
if (v4Page.options.settings?.views?.paths && templateType ===
|
|
627
|
+
if (v4Page.options.settings?.views?.paths && templateType === ux_specification_types_1.TemplateType.ListReportObjectPageV4) {
|
|
627
628
|
return;
|
|
628
629
|
}
|
|
629
630
|
if (v4Page.options.settings?.defaultTemplateAnnotationPath) {
|
|
630
631
|
return v4Page.options.settings.defaultTemplateAnnotationPath;
|
|
631
632
|
}
|
|
632
|
-
if (templateType ===
|
|
633
|
+
if (templateType === ux_specification_types_1.TemplateType.ListReportObjectPageV4) {
|
|
633
634
|
return (entityType.annotations.UI?.SelectionPresentationVariant?.term ||
|
|
634
635
|
entityType.annotations.UI?.PresentationVariant?.term);
|
|
635
636
|
}
|
|
@@ -646,7 +647,7 @@ function addTableAndViews(appSchema, v4Page, entityType, entitySet, generatePara
|
|
|
646
647
|
const viewsPaths = v4Page.options?.settings?.views?.paths;
|
|
647
648
|
const defaultAnnotation = getDefaultAnnotationPath(v4Page, entityType, generateParameters.templateType);
|
|
648
649
|
const tableDefinitionName = utils_1.alignSchemaWithTemplateType(appSchema, generateParameters);
|
|
649
|
-
if (generateParameters.templateType ===
|
|
650
|
+
if (generateParameters.templateType === ux_specification_types_1.TemplateType.ListReportObjectPageV4) {
|
|
650
651
|
if (viewsPaths) {
|
|
651
652
|
addLRViews(appSchema, viewsPaths, entityType, entitySet, generateParameters, v4Page, tableDefinitionName);
|
|
652
653
|
}
|
|
@@ -656,11 +657,11 @@ function addTableAndViews(appSchema, v4Page, entityType, entitySet, generatePara
|
|
|
656
657
|
}
|
|
657
658
|
adaptTableDefinition(appSchema, entityType, generateParameters, defaultAnnotation, v4Page, alias, tableDefinitionName);
|
|
658
659
|
}
|
|
659
|
-
appSchema.properties[
|
|
660
|
+
appSchema.properties[ux_specification_types_1.PropertyName.chart][ux_specification_types_1.SchemaTag.hidden] = true;
|
|
660
661
|
}
|
|
661
|
-
else if (generateParameters.templateType ===
|
|
662
|
+
else if (generateParameters.templateType === ux_specification_types_1.TemplateType.AnalyticalListPageV4) {
|
|
662
663
|
addALPViews(appSchema, viewsPaths, entityType, generateParameters, defaultAnnotation, v4Page, tableDefinitionName);
|
|
663
|
-
utils_1.addFragmentEnumForAnchor(appSchema,
|
|
664
|
+
utils_1.addFragmentEnumForAnchor(appSchema, ux_specification_types_1.DefinitionName.LineItems, v4Page);
|
|
664
665
|
}
|
|
665
666
|
}
|
|
666
667
|
/**
|
|
@@ -676,13 +677,13 @@ function addTableAndViews(appSchema, v4Page, entityType, entitySet, generatePara
|
|
|
676
677
|
function generateListReportSchemaV4(generateParameters, genericSchema, entitySet, templateName) {
|
|
677
678
|
const appSchema = JSON.parse(JSON.stringify(genericSchema));
|
|
678
679
|
const entityType = entitySet?.entityType;
|
|
679
|
-
const alias = generateParameters.serviceAVT && common_1.findAlias(
|
|
680
|
+
const alias = generateParameters.serviceAVT && common_1.findAlias(ux_specification_types_1.UIVOCABULARY, generateParameters.serviceAVT);
|
|
680
681
|
//Add selection fields
|
|
681
682
|
const selectionFieldAnnotation = alias && entityType?.annotations?.[alias]?.SelectionFields;
|
|
682
683
|
addSelectionFields(entityType, appSchema, selectionFieldAnnotation);
|
|
683
|
-
appSchema.properties[
|
|
684
|
+
appSchema.properties[ux_specification_types_1.PropertyName.defaultTemplateAnnotationPath][ux_specification_types_1.SchemaTag.hidden] = true;
|
|
684
685
|
//enum for annotation path as part of QuickVariantSelection
|
|
685
|
-
common_1.addEnumForSingleTabVariant(entityType, appSchema,
|
|
686
|
+
common_1.addEnumForSingleTabVariant(entityType, appSchema, ux_specification_types_1.DefinitionName.AnnotationPathAsObject);
|
|
686
687
|
if (generateParameters.manifest) {
|
|
687
688
|
//Find page in targets
|
|
688
689
|
const pages = generateParameters.manifest[ux_specification_types_1.ManifestSection.ui5].routing
|
|
@@ -692,7 +693,7 @@ function generateListReportSchemaV4(generateParameters, genericSchema, entitySet
|
|
|
692
693
|
severity: "error" /* Error */,
|
|
693
694
|
message: i18next_1.default.t('NOPAGES', { appId: generateParameters.manifest['sap.app']['id'] }),
|
|
694
695
|
location: {
|
|
695
|
-
path:
|
|
696
|
+
path: ux_specification_types_1.MANIFESTPATH,
|
|
696
697
|
range: [ux_specification_types_1.ManifestSection.generic]
|
|
697
698
|
}
|
|
698
699
|
});
|