@sap/ux-specification 1.136.13 → 1.136.15
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 +73 -1
- 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 +260 -261
- package/dist/index-min.js.map +4 -4
- package/dist/schemas/v2/ApplicationV2.json +28 -3
- package/dist/schemas/v2/ListReportNewConfig.json +45 -0
- package/dist/schemas/v2/ObjectPageConfig.json +11 -5
- package/dist/schemas/v4/ApplicationV4.json +18 -12
- package/dist/schemas/v4/BuildingBlocksConfig.json +72 -35
- package/dist/schemas/v4/ListReportConfig.json +299 -28
- package/dist/schemas/v4/ObjectPageConfig.json +409 -130
- package/dist/specification/package.json +17 -17
- package/dist/specification/scripts/macros/corrections.d.ts.map +1 -1
- package/dist/specification/scripts/macros/corrections.js +17 -1
- package/dist/specification/scripts/macros/corrections.js.map +1 -1
- package/dist/specification/scripts/macros/schema.d.ts.map +1 -1
- package/dist/specification/scripts/macros/schema.js +10 -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 +23 -13
- package/dist/specification/scripts/schema/to-json-schema.js.map +1 -1
- package/dist/specification/src/api.d.ts.map +1 -1
- package/dist/specification/src/api.js +2 -1
- package/dist/specification/src/api.js.map +1 -1
- package/dist/specification/src/sync/common/DataFieldStrategy.d.ts +38 -8
- package/dist/specification/src/sync/common/DataFieldStrategy.d.ts.map +1 -1
- package/dist/specification/src/sync/common/DataFieldStrategy.js +64 -11
- package/dist/specification/src/sync/common/DataFieldStrategy.js.map +1 -1
- package/dist/specification/src/sync/common/ManifestDrivenSchemaProcessor.d.ts +0 -4
- package/dist/specification/src/sync/common/ManifestDrivenSchemaProcessor.d.ts.map +1 -1
- package/dist/specification/src/sync/common/ManifestDrivenSchemaProcessor.js +0 -3
- package/dist/specification/src/sync/common/ManifestDrivenSchemaProcessor.js.map +1 -1
- package/dist/specification/src/sync/common/appProvider.d.ts +0 -1
- package/dist/specification/src/sync/common/appProvider.d.ts.map +1 -1
- package/dist/specification/src/sync/common/appProvider.js +0 -1
- package/dist/specification/src/sync/common/appProvider.js.map +1 -1
- package/dist/specification/src/sync/common/decoration/decorators.d.ts +65 -4
- package/dist/specification/src/sync/common/decoration/decorators.d.ts.map +1 -1
- package/dist/specification/src/sync/common/decoration/decorators.js +138 -8
- package/dist/specification/src/sync/common/decoration/decorators.js.map +1 -1
- package/dist/specification/src/sync/common/distTagEvaluator.d.ts +10 -3
- package/dist/specification/src/sync/common/distTagEvaluator.d.ts.map +1 -1
- package/dist/specification/src/sync/common/distTagEvaluator.js +14 -4
- package/dist/specification/src/sync/common/distTagEvaluator.js.map +1 -1
- package/dist/specification/src/sync/common/generate/objectPage.d.ts +0 -1
- package/dist/specification/src/sync/common/generate/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/common/generate/objectPage.js +0 -3
- package/dist/specification/src/sync/common/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/common/generate/utils.d.ts +12 -6
- package/dist/specification/src/sync/common/generate/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/common/generate/utils.js +33 -22
- package/dist/specification/src/sync/common/generate/utils.js.map +1 -1
- package/dist/specification/src/sync/common/i18n.json +6 -4
- package/dist/specification/src/sync/common/import/utils.d.ts +0 -1
- package/dist/specification/src/sync/common/import/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/common/import/utils.js +0 -1
- package/dist/specification/src/sync/common/import/utils.js.map +1 -1
- package/dist/specification/src/sync/common/rules.d.ts.map +1 -1
- package/dist/specification/src/sync/common/rules.js +18 -13
- package/dist/specification/src/sync/common/rules.js.map +1 -1
- package/dist/specification/src/sync/common/utils.d.ts +52 -2
- package/dist/specification/src/sync/common/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/common/utils.js +176 -5
- 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 +8 -15
- 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/analyticalListReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/analyticalListReport.js +46 -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 +46 -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 +63 -13
- package/dist/specification/src/sync/v2/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.js +28 -1
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.js.map +1 -1
- 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 +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.js +4 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.d.ts +1 -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 +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.js.map +1 -1
- package/dist/specification/src/sync/v2/import/importPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/import/importPage.js +5 -6
- package/dist/specification/src/sync/v2/import/importPage.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 +4 -0
- package/dist/specification/src/sync/v2/import/pages/overviewPage.js.map +1 -1
- package/dist/specification/src/sync/v2/utils.d.ts +17 -1
- package/dist/specification/src/sync/v2/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/utils.js +57 -0
- package/dist/specification/src/sync/v2/utils.js.map +1 -1
- package/dist/specification/src/sync/v4/application.d.ts +1 -1
- package/dist/specification/src/sync/v4/application.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/application.js +1 -1
- package/dist/specification/src/sync/v4/application.js.map +1 -1
- package/dist/specification/src/sync/v4/export/actions.d.ts +39 -0
- package/dist/specification/src/sync/v4/export/actions.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/export/actions.js +99 -0
- package/dist/specification/src/sync/v4/export/actions.js.map +1 -0
- package/dist/specification/src/sync/v4/export/controls/Header.d.ts +3 -2
- package/dist/specification/src/sync/v4/export/controls/Header.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/Header.js +14 -2
- 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 -2
- package/dist/specification/src/sync/v4/export/controls/HeaderAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageForm.d.ts +2 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageForm.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageForm.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageFormAction.d.ts +2 -4
- package/dist/specification/src/sync/v4/export/controls/ObjectPageFormAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageFormAction.js +2 -21
- package/dist/specification/src/sync/v4/export/controls/ObjectPageFormAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeader.d.ts +2 -2
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeader.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeader.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeaderAction.d.ts +14 -3
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeaderAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeaderAction.js +52 -9
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeaderAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTableColumn.d.ts +4 -0
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTableColumn.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTableColumn.js +30 -0
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTableColumn.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageToolBarAction.d.ts +15 -3
- package/dist/specification/src/sync/v4/export/controls/ObjectPageToolBarAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageToolBarAction.js +53 -10
- package/dist/specification/src/sync/v4/export/controls/ObjectPageToolBarAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/Table.d.ts +0 -3
- package/dist/specification/src/sync/v4/export/controls/Table.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/Table.js +0 -3
- package/dist/specification/src/sync/v4/export/controls/Table.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/TableColumn.d.ts +7 -0
- package/dist/specification/src/sync/v4/export/controls/TableColumn.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/TableColumn.js +60 -0
- package/dist/specification/src/sync/v4/export/controls/TableColumn.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBar.d.ts +9 -2
- package/dist/specification/src/sync/v4/export/controls/ToolBar.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBar.js +39 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBar.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.d.ts +17 -4
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.js +76 -19
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/export.d.ts +7 -0
- package/dist/specification/src/sync/v4/export/export.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/export.js +100 -11
- package/dist/specification/src/sync/v4/export/export.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/export/types.d.ts +2 -0
- package/dist/specification/src/sync/v4/export/types.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/ListReportUtils.d.ts +107 -0
- package/dist/specification/src/sync/v4/generate/ListReportUtils.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/generate/ListReportUtils.js +394 -0
- package/dist/specification/src/sync/v4/generate/ListReportUtils.js.map +1 -0
- package/dist/specification/src/sync/v4/generate/actions.d.ts +35 -0
- package/dist/specification/src/sync/v4/generate/actions.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/generate/actions.js +112 -0
- package/dist/specification/src/sync/v4/generate/actions.js.map +1 -0
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.d.ts +3 -3
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.js +10 -2
- 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/extensions.d.ts +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/extensions.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/extensions.js +3 -2
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/extensions.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 +9 -2
- 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.js +2 -2
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/utils.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/listReport.d.ts +129 -4
- package/dist/specification/src/sync/v4/generate/listReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/listReport.js +196 -353
- package/dist/specification/src/sync/v4/generate/listReport.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/objectPage.d.ts +0 -1
- package/dist/specification/src/sync/v4/generate/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/objectPage.js +15 -21
- package/dist/specification/src/sync/v4/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/objectPage.js +16 -3
- package/dist/specification/src/sync/v4/import/pages/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v4/import/utils.d.ts +0 -1
- package/dist/specification/src/sync/v4/import/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/import/utils.js +0 -1
- package/dist/specification/src/sync/v4/import/utils.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 +105 -49
- package/dist/specification/src/sync/v4/utils/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/utils/utils.js +363 -97
- package/dist/specification/src/sync/v4/utils/utils.js.map +1 -1
- package/dist/types/src/apiTypes.d.ts +3 -2
- package/dist/types/src/apiTypes.d.ts.map +1 -1
- package/dist/types/src/apiTypes.js +1 -0
- package/dist/types/src/apiTypes.js.map +1 -1
- package/dist/types/src/common/types.d.ts +152 -3
- package/dist/types/src/common/types.d.ts.map +1 -1
- package/dist/types/src/common/types.js +47 -2
- 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/ObjectPageHeaderSection.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageTable.d.ts +4 -4
- package/dist/types/src/v2/controls/ObjectPageTable.d.ts.map +1 -1
- package/dist/types/src/v2/controls/Table.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/v4/application.d.ts +6 -6
- package/dist/types/src/v4/controls/CustomAction.d.ts +133 -19
- package/dist/types/src/v4/controls/CustomAction.d.ts.map +1 -1
- package/dist/types/src/v4/controls/CustomAction.js.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageForm.d.ts +2 -2
- package/dist/types/src/v4/controls/ObjectPageForm.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageHeader.d.ts +22 -3
- package/dist/types/src/v4/controls/ObjectPageHeader.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageHeaderSection.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageSection.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageToolBar.d.ts +2 -2
- package/dist/types/src/v4/controls/ObjectPageToolBar.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ToolBar.d.ts +3 -3
- package/dist/types/src/v4/controls/ToolBar.d.ts.map +1 -1
- package/dist/types/src/v4/webapp/manifest/ManifestSettings.d.ts +59 -0
- package/dist/types/src/v4/webapp/manifest/ManifestSettings.d.ts.map +1 -1
- package/dist/types/src/v4/webapp/manifest/ManifestSettings.js.map +1 -1
- package/package.json +17 -17
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import type { Definition } from 'typescript-json-schema';
|
|
2
|
+
export interface Base {
|
|
3
|
+
name: string;
|
|
4
|
+
definition: Definition;
|
|
5
|
+
}
|
|
6
|
+
export declare class BaseClass {
|
|
7
|
+
private appSchema;
|
|
8
|
+
private base;
|
|
9
|
+
/**
|
|
10
|
+
* Creates an instance of BaseClass.
|
|
11
|
+
*
|
|
12
|
+
* @param appSchema - The application schema definition
|
|
13
|
+
*/
|
|
14
|
+
constructor(appSchema?: Definition);
|
|
15
|
+
/**
|
|
16
|
+
* Gets the class name.
|
|
17
|
+
*
|
|
18
|
+
* @returns The name of the class
|
|
19
|
+
*/
|
|
20
|
+
getClassName(): string;
|
|
21
|
+
/**
|
|
22
|
+
* Gets the base name.
|
|
23
|
+
*
|
|
24
|
+
* @returns The base name
|
|
25
|
+
*/
|
|
26
|
+
getBaseName(): string;
|
|
27
|
+
/**
|
|
28
|
+
* Gets the base definition.
|
|
29
|
+
*
|
|
30
|
+
* @returns The base definition
|
|
31
|
+
*/
|
|
32
|
+
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
|
+
/**
|
|
46
|
+
* Creates an annotation path for schema based on entity type, term, and qualifier.
|
|
47
|
+
*
|
|
48
|
+
* @param entityTypeName - Entity type name.
|
|
49
|
+
* @param term - Annotation term.
|
|
50
|
+
* @param qualifier - Annotation qualifier (optional).
|
|
51
|
+
* @returns Annotation path based on received params
|
|
52
|
+
*/
|
|
53
|
+
createAnnotationPath(entityTypeName: string, term: string, qualifier?: string): string | undefined;
|
|
54
|
+
}
|
|
55
|
+
export declare class Decorator extends BaseClass {
|
|
56
|
+
/**
|
|
57
|
+
* Reference to the parent decorator instance.
|
|
58
|
+
* Used by @dependsOn decorator to support parent property access via '../' syntax.
|
|
59
|
+
*/
|
|
60
|
+
private __parent__?;
|
|
61
|
+
/**
|
|
62
|
+
* Sets the parent decorator instance for this object.
|
|
63
|
+
* This enables nested decorators to access parent properties using the '../' prefix in @dependsOn.
|
|
64
|
+
*
|
|
65
|
+
* @param parent - The parent Decorator instance
|
|
66
|
+
* @returns this (for method chaining)
|
|
67
|
+
*/
|
|
68
|
+
setParent(parent: Decorator): this;
|
|
69
|
+
/**
|
|
70
|
+
* Gets the parent decorator instance if it exists.
|
|
71
|
+
*
|
|
72
|
+
* @returns The parent Decorator instance or undefined
|
|
73
|
+
*/
|
|
74
|
+
getParent(): Decorator | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* Helper method to get property value from an object using a property path.
|
|
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).
|
|
79
|
+
*
|
|
80
|
+
* @param syncInstance - The object instance to retrieve the property value from
|
|
81
|
+
* @param propertyPath - The property path (e.g., 'visualFilters', 'settings.enabled', or '../type')
|
|
82
|
+
* @returns Object containing the final key and its value, or undefined if not found
|
|
83
|
+
*/
|
|
84
|
+
private getPropertyKeyValue;
|
|
85
|
+
/**
|
|
86
|
+
* Evaluates a single dependency condition.
|
|
87
|
+
*
|
|
88
|
+
* @param condition - The single condition to evaluate
|
|
89
|
+
* @param condition.path - The property path to check
|
|
90
|
+
* @param condition.dependsOn - Optional custom condition function
|
|
91
|
+
* @param condition.expectedValue - Optional expected value for equality check
|
|
92
|
+
* @param syncRuleProviderInstance - The sync rule provider instance
|
|
93
|
+
* @returns Object containing whether condition passed and the dependency value
|
|
94
|
+
*/
|
|
95
|
+
private evaluateSingleCondition;
|
|
96
|
+
/**
|
|
97
|
+
* Helper method to add a message to the schema property based on value condition.
|
|
98
|
+
*
|
|
99
|
+
* @param condition - EnumValueCondition object containing condition details
|
|
100
|
+
* @param syncRuleProviderInstance - The instance of the sync rule provider
|
|
101
|
+
* @param definition - The schema property definition
|
|
102
|
+
* @param i18nProperties - i18n properties for message translation
|
|
103
|
+
* @param i18nProperties.propertyName - The property name for the message
|
|
104
|
+
* @param i18nProperties.context - The context for the message
|
|
105
|
+
*/
|
|
106
|
+
private addConditionalMessage;
|
|
107
|
+
/**
|
|
108
|
+
* Gets the context message from evaluation results.
|
|
109
|
+
*
|
|
110
|
+
* @param results - The evaluation results
|
|
111
|
+
* @returns The context message string
|
|
112
|
+
*/
|
|
113
|
+
private getContextForMessage;
|
|
114
|
+
/**
|
|
115
|
+
* Applies the dependsOn decorator to the schema definition.
|
|
116
|
+
*
|
|
117
|
+
* @param schemaDefinition - The schema definition to apply the decorator to
|
|
118
|
+
* @param syncRuleProviderInstance - The sync rule provider instance
|
|
119
|
+
*/
|
|
120
|
+
private applyDependsOnDecorator;
|
|
121
|
+
/**
|
|
122
|
+
* Gets the validity metadata for a property.
|
|
123
|
+
*
|
|
124
|
+
* @param target - The target object
|
|
125
|
+
* @param propertyName - The property name
|
|
126
|
+
* @returns The validity metadata or undefined
|
|
127
|
+
*/
|
|
128
|
+
private getValidityMetadata;
|
|
129
|
+
/**
|
|
130
|
+
* Applies the validity decorator to the schema definition based on the sync rule provider instance and minimum UI5 version.
|
|
131
|
+
*
|
|
132
|
+
* @param schemaDefinition The schema definition to apply the validity decorator to
|
|
133
|
+
* @param syncRuleProviderInstance The instance of the sync rule provider
|
|
134
|
+
* @param minUI5Version The minimum UI5 version to consider for validity checks
|
|
135
|
+
*/
|
|
136
|
+
private applyValidityDecorator;
|
|
137
|
+
/**
|
|
138
|
+
* Applies the isViewNode decorator to the schema definition based on the target and property name.
|
|
139
|
+
*
|
|
140
|
+
* @param schemaDefinition The schema definition to apply the isViewNode decorator to
|
|
141
|
+
* @param target The target object or function
|
|
142
|
+
* @param propertyName The property name (optional)
|
|
143
|
+
*/
|
|
144
|
+
private applyIsViewNodeDecorator;
|
|
145
|
+
/**
|
|
146
|
+
* Applies the description decorator to the schema definition.
|
|
147
|
+
*
|
|
148
|
+
* @param schemaDefinition - The schema definition to apply the decorator to
|
|
149
|
+
* @param target - The target object or function
|
|
150
|
+
* @param propertyName - The property name (optional)
|
|
151
|
+
*/
|
|
152
|
+
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
|
+
/**
|
|
162
|
+
* Applies all decorators to the schema definition.
|
|
163
|
+
*
|
|
164
|
+
* @param minUi5Version - The minimum UI5 version (optional)
|
|
165
|
+
* @param propertyName - The property name (optional)
|
|
166
|
+
* @returns Object containing the definition
|
|
167
|
+
*/
|
|
168
|
+
applyDecorators(minUi5Version?: string, propertyName?: string): {
|
|
169
|
+
definition: Definition;
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
//# sourceMappingURL=DecoratorClass.d.ts.map
|
|
@@ -0,0 +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;AAgCzD,MAAM,WAAW,IAAI;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,UAAU,CAAC;CAC1B;AAQD,qBAAa,SAAS;IAClB,OAAO,CAAC,SAAS,CAAa;IAC9B,OAAO,CAAC,IAAI,CAAO;IAEnB;;;;OAIG;gBACS,SAAS,CAAC,EAAE,UAAU;IAqBlC;;;;OAIG;IACH,YAAY,IAAI,MAAM;IAItB;;;;OAIG;IACH,WAAW,IAAI,MAAM;IAIrB;;;;OAIG;IACH,OAAO,IAAI,UAAU;IAIrB;;;;OAIG;IACH,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI;IAIzB;;;;OAIG;IACH,cAAc,IAAI,UAAU,GAAG,SAAS;IAIxC;;;;;;;OAOG;IACH,oBAAoB,CAAC,cAAc,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;CAWrG;AAED,qBAAa,SAAU,SAAQ,SAAS;IACpC;;;OAGG;IACH,OAAO,CAAC,UAAU,CAAC,CAAY;IAE/B;;;;;;OAMG;IACH,SAAS,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI;IAKlC;;;;OAIG;IACH,SAAS,IAAI,SAAS,GAAG,SAAS;IAIlC;;;;;;;;OAQG;IACH,OAAO,CAAC,mBAAmB;IA4B3B;;;;;;;;;OASG;IACH,OAAO,CAAC,uBAAuB;IAsB/B;;;;;;;;;OASG;IACH,OAAO,CAAC,qBAAqB;IAa7B;;;;;OAKG;IACH,OAAO,CAAC,oBAAoB;IAO5B;;;;;OAKG;IACH,OAAO,CAAC,uBAAuB;IA6C/B;;;;;;OAMG;IACH,OAAO,CAAC,mBAAmB;IAQ3B;;;;;;OAMG;IACH,OAAO,CAAC,sBAAsB;IA2D9B;;;;;;OAMG;IACH,OAAO,CAAC,wBAAwB;IAYhC;;;;;;OAMG;IACH,OAAO,CAAC,yBAAyB;IAWjC;;;;;;OAMG;IACH,OAAO,CAAC,oBAAoB;IAkB5B;;;;;;OAMG;IACH,eAAe,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG;QAAE,UAAU,EAAE,UAAU,CAAA;KAAE;CAwB7F"}
|
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Decorator = exports.BaseClass = void 0;
|
|
7
|
+
const ux_specification_types_1 = require("@sap/ux-specification-types");
|
|
8
|
+
const decoration_1 = require("../../common/decoration");
|
|
9
|
+
const i18next_1 = __importDefault(require("i18next"));
|
|
10
|
+
const utils_1 = require("./utils");
|
|
11
|
+
/**
|
|
12
|
+
* Adds a message to a schema element.
|
|
13
|
+
* Inlined to avoid circular dependency issues.
|
|
14
|
+
*
|
|
15
|
+
* @param element - The schema element to add the message to
|
|
16
|
+
* @param message - The message parameters
|
|
17
|
+
* @param message.text - The message text
|
|
18
|
+
* @param message.deletable - Whether the message is deletable (default: false)
|
|
19
|
+
*/
|
|
20
|
+
function addMessageToSchema(element, { text, deletable = false }) {
|
|
21
|
+
if (!element[ux_specification_types_1.SchemaTag.messages]) {
|
|
22
|
+
element[ux_specification_types_1.SchemaTag.messages] = [];
|
|
23
|
+
}
|
|
24
|
+
element[ux_specification_types_1.SchemaTag.messages].push({ text, deletable });
|
|
25
|
+
}
|
|
26
|
+
class BaseClass {
|
|
27
|
+
/**
|
|
28
|
+
* Creates an instance of BaseClass.
|
|
29
|
+
*
|
|
30
|
+
* @param appSchema - The application schema definition
|
|
31
|
+
*/
|
|
32
|
+
constructor(appSchema) {
|
|
33
|
+
// Define appSchema as non-enumerable to hide it from serialization and Object.keys()
|
|
34
|
+
Object.defineProperty(this, 'appSchema', {
|
|
35
|
+
value: appSchema,
|
|
36
|
+
writable: true,
|
|
37
|
+
enumerable: false,
|
|
38
|
+
configurable: true
|
|
39
|
+
});
|
|
40
|
+
const name = this.getClassName();
|
|
41
|
+
const definitions = appSchema?.definitions;
|
|
42
|
+
// Define base as non-enumerable to hide it from serialization and Object.keys()
|
|
43
|
+
Object.defineProperty(this, 'base', {
|
|
44
|
+
value: { name, definition: definitions?.[name] },
|
|
45
|
+
writable: true,
|
|
46
|
+
enumerable: false,
|
|
47
|
+
configurable: true
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Gets the class name.
|
|
52
|
+
*
|
|
53
|
+
* @returns The name of the class
|
|
54
|
+
*/
|
|
55
|
+
getClassName() {
|
|
56
|
+
return this.constructor.name;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Gets the base name.
|
|
60
|
+
*
|
|
61
|
+
* @returns The base name
|
|
62
|
+
*/
|
|
63
|
+
getBaseName() {
|
|
64
|
+
return this.base.name;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Gets the base definition.
|
|
68
|
+
*
|
|
69
|
+
* @returns The base definition
|
|
70
|
+
*/
|
|
71
|
+
getBase() {
|
|
72
|
+
return this.base.definition;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Sets the base definition and name.
|
|
76
|
+
*
|
|
77
|
+
* @param base - The base object containing name and definition
|
|
78
|
+
*/
|
|
79
|
+
setBase(base) {
|
|
80
|
+
this.base = base;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Gets the definitions from the app schema.
|
|
84
|
+
*
|
|
85
|
+
* @returns The definitions object or undefined
|
|
86
|
+
*/
|
|
87
|
+
getDefinitions() {
|
|
88
|
+
return this.appSchema?.definitions;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Creates an annotation path for schema based on entity type, term, and qualifier.
|
|
92
|
+
*
|
|
93
|
+
* @param entityTypeName - Entity type name.
|
|
94
|
+
* @param term - Annotation term.
|
|
95
|
+
* @param qualifier - Annotation qualifier (optional).
|
|
96
|
+
* @returns Annotation path based on received params
|
|
97
|
+
*/
|
|
98
|
+
createAnnotationPath(entityTypeName, term, qualifier) {
|
|
99
|
+
if (!entityTypeName) {
|
|
100
|
+
return undefined;
|
|
101
|
+
}
|
|
102
|
+
let annotationPath = `/${entityTypeName}/@${term}`;
|
|
103
|
+
if (qualifier) {
|
|
104
|
+
annotationPath += `#${qualifier}`;
|
|
105
|
+
}
|
|
106
|
+
this.getBase()[ux_specification_types_1.SchemaTag.annotationPath] = annotationPath;
|
|
107
|
+
return annotationPath;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
exports.BaseClass = BaseClass;
|
|
111
|
+
class Decorator extends BaseClass {
|
|
112
|
+
/**
|
|
113
|
+
* Sets the parent decorator instance for this object.
|
|
114
|
+
* This enables nested decorators to access parent properties using the '../' prefix in @dependsOn.
|
|
115
|
+
*
|
|
116
|
+
* @param parent - The parent Decorator instance
|
|
117
|
+
* @returns this (for method chaining)
|
|
118
|
+
*/
|
|
119
|
+
setParent(parent) {
|
|
120
|
+
this.__parent__ = parent;
|
|
121
|
+
return this;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Gets the parent decorator instance if it exists.
|
|
125
|
+
*
|
|
126
|
+
* @returns The parent Decorator instance or undefined
|
|
127
|
+
*/
|
|
128
|
+
getParent() {
|
|
129
|
+
return this.__parent__;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Helper method to get property value from an object using a property path.
|
|
133
|
+
* Supports simple property names (e.g., 'visualFilters'), nested paths (e.g., 'settings.enabled'),
|
|
134
|
+
* and parent traversal (e.g., '../type' to access parent object's type property).
|
|
135
|
+
*
|
|
136
|
+
* @param syncInstance - The object instance to retrieve the property value from
|
|
137
|
+
* @param propertyPath - The property path (e.g., 'visualFilters', 'settings.enabled', or '../type')
|
|
138
|
+
* @returns Object containing the final key and its value, or undefined if not found
|
|
139
|
+
*/
|
|
140
|
+
getPropertyKeyValue(syncInstance, propertyPath) {
|
|
141
|
+
if (!syncInstance || !propertyPath) {
|
|
142
|
+
return undefined;
|
|
143
|
+
}
|
|
144
|
+
// Handle parent traversal (../)
|
|
145
|
+
if (propertyPath.startsWith('../')) {
|
|
146
|
+
const parent = this.getParent();
|
|
147
|
+
if (!parent) {
|
|
148
|
+
return undefined;
|
|
149
|
+
}
|
|
150
|
+
// Remove '../' and get the property from parent
|
|
151
|
+
const parentPath = propertyPath.substring(3);
|
|
152
|
+
return this.getPropertyKeyValue(parent, parentPath);
|
|
153
|
+
}
|
|
154
|
+
const keys = propertyPath.split('.');
|
|
155
|
+
let value = syncInstance;
|
|
156
|
+
for (const key of keys) {
|
|
157
|
+
if (value === null || value === undefined) {
|
|
158
|
+
return undefined;
|
|
159
|
+
}
|
|
160
|
+
value = value[key];
|
|
161
|
+
}
|
|
162
|
+
const key = keys[keys.length - 1];
|
|
163
|
+
return { key, value };
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Evaluates a single dependency condition.
|
|
167
|
+
*
|
|
168
|
+
* @param condition - The single condition to evaluate
|
|
169
|
+
* @param condition.path - The property path to check
|
|
170
|
+
* @param condition.dependsOn - Optional custom condition function
|
|
171
|
+
* @param condition.expectedValue - Optional expected value for equality check
|
|
172
|
+
* @param syncRuleProviderInstance - The sync rule provider instance
|
|
173
|
+
* @returns Object containing whether condition passed and the dependency value
|
|
174
|
+
*/
|
|
175
|
+
evaluateSingleCondition(condition, syncRuleProviderInstance) {
|
|
176
|
+
const { key, value } = this.getPropertyKeyValue(syncRuleProviderInstance, condition.path);
|
|
177
|
+
let passed = false;
|
|
178
|
+
if (condition.dependsOn) {
|
|
179
|
+
// Use custom condition function
|
|
180
|
+
passed = condition.dependsOn(value);
|
|
181
|
+
}
|
|
182
|
+
else if (condition.expectedValue !== undefined) {
|
|
183
|
+
// Use simple equality check
|
|
184
|
+
passed = value === condition.expectedValue;
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
// Default: truthy check
|
|
188
|
+
passed = !!value;
|
|
189
|
+
}
|
|
190
|
+
return { passed, value, key };
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Helper method to add a message to the schema property based on value condition.
|
|
194
|
+
*
|
|
195
|
+
* @param condition - EnumValueCondition object containing condition details
|
|
196
|
+
* @param syncRuleProviderInstance - The instance of the sync rule provider
|
|
197
|
+
* @param definition - The schema property definition
|
|
198
|
+
* @param i18nProperties - i18n properties for message translation
|
|
199
|
+
* @param i18nProperties.propertyName - The property name for the message
|
|
200
|
+
* @param i18nProperties.context - The context for the message
|
|
201
|
+
*/
|
|
202
|
+
addConditionalMessage(condition, syncRuleProviderInstance, definition, i18nProperties) {
|
|
203
|
+
const messageText = typeof condition.message.text === 'function'
|
|
204
|
+
? condition.message.text(syncRuleProviderInstance)
|
|
205
|
+
: i18next_1.default.t('PROPERTY_NOT_ALLOWED', { ...i18nProperties });
|
|
206
|
+
addMessageToSchema(definition, { text: messageText, deletable: condition.message.deletable });
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Gets the context message from evaluation results.
|
|
210
|
+
*
|
|
211
|
+
* @param results - The evaluation results
|
|
212
|
+
* @returns The context message string
|
|
213
|
+
*/
|
|
214
|
+
getContextForMessage(results) {
|
|
215
|
+
return results
|
|
216
|
+
.filter((result) => !result.passed)
|
|
217
|
+
.map((result) => `${result.key}: ${result.value}`)
|
|
218
|
+
.join(', ');
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Applies the dependsOn decorator to the schema definition.
|
|
222
|
+
*
|
|
223
|
+
* @param schemaDefinition - The schema definition to apply the decorator to
|
|
224
|
+
* @param syncRuleProviderInstance - The sync rule provider instance
|
|
225
|
+
*/
|
|
226
|
+
applyDependsOnDecorator(schemaDefinition, syncRuleProviderInstance) {
|
|
227
|
+
if (!schemaDefinition?.properties || !syncRuleProviderInstance) {
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
for (const propertyName in schemaDefinition.properties) {
|
|
231
|
+
const property = schemaDefinition.properties[propertyName];
|
|
232
|
+
const dependsOnInfo = (0, decoration_1.getDependsOnMetadata)(syncRuleProviderInstance, propertyName);
|
|
233
|
+
if (dependsOnInfo) {
|
|
234
|
+
let shouldHide = false;
|
|
235
|
+
let context = '';
|
|
236
|
+
// Check if this is multi-condition or single condition
|
|
237
|
+
if (dependsOnInfo.conditions && Array.isArray(dependsOnInfo.conditions)) {
|
|
238
|
+
// Multi-condition: ALL must be met (AND logic)
|
|
239
|
+
const results = dependsOnInfo.conditions.map((condition) => this.evaluateSingleCondition(condition, syncRuleProviderInstance));
|
|
240
|
+
// All conditions must pass
|
|
241
|
+
shouldHide = !results.every((result) => result.passed);
|
|
242
|
+
context = this.getContextForMessage(results);
|
|
243
|
+
}
|
|
244
|
+
else {
|
|
245
|
+
const result = this.evaluateSingleCondition(dependsOnInfo, syncRuleProviderInstance);
|
|
246
|
+
context = this.getContextForMessage([result]);
|
|
247
|
+
shouldHide = !result.passed;
|
|
248
|
+
}
|
|
249
|
+
if (shouldHide) {
|
|
250
|
+
if (dependsOnInfo.message) {
|
|
251
|
+
this.addConditionalMessage(dependsOnInfo, syncRuleProviderInstance, property, {
|
|
252
|
+
propertyName,
|
|
253
|
+
context
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
// Alternative to hide: delete schemaDefinition.properties[propertyName];
|
|
257
|
+
property[ux_specification_types_1.SchemaTag.hidden] = true;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Gets the validity metadata for a property.
|
|
264
|
+
*
|
|
265
|
+
* @param target - The target object
|
|
266
|
+
* @param propertyName - The property name
|
|
267
|
+
* @returns The validity metadata or undefined
|
|
268
|
+
*/
|
|
269
|
+
getValidityMetadata(target, propertyName) {
|
|
270
|
+
let validityInfo;
|
|
271
|
+
if (target) {
|
|
272
|
+
validityInfo = Reflect.getMetadata(decoration_1.metadataKeys.validity, target, propertyName);
|
|
273
|
+
}
|
|
274
|
+
return validityInfo;
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Applies the validity decorator to the schema definition based on the sync rule provider instance and minimum UI5 version.
|
|
278
|
+
*
|
|
279
|
+
* @param schemaDefinition The schema definition to apply the validity decorator to
|
|
280
|
+
* @param syncRuleProviderInstance The instance of the sync rule provider
|
|
281
|
+
* @param minUI5Version The minimum UI5 version to consider for validity checks
|
|
282
|
+
*/
|
|
283
|
+
applyValidityDecorator(schemaDefinition, syncRuleProviderInstance, minUI5Version) {
|
|
284
|
+
if (!schemaDefinition?.properties || !syncRuleProviderInstance || !minUI5Version) {
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
for (const propertyName in schemaDefinition.properties) {
|
|
288
|
+
const property = schemaDefinition.properties[propertyName];
|
|
289
|
+
const validityInfo = this.getValidityMetadata(syncRuleProviderInstance, propertyName);
|
|
290
|
+
// Check if property has a 'since' requirement that exceeds the app's minUI5Version
|
|
291
|
+
if (validityInfo?.since && !(0, utils_1.compareUI5Versions)(minUI5Version, validityInfo.since)) {
|
|
292
|
+
property[ux_specification_types_1.SchemaTag.hidden] = true;
|
|
293
|
+
// possible message?
|
|
294
|
+
}
|
|
295
|
+
// Process inline enum validity configuration from @validity decorator
|
|
296
|
+
if (validityInfo?.enum && property?.enum && Array.isArray(property.enum)) {
|
|
297
|
+
const filteredEnum = property.enum.filter((enumValue) => {
|
|
298
|
+
const enumValueStr = String(enumValue);
|
|
299
|
+
const condition = validityInfo.enum[enumValueStr];
|
|
300
|
+
if (!condition) {
|
|
301
|
+
return true; // Keep values without conditions
|
|
302
|
+
}
|
|
303
|
+
// Check UI5 version requirement (if specified)
|
|
304
|
+
if (condition.since && minUI5Version) {
|
|
305
|
+
if (!(0, utils_1.compareUI5Versions)(minUI5Version, condition.since)) {
|
|
306
|
+
if (condition.message) {
|
|
307
|
+
this.addConditionalMessage(condition, syncRuleProviderInstance, property, {
|
|
308
|
+
propertyName: enumValueStr
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
return false; // Version requirement not met
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
// Check property dependency using dependsOn function
|
|
315
|
+
if (condition.dependsOn) {
|
|
316
|
+
if (!condition.dependsOn(syncRuleProviderInstance)) {
|
|
317
|
+
if (condition.message) {
|
|
318
|
+
this.addConditionalMessage(condition, syncRuleProviderInstance, property, {
|
|
319
|
+
propertyName: enumValueStr
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
return false; // Dependency condition not met
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
return true;
|
|
326
|
+
});
|
|
327
|
+
property.enum = filteredEnum;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Applies the isViewNode decorator to the schema definition based on the target and property name.
|
|
333
|
+
*
|
|
334
|
+
* @param schemaDefinition The schema definition to apply the isViewNode decorator to
|
|
335
|
+
* @param target The target object or function
|
|
336
|
+
* @param propertyName The property name (optional)
|
|
337
|
+
*/
|
|
338
|
+
applyIsViewNodeDecorator(schemaDefinition, target, propertyName) {
|
|
339
|
+
const isViewNode = Reflect.getMetadata(decoration_1.metadataKeys.isViewNode, target, propertyName);
|
|
340
|
+
if (isViewNode !== undefined) {
|
|
341
|
+
schemaDefinition[ux_specification_types_1.SchemaTag.isViewNode] = isViewNode;
|
|
342
|
+
schemaDefinition.properties = schemaDefinition.properties || {};
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Applies the description decorator to the schema definition.
|
|
347
|
+
*
|
|
348
|
+
* @param schemaDefinition - The schema definition to apply the decorator to
|
|
349
|
+
* @param target - The target object or function
|
|
350
|
+
* @param propertyName - The property name (optional)
|
|
351
|
+
*/
|
|
352
|
+
applyDescriptionDecorator(schemaDefinition, target, propertyName) {
|
|
353
|
+
const description = Reflect.getMetadata(decoration_1.metadataKeys.description, target, propertyName);
|
|
354
|
+
if (description !== undefined) {
|
|
355
|
+
schemaDefinition.description = description;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* Applies the hidden decorator to the schema definition.
|
|
360
|
+
*
|
|
361
|
+
* @param schemaDefinition - The schema definition to apply the decorator to
|
|
362
|
+
* @param target - The target object or function
|
|
363
|
+
* @param propertyName - The property name (optional)
|
|
364
|
+
*/
|
|
365
|
+
applyHiddenDecorator(schemaDefinition, target, propertyName) {
|
|
366
|
+
const hiddenCondition = Reflect.getMetadata(decoration_1.metadataKeys.hidden, target, propertyName);
|
|
367
|
+
if (typeof hiddenCondition === 'function') {
|
|
368
|
+
const shouldHide = hiddenCondition(this);
|
|
369
|
+
if (shouldHide) {
|
|
370
|
+
schemaDefinition[ux_specification_types_1.SchemaTag.hidden] = true;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
else if (hiddenCondition === true) {
|
|
374
|
+
schemaDefinition[ux_specification_types_1.SchemaTag.hidden] = true;
|
|
375
|
+
}
|
|
376
|
+
if (!schemaDefinition?.properties) {
|
|
377
|
+
return;
|
|
378
|
+
}
|
|
379
|
+
for (const propertyName in schemaDefinition.properties) {
|
|
380
|
+
this.applyHiddenDecorator(schemaDefinition.properties[propertyName], target, propertyName);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* Applies all decorators to the schema definition.
|
|
385
|
+
*
|
|
386
|
+
* @param minUi5Version - The minimum UI5 version (optional)
|
|
387
|
+
* @param propertyName - The property name (optional)
|
|
388
|
+
* @returns Object containing the definition
|
|
389
|
+
*/
|
|
390
|
+
applyDecorators(minUi5Version, propertyName) {
|
|
391
|
+
const definition = this.getDefinitions()?.[this.getBaseName()];
|
|
392
|
+
if (!definition) {
|
|
393
|
+
return;
|
|
394
|
+
}
|
|
395
|
+
const target = propertyName ? this : this.constructor;
|
|
396
|
+
// Apply description decorator
|
|
397
|
+
this.applyDescriptionDecorator(definition, target, propertyName);
|
|
398
|
+
// Apply isViewNode decorator
|
|
399
|
+
this.applyIsViewNodeDecorator(definition, target, propertyName);
|
|
400
|
+
// Apply validity decorator (for properties)
|
|
401
|
+
this.applyValidityDecorator(definition, this, minUi5Version);
|
|
402
|
+
// Apply dependsOn decorator - check property dependencies
|
|
403
|
+
this.applyDependsOnDecorator(definition, this);
|
|
404
|
+
// Apply hidden decorator - evaluate condition function if provided
|
|
405
|
+
this.applyHiddenDecorator(definition, this);
|
|
406
|
+
return { definition };
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
exports.Decorator = Decorator;
|
|
410
|
+
//# sourceMappingURL=DecoratorClass.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DecoratorClass.js","sourceRoot":"","sources":["../../../../../../src/sync/v4/sync-rules/DecoratorClass.ts"],"names":[],"mappings":";;;;;;AAQA,wEAAwD;AACxD,wDAA6E;AAC7E,sDAA8B;AAC9B,mCAA6C;AAE7C;;;;;;;;GAQG;AACH,SAAS,kBAAkB,CACvB,OAAmB,EACnB,EAAE,IAAI,EAAE,SAAS,GAAG,KAAK,EAAyC;IAElE,IAAI,CAAC,OAAO,CAAC,kCAAS,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC/B,OAAO,CAAC,kCAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;IACrC,CAAC;IACD,OAAO,CAAC,kCAAS,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC;AAC1D,CAAC;AAaD,MAAa,SAAS;IAIlB;;;;OAIG;IACH,YAAY,SAAsB;QAC9B,qFAAqF;QACrF,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,WAAW,EAAE;YACrC,KAAK,EAAE,SAAS;YAChB,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE,KAAK;YACjB,YAAY,EAAE,IAAI;SACrB,CAAC,CAAC;QAEH,MAAM,IAAI,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QACjC,MAAM,WAAW,GAAG,SAAS,EAAE,WAAW,CAAC;QAE3C,gFAAgF;QAChF,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE;YAChC,KAAK,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC,IAAI,CAAC,EAAE;YAChD,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE,KAAK;YACjB,YAAY,EAAE,IAAI;SACrB,CAAC,CAAC;IACP,CAAC;IAED;;;;OAIG;IACH,YAAY;QACR,OAAO,IAAI,CAAC,WAAW,CAAC,IA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AC,cAAc,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,CAAe,CAAC;QAC7E,IAAI,CAAC,UAAU,EAAE,CAAC;YACd,OAAO;QACX,CAAC;QACD,MAAM,MAAM,GAAG,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC;QAEtD,8BAA8B;QAC9B,IAAI,CAAC,yBAAyB,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;QAEjE,6BAA6B;QAC7B,IAAI,CAAC,wBAAwB,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;QAEhE,4CAA4C;QAC5C,IAAI,CAAC,sBAAsB,CAAC,UAAU,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC;QAE7D,0DAA0D;QAC1D,IAAI,CAAC,uBAAuB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QAE/C,mEAAmE;QACnE,IAAI,CAAC,oBAAoB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QAE5C,OAAO,EAAE,UAAU,EAAE,CAAC;IAC1B,CAAC;CACJ;AAtWD,8BAsWC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { EntitySet, EntityType } from '@sap-ux/vocabularies-types';
|
|
2
|
+
import type { TemplateType, v4 } from '@sap/ux-specification-types';
|
|
3
|
+
import type { App } from './App';
|
|
4
|
+
import type { EntityTypeAnnotations_UI } from '@sap-ux/vocabularies-types/vocabularies/UI_Edm';
|
|
5
|
+
/**
|
|
6
|
+
* Represents a single page in a Fiori application.
|
|
7
|
+
* Encapsulates page finding logic and provides convenient access to page properties.
|
|
8
|
+
*/
|
|
9
|
+
export declare class Page {
|
|
10
|
+
private readonly app;
|
|
11
|
+
private readonly target?;
|
|
12
|
+
template: {
|
|
13
|
+
name: string;
|
|
14
|
+
type: TemplateType;
|
|
15
|
+
};
|
|
16
|
+
entity?: {
|
|
17
|
+
type?: EntityType;
|
|
18
|
+
set?: EntitySet;
|
|
19
|
+
contextPath?: string;
|
|
20
|
+
};
|
|
21
|
+
config?: {};
|
|
22
|
+
/**
|
|
23
|
+
* Creates a new Page instance by finding the page configuration in the app.
|
|
24
|
+
*
|
|
25
|
+
* @param app - The App instance containing the pages
|
|
26
|
+
* @param template - The template name to search for
|
|
27
|
+
* @param template.name - The name of the template
|
|
28
|
+
* @param template.type - The type of the template
|
|
29
|
+
* @param entitySet - Optional entity set to match
|
|
30
|
+
* @param contextPath - Optional context path to match
|
|
31
|
+
*/
|
|
32
|
+
constructor(app: App, template: {
|
|
33
|
+
name: string;
|
|
34
|
+
type: TemplateType;
|
|
35
|
+
}, entitySet?: EntitySet, contextPath?: string);
|
|
36
|
+
/**
|
|
37
|
+
* Gets the App instance associated with this page.
|
|
38
|
+
*
|
|
39
|
+
* @returns The App instance
|
|
40
|
+
*/
|
|
41
|
+
getPage(): v4.SapUiAppPageV4 | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Gets the entity type associated with this page.
|
|
44
|
+
*
|
|
45
|
+
* @returns The entity type, or undefined if not found
|
|
46
|
+
*/
|
|
47
|
+
getEntityType(): EntityType | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Gets the entity type associated with this page.
|
|
50
|
+
*
|
|
51
|
+
* @returns The entity type, or undefined if not found
|
|
52
|
+
*/
|
|
53
|
+
getTemplate(): {
|
|
54
|
+
type: TemplateType;
|
|
55
|
+
name: string;
|
|
56
|
+
} | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* Gets the UI annotations for the entity type associated with this page.
|
|
59
|
+
*
|
|
60
|
+
* @returns The UI annotations, or undefined if not found
|
|
61
|
+
*/
|
|
62
|
+
getUIAnnotations(): EntityTypeAnnotations_UI | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* Gets the App instance associated with this page.
|
|
65
|
+
*
|
|
66
|
+
* @returns The App instance
|
|
67
|
+
*/
|
|
68
|
+
getApp(): App;
|
|
69
|
+
}
|
|
70
|
+
//#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