@sap/ux-specification 1.96.26 → 1.96.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/dist/documentation/v2/v2-AnalyticalListPage.html +1 -1
  2. package/dist/documentation/v2/v2-ApplicationV2.html +1 -1
  3. package/dist/documentation/v2/v2-ListReport.html +1 -1
  4. package/dist/documentation/v2/v2-ObjectPage.html +1 -1
  5. package/dist/documentation/v2/v2-OverviewPage.html +1 -1
  6. package/dist/documentation/v4/v4-ApplicationV4.html +1 -1
  7. package/dist/documentation/v4/v4-BuildingBlocks.html +60 -0
  8. package/dist/documentation/v4/v4-FreestylePage.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 +262 -48
  12. package/dist/index-min.js.map +3 -3
  13. package/dist/package.json +111 -0
  14. package/dist/schemas/v2/ObjectPageConfig.json +4 -4
  15. package/dist/schemas/v4/BuildingBlocksConfig.json +750 -0
  16. package/dist/schemas/v4/ListReportConfig.json +38 -15
  17. package/dist/schemas/v4/ObjectPageConfig.json +309 -59
  18. package/dist/scripts/macros/api.d.ts +9 -0
  19. package/dist/scripts/macros/api.d.ts.map +1 -0
  20. package/dist/scripts/macros/api.js +161 -0
  21. package/dist/scripts/macros/api.js.map +1 -0
  22. package/dist/scripts/macros/cmd.d.ts +7 -0
  23. package/dist/scripts/macros/cmd.d.ts.map +1 -0
  24. package/dist/scripts/macros/cmd.js +49 -0
  25. package/dist/scripts/macros/cmd.js.map +1 -0
  26. package/dist/scripts/macros/corrections.d.ts +18 -0
  27. package/dist/scripts/macros/corrections.d.ts.map +1 -0
  28. package/dist/scripts/macros/corrections.js +188 -0
  29. package/dist/scripts/macros/corrections.js.map +1 -0
  30. package/dist/scripts/macros/index.d.ts +2 -0
  31. package/dist/scripts/macros/index.d.ts.map +1 -0
  32. package/dist/scripts/macros/index.js +8 -0
  33. package/dist/scripts/macros/index.js.map +1 -0
  34. package/dist/scripts/macros/schema.d.ts +9 -0
  35. package/dist/scripts/macros/schema.d.ts.map +1 -0
  36. package/dist/scripts/macros/schema.js +201 -0
  37. package/dist/scripts/macros/schema.js.map +1 -0
  38. package/dist/scripts/macros/types.d.ts +77 -0
  39. package/dist/scripts/macros/types.d.ts.map +1 -0
  40. package/dist/scripts/macros/types.js +14 -0
  41. package/dist/scripts/macros/types.js.map +1 -0
  42. package/dist/src/api.d.ts.map +1 -1
  43. package/dist/src/api.js +9 -2
  44. package/dist/src/api.js.map +1 -1
  45. package/dist/src/project.d.ts +1 -0
  46. package/dist/src/project.d.ts.map +1 -1
  47. package/dist/src/project.js +6 -4
  48. package/dist/src/project.js.map +1 -1
  49. package/dist/src/specification/schemaAccess.d.ts.map +1 -1
  50. package/dist/src/specification/schemaAccess.js +16 -3
  51. package/dist/src/specification/schemaAccess.js.map +1 -1
  52. package/dist/src/sync/common/appProvider.d.ts +12 -0
  53. package/dist/src/sync/common/appProvider.d.ts.map +1 -1
  54. package/dist/src/sync/common/appProvider.js +51 -18
  55. package/dist/src/sync/common/appProvider.js.map +1 -1
  56. package/dist/src/sync/common/generate/objectPage.d.ts +10 -6
  57. package/dist/src/sync/common/generate/objectPage.d.ts.map +1 -1
  58. package/dist/src/sync/common/generate/objectPage.js +224 -115
  59. package/dist/src/sync/common/generate/objectPage.js.map +1 -1
  60. package/dist/src/sync/common/generate/utils.d.ts +8 -8
  61. package/dist/src/sync/common/generate/utils.d.ts.map +1 -1
  62. package/dist/src/sync/common/generate/utils.js +40 -38
  63. package/dist/src/sync/common/generate/utils.js.map +1 -1
  64. package/dist/src/sync/common/i18n.json +2 -1
  65. package/dist/src/sync/common/importProject.d.ts.map +1 -1
  66. package/dist/src/sync/common/importProject.js +67 -31
  67. package/dist/src/sync/common/importProject.js.map +1 -1
  68. package/dist/src/sync/common/types.d.ts +6 -0
  69. package/dist/src/sync/common/types.d.ts.map +1 -0
  70. package/dist/src/sync/common/types.js +3 -0
  71. package/dist/src/sync/common/types.js.map +1 -0
  72. package/dist/src/sync/common/utils.d.ts +26 -5
  73. package/dist/src/sync/common/utils.d.ts.map +1 -1
  74. package/dist/src/sync/common/utils.js +72 -18
  75. package/dist/src/sync/common/utils.js.map +1 -1
  76. package/dist/src/sync/v2/export/controls/ObjectPageHeader.d.ts +2 -2
  77. package/dist/src/sync/v2/export/controls/ObjectPageHeader.d.ts.map +1 -1
  78. package/dist/src/sync/v2/generate/analyticalListReport.d.ts.map +1 -1
  79. package/dist/src/sync/v2/generate/analyticalListReport.js +1 -0
  80. package/dist/src/sync/v2/generate/analyticalListReport.js.map +1 -1
  81. package/dist/src/sync/v2/generate/listReport.d.ts.map +1 -1
  82. package/dist/src/sync/v2/generate/listReport.js +1 -0
  83. package/dist/src/sync/v2/generate/listReport.js.map +1 -1
  84. package/dist/src/sync/v2/generate/objectPage.d.ts.map +1 -1
  85. package/dist/src/sync/v2/generate/objectPage.js +75 -40
  86. package/dist/src/sync/v2/generate/objectPage.js.map +1 -1
  87. package/dist/src/sync/v2/generate/utils.d.ts +1 -1
  88. package/dist/src/sync/v2/generate/utils.d.ts.map +1 -1
  89. package/dist/src/sync/v2/generate/utils.js +22 -19
  90. package/dist/src/sync/v2/generate/utils.js.map +1 -1
  91. package/dist/src/sync/v4/application.d.ts +3 -0
  92. package/dist/src/sync/v4/application.d.ts.map +1 -1
  93. package/dist/src/sync/v4/application.js +13 -1
  94. package/dist/src/sync/v4/application.js.map +1 -1
  95. package/dist/src/sync/v4/export/controls/ObjectPageFooter.d.ts +9 -0
  96. package/dist/src/sync/v4/export/controls/ObjectPageFooter.d.ts.map +1 -0
  97. package/dist/src/sync/v4/export/controls/ObjectPageFooter.js +10 -0
  98. package/dist/src/sync/v4/export/controls/ObjectPageFooter.js.map +1 -0
  99. package/dist/src/sync/v4/export/controls/ObjectPageFooterAction.d.ts +23 -0
  100. package/dist/src/sync/v4/export/controls/ObjectPageFooterAction.d.ts.map +1 -0
  101. package/dist/src/sync/v4/export/controls/ObjectPageFooterAction.js +124 -0
  102. package/dist/src/sync/v4/export/controls/ObjectPageFooterAction.js.map +1 -0
  103. package/dist/src/sync/v4/export/controls/ObjectPageForm.d.ts +10 -3
  104. package/dist/src/sync/v4/export/controls/ObjectPageForm.d.ts.map +1 -1
  105. package/dist/src/sync/v4/export/controls/ObjectPageForm.js +39 -1
  106. package/dist/src/sync/v4/export/controls/ObjectPageForm.js.map +1 -1
  107. package/dist/src/sync/v4/export/controls/ObjectPageFormAction.d.ts +1 -1
  108. package/dist/src/sync/v4/export/controls/ObjectPageFormAction.js +8 -8
  109. package/dist/src/sync/v4/export/controls/ObjectPageHeader.d.ts +5 -0
  110. package/dist/src/sync/v4/export/controls/ObjectPageHeader.d.ts.map +1 -1
  111. package/dist/src/sync/v4/export/controls/ObjectPageHeader.js +4 -1
  112. package/dist/src/sync/v4/export/controls/ObjectPageHeader.js.map +1 -1
  113. package/dist/src/sync/v4/export/controls/ObjectPageHeaderAction.d.ts +23 -0
  114. package/dist/src/sync/v4/export/controls/ObjectPageHeaderAction.d.ts.map +1 -0
  115. package/dist/src/sync/v4/export/controls/ObjectPageHeaderAction.js +124 -0
  116. package/dist/src/sync/v4/export/controls/ObjectPageHeaderAction.js.map +1 -0
  117. package/dist/src/sync/v4/export/controls/ObjectPageTableColumn.d.ts +1 -2
  118. package/dist/src/sync/v4/export/controls/ObjectPageTableColumn.d.ts.map +1 -1
  119. package/dist/src/sync/v4/export/controls/ObjectPageTableColumn.js +0 -10
  120. package/dist/src/sync/v4/export/controls/ObjectPageTableColumn.js.map +1 -1
  121. package/dist/src/sync/v4/export/controls/ObjectPageToolBarAction.d.ts +1 -1
  122. package/dist/src/sync/v4/export/controls/ObjectPageToolBarAction.d.ts.map +1 -1
  123. package/dist/src/sync/v4/export/controls/ObjectPageToolBarAction.js +9 -9
  124. package/dist/src/sync/v4/export/controls/ObjectPageToolBarAction.js.map +1 -1
  125. package/dist/src/sync/v4/export/controls/Table.js +1 -1
  126. package/dist/src/sync/v4/export/controls/Table.js.map +1 -1
  127. package/dist/src/sync/v4/export/controls/ToolBar.d.ts +2 -2
  128. package/dist/src/sync/v4/export/controls/ToolBar.d.ts.map +1 -1
  129. package/dist/src/sync/v4/export/controls/ToolBarAction.d.ts +6 -1
  130. package/dist/src/sync/v4/export/controls/ToolBarAction.d.ts.map +1 -1
  131. package/dist/src/sync/v4/export/controls/ToolBarAction.js +33 -9
  132. package/dist/src/sync/v4/export/controls/ToolBarAction.js.map +1 -1
  133. package/dist/src/sync/v4/export/controls/index.d.ts +4 -0
  134. package/dist/src/sync/v4/export/controls/index.d.ts.map +1 -1
  135. package/dist/src/sync/v4/export/controls/index.js +4 -0
  136. package/dist/src/sync/v4/export/controls/index.js.map +1 -1
  137. package/dist/src/sync/v4/export/export.d.ts +1 -0
  138. package/dist/src/sync/v4/export/export.d.ts.map +1 -1
  139. package/dist/src/sync/v4/export/export.js +11 -6
  140. package/dist/src/sync/v4/export/export.js.map +1 -1
  141. package/dist/src/sync/v4/export/fpmCustomPage.d.ts +11 -0
  142. package/dist/src/sync/v4/export/fpmCustomPage.d.ts.map +1 -0
  143. package/dist/src/sync/v4/export/fpmCustomPage.js +131 -0
  144. package/dist/src/sync/v4/export/fpmCustomPage.js.map +1 -0
  145. package/dist/src/sync/v4/export/manifest.js +1 -1
  146. package/dist/src/sync/v4/export/manifest.js.map +1 -1
  147. package/dist/src/sync/v4/export/pages/ObjectPage.d.ts +1 -0
  148. package/dist/src/sync/v4/export/pages/ObjectPage.d.ts.map +1 -1
  149. package/dist/src/sync/v4/export/pages/ObjectPage.js.map +1 -1
  150. package/dist/src/sync/v4/generate/fpmCustomPage.d.ts +10 -0
  151. package/dist/src/sync/v4/generate/fpmCustomPage.d.ts.map +1 -0
  152. package/dist/src/sync/v4/generate/fpmCustomPage.js +266 -0
  153. package/dist/src/sync/v4/generate/fpmCustomPage.js.map +1 -0
  154. package/dist/src/sync/v4/generate/generate.d.ts +13 -1
  155. package/dist/src/sync/v4/generate/generate.d.ts.map +1 -1
  156. package/dist/src/sync/v4/generate/generate.js +22 -1
  157. package/dist/src/sync/v4/generate/generate.js.map +1 -1
  158. package/dist/src/sync/v4/generate/index.d.ts +2 -1
  159. package/dist/src/sync/v4/generate/index.d.ts.map +1 -1
  160. package/dist/src/sync/v4/generate/index.js +4 -1
  161. package/dist/src/sync/v4/generate/index.js.map +1 -1
  162. package/dist/src/sync/v4/generate/listReport.d.ts.map +1 -1
  163. package/dist/src/sync/v4/generate/listReport.js +26 -10
  164. package/dist/src/sync/v4/generate/listReport.js.map +1 -1
  165. package/dist/src/sync/v4/generate/objectPage.d.ts.map +1 -1
  166. package/dist/src/sync/v4/generate/objectPage.js +112 -34
  167. package/dist/src/sync/v4/generate/objectPage.js.map +1 -1
  168. package/dist/src/sync/v4/import/app/appProvider.d.ts +2 -1
  169. package/dist/src/sync/v4/import/app/appProvider.d.ts.map +1 -1
  170. package/dist/src/sync/v4/import/app/appProvider.js +2 -2
  171. package/dist/src/sync/v4/import/app/appProvider.js.map +1 -1
  172. package/dist/src/sync/v4/import/app/baseAppProvider.d.ts +7 -2
  173. package/dist/src/sync/v4/import/app/baseAppProvider.d.ts.map +1 -1
  174. package/dist/src/sync/v4/import/app/baseAppProvider.js +27 -7
  175. package/dist/src/sync/v4/import/app/baseAppProvider.js.map +1 -1
  176. package/dist/src/sync/v4/import/app/freestyleProvider.d.ts +2 -1
  177. package/dist/src/sync/v4/import/app/freestyleProvider.d.ts.map +1 -1
  178. package/dist/src/sync/v4/import/app/freestyleProvider.js +2 -2
  179. package/dist/src/sync/v4/import/app/freestyleProvider.js.map +1 -1
  180. package/dist/src/sync/v4/import/index.d.ts +1 -0
  181. package/dist/src/sync/v4/import/index.d.ts.map +1 -1
  182. package/dist/src/sync/v4/import/index.js +1 -0
  183. package/dist/src/sync/v4/import/index.js.map +1 -1
  184. package/dist/src/sync/v4/import/pages/fpmCustomPage.d.ts +9 -0
  185. package/dist/src/sync/v4/import/pages/fpmCustomPage.d.ts.map +1 -0
  186. package/dist/src/sync/v4/import/pages/fpmCustomPage.js +102 -0
  187. package/dist/src/sync/v4/import/pages/fpmCustomPage.js.map +1 -0
  188. package/dist/src/sync/v4/import/pages/objectPage.d.ts +2 -1
  189. package/dist/src/sync/v4/import/pages/objectPage.d.ts.map +1 -1
  190. package/dist/src/sync/v4/import/pages/objectPage.js +84 -43
  191. package/dist/src/sync/v4/import/pages/objectPage.js.map +1 -1
  192. package/dist/src/sync/v4/utils/macros.d.ts +29 -0
  193. package/dist/src/sync/v4/utils/macros.d.ts.map +1 -0
  194. package/dist/src/sync/v4/utils/macros.js +113 -0
  195. package/dist/src/sync/v4/utils/macros.js.map +1 -0
  196. package/dist/src/sync/v4/utils/utils.d.ts +11 -1
  197. package/dist/src/sync/v4/utils/utils.d.ts.map +1 -1
  198. package/dist/src/sync/v4/utils/utils.js +95 -8
  199. package/dist/src/sync/v4/utils/utils.js.map +1 -1
  200. package/package.json +16 -9
@@ -0,0 +1,161 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getMacrosAPI = void 0;
7
+ const fs_1 = __importDefault(require("fs"));
8
+ const semver_1 = require("semver");
9
+ const axios_1 = __importDefault(require("axios"));
10
+ const path_1 = require("path");
11
+ const LATEST_RELEASED_SPEC_VERSION = 102;
12
+ const MINIMAL_SUPPORTED_VERSION = 85;
13
+ const CACHE_FOLDER = 'cache';
14
+ const API_JSON = 'api.json';
15
+ var UI5Info;
16
+ (function (UI5Info) {
17
+ UI5Info["OfficialUrl"] = "https://ui5.sap.com";
18
+ UI5Info["NightlyBuild"] = "https://sapui5nightly.int.sap.eu2.hana.ondemand.com";
19
+ UI5Info["Versions"] = "version.json";
20
+ UI5Info["Api"] = "test-resources/sap/fe/macros/designtime/apiref/api.json";
21
+ })(UI5Info || (UI5Info = {}));
22
+ /**
23
+ * Method checks if passed specification version should be considered as latest.
24
+ * @param {string} specVersion Specification version.
25
+ * @returns {boolean} Is latest specification version.
26
+ */
27
+ function isLatestVersion(specVersion) {
28
+ const ui5Version = semver_1.coerce(specVersion);
29
+ return specVersion === '9.9.9' || (ui5Version.major === 1 && ui5Version.minor >= LATEST_RELEASED_SPEC_VERSION);
30
+ }
31
+ /**
32
+ * Method finds SAPUI5 version for passed specification version by searching in list of passed SAPUI5 versions.
33
+ * @param {UI5Versions} versions SAPUI5 versions.
34
+ * @param {string} specVersion Specification version.
35
+ * @returns {string} Found associated SAPUI5 versions.
36
+ */
37
+ function findValidVersion(versions, specVersion) {
38
+ const ui5Version = semver_1.coerce(specVersion);
39
+ if (ui5Version.major === 1 && ui5Version.minor < MINIMAL_SUPPORTED_VERSION) {
40
+ return undefined;
41
+ }
42
+ let foundVersion = undefined;
43
+ for (const version in versions) {
44
+ const versionInfo = semver_1.coerce(version);
45
+ if (!versionInfo) {
46
+ continue;
47
+ }
48
+ if (ui5Version.major === versionInfo.major && versionInfo.minor <= ui5Version.minor) {
49
+ if (!foundVersion || versionInfo.minor > foundVersion.minor) {
50
+ foundVersion = {
51
+ version: versions[version].version,
52
+ minor: versionInfo.minor
53
+ };
54
+ }
55
+ }
56
+ }
57
+ return foundVersion ? foundVersion.version : undefined;
58
+ }
59
+ /**
60
+ * Method returns valid SAPUI5 version for passed specification version by looking for SAPUI5 version in "https://ui5.sap.com/version.json".
61
+ * @param {string} specVersion Specification version.
62
+ * @returns {string} SAPUI5 versions.
63
+ */
64
+ async function getValidUI5Version(specVersion) {
65
+ let version = undefined;
66
+ const requestUrl = `${"https://ui5.sap.com" /* OfficialUrl */}/${"version.json" /* Versions */}`;
67
+ try {
68
+ const response = await axios_1.default.get(requestUrl);
69
+ if (response.status === 200) {
70
+ const ui5Version = findValidVersion(response.data, specVersion);
71
+ if (!ui5Version) {
72
+ console.log('No valid ui5 version found');
73
+ }
74
+ return ui5Version;
75
+ }
76
+ }
77
+ catch (error) {
78
+ console.log(`UI5 versions request "${requestUrl}" failed with error "${error}"`);
79
+ version = undefined;
80
+ }
81
+ return version;
82
+ }
83
+ /**
84
+ * Method retrieves "api.json" for "sap.fe.macros" by sending request to "https://ui5.sap.com/${ui5Version}/test-resources/sap/fe/macros/designtime/apiref/api.json".
85
+ * @param {string} ui5Version SAPUI5 version to read "sap.fe.macros" api.
86
+ * @param {boolean} [useNightlyBuild] If true, then dev/nightly build version will be retrieved.
87
+ * @returns {Promise<MacrosAPI | undefined>} Promise to "sap.fe.macros" api.
88
+ */
89
+ async function retrieveMacrosAPI(ui5Version, useNightlyBuild = false) {
90
+ let api = undefined;
91
+ const subPath = ui5Version ? `${ui5Version}/` : '';
92
+ const requestUrl = `${useNightlyBuild ? "https://sapui5nightly.int.sap.eu2.hana.ondemand.com" /* NightlyBuild */ : "https://ui5.sap.com" /* OfficialUrl */}/${subPath}${"test-resources/sap/fe/macros/designtime/apiref/api.json" /* Api */}`;
93
+ try {
94
+ const response = await axios_1.default.get(requestUrl);
95
+ if (response.status === 200) {
96
+ api = response.data;
97
+ }
98
+ }
99
+ catch (error) {
100
+ console.log(`API request "${requestUrl}" failed with error "${error}"`);
101
+ api = undefined;
102
+ }
103
+ return api;
104
+ }
105
+ /**
106
+ * Method saves passed api as cached version.
107
+ * @param {MacrosAPI} api "sap.fe.macros" api to save.
108
+ * @param {string} cachePath Cache folder path.
109
+ * @param {string} apiFilePath API file path.
110
+ */
111
+ function saveAPI(api, cachePath, apiFilePath) {
112
+ if (!fs_1.default.existsSync(cachePath)) {
113
+ fs_1.default.mkdirSync(cachePath);
114
+ }
115
+ // Save result
116
+ fs_1.default.writeFile(apiFilePath, JSON.stringify(api, null, 2), function (error) {
117
+ const message = error ? `Save failed with error "${error}"` : `${API_JSON} file successfully saved`;
118
+ console.log(message);
119
+ });
120
+ }
121
+ /**
122
+ * Method returns "sap.fe.macros" api for passed specification version.
123
+ * @param {string} specVersion Specification version.
124
+ * @param {boolean} [useNightlyBuild] If true, then dev/nightly build version will be retrieved.
125
+ * @returns {Promise<MacrosAPI | undefined>} Promise to "sap.fe.macros" api.
126
+ */
127
+ async function getMacrosAPI(specVersion, useNightlyBuild = false, overwriteCache = false) {
128
+ const cachePath = path_1.join(__dirname, CACHE_FOLDER);
129
+ const apiFilePath = path_1.join(cachePath, API_JSON);
130
+ let api;
131
+ // Check cached file
132
+ if (fs_1.default.existsSync(apiFilePath) && !overwriteCache) {
133
+ const apiContent = fs_1.default.readFileSync(apiFilePath, 'utf8');
134
+ try {
135
+ api = JSON.parse(apiContent);
136
+ }
137
+ catch {
138
+ console.log('Parse of cached api.json failed');
139
+ }
140
+ }
141
+ if (!api) {
142
+ // Find ui5 version to include into request URL for API
143
+ const useLatestVersion = isLatestVersion(specVersion);
144
+ let ui5Version = '';
145
+ // Get ui5 version
146
+ if (!useLatestVersion) {
147
+ // Find valid maintainable version
148
+ ui5Version = await getValidUI5Version(specVersion);
149
+ }
150
+ if (ui5Version || useLatestVersion) {
151
+ // Request macros API
152
+ api = await retrieveMacrosAPI(ui5Version, useNightlyBuild);
153
+ if (api) {
154
+ saveAPI(api, cachePath, apiFilePath);
155
+ }
156
+ }
157
+ }
158
+ return api;
159
+ }
160
+ exports.getMacrosAPI = getMacrosAPI;
161
+ //# sourceMappingURL=api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.js","sourceRoot":"","sources":["../../../scripts/macros/api.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AACpB,mCAAgC;AAChC,kDAA0B;AAC1B,+BAA4B;AAI5B,MAAM,4BAA4B,GAAG,GAAG,CAAC;AACzC,MAAM,yBAAyB,GAAG,EAAE,CAAC;AACrC,MAAM,YAAY,GAAG,OAAO,CAAC;AAC7B,MAAM,QAAQ,GAAG,UAAU,CAAC;AAE5B,IAAW,OAKV;AALD,WAAW,OAAO;IACd,8CAAmC,CAAA;IACnC,+EAAoE,CAAA;IACpE,oCAAyB,CAAA;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AAU,GAAuB,EAAE,CAAC;QACxC,kBAAkB;QAClB,IAAI,CAAC,gBAAgB,EAAE;YACnB,kCAAkC;YAClC,UAAU,GAAG,MAAM,kBAAkB,CAAC,WAAW,CAAC,CAAC;SACtD;QACD,IAAI,UAAU,IAAI,gBAAgB,EAAE;YAChC,qBAAqB;YACrB,GAAG,GAAG,MAAM,iBAAiB,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC;YAC3D,IAAI,GAAG,EAAE;gBACL,OAAO,CAAC,GAAG,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;aACxC;SACJ;KACJ;IACD,OAAO,GAAG,CAAC;AACf,CAAC;AAnCD,oCAmCC"}
@@ -0,0 +1,7 @@
1
+ export declare const FPM_CUSTOM_PAGE_GENERIC_SCHEMA_NAME = "BuildingBlocksConfig.json";
2
+ /**
3
+ * Run command to generate macros generic schema by resolving "sap.fe.macros" api.json.
4
+ * @param {string[]} argv Additional arguments for API retrieval and schema generation. Currently we support '--nightly' and '--update'.
5
+ */
6
+ export declare function run(argv: string[]): Promise<void>;
7
+ //# sourceMappingURL=cmd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cmd.d.ts","sourceRoot":"","sources":["../../../scripts/macros/cmd.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,mCAAmC,8BAA8B,CAAC;AAS/E;;;GAGG;AACH,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA4BvD"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.run = exports.FPM_CUSTOM_PAGE_GENERIC_SCHEMA_NAME = void 0;
7
+ const fs_1 = __importDefault(require("fs"));
8
+ const path_1 = require("path");
9
+ const package_json_1 = __importDefault(require("../../package.json"));
10
+ const api_1 = require("./api");
11
+ const schema_1 = require("./schema");
12
+ exports.FPM_CUSTOM_PAGE_GENERIC_SCHEMA_NAME = 'BuildingBlocksConfig.json';
13
+ const CmdParams = {
14
+ // Use nighly build api version
15
+ nightlyBuild: '--nightly',
16
+ // Overwrite cache
17
+ overwriteCache: '--update'
18
+ };
19
+ /**
20
+ * Run command to generate macros generic schema by resolving "sap.fe.macros" api.json.
21
+ * @param {string[]} argv Additional arguments for API retrieval and schema generation. Currently we support '--nightly' and '--update'.
22
+ */
23
+ async function run(argv) {
24
+ const api = await api_1.getMacrosAPI(package_json_1.default.version, argv.includes(CmdParams.nightlyBuild), argv.includes(CmdParams.overwriteCache));
25
+ if (api) {
26
+ // Generate generic schema for macros
27
+ const schema = schema_1.generateSchema(api);
28
+ // Make sure schemas/v4 folders exists
29
+ const rootName = path_1.join(__dirname, '..', '..');
30
+ const schemasDir = path_1.join(rootName, 'schemas');
31
+ const schemaV4Dir = path_1.join(schemasDir, 'v4');
32
+ const macrosSchemaPath = path_1.join(schemaV4Dir, exports.FPM_CUSTOM_PAGE_GENERIC_SCHEMA_NAME);
33
+ if (!fs_1.default.existsSync(schemasDir)) {
34
+ fs_1.default.mkdirSync(schemasDir);
35
+ }
36
+ if (!fs_1.default.existsSync(schemaV4Dir)) {
37
+ fs_1.default.mkdirSync(schemaV4Dir);
38
+ }
39
+ // Write generic macros schema file
40
+ fs_1.default.writeFile(macrosSchemaPath, JSON.stringify(schema, null, 2), function (error) {
41
+ const message = error
42
+ ? `Save for ${exports.FPM_CUSTOM_PAGE_GENERIC_SCHEMA_NAME} failed with error "${error}"`
43
+ : `${exports.FPM_CUSTOM_PAGE_GENERIC_SCHEMA_NAME} file successfully saved`;
44
+ console.log(message);
45
+ });
46
+ }
47
+ }
48
+ exports.run = run;
49
+ //# sourceMappingURL=cmd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cmd.js","sourceRoot":"","sources":["../../../scripts/macros/cmd.ts"],"names":[],"mappings":";;;;;;AAAA,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MAAM,OAAO,GAAG,KAAK;gBACjB,CAAC,CAAC,YAAY,2CAAmC,uBAAuB,KAAK,GAAG;gBAChF,CAAC,CAAC,GAAG,2CAAmC,0BAA0B,CAAC;YACvE,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACzB,CAAC,CAAC,CAAC;KACN;AACL,CAAC;AA5BD,kBA4BC"}
@@ -0,0 +1,18 @@
1
+ import type { MacrosAPI, UI5Aggregation, UI5Symbol, UI5Property } from './types';
2
+ interface APICorrection {
3
+ aggregations?: UI5Aggregation[];
4
+ properties?: UI5Property[];
5
+ metadata?: UI5Symbol;
6
+ }
7
+ export declare const macrosCorrection: {
8
+ [key: string]: APICorrection;
9
+ };
10
+ /**
11
+ * Method applies missing aggregations and properties for "sap.fe.macros" api object.
12
+ * We notice that api object of "sap.fe.macros" is missing some aggregation and properties information
13
+ * - in result we apply missing data on top of received api object.
14
+ * @param {MacrosAPI} api "sap.fe.macros" api object.
15
+ */
16
+ export declare function applyCorrections(api: MacrosAPI): void;
17
+ export {};
18
+ //# sourceMappingURL=corrections.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"corrections.d.ts","sourceRoot":"","sources":["../../../scripts/macros/corrections.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,SAAS,EAA8B,WAAW,EAAE,MAAM,SAAS,CAAC;AAE7G,UAAU,aAAa;IACnB,YAAY,CAAC,EAAE,cAAc,EAAE,CAAC;IAChC,UAAU,CAAC,EAAE,WAAW,EAAE,CAAC;IAC3B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB;AAED,eAAO,MAAM,gBAAgB,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAA;CA8G5D,CAAC;AAiDF;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,SAAS,GAAG,IAAI,CAmBrD"}
@@ -0,0 +1,188 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.applyCorrections = exports.macrosCorrection = void 0;
4
+ const types_1 = require("./types");
5
+ exports.macrosCorrection = {
6
+ 'sap.fe.macros.Table': {
7
+ aggregations: [
8
+ {
9
+ name: 'actions',
10
+ singularName: 'action',
11
+ type: 'sap.fe.macros.table.Action',
12
+ cardinality: '0..n',
13
+ visibility: types_1.UI5Visibility.public,
14
+ description: 'Table actions',
15
+ methods: [],
16
+ linkEnabled: true
17
+ },
18
+ {
19
+ name: 'columns',
20
+ singularName: 'column',
21
+ type: 'sap.fe.macros.table.Column',
22
+ cardinality: '0..n',
23
+ visibility: types_1.UI5Visibility.public,
24
+ description: 'Table columns',
25
+ methods: [],
26
+ linkEnabled: true
27
+ }
28
+ ],
29
+ properties: [
30
+ {
31
+ name: 'title',
32
+ description: 'The text that will be displayed for table title',
33
+ group: 'Misc',
34
+ methods: [],
35
+ visibility: types_1.UI5Visibility.public,
36
+ types: [
37
+ {
38
+ value: 'string'
39
+ }
40
+ ],
41
+ bindable: true,
42
+ defaultValue: ''
43
+ }
44
+ ]
45
+ },
46
+ 'sap.fe.macros.ActionGroup': {
47
+ aggregations: [
48
+ {
49
+ name: 'actions',
50
+ singularName: 'action',
51
+ type: 'sap.fe.macros.table.Action',
52
+ cardinality: '0..n',
53
+ visibility: types_1.UI5Visibility.public,
54
+ description: 'Table actions',
55
+ methods: [],
56
+ linkEnabled: true
57
+ }
58
+ ],
59
+ properties: [
60
+ {
61
+ defaultValue: '',
62
+ description: 'The text that will be displayed for this action group',
63
+ group: 'Misc',
64
+ methods: [],
65
+ name: 'text',
66
+ types: [
67
+ {
68
+ value: 'string'
69
+ }
70
+ ],
71
+ visibility: types_1.UI5Visibility.public
72
+ },
73
+ {
74
+ defaultValue: '',
75
+ description: 'Defines where this action group should be placed relative to the defined anchor',
76
+ group: 'Misc',
77
+ methods: [],
78
+ name: 'placement',
79
+ types: [
80
+ {
81
+ value: 'string'
82
+ }
83
+ ],
84
+ visibility: types_1.UI5Visibility.public
85
+ },
86
+ {
87
+ defaultValue: '',
88
+ description: 'Reference to the key of another action or action group already displayed in the toolbar to properly place this one',
89
+ group: 'Misc',
90
+ methods: [],
91
+ name: 'anchor',
92
+ types: [
93
+ {
94
+ value: 'string'
95
+ }
96
+ ],
97
+ visibility: types_1.UI5Visibility.public
98
+ }
99
+ ],
100
+ metadata: {
101
+ kind: types_1.SYMBOL_KIND_CLASS,
102
+ name: 'sap.fe.macros.ActionGroup',
103
+ basename: 'ActionGroup',
104
+ resource: '',
105
+ module: '',
106
+ static: true,
107
+ visibility: types_1.UI5Visibility.public,
108
+ description: 'Definition of a actions group to be used inside the table toolbar',
109
+ displayName: 'sap.fe.macros.ActionGroup',
110
+ title: 'class sap.fe.macros.ActionGroup',
111
+ subTitle: ''
112
+ }
113
+ }
114
+ };
115
+ /**
116
+ * Method returns node with "properties" and "aggregation" for passed symbol.
117
+ * If node does not contains "properties" or "aggregation", then it prepares empty objects.
118
+ * @param {ClassSymbol | TypedefSymbol} symbol Symbol from SAPUI5 api.
119
+ * @returns {APICorrection} Correction object which contains "properties" and "aggregation" properties.
120
+ */
121
+ function getNode(symbol) {
122
+ let node;
123
+ if (symbol.kind === types_1.SYMBOL_KIND_CLASS) {
124
+ if (!symbol[types_1.CLASS_SYMBOL_METADATA_PROPERTY]) {
125
+ symbol[types_1.CLASS_SYMBOL_METADATA_PROPERTY] = {
126
+ aggregations: [],
127
+ properties: [],
128
+ stereotype: ''
129
+ };
130
+ }
131
+ node = symbol[types_1.CLASS_SYMBOL_METADATA_PROPERTY];
132
+ }
133
+ else {
134
+ node = symbol;
135
+ }
136
+ if (!node.aggregations) {
137
+ node.aggregations = [];
138
+ }
139
+ if (!node.properties) {
140
+ node.properties = [];
141
+ }
142
+ return node;
143
+ }
144
+ /**
145
+ * Method applies correction for passed node.
146
+ * @param {APICorrection} node Original node to update with corrections.
147
+ * @param {APICorrection} correction Correction to apply - "properties" and "aggregation" are applied.
148
+ */
149
+ function applyCorrectionForNode(node, correction) {
150
+ for (const aggregation of correction.aggregations || []) {
151
+ if (!node.aggregations.some((existingAggregation) => existingAggregation.name === aggregation.name)) {
152
+ node.aggregations.push(aggregation);
153
+ }
154
+ }
155
+ for (const property of correction.properties || []) {
156
+ if (!node.properties.some((existingProperty) => existingProperty.name === property.name)) {
157
+ node.properties.push(property);
158
+ }
159
+ }
160
+ }
161
+ /**
162
+ * Method applies missing aggregations and properties for "sap.fe.macros" api object.
163
+ * We notice that api object of "sap.fe.macros" is missing some aggregation and properties information
164
+ * - in result we apply missing data on top of received api object.
165
+ * @param {MacrosAPI} api "sap.fe.macros" api object.
166
+ */
167
+ function applyCorrections(api) {
168
+ // Apply missing classes
169
+ for (const name in exports.macrosCorrection) {
170
+ const symbol = api.symbols.find((apiSymbol) => apiSymbol.name === name);
171
+ if (!symbol && exports.macrosCorrection[name].metadata) {
172
+ api.symbols.push({
173
+ ...exports.macrosCorrection[name].metadata
174
+ });
175
+ }
176
+ }
177
+ // Apply missing aggregation and properties
178
+ for (const symbol of api.symbols) {
179
+ const correction = exports.macrosCorrection[symbol.name];
180
+ if (!correction || symbol.kind === types_1.SYMBOL_KIND_NAMESPACE) {
181
+ continue;
182
+ }
183
+ const node = getNode(symbol);
184
+ applyCorrectionForNode(node, correction);
185
+ }
186
+ }
187
+ exports.applyCorrections = applyCorrections;
188
+ //# sourceMappingURL=corrections.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"corrections.js","sourceRoot":"","sources":["../../../scripts/macros/corrections.ts"],"names":[],"mappings":";;;AAAA,mCAAkH;AASrG,QAAA,gBAAgB,GAAqC;IAC9D,qBAAqB,EAAE;QACnB,YAAY,EAAE;YACV;gBACI,IAAI,EAAE,SAAS;gBACf,YAAY,EAAE,QAAQ;gBACtB,IAAI,EAAE,4BAA4B;gBAClC,WAAW,EAAE,MAAM;gBACnB,UAAU,EAAE,qBAAa,CAAC,MAAM;gBAChC,WAAW,EAAE,eAAe;gBAC5B,OAAO,EAAE,EA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CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACjD,IAAI,CAAC,UAAU,IAAI,MAAM,CAAC,IAAI,KAAK,6BAAqB,EAAE;YACtD,SAAS;SACZ;QACD,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;QAC7B,sBAAsB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;KAC5C;AACL,CAAC;AAnBD,4CAmBC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../scripts/macros/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const cmd_1 = require("./cmd");
4
+ /**
5
+ * Usage through command line
6
+ */
7
+ cmd_1.run(process.argv).catch((e) => console.error(e.message));
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../scripts/macros/index.ts"],"names":[],"mappings":";;AAAA,+BAA4B;AAE5B;;GAEG;AACH,SAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { SchemaDefinition } from '@sap/ux-specification-types';
2
+ import type { MacrosAPI } from './types';
3
+ /**
4
+ * Method generates generic schema for passed "sap.fe.macros" api.
5
+ * @param {MacrosAPI} api SAPUI5 "sap.fe.macros" api.
6
+ * @returns {SchemaDefinition} JSON schema for "sap.fe.macros" api.
7
+ */
8
+ export declare function generateSchema(api: MacrosAPI): SchemaDefinition;
9
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../scripts/macros/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAEpE,OAAO,KAAK,EACR,SAAS,EAQZ,MAAM,SAAS,CAAC;AAyKjB;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,SAAS,GAAG,gBAAgB,CAsC/D"}