text: /*!
   * SAP UI development toolkit for HTML5 (SAPUI5)
  
  (c) Copyright 2009-2017 SAP SE. All rights reserved
   */
  sap.ui.define(['sap/collaboration/components/utils/CommonUtil','sap/collaboration/library','sap/ui/core/UIComponent','sap/ui/core/mvc/View','sap/ui/core/library','jquery.sap.global'],function(C,l,U,V,c,q){"use strict";var a=c.mvc.ViewType;var b=U.extend("sap.collaboration.components.fiori.sharing.Component",{metadata:{includes:["../../resources/css/Sharing.css"],properties:{width:{type:"sap.ui.core.CSSSize",defaultValue:"100%"},height:{type:"sap.ui.core.CSSSize",defaultValue:"100%"},oDataServiceUrl:{type:"sap.ui.core.URI",defaultValue:"/sap/opu/odata/sap/SM_INTEGRATION_V2_SRV"},collaborationHostODataServiceUrl:{type:"sap.ui.core.URI",defaultValue:"/sap/bc/ui2/smi/rest_tunnel/Jam/api/v1/OData"},tunnelServiceUrl:{type:"sap.ui.core.URI",defaultValue:"/sap/bc/z_sail_httproxy/Jam/api/v1/OData"},object:{type:"object"},attachments:{type:"object"},externalObject:{type:"object"}}},init:function(){this.oCommonUtil=new C();this.oLangBundle=this.oCommonUtil.getLanguageBundle();this.sODataServiceUrl=undefined;this.sTunnelServiceUrl=undefined;this.sJamUrl=undefined;this.oODataUtil=undefined;this.oSharingView=undefined;this.oView=undefined;this.aJamGroups=[];this.bOdataOn=true;},onBeforeRendering:function(){},onAfterRendering:function(){this.logComponentProperties();if(this.bStopRendering===undefined||this.bStopRendering===false){this.oSharingView=this.getSharingView();this.oSharingView.placeAt(this.getId());}},exit:function(){this.oSharingView.destroy();},setSettings:function(s){this.setODataServiceUrl(s.oDataServiceUrl);this.setTunnelServiceUrl(s.tunnelServiceUrl);this.setObject(s.object);this.setAttachments(s.attachments);this.setExternalObject(s.externalObject);},render:function(r){r.write("<div id='"+this.getId()+"' style='width:"+this.getWidth()+";height:"+this.getHeight()+"'");r.write(">");r.write("</div>");},getSharingView:function(){var o;var O;var s;var d=this.getObject();if(d){s=d.id;o=d.display;O=d.share;}var e=this.getComponentData();if(e){this.oDialogComponent=e.dialogComponent;}var f=this;var n=function(){if(!f.oNoGroupsView){f.oNoGroupsView=sap.ui.view({id:f.getId()+"_NoGroupsView",viewData:{controlId:f.getId(),langBundle:f.oLangBundle,jamUrl:f.oSharingView.getController().sJamUrl,},type:a.JS,viewName:"sap.collaboration.components.fiori.sharing.NoGroups"});}f.oSharingView.destroy();f.oSharingView=undefined;f.oNoGroupsView.placeAt(f.getId());};if(!this.oSharingView){this.oSharingView=sap.ui.view({id:this.getId()+"_SharingView",viewData:{controlId:this.getId(),odataServiceUrl:this.systemSettings.oDataServiceUrl,collaborationHostODataServiceUrl:this.systemSettings.collaborationHostODataServiceUrl,collaborationHostRestService:this.systemSettings.collaborationHostRestService,langBundle:this.oLangBundle,jamGroups:this.aJamGroups,sharingDialog:undefined,noGroupsCallBack:n,objectDisplay:o,objectShare:O,objectId:s,attachments:this.getAttachments(),externalObject:this.getExternalObject()},type:a.JS,viewName:"sap.collaboration.components.fiori.sharing.Sharing"});}else{this.oSharingView.getViewData().objectId=s;this.oSharingView.getViewData().objectShare=O;this.oSharingView.getViewData().objectDisplay=o;this.oSharingView.getViewData().externalObject=this.getExternalObject();}if(this.oNoGroupsView){this.oNoGroupsView.destroy();this.oNoGroupsView=undefined;}return this.oSharingView;},shareToJam:function(){this.oSharingView.getController().shareToJam();},logComponentProperties:function(){q.sap.log.debug("Share Component properties:","","sap.collaboration.components.fiori.sharing.Component.logComponentProperties()");q.sap.log.debug("width: "+this.getWidth());q.sap.log.debug("height: "+this.getHeight());q.sap.log.debug("oDataServiceUrl: "+this.getODataServiceUrl());q.sap.log.debug("tunnelServiceUrl: "+this.getTunnelServiceUrl());if(this.getObject()){q.sap.log.debug("object->id: "+this.getObject().id);q.sap.log.debug("object->display: "+this.getObject().display);q.sap.log.debug("object->share: "+this.getObject().share);}else{q.sap.log.debug("object: undefined");}if(this.getAttachments()&&this.getAttachments().attachmentsArray){q.sap.log.debug("Attachments:");var d=this.getAttachments().attachmentsArray;for(var i=0;i<d.length;i++){q.sap.log.debug("Attachments"+(i+1)+":");q.sap.log.debug(d[i].mimeType);q.sap.log.debug(d[i].name);q.sap.log.debug(d[i].url);}}else{q.sap.log.debug("attachments: undefined");}if(this.getExternalObject()){q.sap.log.debug("externalObject->appContext: "+this.getObject().appContext);q.sap.log.debug("externalObject->odataServicePath: "+this.getObject().odataServicePath);q.sap.log.debug("externalObject->collection: "+this.getObject().collection);q.sap.log.debug("externalObject->key: "+this.getObject().key);q.sap.log.debug("object->name: "+this.getObject().name);q.sap.log.debug("object->summary: "+this.getObject().summary);}else{q.sap.log.debug("externalObject: undefined");}}});return b;});
  