@sap/ux-specification 1.84.129 → 1.84.131

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