@sap/ux-specification 1.90.24 → 1.90.27

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 (160) hide show
  1. package/CHANGELOG.md +80 -1
  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-ApplicationV4.html +1 -1
  8. package/dist/documentation/v4/v4-ListReport.html +1 -1
  9. package/dist/documentation/v4/v4-ObjectPage.html +1 -1
  10. package/dist/index-min.js +1 -1
  11. package/dist/schemas/v2/AnalyticalListPageConfig.json +10 -10
  12. package/dist/schemas/v2/ListReportConfig.json +15 -15
  13. package/dist/schemas/v2/ObjectPageConfig.json +204 -20
  14. package/dist/schemas/v4/ListReportConfig.json +33 -3
  15. package/dist/schemas/v4/ObjectPageConfig.json +36 -0
  16. package/dist/scripts/to-json-schema.js +1 -1
  17. package/dist/scripts/to-json-schema.js.map +1 -1
  18. package/dist/specification/v2/index-min.js +1 -1
  19. package/dist/src/apiTypes.d.ts +2 -1
  20. package/dist/src/project.d.ts +1 -0
  21. package/dist/src/project.js +13 -5
  22. package/dist/src/project.js.map +1 -1
  23. package/dist/src/specification/v2/controls/Action.d.ts +6 -4
  24. package/dist/src/specification/v2/controls/ObjectPageHeader.d.ts +3 -2
  25. package/dist/src/specification/v2/controls/ObjectPageSection.d.ts +40 -7
  26. package/dist/src/specification/v2/controls/ObjectPageSection.js.map +1 -1
  27. package/dist/src/specification/v2/controls/ObjectPageTable.d.ts +5 -3
  28. package/dist/src/specification/v2/controls/ObjectPageTable.js.map +1 -1
  29. package/dist/src/specification/v2/controls/Table.d.ts +7 -4
  30. package/dist/src/specification/v2/controls/Table.js.map +1 -1
  31. package/dist/src/specification/v4/controls/ObjectPageSection.d.ts +22 -1
  32. package/dist/src/specification/v4/controls/ObjectPageSection.js.map +1 -1
  33. package/dist/src/specification/v4/controls/Table.d.ts +8 -0
  34. package/dist/src/specification/v4/pages/ListReportConfig.d.ts +6 -1
  35. package/dist/src/specification/v4/webapp/manifest/sapUiPageV4.d.ts +1 -0
  36. package/dist/src/specification/v4/webapp/manifest/sapUiPageV4.js.map +1 -1
  37. package/dist/src/sync/common/decoration/control.d.ts +1 -1
  38. package/dist/src/sync/common/decoration/control.js +27 -22
  39. package/dist/src/sync/common/decoration/control.js.map +1 -1
  40. package/dist/src/sync/common/generate/objectPage.d.ts +5 -4
  41. package/dist/src/sync/common/generate/objectPage.js +67 -66
  42. package/dist/src/sync/common/generate/objectPage.js.map +1 -1
  43. package/dist/src/sync/common/generate/utils.d.ts +54 -13
  44. package/dist/src/sync/common/generate/utils.js +140 -47
  45. package/dist/src/sync/common/generate/utils.js.map +1 -1
  46. package/dist/src/sync/common/import/utils.d.ts +3 -2
  47. package/dist/src/sync/common/import/utils.js +11 -6
  48. package/dist/src/sync/common/import/utils.js.map +1 -1
  49. package/dist/src/sync/common/importProject.js +20 -19
  50. package/dist/src/sync/common/importProject.js.map +1 -1
  51. package/dist/src/sync/common/types.d.ts +105 -26
  52. package/dist/src/sync/common/types.js +101 -22
  53. package/dist/src/sync/common/types.js.map +1 -1
  54. package/dist/src/sync/common/utils.d.ts +17 -12
  55. package/dist/src/sync/common/utils.js +132 -88
  56. package/dist/src/sync/common/utils.js.map +1 -1
  57. package/dist/src/sync/v2/export/controls/Action.d.ts +12 -10
  58. package/dist/src/sync/v2/export/controls/Action.js.map +1 -1
  59. package/dist/src/sync/v2/export/controls/AnalyticalListPageChart.js +1 -1
  60. package/dist/src/sync/v2/export/controls/AnalyticalListPageChart.js.map +1 -1
  61. package/dist/src/sync/v2/export/controls/FormAction.d.ts +9 -7
  62. package/dist/src/sync/v2/export/controls/FormAction.js.map +1 -1
  63. package/dist/src/sync/v2/export/controls/Fragment.js +2 -2
  64. package/dist/src/sync/v2/export/controls/Fragment.js.map +1 -1
  65. package/dist/src/sync/v2/export/controls/ObjectPageFooterAction.d.ts +6 -4
  66. package/dist/src/sync/v2/export/controls/ObjectPageFooterAction.js.map +1 -1
  67. package/dist/src/sync/v2/export/controls/ObjectPageHeader.d.ts +3 -2
  68. package/dist/src/sync/v2/export/controls/ObjectPageHeader.js.map +1 -1
  69. package/dist/src/sync/v2/export/controls/ObjectPageHeaderAction.d.ts +6 -4
  70. package/dist/src/sync/v2/export/controls/ObjectPageHeaderAction.js.map +1 -1
  71. package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.d.ts +26 -14
  72. package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.js +57 -5
  73. package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.js.map +1 -1
  74. package/dist/src/sync/v2/export/controls/ObjectPageTable.d.ts +5 -3
  75. package/dist/src/sync/v2/export/controls/ObjectPageTable.js.map +1 -1
  76. package/dist/src/sync/v2/export/controls/ObjectPageToolBarAction.d.ts +6 -4
  77. package/dist/src/sync/v2/export/controls/ObjectPageToolBarAction.js.map +1 -1
  78. package/dist/src/sync/v2/export/controls/Table.d.ts +6 -3
  79. package/dist/src/sync/v2/export/controls/Table.js +89 -48
  80. package/dist/src/sync/v2/export/controls/Table.js.map +1 -1
  81. package/dist/src/sync/v2/export/controls/TableColumn.d.ts +12 -10
  82. package/dist/src/sync/v2/export/controls/TableColumn.js.map +1 -1
  83. package/dist/src/sync/v2/export/export.d.ts +0 -1
  84. package/dist/src/sync/v2/export/export.js +222 -160
  85. package/dist/src/sync/v2/export/export.js.map +1 -1
  86. package/dist/src/sync/v2/export/exportPage.js +35 -34
  87. package/dist/src/sync/v2/export/exportPage.js.map +1 -1
  88. package/dist/src/sync/v2/export/manifest.d.ts +22 -0
  89. package/dist/src/sync/v2/export/manifest.js +77 -36
  90. package/dist/src/sync/v2/export/manifest.js.map +1 -1
  91. package/dist/src/sync/v2/export/pages/OverviewPage.d.ts +1 -1
  92. package/dist/src/sync/v2/export/pages/OverviewPage.js +18 -16
  93. package/dist/src/sync/v2/export/pages/OverviewPage.js.map +1 -1
  94. package/dist/src/sync/v2/generate/analyticalListReport.js +10 -10
  95. package/dist/src/sync/v2/generate/analyticalListReport.js.map +1 -1
  96. package/dist/src/sync/v2/generate/listReport.js +1 -1
  97. package/dist/src/sync/v2/generate/listReport.js.map +1 -1
  98. package/dist/src/sync/v2/generate/objectPage.js +57 -43
  99. package/dist/src/sync/v2/generate/objectPage.js.map +1 -1
  100. package/dist/src/sync/v2/generate/utils.d.ts +5 -4
  101. package/dist/src/sync/v2/generate/utils.js +73 -69
  102. package/dist/src/sync/v2/generate/utils.js.map +1 -1
  103. package/dist/src/sync/v2/import/app/appProvider.d.ts +9 -0
  104. package/dist/src/sync/v2/import/app/appProvider.js +36 -13
  105. package/dist/src/sync/v2/import/app/appProvider.js.map +1 -1
  106. package/dist/src/sync/v2/import/app/ovpProvider.js +1 -1
  107. package/dist/src/sync/v2/import/app/ovpProvider.js.map +1 -1
  108. package/dist/src/sync/v2/import/common/index.js +6 -6
  109. package/dist/src/sync/v2/import/common/index.js.map +1 -1
  110. package/dist/src/sync/v2/import/pages/objectPage.js +93 -101
  111. package/dist/src/sync/v2/import/pages/objectPage.js.map +1 -1
  112. package/dist/src/sync/v2/import/pages/overviewPage.js +1 -1
  113. package/dist/src/sync/v2/import/pages/overviewPage.js.map +1 -1
  114. package/dist/src/sync/v2/import/utils.js +1 -1
  115. package/dist/src/sync/v2/import/utils.js.map +1 -1
  116. package/dist/src/sync/v2/types.d.ts +8 -3
  117. package/dist/src/sync/v2/types.js +6 -2
  118. package/dist/src/sync/v2/types.js.map +1 -1
  119. package/dist/src/sync/v4/application.d.ts +22 -10
  120. package/dist/src/sync/v4/application.js +68 -19
  121. package/dist/src/sync/v4/application.js.map +1 -1
  122. package/dist/src/sync/v4/export/controls/ObjectPageTable.js +6 -18
  123. package/dist/src/sync/v4/export/controls/ObjectPageTable.js.map +1 -1
  124. package/dist/src/sync/v4/export/controls/Table.d.ts +8 -1
  125. package/dist/src/sync/v4/export/controls/Table.js +110 -86
  126. package/dist/src/sync/v4/export/controls/Table.js.map +1 -1
  127. package/dist/src/sync/v4/export/controls/TableColumn.js +4 -4
  128. package/dist/src/sync/v4/export/controls/TableColumn.js.map +1 -1
  129. package/dist/src/sync/v4/export/export.js +285 -150
  130. package/dist/src/sync/v4/export/export.js.map +1 -1
  131. package/dist/src/sync/v4/export/manifest.js +25 -6
  132. package/dist/src/sync/v4/export/manifest.js.map +1 -1
  133. package/dist/src/sync/v4/export/pages/ListReport.d.ts +1 -0
  134. package/dist/src/sync/v4/export/pages/ListReport.js +7 -0
  135. package/dist/src/sync/v4/export/pages/ListReport.js.map +1 -1
  136. package/dist/src/sync/v4/export/pages/ObjectPage.js +3 -2
  137. package/dist/src/sync/v4/export/pages/ObjectPage.js.map +1 -1
  138. package/dist/src/sync/v4/export/types.d.ts +5 -5
  139. package/dist/src/sync/v4/generate/listReport.js +304 -156
  140. package/dist/src/sync/v4/generate/listReport.js.map +1 -1
  141. package/dist/src/sync/v4/generate/objectPage.d.ts +1 -1
  142. package/dist/src/sync/v4/generate/objectPage.js +286 -148
  143. package/dist/src/sync/v4/generate/objectPage.js.map +1 -1
  144. package/dist/src/sync/v4/import/app/appProvider.js +32 -22
  145. package/dist/src/sync/v4/import/app/appProvider.js.map +1 -1
  146. package/dist/src/sync/v4/import/pages/listReport.js +54 -37
  147. package/dist/src/sync/v4/import/pages/listReport.js.map +1 -1
  148. package/dist/src/sync/v4/import/pages/objectPage.d.ts +13 -0
  149. package/dist/src/sync/v4/import/pages/objectPage.js +64 -35
  150. package/dist/src/sync/v4/import/pages/objectPage.js.map +1 -1
  151. package/dist/src/sync/v4/import/utils.d.ts +2 -1
  152. package/dist/src/sync/v4/import/utils.js.map +1 -1
  153. package/dist/src/sync/v4/types.d.ts +2 -0
  154. package/dist/src/sync/v4/utils/StableIdHelper.js +13 -10
  155. package/dist/src/sync/v4/utils/StableIdHelper.js.map +1 -1
  156. package/dist/src/sync/v4/utils/utils.d.ts +7 -7
  157. package/dist/src/sync/v4/utils/utils.js +44 -34
  158. package/dist/src/sync/v4/utils/utils.js.map +1 -1
  159. package/dist/test/unit/export/manifest.test.d.ts +1 -0
  160. package/package.json +3 -3
@@ -56,73 +56,105 @@ function exportFlexChange(syncRule, transferParameters, ids, breadcrumbs, config
56
56
  const flexChange = common_1.fillFlexChangeContent(configObject, syncRule, transferParameters.ui5Version, key, controlId);
57
57
  transferParameters.exportResults.flexChanges.push(syncRule.flex.createFlexChange(flexChange, transferParameters.exportResults.manifest));
58
58
  }
59
- /**
60
- * Determines the target annotation that is relevant for the sync rule
61
- * @param {string[]} ids - list of ids of parent elements
62
- * @param {TransferParameterTypeV4} transferParameters - list of parameters passed from API
63
- * @param { [key: string]: any } configObject - the given config.json, to be exported
64
- * @returns { targetAnnotationEncoded, targetAnnotation, custom }
65
- */
66
- function determineTargetAnnotation(ids, transferParameters, configObject) {
59
+ function determineTargetAnnotationOfTable(ids, transferParameters, targetAnnotationEncoded, targetAnnotation, configObject) {
67
60
  var _a, _b, _c;
68
- let targetAnnotation = '', targetAnnotationEncoded = '', custom = false, annoPath;
69
- if (ids[0] === 'table' && transferParameters.templateType === utils_1.TemplateType.AnalyticalListPageV4) {
70
- if (ids.length > 1) {
71
- annoPath = transferParameters.appSchema.definitions[v4_1.DefinitionName.ALPTable]['annotationPath'];
72
- targetAnnotationEncoded = targetAnnotation = annoPath.substr(annoPath.lastIndexOf('@'));
73
- }
74
- else {
75
- //table level
76
- targetAnnotationEncoded = targetAnnotation = `@${(_a = configObject.table) === null || _a === void 0 ? void 0 : _a.annotationPath}`;
77
- }
78
- }
79
- else if (ids[0] === 'chart' && transferParameters.templateType === utils_1.TemplateType.AnalyticalListPageV4) {
80
- if (ids.length > 1) {
81
- annoPath = transferParameters.appSchema.definitions[v4_1.DefinitionName.ALPChart]['annotationPath'];
82
- targetAnnotationEncoded = targetAnnotation = annoPath === null || annoPath === void 0 ? void 0 : annoPath.substr(annoPath.lastIndexOf('@'));
83
- }
84
- else {
85
- //chart level
86
- targetAnnotationEncoded = targetAnnotation = `@${(_b = configObject.chart) === null || _b === void 0 ? void 0 : _b.annotationPath}`;
61
+ if (ids.length > 1 && transferParameters.config['table'].annotationPath) {
62
+ const annoPath = (_a = transferParameters.appSchema.definitions[v4_1.DefinitionName.ALPTable]) === null || _a === void 0 ? void 0 : _a[v4_1.SchemaTag.annotationPath];
63
+ targetAnnotationEncoded = targetAnnotation = annoPath && annoPath.substr(annoPath.lastIndexOf('@'));
64
+ }
65
+ else if ((_b = configObject.table) === null || _b === void 0 ? void 0 : _b.annotationPath) {
66
+ //view definition
67
+ targetAnnotationEncoded = targetAnnotation = `@${configObject.table.annotationPath}`;
68
+ }
69
+ else if (ids[0] === v4_1.PropertyName.table && transferParameters.config[v4_1.PropertyName.defaultTemplateAnnotationPath]) {
70
+ const annotationPath = (_c = transferParameters.appSchema.definitions[v4_1.DefinitionName.TableSPV]) === null || _c === void 0 ? void 0 : _c[v4_1.SchemaTag.annotationPath];
71
+ if (annotationPath) {
72
+ const annotationPathArray = annotationPath.split('/');
73
+ targetAnnotationEncoded = targetAnnotation = annotationPathArray[annotationPathArray.length - 1];
87
74
  }
88
75
  }
89
- else if (ids[0] === 'sections') {
90
- if (ids[1] === 'custom' && ids[2] !== ids[ids.length - 1]) {
91
- custom = true;
92
- targetAnnotationEncoded = ids[2];
93
- targetAnnotation = targetAnnotationEncoded.replace(/::/g, '/');
94
- }
95
- else {
96
- targetAnnotationEncoded = ids[1] && ids[1].replace(/\//g, '::');
97
- targetAnnotation = targetAnnotationEncoded.replace(/::/g, '/');
98
- }
76
+ return { targetAnnotationEncoded, targetAnnotation };
77
+ }
78
+ function determineTargetAnnotationOfChart(ids, transferParameters, targetAnnotationEncoded, targetAnnotation, configObject) {
79
+ var _a, _b;
80
+ if (ids.length > 1) {
81
+ const annoPath = (_a = transferParameters.appSchema.definitions[v4_1.DefinitionName.ALPChart]) === null || _a === void 0 ? void 0 : _a[v4_1.SchemaTag.annotationPath];
82
+ targetAnnotationEncoded = targetAnnotation = annoPath && annoPath.substr(annoPath.lastIndexOf('@'));
99
83
  }
100
- else if (ids[1] === 'sections') {
101
- //header sections
102
- targetAnnotation = targetAnnotationEncoded =
103
- transferParameters.title && transferParameters.title.indexOf(v4_1.FacetTitlePrefix) > -1
104
- ? transferParameters.title.split(v4_1.FacetTitlePrefix)[1]
105
- : targetAnnotationEncoded.replace(/::/g, '/');
84
+ else {
85
+ //chart level
86
+ targetAnnotationEncoded = targetAnnotation = `@${(_b = configObject.chart) === null || _b === void 0 ? void 0 : _b.annotationPath}`;
106
87
  }
107
- else if (ids[1] === 'views') {
108
- const parentDefinition = transferParameters.appSchema.definitions['MultiTableModeV4'].properties[ids[2]];
88
+ return { targetAnnotationEncoded, targetAnnotation };
89
+ }
90
+ function determineTargetAnnotationOfViews(transferParameters, ids, targetAnnotation, targetAnnotationEncoded) {
91
+ var _a, _b;
92
+ const parentDefinition = (_a = transferParameters.appSchema.definitions['MultiTableModeV4']) === null || _a === void 0 ? void 0 : _a.properties[ids[2]];
93
+ if (parentDefinition) {
109
94
  if (ids.length === 3) {
110
95
  //the parent definition comprises the annotation of the visualization of the (Selection)PresentationVariant.
111
96
  targetAnnotation = targetAnnotationEncoded =
112
- parentDefinition['annotationPath'] &&
113
- parentDefinition['annotationPath'].substr(parentDefinition['annotationPath'].lastIndexOf('@'));
97
+ parentDefinition[v4_1.SchemaTag.annotationPath] &&
98
+ parentDefinition[v4_1.SchemaTag.annotationPath].substr(parentDefinition[v4_1.SchemaTag.annotationPath].lastIndexOf('@'));
114
99
  }
115
100
  else if (ids.length > 3) {
116
101
  //the own definitio comprises the lineItem or chart annotation from he visualization
117
- const ownDefinitionName = (_c = parentDefinition.$ref) === null || _c === void 0 ? void 0 : _c.split(utils_1.DEFINITION_LINK_PREFIX)[1];
102
+ const ownDefinitionName = (_b = parentDefinition.$ref) === null || _b === void 0 ? void 0 : _b.split(utils_1.DEFINITION_LINK_PREFIX)[1];
118
103
  const ownDefinition = ownDefinitionName && transferParameters.appSchema.definitions[ownDefinitionName];
119
- const annotation = (ownDefinition === null || ownDefinition === void 0 ? void 0 : ownDefinition['annotationPath']) &&
120
- ownDefinition['annotationPath'].substr(ownDefinition['annotationPath'].lastIndexOf('@'));
104
+ const annotation = (ownDefinition === null || ownDefinition === void 0 ? void 0 : ownDefinition[v4_1.SchemaTag.annotationPath]) &&
105
+ ownDefinition[v4_1.SchemaTag.annotationPath].substr(ownDefinition[v4_1.SchemaTag.annotationPath].lastIndexOf('@'));
121
106
  targetAnnotation = targetAnnotationEncoded = ownDefinition['navigationProperty']
122
107
  ? `${ownDefinition['navigationProperty']}/${annotation}`
123
108
  : annotation;
124
109
  }
125
110
  }
111
+ return { targetAnnotation, targetAnnotationEncoded };
112
+ }
113
+ function determineTargetAnnotationOfSections(ids, custom, targetAnnotationEncoded, targetAnnotation) {
114
+ if (ids[1] === 'custom' && ids[2] !== ids[ids.length - 1]) {
115
+ custom = true;
116
+ targetAnnotationEncoded = ids[2];
117
+ targetAnnotation = targetAnnotationEncoded && targetAnnotationEncoded.replace(/::/g, '/');
118
+ }
119
+ else {
120
+ targetAnnotationEncoded = ids[1] && ids[1].replace(/\//g, '::');
121
+ targetAnnotation = targetAnnotationEncoded && targetAnnotationEncoded.replace(/::/g, '/');
122
+ }
123
+ return { custom, targetAnnotationEncoded, targetAnnotation };
124
+ }
125
+ /**
126
+ * Determines the target annotation that is relevant for the sync rule
127
+ * @param {string[]} ids - list of ids of parent elements
128
+ * @param {TransferParameterTypeV4} transferParameters - list of parameters passed from API
129
+ * @param { [key: string]: any } configObject - the given config.json, to be exported
130
+ * @returns { targetAnnotationEncoded, targetAnnotation, custom }
131
+ */
132
+ function determineTargetAnnotation(ids, transferParameters, configObject) {
133
+ let targetAnnotation, targetAnnotationEncoded, custom = false;
134
+ if (ids[0] === v4_1.PropertyName.table && ids[1] !== v4_1.PropertyName.views) {
135
+ ({ targetAnnotationEncoded, targetAnnotation } = determineTargetAnnotationOfTable(ids, transferParameters, targetAnnotationEncoded, targetAnnotation, configObject));
136
+ }
137
+ else if (ids[0] === v4_1.PropertyName.chart && transferParameters.templateType === utils_1.TemplateType.AnalyticalListPageV4) {
138
+ ({ targetAnnotationEncoded, targetAnnotation } = determineTargetAnnotationOfChart(ids, transferParameters, targetAnnotationEncoded, targetAnnotation, configObject));
139
+ }
140
+ else if (ids[0] === v4_1.PropertyName.sections) {
141
+ ({ custom, targetAnnotationEncoded, targetAnnotation } = determineTargetAnnotationOfSections(ids, custom, targetAnnotationEncoded, targetAnnotation));
142
+ }
143
+ else if (ids[1] === v4_1.PropertyName.sections) {
144
+ //header sections
145
+ if (transferParameters.title && transferParameters.title.indexOf(v4_1.FacetTitlePrefix) > -1) {
146
+ targetAnnotation = targetAnnotationEncoded = transferParameters.title.split(v4_1.FacetTitlePrefix)[1];
147
+ }
148
+ else if (ids[2]) {
149
+ targetAnnotation = targetAnnotationEncoded = ids[2].split('@')[1];
150
+ }
151
+ else if (targetAnnotationEncoded) {
152
+ targetAnnotation = targetAnnotationEncoded = targetAnnotationEncoded.replace(/::/g, '/');
153
+ }
154
+ }
155
+ else if (ids[1] === v4_1.PropertyName.views) {
156
+ ({ targetAnnotation, targetAnnotationEncoded } = determineTargetAnnotationOfViews(transferParameters, ids, targetAnnotation, targetAnnotationEncoded));
157
+ }
126
158
  return { targetAnnotationEncoded, targetAnnotation, custom };
127
159
  }
128
160
  /**
@@ -134,49 +166,50 @@ function determineKeyForSyncRule(ids) {
134
166
  let idIndex = 0;
135
167
  for (let index = ids.length - 1; index > -1; index--) {
136
168
  const element = ids[index];
137
- if (element === 'columns' || element === 'actions' || element === 'views') {
169
+ if (element === 'columns' || element === v4_1.PropertyName.actions || element === 'views') {
138
170
  idIndex = index + 1;
139
171
  break;
140
172
  }
141
173
  }
142
- return idIndex > 0 ? ids[idIndex] : undefined;
174
+ return idIndex > 0 ? ids[idIndex].replace(/\//gi, '??') : undefined;
175
+ }
176
+ /**
177
+ * Creates a new object in manifest
178
+ * @param {ExportToManifestParams} params - list of parameters
179
+ */
180
+ function createNewObjectInManifest(params) {
181
+ if (params.exportHandler && typeof params.exportHandler === 'function') {
182
+ params.exportHandler(params.manifestSection, params.configObject, params.configPropertyKey, params.manifestKey, params.syncRuleKey);
183
+ }
184
+ else if (!params.manifestSection[params.manifestKey]) {
185
+ params.manifestSection[params.manifestKey] = {};
186
+ }
143
187
  }
144
188
  /**
145
189
  * Transfers a property value from config to manifest
190
+ * @param {ExportToManifestParams} params - list of parameters
146
191
  * @param propertyDefinition - schema definiton of a particular property
147
192
  * @param nextDefinition - schema definition referred by $ref
148
- * @param {SyncRule} syncRule - syncRule (metadata)
149
- * @param manifestSection - actual section n manifest.json
150
- * @param { [key: string]: any } configObject - the given config.json, to be exported
151
- * @param {string} configPropertyKey - key of property in the config
152
- * @param manifestKey - key in manifest (might be different from propertyKey)
153
- * @param syncRuleKey - specific key, calculated for the export handler
154
193
  */
155
- function transferPropertyToManifest(propertyDefinition, nextDefinition, syncRule, manifestSection, configObject, configPropertyKey, manifestKey, syncRuleKey) {
156
- const exportHandler = syncRule.manifest.export;
194
+ function transferPropertyToManifest(params, propertyDefinition, nextDefinition) {
195
+ var _a, _b;
157
196
  if (!(propertyDefinition['type'] !== 'array' &&
158
- nextDefinition &&
159
- nextDefinition['targetDefinition'].type === 'object' &&
160
- nextDefinition['targetDefinition'].properties)) {
161
- if (exportHandler !== false) {
162
- if (exportHandler && typeof exportHandler === 'function') {
163
- exportHandler(manifestSection, configObject, configPropertyKey, manifestKey, syncRuleKey);
197
+ ((_a = nextDefinition === null || nextDefinition === void 0 ? void 0 : nextDefinition['targetDefinition']) === null || _a === void 0 ? void 0 : _a.type) === 'object' && ((_b = nextDefinition === null || nextDefinition === void 0 ? void 0 : nextDefinition['targetDefinition']) === null || _b === void 0 ? void 0 : _b.properties))) {
198
+ if (params.exportHandler !== false) {
199
+ if (params.exportHandler && typeof params.exportHandler === 'function') {
200
+ params.exportHandler(params.manifestSection, params.configObject, params.configPropertyKey, params.manifestKey, params.syncRuleKey);
164
201
  }
165
- else if (Array.isArray(configObject[configPropertyKey]) && !configObject[configPropertyKey].length) {
166
- delete manifestSection[manifestKey];
202
+ else if (Array.isArray(params.configObject[params.configPropertyKey]) &&
203
+ !params.configObject[params.configPropertyKey].length) {
204
+ delete params.manifestSection[params.manifestKey];
167
205
  }
168
206
  else {
169
- manifestSection[manifestKey] = configObject[configPropertyKey];
207
+ params.manifestSection[params.manifestKey] = params.configObject[params.configPropertyKey];
170
208
  }
171
209
  }
172
210
  }
173
- else if (propertyDefinition['type'] !== 'array' && manifestSection[manifestKey] === undefined) {
174
- if (exportHandler && typeof exportHandler === 'function') {
175
- exportHandler(manifestSection, configObject, configPropertyKey, manifestKey, syncRuleKey);
176
- }
177
- else {
178
- manifestSection[manifestKey] = {};
179
- }
211
+ else if (propertyDefinition['type'] !== 'array' && params.manifestSection[params.manifestKey] === undefined) {
212
+ createNewObjectInManifest(params);
180
213
  }
181
214
  }
182
215
  /**
@@ -200,19 +233,29 @@ function exportManifestChange(ids, syncRule, transferParameters, configPropertyK
200
233
  const syncRuleKey = determineKeyForSyncRule(ids);
201
234
  const path = syncRule.manifest.path(transferParameters.pageNameArray, transferParameters.exportResults.manifest, targetAnnotationEncoded, syncRuleKey, targetAnnotation);
202
235
  const manifestSection = common_1.getManifestSectionByPathV4(transferParameters.exportResults.manifest, path, targetAnnotation, custom ? undefined : targetAnnotationEncoded);
203
- const manifestKey = syncRule.manifest.key || configPropertyKey;
204
- if (configObject[configPropertyKey] !== undefined) {
205
- // In case of arrays we take over complete array
206
- transferPropertyToManifest(propertyDefinition, nextDefinition, syncRule, manifestSection, configObject, configPropertyKey, manifestKey, syncRuleKey);
207
- }
208
- else if (syncRule.manifest.delete) {
209
- const deleteHandler = syncRule.manifest.delete;
210
- if (typeof deleteHandler === 'function') {
211
- deleteHandler(manifestSection, configObject, configPropertyKey, manifestKey);
236
+ if (manifestSection) {
237
+ const manifestKey = syncRule.manifest.key || configPropertyKey;
238
+ if (configObject[configPropertyKey] !== undefined) {
239
+ // In case of arrays we take over complete array
240
+ const exportParams = {
241
+ exportHandler: syncRule.manifest.export,
242
+ manifestSection,
243
+ configObject,
244
+ configPropertyKey,
245
+ manifestKey,
246
+ syncRuleKey
247
+ };
248
+ transferPropertyToManifest(exportParams, propertyDefinition, nextDefinition);
249
+ }
250
+ else if (syncRule.manifest.delete) {
251
+ const deleteHandler = syncRule.manifest.delete;
252
+ if (typeof deleteHandler === 'function') {
253
+ deleteHandler(manifestSection, configObject, configPropertyKey, manifestKey, syncRuleKey);
254
+ }
255
+ }
256
+ else if (manifestSection[manifestKey] !== undefined) {
257
+ delete manifestSection[manifestKey];
212
258
  }
213
- }
214
- else if (manifestSection[manifestKey] !== undefined) {
215
- delete manifestSection[manifestKey];
216
259
  }
217
260
  utils_1.deleteEmptyStructure(transferParameters.exportResults.manifest, path, targetAnnotation, targetAnnotationEncoded);
218
261
  }
@@ -238,15 +281,23 @@ function evaluateExportRule(transferParameters, breadcrumbs, key, configObject,
238
281
  }
239
282
  }
240
283
  }
241
- function transferSubObject(propertyDefinition, nextDefinition, currentConfigObject, breadcrumbs, key, transferParameters, ids, localIdParts) {
284
+ /**
285
+ * Processes an (object-like) sub-object of the app schema and transfer all connected config entries to manifest
286
+ * @param {TransferEntryParameters} parameters - list of parameters
287
+ * @param {NextDefinition} nextDefinition - the next definition in app schema to be processed
288
+ * @param currentConfigObject - current config object
289
+ * @param ids - list of parent & child ID's
290
+ * @param localIdParts - list of ID parts for building the stable ID
291
+ */
292
+ function transferSubObject(parameters, nextDefinition, currentConfigObject, ids, localIdParts) {
242
293
  let objects = [], isArray = false;
243
- if (propertyDefinition.$ref && nextDefinition) {
294
+ if (parameters.propertyDefinition.$ref && nextDefinition) {
244
295
  objects.push(nextDefinition.configObject);
245
296
  }
246
- else if (propertyDefinition['anyOf']) {
297
+ else if (parameters.propertyDefinition['anyOf']) {
247
298
  objects.push(currentConfigObject);
248
299
  }
249
- else if (propertyDefinition.type === 'array') {
300
+ else if (parameters.propertyDefinition.type === 'array') {
250
301
  objects = currentConfigObject;
251
302
  isArray = true;
252
303
  }
@@ -255,13 +306,13 @@ function transferSubObject(propertyDefinition, nextDefinition, currentConfigObje
255
306
  }
256
307
  for (const innerObject of objects) {
257
308
  const additionalIds = [];
258
- if (breadcrumbs[0] === 'sections' && key === 'custom' && isArray) {
309
+ if (parameters.breadcrumbs[0] === v4_1.PropertyName.sections && parameters.key === 'custom' && isArray) {
259
310
  // We need add custom section 'id' into breadcrumbs to retrieve correct path to manifest
260
311
  additionalIds.push(innerObject['id']);
261
312
  }
262
- transferParameters.title = nextDefinition.title;
313
+ parameters.transferParameters.title = nextDefinition.title;
263
314
  // eslint-disable-next-line @typescript-eslint/no-use-before-define
264
- transferManifestEntriesAndFlexChange(transferParameters, innerObject, [...ids, ...additionalIds], localIdParts, [...breadcrumbs, key], nextDefinition.targetDefinition);
315
+ transferManifestEntriesAndFlexChange(parameters.transferParameters, innerObject, [...ids, ...additionalIds], localIdParts, [...parameters.breadcrumbs, parameters.key], nextDefinition.targetDefinition);
265
316
  }
266
317
  }
267
318
  /**
@@ -312,6 +363,7 @@ function createALPTableView(transferParameters, configObject, key) {
312
363
  * - a boolean infcating if the processing of sub-objects shall be stopped
313
364
  */
314
365
  function createALPChartView(transferParameters, configObject, key) {
366
+ var _a;
315
367
  let newElementCreated = false;
316
368
  if (!configObject[key] || Object.keys(configObject[key]).length === 0) {
317
369
  return { newElementCreated, stopProcessing: true };
@@ -341,7 +393,7 @@ function createALPChartView(transferParameters, configObject, key) {
341
393
  if (!views['paths'][0].secondary) {
342
394
  views['paths'][0].secondary = [
343
395
  {
344
- annotationPath: 'com.sap.vocabularies.UI.v1.LineItem'
396
+ annotationPath: ((_a = configObject === null || configObject === void 0 ? void 0 : configObject.table) === null || _a === void 0 ? void 0 : _a.annotationPath) || 'com.sap.vocabularies.UI.v1.LineItem'
345
397
  }
346
398
  ];
347
399
  }
@@ -354,28 +406,35 @@ function createALPChartView(transferParameters, configObject, key) {
354
406
  * @param configObject - current object in config.json
355
407
  * @returns a boolean indicating that the views entry got created.
356
408
  */
357
- function createLRTableView(transferParameters, key, configObject) {
409
+ function createLRTableView(index, transferParameters, key, configObject) {
358
410
  if (!configObject || Object.keys(configObject).length === 0) {
359
411
  return false;
360
412
  }
361
413
  let newElementCreated = false;
362
414
  const path = application_1.getSettingsPathForPage(transferParameters.pageNameArray) + `/views`;
363
415
  const views = common_1.getManifestSectionByPathV4(transferParameters.exportResults.manifest, path);
416
+ const newEntry = {
417
+ key: key,
418
+ annotationPath: configObject.annotationPath
419
+ };
364
420
  if (!views['paths'] || Object.keys(views['paths']).length === 0) {
365
- views['paths'] = [
366
- {
367
- key: key,
368
- annotationPath: configObject.annotationPath
369
- }
370
- ];
421
+ //No views yet
422
+ views['paths'] = [newEntry];
371
423
  newElementCreated = true;
372
424
  }
373
- else if (!views['paths'].find((view) => view.key === key)) {
374
- views['paths'].push({
375
- key: key,
376
- annotationPath: configObject.annotationPath
377
- });
378
- newElementCreated = true;
425
+ else {
426
+ const existingIndex = views['paths'].findIndex((view) => view.key === key);
427
+ if (existingIndex === -1) {
428
+ //Given view does not exist yet
429
+ views['paths'].push(newEntry);
430
+ newElementCreated = true;
431
+ }
432
+ else if (existingIndex !== index) {
433
+ //Reordering scenario
434
+ views['paths'].splice(existingIndex, 1);
435
+ views['paths'].splice(index, 0, newEntry);
436
+ newElementCreated = true;
437
+ }
379
438
  }
380
439
  return newElementCreated;
381
440
  }
@@ -388,19 +447,89 @@ function createLRTableView(transferParameters, key, configObject) {
388
447
  * @param {TransferParameterTypeV4} transferParameters - list of parameters passed from API
389
448
  * @returns newElementCreated - boolean value to indicate that a new element was created ==> no further sync rule on this level
390
449
  */
391
- function createNewElement(definitionName, key, configObject, breadcrumbs, transferParameters) {
450
+ function createNewElement(index, definitionName, key, configObject, breadcrumbs, transferParameters, preprocessed = false) {
392
451
  let newElementCreated = false;
393
452
  const stopProcessing = false;
394
- if (definitionName === v4_1.DefinitionName.ALPChartView && key === 'chart' && configObject) {
395
- return createALPChartView(transferParameters, configObject, key);
453
+ if (!preprocessed) {
454
+ if (definitionName === v4_1.DefinitionName.ALPChartView && key === v4_1.PropertyName.chart && configObject) {
455
+ return createALPChartView(transferParameters, configObject, key);
456
+ }
457
+ else if (definitionName === v4_1.DefinitionName.ALPTableView && key === v4_1.PropertyName.table && configObject) {
458
+ return createALPTableView(transferParameters, configObject, key);
459
+ }
460
+ else if (key &&
461
+ ((definitionName === null || definitionName === void 0 ? void 0 : definitionName.startsWith(v4_1.DefinitionName.LRTableView)) || (definitionName === null || definitionName === void 0 ? void 0 : definitionName.startsWith(v4_1.DefinitionName.LRChartView)))) {
462
+ newElementCreated = createLRTableView(index, transferParameters, key, configObject[key]);
463
+ }
396
464
  }
397
- else if (definitionName === v4_1.DefinitionName.ALPTableView && key === 'table' && configObject) {
398
- return createALPTableView(transferParameters, configObject, key);
465
+ return { newElementCreated, stopProcessing };
466
+ }
467
+ /**
468
+ * Transfers one enry of a list (aka one property of the config) to the manifest
469
+ * @param {TransferEntryParameters} parameters - list of parameters
470
+ * @param parentIds - array of collected parent ids
471
+ * @param stableIdParts - list of parts of the stable ID for flex changes
472
+ * @param preprocessed - indicates that the list was already preprocessed by following the config order
473
+ */
474
+ function transferSortedListEntry(parameters, parentIds, stableIdParts, preprocessed = false) {
475
+ var _a;
476
+ const currentConfigObject = parameters.configObject[parameters.key];
477
+ const childId = common_1.getChildId(parameters.configObject, parameters.key);
478
+ const nextDefinition = utils_1.getNextTargetDefinition(parameters.transferParameters.appSchema, parameters.transferParameters.title, currentConfigObject, parameters.propertyDefinition, parameters.key, parameters.transferParameters.factory, parameters.transferParameters.pageType);
479
+ const { newElementCreated, stopProcessing } = createNewElement(parameters.index, (_a = parameters.propertyDefinition.$ref) === null || _a === void 0 ? void 0 : _a.split(utils_1.DEFINITION_LINK_PREFIX)[1], parameters.key, parameters.configObject, parameters.breadcrumbs, parameters.transferParameters, preprocessed);
480
+ const ids = childId ? [...parentIds, childId] : [...parentIds, parameters.key];
481
+ if (!newElementCreated) {
482
+ evaluateExportRule(parameters.transferParameters, parameters.breadcrumbs, parameters.key, parameters.configObject, ids, parameters.propertyDefinition, nextDefinition);
483
+ }
484
+ if (parameters.propertyDefinition &&
485
+ (typeof currentConfigObject === 'object' ||
486
+ (parameters.propertyDefinition.$ref && nextDefinition.configObject)) &&
487
+ !stopProcessing) {
488
+ const localIdParts = childId ? [...stableIdParts, childId] : stableIdParts;
489
+ transferSubObject(parameters, nextDefinition, currentConfigObject, ids, localIdParts);
399
490
  }
400
- else if (key && ((definitionName === null || definitionName === void 0 ? void 0 : definitionName.startsWith('LRTableView')) || (definitionName === null || definitionName === void 0 ? void 0 : definitionName.startsWith('LRChartView')))) {
401
- newElementCreated = createLRTableView(transferParameters, key, configObject[key]);
491
+ }
492
+ /**
493
+ * Function for special handling of anyOf definitions during the export
494
+ * @param {TransferEntryParameters} parameters - list of parameters
495
+ * @param anyOfDefinitions - the array of definitions from the anyOf (of additionalProperties)
496
+ * @param schemaDefinition - parent definition, comprising properties as well as additionalProperties
497
+ * @param parentIds - array of collected parent ids
498
+ * @param stableIdParts - list of parts of the stable ID for flex changes
499
+ * @returns
500
+ */
501
+ function transferConfigEntriesWithAnyOfDefinitions(transferEntryParameters, anyOfDefinitions, schemaDefinition, parentIds, stableIdParts) {
502
+ let preprocessed = false;
503
+ if (anyOfDefinitions) {
504
+ const configEntries = Object.entries(transferEntryParameters.configObject);
505
+ if (!configEntries || configEntries.length < 1) {
506
+ return preprocessed;
507
+ }
508
+ configEntries.sort((a, b) => a[1]['index'] - b[1]['index']);
509
+ //follow the config order, to support reordering
510
+ configEntries.forEach((configEntry) => {
511
+ if (schemaDefinition.properties[configEntry[0]]) {
512
+ transferEntryParameters.key = configEntry[0];
513
+ transferEntryParameters.propertyDefinition = schemaDefinition.properties[configEntry[0]];
514
+ //already part of schema
515
+ transferSortedListEntry(transferEntryParameters, parentIds, stableIdParts);
516
+ preprocessed = true;
517
+ }
518
+ else if (typeof configEntry[1] === 'object') {
519
+ //match against potential schema definitions
520
+ anyOfDefinitions.forEach((anyOfDefinition) => {
521
+ if (anyOfDefinition.$ref) {
522
+ transferEntryParameters.key = configEntry[0];
523
+ transferEntryParameters.propertyDefinition = anyOfDefinition;
524
+ transferSortedListEntry(transferEntryParameters, parentIds, stableIdParts);
525
+ preprocessed = true;
526
+ }
527
+ });
528
+ }
529
+ transferEntryParameters.index++;
530
+ });
402
531
  }
403
- return { newElementCreated, stopProcessing };
532
+ return preprocessed;
404
533
  }
405
534
  /**
406
535
  * Recursive function that traverses the content of the current object. It reads decorators and fills exportResultManifest entries and flex changes
@@ -413,35 +542,36 @@ function createNewElement(definitionName, key, configObject, breadcrumbs, transf
413
542
  * @param title - the title to be used for the given schema definition
414
543
  */
415
544
  function transferManifestEntriesAndFlexChange(transferParameters, configObject, parentIds, stableIdParts, breadcrumbs, schemaDefinition) {
416
- var _a;
417
- let currentConfigObject;
418
- if (!(schemaDefinition === null || schemaDefinition === void 0 ? void 0 : schemaDefinition['properties'])) {
545
+ var _a, _b;
546
+ if (!(schemaDefinition === null || schemaDefinition === void 0 ? void 0 : schemaDefinition.properties)) {
419
547
  return;
420
548
  }
421
- //Sort, if there is a propertyIndex, so that the exported list ends up in manifest in the right order
422
- let sortedList = Object.entries(schemaDefinition['properties']);
549
+ let index = 0;
550
+ //In case of additionalProperties = flexible array definition ==> new entries from the config shall be exported too
551
+ const transferEntryParameters = {
552
+ transferParameters,
553
+ breadcrumbs,
554
+ key: undefined,
555
+ index,
556
+ configObject,
557
+ propertyDefinition: undefined
558
+ };
559
+ const anyOfDefinitions = (_a = schemaDefinition.additionalProperties) === null || _a === void 0 ? void 0 : _a.anyOf;
560
+ const preprocessed = transferConfigEntriesWithAnyOfDefinitions(transferEntryParameters, anyOfDefinitions, schemaDefinition, parentIds, stableIdParts);
561
+ //Sort if there is a propertyIndex, so that the exported list ends up in manifest in the right order
562
+ let sortedList = schemaDefinition.properties && Object.entries(schemaDefinition.properties);
423
563
  if (sortedList) {
424
- if ((_a = sortedList[0]) === null || _a === void 0 ? void 0 : _a[1]['propertyIndex']) {
425
- sortedList = Object.entries(schemaDefinition['properties']).sort((a, b) => a[1]['propertyIndex'] - b[1]['propertyIndex']);
564
+ if ((_b = sortedList[0]) === null || _b === void 0 ? void 0 : _b[1][v4_1.SchemaTag.propertyIndex]) {
565
+ sortedList = Object.entries(schemaDefinition.properties).sort((a, b) => a[1][v4_1.SchemaTag.propertyIndex] - b[1][v4_1.SchemaTag.propertyIndex]);
426
566
  }
567
+ index = 0;
427
568
  sortedList.forEach((element) => {
428
- var _a;
429
- const key = element[0];
430
- currentConfigObject = configObject[key];
431
- const childId = common_1.getChildId(configObject, key);
432
- const propertyDefinition = element[1];
433
- const nextDefinition = utils_1.getNextTargetDefinition(transferParameters.appSchema, transferParameters.title, currentConfigObject, propertyDefinition, key, transferParameters.factory, transferParameters.pageType);
434
- const definitionInSchema = (_a = propertyDefinition.$ref) === null || _a === void 0 ? void 0 : _a.split(utils_1.DEFINITION_LINK_PREFIX)[1];
435
- const { newElementCreated, stopProcessing } = createNewElement(definitionInSchema, key, configObject, breadcrumbs, transferParameters);
436
- const ids = childId ? [...parentIds, childId] : [...parentIds, key];
437
- if (!newElementCreated) {
438
- evaluateExportRule(transferParameters, breadcrumbs, key, configObject, ids, propertyDefinition, nextDefinition);
439
- }
440
- if (propertyDefinition &&
441
- (typeof currentConfigObject === 'object' || (propertyDefinition.$ref && nextDefinition.configObject)) &&
442
- !stopProcessing) {
443
- const localIdParts = childId ? [...stableIdParts, childId] : stableIdParts;
444
- transferSubObject(propertyDefinition, nextDefinition, currentConfigObject, breadcrumbs, key, transferParameters, ids, localIdParts);
569
+ transferEntryParameters.key = element[0];
570
+ transferEntryParameters.propertyDefinition = element[1];
571
+ transferEntryParameters.index = index;
572
+ transferSortedListEntry(transferEntryParameters, parentIds, stableIdParts, preprocessed);
573
+ if (element[1].$ref) {
574
+ index++;
445
575
  }
446
576
  });
447
577
  }
@@ -503,7 +633,7 @@ const exportObjectPage = (exportParameters, ui5Version) => {
503
633
  const pageLayoutInformation = common_1.getPageLayoutInformation(objectPage);
504
634
  const pageName = exportParameters.page.name;
505
635
  const baseId = `${exportParameters.appId}::${pageLayoutInformation.id}::${pageName}--`;
506
- if ((_a = exportParameters.page.config) === null || _a === void 0 ? void 0 : _a['sections']) {
636
+ if ((_a = exportParameters.page.config) === null || _a === void 0 ? void 0 : _a[v4_1.PropertyName.sections]) {
507
637
  getExportClassesForSections(exportParameters.page.config, objectPage, factory);
508
638
  }
509
639
  const transferParameters = {
@@ -512,6 +642,7 @@ const exportObjectPage = (exportParameters, ui5Version) => {
512
642
  appRootPath: exportParameters.appRootPath,
513
643
  baseId,
514
644
  appSchema: exportParameters.jsonSchema,
645
+ config: objectPage,
515
646
  ui5Version,
516
647
  factory,
517
648
  pageNameArray: [pageName],
@@ -534,28 +665,32 @@ const exportObjectPage = (exportParameters, ui5Version) => {
534
665
  * @param ui5Version - SAP UI5 version
535
666
  */
536
667
  const exportListPage = (exportParameters, factory, config, pageType, ui5Version, templateType) => {
537
- var _a;
668
+ var _a, _b;
538
669
  const exportResults = defaultExportResult;
539
670
  exportResults.manifest = JSON.parse(JSON.stringify(exportParameters.manifest));
540
- config.table = factory.createInstance(pageType, v4_1.DefinitionName.Table, config.table);
541
- if (((_a = config.table.toolBar) === null || _a === void 0 ? void 0 : _a.actions) && exportParameters.jsonSchema['definitions']['Actions<LineItems>']) {
542
- for (const actionKey in exportParameters.jsonSchema['definitions']['Actions<LineItems>'].properties) {
671
+ const appSchema = exportParameters.jsonSchema;
672
+ const tableDefinition = ((_a = config.table) === null || _a === void 0 ? void 0 : _a[v4_1.PropertyName.annotationPath]) ? v4_1.DefinitionName.ALPTableView
673
+ : v4_1.DefinitionName.Table;
674
+ config.table = factory.createInstance(pageType, tableDefinition, config.table);
675
+ if (((_b = config.table.toolBar) === null || _b === void 0 ? void 0 : _b.actions) && appSchema.definitions['Actions<LineItems>']) {
676
+ for (const actionKey in appSchema.definitions['Actions<LineItems>'].properties) {
543
677
  config.table.toolBar.actions[actionKey] = factory.createInstance(pageType, 'ToolBarAction', config.table.toolBar.actions[actionKey]);
544
678
  }
545
679
  }
546
680
  const pageLayoutInformation = common_1.getPageLayoutInformation(config);
547
681
  const pageName = exportParameters.page.name;
548
682
  const baseId = `${exportParameters.appId}::${pageLayoutInformation.id}::${pageName}--`;
549
- if (!exportResults.manifest[v4_1.ManifestSection.ui5]['routing']['targets'][pageName]) {
683
+ if (!exportResults.manifest[v4_1.ManifestSection.ui5].routing.targets[pageName]) {
550
684
  const newV4Page = getV4ManifestPageTemplate(pageLayoutInformation.pageId, pageName);
551
- exportResults.manifest[v4_1.ManifestSection.ui5]['routing']['targets'][pageName] = newV4Page;
685
+ exportResults.manifest[v4_1.ManifestSection.ui5].routing.targets[pageName] = newV4Page;
552
686
  }
553
687
  const transferParameters = {
554
688
  exportResults,
555
689
  appId: exportParameters.appId,
556
690
  appRootPath: exportParameters.appRootPath,
557
691
  baseId,
558
- appSchema: exportParameters.jsonSchema,
692
+ appSchema,
693
+ config,
559
694
  ui5Version,
560
695
  factory,
561
696
  pageNameArray: [pageName],
@@ -567,7 +702,7 @@ const exportListPage = (exportParameters, factory, config, pageType, ui5Version,
567
702
  transferManifestEntriesAndFlexChange(transferParameters, config, [], //no parentIds
568
703
  [], // no stableIds
569
704
  [], // no breadcrumbs
570
- exportParameters.jsonSchema //starting point for target definition
705
+ appSchema //starting point for target definition
571
706
  );
572
707
  return exportResults;
573
708
  };