@sapui5/sap.suite.ui.commons 1.120.28 → 1.120.29
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/suite/ui/commons/.library +1 -1
- package/src/sap/suite/ui/commons/AriaProperties.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilder.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderExpression.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderFunction.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderGroup.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderItem.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderValidationResult.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderVariable.js +1 -1
- package/src/sap/suite/ui/commons/CloudFilePicker.js +1 -1
- package/src/sap/suite/ui/commons/MicroProcessFlow.js +1 -1
- package/src/sap/suite/ui/commons/MicroProcessFlowItem.js +1 -1
- package/src/sap/suite/ui/commons/collaboration/flpplugins/msplugin/Component-preload.js +33 -0
- package/src/sap/suite/ui/commons/collaboration/flpplugins/msplugin/Component.js +1 -0
- package/src/sap/suite/ui/commons/collaboration/flpplugins/msplugin/manifest.json +26 -0
- package/src/sap/suite/ui/commons/flexibility/changeHandler/PropertyChangeMapper.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/CropCustomShapeHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/CropEllipseHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/CropRectangleHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/CustomSizeItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/FilterHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/FlipHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/HistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/ImageEditor.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/ImageEditorContainer.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/ImageEditorResponsiveContainer.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/ResizeHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/RotateHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/library.js +1 -1
- package/src/sap/suite/ui/commons/messagebundle_mk.properties +1 -1
- package/src/sap/suite/ui/commons/statusindicator/Circle.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/CustomShape.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/DiscreteThreshold.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/FillingOption.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/LibraryShape.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/Path.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/PropertyThreshold.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/Rectangle.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/Shape.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/ShapeGroup.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/SimpleShape.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/StatusIndicator.js +1 -1
- package/src/sap/suite/ui/commons/taccount/TAccount.js +1 -1
- package/src/sap/suite/ui/commons/taccount/TAccountGroup.js +1 -1
- package/src/sap/suite/ui/commons/taccount/TAccountItem.js +1 -1
- package/src/sap/suite/ui/commons/taccount/TAccountItemProperty.js +1 -1
- package/src/sap/suite/ui/commons/taccount/TAccountPanel.js +1 -1
package/package.json
CHANGED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
sap.ui.require.preload({
|
|
2
|
+
"sap/suite/ui/commons/collaboration/flpplugins/msplugin/Component.js": function() {
|
|
3
|
+
sap.ui.define(["sap/ui/core/Component","sap/base/Log","../../ServiceContainer"],function(n,a,i){var e=a.getLogger("sap.suite.ui.commons.collaboration.flpplugins.msplugin.Component");return n.extend("sap.suite.ui.commons.collaboration.flpplugins.msplugin.Component",{metadata:{manifest: "json",properties:{isShareAsLinkEnabled:{name:"isShareAsLinkEnabled",type:"string"},isShareAsTabEnabled:{name:"isShareAsTabEnabled",type:"string"},isShareAsCardEnabled:{name:"isShareAsCardEnabled",type:"string"},applicationId:{name:"applicationId",type:"string"},tenantId:{name:"tenantId",type:"string"},isDirectCommunicationEnabled:{name:"isDirectCommunicationEnabled",type:"string"}}},init:function(){var n=this._loadPluginConfigData();n?i.setCollaborationType("COLLABORATION_MSTEAMS",n):e.error("Collaboration configuration for Microsoft Teams Integration could not be loaded.")},_loadPluginConfigData:function(){var n=this.getComponentData();if(n)return n.config}})});
|
|
4
|
+
},
|
|
5
|
+
"sap/suite/ui/commons/collaboration/BaseHelperService.js": function () {
|
|
6
|
+
sap.ui.define(["sap/ui/base/Object"],function(e){e=e.extend("sap.suite.ui.commons.collaboration.BaseHelperService",{constructor:function(e){this._providerConfig=e}});return e.prototype.getProviderConfig=function(){return this._providerConfig},e.prototype.getOptions=function(e){return[]},e.prototype.share=function(e,t){},e.prototype.isContactsCollaborationSupported=function(){return!1},e.prototype.enableContactsCollaboration=async function(e,t){return Promise.resolve({})},e.prototype.getTeamsContactCollabOptions=async function(){return Promise.resolve({})},e.prototype.isFeatureFlagEnabled=function(){return!1},e})
|
|
7
|
+
},
|
|
8
|
+
"sap/suite/ui/commons/collaboration/CollaborationCardHelper.js": function () {
|
|
9
|
+
sap.ui.define(["sap/ui/base/Object","sap/base/Log"],function(e,t){var i=t.getLogger("sap.suite.ui.commons.collaboration.CollaborationCardHelper"),t=e.extend("sap.suite.ui.commons.collaboration.CollaborationCardHelper");return t.fetchCSRFToken=function(){return fetch("/sap/opu/odata4/sap/aps_ui_card_srv/srvd_a2x/sap/aps_ui_card/0001/",{method:"HEAD",headers:{"X-CSRF-Token":"Fetch"}}).then(function(e){var t=e.headers.get("X-CSRF-Token");if(e.ok&&t)return t})},t.postCard=function(o,n){return this.fetchCSRFToken().then(function(e){let t=JSON.stringify(n);try{t=btoa(JSON.stringify(n))}catch(e){i.error("Error while encoding the card content to base64 so original content passed to API: "+e)}var a=JSON.stringify({content:t,card_id:o});return fetch("/sap/opu/odata4/sap/aps_ui_card_srv/srvd_a2x/sap/aps_ui_card/0001/Card",{method:"POST",headers:{"X-CSRF-Token":e,"content-type":"application/json;odata.metadata=minimal;charset=utf-8"},body:a}).then(function(e){return e.json()})})},t})
|
|
10
|
+
},
|
|
11
|
+
"sap/suite/ui/commons/collaboration/CollaborationContactInfoHelper.js": function() {
|
|
12
|
+
sap.ui.define(["sap/ui/base/Object"],function(e){var a="GET",e=e.extend("sap.suite.ui.commons.collaboration.CollaborationContactInfoHelper");return e.fetchCSRFToken=function(){return fetch("/sap/opu/odata4/sap/aps_ui_contact_srv/srvd_a2x/sap/aps_ui_contact/0001/",{method:"HEAD",headers:{"X-CSRF-Token":"Fetch"}}).then(function(e){var t=e.headers.get("X-CSRF-Token");if(e.ok&&t)return t})},e.fetchContact=function(t){return this.fetchCSRFToken().then(function(e){return fetch("/sap/opu/odata4/sap/aps_ui_contact_srv/srvd_a2x/sap/aps_ui_contact/0001/APS_UI_C_CONTACT/"+t,{method:a,headers:{"X-CSRF-Token":e,"content-type":"application/json;odata.metadata=minimal;charset=utf-8"}}).then(function(e){return e.json()})})},e.fetchContactPicture=function(t){return this.fetchCSRFToken().then(function(e){return fetch("/sap/opu/odata4/sap/aps_ui_contact_srv/srvd_a2x/sap/aps_ui_contact/0001/APS_UI_C_CONTACT/"+t+"/photo",{method:a,headers:{"X-CSRF-Token":e}}).then(function(e){return e.blob()})})},e.fetchContactStatus=function(t){return this.fetchCSRFToken().then(function(e){return fetch("/sap/opu/odata4/sap/aps_ui_contact_srv/srvd_a2x/sap/aps_ui_contact/0001/APS_UI_C_PRESENCE?$filter=id eq '"+t+"'",{method:a,headers:{"X-CSRF-Token":e,"content-type":"application/json;odata.metadata=minimal;charset=utf-8"}}).then(function(e){return e.json()})})},e.fetchServiceStatus=function(){return this.fetchCSRFToken().then(function(e){return fetch("/sap/opu/odata4/sap/aps_ui_contact_srv/srvd_a2x/sap/aps_ui_contact/0001/APS_UI_C_CHECK_SERVICE",{method:a,headers:{"X-CSRF-Token":e,"content-type":"application/json;odata.metadata=minimal;charset=utf-8"}}).then(function(e){return e.json()})})},e})
|
|
13
|
+
},
|
|
14
|
+
"sap/suite/ui/commons/collaboration/CollaborationHelper.js": function() {
|
|
15
|
+
sap.ui.define(["sap/base/Log","sap/ui/base/Object","sap/ui/core/Element"],function(e,t,a){var r="sap-url-hash",o="&sap-ui-cardTitle",n="&sap-stageview-hash",i="&sap-ui-cardId",s="&sap-ui-xx-cardId",l="transient",c=e.getLogger("sap.suite.ui.commons.collaboration.CollaborationHelper"),e=t.extend("sap.suite.ui.commons.collaboration.CollaborationHelper");return e.compactHash=function(i){var e=sap.ui.require("sap/ushell/Container");return e?e&&e.getServiceAsync("AppState").then(async function(e){var t=e.createEmptyAppState(void 0,!1),a=this._getNextKey(t);if(!this._isEligibleForBackendPersistency(e))return c.warning("Transient flag is true. URL will not be shortened"),{url:i};var o=this._extractURLBeforeHash(i),n=await this._extractSemanticObjectAndAction(i),e=!1;try{e=await this._isMinificationFeasible(i)}catch(e){}return n&&e?this._storeUrl(i,t).then(function(){return{url:o+"#"+n+"&/"+r+"="+a}}).catch(function(e){return c.warning("URL is not shortened due to an error."+e.toString()),{url:i}}):{url:i}}.bind(this)):{url:i}},e._getCurrentUrl=function(){let e=sap.ui.require("sap/ushell/Container");return e?new Promise(function(t){e.getFLPUrlAsync(!0).then(function(e){t(e)})}):Promise.resolve(document.URL)},e.processAndExpandHash=function(){return this._hideAvatarFromShellbar(),this._getCurrentUrl().then(function(t){var e;return-1<t.indexOf(r)?(e=t.split(r)[1].split("=")[1],0<t.indexOf(n)?e=e.split(n)[0]:0<t.indexOf(i)||0<t.indexOf(s)?e=(0<t.indexOf(i)?e.split(i):e.split(s))[0]:0<t.indexOf(o)&&(e=e.split(o)[0]),this._retrieveURL(e).then(function(e){return e.getData()?window.location.replace(e.getData()):(e=t.split(r)[0],window.location.replace(e)),Promise.resolve()})):(-1<t.indexOf(i)?(e=t.split(i)[0],window.location.replace(e)):-1<t.indexOf(o)&&(e=t.split(o)[0],window.location.replace(e)),Promise.resolve())}.bind(this))},e._hideAvatarFromShellbar=function(){this.isTeamsModeActive().then(function(e){e&&(e=a.getElementById("userActionsMenuHeaderButton"))&&e.setVisible(!1)})},e.isTeamsModeActive=function(){var o=!1,e=sap.ui.require("sap/ushell/Container");return e?e.getServiceAsync("URLParsing").then(function(a){return this._getCurrentUrl().then(function(e){var t,e=e.split("#")[0];return-1!==e.indexOf("?")?((e=a&&a.parseParameters(e.substring(e.indexOf("?"))))&&e["sap-collaboration-teams"]&&e["sap-collaboration-teams"][0]&&"true"===e["sap-collaboration-teams"][0]&&(o=!0),t=!1,e&&e["sap-ushell-config"]&&e["sap-ushell-config"][0]&&"lean"===e["sap-ushell-config"][0]&&(t=!0),Promise.resolve(o&&t)):Promise.resolve(!1)})}.bind(this)):Promise.resolve(!1)},e._retrieveURL=function(t){var e=sap.ui.require("sap/ushell/Container");return e&&e.getServiceAsync("AppState").then(function(e){return e.getAppState(t)})},e._isEligibleForBackendPersistency=function(e){return e&&e._oConfig&&l in e._oConfig&&!e._oConfig[l]},e._getNextKey=function(e){return e.getKey()},e._extractSemanticObjectAndAction=function(t){var e=sap.ui.require("sap/ushell/Container");return e&&e.getServiceAsync("URLParsing").then(function(e){e=e.parseShellHash(this._extractURLHash(t));if(e)return Promise.resolve(e.contextRaw?e.semanticObject+"-"+e.action+"~"+e.contextRaw:e.semanticObject+"-"+e.action)}.bind(this))},e._isMinificationFeasible=async function(e){var t,a=sap.ui.require("sap/ushell/Container");return a?(t=await a.getServiceAsync("NavTargetResolution"),a=(await a.getServiceAsync("URLParsing")).parseShellHash(this._extractURLHash(e)),0<Object.keys(a.params).length?t.resolveHashFragment(`#${a.semanticObject}-`+a.action).then(function(e){return!0}).catch(function(e){return!1}):Promise.resolve(!0)):Promise.resolve(!1)},e._extractURLBeforeHash=function(e){return e.split("#")[0]},e._extractURLHash=function(e){return e.substring(e.indexOf("#"))},e._storeUrl=function(e,t){return t.setData(e),t.save()},e})
|
|
16
|
+
},
|
|
17
|
+
"sap/suite/ui/commons/collaboration/CollaborationManagerService.js": function() {
|
|
18
|
+
sap.ui.define(["sap/base/Log","sap/ui/core/Core","./BaseHelperService","sap/ui/Device","sap/ui/core/Lib","sap/suite/ui/commons/collaboration/channels/MessageChannel"],function(e,t,a,o,n,i){var a=a.extend("sap.suite.ui.commons.collaboration.CollaborationManagerService"),r=n.getResourceBundleFor("sap.suite.ui.commons"),s=e.getLogger("sap.suite.ui.commons.collaboration.CollaborationManagerService");return a.prototype.triggerH2HChat=function(e,t,a){this.publishData({sAppTitle:e,sCurrentURL:t,sEmailId:a})},a.prototype.getOptions=function(){var e=window["sap-ushell-config"]&&window["sap-ushell-config"].bootstrapPlugins&&window["sap-ushell-config"].bootstrapPlugins.H2H_CHAT_PLUGIN;if(o.system.desktop){if(e)return{text:r.getText("COLLABORATION_MANGER"),icon:"sap-icon://BusinessSuiteInAppSymbols/icon-collaboration-manager",press:this.triggerH2HChat.bind(this),fesrStepName:"CM:ShareLink"};s.info("Consumer disable Collaboration Manager option")}else s.info("Collaboration Manager is not supported in Phone and Tablet");return null},a.prototype.publishData=async function(e){try{(await i.getInstance()).postMessage(e)}catch(e){s.error("Failed to publish data:",e)}},a})
|
|
19
|
+
},
|
|
20
|
+
"sap/suite/ui/commons/collaboration/ContactHelper.js": function() {
|
|
21
|
+
sap.ui.define(["sap/ui/core/mvc/Controller","sap/ui/core/Fragment","sap/ui/model/json/JSONModel","sap/m/library","sap/ui/core/Lib","sap/ui/core/Core","sap/ui/model/resource/ResourceModel","./CollaborationContactInfoHelper","sap/ui/performance/trace/FESRHelper","sap/ui/core/Element"],function(e,i,r,o,t,a,n,s,l,c){var p=t.getResourceBundleFor("sap.suite.ui.commons");return e.extend("sap.suite.ui.commons.collaboration.ContactHelper",{constructor:function(){},getFullProfileByEmail:async function(e){e=await s.fetchContact(e);return e&&""===e.mail||(e&&""!=e.data&&(e.photo="data:image/png;base64,"+e.data),e=this.determineContactStatus(e)),e},getTeamsContactOptions:function(){var t=this;return Promise.resolve([{key:"chat",icon:"sap-icon://discussion",tooltip:p.getText("CHAT_BUTTON_TOOLTIP"),fesrStepName:"MST:ContactAction",callBackHandler:function(e){t.handleMSTeamsPress(e)}},{key:"call",icon:"sap-icon://call",tooltip:p.getText("CALL_BUTTON_TOOLTIP"),fesrStepName:"MST:ContactAction",callBackHandler:function(e){t.handleMSTeamsPress(e)}},{key:"videoCall",icon:"sap-icon://video",tooltip:p.getText("VIDEOCALL_BUTTON_TOOLTIP"),fesrStepName:"MST:ContactAction",callBackHandler:function(e){t.handleMSTeamsPress(e)}}])},getTeamsContactStatus:async function(e){e=await s.fetchContact(e);return[{key:"profileStatus",badgeIcon:(e=this.determineContactStatus(e)).badgeIcon,badgeValueState:e.badgeValueState,badgeTooltip:e.badgeTooltip,fesrStepName:"MST:ContactAction"}]},handleMSTeamsPress:function(e){var t=e.getSource().data("email"),a="";switch(e.getSource().data("type")){case"chat":a="https://teams.microsoft.com/l/chat/0/0?users="+t;break;case"call":a="https://teams.microsoft.com/l/call/0/0?users="+t;break;case"videoCall":a="https://teams.microsoft.com/l/call/0/0?users="+t+"&withVideo=true"}o.URLHelper.redirect(a,!0)},formatUri:function(e,t){return/^\w+[\w-+\.]*\@\w+([-\.]\w+)*\.[a-zA-Z]{2,}$/.test(e)?"mailto:"+e+(t&&t.subject?"?subject="+t.subject:"")+(t&&t.body?"&body="+t.body:""):"tel:"+e},loadContactPopover:function(a,o,n){return this.afterClose(),i.load({name:"sap.suite.ui.commons.collaboration.ContactPopover",controller:this,type:"XML"}).then(function(e){l.setSemanticStepname(e,"afterClose","MST:ContactDetails"),this._oContactPopover=e,this.sEmail=a,this.oParams=o,e.setBusy(!0);var t={setFamily:"tnt",setURI:sap.ui.require.toUrl("sap/tnt/themes/base/illustrations")},t=(sap.m.IllustrationPool.registerIllustrationSet(t,!1),new r({isUserExistsInTeams:!0}));return this._oContactPopover.setModel(t,"userData"),this.isDirectCommunicationEnabled=n,this._oContactPopover.setModel(new sap.ui.model.resource.ResourceModel({bundle:p}),"i18n"),e}.bind(this))},loadMinimalContactPopover:function(e,t){this.afterClose();var a=new r({mail:e,params:t});return i.load({name:"sap.suite.ui.commons.collaboration.MinimalContactPopover",controller:this,type:"XML"}).then(function(e){return this._oMinContactPopover=e,l.setSemanticStepname(e,"afterClose","MST:ContactDetails"),e.setModel(a,"userData"),e.setModel(new sap.ui.model.resource.ResourceModel({bundle:p}),"i18n"),e}.bind(this))},afterClose:function(){this._oContactPopover&&this._oContactPopover.destroy(),this._oMinContactPopover&&this._oMinContactPopover.destroy()},afterOpen:function(){var a=this;this.getFullProfileByEmail(this.sEmail).then(function(e){a._oContactPopover.setBusy(!1),e&&""===e.mail?(e.isUserExistsInTeams=!1,e.mail=a.sEmail,e.params=a.oParams,a._oContactPopover.setInitialFocus(c.getElementById("mail"))):(e.isUserExistsInTeams=!0,e.isDirectCommunicationEnabled=!!a.isDirectCommunicationEnabled,a._oContactPopover.setInitialFocus(c.getElementById("avatar")));var t=new r(e);t.setData(e),a._oContactPopover.setModel(t,"userData"),l.setSemanticStepname(a._oContactPopover,"afterClose","MST:ContactDetails")})},afterContinue:function(){var e=this.formatUri(this.sEmail,this.oParams);o.URLHelper.redirect(e,!0)},determineContactStatus:function(e){var t=new Map([["OOO",{badgeValueState:"Information",badgeIcon:"sap-icon://offsite-work"}],["BUSYOOO",{badgeValueState:"Error",badgeIcon:"sap-icon://circle-task"}],["ONLINEOOO",{badgeValueState:"Success",badgeIcon:"sap-icon://sys-enter"}],["AVAILABLE",{badgeValueState:"Success",badgeIcon:"sap-icon://sys-enter-2"}],["AWAY",{badgeValueState:"Warning",badgeIcon:"sap-icon://pending"}],["BUSY",{badgeValueState:"Error",badgeIcon:"sap-icon://circle-task-2"}],["PRESENTING",{badgeValueState:"Error",badgeIcon:"sap-icon://sys-minus"}],["OFFLINE",{badgeValueState:"Error",badgeIcon:"sap-icon://message-error"}]]),a=new Map([["Available","AVAILABLE"],["Away","AWAY"],["Inactive","AWAY"],["Busy","BUSY"],["DoNotDisturb","PRESENTING"],["InACall","BUSY"],["InAMeeting","BUSY"],["Presenting","PRESENTING"],["BeRightBack","AWAY"],["OffWork","OFFLINE"]]);let o={};return e.isoutofoffice?"Available"===e.activity?(o=t.get("ONLINEOOO")).badgeTooltip=p.getText("AVAILABLE")+", "+p.getText("OOO"):"Busy"===e.activity?(o=t.get("BUSYOOO")).badgeTooltip=p.getText("BUSY")+", "+p.getText("OOO"):"DoNotDisturb"===e.activity?(o=t.get("PRESENTING")).badgeTooltip=p.getText("DONOTDISTURB")+", "+p.getText("OOO"):(o=t.get("OOO")).badgeTooltip=p.getText("OOO"):(a=e.activity?a.get(e.activity):"OFFLINE",(o=t.get(a)).badgeTooltip=p.getText(e.activity.toUpperCase())),Object.assign(e,o),e}})})
|
|
22
|
+
},
|
|
23
|
+
"sap/suite/ui/commons/collaboration/ServiceContainer.js": function() {
|
|
24
|
+
sap.ui.define(["sap/base/Log","./BaseHelperService","./TeamsHelperService","./CollaborationManagerService","../windowmessages/CollaborationMessageBroker","../windowmessages/CollaborationMessageConsumer"],function(e,o,n,t,a,i){var r,s,l=e.getLogger("sap.suite.ui.commons.collaboration.ServiceContainer");function c(){var e,t,a;return r?(t=r.sProvider,a=r.oProviderConfig,"COLLABORATION_MSTEAMS"===t&&(e=new n(a)),s=Promise.resolve(e)):(e=new o({}),l.info("Collaboration provider is not activated on the tenant"),Promise.resolve(e))}var p=new function(){};return p.getServiceAsync=async function(){var e=sap.ui.require("sap/ushell/Container");return s||(e&&e.inAppRuntime()&&(r=await i.getProviderConfiguration()),c())},p.getCollaborationServices=async function(){var e={oTeamsHelperService:await p.getServiceAsync(),oCMHelperService:new t};return Promise.resolve(e)},p.setCollaborationType=function(e,t){l.info("Collaboration properties are now configured"),r={sProvider:e,oProviderConfig:t},c(),a.startInstance(r)},p},!0)
|
|
25
|
+
},
|
|
26
|
+
"sap/suite/ui/commons/collaboration/TeamsHelperService.js": function() {
|
|
27
|
+
sap.ui.define(["sap/base/Log","sap/ui/core/Core","sap/base/security/URLListValidator","./CollaborationHelper","./BaseHelperService","sap/ui/core/Element","./ContactHelper","sap/ui/Device","./CollaborationCardHelper","sap/ui/core/Fragment","sap/m/MessageBox","sap/ui/core/Lib","sap/m/Popover","sap/m/HBox","sap/m/VBox","sap/m/MessageStrip","sap/m/Button","./CollaborationContactInfoHelper","sap/m/library","sap/m/FlexBox","sap/base/i18n/Localization","./CollaborationManagerService","sap/m/FlexItemData"],function(e,t,a,i,o,n,r,s,l,c,p,u,d,h,m,C,f,g,b,S,T,A,v){var _,o=o.extend("sap.suite.ui.commons.collaboration.TeamsHelperService",{constructor:function(e){this._providerConfig=e,this._providerConfig.shareAsLinkUrl="https://teams.microsoft.com/share",this._getShareAsTabUrl().then(function(e){this._providerConfig.shareAsTabUrl=e}.bind(this))}}),O="db5b69c6-0430-4ae1-8d6e-a65c2220b50c",y=e.getLogger("sap.suite.ui.commons.collaboration.TeamsHelperService"),L=u.getResourceBundleFor("sap.suite.ui.commons");let E;var P={},I="width=720,height=720";return o.prototype.getOptions=function(e){P={isShareAsLinkEnabled:!e||void 0===e.isShareAsLinkEnabled||e.isShareAsLinkEnabled,isShareAsTabEnabled:!e||void 0===e.isShareAsTabEnabled||e.isShareAsTabEnabled,isShareAsCardEnabled:!(!e||void 0===e.isShareAsCardEnabled)&&e.isShareAsCardEnabled};var t=[],e=[];if(s.system.desktop?P.isShareAsLinkEnabled?"X"===this._providerConfig.isShareAsLinkEnabled?t.push({text:L.getText("COLLABORATION_MSTEAMS_CHAT"),key:"COLLABORATION_MSTEAMS_CHAT",icon:"sap-icon://post",fesrStepName:"MST:ShareAsLink"}):y.info("Share as Chat option is not enabled in the tenant"):y.info("Consumer disable Share as Chat option"):y.info("Share as Chat option is not supported in Phone and Tablet"),s.system.desktop?P.isShareAsTabEnabled?"X"===this._providerConfig.isShareAsTabEnabled?t.push({text:L.getText("COLLABORATION_MSTEAMS_TAB"),key:"COLLABORATION_MSTEAMS_TAB",icon:"sap-icon://image-viewer",fesrStepName:"MST:ShareAsTab"}):y.info("Share as Tab option is not enabled in the tenant"):y.info("Consumer disable Share as Tab option"):y.info("Share as Tab option is not supported in Phone and Tablet"),s.system.desktop)if(P.isShareAsCardEnabled){var a=this._providerConfig.isShareAsCardEnabled,o="X"===this._providerConfig.isShareAsTabEnabled,n={text:L.getText("COLLABORATION_MSTEAMS_CARD"),key:"COLLABORATION_MSTEAMS_CARD",icon:"sap-icon://ui-notifications",fesrStepName:"MST:ShareAsCard"};switch(a){case"DISABLED":y.info("Share as Card option is not enabled in the tenant");break;case"ENABLED":case"AUTHENABLE":t.push(n);break;case"":case void 0:o?t.push(n):y.info("Share as Card option is not enabled in the tenant");break;default:y.info("Share as Card option is not enabled in the tenant")}}else y.info("Consumer disable Share as Card option");else y.info("Share as Card option is not supported in Phone and Tablet");return 1===t.length?"COLLABORATION_MSTEAMS_CHAT"===(e=t)[0].key?e[0].text=L.getText("COLLABORATION_MSTEAMS_CHAT_SINGLE"):"COLLABORATION_MSTEAMS_TAB"===e[0].key?e[0].text=L.getText("COLLABORATION_MSTEAMS_TAB_SINGLE"):"COLLABORATION_MSTEAMS_CARD"===e[0].key&&(e[0].text=L.getText("COLLABORATION_MSTEAMS_CARD_SINGLE")):1<t.length&&e.push({type:"microsoft",text:L.getText("COLLABORATION_MSTEAMS_SHARE"),icon:"sap-icon://collaborate",subOptions:t}),e},o.prototype.share=function(e,t){t.url?a.validate(t.url)?"COLLABORATION_MSTEAMS_CHAT"===e.key?this._shareAsChat(t):"COLLABORATION_MSTEAMS_TAB"===e.key?this._shareAsTab(t):"COLLABORATION_MSTEAMS_CARD"===e.key&&this._shareAsCard(t):y.error("Invalid URL supplied"):y.error("url is not supplied in object so terminating Click")},o.prototype._shareAsChat=function(t){var a=window.open("","_blank",I),o=t.appTitle;0<t.subTitle.length&&(o+=": "+t.subTitle),a.opener=null,t.minifyUrlForChat?i.compactHash(t.url,[]).then(async function(e){e=await this._modifyUrlForNavigationContext(t.url,e.url);a.location=this._providerConfig.shareAsLinkUrl+"?msgText="+encodeURIComponent(o)+"&preview=false&href="+encodeURIComponent(e)}.bind(this)):a.location=this._providerConfig.shareAsLinkUrl+"?msgText="+encodeURIComponent(o)+"&preview=false&href="+encodeURIComponent(t.url)},o.prototype._modifyUrlForShareAsTab=async function(e){var t,a,o,n=e.indexOf("#");return-1!==n&&(o="sap-ushell-config=lean&sap-collaboration-teams=true",-1!==(a=(t=e.substring(0,n)).indexOf("?",0))?t=t.substring(0,a+1)+o+"&"+t.substring(a+1):t+="?"+o,e=t+e.substring(n),e=await this._addNavmodeInUrl(e,"explace")),e},o.prototype._shareAsTab=async function(e){var t=await this._modifyUrlForShareAsTab(e.url),a={subEntityId:{url:t,appTitle:e.appTitle,subTitle:e.subTitle,mode:"tab"}};e.minifyUrlForChat?i.compactHash(t,[]).then(async function(e){e=await this._modifyUrlForNavigationContext(t,e.url),a.subEntityId.url=await this._addNavmodeInUrl(e,"explace"),e=this._providerConfig.shareAsTabUrl+"?&context="+encodeURIComponent(JSON.stringify(a));sap.m.URLHelper.redirect(e,!0)}.bind(this)):(e=this._providerConfig.shareAsTabUrl+"?&context="+encodeURIComponent(JSON.stringify(a)),sap.m.URLHelper.redirect(e,!0))},o.prototype._addNavmodeInUrl=function(n,i){var e=sap.ui.require("sap/ushell/Container");return e&&e.getServiceAsync("URLParsing").then(function(e){var t=(o=n).indexOf("#"),a=e.parseShellHash(o.substring(t)),e=(a.params["sap-ushell-navmode"]=i,a.params["sap-ushell-next-navmode"]=i,e.constructShellHash(a)),o=o.substring(0,t)+"#"+e;return Promise.resolve(o)})},o.prototype._modifyUrlForNavigationContext=function(o,n){var e;return o===n?Promise.resolve(n):(e=sap.ui.require("sap/ushell/Container"))&&e.getServiceAsync("URLParsing").then(function(e){var t=o,a=t.indexOf("#"),e=e.parseShellHash(t.substring(a)),t=Object.keys(e.params).length,a=new URL(n);return 0<t&&(a.searchParams.has("sap-collaboration-teams")?a.searchParams.delete("sap-collaboration-teams"):a.searchParams.set("sap-collaboration-teams","true")),Promise.resolve(a.toString())})},o.prototype._shareAsCard=function(n){n.cardId&&0<n.cardId.length&&n.cardManifest&&this.isFeatureFlagEnabled()?(n.cardManifest.rtl=T.getRTL(),c.load({name:"sap.suite.ui.commons.collaboration.CollaborationBusyDialog",controller:this,type:"XML"}).then(function(e){(_=e).open(),E=setTimeout(function(){_.close(),_.destroy()},6e4),l.postCard(n.cardId,n.cardManifest).then(function(e){var t=!0,a={cardId:e.card_id,version:e.version};if(e.error)if("APS_UI_MSG/001"===e.error.code){if(t=!0,a.cardId=n.cardId,0<e.error.message.length)try{var o=JSON.parse(atob(e.error.message)).version;a.version=o}catch(e){t=!1}}else t=!1;t?this._updateUrl(n,a):(p.error(L.getText("SAVE_CARD_ERROR")),this._closeBusyDailog())}.bind(this))}.bind(this))):this._updateUrl(n,{})},o.prototype._updateUrl=async function(o,n){var e,t;o.minifyUrlForChat?i.compactHash(o.url,[]).then(async function(e){var t,a,e=await this._modifyUrlForNavigationContext(o.url,e.url);P.isShareAsTabEnabled&&this._providerConfig.isShareAsTabEnabled&&(t=await this._modifyUrlForShareAsTab(o.url),(a=(await i.compactHash(t,[])).url.split("sap-url-hash=")[1])?e+="&sap-stageview-hash="+a:(t=await this._modifyUrlForShareAsTab(e),e=await this._addNavmodeInUrl(t,"inplace"))),this._closeBusyDialogAndOpenTeamsDialog(e,o,n)}.bind(this)):(t=o.url,P.isShareAsTabEnabled&&this._providerConfig.isShareAsTabEnabled&&(e=await this._modifyUrlForShareAsTab(t),t=await this._addNavmodeInUrl(e,"inplace")),this._closeBusyDialogAndOpenTeamsDialog(t,o,n))},o.prototype._closeBusyDailog=function(){_&&(_.close(),_.destroy(),clearTimeout(E))},o.prototype._closeBusyDialogAndOpenTeamsDialog=function(e,t,a){this._closeBusyDailog();var o=window.open("","_blank",I);o.opener=null,o.location=this._addCardParamsInUrl(e,t.appTitle,a)},o.prototype._addCardParamsInUrl=function(e,t,a){return a.cardId&&(e=e+"&sap-ui-cardId="+a.cardId),e=(e=a.version?e+"&sap-ui-cardVersion="+a.version:e)+"&sap-ui-cardTitle="+encodeURIComponent(t),e=this._providerConfig.shareAsLinkUrl+"?href="+encodeURIComponent(e)},o.prototype._getShareAsTabUrl=function(){return this._getApplicationID().then(function(e){return"https://teams.microsoft.com/l/entity/"+e+"/tab"})},o.prototype._getApplicationID=function(){var e=sap.ui.require("sap/ushell/Container");return e&&e.getServiceAsync("URLParsing").then(function(t){return i._getCurrentUrl().then(function(e){var e=e.split("#")[0];return-1!==e.indexOf("?")&&(e=t&&t.parseParameters(e.substring(e.indexOf("?"))))&&e["sap-collaboration-xx-TeamsAppId"]&&e["sap-collaboration-xx-TeamsAppId"][0]&&0<e["sap-collaboration-xx-TeamsAppId"][0].length?Promise.resolve(e["sap-collaboration-xx-TeamsAppId"][0]):Promise.resolve(O)})})},o.prototype.isFeatureFlagEnabled=function(){return"AUTHENABLE"===this._providerConfig.isShareAsCardEnabled},o.prototype.isContactsCollaborationSupported=function(){return!0},o.prototype.enableContactsCollaboration=async function(e,t){var a=await i.isTeamsModeActive(),o=await g.fetchServiceStatus();return e&&o.value&&"Active"===o.value[0].FetchContacts?(this.oContactHelper||(this.oContactHelper=new r),"ENABLED"===this._providerConfig.isDirectCommunicationEnabled?this.oContactHelper.loadContactPopover(e,t,!0):this.oContactHelper.loadContactPopover(e,t)):a||!e||"ENABLED"!==this._providerConfig.isDirectCommunicationEnabled?Promise.reject():(this.oContactHelper||(this.oContactHelper=new r),this.oContactHelper.loadMinimalContactPopover(e,t))},o.prototype.getTeamsContactCollabOptions=async function(){return await i.isTeamsModeActive()||"ENABLED"!==this._providerConfig.isDirectCommunicationEnabled?Promise.reject():(this.oContactHelper||(this.oContactHelper=new r),this.oContactHelper.getTeamsContactOptions())},o.prototype.getTeamsContactStatus=async function(e){return await i.isTeamsModeActive()?Promise.reject():(this.oContactHelper||(this.oContactHelper=new r),this.oContactHelper.getTeamsContactStatus(e))},o.prototype.getCollaborationPopover=function(e,t,a,o,n){var i;void 0===t.data||""===t.data.trim()?y.error("Popover cannnot be opened without data"):(e=!e||void 0===e.isShareAsLinkEnabled||e.isShareAsLinkEnabled,n={shareToTeams:!n||void 0===n.shareToTeams||n.shareToTeams,shareToEmail:!n||void 0===n.shareToEmail||n.shareToEmail,shareToCM:!(!n||void 0===n.shareToCM)&&n.shareToCM},i=[],s.system.desktop?e?"X"===this._providerConfig.isShareAsLinkEnabled&&n.shareToTeams?i.push({text:L.getText("COLLABORATION_POPOVER_TEAMS"),icon:"sap-icon://discussion",key:"COLLABORATION_POPOVER_TEAMS"}):y.info("Share as Chat option is not enabled in the tenant"):y.info("Consumer disable Share as Chat option"):y.info("Share as Chat option is not supported in Phone and Tablet"),n.shareToEmail&&i.push({text:L.getText("COLLABORATION_POPOVER_MAIL"),icon:"sap-icon://email",key:"COLLABORATION_POPOVER_MAIL"}),this.oCollaborationManager=new A,(e=this.oCollaborationManager.getOptions())&&n.shareToCM&&i.push({text:e.text,icon:e.icon,key:"COLLABORATION_POPOVER_CM"}),1!==i.length||o||"COLLABORATION_POPOVER_MAIL"!==i[0].key?this._getPopover(t,i,o).openBy(a):this._shareData(t,i[0],o))},o.prototype._getPopover=function(e,t,a){return new d({showHeader:!1,placement:e.placement||"Auto",enableScrolling:!1,content:this._getPopoverContent(e,t,a)})},o.prototype._getPopoverContent=function(a,o,n){var e,i=new S({items:[],direction:b.FlexDirection.Column}),r=new S({direction:"Vertical"===a.sFormat?b.FlexDirection.Column:b.FlexDirection.Row,justifyContent:b.FlexJustifyContent.SpaceAround,items:[]});return o.forEach(t=>{var e=new f({text:t.text,icon:t.icon,width:"Horizontal"===a.sFormat&&3===o.length?"120px":"180px",press:e=>{e.getSource().getParent().getParent().getParent().close(),this._shareData(a,t,n)}}).addStyleClass("sapUiTinyMarginTop").addStyleClass("sapUiTinyMarginBegin");"COLLABORATION_POPOVER_TEAMS"===t.key?e.addStyleClass("sapSuiteUiCollaborationBarMSTeamsButton"+(a.sFormat||"Horizontal")):"COLLABORATION_POPOVER_CM"===t.key?e.addStyleClass("sapSuiteUiCollaborationBarCMButton"+(a.sFormat||"Horizontal")):e.addStyleClass("sapSuiteUiCollaborationBarEmailButton"+(a.sFormat||"Horizontal")),r.addItem(e),i.addItem(r)}),n&&(e=new S({justifyContent:"Vertical"===a.sFormat?b.FlexJustifyContent.Center:b.FlexJustifyContent.SpaceBetween,alignItems:b.FlexAlignItems.Center,items:[new f({text:L.getText("COLLABORATION_POPOVER_COPYURL_BUTTON"),width:"Vertical"===a.sFormat?"150px":"",press:async()=>{await this._writeToClipBoard(a.data)}}).addStyleClass("sapUiTinyMarginBeginEnd")]}),"Horizontal"!==a.sFormat&&void 0!==a.sFormat||(e.insertItem(new C({text:L.getText("COLLABORATION_POPOVER_MSGSTRIP"),showIcon:!0}).addStyleClass("sapUiTinyMarginBeginEnd").addStyleClass("sapSuiteCollaborationBarMsgStrip"),0),e.addStyleClass("sapSuiteUiCollaborationBarMsgStripHBox")),e.addStyleClass("sapUiTinyMarginBeginEnd").addStyleClass("sapUiTinyMarginTopBottom"),i.addItem(e)),("Vertical"===a.sFormat?(r.setHeight(1<o.length?50*o.length+50+"px":"80px"),r.addStyleClass("sapUiSmallMarginBottom")):(r.setHeight("110px"),r)).addStyleClass("sapUiTinyMarginEnd"),i},o.prototype._writeToClipBoard=async function(e){try{await navigator.clipboard.writeText(e)}catch(e){y.info(e)}},o.prototype._shareData=function(e,t,a){var o;"COLLABORATION_POPOVER_TEAMS"===t.key?a?(o={url:e.data,appTitle:e.title||"",subTitle:"",minifyUrlForChat:!0},this._shareAsChat(o)):(o={appTitle:e.title||"",message:e.data,showPreview:e.showPreview},this._shareSummary(o)):"COLLABORATION_POPOVER_MAIL"===t.key?sap.m.URLHelper.triggerEmail(null,e.title&&""!==e.title.trim()?e.title:null,e.data):"COLLABORATION_POPOVER_CM"===t.key&&this.oCollaborationManager.triggerH2HChat(e.title,e.data)},o.prototype._shareSummary=function(e){e={subEntityId:{appTitle:e.appTitle,mode:"summary",message:e.message,showPreview:e.showPreview}},e=this._providerConfig.shareAsTabUrl+"?&context="+encodeURIComponent(JSON.stringify(e));sap.m.URLHelper.redirect(e,!0)},o});
|
|
28
|
+
},
|
|
29
|
+
"sap/suite/ui/commons/collaboration/channels/MessageChannel.js": function() {
|
|
30
|
+
sap.ui.define(["sap/ui/base/Object"],function(e){var n,s=e.extend("sap.suite.ui.commons.collaboration.channels.MessageChannel",{postMessage:function(e,n){window.parent.postMessage({...e,_fromMessageChannel:!0},n||"*")},subscribe:function(n){window.addEventListener("message",function(e){e?.data?._fromMessageChannel&&"function"==typeof n&&n(e)})}});return{getInstance:function(){return n=n||new s,Promise.resolve(n)}}});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
});
|
|
@@ -27,6 +27,7 @@ sap.ui.define(
|
|
|
27
27
|
*/
|
|
28
28
|
return Component.extend("sap.suite.ui.commons.collaboration.flpplugins.msplugin.Component", {
|
|
29
29
|
metadata: {
|
|
30
|
+
manifest: "json",
|
|
30
31
|
properties: {
|
|
31
32
|
/**
|
|
32
33
|
* Specifies the collaboration using Microsoft Teams as Link is configured or not.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_version": "1.68.0",
|
|
3
|
+
"sap.app": {
|
|
4
|
+
"id": "sap.suite.ui.commons.collaboration.flpplugins.msplugin",
|
|
5
|
+
"type": "component",
|
|
6
|
+
"title": "",
|
|
7
|
+
"description": "",
|
|
8
|
+
"applicationVersion": {
|
|
9
|
+
"version": "1.108"
|
|
10
|
+
},
|
|
11
|
+
"ach": "CA-FLP-EXT-COL"
|
|
12
|
+
},
|
|
13
|
+
"sap.ui": {
|
|
14
|
+
"technology": "UI5",
|
|
15
|
+
"deviceTypes": {
|
|
16
|
+
"desktop": true,
|
|
17
|
+
"tablet": true,
|
|
18
|
+
"phone": true
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"sap.ui5": {
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"minUI5Version": "1.108"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -396,7 +396,7 @@ IMGEDITOR_FILTER_SEPIA=Sepia
|
|
|
396
396
|
IMGEDITOR_FILTER_GRAYSCALE=\u0421\u043A\u0430\u043B\u0430 \u0441\u043E \u0441\u0438\u0432\u0438 \u0442\u043E\u043D\u043E\u0432\u0438
|
|
397
397
|
IMGEDITOR_FILTER_SATURATION=\u0417\u0430\u0441\u0438\u0442\u0435\u043D\u043E\u0441\u0442
|
|
398
398
|
IMGEDITOR_FILTER_HUE=\u041D\u0438\u0458\u0430\u043D\u0441\u0430
|
|
399
|
-
IMGEDITOR_FILTER_INVERT=\
|
|
399
|
+
IMGEDITOR_FILTER_INVERT=\u0418\u043D\u0432\u0435\u0440\u0437\u0438\u0458\u0430
|
|
400
400
|
IMGEDITOR_FILTER_BRIGHTNESS=\u0421\u0432\u0435\u0442\u043B\u0438\u043D\u0430
|
|
401
401
|
IMGEDITOR_FILTER_CONTRAST=\u041A\u043E\u043D\u0442\u0440\u0430\u0441\u0442
|
|
402
402
|
IMGEDITOR_FILTER_BLUR=\u0417\u0430\u043C\u0430\u0442\u0435\u043D\u043E
|