@sapui5/sap.fe.core 1.114.0 → 1.114.2
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/src/sap/fe/core/.library +1 -1
- package/src/sap/fe/core/ActionRuntime-dbg.js +3 -2
- package/src/sap/fe/core/ActionRuntime.js +1 -1
- package/src/sap/fe/core/ActionRuntime.js.map +1 -1
- package/src/sap/fe/core/ActionRuntime.ts +2 -3
- package/src/sap/fe/core/AppStateHandler-dbg.js +4 -1
- package/src/sap/fe/core/AppStateHandler.js +1 -1
- package/src/sap/fe/core/AppStateHandler.js.map +1 -1
- package/src/sap/fe/core/AppStateHandler.ts +4 -1
- package/src/sap/fe/core/ExtensionAPI-dbg.js +3 -2
- package/src/sap/fe/core/ExtensionAPI.js +1 -1
- package/src/sap/fe/core/ExtensionAPI.js.map +1 -1
- package/src/sap/fe/core/ExtensionAPI.ts +7 -4
- package/src/sap/fe/core/buildingBlocks/BuildingBlockBase-dbg.js +10 -3
- package/src/sap/fe/core/buildingBlocks/BuildingBlockBase.js +1 -1
- package/src/sap/fe/core/buildingBlocks/BuildingBlockBase.js.map +1 -1
- package/src/sap/fe/core/buildingBlocks/BuildingBlockBase.ts +8 -1
- package/src/sap/fe/core/controllerextensions/EditFlow-dbg.js +5 -5
- package/src/sap/fe/core/controllerextensions/EditFlow.js +1 -1
- package/src/sap/fe/core/controllerextensions/EditFlow.js.map +1 -1
- package/src/sap/fe/core/controllerextensions/EditFlow.ts +4 -4
- package/src/sap/fe/core/controllerextensions/InternalRouting-dbg.js +17 -10
- package/src/sap/fe/core/controllerextensions/InternalRouting.js +1 -1
- package/src/sap/fe/core/controllerextensions/InternalRouting.js.map +1 -1
- package/src/sap/fe/core/controllerextensions/InternalRouting.ts +15 -8
- package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper-dbg.js +14 -16
- package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper.js +1 -1
- package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper.js.map +1 -1
- package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper.ts +16 -16
- package/src/sap/fe/core/controllerextensions/editFlow/sticky-dbg.js +2 -4
- package/src/sap/fe/core/controllerextensions/editFlow/sticky.js +1 -1
- package/src/sap/fe/core/controllerextensions/editFlow/sticky.js.map +1 -1
- package/src/sap/fe/core/controllerextensions/editFlow/sticky.ts +1 -3
- package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling-dbg.js +5 -3
- package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling.js +1 -1
- package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling.js.map +1 -1
- package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling.ts +4 -2
- package/src/sap/fe/core/converters/MetaModelConverter-dbg.js +1 -1
- package/src/sap/fe/core/converters/MetaModelConverter.ts +1 -1
- package/src/sap/fe/core/converters/controls/Common/Chart-dbg.js +10 -6
- package/src/sap/fe/core/converters/controls/Common/Chart.js +1 -1
- package/src/sap/fe/core/converters/controls/Common/Chart.js.map +1 -1
- package/src/sap/fe/core/converters/controls/Common/Chart.ts +18 -9
- package/src/sap/fe/core/converters/controls/Common/DataVisualization-dbg.js +2 -2
- package/src/sap/fe/core/converters/controls/Common/DataVisualization.js +1 -1
- package/src/sap/fe/core/converters/controls/Common/DataVisualization.js.map +1 -1
- package/src/sap/fe/core/converters/controls/Common/DataVisualization.ts +0 -1
- package/src/sap/fe/core/converters/controls/Common/Table-dbg.js +75 -45
- package/src/sap/fe/core/converters/controls/Common/Table.js +1 -1
- package/src/sap/fe/core/converters/controls/Common/Table.js.map +1 -1
- package/src/sap/fe/core/converters/controls/Common/Table.ts +72 -43
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions-dbg.js +29 -29
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.js +1 -1
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.js.map +1 -1
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.ts +28 -34
- package/src/sap/fe/core/converters/helpers/InsightsHelpers-dbg.js +11 -3
- package/src/sap/fe/core/converters/helpers/InsightsHelpers.js +1 -1
- package/src/sap/fe/core/converters/helpers/InsightsHelpers.js.map +1 -1
- package/src/sap/fe/core/converters/helpers/InsightsHelpers.ts +13 -8
- package/src/sap/fe/core/fpm/manifest.json +1 -1
- package/src/sap/fe/core/helpers/BindingToolkit-dbg.js +70 -22
- package/src/sap/fe/core/helpers/BindingToolkit.js +1 -1
- package/src/sap/fe/core/helpers/BindingToolkit.js.map +1 -1
- package/src/sap/fe/core/helpers/BindingToolkit.ts +107 -26
- package/src/sap/fe/core/helpers/RecommendationHelper-dbg.js +16 -1
- package/src/sap/fe/core/helpers/RecommendationHelper.js +1 -1
- package/src/sap/fe/core/helpers/RecommendationHelper.js.map +1 -1
- package/src/sap/fe/core/helpers/RecommendationHelper.ts +20 -0
- package/src/sap/fe/core/library-dbg.js +4 -3
- package/src/sap/fe/core/library-preload.js +22 -22
- package/src/sap/fe/core/library-preload.js.map +1 -1
- package/src/sap/fe/core/library.js +1 -1
- package/src/sap/fe/core/library.js.map +1 -1
- package/src/sap/fe/core/library.ts +1 -1
- package/src/sap/fe/core/manifest.json +1 -1
- package/src/sap/fe/core/messagebundle.properties +6 -0
- package/src/sap/fe/core/messagebundle_ar.properties +5 -1
- package/src/sap/fe/core/messagebundle_bg.properties +9 -5
- package/src/sap/fe/core/messagebundle_ca.properties +5 -1
- package/src/sap/fe/core/messagebundle_cs.properties +7 -3
- package/src/sap/fe/core/messagebundle_cy.properties +7 -3
- package/src/sap/fe/core/messagebundle_da.properties +7 -3
- package/src/sap/fe/core/messagebundle_de.properties +7 -3
- package/src/sap/fe/core/messagebundle_el.properties +7 -3
- package/src/sap/fe/core/messagebundle_en.properties +7 -3
- package/src/sap/fe/core/messagebundle_en_GB.properties +5 -1
- package/src/sap/fe/core/messagebundle_en_US_sappsd.properties +6 -2
- package/src/sap/fe/core/messagebundle_en_US_saprigi.properties +6 -2
- package/src/sap/fe/core/messagebundle_en_US_saptrc.properties +6 -2
- package/src/sap/fe/core/messagebundle_es.properties +5 -1
- package/src/sap/fe/core/messagebundle_es_MX.properties +5 -1
- package/src/sap/fe/core/messagebundle_et.properties +7 -3
- package/src/sap/fe/core/messagebundle_fi.properties +7 -3
- package/src/sap/fe/core/messagebundle_fr.properties +7 -3
- package/src/sap/fe/core/messagebundle_fr_CA.properties +10 -6
- package/src/sap/fe/core/messagebundle_hi.properties +7 -3
- package/src/sap/fe/core/messagebundle_hr.properties +7 -3
- package/src/sap/fe/core/messagebundle_hu.properties +7 -3
- package/src/sap/fe/core/messagebundle_id.properties +7 -3
- package/src/sap/fe/core/messagebundle_it.properties +13 -9
- package/src/sap/fe/core/messagebundle_iw.properties +7 -3
- package/src/sap/fe/core/messagebundle_ja.properties +13 -9
- package/src/sap/fe/core/messagebundle_kk.properties +7 -3
- package/src/sap/fe/core/messagebundle_ko.properties +7 -3
- package/src/sap/fe/core/messagebundle_lt.properties +7 -3
- package/src/sap/fe/core/messagebundle_lv.properties +5 -1
- package/src/sap/fe/core/messagebundle_ms.properties +5 -1
- package/src/sap/fe/core/messagebundle_nl.properties +7 -3
- package/src/sap/fe/core/messagebundle_no.properties +5 -1
- package/src/sap/fe/core/messagebundle_pl.properties +9 -5
- package/src/sap/fe/core/messagebundle_pt.properties +7 -3
- package/src/sap/fe/core/messagebundle_pt_PT.properties +7 -3
- package/src/sap/fe/core/messagebundle_ro.properties +5 -1
- package/src/sap/fe/core/messagebundle_ru.properties +7 -3
- package/src/sap/fe/core/messagebundle_sh.properties +7 -3
- package/src/sap/fe/core/messagebundle_sk.properties +7 -3
- package/src/sap/fe/core/messagebundle_sl.properties +5 -1
- package/src/sap/fe/core/messagebundle_sv.properties +5 -1
- package/src/sap/fe/core/messagebundle_th.properties +7 -3
- package/src/sap/fe/core/messagebundle_tr.properties +7 -3
- package/src/sap/fe/core/messagebundle_uk.properties +7 -3
- package/src/sap/fe/core/messagebundle_vi.properties +7 -3
- package/src/sap/fe/core/messagebundle_zh_CN.properties +5 -1
- package/src/sap/fe/core/messagebundle_zh_TW.properties +8 -4
- package/src/sap/fe/core/rootView/Fcl-dbg.controller.js +8 -2
- package/src/sap/fe/core/rootView/Fcl.controller.js +1 -1
- package/src/sap/fe/core/rootView/Fcl.controller.js.map +1 -1
- package/src/sap/fe/core/rootView/Fcl.controller.ts +8 -1
- package/src/sap/fe/core/rootView/NavContainer-dbg.controller.js +8 -2
- package/src/sap/fe/core/rootView/NavContainer.controller.js +1 -1
- package/src/sap/fe/core/rootView/NavContainer.controller.js.map +1 -1
- package/src/sap/fe/core/rootView/NavContainer.controller.ts +10 -3
- package/src/sap/fe/core/services/EnvironmentServiceFactory-dbg.js +30 -14
- package/src/sap/fe/core/services/EnvironmentServiceFactory.js +1 -1
- package/src/sap/fe/core/services/EnvironmentServiceFactory.js.map +1 -1
- package/src/sap/fe/core/services/EnvironmentServiceFactory.ts +30 -20
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
4
4
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
5
5
|
*/
|
|
6
|
-
sap.ui.predefine("sap/fe/core/ActionRuntime", ["sap/base/util/merge","sap/fe/core/CommonUtils","sap/fe/core/helpers/BindingToolkit","sap/fe/core/helpers/ModelHelper","sap/fe/core/helpers/TypeGuards","sap/ui/core/message/Message","./controls/AnyElement","./converters/ConverterContext","./converters/objectPage/HeaderAndFooterAction"],function(e,t,n,o,i,a,l,
|
|
6
|
+
sap.ui.predefine("sap/fe/core/ActionRuntime", ["sap/base/util/merge","sap/fe/core/CommonUtils","sap/fe/core/helpers/BindingToolkit","sap/fe/core/helpers/ModelHelper","sap/fe/core/helpers/TypeGuards","sap/ui/core/message/Message","./controls/AnyElement","./converters/ConverterContext","./converters/objectPage/HeaderAndFooterAction"],function(e,t,n,o,i,a,s,l,r){"use strict";var d=r.getHiddenExpression;var c=r.getEditButtonEnabled;var u=i.isEntitySet;var g=n.transformRecursively;var f=n.equal;var v=n.constant;var p=n.compileExpression;const b={_addMessageForActionParameter:function(e,t){e.addMessages(t.map(e=>{const t=e.actionParameterInfo.field.getBinding(e.actionParameterInfo.isMultiValue?"items":"value");return new a({message:e.message,type:"Error",processor:t===null||t===void 0?void 0:t.getModel(),persistent:true,target:t===null||t===void 0?void 0:t.getResolvedPath()})}))},validateProperties:async function(e,t,n){await Promise.allSettled(t.map(e=>e.validationPromise));const o=t.filter(e=>e.field.getRequired());const i=e.getMessageModel().getData();const a=o.filter(e=>{const t=e.field.getId();const n=i.filter(e=>e.getControlIds().some(e=>e.includes(t)));if(n.length>0){return false}else if(e.isMultiValue){return e.value===undefined||!e.value.length}else{const t=e.field.getValue();return t===undefined||t===null||t===""}});if(a.length){this._addMessageForActionParameter(e,a.map(e=>{var t;return{actionParameterInfo:e,message:n.getText("C_OPERATIONS_ACTION_PARAMETER_DIALOG_MISSING_MANDATORY_MSG",[((t=e.field.getParent())===null||t===void 0?void 0:t.getAggregation("label")).getText()])}}))}const s=t.find(e=>e.hasError||e.field.getValueState()==="Error"||a.includes(e));if(s){s.field.focus();return false}else{return true}},setActionEnablement:async function(e,n,o,i){const a=[];for(const s in n){let l=[];e.setProperty(s,false);const r=n[s];for(let t=0;t<o.length;t++){const n=o[t];if(n){const t=n.getObject();if(i==="chart"){if(r===null&&!!t[`#${s}`]||n.getObject(r)){e.setProperty(s,true);break}}else if(i==="table"){l=this._setActionEnablementForTable(n,e,s,r,l)}}}if(i==="table"){if(!o.length){e.setProperty(`dynamicActions/${s}`,{bEnabled:false,aApplicable:[],aNotApplicable:[]});a.push(t.setContextsBasedOnOperationAvailable(e,[]))}else if(o.length&&typeof r==="string"){a.push(t.setContextsBasedOnOperationAvailable(e,l))}}}return Promise.all(a)},setActionEnablementAfterPatch:function(e,t,n){const o=n===null||n===void 0?void 0:n.getObject();const i=(o===null||o===void 0?void 0:o.controls)||{};for(const n in i){if(i[n]&&i[n].controlId){const o=e.byId(n);if(o&&o.isA("sap.ui.mdc.Table")){const e=o.getRowBinding();if(e==t){b.setActionEnablement(o.getBindingContext("internal"),JSON.parse(o.data("operationAvailableMap").customData),o.getSelectedContexts(),"table")}}}}},updateEditButtonVisibilityAndEnablement(n){var i,a;const s=(i=n.getViewData())===null||i===void 0?void 0:i.viewLevel,r=(a=n.getModel("ui"))===null||a===void 0?void 0:a.getProperty("/isEditable");if(s>1&&r!==true){var g,v,b,m;const i=n.getBindingContext();const a=t.getAppComponent(n);const s=o.getMetaPathForContext(i);const r=o.getRootEntitySetPath(s);const h=i===null||i===void 0?void 0:(g=i.getModel())===null||g===void 0?void 0:(v=g.getMetaModel())===null||v===void 0?void 0:v.getContext(i===null||i===void 0?void 0:i.getPath());const A=l===null||l===void 0?void 0:l.createConverterContextForMacro(r,h,a.getDiagnostics(),e,undefined);const E=A.getEntitySet();const y=A.getEntityType();let P;const M=u(E)&&((b=E.annotations.UI)===null||b===void 0?void 0:(m=b.UpdateHidden)===null||m===void 0?void 0:m.valueOf());if(M!==true){P=o.isUpdateHidden(E,y)}const x=c(A,undefined);const C=o.getDraftRootPath(i);const B=o.getStickyRootPath(i);const O=C||B;const I=n.getBindingContext("internal");if(O){const e=n.getModel().bindContext(O).getBoundContext();if(P!==undefined){const t=p(f(d(A,P),false));this.updateEditModelContext(t,n,e,"rootEditVisible",I)}if(x){this.updateEditModelContext(x,n,e,"rootEditEnabled",I)}}}},updateEditModelContext:function(e,t,n,o,i){if(e){var a,l,r;const d=new s({anyText:e});d.setBindingContext(null);t.addDependent(d);d.getBinding("anyText");const c=(a=d.getModel())===null||a===void 0?void 0:(l=a.bindContext(n.getPath(),n,{$$groupId:"$auto.Heroes"}))===null||l===void 0?void 0:l.getBoundContext();d.setBindingContext(c);d===null||d===void 0?void 0:(r=d.getBinding("anyText"))===null||r===void 0?void 0:r.attachChange(e=>{const t=e.getSource().getExternalValue();i.setProperty(o,t)})}},_setActionEnablementForTable:function(e,n,o,i,a){n.setProperty(`dynamicActions/${o}`,{bEnabled:false,aApplicable:[],aNotApplicable:[]});const s=[],l=[],r=`${n.getPath()}/dynamicActions/${o}/bEnabled`;if(typeof i==="object"&&i!==null&&i!==undefined){if(e){const t=e.getObject();const o=g(i,"PathInModel",function(e){return t?v(t[e.path]):v(false)},true);const a=p(o);if(a==="true"){n.getModel().setProperty(r,true);s.push(e)}else{l.push(e)}}t.setDynamicActionContexts(n,o,s,l)}else{const s=e===null||e===void 0?void 0:e.getObject();if(i===null&&!!s[`#${o}`]){n.getModel().setProperty(r,true)}else if(e!==undefined){a.push(t.requestProperty(e,o,i,r))}}return a}};return b},false);
|
|
7
7
|
/*!
|
|
8
8
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
9
9
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
@@ -13,7 +13,7 @@ sap.ui.predefine("sap/fe/core/AppComponent", ["sap/base/Log","sap/fe/core/AppSta
|
|
|
13
13
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
14
14
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
15
15
|
*/
|
|
16
|
-
sap.ui.predefine("sap/fe/core/AppStateHandler", ["sap/base/Log","sap/base/util/deepEqual","sap/fe/core/helpers/ClassSupport","sap/fe/core/helpers/ToES6Promise","sap/fe/navigation/library","sap/ui/base/Object","./controllerextensions/BusyLocker","./helpers/ModelHelper"],function(t,e,n,o,a,i,r,
|
|
16
|
+
sap.ui.predefine("sap/fe/core/AppStateHandler", ["sap/base/Log","sap/base/util/deepEqual","sap/fe/core/helpers/ClassSupport","sap/fe/core/helpers/ToES6Promise","sap/fe/navigation/library","sap/ui/base/Object","./controllerextensions/BusyLocker","./helpers/ModelHelper"],function(t,e,n,o,a,i,r,p){"use strict";var s,l;var c=n.defineUI5Class;function u(t,e){t.prototype=Object.create(e.prototype);t.prototype.constructor=t;f(t,e)}function f(t,e){f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function t(e,n){e.__proto__=n;return e};return f(t,e)}const h=a.NavType;let S=(s=c("sap.fe.core.AppStateHandler"),s(l=function(n){u(a,n);function a(e){var o;o=n.call(this)||this;o._mCurrentAppState={};o.oAppComponent=e;o.sId=`${e.getId()}/AppStateHandler`;o.nbSimultaneousCreateRequest=0;o.bNoRouteChange=false;t.info("APPSTATE : Appstate handler initialized");return o}var i=a.prototype;i.getId=function t(){return this.sId};i.createAppState=async function n(){if(!this.oAppComponent.getEnvironmentCapabilities().getCapabilities().AppState||r.isLocked(this)){return}const o=this.oAppComponent.getNavigationService(),a=this.oAppComponent.getRouterProxy(),i=a.getHash(),s=this.oAppComponent.getRootControl().getController(),l=p.isStickySessionSupported(this.oAppComponent.getMetaModel());if(!s.viewState){throw new Error(`viewState controller extension not available for controller: ${s.getMetadata().getName()}`)}const c=await s.viewState.retrieveViewState();const u={appState:c};if(c&&!e(this._mCurrentAppState,c)){this._mCurrentAppState=c;try{this.nbSimultaneousCreateRequest++;const e=await o.storeInnerAppStateAsync(u,true,true);t.info("APPSTATE: Appstate stored");const n=o.replaceInnerAppStateKey(i,e);this.nbSimultaneousCreateRequest--;if(this.nbSimultaneousCreateRequest===0&&n!==i){a.navToHash(n,undefined,undefined,undefined,!l);this.bNoRouteChange=true}t.info("APPSTATE: navToHash")}catch(e){t.error(e)}}return u};i._createNavigationParameters=function t(e,n){return Object.assign({},e,{selectionVariantDefaults:e.oDefaultedSelectionVariant,selectionVariant:e.oSelectionVariant,requiresStandardVariant:!e.bNavSelVarHasDefaultsOnly,navigationType:n})};i._checkIfLastSeenRecord=function t(e){const n=e&&e.getBindingContext("internal");if(n&&n.getProperty("fclColumnClosed")===true){const t=n&&n.getProperty("technicalKeysOfLastSeenRecord");const o=e===null||e===void 0?void 0:e.getBindingContext();const a=o&&o.getPath()||"";const i=o===null||o===void 0?void 0:o.getModel().getMetaModel();const r=i===null||i===void 0?void 0:i.getMetaPath(a);const p=i===null||i===void 0?void 0:i.getObject(`${r}/$Type/$Key`);for(let e=0;e<p.length;e++){const a=o.getObject()[p[e]];if(a!==t[p[e]]){n.setProperty("fclColumnClosed",false);return true}}}return false};i._getAppStateData=function t(e,n,o){let a="",i=0;const r=o===h.hybrid?e.iAppState:e;if(r!==null&&r!==void 0&&r.appState){for(i=0;i<Object.keys(r.appState).length;i++){if(Object.keys(r.appState)[i]===n){a=Object.keys(r.appState)[i];break}}}if(r!==null&&r!==void 0&&r.appState){return{[Object.keys(r.appState)[i]]:r.appState[a]||{}}}};i.applyAppState=async function e(n,a){if(!this.oAppComponent.getEnvironmentCapabilities().getCapabilities().AppState||r.isLocked(this)){return Promise.resolve()}const i=this._checkIfLastSeenRecord(a);if(i===true){return Promise.resolve()}r.lock(this);r.lock(this.oAppComponent.getRootControl());const p=this.oAppComponent.getNavigationService();return o(p.parseNavigation()).catch(function(e){if(!e){e=[]}t.warning("APPSTATE: Parse Navigation failed",e[0]);return[{},e[1],e[2]]}).then(e=>{t.info("APPSTATE: Parse Navigation done");const o=e[0]||{},a=e[2]||h.initial,i=this.oAppComponent.getRootControl().getController();const r=this._getAppStateData(o,n,a);this._mCurrentAppState=a===h.iAppState||a===h.hybrid?r:undefined;if(!i.viewState){throw new Error(`viewState extension required for controller ${i.getMetadata().getName()}`)}if((!o||Object.keys(o).length===0)&&a==h.iAppState){if(!i.viewState._getInitialStateApplied()){i.viewState._setInitialStateApplied()}return{}}return i.viewState.applyViewState(this._mCurrentAppState,this._createNavigationParameters(o,a))}).catch(function(e){t.error("appState could not be applied",e);throw e}).finally(()=>{r.unlock(this);r.unlock(this.oAppComponent.getRootControl())})};i.checkIfRouteChangedByIApp=function t(){return this.bNoRouteChange};i.resetRouteChangedByIApp=function t(){if(this.bNoRouteChange){this.bNoRouteChange=false}};return a}(i))||l);return S},true);
|
|
17
17
|
/*!
|
|
18
18
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
19
19
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
@@ -28,7 +28,7 @@ sap.ui.predefine("sap/fe/core/CommonUtils", ["sap/base/Log","sap/base/util/array
|
|
|
28
28
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
29
29
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
30
30
|
*/
|
|
31
|
-
sap.ui.predefine("sap/fe/core/ExtensionAPI", ["sap/base/Log","sap/fe/core/CommonUtils","sap/ui/base/Object","sap/ui/core/Component","sap/ui/model/json/JSONModel","./helpers/ClassSupport"],function(e,t,n,i,o,r){"use strict";var a,l,u,s,c,d,p,f,g;var v=r.property;var b=r.defineUI5Class;function h(e,t,n,i){if(!n)return;Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function w(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function _(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;m(e,t)}function m(e,t){m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function e(t,n){t.__proto__=n;return t};return m(e,t)}function y(e,t,n,i,o){var r={};Object.keys(i).forEach(function(e){r[e]=i[e]});r.enumerable=!!r.enumerable;r.configurable=!!r.configurable;if("value"in r||r.initializer){r.writable=true}r=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},r);if(o&&r.initializer!==void 0){r.value=r.initializer?r.initializer.call(o):void 0;r.initializer=undefined}if(r.initializer===void 0){Object.defineProperty(e,t,r);r=null}return r}function x(e,t){throw new Error("Decorating class property failed. Please ensure that "+"proposal-class-properties is enabled and runs after the decorators transform.")}let C=(a=b("sap.fe.core.ExtensionAPI"),l=v({type:"sap/fe/core/controllerextensions/EditFlow"}),u=v({type:"sap/fe/core/controllerextensions/Routing"}),s=v({type:"sap/fe/core/controllerextensions/IntentBasedNavigation"}),a(c=(d=function(n){_(r,n);function r(e,t){var i;i=n.call(this)||this;h(i,"editFlow",p,w(i));h(i,"routing",f,w(i));h(i,"intentBasedNavigation",g,w(i));i._controller=e;i._view=e.getView();i.extension=i._controller.extension;i.editFlow=i._controller.editFlow;i.routing=i._controller.routing;i._routing=i._controller._routing;i.intentBasedNavigation=i._controller.intentBasedNavigation;i._prefix=t;return i}var a=r.prototype;a.destroy=function e(){};a.getEditFlow=function e(){return this.editFlow};a.getRouting=function e(){return this.routing};a.getIntentBasedNavigation=function e(){return this.intentBasedNavigation};a.byId=function e(t){let n=this._view.byId(t);if(!n&&this._prefix){n=this._view.byId(`${this._prefix}--${t}`)}return n};a.getModel=function e(n){let i;if(n&&n!=="ui"){i=t.getAppComponent(this._view);if(!i.getManifestEntry("sap.ui5").models[n]){return undefined}}return this._view.getModel(n)};a.addDependent=function e(t){this._view.addDependent(t)};a.removeDependent=function e(t){this._view.removeDependent(t)};a.navigateToTarget=function e(t,n){this._controller._routing.navigateToTarget(n,t)};a.loadFragment=async function n(r){var a;const l=i.getOwnerComponentFor(this._view);const u=this._view.getModel("_pageModel");const s=(a=this.getModel())===null||a===void 0?void 0:a.getMetaModel();const c=l.getViewData();const d=new o(c),
|
|
31
|
+
sap.ui.predefine("sap/fe/core/ExtensionAPI", ["sap/base/Log","sap/fe/core/CommonUtils","sap/ui/base/Object","sap/ui/core/Component","sap/ui/model/json/JSONModel","./helpers/ClassSupport"],function(e,t,n,i,o,r){"use strict";var a,l,u,s,c,d,p,f,g;var v=r.property;var b=r.defineUI5Class;function h(e,t,n,i){if(!n)return;Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function w(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function _(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;m(e,t)}function m(e,t){m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function e(t,n){t.__proto__=n;return t};return m(e,t)}function y(e,t,n,i,o){var r={};Object.keys(i).forEach(function(e){r[e]=i[e]});r.enumerable=!!r.enumerable;r.configurable=!!r.configurable;if("value"in r||r.initializer){r.writable=true}r=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},r);if(o&&r.initializer!==void 0){r.value=r.initializer?r.initializer.call(o):void 0;r.initializer=undefined}if(r.initializer===void 0){Object.defineProperty(e,t,r);r=null}return r}function x(e,t){throw new Error("Decorating class property failed. Please ensure that "+"proposal-class-properties is enabled and runs after the decorators transform.")}let C=(a=b("sap.fe.core.ExtensionAPI"),l=v({type:"sap/fe/core/controllerextensions/EditFlow"}),u=v({type:"sap/fe/core/controllerextensions/Routing"}),s=v({type:"sap/fe/core/controllerextensions/IntentBasedNavigation"}),a(c=(d=function(n){_(r,n);function r(e,t){var i;i=n.call(this)||this;h(i,"editFlow",p,w(i));h(i,"routing",f,w(i));h(i,"intentBasedNavigation",g,w(i));i._controller=e;i._view=e.getView();i.extension=i._controller.extension;i.editFlow=i._controller.editFlow;i.routing=i._controller.routing;i._routing=i._controller._routing;i.intentBasedNavigation=i._controller.intentBasedNavigation;i._prefix=t;return i}var a=r.prototype;a.destroy=function e(){};a.getEditFlow=function e(){return this.editFlow};a.getRouting=function e(){return this.routing};a.getIntentBasedNavigation=function e(){return this.intentBasedNavigation};a.byId=function e(t){let n=this._view.byId(t);if(!n&&this._prefix){n=this._view.byId(`${this._prefix}--${t}`)}return n};a.getModel=function e(n){let i;if(n&&n!=="ui"){i=t.getAppComponent(this._view);if(!i.getManifestEntry("sap.ui5").models[n]){return undefined}}return this._view.getModel(n)};a.addDependent=function e(t){this._view.addDependent(t)};a.removeDependent=function e(t){this._view.removeDependent(t)};a.navigateToTarget=function e(t,n){this._controller._routing.navigateToTarget(n,t)};a.loadFragment=async function n(r){var a;const l=i.getOwnerComponentFor(this._view);const u=this._view.getModel("_pageModel");const s=(a=this.getModel())===null||a===void 0?void 0:a.getMetaModel();const c=l.getViewData();const d=l.getEntitySet()?`/${l.getEntitySet()}`:l.getContextPath();const p=new o(c),f={bindingContexts:{contextPath:s===null||s===void 0?void 0:s.createBindingContext(r.contextPath||d),converterContext:u.createBindingContext("/",undefined,{noResolve:true}),viewData:c?p.createBindingContext("/"):null},models:{contextPath:s,converterContext:u,metaModel:s,viewData:p},appComponent:t.getAppComponent(this._view)};const g=t.templateControlFragment(r.name,f,{controller:r.controller||this,isXML:false,id:r.id});g.then(e=>{if(r.initialBindingContext!==undefined){e.setBindingContext(r.initialBindingContext)}this.addDependent(e);return e}).catch(function(t){e.error(t)});return g};a.updateAppState=async function e(){return this._controller.getAppComponent().getAppStateHandler().createAppState()};return r}(n),p=y(d.prototype,"editFlow",[l],{configurable:true,enumerable:true,writable:true,initializer:null}),f=y(d.prototype,"routing",[u],{configurable:true,enumerable:true,writable:true,initializer:null}),g=y(d.prototype,"intentBasedNavigation",[s],{configurable:true,enumerable:true,writable:true,initializer:null}),d))||c);return C},false);
|
|
32
32
|
/*!
|
|
33
33
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
34
34
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
@@ -58,7 +58,7 @@ sap.ui.predefine("sap/fe/core/buildingBlocks/AttributeModel", ["sap/base/Log","s
|
|
|
58
58
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
59
59
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
60
60
|
*/
|
|
61
|
-
sap.ui.predefine("sap/fe/core/buildingBlocks/BuildingBlockBase", ["sap/base/util/deepClone","sap/base/util/merge","sap/fe/core/buildingBlocks/BuildingBlockTemplateProcessor","sap/fe/core/converters/ConverterContext","sap/fe/core/helpers/BindingToolkit","sap/fe/core/helpers/StableIdHelper"],function(e,t,r,
|
|
61
|
+
sap.ui.predefine("sap/fe/core/buildingBlocks/BuildingBlockBase", ["sap/base/util/deepClone","sap/base/util/merge","sap/fe/core/buildingBlocks/BuildingBlockTemplateProcessor","sap/fe/core/converters/ConverterContext","sap/fe/core/helpers/BindingToolkit","sap/fe/core/helpers/StableIdHelper","sap/fe/core/templating/DataModelPathHelper"],function(e,t,n,r,i,o,a){"use strict";var l={};var s=a.getTargetObjectPath;var u=o.generate;var c=i.isUndefinedExpression;var f=n.xml;var d=n.unregisterBuildingBlock;var p=n.registerBuildingBlock;function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||false;r.configurable=true;if("value"in r)r.writable=true;Object.defineProperty(e,m(r.key),r)}}function g(e,t,n){if(t)v(e.prototype,t);if(n)v(e,n);Object.defineProperty(e,"prototype",{writable:false});return e}function m(e){var t=h(e,"string");return typeof t==="symbol"?t:String(t)}function h(e,t){if(typeof e!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var r=n.call(e,t||"default");if(typeof r!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}let b=function(){function n(n,i,o){var a;this.isPublic=false;this.getConverterContext=function(n,i,o,a){var l;const u=o.appComponent;const c=(l=o.models.viewData)===null||l===void 0?void 0:l.getData();let f=Object.assign({},c);delete f.resourceModel;delete f.appComponent;f=e(f);let d={};const p=s(n.contextLocation??n);if(p===(c===null||c===void 0?void 0:c.contextPath)||p===`/${c===null||c===void 0?void 0:c.entitySet}`){d=f.controlConfiguration}f.controlConfiguration=t(d,a||{});return r.createConverterContextForMacro(n.startingEntitySet.name,o.models.metaModel,u===null||u===void 0?void 0:u.getDiagnostics(),t,n.contextLocation,f)};Object.keys(n).forEach(e=>{this[e]=n[e]});this.resourceModel=o===null||o===void 0?void 0:(a=o.models)===null||a===void 0?void 0:a["sap.fe.i18n"]}l=n;var i=n.prototype;i.createId=function e(){if(this.id){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++){n[r]=arguments[r]}return u([this.id,...n])}return undefined};i.getContentId=function e(t){return`${t}-content`};i.getTranslatedText=function e(t,n,r){var i;return((i=this.resourceModel)===null||i===void 0?void 0:i.getText(t,n,r))||t};i.getProperties=function e(){const t={};for(const e in this){if(this.hasOwnProperty(e)){t[e]=this[e]}}return t};n.register=function e(){p(this)};n.unregister=function e(){d(this)};i.addConditionally=function e(t,n){if(t){return n}else{return""}};i.attr=function e(t,n){if(n!==undefined&&!c(n)){return()=>f`${t}="${n}"`}else{return()=>""}};g(n,null,[{key:"metadata",get:function(){this.internalMetadata??={namespace:"",name:"",properties:{},aggregations:{},stereotype:"xmlmacro"};return this.internalMetadata}}]);return n}();b.isRuntime=false;l=b;return l},false);
|
|
62
62
|
/*!
|
|
63
63
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
64
64
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
@@ -122,7 +122,7 @@ sap.ui.predefine("sap/fe/core/controllerextensions/BusyLocker", ["sap/base/Log"]
|
|
|
122
122
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
123
123
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
124
124
|
*/
|
|
125
|
-
sap.ui.predefine("sap/fe/core/controllerextensions/EditFlow", ["sap/base/Log","sap/fe/core/CommonUtils","sap/fe/core/controllerextensions/BusyLocker","sap/fe/core/controllerextensions/collaboration/ActivitySync","sap/fe/core/controllerextensions/collaboration/CollaborationCommon","sap/fe/core/controllerextensions/editFlow/draft","sap/fe/core/controllerextensions/editFlow/sticky","sap/fe/core/controllerextensions/editFlow/TransactionHelper","sap/fe/core/controllerextensions/Feedback","sap/fe/core/converters/MetaModelConverter","sap/fe/core/helpers/ClassSupport","sap/fe/core/helpers/EditState","sap/fe/core/helpers/MetaModelFunction","sap/fe/core/helpers/ModelHelper","sap/fe/core/helpers/ResourceModelHelper","sap/fe/core/helpers/SemanticKeyHelper","sap/fe/core/library","sap/m/Button","sap/m/Dialog","sap/m/MessageToast","sap/m/Text","sap/ui/core/Core","sap/ui/core/library","sap/ui/core/message/Message","sap/ui/core/mvc/ControllerExtension","sap/ui/core/mvc/OverrideExecution","sap/ui/model/odata/v4/ODataListBinding","../ActionRuntime"],function(t,e,i,n,o,r,s,a,c,l,d,g,u,h,f,p,y,v,w,m,C,M,P,b,S,D,E,x){"use strict";var A,k,_,I,O,R,F,T,B,V,N,H,j,L,$,G,U,q,K,W,z,J,X,Q,Y,Z,tt,et,it,nt,ot,rt,st;var at=f.getResourceModel;var ct=u.getNonComputedVisibleFields;var lt=d.publicExtension;var dt=d.finalExtension;var gt=d.extensible;var ut=d.defineUI5Class;var ht=l.getInvolvedDataModelObjects;var ft=l.convertTypes;var pt=c.TriggerType;var yt=c.triggerConfiguredSurvey;var vt=c.StandardActions;var wt=o.shareObject;var mt=o.Activity;function Ct(t,e){t.prototype=Object.create(e.prototype);t.prototype.constructor=t;Mt(t,e)}function Mt(t,e){Mt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function t(e,i){e.__proto__=i;return e};return Mt(t,e)}function Pt(t,e,i,n,o){var r={};Object.keys(n).forEach(function(t){r[t]=n[t]});r.enumerable=!!r.enumerable;r.configurable=!!r.configurable;if("value"in r||r.initializer){r.writable=true}r=i.slice().reverse().reduce(function(i,n){return n(t,e,i)||i},r);if(o&&r.initializer!==void 0){r.value=r.initializer?r.initializer.call(o):void 0;r.initializer=undefined}if(r.initializer===void 0){Object.defineProperty(t,e,r);r=null}return r}const bt=y.CreationMode,St=y.ProgrammingModel,Dt=y.Constants,Et=y.DraftStatus,xt=y.EditMode,At=y.StartupMode,kt=P.MessageType;let _t=(A=ut("sap.fe.core.controllerextensions.EditFlow"),k=lt(),_=dt(),I=lt(),O=dt(),R=lt(),F=dt(),T=lt(),B=gt(D.After),V=lt(),N=gt(D.After),H=lt(),j=gt(D.After),L=lt(),$=gt(D.After),G=lt(),U=gt(D.After),q=lt(),K=dt(),W=lt(),z=dt(),J=lt(),X=dt(),Q=lt(),Y=dt(),Z=lt(),tt=dt(),et=lt(),it=gt(D.After),nt=lt(),ot=dt(),A(rt=(st=function(o){Ct(c,o);function c(){var t;for(var e=arguments.length,i=new Array(e),n=0;n<e;n++){i[n]=arguments[n]}t=o.call(this,...i)||this;t.syncTasks=Promise.resolve();return t}var l=c.prototype;l.getAppComponent=function t(){return this.base.getAppComponent()};l.editDocument=async function i(n){const o=true;const r=this.getTransactionHelper();const s=this._getRootViewController();const a=n.getModel();let c,l;const d=this.getView().getViewData();const g=this.getProgrammingModel(n);let u=n;const f=this.getView();try{if((d===null||d===void 0?void 0:d.viewLevel)>1){if(g===St.Draft||g===St.Sticky){u=await e.createRootContext(g,f,this.getAppComponent())}}await this.base.editFlow.onBeforeEdit({context:u});const t=await r.editDocument(u,this.getView(),this.getAppComponent(),this.getMessageHandler());this._setStickySessionInternalProperties(g,a);if(t){this.setEditMode(xt.Editable,false);this.setDocumentModified(false);this.getMessageHandler().showMessageDialog();if(t!==u){let e=t;if(this._isFclEnabled()){c=s.getRightmostContext();l=await this._computeSiblingInformation(u,c,g,true);l=l??this._createSiblingInfo(n,t);this._updatePathsInHistory(l.pathMapping);if(l.targetContext.getPath()!=t.getPath()){e=l.targetContext}}else if((d===null||d===void 0?void 0:d.viewLevel)>1){const i=t===null||t===void 0?void 0:t.getPath();const o={rootSiblingPath:i,rootContextNotRequired:true};l=await this._computeSiblingInformation(u,n,g,true,o);e=this._getNavigationTargetForEdit(n,t,l)}await this._handleNewContext(e,true,false,o,true);if(g===St.Sticky){let e;if(this._isFclEnabled()){e=t.getModel().getKeepAliveContext(t.getPath())}else{e=t}this.handleStickyOn(e)}else if(h.isCollaborationDraftSupported(a.getMetaModel())){await wt(t)}}}}catch(e){t.error("Error while editing the document",e)}};l.deleteMultipleDocuments=async function o(r,s){if(s){s.beforeDeleteCallBack=this.base.editFlow.onBeforeDelete;s.requestSideEffects=s.requestSideEffects!==false}else{s={beforeDeleteCallBack:this.base.editFlow.onBeforeDelete,requestSideEffects:true}}const a=this.getGlobalUIModel();const c=this.getView().byId(s.controlId);if(!c){throw new Error("parameter controlId missing or incorrect")}else{s.parentControl=c}const l=c.getBinding("items")||c.getRowBinding();s.bFindActiveContexts=true;i.lock(a);try{await this.deleteDocumentTransaction(r,s);let t;if(c.isA("sap.ui.mdc.Table")){c.clearSelection()}const i=this.getView().getBindingContext();if(l.isRoot()){t=new Promise(t=>{l.attachEventOnce("dataReceived",function(){t()})});l.refresh()}else if(i){if(s.requestSideEffects&&!e.hasTransientContext(l)){this.getAppComponent().getSideEffectsService().requestSideEffectsForNavigationProperty(l.getPath(),i)}}if(!this.getAppComponent()._isFclEnabled()){g.setEditStateDirty()}n.send(this.getView(),mt.Delete,r.map(t=>t.getPath()));return t}catch(e){t.error("Error while deleting the document(s)",e)}finally{i.unlock(a)}};l.updateDocument=function e(i,n){const o=this.getView().getBindingContext();const r=this.getProgrammingModel(i)===St.Draft;this.getMessageHandler().removeTransitionMessages();return this.syncTask(async()=>{if(o){this.setDocumentModified(true);if(!this._isFclEnabled()){g.setEditStateDirty()}if(r){this.setDraftStatus(Et.Saving)}}try{await n;const t=this.getView().getBindingContext();if(!r||!t||t!==o){return}const e=t.getModel().getMetaModel();const i=e.getMetaContext(t.getPath()).getObject("@sapui.name");const s=p.getSemanticKeys(e,i);if(s!==null&&s!==void 0&&s.length){const e=this._getSemanticMapping();const i=e===null||e===void 0?void 0:e.semanticPath,n=p.getSemanticPath(t,true);if(i&&i!==n){await this._handleNewContext(t,true,false,true)}}this.setDraftStatus(Et.Saved)}catch(e){t.error("Error while updating the document",e);if(r&&o){this.setDraftStatus(Et.Clear)}}finally{await this.getMessageHandler().showMessages()}})};l.createDocument=async function o(r,s){var a;const c=this.getTransactionHelper(),l=this.getGlobalUIModel();let d;let u=s;let f;const p=!u||u.creationMode!==bt.Inline&&u.creationMode!==bt.CreationRow&&u.creationMode!==bt.External;let y=Promise.resolve([]);const v=this.getAppComponent();v.getRouterProxy().removeIAppStateKey();if(u.creationMode===bt.External){await this.syncTask();const t=this.getView().getController();const e=h.getAbsoluteMetaPathForListBinding(this.getView(),r);t.handlers.onChevronPressNavigateOutBound(t,u.outbound,undefined,e);return}if(u.creationMode===bt.CreationRow&&u.creationRow){const t=u.creationRow.getBindingContext().getObject();delete t["@$ui5.context.isTransient"];d=u.creationRow.getParent();y=this.validateDocument(d.getBindingContext(),{data:t,customValidationFunction:d.getCreationRow().data("customValidationFunction")});if(d.getCreationRow().data("disableAddRowButtonForEmptyData")==="true"){const t=d.getBindingContext("internal");t.setProperty("creationRowFieldValidity",{})}}if(u.creationMode===bt.Inline&&u.tableId){d=this.getView().byId(u.tableId)}if(d&&d.isA("sap.ui.mdc.Table")){const t=u.creationMode===bt.Inline?d.focusRow.bind(d):d.scrollToIndex.bind(d);d.getRowBinding().attachEventOnce("change",async function(){await f;t(u.createAtEnd?d.getRowBinding().getLength():0,true)})}const w=async(i,n)=>{try{const t=await n;await t.created();const o=this.getView().getBindingContext();if(!e.hasTransientContext(i)){const t=this.getAppComponent();t.getSideEffectsService().requestSideEffectsForNavigationProperty(i.getPath(),o)}}catch(e){t.error("Error while creating the document",e)}};const m=t=>{var e;const i=d&&d.getCreationRow().data("customValidationFunction");const n=d&&((e=d.getBindingContext("internal"))===null||e===void 0?void 0:e.getProperty("creationRowCustomValidity"));const o=M.getMessageManager();const r=[];let s;let a;o.getMessageModel().getData().forEach(function(t){if(t.code===i){o.removeMessages(t)}});t.forEach(t=>{if(t.messageTarget){var e;s=M.getControl(n[t.messageTarget].fieldId);a=`${(e=s.getBindingContext())===null||e===void 0?void 0:e.getPath()}/${s.getBindingPath("value")}`;if(o.getMessageModel().getData().filter(function(t){return t.target===a}).length===0){o.addMessages(new b({message:t.messageText,processor:this.getView().getModel(),type:kt.Error,code:i,technical:false,persistent:false,target:a}))}const r=o.getMessageModel().getData().filter(function(t){return t.target===a});r[0].addControlId(n[t.messageTarget].fieldId)}else{r.push({code:i,text:t.messageText,persistent:true,type:kt.Error})}});if(r.length>0){this.getMessageHandler().showMessageDialog({customMessages:r})}};const C=(t,e,i,n)=>{if(t&&t!==bt.NewPage){return t}else{if(!i.isRelative()){const t=i.getPath(),o=e===St.Draft?n.getObject(`${t}@com.sap.vocabularies.Common.v1.DraftRoot/NewAction`):n.getObject(`${t}@com.sap.vocabularies.Session.v1.StickySessionSupported/NewAction`);if(o){const t=n.getObject(`/${o}/@$ui5.overload/0/$Parameter`)||[];if(t.length>1){return bt.Deferred}}}const t=n.getMetaPath(i===null||i===void 0?void 0:i.getHeaderContext().getPath());const o=ct(n,t,this.getAppComponent());if(o.length>0){return bt.Deferred}return bt.Async}};if(p){i.lock(l)}try{const e=await this.syncTask(y);if(e.length>0){m(e);t.error("Custom Validation failed");return}let o;u=u||{};if(r&&typeof r==="object"){o=r}else if(typeof r==="string"){o=new E(this.getView().getModel(),r);u.creationMode=bt.Sync;delete u.createAtEnd}else{throw new Error("Binding object or path expected")}const s=o.getModel();const l=this.getProgrammingModel(o);const p=C(u.creationMode,l,o,s.getMetaModel());let b;const k=u.creationRow;let _;let I;let O;const R=s.getMetaModel();const F=this.getInternalRouting();if(p!==bt.Deferred){if(p===bt.CreationRow){_=k.getBindingContext();O=R.getMetaPath(_.getPath());I=_.getObject();u.data={};Object.keys(I).forEach(function(t){const e=R.getObject(`${O}/${t}`);if(e&&e.$kind==="NavigationProperty"){return}u.data[t]=I[t]});await this._checkForValidationErrors()}if(p===bt.CreationRow||p===bt.Inline){var P,S,D;u.keepTransientContextOnFailed=false;u.busyMode="Local";u.busyId=(P=d)===null||P===void 0?void 0:(S=P.getParent())===null||S===void 0?void 0:(D=S.getTableDefinition())===null||D===void 0?void 0:D.annotation.id;this.handleCreateEvents(o)}if(!u.parentControl){u.parentControl=this.getView()}u.beforeCreateCallBack=this.onBeforeCreate;u.skipParameterDialog=v.getStartupMode()===At.AutoCreate;f=c.createDocument(o,u,this.getAppComponent(),this.getMessageHandler(),false);if(!u.bSkipSideEffects){w(o,f)}}let T;switch(p){case bt.Deferred:T=F.navigateForwardToContext(o,{bDeferredContext:true,editable:true,bForceFocus:true});break;case bt.Async:T=F.navigateForwardToContext(o,{asyncContext:f,editable:true,bForceFocus:true});break;case bt.Sync:b={editable:true,bForceFocus:true};if(l==St.Sticky||u.createAction){b.transient=true}T=(a=f)===null||a===void 0?void 0:a.then(function(t){if(!t){const t=M.getLibraryResourceBundle("sap.fe.core");return F.navigateToMessagePage(t.getText("C_COMMON_SAPFE_DATA_RECEIVED_ERROR"),{title:t.getText("C_COMMON_SAPFE_ERROR"),description:t.getText("C_EDITFLOW_SAPFE_CREATION_FAILED_DESCRIPTION")})}else{return u.bFromDeferred?F.navigateToContext(t,b):F.navigateForwardToContext(t,b)}});break;case bt.Inline:this.syncTask(f);break;case bt.CreationRow:try{const e=_.getBinding();const i=e.create();k.setBindingContext(i);i.created().catch(function(){t.trace("transient fast creation context deleted")});T=_.delete("$direct")}catch(e){if(i.isLocked(this.getView().getModel("ui"))){i.unlock(this.getView().getModel("ui"))}t.error("CreationRow navigation error: ",e)}break;default:T=Promise.reject(`Unhandled creationMode ${p}`);break}if(f){try{const t=await Promise.all([f,T]);this._setStickySessionInternalProperties(l,s);this.setEditMode(xt.Editable);if(!o.isRelative()&&l===St.Sticky){var x,A;const t=o.getModel().getMetaModel();const e=t.bindContext(t.getMetaPath(o.getPath()));const i=ht(e).startingEntitySet;const n=i===null||i===void 0?void 0:(x=i.annotations.Session)===null||x===void 0?void 0:(A=x.StickySessionSupported)===null||A===void 0?void 0:A.NewAction;this.getInternalModel().setProperty("/lastInvokedAction",n)}const e=t[0];if(e){this.setDocumentModifiedOnCreate(o);if(!this._isFclEnabled()){g.setEditStateDirty()}this._sendActivity(mt.Create,e);if(h.isCollaborationDraftSupported(s.getMetaModel())&&!n.isConnected(this.getView())){await wt(e)}}}catch(t){if(t===Dt.CancelActionDialog||t===Dt.ActionExecutionFailed||t===Dt.CreationFailed){if(p===bt.Sync||p===bt.Deferred||p===bt.Async){F.navigateBackFromTransientState()}}throw t}}}finally{if(p){i.unlock(l)}}};l.validateDocument=function t(e,i){return this.getTransactionHelper().validateDocument(e,i,this.getView())};l.createMultipleDocuments=async function n(o,r,s,a,c){let l=arguments.length>5&&arguments[5]!==undefined?arguments[5]:false;let d=arguments.length>6?arguments[6]:undefined;const g=this.getTransactionHelper();const u=this.getGlobalUIModel();const h=o;d=d!==false;i.lock(u);try{await this.syncTask();if(c){await c({contextPath:h.getPath()})}const t=h.getModel().getMetaModel();let i;if(h.getContext()){i=t.getMetaPath(`${h.getContext().getPath()}/${h.getPath()}`)}else{i=t.getMetaPath(h.getPath())}this.handleCreateEvents(h);const n=r.map(e=>{const n={data:{}};n.keepTransientContextOnFailed=false;n.busyMode="None";n.creationMode=bt.CreationRow;n.parentControl=this.getView();n.createAtEnd=s;n.inactive=l;for(const o in e){const r=t.getObject(`${i}/${o}`);if(r&&r.$kind!=="NavigationProperty"&&o.indexOf("/")<0&&e[o]){n.data[o]=e[o]}}return g.createDocument(h,n,this.getAppComponent(),this.getMessageHandler(),a)});const o=await Promise.all(n);if(!l){this.setDocumentModifiedOnCreate(h)}await Promise.all(o.map(t=>{if(!t.bInactive){return t.created()}}));const u=this.getView().getBindingContext();if(d&&!e.hasTransientContext(h)){this.getAppComponent().getSideEffectsService().requestSideEffectsForNavigationProperty(h.getPath(),u)}return o}catch(e){t.error("Error while creating multiple documents.");throw e}finally{i.unlock(u)}};l.onBeforeSave=function t(e){return Promise.resolve()};l.onBeforeCreate=function t(e){return Promise.resolve()};l.onBeforeEdit=function t(e){return Promise.resolve()};l.onBeforeDiscard=function t(e){return Promise.resolve()};l.onBeforeDelete=function t(e){return Promise.resolve()};l.saveDocument=async function e(i,o){o=o||{};const r=o.bExecuteSideEffectsOnError||undefined;const s=true;const a=this.getTransactionHelper();const c=o.bindings;try{await this.syncTask();await this._submitOpenChanges(i);await this._checkForValidationErrors();await this.base.editFlow.onBeforeSave({context:i});const t=this.getProgrammingModel(i);const e=this._getRootViewController();let o;if((t===St.Sticky||i.getProperty("HasActiveEntity"))&&e.isFclEnabled()){o=await this._computeSiblingInformation(i,e.getRightmostContext(),t,true)}const l=await a.saveDocument(i,this.getAppComponent(),this._getResourceModel(),r,c,this.getMessageHandler(),this.getCreationMode());this._removeStickySessionInternalProperties(t);this._sendActivity(mt.Activate,l);n.disconnect(this.getView());this._triggerConfiguredSurvey(vt.save,pt.standardAction);this.setDocumentModified(false);this.setEditMode(xt.Display,false);this.getMessageHandler().showMessageDialog();if(l!==i){let t=l;if(e.isFclEnabled()){o=o??this._createSiblingInfo(i,l);this._updatePathsInHistory(o.pathMapping);if(o.targetContext.getPath()!==l.getPath()){t=o.targetContext}}await this._handleNewContext(t,false,false,s,true)}}catch(e){if(!(e&&e.canceled)){t.error("Error while saving the document",e)}throw e}};l.toggleDraftActive=async function t(e){const i=e.getObject();let n;const o=e&&this.getProgrammingModel(e)===St.Draft;if(!o||!(!i.IsActiveEntity&&i.HasActiveEntity||i.IsActiveEntity&&i.HasDraftEntity)){return}if(!i.IsActiveEntity&&i.HasActiveEntity){n=false}else{n=true}try{const t=this._getRootViewController();const i=t.isFclEnabled()?t.getRightmostContext():e;let o=await this._computeSiblingInformation(e,i,St.Draft,false);if(!o&&e!==i){o=await this._computeSiblingInformation(e,e,St.Draft,false)}if(o){this.setEditMode(n?xt.Editable:xt.Display,false);if(t.isFclEnabled()){const t=this._getSemanticMapping();if((t===null||t===void 0?void 0:t.technicalPath)===e.getPath()){const e=o.pathMapping[o.pathMapping.length-1].newPath;o.pathMapping.push({oldPath:t.semanticPath,newPath:e})}this._updatePathsInHistory(o.pathMapping)}await this._handleNewContext(o.targetContext,n,true,true,true)}else{throw new Error("Error in EditFlow.toggleDraftActive - Cannot find sibling")}}catch(t){throw new Error(`Error in EditFlow.toggleDraftActive:${t}`)}};l.cancelDocument=async function e(i,o){const r=this.getTransactionHelper();const s=o;let a;let c=false;s.cancelButton=o.control||s.cancelButton;s.beforeCancelCallBack=this.base.editFlow.onBeforeDiscard;try{await this.syncTask();const t=this.getProgrammingModel(i);if((t===St.Sticky||i.getProperty("HasActiveEntity"))&&this._isFclEnabled()){const e=this._getRootViewController();a=await this._computeSiblingInformation(i,e.getRightmostContext(),t,true)}const e=await r.cancelDocument(i,s,this.getAppComponent(),this._getResourceModel(),this.getMessageHandler(),this.getCreationMode(),this.isDocumentModified());this._getRootViewController().getInstancedViews().forEach(t=>{const e=t.getBindingContext();if(e&&e.isKeepAlive()){e.setKeepAlive(false)}});const o=true;this._removeStickySessionInternalProperties(t);this.setEditMode(xt.Display,false);this.setDocumentModified(false);this.setDraftStatus(Et.Clear);g.setEditStateDirty();if(!e){this._sendActivity(mt.Discard,undefined);n.disconnect(this.getView());if(!s.skipBackNavigation){await this.getInternalRouting().navigateBackFromContext(i);c=true}}else{const r=e;this._sendActivity(mt.Discard,r);n.disconnect(this.getView());let c=r;if(this._isFclEnabled()){a=a??this._createSiblingInfo(i,r);this._updatePathsInHistory(a.pathMapping);if(a.targetContext.getPath()!==r.getPath()){c=a.targetContext}}if(t===St.Draft){await this._fetchSemanticKeyValues(r);if(!s.skipBindingToView){await this._handleNewContext(c,false,true,o,true)}else{return r}}else{await this._handleNewContext(c,false,false,o,true)}}if(t===St.Draft){this.showDocumentDiscardMessage(c)}}catch(e){t.error("Error while discarding the document",e)}};l.showDocumentDiscardMessage=function t(e){const i=this._getResourceModel();const n=i.getText("C_TRANSACTION_HELPER_DISCARD_DRAFT_TOAST");if(e==true){const t=this.getAppComponent();t.getRoutingService().attachAfterRouteMatched(this.showMessageWhenNoContext,this)}else{m.show(n)}};l.showMessageWhenNoContext=function t(){const e=this._getResourceModel();const i=e.getText("C_TRANSACTION_HELPER_DISCARD_DRAFT_TOAST");const n=this.getAppComponent();m.show(i);n.getRoutingService().detachAfterRouteMatched(this.showMessageWhenNoContext,this)};l.isDraftRoot=function t(e){const i=e.getModel().getMetaModel();const n=i.getMetaContext(e.getPath());return h.isDraftRoot(ht(n).targetEntitySet)};l.deleteDocument=async function e(i,n){const o=this.getAppComponent();let r=n;if(!r){r={bFindActiveContexts:false}}else{r.bFindActiveContexts=false}r.beforeDeleteCallBack=this.base.editFlow.onBeforeDelete;try{if(this._isFclEnabled()&&this.isDraftRoot(i)&&i.getIndex()===undefined&&i.getProperty("IsActiveEntity")===true&&i.getProperty("HasDraftEntity")===true){r.beforeDeleteCallBack=async e=>{await this.base.editFlow.onBeforeDelete(e);try{const t=i.getModel();const e=t.bindContext(`${i.getPath()}/SiblingEntity`).getBoundContext();const n=await e.requestCanonicalPath();const o=t.getKeepAliveContext(n);o.replaceWith(i)}catch(e){t.error("Error while replacing the draft instance in the LR ODLB",e)}}}await this.deleteDocumentTransaction(i,r);if(!this._isFclEnabled()){g.setEditStateDirty()}this._sendActivity(mt.Delete,i);if(o){o.getShellServices().setBackNavigation()}if((o===null||o===void 0?void 0:o.getStartupMode())===At.Deeplink&&!this._isFclEnabled()){o.getRouterProxy().exitFromApp()}else{this.getInternalRouting().navigateBackFromContext(i)}}catch(e){t.error("Error while deleting the document",e)}};l.applyDocument=async function t(e){const n=this.getGlobalUIModel();try{await this.syncTask();if(e.getModel().hasPendingChanges("$auto")){i.lock(n);await this._submitOpenChanges(e)}await this._checkForValidationErrors();await this.getMessageHandler().showMessageDialog();await this.getInternalRouting().navigateBackFromContext(e)}finally{if(i.isLocked(n)){i.unlock(n)}}};l.invokeAction=async function e(i,o,r){var s;let a;const c=this.getTransactionHelper();let l;let d;let u;const h=this.getView();let f=o||{};if(f.isA&&f.isA("sap.ui.model.odata.v4.Context")||Array.isArray(f)||r!==undefined){const t=f;f=r||{};if(t){f.contexts=t}else{f.model=this.getView().getModel()}}f.isNavigable=f.requiresNavigation||f.isNavigable;const p=ft((s=this.getView().getModel())===null||s===void 0?void 0:s.getMetaModel());if(i.indexOf(""+p.entityContainer.name)>-1){f.isBound=false}else{f.isBound=true}if(!f.parentControl){f.parentControl=this.getView()}if(f.controlId){a=this.getView().byId(f.controlId);if(a){f.internalModelContext=a.getBindingContext("internal")}}else{f.internalModelContext=h.getBindingContext("internal")}if(i&&i.indexOf("(")>-1){l=i.split("(");i=l[0];d=l[l.length-1].replaceAll(")","")}if(f.bStaticAction){if(a.isTableBound()){f.contexts=a.getRowBinding().getHeaderContext()}else{const t=a.data("rowsBindingInfo").path,e=new E(this.getView().getModel(),t);f.contexts=e.getHeaderContext()}if(d&&a.getBindingContext()){f.contexts=this._getActionOverloadContextFromMetadataPath(a.getBindingContext(),a.getRowBinding(),d)}if(f.enableAutoScroll){u=this.createActionPromise(i,a.sId)}}f.bGetBoundContext=this._getBoundContext(h,f);f.bObjectPage=h.getViewData().converterType==="ObjectPage";try{await this.syncTask();const e=await c.callAction(i,f,this.getView(),this.getAppComponent(),this.getMessageHandler());let o;if(f.contexts&&f.isBound===true){o=await this._refreshListIfRequired(this.getActionResponseDataAndKeys(i,e),f.contexts[0])}if(n.isConnected(this.getView())){let t=[];if(e){t=Array.isArray(e)?Object.keys(e[0].value.getObject()):Object.keys(e.getObject())}this._sendActivity(mt.Action,f.contexts,i,o,t)}this._triggerConfiguredSurvey(i,pt.action);if(u){u.fResolver(e)}if(f.contexts){if(!this._isFclEnabled()){g.setEditStateDirty()}this.getInternalModel().setProperty("/lastInvokedAction",i)}if(f.isNavigable){let i=e;if(Array.isArray(i)&&i.length===1){i=i[0].value}if(i&&!Array.isArray(i)){const e=h.getModel().getMetaModel();const n=e.getMetaPath(i.getPath());const o=(t,e)=>t.filter(t=>{if(e){return e.indexOf(t)>-1}return true});const r=Array.isArray(f.contexts)?o(f.contexts,f.applicableContexts)[0]:f.contexts;const s=r&&e.getMetaPath(r.getPath());if(n!=undefined&&n===s){if(r.getPath()!==i.getPath()){this.getInternalRouting().navigateForwardToContext(i,{checkNoHashChange:true,noHistoryEntry:false})}else{t.info("Navigation to the same context is not allowed")}}}}this.base.editFlow.onAfterActionExecution(i);return e}catch(t){if(u){u.fRejector()}if(t===Dt.CancelActionDialog){throw new Error("Dialog cancelled")}else if(!(t&&(t.canceled||t.rejectedItems&&t.rejectedItems[0].canceled))){throw new Error(`Error in EditFlow.invokeAction:${t}`)}}};l.onAfterActionExecution=async function t(e){};l.securedExecution=function t(e,n){var o,r;const s=(n===null||n===void 0?void 0:(o=n.busy)===null||o===void 0?void 0:o.set)??true,a=(n===null||n===void 0?void 0:(r=n.busy)===null||r===void 0?void 0:r.check)??true,c=(n===null||n===void 0?void 0:n.updatesDocument)??false,l=this.getGlobalUIModel(),d=this.getView().getBindingContext(),u=d&&this.getProgrammingModel(d)===St.Draft;if(a&&i.isLocked(l)){return Promise.reject("Application already busy therefore execution rejected")}if(s){i.lock(l)}if(c&&u){this.setDraftStatus(Et.Saving)}this.getMessageHandler().removeTransitionMessages();return this.syncTask(e).then(()=>{if(c){this.setDocumentModified(true);if(!this._isFclEnabled()){g.setEditStateDirty()}if(u){this.setDraftStatus(Et.Saved)}}}).catch(t=>{if(c&&u){this.setDraftStatus(Et.Clear)}return Promise.reject(t)}).finally(()=>{if(s){i.unlock(l)}this.getMessageHandler().showMessageDialog()})};l.handlePatchSent=function t(e){var i,o;const r=n.isConnected(this.getView());if(r){e.getSource().getModel().setIgnoreETag(true)}if(!((i=this.getView())!==null&&i!==void 0&&(o=i.getBindingContext("internal"))!==null&&o!==void 0&&o.getProperty("skipPatchHandlers"))){const t=e.getSource();const i=new Promise((i,n)=>{e.getSource().attachEventOnce("patchCompleted",o=>{if(r){e.getSource().getModel().setIgnoreETag(false)}if(e.getSource().isA("sap.ui.model.odata.v4.ODataListBinding")){var s;x.setActionEnablementAfterPatch(this.getView(),t,(s=this.getView())===null||s===void 0?void 0:s.getBindingContext("internal"))}const a=o.getParameter("success");if(a){i()}else{n()}})});this.updateDocument(t,i)}};l.handleCreateActivate=async function e(i){const n=i.getSource();const o=this.getTransactionHelper();const r=true;const s=true;const a={creationMode:bt.Inline,createAtEnd:r,inactive:s,keepTransientContextOnFailed:false,busyMode:"None"};try{var c;const e=i.getParameter("context");(c=e.created())===null||c===void 0?void 0:c.then(()=>{this._sendActivity(mt.Create,e)}).catch(()=>{t.warning(`Failed to activate context ${e.getPath()}`)});const r=await o.createDocument(n,a,this.getAppComponent(),this.getMessageHandler(),false);if(r){if(!this._isFclEnabled()){g.setEditStateDirty()}}}catch(e){t.error("Failed to activate new row -",e)}};l.syncTask=function t(e){if(e){if(typeof e==="function"){this.syncTasks=this.syncTasks.then(e).catch(function(){return Promise.resolve()})}else{this.syncTasks=this.syncTasks.then(()=>e).catch(function(){return Promise.resolve()})}}return this.syncTasks};l.computeEditMode=async function e(i){const n=this.getProgrammingModel(i);if(n===St.Draft){try{this.setDraftStatus(Et.Clear);const t=this.getGlobalUIModel();t.setProperty("/isEditablePending",true,undefined,true);const e=await i.requestObject("IsActiveEntity");if(e===false){this.setEditMode(xt.Editable);const t=await i.requestObject("HasActiveEntity");this.setEditMode(undefined,!t)}else{this.setEditMode(xt.Display,false)}t.setProperty("/isEditablePending",false,undefined,true)}catch(e){t.error("Error while determining the editMode for draft",e);throw e}}else if(n===St.Sticky){const t=this.getInternalModel().getProperty("/lastInvokedAction");if(t&&this.isNewActionForSticky(t,i)){this.setEditMode(xt.Editable,true);if(!this.getAppComponent()._isFclEnabled()){g.setEditStateDirty()}this.handleStickyOn(i);this.getInternalModel().setProperty("/lastInvokedAction",undefined)}}};l.deleteDocumentTransaction=async function t(e,i){var n;const o=at(this);const r=this.getTransactionHelper();i.internalModelContext=i.controlId?(n=sap.ui.getCore().byId(i.controlId))===null||n===void 0?void 0:n.getBindingContext("internal"):null;await this.syncTask();await r.deleteDocument(e,i,this.getAppComponent(),o,this.getMessageHandler())};l._getResourceModel=function t(){return at(this.getView())};l.getTransactionHelper=function t(){return a};l.getMessageHandler=function t(){if(this.base.messageHandler){return this.base.messageHandler}else{throw new Error("Edit Flow works only with a given message handler")}};l.getInternalModel=function t(){return this.getView().getModel("internal")};l.getGlobalUIModel=function t(){return this.getView().getModel("ui")};l.setCreationMode=function t(e){const i=this.getView().getBindingContext("ui");this.getGlobalUIModel().setProperty("createMode",e,i,true)};l.getCreationMode=function t(){const e=this.getView().getBindingContext("ui");return!!this.getGlobalUIModel().getProperty("createMode",e)};l.isDocumentModified=function t(){return!!this.getGlobalUIModel().getProperty("/isDocumentModified")};l.setDocumentModified=function t(e){this.getGlobalUIModel().setProperty("/isDocumentModified",e)};l.setDocumentModifiedOnCreate=function t(e){if(e.isRelative()){this.setDocumentModified(true)}};l.handleCreateEvents=function t(e){this.setDraftStatus(Et.Clear);const i=this.getProgrammingModel(e);e.attachEvent("createSent",()=>{if(i===St.Draft){this.setDraftStatus(Et.Saving)}});e.attachEvent("createCompleted",t=>{const e=t.getParameter("success");if(i===St.Draft){this.setDraftStatus(e?Et.Saved:Et.Clear)}this.getMessageHandler().showMessageDialog()})};l.setDraftStatus=function t(e){this.getView().getModel("ui").setProperty("/draftStatus",e,undefined,true)};l.getProgrammingModel=function t(e){return this.getTransactionHelper().getProgrammingModel(e)};l.setEditMode=function t(e,i){const n=this.getGlobalUIModel();if(e){n.setProperty("/isEditable",e==="Editable",undefined,true)}if(i!==undefined){this.setCreationMode(i)}};l.isNewActionForSticky=function e(i,n){try{var o;const t=n.getModel().getMetaModel();const e=t.getMetaContext(n.getPath());const r=ht(e).startingEntitySet;const s=(o=r.annotations.Session)===null||o===void 0?void 0:o.StickySessionSupported;if((s===null||s===void 0?void 0:s.NewAction)===i){return true}if(s!==null&&s!==void 0&&s.AdditionalNewActions&&(s===null||s===void 0?void 0:s.AdditionalNewActions.indexOf(i))!==-1){return true}return false}catch(e){t.info(e);return false}};l.handleStickyOn=function e(i){const n=this.getAppComponent();try{if(n===undefined){throw new Error("undefined AppComponent for function handleStickyOn")}if(!n.getRouterProxy().hasNavigationGuard()){const t=n.getRouterProxy().getHash();const e=this.getInternalModel();setTimeout(function(){n.getRouterProxy().setNavigationGuard(i.getPath().substring(1))},0);n.getShellServices().setBackNavigation(this.onBackNavigationInSession.bind(this));this.dirtyStateProviderFunction=this.getDirtyStateProvider(n,e,t);n.getShellServices().registerDirtyStateProvider(this.dirtyStateProviderFunction);const o=this.getView().getModel("sap.fe.i18n");this.sessionTimeoutFunction=this.getSessionTimeoutFunction(i,o);this.getView().getModel().attachSessionTimeout(this.sessionTimeoutFunction);this.stickyDiscardAfterNavigationFunction=this.getRouteMatchedFunction(i,n);n.getRoutingService().attachRouteMatched(this.stickyDiscardAfterNavigationFunction)}}catch(e){t.info(e);return false}return true};l.handleStickyOff=function e(){const i=this.getAppComponent();try{if(i===undefined){throw new Error("undefined AppComponent for function handleStickyOff")}if(i.getRouterProxy){i.getRouterProxy().discardNavigationGuard()}if(this.dirtyStateProviderFunction){i.getShellServices().deregisterDirtyStateProvider(this.dirtyStateProviderFunction);this.dirtyStateProviderFunction=undefined}const t=this.getView().getModel();if(t&&this.sessionTimeoutFunction){t.detachSessionTimeout(this.sessionTimeoutFunction)}i.getRoutingService().detachRouteMatched(this.stickyDiscardAfterNavigationFunction);this.stickyDiscardAfterNavigationFunction=undefined;this.setEditMode(xt.Display,false);if(i.getShellServices){i.getShellServices().setBackNavigation()}}catch(e){t.info(e);return false}return true};l._setStickySessionInternalProperties=function t(e,i){if(e===St.Sticky){const t=this.getInternalModel();t.setProperty("/sessionOn",true);t.setProperty("/stickySessionToken",i.getHttpHeaders(true)["SAP-ContextId"])}};l.getDirtyStateProvider=function e(i,n,o){return e=>{try{if(e===undefined){throw new Error("Invalid input parameters for DirtyStateProvider function")}const t=e.innerAppRoute;const r=i.getRouterProxy();let s="";let a;const c=n.getProperty("/sessionOn");if(!c){return undefined}if(!r.isNavigationFinalized()){a=false;s=t}else if(o===t){a=true}else if(r.checkHashWithGuard(t)||r.isGuardCrossAllowedByUser()){s=t;a=false}else{a=true}if(a){setTimeout(function(){i.getShellServices().setDirtyFlag(false)},0)}else{o=s}return a}catch(e){t.info(e);return undefined}}};l.getSessionTimeoutFunction=function e(i,n){return()=>{try{if(i===undefined){throw new Error("Context missing for SessionTimeout function")}this.getMessageHandler().removeTransitionMessages();const t=new w({title:"{sap.fe.i18n>C_EDITFLOW_OBJECT_PAGE_SESSION_EXPIRED_DIALOG_TITLE}",state:"Warning",content:new C({text:"{sap.fe.i18n>C_EDITFLOW_OBJECT_PAGE_SESSION_EXPIRED_DIALOG_MESSAGE}"}),beginButton:new v({text:"{sap.fe.i18n>C_COMMON_DIALOG_OK}",type:"Emphasized",press:()=>{this.handleStickyOff();this.getInternalRouting().navigateBackFromContext(i)}}),afterClose:function(){t.destroy()}});t.addStyleClass("sapUiContentPadding");t.setModel(n,"sap.fe.i18n");this.getView().addDependent(t);t.open()}catch(e){t.info(e);return undefined}return true}};l.getRouteMatchedFunction=function t(e,i){return()=>{const t=i.getRouterProxy().getHash();if(!t||!i.getRouterProxy().checkHashWithGuard(t)){this.discardStickySession(e);setTimeout(()=>{e.getModel().clearSessionContext()},0)}}};l.discardStickySession=async function t(e){const i=await s.discardDocument(e);if(i!==null&&i!==void 0&&i.hasPendingChanges()){i.getBinding().resetChanges()}if(!this.getCreationMode()){i===null||i===void 0?void 0:i.refresh()}this.handleStickyOff()};l.getInternalRouting=function t(){if(this.base._routing){return this.base._routing}else{throw new Error("Edit Flow works only with a given routing listener")}};l._getRootViewController=function t(){return this.getAppComponent().getRootViewController()};l._getSemanticMapping=function t(){return this.getAppComponent().getRoutingService().getLastSemanticMapping()};l.createActionPromise=function t(e,i){let n,o;this.actionPromise=new Promise((t,e)=>{n=t;o=e}).then(t=>Object.assign({controlId:i},this.getActionResponseDataAndKeys(e,t)));return{fResolver:n,fRejector:o}};l.getActionResponseDataAndKeys=function t(e,i){if(Array.isArray(i)){if(i.length===1){i=i[0].value}else{return null}}if(!i){return null}const n=this.getView();const o=n.getModel().getMetaModel().getData();const r=o&&o[e]&&o[e][0]&&o[e][0].$ReturnType?o[e][0].$ReturnType.$Type:null;const s=r&&o[r]?o[r].$Key:null;return{oData:i.getObject(),keys:s}};l.getCurrentActionPromise=function t(){return this.actionPromise};l.deleteCurrentActionPromise=function t(){this.actionPromise=undefined};l._scrollAndFocusOnInactiveRow=function t(e){const i=e.getRowBinding();const n=i.getCount()||0;if(e.data("tableType")!=="ResponsiveTable"){if(n>0){e.scrollToIndex(n-1)}e.focusRow(n,true)}else{const t=i.getContexts();if(!(t!==null&&t!==void 0&&t.length)){e.focusRow(n,true);return}let o=n,r=0;for(const e of t){if(e.isInactive()&&r<o){o=r}r++}if(o>0){e.scrollToIndex(o)}e.focusRow(o,true)}};l.createEmptyRowsAndFocus=async function t(e){var i,n,o;const r=e.getParent();if(r!==null&&r!==void 0&&(i=r.tableDefinition)!==null&&i!==void 0&&(n=i.control)!==null&&n!==void 0&&n.inlineCreationRowsHiddenInEditMode&&!((o=e.getBindingContext("ui"))!==null&&o!==void 0&&o.getProperty("createMode"))){await r.setUpEmptyRows(e,true)}this._scrollAndFocusOnInactiveRow(e)};l._sendActivity=function t(e,i,o,r,s){const a=Array.isArray(i)?i.map(t=>t.getPath()):i===null||i===void 0?void 0:i.getPath();n.send(this.getView(),e,a,o,r,s)};l._triggerConfiguredSurvey=function t(e,i){yt(this.getView(),e,i)};l._submitOpenChanges=async function t(e){const n=e.getModel(),o=this.getGlobalUIModel();try{await n.submitBatch("$auto");await n.oRequestor.waitForRunningChangeRequests("$auto");if(n.hasPendingChanges("$auto")){throw new Error("submit of open changes failed")}}finally{if(i.isLocked(o)){i.unlock(o)}}};l._removeStickySessionInternalProperties=function t(e){if(e===St.Sticky){const t=this.getInternalModel();t.setProperty("/sessionOn",false);t.setProperty("/stickySessionToken",undefined);this.handleStickyOff()}};l.onBackNavigationInSession=function t(){const e=this.getView();const i=this.getAppComponent().getRouterProxy();if(i.checkIfBackIsOutOfGuard()){const t=e.getBindingContext();const i=this.getProgrammingModel(t);s.processDataLossConfirmation(async()=>{await this.discardStickySession(t);this._removeStickySessionInternalProperties(i);history.back()},e,i);return}history.back()};l._handleNewContext=async function t(e,i,n,o){let r=arguments.length>4&&arguments[4]!==undefined?arguments[4]:false;if(!this._isFclEnabled()){g.setEditStateDirty()}await this.getInternalRouting().navigateToContext(e,{checkNoHashChange:true,editable:i,bPersistOPScroll:true,bRecreateContext:n,bDraftNavigation:o,showPlaceholder:false,bForceFocus:r,keepCurrentLayout:true})};l._getBoundContext=function t(e,i){const n=e.getViewData().viewLevel;const o=n>1||n===1&&i.controlId;return!i.isNavigable||!!o};l._checkForValidationErrors=function t(){return this.syncTask().then(()=>{const t=this.getView().getId();const e=sap.ui.getCore().getMessageManager().getMessageModel().getData();let i;let n;if(!e.length){return Promise.resolve("No validation errors found")}for(let o=0;o<e.length;o++){n=e[o];if(n.validation){i=M.byId(n.getControlId());while(i){if(i.getId()===t){return Promise.reject("validation errors exist")}i=i.getParent()}}}})};l._refreshListIfRequired=function e(i,n){if(!n||!i||!i.oData){return Promise.resolve(undefined)}const o=n.getBinding();if(o&&o.isA("sap.ui.model.odata.v4.ODataListBinding")){const e=i.oData;const r=i.keys;const s=n.getObject();let a=true;if(Object.keys(e).length){a=r.every(function(t){return s[t]===e[t]});if(!a){return new Promise(e=>{if(o.isRoot()){o.attachEventOnce("dataReceived",function(){e(!a)});o.refresh()}else{const i=this.getAppComponent();i.getSideEffectsService().requestSideEffects([{$NavigationPropertyPath:o.getPath()}],o.getContext()).then(function(){e(!a)},function(){t.error("Error while refreshing the table");e(!a)}).catch(function(e){t.error("Error while refreshing the table",e)})}})}}}return Promise.resolve(undefined)};l._fetchSemanticKeyValues=function t(e){const i=e.getModel().getMetaModel(),n=i.getMetaContext(e.getPath()).getObject("@sapui.name"),o=p.getSemanticKeys(i,n);if(o&&o.length){const t=o.map(function(t){return e.requestObject(t.$PropertyPath)});return Promise.all(t)}else{return Promise.resolve()}};l._getActionOverloadContextFromMetadataPath=function t(e,i,n){const o=e.getModel();const r=o.getMetaModel();let s=i.getPath().split("/");let a=e;s.pop();if(s.length===0){s=[""]}if(s[0]!==""){s.unshift("")}const c=s.map(t=>{if(t!==""){a=o.bindContext(t,a).getBoundContext()}else{a=e}return a}).reverse();const l=c.find(t=>r.getMetaContext(t.getPath()).getObject("$Type")===n);return l||i.getHeaderContext()};l._createSiblingInfo=function t(e,i){return{targetContext:i,pathMapping:[{oldPath:e.getPath(),newPath:i.getPath()}]}};l._updatePathsInHistory=function t(e){const i=this.getAppComponent();i.getRouterProxy().setPathMapping(e);const n=this._getSemanticMapping();if(e.length&&(n===null||n===void 0?void 0:n.technicalPath)===e[e.length-1].oldPath){n.technicalPath=e[e.length-1].newPath}};l._getNavigationTargetForEdit=function t(e,i,n){let o;n=n??this._createSiblingInfo(e,i);this._updatePathsInHistory(n.pathMapping);if(n.targetContext.getPath()!=i.getPath()){o=n.targetContext}return o};l._computeSiblingInformation=async function e(i,n,o,s,a){n=n??i;if(!n.getPath().startsWith(i.getPath())){t.error("Cannot compute rightmost sibling context");throw new Error("Cannot compute rightmost sibling context")}if(s&&n.getPath()===i.getPath()){return Promise.resolve(undefined)}const c=i.getModel();if(o===St.Draft){return r.computeSiblingInformation(i,n,a)}else{return{targetContext:c.bindContext(n.getPath()).getBoundContext(),pathMapping:[]}}};l._isFclEnabled=function t(){return this.getAppComponent()._isFclEnabled()};return c}(S),Pt(st.prototype,"editDocument",[k,_],Object.getOwnPropertyDescriptor(st.prototype,"editDocument"),st.prototype),Pt(st.prototype,"updateDocument",[I,O],Object.getOwnPropertyDescriptor(st.prototype,"updateDocument"),st.prototype),Pt(st.prototype,"createDocument",[R,F],Object.getOwnPropertyDescriptor(st.prototype,"createDocument"),st.prototype),Pt(st.prototype,"onBeforeSave",[T,B],Object.getOwnPropertyDescriptor(st.prototype,"onBeforeSave"),st.prototype),Pt(st.prototype,"onBeforeCreate",[V,N],Object.getOwnPropertyDescriptor(st.prototype,"onBeforeCreate"),st.prototype),Pt(st.prototype,"onBeforeEdit",[H,j],Object.getOwnPropertyDescriptor(st.prototype,"onBeforeEdit"),st.prototype),Pt(st.prototype,"onBeforeDiscard",[L,$],Object.getOwnPropertyDescriptor(st.prototype,"onBeforeDiscard"),st.prototype),Pt(st.prototype,"onBeforeDelete",[G,U],Object.getOwnPropertyDescriptor(st.prototype,"onBeforeDelete"),st.prototype),Pt(st.prototype,"saveDocument",[q,K],Object.getOwnPropertyDescriptor(st.prototype,"saveDocument"),st.prototype),Pt(st.prototype,"cancelDocument",[W,z],Object.getOwnPropertyDescriptor(st.prototype,"cancelDocument"),st.prototype),Pt(st.prototype,"deleteDocument",[J,X],Object.getOwnPropertyDescriptor(st.prototype,"deleteDocument"),st.prototype),Pt(st.prototype,"applyDocument",[Q,Y],Object.getOwnPropertyDescriptor(st.prototype,"applyDocument"),st.prototype),Pt(st.prototype,"invokeAction",[Z,tt],Object.getOwnPropertyDescriptor(st.prototype,"invokeAction"),st.prototype),Pt(st.prototype,"onAfterActionExecution",[et,it],Object.getOwnPropertyDescriptor(st.prototype,"onAfterActionExecution"),st.prototype),Pt(st.prototype,"securedExecution",[nt,ot],Object.getOwnPropertyDescriptor(st.prototype,"securedExecution"),st.prototype),st))||rt);return _t},false);
|
|
125
|
+
sap.ui.predefine("sap/fe/core/controllerextensions/EditFlow", ["sap/base/Log","sap/fe/core/CommonUtils","sap/fe/core/controllerextensions/BusyLocker","sap/fe/core/controllerextensions/collaboration/ActivitySync","sap/fe/core/controllerextensions/collaboration/CollaborationCommon","sap/fe/core/controllerextensions/editFlow/draft","sap/fe/core/controllerextensions/editFlow/sticky","sap/fe/core/controllerextensions/editFlow/TransactionHelper","sap/fe/core/controllerextensions/Feedback","sap/fe/core/converters/MetaModelConverter","sap/fe/core/helpers/ClassSupport","sap/fe/core/helpers/EditState","sap/fe/core/helpers/MetaModelFunction","sap/fe/core/helpers/ModelHelper","sap/fe/core/helpers/ResourceModelHelper","sap/fe/core/helpers/SemanticKeyHelper","sap/fe/core/library","sap/m/Button","sap/m/Dialog","sap/m/MessageToast","sap/m/Text","sap/ui/core/Core","sap/ui/core/library","sap/ui/core/message/Message","sap/ui/core/mvc/ControllerExtension","sap/ui/core/mvc/OverrideExecution","sap/ui/model/odata/v4/ODataListBinding","../ActionRuntime"],function(t,e,i,n,o,r,s,a,c,l,d,g,u,h,f,p,y,v,w,m,C,M,P,b,S,D,E,x){"use strict";var A,k,_,I,O,R,F,T,B,V,H,N,j,L,$,G,U,q,K,W,z,J,X,Q,Y,Z,tt,et,it,nt,ot,rt,st;var at=f.getResourceModel;var ct=u.getNonComputedVisibleFields;var lt=d.publicExtension;var dt=d.finalExtension;var gt=d.extensible;var ut=d.defineUI5Class;var ht=l.getInvolvedDataModelObjects;var ft=l.convertTypes;var pt=c.TriggerType;var yt=c.triggerConfiguredSurvey;var vt=c.StandardActions;var wt=o.shareObject;var mt=o.Activity;function Ct(t,e){t.prototype=Object.create(e.prototype);t.prototype.constructor=t;Mt(t,e)}function Mt(t,e){Mt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function t(e,i){e.__proto__=i;return e};return Mt(t,e)}function Pt(t,e,i,n,o){var r={};Object.keys(n).forEach(function(t){r[t]=n[t]});r.enumerable=!!r.enumerable;r.configurable=!!r.configurable;if("value"in r||r.initializer){r.writable=true}r=i.slice().reverse().reduce(function(i,n){return n(t,e,i)||i},r);if(o&&r.initializer!==void 0){r.value=r.initializer?r.initializer.call(o):void 0;r.initializer=undefined}if(r.initializer===void 0){Object.defineProperty(t,e,r);r=null}return r}const bt=y.CreationMode,St=y.ProgrammingModel,Dt=y.Constants,Et=y.DraftStatus,xt=y.EditMode,At=y.StartupMode,kt=P.MessageType;let _t=(A=ut("sap.fe.core.controllerextensions.EditFlow"),k=lt(),_=dt(),I=lt(),O=dt(),R=lt(),F=dt(),T=lt(),B=gt(D.After),V=lt(),H=gt(D.After),N=lt(),j=gt(D.After),L=lt(),$=gt(D.After),G=lt(),U=gt(D.After),q=lt(),K=dt(),W=lt(),z=dt(),J=lt(),X=dt(),Q=lt(),Y=dt(),Z=lt(),tt=dt(),et=lt(),it=gt(D.After),nt=lt(),ot=dt(),A(rt=(st=function(o){Ct(c,o);function c(){var t;for(var e=arguments.length,i=new Array(e),n=0;n<e;n++){i[n]=arguments[n]}t=o.call(this,...i)||this;t.syncTasks=Promise.resolve();return t}var l=c.prototype;l.getAppComponent=function t(){return this.base.getAppComponent()};l.editDocument=async function i(n){const o=true;const r=this.getTransactionHelper();const s=this._getRootViewController();const a=n.getModel();let c,l;const d=this.getView().getViewData();const g=this.getProgrammingModel(n);let u=n;const f=this.getView();try{if((d===null||d===void 0?void 0:d.viewLevel)>1){if(g===St.Draft||g===St.Sticky){u=await e.createRootContext(g,f,this.getAppComponent())}}await this.base.editFlow.onBeforeEdit({context:u});const t=await r.editDocument(u,this.getView(),this.getAppComponent(),this.getMessageHandler());this._setStickySessionInternalProperties(g,a);if(t){this.setEditMode(xt.Editable,false);this.setDocumentModified(false);this.getMessageHandler().showMessageDialog();if(t!==u){let e=t;if(this._isFclEnabled()){c=s.getRightmostContext();l=await this._computeSiblingInformation(u,c,g,true);l=l??this._createSiblingInfo(n,t);this._updatePathsInHistory(l.pathMapping);if(l.targetContext.getPath()!=t.getPath()){e=l.targetContext}}else if((d===null||d===void 0?void 0:d.viewLevel)>1){const i=t===null||t===void 0?void 0:t.getPath();const o={rootSiblingPath:i,rootContextNotRequired:true};l=await this._computeSiblingInformation(u,n,g,true,o);e=this._getNavigationTargetForEdit(n,t,l)}await this._handleNewContext(e,true,false,o,true);if(g===St.Sticky){let e;if(this._isFclEnabled()){e=t.getModel().getKeepAliveContext(t.getPath())}else{e=t}this.handleStickyOn(e)}else if(h.isCollaborationDraftSupported(a.getMetaModel())){await wt(t)}}}}catch(e){t.error("Error while editing the document",e)}};l.deleteMultipleDocuments=async function o(r,s){if(s){s.beforeDeleteCallBack=this.base.editFlow.onBeforeDelete;s.requestSideEffects=s.requestSideEffects!==false}else{s={beforeDeleteCallBack:this.base.editFlow.onBeforeDelete,requestSideEffects:true}}const a=this.getGlobalUIModel();const c=this.getView().byId(s.controlId);if(!c){throw new Error("parameter controlId missing or incorrect")}else{s.parentControl=c}const l=c.getBinding("items")||c.getRowBinding();s.bFindActiveContexts=true;i.lock(a);try{await this.deleteDocumentTransaction(r,s);let t;if(c.isA("sap.ui.mdc.Table")){c.clearSelection()}const i=this.getView().getBindingContext();if(l.isRoot()){t=new Promise(t=>{l.attachEventOnce("dataReceived",function(){t()})});l.refresh()}else if(i){if(s.requestSideEffects&&!e.hasTransientContext(l)){this.getAppComponent().getSideEffectsService().requestSideEffectsForNavigationProperty(l.getPath(),i)}}if(!this.getAppComponent()._isFclEnabled()){g.setEditStateDirty()}n.send(this.getView(),mt.Delete,r.map(t=>t.getPath()));return t}catch(e){t.error("Error while deleting the document(s)",e)}finally{i.unlock(a)}};l.updateDocument=function e(i,n){const o=this.getView().getBindingContext();const r=this.getProgrammingModel(i)===St.Draft;this.getMessageHandler().removeTransitionMessages();return this.syncTask(async()=>{if(o){this.setDocumentModified(true);if(!this._isFclEnabled()){g.setEditStateDirty()}if(r){this.setDraftStatus(Et.Saving)}}try{await n;const t=this.getView().getBindingContext();if(!r||!t||t!==o){return}const e=t.getModel().getMetaModel();const i=e.getMetaContext(t.getPath()).getObject("@sapui.name");const s=p.getSemanticKeys(e,i);if(s!==null&&s!==void 0&&s.length){const e=this._getSemanticMapping();const i=e===null||e===void 0?void 0:e.semanticPath,n=p.getSemanticPath(t,true);if(i&&i!==n){await this._handleNewContext(t,true,false,true)}}this.setDraftStatus(Et.Saved)}catch(e){t.error("Error while updating the document",e);if(r&&o){this.setDraftStatus(Et.Clear)}}finally{await this.getMessageHandler().showMessages()}})};l.createDocument=async function o(r,s){var a;const c=this.getTransactionHelper(),l=this.getGlobalUIModel();let d;let u=s;let f;const p=!u||u.creationMode!==bt.Inline&&u.creationMode!==bt.CreationRow&&u.creationMode!==bt.External;let y=Promise.resolve([]);const v=this.getAppComponent();v.getRouterProxy().removeIAppStateKey();if(u.creationMode===bt.External){await this.syncTask();const t=this.getView().getController();const e=h.getAbsoluteMetaPathForListBinding(this.getView(),r);t.handlers.onChevronPressNavigateOutBound(t,u.outbound,undefined,e);return}if(u.creationMode===bt.CreationRow&&u.creationRow){const t=u.creationRow.getBindingContext().getObject();delete t["@$ui5.context.isTransient"];d=u.creationRow.getParent();y=this.validateDocument(d.getBindingContext(),{data:t,customValidationFunction:d.getCreationRow().data("customValidationFunction")});if(d.getCreationRow().data("disableAddRowButtonForEmptyData")==="true"){const t=d.getBindingContext("internal");t.setProperty("creationRowFieldValidity",{})}}if(u.creationMode===bt.Inline&&u.tableId){d=this.getView().byId(u.tableId)}if(d&&d.isA("sap.ui.mdc.Table")){const t=u.creationMode===bt.Inline?d.focusRow.bind(d):d.scrollToIndex.bind(d);d.getRowBinding().attachEventOnce("change",async function(){await f;t(u.createAtEnd?d.getRowBinding().getLength():0,true)})}const w=async(i,n)=>{try{const t=await n;await t.created();const o=this.getView().getBindingContext();if(!e.hasTransientContext(i)){const t=this.getAppComponent();t.getSideEffectsService().requestSideEffectsForNavigationProperty(i.getPath(),o)}}catch(e){t.error("Error while creating the document",e)}};const m=t=>{var e;const i=d&&d.getCreationRow().data("customValidationFunction");const n=d&&((e=d.getBindingContext("internal"))===null||e===void 0?void 0:e.getProperty("creationRowCustomValidity"));const o=M.getMessageManager();const r=[];let s;let a;o.getMessageModel().getData().forEach(function(t){if(t.code===i){o.removeMessages(t)}});t.forEach(t=>{if(t.messageTarget){var e;s=M.getControl(n[t.messageTarget].fieldId);a=`${(e=s.getBindingContext())===null||e===void 0?void 0:e.getPath()}/${s.getBindingPath("value")}`;if(o.getMessageModel().getData().filter(function(t){return t.target===a}).length===0){o.addMessages(new b({message:t.messageText,processor:this.getView().getModel(),type:kt.Error,code:i,technical:false,persistent:false,target:a}))}const r=o.getMessageModel().getData().filter(function(t){return t.target===a});r[0].addControlId(n[t.messageTarget].fieldId)}else{r.push({code:i,text:t.messageText,persistent:true,type:kt.Error})}});if(r.length>0){this.getMessageHandler().showMessageDialog({customMessages:r})}};const C=(t,e,i,n)=>{if(t&&t!==bt.NewPage){return t}else{if(!i.isRelative()){const t=i.getPath(),o=e===St.Draft?n.getObject(`${t}@com.sap.vocabularies.Common.v1.DraftRoot/NewAction`):n.getObject(`${t}@com.sap.vocabularies.Session.v1.StickySessionSupported/NewAction`);if(o){const t=n.getObject(`/${o}/@$ui5.overload/0/$Parameter`)||[];if(t.length>1){return bt.Deferred}}}const t=n.getMetaPath(i===null||i===void 0?void 0:i.getHeaderContext().getPath());const o=ct(n,t,this.getAppComponent());if(o.length>0){return bt.Deferred}return bt.Async}};if(p){i.lock(l)}try{const e=await this.syncTask(y);if(e.length>0){m(e);t.error("Custom Validation failed");return}let o;u=u||{};if(r&&typeof r==="object"){o=r}else if(typeof r==="string"){o=new E(this.getView().getModel(),r);u.creationMode=bt.Sync;delete u.createAtEnd}else{throw new Error("Binding object or path expected")}const s=o.getModel();const l=this.getProgrammingModel(o);const p=C(u.creationMode,l,o,s.getMetaModel());let b;const k=u.creationRow;let _;let I;let O;const R=s.getMetaModel();const F=this.getInternalRouting();if(p!==bt.Deferred){if(p===bt.CreationRow){_=k.getBindingContext();O=R.getMetaPath(_.getPath());I=_.getObject();u.data={};Object.keys(I).forEach(function(t){const e=R.getObject(`${O}/${t}`);if(e&&e.$kind==="NavigationProperty"){return}u.data[t]=I[t]});await this._checkForValidationErrors()}if(p===bt.CreationRow||p===bt.Inline){var P,S,D;u.keepTransientContextOnFailed=false;u.busyMode="Local";u.busyId=(P=d)===null||P===void 0?void 0:(S=P.getParent())===null||S===void 0?void 0:(D=S.getTableDefinition())===null||D===void 0?void 0:D.annotation.id;this.handleCreateEvents(o)}if(!u.parentControl){u.parentControl=this.getView()}u.beforeCreateCallBack=this.onBeforeCreate;u.skipParameterDialog=v.getStartupMode()===At.AutoCreate;f=c.createDocument(o,u,this.getAppComponent(),this.getMessageHandler(),false);if(!u.bSkipSideEffects){w(o,f)}}let T;switch(p){case bt.Deferred:T=F.navigateForwardToContext(o,{bDeferredContext:true,editable:true,bForceFocus:true});break;case bt.Async:T=F.navigateForwardToContext(o,{asyncContext:f,editable:true,bForceFocus:true});break;case bt.Sync:b={editable:true,bForceFocus:true};if(l==St.Sticky||u.createAction){b.transient=true}T=(a=f)===null||a===void 0?void 0:a.then(function(t){if(!t){const t=M.getLibraryResourceBundle("sap.fe.core");return F.navigateToMessagePage(t.getText("C_COMMON_SAPFE_DATA_RECEIVED_ERROR"),{title:t.getText("C_COMMON_SAPFE_ERROR"),description:t.getText("C_EDITFLOW_SAPFE_CREATION_FAILED_DESCRIPTION")})}else{return u.bFromDeferred?F.navigateToContext(t,b):F.navigateForwardToContext(t,b)}});break;case bt.Inline:this.syncTask(f);break;case bt.CreationRow:try{const e=_.getBinding();const i=e.create();k.setBindingContext(i);i.created().catch(function(){t.trace("transient fast creation context deleted")});T=_.delete("$direct")}catch(e){if(i.isLocked(this.getView().getModel("ui"))){i.unlock(this.getView().getModel("ui"))}t.error("CreationRow navigation error: ",e)}break;default:T=Promise.reject(`Unhandled creationMode ${p}`);break}if(f){try{const t=await Promise.all([f,T]);this._setStickySessionInternalProperties(l,s);this.setEditMode(xt.Editable);if(!o.isRelative()&&l===St.Sticky){var x,A;const t=o.getModel().getMetaModel();const e=t.bindContext(t.getMetaPath(o.getPath()));const i=ht(e).startingEntitySet;const n=i===null||i===void 0?void 0:(x=i.annotations.Session)===null||x===void 0?void 0:(A=x.StickySessionSupported)===null||A===void 0?void 0:A.NewAction;this.getInternalModel().setProperty("/lastInvokedAction",n)}const e=t[0];if(e){this.setDocumentModifiedOnCreate(o);if(!this._isFclEnabled()){g.setEditStateDirty()}this._sendActivity(mt.Create,e);if(h.isCollaborationDraftSupported(s.getMetaModel())&&!n.isConnected(this.getView())){await wt(e)}}}catch(t){if(t===Dt.CancelActionDialog||t===Dt.ActionExecutionFailed||t===Dt.CreationFailed){if(p===bt.Sync||p===bt.Deferred||p===bt.Async){F.navigateBackFromTransientState()}}throw t}}}finally{if(p){i.unlock(l)}}};l.validateDocument=function t(e,i){return this.getTransactionHelper().validateDocument(e,i,this.getView())};l.createMultipleDocuments=async function n(o,r,s,a,c){let l=arguments.length>5&&arguments[5]!==undefined?arguments[5]:false;let d=arguments.length>6?arguments[6]:undefined;const g=this.getTransactionHelper();const u=this.getGlobalUIModel();const h=o;d=d!==false;i.lock(u);try{await this.syncTask();if(c){await c({contextPath:h.getPath()})}const t=h.getModel().getMetaModel();let i;if(h.getContext()){i=t.getMetaPath(`${h.getContext().getPath()}/${h.getPath()}`)}else{i=t.getMetaPath(h.getPath())}this.handleCreateEvents(h);const n=r.map(e=>{const n={data:{}};n.keepTransientContextOnFailed=false;n.busyMode="None";n.creationMode=bt.CreationRow;n.parentControl=this.getView();n.createAtEnd=s;n.inactive=l;for(const o in e){const r=t.getObject(`${i}/${o}`);if(r&&r.$kind!=="NavigationProperty"&&o.indexOf("/")<0&&e[o]){n.data[o]=e[o]}}return g.createDocument(h,n,this.getAppComponent(),this.getMessageHandler(),a)});const o=await Promise.all(n);if(!l){this.setDocumentModifiedOnCreate(h)}await Promise.all(o.map(t=>{if(!t.bInactive){return t.created()}}));const u=this.getView().getBindingContext();if(d&&!e.hasTransientContext(h)){this.getAppComponent().getSideEffectsService().requestSideEffectsForNavigationProperty(h.getPath(),u)}return o}catch(e){t.error("Error while creating multiple documents.");throw e}finally{i.unlock(u)}};l.onBeforeSave=function t(e){return Promise.resolve()};l.onBeforeCreate=function t(e){return Promise.resolve()};l.onBeforeEdit=function t(e){return Promise.resolve()};l.onBeforeDiscard=function t(e){return Promise.resolve()};l.onBeforeDelete=function t(e){return Promise.resolve()};l.saveDocument=async function e(i,o){o=o||{};const r=o.bExecuteSideEffectsOnError||undefined;const s=true;const a=this.getTransactionHelper();const c=o.bindings;try{await this.syncTask();this.getMessageHandler().removeTransitionMessages();await this._submitOpenChanges(i);await this._checkForValidationErrors();await this.base.editFlow.onBeforeSave({context:i});const t=this.getProgrammingModel(i);const e=this._getRootViewController();let o;if((t===St.Sticky||i.getProperty("HasActiveEntity"))&&e.isFclEnabled()){o=await this._computeSiblingInformation(i,e.getRightmostContext(),t,true)}const l=await a.saveDocument(i,this.getAppComponent(),this._getResourceModel(),r,c,this.getMessageHandler(),this.getCreationMode());this._removeStickySessionInternalProperties(t);this._sendActivity(mt.Activate,l);n.disconnect(this.getView());this._triggerConfiguredSurvey(vt.save,pt.standardAction);this.setDocumentModified(false);this.setEditMode(xt.Display,false);this.getMessageHandler().showMessageDialog();if(l!==i){let t=l;if(e.isFclEnabled()){o=o??this._createSiblingInfo(i,l);this._updatePathsInHistory(o.pathMapping);if(o.targetContext.getPath()!==l.getPath()){t=o.targetContext}}await this._handleNewContext(t,false,false,s,true)}}catch(e){if(!(e&&e.canceled)){t.error("Error while saving the document",e)}throw e}};l.toggleDraftActive=async function t(e){const i=e.getObject();let n;const o=e&&this.getProgrammingModel(e)===St.Draft;if(!o||!(!i.IsActiveEntity&&i.HasActiveEntity||i.IsActiveEntity&&i.HasDraftEntity)){return}if(!i.IsActiveEntity&&i.HasActiveEntity){n=false}else{n=true}try{const t=this._getRootViewController();const i=t.isFclEnabled()?t.getRightmostContext():e;let o=await this._computeSiblingInformation(e,i,St.Draft,false);if(!o&&e!==i){o=await this._computeSiblingInformation(e,e,St.Draft,false)}if(o){this.setEditMode(n?xt.Editable:xt.Display,false);if(t.isFclEnabled()){const t=this._getSemanticMapping();if((t===null||t===void 0?void 0:t.technicalPath)===e.getPath()){const e=o.pathMapping[o.pathMapping.length-1].newPath;o.pathMapping.push({oldPath:t.semanticPath,newPath:e})}this._updatePathsInHistory(o.pathMapping)}await this._handleNewContext(o.targetContext,n,true,true,true)}else{throw new Error("Error in EditFlow.toggleDraftActive - Cannot find sibling")}}catch(t){throw new Error(`Error in EditFlow.toggleDraftActive:${t}`)}};l.cancelDocument=async function e(i,o){const r=this.getTransactionHelper();const s=o;let a;let c=false;s.cancelButton=o.control||s.cancelButton;s.beforeCancelCallBack=this.base.editFlow.onBeforeDiscard;try{await this.syncTask();const t=this.getProgrammingModel(i);if((t===St.Sticky||i.getProperty("HasActiveEntity"))&&this._isFclEnabled()){const e=this._getRootViewController();a=await this._computeSiblingInformation(i,e.getRightmostContext(),t,true)}const e=await r.cancelDocument(i,s,this.getAppComponent(),this._getResourceModel(),this.getMessageHandler(),this.getCreationMode(),this.isDocumentModified());this._getRootViewController().getInstancedViews().forEach(t=>{const e=t.getBindingContext();if(e&&e.isKeepAlive()){e.setKeepAlive(false)}});const o=true;this._removeStickySessionInternalProperties(t);this.setEditMode(xt.Display,false);this.setDocumentModified(false);this.setDraftStatus(Et.Clear);g.setEditStateDirty();if(!e){this._sendActivity(mt.Discard,undefined);n.disconnect(this.getView());if(!s.skipBackNavigation){await this.getInternalRouting().navigateBackFromContext(i);c=true}}else{const r=e;this._sendActivity(mt.Discard,r);n.disconnect(this.getView());let c=r;if(this._isFclEnabled()){a=a??this._createSiblingInfo(i,r);this._updatePathsInHistory(a.pathMapping);if(a.targetContext.getPath()!==r.getPath()){c=a.targetContext}}if(t===St.Draft){await this._fetchSemanticKeyValues(r);if(!s.skipBindingToView){await this._handleNewContext(c,false,true,o,true)}else{return r}}else{await this._handleNewContext(c,false,false,o,true)}}if(t===St.Draft){this.showDocumentDiscardMessage(c)}}catch(e){t.error("Error while discarding the document",e)}};l.showDocumentDiscardMessage=function t(e){const i=this._getResourceModel();const n=i.getText("C_TRANSACTION_HELPER_DISCARD_DRAFT_TOAST");if(e==true){const t=this.getAppComponent();t.getRoutingService().attachAfterRouteMatched(this.showMessageWhenNoContext,this)}else{m.show(n)}};l.showMessageWhenNoContext=function t(){const e=this._getResourceModel();const i=e.getText("C_TRANSACTION_HELPER_DISCARD_DRAFT_TOAST");const n=this.getAppComponent();m.show(i);n.getRoutingService().detachAfterRouteMatched(this.showMessageWhenNoContext,this)};l.isDraftRoot=function t(e){const i=e.getModel().getMetaModel();const n=i.getMetaContext(e.getPath());return h.isDraftRoot(ht(n).targetEntitySet)};l.deleteDocument=async function e(i,n){const o=this.getAppComponent();let r=n;if(!r){r={bFindActiveContexts:false}}else{r.bFindActiveContexts=false}r.beforeDeleteCallBack=this.base.editFlow.onBeforeDelete;try{if(this._isFclEnabled()&&this.isDraftRoot(i)&&i.getIndex()===undefined&&i.getProperty("IsActiveEntity")===true&&i.getProperty("HasDraftEntity")===true){r.beforeDeleteCallBack=async e=>{await this.base.editFlow.onBeforeDelete(e);try{const t=i.getModel();const e=t.bindContext(`${i.getPath()}/SiblingEntity`).getBoundContext();const n=await e.requestCanonicalPath();const o=t.getKeepAliveContext(n);o.replaceWith(i)}catch(e){t.error("Error while replacing the draft instance in the LR ODLB",e)}}}await this.deleteDocumentTransaction(i,r);if(!this._isFclEnabled()){g.setEditStateDirty()}this._sendActivity(mt.Delete,i);if(o){o.getShellServices().setBackNavigation()}if((o===null||o===void 0?void 0:o.getStartupMode())===At.Deeplink&&!this._isFclEnabled()){o.getRouterProxy().exitFromApp()}else{this.getInternalRouting().navigateBackFromContext(i)}}catch(e){t.error("Error while deleting the document",e)}};l.applyDocument=async function t(e){const n=this.getGlobalUIModel();try{await this.syncTask();if(e.getModel().hasPendingChanges("$auto")){i.lock(n);await this._submitOpenChanges(e)}await this._checkForValidationErrors();await this.getMessageHandler().showMessageDialog();await this.getInternalRouting().navigateBackFromContext(e)}finally{if(i.isLocked(n)){i.unlock(n)}}};l.invokeAction=async function e(i,o,r){var s;let a;const c=this.getTransactionHelper();let l;let d;let u;const h=this.getView();let f=o||{};if(f.isA&&f.isA("sap.ui.model.odata.v4.Context")||Array.isArray(f)||r!==undefined){const t=f;f=r||{};if(t){f.contexts=t}else{f.model=this.getView().getModel()}}f.isNavigable=f.requiresNavigation||f.isNavigable;const p=ft((s=this.getView().getModel())===null||s===void 0?void 0:s.getMetaModel());if(i.indexOf(""+p.entityContainer.name)>-1){f.isBound=false}else{f.isBound=true}if(!f.parentControl){f.parentControl=this.getView()}if(f.controlId){a=this.getView().byId(f.controlId);if(a){f.internalModelContext=a.getBindingContext("internal")}}else{f.internalModelContext=h.getBindingContext("internal")}if(i&&i.indexOf("(")>-1){l=i.split("(");i=l[0];d=l[l.length-1].replaceAll(")","")}if(f.bStaticAction){if(a.isTableBound()){f.contexts=a.getRowBinding().getHeaderContext()}else{const t=a.data("rowsBindingInfo").path,e=new E(this.getView().getModel(),t);f.contexts=e.getHeaderContext()}if(d&&a.getBindingContext()){f.contexts=this._getActionOverloadContextFromMetadataPath(a.getBindingContext(),a.getRowBinding(),d)}if(f.enableAutoScroll){u=this.createActionPromise(i,a.sId)}}f.bGetBoundContext=this._getBoundContext(h,f);f.bObjectPage=h.getViewData().converterType==="ObjectPage";try{await this.syncTask();const e=await c.callAction(i,f,this.getView(),this.getAppComponent(),this.getMessageHandler());let o;if(f.contexts&&f.isBound===true){o=await this._refreshListIfRequired(this.getActionResponseDataAndKeys(i,e),f.contexts[0])}if(n.isConnected(this.getView())){let t=[];if(e){t=Array.isArray(e)?Object.keys(e[0].value.getObject()):Object.keys(e.getObject())}this._sendActivity(mt.Action,f.contexts,i,o,t)}this._triggerConfiguredSurvey(i,pt.action);if(u){u.fResolver(e)}if(f.contexts){if(!this._isFclEnabled()){g.setEditStateDirty()}this.getInternalModel().setProperty("/lastInvokedAction",i)}if(f.isNavigable){let i=e;if(Array.isArray(i)&&i.length===1){i=i[0].value}if(i&&!Array.isArray(i)){const e=h.getModel().getMetaModel();const n=e.getMetaPath(i.getPath());const o=(t,e)=>t.filter(t=>{if(e){return e.indexOf(t)>-1}return true});const r=Array.isArray(f.contexts)?o(f.contexts,f.applicableContexts)[0]:f.contexts;const s=r&&e.getMetaPath(r.getPath());if(n!=undefined&&n===s){if(r.getPath()!==i.getPath()){this.getInternalRouting().navigateForwardToContext(i,{checkNoHashChange:true,noHistoryEntry:false})}else{t.info("Navigation to the same context is not allowed")}}}}this.base.editFlow.onAfterActionExecution(i);return e}catch(t){if(u){u.fRejector()}if(t===Dt.CancelActionDialog){throw new Error("Dialog cancelled")}else if(!(t&&(t.canceled||t.rejectedItems&&t.rejectedItems[0].canceled))){throw new Error(`Error in EditFlow.invokeAction:${t}`)}}};l.onAfterActionExecution=async function t(e){};l.securedExecution=function t(e,n){var o,r;const s=(n===null||n===void 0?void 0:(o=n.busy)===null||o===void 0?void 0:o.set)??true,a=(n===null||n===void 0?void 0:(r=n.busy)===null||r===void 0?void 0:r.check)??true,c=(n===null||n===void 0?void 0:n.updatesDocument)??false,l=this.getGlobalUIModel(),d=this.getView().getBindingContext(),u=d&&this.getProgrammingModel(d)===St.Draft;if(a&&i.isLocked(l)){return Promise.reject("Application already busy therefore execution rejected")}if(s){i.lock(l)}if(c&&u){this.setDraftStatus(Et.Saving)}this.getMessageHandler().removeTransitionMessages();return this.syncTask(e).then(()=>{if(c){this.setDocumentModified(true);if(!this._isFclEnabled()){g.setEditStateDirty()}if(u){this.setDraftStatus(Et.Saved)}}}).catch(t=>{if(c&&u){this.setDraftStatus(Et.Clear)}return Promise.reject(t)}).finally(()=>{if(s){i.unlock(l)}this.getMessageHandler().showMessageDialog()})};l.handlePatchSent=function t(e){var i,o;const r=n.isConnected(this.getView());if(r){e.getSource().getModel().setIgnoreETag(true)}if(!((i=this.getView())!==null&&i!==void 0&&(o=i.getBindingContext("internal"))!==null&&o!==void 0&&o.getProperty("skipPatchHandlers"))){const t=e.getSource();const i=new Promise((i,n)=>{e.getSource().attachEventOnce("patchCompleted",o=>{if(r){e.getSource().getModel().setIgnoreETag(false)}if(e.getSource().isA("sap.ui.model.odata.v4.ODataListBinding")){var s;x.setActionEnablementAfterPatch(this.getView(),t,(s=this.getView())===null||s===void 0?void 0:s.getBindingContext("internal"))}const a=o.getParameter("success");if(a){i()}else{n()}})});this.updateDocument(t,i)}};l.handleCreateActivate=async function e(i){const n=i.getSource();const o=this.getTransactionHelper();const r=true;const s=true;const a={creationMode:bt.Inline,createAtEnd:r,inactive:s,keepTransientContextOnFailed:false,busyMode:"None"};try{var c;const e=i.getParameter("context");(c=e.created())===null||c===void 0?void 0:c.then(()=>{this._sendActivity(mt.Create,e)}).catch(()=>{t.warning(`Failed to activate context ${e.getPath()}`)});const r=await o.createDocument(n,a,this.getAppComponent(),this.getMessageHandler(),false);if(r){if(!this._isFclEnabled()){g.setEditStateDirty()}}}catch(e){t.error("Failed to activate new row -",e)}};l.syncTask=function t(e){if(e){if(typeof e==="function"){this.syncTasks=this.syncTasks.then(e).catch(function(){return Promise.resolve()})}else{this.syncTasks=this.syncTasks.then(()=>e).catch(function(){return Promise.resolve()})}}return this.syncTasks};l.computeEditMode=async function e(i){const n=this.getProgrammingModel(i);if(n===St.Draft){try{this.setDraftStatus(Et.Clear);const t=this.getGlobalUIModel();t.setProperty("/isEditablePending",true,undefined,true);const e=await i.requestObject("IsActiveEntity");if(e===false){this.setEditMode(xt.Editable);const t=await i.requestObject("HasActiveEntity");this.setEditMode(undefined,!t)}else{this.setEditMode(xt.Display,false)}t.setProperty("/isEditablePending",false,undefined,true)}catch(e){t.error("Error while determining the editMode for draft",e);throw e}}else if(n===St.Sticky){const t=this.getInternalModel().getProperty("/lastInvokedAction");if(t&&this.isNewActionForSticky(t,i)){this.setEditMode(xt.Editable,true);if(!this.getAppComponent()._isFclEnabled()){g.setEditStateDirty()}this.handleStickyOn(i);this.getInternalModel().setProperty("/lastInvokedAction",undefined)}}};l.deleteDocumentTransaction=async function t(e,i){var n;const o=at(this);const r=this.getTransactionHelper();i.internalModelContext=i.controlId?(n=sap.ui.getCore().byId(i.controlId))===null||n===void 0?void 0:n.getBindingContext("internal"):null;await this.syncTask();await r.deleteDocument(e,i,this.getAppComponent(),o,this.getMessageHandler())};l._getResourceModel=function t(){return at(this.getView())};l.getTransactionHelper=function t(){return a};l.getMessageHandler=function t(){if(this.base.messageHandler){return this.base.messageHandler}else{throw new Error("Edit Flow works only with a given message handler")}};l.getInternalModel=function t(){return this.getView().getModel("internal")};l.getGlobalUIModel=function t(){return this.getView().getModel("ui")};l.setCreationMode=function t(e){const i=this.getView().getBindingContext("ui");this.getGlobalUIModel().setProperty("createMode",e,i,true)};l.getCreationMode=function t(){const e=this.getView().getBindingContext("ui");return!!this.getGlobalUIModel().getProperty("createMode",e)};l.isDocumentModified=function t(){return!!this.getGlobalUIModel().getProperty("/isDocumentModified")};l.setDocumentModified=function t(e){this.getGlobalUIModel().setProperty("/isDocumentModified",e)};l.setDocumentModifiedOnCreate=function t(e){if(e.isRelative()){this.setDocumentModified(true)}};l.handleCreateEvents=function t(e){this.setDraftStatus(Et.Clear);const i=this.getProgrammingModel(e);e.attachEvent("createSent",()=>{if(i===St.Draft){this.setDraftStatus(Et.Saving)}});e.attachEvent("createCompleted",t=>{const e=t.getParameter("success");if(i===St.Draft){this.setDraftStatus(e?Et.Saved:Et.Clear)}this.getMessageHandler().showMessageDialog()})};l.setDraftStatus=function t(e){this.getView().getModel("ui").setProperty("/draftStatus",e,undefined,true)};l.getProgrammingModel=function t(e){return this.getTransactionHelper().getProgrammingModel(e)};l.setEditMode=function t(e,i){const n=this.getGlobalUIModel();if(e){n.setProperty("/isEditable",e==="Editable",undefined,true)}if(i!==undefined){this.setCreationMode(i)}};l.isNewActionForSticky=function e(i,n){try{var o;const t=n.getModel().getMetaModel();const e=t.getMetaContext(n.getPath());const r=ht(e).startingEntitySet;const s=(o=r.annotations.Session)===null||o===void 0?void 0:o.StickySessionSupported;if((s===null||s===void 0?void 0:s.NewAction)===i){return true}if(s!==null&&s!==void 0&&s.AdditionalNewActions&&(s===null||s===void 0?void 0:s.AdditionalNewActions.indexOf(i))!==-1){return true}return false}catch(e){t.info(e);return false}};l.handleStickyOn=function e(i){const n=this.getAppComponent();try{if(n===undefined){throw new Error("undefined AppComponent for function handleStickyOn")}if(!n.getRouterProxy().hasNavigationGuard()){const t=n.getRouterProxy().getHash();const e=this.getInternalModel();setTimeout(function(){n.getRouterProxy().setNavigationGuard(i.getPath().substring(1))},0);n.getShellServices().setBackNavigation(this.onBackNavigationInSession.bind(this));this.dirtyStateProviderFunction=this.getDirtyStateProvider(n,e,t);n.getShellServices().registerDirtyStateProvider(this.dirtyStateProviderFunction);const o=this.getView().getModel("sap.fe.i18n");this.sessionTimeoutFunction=this.getSessionTimeoutFunction(i,o);this.getView().getModel().attachSessionTimeout(this.sessionTimeoutFunction);this.stickyDiscardAfterNavigationFunction=this.getRouteMatchedFunction(i,n);n.getRoutingService().attachRouteMatched(this.stickyDiscardAfterNavigationFunction)}}catch(e){t.info(e);return false}return true};l.handleStickyOff=function e(){const i=this.getAppComponent();try{if(i===undefined){throw new Error("undefined AppComponent for function handleStickyOff")}if(i.getRouterProxy){i.getRouterProxy().discardNavigationGuard()}if(this.dirtyStateProviderFunction){i.getShellServices().deregisterDirtyStateProvider(this.dirtyStateProviderFunction);this.dirtyStateProviderFunction=undefined}const t=this.getView().getModel();if(t&&this.sessionTimeoutFunction){t.detachSessionTimeout(this.sessionTimeoutFunction)}i.getRoutingService().detachRouteMatched(this.stickyDiscardAfterNavigationFunction);this.stickyDiscardAfterNavigationFunction=undefined;this.setEditMode(xt.Display,false);if(i.getShellServices){i.getShellServices().setBackNavigation()}}catch(e){t.info(e);return false}return true};l._setStickySessionInternalProperties=function t(e,i){if(e===St.Sticky){const t=this.getInternalModel();t.setProperty("/sessionOn",true);t.setProperty("/stickySessionToken",i.getHttpHeaders(true)["SAP-ContextId"])}};l.getDirtyStateProvider=function e(i,n,o){return e=>{try{if(e===undefined){throw new Error("Invalid input parameters for DirtyStateProvider function")}const t=e.innerAppRoute;const r=i.getRouterProxy();let s="";let a;const c=n.getProperty("/sessionOn");if(!c){return undefined}if(!r.isNavigationFinalized()){a=false;s=t}else if(o===t){a=true}else if(r.checkHashWithGuard(t)||r.isGuardCrossAllowedByUser()){s=t;a=false}else{a=true}if(a){setTimeout(function(){i.getShellServices().setDirtyFlag(false)},0)}else{o=s}return a}catch(e){t.info(e);return undefined}}};l.getSessionTimeoutFunction=function e(i,n){return()=>{try{if(i===undefined){throw new Error("Context missing for SessionTimeout function")}this.getMessageHandler().removeTransitionMessages();const t=new w({title:"{sap.fe.i18n>C_EDITFLOW_OBJECT_PAGE_SESSION_EXPIRED_DIALOG_TITLE}",state:"Warning",content:new C({text:"{sap.fe.i18n>C_EDITFLOW_OBJECT_PAGE_SESSION_EXPIRED_DIALOG_MESSAGE}"}),beginButton:new v({text:"{sap.fe.i18n>C_COMMON_DIALOG_OK}",type:"Emphasized",press:()=>{this.handleStickyOff();this.getInternalRouting().navigateBackFromContext(i)}}),afterClose:function(){t.destroy()}});t.addStyleClass("sapUiContentPadding");t.setModel(n,"sap.fe.i18n");this.getView().addDependent(t);t.open()}catch(e){t.info(e);return undefined}return true}};l.getRouteMatchedFunction=function t(e,i){return()=>{const t=i.getRouterProxy().getHash();if(!t||!i.getRouterProxy().checkHashWithGuard(t)){this.discardStickySession(e);e.getModel().clearSessionContext()}}};l.discardStickySession=async function t(e){const i=await s.discardDocument(e);if(i!==null&&i!==void 0&&i.hasPendingChanges()){i.getBinding().resetChanges()}if(!this.getCreationMode()){i===null||i===void 0?void 0:i.refresh()}this.handleStickyOff()};l.getInternalRouting=function t(){if(this.base._routing){return this.base._routing}else{throw new Error("Edit Flow works only with a given routing listener")}};l._getRootViewController=function t(){return this.getAppComponent().getRootViewController()};l._getSemanticMapping=function t(){return this.getAppComponent().getRoutingService().getLastSemanticMapping()};l.createActionPromise=function t(e,i){let n,o;this.actionPromise=new Promise((t,e)=>{n=t;o=e}).then(t=>Object.assign({controlId:i},this.getActionResponseDataAndKeys(e,t)));return{fResolver:n,fRejector:o}};l.getActionResponseDataAndKeys=function t(e,i){if(Array.isArray(i)){if(i.length===1){i=i[0].value}else{return null}}if(!i){return null}const n=this.getView();const o=n.getModel().getMetaModel().getData();const r=o&&o[e]&&o[e][0]&&o[e][0].$ReturnType?o[e][0].$ReturnType.$Type:null;const s=r&&o[r]?o[r].$Key:null;return{oData:i.getObject(),keys:s}};l.getCurrentActionPromise=function t(){return this.actionPromise};l.deleteCurrentActionPromise=function t(){this.actionPromise=undefined};l._scrollAndFocusOnInactiveRow=function t(e){const i=e.getRowBinding();const n=i.getCount()||0;if(e.data("tableType")!=="ResponsiveTable"){if(n>0){e.scrollToIndex(n-1)}e.focusRow(n,true)}else{const t=i.getContexts();if(!(t!==null&&t!==void 0&&t.length)){e.focusRow(n,true);return}let o=n,r=0;for(const e of t){if(e.isInactive()&&r<o){o=r}r++}if(o>0){e.scrollToIndex(o)}e.focusRow(o,true)}};l.createEmptyRowsAndFocus=async function t(e){var i,n,o;const r=e.getParent();if(r!==null&&r!==void 0&&(i=r.tableDefinition)!==null&&i!==void 0&&(n=i.control)!==null&&n!==void 0&&n.inlineCreationRowsHiddenInEditMode&&!((o=e.getBindingContext("ui"))!==null&&o!==void 0&&o.getProperty("createMode"))){await r.setUpEmptyRows(e,true)}this._scrollAndFocusOnInactiveRow(e)};l._sendActivity=function t(e,i,o,r,s){const a=Array.isArray(i)?i.map(t=>t.getPath()):i===null||i===void 0?void 0:i.getPath();n.send(this.getView(),e,a,o,r,s)};l._triggerConfiguredSurvey=function t(e,i){yt(this.getView(),e,i)};l._submitOpenChanges=async function t(e){const n=e.getModel(),o=this.getGlobalUIModel();try{await n.submitBatch("$auto");await n.oRequestor.waitForRunningChangeRequests("$auto");if(n.hasPendingChanges("$auto")){throw new Error("submit of open changes failed")}}finally{if(i.isLocked(o)){i.unlock(o)}}};l._removeStickySessionInternalProperties=function t(e){if(e===St.Sticky){const t=this.getInternalModel();t.setProperty("/sessionOn",false);t.setProperty("/stickySessionToken",undefined);this.handleStickyOff()}};l.onBackNavigationInSession=function t(){const e=this.getView();const i=this.getAppComponent().getRouterProxy();if(i.checkIfBackIsOutOfGuard()){const t=e.getBindingContext();const i=this.getProgrammingModel(t);s.processDataLossConfirmation(async()=>{await this.discardStickySession(t);this._removeStickySessionInternalProperties(i);history.back()},e,i);return}history.back()};l._handleNewContext=async function t(e,i,n,o){let r=arguments.length>4&&arguments[4]!==undefined?arguments[4]:false;if(!this._isFclEnabled()){g.setEditStateDirty()}await this.getInternalRouting().navigateToContext(e,{checkNoHashChange:true,editable:i,bPersistOPScroll:true,bRecreateContext:n,bDraftNavigation:o,showPlaceholder:false,bForceFocus:r,keepCurrentLayout:true})};l._getBoundContext=function t(e,i){const n=e.getViewData().viewLevel;const o=n>1||n===1&&i.controlId;return!i.isNavigable||!!o};l._checkForValidationErrors=function t(){return this.syncTask().then(()=>{const t=this.getView().getId();const e=sap.ui.getCore().getMessageManager().getMessageModel().getData();let i;let n;if(!e.length){return Promise.resolve("No validation errors found")}for(let o=0;o<e.length;o++){n=e[o];if(n.validation){i=M.byId(n.getControlId());while(i){if(i.getId()===t){return Promise.reject("validation errors exist")}i=i.getParent()}}}})};l._refreshListIfRequired=function e(i,n){if(!n||!i||!i.oData){return Promise.resolve(undefined)}const o=n.getBinding();if(o&&o.isA("sap.ui.model.odata.v4.ODataListBinding")){const e=i.oData;const r=i.keys;const s=n.getObject();let a=true;if(Object.keys(e).length){a=r.every(function(t){return s[t]===e[t]});if(!a){return new Promise(e=>{if(o.isRoot()){o.attachEventOnce("dataReceived",function(){e(!a)});o.refresh()}else{const i=this.getAppComponent();i.getSideEffectsService().requestSideEffects([{$NavigationPropertyPath:o.getPath()}],o.getContext()).then(function(){e(!a)},function(){t.error("Error while refreshing the table");e(!a)}).catch(function(e){t.error("Error while refreshing the table",e)})}})}}}return Promise.resolve(undefined)};l._fetchSemanticKeyValues=function t(e){const i=e.getModel().getMetaModel(),n=i.getMetaContext(e.getPath()).getObject("@sapui.name"),o=p.getSemanticKeys(i,n);if(o&&o.length){const t=o.map(function(t){return e.requestObject(t.$PropertyPath)});return Promise.all(t)}else{return Promise.resolve()}};l._getActionOverloadContextFromMetadataPath=function t(e,i,n){const o=e.getModel();const r=o.getMetaModel();let s=i.getPath().split("/");let a=e;s.pop();if(s.length===0){s=[""]}if(s[0]!==""){s.unshift("")}const c=s.map(t=>{if(t!==""){a=o.bindContext(t,a).getBoundContext()}else{a=e}return a}).reverse();const l=c.find(t=>r.getMetaContext(t.getPath()).getObject("$Type")===n);return l||i.getHeaderContext()};l._createSiblingInfo=function t(e,i){return{targetContext:i,pathMapping:[{oldPath:e.getPath(),newPath:i.getPath()}]}};l._updatePathsInHistory=function t(e){const i=this.getAppComponent();i.getRouterProxy().setPathMapping(e);const n=this._getSemanticMapping();if(e.length&&(n===null||n===void 0?void 0:n.technicalPath)===e[e.length-1].oldPath){n.technicalPath=e[e.length-1].newPath}};l._getNavigationTargetForEdit=function t(e,i,n){let o;n=n??this._createSiblingInfo(e,i);this._updatePathsInHistory(n.pathMapping);if(n.targetContext.getPath()!=i.getPath()){o=n.targetContext}return o};l._computeSiblingInformation=async function e(i,n,o,s,a){n=n??i;if(!n.getPath().startsWith(i.getPath())){t.error("Cannot compute rightmost sibling context");throw new Error("Cannot compute rightmost sibling context")}if(s&&n.getPath()===i.getPath()){return Promise.resolve(undefined)}const c=i.getModel();if(o===St.Draft){return r.computeSiblingInformation(i,n,a)}else{return{targetContext:c.bindContext(n.getPath()).getBoundContext(),pathMapping:[]}}};l._isFclEnabled=function t(){return this.getAppComponent()._isFclEnabled()};return c}(S),Pt(st.prototype,"editDocument",[k,_],Object.getOwnPropertyDescriptor(st.prototype,"editDocument"),st.prototype),Pt(st.prototype,"updateDocument",[I,O],Object.getOwnPropertyDescriptor(st.prototype,"updateDocument"),st.prototype),Pt(st.prototype,"createDocument",[R,F],Object.getOwnPropertyDescriptor(st.prototype,"createDocument"),st.prototype),Pt(st.prototype,"onBeforeSave",[T,B],Object.getOwnPropertyDescriptor(st.prototype,"onBeforeSave"),st.prototype),Pt(st.prototype,"onBeforeCreate",[V,H],Object.getOwnPropertyDescriptor(st.prototype,"onBeforeCreate"),st.prototype),Pt(st.prototype,"onBeforeEdit",[N,j],Object.getOwnPropertyDescriptor(st.prototype,"onBeforeEdit"),st.prototype),Pt(st.prototype,"onBeforeDiscard",[L,$],Object.getOwnPropertyDescriptor(st.prototype,"onBeforeDiscard"),st.prototype),Pt(st.prototype,"onBeforeDelete",[G,U],Object.getOwnPropertyDescriptor(st.prototype,"onBeforeDelete"),st.prototype),Pt(st.prototype,"saveDocument",[q,K],Object.getOwnPropertyDescriptor(st.prototype,"saveDocument"),st.prototype),Pt(st.prototype,"cancelDocument",[W,z],Object.getOwnPropertyDescriptor(st.prototype,"cancelDocument"),st.prototype),Pt(st.prototype,"deleteDocument",[J,X],Object.getOwnPropertyDescriptor(st.prototype,"deleteDocument"),st.prototype),Pt(st.prototype,"applyDocument",[Q,Y],Object.getOwnPropertyDescriptor(st.prototype,"applyDocument"),st.prototype),Pt(st.prototype,"invokeAction",[Z,tt],Object.getOwnPropertyDescriptor(st.prototype,"invokeAction"),st.prototype),Pt(st.prototype,"onAfterActionExecution",[et,it],Object.getOwnPropertyDescriptor(st.prototype,"onAfterActionExecution"),st.prototype),Pt(st.prototype,"securedExecution",[nt,ot],Object.getOwnPropertyDescriptor(st.prototype,"securedExecution"),st.prototype),st))||rt);return _t},false);
|
|
126
126
|
/*!
|
|
127
127
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
128
128
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
@@ -142,7 +142,7 @@ sap.ui.predefine("sap/fe/core/controllerextensions/InternalIntentBasedNavigation
|
|
|
142
142
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
143
143
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
144
144
|
*/
|
|
145
|
-
sap.ui.predefine("sap/fe/core/controllerextensions/InternalRouting", ["sap/base/Log","sap/fe/core/CommonUtils","sap/fe/core/controllerextensions/BusyLocker","sap/fe/core/controllerextensions/collaboration/ActivitySync","sap/fe/core/controllerextensions/editFlow/draft","sap/fe/core/controllerextensions/routing/NavigationReason","sap/fe/core/helpers/ClassSupport","sap/fe/core/helpers/EditState","sap/fe/core/helpers/ModelHelper","sap/fe/core/helpers/SemanticKeyHelper","sap/ui/core/Component","sap/ui/core/Core","sap/ui/core/mvc/ControllerExtension","sap/ui/core/mvc/OverrideExecution","sap/ui/model/Filter","sap/ui/model/FilterOperator"],function(t,e,o,n,i,r,a,s,c,l,g,p,u,h,d,f){"use strict";var v,C,y,P,_,m,x,b,w,O,B,R,E,A,D,S,T,M,F,I,V,$,L,j,H,k,N,K,q,z,U,W;var Q=a.publicExtension;var X=a.methodOverride;var G=a.finalExtension;var J=a.extensible;var Y=a.defineUI5Class;var Z=n.isConnected;function tt(t,e){t.prototype=Object.create(e.prototype);t.prototype.constructor=t;et(t,e)}function et(t,e){et=Object.setPrototypeOf?Object.setPrototypeOf.bind():function t(e,o){e.__proto__=o;return e};return et(t,e)}function ot(t,e,o,n,i){var r={};Object.keys(n).forEach(function(t){r[t]=n[t]});r.enumerable=!!r.enumerable;r.configurable=!!r.configurable;if("value"in r||r.initializer){r.writable=true}r=o.slice().reverse().reduce(function(o,n){return n(t,e,o)||o},r);if(i&&r.initializer!==void 0){r.value=r.initializer?r.initializer.call(i):void 0;r.initializer=undefined}if(r.initializer===void 0){Object.defineProperty(t,e,r);r=null}return r}let nt=(v=Y("sap.fe.core.controllerextensions.InternalRouting"),C=X(),y=X(),P=Q(),_=J(h.After),m=Q(),x=J(h.After),b=Q(),w=J(h.After),O=Q(),B=J(h.After),R=Q(),E=Q(),A=Q(),D=G(),S=Q(),T=G(),M=Q(),F=G(),I=Q(),V=G(),$=Q(),L=G(),j=Q(),H=G(),k=Q(),N=Q(),K=G(),q=Q(),z=J(h.Before),v(U=(W=function(n){tt(a,n);function a(){return n.apply(this,arguments)||this}var u=a.prototype;u.onExit=function t(){if(this._oRoutingService){this._oRoutingService.detachRouteMatched(this._fnRouteMatchedBound)}};u.onInit=function t(){this._oView=this.base.getView();this._oAppComponent=e.getAppComponent(this._oView);this._oPageComponent=g.getOwnerComponentFor(this._oView);this._oRouter=this._oAppComponent.getRouter();this._oRouterProxy=this._oAppComponent.getRouterProxy();if(!this._oAppComponent||!this._oPageComponent){throw new Error("Failed to initialize controler extension 'sap.fe.core.controllerextesions.InternalRouting")}if(this._oAppComponent===this._oPageComponent){this._oPageComponent=null}this._oAppComponent.getService("routingService").then(t=>{this._oRoutingService=t;this._fnRouteMatchedBound=this._onRouteMatched.bind(this);this._oRoutingService.attachRouteMatched(this._fnRouteMatchedBound);this._oTargetInformation=t.getTargetInformationFor(this._oPageComponent||this._oView)}).catch(function(){throw new Error("This controller extension cannot work without a 'routingService' on the main AppComponent")})};u.onRouteMatched=function t(){};u.onRouteMatchedFinished=function t(){};u.onBeforeBinding=function t(e,o){const n=this.base.getView().getController().routing;if(n&&n.onBeforeBinding){n.onBeforeBinding(e,o)}};u.onAfterBinding=function t(e,o){this._oAppComponent.getRootViewController().onContextBoundToView(e);const n=this.base.getView().getController().routing;if(n&&n.onAfterBinding){n.onAfterBinding(e,o)}};u.navigateToTarget=function t(e,o,n){const i=this._oPageComponent&&this._oPageComponent.getNavigationConfiguration&&this._oPageComponent.getNavigationConfiguration(o);if(i){const t=i.detail;const o=t.route;const r=t.parameters;this._oRoutingService.navigateTo(e,o,r,n)}else{this._oRoutingService.navigateTo(e,null,null,n)}this._oView.getViewData()};u.navigateToRoute=function t(e,o){return this._oRoutingService.navigateToRoute(e,o)};u.navigateToContext=function e(o,n){const i={};n=n||{};if(o.isA("sap.ui.model.odata.v4.ODataListBinding")){if(n.asyncContext){this._oRouterProxy.activateRouteMatchSynchronization();n.asyncContext.then(t=>{this.navigateToContext(t,{checkNoHashChange:n.checkNoHashChange,editable:n.editable,bPersistOPScroll:n.bPersistOPScroll,updateFCLLevel:n.updateFCLLevel,bForceFocus:n.bForceFocus})}).catch(function(e){t.error("Error with the async context",e)})}else if(!n.bDeferredContext){throw"navigation to a list binding is not yet supported"}}if(n.callExtension){const t=this._oView.getModel("internal");t.setProperty("/paginatorCurrentContext",null);i.sourceBindingContext=o.getObject();i.bindingContext=o;if(n.oEvent){i.oEvent=n.oEvent}const e=this.base.getView().getController().routing.onBeforeNavigation(i);if(e){t.setProperty("/paginatorCurrentContext",o);return Promise.resolve(true)}}n.FCLLevel=this._getFCLLevel();return this._oRoutingService.navigateToContext(o,n,this._oView.getViewData(),this._oTargetInformation)};u.navigateBackFromContext=function t(e,o){o=o||{};o.updateFCLLevel=-1;return this.navigateToContext(e,o)};u.navigateForwardToContext=function t(e,o){var n;if(((n=this._oView.getBindingContext("internal"))===null||n===void 0?void 0:n.getProperty("messageFooterContainsErrors"))===true){return Promise.resolve(true)}o=o||{};o.updateFCLLevel=1;return this.navigateToContext(e,o)};u.navigateBackFromTransientState=function t(){const e=this._oRouterProxy.getHash();if(e.indexOf("(...)")!==-1){this._oRouterProxy.navBack()}};u.navigateToMessagePage=function t(e,o){o=o||{};if(this._oRouterProxy.getHash().indexOf("i-action=create")>-1||this._oRouterProxy.getHash().indexOf("i-action=autoCreate")>-1){return this._oRouterProxy.navToHash(this._oRoutingService.getDefaultCreateHash())}else{o.FCLLevel=this._getFCLLevel();return this._oAppComponent.getRootViewController().displayErrorPage(e,o)}};u.isCurrentStateImpactedBy=function t(e){return this._oRoutingService.isCurrentStateImpactedBy(e)};u._isViewPartOfRoute=function t(e){const o=e===null||e===void 0?void 0:e.targets;if(!o||o.indexOf(this._oTargetInformation.targetName)===-1){if((this._oTargetInformation.viewLevel??0)>=((e===null||e===void 0?void 0:e.routeLevel)??0)){this._setBindingContext(null)}return false}return true};u._buildBindingPath=function t(e,o,n){let i=o.replace(":?query:","");let r=false;for(const t in e){const a=e[t];if(a==="..."&&o.indexOf(`{${t}}`)>=0){r=true;n.bTargetEditable=true}i=i.replace(`{${t}}`,a)}if(e["?query"]&&e["?query"].hasOwnProperty("i-action")){n.bActionCreate=true}if(i&&i[0]!=="/"){i=`/${i}`}return{path:i,deferred:r}};u._onRouteMatched=function t(e){if(!this._isViewPartOfRoute(e.getParameter("routeInformation"))){return}let o;if(this._oPageComponent&&this._oPageComponent.getBindingContextPattern){o=this._oPageComponent.getBindingContextPattern()}o=o||this._oTargetInformation.contextPattern;if(o===null||o===undefined){o=e.getParameter("routePattern")}const n=e.getParameters().arguments;const i=e.getParameter("navigationInfo");const{path:r,deferred:a}=this._buildBindingPath(n,o,i);this.onRouteMatched();const s=this._oView.getModel();let c;if(a){c=this._bindDeferred(r,i)}else{c=this._bindPage(r,s,i)}c.finally(()=>{this.onRouteMatchedFinished()});this._oAppComponent.getRootViewController().updateUIStateForView(this._oView,this._getFCLLevel())};u._bindDeferred=function t(e,o){this.onBeforeBinding(null,{editable:o.bTargetEditable});if(o.bDeferredContext||!o.oAsyncContext){if(this._oPageComponent&&this._oPageComponent.createDeferredContext){this._oPageComponent.createDeferredContext(e,o.useContext,o.bActionCreate)}}const n=this._getBindingContext();if(n!==null&&n!==void 0&&n.hasPendingChanges()){n.getBinding().resetChanges()}this._setBindingContext(null);this.onAfterBinding(null);return Promise.resolve()};u._bindPage=function t(e,o,n){if(e===""){return Promise.resolve(this._bindPageToContext(null,o,n))}return this.resolvePath(e,o,n).then(t=>{this._bindPageToPath(t,o,n)}).catch(t=>{const e=p.getLibraryResourceBundle("sap.fe.core");this.navigateToMessagePage(e.getText("C_COMMON_SAPFE_DATA_RECEIVED_ERROR"),{title:e.getText("C_COMMON_SAPFE_ERROR"),description:t.message})})};u.createFilterFromPath=function t(e,o,n){const i=function(t){if(t.indexOf("'")===0&&t.lastIndexOf("'")===t.length-1){t=decodeURIComponent(t.substring(1,t.length-1))}return t};const r=e.substring(e.indexOf("(")+1,e.length-1).split(",");let a=o;let s=r;if(o.includes("IsActiveEntity")){a=o.filter(t=>t.indexOf("IsActiveEntity")<0);s=r.filter(t=>!t.startsWith("IsActiveEntity"))}if(a.length!=s.length){return null}const l=c.isFilteringCaseSensitive(n);let g;if(a.length===1){if(s[0].indexOf("=")>0){const t=s[0].split("=");s[0]=t[1]}const t=i(s[0]);g=[new d({path:a[0],operator:f.EQ,value1:t,caseSensitive:l})]}else{const t={};s.forEach(function(e){const o=e.split("="),n=i(o[1]);t[o[0]]=n});let e=false;g=a.map(function(o){const n=o,i=t[n];if(i!==undefined){return new d({path:n,operator:f.EQ,value1:i,caseSensitive:l})}else{e=true;return new d({path:"XX"})}});if(e){return null}}const p=new d({filters:[new d("IsActiveEntity","EQ",false),new d("SiblingEntity/IsActiveEntity","EQ",null)],and:false});g.push(p);return new d(g,true)};u.getTechnicalPathFromPath=async function t(e,o,n){var i;const r=o.getMetaModel();let a=r.getMetaContext(e).getPath();if(!n||n.length===0){return null}const s=this.createFilterFromPath(e,n,r);if(s===null){return null}if(!((i=a)!==null&&i!==void 0&&i.startsWith("/"))){a=`/${a}`}const c=o.bindList(a,undefined,undefined,s,{$$groupId:"$auto.Heroes"});const l=await c.requestContexts(0,2);if(l.length){return l[0].getPath()}else{return null}};u.refreshContext=async function t(e,o,n){const i=this._oAppComponent.getRootViewController();if(i.isFclEnabled()){const t=e.getKeepAliveContext(o);n.replaceWith(t)}else{s.setEditStateDirty()}};u.checkDraftAvailability=function t(e,o){const n=/^[/]?(\w+)\([^/]+\)$/.exec(e);if(!n){return false}const i=`/${n[1]}`;const r=o.getObject(`${i}@com.sap.vocabularies.Common.v1.DraftRoot`);return r?true:false};u.resolvePath=async function t(e,o,n){var i,r,a,s;const g=o.getMetaModel();const p=this._oRoutingService.getLastSemanticMapping();let u=this._oRouter.getHashChanger().getHash().split("?")[0];if(((i=u)===null||i===void 0?void 0:i.lastIndexOf("/"))===((r=u)===null||r===void 0?void 0:r.length)-1){u=u.substring(0,u.length-1)}let h=(a=u)===null||a===void 0?void 0:a.substr(0,u.indexOf("("));if(h.indexOf("/")===0){h=h.substring(1)}const d=this.checkDraftAvailability(u,g),f=d?l.getSemanticKeys(g,h):undefined,v=c.isCollaborationDraftSupported(g),C=(n===null||n===void 0?void 0:(s=n.useContext)===null||s===void 0?void 0:s.getProperty("IsActiveEntity"))??true;if(d&&v&&!C){return this.resolveCollaborationPath(e,o,n,f,h)}if(f===undefined){return e}if((p===null||p===void 0?void 0:p.semanticPath)===e){return p.technicalPath}const y=f.map(t=>t.$PropertyPath);const P=await this.getTechnicalPathFromPath(u,o,y);if(P&&P!==e){this._oRoutingService.setLastSemanticMapping({technicalPath:P,semanticPath:e});return P}return e};u.resolveCollaborationPath=async function t(e,o,n,i,r){const a=this._oRoutingService.getLastSemanticMapping();const s=o.getMetaModel();const c=this._oRouter.getHashChanger().getHash().split("?")[0];let l;const g=(a===null||a===void 0?void 0:a.technicalPath)??e;if(i){l=i.map(t=>t.$PropertyPath)}else{l=s.getObject(`/${r}/$Type/$Key`)}const p=await this.getTechnicalPathFromPath(c,o,l);if(p===null){return e}if(p!==g&&n.useContext){var u;if(a){this._oRoutingService.setLastSemanticMapping({technicalPath:p,semanticPath:e})}n.redirectedToNonDraft=((u=s.getObject(`/${r}/@com.sap.vocabularies.UI.v1.HeaderInfo`))===null||u===void 0?void 0:u.TypeName)??r;await this.refreshContext(o,p,n.useContext)}return p};u._bindPageToPath=function t(e,o,n){const i=this._getBindingContext(),a=i&&i.getPath(),l=n.useContext;if(l&&l.getPath()===e){if(l!==i){const t=this._oAppComponent.getRootViewController();if(t.isFclEnabled()&&n.reason===r.RowPress){const t=l.getModel().getMetaModel();if(!l.getBinding().hasPendingChanges()){l.refresh()}else if(Z(this.getView())||c.isDraftSupported(t,l.getPath())&&c.isCollaborationDraftSupported(t)){l.getBinding().resetChanges();l.refresh()}}this._bindPageToContext(l,o,n)}}else if(a!==e){this._bindPageToContext(this._createContext(e,o),o,n)}else if(n.reason!==r.AppStateChanged&&s.isEditStateDirty()){this._refreshBindingContext(i)}};u._bindPageToContext=function e(o,n,i){if(!o){this.onBeforeBinding(null);this.onAfterBinding(null);return}const r=o.getBinding();const a=this._oAppComponent.getRootViewController();if(a.isFclEnabled()){if(!r||!r.isA("sap.ui.model.odata.v4.ODataListBinding")){o=this._createContext(o.getPath(),n)}try{this._setKeepAlive(o,true,()=>{if(a.isContextUsedInPages(o)){this.navigateBackFromContext(o)}},true)}catch(e){t.error(`View for ${o.getPath()} won't be synchronized. Parent listBinding must have binding parameter $$ownRequest=true`)}}else if(!r||r.isA("sap.ui.model.odata.v4.ODataListBinding")){o=this._createContext(o.getPath(),n)}this.onBeforeBinding(o,{editable:i.bTargetEditable,listBinding:r,bPersistOPScroll:i.bPersistOPScroll,bDraftNavigation:i.bDraftNavigation,showPlaceholder:i.bShowPlaceholder});this._setBindingContext(o);this.onAfterBinding(o,{redirectedToNonDraft:i===null||i===void 0?void 0:i.redirectedToNonDraft})};u._createContext=function e(n,i){const r=this._oPageComponent,a=r&&r.getEntitySet&&r.getEntitySet(),s=r&&r.getContextPath&&r.getContextPath()||a&&`/${a}`,c=i.getMetaModel(),l={$$groupId:"$auto.Heroes",$$updateGroupId:"$auto",$$patchWithoutSideEffects:true};const g=c.getObject(`${s}@com.sap.vocabularies.Common.v1.DraftRoot`);const p=c.getObject(`${s}@com.sap.vocabularies.Common.v1.DraftNode`);const u=this._oAppComponent.getRootViewController();if(u.isFclEnabled()){const t=this._getKeepAliveContext(i,n,false,l);if(!t){throw new Error(`Cannot create keepAlive context ${n}`)}else if(g||p){if(t.getProperty("IsActiveEntity")===undefined){t.requestProperty(["HasActiveEntity","HasDraftEntity","IsActiveEntity"]);if(g){t.requestObject("DraftAdministrativeData")}}else{t.requestSideEffects(g?["HasActiveEntity","HasDraftEntity","IsActiveEntity","DraftAdministrativeData"]:["HasActiveEntity","HasDraftEntity","IsActiveEntity"])}}return t}else{if(a){const t=c.getObject(`${s}/@com.sap.vocabularies.Common.v1.Messages/$Path`);if(t){l.$select=t}}if(g||p){if(l.$select===undefined){l.$select="HasActiveEntity,HasDraftEntity,IsActiveEntity"}else{l.$select+=",HasActiveEntity,HasDraftEntity,IsActiveEntity"}}if(this._oView.getBindingContext()){var h;const e=(h=this._oView.getBindingContext())===null||h===void 0?void 0:h.getBinding();e===null||e===void 0?void 0:e.resetChanges().then(()=>{e.destroy()}).catch(e=>{t.error("Error while reseting the changes to the binding",e)})}const e=i.bindContext(n,undefined,l);e.attachEventOnce("dataRequested",()=>{o.lock(this._oView)});e.attachEventOnce("dataReceived",this.onDataReceived.bind(this));return e.getBoundContext()}};u.onDataReceived=async function e(n){const i=n&&n.getParameter("error");if(o.isLocked(this._oView)){o.unlock(this._oView)}if(i){try{const t=await p.getLibraryResourceBundle("sap.fe.core",true);const e=this.base.messageHandler;let o={};if(i.status===503){o={isInitialLoad503Error:true,shellBack:true}}else if(i.status===400){o={title:t.getText("C_COMMON_SAPFE_ERROR"),description:t.getText("C_COMMON_SAPFE_DATA_RECEIVED_ERROR_DESCRIPTION"),isDataReceivedError:true,shellBack:true}}else{o={title:t.getText("C_COMMON_SAPFE_ERROR"),description:i,isDataReceivedError:true,shellBack:true}}await e.showMessages(o)}catch(e){t.error("Error while getting the core resource bundle",e)}}};u._refreshBindingContext=function t(e){const o=this._oPageComponent;const n=this._oAppComponent.getSideEffectsService();const i=e.getPath();const r=o&&o.getEntitySet&&o.getEntitySet();const a=o&&o.getContextPath&&o.getContextPath()||r&&`/${r}`;const s=this._oView.getModel().getMetaModel();let c;const l=[];const g=[];const p={targetProperties:[],targetEntities:[]};function u(t){let e;const o=(t.getContext()&&t.getContext().getPath()||"").replace(i,"");const n=(o?`${o.slice(1)}/`:o)+t.getPath();if(t.isA("sap.ui.model.odata.v4.ODataContextBinding")){e=t.getDependentBindings();if(e){for(let t=0;t<e.length;t++){u(e[t])}}else if(l.indexOf(n)===-1){l.push(n)}}else if(t.isA("sap.ui.model.odata.v4.ODataListBinding")){if(l.indexOf(n)===-1){l.push(n)}}else if(t.isA("sap.ui.model.odata.v4.ODataPropertyBinding")){if(g.indexOf(n)===-1){g.push(n)}}}if(a){c=s.getObject(`${a}/@com.sap.vocabularies.Common.v1.Messages/$Path`)}u(e.getBinding());let h;for(h=0;h<l.length;h++){p.targetEntities.push({$NavigationPropertyPath:l[h]})}p.targetProperties=g;if(c){p.targetProperties.push(c)}p.targetProperties=p.targetProperties.reduce((t,e)=>{if(e){const o=e.indexOf("/");t.push(o>0?e.slice(0,o):e)}return t},[]);n.requestSideEffects([...p.targetEntities,...p.targetProperties],e)};u._getBindingContext=function t(){if(this._oPageComponent){return this._oPageComponent.getBindingContext()}else{return this._oView.getBindingContext()}};u._setBindingContext=function t(e){var o;let n,i;if(this._oPageComponent){n=this._oPageComponent.getBindingContext();i=this._oPageComponent}else{n=this._oView.getBindingContext();i=this._oView}i.setBindingContext(e);if((o=n)!==null&&o!==void 0&&o.isKeepAlive()&&n!==e){this._setKeepAlive(n,false)}};u._getFCLLevel=function t(){return this._oTargetInformation.FCLLevel};u._setKeepAlive=function t(e,o,n,i){if(e.getPath().endsWith(")")){const t=e.getModel().getMetaModel();const r=t.getMetaPath(e.getPath());const a=t.getObject(`${r}/@com.sap.vocabularies.Common.v1.Messages/$Path`);e.setKeepAlive(o,n,!!a&&i)}};u._getKeepAliveContext=function t(e,o,n,i){const r=o.split("/");const a=[];while(r.length&&!r[r.length-1].endsWith(")")){a.push(r.pop())}if(r.length===0){return undefined}const s=r.join("/");const c=e.getKeepAliveContext(s,n,i);if(a.length===0){return c}else{a.reverse();const t=a.join("/");return e.bindContext(t,c).getBoundContext()}};u.switchFullScreen=function e(){const o=this.base.getView();const n=o.getModel("fclhelper"),i=n.getProperty("/actionButtonsInfo/isFullScreen"),r=n.getProperty(i?"/actionButtonsInfo/exitFullScreen":"/actionButtonsInfo/fullScreen"),a=this._oAppComponent.getRootViewController();const s=a.getRightmostContext?a.getRightmostContext():o.getBindingContext();this.base._routing.navigateToContext(s,{sLayout:r}).catch(function(){t.warning("cannot switch between column and fullscreen")})};u.closeColumn=function t(){const e=this._oView.getViewData();const o=this._oView.getBindingContext();const n=o.getModel().getMetaModel();const r={noPreservationCache:true,sLayout:this._oView.getModel("fclhelper").getProperty("/actionButtonsInfo/closeColumn")};if((e===null||e===void 0?void 0:e.viewLevel)===1&&c.isDraftSupported(n,o.getPath())){i.processDataLossOrDraftDiscardConfirmation(()=>{this.navigateBackFromContext(o,r)},Function.prototype,o,this._oView.getController(),false,i.NavigationType.BackNavigation)}else{this.navigateBackFromContext(o,r)}};return a}(u),ot(W.prototype,"onExit",[C],Object.getOwnPropertyDescriptor(W.prototype,"onExit"),W.prototype),ot(W.prototype,"onInit",[y],Object.getOwnPropertyDescriptor(W.prototype,"onInit"),W.prototype),ot(W.prototype,"onRouteMatched",[P,_],Object.getOwnPropertyDescriptor(W.prototype,"onRouteMatched"),W.prototype),ot(W.prototype,"onRouteMatchedFinished",[m,x],Object.getOwnPropertyDescriptor(W.prototype,"onRouteMatchedFinished"),W.prototype),ot(W.prototype,"onBeforeBinding",[b,w],Object.getOwnPropertyDescriptor(W.prototype,"onBeforeBinding"),W.prototype),ot(W.prototype,"onAfterBinding",[O,B],Object.getOwnPropertyDescriptor(W.prototype,"onAfterBinding"),W.prototype),ot(W.prototype,"navigateToTarget",[R],Object.getOwnPropertyDescriptor(W.prototype,"navigateToTarget"),W.prototype),ot(W.prototype,"navigateToRoute",[E],Object.getOwnPropertyDescriptor(W.prototype,"navigateToRoute"),W.prototype),ot(W.prototype,"navigateToContext",[A,D],Object.getOwnPropertyDescriptor(W.prototype,"navigateToContext"),W.prototype),ot(W.prototype,"navigateBackFromContext",[S,T],Object.getOwnPropertyDescriptor(W.prototype,"navigateBackFromContext"),W.prototype),ot(W.prototype,"navigateForwardToContext",[M,F],Object.getOwnPropertyDescriptor(W.prototype,"navigateForwardToContext"),W.prototype),ot(W.prototype,"navigateBackFromTransientState",[I,V],Object.getOwnPropertyDescriptor(W.prototype,"navigateBackFromTransientState"),W.prototype),ot(W.prototype,"navigateToMessagePage",[$,L],Object.getOwnPropertyDescriptor(W.prototype,"navigateToMessagePage"),W.prototype),ot(W.prototype,"isCurrentStateImpactedBy",[j,H],Object.getOwnPropertyDescriptor(W.prototype,"isCurrentStateImpactedBy"),W.prototype),ot(W.prototype,"onDataReceived",[k],Object.getOwnPropertyDescriptor(W.prototype,"onDataReceived"),W.prototype),ot(W.prototype,"switchFullScreen",[N,K],Object.getOwnPropertyDescriptor(W.prototype,"switchFullScreen"),W.prototype),ot(W.prototype,"closeColumn",[q,z],Object.getOwnPropertyDescriptor(W.prototype,"closeColumn"),W.prototype),W))||U);return nt},false);
|
|
145
|
+
sap.ui.predefine("sap/fe/core/controllerextensions/InternalRouting", ["sap/base/Log","sap/fe/core/CommonUtils","sap/fe/core/controllerextensions/BusyLocker","sap/fe/core/controllerextensions/collaboration/ActivitySync","sap/fe/core/controllerextensions/editFlow/draft","sap/fe/core/controllerextensions/routing/NavigationReason","sap/fe/core/helpers/ClassSupport","sap/fe/core/helpers/EditState","sap/fe/core/helpers/ModelHelper","sap/fe/core/helpers/SemanticKeyHelper","sap/ui/core/Component","sap/ui/core/Core","sap/ui/core/mvc/ControllerExtension","sap/ui/core/mvc/OverrideExecution","sap/ui/model/Filter","sap/ui/model/FilterOperator"],function(t,e,o,n,i,r,a,s,c,l,g,p,u,h,d,f){"use strict";var v,C,y,P,_,m,x,b,w,O,B,R,E,A,D,S,T,M,F,I,V,$,L,j,H,k,N,K,q,z,U,W;var Q=a.publicExtension;var X=a.methodOverride;var G=a.finalExtension;var J=a.extensible;var Y=a.defineUI5Class;function Z(t,e){t.prototype=Object.create(e.prototype);t.prototype.constructor=t;tt(t,e)}function tt(t,e){tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function t(e,o){e.__proto__=o;return e};return tt(t,e)}function et(t,e,o,n,i){var r={};Object.keys(n).forEach(function(t){r[t]=n[t]});r.enumerable=!!r.enumerable;r.configurable=!!r.configurable;if("value"in r||r.initializer){r.writable=true}r=o.slice().reverse().reduce(function(o,n){return n(t,e,o)||o},r);if(i&&r.initializer!==void 0){r.value=r.initializer?r.initializer.call(i):void 0;r.initializer=undefined}if(r.initializer===void 0){Object.defineProperty(t,e,r);r=null}return r}let ot=(v=Y("sap.fe.core.controllerextensions.InternalRouting"),C=X(),y=X(),P=Q(),_=J(h.After),m=Q(),x=J(h.After),b=Q(),w=J(h.After),O=Q(),B=J(h.After),R=Q(),E=Q(),A=Q(),D=G(),S=Q(),T=G(),M=Q(),F=G(),I=Q(),V=G(),$=Q(),L=G(),j=Q(),H=G(),k=Q(),N=Q(),K=G(),q=Q(),z=J(h.Before),v(U=(W=function(a){Z(u,a);function u(){return a.apply(this,arguments)||this}var h=u.prototype;h.onExit=function t(){if(this._oRoutingService){this._oRoutingService.detachRouteMatched(this._fnRouteMatchedBound)}};h.onInit=function t(){this._oView=this.base.getView();this._oAppComponent=e.getAppComponent(this._oView);this._oPageComponent=g.getOwnerComponentFor(this._oView);this._oRouter=this._oAppComponent.getRouter();this._oRouterProxy=this._oAppComponent.getRouterProxy();if(!this._oAppComponent||!this._oPageComponent){throw new Error("Failed to initialize controler extension 'sap.fe.core.controllerextesions.InternalRouting")}if(this._oAppComponent===this._oPageComponent){this._oPageComponent=null}this._oAppComponent.getService("routingService").then(t=>{this._oRoutingService=t;this._fnRouteMatchedBound=this._onRouteMatched.bind(this);this._oRoutingService.attachRouteMatched(this._fnRouteMatchedBound);this._oTargetInformation=t.getTargetInformationFor(this._oPageComponent||this._oView)}).catch(function(){throw new Error("This controller extension cannot work without a 'routingService' on the main AppComponent")})};h.onRouteMatched=function t(){};h.onRouteMatchedFinished=function t(){};h.onBeforeBinding=function t(e,o){const n=this.base.getView().getController().routing;if(n&&n.onBeforeBinding){n.onBeforeBinding(e,o)}};h.onAfterBinding=function t(e,o){this._oAppComponent.getRootViewController().onContextBoundToView(e);const n=this.base.getView().getController().routing;if(n&&n.onAfterBinding){n.onAfterBinding(e,o)}};h.navigateToTarget=function t(e,o,n){const i=this._oPageComponent&&this._oPageComponent.getNavigationConfiguration&&this._oPageComponent.getNavigationConfiguration(o);if(i){const t=i.detail;const o=t.route;const r=t.parameters;this._oRoutingService.navigateTo(e,o,r,n)}else{this._oRoutingService.navigateTo(e,null,null,n)}this._oView.getViewData()};h.navigateToRoute=function t(e,o){return this._oRoutingService.navigateToRoute(e,o)};h.navigateToContext=function e(o,n){const i={};n=n||{};if(o.isA("sap.ui.model.odata.v4.ODataListBinding")){if(n.asyncContext){this._oRouterProxy.activateRouteMatchSynchronization();n.asyncContext.then(t=>{this.navigateToContext(t,{checkNoHashChange:n.checkNoHashChange,editable:n.editable,bPersistOPScroll:n.bPersistOPScroll,updateFCLLevel:n.updateFCLLevel,bForceFocus:n.bForceFocus})}).catch(function(e){t.error("Error with the async context",e)})}else if(!n.bDeferredContext){throw"navigation to a list binding is not yet supported"}}if(n.callExtension){const t=this._oView.getModel("internal");t.setProperty("/paginatorCurrentContext",null);i.sourceBindingContext=o.getObject();i.bindingContext=o;if(n.oEvent){i.oEvent=n.oEvent}const e=this.base.getView().getController().routing.onBeforeNavigation(i);if(e){t.setProperty("/paginatorCurrentContext",o);return Promise.resolve(true)}}n.FCLLevel=this._getFCLLevel();return this._oRoutingService.navigateToContext(o,n,this._oView.getViewData(),this._oTargetInformation)};h.navigateBackFromContext=function t(e,o){o=o||{};o.updateFCLLevel=-1;return this.navigateToContext(e,o)};h.navigateForwardToContext=function t(e,o){var n;if(((n=this._oView.getBindingContext("internal"))===null||n===void 0?void 0:n.getProperty("messageFooterContainsErrors"))===true){return Promise.resolve(true)}o=o||{};o.updateFCLLevel=1;return this.navigateToContext(e,o)};h.navigateBackFromTransientState=function t(){const e=this._oRouterProxy.getHash();if(e.indexOf("(...)")!==-1){this._oRouterProxy.navBack()}};h.navigateToMessagePage=function t(e,o){o=o||{};if(this._oRouterProxy.getHash().indexOf("i-action=create")>-1||this._oRouterProxy.getHash().indexOf("i-action=autoCreate")>-1){return this._oRouterProxy.navToHash(this._oRoutingService.getDefaultCreateHash())}else{o.FCLLevel=this._getFCLLevel();return this._oAppComponent.getRootViewController().displayErrorPage(e,o)}};h.isCurrentStateImpactedBy=function t(e){return this._oRoutingService.isCurrentStateImpactedBy(e)};h._isViewPartOfRoute=function t(e){const o=e===null||e===void 0?void 0:e.targets;if(!o||o.indexOf(this._oTargetInformation.targetName)===-1){if((this._oTargetInformation.viewLevel??0)>=((e===null||e===void 0?void 0:e.routeLevel)??0)){this._setBindingContext(null)}return false}return true};h._buildBindingPath=function t(e,o,n){let i=o.replace(":?query:","");let r=false;for(const t in e){const a=e[t];if(a==="..."&&o.indexOf(`{${t}}`)>=0){r=true;n.bTargetEditable=true}i=i.replace(`{${t}}`,a)}if(e["?query"]&&e["?query"].hasOwnProperty("i-action")){n.bActionCreate=true}if(i&&i[0]!=="/"){i=`/${i}`}return{path:i,deferred:r}};h._onRouteMatched=function t(e){if(!this._isViewPartOfRoute(e.getParameter("routeInformation"))){return}let o;if(this._oPageComponent&&this._oPageComponent.getBindingContextPattern){o=this._oPageComponent.getBindingContextPattern()}o=o||this._oTargetInformation.contextPattern;if(o===null||o===undefined){o=e.getParameter("routePattern")}const n=e.getParameters().arguments;const i=e.getParameter("navigationInfo");const{path:r,deferred:a}=this._buildBindingPath(n,o,i);this.onRouteMatched();const s=this._oView.getModel();let c;if(a){c=this._bindDeferred(r,i)}else{c=this._bindPage(r,s,i)}c.finally(()=>{this.onRouteMatchedFinished()});this._oAppComponent.getRootViewController().updateUIStateForView(this._oView,this._getFCLLevel())};h._bindDeferred=function t(e,o){this.onBeforeBinding(null,{editable:o.bTargetEditable});if(o.bDeferredContext||!o.oAsyncContext){if(this._oPageComponent&&this._oPageComponent.createDeferredContext){this._oPageComponent.createDeferredContext(e,o.useContext,o.bActionCreate)}}const n=this._getBindingContext();if(n!==null&&n!==void 0&&n.hasPendingChanges()){n.getBinding().resetChanges()}this._setBindingContext(null);this.onAfterBinding(null);return Promise.resolve()};h._bindPage=function t(e,o,n){if(e===""){return Promise.resolve(this._bindPageToContext(null,o,n))}return this.resolvePath(e,o,n).then(t=>{this._bindPageToPath(t,o,n)}).catch(t=>{const e=p.getLibraryResourceBundle("sap.fe.core");this.navigateToMessagePage(e.getText("C_COMMON_SAPFE_DATA_RECEIVED_ERROR"),{title:e.getText("C_COMMON_SAPFE_ERROR"),description:t.message})})};h.createFilterFromPath=function t(e,o,n){const i=function(t){if(t.indexOf("'")===0&&t.lastIndexOf("'")===t.length-1){t=decodeURIComponent(t.substring(1,t.length-1))}return t};const r=e.substring(e.indexOf("(")+1,e.length-1).split(",");let a=o;let s=r;if(o.includes("IsActiveEntity")){a=o.filter(t=>t.indexOf("IsActiveEntity")<0);s=r.filter(t=>!t.startsWith("IsActiveEntity"))}if(a.length!=s.length){return null}const l=c.isFilteringCaseSensitive(n);let g;if(a.length===1){if(s[0].indexOf("=")>0){const t=s[0].split("=");s[0]=t[1]}const t=i(s[0]);g=[new d({path:a[0],operator:f.EQ,value1:t,caseSensitive:l})]}else{const t={};s.forEach(function(e){const o=e.split("="),n=i(o[1]);t[o[0]]=n});let e=false;g=a.map(function(o){const n=o,i=t[n];if(i!==undefined){return new d({path:n,operator:f.EQ,value1:i,caseSensitive:l})}else{e=true;return new d({path:"XX"})}});if(e){return null}}const p=new d({filters:[new d("IsActiveEntity","EQ",false),new d("SiblingEntity/IsActiveEntity","EQ",null)],and:false});g.push(p);return new d(g,true)};h.getTechnicalPathFromPath=async function t(e,o,n){var i;const r=o.getMetaModel();let a=r.getMetaContext(e).getPath();if(!n||n.length===0){return null}const s=this.createFilterFromPath(e,n,r);if(s===null){return null}if(!((i=a)!==null&&i!==void 0&&i.startsWith("/"))){a=`/${a}`}const c=o.bindList(a,undefined,undefined,s,{$$groupId:"$auto.Heroes"});const l=await c.requestContexts(0,2);if(l.length){return l[0].getPath()}else{return null}};h.refreshContext=async function t(e,o,n){const i=this._oAppComponent.getRootViewController();if(i.isFclEnabled()){const t=e.getKeepAliveContext(o);n.replaceWith(t)}else{s.setEditStateDirty()}};h.checkDraftAvailability=function t(e,o){const n=/^[/]?(\w+)\([^/]+\)$/.exec(e);if(!n){return false}const i=`/${n[1]}`;const r=o.getObject(`${i}@com.sap.vocabularies.Common.v1.DraftRoot`);return r?true:false};h.resolvePath=async function t(e,o,n){var i,r,a;const s=o.getMetaModel();const g=this._oRoutingService.getLastSemanticMapping();let p=this._oRouter.getHashChanger().getHash().split("?")[0];if(((i=p)===null||i===void 0?void 0:i.lastIndexOf("/"))===((r=p)===null||r===void 0?void 0:r.length)-1){p=p.substring(0,p.length-1)}let u=(a=p)===null||a===void 0?void 0:a.substr(0,p.indexOf("("));if(u.indexOf("/")===0){u=u.substring(1)}const h=this.checkDraftAvailability(p,s),d=h?l.getSemanticKeys(s,u):undefined,f=c.isCollaborationDraftSupported(s);if(h&&f){var v;const t=(n===null||n===void 0?void 0:(v=n.useContext)===null||v===void 0?void 0:v.getProperty("IsActiveEntity"))??true;if(!t){return this.resolveCollaborationPath(e,o,n,d,u)}}if(d===undefined){return e}if((g===null||g===void 0?void 0:g.semanticPath)===e){return g.technicalPath}const C=d.map(t=>t.$PropertyPath);const y=await this.getTechnicalPathFromPath(p,o,C);if(y&&y!==e){this._oRoutingService.setLastSemanticMapping({technicalPath:y,semanticPath:e});return y}return e};h.resolveCollaborationPath=async function t(e,o,n,i,r){const a=this._oRoutingService.getLastSemanticMapping();const s=o.getMetaModel();const c=this._oRouter.getHashChanger().getHash().split("?")[0];let l;const g=(a===null||a===void 0?void 0:a.technicalPath)??e;if(i){l=i.map(t=>t.$PropertyPath)}else{l=s.getObject(`/${r}/$Type/$Key`)}const p=await this.getTechnicalPathFromPath(c,o,l);if(p===null){return e}if(p!==g&&n.useContext){var u;if(a){this._oRoutingService.setLastSemanticMapping({technicalPath:p,semanticPath:e})}n.redirectedToNonDraft=((u=s.getObject(`/${r}/@com.sap.vocabularies.UI.v1.HeaderInfo`))===null||u===void 0?void 0:u.TypeName)??r;await this.refreshContext(o,p,n.useContext)}return p};h._bindPageToPath=function t(e,o,i){const a=this._getBindingContext(),l=a&&a.getPath(),g=i.useContext;if(g&&g.getPath()===e){if(g!==a){let t=false;const e=this._oAppComponent.getRootViewController();if(e.isFclEnabled()&&i.reason===r.RowPress){const e=g.getModel().getMetaModel();if(!g.getBinding().hasPendingChanges()){t=true}else if(n.isConnected(this.getView())||c.isDraftSupported(e,g.getPath())&&c.isCollaborationDraftSupported(e)){g.getBinding().resetChanges();t=true}}this._bindPageToContext(g,o,i);if(t){g.refresh()}}}else if(l!==e){this._bindPageToContext(this._createContext(e,o),o,i)}else if(i.reason!==r.AppStateChanged&&s.isEditStateDirty()){this._refreshBindingContext(a)}};h._bindPageToContext=function e(o,n,i){if(!o){this.onBeforeBinding(null);this.onAfterBinding(null);return}const r=o.getBinding();const a=this._oAppComponent.getRootViewController();if(a.isFclEnabled()){if(!r||!r.isA("sap.ui.model.odata.v4.ODataListBinding")){o=this._createContext(o.getPath(),n)}try{this._setKeepAlive(o,true,()=>{if(a.isContextUsedInPages(o)){this.navigateBackFromContext(o)}},true)}catch(e){t.error(`View for ${o.getPath()} won't be synchronized. Parent listBinding must have binding parameter $$ownRequest=true`)}}else if(!r||r.isA("sap.ui.model.odata.v4.ODataListBinding")){o=this._createContext(o.getPath(),n)}this.onBeforeBinding(o,{editable:i.bTargetEditable,listBinding:r,bPersistOPScroll:i.bPersistOPScroll,bDraftNavigation:i.bDraftNavigation,showPlaceholder:i.bShowPlaceholder});this._setBindingContext(o);this.onAfterBinding(o,{redirectedToNonDraft:i===null||i===void 0?void 0:i.redirectedToNonDraft})};h._createContext=function e(n,i){const r=this._oPageComponent,a=r&&r.getEntitySet&&r.getEntitySet(),s=r&&r.getContextPath&&r.getContextPath()||a&&`/${a}`,c=i.getMetaModel(),l={$$groupId:"$auto.Heroes",$$updateGroupId:"$auto",$$patchWithoutSideEffects:true};const g=c.getObject(`${s}@com.sap.vocabularies.Common.v1.DraftRoot`);const p=c.getObject(`${s}@com.sap.vocabularies.Common.v1.DraftNode`);const u=this._oAppComponent.getRootViewController();if(u.isFclEnabled()){const t=this._getKeepAliveContext(i,n,false,l);if(!t){throw new Error(`Cannot create keepAlive context ${n}`)}else if(g||p){if(t.getProperty("IsActiveEntity")===undefined){t.requestProperty(["HasActiveEntity","HasDraftEntity","IsActiveEntity"]);if(g){t.requestObject("DraftAdministrativeData")}}else{t.requestSideEffects(g?["HasActiveEntity","HasDraftEntity","IsActiveEntity","DraftAdministrativeData"]:["HasActiveEntity","HasDraftEntity","IsActiveEntity"])}}return t}else{if(a){const t=c.getObject(`${s}/@com.sap.vocabularies.Common.v1.Messages/$Path`);if(t){l.$select=t}}if(g||p){if(l.$select===undefined){l.$select="HasActiveEntity,HasDraftEntity,IsActiveEntity"}else{l.$select+=",HasActiveEntity,HasDraftEntity,IsActiveEntity"}}if(this._oView.getBindingContext()){var h;const e=(h=this._oView.getBindingContext())===null||h===void 0?void 0:h.getBinding();e===null||e===void 0?void 0:e.resetChanges().then(()=>{e.destroy()}).catch(e=>{t.error("Error while reseting the changes to the binding",e)})}const e=i.bindContext(n,undefined,l);e.attachEventOnce("dataRequested",()=>{o.lock(this._oView)});e.attachEventOnce("dataReceived",this.onDataReceived.bind(this));return e.getBoundContext()}};h.onDataReceived=async function e(n){const i=n&&n.getParameter("error");if(o.isLocked(this._oView)){o.unlock(this._oView)}if(i){try{const t=await p.getLibraryResourceBundle("sap.fe.core",true);const e=this.base.messageHandler;let o={};if(i.status===503){o={isInitialLoad503Error:true,shellBack:true}}else if(i.status===400){o={title:t.getText("C_COMMON_SAPFE_ERROR"),description:t.getText("C_COMMON_SAPFE_DATA_RECEIVED_ERROR_DESCRIPTION"),isDataReceivedError:true,shellBack:true}}else{o={title:t.getText("C_COMMON_SAPFE_ERROR"),description:i,isDataReceivedError:true,shellBack:true}}await e.showMessages(o)}catch(e){t.error("Error while getting the core resource bundle",e)}}};h._refreshBindingContext=function t(e){const o=this._oPageComponent;const n=this._oAppComponent.getSideEffectsService();const i=e.getPath();const r=o&&o.getEntitySet&&o.getEntitySet();const a=o&&o.getContextPath&&o.getContextPath()||r&&`/${r}`;const s=this._oView.getModel().getMetaModel();let c;const l=[];const g=[];const p={targetProperties:[],targetEntities:[]};function u(t){let e;const o=(t.getContext()&&t.getContext().getPath()||"").replace(i,"");const n=(o?`${o.slice(1)}/`:o)+t.getPath();if(t.isA("sap.ui.model.odata.v4.ODataContextBinding")){e=t.getDependentBindings();if(e){for(let t=0;t<e.length;t++){u(e[t])}}else if(l.indexOf(n)===-1){l.push(n)}}else if(t.isA("sap.ui.model.odata.v4.ODataListBinding")){if(l.indexOf(n)===-1){l.push(n)}}else if(t.isA("sap.ui.model.odata.v4.ODataPropertyBinding")){if(g.indexOf(n)===-1){g.push(n)}}}if(a){c=s.getObject(`${a}/@com.sap.vocabularies.Common.v1.Messages/$Path`)}u(e.getBinding());let h;for(h=0;h<l.length;h++){p.targetEntities.push({$NavigationPropertyPath:l[h]})}p.targetProperties=g;if(c){p.targetProperties.push(c)}p.targetProperties=p.targetProperties.reduce((t,e)=>{if(e){const o=e.indexOf("/");t.push(o>0?e.slice(0,o):e)}return t},[]);n.requestSideEffects([...p.targetEntities,...p.targetProperties],e)};h._getBindingContext=function t(){if(this._oPageComponent){return this._oPageComponent.getBindingContext()}else{return this._oView.getBindingContext()}};h._setBindingContext=function t(e){var o;let n,i;if(this._oPageComponent){n=this._oPageComponent.getBindingContext();i=this._oPageComponent}else{n=this._oView.getBindingContext();i=this._oView}i.setBindingContext(e);if((o=n)!==null&&o!==void 0&&o.isKeepAlive()&&n!==e){this._setKeepAlive(n,false)}};h._getFCLLevel=function t(){return this._oTargetInformation.FCLLevel};h._setKeepAlive=function t(e,o,n,i){if(e.getPath().endsWith(")")){const t=e.getModel().getMetaModel();const r=t.getMetaPath(e.getPath());const a=t.getObject(`${r}/@com.sap.vocabularies.Common.v1.Messages/$Path`);e.setKeepAlive(o,n,!!a&&i)}};h._getKeepAliveContext=function t(e,o,n,i){const r=o.split("/");const a=[];while(r.length&&!r[r.length-1].endsWith(")")){a.push(r.pop())}if(r.length===0){return undefined}const s=r.join("/");const c=e.getKeepAliveContext(s,n,i);if(a.length===0){return c}else{a.reverse();const t=a.join("/");return e.bindContext(t,c).getBoundContext()}};h.switchFullScreen=function e(){const o=this.base.getView();const n=o.getModel("fclhelper"),i=n.getProperty("/actionButtonsInfo/isFullScreen"),r=n.getProperty(i?"/actionButtonsInfo/exitFullScreen":"/actionButtonsInfo/fullScreen"),a=this._oAppComponent.getRootViewController();const s=a.getRightmostContext?a.getRightmostContext():o.getBindingContext();this.base._routing.navigateToContext(s,{sLayout:r}).catch(function(){t.warning("cannot switch between column and fullscreen")})};h.closeColumn=function t(){const e=this._oView.getViewData();const o=this._oView.getBindingContext();const n=o.getModel().getMetaModel();const r={noPreservationCache:true,sLayout:this._oView.getModel("fclhelper").getProperty("/actionButtonsInfo/closeColumn")};if((e===null||e===void 0?void 0:e.viewLevel)===1&&c.isDraftSupported(n,o.getPath())){i.processDataLossOrDraftDiscardConfirmation(()=>{this.navigateBackFromContext(o,r)},Function.prototype,o,this._oView.getController(),false,i.NavigationType.BackNavigation)}else{this.navigateBackFromContext(o,r)}};return u}(u),et(W.prototype,"onExit",[C],Object.getOwnPropertyDescriptor(W.prototype,"onExit"),W.prototype),et(W.prototype,"onInit",[y],Object.getOwnPropertyDescriptor(W.prototype,"onInit"),W.prototype),et(W.prototype,"onRouteMatched",[P,_],Object.getOwnPropertyDescriptor(W.prototype,"onRouteMatched"),W.prototype),et(W.prototype,"onRouteMatchedFinished",[m,x],Object.getOwnPropertyDescriptor(W.prototype,"onRouteMatchedFinished"),W.prototype),et(W.prototype,"onBeforeBinding",[b,w],Object.getOwnPropertyDescriptor(W.prototype,"onBeforeBinding"),W.prototype),et(W.prototype,"onAfterBinding",[O,B],Object.getOwnPropertyDescriptor(W.prototype,"onAfterBinding"),W.prototype),et(W.prototype,"navigateToTarget",[R],Object.getOwnPropertyDescriptor(W.prototype,"navigateToTarget"),W.prototype),et(W.prototype,"navigateToRoute",[E],Object.getOwnPropertyDescriptor(W.prototype,"navigateToRoute"),W.prototype),et(W.prototype,"navigateToContext",[A,D],Object.getOwnPropertyDescriptor(W.prototype,"navigateToContext"),W.prototype),et(W.prototype,"navigateBackFromContext",[S,T],Object.getOwnPropertyDescriptor(W.prototype,"navigateBackFromContext"),W.prototype),et(W.prototype,"navigateForwardToContext",[M,F],Object.getOwnPropertyDescriptor(W.prototype,"navigateForwardToContext"),W.prototype),et(W.prototype,"navigateBackFromTransientState",[I,V],Object.getOwnPropertyDescriptor(W.prototype,"navigateBackFromTransientState"),W.prototype),et(W.prototype,"navigateToMessagePage",[$,L],Object.getOwnPropertyDescriptor(W.prototype,"navigateToMessagePage"),W.prototype),et(W.prototype,"isCurrentStateImpactedBy",[j,H],Object.getOwnPropertyDescriptor(W.prototype,"isCurrentStateImpactedBy"),W.prototype),et(W.prototype,"onDataReceived",[k],Object.getOwnPropertyDescriptor(W.prototype,"onDataReceived"),W.prototype),et(W.prototype,"switchFullScreen",[N,K],Object.getOwnPropertyDescriptor(W.prototype,"switchFullScreen"),W.prototype),et(W.prototype,"closeColumn",[q,z],Object.getOwnPropertyDescriptor(W.prototype,"closeColumn"),W.prototype),W))||U);return ot},false);
|
|
146
146
|
/*!
|
|
147
147
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
148
148
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
@@ -237,7 +237,7 @@ sap.ui.predefine("sap/fe/core/controllerextensions/editFlow/NotApplicableContext
|
|
|
237
237
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
238
238
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
239
239
|
*/
|
|
240
|
-
sap.ui.predefine("sap/fe/core/controllerextensions/editFlow/TransactionHelper", ["sap/base/Log","sap/fe/core/ActionRuntime","sap/fe/core/CommonUtils","sap/fe/core/controllerextensions/BusyLocker","sap/fe/core/controllerextensions/editFlow/draft","sap/fe/core/controllerextensions/editFlow/operations","sap/fe/core/controllerextensions/editFlow/sticky","sap/fe/core/controllerextensions/messageHandler/messageHandling","sap/fe/core/helpers/DeleteHelper","sap/fe/core/helpers/FPMHelper","sap/fe/core/helpers/ModelHelper","sap/fe/core/helpers/ResourceModelHelper","sap/fe/core/helpers/StableIdHelper","sap/fe/core/library","sap/m/Button","sap/m/Dialog","sap/m/MessageBox","sap/m/MessageToast","sap/m/Popover","sap/m/Text","sap/m/VBox","sap/ui/core/Core","sap/ui/core/Fragment","sap/ui/core/library","sap/ui/core/util/XMLPreprocessor","sap/ui/core/XMLTemplateProcessor","sap/ui/model/json/JSONModel","../../helpers/MetaModelFunction","../../helpers/ToES6Promise"],function(e,t,n,o,a,s,r,i,c,l,d,u,g,f,p,C,m,h,b,y,E,w,A,D,x,M,P,T,v){"use strict";var O=T.getRequiredPropertiesFromInsertRestrictions;var _=T.getNonComputedVisibleFields;var I=g.generate;var S=u.getResourceModel;const N=f.CreationMode;const R=f.ProgrammingModel;const B=c.DeleteOptionTypes;const k=c.DeleteDialogContentControl;function L(e){if(e&&e.getMetadata&&e.getMetadata().getName()==="sap.ui.base.Event"){e={}}return e||{}}let F=function(){function u(){}var g=u.prototype;g.busyLock=function e(t,n){o.lock(t.getModel("ui"),n)};g.busyUnlock=function e(t,n){o.unlock(t.getModel("ui"),n)};g.getProgrammingModel=function e(t){let n;if(t.isA("sap.ui.model.odata.v4.Context")){n=t.getPath()}else{n=(t.isRelative()?t.getResolvedPath():t.getPath())??""}const o=t.getModel().getMetaModel();if(d.isDraftSupported(o,n)){return R.Draft}else if(d.isStickySessionSupported(o)){return R.Sticky}else{return R.NonDraft}};g.validateDocument=function e(t,n,o){const a=n&&n.customValidationFunction;if(a){const e=a.substring(0,a.lastIndexOf(".")||-1).replace(/\./gi,"/"),s=a.substring(a.lastIndexOf(".")+1,a.length),r=n.data;delete r["@$ui5.context.isTransient"];return l.validationWrapper(e,s,r,o,t)}return Promise.resolve([])};g.createDocument=async function t(n,o,a,r,i){const c=n.getModel(),l=c.getMetaModel(),u=l.getMetaPath(n.getHeaderContext().getPath()),g=a.getRouterProxy().getHash(),p=a.getComponentData(),C=p&&p.startupParameters||{},m=!n.isRelative()?this._getNewAction(C,g,l,u):undefined;const h={$$patchWithoutSideEffects:true};const b=l.getObject(`${u}/@com.sap.vocabularies.Common.v1.Messages/$Path`);let y="/busy";let E=l.getObject(`${u}@com.sap.vocabularies.Common.v1.DefaultValuesFunction`)||l.getObject(`${d.getTargetEntitySet(l.getContext(u))}@com.sap.vocabularies.Common.v1.DefaultValuesFunction`);let A;let D;if(E){if(l.getObject(`${u}@com.sap.vocabularies.Common.v1.DefaultValuesFunction`)&&d.getTargetEntitySet(l.getContext(u))!==u){A=true}else{A=false}}if(b){h["$select"]=b}const x=L(o);if(!n){throw new Error("Binding required for new document creation")}const M=this.getProgrammingModel(n);if(M!==R.Draft&&M!==R.Sticky){throw new Error("Create document only allowed for draft or sticky session supported services")}if(x.busyMode==="Local"){y=`/busyLocal/${x.busyId}`}x.beforeCreateCallBack=i?null:x.beforeCreateCallBack;this.busyLock(a,y);const P=w.getLibraryResourceBundle("sap.fe.core");let T;try{if(m){T=await this.callAction(m,{contexts:n.getHeaderContext(),showActionParameterDialog:true,label:this._getSpecificCreateActionDialogLabel(l,u,m,P),bindingParameters:h,parentControl:x.parentControl,bIsCreateAction:true,skipParameterDialog:x.skipParameterDialog},null,a,r)}else{const t=x.creationMode!==N.CreationRow&&x.creationMode!==N.Inline;const o=t?_(l,u,a):[];E=i?null:E;let d,g;if(E){if(A){d=n.getContext()&&`${l.getMetaPath(n.getContext().getPath())}/${E}`;g=n.getContext()}else{d=n.getHeaderContext()&&`${l.getMetaPath(n.getHeaderContext().getPath())}/${E}`;g=n.getHeaderContext()}}const f=d&&l.createBindingContext(d);try{let t;try{const e=f&&f.getObject()&&f.getObject()[0].$IsBound?await s.callBoundFunction(E,g,c):await s.callFunctionImport(E,c);if(e){t=e.getObject()}}catch(t){e.error(`Error while executing the function ${E}`,t);throw t}x.data=t?Object.assign({},t,x.data):x.data;if(x.data){delete x.data["@odata.context"]}if(o.length>0){T=await this._launchDialogWithKeyFields(n,o,c,x,a,r);D=T.newContext}else{if(x.beforeCreateCallBack){await v(x.beforeCreateCallBack({contextPath:n&&n.getPath()}))}D=n.create(x.data,true,x.createAtEnd,x.inactive);if(!x.inactive){T=await this.onAfterCreateCompletion(n,D,x)}}}catch(t){e.error("Error while creating the new document",t);throw t}}D=D||T;await r.showMessageDialog({control:x.parentControl});return D}catch(e){var O;await r.showMessageDialog({control:x.parentControl});if((e===f.Constants.ActionExecutionFailed||e===f.Constants.CancelActionDialog)&&(O=D)!==null&&O!==void 0&&O.isTransient()){D.delete("$direct")}throw e}finally{this.busyUnlock(a,y)}};g._isDraftEnabled=function e(t){const n=t[0];const o=this.getProgrammingModel(n);return o===R.Draft};g.deleteDocument=function e(t,n,o,a,s){const r=w.getLibraryResourceBundle("sap.fe.core");let l;this.busyLock(o);const d=Array.isArray(t)?[...t]:[t];return new Promise((e,t)=>{try{const u=this._isDraftEnabled(n.selectedContexts||d);const g=[];let f=[];if(n){if(!n.numberOfSelectedContexts){if(u){const e=d.find(e=>{const t=e.getObject();return t.IsActiveEntity===true&&t.HasDraftEntity===true&&t.DraftAdministrativeData&&t.DraftAdministrativeData.InProcessByUser&&!t.DraftAdministrativeData.DraftIsCreatedByMe});if(e){const n=e.getObject().DraftAdministrativeData.InProcessByUser;m.show(a.getText("C_TRANSACTION_HELPER_CONFIRM_DELETE_WITH_SINGLE_OBJECT_LOCKED",[n]),{title:a.getText("C_COMMON_DELETE"),onClose:t});return}}n=L(n);let e="";if(n.title){if(n.description){l=[n.title+" ",n.description]}else{l=[n.title,""]}e=a.getText("C_TRANSACTION_HELPER_CONFIRM_DELETE_WITH_OBJECTINFO",l,n.entitySetName)}else{e=a.getText("C_TRANSACTION_HELPER_CONFIRM_DELETE_WITH_OBJECTTITLE_SINGULAR",undefined,n.entitySetName)}f.push({type:B.deletableContexts,contexts:d,text:e,selected:true,control:k.TEXT})}else{let e=d.length;if(u){e+=n.draftsWithNonDeletableActive.length+n.draftsWithDeletableActive.length+n.unSavedContexts.length;c.updateDraftOptionsForDeletableTexts(n,d,e,a,g,f)}else{const t=c.getNonDeletableText(n,e,a);if(t){g.push(t)}}const t=c.getOptionsForDeletableTexts(n,d,a);f=[...f,...t]}}c.updateContentForDeleteDialog(f,g);const h=new E({items:g});const b=r.getText("C_COMMON_DELETE");const y=async()=>{this.busyLock(o);try{await c.deleteConfirmHandler(f,n,s,a,o,u);e()}catch(e){t()}finally{this.busyUnlock(o)}};let w=false;const A=new C({title:b,state:"Warning",content:[h],ariaLabelledBy:g,beginButton:new p({text:r.getText("C_COMMON_DELETE"),type:"Emphasized",press:function(){i.removeBoundTransitionMessages();w=true;A.close();y()}}),endButton:new p({text:a.getText("C_COMMON_DIALOG_CANCEL"),press:function(){A.close()}}),afterClose:function(){A.destroy();if(!w){t()}}});if(n.noDialog){y()}else{A.addStyleClass("sapUiContentPadding");A.open()}}finally{this.busyUnlock(o)}})};g.editDocument=async function e(t,n,o,s){const i=this.getProgrammingModel(t);if(!t){throw new Error("Binding context to active document is required")}if(i!==R.Draft&&i!==R.Sticky){throw new Error("Edit is only allowed for draft or sticky session supported services")}this.busyLock(o);s.removeTransitionMessages();try{const e=i===R.Draft?await a.createDraftFromActiveDocument(t,o,{bPreserveChanges:true,oView:n}):await r.editDocumentInStickySession(t,o);await s.showMessageDialog();return e}catch(e){await s.showMessages({concurrentEditFlag:true});throw e}finally{this.busyUnlock(o)}};g.cancelDocument=async function e(t,n,o,s,i,c,l){if(!t){throw new Error("No context exists. Pass a meaningful context")}this.busyLock(o);const d=L(n);const u=t.getModel();const g=this.getProgrammingModel(t);if(g!==R.Draft&&g!==R.Sticky){throw new Error("Cancel document only allowed for draft or sticky session supported services")}try{let e=false;if(g===R.Draft&&!l){const e=u.bindContext(`${t.getPath()}/DraftAdministrativeData`).getBoundContext();const n=await e.requestObject();if(n){l=n.CreationDateTime!==n.LastChangeDateTime}}if(!d.skipDiscardPopover){await this._confirmDiscard(d.cancelButton,l,s)}if(t.isKeepAlive()){t.setKeepAlive(true,undefined)}if(d.beforeCancelCallBack){await d.beforeCancelCallBack({context:t})}if(g===R.Draft){if(c){if(t.hasPendingChanges()){t.getBinding().resetChanges()}e=await a.deleteDraft(t,o)}else{const n=u.bindContext(`${t.getPath()}/SiblingEntity`).getBoundContext();try{const o=await n.requestCanonicalPath();if(t.hasPendingChanges()){t.getBinding().resetChanges()}e=u.bindContext(o).getBoundContext()}finally{await a.deleteDraft(t,o)}}}else{const n=await r.discardDocument(t);if(n){if(n.hasPendingChanges()){n.getBinding().resetChanges()}if(!c){n.refresh();e=n}}}i.removeTransitionMessages();await i.showMessages();return e}catch(e){await i.showMessages();throw e}finally{this.busyUnlock(o)}};g.saveDocument=async function e(t,o,s,c,l,d,u){const g=this.getProgrammingModel(t);if(g!==R.Sticky&&g!==R.Draft){throw new Error("Save is only allowed for draft or sticky session supported services")}d.removeTransitionMessages();try{this.busyLock(o);const e=g===R.Draft?await a.activateDocument(t,o,{},d):await r.activateDocument(t,o);const n=i.getMessages().concat(i.getMessages(true,true));if(!(n.length===1&&n[0].type===D.MessageType.Success)){h.show(u?s.getText("C_TRANSACTION_HELPER_OBJECT_CREATED"):s.getText("C_TRANSACTION_HELPER_OBJECT_SAVED"))}return e}catch(e){if(c&&(l===null||l===void 0?void 0:l.length)>0){l.forEach(e=>{if(!n.hasTransientContext(e)){o.getSideEffectsService().requestSideEffectsForNavigationProperty(e.getPath(),t)}})}await d.showMessages();throw e}finally{this.busyUnlock(o)}};g.callAction=async function e(t,n,o,a,r){n=L(n);let i,c;const l=n.bindingParameters;if(!t){throw new Error("Provide name of action to be executed")}const d=t.split("/")[1];t=d||t;i=d?undefined:n.contexts;if(i&&(Array.isArray(i)&&i.length||!Array.isArray(i))){i=Array.isArray(i)?i[0]:i;c=i.getModel()}if(n.model){c=n.model}if(!c){throw new Error("Pass a context for a bound action or pass the model for an unbound action")}const u=a.getSideEffectsService().getODataActionSideEffects(t,i)||{};try{let e;if(i&&c){e=await s.callBoundAction(t,n.contexts,c,a,{parameterValues:n.parameterValues,invocationGrouping:n.invocationGrouping,label:n.label,skipParameterDialog:n.skipParameterDialog,mBindingParameters:l,entitySetName:n.entitySetName,additionalSideEffect:u,onSubmitted:()=>{r.removeTransitionMessages();this.busyLock(a)},onResponse:()=>{this.busyUnlock(a)},parentControl:n.parentControl,controlId:n.controlId,internalModelContext:n.internalModelContext,operationAvailableMap:n.operationAvailableMap,bIsCreateAction:n.bIsCreateAction,bGetBoundContext:n.bGetBoundContext,bObjectPage:n.bObjectPage,messageHandler:r,defaultValuesExtensionFunction:n.defaultValuesExtensionFunction,selectedItems:n.contexts})}else{e=await s.callActionImport(t,c,a,{parameterValues:n.parameterValues,label:n.label,skipParameterDialog:n.skipParameterDialog,bindingParameters:l,entitySetName:n.entitySetName,onSubmitted:()=>{this.busyLock(a)},onResponse:()=>{this.busyUnlock(a)},parentControl:n.parentControl,internalModelContext:n.internalModelContext,operationAvailableMap:n.operationAvailableMap,messageHandler:r,bObjectPage:n.bObjectPage})}await this._handleActionResponse(r,n,t);return e}catch(e){await this._handleActionResponse(r,n,t);throw e}};g._handleActionResponse=function e(t,n,o){const a=i.getMessages(true,true);const s=n.label?n.label:o;if(a.length>0&&n&&n.internalModelContext){n.internalModelContext.setProperty("sActionName",n.label?n.label:o)}let r;if(n.controlId){r=n.parentControl.byId(n.controlId)}else{r=n.parentControl}return t.showMessages({sActionName:s,control:r})};g.handleValidationError=function e(){const t=w.getMessageManager(),n=t.getMessageModel().getData().filter(function(e){if(e.validation){return e}});t.removeMessages(n)};g._createPopover=function e(t){return new b(t)};g._confirmDiscard=function e(t,n,o){if(!n){this.handleValidationError();return Promise.resolve()}t.setEnabled(false);return new Promise((e,n)=>{const a=this._createPopover({showHeader:false,placement:"Top"});a.addStyleClass("sapUiContentPadding");const s=new y({text:o.getText("C_TRANSACTION_HELPER_DRAFT_DISCARD_MESSAGE")});const r=new p({text:o.getText("C_TRANSACTION_HELPER_DRAFT_DISCARD_BUTTON"),width:"100%",press:()=>{this.handleValidationError();a.data("continueDiscard",true);a.close()},ariaLabelledBy:[s]});a.addContent(new E({items:[s,r]}));a.attachBeforeOpen(()=>{a.setInitialFocus(r)});a.attachAfterClose(()=>{t.setEnabled(true);if(a.data("continueDiscard")){e()}else{n()}});a.openBy(t,false)})};g._launchDialogWithKeyFields=function e(a,s,r,i,c,l){let d;const u=i.parentControl;const g=r.bindList(a.getPath(),a.getContext(),[],[],{$$updateGroupId:"submitLater"});g.refreshInternal=function(){};const p=g.create(i.data,true);return new Promise(async(e,m)=>{const h="sap/fe/core/controls/NonComputedVisibleKeyFieldsDialog";const b=M.loadTemplate(h,"fragment"),y=S(u),E=r.getMetaModel(),D=[],T=a.isRelative()?a.getResolvedPath():a.getPath(),_=E.createBindingContext(T),N=E.getMetaPath(T);for(const e in s){D.push(E.createBindingContext(`${N}/${s[e]}`))}const R=new P(D);const B=R.createBindingContext("/");const k=O(N,E);const L=new P(k);const F=L.createBindingContext("/");const H=await x.process(b,{name:h},{bindingContexts:{entitySet:_,fields:B,requiredProperties:F},models:{entitySet:_.getModel(),fields:B.getModel(),metaModel:E,requiredProperties:L}});let $=[];const U={};const j=w.getMessageManager();const V=e=>{const t=j.getMessageModel().getData();const n=t.filter(t=>t.getControlIds().some(t=>t.includes(e)));j.removeMessages(n)};const W={handleChange:async e=>{const t=e.getParameter("id");const n=e.getSource();const o=J.find(e=>e.field===n);V(t);o.validationPromise=e.getParameter("promise");try{o.value=await o.validationPromise;o.hasError=false}catch(e){delete o.value;o.hasError=true}},handleLiveChange:e=>{const t=e.getParameter("id");V(t)}};const G=await A.load({definition:H,controller:W});let q;const K=function(){if(q.error){m(q.error)}else{e(q.response)}d.close()};d=new C(I(["CreateDialog",N]),{title:y.getText("C_TRANSACTION_HELPER_SAPFE_ACTION_CREATE"),content:[G],beginButton:{text:y.getText("C_TRANSACTION_HELPER_SAPFE_ACTION_CREATE_BUTTON"),type:"Emphasized",press:async e=>{if(!await t.validateProperties(j,J,y)){return}o.lock(d);i.bIsCreateDialog=true;try{const e=await Promise.all(Object.keys(U).map(async function(e){const t=await U[e];const n={};n[e]=t;return n}));if(i.beforeCreateCallBack){await v(i.beforeCreateCallBack({contextPath:a&&a.getPath(),createParameters:e}))}const t=p.getObject();const n={};Object.keys(t).forEach(function(e){const o=E.getObject(`${N}/${e}`);if(o&&o.$kind==="NavigationProperty"){return}n[e]=t[e]});const o=a.create(n,true,i.createAtEnd,i.inactive);const s=this.onAfterCreateCompletion(a,o,i);let r=await s;if(!r||r&&r.bKeepDialogOpen!==true){r=r??{};d.setBindingContext(null);r.newContext=o;q={response:r};K()}}catch(e){if(e!==f.Constants.CreationFailed){q={error:e};K()}}finally{o.unlock(d);l.showMessages()}}},endButton:{text:y.getText("C_COMMON_ACTION_PARAMETER_DIALOG_CANCEL"),press:function(){q={error:f.Constants.CancelActionDialog};K()}},afterClose:function(){var e;for(const e of J){const t=e.field.getId();V(t)}(e=d.getBindingContext("internal"))===null||e===void 0?void 0:e.setProperty("isCreateDialogOpen",false);d.destroy();g.destroy()}});$=G===null||G===void 0?void 0:G.getAggregation("form").getAggregation("formContainers")[0].getAggregation("formElements");const J=$.map(e=>{const t=e.getFields()[0];const n=t.isA("sap.ui.mdc.MultiValueField");return{parameter:e,isMultiValue:n,field:t,value:n?t.getItems():t.getValue(),validationPromise:undefined,hasError:false}});if(u&&u.addDependent){u.addDependent(d)}d.setBindingContext(p);try{await n.setUserDefaults(c,D,p,false,i.createAction,i.data);d.getBindingContext("internal").setProperty("isCreateDialogOpen",true);d.open()}catch(e){await l.showMessages();throw e}})};g.onAfterCreateCompletion=function t(n,o,a){let s;const r=new Promise(e=>{s=e});const i=e=>{const t=e.getParameter("context"),a=e.getParameter("success");if(t===o){n.detachCreateCompleted(i,this);s(a)}};const c=()=>{o.created().then(undefined,function(){e.trace("transient creation context deleted")}).catch(function(t){e.trace("transient creation context deletion error",t)})};n.attachCreateCompleted(i,this);return r.then(e=>{if(!e){if(!a.keepTransientContextOnFailed){c();n.resetChanges();n.getModel().resetChanges(n.getUpdateGroupId());throw f.Constants.CreationFailed}return{bKeepDialogOpen:true}}else{return o.created()}})};g._getNewAction=function e(t,n,o,a){let s;if(t&&t.preferredMode&&n.toUpperCase().indexOf("I-ACTION=CREATEWITH")>-1){const e=t.preferredMode[0];s=e.toUpperCase().indexOf("CREATEWITH:")>-1?e.substr(e.lastIndexOf(":")+1):undefined}else if(t&&t.preferredMode&&n.toUpperCase().indexOf("I-ACTION=AUTOCREATEWITH")>-1){const e=t.preferredMode[0];s=e.toUpperCase().indexOf("AUTOCREATEWITH:")>-1?e.substr(e.lastIndexOf(":")+1):undefined}else{s=o&&o.getObject!==undefined?o.getObject(`${a}@com.sap.vocabularies.Session.v1.StickySessionSupported/NewAction`)||o.getObject(`${a}@com.sap.vocabularies.Common.v1.DraftRoot/NewAction`):undefined}return s};g._getSpecificCreateActionDialogLabel=function e(t,n,o,a){const s=function(){if(t&&t.getObject(`${n}/@com.sap.vocabularies.UI.v1.LineItem`)){const e=t.getObject(`${n}/@com.sap.vocabularies.UI.v1.LineItem`).findIndex(function(e){const t=e.Action?e.Action.split("("):undefined;return t?t[0]===o:false});return e>-1?t.getObject(`${n}/@com.sap.vocabularies.UI.v1.LineItem`)[e].Label:undefined}else{return undefined}};return s()||t&&t.getObject(`${n}/${o}@com.sap.vocabularies.Common.v1.Label`)||a&&a.getText("C_TRANSACTION_HELPER_SAPFE_ACTION_CREATE")};return u}();const H=new F;return H},false);
|
|
240
|
+
sap.ui.predefine("sap/fe/core/controllerextensions/editFlow/TransactionHelper", ["sap/base/Log","sap/fe/core/ActionRuntime","sap/fe/core/CommonUtils","sap/fe/core/controllerextensions/BusyLocker","sap/fe/core/controllerextensions/editFlow/draft","sap/fe/core/controllerextensions/editFlow/operations","sap/fe/core/controllerextensions/editFlow/sticky","sap/fe/core/controllerextensions/messageHandler/messageHandling","sap/fe/core/helpers/DeleteHelper","sap/fe/core/helpers/FPMHelper","sap/fe/core/helpers/ModelHelper","sap/fe/core/helpers/ResourceModelHelper","sap/fe/core/helpers/StableIdHelper","sap/fe/core/library","sap/m/Button","sap/m/Dialog","sap/m/MessageBox","sap/m/MessageToast","sap/m/Popover","sap/m/Text","sap/m/VBox","sap/ui/core/Core","sap/ui/core/Fragment","sap/ui/core/library","sap/ui/core/util/XMLPreprocessor","sap/ui/core/XMLTemplateProcessor","sap/ui/model/json/JSONModel","../../helpers/MetaModelFunction","../../helpers/ToES6Promise"],function(e,t,n,o,a,r,s,i,c,l,d,u,g,f,p,C,h,m,b,y,E,w,A,D,x,M,P,T,v){"use strict";var O=T.getRequiredPropertiesFromInsertRestrictions;var _=T.getNonComputedVisibleFields;var I=g.generate;var S=u.getResourceModel;const N=f.CreationMode;const R=f.ProgrammingModel;const B=c.DeleteOptionTypes;const k=c.DeleteDialogContentControl;function L(e){if(e&&e.getMetadata&&e.getMetadata().getName()==="sap.ui.base.Event"){e={}}return e||{}}let F=function(){function u(){}var g=u.prototype;g.busyLock=function e(t,n){o.lock(t.getModel("ui"),n)};g.busyUnlock=function e(t,n){o.unlock(t.getModel("ui"),n)};g.getProgrammingModel=function e(t){let n;if(t.isA("sap.ui.model.odata.v4.Context")){n=t.getPath()}else{n=(t.isRelative()?t.getResolvedPath():t.getPath())??""}const o=t.getModel().getMetaModel();if(d.isDraftSupported(o,n)){return R.Draft}else if(d.isStickySessionSupported(o)){return R.Sticky}else{return R.NonDraft}};g.validateDocument=function e(t,n,o){const a=n&&n.customValidationFunction;if(a){const e=a.substring(0,a.lastIndexOf(".")||-1).replace(/\./gi,"/"),r=a.substring(a.lastIndexOf(".")+1,a.length),s=n.data;delete s["@$ui5.context.isTransient"];return l.validationWrapper(e,r,s,o,t)}return Promise.resolve([])};g.createDocument=async function t(n,o,a,s,i){const c=n.getModel(),l=c.getMetaModel(),u=l.getMetaPath(n.getHeaderContext().getPath()),g=a.getRouterProxy().getHash(),p=a.getComponentData(),C=p&&p.startupParameters||{},h=!n.isRelative()?this._getNewAction(C,g,l,u):undefined;const m={$$patchWithoutSideEffects:true};const b=l.getObject(`${u}/@com.sap.vocabularies.Common.v1.Messages/$Path`);let y="/busy";let E=l.getObject(`${u}@com.sap.vocabularies.Common.v1.DefaultValuesFunction`)||l.getObject(`${d.getTargetEntitySet(l.getContext(u))}@com.sap.vocabularies.Common.v1.DefaultValuesFunction`);let A;let D;if(E){if(l.getObject(`${u}@com.sap.vocabularies.Common.v1.DefaultValuesFunction`)&&d.getTargetEntitySet(l.getContext(u))!==u){A=true}else{A=false}}if(b){m["$select"]=b}const x=L(o);if(!n){throw new Error("Binding required for new document creation")}const M=this.getProgrammingModel(n);if(M!==R.Draft&&M!==R.Sticky){throw new Error("Create document only allowed for draft or sticky session supported services")}if(x.busyMode==="Local"){y=`/busyLocal/${x.busyId}`}x.beforeCreateCallBack=i?null:x.beforeCreateCallBack;this.busyLock(a,y);const P=w.getLibraryResourceBundle("sap.fe.core");let T;try{if(h){T=await this.callAction(h,{contexts:n.getHeaderContext(),showActionParameterDialog:true,label:this._getSpecificCreateActionDialogLabel(l,u,h,P),bindingParameters:m,parentControl:x.parentControl,bIsCreateAction:true,skipParameterDialog:x.skipParameterDialog},null,a,s)}else{const t=x.creationMode!==N.CreationRow&&x.creationMode!==N.Inline;const o=t?_(l,u,a):[];E=i?null:E;let d,g;if(E){if(A){d=n.getContext()&&`${l.getMetaPath(n.getContext().getPath())}/${E}`;g=n.getContext()}else{d=n.getHeaderContext()&&`${l.getMetaPath(n.getHeaderContext().getPath())}/${E}`;g=n.getHeaderContext()}}const f=d&&l.createBindingContext(d);try{let t;try{const e=f&&f.getObject()&&f.getObject()[0].$IsBound?await r.callBoundFunction(E,g,c):await r.callFunctionImport(E,c);if(e){t=e.getObject()}}catch(t){e.error(`Error while executing the function ${E}`,t);throw t}x.data=t?Object.assign({},t,x.data):x.data;if(x.data){delete x.data["@odata.context"]}if(o.length>0){T=await this._launchDialogWithKeyFields(n,o,c,x,a,s);D=T.newContext}else{if(x.beforeCreateCallBack){await v(x.beforeCreateCallBack({contextPath:n&&n.getPath()}))}D=n.create(x.data,true,x.createAtEnd,x.inactive);if(!x.inactive){T=await this.onAfterCreateCompletion(n,D,x)}}}catch(t){e.error("Error while creating the new document",t);throw t}}D=D||T;await s.showMessageDialog({control:x.parentControl});return D}catch(e){var O;await s.showMessageDialog({control:x.parentControl});if((e===f.Constants.ActionExecutionFailed||e===f.Constants.CancelActionDialog)&&(O=D)!==null&&O!==void 0&&O.isTransient()){D.delete("$direct")}throw e}finally{this.busyUnlock(a,y)}};g._isDraftEnabled=function e(t){const n=t[0];const o=this.getProgrammingModel(n);return o===R.Draft};g.deleteDocument=function e(t,n,o,a,r){const s=w.getLibraryResourceBundle("sap.fe.core");let l;this.busyLock(o);const d=Array.isArray(t)?[...t]:[t];return new Promise((e,t)=>{try{const u=this._isDraftEnabled(n.selectedContexts||d);const g=[];let f=[];if(n){if(!n.numberOfSelectedContexts){if(u){const e=d.find(e=>{const t=e.getObject();return t.IsActiveEntity===true&&t.HasDraftEntity===true&&t.DraftAdministrativeData&&t.DraftAdministrativeData.InProcessByUser&&!t.DraftAdministrativeData.DraftIsCreatedByMe});if(e){const n=e.getObject().DraftAdministrativeData.InProcessByUser;h.show(a.getText("C_TRANSACTION_HELPER_CONFIRM_DELETE_WITH_SINGLE_OBJECT_LOCKED",[n]),{title:a.getText("C_COMMON_DELETE"),onClose:t});return}}n=L(n);let e="";if(n.title){if(n.description){l=[n.title+" ",n.description]}else{l=[n.title,""]}e=a.getText("C_TRANSACTION_HELPER_CONFIRM_DELETE_WITH_OBJECTINFO",l,n.entitySetName)}else{e=a.getText("C_TRANSACTION_HELPER_CONFIRM_DELETE_WITH_OBJECTTITLE_SINGULAR",undefined,n.entitySetName)}f.push({type:B.deletableContexts,contexts:d,text:e,selected:true,control:k.TEXT})}else{let e=d.length;if(u){e+=n.draftsWithNonDeletableActive.length+n.draftsWithDeletableActive.length+n.unSavedContexts.length;c.updateDraftOptionsForDeletableTexts(n,d,e,a,g,f)}else{const t=c.getNonDeletableText(n,e,a);if(t){g.push(t)}}const t=c.getOptionsForDeletableTexts(n,d,a);f=[...f,...t]}}c.updateContentForDeleteDialog(f,g);const m=new E({items:g});const b=s.getText("C_COMMON_DELETE");const y=async()=>{this.busyLock(o);try{await c.deleteConfirmHandler(f,n,r,a,o,u);e()}catch(e){t()}finally{this.busyUnlock(o)}};let w=false;const A=new C({title:b,state:"Warning",content:[m],ariaLabelledBy:g,beginButton:new p({text:s.getText("C_COMMON_DELETE"),type:"Emphasized",press:function(){i.removeBoundTransitionMessages();w=true;A.close();y()}}),endButton:new p({text:a.getText("C_COMMON_DIALOG_CANCEL"),press:function(){A.close()}}),afterClose:function(){A.destroy();if(!w){t()}}});if(n.noDialog){y()}else{A.addStyleClass("sapUiContentPadding");A.open()}}finally{this.busyUnlock(o)}})};g.editDocument=async function e(t,n,o,r){const i=this.getProgrammingModel(t);if(!t){throw new Error("Binding context to active document is required")}if(i!==R.Draft&&i!==R.Sticky){throw new Error("Edit is only allowed for draft or sticky session supported services")}this.busyLock(o);r.removeTransitionMessages();try{const e=i===R.Draft?await a.createDraftFromActiveDocument(t,o,{bPreserveChanges:true,oView:n}):await s.editDocumentInStickySession(t,o);await r.showMessageDialog();return e}catch(e){await r.showMessages({concurrentEditFlag:true});throw e}finally{this.busyUnlock(o)}};g.cancelDocument=async function e(t,n,o,r,i,c,l){if(!t){throw new Error("No context exists. Pass a meaningful context")}this.busyLock(o);const d=L(n);const u=t.getModel();const g=this.getProgrammingModel(t);if(g!==R.Draft&&g!==R.Sticky){throw new Error("Cancel document only allowed for draft or sticky session supported services")}try{let e=false;if(g===R.Draft&&!l){const e=u.bindContext(`${t.getPath()}/DraftAdministrativeData`).getBoundContext();const n=await e.requestObject();if(n){l=n.CreationDateTime!==n.LastChangeDateTime}}if(!d.skipDiscardPopover){await this._confirmDiscard(d.cancelButton,l,r)}if(t.isKeepAlive()){t.setKeepAlive(true,undefined)}if(d.beforeCancelCallBack){await d.beforeCancelCallBack({context:t})}if(g===R.Draft){if(c){if(t.hasPendingChanges()){t.getBinding().resetChanges()}e=await a.deleteDraft(t,o)}else{const n=u.bindContext(`${t.getPath()}/SiblingEntity`).getBoundContext();try{const o=await n.requestCanonicalPath();if(t.hasPendingChanges()){t.getBinding().resetChanges()}e=u.bindContext(o).getBoundContext()}finally{await a.deleteDraft(t,o)}}}else{const n=await s.discardDocument(t);if(n){if(n.hasPendingChanges()){n.getBinding().resetChanges()}if(!c){n.refresh();e=n}}}i.removeTransitionMessages();await i.showMessages();return e}catch(e){await i.showMessages();throw e}finally{this.busyUnlock(o)}};g.saveDocument=async function e(t,o,r,c,l,d,u){const g=this.getProgrammingModel(t);if(g!==R.Sticky&&g!==R.Draft){throw new Error("Save is only allowed for draft or sticky session supported services")}try{this.busyLock(o);const e=g===R.Draft?await a.activateDocument(t,o,{},d):await s.activateDocument(t,o);const n=i.getMessages().concat(i.getMessages(true,true));if(!(n.length===1&&n[0].type===D.MessageType.Success)){m.show(u?r.getText("C_TRANSACTION_HELPER_OBJECT_CREATED"):r.getText("C_TRANSACTION_HELPER_OBJECT_SAVED"))}return e}catch(e){if(c&&(l===null||l===void 0?void 0:l.length)>0){l.forEach(e=>{if(!n.hasTransientContext(e)){o.getSideEffectsService().requestSideEffectsForNavigationProperty(e.getPath(),t)}})}await d.showMessages();throw e}finally{this.busyUnlock(o)}};g.callAction=async function e(t,n,o,a,s){n=L(n);let i,c;const l=n.bindingParameters;if(!t){throw new Error("Provide name of action to be executed")}const d=t.split("/")[1];t=d||t;i=d?undefined:n.contexts;if(i&&(Array.isArray(i)&&i.length||!Array.isArray(i))){i=Array.isArray(i)?i[0]:i;c=i.getModel()}if(n.model){c=n.model}if(!c){throw new Error("Pass a context for a bound action or pass the model for an unbound action")}const u=a.getSideEffectsService().getODataActionSideEffects(t,i)||{};try{let e;if(i&&c){e=await r.callBoundAction(t,n.contexts,c,a,{parameterValues:n.parameterValues,invocationGrouping:n.invocationGrouping,label:n.label,skipParameterDialog:n.skipParameterDialog,mBindingParameters:l,entitySetName:n.entitySetName,additionalSideEffect:u,onSubmitted:()=>{s.removeTransitionMessages();this.busyLock(a)},onResponse:()=>{this.busyUnlock(a)},parentControl:n.parentControl,controlId:n.controlId,internalModelContext:n.internalModelContext,operationAvailableMap:n.operationAvailableMap,bIsCreateAction:n.bIsCreateAction,bGetBoundContext:n.bGetBoundContext,bObjectPage:n.bObjectPage,messageHandler:s,defaultValuesExtensionFunction:n.defaultValuesExtensionFunction,selectedItems:n.contexts})}else{e=await r.callActionImport(t,c,a,{parameterValues:n.parameterValues,label:n.label,skipParameterDialog:n.skipParameterDialog,bindingParameters:l,entitySetName:n.entitySetName,onSubmitted:()=>{this.busyLock(a)},onResponse:()=>{this.busyUnlock(a)},parentControl:n.parentControl,internalModelContext:n.internalModelContext,operationAvailableMap:n.operationAvailableMap,messageHandler:s,bObjectPage:n.bObjectPage})}await this._handleActionResponse(s,n,t);return e}catch(e){await this._handleActionResponse(s,n,t);throw e}};g._handleActionResponse=function e(t,n,o){const a=i.getMessages(true,true);const r=n.label?n.label:o;if(a.length>0&&n&&n.internalModelContext){n.internalModelContext.setProperty("sActionName",n.label?n.label:o)}let s;if(n.controlId){s=n.parentControl.byId(n.controlId)}else{s=n.parentControl}return t.showMessages({sActionName:r,control:s})};g.handleValidationError=function e(){const t=w.getMessageManager(),n=t.getMessageModel().getData().filter(function(e){if(e.validation){return e}});t.removeMessages(n)};g._createPopover=function e(t){return new b(t)};g._confirmDiscard=function e(t,n,o){if(!n){this.handleValidationError();return Promise.resolve()}t.setEnabled(false);return new Promise((e,n)=>{const a=this._createPopover({showHeader:false,placement:"Top"});a.addStyleClass("sapUiContentPadding");const r=new y({text:o.getText("C_TRANSACTION_HELPER_DRAFT_DISCARD_MESSAGE")});const s=new p({text:o.getText("C_TRANSACTION_HELPER_DRAFT_DISCARD_BUTTON"),width:"100%",press:()=>{this.handleValidationError();a.data("continueDiscard",true);a.close()},ariaLabelledBy:[r]});a.addContent(new E({items:[r,s]}));a.attachBeforeOpen(()=>{a.setInitialFocus(s)});a.attachAfterClose(()=>{t.setEnabled(true);if(a.data("continueDiscard")){e()}else{n()}});a.openBy(t,false)})};g._launchDialogWithKeyFields=function e(a,r,s,i,c,l){let d;const u=i.parentControl;const g=s.bindList(a.getPath(),a.getContext(),[],[],{$$updateGroupId:"submitLater"});g.refreshInternal=function(){};const p=g.create(i.data,true);return new Promise(async(e,h)=>{const m="sap/fe/core/controls/NonComputedVisibleKeyFieldsDialog";const b=M.loadTemplate(m,"fragment"),y=S(u),E=s.getMetaModel(),D=[],T=a.isRelative()?a.getResolvedPath():a.getPath(),_=E.createBindingContext(T),N=E.getMetaPath(T);for(const e in r){D.push(E.createBindingContext(`${N}/${r[e]}`))}const R=new P(D);const B=R.createBindingContext("/");const k=O(N,E);const L=new P(k);const F=L.createBindingContext("/");const H=await x.process(b,{name:m},{bindingContexts:{entitySet:_,fields:B,requiredProperties:F},models:{entitySet:_.getModel(),fields:B.getModel(),metaModel:E,requiredProperties:L}});let $=[];const U={};const j=w.getMessageManager();const V=e=>{const t=j.getMessageModel().getData();const n=t.filter(t=>t.getControlIds().some(t=>t.includes(e)));j.removeMessages(n)};let W;const G={handleChange:async e=>{const t=e.getParameter("id");const n=e.getSource();const o=W.find(e=>e.field===n);V(t);o.validationPromise=e.getParameter("promise");try{o.value=await o.validationPromise;o.hasError=false}catch(e){delete o.value;o.hasError=true}},handleLiveChange:e=>{const t=e.getParameter("id");V(t)}};const q=await A.load({definition:H,controller:G});let K;const J=function(){if(K.error){h(K.error)}else{e(K.response)}d.close()};d=new C(I(["CreateDialog",N]),{title:y.getText("C_TRANSACTION_HELPER_SAPFE_ACTION_CREATE"),content:[q],beginButton:{text:y.getText("C_TRANSACTION_HELPER_SAPFE_ACTION_CREATE_BUTTON"),type:"Emphasized",press:async e=>{if(!await t.validateProperties(j,W,y)){return}o.lock(d);i.bIsCreateDialog=true;try{const e=await Promise.all(Object.keys(U).map(async function(e){const t=await U[e];const n={};n[e]=t;return n}));if(i.beforeCreateCallBack){await v(i.beforeCreateCallBack({contextPath:a&&a.getPath(),createParameters:e}))}const t=p.getObject();const n={};Object.keys(t).forEach(function(e){const o=E.getObject(`${N}/${e}`);if(o&&o.$kind==="NavigationProperty"){return}n[e]=t[e]});const o=a.create(n,true,i.createAtEnd,i.inactive);const r=this.onAfterCreateCompletion(a,o,i);let s=await r;if(!s||s&&s.bKeepDialogOpen!==true){s=s??{};d.setBindingContext(null);s.newContext=o;K={response:s};J()}}catch(e){if(e!==f.Constants.CreationFailed){K={error:e};J()}}finally{o.unlock(d);l.showMessages()}}},endButton:{text:y.getText("C_COMMON_ACTION_PARAMETER_DIALOG_CANCEL"),press:function(){K={error:f.Constants.CancelActionDialog};J()}},afterClose:function(){var e;for(const e of W){const t=e.field.getId();V(t)}(e=d.getBindingContext("internal"))===null||e===void 0?void 0:e.setProperty("isCreateDialogOpen",false);d.destroy();g.destroy()}});$=q===null||q===void 0?void 0:q.getAggregation("form").getAggregation("formContainers")[0].getAggregation("formElements");if(u&&u.addDependent){u.addDependent(d)}d.setBindingContext(p);try{await n.setUserDefaults(c,D,p,false,i.createAction,i.data);W=$.map(e=>{const t=e.getFields()[0];const n=t.isA("sap.ui.mdc.MultiValueField");return{parameter:e,isMultiValue:n,field:t,value:n?t.getItems():t.getValue(),validationPromise:undefined,hasError:false}});d.getBindingContext("internal").setProperty("isCreateDialogOpen",true);d.open()}catch(e){await l.showMessages();throw e}})};g.onAfterCreateCompletion=function t(n,o,a){let r;const s=new Promise(e=>{r=e});const i=e=>{const t=e.getParameter("context"),a=e.getParameter("success");if(t===o){n.detachCreateCompleted(i,this);r(a)}};const c=()=>{o.created().then(undefined,function(){e.trace("transient creation context deleted")}).catch(function(t){e.trace("transient creation context deletion error",t)})};n.attachCreateCompleted(i,this);return s.then(e=>{if(!e){if(!a.keepTransientContextOnFailed){c();n.resetChanges();n.getModel().resetChanges(n.getUpdateGroupId());throw f.Constants.CreationFailed}return{bKeepDialogOpen:true}}else{return o.created()}})};g._getNewAction=function e(t,n,o,a){let r;if(t&&t.preferredMode&&n.toUpperCase().indexOf("I-ACTION=CREATEWITH")>-1){const e=t.preferredMode[0];r=e.toUpperCase().indexOf("CREATEWITH:")>-1?e.substr(e.lastIndexOf(":")+1):undefined}else if(t&&t.preferredMode&&n.toUpperCase().indexOf("I-ACTION=AUTOCREATEWITH")>-1){const e=t.preferredMode[0];r=e.toUpperCase().indexOf("AUTOCREATEWITH:")>-1?e.substr(e.lastIndexOf(":")+1):undefined}else{r=o&&o.getObject!==undefined?o.getObject(`${a}@com.sap.vocabularies.Session.v1.StickySessionSupported/NewAction`)||o.getObject(`${a}@com.sap.vocabularies.Common.v1.DraftRoot/NewAction`):undefined}return r};g._getSpecificCreateActionDialogLabel=function e(t,n,o,a){const r=function(){if(t&&t.getObject(`${n}/@com.sap.vocabularies.UI.v1.LineItem`)){const e=t.getObject(`${n}/@com.sap.vocabularies.UI.v1.LineItem`).findIndex(function(e){const t=e.Action?e.Action.split("("):undefined;return t?t[0]===o:false});return e>-1?t.getObject(`${n}/@com.sap.vocabularies.UI.v1.LineItem`)[e].Label:undefined}else{return undefined}};return r()||t&&t.getObject(`${n}/${o}@com.sap.vocabularies.Common.v1.Label`)||a&&a.getText("C_TRANSACTION_HELPER_SAPFE_ACTION_CREATE")};return u}();const H=new F;return H},false);
|
|
241
241
|
/*!
|
|
242
242
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
243
243
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
@@ -267,12 +267,12 @@ sap.ui.predefine("sap/fe/core/controllerextensions/editFlow/operations/facade",
|
|
|
267
267
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
268
268
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
269
269
|
*/
|
|
270
|
-
sap.ui.predefine("sap/fe/core/controllerextensions/editFlow/sticky", ["sap/base/Log","sap/fe/core/helpers/ResourceModelHelper","sap/fe/core/library","sap/m/MessageBox","sap/ui/core/Core","../../operationsHelper"],function(e,t,n,o,i,c){"use strict";var s=t.getResourceModel;const r=n.ProgrammingModel;async function a(e,t){const n=e.getModel(),o=n.getMetaModel(),i=o.getMetaPath(e.getPath()),r=o.getObject(`${i}@com.sap.vocabularies.Session.v1.StickySessionSupported/EditAction`);if(!r){throw new Error(`Edit Action for Sticky Session not found for ${i}`)}const a=s(t);const d=a.getText("C_COMMON_OBJECT_PAGE_EDIT");const u=n.bindContext(`${r}(...)`,e,{$$inheritExpandSelect:true});const f="direct";const g=u.execute(f,undefined,c.fnOnStrictHandlingFailed.bind(l,f,{label:d,model:n},a,null,null,null,undefined,undefined));n.submitBatch(f);const S=await g;const M=t.getSideEffectsService().getODataActionSideEffects(r,S);if(M!==null&&M!==void 0&&M.triggerActions&&M.triggerActions.length){await t.getSideEffectsService().requestSideEffectsForODataAction(M,S)}return S}async function d(t,n){const o=t.getModel(),i=o.getMetaModel(),r=i.getMetaPath(t.getPath()),a=i.getObject(`${r}@com.sap.vocabularies.Session.v1.StickySessionSupported/SaveAction`);if(!a){throw new Error(`Save Action for Sticky Session not found for ${r}`)}const d=s(n);const u=d.getText("C_OP_OBJECT_PAGE_SAVE");const f=o.bindContext(`${a}(...)`,t,{$$inheritExpandSelect:true});const g="direct";const S=f.execute(g,undefined,c.fnOnStrictHandlingFailed.bind(l,g,{label:u,model:o},d,null,null,null,undefined,undefined));o.submitBatch(g);try{return await S}catch(o){const c=i.getObject(`${r}/@${"com.sap.vocabularies.Common.v1.Messages"}/$Path`);if(c){try{await n.getSideEffectsService().requestSideEffects([c],t)}catch(t){e.error("Error while requesting side effects",t)}}throw o}}function u(e){const t=e.getModel(),n=t.getMetaModel(),o=n.getMetaPath(e.getPath()),i=n.getObject(`${o}@com.sap.vocabularies.Session.v1.StickySessionSupported/DiscardAction`);if(!i){throw new Error(`Discard Action for Sticky Session not found for ${o}`)}const c=t.bindContext(`/${i}(...)`);
|
|
270
|
+
sap.ui.predefine("sap/fe/core/controllerextensions/editFlow/sticky", ["sap/base/Log","sap/fe/core/helpers/ResourceModelHelper","sap/fe/core/library","sap/m/MessageBox","sap/ui/core/Core","../../operationsHelper"],function(e,t,n,o,i,c){"use strict";var s=t.getResourceModel;const r=n.ProgrammingModel;async function a(e,t){const n=e.getModel(),o=n.getMetaModel(),i=o.getMetaPath(e.getPath()),r=o.getObject(`${i}@com.sap.vocabularies.Session.v1.StickySessionSupported/EditAction`);if(!r){throw new Error(`Edit Action for Sticky Session not found for ${i}`)}const a=s(t);const d=a.getText("C_COMMON_OBJECT_PAGE_EDIT");const u=n.bindContext(`${r}(...)`,e,{$$inheritExpandSelect:true});const f="direct";const g=u.execute(f,undefined,c.fnOnStrictHandlingFailed.bind(l,f,{label:d,model:n},a,null,null,null,undefined,undefined));n.submitBatch(f);const S=await g;const M=t.getSideEffectsService().getODataActionSideEffects(r,S);if(M!==null&&M!==void 0&&M.triggerActions&&M.triggerActions.length){await t.getSideEffectsService().requestSideEffectsForODataAction(M,S)}return S}async function d(t,n){const o=t.getModel(),i=o.getMetaModel(),r=i.getMetaPath(t.getPath()),a=i.getObject(`${r}@com.sap.vocabularies.Session.v1.StickySessionSupported/SaveAction`);if(!a){throw new Error(`Save Action for Sticky Session not found for ${r}`)}const d=s(n);const u=d.getText("C_OP_OBJECT_PAGE_SAVE");const f=o.bindContext(`${a}(...)`,t,{$$inheritExpandSelect:true});const g="direct";const S=f.execute(g,undefined,c.fnOnStrictHandlingFailed.bind(l,g,{label:u,model:o},d,null,null,null,undefined,undefined));o.submitBatch(g);try{return await S}catch(o){const c=i.getObject(`${r}/@${"com.sap.vocabularies.Common.v1.Messages"}/$Path`);if(c){try{await n.getSideEffectsService().requestSideEffects([c],t)}catch(t){e.error("Error while requesting side effects",t)}}throw o}}function u(e){const t=e.getModel(),n=t.getMetaModel(),o=n.getMetaPath(e.getPath()),i=n.getObject(`${o}@com.sap.vocabularies.Session.v1.StickySessionSupported/DiscardAction`);if(!i){throw new Error(`Discard Action for Sticky Session not found for ${o}`)}const c=t.bindContext(`/${i}(...)`);return c.execute("$direct").then(function(){return e})}function f(t,n,c){const s=n.getModel("ui").getProperty("/isEditable"),a=i.getLibraryResourceBundle("sap.fe.templates"),d=a&&a.getText("T_COMMON_UTILS_NAVIGATION_AWAY_MSG"),u=a&&a.getText("T_COMMON_UTILS_NAVIGATION_AWAY_CONFIRM_BUTTON"),f=a&&a.getText("T_COMMON_UTILS_NAVIGATION_AWAY_CANCEL_BUTTON");if(c===r.Sticky&&s){return o.warning(d,{actions:[u,f],emphasizedAction:u,onClose:function(n){if(n===u){e.info("Navigation confirmed.");t()}else{e.info("Navigation rejected.")}}})}return t()}const l={editDocumentInStickySession:a,activateDocument:d,discardDocument:u,processDataLossConfirmation:f};return l},false);
|
|
271
271
|
/*!
|
|
272
272
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
273
273
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
274
274
|
*/
|
|
275
|
-
sap.ui.predefine("sap/fe/core/controllerextensions/messageHandler/messageHandling", ["sap/fe/core/helpers/ResourceModelHelper","sap/m/Bar","sap/m/Button","sap/m/Dialog","sap/m/FormattedText","sap/m/MessageBox","sap/m/MessageItem","sap/m/MessageToast","sap/m/MessageView","sap/m/Text","sap/ui/core/Core","sap/ui/core/format/DateFormat","sap/ui/core/IconPool","sap/ui/core/library","sap/ui/core/message/Message","sap/ui/model/Filter","sap/ui/model/FilterOperator","sap/ui/model/json/JSONModel","sap/ui/model/Sorter"],function(e,t,n,o,r,a,i,s,l,u,g,c,f,d,p,T,m,E,_){"use strict";var S=e.getResourceModel;const A=d.MessageType;let C=[];let h=[];let M=[];let b;let I;let N;function R(){let e;function t(e){return e.property?"( ${"+e.property+'} ? ("<p>'+e.property.substr(Math.max(e.property.lastIndexOf("/"),e.property.lastIndexOf("."))+1)+' : " + '+"${"+e.property+'} + "</p>") : "" )':""}function n(t){let n="";if(t.groupName&&t.property&&t.groupName!==e){n+="( ${"+t.property+'} ? "<br><h3>'+t.groupName+'</h3>" : "" ) + ';e=t.groupName}return n}function o(){const e="technicalDetails";return[{groupName:"",property:`${e}/status`},{groupName:"",property:`${e}/statusText`},{groupName:"Application",property:`${e}/error/@SAP__common.Application/ComponentId`},{groupName:"Application",property:`${e}/error/@SAP__common.Application/ServiceId`},{groupName:"Application",property:`${e}/error/@SAP__common.Application/ServiceRepository`},{groupName:"Application",property:`${e}/error/@SAP__common.Application/ServiceVersion`},{groupName:"ErrorResolution",property:`${e}/error/@SAP__common.ErrorResolution/Analysis`},{groupName:"ErrorResolution",property:`${e}/error/@SAP__common.ErrorResolution/Note`},{groupName:"ErrorResolution",property:`${e}/error/@SAP__common.ErrorResolution/DetailedNote`},{groupName:"ErrorResolution",property:`${e}/error/@SAP__common.ExceptionCategory`},{groupName:"ErrorResolution",property:`${e}/error/@SAP__common.TimeStamp`},{groupName:"ErrorResolution",property:`${e}/error/@SAP__common.TransactionId`},{groupName:"Messages",property:`${e}/error/code`},{groupName:"Messages",property:`${e}/error/message`}]}let r="Object.keys("+"${technicalDetails}"+').length > 0 ? "<h2>Technical Details</h2>" : "" ';o().forEach(function(e){r=`${r+n(e)}${t(e)} + `});return r}function P(){return"(${"+"description} ? (${"+'description}) : "")'}function x(e){let t=A.None;const n=e.length;const o={Error:0,Warning:0,Success:0,Information:0};for(let t=0;t<n;t++){++o[e[t].getType()]}if(o[A.Error]>0){t=A.Error}else if(o[A.Warning]>0){t=A.Warning}else if(o[A.Success]>0){t=A.Success}else if(o[A.Information]>0){t=A.Information}return t}function O(e,t,n){const o=e.getMessageModel().getObject("/");let r=false;let a="";o.forEach(function(i,s){const l=i.getTechnicalDetails&&i.getTechnicalDetails();if(l&&l.httpStatus===412&&l.isConcurrentModification){if(n){a=a||t.getText("C_APP_COMPONENT_SAPFE_ETAG_TECHNICAL_ISSUES_CONCURRENT_MODIFICATION")}else{a=a||t.getText("C_APP_COMPONENT_SAPFE_ETAG_TECHNICAL_ISSUES")}e.removeMessages(o[s]);i.setMessage(a);i.target="";e.addMessages(i);r=true}});return r}function y(){b.close();I.setVisible(false);C=[];const e=N.getModel();if(e){e.setData({})}X()}function v(e,t){const n=new Date;const o=e.getTechnicalDetails();const r=g.getLibraryResourceBundle("sap.fe.core");let a;if(o&&o.httpStatus===503&&o.retryAfter){const e=o.retryAfter;let i;if(n.getFullYear()!==e.getFullYear()){i=c.getDateTimeInstance({pattern:"MMMM dd, yyyy 'at' hh:mm a"});a=r.getText("C_MESSAGE_HANDLING_SAPFE_503_ERROR",[i.format(e)])}else if(n.getFullYear()==e.getFullYear()){if(t){a=`${r.getText("C_MESSAGE_HANDLING_SAPFE_503_TITLE")} ${r.getText("C_MESSAGE_HANDLING_SAPFE_503_DESC")}`}else if(n.getMonth()!==e.getMonth()||n.getDate()!==e.getDate()){i=c.getDateTimeInstance({pattern:"MMMM dd 'at' hh:mm a"});a=r.getText("C_MESSAGE_HANDLING_SAPFE_503_ERROR",[i.format(e)])}else{i=c.getDateTimeInstance({pattern:"hh:mm a"});a=r.getText("C_MESSAGE_HANDLING_SAPFE_503_ERROR_DAY",[i.format(e)])}}}if(o&&o.httpStatus===503&&!o.retryAfter){a=r.getText("C_MESSAGE_HANDLING_SAPFE_503_ERROR_NO_RETRY_AFTER")}return a}function G(e,t,o){let r;if(!t){const e='{= ${description} ? "<html><body>" + '+P()+' + "</html></body>" : "" }';const t='{= ${technicalDetails} ? "<html><body>" + '+R()+' + "</html></body>" : "" }';r=new i(undefined,{counter:{path:"counter"},title:"{message}",subtitle:"{additionalText}",longtextUrl:"{descriptionUrl}",type:{path:"type"},groupName:"{headerName}",description:e+t,markupDescription:true})}else if(o){r=new i(undefined,{counter:{path:"counter"},title:"{message}",subtitle:"{additionalText}",longtextUrl:"{descriptionUrl}",type:{path:"type"},description:"{description}",markupDescription:true})}else{r=new i({title:"{message}",type:{path:"type"},longtextUrl:"{descriptionUrl}"})}N=new l({showDetailsPageHeader:false,itemSelect:function(){I.setVisible(true)},items:{path:"/",template:r}});N.setGroupItems(true);I=I||new n({icon:f.getIconURI("nav-back"),visible:false,press:function(){N.navigateBack();this.setVisible(false)}});N.setModel(e);return{oMessageView:N,oBackButton:I}}function D(e,i,l,c,f,d,S,R,P){let O=this.getMessages();const D=g.getMessageManager();let $;let L;const w=[new T({path:"persistent",operator:m.NE,value1:false})];let B=false,U=false;if(l){O=O.concat(Z(true,true));w.push(new T({path:"persistent",operator:m.EQ,value1:true}));const e=function(e){let t=Infinity,n=g.byId(e[0]);const r=g.byId(e[0]);while(n){const e=n instanceof o?r.getParent().findElements(true).indexOf(r):Infinity;if(n instanceof o){if(t>e){t=e;r.focus()}return false}n=n.getParent()}return true};w.push(new T({path:"controlIds",test:e,caseSensitive:true}))}else{w.push(new T({path:"target",operator:m.EQ,value1:""}))}if(e&&e.length){e.forEach(function(e){const t=e.code?e.code:"";D.addMessages(new p({message:e.text,type:e.type,target:"",persistent:true,code:t}))})}const H=N&&N.getModel()||new E;const V=this.modifyETagMessagesOnly(D,g.getLibraryResourceBundle("sap.fe.core"),c);if(O.length===1&&O[0].getCode()==="503"){U=true}else if(O.length!==0){B=true}let j;let k=[];if(B||!U&&!R){const e=D.getMessageModel().bindList("/",undefined,undefined,w),t=e.getCurrentContexts();if(t&&t.length>0){B=true;const e=[];t.forEach(function(t){const n=t.getObject();e.push(n);h=e});let n=[];if(Array.isArray(H.getData())){n=H.getData()}const o={};k=h.concat(n).filter(function(e){return!o[e.id]&&(o[e.id]=true)});H.setData(k)}}if(R){j={showMessageBox:U,showMessageDialog:B};j=R(O,j);U=j.showMessageBox;B=j.showMessageDialog;if(B||j.showChangeSetErrorDialog){k=j.filteredMessages?j.filteredMessages:k}}if(O.length===0&&!e&&!V){return Promise.resolve(true)}else if(O.length===1&&O[0].getType()===A.Success&&!e){return new Promise(e=>{s.show(O[0].message);if(H){H.setData({})}D.removeMessages(O);e()})}else if(B){ge.updateMessageObjectGroupName(k,f,d,P);H.setData(k);M=M||[];return new Promise(function(e,r){M.push(e);g.getLibraryResourceBundle("sap.fe.core",true).then(function(r){const a=false;if(j&&j.fnGetMessageSubtitle){H.getData().forEach(function(e){j.fnGetMessageSubtitle(e)})}const s=G(H,a);const l=new _("",undefined,undefined,(e,t)=>{const n=F(e);const o=F(t);if(n<o){return-1}if(n>o){return 1}return 0});s.oMessageView.getBinding("items").sort(l);b=b&&b.isOpen()?b:new o({resizable:true,endButton:new n({press:function(){y();D.removeMessages(k)},text:r.getText("C_COMMON_SAPFE_CLOSE")}),customHeader:new t({contentMiddle:[new u({text:r.getText("C_MESSAGE_HANDLING_SAPFE_ERROR_MESSAGES_PAGE_TITLE")})],contentLeft:[I]}),contentWidth:"37.5em",contentHeight:"21.5em",verticalScrolling:false,afterClose:function(){for(let e=0;e<M.length;e++){M[e].call()}M=[]}});b.removeAllContent();b.addContent(s.oMessageView);if(V){sap.ui.require(["sap/m/ButtonType"],function(e){b.setBeginButton(new n({press:function(){y();if(i.hasPendingChanges()){i.getBinding().resetChanges()}i.refresh()},text:r.getText("C_COMMON_SAPFE_REFRESH"),type:e.Emphasized}))})}else{b.destroyBeginButton()}$=x(N.getItems());L=Q($);b.setState($);b.getCustomHeader().getContentMiddle()[0].setText(L);N.navigateBack();b.open();if(S){e(b)}}).catch(r)})}else if(U){return new Promise(function(e){const t=O[0];if(t.technicalDetails&&C.indexOf(t.technicalDetails.originalMessage.message)===-1||j&&j.showChangeSetErrorDialog){if(!j||!j.showChangeSetErrorDialog){C.push(t.technicalDetails.originalMessage.message)}let n="<html><body>";const o=v(t,true);if(o){n=`<h6>${o}</h6><br>`}if(j&&j.fnGetMessageSubtitle){j.fnGetMessageSubtitle(t)}if(t.getCode()!=="503"&&t.getAdditionalText()!==undefined){n=`${n+t.getAdditionalText()}: ${t.getMessage()}</html></body>`}else{n=`${n+t.getMessage()}</html></body>`}const i=new r({htmlText:n});a.error(i,{onClose:function(){C=[];if(l){q()}X();e(true)}})}})}else{return Promise.resolve(true)}}function $(e,t,n,o){e.forEach(e=>{var r,a,i;e["headerName"]="";if(!((r=e.target)!==null&&r!==void 0&&r.length)&&((a=e.getCode)===null||a===void 0?void 0:a.call(e))!=="FE_CUSTOM_MESSAGE_CHANGESET_ALL_FAILED"){e["headerName"]="General"}else if((i=e.target)!==null&&i!==void 0&&i.length){if(o==="ListReport"){ge.setGroupNameLRTable(t,e,n)}else if(o==="ObjectPage"){ge.setGroupNameOPDisplayMode(e,n,t)}else{e["headerName"]=ge.getLastActionTextAndActionName(n)}}})}function L(e,t,n){const o=e&&e.getRowBinding();if(o){var r;const a=`${e.getRowBinding().getPath()}`;if(((r=t.target)===null||r===void 0?void 0:r.indexOf(a))===0){const r=o.getCurrentContexts();r.forEach(o=>{var r;if((r=t.target)!==null&&r!==void 0&&r.includes(o.getPath())){const r=`${o.getPath()}/`;const a=e.getParent().getIdentifierColumn();const i=a&&o.getObject()[a];const s=ge.getTableColProperty(e,t,r);const{sTableTargetColName:l}=ge.getTableColInfo(e,s);if(s&&l){t["headerName"]=i?` ${i}`:e.getHeader()}else{t["headerName"]=ge.getLastActionTextAndActionName(n)}}})}}}function w(e,t,n){const o=n===null||n===void 0?void 0:n.getBindingContext();const r=(n===null||n===void 0?void 0:n.getContent)&&(n===null||n===void 0?void 0:n.getContent()[0]);let a=true;if(r){ge.getVisibleSectionsFromObjectPageLayout(r).forEach(function(n){const r=n.getSubSections();r.forEach(function(n){n.findElements(true).forEach(function(r){if(r.isA("sap.ui.mdc.Table")){const l=r.getRowBinding(),u=true;let c;r.findElements(true).forEach(e=>{if(e.isA("sap.m.Table")||e.isA("sap.ui.table.Table")){c=e}});if(l){var i,s;const f=`${o===null||o===void 0?void 0:o.getPath()}/${(i=r.getRowBinding())===null||i===void 0?void 0:i.getPath()}`;if(((s=e.target)===null||s===void 0?void 0:s.indexOf(f))===0){const o=ge.getTableColumnDataAndSetSubtile(e,r,c,l,t,u,U);const{oTargetTableInfo:i}=o;if(u){const t=r.getParent().getIdentifierColumn();if(t){const n=r.getRowBinding().getContexts();n.forEach(n=>{var o;if((o=e.target)!==null&&o!==void 0&&o.includes(n.getPath())){const o=t?n.getObject()[t]:undefined;e["additionalText"]=`${o}, ${i.sTableTargetColName}`}})}else{e["additionalText"]=`${i.sTableTargetColName}`}let o=r.getHeaderVisible()&&i.tableHeader;if(!o){o=n.getTitle()}else{const e=g.getLibraryResourceBundle("sap.fe.core");o=`${e.getText("T_MESSAGE_GROUP_TITLE_TABLE_DENOMINATOR")}: ${o}`}e["headerName"]=o;a=false}}}}})})})}if(a){var i;const n=`${o===null||o===void 0?void 0:o.getPath()}`;if(((i=e.target)===null||i===void 0?void 0:i.indexOf(n))===0){const n=ge.getLastActionTextAndActionName(t);e["headerName"]=n}else{e["headerName"]="General"}}}function B(e){const t=g.getLibraryResourceBundle("sap.fe.core").getText("T_MESSAGE_BUTTON_SAPFE_MESSAGE_GROUP_LAST_ACTION");return e?`${t}: ${e}`:""}function F(e){var t,n;if((t=e.headerName)!==null&&t!==void 0&&t.toString().includes("Last Action")){return 1}else if((n=e.headerName)!==null&&n!==void 0&&n.toString().includes("General")){return 3}else{return 2}}const U=(e,t,n)=>{if(n){const t=g.getLibraryResourceBundle("sap.fe.core").getText("T_MESSAGE_BUTTON_SAPFE_MESSAGE_GROUP_GENERAL");e["headerName"]=t}else{e["headerName"]=ge.getLastActionTextAndActionName(t)}};function H(e,t,n,o,r,a,i){const s=ge.getTableAndTargetInfo(t,e,n,o);s.tableHeader=t.getHeader();let l,u;if(!s.oTableRowContext){l=e.getControlIds().find(function(e){return ge.isControlInTable(t,e)})}if(l){const e=g.byId(l);u=ge.isControlPartOfCreationRow(e)}if(!s.sTableTargetColName){if(e.persistent&&r){i(e,r);a=false}}const c=ge.getMessageSubtitle(e,s.oTableRowBindingContexts,s.oTableRowContext,s.sTableTargetColName,t,u);return{oTargetTableInfo:s,subTitle:c}}function V(e,t,n,o,r,a,i){let s;let l;const u=S(r);const g=r.getParent().getIdentifierColumn();const c=ge.fetchColumnInfo(e,r);if(a){s=u.getText("T_MESSAGE_ITEM_SUBTITLE",[u.getText("T_MESSAGE_ITEM_SUBTITLE_CREATION_ROW_INDICATOR"),o?o:c.label])}else{const e=ge.getTableFirstColBindingContextForTextAnnotation(r,n,g);const a=e?e.getObject("$Path"):undefined;const f=a&&e?e.getObject("@com.sap.vocabularies.UI.v1.TextArrangement/$EnumMember"):undefined;if(t.length>0){if(i){l=i.getValue()}else if(n&&g){l=ge.getTableFirstColValue(g,n,a,f)}else{l=undefined}const e=ge.determineColumnInfo(c,u);if(l&&o){s=u.getText("T_MESSAGE_ITEM_SUBTITLE",[l,o])}else if(l&&e.sColumnIndicator==="Hidden"){s=`${u.getText("T_MESSAGE_GROUP_DESCRIPTION_TABLE_ROW")}: ${l}, ${e.sColumnValue}`}else if(l&&e.sColumnIndicator==="Unknown"){s=u.getText("T_MESSAGE_ITEM_SUBTITLE",[l,e.sColumnValue])}else if(l&&e.sColumnIndicator==="undefined"){s=`${u.getText("T_MESSAGE_GROUP_DESCRIPTION_TABLE_ROW")}: ${l}`}else if(!l&&o){s=u.getText("T_MESSAGE_GROUP_DESCRIPTION_TABLE_COLUMN")+": "+o}else if(!l&&e.sColumnIndicator==="Hidden"){s=e.sColumnValue}else{s=null}}else{s=null}}return s}function j(e,t,n){let o;if(t&&n){const r=e===null||e===void 0?void 0:e.getModel();const a=r===null||r===void 0?void 0:r.getMetaModel();const i=a===null||a===void 0?void 0:a.getMetaPath(t.getPath());if(a!==null&&a!==void 0&&a.getObject(`${i}/${n}@com.sap.vocabularies.Common.v1.Text/$Path`)){o=a.createBindingContext(`${i}/${n}@com.sap.vocabularies.Common.v1.Text`)}}return o}function k(e,t,n,o){const r=t.getValue(e);let a;let i=r;if(n){if(e.lastIndexOf("/")>0){e=e.slice(0,e.lastIndexOf("/")+1);e=e.concat(n)}else{e=n}a=t.getValue(e);if(a){if(o){const e=o.slice(o.indexOf("/")+1);switch(e){case"TextOnly":i=a;break;case"TextFirst":i=`${a} (${r})`;break;case"TextLast":i=`${r} (${a})`;break;case"TextSeparate":i=r;break;default:}}else{i=`${a} (${r})`}}}return i}function W(e,t){const n=e===null||e===void 0?void 0:e.getTargets()[0].split("/").pop();return t.getParent().getTableDefinition().columns.find(function(e){return e.key.split("::").pop()===n})}function Y(e,t){const n={sColumnIndicator:String,sColumnValue:String};if(e){if(e.availability==="Hidden"){n.sColumnValue=undefined;n.sColumnIndicator="undefined"}else{n.sColumnValue=`${t.getText("T_MESSAGE_GROUP_DESCRIPTION_TABLE_COLUMN")} (${t.getText("T_COLUMN_INDICATOR_IN_TABLE_DEFINITION")}): ${e.label}`;n.sColumnIndicator="Hidden"}}else{n.sColumnValue=t.getText("T_MESSAGE_ITEM_SUBTITLE_INDICATOR_UNKNOWN");n.sColumnIndicator="Unknown"}return n}function K(e,t){const n=g.byId(t);if(n&&!n.isA("sap.ui.table.Table")&&!n.isA("sap.m.Table")){return e.findElements(true,function(e){return e.getId()===n})}return false}function z(e){let t=e===null||e===void 0?void 0:e.getParent();while(t&&!((n=t)!==null&&n!==void 0&&n.isA("sap.ui.table.Row"))&&!((o=t)!==null&&o!==void 0&&o.isA("sap.ui.table.CreationRow"))&&!((r=t)!==null&&r!==void 0&&r.isA("sap.m.ColumnListItem"))){var n,o,r;t=t.getParent()}return!!t&&t.isA("sap.ui.table.CreationRow")}function Q(e){const t=g.getLibraryResourceBundle("sap.fe.core");switch(e){case"Error":return t.getText("C_COMMON_SAPFE_ERROR_MESSAGES_PAGE_TITLE_ERROR");case"Information":return t.getText("C_MESSAGE_HANDLING_SAPFE_ERROR_MESSAGES_PAGE_TITLE_INFO");case"Success":return t.getText("C_MESSAGE_HANDLING_SAPFE_ERROR_MESSAGES_PAGE_TITLE_SUCCESS");case"Warning":return t.getText("C_MESSAGE_HANDLING_SAPFE_ERROR_MESSAGES_PAGE_TITLE_WARNING");default:return t.getText("C_MESSAGE_HANDLING_SAPFE_ERROR_MESSAGES_PAGE_TITLE")}}function X(){ee(false)}function q(e){ee(true,e)}function J(e,t){if(t===undefined){return e.getObject("/")}const n=e.bindList("/");n.filter(new T({path:"target",operator:m.StartsWith,value1:t}));return n.getCurrentContexts().map(function(e){return e.getObject()})}function Z(){let e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;let n=arguments.length>2?arguments[2]:undefined;let o;const r=g.getMessageManager(),a=r.getMessageModel(),i=g.getLibraryResourceBundle("sap.fe.core"),s=[];let l=[];if(e&&t&&n){l=J(a,n)}else{l=a.getObject("/")}for(o=0;o<l.length;o++){if((!t||l[o].persistent)&&(e&&l[o].target!==""||!e&&(!l[o].target||l[o].target===""))){s.push(l[o])}}for(o=0;o<s.length;o++){if(s[o].code==="503"&&s[o].message!==""&&s[o].message.indexOf(i.getText("C_MESSAGE_HANDLING_SAPFE_503_BACKEND_PREFIX"))===-1){s[o].message=`\n${i.getText("C_MESSAGE_HANDLING_SAPFE_503_BACKEND_PREFIX")}${s[o].message}`}}const u=[];for(o=0;o<s.length;o++){if(s[o].technicalDetails&&(s[o].technicalDetails.originalMessage!==undefined&&s[o].technicalDetails.originalMessage!==null||s[o].technicalDetails.httpStatus!==undefined&&s[o].technicalDetails.httpStatus!==null)||s[o].code){u.push(s[o])}}return u}function ee(e,t){const n=Z(e,true,t);if(n.length>0){g.getMessageManager().removeMessages(n)}}function te(e,t,n){if(n.additionalText===undefined){const o=e.getParent().getIdentifierColumn();const r=t.find(function(e){return n.getTargets()[0].indexOf(e.getPath())!==-1});n.additionalText=r?r.getObject()[o]:undefined}}function ne(e){return e.getSections().filter(function(e){return e.getVisible()})}function oe(e,t){return e.findElements(true,e=>se(t.getControlIds(),e)).sort(function(e,t){if(e.isA("sap.ui.mdc.Table")&&!t.isA("sap.ui.mdc.Table")){return-1}return 1})}function re(e,t,n){const o=function(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")};if(!n){var r;n=new RegExp(`${o(`${(r=e.getBindingContext())===null||r===void 0?void 0:r.getPath()}/${e.getRowBinding().getPath()}`)}\\(.*\\)/`)}return t.getTargets()[0].replace(n,"")}function ae(e,t){let n;let o=e.getColumns().find(function(e){return e.getDataProperty()==t});if(!o){const a=e.getControlDelegate().getColumnsFor(e).find(function(e){if(!!e.template&&e.propertyInfos){return e.propertyInfos[0]===t||e.propertyInfos[0].replace("Property::","")===t}else{return false}});if(a){var r;o=a;t=(r=o)===null||r===void 0?void 0:r.name;n=e.getColumns().find(function(e){return t===e.getDataProperty()}).getHeader()}else{const r=e.getControlDelegate().getColumnsFor(e);o=r.find(function(e){if(e.key.indexOf("::FieldGroup::")!==-1){var n;return(n=e.propertyInfos)===null||n===void 0?void 0:n.find(function(){return r.find(function(e){return e.relativePath===t})})}});let a=false;if(o&&o.label){a=e.getColumns().some(function(e){return e.getHeader()===o.label})}n=a&&o.label;t=a&&o.key}}else{n=o&&o.getHeader()}return{sTableTargetColName:n,sTableTargetColProperty:t}}function ie(e,t,n,o){const r={};r.sTableTargetColProperty=re(e,t);const a=ae(e,r.sTableTargetColProperty);r.oTableRowBindingContexts=n.isA("sap.ui.table.Table")?o.getContexts():o.getCurrentContexts();r.sTableTargetColName=a.sTableTargetColName;r.sTableTargetColProperty=a.sTableTargetColProperty;r.oTableRowContext=r.oTableRowBindingContexts.find(function(e){return e&&t.getTargets()[0].indexOf(e.getPath())===0});return r}function se(e,t){return e.some(function(e){if(e===t.getId()){return true}return false})}function le(e,t,n,o,r){return e.getTitle()+(t.getTitle()&&n?`, ${t.getTitle()}`:"")+(o?`, ${r.getText("T_MESSAGE_GROUP_TITLE_TABLE_DENOMINATOR")}: ${o.tableHeader}`:"")}function ue(e,t){return!t.some(function(t){let n=e.getParent();while(n&&n!==t){n=n.getParent()}return n?true:false})}const ge={getMessages:Z,showUnboundMessages:D,removeUnboundTransitionMessages:X,removeBoundTransitionMessages:q,modifyETagMessagesOnly:O,getRetryAfterMessage:v,prepareMessageViewForDialog:G,setMessageSubtitle:te,getVisibleSectionsFromObjectPageLayout:ne,getControlFromMessageRelatingToSubSection:oe,fnFilterUponIds:se,getTableAndTargetInfo:ie,createSectionGroupName:le,bIsOrphanElement:ue,getLastActionTextAndActionName:B,getTableColumnDataAndSetSubtile:H,getTableColInfo:ae,getTableColProperty:re,getMessageSubtitle:V,determineColumnInfo:Y,fetchColumnInfo:W,getTableFirstColBindingContextForTextAnnotation:j,getMessageRank:F,fnCallbackSetGroupName:U,getTableFirstColValue:k,setGroupNameOPDisplayMode:w,updateMessageObjectGroupName:$,setGroupNameLRTable:L,isControlInTable:K,isControlPartOfCreationRow:z};return ge},false);
|
|
275
|
+
sap.ui.predefine("sap/fe/core/controllerextensions/messageHandler/messageHandling", ["sap/fe/core/helpers/ResourceModelHelper","sap/m/Bar","sap/m/Button","sap/m/Dialog","sap/m/FormattedText","sap/m/MessageBox","sap/m/MessageItem","sap/m/MessageToast","sap/m/MessageView","sap/m/Text","sap/ui/core/Core","sap/ui/core/format/DateFormat","sap/ui/core/IconPool","sap/ui/core/library","sap/ui/core/message/Message","sap/ui/model/Filter","sap/ui/model/FilterOperator","sap/ui/model/json/JSONModel","sap/ui/model/Sorter"],function(e,t,n,o,r,a,i,s,l,u,g,c,f,d,p,T,m,E,_){"use strict";var S=e.getResourceModel;const A=d.MessageType;let C=[];let h=[];let M=[];let b;let N;let I;function R(){let e;function t(e){return e.property?"( ${"+e.property+'} ? ("<p>'+e.property.substr(Math.max(e.property.lastIndexOf("/"),e.property.lastIndexOf("."))+1)+' : " + '+"${"+e.property+'} + "</p>") : "" )':""}function n(t){let n="";if(t.groupName&&t.property&&t.groupName!==e){n+="( ${"+t.property+'} ? "<br><h3>'+t.groupName+'</h3>" : "" ) + ';e=t.groupName}return n}function o(){const e="technicalDetails";return[{groupName:"",property:`${e}/status`},{groupName:"",property:`${e}/statusText`},{groupName:"Application",property:`${e}/error/@SAP__common.Application/ComponentId`},{groupName:"Application",property:`${e}/error/@SAP__common.Application/ServiceId`},{groupName:"Application",property:`${e}/error/@SAP__common.Application/ServiceRepository`},{groupName:"Application",property:`${e}/error/@SAP__common.Application/ServiceVersion`},{groupName:"ErrorResolution",property:`${e}/error/@SAP__common.ErrorResolution/Analysis`},{groupName:"ErrorResolution",property:`${e}/error/@SAP__common.ErrorResolution/Note`},{groupName:"ErrorResolution",property:`${e}/error/@SAP__common.ErrorResolution/DetailedNote`},{groupName:"ErrorResolution",property:`${e}/error/@SAP__common.ExceptionCategory`},{groupName:"ErrorResolution",property:`${e}/error/@SAP__common.TimeStamp`},{groupName:"ErrorResolution",property:`${e}/error/@SAP__common.TransactionId`},{groupName:"Messages",property:`${e}/error/code`},{groupName:"Messages",property:`${e}/error/message`}]}let r="Object.keys("+"${technicalDetails}"+').length > 0 ? "<h2>Technical Details</h2>" : "" ';o().forEach(function(e){r=`${r+n(e)}${t(e)} + `});return r}function P(){return"(${"+"description} ? (${"+'description}) : "")'}function x(e){let t=A.None;const n=e.length;const o={Error:0,Warning:0,Success:0,Information:0};for(let t=0;t<n;t++){++o[e[t].getType()]}if(o[A.Error]>0){t=A.Error}else if(o[A.Warning]>0){t=A.Warning}else if(o[A.Success]>0){t=A.Success}else if(o[A.Information]>0){t=A.Information}return t}function O(e,t,n){const o=e.getMessageModel().getObject("/");let r=false;let a="";o.forEach(function(i,s){const l=i.getTechnicalDetails&&i.getTechnicalDetails();if(l&&l.httpStatus===412&&l.isConcurrentModification){if(n){a=a||t.getText("C_APP_COMPONENT_SAPFE_ETAG_TECHNICAL_ISSUES_CONCURRENT_MODIFICATION")}else{a=a||t.getText("C_APP_COMPONENT_SAPFE_ETAG_TECHNICAL_ISSUES")}e.removeMessages(o[s]);i.setMessage(a);i.target="";e.addMessages(i);r=true}});return r}function y(){b.close();N.setVisible(false);C=[];const e=I.getModel();if(e){e.setData({})}X()}function G(e,t){const n=new Date;const o=e.getTechnicalDetails();const r=g.getLibraryResourceBundle("sap.fe.core");let a;if(o&&o.httpStatus===503&&o.retryAfter){const e=o.retryAfter;let i;if(n.getFullYear()!==e.getFullYear()){i=c.getDateTimeInstance({pattern:"MMMM dd, yyyy 'at' hh:mm a"});a=r.getText("C_MESSAGE_HANDLING_SAPFE_503_ERROR",[i.format(e)])}else if(n.getFullYear()==e.getFullYear()){if(t){a=`${r.getText("C_MESSAGE_HANDLING_SAPFE_503_TITLE")} ${r.getText("C_MESSAGE_HANDLING_SAPFE_503_DESC")}`}else if(n.getMonth()!==e.getMonth()||n.getDate()!==e.getDate()){i=c.getDateTimeInstance({pattern:"MMMM dd 'at' hh:mm a"});a=r.getText("C_MESSAGE_HANDLING_SAPFE_503_ERROR",[i.format(e)])}else{i=c.getDateTimeInstance({pattern:"hh:mm a"});a=r.getText("C_MESSAGE_HANDLING_SAPFE_503_ERROR_DAY",[i.format(e)])}}}if(o&&o.httpStatus===503&&!o.retryAfter){a=r.getText("C_MESSAGE_HANDLING_SAPFE_503_ERROR_NO_RETRY_AFTER")}return a}function v(e,t,o){let r;if(!t){const e='{= ${description} ? "<html><body>" + '+P()+' + "</html></body>" : "" }';const t='{= ${technicalDetails} ? "<html><body>" + '+R()+' + "</html></body>" : "" }';r=new i(undefined,{counter:{path:"counter"},title:"{message}",subtitle:"{additionalText}",longtextUrl:"{descriptionUrl}",type:{path:"type"},groupName:"{headerName}",description:e+t,markupDescription:true})}else if(o){r=new i(undefined,{counter:{path:"counter"},title:"{message}",subtitle:"{additionalText}",longtextUrl:"{descriptionUrl}",type:{path:"type"},description:"{description}",markupDescription:true})}else{r=new i({title:"{message}",type:{path:"type"},longtextUrl:"{descriptionUrl}"})}I=new l({showDetailsPageHeader:false,itemSelect:function(){N.setVisible(true)},items:{path:"/",template:r}});I.setGroupItems(true);N=N||new n({icon:f.getIconURI("nav-back"),visible:false,press:function(){I.navigateBack();this.setVisible(false)}});I.setModel(e);return{oMessageView:I,oBackButton:N}}function D(e,i,l,c,f,d,S,R,P){let O=this.getMessages();const D=g.getMessageManager();let $;let L;const w=[new T({path:"persistent",operator:m.NE,value1:false})];let B=false,U=false;if(l){O=O.concat(Z(true,true));w.push(new T({path:"persistent",operator:m.EQ,value1:true}));const e=function(e){let t=Infinity,n=g.byId(e[0]);const r=g.byId(e[0]);while(n){const e=n instanceof o?r.getParent().findElements(true).indexOf(r):Infinity;if(n instanceof o){if(t>e){t=e;r.focus()}return false}n=n.getParent()}return true};w.push(new T({path:"controlIds",test:e,caseSensitive:true}))}else{w.push(new T({path:"target",operator:m.EQ,value1:""}))}if(e&&e.length){e.forEach(function(e){const t=e.code?e.code:"";D.addMessages(new p({message:e.text,type:e.type,target:"",persistent:true,code:t}))})}const H=I&&I.getModel()||new E;const V=this.modifyETagMessagesOnly(D,g.getLibraryResourceBundle("sap.fe.core"),c);if(O.length===1&&O[0].getCode()==="503"){U=true}else if(O.length!==0){B=true}let j;let k=[];if(B||!U&&!R){const e=D.getMessageModel().bindList("/",undefined,undefined,w),t=e.getCurrentContexts();if(t&&t.length>0){B=true;const e=[];t.forEach(function(t){const n=t.getObject();e.push(n);h=e});let n=[];if(Array.isArray(H.getData())){n=H.getData()}const o={};k=h.concat(n).filter(function(e){return!o[e.id]&&(o[e.id]=true)});H.setData(k)}}if(R){j={showMessageBox:U,showMessageDialog:B};j=R(O,j);U=j.showMessageBox;B=j.showMessageDialog;if(B||j.showChangeSetErrorDialog){k=j.filteredMessages?j.filteredMessages:k}}if(O.length===0&&!e&&!V){return Promise.resolve(true)}else if(O.length===1&&O[0].getType()===A.Success&&!e){return new Promise(e=>{s.show(O[0].message);if(H){H.setData({})}D.removeMessages(O);e()})}else if(B){ge.updateMessageObjectGroupName(k,f,d,P);H.setData(k);M=M||[];return new Promise(function(e,r){M.push(e);g.getLibraryResourceBundle("sap.fe.core",true).then(function(r){const a=false;if(j&&j.fnGetMessageSubtitle){H.getData().forEach(function(e){j.fnGetMessageSubtitle(e)})}const s=v(H,a);const l=new _("",undefined,undefined,(e,t)=>{const n=F(e);const o=F(t);if(n<o){return-1}if(n>o){return 1}return 0});s.oMessageView.getBinding("items").sort(l);b=b&&b.isOpen()?b:new o({resizable:true,endButton:new n({press:function(){y();D.removeMessages(k)},text:r.getText("C_COMMON_SAPFE_CLOSE")}),customHeader:new t({contentMiddle:[new u({text:r.getText("C_MESSAGE_HANDLING_SAPFE_ERROR_MESSAGES_PAGE_TITLE")})],contentLeft:[N]}),contentWidth:"37.5em",contentHeight:"21.5em",verticalScrolling:false,afterClose:function(){for(let e=0;e<M.length;e++){M[e].call()}M=[]}});b.removeAllContent();b.addContent(s.oMessageView);if(V){sap.ui.require(["sap/m/ButtonType"],function(e){b.setBeginButton(new n({press:function(){y();if(i.hasPendingChanges()){i.getBinding().resetChanges()}i.refresh()},text:r.getText("C_COMMON_SAPFE_REFRESH"),type:e.Emphasized}))})}else{b.destroyBeginButton()}$=x(I.getItems());L=Q($);b.setState($);b.getCustomHeader().getContentMiddle()[0].setText(L);I.navigateBack();b.open();if(S){e(b)}}).catch(r)})}else if(U){return new Promise(function(e){const t=O[0];if(t.technicalDetails&&C.indexOf(t.technicalDetails.originalMessage.message)===-1||j&&j.showChangeSetErrorDialog){if(!j||!j.showChangeSetErrorDialog){C.push(t.technicalDetails.originalMessage.message)}let n="<html><body>";const o=G(t,true);if(o){n=`<h6>${o}</h6><br>`}if(j&&j.fnGetMessageSubtitle){j.fnGetMessageSubtitle(t)}if(t.getCode()!=="503"&&t.getAdditionalText()!==undefined){n=`${n+t.getAdditionalText()}: ${t.getMessage()}</html></body>`}else{n=`${n+t.getMessage()}</html></body>`}const i=new r({htmlText:n});a.error(i,{onClose:function(){C=[];if(l){q()}X();e(true)}})}})}else{return Promise.resolve(true)}}function $(e,t,n,o){e.forEach(e=>{var r,a,i;e["headerName"]="";if(!((r=e.target)!==null&&r!==void 0&&r.length)&&((a=e.getCode)===null||a===void 0?void 0:a.call(e))!=="FE_CUSTOM_MESSAGE_CHANGESET_ALL_FAILED"){const t=g.getLibraryResourceBundle("sap.fe.core").getText("T_MESSAGE_BUTTON_SAPFE_MESSAGE_GROUP_GENERAL");e["headerName"]=t}else if((i=e.target)!==null&&i!==void 0&&i.length){if(o==="ListReport"){ge.setGroupNameLRTable(t,e,n)}else if(o==="ObjectPage"){ge.setGroupNameOPDisplayMode(e,n,t)}else{e["headerName"]=ge.getLastActionTextAndActionName(n)}}})}function L(e,t,n){const o=e&&e.getRowBinding();if(o){var r;const a=`${e.getRowBinding().getPath()}`;if(((r=t.target)===null||r===void 0?void 0:r.indexOf(a))===0){const r=o.getCurrentContexts();r.forEach(o=>{var r;if((r=t.target)!==null&&r!==void 0&&r.includes(o.getPath())){const r=`${o.getPath()}/`;const a=e.getParent().getIdentifierColumn();const i=a&&o.getObject()[a];const s=ge.getTableColProperty(e,t,r);const{sTableTargetColName:l}=ge.getTableColInfo(e,s);if(s&&l){t["headerName"]=i?` ${i}`:e.getHeader()}else{t["headerName"]=ge.getLastActionTextAndActionName(n)}}})}}}function w(e,t,n){const o=n===null||n===void 0?void 0:n.getBindingContext();const r=(n===null||n===void 0?void 0:n.getContent)&&(n===null||n===void 0?void 0:n.getContent()[0]);let a=true;if(r){ge.getVisibleSectionsFromObjectPageLayout(r).forEach(function(n){const r=n.getSubSections();r.forEach(function(n){n.findElements(true).forEach(function(r){if(r.isA("sap.ui.mdc.Table")){const l=r.getRowBinding(),u=true;let c;r.findElements(true).forEach(e=>{if(e.isA("sap.m.Table")||e.isA("sap.ui.table.Table")){c=e}});if(l){var i,s;const f=`${o===null||o===void 0?void 0:o.getPath()}/${(i=r.getRowBinding())===null||i===void 0?void 0:i.getPath()}`;if(((s=e.target)===null||s===void 0?void 0:s.indexOf(f))===0){const o=ge.getTableColumnDataAndSetSubtile(e,r,c,l,t,u,U);const{oTargetTableInfo:i}=o;if(u){const t=r.getParent().getIdentifierColumn();if(t){const n=r.getRowBinding().getContexts();n.forEach(n=>{var o;if((o=e.target)!==null&&o!==void 0&&o.includes(n.getPath())){const o=t?n.getObject()[t]:undefined;e["additionalText"]=`${o}, ${i.sTableTargetColName}`}})}else{e["additionalText"]=`${i.sTableTargetColName}`}let o=r.getHeaderVisible()&&i.tableHeader;if(!o){o=n.getTitle()}else{const e=g.getLibraryResourceBundle("sap.fe.core");o=`${e.getText("T_MESSAGE_GROUP_TITLE_TABLE_DENOMINATOR")}: ${o}`}e["headerName"]=o;a=false}}}}})})})}if(a){var i;const n=`${o===null||o===void 0?void 0:o.getPath()}`;if(((i=e.target)===null||i===void 0?void 0:i.indexOf(n))===0){const n=ge.getLastActionTextAndActionName(t);e["headerName"]=n}else{const t=g.getLibraryResourceBundle("sap.fe.core").getText("T_MESSAGE_BUTTON_SAPFE_MESSAGE_GROUP_GENERAL");e["headerName"]=t}}}function B(e){const t=g.getLibraryResourceBundle("sap.fe.core").getText("T_MESSAGE_BUTTON_SAPFE_MESSAGE_GROUP_LAST_ACTION");return e?`${t}: ${e}`:""}function F(e){var t,n;if((t=e.headerName)!==null&&t!==void 0&&t.toString().includes("Last Action")){return 1}else if((n=e.headerName)!==null&&n!==void 0&&n.toString().includes("General")){return 3}else{return 2}}const U=(e,t,n)=>{if(n){const t=g.getLibraryResourceBundle("sap.fe.core").getText("T_MESSAGE_BUTTON_SAPFE_MESSAGE_GROUP_GENERAL");e["headerName"]=t}else{e["headerName"]=ge.getLastActionTextAndActionName(t)}};function H(e,t,n,o,r,a,i){const s=ge.getTableAndTargetInfo(t,e,n,o);s.tableHeader=t.getHeader();let l,u;if(!s.oTableRowContext){l=e.getControlIds().find(function(e){return ge.isControlInTable(t,e)})}if(l){const e=g.byId(l);u=ge.isControlPartOfCreationRow(e)}if(!s.sTableTargetColName){if(e.persistent&&r){i(e,r);a=false}}const c=ge.getMessageSubtitle(e,s.oTableRowBindingContexts,s.oTableRowContext,s.sTableTargetColName,t,u);return{oTargetTableInfo:s,subTitle:c}}function V(e,t,n,o,r,a,i){let s;let l;const u=S(r);const g=r.getParent().getIdentifierColumn();const c=ge.fetchColumnInfo(e,r);if(a){s=u.getText("T_MESSAGE_ITEM_SUBTITLE",[u.getText("T_MESSAGE_ITEM_SUBTITLE_CREATION_ROW_INDICATOR"),o?o:c.label])}else{const e=ge.getTableFirstColBindingContextForTextAnnotation(r,n,g);const a=e?e.getObject("$Path"):undefined;const f=a&&e?e.getObject("@com.sap.vocabularies.UI.v1.TextArrangement/$EnumMember"):undefined;if(t.length>0){if(i){l=i.getValue()}else if(n&&g){l=ge.getTableFirstColValue(g,n,a,f)}else{l=undefined}const e=ge.determineColumnInfo(c,u);if(l&&o){s=u.getText("T_MESSAGE_ITEM_SUBTITLE",[l,o])}else if(l&&e.sColumnIndicator==="Hidden"){s=`${u.getText("T_MESSAGE_GROUP_DESCRIPTION_TABLE_ROW")}: ${l}, ${e.sColumnValue}`}else if(l&&e.sColumnIndicator==="Unknown"){s=u.getText("T_MESSAGE_ITEM_SUBTITLE",[l,e.sColumnValue])}else if(l&&e.sColumnIndicator==="undefined"){s=`${u.getText("T_MESSAGE_GROUP_DESCRIPTION_TABLE_ROW")}: ${l}`}else if(!l&&o){s=u.getText("T_MESSAGE_GROUP_DESCRIPTION_TABLE_COLUMN")+": "+o}else if(!l&&e.sColumnIndicator==="Hidden"){s=e.sColumnValue}else{s=null}}else{s=null}}return s}function j(e,t,n){let o;if(t&&n){const r=e===null||e===void 0?void 0:e.getModel();const a=r===null||r===void 0?void 0:r.getMetaModel();const i=a===null||a===void 0?void 0:a.getMetaPath(t.getPath());if(a!==null&&a!==void 0&&a.getObject(`${i}/${n}@com.sap.vocabularies.Common.v1.Text/$Path`)){o=a.createBindingContext(`${i}/${n}@com.sap.vocabularies.Common.v1.Text`)}}return o}function k(e,t,n,o){const r=t.getValue(e);let a;let i=r;if(n){if(e.lastIndexOf("/")>0){e=e.slice(0,e.lastIndexOf("/")+1);e=e.concat(n)}else{e=n}a=t.getValue(e);if(a){if(o){const e=o.slice(o.indexOf("/")+1);switch(e){case"TextOnly":i=a;break;case"TextFirst":i=`${a} (${r})`;break;case"TextLast":i=`${r} (${a})`;break;case"TextSeparate":i=r;break;default:}}else{i=`${a} (${r})`}}}return i}function W(e,t){const n=e===null||e===void 0?void 0:e.getTargets()[0].split("/").pop();return t.getParent().getTableDefinition().columns.find(function(e){return e.key.split("::").pop()===n})}function Y(e,t){const n={sColumnIndicator:String,sColumnValue:String};if(e){if(e.availability==="Hidden"){n.sColumnValue=undefined;n.sColumnIndicator="undefined"}else{n.sColumnValue=`${t.getText("T_MESSAGE_GROUP_DESCRIPTION_TABLE_COLUMN")} (${t.getText("T_COLUMN_INDICATOR_IN_TABLE_DEFINITION")}): ${e.label}`;n.sColumnIndicator="Hidden"}}else{n.sColumnValue=t.getText("T_MESSAGE_ITEM_SUBTITLE_INDICATOR_UNKNOWN");n.sColumnIndicator="Unknown"}return n}function K(e,t){const n=g.byId(t);if(n&&!n.isA("sap.ui.table.Table")&&!n.isA("sap.m.Table")){return e.findElements(true,function(e){return e.getId()===n})}return false}function z(e){let t=e===null||e===void 0?void 0:e.getParent();while(t&&!((n=t)!==null&&n!==void 0&&n.isA("sap.ui.table.Row"))&&!((o=t)!==null&&o!==void 0&&o.isA("sap.ui.table.CreationRow"))&&!((r=t)!==null&&r!==void 0&&r.isA("sap.m.ColumnListItem"))){var n,o,r;t=t.getParent()}return!!t&&t.isA("sap.ui.table.CreationRow")}function Q(e){const t=g.getLibraryResourceBundle("sap.fe.core");switch(e){case"Error":return t.getText("C_COMMON_SAPFE_ERROR_MESSAGES_PAGE_TITLE_ERROR");case"Information":return t.getText("C_MESSAGE_HANDLING_SAPFE_ERROR_MESSAGES_PAGE_TITLE_INFO");case"Success":return t.getText("C_MESSAGE_HANDLING_SAPFE_ERROR_MESSAGES_PAGE_TITLE_SUCCESS");case"Warning":return t.getText("C_MESSAGE_HANDLING_SAPFE_ERROR_MESSAGES_PAGE_TITLE_WARNING");default:return t.getText("C_MESSAGE_HANDLING_SAPFE_ERROR_MESSAGES_PAGE_TITLE")}}function X(){ee(false)}function q(e){ee(true,e)}function J(e,t){if(t===undefined){return e.getObject("/")}const n=e.bindList("/");n.filter(new T({path:"target",operator:m.StartsWith,value1:t}));return n.getCurrentContexts().map(function(e){return e.getObject()})}function Z(){let e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;let n=arguments.length>2?arguments[2]:undefined;let o;const r=g.getMessageManager(),a=r.getMessageModel(),i=g.getLibraryResourceBundle("sap.fe.core"),s=[];let l=[];if(e&&t&&n){l=J(a,n)}else{l=a.getObject("/")}for(o=0;o<l.length;o++){if((!t||l[o].persistent)&&(e&&l[o].target!==""||!e&&(!l[o].target||l[o].target===""))){s.push(l[o])}}for(o=0;o<s.length;o++){if(s[o].code==="503"&&s[o].message!==""&&s[o].message.indexOf(i.getText("C_MESSAGE_HANDLING_SAPFE_503_BACKEND_PREFIX"))===-1){s[o].message=`\n${i.getText("C_MESSAGE_HANDLING_SAPFE_503_BACKEND_PREFIX")}${s[o].message}`}}const u=[];for(o=0;o<s.length;o++){if(s[o].technicalDetails&&(s[o].technicalDetails.originalMessage!==undefined&&s[o].technicalDetails.originalMessage!==null||s[o].technicalDetails.httpStatus!==undefined&&s[o].technicalDetails.httpStatus!==null)||s[o].code){u.push(s[o])}}return u}function ee(e,t){const n=Z(e,true,t);if(n.length>0){g.getMessageManager().removeMessages(n)}}function te(e,t,n){if(n.additionalText===undefined){const o=e.getParent().getIdentifierColumn();const r=t.find(function(e){return n.getTargets()[0].indexOf(e.getPath())!==-1});n.additionalText=r?r.getObject()[o]:undefined}}function ne(e){return e.getSections().filter(function(e){return e.getVisible()})}function oe(e,t){return e.findElements(true,e=>se(t.getControlIds(),e)).sort(function(e,t){if(e.isA("sap.ui.mdc.Table")&&!t.isA("sap.ui.mdc.Table")){return-1}return 1})}function re(e,t,n){const o=function(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")};if(!n){var r;n=new RegExp(`${o(`${(r=e.getBindingContext())===null||r===void 0?void 0:r.getPath()}/${e.getRowBinding().getPath()}`)}\\(.*\\)/`)}return t.getTargets()[0].replace(n,"")}function ae(e,t){let n;let o=e.getColumns().find(function(e){return e.getDataProperty()==t});if(!o){const a=e.getControlDelegate().getColumnsFor(e).find(function(e){if(!!e.template&&e.propertyInfos){return e.propertyInfos[0]===t||e.propertyInfos[0].replace("Property::","")===t}else{return false}});if(a){var r;o=a;t=(r=o)===null||r===void 0?void 0:r.name;n=e.getColumns().find(function(e){return t===e.getDataProperty()}).getHeader()}else{const r=e.getControlDelegate().getColumnsFor(e);o=r.find(function(e){if(e.key.indexOf("::FieldGroup::")!==-1){var n;return(n=e.propertyInfos)===null||n===void 0?void 0:n.find(function(){return r.find(function(e){return e.relativePath===t})})}});let a=false;if(o&&o.label){a=e.getColumns().some(function(e){return e.getHeader()===o.label})}n=a&&o.label;t=a&&o.key}}else{n=o&&o.getHeader()}return{sTableTargetColName:n,sTableTargetColProperty:t}}function ie(e,t,n,o){const r={};r.sTableTargetColProperty=re(e,t);const a=ae(e,r.sTableTargetColProperty);r.oTableRowBindingContexts=n.isA("sap.ui.table.Table")?o.getContexts():o.getCurrentContexts();r.sTableTargetColName=a.sTableTargetColName;r.sTableTargetColProperty=a.sTableTargetColProperty;r.oTableRowContext=r.oTableRowBindingContexts.find(function(e){return e&&t.getTargets()[0].indexOf(e.getPath())===0});return r}function se(e,t){return e.some(function(e){if(e===t.getId()){return true}return false})}function le(e,t,n,o,r){return e.getTitle()+(t.getTitle()&&n?`, ${t.getTitle()}`:"")+(o?`, ${r.getText("T_MESSAGE_GROUP_TITLE_TABLE_DENOMINATOR")}: ${o.tableHeader}`:"")}function ue(e,t){return!t.some(function(t){let n=e.getParent();while(n&&n!==t){n=n.getParent()}return n?true:false})}const ge={getMessages:Z,showUnboundMessages:D,removeUnboundTransitionMessages:X,removeBoundTransitionMessages:q,modifyETagMessagesOnly:O,getRetryAfterMessage:G,prepareMessageViewForDialog:v,setMessageSubtitle:te,getVisibleSectionsFromObjectPageLayout:ne,getControlFromMessageRelatingToSubSection:oe,fnFilterUponIds:se,getTableAndTargetInfo:ie,createSectionGroupName:le,bIsOrphanElement:ue,getLastActionTextAndActionName:B,getTableColumnDataAndSetSubtile:H,getTableColInfo:ae,getTableColProperty:re,getMessageSubtitle:V,determineColumnInfo:Y,fetchColumnInfo:W,getTableFirstColBindingContextForTextAnnotation:j,getMessageRank:F,fnCallbackSetGroupName:U,getTableFirstColValue:k,setGroupNameOPDisplayMode:w,updateMessageObjectGroupName:$,setGroupNameLRTable:L,isControlInTable:K,isControlPartOfCreationRow:z};return ge},false);
|
|
276
276
|
/*!
|
|
277
277
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
278
278
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
@@ -397,7 +397,7 @@ sap.ui.predefine("sap/fe/core/converters/controls/Common/Action", ["sap/base/Log
|
|
|
397
397
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
398
398
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
399
399
|
*/
|
|
400
|
-
sap.ui.predefine("sap/fe/core/converters/controls/Common/Chart", ["sap/base/Log","sap/fe/core/converters/annotations/DataField","sap/fe/core/converters/controls/Common/Action","sap/fe/core/converters/helpers/ConfigurableObject","sap/fe/core/converters/helpers/Key","sap/fe/core/helpers/BindingToolkit","sap/fe/core/templating/DataModelPathHelper","sap/ui/core/Core","../../helpers/Aggregation","../../helpers/ID","../../helpers/InsightsHelpers","../../ManifestSettings"],function(t,e,n,a,o,i,r,s,l,g,c,p){"use strict";var u={};var d=p.VisualizationType;var v=p.VariantManagementType;var f=p.TemplateType;var m=p.ActionType;var y=c.getInsightsVisibility;var h=g.getFilterBarID;var P=g.getChartID;var
|
|
400
|
+
sap.ui.predefine("sap/fe/core/converters/controls/Common/Chart", ["sap/base/Log","sap/fe/core/converters/annotations/DataField","sap/fe/core/converters/controls/Common/Action","sap/fe/core/converters/helpers/ConfigurableObject","sap/fe/core/converters/helpers/Key","sap/fe/core/helpers/BindingToolkit","sap/fe/core/templating/DataModelPathHelper","sap/ui/core/Core","../../helpers/Aggregation","../../helpers/ID","../../helpers/InsightsHelpers","../../ManifestSettings"],function(t,e,n,a,o,i,r,s,l,g,c,p){"use strict";var u={};var d=p.VisualizationType;var v=p.VariantManagementType;var f=p.TemplateType;var m=p.ActionType;var y=c.getInsightsVisibility;var h=c.getInsightsEnablement;var b=g.getFilterBarID;var P=g.getChartID;var A=l.AggregationHelper;var T=r.getTargetObjectPath;var S=i.not;var C=i.getExpressionFromAnnotation;var I=i.equal;var M=i.compileExpression;var O=i.and;var D=o.KeyHelper;var E=a.OverrideType;var F=a.insertCustomElements;var V=n.getActionsFromManifest;var N=e.isDataFieldForActionAbstract;function w(t,e,n){const a=[];if(t){const e=t.Actions||[];e.forEach(t=>{var e;let o;if(N(t)&&!t.Inline&&!t.Determining){const a=D.generateKeyFromDataField(t);switch(t.$Type){case"com.sap.vocabularies.UI.v1.DataFieldForAction":if(!((e=t.ActionTarget)!==null&&e!==void 0&&e.isBound)){o={type:m.DataFieldForAction,annotationPath:n.getEntitySetBasedAnnotationPath(t.fullyQualifiedName),key:a,visible:j(t,n)}}break;case"com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation":o={type:m.DataFieldForIntentBasedNavigation,annotationPath:n.getEntitySetBasedAnnotationPath(t.fullyQualifiedName),key:a,visible:j(t,n),isNavigable:true};break}}if(o){a.push(o)}})}return a}function B(t,e,n){const a=w(t,e,n);const o=V(n.getManifestControlConfiguration(e).actions,n,a);const i={enabled:E.overwrite,enableOnSelect:E.overwrite,visible:E.overwrite,command:E.overwrite};const r=F(a,o.actions,i);return{actions:r,commandActions:o.commandActions}}u.getChartActions=B;function $(t,e){var n;const a=e.getManifestWrapper();const o=e.getManifestControlConfiguration(t);const i=a.getVariantManagement();const r=[];const s=o===null||o===void 0?void 0:(n=o.chartSettings)===null||n===void 0?void 0:n.personalization;const l=i===v.Control?true:false;if(s!==undefined&&!s||s=="false"){return undefined}switch(true){case typeof s==="object":if(s.type){r.push("Type")}if(s.item){r.push("Item")}if(s.sort){r.push("Sort")}if(s.filter){r.push("Filter")}return r.join(",");case l:case!!s:return"Sort,Type,Item,Filter";default:return"Sort,Type,Item"}}u.getP13nMode=$;function z(t){var e;return(t===null||t===void 0?void 0:(e=t.annotationPath)===null||e===void 0?void 0:e.indexOf(`@${"com.sap.vocabularies.UI.v1.SelectionPresentationVariant"}`))!==-1?t===null||t===void 0?void 0:t.annotationPath:undefined}function L(t){let e;if(t!==null&&t!==void 0&&t.Property){var n;e={Property:{$PropertyPath:t===null||t===void 0?void 0:(n=t.Property)===null||n===void 0?void 0:n.value}}}else{e={Property:{$PropertyPath:t===null||t===void 0?void 0:t.name}}}return e}function x(e,n,a,o,i){var r;const l=new A(a.getEntityType(),a,true);if(!o&&!l.isAnalyticsSupported()){throw new Error("ApplySupported is not added to the annotations")}const g=l.getTransAggregations();const c=l.getCustomAggregateDefinitions();const p=a.getManifestWrapper();const u=p.getVariantManagement();const v=$(n,a);if(v===undefined&&u==="Control"){t.warning("Variant Management cannot be enabled when personalization is disabled")}const m={};const S=z(i);if(c){const t=l.getEntityType();for(const e of c){var C,I,M,D,E;const n=e===null||e===void 0?void 0:(C=e.annotations)===null||C===void 0?void 0:(I=C.Aggregation)===null||I===void 0?void 0:I.ContextDefiningProperties;const a=e===null||e===void 0?void 0:e.qualifier;const o=a&&t.entityProperties.find(t=>t.name===a);const i=o&&(o===null||o===void 0?void 0:(M=o.annotations)===null||M===void 0?void 0:(D=M.Common)===null||D===void 0?void 0:(E=D.Label)===null||E===void 0?void 0:E.toString());m[a]={name:a,label:i||`Custom Aggregate (${a})`,sortable:true,sortOrder:"both",contextDefiningProperty:n?n.map(t=>t.value):[]}}}const F={};const V=s.getLibraryResourceBundle("sap.fe.core");if(g){for(let t=0;t<g.length;t++){var N,w,x,j,k,R;F[g[t].Name]={name:g[t].Name,propertyPath:g[t].AggregatableProperty.valueOf().value,aggregationMethod:g[t].AggregationMethod,label:(N=g[t])!==null&&N!==void 0&&(w=N.annotations)!==null&&w!==void 0&&(x=w.Common)!==null&&x!==void 0&&x.Label?(j=g[t])===null||j===void 0?void 0:(k=j.annotations)===null||k===void 0?void 0:(R=k.Common)===null||R===void 0?void 0:R.Label.toString():`${V.getText("AGGREGATABLE_PROPERTY")} (${g[t].Name})`,sortable:true,sortOrder:"both",custom:false}}}const H=l.getAggregatableProperties();const Q=l.getGroupableProperties();const U={};U.$Type="Org.OData.Aggregation.V1.ApplySupportedType";U.AggregatableProperties=[];U.GroupableProperties=[];if(H){U.AggregatableProperties=H.map(t=>L(t))}if(Q){U.GroupableProperties=Q.map(t=>({["$PropertyPath"]:t.value}))}const W=B(e,n,a);let[K]=n.split("@");if(K.lastIndexOf("/")===K.length-1){K=K.substr(0,K.length-1)}const q=((r=e.Title)===null||r===void 0?void 0:r.toString())||"";const J=a.getDataModelObjectPath();const Y=K.length===0;const _=J.targetEntitySet?J.targetEntitySet.name:J.startingEntitySet.name;const X=Y?b(a.getContextPath()):undefined;const Z={legendGroup:{layout:{position:"bottom"}}};let tt;if(a.getTemplateType()===f.ObjectPage){tt=true}else if(a.getTemplateType()===f.ListReport||a.getTemplateType()===f.AnalyticalListPage){tt=false}const et=a.getManifestWrapper().hasMultipleVisualizations()||a.getTemplateType()===f.AnalyticalListPage;const nt=et?".handlers.onSegmentedButtonPressed":"";const at=et?"{= ${pageInternal>alpContentView} !== 'Table'}":"true";const ot=l.getAllowedTransformations();U.enableSearch=ot?ot.indexOf("search")>=0:true;let it="";if(e.fullyQualifiedName.split("#").length>1){it=e.fullyQualifiedName.split("#")[1]}const rt=y("Analytical",a,n);const st=O(h(),rt);return{type:d.Chart,id:it?P(Y?_:K,it,d.Chart):P(Y?_:K,d.Chart),collection:T(a.getDataModelObjectPath()),entityName:_,personalization:$(n,a),navigationPath:K,annotationPath:a.getAbsoluteAnnotationPath(n),filterId:X,vizProperties:JSON.stringify(Z),actions:W.actions,commandActions:W.commandActions,title:q,autoBindOnInit:tt,onSegmentedButtonPressed:nt,visible:at,customAgg:m,transAgg:F,applySupported:U,selectionPresentationVariantPath:S,variantManagement:G(v,u),isInsightsEnabled:st,isInsightsVisible:rt}}u.createChartVisualization=x;function G(t,e){return e==="Control"&&!t?v.None:e}function j(t,e){var n,a;return M(S(I(C((n=t.annotations)===null||n===void 0?void 0:(a=n.UI)===null||a===void 0?void 0:a.Hidden,[],undefined,e.getRelativeModelPathFunction()),true)))}function k(t){const e=t.getManifestWrapper().hasMultipleVisualizations()||t.getTemplateType()===f.AnalyticalListPage;const n=t.getDataModelObjectPath();const a=n.targetEntitySet?n.targetEntitySet.name:n.startingEntitySet.name;const o={type:d.Chart,id:P(a,d.Chart),entityName:a,title:"",collection:"",personalization:undefined,navigationPath:"",annotationPath:"",vizProperties:JSON.stringify({legendGroup:{layout:{position:"bottom"}}}),actions:[],commandActions:{},autoBindOnInit:false,onSegmentedButtonPressed:"",visible:e?"{= ${pageInternal>alpContentView} !== 'Table'}":"true",customAgg:{},transAgg:{},applySupported:{$Type:"Org.OData.Aggregation.V1.ApplySupportedType",AggregatableProperties:[],GroupableProperties:[],enableSearch:false},multiViews:false,variantManagement:v.None};return o}u.createBlankChartVisualization=k;return u},false);
|
|
401
401
|
/*!
|
|
402
402
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
403
403
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
@@ -407,7 +407,7 @@ sap.ui.predefine("sap/fe/core/converters/controls/Common/Criticality", ["sap/fe/
|
|
|
407
407
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
408
408
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
409
409
|
*/
|
|
410
|
-
sap.ui.predefine("sap/fe/core/converters/controls/Common/DataVisualization", ["sap/fe/core/converters/helpers/IssueManager","sap/fe/core/converters/MetaModelConverter","sap/fe/macros/CommonHelper","../../ManifestSettings","./Chart","./Table"],function(t,n,e,a,i,o){"use strict";var r={};var s=i.createChartVisualization;var l=i.createBlankChartVisualization;var u=a.TemplateType;var c=t.IssueType;var v=t.IssueSeverity;var f=t.IssueCategory;const d=function(t,n,e,a){const i=[];const o=S(e);const r=n.split("@")[0];if((a===true||o)&&!I(t,o)){if(!y(t,"com.sap.vocabularies.UI.v1.LineItem")){const t=z("com.sap.vocabularies.UI.v1.LineItem",r,e);if(t){i.push(t)}}if(!y(t,"com.sap.vocabularies.UI.v1.Chart")){const t=z("com.sap.vocabularies.UI.v1.Chart",r,e);if(t){i.push(t)}}}const s=t.Visualizations;const l=function(t){const n=s===null||s===void 0?void 0:s.find(n=>{var e;return t.indexOf((e=n.$target)===null||e===void 0?void 0:e.term)>=0});if(n){i.push({visualization:n.$target,annotationPath:`${r}${n.value}`,converterContext:e})}};if(o){l(["com.sap.vocabularies.UI.v1.LineItem"]);l(["com.sap.vocabularies.UI.v1.Chart"])}else{l(["com.sap.vocabularies.UI.v1.LineItem","com.sap.vocabularies.UI.v1.Chart"])}return i};r.getVisualizationsFromPresentationVariant=d;function p(t,n,e){if(n){const t=e.getEntityTypeAnnotation(n);const a=t.annotation;if(a){if(a.term==="com.sap.vocabularies.UI.v1.SelectionPresentationVariant"){return a}}else{throw new Error("Annotation Path for the SPV mentioned in the manifest is not found, Please add the SPV in the annotation")}}else{var a,i;return(a=t.annotations)===null||a===void 0?void 0:(i=a.UI)===null||i===void 0?void 0:i.SelectionPresentationVariant}}r.getSelectionPresentationVariant=p;function m(t,n){const e=t&&t.PresentationVariant;if(e){return I(e,n)}else{throw new Error("Presentation Variant is not present in the SPV annotation")}}r.isSelectionPresentationCompliant=m;function I(t){let n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;let e=false,a=false;if(n){if(t!==null&&t!==void 0&&t.Visualizations){const n=t.Visualizations;n.forEach(t=>{var n,i;if(((n=t.$target)===null||n===void 0?void 0:n.term)==="com.sap.vocabularies.UI.v1.LineItem"){e=true}if(((i=t.$target)===null||i===void 0?void 0:i.term)==="com.sap.vocabularies.UI.v1.Chart"){a=true}})}return a&&e}else{return(t===null||t===void 0?void 0:t.Visualizations)&&!!t.Visualizations.find(t=>{var n,e;return((n=t.$target)===null||n===void 0?void 0:n.term)==="com.sap.vocabularies.UI.v1.LineItem"||((e=t.$target)===null||e===void 0?void 0:e.term)==="com.sap.vocabularies.UI.v1.Chart"})}}r.isPresentationCompliant=I;function h(t){var n;return(n=t.annotations.UI)===null||n===void 0?void 0:n.LineItem}r.getDefaultLineItem=h;function g(t){var n;return(n=t.annotations.UI)===null||n===void 0?void 0:n.Chart}r.getDefaultChart=g;function P(t){var n,e;return(n=t.annotations)===null||n===void 0?void 0:(e=n.UI)===null||e===void 0?void 0:e.PresentationVariant}r.getDefaultPresentationVariant=P;function V(t){var n,e;return(n=t.annotations)===null||n===void 0?void 0:(e=n.UI)===null||e===void 0?void 0:e.SelectionVariant}r.getDefaultSelectionVariant=V;function b(t,n){const e=n.getManifestWrapper().getDefaultTemplateAnnotationPath();const a=p(t,e,n);let i;if(a){i=a.SelectionVariant;if(i){return i}}else{i=V(t);return i}}r.getSelectionVariant=b;function C(t,n,e,a,i,r,u,p){const m=t!==""?e.getEntityTypeAnnotation(t):{annotation:undefined,converterContext:e};const I=r?e.getEntityTypeAnnotation(r):null;const h=m.annotation;e=m.converterContext;let g=[];let P;let V="";let b,C;const U=h===null||h===void 0?void 0:h.term;if(U){switch(U){case"com.sap.vocabularies.UI.v1.LineItem":case"com.sap.vocabularies.UI.v1.Chart":P=I===null||I===void 0?void 0:I.annotation;g.push({visualization:h,annotationPath:t,converterContext:e});break;case"com.sap.vocabularies.UI.v1.PresentationVariant":P=h;g=g.concat(d(h,t,e,u));break;case"com.sap.vocabularies.UI.v1.SelectionPresentationVariant":P=h.PresentationVariant;V=P.fullyQualifiedName;g=g.concat(d(P,t,e,u));break;default:break}g.forEach(t=>{const{visualization:e,annotationPath:r,converterContext:l}=t;switch(e.term){case"com.sap.vocabularies.UI.v1.Chart":b=s(e,r,l,i,a
|
|
410
|
+
sap.ui.predefine("sap/fe/core/converters/controls/Common/DataVisualization", ["sap/fe/core/converters/helpers/IssueManager","sap/fe/core/converters/MetaModelConverter","sap/fe/macros/CommonHelper","../../ManifestSettings","./Chart","./Table"],function(t,n,e,a,i,o){"use strict";var r={};var s=i.createChartVisualization;var l=i.createBlankChartVisualization;var u=a.TemplateType;var c=t.IssueType;var v=t.IssueSeverity;var f=t.IssueCategory;const d=function(t,n,e,a){const i=[];const o=S(e);const r=n.split("@")[0];if((a===true||o)&&!I(t,o)){if(!y(t,"com.sap.vocabularies.UI.v1.LineItem")){const t=z("com.sap.vocabularies.UI.v1.LineItem",r,e);if(t){i.push(t)}}if(!y(t,"com.sap.vocabularies.UI.v1.Chart")){const t=z("com.sap.vocabularies.UI.v1.Chart",r,e);if(t){i.push(t)}}}const s=t.Visualizations;const l=function(t){const n=s===null||s===void 0?void 0:s.find(n=>{var e;return t.indexOf((e=n.$target)===null||e===void 0?void 0:e.term)>=0});if(n){i.push({visualization:n.$target,annotationPath:`${r}${n.value}`,converterContext:e})}};if(o){l(["com.sap.vocabularies.UI.v1.LineItem"]);l(["com.sap.vocabularies.UI.v1.Chart"])}else{l(["com.sap.vocabularies.UI.v1.LineItem","com.sap.vocabularies.UI.v1.Chart"])}return i};r.getVisualizationsFromPresentationVariant=d;function p(t,n,e){if(n){const t=e.getEntityTypeAnnotation(n);const a=t.annotation;if(a){if(a.term==="com.sap.vocabularies.UI.v1.SelectionPresentationVariant"){return a}}else{throw new Error("Annotation Path for the SPV mentioned in the manifest is not found, Please add the SPV in the annotation")}}else{var a,i;return(a=t.annotations)===null||a===void 0?void 0:(i=a.UI)===null||i===void 0?void 0:i.SelectionPresentationVariant}}r.getSelectionPresentationVariant=p;function m(t,n){const e=t&&t.PresentationVariant;if(e){return I(e,n)}else{throw new Error("Presentation Variant is not present in the SPV annotation")}}r.isSelectionPresentationCompliant=m;function I(t){let n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;let e=false,a=false;if(n){if(t!==null&&t!==void 0&&t.Visualizations){const n=t.Visualizations;n.forEach(t=>{var n,i;if(((n=t.$target)===null||n===void 0?void 0:n.term)==="com.sap.vocabularies.UI.v1.LineItem"){e=true}if(((i=t.$target)===null||i===void 0?void 0:i.term)==="com.sap.vocabularies.UI.v1.Chart"){a=true}})}return a&&e}else{return(t===null||t===void 0?void 0:t.Visualizations)&&!!t.Visualizations.find(t=>{var n,e;return((n=t.$target)===null||n===void 0?void 0:n.term)==="com.sap.vocabularies.UI.v1.LineItem"||((e=t.$target)===null||e===void 0?void 0:e.term)==="com.sap.vocabularies.UI.v1.Chart"})}}r.isPresentationCompliant=I;function h(t){var n;return(n=t.annotations.UI)===null||n===void 0?void 0:n.LineItem}r.getDefaultLineItem=h;function g(t){var n;return(n=t.annotations.UI)===null||n===void 0?void 0:n.Chart}r.getDefaultChart=g;function P(t){var n,e;return(n=t.annotations)===null||n===void 0?void 0:(e=n.UI)===null||e===void 0?void 0:e.PresentationVariant}r.getDefaultPresentationVariant=P;function V(t){var n,e;return(n=t.annotations)===null||n===void 0?void 0:(e=n.UI)===null||e===void 0?void 0:e.SelectionVariant}r.getDefaultSelectionVariant=V;function b(t,n){const e=n.getManifestWrapper().getDefaultTemplateAnnotationPath();const a=p(t,e,n);let i;if(a){i=a.SelectionVariant;if(i){return i}}else{i=V(t);return i}}r.getSelectionVariant=b;function C(t,n,e,a,i,r,u,p){const m=t!==""?e.getEntityTypeAnnotation(t):{annotation:undefined,converterContext:e};const I=r?e.getEntityTypeAnnotation(r):null;const h=m.annotation;e=m.converterContext;let g=[];let P;let V="";let b,C;const U=h===null||h===void 0?void 0:h.term;if(U){switch(U){case"com.sap.vocabularies.UI.v1.LineItem":case"com.sap.vocabularies.UI.v1.Chart":P=I===null||I===void 0?void 0:I.annotation;g.push({visualization:h,annotationPath:t,converterContext:e});break;case"com.sap.vocabularies.UI.v1.PresentationVariant":P=h;g=g.concat(d(h,t,e,u));break;case"com.sap.vocabularies.UI.v1.SelectionPresentationVariant":P=h.PresentationVariant;V=P.fullyQualifiedName;g=g.concat(d(P,t,e,u));break;default:break}g.forEach(t=>{const{visualization:e,annotationPath:r,converterContext:l}=t;switch(e.term){case"com.sap.vocabularies.UI.v1.Chart":b=s(e,r,l,i,a);break;case"com.sap.vocabularies.UI.v1.LineItem":default:C=o.createTableVisualization(e,r,l,P,n,a,p);break}})}const y=[];let z=U==="com.sap.vocabularies.UI.v1.SelectionPresentationVariant"?V:h===null||h===void 0?void 0:h.fullyQualifiedName;if(z===undefined){z="/"}const M=S(e);if(!U||M&&C===undefined){C=o.createDefaultTableVisualization(e,u!==true);e.getDiagnostics().addIssue(f.Annotation,v.Medium,c.MISSING_LINEITEM)}if(M&&b===undefined){b=l(e);e.getDiagnostics().addIssue(f.Annotation,v.Medium,c.MISSING_CHART)}if(b){y.push(b)}if(C){y.push(C)}return{visualizations:y,annotationPath:e.getEntitySetBasedAnnotationPath(z)}}r.getDataVisualizationConfiguration=C;function U(t,a){e.validatePresentationMetaPath(t.getPath(),a);const i=n.convertMetaModelContext(t),o=e.createPresentationPathContext(t),r=t.getModel();if(i){if(e._isPresentationVariantAnnotation(o.getPath())){const n=i.PresentationVariant?i.PresentationVariant.Visualizations:i.Visualizations;if(Array.isArray(n)){for(const e of n){if(e.type=="AnnotationPath"&&e.value.indexOf(a)!==-1&&!!r.getMetaContext(t.getPath().split("@")[0]+e.value).getObject()){a=e.value;break}}}}else{return t}}return r.getMetaContext(t.getPath().split("@")[0]+a)}r.getUiControl=U;const y=function(t,n){var e;return((e=t.Visualizations)===null||e===void 0?void 0:e.some(t=>t.value.indexOf(n)>-1))??false};r.annotationExistsInPresentationVariant=y;const z=function(t,n,e){const a=e.getEntityType();const i=t==="com.sap.vocabularies.UI.v1.LineItem"?h(a):g(a);if(i){return{visualization:i,annotationPath:`${n}${e.getRelativeAnnotationPath(i.fullyQualifiedName,a)}`,converterContext:e}}return undefined};r.prepareDefaultVisualization=z;const S=function(t){return t.getManifestWrapper().hasMultipleVisualizations()||t.getTemplateType()===u.AnalyticalListPage};r.isAlpAnnotation=S;return r},false);
|
|
411
411
|
/*!
|
|
412
412
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
413
413
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
@@ -422,12 +422,12 @@ sap.ui.predefine("sap/fe/core/converters/controls/Common/KPI", ["sap/fe/core/con
|
|
|
422
422
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
423
423
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
424
424
|
*/
|
|
425
|
-
sap.ui.predefine("sap/fe/core/converters/controls/Common/Table", ["sap/fe/core/converters/annotations/DataField","sap/fe/core/converters/controls/Common/Action","sap/fe/core/converters/helpers/BindingHelper","sap/fe/core/converters/helpers/ConfigurableObject","sap/fe/core/converters/helpers/IssueManager","sap/fe/core/converters/helpers/Key","sap/fe/core/formatters/TableFormatter","sap/fe/core/formatters/TableFormatterTypes","sap/fe/core/helpers/BindingToolkit","sap/fe/core/helpers/ModelHelper","sap/fe/core/helpers/StableIdHelper","sap/fe/core/helpers/TypeGuards","sap/fe/core/templating/DataModelPathHelper","sap/fe/core/templating/DisplayModeFormatter","sap/fe/core/templating/EntitySetHelper","sap/fe/core/templating/PropertyHelper","sap/fe/core/templating/UIFormatters","sap/fe/macros/internal/helpers/ActionHelper","sap/ui/core/Core","../../helpers/Aggregation","../../helpers/DataFieldHelper","../../helpers/ID","../../ManifestSettings","./Criticality","./table/StandardActions"],function(e,t,n,o,i,a,l,r,s,d,u,c,v,f,p,g,m,y,b,h,T,I,P,A,D){"use strict";var F={};var C=D.isInDisplayMode;var S=D.isDraftOrStickySupported;var E=D.getStandardActionPaste;var O=D.getStandardActionMassEdit;var x=D.getStandardActionInsights;var M=D.getStandardActionDelete;var U=D.getStandardActionCreate;var $=D.getRestrictions;var N=D.getMassEditVisibility;var w=D.getInsertUpdateActionsTemplating;var V=D.getDeleteVisibility;var L=D.getCreationRow;var R=D.generateStandardActionsContext;var k=A.getMessageTypeFromCriticalityType;var H=P.VisualizationType;var j=P.VariantManagementType;var B=P.TemplateType;var z=P.SelectionMode;var G=P.Importance;var K=P.HorizontalAlign;var W=P.CreationMode;var Q=P.ActionType;var q=I.getTableID;var _=T.isReferencePropertyStaticallyHidden;var Y=h.AggregationHelper;var J=m.isMultiValueField;var X=g.isImageURL;var Z=g.hasUnit;var ee=g.hasCurrency;var te=g.getAssociatedUnitProperty;var ne=g.getAssociatedTimezoneProperty;var oe=g.getAssociatedCurrencyProperty;var ie=p.getNonSortablePropertiesRestrictions;var ae=f.getDisplayMode;var le=v.isPathUpdatable;var re=v.isPathSearchable;var se=v.isPathDeletable;var de=v.getTargetObjectPath;var ue=v.enhanceDataModelPath;var ce=c.isTypeDefinition;var ve=c.isProperty;var fe=c.isPathAnnotationExpression;var pe=c.isNavigationProperty;var ge=c.isAnnotationOfType;var me=u.replaceSpecialChars;var ye=u.generate;var be=s.resolveBindingString;var he=s.pathInModel;var Te=s.or;var Ie=s.not;var Pe=s.isConstant;var Ae=s.ifElse;var De=s.getExpressionFromAnnotation;var Fe=s.formatResult;var Ce=s.equal;var Se=s.EDM_TYPE_MAPPING;var Ee=s.constant;var Oe=s.compileExpression;var xe=s.and;var Me=r.MessageType;var Ue=a.KeyHelper;var $e=i.IssueType;var Ne=i.IssueSeverity;var we=i.IssueCategoryType;var Ve=i.IssueCategory;var Le=o.Placement;var Re=o.OverrideType;var ke=o.insertCustomElements;var He=n.UI;var je=n.Entity;var Be=t.getEnabledForAnnotationAction;var ze=t.removeDuplicateActions;var Ge=t.isActionNavigable;var Ke=t.getCopyAction;var We=t.getActionsFromManifest;var Qe=t.dataFieldIsCopyAction;var qe=e.isDataPointFromDataFieldDefault;var _e=e.isDataFieldTypes;var Ye=e.isDataFieldForActionAbstract;var Je=e.getTargetValueOnDataPoint;var Xe=e.getSemanticObjectPath;var Ze=e.getDataFieldDataType;var et=e.collectRelatedPropertiesRecursively;var tt=e.collectRelatedProperties;var nt;(function(e){e["Default"]="Default";e["Annotation"]="Annotation";e["Slot"]="Slot"})(nt||(nt={}));function ot(e,t,n,o){const i=At(e,t,n);const a=i.tableActions;const l=i.hiddenTableActions;const r=We(n.getManifestControlConfiguration(t).actions,n,a,o,true,l);const s={isNavigable:Re.overwrite,enableOnSelect:Re.overwrite,enableAutoScroll:Re.overwrite,enabled:Re.overwrite,visible:Re.overwrite,defaultValuesExtensionFunction:Re.overwrite,command:Re.overwrite};const d=ke(a,r.actions,s);return{actions:d,commandActions:r.commandActions}}F.getTableActions=ot;function it(e,t,n,o,i){const a=nn(e,t,n,i);const l=ln(n.getManifestControlConfiguration(t).columns,a,n,n.getAnnotationEntityType(e),o);return ke(a,l,{width:Re.overwrite,importance:Re.overwrite,horizontalAlign:Re.overwrite,availability:Re.overwrite,isNavigable:Re.overwrite,settings:Re.overwrite,formatOptions:Re.overwrite})}F.getTableColumns=it;const at=function(e,t,n){const o=new Y(e,n);function i(e){return t.find(t=>{const n=t;return n.propertyInfos===undefined&&n.relativePath===e})}if(!o.isAnalyticsSupported()){return undefined}const a=new Set;t.forEach(e=>{const t=e;if(t.unit){a.add(t.unit)}});const l=o.getCustomAggregateDefinitions();const r={};l.forEach(e=>{const t=o._entityType.entityProperties.find(t=>t.name===e.qualifier);if(t){var n,i;const o=(n=e.annotations)===null||n===void 0?void 0:(i=n.Aggregation)===null||i===void 0?void 0:i.ContextDefiningProperties;r[t.name]=o?o.map(e=>e.value):[]}});const s={};t.forEach(e=>{const t=e;if(t.propertyInfos===undefined&&t.relativePath){const e=r[t.relativePath];if(e&&!a.has(t.name)){s[t.name]={defaultAggregate:{},relativePath:t.relativePath};const n=[];e.forEach(e=>{const t=i(e);if(t){n.push(t.name)}});if(n.length){s[t.name].defaultAggregate.contextDefiningProperties=n}}}});return s};F.getAggregateDefinitionsFromEntityType=at;function lt(e,t,n,o){if(e.control.type==="AnalyticalTable"){const i=at(t,e.columns,n),a=new Y(t,n);if(i){e.enableAnalytics=true;e.enable$select=false;e.enable$$getKeepAliveContext=false;e.aggregates=i;fn(e);const t=a.getAllowedTransformations();e.enableBasicSearch=t?t.indexOf("search")>=0:true;e.annotation.groupConditions=vn(o,e.columns,e.control.type);e.annotation.aggregateConditions=pn(o,e.columns)}e.control.type="GridTable"}else if(e.control.type==="ResponsiveTable"){e.annotation.groupConditions=vn(o,e.columns,e.control.type)}else if(e.control.type==="TreeTable"){const o=new Y(t,n);const i=o.getAllowedTransformations();e.enableBasicSearch=i?i.includes("search"):true;e.enable$$getKeepAliveContext=true}}F.updateTableVisualizationForType=lt;function rt(e,t){const n=e.getManifestWrapper();if(t&&n.getNavigationConfiguration(t)){const e=n.getNavigationConfiguration(t);if(Object.keys(e).length>0){return t}}const o=e.getDataModelObjectPath();const i=e.getContextPath();const a=n.getNavigationConfiguration(i);if(a&&Object.keys(a).length>0){return i}return o.targetEntitySet?o.targetEntitySet.name:o.startingEntitySet.name}function st(e,t){function n(e){return t.find(t=>{const n=t;return n.propertyInfos===undefined&&n.relativePath===e})}t.forEach(t=>{const o=t;if(o.propertyInfos===undefined&&o.relativePath){const t=e.entityProperties.find(e=>e.name===o.relativePath);if(t){var i,a,l;const e=oe(t)||te(t);const c=ne(t);const v=t===null||t===void 0?void 0:(i=t.annotations)===null||i===void 0?void 0:(a=i.Common)===null||a===void 0?void 0:a.Timezone;if(e){const t=n(e.name);o.unit=t===null||t===void 0?void 0:t.name}else{var r,s,d,u;const e=(t===null||t===void 0?void 0:(r=t.annotations)===null||r===void 0?void 0:(s=r.Measures)===null||s===void 0?void 0:s.ISOCurrency)||(t===null||t===void 0?void 0:(d=t.annotations)===null||d===void 0?void 0:(u=d.Measures)===null||u===void 0?void 0:u.Unit);if(e){o.unitText=`${e}`}}if(c){const e=n(c.name);o.timezone=e===null||e===void 0?void 0:e.name}else if(v){o.timezoneText=v.toString()}const f=ae(t),p=(l=t.annotations.Common)===null||l===void 0?void 0:l.Text;if(fe(p)&&f!=="Value"){const e=n(p.path);if(e&&e.name!==o.name){o.textArrangement={textProperty:e.name,mode:f}}}}}})}F.updateLinkedProperties=st;function dt(e){var t,n,o,i,a,l,r,s,d,u,c,v,f;const p=(t=e.getAnnotationEntityType())===null||t===void 0?void 0:(n=t.annotations)===null||n===void 0?void 0:(o=n.UI)===null||o===void 0?void 0:(i=o.HeaderInfo)===null||i===void 0?void 0:(a=i.Title)===null||a===void 0?void 0:(l=a.Value)===null||l===void 0?void 0:l.path;const g=(r=e.getAnnotationEntityType())===null||r===void 0?void 0:(s=r.annotations)===null||s===void 0?void 0:(d=s.Common)===null||d===void 0?void 0:d.SemanticKey;const m=e===null||e===void 0?void 0:(u=e.getAnnotationEntityType())===null||u===void 0?void 0:(c=u.annotations)===null||c===void 0?void 0:(v=c.UI)===null||v===void 0?void 0:(f=v.HeaderInfo)===null||f===void 0?void 0:f.TypeName;const y=[];if(g){g.forEach(function(e){y.push(e.value)})}return{headerInfoTitlePath:p,semanticKeyColumns:y,headerInfoTypeName:m}}function ut(e,t,n,o,i,a,l){const r=Mn(e,t,n,i);const{navigationPropertyPath:s}=yn(t);const d=rt(n,s);const u=n.getManifestWrapper().getNavigationConfiguration(d);const c=it(e,t,n,u,l);const v=vt(e,n);const f=dt(n);const p=ot(e,t,n,u);const g={type:H.Table,annotation:gn(e,t,n,r,c,o,a,l),control:r,actions:ze(p.actions),commandActions:p.commandActions,columns:c,operationAvailableMap:JSON.stringify(v),operationAvailableProperties:pt(v,n),headerInfoTitle:f.headerInfoTitlePath,semanticKeys:f.semanticKeyColumns,headerInfoTypeName:f.headerInfoTypeName,enable$select:true,enable$$getKeepAliveContext:true};st(n.getAnnotationEntityType(e),c);lt(g,n.getAnnotationEntityType(e),n,o);return g}F.createTableVisualization=ut;function ct(e,t){const n=Mn(undefined,"",e,false);const o=St({},e.getEntityType(),[],[],e,n.type,[]);const i=vt(undefined,e);const a=dt(e);const l={type:H.Table,annotation:gn(undefined,"",e,n,t?[]:o),control:n,actions:[],columns:o,operationAvailableMap:JSON.stringify(i),operationAvailableProperties:pt(i,e),headerInfoTitle:a.headerInfoTitlePath,semanticKeys:a.semanticKeyColumns,headerInfoTypeName:a.headerInfoTypeName,enable$select:true,enable$$getKeepAliveContext:true};st(e.getEntityType(),o);lt(l,e.getEntityType(),e);return l}F.createDefaultTableVisualization=ct;function vt(e,t){return y.getOperationAvailableMap(e,"table",t)}function ft(e){var t,n;const o=$(e);const i=e.getEntitySet();const a=o.isUpdatable;const l=!Pe(a.expression)&&a.navigationExpression._type==="Unresolvable";const r=i===null||i===void 0?void 0:(t=i.annotations.Capabilities)===null||t===void 0?void 0:(n=t.UpdateRestrictions)===null||n===void 0?void 0:n.Updatable;const s=fe(r)&&r.path;return l?s:""}function pt(e,t){const n=new Set;for(const t in e){const o=e[t];if(o===null){n.add(t)}else if(typeof o==="string"){n.add(o)}}if(n.size){var o,i,a,l,r;const e=t.getEntityType();const s=(o=e.annotations)===null||o===void 0?void 0:(i=o.UI)===null||i===void 0?void 0:(a=i.HeaderInfo)===null||a===void 0?void 0:(l=a.Title)===null||l===void 0?void 0:(r=l.Value)===null||r===void 0?void 0:r.path;if(s){n.add(s)}}return Array.from(n).join(",")}function gt(e,t,n,o){const i=[];e.forEach(e=>{var a,l;if(e.$Type==="com.sap.vocabularies.UI.v1.DataFieldForAction"&&e!==null&&e!==void 0&&(a=e.ActionTarget)!==null&&a!==void 0&&a.isBound&&t===(e===null||e===void 0?void 0:e.ActionTarget.sourceEntityType)||e.$Type==="com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation"&&e.RequiresContext&&(e===null||e===void 0?void 0:(l=e.Inline)===null||l===void 0?void 0:l.valueOf())!==true){var r,s,d;if(typeof((r=e.annotations)===null||r===void 0?void 0:(s=r.UI)===null||s===void 0?void 0:(d=s.Hidden)===null||d===void 0?void 0:d.valueOf())==="object"){i.push(Ce(mt(e,n,o),false))}}});return i}function mt(e,t,n){let o;if((e===null||e===void 0?void 0:e.$Type)==="com.sap.vocabularies.UI.v1.DataFieldForAction"||(e===null||e===void 0?void 0:e.$Type)==="com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation"){var i,a;o=e===null||e===void 0?void 0:(i=e.annotations)===null||i===void 0?void 0:(a=i.UI)===null||a===void 0?void 0:a.Hidden}else{o=e===null||e===void 0?void 0:e.visible}let l;if(fe(o)){l=o.path}else{l=o}if(l){if(e!==null&&e!==void 0&&e.visible){l=l.substring(1,l.length-1)}if(l.indexOf("/")>0){const e=l.split("/");const n=e[0];if(pe(t===null||t===void 0?void 0:t.targetObject)&&t.targetObject.partner===n){return he(e.slice(1).join("/"))}else{return Ee(true)}}else if(n){return he(l)}else{return Ee(true)}}return Ee(true)}function yt(e,t,n){return Object.keys(n).some(o=>{if(o===e){var i;if(t!==null&&t!==void 0&&(i=t.ActionTarget)!==null&&i!==void 0&&i.isBound||t!==null&&t!==void 0&&t.RequiresContext){n[e].requiresSelection=true}return true}return false})}function bt(e,t,n){return e.some(e=>{var o,i,a,l,r,s,d;if((e.$Type==="com.sap.vocabularies.UI.v1.DataFieldForAction"||e.$Type==="com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation")&&(e===null||e===void 0?void 0:(o=e.Inline)===null||o===void 0?void 0:o.valueOf())!==true&&(((i=e.annotations)===null||i===void 0?void 0:(a=i.UI)===null||a===void 0?void 0:(l=a.Hidden)===null||l===void 0?void 0:l.valueOf())===false||((r=e.annotations)===null||r===void 0?void 0:(s=r.UI)===null||s===void 0?void 0:(d=s.Hidden)===null||d===void 0?void 0:d.valueOf())===undefined)){if(e.$Type==="com.sap.vocabularies.UI.v1.DataFieldForAction"){var u;const o=ye(["DataFieldForAction",e.Action]);if(yt(o,e,t)){return false}return(e===null||e===void 0?void 0:(u=e.ActionTarget)===null||u===void 0?void 0:u.isBound)&&n===(e===null||e===void 0?void 0:e.ActionTarget.sourceEntityType)}else if(e.$Type==="com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation"){if(yt(`DataFieldForIntentBasedNavigation::${e.SemanticObject}::${e.Action}`,e,t)){return false}return e.RequiresContext}}return false})}function ht(e){return Object.keys(e).some(t=>{var n;const o=e[t];if(o.requiresSelection&&((n=o.visible)===null||n===void 0?void 0:n.toString())==="true"){return true}return false})}function Tt(e){const t=[];if(e){Object.keys(e).forEach(n=>{const o=e[n];if(o.requiresSelection===true&&o.visible!==undefined){if(typeof o.visible==="string"){var i;t.push(be(o===null||o===void 0?void 0:(i=o.visible)===null||i===void 0?void 0:i.valueOf()))}}})}return t}function It(e){const t=se(e.getDataModelObjectPath());const n=le(e.getDataModelObjectPath());return{isDeletable:!(Pe(t)&&t.value===false),isUpdatable:!(Pe(n)&&n.value===false)}}F.getCapabilityRestriction=It;function Pt(e,t,n,o,i,a){var l;let r=arguments.length>6&&arguments[6]!==undefined?arguments[6]:Ee(false);if(!e){return z.None}const s=n.getManifestControlConfiguration(t);let d=(l=s.tableSettings)===null||l===void 0?void 0:l.selectionMode;let u=[],c=[];const v=We(n.getManifestControlConfiguration(t).actions,n,[],undefined,false);let f,p;if(n.getTemplateType()===B.ObjectPage){f=se(n.getDataModelObjectPath());p=f?Oe(f,true):f}const g=!Pe(r)||r.value!==false;if(d&&d===z.None&&a){if(n.getTemplateType()===B.ObjectPage&&g){return Oe(Ae(xe(He.IsEditable,r),Ee("Multi"),Ae(a,Ee("Multi"),Ee("None"))))}else if(g){return z.Multi}return Oe(Ae(a,Ee("Multi"),Ee("None")))}if(!d||d===z.Auto){d=z.Multi}if(g){d=d===z.Single?z.Single:z.Multi}if(bt(e,v.actions,n.getEntityType())||ht(v.actions)){return d}u=gt(e,n.getEntityType(),n.getDataModelObjectPath(),o);c=Tt(v.actions);if(u.length===0&&c.length===0&&(a||g)){if(!o){if(i.isDeletable||p!=="false"||g){const e=Te(a||true,r);return Oe(Ae(xe(He.IsEditable,e),Ee(d),Ee(z.None)))}else{return z.None}}else if(g){return d}else if(i.isDeletable&&a){return Oe(Ae(a,Ee(d),Ee("None")))}else{return z.None}}else if(!o){if(i.isDeletable||p!=="false"||g){const e=Ae(g&&!i.isDeletable,r,Ee(true));return Oe(Ae(xe(He.IsEditable,e),Ee(d),Ae(Te(...u.concat(c)),Ee(d),Ee(z.None))))}else{return Oe(Ae(Te(...u.concat(c)),Ee(d),Ee(z.None)))}}else if(i.isDeletable||g){return d}else{return Oe(Ae(Te(...u.concat(c),r),Ee(d),Ee(z.None)))}}F.getSelectionMode=Pt;function At(e,t,n){const o=[];const i=[];const a=Ke(e.filter(e=>Qe(e)));const l=n.getEntityType().fullyQualifiedName;if(a){var r,s,d;o.push({type:Q.Copy,annotationPath:n.getEntitySetBasedAnnotationPath(a.fullyQualifiedName),key:Ue.generateKeyFromDataField(a),enabled:Oe(Ce(he("numberOfSelectedContexts","internal"),1)),visible:Oe(Ie(Ce(De((r=a.annotations)===null||r===void 0?void 0:(s=r.UI)===null||s===void 0?void 0:s.Hidden,[],undefined,n.getRelativeModelPathFunction()),true))),text:((d=a.Label)===null||d===void 0?void 0:d.toString())??b.getLibraryResourceBundle("sap.fe.core").getText("C_COMMON_COPY"),isNavigable:true})}e.filter(e=>!Qe(e)).forEach(e=>{var t,a,r,s,d,u,c,v,f,p,g,m;if(((t=e.annotations)===null||t===void 0?void 0:(a=t.UI)===null||a===void 0?void 0:(r=a.Hidden)===null||r===void 0?void 0:r.valueOf())===true){i.push({type:Q.Default,key:Ue.generateKeyFromDataField(e)})}else if(Ye(e)&&((s=e.Inline)===null||s===void 0?void 0:s.valueOf())!==true&&((d=e.Determining)===null||d===void 0?void 0:d.valueOf())!==true){switch(e.$Type){case"com.sap.vocabularies.UI.v1.DataFieldForAction":let t=false;if(((u=e.ActionTarget)===null||u===void 0?void 0:(c=u.annotations)===null||c===void 0?void 0:(v=c.Core)===null||v===void 0?void 0:v.OperationAvailable)!==undefined){var y,b,h,T;if(!((y=e.ActionTarget)!==null&&y!==void 0&&y.isBound)){t=true}else if((b=e.ActionTarget)!==null&&b!==void 0&&b.isBound&&((h=e.ActionTarget)===null||h===void 0?void 0:h.sourceType)!==l){t=true}else if((T=e.ActionTarget)!==null&&T!==void 0&&T.parameters[0].isCollection){t=true}}const i={type:Q.DataFieldForAction,annotationPath:n.getEntitySetBasedAnnotationPath(e.fullyQualifiedName),key:Ue.generateKeyFromDataField(e),visible:Oe(Ie(Ce(De((f=e.annotations)===null||f===void 0?void 0:(p=f.UI)===null||p===void 0?void 0:p.Hidden,[],undefined,n.getRelativeModelPathFunction()),true))),isNavigable:true};if(t){i.enabled=Be(n,e.ActionTarget)}o.push(i);break;case"com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation":o.push({type:Q.DataFieldForIntentBasedNavigation,annotationPath:n.getEntitySetBasedAnnotationPath(e.fullyQualifiedName),key:Ue.generateKeyFromDataField(e),visible:Oe(Ie(Ce(De((g=e.annotations)===null||g===void 0?void 0:(m=g.UI)===null||m===void 0?void 0:m.Hidden,[],undefined,n.getRelativeModelPathFunction()),true)))});break;default:break}}});return{tableActions:o,hiddenTableActions:i}}function Dt(e,t,n){let o=Me.None;if(e){if(typeof e==="object"){o=De(e)}else{o=k(e)}}const i=[];n===null||n===void 0?void 0:n.keys.forEach(e=>{if(e.name!=="IsActiveEntity"){i.push(he(e.name,undefined))}});return Fe([o,he(`filteredMessages`,"internal"),t&&je.HasActive,t&&je.IsActive,`${t}`,...i],l.rowHighlighting,n)}function Ft(e,t,n,o,i){var a;const l=(o===null||o===void 0?void 0:o.create)||(o===null||o===void 0?void 0:o.detail);const r=n.getManifestControlConfiguration(i);const s=r&&r.tableSettings||{};if(l!==null&&l!==void 0&&l.outbound&&l.outboundDetail&&o!==null&&o!==void 0&&o.create){return{mode:"External",outbound:l.outbound,outboundDetail:l.outboundDetail,navigationSettings:o}}let d;if(e){var u,c,v;const e=(u=n.getEntitySet())===null||u===void 0?void 0:u.annotations;const o=e===null||e===void 0?void 0:e.Common,i=e===null||e===void 0?void 0:e.Session;d=(o===null||o===void 0?void 0:(c=o.DraftRoot)===null||c===void 0?void 0:c.NewAction)||(i===null||i===void 0?void 0:(v=i.StickySessionSupported)===null||v===void 0?void 0:v.NewAction);if(t.creationMode===W.CreationRow&&d){throw Error(`Creation mode '${W.CreationRow}' can not be used with a custom 'new' action (${d})`)}if(l!==null&&l!==void 0&&l.route){var f;return{mode:t.creationMode,append:t.createAtEnd,newAction:(f=d)===null||f===void 0?void 0:f.toString(),navigateToTarget:t.creationMode===W.NewPage?l.route:undefined}}}if(t.creationMode===W.NewPage){var p;t.creationMode=W.Inline;if(((p=s.creationMode)===null||p===void 0?void 0:p.createAtEnd)===undefined){t.createAtEnd=false}}return{mode:t.creationMode,append:t.createAtEnd,newAction:(a=d)===null||a===void 0?void 0:a.toString()}}const Ct=function(e,t,n,o,i){let a,r;let s=Ee(Me.None);const u=t.getEntityType();if(n&&e){var c,v,f,p,g;r=((c=n.display)===null||c===void 0?void 0:c.target)||((v=n.detail)===null||v===void 0?void 0:v.outbound);const l=t.getEntitySet();s=Dt((f=e.annotations)===null||f===void 0?void 0:(p=f.UI)===null||p===void 0?void 0:p.Criticality,!!d.getDraftRoot(l)||!!d.getDraftNode(l),u);if(r){a=".handlers.onChevronPressNavigateOutBound( $controller ,'"+r+"', ${$parameters>bindingContext})"}if(!r&&(g=n.detail)!==null&&g!==void 0&&g.route){a="API.onTableRowPress($event, $controller, ${$parameters>bindingContext}, { callExtension: true, targetPath: '"+o+"', editable : "+(d.getDraftRoot(l)||d.getDraftNode(l)?"!${$parameters>bindingContext}.getProperty('IsActiveEntity')":"undefined")+(i==="AnalyticalTable"||i==="TreeTable"?", bRecreateContext: true":"")+"})"}}const m=Fe([he("/deepestPath","internal")],l.navigatedRow,u);return{press:a,action:a?"Navigation":undefined,rowHighlighting:Oe(s),rowNavigated:Oe(m),visible:Oe(Ie(He.IsInactive))}};const St=function(e,t){let n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:[];let o=arguments.length>3?arguments[3]:undefined;let i=arguments.length>4?arguments[4]:undefined;let a=arguments.length>5?arguments[5]:undefined;let l=arguments.length>6?arguments[6]:undefined;const r=n;const s=new Y(t,i);t.entityProperties.forEach(t=>{const d=n.some(e=>e.name===t.name);if(!t.targetType&&!d){const n=tt(t.name,t,i,true,a);const d=Object.keys(n.properties);const u=Object.keys(n.additionalProperties);if(n.textOnlyPropertiesFromTextAnnotation.length>0){l.push(...n.textOnlyPropertiesFromTextAnnotation)}const c=Et(t,i.getEntitySetBasedAnnotationPath(t.fullyQualifiedName),t.name,true,true,o,s,i,l);if(d.length>0){c.propertyInfos=d;c.exportSettings={...c.exportSettings,template:n.exportSettingsTemplate,wrap:n.exportSettingsWrapping};c.exportSettings.type=mn(t.type,d.length>1);if(n.exportUnitName){c.exportSettings.unitProperty=n.exportUnitName;c.exportSettings.type="Currency"}else if(n.exportUnitString){c.exportSettings.unit=n.exportUnitString}if(n.exportTimezoneName){c.exportSettings.timezoneProperty=n.exportTimezoneName;c.exportSettings.utc=false}else if(n.exportTimezoneString){c.exportSettings.timezone=n.exportTimezoneString}if(n.exportDataPointTargetValue){c.exportDataPointTargetValue=n.exportDataPointTargetValue;c.exportSettings.type="String"}d.forEach(t=>{e[t]=n.properties[t]})}if(u.length>0){c.additionalPropertyInfos=u;u.forEach(t=>{e[t]=n.additionalProperties[t]})}r.push(c)}if(ae(t)==="Description"){o=o.concat(t.name);r.push(Et(t,i.getEntitySetBasedAnnotationPath(t.fullyQualifiedName),t.name,false,false,o,s,i,[]))}});const d=Vt(e,r,o,i,t,l);return r.concat(d)};F.getColumnsFromEntityType=St;const Et=function(e,t,n,o,i,a,l,r,s){var d,u,c,v,f;const p=o?n:`Property::${n}`;const g=(o?"DataField::":"Property::")+me(n);const m=Xe(r,e);const y=((d=e.annotations)===null||d===void 0?void 0:(u=d.UI)===null||u===void 0?void 0:(c=u.Hidden)===null||c===void 0?void 0:c.valueOf())===true;const b=e.name?jt(e.name,true,false):undefined;const h=b!=e.name;const T=mn(e.type);const I=e.type==="Edm.Date"?"YYYY-MM-DD":undefined;const P=Ze(e);const A=Un(e,P);const D=r.getAnnotationsByTerm("Common","com.sap.vocabularies.Common.v1.SemanticKey",[r.getEntityType()])[0];const F=s&&s.indexOf(n)>=0;const C=(!y||F)&&a.indexOf(n)===-1;const S={className:e.type||P,formatOptions:A.formatOptions,constraints:A.constraints};let E=null;if(Ot(e)){var O,x,M,U,$,N;const t=oe(e)||te(e);const n=ne(e);const o=((O=e.annotations)===null||O===void 0?void 0:(x=O.Measures)===null||x===void 0?void 0:x.ISOCurrency)||((M=e.annotations)===null||M===void 0?void 0:(U=M.Measures)===null||U===void 0?void 0:U.Unit);const i=($=e.annotations)===null||$===void 0?void 0:(N=$.Common)===null||N===void 0?void 0:N.Timezone;E={type:T,inputFormat:I,scale:e.scale,delimiter:e.type==="Edm.Int64"};if(t){E.unitProperty=t.name;E.type="Currency"}else if(o){E.unit=`${o}`}if(n){E.timezoneProperty=n.name;E.utc=false}else if(i){E.timezone=i.toString()}}const w=xn(n,r);const V={key:g,type:nt.Annotation,label:$t(e,h),groupLabel:h?$t(e):undefined,group:h?b:undefined,annotationPath:t,semanticObjectPath:m,availability:!i||y?"Hidden":"Adaptation",name:p,relativePath:n,sortable:C,isGroupable:l.isAnalyticsSupported()?!!l.isPropertyGroupable(e):C,isKey:e.isKey,exportSettings:E,caseSensitive:Gt(r),typeConfig:S,importance:en((v=e.annotations)===null||v===void 0?void 0:(f=v.UI)===null||f===void 0?void 0:f.DataFieldDefault,D),additionalLabels:w};const L=Nt(e);if(L){V.tooltip=L}const R=Je(e);if(qe(e)&&typeof R==="string"&&V.exportSettings){V.exportDataPointTargetValue=R;V.exportSettings.template="{0}/"+R}return V};function Ot(e){var t;let n,o;const i=(t=e.annotations.UI)===null||t===void 0?void 0:t.DataFieldDefault;if(ve(e)&&i!==null&&i!==void 0&&i.$Type){if(_(i)===true){return false}n=i===null||i===void 0?void 0:i.$Type}else if(_(e)===true){return false}else{var a,l,r,s,d,u,c,v,f,p,g;o=e;n=o.$Type;if(n==="com.sap.vocabularies.UI.v1.DataFieldForAnnotation"&&(a=o.Target)!==null&&a!==void 0&&(l=a.$target)!==null&&l!==void 0&&l.$Type){var m,y;n=(m=o.Target)===null||m===void 0?void 0:(y=m.$target)===null||y===void 0?void 0:y.$Type;return"com.sap.vocabularies.UI.v1.ChartDefinitionType".indexOf(n)===-1}else if(((r=o.Value)===null||r===void 0?void 0:(s=r.$target)===null||s===void 0?void 0:(d=s.annotations)===null||d===void 0?void 0:(u=d.Core)===null||u===void 0?void 0:(c=u.MediaType)===null||c===void 0?void 0:c.term)==="Org.OData.Core.V1.MediaType"&&((v=o.Value)===null||v===void 0?void 0:(f=v.$target)===null||f===void 0?void 0:(p=f.annotations)===null||p===void 0?void 0:(g=p.Core)===null||g===void 0?void 0:g.isURL)!==true){return false}}return n?["com.sap.vocabularies.UI.v1.DataFieldForAction","com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation","com.sap.vocabularies.UI.v1.DataFieldForActionGroup"].indexOf(n)===-1:true}const xt=function(e){switch(e.$Type){case"com.sap.vocabularies.UI.v1.DataFieldForAction":case"com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation":return!!e.Inline;case"com.sap.vocabularies.UI.v1.DataFieldWithAction":case"com.sap.vocabularies.UI.v1.DataFieldWithIntentBasedNavigation":case"com.sap.vocabularies.UI.v1.DataField":case"com.sap.vocabularies.UI.v1.DataFieldWithUrl":case"com.sap.vocabularies.UI.v1.DataFieldForAnnotation":case"com.sap.vocabularies.UI.v1.DataFieldWithNavigationPath":return true;default:}};const Mt=function(e){var t,n,o,i,a,l;const r=e.targetObject;let s;if(r){switch(r.$Type){case"com.sap.vocabularies.UI.v1.DataField":case"com.sap.vocabularies.UI.v1.DataFieldWithUrl":case"com.sap.vocabularies.UI.v1.DataFieldWithNavigationPath":case"com.sap.vocabularies.UI.v1.DataFieldWithIntentBasedNavigation":case"com.sap.vocabularies.UI.v1.DataFieldWithAction":case"com.sap.vocabularies.UI.v1.DataPointType":s=r.Value.$target;break;case"com.sap.vocabularies.UI.v1.DataFieldForAnnotation":if((r===null||r===void 0?void 0:(t=r.Target)===null||t===void 0?void 0:(n=t.$target)===null||n===void 0?void 0:n.$Type)==="com.sap.vocabularies.UI.v1.DataPointType"){var d;s=(d=r.Target.$target)===null||d===void 0?void 0:d.Value.$target}break;case"com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation":case"com.sap.vocabularies.UI.v1.DataFieldForAction":default:s=undefined}}const u=Ee(false);const c=Ee(false);return xe(...[Ie(Ce(De(r===null||r===void 0?void 0:(o=r.annotations)===null||o===void 0?void 0:(i=o.UI)===null||i===void 0?void 0:i.Hidden),true)),Ae(!!s,s&&Ie(Ce(De((a=s.annotations)===null||a===void 0?void 0:(l=a.UI)===null||l===void 0?void 0:l.Hidden),true)),true),Te(Ie(u),c)])};F._getVisibleExpression=Mt;const Ut=function(e){var t,n;const o=[];if(e.$Type==="com.sap.vocabularies.UI.v1.DataFieldForAnnotation"&&((t=e.Target)===null||t===void 0?void 0:(n=t.$target)===null||n===void 0?void 0:n.$Type)==="com.sap.vocabularies.UI.v1.FieldGroupType"){var i,a;if(e!==null&&e!==void 0&&(i=e.annotations)!==null&&i!==void 0&&(a=i.UI)!==null&&a!==void 0&&a.Hidden){return Oe(Ie(Ce(De(e.annotations.UI.Hidden),true)))}else{var l;(l=e.Target.$target.Data)===null||l===void 0?void 0:l.forEach(e=>{o.push(Mt({targetObject:e}))});return Oe(Ae(Te(...o),Ee(true),Ee(false)))}}else{return undefined}};const $t=function(e){let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;if(!e){return undefined}if(ve(e)||pe(e)){var n,o,i,a,l;const t=(n=e.annotations)===null||n===void 0?void 0:(o=n.UI)===null||o===void 0?void 0:o.DataFieldDefault;if(t&&!t.qualifier&&(i=t.Label)!==null&&i!==void 0&&i.valueOf()){var r;return Oe(De((r=t.Label)===null||r===void 0?void 0:r.valueOf()))}return Oe(De(((a=e.annotations.Common)===null||a===void 0?void 0:(l=a.Label)===null||l===void 0?void 0:l.valueOf())||e.name))}else if(_e(e)){var s,d,u,c,v,f,p,g;if(!!t&&e.$Type==="com.sap.vocabularies.UI.v1.DataFieldWithIntentBasedNavigation"){var m;return Oe(De((m=e.Label)===null||m===void 0?void 0:m.valueOf()))}return Oe(De(((s=e.Label)===null||s===void 0?void 0:s.valueOf())||((d=e.Value)===null||d===void 0?void 0:(u=d.$target)===null||u===void 0?void 0:(c=u.annotations)===null||c===void 0?void 0:(v=c.Common)===null||v===void 0?void 0:(f=v.Label)===null||f===void 0?void 0:f.valueOf())||((p=e.Value)===null||p===void 0?void 0:(g=p.$target)===null||g===void 0?void 0:g.name)))}else if(e.$Type==="com.sap.vocabularies.UI.v1.DataFieldForAnnotation"){var y,b,h,T,I,P,A,D;return Oe(De(((y=e.Label)===null||y===void 0?void 0:y.valueOf())||((b=e.Target)===null||b===void 0?void 0:(h=b.$target)===null||h===void 0?void 0:(T=h.Value)===null||T===void 0?void 0:(I=T.$target)===null||I===void 0?void 0:(P=I.annotations)===null||P===void 0?void 0:(A=P.Common)===null||A===void 0?void 0:(D=A.Label)===null||D===void 0?void 0:D.valueOf())))}else{var F;return Oe(De((F=e.Label)===null||F===void 0?void 0:F.valueOf()))}};const Nt=function(e){var t,n;if(!e){return undefined}if(ve(e)||(t=e.annotations)!==null&&t!==void 0&&(n=t.Common)!==null&&n!==void 0&&n.QuickInfo){var o,i;return(o=e.annotations)!==null&&o!==void 0&&(i=o.Common)!==null&&i!==void 0&&i.QuickInfo?Oe(De(e.annotations.Common.QuickInfo.valueOf())):undefined}else if(_e(e)){var a,l,r,s;return(a=e.Value)!==null&&a!==void 0&&(l=a.$target)!==null&&l!==void 0&&(r=l.annotations)!==null&&r!==void 0&&(s=r.Common)!==null&&s!==void 0&&s.QuickInfo?Oe(De(e.Value.$target.annotations.Common.QuickInfo.valueOf())):undefined}else if(e.$Type==="com.sap.vocabularies.UI.v1.DataFieldForAnnotation"){var d,u,c,v,f;const t=(d=e.Target)===null||d===void 0?void 0:d.$target;return t!==null&&t!==void 0&&(u=t.Value)!==null&&u!==void 0&&(c=u.$target)!==null&&c!==void 0&&(v=c.annotations)!==null&&v!==void 0&&(f=v.Common)!==null&&f!==void 0&&f.QuickInfo?Oe(De(t.Value.$target.annotations.Common.QuickInfo.valueOf())):undefined}else{return undefined}};function wt(e,t){return Fe([he(`semanticKeyHasDraftIndicator`,"internal"),he(`filteredMessages`,"internal"),e,t],l.getErrorStatusTextVisibilityFormatter)}F.getRowStatusVisibility=wt;const Vt=function(e,t,n,o,i,a){const l=[];const r={};const s=new Y(i,o);Object.keys(e).forEach(i=>{const d=e[i],u=o.getAbsoluteAnnotationPath(i),c=t.find(e=>e.name===i);if(c===undefined){const e=Et(d,u,i,true,false,n,s,o,a);e.isPartOfLineItem=t.some(e=>{var t;return((t=e.propertyInfos)===null||t===void 0?void 0:t.includes(i))&&e.isPartOfLineItem});l.push(e)}else if(c.annotationPath!==u||c.propertyInfos){const e=`Property::${i}`;if(!t.some(t=>t.name===e)){const t=Et(d,u,i,false,false,n,s,o,a);t.isPartOfLineItem=c.isPartOfLineItem;l.push(t);r[i]=e}else if(t.some(t=>t.name===e)&&t.some(e=>{var t;return(t=e.propertyInfos)===null||t===void 0?void 0:t.includes(i)})){r[i]=e}}});t.forEach(e=>{var t,n;e.propertyInfos=(t=e.propertyInfos)===null||t===void 0?void 0:t.map(e=>r[e]??e);e.additionalPropertyInfos=(n=e.additionalPropertyInfos)===null||n===void 0?void 0:n.map(e=>r[e]??e)});return l};const Lt=function(e){var t,n,o,i;if(_e(e)&&(t=e.Value)!==null&&t!==void 0&&t.path){var a;return(a=e.Value)===null||a===void 0?void 0:a.path}else if(e.$Type==="com.sap.vocabularies.UI.v1.DataFieldForAnnotation"&&(n=e.Target)!==null&&n!==void 0&&(o=n.$target)!==null&&o!==void 0&&(i=o.Value)!==null&&i!==void 0&&i.path){var l,r;return(l=e.Target)===null||l===void 0?void 0:(r=l.$target)===null||r===void 0?void 0:r.Value.path}else{return Ue.generateKeyFromDataField(e)}};const Rt=function(e,t,n){const o=`Property_Technical::${e}`;const i=t.find(e=>e.key===o);const a=!i&&t.find(t=>t.name===e&&!t.propertyInfos);if(a){const i={key:o,type:nt.Annotation,label:a.label,annotationPath:a.annotationPath,availability:"Hidden",name:o,relativePath:a.relativePath,sortable:false,isGroupable:false,isKey:false,exportSettings:null,caseSensitive:false,aggregatable:false,extension:{technicallyGroupable:true,technicallyAggregatable:true}};t.push(i);n[e]=i.name}};const kt=function(e,t,n){var o;const i=(o=n.getManifestControlConfiguration(t))===null||o===void 0?void 0:o.columns;const a=i&&Object.keys(i);return a&&!!a.find(function(t){return t===e&&i[t].showDataFieldsLabel})};const Ht=function(e){var t,n;let o="";switch(e.$Type){case"com.sap.vocabularies.UI.v1.DataField":case"com.sap.vocabularies.UI.v1.DataFieldWithNavigationPath":case"com.sap.vocabularies.UI.v1.DataFieldWithUrl":case"com.sap.vocabularies.UI.v1.DataFieldWithIntentBasedNavigation":case"com.sap.vocabularies.UI.v1.DataFieldWithAction":o=e===null||e===void 0?void 0:(t=e.Value)===null||t===void 0?void 0:t.path;break;case"com.sap.vocabularies.UI.v1.DataFieldForAnnotation":o=e===null||e===void 0?void 0:(n=e.Target)===null||n===void 0?void 0:n.value;break;case"com.sap.vocabularies.UI.v1.DataFieldForAction":case"com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation":case"com.sap.vocabularies.UI.v1.DataFieldForActionGroup":case"com.sap.vocabularies.UI.v1.DataFieldWithActionGroup":o=Ue.generateKeyFromDataField(e);break}return o};const jt=function(e,t,n){const o=t?e.lastIndexOf("/"):e.indexOf("/");if(o===-1){return e}return n?e.substring(o+1,e.length):e.substring(0,o)};const Bt=function(e,t){if(_e(e)&&fe(e.Value)){const n=ue(t.getDataModelObjectPath(),e.Value.path);return J(n)}else{return false}};const zt=function(e,t,n){return n.indexOf(t)===-1&&(e.$Type==="com.sap.vocabularies.UI.v1.DataField"||e.$Type==="com.sap.vocabularies.UI.v1.DataFieldWithUrl"||e.$Type==="com.sap.vocabularies.UI.v1.DataFieldWithIntentBasedNavigation"||e.$Type==="com.sap.vocabularies.UI.v1.DataFieldWithAction")};const Gt=function(e){const t=Kt(e);return Array.isArray(t)?t.indexOf("tolower")===-1:true};F.isFilteringCaseSensitive=Gt;function Kt(e){const t=e.getEntitySet();if(c.isEntitySet(t)){var n,o;return((n=t.annotations.Capabilities)===null||n===void 0?void 0:n.FilterFunctions)??((o=e.getEntityContainer().annotations.Capabilities)===null||o===void 0?void 0:o.FilterFunctions)}return undefined}function Wt(e){return e===undefined?undefined:{textLinesEdit:4,...e}}function Qt(e,t){const n=[];let o=false;for(let i=0;i<e.length;i++){n.push(e[i].value);if(e[i].value===t){o=true}}return{values:n,semanticKeyFound:o}}function qt(e,t){let n=false;let o;if(e&&e.length>=1&&t&&t.length>=1){for(let i=0;i<e.length;i++){if([e[i]].some(e=>t.indexOf(e)>=0)){n=true;o=e[i];break}}}return{semanticKeyHasPropertyInFieldGroup:n,fieldGroupPropertyPath:o}}function _t(e,t){var n,o;const i=[];let a={semanticKeyHasPropertyInFieldGroup:false,fieldGroupPropertyPath:undefined};if(e&&e.$Type==="com.sap.vocabularies.UI.v1.DataFieldForAnnotation"&&((n=e.Target)===null||n===void 0?void 0:(o=n.$target)===null||o===void 0?void 0:o.$Type)==="com.sap.vocabularies.UI.v1.FieldGroupType"){var l;(l=e.Target.$target.Data)===null||l===void 0?void 0:l.forEach(e=>{if((e.$Type==="com.sap.vocabularies.UI.v1.DataField"||e.$Type==="com.sap.vocabularies.UI.v1.DataFieldWithUrl")&&e.Value){i.push(e.Value.path)}a=qt(t,i)})}return{semanticKeyHasPropertyInFieldGroup:a.semanticKeyHasPropertyInFieldGroup,propertyPath:a.fieldGroupPropertyPath}}function Yt(e,t,n,o){if(!t){return{}}const i=Qt(t,e);const a=_t(o,i.values);if(a.semanticKeyHasPropertyInFieldGroup){return{fieldGroupDraftIndicatorPropertyPath:a.propertyPath,fieldGroupName:e}}else if(i.semanticKeyFound){return{hasDraftIndicator:true,showErrorObjectStatus:Oe(wt(e,false))}}return{}}function Jt(e){var t,n;const o=e===null||e===void 0?void 0:(t=e.annotations)===null||t===void 0?void 0:(n=t.UI)===null||n===void 0?void 0:n.Importance;if(o&&o.includes("UI.ImportanceType/High")){return 3}if(o&&o.includes("UI.ImportanceType/Medium")){return 2}if(o&&o.includes("UI.ImportanceType/Low")){return 1}return 0}function Xt(e){var t,n;const o=e===null||e===void 0?void 0:(t=e.annotations)===null||t===void 0?void 0:(n=t.UI)===null||n===void 0?void 0:n.Importance;return o?o.split("/")[1]:G.None}function Zt(e){if(e&&e.length>0){let t=-1;let n=-1;let o;for(const i of e){n=Jt(i);if(n>t){t=n;o=i}}return Xt(o)}return G.None}function en(e,t){var n;let o,i=[];if(t&&t.length>0){i=t.map(function(e){return e.value})}if(!e){return undefined}if(ge(e,"com.sap.vocabularies.UI.v1.DataFieldForAnnotation")){const t=e.Target.$target;if(ge(t,"com.sap.vocabularies.UI.v1.FieldGroupType")){const n=t.Data;const r=n&&n.some(function(e){var t,n;return(e===null||e===void 0?void 0:(t=e.Value)===null||t===void 0?void 0:t.path)&&e.$Type!=="com.sap.vocabularies.UI.v1.DataFieldForAnnotation"&&i.includes(e===null||e===void 0?void 0:(n=e.Value)===null||n===void 0?void 0:n.path)});if(r){return G.High}else{var a,l;if(e!==null&&e!==void 0&&(a=e.annotations)!==null&&a!==void 0&&(l=a.UI)!==null&&l!==void 0&&l.Importance){return Xt(e)}o=n&&n.filter(function(e){var t,n;return e===null||e===void 0?void 0:(t=e.annotations)===null||t===void 0?void 0:(n=t.UI)===null||n===void 0?void 0:n.Importance});return Zt(o)}}}return e.Value&&e!==null&&e!==void 0&&(n=e.Value)!==null&&n!==void 0&&n.path&&i.includes(e.Value.path)?G.High:Xt(e)}F.getImportance=en;const tn=function(e,t,n,o){const i=n.getEntitySetBasedAnnotationPath(e.fullyQualifiedName);if(t&&t!==""&&i.indexOf("@com.sap.vocabularies.UI.v1.LineItem")!==-1&&_e(e)){var a;const t=Z(e.Value.$target)||ee(e.Value.$target);const n=(a=e.Value)!==null&&a!==void 0&&a.$target?X(e.Value.$target):false;return!o&&!n&&!t}return false};const nn=function(e,t,n,o){var i;const a=n.getAnnotationEntityType(e),l=[],r={},s=ie(n.getEntitySet()),d=n.getManifestControlConfiguration(t),u=(d===null||d===void 0?void 0:(i=d.tableSettings)===null||i===void 0?void 0:i.type)||"ResponsiveTable";const c=[];const v=n.getAnnotationsByTerm("Common","com.sap.vocabularies.Common.v1.SemanticKey",[n.getEntityType()])[0];if(e){const i=n.getConverterContextFor(de(n.getDataModelObjectPath()));e.forEach(e=>{var a,d,f,p,g,m,y,b,h,T,I,P;if(!xt(e)){return}let A=null;const D=_e(e)&&(a=e.Value)!==null&&a!==void 0&&(d=a.$target)!==null&&d!==void 0&&d.fullyQualifiedName?Xe(n,e):undefined;const F=Ht(e);const C=et(e,n,u);const S=Object.keys(C.properties);const E=Object.keys(C.additionalProperties);const O=F?jt(F,true,false):undefined;const x=O!=F;const M=$t(e,x);const U=Lt(e);const $=O?O.indexOf(`@${"com.sap.vocabularies.UI.v1.FieldGroup"}`)>-1:false;const N=$?kt(U,t,n):false;const w=Ze(e);const V=w==="Edm.Date"?"YYYY-MM-DD":undefined;const L=Wt(Yt(U,v,$,e));let R;if(e.$Type==="com.sap.vocabularies.UI.v1.DataFieldForAnnotation"&&((f=e.Target)===null||f===void 0?void 0:(p=f.$target)===null||p===void 0?void 0:p.$Type)==="com.sap.vocabularies.UI.v1.FieldGroupType"){R=Ut(e)}if(Ot(e)){A={template:C.exportSettingsTemplate,wrap:C.exportSettingsWrapping,type:w?mn(w,S.length>1):undefined,inputFormat:V,delimiter:w==="Edm.Int64"};if(C.exportUnitName){A.unitProperty=C.exportUnitName;A.type="Currency"}else if(C.exportUnitString){A.unit=C.exportUnitString}if(C.exportTimezoneName){A.timezoneProperty=C.exportTimezoneName}else if(C.exportTimezoneString){A.timezone=C.exportTimezoneString}}let k;if(w){k=Un(e,w)}const H={className:w,formatOptions:{...L,...(g=k)===null||g===void 0?void 0:g.formatOptions},constraints:{...(m=k)===null||m===void 0?void 0:m.constraints}};const j={};if(!w||!H){j.widthCalculation=null}const B=Bt(e,i);const z=!B&&zt(e,F,s);const G=n.getManifestControlConfiguration(t);const K=((y=G.tableSettings)===null||y===void 0?void 0:y.enableAddCardToInsights)??true;const W={key:Ue.generateKeyFromDataField(e),type:nt.Annotation,label:M,groupLabel:x?$t(e):undefined,group:x?O:undefined,FieldGroupHiddenExpressions:R,annotationPath:n.getEntitySetBasedAnnotationPath(e.fullyQualifiedName),semanticObjectPath:D,availability:_(e)?"Hidden":"Default",name:U,showDataFieldsLabel:N,relativePath:F,sortable:z,propertyInfos:S.length?S:undefined,additionalPropertyInfos:E.length>0?E:undefined,exportSettings:A,width:((b=e.annotations)===null||b===void 0?void 0:(h=b.HTML5)===null||h===void 0?void 0:(T=h.CssDefaults)===null||T===void 0?void 0:(I=T.width)===null||I===void 0?void 0:I.valueOf())||undefined,importance:en(e,v),isNavigable:true,formatOptions:L,caseSensitive:Gt(n),typeConfig:H,visualSettings:j,timezoneText:(P=A)===null||P===void 0?void 0:P.timezone,isPartOfLineItem:true};W.isInsightsSupported=K===true&&o===true&&tn(e,M,n,B);const Q=Nt(e);if(Q){W.tooltip=Q}if(C.textOnlyPropertiesFromTextAnnotation.length>0){c.push(...C.textOnlyPropertiesFromTextAnnotation)}if(C.exportDataPointTargetValue&&W.exportSettings){W.exportDataPointTargetValue=C.exportDataPointTargetValue;W.exportSettings.type="String"}l.push(W);S.forEach(e=>{r[e]=C.properties[e];if(B){s.push(e)}});E.forEach(e=>{r[e]=C.additionalProperties[e]})})}return St(r,a,l,s,n,u,c)};const on=function(e,t,n,o){let i;if(e){i=e.map(function(e){const i=t.find(function(t){return t.relativePath===e&&t.propertyInfos===undefined});if(i){return i.name}else{const i=Vt({[e]:o.resolvePath(e)},t,[],n,o,[]);t.push(i[0]);return i[0].name}})}return i};const an=function(e){return e.map(t=>`{${e.indexOf(t)}}`).join(`${"\n"}`)};const ln=function(e,t,n,o,i){const a={};function l(e,n){return t.some(e=>e.key===n)}function r(e){return e.type===nt.Slot}function s(e){return e.type===undefined&&!!e.template}function d(e,t){const o=ie(n.getEntitySet());e.forEach(e=>{t.forEach(t=>{if(t.name===e){t.sortable=o.indexOf(e.replace("Property::",""))===-1;t.isGroupable=t.sortable}})})}for(const v in e){var u;const f=e[v];Ue.validateKey(v);const p={key:v,width:f.width||undefined,position:{anchor:(u=f.position)===null||u===void 0?void 0:u.anchor,placement:f.position===undefined?Le.After:f.position.placement},caseSensitive:Gt(n)};if(l(f,v)){const e={...p,importance:f===null||f===void 0?void 0:f.importance,horizontalAlign:f===null||f===void 0?void 0:f.horizontalAlign,availability:f===null||f===void 0?void 0:f.availability,type:nt.Annotation,isNavigable:l(f,v)?undefined:Ge(f,i,true),settings:f.settings,formatOptions:Wt(f.formatOptions)};a[v]=e}else{const e=on(f.properties,t,n,o);const i={...p,header:f.header,importance:(f===null||f===void 0?void 0:f.importance)||G.None,horizontalAlign:(f===null||f===void 0?void 0:f.horizontalAlign)||K.Begin,availability:(f===null||f===void 0?void 0:f.availability)||"Default",template:f.template,propertyInfos:e,exportSettings:e?{template:an(e),wrap:!!(e.length>1)}:null,id:`CustomColumn::${v}`,name:`CustomColumn::${v}`,formatOptions:{textLinesEdit:4},isGroupable:false,isNavigable:false,sortable:false,visualSettings:{widthCalculation:null},properties:f.properties};if(e){d(e,t)}if(r(f)){const e={...i,type:nt.Slot};a[v]=e}else if(s(f)){const e={...i,type:nt.Default};a[v]=e}else{var c;const e=`The annotation column '${v}' referenced in the manifest is not found`;n.getDiagnostics().addIssue(Ve.Manifest,Ne.Low,e,we,we===null||we===void 0?void 0:(c=we.AnnotationColumns)===null||c===void 0?void 0:c.InvalidKey)}}}return a};function rn(e,t,n){var o;const i=t.getManifestWrapper();const a=t.getManifestControlConfiguration(e);const l=i.getVariantManagement();const r=[];const s=n.type==="AnalyticalTable";const d=n.type==="ResponsiveTable";if((a===null||a===void 0?void 0:(o=a.tableSettings)===null||o===void 0?void 0:o.personalization)!==undefined){const e=a.tableSettings.personalization;if(e===true){switch(n.type){case"AnalyticalTable":return"Sort,Column,Filter,Group,Aggregate";case"ResponsiveTable":return"Sort,Column,Filter,Group";default:return"Sort,Column,Filter"}}else if(typeof e==="object"){if(e.sort){r.push("Sort")}if(e.column){r.push("Column")}if(e.filter){r.push("Filter")}if(e.group&&(s||d)){r.push("Group")}if(e.aggregate&&s){r.push("Aggregate")}return r.length>0?r.join(","):undefined}}else{r.push("Sort");r.push("Column");if(t.getTemplateType()===B.ListReport){if(l===j.Control||sn(i,t)){r.push("Filter")}}else{r.push("Filter")}if(s){r.push("Group");r.push("Aggregate")}if(d){r.push("Group")}return r.join(",")}return undefined}F.getP13nMode=rn;function sn(e,t){return e.isFilterBarHidden()&&!t.getManifestWrapper().hasMultipleVisualizations()&&t.getTemplateType()!==B.AnalyticalListPage}function dn(e,t,n){const o=ie(e.getEntitySet());let i;if(t!==null&&t!==void 0&&t.SortOrder){const e=[];const a={sorters:e};t.SortOrder.forEach(e=>{var t;const i=e.Property;if(i&&o.indexOf((t=i.$target)===null||t===void 0?void 0:t.name)===-1){const t=cn([i],n)[0];if(t){a.sorters.push({name:t,descending:!!e.Descending})}}});i=a.sorters.length?JSON.stringify(a):undefined}return i}function un(e){var t;if(!e){return undefined}const n=(t=e.InitialExpansionLevel)===null||t===void 0?void 0:t.valueOf();return typeof n==="number"?n:undefined}function cn(e,t){const n=[];let o,i;e.forEach(e=>{if(e!==null&&e!==void 0&&e.value){o=t.find(t=>{i=t;return!i.propertyInfos&&i.relativePath===(e===null||e===void 0?void 0:e.value)});if(o){n.push(o.name)}}});return n}function vn(e,t,n){let o;if(e!==null&&e!==void 0&&e.GroupBy){let i=e.GroupBy;if(n==="ResponsiveTable"){i=i.slice(0,1)}const a=cn(i,t).map(e=>({name:e}));o=a.length?JSON.stringify({groupLevels:a}):undefined}return o}function fn(e){const t={};e.columns.forEach(n=>{var o;n=n;const i=Object.keys(e.aggregates).find(e=>e===n.name);if(i){const t=e.aggregates[i];n.aggregatable=true;n.extension={customAggregate:t.defaultAggregate??{}}}if((o=n.additionalPropertyInfos)!==null&&o!==void 0&&o.length){n.additionalPropertyInfos.forEach(n=>{Rt(n,e.columns,t)})}});e.columns.forEach(e=>{e=e;if(e.additionalPropertyInfos){var n;e.additionalPropertyInfos=e.additionalPropertyInfos.map(e=>t[e]??e);e.propertyInfos=(n=e.propertyInfos)===null||n===void 0?void 0:n.concat(e.additionalPropertyInfos)}})}function pn(e,t){let n;if(e!==null&&e!==void 0&&e.Total){const o=e.Total;const i={};cn(o,t).forEach(e=>{i[e]={}});n=JSON.stringify(i)}return n}function gn(e,t,n,o,i,a,l,r){var s,d,u;const{navigationPropertyPath:c}=yn(t);const v=(s=n.getDataModelObjectPath().targetEntityType.annotations)===null||s===void 0?void 0:(d=s.UI)===null||d===void 0?void 0:(u=d.HeaderInfo)===null||u===void 0?void 0:u.TypeNamePlural;const f=v&&Oe(De(v));const p=n.getDataModelObjectPath().targetEntitySet;const g=n.getManifestWrapper();const m=c.length===0,y=rn(t,n,o),b=c?q(t):q(n.getContextPath(),"LineItem");const h=It(n);const T=rt(n,c);const I=g.getNavigationConfiguration(T);const P=Ft(e,o,n,I,t);const A=R(n,P.mode,o,l,r);const D=V(n,A);const F=N(n,A);const $=w(A,S(n));const k=Pt(e,t,n,m,h,D,F);let H=c?10:30;if(a!==null&&a!==void 0&&a.MaxItems){H=a.MaxItems.valueOf()}const z=g.getVariantManagement();const G=re(n.getDataModelObjectPath());const K={create:U(n,A),delete:M(n,A),paste:E(n,A,$),massEdit:O(n,A),insights:x(n,A,t),creationRow:L(n,A)};return{id:b,entityName:p?p.name:"",collection:de(n.getDataModelObjectPath()),navigationPath:c,row:Ct(e,n,I,T,o.type),p13nMode:y,standardActions:{actions:K,isInsertUpdateTemplated:$,updatablePropertyPath:ft(n)},displayMode:C(n,l),create:P,selectionMode:k,autoBindOnInit:sn(g,n)||n.getTemplateType()!==B.ListReport&&n.getTemplateType()!==B.AnalyticalListPage&&!(l&&g.hasMultipleVisualizations(l)),variantManagement:z==="Control"&&!y?j.None:z,threshold:H,sortConditions:dn(n,a,i),title:f,searchable:o.type!=="AnalyticalTable"&&!(Pe(G)&&G.value===false),initialExpansionLevel:un(a)}}F.getTableAnnotationConfiguration=gn;function mn(e){let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;let n="String";if(t){if(e==="Edm.DateTimeOffset"){n="DateTime"}return n}else{switch(e){case"Edm.Decimal":case"Edm.Int32":case"Edm.Int64":case"Edm.Double":case"Edm.Byte":n="Number";break;case"Edm.DateOfTime":case"Edm.Date":n="Date";break;case"Edm.DateTimeOffset":n="DateTime";break;case"Edm.TimeOfDay":n="Time";break;case"Edm.Boolean":n="Boolean";break;default:n="String"}}return n}function yn(e){const[t,n]=e.split("@");let o=t;if(o.lastIndexOf("/")===o.length-1){o=o.substr(0,o.length-1)}return{navigationPropertyPath:o,annotationPath:n}}F.splitPath=yn;function bn(e,t){const n=t.getEntityTypeAnnotation(e);const o=n.annotation;if(o){var i,a;const e=[];(i=o.SelectOptions)===null||i===void 0?void 0:i.forEach(t=>{const n=t.PropertyName;const o=(n===null||n===void 0?void 0:n.value)??"";if(e.indexOf(o)===-1){e.push(o)}});return{text:o===null||o===void 0?void 0:(a=o.Text)===null||a===void 0?void 0:a.toString(),propertyNames:e}}return undefined}F.getSelectionVariantConfiguration=bn;function hn(e,t,n){let o=e.enableFullScreen??n;if(!n&&o&&t.getTemplateType()===B.ListReport){o=false;t.getDiagnostics().addIssue(Ve.Manifest,Ne.Low,$e.FULLSCREENMODE_NOT_ON_LISTREPORT)}return o}function Tn(e,t,n){let o;if(t!=="ResponsiveTable"){return undefined}switch(n.getTemplateType()){case B.ListReport:case B.AnalyticalListPage:o=!e.selectAll?"ClearAll":"Default";break;case B.ObjectPage:o=e.selectAll===false?"ClearAll":"Default";if(n.getManifestWrapper().useIconTabBar()){o=!e.selectAll?"ClearAll":"Default"}break;default:}return o}function In(e,t,n){let o=(e===null||e===void 0?void 0:e.type)||"ResponsiveTable";if((o==="AnalyticalTable"||o==="TreeTable")&&!n.getManifestWrapper().isDesktop()){o="ResponsiveTable"}return o}function Pn(e,t,n){if(e!=="ResponsiveTable"){if(n){return{rowCountMode:"Auto",rowCount:3}}else{return{rowCountMode:t.rowCountMode??"Fixed",rowCount:t.rowCount?t.rowCount:5}}}else{return{}}}function An(e,t){return t.condensedTableLayout!==undefined&&e!=="ResponsiveTable"?t.condensedTableLayout:false}function Dn(e){return e.selectAll===true||e.selectionLimit===0?0:e.selectionLimit||200}function Fn(e){var t,n;return(t=e.creationMode)!==null&&t!==void 0&&t.inlineCreationRowCount?(n=e.creationMode)===null||n===void 0?void 0:n.inlineCreationRowCount:2}function Cn(e,t,n,o){var i;if(n){t.push({annotationPath:o.annotationPath})}return{quickFilters:{showCounts:e===null||e===void 0?void 0:(i=e.quickVariantSelection)===null||i===void 0?void 0:i.showCounts,paths:t}}}function Sn(e,t,n){return e.enableExport!==undefined?e.enableExport:t.getTemplateType()!=="ObjectPage"||n}function En(e){return e.frozenColumnCount}function On(e,t,n){var o,i,a;if(!t){return{}}const l=[];const r=n.getAnnotationEntityType(t);let s;let d;e===null||e===void 0?void 0:(o=e.quickVariantSelection)===null||o===void 0?void 0:(i=o.paths)===null||i===void 0?void 0:i.forEach(t=>{s=r.resolvePath(t.annotationPath);d=Cn(e,l,s,t)});let u=false;u=!!((a=e.quickVariantSelection)!==null&&a!==void 0&&a.hideTableTitle);return{filters:d,headerVisible:!(s&&u)}}function xn(e,t){const n=ue(t.getDataModelObjectPath(),e).navigationProperties;if((n===null||n===void 0?void 0:n.length)>0){const e=[];n.forEach(t=>{e.push($t(t)||t.name)});return e}}function Mn(e,t,n){var o,i,a,l,r,s,d,u;let c=arguments.length>3&&arguments[3]!==undefined?arguments[3]:false;const v=n.getManifestWrapper();const f=n.getManifestControlConfiguration(t);const p=f&&f.tableSettings||{};const g=((o=p.creationMode)===null||o===void 0?void 0:o.name)||W.NewPage;const m=!v.isPhone();const y=p.enablePaste!==undefined?p.enablePaste:n.getTemplateType()==="ObjectPage";const b=n.getTemplateType();const h=b===B.ListReport?"API.dataStateIndicatorFilter":undefined;const T=c&&v.isCondensedLayoutCompliant();const I=On(p,e,n);const P=(i=p.creationMode)===null||i===void 0?void 0:i.customValidationFunction;const A=n.getEntityType();const D=new Y(A,n);const F=In(p,D,n);const C=Pn(F,p,b===B.ListReport);const S=An(F,p);const E={createAtEnd:((a=p.creationMode)===null||a===void 0?void 0:a.createAtEnd)!==undefined?(l=p.creationMode)===null||l===void 0?void 0:l.createAtEnd:g!==W.Inline,creationMode:g,customValidationFunction:P,dataStateIndicatorFilter:h,disableAddRowButtonForEmptyData:!P?!!((r=p.creationMode)!==null&&r!==void 0&&r.disableAddRowButtonForEmptyData):false,enableAutoColumnWidth:m,enableExport:Sn(p,n,y),frozenColumnCount:En(p),enableFullScreen:hn(p,n,v.isPhone()),enableMassEdit:p===null||p===void 0?void 0:p.enableMassEdit,enableAddCardToInsights:p===null||p===void 0?void 0:p.enableAddCardToInsights,enablePaste:y,headerVisible:true,multiSelectMode:Tn(p,F,n),selectionLimit:Dn(p),inlineCreationRowCount:Fn(p),inlineCreationRowsHiddenInEditMode:(p===null||p===void 0?void 0:(s=p.creationMode)===null||s===void 0?void 0:s.inlineCreationRowsHiddenInEditMode)??false,showRowCount:!(p!==null&&p!==void 0&&(d=p.quickVariantSelection)!==null&&d!==void 0&&d.showCounts)&&!((u=v.getViewConfiguration())!==null&&u!==void 0&&u.showCounts),type:F,useCondensedTableLayout:S&&T,isCompactType:v.isCompactType()};const O={...E,...C,...I};if(F==="TreeTable"){O.hierarchyQualifier=p.hierarchyQualifier}return O}F.getTableManifestConfiguration=Mn;function Un(e,t){var n,o,i,a,l;let r;if(ve(e)){r=ce(e.targetType)?Se[e.targetType.underlyingType]:Se[e.type]}if(r===undefined&&t!==undefined){r=Se[t]}const s={type:(n=r)===null||n===void 0?void 0:n.type,constraints:{},formatOptions:{}};if(ve(e)&&r!==undefined){var d,u,c,v,f,p,g,m,y,b,h,T,I,P,A,D,F;s.constraints={scale:(d=r.constraints)!==null&&d!==void 0&&d.$Scale?e.scale:undefined,precision:(u=r.constraints)!==null&&u!==void 0&&u.$Precision?e.precision:undefined,maxLength:(c=r.constraints)!==null&&c!==void 0&&c.$MaxLength?e.maxLength:undefined,nullable:(v=r.constraints)!==null&&v!==void 0&&v.$Nullable?e.nullable:undefined,minimum:(f=r.constraints)!==null&&f!==void 0&&f["@Org.OData.Validation.V1.Minimum/$Decimal"]&&!isNaN((p=e.annotations)===null||p===void 0?void 0:(g=p.Validation)===null||g===void 0?void 0:g.Minimum)?`${(m=e.annotations)===null||m===void 0?void 0:(y=m.Validation)===null||y===void 0?void 0:y.Minimum}`:undefined,maximum:(b=r.constraints)!==null&&b!==void 0&&b["@Org.OData.Validation.V1.Maximum/$Decimal"]&&!isNaN((h=e.annotations)===null||h===void 0?void 0:(T=h.Validation)===null||T===void 0?void 0:T.Maximum)?`${(I=e.annotations)===null||I===void 0?void 0:(P=I.Validation)===null||P===void 0?void 0:P.Maximum}`:undefined,isDigitSequence:s.type==="sap.ui.model.odata.type.String"&&(A=r.constraints)!==null&&A!==void 0&&A[`@${"com.sap.vocabularies.Common.v1.IsDigitSequence"}`]&&(D=e.annotations)!==null&&D!==void 0&&(F=D.Common)!==null&&F!==void 0&&F.IsDigitSequence?true:undefined}}s.formatOptions={parseAsString:(s===null||s===void 0?void 0:(o=s.type)===null||o===void 0?void 0:o.indexOf("sap.ui.model.odata.type.Int"))===0||(s===null||s===void 0?void 0:(i=s.type)===null||i===void 0?void 0:i.indexOf("sap.ui.model.odata.type.Double"))===0?false:undefined,emptyString:(s===null||s===void 0?void 0:(a=s.type)===null||a===void 0?void 0:a.indexOf("sap.ui.model.odata.type.Int"))===0||(s===null||s===void 0?void 0:(l=s.type)===null||l===void 0?void 0:l.indexOf("sap.ui.model.odata.type.Double"))===0?"":undefined,parseKeepsEmptyString:s.type==="sap.ui.model.odata.type.String"?true:undefined};return s}F.getTypeConfig=Un;return{getTableActions:ot,getTableColumns:it,getColumnsFromEntityType:St,updateLinkedProperties:st,createTableVisualization:ut,createDefaultTableVisualization:ct,getCapabilityRestriction:It,getSelectionMode:Pt,getRowStatusVisibility:wt,getImportance:en,getP13nMode:rn,getTableAnnotationConfiguration:gn,isFilteringCaseSensitive:Gt,splitPath:yn,getSelectionVariantConfiguration:bn,getTableManifestConfiguration:Mn,getTypeConfig:Un,updateTableVisualizationForType:lt}},false);
|
|
425
|
+
sap.ui.predefine("sap/fe/core/converters/controls/Common/Table", ["sap/fe/core/converters/annotations/DataField","sap/fe/core/converters/controls/Common/Action","sap/fe/core/converters/helpers/BindingHelper","sap/fe/core/converters/helpers/ConfigurableObject","sap/fe/core/converters/helpers/IssueManager","sap/fe/core/converters/helpers/Key","sap/fe/core/formatters/TableFormatter","sap/fe/core/formatters/TableFormatterTypes","sap/fe/core/helpers/BindingToolkit","sap/fe/core/helpers/ModelHelper","sap/fe/core/helpers/StableIdHelper","sap/fe/core/helpers/TypeGuards","sap/fe/core/templating/DataModelPathHelper","sap/fe/core/templating/DisplayModeFormatter","sap/fe/core/templating/EntitySetHelper","sap/fe/core/templating/PropertyHelper","sap/fe/core/templating/UIFormatters","sap/fe/macros/internal/helpers/ActionHelper","sap/ui/core/Core","../../helpers/Aggregation","../../helpers/DataFieldHelper","../../helpers/ID","../../ManifestSettings","./Criticality","./table/StandardActions"],function(e,t,n,o,i,a,l,r,s,d,u,c,v,f,p,g,m,y,b,h,T,I,P,A,D){"use strict";var C={};var F=D.isInDisplayMode;var S=D.isDraftOrStickySupported;var E=D.getStandardActionPaste;var O=D.getStandardActionMassEdit;var x=D.getStandardActionInsights;var M=D.getStandardActionDelete;var U=D.getStandardActionCreate;var $=D.getRestrictions;var N=D.getMassEditVisibility;var w=D.getInsertUpdateActionsTemplating;var V=D.getDeleteVisibility;var L=D.getCreationRow;var R=D.generateStandardActionsContext;var k=A.getMessageTypeFromCriticalityType;var j=P.VisualizationType;var H=P.VariantManagementType;var B=P.TemplateType;var z=P.SelectionMode;var G=P.Importance;var K=P.HorizontalAlign;var W=P.CreationMode;var Q=P.ActionType;var q=I.getTableID;var _=T.isReferencePropertyStaticallyHidden;var Y=h.AggregationHelper;var J=m.isMultiValueField;var X=g.isImageURL;var Z=g.getAssociatedUnitProperty;var ee=g.getAssociatedTimezoneProperty;var te=g.getAssociatedCurrencyProperty;var ne=p.getNonSortablePropertiesRestrictions;var oe=f.getDisplayMode;var ie=v.isPathUpdatable;var ae=v.isPathSearchable;var le=v.isPathDeletable;var re=v.getTargetObjectPath;var se=v.enhanceDataModelPath;var de=c.isTypeDefinition;var ue=c.isProperty;var ce=c.isPathAnnotationExpression;var ve=c.isNavigationProperty;var fe=c.isAnnotationOfType;var pe=u.replaceSpecialChars;var ge=u.generate;var me=s.resolveBindingString;var ye=s.pathInModel;var be=s.or;var he=s.not;var Te=s.isConstant;var Ie=s.ifElse;var Pe=s.getExpressionFromAnnotation;var Ae=s.formatResult;var De=s.equal;var Ce=s.EDM_TYPE_MAPPING;var Fe=s.constant;var Se=s.compileExpression;var Ee=s.and;var Oe=r.MessageType;var xe=a.KeyHelper;var Me=i.IssueType;var Ue=i.IssueSeverity;var $e=i.IssueCategoryType;var Ne=i.IssueCategory;var we=o.Placement;var Ve=o.OverrideType;var Le=o.insertCustomElements;var Re=n.UI;var ke=n.Entity;var je=t.getEnabledForAnnotationAction;var He=t.removeDuplicateActions;var Be=t.isActionNavigable;var ze=t.getCopyAction;var Ge=t.getActionsFromManifest;var Ke=t.dataFieldIsCopyAction;var We=e.isDataPointFromDataFieldDefault;var Qe=e.isDataFieldTypes;var qe=e.isDataFieldForActionAbstract;var _e=e.getTargetValueOnDataPoint;var Ye=e.getSemanticObjectPath;var Je=e.getDataFieldDataType;var Xe=e.collectRelatedPropertiesRecursively;var Ze=e.collectRelatedProperties;var et;(function(e){e["Default"]="Default";e["Annotation"]="Annotation";e["Slot"]="Slot"})(et||(et={}));function tt(e,t,n,o){const i=Pt(e,t,n);const a=i.tableActions;const l=i.hiddenTableActions;const r=Ge(n.getManifestControlConfiguration(t).actions,n,a,o,true,l);const s={isNavigable:Ve.overwrite,enableOnSelect:Ve.overwrite,enableAutoScroll:Ve.overwrite,enabled:Ve.overwrite,visible:Ve.overwrite,defaultValuesExtensionFunction:Ve.overwrite,command:Ve.overwrite};const d=Le(a,r.actions,s);return{actions:d,commandActions:r.commandActions}}C.getTableActions=tt;function nt(e,t,n,o,i){const a=nn(e,t,n,i);const l=ln(n.getManifestControlConfiguration(t).columns,a,n,n.getAnnotationEntityType(e),o);return Le(a,l,{width:Ve.overwrite,importance:Ve.overwrite,horizontalAlign:Ve.overwrite,availability:Ve.overwrite,isNavigable:Ve.overwrite,settings:Ve.overwrite,formatOptions:Ve.overwrite})}C.getTableColumns=nt;const ot=function(e,t,n){const o=new Y(e,n);function i(e){return t.find(t=>{const n=t;return n.propertyInfos===undefined&&n.relativePath===e})}if(!o.isAnalyticsSupported()){return undefined}const a=new Set;t.forEach(e=>{const t=e;if(t.unit){a.add(t.unit)}});const l=o.getCustomAggregateDefinitions();const r={};l.forEach(e=>{const t=o._entityType.entityProperties.find(t=>t.name===e.qualifier);if(t){var n,i;const o=(n=e.annotations)===null||n===void 0?void 0:(i=n.Aggregation)===null||i===void 0?void 0:i.ContextDefiningProperties;r[t.name]=o?o.map(e=>e.value):[]}});const s={};t.forEach(e=>{const t=e;if(t.propertyInfos===undefined&&t.relativePath){const e=r[t.relativePath];if(e&&!a.has(t.name)){s[t.name]={defaultAggregate:{},relativePath:t.relativePath};const n=[];e.forEach(e=>{const t=i(e);if(t){n.push(t.name)}});if(n.length){s[t.name].defaultAggregate.contextDefiningProperties=n}}}});return s};C.getAggregateDefinitionsFromEntityType=ot;function it(e,t,n,o){if(e.control.type==="AnalyticalTable"){const i=ot(t,e.columns,n),a=new Y(t,n);if(i){e.enableAnalytics=true;e.enable$select=false;e.enable$$getKeepAliveContext=false;e.aggregates=i;fn(e);const t=a.getAllowedTransformations();e.enableBasicSearch=t?t.indexOf("search")>=0:true;e.annotation.groupConditions=vn(o,e.columns,e.control.type);e.annotation.aggregateConditions=pn(o,e.columns)}e.control.type="GridTable"}else if(e.control.type==="ResponsiveTable"){e.annotation.groupConditions=vn(o,e.columns,e.control.type)}else if(e.control.type==="TreeTable"){const o=new Y(t,n);const i=o.getAllowedTransformations();e.enableBasicSearch=i?i.includes("search"):true;e.enable$$getKeepAliveContext=true}}C.updateTableVisualizationForType=it;function at(e,t){const n=e.getManifestWrapper();if(t&&n.getNavigationConfiguration(t)){const e=n.getNavigationConfiguration(t);if(Object.keys(e).length>0){return t}}const o=e.getDataModelObjectPath();const i=e.getContextPath();const a=n.getNavigationConfiguration(i);if(a&&Object.keys(a).length>0){return i}return o.targetEntitySet?o.targetEntitySet.name:o.startingEntitySet.name}function lt(e,t){function n(e){return t.find(t=>{const n=t;return n.propertyInfos===undefined&&n.relativePath===e})}t.forEach(t=>{const o=t;if(o.propertyInfos===undefined&&o.relativePath){const t=e.entityProperties.find(e=>e.name===o.relativePath);if(t){var i,a,l;const e=te(t)||Z(t);const c=ee(t);const v=t===null||t===void 0?void 0:(i=t.annotations)===null||i===void 0?void 0:(a=i.Common)===null||a===void 0?void 0:a.Timezone;if(e){const t=n(e.name);o.unit=t===null||t===void 0?void 0:t.name}else{var r,s,d,u;const e=(t===null||t===void 0?void 0:(r=t.annotations)===null||r===void 0?void 0:(s=r.Measures)===null||s===void 0?void 0:s.ISOCurrency)||(t===null||t===void 0?void 0:(d=t.annotations)===null||d===void 0?void 0:(u=d.Measures)===null||u===void 0?void 0:u.Unit);if(e){o.unitText=`${e}`}}if(c){const e=n(c.name);o.timezone=e===null||e===void 0?void 0:e.name}else if(v){o.timezoneText=v.toString()}const f=oe(t),p=(l=t.annotations.Common)===null||l===void 0?void 0:l.Text;if(ce(p)&&f!=="Value"){const e=n(p.path);if(e&&e.name!==o.name){o.textArrangement={textProperty:e.name,mode:f}}}}}})}C.updateLinkedProperties=lt;function rt(e){var t,n,o,i,a,l,r,s,d,u,c,v,f;const p=(t=e.getAnnotationEntityType())===null||t===void 0?void 0:(n=t.annotations)===null||n===void 0?void 0:(o=n.UI)===null||o===void 0?void 0:(i=o.HeaderInfo)===null||i===void 0?void 0:(a=i.Title)===null||a===void 0?void 0:(l=a.Value)===null||l===void 0?void 0:l.path;const g=(r=e.getAnnotationEntityType())===null||r===void 0?void 0:(s=r.annotations)===null||s===void 0?void 0:(d=s.Common)===null||d===void 0?void 0:d.SemanticKey;const m=e===null||e===void 0?void 0:(u=e.getAnnotationEntityType())===null||u===void 0?void 0:(c=u.annotations)===null||c===void 0?void 0:(v=c.UI)===null||v===void 0?void 0:(f=v.HeaderInfo)===null||f===void 0?void 0:f.TypeName;const y=[];if(g){g.forEach(function(e){y.push(e.value)})}return{headerInfoTitlePath:p,semanticKeyColumns:y,headerInfoTypeName:m}}function st(e,t,n,o,i,a,l){const r=Mn(e,t,n,i);const{navigationPropertyPath:s}=yn(t);const d=at(n,s);const u=n.getManifestWrapper().getNavigationConfiguration(d);const c=nt(e,t,n,u,l);const v=ut(e,n);const f=rt(n);const p=tt(e,t,n,u);const g={type:j.Table,annotation:gn(e,t,n,r,c,o,a),control:r,actions:He(p.actions),commandActions:p.commandActions,columns:c,operationAvailableMap:JSON.stringify(v),operationAvailableProperties:vt(v,n),headerInfoTitle:f.headerInfoTitlePath,semanticKeys:f.semanticKeyColumns,headerInfoTypeName:f.headerInfoTypeName,enable$select:true,enable$$getKeepAliveContext:true};lt(n.getAnnotationEntityType(e),c);it(g,n.getAnnotationEntityType(e),n,o);return g}C.createTableVisualization=st;function dt(e,t){const n=Mn(undefined,"",e,false);const o=Ft({},e.getEntityType(),[],[],e,n.type,[]);const i=ut(undefined,e);const a=rt(e);const l={type:j.Table,annotation:gn(undefined,"",e,n,t?[]:o),control:n,actions:[],columns:o,operationAvailableMap:JSON.stringify(i),operationAvailableProperties:vt(i,e),headerInfoTitle:a.headerInfoTitlePath,semanticKeys:a.semanticKeyColumns,headerInfoTypeName:a.headerInfoTypeName,enable$select:true,enable$$getKeepAliveContext:true};lt(e.getEntityType(),o);it(l,e.getEntityType(),e);return l}C.createDefaultTableVisualization=dt;function ut(e,t){return y.getOperationAvailableMap(e,"table",t)}function ct(e){var t,n;const o=$(e);const i=e.getEntitySet();const a=o.isUpdatable;const l=!Te(a.expression)&&a.navigationExpression._type==="Unresolvable";const r=i===null||i===void 0?void 0:(t=i.annotations.Capabilities)===null||t===void 0?void 0:(n=t.UpdateRestrictions)===null||n===void 0?void 0:n.Updatable;const s=ce(r)&&r.path;return l?s:""}function vt(e,t){const n=new Set;for(const t in e){const o=e[t];if(o===null){n.add(t)}else if(typeof o==="string"){n.add(o)}}if(n.size){var o,i,a,l,r;const e=t.getEntityType();const s=(o=e.annotations)===null||o===void 0?void 0:(i=o.UI)===null||i===void 0?void 0:(a=i.HeaderInfo)===null||a===void 0?void 0:(l=a.Title)===null||l===void 0?void 0:(r=l.Value)===null||r===void 0?void 0:r.path;if(s){n.add(s)}}return Array.from(n).join(",")}function ft(e,t,n,o){const i=[];e.forEach(e=>{var a,l;if(e.$Type==="com.sap.vocabularies.UI.v1.DataFieldForAction"&&e!==null&&e!==void 0&&(a=e.ActionTarget)!==null&&a!==void 0&&a.isBound&&t===(e===null||e===void 0?void 0:e.ActionTarget.sourceEntityType)||e.$Type==="com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation"&&e.RequiresContext&&(e===null||e===void 0?void 0:(l=e.Inline)===null||l===void 0?void 0:l.valueOf())!==true){var r,s,d;if(typeof((r=e.annotations)===null||r===void 0?void 0:(s=r.UI)===null||s===void 0?void 0:(d=s.Hidden)===null||d===void 0?void 0:d.valueOf())==="object"){i.push(De(gt(e,n,o),false))}}});return i}function pt(e){let t;if(ce(e)){t=e.path}else{t=e}return t}function gt(e,t,n){var o,i;const a=(o=e.annotations)===null||o===void 0?void 0:(i=o.UI)===null||i===void 0?void 0:i.Hidden;let l=pt(a);if(typeof l==="object"){return Fe(false)}else if(typeof l==="string"){if("visible"in e){l=l.substring(1,l.length-1)}if(l.indexOf("/")>0){const e=l.split("/");const n=e[0];if(ve(t===null||t===void 0?void 0:t.targetObject)&&t.targetObject.partner===n){return ye(e.slice(1).join("/"))}else{return Fe(true)}}else if(n){return ye(l)}else{return Fe(false)}}return Fe(true)}function mt(e,t,n){return Object.keys(n).some(o=>{if(o===e){var i;if(t!==null&&t!==void 0&&(i=t.ActionTarget)!==null&&i!==void 0&&i.isBound||t!==null&&t!==void 0&&t.RequiresContext){n[e].requiresSelection=true}return true}return false})}function yt(e,t,n){return e.some(e=>{var o,i,a,l,r,s,d;if((e.$Type==="com.sap.vocabularies.UI.v1.DataFieldForAction"||e.$Type==="com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation")&&(e===null||e===void 0?void 0:(o=e.Inline)===null||o===void 0?void 0:o.valueOf())!==true&&(((i=e.annotations)===null||i===void 0?void 0:(a=i.UI)===null||a===void 0?void 0:(l=a.Hidden)===null||l===void 0?void 0:l.valueOf())===false||((r=e.annotations)===null||r===void 0?void 0:(s=r.UI)===null||s===void 0?void 0:(d=s.Hidden)===null||d===void 0?void 0:d.valueOf())===undefined)){if(e.$Type==="com.sap.vocabularies.UI.v1.DataFieldForAction"){var u;const o=ge(["DataFieldForAction",e.Action]);if(mt(o,e,t)){return false}return(e===null||e===void 0?void 0:(u=e.ActionTarget)===null||u===void 0?void 0:u.isBound)&&n===(e===null||e===void 0?void 0:e.ActionTarget.sourceEntityType)}else if(e.$Type==="com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation"){if(mt(`DataFieldForIntentBasedNavigation::${e.SemanticObject}::${e.Action}`,e,t)){return false}return e.RequiresContext}}return false})}function bt(e){return Object.keys(e).some(t=>{var n;const o=e[t];if(o.requiresSelection&&((n=o.visible)===null||n===void 0?void 0:n.toString())==="true"){return true}return false})}function ht(e){const t=[];if(e){Object.keys(e).forEach(n=>{const o=e[n];if(o.requiresSelection===true&&o.visible!==undefined){if(typeof o.visible==="string"){var i;t.push(me(o===null||o===void 0?void 0:(i=o.visible)===null||i===void 0?void 0:i.valueOf()))}}})}return t}function Tt(e){const t=le(e.getDataModelObjectPath());const n=ie(e.getDataModelObjectPath());return{isDeletable:!(Te(t)&&t.value===false),isUpdatable:!(Te(n)&&n.value===false)}}C.getCapabilityRestriction=Tt;function It(e,t,n,o,i,a){var l;let r=arguments.length>6&&arguments[6]!==undefined?arguments[6]:Fe(false);if(!e){return z.None}const s=n.getManifestControlConfiguration(t);let d=(l=s.tableSettings)===null||l===void 0?void 0:l.selectionMode;let u=[],c=[];const v=Ge(n.getManifestControlConfiguration(t).actions,n,[],undefined,false);let f,p;if(n.getTemplateType()===B.ObjectPage){f=le(n.getDataModelObjectPath());p=f?Se(f,true):f}const g=!Te(r)||r.value!==false;if(d&&d===z.None&&a){if(n.getTemplateType()===B.ObjectPage&&g){return Se(Ie(Ee(Re.IsEditable,r),Fe("Multi"),Ie(a,Fe("Multi"),Fe("None"))))}else if(g){return z.Multi}return Se(Ie(a,Fe("Multi"),Fe("None")))}if(!d||d===z.Auto){d=z.Multi}if(g){d=d===z.Single?z.Single:z.Multi}if(yt(e,v.actions,n.getEntityType())||bt(v.actions)){return d}u=ft(e,n.getEntityType(),n.getDataModelObjectPath(),o);c=ht(v.actions);if(u.length===0&&c.length===0&&(a||g)){if(!o){if(i.isDeletable||p!=="false"||g){const e=be(a||true,r);return Se(Ie(Ee(Re.IsEditable,e),Fe(d),Fe(z.None)))}else{return z.None}}else if(g){return d}else if(i.isDeletable&&a){return Se(Ie(a,Fe(d),Fe("None")))}else{return z.None}}else if(!o){if(i.isDeletable||p!=="false"||g){const e=Ie(g&&!i.isDeletable,r,Fe(true));return Se(Ie(Ee(Re.IsEditable,e),Fe(d),Ie(be(...u.concat(c)),Fe(d),Fe(z.None))))}else{return Se(Ie(be(...u.concat(c)),Fe(d),Fe(z.None)))}}else if(i.isDeletable||g){return d}else{return Se(Ie(be(...u.concat(c),r),Fe(d),Fe(z.None)))}}C.getSelectionMode=It;function Pt(e,t,n){const o=[];const i=[];const a=ze(e.filter(e=>Ke(e)));const l=n.getEntityType().fullyQualifiedName;if(a){var r,s,d;o.push({type:Q.Copy,annotationPath:n.getEntitySetBasedAnnotationPath(a.fullyQualifiedName),key:xe.generateKeyFromDataField(a),enabled:Se(De(ye("numberOfSelectedContexts","internal"),1)),visible:Se(he(De(Pe((r=a.annotations)===null||r===void 0?void 0:(s=r.UI)===null||s===void 0?void 0:s.Hidden,[],undefined,n.getRelativeModelPathFunction()),true))),text:((d=a.Label)===null||d===void 0?void 0:d.toString())??b.getLibraryResourceBundle("sap.fe.core").getText("C_COMMON_COPY"),isNavigable:true})}e.filter(e=>!Ke(e)).forEach(e=>{var t,a,r,s,d,u,c,v,f,p,g,m;if(((t=e.annotations)===null||t===void 0?void 0:(a=t.UI)===null||a===void 0?void 0:(r=a.Hidden)===null||r===void 0?void 0:r.valueOf())===true){i.push({type:Q.Default,key:xe.generateKeyFromDataField(e)})}else if(qe(e)&&((s=e.Inline)===null||s===void 0?void 0:s.valueOf())!==true&&((d=e.Determining)===null||d===void 0?void 0:d.valueOf())!==true){switch(e.$Type){case"com.sap.vocabularies.UI.v1.DataFieldForAction":let t=false;if(((u=e.ActionTarget)===null||u===void 0?void 0:(c=u.annotations)===null||c===void 0?void 0:(v=c.Core)===null||v===void 0?void 0:v.OperationAvailable)!==undefined){var y,b,h,T;if(!((y=e.ActionTarget)!==null&&y!==void 0&&y.isBound)){t=true}else if((b=e.ActionTarget)!==null&&b!==void 0&&b.isBound&&((h=e.ActionTarget)===null||h===void 0?void 0:h.sourceType)!==l){t=true}else if((T=e.ActionTarget)!==null&&T!==void 0&&T.parameters[0].isCollection){t=true}}const i={type:Q.DataFieldForAction,annotationPath:n.getEntitySetBasedAnnotationPath(e.fullyQualifiedName),key:xe.generateKeyFromDataField(e),visible:Se(he(De(Pe((f=e.annotations)===null||f===void 0?void 0:(p=f.UI)===null||p===void 0?void 0:p.Hidden,[],undefined,n.getRelativeModelPathFunction()),true))),isNavigable:true};if(t){i.enabled=je(n,e.ActionTarget)}o.push(i);break;case"com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation":o.push({type:Q.DataFieldForIntentBasedNavigation,annotationPath:n.getEntitySetBasedAnnotationPath(e.fullyQualifiedName),key:xe.generateKeyFromDataField(e),visible:Se(he(De(Pe((g=e.annotations)===null||g===void 0?void 0:(m=g.UI)===null||m===void 0?void 0:m.Hidden,[],undefined,n.getRelativeModelPathFunction()),true)))});break;default:break}}});return{tableActions:o,hiddenTableActions:i}}function At(e,t,n){let o=Oe.None;if(e){if(typeof e==="object"){o=Pe(e)}else{o=k(e)}}const i=[];n===null||n===void 0?void 0:n.keys.forEach(e=>{if(e.name!=="IsActiveEntity"){i.push(ye(e.name,undefined))}});return Ae([o,ye(`filteredMessages`,"internal"),t&&ke.HasActive,t&&ke.IsActive,`${t}`,...i],l.rowHighlighting,n)}function Dt(e,t,n,o,i){var a;const l=(o===null||o===void 0?void 0:o.create)||(o===null||o===void 0?void 0:o.detail);const r=n.getManifestControlConfiguration(i);const s=r&&r.tableSettings||{};if(l!==null&&l!==void 0&&l.outbound&&l.outboundDetail&&o!==null&&o!==void 0&&o.create){return{mode:"External",outbound:l.outbound,outboundDetail:l.outboundDetail,navigationSettings:o}}let d;if(e){var u,c,v;const e=(u=n.getEntitySet())===null||u===void 0?void 0:u.annotations;const o=e===null||e===void 0?void 0:e.Common,i=e===null||e===void 0?void 0:e.Session;d=(o===null||o===void 0?void 0:(c=o.DraftRoot)===null||c===void 0?void 0:c.NewAction)||(i===null||i===void 0?void 0:(v=i.StickySessionSupported)===null||v===void 0?void 0:v.NewAction);if(t.creationMode===W.CreationRow&&d){throw Error(`Creation mode '${W.CreationRow}' can not be used with a custom 'new' action (${d})`)}if(l!==null&&l!==void 0&&l.route){var f;return{mode:t.creationMode,append:t.createAtEnd,newAction:(f=d)===null||f===void 0?void 0:f.toString(),navigateToTarget:t.creationMode===W.NewPage?l.route:undefined}}}if(t.creationMode===W.NewPage){var p;t.creationMode=W.Inline;if(((p=s.creationMode)===null||p===void 0?void 0:p.createAtEnd)===undefined){t.createAtEnd=false}}return{mode:t.creationMode,append:t.createAtEnd,newAction:(a=d)===null||a===void 0?void 0:a.toString()}}const Ct=function(e,t,n,o,i){let a,r;let s=Fe(Oe.None);const u=t.getEntityType();if(n&&e){var c,v,f,p,g;r=((c=n.display)===null||c===void 0?void 0:c.target)||((v=n.detail)===null||v===void 0?void 0:v.outbound);const l=t.getEntitySet();s=At((f=e.annotations)===null||f===void 0?void 0:(p=f.UI)===null||p===void 0?void 0:p.Criticality,!!d.getDraftRoot(l)||!!d.getDraftNode(l),u);if(r){a=".handlers.onChevronPressNavigateOutBound( $controller ,'"+r+"', ${$parameters>bindingContext})"}if(!r&&(g=n.detail)!==null&&g!==void 0&&g.route){a="API.onTableRowPress($event, $controller, ${$parameters>bindingContext}, { callExtension: true, targetPath: '"+o+"', editable : "+(d.getDraftRoot(l)||d.getDraftNode(l)?"!${$parameters>bindingContext}.getProperty('IsActiveEntity')":"undefined")+(i==="AnalyticalTable"||i==="TreeTable"?", bRecreateContext: true":"")+"})"}}const m=Ae([ye("/deepestPath","internal")],l.navigatedRow,u);return{press:a,action:a?"Navigation":undefined,rowHighlighting:Se(s),rowNavigated:Se(m),visible:Se(he(Re.IsInactive))}};const Ft=function(e,t){let n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:[];let o=arguments.length>3?arguments[3]:undefined;let i=arguments.length>4?arguments[4]:undefined;let a=arguments.length>5?arguments[5]:undefined;let l=arguments.length>6?arguments[6]:undefined;const r=n;const s=new Y(t,i);t.entityProperties.forEach(t=>{const d=n.some(e=>e.name===t.name);if(!t.targetType&&!d){const d=Ze(t.name,t,i,true,a);const u=Object.keys(d.properties);const c=Object.keys(d.additionalProperties);if(d.textOnlyPropertiesFromTextAnnotation.length>0){l.push(...d.textOnlyPropertiesFromTextAnnotation)}const v=St(t,i.getEntitySetBasedAnnotationPath(t.fullyQualifiedName),t.name,true,true,o,s,i,l);if(u.length>0){v.propertyInfos=u;v.exportSettings={...v.exportSettings,template:d.exportSettingsTemplate,wrap:d.exportSettingsWrapping};v.exportSettings.type=mn(t.type,u.length>1);if(d.exportUnitName){v.exportSettings.unitProperty=d.exportUnitName;v.exportSettings.type="Currency"}else if(d.exportUnitString){v.exportSettings.unit=d.exportUnitString}if(d.exportTimezoneName){v.exportSettings.timezoneProperty=d.exportTimezoneName;v.exportSettings.utc=false}else if(d.exportTimezoneString){v.exportSettings.timezone=d.exportTimezoneString}if(d.exportDataPointTargetValue){v.exportDataPointTargetValue=d.exportDataPointTargetValue;v.exportSettings.type="String"}u.forEach(t=>{e[t]=d.properties[t]})}Et(n,e,v);if(c.length>0){v.additionalPropertyInfos=c;c.forEach(t=>{e[t]=d.additionalProperties[t]})}r.push(v)}if(oe(t)==="Description"){o=o.concat(t.name);r.push(St(t,i.getEntitySetBasedAnnotationPath(t.fullyQualifiedName),t.name,false,false,o,s,i,[]))}});const d=Vt(e,r,o,i,t,l);return r.concat(d)};C.getColumnsFromEntityType=Ft;const St=function(e,t,n,o,i,a,l,r,s){var d,u,c,v,f;const p=o?n:`Property::${n}`;const g=(o?"DataField::":"Property::")+pe(n);const m=Ye(r,e);const y=((d=e.annotations)===null||d===void 0?void 0:(u=d.UI)===null||u===void 0?void 0:(c=u.Hidden)===null||c===void 0?void 0:c.valueOf())===true;const b=e.name?Ht(e.name,true,false):undefined;const h=b!=e.name;const T=$t(e,h);const I=mn(e.type);const P=e.type==="Edm.Date"?"YYYY-MM-DD":undefined;const A=Je(e);const D=Un(e,A);const C=r.getAnnotationsByTerm("Common","com.sap.vocabularies.Common.v1.SemanticKey",[r.getEntityType()])[0];const F=s&&s.indexOf(n)>=0;const S=(!y||F)&&a.indexOf(n)===-1;const E={className:e.type||A,formatOptions:D.formatOptions,constraints:D.constraints};let O=null;if(Ot(e)){var x,M,U,$,N,w;const t=te(e)||Z(e);const n=ee(e);const o=((x=e.annotations)===null||x===void 0?void 0:(M=x.Measures)===null||M===void 0?void 0:M.ISOCurrency)||((U=e.annotations)===null||U===void 0?void 0:($=U.Measures)===null||$===void 0?void 0:$.Unit);const i=(N=e.annotations)===null||N===void 0?void 0:(w=N.Common)===null||w===void 0?void 0:w.Timezone;O={type:I,inputFormat:P,scale:e.scale,delimiter:e.type==="Edm.Int64"};if(t){O.unitProperty=t.name;O.type="Currency"}else if(o){O.unit=`${o}`}if(n){O.timezoneProperty=n.name;O.utc=false}else if(i){O.timezone=i.toString()}}const V=xn(n,r);const L={key:g,type:et.Annotation,label:T,groupLabel:h?$t(e):undefined,group:h?b:undefined,annotationPath:t,semanticObjectPath:m,availability:!i||y?"Hidden":"Adaptation",name:p,relativePath:n,sortable:S,isGroupable:l.isAnalyticsSupported()?!!l.isPropertyGroupable(e):S,isKey:e.isKey,exportSettings:O,caseSensitive:Gt(r),typeConfig:E,importance:en((v=e.annotations)===null||v===void 0?void 0:(f=v.UI)===null||f===void 0?void 0:f.DataFieldDefault,C),additionalLabels:V};const R=Nt(e);if(R){L.tooltip=R}const k=_e(e);if(We(e)&&typeof k==="string"&&L.exportSettings){L.exportDataPointTargetValue=k;L.exportSettings.template="{0}/"+k}return L};function Et(e,t,n){var o;const i=e.filter(e=>{var t;return(t=e.propertyInfos)===null||t===void 0?void 0:t.includes(n.relativePath)});if((i===null||i===void 0?void 0:i.length)===1&&t[n.relativePath]&&((o=i[0].propertyInfos)===null||o===void 0?void 0:o.length)===1){n.label=i[0].label}}function Ot(e){var t;let n,o;const i=(t=e.annotations.UI)===null||t===void 0?void 0:t.DataFieldDefault;if(ue(e)&&i!==null&&i!==void 0&&i.$Type){if(_(i)===true){return false}n=i===null||i===void 0?void 0:i.$Type}else if(_(e)===true){return false}else{var a,l,r,s,d,u,c,v,f,p,g;o=e;n=o.$Type;if(n==="com.sap.vocabularies.UI.v1.DataFieldForAnnotation"&&(a=o.Target)!==null&&a!==void 0&&(l=a.$target)!==null&&l!==void 0&&l.$Type){var m,y;n=(m=o.Target)===null||m===void 0?void 0:(y=m.$target)===null||y===void 0?void 0:y.$Type;return"com.sap.vocabularies.UI.v1.ChartDefinitionType".indexOf(n)===-1}else if(((r=o.Value)===null||r===void 0?void 0:(s=r.$target)===null||s===void 0?void 0:(d=s.annotations)===null||d===void 0?void 0:(u=d.Core)===null||u===void 0?void 0:(c=u.MediaType)===null||c===void 0?void 0:c.term)==="Org.OData.Core.V1.MediaType"&&((v=o.Value)===null||v===void 0?void 0:(f=v.$target)===null||f===void 0?void 0:(p=f.annotations)===null||p===void 0?void 0:(g=p.Core)===null||g===void 0?void 0:g.isURL)!==true){return false}}return n?["com.sap.vocabularies.UI.v1.DataFieldForAction","com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation","com.sap.vocabularies.UI.v1.DataFieldForActionGroup"].indexOf(n)===-1:true}const xt=function(e){switch(e.$Type){case"com.sap.vocabularies.UI.v1.DataFieldForAction":case"com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation":return!!e.Inline;case"com.sap.vocabularies.UI.v1.DataFieldWithAction":case"com.sap.vocabularies.UI.v1.DataFieldWithIntentBasedNavigation":case"com.sap.vocabularies.UI.v1.DataField":case"com.sap.vocabularies.UI.v1.DataFieldWithUrl":case"com.sap.vocabularies.UI.v1.DataFieldForAnnotation":case"com.sap.vocabularies.UI.v1.DataFieldWithNavigationPath":return true;default:}};const Mt=function(e){var t,n,o,i,a,l;const r=e.targetObject;let s;if(r){switch(r.$Type){case"com.sap.vocabularies.UI.v1.DataField":case"com.sap.vocabularies.UI.v1.DataFieldWithUrl":case"com.sap.vocabularies.UI.v1.DataFieldWithNavigationPath":case"com.sap.vocabularies.UI.v1.DataFieldWithIntentBasedNavigation":case"com.sap.vocabularies.UI.v1.DataFieldWithAction":case"com.sap.vocabularies.UI.v1.DataPointType":s=r.Value.$target;break;case"com.sap.vocabularies.UI.v1.DataFieldForAnnotation":if((r===null||r===void 0?void 0:(t=r.Target)===null||t===void 0?void 0:(n=t.$target)===null||n===void 0?void 0:n.$Type)==="com.sap.vocabularies.UI.v1.DataPointType"){var d;s=(d=r.Target.$target)===null||d===void 0?void 0:d.Value.$target}break;case"com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation":case"com.sap.vocabularies.UI.v1.DataFieldForAction":default:s=undefined}}const u=Fe(false);const c=Fe(false);return Ee(...[he(De(Pe(r===null||r===void 0?void 0:(o=r.annotations)===null||o===void 0?void 0:(i=o.UI)===null||i===void 0?void 0:i.Hidden),true)),Ie(!!s,s&&he(De(Pe((a=s.annotations)===null||a===void 0?void 0:(l=a.UI)===null||l===void 0?void 0:l.Hidden),true)),true),be(he(u),c)])};C._getVisibleExpression=Mt;const Ut=function(e){var t,n;const o=[];if(e.$Type==="com.sap.vocabularies.UI.v1.DataFieldForAnnotation"&&((t=e.Target)===null||t===void 0?void 0:(n=t.$target)===null||n===void 0?void 0:n.$Type)==="com.sap.vocabularies.UI.v1.FieldGroupType"){var i,a;if(e!==null&&e!==void 0&&(i=e.annotations)!==null&&i!==void 0&&(a=i.UI)!==null&&a!==void 0&&a.Hidden){return Se(he(De(Pe(e.annotations.UI.Hidden),true)))}else{var l;(l=e.Target.$target.Data)===null||l===void 0?void 0:l.forEach(e=>{o.push(Mt({targetObject:e}))});return Se(Ie(be(...o),Fe(true),Fe(false)))}}else{return undefined}};const $t=function(e){let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;if(!e){return undefined}if(ue(e)||ve(e)){var n,o,i,a,l;const t=(n=e.annotations)===null||n===void 0?void 0:(o=n.UI)===null||o===void 0?void 0:o.DataFieldDefault;if(t&&!t.qualifier&&(i=t.Label)!==null&&i!==void 0&&i.valueOf()){var r;return Se(Pe((r=t.Label)===null||r===void 0?void 0:r.valueOf()))}return Se(Pe(((a=e.annotations.Common)===null||a===void 0?void 0:(l=a.Label)===null||l===void 0?void 0:l.valueOf())||e.name))}else if(Qe(e)){var s,d,u,c,v,f,p,g;if(!!t&&e.$Type==="com.sap.vocabularies.UI.v1.DataFieldWithIntentBasedNavigation"){var m;return Se(Pe((m=e.Label)===null||m===void 0?void 0:m.valueOf()))}return Se(Pe(((s=e.Label)===null||s===void 0?void 0:s.valueOf())||((d=e.Value)===null||d===void 0?void 0:(u=d.$target)===null||u===void 0?void 0:(c=u.annotations)===null||c===void 0?void 0:(v=c.Common)===null||v===void 0?void 0:(f=v.Label)===null||f===void 0?void 0:f.valueOf())||((p=e.Value)===null||p===void 0?void 0:(g=p.$target)===null||g===void 0?void 0:g.name)))}else if(e.$Type==="com.sap.vocabularies.UI.v1.DataFieldForAnnotation"){var y,b,h,T,I,P,A,D;return Se(Pe(((y=e.Label)===null||y===void 0?void 0:y.valueOf())||((b=e.Target)===null||b===void 0?void 0:(h=b.$target)===null||h===void 0?void 0:(T=h.Value)===null||T===void 0?void 0:(I=T.$target)===null||I===void 0?void 0:(P=I.annotations)===null||P===void 0?void 0:(A=P.Common)===null||A===void 0?void 0:(D=A.Label)===null||D===void 0?void 0:D.valueOf())))}else{var C;return Se(Pe((C=e.Label)===null||C===void 0?void 0:C.valueOf()))}};const Nt=function(e){var t,n;if(!e){return undefined}if(ue(e)||(t=e.annotations)!==null&&t!==void 0&&(n=t.Common)!==null&&n!==void 0&&n.QuickInfo){var o,i;return(o=e.annotations)!==null&&o!==void 0&&(i=o.Common)!==null&&i!==void 0&&i.QuickInfo?Se(Pe(e.annotations.Common.QuickInfo.valueOf())):undefined}else if(Qe(e)){var a,l,r,s;return(a=e.Value)!==null&&a!==void 0&&(l=a.$target)!==null&&l!==void 0&&(r=l.annotations)!==null&&r!==void 0&&(s=r.Common)!==null&&s!==void 0&&s.QuickInfo?Se(Pe(e.Value.$target.annotations.Common.QuickInfo.valueOf())):undefined}else if(e.$Type==="com.sap.vocabularies.UI.v1.DataFieldForAnnotation"){var d,u,c,v,f;const t=(d=e.Target)===null||d===void 0?void 0:d.$target;return t!==null&&t!==void 0&&(u=t.Value)!==null&&u!==void 0&&(c=u.$target)!==null&&c!==void 0&&(v=c.annotations)!==null&&v!==void 0&&(f=v.Common)!==null&&f!==void 0&&f.QuickInfo?Se(Pe(t.Value.$target.annotations.Common.QuickInfo.valueOf())):undefined}else{return undefined}};function wt(e,t){return Ae([ye(`semanticKeyHasDraftIndicator`,"internal"),ye(`filteredMessages`,"internal"),e,t],l.getErrorStatusTextVisibilityFormatter)}C.getRowStatusVisibility=wt;const Vt=function(e,t,n,o,i,a){const l=[];const r={};const s=new Y(i,o);Object.keys(e).forEach(i=>{const d=e[i],u=o.getAbsoluteAnnotationPath(i),c=t.find(e=>e.name===i);if(c===undefined){const r=St(d,u,i,true,false,n,s,o,a);r.isPartOfLineItem=t.some(e=>{var t;return((t=e.propertyInfos)===null||t===void 0?void 0:t.includes(i))&&e.isPartOfLineItem});Et(t,e,r);l.push(r)}else if(c.annotationPath!==u||c.propertyInfos){const v=`Property::${i}`;if(!t.some(e=>e.name===v)){const f=St(d,u,i,false,false,n,s,o,a);f.isPartOfLineItem=c.isPartOfLineItem;Et(t,e,f);l.push(f);r[i]=v}else if(t.some(e=>e.name===v)&&t.some(e=>{var t;return(t=e.propertyInfos)===null||t===void 0?void 0:t.includes(i)})){r[i]=v}}});t.forEach(e=>{var t,n;e.propertyInfos=(t=e.propertyInfos)===null||t===void 0?void 0:t.map(e=>r[e]??e);e.additionalPropertyInfos=(n=e.additionalPropertyInfos)===null||n===void 0?void 0:n.map(e=>r[e]??e)});return l};const Lt=function(e){var t,n,o,i;if(Qe(e)&&(t=e.Value)!==null&&t!==void 0&&t.path){var a;return(a=e.Value)===null||a===void 0?void 0:a.path}else if(e.$Type==="com.sap.vocabularies.UI.v1.DataFieldForAnnotation"&&(n=e.Target)!==null&&n!==void 0&&(o=n.$target)!==null&&o!==void 0&&(i=o.Value)!==null&&i!==void 0&&i.path){var l,r;return(l=e.Target)===null||l===void 0?void 0:(r=l.$target)===null||r===void 0?void 0:r.Value.path}else{return xe.generateKeyFromDataField(e)}};const Rt=function(e,t,n){const o=`Property_Technical::${e}`;const i=t.find(e=>e.key===o);const a=!i&&t.find(t=>t.name===e&&!t.propertyInfos);if(a){const i={key:o,type:et.Annotation,label:a.label,annotationPath:a.annotationPath,availability:"Hidden",name:o,relativePath:a.relativePath,sortable:false,isGroupable:false,isKey:false,exportSettings:null,caseSensitive:false,aggregatable:false,extension:{technicallyGroupable:true,technicallyAggregatable:true}};t.push(i);n[e]=i.name}};const kt=function(e,t,n){var o;const i=(o=n.getManifestControlConfiguration(t))===null||o===void 0?void 0:o.columns;const a=i&&Object.keys(i);return a&&!!a.find(function(t){return t===e&&i[t].showDataFieldsLabel})};const jt=function(e){var t,n;let o="";switch(e.$Type){case"com.sap.vocabularies.UI.v1.DataField":case"com.sap.vocabularies.UI.v1.DataFieldWithNavigationPath":case"com.sap.vocabularies.UI.v1.DataFieldWithUrl":case"com.sap.vocabularies.UI.v1.DataFieldWithIntentBasedNavigation":case"com.sap.vocabularies.UI.v1.DataFieldWithAction":o=e===null||e===void 0?void 0:(t=e.Value)===null||t===void 0?void 0:t.path;break;case"com.sap.vocabularies.UI.v1.DataFieldForAnnotation":o=e===null||e===void 0?void 0:(n=e.Target)===null||n===void 0?void 0:n.value;break;case"com.sap.vocabularies.UI.v1.DataFieldForAction":case"com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation":case"com.sap.vocabularies.UI.v1.DataFieldForActionGroup":case"com.sap.vocabularies.UI.v1.DataFieldWithActionGroup":o=xe.generateKeyFromDataField(e);break}return o};const Ht=function(e,t,n){const o=t?e.lastIndexOf("/"):e.indexOf("/");if(o===-1){return e}return n?e.substring(o+1,e.length):e.substring(0,o)};const Bt=function(e,t){if(Qe(e)&&ce(e.Value)){const n=se(t.getDataModelObjectPath(),e.Value.path);return J(n)}else{return false}};const zt=function(e,t,n){return n.indexOf(t)===-1&&(e.$Type==="com.sap.vocabularies.UI.v1.DataField"||e.$Type==="com.sap.vocabularies.UI.v1.DataFieldWithUrl"||e.$Type==="com.sap.vocabularies.UI.v1.DataFieldWithIntentBasedNavigation"||e.$Type==="com.sap.vocabularies.UI.v1.DataFieldWithAction")};const Gt=function(e){const t=Kt(e);return Array.isArray(t)?t.indexOf("tolower")===-1:true};C.isFilteringCaseSensitive=Gt;function Kt(e){const t=e.getEntitySet();if(c.isEntitySet(t)){var n,o;return((n=t.annotations.Capabilities)===null||n===void 0?void 0:n.FilterFunctions)??((o=e.getEntityContainer().annotations.Capabilities)===null||o===void 0?void 0:o.FilterFunctions)}return undefined}function Wt(e){return e===undefined?undefined:{textLinesEdit:4,...e}}function Qt(e,t){const n=[];let o=false;for(let i=0;i<e.length;i++){n.push(e[i].value);if(e[i].value===t){o=true}}return{values:n,semanticKeyFound:o}}function qt(e,t){let n=false;let o;if(e&&e.length>=1&&t&&t.length>=1){for(let i=0;i<e.length;i++){if([e[i]].some(e=>t.indexOf(e)>=0)){n=true;o=e[i];break}}}return{semanticKeyHasPropertyInFieldGroup:n,fieldGroupPropertyPath:o}}function _t(e,t){var n,o;const i=[];let a={semanticKeyHasPropertyInFieldGroup:false,fieldGroupPropertyPath:undefined};if(e&&e.$Type==="com.sap.vocabularies.UI.v1.DataFieldForAnnotation"&&((n=e.Target)===null||n===void 0?void 0:(o=n.$target)===null||o===void 0?void 0:o.$Type)==="com.sap.vocabularies.UI.v1.FieldGroupType"){var l;(l=e.Target.$target.Data)===null||l===void 0?void 0:l.forEach(e=>{if((e.$Type==="com.sap.vocabularies.UI.v1.DataField"||e.$Type==="com.sap.vocabularies.UI.v1.DataFieldWithUrl")&&e.Value){i.push(e.Value.path)}a=qt(t,i)})}return{semanticKeyHasPropertyInFieldGroup:a.semanticKeyHasPropertyInFieldGroup,propertyPath:a.fieldGroupPropertyPath}}function Yt(e,t,n,o){if(!t){return{}}const i=Qt(t,e);const a=_t(o,i.values);if(a.semanticKeyHasPropertyInFieldGroup){return{fieldGroupDraftIndicatorPropertyPath:a.propertyPath,fieldGroupName:e,showErrorObjectStatus:Se(wt(e,true))}}else if(i.semanticKeyFound){return{hasDraftIndicator:true,showErrorObjectStatus:Se(wt(e,false))}}return{}}function Jt(e){var t,n;const o=e===null||e===void 0?void 0:(t=e.annotations)===null||t===void 0?void 0:(n=t.UI)===null||n===void 0?void 0:n.Importance;if(o&&o.includes("UI.ImportanceType/High")){return 3}if(o&&o.includes("UI.ImportanceType/Medium")){return 2}if(o&&o.includes("UI.ImportanceType/Low")){return 1}return 0}function Xt(e){var t,n;const o=e===null||e===void 0?void 0:(t=e.annotations)===null||t===void 0?void 0:(n=t.UI)===null||n===void 0?void 0:n.Importance;return o?o.split("/")[1]:G.None}function Zt(e){if(e&&e.length>0){let t=-1;let n=-1;let o;for(const i of e){n=Jt(i);if(n>t){t=n;o=i}}return Xt(o)}return G.None}function en(e,t){var n;let o,i=[];if(t&&t.length>0){i=t.map(function(e){return e.value})}if(!e){return undefined}if(fe(e,"com.sap.vocabularies.UI.v1.DataFieldForAnnotation")){const t=e.Target.$target;if(fe(t,"com.sap.vocabularies.UI.v1.FieldGroupType")){const n=t.Data;const r=n&&n.some(function(e){var t,n;return(e===null||e===void 0?void 0:(t=e.Value)===null||t===void 0?void 0:t.path)&&e.$Type!=="com.sap.vocabularies.UI.v1.DataFieldForAnnotation"&&i.includes(e===null||e===void 0?void 0:(n=e.Value)===null||n===void 0?void 0:n.path)});if(r){return G.High}else{var a,l;if(e!==null&&e!==void 0&&(a=e.annotations)!==null&&a!==void 0&&(l=a.UI)!==null&&l!==void 0&&l.Importance){return Xt(e)}o=n&&n.filter(function(e){var t,n;return e===null||e===void 0?void 0:(t=e.annotations)===null||t===void 0?void 0:(n=t.UI)===null||n===void 0?void 0:n.Importance});return Zt(o)}}}return e.Value&&e!==null&&e!==void 0&&(n=e.Value)!==null&&n!==void 0&&n.path&&i.includes(e.Value.path)?G.High:Xt(e)}C.getImportance=en;const tn=function(e,t,n,o){const i=n.getEntitySetBasedAnnotationPath(e.fullyQualifiedName);if(t&&t!==""&&i.indexOf("@com.sap.vocabularies.UI.v1.LineItem")!==-1&&Qe(e)){var a;const t=(a=e.Value)!==null&&a!==void 0&&a.$target?X(e.Value.$target):false;return!o&&!t}return false};const nn=function(e,t,n,o){var i;const a=n.getAnnotationEntityType(e),l=[],r={},s=ne(n.getEntitySet()),d=n.getManifestControlConfiguration(t),u=(d===null||d===void 0?void 0:(i=d.tableSettings)===null||i===void 0?void 0:i.type)||"ResponsiveTable";const c=[];const v=n.getAnnotationsByTerm("Common","com.sap.vocabularies.Common.v1.SemanticKey",[n.getEntityType()])[0];if(e){const i=n.getConverterContextFor(re(n.getDataModelObjectPath()));e.forEach(e=>{var a,d,f,p,g,m,y,b,h,T,I,P;if(!xt(e)){return}let A=null;const D=Qe(e)&&(a=e.Value)!==null&&a!==void 0&&(d=a.$target)!==null&&d!==void 0&&d.fullyQualifiedName?Ye(n,e):undefined;const C=jt(e);const F=Xe(e,n,u);const S=Object.keys(F.properties);const E=Object.keys(F.additionalProperties);const O=C?Ht(C,true,false):undefined;const x=O!=C;const M=$t(e,x);const U=Lt(e);const $=O?O.indexOf(`@${"com.sap.vocabularies.UI.v1.FieldGroup"}`)>-1:false;const N=$?kt(U,t,n):false;const w=Je(e);const V=w==="Edm.Date"?"YYYY-MM-DD":undefined;const L=Wt(Yt(U,v,$,e));let R;if(e.$Type==="com.sap.vocabularies.UI.v1.DataFieldForAnnotation"&&((f=e.Target)===null||f===void 0?void 0:(p=f.$target)===null||p===void 0?void 0:p.$Type)==="com.sap.vocabularies.UI.v1.FieldGroupType"){R=Ut(e)}if(Ot(e)){A={template:F.exportSettingsTemplate,wrap:F.exportSettingsWrapping,type:w?mn(w,S.length>1):undefined,inputFormat:V,delimiter:w==="Edm.Int64"};if(F.exportUnitName){A.unitProperty=F.exportUnitName;A.type="Currency"}else if(F.exportUnitString){A.unit=F.exportUnitString}if(F.exportTimezoneName){A.timezoneProperty=F.exportTimezoneName}else if(F.exportTimezoneString){A.timezone=F.exportTimezoneString}}let k;if(w){k=Un(e,w)}const j={className:w,formatOptions:{...L,...(g=k)===null||g===void 0?void 0:g.formatOptions},constraints:{...(m=k)===null||m===void 0?void 0:m.constraints}};const H={};if(!w||!j){H.widthCalculation=null}const B=Bt(e,i);const z=!B&&zt(e,C,s);const G=n.getManifestControlConfiguration(t);const K=((y=G.tableSettings)===null||y===void 0?void 0:y.enableAddCardToInsights)??true;const W={key:xe.generateKeyFromDataField(e),type:et.Annotation,label:M,groupLabel:x?$t(e):undefined,group:x?O:undefined,FieldGroupHiddenExpressions:R,annotationPath:n.getEntitySetBasedAnnotationPath(e.fullyQualifiedName),semanticObjectPath:D,availability:_(e)?"Hidden":"Default",name:U,showDataFieldsLabel:N,relativePath:C,sortable:z,propertyInfos:S.length?S:undefined,additionalPropertyInfos:E.length>0?E:undefined,exportSettings:A,width:((b=e.annotations)===null||b===void 0?void 0:(h=b.HTML5)===null||h===void 0?void 0:(T=h.CssDefaults)===null||T===void 0?void 0:(I=T.width)===null||I===void 0?void 0:I.valueOf())||undefined,importance:en(e,v),isNavigable:true,formatOptions:L,caseSensitive:Gt(n),typeConfig:j,visualSettings:H,timezoneText:(P=A)===null||P===void 0?void 0:P.timezone,isPartOfLineItem:true};W.isInsightsSupported=K===true&&o===true&&tn(e,M,n,B);const Q=Nt(e);if(Q){W.tooltip=Q}if(F.textOnlyPropertiesFromTextAnnotation.length>0){c.push(...F.textOnlyPropertiesFromTextAnnotation)}if(F.exportDataPointTargetValue&&W.exportSettings){W.exportDataPointTargetValue=F.exportDataPointTargetValue;W.exportSettings.type="String"}l.push(W);S.forEach(e=>{r[e]=F.properties[e];if(B){s.push(e)}});E.forEach(e=>{r[e]=F.additionalProperties[e]})})}return Ft(r,a,l,s,n,u,c)};const on=function(e,t,n,o){let i;if(e){i=e.map(function(e){const i=t.find(function(t){return t.relativePath===e&&t.propertyInfos===undefined});if(i){return i.name}else{const i=Vt({[e]:o.resolvePath(e)},t,[],n,o,[]);t.push(i[0]);return i[0].name}})}return i};const an=function(e){return e.map(t=>`{${e.indexOf(t)}}`).join(`${"\n"}`)};const ln=function(e,t,n,o,i){const a={};function l(e,n){return t.some(e=>e.key===n)}function r(e){return e.type===et.Slot}function s(e){return e.type===undefined&&!!e.template}function d(e,t){const o=ne(n.getEntitySet());e.forEach(e=>{t.forEach(t=>{if(t.name===e){t.sortable=o.indexOf(e.replace("Property::",""))===-1;t.isGroupable=t.sortable}})})}for(const v in e){var u;const f=e[v];xe.validateKey(v);const p={key:v,width:f.width||undefined,position:{anchor:(u=f.position)===null||u===void 0?void 0:u.anchor,placement:f.position===undefined?we.After:f.position.placement},caseSensitive:Gt(n)};if(l(f,v)){const e={...p,importance:f===null||f===void 0?void 0:f.importance,horizontalAlign:f===null||f===void 0?void 0:f.horizontalAlign,availability:f===null||f===void 0?void 0:f.availability,type:et.Annotation,isNavigable:l(f,v)?undefined:Be(f,i,true),settings:f.settings,formatOptions:Wt(f.formatOptions)};a[v]=e}else{const e=on(f.properties,t,n,o);const i={...p,header:f.header,importance:(f===null||f===void 0?void 0:f.importance)||G.None,horizontalAlign:(f===null||f===void 0?void 0:f.horizontalAlign)||K.Begin,availability:(f===null||f===void 0?void 0:f.availability)||"Default",template:f.template,propertyInfos:e,exportSettings:e?{template:an(e),wrap:!!(e.length>1)}:null,id:`CustomColumn::${v}`,name:`CustomColumn::${v}`,formatOptions:{textLinesEdit:4},isGroupable:false,isNavigable:false,sortable:false,visualSettings:{widthCalculation:null},properties:f.properties};if(e){d(e,t)}if(r(f)){const e={...i,type:et.Slot};a[v]=e}else if(s(f)){const e={...i,type:et.Default};a[v]=e}else{var c;const e=`The annotation column '${v}' referenced in the manifest is not found`;n.getDiagnostics().addIssue(Ne.Manifest,Ue.Low,e,$e,$e===null||$e===void 0?void 0:(c=$e.AnnotationColumns)===null||c===void 0?void 0:c.InvalidKey)}}}return a};function rn(e,t,n){var o;const i=t.getManifestWrapper();const a=t.getManifestControlConfiguration(e);const l=i.getVariantManagement();const r=[];const s=n.type==="AnalyticalTable";const d=n.type==="ResponsiveTable";if((a===null||a===void 0?void 0:(o=a.tableSettings)===null||o===void 0?void 0:o.personalization)!==undefined){const e=a.tableSettings.personalization;if(e===true){switch(n.type){case"AnalyticalTable":return"Sort,Column,Filter,Group,Aggregate";case"ResponsiveTable":return"Sort,Column,Filter,Group";default:return"Sort,Column,Filter"}}else if(typeof e==="object"){if(e.sort){r.push("Sort")}if(e.column){r.push("Column")}if(e.filter){r.push("Filter")}if(e.group&&(s||d)){r.push("Group")}if(e.aggregate&&s){r.push("Aggregate")}return r.length>0?r.join(","):undefined}}else{r.push("Sort");r.push("Column");if(t.getTemplateType()===B.ListReport){if(l===H.Control||sn(i,t)){r.push("Filter")}}else{r.push("Filter")}if(s){r.push("Group");r.push("Aggregate")}if(d){r.push("Group")}return r.join(",")}return undefined}C.getP13nMode=rn;function sn(e,t){return e.isFilterBarHidden()&&!t.getManifestWrapper().hasMultipleVisualizations()&&t.getTemplateType()!==B.AnalyticalListPage}function dn(e,t,n){const o=ne(e.getEntitySet());let i;if(t!==null&&t!==void 0&&t.SortOrder){const e=[];const a={sorters:e};t.SortOrder.forEach(e=>{var t;const i=e.Property;if(i&&o.indexOf((t=i.$target)===null||t===void 0?void 0:t.name)===-1){const t=cn([i],n)[0];if(t){a.sorters.push({name:t,descending:!!e.Descending})}}});i=a.sorters.length?JSON.stringify(a):undefined}return i}function un(e){var t;if(!e){return undefined}const n=(t=e.InitialExpansionLevel)===null||t===void 0?void 0:t.valueOf();return typeof n==="number"?n:undefined}function cn(e,t){const n=[];let o,i;e.forEach(e=>{if(e!==null&&e!==void 0&&e.value){o=t.find(t=>{i=t;return!i.propertyInfos&&i.relativePath===(e===null||e===void 0?void 0:e.value)});if(o){n.push(o.name)}}});return n}function vn(e,t,n){let o;if(e!==null&&e!==void 0&&e.GroupBy){let i=e.GroupBy;if(n==="ResponsiveTable"){i=i.slice(0,1)}const a=cn(i,t).map(e=>({name:e}));o=a.length?JSON.stringify({groupLevels:a}):undefined}return o}function fn(e){const t={};e.columns.forEach(n=>{var o;n=n;const i=Object.keys(e.aggregates).find(e=>e===n.name);if(i){const t=e.aggregates[i];n.aggregatable=true;n.extension={customAggregate:t.defaultAggregate??{}}}if((o=n.additionalPropertyInfos)!==null&&o!==void 0&&o.length){n.additionalPropertyInfos.forEach(n=>{Rt(n,e.columns,t)})}});e.columns.forEach(e=>{e=e;if(e.additionalPropertyInfos){var n;e.additionalPropertyInfos=e.additionalPropertyInfos.map(e=>t[e]??e);e.propertyInfos=(n=e.propertyInfos)===null||n===void 0?void 0:n.concat(e.additionalPropertyInfos)}})}function pn(e,t){let n;if(e!==null&&e!==void 0&&e.Total){const o=e.Total;const i={};cn(o,t).forEach(e=>{i[e]={}});n=JSON.stringify(i)}return n}function gn(e,t,n,o,i,a,l){var r,s,d;const{navigationPropertyPath:u}=yn(t);const c=(r=n.getDataModelObjectPath().targetEntityType.annotations)===null||r===void 0?void 0:(s=r.UI)===null||s===void 0?void 0:(d=s.HeaderInfo)===null||d===void 0?void 0:d.TypeNamePlural;const v=c&&Se(Pe(c));const f=n.getDataModelObjectPath().targetEntitySet;const p=n.getManifestWrapper();const g=u.length===0,m=rn(t,n,o),y=u?q(t):q(n.getContextPath(),"LineItem");const b=Tt(n);const h=at(n,u);const T=p.getNavigationConfiguration(h);const I=Dt(e,o,n,T,t);const P=R(n,I.mode,o,l);const A=V(n,P);const D=N(n,P);const C=w(P,S(n));const $=It(e,t,n,g,b,A,D);let k=u?10:30;if(a!==null&&a!==void 0&&a.MaxItems){k=a.MaxItems.valueOf()}const j=p.getVariantManagement();const z=ae(n.getDataModelObjectPath());const G={create:U(n,P),delete:M(n,P),paste:E(n,P,C),massEdit:O(n,P),insights:x(n,P,t),creationRow:L(n,P)};return{id:y,entityName:f?f.name:"",collection:re(n.getDataModelObjectPath()),navigationPath:u,row:Ct(e,n,T,h,o.type),p13nMode:m,standardActions:{actions:G,isInsertUpdateTemplated:C,updatablePropertyPath:ct(n)},displayMode:F(n,l),create:I,selectionMode:$,autoBindOnInit:sn(p,n)||n.getTemplateType()!==B.ListReport&&n.getTemplateType()!==B.AnalyticalListPage&&!(l&&p.hasMultipleVisualizations(l)),variantManagement:j==="Control"&&!m?H.None:j,threshold:k,sortConditions:dn(n,a,i),title:v,searchable:o.type!=="AnalyticalTable"&&!(Te(z)&&z.value===false),initialExpansionLevel:un(a)}}C.getTableAnnotationConfiguration=gn;function mn(e){let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;let n="String";if(t){if(e==="Edm.DateTimeOffset"){n="DateTime"}return n}else{switch(e){case"Edm.Decimal":case"Edm.Int32":case"Edm.Int64":case"Edm.Double":case"Edm.Byte":n="Number";break;case"Edm.DateOfTime":case"Edm.Date":n="Date";break;case"Edm.DateTimeOffset":n="DateTime";break;case"Edm.TimeOfDay":n="Time";break;case"Edm.Boolean":n="Boolean";break;default:n="String"}}return n}function yn(e){const[t,n]=e.split("@");let o=t;if(o.lastIndexOf("/")===o.length-1){o=o.substr(0,o.length-1)}return{navigationPropertyPath:o,annotationPath:n}}C.splitPath=yn;function bn(e,t){const n=t.getEntityTypeAnnotation(e);const o=n.annotation;if(o){var i,a;const e=[];(i=o.SelectOptions)===null||i===void 0?void 0:i.forEach(t=>{const n=t.PropertyName;const o=(n===null||n===void 0?void 0:n.value)??"";if(e.indexOf(o)===-1){e.push(o)}});return{text:o===null||o===void 0?void 0:(a=o.Text)===null||a===void 0?void 0:a.toString(),propertyNames:e}}return undefined}C.getSelectionVariantConfiguration=bn;function hn(e,t,n){let o=e.enableFullScreen??n;if(!n&&o&&t.getTemplateType()===B.ListReport){o=false;t.getDiagnostics().addIssue(Ne.Manifest,Ue.Low,Me.FULLSCREENMODE_NOT_ON_LISTREPORT)}return o}function Tn(e,t,n){let o;if(t!=="ResponsiveTable"){return undefined}switch(n.getTemplateType()){case B.ListReport:case B.AnalyticalListPage:o=!e.selectAll?"ClearAll":"Default";break;case B.ObjectPage:o=e.selectAll===false?"ClearAll":"Default";if(n.getManifestWrapper().useIconTabBar()){o=!e.selectAll?"ClearAll":"Default"}break;default:}return o}function In(e,t,n){let o=(e===null||e===void 0?void 0:e.type)||"ResponsiveTable";if((o==="AnalyticalTable"||o==="TreeTable")&&!n.getManifestWrapper().isDesktop()){o="ResponsiveTable"}return o}function Pn(e,t,n){if(e!=="ResponsiveTable"){if(n){return{rowCountMode:"Auto",rowCount:3}}else{return{rowCountMode:t.rowCountMode??"Fixed",rowCount:t.rowCount?t.rowCount:5}}}else{return{}}}function An(e,t){return t.condensedTableLayout!==undefined&&e!=="ResponsiveTable"?t.condensedTableLayout:false}function Dn(e){return e.selectAll===true||e.selectionLimit===0?0:e.selectionLimit||200}function Cn(e){var t,n;return(t=e.creationMode)!==null&&t!==void 0&&t.inlineCreationRowCount?(n=e.creationMode)===null||n===void 0?void 0:n.inlineCreationRowCount:2}function Fn(e,t,n,o){var i;if(n){t.push({annotationPath:o.annotationPath})}return{quickFilters:{showCounts:e===null||e===void 0?void 0:(i=e.quickVariantSelection)===null||i===void 0?void 0:i.showCounts,paths:t}}}function Sn(e,t,n){return e.enableExport!==undefined?e.enableExport:t.getTemplateType()!=="ObjectPage"||n}function En(e){return e.frozenColumnCount}function On(e,t,n){var o,i,a;if(!t){return{}}const l=[];const r=n.getAnnotationEntityType(t);let s;let d;e===null||e===void 0?void 0:(o=e.quickVariantSelection)===null||o===void 0?void 0:(i=o.paths)===null||i===void 0?void 0:i.forEach(t=>{s=r.resolvePath(t.annotationPath);d=Fn(e,l,s,t)});let u=false;u=!!((a=e.quickVariantSelection)!==null&&a!==void 0&&a.hideTableTitle);return{filters:d,headerVisible:!(s&&u)}}function xn(e,t){const n=se(t.getDataModelObjectPath(),e).navigationProperties;if((n===null||n===void 0?void 0:n.length)>0){const e=[];n.forEach(t=>{e.push($t(t)||t.name)});return e}}function Mn(e,t,n){var o,i,a,l,r,s,d,u;let c=arguments.length>3&&arguments[3]!==undefined?arguments[3]:false;const v=n.getManifestWrapper();const f=n.getManifestControlConfiguration(t);const p=f&&f.tableSettings||{};const g=((o=p.creationMode)===null||o===void 0?void 0:o.name)||W.NewPage;const m=!v.isPhone();const y=p.enablePaste!==undefined?p.enablePaste:n.getTemplateType()==="ObjectPage";const b=n.getTemplateType();const h=b===B.ListReport?"API.dataStateIndicatorFilter":undefined;const T=c&&v.isCondensedLayoutCompliant();const I=On(p,e,n);const P=(i=p.creationMode)===null||i===void 0?void 0:i.customValidationFunction;const A=n.getEntityType();const D=new Y(A,n);const C=In(p,D,n);const F=Pn(C,p,b===B.ListReport);const S=An(C,p);const E={createAtEnd:((a=p.creationMode)===null||a===void 0?void 0:a.createAtEnd)!==undefined?(l=p.creationMode)===null||l===void 0?void 0:l.createAtEnd:g!==W.Inline,creationMode:g,customValidationFunction:P,dataStateIndicatorFilter:h,disableAddRowButtonForEmptyData:!P?!!((r=p.creationMode)!==null&&r!==void 0&&r.disableAddRowButtonForEmptyData):false,enableAutoColumnWidth:m,enableExport:Sn(p,n,y),frozenColumnCount:En(p),enableFullScreen:hn(p,n,v.isPhone()),enableMassEdit:p===null||p===void 0?void 0:p.enableMassEdit,enableAddCardToInsights:p===null||p===void 0?void 0:p.enableAddCardToInsights,enablePaste:y,headerVisible:true,multiSelectMode:Tn(p,C,n),selectionLimit:Dn(p),inlineCreationRowCount:Cn(p),inlineCreationRowsHiddenInEditMode:(p===null||p===void 0?void 0:(s=p.creationMode)===null||s===void 0?void 0:s.inlineCreationRowsHiddenInEditMode)??false,showRowCount:!(p!==null&&p!==void 0&&(d=p.quickVariantSelection)!==null&&d!==void 0&&d.showCounts)&&!((u=v.getViewConfiguration())!==null&&u!==void 0&&u.showCounts),type:C,useCondensedTableLayout:S&&T,isCompactType:v.isCompactType()};const O={...E,...F,...I};if(C==="TreeTable"){O.hierarchyQualifier=p.hierarchyQualifier}return O}C.getTableManifestConfiguration=Mn;function Un(e,t){var n,o,i,a,l;let r;if(ue(e)){r=de(e.targetType)?Ce[e.targetType.underlyingType]:Ce[e.type]}if(r===undefined&&t!==undefined){r=Ce[t]}const s={type:(n=r)===null||n===void 0?void 0:n.type,constraints:{},formatOptions:{}};if(ue(e)&&r!==undefined){var d,u,c,v,f,p,g,m,y,b,h,T,I,P,A,D,C;s.constraints={scale:(d=r.constraints)!==null&&d!==void 0&&d.$Scale?e.scale:undefined,precision:(u=r.constraints)!==null&&u!==void 0&&u.$Precision?e.precision:undefined,maxLength:(c=r.constraints)!==null&&c!==void 0&&c.$MaxLength?e.maxLength:undefined,nullable:(v=r.constraints)!==null&&v!==void 0&&v.$Nullable?e.nullable:undefined,minimum:(f=r.constraints)!==null&&f!==void 0&&f["@Org.OData.Validation.V1.Minimum/$Decimal"]&&!isNaN((p=e.annotations)===null||p===void 0?void 0:(g=p.Validation)===null||g===void 0?void 0:g.Minimum)?`${(m=e.annotations)===null||m===void 0?void 0:(y=m.Validation)===null||y===void 0?void 0:y.Minimum}`:undefined,maximum:(b=r.constraints)!==null&&b!==void 0&&b["@Org.OData.Validation.V1.Maximum/$Decimal"]&&!isNaN((h=e.annotations)===null||h===void 0?void 0:(T=h.Validation)===null||T===void 0?void 0:T.Maximum)?`${(I=e.annotations)===null||I===void 0?void 0:(P=I.Validation)===null||P===void 0?void 0:P.Maximum}`:undefined,isDigitSequence:s.type==="sap.ui.model.odata.type.String"&&(A=r.constraints)!==null&&A!==void 0&&A[`@${"com.sap.vocabularies.Common.v1.IsDigitSequence"}`]&&(D=e.annotations)!==null&&D!==void 0&&(C=D.Common)!==null&&C!==void 0&&C.IsDigitSequence?true:undefined}}s.formatOptions={parseAsString:(s===null||s===void 0?void 0:(o=s.type)===null||o===void 0?void 0:o.indexOf("sap.ui.model.odata.type.Int"))===0||(s===null||s===void 0?void 0:(i=s.type)===null||i===void 0?void 0:i.indexOf("sap.ui.model.odata.type.Double"))===0?false:undefined,emptyString:(s===null||s===void 0?void 0:(a=s.type)===null||a===void 0?void 0:a.indexOf("sap.ui.model.odata.type.Int"))===0||(s===null||s===void 0?void 0:(l=s.type)===null||l===void 0?void 0:l.indexOf("sap.ui.model.odata.type.Double"))===0?"":undefined,parseKeepsEmptyString:s.type==="sap.ui.model.odata.type.String"?true:undefined};return s}C.getTypeConfig=Un;return{getTableActions:tt,getTableColumns:nt,getColumnsFromEntityType:Ft,updateLinkedProperties:lt,createTableVisualization:st,createDefaultTableVisualization:dt,getCapabilityRestriction:Tt,getSelectionMode:It,getRowStatusVisibility:wt,getImportance:en,getP13nMode:rn,getTableAnnotationConfiguration:gn,isFilteringCaseSensitive:Gt,splitPath:yn,getSelectionVariantConfiguration:bn,getTableManifestConfiguration:Mn,getTypeConfig:Un,updateTableVisualizationForType:it}},false);
|
|
426
426
|
/*!
|
|
427
427
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
428
428
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
429
429
|
*/
|
|
430
|
-
sap.ui.predefine("sap/fe/core/converters/controls/Common/table/StandardActions", ["sap/fe/core/formatters/TableFormatter","sap/fe/core/helpers/BindingToolkit","sap/fe/core/helpers/ModelHelper","sap/fe/core/helpers/TypeGuards","sap/fe/core/templating/DataModelPathHelper","../../../helpers/BindingHelper","../../../helpers/InsightsHelpers","../../../ManifestSettings"],function(e,t,n,i,a,o,s
|
|
430
|
+
sap.ui.predefine("sap/fe/core/converters/controls/Common/table/StandardActions", ["sap/fe/core/formatters/TableFormatter","sap/fe/core/helpers/BindingToolkit","sap/fe/core/helpers/ModelHelper","sap/fe/core/helpers/TypeGuards","sap/fe/core/templating/DataModelPathHelper","../../../helpers/BindingHelper","../../../helpers/InsightsHelpers","../../../ManifestSettings"],function(e,t,n,i,a,o,r,s){"use strict";var l={};var d=s.TemplateType;var c=s.CreationMode;var u=r.getInsightsVisibility;var p=r.getInsightsEnablement;var v=o.UI;var f=o.singletonPathVisitor;var g=a.isPathUpdatable;var b=a.isPathInsertable;var h=a.isPathDeletable;var y=a.getTargetObjectPath;var T=i.isNavigationProperty;var C=i.isEntitySet;var M=t.pathInModel;var m=t.or;var E=t.notEqual;var P=t.not;var D=t.length;var A=t.isPathInModelExpression;var S=t.isConstant;var I=t.ifElse;var x=t.greaterThan;var O=t.greaterOrEqual;var R=t.getExpressionFromAnnotation;var w=t.formatResult;var H=t.equal;var U=t.constant;var V=t.compileExpression;var j=t.and;var k;(function(e){e["CreateHidden"]="CreateHidden";e["DeleteHidden"]="DeleteHidden";e["UpdateHidden"]="UpdateHidden"})(k||(k={}));function L(e,t,n,i){return{collectionPath:y(e.getDataModelObjectPath()),hiddenAnnotation:{create:N(e,k.CreateHidden),delete:N(e,k.DeleteHidden),update:N(e,k.UpdateHidden)},creationMode:t,isDraftOrStickySupported:z(e),isViewWithMultipleVisualizations:i?e.getManifestWrapper().hasMultipleVisualizations(i):false,newAction:F(e),tableManifestConfiguration:n,restrictions:W(e)}}l.generateStandardActionsContext=L;function z(e){var t,i,a;const o=e.getDataModelObjectPath();const r=n.isObjectPathDraftSupported(o);const s=(t=o.startingEntitySet)!==null&&t!==void 0&&(i=t.annotations)!==null&&i!==void 0&&(a=i.Session)!==null&&a!==void 0&&a.StickySessionSupported?true:false;return r||s}l.isDraftOrStickySupported=z;function F(e){var t,n,i,a;const o=e.getEntitySet();const r=C(o)?((t=o.annotations.Common)===null||t===void 0?void 0:(n=t.DraftRoot)===null||n===void 0?void 0:n.NewAction)??((i=o.annotations.Session)===null||i===void 0?void 0:(a=i.StickySessionSupported)===null||a===void 0?void 0:a.NewAction):undefined;const s=r===null||r===void 0?void 0:r.toString();if(s){var l,d,c,u;let t=e===null||e===void 0?void 0:(l=e.getEntityType().actions[s])===null||l===void 0?void 0:(d=l.annotations)===null||d===void 0?void 0:(c=d.Core)===null||c===void 0?void 0:(u=c.OperationAvailable)===null||u===void 0?void 0:u.valueOf();t=t!==undefined?t:true;return{name:s,available:R(t)}}return undefined}l.getNewAction=F;function N(e,t){var n;let i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:true;const a=e.getEntitySet();const o=e.getDataModelObjectPath();const r=o.navigationProperties.length>0&&i?[o.navigationProperties[o.navigationProperties.length-1].name]:[];const s=(a===null||a===void 0?void 0:(n=a.annotations.UI)===null||n===void 0?void 0:n[t])||false;return a?R(s,r,undefined,t=>f(t,e.getConvertedTypes(),r)):U(false)}l.isActionAnnotatedHidden=N;function W(e){const t=e.getDataModelObjectPath();const n=[{key:"isInsertable",function:b},{key:"isUpdatable",function:g},{key:"isDeletable",function:h}];const i={};n.forEach(function(n){const a=n["function"];i[n.key]={expression:a.apply(null,[t,{pathVisitor:(t,n)=>f(t,e.getConvertedTypes(),n)}]),navigationExpression:a.apply(null,[t,{ignoreTargetCollection:true,authorizeUnresolvable:true,pathVisitor:(t,n)=>f(t,e.getConvertedTypes(),n)}])}});return i}l.getRestrictions=W;function q(e,t){return t||e.creationMode===c.External}l.getInsertUpdateActionsTemplating=q;function B(e,t){const n=Y(e,t);return{isTemplated:V(Q(t,n)),visible:V(n),enabled:V(ie(e,t,n))}}l.getStandardActionCreate=B;function _(e,t){const n=Z(e,t);return{isTemplated:V(X(n)),visible:V(n),enabled:V(ae(e,t,n))}}l.getStandardActionDelete=_;function $(e,t){const n=Y(e,t,true);return{isTemplated:V(Q(t,n,true)),visible:V(n),enabled:V(ne(e,t,n))}}l.getCreationRow=$;function G(e,t,n){const i=Y(e,t);const a=ie(e,t,i);const o=ee(e,t,i,n);return{visible:V(o),enabled:V(oe(o,a))}}l.getStandardActionPaste=G;function J(e,t){const n=te(e,t);return{isTemplated:V(X(n)),visible:V(n),enabled:V(re(e,t,n))}}l.getStandardActionMassEdit=J;function K(e,t,n){const i=u("Table",e,n,t);const a=j(i,p());return{isTemplated:V(i),visible:V(i),enabled:V(a)}}l.getStandardActionInsights=K;function Q(e,t){let n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;return j(m(j(n,e.creationMode===c.CreationRow),j(!n,e.creationMode!==c.CreationRow)),m(P(S(t)),t))}l.getCreateTemplating=Q;function X(e){return m(P(S(e)),e)}l.getDefaultTemplating=X;function Y(e,t){var n,i;let a=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;const o=t.restrictions.isInsertable.expression;const r=a?N(e,k.CreateHidden,false):t.hiddenAnnotation.create;const s=t.newAction;return I(t.creationMode===c.External,j(P(r),m(e.getTemplateType()===d.ListReport,v.IsEditable)),I(m(j(S(s===null||s===void 0?void 0:s.available),H(s===null||s===void 0?void 0:s.available,false)),j(S(o),H(o,false),!s),j(S(r),H(r,true)),j(t.creationMode===c.InlineCreationRows,((n=t.tableManifestConfiguration)===null||n===void 0?void 0:n.type)==="ResponsiveTable",I((t===null||t===void 0?void 0:(i=t.tableManifestConfiguration)===null||i===void 0?void 0:i.inlineCreationRowsHiddenInEditMode)===false,true,v.IsCreateMode))),false,I(e.getTemplateType()===d.ListReport,m(P(A(r)),P(r)),j(P(r),v.IsEditable))))}l.getCreateVisibility=Y;function Z(e,t){const n=t.hiddenAnnotation.delete;const i=t.restrictions.isDeletable.expression;return I(e.getTemplateType()===d.AnalyticalListPage,false,I(j(S(i),H(i,false)),false,I(j(S(n),H(n,U(true))),false,I(e.getTemplateType()!==d.ListReport,j(P(n),v.IsEditable),P(j(A(n),n))))))}l.getDeleteVisibility=Z;function ee(e,t,n,i){return j(E(t.tableManifestConfiguration.enablePaste,false),n,i,[d.ListReport,d.AnalyticalListPage].indexOf(e.getTemplateType())===-1,t.restrictions.isInsertable.expression)}l.getPasteVisibility=ee;function te(e,t){var n;const i=t.hiddenAnnotation.update,a=t.restrictions.isUpdatable.expression,o=((n=t.tableManifestConfiguration)===null||n===void 0?void 0:n.enableMassEdit)||false;const r=e.getTemplateType()===d.ObjectPage?v.IsEditable:e.getTemplateType()===d.ListReport;return j(P(j(S(a),H(a,false))),o,r,P(i))}l.getMassEditVisibility=te;function ne(t,n,i){const a=b(t.getDataModelObjectPath(),{ignoreTargetCollection:true,authorizeUnresolvable:true,pathVisitor:(e,n)=>{if(e.indexOf("/")===0){e=f(e,t.getConvertedTypes(),n);return e}const i=t.getDataModelObjectPath().navigationProperties;if(i){const t=i[i.length-1];const n=T(t)&&t.partner;if(n){e=`${n}/${e}`}}return e}});const o=a._type==="Unresolvable"?b(t.getDataModelObjectPath(),{pathVisitor:e=>f(e,t.getConvertedTypes(),[])}):a;return j(i,o,m(!n.tableManifestConfiguration.disableAddRowButtonForEmptyData,w([M("creationRowFieldValidity","internal")],e.validateCreationRowFields)))}l.getCreationRowEnablement=ne;function ie(e,t,n){let i;if(t.creationMode===c.InlineCreationRows){i=P(t.hiddenAnnotation.create)}else{i=n}const a=t.restrictions.isInsertable.expression;const o=e.resolveAbsolutePath(t.collectionPath).target;return j(i,m(C(o),j(a,m(e.getTemplateType()!==d.ObjectPage,v.IsEditable))))}l.getCreateEnablement=ie;function ae(e,t,n){const i=M("deletableContexts","internal");const a=M("unSavedContexts","internal");const o=M("draftsWithDeletableActive","internal");const r=M("draftsWithNonDeletableActive","internal");return j(n,m(t.restrictions.isDeletable.navigationExpression._type==="Unresolvable",t.restrictions.isDeletable.expression),m(j(E(i,undefined),x(D(i),0)),j(E(o,undefined),x(D(o),0)),j(E(r,undefined),x(D(r),0)),j(E(a,undefined),x(D(a),0))))}l.getDeleteEnablement=ae;function oe(e,t){return j(e,t)}l.getPasteEnablement=oe;function re(e,t,i){const a=t.restrictions.isUpdatable.expression;const o=!S(a)&&t.restrictions.isUpdatable.navigationExpression._type==="Unresolvable";const r=O(M("numberOfSelectedContexts","internal"),1);const s=O(D(M("updatableContexts","internal")),1);const l=n.isObjectPathDraftSupported(e.getDataModelObjectPath());const d=se(e);const c=I(m(j(d,l),o),j(r,s),j(r));return j(i,I(o,c,j(c,a)))}l.getMassEditEnablement=re;function se(e,t){const n=e.getTemplateType();if(n===d.ListReport||n===d.AnalyticalListPage||t&&e.getManifestWrapper().hasMultipleVisualizations(t)){return true}return false}l.isInDisplayMode=se;return l},false);
|
|
431
431
|
/*!
|
|
432
432
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
433
433
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
@@ -482,7 +482,7 @@ sap.ui.predefine("sap/fe/core/converters/helpers/ID", ["../../helpers/StableIdHe
|
|
|
482
482
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
483
483
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
484
484
|
*/
|
|
485
|
-
sap.ui.predefine("sap/fe/core/converters/helpers/InsightsHelpers", ["../ManifestSettings"],function(t){"use strict";var
|
|
485
|
+
sap.ui.predefine("sap/fe/core/converters/helpers/InsightsHelpers", ["../../helpers/BindingToolkit","../ManifestSettings"],function(t,e){"use strict";var n={};var i=e.TemplateType;var a=t.pathInModel;var s=t.equal;var l=t.constant;var o=t.and;function r(t,e,n,r){var u;let d,g;const p=e.getManifestWrapper().hasMultipleEntitySets();const v=e.getManifestWrapper().hasMultipleVisualizations();const f=e.getManifestWrapper().getViewConfiguration();const c=f!==undefined&&f.paths.length>1?true:false;const h=e.getTemplateType()===i.ListReport;const b=e.getManifestControlConfiguration(n);const T=t==="Analytical"?(b===null||b===void 0?void 0:b.enableAddCardToInsights)??true:(b===null||b===void 0?void 0:(u=b.tableSettings)===null||u===void 0?void 0:u.enableAddCardToInsights)??true;if(t==="Table"){var M;d=r===null||r===void 0?void 0:r.tableManifestConfiguration;g=((M=d)===null||M===void 0?void 0:M.type)==="ResponsiveTable"}return o(l(T),l(h),l(!p),l(!c),l(t==="Table"?(g??false)&&!v:true),s(a("isInsightsSupported","pageInternal"),true))}n.getInsightsVisibility=r;function u(){return s(a("isInsightsEnabled","internal"),true)}n.getInsightsEnablement=u;return n},false);
|
|
486
486
|
/*!
|
|
487
487
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
488
488
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
@@ -577,7 +577,7 @@ sap.ui.predefine("sap/fe/core/helpers/AppStartupHelper", ["sap/ui/model/Filter",
|
|
|
577
577
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
578
578
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
579
579
|
*/
|
|
580
|
-
sap.ui.predefine("sap/fe/core/helpers/BindingToolkit", ["./AnnotationEnum"],function(e){"use strict";var n={};var t=e.resolveEnumValue;const r={"Edm.Boolean":{type:"sap.ui.model.odata.type.Boolean"},"Edm.Byte":{type:"sap.ui.model.odata.type.Byte"},"Edm.Date":{type:"sap.ui.model.odata.type.Date"},"Edm.DateTimeOffset":{constraints:{$Precision:"precision",$V4:"V4"},type:"sap.ui.model.odata.type.DateTimeOffset"},"Edm.Decimal":{constraints:{"@Org.OData.Validation.V1.Minimum/$Decimal":"minimum","@Org.OData.Validation.V1.Minimum@Org.OData.Validation.V1.Exclusive":"minimumExclusive","@Org.OData.Validation.V1.Maximum/$Decimal":"maximum","@Org.OData.Validation.V1.Maximum@Org.OData.Validation.V1.Exclusive":"maximumExclusive",$Precision:"precision",$Scale:"scale"},type:"sap.ui.model.odata.type.Decimal"},"Edm.Double":{type:"sap.ui.model.odata.type.Double"},"Edm.Guid":{type:"sap.ui.model.odata.type.Guid"},"Edm.Int16":{type:"sap.ui.model.odata.type.Int16"},"Edm.Int32":{type:"sap.ui.model.odata.type.Int32"},"Edm.Int64":{type:"sap.ui.model.odata.type.Int64"},"Edm.SByte":{type:"sap.ui.model.odata.type.SByte"},"Edm.Single":{type:"sap.ui.model.odata.type.Single"},"Edm.Stream":{type:"sap.ui.model.odata.type.Stream"},"Edm.Binary":{type:"sap.ui.model.odata.type.Stream"},"Edm.String":{constraints:{"@com.sap.vocabularies.Common.v1.IsDigitSequence":"isDigitSequence",$MaxLength:"maxLength",$Nullable:"nullable"},type:"sap.ui.model.odata.type.String"},"Edm.TimeOfDay":{constraints:{$Precision:"precision"},type:"sap.ui.model.odata.type.TimeOfDay"}};n.EDM_TYPE_MAPPING=r;const a={_type:"Unresolvable"};n.unresolvableExpression=a;function o(e){return e.replace(/'/g,"\\'")}function i(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++){n[t]=arguments[t]}return n.find(e=>e._type==="Unresolvable")!==undefined}n.hasUnresolvableExpression=i;function s(e,n){if(e._type!==n._type){return false}switch(e._type){case"Unresolvable":return false;case"Constant":case"EmbeddedBinding":case"EmbeddedExpressionBinding":return e.value===n.value;case"Not":return s(e.operand,n.operand);case"Truthy":return s(e.operand,n.operand);case"Set":return e.operator===n.operator&&e.operands.length===n.operands.length&&e.operands.every(e=>n.operands.some(n=>s(e,n)));case"IfElse":return s(e.condition,n.condition)&&s(e.onTrue,n.onTrue)&&s(e.onFalse,n.onFalse);case"Comparison":return e.operator===n.operator&&s(e.operand1,n.operand1)&&s(e.operand2,n.operand2);case"Concat":const t=e.expressions;const r=n.expressions;if(t.length!==r.length){return false}return t.every((e,n)=>s(e,r[n]));case"Length":return s(e.pathInModel,n.pathInModel);case"PathInModel":return e.modelName===n.modelName&&e.path===n.path&&e.targetEntitySet===n.targetEntitySet;case"Formatter":return e.fn===n.fn&&e.parameters.length===n.parameters.length&&e.parameters.every((e,t)=>s(n.parameters[t],e));case"ComplexType":return e.type===n.type&&e.bindingParameters.length===n.bindingParameters.length&&e.bindingParameters.every((e,t)=>s(n.bindingParameters[t],e));case"Function":const a=n;if(e.obj===undefined||a.obj===undefined){return e.obj===a}return e.fn===a.fn&&s(e.obj,a.obj)&&e.parameters.length===a.parameters.length&&e.parameters.every((e,n)=>s(a.parameters[n],e));case"Ref":return e.ref===n.ref}return false}n._checkExpressionsAreEqual=s;function u(e){return e.operands.reduce((n,t)=>{const r=t._type==="Set"&&t.operator===e.operator?t.operands:[t];r.forEach(e=>{if(n.operands.every(n=>!s(n,e))){n.operands.push(e)}});return n},{_type:"Set",operator:e.operator,operands:[]})}function l(e){const n=e.map(f);return e.some((e,t)=>{for(let r=t+1;r<n.length;r++){if(s(e,n[r])){return true}}return false})}function p(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++){n[t]=arguments[t]}const r=u({_type:"Set",operator:"&&",operands:n.map($)}).operands;if(i(...r)){return a}let o=false;const s=r.filter(e=>{if(I(e)){o=true}return!E(e)});if(o){return v(false)}else if(s.length===0){const e=r.reduce((e,n)=>e&&O(n),true);return v(e)}else if(s.length===1){return s[0]}else if(l(s)){return v(false)}else{return{_type:"Set",operator:"&&",operands:s}}}n.and=p;function d(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++){n[t]=arguments[t]}const r=u({_type:"Set",operator:"||",operands:n.map($)}).operands;if(i(...r)){return a}let o=false;const s=r.filter(e=>{if(O(e)){o=true}return!E(e)||e.value});if(o){return v(true)}else if(s.length===0){const e=r.reduce((e,n)=>e&&O(n),true);return v(e)}else if(s.length===1){return s[0]}else if(l(s)){return v(true)}else{return{_type:"Set",operator:"||",operands:s}}}n.or=d;function f(e){e=$(e);if(i(e)){return a}else if(E(e)){return v(!e.value)}else if(typeof e==="object"&&e._type==="Set"&&e.operator==="||"&&e.operands.every(e=>E(e)||P(e))){return p(...e.operands.map(e=>f(e)))}else if(typeof e==="object"&&e._type==="Set"&&e.operator==="&&"&&e.operands.every(e=>E(e)||P(e))){return d(...e.operands.map(e=>f(e)))}else if(P(e)){switch(e.operator){case"!==":return{...e,operator:"==="};case"<":return{...e,operator:">="};case"<=":return{...e,operator:">"};case"===":return{...e,operator:"!=="};case">":return{...e,operator:"<="};case">=":return{...e,operator:"<"}}}else if(e._type==="Not"){return e.operand}return{_type:"Not",operand:e}}n.not=f;function c(e){if(E(e)){return v(!!e.value)}else{return{_type:"Truthy",operand:e}}}n.isTruthy=c;function m(e,n){let t=arguments.length>2&&arguments[2]!==undefined?arguments[2]:[];let r=arguments.length>3?arguments[3]:undefined;return y(e,n,t,r)}n.bindingExpression=m;function y(e,n){let t=arguments.length>2&&arguments[2]!==undefined?arguments[2]:[];let r=arguments.length>3?arguments[3]:undefined;if(e===undefined){return a}let o;if(r){o=r(e);if(o===undefined){return a}}else{const n=t.concat();n.push(e);o=n.join("/")}return{_type:"PathInModel",modelName:n,path:o}}n.pathInModel=y;function v(e){let n;if(typeof e==="object"&&e!==null&&e!==undefined){if(Array.isArray(e)){n=e.map($)}else if(F(e)){n=e.valueOf()}else{n=Object.entries(e).reduce((e,n)=>{let[t,r]=n;const a=$(r);if(a._type!=="Constant"||a.value!==undefined){e[t]=a}return e},{})}}else{n=e}return{_type:"Constant",value:n}}n.constant=v;function h(e,n){if(e!==undefined&&typeof e==="string"&&e.startsWith("{")){const n=/^{(.*)>(.+)}$/;const t=n.exec(e);if(e.startsWith("{=")){return{_type:"EmbeddedExpressionBinding",value:e}}else if(t){return y(t[2]||"",t[1]||undefined)}else{return{_type:"EmbeddedBinding",value:e}}}else if(n==="boolean"&&typeof e==="string"&&(e==="true"||e==="false")){return v(e==="true")}else if(n==="number"&&typeof e==="string"&&(!isNaN(Number(e))||e==="NaN")){return v(Number(e))}else{return v(e)}}n.resolveBindingString=h;function g(e){return{_type:"Ref",ref:e}}n.ref=g;function $(e){if(b(e)){return e}return v(e)}function b(e){return(e===null||e===void 0?void 0:e._type)!==undefined}n.isBindingToolkitExpression=b;function E(e){return typeof e!=="object"||e._type==="Constant"}n.isConstant=E;function O(e){return E(e)&&e.value===true}function I(e){return E(e)&&e.value===false}function _(e){return(e===null||e===void 0?void 0:e._type)==="PathInModel"}n.isPathInModelExpression=_;function x(e){return(e===null||e===void 0?void 0:e._type)==="ComplexType"}n.isComplexTypeExpression=x;function C(e){return(e===null||e===void 0?void 0:e._type)==="Concat"}function P(e){return e._type==="Comparison"}function S(e){const n=e;return(n===null||n===void 0?void 0:n._type)==="Constant"&&(n===null||n===void 0?void 0:n.value)===undefined}n.isUndefinedExpression=S;function F(e){switch(e.constructor.name){case"String":case"Number":case"Boolean":return true;default:return false}}function T(e){return typeof e==="object"&&!F(e)}function N(e){let n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];let t=arguments.length>2?arguments[2]:undefined;let r=arguments.length>3?arguments[3]:undefined;return M(e,n,t,r)}n.annotationExpression=N;function M(e){var n;let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];let r=arguments.length>2?arguments[2]:undefined;let o=arguments.length>3?arguments[3]:undefined;if(e===undefined){return $(r)}e=(n=e)===null||n===void 0?void 0:n.valueOf();if(!T(e)){return v(e)}switch(e.type){case"Path":return y(e.path,undefined,t,o);case"If":return D(e.If,t,o);case"Not":return f(w(e.Not,t,o));case"Eq":return L(w(e.Eq[0],t,o),w(e.Eq[1],t,o));case"Ne":return k(w(e.Ne[0],t,o),w(e.Ne[1],t,o));case"Gt":return q(w(e.Gt[0],t,o),w(e.Gt[1],t,o));case"Ge":return B(w(e.Ge[0],t,o),w(e.Ge[1],t,o));case"Lt":return U(w(e.Lt[0],t,o),w(e.Lt[1],t,o));case"Le":return G(w(e.Le[0],t,o),w(e.Le[1],t,o));case"Or":return d(...e.Or.map(function(e){return w(e,t,o)}));case"And":return p(...e.And.map(function(e){return w(e,t,o)}));case"Apply":return A(e,t,o)}return a}n.getExpressionFromAnnotation=M;function w(e){let n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];let r=arguments.length>2?arguments[2]:undefined;if(e===null||typeof e!=="object"){return v(e)}else if(e.hasOwnProperty("$Or")){return d(...e.$Or.map(function(e){return w(e,n,r)}))}else if(e.hasOwnProperty("$And")){return p(...e.$And.map(function(e){return w(e,n,r)}))}else if(e.hasOwnProperty("$Not")){return f(w(e.$Not,n,r))}else if(e.hasOwnProperty("$Eq")){return L(w(e.$Eq[0],n,r),w(e.$Eq[1],n,r))}else if(e.hasOwnProperty("$Ne")){return k(w(e.$Ne[0],n,r),w(e.$Ne[1],n,r))}else if(e.hasOwnProperty("$Gt")){return q(w(e.$Gt[0],n,r),w(e.$Gt[1],n,r))}else if(e.hasOwnProperty("$Ge")){return B(w(e.$Ge[0],n,r),w(e.$Ge[1],n,r))}else if(e.hasOwnProperty("$Lt")){return U(w(e.$Lt[0],n,r),w(e.$Lt[1],n,r))}else if(e.hasOwnProperty("$Le")){return G(w(e.$Le[0],n,r),w(e.$Le[1],n,r))}else if(e.hasOwnProperty("$Path")){return y(e.$Path,undefined,n,r)}else if(e.hasOwnProperty("$Apply")){return M({type:"Apply",Function:e.$Function,Apply:e.$Apply},n,undefined,r)}else if(e.hasOwnProperty("$If")){return M({type:"If",If:e.$If},n,undefined,r)}else if(e.hasOwnProperty("$EnumMember")){return v(t(e.$EnumMember))}return v(false)}function D(e){let n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];let t=arguments.length>2?arguments[2]:undefined;return Y(w(e[0],n,t),w(e[1],n,t),w(e[2],n,t))}n.annotationIfExpression=D;function A(e){let n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];let t=arguments.length>2?arguments[2]:undefined;switch(e.Function){case"odata.concat":return ee(...e.Apply.map(e=>{let r=e;if(e.hasOwnProperty("$Path")){r={type:"Path",path:e.$Path}}else if(e.hasOwnProperty("$If")){r={type:"If",If:e.$If}}else if(e.hasOwnProperty("$Apply")){r={type:"Apply",Function:e.$Function,Apply:e.$Apply}}return M(r,n,undefined,t)}))}return a}n.annotationApplyExpression=A;function j(e,n,t){const r=$(n);const o=$(t);if(i(r,o)){return a}if(E(r)&&E(o)){switch(e){case"!==":return v(r.value!==o.value);case"===":return v(r.value===o.value);case"<":return v(r.value<o.value);case"<=":return v(r.value<=o.value);case">":return v(r.value>o.value);case">=":return v(r.value>=o.value)}}else{return{_type:"Comparison",operator:e,operand1:r,operand2:o}}}function V(e){if(e._type==="Unresolvable"){return e}return{_type:"Length",pathInModel:e}}n.length=V;function L(e,n){const t=$(e);const r=$(n);if(i(t,r)){return a}if(s(t,r)){return v(true)}function o(e,n){if(e._type==="Comparison"&&O(n)){return e}else if(e._type==="Comparison"&&I(n)){return f(e)}else if(e._type==="IfElse"&&s(e.onTrue,n)){return d(e.condition,L(e.onFalse,n))}else if(e._type==="IfElse"&&s(e.onFalse,n)){return d(f(e.condition),L(e.onTrue,n))}else if(e._type==="IfElse"&&E(e.onTrue)&&E(e.onFalse)&&E(n)&&!s(e.onTrue,n)&&!s(e.onFalse,n)){return v(false)}return undefined}const u=o(t,r)??o(r,t);return u??j("===",t,r)}n.equal=L;function k(e,n){return f(L(e,n))}n.notEqual=k;function B(e,n){return j(">=",e,n)}n.greaterOrEqual=B;function q(e,n){return j(">",e,n)}n.greaterThan=q;function G(e,n){return j("<=",e,n)}n.lessOrEqual=G;function U(e,n){return j("<",e,n)}n.lessThan=U;function Y(e,n,t){let r=$(e);let o=$(n);let u=$(t);if(i(r,o,u)){return a}if(r._type==="Not"){[o,u]=[u,o];r=f(r)}if(o._type==="IfElse"&&s(r,o.condition)){o=o.onTrue}if(u._type==="IfElse"&&s(r,u.condition)){u=u.onFalse}if(E(r)){return r.value?o:u}if(s(o,u)){return o}if(I(u)){return p(r,o)}if(O(u)){return d(f(r),o)}if(I(o)){return p(f(r),u)}if(O(o)){return d(r,u)}if(x(e)||x(n)||x(t)){let r=0;const a=R([e,n,t],"sap.fe.core.formatters.StandardFormatter#ifElse");const o=[];ne(a,"PathInModel",e=>{o.push(e);return y(`$${r++}`,"$")},true);o.unshift(v(JSON.stringify(a)));return R(o,"sap.fe.core.formatters.StandardFormatter#evaluateComplexExpression",undefined,true)}return{_type:"IfElse",condition:r,onTrue:o,onFalse:u}}n.ifElse=Y;function W(e){switch(e._type){case"Constant":case"Formatter":case"ComplexType":return false;case"Set":return e.operands.some(W);case"PathInModel":return e.modelName===undefined;case"Comparison":return W(e.operand1)||W(e.operand2);case"IfElse":return W(e.condition)||W(e.onTrue)||W(e.onFalse);case"Not":case"Truthy":return W(e.operand);default:return false}}function R(e,n,t){let r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:false;const o=e.map($);if(i(...o)){return a}if(t){if(!o.some(W)){t.keys.forEach(e=>o.push(y(e.name,"")))}}let s="";if(typeof n==="string"){s=n}else{s=n.__functionName}const[u,l]=s.split("#");if(!r&&(o.some(x)||o.some(C))){let e=0;const n=R(o,s,undefined,true);const t=[];ne(n,"PathInModel",n=>{t.push(n);return y(`$${e++}`,"$")});t.unshift(v(JSON.stringify(n)));return R(t,"sap.fe.core.formatters.StandardFormatter#evaluateComplexExpression",undefined,true)}else if(!!l&&l.length>0){o.unshift(v(l))}return{_type:"Formatter",fn:u,parameters:o}}n.formatResult=R;function Q(e,n){var t,r,a,o,i,s,u,l,p,d,f,c,m;const y={};if(e!==null&&e!==void 0&&(t=e.constraints)!==null&&t!==void 0&&t.$Scale&&n.scale!==undefined){y.scale=n.scale}if(e!==null&&e!==void 0&&(r=e.constraints)!==null&&r!==void 0&&r.$Precision&&n.precision!==undefined){y.precision=n.precision}if(e!==null&&e!==void 0&&(a=e.constraints)!==null&&a!==void 0&&a.$MaxLength&&n.maxLength!==undefined){y.maxLength=n.maxLength}if(n.nullable===false){y.nullable=false}if(e!==null&&e!==void 0&&(o=e.constraints)!==null&&o!==void 0&&o["@Org.OData.Validation.V1.Minimum/$Decimal"]&&!isNaN((i=n.annotations)===null||i===void 0?void 0:(s=i.Validation)===null||s===void 0?void 0:s.Minimum)){var v,h;y.minimum=`${(v=n.annotations)===null||v===void 0?void 0:(h=v.Validation)===null||h===void 0?void 0:h.Minimum}`}if(e!==null&&e!==void 0&&(u=e.constraints)!==null&&u!==void 0&&u["@Org.OData.Validation.V1.Maximum/$Decimal"]&&!isNaN((l=n.annotations)===null||l===void 0?void 0:(p=l.Validation)===null||p===void 0?void 0:p.Maximum)){var g,$;y.maximum=`${(g=n.annotations)===null||g===void 0?void 0:($=g.Validation)===null||$===void 0?void 0:$.Maximum}`}if((d=n.annotations)!==null&&d!==void 0&&(f=d.Common)!==null&&f!==void 0&&f.IsDigitSequence&&e.type==="sap.ui.model.odata.type.String"&&e!==null&&e!==void 0&&(c=e.constraints)!==null&&c!==void 0&&c["@com.sap.vocabularies.Common.v1.IsDigitSequence"]){y.isDigitSequence=true}if(e!==null&&e!==void 0&&(m=e.constraints)!==null&&m!==void 0&&m.$V4){y.V4=true}return y}n.setUpConstraints=Q;function J(e,n){var t;let a=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;const o=n;if(e._type!=="Property"){return o}const i=r[e.type];if(!i){return o}if(!o.formatOptions){o.formatOptions={}}o.constraints={};o.type=i.type;if(!a){o.constraints=Q(i,e)}if((o===null||o===void 0?void 0:(t=o.type)===null||t===void 0?void 0:t.indexOf("sap.ui.model.odata.type.Int"))===0&&(o===null||o===void 0?void 0:o.type)!=="sap.ui.model.odata.type.Int64"||(o===null||o===void 0?void 0:o.type)==="sap.ui.model.odata.type.Double"){o.formatOptions=Object.assign(o.formatOptions,{parseAsString:false})}if(o.type==="sap.ui.model.odata.type.String"){o.formatOptions.parseKeepsEmptyString=true;const n=K(e);if(n){o.formatOptions.fiscalType=n;o.type="sap.fe.core.type.FiscalDate"}}if(o.type==="sap.ui.model.odata.type.Decimal"||(o===null||o===void 0?void 0:o.type)==="sap.ui.model.odata.type.Int64"){o.formatOptions=Object.assign(o.formatOptions,{emptyString:""})}return o}n.formatWithTypeInformation=J;const K=function(e){var n,t,r,a,o,i,s,u,l,p,d,f,c,m,y,v;if((n=e.annotations)!==null&&n!==void 0&&(t=n.Common)!==null&&t!==void 0&&t.IsFiscalYear){return"com.sap.vocabularies.Common.v1.IsFiscalYear"}if((r=e.annotations)!==null&&r!==void 0&&(a=r.Common)!==null&&a!==void 0&&a.IsFiscalPeriod){return"com.sap.vocabularies.Common.v1.IsFiscalPeriod"}if((o=e.annotations)!==null&&o!==void 0&&(i=o.Common)!==null&&i!==void 0&&i.IsFiscalYearPeriod){return"com.sap.vocabularies.Common.v1.IsFiscalYearPeriod"}if((s=e.annotations)!==null&&s!==void 0&&(u=s.Common)!==null&&u!==void 0&&u.IsFiscalQuarter){return"com.sap.vocabularies.Common.v1.IsFiscalQuarter"}if((l=e.annotations)!==null&&l!==void 0&&(p=l.Common)!==null&&p!==void 0&&p.IsFiscalYearQuarter){return"com.sap.vocabularies.Common.v1.IsFiscalYearQuarter"}if((d=e.annotations)!==null&&d!==void 0&&(f=d.Common)!==null&&f!==void 0&&f.IsFiscalWeek){return"com.sap.vocabularies.Common.v1.IsFiscalWeek"}if((c=e.annotations)!==null&&c!==void 0&&(m=c.Common)!==null&&m!==void 0&&m.IsFiscalYearWeek){return"com.sap.vocabularies.Common.v1.IsFiscalYearWeek"}if((y=e.annotations)!==null&&y!==void 0&&(v=y.Common)!==null&&v!==void 0&&v.IsDayOfFiscalYear){return"com.sap.vocabularies.Common.v1.IsDayOfFiscalYear"}};n.getFiscalType=K;function z(e,n,t,r){const o=e.map($);if(i(...o)){return a}if(o.length===1&&E(o[0])&&!t){return o[0]}else if(t){if(!o.some(W)){t.keys.forEach(e=>o.push(y(e.name,"")))}}r=H(e[0],r);if(n==="sap.ui.model.odata.type.Unit"){const e=y("/##@@requestUnitsOfMeasure");e.targetType="any";e.mode="OneTime";o.push(e)}else if(n==="sap.ui.model.odata.type.Currency"){const e=y("/##@@requestCurrencyCodes");e.targetType="any";e.mode="OneTime";o.push(e)}return{_type:"ComplexType",type:n,formatOptions:r||{},parameters:{},bindingParameters:o}}n.addTypeInformation=z;function H(e,n){var t,r;if(!(n&&n.showNumber===false)&&((e===null||e===void 0?void 0:(t=e.type)===null||t===void 0?void 0:t.indexOf("sap.ui.model.odata.type.Int"))===0||(e===null||e===void 0?void 0:e.type)==="sap.ui.model.odata.type.Decimal"||(e===null||e===void 0?void 0:e.type)==="sap.ui.model.odata.type.Double")){if((e===null||e===void 0?void 0:e.type)==="sap.ui.model.odata.type.Int64"||(e===null||e===void 0?void 0:e.type)==="sap.ui.model.odata.type.Decimal"){var a;n=((a=n)===null||a===void 0?void 0:a.showMeasure)===false?{emptyString:"",showMeasure:false}:{emptyString:""}}else{var o;n=((o=n)===null||o===void 0?void 0:o.showMeasure)===false?{parseAsString:false,showMeasure:false}:{parseAsString:false}}}if((e===null||e===void 0?void 0:(r=e.constraints)===null||r===void 0?void 0:r.nullable)!==false){var i;(i=n)===null||i===void 0?true:delete i.emptyString}return n}function X(e,n,t){const r=typeof e==="string"?e:e.__functionName;return{_type:"Function",obj:t!==undefined?$(t):undefined,fn:r,parameters:n.map($)}}n.fn=X;function Z(e){const n=[];ne(e,"PathInModel",e=>{n.push(d(L(e,""),L(e,undefined),L(e,null)));return e});return p(...n)}n.isEmpty=Z;function ee(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++){n[t]=arguments[t]}const r=n.map($);if(i(...r)){return a}if(r.every(E)){return v(r.reduce((e,n)=>{if(n.value!==undefined){return e+n.value.toString()}return e},""))}else if(r.some(x)){let e=0;const n=R(r,"sap.fe.core.formatters.StandardFormatter#concat",undefined,true);const t=[];ne(n,"PathInModel",n=>{t.push(n);return y(`$${e++}`,"$")});t.unshift(v(JSON.stringify(n)));return R(t,"sap.fe.core.formatters.StandardFormatter#evaluateComplexExpression",undefined,true)}return{_type:"Concat",expressions:r}}n.concat=ee;function ne(e,n,t){let r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:false;let a=e;switch(a._type){case"Function":case"Formatter":a.parameters=a.parameters.map(e=>ne(e,n,t,r));break;case"Concat":a.expressions=a.expressions.map(e=>ne(e,n,t,r));a=ee(...a.expressions);break;case"ComplexType":a.bindingParameters=a.bindingParameters.map(e=>ne(e,n,t,r));break;case"IfElse":const e=ne(a.onTrue,n,t,r);const o=ne(a.onFalse,n,t,r);let i=a.condition;if(r){i=ne(a.condition,n,t,r)}a=Y(i,e,o);break;case"Not":if(r){const e=ne(a.operand,n,t,r);a=f(e)}break;case"Truthy":break;case"Set":if(r){const e=a.operands.map(e=>ne(e,n,t,r));a=a.operator==="||"?d(...e):p(...e)}break;case"Comparison":if(r){const e=ne(a.operand1,n,t,r);const o=ne(a.operand2,n,t,r);a=j(a.operator,e,o)}break;case"Ref":case"Length":case"PathInModel":case"Constant":case"EmbeddedBinding":case"EmbeddedExpressionBinding":case"Unresolvable":break}if(n===a._type){a=t(e)}return a}n.transformRecursively=ne;const te=function(e){return!E(e)&&!_(e)&&b(e)&&e._type!=="IfElse"&&e._type!=="Function"};function re(e){let n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;if(n&&Object.keys(e.value).length===0){return""}const t=e.value;const r=[];Object.keys(t).forEach(e=>{const a=t[e];const o=ue(a,true,false,n);if(o&&o.length>0){r.push(`${e}: ${o}`)}});return`{${r.join(", ")}}`}function ae(e,n){let t=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;let r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:false;if(e.value===null){return r?null:"null"}if(e.value===undefined){return r?undefined:"undefined"}if(typeof e.value==="object"){if(Array.isArray(e.value)){const n=e.value.map(e=>ue(e,true));return`[${n.join(", ")}]`}else{return re(e,t)}}if(n){switch(typeof e.value){case"number":case"bigint":case"boolean":return e.value.toString();case"string":return`'${o(e.value.toString())}'`;default:return""}}else{return r?e.value:e.value.toString()}}n.compileConstant=ae;function oe(e,n,t){if(e.type||e.parameters||e.targetType||e.formatOptions||e.constraints){const r={path:ce(e),type:e.type,targetType:e.targetType,parameters:e.parameters,formatOptions:e.formatOptions,constraints:e.constraints};const a=ue(r,false,false,true);if(n){return`${t}${a}`}return a}else if(n){return`${t}{${ce(e)}}`}else{return`{${ce(e)}}`}}function ie(e){if(e.bindingParameters.length===1){return`{${de(e.bindingParameters[0],true)}, type: '${e.type}'}`}let n=`], type: '${e.type}'`;if(fe(e.formatOptions)){n+=`, formatOptions: ${ue(e.formatOptions)}`}if(fe(e.parameters)){n+=`, parameters: ${ue(e.parameters)}`}n+="}";return`{mode:'TwoWay', parts:[${e.bindingParameters.map(e=>de(e)).join(",")}${n}`}function se(e,n){let t=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;if(n){if(t){return`(${e})`}else{return e}}else{return`{= ${e}}`}}n.wrapBindingExpression=se;function ue(e){let n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;let t=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;let r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:false;const a=$(e);const o=t?"$":"%";switch(a._type){case"Unresolvable":return undefined;case"Constant":return ae(a,n,r);case"Ref":return a.ref||"null";case"Function":const e=`${a.parameters.map(e=>ue(e,true)).join(", ")}`;return a.obj===undefined?`${a.fn}(${e})`:`${ue(a.obj,true)}.${a.fn}(${e})`;case"EmbeddedExpressionBinding":return n?`(${a.value.substring(2,a.value.length-1)})`:`${a.value}`;case"EmbeddedBinding":return n?`${o}${a.value}`:`${a.value}`;case"PathInModel":return oe(a,n,o);case"Comparison":const t=le(a);return se(t,n);case"IfElse":const i=`${ue(a.condition,true)} ? ${ue(a.onTrue,true)} : ${ue(a.onFalse,true)}`;return se(i,n,true);case"Set":const s=a.operands.map(e=>ue(e,true)).join(` ${a.operator} `);return se(s,n,true);case"Concat":const u=a.expressions.map(e=>ue(e,true,true)).join(" + ");return se(u,n);case"Length":const l=`${ue(a.pathInModel,true)}.length`;return se(l,n);case"Not":const p=`!${ue(a.operand,true)}`;return se(p,n);case"Truthy":const d=`!!${ue(a.operand,true)}`;return se(d,n);case"Formatter":const f=pe(a);return n?`$${f}`:f;case"ComplexType":const c=ie(a);return n?`$${c}`:c;default:return""}}n.compileExpression=ue;function le(e){function n(e){const n=ue(e,true)??"undefined";return se(n,true,te(e))}return`${n(e.operand1)} ${e.operator} ${n(e.operand2)}`}function pe(e){if(e.parameters.length===1){return`{${de(e.parameters[0],true)}, formatter: '${e.fn}'}`}else{const n=e.parameters.map(e=>{if(e._type==="ComplexType"){return ie(e)}else{return de(e)}});return`{parts: [${n.join(", ")}], formatter: '${e.fn}'}`}}function de(e){let n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;let t="";if(e._type==="Constant"){if(e.value===undefined){t=`value: 'undefined'`}else{t=`value: ${ae(e,true)}`}}else if(e._type==="PathInModel"){t=`path: '${ce(e)}'`;t+=e.type?`, type: '${e.type}'`:`, targetType: 'any'`;if(fe(e.mode)){t+=`, mode: '${ue(e.mode)}'`}if(fe(e.constraints)){t+=`, constraints: ${ue(e.constraints)}`}if(fe(e.formatOptions)){t+=`, formatOptions: ${ue(e.formatOptions)}`}if(fe(e.parameters)){t+=`, parameters: ${ue(e.parameters)}`}}else{return""}return n?t:`{${t}}`}function fe(e){return e&&Object.keys(e).length>0}function ce(e){return`${e.modelName?`${e.modelName}>`:""}${e.path}`}return n},false);
|
|
580
|
+
sap.ui.predefine("sap/fe/core/helpers/BindingToolkit", ["./AnnotationEnum"],function(e){"use strict";var n={};var t=e.resolveEnumValue;const r={"Edm.Boolean":{type:"sap.ui.model.odata.type.Boolean"},"Edm.Byte":{type:"sap.ui.model.odata.type.Byte"},"Edm.Date":{type:"sap.ui.model.odata.type.Date"},"Edm.DateTimeOffset":{constraints:{$Precision:"precision",$V4:"V4"},type:"sap.ui.model.odata.type.DateTimeOffset"},"Edm.Decimal":{constraints:{"@Org.OData.Validation.V1.Minimum/$Decimal":"minimum","@Org.OData.Validation.V1.Minimum@Org.OData.Validation.V1.Exclusive":"minimumExclusive","@Org.OData.Validation.V1.Maximum/$Decimal":"maximum","@Org.OData.Validation.V1.Maximum@Org.OData.Validation.V1.Exclusive":"maximumExclusive",$Precision:"precision",$Scale:"scale"},type:"sap.ui.model.odata.type.Decimal"},"Edm.Double":{type:"sap.ui.model.odata.type.Double"},"Edm.Guid":{type:"sap.ui.model.odata.type.Guid"},"Edm.Int16":{type:"sap.ui.model.odata.type.Int16"},"Edm.Int32":{type:"sap.ui.model.odata.type.Int32"},"Edm.Int64":{type:"sap.ui.model.odata.type.Int64"},"Edm.SByte":{type:"sap.ui.model.odata.type.SByte"},"Edm.Single":{type:"sap.ui.model.odata.type.Single"},"Edm.Stream":{type:"sap.ui.model.odata.type.Stream"},"Edm.Binary":{type:"sap.ui.model.odata.type.Stream"},"Edm.String":{constraints:{"@com.sap.vocabularies.Common.v1.IsDigitSequence":"isDigitSequence",$MaxLength:"maxLength",$Nullable:"nullable"},type:"sap.ui.model.odata.type.String"},"Edm.TimeOfDay":{constraints:{$Precision:"precision"},type:"sap.ui.model.odata.type.TimeOfDay"}};n.EDM_TYPE_MAPPING=r;const a={_type:"Unresolvable"};n.unresolvableExpression=a;function o(e){return e.replace(/'/g,"\\'")}function i(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++){n[t]=arguments[t]}return n.find(e=>e._type==="Unresolvable")!==undefined}n.hasUnresolvableExpression=i;function s(e,n){if(e._type!==n._type){return false}switch(e._type){case"Unresolvable":return false;case"Constant":case"EmbeddedBinding":case"EmbeddedExpressionBinding":return e.value===n.value;case"Not":return s(e.operand,n.operand);case"Truthy":return s(e.operand,n.operand);case"Set":return e.operator===n.operator&&e.operands.length===n.operands.length&&e.operands.every(e=>n.operands.some(n=>s(e,n)));case"IfElse":return s(e.condition,n.condition)&&s(e.onTrue,n.onTrue)&&s(e.onFalse,n.onFalse);case"Comparison":return e.operator===n.operator&&s(e.operand1,n.operand1)&&s(e.operand2,n.operand2);case"Concat":const t=e.expressions;const r=n.expressions;if(t.length!==r.length){return false}return t.every((e,n)=>s(e,r[n]));case"Length":return s(e.pathInModel,n.pathInModel);case"PathInModel":return e.modelName===n.modelName&&e.path===n.path&&e.targetEntitySet===n.targetEntitySet;case"Formatter":return e.fn===n.fn&&e.parameters.length===n.parameters.length&&e.parameters.every((e,t)=>s(n.parameters[t],e));case"ComplexType":return e.type===n.type&&e.bindingParameters.length===n.bindingParameters.length&&e.bindingParameters.every((e,t)=>s(n.bindingParameters[t],e));case"Function":const a=n;if(e.obj===undefined||a.obj===undefined){return e.obj===a}return e.fn===a.fn&&s(e.obj,a.obj)&&e.parameters.length===a.parameters.length&&e.parameters.every((e,n)=>s(a.parameters[n],e));case"Ref":return e.ref===n.ref}return false}n._checkExpressionsAreEqual=s;function u(e){return e.operands.reduce((n,t)=>{const r=t._type==="Set"&&t.operator===e.operator?t.operands:[t];r.forEach(e=>{if(n.operands.every(n=>!s(n,e))){n.operands.push(e)}});return n},{_type:"Set",operator:e.operator,operands:[]})}function l(e){const n=e.map(f);return e.some((e,t)=>{for(let r=t+1;r<n.length;r++){if(s(e,n[r])){return true}}return false})}function d(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++){n[t]=arguments[t]}const r=u({_type:"Set",operator:"&&",operands:n.map($)}).operands;if(i(...r)){return a}let o=false;const s=r.filter(e=>{if(I(e)){o=true}return!E(e)});if(o){return v(false)}else if(s.length===0){const e=r.reduce((e,n)=>e&&O(n),true);return v(e)}else if(s.length===1){return s[0]}else if(l(s)){return v(false)}else{return{_type:"Set",operator:"&&",operands:s}}}n.and=d;function p(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++){n[t]=arguments[t]}const r=u({_type:"Set",operator:"||",operands:n.map($)}).operands;if(i(...r)){return a}let o=false;const s=r.filter(e=>{if(O(e)){o=true}return!E(e)||e.value});if(o){return v(true)}else if(s.length===0){const e=r.reduce((e,n)=>e&&O(n),true);return v(e)}else if(s.length===1){return s[0]}else if(l(s)){return v(true)}else{return{_type:"Set",operator:"||",operands:s}}}n.or=p;function f(e){e=$(e);if(i(e)){return a}else if(E(e)){return v(!e.value)}else if(typeof e==="object"&&e._type==="Set"&&e.operator==="||"&&e.operands.every(e=>E(e)||P(e))){return d(...e.operands.map(e=>f(e)))}else if(typeof e==="object"&&e._type==="Set"&&e.operator==="&&"&&e.operands.every(e=>E(e)||P(e))){return p(...e.operands.map(e=>f(e)))}else if(P(e)){switch(e.operator){case"!==":return{...e,operator:"==="};case"<":return{...e,operator:">="};case"<=":return{...e,operator:">"};case"===":return{...e,operator:"!=="};case">":return{...e,operator:"<="};case">=":return{...e,operator:"<"}}}else if(e._type==="Not"){return e.operand}return{_type:"Not",operand:e}}n.not=f;function c(e){if(E(e)){return v(!!e.value)}else{return{_type:"Truthy",operand:e}}}n.isTruthy=c;function m(e,n){let t=arguments.length>2&&arguments[2]!==undefined?arguments[2]:[];let r=arguments.length>3?arguments[3]:undefined;return y(e,n,t,r)}n.bindingExpression=m;function y(e,n){let t=arguments.length>2&&arguments[2]!==undefined?arguments[2]:[];let r=arguments.length>3?arguments[3]:undefined;if(e===undefined){return a}let o;if(r){o=r(e);if(o===undefined){return a}}else{const n=t.concat();n.push(e);o=n.join("/")}return{_type:"PathInModel",modelName:n,path:o}}n.pathInModel=y;function v(e){let n;if(typeof e==="object"&&e!==null&&e!==undefined){if(Array.isArray(e)){n=e.map($)}else if(S(e)){n=e.valueOf()}else{n=Object.entries(e).reduce((e,n)=>{let[t,r]=n;const a=$(r);if(a._type!=="Constant"||a.value!==undefined){e[t]=a}return e},{})}}else{n=e}return{_type:"Constant",value:n}}n.constant=v;function h(e,n){if(e!==undefined&&typeof e==="string"&&e.startsWith("{")){const n=/^{(.*)>(.+)}$/;const t=n.exec(e);if(e.startsWith("{=")){return{_type:"EmbeddedExpressionBinding",value:e}}else if(t){return y(t[2]||"",t[1]||undefined)}else{return{_type:"EmbeddedBinding",value:e}}}else if(n==="boolean"&&typeof e==="string"&&(e==="true"||e==="false")){return v(e==="true")}else if(n==="number"&&typeof e==="string"&&(!isNaN(Number(e))||e==="NaN")){return v(Number(e))}else{return v(e)}}n.resolveBindingString=h;function g(e){return{_type:"Ref",ref:e}}n.ref=g;function $(e){if(b(e)){return e}return v(e)}function b(e){return(e===null||e===void 0?void 0:e._type)!==undefined}n.isBindingToolkitExpression=b;function E(e){return typeof e!=="object"||e._type==="Constant"}n.isConstant=E;function O(e){return E(e)&&e.value===true}function I(e){return E(e)&&e.value===false}function _(e){return(e===null||e===void 0?void 0:e._type)==="PathInModel"}n.isPathInModelExpression=_;function x(e){return(e===null||e===void 0?void 0:e._type)==="ComplexType"}n.isComplexTypeExpression=x;function C(e){return(e===null||e===void 0?void 0:e._type)==="Concat"}function P(e){return e._type==="Comparison"}function F(e){const n=e;return(n===null||n===void 0?void 0:n._type)==="Constant"&&(n===null||n===void 0?void 0:n.value)===undefined}n.isUndefinedExpression=F;function S(e){switch(e.constructor.name){case"String":case"Number":case"Boolean":return true;default:return false}}function T(e){return typeof e==="object"&&!S(e)}function N(e){let n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];let t=arguments.length>2?arguments[2]:undefined;let r=arguments.length>3?arguments[3]:undefined;return M(e,n,t,r)}n.annotationExpression=N;function M(e){var n;let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];let r=arguments.length>2?arguments[2]:undefined;let o=arguments.length>3?arguments[3]:undefined;if(e===undefined){return $(r)}e=(n=e)===null||n===void 0?void 0:n.valueOf();if(!T(e)){return v(e)}switch(e.type){case"Path":return y(e.path,undefined,t,o);case"If":return D(e.If,t,o);case"Not":return f(w(e.Not,t,o));case"Eq":return k(w(e.Eq[0],t,o),w(e.Eq[1],t,o));case"Ne":return B(w(e.Ne[0],t,o),w(e.Ne[1],t,o));case"Gt":return G(w(e.Gt[0],t,o),w(e.Gt[1],t,o));case"Ge":return q(w(e.Ge[0],t,o),w(e.Ge[1],t,o));case"Lt":return Y(w(e.Lt[0],t,o),w(e.Lt[1],t,o));case"Le":return U(w(e.Le[0],t,o),w(e.Le[1],t,o));case"Or":return p(...e.Or.map(function(e){return w(e,t,o)}));case"And":return d(...e.And.map(function(e){return w(e,t,o)}));case"Apply":return A(e,t,o)}return a}n.getExpressionFromAnnotation=M;function w(e){let n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];let r=arguments.length>2?arguments[2]:undefined;if(e===null||typeof e!=="object"){return v(e)}else if(e.hasOwnProperty("$Or")){return p(...e.$Or.map(function(e){return w(e,n,r)}))}else if(e.hasOwnProperty("$And")){return d(...e.$And.map(function(e){return w(e,n,r)}))}else if(e.hasOwnProperty("$Not")){return f(w(e.$Not,n,r))}else if(e.hasOwnProperty("$Eq")){return k(w(e.$Eq[0],n,r),w(e.$Eq[1],n,r))}else if(e.hasOwnProperty("$Ne")){return B(w(e.$Ne[0],n,r),w(e.$Ne[1],n,r))}else if(e.hasOwnProperty("$Gt")){return G(w(e.$Gt[0],n,r),w(e.$Gt[1],n,r))}else if(e.hasOwnProperty("$Ge")){return q(w(e.$Ge[0],n,r),w(e.$Ge[1],n,r))}else if(e.hasOwnProperty("$Lt")){return Y(w(e.$Lt[0],n,r),w(e.$Lt[1],n,r))}else if(e.hasOwnProperty("$Le")){return U(w(e.$Le[0],n,r),w(e.$Le[1],n,r))}else if(e.hasOwnProperty("$Path")){return y(e.$Path,undefined,n,r)}else if(e.hasOwnProperty("$Apply")){return M({type:"Apply",Function:e.$Function,Apply:e.$Apply},n,undefined,r)}else if(e.hasOwnProperty("$If")){return M({type:"If",If:e.$If},n,undefined,r)}else if(e.hasOwnProperty("$EnumMember")){return v(t(e.$EnumMember))}return v(false)}function D(e){let n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];let t=arguments.length>2?arguments[2]:undefined;return W(w(e[0],n,t),w(e[1],n,t),w(e[2],n,t))}n.annotationIfExpression=D;function j(e){let n=e;if(e.hasOwnProperty("$Path")){n={type:"Path",path:e.$Path}}else if(e.hasOwnProperty("$If")){n={type:"If",If:e.$If}}else if(e.hasOwnProperty("$Apply")){n={type:"Apply",Function:e.$Function,Apply:e.$Apply}}return n}function A(e){let n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];let t=arguments.length>2?arguments[2]:undefined;switch(e.Function){case"odata.concat":return ne(...e.Apply.map(e=>M(j(e),n,undefined,t)));case"odata.uriEncode":const r=M(j(e.Apply[0]),n,undefined,t);return Z("odata.uriEncode",[r,"Edm.String"],undefined,true);case"odata.fillUriTemplate":const a=e.Apply[0];const o=e.Apply.slice(1);const i={};o.forEach(e=>{i[e.$Name]=M(j(e.$LabeledElement),n,undefined,t)});return Z("odata.fillUriTemplate",[a,i],undefined,true)}return a}n.annotationApplyExpression=A;function V(e,n,t){const r=$(n);const o=$(t);if(i(r,o)){return a}if(E(r)&&E(o)){switch(e){case"!==":return v(r.value!==o.value);case"===":return v(r.value===o.value);case"<":return v(r.value<o.value);case"<=":return v(r.value<=o.value);case">":return v(r.value>o.value);case">=":return v(r.value>=o.value)}}else{return{_type:"Comparison",operator:e,operand1:r,operand2:o}}}function L(e){if(e._type==="Unresolvable"){return e}return{_type:"Length",pathInModel:e}}n.length=L;function k(e,n){const t=$(e);const r=$(n);if(i(t,r)){return a}if(s(t,r)){return v(true)}function o(e,n){if(e._type==="Comparison"&&O(n)){return e}else if(e._type==="Comparison"&&I(n)){return f(e)}else if(e._type==="IfElse"&&s(e.onTrue,n)){return p(e.condition,k(e.onFalse,n))}else if(e._type==="IfElse"&&s(e.onFalse,n)){return p(f(e.condition),k(e.onTrue,n))}else if(e._type==="IfElse"&&E(e.onTrue)&&E(e.onFalse)&&E(n)&&!s(e.onTrue,n)&&!s(e.onFalse,n)){return v(false)}return undefined}const u=o(t,r)??o(r,t);return u??V("===",t,r)}n.equal=k;function B(e,n){return f(k(e,n))}n.notEqual=B;function q(e,n){return V(">=",e,n)}n.greaterOrEqual=q;function G(e,n){return V(">",e,n)}n.greaterThan=G;function U(e,n){return V("<=",e,n)}n.lessOrEqual=U;function Y(e,n){return V("<",e,n)}n.lessThan=Y;function W(e,n,t){let r=$(e);let o=$(n);let u=$(t);if(i(r,o,u)){return a}if(r._type==="Not"){[o,u]=[u,o];r=f(r)}if(o._type==="IfElse"&&s(r,o.condition)){o=o.onTrue}if(u._type==="IfElse"&&s(r,u.condition)){u=u.onFalse}if(E(r)){return r.value?o:u}if(s(o,u)){return o}if(I(u)){return d(r,o)}if(O(u)){return p(f(r),o)}if(I(o)){return d(f(r),u)}if(O(o)){return p(r,u)}if(x(e)||x(n)||x(t)){let r=0;const a=Q([e,n,t],"sap.fe.core.formatters.StandardFormatter#ifElse");const o=[];te(a,"PathInModel",e=>{o.push(e);return y(`$${r++}`,"$")},true);o.unshift(v(JSON.stringify(a)));return Q(o,"sap.fe.core.formatters.StandardFormatter#evaluateComplexExpression",undefined,true)}return{_type:"IfElse",condition:r,onTrue:o,onFalse:u}}n.ifElse=W;function R(e){switch(e._type){case"Constant":case"Formatter":case"ComplexType":return false;case"Set":return e.operands.some(R);case"PathInModel":return e.modelName===undefined;case"Comparison":return R(e.operand1)||R(e.operand2);case"IfElse":return R(e.condition)||R(e.onTrue)||R(e.onFalse);case"Not":case"Truthy":return R(e.operand);default:return false}}function Q(e,n,t){let r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:false;const o=e.map($);if(i(...o)){return a}if(t){if(!o.some(R)){t.keys.forEach(e=>o.push(y(e.name,"")))}}let s="";if(typeof n==="string"){s=n}else{s=n.__functionName}const[u,l]=s.split("#");if(!r&&(o.some(x)||o.some(C))){let e=0;const n=Q(o,s,undefined,true);const t=[];te(n,"PathInModel",n=>{t.push(n);return y(`$${e++}`,"$")});t.unshift(v(JSON.stringify(n)));return Q(t,"sap.fe.core.formatters.StandardFormatter#evaluateComplexExpression",undefined,true)}else if(!!l&&l.length>0){o.unshift(v(l))}return{_type:"Formatter",fn:u,parameters:o}}n.formatResult=Q;function J(e,n){var t,r,a,o,i,s,u,l,d,p,f,c,m;const y={};if(e!==null&&e!==void 0&&(t=e.constraints)!==null&&t!==void 0&&t.$Scale&&n.scale!==undefined){y.scale=n.scale}if(e!==null&&e!==void 0&&(r=e.constraints)!==null&&r!==void 0&&r.$Precision&&n.precision!==undefined){y.precision=n.precision}if(e!==null&&e!==void 0&&(a=e.constraints)!==null&&a!==void 0&&a.$MaxLength&&n.maxLength!==undefined){y.maxLength=n.maxLength}if(n.nullable===false){y.nullable=false}if(e!==null&&e!==void 0&&(o=e.constraints)!==null&&o!==void 0&&o["@Org.OData.Validation.V1.Minimum/$Decimal"]&&!isNaN((i=n.annotations)===null||i===void 0?void 0:(s=i.Validation)===null||s===void 0?void 0:s.Minimum)){var v,h;y.minimum=`${(v=n.annotations)===null||v===void 0?void 0:(h=v.Validation)===null||h===void 0?void 0:h.Minimum}`}if(e!==null&&e!==void 0&&(u=e.constraints)!==null&&u!==void 0&&u["@Org.OData.Validation.V1.Maximum/$Decimal"]&&!isNaN((l=n.annotations)===null||l===void 0?void 0:(d=l.Validation)===null||d===void 0?void 0:d.Maximum)){var g,$;y.maximum=`${(g=n.annotations)===null||g===void 0?void 0:($=g.Validation)===null||$===void 0?void 0:$.Maximum}`}if((p=n.annotations)!==null&&p!==void 0&&(f=p.Common)!==null&&f!==void 0&&f.IsDigitSequence&&e.type==="sap.ui.model.odata.type.String"&&e!==null&&e!==void 0&&(c=e.constraints)!==null&&c!==void 0&&c["@com.sap.vocabularies.Common.v1.IsDigitSequence"]){y.isDigitSequence=true}if(e!==null&&e!==void 0&&(m=e.constraints)!==null&&m!==void 0&&m.$V4){y.V4=true}return y}n.setUpConstraints=J;function K(e,n){var t;let a=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;const o=n;if(e._type!=="Property"){return o}const i=r[e.type];if(!i){return o}if(!o.formatOptions){o.formatOptions={}}o.constraints={};o.type=i.type;if(!a){o.constraints=J(i,e)}if((o===null||o===void 0?void 0:(t=o.type)===null||t===void 0?void 0:t.indexOf("sap.ui.model.odata.type.Int"))===0&&(o===null||o===void 0?void 0:o.type)!=="sap.ui.model.odata.type.Int64"||(o===null||o===void 0?void 0:o.type)==="sap.ui.model.odata.type.Double"){o.formatOptions=Object.assign(o.formatOptions,{parseAsString:false})}if(o.type==="sap.ui.model.odata.type.String"){o.formatOptions.parseKeepsEmptyString=true;const n=z(e);if(n){o.formatOptions.fiscalType=n;o.type="sap.fe.core.type.FiscalDate"}}if(o.type==="sap.ui.model.odata.type.Decimal"||(o===null||o===void 0?void 0:o.type)==="sap.ui.model.odata.type.Int64"){o.formatOptions=Object.assign(o.formatOptions,{emptyString:""})}return o}n.formatWithTypeInformation=K;const z=function(e){var n,t,r,a,o,i,s,u,l,d,p,f,c,m,y,v;if((n=e.annotations)!==null&&n!==void 0&&(t=n.Common)!==null&&t!==void 0&&t.IsFiscalYear){return"com.sap.vocabularies.Common.v1.IsFiscalYear"}if((r=e.annotations)!==null&&r!==void 0&&(a=r.Common)!==null&&a!==void 0&&a.IsFiscalPeriod){return"com.sap.vocabularies.Common.v1.IsFiscalPeriod"}if((o=e.annotations)!==null&&o!==void 0&&(i=o.Common)!==null&&i!==void 0&&i.IsFiscalYearPeriod){return"com.sap.vocabularies.Common.v1.IsFiscalYearPeriod"}if((s=e.annotations)!==null&&s!==void 0&&(u=s.Common)!==null&&u!==void 0&&u.IsFiscalQuarter){return"com.sap.vocabularies.Common.v1.IsFiscalQuarter"}if((l=e.annotations)!==null&&l!==void 0&&(d=l.Common)!==null&&d!==void 0&&d.IsFiscalYearQuarter){return"com.sap.vocabularies.Common.v1.IsFiscalYearQuarter"}if((p=e.annotations)!==null&&p!==void 0&&(f=p.Common)!==null&&f!==void 0&&f.IsFiscalWeek){return"com.sap.vocabularies.Common.v1.IsFiscalWeek"}if((c=e.annotations)!==null&&c!==void 0&&(m=c.Common)!==null&&m!==void 0&&m.IsFiscalYearWeek){return"com.sap.vocabularies.Common.v1.IsFiscalYearWeek"}if((y=e.annotations)!==null&&y!==void 0&&(v=y.Common)!==null&&v!==void 0&&v.IsDayOfFiscalYear){return"com.sap.vocabularies.Common.v1.IsDayOfFiscalYear"}};n.getFiscalType=z;function H(e,n,t,r){const o=e.map($);if(i(...o)){return a}if(o.length===1&&E(o[0])&&!t){return o[0]}else if(t){if(!o.some(R)){t.keys.forEach(e=>o.push(y(e.name,"")))}}r=X(e[0],r);if(n==="sap.ui.model.odata.type.Unit"){const e=y("/##@@requestUnitsOfMeasure");e.targetType="any";e.mode="OneTime";o.push(e)}else if(n==="sap.ui.model.odata.type.Currency"){const e=y("/##@@requestCurrencyCodes");e.targetType="any";e.mode="OneTime";o.push(e)}return{_type:"ComplexType",type:n,formatOptions:r||{},parameters:{},bindingParameters:o}}n.addTypeInformation=H;function X(e,n){var t,r;if(!(n&&n.showNumber===false)&&((e===null||e===void 0?void 0:(t=e.type)===null||t===void 0?void 0:t.indexOf("sap.ui.model.odata.type.Int"))===0||(e===null||e===void 0?void 0:e.type)==="sap.ui.model.odata.type.Decimal"||(e===null||e===void 0?void 0:e.type)==="sap.ui.model.odata.type.Double")){if((e===null||e===void 0?void 0:e.type)==="sap.ui.model.odata.type.Int64"||(e===null||e===void 0?void 0:e.type)==="sap.ui.model.odata.type.Decimal"){var a;n=((a=n)===null||a===void 0?void 0:a.showMeasure)===false?{emptyString:"",showMeasure:false}:{emptyString:""}}else{var o;n=((o=n)===null||o===void 0?void 0:o.showMeasure)===false?{parseAsString:false,showMeasure:false}:{parseAsString:false}}}if((e===null||e===void 0?void 0:(r=e.constraints)===null||r===void 0?void 0:r.nullable)!==false){var i;(i=n)===null||i===void 0?true:delete i.emptyString}return n}function Z(e,n,t){let r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:false;const a=typeof e==="string"?e:e.__functionName;return{_type:"Function",obj:t!==undefined?$(t):undefined,fn:a,isFormattingFn:r,parameters:n.map($)}}n.fn=Z;function ee(e){const n=[];te(e,"PathInModel",e=>{n.push(p(k(e,""),k(e,undefined),k(e,null)));return e});return d(...n)}n.isEmpty=ee;function ne(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++){n[t]=arguments[t]}const r=n.map($);if(i(...r)){return a}if(r.every(E)){return v(r.reduce((e,n)=>{if(n.value!==undefined){return e+n.value.toString()}return e},""))}else if(r.some(x)){let e=0;const n=Q(r,"sap.fe.core.formatters.StandardFormatter#concat",undefined,true);const t=[];te(n,"PathInModel",n=>{t.push(n);return y(`$${e++}`,"$")});t.unshift(v(JSON.stringify(n)));return Q(t,"sap.fe.core.formatters.StandardFormatter#evaluateComplexExpression",undefined,true)}return{_type:"Concat",expressions:r}}n.concat=ne;function te(e,n,t){let r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:false;let a=e;switch(a._type){case"Function":case"Formatter":a.parameters=a.parameters.map(e=>te(e,n,t,r));break;case"Concat":a.expressions=a.expressions.map(e=>te(e,n,t,r));a=ne(...a.expressions);break;case"ComplexType":a.bindingParameters=a.bindingParameters.map(e=>te(e,n,t,r));break;case"IfElse":const e=te(a.onTrue,n,t,r);const o=te(a.onFalse,n,t,r);let i=a.condition;if(r){i=te(a.condition,n,t,r)}a=W(i,e,o);break;case"Not":if(r){const e=te(a.operand,n,t,r);a=f(e)}break;case"Truthy":break;case"Set":if(r){const e=a.operands.map(e=>te(e,n,t,r));a=a.operator==="||"?p(...e):d(...e)}break;case"Comparison":if(r){const e=te(a.operand1,n,t,r);const o=te(a.operand2,n,t,r);a=V(a.operator,e,o)}break;case"Constant":const s=a.value;if(typeof s==="object"&&s){Object.keys(s).forEach(e=>{s[e]=te(s[e],n,t,r)})}break;case"Ref":case"Length":case"PathInModel":case"EmbeddedBinding":case"EmbeddedExpressionBinding":case"Unresolvable":break}if(n===a._type){a=t(e)}return a}n.transformRecursively=te;const re=function(e){return!E(e)&&!_(e)&&b(e)&&e._type!=="IfElse"&&e._type!=="Function"};function ae(e){let n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;if(n&&Object.keys(e.value).length===0){return""}const t=e.value;const r=[];Object.keys(t).forEach(e=>{const a=t[e];const o=le(a,true,false,n);if(o&&o.length>0){r.push(`${e}: ${o}`)}});return`{${r.join(", ")}}`}function oe(e,n){let t=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;let r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:false;if(e.value===null){return r?null:"null"}if(e.value===undefined){return r?undefined:"undefined"}if(typeof e.value==="object"){if(Array.isArray(e.value)){const n=e.value.map(e=>le(e,true));return`[${n.join(", ")}]`}else{return ae(e,t)}}if(n){switch(typeof e.value){case"number":case"bigint":case"boolean":return e.value.toString();case"string":return`'${o(e.value.toString())}'`;default:return""}}else{return r?e.value:e.value.toString()}}n.compileConstant=oe;function ie(e,n,t){if(e.type||e.parameters||e.targetType||e.formatOptions||e.constraints){const r={path:me(e),type:e.type,targetType:e.targetType,parameters:e.parameters,formatOptions:e.formatOptions,constraints:e.constraints};const a=le(r,false,false,true);if(n){return`${t}${a}`}return a}else if(n){return`${t}{${me(e)}}`}else{return`{${me(e)}}`}}function se(e){if(e.bindingParameters.length===1){return`{${fe(e.bindingParameters[0],true)}, type: '${e.type}'}`}let n=`], type: '${e.type}'`;if(ce(e.formatOptions)){n+=`, formatOptions: ${le(e.formatOptions)}`}if(ce(e.parameters)){n+=`, parameters: ${le(e.parameters)}`}n+="}";return`{mode:'TwoWay', parts:[${e.bindingParameters.map(e=>fe(e)).join(",")}${n}`}function ue(e,n){let t=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;if(n){if(t){return`(${e})`}else{return e}}else{return`{= ${e}}`}}n.wrapBindingExpression=ue;function le(e){let n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;let t=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;let r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:false;const a=$(e);const o=t?"$":"%";switch(a._type){case"Unresolvable":return undefined;case"Constant":return oe(a,n,r);case"Ref":return a.ref||"null";case"Function":let e=false;if(a.isFormattingFn){te(a,"Function",n=>{if(n!==a&&n.obj===undefined){e=true}return n},true);te(a,"Constant",n=>{if(n!==a&&typeof n.value==="object"){te(n,"PathInModel",n=>{e=true;return n})}return n},true)}const t=`${a.parameters.map(e=>le(e,true)).join(", ")}`;let i=a.obj===undefined?`${a.fn}(${t})`:`${le(a.obj,true)}.${a.fn}(${t})`;if(!n&&e){i=`{= ${i}}`}return i;case"EmbeddedExpressionBinding":return n?`(${a.value.substring(2,a.value.length-1)})`:`${a.value}`;case"EmbeddedBinding":return n?`${o}${a.value}`:`${a.value}`;case"PathInModel":return ie(a,n,o);case"Comparison":const s=de(a);return ue(s,n);case"IfElse":const u=`${le(a.condition,true)} ? ${le(a.onTrue,true)} : ${le(a.onFalse,true)}`;return ue(u,n,true);case"Set":const l=a.operands.map(e=>le(e,true)).join(` ${a.operator} `);return ue(l,n,true);case"Concat":const d=a.expressions.map(e=>le(e,true,true)).join(" + ");return ue(d,n);case"Length":const p=`${le(a.pathInModel,true)}.length`;return ue(p,n);case"Not":const f=`!${le(a.operand,true)}`;return ue(f,n);case"Truthy":const c=`!!${le(a.operand,true)}`;return ue(c,n);case"Formatter":const m=pe(a);return n?`$${m}`:m;case"ComplexType":const y=se(a);return n?`$${y}`:y;default:return""}}n.compileExpression=le;function de(e){function n(e){const n=le(e,true)??"undefined";return ue(n,true,re(e))}return`${n(e.operand1)} ${e.operator} ${n(e.operand2)}`}function pe(e){if(e.parameters.length===1){return`{${fe(e.parameters[0],true)}, formatter: '${e.fn}'}`}else{const n=e.parameters.map(e=>{if(e._type==="ComplexType"){return se(e)}else{return fe(e)}});return`{parts: [${n.join(", ")}], formatter: '${e.fn}'}`}}function fe(e){let n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;let t="";if(e._type==="Constant"){if(e.value===undefined){t=`value: 'undefined'`}else{t=`value: ${oe(e,true)}`}}else if(e._type==="PathInModel"){t=`path: '${me(e)}'`;t+=e.type?`, type: '${e.type}'`:`, targetType: 'any'`;if(ce(e.mode)){t+=`, mode: '${le(e.mode)}'`}if(ce(e.constraints)){t+=`, constraints: ${le(e.constraints)}`}if(ce(e.formatOptions)){t+=`, formatOptions: ${le(e.formatOptions)}`}if(ce(e.parameters)){t+=`, parameters: ${le(e.parameters)}`}}else{return""}return n?t:`{${t}}`}function ce(e){return e&&Object.keys(e).length>0}function me(e){return`${e.modelName?`${e.modelName}>`:""}${e.path}`}return n},false);
|
|
581
581
|
/*!
|
|
582
582
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
583
583
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
@@ -652,7 +652,7 @@ sap.ui.predefine("sap/fe/core/helpers/PasteHelper", ["sap/base/Log","sap/m/Messa
|
|
|
652
652
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
653
653
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
654
654
|
*/
|
|
655
|
-
sap.ui.predefine("sap/fe/core/helpers/RecommendationHelper", [],function(){"use strict";var e={};const t={sortRecommendationsData(e){const t=e.recommendations;t.sort((e,t)=>{if(e.probability<t.probability){return 1}else if(e.probability>t.probability){return-1}else{return 0}});const
|
|
655
|
+
sap.ui.predefine("sap/fe/core/helpers/RecommendationHelper", [],function(){"use strict";var e={};const t={sortRecommendationsData(e){const t=e.recommendations;t.sort((e,t)=>{if(e.probability<t.probability){return 1}else if(e.probability>t.probability){return-1}else{return 0}});const o=e;delete o["recommendations"];o.additionalValues=t},transformRecommendationsForInternalStorage(e){if(e.hasOwnProperty("recommendations")){this.sortRecommendationsData(e);return}else if(Array.isArray(e)){e.forEach(e=>{Object.values(e).forEach(e=>{if(typeof e==="object"){this.transformRecommendationsForInternalStorage(e)}})})}else{Object.values(e).forEach(e=>{if(typeof e==="object"){this.transformRecommendationsForInternalStorage(e)}})}},clearRecommendations:(e,t)=>{const o=e.getModel("internal");const r=o.getProperty("/currentCtxt");const n=e.getBindingContext("ui").getProperty("createMode");if((r===null||r===void 0?void 0:r.getPath())!==(t===null||t===void 0?void 0:t.getPath())||n){o.setProperty("/recommendationsData",{})}}};e.recommendationHelper=t;return e},false);
|
|
656
656
|
/*!
|
|
657
657
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
658
658
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
@@ -732,7 +732,7 @@ sap.ui.predefine("sap/fe/core/jsx-runtime/useMDXComponents", ["sap/base/Log","sa
|
|
|
732
732
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
733
733
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
734
734
|
*/
|
|
735
|
-
sap.ui.predefine("sap/fe/core/library", ["sap/base/Log","sap/fe/core/formatters/FPMFormatter","sap/fe/core/formatters/StandardFormatter","sap/fe/core/formatters/ValueFormatter","sap/fe/core/services/AsyncComponentServiceFactory","sap/fe/core/services/CacheHandlerServiceFactory","sap/fe/core/services/EnvironmentServiceFactory","sap/fe/core/services/NavigationServiceFactory","sap/fe/core/services/ResourceModelServiceFactory","sap/fe/core/services/RoutingServiceFactory","sap/fe/core/services/ShellServicesFactory","sap/fe/core/services/SideEffectsServiceFactory","sap/fe/core/services/TemplatedViewServiceFactory","sap/fe/core/type/DateTimeWithTimezone","sap/fe/core/type/Email","sap/fe/core/type/FiscalDate","sap/fe/navigation/library","sap/fe/placeholder/library","sap/ui/base/DataType","sap/ui/core/Core","sap/ui/core/library","sap/ui/core/service/ServiceFactoryRegistry","sap/ui/fl/library","sap/ui/mdc/library"],function(e,a,r,i,o,t,s,n,c,l,p,f,d,v,u,y,S,m,g,C,b,F,w,D){"use strict";var E={};
|
|
735
|
+
sap.ui.predefine("sap/fe/core/library", ["sap/base/Log","sap/fe/core/formatters/FPMFormatter","sap/fe/core/formatters/StandardFormatter","sap/fe/core/formatters/ValueFormatter","sap/fe/core/services/AsyncComponentServiceFactory","sap/fe/core/services/CacheHandlerServiceFactory","sap/fe/core/services/EnvironmentServiceFactory","sap/fe/core/services/NavigationServiceFactory","sap/fe/core/services/ResourceModelServiceFactory","sap/fe/core/services/RoutingServiceFactory","sap/fe/core/services/ShellServicesFactory","sap/fe/core/services/SideEffectsServiceFactory","sap/fe/core/services/TemplatedViewServiceFactory","sap/fe/core/type/DateTimeWithTimezone","sap/fe/core/type/Email","sap/fe/core/type/FiscalDate","sap/fe/navigation/library","sap/fe/placeholder/library","sap/ui/base/DataType","sap/ui/core/Core","sap/ui/core/library","sap/ui/core/service/ServiceFactoryRegistry","sap/ui/fl/library","sap/ui/mdc/library"],function(e,a,r,i,o,t,s,n,c,l,p,f,d,v,u,y,S,m,g,C,b,F,w,D){"use strict";var E={};var M=s.EnvironmentServiceFactory;const N="sap.fe";E.feNamespace=N;const I="sap.fe.core";E.feCoreNamespace=I;const h="sap.fe.controllerextensions";E.feCextNamespace=h;const A="sap.fe.core.fpm";E.feFpmNamespace=A;const R=C.initLibrary({name:"sap.fe.core",dependencies:["sap.ui.core","sap.fe.navigation","sap.fe.placeholder","sap.ui.fl","sap.ui.mdc","sap.f"],types:["sap.fe.core.CreationMode","sap.fe.core.VariantManagement"],interfaces:[],controls:[],elements:[],version:"1.114.2",noLibraryCSS:true,extensions:{"sap.ui.support":{publicRules:true,internalRules:true},flChangeHandlers:{"sap.fe.core.controls.FilterBar":"sap/ui/mdc/flexibility/FilterBar"}}});R.InvocationGrouping={Isolated:"Isolated",ChangeSet:"ChangeSet"};R.CreationMode={NewPage:"NewPage",Sync:"Sync",Async:"Async",Deferred:"Deferred",Inline:"Inline",CreationRow:"CreationRow",InlineCreationRows:"InlineCreationRows",External:"External"};R.VariantManagement={None:"None",Page:"Page",Control:"Control"};R.Constants={CancelActionDialog:"cancel",ActionExecutionFailed:"actionExecutionFailed",CreationFailed:"creationFailed"};R.ProgrammingModel={Draft:"Draft",Sticky:"Sticky",NonDraft:"NonDraft"};R.DraftStatus={Saving:"Saving",Saved:"Saved",Clear:"Clear"};R.EditMode={Display:"Display",Editable:"Editable"};R.TemplateContentView={Hybrid:"Hybrid",Chart:"Chart",Table:"Table"};let L;(function(e){e["Enabled"]="Enabled";e["Disabled"]="Disabled";e["Auto"]="Auto"})(L||(L={}));E.InitialLoadMode=L;R.InitialLoadMode=L;R.StartupMode={Normal:"Normal",Deeplink:"Deeplink",Create:"Create",AutoCreate:"AutoCreate"};const T=g.createType("sap.fe.core.InitialLoadMode",{defaultValue:R.InitialLoadMode.Auto,isValid:function(a){if(typeof a==="boolean"){e.warning("DEPRECATED: boolean value not allowed for 'initialLoad' manifest setting - supported values are: Disabled|Enabled|Auto")}return a===undefined||a===null||typeof a==="boolean"||R.InitialLoadMode.hasOwnProperty(a)}});T.setNormalizer(function(e){if(!e){return R.InitialLoadMode.Disabled}return e===true?R.InitialLoadMode.Enabled:e});F.register("sap.fe.core.services.TemplatedViewService",new d);F.register("sap.fe.core.services.ResourceModelService",new c);F.register("sap.fe.core.services.CacheHandlerService",new t);F.register("sap.fe.core.services.NavigationService",new n);F.register("sap.fe.core.services.RoutingService",new l);F.register("sap.fe.core.services.SideEffectsService",new f);F.register("sap.fe.core.services.ShellServices",new p);F.register("sap.fe.core.services.EnvironmentService",new M);F.register("sap.fe.core.services.AsyncComponentService",new o);return R},false);
|
|
736
736
|
/*!
|
|
737
737
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
738
738
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
@@ -747,12 +747,12 @@ sap.ui.predefine("sap/fe/core/operationsHelper", ["sap/m/MessageBox","sap/ui/cor
|
|
|
747
747
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
748
748
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
749
749
|
*/
|
|
750
|
-
sap.ui.predefine("sap/fe/core/rootView/Fcl.controller", ["sap/base/Log","sap/f/FlexibleColumnLayoutSemanticHelper","sap/f/library","sap/fe/core/controllerextensions/ViewState","sap/fe/core/helpers/ClassSupport","sap/fe/core/helpers/KeepAliveHelper","sap/m/Link","sap/m/MessageBox","sap/m/MessagePage","./RootViewBaseController"],function(e,t,n,o,i,r,l,s,a,u){"use strict";var g,c,C,h,d;var f=s.Icon;var m=s.Action;var p=i.usingExtension;var F=i.defineUI5Class;function w(e,t,n,o){if(!n)return;Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(o):void 0})}function E(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function P(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;b(e,t)}function b(e,t){b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function e(t,n){t.__proto__=n;return t};return b(e,t)}function M(e,t,n,o,i){var r={};Object.keys(o).forEach(function(e){r[e]=o[e]});r.enumerable=!!r.enumerable;r.configurable=!!r.configurable;if("value"in r||r.initializer){r.writable=true}r=n.slice().reverse().reduce(function(n,o){return o(e,t,n)||n},r);if(i&&r.initializer!==void 0){r.value=r.initializer?r.initializer.call(i):void 0;r.initializer=undefined}if(r.initializer===void 0){Object.defineProperty(e,t,r);r=null}return r}function v(e,t){throw new Error("Decorating class property failed. Please ensure that "+"proposal-class-properties is enabled and runs after the decorators transform.")}const y=n.LayoutType;const x={page:{names:["BeginColumn","MidColumn","EndColumn"],currentGetter:{prefix:"getCurrent",suffix:"Page"},getter:{prefix:"get",suffix:"Pages"}}};const T=function(e){if(e.isA("sap.ui.core.ComponentContainer")){return e.getComponentInstance().getRootControl()}else{return e}};let R=(g=F("sap.fe.core.rootView.Fcl"),c=p(o.override({applyInitialStateOnly:function(){return false},adaptBindingRefreshControls:function(e){this.getView().getController()._getAllVisibleViews().forEach(function(t){const n=Promise.resolve(t);e.push(n)})},adaptStateControls:function(e){this.getView().getController()._getAllVisibleViews().forEach(function(t){const n=Promise.resolve(t);e.push(n)})},onRestore:function(){const e=this.getView().getController();const t=e.getAppContentContainer();const n=t.getModel("internal");const o=n.getProperty("/pages");for(const e in o){n.setProperty(`/pages/${e}/restoreStatus`,"pending")}e.onContainerReady()},onSuspend:function(){const e=this.getView().getController();const t=e.getFclControl();const n=t.getBeginColumnPages()||[];const o=t.getMidColumnPages()||[];const i=t.getEndColumnPages()||[];const r=[].concat(n,o,i);r.forEach(function(e){const t=T(e);const n=t&&t.getController();if(n&&n.viewState&&n.viewState.onSuspend){n.viewState.onSuspend()}})}})),g(C=(h=function(n){P(o,n);function o(){var e;for(var t=arguments.length,o=new Array(t),i=0;i<t;i++){o[i]=arguments[i]}e=n.call(this,...o)||this;w(e,"viewState",d,E(e));return e}var i=o.prototype;i.onInit=function e(){n.prototype.onInit.call(this);this._internalInit()};i.manageDataReceived=function e(t){if(t.getParameter("error")){var n;const e=t.getParameter("path"),o=this._getAllVisibleViews().find(t=>{var n;return((n=t.getBindingContext())===null||n===void 0?void 0:n.getPath())===e});if(e&&o!==null&&o!==void 0&&(n=o.getBindingContext())!==null&&n!==void 0&&n.isKeepAlive()){o.getController()._routing.onDataReceived(t)}}};i.attachRouteMatchers=function e(){this.getRouter().attachBeforeRouteMatched(this._getViewForNavigatedRowsComputation,this);n.prototype.attachRouteMatchers.call(this);this._internalInit();this.getRouter().attachBeforeRouteMatched(this.onBeforeRouteMatched,this);this.getRouter().attachRouteMatched(this.onRouteMatched,this);this.getFclControl().attachStateChange(this._saveLayout,this)};i._internalInit=function e(){var t,n;if(this._oRouterProxy){return}this.sCurrentRouteName="";this.sCurrentArguments={};this.SQUERYKEYNAME="?query";const o=this.getAppComponent();const i=this.getAppComponent().getModel();i===null||i===void 0?void 0:i.attachEvent("dataReceived",this.manageDataReceived.bind(this));this._oRouterProxy=o.getRouterProxy();this._oFCLConfig={maxColumnsCount:3};const r=o.getManifest()["sap.ui5"].routing;if(r!==null&&r!==void 0&&(t=r.config)!==null&&t!==void 0&&t.flexibleColumnLayout){const e=r.config.flexibleColumnLayout;if(e.defaultTwoColumnLayoutType){this._oFCLConfig.defaultTwoColumnLayoutType=e.defaultTwoColumnLayoutType}if(e.defaultThreeColumnLayoutType){this._oFCLConfig.defaultThreeColumnLayoutType=e.defaultThreeColumnLayoutType}if(e.limitFCLToTwoColumns===true){this._oFCLConfig.maxColumnsCount=2}}if(r!==null&&r!==void 0&&(n=r.config)!==null&&n!==void 0&&n.controlAggregation){this._oFCLConfig.defaultControlAggregation=r.config.controlAggregation}this._initializeTargetAggregation(o);this._initializeRoutesInformation(o);this.getFclControl().attachStateChange(this.onStateChanged,this);this.getFclControl().attachAfterEndColumnNavigate(this.onStateChanged,this)};i.getFclControl=function e(){return this.getAppContentContainer()};i._saveLayout=function e(t){this.sPreviousLayout=t.getParameters().layout};i._getViewForNavigatedRowsComputation=function e(){const t=this._getAllVisibleViews(this.sPreviousLayout);const n=t[t.length-1];let o;this.getRouter().attachEventOnce("routeMatched",e=>{o=T(e.getParameter("views")[e.getParameter("views").length-1]);if(n){if(o.getViewData()&&o.getViewData().viewLevel===this._oFCLConfig.maxColumnsCount){this.oAdditionalViewForNavRowsComputation=o}if(o.getViewData()&&n.getViewData()&&n.getViewData().viewLevel<this._oFCLConfig.maxColumnsCount&&n.getViewData()&&n.getViewData().viewLevel>o.getViewData().viewLevel&&o!==n){this.oAdditionalViewForNavRowsComputation=n}}})};i.getViewForNavigatedRowsComputation=function e(){return this.oAdditionalViewForNavRowsComputation};i.onExit=function e(){this.getRouter().detachRouteMatched(this.onRouteMatched,this);this.getRouter().detachBeforeRouteMatched(this.onBeforeRouteMatched,this);this.getFclControl().detachStateChange(this.onStateChanged,this);this.getFclControl().detachAfterEndColumnNavigate(this.onStateChanged,this);this._oTargetsAggregation=null;this._oTargetsFromRoutePattern=null;u.prototype.onExit.bind(this)()};i.isFclEnabled=function e(){return true};i.displayErrorPage=function e(t,n){const o=this.getFclControl();if(this._oFCLConfig&&n.FCLLevel>=this._oFCLConfig.maxColumnsCount){n.FCLLevel=this._oFCLConfig.maxColumnsCount-1}if(!this.aMessagePages){this.aMessagePages=[null,null,null]}let i=this.aMessagePages[n.FCLLevel];if(!i){i=new a({showHeader:false,icon:"sap-icon://message-error"});this.aMessagePages[n.FCLLevel]=i;switch(n.FCLLevel){case 0:o.addBeginColumnPage(i);break;case 1:o.addMidColumnPage(i);break;default:o.addEndColumnPage(i)}}i.setText(t);if(n.technicalMessage){i.setCustomDescription(new l({text:n.description||n.technicalMessage,press:function(){s.show(n.technicalMessage,{icon:f.ERROR,title:n.title,actions:[m.OK],defaultAction:m.OK,details:n.technicalDetails||"",contentWidth:"60%"})}}))}else{i.setDescription(n.description||"")}o.to(i.getId());return Promise.resolve(true)};i._initializeTargetAggregation=function e(t){const n=t.getManifest(),o=n["sap.ui5"].routing?n["sap.ui5"].routing.targets:null;this._oTargetsAggregation={};if(o){Object.keys(o).forEach(e=>{const t=o[e];if(t.controlAggregation){this._oTargetsAggregation[e]={aggregation:t.controlAggregation,pattern:t.contextPattern}}else{this._oTargetsAggregation[e]={aggregation:"page",pattern:null}}})}};i._initializeRoutesInformation=function e(t){const n=t.getManifest(),o=n["sap.ui5"].routing?n["sap.ui5"].routing.routes:null;this._oTargetsFromRoutePattern={};if(o){o.forEach(e=>{this._oTargetsFromRoutePattern[e.pattern]=e.target})}};i.getCurrentArgument=function e(){return this.sCurrentArguments};i.getCurrentRouteName=function e(){return this.sCurrentRouteName};i.getConstants=function e(){return x};i.getTargetAggregation=function e(){return this._oTargetsAggregation};i.onRouteMatched=function e(t){const n=t.getParameter("name");this.sCurrentRouteName=n;this.sCurrentArguments=t.getParameter("arguments")};i._scrollTablesToLastNavigatedItems=function e(){const t=this._getAllVisibleViews();if(t.length>1||t[0].getViewData().viewLevel<this._oFCLConfig.maxColumnsCount){let e;const n=this.getViewForNavigatedRowsComputation();if(n&&t.indexOf(n)===-1){t.push(n)}for(let n=t.length-1;n>0;n--){const o=t[n],i=t[n-1];if(o.getBindingContext()){e=o.getBindingContext().getPath();i.getController()._scrollTablesToRow(e)}}}};i.onStateChanged=function e(t){const n=t.getParameter("isNavigationArrow");if(this.sCurrentArguments!==undefined){if(!this.sCurrentArguments[this.SQUERYKEYNAME]){this.sCurrentArguments[this.SQUERYKEYNAME]={}}this.sCurrentArguments[this.SQUERYKEYNAME].layout=t.getParameter("layout")}this._forceModelContextChangeOnBreadCrumbs(t);if(n){this._oRouterProxy.navTo(this.sCurrentRouteName,this.sCurrentArguments)}const o=this.getRightmostView();if(o){this._computeTitleHierarchy(o)}};i._forceModelContextChangeOnBreadCrumbs=function e(t){const n=t.getSource();let o=[];o=o.concat(n.getBeginColumnPages()).concat(n.getMidColumnPages()).concat(n.getEndColumnPages());o.forEach(function(e){const t=T(e);const n=t.byId&&t.byId("breadcrumbs");if(n){n.fireModelContextChange()}})};i._updateShareButtonVisibility=function e(t,n){let o;switch(n){case"OneColumn":o=t==="beginColumn";break;case"MidColumnFullScreen":case"ThreeColumnsBeginExpandedEndHidden":case"ThreeColumnsMidExpandedEndHidden":case"TwoColumnsBeginExpanded":case"TwoColumnsMidExpanded":o=t==="midColumn";break;case"EndColumnFullScreen":case"ThreeColumnsEndExpanded":case"ThreeColumnsMidExpanded":o=t==="endColumn";break;default:o=false}return o};i._updateEditButtonVisiblity=function e(t,n){let o=true;switch(t){case"midColumn":switch(n){case"TwoColumnsMidExpanded":case"ThreeColumnsMidExpanded":case"ThreeColumnsEndExpanded":o=false;break}break;case"endColumn":switch(n){case"ThreeColumnsMidExpanded":case"ThreeColumnsEndExpanded":o=false}break}return o};i.updateUIStateForView=function e(t,n){const o=this.getHelper().getCurrentUIState(),i=["beginColumn","midColumn","endColumn"],r=this.getFclControl().getLayout();let l;if(!t.getModel("fclhelper")){t.setModel(this._createHelperModel(),"fclhelper")}if(n>=this._oFCLConfig.maxColumnsCount){l=i[this._oFCLConfig.maxColumnsCount-1];o.actionButtonsInfo.midColumn.fullScreen=null;o.actionButtonsInfo.midColumn.exitFullScreen=null;o.actionButtonsInfo.midColumn.closeColumn=null;o.actionButtonsInfo.endColumn.exitFullScreen=null;o.actionButtonsInfo.endColumn.fullScreen=null;o.actionButtonsInfo.endColumn.closeColumn=null}else{l=i[n]}if(n>=this._oFCLConfig.maxColumnsCount||r==="EndColumnFullScreen"||r==="MidColumnFullScreen"||r==="OneColumn"){t.getModel("fclhelper").setProperty("/breadCrumbIsVisible",true)}else{t.getModel("fclhelper").setProperty("/breadCrumbIsVisible",false)}o.actionButtonsInfo.beginColumn={fullScreen:null,exitFullScreen:null,closeColumn:null};const s=Object.assign({},o.actionButtonsInfo[l]);s.switchVisible=s.fullScreen!==null||s.exitFullScreen!==null;s.switchIcon=s.fullScreen!==null?"sap-icon://full-screen":"sap-icon://exit-full-screen";s.isFullScreen=s.fullScreen===null;s.closeVisible=s.closeColumn!==null;t.getModel("fclhelper").setProperty("/actionButtonsInfo",s);t.getModel("fclhelper").setProperty("/showEditButton",this._updateEditButtonVisiblity(l,r));t.getModel("fclhelper").setProperty("/showShareIcon",this._updateShareButtonVisibility(l,r))};i.onBeforeRouteMatched=function e(t){if(t){const e=t.getParameters().arguments[this.SQUERYKEYNAME];let n=e?e.layout:null;if(!n){const e=this.getHelper().getNextUIState(0);n=e.layout}const o=t.getParameter("config").target;n=this._correctLayoutForTargets(n,o);if(n){this.getFclControl().setLayout(n)}}};i.getHelper=function e(){return t.getInstanceFor(this.getFclControl(),this._oFCLConfig)};i.calculateLayout=function e(t,n,o){let i=arguments.length>3&&arguments[3]!==undefined?arguments[3]:false;if(!o){o=i?this.getFclControl().getLayout():this.getHelper().getNextUIState(t).layout}const r=this.getRouter().getRouteByHash(`${n}?layout=${o}`);const l=this._oTargetsFromRoutePattern[r.getPattern()];return this._correctLayoutForTargets(o,l)};i._correctLayoutForTargets=function e(t,n){const o={2:["TwoColumnsMidExpanded","TwoColumnsBeginExpanded","MidColumnFullScreen"],3:["ThreeColumnsMidExpanded","ThreeColumnsEndExpanded","ThreeColumnsMidExpandedEndHidden","ThreeColumnsBeginExpandedEndHidden","MidColumnFullScreen","EndColumnFullScreen"]};if(n&&!Array.isArray(n)){n=[n]}if(!n){return t}else if(n.length>1){const e=o[n.length];if(e.indexOf(t)<0){t=e[0]}}else{const e=this.getTargetAggregation()[n[0]].aggregation||this._oFCLConfig.defaultControlAggregation;switch(e){case"beginColumnPages":t="OneColumn";break;case"midColumnPages":t="MidColumnFullScreen";break;case"endColumnPages":t="EndColumnFullScreen";break}}return t};i.getInstancedViews=function e(){const t=this.getFclControl();const n=[...t.getBeginColumnPages(),...t.getMidColumnPages(),...t.getEndColumnPages()];return n.map(e=>e.getComponentInstance().getRootControl())};i._getAllVisibleViews=function t(n){const o=[];n=n?n:this.getFclControl().getLayout();switch(n){case y.EndColumnFullScreen:if(this.getFclControl().getCurrentEndColumnPage()){o.push(T(this.getFclControl().getCurrentEndColumnPage()))}break;case y.MidColumnFullScreen:if(this.getFclControl().getCurrentMidColumnPage()){o.push(T(this.getFclControl().getCurrentMidColumnPage()))}break;case y.OneColumn:if(this.getFclControl().getCurrentBeginColumnPage()){o.push(T(this.getFclControl().getCurrentBeginColumnPage()))}break;case y.ThreeColumnsEndExpanded:case y.ThreeColumnsMidExpanded:if(this.getFclControl().getCurrentBeginColumnPage()){o.push(T(this.getFclControl().getCurrentBeginColumnPage()))}if(this.getFclControl().getCurrentMidColumnPage()){o.push(T(this.getFclControl().getCurrentMidColumnPage()))}if(this.getFclControl().getCurrentEndColumnPage()){o.push(T(this.getFclControl().getCurrentEndColumnPage()))}break;case y.TwoColumnsBeginExpanded:case y.TwoColumnsMidExpanded:case y.ThreeColumnsMidExpandedEndHidden:case y.ThreeColumnsBeginExpandedEndHidden:if(this.getFclControl().getCurrentBeginColumnPage()){o.push(T(this.getFclControl().getCurrentBeginColumnPage()))}if(this.getFclControl().getCurrentMidColumnPage()){o.push(T(this.getFclControl().getCurrentMidColumnPage()))}break;default:e.error(`Unhandled switch case for ${this.getFclControl().getLayout()}`)}return o};i._getAllViews=function t(n){const o=[];n=n?n:this.getFclControl().getLayout();switch(n){case y.OneColumn:if(this.getFclControl().getCurrentBeginColumnPage()){o.push(T(this.getFclControl().getCurrentBeginColumnPage()))}break;case y.ThreeColumnsEndExpanded:case y.ThreeColumnsMidExpanded:case y.ThreeColumnsMidExpandedEndHidden:case y.ThreeColumnsBeginExpandedEndHidden:case y.EndColumnFullScreen:if(this.getFclControl().getCurrentBeginColumnPage()){o.push(T(this.getFclControl().getCurrentBeginColumnPage()))}if(this.getFclControl().getCurrentMidColumnPage()){o.push(T(this.getFclControl().getCurrentMidColumnPage()))}if(this.getFclControl().getCurrentEndColumnPage()){o.push(T(this.getFclControl().getCurrentEndColumnPage()))}break;case y.TwoColumnsBeginExpanded:case y.TwoColumnsMidExpanded:if(this.getFclControl().getCurrentBeginColumnPage()){o.push(T(this.getFclControl().getCurrentBeginColumnPage()))}if(this.getFclControl().getCurrentMidColumnPage()){o.push(T(this.getFclControl().getCurrentMidColumnPage()))}break;case y.MidColumnFullScreen:const t=this.getHelper().getCurrentUIState().actionButtonsInfo.midColumn.exitFullScreen;if(this.getFclControl().getCurrentBeginColumnPage()){o.push(T(this.getFclControl().getCurrentBeginColumnPage()))}if(this.getFclControl().getCurrentMidColumnPage()){o.push(T(this.getFclControl().getCurrentMidColumnPage()))}if(t.indexOf("ThreeColumn")>=0){if(this.getFclControl().getCurrentEndColumnPage()){o.push(T(this.getFclControl().getCurrentEndColumnPage()))}}break;default:e.error(`Unhandled switch case for ${this.getFclControl().getLayout()}`)}return o};i.onContainerReady=function e(){const t=this._getAllVisibleViews();const n=t.reduce(function(e,t){e.push(r.restoreView(t));return e},[]);return Promise.all(n)};i.getRightmostContext=function e(){const t=this.getRightmostView();return t&&t.getBindingContext()};i.getRightmostView=function e(){return this._getAllViews().pop()};i.isContextUsedInPages=function e(t){if(!this.getFclControl()){return false}const n=this._getAllViews();for(const e of n){if(e){if(e.getBindingContext()===t){return true}}else{return false}}return false};i._setShellMenuTitle=function e(t,n,o){if(this.getHelper().getCurrentUIState().isFullScreen!==true){t.getShellServices().setTitle(o)}else{t.getShellServices().setTitle(n)}};return o}(u),d=M(h.prototype,"viewState",[c],{configurable:true,enumerable:true,writable:true,initializer:null}),h))||C);return R},false);
|
|
750
|
+
sap.ui.predefine("sap/fe/core/rootView/Fcl.controller", ["sap/base/Log","sap/f/FlexibleColumnLayoutSemanticHelper","sap/f/library","sap/fe/core/controllerextensions/ViewState","sap/fe/core/helpers/ClassSupport","sap/fe/core/helpers/KeepAliveHelper","sap/m/Link","sap/m/MessageBox","sap/m/MessagePage","./RootViewBaseController"],function(e,t,n,o,i,r,l,s,a,u){"use strict";var g,c,C,h,d;var f=s.Icon;var m=s.Action;var p=i.usingExtension;var F=i.defineUI5Class;function w(e,t,n,o){if(!n)return;Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(o):void 0})}function E(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function P(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;b(e,t)}function b(e,t){b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function e(t,n){t.__proto__=n;return t};return b(e,t)}function M(e,t,n,o,i){var r={};Object.keys(o).forEach(function(e){r[e]=o[e]});r.enumerable=!!r.enumerable;r.configurable=!!r.configurable;if("value"in r||r.initializer){r.writable=true}r=n.slice().reverse().reduce(function(n,o){return o(e,t,n)||n},r);if(i&&r.initializer!==void 0){r.value=r.initializer?r.initializer.call(i):void 0;r.initializer=undefined}if(r.initializer===void 0){Object.defineProperty(e,t,r);r=null}return r}function v(e,t){throw new Error("Decorating class property failed. Please ensure that "+"proposal-class-properties is enabled and runs after the decorators transform.")}const y=n.LayoutType;const x={page:{names:["BeginColumn","MidColumn","EndColumn"],currentGetter:{prefix:"getCurrent",suffix:"Page"},getter:{prefix:"get",suffix:"Pages"}}};const T=function(e){if(e.isA("sap.ui.core.ComponentContainer")){return e.getComponentInstance().getRootControl()}else{return e}};let R=(g=F("sap.fe.core.rootView.Fcl"),c=p(o.override({applyInitialStateOnly:function(){return false},adaptBindingRefreshControls:function(e){this.getView().getController()._getAllVisibleViews().forEach(function(t){const n=Promise.resolve(t);e.push(n)})},adaptStateControls:function(e){this.getView().getController()._getAllVisibleViews().forEach(function(t){const n=Promise.resolve(t);e.push(n)})},onRestore:function(){const e=this.getView().getController();const t=e.getAppContentContainer();const n=t.getModel("internal");const o=n.getProperty("/pages");for(const e in o){n.setProperty(`/pages/${e}/restoreStatus`,"pending")}e.onContainerReady()},onSuspend:function(){const e=this.getView().getController();const t=e.getFclControl();const n=t.getBeginColumnPages()||[];const o=t.getMidColumnPages()||[];const i=t.getEndColumnPages()||[];const r=[].concat(n,o,i);r.forEach(function(e){const t=T(e);const n=t&&t.getController();if(n&&n.viewState&&n.viewState.onSuspend){n.viewState.onSuspend()}})}})),g(C=(h=function(n){P(o,n);function o(){var e;for(var t=arguments.length,o=new Array(t),i=0;i<t;i++){o[i]=arguments[i]}e=n.call(this,...o)||this;w(e,"viewState",d,E(e));return e}var i=o.prototype;i.onInit=function e(){n.prototype.onInit.call(this);this._internalInit()};i.manageDataReceived=function e(t){if(t.getParameter("error")){var n;const e=t.getParameter("path"),o=this._getAllVisibleViews().find(t=>{var n;return((n=t.getBindingContext())===null||n===void 0?void 0:n.getPath())===e});if(e&&o!==null&&o!==void 0&&(n=o.getBindingContext())!==null&&n!==void 0&&n.isKeepAlive()){o.getController()._routing.onDataReceived(t)}}};i.attachRouteMatchers=function e(){this.getRouter().attachBeforeRouteMatched(this._getViewForNavigatedRowsComputation,this);n.prototype.attachRouteMatchers.call(this);this._internalInit();this.getRouter().attachBeforeRouteMatched(this.onBeforeRouteMatched,this);this.getRouter().attachRouteMatched(this.onRouteMatched,this);this.getFclControl().attachStateChange(this._saveLayout,this)};i._internalInit=function e(){var t,n;if(this._oRouterProxy){return}this.sCurrentRouteName="";this.sCurrentArguments={};this.SQUERYKEYNAME="?query";const o=this.getAppComponent();const i=this.getAppComponent().getModel();i===null||i===void 0?void 0:i.attachEvent("dataReceived",this.manageDataReceived.bind(this));this._oRouterProxy=o.getRouterProxy();this._oFCLConfig={maxColumnsCount:3};const r=o.getManifest()["sap.ui5"].routing;if(r!==null&&r!==void 0&&(t=r.config)!==null&&t!==void 0&&t.flexibleColumnLayout){const e=r.config.flexibleColumnLayout;if(e.defaultTwoColumnLayoutType){this._oFCLConfig.defaultTwoColumnLayoutType=e.defaultTwoColumnLayoutType}if(e.defaultThreeColumnLayoutType){this._oFCLConfig.defaultThreeColumnLayoutType=e.defaultThreeColumnLayoutType}if(e.limitFCLToTwoColumns===true){this._oFCLConfig.maxColumnsCount=2}}if(r!==null&&r!==void 0&&(n=r.config)!==null&&n!==void 0&&n.controlAggregation){this._oFCLConfig.defaultControlAggregation=r.config.controlAggregation}this._initializeTargetAggregation(o);this._initializeRoutesInformation(o);this.getFclControl().attachStateChange(this.onStateChanged,this);this.getFclControl().attachAfterEndColumnNavigate(this.onStateChanged,this)};i.getFclControl=function e(){return this.getAppContentContainer()};i._saveLayout=function e(t){this.sPreviousLayout=t.getParameters().layout};i._getViewForNavigatedRowsComputation=function e(){const t=this._getAllVisibleViews(this.sPreviousLayout);const n=t[t.length-1];let o;this.getRouter().attachEventOnce("routeMatched",e=>{o=T(e.getParameter("views")[e.getParameter("views").length-1]);if(n){if(o.getViewData()&&o.getViewData().viewLevel===this._oFCLConfig.maxColumnsCount){this.oAdditionalViewForNavRowsComputation=o}if(o.getViewData()&&n.getViewData()&&n.getViewData().viewLevel<this._oFCLConfig.maxColumnsCount&&n.getViewData()&&n.getViewData().viewLevel>o.getViewData().viewLevel&&o!==n){this.oAdditionalViewForNavRowsComputation=n}}})};i.getViewForNavigatedRowsComputation=function e(){return this.oAdditionalViewForNavRowsComputation};i.onExit=function e(){this.getRouter().detachRouteMatched(this.onRouteMatched,this);this.getRouter().detachBeforeRouteMatched(this.onBeforeRouteMatched,this);this.getFclControl().detachStateChange(this.onStateChanged,this);this.getFclControl().detachAfterEndColumnNavigate(this.onStateChanged,this);this._oTargetsAggregation=null;this._oTargetsFromRoutePattern=null;u.prototype.onExit.bind(this)()};i.isFclEnabled=function e(){return true};i.displayErrorPage=function e(t,n){const o=this.getFclControl();if(this._oFCLConfig&&n.FCLLevel>=this._oFCLConfig.maxColumnsCount){n.FCLLevel=this._oFCLConfig.maxColumnsCount-1}if(!this.aMessagePages){this.aMessagePages=[null,null,null]}let i=this.aMessagePages[n.FCLLevel];if(!i){i=new a({showHeader:false,icon:"sap-icon://message-error"});this.aMessagePages[n.FCLLevel]=i;switch(n.FCLLevel){case 0:o.addBeginColumnPage(i);break;case 1:o.addMidColumnPage(i);break;default:o.addEndColumnPage(i)}}i.setText(t);if(n.technicalMessage){i.setCustomDescription(new l({text:n.description||n.technicalMessage,press:function(){s.show(n.technicalMessage,{icon:f.ERROR,title:n.title,actions:[m.OK],defaultAction:m.OK,details:n.technicalDetails||"",contentWidth:"60%"})}}))}else{i.setDescription(n.description||"")}o.to(i.getId());return Promise.resolve(true)};i._initializeTargetAggregation=function e(t){const n=t.getManifest(),o=n["sap.ui5"].routing?n["sap.ui5"].routing.targets:null;this._oTargetsAggregation={};if(o){Object.keys(o).forEach(e=>{const t=o[e];if(t.controlAggregation){this._oTargetsAggregation[e]={aggregation:t.controlAggregation,pattern:t.contextPattern}}else{this._oTargetsAggregation[e]={aggregation:"page",pattern:null}}})}};i._initializeRoutesInformation=function e(t){const n=t.getManifest(),o=n["sap.ui5"].routing?n["sap.ui5"].routing.routes:null;this._oTargetsFromRoutePattern={};if(o){o.forEach(e=>{this._oTargetsFromRoutePattern[e.pattern]=e.target})}};i.getCurrentArgument=function e(){return this.sCurrentArguments};i.getCurrentRouteName=function e(){return this.sCurrentRouteName};i.getConstants=function e(){return x};i.getTargetAggregation=function e(){return this._oTargetsAggregation};i.onRouteMatched=function e(t){const n=t.getParameter("name");this.sCurrentRouteName=n;this.sCurrentArguments=t.getParameter("arguments")};i._scrollTablesToLastNavigatedItems=function e(){const t=this._getAllVisibleViews();if(t.length>1||t[0].getViewData().viewLevel<this._oFCLConfig.maxColumnsCount){let e;const n=this.getViewForNavigatedRowsComputation();if(n&&t.indexOf(n)===-1){t.push(n)}for(let n=t.length-1;n>0;n--){const o=t[n],i=t[n-1];if(o.getBindingContext()){e=o.getBindingContext().getPath();i.getController()._scrollTablesToRow(e)}}}};i.onStateChanged=function e(t){const n=t.getParameter("isNavigationArrow");if(this.sCurrentArguments!==undefined){if(!this.sCurrentArguments[this.SQUERYKEYNAME]){this.sCurrentArguments[this.SQUERYKEYNAME]={}}this.sCurrentArguments[this.SQUERYKEYNAME].layout=t.getParameter("layout")}this._forceModelContextChangeOnBreadCrumbs(t);if(n){this._oRouterProxy.navTo(this.sCurrentRouteName,this.sCurrentArguments)}const o=this.getRightmostView();if(o){this._computeTitleHierarchy(o)}};i._forceModelContextChangeOnBreadCrumbs=function e(t){const n=t.getSource();let o=[];o=o.concat(n.getBeginColumnPages()).concat(n.getMidColumnPages()).concat(n.getEndColumnPages());o.forEach(function(e){const t=T(e);const n=t.byId&&t.byId("breadcrumbs");if(n){n.fireModelContextChange()}})};i._updateShareButtonVisibility=function e(t,n){let o;switch(n){case"OneColumn":o=t==="beginColumn";break;case"MidColumnFullScreen":case"ThreeColumnsBeginExpandedEndHidden":case"ThreeColumnsMidExpandedEndHidden":case"TwoColumnsBeginExpanded":case"TwoColumnsMidExpanded":o=t==="midColumn";break;case"EndColumnFullScreen":case"ThreeColumnsEndExpanded":case"ThreeColumnsMidExpanded":o=t==="endColumn";break;default:o=false}return o};i._updateEditButtonVisiblity=function e(t,n){let o=true;switch(t){case"midColumn":switch(n){case"TwoColumnsMidExpanded":case"ThreeColumnsMidExpanded":case"ThreeColumnsEndExpanded":o=false;break}break;case"endColumn":switch(n){case"ThreeColumnsMidExpanded":case"ThreeColumnsEndExpanded":o=false}break}return o};i.updateUIStateForView=function e(t,n){const o=this.getHelper().getCurrentUIState(),i=["beginColumn","midColumn","endColumn"],r=this.getFclControl().getLayout();let l;if(!t.getModel("fclhelper")){t.setModel(this._createHelperModel(),"fclhelper")}if(n>=this._oFCLConfig.maxColumnsCount){l=i[this._oFCLConfig.maxColumnsCount-1];o.actionButtonsInfo.midColumn.fullScreen=null;o.actionButtonsInfo.midColumn.exitFullScreen=null;o.actionButtonsInfo.midColumn.closeColumn=null;o.actionButtonsInfo.endColumn.exitFullScreen=null;o.actionButtonsInfo.endColumn.fullScreen=null;o.actionButtonsInfo.endColumn.closeColumn=null}else{l=i[n]}if(n>=this._oFCLConfig.maxColumnsCount||r==="EndColumnFullScreen"||r==="MidColumnFullScreen"||r==="OneColumn"){t.getModel("fclhelper").setProperty("/breadCrumbIsVisible",true)}else{t.getModel("fclhelper").setProperty("/breadCrumbIsVisible",false)}o.actionButtonsInfo.beginColumn={fullScreen:null,exitFullScreen:null,closeColumn:null};const s=Object.assign({},o.actionButtonsInfo[l]);s.switchVisible=s.fullScreen!==null||s.exitFullScreen!==null;s.switchIcon=s.fullScreen!==null?"sap-icon://full-screen":"sap-icon://exit-full-screen";s.isFullScreen=s.fullScreen===null;s.closeVisible=s.closeColumn!==null;t.getModel("fclhelper").setProperty("/actionButtonsInfo",s);t.getModel("fclhelper").setProperty("/showEditButton",this._updateEditButtonVisiblity(l,r));t.getModel("fclhelper").setProperty("/showShareIcon",this._updateShareButtonVisibility(l,r))};i.onBeforeRouteMatched=function e(t){if(t){const e=t.getParameters().arguments[this.SQUERYKEYNAME];let n=e?e.layout:null;if(!n){const e=this.getHelper().getNextUIState(0);n=e.layout}const o=t.getParameter("config").target;n=this._correctLayoutForTargets(n,o);if(n){this.getFclControl().setLayout(n)}}};i.getHelper=function e(){return t.getInstanceFor(this.getFclControl(),this._oFCLConfig)};i.calculateLayout=function e(t,n,o){let i=arguments.length>3&&arguments[3]!==undefined?arguments[3]:false;if(!o){o=i?this.getFclControl().getLayout():this.getHelper().getNextUIState(t).layout}const r=this.getRouter().getRouteByHash(`${n}?layout=${o}`);const l=this._oTargetsFromRoutePattern[r.getPattern()];return this._correctLayoutForTargets(o,l)};i._correctLayoutForTargets=function e(t,n){const o={2:["TwoColumnsMidExpanded","TwoColumnsBeginExpanded","MidColumnFullScreen"],3:["ThreeColumnsMidExpanded","ThreeColumnsEndExpanded","ThreeColumnsMidExpandedEndHidden","ThreeColumnsBeginExpandedEndHidden","MidColumnFullScreen","EndColumnFullScreen"]};if(n&&!Array.isArray(n)){n=[n]}if(!n){return t}else if(n.length>1){const e=o[n.length];if(e.indexOf(t)<0){t=e[0]}}else{const e=this.getTargetAggregation()[n[0]].aggregation||this._oFCLConfig.defaultControlAggregation;switch(e){case"beginColumnPages":t="OneColumn";break;case"midColumnPages":t="MidColumnFullScreen";break;case"endColumnPages":t="EndColumnFullScreen";break}}return t};i.getInstancedViews=function e(){const t=this.getFclControl();const n=[...t.getBeginColumnPages(),...t.getMidColumnPages(),...t.getEndColumnPages()];return n.map(e=>{if(e&&e.isA("sap.ui.core.ComponentContainer")){return e.getComponentInstance().getRootControl()}else{return e}})};i._getAllVisibleViews=function t(n){const o=[];n=n?n:this.getFclControl().getLayout();switch(n){case y.EndColumnFullScreen:if(this.getFclControl().getCurrentEndColumnPage()){o.push(T(this.getFclControl().getCurrentEndColumnPage()))}break;case y.MidColumnFullScreen:if(this.getFclControl().getCurrentMidColumnPage()){o.push(T(this.getFclControl().getCurrentMidColumnPage()))}break;case y.OneColumn:if(this.getFclControl().getCurrentBeginColumnPage()){o.push(T(this.getFclControl().getCurrentBeginColumnPage()))}break;case y.ThreeColumnsEndExpanded:case y.ThreeColumnsMidExpanded:if(this.getFclControl().getCurrentBeginColumnPage()){o.push(T(this.getFclControl().getCurrentBeginColumnPage()))}if(this.getFclControl().getCurrentMidColumnPage()){o.push(T(this.getFclControl().getCurrentMidColumnPage()))}if(this.getFclControl().getCurrentEndColumnPage()){o.push(T(this.getFclControl().getCurrentEndColumnPage()))}break;case y.TwoColumnsBeginExpanded:case y.TwoColumnsMidExpanded:case y.ThreeColumnsMidExpandedEndHidden:case y.ThreeColumnsBeginExpandedEndHidden:if(this.getFclControl().getCurrentBeginColumnPage()){o.push(T(this.getFclControl().getCurrentBeginColumnPage()))}if(this.getFclControl().getCurrentMidColumnPage()){o.push(T(this.getFclControl().getCurrentMidColumnPage()))}break;default:e.error(`Unhandled switch case for ${this.getFclControl().getLayout()}`)}return o};i._getAllViews=function t(n){const o=[];n=n?n:this.getFclControl().getLayout();switch(n){case y.OneColumn:if(this.getFclControl().getCurrentBeginColumnPage()){o.push(T(this.getFclControl().getCurrentBeginColumnPage()))}break;case y.ThreeColumnsEndExpanded:case y.ThreeColumnsMidExpanded:case y.ThreeColumnsMidExpandedEndHidden:case y.ThreeColumnsBeginExpandedEndHidden:case y.EndColumnFullScreen:if(this.getFclControl().getCurrentBeginColumnPage()){o.push(T(this.getFclControl().getCurrentBeginColumnPage()))}if(this.getFclControl().getCurrentMidColumnPage()){o.push(T(this.getFclControl().getCurrentMidColumnPage()))}if(this.getFclControl().getCurrentEndColumnPage()){o.push(T(this.getFclControl().getCurrentEndColumnPage()))}break;case y.TwoColumnsBeginExpanded:case y.TwoColumnsMidExpanded:if(this.getFclControl().getCurrentBeginColumnPage()){o.push(T(this.getFclControl().getCurrentBeginColumnPage()))}if(this.getFclControl().getCurrentMidColumnPage()){o.push(T(this.getFclControl().getCurrentMidColumnPage()))}break;case y.MidColumnFullScreen:const t=this.getHelper().getCurrentUIState().actionButtonsInfo.midColumn.exitFullScreen;if(this.getFclControl().getCurrentBeginColumnPage()){o.push(T(this.getFclControl().getCurrentBeginColumnPage()))}if(this.getFclControl().getCurrentMidColumnPage()){o.push(T(this.getFclControl().getCurrentMidColumnPage()))}if(t.indexOf("ThreeColumn")>=0){if(this.getFclControl().getCurrentEndColumnPage()){o.push(T(this.getFclControl().getCurrentEndColumnPage()))}}break;default:e.error(`Unhandled switch case for ${this.getFclControl().getLayout()}`)}return o};i.onContainerReady=function e(){const t=this._getAllVisibleViews();const n=t.reduce(function(e,t){e.push(r.restoreView(t));return e},[]);return Promise.all(n)};i.getRightmostContext=function e(){const t=this.getRightmostView();return t&&t.getBindingContext()};i.getRightmostView=function e(){return this._getAllViews().pop()};i.isContextUsedInPages=function e(t){if(!this.getFclControl()){return false}const n=this._getAllViews();for(const e of n){if(e){if(e.getBindingContext()===t){return true}}else{return false}}return false};i._setShellMenuTitle=function e(t,n,o){if(this.getHelper().getCurrentUIState().isFullScreen!==true){t.getShellServices().setTitle(o)}else{t.getShellServices().setTitle(n)}};return o}(u),d=M(h.prototype,"viewState",[c],{configurable:true,enumerable:true,writable:true,initializer:null}),h))||C);return R},false);
|
|
751
751
|
/*!
|
|
752
752
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
753
753
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
754
754
|
*/
|
|
755
|
-
sap.ui.predefine("sap/fe/core/rootView/NavContainer.controller", ["sap/base/Log","sap/fe/core/CommonUtils","sap/fe/core/controllerextensions/ViewState","sap/fe/core/helpers/ClassSupport","sap/fe/core/helpers/KeepAliveHelper","sap/m/IllustratedMessage","sap/m/Page","./RootViewBaseController"],function(e,t,n,r,o,i,a,s){"use strict";var l,c,u,g,f;var p=r.usingExtension;var d=r.defineUI5Class;function h(e,t,n,r){if(!n)return;Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function C(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function v(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;w(e,t)}function w(e,t){w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function e(t,n){t.__proto__=n;return t};return w(e,t)}function P(e,t,n,r,o){var i={};Object.keys(r).forEach(function(e){i[e]=r[e]});i.enumerable=!!i.enumerable;i.configurable=!!i.configurable;if("value"in i||i.initializer){i.writable=true}i=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},i);if(o&&i.initializer!==void 0){i.value=i.initializer?i.initializer.call(o):void 0;i.initializer=undefined}if(i.initializer===void 0){Object.defineProperty(e,t,i);i=null}return i}function b(e,t){throw new Error("Decorating class property failed. Please ensure that "+"proposal-class-properties is enabled and runs after the decorators transform.")}let y=(l=d("sap.fe.core.rootView.NavContainer"),c=p(n.override({applyInitialStateOnly:function(){return false},adaptBindingRefreshControls:function(e){const t=this.getView(),n=t.getController();e.push(n._getCurrentPage(t))},adaptStateControls:function(e){const t=this.getView(),n=t.getController();e.push(n._getCurrentPage(t))},onRestore:function(){const e=this.getView(),t=e.getController(),n=t.getAppContentContainer();const r=n.getModel("internal");const o=r.getProperty("/pages");for(const e in o){r.setProperty(`/pages/${e}/restoreStatus`,"pending")}t.onContainerReady()},onSuspend:function(){const e=this.getView(),n=e.getController(),r=n.getAppContentContainer();const o=r.getPages();o.forEach(function(e){const n=t.getTargetView(e);const r=n&&n.getController();if(r&&r.viewState&&r.viewState.onSuspend){r.viewState.onSuspend()}})}})),l(u=(g=function(n){v(r,n);function r(){var e;for(var t=arguments.length,r=new Array(t),o=0;o<t;o++){r[o]=arguments[o]}e=n.call(this,...r)||this;h(e,"viewState",f,C(e));return e}var s=r.prototype;s.onContainerReady=function e(){const n=this.getView(),r=this._getCurrentPage(n);return r.then(function(e){const n=t.getTargetView(e);return o.restoreView(n)})};s._getCurrentPage=function e(n){const r=this.getAppContentContainer();return new Promise(function(e){const o=r.getCurrentPage();if(o&&o.getController&&o.getController().isPlaceholder&&o.getController().isPlaceholder()){o.getController().attachEventOnce("targetPageInsertedInContainer",function(r){const o=r.getParameter("targetpage");const i=t.getTargetView(o);e(i!==n&&i)})}else{const r=t.getTargetView(o);e(r!==n&&r)}})};s._getNavContainer=function e(){return this.getAppContentContainer()};s.getInstancedViews=function e(){return this._getNavContainer().getPages().map(e=>e.getComponentInstance().getRootControl())};s.isFclEnabled=function e(){return false};s._scrollTablesToLastNavigatedItems=function e(){};s.displayErrorPage=function n(r,o){return new Promise((n,s)=>{try{const e=this._getNavContainer();if(!this.oPage){this.oPage=new a({showHeader:false});this.oIllustratedMessage=new i({title:r,description:o.description||"",illustrationType:`sapIllus-${o.errorType}`});this.oPage.insertContent(this.oIllustratedMessage,0);e.addPage(this.oPage)}if(o.handleShellBack){const n=e.getCurrentPage(),r=t.getAppComponent(e.getCurrentPage());r.getShellServices().setBackNavigation(function(){e.to(n.getId());r.getShellServices().setBackNavigation()})}e.attachAfterNavigate(function(){n(true)});e.to(this.oPage.getId())}catch(t){s(false);e.info(t)}})};return r}(s),f=P(g.prototype,"viewState",[c],{configurable:true,enumerable:true,writable:true,initializer:null}),g))||u);return y},false);
|
|
755
|
+
sap.ui.predefine("sap/fe/core/rootView/NavContainer.controller", ["sap/base/Log","sap/fe/core/CommonUtils","sap/fe/core/controllerextensions/ViewState","sap/fe/core/helpers/ClassSupport","sap/fe/core/helpers/KeepAliveHelper","sap/m/IllustratedMessage","sap/m/Page","./RootViewBaseController"],function(e,t,n,r,o,i,a,s){"use strict";var l,c,u,g,f;var p=r.usingExtension;var d=r.defineUI5Class;function h(e,t,n,r){if(!n)return;Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function C(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function v(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;w(e,t)}function w(e,t){w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function e(t,n){t.__proto__=n;return t};return w(e,t)}function P(e,t,n,r,o){var i={};Object.keys(r).forEach(function(e){i[e]=r[e]});i.enumerable=!!i.enumerable;i.configurable=!!i.configurable;if("value"in i||i.initializer){i.writable=true}i=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},i);if(o&&i.initializer!==void 0){i.value=i.initializer?i.initializer.call(o):void 0;i.initializer=undefined}if(i.initializer===void 0){Object.defineProperty(e,t,i);i=null}return i}function b(e,t){throw new Error("Decorating class property failed. Please ensure that "+"proposal-class-properties is enabled and runs after the decorators transform.")}let y=(l=d("sap.fe.core.rootView.NavContainer"),c=p(n.override({applyInitialStateOnly:function(){return false},adaptBindingRefreshControls:function(e){const t=this.getView(),n=t.getController();e.push(n._getCurrentPage(t))},adaptStateControls:function(e){const t=this.getView(),n=t.getController();e.push(n._getCurrentPage(t))},onRestore:function(){const e=this.getView(),t=e.getController(),n=t.getAppContentContainer();const r=n.getModel("internal");const o=r.getProperty("/pages");for(const e in o){r.setProperty(`/pages/${e}/restoreStatus`,"pending")}t.onContainerReady()},onSuspend:function(){const e=this.getView(),n=e.getController(),r=n.getAppContentContainer();const o=r.getPages();o.forEach(function(e){const n=t.getTargetView(e);const r=n&&n.getController();if(r&&r.viewState&&r.viewState.onSuspend){r.viewState.onSuspend()}})}})),l(u=(g=function(n){v(r,n);function r(){var e;for(var t=arguments.length,r=new Array(t),o=0;o<t;o++){r[o]=arguments[o]}e=n.call(this,...r)||this;h(e,"viewState",f,C(e));return e}var s=r.prototype;s.onContainerReady=function e(){const n=this.getView(),r=this._getCurrentPage(n);return r.then(function(e){const n=t.getTargetView(e);return o.restoreView(n)})};s._getCurrentPage=function e(n){const r=this.getAppContentContainer();return new Promise(function(e){const o=r.getCurrentPage();if(o&&o.getController&&o.getController().isPlaceholder&&o.getController().isPlaceholder()){o.getController().attachEventOnce("targetPageInsertedInContainer",function(r){const o=r.getParameter("targetpage");const i=t.getTargetView(o);e(i!==n&&i)})}else{const r=t.getTargetView(o);e(r!==n&&r)}})};s._getNavContainer=function e(){return this.getAppContentContainer()};s.getInstancedViews=function e(){return this._getNavContainer().getPages().map(e=>{if(e&&e.isA("sap.ui.core.ComponentContainer")){return e.getComponentInstance().getRootControl()}else{return e}})};s.isFclEnabled=function e(){return false};s._scrollTablesToLastNavigatedItems=function e(){};s.displayErrorPage=function n(r,o){return new Promise((n,s)=>{try{const e=this._getNavContainer();if(!this.oPage){this.oPage=new a({showHeader:false});this.oIllustratedMessage=new i({title:r,description:o.description||"",illustrationType:`sapIllus-${o.errorType}`});this.oPage.insertContent(this.oIllustratedMessage,0);e.addPage(this.oPage)}if(o.handleShellBack){const n=e.getCurrentPage(),r=t.getAppComponent(e.getCurrentPage());r.getShellServices().setBackNavigation(function(){e.to(n.getId());r.getShellServices().setBackNavigation()})}e.attachAfterNavigate(function(){n(true)});e.to(this.oPage.getId())}catch(t){s(false);e.info(t)}})};return r}(s),f=P(g.prototype,"viewState",[c],{configurable:true,enumerable:true,writable:true,initializer:null}),g))||u);return y},false);
|
|
756
756
|
/*!
|
|
757
757
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
758
758
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
@@ -772,7 +772,7 @@ sap.ui.predefine("sap/fe/core/services/CacheHandlerServiceFactory", ["sap/base/s
|
|
|
772
772
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
773
773
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
774
774
|
*/
|
|
775
|
-
sap.ui.predefine("sap/fe/core/services/EnvironmentServiceFactory", ["sap/
|
|
775
|
+
sap.ui.predefine("sap/fe/core/services/EnvironmentServiceFactory", ["sap/suite/ui/commons/collaboration/CollaborationHelper","sap/ui/core/Core","sap/ui/core/service/Service","sap/ui/core/service/ServiceFactory","sap/ui/VersionInfo","../converters/MetaModelConverter"],function(e,t,i,n,r,a){"use strict";var s={};var o=a.DefaultEnvironmentCapabilities;function c(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;l(e,t)}function l(e,t){l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function e(t,i){t.__proto__=i;return t};return l(e,t)}let p=function(e){c(i,e);function i(){return e.apply(this,arguments)||this}s.EnvironmentCapabilitiesService=i;var n=i.prototype;n.init=function e(){this.initPromise=new Promise((e,t)=>{this.resolveFn=e;this.rejectFn=t});const t=this.getContext();this.environmentCapabilities=Object.assign({},o);r.load().then(async e=>{this.environmentCapabilities.Chart=!!e.libraries.find(e=>e.name==="sap.viz");this.environmentCapabilities.MicroChart=!!e.libraries.find(e=>e.name==="sap.suite.ui.microchart");this.environmentCapabilities.UShell=!!(sap&&sap.ushell&&sap.ushell.Container);this.environmentCapabilities.IntentBasedNavigation=!!(sap&&sap.ushell&&sap.ushell.Container);this.environmentCapabilities.InsightsSupported=!!e.libraries.find(e=>e.name==="sap.insights")&&await h();this.environmentCapabilities=Object.assign(this.environmentCapabilities,t.settings);this.resolveFn(this);return null}).catch(this.rejectFn)};i.resolveLibrary=async function e(i){return new Promise(function(e){try{t.loadLibrary(`${i.replace(/\./g,"/")}`,{async:true}).then(function(){e(true)}).catch(function(){e(false)})}catch(t){e(false)}})};n.setCapabilities=function e(t){this.environmentCapabilities=t};n.setCapability=function e(t,i){this.environmentCapabilities[t]=i};n.getCapabilities=function e(){return this.environmentCapabilities};n.getInterface=function e(){return this};return i}(i);s.EnvironmentCapabilitiesService=p;let u=function(e){c(t,e);function t(){return e.apply(this,arguments)||this}s.EnvironmentServiceFactory=t;var i=t.prototype;i.createInstance=function e(t){const i=new p(t);return i.initPromise};return t}(n);s.EnvironmentServiceFactory=u;async function h(){return new Promise(async e=>{try{const t=await p.resolveLibrary("sap.insights");if(t){sap.ui.require(["sap/insights/CardHelper"],async t=>{try{await t.getServiceAsync("UIService");e(!await v())}catch{e(false)}})}else{e(false)}}catch{e(false)}})}s.getInsightsEnabled=h;async function v(){let t=false;try{t=await e.isTeamsModeActive()}catch{return false}return t}s.getMSTeamsActive=v;return s},false);
|
|
776
776
|
/*!
|
|
777
777
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
778
778
|
* (c) Copyright 2009-2023 SAP SE. All rights reserved
|
|
@@ -921,8 +921,8 @@ sap.ui.require.preload({
|
|
|
921
921
|
"sap/fe/core/controls/NonComputedVisibleKeyFieldsDialog.fragment.xml":'<core:FragmentDefinition\n\txmlns:template="http://schemas.sap.com/sapui5/extension/sap.ui.core.template/1"\n\txmlns="sap.m"\n\txmlns:core="sap.ui.core"\n\txmlns:mdc="sap.ui.mdc"\n\txmlns:mdcv="sap.ui.mdc.valuehelp"\n\txmlns:mdcvc="sap.ui.mdc.valuehelp.content"\n\txmlns:form="sap.ui.layout.form"\n\txmlns:customData="http://schemas.sap.com/sapui5/extension/sap.ui.core.CustomData/1"\n\ttemplate:require="{\n\t\tMODEL: \'sap/ui/model/odata/v4/AnnotationHelper\',\n\t\tCOMMON: \'sap/fe/macros/CommonHelper\',\n\t\tID: \'sap/fe/core/helpers/StableIdHelper\',\n\t\tValueHelpTemplating: \'sap/fe/macros/internal/valuehelp/ValueHelpTemplating\',\n\t\tProperty: \'sap/fe/core/templating/PropertyFormatters\',\n\t\tFIELD: \'sap/fe/macros/field/FieldHelper\',\n\t\tUI: \'sap/fe/core/templating/UIFormatters\'\n\t}"\n><template:with path="fields>" var="allFields"><form:SimpleForm><template:repeat list="{allFields>}" var="key"><template:with path="key>" helper="COMMON.getPathToKey" var="immutableKey"><Label text="{= ${immutableKey>@com.sap.vocabularies.Common.v1.Label}}" /><mdc:Field\n\t\t\t\t\t\tdelegate="{name:\'sap/fe/macros/field/FieldBaseDelegate\', payload:{retrieveTextFromValueList:true}}"\n\t\t\t\t\t\tid="{= ID.generate([\'CreateDialog\', ${entitySet>@sapui.name}, ${immutableKey>@sapui.name}]) }"\n\t\t\t\t\t\tvalue="{immutableKey>@@MODEL.format}"\n\t\t\t\t\t\tplaceholder="{immutableKey>@com.sap.vocabularies.UI.v1.Placeholder@@MODEL.value}"\n\t\t\t\t\t\twidth="100%"\n\t\t\t\t\t\trequired="{= FIELD.getRequired(${immutableKey>@sapui.name}, ${immutableKey>@@UI.getDataModelObjectPath}, ${requiredProperties>})}"\n\t\t\t\t\t\tdisplay="{immutableKey>@@FIELD.getAPDialogDisplayFormat}"\n\t\t\t\t\t\tchange="{= \'.handleChange($event, \\\'\' + ${immutableKey>@sapui.name} + \'\\\')\' }"\n\t\t\t\t\t\tliveChange=".handleLiveChange"\n\t\t\t\t\t\tfieldHelp="{= ${immutableKey>@@Property.hasValueHelp} ? ID.generate([${immutableKey>@sapui.name},\'VH\']) : undefined }"\n\t\t\t\t\t\tcustomData:fieldName="{immutableKey>@sapui.name}"\n\t\t\t\t\t\teditMode="{= ${immutableKey>@com.sap.vocabularies.Common.v1.FieldControl} && ${immutableKey>@com.sap.vocabularies.Common.v1.FieldControl/$EnumMember} && ${immutableKey>@com.sap.vocabularies.Common.v1.FieldControl/$EnumMember} === \'com.sap.vocabularies.Common.v1.FieldControlType/ReadOnly\' ? \'Display\' : \'Editable\'}"\n\t\t\t\t\t><template:if test="{immutableKey>@@Property.hasValueHelp}"><template:then><mdc:dependents><mdc:ValueHelp\n\t\t\t\t\t\t\t\t\t\tid="{= ID.generate([${immutableKey>@sapui.name},\'VH\']) }"\n\t\t\t\t\t\t\t\t\t\tdelegate="{= FIELD.getValueHelpDelegateForNonComputedVisibleKeyField(${immutableKey>@@Property.getPropertyPath}) }"\n\t\t\t\t\t\t\t\t\t\tvalidateInput="{= ValueHelpTemplating.requiresValidation(${immutableKey>@@Property.getProperty})}"\n\t\t\t\t\t\t\t\t\t><mdc:typeahead><mdcv:Popover><mdcvc:MTable\n\t\t\t\t\t\t\t\t\t\t\t\t\tid="{= ID.generate([${immutableKey>@sapui.name},\'VH\']) }::Popover::qualifier::"\n\t\t\t\t\t\t\t\t\t\t\t\t\tcaseSensitive="{= ValueHelpTemplating.useCaseSensitiveFilterRequests(${immutableKey>@@Property.getPropertyObjectPath}, ${immutableKey>/@Org.OData.Capabilities.V1.FilterFunctions})}"\n\t\t\t\t\t\t\t\t\t\t\t\t\tuseAsValueHelp="{= ${immutableKey>@com.sap.vocabularies.Common.v1.ValueListWithFixedValues} || false}"\n\t\t\t\t\t\t\t\t\t\t\t\t/></mdcv:Popover></mdc:typeahead><template:if\n\t\t\t\t\t\t\t\t\t\t\ttest="{= ${immutableKey>@com.sap.vocabularies.Common.v1.ValueListWithFixedValues} ? (${immutableKey>@com.sap.vocabularies.Common.v1.ValueListWithFixedValues} === \'true\') : true}"\n\t\t\t\t\t\t\t\t\t\t><mdc:dialog><mdcv:Dialog /></mdc:dialog></template:if></mdc:ValueHelp></mdc:dependents></template:then></template:if></mdc:Field></template:with></template:repeat></form:SimpleForm></template:with></core:FragmentDefinition>\n',
|
|
922
922
|
"sap/fe/core/controls/massEdit/MassEditDialog.fragment.xml":'<core:FragmentDefinition\n\txmlns:template="http://schemas.sap.com/sapui5/extension/sap.ui.core.template/1"\n\txmlns:core="sap.ui.core"\n\txmlns="sap.m"\n\txmlns:mdc="sap.ui.mdc"\n\txmlns:mdcField="sap.ui.mdc.field"\n\txmlns:f="sap.ui.layout.form"\n\txmlns:l="sap.ui.layout"\n\ttemplate:require="{\n\t\tMED: \'sap/fe/core/helpers/MassEditHelper\'\n\t}"\n><f:Form visible="{= MED.helpers.hasEditableFieldsBinding(${dataFieldModel>}, true) }"><f:layout><f:ResponsiveGridLayout\n\t\t\t\tlabelSpanXL="4"\n\t\t\t\tlabelSpanL="4"\n\t\t\t\tlabelSpanM="12"\n\t\t\t\tlabelSpanS="12"\n\t\t\t\tadjustLabelSpan="false"\n\t\t\t\temptySpanXL="0"\n\t\t\t\temptySpanL="0"\n\t\t\t\temptySpanM="0"\n\t\t\t\temptySpanS="0"\n\t\t\t\tcolumnsXL="2"\n\t\t\t\tcolumnsL="2"\n\t\t\t\tcolumnsM="1"\n\t\t\t\tsingleContainerFullSize="false"\n\t\t\t/></f:layout><f:formContainers><f:FormContainer><f:formElements><template:repeat list="{dataFieldModel>}" var="dataField"><f:FormElement\n\t\t\t\t\t\t\tlabel="{dataField>label}"\n\t\t\t\t\t\t\tvisible="{= \'{fieldsInfo>/values/\' + ${dataField>dataProperty} + \'/visible}\' }"\n\t\t\t\t\t\t><f:fields><template:with path="dataField>propertyInfo" var="property"><core:Fragment fragmentName="sap.fe.core.controls.massEdit.MassEditField" type="XML" /></template:with><template:if test="{dataField>unitInfo}"><template:with path="dataField>unitInfo" var="property"><core:Fragment fragmentName="sap.fe.core.controls.massEdit.MassEditField" type="XML" /></template:with></template:if></f:fields></f:FormElement></template:repeat></f:formElements></f:FormContainer></f:formContainers></f:Form><Text\n\t\tvisible="{= MED.helpers.hasEditableFieldsBinding(${dataFieldModel>}, false) }"\n\t\ttext="{fieldsInfo>/noFields}"\n\t\tclass="sapUiSmallMargin"\n\t/>\n\t/></core:FragmentDefinition>\n',
|
|
923
923
|
"sap/fe/core/controls/massEdit/MassEditField.fragment.xml":'<core:FragmentDefinition\n\txmlns:template="http://schemas.sap.com/sapui5/extension/sap.ui.core.template/1"\n\txmlns:core="sap.ui.core"\n\txmlns="sap.m"\n\txmlns:mdc="sap.ui.mdc"\n\txmlns:mdcField="sap.ui.mdc.field"\n\txmlns:control="sap.fe.core.controls"\n\txmlns:macro="sap.fe.macros"\n\txmlns:f="sap.ui.layout.form"\n\txmlns:l="sap.ui.layout"\n\txmlns:customData="http://schemas.sap.com/sapui5/extension/sap.ui.core.CustomData/1"\n\ttemplate:require="{\n\t\tProperty: \'sap/fe/core/templating/PropertyFormatters\',\n\t\tID: \'sap/fe/core/helpers/StableIdHelper\',\n\t\tValueHelpTemplating: \'sap/fe/macros/internal/valuehelp/ValueHelpTemplating\'\n\t}"\n><template:if test="{property>hasVH}"><template:then><template:with path="property>propertyPathForValueHelp" var="vhProperty"><mdc:Field\n\t\t\t\t\tdelegate="{name: \'sap/ui/mdc/odata/v4/FieldBaseDelegate\'}"\n\t\t\t\t\tid="{= ID.generate([\'MED_\', ${dataField>entitySet}, ${property>relativePath}, \'_MDCField\']) }"\n\t\t\t\t\tcore:require="{MassEditHandlers: \'sap/fe/core/controls/massEdit/MassEditHandlers\'}"\n\t\t\t\t\tchange="{= \'MassEditHandlers.handleMDCFieldChange($event, \\\'\' + ${property>relativePath} + \'\\\')\' }"\n\t\t\t\t\tlabel="{dataField>label}"\n\t\t\t\t\twidth="100%"\n\t\t\t\t\trequired="{dataField>isFieldRequired}"\n\t\t\t\t\tfieldHelp="{= ID.generate([\'MED_\', ${dataField>entitySet}, \'VHD\', ${vhProperty>@@Property.getRelativePropertyPath} ]) }"\n\t\t\t\t\tdisplay="{dataField>display}"\n\t\t\t\t\tvalue="{= ${property>relativePath} ? \'{path: \\\'\' + ${property>relativePath} + \'\\\', parameters: {$$noPatch: true} }\' : undefined }"\n\t\t\t\t\tadditionalValue="{= ${dataField>descriptionPath} ? \'{path: \\\'\' + ${dataField>descriptionPath} + \'\\\', parameters: {$$noPatch: true} }\' : undefined }"\n\t\t\t\t><mdc:layoutData><l:GridData\n\t\t\t\t\t\t\tspan="{= (!${dataField>unitProperty}) ? \'XL12 L12 M12 S12\' : ((${property>relativePath} === ${dataField>unitProperty}) ? \'XL4 L4 M4 S4\' : \'XL8 L8 M8 S8\') }"\n\t\t\t\t\t\t/></mdc:layoutData><control:MassEditSelect\n\t\t\t\t\t\tcore:require="{MassEditHandlers: \'sap/fe/core/controls/massEdit/MassEditHandlers\'}"\n\t\t\t\t\t\tid="{= ID.generate([\'MED_\', ${dataField>entitySet}, ${property>relativePath}]) }"\n\t\t\t\t\t\titems="{= \'{path : \\\'\' + ${property>runtimePath} + ${property>relativePath} + \'\\\'}\' }"\n\t\t\t\t\t\tchange="MassEditHandlers.handleSelectionChange($event)"\n\t\t\t\t\t\tselectedKey="{= \'{\' + ${property>runtimePath} + ${property>relativePath} + \'/selectedKey}\' }"\n\t\t\t\t\t\tselectValue="{= (${dataField>inputType} !== \'CheckBox\') && (\'{ parts : [{ path:\\\'\' + ${property>relativePath} + \'\\\'}, {value: \\\'\' + ${property>relativePath} + \'\\\' }, {value: \\\'\' + ID.generate([\'MED_\', ${dataField>entitySet}, ${property>relativePath}, \'_MDCField\']) + \'\\\' }], formatter: \\\'MassEditHandlers.contextPropertyChange\\\' }\') }"\n\t\t\t\t\t\twidth="100%"\n\t\t\t\t\t\tcustomData:fieldPath="{property>relativePath}"\n\t\t\t\t\t\tcustomData:propertyFullyQualifiedName="{property>propertyFullyQualifiedName}"\n\t\t\t\t\t><control:items><core:Item key="{fieldsInfo>key}" text="{fieldsInfo>text}" /></control:items><control:layoutData><l:GridData span="XL12 L12 M12 S12" /></control:layoutData></control:MassEditSelect><template:if test="{= ${dataField>inputType} !== \'CheckBox\' }"><mdc:dependents><macro:ValueHelp\n\t\t\t\t\t\t\t\tcontextPath="{contextPath>}"\n\t\t\t\t\t\t\t\tidPrefix="{= ID.generate([\'MED_\', ${dataField>entitySet}, \'VHD\' ]) }"\n\t\t\t\t\t\t\t\tproperty="{vhProperty>}"\n\t\t\t\t\t\t\t\tuseMultiValueField="true"\n\t\t\t\t\t\t\t/></mdc:dependents></template:if></mdc:Field></template:with></template:then><template:else><ComboBox\n\t\t\t\tid="{= ID.generate([\'MED_\', ${dataField>entitySet}, ${property>relativePath}]) }"\n\t\t\t\tcore:require="{MassEditHandlers: \'sap/fe/core/controls/massEdit/MassEditHandlers\'}"\n\t\t\t\titems="{= \'{path : \\\'\' + ${property>runtimePath} + ${property>relativePath} + \'\\\'}\' }"\n\t\t\t\tchange="MassEditHandlers.handleSelectionChange($event)"\n\t\t\t\tselectedKey="{= \'{\' + ${property>runtimePath} + ${property>relativePath} + \'/selectedKey}\' }"\n\t\t\t\tvisible="{= \'{\' + ${property>runtimePath} + ${property>relativePath} + \'/visible}\' }"\n\t\t\t\tcustomData:fieldPath="{property>relativePath}"\n\t\t\t\tcustomData:propertyFullyQualifiedName="{property>propertyFullyQualifiedName}"\n\t\t\t><items><core:Item key="{fieldsInfo>key}" text="{fieldsInfo>text}" /></items><layoutData><l:GridData\n\t\t\t\t\t\tspan="{= (!${dataField>unitProperty}) ? \'XL12 L12 M12 S12\' : ((${property>relativePath} === ${dataField>unitProperty}) ? \'XL4 L4 M4 S4\' : \'XL8 L8 M8 S8\') }"\n\t\t\t\t\t/></layoutData></ComboBox></template:else></template:if></core:FragmentDefinition>\n',
|
|
924
|
-
"sap/fe/core/fpm/manifest.json":'{"_version":"1.14.0","sap.app":{"id":"sap.fe.core.fpm","type":"component","applicationVersion":{"version":"1.114.
|
|
925
|
-
"sap/fe/core/manifest.json":'{"_version":"1.21.0","sap.app":{"id":"sap.fe.core","type":"library","embeds":["fpm"],"applicationVersion":{"version":"1.114.
|
|
924
|
+
"sap/fe/core/fpm/manifest.json":'{"_version":"1.14.0","sap.app":{"id":"sap.fe.core.fpm","type":"component","applicationVersion":{"version":"1.114.2"},"title":"Object Page","tags":{"keywords":["Object Page"]},"ach":"CA-UI5-FE","offline":false,"resources":"resources.json"},"sap.ui":{"technology":"UI5","deviceTypes":{"desktop":true,"tablet":true,"phone":true},"supportedThemes":["sap_fiori_3","sap_hcb","sap_bluecrystal","sap_belize","sap_belize_plus","sap_belize_hcw"]},"sap.ui5":{"config":{"sapFiori2Adaptation":{"style":true,"hierarchy":true}},"services":{"templatedViewService":{"factoryName":"sap.fe.core.services.TemplatedViewService","startup":"waitFor","settings":{"converterType":"None"}},"asyncComponentService":{"factoryName":"sap.fe.core.services.AsyncComponentService","startup":"waitFor"}},"handleValidation":true,"dependencies":{"minUI5Version":"${sap.ui5.core.version}","libs":{"sap.f":{},"sap.fe.macros":{},"sap.m":{},"sap.ui.core":{},"sap.ui.layout":{},"sap.ui.mdc":{},"sap.ui.fl":{}}},"contentDensities":{"compact":true,"cozy":true}}}',
|
|
925
|
+
"sap/fe/core/manifest.json":'{"_version":"1.21.0","sap.app":{"id":"sap.fe.core","type":"library","embeds":["fpm"],"applicationVersion":{"version":"1.114.2"},"title":"UI5 library: sap.fe.core","description":"UI5 library: sap.fe.core","ach":"CA-UI5-FE","resources":"resources.json","offline":true},"sap.ui":{"technology":"UI5","supportedThemes":[]},"sap.ui5":{"dependencies":{"libs":{"sap.ui.core":{},"sap.f":{},"sap.fe.navigation":{},"sap.fe.placeholder":{},"sap.m":{},"sap.ui.layout":{"lazy":true},"sap.ui.mdc":{},"sap.ui.fl":{}}},"library":{"i18n":{"bundleUrl":"messagebundle.properties","supportedLocales":["","ar","bg","ca","cs","cy","da","de","el","en","en-GB","en-US-sappsd","en-US-saprigi","en-US-saptrc","es","es-MX","et","fi","fr","fr-CA","hi","hr","hu","id","it","iw","ja","kk","ko","lt","lv","ms","nl","no","pl","pt","pt-PT","ro","ru","sh","sk","sl","sv","th","tr","uk","vi","zh-CN","zh-TW"]},"content":{"controls":[],"elements":[],"types":[],"interfaces":[]}}}}',
|
|
926
926
|
"sap/fe/core/rootView/Fcl.view.xml":'<mvc:View xmlns:mvc="sap.ui.core.mvc" xmlns="sap.f" displayBlock="true" height="100%" controllerName="sap.fe.core.rootView.Fcl"><FlexibleColumnLayout id="appContent" backgroundDesign="Transparent" restoreFocusOnBackNavigation="true" autoFocus="false" /></mvc:View>\n',
|
|
927
927
|
"sap/fe/core/rootView/NavContainer.view.xml":'<mvc:View xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" displayBlock="true" height="100%" controllerName="sap.fe.core.rootView.NavContainer"><NavContainer id="appContent" autoFocus="false" /></mvc:View>\n',
|
|
928
928
|
"sap/fe/core/services/view/TemplatingErrorPage.view.xml":'<mvc:View xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" controllerName="sap.fe.core.services.view.TemplatingErrorPage"><MessagePage\n\t\tshowHeader="false"\n\t\ticon="sap-icon://message-error"\n\t\ttext="{sap.fe.i18n>T_TEMPLATING_ERROR_PAGE_SAPFE_APPSTART_TEMPLATING_FAILED}"\n\t\tdescription="{= ${error>/message} ? ${error>/message} : \'\'}"\n\t/></mvc:View>\n'
|