@sap/ux-specification 1.84.127 → 1.84.129
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.
- package/CHANGELOG.md +54 -0
- package/dist/documentation/v2/v2-AnalyticalListPage.html +2 -2
- package/dist/documentation/v2/v2-ApplicationV2.html +2 -2
- package/dist/documentation/v2/v2-ListReport.html +2 -2
- package/dist/documentation/v2/v2-ListReportNew.html +2 -2
- package/dist/documentation/v2/v2-ObjectPage.html +2 -2
- package/dist/documentation/v2/v2-OverviewPage.html +2 -2
- package/dist/documentation/v4/v4-ApplicationV4.html +2 -2
- package/dist/documentation/v4/v4-ListReport.html +2 -2
- package/dist/documentation/v4/v4-ObjectPage.html +2 -2
- package/dist/index-min.js +177 -177
- package/dist/index-min.js.map +4 -4
- package/dist/schemas/v2/ApplicationV2.json +36 -9
- package/dist/schemas/v2/ListReportNewConfig.json +134 -0
- package/dist/schemas/v2/ObjectPageConfig.json +12 -5
- package/dist/schemas/v4/ApplicationV4.json +8 -4
- package/dist/specification/package.json +16 -15
- package/dist/specification/scripts/schema/to-json-schema.d.ts.map +1 -1
- package/dist/specification/scripts/schema/to-json-schema.js +72 -7
- package/dist/specification/scripts/schema/to-json-schema.js.map +1 -1
- package/dist/specification/src/sync/common/decoration/decorators.d.ts +72 -4
- package/dist/specification/src/sync/common/decoration/decorators.d.ts.map +1 -1
- package/dist/specification/src/sync/common/decoration/decorators.js +145 -8
- package/dist/specification/src/sync/common/decoration/decorators.js.map +1 -1
- package/dist/specification/src/sync/common/distTagEvaluator.d.ts +7 -0
- package/dist/specification/src/sync/common/distTagEvaluator.d.ts.map +1 -1
- package/dist/specification/src/sync/common/distTagEvaluator.js +10 -0
- package/dist/specification/src/sync/common/distTagEvaluator.js.map +1 -1
- package/dist/specification/src/sync/common/dist_tag.json +17 -18
- package/dist/specification/src/sync/common/generate/utils.d.ts +17 -7
- package/dist/specification/src/sync/common/generate/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/common/generate/utils.js +38 -22
- package/dist/specification/src/sync/common/generate/utils.js.map +1 -1
- package/dist/specification/src/sync/common/i18n.json +13 -1
- package/dist/specification/src/sync/common/utils.d.ts +64 -0
- package/dist/specification/src/sync/common/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/common/utils.js +148 -2
- package/dist/specification/src/sync/common/utils.js.map +1 -1
- package/dist/specification/src/sync/v2/application.d.ts +1 -0
- package/dist/specification/src/sync/v2/application.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/application.js +18 -0
- package/dist/specification/src/sync/v2/application.js.map +1 -1
- package/dist/specification/src/sync/v2/export/controls/ObjectPageTable.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPage.js +15 -4
- package/dist/specification/src/sync/v2/export/exportPage.js.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPageGeneric.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPageGeneric.js +6 -12
- package/dist/specification/src/sync/v2/export/exportPageGeneric.js.map +1 -1
- package/dist/specification/src/sync/v2/export/factory.d.ts +26 -0
- package/dist/specification/src/sync/v2/export/factory.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/factory.js +3 -3
- package/dist/specification/src/sync/v2/export/factory.js.map +1 -1
- package/dist/specification/src/sync/v2/export/pages/ObjectPage.d.ts +1 -0
- package/dist/specification/src/sync/v2/export/pages/ObjectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/pages/ObjectPage.js +11 -0
- package/dist/specification/src/sync/v2/export/pages/ObjectPage.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/listReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/listReport.js +44 -0
- package/dist/specification/src/sync/v2/generate/listReport.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/manifestPropertyUtils.d.ts +1 -2
- package/dist/specification/src/sync/v2/generate/manifestPropertyUtils.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/objectPage.js +86 -31
- package/dist/specification/src/sync/v2/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.d.ts +1 -1
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.js +4 -1
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/stableIdUtils.d.ts +8 -0
- package/dist/specification/src/sync/v2/generate/stableIdUtils.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/stableIdUtils.js +1 -0
- package/dist/specification/src/sync/v2/generate/stableIdUtils.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/FilterBar.js +3 -2
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/FilterBar.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiTable.d.ts +78 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiTable.d.ts.map +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiTable.js +454 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiTable.js.map +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiViewSingleTable.d.ts +22 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiViewSingleTable.d.ts.map +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiViewSingleTable.js +124 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiViewSingleTable.js.map +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.d.ts +54 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.d.ts.map +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.js +153 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.js.map +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.d.ts +3 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.js +3 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/ListReportNew.d.ts +4 -2
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/ListReportNew.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/ListReportNew.js +61 -23
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/ListReportNew.js.map +1 -1
- package/dist/specification/src/sync/v2/import/pages/overviewPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/import/pages/overviewPage.js +40 -20
- package/dist/specification/src/sync/v2/import/pages/overviewPage.js.map +1 -1
- package/dist/specification/src/sync/v2/utils.d.ts +23 -0
- package/dist/specification/src/sync/v2/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/utils.js +67 -0
- package/dist/specification/src/sync/v2/utils.js.map +1 -1
- package/dist/specification/src/sync/v4/export/pages/ListReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/pages/ListReport.js +2 -1
- package/dist/specification/src/sync/v4/export/pages/ListReport.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/ListReportUtils.d.ts +74 -0
- package/dist/specification/src/sync/v4/generate/ListReportUtils.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/generate/ListReportUtils.js +262 -0
- package/dist/specification/src/sync/v4/generate/ListReportUtils.js.map +1 -0
- package/dist/specification/src/sync/v4/generate/listReport.d.ts +61 -2
- package/dist/specification/src/sync/v4/generate/listReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/listReport.js +145 -80
- package/dist/specification/src/sync/v4/generate/listReport.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/objectPage.js +82 -33
- package/dist/specification/src/sync/v4/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/App.d.ts +141 -0
- package/dist/specification/src/sync/v4/sync-rules/App.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/App.js +208 -0
- package/dist/specification/src/sync/v4/sync-rules/App.js.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.d.ts +193 -0
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.js +384 -0
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.js.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.d.ts +172 -0
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.js +410 -0
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.js.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/Page.d.ts +70 -0
- package/dist/specification/src/sync/v4/sync-rules/Page.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/Page.js +73 -0
- package/dist/specification/src/sync/v4/sync-rules/Page.js.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/utils.d.ts +9 -0
- package/dist/specification/src/sync/v4/sync-rules/utils.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/utils.js +43 -0
- package/dist/specification/src/sync/v4/sync-rules/utils.js.map +1 -0
- package/dist/specification/src/sync/v4/utils/utils.d.ts +15 -5
- package/dist/specification/src/sync/v4/utils/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/utils/utils.js +53 -5
- package/dist/specification/src/sync/v4/utils/utils.js.map +1 -1
- package/dist/types/src/common/Application.d.ts +3 -0
- package/dist/types/src/common/Application.d.ts.map +1 -1
- package/dist/types/src/common/Application.js +4 -0
- package/dist/types/src/common/Application.js.map +1 -1
- package/dist/types/src/common/types.d.ts +106 -1
- package/dist/types/src/common/types.d.ts.map +1 -1
- package/dist/types/src/common/types.js +2 -0
- package/dist/types/src/common/types.js.map +1 -1
- package/dist/types/src/common/webapp/manifest/Manifest.d.ts +1 -1
- package/dist/types/src/common/webapp/manifest/Manifest.d.ts.map +1 -1
- package/dist/types/src/v2/application.d.ts +18 -0
- package/dist/types/src/v2/application.d.ts.map +1 -1
- package/dist/types/src/v2/controls/Action.d.ts +12 -0
- package/dist/types/src/v2/controls/Action.d.ts.map +1 -1
- package/dist/types/src/v2/controls/AnalyticalListPageChart.d.ts +1 -0
- package/dist/types/src/v2/controls/AnalyticalListPageChart.d.ts.map +1 -1
- package/dist/types/src/v2/controls/AnalyticalListPageKPI.d.ts +1 -0
- package/dist/types/src/v2/controls/AnalyticalListPageKPI.d.ts.map +1 -1
- package/dist/types/src/v2/controls/Card.d.ts +13 -0
- package/dist/types/src/v2/controls/Card.d.ts.map +1 -1
- package/dist/types/src/v2/controls/Card.js.map +1 -1
- package/dist/types/src/v2/controls/Field.d.ts +1 -0
- package/dist/types/src/v2/controls/Field.d.ts.map +1 -1
- package/dist/types/src/v2/controls/FilterBar.d.ts +6 -0
- package/dist/types/src/v2/controls/FilterBar.d.ts.map +1 -1
- package/dist/types/src/v2/controls/FilterBar.js.map +1 -1
- package/dist/types/src/v2/controls/Header.d.ts +1 -0
- package/dist/types/src/v2/controls/Header.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageChart.d.ts +1 -0
- package/dist/types/src/v2/controls/ObjectPageChart.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageFooter.d.ts +2 -0
- package/dist/types/src/v2/controls/ObjectPageFooter.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageForm.d.ts +1 -0
- package/dist/types/src/v2/controls/ObjectPageForm.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageHeader.d.ts +1 -0
- package/dist/types/src/v2/controls/ObjectPageHeader.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageHeaderSection.d.ts +3 -0
- package/dist/types/src/v2/controls/ObjectPageHeaderSection.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageLayout.d.ts +1 -0
- package/dist/types/src/v2/controls/ObjectPageLayout.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageSection.d.ts +13 -0
- package/dist/types/src/v2/controls/ObjectPageSection.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageSection.js.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageTable.d.ts +10 -4
- package/dist/types/src/v2/controls/ObjectPageTable.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageToolBar.d.ts +2 -0
- package/dist/types/src/v2/controls/ObjectPageToolBar.d.ts.map +1 -1
- package/dist/types/src/v2/controls/Table.d.ts +28 -0
- package/dist/types/src/v2/controls/Table.d.ts.map +1 -1
- package/dist/types/src/v2/controls/Table.js.map +1 -1
- package/dist/types/src/v2/controls/ToolBar.d.ts +1 -0
- package/dist/types/src/v2/controls/ToolBar.d.ts.map +1 -1
- package/dist/types/src/v2/pages/AnalyticalListPageConfigV2.d.ts +1 -0
- package/dist/types/src/v2/pages/AnalyticalListPageConfigV2.d.ts.map +1 -1
- package/dist/types/src/v2/pages/ObjectPageConfigV2.d.ts +10 -1
- package/dist/types/src/v2/pages/ObjectPageConfigV2.d.ts.map +1 -1
- package/dist/types/src/v2/pages/OverviewPageConfigV2.d.ts +4 -0
- package/dist/types/src/v2/pages/OverviewPageConfigV2.d.ts.map +1 -1
- package/dist/types/src/v4/controls/FilterBar.d.ts +2 -0
- package/dist/types/src/v4/controls/FilterBar.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageFooter.d.ts +1 -0
- package/dist/types/src/v4/controls/ObjectPageFooter.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageHeader.d.ts +1 -0
- package/dist/types/src/v4/controls/ObjectPageHeader.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageHeaderSection.d.ts +4 -0
- package/dist/types/src/v4/controls/ObjectPageHeaderSection.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageLayout.d.ts +1 -0
- package/dist/types/src/v4/controls/ObjectPageLayout.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageSection.d.ts +15 -0
- package/dist/types/src/v4/controls/ObjectPageSection.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageSection.js.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageTable.d.ts +2 -0
- package/dist/types/src/v4/controls/ObjectPageTable.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageTable.js.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageToolBar.d.ts +3 -0
- package/dist/types/src/v4/controls/ObjectPageToolBar.d.ts.map +1 -1
- package/dist/types/src/v4/controls/Table.d.ts +15 -0
- package/dist/types/src/v4/controls/Table.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ToolBar.d.ts +6 -0
- package/dist/types/src/v4/controls/ToolBar.d.ts.map +1 -1
- package/dist/types/src/v4/webapp/manifest/ManifestSettings.d.ts +22 -0
- package/dist/types/src/v4/webapp/manifest/ManifestSettings.d.ts.map +1 -1
- package/package.json +16 -15
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import 'reflect-metadata';
|
|
2
|
-
import type { SyncRule, PageLayoutInformation, ValidityInformation, SyncRuleProvider } from '@sap/ux-specification-types';
|
|
3
|
-
export declare const
|
|
2
|
+
import type { SyncRule, PageLayoutInformation, ValidityInformation, SyncRuleProvider, Validity, BooleanCondition, DependsOnCondition, DependsOnMessage, MultiDependsOnCondition } from '@sap/ux-specification-types';
|
|
3
|
+
export declare const metadataKeys: {
|
|
4
|
+
description: symbol;
|
|
5
|
+
hidden: symbol;
|
|
6
|
+
isViewNode: symbol;
|
|
7
|
+
syncRule: symbol;
|
|
8
|
+
dependsOn: symbol;
|
|
9
|
+
validity: symbol;
|
|
10
|
+
};
|
|
4
11
|
export declare const syncRule: (propSpec: SyncRule) => any;
|
|
5
12
|
export declare function getReflectMetadata(target: object, propertyName: string): SyncRule | undefined;
|
|
6
13
|
/**
|
|
@@ -17,7 +24,68 @@ export declare const getPageLayoutInformation: (target: any) => PageLayoutInform
|
|
|
17
24
|
export declare const descriptionUrlMetadataKey: unique symbol;
|
|
18
25
|
export declare const descriptionSrcURL: (id: string) => any;
|
|
19
26
|
export declare const getDescriptionSrcURL: (target: any, propertyName: string) => string;
|
|
20
|
-
export declare const
|
|
21
|
-
|
|
27
|
+
export declare const validity: (validity: Validity) => any;
|
|
28
|
+
/**
|
|
29
|
+
* Retrieves the validity metadata associated with a specific property of a target object.
|
|
30
|
+
*
|
|
31
|
+
* @param target - The object containing the property.
|
|
32
|
+
* @param propertyName - The name of the property whose validity metadata is to be retrieved.
|
|
33
|
+
* @returns The validity information of the property, or undefined if no metadata is found.
|
|
34
|
+
*/
|
|
35
|
+
export declare function getValidityMetadata(target: object, propertyName: string): ValidityInformation | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Mark the target class with a metadata flag indicating it is a view node.
|
|
38
|
+
*
|
|
39
|
+
* @param target - The constructor of the class to be marked as a view node
|
|
40
|
+
*/
|
|
41
|
+
export declare function isViewNode(target: Function): void;
|
|
42
|
+
/**
|
|
43
|
+
* Decorator to add a description to a class or property in the schema.
|
|
44
|
+
*
|
|
45
|
+
* @param text - The description text
|
|
46
|
+
* @returns ClassDecorator
|
|
47
|
+
*/
|
|
48
|
+
export declare function description(text: string): (target: Function) => void;
|
|
49
|
+
/**
|
|
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.
|
|
52
|
+
*
|
|
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
|
|
55
|
+
*/
|
|
56
|
+
export declare function hidden(condition?: BooleanCondition): PropertyDecorator & ClassDecorator;
|
|
57
|
+
/**
|
|
58
|
+
* Helper function to create a DependsOnMessage object.
|
|
59
|
+
*
|
|
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
|
|
63
|
+
*/
|
|
64
|
+
export declare const dependsOnMessage: (text?: DependsOnMessage["text"], deletable?: boolean) => DependsOnMessage;
|
|
65
|
+
/**
|
|
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.
|
|
68
|
+
*
|
|
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)
|
|
72
|
+
* @returns PropertyDecorator
|
|
73
|
+
*/
|
|
74
|
+
export declare function dependsOn(pathOrConditions: string | MultiDependsOnCondition, conditionOrValueOrMessage?: BooleanCondition | any | DependsOnMessage, message?: DependsOnMessage): PropertyDecorator;
|
|
75
|
+
/**
|
|
76
|
+
* Retrieves the dependsOn metadata associated with a specific property of a target object.
|
|
77
|
+
*
|
|
78
|
+
* @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.
|
|
81
|
+
*/
|
|
82
|
+
export declare function getDependsOnMetadata(target: object, propertyName: string): DependsOnCondition | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* Generates a deprecation message for a given key, optionally including additional validity information.
|
|
85
|
+
*
|
|
86
|
+
* @param key - The key or property name that is deprecated.
|
|
87
|
+
* @param validityInformation - Optional validity information providing details about the deprecation.
|
|
88
|
+
* @returns A string containing the deprecation message.
|
|
89
|
+
*/
|
|
22
90
|
export declare function getTextForDeprecated(key: string, validityInformation?: ValidityInformation): string;
|
|
23
91
|
//# sourceMappingURL=decorators.d.ts.map
|
|
@@ -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,
|
|
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,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;AACr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defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.dependsOnMessage = exports.validity = exports.getDescriptionSrcURL = exports.descriptionSrcURL = exports.descriptionUrlMetadataKey = exports.getPageLayoutInformation = exports.getChildId = exports.childId = exports.pageLayoutInformation = exports.syncRule = exports.metadataKeys = void 0;
|
|
4
4
|
exports.getReflectMetadata = getReflectMetadata;
|
|
5
5
|
exports.getReflectTypeMetadata = getReflectTypeMetadata;
|
|
6
|
+
exports.getValidityMetadata = getValidityMetadata;
|
|
7
|
+
exports.isViewNode = isViewNode;
|
|
8
|
+
exports.description = description;
|
|
9
|
+
exports.hidden = hidden;
|
|
10
|
+
exports.dependsOn = dependsOn;
|
|
11
|
+
exports.getDependsOnMetadata = getDependsOnMetadata;
|
|
6
12
|
exports.getTextForDeprecated = getTextForDeprecated;
|
|
7
13
|
require("reflect-metadata");
|
|
8
|
-
|
|
14
|
+
// Metadata keys for schema post-processing
|
|
15
|
+
exports.metadataKeys = {
|
|
16
|
+
description: Symbol('ui:description'),
|
|
17
|
+
hidden: Symbol('ui:hidden'),
|
|
18
|
+
isViewNode: Symbol('ui:isViewNode'),
|
|
19
|
+
syncRule: Symbol('sync:rule'),
|
|
20
|
+
dependsOn: Symbol('generate:dependsOn'),
|
|
21
|
+
validity: Symbol('generate:validity')
|
|
22
|
+
};
|
|
9
23
|
const syncRule = (propSpec) => {
|
|
10
|
-
return Reflect.metadata(exports.
|
|
24
|
+
return Reflect.metadata(exports.metadataKeys.syncRule, propSpec);
|
|
11
25
|
};
|
|
12
26
|
exports.syncRule = syncRule;
|
|
13
27
|
function getReflectMetadata(target, propertyName) {
|
|
14
28
|
let rule;
|
|
15
29
|
if (target) {
|
|
16
|
-
rule = Reflect.getMetadata(exports.
|
|
30
|
+
rule = Reflect.getMetadata(exports.metadataKeys.syncRule, target, propertyName);
|
|
17
31
|
}
|
|
18
32
|
return rule;
|
|
19
33
|
}
|
|
@@ -26,7 +40,7 @@ function getReflectMetadata(target, propertyName) {
|
|
|
26
40
|
function getReflectTypeMetadata(cls) {
|
|
27
41
|
let rule;
|
|
28
42
|
if (cls) {
|
|
29
|
-
rule = Reflect.getMetadata(exports.
|
|
43
|
+
rule = Reflect.getMetadata(exports.metadataKeys.syncRule, cls);
|
|
30
44
|
}
|
|
31
45
|
return rule;
|
|
32
46
|
}
|
|
@@ -62,11 +76,134 @@ exports.getDescriptionSrcURL = getDescriptionSrcURL;
|
|
|
62
76
|
/*
|
|
63
77
|
* Validity decorator and functions for it
|
|
64
78
|
*/
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
return Reflect.metadata(exports.validityMetadataKey, propSpec);
|
|
79
|
+
const validity = (validity) => {
|
|
80
|
+
return Reflect.metadata(exports.metadataKeys.validity, validity);
|
|
68
81
|
};
|
|
69
82
|
exports.validity = validity;
|
|
83
|
+
/**
|
|
84
|
+
* Retrieves the validity metadata associated with a specific property of a target object.
|
|
85
|
+
*
|
|
86
|
+
* @param target - The object containing the property.
|
|
87
|
+
* @param propertyName - The name of the property whose validity metadata is to be retrieved.
|
|
88
|
+
* @returns The validity information of the property, or undefined if no metadata is found.
|
|
89
|
+
*/
|
|
90
|
+
function getValidityMetadata(target, propertyName) {
|
|
91
|
+
let validityInfo;
|
|
92
|
+
if (target) {
|
|
93
|
+
validityInfo = Reflect.getMetadata(exports.metadataKeys.validity, target, propertyName);
|
|
94
|
+
}
|
|
95
|
+
return validityInfo;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Mark the target class with a metadata flag indicating it is a view node.
|
|
99
|
+
*
|
|
100
|
+
* @param target - The constructor of the class to be marked as a view node
|
|
101
|
+
*/
|
|
102
|
+
function isViewNode(target) {
|
|
103
|
+
Reflect.defineMetadata(exports.metadataKeys.isViewNode, true, target);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Decorator to add a description to a class or property in the schema.
|
|
107
|
+
*
|
|
108
|
+
* @param text - The description text
|
|
109
|
+
* @returns ClassDecorator
|
|
110
|
+
*/
|
|
111
|
+
function description(text) {
|
|
112
|
+
return function (target) {
|
|
113
|
+
Reflect.defineMetadata(exports.metadataKeys.description, text, target);
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Decorator to conditionally hide a property in the schema based on a condition function.
|
|
118
|
+
* The condition function is evaluated during schema generation with the appropriate context.
|
|
119
|
+
*
|
|
120
|
+
* @param condition - A function that takes context and returns boolean indicating if property should be hidden
|
|
121
|
+
* @returns PropertyDecorator or ClassDecorator depending on usage
|
|
122
|
+
*/
|
|
123
|
+
function hidden(condition) {
|
|
124
|
+
return ((target, propertyKey) => {
|
|
125
|
+
if (propertyKey !== undefined) {
|
|
126
|
+
// Property decorator usage
|
|
127
|
+
Reflect.defineMetadata(exports.metadataKeys.hidden, condition, target, propertyKey);
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
// Class decorator usage
|
|
131
|
+
Reflect.defineMetadata(exports.metadataKeys.hidden, condition, target);
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Helper function to create a DependsOnMessage object.
|
|
137
|
+
*
|
|
138
|
+
* @param text - The message text (can be true for default i18n message, a string, or a function)
|
|
139
|
+
* @param deletable - Whether the message can be deleted/dismissed in the UI
|
|
140
|
+
* @returns A DependsOnMessage object
|
|
141
|
+
*/
|
|
142
|
+
const dependsOnMessage = (text = true, deletable = true) => ({
|
|
143
|
+
text,
|
|
144
|
+
deletable
|
|
145
|
+
});
|
|
146
|
+
exports.dependsOnMessage = dependsOnMessage;
|
|
147
|
+
/**
|
|
148
|
+
* Decorator to conditionally show/hide a property based on one or more property values.
|
|
149
|
+
* The decorated property will be hidden if the dependency condition(s) are not met.
|
|
150
|
+
*
|
|
151
|
+
* @param pathOrConditions - A string property path or an array of condition objects (all must be met)
|
|
152
|
+
* @param conditionOrValueOrMessage - Single condition: condition/expected value/message; Multi-condition: message parameter
|
|
153
|
+
* @param message - Optional message parameter (only for single condition with condition/value)
|
|
154
|
+
* @returns PropertyDecorator
|
|
155
|
+
*/
|
|
156
|
+
function dependsOn(pathOrConditions, conditionOrValueOrMessage, message) {
|
|
157
|
+
return (target, propertyKey) => {
|
|
158
|
+
let dependsOnInfo;
|
|
159
|
+
// Check if this is multi-condition (array) or single condition (string)
|
|
160
|
+
if (Array.isArray(pathOrConditions)) {
|
|
161
|
+
// Multi-condition case
|
|
162
|
+
dependsOnInfo = {
|
|
163
|
+
conditions: pathOrConditions,
|
|
164
|
+
message: conditionOrValueOrMessage
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
dependsOnInfo = { path: pathOrConditions };
|
|
169
|
+
if (typeof conditionOrValueOrMessage === 'function') {
|
|
170
|
+
dependsOnInfo.dependsOn = conditionOrValueOrMessage;
|
|
171
|
+
}
|
|
172
|
+
else if (conditionOrValueOrMessage !== undefined && typeof conditionOrValueOrMessage === 'object') {
|
|
173
|
+
// It's a message object
|
|
174
|
+
dependsOnInfo.message = conditionOrValueOrMessage;
|
|
175
|
+
}
|
|
176
|
+
else if (conditionOrValueOrMessage !== undefined) {
|
|
177
|
+
dependsOnInfo.expectedValue = conditionOrValueOrMessage;
|
|
178
|
+
}
|
|
179
|
+
if (message !== undefined) {
|
|
180
|
+
dependsOnInfo.message = message;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
Reflect.defineMetadata(exports.metadataKeys.dependsOn, dependsOnInfo, target, propertyKey);
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Retrieves the dependsOn metadata associated with a specific property of a target object.
|
|
188
|
+
*
|
|
189
|
+
* @param target - The object containing the property.
|
|
190
|
+
* @param propertyName - The name of the property whose dependsOn metadata is to be retrieved.
|
|
191
|
+
* @returns The dependsOn information of the property, or undefined if no metadata is found.
|
|
192
|
+
*/
|
|
193
|
+
function getDependsOnMetadata(target, propertyName) {
|
|
194
|
+
let dependsOnInfo;
|
|
195
|
+
if (target) {
|
|
196
|
+
dependsOnInfo = Reflect.getMetadata(exports.metadataKeys.dependsOn, target, propertyName);
|
|
197
|
+
}
|
|
198
|
+
return dependsOnInfo;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Generates a deprecation message for a given key, optionally including additional validity information.
|
|
202
|
+
*
|
|
203
|
+
* @param key - The key or property name that is deprecated.
|
|
204
|
+
* @param validityInformation - Optional validity information providing details about the deprecation.
|
|
205
|
+
* @returns A string containing the deprecation message.
|
|
206
|
+
*/
|
|
70
207
|
function getTextForDeprecated(key, validityInformation) {
|
|
71
208
|
let text = `${key} is deprecated`;
|
|
72
209
|
if (validityInformation && validityInformation.deprecated) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../../../../../src/sync/common/decoration/decorators.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../../../../../src/sync/common/decoration/decorators.ts"],"names":[],"mappings":";;;AA2BA,gDAMC;AAQD,wDAMC;AA+CD,kDAMC;AAOD,gCAEC;AAQD,kCAIC;AASD,wBAUC;AAuBD,8BAiCC;AASD,oDAMC;AASD,oDAQC;AApOD,4BAA0B;AAa1B,2CAA2C;AAC9B,QAAA,YAAY,GAAG;IACxB,WAAW,EAAE,MAAM,CAAC,gBAAgB,CAAC;IACrC,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC,eAAe,CAAC;IACnC,QAAQ,EAAE,MAAM,CAAC,WAAW,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC,oBAAoB,CAAC;IACvC,QAAQ,EAAE,MAAM,CAAC,mBAAmB,CAAC;CACxC,CAAC;AAEK,MAAM,QAAQ,GAAG,CAAC,QAAkB,EAAO,EAAE;IAChD,OAAO,OAAO,CAAC,QAAQ,CAAC,oBAAY,CAAC,QAAQ,EAAE,QAAQ,C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C;AAChB,CAAC"}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import type { ExtensionLogger } from '@sap/ux-specification-types';
|
|
2
|
+
/**
|
|
3
|
+
* Checks if the provided minUI5Version is a variable (starts with '$').
|
|
4
|
+
*
|
|
5
|
+
* @param minUI5Version - The minimum UI5 version to check.
|
|
6
|
+
* @returns {boolean} - true if minUI5Version is a variable, false otherwise.
|
|
7
|
+
*/
|
|
8
|
+
export declare function isMinUI5VersionVariable(minUI5Version: string): boolean;
|
|
2
9
|
export declare class DistTagEvaluator {
|
|
3
10
|
static distTagsOfSpec: string[];
|
|
4
11
|
constructor();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"distTagEvaluator.d.ts","sourceRoot":"","sources":["../../../../../src/sync/common/distTagEvaluator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAOnE,qBAAa,gBAAgB;IACzB,MAAM,CAAC,cAAc,EAAE,MAAM,EAAE,CAAM;;IAQrC;;OAEG;IACH,MAAM,CAAC,mBAAmB,IAAI,IAAI;IAIlC;;;OAGG;IACI,cAAc,IAAI,MAAM,GAAG,SAAS;IAI3C;;;;;OAKG;IACI,oBAAoB,IAAI,MAAM,EAAE;IAoBvC;;;;OAIG;IACI,yBAAyB,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,GAAG,IAAI;CA+BzF"}
|
|
1
|
+
{"version":3,"file":"distTagEvaluator.d.ts","sourceRoot":"","sources":["../../../../../src/sync/common/distTagEvaluator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAOnE;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAEtE;AAED,qBAAa,gBAAgB;IACzB,MAAM,CAAC,cAAc,EAAE,MAAM,EAAE,CAAM;;IAQrC;;OAEG;IACH,MAAM,CAAC,mBAAmB,IAAI,IAAI;IAIlC;;;OAGG;IACI,cAAc,IAAI,MAAM,GAAG,SAAS;IAI3C;;;;;OAKG;IACI,oBAAoB,IAAI,MAAM,EAAE;IAoBvC;;;;OAIG;IACI,yBAAyB,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,GAAG,IAAI;CA+BzF"}
|
|
@@ -37,11 +37,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.DistTagEvaluator = void 0;
|
|
40
|
+
exports.isMinUI5VersionVariable = isMinUI5VersionVariable;
|
|
40
41
|
const ux_specification_types_1 = require("@sap/ux-specification-types");
|
|
41
42
|
const extensionLogger_1 = require("../../extensionLogger");
|
|
42
43
|
const i18next_1 = __importDefault(require("i18next"));
|
|
43
44
|
const distTagsJSON = __importStar(require("./dist_tag.json"));
|
|
44
45
|
const package_json_1 = require("../../../package.json");
|
|
46
|
+
/**
|
|
47
|
+
* Checks if the provided minUI5Version is a variable (starts with '$').
|
|
48
|
+
*
|
|
49
|
+
* @param minUI5Version - The minimum UI5 version to check.
|
|
50
|
+
* @returns {boolean} - true if minUI5Version is a variable, false otherwise.
|
|
51
|
+
*/
|
|
52
|
+
function isMinUI5VersionVariable(minUI5Version) {
|
|
53
|
+
return minUI5Version.startsWith('$');
|
|
54
|
+
}
|
|
45
55
|
class DistTagEvaluator {
|
|
46
56
|
static { this.distTagsOfSpec = []; }
|
|
47
57
|
constructor() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"distTagEvaluator.js","sourceRoot":"","sources":["../../../../../src/sync/common/distTagEvaluator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"distTagEvaluator.js","sourceRoot":"","sources":["../../../../../src/sync/common/distTagEvaluator.ts"],"names":[],"mappings":";;;;;;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|
|
@@ -7,14 +7,11 @@
|
|
|
7
7
|
"rootPpmsObject": "FIORI ELEMENT SPEC 1.0",
|
|
8
8
|
"distTags": [
|
|
9
9
|
{
|
|
10
|
-
"version": "1.
|
|
10
|
+
"version": "1.142",
|
|
11
11
|
"distTag": [
|
|
12
12
|
"latest",
|
|
13
13
|
"UI5-2.0",
|
|
14
14
|
"UI5-2.1",
|
|
15
|
-
"UI5-1.139",
|
|
16
|
-
"UI5-1.140",
|
|
17
|
-
"UI5-1.141",
|
|
18
15
|
"UI5-1.142",
|
|
19
16
|
"UI5-1.143",
|
|
20
17
|
"UI5-1.144",
|
|
@@ -25,10 +22,17 @@
|
|
|
25
22
|
"UI5-1.149"
|
|
26
23
|
]
|
|
27
24
|
},
|
|
25
|
+
{
|
|
26
|
+
"version": "1.139",
|
|
27
|
+
"distTag": [
|
|
28
|
+
"UI5-1.139",
|
|
29
|
+
"UI5-1.140",
|
|
30
|
+
"UI5-1.141"
|
|
31
|
+
]
|
|
32
|
+
},
|
|
28
33
|
{
|
|
29
34
|
"version": "1.136",
|
|
30
35
|
"distTag": [
|
|
31
|
-
"UI5-1.136-legacy-free",
|
|
32
36
|
"UI5-1.136",
|
|
33
37
|
"UI5-1.137",
|
|
34
38
|
"UI5-1.138"
|
|
@@ -63,6 +67,14 @@
|
|
|
63
67
|
{
|
|
64
68
|
"version": "1.108",
|
|
65
69
|
"distTag": [
|
|
70
|
+
"UI5-1.100",
|
|
71
|
+
"UI5-1.101",
|
|
72
|
+
"UI5-1.102",
|
|
73
|
+
"UI5-1.103",
|
|
74
|
+
"UI5-1.104",
|
|
75
|
+
"UI5-1.105",
|
|
76
|
+
"UI5-1.106",
|
|
77
|
+
"UI5-1.107",
|
|
66
78
|
"UI5-1.108",
|
|
67
79
|
"UI5-1.109",
|
|
68
80
|
"UI5-1.110",
|
|
@@ -77,19 +89,6 @@
|
|
|
77
89
|
"UI5-1.119"
|
|
78
90
|
]
|
|
79
91
|
},
|
|
80
|
-
{
|
|
81
|
-
"version": "1.102",
|
|
82
|
-
"distTag": [
|
|
83
|
-
"UI5-1.100",
|
|
84
|
-
"UI5-1.101",
|
|
85
|
-
"UI5-1.102",
|
|
86
|
-
"UI5-1.103",
|
|
87
|
-
"UI5-1.104",
|
|
88
|
-
"UI5-1.105",
|
|
89
|
-
"UI5-1.106",
|
|
90
|
-
"UI5-1.107"
|
|
91
|
-
]
|
|
92
|
-
},
|
|
93
92
|
{
|
|
94
93
|
"version": "1.96",
|
|
95
94
|
"distTag": [
|
|
@@ -4,7 +4,7 @@ import { UIAnnotationTerms } from '@sap-ux/vocabularies-types/vocabularies/UI';
|
|
|
4
4
|
import type { Definition, DefinitionOrBoolean } from 'typescript-json-schema';
|
|
5
5
|
import type { SectionTypeV2 } from '../../v2/types';
|
|
6
6
|
import type { PresentationVariantV4 } from '../../v4/types';
|
|
7
|
-
import type { FacetConfig, FacetSection, SectionType, SchemaDefinition } from '@sap/ux-specification-types';
|
|
7
|
+
import type { FacetConfig, FacetSection, SectionType, SchemaDefinition, MessageParameters } from '@sap/ux-specification-types';
|
|
8
8
|
import { DefinitionName, SchemaKeyName } from '@sap/ux-specification-types';
|
|
9
9
|
interface PropertyInDefinition {
|
|
10
10
|
definition?: string;
|
|
@@ -25,9 +25,18 @@ interface EnumDefinitionParsingOptions {
|
|
|
25
25
|
*/
|
|
26
26
|
export declare function addEnumToSchema(enumEntries: string[], currentDefinition: Definition): void;
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* @param
|
|
28
|
+
* Determines the existing UI annotations of the given list (validAnnotations).
|
|
29
|
+
*
|
|
30
|
+
* @param entityType - The entity type containing annotations to be processed
|
|
31
|
+
* @param validAnnotations - List of valid UI annotation terms to be processed
|
|
32
|
+
* @returns the list of valid annotations
|
|
33
|
+
*/
|
|
34
|
+
export declare function getListOfValidAnnotations(entityType: EntityType, validAnnotations: UIAnnotationTerms[]): string[];
|
|
35
|
+
/**
|
|
36
|
+
* Adds an enum filled with existing UI annotations of the given list (validAnnotations).
|
|
37
|
+
*
|
|
38
|
+
* @param {EntityType} entityType - The entity type containing annotations to be processed
|
|
39
|
+
* @param {UIAnnotationTerms[]} validAnnotations - List of valid UI annotation terms to be processed
|
|
31
40
|
* @param {Definition} annoPath - the annotation path property in the app schema where the enum shall be added
|
|
32
41
|
*/
|
|
33
42
|
export declare function addEnumForValidAnnotations(entityType: EntityType, validAnnotations: UIAnnotationTerms[], annoPath: Definition): void;
|
|
@@ -225,9 +234,10 @@ export declare function addKeyToDefinition(lineItemRecord: object, properties: o
|
|
|
225
234
|
/**
|
|
226
235
|
* Adds a message to the `messages` field of a schema element.
|
|
227
236
|
*
|
|
228
|
-
* @param element The
|
|
229
|
-
* @param
|
|
237
|
+
* @param {Definition} element - The element to which the message will be added.
|
|
238
|
+
* @param {MessageParameters} parameters - The message parameters including text and deletable flag.
|
|
239
|
+
* @returns {void}
|
|
230
240
|
*/
|
|
231
|
-
export declare function addMessageToSchema(element: Definition,
|
|
241
|
+
export declare function addMessageToSchema(element: Definition, { text, deletable }: MessageParameters): void;
|
|
232
242
|
export {};
|
|
233
243
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../src/sync/common/generate/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC3G,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4CAA4C,CAAC;AAC3E,OAAO,EAAqB,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAClG,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,C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;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,SAAiB,EAAE,EAAE,iBAAiB,GAAG,IAAI,CAU5G"}
|
|
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.DataType = void 0;
|
|
7
7
|
exports.addEnumToSchema = addEnumToSchema;
|
|
8
|
+
exports.getListOfValidAnnotations = getListOfValidAnnotations;
|
|
8
9
|
exports.addEnumForValidAnnotations = addEnumForValidAnnotations;
|
|
9
10
|
exports.addEnumForSingleTabVariant = addEnumForSingleTabVariant;
|
|
10
11
|
exports.addEnumForMultiTabVariant = addEnumForMultiTabVariant;
|
|
@@ -53,29 +54,42 @@ function addEnumToSchema(enumEntries, currentDefinition) {
|
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
56
|
/**
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* @param
|
|
59
|
-
* @param
|
|
57
|
+
* Determines the existing UI annotations of the given list (validAnnotations).
|
|
58
|
+
*
|
|
59
|
+
* @param entityType - The entity type containing annotations to be processed
|
|
60
|
+
* @param validAnnotations - List of valid UI annotation terms to be processed
|
|
61
|
+
* @returns the list of valid annotations
|
|
60
62
|
*/
|
|
61
|
-
function
|
|
62
|
-
const uiAnnotations = entityType?.annotations?.UI;
|
|
63
|
-
if (!uiAnnotations) {
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
63
|
+
function getListOfValidAnnotations(entityType, validAnnotations) {
|
|
66
64
|
const enumEntries = [];
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
65
|
+
const uiAnnotations = entityType?.annotations?.UI;
|
|
66
|
+
if (uiAnnotations) {
|
|
67
|
+
for (const key in uiAnnotations) {
|
|
68
|
+
const annotation = uiAnnotations[key];
|
|
69
|
+
if (validAnnotations.indexOf(annotation.term) > -1) {
|
|
70
|
+
const enumEntry = annotation.qualifier
|
|
71
|
+
? `${annotation.term}#${annotation.qualifier}`
|
|
72
|
+
: `${annotation.term}`;
|
|
73
|
+
if (enumEntries.indexOf(enumEntry) === -1) {
|
|
74
|
+
enumEntries.push(enumEntry);
|
|
75
|
+
}
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
78
|
}
|
|
78
|
-
|
|
79
|
+
return enumEntries;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Adds an enum filled with existing UI annotations of the given list (validAnnotations).
|
|
83
|
+
*
|
|
84
|
+
* @param {EntityType} entityType - The entity type containing annotations to be processed
|
|
85
|
+
* @param {UIAnnotationTerms[]} validAnnotations - List of valid UI annotation terms to be processed
|
|
86
|
+
* @param {Definition} annoPath - the annotation path property in the app schema where the enum shall be added
|
|
87
|
+
*/
|
|
88
|
+
function addEnumForValidAnnotations(entityType, validAnnotations, annoPath) {
|
|
89
|
+
const enumEntries = getListOfValidAnnotations(entityType, validAnnotations);
|
|
90
|
+
if (enumEntries.length > 0) {
|
|
91
|
+
addEnumToSchema(enumEntries, annoPath);
|
|
92
|
+
}
|
|
79
93
|
}
|
|
80
94
|
/**
|
|
81
95
|
* Adds an enum filled with existing UI annotations for single-tab variants of a table
|
|
@@ -658,16 +672,18 @@ function addKeyToDefinition(lineItemRecord, properties, schemaKey) {
|
|
|
658
672
|
/**
|
|
659
673
|
* Adds a message to the `messages` field of a schema element.
|
|
660
674
|
*
|
|
661
|
-
* @param element The
|
|
662
|
-
* @param
|
|
675
|
+
* @param {Definition} element - The element to which the message will be added.
|
|
676
|
+
* @param {MessageParameters} parameters - The message parameters including text and deletable flag.
|
|
677
|
+
* @returns {void}
|
|
663
678
|
*/
|
|
664
|
-
function addMessageToSchema(element,
|
|
679
|
+
function addMessageToSchema(element, { text, deletable = false }) {
|
|
665
680
|
if (!element[ux_specification_types_1.SchemaTag.messages]) {
|
|
666
681
|
element[ux_specification_types_1.SchemaTag.messages] = [];
|
|
667
682
|
}
|
|
668
683
|
if (Array.isArray(element[ux_specification_types_1.SchemaTag.messages])) {
|
|
669
684
|
element[ux_specification_types_1.SchemaTag.messages].push({
|
|
670
|
-
text
|
|
685
|
+
text,
|
|
686
|
+
deletable
|
|
671
687
|
});
|
|
672
688
|
}
|
|
673
689
|
}
|