@sapui5/sap.fe.core 1.99.0 → 1.100.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 +4 -2
- package/src/sap/fe/core/.library +1 -1
- package/src/sap/fe/core/AnnotationHelper.js +1 -69
- package/src/sap/fe/core/AnnotationHelper.ts +0 -70
- package/src/sap/fe/core/AppComponent.js +388 -399
- package/src/sap/fe/core/AppComponent.ts +403 -0
- package/src/sap/fe/core/AppStateHandler.js +127 -158
- package/src/sap/fe/core/BaseController.js +82 -58
- package/src/sap/fe/core/BaseController.ts +68 -0
- package/src/sap/fe/core/CommonUtils.js +111 -20
- package/src/sap/fe/core/CommonUtils.ts +131 -32
- package/src/sap/fe/core/ExtensionAPI.js +278 -274
- package/src/sap/fe/core/ExtensionAPI.ts +250 -0
- package/src/sap/fe/core/PageController.js +157 -29
- package/src/sap/fe/core/PageController.ts +60 -32
- package/src/sap/fe/core/RouterProxy.js +694 -756
- package/src/sap/fe/core/RouterProxy.ts +11 -9
- package/src/sap/fe/core/Synchronization.js +21 -31
- package/src/sap/fe/core/TemplateComponent.js +1 -1
- package/src/sap/fe/core/TemplateComponent.ts +10 -3
- package/src/sap/fe/core/TemplateModel.js +20 -38
- package/src/sap/fe/core/TemplateModel.ts +1 -1
- package/src/sap/fe/core/TransactionHelper.js +1354 -1370
- package/src/sap/fe/core/TransactionHelper.ts +33 -22
- package/src/sap/fe/core/actions/collaboration/ActivitySync.js +392 -0
- package/src/sap/fe/core/actions/collaboration/ActivitySync.ts +355 -0
- package/src/sap/fe/core/actions/collaboration/CollaborationCommon.js +136 -0
- package/src/sap/fe/core/actions/collaboration/CollaborationCommon.ts +119 -0
- package/src/sap/fe/core/actions/collaboration/Manage.js +262 -0
- package/src/sap/fe/core/actions/collaboration/Manage.ts +244 -0
- package/src/sap/fe/core/actions/collaboration/ManageDialog.fragment.xml +103 -0
- package/src/sap/fe/core/actions/collaboration/UserDetails.fragment.xml +13 -0
- package/src/sap/fe/core/actions/draft.js +30 -68
- package/src/sap/fe/core/actions/draft.ts +44 -71
- package/src/sap/fe/core/actions/messageHandling.js +55 -36
- package/src/sap/fe/core/actions/messageHandling.ts +66 -46
- package/src/sap/fe/core/actions/operations.js +34 -15
- package/src/sap/fe/core/actions/operations.ts +48 -18
- package/src/sap/fe/core/actions/sticky.js +17 -4
- package/src/sap/fe/core/actions/sticky.ts +21 -4
- package/src/sap/fe/core/controllerextensions/ControllerExtensionMetadata.js +69 -66
- package/src/sap/fe/core/controllerextensions/ControllerExtensionMetadata.ts +65 -0
- package/src/sap/fe/core/controllerextensions/EditFlow.js +1593 -1669
- package/src/sap/fe/core/controllerextensions/EditFlow.ts +1672 -0
- package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.js +79 -54
- package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.ts +61 -0
- package/src/sap/fe/core/controllerextensions/InternalEditFlow.js +718 -779
- package/src/sap/fe/core/controllerextensions/InternalEditFlow.ts +783 -0
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js +796 -816
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.ts +803 -0
- package/src/sap/fe/core/controllerextensions/InternalRouting.js +1004 -1005
- package/src/sap/fe/core/controllerextensions/InternalRouting.ts +978 -0
- package/src/sap/fe/core/controllerextensions/KPIManagement.js +487 -521
- package/src/sap/fe/core/controllerextensions/KPIManagement.ts +2 -2
- package/src/sap/fe/core/controllerextensions/MassEdit.js +141 -169
- package/src/sap/fe/core/controllerextensions/MassEdit.ts +156 -0
- package/src/sap/fe/core/controllerextensions/MessageHandler.js +233 -244
- package/src/sap/fe/core/controllerextensions/MessageHandler.ts +225 -0
- package/src/sap/fe/core/controllerextensions/PageReady.js +301 -336
- package/src/sap/fe/core/controllerextensions/PageReady.ts +12 -10
- package/src/sap/fe/core/controllerextensions/Paginator.js +188 -175
- package/src/sap/fe/core/controllerextensions/Paginator.ts +163 -0
- package/src/sap/fe/core/controllerextensions/Placeholder.js +157 -149
- package/src/sap/fe/core/controllerextensions/Placeholder.ts +151 -0
- package/src/sap/fe/core/controllerextensions/Routing.js +144 -125
- package/src/sap/fe/core/controllerextensions/Routing.ts +132 -0
- package/src/sap/fe/core/controllerextensions/RoutingListener.js +7 -6
- package/src/sap/fe/core/controllerextensions/RoutingListener.ts +3 -0
- package/src/sap/fe/core/controllerextensions/Share.js +230 -268
- package/src/sap/fe/core/controllerextensions/Share.ts +231 -0
- package/src/sap/fe/core/controllerextensions/SideEffects.js +592 -633
- package/src/sap/fe/core/controllerextensions/SideEffects.ts +8 -7
- package/src/sap/fe/core/controllerextensions/ViewState.js +788 -806
- package/src/sap/fe/core/controllerextensions/ViewState.ts +805 -0
- package/src/sap/fe/core/controls/ActionParameterDialog.fragment.xml +2 -2
- package/src/sap/fe/core/controls/ActionPartial.fragment.xml +2 -2
- package/src/sap/fe/core/controls/CommandExecution.js +67 -66
- package/src/sap/fe/core/controls/CommandExecution.ts +72 -0
- package/src/sap/fe/core/controls/ConditionalWrapper.js +90 -75
- package/src/sap/fe/core/controls/ConditionalWrapper.ts +83 -0
- package/src/sap/fe/core/controls/CustomQuickViewPage.js +130 -125
- package/src/sap/fe/core/controls/CustomQuickViewPage.ts +126 -0
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.js +103 -112
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.ts +101 -0
- package/src/sap/fe/core/controls/FieldWrapper.js +122 -135
- package/src/sap/fe/core/controls/FieldWrapper.ts +115 -0
- package/src/sap/fe/core/controls/FilterBar.js +162 -159
- package/src/sap/fe/core/controls/FilterBar.ts +143 -0
- package/src/sap/fe/core/controls/FormElementWrapper.js +45 -39
- package/src/sap/fe/core/controls/FormElementWrapper.ts +40 -0
- package/src/sap/fe/core/controls/MultiValueParameterDelegate.js +37 -42
- package/src/sap/fe/core/controls/MultiValueParameterDelegate.ts +31 -0
- package/src/sap/fe/core/controls/filterbar/FilterContainer.js +126 -116
- package/src/sap/fe/core/controls/filterbar/FilterContainer.ts +98 -0
- package/src/sap/fe/core/controls/filterbar/VisualFilter.js +241 -255
- package/src/sap/fe/core/controls/filterbar/VisualFilter.ts +245 -0
- package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.js +150 -141
- package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.ts +125 -0
- package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.js +335 -322
- package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.ts +337 -0
- package/src/sap/fe/core/controls/massEdit/MassEditHandlers.js +74 -74
- package/src/sap/fe/core/controls/massEdit/MassEditHandlers.ts +70 -0
- package/src/sap/fe/core/converters/ConverterContext.js +348 -379
- package/src/sap/fe/core/converters/ConverterContext.ts +19 -16
- package/src/sap/fe/core/converters/ManifestSettings.js +12 -1
- package/src/sap/fe/core/converters/ManifestSettings.ts +12 -1
- package/src/sap/fe/core/converters/ManifestWrapper.js +354 -378
- package/src/sap/fe/core/converters/ManifestWrapper.ts +10 -0
- package/src/sap/fe/core/converters/MetaModelConverter.js +6 -4
- package/src/sap/fe/core/converters/MetaModelConverter.ts +5 -2
- package/src/sap/fe/core/converters/TemplateConverter.js +1 -1
- package/src/sap/fe/core/converters/TemplateConverter.ts +2 -1
- package/src/sap/fe/core/converters/annotations/DataField.js +26 -12
- package/src/sap/fe/core/converters/annotations/DataField.ts +37 -13
- package/src/sap/fe/core/converters/controls/Common/Form.js +2 -2
- package/src/sap/fe/core/converters/controls/Common/Form.ts +4 -2
- package/src/sap/fe/core/converters/controls/Common/KPI.js +1 -1
- package/src/sap/fe/core/converters/controls/Common/KPI.ts +3 -2
- package/src/sap/fe/core/converters/controls/Common/Table.js +130 -23
- package/src/sap/fe/core/converters/controls/Common/Table.ts +134 -29
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.js +118 -53
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.ts +156 -93
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.js +161 -207
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.ts +148 -206
- package/src/sap/fe/core/converters/helpers/Aggregation.js +115 -133
- package/src/sap/fe/core/converters/helpers/BindingHelper.js +20 -6
- package/src/sap/fe/core/converters/helpers/BindingHelper.ts +16 -4
- package/src/sap/fe/core/converters/helpers/ConfigurableObject.js +12 -1
- package/src/sap/fe/core/converters/helpers/ConfigurableObject.ts +11 -0
- package/src/sap/fe/core/converters/helpers/Key.js +42 -57
- package/src/sap/fe/core/converters/helpers/Key.ts +1 -1
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.js +25 -4
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.ts +20 -3
- package/src/sap/fe/core/converters/templates/ListReportConverter.js +10 -4
- package/src/sap/fe/core/converters/templates/ListReportConverter.ts +15 -4
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.js +7 -5
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.ts +5 -1
- package/src/sap/fe/core/designtime/AppComponent.designtime.js +92 -98
- package/src/sap/fe/core/designtime/AppComponent.designtime.ts +91 -0
- package/src/sap/fe/core/formatters/CollaborationFormatter.js +104 -0
- package/src/sap/fe/core/formatters/CollaborationFormatter.ts +60 -0
- package/src/sap/fe/core/formatters/TableFormatter.js +53 -2
- package/src/sap/fe/core/formatters/TableFormatter.ts +51 -0
- package/src/sap/fe/core/fpm/Component.js +50 -54
- package/src/sap/fe/core/fpm/Component.ts +48 -0
- package/src/sap/fe/core/helpers/AppStartupHelper.js +323 -309
- package/src/sap/fe/core/helpers/AppStartupHelper.ts +363 -337
- package/src/sap/fe/core/helpers/BindingExpression.js +7 -7
- package/src/sap/fe/core/helpers/BindingExpression.ts +7 -7
- package/src/sap/fe/core/helpers/ClassSupport.js +186 -62
- package/src/sap/fe/core/helpers/ClassSupport.ts +168 -52
- package/src/sap/fe/core/helpers/DynamicAnnotationPathHelper.js +5 -4
- package/src/sap/fe/core/helpers/DynamicAnnotationPathHelper.ts +1 -5
- package/src/sap/fe/core/helpers/FPMHelper.js +1 -1
- package/src/sap/fe/core/helpers/FPMHelper.ts +1 -1
- package/src/sap/fe/core/helpers/MassEditHelper.js +601 -684
- package/src/sap/fe/core/helpers/MassEditHelper.ts +699 -0
- package/src/sap/fe/core/helpers/ModelHelper.js +25 -1
- package/src/sap/fe/core/helpers/ModelHelper.ts +23 -0
- package/src/sap/fe/core/helpers/SemanticDateOperators.js +5 -1
- package/src/sap/fe/core/helpers/SemanticDateOperators.ts +4 -0
- package/src/sap/fe/core/library.js +426 -451
- package/src/sap/fe/core/library.support.js +22 -33
- package/src/sap/fe/core/library.support.ts +23 -0
- package/src/sap/fe/core/library.ts +420 -0
- package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.js +5 -3
- package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.ts +4 -1
- package/src/sap/fe/core/messagebundle.properties +22 -5
- package/src/sap/fe/core/messagebundle_ar.properties +27 -7
- package/src/sap/fe/core/messagebundle_bg.properties +27 -7
- package/src/sap/fe/core/messagebundle_ca.properties +27 -7
- package/src/sap/fe/core/messagebundle_cs.properties +27 -7
- package/src/sap/fe/core/messagebundle_cy.properties +27 -7
- package/src/sap/fe/core/messagebundle_da.properties +27 -7
- package/src/sap/fe/core/messagebundle_de.properties +27 -7
- package/src/sap/fe/core/messagebundle_el.properties +27 -7
- package/src/sap/fe/core/messagebundle_en.properties +27 -7
- package/src/sap/fe/core/messagebundle_en_GB.properties +27 -7
- package/src/sap/fe/core/messagebundle_en_US_sappsd.properties +27 -7
- package/src/sap/fe/core/messagebundle_en_US_saprigi.properties +27 -7
- package/src/sap/fe/core/messagebundle_en_US_saptrc.properties +27 -7
- package/src/sap/fe/core/messagebundle_es.properties +27 -7
- package/src/sap/fe/core/messagebundle_es_MX.properties +27 -7
- package/src/sap/fe/core/messagebundle_et.properties +27 -7
- package/src/sap/fe/core/messagebundle_fi.properties +28 -8
- package/src/sap/fe/core/messagebundle_fr.properties +28 -8
- package/src/sap/fe/core/messagebundle_fr_CA.properties +29 -9
- package/src/sap/fe/core/messagebundle_hi.properties +27 -7
- package/src/sap/fe/core/messagebundle_hr.properties +27 -7
- package/src/sap/fe/core/messagebundle_hu.properties +27 -7
- package/src/sap/fe/core/messagebundle_id.properties +27 -7
- package/src/sap/fe/core/messagebundle_it.properties +27 -7
- package/src/sap/fe/core/messagebundle_iw.properties +27 -7
- package/src/sap/fe/core/messagebundle_ja.properties +26 -6
- package/src/sap/fe/core/messagebundle_kk.properties +27 -7
- package/src/sap/fe/core/messagebundle_ko.properties +27 -7
- package/src/sap/fe/core/messagebundle_lt.properties +27 -7
- package/src/sap/fe/core/messagebundle_lv.properties +28 -8
- package/src/sap/fe/core/messagebundle_ms.properties +27 -7
- package/src/sap/fe/core/messagebundle_nl.properties +27 -7
- package/src/sap/fe/core/messagebundle_no.properties +27 -7
- package/src/sap/fe/core/messagebundle_pl.properties +27 -7
- package/src/sap/fe/core/messagebundle_pt.properties +28 -8
- package/src/sap/fe/core/messagebundle_pt_PT.properties +27 -7
- package/src/sap/fe/core/messagebundle_ro.properties +27 -7
- package/src/sap/fe/core/messagebundle_ru.properties +27 -7
- package/src/sap/fe/core/messagebundle_sh.properties +27 -7
- package/src/sap/fe/core/messagebundle_sk.properties +27 -7
- package/src/sap/fe/core/messagebundle_sl.properties +27 -7
- package/src/sap/fe/core/messagebundle_sv.properties +27 -7
- package/src/sap/fe/core/messagebundle_th.properties +26 -6
- package/src/sap/fe/core/messagebundle_tr.properties +30 -10
- package/src/sap/fe/core/messagebundle_uk.properties +27 -7
- package/src/sap/fe/core/messagebundle_vi.properties +27 -7
- package/src/sap/fe/core/messagebundle_zh_CN.properties +27 -7
- package/src/sap/fe/core/messagebundle_zh_TW.properties +27 -7
- package/src/sap/fe/core/services/AsyncComponentServiceFactory.js +45 -71
- package/src/sap/fe/core/services/CacheHandlerServiceFactory.js +154 -192
- package/src/sap/fe/core/services/CacheHandlerServiceFactory.ts +4 -4
- package/src/sap/fe/core/services/EnvironmentServiceFactory.js +66 -92
- package/src/sap/fe/core/services/EnvironmentServiceFactory.ts +1 -1
- package/src/sap/fe/core/services/NavigationServiceFactory.js +284 -339
- package/src/sap/fe/core/services/NavigationServiceFactory.ts +10 -13
- package/src/sap/fe/core/services/ResourceModelServiceFactory.js +67 -102
- package/src/sap/fe/core/services/ResourceModelServiceFactory.ts +5 -2
- package/src/sap/fe/core/services/RoutingServiceFactory.js +754 -814
- package/src/sap/fe/core/services/RoutingServiceFactory.ts +13 -13
- package/src/sap/fe/core/services/ShellServicesFactory.js +649 -736
- package/src/sap/fe/core/services/ShellServicesFactory.ts +7 -4
- package/src/sap/fe/core/services/SideEffectsServiceFactory.js +567 -592
- package/src/sap/fe/core/services/SideEffectsServiceFactory.ts +22 -3
- package/src/sap/fe/core/services/TemplatedViewServiceFactory.js +354 -386
- package/src/sap/fe/core/services/TemplatedViewServiceFactory.ts +21 -14
- package/src/sap/fe/core/services/view/TemplatingErrorPage.controller.js +1 -1
- package/src/sap/fe/core/services/view/TemplatingErrorPage.controller.ts +1 -1
- package/src/sap/fe/core/support/CommonHelper.js +1 -1
- package/src/sap/fe/core/support/CommonHelper.ts +1 -1
- package/src/sap/fe/core/support/Diagnostics.js +36 -48
- package/src/sap/fe/core/templating/DataModelPathHelper.js +93 -85
- package/src/sap/fe/core/templating/DataModelPathHelper.ts +104 -95
- package/src/sap/fe/core/templating/FilterHelper.js +25 -32
- package/src/sap/fe/core/templating/FilterHelper.ts +36 -35
- package/src/sap/fe/core/templating/PropertyHelper.js +2 -2
- package/src/sap/fe/core/templating/PropertyHelper.ts +1 -1
- package/src/sap/fe/core/templating/UIFormatters.js +32 -26
- package/src/sap/fe/core/templating/UIFormatters.ts +37 -24
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import Service from "sap/ui/core/service/Service";
|
|
2
2
|
import ServiceFactory from "sap/ui/core/service/ServiceFactory";
|
|
3
3
|
import { ServiceContext } from "sap/ui/core/service";
|
|
4
|
-
import {
|
|
4
|
+
import { NavigationHandler } from "sap/fe/navigation";
|
|
5
|
+
import SelectionVariant from "sap/fe/navigation/SelectionVariant";
|
|
5
6
|
|
|
6
7
|
type NavigationServiceSettings = {};
|
|
7
|
-
class NavigationService extends Service<NavigationServiceSettings> {
|
|
8
|
+
export class NavigationService extends Service<NavigationServiceSettings> {
|
|
8
9
|
initPromise!: Promise<any>;
|
|
9
10
|
oNavHandler!: NavigationHandler;
|
|
10
11
|
init() {
|
|
@@ -30,7 +31,7 @@ class NavigationService extends Service<NavigationServiceSettings> {
|
|
|
30
31
|
* <code>Measure</code> type.
|
|
31
32
|
* @param {object} [oInnerAppData] Object for storing current state of the app
|
|
32
33
|
* @param {Function} [fnOnError] Callback that is called if an error occurs during navigation <br>
|
|
33
|
-
* @param {object} oExternalAppData Object for storing the state which will be forwarded to the target component.
|
|
34
|
+
* @param {object} [oExternalAppData] Object for storing the state which will be forwarded to the target component.
|
|
34
35
|
* @param {string} [sNavMode] Argument is used to overwrite the FLP-configured target for opening a URL. If used, only the
|
|
35
36
|
* <code>explace</code> or <code>inplace</code> values are allowed. Any other value will lead to an exception
|
|
36
37
|
* <code>NavigationHandler.INVALID_NAV_MODE</code>.
|
|
@@ -38,11 +39,11 @@ class NavigationService extends Service<NavigationServiceSettings> {
|
|
|
38
39
|
navigate(
|
|
39
40
|
sSemanticObject: string,
|
|
40
41
|
sActionName: string,
|
|
41
|
-
vNavigationParameters
|
|
42
|
-
oInnerAppData
|
|
43
|
-
fnOnError
|
|
44
|
-
oExternalAppData
|
|
45
|
-
sNavMode
|
|
42
|
+
vNavigationParameters?: string | object,
|
|
43
|
+
oInnerAppData?: object,
|
|
44
|
+
fnOnError?: Function,
|
|
45
|
+
oExternalAppData?: object,
|
|
46
|
+
sNavMode?: string
|
|
46
47
|
) {
|
|
47
48
|
// TODO: Navigation Handler does not handle navigation without a context
|
|
48
49
|
// but in v4 DataFieldForIBN with requiresContext false can trigger a navigation without any context
|
|
@@ -231,11 +232,7 @@ class NavigationService extends Service<NavigationServiceSettings> {
|
|
|
231
232
|
* (|)
|
|
232
233
|
* @returns {object} Instance of {@link sap.fe.navigation.SelectionVariant}
|
|
233
234
|
*/
|
|
234
|
-
mixAttributesAndSelectionVariant(
|
|
235
|
-
vSemanticAttributes: object | any[],
|
|
236
|
-
sSelectionVariant: string,
|
|
237
|
-
iSuppressionBehavior: number | undefined
|
|
238
|
-
) {
|
|
235
|
+
mixAttributesAndSelectionVariant(vSemanticAttributes: object | any[], sSelectionVariant: string, iSuppressionBehavior?: number) {
|
|
239
236
|
return this.oNavHandler.mixAttributesAndSelectionVariant(vSemanticAttributes, sSelectionVariant, iSuppressionBehavior);
|
|
240
237
|
}
|
|
241
238
|
|
|
@@ -7,95 +7,68 @@ sap.ui.define(["sap/ui/core/service/Service", "sap/ui/core/service/ServiceFactor
|
|
|
7
7
|
|
|
8
8
|
var _exports = {};
|
|
9
9
|
|
|
10
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
|
-
|
|
12
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
13
|
-
|
|
14
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
15
|
-
|
|
16
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
17
|
-
|
|
18
10
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
19
11
|
|
|
20
12
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
21
13
|
|
|
22
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
23
|
-
|
|
24
|
-
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
25
|
-
|
|
26
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
27
|
-
|
|
28
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
29
|
-
|
|
30
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
31
|
-
|
|
32
14
|
var ResourceModelService = /*#__PURE__*/function (_Service) {
|
|
33
15
|
_inherits(ResourceModelService, _Service);
|
|
34
16
|
|
|
35
|
-
var _super = _createSuper(ResourceModelService);
|
|
36
|
-
|
|
37
17
|
function ResourceModelService() {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
return _super.apply(this, arguments);
|
|
18
|
+
return _Service.apply(this, arguments) || this;
|
|
41
19
|
}
|
|
42
20
|
|
|
43
21
|
_exports.ResourceModelService = ResourceModelService;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
oComponent.setModel(this.oResourceModel, mSettings.modelName);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
this.initPromise = this.oResourceModel.getResourceBundle().then(function (oBundle) {
|
|
78
|
-
_this.oResourceModel.__bundle = oBundle;
|
|
79
|
-
return _this;
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
}, {
|
|
83
|
-
key: "getResourceModel",
|
|
84
|
-
value: function getResourceModel() {
|
|
85
|
-
return this.oResourceModel;
|
|
22
|
+
var _proto = ResourceModelService.prototype;
|
|
23
|
+
|
|
24
|
+
_proto.init = function init() {
|
|
25
|
+
var _this = this;
|
|
26
|
+
|
|
27
|
+
var oContext = this.getContext();
|
|
28
|
+
var mSettings = oContext.settings;
|
|
29
|
+
this.oFactory = oContext.factory; // When enhancing i18n keys the value in the last resource bundle takes precedence
|
|
30
|
+
// hence arrange various resource bundles so that enhanceI18n provided by the application is the last.
|
|
31
|
+
// The following order is used :
|
|
32
|
+
// 1. sap.fe bundle - sap.fe.core.messagebundle (passed with mSettings.bundles)
|
|
33
|
+
// 2. sap.fe bundle - sap.fe.templates.messagebundle (passed with mSettings.bundles)
|
|
34
|
+
// 3. Multiple bundles passed by the application as part of enhanceI18n
|
|
35
|
+
|
|
36
|
+
var aBundles = mSettings.bundles.concat(mSettings.enhanceI18n || []).map(function (vI18n) {
|
|
37
|
+
// if value passed for enhanceI18n is a Resource Model, return the associated bundle
|
|
38
|
+
// else the value is a bundleUrl, return Resource Bundle configuration so that a bundle can be created
|
|
39
|
+
return typeof vI18n.isA === "function" && vI18n.isA("sap.ui.model.resource.ResourceModel") ? vI18n.getResourceBundle() : {
|
|
40
|
+
bundleName: vI18n.replace(/\//g, ".")
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
this.oResourceModel = new ResourceModel({
|
|
44
|
+
bundleName: aBundles[0].bundleName,
|
|
45
|
+
enhanceWith: aBundles.slice(1),
|
|
46
|
+
async: true
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
if (oContext.scopeType === "component") {
|
|
50
|
+
var oComponent = oContext.scopeObject;
|
|
51
|
+
oComponent.setModel(this.oResourceModel, mSettings.modelName);
|
|
86
52
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
return
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
53
|
+
|
|
54
|
+
this.initPromise = Promise.all([this.oResourceModel.getResourceBundle(), this.oResourceModel._pEnhanced || Promise.resolve()]).then(function (oBundle) {
|
|
55
|
+
_this.oResourceModel.__bundle = oBundle[0];
|
|
56
|
+
return _this;
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
_proto.getResourceModel = function getResourceModel() {
|
|
61
|
+
return this.oResourceModel;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
_proto.getInterface = function getInterface() {
|
|
65
|
+
return this;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
_proto.exit = function exit() {
|
|
69
|
+
// Deregister global instance
|
|
70
|
+
this.oFactory.removeGlobalInstance();
|
|
71
|
+
};
|
|
99
72
|
|
|
100
73
|
return ResourceModelService;
|
|
101
74
|
}(Service);
|
|
@@ -105,47 +78,39 @@ sap.ui.define(["sap/ui/core/service/Service", "sap/ui/core/service/ServiceFactor
|
|
|
105
78
|
var ResourceModelServiceFactory = /*#__PURE__*/function (_ServiceFactory) {
|
|
106
79
|
_inherits(ResourceModelServiceFactory, _ServiceFactory);
|
|
107
80
|
|
|
108
|
-
var _super2 = _createSuper(ResourceModelServiceFactory);
|
|
109
|
-
|
|
110
81
|
function ResourceModelServiceFactory() {
|
|
111
82
|
var _this2;
|
|
112
83
|
|
|
113
|
-
_classCallCheck(this, ResourceModelServiceFactory);
|
|
114
|
-
|
|
115
84
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
116
85
|
args[_key] = arguments[_key];
|
|
117
86
|
}
|
|
118
87
|
|
|
119
|
-
_this2 =
|
|
120
|
-
|
|
121
|
-
_defineProperty(_assertThisInitialized(_this2), "_oInstances", {});
|
|
122
|
-
|
|
88
|
+
_this2 = _ServiceFactory.call.apply(_ServiceFactory, [this].concat(args)) || this;
|
|
89
|
+
_this2._oInstances = {};
|
|
123
90
|
return _this2;
|
|
124
91
|
}
|
|
125
92
|
|
|
126
|
-
|
|
127
|
-
key: "createInstance",
|
|
128
|
-
value: function createInstance(oServiceContext) {
|
|
129
|
-
var sKey = oServiceContext.settings.bundles.join(",") + (oServiceContext.settings.enhanceI18n ? "," + oServiceContext.settings.enhanceI18n.join(",") : "");
|
|
93
|
+
var _proto2 = ResourceModelServiceFactory.prototype;
|
|
130
94
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
factory: this
|
|
134
|
-
}, oServiceContext));
|
|
135
|
-
}
|
|
95
|
+
_proto2.createInstance = function createInstance(oServiceContext) {
|
|
96
|
+
var sKey = oServiceContext.settings.bundles.join(",") + (oServiceContext.settings.enhanceI18n ? "," + oServiceContext.settings.enhanceI18n.join(",") : "");
|
|
136
97
|
|
|
137
|
-
|
|
98
|
+
if (!this._oInstances[sKey]) {
|
|
99
|
+
this._oInstances[sKey] = new ResourceModelService(Object.assign({
|
|
100
|
+
factory: this
|
|
101
|
+
}, oServiceContext));
|
|
138
102
|
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
103
|
+
|
|
104
|
+
return this._oInstances[sKey].initPromise;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
_proto2.removeGlobalInstance = function removeGlobalInstance() {
|
|
108
|
+
this._oInstances = {};
|
|
109
|
+
};
|
|
145
110
|
|
|
146
111
|
return ResourceModelServiceFactory;
|
|
147
112
|
}(ServiceFactory);
|
|
148
113
|
|
|
149
114
|
return ResourceModelServiceFactory;
|
|
150
115
|
}, false);
|
|
151
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
116
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlc291cmNlTW9kZWxTZXJ2aWNlRmFjdG9yeS50cyJdLCJuYW1lcyI6WyJSZXNvdXJjZU1vZGVsU2VydmljZSIsImluaXQiLCJvQ29udGV4dCIsImdldENvbnRleHQiLCJtU2V0dGluZ3MiLCJzZXR0aW5ncyIsIm9GYWN0b3J5IiwiZmFjdG9yeSIsImFCdW5kbGVzIiwiYnVuZGxlcyIsImNvbmNhdCIsImVuaGFuY2VJMThuIiwibWFwIiwidkkxOG4iLCJpc0EiLCJnZXRSZXNvdXJjZUJ1bmRsZSIsImJ1bmRsZU5hbWUiLCJyZXBsYWNlIiwib1Jlc291cmNlTW9kZWwiLCJSZXNvdXJjZU1vZGVsIiwiZW5oYW5jZVdpdGgiLCJzbGljZSIsImFzeW5jIiwic2NvcGVUeXBlIiwib0NvbXBvbmVudCIsInNjb3BlT2JqZWN0Iiwic2V0TW9kZWwiLCJtb2RlbE5hbWUiLCJpbml0UHJvbWlzZSIsIlByb21pc2UiLCJhbGwiLCJfcEVuaGFuY2VkIiwicmVzb2x2ZSIsInRoZW4iLCJvQnVuZG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VxuXG5leHBvcnQgZGVmYXVsdCBSZXNvdXJjZU1vZGVsU2VydmljZUZhY3Rvcnk7XG4iXX0=
|
|
@@ -41,8 +41,11 @@ export class ResourceModelService extends Service<ResourceModelServiceSettings>
|
|
|
41
41
|
oComponent.setModel(this.oResourceModel, mSettings.modelName);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
this.initPromise =
|
|
45
|
-
|
|
44
|
+
this.initPromise = Promise.all([
|
|
45
|
+
this.oResourceModel.getResourceBundle() as Promise<ResourceBundle>,
|
|
46
|
+
(this.oResourceModel as any)._pEnhanced || Promise.resolve()
|
|
47
|
+
]).then((oBundle: any[]) => {
|
|
48
|
+
(this.oResourceModel as any).__bundle = oBundle[0];
|
|
46
49
|
return this;
|
|
47
50
|
});
|
|
48
51
|
}
|