@sap/ux-specification 1.120.53 → 1.120.55

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 (215) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/dist/documentation/v2/v2-AnalyticalListPage.html +2 -2
  3. package/dist/documentation/v2/v2-ApplicationV2.html +2 -2
  4. package/dist/documentation/v2/v2-ListReport.html +2 -2
  5. package/dist/documentation/v2/v2-ListReportNew.html +2 -2
  6. package/dist/documentation/v2/v2-ObjectPage.html +2 -2
  7. package/dist/documentation/v2/v2-OverviewPage.html +2 -2
  8. package/dist/documentation/v4/v4-ApplicationV4.html +2 -2
  9. package/dist/documentation/v4/v4-BuildingBlocks.html +2 -2
  10. package/dist/documentation/v4/v4-FreestylePage.html +2 -2
  11. package/dist/documentation/v4/v4-ListReport.html +2 -2
  12. package/dist/documentation/v4/v4-ObjectPage.html +2 -2
  13. package/dist/index-min.js +278 -269
  14. package/dist/index-min.js.map +4 -4
  15. package/dist/schemas/v2/ListReportNewConfig.json +202 -7
  16. package/dist/schemas/v4/BuildingBlocksConfig.json +73 -2
  17. package/dist/specification/package.json +10 -10
  18. package/dist/specification/scripts/macros/corrections.d.ts +1 -0
  19. package/dist/specification/scripts/macros/corrections.d.ts.map +1 -1
  20. package/dist/specification/scripts/macros/corrections.js +94 -2
  21. package/dist/specification/scripts/macros/corrections.js.map +1 -1
  22. package/dist/specification/scripts/macros/schema.d.ts.map +1 -1
  23. package/dist/specification/scripts/macros/schema.js +36 -10
  24. package/dist/specification/scripts/macros/schema.js.map +1 -1
  25. package/dist/specification/scripts/schema/to-json-schema.js +1 -1
  26. package/dist/specification/scripts/schema/to-json-schema.js.map +1 -1
  27. package/dist/specification/src/api.d.ts.map +1 -1
  28. package/dist/specification/src/api.js +39 -3
  29. package/dist/specification/src/api.js.map +1 -1
  30. package/dist/specification/src/ftfs/ftfs.d.ts +8 -0
  31. package/dist/specification/src/ftfs/ftfs.d.ts.map +1 -1
  32. package/dist/specification/src/ftfs/ftfs.js +1 -0
  33. package/dist/specification/src/ftfs/ftfs.js.map +1 -1
  34. package/dist/specification/src/ftfs/index.d.ts +1 -1
  35. package/dist/specification/src/ftfs/index.d.ts.map +1 -1
  36. package/dist/specification/src/ftfs/index.js +2 -1
  37. package/dist/specification/src/ftfs/index.js.map +1 -1
  38. package/dist/specification/src/ftfs/parser/model/TreeModel.d.ts.map +1 -1
  39. package/dist/specification/src/ftfs/parser/model/TreeModel.js +3 -1
  40. package/dist/specification/src/ftfs/parser/model/TreeModel.js.map +1 -1
  41. package/dist/specification/src/i18n/i18n.d.ts.map +1 -1
  42. package/dist/specification/src/i18n/i18n.js +2 -1
  43. package/dist/specification/src/i18n/i18n.js.map +1 -1
  44. package/dist/specification/src/sync/common/decoration/Decorator.d.ts +91 -0
  45. package/dist/specification/src/sync/common/decoration/Decorator.d.ts.map +1 -0
  46. package/dist/specification/src/sync/common/decoration/Decorator.js +139 -0
  47. package/dist/specification/src/sync/common/decoration/Decorator.js.map +1 -0
  48. package/dist/specification/src/sync/common/decoration/condition-evaluator.d.ts +95 -0
  49. package/dist/specification/src/sync/common/decoration/condition-evaluator.d.ts.map +1 -0
  50. package/dist/specification/src/sync/common/decoration/condition-evaluator.js +210 -0
  51. package/dist/specification/src/sync/common/decoration/condition-evaluator.js.map +1 -0
  52. package/dist/specification/src/sync/common/decoration/decorator-paths.d.ts +5 -22
  53. package/dist/specification/src/sync/common/decoration/decorator-paths.d.ts.map +1 -1
  54. package/dist/specification/src/sync/common/decoration/decorator-paths.js.map +1 -1
  55. package/dist/specification/src/sync/common/decoration/decorators.d.ts +6 -48
  56. package/dist/specification/src/sync/common/decoration/decorators.d.ts.map +1 -1
  57. package/dist/specification/src/sync/common/decoration/decorators.js +26 -106
  58. package/dist/specification/src/sync/common/decoration/decorators.js.map +1 -1
  59. package/dist/specification/src/sync/common/decoration/index.d.ts +4 -0
  60. package/dist/specification/src/sync/common/decoration/index.d.ts.map +1 -1
  61. package/dist/specification/src/sync/common/decoration/index.js +4 -0
  62. package/dist/specification/src/sync/common/decoration/index.js.map +1 -1
  63. package/dist/specification/src/sync/common/decoration/interfaces.d.ts +38 -0
  64. package/dist/specification/src/sync/common/decoration/interfaces.d.ts.map +1 -0
  65. package/dist/specification/src/sync/common/decoration/interfaces.js +3 -0
  66. package/dist/specification/src/sync/common/decoration/interfaces.js.map +1 -0
  67. package/dist/specification/src/sync/common/decoration/steps/Enums.d.ts +18 -0
  68. package/dist/specification/src/sync/common/decoration/steps/Enums.d.ts.map +1 -0
  69. package/dist/specification/src/sync/common/decoration/steps/Enums.js +50 -0
  70. package/dist/specification/src/sync/common/decoration/steps/Enums.js.map +1 -0
  71. package/dist/specification/src/sync/common/decoration/steps/Hide.d.ts +18 -0
  72. package/dist/specification/src/sync/common/decoration/steps/Hide.d.ts.map +1 -0
  73. package/dist/specification/src/sync/common/decoration/steps/Hide.js +46 -0
  74. package/dist/specification/src/sync/common/decoration/steps/Hide.js.map +1 -0
  75. package/dist/specification/src/sync/common/decoration/steps/Message.d.ts +26 -0
  76. package/dist/specification/src/sync/common/decoration/steps/Message.d.ts.map +1 -0
  77. package/dist/specification/src/sync/common/decoration/steps/Message.js +77 -0
  78. package/dist/specification/src/sync/common/decoration/steps/Message.js.map +1 -0
  79. package/dist/specification/src/sync/common/decoration/steps/Readonly.d.ts +18 -0
  80. package/dist/specification/src/sync/common/decoration/steps/Readonly.d.ts.map +1 -0
  81. package/dist/specification/src/sync/common/decoration/steps/Readonly.js +43 -0
  82. package/dist/specification/src/sync/common/decoration/steps/Readonly.js.map +1 -0
  83. package/dist/specification/src/sync/common/decoration/steps/Validity.d.ts +18 -0
  84. package/dist/specification/src/sync/common/decoration/steps/Validity.d.ts.map +1 -0
  85. package/dist/specification/src/sync/common/decoration/steps/Validity.js +68 -0
  86. package/dist/specification/src/sync/common/decoration/steps/Validity.js.map +1 -0
  87. package/dist/specification/src/sync/common/decoration/steps/enum-utils.d.ts +19 -0
  88. package/dist/specification/src/sync/common/decoration/steps/enum-utils.d.ts.map +1 -0
  89. package/dist/specification/src/sync/common/decoration/steps/enum-utils.js +48 -0
  90. package/dist/specification/src/sync/common/decoration/steps/enum-utils.js.map +1 -0
  91. package/dist/specification/src/sync/common/decoration/steps/index.d.ts +6 -0
  92. package/dist/specification/src/sync/common/decoration/steps/index.d.ts.map +1 -0
  93. package/dist/specification/src/sync/common/decoration/steps/index.js +14 -0
  94. package/dist/specification/src/sync/common/decoration/steps/index.js.map +1 -0
  95. package/dist/specification/src/sync/common/i18n.json +22 -0
  96. package/dist/specification/src/sync/v2/export/controls/Fragment.d.ts +4 -5
  97. package/dist/specification/src/sync/v2/export/controls/Fragment.d.ts.map +1 -1
  98. package/dist/specification/src/sync/v2/export/controls/Fragment.js +29 -20
  99. package/dist/specification/src/sync/v2/export/controls/Fragment.js.map +1 -1
  100. package/dist/specification/src/sync/v2/export/export.d.ts.map +1 -1
  101. package/dist/specification/src/sync/v2/export/export.js +3 -2
  102. package/dist/specification/src/sync/v2/export/export.js.map +1 -1
  103. package/dist/specification/src/sync/v2/export/exportPage.d.ts.map +1 -1
  104. package/dist/specification/src/sync/v2/export/exportPage.js +48 -19
  105. package/dist/specification/src/sync/v2/export/exportPage.js.map +1 -1
  106. package/dist/specification/src/sync/v2/export/exportPageGeneric.d.ts +2 -0
  107. package/dist/specification/src/sync/v2/export/exportPageGeneric.d.ts.map +1 -1
  108. package/dist/specification/src/sync/v2/export/exportPageGeneric.js +17 -6
  109. package/dist/specification/src/sync/v2/export/exportPageGeneric.js.map +1 -1
  110. package/dist/specification/src/sync/v2/export/view-controller-generator.d.ts +54 -6
  111. package/dist/specification/src/sync/v2/export/view-controller-generator.d.ts.map +1 -1
  112. package/dist/specification/src/sync/v2/export/view-controller-generator.js +106 -12
  113. package/dist/specification/src/sync/v2/export/view-controller-generator.js.map +1 -1
  114. package/dist/specification/src/sync/v2/generate/analyticalListReport.js +7 -7
  115. package/dist/specification/src/sync/v2/generate/analyticalListReport.js.map +1 -1
  116. package/dist/specification/src/sync/v2/generate/objectPage.d.ts.map +1 -1
  117. package/dist/specification/src/sync/v2/generate/objectPage.js +56 -2
  118. package/dist/specification/src/sync/v2/generate/objectPage.js.map +1 -1
  119. package/dist/specification/src/sync/v2/generate/schemaAdaptation.js +2 -2
  120. package/dist/specification/src/sync/v2/generate/schemaAdaptation.js.map +1 -1
  121. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/FilterBar.js +4 -4
  122. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiEdit.d.ts +12 -0
  123. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiEdit.d.ts.map +1 -0
  124. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiEdit.js +167 -0
  125. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiEdit.js.map +1 -0
  126. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiTable.js +3 -3
  127. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiTable.js.map +1 -1
  128. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.d.ts +59 -2
  129. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.d.ts.map +1 -1
  130. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.js +582 -7
  131. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.js.map +1 -1
  132. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.d.ts +1 -0
  133. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.d.ts.map +1 -1
  134. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.js +1 -0
  135. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.js.map +1 -1
  136. package/dist/specification/src/sync/v2/genericSchemaHandling/pages/pageAccess.d.ts.map +1 -1
  137. package/dist/specification/src/sync/v2/genericSchemaHandling/pages/pageAccess.js +29 -6
  138. package/dist/specification/src/sync/v2/genericSchemaHandling/pages/pageAccess.js.map +1 -1
  139. package/dist/specification/src/sync/v2/types.d.ts +2 -0
  140. package/dist/specification/src/sync/v2/types.d.ts.map +1 -1
  141. package/dist/specification/src/sync/v2/types.js.map +1 -1
  142. package/dist/specification/src/sync/v2/utils.d.ts +25 -0
  143. package/dist/specification/src/sync/v2/utils.d.ts.map +1 -1
  144. package/dist/specification/src/sync/v2/utils.js +28 -4
  145. package/dist/specification/src/sync/v2/utils.js.map +1 -1
  146. package/dist/specification/src/sync/v4/application.d.ts +11 -0
  147. package/dist/specification/src/sync/v4/application.d.ts.map +1 -1
  148. package/dist/specification/src/sync/v4/application.js +16 -1
  149. package/dist/specification/src/sync/v4/application.js.map +1 -1
  150. package/dist/specification/src/sync/v4/export/controls/ToolBarAction.d.ts +3 -1
  151. package/dist/specification/src/sync/v4/export/controls/ToolBarAction.d.ts.map +1 -1
  152. package/dist/specification/src/sync/v4/export/controls/ToolBarAction.js +10 -7
  153. package/dist/specification/src/sync/v4/export/controls/ToolBarAction.js.map +1 -1
  154. package/dist/specification/src/sync/v4/export/fpmCustomPage.d.ts +1 -0
  155. package/dist/specification/src/sync/v4/export/fpmCustomPage.d.ts.map +1 -1
  156. package/dist/specification/src/sync/v4/export/fpmCustomPage.js +212 -46
  157. package/dist/specification/src/sync/v4/export/fpmCustomPage.js.map +1 -1
  158. package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.d.ts +13 -0
  159. package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.d.ts.map +1 -1
  160. package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.js +93 -13
  161. package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.js.map +1 -1
  162. package/dist/specification/src/sync/v4/generate/fpm-custom-page/extensions.d.ts.map +1 -1
  163. package/dist/specification/src/sync/v4/generate/fpm-custom-page/extensions.js +4 -3
  164. package/dist/specification/src/sync/v4/generate/fpm-custom-page/extensions.js.map +1 -1
  165. package/dist/specification/src/sync/v4/generate/fpm-custom-page/generator.d.ts.map +1 -1
  166. package/dist/specification/src/sync/v4/generate/fpm-custom-page/generator.js +29 -27
  167. package/dist/specification/src/sync/v4/generate/fpm-custom-page/generator.js.map +1 -1
  168. package/dist/specification/src/sync/v4/generate/fpm-custom-page/utils.d.ts.map +1 -1
  169. package/dist/specification/src/sync/v4/generate/fpm-custom-page/utils.js +12 -3
  170. package/dist/specification/src/sync/v4/generate/fpm-custom-page/utils.js.map +1 -1
  171. package/dist/specification/src/sync/v4/generate/objectPage.js +17 -23
  172. package/dist/specification/src/sync/v4/generate/objectPage.js.map +1 -1
  173. package/dist/specification/src/sync/v4/import/pages/fpmCustomPage.d.ts.map +1 -1
  174. package/dist/specification/src/sync/v4/import/pages/fpmCustomPage.js +20 -0
  175. package/dist/specification/src/sync/v4/import/pages/fpmCustomPage.js.map +1 -1
  176. package/dist/specification/src/sync/v4/sync-rules/App.d.ts +2 -4
  177. package/dist/specification/src/sync/v4/sync-rules/App.d.ts.map +1 -1
  178. package/dist/specification/src/sync/v4/sync-rules/App.js +2 -1
  179. package/dist/specification/src/sync/v4/sync-rules/App.js.map +1 -1
  180. package/dist/specification/src/sync/v4/sync-rules/AppSchema.d.ts +2 -1
  181. package/dist/specification/src/sync/v4/sync-rules/AppSchema.d.ts.map +1 -1
  182. package/dist/specification/src/sync/v4/sync-rules/AppSchema.js +3 -1
  183. package/dist/specification/src/sync/v4/sync-rules/AppSchema.js.map +1 -1
  184. package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.d.ts +119 -127
  185. package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.d.ts.map +1 -1
  186. package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.js +171 -170
  187. package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.js.map +1 -1
  188. package/dist/specification/src/sync/v4/sync-rules/Page.d.ts +5 -0
  189. package/dist/specification/src/sync/v4/sync-rules/Page.d.ts.map +1 -1
  190. package/dist/specification/src/sync/v4/sync-rules/Page.js.map +1 -1
  191. package/dist/specification/src/sync/v4/utils/macros.d.ts +19 -0
  192. package/dist/specification/src/sync/v4/utils/macros.d.ts.map +1 -1
  193. package/dist/specification/src/sync/v4/utils/macros.js +34 -0
  194. package/dist/specification/src/sync/v4/utils/macros.js.map +1 -1
  195. package/dist/specification/test/test-utils/utils.d.ts.map +1 -1
  196. package/dist/specification/test/test-utils/utils.js +4 -0
  197. package/dist/specification/test/test-utils/utils.js.map +1 -1
  198. package/dist/specification/test/unit/decorators/validity-test-utils.d.ts +2 -2
  199. package/dist/specification/test/unit/decorators/validity-test-utils.d.ts.map +1 -1
  200. package/dist/specification/test/unit/decorators/validity-test-utils.js +6 -6
  201. package/dist/specification/test/unit/decorators/validity-test-utils.js.map +1 -1
  202. package/dist/templates/AnalyticalTableColumnsExtension.xml +3 -3
  203. package/dist/templates/GridTableColumnsExtension.xml +3 -3
  204. package/dist/templates/ResponsiveTableColumnsExtension.xml +2 -2
  205. package/dist/templates/TreeTableColumnsExtension.xml +4 -4
  206. package/dist/templates/fragment.xml +3 -3
  207. package/dist/templates/view.xml +3 -3
  208. package/dist/types/src/apiTypes.d.ts +15 -5
  209. package/dist/types/src/apiTypes.d.ts.map +1 -1
  210. package/dist/types/src/apiTypes.js +1 -0
  211. package/dist/types/src/apiTypes.js.map +1 -1
  212. package/dist/types/src/common/types.d.ts +1 -0
  213. package/dist/types/src/common/types.d.ts.map +1 -1
  214. package/dist/types/src/common/types.js.map +1 -1
  215. package/package.json +11 -11
@@ -0,0 +1,26 @@
1
+ import type { Definition } from 'typescript-json-schema';
2
+ import type { DecoratorStep, DecoratorContext } from '../interfaces';
3
+ /**
4
+ * Message step - adds messages to properties when conditions are met.
5
+ * Multiple @message decorators can be applied to the same property.
6
+ */
7
+ export declare class Message implements DecoratorStep {
8
+ readonly name = "message";
9
+ /**
10
+ * Adds messages to properties whose conditions are met.
11
+ *
12
+ * @param target - The class prototype containing decorator metadata
13
+ * @param definition - The schema definition to modify
14
+ * @param context - Runtime context for condition evaluation
15
+ */
16
+ init(target: object, definition: Definition, context: DecoratorContext): void;
17
+ /**
18
+ * Adds a translated message to the schema property if the metadata contains a MessageConfig.
19
+ *
20
+ * @param metadata - Decorator metadata containing the message config
21
+ * @param definition - The schema property definition to add the message to
22
+ * @param evaluator - Condition evaluator used to resolve PathNode params
23
+ */
24
+ private addConditionalMessage;
25
+ }
26
+ //# sourceMappingURL=Message.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../../../../../../src/sync/common/decoration/steps/Message.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAwBrE;;;GAGG;AACH,qBAAa,OAAQ,YAAW,aAAa;IACzC,QAAQ,CAAC,IAAI,aAAa;IAE1B;;;;;;OAMG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,gBAAgB,GAAG,IAAI;IAsB7E;;;;;;OAMG;IACH,OAAO,CAAC,qBAAqB;CAahC"}
@@ -0,0 +1,77 @@
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.Message = void 0;
7
+ const ux_specification_types_1 = require("@sap/ux-specification-types");
8
+ const decorators_1 = require("../decorators");
9
+ const decorator_paths_1 = require("../decorator-paths");
10
+ const condition_evaluator_1 = require("../condition-evaluator");
11
+ const i18next_1 = __importDefault(require("i18next"));
12
+ /**
13
+ * Adds a message to a schema element.
14
+ *
15
+ * @param element - The schema element to add the message to
16
+ * @param root0 - Message parameters object
17
+ * @param root0.text - The message text
18
+ * @param root0.deletable - Whether the message is deletable (default: false)
19
+ */
20
+ function addMessageToSchema(element, { text, deletable = false }) {
21
+ if (!element[ux_specification_types_1.SchemaTag.messages]) {
22
+ element[ux_specification_types_1.SchemaTag.messages] = [];
23
+ }
24
+ element[ux_specification_types_1.SchemaTag.messages].push({ text, deletable });
25
+ }
26
+ /**
27
+ * Message step - adds messages to properties when conditions are met.
28
+ * Multiple @message decorators can be applied to the same property.
29
+ */
30
+ class Message {
31
+ constructor() {
32
+ this.name = 'message';
33
+ }
34
+ /**
35
+ * Adds messages to properties whose conditions are met.
36
+ *
37
+ * @param target - The class prototype containing decorator metadata
38
+ * @param definition - The schema definition to modify
39
+ * @param context - Runtime context for condition evaluation
40
+ */
41
+ init(target, definition, context) {
42
+ if (!definition?.properties || !target) {
43
+ return;
44
+ }
45
+ const evaluator = new condition_evaluator_1.ConditionEvaluator(context);
46
+ for (const propertyName in definition.properties) {
47
+ const property = definition.properties[propertyName];
48
+ const messageInfoList = Reflect.getMetadata(decorators_1.metadataKeys.message, target, propertyName);
49
+ if (messageInfoList) {
50
+ for (const messageInfo of messageInfoList) {
51
+ const { passed } = evaluator.evaluate(messageInfo);
52
+ if (passed && messageInfo.messageConfig) {
53
+ this.addConditionalMessage(messageInfo, property, evaluator);
54
+ }
55
+ }
56
+ }
57
+ }
58
+ }
59
+ /**
60
+ * Adds a translated message to the schema property if the metadata contains a MessageConfig.
61
+ *
62
+ * @param metadata - Decorator metadata containing the message config
63
+ * @param definition - The schema property definition to add the message to
64
+ * @param evaluator - Condition evaluator used to resolve PathNode params
65
+ */
66
+ addConditionalMessage(metadata, definition, evaluator) {
67
+ // Handle MessageConfig format (from msg() helper)
68
+ if (metadata.messageConfig && (0, decorator_paths_1.isMessageConfig)(metadata.messageConfig)) {
69
+ const msgConfig = metadata.messageConfig;
70
+ const resolvedParams = evaluator.resolveMessageParams(msgConfig.params);
71
+ const messageText = i18next_1.default.t(msgConfig.i18nKey, resolvedParams);
72
+ addMessageToSchema(definition, { text: messageText, deletable: msgConfig.deletable });
73
+ }
74
+ }
75
+ }
76
+ exports.Message = Message;
77
+ //# sourceMappingURL=Message.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Message.js","sourceRoot":"","sources":["../../../../../../../src/sync/common/decoration/steps/Message.ts"],"names":[],"mappings":";;;;;;AACA,wEAAwD;AAExD,8CAAqE;AACrE,wDAAqD;AACrD,gEAA4D;AAC5D,sDAA8B;AAE9B;;;;;;;GAOG;AACH,SAAS,kBAAkB,CACvB,OAAmB,EACnB,EAAE,IAAI,EAAE,SAAS,GAAG,KAAK,EAAyC;IAElE,IAAI,CAAC,OAAO,CAAC,kCAAS,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC/B,OAAO,CAAC,kCAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;IACrC,CAAC;IACD,OAAO,CAAC,kCAAS,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC;AAC1D,CAAC;AAED;;;GAGG;AACH,MAAa,OAAO;IAApB;QACa,SAAI,GAAG,SAAS,CAAC;IAmD9B,CAAC;IAjDG;;;;;;OAMG;IACH,IAAI,CAAC,MAAc,EAAE,UAAsB,EAAE,OAAyB;QAClE,IAAI,CAAC,UAAU,EAAE,UAAU,IAAI,CAAC,MAAM,EAAE,CAAC;YACrC,OAAO;QACX,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,wCAAkB,CAAC,OAAO,CAAC,CAAC;QAElD,KAAK,MAAM,YAAY,IAAI,UAAU,CAAC,UAAU,EAAE,CAAC;YAC/C,MAAM,QAAQ,GAAG,UAAU,CAAC,UAAU,CAAC,YAAY,CAAe,CAAC;YACnE,MAAM,eAAe,GAAG,OAAO,CAAC,WAAW,CAAC,yBAAY,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;YAExF,IAAI,eAAe,EAAE,CAAC;gBAClB,KAAK,MAAM,WAAW,IAAI,eAAe,EAAE,CAAC;oBACxC,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;oBACnD,IAAI,MAAM,IAAI,WAAW,CAAC,aAAa,EAAE,CAAC;wBACtC,IAAI,CAAC,qBAAqB,CAAC,WAAW,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;oBACjE,CAAC;gBACL,CAAC;YACL,CAAC;QACL,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACK,qBAAqB,CACzB,QAA2B,EAC3B,UAAsB,EACtB,SAA6B;QAE7B,kDAAkD;QAClD,IAAI,QAAQ,CAAC,aAAa,IAAI,IAAA,iCAAe,EAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;YACpE,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC;YACzC,MAAM,cAAc,GAAG,SAAS,CAAC,oBAAoB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YACxE,MAAM,WAAW,GAAG,iBAAO,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;YACjE,kBAAkB,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,CAAC,SAAS,EAAE,CAAC,CAAC;QAC1F,CAAC;IACL,CAAC;CACJ;AApDD,0BAoDC"}
@@ -0,0 +1,18 @@
1
+ import type { Definition } from 'typescript-json-schema';
2
+ import type { DecoratorStep, DecoratorContext } from '../interfaces';
3
+ /**
4
+ * Readonly step - marks properties as readonly when their condition evaluates to true.
5
+ * Runs last in the pipeline.
6
+ */
7
+ export declare class Readonly implements DecoratorStep {
8
+ readonly name = "readonly";
9
+ /**
10
+ * Marks properties as readonly when their condition evaluates to true.
11
+ *
12
+ * @param target - The class prototype containing decorator metadata
13
+ * @param definition - The schema definition to modify
14
+ * @param context - Runtime context for condition evaluation
15
+ */
16
+ init(target: object, definition: Definition, context: DecoratorContext): void;
17
+ }
18
+ //# sourceMappingURL=Readonly.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Readonly.d.ts","sourceRoot":"","sources":["../../../../../../../src/sync/common/decoration/steps/Readonly.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAIrE;;;GAGG;AACH,qBAAa,QAAS,YAAW,aAAa;IAC1C,QAAQ,CAAC,IAAI,cAAc;IAE3B;;;;;;OAMG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,gBAAgB,GAAG,IAAI;CAuBhF"}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Readonly = void 0;
4
+ const decorators_1 = require("../decorators");
5
+ const condition_evaluator_1 = require("../condition-evaluator");
6
+ /**
7
+ * Readonly step - marks properties as readonly when their condition evaluates to true.
8
+ * Runs last in the pipeline.
9
+ */
10
+ class Readonly {
11
+ constructor() {
12
+ this.name = 'readonly';
13
+ }
14
+ /**
15
+ * Marks properties as readonly when their condition evaluates to true.
16
+ *
17
+ * @param target - The class prototype containing decorator metadata
18
+ * @param definition - The schema definition to modify
19
+ * @param context - Runtime context for condition evaluation
20
+ */
21
+ init(target, definition, context) {
22
+ if (!definition?.properties || !target) {
23
+ return;
24
+ }
25
+ const evaluator = new condition_evaluator_1.ConditionEvaluator(context);
26
+ for (const propertyName in definition.properties) {
27
+ const property = definition.properties[propertyName];
28
+ const readonlyConditions = Reflect.getMetadata(decorators_1.metadataKeys.readonly, target, propertyName);
29
+ if (readonlyConditions) {
30
+ // Readonly when ANY condition IS met (OR semantics across multiple @readonly decorators)
31
+ for (const condition of readonlyConditions) {
32
+ const { passed } = evaluator.evaluate(condition);
33
+ if (passed) {
34
+ property.readOnly = true;
35
+ break;
36
+ }
37
+ }
38
+ }
39
+ }
40
+ }
41
+ }
42
+ exports.Readonly = Readonly;
43
+ //# sourceMappingURL=Readonly.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Readonly.js","sourceRoot":"","sources":["../../../../../../../src/sync/common/decoration/steps/Readonly.ts"],"names":[],"mappings":";;;AAEA,8CAA6C;AAC7C,gEAA4D;AAE5D;;;GAGG;AACH,MAAa,QAAQ;IAArB;QACa,SAAI,GAAG,UAAU,CAAC;IAgC/B,CAAC;IA9BG;;;;;;OAMG;IACH,IAAI,CAAC,MAAc,EAAE,UAAsB,EAAE,OAAyB;QAClE,IAAI,CAAC,UAAU,EAAE,UAAU,IAAI,CAAC,MAAM,EAAE,CAAC;YACrC,OAAO;QACX,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,wCAAkB,CAAC,OAAO,CAAC,CAAC;QAElD,KAAK,MAAM,YAAY,IAAI,UAAU,CAAC,UAAU,EAAE,CAAC;YAC/C,MAAM,QAAQ,GAAG,UAAU,CAAC,UAAU,CAAC,YAAY,CAAe,CAAC;YACnE,MAAM,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAAC,yBAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;YAE5F,IAAI,kBAAkB,EAAE,CAAC;gBACrB,yFAAyF;gBACzF,KAAK,MAAM,SAAS,IAAI,kBAAkB,EAAE,CAAC;oBACzC,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;oBACjD,IAAI,MAAM,EAAE,CAAC;wBACT,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC;wBACzB,MAAM;oBACV,CAAC;gBACL,CAAC;YACL,CAAC;QACL,CAAC;IACL,CAAC;CACJ;AAjCD,4BAiCC"}
@@ -0,0 +1,18 @@
1
+ import type { Definition } from 'typescript-json-schema';
2
+ import type { DecoratorStep, DecoratorContext } from '../interfaces';
3
+ /**
4
+ * Validity step - hides properties and filters enum values based on UI5 version requirements.
5
+ * Runs first in the pipeline.
6
+ */
7
+ export declare class Validity implements DecoratorStep {
8
+ readonly name = "validity";
9
+ /**
10
+ * Hides properties or filters enum values based on UI5 version requirements.
11
+ *
12
+ * @param target - The class prototype containing decorator metadata
13
+ * @param definition - The schema definition to modify
14
+ * @param context - Runtime context providing the minimum UI5 version
15
+ */
16
+ init(target: object, definition: Definition, context: DecoratorContext): void;
17
+ }
18
+ //# sourceMappingURL=Validity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Validity.d.ts","sourceRoot":"","sources":["../../../../../../../src/sync/common/decoration/steps/Validity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAKrE;;;GAGG;AACH,qBAAa,QAAS,YAAW,aAAa;IAC1C,QAAQ,CAAC,IAAI,cAAc;IAE3B;;;;;;OAMG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,gBAAgB,GAAG,IAAI;CAkDhF"}
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Validity = void 0;
4
+ const ux_specification_types_1 = require("@sap/ux-specification-types");
5
+ const utils_1 = require("../../../v4/sync-rules/utils");
6
+ const decorators_1 = require("../decorators");
7
+ const enum_utils_1 = require("./enum-utils");
8
+ /**
9
+ * Validity step - hides properties and filters enum values based on UI5 version requirements.
10
+ * Runs first in the pipeline.
11
+ */
12
+ class Validity {
13
+ constructor() {
14
+ this.name = 'validity';
15
+ }
16
+ /**
17
+ * Hides properties or filters enum values based on UI5 version requirements.
18
+ *
19
+ * @param target - The class prototype containing decorator metadata
20
+ * @param definition - The schema definition to modify
21
+ * @param context - Runtime context providing the minimum UI5 version
22
+ */
23
+ init(target, definition, context) {
24
+ const minUI5Version = context.app?.getMinUI5Version?.();
25
+ if (!definition?.properties || !minUI5Version) {
26
+ return;
27
+ }
28
+ for (const propertyName in definition.properties) {
29
+ const property = definition.properties[propertyName];
30
+ const validityInfo = Reflect.getMetadata(decorators_1.metadataKeys.validity, target, propertyName);
31
+ // Check if property has a 'since' requirement that exceeds the app's minUI5Version
32
+ if (validityInfo?.since && !(0, utils_1.compareUI5Versions)(minUI5Version, validityInfo.since)) {
33
+ property[ux_specification_types_1.SchemaTag.hidden] = true;
34
+ }
35
+ // Process enum validity configuration
36
+ if (validityInfo?.enum) {
37
+ const enumValues = (0, enum_utils_1.resolveEnumFromProperty)(property, context);
38
+ if (enumValues) {
39
+ const filteredEnum = enumValues.filter((enumValue) => {
40
+ const enumValueStr = String(enumValue);
41
+ const condition = validityInfo.enum?.[enumValueStr];
42
+ if (!condition) {
43
+ return true; // Keep values without conditions
44
+ }
45
+ // Check UI5 version requirement
46
+ if (condition.since && minUI5Version) {
47
+ if (!(0, utils_1.compareUI5Versions)(minUI5Version, condition.since)) {
48
+ return false;
49
+ }
50
+ }
51
+ // Check property dependency using dependsOn function
52
+ if (condition.dependsOn) {
53
+ if (!condition.dependsOn(context)) {
54
+ return false;
55
+ }
56
+ }
57
+ return true;
58
+ });
59
+ if (filteredEnum.length !== enumValues.length) {
60
+ (0, enum_utils_1.applyFilteredEnumToProperty)(property, filteredEnum, context);
61
+ }
62
+ }
63
+ }
64
+ }
65
+ }
66
+ }
67
+ exports.Validity = Validity;
68
+ //# sourceMappingURL=Validity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Validity.js","sourceRoot":"","sources":["../../../../../../../src/sync/common/decoration/steps/Validity.ts"],"names":[],"mappings":";;;AACA,wEAAwD;AAExD,wDAAkE;AAClE,8CAA6C;AAC7C,6CAAoF;AAEpF;;;GAGG;AACH,MAAa,QAAQ;IAArB;QACa,SAAI,GAAG,UAAU,CAAC;IA2D/B,CAAC;IAzDG;;;;;;OAMG;IACH,IAAI,CAAC,MAAc,EAAE,UAAsB,EAAE,OAAyB;QAClE,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,EAAE,gBA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IAAI,SAAS,CAAC,SAAS,EAAE,CAAC;4BACtB,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC;gCAChC,OAAO,KAAK,CAAC;4BACjB,CAAC;wBACL,CAAC;wBAED,OAAO,IAAI,CAAC;oBAChB,CAAC,CAAC,CAAC;oBAEH,IAAI,YAAY,CAAC,MAAM,KAAK,UAAU,CAAC,MAAM,EAAE,CAAC;wBAC5C,IAAA,wCAA2B,EAAC,QAAQ,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;oBACjE,CAAC;gBACL,CAAC;YACL,CAAC;QACL,CAAC;IACL,CAAC;CACJ;AA5DD,4BA4DC"}
@@ -0,0 +1,19 @@
1
+ import type { Definition } from 'typescript-json-schema';
2
+ import type { DecoratorContext } from '../interfaces';
3
+ /**
4
+ * Resolves the current enum values from a property, following $ref if needed.
5
+ *
6
+ * @param property - The schema property definition
7
+ * @param context - Runtime context for schema access
8
+ * @returns The enum values array, or undefined if no enum is found
9
+ */
10
+ export declare function resolveEnumFromProperty(property: Definition, context: DecoratorContext): string[] | undefined;
11
+ /**
12
+ * Applies filtered enum values to a property, inlining $ref types if needed.
13
+ *
14
+ * @param property - The schema property definition to modify
15
+ * @param filteredEnum - The filtered list of allowed enum values
16
+ * @param context - Runtime context for schema access
17
+ */
18
+ export declare function applyFilteredEnumToProperty(property: Definition, filteredEnum: string[], context: DecoratorContext): void;
19
+ //# sourceMappingURL=enum-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enum-utils.d.ts","sourceRoot":"","sources":["../../../../../../../src/sync/common/decoration/steps/enum-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,gBAAgB,GAAG,MAAM,EAAE,GAAG,SAAS,CAe7G;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACvC,QAAQ,EAAE,UAAU,EACpB,YAAY,EAAE,MAAM,EAAE,EACtB,OAAO,EAAE,gBAAgB,GAC1B,IAAI,CAeN"}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveEnumFromProperty = resolveEnumFromProperty;
4
+ exports.applyFilteredEnumToProperty = applyFilteredEnumToProperty;
5
+ /**
6
+ * Resolves the current enum values from a property, following $ref if needed.
7
+ *
8
+ * @param property - The schema property definition
9
+ * @param context - Runtime context for schema access
10
+ * @returns The enum values array, or undefined if no enum is found
11
+ */
12
+ function resolveEnumFromProperty(property, context) {
13
+ if (property?.enum && Array.isArray(property.enum)) {
14
+ return property.enum;
15
+ }
16
+ if (property?.$ref) {
17
+ const refName = property.$ref.replace('#/definitions/', '');
18
+ const schema = context.schema?.get();
19
+ const refDef = schema?.definitions?.[refName];
20
+ if (refDef?.enum && Array.isArray(refDef.enum)) {
21
+ return refDef.enum;
22
+ }
23
+ }
24
+ return undefined;
25
+ }
26
+ /**
27
+ * Applies filtered enum values to a property, inlining $ref types if needed.
28
+ *
29
+ * @param property - The schema property definition to modify
30
+ * @param filteredEnum - The filtered list of allowed enum values
31
+ * @param context - Runtime context for schema access
32
+ */
33
+ function applyFilteredEnumToProperty(property, filteredEnum, context) {
34
+ if (property.$ref) {
35
+ const refName = property.$ref.replace('#/definitions/', '');
36
+ const schema = context.schema?.get();
37
+ const refDef = schema?.definitions?.[refName];
38
+ if (refDef?.type) {
39
+ property.type = refDef.type;
40
+ }
41
+ delete property.$ref;
42
+ property.enum = filteredEnum;
43
+ }
44
+ else {
45
+ property.enum = filteredEnum;
46
+ }
47
+ }
48
+ //# sourceMappingURL=enum-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enum-utils.js","sourceRoot":"","sources":["../../../../../../../src/sync/common/dec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,IAAI,CAAC;QACrB,QAAQ,CAAC,IAAI,GAAG,YAAY,CAAC;IACjC,CAAC;SAAM,CAAC;QACJ,QAAQ,CAAC,IAAI,GAAG,YAAY,CAAC;IACjC,CAAC;AACL,CAAC"}
@@ -0,0 +1,6 @@
1
+ export { Validity } from './Validity';
2
+ export { Enums } from './Enums';
3
+ export { Message } from './Message';
4
+ export { Hide } from './Hide';
5
+ export { Readonly } from './Readonly';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/sync/common/decoration/steps/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Readonly = exports.Hide = exports.Message = exports.Enums = exports.Validity = void 0;
4
+ var Validity_1 = require("./Validity");
5
+ Object.defineProperty(exports, "Validity", { enumerable: true, get: function () { return Validity_1.Validity; } });
6
+ var Enums_1 = require("./Enums");
7
+ Object.defineProperty(exports, "Enums", { enumerable: true, get: function () { return Enums_1.Enums; } });
8
+ var Message_1 = require("./Message");
9
+ Object.defineProperty(exports, "Message", { enumerable: true, get: function () { return Message_1.Message; } });
10
+ var Hide_1 = require("./Hide");
11
+ Object.defineProperty(exports, "Hide", { enumerable: true, get: function () { return Hide_1.Hide; } });
12
+ var Readonly_1 = require("./Readonly");
13
+ Object.defineProperty(exports, "Readonly", { enumerable: true, get: function () { return Readonly_1.Readonly; } });
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/sync/common/decoration/steps/index.ts"],"names":[],"mappings":";;;AAAA,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,iCAAgC;AAAvB,8FAAA,KAAK,OAAA;AACd,qCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,+BAA8B;AAArB,4FAAA,IAAI,OAAA;AACb,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA"}
@@ -47,6 +47,8 @@
47
47
  "NODATEFIELD": "Date setting will not be used since filter bar does not contain any date fields.",
48
48
  "WARNING_DEFAULT_ROW_COUNT_MODE": "The rowCountMode is automatically set to `Auto`, if the sectionLayout is set to `Tabs` and the table is the only control within the section.",
49
49
  "ILLEGALTABLETYPE": "'{{- property}}' is not a valid table type.",
50
+ "PROPERTYOBSOLETE": "The '{{- property}}' property is obsolete.",
51
+ "NOCHARTPROPERTY": "The '{{- property}}' table property is not applicable to charts.",
50
52
  "PROPERTY_NOT_ALLOWED_FOR_TABLE_TYPE": "The '{{- propertyName}}' property was specified in the `manifest.json` file, but this property is not allowed for the '{{- tableType}}' table type.",
51
53
  "ENTITY_SET_NOT_ALLOWED_FOR_TABLE_TYPE": "The '{{- entityName}}' entity set was specified in the `manifest.json` file but this entity set is not allowed for the '{{- tableType}}' table type.",
52
54
  "ENTITY_NOT_ALLOWED_FOR_NON_TREE_TABLE_TYPE": "The '{{- entityName}}' entity was specified in the `manifest.json` file but this entity is not allowed for the non-Tree table type.",
@@ -56,5 +58,25 @@
56
58
  "SHOWITEMNAVIGATIONONCHARTONLYCHART": "The showItemNavigationOnChart property is only evaluated for chart views.",
57
59
  "QUICKVARIANTSELECTIONNOSELECTIONVARIANTANNOTATIONS": "At least one SelectionVariant or SelectionPresentationVariant annotation must be defined to enable quickVariantSelection.",
58
60
  "QUICKVARIANTSELECTIONNOVARIANTS": "The quickVariantSelection property specifies the showCounts property but contains no variants.",
61
+ "MULTITABLEONLYRESPONSIVE": "As it is not allowed to use both responsive and non-responsive tables in a multi-view setting, type should be 'Responsive Table' here.",
62
+ "MULTITABLENORESPONSIVE": "As it is not allowed to use both responsive and non-responsive tables in a multi-view setting, type should be a value different from 'Responsive Table' here.",
63
+ "CONDENSEDTABLELAYOUTNOEFFECT": "The condensedTableLayout property does not have any effect on responsive tables.",
64
+ "ENABLETABLEFILTERINPAGEVARIANTWORKLIST": "The enableTableFilterInPageVariant property does not have any effect in worklist applications.",
65
+ "ENABLETABLEFILTERINPAGEVARIANTNOEFFECT": "The enableTableFilterInPageVariant property does not have any effect if smart variant management is switched off.",
66
+ "INLINEDELETEONLYRESPONSIVE": "The inlineDelete property is only supported for responsive tables.",
67
+ "NOINLINEDELETEANDMULTISELECT": "The inlineDelete and multiSelect properties must not be switched on simultaneously.",
68
+ "SELECTALLNOMULTISELECT": "The selectAll property can only be used when multiSelect is switched on.",
69
+ "SELECTALLDEFAULTINFOUITABLE": "By default the 'Clear All' button will be shown.",
70
+ "SELECTALLDEFAULTINFORESPONSIVETABLE": "The default behavior depends on the UI5 version: Prior to 1.97 and since 1.119 it is the 'Select All' checkbox, otherwise the 'Clear All' button.",
71
+ "SELECTIONLIMITPREREQUISIT": "The selectionLimit property is only supported for ui tables which have enabled multiSelect.",
72
+ "SELECTIONLIMITNOSELECTALL": "The selectionLimit property is only supported if selectAll is disabled.",
73
+ "NODATALOADSETTINGSINWORKLIST": "Defining data load settings is meaningless in worklist applications.",
74
+ "LOADDATAONAPPLAUNCHMULTITABLE": "In multi-table scenarios, you can also use the 'enableAutoBinding' property for the specific views to influence the loading behavior.",
75
+ "NOCREATEWITHFILTERSINWORKLIST": "Defining a strategy for createWithFilters is meaningless in worklist applications.",
76
+ "CREATEWITHDIALOGDRAFT": "Object creation via dialog is only supported for non-draft entity sets.",
77
+ "MULTIEDITNOWORKLIST": "The multiEdit property does not have any effect in worklist applications.",
78
+ "MULTIEDITNOCHART": "The multiEdit property is not supported for chart views.",
79
+ "MULTIEDITTABLETYPE": "The multiEdit property is only supported for responsive and grid tables.",
80
+ "PROPERTYONLYMULTIEDIT": "The '{{- property}}' property is not sensible when multi edit is not enabled.",
59
81
  "UNRESOLVABLE_VALUE_OF_SELECTION_FIELD": "Unresolvable value for selection field"
60
82
  }
@@ -1,5 +1,6 @@
1
1
  import { v2, ViewTemplateType } from '@sap/ux-specification-types';
2
- import type { ExportResults, FileData, ExtensionLogger } from '@sap/ux-specification-types';
2
+ import type { FileData } from '@sap/ux-specification-types';
3
+ import type { TransferParameterTypeV2 } from '../../types';
3
4
  export declare const FRAGMENT_DEFINITION = "core:FragmentDefinition";
4
5
  export declare const SAP_UI_TABLE = "sap.ui.table";
5
6
  /**
@@ -22,14 +23,12 @@ export declare function deleteColumnFromFragment(manifestSection: object, patter
22
23
  /**
23
24
  * The function transfers ALL properties of one or more custom columns to a given fragment, or creates a new one if necesary.
24
25
  *
25
- * @param {ExportResults} exportResults - export result comprising fragments and manifest
26
+ * @param transferParamsV2 - list of input parameters for the recursive function call
26
27
  * @param manifestPath - path to the current section of the manifest that describes the extension
27
28
  * @param config - current config part, describing the new image of the extension
28
- * @param appId - application ID
29
29
  * @param viewTemplateType - name of the view template that shall be applied
30
- * @param {ExtensionLogger} logger - logger instance for exceptions
31
30
  */
32
- export declare function exportCustomColumnsToFragment(exportResults: ExportResults, manifestPath: string, config: v2.TableCustomColumns, appId: string, viewTemplateType: ViewTemplateType, logger?: ExtensionLogger): void;
31
+ export declare function exportCustomColumnsToFragment(transferParamsV2: TransferParameterTypeV2, manifestPath: string, config: v2.TableCustomColumns, viewTemplateType: ViewTemplateType): void;
33
32
  /**
34
33
  * Determines the manifest path of a column extension.
35
34
  *
@@ -1 +1 @@
1
- {"version":3,"file":"Fragment.d.ts","sourceRoot":"","sources":["../../../../../../../src/sync/v2/export/controls/Fragment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAoB,gBAAgB,EAAgC,MAAM,6BAA6B,CAAC;AACnH,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ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qG3C;;;;;;GAMG;AACH,wBAAgB,mCAAmC,CAC/C,UAAU,EAAE,OAAO,EACnB,QAAQ,UAAa,GACtB,MAAM,GAAG,OAAO,GAAG,SAAS,CAG9B;AAiKD;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACpC,eAAe,EAAE,MAAM,EACvB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,QAAQ,EAAE,GACtB,IAAI,CAcN;AAmVD;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CACzC,gBAAgB,EAAE,uBAAuB,EACzC,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,EAAE,CAAC,kBAAkB,EAC7B,gBAAgB,EAAE,gBAAgB,GACnC,IAAI,CA0DN;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,GAC5B,MAAM,EAAE,CAAC,cAAc,EACvB,WAAW,MAAM,EACjB,gBAAgB,MAAM,EACtB,2BAA2B,MAAM,KAClC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,gBAAgB,EAAE,gBAAgB,CAAA;CAuBpD,CAAC"}
@@ -331,9 +331,10 @@ function updateNonEmptyCellsFragment(fragment, config) {
331
331
  * @param fragments - list of existing fragments, to be enhanced
332
332
  * @param cellFragmentFileName - file name of the given cell fragment, as calculated from the config entry
333
333
  * @param config - current config JSON
334
+ * @param generateId - function to generate ids for new entries in the fragment
334
335
  * @returns a boolean value to indicate if the cell fragment could be found n the given list of fragments
335
336
  */
336
- function updateCellsFragment(fragments, cellFragmentFileName, config) {
337
+ function updateCellsFragment(fragments, cellFragmentFileName, config, generateId) {
337
338
  let cellsFragmentFound = false;
338
339
  for (const fragment of fragments) {
339
340
  const fragmentPathArray = fragment['dataSourceUri'].split(path_1.sep);
@@ -342,7 +343,7 @@ function updateCellsFragment(fragments, cellFragmentFileName, config) {
342
343
  fragment.changeIndicator = ux_specification_types_1.ChangeIndicator.Updated;
343
344
  if (!fragment.fileContent || Object.keys(fragment.fileContent).length === 0) {
344
345
  // Empty fragment - use template
345
- fragment.fileContent = (0, view_controller_generator_1.getResponsiveTableCellsFragment)(config);
346
+ fragment.fileContent = (0, view_controller_generator_1.getResponsiveTableCellsFragment)(config, generateId);
346
347
  }
347
348
  else {
348
349
  updateNonEmptyCellsFragment(fragment, config);
@@ -412,10 +413,11 @@ function exportCustomColumnsToManifest(manifestPath, exportResults, config, appI
412
413
  * @param columnsInFragmentDefinition - Existing columns definition
413
414
  * @param fragment - fragment definition
414
415
  * @param colPos - column position from config
416
+ * @param generateId - function to generate ids for new entries in the fragment
415
417
  * @returns - Columns object.
416
418
  */
417
- function insertNewColumnInFragment(column, viewTemplateType, columnsInFragmentDefinition, fragment, colPos) {
418
- const newColumnFragment = (0, view_controller_generator_1.getSingleColumnContent)(column, viewTemplateType);
419
+ function insertNewColumnInFragment(column, viewTemplateType, columnsInFragmentDefinition, fragment, colPos, generateId) {
420
+ const newColumnFragment = (0, view_controller_generator_1.getSingleColumnContent)(column, viewTemplateType, generateId);
419
421
  if (newColumnFragment) {
420
422
  const newColumnDefinition = JSON.parse((0, xml_js_1.xml2json)(newColumnFragment, { compact: true }));
421
423
  const newColumn = getRootCustomColumnFromFragmentJSON(newColumnDefinition, fragment);
@@ -494,13 +496,14 @@ function maintainExistingColumnInFragment(columnsInFragmentDefinition, configCol
494
496
  * @param {object} columnsInFragmentDefinition - Existing columns definition
495
497
  * @param {ViewTemplateType} viewTemplateType - template type
496
498
  * @param {unknown} fragment - fragment definition
499
+ * @param {IdGeneratorFunction} generateId - function to generate ids for new entries in the fragment
497
500
  * @returns {object} Columns object.
498
501
  */
499
- function insertNewColumnsInFragment(configColumns, fragmentId, columnsInFragmentDefinition, viewTemplateType, fragment) {
502
+ function insertNewColumnsInFragment(configColumns, fragmentId, columnsInFragmentDefinition, viewTemplateType, fragment, generateId) {
500
503
  for (const column of configColumns) {
501
504
  if (column.fragmentName.endsWith(fragmentId)) {
502
505
  const colPos = configColumns.indexOf(column);
503
- columnsInFragmentDefinition = insertNewColumnInFragment(column, viewTemplateType, columnsInFragmentDefinition, fragment, colPos);
506
+ columnsInFragmentDefinition = insertNewColumnInFragment(column, viewTemplateType, columnsInFragmentDefinition, fragment, colPos, generateId);
504
507
  }
505
508
  }
506
509
  return columnsInFragmentDefinition;
@@ -508,15 +511,18 @@ function insertNewColumnsInFragment(configColumns, fragmentId, columnsInFragment
508
511
  /**
509
512
  * Actualizes the column information in a fragment.
510
513
  *
511
- * @param fragments - list of all fragments
512
- * @param fragmentName - name of the relevant fragment, as maintained in manifest
513
- * @param fragmentId - ID = substring of the fragment name without the app ID
514
+ * @param fragmentInfo - all necessary information to identify the relevant fragment and column definition.
515
+ * @param fragmentInfo.fragments - list of all fragments
516
+ * @param fragmentInfo.fragmentName - file name of the given fragment, as calculated from the config entry
517
+ * @param fragmentInfo.fragmentId - fragment ID, as calculated from the config entry
518
+ * @param generateId - function to generate ids for new entries in the fragment
514
519
  * @param configColumns - list of all custom columns in the config
515
520
  * @param viewTemplateType - enum value that determines the view template
516
521
  * @returns a boolean value indicating if the fragment was found
517
522
  */
518
- function updateColumnsInFragment(fragments, fragmentName, fragmentId, configColumns, viewTemplateType) {
523
+ function updateColumnsInFragment(fragmentInfo, generateId, configColumns, viewTemplateType) {
519
524
  let fragmentFound = false;
525
+ const { fragments, fragmentName, fragmentId } = fragmentInfo;
520
526
  if (!fragments) {
521
527
  return fragmentFound;
522
528
  }
@@ -528,7 +534,7 @@ function updateColumnsInFragment(fragments, fragmentName, fragmentId, configColu
528
534
  fragment.changeIndicator = ux_specification_types_1.ChangeIndicator.Updated;
529
535
  if (!fragment.fileContent || fragment.fileContent.length === 0) {
530
536
  // Empty fragment - use template
531
- fragment.fileContent = (0, view_controller_generator_1.getColumnFragmentContent)(configColumns, viewTemplateType);
537
+ fragment.fileContent = (0, view_controller_generator_1.getColumnFragmentContent)(configColumns, viewTemplateType, generateId);
532
538
  }
533
539
  else {
534
540
  const fragmentJson = JSON.parse((0, xml_js_1.xml2json)(fragment.fileContent, { compact: true }));
@@ -537,7 +543,7 @@ function updateColumnsInFragment(fragments, fragmentName, fragmentId, configColu
537
543
  columnsInFragmentDefinition = getRootCustomColumnFromFragmentJSON(fragmentJson[exports.FRAGMENT_DEFINITION]);
538
544
  columnsInFragmentDefinition = maintainExistingColumnInFragment(columnsInFragmentDefinition, configColumns, fragmentJson);
539
545
  //Insert scenario for the remaining entries
540
- columnsInFragmentDefinition = insertNewColumnsInFragment(configColumns, fragmentId, columnsInFragmentDefinition, viewTemplateType, fragmentJson);
546
+ columnsInFragmentDefinition = insertNewColumnsInFragment(configColumns, fragmentId, columnsInFragmentDefinition, viewTemplateType, fragmentJson, generateId);
541
547
  const tagName = getTagNameFromFragmentJSON(fragmentJson, viewTemplateType);
542
548
  fragmentJson[exports.FRAGMENT_DEFINITION][tagName] = columnsInFragmentDefinition;
543
549
  const fragmentContent = JSON.stringify(fragmentJson);
@@ -553,14 +559,13 @@ function updateColumnsInFragment(fragments, fragmentName, fragmentId, configColu
553
559
  /**
554
560
  * The function transfers ALL properties of one or more custom columns to a given fragment, or creates a new one if necesary.
555
561
  *
556
- * @param {ExportResults} exportResults - export result comprising fragments and manifest
562
+ * @param transferParamsV2 - list of input parameters for the recursive function call
557
563
  * @param manifestPath - path to the current section of the manifest that describes the extension
558
564
  * @param config - current config part, describing the new image of the extension
559
- * @param appId - application ID
560
565
  * @param viewTemplateType - name of the view template that shall be applied
561
- * @param {ExtensionLogger} logger - logger instance for exceptions
562
566
  */
563
- function exportCustomColumnsToFragment(exportResults, manifestPath, config, appId, viewTemplateType, logger) {
567
+ function exportCustomColumnsToFragment(transferParamsV2, manifestPath, config, viewTemplateType) {
568
+ const { exportResults, appId, logger, idGeneratorFunction } = transferParamsV2;
564
569
  const fragments = exportResults.fragments;
565
570
  //Find and adapt manifest
566
571
  const { manifestSection, lsFilePath, cellsFragmentName, fragmentType } = exportCustomColumnsToManifest(manifestPath, exportResults, config, appId, logger);
@@ -575,18 +580,22 @@ function exportCustomColumnsToFragment(exportResults, manifestPath, config, appI
575
580
  const cellTemplateType = cellFragmentParts ? cellFragmentParts[cellFragmentParts.length - 1] : null;
576
581
  const cellFragmentFileName = cellTemplateType ? cellTemplateType + ux_specification_types_1.FRAGMENTNAMEPART + fragmentType : null;
577
582
  // update columns in fragment
578
- const fragmentFound = updateColumnsInFragment(fragments, fragmentName, fragmentId, configColumns, viewTemplateType);
583
+ const fragmentFound = updateColumnsInFragment({
584
+ fragments,
585
+ fragmentName,
586
+ fragmentId
587
+ }, idGeneratorFunction, configColumns, viewTemplateType);
579
588
  let cellsFragmentFound = false;
580
589
  if (cellsFragmentName) {
581
590
  //find an update the cells' fragment file
582
- cellsFragmentFound = updateCellsFragment(fragments, cellFragmentFileName, config);
591
+ cellsFragmentFound = updateCellsFragment(fragments, cellFragmentFileName, config, idGeneratorFunction);
583
592
  }
584
593
  else {
585
594
  cellsFragmentFound = true; //not relevant
586
595
  }
587
596
  if (!fragmentFound) {
588
597
  const fragment = {
589
- fileContent: (0, view_controller_generator_1.getColumnFragmentContent)(configColumns, viewTemplateType),
598
+ fileContent: (0, view_controller_generator_1.getColumnFragmentContent)(configColumns, viewTemplateType, idGeneratorFunction),
590
599
  dataSourceUri: lsFilePath,
591
600
  changeIndicator: ux_specification_types_1.ChangeIndicator.Deleted
592
601
  };
@@ -594,7 +603,7 @@ function exportCustomColumnsToFragment(exportResults, manifestPath, config, appI
594
603
  }
595
604
  if (!cellsFragmentFound) {
596
605
  const fragment = {
597
- fileContent: (0, view_controller_generator_1.getResponsiveTableCellsFragment)(config),
606
+ fileContent: (0, view_controller_generator_1.getResponsiveTableCellsFragment)(config, idGeneratorFunction),
598
607
  dataSourceUri: lsFilePath.replace(fragmentName, cellFragmentFileName),
599
608
  changeIndicator: ux_specification_types_1.ChangeIndicator.Deleted
600
609
  };