@sapui5/sap.fe.core 1.96.4 → 1.99.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 +6 -5
- package/src/sap/fe/core/.library +1 -1
- package/src/sap/fe/core/AnnotationHelper.js +377 -405
- package/src/sap/fe/core/AnnotationHelper.ts +385 -0
- package/src/sap/fe/core/AppComponent.js +5 -3
- package/src/sap/fe/core/AppStateHandler.js +229 -195
- package/src/sap/fe/core/AppStateHandler.ts +171 -0
- package/src/sap/fe/core/BaseController.js +3 -2
- package/src/sap/fe/core/BusyLocker.js +105 -121
- package/src/sap/fe/core/BusyLocker.ts +98 -0
- package/src/sap/fe/core/CommonUtils.js +2073 -2606
- package/src/sap/fe/core/CommonUtils.ts +2078 -0
- package/src/sap/fe/core/ExtensionAPI.js +16 -7
- package/src/sap/fe/core/PageController.js +84 -119
- package/src/sap/fe/core/PageController.ts +101 -0
- package/src/sap/fe/core/RouterProxy.js +986 -809
- package/src/sap/fe/core/RouterProxy.ts +838 -0
- package/src/sap/fe/core/Synchronization.js +51 -35
- package/src/sap/fe/core/Synchronization.ts +29 -0
- package/src/sap/fe/core/TemplateComponent.js +173 -155
- package/src/sap/fe/core/TemplateComponent.ts +166 -0
- package/src/sap/fe/core/TemplateModel.js +97 -54
- package/src/sap/fe/core/TemplateModel.ts +63 -0
- package/src/sap/fe/core/TransactionHelper.js +1576 -1627
- package/src/sap/fe/core/TransactionHelper.ts +1706 -0
- package/src/sap/fe/core/actions/draft.js +559 -581
- package/src/sap/fe/core/actions/draft.ts +593 -0
- package/src/sap/fe/core/actions/messageHandling.js +545 -435
- package/src/sap/fe/core/actions/messageHandling.ts +532 -0
- package/src/sap/fe/core/actions/nonDraft.js +17 -19
- package/src/sap/fe/core/actions/nonDraft.ts +12 -0
- package/src/sap/fe/core/actions/operations.js +1074 -1192
- package/src/sap/fe/core/actions/operations.ts +1162 -0
- package/src/sap/fe/core/actions/sticky.js +102 -105
- package/src/sap/fe/core/actions/sticky.ts +102 -0
- package/src/sap/fe/core/controllerextensions/ControllerExtensionMetadata.js +3 -2
- package/src/sap/fe/core/controllerextensions/EditFlow.js +235 -264
- package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.js +3 -2
- package/src/sap/fe/core/controllerextensions/InternalEditFlow.js +288 -13
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js +35 -25
- package/src/sap/fe/core/controllerextensions/InternalRouting.js +79 -46
- package/src/sap/fe/core/controllerextensions/KPIManagement.js +86 -10
- package/src/sap/fe/core/controllerextensions/KPIManagement.ts +109 -31
- package/src/sap/fe/core/controllerextensions/MassEdit.js +172 -0
- package/src/sap/fe/core/controllerextensions/MessageHandler.js +237 -104
- package/src/sap/fe/core/controllerextensions/PageReady.js +3 -3
- package/src/sap/fe/core/controllerextensions/PageReady.ts +12 -8
- package/src/sap/fe/core/controllerextensions/Paginator.js +37 -9
- package/src/sap/fe/core/controllerextensions/Placeholder.js +8 -4
- package/src/sap/fe/core/controllerextensions/Routing.js +25 -5
- package/src/sap/fe/core/controllerextensions/RoutingListener.js +3 -2
- package/src/sap/fe/core/controllerextensions/Share.js +3 -2
- package/src/sap/fe/core/controllerextensions/SideEffects.js +9 -9
- package/src/sap/fe/core/controllerextensions/SideEffects.ts +22 -21
- package/src/sap/fe/core/controllerextensions/ViewState.js +36 -8
- package/src/sap/fe/core/controls/ActionParameterDialog.fragment.xml +2 -1
- package/src/sap/fe/core/controls/CommandExecution.js +3 -2
- package/src/sap/fe/core/controls/ConditionalWrapper.js +3 -2
- package/src/sap/fe/core/controls/CustomQuickViewPage.js +112 -113
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.js +9 -5
- package/src/sap/fe/core/controls/FieldWrapper.js +18 -23
- package/src/sap/fe/core/controls/FilterBar.js +3 -2
- package/src/sap/fe/core/controls/FormElementWrapper.js +3 -7
- package/src/sap/fe/core/controls/MultiValueParameterDelegate.js +3 -2
- package/src/sap/fe/core/controls/NonComputedVisibleKeyFieldsDialog.fragment.xml +2 -1
- package/src/sap/fe/core/controls/filterbar/FilterContainer.js +3 -2
- package/src/sap/fe/core/controls/filterbar/VisualFilter.js +5 -4
- package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.js +3 -2
- package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.js +3 -2
- package/src/sap/fe/core/controls/massEdit/MassEditDialog.fragment.xml +106 -0
- package/src/sap/fe/core/controls/massEdit/MassEditHandlers.js +79 -0
- package/src/sap/fe/core/converters/ConverterContext.js +14 -2
- package/src/sap/fe/core/converters/ConverterContext.ts +14 -3
- package/src/sap/fe/core/converters/ManifestSettings.js +2 -1
- package/src/sap/fe/core/converters/ManifestSettings.ts +8 -1
- package/src/sap/fe/core/converters/ManifestWrapper.js +56 -32
- package/src/sap/fe/core/converters/ManifestWrapper.ts +24 -6
- package/src/sap/fe/core/converters/MetaModelConverter.js +76 -6
- package/src/sap/fe/core/converters/MetaModelConverter.ts +79 -15
- package/src/sap/fe/core/converters/TemplateConverter.js +1 -1
- package/src/sap/fe/core/converters/TemplateConverter.ts +2 -2
- package/src/sap/fe/core/converters/annotations/DataField.js +3 -3
- package/src/sap/fe/core/converters/annotations/DataField.ts +1 -1
- package/src/sap/fe/core/converters/common/AnnotationConverter.js +85 -46
- package/src/sap/fe/core/converters/controls/Common/Action.js +16 -4
- package/src/sap/fe/core/converters/controls/Common/Action.ts +14 -5
- package/src/sap/fe/core/converters/controls/Common/Chart.js +5 -3
- package/src/sap/fe/core/converters/controls/Common/Chart.ts +11 -3
- package/src/sap/fe/core/converters/controls/Common/DataVisualization.js +3 -3
- package/src/sap/fe/core/converters/controls/Common/DataVisualization.ts +2 -2
- package/src/sap/fe/core/converters/controls/Common/Form.js +60 -19
- package/src/sap/fe/core/converters/controls/Common/Form.ts +66 -14
- package/src/sap/fe/core/converters/controls/Common/KPI.js +69 -4
- package/src/sap/fe/core/converters/controls/Common/KPI.ts +72 -0
- package/src/sap/fe/core/converters/controls/Common/Table.js +503 -399
- package/src/sap/fe/core/converters/controls/Common/Table.ts +615 -480
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.js +527 -0
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.ts +655 -0
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.js +489 -37
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.ts +506 -58
- package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.js +2 -2
- package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.ts +1 -1
- package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.js +6 -6
- package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.ts +9 -15
- package/src/sap/fe/core/converters/helpers/Aggregation.js +18 -3
- package/src/sap/fe/core/converters/helpers/Aggregation.ts +28 -5
- package/src/sap/fe/core/converters/helpers/ID.js +9 -1
- package/src/sap/fe/core/converters/helpers/ID.ts +4 -0
- package/src/sap/fe/core/converters/helpers/IssueManager.js +7 -1
- package/src/sap/fe/core/converters/helpers/IssueManager.ts +6 -0
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.js +4 -4
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.ts +3 -3
- package/src/sap/fe/core/converters/templates/ListReportConverter.js +29 -11
- package/src/sap/fe/core/converters/templates/ListReportConverter.ts +36 -20
- package/src/sap/fe/core/designtime/AppComponent.designtime.js +13 -3
- package/src/sap/fe/core/formatters/CriticalityFormatter.js +1 -1
- package/src/sap/fe/core/formatters/CriticalityFormatter.ts +1 -1
- package/src/sap/fe/core/formatters/FPMFormatter.js +1 -1
- package/src/sap/fe/core/formatters/FPMFormatter.ts +4 -10
- package/src/sap/fe/core/formatters/KPIFormatter.js +1 -1
- package/src/sap/fe/core/formatters/KPIFormatter.ts +3 -1
- package/src/sap/fe/core/formatters/TableFormatter.js +65 -31
- package/src/sap/fe/core/formatters/TableFormatter.ts +62 -30
- package/src/sap/fe/core/formatters/ValueFormatter.js +30 -5
- package/src/sap/fe/core/formatters/ValueFormatter.ts +30 -7
- package/src/sap/fe/core/fpm/Component.js +3 -2
- package/src/sap/fe/core/helpers/AppStartupHelper.js +359 -0
- package/src/sap/fe/core/helpers/AppStartupHelper.ts +391 -0
- package/src/sap/fe/core/helpers/BindingExpression.js +479 -464
- package/src/sap/fe/core/helpers/BindingExpression.ts +477 -483
- package/src/sap/fe/core/helpers/ClassSupport.js +27 -15
- package/src/sap/fe/core/helpers/ClassSupport.ts +31 -20
- package/src/sap/fe/core/helpers/DynamicAnnotationPathHelper.js +63 -59
- package/src/sap/fe/core/helpers/DynamicAnnotationPathHelper.ts +56 -0
- package/src/sap/fe/core/helpers/EditState.js +81 -84
- package/src/sap/fe/core/helpers/EditState.ts +81 -0
- package/src/sap/fe/core/helpers/ExcelFormatHelper.js +62 -48
- package/src/sap/fe/core/helpers/ExcelFormatHelper.ts +49 -0
- package/src/sap/fe/core/helpers/FPMHelper.js +52 -56
- package/src/sap/fe/core/helpers/FPMHelper.ts +62 -0
- package/src/sap/fe/core/helpers/KeepAliveHelper.js +210 -0
- package/src/sap/fe/core/helpers/KeepAliveHelper.ts +202 -0
- package/src/sap/fe/core/helpers/KeepAliveRefreshTypes.js +32 -0
- package/src/sap/fe/core/helpers/KeepAliveRefreshTypes.ts +36 -0
- package/src/sap/fe/core/helpers/MassEditHelper.js +687 -0
- package/src/sap/fe/core/helpers/ModelHelper.js +229 -174
- package/src/sap/fe/core/helpers/ModelHelper.ts +227 -0
- package/src/sap/fe/core/helpers/PasteHelper.js +210 -132
- package/src/sap/fe/core/helpers/PasteHelper.ts +196 -0
- package/src/sap/fe/core/helpers/SemanticDateOperators.js +332 -313
- package/src/sap/fe/core/helpers/SemanticDateOperators.ts +330 -0
- package/src/sap/fe/core/helpers/SemanticKeyHelper.js +66 -67
- package/src/sap/fe/core/helpers/SemanticKeyHelper.ts +73 -0
- package/src/sap/fe/core/helpers/StableIdHelper.js +4 -7
- package/src/sap/fe/core/helpers/StableIdHelper.ts +2 -6
- package/src/sap/fe/core/jsx-runtime/jsx.js +1 -1
- package/src/sap/fe/core/jsx-runtime/jsx.ts +1 -1
- package/src/sap/fe/core/library.js +30 -3
- package/src/sap/fe/core/library.support.js +12 -5
- package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.js +62 -0
- package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.ts +66 -0
- package/src/sap/fe/core/messagebundle.properties +72 -10
- package/src/sap/fe/core/messagebundle_ar.properties +41 -0
- package/src/sap/fe/core/messagebundle_bg.properties +41 -0
- package/src/sap/fe/core/messagebundle_ca.properties +41 -0
- package/src/sap/fe/core/messagebundle_cs.properties +42 -1
- package/src/sap/fe/core/messagebundle_cy.properties +41 -0
- package/src/sap/fe/core/messagebundle_da.properties +41 -0
- package/src/sap/fe/core/messagebundle_de.properties +41 -0
- package/src/sap/fe/core/messagebundle_el.properties +41 -0
- package/src/sap/fe/core/messagebundle_en.properties +41 -0
- package/src/sap/fe/core/messagebundle_en_GB.properties +41 -0
- package/src/sap/fe/core/messagebundle_en_US_sappsd.properties +41 -0
- package/src/sap/fe/core/messagebundle_en_US_saprigi.properties +35 -0
- package/src/sap/fe/core/messagebundle_en_US_saptrc.properties +41 -0
- package/src/sap/fe/core/messagebundle_es.properties +41 -0
- package/src/sap/fe/core/messagebundle_es_MX.properties +41 -0
- package/src/sap/fe/core/messagebundle_et.properties +41 -0
- package/src/sap/fe/core/messagebundle_fi.properties +41 -0
- package/src/sap/fe/core/messagebundle_fr.properties +46 -5
- package/src/sap/fe/core/messagebundle_fr_CA.properties +41 -0
- package/src/sap/fe/core/messagebundle_hi.properties +41 -0
- package/src/sap/fe/core/messagebundle_hr.properties +41 -0
- package/src/sap/fe/core/messagebundle_hu.properties +42 -1
- package/src/sap/fe/core/messagebundle_id.properties +45 -4
- package/src/sap/fe/core/messagebundle_it.properties +41 -0
- package/src/sap/fe/core/messagebundle_iw.properties +41 -0
- package/src/sap/fe/core/messagebundle_ja.properties +50 -9
- package/src/sap/fe/core/messagebundle_kk.properties +41 -0
- package/src/sap/fe/core/messagebundle_ko.properties +41 -0
- package/src/sap/fe/core/messagebundle_lt.properties +41 -0
- package/src/sap/fe/core/messagebundle_lv.properties +41 -0
- package/src/sap/fe/core/messagebundle_ms.properties +41 -0
- package/src/sap/fe/core/messagebundle_nl.properties +41 -0
- package/src/sap/fe/core/messagebundle_no.properties +41 -0
- package/src/sap/fe/core/messagebundle_pl.properties +41 -0
- package/src/sap/fe/core/messagebundle_pt.properties +43 -2
- package/src/sap/fe/core/messagebundle_pt_PT.properties +41 -0
- package/src/sap/fe/core/messagebundle_ro.properties +41 -0
- package/src/sap/fe/core/messagebundle_ru.properties +41 -0
- package/src/sap/fe/core/messagebundle_sh.properties +41 -0
- package/src/sap/fe/core/messagebundle_sk.properties +41 -0
- package/src/sap/fe/core/messagebundle_sl.properties +41 -0
- package/src/sap/fe/core/messagebundle_sv.properties +42 -1
- package/src/sap/fe/core/messagebundle_th.properties +41 -0
- package/src/sap/fe/core/messagebundle_tr.properties +41 -0
- package/src/sap/fe/core/messagebundle_uk.properties +41 -0
- package/src/sap/fe/core/messagebundle_vi.properties +41 -0
- package/src/sap/fe/core/messagebundle_zh_CN.properties +41 -0
- package/src/sap/fe/core/messagebundle_zh_TW.properties +41 -0
- package/src/sap/fe/core/services/AsyncComponentServiceFactory.js +2 -2
- package/src/sap/fe/core/services/AsyncComponentServiceFactory.ts +3 -1
- package/src/sap/fe/core/services/CacheHandlerServiceFactory.js +269 -202
- package/src/sap/fe/core/services/CacheHandlerServiceFactory.ts +212 -0
- package/src/sap/fe/core/services/EnvironmentServiceFactory.js +4 -3
- package/src/sap/fe/core/services/EnvironmentServiceFactory.ts +9 -5
- package/src/sap/fe/core/services/NavigationServiceFactory.js +406 -300
- package/src/sap/fe/core/services/NavigationServiceFactory.ts +316 -0
- package/src/sap/fe/core/services/ResourceModelServiceFactory.js +149 -81
- package/src/sap/fe/core/services/ResourceModelServiceFactory.ts +80 -0
- package/src/sap/fe/core/services/RoutingServiceFactory.js +987 -1166
- package/src/sap/fe/core/services/RoutingServiceFactory.ts +898 -0
- package/src/sap/fe/core/services/ShellServicesFactory.js +31 -2
- package/src/sap/fe/core/services/ShellServicesFactory.ts +45 -11
- package/src/sap/fe/core/services/SideEffectsServiceFactory.js +41 -84
- package/src/sap/fe/core/services/SideEffectsServiceFactory.ts +56 -99
- package/src/sap/fe/core/services/TemplatedViewServiceFactory.js +461 -478
- package/src/sap/fe/core/services/TemplatedViewServiceFactory.ts +453 -0
- package/src/sap/fe/core/services/view/TemplatingErrorPage.controller.js +10 -8
- package/src/sap/fe/core/services/view/TemplatingErrorPage.controller.ts +8 -0
- package/src/sap/fe/core/support/AnnotationIssue.support.js +15 -3
- package/src/sap/fe/core/support/AnnotationIssue.support.ts +16 -2
- package/src/sap/fe/core/support/CollectionFacetUnsupportedLevel.support.js +2 -2
- package/src/sap/fe/core/support/CollectionFacetUnsupportedLevel.support.ts +1 -1
- package/src/sap/fe/core/support/InvalidAnnotationColumnKey.support.js +38 -0
- package/src/sap/fe/core/support/InvalidAnnotationColumnKey.support.ts +18 -0
- package/src/sap/fe/core/templating/DataModelPathHelper.js +6 -24
- package/src/sap/fe/core/templating/DataModelPathHelper.ts +10 -23
- package/src/sap/fe/core/templating/DisplayModeFormatter.js +114 -0
- package/src/sap/fe/core/templating/DisplayModeFormatter.ts +86 -0
- package/src/sap/fe/core/templating/EntitySetHelper.js +80 -7
- package/src/sap/fe/core/templating/EntitySetHelper.ts +42 -2
- package/src/sap/fe/core/templating/FieldControlHelper.js +8 -8
- package/src/sap/fe/core/templating/FieldControlHelper.ts +25 -7
- package/src/sap/fe/core/templating/FilterHelper.js +139 -70
- package/src/sap/fe/core/templating/FilterHelper.ts +140 -70
- 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 +45 -113
- package/src/sap/fe/core/templating/UIFormatters.ts +39 -76
- package/src/sap/fe/core/type/Email.js +1 -1
- package/src/sap/fe/core/type/Email.ts +4 -6
- package/ui5.yaml +0 -3
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SAPUI5
|
|
3
|
-
|
|
2
|
+
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
3
|
+
(c) Copyright 2009-2021 SAP SE. All rights reserved
|
|
4
|
+
|
|
4
5
|
*/
|
|
5
6
|
sap.ui.define(
|
|
6
7
|
["sap/ui/base/Object", "sap/fe/core/CommonUtils", "sap/base/Log", "sap/ui/core/Component", "sap/ui/model/json/JSONModel"],
|
|
@@ -157,11 +158,12 @@ sap.ui.define(
|
|
|
157
158
|
* @alias sap.fe.core.ExtensionAPI#navigateToTarget
|
|
158
159
|
* @param {string} sTarget Name of the target route
|
|
159
160
|
* @param {sap.ui.model.Context} [oContext] Context instance
|
|
161
|
+
* @returns {Promise} Promise that is resolved when the navigation is finalized
|
|
160
162
|
*
|
|
161
163
|
* @public
|
|
162
164
|
*/
|
|
163
165
|
navigateToTarget: function(sTarget, oContext) {
|
|
164
|
-
this._controller._routing.navigateToTarget(oContext, sTarget);
|
|
166
|
+
return this._controller._routing.navigateToTarget(oContext, sTarget);
|
|
165
167
|
},
|
|
166
168
|
|
|
167
169
|
/**
|
|
@@ -229,10 +231,17 @@ sap.ui.define(
|
|
|
229
231
|
* @public
|
|
230
232
|
*/
|
|
231
233
|
updateAppState: function() {
|
|
232
|
-
|
|
233
|
-
.
|
|
234
|
-
|
|
235
|
-
|
|
234
|
+
if (
|
|
235
|
+
!this._controller
|
|
236
|
+
.getAppComponent()
|
|
237
|
+
.getModel("internal")
|
|
238
|
+
.getProperty("/uiAdaptation")
|
|
239
|
+
) {
|
|
240
|
+
return this._controller
|
|
241
|
+
.getAppComponent()
|
|
242
|
+
.getAppStateHandler()
|
|
243
|
+
.createAppState();
|
|
244
|
+
}
|
|
236
245
|
},
|
|
237
246
|
|
|
238
247
|
/**
|
|
@@ -1,127 +1,92 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SAPUI5
|
|
3
|
-
*
|
|
2
|
+
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
3
|
+
* (c) Copyright 2009-2021 SAP SE. All rights reserved
|
|
4
4
|
*/
|
|
5
|
-
sap.ui.define(
|
|
6
|
-
|
|
7
|
-
"sap/fe/core/BaseController",
|
|
8
|
-
"sap/fe/core/ExtensionAPI",
|
|
9
|
-
"sap/fe/core/controllerextensions/InternalRouting",
|
|
10
|
-
"sap/fe/core/controllerextensions/Routing",
|
|
11
|
-
"sap/fe/core/controllerextensions/EditFlow",
|
|
12
|
-
"sap/fe/core/controllerextensions/InternalEditFlow",
|
|
13
|
-
"sap/fe/core/controllerextensions/PageReady",
|
|
14
|
-
"sap/fe/core/controllerextensions/MessageHandler",
|
|
15
|
-
"sap/fe/core/controllerextensions/IntentBasedNavigation",
|
|
16
|
-
"sap/fe/core/controllerextensions/InternalIntentBasedNavigation",
|
|
17
|
-
"sap/fe/core/controllerextensions/Share",
|
|
18
|
-
"sap/fe/core/controllerextensions/ViewState",
|
|
19
|
-
"sap/fe/core/controllerextensions/Paginator",
|
|
20
|
-
"sap/fe/core/controllerextensions/Placeholder"
|
|
21
|
-
],
|
|
22
|
-
function(
|
|
23
|
-
Controller,
|
|
24
|
-
ExtensionAPI,
|
|
25
|
-
InternalRouting,
|
|
26
|
-
Routing,
|
|
27
|
-
EditFlow,
|
|
28
|
-
InternalEditFlow,
|
|
29
|
-
PageReady,
|
|
30
|
-
MessageHandler,
|
|
31
|
-
IntentBasedNavigation,
|
|
32
|
-
InternalIntentBasedNavigation,
|
|
33
|
-
Share,
|
|
34
|
-
ViewState,
|
|
35
|
-
Paginator,
|
|
36
|
-
Placeholder
|
|
37
|
-
) {
|
|
38
|
-
"use strict";
|
|
5
|
+
sap.ui.define(["sap/fe/core/BaseController", "sap/fe/core/ExtensionAPI", "sap/fe/core/controllerextensions/InternalEditFlow", "sap/fe/core/controllerextensions/InternalIntentBasedNavigation", "sap/fe/core/controllerextensions/InternalRouting", "sap/fe/core/controllerextensions/MassEdit", "sap/fe/core/controllerextensions/Placeholder", "sap/fe/core/controllerextensions/Routing", "sap/fe/core/controllerextensions/EditFlow", "sap/fe/core/controllerextensions/PageReady", "sap/fe/core/controllerextensions/MessageHandler", "sap/fe/core/controllerextensions/IntentBasedNavigation", "sap/fe/core/controllerextensions/Share", "sap/fe/core/controllerextensions/ViewState", "sap/fe/core/controllerextensions/Paginator", "sap/fe/core/controllerextensions/SideEffects"], function (Controller, ExtensionAPI, InternalEditFlow, InternalIntentBasedNavigation, InternalRouting, MassEdit, Placeholder, Routing, EditFlow, PageReady, MessageHandler, IntentBasedNavigation, Share, ViewState, Paginator, SideEffects) {
|
|
6
|
+
"use strict";
|
|
39
7
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
* @name sap.fe.core.PageController.getMetadata
|
|
66
|
-
* @function
|
|
67
|
-
*/
|
|
68
|
-
/**
|
|
69
|
-
* @private
|
|
70
|
-
* @name sap.fe.core.PageController.extend
|
|
71
|
-
* @function
|
|
72
|
-
*/
|
|
8
|
+
/**
|
|
9
|
+
* @class Base controller class for your custom page used inside an SAP Fiori elements application.
|
|
10
|
+
*
|
|
11
|
+
* This controller provides preconfigured extensions that will ensure you have the basic functionalities required to use the building blocks.
|
|
12
|
+
*
|
|
13
|
+
* @hideconstructor
|
|
14
|
+
* @public
|
|
15
|
+
* @name sap.fe.core.PageController
|
|
16
|
+
* @since 1.88.0
|
|
17
|
+
*/
|
|
18
|
+
return Controller.extend("sap.fe.core.PageController", {
|
|
19
|
+
routing: Routing,
|
|
20
|
+
_routing: InternalRouting,
|
|
21
|
+
editFlow: EditFlow,
|
|
22
|
+
_editFlow: InternalEditFlow,
|
|
23
|
+
intentBasedNavigation: IntentBasedNavigation,
|
|
24
|
+
_intentBasedNavigation: InternalIntentBasedNavigation,
|
|
25
|
+
pageReady: PageReady,
|
|
26
|
+
messageHandler: MessageHandler,
|
|
27
|
+
share: Share,
|
|
28
|
+
paginator: Paginator,
|
|
29
|
+
viewState: ViewState,
|
|
30
|
+
placeholder: Placeholder,
|
|
31
|
+
_sideEffects: SideEffects,
|
|
32
|
+
massEdit: MassEdit,
|
|
73
33
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
34
|
+
/**
|
|
35
|
+
* @private
|
|
36
|
+
* @name sap.fe.core.PageController.getMetadata
|
|
37
|
+
* @function
|
|
38
|
+
*/
|
|
78
39
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
40
|
+
/**
|
|
41
|
+
* @private
|
|
42
|
+
* @name sap.fe.core.PageController.extend
|
|
43
|
+
* @function
|
|
44
|
+
*/
|
|
45
|
+
onInit: function () {
|
|
46
|
+
var oUIModel = this.getAppComponent().getModel("ui"),
|
|
47
|
+
oInternalModel = this.getAppComponent().getModel("internal"),
|
|
48
|
+
sPath = "/pages/" + this.getView().getId();
|
|
49
|
+
oUIModel.setProperty(sPath, {
|
|
50
|
+
controls: {}
|
|
51
|
+
});
|
|
52
|
+
oInternalModel.setProperty(sPath, {
|
|
53
|
+
controls: {}
|
|
54
|
+
});
|
|
55
|
+
this.getView().bindElement({
|
|
56
|
+
path: sPath,
|
|
57
|
+
model: "ui"
|
|
58
|
+
});
|
|
59
|
+
this.getView().bindElement({
|
|
60
|
+
path: sPath,
|
|
61
|
+
model: "internal"
|
|
62
|
+
}); // for the time being provide it also pageInternal as some macros access it - to be removed
|
|
93
63
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
64
|
+
this.getView().bindElement({
|
|
65
|
+
path: sPath,
|
|
66
|
+
model: "pageInternal"
|
|
67
|
+
});
|
|
68
|
+
this.getView().setModel(oInternalModel, "pageInternal"); // as the model propagation happens after init but we actually want to access the binding context in the
|
|
69
|
+
// init phase already setting the model here
|
|
100
70
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
71
|
+
this.getView().setModel(oUIModel, "ui");
|
|
72
|
+
this.getView().setModel(oInternalModel, "internal");
|
|
73
|
+
},
|
|
74
|
+
onBeforeRendering: function () {
|
|
75
|
+
if (this.placeholder.attachHideCallback) {
|
|
76
|
+
this.placeholder.attachHideCallback();
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
getExtensionAPI: function () {
|
|
80
|
+
if (!this.extensionAPI) {
|
|
81
|
+
this.extensionAPI = new ExtensionAPI(this);
|
|
82
|
+
}
|
|
106
83
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
return this.extensionAPI;
|
|
117
|
-
},
|
|
118
|
-
|
|
119
|
-
onPageReady: function(mParameters) {
|
|
120
|
-
// Apply app state only after the page is ready with the first section selected
|
|
121
|
-
this.getAppComponent()
|
|
122
|
-
.getAppStateHandler()
|
|
123
|
-
.applyAppState();
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
);
|
|
84
|
+
return this.extensionAPI;
|
|
85
|
+
},
|
|
86
|
+
onPageReady: function () {
|
|
87
|
+
// Apply app state only after the page is ready with the first section selected
|
|
88
|
+
this.getAppComponent().getAppStateHandler().applyAppState();
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
}, false);
|
|
92
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlBhZ2VDb250cm9sbGVyLnRzIl0sIm5hbWVzIjpbIkNvbnRyb2xsZXIiLCJleHRlbmQiLCJyb3V0aW5nIiwiUm91dGluZyIsIl9yb3V0aW5nIiwiSW50ZXJuYWxSb3V0aW5nIiwiZWRpdEZsb3ciLCJFZGl0RmxvdyIsIl9lZGl0RmxvdyIsIkludGVybmFsRWRpdEZsb3ciLCJpbnRlbnRCYXNlZE5hdmlnYXRpb24iLCJJbnRlbnRCYXNlZE5hdmlnYXRpb24iLCJfaW50ZW50QmFzZWROYXZpZ2F0aW9uIiwiSW50ZXJuYWxJbnRlbnRCYXNlZE5hdmlnYXRpb24iLCJwYWdlUmVhZHkiLCJQYWdlUmVhZHkiLCJtZXNzYWdlSGFuZGxlciIsIk1lc3NhZ2VIYW5kbGVyIiwic2hhcmUiLCJTaGFyZSIsInBhZ2luYXRvciIsIlBhZ2luYXRvciIsInZpZXdTdGF0ZSIsIlZpZXdTdGF0ZSIsInBsYWNlaG9sZGVyIiwiUGxhY2Vob2xkZXIiLCJfc2lkZUVmZmVjdHMiLCJTaWRlRWZmZWN0cyIsIm1hc3NFZGl0IiwiTWFzc0VkaXQiLCJvbkluaXQiLCJvVUlNb2RlbCIsImdldEFwcENvbXBvbmVudCIsImdldE1vZGVsIiwib0ludGVybmFsTW9kZWwiLCJzUGF0aCIsImdldFZpZXciLCJnZXRJZCIsInNldFByb3BlcnR5IiwiY29udHJvbHMiLCJiaW5kRWxlbWVudCIsInBhdGgiLCJtb2RlbCIsInNldE1vZGVsIiwib25CZWZvcmVSZW5kZXJpbmciLCJhdHRhY2hIaWRlQ2FsbGJhY2siLCJnZXRFeHRlbnNpb25BUE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U3RhdGUoKTtcblx0fVxufSk7XG4iXX0=
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import Controller from "sap/fe/core/BaseController";
|
|
2
|
+
import { AppComponent, ExtensionAPI } from "sap/fe/core";
|
|
3
|
+
import { InternalEditFlow, InternalIntentBasedNavigation, InternalRouting, MassEdit, Placeholder } from "sap/fe/core/controllerextensions";
|
|
4
|
+
import Routing from "sap/fe/core/controllerextensions/Routing";
|
|
5
|
+
import EditFlow from "sap/fe/core/controllerextensions/EditFlow";
|
|
6
|
+
import PageReady from "sap/fe/core/controllerextensions/PageReady";
|
|
7
|
+
import MessageHandler from "sap/fe/core/controllerextensions/MessageHandler";
|
|
8
|
+
import IntentBasedNavigation from "sap/fe/core/controllerextensions/IntentBasedNavigation";
|
|
9
|
+
import Share from "sap/fe/core/controllerextensions/Share";
|
|
10
|
+
import ViewState from "sap/fe/core/controllerextensions/ViewState";
|
|
11
|
+
import Paginator from "sap/fe/core/controllerextensions/Paginator";
|
|
12
|
+
import SideEffects from "sap/fe/core/controllerextensions/SideEffects";
|
|
13
|
+
import JSONModel from "sap/ui/model/json/JSONModel";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @class Base controller class for your custom page used inside an SAP Fiori elements application.
|
|
17
|
+
*
|
|
18
|
+
* This controller provides preconfigured extensions that will ensure you have the basic functionalities required to use the building blocks.
|
|
19
|
+
*
|
|
20
|
+
* @hideconstructor
|
|
21
|
+
* @public
|
|
22
|
+
* @name sap.fe.core.PageController
|
|
23
|
+
* @since 1.88.0
|
|
24
|
+
*/
|
|
25
|
+
export default Controller.extend("sap.fe.core.PageController", {
|
|
26
|
+
routing: Routing,
|
|
27
|
+
_routing: InternalRouting,
|
|
28
|
+
editFlow: EditFlow,
|
|
29
|
+
_editFlow: InternalEditFlow,
|
|
30
|
+
intentBasedNavigation: IntentBasedNavigation,
|
|
31
|
+
_intentBasedNavigation: InternalIntentBasedNavigation,
|
|
32
|
+
pageReady: PageReady,
|
|
33
|
+
messageHandler: MessageHandler,
|
|
34
|
+
share: Share,
|
|
35
|
+
paginator: Paginator,
|
|
36
|
+
viewState: ViewState,
|
|
37
|
+
placeholder: Placeholder,
|
|
38
|
+
_sideEffects: SideEffects,
|
|
39
|
+
massEdit: MassEdit,
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @private
|
|
43
|
+
* @name sap.fe.core.PageController.getMetadata
|
|
44
|
+
* @function
|
|
45
|
+
*/
|
|
46
|
+
/**
|
|
47
|
+
* @private
|
|
48
|
+
* @name sap.fe.core.PageController.extend
|
|
49
|
+
* @function
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
onInit: function() {
|
|
53
|
+
const oUIModel = this.getAppComponent().getModel("ui") as JSONModel,
|
|
54
|
+
oInternalModel = this.getAppComponent().getModel("internal") as JSONModel,
|
|
55
|
+
sPath = "/pages/" + this.getView().getId();
|
|
56
|
+
|
|
57
|
+
oUIModel.setProperty(sPath, {
|
|
58
|
+
controls: {}
|
|
59
|
+
});
|
|
60
|
+
oInternalModel.setProperty(sPath, {
|
|
61
|
+
controls: {}
|
|
62
|
+
});
|
|
63
|
+
this.getView().bindElement({
|
|
64
|
+
path: sPath,
|
|
65
|
+
model: "ui"
|
|
66
|
+
});
|
|
67
|
+
this.getView().bindElement({
|
|
68
|
+
path: sPath,
|
|
69
|
+
model: "internal"
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
// for the time being provide it also pageInternal as some macros access it - to be removed
|
|
73
|
+
this.getView().bindElement({
|
|
74
|
+
path: sPath,
|
|
75
|
+
model: "pageInternal"
|
|
76
|
+
});
|
|
77
|
+
this.getView().setModel(oInternalModel, "pageInternal");
|
|
78
|
+
|
|
79
|
+
// as the model propagation happens after init but we actually want to access the binding context in the
|
|
80
|
+
// init phase already setting the model here
|
|
81
|
+
this.getView().setModel(oUIModel, "ui");
|
|
82
|
+
this.getView().setModel(oInternalModel, "internal");
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
onBeforeRendering: function() {
|
|
86
|
+
if (this.placeholder.attachHideCallback) {
|
|
87
|
+
this.placeholder.attachHideCallback();
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
getExtensionAPI: function(this: any): ExtensionAPI {
|
|
91
|
+
if (!this.extensionAPI) {
|
|
92
|
+
this.extensionAPI = new ExtensionAPI(this);
|
|
93
|
+
}
|
|
94
|
+
return this.extensionAPI;
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
onPageReady: function() {
|
|
98
|
+
// Apply app state only after the page is ready with the first section selected
|
|
99
|
+
(this.getAppComponent() as AppComponent).getAppStateHandler().applyAppState();
|
|
100
|
+
}
|
|
101
|
+
});
|