@sap/ux-specification 1.142.2 → 1.142.3

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 (220) hide show
  1. package/CHANGELOG.md +86 -43
  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 +265 -261
  14. package/dist/index-min.js.map +4 -4
  15. package/dist/schemas/v2/AnalyticalListPageConfig.json +3 -3
  16. package/dist/schemas/v2/ListReportConfig.json +5 -5
  17. package/dist/schemas/v2/ListReportNewConfig.json +1 -1
  18. package/dist/schemas/v2/ObjectPageConfig.json +5 -5
  19. package/dist/schemas/v4/ApplicationV4.json +1 -1
  20. package/dist/schemas/v4/BuildingBlocksConfig.json +13 -1
  21. package/dist/schemas/v4/ListReportConfig.json +24 -6
  22. package/dist/schemas/v4/ObjectPageConfig.json +32 -8
  23. package/dist/specification/package.json +13 -11
  24. package/dist/specification/scripts/extractDocu.js +18 -1
  25. package/dist/specification/scripts/extractDocu.js.map +1 -1
  26. package/dist/specification/scripts/generate-validity-report.d.ts +15 -0
  27. package/dist/specification/scripts/generate-validity-report.d.ts.map +1 -0
  28. package/dist/specification/scripts/generate-validity-report.js +367 -0
  29. package/dist/specification/scripts/generate-validity-report.js.map +1 -0
  30. package/dist/specification/scripts/macros/corrections.d.ts.map +1 -1
  31. package/dist/specification/scripts/macros/corrections.js +3 -0
  32. package/dist/specification/scripts/macros/corrections.js.map +1 -1
  33. package/dist/specification/src/api.js +1 -1
  34. package/dist/specification/src/sync/common/decoration/decorator-paths.d.ts +503 -0
  35. package/dist/specification/src/sync/common/decoration/decorator-paths.d.ts.map +1 -0
  36. package/dist/specification/src/sync/common/decoration/decorator-paths.js +497 -0
  37. package/dist/specification/src/sync/common/decoration/decorator-paths.js.map +1 -0
  38. package/dist/specification/src/sync/common/decoration/decorators.d.ts +149 -23
  39. package/dist/specification/src/sync/common/decoration/decorators.d.ts.map +1 -1
  40. package/dist/specification/src/sync/common/decoration/decorators.js +369 -74
  41. package/dist/specification/src/sync/common/decoration/decorators.js.map +1 -1
  42. package/dist/specification/src/sync/common/decoration/index.d.ts +1 -0
  43. package/dist/specification/src/sync/common/decoration/index.d.ts.map +1 -1
  44. package/dist/specification/src/sync/common/decoration/index.js +1 -0
  45. package/dist/specification/src/sync/common/decoration/index.js.map +1 -1
  46. package/dist/specification/src/sync/common/dist_tag.json +8 -3
  47. package/dist/specification/src/sync/common/generate/objectPage.d.ts.map +1 -1
  48. package/dist/specification/src/sync/common/generate/objectPage.js +3 -1
  49. package/dist/specification/src/sync/common/generate/objectPage.js.map +1 -1
  50. package/dist/specification/src/sync/common/i18n.json +2 -1
  51. package/dist/specification/src/sync/common/utils.d.ts +22 -6
  52. package/dist/specification/src/sync/common/utils.d.ts.map +1 -1
  53. package/dist/specification/src/sync/common/utils.js +122 -18
  54. package/dist/specification/src/sync/common/utils.js.map +1 -1
  55. package/dist/specification/src/sync/v2/generate/analyticalListReport.d.ts.map +1 -1
  56. package/dist/specification/src/sync/v2/generate/analyticalListReport.js +2 -0
  57. package/dist/specification/src/sync/v2/generate/analyticalListReport.js.map +1 -1
  58. package/dist/specification/src/sync/v2/generate/listReport.d.ts.map +1 -1
  59. package/dist/specification/src/sync/v2/generate/listReport.js +3 -1
  60. package/dist/specification/src/sync/v2/generate/listReport.js.map +1 -1
  61. package/dist/specification/src/sync/v2/generate/objectPage.d.ts.map +1 -1
  62. package/dist/specification/src/sync/v2/generate/objectPage.js +2 -0
  63. package/dist/specification/src/sync/v2/generate/objectPage.js.map +1 -1
  64. package/dist/specification/src/sync/v2/generate/overviewPage.d.ts +1 -9
  65. package/dist/specification/src/sync/v2/generate/overviewPage.d.ts.map +1 -1
  66. package/dist/specification/src/sync/v2/generate/overviewPage.js +30 -1
  67. package/dist/specification/src/sync/v2/generate/overviewPage.js.map +1 -1
  68. package/dist/specification/src/sync/v2/import/app/appProvider.d.ts.map +1 -1
  69. package/dist/specification/src/sync/v2/import/app/appProvider.js +2 -0
  70. package/dist/specification/src/sync/v2/import/app/appProvider.js.map +1 -1
  71. package/dist/specification/src/sync/v2/import/pages/analyticalListPage.d.ts +2 -1
  72. package/dist/specification/src/sync/v2/import/pages/analyticalListPage.d.ts.map +1 -1
  73. package/dist/specification/src/sync/v2/import/pages/analyticalListPage.js +5 -0
  74. package/dist/specification/src/sync/v2/import/pages/analyticalListPage.js.map +1 -1
  75. package/dist/specification/src/sync/v2/import/pages/listReport.d.ts +2 -1
  76. package/dist/specification/src/sync/v2/import/pages/listReport.d.ts.map +1 -1
  77. package/dist/specification/src/sync/v2/import/pages/listReport.js +5 -0
  78. package/dist/specification/src/sync/v2/import/pages/listReport.js.map +1 -1
  79. package/dist/specification/src/sync/v2/import/pages/objectPage.d.ts.map +1 -1
  80. package/dist/specification/src/sync/v2/import/pages/objectPage.js +2 -1
  81. package/dist/specification/src/sync/v2/import/pages/objectPage.js.map +1 -1
  82. package/dist/specification/src/sync/v2/import/utils.d.ts +28 -1
  83. package/dist/specification/src/sync/v2/import/utils.d.ts.map +1 -1
  84. package/dist/specification/src/sync/v2/import/utils.js +37 -0
  85. package/dist/specification/src/sync/v2/import/utils.js.map +1 -1
  86. package/dist/specification/src/sync/v2/utils.d.ts +12 -2
  87. package/dist/specification/src/sync/v2/utils.d.ts.map +1 -1
  88. package/dist/specification/src/sync/v2/utils.js +19 -2
  89. package/dist/specification/src/sync/v2/utils.js.map +1 -1
  90. package/dist/specification/src/sync/v4/application.d.ts +20 -2
  91. package/dist/specification/src/sync/v4/application.d.ts.map +1 -1
  92. package/dist/specification/src/sync/v4/application.js +27 -2
  93. package/dist/specification/src/sync/v4/application.js.map +1 -1
  94. package/dist/specification/src/sync/v4/export/controls/FilterBar.d.ts +2 -1
  95. package/dist/specification/src/sync/v4/export/controls/FilterBar.d.ts.map +1 -1
  96. package/dist/specification/src/sync/v4/export/controls/FilterBar.js +2 -1
  97. package/dist/specification/src/sync/v4/export/controls/FilterBar.js.map +1 -1
  98. package/dist/specification/src/sync/v4/export/controls/Header.d.ts +4 -3
  99. package/dist/specification/src/sync/v4/export/controls/Header.d.ts.map +1 -1
  100. package/dist/specification/src/sync/v4/export/controls/Header.js +7 -3
  101. package/dist/specification/src/sync/v4/export/controls/Header.js.map +1 -1
  102. package/dist/specification/src/sync/v4/export/controls/HeaderAction.d.ts +2 -1
  103. package/dist/specification/src/sync/v4/export/controls/HeaderAction.d.ts.map +1 -1
  104. package/dist/specification/src/sync/v4/export/controls/HeaderAction.js +7 -0
  105. package/dist/specification/src/sync/v4/export/controls/HeaderAction.js.map +1 -1
  106. package/dist/specification/src/sync/v4/export/controls/ObjectPageCustomSection.d.ts +2 -1
  107. package/dist/specification/src/sync/v4/export/controls/ObjectPageCustomSection.d.ts.map +1 -1
  108. package/dist/specification/src/sync/v4/export/controls/ObjectPageCustomSection.js +2 -1
  109. package/dist/specification/src/sync/v4/export/controls/ObjectPageCustomSection.js.map +1 -1
  110. package/dist/specification/src/sync/v4/export/controls/ObjectPageTable.d.ts +1 -1
  111. package/dist/specification/src/sync/v4/export/controls/ObjectPageTable.d.ts.map +1 -1
  112. package/dist/specification/src/sync/v4/export/controls/ObjectPageTable.js +0 -13
  113. package/dist/specification/src/sync/v4/export/controls/ObjectPageTable.js.map +1 -1
  114. package/dist/specification/src/sync/v4/export/controls/Table.d.ts +24 -15
  115. package/dist/specification/src/sync/v4/export/controls/Table.d.ts.map +1 -1
  116. package/dist/specification/src/sync/v4/export/controls/Table.js +40 -46
  117. package/dist/specification/src/sync/v4/export/controls/Table.js.map +1 -1
  118. package/dist/specification/src/sync/v4/export/controls/TableColumn.d.ts.map +1 -1
  119. package/dist/specification/src/sync/v4/export/controls/TableColumn.js +2 -2
  120. package/dist/specification/src/sync/v4/export/controls/TableColumn.js.map +1 -1
  121. package/dist/specification/src/sync/v4/export/controls/ToolBarAction.d.ts +2 -1
  122. package/dist/specification/src/sync/v4/export/controls/ToolBarAction.d.ts.map +1 -1
  123. package/dist/specification/src/sync/v4/export/controls/ToolBarAction.js +2 -1
  124. package/dist/specification/src/sync/v4/export/controls/ToolBarAction.js.map +1 -1
  125. package/dist/specification/src/sync/v4/export/export.d.ts.map +1 -1
  126. package/dist/specification/src/sync/v4/export/export.js +25 -3
  127. package/dist/specification/src/sync/v4/export/export.js.map +1 -1
  128. package/dist/specification/src/sync/v4/export/pages/ListReport.js +1 -1
  129. package/dist/specification/src/sync/v4/export/pages/ListReport.js.map +1 -1
  130. package/dist/specification/src/sync/v4/generate/actions.d.ts +1 -1
  131. package/dist/specification/src/sync/v4/generate/actions.d.ts.map +1 -1
  132. package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.js +1 -1
  133. package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.js.map +1 -1
  134. package/dist/specification/src/sync/v4/generate/fpm-custom-page/utils.d.ts.map +1 -1
  135. package/dist/specification/src/sync/v4/generate/fpm-custom-page/utils.js +10 -1
  136. package/dist/specification/src/sync/v4/generate/fpm-custom-page/utils.js.map +1 -1
  137. package/dist/specification/src/sync/v4/generate/index.d.ts +1 -1
  138. package/dist/specification/src/sync/v4/generate/index.d.ts.map +1 -1
  139. package/dist/specification/src/sync/v4/generate/index.js +1 -1
  140. package/dist/specification/src/sync/v4/generate/index.js.map +1 -1
  141. package/dist/specification/src/sync/v4/generate/list-report/ListReportUtils.d.ts +73 -0
  142. package/dist/specification/src/sync/v4/generate/list-report/ListReportUtils.d.ts.map +1 -0
  143. package/dist/specification/src/sync/v4/generate/list-report/ListReportUtils.js +354 -0
  144. package/dist/specification/src/sync/v4/generate/list-report/ListReportUtils.js.map +1 -0
  145. package/dist/specification/src/sync/v4/generate/{listReport.d.ts → list-report/listReport.d.ts} +22 -15
  146. package/dist/specification/src/sync/v4/generate/list-report/listReport.d.ts.map +1 -0
  147. package/dist/specification/src/sync/v4/generate/{listReport.js → list-report/listReport.js} +115 -69
  148. package/dist/specification/src/sync/v4/generate/list-report/listReport.js.map +1 -0
  149. package/dist/specification/src/sync/v4/generate/objectPage.d.ts.map +1 -1
  150. package/dist/specification/src/sync/v4/generate/objectPage.js +142 -44
  151. package/dist/specification/src/sync/v4/generate/objectPage.js.map +1 -1
  152. package/dist/specification/src/sync/v4/import/pages/listReport.d.ts.map +1 -1
  153. package/dist/specification/src/sync/v4/import/pages/listReport.js +2 -1
  154. package/dist/specification/src/sync/v4/import/pages/listReport.js.map +1 -1
  155. package/dist/specification/src/sync/v4/import/utils.js +5 -3
  156. package/dist/specification/src/sync/v4/import/utils.js.map +1 -1
  157. package/dist/specification/src/sync/v4/sync-rules/App.d.ts +9 -7
  158. package/dist/specification/src/sync/v4/sync-rules/App.d.ts.map +1 -1
  159. package/dist/specification/src/sync/v4/sync-rules/App.js +4 -8
  160. package/dist/specification/src/sync/v4/sync-rules/App.js.map +1 -1
  161. package/dist/specification/src/sync/v4/sync-rules/AppSchema.d.ts +2 -9
  162. package/dist/specification/src/sync/v4/sync-rules/AppSchema.d.ts.map +1 -1
  163. package/dist/specification/src/sync/v4/sync-rules/AppSchema.js +2 -11
  164. package/dist/specification/src/sync/v4/sync-rules/AppSchema.js.map +1 -1
  165. package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.d.ts +177 -46
  166. package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.d.ts.map +1 -1
  167. package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.js +498 -152
  168. package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.js.map +1 -1
  169. package/dist/specification/src/sync/v4/sync-rules/Page.d.ts +17 -22
  170. package/dist/specification/src/sync/v4/sync-rules/Page.d.ts.map +1 -1
  171. package/dist/specification/src/sync/v4/sync-rules/Page.js +15 -22
  172. package/dist/specification/src/sync/v4/sync-rules/Page.js.map +1 -1
  173. package/dist/specification/src/sync/v4/sync-rules/controllerExtensions.d.ts +1 -0
  174. package/dist/specification/src/sync/v4/sync-rules/controllerExtensions.d.ts.map +1 -1
  175. package/dist/specification/src/sync/v4/sync-rules/controllerExtensions.js +17 -9
  176. package/dist/specification/src/sync/v4/sync-rules/controllerExtensions.js.map +1 -1
  177. package/dist/specification/src/sync/v4/sync-rules/index.d.ts +5 -0
  178. package/dist/specification/src/sync/v4/sync-rules/index.d.ts.map +1 -0
  179. package/dist/specification/src/sync/v4/sync-rules/index.js +21 -0
  180. package/dist/specification/src/sync/v4/sync-rules/index.js.map +1 -0
  181. package/dist/specification/src/sync/v4/sync-rules/utils.d.ts.map +1 -1
  182. package/dist/specification/src/sync/v4/sync-rules/utils.js +4 -0
  183. package/dist/specification/src/sync/v4/sync-rules/utils.js.map +1 -1
  184. package/dist/specification/src/sync/v4/utils/index.d.ts +2 -0
  185. package/dist/specification/src/sync/v4/utils/index.d.ts.map +1 -0
  186. package/dist/specification/src/sync/v4/utils/index.js +18 -0
  187. package/dist/specification/src/sync/v4/utils/index.js.map +1 -0
  188. package/dist/specification/src/sync/v4/utils/utils.d.ts +9 -1
  189. package/dist/specification/src/sync/v4/utils/utils.d.ts.map +1 -1
  190. package/dist/specification/src/sync/v4/utils/utils.js +17 -2
  191. package/dist/specification/src/sync/v4/utils/utils.js.map +1 -1
  192. package/dist/specification/test/test-projects/v2sttaProdMan2/webapp/manifest.json +550 -0
  193. package/dist/specification/test/test-projects/v4new/webapp/manifest.json +147 -0
  194. package/dist/specification/test/test-utils/utils.d.ts +71 -0
  195. package/dist/specification/test/test-utils/utils.d.ts.map +1 -0
  196. package/dist/specification/test/test-utils/utils.js +400 -0
  197. package/dist/specification/test/test-utils/utils.js.map +1 -0
  198. package/dist/specification/test/unit/decorators/validity-test-utils.d.ts +131 -0
  199. package/dist/specification/test/unit/decorators/validity-test-utils.d.ts.map +1 -0
  200. package/dist/specification/test/unit/decorators/validity-test-utils.js +661 -0
  201. package/dist/specification/test/unit/decorators/validity-test-utils.js.map +1 -0
  202. package/dist/types/src/apiTypes.d.ts +2 -3
  203. package/dist/types/src/apiTypes.d.ts.map +1 -1
  204. package/dist/types/src/apiTypes.js.map +1 -1
  205. package/dist/types/src/common/types.d.ts +119 -13
  206. package/dist/types/src/common/types.d.ts.map +1 -1
  207. package/dist/types/src/common/types.js.map +1 -1
  208. package/dist/types/src/v2/controls/ObjectPageTable.d.ts +1 -1
  209. package/dist/types/src/v2/controls/Table.d.ts +1 -1
  210. package/dist/types/src/v4/controls/ObjectPageTable.d.ts +1 -1
  211. package/dist/types/src/v4/controls/ObjectPageTable.d.ts.map +1 -1
  212. package/dist/types/src/v4/controls/Table.d.ts +3 -3
  213. package/dist/types/src/v4/controls/Table.d.ts.map +1 -1
  214. package/package.json +14 -12
  215. package/dist/specification/src/sync/v4/generate/ListReportUtils.d.ts +0 -107
  216. package/dist/specification/src/sync/v4/generate/ListReportUtils.d.ts.map +0 -1
  217. package/dist/specification/src/sync/v4/generate/ListReportUtils.js +0 -394
  218. package/dist/specification/src/sync/v4/generate/ListReportUtils.js.map +0 -1
  219. package/dist/specification/src/sync/v4/generate/listReport.d.ts.map +0 -1
  220. package/dist/specification/src/sync/v4/generate/listReport.js.map +0 -1
@@ -1,12 +1,19 @@
1
1
  import 'reflect-metadata';
2
- import type { SyncRule, PageLayoutInformation, ValidityInformation, SyncRuleProvider, Validity, BooleanCondition, DependsOnCondition, DependsOnMessage, MultiDependsOnCondition } from '@sap/ux-specification-types';
2
+ import type { SyncRule, PageLayoutInformation, ValidityInformation, SyncRuleProvider, Validity, DependsOnCondition } from '@sap/ux-specification-types';
3
+ import { type ConditionInput, type MessageConfig } from './decorator-paths';
4
+ /**
5
+ * Metadata keys for schema post-processing.
6
+ * Used by decorators to store metadata that is processed during schema generation.
7
+ */
3
8
  export declare const metadataKeys: {
4
9
  description: symbol;
5
- hidden: symbol;
6
10
  isViewNode: symbol;
7
11
  syncRule: symbol;
8
- dependsOn: symbol;
9
12
  validity: symbol;
13
+ hide: symbol;
14
+ message: symbol;
15
+ readonly: symbol;
16
+ enums: symbol;
10
17
  };
11
18
  export declare const syncRule: (propSpec: SyncRule) => any;
12
19
  /**
@@ -54,39 +61,158 @@ export declare function isViewNode(target: Function): void;
54
61
  */
55
62
  export declare function description(text: string): (target: Function) => void;
56
63
  /**
57
- * Decorator to conditionally hide a property in the schema based on a condition function.
58
- * The condition function is evaluated during schema generation with the appropriate context.
64
+ * Internal metadata structure stored by decorators.
65
+ * Extends DependsOnCondition with optional message configuration.
66
+ */
67
+ export interface DecoratorMetadata extends DependsOnCondition {
68
+ messageConfig?: MessageConfig;
69
+ }
70
+ /**
71
+ * Decorator to conditionally hide a property based on conditions.
72
+ * The property will be hidden if the condition(s) are NOT met (inverted logic).
73
+ *
74
+ * @example
75
+ * ```typescript
76
+ * import { page, custom, when, and, or } from './decorator-paths';
77
+ *
78
+ * // Truthy check - hide if page.isALP is falsy
79
+ * @hide(page.isALP)
59
80
  *
60
- * @param condition - A function that takes context and returns boolean indicating if property should be hidden
61
- * @returns PropertyDecorator or ClassDecorator depending on usage
81
+ * // Equality check - hide if page.type !== 'GridTable'
82
+ * @hide(when(page.type, 'GridTable'))
83
+ *
84
+ * // Custom function - hide if type === 'GridTable'
85
+ * @hide(when(page.type, (type) => type !== 'GridTable'))
86
+ *
87
+ * // Always hide
88
+ * @hide(true)
89
+ *
90
+ * // AND logic - hide if not (isALP AND type === 'GridTable')
91
+ * @hide(and(page.isALP, when(page.type, 'GridTable')))
92
+ *
93
+ * // OR logic - hide if not (actionType === 'Bound' OR actionType === 'Custom')
94
+ * @hide(or(when(page.actionType, 'Bound'), when(page.actionType, 'Custom')))
95
+ * ```
96
+ * @param condition - The condition to evaluate
97
+ * @returns PropertyDecorator
62
98
  */
63
- export declare function hidden(condition?: BooleanCondition): PropertyDecorator & ClassDecorator;
99
+ export declare function hide(condition: ConditionInput): PropertyDecorator;
64
100
  /**
65
- * Helper function to create a DependsOnMessage object.
101
+ * Retrieves the hide metadata associated with a specific property of a target object.
102
+ *
103
+ * @param target - The object containing the property.
104
+ * @param propertyName - The name of the property whose hide metadata is to be retrieved.
105
+ * @returns The hide information of the property, or undefined if no metadata is found.
106
+ */
107
+ export declare function getHideMetadata(target: object, propertyName: string): DecoratorMetadata | undefined;
108
+ /**
109
+ * Decorator to conditionally display a message based on conditions.
110
+ * A message will be shown when the condition(s) are met.
111
+ * Multiple @message decorators can be applied to the same property - all matching conditions will show their messages.
112
+ *
113
+ * @param condition - The condition to evaluate
114
+ * @param messageConfig - The message configuration (use msg() helper)
115
+ * @returns PropertyDecorator
116
+ * @example
117
+ * ```typescript
118
+ * import { page, when, msg } from './decorator-paths';
119
+ *
120
+ * // Simple message
121
+ * @message(page.betaFeature, msg('BETA_WARNING'))
122
+ *
123
+ * // Message with parameters
124
+ * @message(when(page.type, 'GridTable'), msg('TABLE_WARNING', { type: 'GridTable' }))
125
+ *
126
+ * // Deletable message
127
+ * @message(page.deprecated, msg('DEPRECATED', { since: '1.96' }, { deletable: true }))
128
+ *
129
+ * // With AND/OR conditions
130
+ * @message(and(page.isALP, when(page.type, 'GridTable')), msg('ALP_GRID_INFO'))
66
131
  *
67
- * @param text - The message text (can be true for default i18n message, a string, or a function)
68
- * @param deletable - Whether the message can be deleted/dismissed in the UI
69
- * @returns A DependsOnMessage object
132
+ * // Multiple messages on same property
133
+ * @message(when(page.type, 'AnalyticalTable'), msg('ANALYTICAL_WARNING'))
134
+ * @message(when(page.mode, 'edit'), msg('EDIT_MODE_WARNING'))
135
+ * ```
70
136
  */
71
- export declare const dependsOnMessage: (text?: DependsOnMessage["text"], deletable?: boolean) => DependsOnMessage;
137
+ export declare function message(condition: ConditionInput, messageConfig: MessageConfig): PropertyDecorator;
72
138
  /**
73
- * Decorator to conditionally show/hide a property based on one or more property values.
74
- * The decorated property will be hidden if the dependency condition(s) are not met.
139
+ * Retrieves the message metadata associated with a specific property of a target object.
140
+ * Returns an array of DecoratorMetadata since multiple @message decorators can be applied.
141
+ *
142
+ * @param target - The object containing the property.
143
+ * @param propertyName - The name of the property whose message metadata is to be retrieved.
144
+ * @returns An array of message metadata, or undefined if no metadata is found.
145
+ */
146
+ export declare function getMessageMetadata(target: object, propertyName: string): DecoratorMetadata[] | undefined;
147
+ /**
148
+ * Decorator to conditionally mark a property as readonly based on conditions.
149
+ * The property will be readonly when the condition(s) are met.
150
+ *
151
+ * @example
152
+ * ```typescript
153
+ * import { page, custom, when } from './decorator-paths';
154
+ *
155
+ * // Truthy check - readonly if page.isLocked is truthy
156
+ * @readonly(page.isLocked)
157
+ *
158
+ * // Equality check - readonly if mode === 'view'
159
+ * @readonly(when(page.mode, 'view'))
160
+ *
161
+ * // Custom function - readonly if role is 'viewer'
162
+ * @readonly(when(custom.user.role, (role) => role === 'viewer'))
163
+ * ```
164
+ * @param condition - The condition to evaluate
165
+ * @returns PropertyDecorator
166
+ */
167
+ export declare function readonly(condition: ConditionInput): PropertyDecorator;
168
+ /**
169
+ * Retrieves the readonly metadata associated with a specific property of a target object.
170
+ *
171
+ * @param target - The object containing the property.
172
+ * @param propertyName - The name of the property whose readonly metadata is to be retrieved.
173
+ * @returns The readonly information of the property, or undefined if no metadata is found.
174
+ */
175
+ export declare function getReadonlyMetadata(target: object, propertyName: string): DecoratorMetadata | undefined;
176
+ /**
177
+ * Metadata structure for the @enums decorator.
178
+ * Extends DecoratorMetadata with the list of allowed enum values.
179
+ */
180
+ export interface EnumsDecoratorMetadata extends DecoratorMetadata {
181
+ /** The allowed enum values when the condition is met */
182
+ allowedValues: string[];
183
+ }
184
+ /**
185
+ * Decorator to conditionally restrict enum values based on conditions.
186
+ * When the condition is met, only the specified allowedValues will be available.
187
+ * If multiple @enums decorators exist on the same property, the first matching condition wins.
188
+ *
189
+ * @example
190
+ * ```typescript
191
+ * import { custom, when } from './decorator-paths';
192
+ *
193
+ * // Restrict to specific values when table type is TreeTable
194
+ * @enums(when(custom.table.type, 'TreeTable'), ['Inline', 'NewPage', 'CreationDialog'])
195
+ *
196
+ * // Different values for other table types
197
+ * @enums(when(custom.table.type, 'ResponsiveTable'), ['Inline', 'InlineCreationRows', 'NewPage', 'CreationDialog', 'External'])
75
198
  *
76
- * @param pathOrConditions - A string property path or an array of condition objects (all must be met)
77
- * @param conditionOrValueOrMessage - Single condition: condition/expected value/message; Multi-condition: message parameter
78
- * @param message - Optional message parameter (only for single condition with condition/value)
199
+ * // Default values when no other condition matches
200
+ * @enums(true, ['NewPage', 'CreationDialog'])
201
+ * ```
202
+ * @param condition - The condition to evaluate
203
+ * @param allowedValues - Array of allowed enum values when condition is met
79
204
  * @returns PropertyDecorator
80
205
  */
81
- export declare function dependsOn(pathOrConditions: string | MultiDependsOnCondition, conditionOrValueOrMessage?: BooleanCondition | any | DependsOnMessage, message?: DependsOnMessage): PropertyDecorator;
206
+ export declare function enums(condition: ConditionInput, allowedValues: string[]): PropertyDecorator;
82
207
  /**
83
- * Retrieves the dependsOn metadata associated with a specific property of a target object.
208
+ * Retrieves the enums metadata associated with a specific property of a target object.
209
+ * Returns an array of EnumsDecoratorMetadata since multiple @enums decorators can be applied.
84
210
  *
85
211
  * @param target - The object containing the property.
86
- * @param propertyName - The name of the property whose dependsOn metadata is to be retrieved.
87
- * @returns The dependsOn information of the property, or undefined if no metadata is found.
212
+ * @param propertyName - The name of the property whose enums metadata is to be retrieved.
213
+ * @returns An array of enums metadata, or undefined if no metadata is found.
88
214
  */
89
- export declare function getDependsOnMetadata(target: object, propertyName: string): DependsOnCondition | undefined;
215
+ export declare function getEnumsMetadata(target: object, propertyName: string): EnumsDecoratorMetadata[] | undefined;
90
216
  /**
91
217
  * Generates a deprecation message for a given key, optionally including additional validity information.
92
218
  *
@@ -1 +1 @@
1
- {"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../../../../../src/sync/common/decoration/decorators.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EACR,QAAQ,EACR,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAChB,QAAQ,EACR,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,EAC1B,MAAM,6BAA6B,CAAC;AAGrC,eAAO,MAAM,YAAY;;;;;;;CAOxB,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,UAAU,QAAQ,KAAG,GAE7C,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAM7F;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,gBAAgB,GAAG,QAAQ,GAAG,SAAS,CAMlF;AAED,eAAO,MAAM,qBAAqB,GAC7B,UAAU,qBAAqB,MAC/B,aAAa,QAAQ,KAAG,IAExB,CAAC;AAGN,eAAO,MAAM,OAAO,GAAI,IAAI,MAAM,KAAG,GAEpC,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,QAAQ,GAAG,EAAE,cAAc,MAAM,KAAG,MAE9D,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,QAAQ,GAAG,KAAG,qBAEtD,CAAC;AAKF,eAAO,MAAM,yBAAyB,eAA8B,CAAC;AACrE,eAAO,MAAM,iBAAiB,GAAI,IAAI,MAAM,KAAG,GAE9C,CAAC;AACF,eAAO,MAAM,oBAAoB,GAAI,QAAQ,GAAG,EAAE,cAAc,MAAM,KAAG,MAExE,CAAC;AAMF,eAAO,MAAM,QAAQ,GAAI,UAAU,QAAQ,KAAG,GAE7C,CAAC;AAEF;;;;;;GAMG;AACH,wB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