@sap/ux-specification 1.142.5 → 1.144.1
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 +26 -160
- 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 +312 -317
- package/dist/index-min.js.map +4 -4
- package/dist/schemas/v2/AnalyticalListPageConfig.json +18 -0
- package/dist/schemas/v2/ListReportConfig.json +30 -0
- package/dist/schemas/v2/ListReportNewConfig.json +7 -202
- package/dist/schemas/v2/ObjectPageConfig.json +30 -0
- package/dist/schemas/v4/ApplicationV4.json +5 -13
- package/dist/schemas/v4/BuildingBlocksConfig.json +2094 -1618
- package/dist/schemas/v4/ObjectPageConfig.json +734 -112
- package/dist/specification/package.json +10 -9
- package/dist/specification/scripts/generate-validity-report.js +1 -1
- package/dist/specification/scripts/generate-validity-report.js.map +1 -1
- package/dist/specification/scripts/macros/corrections.d.ts.map +1 -1
- package/dist/specification/scripts/macros/corrections.js +18 -24
- 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 -23
- package/dist/specification/scripts/macros/schema.js.map +1 -1
- package/dist/specification/scripts/schema/to-json-schema.js +1 -1
- 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 +9 -45
- package/dist/specification/src/api.js.map +1 -1
- package/dist/specification/src/ftfs/ftfs.d.ts +0 -8
- package/dist/specification/src/ftfs/ftfs.d.ts.map +1 -1
- package/dist/specification/src/ftfs/ftfs.js +0 -1
- package/dist/specification/src/ftfs/ftfs.js.map +1 -1
- package/dist/specification/src/ftfs/index.d.ts +1 -1
- package/dist/specification/src/ftfs/index.d.ts.map +1 -1
- package/dist/specification/src/ftfs/index.js +1 -2
- package/dist/specification/src/ftfs/index.js.map +1 -1
- package/dist/specification/src/ftfs/parser/model/TreeModel.d.ts.map +1 -1
- package/dist/specification/src/ftfs/parser/model/TreeModel.js +1 -3
- package/dist/specification/src/ftfs/parser/model/TreeModel.js.map +1 -1
- package/dist/specification/src/sync/common/decoration/decorator-paths.d.ts +22 -58
- package/dist/specification/src/sync/common/decoration/decorator-paths.d.ts.map +1 -1
- package/dist/specification/src/sync/common/decoration/decorator-paths.js +1 -23
- package/dist/specification/src/sync/common/decoration/decorator-paths.js.map +1 -1
- package/dist/specification/src/sync/common/decoration/decorators.d.ts +8 -0
- package/dist/specification/src/sync/common/decoration/decorators.d.ts.map +1 -1
- package/dist/specification/src/sync/common/decoration/decorators.js +15 -0
- package/dist/specification/src/sync/common/decoration/decorators.js.map +1 -1
- package/dist/specification/src/sync/common/decoration/index.d.ts +0 -4
- package/dist/specification/src/sync/common/decoration/index.d.ts.map +1 -1
- package/dist/specification/src/sync/common/decoration/index.js +0 -4
- package/dist/specification/src/sync/common/decoration/index.js.map +1 -1
- package/dist/specification/src/sync/common/generate/objectPage.js +1 -0
- package/dist/specification/src/sync/common/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/common/i18n.json +0 -25
- package/dist/specification/src/sync/common/importProject.d.ts.map +1 -1
- package/dist/specification/src/sync/common/importProject.js +3 -3
- package/dist/specification/src/sync/common/importProject.js.map +1 -1
- package/dist/specification/src/sync/common/rules.d.ts +1 -1
- package/dist/specification/src/sync/common/rules.js +1 -1
- package/dist/specification/src/sync/v2/export/controls/Fragment.d.ts +5 -4
- package/dist/specification/src/sync/v2/export/controls/Fragment.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/controls/Fragment.js +20 -29
- package/dist/specification/src/sync/v2/export/controls/Fragment.js.map +1 -1
- package/dist/specification/src/sync/v2/export/controls/ObjectPageTable.d.ts +1 -0
- package/dist/specification/src/sync/v2/export/controls/ObjectPageTable.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/controls/ObjectPageTable.js +25 -40
- package/dist/specification/src/sync/v2/export/controls/ObjectPageTable.js.map +1 -1
- package/dist/specification/src/sync/v2/export/controls/Table.d.ts +1 -0
- package/dist/specification/src/sync/v2/export/controls/Table.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/controls/Table.js +24 -34
- package/dist/specification/src/sync/v2/export/controls/Table.js.map +1 -1
- package/dist/specification/src/sync/v2/export/export.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/export.js +2 -3
- package/dist/specification/src/sync/v2/export/export.js.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 +19 -48
- package/dist/specification/src/sync/v2/export/exportPage.js.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPageGeneric.d.ts +0 -2
- package/dist/specification/src/sync/v2/export/exportPageGeneric.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPageGeneric.js +6 -17
- package/dist/specification/src/sync/v2/export/exportPageGeneric.js.map +1 -1
- package/dist/specification/src/sync/v2/export/view-controller-generator.d.ts +6 -54
- package/dist/specification/src/sync/v2/export/view-controller-generator.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/view-controller-generator.js +12 -106
- package/dist/specification/src/sync/v2/export/view-controller-generator.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 +15 -1
- package/dist/specification/src/sync/v2/generate/analyticalListReport.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/generate.d.ts +6 -3
- package/dist/specification/src/sync/v2/generate/generate.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/generate.js +12 -7
- package/dist/specification/src/sync/v2/generate/generate.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 +2 -0
- 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 +20 -6
- package/dist/specification/src/sync/v2/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.js +2 -2
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/utils.d.ts +19 -0
- package/dist/specification/src/sync/v2/generate/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/utils.js +75 -0
- package/dist/specification/src/sync/v2/generate/utils.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/FilterBar.js +4 -4
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiTable.js +3 -3
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiTable.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.d.ts +2 -59
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.js +7 -582
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.d.ts +0 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.js +0 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/pageAccess.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/pageAccess.js +14 -29
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/pageAccess.js.map +1 -1
- package/dist/specification/src/sync/v2/types.d.ts +0 -2
- package/dist/specification/src/sync/v2/types.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/types.js.map +1 -1
- package/dist/specification/src/sync/v2/utils.d.ts +0 -25
- package/dist/specification/src/sync/v2/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/utils.js +4 -28
- 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 +2 -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 +5 -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 -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 +3 -9
- package/dist/specification/src/sync/v4/export/controls/HeaderAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/HeaderAction.js +6 -10
- 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 +51 -11
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTable.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTable.js +246 -95
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTable.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/Table.d.ts +27 -6
- package/dist/specification/src/sync/v4/export/controls/Table.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/Table.js +38 -11
- package/dist/specification/src/sync/v4/export/controls/Table.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.d.ts +2 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.js +2 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/factory.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/factory.js +4 -2
- package/dist/specification/src/sync/v4/export/factory.js.map +1 -1
- package/dist/specification/src/sync/v4/export/fpmCustomPage.d.ts +0 -1
- package/dist/specification/src/sync/v4/export/fpmCustomPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/fpmCustomPage.js +46 -212
- package/dist/specification/src/sync/v4/export/fpmCustomPage.js.map +1 -1
- package/dist/specification/src/sync/v4/export/pages/ObjectPage.d.ts +1 -0
- package/dist/specification/src/sync/v4/export/pages/ObjectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/pages/ObjectPage.js +11 -0
- package/dist/specification/src/sync/v4/export/pages/ObjectPage.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.d.ts +0 -13
- 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 +2 -74
- 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.js +5 -5
- 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 +39 -29
- 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 +3 -12
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/utils.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/list-report/ListReportUtils.d.ts +13 -32
- package/dist/specification/src/sync/v4/generate/list-report/ListReportUtils.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/list-report/ListReportUtils.js +78 -103
- package/dist/specification/src/sync/v4/generate/list-report/ListReportUtils.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/list-report/listReport.d.ts +4 -7
- package/dist/specification/src/sync/v4/generate/list-report/listReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/list-report/listReport.js +19 -34
- package/dist/specification/src/sync/v4/generate/list-report/listReport.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/objectPage.d.ts +2 -1
- package/dist/specification/src/sync/v4/generate/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/objectPage.js +95 -136
- package/dist/specification/src/sync/v4/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/fpmCustomPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/fpmCustomPage.js +0 -20
- package/dist/specification/src/sync/v4/import/pages/fpmCustomPage.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 +50 -11
- package/dist/specification/src/sync/v4/import/pages/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/App.d.ts +4 -2
- package/dist/specification/src/sync/v4/sync-rules/App.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/App.js +1 -2
- package/dist/specification/src/sync/v4/sync-rules/App.js.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.d.ts +1 -2
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.js +1 -3
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.js.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.d.ts +294 -1
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.js +753 -0
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.js.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/Page.d.ts +4 -2
- package/dist/specification/src/sync/v4/sync-rules/Page.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/Page.js.map +1 -1
- package/dist/specification/src/sync/v4/utils/StableIdHelper.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/utils/StableIdHelper.js +4 -10
- package/dist/specification/src/sync/v4/utils/StableIdHelper.js.map +1 -1
- package/dist/specification/src/sync/v4/utils/macros.d.ts +0 -19
- package/dist/specification/src/sync/v4/utils/macros.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/utils/macros.js +0 -34
- package/dist/specification/src/sync/v4/utils/macros.js.map +1 -1
- package/dist/specification/src/sync/v4/utils/utils.d.ts +4 -24
- package/dist/specification/src/sync/v4/utils/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/utils/utils.js +43 -240
- package/dist/specification/src/sync/v4/utils/utils.js.map +1 -1
- package/dist/specification/test/test-utils/utils.d.ts +1 -2
- package/dist/specification/test/test-utils/utils.d.ts.map +1 -1
- package/dist/specification/test/test-utils/utils.js +18 -26
- package/dist/specification/test/test-utils/utils.js.map +1 -1
- package/dist/specification/test/unit/decorators/validity-test-utils.d.ts +2 -2
- package/dist/specification/test/unit/decorators/validity-test-utils.d.ts.map +1 -1
- package/dist/specification/test/unit/decorators/validity-test-utils.js +6 -6
- package/dist/specification/test/unit/decorators/validity-test-utils.js.map +1 -1
- package/dist/templates/AnalyticalTableColumnsExtension.xml +3 -3
- package/dist/templates/GridTableColumnsExtension.xml +3 -3
- package/dist/templates/ResponsiveTableColumnsExtension.xml +2 -2
- package/dist/templates/TreeTableColumnsExtension.xml +4 -4
- package/dist/templates/fragment.xml +3 -3
- package/dist/templates/view.xml +3 -3
- package/dist/types/src/apiTypes.d.ts +9 -15
- package/dist/types/src/apiTypes.d.ts.map +1 -1
- package/dist/types/src/apiTypes.js +0 -1
- package/dist/types/src/apiTypes.js.map +1 -1
- package/dist/types/src/common/types.d.ts +13 -11
- package/dist/types/src/common/types.d.ts.map +1 -1
- package/dist/types/src/common/types.js +7 -12
- package/dist/types/src/common/types.js.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageTable.d.ts +4 -0
- package/dist/types/src/v2/controls/ObjectPageTable.d.ts.map +1 -1
- package/dist/types/src/v2/controls/Table.d.ts +4 -0
- package/dist/types/src/v2/controls/Table.d.ts.map +1 -1
- package/dist/types/src/v4/application.d.ts +4 -13
- package/dist/types/src/v4/application.d.ts.map +1 -1
- package/dist/types/src/v4/application.js +0 -10
- package/dist/types/src/v4/application.js.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageTable.d.ts +252 -86
- 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/pages/ObjectPageConfigV4.d.ts +4 -0
- package/dist/types/src/v4/pages/ObjectPageConfigV4.d.ts.map +1 -1
- package/package.json +10 -9
- package/dist/specification/src/sync/common/decoration/Decorator.d.ts +0 -91
- package/dist/specification/src/sync/common/decoration/Decorator.d.ts.map +0 -1
- package/dist/specification/src/sync/common/decoration/Decorator.js +0 -139
- package/dist/specification/src/sync/common/decoration/Decorator.js.map +0 -1
- package/dist/specification/src/sync/common/decoration/condition-evaluator.d.ts +0 -95
- package/dist/specification/src/sync/common/decoration/condition-evaluator.d.ts.map +0 -1
- package/dist/specification/src/sync/common/decoration/condition-evaluator.js +0 -210
- package/dist/specification/src/sync/common/decoration/condition-evaluator.js.map +0 -1
- package/dist/specification/src/sync/common/decoration/interfaces.d.ts +0 -38
- package/dist/specification/src/sync/common/decoration/interfaces.d.ts.map +0 -1
- package/dist/specification/src/sync/common/decoration/interfaces.js +0 -3
- package/dist/specification/src/sync/common/decoration/interfaces.js.map +0 -1
- package/dist/specification/src/sync/common/decoration/steps/Enums.d.ts +0 -18
- package/dist/specification/src/sync/common/decoration/steps/Enums.d.ts.map +0 -1
- package/dist/specification/src/sync/common/decoration/steps/Enums.js +0 -50
- package/dist/specification/src/sync/common/decoration/steps/Enums.js.map +0 -1
- package/dist/specification/src/sync/common/decoration/steps/Hide.d.ts +0 -18
- package/dist/specification/src/sync/common/decoration/steps/Hide.d.ts.map +0 -1
- package/dist/specification/src/sync/common/decoration/steps/Hide.js +0 -46
- package/dist/specification/src/sync/common/decoration/steps/Hide.js.map +0 -1
- package/dist/specification/src/sync/common/decoration/steps/Message.d.ts +0 -26
- package/dist/specification/src/sync/common/decoration/steps/Message.d.ts.map +0 -1
- package/dist/specification/src/sync/common/decoration/steps/Message.js +0 -77
- package/dist/specification/src/sync/common/decoration/steps/Message.js.map +0 -1
- package/dist/specification/src/sync/common/decoration/steps/Readonly.d.ts +0 -18
- package/dist/specification/src/sync/common/decoration/steps/Readonly.d.ts.map +0 -1
- package/dist/specification/src/sync/common/decoration/steps/Readonly.js +0 -43
- package/dist/specification/src/sync/common/decoration/steps/Readonly.js.map +0 -1
- package/dist/specification/src/sync/common/decoration/steps/Validity.d.ts +0 -18
- package/dist/specification/src/sync/common/decoration/steps/Validity.d.ts.map +0 -1
- package/dist/specification/src/sync/common/decoration/steps/Validity.js +0 -68
- package/dist/specification/src/sync/common/decoration/steps/Validity.js.map +0 -1
- package/dist/specification/src/sync/common/decoration/steps/enum-utils.d.ts +0 -19
- package/dist/specification/src/sync/common/decoration/steps/enum-utils.d.ts.map +0 -1
- package/dist/specification/src/sync/common/decoration/steps/enum-utils.js +0 -48
- package/dist/specification/src/sync/common/decoration/steps/enum-utils.js.map +0 -1
- package/dist/specification/src/sync/common/decoration/steps/index.d.ts +0 -6
- package/dist/specification/src/sync/common/decoration/steps/index.d.ts.map +0 -1
- package/dist/specification/src/sync/common/decoration/steps/index.js +0 -14
- package/dist/specification/src/sync/common/decoration/steps/index.js.map +0 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiEdit.d.ts +0 -12
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiEdit.d.ts.map +0 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiEdit.js +0 -167
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiEdit.js.map +0 -1
- package/dist/specification/src/sync/v4/generate/app.d.ts +0 -11
- package/dist/specification/src/sync/v4/generate/app.d.ts.map +0 -1
- package/dist/specification/src/sync/v4/generate/app.js +0 -31
- package/dist/specification/src/sync/v4/generate/app.js.map +0 -1
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Hide = void 0;
|
|
4
|
-
const ux_specification_types_1 = require("@sap/ux-specification-types");
|
|
5
|
-
const decorators_1 = require("../decorators");
|
|
6
|
-
const condition_evaluator_1 = require("../condition-evaluator");
|
|
7
|
-
/**
|
|
8
|
-
* Hide step - hides properties when their condition evaluates to true.
|
|
9
|
-
* Only hides if the message step did not add any messages to the property.
|
|
10
|
-
*/
|
|
11
|
-
class Hide {
|
|
12
|
-
constructor() {
|
|
13
|
-
this.name = 'hide';
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Hides properties whose hide condition evaluates to true and have no messages.
|
|
17
|
-
*
|
|
18
|
-
* @param target - The class prototype containing decorator metadata
|
|
19
|
-
* @param definition - The schema definition to modify
|
|
20
|
-
* @param context - Runtime context for condition evaluation
|
|
21
|
-
*/
|
|
22
|
-
init(target, definition, context) {
|
|
23
|
-
if (!definition?.properties || !target) {
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
const evaluator = new condition_evaluator_1.ConditionEvaluator(context);
|
|
27
|
-
for (const propertyName in definition.properties) {
|
|
28
|
-
const property = definition.properties[propertyName];
|
|
29
|
-
const hideConditions = Reflect.getMetadata(decorators_1.metadataKeys.hide, target, propertyName);
|
|
30
|
-
if (hideConditions) {
|
|
31
|
-
// Hide when ANY condition IS met (OR semantics across multiple @hide decorators)
|
|
32
|
-
// But only if no messages were added by the message step
|
|
33
|
-
const hasMessages = Array.isArray(property[ux_specification_types_1.SchemaTag.messages]) && property[ux_specification_types_1.SchemaTag.messages].length > 0;
|
|
34
|
-
for (const condition of hideConditions) {
|
|
35
|
-
const { passed } = evaluator.evaluate(condition);
|
|
36
|
-
if (passed && !hasMessages) {
|
|
37
|
-
property[ux_specification_types_1.SchemaTag.hidden] = true;
|
|
38
|
-
break;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
exports.Hide = Hide;
|
|
46
|
-
//# sourceMappingURL=Hide.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Hide.js","sourceRoot":"","sources":["../../../../../../../src/sync/common/decoration/steps/Hide.ts"],"names":[],"mappings":";;;AACA,wEAAwD;AAExD,8CAA6C;AAC7C,gEAA4D;AAE5D;;;GAGG;AACH,MAAa,IAAI;IAAjB;QACa,SAAI,GAAG,MAAM,CAAC;IAmC3B,CAAC;IAjCG;;;;;;OAMG;IACH,IAAI,CAAC,MAAc,EAAE,UAAsB,EAAE,OAAyB;QAClE,IAAI,CAAC,UAAU,EAAE,UAAU,IAAI,CAAC,MAAM,EAAE,CAAC;YACrC,OAAO;QACX,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,wCAAkB,CAAC,OAAO,CAAC,CAAC;QAElD,KAAK,MAAM,YAAY,IAAI,UAAU,CAAC,UAAU,EAAE,CAAC;YAC/C,MAAM,QAAQ,GAAG,UAAU,CAAC,UAAU,CAAC,YAAY,CAAe,CAAC;YACnE,MAAM,cAAc,GAAG,OAAO,CAAC,WAAW,CAAC,yBAAY,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;YAEpF,IAAI,cAAc,EAAE,CAAC;gBACjB,iFAAiF;gBACjF,yDAAyD;gBACzD,MAAM,WAAW,GACb,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,kCAAS,CAAC,QAAQ,CAAC,CAAC,IAAI,QAAQ,CAAC,kCAAS,CAAC,QAAQ,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;gBAC3F,KAAK,MAAM,SAAS,IAAI,cAAc,EAAE,CAAC;oBACrC,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;oBACjD,IAAI,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;wBACzB,QAAQ,CAAC,kCAAS,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;wBAClC,MAAM;oBACV,CAAC;gBACL,CAAC;YACL,CAAC;QACL,CAAC;IACL,CAAC;CACJ;AApCD,oBAoCC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { Definition } from 'typescript-json-schema';
|
|
2
|
-
import type { DecoratorStep, DecoratorContext } from '../interfaces';
|
|
3
|
-
/**
|
|
4
|
-
* Message step - adds messages to properties when conditions are met.
|
|
5
|
-
* Multiple @message decorators can be applied to the same property.
|
|
6
|
-
*/
|
|
7
|
-
export declare class Message implements DecoratorStep {
|
|
8
|
-
readonly name = "message";
|
|
9
|
-
/**
|
|
10
|
-
* Adds messages to properties whose conditions are met.
|
|
11
|
-
*
|
|
12
|
-
* @param target - The class prototype containing decorator metadata
|
|
13
|
-
* @param definition - The schema definition to modify
|
|
14
|
-
* @param context - Runtime context for condition evaluation
|
|
15
|
-
*/
|
|
16
|
-
init(target: object, definition: Definition, context: DecoratorContext): void;
|
|
17
|
-
/**
|
|
18
|
-
* Adds a translated message to the schema property if the metadata contains a MessageConfig.
|
|
19
|
-
*
|
|
20
|
-
* @param metadata - Decorator metadata containing the message config
|
|
21
|
-
* @param definition - The schema property definition to add the message to
|
|
22
|
-
* @param evaluator - Condition evaluator used to resolve PathNode params
|
|
23
|
-
*/
|
|
24
|
-
private addConditionalMessage;
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=Message.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../../../../../../src/sync/common/decoration/steps/Message.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAwBrE;;;GAGG;AACH,qBAAa,OAAQ,YAAW,aAAa;IACzC,QAAQ,CAAC,IAAI,aAAa;IAE1B;;;;;;OAMG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,gBAAgB,GAAG,IAAI;IAsB7E;;;;;;OAMG;IACH,OAAO,CAAC,qBAAqB;CAahC"}
|
|
@@ -1,77 +0,0 @@
|
|
|
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.Message = void 0;
|
|
7
|
-
const ux_specification_types_1 = require("@sap/ux-specification-types");
|
|
8
|
-
const decorators_1 = require("../decorators");
|
|
9
|
-
const decorator_paths_1 = require("../decorator-paths");
|
|
10
|
-
const condition_evaluator_1 = require("../condition-evaluator");
|
|
11
|
-
const i18next_1 = __importDefault(require("i18next"));
|
|
12
|
-
/**
|
|
13
|
-
* Adds a message to a schema element.
|
|
14
|
-
*
|
|
15
|
-
* @param element - The schema element to add the message to
|
|
16
|
-
* @param root0 - Message parameters object
|
|
17
|
-
* @param root0.text - The message text
|
|
18
|
-
* @param root0.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
|
-
/**
|
|
27
|
-
* Message step - adds messages to properties when conditions are met.
|
|
28
|
-
* Multiple @message decorators can be applied to the same property.
|
|
29
|
-
*/
|
|
30
|
-
class Message {
|
|
31
|
-
constructor() {
|
|
32
|
-
this.name = 'message';
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Adds messages to properties whose conditions are met.
|
|
36
|
-
*
|
|
37
|
-
* @param target - The class prototype containing decorator metadata
|
|
38
|
-
* @param definition - The schema definition to modify
|
|
39
|
-
* @param context - Runtime context for condition evaluation
|
|
40
|
-
*/
|
|
41
|
-
init(target, definition, context) {
|
|
42
|
-
if (!definition?.properties || !target) {
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
const evaluator = new condition_evaluator_1.ConditionEvaluator(context);
|
|
46
|
-
for (const propertyName in definition.properties) {
|
|
47
|
-
const property = definition.properties[propertyName];
|
|
48
|
-
const messageInfoList = Reflect.getMetadata(decorators_1.metadataKeys.message, target, propertyName);
|
|
49
|
-
if (messageInfoList) {
|
|
50
|
-
for (const messageInfo of messageInfoList) {
|
|
51
|
-
const { passed } = evaluator.evaluate(messageInfo);
|
|
52
|
-
if (passed && messageInfo.messageConfig) {
|
|
53
|
-
this.addConditionalMessage(messageInfo, property, evaluator);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Adds a translated message to the schema property if the metadata contains a MessageConfig.
|
|
61
|
-
*
|
|
62
|
-
* @param metadata - Decorator metadata containing the message config
|
|
63
|
-
* @param definition - The schema property definition to add the message to
|
|
64
|
-
* @param evaluator - Condition evaluator used to resolve PathNode params
|
|
65
|
-
*/
|
|
66
|
-
addConditionalMessage(metadata, definition, evaluator) {
|
|
67
|
-
// Handle MessageConfig format (from msg() helper)
|
|
68
|
-
if (metadata.messageConfig && (0, decorator_paths_1.isMessageConfig)(metadata.messageConfig)) {
|
|
69
|
-
const msgConfig = metadata.messageConfig;
|
|
70
|
-
const resolvedParams = evaluator.resolveMessageParams(msgConfig.params);
|
|
71
|
-
const messageText = i18next_1.default.t(msgConfig.i18nKey, resolvedParams);
|
|
72
|
-
addMessageToSchema(definition, { text: messageText, deletable: msgConfig.deletable });
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
exports.Message = Message;
|
|
77
|
-
//# sourceMappingURL=Message.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Message.js","sourceRoot":"","sources":["../../../../../../../src/sync/common/decoration/steps/Message.ts"],"names":[],"mappings":";;;;;;AACA,wEAAwD;AAExD,8CAAqE;AACrE,wDAAqD;AACrD,gEAA4D;AAC5D,sDAA8B;AAE9B;;;;;;;GAOG;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;AAED;;;GAGG;AACH,MAAa,OAAO;IAApB;QACa,SAAI,GAAG,SAAS,CAAC;IAmD9B,CAAC;IAjDG;;;;;;OAMG;IACH,IAAI,CAAC,MAAc,EAAE,UAAsB,EAAE,OAAyB;QAClE,IAAI,CAAC,UAAU,EAAE,UAAU,IAAI,CAAC,MAAM,EAAE,CAAC;YACrC,OAAO;QACX,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,wCAAkB,CAAC,OAAO,CAAC,CAAC;QAElD,KAAK,MAAM,YAAY,IAAI,UAAU,CAAC,UAAU,EAAE,CAAC;YAC/C,MAAM,QAAQ,GAAG,UAAU,CAAC,UAAU,CAAC,YAAY,CAAe,CAAC;YACnE,MAAM,eAAe,GAAG,OAAO,CAAC,WAAW,CAAC,yBAAY,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;YAExF,IAAI,eAAe,EAAE,CAAC;gBAClB,KAAK,MAAM,WAAW,IAAI,eAAe,EAAE,CAAC;oBACxC,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;oBACnD,IAAI,MAAM,IAAI,WAAW,CAAC,aAAa,EAAE,CAAC;wBACtC,IAAI,CAAC,qBAAqB,CAAC,WAAW,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;oBACjE,CAAC;gBACL,CAAC;YACL,CAAC;QACL,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACK,qBAAqB,CACzB,QAA2B,EAC3B,UAAsB,EACtB,SAA6B;QAE7B,kDAAkD;QAClD,IAAI,QAAQ,CAAC,aAAa,IAAI,IAAA,iCAAe,EAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;YACpE,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC;YACzC,MAAM,cAAc,GAAG,SAAS,CAAC,oBAAoB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YACxE,MAAM,WAAW,GAAG,iBAAO,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;YACjE,kBAAkB,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,CAAC,SAAS,EAAE,CAAC,CAAC;QAC1F,CAAC;IACL,CAAC;CACJ;AApDD,0BAoDC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { Definition } from 'typescript-json-schema';
|
|
2
|
-
import type { DecoratorStep, DecoratorContext } from '../interfaces';
|
|
3
|
-
/**
|
|
4
|
-
* Readonly step - marks properties as readonly when their condition evaluates to true.
|
|
5
|
-
* Runs last in the pipeline.
|
|
6
|
-
*/
|
|
7
|
-
export declare class Readonly implements DecoratorStep {
|
|
8
|
-
readonly name = "readonly";
|
|
9
|
-
/**
|
|
10
|
-
* Marks properties as readonly when their condition evaluates to true.
|
|
11
|
-
*
|
|
12
|
-
* @param target - The class prototype containing decorator metadata
|
|
13
|
-
* @param definition - The schema definition to modify
|
|
14
|
-
* @param context - Runtime context for condition evaluation
|
|
15
|
-
*/
|
|
16
|
-
init(target: object, definition: Definition, context: DecoratorContext): void;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=Readonly.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Readonly.d.ts","sourceRoot":"","sources":["../../../../../../../src/sync/common/decoration/steps/Readonly.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAIrE;;;GAGG;AACH,qBAAa,QAAS,YAAW,aAAa;IAC1C,QAAQ,CAAC,IAAI,cAAc;IAE3B;;;;;;OAMG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,gBAAgB,GAAG,IAAI;CAuBhF"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Readonly = void 0;
|
|
4
|
-
const decorators_1 = require("../decorators");
|
|
5
|
-
const condition_evaluator_1 = require("../condition-evaluator");
|
|
6
|
-
/**
|
|
7
|
-
* Readonly step - marks properties as readonly when their condition evaluates to true.
|
|
8
|
-
* Runs last in the pipeline.
|
|
9
|
-
*/
|
|
10
|
-
class Readonly {
|
|
11
|
-
constructor() {
|
|
12
|
-
this.name = 'readonly';
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Marks properties as readonly when their condition evaluates to true.
|
|
16
|
-
*
|
|
17
|
-
* @param target - The class prototype containing decorator metadata
|
|
18
|
-
* @param definition - The schema definition to modify
|
|
19
|
-
* @param context - Runtime context for condition evaluation
|
|
20
|
-
*/
|
|
21
|
-
init(target, definition, context) {
|
|
22
|
-
if (!definition?.properties || !target) {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
const evaluator = new condition_evaluator_1.ConditionEvaluator(context);
|
|
26
|
-
for (const propertyName in definition.properties) {
|
|
27
|
-
const property = definition.properties[propertyName];
|
|
28
|
-
const readonlyConditions = Reflect.getMetadata(decorators_1.metadataKeys.readonly, target, propertyName);
|
|
29
|
-
if (readonlyConditions) {
|
|
30
|
-
// Readonly when ANY condition IS met (OR semantics across multiple @readonly decorators)
|
|
31
|
-
for (const condition of readonlyConditions) {
|
|
32
|
-
const { passed } = evaluator.evaluate(condition);
|
|
33
|
-
if (passed) {
|
|
34
|
-
property.readOnly = true;
|
|
35
|
-
break;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
exports.Readonly = Readonly;
|
|
43
|
-
//# sourceMappingURL=Readonly.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Readonly.js","sourceRoot":"","sources":["../../../../../../../src/sync/common/decoration/steps/Readonly.ts"],"names":[],"mappings":";;;AAEA,8CAA6C;AAC7C,gEAA4D;AAE5D;;;GAGG;AACH,MAAa,QAAQ;IAArB;QACa,SAAI,GAAG,UAAU,CAAC;IAgC/B,CAAC;IA9BG;;;;;;OAMG;IACH,IAAI,CAAC,MAAc,EAAE,UAAsB,EAAE,OAAyB;QAClE,IAAI,CAAC,UAAU,EAAE,UAAU,IAAI,CAAC,MAAM,EAAE,CAAC;YACrC,OAAO;QACX,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,wCAAkB,CAAC,OAAO,CAAC,CAAC;QAElD,KAAK,MAAM,YAAY,IAAI,UAAU,CAAC,UAAU,EAAE,CAAC;YAC/C,MAAM,QAAQ,GAAG,UAAU,CAAC,UAAU,CAAC,YAAY,CAAe,CAAC;YACnE,MAAM,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAAC,yBAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;YAE5F,IAAI,kBAAkB,EAAE,CAAC;gBACrB,yFAAyF;gBACzF,KAAK,MAAM,SAAS,IAAI,kBAAkB,EAAE,CAAC;oBACzC,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;oBACjD,IAAI,MAAM,EAAE,CAAC;wBACT,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC;wBACzB,MAAM;oBACV,CAAC;gBACL,CAAC;YACL,CAAC;QACL,CAAC;IACL,CAAC;CACJ;AAjCD,4BAiCC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { Definition } from 'typescript-json-schema';
|
|
2
|
-
import type { DecoratorStep, DecoratorContext } from '../interfaces';
|
|
3
|
-
/**
|
|
4
|
-
* Validity step - hides properties and filters enum values based on UI5 version requirements.
|
|
5
|
-
* Runs first in the pipeline.
|
|
6
|
-
*/
|
|
7
|
-
export declare class Validity implements DecoratorStep {
|
|
8
|
-
readonly name = "validity";
|
|
9
|
-
/**
|
|
10
|
-
* Hides properties or filters enum values based on UI5 version requirements.
|
|
11
|
-
*
|
|
12
|
-
* @param target - The class prototype containing decorator metadata
|
|
13
|
-
* @param definition - The schema definition to modify
|
|
14
|
-
* @param context - Runtime context providing the minimum UI5 version
|
|
15
|
-
*/
|
|
16
|
-
init(target: object, definition: Definition, context: DecoratorContext): void;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=Validity.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Validity.d.ts","sourceRoot":"","sources":["../../../../../../../src/sync/common/decoration/steps/Validity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAKrE;;;GAGG;AACH,qBAAa,QAAS,YAAW,aAAa;IAC1C,QAAQ,CAAC,IAAI,cAAc;IAE3B;;;;;;OAMG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,gBAAgB,GAAG,IAAI;CAkDhF"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Validity = void 0;
|
|
4
|
-
const ux_specification_types_1 = require("@sap/ux-specification-types");
|
|
5
|
-
const utils_1 = require("../../../v4/sync-rules/utils");
|
|
6
|
-
const decorators_1 = require("../decorators");
|
|
7
|
-
const enum_utils_1 = require("./enum-utils");
|
|
8
|
-
/**
|
|
9
|
-
* Validity step - hides properties and filters enum values based on UI5 version requirements.
|
|
10
|
-
* Runs first in the pipeline.
|
|
11
|
-
*/
|
|
12
|
-
class Validity {
|
|
13
|
-
constructor() {
|
|
14
|
-
this.name = 'validity';
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Hides properties or filters enum values based on UI5 version requirements.
|
|
18
|
-
*
|
|
19
|
-
* @param target - The class prototype containing decorator metadata
|
|
20
|
-
* @param definition - The schema definition to modify
|
|
21
|
-
* @param context - Runtime context providing the minimum UI5 version
|
|
22
|
-
*/
|
|
23
|
-
init(target, definition, context) {
|
|
24
|
-
const minUI5Version = context.app?.getMinUI5Version?.();
|
|
25
|
-
if (!definition?.properties || !minUI5Version) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
for (const propertyName in definition.properties) {
|
|
29
|
-
const property = definition.properties[propertyName];
|
|
30
|
-
const validityInfo = Reflect.getMetadata(decorators_1.metadataKeys.validity, target, propertyName);
|
|
31
|
-
// Check if property has a 'since' requirement that exceeds the app's minUI5Version
|
|
32
|
-
if (validityInfo?.since && !(0, utils_1.compareUI5Versions)(minUI5Version, validityInfo.since)) {
|
|
33
|
-
property[ux_specification_types_1.SchemaTag.hidden] = true;
|
|
34
|
-
}
|
|
35
|
-
// Process enum validity configuration
|
|
36
|
-
if (validityInfo?.enum) {
|
|
37
|
-
const enumValues = (0, enum_utils_1.resolveEnumFromProperty)(property, context);
|
|
38
|
-
if (enumValues) {
|
|
39
|
-
const filteredEnum = enumValues.filter((enumValue) => {
|
|
40
|
-
const enumValueStr = String(enumValue);
|
|
41
|
-
const condition = validityInfo.enum?.[enumValueStr];
|
|
42
|
-
if (!condition) {
|
|
43
|
-
return true; // Keep values without conditions
|
|
44
|
-
}
|
|
45
|
-
// Check UI5 version requirement
|
|
46
|
-
if (condition.since && minUI5Version) {
|
|
47
|
-
if (!(0, utils_1.compareUI5Versions)(minUI5Version, condition.since)) {
|
|
48
|
-
return false;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
// Check property dependency using dependsOn function
|
|
52
|
-
if (condition.dependsOn) {
|
|
53
|
-
if (!condition.dependsOn(context)) {
|
|
54
|
-
return false;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
return true;
|
|
58
|
-
});
|
|
59
|
-
if (filteredEnum.length !== enumValues.length) {
|
|
60
|
-
(0, enum_utils_1.applyFilteredEnumToProperty)(property, filteredEnum, context);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
exports.Validity = Validity;
|
|
68
|
-
//# sourceMappingURL=Validity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Validity.js","sourceRoot":"","sources":["../../../../../../../src/sync/common/decoration/steps/Validity.ts"],"names":[],"mappings":";;;AACA,wEAAwD;AAExD,wDAAkE;AAClE,8CAA6C;AAC7C,6CAAoF;AAEpF;;;GAGG;AACH,MAAa,QAAQ;IAArB;QACa,SAAI,GAAG,UAAU,CAAC;IA2D/B,CAAC;IAzDG;;;;;;OAMG;IACH,IAAI,CAAC,MAAc,EAAE,UAAsB,EAAE,OAAyB;QAClE,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,EAAE,gBAAgB,EAAE,EAAE,CAAC;QACxD,IAAI,CAAC,UAAU,EAAE,UAAU,IAAI,CAAC,aAAa,EAAE,CAAC;YAC5C,OAAO;QACX,CAAC;QAED,KAAK,MAAM,YAAY,IAAI,UAAU,CAAC,UAAU,EAAE,CAAC;YAC/C,MAAM,QAAQ,GAAG,UAAU,CAAC,UAAU,CAAC,YAAY,CAAe,CAAC;YACnE,MAAM,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,yBAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;YAEtF,mFAAmF;YACnF,IAAI,YAAY,EAAE,KAAK,IAAI,CAAC,IAAA,0BAAkB,EAAC,aAAa,EAAE,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;gBAChF,QAAQ,CAAC,kCAAS,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;YACtC,CAAC;YAED,sCAAsC;YACtC,IAAI,YAAY,EAAE,IAAI,EAAE,CAAC;gBACrB,MAAM,UAAU,GAAG,IAAA,oCAAuB,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;gBAC9D,IAAI,UAAU,EAAE,CAAC;oBACb,MAAM,YAAY,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE;wBACjD,MAAM,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;wBACvC,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,EAAE,CAAC,YAAY,CAAC,CAAC;wBACpD,IAAI,CAAC,SAAS,EAAE,CAAC;4BACb,OAAO,IAAI,CAAC,CAAC,iCAAiC;wBAClD,CAAC;wBAED,gCAAgC;wBAChC,IAAI,SAAS,CAAC,KAAK,IAAI,aAAa,EAAE,CAAC;4BACnC,IAAI,CAAC,IAAA,0BAAkB,EAAC,aAAa,EAAE,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;gCACtD,OAAO,KAAK,CAAC;4BACjB,CAAC;wBACL,CAAC;wBAED,qDAAqD;wBACrD,IAAI,SAAS,CAAC,SAAS,EAAE,CAAC;4BACtB,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC;gCAChC,OAAO,KAAK,CAAC;4BACjB,CAAC;wBACL,CAAC;wBAED,OAAO,IAAI,CAAC;oBAChB,CAAC,CAAC,CAAC;oBAEH,IAAI,YAAY,CAAC,MAAM,KAAK,UAAU,CAAC,MAAM,EAAE,CAAC;wBAC5C,IAAA,wCAA2B,EAAC,QAAQ,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;oBACjE,CAAC;gBACL,CAAC;YACL,CAAC;QACL,CAAC;IACL,CAAC;CACJ;AA5DD,4BA4DC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Definition } from 'typescript-json-schema';
|
|
2
|
-
import type { DecoratorContext } from '../interfaces';
|
|
3
|
-
/**
|
|
4
|
-
* Resolves the current enum values from a property, following $ref if needed.
|
|
5
|
-
*
|
|
6
|
-
* @param property - The schema property definition
|
|
7
|
-
* @param context - Runtime context for schema access
|
|
8
|
-
* @returns The enum values array, or undefined if no enum is found
|
|
9
|
-
*/
|
|
10
|
-
export declare function resolveEnumFromProperty(property: Definition, context: DecoratorContext): string[] | undefined;
|
|
11
|
-
/**
|
|
12
|
-
* Applies filtered enum values to a property, inlining $ref types if needed.
|
|
13
|
-
*
|
|
14
|
-
* @param property - The schema property definition to modify
|
|
15
|
-
* @param filteredEnum - The filtered list of allowed enum values
|
|
16
|
-
* @param context - Runtime context for schema access
|
|
17
|
-
*/
|
|
18
|
-
export declare function applyFilteredEnumToProperty(property: Definition, filteredEnum: string[], context: DecoratorContext): void;
|
|
19
|
-
//# sourceMappingURL=enum-utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enum-utils.d.ts","sourceRoot":"","sources":["../../../../../../../src/sync/common/decoration/steps/enum-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,gBAAgB,GAAG,MAAM,EAAE,GAAG,SAAS,CAe7G;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACvC,QAAQ,EAAE,UAAU,EACpB,YAAY,EAAE,MAAM,EAAE,EACtB,OAAO,EAAE,gBAAgB,GAC1B,IAAI,CAeN"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolveEnumFromProperty = resolveEnumFromProperty;
|
|
4
|
-
exports.applyFilteredEnumToProperty = applyFilteredEnumToProperty;
|
|
5
|
-
/**
|
|
6
|
-
* Resolves the current enum values from a property, following $ref if needed.
|
|
7
|
-
*
|
|
8
|
-
* @param property - The schema property definition
|
|
9
|
-
* @param context - Runtime context for schema access
|
|
10
|
-
* @returns The enum values array, or undefined if no enum is found
|
|
11
|
-
*/
|
|
12
|
-
function resolveEnumFromProperty(property, context) {
|
|
13
|
-
if (property?.enum && Array.isArray(property.enum)) {
|
|
14
|
-
return property.enum;
|
|
15
|
-
}
|
|
16
|
-
if (property?.$ref) {
|
|
17
|
-
const refName = property.$ref.replace('#/definitions/', '');
|
|
18
|
-
const schema = context.schema?.get();
|
|
19
|
-
const refDef = schema?.definitions?.[refName];
|
|
20
|
-
if (refDef?.enum && Array.isArray(refDef.enum)) {
|
|
21
|
-
return refDef.enum;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
return undefined;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Applies filtered enum values to a property, inlining $ref types if needed.
|
|
28
|
-
*
|
|
29
|
-
* @param property - The schema property definition to modify
|
|
30
|
-
* @param filteredEnum - The filtered list of allowed enum values
|
|
31
|
-
* @param context - Runtime context for schema access
|
|
32
|
-
*/
|
|
33
|
-
function applyFilteredEnumToProperty(property, filteredEnum, context) {
|
|
34
|
-
if (property.$ref) {
|
|
35
|
-
const refName = property.$ref.replace('#/definitions/', '');
|
|
36
|
-
const schema = context.schema?.get();
|
|
37
|
-
const refDef = schema?.definitions?.[refName];
|
|
38
|
-
if (refDef?.type) {
|
|
39
|
-
property.type = refDef.type;
|
|
40
|
-
}
|
|
41
|
-
delete property.$ref;
|
|
42
|
-
property.enum = filteredEnum;
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
property.enum = filteredEnum;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=enum-utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enum-utils.js","sourceRoot":"","sources":["../../../../../../../src/sync/common/decoration/steps/enum-utils.ts"],"names":[],"mappings":";;AAUA,0DAeC;AASD,kEAmBC;AAlDD;;;;;;GAMG;AACH,SAAgB,uBAAuB,CAAC,QAAoB,EAAE,OAAyB;IACnF,IAAI,QAAQ,EAAE,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QACjD,OAAO,QAAQ,CAAC,IAAgB,CAAC;IACrC,CAAC;IAED,IAAI,QAAQ,EAAE,IAAI,EAAE,CAAC;QACjB,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;QAC5D,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC;QACrC,MAAM,MAAM,GAAG,MAAM,EAAE,WAAW,EAAE,CAAC,OAAO,CAAe,CAAC;QAC5D,IAAI,MAAM,EAAE,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;YAC7C,OAAO,MAAM,CAAC,IAAgB,CAAC;QACnC,CAAC;IACL,CAAC;IAED,OAAO,SAAS,CAAC;AACrB,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,2BAA2B,CACvC,QAAoB,EACpB,YAAsB,EACtB,OAAyB;IAEzB,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC;QAChB,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;QAC5D,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC;QACrC,MAAM,MAAM,GAAG,MAAM,EAAE,WAAW,EAAE,CAAC,OAAO,CAAe,CAAC;QAE5D,IAAI,MAAM,EAAE,IAAI,EAAE,CAAC;YACf,QAAQ,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QAChC,CAAC;QAED,OAAO,QAAQ,CAAC,IAAI,CAAC;QACrB,QAAQ,CAAC,IAAI,GAAG,YAAY,CAAC;IACjC,CAAC;SAAM,CAAC;QACJ,QAAQ,CAAC,IAAI,GAAG,YAAY,CAAC;IACjC,CAAC;AACL,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/sync/common/decoration/steps/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Readonly = exports.Hide = exports.Message = exports.Enums = exports.Validity = void 0;
|
|
4
|
-
var Validity_1 = require("./Validity");
|
|
5
|
-
Object.defineProperty(exports, "Validity", { enumerable: true, get: function () { return Validity_1.Validity; } });
|
|
6
|
-
var Enums_1 = require("./Enums");
|
|
7
|
-
Object.defineProperty(exports, "Enums", { enumerable: true, get: function () { return Enums_1.Enums; } });
|
|
8
|
-
var Message_1 = require("./Message");
|
|
9
|
-
Object.defineProperty(exports, "Message", { enumerable: true, get: function () { return Message_1.Message; } });
|
|
10
|
-
var Hide_1 = require("./Hide");
|
|
11
|
-
Object.defineProperty(exports, "Hide", { enumerable: true, get: function () { return Hide_1.Hide; } });
|
|
12
|
-
var Readonly_1 = require("./Readonly");
|
|
13
|
-
Object.defineProperty(exports, "Readonly", { enumerable: true, get: function () { return Readonly_1.Readonly; } });
|
|
14
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/sync/common/decoration/steps/index.ts"],"names":[],"mappings":";;;AAAA,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,iCAAgC;AAAvB,8FAAA,KAAK,OAAA;AACd,qCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,+BAA8B;AAArB,4FAAA,IAAI,OAAA;AACb,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file This file is a helper class for its sibling class Table.ts. It provides the logic needed to support the multiEdit property (in LR and ALP).
|
|
3
|
-
*/
|
|
4
|
-
import type { SyncRule } from '@sap/ux-specification-types';
|
|
5
|
-
import * as v2 from '@sap/ux-specification-types/src/v2/genericSchemaHandling/controls/Table';
|
|
6
|
-
export declare class MultiEdit implements v2.MultiEdit {
|
|
7
|
-
enabled?: boolean;
|
|
8
|
-
annotationPath?: string;
|
|
9
|
-
ignoredFields?: v2.IgnoredFieldsType[];
|
|
10
|
-
}
|
|
11
|
-
export declare const syncRuleMultiEdit: SyncRule;
|
|
12
|
-
//# sourceMappingURL=MultiEdit.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MultiEdit.d.ts","sourceRoot":"","sources":["../../../../../../../src/sync/v2/genericSchemaHandling/controls/MultiEdit.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,KAAK,EAKR,QAAQ,EACX,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,MAAM,yEAAyE,CAAC;AA0E9F,qBAkCa,SAAU,YAAW,EAAE,CAAC,SAAS;IAG1C,OAAO,CAAC,EAAE,OAAO,CAAC;IAelB,cAAc,CAAC,EAAE,MAAM,CAAC;IAcxB,aAAa,CAAC,EAAE,EAAE,CAAC,iBAAiB,EAAE,CAAC;CAC1C;AAED,eAAO,MAAM,iBAAiB,EAAE,QA6B/B,CAAC"}
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @file This file is a helper class for its sibling class Table.ts. It provides the logic needed to support the multiEdit property (in LR and ALP).
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
22
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
23
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
24
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
25
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
26
|
-
};
|
|
27
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
28
|
-
var ownKeys = function(o) {
|
|
29
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
30
|
-
var ar = [];
|
|
31
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
32
|
-
return ar;
|
|
33
|
-
};
|
|
34
|
-
return ownKeys(o);
|
|
35
|
-
};
|
|
36
|
-
return function (mod) {
|
|
37
|
-
if (mod && mod.__esModule) return mod;
|
|
38
|
-
var result = {};
|
|
39
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
40
|
-
__setModuleDefault(result, mod);
|
|
41
|
-
return result;
|
|
42
|
-
};
|
|
43
|
-
})();
|
|
44
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
45
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
46
|
-
};
|
|
47
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.syncRuleMultiEdit = exports.MultiEdit = void 0;
|
|
49
|
-
const i18next_1 = __importDefault(require("i18next"));
|
|
50
|
-
const v2 = __importStar(require("@sap/ux-specification-types/src/v2/genericSchemaHandling/controls/Table"));
|
|
51
|
-
const decoration_1 = require("../../../common/decoration");
|
|
52
|
-
const Table_1 = require("./Table");
|
|
53
|
-
const utils_1 = require("../../utils");
|
|
54
|
-
const manifestPropertyUtils_1 = require("../../generate/manifestPropertyUtils");
|
|
55
|
-
const common_1 = require("../../../common");
|
|
56
|
-
/**
|
|
57
|
-
* This function adapts getSyncRuleForManifestProperty for properties belonging to the multiEdit object inside the tableSettings.
|
|
58
|
-
*
|
|
59
|
-
* @param property - the property name inside multiEdit
|
|
60
|
-
* @param propertyIndex - index of the property inside multiEdit (used to achieve an ordering which is more logical than alphabetical)
|
|
61
|
-
* @param expectedType -type of the property
|
|
62
|
-
* @param onlyEnabled - whether the property is only allowed when multiEdit is enabled
|
|
63
|
-
* @param addEnum - optional function for adding enum values to the property definition
|
|
64
|
-
* @returns the SyncRule for the multiEdit property
|
|
65
|
-
*/
|
|
66
|
-
function getSyncRuleForMultiEditProperty(property, propertyIndex, expectedType, onlyEnabled = false, addEnum) {
|
|
67
|
-
const analyze = function (element, schemaHandlingParams) {
|
|
68
|
-
const multiEditInfo = schemaHandlingParams.specificParams;
|
|
69
|
-
const rule = {
|
|
70
|
-
manifestPath: multiEditInfo.manifestPath
|
|
71
|
-
};
|
|
72
|
-
if (onlyEnabled && !multiEditInfo.enabled) {
|
|
73
|
-
rule.disallowedReason = i18next_1.default.t('PROPERTYONLYMULTIEDIT', { property });
|
|
74
|
-
}
|
|
75
|
-
return rule;
|
|
76
|
-
}; // analyze
|
|
77
|
-
const adapt = function (element, schemaHandlingParams, generateParameters) {
|
|
78
|
-
element['propertyIndex'] = propertyIndex;
|
|
79
|
-
if (addEnum) {
|
|
80
|
-
const multiEditInfo = schemaHandlingParams.specificParams;
|
|
81
|
-
if (multiEditInfo.entityTypeDefinition) {
|
|
82
|
-
addEnum(element, multiEditInfo.entityTypeDefinition);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
return (0, manifestPropertyUtils_1.getSyncRuleForManifestProperty)(property, analyze, adapt, undefined, expectedType);
|
|
87
|
-
}
|
|
88
|
-
// MultiEdit
|
|
89
|
-
// This is the type which is used for describing the multiEdit manifest property (only in case this property is allowed for the current table)
|
|
90
|
-
let MultiEdit = class MultiEdit {
|
|
91
|
-
};
|
|
92
|
-
exports.MultiEdit = MultiEdit;
|
|
93
|
-
__decorate([
|
|
94
|
-
(0, decoration_1.syncRule)(getSyncRuleForMultiEditProperty('enabled', 0, 'boolean'))
|
|
95
|
-
], MultiEdit.prototype, "enabled", void 0);
|
|
96
|
-
__decorate([
|
|
97
|
-
(0, decoration_1.syncRule)(getSyncRuleForMultiEditProperty('annotationPath', 1, 'string', true, function (element, entityTypeDefinition) {
|
|
98
|
-
const fieldGroups = (0, common_1.getListOfValidAnnotations)(entityTypeDefinition, ["com.sap.vocabularies.UI.v1.FieldGroup" /* UIAnnotationTerms.FieldGroup */]);
|
|
99
|
-
element.enum = fieldGroups;
|
|
100
|
-
}))
|
|
101
|
-
], MultiEdit.prototype, "annotationPath", void 0);
|
|
102
|
-
__decorate([
|
|
103
|
-
(0, decoration_1.syncRule)(getSyncRuleForMultiEditProperty('ignoredFields', 2, 'string', true, function (bluePrint, entityTypeDefinition) {
|
|
104
|
-
(0, Table_1.addEntityTypeFieldsAsEnum)(bluePrint, entityTypeDefinition);
|
|
105
|
-
}))
|
|
106
|
-
], MultiEdit.prototype, "ignoredFields", void 0);
|
|
107
|
-
exports.MultiEdit = MultiEdit = __decorate([
|
|
108
|
-
(0, decoration_1.syncRule)({
|
|
109
|
-
processingRuleAdapter(processingRule, schemaHandlingParams, generateParameters) {
|
|
110
|
-
const tableParams = schemaHandlingParams.specificParams;
|
|
111
|
-
const settings = tableParams.multiTableInfo?.variantInfo
|
|
112
|
-
? tableParams.multiTableInfo.variantInfo.variantDefinition
|
|
113
|
-
: tableParams.settings;
|
|
114
|
-
const tableSettings = settings?.['tableSettings'];
|
|
115
|
-
const hasTypeError = (0, manifestPropertyUtils_1.hasPropertyTypeError)(tableSettings, 'multiEdit', generateParameters.logger, 'object');
|
|
116
|
-
if (hasTypeError) {
|
|
117
|
-
delete processingRule.element;
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
const multiEdit = tableSettings?.multiEdit;
|
|
121
|
-
const enabled = !!multiEdit?.enabled;
|
|
122
|
-
const entityTypeDefinition = tableParams.multiTableInfo?.variantInfo
|
|
123
|
-
? tableParams.multiTableInfo.variantInfo.entityTypeDefinition
|
|
124
|
-
: tableParams.entityType;
|
|
125
|
-
const manifestPath = (0, Table_1.getManifestPathForTableSettings)(schemaHandlingParams, tableParams);
|
|
126
|
-
manifestPath.push('multiEdit');
|
|
127
|
-
const multiEditInfo = {
|
|
128
|
-
enabled,
|
|
129
|
-
multiEdit,
|
|
130
|
-
entityTypeDefinition,
|
|
131
|
-
manifestPath
|
|
132
|
-
};
|
|
133
|
-
processingRule.referenceAdaptation = {
|
|
134
|
-
specificParams: multiEditInfo
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
})
|
|
138
|
-
], MultiEdit);
|
|
139
|
-
exports.syncRuleMultiEdit = {
|
|
140
|
-
processingRuleAdapter(processingRule, schemaHandlingParams, generateParameters) {
|
|
141
|
-
const tableParams = schemaHandlingParams.specificParams;
|
|
142
|
-
const tableType = (0, Table_1.getTableType)(tableParams);
|
|
143
|
-
let disallowedReason;
|
|
144
|
-
if (tableParams.settings?.isWorklist) {
|
|
145
|
-
disallowedReason = i18next_1.default.t('MULTIEDITNOWORKLIST');
|
|
146
|
-
}
|
|
147
|
-
else if (tableParams.multiTableInfo?.variantInfo?.isChart) {
|
|
148
|
-
disallowedReason = i18next_1.default.t('MULTIEDITNOCHART');
|
|
149
|
-
}
|
|
150
|
-
else if (tableType === v2.TableTypeV2Enum.AnalyticalTable || tableType === v2.TableTypeV2Enum.TreeTable) {
|
|
151
|
-
disallowedReason = i18next_1.default.t('MULTIEDITTABLETYPE');
|
|
152
|
-
}
|
|
153
|
-
if (disallowedReason) {
|
|
154
|
-
const manifestPath = (0, Table_1.getManifestPathForTableSettings)(schemaHandlingParams, tableParams);
|
|
155
|
-
const { value } = (0, utils_1.getManifestPropertyByPath)(generateParameters.manifest, manifestPath, 'multiEdit');
|
|
156
|
-
(0, manifestPropertyUtils_1.handleDisallowedProperty)(disallowedReason, processingRule, value, manifestPath);
|
|
157
|
-
return;
|
|
158
|
-
}
|
|
159
|
-
processingRule.referenceAdaptation = {
|
|
160
|
-
suffix: tableParams.multiTableInfo?.variantInfo
|
|
161
|
-
? tableParams.multiTableInfo.variantInfo.iconTabFilterKey
|
|
162
|
-
: undefined,
|
|
163
|
-
syncRuleProvider: MultiEdit
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
};
|
|
167
|
-
//# sourceMappingURL=MultiEdit.js.map
|