@sap/ux-specification 1.90.12 → 1.90.16

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.
Files changed (177) hide show
  1. package/CHANGELOG.md +89 -4
  2. package/dist/documentation/v2/v2-AnalyticalListPage.html +1 -1
  3. package/dist/documentation/v2/v2-ApplicationV2.html +1 -1
  4. package/dist/documentation/v2/v2-ListReport.html +1 -1
  5. package/dist/documentation/v2/v2-ObjectPage.html +1 -1
  6. package/dist/documentation/v2/v2-OverviewPage.html +1 -1
  7. package/dist/documentation/v4/v4-AnalyticalListPage.html +1 -1
  8. package/dist/documentation/v4/v4-ApplicationV4.html +1 -1
  9. package/dist/documentation/v4/v4-ListReport.html +1 -1
  10. package/dist/documentation/v4/v4-ObjectPage.html +1 -1
  11. package/dist/index-min.js +1 -1
  12. package/dist/schemas/v2/AnalyticalListPageConfig.json +90 -13
  13. package/dist/schemas/v2/ListReportConfig.json +100 -18
  14. package/dist/schemas/v2/ObjectPageConfig.json +274 -60
  15. package/dist/schemas/v2/OverviewPageConfig.json +0 -28
  16. package/dist/schemas/v4/AnalyticalListPageConfig.json +3 -0
  17. package/dist/schemas/v4/ListReportConfig.json +3 -0
  18. package/dist/schemas/v4/ObjectPageConfig.json +22 -0
  19. package/dist/scripts/to-json-schema.js +11 -2
  20. package/dist/scripts/to-json-schema.js.map +1 -1
  21. package/dist/specification/v2/index-min.js +1 -1
  22. package/dist/src/apiTypes.d.ts +8 -0
  23. package/dist/src/specification/v2/controls/Card.d.ts +0 -8
  24. package/dist/src/specification/v2/controls/Card.js.map +1 -1
  25. package/dist/src/specification/v2/controls/{DataField.d.ts → Field.d.ts} +2 -2
  26. package/dist/src/specification/v2/controls/{DataField.js → Field.js} +1 -1
  27. package/dist/src/specification/v2/controls/Field.js.map +1 -0
  28. package/dist/src/specification/v2/controls/FilterBar.d.ts +12 -6
  29. package/dist/src/specification/v2/controls/FormAction.d.ts +27 -0
  30. package/dist/src/specification/v2/controls/FormAction.js +3 -0
  31. package/dist/src/specification/v2/controls/FormAction.js.map +1 -0
  32. package/dist/src/specification/v2/controls/ObjectPageFooter.d.ts +11 -0
  33. package/dist/src/specification/v2/controls/ObjectPageFooter.js +3 -0
  34. package/dist/src/specification/v2/controls/ObjectPageFooter.js.map +1 -0
  35. package/dist/src/specification/v2/controls/ObjectPageForm.d.ts +4 -5
  36. package/dist/src/specification/v2/controls/ObjectPageHeader.d.ts +2 -5
  37. package/dist/src/specification/v2/controls/ObjectPageHeader.js +0 -5
  38. package/dist/src/specification/v2/controls/ObjectPageHeader.js.map +1 -1
  39. package/dist/src/specification/v2/controls/ObjectPageHeaderAction.d.ts +20 -0
  40. package/dist/src/specification/v2/controls/ObjectPageSection.d.ts +25 -15
  41. package/dist/src/specification/v2/controls/ObjectPageSection.js.map +1 -1
  42. package/dist/src/specification/v2/controls/ObjectPageTable.d.ts +10 -5
  43. package/dist/src/specification/v2/controls/ObjectPageTable.js.map +1 -1
  44. package/dist/src/specification/v2/controls/Table.d.ts +7 -18
  45. package/dist/src/specification/v2/controls/Table.js +0 -15
  46. package/dist/src/specification/v2/controls/Table.js.map +1 -1
  47. package/dist/src/specification/v2/controls/ToolBar.d.ts +2 -6
  48. package/dist/src/specification/v2/controls/index.d.ts +4 -1
  49. package/dist/src/specification/v2/controls/index.js +0 -1
  50. package/dist/src/specification/v2/controls/index.js.map +1 -1
  51. package/dist/src/specification/v2/pages/ListReportConfig.d.ts +2 -2
  52. package/dist/src/specification/v2/pages/ObjectPageConfig.d.ts +2 -1
  53. package/dist/src/specification/v4/controls/ObjectPageFooter.d.ts +11 -0
  54. package/dist/src/specification/v4/controls/ObjectPageFooter.js +3 -0
  55. package/dist/src/specification/v4/controls/ObjectPageFooter.js.map +1 -0
  56. package/dist/src/specification/v4/controls/Table.d.ts +1 -0
  57. package/dist/src/specification/v4/controls/index.d.ts +1 -0
  58. package/dist/src/specification/v4/pages/ObjectPageConfig.d.ts +2 -1
  59. package/dist/src/specification/v4/webapp/manifest/sapUi5.d.ts +2 -1
  60. package/dist/src/specification/v4/webapp/manifest/sapUi5.js.map +1 -1
  61. package/dist/src/sync/common/decoration/control.js +34 -19
  62. package/dist/src/sync/common/decoration/control.js.map +1 -1
  63. package/dist/src/sync/common/generate/index.d.ts +1 -0
  64. package/dist/src/sync/common/generate/index.js +1 -0
  65. package/dist/src/sync/common/generate/index.js.map +1 -1
  66. package/dist/src/sync/common/generate/objectPage.d.ts +31 -2
  67. package/dist/src/sync/common/generate/objectPage.js +195 -29
  68. package/dist/src/sync/common/generate/objectPage.js.map +1 -1
  69. package/dist/src/sync/common/generate/utils.d.ts +66 -0
  70. package/dist/src/sync/common/generate/utils.js +205 -0
  71. package/dist/src/sync/common/generate/utils.js.map +1 -0
  72. package/dist/src/sync/common/import/utils.d.ts +6 -0
  73. package/dist/src/sync/common/import/utils.js +21 -0
  74. package/dist/src/sync/common/import/utils.js.map +1 -1
  75. package/dist/src/sync/common/importProject.js +64 -62
  76. package/dist/src/sync/common/importProject.js.map +1 -1
  77. package/dist/src/sync/common/types.d.ts +5 -2
  78. package/dist/src/sync/common/types.js +4 -0
  79. package/dist/src/sync/common/types.js.map +1 -1
  80. package/dist/src/sync/common/utils.d.ts +3 -29
  81. package/dist/src/sync/common/utils.js +90 -193
  82. package/dist/src/sync/common/utils.js.map +1 -1
  83. package/dist/src/sync/v2/application.d.ts +1 -0
  84. package/dist/src/sync/v2/application.js +3 -0
  85. package/dist/src/sync/v2/application.js.map +1 -1
  86. package/dist/src/sync/v2/export/controls/Card.d.ts +0 -2
  87. package/dist/src/sync/v2/export/controls/Card.js +0 -14
  88. package/dist/src/sync/v2/export/controls/Card.js.map +1 -1
  89. package/dist/src/sync/v2/export/controls/Field.d.ts +4 -0
  90. package/dist/src/sync/v2/export/controls/{DataField.js → Field.js} +6 -6
  91. package/dist/src/sync/v2/export/controls/Field.js.map +1 -0
  92. package/dist/src/sync/v2/export/controls/FilterBar.d.ts +6 -4
  93. package/dist/src/sync/v2/export/controls/FilterBar.js +26 -15
  94. package/dist/src/sync/v2/export/controls/FilterBar.js.map +1 -1
  95. package/dist/src/sync/v2/export/controls/FormAction.d.ts +16 -0
  96. package/dist/src/sync/v2/export/controls/FormAction.js +95 -0
  97. package/dist/src/sync/v2/export/controls/FormAction.js.map +1 -0
  98. package/dist/src/sync/v2/export/controls/ObjectPageChart.d.ts +4 -1
  99. package/dist/src/sync/v2/export/controls/ObjectPageChart.js +13 -0
  100. package/dist/src/sync/v2/export/controls/ObjectPageChart.js.map +1 -1
  101. package/dist/src/sync/v2/export/controls/ObjectPageHeader.d.ts +3 -2
  102. package/dist/src/sync/v2/export/controls/ObjectPageHeader.js.map +1 -1
  103. package/dist/src/sync/v2/export/controls/ObjectPageHeaderAction.d.ts +5 -0
  104. package/dist/src/sync/v2/export/controls/ObjectPageHeaderAction.js +42 -3
  105. package/dist/src/sync/v2/export/controls/ObjectPageHeaderAction.js.map +1 -1
  106. package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.d.ts +32 -0
  107. package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.js +144 -0
  108. package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.js.map +1 -0
  109. package/dist/src/sync/v2/export/controls/ObjectPageTable.d.ts +7 -5
  110. package/dist/src/sync/v2/export/controls/ObjectPageTable.js +16 -4
  111. package/dist/src/sync/v2/export/controls/ObjectPageTable.js.map +1 -1
  112. package/dist/src/sync/v2/export/controls/Table.d.ts +14 -5
  113. package/dist/src/sync/v2/export/controls/Table.js +84 -37
  114. package/dist/src/sync/v2/export/controls/Table.js.map +1 -1
  115. package/dist/src/sync/v2/export/controls/TableColumn.d.ts +3 -2
  116. package/dist/src/sync/v2/export/controls/TableColumn.js.map +1 -1
  117. package/dist/src/sync/v2/export/controls/index.d.ts +3 -1
  118. package/dist/src/sync/v2/export/controls/index.js +3 -1
  119. package/dist/src/sync/v2/export/controls/index.js.map +1 -1
  120. package/dist/src/sync/v2/export/export.js +125 -86
  121. package/dist/src/sync/v2/export/export.js.map +1 -1
  122. package/dist/src/sync/v2/export/exportPage.js +3 -2
  123. package/dist/src/sync/v2/export/exportPage.js.map +1 -1
  124. package/dist/src/sync/v2/export/pages/ListReport.d.ts +2 -2
  125. package/dist/src/sync/v2/export/pages/ListReport.js.map +1 -1
  126. package/dist/src/sync/v2/generate/analyticalListReport.d.ts +3 -9
  127. package/dist/src/sync/v2/generate/analyticalListReport.js +15 -13
  128. package/dist/src/sync/v2/generate/analyticalListReport.js.map +1 -1
  129. package/dist/src/sync/v2/generate/generate.js +28 -6
  130. package/dist/src/sync/v2/generate/generate.js.map +1 -1
  131. package/dist/src/sync/v2/generate/listReport.d.ts +11 -10
  132. package/dist/src/sync/v2/generate/listReport.js +22 -12
  133. package/dist/src/sync/v2/generate/listReport.js.map +1 -1
  134. package/dist/src/sync/v2/generate/objectPage.d.ts +3 -10
  135. package/dist/src/sync/v2/generate/objectPage.js +206 -153
  136. package/dist/src/sync/v2/generate/objectPage.js.map +1 -1
  137. package/dist/src/sync/v2/generate/utils.d.ts +1 -2
  138. package/dist/src/sync/v2/generate/utils.js +8 -3
  139. package/dist/src/sync/v2/generate/utils.js.map +1 -1
  140. package/dist/src/sync/v2/import/common/index.js +1 -1
  141. package/dist/src/sync/v2/import/common/index.js.map +1 -1
  142. package/dist/src/sync/v2/import/pages/listReport.js +2 -2
  143. package/dist/src/sync/v2/import/pages/listReport.js.map +1 -1
  144. package/dist/src/sync/v2/import/pages/objectPage.js +176 -102
  145. package/dist/src/sync/v2/import/pages/objectPage.js.map +1 -1
  146. package/dist/src/sync/v2/types.d.ts +12 -0
  147. package/dist/src/sync/v2/types.js +11 -0
  148. package/dist/src/sync/v2/types.js.map +1 -1
  149. package/dist/src/sync/v4/application.js +10 -10
  150. package/dist/src/sync/v4/application.js.map +1 -1
  151. package/dist/src/sync/v4/export/export.js +165 -139
  152. package/dist/src/sync/v4/export/export.js.map +1 -1
  153. package/dist/src/sync/v4/export/manifest.js +96 -76
  154. package/dist/src/sync/v4/export/manifest.js.map +1 -1
  155. package/dist/src/sync/v4/export/types.d.ts +1 -0
  156. package/dist/src/sync/v4/generate/generate.js +10 -2
  157. package/dist/src/sync/v4/generate/generate.js.map +1 -1
  158. package/dist/src/sync/v4/generate/listReport.d.ts +2 -1
  159. package/dist/src/sync/v4/generate/listReport.js +47 -1
  160. package/dist/src/sync/v4/generate/listReport.js.map +1 -1
  161. package/dist/src/sync/v4/generate/objectPage.d.ts +3 -6
  162. package/dist/src/sync/v4/generate/objectPage.js +169 -126
  163. package/dist/src/sync/v4/generate/objectPage.js.map +1 -1
  164. package/dist/src/sync/v4/import/app/appProvider.js +109 -81
  165. package/dist/src/sync/v4/import/app/appProvider.js.map +1 -1
  166. package/dist/src/sync/v4/import/fragment.js +41 -46
  167. package/dist/src/sync/v4/import/fragment.js.map +1 -1
  168. package/dist/src/sync/v4/utils/StableIdHelper.d.ts +0 -3
  169. package/dist/src/sync/v4/utils/StableIdHelper.js +9 -11
  170. package/dist/src/sync/v4/utils/StableIdHelper.js.map +1 -1
  171. package/dist/src/sync/v4/utils/utils.d.ts +1 -8
  172. package/dist/src/sync/v4/utils/utils.js +28 -54
  173. package/dist/src/sync/v4/utils/utils.js.map +1 -1
  174. package/package.json +15 -15
  175. package/dist/src/specification/v2/controls/DataField.js.map +0 -1
  176. package/dist/src/sync/v2/export/controls/DataField.d.ts +0 -4
  177. package/dist/src/sync/v2/export/controls/DataField.js.map +0 -1
@@ -41,9 +41,12 @@ var ControlType;
41
41
  ControlType["ObjectPageGridProperties"] = "sap.ui.layout.GridData";
42
42
  ControlType["ObjectPageHeader"] = "sap.uxap.ObjectPageHeader";
43
43
  ControlType["ObjectPageLayout"] = "sap.uxap.ObjectPageLayout";
44
+ ControlType["HeaderAction"] = "sap.uxap.ObjectPageHeaderActionButton";
44
45
  ControlType["DynamicPage"] = "sap.f.DynamicPage";
45
46
  ControlType["Form"] = "sap.ui.layout.form";
46
47
  ControlType["Chart"] = "sap.suite.ui.microchart";
48
+ ControlType["Section"] = "sap.uxap.ObjectPageSection";
49
+ ControlType["SubSection"] = "sap.uxap.ObjectPageSubSection";
47
50
  })(ControlType = exports.ControlType || (exports.ControlType = {}));
48
51
  var FacetBase;
49
52
  (function (FacetBase) {
@@ -72,6 +75,7 @@ exports.VOCWITHSLASH = '/@com.sap.vocabularies';
72
75
  exports.VOCWITHCOLONS = '::@com.sap.vocabularies';
73
76
  exports.UIVOCABULARY = 'com.sap.vocabularies.UI.v1';
74
77
  exports.QUICKVARPATH = '/quickVariantSelection';
78
+ exports.QUICKVARPATHX = '/quickVariantSelectionX';
75
79
  exports.DATESETTINGSPATH = '/filterSettings/dateSettings';
76
80
  exports.TOOLBAR = 'ToolBar<LineItems>';
77
81
  exports.FRAGMENTNAMEPART = '.fragment.';
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/sync/common/types.ts"],"names":[],"mappings":";;AAIA,IAAY,eAGX;AAHD,WAAY,eAAe;IACvB,gCAAa,CAAA;IACb,wCAAqB,CAAA;AACzB,CAAC,EAHW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAG1B;AACD,IAAY,OAGX;AAHD,WAAY,OAAO;IACf,+BAAoB,CAAA;IACpB,0BAAe,CAAA;AACnB,CAAC,EAHW,OAAO,GAAP,eAAO,KAAP,eAAO,QAGlB;AACD,IAAY,QAEX;AAFD,WAAY,QAAQ;IAChB,4BAAgB,CAAA;AACpB,CAAC,EAFW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAEnB;AACY,QAAA,gBAAgB,GAAG,YAAY,CAAC;AAQ7C,IAAY,WAGX;AAHD,WAAY,WAAW;IACnB,kCAAmB,CAAA;IACnB,8CAA+B,CAAA;AACnC,CAAC,EAHW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAGtB;AAED,IAAY,YAIX;AAJD,WAAY,YAAY;IACpB,qCAAqB,CAAA;IACrB,yCAAyB,CAAA;IACzB,yCAAyB,CAAA;AAC7B,CAAC,EAJW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAIvB;AAED,IAAY,WAiBX;AAjBD,WAAY,WAAW;IACnB,oCAAqB,CAAA;IACrB,2CAA4B,CAAA;IAC5B,+DAAgD,CAAA;IAChD,2EAA4D,CAAA;IAC5D,+DAAgD,CAAA;IAChD,8DAA+C,CAAA;IAC/C,sCAAuB,CAAA;IACvB,4DAA6C,CAAA;IAC7C,sCAAuB,CAAA;IACvB,qFAAsE,CAAA;IACtE,kEAAmD,CAAA;IACnD,6DAA8C,CAAA;IAC9C,6DAA8C,CAAA;IAC9C,gDAAiC,CAAA;IACjC,0CAA2B,CAAA;IAC3B,gDAAiC,CAAA;AACrC,CAAC,EAjBW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAiBtB;AA2HD,IAAY,SAUX;AAVD,WAAY,SAAS;IACjB,kCAAqB,CAAA;IACrB,gDAAmC,CAAA;IACnC,4BAAe,CAAA;IACf,0BAAa,CAAA;IACb,8CAAiC,CAAA;IACjC,oCAAuB,CAAA;IACvB,gCAAmB,CAAA;IACnB,gCAAmB,CAAA;IACnB,yBAAY,CAAA;AAChB,CAAC,EAVW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAUpB;AAgDY,QAAA,4BAA4B,GAAG,6CAA6C,CAAC;AAE1F,IAAY,gBAMX;AAND,WAAY,gBAAgB;IACxB,uFAAmE,CAAA;IACnE,uFAAmE,CAAA;IACnE,2EAAuD,CAAA;IACvD,2EAAuD,CAAA;IACvD,mFAA+D,CAAA;AACnE,CAAC,EANW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAM3B;AAEY,QAAA,YAAY,GAAG,kCAAkC,CAAC;AAClD,QAAA,YAAY,GAAG,sBAAsB,CAAC;AACtC,QAAA,YAAY,GAAG,wBAAwB,CAAC;AACxC,QAAA,aAAa,GAAG,yBAAyB,CAAC;AAC1C,QAAA,YAAY,GAAG,4BAA4B,CAAC;AAC5C,QAAA,YAAY,GAAG,wBAAwB,CAAC;AACxC,QAAA,gBAAgB,GAAG,8BAA8B,CAAC;AAClD,QAAA,OAAO,GAAG,oBAAoB,CAAC;AAC/B,QAAA,gBAAgB,GAAG,YAAY,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/sync/common/types.ts"],"names":[],"mappings":";;AAIA,IAAY,eAGX;AAHD,WAAY,eAAe;IACvB,gCAAa,CAAA;IACb,wCAAqB,CAAA;AACzB,CAAC,EAHW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAG1B;AACD,IAAY,OAGX;AAHD,WAAY,OAAO;IACf,+BAAoB,CAAA;IACpB,0BAAe,CAAA;AACnB,CAAC,EAHW,OAAO,GAAP,eAAO,KAAP,eAAO,QAGlB;AACD,IAAY,QAEX;AAFD,WAAY,QAAQ;IAChB,4BAAgB,CAAA;AACpB,CAAC,EAFW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAEnB;AACY,QAAA,gBAAgB,GAAG,YAAY,CAAC;AAQ7C,IAAY,WAGX;AAHD,WAAY,WAAW;IACnB,kCAAmB,CAAA;IACnB,8CAA+B,CAAA;AACnC,CAAC,EAHW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAGtB;AAED,IAAY,YAIX;AAJD,WAAY,YAAY;IACpB,qCAAqB,CAAA;IACrB,yCAAyB,CAAA;IACzB,yCAAyB,CAAA;AAC7B,CAAC,EAJW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAIvB;AAED,IAAY,WAoBX;AApBD,WAAY,WAAW;IACnB,oCAAqB,CAAA;IACrB,2CAA4B,CAAA;IAC5B,+DAAgD,CAAA;IAChD,2EAA4D,CAAA;IAC5D,+DAAgD,CAAA;IAChD,8DAA+C,CAAA;IAC/C,sCAAuB,CAAA;IACvB,4DAA6C,CAAA;IAC7C,sCAAuB,CAAA;IACvB,qFAAsE,CAAA;IACtE,kEAAmD,CAAA;IACnD,6DAA8C,CAAA;IAC9C,6DAA8C,CAAA;IAC9C,qEAAsD,CAAA;IACtD,gDAAiC,CAAA;IACjC,0CAA2B,CAAA;IAC3B,gDAAiC,CAAA;IACjC,qDAAsC,CAAA;IACtC,2DAA4C,CAAA;AAChD,CAAC,EApBW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAoBtB;AA0HD,IAAY,SAUX;AAVD,WAAY,SAAS;IACjB,kCAAqB,CAAA;IACrB,gDAAmC,CAAA;IACnC,4BAAe,CAAA;IACf,0BAAa,CAAA;IACb,8CAAiC,CAAA;IACjC,oCAAuB,CAAA;IACvB,gCAAmB,CAAA;IACnB,gCAAmB,CAAA;IACnB,yBAAY,CAAA;AAChB,CAAC,EAVW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAUpB;AAgDY,QAAA,4BAA4B,GAAG,6CAA6C,CAAC;AAE1F,IAAY,gBAMX;AAND,WAAY,gBAAgB;IACxB,uFAAmE,CAAA;IACnE,uFAAmE,CAAA;IACnE,2EAAuD,CAAA;IACvD,2EAAuD,CAAA;IACvD,mFAA+D,CAAA;AACnE,CAAC,EANW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAM3B;AAEY,QAAA,YAAY,GAAG,kCAAkC,CAAC;AAClD,QAAA,YAAY,GAAG,sBAAsB,CAAC;AACtC,QAAA,YAAY,GAAG,wBAAwB,CAAC;AACxC,QAAA,aAAa,GAAG,yBAAyB,CAAC;AAC1C,QAAA,YAAY,GAAG,4BAA4B,CAAC;AAC5C,QAAA,YAAY,GAAG,wBAAwB,CAAC;AACxC,QAAA,aAAa,GAAG,yBAAyB,CAAC;AAC1C,QAAA,gBAAgB,GAAG,8BAA8B,CAAC;AAClD,QAAA,OAAO,GAAG,oBAAoB,CAAC;AAC/B,QAAA,gBAAgB,GAAG,YAAY,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { FacetConfigs, FileData, FacetConfig, FacetSection, SchemaFilePath } from './types';
2
- import { AnnotationTerm, CollectionFacet, ConverterOutput, LineItem, DataFieldAbstractTypes, EntityType, PropertyAnnotations, PropertyPath, ReferenceFacet, ReferenceURLFacet } from '@sap-ux/vocabularies-types';
2
+ import { AnnotationTerm, CollectionFacet, ConverterOutput, DataFieldAbstractTypes, EntityType, PropertyAnnotations, PropertyPath, ReferenceFacet, ReferenceURLFacet } from '@sap-ux/vocabularies-types';
3
3
  import { FioriElementsVersion, Manifest, PageType, PageTypeV4 } from '../../specification/common';
4
4
  import { SchemaType } from '../../specification/schemaAccess';
5
5
  import { ExtensionLogger } from '../../apiTypes';
@@ -80,7 +80,7 @@ export declare function findAlias(namespace: string, oDataServiceAVT: ConverterO
80
80
  * @param {ExtensionLogger} logger - Logger class for logging messages
81
81
  * @returns {FacetSection} - object comprising the relevant facet information
82
82
  */
83
- export declare function getSectionFacet(facetDefinition: AnnotationTerm<CollectionFacet> | AnnotationTerm<ReferenceFacet> | AnnotationTerm<ReferenceURLFacet>, keyForRelatedFacetKeys: boolean, oDataVersion: FioriElementsVersion, sourceEntityType: EntityType, oDataServiceAVT: ConverterOutput, logger?: ExtensionLogger): FacetSection | undefined;
83
+ export declare function getSectionFacet(facetDefinition: AnnotationTerm<CollectionFacet> | AnnotationTerm<ReferenceFacet> | AnnotationTerm<ReferenceURLFacet>, sourceEntityType: EntityType, oDataServiceAVT: ConverterOutput, logger?: ExtensionLogger, oDataVersion?: FioriElementsVersion, keyForRelatedFacetKeys?: boolean): FacetSection | undefined;
84
84
  /**
85
85
  * Finds the alias for a given namespace in the references' section of the converted service metadata
86
86
  * @param {object} exportResultManifest - manifest that is being modified during export
@@ -198,33 +198,7 @@ export declare type NextDefinition = {
198
198
  * @param pageType - page type
199
199
  */
200
200
  export declare function getNextTargetDefinition(appSchema: object, title: string, currentConfigObject: object, propertyDefinition: object, key: string, factory: MetadataInstanceInterface, pageType: PageType | PageTypeV4): NextDefinition;
201
- /**
202
- * Add schema definitions for fields of createWithParameterDialog
203
- * @param {object} appSchema - Application-specific schema, to be enhanced
204
- * @param {EntityType} entityType - Given entity type for which entries shall get generated.
205
- */
206
- export declare function addFieldsType(appSchema: object, entityType: EntityType): void;
207
- /**
208
- * Functions used both by V2 and V4 to add the common definitions for a line item to the app schema
209
- * @param appSchema - the app specific schema that shall get enhanced
210
- * @param lineItemAnnotation - the UI.LineItem annotation, comprising all records
211
- * @param entityType - the entity type as part of the AVT ConverterOutput
212
- * @param lineItemId - line item ID, as comprise in stable ID
213
- * @returns the actions definition plus the annotation path to the given line item
214
- */
215
- export declare function addCommonLineItemDefinitions(appSchema: object, lineItemAnnotation: AnnotationTerm<LineItem>, entityType: EntityType, lineItemId: string): {
216
- actions: object;
217
- lineItemPath: string;
218
- };
219
- /**
220
- * Method adds definition for 'RelatedFacetKeys' as enum with describtion and adds references to 'RelatedFacetKeys' for custom section definitions.
221
- * @param {object} schema App specific schema that potentially gets enhanced
222
- * @param {string[]>} sectionDefinitions array of section definitions which should be updated with new reference to 'RelatedFacetKeys' enum.
223
- * @param {FacetSection[]} facetSections Array of facet section objects which is used to generate enum values.
224
- * @param {Array<keyof Omit<FacetSection, 'custom'>>} idProperties Array of property names which should be looked up in 'FacetSection' object.
225
- * Please note that method depends on order and takes first non empty value associated to passed properties.
226
- */
227
- export declare function addDefinitionForRelatedFacetKeys(schema: object, sectionDefinitions: string[], facetSections: FacetSection[], idProperties: Array<keyof Omit<FacetSection, 'custom'>>): void;
201
+ export declare function prepareRef(refInput: string): string;
228
202
  /**
229
203
  * Custom array merge function called by deepmerge's merge function
230
204
  *
@@ -43,16 +43,18 @@ exports.createAnnotationPath = (entityTypeName, term, qualifier) => {
43
43
  */
44
44
  function parseAndMergeAndConvert(annotationFiles, logger) {
45
45
  const parseResult = [];
46
+ let converterOutput;
46
47
  try {
47
48
  if (annotationFiles) {
48
49
  annotationFiles.forEach(function (annotationData) {
49
50
  parseResult.push(edmx_parser_1.parseEDMX(annotationData.fileContent, annotationData.dataSourceUri));
50
51
  });
51
52
  }
52
- const converterOutput = annotation_converter_1.convertTypes(edmx_parser_1.merge(parseResult));
53
- if (logger && converterOutput.diagnostics) {
54
- for (let index = 0; index < converterOutput.diagnostics.length; index++) {
55
- const converterMessage = converterOutput.diagnostics[index];
53
+ if (parseResult.length > 0) {
54
+ converterOutput = annotation_converter_1.convertTypes(edmx_parser_1.merge(parseResult));
55
+ }
56
+ if (logger && (converterOutput === null || converterOutput === void 0 ? void 0 : converterOutput.diagnostics)) {
57
+ for (const converterMessage of converterOutput.diagnostics) {
56
58
  extensionLogger_1.log(logger, {
57
59
  severity: "error" /* Error */,
58
60
  message: converterMessage.message
@@ -84,11 +86,12 @@ function evaluateCommonLabel(annotations, entityType, label) {
84
86
  }
85
87
  else if (annotations.Common.Label['type'] === 'Path') {
86
88
  const targetProperty = entityType.resolvePath(annotations.Common.Label['path']);
87
- label = targetProperty.value
88
- ? targetProperty.value
89
- : typeof ((_b = targetProperty.Common) === null || _b === void 0 ? void 0 : _b.Label) === 'string'
90
- ? targetProperty.annotations.Common.Label
91
- : label;
89
+ if (targetProperty.value) {
90
+ label = targetProperty.value;
91
+ }
92
+ else if (typeof ((_b = targetProperty.Common) === null || _b === void 0 ? void 0 : _b.Label) === 'string') {
93
+ label = targetProperty.annotations.Common.Label;
94
+ }
92
95
  }
93
96
  else if (typeof ((_d = (_c = annotations.Common) === null || _c === void 0 ? void 0 : _c.Label) === null || _d === void 0 ? void 0 : _d.toString()) === 'string') {
94
97
  label = annotations.Common.Label.toString();
@@ -105,7 +108,9 @@ exports.evaluateCommonLabel = evaluateCommonLabel;
105
108
  */
106
109
  function getLabelForPropertyPath(propertyPath, entityType) {
107
110
  let label = propertyPath.value;
108
- label = evaluateCommonLabel(propertyPath.$target.annotations, entityType, label);
111
+ if (propertyPath.$target) {
112
+ label = evaluateCommonLabel(propertyPath.$target.annotations, entityType, label);
113
+ }
109
114
  return label;
110
115
  }
111
116
  exports.getLabelForPropertyPath = getLabelForPropertyPath;
@@ -168,10 +173,9 @@ function getLabel(dataFieldLabel, entityType) {
168
173
  }
169
174
  function getTitleForDataField(dataField, entityType, dataFieldLabel) {
170
175
  const propertyCommonLabel = getLabelForDataField(dataField, entityType);
171
- const title = dataFieldLabel ||
176
+ return (dataFieldLabel ||
172
177
  propertyCommonLabel ||
173
- (dataField.Value.$target ? dataField.Value.$target.name : dataField.Value.value || dataField.Value.path);
174
- return { title, propertyCommonLabel };
178
+ (dataField.Value.$target ? dataField.Value.$target.name : dataField.Value.value || dataField.Value.path));
175
179
  }
176
180
  /**
177
181
  * Determines the description of a data field, e.g. for the column header
@@ -184,7 +188,7 @@ function getDatafieldDescription(dataFieldAbstract, entityType) {
184
188
  switch (dataFieldAbstract.$Type) {
185
189
  case "com.sap.vocabularies.UI.v1.DataField" /* DataField */:
186
190
  dataField = dataFieldAbstract;
187
- ({ title, propertyCommonLabel } = getTitleForDataField(dataField, entityType, dataFieldLabel));
191
+ title = getTitleForDataField(dataField, entityType, dataFieldLabel);
188
192
  break;
189
193
  case "com.sap.vocabularies.UI.v1.DataFieldWithUrl" /* DataFieldWithUrl */:
190
194
  dataField = dataFieldAbstract;
@@ -216,7 +220,7 @@ function getDatafieldDescription(dataFieldAbstract, entityType) {
216
220
  break;
217
221
  case "com.sap.vocabularies.UI.v1.DataFieldWithNavigationPath" /* DataFieldWithNavigationPath */:
218
222
  dataField = dataFieldAbstract;
219
- ({ title, propertyCommonLabel } = getTitleForDataField(dataField, entityType, dataFieldLabel));
223
+ title = getTitleForDataField(dataField, entityType, dataFieldLabel);
220
224
  break;
221
225
  default:
222
226
  break;
@@ -273,6 +277,38 @@ function findAlias(namespace, oDataServiceAVT) {
273
277
  return aliasReference === null || aliasReference === void 0 ? void 0 : aliasReference.alias;
274
278
  }
275
279
  exports.findAlias = findAlias;
280
+ /**
281
+ * Determines the target annotation
282
+ * @param navigationParts - parts of the target annotation path
283
+ * @param entityType - entity type
284
+ * @param {ConverterOutput} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
285
+ * @returns the target annotation
286
+ */
287
+ function determineTargetAnnotation(navigationParts, entityType, oDataServiceAVT) {
288
+ var _a;
289
+ const lastNavigationPart = navigationParts[navigationParts.length - 1];
290
+ const annotation = lastNavigationPart.substring(lastNavigationPart.lastIndexOf('.') + 1, lastNavigationPart.length);
291
+ const alias = findAlias(lastNavigationPart.substring(0, lastNavigationPart.lastIndexOf('.')).replace('@', ''), oDataServiceAVT);
292
+ return (_a = entityType === null || entityType === void 0 ? void 0 : entityType.annotations[alias]) === null || _a === void 0 ? void 0 : _a[annotation];
293
+ }
294
+ /**
295
+ * Adjust key by considering navigation
296
+ * @param key - given key
297
+ * @param keyForRelatedFacetKeys - construct key for 'keyForRelatedFacetKeys' property(used to define custom sections) - we should not add '@' symbol there.
298
+ * @param navigationParts - parts of the target annotation path
299
+ */
300
+ function adjustKey(key, navigationParts, keyForRelatedFacetKeys) {
301
+ const uiParts = (navigationParts[1] || navigationParts[0]).split('#');
302
+ const uiClass = uiParts[0];
303
+ if (uiClass.includes('.LineItem')) {
304
+ const pathParts = key.split('::');
305
+ pathParts[pathParts.length - 1] = `${!keyForRelatedFacetKeys ? '@' : ''}${"com.sap.vocabularies.UI.v1.LineItem" /* LineItem */}`;
306
+ key = pathParts.join('::');
307
+ }
308
+ else {
309
+ key = uiClass.replace('@UI', `${!keyForRelatedFacetKeys ? '@' : ''}com.sap.vocabularies.UI.v1`);
310
+ }
311
+ }
276
312
  /**
277
313
  * Resolve page section(get key and label->description).
278
314
  * @param facetDefinition - the actual annotation record
@@ -282,46 +318,14 @@ exports.findAlias = findAlias;
282
318
  * @param {ExtensionLogger} logger - Logger class for logging messages
283
319
  * @returns {FacetSection} - object comprising the relevant facet information
284
320
  */
285
- function getSectionFacet(facetDefinition, keyForRelatedFacetKeys = false, oDataVersion = common_1.FioriElementsVersion.v2, sourceEntityType, oDataServiceAVT, logger) {
321
+ function getSectionFacet(facetDefinition, sourceEntityType, oDataServiceAVT, logger, oDataVersion = common_1.FioriElementsVersion.v2, keyForRelatedFacetKeys = false) {
286
322
  var _a;
287
- /**
288
- * Determines the target annotation
289
- * @param navigationParts - parts of the target annotation path
290
- * @param entityType - entity type
291
- * @returns the target annotation
292
- */
293
- function determineTargetAnnotation(navigationParts, entityType) {
294
- var _a;
295
- const lastNavigationPart = navigationParts[navigationParts.length - 1];
296
- const annotation = lastNavigationPart.substring(lastNavigationPart.lastIndexOf('.') + 1, lastNavigationPart.length);
297
- const alias = findAlias(lastNavigationPart.substring(0, lastNavigationPart.lastIndexOf('.')).replace('@', ''), oDataServiceAVT);
298
- const targetAnnotation = (_a = entityType === null || entityType === void 0 ? void 0 : entityType.annotations[alias]) === null || _a === void 0 ? void 0 : _a[annotation];
299
- return targetAnnotation;
300
- }
301
- /**
302
- * Adjust key by considering navigation
303
- * @param key - given key
304
- * @param navigationParts - parts of the target annotation path
305
- */
306
- function adjustKey(key, navigationParts) {
307
- const uiParts = (navigationParts[1] || navigationParts[0]).split('#');
308
- const uiClass = uiParts[0];
309
- if (uiClass.includes('.LineItem')) {
310
- const pathParts = key.split('::');
311
- pathParts[pathParts.length - 1] = `${!keyForRelatedFacetKeys ? '@' : ''}com.sap.vocabularies.UI.v1.LineItem`;
312
- key = pathParts.join('::');
313
- }
314
- else {
315
- key = uiClass.replace('@UI', `${!keyForRelatedFacetKeys ? '@' : ''}com.sap.vocabularies.UI.v1`);
316
- }
317
- }
318
- //---------Main-------------------------------------------------------------------------------------------
319
323
  //Take facet ID as fallback
320
324
  const facetName = facetDefinition.fullyQualifiedName.substr(facetDefinition.fullyQualifiedName.lastIndexOf('@'));
321
325
  let key = facetDefinition.ID ? facetDefinition.ID.toString() : facetName;
322
326
  let entityType = sourceEntityType; //default
323
327
  //If reference facet: overwrite with target annotation if present
324
- if (facetDefinition.$Type !== 'com.sap.vocabularies.UI.v1.CollectionFacet' && 'Target' in facetDefinition) {
328
+ if (facetDefinition.$Type !== "com.sap.vocabularies.UI.v1.CollectionFacet" /* CollectionFacet */ && 'Target' in facetDefinition) {
325
329
  const propertyValue = exports.getAnnotationPropertyValue(facetDefinition.Target);
326
330
  if (!propertyValue) {
327
331
  extensionLogger_1.log(logger, {
@@ -335,8 +339,8 @@ function getSectionFacet(facetDefinition, keyForRelatedFacetKeys = false, oDataV
335
339
  if (navigation) {
336
340
  entityType = (_a = sourceEntityType.resolvePath(navigation)) === null || _a === void 0 ? void 0 : _a.targetType;
337
341
  }
338
- adjustKey(key, navigationParts);
339
- const targetAnnotation = determineTargetAnnotation(navigationParts, entityType);
342
+ adjustKey(key, navigationParts, keyForRelatedFacetKeys);
343
+ const targetAnnotation = determineTargetAnnotation(navigationParts, entityType, oDataServiceAVT);
340
344
  if (targetAnnotation) {
341
345
  const separator = oDataVersion === common_1.FioriElementsVersion.v2 ? '::' : '#';
342
346
  key = getTargetAnnotationName(targetAnnotation, keyForRelatedFacetKeys).replace('#', separator);
@@ -443,58 +447,52 @@ exports.getSchemaKeyOfLineItemRecord = getSchemaKeyOfLineItemRecord;
443
447
  * @param {ExtensionLogger} logger - Logger class for logging messages
444
448
  */
445
449
  function evaluateTargetAnnotation(section, annotationRecord, facets, entityType, oDataServiceAVT, oDataVersion = common_1.FioriElementsVersion.v2, logger) {
446
- var _a, _b, _c, _d, _e;
450
+ var _a, _b, _c, _d, _e, _f;
447
451
  const alias = findAlias(types_1.UIVOCABULARY, oDataServiceAVT);
448
452
  let path = section ? section.key : '';
449
453
  const targetEntityType = section.entityType;
450
454
  let annotation, targetAnnotation;
451
- let scope = alias;
452
- if (path.includes('com.sap.vocabularies.UI.v1.Chart') || path.includes(alias + '.Chart')) {
455
+ if (path.includes("com.sap.vocabularies.UI.v1.Chart" /* Chart */) || path.includes(alias + '.Chart')) {
453
456
  facets[path] = { base: types_1.FacetBase.Chart };
454
- facets[path]['entityType'] = targetEntityType;
457
+ facets[path].entityType = targetEntityType;
455
458
  }
456
- else if (path.includes('com.sap.vocabularies.UI.v1.Identification') || path.includes(alias + '.Identification')) {
459
+ else if (path.includes("com.sap.vocabularies.UI.v1.Identification" /* Identification */) || path.includes(alias + '.Identification')) {
457
460
  annotation = path.split('.')[path.split('.').length - 1];
458
- targetAnnotation = targetEntityType.annotations[scope][annotation];
461
+ targetAnnotation = targetEntityType.annotations[alias][annotation];
459
462
  facets[path] = { base: types_1.FacetBase.Identification };
460
- facets[path]['entityType'] = targetEntityType;
461
- facets[path]['target'] = targetAnnotation;
463
+ facets[path].entityType = targetEntityType;
464
+ facets[path].target = targetAnnotation;
462
465
  }
463
- else if (entityType &&
464
- (path.includes('com.sap.vocabularies.UI.v1.LineItem') || path.includes(alias + '.LineItem'))) {
465
- if (path.includes('com.sap.vocabularies.UI.v1.LineItem')) {
466
- scope = path.split('com.sap.vocabularies.')[1].split('.')[0];
467
- annotation = path.split('com.sap.vocabularies.')[1].split('.')[2];
468
- }
469
- else if (path.includes('.LineItem')) {
470
- annotation = 'LineItem';
466
+ else if (entityType && (path.includes("com.sap.vocabularies.UI.v1.LineItem" /* LineItem */) || path.includes(alias + '.LineItem'))) {
467
+ if (!path.includes("com.sap.vocabularies.UI.v1.LineItem" /* LineItem */) && path.includes('.LineItem')) {
471
468
  const pathParts = path.split('::');
472
- pathParts[pathParts.length - 1] = '@com.sap.vocabularies.UI.v1.LineItem';
469
+ pathParts[pathParts.length - 1] = `@${"com.sap.vocabularies.UI.v1.LineItem" /* LineItem */}`;
473
470
  path = pathParts.join('::');
474
471
  }
475
472
  facets[path] = { base: types_1.FacetBase.LineItem };
476
- facets[path]['lineItem'] = (_a = annotationRecord === null || annotationRecord === void 0 ? void 0 : annotationRecord.Target) === null || _a === void 0 ? void 0 : _a.$target;
477
- facets[path]['entityType'] = targetEntityType;
473
+ facets[path].target = (_a = annotationRecord === null || annotationRecord === void 0 ? void 0 : annotationRecord.Target) === null || _a === void 0 ? void 0 : _a.$target;
474
+ facets[path].entityType = targetEntityType;
478
475
  }
479
- else if (path.includes('com.sap.vocabularies.UI.v1.FieldGroup') || path.includes(alias + '.FieldGroup')) {
476
+ else if (path.includes("com.sap.vocabularies.UI.v1.FieldGroup" /* FieldGroup */) || path.includes(alias + '.FieldGroup')) {
480
477
  facets[path] = { base: types_1.FacetBase.Form };
481
- facets[path]['target'] = (_b = annotationRecord === null || annotationRecord === void 0 ? void 0 : annotationRecord.Target) === null || _b === void 0 ? void 0 : _b.$target;
482
- facets[path]['entityType'] = targetEntityType;
478
+ facets[path].target = (_b = annotationRecord === null || annotationRecord === void 0 ? void 0 : annotationRecord.Target) === null || _b === void 0 ? void 0 : _b.$target;
479
+ facets[path].entityType = targetEntityType;
483
480
  }
484
- else if (path.includes('com.sap.vocabularies.UI.v1.DataPoint') || path.includes(alias + '.DataPoint')) {
481
+ else if (path.includes("com.sap.vocabularies.UI.v1.DataPoint" /* DataPoint */) || path.includes(alias + '.DataPoint')) {
485
482
  facets[path] = { base: types_1.FacetBase.DataPoint };
486
483
  facets[path].target = (_c = annotationRecord === null || annotationRecord === void 0 ? void 0 : annotationRecord.Target) === null || _c === void 0 ? void 0 : _c.$target;
487
- facets[path]['entityType'] = targetEntityType;
484
+ facets[path].entityType = targetEntityType;
485
+ facets[path].Label = (_d = annotationRecord === null || annotationRecord === void 0 ? void 0 : annotationRecord.Target) === null || _d === void 0 ? void 0 : _d.$target['Title'];
488
486
  }
489
487
  else if (path.includes('com.sap.vocabularies.Communication.v1.Contact') || path.includes(alias + '.Contact')) {
490
488
  facets[path] = { base: types_1.FacetBase.Contact };
491
- facets[path].target = (_d = annotationRecord === null || annotationRecord === void 0 ? void 0 : annotationRecord.Target) === null || _d === void 0 ? void 0 : _d.$target;
492
- facets[path]['entityType'] = targetEntityType;
489
+ facets[path].target = (_e = annotationRecord === null || annotationRecord === void 0 ? void 0 : annotationRecord.Target) === null || _e === void 0 ? void 0 : _e.$target;
490
+ facets[path].entityType = targetEntityType;
493
491
  }
494
492
  else if (path.includes('com.sap.vocabularies.Communication.v1.Address') || path.includes(alias + '.Address')) {
495
493
  facets[path] = { base: types_1.FacetBase.Address };
496
- facets[path].target = (_e = annotationRecord === null || annotationRecord === void 0 ? void 0 : annotationRecord.Target) === null || _e === void 0 ? void 0 : _e.$target;
497
- facets[path]['entityType'] = targetEntityType;
494
+ facets[path].target = (_f = annotationRecord === null || annotationRecord === void 0 ? void 0 : annotationRecord.Target) === null || _f === void 0 ? void 0 : _f.$target;
495
+ facets[path].entityType = targetEntityType;
498
496
  }
499
497
  else {
500
498
  facets[path] = { base: types_1.FacetBase.Unknown };
@@ -531,7 +529,7 @@ function evaluateTargetAnnotation(section, annotationRecord, facets, entityType,
531
529
  */
532
530
  function addFacetToConfig(annotationRecord, oDataServiceAVT, serviceName, entityType, facets, oDataVersion = common_1.FioriElementsVersion.v2, logger) {
533
531
  var _a;
534
- const section = getSectionFacet(annotationRecord, false, oDataVersion, entityType, oDataServiceAVT, logger);
532
+ const section = getSectionFacet(annotationRecord, entityType, oDataServiceAVT, logger, oDataVersion, false);
535
533
  if (section) {
536
534
  switch (annotationRecord.$Type) {
537
535
  case "com.sap.vocabularies.UI.v1.ReferenceFacet" /* ReferenceFacet */: {
@@ -808,7 +806,7 @@ function getObjectPageFacetSection(entityType, oDataServiceAVT, logger, oDataVer
808
806
  if (checkUnresolvableFacets && !item['ID'] && !('Target' in item && item['Target'])) {
809
807
  return result;
810
808
  }
811
- const section = getSectionFacet(item, true, oDataVersion, entityType, oDataServiceAVT, logger);
809
+ const section = getSectionFacet(item, entityType, oDataServiceAVT, logger, oDataVersion, true);
812
810
  if (section) {
813
811
  result.push(section);
814
812
  }
@@ -967,6 +965,7 @@ function fillArrayFromPropertyDefinition(propertyDefinition, currentConfigObject
967
965
  * @returns {NextDefinition} - Next target definition to process
968
966
  */
969
967
  function determineNextDefinitionFromDefinitionArray(definitionArray, appSchema, title, currentConfigObject, key, factory, pageType, propertyDefinition) {
968
+ var _a, _b, _c;
970
969
  let nextDefinition = {
971
970
  configObject: undefined,
972
971
  targetDefinition: {},
@@ -975,7 +974,8 @@ function determineNextDefinitionFromDefinitionArray(definitionArray, appSchema,
975
974
  if (definitionArray.length) {
976
975
  const lastDefinition = definitionArray[definitionArray.length - 1];
977
976
  nextDefinition.targetDefinition = appSchema['definitions'][lastDefinition];
978
- if (nextDefinition.targetDefinition['$ref'] || nextDefinition.targetDefinition['type'] === 'array') {
977
+ if (((_a = nextDefinition === null || nextDefinition === void 0 ? void 0 : nextDefinition.targetDefinition) === null || _a === void 0 ? void 0 : _a['$ref']) || ((_b = nextDefinition === null || nextDefinition === void 0 ? void 0 : nextDefinition.targetDefinition) === null || _b === void 0 ? void 0 : _b['type']) === 'array') {
978
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
979
979
  nextDefinition = getNextTargetDefinition(appSchema, title, currentConfigObject, nextDefinition.targetDefinition, key, factory, pageType);
980
980
  return nextDefinition;
981
981
  }
@@ -986,12 +986,11 @@ function determineNextDefinitionFromDefinitionArray(definitionArray, appSchema,
986
986
  }
987
987
  });
988
988
  }
989
- nextDefinition.title =
990
- nextDefinition.targetDefinition && nextDefinition.targetDefinition['title']
991
- ? nextDefinition.targetDefinition['title']
992
- : title;
993
- const factoryKey = lastDefinition.split('<')[0];
994
- nextDefinition.configObject = factory.createInstance(pageType, factoryKey, currentConfigObject, nextDefinition.targetDefinition['controlProperty']);
989
+ nextDefinition.title = ((_c = nextDefinition === null || nextDefinition === void 0 ? void 0 : nextDefinition.targetDefinition) === null || _c === void 0 ? void 0 : _c['title']) ? nextDefinition.targetDefinition['title']
990
+ : title;
991
+ const factoryKey = lastDefinition === null || lastDefinition === void 0 ? void 0 : lastDefinition.split('<')[0];
992
+ const targetObject = currentConfigObject ? currentConfigObject : {};
993
+ nextDefinition.configObject = factory.createInstance(pageType, factoryKey, targetObject, nextDefinition.targetDefinition['controlProperty']);
995
994
  }
996
995
  else {
997
996
  //e.g. sections ==> loop over all properties = subsections or other
@@ -1027,112 +1026,10 @@ function getNextTargetDefinition(appSchema, title, currentConfigObject, property
1027
1026
  return nextDefinition;
1028
1027
  }
1029
1028
  exports.getNextTargetDefinition = getNextTargetDefinition;
1030
- /**
1031
- * Add schema definitions for fields of createWithParameterDialog
1032
- * @param {object} appSchema - Application-specific schema, to be enhanced
1033
- * @param {EntityType} entityType - Given entity type for which entries shall get generated.
1034
- */
1035
- function addFieldsType(appSchema, entityType) {
1036
- const propertyNameArray = [], propertyObject = {};
1037
- for (let key = 0; key < entityType.entityProperties.length; key++) {
1038
- const propertyName = entityType.entityProperties[key].name;
1039
- propertyNameArray.push(propertyName);
1040
- propertyObject[propertyName] = {
1041
- $ref: exports.DEFINITION_LINK_PREFIX + 'FieldPath'
1042
- };
1043
- }
1044
- appSchema['definitions'][entityType.name] = {
1045
- enum: propertyNameArray
1046
- };
1047
- appSchema['definitions']['FieldPath'].properties.path = {
1048
- $ref: exports.DEFINITION_LINK_PREFIX + entityType.name
1049
- };
1050
- appSchema['definitions']['CreationFieldKeys'] = {
1051
- type: 'object',
1052
- properties: propertyObject,
1053
- additionalProperties: false
1054
- };
1055
- const fields4Dialog = appSchema['definitions']['Fields4Dialog'] || appSchema['definitions']['Fields4DialogOP'];
1056
- fields4Dialog.properties.fields = {
1057
- $ref: exports.DEFINITION_LINK_PREFIX + 'CreationFieldKeys'
1058
- };
1059
- }
1060
- exports.addFieldsType = addFieldsType;
1061
- /**
1062
- * Functions used both by V2 and V4 to add the common definitions for a line item to the app schema
1063
- * @param appSchema - the app specific schema that shall get enhanced
1064
- * @param lineItemAnnotation - the UI.LineItem annotation, comprising all records
1065
- * @param entityType - the entity type as part of the AVT ConverterOutput
1066
- * @param lineItemId - line item ID, as comprise in stable ID
1067
- * @returns the actions definition plus the annotation path to the given line item
1068
- */
1069
- function addCommonLineItemDefinitions(appSchema, lineItemAnnotation, entityType, lineItemId) {
1070
- let lineItemPath;
1071
- appSchema['definitions'][lineItemId] = {
1072
- type: 'object',
1073
- properties: {},
1074
- additionalProperties: false,
1075
- isViewNode: true,
1076
- description: 'Columns'
1077
- };
1078
- //Copy toolbar
1079
- const toolBar = lineItemId === 'LineItems' ? 'ToolBar' : 'ObjectPageToolBar';
1080
- const schemaIdForToolBar = `${toolBar}<${lineItemId}>`;
1081
- appSchema['definitions'][schemaIdForToolBar] = JSON.parse(JSON.stringify(appSchema['definitions'][`${toolBar}`]));
1082
- appSchema['definitions'][schemaIdForToolBar].properties.actions.$ref =
1083
- exports.DEFINITION_LINK_PREFIX + 'Actions<' + lineItemId + '>';
1084
- const schemaIdForActions = `Actions<${lineItemId}>`;
1085
- const actionId = lineItemId === 'LineItems' ? 'Actions' : 'ObjectPageToolBarActions';
1086
- const actions = (appSchema['definitions'][schemaIdForActions] = JSON.parse(JSON.stringify(appSchema['definitions'][actionId])));
1087
- actions.properties = {};
1088
- actions.additionalProperties = false;
1089
- //Determine annotation path
1090
- if (lineItemAnnotation) {
1091
- lineItemPath = exports.createAnnotationPath(entityType.fullyQualifiedName, lineItemAnnotation.term, lineItemAnnotation.qualifier);
1092
- appSchema['definitions'][lineItemId].annotationPath = appSchema['definitions'][schemaIdForToolBar].annotationPath = lineItemPath;
1093
- }
1094
- return { actions, lineItemPath };
1095
- }
1096
- exports.addCommonLineItemDefinitions = addCommonLineItemDefinitions;
1097
- /**
1098
- * Method adds definition for 'RelatedFacetKeys' as enum with describtion and adds references to 'RelatedFacetKeys' for custom section definitions.
1099
- * @param {object} schema App specific schema that potentially gets enhanced
1100
- * @param {string[]>} sectionDefinitions array of section definitions which should be updated with new reference to 'RelatedFacetKeys' enum.
1101
- * @param {FacetSection[]} facetSections Array of facet section objects which is used to generate enum values.
1102
- * @param {Array<keyof Omit<FacetSection, 'custom'>>} idProperties Array of property names which should be looked up in 'FacetSection' object.
1103
- * Please note that method depends on order and takes first non empty value associated to passed properties.
1104
- */
1105
- function addDefinitionForRelatedFacetKeys(schema, sectionDefinitions, facetSections, idProperties) {
1106
- const oneOfSections = facetSections.map((section) => {
1107
- // Loop accaptable properties in received order and find first entry with value
1108
- const propertyName = idProperties.find((property) => !!section[property]);
1109
- const schemaIdForSection = section[propertyName];
1110
- return Object.assign(Object.assign({ const: schemaIdForSection }, (section.label && { description: section.label })), (section.custom && { custom: section.custom }));
1111
- });
1112
- // Change 'relatedFacet' only when we have entries for sections - otherwise use generic.
1113
- if (oneOfSections.length) {
1114
- // Create new definition in schema as 'oneOf'.
1115
- // Simpler way would be to use 'enum', but then there no option to pass description.
1116
- schema['definitions']['RelatedFacetKeys'] = {
1117
- type: 'string',
1118
- oneOf: oneOfSections
1119
- };
1120
- // Add enum definition
1121
- for (const name of sectionDefinitions) {
1122
- const definition = schema['definitions'][name];
1123
- const property = definition['properties']['relatedFacet'];
1124
- definition['properties']['relatedFacet'] = {
1125
- anyOf: [
1126
- {
1127
- $ref: exports.DEFINITION_LINK_PREFIX + 'RelatedFacetKeys'
1128
- },
1129
- property
1130
- ]
1131
- };
1132
- }
1133
- }
1029
+ function prepareRef(refInput) {
1030
+ return refInput.replace('#', '::').replace(/\//g, '::');
1134
1031
  }
1135
- exports.addDefinitionForRelatedFacetKeys = addDefinitionForRelatedFacetKeys;
1032
+ exports.prepareRef = prepareRef;
1136
1033
  /**
1137
1034
  * Custom array merge function called by deepmerge's merge function
1138
1035
  *