@sap/ux-specification 1.136.15 → 1.136.16
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 +227 -165
- 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-BuildingBlocks.html +2 -2
- package/dist/documentation/v4/v4-FreestylePage.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 +254 -250
- package/dist/index-min.js.map +4 -4
- package/dist/schemas/v2/AnalyticalListPageConfig.json +3 -3
- package/dist/schemas/v2/ListReportConfig.json +5 -5
- package/dist/schemas/v2/ListReportNewConfig.json +1 -1
- package/dist/schemas/v2/ObjectPageConfig.json +5 -5
- package/dist/schemas/v4/ApplicationV4.json +1 -1
- package/dist/schemas/v4/BuildingBlocksConfig.json +48 -6
- package/dist/schemas/v4/ListReportConfig.json +24 -6
- package/dist/schemas/v4/ObjectPageConfig.json +32 -8
- package/dist/specification/package.json +13 -11
- package/dist/specification/scripts/extractDocu.js +18 -1
- package/dist/specification/scripts/extractDocu.js.map +1 -1
- package/dist/specification/scripts/generate-validity-report.d.ts +15 -0
- package/dist/specification/scripts/generate-validity-report.d.ts.map +1 -0
- package/dist/specification/scripts/generate-validity-report.js +367 -0
- package/dist/specification/scripts/generate-validity-report.js.map +1 -0
- package/dist/specification/scripts/macros/corrections.d.ts +40 -0
- package/dist/specification/scripts/macros/corrections.d.ts.map +1 -1
- package/dist/specification/scripts/macros/corrections.js +81 -6
- package/dist/specification/scripts/macros/corrections.js.map +1 -1
- package/dist/specification/scripts/macros/schema.js +1 -1
- package/dist/specification/scripts/macros/schema.js.map +1 -1
- package/dist/specification/scripts/macros/types.d.ts +1 -0
- package/dist/specification/scripts/macros/types.d.ts.map +1 -1
- package/dist/specification/scripts/schema/to-json-schema.d.ts.map +1 -1
- package/dist/specification/scripts/schema/to-json-schema.js +2 -13
- package/dist/specification/scripts/schema/to-json-schema.js.map +1 -1
- package/dist/specification/src/api.js +1 -1
- package/dist/specification/src/sync/common/decoration/decorator-paths.d.ts +503 -0
- package/dist/specification/src/sync/common/decoration/decorator-paths.d.ts.map +1 -0
- package/dist/specification/src/sync/common/decoration/decorator-paths.js +497 -0
- package/dist/specification/src/sync/common/decoration/decorator-paths.js.map +1 -0
- package/dist/specification/src/sync/common/decoration/decorators.d.ts +149 -23
- package/dist/specification/src/sync/common/decoration/decorators.d.ts.map +1 -1
- package/dist/specification/src/sync/common/decoration/decorators.js +369 -74
- package/dist/specification/src/sync/common/decoration/decorators.js.map +1 -1
- package/dist/specification/src/sync/common/decoration/index.d.ts +1 -0
- package/dist/specification/src/sync/common/decoration/index.d.ts.map +1 -1
- package/dist/specification/src/sync/common/decoration/index.js +1 -0
- package/dist/specification/src/sync/common/decoration/index.js.map +1 -1
- package/dist/specification/src/sync/common/dist_tag.json +8 -3
- package/dist/specification/src/sync/common/generate/utils.d.ts +2 -1
- package/dist/specification/src/sync/common/generate/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/common/generate/utils.js +5 -1
- package/dist/specification/src/sync/common/generate/utils.js.map +1 -1
- package/dist/specification/src/sync/common/i18n.json +2 -1
- package/dist/specification/src/sync/common/utils.d.ts +22 -6
- package/dist/specification/src/sync/common/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/common/utils.js +122 -18
- package/dist/specification/src/sync/common/utils.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/analyticalListReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/analyticalListReport.js +2 -0
- package/dist/specification/src/sync/v2/generate/analyticalListReport.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 +3 -1
- package/dist/specification/src/sync/v2/generate/listReport.js.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 +2 -0
- package/dist/specification/src/sync/v2/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/overviewPage.d.ts +1 -9
- package/dist/specification/src/sync/v2/generate/overviewPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/overviewPage.js +30 -1
- package/dist/specification/src/sync/v2/generate/overviewPage.js.map +1 -1
- package/dist/specification/src/sync/v2/import/app/appProvider.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/import/app/appProvider.js +2 -0
- package/dist/specification/src/sync/v2/import/app/appProvider.js.map +1 -1
- package/dist/specification/src/sync/v2/import/pages/analyticalListPage.d.ts +2 -1
- package/dist/specification/src/sync/v2/import/pages/analyticalListPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/import/pages/analyticalListPage.js +5 -0
- package/dist/specification/src/sync/v2/import/pages/analyticalListPage.js.map +1 -1
- package/dist/specification/src/sync/v2/import/pages/listReport.d.ts +2 -1
- package/dist/specification/src/sync/v2/import/pages/listReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/import/pages/listReport.js +5 -0
- package/dist/specification/src/sync/v2/import/pages/listReport.js.map +1 -1
- package/dist/specification/src/sync/v2/import/pages/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/import/pages/objectPage.js +2 -1
- package/dist/specification/src/sync/v2/import/pages/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v2/import/utils.d.ts +28 -1
- package/dist/specification/src/sync/v2/import/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/import/utils.js +37 -0
- package/dist/specification/src/sync/v2/import/utils.js.map +1 -1
- package/dist/specification/src/sync/v2/utils.d.ts +12 -2
- package/dist/specification/src/sync/v2/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/utils.js +19 -2
- package/dist/specification/src/sync/v2/utils.js.map +1 -1
- package/dist/specification/src/sync/v4/application.d.ts +20 -2
- package/dist/specification/src/sync/v4/application.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/application.js +27 -2
- package/dist/specification/src/sync/v4/application.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/FilterBar.d.ts +2 -1
- package/dist/specification/src/sync/v4/export/controls/FilterBar.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/FilterBar.js +2 -1
- package/dist/specification/src/sync/v4/export/controls/FilterBar.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/Header.d.ts +4 -3
- package/dist/specification/src/sync/v4/export/controls/Header.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/Header.js +7 -3
- package/dist/specification/src/sync/v4/export/controls/Header.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/HeaderAction.d.ts +2 -1
- package/dist/specification/src/sync/v4/export/controls/HeaderAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/HeaderAction.js +7 -0
- package/dist/specification/src/sync/v4/export/controls/HeaderAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageCustomSection.d.ts +2 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageCustomSection.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageCustomSection.js +2 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageCustomSection.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTable.d.ts +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTable.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTable.js +0 -13
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTable.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/Table.d.ts +24 -15
- package/dist/specification/src/sync/v4/export/controls/Table.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/Table.js +40 -46
- package/dist/specification/src/sync/v4/export/controls/Table.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/TableColumn.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/TableColumn.js +2 -2
- package/dist/specification/src/sync/v4/export/controls/TableColumn.js.map +1 -1
- package/dist/specification/src/sync/v4/export/export.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/export.js +25 -3
- package/dist/specification/src/sync/v4/export/export.js.map +1 -1
- package/dist/specification/src/sync/v4/export/pages/ListReport.js +1 -1
- package/dist/specification/src/sync/v4/export/pages/ListReport.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/actions.d.ts +1 -1
- package/dist/specification/src/sync/v4/generate/actions.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.js +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/generator.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/generator.js +16 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/generator.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/utils.js +10 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/utils.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/index.d.ts +1 -1
- package/dist/specification/src/sync/v4/generate/index.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/index.js +1 -1
- package/dist/specification/src/sync/v4/generate/index.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/list-report/ListReportUtils.d.ts +73 -0
- package/dist/specification/src/sync/v4/generate/list-report/ListReportUtils.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/generate/list-report/ListReportUtils.js +354 -0
- package/dist/specification/src/sync/v4/generate/list-report/ListReportUtils.js.map +1 -0
- package/dist/specification/src/sync/v4/generate/{listReport.d.ts → list-report/listReport.d.ts} +22 -15
- package/dist/specification/src/sync/v4/generate/list-report/listReport.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/generate/{listReport.js → list-report/listReport.js} +112 -68
- package/dist/specification/src/sync/v4/generate/list-report/listReport.js.map +1 -0
- package/dist/specification/src/sync/v4/generate/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/objectPage.js +142 -44
- package/dist/specification/src/sync/v4/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/listReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/listReport.js +2 -1
- package/dist/specification/src/sync/v4/import/pages/listReport.js.map +1 -1
- package/dist/specification/src/sync/v4/import/utils.js +5 -3
- package/dist/specification/src/sync/v4/import/utils.js.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/App.d.ts +9 -7
- package/dist/specification/src/sync/v4/sync-rules/App.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/App.js +4 -8
- package/dist/specification/src/sync/v4/sync-rules/App.js.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.d.ts +2 -9
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.js +2 -11
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.js.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.d.ts +177 -46
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.js +498 -152
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.js.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/Page.d.ts +17 -22
- package/dist/specification/src/sync/v4/sync-rules/Page.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/Page.js +15 -22
- package/dist/specification/src/sync/v4/sync-rules/Page.js.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/controllerExtensions.d.ts +1 -0
- package/dist/specification/src/sync/v4/sync-rules/controllerExtensions.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/controllerExtensions.js +17 -9
- package/dist/specification/src/sync/v4/sync-rules/controllerExtensions.js.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/index.d.ts +5 -0
- package/dist/specification/src/sync/v4/sync-rules/index.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/index.js +21 -0
- package/dist/specification/src/sync/v4/sync-rules/index.js.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/utils.js +4 -0
- package/dist/specification/src/sync/v4/sync-rules/utils.js.map +1 -1
- package/dist/specification/src/sync/v4/utils/index.d.ts +2 -0
- package/dist/specification/src/sync/v4/utils/index.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/utils/index.js +18 -0
- package/dist/specification/src/sync/v4/utils/index.js.map +1 -0
- package/dist/specification/src/sync/v4/utils/utils.d.ts +9 -1
- package/dist/specification/src/sync/v4/utils/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/utils/utils.js +17 -2
- package/dist/specification/src/sync/v4/utils/utils.js.map +1 -1
- package/dist/specification/test/test-projects/v2sttaProdMan2/webapp/manifest.json +550 -0
- package/dist/specification/test/test-projects/v4new/webapp/manifest.json +147 -0
- package/dist/specification/test/test-utils/utils.d.ts +71 -0
- package/dist/specification/test/test-utils/utils.d.ts.map +1 -0
- package/dist/specification/test/test-utils/utils.js +400 -0
- package/dist/specification/test/test-utils/utils.js.map +1 -0
- package/dist/specification/test/unit/decorators/validity-test-utils.d.ts +131 -0
- package/dist/specification/test/unit/decorators/validity-test-utils.d.ts.map +1 -0
- package/dist/specification/test/unit/decorators/validity-test-utils.js +661 -0
- package/dist/specification/test/unit/decorators/validity-test-utils.js.map +1 -0
- package/dist/types/src/apiTypes.d.ts +2 -3
- package/dist/types/src/apiTypes.d.ts.map +1 -1
- package/dist/types/src/apiTypes.js.map +1 -1
- package/dist/types/src/common/types.d.ts +119 -13
- package/dist/types/src/common/types.d.ts.map +1 -1
- package/dist/types/src/common/types.js.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageTable.d.ts +1 -1
- package/dist/types/src/v2/controls/Table.d.ts +1 -1
- package/dist/types/src/v4/controls/ObjectPageTable.d.ts +1 -1
- package/dist/types/src/v4/controls/ObjectPageTable.d.ts.map +1 -1
- package/dist/types/src/v4/controls/Table.d.ts +3 -3
- package/dist/types/src/v4/controls/Table.d.ts.map +1 -1
- package/package.json +14 -12
- package/dist/specification/src/sync/v4/generate/ListReportUtils.d.ts +0 -107
- package/dist/specification/src/sync/v4/generate/ListReportUtils.d.ts.map +0 -1
- package/dist/specification/src/sync/v4/generate/ListReportUtils.js +0 -394
- package/dist/specification/src/sync/v4/generate/ListReportUtils.js.map +0 -1
- package/dist/specification/src/sync/v4/generate/listReport.d.ts.map +0 -1
- package/dist/specification/src/sync/v4/generate/listReport.js.map +0 -1
|
@@ -1,17 +1,44 @@
|
|
|
1
1
|
import type { Definition } from 'typescript-json-schema';
|
|
2
|
+
import type { ExtensionLogger } from '@sap/ux-specification-types';
|
|
3
|
+
import type { App } from './App';
|
|
4
|
+
import type { Page } from './Page';
|
|
5
|
+
import type { AppSchema } from './AppSchema';
|
|
6
|
+
export type GeneralSettings<PageWithConfig extends Page = Page> = {
|
|
7
|
+
appSchema: AppSchema;
|
|
8
|
+
app: App;
|
|
9
|
+
page: PageWithConfig;
|
|
10
|
+
logger?: ExtensionLogger;
|
|
11
|
+
};
|
|
12
|
+
export declare class BaseConstruct {
|
|
13
|
+
protected readonly appSchema: AppSchema;
|
|
14
|
+
protected readonly app: App;
|
|
15
|
+
protected readonly page: Page;
|
|
16
|
+
protected readonly logger?: ExtensionLogger;
|
|
17
|
+
/**
|
|
18
|
+
* Constructor for BaseConstruct.
|
|
19
|
+
*
|
|
20
|
+
* @param settings - General settings including appSchema, app, page, and logger
|
|
21
|
+
*/
|
|
22
|
+
constructor(settings?: GeneralSettings);
|
|
23
|
+
/**
|
|
24
|
+
* Gets the general settings.
|
|
25
|
+
*
|
|
26
|
+
* @returns The general settings object
|
|
27
|
+
*/
|
|
28
|
+
getSettings(): GeneralSettings;
|
|
29
|
+
}
|
|
2
30
|
export interface Base {
|
|
3
31
|
name: string;
|
|
4
32
|
definition: Definition;
|
|
5
33
|
}
|
|
6
|
-
export declare class BaseClass {
|
|
7
|
-
private
|
|
8
|
-
private base;
|
|
34
|
+
export declare class BaseClass extends BaseConstruct {
|
|
35
|
+
private readonly base;
|
|
9
36
|
/**
|
|
10
37
|
* Creates an instance of BaseClass.
|
|
11
38
|
*
|
|
12
|
-
* @param
|
|
39
|
+
* @param settings - General settings including appSchema, app, page, and logger
|
|
13
40
|
*/
|
|
14
|
-
constructor(
|
|
41
|
+
constructor(settings?: GeneralSettings);
|
|
15
42
|
/**
|
|
16
43
|
* Gets the class name.
|
|
17
44
|
*
|
|
@@ -30,18 +57,6 @@ export declare class BaseClass {
|
|
|
30
57
|
* @returns The base definition
|
|
31
58
|
*/
|
|
32
59
|
getBase(): Definition;
|
|
33
|
-
/**
|
|
34
|
-
* Sets the base definition and name.
|
|
35
|
-
*
|
|
36
|
-
* @param base - The base object containing name and definition
|
|
37
|
-
*/
|
|
38
|
-
setBase(base: Base): void;
|
|
39
|
-
/**
|
|
40
|
-
* Gets the definitions from the app schema.
|
|
41
|
-
*
|
|
42
|
-
* @returns The definitions object or undefined
|
|
43
|
-
*/
|
|
44
|
-
getDefinitions(): Definition | undefined;
|
|
45
60
|
/**
|
|
46
61
|
* Creates an annotation path for schema based on entity type, term, and qualifier.
|
|
47
62
|
*
|
|
@@ -54,32 +69,65 @@ export declare class BaseClass {
|
|
|
54
69
|
}
|
|
55
70
|
export declare class Decorator extends BaseClass {
|
|
56
71
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
72
|
+
* Context for decorator condition evaluation.
|
|
73
|
+
* Contains 'config' (auto-injected from page.config) and any custom context sources.
|
|
74
|
+
* Defined as non-enumerable to hide from serialization.
|
|
59
75
|
*/
|
|
60
|
-
private
|
|
76
|
+
private decoratorContext;
|
|
61
77
|
/**
|
|
62
|
-
*
|
|
63
|
-
* This enables nested decorators to access parent properties using the '../' prefix in @dependsOn.
|
|
78
|
+
* Creates an instance of Decorator.
|
|
64
79
|
*
|
|
65
|
-
* @param
|
|
66
|
-
* @returns this (for method chaining)
|
|
80
|
+
* @param settings - General settings including appSchema, app, page, and logger
|
|
67
81
|
*/
|
|
68
|
-
|
|
82
|
+
constructor(settings?: GeneralSettings);
|
|
69
83
|
/**
|
|
70
|
-
*
|
|
84
|
+
* Initializes the decorator by applying all decorators to the schema definition.
|
|
85
|
+
*
|
|
86
|
+
* The decorator context is structured as:
|
|
87
|
+
* - `app`: The App configuration (from `this.app.config`, includes manifest)
|
|
88
|
+
* - `page`: The Page configuration (from `this.page.config`)
|
|
89
|
+
* - `custom`: Custom context provided by the caller.
|
|
90
|
+
*
|
|
91
|
+
* @param customContext - Optional custom context for decorator conditions.
|
|
92
|
+
* Use this for runtime-specific conditions like table state, section state, etc.
|
|
93
|
+
* @param definition - Optional custom definition to apply decorators to.
|
|
94
|
+
* If provided, decorators are applied to this definition instead of the one from appSchema.
|
|
95
|
+
* @example
|
|
96
|
+
* ```typescript
|
|
97
|
+
* // Basic initialization (app and page auto-injected)
|
|
98
|
+
* decorator.init();
|
|
99
|
+
*
|
|
100
|
+
* // With custom context for table-specific conditions
|
|
101
|
+
* decorator.init({
|
|
102
|
+
* table: { type: 'GridTable', views: [] }
|
|
103
|
+
* });
|
|
71
104
|
*
|
|
72
|
-
*
|
|
105
|
+
* // With custom definition (for dynamically created definitions)
|
|
106
|
+
* decorator.init({ table: { type: 'GridTable' } }, customTableDefinition);
|
|
107
|
+
* ```
|
|
73
108
|
*/
|
|
74
|
-
|
|
109
|
+
init(customContext?: Record<string, unknown>, definition?: Definition): void;
|
|
75
110
|
/**
|
|
76
|
-
*
|
|
77
|
-
* Supports simple property names (e.g., 'visualFilters'), nested paths (e.g., 'settings.enabled'),
|
|
78
|
-
* and parent traversal (e.g., '../type' to access parent object's type property).
|
|
111
|
+
* Gets property value from the decorator context using a property path.
|
|
79
112
|
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
113
|
+
* The path must include an explicit source prefix ('app', 'page', or 'custom').
|
|
114
|
+
*
|
|
115
|
+
* @param propertyPath - The property path with explicit source prefix - supports full jsonpath syntax
|
|
82
116
|
* @returns Object containing the final key and its value, or undefined if not found
|
|
117
|
+
* @example
|
|
118
|
+
* ```typescript
|
|
119
|
+
* // With decoratorContext = {
|
|
120
|
+
* // app: { manifest: { 'sap.ui5': { routing: {...} } } },
|
|
121
|
+
* // page: { isALP: true },
|
|
122
|
+
* // custom: { type: 'GridTable', items: [{ name: 'Item1' }, { name: 'Item2' }] }
|
|
123
|
+
* // }
|
|
124
|
+
* getPropertyKeyValue('page.isALP') // { key: 'isALP', value: true }
|
|
125
|
+
* getPropertyKeyValue('custom.items[0]') // { key: '0', value: { name: 'Item1' } }
|
|
126
|
+
* getPropertyKeyValue('custom.items[1].name') // { key: 'name', value: 'Item2' }
|
|
127
|
+
* getPropertyKeyValue('app.manifest["sap.ui5"]') // Access property with dot in name
|
|
128
|
+
* getPropertyKeyValue('$.app.manifest["sap.ui5"].routing') // JSONPath with root reference
|
|
129
|
+
* getPropertyKeyValue('$app["manifest"]["sap.ui5"]') // Alternative JSONPath format
|
|
130
|
+
* ```
|
|
83
131
|
*/
|
|
84
132
|
private getPropertyKeyValue;
|
|
85
133
|
/**
|
|
@@ -89,14 +137,14 @@ export declare class Decorator extends BaseClass {
|
|
|
89
137
|
* @param condition.path - The property path to check
|
|
90
138
|
* @param condition.dependsOn - Optional custom condition function
|
|
91
139
|
* @param condition.expectedValue - Optional expected value for equality check
|
|
92
|
-
* @param
|
|
140
|
+
* @param condition.negate - Optional flag to invert the condition result
|
|
93
141
|
* @returns Object containing whether condition passed and the dependency value
|
|
94
142
|
*/
|
|
95
143
|
private evaluateSingleCondition;
|
|
96
144
|
/**
|
|
97
145
|
* Helper method to add a message to the schema property based on value condition.
|
|
98
146
|
*
|
|
99
|
-
* @param condition - EnumValueCondition object containing condition details
|
|
147
|
+
* @param condition - DecoratorMetadata or EnumValueCondition object containing condition details
|
|
100
148
|
* @param syncRuleProviderInstance - The instance of the sync rule provider
|
|
101
149
|
* @param definition - The schema property definition
|
|
102
150
|
* @param i18nProperties - i18n properties for message translation
|
|
@@ -104,6 +152,13 @@ export declare class Decorator extends BaseClass {
|
|
|
104
152
|
* @param i18nProperties.context - The context for the message
|
|
105
153
|
*/
|
|
106
154
|
private addConditionalMessage;
|
|
155
|
+
/**
|
|
156
|
+
* Resolves PathNode values in message params to their actual values from the decorator context.
|
|
157
|
+
*
|
|
158
|
+
* @param params - The message params potentially containing PathNode values
|
|
159
|
+
* @returns The params with PathNode values resolved to actual values
|
|
160
|
+
*/
|
|
161
|
+
private resolveMessageParams;
|
|
107
162
|
/**
|
|
108
163
|
* Gets the context message from evaluation results.
|
|
109
164
|
*
|
|
@@ -112,12 +167,78 @@ export declare class Decorator extends BaseClass {
|
|
|
112
167
|
*/
|
|
113
168
|
private getContextForMessage;
|
|
114
169
|
/**
|
|
115
|
-
*
|
|
170
|
+
* Evaluates an AND condition item which can be either a single condition or a nested OR group.
|
|
171
|
+
*
|
|
172
|
+
* @param conditionItem - The condition item to evaluate
|
|
173
|
+
* @returns Object containing whether condition passed and evaluation details
|
|
174
|
+
*/
|
|
175
|
+
private evaluateAndConditionItem;
|
|
176
|
+
/**
|
|
177
|
+
* Evaluates OR conditions (at least one condition must match).
|
|
178
|
+
* Supports both single conditions and nested AND groups.
|
|
179
|
+
*
|
|
180
|
+
* @param orConditions - Array of condition items (single conditions or AND groups)
|
|
181
|
+
* @returns Object containing whether any condition passed and evaluation details
|
|
182
|
+
*/
|
|
183
|
+
private evaluateOrConditions;
|
|
184
|
+
/**
|
|
185
|
+
* Evaluates AND conditions (all conditions must match).
|
|
186
|
+
* Supports both single conditions and nested OR groups.
|
|
187
|
+
*
|
|
188
|
+
* @param andConditions - Array of condition items (single conditions or OR groups)
|
|
189
|
+
* @returns Object containing whether all conditions passed and evaluation details
|
|
190
|
+
*/
|
|
191
|
+
private evaluateAndConditions;
|
|
192
|
+
/**
|
|
193
|
+
* Evaluates condition metadata and returns whether the condition is met and the context.
|
|
194
|
+
*
|
|
195
|
+
* @param conditionInfo - The condition metadata
|
|
196
|
+
* @returns Object with passed (boolean) and context (string)
|
|
197
|
+
*/
|
|
198
|
+
private evaluateCondition;
|
|
199
|
+
/**
|
|
200
|
+
* Iterates over schema properties and yields property info for decorator processing.
|
|
201
|
+
* Centralizes the guard clause and property iteration logic.
|
|
202
|
+
*
|
|
203
|
+
* @param schemaDefinition - The schema definition to process
|
|
204
|
+
* @param target - The target object (used for guard clause validation)
|
|
205
|
+
* @yields Property name and definition for each property in the schema
|
|
206
|
+
*/
|
|
207
|
+
private iterateProperties;
|
|
208
|
+
/**
|
|
209
|
+
* Applies the hide decorator to the schema definition.
|
|
210
|
+
* Hides properties when their condition evaluates to true, but only if
|
|
211
|
+
* the message decorator did not add any messages to the property.
|
|
212
|
+
*
|
|
213
|
+
* @param schemaDefinition - The schema definition to apply the decorator to
|
|
214
|
+
* @param syncRuleProviderInstance - The sync rule provider instance
|
|
215
|
+
*/
|
|
216
|
+
private applyHideDecorator;
|
|
217
|
+
/**
|
|
218
|
+
* Applies the message decorator to the schema definition.
|
|
219
|
+
* Shows messages when their condition evaluates to true.
|
|
220
|
+
*
|
|
221
|
+
* @param schemaDefinition - The schema definition to apply the decorator to
|
|
222
|
+
* @param syncRuleProviderInstance - The sync rule provider instance
|
|
223
|
+
*/
|
|
224
|
+
private applyMessageDecorator;
|
|
225
|
+
/**
|
|
226
|
+
* Applies the readonly decorator to the schema definition.
|
|
227
|
+
* Marks properties as readonly when their condition evaluates to true.
|
|
116
228
|
*
|
|
117
229
|
* @param schemaDefinition - The schema definition to apply the decorator to
|
|
118
230
|
* @param syncRuleProviderInstance - The sync rule provider instance
|
|
119
231
|
*/
|
|
120
|
-
private
|
|
232
|
+
private applyReadonlyDecorator;
|
|
233
|
+
/**
|
|
234
|
+
* Applies the enums decorator to the schema definition.
|
|
235
|
+
* Restricts enum values when their condition evaluates to true.
|
|
236
|
+
* If multiple @enums decorators exist on the same property, the first matching condition wins.
|
|
237
|
+
*
|
|
238
|
+
* @param schemaDefinition - The schema definition to apply the decorator to
|
|
239
|
+
* @param syncRuleProviderInstance - The sync rule provider instance
|
|
240
|
+
*/
|
|
241
|
+
private applyEnumsDecorator;
|
|
121
242
|
/**
|
|
122
243
|
* Gets the validity metadata for a property.
|
|
123
244
|
*
|
|
@@ -126,6 +247,23 @@ export declare class Decorator extends BaseClass {
|
|
|
126
247
|
* @returns The validity metadata or undefined
|
|
127
248
|
*/
|
|
128
249
|
private getValidityMetadata;
|
|
250
|
+
/**
|
|
251
|
+
* Resolves an enum array from a property definition.
|
|
252
|
+
* Handles both inline enums and $ref to enum definitions.
|
|
253
|
+
*
|
|
254
|
+
* @param property - The property definition
|
|
255
|
+
* @returns The enum array or undefined if not found
|
|
256
|
+
*/
|
|
257
|
+
private resolveEnumFromProperty;
|
|
258
|
+
/**
|
|
259
|
+
* Applies filtered enum values to a property.
|
|
260
|
+
* For $ref properties, inlines the filtered enum, copies the type from the referenced definition, and removes the $ref.
|
|
261
|
+
* For inline enum properties, updates the enum directly.
|
|
262
|
+
*
|
|
263
|
+
* @param property - The property definition to update
|
|
264
|
+
* @param filteredEnum - The filtered enum values
|
|
265
|
+
*/
|
|
266
|
+
private applyFilteredEnumToProperty;
|
|
129
267
|
/**
|
|
130
268
|
* Applies the validity decorator to the schema definition based on the sync rule provider instance and minimum UI5 version.
|
|
131
269
|
*
|
|
@@ -150,22 +288,15 @@ export declare class Decorator extends BaseClass {
|
|
|
150
288
|
* @param propertyName - The property name (optional)
|
|
151
289
|
*/
|
|
152
290
|
private applyDescriptionDecorator;
|
|
153
|
-
/**
|
|
154
|
-
* Applies the hidden decorator to the schema definition.
|
|
155
|
-
*
|
|
156
|
-
* @param schemaDefinition - The schema definition to apply the decorator to
|
|
157
|
-
* @param target - The target object or function
|
|
158
|
-
* @param propertyName - The property name (optional)
|
|
159
|
-
*/
|
|
160
|
-
private applyHiddenDecorator;
|
|
161
291
|
/**
|
|
162
292
|
* Applies all decorators to the schema definition.
|
|
163
293
|
*
|
|
164
294
|
* @param minUi5Version - The minimum UI5 version (optional)
|
|
165
295
|
* @param propertyName - The property name (optional)
|
|
296
|
+
* @param customDefinition - Optional custom definition to apply decorators to (overrides getBase())
|
|
166
297
|
* @returns Object containing the definition
|
|
167
298
|
*/
|
|
168
|
-
applyDecorators(minUi5Version?: string, propertyName?: string): {
|
|
299
|
+
applyDecorators(minUi5Version?: string, propertyName?: string, customDefinition?: Definition): {
|
|
169
300
|
definition: Definition;
|
|
170
301
|
};
|
|
171
302
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DecoratorClass.d.ts","sourceRoot":"","sources":["../../../../../../src/sync/v4/sync-rules/DecoratorClass.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"DecoratorClass.d.ts","sourceRoot":"","sources":["../../../../../../src/sync/v4/sync-rules/DecoratorClass.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAGR,eAAe,EAKlB,MAAM,6BAA6B,CAAC;AAmBrC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,SAA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