@sap/open.fe 1.96.0 → 1.97.0
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/package.json +1 -1
- package/packages/sap.fe.common/src/sap/fe/common/.library +1 -1
- package/packages/sap.fe.common/src/sap/fe/common/.theming +1 -1
- package/packages/sap.fe.common/src/sap/fe/common/MessageButton-dbg.js +57 -42
- package/packages/sap.fe.common/src/sap/fe/common/MessageButton.js +1 -1
- package/packages/sap.fe.common/src/sap/fe/common/library-dbg.js +1 -1
- package/packages/sap.fe.common/src/sap/fe/common/library-h2-preload.js +2 -2
- package/packages/sap.fe.common/src/sap/fe/common/library-preload.js +4 -4
- package/packages/sap.fe.common/src/sap/fe/common/library-preload.js.map +3 -3
- package/packages/sap.fe.common/src/sap/fe/common/library.js +1 -1
- package/packages/sap.fe.common/src/sap/fe/common/manifest.json +3 -3
- package/packages/sap.fe.common/src/sap/fe/common/resources.json +4 -4
- package/packages/sap.fe.common/test/sap/fe/common/designtime/api.json +1 -1
- package/packages/sap.fe.common/test/sap/fe/common/designtime/apiref/api.json +1 -1
- package/packages/sap.fe.common/test/sap/fe/common/designtime/codeassistance/Library.xmlmeta.json +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/.library +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/.theming +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/AnnotationHelper-dbg.js +2 -2
- package/packages/sap.fe.core/src/sap/fe/core/AnnotationHelper.js +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/CommonUtils-dbg.js +59 -274
- package/packages/sap.fe.core/src/sap/fe/core/CommonUtils.js +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/RouterProxy-dbg.js +52 -64
- package/packages/sap.fe.core/src/sap/fe/core/RouterProxy.js +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/TemplateComponent-dbg.js +2 -2
- package/packages/sap.fe.core/src/sap/fe/core/TemplateComponent.js +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/TransactionHelper-dbg.js +18 -22
- package/packages/sap.fe.core/src/sap/fe/core/TransactionHelper.js +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/actions/messageHandling-dbg.js +80 -4
- package/packages/sap.fe.core/src/sap/fe/core/actions/messageHandling.js +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/actions/operations-dbg.js +42 -23
- package/packages/sap.fe.core/src/sap/fe/core/actions/operations.js +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/controllerextensions/EditFlow-dbg.js +36 -21
- package/packages/sap.fe.core/src/sap/fe/core/controllerextensions/EditFlow.js +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation-dbg.js +9 -3
- package/packages/sap.fe.core/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/controllerextensions/InternalRouting-dbg.js +20 -50
- package/packages/sap.fe.core/src/sap/fe/core/controllerextensions/InternalRouting.js +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/controllerextensions/MessageHandler-dbg.js +222 -102
- package/packages/sap.fe.core/src/sap/fe/core/controllerextensions/MessageHandler.js +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/controllerextensions/ViewState-dbg.js +33 -6
- package/packages/sap.fe.core/src/sap/fe/core/controllerextensions/ViewState.js +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/controls/CustomQuickViewPage-dbg.js +109 -111
- package/packages/sap.fe.core/src/sap/fe/core/controls/CustomQuickViewPage.js +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/controls/filterbar.d-dbg.js +8 -0
- package/packages/sap.fe.core/src/sap/fe/core/controls/filterbar.d.js +5 -0
- package/packages/sap.fe.core/src/sap/fe/core/controls/filterbar.d.ts +0 -0
- package/packages/sap.fe.core/src/sap/fe/core/converters/ManifestSettings-dbg.js +2 -1
- package/packages/sap.fe.core/src/sap/fe/core/converters/ManifestSettings.js +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/converters/ManifestSettings.ts +4 -1
- package/packages/sap.fe.core/src/sap/fe/core/converters/MetaModelConverter-dbg.js +10 -1
- package/packages/sap.fe.core/src/sap/fe/core/converters/MetaModelConverter.js +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/converters/MetaModelConverter.ts +9 -1
- package/packages/sap.fe.core/src/sap/fe/core/converters/annotations/DataField-dbg.js +2 -2
- package/packages/sap.fe.core/src/sap/fe/core/converters/annotations/DataField.js +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/converters/annotations/DataField.ts +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/converters/common/AnnotationConverter-dbg.js +67 -40
- package/packages/sap.fe.core/src/sap/fe/core/converters/common/AnnotationConverter.js +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/converters/controls/Common/Action-dbg.js +6 -3
- package/packages/sap.fe.core/src/sap/fe/core/converters/controls/Common/Action.js +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/converters/controls/Common/Action.ts +6 -3
- package/packages/sap.fe.core/src/sap/fe/core/converters/controls/Common/Form-dbg.js +57 -18
- package/packages/sap.fe.core/src/sap/fe/core/converters/controls/Common/Form.js +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/converters/controls/Common/Form.ts +51 -13
- package/packages/sap.fe.core/src/sap/fe/core/converters/controls/Common/Table-dbg.js +130 -19
- package/packages/sap.fe.core/src/sap/fe/core/converters/controls/Common/Table.js +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/converters/controls/Common/Table.ts +139 -18
- package/packages/sap.fe.core/src/sap/fe/core/converters/helpers/ID-dbg.js +9 -1
- package/packages/sap.fe.core/src/sap/fe/core/converters/helpers/ID.js +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/converters/helpers/ID.ts +4 -0
- package/packages/sap.fe.core/src/sap/fe/core/converters/templates/ListReportConverter-dbg.js +18 -7
- package/packages/sap.fe.core/src/sap/fe/core/converters/templates/ListReportConverter.js +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/converters/templates/ListReportConverter.ts +17 -12
- package/packages/sap.fe.core/src/sap/fe/core/designtime/AppComponent-dbg.designtime.js +2 -1
- package/packages/sap.fe.core/src/sap/fe/core/designtime/AppComponent.designtime.js +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/designtime/library-preload.designtime.js +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/designtime/library-preload.designtime.js.map +2 -2
- package/packages/sap.fe.core/src/sap/fe/core/formatters/TableFormatter-dbg.js +27 -4
- package/packages/sap.fe.core/src/sap/fe/core/formatters/TableFormatter.js +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/formatters/TableFormatter.ts +20 -3
- package/packages/sap.fe.core/src/sap/fe/core/fpm/manifest.json +2 -2
- package/packages/sap.fe.core/src/sap/fe/core/helpers/KeepAliveHelper-dbg.js +211 -0
- package/packages/sap.fe.core/src/sap/fe/core/helpers/KeepAliveHelper.js +5 -0
- package/packages/sap.fe.core/src/sap/fe/core/helpers/KeepAliveHelper.ts +202 -0
- package/packages/sap.fe.core/src/sap/fe/core/helpers/KeepAliveRefreshTypes-dbg.js +32 -0
- package/packages/sap.fe.core/src/sap/fe/core/helpers/KeepAliveRefreshTypes.js +5 -0
- package/packages/sap.fe.core/src/sap/fe/core/helpers/KeepAliveRefreshTypes.ts +36 -0
- package/packages/sap.fe.core/src/sap/fe/core/helpers/ModelHelper-dbg.js +51 -0
- package/packages/sap.fe.core/src/sap/fe/core/helpers/ModelHelper.js +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/library-dbg.js +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/library-h2-preload.js +10 -9
- package/packages/sap.fe.core/src/sap/fe/core/library-h2-preload.js.map +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/library-preload.js +232 -228
- package/packages/sap.fe.core/src/sap/fe/core/library-preload.js.map +4 -4
- package/packages/sap.fe.core/src/sap/fe/core/library.js +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/manifest.json +10 -10
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle.properties +15 -1
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_ar.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_bg.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_ca.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_cs.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_cy.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_da.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_de.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_el.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_en.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_en_GB.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_en_US_sappsd.properties +6 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_en_US_saprigi.properties +11 -1
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_en_US_saptrc.properties +11 -1
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_es.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_es_MX.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_et.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_fi.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_fr.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_fr_CA.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_hi.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_hr.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_hu.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_id.properties +11 -1
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_it.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_iw.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_ja.properties +19 -9
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_kk.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_ko.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_lt.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_lv.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_ms.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_nl.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_no.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_pl.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_pt.properties +11 -1
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_pt_PT.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_ro.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_ru.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_sh.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_sk.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_sl.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_sv.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_th.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_tr.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_uk.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_vi.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_zh_CN.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/messagebundle_zh_TW.properties +10 -0
- package/packages/sap.fe.core/src/sap/fe/core/resources.json +200 -121
- package/packages/sap.fe.core/src/sap/fe/core/services/RoutingServiceFactory-dbg.js +30 -19
- package/packages/sap.fe.core/src/sap/fe/core/services/RoutingServiceFactory.js +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/services/TemplatedViewServiceFactory-dbg.js +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/services/TemplatedViewServiceFactory.js +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/templating/EntitySetHelper-dbg.js +80 -7
- package/packages/sap.fe.core/src/sap/fe/core/templating/EntitySetHelper.js +1 -1
- package/packages/sap.fe.core/src/sap/fe/core/templating/EntitySetHelper.ts +42 -2
- package/packages/sap.fe.core/test/sap/fe/core/designtime/api.json +1 -1
- package/packages/sap.fe.core/test/sap/fe/core/designtime/apiref/api.json +1 -1
- package/packages/sap.fe.core/test/sap/fe/core/designtime/codeassistance/Library.xmlmeta.json +1 -1
- package/packages/sap.fe.core/test/sap/fe/core/fpmExplorer/topics/buildingBlocks/buildingBlockOverview.md +4 -0
- package/packages/sap.fe.core/test/sap/fe/core/fpmExplorer/topics/buildingBlocks/chart/chartDefault/ChartDefault.view.xml +1 -0
- package/packages/sap.fe.core/test/sap/fe/core/fpmExplorer/topics/controllerExtensions/viewState/manifest.json +2 -2
- package/packages/sap.fe.core/test/sap/fe/core/fpmExplorer/topics/customElements/customColumn/customColumnContent/CustomColumnAdaptation.fragment.xml +13 -10
- package/packages/sap.fe.core/test/sap/fe/core/fpmExplorer/topics/customElements/customColumn/customColumnContent/CustomColumnButton.fragment.xml +7 -4
- package/packages/sap.fe.core/test/sap/fe/core/fpmExplorer/topics/customElements/customColumn/customColumnContent/localService/service.cds +1 -2
- package/packages/sap.fe.core/test/sap/fe/core/fpmExplorer/topics/customElements/customColumn/customColumnContent/manifest.json +1 -0
- package/packages/sap.fe.core/test/sap/fe/core/jest/CommonUtils.spec.js +119 -0
- package/packages/sap.fe.core/test/sap/fe/core/jest/__snapshots__/TemplateConverter.spec.ts.snap +285 -4
- package/packages/sap.fe.core/test/sap/fe/core/jest/controllerextensions/MessageHandler.spec.js +121 -0
- package/packages/sap.fe.core/test/sap/fe/core/jest/controllerextensions/MessageHandler.spec.ts +79 -0
- package/packages/sap.fe.core/test/sap/fe/core/jest/controllerextensions/ViewState.spec.js +147 -0
- package/packages/sap.fe.core/test/sap/fe/core/jest/controllerextensions/ViewState.spec.ts +96 -0
- package/packages/sap.fe.core/test/sap/fe/core/jest/converters/Table.spec.js +51 -18
- package/packages/sap.fe.core/test/sap/fe/core/jest/converters/Table.spec.ts +109 -17
- package/packages/sap.fe.core/test/sap/fe/core/jest/converters/__snapshots__/MetaModelConverter.spec.ts.snap +66 -0
- package/packages/sap.fe.core/test/sap/fe/core/jest/data/EntitySetHelper.cds +33 -0
- package/packages/sap.fe.core/test/sap/fe/core/jest/data/EntitySetHelperMainEntitySortableFalse.cds +12 -0
- package/packages/sap.fe.core/test/sap/fe/core/jest/data/TableGetSelectionMode.cds +8 -8
- package/packages/sap.fe.core/test/sap/fe/core/jest/formatters/TableFormatters.spec.js +68 -0
- package/packages/sap.fe.core/test/sap/fe/core/jest/formatters/TableFormatters.spec.ts +38 -0
- package/packages/sap.fe.core/test/sap/fe/core/jest/helpers/KeepAliveHelper.spec.js +483 -0
- package/packages/sap.fe.core/test/sap/fe/core/jest/helpers/KeepAliveHelper.spec.ts +376 -0
- package/packages/sap.fe.core/test/sap/fe/core/jest/helpers/KeepAliveHelperTestData/ControlRefreshStrategyTests.js +101 -0
- package/packages/sap.fe.core/test/sap/fe/core/jest/helpers/KeepAliveHelperTestData/ControlRefreshStrategyTests.ts +105 -0
- package/packages/sap.fe.core/test/sap/fe/core/jest/helpers/KeepAliveHelperTestData/ControlsForRefreshTests.js +103 -0
- package/packages/sap.fe.core/test/sap/fe/core/jest/helpers/KeepAliveHelperTestData/ControlsForRefreshTests.ts +106 -0
- package/packages/sap.fe.core/test/sap/fe/core/jest/helpers/KeepAliveHelperTestData/RefreshStrategyForIntentTests.js +118 -0
- package/packages/sap.fe.core/test/sap/fe/core/jest/helpers/KeepAliveHelperTestData/RefreshStrategyForIntentTests.ts +118 -0
- package/packages/sap.fe.core/test/sap/fe/core/jest/helpers/KeepAliveHelperTestData/StoreStrategyTests.js +101 -0
- package/packages/sap.fe.core/test/sap/fe/core/jest/helpers/KeepAliveHelperTestData/StoreStrategyTests.ts +102 -0
- package/packages/sap.fe.core/test/sap/fe/core/jest/helpers/ModelHelper.spec.js +118 -1
- package/packages/sap.fe.core/test/sap/fe/core/jest/services/RoutingServiceFactory.spec.js +70 -0
- package/packages/sap.fe.core/test/sap/fe/core/jest/templating/EntitySetHelper.spec.js +89 -0
- package/packages/sap.fe.core/test/sap/fe/core/jest/templating/EntitySetHelper.spec.ts +73 -0
- package/packages/sap.fe.core/test/sap/fe/core/qunit/TemplatingExpressions.qunit.js +4 -2
- package/packages/sap.fe.core/test/sap/fe/core/qunit/apps/generalTests.json +6 -0
- package/packages/sap.fe.macros/src/sap/fe/macros/.library +1 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/.theming +1 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/ChartDelegate-dbg.js +15 -5
- package/packages/sap.fe.macros/src/sap/fe/macros/ChartDelegate.js +1 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/CommonHelper-dbg.js +9 -5
- package/packages/sap.fe.macros/src/sap/fe/macros/CommonHelper.js +1 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/DelegateUtil-dbg.js +30 -11
- package/packages/sap.fe.macros/src/sap/fe/macros/DelegateUtil.js +1 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/FieldAPI-dbg.js +3 -5
- package/packages/sap.fe.macros/src/sap/fe/macros/FieldAPI.js +1 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/FieldAPI.ts +3 -5
- package/packages/sap.fe.macros/src/sap/fe/macros/FieldValueHelpDelegate-dbg.js +17 -3
- package/packages/sap.fe.macros/src/sap/fe/macros/FieldValueHelpDelegate.js +1 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/FilterBarAPI-dbg.js +1 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/FilterBarAPI.ts +1 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/FilterBarDelegate-dbg.js +4 -4
- package/packages/sap.fe.macros/src/sap/fe/macros/FilterBarDelegate.js +1 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/FlexibleColumnLayoutActions.fragment.xml +6 -15
- package/packages/sap.fe.macros/src/sap/fe/macros/FormContainer.fragment.xml +14 -12
- package/packages/sap.fe.macros/src/sap/fe/macros/PhantomUtil-dbg.js +1 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/PhantomUtil.js +1 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/Table.fragment.xml +2 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/Table.metadata-dbg.js +12 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/Table.metadata.js +1 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/TableAPI-dbg.js +15 -8
- package/packages/sap.fe.macros/src/sap/fe/macros/TableAPI.js +1 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/TableAPI.ts +10 -0
- package/packages/sap.fe.macros/src/sap/fe/macros/chart/ChartHelper-dbg.js +1 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/chart/ChartHelper.js +1 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/field/FieldHelper-dbg.js +81 -9
- package/packages/sap.fe.macros/src/sap/fe/macros/field/FieldHelper.js +1 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/field/FieldRuntime-dbg.js +13 -3
- package/packages/sap.fe.macros/src/sap/fe/macros/field/FieldRuntime.js +1 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/field/FieldTemplating-dbg.js +5 -5
- package/packages/sap.fe.macros/src/sap/fe/macros/field/FieldTemplating.js +1 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/field/FieldTemplating.ts +4 -4
- package/packages/sap.fe.macros/src/sap/fe/macros/field/QuickViewLinkContactContent.fragment.xml +1 -7
- package/packages/sap.fe.macros/src/sap/fe/macros/field/QuickViewLinkDelegate-dbg.js +5 -3
- package/packages/sap.fe.macros/src/sap/fe/macros/field/QuickViewLinkDelegate.js +1 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/field/QuickViewLinkForContact.fragment.xml +1 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/formcontainer/FormContainerRuntime-dbg.js +46 -0
- package/packages/sap.fe.macros/src/sap/fe/macros/formcontainer/FormContainerRuntime.js +6 -0
- package/packages/sap.fe.macros/src/sap/fe/macros/internal/Field.fragment.xml +17 -8
- package/packages/sap.fe.macros/src/sap/fe/macros/internal/field/FieldStructure.fragment.xml +26 -16
- package/packages/sap.fe.macros/src/sap/fe/macros/internal/field/editStyle/File.fragment.xml +1 -0
- package/packages/sap.fe.macros/src/sap/fe/macros/internal/helpers/DataPointTemplating-dbg.js +4 -13
- package/packages/sap.fe.macros/src/sap/fe/macros/internal/helpers/DataPointTemplating.js +1 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/internal/helpers/DataPointTemplating.ts +10 -10
- package/packages/sap.fe.macros/src/sap/fe/macros/internal/valuehelp/TableDelegate-dbg.js +5 -3
- package/packages/sap.fe.macros/src/sap/fe/macros/internal/valuehelp/TableDelegate.js +1 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/internal/valuehelp/ValueListHelper-dbg.js +72 -8
- package/packages/sap.fe.macros/src/sap/fe/macros/internal/valuehelp/ValueListHelper.js +1 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/library-dbg.js +1 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/library-h2-preload.js +12 -11
- package/packages/sap.fe.macros/src/sap/fe/macros/library-h2-preload.js.map +1 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/library-preload.js +93 -91
- package/packages/sap.fe.macros/src/sap/fe/macros/library-preload.js.map +4 -4
- package/packages/sap.fe.macros/src/sap/fe/macros/library.js +1 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/manifest.json +9 -9
- package/packages/sap.fe.macros/src/sap/fe/macros/massedit/MassEditRuntime-dbg.js +1 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/massedit/MassEditRuntime.js +1 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle.properties +5 -0
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_ar.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_bg.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_ca.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_cs.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_cy.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_da.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_de.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_el.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_en.properties +1 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_en_GB.properties +1 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_en_US_sappsd.properties +3 -0
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_es.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_es_MX.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_et.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_fi.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_fr.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_fr_CA.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_hi.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_hr.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_hu.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_id.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_it.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_iw.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_ja.properties +3 -3
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_kk.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_ko.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_lt.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_lv.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_ms.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_nl.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_no.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_pl.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_pt.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_pt_PT.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_ro.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_ru.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_sh.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_sk.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_sl.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_sv.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_th.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_tr.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_uk.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_vi.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_zh_CN.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/messagebundle_zh_TW.properties +2 -2
- package/packages/sap.fe.macros/src/sap/fe/macros/microchart/fragments/MicroChartTitle.fragment.xml +21 -11
- package/packages/sap.fe.macros/src/sap/fe/macros/microchart/fragments/RadialMicroChart.fragment.xml +2 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/resources.json +149 -110
- package/packages/sap.fe.macros/src/sap/fe/macros/table/Actions.fragment.xml +3 -0
- package/packages/sap.fe.macros/src/sap/fe/macros/table/ColumnContent.fragment.xml +70 -29
- package/packages/sap.fe.macros/src/sap/fe/macros/table/TableHelper-dbg.js +53 -36
- package/packages/sap.fe.macros/src/sap/fe/macros/table/TableHelper.js +1 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/table/Utils-dbg.js +1 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/table/Utils.js +1 -1
- package/packages/sap.fe.macros/src/sap/fe/macros/table/delegates/TableDelegate-dbg.js +3 -4
- package/packages/sap.fe.macros/src/sap/fe/macros/table/delegates/TableDelegate.js +1 -1
- package/packages/sap.fe.macros/test/sap/fe/macros/designtime/api.json +2 -2
- package/packages/sap.fe.macros/test/sap/fe/macros/designtime/apiref/api.json +1 -1
- package/packages/sap.fe.macros/test/sap/fe/macros/designtime/codeassistance/Library.xmlmeta.json +1 -1
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/ChartDelegate.spec.js +844 -0
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/ChartDelegate.spec.ts +833 -0
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/ChartHelper.spec.js +495 -0
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/ChartHelper.spec.ts +440 -0
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/ChartUtils.spec.js +469 -0
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/ChartUtils.spec.ts +448 -0
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/CommonUtils.spec.js +94 -0
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/CommonUtils.spec.ts +70 -0
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/DatapointMacro.spec.js +12 -1
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/DatapointMacro.spec.ts +11 -0
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/DelegateUtil.spec.js +61 -0
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/FieldHelper.spec.js +46 -0
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/FieldHelper.spec.ts +30 -0
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/FieldMacroDataFieldTypes.spec.js +13 -1
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/FieldMacroDataFieldTypes.spec.ts +11 -0
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/FormElement.spec.js +66 -0
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/FormElement.spec.ts +35 -0
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/SimpleFieldMacro.spec.js +48 -1
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/SimpleFieldMacro.spec.ts +56 -0
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/TableFieldLabel.spec.js +68 -0
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/TableFieldLabel.spec.ts +65 -0
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/__snapshots__/ChartDelegate.spec.ts.snap +82 -0
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/__snapshots__/DatapointMacro.spec.ts.snap +23 -5
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/__snapshots__/FieldHelper.spec.ts.snap +47 -0
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/__snapshots__/FieldMacroDataFieldTypes.spec.ts.snap +52 -3
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/__snapshots__/FormElement.spec.ts.snap +25 -0
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/__snapshots__/QuickViewForm.spec.ts.snap +0 -3
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/__snapshots__/SimpleFieldMacro.spec.ts.snap +69 -0
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/__snapshots__/TableFieldLabel.spec.ts.snap +451 -0
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/data/FieldHelper.xml +68 -0
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/data/Table.cds +13 -1
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/data/TableFieldLabel.cds +152 -0
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/field/FieldRuntime.spec.js +116 -0
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/field/FieldRuntime.spec.ts +115 -0
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/form/FormElement.spec.js +86 -0
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/form/FormElement.spec.ts +54 -0
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/form/__snapshots__/FormElement.spec.ts.snap +33 -0
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/table/Actions.spec.js +154 -0
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/table/Actions.spec.ts +128 -0
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/table/delegates/TableDelegate.spec.js +7 -2
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/table/delegates/TableDelegate.spec.ts +23 -12
- package/packages/sap.fe.macros/test/sap/fe/macros/jest/table/delegates/__snapshots__/TableDelegate.spec.ts.snap +1 -1
- package/packages/sap.fe.macros/test/sap/fe/macros/qunit/index.json +0 -5
- package/packages/sap.fe.macros/test/sap/fe/macros/qunit/macros/FieldHelperTemplate.qunit.js +1 -1
- package/packages/sap.fe.macros/test/sap/fe/macros/qunit/macros/FormElementTemplating.qunit.js +1 -1
- package/packages/sap.fe.macros/test/sap/fe/macros/qunit/macros/TableHelper.qunit.js +108 -1
- package/packages/sap.fe.navigation/src/sap/fe/navigation/.library +1 -1
- package/packages/sap.fe.navigation/src/sap/fe/navigation/.theming +1 -1
- package/packages/sap.fe.navigation/src/sap/fe/navigation/library-dbg.js +1 -1
- package/packages/sap.fe.navigation/src/sap/fe/navigation/library-h2-preload.js +2 -2
- package/packages/sap.fe.navigation/src/sap/fe/navigation/library-preload.js +2 -2
- package/packages/sap.fe.navigation/src/sap/fe/navigation/library.js +1 -1
- package/packages/sap.fe.navigation/src/sap/fe/navigation/manifest.json +3 -3
- package/packages/sap.fe.navigation/test/sap/fe/navigation/designtime/api.json +1 -1
- package/packages/sap.fe.navigation/test/sap/fe/navigation/designtime/apiref/api.json +1 -1
- package/packages/sap.fe.navigation/test/sap/fe/navigation/designtime/codeassistance/Library.xmlmeta.json +1 -1
- package/packages/sap.fe.placeholder/src/sap/fe/placeholder/.library +1 -1
- package/packages/sap.fe.placeholder/src/sap/fe/placeholder/.theming +1 -1
- package/packages/sap.fe.placeholder/src/sap/fe/placeholder/library-dbg.js +1 -1
- package/packages/sap.fe.placeholder/src/sap/fe/placeholder/library-h2-preload.js +2 -2
- package/packages/sap.fe.placeholder/src/sap/fe/placeholder/library-preload.js +4 -4
- package/packages/sap.fe.placeholder/src/sap/fe/placeholder/library-preload.js.map +1 -1
- package/packages/sap.fe.placeholder/src/sap/fe/placeholder/library.js +1 -1
- package/packages/sap.fe.placeholder/src/sap/fe/placeholder/manifest.json +3 -3
- package/packages/sap.fe.placeholder/src/sap/fe/placeholder/resources.json +3 -3
- package/packages/sap.fe.placeholder/src/sap/fe/placeholder/view/PlaceholderALP.fragment.html +1 -1
- package/packages/sap.fe.placeholder/src/sap/fe/placeholder/view/PlaceholderOVP.fragment.html +1 -1
- package/packages/sap.fe.placeholder/test/sap/fe/placeholder/designtime/api.json +1 -1
- package/packages/sap.fe.placeholder/test/sap/fe/placeholder/designtime/apiref/api.json +1 -1
- package/packages/sap.fe.templates/src/sap/fe/templates/.library +1 -1
- package/packages/sap.fe.templates/src/sap/fe/templates/.theming +1 -1
- package/packages/sap.fe.templates/src/sap/fe/templates/AnalyticalListPage/manifest.json +2 -2
- package/packages/sap.fe.templates/src/sap/fe/templates/ListComponent-dbg.js +1 -1
- package/packages/sap.fe.templates/src/sap/fe/templates/ListComponent.js +1 -1
- package/packages/sap.fe.templates/src/sap/fe/templates/ListReport/ListReport.view.xml +2 -2
- package/packages/sap.fe.templates/src/sap/fe/templates/ListReport/ListReportController-dbg.controller.js +91 -60
- package/packages/sap.fe.templates/src/sap/fe/templates/ListReport/ListReportController.controller.js +1 -1
- package/packages/sap.fe.templates/src/sap/fe/templates/ListReport/manifest.json +2 -2
- package/packages/sap.fe.templates/src/sap/fe/templates/ListReport/overrides/ViewState-dbg.js +31 -5
- package/packages/sap.fe.templates/src/sap/fe/templates/ListReport/overrides/ViewState.js +1 -1
- package/packages/sap.fe.templates/src/sap/fe/templates/ListReport/resources.json +5 -5
- package/packages/sap.fe.templates/src/sap/fe/templates/ObjectPage/AnnotationHelper-dbg.js +2 -2
- package/packages/sap.fe.templates/src/sap/fe/templates/ObjectPage/AnnotationHelper.js +1 -1
- package/packages/sap.fe.templates/src/sap/fe/templates/ObjectPage/Component-dbg.js +18 -1
- package/packages/sap.fe.templates/src/sap/fe/templates/ObjectPage/Component.js +1 -1
- package/packages/sap.fe.templates/src/sap/fe/templates/ObjectPage/ObjectPageController-dbg.controller.js +114 -85
- package/packages/sap.fe.templates/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.js +1 -1
- package/packages/sap.fe.templates/src/sap/fe/templates/ObjectPage/controls/StashableHBox-dbg.js +8 -0
- package/packages/sap.fe.templates/src/sap/fe/templates/ObjectPage/controls/StashableHBox.js +1 -1
- package/packages/sap.fe.templates/src/sap/fe/templates/ObjectPage/manifest.json +2 -2
- package/packages/sap.fe.templates/src/sap/fe/templates/ObjectPage/overrides/ViewState-dbg.js +23 -3
- package/packages/sap.fe.templates/src/sap/fe/templates/ObjectPage/overrides/ViewState.js +1 -1
- package/packages/sap.fe.templates/src/sap/fe/templates/ObjectPage/resources.json +15 -15
- package/packages/sap.fe.templates/src/sap/fe/templates/ObjectPage/templating/ObjectPageTemplating-dbg.js +6 -5
- package/packages/sap.fe.templates/src/sap/fe/templates/ObjectPage/templating/ObjectPageTemplating.js +1 -1
- package/packages/sap.fe.templates/src/sap/fe/templates/ObjectPage/templating/ObjectPageTemplating.ts +6 -4
- package/packages/sap.fe.templates/src/sap/fe/templates/ObjectPage/view/fragments/HeaderDataPointTitle.fragment.xml +26 -16
- package/packages/sap.fe.templates/src/sap/fe/templates/ObjectPage/view/fragments/ObjectPageHeaderForm.fragment.xml +5 -5
- package/packages/sap.fe.templates/src/sap/fe/templates/RootContainer/controller/Fcl-dbg.controller.js +63 -9
- package/packages/sap.fe.templates/src/sap/fe/templates/RootContainer/controller/Fcl.controller.js +1 -1
- package/packages/sap.fe.templates/src/sap/fe/templates/RootContainer/controller/NavContainer-dbg.controller.js +54 -32
- package/packages/sap.fe.templates/src/sap/fe/templates/RootContainer/controller/NavContainer.controller.js +1 -1
- package/packages/sap.fe.templates/src/sap/fe/templates/RootContainer/controller/RootContainerBaseController-dbg.js +24 -21
- package/packages/sap.fe.templates/src/sap/fe/templates/RootContainer/controller/RootContainerBaseController.js +1 -1
- package/packages/sap.fe.templates/src/sap/fe/templates/RootContainer/view/Fcl.view.xml +2 -1
- package/packages/sap.fe.templates/src/sap/fe/templates/RootContainer/view/NavContainer.view.xml +1 -1
- package/packages/sap.fe.templates/src/sap/fe/templates/controls/Table.fragment.xml +2 -0
- package/packages/sap.fe.templates/src/sap/fe/templates/library-dbg.js +1 -1
- package/packages/sap.fe.templates/src/sap/fe/templates/library-h2-preload.js +8 -9
- package/packages/sap.fe.templates/src/sap/fe/templates/library-h2-preload.js.map +1 -1
- package/packages/sap.fe.templates/src/sap/fe/templates/library-preload.js +23 -30
- package/packages/sap.fe.templates/src/sap/fe/templates/library-preload.js.map +4 -4
- package/packages/sap.fe.templates/src/sap/fe/templates/library.js +1 -1
- package/packages/sap.fe.templates/src/sap/fe/templates/manifest.json +13 -13
- package/packages/sap.fe.templates/src/sap/fe/templates/resources.json +51 -60
- package/packages/sap.fe.templates/test/sap/fe/templates/demokit/apps/itelo/webapp/manifest.json +1 -1
- package/packages/sap.fe.templates/test/sap/fe/templates/designtime/api.json +1 -1
- package/packages/sap.fe.templates/test/sap/fe/templates/designtime/apiref/api.json +1 -1
- package/packages/sap.fe.templates/test/sap/fe/templates/designtime/codeassistance/Library.xmlmeta.json +1 -1
- package/packages/sap.fe.templates/test/sap/fe/templates/jest/ObjectPage/view/fragments/HeaderFacet.spec.js +95 -0
- package/packages/sap.fe.templates/test/sap/fe/templates/jest/ObjectPage/view/fragments/HeaderFacet.spec.ts +66 -0
- package/packages/sap.fe.templates/test/sap/fe/templates/jest/ObjectPage/view/fragments/ObjectPageHeaderForm.spec.js +134 -0
- package/packages/sap.fe.templates/test/sap/fe/templates/jest/ObjectPage/view/fragments/ObjectPageHeaderForm.spec.ts +94 -0
- package/packages/sap.fe.templates/test/sap/fe/templates/jest/ObjectPage/view/fragments/__snapshots__/HeaderFacet.spec.ts.snap +61 -0
- package/packages/sap.fe.templates/test/sap/fe/templates/jest/ObjectPage/view/fragments/__snapshots__/ObjectPageHeaderForm.spec.ts.snap +53 -0
- package/packages/sap.fe.test/src/sap/fe/test/.library +1 -1
- package/packages/sap.fe.test/src/sap/fe/test/.theming +1 -1
- package/packages/sap.fe.test/src/sap/fe/test/FCLView-dbg.js +0 -6
- package/packages/sap.fe.test/src/sap/fe/test/FCLView.js +1 -1
- package/packages/sap.fe.test/src/sap/fe/test/Flexibility-dbg.js +14 -3
- package/packages/sap.fe.test/src/sap/fe/test/Flexibility.js +1 -1
- package/packages/sap.fe.test/src/sap/fe/test/JestTemplatingHelper-dbg.js +85 -8
- package/packages/sap.fe.test/src/sap/fe/test/JestTemplatingHelper.js +1 -1
- package/packages/sap.fe.test/src/sap/fe/test/JestTemplatingHelper.ts +54 -2
- package/packages/sap.fe.test/src/sap/fe/test/ListReport-dbg.js +0 -11
- package/packages/sap.fe.test/src/sap/fe/test/ListReport.js +1 -1
- package/packages/sap.fe.test/src/sap/fe/test/ObjectPage-dbg.js +0 -38
- package/packages/sap.fe.test/src/sap/fe/test/ObjectPage.js +1 -1
- package/packages/sap.fe.test/src/sap/fe/test/TemplatePage-dbg.js +0 -12
- package/packages/sap.fe.test/src/sap/fe/test/TemplatePage.js +1 -1
- package/packages/sap.fe.test/src/sap/fe/test/UI5MockHelper-dbg.js +22 -1
- package/packages/sap.fe.test/src/sap/fe/test/UI5MockHelper.js +1 -1
- package/packages/sap.fe.test/src/sap/fe/test/UI5MockHelper.ts +14 -0
- package/packages/sap.fe.test/src/sap/fe/test/api/BaseAPI-dbg.js +21 -0
- package/packages/sap.fe.test/src/sap/fe/test/api/DialogAPI-dbg.js +9 -5
- package/packages/sap.fe.test/src/sap/fe/test/api/DialogAPI.js +1 -1
- package/packages/sap.fe.test/src/sap/fe/test/api/DialogActions-dbg.js +18 -5
- package/packages/sap.fe.test/src/sap/fe/test/api/DialogActions.js +1 -1
- package/packages/sap.fe.test/src/sap/fe/test/api/DialogAssertions-dbg.js +25 -5
- package/packages/sap.fe.test/src/sap/fe/test/api/DialogAssertions.js +1 -1
- package/packages/sap.fe.test/src/sap/fe/test/api/EditState-dbg.js +9 -0
- package/packages/sap.fe.test/src/sap/fe/test/api/EditState.js +1 -1
- package/packages/sap.fe.test/src/sap/fe/test/api/FilterBarActions-dbg.js +38 -4
- package/packages/sap.fe.test/src/sap/fe/test/api/FilterBarActions.js +1 -1
- package/packages/sap.fe.test/src/sap/fe/test/api/FormAssertions-dbg.js +33 -4
- package/packages/sap.fe.test/src/sap/fe/test/api/FormAssertions.js +1 -1
- package/packages/sap.fe.test/src/sap/fe/test/api/TableActions-dbg.js +1 -1
- package/packages/sap.fe.test/src/sap/fe/test/library-dbg.js +1 -1
- package/packages/sap.fe.test/src/sap/fe/test/library-h2-preload.js +3 -3
- package/packages/sap.fe.test/src/sap/fe/test/library-preload.js +23 -16
- package/packages/sap.fe.test/src/sap/fe/test/library-preload.js.map +3 -3
- package/packages/sap.fe.test/src/sap/fe/test/library.js +1 -1
- package/packages/sap.fe.test/src/sap/fe/test/manifest.json +3 -3
- package/packages/sap.fe.test/src/sap/fe/test/resources.json +36 -34
- package/packages/sap.fe.test/test/sap/fe/test/designtime/api.json +1 -1
- package/packages/sap.fe.test/test/sap/fe/test/designtime/apiref/api.json +1 -1
- package/packages/sap.fe.test/test/sap/fe/test/designtime/codeassistance/Library.jsmeta.json +1 -1
- package/packages/sap.fe.test/test/sap/fe/test/designtime/codeassistance/Library.xmlmeta.json +1 -1
- package/packages/sap.fe.common/test/sap/fe/common/relnotes/changes-1.96.json +0 -49
- package/packages/sap.fe.core/test/sap/fe/core/relnotes/changes-1.96.json +0 -189
- package/packages/sap.fe.macros/test/sap/fe/macros/qunit/macros/FieldRuntime.qunit.js +0 -73
- package/packages/sap.fe.macros/test/sap/fe/macros/relnotes/changes-1.96.json +0 -160
- package/packages/sap.fe.placeholder/test/sap/fe/placeholder/relnote/changes-1.96.json +0 -17
- package/packages/sap.fe.templates/src/sap/fe/templates/controls/OverflowToolbarButtonHover-dbg.js +0 -26
- package/packages/sap.fe.templates/src/sap/fe/templates/controls/OverflowToolbarButtonHover.js +0 -6
- package/packages/sap.fe.templates/test/sap/fe/templates/relnotes/changes-1.96.json +0 -153
|
@@ -426,7 +426,8 @@ sap.ui.define(
|
|
|
426
426
|
* @param {boolean} [mParameters.bPersistOPScroll] The bPersistOPScroll will be used for scrolling to first tab
|
|
427
427
|
* @param {number} [mParameters.updateFCLLevel] `+1` if we add a column in FCL, `-1` to remove a column, 0 to stay on the same column
|
|
428
428
|
* @param {boolean} [mParameters.noPreservationCache] Do navigation without taking into account the preserved cache mechanism
|
|
429
|
-
* @param {boolean} [mParameters.bRecreateContext] Force re-creation of the context
|
|
429
|
+
* @param {boolean} [mParameters.bRecreateContext] Force re-creation of the context instead of using the one passed as parameter
|
|
430
|
+
* @param {boolean} [mParameters.bForceFocus] Forces focus selection after navigation
|
|
430
431
|
* @param {object} [oViewData] View data
|
|
431
432
|
* @param {object} [oCurrentTargetInfo] The target information from which the navigation is triggered
|
|
432
433
|
* @returns {Promise} Promise which is resolved once the navigation is triggered
|
|
@@ -486,10 +487,7 @@ sap.ui.define(
|
|
|
486
487
|
mEventParameters.routeInformation = this._getRouteInformation(this.sCurrentRouteName);
|
|
487
488
|
mEventParameters.routePattern = this.sCurrentRoutePattern;
|
|
488
489
|
mEventParameters.views = this.aCurrentViews;
|
|
489
|
-
|
|
490
|
-
// Store a fake focus information for the current hash, so that the logic to find the first editable / clickable
|
|
491
|
-
// element in the OP gets triggered
|
|
492
|
-
this.oRouterProxy.storeFocusForHash(0, null, this.oRouterProxy.getHash());
|
|
490
|
+
this.oRouterProxy.setFocusForced(mParameters.bForceFocus);
|
|
493
491
|
|
|
494
492
|
this._fireRouteMatchEvents(mEventParameters);
|
|
495
493
|
|
|
@@ -532,7 +530,7 @@ sap.ui.define(
|
|
|
532
530
|
}.bind(this)
|
|
533
531
|
);
|
|
534
532
|
}
|
|
535
|
-
return this.oRouterProxy.navToHash(sTargetPath, false, mParameters.noPreservationCache);
|
|
533
|
+
return this.oRouterProxy.navToHash(sTargetPath, false, mParameters.noPreservationCache, mParameters.bForceFocus);
|
|
536
534
|
},
|
|
537
535
|
|
|
538
536
|
/**
|
|
@@ -858,6 +856,31 @@ sap.ui.define(
|
|
|
858
856
|
});
|
|
859
857
|
},
|
|
860
858
|
|
|
859
|
+
_requestObjectsFromParameters: function(oStartUpParameters, aExternallyNavigablePages) {
|
|
860
|
+
var that = this;
|
|
861
|
+
|
|
862
|
+
// Load the respective objects for all object pages found in aExternallyNavigablePages
|
|
863
|
+
var aContextPromises = aExternallyNavigablePages.map(function(oPage) {
|
|
864
|
+
var oCompleteFilter, oListBind;
|
|
865
|
+
if (oPage.isSemanticKeyNavigation) {
|
|
866
|
+
oCompleteFilter = that._createFilter(oPage.draft, oPage.semanticKeys, oStartUpParameters);
|
|
867
|
+
} else {
|
|
868
|
+
oCompleteFilter = that._createFilter(oPage.draft, oPage.technicalKeys, oStartUpParameters);
|
|
869
|
+
}
|
|
870
|
+
// only request a minimum of fields to boost backend performance since this is only used to check if an object exists
|
|
871
|
+
oListBind = that.oModel.bindList(oPage.contextPath, undefined, undefined, oCompleteFilter, {
|
|
872
|
+
"$select": oPage.isSemanticKeyNavigation
|
|
873
|
+
? oPage.semanticKeys.map(function(key) {
|
|
874
|
+
return key.$PropertyPath;
|
|
875
|
+
})
|
|
876
|
+
: oPage.technicalKeys
|
|
877
|
+
});
|
|
878
|
+
return oListBind.requestContexts(0, 2);
|
|
879
|
+
});
|
|
880
|
+
|
|
881
|
+
return Promise.all(aContextPromises);
|
|
882
|
+
},
|
|
883
|
+
|
|
861
884
|
_manageDeeplinkStartup: function(oStartUpParameters) {
|
|
862
885
|
var that = this,
|
|
863
886
|
aExternallyNavigablePages;
|
|
@@ -871,19 +894,7 @@ sap.ui.define(
|
|
|
871
894
|
|
|
872
895
|
aExternallyNavigablePages = that._findTargetPagesFromStartupParams(oLevelOfObjectPages, oStartUpParameters);
|
|
873
896
|
|
|
874
|
-
|
|
875
|
-
var aContextPromises = aExternallyNavigablePages.map(function(oPage) {
|
|
876
|
-
var oCompleteFilter, oListBind;
|
|
877
|
-
if (oPage.isSemanticKeyNavigation) {
|
|
878
|
-
oCompleteFilter = that._createFilter(oPage.draft, oPage.semanticKeys, oStartUpParameters);
|
|
879
|
-
} else {
|
|
880
|
-
oCompleteFilter = that._createFilter(oPage.draft, oPage.technicalKeys, oStartUpParameters);
|
|
881
|
-
}
|
|
882
|
-
oListBind = that.oModel.bindList(oPage.contextPath, undefined, undefined, oCompleteFilter);
|
|
883
|
-
return oListBind.requestContexts(0, 2);
|
|
884
|
-
});
|
|
885
|
-
|
|
886
|
-
return Promise.all(aContextPromises);
|
|
897
|
+
return that._requestObjectsFromParameters(oStartUpParameters, aExternallyNavigablePages);
|
|
887
898
|
})
|
|
888
899
|
.then(function(aValues) {
|
|
889
900
|
if (aValues.length) {
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
(c) Copyright 2009-2021 SAP SE. All rights reserved
|
|
4
4
|
|
|
5
5
|
*/
|
|
6
|
-
sap.ui.define(["sap/ui/core/service/Service","sap/ui/core/service/ServiceFactory","sap/ui/core/Component","sap/ui/base/BindingParser","sap/fe/core/helpers/SemanticKeyHelper","sap/ui/model/Filter","sap/ui/model/FilterOperator","sap/base/Log","sap/ui/base/EventProvider","sap/fe/core/BusyLocker","sap/fe/core/helpers/ModelHelper","sap/fe/core/helpers/EditState","sap/fe/core/actions/messageHandling","sap/fe/core/controllerextensions/Placeholder"],function(S,c,C,B,d,F,e,L,E,f,M,g,h,P){"use strict";var R=E.extend("sap.fe.core.services.RoutingServiceEventing",{metadata:{events:{"routeMatched":{},"afterRouteMatched":{}}}});var k=S.extend("sap.fe.core.services.RoutingService",{init:function(){var t=this;var o=this.getContext();if(o.scopeType==="component"){this.oAppComponent=o.scopeObject;this.oModel=this.oAppComponent.getModel();this.oMetaModel=this.oModel.getMetaModel();this.oRouter=this.oAppComponent.getRouter();this.oRouterProxy=this.oAppComponent.getRouterProxy();this.eventProvider=new R();var r=this.oAppComponent.getManifestEntry("/sap.ui5/routing");var a=this.oAppComponent.getManifestEntry("/sap.ui5/rootView");this._parseRoutingConfiguration(r,a);var A=this.oAppComponent.getManifestEntry("/sap.app");this.outbounds=A&&A.crossNavigation&&A.crossNavigation.outbounds;}this.initPromise=Promise.resolve(t);},exit:function(){this.oRouter.detachRouteMatched(this._fnOnRouteMatched);this.eventProvider.fireEvent("routeMatched",{});this.eventProvider.destroy();},_parseRoutingConfiguration:function(r,o){var t=this,j=o&&o.viewName==="sap.fe.templates.RootContainer.view.Fcl";this._mTargets={};Object.keys(r.targets).forEach(function(T){t._mTargets[T]=Object.assign({targetName:T},r.targets[T]);if(t._mTargets[T].contextPattern!==undefined){t._mTargets[T].viewLevel=t._getViewLevelFromPattern(t._mTargets[T].contextPattern,0);}});this._mRoutes={};for(var s in r.routes){var l=r.routes[s],m=Array.isArray(l.target)?l.target:[l.target],n=Array.isArray(r.routes)?l.name:s,p=l.pattern;if(p.length<8||p.indexOf(":?query:")!==p.length-8){L.error("Pattern for route "+n+" doesn't end with ':?query:' : "+p);}var q=t._getViewLevelFromPattern(p,0);t._mRoutes[n]={name:n,pattern:p,targets:m,routeLevel:q};for(var i=0;i<m.length;i++){var u=t._mTargets[m[i]].parent;if(u){m.push(u);}}if(!j){if(t._mTargets[m[0]].viewLevel===undefined||t._mTargets[m[0]].viewLevel<q){t._mTargets[m[0]].viewLevel=q;}t._mTargets[m[0]].FCLLevel=-1;}else if(m.length===1&&t._mTargets[m[0]].controlAggregation!=="beginColumnPages"){t._mTargets[m[0]].FCLLevel=3;}else{m.forEach(function(T){switch(t._mTargets[T].controlAggregation){case"beginColumnPages":t._mTargets[T].FCLLevel=0;break;case"midColumnPages":t._mTargets[T].FCLLevel=1;break;default:t._mTargets[T].FCLLevel=2;}});}}Object.keys(t._mTargets).forEach(function(T){while(t._mTargets[T].parent){var u=t._mTargets[T].parent;t._mTargets[u].viewLevel=t._mTargets[u].viewLevel||t._mTargets[T].viewLevel;t._mTargets[u].contextPattern=t._mTargets[u].contextPattern||t._mTargets[T].contextPattern;t._mTargets[u].FCLLevel=t._mTargets[u].FCLLevel||t._mTargets[T].FCLLevel;t._mTargets[u].controlAggregation=t._mTargets[u].controlAggregation||t._mTargets[T].controlAggregation;T=u;}});var v=[],w=[],D;for(var N in t._mRoutes){var x=t._mRoutes[N].routeLevel;if(x===0){v.push(N);}else if(x===1){w.push(N);}}if(v.length===1){D=v[0];}else if(w.length===1){D=w[0];}if(D){var y=t._mRoutes[D].targets.slice(-1)[0];t.sContextPath="";if(t._mTargets[y].options&&t._mTargets[y].options.settings){var z=t._mTargets[y].options.settings;t.sContextPath=z.contextPath||"/"+z.entitySet;}if(!t.sContextPath){L.error("Cannot determine default contextPath: contextPath or entitySet missing in default target: "+y);}}else{L.error("Cannot determine default contextPath: no default route found.");}Object.keys(t._mTargets).map(function(T){return t._mTargets[T];}).sort(function(a,b){return a.viewLevel<b.viewLevel?-1:1;}).forEach(function(a){if(a.options){var b=a.options.settings;var A=b.contextPath||(b.entitySet?"/"+b.entitySet:"");if(!b.fullContextPath&&A){if(a.viewLevel===0||a.viewLevel===undefined){b.fullContextPath="/";}else{b.fullContextPath=A+"/";}}Object.keys(b.navigation||{}).forEach(function(G){var H=t._mRoutes[b.navigation[G].detail.route];if(H&&H.targets){H.targets.forEach(function(T){if(t._mTargets[T].options&&t._mTargets[T].options.settings&&!t._mTargets[T].options.settings.fullContextPath){var I;if(G.startsWith("/")){I=G;}else{I=b.fullContextPath+G;}t._mTargets[T].options.settings.fullContextPath=I+"/";}});}});}});},_getViewLevelFromPattern:function(p,v){p=p.replace(":?query:","");var r=new RegExp("/[^/]*$");if(p&&p[0]!=="/"&&p[0]!=="?"){p="/"+p;}if(p.length){p=p.replace(r,"");if(this.oRouter.match(p)||p===""){return this._getViewLevelFromPattern(p,++v);}else{return this._getViewLevelFromPattern(p,v);}}else{return v;}},_getRouteInformation:function(r){return this._mRoutes[r];},_getTargetInformation:function(t){return this._mTargets[t];},_getComponentId:function(o,s){if(s.indexOf(o+"---")===0){return s.substr(o.length+3);}return s;},getTargetInformationFor:function(o){var t=this._getComponentId(o._sOwnerId,o.getId());var a=this;var s=null;Object.keys(this._mTargets).forEach(function(T){if(a._mTargets[T].id===t||a._mTargets[T].viewId===t){s=T;}});return this._getTargetInformation(s);},getLastSemanticMapping:function(){return this.oLastSemanticMapping;},setLastSemanticMapping:function(m){this.oLastSemanticMapping=m;},navigateTo:function(o,r,p,b){var t;if(!p){t=Promise.resolve(d.getSemanticPath(o));}else{t=this.prepareParameters(p,r,o).then(function(m){return this.oRouter.getURL(r,m);}.bind(this));}return t.then(function(T){this.oRouterProxy.navToHash(T,b);}.bind(this));},prepareParameters:function(p,t,o){var a;try{var s=o.getPath();var b=s.split("/");var A=Object.keys(p).map(function(j){var l=p[j];var m=B.complexParser(l);var n=m.parts||[m];var r=n.map(function(q){var u=q.path.split("../");var v=b.slice(0,b.length-u.length+1);v.push(u[u.length-1]);return o.requestProperty(v.join("/"));});return Promise.all(r).then(function(q){var v=m.formatter?m.formatter.apply(this,q):q.join("");return{key:j,value:v};}.bind(this));}.bind(this));a=Promise.all(A).then(function(j){var l={};j.forEach(function(r){l[r.key]=r.value;});return l;});}catch(i){L.error("Could not parse the parameters for the navigation to route "+t);a=Promise.resolve(undefined);}return a;},_fireRouteMatchEvents:function(p){this.eventProvider.fireEvent("routeMatched",p);this.eventProvider.fireEvent("afterRouteMatched",p);g.cleanProcessedEditState();},navigateToContext:function(o,p,v,a){var t,r;if(p.targetPath&&v&&v.navigation){var b=v.navigation[p.targetPath].detail;t=b.route;if(b.parameters){r=this.prepareParameters(b.parameters,t,o);}}var T=this._getPathFromContext(o,p);if(T.length===0&&this.bExitOnNavigateBackToRoot){return this.oRouterProxy.exitFromApp();}if(p.asyncContext||p.bDeferredContext){T+="(...)";}var l=this._calculateLayout(T,p);if(l){T+="?layout="+l;}var n={oAsyncContext:p.asyncContext,bDeferredContext:p.bDeferredContext,bTargetEditable:p.editable,bPersistOPScroll:p.bPersistOPScroll,useContext:p.updateFCLLevel===-1||p.bRecreateContext?undefined:o,bDraftNavigation:p.bDraftNavigation,bShowPlaceholder:p.showPlaceholder!==undefined?p.showPlaceholder:true};if(p.checkNoHashChange){var s=this.oRouterProxy.getHash().replace(/[&?]{1}sap-iapp-state=[A-Z0-9]+/,"");if(T===s){var m=this.oRouter.getRouteInfoByHash(this.oRouterProxy.getHash());m.navigationInfo=n;m.routeInformation=this._getRouteInformation(this.sCurrentRouteName);m.routePattern=this.sCurrentRoutePattern;m.views=this.aCurrentViews;this.oRouterProxy.storeFocusForHash(0,null,this.oRouterProxy.getHash());this._fireRouteMatchEvents(m);return Promise.resolve();}}if(p.transient&&p.editable==true&&T.indexOf("(...)")===-1){if(T.indexOf("?")>-1){T+="&i-action=create";}else{T+="?i-action=create";}}if(a&&a.name==="sap.fe.templates.ListReport"){var i=this.oRouter.getRouteInfoByHash(T);if(i){var j=this._getRouteInformation(i.name);if(j&&j.targets&&j.targets.length>0){var q=j.targets[j.targets.length-1];var u=this._getTargetInformation(q);if(u&&u.name==="sap.fe.templates.ObjectPage"){h.removeUnboundTransitionMessages();}}}}this.navigationInfoQueue.push(n);if(t&&r){return r.then(function(w){this.oRouter.navTo(t,w);return Promise.resolve();}.bind(this));}return this.oRouterProxy.navToHash(T,false,p.noPreservationCache);},isCurrentStateImpactedBy:function(o){var p=o.getPath();if(this.oRouterProxy.isCurrentStateImpactedBy(p)){return true;}else if(/^[^\(\)]+\([^\(\)]+\)$/.test(p)){var s;if(this.oLastSemanticMapping&&this.oLastSemanticMapping.technicalPath===p){s=this.oLastSemanticMapping.semanticPath;}else{s=d.getSemanticPath(o);}return s!=p?this.oRouterProxy.isCurrentStateImpactedBy(s):false;}else{return false;}},_findPathToNavigate:function(p){var r=new RegExp("/[^/]*$");p=p.replace(r,"");if(this.oRouter.match(p)||p===""){return p;}else{return this._findPathToNavigate(p);}},_checkContextForSemanticPath:function(o){var p=o.getPath();if(!/^\/[^\(]+\([^\)]+\)$/.test(p)){return false;}var m=o.getModel().getMetaModel(),s=m.getMetaContext(o.getPath()).getObject("@sapui.name");if(!d.getSemanticKeys(m,s)){return false;}return M.isDraftSupported(m,p);},_getPathFromContext:function(o,p){var s;if(o.isA("sap.ui.model.odata.v4.ODataListBinding")&&o.isRelative()){s=o.getHeaderContext().getPath();}else{s=o.getPath();}if(p.updateFCLLevel===-1){s=this._findPathToNavigate(s);if(this.oLastSemanticMapping&&this.oLastSemanticMapping.technicalPath===s){s=this.oLastSemanticMapping.semanticPath;}}else if(this._checkContextForSemanticPath(o)){var a=d.getSemanticPath(o,true);if(!a){this.setLastSemanticMapping(undefined);}else if(a!==s){this.setLastSemanticMapping({technicalPath:s,semanticPath:a});s=a;}}if(s[0]==="/"){s=s.substring(1);}return s;},_calculateLayout:function(p,m){var a=m.FCLLevel;if(m.updateFCLLevel){a+=m.updateFCLLevel;if(a<0){a=0;}}return this.oAppComponent.getRootViewController().calculateLayout(a,p,m.sLayout);},_beforeRouteMatched:function(o){var p=new P().isPlaceholderEnabled();if(!p){var r=this.oAppComponent.getRootControl();f.lock(r);}},_onRouteMatched:function(o){var a=this.oAppComponent.getAppStateHandler(),r=this.oAppComponent.getRootControl(),t=this;var p=new P().isPlaceholderEnabled();if(f.isLocked(r)&&!p){f.unlock(r);}var m=o.getParameters();if(this.navigationInfoQueue.length){m.navigationInfo=this.navigationInfoQueue[0];this.navigationInfoQueue=this.navigationInfoQueue.slice(1);}else{m.navigationInfo={};}if(a.checkIfRouteChangedByIApp()){m.navigationInfo.bReasonIsIappState=true;a.resetRouteChangedByIApp();}this.sCurrentRouteName=o.getParameter("name");this.sCurrentRoutePattern=o.getParameters().config.pattern;this.aCurrentViews=o.getParameter("views");m.routeInformation=this._getRouteInformation(this.sCurrentRouteName);m.routePattern=this.sCurrentRoutePattern;this._fireRouteMatchEvents(m);if(!history.state||history.state.feLevel===undefined){this.oRouterProxy.restoreHistory().then(function(){t.oRouterProxy.resolveRouteMatch();}).catch(function(b){L.error("Error while restoring history",b);});}else{this.oRouterProxy.resolveRouteMatch();}},attachRouteMatched:function(D,a,l){this.eventProvider.attachEvent("routeMatched",D,a,l);},detachRouteMatched:function(a,l){this.eventProvider.detachEvent("routeMatched",a,l);},attachAfterRouteMatched:function(D,a,l){this.eventProvider.attachEvent("afterRouteMatched",D,a,l);},detachAfterRouteMatched:function(a,l){this.eventProvider.detachEvent("afterRouteMatched",a,l);},getRouteFromHash:function(r,a){var H=r.getHashChanger().hash;var o=r.getRouteInfoByHash(H);return a.getMetadata().getManifestEntry("/sap.ui5/routing/routes").filter(function(b){return b.name===o.name;})[0];},getTargetsFromRoute:function(r,a){var t=r.target;var b=this;if(typeof t==="string"){return[this._mTargets[t]];}else{var T=[];t.forEach(function(s){T.push(b._mTargets[s]);});return T;}},initializeRouting:function(){var t=this;this._fnOnRouteMatched=this._onRouteMatched.bind(this);this.oRouter.attachRouteMatched(this._fnOnRouteMatched);var p=new P().isPlaceholderEnabled();if(!p){this.oRouter.attachBeforeRouteMatched(this._beforeRouteMatched.bind(this));}this.navigationInfoQueue=[];g.resetEditState();this.bExitOnNavigateBackToRoot=!this.oRouter.match("");var i=t.oRouter.getHashChanger().getHash().indexOf("sap-iapp-state")!==-1;var a=t.oAppComponent.getStartupParameters().then(function(s){var H=s!==undefined&&Object.keys(s).length!==0;if(!i&&H){var b=t.oRouter.getHashChanger().getHash();if(s.preferredMode&&s.preferredMode[0].indexOf("create")!==-1&&!b){return t._managePreferredModeCreateStartup(s);}else{return t._manageDeeplinkStartup(s);}}}).catch(function(o){L.error("Error during routing initialization",o);});return a;},getDefaultCreateHash:function(s){var a=this.getContextPath(),D=s&&s.preferredMode?s.preferredMode[0]:"create",H;D=D.indexOf(":")!==-1&&D.length>D.indexOf(":")+1?D.substr(0,D.indexOf(":")):"create";H=a.substring(1)+"(...)?i-action="+D;if(this.oRouter.getRouteInfoByHash(H)){return H;}else{throw new Error("No route match for creating a new "+a.substring(1));}},_managePreferredModeCreateStartup:function(s){var t=this;return this.oMetaModel.requestObject(this.getContextPath()+"@").then(function(o){var m,b=true;if(o["@com.sap.vocabularies.Common.v1.DraftRoot"]&&o["@com.sap.vocabularies.Common.v1.DraftRoot"]["NewAction"]){m=t.getContextPath()+"@com.sap.vocabularies.Common.v1.DraftRoot/NewAction@Org.OData.Core.V1.OperationAvailable";}else if(o["@com.sap.vocabularies.Session.v1.StickySessionSupported"]&&o["@com.sap.vocabularies.Session.v1.StickySessionSupported"]["NewAction"]){m=t.getContextPath()+"@com.sap.vocabularies.Session.v1.StickySessionSupported/NewAction@Org.OData.Core.V1.OperationAvailable";}if(m){var n=t.oMetaModel.getObject(m);if(n===false){b=false;}}else{var i=o["@Org.OData.Capabilities.V1.InsertRestrictions"];if(i&&i.Insertable===false){b=false;}}if(b){var p=t.getDefaultCreateHash(s);t.oRouter.getHashChanger().replaceHash(p);t.bExitOnNavigateBackToRoot=true;}}).catch(function(){L.error("Cannot fetch the Annotations");});},_manageDeeplinkStartup:function(s){var t=this,a;return this.oMetaModel.requestObject("/$EntityContainer/").then(function(){var l=t._getNavigablePages(t.oAppComponent.getManifest()["sap.ui5"].routing);a=t._findTargetPagesFromStartupParams(l,s);var b=a.map(function(p){var o,i;if(p.isSemanticKeyNavigation){o=t._createFilter(p.draft,p.semanticKeys,s);}else{o=t._createFilter(p.draft,p.technicalKeys,s);}i=t.oModel.bindList(p.contextPath,undefined,undefined,o);return i.requestContexts(0,2);});return Promise.all(b);}).then(function(v){if(v.length){var b=[];v.forEach(function(i){if(i.length===1){b.push(i[0]);}});if(b.length===v.length&&!t.oRouter.getHashChanger().getHash()){var H=t._buildStartupHash(a,b);if(H){t.oRouter.getHashChanger().replaceHash(H);}}}}).catch(function(b){L.info("Could not find results for list bind: "+b);});},_getNavigablePages:function(r){var a=r.routes,t=r.targets,p={};for(var i=0;i<a.length;i++){var o={},s=a[i].pattern,T=a[i].target,l=s.split("/").length-1;o["pattern"]=s;if(s===":?query:"||s===""){continue;}if(l===1&&s.split("/")[l]===":?query:"){l=0;}o["level"]=l;if(Array.isArray(T)){o["target"]=T[T.length-1];}else{o["target"]=T;}if(t[o.target].options&&t[o.target].options.settings){o["allowDeepLinking"]=t[o.target].options.settings.allowDeepLinking;var b=t[o.target].options.settings.contextPath||(t[o.target].options.settings.entitySet&&"/"+t[o.target].options.settings.entitySet);o["contextPath"]=b;}if(!o["allowDeepLinking"]&&o["level"]!==0){continue;}else if(!p[o.level]){p[o.level]=[];}p[o.level].push(o);}return p;},_findTargetPagesFromStartupParams:function(p,s){var l=0,r=[],b=true;while(b&&l in p){var o=p[l];b=false;for(var i=0;i<o.length;++i){var O=o[i];if(!O.contextPath&&O.level===0){O.contextPath=this.getContextPath();}if(!O.contextPath){continue;}O.entityType=this.oMetaModel.getObject("/$EntityContainer"+O.contextPath+"/");O.draft=this.oMetaModel.getObject("/$EntityContainer"+O.contextPath+"@com.sap.vocabularies.Common.v1.DraftRoot")||this.oMetaModel.getObject("/$EntityContainer"+O.contextPath+"@com.sap.vocabularies.Common.v1.DraftNode");O.technicalKeys=O.entityType["$Key"];O.semanticKeys=this.oMetaModel.getObject("/$EntityContainer"+O.contextPath+"/@com.sap.vocabularies.Common.v1.SemanticKey");if(this._checkForKeys(O.semanticKeys,s)){O.isSemanticKeyNavigation=true;r.push(O);b=true;break;}else if(O.level===0&&this._checkForKeys(O.technicalKeys,s)){O.isSemanticKeyNavigation=false;r.push(O);b=true;break;}}++l;}return r;},_createFilter:function(D,K,s){var a=[],b=M.isFilteringCaseSensitive(this.oMetaModel);for(var j=0;j<K.length;j++){var p=K[j].$PropertyPath;if(!p){p=K[j];if(p==="IsActiveEntity"){D=false;}}var v=s[p][0];if(v){a.push(new F({path:p,operator:e.EQ,value1:v,caseSensitive:b}));}else{return undefined;}}if(D){var o=new F({filters:[new F("IsActiveEntity","EQ",false),new F("SiblingEntity/IsActiveEntity","EQ",null)],and:false});a.push(o);}var i=new F(a,true);return i;},_checkForKeys:function(K,p){if(K&&K.length){for(var j=0;j<K.length;j++){var s=K[j].$PropertyPath;if(!s){s=K[j];}var a=p[s];if(!a||(a&&a.length>1)){return false;}}return true;}return false;},_buildStartupHash:function(r,a){var H;if(a.length===1){var t=a[0].getPath(),s=d.getSemanticPath(a[0]);if(s!==t){this.setLastSemanticMapping({technicalPath:t,semanticPath:s});}H=s.substring(1);}else if(a.length>1){var p=r[r.length-1].pattern.split("/");H=p.map(function(b,i){var K=b.split("(")[0];var v=a[i].getPath().split("(")[1];return K+"("+v;}).join("/");}return H;},getOutbounds:function(){return this.outbounds;},getContextPath:function(){return this.sContextPath;}});return c.extend("sap.fe.core.services.RoutingServiceFactory",{createInstance:function(s){var r=new k(s);return r.initPromise;}});},true);
|
|
6
|
+
sap.ui.define(["sap/ui/core/service/Service","sap/ui/core/service/ServiceFactory","sap/ui/core/Component","sap/ui/base/BindingParser","sap/fe/core/helpers/SemanticKeyHelper","sap/ui/model/Filter","sap/ui/model/FilterOperator","sap/base/Log","sap/ui/base/EventProvider","sap/fe/core/BusyLocker","sap/fe/core/helpers/ModelHelper","sap/fe/core/helpers/EditState","sap/fe/core/actions/messageHandling","sap/fe/core/controllerextensions/Placeholder"],function(S,c,C,B,d,F,e,L,E,f,M,g,h,P){"use strict";var R=E.extend("sap.fe.core.services.RoutingServiceEventing",{metadata:{events:{"routeMatched":{},"afterRouteMatched":{}}}});var k=S.extend("sap.fe.core.services.RoutingService",{init:function(){var t=this;var o=this.getContext();if(o.scopeType==="component"){this.oAppComponent=o.scopeObject;this.oModel=this.oAppComponent.getModel();this.oMetaModel=this.oModel.getMetaModel();this.oRouter=this.oAppComponent.getRouter();this.oRouterProxy=this.oAppComponent.getRouterProxy();this.eventProvider=new R();var r=this.oAppComponent.getManifestEntry("/sap.ui5/routing");var a=this.oAppComponent.getManifestEntry("/sap.ui5/rootView");this._parseRoutingConfiguration(r,a);var A=this.oAppComponent.getManifestEntry("/sap.app");this.outbounds=A&&A.crossNavigation&&A.crossNavigation.outbounds;}this.initPromise=Promise.resolve(t);},exit:function(){this.oRouter.detachRouteMatched(this._fnOnRouteMatched);this.eventProvider.fireEvent("routeMatched",{});this.eventProvider.destroy();},_parseRoutingConfiguration:function(r,o){var t=this,j=o&&o.viewName==="sap.fe.templates.RootContainer.view.Fcl";this._mTargets={};Object.keys(r.targets).forEach(function(T){t._mTargets[T]=Object.assign({targetName:T},r.targets[T]);if(t._mTargets[T].contextPattern!==undefined){t._mTargets[T].viewLevel=t._getViewLevelFromPattern(t._mTargets[T].contextPattern,0);}});this._mRoutes={};for(var s in r.routes){var l=r.routes[s],m=Array.isArray(l.target)?l.target:[l.target],n=Array.isArray(r.routes)?l.name:s,p=l.pattern;if(p.length<8||p.indexOf(":?query:")!==p.length-8){L.error("Pattern for route "+n+" doesn't end with ':?query:' : "+p);}var q=t._getViewLevelFromPattern(p,0);t._mRoutes[n]={name:n,pattern:p,targets:m,routeLevel:q};for(var i=0;i<m.length;i++){var u=t._mTargets[m[i]].parent;if(u){m.push(u);}}if(!j){if(t._mTargets[m[0]].viewLevel===undefined||t._mTargets[m[0]].viewLevel<q){t._mTargets[m[0]].viewLevel=q;}t._mTargets[m[0]].FCLLevel=-1;}else if(m.length===1&&t._mTargets[m[0]].controlAggregation!=="beginColumnPages"){t._mTargets[m[0]].FCLLevel=3;}else{m.forEach(function(T){switch(t._mTargets[T].controlAggregation){case"beginColumnPages":t._mTargets[T].FCLLevel=0;break;case"midColumnPages":t._mTargets[T].FCLLevel=1;break;default:t._mTargets[T].FCLLevel=2;}});}}Object.keys(t._mTargets).forEach(function(T){while(t._mTargets[T].parent){var u=t._mTargets[T].parent;t._mTargets[u].viewLevel=t._mTargets[u].viewLevel||t._mTargets[T].viewLevel;t._mTargets[u].contextPattern=t._mTargets[u].contextPattern||t._mTargets[T].contextPattern;t._mTargets[u].FCLLevel=t._mTargets[u].FCLLevel||t._mTargets[T].FCLLevel;t._mTargets[u].controlAggregation=t._mTargets[u].controlAggregation||t._mTargets[T].controlAggregation;T=u;}});var v=[],w=[],D;for(var N in t._mRoutes){var x=t._mRoutes[N].routeLevel;if(x===0){v.push(N);}else if(x===1){w.push(N);}}if(v.length===1){D=v[0];}else if(w.length===1){D=w[0];}if(D){var y=t._mRoutes[D].targets.slice(-1)[0];t.sContextPath="";if(t._mTargets[y].options&&t._mTargets[y].options.settings){var z=t._mTargets[y].options.settings;t.sContextPath=z.contextPath||"/"+z.entitySet;}if(!t.sContextPath){L.error("Cannot determine default contextPath: contextPath or entitySet missing in default target: "+y);}}else{L.error("Cannot determine default contextPath: no default route found.");}Object.keys(t._mTargets).map(function(T){return t._mTargets[T];}).sort(function(a,b){return a.viewLevel<b.viewLevel?-1:1;}).forEach(function(a){if(a.options){var b=a.options.settings;var A=b.contextPath||(b.entitySet?"/"+b.entitySet:"");if(!b.fullContextPath&&A){if(a.viewLevel===0||a.viewLevel===undefined){b.fullContextPath="/";}else{b.fullContextPath=A+"/";}}Object.keys(b.navigation||{}).forEach(function(G){var H=t._mRoutes[b.navigation[G].detail.route];if(H&&H.targets){H.targets.forEach(function(T){if(t._mTargets[T].options&&t._mTargets[T].options.settings&&!t._mTargets[T].options.settings.fullContextPath){var I;if(G.startsWith("/")){I=G;}else{I=b.fullContextPath+G;}t._mTargets[T].options.settings.fullContextPath=I+"/";}});}});}});},_getViewLevelFromPattern:function(p,v){p=p.replace(":?query:","");var r=new RegExp("/[^/]*$");if(p&&p[0]!=="/"&&p[0]!=="?"){p="/"+p;}if(p.length){p=p.replace(r,"");if(this.oRouter.match(p)||p===""){return this._getViewLevelFromPattern(p,++v);}else{return this._getViewLevelFromPattern(p,v);}}else{return v;}},_getRouteInformation:function(r){return this._mRoutes[r];},_getTargetInformation:function(t){return this._mTargets[t];},_getComponentId:function(o,s){if(s.indexOf(o+"---")===0){return s.substr(o.length+3);}return s;},getTargetInformationFor:function(o){var t=this._getComponentId(o._sOwnerId,o.getId());var a=this;var s=null;Object.keys(this._mTargets).forEach(function(T){if(a._mTargets[T].id===t||a._mTargets[T].viewId===t){s=T;}});return this._getTargetInformation(s);},getLastSemanticMapping:function(){return this.oLastSemanticMapping;},setLastSemanticMapping:function(m){this.oLastSemanticMapping=m;},navigateTo:function(o,r,p,b){var t;if(!p){t=Promise.resolve(d.getSemanticPath(o));}else{t=this.prepareParameters(p,r,o).then(function(m){return this.oRouter.getURL(r,m);}.bind(this));}return t.then(function(T){this.oRouterProxy.navToHash(T,b);}.bind(this));},prepareParameters:function(p,t,o){var a;try{var s=o.getPath();var b=s.split("/");var A=Object.keys(p).map(function(j){var l=p[j];var m=B.complexParser(l);var n=m.parts||[m];var r=n.map(function(q){var u=q.path.split("../");var v=b.slice(0,b.length-u.length+1);v.push(u[u.length-1]);return o.requestProperty(v.join("/"));});return Promise.all(r).then(function(q){var v=m.formatter?m.formatter.apply(this,q):q.join("");return{key:j,value:v};}.bind(this));}.bind(this));a=Promise.all(A).then(function(j){var l={};j.forEach(function(r){l[r.key]=r.value;});return l;});}catch(i){L.error("Could not parse the parameters for the navigation to route "+t);a=Promise.resolve(undefined);}return a;},_fireRouteMatchEvents:function(p){this.eventProvider.fireEvent("routeMatched",p);this.eventProvider.fireEvent("afterRouteMatched",p);g.cleanProcessedEditState();},navigateToContext:function(o,p,v,a){var t,r;if(p.targetPath&&v&&v.navigation){var b=v.navigation[p.targetPath].detail;t=b.route;if(b.parameters){r=this.prepareParameters(b.parameters,t,o);}}var T=this._getPathFromContext(o,p);if(T.length===0&&this.bExitOnNavigateBackToRoot){return this.oRouterProxy.exitFromApp();}if(p.asyncContext||p.bDeferredContext){T+="(...)";}var l=this._calculateLayout(T,p);if(l){T+="?layout="+l;}var n={oAsyncContext:p.asyncContext,bDeferredContext:p.bDeferredContext,bTargetEditable:p.editable,bPersistOPScroll:p.bPersistOPScroll,useContext:p.updateFCLLevel===-1||p.bRecreateContext?undefined:o,bDraftNavigation:p.bDraftNavigation,bShowPlaceholder:p.showPlaceholder!==undefined?p.showPlaceholder:true};if(p.checkNoHashChange){var s=this.oRouterProxy.getHash().replace(/[&?]{1}sap-iapp-state=[A-Z0-9]+/,"");if(T===s){var m=this.oRouter.getRouteInfoByHash(this.oRouterProxy.getHash());m.navigationInfo=n;m.routeInformation=this._getRouteInformation(this.sCurrentRouteName);m.routePattern=this.sCurrentRoutePattern;m.views=this.aCurrentViews;this.oRouterProxy.setFocusForced(p.bForceFocus);this._fireRouteMatchEvents(m);return Promise.resolve();}}if(p.transient&&p.editable==true&&T.indexOf("(...)")===-1){if(T.indexOf("?")>-1){T+="&i-action=create";}else{T+="?i-action=create";}}if(a&&a.name==="sap.fe.templates.ListReport"){var i=this.oRouter.getRouteInfoByHash(T);if(i){var j=this._getRouteInformation(i.name);if(j&&j.targets&&j.targets.length>0){var q=j.targets[j.targets.length-1];var u=this._getTargetInformation(q);if(u&&u.name==="sap.fe.templates.ObjectPage"){h.removeUnboundTransitionMessages();}}}}this.navigationInfoQueue.push(n);if(t&&r){return r.then(function(w){this.oRouter.navTo(t,w);return Promise.resolve();}.bind(this));}return this.oRouterProxy.navToHash(T,false,p.noPreservationCache,p.bForceFocus);},isCurrentStateImpactedBy:function(o){var p=o.getPath();if(this.oRouterProxy.isCurrentStateImpactedBy(p)){return true;}else if(/^[^\(\)]+\([^\(\)]+\)$/.test(p)){var s;if(this.oLastSemanticMapping&&this.oLastSemanticMapping.technicalPath===p){s=this.oLastSemanticMapping.semanticPath;}else{s=d.getSemanticPath(o);}return s!=p?this.oRouterProxy.isCurrentStateImpactedBy(s):false;}else{return false;}},_findPathToNavigate:function(p){var r=new RegExp("/[^/]*$");p=p.replace(r,"");if(this.oRouter.match(p)||p===""){return p;}else{return this._findPathToNavigate(p);}},_checkContextForSemanticPath:function(o){var p=o.getPath();if(!/^\/[^\(]+\([^\)]+\)$/.test(p)){return false;}var m=o.getModel().getMetaModel(),s=m.getMetaContext(o.getPath()).getObject("@sapui.name");if(!d.getSemanticKeys(m,s)){return false;}return M.isDraftSupported(m,p);},_getPathFromContext:function(o,p){var s;if(o.isA("sap.ui.model.odata.v4.ODataListBinding")&&o.isRelative()){s=o.getHeaderContext().getPath();}else{s=o.getPath();}if(p.updateFCLLevel===-1){s=this._findPathToNavigate(s);if(this.oLastSemanticMapping&&this.oLastSemanticMapping.technicalPath===s){s=this.oLastSemanticMapping.semanticPath;}}else if(this._checkContextForSemanticPath(o)){var a=d.getSemanticPath(o,true);if(!a){this.setLastSemanticMapping(undefined);}else if(a!==s){this.setLastSemanticMapping({technicalPath:s,semanticPath:a});s=a;}}if(s[0]==="/"){s=s.substring(1);}return s;},_calculateLayout:function(p,m){var a=m.FCLLevel;if(m.updateFCLLevel){a+=m.updateFCLLevel;if(a<0){a=0;}}return this.oAppComponent.getRootViewController().calculateLayout(a,p,m.sLayout);},_beforeRouteMatched:function(o){var p=new P().isPlaceholderEnabled();if(!p){var r=this.oAppComponent.getRootControl();f.lock(r);}},_onRouteMatched:function(o){var a=this.oAppComponent.getAppStateHandler(),r=this.oAppComponent.getRootControl(),t=this;var p=new P().isPlaceholderEnabled();if(f.isLocked(r)&&!p){f.unlock(r);}var m=o.getParameters();if(this.navigationInfoQueue.length){m.navigationInfo=this.navigationInfoQueue[0];this.navigationInfoQueue=this.navigationInfoQueue.slice(1);}else{m.navigationInfo={};}if(a.checkIfRouteChangedByIApp()){m.navigationInfo.bReasonIsIappState=true;a.resetRouteChangedByIApp();}this.sCurrentRouteName=o.getParameter("name");this.sCurrentRoutePattern=o.getParameters().config.pattern;this.aCurrentViews=o.getParameter("views");m.routeInformation=this._getRouteInformation(this.sCurrentRouteName);m.routePattern=this.sCurrentRoutePattern;this._fireRouteMatchEvents(m);if(!history.state||history.state.feLevel===undefined){this.oRouterProxy.restoreHistory().then(function(){t.oRouterProxy.resolveRouteMatch();}).catch(function(b){L.error("Error while restoring history",b);});}else{this.oRouterProxy.resolveRouteMatch();}},attachRouteMatched:function(D,a,l){this.eventProvider.attachEvent("routeMatched",D,a,l);},detachRouteMatched:function(a,l){this.eventProvider.detachEvent("routeMatched",a,l);},attachAfterRouteMatched:function(D,a,l){this.eventProvider.attachEvent("afterRouteMatched",D,a,l);},detachAfterRouteMatched:function(a,l){this.eventProvider.detachEvent("afterRouteMatched",a,l);},getRouteFromHash:function(r,a){var H=r.getHashChanger().hash;var o=r.getRouteInfoByHash(H);return a.getMetadata().getManifestEntry("/sap.ui5/routing/routes").filter(function(b){return b.name===o.name;})[0];},getTargetsFromRoute:function(r,a){var t=r.target;var b=this;if(typeof t==="string"){return[this._mTargets[t]];}else{var T=[];t.forEach(function(s){T.push(b._mTargets[s]);});return T;}},initializeRouting:function(){var t=this;this._fnOnRouteMatched=this._onRouteMatched.bind(this);this.oRouter.attachRouteMatched(this._fnOnRouteMatched);var p=new P().isPlaceholderEnabled();if(!p){this.oRouter.attachBeforeRouteMatched(this._beforeRouteMatched.bind(this));}this.navigationInfoQueue=[];g.resetEditState();this.bExitOnNavigateBackToRoot=!this.oRouter.match("");var i=t.oRouter.getHashChanger().getHash().indexOf("sap-iapp-state")!==-1;var a=t.oAppComponent.getStartupParameters().then(function(s){var H=s!==undefined&&Object.keys(s).length!==0;if(!i&&H){var b=t.oRouter.getHashChanger().getHash();if(s.preferredMode&&s.preferredMode[0].indexOf("create")!==-1&&!b){return t._managePreferredModeCreateStartup(s);}else{return t._manageDeeplinkStartup(s);}}}).catch(function(o){L.error("Error during routing initialization",o);});return a;},getDefaultCreateHash:function(s){var a=this.getContextPath(),D=s&&s.preferredMode?s.preferredMode[0]:"create",H;D=D.indexOf(":")!==-1&&D.length>D.indexOf(":")+1?D.substr(0,D.indexOf(":")):"create";H=a.substring(1)+"(...)?i-action="+D;if(this.oRouter.getRouteInfoByHash(H)){return H;}else{throw new Error("No route match for creating a new "+a.substring(1));}},_managePreferredModeCreateStartup:function(s){var t=this;return this.oMetaModel.requestObject(this.getContextPath()+"@").then(function(o){var m,b=true;if(o["@com.sap.vocabularies.Common.v1.DraftRoot"]&&o["@com.sap.vocabularies.Common.v1.DraftRoot"]["NewAction"]){m=t.getContextPath()+"@com.sap.vocabularies.Common.v1.DraftRoot/NewAction@Org.OData.Core.V1.OperationAvailable";}else if(o["@com.sap.vocabularies.Session.v1.StickySessionSupported"]&&o["@com.sap.vocabularies.Session.v1.StickySessionSupported"]["NewAction"]){m=t.getContextPath()+"@com.sap.vocabularies.Session.v1.StickySessionSupported/NewAction@Org.OData.Core.V1.OperationAvailable";}if(m){var n=t.oMetaModel.getObject(m);if(n===false){b=false;}}else{var i=o["@Org.OData.Capabilities.V1.InsertRestrictions"];if(i&&i.Insertable===false){b=false;}}if(b){var p=t.getDefaultCreateHash(s);t.oRouter.getHashChanger().replaceHash(p);t.bExitOnNavigateBackToRoot=true;}}).catch(function(){L.error("Cannot fetch the Annotations");});},_requestObjectsFromParameters:function(s,a){var t=this;var b=a.map(function(p){var o,l;if(p.isSemanticKeyNavigation){o=t._createFilter(p.draft,p.semanticKeys,s);}else{o=t._createFilter(p.draft,p.technicalKeys,s);}l=t.oModel.bindList(p.contextPath,undefined,undefined,o,{"$select":p.isSemanticKeyNavigation?p.semanticKeys.map(function(i){return i.$PropertyPath;}):p.technicalKeys});return l.requestContexts(0,2);});return Promise.all(b);},_manageDeeplinkStartup:function(s){var t=this,a;return this.oMetaModel.requestObject("/$EntityContainer/").then(function(){var l=t._getNavigablePages(t.oAppComponent.getManifest()["sap.ui5"].routing);a=t._findTargetPagesFromStartupParams(l,s);return t._requestObjectsFromParameters(s,a);}).then(function(v){if(v.length){var b=[];v.forEach(function(i){if(i.length===1){b.push(i[0]);}});if(b.length===v.length&&!t.oRouter.getHashChanger().getHash()){var H=t._buildStartupHash(a,b);if(H){t.oRouter.getHashChanger().replaceHash(H);}}}}).catch(function(b){L.info("Could not find results for list bind: "+b);});},_getNavigablePages:function(r){var a=r.routes,t=r.targets,p={};for(var i=0;i<a.length;i++){var o={},s=a[i].pattern,T=a[i].target,l=s.split("/").length-1;o["pattern"]=s;if(s===":?query:"||s===""){continue;}if(l===1&&s.split("/")[l]===":?query:"){l=0;}o["level"]=l;if(Array.isArray(T)){o["target"]=T[T.length-1];}else{o["target"]=T;}if(t[o.target].options&&t[o.target].options.settings){o["allowDeepLinking"]=t[o.target].options.settings.allowDeepLinking;var b=t[o.target].options.settings.contextPath||(t[o.target].options.settings.entitySet&&"/"+t[o.target].options.settings.entitySet);o["contextPath"]=b;}if(!o["allowDeepLinking"]&&o["level"]!==0){continue;}else if(!p[o.level]){p[o.level]=[];}p[o.level].push(o);}return p;},_findTargetPagesFromStartupParams:function(p,s){var l=0,r=[],b=true;while(b&&l in p){var o=p[l];b=false;for(var i=0;i<o.length;++i){var O=o[i];if(!O.contextPath&&O.level===0){O.contextPath=this.getContextPath();}if(!O.contextPath){continue;}O.entityType=this.oMetaModel.getObject("/$EntityContainer"+O.contextPath+"/");O.draft=this.oMetaModel.getObject("/$EntityContainer"+O.contextPath+"@com.sap.vocabularies.Common.v1.DraftRoot")||this.oMetaModel.getObject("/$EntityContainer"+O.contextPath+"@com.sap.vocabularies.Common.v1.DraftNode");O.technicalKeys=O.entityType["$Key"];O.semanticKeys=this.oMetaModel.getObject("/$EntityContainer"+O.contextPath+"/@com.sap.vocabularies.Common.v1.SemanticKey");if(this._checkForKeys(O.semanticKeys,s)){O.isSemanticKeyNavigation=true;r.push(O);b=true;break;}else if(O.level===0&&this._checkForKeys(O.technicalKeys,s)){O.isSemanticKeyNavigation=false;r.push(O);b=true;break;}}++l;}return r;},_createFilter:function(D,K,s){var a=[],b=M.isFilteringCaseSensitive(this.oMetaModel);for(var j=0;j<K.length;j++){var p=K[j].$PropertyPath;if(!p){p=K[j];if(p==="IsActiveEntity"){D=false;}}var v=s[p][0];if(v){a.push(new F({path:p,operator:e.EQ,value1:v,caseSensitive:b}));}else{return undefined;}}if(D){var o=new F({filters:[new F("IsActiveEntity","EQ",false),new F("SiblingEntity/IsActiveEntity","EQ",null)],and:false});a.push(o);}var i=new F(a,true);return i;},_checkForKeys:function(K,p){if(K&&K.length){for(var j=0;j<K.length;j++){var s=K[j].$PropertyPath;if(!s){s=K[j];}var a=p[s];if(!a||(a&&a.length>1)){return false;}}return true;}return false;},_buildStartupHash:function(r,a){var H;if(a.length===1){var t=a[0].getPath(),s=d.getSemanticPath(a[0]);if(s!==t){this.setLastSemanticMapping({technicalPath:t,semanticPath:s});}H=s.substring(1);}else if(a.length>1){var p=r[r.length-1].pattern.split("/");H=p.map(function(b,i){var K=b.split("(")[0];var v=a[i].getPath().split("(")[1];return K+"("+v;}).join("/");}return H;},getOutbounds:function(){return this.outbounds;},getContextPath:function(){return this.sContextPath;}});return c.extend("sap.fe.core.services.RoutingServiceFactory",{createInstance:function(s){var r=new k(s);return r.initPromise;}});},true);
|
|
@@ -82,7 +82,7 @@ sap.ui.define(
|
|
|
82
82
|
scopeType: "component",
|
|
83
83
|
scopeObject: oComponent,
|
|
84
84
|
settings: {
|
|
85
|
-
bundles: ["sap.fe.core.messagebundle", "sap.fe.templates.messagebundle"],
|
|
85
|
+
bundles: ["sap.fe.core.messagebundle", "sap.fe.macros.messagebundle", "sap.fe.templates.messagebundle"],
|
|
86
86
|
enhanceI18n: aEnhanceI18n,
|
|
87
87
|
modelName: "sap.fe.i18n"
|
|
88
88
|
}
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
(c) Copyright 2009-2021 SAP SE. All rights reserved
|
|
4
4
|
|
|
5
5
|
*/
|
|
6
|
-
sap.ui.define(["sap/ui/core/service/Service","sap/ui/core/service/ServiceFactory","sap/ui/core/service/ServiceFactoryRegistry","sap/ui/model/base/ManagedObjectModel","sap/ui/model/resource/ResourceModel","sap/ui/core/mvc/View","sap/ui/core/Component","sap/ui/model/json/JSONModel","sap/base/Log","sap/fe/core/TemplateModel","sap/fe/core/helpers/DynamicAnnotationPathHelper","sap/ui/core/cache/CacheManager","sap/ui/VersionInfo","sap/ui/Device"],function(S,a,b,M,R,V,C,J,L,T,D,c,d,e){"use strict";var f=S.extend("sap.fe.core.services.TemplatedViewService",{initPromise:null,init:function(){var t=this;var g=[];var o=this.getContext();var h=o.scopeObject;var A=C.getOwnerComponentFor(h);var m=A.getMetaModel();var j=A.getMetadata().getComponentName()+"::"+A.getLocalId(h.getId());var E=h.getEnhanceI18n()||[];var k;if(E){k=A.getMetadata().getComponentName();for(var i=0;i<E.length;i++){var r=A.getModel(E[i]);if(r&&r.isA("sap.ui.model.resource.ResourceModel")){E[i]=r;}else{E[i]=k+"."+E[i].replace(".properties","");}}}var l=A.getMetadata().getName()+"_"+j+"_"+sap.ui.getCore().getConfiguration().getLanguageTag();g.push(b.get("sap.fe.core.services.ResourceModelService").createInstance({scopeType:"component",scopeObject:h,settings:{bundles:["sap.fe.core.messagebundle","sap.fe.templates.messagebundle"],enhanceI18n:E,modelName:"sap.fe.i18n"}}).then(function(n){t.oResourceModelService=n;return n.getResourceModel();}));g.push(b.get("sap.fe.core.services.CacheHandlerService").createInstance({settings:{metaModel:m,appComponent:A,component:h}}).then(function(n){t.oCacheHandlerService=n;return n.validateCacheKey(l);}));g.push(d.load().then(function(I){var n="";if(!I.libraries){n=sap.ui.buildinfo.buildtime;}else{I.libraries.forEach(function(q){n+=q.buildTimestamp;});}return n;}).catch(function(){return"<NOVALUE>";}));var p="";this.initPromise=Promise.all(g).then(function(n){var q=n[1];var v=n[2];var u=A.getShellServices();var w=A.getSideEffectsService();w.initializeSideEffects(A.getEnvironmentCapabilities().getCapabilities());p=q+"-"+v+"-"+j+"-"+u.instanceType+"-pageModel";return Promise.all(n.concat([t._getCachedModel(p)]));}).then(function(n){var r=n[0];var q=n[1];var P=n[3];return new Promise(function(u){sap.ui.require(["sap/fe/core/converters/TemplateConverter","sap/fe/core/converters/MetaModelConverter"],function(v,w){u(t.createView(r,j,q,p,P,v,w));});});}).then(function(n){var q=b.get("sap.fe.core.services.CacheHandlerService").getInstance(m);q.invalidateIfNeeded(n,l);});},_getCachedModel:function(g){if(sap.ui.getCore().getConfiguration().getViewCache()){return c.get(g);}return undefined;},_setCachedModel:function(g,o){if(sap.ui.getCore().getConfiguration().getViewCache()){c.set(g,o);}return undefined;},refreshView:function(o){var t=this;var r=o.getRootControl();if(r){r.destroy();}else if(t.oView){t.oView.destroy();}return t.createView(t.resourceModel,t.stableId,"","",undefined,t.TemplateConverter,t.MetaModelConverter).then(function(){o.oContainer.invalidate();}).catch(function(E){o.oContainer.invalidate();L.error(E);});},createView:function(r,g,h,p,P,i,j){var t=this;t.resourceModel=r;t.stableId=g;t.TemplateConverter=i;t.MetaModelConverter=j;var o=this.getContext(),m=o.settings,k=m.converterType,l=o.scopeObject,A=C.getOwnerComponentFor(l),F=A.getRoutingService().getTargetInformationFor(l).options.settings.fullContextPath,n=A.getMetaModel(),q=A.getManifest(),u=new J(sap.ui.Device).setDefaultBindingMode("OneWay"),v=new J(q),E=false,w,x,y,z;this.oFactory=o.factory;function B(){var H=F.split("/");var I=H.reduce(function(K,N){if(N===""){return K;}if(K===""){K="/"+N;}else{var O=n.getObject(K+"/$NavigationPropertyBinding/"+N);if(O&&Object.keys(O).length>0){K+="/$NavigationPropertyBinding";}K+="/"+N;}return K;},"");var y={type:"XML",preprocessors:{xml:{bindingContexts:{entitySet:I?n.createBindingContext(I):null,fullContextPath:F?n.createBindingContext(F):null,contextPath:F?n.createBindingContext(F):null,converterContext:w.createBindingContext("/",null,{noResolve:true}),viewData:z?x.createBindingContext("/"):null},models:{entitySet:n,fullContextPath:n,contextPath:n,"sap.fe.i18n":r,metaModel:n,"device":u,manifest:v,converterContext:w,viewData:x},appComponent:A}},id:g,viewName:m.viewName||l.getViewName(),viewData:z,cache:{keys:[h]},models:{"sap.fe.i18n":r},height:"100%"};return y;}function G(H){L.error(H.message,H);y.viewName=m.errorViewName||"sap.fe.core.services.view.TemplatingErrorPage";y.preprocessors.xml.models["error"]=new J(H);return l.runAsOwner(function(){return V.create(y).then(function(I){t.oView=I;t.oView.setModel(new M(t.oView),"$view");l.setAggregation("rootControl",t.oView);return h;});});}return A.getService("routingService").then(function(H){var I=H.getTargetInformationFor(l);var O=q["sap.app"]&&q["sap.app"].crossNavigation&&q["sap.app"].crossNavigation.outbounds;var N=l.getNavigation()||{};Object.keys(N).forEach(function(Q){var U=N[Q];var W;if(U.detail&&U.detail.outbound&&O[U.detail.outbound]){W=O[U.detail.outbound];U.detail.outboundDetail={semanticObject:W.semanticObject,action:W.action,parameters:W.parameters};}if(U.create&&U.create.outbound&&O[U.create.outbound]){W=O[U.create.outbound];U.create.outboundDetail={semanticObject:W.semanticObject,action:W.action,parameters:W.parameters};}});z={navigation:N,viewLevel:I.viewLevel,stableId:g,contentDensities:q["sap.ui5"].contentDensities,resourceBundle:r.__bundle,fullContextPath:F,isDesktop:e.system.desktop};if(l.getViewData){Object.assign(z,l.getViewData());}var K=A.getShellServices();z.converterType=k;z.shellContentDensity=K.getContentDensity();x=new J(z);if(z&&z.controlConfiguration){Object.keys(z.controlConfiguration).forEach(function(Q){if(Q.indexOf("[")!==-1){var U=D.resolveDynamicExpression(Q,n);z.controlConfiguration[U]=z.controlConfiguration[Q];}});}j.convertTypes(n,A.getEnvironmentCapabilities().getCapabilities());w=new T(function(){try{if(!!P){return P;}else{var Q=A.getDiagnostics();var U=Q.getIssues().length;var W=i.convertPage(k,n,z,Q,F,A.getEnvironmentCapabilities().getCapabilities());var X=Q.getIssues();var Y=X.slice(U);if(Y.length>0){L.warning("Some issues have been detected in your project, please check the UI5 support assistant rule for sap.fe.core");}t._setCachedModel(p,W);return W;}}catch(Z){L.error(Z,Z);return{};}},n);if(!E){y=B();l.setModel(w,"_pageModel");return l.runAsOwner(function(){return V.create(y).catch(G).then(function(Q){t.oView=Q;t.oView.setModel(new M(t.oView),"$view");t.oView.setModel(x,"viewData");l.setAggregation("rootControl",t.oView);return h;}).catch(L.error);});}}).catch(function(H){L.error(H.message,H);throw new Error("Error while creating view : "+H);});},getView:function(){return this.oView;},exit:function(){this.oResourceModelService&&this.oResourceModelService.destroy();this.oCacheHandlerService&&this.oCacheHandlerService.destroy();this.oFactory.removeGlobalInstance();}});var s=a.extend("sap.fe.core.services.TemplatedViewServiceFactory",{_oInstanceRegistry:{},iCreatingViews:0,createInstance:function(o){s.prototype.iCreatingViews++;var t=new f(Object.assign({factory:this},o));return t.initPromise.then(function(){s.prototype.iCreatingViews--;return t;});},removeGlobalInstance:function(){this._oInstanceRegistry={};}});s.getNumberOfViewsInCreationState=function(){return s.prototype.iCreatingViews;};return s;},true);
|
|
6
|
+
sap.ui.define(["sap/ui/core/service/Service","sap/ui/core/service/ServiceFactory","sap/ui/core/service/ServiceFactoryRegistry","sap/ui/model/base/ManagedObjectModel","sap/ui/model/resource/ResourceModel","sap/ui/core/mvc/View","sap/ui/core/Component","sap/ui/model/json/JSONModel","sap/base/Log","sap/fe/core/TemplateModel","sap/fe/core/helpers/DynamicAnnotationPathHelper","sap/ui/core/cache/CacheManager","sap/ui/VersionInfo","sap/ui/Device"],function(S,a,b,M,R,V,C,J,L,T,D,c,d,e){"use strict";var f=S.extend("sap.fe.core.services.TemplatedViewService",{initPromise:null,init:function(){var t=this;var g=[];var o=this.getContext();var h=o.scopeObject;var A=C.getOwnerComponentFor(h);var m=A.getMetaModel();var j=A.getMetadata().getComponentName()+"::"+A.getLocalId(h.getId());var E=h.getEnhanceI18n()||[];var k;if(E){k=A.getMetadata().getComponentName();for(var i=0;i<E.length;i++){var r=A.getModel(E[i]);if(r&&r.isA("sap.ui.model.resource.ResourceModel")){E[i]=r;}else{E[i]=k+"."+E[i].replace(".properties","");}}}var l=A.getMetadata().getName()+"_"+j+"_"+sap.ui.getCore().getConfiguration().getLanguageTag();g.push(b.get("sap.fe.core.services.ResourceModelService").createInstance({scopeType:"component",scopeObject:h,settings:{bundles:["sap.fe.core.messagebundle","sap.fe.macros.messagebundle","sap.fe.templates.messagebundle"],enhanceI18n:E,modelName:"sap.fe.i18n"}}).then(function(n){t.oResourceModelService=n;return n.getResourceModel();}));g.push(b.get("sap.fe.core.services.CacheHandlerService").createInstance({settings:{metaModel:m,appComponent:A,component:h}}).then(function(n){t.oCacheHandlerService=n;return n.validateCacheKey(l);}));g.push(d.load().then(function(I){var n="";if(!I.libraries){n=sap.ui.buildinfo.buildtime;}else{I.libraries.forEach(function(q){n+=q.buildTimestamp;});}return n;}).catch(function(){return"<NOVALUE>";}));var p="";this.initPromise=Promise.all(g).then(function(n){var q=n[1];var v=n[2];var u=A.getShellServices();var w=A.getSideEffectsService();w.initializeSideEffects(A.getEnvironmentCapabilities().getCapabilities());p=q+"-"+v+"-"+j+"-"+u.instanceType+"-pageModel";return Promise.all(n.concat([t._getCachedModel(p)]));}).then(function(n){var r=n[0];var q=n[1];var P=n[3];return new Promise(function(u){sap.ui.require(["sap/fe/core/converters/TemplateConverter","sap/fe/core/converters/MetaModelConverter"],function(v,w){u(t.createView(r,j,q,p,P,v,w));});});}).then(function(n){var q=b.get("sap.fe.core.services.CacheHandlerService").getInstance(m);q.invalidateIfNeeded(n,l);});},_getCachedModel:function(g){if(sap.ui.getCore().getConfiguration().getViewCache()){return c.get(g);}return undefined;},_setCachedModel:function(g,o){if(sap.ui.getCore().getConfiguration().getViewCache()){c.set(g,o);}return undefined;},refreshView:function(o){var t=this;var r=o.getRootControl();if(r){r.destroy();}else if(t.oView){t.oView.destroy();}return t.createView(t.resourceModel,t.stableId,"","",undefined,t.TemplateConverter,t.MetaModelConverter).then(function(){o.oContainer.invalidate();}).catch(function(E){o.oContainer.invalidate();L.error(E);});},createView:function(r,g,h,p,P,i,j){var t=this;t.resourceModel=r;t.stableId=g;t.TemplateConverter=i;t.MetaModelConverter=j;var o=this.getContext(),m=o.settings,k=m.converterType,l=o.scopeObject,A=C.getOwnerComponentFor(l),F=A.getRoutingService().getTargetInformationFor(l).options.settings.fullContextPath,n=A.getMetaModel(),q=A.getManifest(),u=new J(sap.ui.Device).setDefaultBindingMode("OneWay"),v=new J(q),E=false,w,x,y,z;this.oFactory=o.factory;function B(){var H=F.split("/");var I=H.reduce(function(K,N){if(N===""){return K;}if(K===""){K="/"+N;}else{var O=n.getObject(K+"/$NavigationPropertyBinding/"+N);if(O&&Object.keys(O).length>0){K+="/$NavigationPropertyBinding";}K+="/"+N;}return K;},"");var y={type:"XML",preprocessors:{xml:{bindingContexts:{entitySet:I?n.createBindingContext(I):null,fullContextPath:F?n.createBindingContext(F):null,contextPath:F?n.createBindingContext(F):null,converterContext:w.createBindingContext("/",null,{noResolve:true}),viewData:z?x.createBindingContext("/"):null},models:{entitySet:n,fullContextPath:n,contextPath:n,"sap.fe.i18n":r,metaModel:n,"device":u,manifest:v,converterContext:w,viewData:x},appComponent:A}},id:g,viewName:m.viewName||l.getViewName(),viewData:z,cache:{keys:[h]},models:{"sap.fe.i18n":r},height:"100%"};return y;}function G(H){L.error(H.message,H);y.viewName=m.errorViewName||"sap.fe.core.services.view.TemplatingErrorPage";y.preprocessors.xml.models["error"]=new J(H);return l.runAsOwner(function(){return V.create(y).then(function(I){t.oView=I;t.oView.setModel(new M(t.oView),"$view");l.setAggregation("rootControl",t.oView);return h;});});}return A.getService("routingService").then(function(H){var I=H.getTargetInformationFor(l);var O=q["sap.app"]&&q["sap.app"].crossNavigation&&q["sap.app"].crossNavigation.outbounds;var N=l.getNavigation()||{};Object.keys(N).forEach(function(Q){var U=N[Q];var W;if(U.detail&&U.detail.outbound&&O[U.detail.outbound]){W=O[U.detail.outbound];U.detail.outboundDetail={semanticObject:W.semanticObject,action:W.action,parameters:W.parameters};}if(U.create&&U.create.outbound&&O[U.create.outbound]){W=O[U.create.outbound];U.create.outboundDetail={semanticObject:W.semanticObject,action:W.action,parameters:W.parameters};}});z={navigation:N,viewLevel:I.viewLevel,stableId:g,contentDensities:q["sap.ui5"].contentDensities,resourceBundle:r.__bundle,fullContextPath:F,isDesktop:e.system.desktop};if(l.getViewData){Object.assign(z,l.getViewData());}var K=A.getShellServices();z.converterType=k;z.shellContentDensity=K.getContentDensity();x=new J(z);if(z&&z.controlConfiguration){Object.keys(z.controlConfiguration).forEach(function(Q){if(Q.indexOf("[")!==-1){var U=D.resolveDynamicExpression(Q,n);z.controlConfiguration[U]=z.controlConfiguration[Q];}});}j.convertTypes(n,A.getEnvironmentCapabilities().getCapabilities());w=new T(function(){try{if(!!P){return P;}else{var Q=A.getDiagnostics();var U=Q.getIssues().length;var W=i.convertPage(k,n,z,Q,F,A.getEnvironmentCapabilities().getCapabilities());var X=Q.getIssues();var Y=X.slice(U);if(Y.length>0){L.warning("Some issues have been detected in your project, please check the UI5 support assistant rule for sap.fe.core");}t._setCachedModel(p,W);return W;}}catch(Z){L.error(Z,Z);return{};}},n);if(!E){y=B();l.setModel(w,"_pageModel");return l.runAsOwner(function(){return V.create(y).catch(G).then(function(Q){t.oView=Q;t.oView.setModel(new M(t.oView),"$view");t.oView.setModel(x,"viewData");l.setAggregation("rootControl",t.oView);return h;}).catch(L.error);});}}).catch(function(H){L.error(H.message,H);throw new Error("Error while creating view : "+H);});},getView:function(){return this.oView;},exit:function(){this.oResourceModelService&&this.oResourceModelService.destroy();this.oCacheHandlerService&&this.oCacheHandlerService.destroy();this.oFactory.removeGlobalInstance();}});var s=a.extend("sap.fe.core.services.TemplatedViewServiceFactory",{_oInstanceRegistry:{},iCreatingViews:0,createInstance:function(o){s.prototype.iCreatingViews++;var t=new f(Object.assign({factory:this},o));return t.initPromise.then(function(){s.prototype.iCreatingViews--;return t;});},removeGlobalInstance:function(){this._oInstanceRegistry={};}});s.getNumberOfViewsInCreationState=function(){return s.prototype.iCreatingViews;};return s;},true);
|
|
@@ -7,6 +7,18 @@ sap.ui.define([], function () {
|
|
|
7
7
|
|
|
8
8
|
var _exports = {};
|
|
9
9
|
|
|
10
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
11
|
+
|
|
12
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
|
+
|
|
14
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
15
|
+
|
|
16
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
17
|
+
|
|
18
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
19
|
+
|
|
20
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
21
|
+
|
|
10
22
|
var isEntitySet = function (dataObject) {
|
|
11
23
|
return dataObject && dataObject.hasOwnProperty("_type") && dataObject._type === "EntitySet";
|
|
12
24
|
};
|
|
@@ -18,26 +30,87 @@ sap.ui.define([], function () {
|
|
|
18
30
|
|
|
19
31
|
return ((_entitySet$annotation = entitySet.annotations) === null || _entitySet$annotation === void 0 ? void 0 : (_entitySet$annotation2 = _entitySet$annotation.Capabilities) === null || _entitySet$annotation2 === void 0 ? void 0 : (_entitySet$annotation3 = _entitySet$annotation2.FilterRestrictions) === null || _entitySet$annotation3 === void 0 ? void 0 : _entitySet$annotation3.FilterExpressionRestrictions) || [];
|
|
20
32
|
};
|
|
33
|
+
/**
|
|
34
|
+
* Reads all SortRestrictions of the main entity and the (first level) navigation restrictions.
|
|
35
|
+
* This does not work for more than one level of navigation.
|
|
36
|
+
*
|
|
37
|
+
* @param {EntitySet} entitySet Entity set to be analyzed
|
|
38
|
+
* @returns {string[]} Array containing the property names of all non-sortable properties
|
|
39
|
+
*/
|
|
40
|
+
|
|
21
41
|
|
|
22
42
|
_exports.getFilterExpressionRestrictions = getFilterExpressionRestrictions;
|
|
23
43
|
|
|
24
44
|
var getNonSortablePropertiesRestrictions = function (entitySet) {
|
|
25
|
-
var _entitySet$annotation4, _entitySet$annotation5, _entitySet$annotation6, _entitySet$
|
|
45
|
+
var _entitySet$annotation4, _entitySet$annotation5, _entitySet$annotation6, _entitySet$annotation11, _entitySet$annotation12, _entitySet$annotation13, _entitySet$annotation14;
|
|
46
|
+
|
|
47
|
+
var nonSortableProperties = []; // Check annotations for main entity
|
|
48
|
+
|
|
49
|
+
if ((entitySet === null || entitySet === void 0 ? void 0 : (_entitySet$annotation4 = entitySet.annotations) === null || _entitySet$annotation4 === void 0 ? void 0 : (_entitySet$annotation5 = _entitySet$annotation4.Capabilities) === null || _entitySet$annotation5 === void 0 ? void 0 : (_entitySet$annotation6 = _entitySet$annotation5.SortRestrictions) === null || _entitySet$annotation6 === void 0 ? void 0 : _entitySet$annotation6.Sortable) === false) {
|
|
50
|
+
var _nonSortablePropertie;
|
|
51
|
+
|
|
52
|
+
// add all properties of the entity to the nonSortableProperties
|
|
53
|
+
(_nonSortablePropertie = nonSortableProperties).push.apply(_nonSortablePropertie, _toConsumableArray(entitySet.entityType.entityProperties.map(function (property) {
|
|
54
|
+
return property.name;
|
|
55
|
+
})));
|
|
56
|
+
} else {
|
|
57
|
+
var _entitySet$annotation7, _entitySet$annotation8, _entitySet$annotation9, _entitySet$annotation10;
|
|
58
|
+
|
|
59
|
+
nonSortableProperties = (entitySet === null || entitySet === void 0 ? void 0 : (_entitySet$annotation7 = entitySet.annotations) === null || _entitySet$annotation7 === void 0 ? void 0 : (_entitySet$annotation8 = _entitySet$annotation7.Capabilities) === null || _entitySet$annotation8 === void 0 ? void 0 : (_entitySet$annotation9 = _entitySet$annotation8.SortRestrictions) === null || _entitySet$annotation9 === void 0 ? void 0 : (_entitySet$annotation10 = _entitySet$annotation9.NonSortableProperties) === null || _entitySet$annotation10 === void 0 ? void 0 : _entitySet$annotation10.map(function (property) {
|
|
60
|
+
return property.value;
|
|
61
|
+
})) || [];
|
|
62
|
+
} // Check for every navigationRestriction if it has sortRestrictions
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
entitySet === null || entitySet === void 0 ? void 0 : (_entitySet$annotation11 = entitySet.annotations) === null || _entitySet$annotation11 === void 0 ? void 0 : (_entitySet$annotation12 = _entitySet$annotation11.Capabilities) === null || _entitySet$annotation12 === void 0 ? void 0 : (_entitySet$annotation13 = _entitySet$annotation12.NavigationRestrictions) === null || _entitySet$annotation13 === void 0 ? void 0 : (_entitySet$annotation14 = _entitySet$annotation13.RestrictedProperties) === null || _entitySet$annotation14 === void 0 ? void 0 : _entitySet$annotation14.forEach(function (navigationRestriction) {
|
|
66
|
+
var _navigationRestrictio;
|
|
67
|
+
|
|
68
|
+
if ((navigationRestriction === null || navigationRestriction === void 0 ? void 0 : (_navigationRestrictio = navigationRestriction.SortRestrictions) === null || _navigationRestrictio === void 0 ? void 0 : _navigationRestrictio.Sortable) === false) {
|
|
69
|
+
var _entitySet$entityType, _entitySet$entityType2;
|
|
70
|
+
|
|
71
|
+
// find correct navigation property
|
|
72
|
+
var navigationProperty = entitySet === null || entitySet === void 0 ? void 0 : (_entitySet$entityType = entitySet.entityType) === null || _entitySet$entityType === void 0 ? void 0 : (_entitySet$entityType2 = _entitySet$entityType.navigationProperties) === null || _entitySet$entityType2 === void 0 ? void 0 : _entitySet$entityType2.filter(function (navigationProperty) {
|
|
73
|
+
var _navigationRestrictio2;
|
|
74
|
+
|
|
75
|
+
return navigationProperty.name == (navigationRestriction === null || navigationRestriction === void 0 ? void 0 : (_navigationRestrictio2 = navigationRestriction.NavigationProperty) === null || _navigationRestrictio2 === void 0 ? void 0 : _navigationRestrictio2.value);
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
if (navigationProperty[0]) {
|
|
79
|
+
var _nonSortablePropertie2, _navigationProperty$;
|
|
80
|
+
|
|
81
|
+
// add all properties of the navigation property to the nonSortableProperties
|
|
82
|
+
(_nonSortablePropertie2 = nonSortableProperties).push.apply(_nonSortablePropertie2, _toConsumableArray((_navigationProperty$ = navigationProperty[0].targetType) === null || _navigationProperty$ === void 0 ? void 0 : _navigationProperty$.entityProperties.map(function (property) {
|
|
83
|
+
return navigationProperty[0].name + "/" + property.name;
|
|
84
|
+
})));
|
|
85
|
+
}
|
|
86
|
+
} else {
|
|
87
|
+
var _navigationRestrictio3, _navigationRestrictio4;
|
|
88
|
+
|
|
89
|
+
var nonSortableNavigationProperties = navigationRestriction === null || navigationRestriction === void 0 ? void 0 : (_navigationRestrictio3 = navigationRestriction.SortRestrictions) === null || _navigationRestrictio3 === void 0 ? void 0 : (_navigationRestrictio4 = _navigationRestrictio3.NonSortableProperties) === null || _navigationRestrictio4 === void 0 ? void 0 : _navigationRestrictio4.map(function (property) {
|
|
90
|
+
var _navigationRestrictio5;
|
|
91
|
+
|
|
92
|
+
return (navigationRestriction === null || navigationRestriction === void 0 ? void 0 : (_navigationRestrictio5 = navigationRestriction.NavigationProperty) === null || _navigationRestrictio5 === void 0 ? void 0 : _navigationRestrictio5.value) + "/" + property.value;
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
if (nonSortableNavigationProperties) {
|
|
96
|
+
var _nonSortablePropertie3;
|
|
26
97
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
98
|
+
(_nonSortablePropertie3 = nonSortableProperties).push.apply(_nonSortablePropertie3, _toConsumableArray(nonSortableNavigationProperties));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
return nonSortableProperties;
|
|
30
103
|
};
|
|
31
104
|
|
|
32
105
|
_exports.getNonSortablePropertiesRestrictions = getNonSortablePropertiesRestrictions;
|
|
33
106
|
|
|
34
107
|
var isStickySessionSupported = function (entitySet) {
|
|
35
|
-
var _entitySet$
|
|
108
|
+
var _entitySet$annotation15;
|
|
36
109
|
|
|
37
|
-
return !!((_entitySet$
|
|
110
|
+
return !!((_entitySet$annotation15 = entitySet.annotations.Session) !== null && _entitySet$annotation15 !== void 0 && _entitySet$annotation15.StickySessionSupported);
|
|
38
111
|
};
|
|
39
112
|
|
|
40
113
|
_exports.isStickySessionSupported = isStickySessionSupported;
|
|
41
114
|
return _exports;
|
|
42
115
|
}, false);
|
|
43
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
116
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkVudGl0eVNldEhlbHBlci50cyJdLCJuYW1lcyI6WyJpc0VudGl0eVNldCIsImRhdGFPYmplY3QiLCJoYXNPd25Qcm9wZXJ0eSIsIl90eXBlIiwiZ2V0RmlsdGVyRXhwcmVzc2lvblJlc3RyaWN0aW9ucyIsImVudGl0eV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HRcdFx0bm9uU29ydGFibGVQcm9wZXJ0aWVzLnB1c2goLi4ubm9uU29ydGFibGVOYXZpZ2F0aW9uUHJvcGVydGllcyk7XG5cdFx0XHR9XG5cdFx0fVxuXHR9KTtcblx0cmV0dXJuIG5vblNvcnRhYmxlUHJvcGVydGllcztcbn07XG5cbmV4cG9ydCBjb25zdCBpc1N0aWNreVNlc3Npb25TdXBwb3J0ZWQgPSBmdW5jdGlvbihlbnRpdHlTZXQ6IEVudGl0eVNldCk6IGJvb2xlYW4ge1xuXHRyZXR1cm4gISFlbnRpdHlTZXQuYW5ub3RhdGlvbnMuU2Vzc2lvbj8uU3RpY2t5U2Vzc2lvblN1cHBvcnRlZDtcbn07XG4iXX0=
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
3
3
|
* (c) Copyright 2009-2021 SAP SE. All rights reserved
|
|
4
4
|
*/
|
|
5
|
-
sap.ui.define([],function(){"use strict";var _={};var i=function(
|
|
5
|
+
sap.ui.define([],function(){"use strict";var _={};function a(i){return e(i)||d(i)||c(i)||b();}function b(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function c(o,m){if(!o)return;if(typeof o==="string")return f(o,m);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(o,m);}function d(i){if(typeof Symbol!=="undefined"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i);}function e(i){if(Array.isArray(i))return f(i);}function f(l,m){if(m==null||m>l.length)m=l.length;for(var i=0,n=new Array(m);i<m;i++){n[i]=l[i];}return n;}var g=function(i){return i&&i.hasOwnProperty("_type")&&i._type==="EntitySet";};_.isEntitySet=g;var h=function(i){var l,m,n;return((l=i.annotations)===null||l===void 0?void 0:(m=l.Capabilities)===null||m===void 0?void 0:(n=m.FilterRestrictions)===null||n===void 0?void 0:n.FilterExpressionRestrictions)||[];};_.getFilterExpressionRestrictions=h;var j=function(i){var l,m,n,o,p,q,r;var s=[];if((i===null||i===void 0?void 0:(l=i.annotations)===null||l===void 0?void 0:(m=l.Capabilities)===null||m===void 0?void 0:(n=m.SortRestrictions)===null||n===void 0?void 0:n.Sortable)===false){var t;(t=s).push.apply(t,a(i.entityType.entityProperties.map(function(y){return y.name;})));}else{var u,v,w,x;s=(i===null||i===void 0?void 0:(u=i.annotations)===null||u===void 0?void 0:(v=u.Capabilities)===null||v===void 0?void 0:(w=v.SortRestrictions)===null||w===void 0?void 0:(x=w.NonSortableProperties)===null||x===void 0?void 0:x.map(function(y){return y.value;}))||[];}i===null||i===void 0?void 0:(o=i.annotations)===null||o===void 0?void 0:(p=o.Capabilities)===null||p===void 0?void 0:(q=p.NavigationRestrictions)===null||q===void 0?void 0:(r=q.RestrictedProperties)===null||r===void 0?void 0:r.forEach(function(y){var z;if((y===null||y===void 0?void 0:(z=y.SortRestrictions)===null||z===void 0?void 0:z.Sortable)===false){var A,B;var C=i===null||i===void 0?void 0:(A=i.entityType)===null||A===void 0?void 0:(B=A.navigationProperties)===null||B===void 0?void 0:B.filter(function(C){var J;return C.name==(y===null||y===void 0?void 0:(J=y.NavigationProperty)===null||J===void 0?void 0:J.value);});if(C[0]){var D,E;(D=s).push.apply(D,a((E=C[0].targetType)===null||E===void 0?void 0:E.entityProperties.map(function(J){return C[0].name+"/"+J.name;})));}}else{var F,G;var H=y===null||y===void 0?void 0:(F=y.SortRestrictions)===null||F===void 0?void 0:(G=F.NonSortableProperties)===null||G===void 0?void 0:G.map(function(J){var K;return(y===null||y===void 0?void 0:(K=y.NavigationProperty)===null||K===void 0?void 0:K.value)+"/"+J.value;});if(H){var I;(I=s).push.apply(I,a(H));}}});return s;};_.getNonSortablePropertiesRestrictions=j;var k=function(i){var l;return!!((l=i.annotations.Session)!==null&&l!==void 0&&l.StickySessionSupported);};_.isStickySessionSupported=k;return _;},false);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EntitySet } from "@sap-ux/annotation-converter";
|
|
2
|
+
import { NavigationPropertyPath } from "@sap-ux/vocabularies-types";
|
|
2
3
|
|
|
3
4
|
export const isEntitySet = function(dataObject: any): dataObject is EntitySet {
|
|
4
5
|
return dataObject && dataObject.hasOwnProperty("_type") && dataObject._type === "EntitySet";
|
|
@@ -8,8 +9,47 @@ export const getFilterExpressionRestrictions = function(entitySet: EntitySet) {
|
|
|
8
9
|
return entitySet.annotations?.Capabilities?.FilterRestrictions?.FilterExpressionRestrictions || [];
|
|
9
10
|
};
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Reads all SortRestrictions of the main entity and the (first level) navigation restrictions.
|
|
14
|
+
* This does not work for more than one level of navigation.
|
|
15
|
+
*
|
|
16
|
+
* @param {EntitySet} entitySet Entity set to be analyzed
|
|
17
|
+
* @returns {string[]} Array containing the property names of all non-sortable properties
|
|
18
|
+
*/
|
|
19
|
+
export const getNonSortablePropertiesRestrictions = function(entitySet: EntitySet | undefined): string[] {
|
|
20
|
+
let nonSortableProperties = [];
|
|
21
|
+
// Check annotations for main entity
|
|
22
|
+
if (entitySet?.annotations?.Capabilities?.SortRestrictions?.Sortable === false) {
|
|
23
|
+
// add all properties of the entity to the nonSortableProperties
|
|
24
|
+
nonSortableProperties.push(...entitySet.entityType.entityProperties.map(property => property.name));
|
|
25
|
+
} else {
|
|
26
|
+
nonSortableProperties =
|
|
27
|
+
entitySet?.annotations?.Capabilities?.SortRestrictions?.NonSortableProperties?.map(property => property.value) || [];
|
|
28
|
+
}
|
|
29
|
+
// Check for every navigationRestriction if it has sortRestrictions
|
|
30
|
+
entitySet?.annotations?.Capabilities?.NavigationRestrictions?.RestrictedProperties?.forEach(navigationRestriction => {
|
|
31
|
+
if (navigationRestriction?.SortRestrictions?.Sortable === false) {
|
|
32
|
+
// find correct navigation property
|
|
33
|
+
const navigationProperty = entitySet?.entityType?.navigationProperties?.filter(
|
|
34
|
+
navigationProperty =>
|
|
35
|
+
navigationProperty.name == (navigationRestriction?.NavigationProperty as NavigationPropertyPath)?.value
|
|
36
|
+
);
|
|
37
|
+
if (navigationProperty[0]) {
|
|
38
|
+
// add all properties of the navigation property to the nonSortableProperties
|
|
39
|
+
nonSortableProperties.push(
|
|
40
|
+
...navigationProperty[0].targetType?.entityProperties.map(property => navigationProperty[0].name + "/" + property.name)
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
} else {
|
|
44
|
+
const nonSortableNavigationProperties = navigationRestriction?.SortRestrictions?.NonSortableProperties?.map(
|
|
45
|
+
property => (navigationRestriction?.NavigationProperty as NavigationPropertyPath)?.value + "/" + property.value
|
|
46
|
+
);
|
|
47
|
+
if (nonSortableNavigationProperties) {
|
|
48
|
+
nonSortableProperties.push(...nonSortableNavigationProperties);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
return nonSortableProperties;
|
|
13
53
|
};
|
|
14
54
|
|
|
15
55
|
export const isStickySessionSupported = function(entitySet: EntitySet): boolean {
|