HTTP/1.1 200 OK Date: Fri, 27 Mar 2020 18:12:53 GMT Content-Type: application/javascript; charset=utf-8 Content-Length: 44224 Connection: keep-alive x-xss-protection: 0 last-modified: Fri, 10 May 2019 07:59:35 GMT cache-control: max-age=315360000, public content-encoding: br sap.ui.predefine('sap/ushell/UIActions',function(){"use strict";var U=function(c){if(!c||!c.rootSelector||!c.containerSelector||!c.draggableSelector){throw new Error("No configuration object to initialize User Interaction module.");}this.animationDuration=null;this.captureStart=null;this.captureMove=null;this.captureEnd=null;this.clickCallback=null;this.clickEvent=null;this.clickHandler=null;this.clone=null;this.cloneClass=null;this.container=null;this.contextMenuEvent=null;this.debug=null;this.defaultDragStartEvent=null;this.defaultMouseMoveEvent=null;this.deltaTop=0;this.disabledDraggableSelector=null;this.dragAndScrollCallback=null;this.dragAndScrollDuration=null;this.dragAndScrollTimer=null;this.draggable=null;this.placeHolderClass=null;this.draggableSelector=null;this.draggableSelectorExclude=null;this.doubleTapCallback=null;this.doubleTapDelay=null;this.element=null;this.endDragAndScrollCallback;this.endX=null;this.endY=null;this.isLayoutEngine=null;this.isTouch=null;this.isCombi=null;this.lastElement=null;this.lastTapTime=null;this.lockMode=null;this.log=null;this.mode=null;this.mouseDownEvent=null;this.mouseMoveEvent=null;this.mouseUpEvent=null;this.moveTolerance=null;this.moveX=null;this.moveY=null;this.noop=null;this.onDragStartUIHandler=null;this.onDragEndUIHandler=null;this.preventClickFlag;this.preventClickTimeoutId;this.scrollContainer=null;this.scrollContainerSelector=null;this.scrollEvent=null;this.scrollTimer=null;this.startX=null;this.startY=null;this.switchModeDelay=null;this.tapsNumber=null;this.timer=null;this.scrollHandler=null;this.touchCancelEvent=null;this.dragCallback=null;this.onBeforeCreateClone=null;this.endCallback=null;this.touchEndEvent=null;this.touchMoveEvent=null;this.startCallback=null;this.touchStartEvent=null;this.wrapper=null;this.wrapperRect=null;this.scrollCallback=null;this.draggableElement;this.offsetLeft=0;this.elementsToCapture=null;this.init=function(c){this.startX=-1;this.startY=-1;this.moveX=-1;this.moveY=-1;this.endX=-1;this.endY=-1;this.noop=function(){};this.isLayoutEngine=c.isLayoutEngine||false;if(this.isLayoutEngine){this.moveDraggable=this.noop;}this.isTouch=c.isTouch?!!c.isTouch:false;this.isCombi=c.isCombi?!!c.isCombi:false;this.container=document.querySelector(c.containerSelector);this.scrollContainerSelector=c.scrollContainerSelector||c.containerSelector;this.switchModeDelay=c.switchModeDelay||1500;this.dragAndScrollDuration=c.dragAndScrollDuration||230;this.moveTolerance=c.moveTolerance===0?0:c.moveTolerance||10;this.draggableSelector=c.draggableSelector;this.draggableSelectorBlocker=c.draggableSelectorBlocker||c.rootSelector;this.draggableSelectorExclude=c.draggableSelectorExclude;this.mode='normal';this.debug=c.debug||false;this.root=document.querySelector(c.rootSelector)||document.querySelector("#canvas");this.animationDuration=c.animationDuration||330;this.tapsNumber=0;this.lastTapTime=0;this.log=this.debug?this.logToConsole:this.noop;this.lockMode=false;this.placeHolderClass=c.placeHolderClass||"";this.cloneClass=c.cloneClass||"";this.deltaTop=c.deltaTop||0;this.wrapper=c.wrapperSelector?document.querySelector(c.wrapperSelector):this.container.parentNode;this.clickCallback=typeof c.clickCallback==='function'?c.clickCallback:this.noop;this.startCallback=typeof c.startCallback==='function'?c.startCallback:this.noop;this.doubleTapCallback=typeof c.doubleTapCallback==='function'?c.doubleTapCallback:this.noop;this.endCallback=typeof c.endCallback==='function'?c.endCallback:this.noop;this.dragCallback=typeof c.dragCallback==='function'?c.dragCallback:this.noop;this.onBeforeCreateClone=typeof c.onBeforeCreateClone==='function'?c.onBeforeCreateClone:this.noop;this.dragAndScrollCallback=typeof c.dragAndScrollCallback==='function'?c.dragAndScrollCallback:this.noop;this.endDragAndScrollCallback=typeof c.endDragAndScrollCallback==='function'?c.endDragAndScrollCallback:this.noop;this.scrollCallback=typeof c.scrollCallback==='function'?c.scrollCallback:this.noop;this.doubleTapDelay=c.doubleTapDelay||500;this.wrapperRect=this.wrapper.getBoundingClientRect();this.scrollEvent='scroll';this.touchStartEvent='touchstart';this.touchMoveEvent='touchmove';this.touchEndEvent='touchend';this.mouseDownEvent='mousedown';this.mouseMoveEvent='mousemove';this.mouseUpEvent='mouseup';this.contextMenuEvent='contextmenu';this.touchCancelEvent='touchcancel';this.defaultDragStartEvent='dragstart';this.defaultMouseMoveEvent='mousemove';this.clickEvent='click';this.isVerticalDragOnly=c.isVerticalDragOnly||false;this.draggableElement=c.draggableElement;this.offsetLeft=c.offsetLeft;this.elementsToCapture=c.elementToCapture?jQuery(c.elementToCapture):this.root;this.disabledDraggableSelector=c.disabledDraggableSelector;this.onDragStartUIHandler=typeof c.onDragStartUIHandler==='function'?c.onDragStartUIHandler:this.noop;this.onDragEndUIHandler=typeof c.onDragEndUIHandler==='function'?c.onDragEndUIHandler:this.noop;this.defaultMouseMoveHandler=c.defaultMouseMoveHandler||function(e){e.preventDefault();};};this.forEach=function(s,a){return Array.prototype.forEach.call(s,a);};this.indexOf=function(s,i){return Array.prototype.indexOf.call(s,i);};this.insertBefore=function(s,i,r){var a,b,d;d=Array.prototype.splice;a=this.indexOf(s,i);b=this.indexOf(s,r);d.call(s,b-(a0)){I=true;}if(!I&&i&&this.indexOf(this.draggable,a)>=0){e=a;}a=a.parentNode;}return e;};this.captureStart=function(e){var a;if(e.type==='touchstart'&&e.touches.length===1){a=e.touches[0];}else if(e.type==='mousedown'){a=e;if(e.which!=1){return;}}if(a){this.element=this.getDraggableElement(a.target);this.startX=this.moveX=a.pageX;this.startY=this.moveY=a.pageY;this.lastMoveX=0;this.lastMoveY=0;if(this.lastTapTime&&this.lastElement&&this.element&&(this.lastElement===this.element)&&Math.abs(Date.now()-this.lastTapTime)this.moveTolerance||Math.abs(this.startY-this.moveY)>this.moveTolerance)){if(this.isTouch||this.isTouchEvent){this.log('-> normal');clearTimeout(this.timer);delete this.timer;}else if(this.element){this.onDragStartUIHandler();if(!jQuery(this.element).hasClass(this.disabledDraggableSelector)){this.log('mode switched to drag');this.mode='drag';this.onBeforeCreateClone(e,this.element);this.createClone();}else{this.preventClick();this.element=null;}}}break;case'drag':e.preventDefault();this.onDragStartUIHandler();this.log('-> drag');if(this.isVerticalDragOnly){this.mode='vertical-drag';}else{this.mode='drag-and-scroll';}window.addEventListener(this.mouseUpEvent,this.endHandler,true);this.translateClone();this.scrollContainer=document.querySelector(this.scrollContainerSelector);this.dragAndScroll();if(!this.isTouch){this.dragCallback(e,this.element);}break;case'drag-and-scroll':e.stopPropagation();e.preventDefault();this.log('-> drag-and-scroll');i=this.dragAndScroll();this.translateClone();if(!i){this.moveDraggable();}this.dragAndScrollCallback({evt:e,clone:this.clone,isScrolling:i,moveX:this.moveX,moveY:this.moveY});break;case'vertical-drag':e.stopPropagation();e.preventDefault();i=this.dragAndScroll();this.translateClone();if(!i){this.moveDraggableVerticalOnly(this.moveX,this.moveY);}this.dragAndScrollCallback({evt:e,clone:this.clone,isScrolling:i,moveX:this.moveX,moveY:this.moveY});break;default:break;}}.bind(this);this.captureEnd=function(e){var a;if((e.type==='touchend'||e.type==='touchcancel')&&(e.changedTouches.length===1)){a=e.changedTouches[0];}else if(e.type==='mouseup'){a=e;}if(a){this.endX=a.pageX;this.endY=a.pageY;this.log('captureEnd('+this.endX+', '+this.endY+')');}};this.contextMenuHandler=function(e){if(this.isTouch){e.preventDefault();}}.bind(this);this.clickHandler=function(e){if(this.preventClickFlag){this.preventClickFlag=false;e.preventDefault();e.stopPropagation();e.stopImmediatePropagation();clearTimeout(this.preventClickTimeoutId);}this.clickCallback();}.bind(this);this.preventClick=function(){this.preventClickFlag=true;this.preventClickTimeoutId=setTimeout(function(){this.preventClickFlag=false;}.bind(this),100);};this.endCallbackAdapter=function(e,a,o){var b=this.endCallback.apply(null,arguments);jQuery.when(b).then(function(){this.removeClone(a,o.clone);this.onDragEndUIHandler(e);}.bind(this));this.preventClick();};this.endHandler=function(e){this.log('endHandler');this.captureEnd(e);switch(this.mode){case'normal':this.onDragEndUIHandler(e);this.log('-> normal');break;case'drag':this.log('-> drag');this.endCallbackAdapter(e,this.element,{clone:this.clone});break;case'drag-and-scroll':this.log('-> drag-and-scroll');window.removeEventListener(this.mouseUpEvent,this.endHandler,true);this.endCallbackAdapter(e,this.element,{deltaX:this.moveX-this.startX,deltaY:this.moveY-this.startY,clone:this.clone});e.stopPropagation();e.preventDefault();break;case'vertical-drag':this.log('-> vertical-drag');window.removeEventListener(this.mouseUpEvent,this.endHandler,true);this.endCallbackAdapter(e,this.element,{clone:this.clone});e.stopPropagation();e.preventDefault();break;case'double-tap':this.log('-> double-tap');this.doubleTapCallback(e,this.element);break;default:break;}clearTimeout(this.timer);delete this.timer;this.lastMoveX=0;this.lastMoveY=0;this.element=null;this.clone=null;this.mode='normal';}.bind(this);this.defaultDragStartHandler=function(e){e.preventDefault();};this.scrollHandler=function(){clearTimeout(this.scrollTimer);this.lockMode=true;this.scrollTimer=setTimeout(function(){this.lockMode=false;}.bind(this),500);}.bind(this);this.createClone=function(){var s,r;this.preventClickFlag=true;if(sap.ui.getCore().byId(this.element.id)&&sap.ui.getCore().byId(this.element.id).getBoundingRects){r=sap.ui.getCore().byId(this.element.id).getBoundingRects()[0];r.top=r.offset.y;r.left=r.offset.x;r.width+=5;}else{r=this.element.getBoundingClientRect();}this.clone=this.element.cloneNode(true);this.clone.removeAttribute("id");this.clone.removeAttribute("data-sap-ui");this.clone.className+=(' '+this.cloneClass);this.element.className+=(' '+this.placeHolderClass);s=this.clone.style;s.position='fixed';s.display='block';s.top=(r.top+this.deltaTop)+'px';s.left=r.left+'px';s.width=r.width+'px';s.zIndex='100';s.webkitTransition='-webkit-transform 0ms cubic-bezier(0.33, 0.66, 0.66, 1)';s.mozTransition='-moz-transform 0ms cubic-bezier(0.33, 0.66, 0.66, 1)';s.msTransition='-ms-transform 0ms cubic-bezier(0.33, 0.66, 0.66, 1)';s.transition='transform 0ms cubic-bezier(0.33, 0.66, 0.66, 1)';s.webkitTransform='translate3d(0px, 0px, 0px) ';s.mozTransform='translate3d(0px, 0px, 0px) ';s.msTransform='translate3d(0px, 0px, 0px) ';s.transform='translate3d(0px, 0px, 0px) ';this.root.appendChild(this.clone);this.log('createClone');};this.removeClone=function(e,a){this.preventClick();e.className=e.className.split(' '+this.placeHolderClass).join('');a.parentElement.removeChild(a);this.log('removeClone');};this.translateClone=function(){var d,a;d=this.moveX-this.startX;a=this.moveY-this.startY;this.clone.style.webkitTransform='translate3d('+d+'px, '+a+'px, 0px)';this.clone.style.mozTransform='translate3d('+d+'px, '+a+'px, 0px)';this.clone.style.msTransform='translate('+d+'px, '+a+'px)';this.clone.style.transform='translate3d('+d+'px, '+a+'px, 0px)';this.log('translateClone ('+d+', '+a+')');};this.dragAndScroll=function(){var d,a,s,t=this;function b(){s.webkitTransition='-webkit-transform '+a+'ms linear';s.transition='transform '+a+'ms linear';s.mozTransition='-moz-transform '+a+'ms linear';s.msTransition='-ms-transform '+a+'ms linear';s.webkitTransform='translate3d(0px, '+d+'px 0px)';s.mozTransform='translate3d(0px, '+d+'px 0px)';s.msTransform='translate3d(0px, '+d+'px 0px)';s.transform='translate3d(0px, '+d+'px 0px)';}function e(){s.webkitTransition='';s.mozTransition='';s.msTransition='';s.transition='';s.webkitTransform='';s.mozTransform='';s.msTransform='';s.transform='';t.wrapper.scrollTop-=d;}function g(){var r,h;if(t.clone){r=t.clone.getBoundingClientRect();h=t.wrapperRect.top-r.top;if(h>0){return h;}h=t.wrapper.offsetTop+t.wrapper.offsetHeight-(r.top+t.clone.offsetHeight);if(h<0){return h;}}return 0;}function i(){if(t.endDragAndScrollCallback(t.moveY)){return false;}if(d<0){return t.wrapper.getBoundingClientRect().top-(t.container.getBoundingClientRect().top+t.container.offsetHeight)+t.wrapper.offsetHeight<0;}return t.container.getBoundingClientRect().top-(t.wrapper.getBoundingClientRect().top+t.container.offsetTop)<0;}function f(){b();t.dragAndScrollTimer=setTimeout(function(){e();t.dragAndScrollTimer=undefined;if((d=g())!==0&&i()){f();}t.scrollCallback();},a);}d=g();if(d!==0&&!this.dragAndScrollTimer&&i()){a=this.dragAndScrollDuration;this.scrollContainer=this.scrollContainer||document.querySelector(this.scrollContainerSelector);s=this.scrollContainer.style;f();}this.log('dragAndScroll ('+d+')');return(d!=0)&&i();};this.moveDraggableVerticalOnly=function(){var h,i,r,m=true;this.forEach(this.draggable,function(a,b){if(!h){r=a.getBoundingClientRect();i=!(r.bottomthis.moveY);if(i){h=a;if(r.top+r.height/2this.moveX);d=!(r.bottomthis.moveY);if(i&&d){h=f;b=g;}}}.bind(this));if(h&&this.element!==h){e=this.indexOf(this.draggable,this.element);if(Math.abs(this.lastMoveX-this.moveX)>=this.moveTolerance||Math.abs(this.lastMoveY-this.moveY)>=this.moveTolerance){if(b<=e){h.parentNode.insertBefore(this.element,h);this.insertBefore(this.draggable,this.element,h);}else if(b>e){h.parentNode.insertBefore(this.element,h.nextSibling);this.insertBefore(this.draggable,this.element,this.draggable[b+1]);}this.lastMoveX=this.moveX;this.lastMoveY=this.moveY;}}this.log('moveDraggable');};this.enable=function(){this.log('enable');this.root.addEventListener(this.touchMoveEvent,this.moveHandler,true);this.root.addEventListener(this.mouseMoveEvent,this.moveHandler,true);this.root.addEventListener(this.contextMenuEvent,this.contextMenuHandler,false);this.root.addEventListener(this.clickEvent,this.clickHandler,true);this.root.addEventListener(this.defaultDragStartEvent,this.defaultDragStartHandler,true);this.root.addEventListener(this.defaultMouseMoveEvent,this.defaultMouseMoveHandler,true);this.wrapper.addEventListener(this.scrollEvent,this.scrollHandler,false);if(this.elementsToCapture.length){var t=this;this.elementsToCapture.each(function(){this.addEventListener(t.touchStartEvent,t.startHandler,false);this.addEventListener(t.touchEndEvent,t.endHandler,false);this.addEventListener(t.touchCancelEvent,t.endHandler,false);this.addEventListener(t.mouseDownEvent,t.startHandler,false);this.addEventListener(t.mouseUpEvent,t.endHandler,false);});}else{this.elementsToCapture.addEventListener(this.touchStartEvent,this.startHandler,false);this.elementsToCapture.addEventListener(this.touchEndEvent,this.endHandler,false);this.elementsToCapture.addEventListener(this.touchCancelEvent,this.endHandler,false);this.elementsToCapture.addEventListener(this.mouseDownEvent,this.startHandler,false);this.elementsToCapture.addEventListener(this.mouseUpEvent,this.endHandler,false);}return this;};this.delete=function(){this.log('delete');this.disable();this.dragCallback=null;this.onBeforeCreateClone=null;this.endCallback=null;this.startCallback=null;this.scrollCallback=null;this.doubleTapCallback=null;this.clickCallback=null;this.dragAndScrollCallback=null;delete this;};this.disable=function(){this.log('disable');if(this.elementsToCapture.length){var t=this;this.elementsToCapture.each(function(){this.removeEventListener(t.touchStartEvent,t.startHandler,false);this.removeEventListener(t.touchEndEvent,t.endHandler,false);this.removeEventListener(t.touchCancelEvent,t.endHandler,false);this.removeEventListener(t.mouseDownEvent,t.startHandler,false);this.removeEventListener(t.mouseUpEvent,t.endHandler,false);});}else{this.elementsToCapture.removeEventListener(this.touchStartEvent,this.startHandler,false);this.elementsToCapture.removeEventListener(this.touchEndEvent,this.endHandler,false);this.elementsToCapture.removeEventListener(this.touchCancelEvent,this.endHandler,false);this.elementsToCapture.removeEventListener(this.mouseDownEvent,this.startHandler,false);this.elementsToCapture.removeEventListener(this.mouseUpEvent,this.endHandler,false);}this.root.removeEventListener(this.touchMoveEvent,this.moveHandler,true);this.root.removeEventListener(this.mouseMoveEvent,this.moveHandler,true);this.root.removeEventListener(this.contextMenuEvent,this.contextMenuHandler,false);this.root.removeEventListener(this.clickEvent,this.clickHandler,true);this.root.removeEventListener(this.defaultDragStartEvent,this.defaultDragStartHandler,true);this.root.removeEventListener(this.defaultMouseMoveEvent,this.defaultMouseMoveHandler,true);this.wrapper.removeEventListener(this.scrollEvent,this.scrollHandler,false);return this;};this.init(c);this.getMove=function(){return{x:this.moveX,y:this.moveY};};};return U;},true); sap.ui.predefine('sap/ushell/UIActionsWin8',function(){"use strict";function n(){}var U=function(){};U.prototype={init:function(c){this.cfg=c;this.type=this.cfg.type;this.wrapper=jQuery(c.wrapperSelector).get(0);this.container=jQuery(c.containerSelector).get(0);this.dragAndScrollCallback=c.dragAndScrollCallback||n;this.dragAndScrollDuration=100;this.dragCallback=c.dragCallback||n;this.draggableSelector=c.draggableSelector;this.endCallback=typeof c.endCallback==='function'?c.endCallback:n;this.onBeforeCreateClone=c.onBeforeCreateClone||n;this.placeHolderClass=c.placeHolderClass||"";this.cloneClass=c.cloneClass||"";this.$root=jQuery(c.rootSelector);this.startCallback=typeof c.startCallback==='function'?c.startCallback:n;this.onDragStartUIHandler=typeof c.onDragStartUIHandler==='function'?c.onDragStartUIHandler:n;this.onDragEndUIHandler=typeof c.onDragEndUIHandler==='function'?c.onDragEndUIHandler:n;this._publishAsync=typeof c._publishAsync==='function'?c._publishAsync:n;},enable:function(){if(this.enabled){return this;}this.enabled=true;this.$root.on('dragstart',this.draggableSelector,this,this.dragStartHandler).on('dragend',this.draggableSelector,this,this.dragEndHandler);return this;},disable:function disable(){this.enabled=false;this.$root.off('dragstart',this.draggableSelector).off('dragend',this.draggableSelector);return this;},dragLeaveHandler:function(e){var c=window.getComputedStyle(e.data.container).transform;e.data.container.style.transform=c;e.data.container.style.transition='';var t;var b=c.split(",");if(c.substr(0,8)=="matrix3d"){t=parseInt(b[13],10);}else if(c.substr(0,6)=="matrix"){t=parseInt(b[5],10);}if(isNaN(t)){return;}e.data.container.style.transform="none";e.data.wrapper.scrollTop+=~t+1;},dragEnterScrollHandler:function dragEnterScrollHandler(e){if(e.target==e.data.$bottomScroller.get(0)){e.data.startScroll("down");}if(e.target==e.data.$topScroller.get(0)){e.data.startScroll("up");}},startScroll:function(d){var l;if(d=="up"){l=this.wrapper.scrollTop;if(l<=0){return;}}else{l=this.wrapper.scrollHeight-this.wrapper.offsetHeight-this.wrapper.scrollTop;if(l<=0){return;}}var s=l*3;var t=(d=="up")?l:~l+1;this.container.style.transition='transform '+s+'ms linear';this.container.style.transform='translate(0px, '+t+'px) scale(1) translateZ(0px)';},initScrollRegions:function(){this.$topScroller=jQuery("
");this.$bottomScroller=jQuery("
");jQuery(document.body).append(this.$topScroller).append(this.$bottomScroller);this.$topScroller.add(this.$bottomScroller).on('dragenter',this,this.dragEnterScrollHandler).on('dragleave',this,this.dragLeaveHandler);},removeScrollRegions:function(){jQuery('.UiActionsTopScroller, .UiActionsBottomScroller').remove();}};function G(c){this.init(c);}G.prototype=new U();jQuery.extend(G.prototype,{dragOverTimeout:null,dragStartHandler:function(e){var _=e.data;if(sap.ui.Device.system.phone){_.$root.find(".sapUshellTilesContainer-sortable").addClass("sapUshellTileContainerRemoveContent");_.$root.find(".sapUshellTileContainerBeforeContent").addClass("sapUshellTileContainerRemoveContent");_.$root.find(".sapUshellContainerHeaderActions").addClass("sapUshellTileContainerHidden");}else{_.$root.find(".sapUshellTileContainerBeforeContent").addClass("sapUshellTileContainerHidden");}_.$originalElement=jQuery(e.target).closest(".sapUshellDashboardGroupsContainerItem");_.originalIndex=_.$originalElement.index();_.$element=_.$originalElement.clone().css("display","none").addClass('sapUshellDashboardGroupsContainerItem-placeholder');_.$element.insertAfter(_.$originalElement);_.$originalElement.addClass("sapUshellDashboardGroupsContainerItem-orignal");_.$root.find('.sapUshellTileContainerAfterContent').last().addClass("sapUshellTileContainerRemoveContent");_.initScrollRegions();setTimeout(function(){_.$originalElement.css("display","none");_.$element.css("display","block");},0);_.$root.on('dragover',".sapUshellDashboardGroupsContainerItem:not(.sapUshellDisableDragAndDrop)",_,_.dragOverHandler);},dragEndHandler:function(e){var _=e.data;_.removeScrollRegions();_.$root.off('dragover',".sapUshellDashboardGroupsContainerItem:not(.sapUshellDisableDragAndDrop)");_.$root.find(".sapUshellTilesContainer-sortable").removeClass("sapUshellTileContainerRemoveContent");_.$root.find(".sapUshellTileContainerBeforeContent").removeClass("sapUshellTileContainerRemoveContent");_.$root.find(".sapUshellContainerHeaderActions").removeClass("sapUshellTileContainerHidden");_.$root.find(".sapUshellTileContainerBeforeContent").removeClass("sapUshellTileContainerHidden");_.$element.replaceWith(_.$originalElement);var b=_.$originalElement.index();_.$originalElement.css('display','block').removeClass("sapUshellDashboardGroupsContainerItem-orignal");var B=sap.ui.getCore().getEventBus(),f=_.$originalElement.children().eq(0).attr("id"),g=sap.ui.getCore().byId(f),d=sap.ui.getCore().byId("dashboardGroups"),D={group:g,groupChanged:false,focus:false};d.removeAggregation('groups',g,true);d.insertAggregation('groups',g,b,true);_._publishAsync("launchpad","moveGroup",{fromIndex:_.originalIndex,toIndex:b});window.setTimeout(jQuery.proxy(B.publish,B,"launchpad","scrollToGroup",D),1);},dragOverHandler:function dragOverHandler(e){if(e.data.dragOverTimeout){return;}e.data.dragOverTimeout=setTimeout(function(){e.data.dragOverTimeout=null;var o=e.currentTarget;if(e.data.$element.get(0)===o){return;}var b=e.data.isOverAboveMiddle(o,e.originalEvent.pageY);if(o===e.data.overElement&&b===e.data.overAboveMiddle){return;}e.data.overElement=o;e.data.overAboveMiddle=b;e.data.movePlaceholder(e.data.$element,o,b);},50);},isOverAboveMiddle:function(e,p){var m=true;var r=e.getBoundingClientRect();if(r.top+r.height/2-1){c.splice(c.indexOf(this.item),1);}if(!jQuery(this.domRef.parentNode).hasClass("sapUshellLinksInnerContainer")){jQuery(this.domRef).hide();}if(A){h=jQuery(this.currentGroup.getDomRef()).find(".sapUshellTilesContainer-sortable").height()-jQuery(this.domRef).height();this.collidedLinkAreas=[];jQuery(this.currentGroup.getDomRef()).find(".sapUshellTilesContainer-sortable").animate({height:h},300,f);}else{f();}},handlePlaceholderChange:function(){var c=this.currentGroup,t=(this.endGroup!==this.currentGroup),T=this.endAreaChanged&&this.endArea==='links',i=this.thisLayout.isTabBarActive()&&this.groupSwitched,A=false,m=this.matrix[this.matrix.length-1];if(this.item&&m[0]){if(!m[1]){A=true;}if(m[0].getLong&&m[0].getLong()&&m[1]&&!m[2]){A=true;}}this.tiles=this.thisLayout.getGroupTiles(this.endGroup).slice(0);this.matrix=this.thisLayout.organizeGroup(this.tiles);if(i){this.handleTabBarSwitch(c);}if(t){this._handleChangedGroup(c);}else if(T){this.removeTilePlaceholder(undefined,A);}if(!T){this.showTilePlaceholder(c,t,T);}},handleMatrixCollision:function(t,c,T,d){var r,e,f,n;r=this.matrix[this.curTouchMatrixCords.row][this.curTouchMatrixCords.column];e=t.indexOf(r);f=t.indexOf(this.item);if(this.rightToLeft){this.collisionLeft=!this.collisionLeft;}if(f>-1&&f-1){d.splice(d.indexOf(this.item),1);}}if(this.startGroup===this.endGroup&&this.startArea==="tiles"){this.tiles.splice(this.tiles.indexOf(this.item),1);}i=this.item.getDomRef()||this.domRef;if(this.startArea==="links"&&!this.intersectedLinkPlaceHolder){this.switchLinkWithClone(this.item);}if(this.endArea==='tiles'){this.endGroup.getInnerContainersDomRefs()[0].appendChild(i);}if(!jQuery(i.parentNode).hasClass("sapUshellLinksInnerContainer")){jQuery(i).hide();}this.currentGroup=this.endGroup;if(this.thisLayout.isAnimationsEnabled()){this.thisLayout.initGroupDragMode(this.endGroup);var e=this.thisLayout.organizeGroup(d);this.thisLayout.renderLayoutGroup(c,e);}},_handleTileReplace:function(t,c){this.reorderElementsCallback({currentGroup:c,endGroup:this.endGroup,tiles:t,item:this.item});this.reorderTilesView(t,this.endGroup);this.reorderTilesInDom();if(this.thisLayout.isAnimationsEnabled()){this.thisLayout.renderLayoutGroup(this.endGroup,this.matrix);}},_getIntersectedLink:function(c,m,d){var e=jQuery(".sapUshellLinkTile")[0];if(!e){return;}var f=c.getDomRef().querySelector(".sapUshellLineModeContainer").getBoundingClientRect(),g=!jQuery("body.sapUiSizeCompact").length,r=Math.floor((d-f.top)/(g?45:31)),h=this.collidedLinkAreas[c.getId()],i;if(this.rightToLeft){i=Math.floor((f.right-m)/20);}else{i=Math.floor((m-f.left)/20);}if(r=l){r=l-1;}if(!this.collidedLinkAreas[c.getId()][r]){return;}i=this.collidedLinkAreas[c.getId()][r].length;return this.collidedLinkAreas[c.getId()][r][i-1];}},_mapGroupLinks:function(c){var g=c.getId(),l,r,R=0;if(!this.collidedLinkAreas[g]||this.bElapseGroupLinksMap){this.bElapseGroupLinksMap=false;var d=c.getLinks(),e=[];this.collidedLinkAreas.push(c.getId());d.forEach(function(i){r=this._getLinkBoundingRects(i,c);r.forEach(function(o){if(o.offset.y>l){R++;}l=o.offset.y;this._addLinkToHashMap(e,c,o,R,i);}.bind(this));}.bind(this));this.collidedLinkAreas[g]=e;}},_getLinkBoundingRects:function(l,c){var r=l.getBoundingRects();if(this.item&&this.item.getId()===l.getId()){r=this.draggedLinkBoundingRects;}if(r.length){this.aLinksBoundingRects[l.getId()]=this._getMarkerOffset(r,c);}return r;},_addLinkToHashMap:function(c,d,r,e,l){if(!c[e]){c[e]=[];}for(var i=0;i<=(r.width+20)/20;i++){var f={link:l,leftSide:!this.rightToLeft};if(i>((r.width+20)/20)/2){f.leftSide=this.rightToLeft;}c[e].push(f);}},_isLinkAreaIntersection:function(c,m,d){var i=c.getInnerContainersDomRefs();if(i[1]){return this._isElementCollideByGivenCordinates(i[1],m,d);}else{return false;}},_isLinksEquals:function(l,o){if(!l||!o){return false;}if(l.link.getId()!==o.link.getId()){return false;}if(l.link.leftSide!==o.link.leftSide){return false;}return true;},_toggleTileCloneHoverOpacity:function(v){jQuery(".sapUshellTile-clone").toggleClass("sapUshellTileDragOpacity",v);},_handleLinkAreaIntersection:function(c,m,d){var i,e=false;if(this.isLinkPersonalizationSupported){this._toggleTileCloneHoverOpacity(true);}this._mapGroupLinks(c);this.matrix=this.matrix||this.thisLayout.organizeGroup(this.thisLayout.getGroupTiles(c));i=this._getIntersectedLink(c,m,d);if(i){e=this._isLinksEquals(this.intersectedLink,i);this.intersectedLink=i;}else{this.removeTilePlaceholder(c);}this._markEmptyLinkArea(c);return e;},_markEmptyLinkArea:function(c){if(!c.getLinks().length){jQuery(c.getDomRef()).find(".sapUshellLineModeContainer").addClass("sapUshellEmptyLinkAreaHover");}},_removeEmptyLinkAreaMark:function(){jQuery(".sapUshellLineModeContainer").removeClass("sapUshellEmptyLinkAreaHover");},reorderTilesInDom:function(){var j=this.item.getDomRef()?this.item.getDomRef():this.domRef,s=jQuery(j).index(),c=jQuery(j).closest(".sapUshellTilesContainer-sortable"),d=this.calcDestIndexInGroup(),e=jQuery(this.endGroup.getDomRef()).find(".sapUshellTilesContainer-sortable"),f=e.find(".sapUshellTile");if(this.startArea==="tiles"){c.find(f[s]).remove();}else if(!this.intersectedLinkPlaceHolder){this.switchLinkWithClone(this.item);}if(this.endArea!=='links'){f=e.find(".sapUshellTile");e[0].insertBefore(j,f[d]);}},isLinkIntersected:function(){return this.intersectedLink!==undefined;},calcDestIndexInGroup:function(){var l,t=0,i,j,I=false;for(i=0;ii){i=this.rightToLeft?i:i+1;}return i;}else{return this.endGroup.getLinks().length;}}else{return this._getDestinationTileIndex();}},layoutEndCallback:function(){var r,s,d;this._removeLinkDropMarker();if(this.endArea!=="links"&&!this.tiles){return{tile:this.item};}s=this._getDragSourceGroup();if(!b.isTabBarActive()||!this.bIsTabBarCollision){this.targetGroup="";};d=this._getDestGroupObject(this.targetGroup);r={srcGroup:s,dstGroup:d,dstGroupData:this._getDropTargetGroup(),tile:this.item,dstTileIndex:this._getDestinationIndex(this.endArea),tileMovedFlag:true,srcArea:this.startArea,dstArea:this.bIsTabBarCollision?undefined:this.endArea};return r;},_getDestGroupObject:function($){return $?sap.ui.getCore().byId(($.getAttribute('id'))):this.endGroup;},_getDragSourceGroup:function(){var s;s=this.startGroup;if(this.thisLayout.isTabBarActive()&&(this.groupSwitched===true)){s={groupId:this.sDragStartGroupModelId};}return s;},_getDropTargetGroup:function(){var d;if(this.thisLayout.isTabBarActive()&&this.thisLayout.isOnTabBarElement()){d={groupId:this.sDragTargetGroupModelId};}else{d=this.endGroup;}return d;},_getDestinationTileIndex:function(){var d,m;if(this.thisLayout.isTabBarActive()&&this.thisLayout.isOnTabBarElement()){d=this._getDropTargetGroup().groupId;m=this._getModelGroupById(d);return m.tiles.length;}return this.tiles.indexOf(this.item);},compareArrays:function(c,d){if(c.length!==d.length){return false;}for(var i=0;i-1){n.splice(d,1);}if(r){n.splice(n.indexOf(r),0,this.item);}else{n.push(i);}if(this.currentGroup==this.endGroup){if(this.compareArrays(t,n)){return false;}c=this.thisLayout.organizeGroup(n);e=this.thisLayout.getTilePositionInMatrix(i,m);f=this.thisLayout.getTilePositionInMatrix(i,c);if((e.row==f.row)&&(e.col==f.col)){return false;}}this.tiles=n;this.currentGroup=this.endGroup;return n;},setMatrix:function(n){this.matrix=n;},findTileToPlaceAfter:function(c,t){var x=(this.thisLayout.rightToLeft)?0:this.curTouchMatrixCords.column,I=(this.thisLayout.rightToLeft)?1:-1,m=0,i,j,d,r=c[0].length;for(i=this.curTouchMatrixCords.row;i>=0;i--){for(j=x;j>=0&&jm?d:m;}x=c[0].length-1;}return m||(t.length-1);},_isElementCollideByGivenCordinates:function(e,m,c){var t=e.getBoundingClientRect(),i=false,d=false;if(t.height===0&&!e.classList.contains("sapUshellNoLinksAreaPresent")){t=e.parentNode.getBoundingClientRect();}i=t.right>m&&t.leftc&&t.top=i;f--){if(e){break;}if(!this.groupsList[f].groupHasTiles()){var q=this.groupsList[f].$();if(!q.hasClass("sapUshellInDragMode")){continue;}q.removeClass("sapUshellEnableTransition");q.find('.sapUshellInner').removeAttr("style");}}return g;}}}},_handleTileAreaIntersection:function(c,m,d){var e=this._getMatrixCordinatesOfTouchedTile(c,m,d);if((c===this.endGroup)&&(e.column===this.curTouchMatrixCords.column)&&(e.row===this.curTouchMatrixCords.row)){return false;}if(this.rightToLeft){this.collisionLeft=(this.curTouchMatrixCords.column-e.column)>0;}else{this.collisionLeft=(e.column-this.curTouchMatrixCords.column)>0;}if(e.column===this.curTouchMatrixCords.column){this.collisionLeft=false;}jQuery.extend(this.curTouchMatrixCords,e);return true;},_getGroupCollisionObject:function(m,c){var d,l;d=this._getCollidedGroup(m,c);if(!d||d.getIsGroupLocked()){return undefined;}l=this._isLinkAreaIntersection(d,m,c);this.endGroup=d;if(!this.tiles){this.tiles=this.thisLayout.getGroupTiles(this.endGroup).slice(0);}this.endArea=l?'links':'tiles';this.endAreaChanged=this.isAreaChanged();this.currentArea=this.endArea;return{"collidedObjectType":l?"Group-link":"Group-tile","collidedObject":d};},getCollisionObject:function(m,c){if(this.thisLayout.oTabBarItemClickTimer){clearTimeout(this.thisLayout.oTabBarItemClickTimer);}if(this.thisLayout.isTabBarActive()&&this._isTabBarCollision(c)){return{"collidedObjectType":"TabBar"};}return this._getGroupCollisionObject(m,c);},_isTabBarScrollArea:function(m){var A=jQuery("#anchorNavigationBar").height(),o=jQuery("#anchorNavigationBar").offset(),i=o.top;return((m>A+i)&&(mi);},_handleTabBarCollision:function(m,t){var c=this,h=this._getTabBarHoverItem(m,t),T,H,i,d,D;if(b.isTabBarActive()){this._toggleTileCloneHoverOpacity(true);}this.lastHighlitedTabItem=h;this.thisLayout.setOnTabBarElement(true);i=this._handleOverflowCollision(m);if(i){return;}if(!h){return;}this.targetGroup=h;this.sDragTargetGroupModelId=h.getAttribute('modelGroupId');T=this._getTabBarGroupIndexByModelId(this.sDragTargetGroupModelId);if(this.thisLayout.oTabBarItemClickTimer){clearTimeout(this.thisLayout.oTabBarItemClickTimer);}D=this._getModelGroupById(this._getDropTargetGroup().groupId);if(D.isGroupLocked){this._toggleTabBarOverflowArrows(false);this.thisLayout.setOnTabBarElement(false);this._resetOverFlowButtonElements();return;}this._toggleAnchorItemHighlighting(true);if(!this.sDragStartGroupModelId){this.sDragStartGroupModelId=this.startGroup.getGroupId();}this.thisLayout.oTabBarItemClickTimer=setTimeout(function(){var e=c._getSelectedTabBarItem();if(c.lastHighlitedTabItem===e){return;}c.draggedTileModelPath=c.item.getBindingContext().getPath();c._prepareDomForDragAndDrop();c.startGroup.removeAggregation('tiles',c.item,true);d=c.sDragStartGroupModelId===c.sDragTargetGroupModelId;c.item.getBindingContext().oModel.setProperty(c.draggedTileModelPath+"/draggedInTabBarToSourceGroup",d);c.groupSwitched=true;sap.ui.getCore().getEventBus().publish("launchpad","switchTabBarItem",{iGroupIndex:T});var f=c.thisLayout.getGroups();c.endGroup=f[0];c.bElapseGroupLinksMap=true;},800);if((this.tiles===null)&&(this.endGroup)){this.tiles=this.thisLayout.getGroupTiles(this.endGroup).slice(0);}H=jQuery('.sapUshellTabBarHoverOn');H.removeClass('sapUshellTabBarHoverOn');h.classList.add('sapUshellTabBarHoverOn');return true;},_prepareDomForDragAndDrop:function(){if(sap.ui.Device.system.tablet){var c=this.item.$().clone();var $=this.item.$();var d=$.parent();this.origItemId=$.attr("id");this.origItemDataSapUi=$.attr("data-sap-ui");$.removeAttr("id").removeAttr("data-sap-ui");$.hide();c.hide();jQuery("#dashboardGroups").parent().append($);d.append(c);this.draggedTileDomRef=$.get(0);}else if(!this.draggedTileDomRef){this.draggedTileDomRef=this.item.getDomRef();}},_appendTargetGroupDomRefWithDraggedTile:function(){if(!this.item.getDomRef()){if(sap.ui.Device.system.tablet){jQuery(this.draggedTileDomRef).attr("id",this.origItemId);jQuery(this.draggedTileDomRef).attr("data-sap-ui",this.origItemDataSapUi);jQuery(this.draggedTileDomRef).show();}this.endGroup.getInnerContainerDomRef().appendChild(this.draggedTileDomRef);}else{this.endGroup.getInnerContainerDomRef().appendChild(this.item.getDomRef());if(sap.ui.Device.system.tablet){jQuery(this.item.getDomRef()).show();}}},_getSelectedTabBarItem:function(){return jQuery('.sapUshellAnchorItemSelected')[0];},_getTabBarGroupIndexByModelId:function(g){var i,t;for(i=0;id&&mk&&(m=t.length){n=t.length-1;}h=t[n];T=jQuery(".sapUshellAnchorItem");H=T[h];return H;},removeExcludedElementsFromMatrix:function(e){if(!e.length){return;}if(!this.matrix){return;}var n=this.matrix.map(function(r){return r.map(function(i){var c=e.some(function(d){return i instanceof d;});return(c)?undefined:i;});});this.setMatrix(n);},setExcludedControl:function(c){if(c){this.aExcludedControlClass.push(c);}},setReorderTilesCallback:function(f){if(typeof f==="function"){this.reorderElementsCallback=f;}}};var L=function(){};L.prototype={_initDeferred:jQuery.Deferred(),init:function(c){var t=function(){var s=this.getStyleInfo(this.container);if(s.tileWidth>0){this.isInited=true;this.reRenderGroupsLayout();this.layoutEngine=new a({thisLayout:this});this._initDeferred.resolve();return;}setTimeout(t,100);}.bind(this);this.cfg=c||this.cfg;this.cfg.animationsEnabled=!!this.cfg.animationsEnabled;this.minTilesinRow=2;this.container=this.cfg.container||document.getElementById('dashboardGroups');this.oTabBarItemClickTimer=new Date();this.bTabBarModeActive=false;this.bOnTabBarElement=false;t();sap.ui.getCore().getEventBus().subscribe('launchpad','tabBarChange',this._onTabBarChange,this);return this.getInitPromise();},setOnTabBarElement:function(o){this.bOnTabBarElement=o;},isOnTabBarElement:function(){return this.bOnTabBarElement;},_onTabBarChange:function(c,e,d){if(d==="tabs"){this.bTabBarModeActive=true;}else{this.bTabBarModeActive=false;}},tabBarTileDropped:function(){if(this.oTabBarItemClickTimer){clearTimeout(this.oTabBarItemClickTimer);}},getInitPromise:function(){return this._initDeferred.promise();},isAnimationsEnabled:function(){return this.cfg.animationsEnabled;},getLayoutEngine:function(){return this.layoutEngine;},getStyleInfo:function(c){var t=document.createElement('div'),d=c.getAttribute('id');c=d?document.getElementById(d):c;t.className="sapUshellTile";var s=C.last("/core/home/sizeBehavior");if(s=="Small"){t.classList.add("sapUshellSmall");}t.setAttribute('style','position: absolute; visibility: hidden;');c.appendChild(t);var e=window.getComputedStyle(t);var i={"tileMarginHeight":parseFloat(e.marginBottom,10)+parseFloat(e.marginTop,10),"tileMarginWidth":parseFloat(e.marginLeft,10)+parseFloat(e.marginRight,10),"tileWidth":t.offsetWidth,"tileHeight":t.offsetHeight,"containerWidth":c.offsetWidth-(c.style.marginLeft?parseFloat(c.style.marginLeft,10):0)};t.parentNode.removeChild(t);return i;},getGroups:function(){return this.cfg.getGroups();},getAllGroups:function(){return this.cfg.getAllGroups?this.cfg.getAllGroups():[];},isTabBarActive:function(){return this.cfg.isTabBarActive?this.cfg.isTabBarActive():false;},getTilesInRow:function(i){return this.tilesInRow;},setTilesInRow:function(t){this.tilesInRow=t;},checkPlaceForTile:function(t,m,c,l,i){if(typeof m[c.y]==="undefined"){m.push(new Array(m[0].length));}if(typeof m[c.y+1]==="undefined"){m.push(new Array(m[0].length));}if(typeof m[c.y][c.x]!=="undefined"){return false;}var p=jQuery.extend({},c);if(i||(t.getLong&&!t.getLong())){return[p];}var d=[p];if(t.getLong&&t.getLong()){if((c.x+1)>=m[0].length||(typeof m[p.y][p.x+1]!=="undefined")){return false;}d.push({y:p.y,x:p.x+1});}return d;},placeTile:function(t,m,c){for(var i=0;i0&&!d;r--){for(var c=0;c0){var p=g.getDomRef().parentElement;if(this.cfg.isLockedGroupsCompactLayoutEnabled()){var t=m[0].length;if(this.rightToLeft){for(i=m[0].length-1;i>=0;i--){if(!m[0][i]){t=(m[0].length-1)-i;break;}}}else{for(i=0;i0?t*(this.styleInfo.tileWidth+this.styleInfo.tileMarginWidth)+this.styleInfo.tileMarginWidth:0;g.getDomRef().style.width="auto";p.style.width=c+"px";p.style.display="inline-block";}else{g.getDomRef().style.width="";p.style.width="";p.style.display="";}}},calcTilesInRow:function(c,t,d){var e=Math.floor(c/(t+d));e=(e-1){u._updateTilePropertiesTexts(s,t.bag.getBag('tileProperties'));}});}if(t.configuration&&t.configuration.attachConfigurationUpdated){t.configuration.attachConfigurationUpdated(function(g){if(g.indexOf("tileConfiguration")>-1){u._updateTileConfiguration(s,t.configuration.getParameterValueAsString("tileConfiguration"));}});}if(t.preview){t.preview.setTargetUrl(N);t.preview.setPreviewIcon(c.display_icon_url);t.preview.setPreviewTitle(c.display_title_text);if(t.preview.setPreviewSubtitle&&typeof t.preview.setPreviewSubtitle==='function'){t.preview.setPreviewSubtitle(c.display_subtitle_text);}}if(t.configurationUi.isEnabled()){t.configurationUi.setUiProvider(function(){var o=u.getConfigurationUi(s,"sap.ushell.components.tiles.applauncher.Configuration");t.configurationUi.attachCancel(b.onCancelConfiguration.bind(null,o));t.configurationUi.attachSave(b.onSaveConfiguration.bind(null,o));return o;});this.getView().getContent()[0].setTooltip(u.getResourceBundleModel().getResourceBundle().getText("edit_configuration.tooltip"));}if(t.actions){var d=c.actions,e;if(d){e=d.slice();}else{e=[];}var f=a.getTileSettingsAction(m,this.onSaveRuntimeSettings.bind(this));e.push(f);t.actions.setActionsProvider(function(){return e;});}},onExit:function(){this._aDoableObject.off();},onPress:function(e){var s=this.getView(),v=s.getViewData(),t=v.chip,c=s.getModel().getProperty("/config"),r={},R=sap.ushell.Container.getRenderer("fiori2");if(e.getSource().getScope&&e.getSource().getScope()===sap.m.GenericTileScope.Display){if(t.configurationUi.isEnabled()){t.configurationUi.display();}else if(this.navigationTargetUrl){if(this.navigationTargetUrl[0]==='#'){hasher.setHash(this.navigationTargetUrl);}else{r.title=c.display_title_text;r.appType="App";r.url=c.navigation_target_url;r.appId=c.navigation_target_url;R.logRecentActivity(r);window.open(this.navigationTargetUrl,'_blank');}}}},onSaveRuntimeSettings:function(s){var v=s.getModel(),t=this.getView().getViewData().chip,c=this.getView().getModel().getProperty("/config");c.display_title_text=v.getProperty('/title');c.display_subtitle_text=v.getProperty('/subtitle');c.display_info_text=v.getProperty('/info');c.display_search_keywords=v.getProperty('/keywords');var b=t.bag.getBag('tileProperties');b.setText('display_title_text',c.display_title_text);b.setText('display_subtitle_text',c.display_subtitle_text);b.setText('display_info_text',c.display_info_text);b.setText('display_search_keywords',c.display_search_keywords);function l(e){jQuery.sap.log.error(e,null,"sap.ushell.components.tiles.applauncher.StaticTile.controller");}b.save(function(){jQuery.sap.log.debug("property bag 'tileProperties' saved successfully");this.getView().getModel().setProperty('/config/display_title_text',c.display_title_text);this.getView().getModel().setProperty('/config/display_subtitle_text',c.display_subtitle_text);this.getView().getModel().setProperty('/config/display_info_text',c.display_info_text);this.getView().getModel().setProperty('/config/display_search_keywords',c.display_search_keywords);this.getView().getModel().refresh();}.bind(this),l);},onSaveConfiguration:function(c){var d=jQuery.Deferred();var m=c.getModel();var t=m.getProperty("/tileModel");var T=c.getViewData().chip;var b=u.tileActionsRows2TileActionsArray(m.getProperty("/config/tile_actions_rows"));var e={display_icon_url:m.getProperty("/config/display_icon_url"),navigation_use_semantic_object:m.getProperty("/config/navigation_use_semantic_object"),navigation_target_url:m.getProperty("/config/navigation_target_url"),navigation_semantic_object:jQuery.trim(m.getProperty("/config/navigation_semantic_object"))||"",navigation_semantic_action:jQuery.trim(m.getProperty("/config/navigation_semantic_action"))||"",navigation_semantic_parameters:jQuery.trim(m.getProperty("/config/navigation_semantic_parameters")),display_search_keywords:m.getProperty("/config/display_search_keywords")};var r=u.checkInputOnSaveConfig(c);if(!r){r=u.checkTileActions(c);}if(r){d.reject("mandatory_fields_missing");return d.promise();}if(e.navigation_use_semantic_object){e.navigation_target_url=a.getSemanticNavigationUrl(e);m.setProperty("/config/navigation_target_url",e.navigation_target_url);}var f=T.bag.getBag('tileProperties');f.setText('display_title_text',m.getProperty("/config/display_title_text"));f.setText('display_subtitle_text',m.getProperty("/config/display_subtitle_text"));f.setText('display_info_text',m.getProperty("/config/display_info_text"));f.setText('display_search_keywords',e.display_search_keywords);var g=T.bag.getBag('tileNavigationActions');u.populateTileNavigationActionsBag(g,b);function l(E,o){jQuery.sap.log.error(E,null,"sap.ushell.components.tiles.applauncher.StaticTile.controller");d.reject(E,o);}T.writeConfiguration.setParameterValues({tileConfiguration:JSON.stringify(e)},function(){var o=a.getConfiguration(T,false,false),h=a.getConfiguration(T,true,false),m=new sap.ui.model.json.JSONModel({config:o,nav:{navigation_target_url:""},tileModel:t});c.setModel(m);t.setData({config:h,nav:{navigation_target_url:""}},false);if(T.preview){T.preview.setTargetUrl(o.navigation_target_url);T.preview.setPreviewIcon(o.display_icon_url);T.preview.setPreviewTitle(o.display_title_text);if(T.preview.setPreviewSubtitle&&typeof T.preview.setPreviewSubtitle==='function'){T.preview.setPreviewSubtitle(o.display_subtitle_text);}}f.save(function(){jQuery.sap.log.debug("property bag 'tileProperties' saved successfully");if(T.title){T.title.setTitle(o.display_title_text,function(){d.resolve();},l);}else{d.resolve();}},l);g.save(function(){jQuery.sap.log.debug("property bag 'navigationProperties' saved successfully");},l);},l);return d.promise();},onCancelConfiguration:function(c){var v=c.getViewData(),m=c.getModel(),t=m.getProperty("/tileModel"),T=v.chip,o=a.getConfiguration(T,T.configurationUi.isEnabled(),false);c.getModel().setData({config:o,nav:{navigation_target_url:""},tileModel:t},false);}});},false); sap.ui.predefine('sap/ushell/components/tiles/applauncher/StaticTile.view',["sap/m/GenericTile","sap/m/ImageContent","sap/m/Link"],function(G,I,L){"use strict";sap.ui.jsview("sap.ushell.components.tiles.applauncher.StaticTile",{getControllerName:function(){return"sap.ushell.components.tiles.applauncher.StaticTile";},createContent:function(c){this.setHeight('100%');this.setWidth('100%');return this.getTileControl();},getTileControl:function(){var c=this.getController();return new sap.m.GenericTile({mode:'{/mode}',header:'{/config/display_title_text}',subheader:'{/config/display_subtitle_text}',sizeBehavior:'{/sizeBehavior}',size:"Auto",tileContent:new sap.m.TileContent({size:"Auto",footer:'{/config/display_info_text}',content:new I({src:'{/config/display_icon_url}'})}),press:[c.onPress,c]});},getMode:function(){return this.getModel().getProperty("/mode");}});},false); sap.ui.predefine('sap/ushell/components/tiles/applauncherdynamic/DynamicTile.controller',["sap/ui/thirdparty/datajs","sap/ui/thirdparty/URI","sap/ushell/components/tiles/utils","sap/ushell/components/tiles/utilsRT","sap/ushell/components/applicationIntegration/AppLifeCycle","sap/ushell/Config","sap/m/GenericTileMode"],function(O,U,u,a,A,C,G){"use strict";sap.ui.getCore().loadLibrary("sap.m");sap.ui.controller("sap.ushell.components.tiles.applauncherdynamic.DynamicTile",{timer:null,_aDoableObject:{},oDataRequest:null,sConfigNavigationTargetUrlOld:"",REFRESH_INTERVAL_MIN:10,constructTargetUrlWithSapSystem:function(n,s){var o,h;if(s){o=sap.ushell.Container.getService("URLParsing");if(o.isIntentUrl(n)){h=o.parseShellHash(n);if(!h.params){h.params={};}h.params["sap-system"]=s;n="#"+o.constructShellHash(h);}else{n+=((n.indexOf("?")<0)?"?":"&")+"sap-system="+s;}}return n;},onInit:function(){var v=this.getView(),V=v.getViewData(),t=V.chip,c=a.getConfiguration(t,t.configurationUi.isEnabled(),false),m,k,K,b=this,N=c.navigation_target_url,s;this.sConfigNavigationTargetUrlOld=c.navigation_target_url;jQuery.sap.log.setLevel(2,"sap.ushell.components.tiles.applauncherdynamic.DynamicTile");this.bIsRequestCompleted=false;this.oShellModel=A.getElementsModel();s=t.url.getApplicationSystem();this.navigationTargetUrl=this.constructTargetUrlWithSapSystem(N,s);m=new sap.ui.model.json.JSONModel({sizeBehavior:C.last("/core/home/sizeBehavior"),config:c,mode:c["display_mode"]||G.ContentMode,data:a.getDataToDisplay(c,{number:((t.preview&&t.preview.isEnabled())?1234:"...")}),nav:{navigation_target_url:(t.configurationUi&&t.configurationUi.isEnabled()?"":this.navigationTargetUrl)},search:{display_highlight_terms:[]}});v.setModel(m);this._aDoableObject=C.on("/core/home/sizeBehavior").do(function(S){m.setProperty("/sizeBehavior",S);});if(t.types){t.types.attachSetType(function(T){if(b.tileType!=T){var m=b.getView().getModel();if(T==='link'){m.setProperty("/mode",G.LineMode);}else{m.setProperty("/mode",m.getProperty("/config/display_mode")||G.ContentMode);}b.tileType=T;}});}if(!this.tileType){this.tileType="tile";}if(t.search){k=v.getModel().getProperty("/config/display_search_keywords");K=k.split(/[, ]+/).filter(function(n,i){return n&&n!=="";});if(c.display_title_text&&c.display_title_text!==""&&K.indexOf(c.display_title_text)===-1){K.push(c.display_title_text);}if(c.display_subtitle_text&&c.display_subtitle_text!==""&&K.indexOf(c.display_subtitle_text)===-1){K.push(c.display_subtitle_text);}if(c.display_info_text&&c.display_info_text!==""&&K.indexOf(c.display_info_text)===-1){K.push(c.display_info_text);}if(c.display_number_unit&&c.display_number_unit!==""&&K.indexOf(c.display_number_unit)===-1){K.push(c.display_number_unit);}t.search.setKeywords(K);t.search.attachHighlight(function(h){v.getModel().setProperty("/search/display_highlight_terms",h);});}if(t.bag&&t.bag.attachBagsUpdated){t.bag.attachBagsUpdated(function(g){if(g.indexOf("tileProperties")>-1){u._updateTilePropertiesTexts(v,t.bag.getBag('tileProperties'));}});}if(t.configuration&&t.configuration.attachConfigurationUpdated){t.configuration.attachConfigurationUpdated(function(g){if(g.indexOf("tileConfiguration")>-1){u._updateTileConfiguration(v,t.configuration.getParameterValueAsString("tileConfiguration"));}});}if(t.preview){t.preview.setTargetUrl(this.navigationTargetUrl);t.preview.setPreviewIcon(c.display_icon_url);t.preview.setPreviewTitle(c.display_title_text);if(t.preview.setPreviewSubtitle&&typeof t.preview.setPreviewSubtitle==='function'){t.preview.setPreviewSubtitle(c.display_subtitle_text);}}if(t.refresh){t.refresh.attachRefresh(this.refreshHandler.bind(this));}if(t.visible){t.visible.attachVisible(this.visibleHandler.bind(this));}if(t.configurationUi.isEnabled()){t.configurationUi.setUiProvider(function(){var o=u.getConfigurationUi(v,"sap.ushell.components.tiles.applauncherdynamic.Configuration");t.configurationUi.attachCancel(b.onCancelConfiguration.bind(null,o));t.configurationUi.attachSave(b.onSaveConfiguration.bind(null,o));return o;});this.getView().getContent()[0].setTooltip(u.getResourceBundleModel().getResourceBundle().getText("edit_configuration.tooltip"));}else if(!t.preview||!t.preview.isEnabled()){if(!s){sap.ushell.Container.addRemoteSystemForServiceUrl(c.service_url);}this.bNeedsRefresh=true;this.iNrOfTimerRunning=0;}if(t.actions){var d=c.actions,e;if(d){e=d.slice();}else{e=[];}var T=m.getProperty("/mode")===G.LineMode?"link":"tile",f=a.getTileSettingsAction(m,this.onSaveRuntimeSettings.bind(this),T);e.push(f);t.actions.setActionsProvider(function(){return e;});}sap.ui.getCore().getEventBus().subscribe("launchpad","sessionTimeout",this.stopRequests,this);},stopRequests:function(){if(this.timer){clearTimeout(this.timer);}if(this.oDataRequest){try{this.bIsAbortRequestFlow=true;this.oDataRequest.abort();}catch(e){jQuery.sap.log.warning(e.name,e.message);}this.bNeedsRefresh=true;this.bIsAbortRequestFlow=undefined;}},onExit:function(){this.stopRequests();sap.ui.getCore().getEventBus().unsubscribe("launchpad","sessionTimeout",this.stopRequests,this);this._aDoableObject.off();},onPress:function(e){var v=this.getView(),V=v.getViewData(),m=v.getModel(),t=m.getProperty("/nav/navigation_target_url"),T=V.chip,c=m.getProperty("/config"),r={},R=sap.ushell.Container.getRenderer("fiori2");if(e.getSource().getScope&&e.getSource().getScope()===sap.m.GenericTileScope.Display){if(T.configurationUi.isEnabled()){T.configurationUi.display();}else if(t){if(t[0]==='#'){hasher.setHash(t);}else{r.title=c.display_title_text;r.appType="App";r.url=c.navigation_target_url;r.appId=c.navigation_target_url;R.logRecentActivity(r);window.open(t,'_blank');}}}},extractData:function(d){var n,k=["results","icon","title","number","numberUnit","info","infoState","infoStatus","targetParams","subtitle","stateArrow","numberState","numberDigits","numberFactor"];if(typeof d==="object"&&Object.keys(d).length===1){n=Object.keys(d)[0];if(jQuery.inArray(n,k)===-1){return d[n];}}return d;},onSaveRuntimeSettings:function(s){var v=this.getView(),V=v.getModel(),t=v.getViewData().chip,c=V.getProperty("/config"),S=s.getModel();c.display_title_text=S.getProperty('/title');c.display_subtitle_text=S.getProperty('/subtitle');c.display_info_text=S.getProperty('/info');c.display_search_keywords=S.getProperty('/keywords');var b=t.bag.getBag('tileProperties');b.setText('display_title_text',c.display_title_text);b.setText('display_subtitle_text',c.display_subtitle_text);b.setText('display_info_text',c.display_info_text);b.setText('display_search_keywords',c.display_search_keywords);function l(e){jQuery.sap.log.error(e,null,"sap.ushell.components.tiles.applauncherdynamic.DynamicTile.controller");}b.save(function(){jQuery.sap.log.debug("property bag 'tileProperties' saved successfully");V.setProperty("/config",c);V.setProperty('/data/display_title_text',c.display_title_text);V.setProperty('/data/display_subtitle_text',c.display_subtitle_text);V.setProperty('/data/display_info_text',c.display_info_text);V.refresh();},l);},onSaveConfiguration:function(c){var d=jQuery.Deferred(),m=c.getModel(),t=m.getProperty("/tileModel"),T=c.getViewData().chip,b=u.tileActionsRows2TileActionsArray(m.getProperty("/config/tile_actions_rows")),e={display_icon_url:m.getProperty("/config/display_icon_url"),display_number_unit:m.getProperty("/config/display_number_unit"),service_url:m.getProperty("/config/service_url"),service_refresh_interval:m.getProperty("/config/service_refresh_interval"),navigation_use_semantic_object:m.getProperty("/config/navigation_use_semantic_object"),navigation_target_url:m.getProperty("/config/navigation_target_url"),navigation_semantic_object:jQuery.trim(m.getProperty("/config/navigation_semantic_object"))||"",navigation_semantic_action:jQuery.trim(m.getProperty("/config/navigation_semantic_action"))||"",navigation_semantic_parameters:jQuery.trim(m.getProperty("/config/navigation_semantic_parameters")),display_search_keywords:m.getProperty("/config/display_search_keywords")};var r=u.checkInputOnSaveConfig(c);if(!r){r=u.checkTileActions(c);}if(r){d.reject("mandatory_fields_missing");return d.promise();}if(e.navigation_use_semantic_object){e.navigation_target_url=a.getSemanticNavigationUrl(e);m.setProperty("/config/navigation_target_url",e.navigation_target_url);}var f=T.bag.getBag('tileProperties');f.setText('display_title_text',m.getProperty("/config/display_title_text"));f.setText('display_subtitle_text',m.getProperty("/config/display_subtitle_text"));f.setText('display_info_text',m.getProperty("/config/display_info_text"));f.setText('display_search_keywords',e.display_search_keywords);var g=T.bag.getBag('tileNavigationActions');u.populateTileNavigationActionsBag(g,b);function l(E,o){jQuery.sap.log.error(E,null,"sap.ushell.components.tiles.applauncherdynamic.DynamicTile.controller");d.reject(E,o);}T.writeConfiguration.setParameterValues({tileConfiguration:JSON.stringify(e)},function(){var o=a.getConfiguration(T,false,false),h=a.getConfiguration(T,true,false),m=new sap.ui.model.json.JSONModel({config:o,tileModel:t});c.setModel(m);t.setData({data:h,nav:{navigation_target_url:""}},false);if(T.preview){T.preview.setTargetUrl(o.navigation_target_url);T.preview.setPreviewIcon(o.display_icon_url);T.preview.setPreviewTitle(o.display_title_text);if(T.preview.setPreviewSubtitle&&typeof T.preview.setPreviewSubtitle==='function'){T.preview.setPreviewSubtitle(o.display_subtitle_text);}}f.save(function(){jQuery.sap.log.debug("property bag 'tileProperties' saved successfully");if(T.title){T.title.setTitle(o.display_title_text,function(){d.resolve();},l);}else{d.resolve();}},l);g.save(function(){jQuery.sap.log.debug("property bag 'navigationProperties' saved successfully");},l);},l);return d.promise();},successHandlerFn:function(r,R){var v=this.getView(),m=v.getModel(),c=m.getProperty("/config"),V=v.getViewData(),t=V.chip,s=t.url.getApplicationSystem(),d;this.oDataRequest=undefined;if(typeof R==="object"){var b=jQuery.sap.getUriParameters(r).get("$inlinecount");if(b&&b==="allpages"){R={number:R.__count};}else{R=this.extractData(R);}}else if(typeof R==="string"){R={number:R};}if(V.properties&&V.properties.info){if(typeof R==="object"){R.info=V.properties.info;}}d=a.getDataToDisplay(c,R);m.setProperty("/data",d);if(this.sConfigNavigationTargetUrlOld!==c.navigation_target_url){this.navigationTargetUrl=this.constructTargetUrlWithSapSystem(c.navigation_target_url,s);this.sConfigNavigationTargetUrlOld=this.navigationTargetUrl;}m.setProperty("/nav/navigation_target_url",a.addParamsToUrl(this.navigationTargetUrl,d));var i=c.service_refresh_interval;if(i>0){i=Math.max(i,this.REFRESH_INTERVAL_MIN);jQuery.sap.log.info("Wait "+i+" seconds before calling "+c.service_url+" again",null,"sap.ushell.components.tiles.applauncherdynamic.DynamicTile.controller");this.refeshAfterInterval(i);}},errorHandlerFn:function(m,i){var v=this.getView(),M=v.getModel(),c=M.getProperty("/config"),s=m&&m.message?m.message:m,r=u.getResourceBundleModel().getResourceBundle();this.oDataRequest=undefined;if(s==="Request aborted"){jQuery.sap.log.info("Data request from service "+c.service_url+" was aborted",null,"sap.ushell.components.tiles.applauncherdynamic.DynamicTile");}else{if(m.response){s+=" - "+m.response.statusCode+" "+m.response.statusText;}var l=i?jQuery.sap.log.warning:jQuery.sap.log.error;l("Failed to update data via service\n"+" service URL: "+c.service_url+"\n"+" "+s,null,"sap.ushell.components.tiles.applauncherdynamic.DynamicTile");}if(!this.bIsAbortRequestFlow){M.setProperty("/data",a.getDataToDisplay(c,{number:"???",info:r.getText("dynamic_data.error"),infoState:"Critical"}));}},onCancelConfiguration:function(c,s,e){var v=c.getViewData(),m=c.getModel(),t=m.getProperty("/tileModel"),T=v.chip,o=a.getConfiguration(T,false,false);m.setData({config:o,tileModel:t},false);},prepareToLoadData:function(){var d=this.getView(),c=d.getModel().getProperty("/config"),t=d.getViewData().chip,s=c.service_url,r,g,b=this;if(!s){this.errorHandlerFn("No service URL given!",true);return;}if(/;o=([;\/?]|$)/.test(s)){s=t.url.addSystemToServiceUrl(s);}if(this.serviceUrlWithDefaults){g=new jQuery.Deferred().resolve({url:this.serviceUrlWithDefaults}).promise();}else{r=sap.ushell.Container.getService("ReferenceResolver");g=r.resolveUserDefaultParameters(s);}g.done(b.loadData.bind(b)).fail(b.errorHandlerFn.bind(b));},loadData:function(r){if(r.defaultsWithoutValue&&r.defaultsWithoutValue.length>0){this.errorHandlerFn("The service URL contains User Default(s) with no set value: "+r.defaultsWithoutValue.join(", "),true);return;}if(r.ignoredReferences&&r.ignoredReferences.length>0){this.errorHandlerFn("The service URL contains invalid Reference(s): "+r.ignoredReferences.join(", "),false);return;}var s=r.url,S,b,R,o;this.serviceUrlWithDefaults=s;R={"Cache-Control":"no-cache, no-store, must-revalidate","Pragma":"no-cache","Expires":"0","Accept-Language":(sap.ui&&sap.ui.getCore().getConfiguration().getLanguage())||""};if(sap.ushell.Container){S=sap.ui.getCore().getConfiguration().getSAPLogonLanguage();if(S){R["sap-language"]=S;}b=sap.ushell.Container.getLogonSystem()?sap.ushell.Container.getLogonSystem().getClient():"";o=new U(s);if(b&&!o.protocol()){R["sap-client"]=b;}}if(S&&s.indexOf("sap-language=")===-1){s=s+(s.indexOf("?")>=0?"&":"?")+"sap-language="+S;}this.oDataRequest=O.read({requestUri:s,headers:R},this.successHandlerFn.bind(this,s),this.errorHandlerFn.bind(this));},refreshTile:function(){var v=this.getView(),V=v.getViewData(),i=V.chip.visible.isVisible();if(i&&this.bNeedsRefresh){this.bNeedsRefresh=false;if(!this.oDataRequest){this.prepareToLoadData();}}},refeshAfterInterval:function(r){var t=this;this.iNrOfTimerRunning++;setTimeout(function(){t.iNrOfTimerRunning--;if(t.iNrOfTimerRunning===0){t.bNeedsRefresh=true;t.refreshTile();}},r*1000);},refreshHandler:function(){this.bNeedsRefresh=true;this.refreshTile();},visibleHandler:function(i){if(i){this.refreshTile();}else{this.stopRequests();}}});},false); sap.ui.predefine('sap/ushell/components/tiles/applauncherdynamic/DynamicTile.view',["sap/m/GenericTile","sap/m/Link"],function(G,L){"use strict";sap.ui.jsview("sap.ushell.components.tiles.applauncherdynamic.DynamicTile",{getControllerName:function(){return"sap.ushell.components.tiles.applauncherdynamic.DynamicTile";},createContent:function(c){this.setHeight('100%');this.setWidth('100%');return this.getTileControl();},getTileControl:function(){var c=this.getController();return new G({mode:'{/mode}',header:'{/data/display_title_text}',subheader:'{/data/display_subtitle_text}',size:"Auto",sizeBehavior:'{/sizeBehavior}',tileContent:[new sap.m.TileContent({size:"Auto",footer:'{/data/display_info_text}',footerColor:{path:"/data/display_info_state",formatter:function(f){if(!sap.m.ValueColor[f]){f=sap.m.ValueColor.Neutral;}return f;}},unit:'{/data/display_number_unit}',content:[new sap.m.NumericContent({scale:'{/data/display_number_factor}',value:'{/data/display_number_value}',truncateValueTo:5,indicator:'{/data/display_state_arrow}',valueColor:{path:"/data/display_number_state",formatter:function(v){if(!sap.m.ValueColor[v]){v=sap.m.ValueColor.Neutral;}return v;}},icon:'{/data/display_icon_url}',width:'100%'})]})],press:[c.onPress,c]});},onAfterRendering:function(){var m=this.getModel(),d=m.getProperty('/data/display_info_state'),e=this.getDomRef(),a=e?e.getElementsByClassName('sapMTileCntFtrTxt')[0]:null;if(a){switch(d){case'Negative':a.classList.add('sapUshellTileFooterInfoNegative');break;case'Neutral':a.classList.add('sapUshellTileFooterInfoNeutral');break;case'Positive':a.classList.add('sapUshellTileFooterInfoPositive');break;case'Critical':a.classList.add('sapUshellTileFooterInfoCritical');break;default:return;}}},getMode:function(){return this.getModel().getProperty("/mode");}});},false); sap.ui.predefine('sap/ushell/components/tiles/cdm/applauncher/Component',["sap/ui/core/UIComponent"],function(U){"use strict";return U.extend("sap.ushell.components.tiles.cdm.applauncher.Component",{metadata:{},createContent:function(){var c=this.getComponentData();var p=c.properties.tilePersonalization||{};var s=c.startupParameters;if(s&&s["sap-system"]){p["sap-system"]=s["sap-system"][0];}var t=sap.ui.view({type:sap.ui.core.mvc.ViewType.JS,viewName:"sap.ushell.components.tiles.cdm.applauncher.StaticTile",viewData:{properties:c.properties,configuration:p},async:true});t.loaded().then(function(v){this._oController=t.getController();}.bind(this));return t;},tileSetVisualProperties:function(n){if(this._oController){this._oController.updatePropertiesHandler(n);}},tileRefresh:function(){},tileSetVisible:function(i){},exit:function(){this._oController=null;}});}); sap.ui.predefine('sap/ushell/components/tiles/cdm/applauncher/StaticTile.controller',['sap/ui/core/mvc/Controller','sap/ushell/components/applicationIntegration/AppLifeCycle','sap/ushell/Config'],function(C,A,a){"use strict";return C.extend("sap.ushell.components.tiles.cdm.applauncher.StaticTile",{_aDoableObject:{},_getConfiguration:function(){var c=this.getView().getViewData();c.properties.sizeBehavior=a.last("/core/home/sizeBehavior");return c;},onInit:function(){var v=this.getView();var m=new sap.ui.model.json.JSONModel();m.setData(this._getConfiguration());v.setModel(m);this._aDoableObject=a.on("/core/home/sizeBehavior").do(function(s){m.setProperty("/properties/sizeBehavior",s);});},onExit:function(){this._aDoableObject.off();},onPress:function(e){var c=this.getView().getViewData().properties,r={},R=sap.ushell.Container.getRenderer("fiori2");if(e.getSource().getScope&&e.getSource().getScope()===sap.m.GenericTileScope.Display){var t=this._createTargetUrl();if(t.length===0){return;}if(t[0]==='#'){hasher.setHash(t);}else{r.title=c.title;r.appType="App";r.url=c.targetURL;r.appId=c.targetURL;R.logRecentActivity(r);window.open(t,'_blank');}}},updatePropertiesHandler:function(n){var t=this.getView().getContent()[0],T=t.getTileContent()[0];if(typeof n.title!=='undefined'){t.setHeader(n.title);}if(typeof n.subtitle!=='undefined'){t.setSubheader(n.subtitle);}if(typeof n.icon!=='undefined'){T.getContent().setSrc(n.icon);}if(typeof n.info!=='undefined'){T.setFooter(n.info);}},_createTargetUrl:function(){var t=this.getView().getViewData().properties.targetURL,s=this.getView().getViewData().configuration["sap-system"],u,h;if(t&&s){u=sap.ushell.Container.getService("URLParsing");if(u.isIntentUrl(t)){h=u.parseShellHash(t);if(!h.params){h.params={};}h.params["sap-system"]=s;t="#"+u.constructShellHash(h);}else{t+=((t.indexOf("?")<0)?"?":"&")+"sap-system="+s;}}return t;},_getCurrentProperties:function(){var t=this.getView().getContent()[0],T=t.getTileContent()[0],s=a.last("/core/home/sizeBehavior");return{title:t.getHeader(),subtitle:t.getSubheader(),info:T.getFooter(),icon:T.getContent().getSrc(),sizeBehavior:s};}});},true); sap.ui.predefine('sap/ushell/components/tiles/cdm/applauncher/StaticTile.view',["sap/m/GenericTile","sap/m/ImageContent","sap/m/TileContent","sap/ui/core/mvc/JSView"],function(G,I,T){"use strict";return sap.ui.jsview("sap.ushell.components.tiles.cdm.applauncher.StaticTile",{getControllerName:function(){return"sap.ushell.components.tiles.cdm.applauncher.StaticTile";},createContent:function(c){var v=this.getViewData().properties;this.setHeight('100%');this.setWidth('100%');return new G({header:v.title,subheader:v.subtitle,size:'Auto',sizeBehavior:'{/properties/sizeBehavior}',tileContent:new T({size:"Auto",footer:v.info,content:new I({src:v.icon,width:"100%"})}),press:[c.onPress,c]});}});},true); sap.ui.predefine('sap/ushell/components/tiles/cdm/applauncherdynamic/Component',["sap/ui/core/UIComponent"],function(U){"use strict";return U.extend("sap.ushell.components.tiles.cdm.applauncherdynamic.Component",{metadata:{},createContent:function(){var c=this.getComponentData();var p=c.properties||{};var P=p.tilePersonalization||{};var i=p.indicatorDataSource;if(i&&i.path){P.serviceUrl=i.path;P.serviceRefreshInterval=i.refresh;}var s=c.startupParameters;if(s&&s["sap-system"]&&s["sap-system"][0]){P["sap-system"]=s["sap-system"][0];}if(P.serviceUrl&&P.serviceUrl.charAt(0)!=="/"&&p.dataSource&&p.dataSource.uri){var S=p.dataSource.uri;if(P["sap-system"]){if(S.charAt(S.length-1)==="/"){S=S.slice(0,S.length-1);}S+=";o="+P["sap-system"];}if(S.charAt(S.length-1)!=="/"){S+="/";}S+=P.serviceUrl;P.serviceUrl=S;}var t=sap.ui.view({type:sap.ui.core.mvc.ViewType.JS,viewName:"sap.ushell.components.tiles.cdm.applauncherdynamic.DynamicTile",viewData:{properties:p,configuration:P},async:true});t.loaded().then(function(v){this._oController=t.getController();this.tileRefresh();}.bind(this));return t;},tileSetVisualProperties:function(n){if(this._oController){this._oController.updateVisualPropertiesHandler(n);}},tileRefresh:function(){if(this._oController){this._oController.refreshHandler();}},tileSetVisible:function(i){if(this._oController){this._oController.visibleHandler(i);}},exit:function(){this._oController=null;}});}); sap.ui.predefine('sap/ushell/components/tiles/cdm/applauncherdynamic/DynamicTile.controller',["sap/ui/core/mvc/Controller","sap/ushell/components/tiles/utils","sap/ui/core/format/NumberFormat","sap/ushell/Config","sap/ui/thirdparty/datajs","sap/ui/thirdparty/URI"],function(C,u,N,a,O,U){"use strict";return C.extend("sap.ushell.components.tiles.cdm.applauncherdynamic.DynamicTile",{timer:null,_aDoableObject:{},oDataRequest:null,_getConfiguration:function(){var v=this.getView().getViewData(),c={},o,h;c.configuration=v.configuration;c.properties=v.properties;c.properties.info=c.properties.info||"";c.properties.number_value='...';c.properties.number_value_state='Neutral';c.properties.number_state_arrow='None';c.properties.number_factor='';c.properties.number_unit='';var s=c.configuration["sap-system"];var t=c.properties.targetURL;if(t&&s){o=sap.ushell.Container.getService("URLParsing");if(o.isIntentUrl(t)){h=o.parseShellHash(t);if(!h.params){h["params"]={};}h.params["sap-system"]=s;t="#"+o.constructShellHash(h);}else{t+=((t.indexOf("?")<0)?"?":"&")+"sap-system="+s;}c.properties.targetURL=t;}c.properties.sizeBehavior=a.last("/core/home/sizeBehavior");return c;},onInit:function(){var v=this.getView();var m=new sap.ui.model.json.JSONModel();m.setData(this._getConfiguration());v.setModel(m);this._aDoableObject=a.on("/core/home/sizeBehavior").do(function(s){m.setProperty("/properties/sizeBehavior",s);});},refreshHandler:function(){this.loadData(0);},visibleHandler:function(i){if(i){if(!this.oDataRequest){this.refreshHandler(this);}}else{this.stopRequests();}},updateVisualPropertiesHandler:function(n){var p=this.getView().getModel().getProperty("/properties");var c=false;if(typeof n.title!=='undefined'){p.title=n.title;c=true;}if(typeof n.subtitle!=='undefined'){p.subtitle=n.subtitle;c=true;}if(typeof n.icon!=='undefined'){p.icon=n.icon;c=true;}if(typeof n.targetURL!=='undefined'){p.targetURL=n.targetURL;c=true;}if(typeof n.info!=='undefined'){p.info=n.info;c=true;}if(c){this.getView().getModel().setProperty("/properties",p);}},stopRequests:function(){if(this.timer){clearTimeout(this.timer);}if(this.oDataRequest){try{this.oDataRequest.abort();}catch(e){jQuery.sap.log.warning(e.name,e.message);}}},onPress:function(e){var r={},R=sap.ushell.Container.getRenderer("fiori2");if(e.getSource().getScope&&e.getSource().getScope()===sap.m.GenericTileScope.Display){var t=this.getView().getModel().getProperty("/properties/targetURL"),T=this.getView().getModel().getProperty("/properties/title");if(!t){return;}else if(t[0]==='#'){hasher.setHash(t);}else{r.title=T;r.appType="App";r.url=t;r.appId=t;R.logRecentActivity(r);window.open(t,'_blank');}}},initUpdateDynamicData:function(){var v=this.getView(),s=v.getModel().getProperty("/configuration/serviceUrl"),S=v.getModel().getProperty("/configuration/serviceRefreshInterval");if(!S){S=0;}else if(S<10){jQuery.sap.log.warning("Refresh Interval "+S+" seconds for service URL "+s+" is less than 10 seconds, which is not supported. Increased to 10 seconds automatically.",null,"sap.ushell.components.tiles.cdm.applauncherdynamic.DynamicTile.controller");S=10;}if(s){this.loadData(S);}},extractData:function(d){var n,k=["results","icon","title","number","numberUnit","info","infoState","infoStatus","targetParams","subtitle","stateArrow","numberState","numberDigits","numberFactor"];if(typeof d==="object"&&Object.keys(d).length===1){n=Object.keys(d)[0];if(jQuery.inArray(n,k)===-1){return d[n];}}return d;},successHandleFn:function(r){var c=this.getView().getModel().getProperty("/configuration");var d=r;this.oDataRequest=undefined;if(typeof r==="object"){var b=jQuery.sap.getUriParameters(c.serviceUrl).get("$inlinecount");if(b&&b==="allpages"){d={number:r.__count};}else{d=this.extractData(d);}}else if(typeof r==="string"){d={number:r};}this.updatePropertiesHandler(d);},errorHandlerFn:function(m){this.oDataRequest=undefined;var M=m&&m.message?m.message:m,r=u.getResourceBundleModel().getResourceBundle(),s=this.getView().getModel().getProperty("/configuration/serviceUrl");if(m.response){M+=" - "+m.response.statusCode+" "+m.response.statusText;}jQuery.sap.log.error("Failed to update data via service "+s+": "+M,null,"sap.ushell.components.tiles.cdm.applauncherdynamic.DynamicTile");this.updatePropertiesHandler({number:"???",info:r.getText("dynamic_data.error")});},loadData:function(s){var b=this.getView().getModel().getProperty("/configuration/serviceUrl"),S,c,r,o;if(!b){return;}r={"Cache-Control":"no-cache, no-store, must-revalidate","Pragma":"no-cache","Expires":"0","Accept-Language":(sap.ui&&sap.ui.getCore().getConfiguration().getLanguage())||""};if(s>0){jQuery.sap.log.info("Wait "+s+" seconds before calling "+b+" again",null,"sap.ushell.components.tiles.cdm.applauncherdynamic.DynamicTile.controller");this.timer=setTimeout(this.loadData.bind(this,s,false),(s*1000));}if(!this.oDataRequest){if(sap.ushell.Container){S=sap.ui.getCore().getConfiguration().getSAPLogonLanguage();if(S){r["sap-language"]=S;}c=sap.ushell.Container.getLogonSystem()?sap.ushell.Container.getLogonSystem().getClient():"";o=new U(b);if(c&&!o.protocol()){r["sap-client"]=c;}}if((S)&&(b.indexOf("sap-language=")==-1)){b=b+(b.indexOf("?")>=0?"&":"?")+"sap-language="+S;}this.oDataRequest=O.read({requestUri:b,headers:r},this.successHandleFn.bind(this),this.errorHandlerFn.bind(this));}},onExit:function(){this.stopRequests();this._aDoableObject.off();},addParamsToUrl:function(s,t){var p="",b=s.indexOf("?")!==-1,i;if(t&&t.length>0){for(i=0;i0){if(!b){s+="?";}else{s+="&";}s+=p;}return s;},_normalizeNumber:function(n,m,b,i){var c;if(isNaN(n)){c=n;}else{var o=sap.ui.core.format.NumberFormat.getFloatInstance({maxFractionDigits:i});if(!b){var d=Math.abs(n);if(d>=1000000000){b='B';n/=1000000000;}else if(d>=1000000){b='M';n/=1000000;}else if(d>=1000){b='K';n/=1000;}}c=o.format(n);}var e=c;var f=e[m-1];m-=(f==='.'||f===',')?1:0;e=e.substring(0,m);return{displayNumber:e,numberFactor:b};},updatePropertiesHandler:function(d){var e=u.getResourceBundleModel().getResourceBundle().getText("dynamic_data.error");var b=0,i,n,c,s,p=this.getView().getModel().getProperty("/properties"),o={title:d.title||p.title||"",subtitle:d.subtitle||p.subtitle||"",icon:d.icon||p.icon||"",targetURL:d.targetURL||p.targetURL||"",number_value:!isNaN(d.number)?d.number:"...",number_digits:d.numberDigits>=0?d.numberDigits:4,info:p.info==e?d.info||"":d.info||p.info||"",number_unit:d.numberUnit||p.number_unit||"",number_state_arrow:d.stateArrow||p.number_state_arrow||"None",number_value_state:d.numberState||p.number_value_state||"Neutral",number_factor:d.numberFactor||p.number_factor||""};var t=[];if(d.targetParams){t.push(d.targetParams);}if(d.results){for(i=0,n=d.results.length;i0){o.targetURL=this.addParamsToUrl(o.targetURL,t);}if(!isNaN(d.number)){if(typeof d.number==="string"){d.number=d.number.trim();}var S=this._shouldProcessDigits(d.number,d.numberDigits),m=o.icon?4:5;if(d.number&&d.number.length>=m||S){var f=this._normalizeNumber(d.number,m,d.numberFactor,d.numberDigits);o.number_factor=f.numberFactor;o.number_value=f.displayNumber;}else{var g=N.getFloatInstance({maxFractionDigits:m});o.number_value=g.format(d.number);}}if(o.number_value_state){switch(o.number_value_state){case"Positive":o.number_value_state="Good";break;case"Negative":o.number_value_state="Error";break;}}o.sizeBehavior=a.last("/core/home/sizeBehavior");this.getView().getModel().setProperty("/properties",o);},_shouldProcessDigits:function(d,D){var n;d=typeof(d)!=='string'?d.toString():d;if(d.indexOf('.')!==-1){n=d.split(".")[1].length;if(n>D){return true;}}return false;}});},true); sap.ui.predefine('sap/ushell/components/tiles/cdm/applauncherdynamic/DynamicTile.view',['sap/m/GenericTile','sap/m/TileContent','sap/m/NumericContent'],function(G,T,N){"use strict";sap.ui.jsview("sap.ushell.components.tiles.cdm.applauncherdynamic.DynamicTile",{getControllerName:function(){return"sap.ushell.components.tiles.cdm.applauncherdynamic.DynamicTile";},createContent:function(c){this.setHeight('100%');this.setWidth('100%');return new G({size:'Auto',header:'{/properties/title}',subheader:'{/properties/subtitle}',sizeBehavior:'{/properties/sizeBehavior}',tileContent:[new T({size:'Auto',footer:'{/properties/info}',footerColor:{path:"/data/display_info_state",formatter:function(f){if(!sap.m.ValueColor[f]){f=sap.m.ValueColor.Neutral;}return f;}},unit:'{/properties/number_unit}',sizeBehavior:'{/properties/sizeBehavior}',content:[new N({truncateValueTo:5,scale:'{/properties/number_factor}',value:'{/properties/number_value}',indicator:'{/properties/number_state_arrow}',valueColor:{path:"/data/display_number_state",formatter:function(v){if(!sap.m.ValueColor[v]){v=sap.m.ValueColor.Neutral;}return v;}},icon:'{/properties/icon}',width:'100%'})]})],press:[c.onPress,c]});}});},true); sap.ui.predefine('sap/ushell/components/tiles/utils',["sap/ushell/components/tiles/utilsRT","sap/ushell/resources","sap/ui/thirdparty/datajs"],function(u,r,O){"use strict";var U={};U.isInitial=function(T){return T==="App Launcher – Static"||T==="App Launcher – Dynamic"||T==="Target Mapping";};U.getResourceBundleModel=function(){return r.i18nModel;};U.getEmptyRowObj=function(e){return{name:"",mandatory:false,value:"",isRegularExpression:false,defaultValue:"",valEnabled:false||!e,defValEnabled:true,editable:e};};U.getEmptyTileActionsRowObj=function(e){var R=U.getResourceBundleModel().getResourceBundle();return{menu_title:"",target_type:R.getText("configuration.tile_actions.table.target_type.url"),navigation_target:"",action:"",icon:"",isTargetTypeIntent:false,editable:e};};U.getTileNavigationActionsRows=function(T,e){var a=[],b=[];b=this.getTileNavigationActions(T);if(b.length){for(var i=0;i=0){a=JSON.parse(b.getProperty('tile_navigation_actions'));for(var i=0;i=0){s=b.getText('action_tile_'+(i+1));}a[i].text=s;}}}return a;};var t=function(T,e){var a={},R=U.getResourceBundleModel().getResourceBundle();a.menu_title=T.text;a.icon=T.icon;if((T.targetURL).charAt(0)==="#"){a.target_type=R.getText("configuration.tile_actions.table.target_type.intent");var n=T.targetURL.split("-");a.navigation_target=n[0].substring(1,n[0].length);a.action=n[1];a.isTargetTypeIntent=true;}else{a.target_type=R.getText("configuration.tile_actions.table.target_type.url");a.navigation_target=T.targetURL;a.action="";a.isTargetTypeIntent=false;}a.editable=e;return a;};U.tileActionsRows2TileActionsArray=function(T){var a=[];for(var i=0;i=0){return b.getText('display_title_text');}}if(T.title){return T.title.getTitle();}if(T.preview){return T.preview.getTitle();}return"";};U.getTranslatedSubtitle=function(T,C){if(T.bag){var b=T.bag.getBag('tileProperties');if(b.getTextNames().indexOf("display_subtitle_text")>=0){return b.getText('display_subtitle_text');}}if(typeof C['display_subtitle_text']==="string"){return C['display_subtitle_text'];}if(T.preview&&T.preview.getDescription&&T.preview.getDescription()){return T.preview.getDescription();}return'';};U.getTranslatedProperty=function(T,o,p){if(T.bag){var b=T.bag.getBag('tileProperties');if(b.getTextNames().indexOf(p)>=0){return b.getText(p);}}return o[p];};U.getActionConfiguration=function(T,a){var C=T.configuration.getParameterValueAsString('tileConfiguration');var o=JSON.parse(C||"{}"),R;if(typeof a=="undefined"){a=T.configurationUi.isEnabled();}if(a){R=U.getResourceBundleModel().getResourceBundle();}o.semantic_object=o.semantic_object||(a?"["+R.getText("configuration.semantic_object")+"]":"");o.semantic_action=o.semantic_action||(a?"["+R.getText("configuration.semantic_action")+"]":"");o.navigation_provider=o.navigation_provider||"";o.navigation_provider_role=o.navigation_provider_role||"";o.navigation_provider_instance=o.navigation_provider_instance||"";o.target_application_id=o.target_application_id||"";o.target_application_alias=o.target_application_alias||"";o.display_info_text=o.display_info_text||"";o.editable=true;if(T.configurationUi&&T.configurationUi.isReadOnly){if(T.configurationUi.isReadOnly()){o.editable=false;}}return o;};U.getConfigurationUi=function(v,V){var o=v.getViewData();var T=o.chip;var C,s,R,i,a,A;var u=sap.ui.require("sap/ushell/components/tiles/utilsRT");var b=u.getConfiguration(T,true,true);var e=new sap.ui.model.json.JSONModel({config:b,tileModel:v.getModel()});C=new sap.ui.view({type:sap.ui.core.mvc.ViewType.XML,viewData:o,viewName:V});C.setModel(e);s=C.byId("navigation_semantic_objectInput")||C.byId("semantic_objectInput");if(s){s.getModel().setProperty("/enabled",b.navigation_use_semantic_object);s.getModel().setProperty("/value",b.semantic_object||b.navigation_semantic_object);}R=C.byId("navigation_provider_roleInput");if(R){R.getModel().setProperty("/value",b.navigation_provider_role);}i=C.byId("navigation_provider_instanceInput");if(i){i.getModel().setProperty("/value",b.navigation_provider_instance);}a=C.byId("target_application_aliasInput");if(a){a.getModel().setProperty("/value",b.target_application_alias);}A=C.byId("targetTypeInput");if(A){if(!C.getModel().getProperty("/config/transaction")){C.getModel().setProperty("/config/transaction",{});}if(!C.getModel().getProperty("/config/web_dynpro")){C.getModel().setProperty("/config/web_dynpro",{});}if(v.getModel().getProperty('/config/navigation_provider')=="LPD"){U.displayLpdCustApplicationTypeFields(C);}else if(v.getModel().getProperty('/config/navigation_provider')=="SAPUI5"||v.getModel().getProperty('/config/navigation_provider')==''){A.setSelectedKey("SAPUI5");U.displaySapui5ApplicationTypeFields(C);}else if(v.getModel().getProperty('/config/navigation_provider')=="TR"){U.displayTransactionApplicationTypeFields(C);}else if(v.getModel().getProperty('/config/navigation_provider')=="WDA"){U.displayWebDynproApplicationTypeFields(C);}else if(v.getModel().getProperty('/config/navigation_provider')=="URL"){U.displayURLApplicationTypeFields(C);}}return C;};U._updateTilePropertiesTexts=function(v,T){var a=T.getTextNames(),m=v.getModel();a.forEach(function(p){m.setProperty('/data/'+p,T.getText(p));m.setProperty('/config/'+p,T.getText(p));});};U._updateTileConfiguration=function(v,T){var m=v.getModel();jQuery.each(JSON.parse(T),function(p,P){m.setProperty('/data/'+p,P);m.setProperty('/config/'+p,P);if(p==="navigation_target_url"){m.setProperty('/nav/'+p,P);}});};U.aData=[];U.aActionData=[];U.aRoleData=[];U.aAliasData=[];U.objectSelectDoSearch=function(e){var f=[],v=e.getParameter("value"),i,s,a;if(v!==undefined){i=e.getParameter("itemsBinding");s=new sap.ui.model.Filter("name",sap.ui.model.FilterOperator.Contains,v);a=new sap.ui.model.Filter("obj",sap.ui.model.FilterOperator.Contains,v);f.push(a);f.push(s);i.filter(new sap.ui.model.Filter(f,false));}};U.actionSelectDoSearch=function(e){var f=[],v=e.getParameter("value"),i,s;if(v!==undefined){i=e.getParameter("itemsBinding");s=new sap.ui.model.Filter("text",sap.ui.model.FilterOperator.Contains,v);f.push(s);i.filter(new sap.ui.model.Filter(f,false));}};U.roleSelectDoSearch=function(e){var f=[],v=e.getParameter("value"),i,s,a;if(v!==undefined){i=e.getParameter("itemsBinding");s=new sap.ui.model.Filter("role",sap.ui.model.FilterOperator.Contains,v);a=new sap.ui.model.Filter("instance",sap.ui.model.FilterOperator.Contains,v);f.push(s);f.push(a);i.filter(new sap.ui.model.Filter(f,false));}};U.instanceSelectDoSearch=function(e){var f=[],v=e.getParameter("value"),a,R,i,s,b;a=e.getSource().getCustomData();R=a[0].getValue();if(v!==undefined){i=e.getParameter("itemsBinding");if(v!=""){b=new sap.ui.model.Filter("instance",sap.ui.model.FilterOperator.Contains,v);f.push(b);}if(R!=""){s=new sap.ui.model.Filter("role",sap.ui.model.FilterOperator.EQ,R);f.push(s);}if(f.length>0){i.filter(new sap.ui.model.Filter(f,true));}}};U.instanceSuggest=function(C,e){var v=C.getView(),f=[],V=e.getParameter("value"),R,s,a,b,h;R=v.byId("navigation_provider_roleInput");s=R.getValue();V=e.getParameter("suggestValue");if(V!=""){h=new sap.ui.model.Filter("instance",sap.ui.model.FilterOperator.Contains,V);f.push(h);}if(s!=""){b=new sap.ui.model.Filter("role",sap.ui.model.FilterOperator.EQ,s);f.push(b);}if(f.length>0){a=e.oSource.getBinding("suggestionItems");a.filter(new sap.ui.model.Filter(f,true));}};U.aliasSuggest=function(C,e){var v=C.getView(),f=[],V=e.getParameter("value"),i,I,s,a,b;i=v.byId("navigation_provider_instanceInput");I=i.getValue();V=e.getParameter("suggestValue");if(V!=""){b=new sap.ui.model.Filter("alias",sap.ui.model.FilterOperator.Contains,V);f.push(b);}if(I!=""){a=new sap.ui.model.Filter("instance",sap.ui.model.FilterOperator.EQ,I);f.push(a);}if(f.length>0){s=e.oSource.getBinding("suggestionItems");s.filter(new sap.ui.model.Filter(f,true));}};U.aliasSelectDoSearch=function(e){var f=[],v=e.getParameter("value"),a,i,b,s,h;a=e.getSource().getCustomData();i=a[0].getValue();if(v!==undefined){b=e.getParameter("itemsBinding");s=new sap.ui.model.Filter("instance",sap.ui.model.FilterOperator.EQ,i);if(v!=""){h=new sap.ui.model.Filter("alias",sap.ui.model.FilterOperator.Contains,v);f.push(h);}f.push(s);b.filter(new sap.ui.model.Filter(f,true));}};U.objectSelectUpdateDialog=function(s,v){var f=[],i=s.getBinding("items"),a;if(v!==undefined){a=new sap.ui.model.Filter("name",sap.ui.model.FilterOperator.Contains,v);f.push(a);i.filter(f);}};U.actionSelectUpdateDialog=function(s,v){var f=[],i=s.getBinding("items"),a;if(v!==undefined){a=new sap.ui.model.Filter("text",sap.ui.model.FilterOperator.Contains,v);f.push(a);i.filter(f);}};U.roleSelectUpdateDialog=function(s,v){var f=[],i=s.getBinding("items"),a;if(v!==undefined){a=new sap.ui.model.Filter("role",sap.ui.model.FilterOperator.Contains,v);f.push(a);i.filter(f);}};U.instanceSelectUpdateDialog=function(s,v){var f=[],a,i=s.getBinding("items"),b,R,e;a=s.getCustomData();R=a[0].getValue();if(v!==undefined){b=new sap.ui.model.Filter("instance",sap.ui.model.FilterOperator.Contains,v);f.push(b);}if(R!==""){e=new sap.ui.model.Filter("role",sap.ui.model.FilterOperator.EQ,R);f.push(e);}if(f.length>0){i.filter(f,true);}};U.aliasSelectUpdateDialog=function(s,v){var f=[],a,i,b=s.getBinding("items"),e,h;a=s.getCustomData();i=a[0].getValue();if(v!==undefined){h=new sap.ui.model.Filter("alias",sap.ui.model.FilterOperator.Contains,v);f.push(h);}if(i!==""){e=new sap.ui.model.Filter("instance",sap.ui.model.FilterOperator.EQ,i);f.push(e);}if(f.length>0){b.filter(f,true);}};U.sSelectedColor=(jQuery(".sapMStdTileIconDiv").css('color')||"#007cc0").split(" ").join("");U.sDeselectedColor=(jQuery(".sapMLabel:not(.sapFioriDropZoneText )").css('color')||"#666666").split(" ").join("");U.iconSelect=function(i,s){i.setColor(s?U.sSelectedColor:U.sDeselectedColor);i.setActiveColor(s?U.sDeselectedColor:U.sSelectedColor);};U.onSelectIcon=function(C,i,T,o){var m=C.getView().getModel(),s;if(i){s=m.getProperty("/config/tile_actions_selected_icon");}else{s=m.getProperty("/config/selected_icon");}if(s){U.iconSelect(s,false);}s=o.getSource();U.iconSelect(s,true);m.setProperty("/config/ok.enabled",true);if(i){m.setProperty("/config/tile_actions_selected_icon",s);}else{m.setProperty("/config/selected_icon",s);}C.byId("selectIconDialog").setTitle(s.getSrc());};U.onSelectIconClose=function(v){v.byId("selectIconDialog").close();};U.onSelectIconOk=function(v,T){var s=v.getModel().getProperty("/config/selected_icon");if(!T){v.getModel().setProperty("/config/display_icon_url",s.getSrc());v.byId("iconInput").setValueState(sap.ui.core.ValueState.None);}else{s=v.getModel().getProperty("/config/tile_actions_selected_icon");if(s){T.setValue(s.getSrc());T.setValueState(sap.ui.core.ValueState.None);}}U.onSelectIconClose(v);};U.iconSelectOnValueHelpRequest=function(C,e,a){var m=C.getView().getModel();var R=C.getView().byId("icons");var b=sap.ui.core.IconPool.getIconCollectionNames();var D=C.getView().byId("selectIconDialog");var o=C.getView().byId("ok");var f,I,T,h,i,j,s,B=false;R.destroyContent();if(a){T=sap.ui.getCore().byId(e.getParameter('id'));I=T.getValue();}else{I=m.getProperty("/config/display_icon_url");}o.attachEventOnce("press",function(){U.onSelectIconOk(C.getView(),T);});b.sort();b=jQuery.grep(b,function(v){if(v==="BusinessSuiteInAppSymbols"){B=true;return false;}return true;});if(B){b.push("BusinessSuiteInAppSymbols");}for(i=0;i1)){T[i].valueState=sap.ui.core.ValueState.Error;R=true;}else{T[i].valueState=sap.ui.core.ValueState.None;}if(T[i].icon){if(!U.isIconURIValid(T[i].icon)){T[i].iconValueState=sap.ui.core.ValueState.Error;T[i].iconValueStateText=o.getText("configuration.display_icon_url.warning");R=true;}}}C.getModel().setProperty("/config/tile_actions_rows",T);return R;};U.isIconURIValid=function(i){var R=[];var C="";var I="";var v="";R=/sap-icon:\/\/(.+)\//.exec(i);if(R){C=R[1];R=/\/\/.+\/(.+)/.exec(i);R?I=R[1]:I="";v=sap.ui.core.IconPool.getIconURI(I,C);if(v!=i){return false;}}else{R=/sap-icon:\/\/(.+)/.exec(i);if(R){I=R[1];if(!sap.ui.core.IconPool.getIconInfo(I)){return false;}}else{return false;}}return true;};U.checkTMInput=function(C,o){var T=U.getResourceBundleModel().getResourceBundle(),s=C.byId("semantic_objectInput"),S=C.byId("semantic_actionInput"),a=C.byId("target_application_descriptionInput"),b=C.byId("target_application_urlInput"),e=C.byId("target_application_componentInput"),n=C.byId("navigation_provider_roleInput"),N=C.byId("navigation_provider_instanceInput"),f=C.byId("target_application_aliasInput"),h=C.byId("target_application_idInput"),i=jQuery.trim(o.getParameter("newValue")),v=sap.ui.core.ValueState.None,V=null;switch(o.getSource()){case s:if(/[\-#&? ]/.test(i)){v=sap.ui.core.ValueState.Error;V=T.getText("configuration.semantic_object.error_invalid_chars");}if(S.getValue()==""){S.setValueState(sap.ui.core.ValueState.Error);}break;case S:if(/[\-#&? ]/.test(i)){v=sap.ui.core.ValueState.Error;V=T.getText("configuration.semantic_action.error_invalid_chars");}else if(i==""){v=sap.ui.core.ValueState.Error;}break;case a:if(i==""){v=sap.ui.core.ValueState.Error;}break;case b:if(i!=""&&!(/^[-~+,;:?%&#=/.\w]+$/.test(i))){v=sap.ui.core.ValueState.Error;V=T.getText("configuration.target_application.url.error_invalid_chars");}break;case e:if(i==""){v=sap.ui.core.ValueState.Error;}else if(i.substring(0,17)=="SAPUI5.Component="){v=sap.ui.core.ValueState.Error;V=T.getText("configuration.target_application.component.error_invalid_input");}break;case n:if(i==""){v=sap.ui.core.ValueState.Error;}else if(!(/^[\w/]+$/.test(i))){v=sap.ui.core.ValueState.Error;V=T.getText("configuration.target_application.role.error_invalid_chars");}break;case N:if(i==""){v=sap.ui.core.ValueState.Error;}else if(!(/^[\w/]+$/.test(i))){v=sap.ui.core.ValueState.Error;V=T.getText("configuration.target_application.instance.error_invalid_chars");}break;case f:if(i==""&&h.getValue()==""){v=sap.ui.core.ValueState.Error;V=T.getText("configuration.target_application.alias_id.warning");}else if(i!=""&&h.getValue()!=""){v=sap.ui.core.ValueState.Error;V=T.getText("configuration.target_application.alias_id.warning");h.setValueState(v);h.setValueStateText(V);}else{h.setValueState(sap.ui.core.ValueState.None);}break;case h:if(i==""&&f.getValue()==""){v=sap.ui.core.ValueState.Error;V=T.getText("configuration.target_application.alias_id.warning");}else if(i!=""&&f.getValue()!=""){v=sap.ui.core.ValueState.Error;V=T.getText("configuration.target_application.alias_id.warning");f.setValueState(v);f.setValueStateText(V);}else if(i!=""&&!(/^[A-Fa-f0-9]+$/.test(i))){v=sap.ui.core.ValueState.Error;V=T.getText("configuration.target_application.alias_id.error_invalid_chars");}else{f.setValueState(sap.ui.core.ValueState.None);}break;default:break;}if(v){o.getSource().setValueState(v);if(V!==null){o.getSource().setValueStateText(V||"");}}};U.checkTMInputOnSaveConfig=function(C){var T=U.getResourceBundleModel().getResourceBundle();var s=C.byId("semantic_objectInput");var S=C.byId("semantic_actionInput");var o=C.byId("target_application_descriptionInput");var a=C.byId("target_application_urlInput");var b=C.byId("target_application_componentInput");var n=C.byId("navigation_provider_roleInput");var N=C.byId("navigation_provider_instanceInput");var e=C.byId("target_application_aliasInput");var f=C.byId("target_application_idInput");var h=C.byId("targetTypeInput");var i=C.byId("target_transactionInput");var w=C.byId("target_web_dynpro_applicationInput");var F=C.byId("desktopCB");var j=C.byId("tabletCB");var k=C.byId("phoneCB");var R=false;s.setValue(s.getValue().trim());if(/[\-#&? ]/.test(s.getValue())){s.setValueState(sap.ui.core.ValueState.Error);s.setValueStateText(T.getText("configuration.semantic_object.error_invalid_chars"));R=true;}S.setValue(S.getValue().trim());if(/[\-#&? ]/.test(S.getValue())){S.setValueState(sap.ui.core.ValueState.Error);S.setValueStateText(T.getText("configuration.semantic_action.error_invalid_chars"));R=true;}else if(S.getValue()==""){S.setValueState(sap.ui.core.ValueState.Error);R=true;}var l=C.getModel().getProperty("/config/navigation_provider");if(l==="SAPUI5"){if(o.getValue()==""){o.setValueState(sap.ui.core.ValueState.Error);R=true;}if(a.getValue()!=""&&!(/^[-~+,;:?%&#=/.\w]+$/.test(a.getValue()))){a.setValueState(sap.ui.core.ValueState.Error);a.setValueStateText(T.getText("configuration.target_application.url.error_invalid_chars"));R=true;}if(b.getValue()==""){b.setValueState(sap.ui.core.ValueState.Error);R=true;}else if(b.getValue().substring(0,17)=="SAPUI5.Component="){b.setValueState(sap.ui.core.ValueState.Error);b.setValueStateText(T.getText("configuration.target_application.component.error_invalid_input"));R=true;}}else if(l==="LPD"){if(n.getValue()==""){n.setValueState(sap.ui.core.ValueState.Error);R=true;}if(!(/^[\w]+$/.test(n.getValue()))){n.setValueState(sap.ui.core.ValueState.Error);var v=T.getText("configuration.target_application.role.error_invalid_chars");n.setValueStateText(v);R=true;}if(N.getValue()==""){N.setValueState(sap.ui.core.ValueState.Error);R=true;}if(!(/^[\w]+$/.test(N.getValue()))){N.setValueState(sap.ui.core.ValueState.Error);var v=T.getText("configuration.target_application.instance.error_invalid_chars");N.setValueStateText(v);R=true;}if(e.getValue()==""&&f.getValue()==""){var v=T.getText("configuration.target_application.alias_id.warning");e.setValueState(sap.ui.core.ValueState.Error);e.setValueStateText(v);f.setValueState(sap.ui.core.ValueState.Error);f.setValueStateText(v);R=true;}if(e.getValue()!=""&&f.getValue()!=""){var v=T.getText("configuration.target_application.alias_id.warning");e.setValueState(sap.ui.core.ValueState.Error);e.setValueStateText(v);f.setValueState(sap.ui.core.ValueState.Error);f.setValueStateText(v);R=true;}if(f.getValue()!=""&&!(/^[A-Fa-f0-9]+$/.test(f.getValue()))){f.setValueState(sap.ui.core.ValueState.Error);f.setValueStateText(T.getText("configuration.target_application.alias_id.error_invalid_chars"));R=true;}}else if(l==="TR"){if(i.getValue()==""){i.setValueState(sap.ui.core.ValueState.Error);R=true;}}else if(l==="WDA"){if(w.getValue()==""){w.setValueState(sap.ui.core.ValueState.Error);R=true;}}else if(l==="URL"){if(a.getValue()==""){a.setValueState(sap.ui.core.ValueState.Error);R=true;}else if(!(/^[-~+,;:?%&#=/.\w]+$/.test(a.getValue()))){a.setValueState(sap.ui.core.ValueState.Error);a.setValueStateText(T.getText("configuration.target_application.url.error_invalid_chars"));R=true;}}else{h.setValueState(sap.ui.core.ValueState.Error);h.setValueStateText(T.getText("configuration.navigation_provider.error_invalid_provider"));R=true;}if(!F.getSelected()&&!j.getSelected()&&!k.getSelected()){var v=T.getText("configuration.form_factor.warning");F.setValueState(sap.ui.core.ValueState.Error);F.setValueStateText(v);j.setValueState(sap.ui.core.ValueState.Error);j.setValueStateText(v);k.setValueState(sap.ui.core.ValueState.Error);k.setValueStateText(v);R=true;}return R;};U.updateTooltipForDisabledProperties=function(C){var m=C.getModel();var i=m.getProperty("/config/isLocaleSuitable");if(!i){var a=U.getResourceBundleModel().getResourceBundle();var b=a.getText("edit_configuration.original_locale_not_fit_tooltip",[m.getProperty("/config/userLocale"),m.getProperty("/config/orgLocale")]);C.byId("titleInput").setTooltip(b);C.byId("subtitleInput").setTooltip(b);C.byId("keywordsInput").setTooltip(b);C.byId("infoInput").setTooltip(b);}};U.updateMessageStripForOriginalLanguage=function(C){var m=C.getModel();if(m.getProperty("/config/isLocaleSuitable")===false){var M=U.getResourceBundleModel().getResourceBundle().getText("edit_configuration.original_locale_not_fit_message",[m.getProperty("/config/orgLocale").toUpperCase(),m.getProperty("/config/userLocale").toUpperCase()]);var o=C.byId("messageStrip");o.setVisible(true);o.setText(M);o.setType(sap.ui.core.MessageType.Warning);}};U.createSemanticObjectModel=function(C,s,D){var v=C.getView(),a="/sap/opu/odata/UI2/INTEROP/SemanticObjects",b=[{obj:"",name:""},{obj:"*",name:"*"}],e=(D||b).slice(0),S=new sap.ui.model.json.JSONModel();S.setSizeLimit(999999);S.setProperty("/value","");S.setProperty("/enabled",true);s.bindAggregation("suggestionItems","suggest>/items",new sap.ui.core.Item({text:"{suggest>obj}"}));s.setModel(S,"suggest");if(U.aData.length>0){S.setData({items:e.concat(U.aData)},true);return;}O.read({requestUri:a,headers:{"Accept":"application/json"}},function(o,R){var I,T,i;for(i=0;i0){S.setData({items:U.aRoleData},false);o.setData({items:U.aRoleData},false);return;}O.read({requestUri:s,headers:{"Accept":"application/json"}},function(D,b){var e,f,i;for(i=0;i/items",new sap.ui.core.Item({text:"{items>text}"}));a.setModel(i,"items");a.getBinding("suggestionItems").sort(new sap.ui.model.Sorter("text",false));};U.createNavigationProviderModel=function(C,T){var i=new sap.ui.model.json.JSONModel();var R=U.getResourceBundleModel().getResourceBundle();i.setData({"items":[{"key":"SAPUI5","text":R.getText('configuration.target_application.sapui5')},{"key":"LPD","text":R.getText('configuration.target_application.lpd_cust')},{"key":"TR","text":R.getText('configuration.target_application.transaction')},{"key":"WDA","text":R.getText('configuration.target_application.web_dynpro')},{"key":"URL","text":R.getText('configuration.target_application.url')}]});T.bindItems("items>/items",new sap.ui.core.Item({key:"{items>key}",text:"{items>text}"}));T.setModel(i,"items");T.getBinding("items").sort(new sap.ui.model.Sorter("text",false));};U.displayApplicationTypeFields=function(a,C){switch(a){case'LPD':U.displayLpdCustApplicationTypeFields(C);break;case'SAPUI5':U.displaySapui5ApplicationTypeFields(C);break;case'TR':U.displayTransactionApplicationTypeFields(C);break;case'WDA':U.displayWebDynproApplicationTypeFields(C);break;case'URL':U.displayURLApplicationTypeFields(C);break;}};U.displaySapui5ApplicationTypeFields=function(C){C.byId('navigation_provider_role').setVisible(false);C.byId('navigation_provider_roleInput').setVisible(false);C.byId('navigation_provider_instance').setVisible(false);C.byId('navigation_provider_instanceInput').setVisible(false);C.byId('target_application_alias').setVisible(false);C.byId('target_application_aliasInput').setVisible(false);C.byId('target_application_id').setVisible(false);C.byId('target_application_idInput').setVisible(false);C.byId('application_description').setVisible(true);C.byId('target_application_descriptionInput').setVisible(true);C.byId('application_url').setVisible(true);C.byId('target_application_urlInput').setVisible(true);C.byId('application_component').setVisible(true);C.byId('target_application_componentInput').setVisible(true);C.byId('target_transaction').setVisible(false);C.byId('target_transactionInput').setVisible(false);C.byId('target_web_dynpro_application').setVisible(false);C.byId('target_web_dynpro_applicationInput').setVisible(false);C.byId('target_web_dynpro_configuration').setVisible(false);C.byId('target_web_dynpro_configurationInput').setVisible(false);C.byId('target_system_alias').setVisible(false);C.byId('target_system_aliasInput').setVisible(false);};U.displayLpdCustApplicationTypeFields=function(C){C.byId('application_description').setVisible(false);C.byId('target_application_descriptionInput').setVisible(false);C.byId('application_url').setVisible(false);C.byId('target_application_urlInput').setVisible(false);C.byId('application_component').setVisible(false);C.byId('target_application_componentInput').setVisible(false);C.byId('navigation_provider_role').setVisible(true);C.byId('navigation_provider_roleInput').setVisible(true);C.byId('navigation_provider_instance').setVisible(true);C.byId('navigation_provider_instanceInput').setVisible(true);C.byId('target_application_alias').setVisible(true);C.byId('target_application_aliasInput').setVisible(true);C.byId('target_application_id').setVisible(true);C.byId('target_application_idInput').setVisible(true);C.byId('target_transaction').setVisible(false);C.byId('target_transactionInput').setVisible(false);C.byId('target_web_dynpro_application').setVisible(false);C.byId('target_web_dynpro_applicationInput').setVisible(false);C.byId('target_web_dynpro_configuration').setVisible(false);C.byId('target_web_dynpro_configurationInput').setVisible(false);C.byId('target_system_alias').setVisible(false);C.byId('target_system_aliasInput').setVisible(false);};U.displayTransactionApplicationTypeFields=function(C){C.byId('application_description').setVisible(true);C.byId('target_application_descriptionInput').setVisible(true);C.byId('application_url').setVisible(false);C.byId('target_application_urlInput').setVisible(false);C.byId('application_component').setVisible(false);C.byId('target_application_componentInput').setVisible(false);C.byId('navigation_provider_role').setVisible(false);C.byId('navigation_provider_roleInput').setVisible(false);C.byId('navigation_provider_instance').setVisible(false);C.byId('navigation_provider_instanceInput').setVisible(false);C.byId('target_application_alias').setVisible(false);C.byId('target_application_aliasInput').setVisible(false);C.byId('target_application_id').setVisible(false);C.byId('target_application_idInput').setVisible(false);C.byId('target_transaction').setVisible(true);C.byId('target_transactionInput').setVisible(true);C.byId('target_web_dynpro_application').setVisible(false);C.byId('target_web_dynpro_applicationInput').setVisible(false);C.byId('target_web_dynpro_configuration').setVisible(false);C.byId('target_web_dynpro_configurationInput').setVisible(false);C.byId('target_system_alias').setVisible(true);C.byId('target_system_aliasInput').setVisible(true);};U.displayWebDynproApplicationTypeFields=function(C){C.byId('application_description').setVisible(true);C.byId('target_application_descriptionInput').setVisible(true);C.byId('application_url').setVisible(false);C.byId('target_application_urlInput').setVisible(false);C.byId('application_component').setVisible(false);C.byId('target_application_componentInput').setVisible(false);C.byId('navigation_provider_role').setVisible(false);C.byId('navigation_provider_roleInput').setVisible(false);C.byId('navigation_provider_instance').setVisible(false);C.byId('navigation_provider_instanceInput').setVisible(false);C.byId('target_application_alias').setVisible(false);C.byId('target_application_aliasInput').setVisible(false);C.byId('target_application_id').setVisible(false);C.byId('target_application_idInput').setVisible(false);C.byId('target_transaction').setVisible(false);C.byId('target_transactionInput').setVisible(false);C.byId('target_web_dynpro_application').setVisible(true);C.byId('target_web_dynpro_applicationInput').setVisible(true);C.byId('target_web_dynpro_configuration').setVisible(true);C.byId('target_web_dynpro_configurationInput').setVisible(true);C.byId('target_system_alias').setVisible(true);C.byId('target_system_aliasInput').setVisible(true);};U.displayURLApplicationTypeFields=function(C){C.byId('navigation_provider_role').setVisible(false);C.byId('navigation_provider_roleInput').setVisible(false);C.byId('navigation_provider_instance').setVisible(false);C.byId('navigation_provider_instanceInput').setVisible(false);C.byId('target_application_alias').setVisible(false);C.byId('target_application_aliasInput').setVisible(false);C.byId('target_application_id').setVisible(false);C.byId('target_application_idInput').setVisible(false);C.byId('application_description').setVisible(true);C.byId('target_application_descriptionInput').setVisible(true);C.byId('application_url').setVisible(true);C.byId('target_application_urlInput').setVisible(true);C.byId('application_component').setVisible(false);C.byId('target_application_componentInput').setVisible(false);C.byId('target_transaction').setVisible(false);C.byId('target_transactionInput').setVisible(false);C.byId('target_web_dynpro_application').setVisible(false);C.byId('target_web_dynpro_applicationInput').setVisible(false);C.byId('target_web_dynpro_configuration').setVisible(false);C.byId('target_web_dynpro_configurationInput').setVisible(false);C.byId('target_system_alias').setVisible(true);C.byId('target_system_aliasInput').setVisible(true);};return U;},true); sap.ui.predefine('sap/ushell/components/tiles/utilsRT',["sap/ushell/components/tiles/utils","sap/ui/core/format/NumberFormat"],function(u,N){"use strict";var a={};a.getConfiguration=function(t,A,E){var r;var c=t.configuration.getParameterValueAsString('tileConfiguration');try{var C=JSON.parse(c||"{}");}catch(e){jQuery.sap.log.error("Error while trying to parse tile configuration",e,"sap.ushell.components.tiles.utilsRT");return{};}var U=sap.ui.require("sap/ushell/components/tiles/utils");C.editable=true;if(t.configurationUi&&t.configurationUi.isReadOnly){if(t.configurationUi.isReadOnly()){C.editable=false;}}var T=U.getTranslatedTitle(t);var s=U.getTranslatedSubtitle(t,C);var i=U.getTranslatedProperty(t,C,'display_info_text');var k=U.getTranslatedProperty(t,C,'display_search_keywords');if(A){r=U.getResourceBundleModel().getResourceBundle();if(E&&t.bag){var o=t.bag.getOriginalLanguage();var l=sap.ui.getCore().getConfiguration().getLocale().getSAPLogonLanguage();var b=sap.ui.getCore().getConfiguration().getLanguage();C.isLocaleSuitable=o===""||o.toLowerCase()===l.toLowerCase()||o.toLowerCase()===b.toLowerCase();C.orgLocale=o;C.userLocale=l;}}C.display_icon_url=C.display_icon_url||"";if(i!==undefined){C.display_info_text=i;}else if(C.display_info_text===undefined){if(A&&!E){C.display_info_text="["+r.getText("configuration.display_info_text")+"]";}else{C.display_info_text="";}}C.navigation_semantic_object=C.navigation_semantic_object||"";C.navigation_semantic_action=C.navigation_semantic_action||"";C.navigation_semantic_parameters=C.navigation_semantic_parameters||"";C.display_number_unit=C.display_number_unit||"";C.display_number_factor=C.display_number_factor||"";C.service_refresh_interval=C.service_refresh_interval?parseInt(C.service_refresh_interval,10):0;C.service_url=C.service_url||"";C.navigation_target_url=C.navigation_target_url||"";if(A&&U.isInitial(T)){C.display_title_text=E?"":"["+r.getText("configuration.display_title_text")+"]";C.display_subtitle_text=E?"":"["+r.getText("configuration.display_subtitle_text")+"]";}else{C.display_title_text=T||C.display_title_text||"";if(s!==undefined){C.display_subtitle_text=s;}else if(C.display_subtitle_text===undefined){C.display_subtitle_text="";}}C.navigation_use_semantic_object=(C.navigation_use_semantic_object===false?false:true);C.display_search_keywords=k||C.display_search_keywords||"";if(A){C.display_number_value=C.display_number_value||1234;}C.form_factors=C.form_factors?C.form_factors:U.getDefaultFormFactors();C.desktopChecked=C.form_factors.manual.desktop;C.tabletChecked=C.form_factors.manual.tablet;C.phoneChecked=C.form_factors.manual.phone;C.manualFormFactor=!(C.form_factors.appDefault)&&C.editable;C.appFormFactor=C.form_factors.appDefault;C.formFactorConfigDefault=C.form_factors.defaultParam?true:false;if(C.signature){C.rows=U.getSignatureTableData(C.signature,E&&C.editable);}else{C.rows=(C.mapping_signature&&C.mapping_signature!=="*=*")?U.getMappingSignatureTableData(C.mapping_signature,E&&C.editable):[U.getEmptyRowObj(C.editable)];}if(C.signature){C.isUnknownAllowed=(C.signature.additional_parameters==="allowed"||C.signature.additionalParameters==="allowed");}else{C.isUnknownAllowed=(C.mapping_signature!==undefined)?U.getAllowUnknownParametersValue(C.mapping_signature):true;}if(A){C.tile_actions_rows=U.getTileNavigationActionsRows(t,C.editable);}else{if(!C.actions){C.actions=U.getTileNavigationActions(t);}}return C;};a.getDataToDisplay=function(c,d){var b=0,i,n,C,s,D={display_icon_url:d.icon||c.display_icon_url||"",display_title_text:d.title||c.display_title_text||"",display_number_value:!isNaN(d.number)?d.number:"...",display_number_unit:d.numberUnit||c.display_number_unit||"",display_info_text:d.info||c.display_info_text||"",display_info_state:d.infoState||"Neutral",display_subtitle_text:d.subtitle||c.display_subtitle_text||"",display_state_arrow:d.stateArrow||"None",display_number_state:d.numberState||"Neutral",display_number_digits:d.numberDigits>=0?d.numberDigits:4,display_number_factor:d.numberFactor||"",display_search_keyword:d.keywords||c.display_search_keyword||"",targetParams:[]};if(d.infoStatus){D.display_info_state=d.infoStatus;}if(d.targetParams){D.targetParams.push(d.targetParams);}if(d.results){for(i=0,n=d.results.length;i=m||S){var o=this._normalizeNumber(d.number,m,d.numberFactor,d.numberDigits);D.display_number_factor=o.numberFactor;D.display_number_value=o.displayNumber;}else{var e=N.getFloatInstance({maxFractionDigits:m});D.display_number_value=e.format(d.number);}}}if(D&&D.display_number_state){switch(D.display_number_state){case"Positive":D.display_number_state="Good";break;case"Negative":D.display_number_state="Error";break;}}return D;};a.getTileSettingsAction=function(m,s,t){var u=sap.ui.require("sap/ushell/components/tiles/utils");var r=u.getResourceBundleModel().getResourceBundle();return{text:(!t||t=="tile")?r.getText('tileSettingsBtn'):r.getText('linkSettingsBtn'),press:function(){sap.ui.require(["sap/ui/layout/form/SimpleForm","sap/ui/layout/form/SimpleFormLayout","sap/m/Button","sap/m/Dialog"],function(S,b,B,D){var A={showGroupSelection:false,title:m.getProperty('/config/display_title_text'),subtitle:m.getProperty('/config/display_subtitle_text')};if(!t||t=='tile'){A.info=m.getProperty('/config/display_info_text');A.icon=m.getProperty('/config/display_icon_url');A.keywords=m.getProperty('/config/display_search_keywords');}else if(t=='link'){A.showInfo=false;A.showIcon=false;A.showPreview=false;}var c=sap.ui.view({type:sap.ui.core.mvc.ViewType.JS,viewName:"sap.ushell.ui.footerbar.SaveAsTile",viewData:{appData:A}});var o=new S({id:'tileSettings',layout:b.GridLayout,content:[c]}).addStyleClass("sapUshellAddBookmarkForm");var d=new B('bookmarkOkBtn',{text:r.getText('okBtn'),press:function(){s(c);g.close();},enabled:true}),e=new B('bookmarkCancelBtn',{text:r.getText('cancelBtn'),press:function(){g.close();}});var f=function(h){d.setEnabled(h.trim()?true:false);};c.getTitleInput().attachLiveChange(function(){f(this.getValue());});var g=new D({id:'settingsDialog',title:(!t||t=="tile")?r.getText('tileSettingsDialogTitle'):r.getText('linkSettingsDialogTitle'),contentWidth:'400px',content:o,beginButton:d,endButton:e,horizontalScrolling:false,afterClose:function(){g.destroy();}});g.open();});}};};a.getSemanticNavigationUrl=function(c){var U="#"+jQuery.trim(c.navigation_semantic_object);U+="-"+jQuery.trim(c.navigation_semantic_action);if(c.navigation_semantic_parameters&&jQuery.trim(c.navigation_semantic_parameters).length>0){U+="?"+jQuery.trim(c.navigation_semantic_parameters);}return U;};a.addParamsToUrl=function(U,d){var p="",b=U.indexOf("?")!==-1,t=d.targetParams,i;if(t&&t.length>0){for(i=0;i0){if(!b){U+="?";}else{U+="&";}U+=p;}return U;};a._normalizeNumber=function(n,m,b,i){var c;if(isNaN(n)){c=n;}else{var o=N.getFloatInstance({maxFractionDigits:i});if(!b){var d=Math.abs(n);if(d>=1000000000){b='B';n/=1000000000;}else if(d>=1000000){b='M';n/=1000000;}else if(d>=1000){b='K';n/=1000;}}c=o.format(n);}var e=c;var f=e[m-1];m-=(f==='.'||f===',')?1:0;e=e.substring(0,m);return{displayNumber:e,numberFactor:b};};a._shouldProcessDigits=function(d,D){var n;d=typeof(d)!=='string'?d.toString():d;if(d.indexOf('.')!==-1){n=d.split(".")[1].length;if(n>D){return true;}}return false;};return a;},true); sap.ui.predefine('sap/ushell/ui/footerbar/HideGroupsButton',['sap/ushell/library','sap/ushell/ui/launchpad/ActionItem','./HideGroupsButtonRenderer'],function(l,A){"use strict";var H=A.extend("sap.ushell.ui.footerbar.HideGroupsButton",{metadata:{library:"sap.ushell",events:{save:{}}}});return H;}); sap.ui.predefine('sap/ushell/ui/footerbar/HideGroupsButtonRenderer',['sap/ui/core/Renderer','sap/m/ButtonRenderer'],function(R,B){"use strict";var H=R.extend(B);return H;},true); sap.ui.predefine('sap/ushell/ui/launchpad/AccessibilityCustomData',['jquery.sap.global','sap/ui/core/CustomData','sap/ushell/library','jquery.sap.events'],function(q,C,l){"use strict";var A=C.extend("sap.ushell.ui.launchpad.AccessibilityCustomData"),o=C.prototype._checkWriteToDom;A.prototype._checkWriteToDom=function(r){var k=this.getKey().toLowerCase(),i=sap.ui.getCore().getConfiguration().getAccessibility();if(!i){return;}if(k.indexOf("aria")===0||k==="role"||k==="tabindex"){if(!this.getWriteToDom()){return null;}var v=this.getValue();if(typeof v!="string"){q.sap.log.error("CustomData with key "+k+" should be written to HTML of "+r+" but the value is not a string.");return null;}if(!(sap.ui.core.ID.isValid(k))||(k.indexOf(":")!=-1)){q.sap.log.error("CustomData with key "+k+" should be written to HTML of "+r+" but the key is not valid (must be a valid sap.ui.core.ID without any colon).");return null;}if(k==q.sap._FASTNAVIGATIONKEY){v=/^\s*(x|true)\s*$/i.test(v)?"true":"false";}else if(k.indexOf("sap-ui")==0){q.sap.log.error("CustomData with key "+k+" should be written to HTML of "+r+" but the key is not valid (may not start with 'sap-ui').");return null;}return{key:k,value:v};}else{return o.apply(this,arguments);}};return A;},true); sap.ui.predefine('sap/ushell/ui/launchpad/AnchorItem',['sap/ui/core/Control','sap/ushell/library','./AnchorItemRenderer'],function(C,l){"use strict";var A=C.extend("sap.ushell.ui.launchpad.AnchorItem",{metadata:{library:"sap.ushell",properties:{title:{type:"string",group:"Misc",defaultValue:null},selected:{type:"boolean",group:"Misc",defaultValue:false},groupId:{type:"string",group:"Misc",defaultValue:null},defaultGroup:{type:"boolean",group:"Misc",defaultValue:false},writeHelpId:{type:"boolean",group:"Misc",defaultValue:false},index:{type:"int",group:"Misc",defaultValue:null},visible:{type:"boolean",group:"Misc",defaultValue:null},isGroupVisible:{type:"boolean",group:"Misc",defaultValue:true},isGroupRendered:{type:"boolean",group:"Misc",defaultValue:false},isGroupDisabled:{type:"boolean",group:"Misc",defaultValue:false},locked:{type:"boolean",group:"Misc",defaultValue:false}},events:{press:{},afterRendering:{}}}});A.prototype.onAfterRendering=function(){this.fireAfterRendering();};A.prototype.setTitle=function(t){this.setProperty("title",t,true);this.$().find(".sapUshellAnchorItemInner").text(t);};A.prototype.setGroupId=function(v){this.setProperty("groupId",v,true);};A.prototype.setSelected=function(s){s=!!s;this.setProperty("selected",s,true);if(s){var j=jQuery(".sapUshellAnchorItemSelected");j.each(function(){jQuery(this).toggleClass("sapUshellAnchorItemSelected",false);jQuery(this).attr("aria-selected",false);});}this.$().attr("aria-selected",s);this.$().toggleClass("sapUshellAnchorItemSelected",s);};A.prototype.setIsGroupRendered=function(r){r=!!r;this.setProperty("isGroupRendered",r,true);if(r){this.removeStyleClass("sapUshellAnchorItemNotRendered");}else{this.addStyleClass("sapUshellAnchorItemNotRendered");}};A.prototype.setIsGroupVisible=function(v){v=!!v;this.setProperty("isGroupVisible",v,true);this.toggleStyleClass("sapUshellShellHidden",!v);};A.prototype.setIsGroupDisabled=function(v){v=!!v;this.setProperty('isGroupDisabled',v,true);this.$().find('.sapUshellAnchorItemInner').toggleClass('sapUshellAnchorItemDisabled',v);};A.prototype.onclick=function(){this.firePress();};return A;}); sap.ui.predefine('sap/ushell/ui/launchpad/AnchorItemRenderer',function(){"use strict";var A={};A.render=function(r,a){var o=a.getParent(),b=o.getGroups(),c=b.filter(function(g){return g.getVisible();}),C=c.indexOf(a)>-1?c.indexOf(a)+1:"",d=a.getModel(),i=a.getBindingContext().getPath(),I=d.getProperty(i),s=I.groupId;r.write("");r.write("");r.writeEscaped(a.getTitle());r.write("");r.write("");};return A;},true); sap.ui.predefine('sap/ushell/ui/launchpad/AnchorNavigationBar',['sap/m/Bar','sap/ushell/library','sap/ushell/override','./AnchorNavigationBarRenderer'],function(B,l,o){"use strict";var A=B.extend("sap.ushell.ui.launchpad.AnchorNavigationBar",{metadata:{library:"sap.ushell",properties:{accessibilityLabel:{type:"string",defaultValue:null},selectedItemIndex:{type:"int",group:"Misc",defaultValue:0},overflowEnabled:{type:"boolean",group:"Misc",defaultValue:true}},aggregations:{groups:{type:"sap.ushell.ui.launchpad.AnchorItem",multiple:true,singularName:"group"}},events:{afterRendering:{},itemPress:{}}}});var u=o.updateAggregatesFactory("groups");A.prototype.updateGroups=function(){u.apply(this,arguments);if(this.getDomRef()&&this.getGroups().length){this.reArrangeNavigationBarElements();}};A.prototype.init=function(){sap.ui.Device.resize.attachHandler(this.reArrangeNavigationBarElements,this);this.bGroupWasPressed=false;this.bIsRtl=sap.ui.getCore().getConfiguration().getRTL();this._bIsRenderedCompletely=false;};A.prototype.handleExit=function(){if(this.oPopover){this.oPopover.destroy();}if(this.oOverflowButton){this.oOverflowButton.destroy();}};A.prototype.updateVisibility=function(){var g=this.getGroups(),v=0,i=0;while(i=n){return true;}return false;};A.prototype.setSelectedItemIndex=function(s){if(s!==undefined){this.setProperty("selectedItemIndex",s,true);}};A.prototype.setOverflowEnabled=function(e){this.setProperty("overflowEnabled",e);if(this.oOverflowButton){this.oOverflowButton.setEnabled(e);}};A.prototype._getOverflowLeftArrowButton=function(){this.oOverflowLeftButton=new sap.m.Button({icon:'sap-icon://slim-arrow-left',tooltip:sap.ushell.resources.i18n.getText("scroll_beginning"),press:function(e){this._scrollToGroupByGroupIndex(0);}.bind(this)}).addStyleClass("sapUshellShellHidden");return this.oOverflowLeftButton;};A.prototype._getOverflowRightArrowButton=function(){this.oOverflowRightButton=new sap.m.Button({icon:'sap-icon://slim-arrow-right',tooltip:sap.ushell.resources.i18n.getText("scroll_end"),press:function(e){this._scrollToGroupByGroupIndex(this.anchorItems.length-1);}.bind(this)}).addStyleClass("sapUshellShellHidden");return this.oOverflowRightButton;};A.prototype._getOverflowButton=function(){if(this.oOverflowButton){return this.oOverflowButton;}this.oOverflowButton=new sap.m.Button("sapUshellAnchorBarOverflowButton",{icon:'sap-icon://slim-arrow-down',tooltip:sap.ushell.resources.i18n.getText("more_groups"),enabled:this.getOverflowEnabled(),press:function(e){if(!this.oPopover){this._initPopover();}if(this.oPopover.isOpen()){this.oPopover.close();}else{var L=this.oPopover.getContent()[0];this.anchorItems=this.getVisibleGroups();L.setModel(this.getModel());var a=this.getModel().getProperty("/tileActionModeActive");var v=new sap.ui.model.Filter('','EQ','a');v.fnTest=function(i){if(!i.visibilityModes[a?1:0]){return false;}return i.isGroupVisible||a;}.bind(this);L.bindItems({path:"/groups",template:new sap.ushell.ui.launchpad.GroupListItem({title:"{title}",groupId:"{groupId}",index:"{index}"}),filters:[v]});var s=jQuery(".sapUshellAnchorItemSelected").attr("id");var S=sap.ui.getCore().byId(s);jQuery.each(L.getItems(),function(i,b){if(S.mProperties.groupId===b.mProperties.groupId){b.addStyleClass("sapUshellAnchorPopoverItemSelected");}else{b.addStyleClass("sapUshellAnchorPopoverItemNonSelected");}});jQuery('.sapUshellAnchorItemOverFlow').toggleClass("sapUshellAnchorItemOverFlowPressed",true);this.oPopover.openBy(this.oOverflowButton);}}.bind(this)}).addStyleClass("sapUshellShellHidden").addStyleClass('sapContrastPlus');return this.oOverflowButton;};A.prototype._initPopover=function(){var t=this;var L=new sap.m.List({mode:sap.m.ListMode.SingleSelectMaster,rememberSelections:false,selectionChange:function(e){t.fireItemPress({group:e.getParameter('listItem')});t.oPopover.close();}});this.bOverFlowBtnClick=false;this.oPopover=new sap.m.Popover("sapUshellAnchorBarOverflowPopover",{showArrow:false,showHeader:false,placement:"Left",content:[L],horizontalScrolling:false,beforeOpen:function(){jQuery('.sapUshellAnchorItemOverFlow').addClass("sapUshellAnchorItemOverFlowOpen");var j=jQuery(".sapUshellAnchorItemOverFlow"),i=sap.ui.getCore().getConfiguration().getRTL(),a=i?-1*j.outerWidth():j.outerWidth();this.setOffsetX(a);},beforeClose:function(){if(document.activeElement.id===this.oOverflowButton.getId()){this.bOverFlowBtnClick=true;}}.bind(this),afterClose:function(){jQuery('.sapUshellAnchorItemOverFlow').removeClass("sapUshellAnchorItemOverFlowOpen");jQuery('.sapUshellAnchorItemOverFlow').toggleClass("sapUshellAnchorItemOverFlowPressed",false);}}).addStyleClass("sapUshellAnchorItemsPopover").addStyleClass('sapContrastPlus');};A.prototype.getVisibleGroups=function(){return this.getGroups().filter(function(g){return g.getVisible();});};A.prototype._adjustAnchorBarAriaProperties=function(g){var i;for(i=0;i");r.write("");if(c.getGroups().length>0){c._setRenderedCompletely(true);r.write("");r.renderControl(c._getOverflowLeftArrowButton());r.write("");r.write("");r.write("");this.renderAnchorNavigationItems(r,c);r.write("");r.write("");r.write("");r.renderControl(c._getOverflowRightArrowButton());r.write("");r.write("");r.renderControl(c._getOverflowButton());r.write("");}r.write("");r.write("");};A.renderAnchorNavigationItems=function(r,c){var g=c.getGroups();q.each(g,function(i,G){r.renderControl(this);});};A.shouldAddIBarContext=function(){return false;};return A;},true); sap.ui.predefine('sap/ushell/ui/launchpad/DashboardGroupsContainer',['sap/ui/base/ManagedObject','sap/ui/core/Control','sap/ui/core/ResizeHandler','sap/ushell/library','sap/ushell/override','sap/ushell/utils','sap/ushell/Config','sap/ui/Device','./DashboardGroupsContainerRenderer'],function(M,C,R,l,o,u,a,D){"use strict";var b="UShellTileDeviceSet";var c=C.extend("sap.ushell.ui.launchpad.DashboardGroupsContainer",{metadata:{library:"sap.ushell",properties:{accessibilityLabel:{type:"string",defaultValue:null},displayMode:{type:"string",defaultValue:null}},aggregations:{groups:{type:"sap.ui.core.Control",multiple:true,singularName:"group"}},events:{afterRendering:{}}}});c.prototype.init=function(){this._getDynamicStyleElement();if(!D.media.hasRangeSet(b)){D.media.initRangeSet(b,[374],"px",["Small","Responsive"],true);}this._iContainerWidth=null;this._oTileDimensions=null;this._bRangeSetSmall=false;R.register(this,this._handleResize.bind(this));this._oConfigChange=a.on("/core/home/sizeBehavior").do(function(s){this._sSizeBehavior=s;this._updateTileContainer(true);}.bind(this));};c.prototype.exit=function(){if(this._oStyleElement){document.head.removeChild(this._oStyleElement);}delete this._oStyleElement;this._oConfigChange.off();D.media.detachHandler(this._handleMediaChange,this,b);C.prototype.exit.apply(this,arguments);};c.prototype._handleResize=function(e){if(e.size.width!==e.oldSize.width){this._updateTileContainer();}};c.prototype._updateTileContainer=function(r){var i=this._getInnerTileContainer();if(!i){return;}var s=this._sSizeBehavior==="Small"||this._bRangeSetSmall;var t=this._getTileDimensions(s,r);var d=this._getElementDimensions(i);var T=t.width+t.marginEnd;var m=Math.floor(d.width/T);var e=T*m-t.marginEnd;var f=this._iContainerWidth!==e;if(f){this._iContainerWidth=e;this._updateTileContainerWidth(e);}};c.prototype._getInnerTileContainer=function(){var d=this.getDomRef();if(!d){return null;}var t,T=d.querySelectorAll(".sapUshellTileContainerContent");for(var i=0;i");var g=c.getGroups();q.each(g,function(i,G){R.write("");R.renderControl(this);R.write("");});u.setPerformanceMark("FLP -- dashboardgroupscontainer renderer");R.write("");R.write(r.i18n.getText("tile"));R.write("");R.write("");};return D;},true); sap.ui.predefine('sap/ushell/ui/launchpad/GroupHeaderActions',['sap/ui/core/Control','sap/ushell/library','sap/m/Button','sap/m/ActionSheet','./GroupHeaderActionsRenderer'],function(C,l,B,A){"use strict";var G=C.extend("sap.ushell.ui.launchpad.GroupHeaderActions",{metadata:{library:"sap.ushell",properties:{isOverflow:{type:"boolean",group:"Misc",defaultValue:false},tileActionModeActive:{type:"boolean",group:"Misc",defaultValue:false}},aggregations:{content:{type:"sap.ui.core.Control",multiple:true,singularName:"content"},overflowCtrl:{type:"sap.ui.core.Control",multiple:true,singularName:"overflowCtrl"}},events:{afterRendering:{}}}});G.prototype.onAfterRendering=function(){this.fireAfterRendering();};G.prototype._getActionOverflowControll=function(){var t=this;return[new B({icon:'sap-icon://overflow',type:'Transparent',enabled:{parts:["/editTitle"],formatter:function(i){return!i;}},press:function(e){var a=new A({placement:sap.m.PlacementType.Auto});t.getContent().forEach(function(b){var c=b.clone();c.setModel(b.getModel());c.setBindingContext(b.getBindingContext());a.addButton(c);});a.openBy(e.getSource());}}).addStyleClass('sapUshellHeaderActionButton')];};return G;}); sap.ui.predefine('sap/ushell/ui/launchpad/GroupHeaderActionsRenderer',['jquery.sap.global'],function(q){"use strict";var G={};G.render=function(r,c){var i=c.getIsOverflow(),a=c.getTileActionModeActive();r.write("");var C=c.getContent();if(a){if(i){q.each(c._getActionOverflowControll(),function(){this.setParent(c);r.renderControl(this);});}else{q.each(C,function(){r.renderControl(this);});}}r.write("");};return G;},true); sap.ui.predefine('sap/ushell/ui/launchpad/LinkTileWrapper',['jquery.sap.global','sap/ui/base/ManagedObject','sap/ui/core/Control','sap/ushell/library','./AccessibilityCustomData','./LinkTileWrapperRenderer'],function(q,M,C,l,A){"use strict";var L=C.extend("sap.ushell.ui.launchpad.LinkTileWrapper",{metadata:{library:"sap.ushell",properties:{uuid:{type:"string",group:"Misc",defaultValue:null},tileCatalogId:{type:"string",group:"Misc",defaultValue:null},target:{type:"string",group:"Misc",defaultValue:null},visible:{type:"boolean",group:"Misc",defaultValue:true},debugInfo:{type:"string",group:"Misc",defaultValue:null},animationRendered:{type:"boolean",group:"Misc",defaultValue:false},isLocked:{type:"boolean",group:"Misc",defaultValue:false},tileActionModeActive:{type:"boolean",group:"Misc",defaultValue:false},ieHtml5DnD:{type:"boolean",group:"Misc",defaultValue:false}},aggregations:{tileViews:{type:"sap.ui.core.Control",multiple:true,singularName:"tileView"},footItems:{type:"sap.ui.core.Control",multiple:true,singularName:"footItem"}},events:{press:{},coverDivPress:{},afterRendering:{},showActions:{}}}});L.prototype.ontap=function(e,u){q.sap.log.info("Tile clicked:",this.getDebugInfo(),"sap.ushell.ui.launchpad.LinkTileWrapper");return;};L.prototype.destroy=function(s){this.destroyTileViews();C.prototype.destroy.call(this,s);};L.prototype.addTileView=function(o,s){o.setParent(null);o.addCustomData(new A({key:"tabindex",value:"-1",writeToDom:true}));M.prototype.addAggregation.call(this,"tileViews",o,s);};L.prototype.destroyTileViews=function(){if(this.mAggregations.tileViews){this.mAggregations.tileViews.length=0;}};L.prototype.onAfterRendering=function(){this.fireAfterRendering();};L.prototype._launchTileViaKeyboard=function(e){if(e.target.tagName!=="BUTTON"){var t=this.getTileViews()[0],p=false,c;if(t.firePress){c=document.createEvent('MouseEvents');c.initEvent('click',false,true);t.getDomRef().dispatchEvent(c);}else{while(t.getContent&&!p){t=t.getContent()[0];if(t.firePress){t.firePress({id:this.getId()});p=true;}}}}};L.prototype.onsapenter=function(e){this._launchTileViaKeyboard(e);};L.prototype.onsapspace=function(e){this._launchTileViaKeyboard(e);};L.prototype.onclick=function(e){if(this.getTileActionModeActive()){e.preventDefault();}else{var c=this.getTileViews()[0].getContent?c.getContent()[0]:this.getTileViews()[0];sap.ui.getCore().getEventBus().publish("launchpad","dashboardTileLinkClick");}};L.prototype.setVisible=function(v){this.setProperty("visible",v,true);return this.toggleStyleClass("sapUshellHidden",!v);};L.prototype.setAnimationRendered=function(v){this.setProperty('animationRendered',v,true);};L.prototype._handleTileShadow=function(j,a){if(j.length){j.unbind('mouseenter mouseleave');var u,t=j.css("border").split("px")[0],m=this.getModel();if(t>0){u=j.css("border-color");}else{u=this.getRgba();}j.hover(function(){if(!m.getProperty('/tileActionModeActive')){var o=q(j).css('box-shadow'),T=o?o.split(') ')[1]:null,U;if(T){U=T+" "+u;q(this).css('box-shadow',U);}}},function(){q(this).css('box-shadow','');});}};L.prototype.setUuid=function(u){this.setProperty("uuid",u,true);return this;};return L;}); sap.ui.predefine('sap/ushell/ui/launchpad/LinkTileWrapperRenderer',['jquery.sap.global','sap/ushell/resources','sap/m/Text'],function(q,r,T){"use strict";var L={};L.render=function(R,c){var t=null,l,s,m=c.getModel();try{t=c.getTileViews()[0];}catch(e){q.sap.log.warning("Failed to load tile view: ",e.message);t=new T({text:r.i18n.getText("cannotLoadTile")});}R.write("");if(this.renderTileView){this.renderTileView(R,t,c.getTarget());}R.write("");};L.renderTileView=function(R,t,s){R.write("");R.renderControl(t);R.write("");};return L;},true); sap.ui.predefine('sap/ushell/ui/launchpad/PlusTile',['sap/ushell/library','./Tile','sap/ui/core/Icon','sap/ushell/resources','./PlusTileRenderer'],function(l,T,I,r){"use strict";var P=T.extend("sap.ushell.ui.launchpad.PlusTile",{metadata:{library:"sap.ushell",properties:{groupId:{type:"string",group:"Misc",defaultValue:''},enableHelp:{type:"boolean",group:"Misc",defaultValue:false}},events:{press:{}}}});P.prototype.init=function(){this.oIcon=new I({src:'sap-icon://add',tooltip:r.i18n.getText("openAppFinder_tooltip")});};P.prototype.exit=function(){if(this.oIcon){this.oIcon.destroy();}};P.prototype.onclick=function(){var g=this.getParent().getBindingContext().getObject();if(!g.object){return;}this.firePress();};P.prototype.onsapspace=function(){this.firePress();};P.prototype.onsapenter=function(){this.firePress();};P.prototype.setGroupId=function(v){this.setProperty("groupId",v,true);return this;};return P;}); sap.ui.predefine('sap/ushell/ui/launchpad/PlusTileRenderer',['sap/ushell/resources','sap/ushell/Config'],function(r,C){"use strict";var P={};var t=r.i18n;P.render=function(R,c){R.write("");R.renderControl(c.oIcon);R.write("");};return P;},true); sap.ui.predefine('sap/ushell/ui/launchpad/Tile',['jquery.sap.global','sap/ui/base/ManagedObject','sap/ui/core/Control','sap/ushell/library','sap/ui/core/Icon','sap/ushell/resources','sap/ushell/ui/launchpad/AccessibilityCustomData','./TileRenderer'],function(q,M,C,l,I,r,A){"use strict";var T=C.extend("sap.ushell.ui.launchpad.Tile",{metadata:{library:"sap.ushell",properties:{long:{type:"boolean",group:"Misc",defaultValue:false},uuid:{type:"string",group:"Misc",defaultValue:null},tileCatalogId:{type:"string",group:"Misc",defaultValue:null},isCustomTile:{type:"boolean",group:"Misc",defaultValue:false},target:{type:"string",group:"Misc",defaultValue:null},visible:{type:"boolean",group:"Misc",defaultValue:true},debugInfo:{type:"string",group:"Misc",defaultValue:null},rgba:{type:"string",group:"Misc",defaultValue:null},animationRendered:{type:"boolean",group:"Misc",defaultValue:false},isLocked:{type:"boolean",group:"Misc",defaultValue:false},showActionsIcon:{type:"boolean",group:"Misc",defaultValue:false},tileActionModeActive:{type:"boolean",group:"Misc",defaultValue:false},ieHtml5DnD:{type:"boolean",group:"Misc",defaultValue:false},navigationMode:{type:"string",group:"Misc",defaultValue:null},isDraggedInTabBarToSourceGroup:{type:"boolean",group:"Misc",defaultValue:false}},aggregations:{tileViews:{type:"sap.ui.core.Control",multiple:true,singularName:"tileView"},pinButton:{type:"sap.ui.core.Control",multiple:true,singularName:"pinButton"}},events:{press:{},coverDivPress:{},afterRendering:{},showActions:{},deletePress:{}}}});T.prototype.getActionSheetIcon=function(){if(!this.getTileActionModeActive()){return undefined;}if(!this.actionSheetIcon){this.actionSheetIcon=new I({src:"sap-icon://overflow"});this.actionSheetIcon.setTooltip(r.i18n.getText("configuration.category.tile_actions"));this.actionSheetIcon.addStyleClass('sapUshellTileActionIconDivBottomInner');}return this.actionSheetIcon;};T.prototype.ontap=function(e,u){q.sap.log.info("Tile clicked:",this.getDebugInfo(),"sap.ushell.ui.launchpad.Tile");this.firePress();};T.prototype.destroy=function(s){this.destroyTileViews();C.prototype.destroy.call(this,s);};T.prototype.addTileView=function(o,s){o.setParent(null);M.prototype.addAggregation.call(this,"tileViews",o,s);};T.prototype.destroyTileViews=function(){if(this.mAggregations["tileViews"]){this.mAggregations["tileViews"].length=0;}};T.prototype.onAfterRendering=function(){if(this.getIsDraggedInTabBarToSourceGroup()===true){var t=this.getParent();t.removeAggregation("tiles",this,false);}var R;R=this.getRgba();if(R){this._redrawRGBA();}this.fireAfterRendering();};T.prototype._launchTileViaKeyboard=function(e){if(this.getTileActionModeActive()){this.fireCoverDivPress({id:this.getId()});}else{if(e.target.tagName!=="BUTTON"){var t=this.getTileViews()[0],p=false,c,o;if(t.firePress){t.firePress({id:this.getId()});}else if(t.getComponentInstance){c=t.getComponentInstance();if(c._oController&&c._oController.oView.getContent()){o=c._oController.oView.getContent()[0];if(o&&o.firePress){o.firePress({id:this.getId()});}}}else{while(t.getContent&&!p){t=t.getContent()[0];if(t.firePress){t.firePress({id:this.getId()});p=true;}}}}}};T.prototype.onsapenter=function(e){this._launchTileViaKeyboard(e);if(!this.getTileActionModeActive()){this._announceLoadingApplication();}};T.prototype.onsapspace=function(e){this._launchTileViaKeyboard(e);if(!this.getTileActionModeActive()){this._announceLoadingApplication();}};T.prototype.onfocusin=function(e){var c=this.getDomRef().getAttribute("class"),p;p=c?c.indexOf("sapUshellPlusTile")!==-1:false;if(!p){var j=q(this.getDomRef()).prevUntil("h3"),a,s="",t,n,b;if(j.length>0){a=j[j.length-1].previousSibling;}else{a=this.getDomRef().previousSibling;}if(a){s=a.getAttribute('id');}b=this.getDomRef().querySelector(".sapUshellTileInner");var d=this.getDomRef().querySelector(".sapUshellTileDeleteClickArea .sapUiIcon");var f=d?d.id:"";if(b&&b.children&&b.children[0]){var g=(s&&s!=="")?"sapUshellCatalogAccessibilityTileText":"sapUshellDashboardAccessibilityTileText";t=b.children[0].getAttribute('id');var L=[g,t,f,s];n=this.getId()+"_navigationMode";var N=document.getElementById(n);if(N==null){var h=this.getNavigationMode();if(h){N=document.createElement("div");var i=document.createAttribute("id");i.value=n;N.setAttributeNode(i);N.style.display="none";var k=r.i18n.getText(h+"NavigationMode");if(k){N.innerHTML=k;}else{q.sap.log.warning("could not get the navigation mode text of this tile to be added on the aria-labelledBby attribute");}b.appendChild(N);L.splice(1,0,n);}}else{L.splice(1,0,n);}this.getDomRef().setAttribute("aria-labelledby",L.join(" "));}}};T.prototype.onclick=function(e){if(this.getTileActionModeActive()){var s=e.originalEvent.srcElement;if(q(s).closest('.sapUshellTileDeleteClickArea').length>0){this.fireDeletePress();}else{this.fireCoverDivPress({id:this.getId()});}}else{this._announceLoadingApplication();}};T.prototype._announceLoadingApplication=function(){var a=document.getElementById("sapUshellLoadingAccessibilityHelper-appInfo"),L=r.i18n.getText("screenReaderNavigationLoading");if(a){a.setAttribute("role","alert");a.innerHTML=L;setTimeout(function(){a.removeAttribute("role");a.innerHTML="";},0);}};T.prototype._initDeleteAction=function(){var t=this;if(!this.deleteIcon){this.deleteIcon=new I({src:"sap-icon://decline",tooltip:r.i18n.getText("removeButtonTItle")});this.deleteIcon.addEventDelegate({onclick:function(e){t.fireDeletePress();e.stopPropagation();}});this.deleteIcon.addStyleClass("sapUshellTileDeleteIconInnerClass");this.deleteIcon.addCustomData(new A({key:"aria-label",value:r.i18n.getText("removeButtonLabel"),writeToDom:true}));}return this.deleteIcon;};T.prototype.setShowActionsIcon=function(s){var t=this,i;if(s){i=new I({size:"1rem",src:"sap-icon://overflow",press:function(e){t.fireShowActions();t.addStyleClass('showTileActionsIcon');var E=sap.ui.getCore().getEventBus(),a=function(n,b,c){c.removeStyleClass('showTileActionsIcon');E.unsubscribe("dashboard","actionSheetClose",a);};E.subscribe("dashboard","actionSheetClose",a);}});i.addStyleClass("sapUshellTileActionsIconClass");this.actionIcon=i;}else if(this.actionIcon){this.actionIcon.destroy(true);}this.setProperty("showActionsIcon",s);};T.prototype.setIsDraggedInTabBarToSourceGroup=function(d){this.setProperty('isDraggedInTabBarToSourceGroup',d,true);this.setVisible(!d);};T.prototype.setVisible=function(v){this.setProperty("visible",v,true);return this.toggleStyleClass("sapUshellHidden",!v);};T.prototype.setTarget=function(v){this.setProperty("target",v,true);this.$().find(".sapUshellTileInner").attr("href",v);};T.prototype.setRgba=function(v){this.setProperty("rgba",v,true);this._redrawRGBA(arguments);};T.prototype.setAnimationRendered=function(v){this.setProperty('animationRendered',v,true);};T.prototype.setNavigationMode=function(v){this.setProperty('navigationMode',v,true);};T.prototype._handleTileShadow=function(j,a){if(j.length){j.unbind('mouseenter mouseleave');var u,t=j.css("border").split("px")[0],m=this.getModel();if(t>0){u=j.css("border-color");}else{u=this.getRgba();}j.hover(function(){if(!m.getProperty('/tileActionModeActive')){var o=q(j).css('box-shadow'),s=o?o.split(') ')[1]:null,U;if(s){U=s+" "+u;q(this).css('box-shadow',U);}}},function(){q(this).css('box-shadow','');});}};T.prototype._redrawRGBA=function(a){var R=this.getRgba(),j;if(R){j=q.sap.byId(this.getId());if(!j){return;}if(!this.getModel().getProperty('/animationRendered')){j.css('transition','background-color 2s');j.css('background-color',R);}else{j.css('background-color',R);}this._handleTileShadow(j,a);}};T.prototype.setLong=function(L){this.setProperty("long",L,true);return this.toggleStyleClass("sapUshellLong",!!L);};T.prototype.setUuid=function(u){this.setProperty("uuid",u,true);return this;};return T;}); sap.ui.predefine('sap/ushell/ui/launchpad/TileContainer',['jquery.sap.global','sap/ui/base/ManagedObject','sap/ui/core/Control','sap/ushell/library','sap/ui/core/Icon','sap/m/Text','sap/ushell/override','sap/ushell/resources','sap/ushell/ui/launchpad/PlusTile','sap/ushell/ui/launchpad/TileContainerRenderer'],function(q,M,C,l,I,T,o,r,P){"use strict";var a=C.extend("sap.ushell.ui.launchpad.TileContainer",{metadata:{library:"sap.ushell",properties:{scrollType:{type:"string",group:"Misc",defaultValue:'item'},animationSpeed:{type:"int",group:"Misc",defaultValue:500},groupId:{type:"string",group:"Misc",defaultValue:null},showHeader:{type:"boolean",group:"Misc",defaultValue:true},showPlaceholder:{type:"boolean",group:"Misc",defaultValue:true},defaultGroup:{type:"boolean",group:"Misc",defaultValue:false},isLastGroup:{type:"boolean",group:"Misc",defaultValue:false},headerText:{type:"string",group:"Misc",defaultValue:null},headerLevel:{type:"sap.m.HeaderLevel",group:"Misc",defaultValue:sap.m.HeaderLevel.H2},groupHeaderLevel:{type:"sap.m.HeaderLevel",group:"Misc",defaultValue:sap.m.HeaderLevel.H4},showGroupHeader:{type:"boolean",group:"Misc",defaultValue:true},homePageGroupDisplay:{type:"string",defaultValue:null},visible:{type:"boolean",group:"Misc",defaultValue:true},sortable:{type:"boolean",group:"Misc",defaultValue:true},showNoData:{type:"boolean",group:"Misc",defaultValue:false},noDataText:{type:"string",group:"Misc",defaultValue:null},isGroupLocked:{type:"boolean",group:"Misc",defaultValue:null},isGroupSelected:{type:"boolean",group:"Misc",defaultValue:false},editMode:{type:"boolean",group:"Misc",defaultValue:false},showBackground:{type:"boolean",group:"Misc",defaultValue:false},icon:{type:"string",group:"Misc",defaultValue:'sap-icon://locked'},showIcon:{type:"boolean",group:"Misc",defaultValue:false},deluminate:{type:"boolean",group:"Misc",defaultValue:false},showMobileActions:{type:"boolean",group:"Misc",defaultValue:false},enableHelp:{type:"boolean",group:"Misc",defaultValue:false},tileActionModeActive:{type:"boolean",group:"Misc",defaultValue:false},ieHtml5DnD:{type:"boolean",group:"Misc",defaultValue:false},showDragIndicator:{type:"boolean",group:"Misc",defaultValue:false},showEmptyLinksArea:{type:"boolean",group:"Misc",defaultValue:false},showEmptyLinksAreaPlaceHolder:{type:"boolean",group:"Misc",defaultValue:false},hidden:{type:"boolean",group:"Misc",defaultValue:false},transformationError:{type:"boolean",group:"Misc",defaultValue:false},supportLinkPersonalization:{type:"boolean",group:"Misc",defaultValue:false}},aggregations:{tiles:{type:"sap.ushell.ui.launchpad.Tile",multiple:true,singularName:"tile"},links:{type:"sap.ui.core.Control",multiple:true,singularName:"link"},beforeContent:{type:"sap.ui.core.Control",multiple:true,singularName:"beforeContent"},afterContent:{type:"sap.ui.core.Control",multiple:true,singularName:"afterContent"},footerContent:{type:"sap.ui.core.Control",multiple:true,singularName:"footerContent"},headerActions:{type:"sap.ui.core.Control",multiple:true,singularName:"headerAction"}},events:{afterRendering:{},add:{},titleChange:{}}}});a.prototype.init=function(){this.bIsFirstTitleChange=true;this._sDefaultValue=r.i18n.getText("new_group_name");this._sOldTitle="";this.oNoLinksText=new T({text:r.i18n.getText("emptyLinkContainerInEditMode")}).addStyleClass("sapUshellNoLinksAreaPresentTextInner");this.oTransformationErrorText=new T({text:r.i18n.getText("transformationErrorText")}).addStyleClass("sapUshellTransformationErrorText");this.oTransformationErrorIcon=new I({src:"sap-icon://message-error"}).addStyleClass("sapUshellTransformationErrorIcon");this.oIcon=new I({src:this.getIcon()});this.oIcon.addStyleClass('sapUshellContainerIcon');this.oPlusTile=new P({groupId:this.getGroupId(),enableHelp:this.getEnableHelp(),press:[this.fireAdd,this]});this.oPlusTile.setParent(this);if(sap.ushell.Container!=undefined){if(sap.ushell.Container.getService("LaunchPage").isLinkPersonalizationSupported()){a.prototype.isLinkPersonalizationOveride();}}};a.prototype.exit=function(){if(this.oPlusTile){this.oPlusTile.destroy();}};a.prototype.onAfterRendering=function(){var t=this;var e=this.getModel()&&this.getModel().getProperty("/enableRenameLockedGroup")||false;q("#"+this.getId()+"-title").find(this.getHeaderLevel()).click(function(){var E=e||!t.getIsGroupLocked()&&!t.getDefaultGroup()&&t.getTileActionModeActive();t.setEditMode(E);});if(sap.ui.Device.system.desktop){this.handleScreenReaderAttr();}this.fireAfterRendering();};a.prototype.getTransformationErrorText=function(){return this.oTransformationErrorText;},a.prototype.getTransformationErrorIcon=function(){return this.oTransformationErrorIcon;},a.prototype.getNoLinksText=function(){return this.oNoLinksText;};a.prototype.setTransformationError=function(t){this.setProperty('transformationError',t,true);if(t){this.$().find(".sapUshellTransformationError").show();}else{this.$().find(".sapUshellTransformationError").hide();}this.$().find(".sapUshellNoLinksAreaPresent").toggleClass("sapUshellNoLinksAreaPresentError",t);return this;};a.prototype.updateAggregation=o.updateAggregation;a.prototype.updateTiles=function(R){var n="tiles";if(this.isTreeBinding(n)){M.prototype.updateAggregation.apply(this,arguments);}else{q.sap.log.debug("Updating TileContainer. Reason: ",R);switch(R){case"filter":try{this.filterTiles();}catch(e){this.updateAggregation(n);}break;default:this.updateAggregation(n);}}};a.prototype.handleNoItemsToDisplayMessage=function(){var t=this.getBinding('tiles'),i=t&&t.getContexts().length;if(i){this.$().find(".sapUshellNoFilteredItems").hide();}else{if(this.getShowNoData()){if(this.getNoDataText()){this.setNoDataText(this.getNoDataText());}else{this.setNoDataText(r.i18n.getText("noFilteredItems"));}this.$().find(".sapUshellNoFilteredItems").show();}}};a.prototype.createMissingElementsInOnScreenElements=function(i,e,b,g,s,B,f,A){var p,n=null,G=null,j=b,S=this.getShowGroupHeader(),c=e.length,d;for(j=b;j0){n=s[0].fnGroup(e[j]);if(typeof n==="string"){n={key:n};}if(G===null&&j>0){G=s[0].fnGroup(e[j-1]);}if(n.key!==G){if(B.groupHeaderFactory){d=B.groupHeaderFactory(n);}if(!i.onScreenHeaders[n.key]){A(n,d);i.onScreenHeaders[n.key]={aItemsRefrenceIndex:this.getTiles().length-1,isVisible:S};}G=n.key;}}f(e[j]);i.onScreenPathIndexMap[p]={aItemsRefrenceIndex:this.getTiles().length-1,isVisible:true};}else{throw true;}}};a.prototype._newLinkContainerEnabled=function(){return this.getSupportLinkPersonalization();};a.prototype.addNewItem=function(e){var n="tiles",A=this.getMetadata().getJSONKeys()[n],b=this.mBindingInfos[n],f=b.factory,c=q.proxy(function(d){var i=this.getId()+"-"+q.sap.uid(),g=f(i,d);g.setBindingContext(d,b.model);this[A._sMutator](g);},this);c(e);};a.prototype.markVisibleOnScreenElements=function(e,i){var b=0,p,c=e.length;for(b=0;b0){f=this.getTiles()[this.getTiles().length-1].getBindingContext().getPath();g=c[d].getPath();s=f.split('/');h=g.split('/');k=s[s.length-1];j=h[h.length-1];if(parseInt(k,10)>parseInt(j,10)){throw true;}}this.createMissingElementsInOnScreenElements(e,c,d,B.isGrouped(),B.aSorters,b,this.addNewItem.bind(this),this.addTileGroup.bind(this));i=this.getTiles();this.showHideTilesAndHeaders(e,i);this.handleNoItemsToDisplayMessage();if(sap.ui.Device.system.desktop){this.handleScreenReaderAttr();}};a.prototype.addTileGroup=function(g,h){this.addAggregation("tiles",h||new sap.ushell.ui.launchpad.HeaderTile({headerText:g.text||g.key,headerLevel:g.headerLevel||this.getGroupHeaderLevel(),visible:this.getShowGroupHeader()}));};a.prototype.setNoDataText=function(n){this.setProperty("noDataText",n,true);if(this.getShowNoData()){this.$().find(".sapUshellNoFilteredItems").text(n);}return this;};a.prototype.setGroupId=function(v){this.setProperty("groupId",v,true);if(this.oPlusTile){this.oPlusTile.setGroupId(v);}return this;};a.prototype.setHeaderText=function(h){this.setProperty("headerText",h,true);this.$().find(".sapUshellContainerTitle").text(h);return this;};a.prototype.setVisible=function(v){this.setProperty("visible",v,true);this.toggleStyleClass("sapUshellHidden",!v);return this;};a.prototype.setShowMobileActions=function(s){var S=true;if(this.oHeaderButton){this.oHeaderButton.setVisible(s);}else if(s){S=false;}this.setProperty('showMobileActions',s,S);};a.prototype.setShowIcon=function(s){this.setProperty('showIcon',s,true);q('#'+this.getId()).find('.'+'sapUshellContainerIcon').toggleClass('sapUshellContainerIconHidden',!s);};a.prototype.setDeluminate=function(d){this.setProperty('deluminate',d,true);this.toggleStyleClass('sapUshellDisableLockedGroupDuringDrag',d);return this;};sap.ushell.ui.launchpad.TileContainer.prototype.setHidden=function(h){this.setProperty("hidden",!!h,true);this.toggleStyleClass("sapUshellTileContainerEditModeHidden",!!h);return this;};a.prototype.groupHasTiles=function(){var p='',t=this.getTiles(),b=[];if(this.getBindingContext()){p=this.getBindingContext().sPath;t=this.getModel().getProperty(p).tiles;}return sap.ushell.utils.groupHasVisibleTiles(t,b);};a.prototype.handleScreenReaderAttr=function(){var c=this.getInnerContainersDomRefs();var b=c[0].children;if(!b||b.length==0||!b[0].classList.contains("sapUshellHeaderTile")){return;}var d;var e;var f=[];for(var i=0;i0){this.removeAllLinks();}M.prototype.updateAggregation.call(this,"links");};a.prototype.destroyLinks=function(R){q.sap.log.debug("link is destroyed because: "+R,null,"sap.ushell.ui.launchpad.TileContainer");};};a.prototype.setShowEmptyLinksArea=function(v){this.setProperty('showEmptyLinksArea',v,true);this.toggleStyleClass("sapUshellLinksAreaHidden",!v);};a.prototype.setShowEmptyLinksAreaPlaceHolder=function(v){this.setProperty('showEmptyLinksArea',v,true);this.toggleStyleClass("sapUshellTileContainerEditMode",v);this.toggleStyleClass("sapUshellTileContainerTabsModeEmptyLinksArea",v);this.toggleStyleClass("sapUshellEmptyLinksAreaPlaceHolder",!v);};a.prototype._startEdit=function(){var t=this;if(this.getModel()&&!this.getModel().getProperty("/editTitle")){this.getModel().setProperty("/editTitle",true,false);}if(!this.oEditInputField){sap.ui.require(['sap/m/Input'],function(b){t.setProperty('editMode',true,false);t.oEditInputField=new b({placeholder:t._sDefaultValue,value:t.getHeaderText()}).addStyleClass('sapUshellTileContainerTitleInput');t.oEditInputField.addEventDelegate({onAfterRendering:function(){setTimeout(function(){var e=t.oEditInputField.getDomRef();if(e){if(q('#'+e.id+":visible").length>0){setTimeout(function(){q(e).find('input').focus();}.bind(t),100);var w=q(window).height(),j=t.getDomRef(),g=j.offsetHeight,c=j.getBoundingClientRect().top,d=j.offsetTop;if(g+c>w){q('.sapUshellDashboardView section').stop().animate({scrollTop:d},0);}}}}.bind(t),100);}.bind(t),onfocusout:function(e){t._stopEdit();q.proxy(t.setEditMode,t,false)();},onsapenter:function(e){t._stopEdit();q.proxy(t.setEditMode,t,false)();setTimeout(function(){var c=e.srcControl,j=q(c.getDomRef()).prev();j.focus();},0);}});t.oEditInputField.setValue(t.getHeaderText());});}else{this.oEditInputField.setValue(this.getHeaderText());t.setProperty('editMode',true,false);}this._sOldTitle=this._sDefaultValue;if(sap.ui.Device.system.phone){var t=this;setTimeout(function(){var e=sap.ui.getCore().getEventBus();e.publish("launchpad","scrollToGroup",{group:t,groupChanged:false,focus:false});},100);}};a.prototype._stopEdit=function(){var c=this.getHeaderText();var n=this.oEditInputField.getValue(),h;n=n.substring(0,256).trim()||this._sDefaultValue;h=n!==c;if(this.bIsFirstTitleChange&&n===this.oEditInputField.getPlaceholder()){h=true;}this.bIsFirstTitleChange=false;if(this.getModel()&&this.getModel().getProperty("/editTitle")){this.getModel().setProperty("/editTitle",false,false);}if(!this._sOldTitle){this._sOldTitle=c;this.setHeaderText(c);}else if(h){this.fireTitleChange({newTitle:n});this.setHeaderText(n);}};a.prototype.exit=function(){if(this.oHeaderButton){this.oHeaderButton.destroy();}if(this.oActionSheet){this.oActionSheet.destroy();}if(C.prototype.exit){C.prototype.exit.apply(this,arguments);}};return a;}); sap.ui.predefine('sap/ushell/ui/launchpad/TileContainerRenderer',['jquery.sap.global','sap/ushell/resources','sap/ushell/utils',"sap/ushell/bootstrap/common/common.load.model"],function(q,r,u,m){"use strict";var T={};T.oModel=m.getModel();T.render=function(R,c){var t=c.getTiles(),h=c.getHeaderActions(),b=c.getBeforeContent(),a=c.getAfterContent(),f=c.getFooterContent()||[],v=false,d,l=c.getLinks();R.write("");if(b.length){R.write("");q.each(b,function(){R.renderControl(this);});R.write("");}R.write("");if(c.getShowDragIndicator()){R.write("");R.write("");R.write("");R.write("");R.write("");R.write("");R.write("");R.write("");R.write("");R.write("");}if(c.getShowBackground()){R.write("");R.write("");}if(c.getShowHeader()){R.write("");R.write("");R.write("<");R.write(c.getHeaderLevel().toLowerCase());R.addClass('sapUshellContainerTitle');R.writeClasses();R.writeAttributeEscaped("title",c.getHeaderText());R.writeAttribute("id",c.getId()+"-titleText");R.writeAttribute("data-role","group");R.write(">");R.writeEscaped(c.getHeaderText());R.write("");if(c.getShowIcon()){c.oIcon.removeStyleClass('sapUshellContainerIconHidden');}else{c.oIcon.addStyleClass('sapUshellContainerIconHidden');}R.renderControl(c.oIcon);R.renderControl(c.oEditInputField);R.write("");q.each(h,function(){R.renderControl(this);});R.write("");R.write("");R.write("");}R.write("");q.each(t,function(){if(this.getVisible()){v=true;}if(this.getVisible){R.renderControl(this);}});if(c.getShowPlaceholder()){R.renderControl(c.oPlusTile);}if(c.getShowNoData()){this.renderNoData(R,c,!t.length||!v);}R.write("");var L=c._newLinkContainerEnabled();if(l.length>0||L){if(c.getShowBackground()&&!(c.getIsGroupLocked()&&t.length===0)){R.write("");R.write("");}R.write("");}else{R.writeClasses();R.write(">");}if(L){R.write("");R.write("");R.renderControl(c.getTransformationErrorIcon());R.renderControl(c.getTransformationErrorText());R.write("");R.write("");}if(L){R.write("
");}l.map(function(g,i,l){if(L){var j=new sap.ushell.ui.launchpad.AccessibilityCustomData({key:"tabindex",value:"-1",writeToDom:true});g.getCustomData().map(function(k){if(k.getKey()=='tabindex'&&k.getValue("0")){j=k;}g.removeCustomData(k);});g.addCustomData(new sap.ushell.ui.launchpad.AccessibilityCustomData({key:"aria-posinset",value:(i+1).toString(),writeToDom:true}));g.addCustomData(new sap.ushell.ui.launchpad.AccessibilityCustomData({key:"aria-setsize",value:l.length.toString(),writeToDom:true}));g.addCustomData(j);g.addStyleClass("sapUshellLinkTile");if(c.getIsGroupLocked()){g.addStyleClass("sapUshellLockedTile");}}R.renderControl(g);});if(L){R.write("
");}R.write("");}if(f.length>0){R.write("");q.each(f,function(){R.renderControl(this);});R.write("");}R.write("");if(a.length){R.write("");q.each(a,function(){R.renderControl(this);});R.write("");}R.write("");u.setPerformanceMark("FLP -- tile container renderer");};T.renderNoData=function(R,c,d){R.write("
");if(d){if(c.getNoDataText()){R.writeEscaped(c.getNoDataText());}else{R.writeEscaped(c.getNoDataText(r.i18n.getText("noFilteredItems")));}}else{R.writeEscaped("");}R.write("
");};return T;},true); sap.ui.predefine('sap/ushell/ui/launchpad/TileRenderer',['jquery.sap.global','sap/ushell/Config'],function(q,C){"use strict";var T={};T.render=function(r,c){var t=null,a,p=c.getPinButton();p=p.length?p[0]:undefined;try{t=c.getTileViews()[0];}catch(e){q.sap.log.warning("Failed to load tile view: ",e.message);t=new sap.m.Text({text:"Failed to load. "});}var o=c.getParent(),b=o&&o.getTiles?o.getTiles():[],v=b.filter(function(f){return f.getVisible();}),i=v.indexOf(c)>-1?v.indexOf(c)+1:"";if(!o){return;}r.write("");if(!c.getTileActionModeActive()){r.write("");}this.renderTileActionMode(r,c);r.addClass("sapUshellTileInner");if(c.getProperty('tileActionModeActive')){r.addClass("sapUshellTileActionBG");}if(this.renderTileView){this.renderTileView(r,t,p,c.getTarget(),c.getIsCustomTile());}if(c.getShowActionsIcon()&&!c.getTileActionModeActive()){r.renderControl(c.actionIcon);}if(!c.getTileActionModeActive()){r.write("");if(this.renderTileActionsContainer){this.renderTileActionsContainer(r,t,p,c.getTarget(),c.getIsCustomTile());}}r.write("");};T.renderTileActionsContainer=function(r,t,p,s,i){if(p){p.addStyleClass("sapUshellActionButton");r.write("");r.renderControl(p);r.write("");}};T.renderTileView=function(r,t,p,s,i){var u="";if(i){r.write("");r.renderControl(t);r.write("");}else{r.write("0){u=window.location.origin+window.location.pathname+window.location.search+"&appState=lean"+s;}else{u=window.location.origin+window.location.pathname+"?appState=lean"+s;}}else{u=s;}r.writeAttributeEscaped("target","_blank");r.writeAttributeEscaped("href",u);}r.write(">");r.renderControl(t);r.write("");}};T.renderTileActionMode=function(r,c){if(!c.getTileActionModeActive()){return;}r.write("");if(c.getTileActionModeActive()&&!c.getIsLocked()){r.write("");r.write("");r.renderControl(c._initDeleteAction());r.write("");r.write("");}r.write("
");r.write("");r.write("");r.renderControl(c.getActionSheetIcon());r.write("");r.write("");r.write("");};return T;},true); sap.ui.predefine('sap/ushell/ui/launchpad/TileState',['sap/ui/core/Control','sap/ushell/library','sap/ui/core/Icon','sap/ushell/resources','./TileStateRenderer'],function(C,l,I,r){"use strict";var T=C.extend("sap.ushell.ui.launchpad.TileState",{metadata:{library:"sap.ushell",properties:{state:{type:"string",group:"Misc",defaultValue:'Loaded'}}}});T.prototype.init=function(){this._rb=r.i18n;this._sFailedToLoad=this._rb.getText("cannotLoadTile");this._oWarningIcon=new I(this.getId()+"-warn-icon",{src:"sap-icon://notification",size:"1.37rem"});this._oWarningIcon.addStyleClass("sapSuiteGTFtrFldIcnMrk");};T.prototype.exit=function(){this._oWarningIcon.destroy();};T.prototype.setState=function(s,i){this.setProperty("state",s,i);return this;};return T;}); sap.ui.predefine('sap/ushell/ui/launchpad/TileStateRenderer',['sap/ui/core/HTML'],function(H){"use strict";var T={};T.render=function(r,c){r.write("");var s=c.getState();r.write("");switch(s){case"Loading":var b=new H({content:"
"});b.setBusyIndicatorDelay(0);b.setBusy(true);r.renderControl(b);break;case"Failed":r.write("");r.write("");r.renderControl(c._oWarningIcon);r.write("
");r.write("");r.writeEscaped(c._sFailedToLoad);r.write("
");r.write("");break;default:}r.write("");r.write("");};return T;},true); sap.ui.predefine('sap/ushell/ui/tile/DynamicTile',['sap/ushell/library','./TileBase','./DynamicTileRenderer'],function(l,T){"use strict";var D=T.extend("sap.ushell.ui.tile.DynamicTile",{metadata:{library:"sap.ushell",properties:{numberValue:{type:"string",group:"Data",defaultValue:'0.0'},numberState:{type:"sap.ushell.ui.tile.State",group:"Appearance",defaultValue:sap.ushell.ui.tile.State.Neutral},numberUnit:{type:"string",group:"Data",defaultValue:null},numberDigits:{type:"int",group:"Appearance",defaultValue:0},stateArrow:{type:"sap.ushell.ui.tile.StateArrow",group:"Appearance",defaultValue:sap.ushell.ui.tile.StateArrow.None},numberFactor:{type:"string",group:"Data",defaultValue:null}}}});return D;}); sap.ui.predefine('sap/ushell/ui/tile/DynamicTileRenderer',['sap/ui/core/Renderer','sap/ui/core/format/NumberFormat','../../library','./TileBaseRenderer'],function(R,N,u,T){"use strict";var S=u.ui.tile.State;var D=R.extend(T);var t=sap.ushell.resources.i18n;D.renderPart=function(r,c){var n=c.getNumberValue(),a=c.getNumberFactor(),d=n.toString();var m=c.getIcon()?4:5;var s=this._shouldProcessDigits(d,c);if(d.length>m||s){var o=this._normalizeNumber(n,m,a,c);a=o.numberFactor;d=o.displayNumber;}else if(d!==""){var b=N.getFloatInstance({maxFractionDigits:m});d=b.format(n);}r.write("");r.write("");r.write("
");if(c.getStateArrow()){r.write("");r.write("
");}r.write('
');r.writeEscaped(a);r.write('');r.write("");r.write('');r.writeEscaped(d);}else{r.write('>');r.writeEscaped(c.getNumberValue());}r.write('');r.write("");r.write("");};D._normalizeNumber=function(n,m,a,c){var b;if(isNaN(n)){b=n;}else{var o=N.getFloatInstance({maxFractionDigits:c.getNumberDigits()});if(!a){var d=Math.abs(n);if(d>=1000000000){a='B';n/=1000000000;}else if(d>=1000000){a='M';n/=1000000;}else if(d>=1000){a='K';n/=1000;}}b=o.format(n);}var e=b;var f=e[m-1];m-=(f==='.'||f===',')?1:0;e=e.substring(0,m);return{displayNumber:e,numberFactor:a};};D._shouldProcessDigits=function(d,c){var n=c.getNumberDigits(),a;if(d.indexOf('.')!==-1){a=d.split(".")[1].length;if(a>n){return true;}}return false;};D.getInfoPrefix=function(c){return c.getNumberUnit();};return D;},true); sap.ui.predefine('sap/ushell/ui/tile/StaticTile',['sap/ushell/library','./TileBase','./StaticTileRenderer'],function(l,T){"use strict";var S=T.extend("sap.ushell.ui.tile.StaticTile",{metadata:{library:"sap.ushell"}});return S;}); sap.ui.predefine('sap/ushell/ui/tile/StaticTileRenderer',['sap/ui/core/Renderer','./TileBaseRenderer'],function(R,T){"use strict";var S=R.extend(T);S.renderPart=function(r,c){r.write("");r.write("");};return S;},true); sap.ui.predefine('sap/ushell/ui/tile/TileBase',['sap/ui/core/Control','sap/ushell/library','./TileBaseRenderer'],function(C,l){"use strict";var T=C.extend("sap.ushell.ui.tile.TileBase",{metadata:{library:"sap.ushell",properties:{title:{type:"string",group:"Data",defaultValue:null},subtitle:{type:"string",group:"Data",defaultValue:null},icon:{type:"string",group:"Data",defaultValue:null},info:{type:"string",group:"Data",defaultValue:null},infoState:{type:"sap.ushell.ui.tile.State",defaultValue:sap.ushell.ui.tile.State.Neutral},targetURL:{type:"string",group:"Behavior",defaultValue:null},highlightTerms:{type:"any",group:"Appearance",defaultValue:[]}},aggregations:{content:{type:"sap.ui.core.Control",multiple:true,singularName:"content"}},events:{press:{}}}});T.prototype.ontap=function(e){this.firePress({});};T.prototype.onsapenter=function(e){this.firePress({});};T.prototype.onsapspace=function(e){this.firePress({});};return T;}); sap.ui.predefine('sap/ushell/ui/tile/TileBaseRenderer',['sap/ushell/resources'],function(r){"use strict";var T={};var t=r.i18n;T.highlight=function(h,s){var i,a,e=jQuery.sap.encodeHTML(s).replace(/ /g,"
");if(h&&h.length&&h.length>0){for(i=0;i$1");}}return e;};T.render=function(R,c){var i,I;R.write("");R.write("");R.write("");R.write(this.highlight(c.getHighlightTerms(),c.getTitle()||""));R.write("");if(c.getSubtitle()){R.write("");R.write(this.highlight(c.getHighlightTerms(),c.getSubtitle()));R.write("");}R.write("");if(typeof(this.renderPart)==='function'){this.renderPart(R,c);}if(c.getIcon()){I=new sap.ui.core.Icon({src:c.getIcon()});I.addStyleClass("sapUshellTileBaseIcon");R.renderControl(I);}if(c.getInfo()||((typeof(this.getInfoPrefix)==='function'))&&this.getInfoPrefix(c)){R.write("");if(typeof(this.getInfoPrefix)==='function'){i=this.getInfoPrefix(c);R.writeEscaped(i);}if(c.getInfo()){if(i){R.write(", ");}R.write(this.highlight(c.getHighlightTerms(),c.getInfo()));}R.write("");}R.write("");};return T;},true); sap.ui.require.preload({ "sap/ushell/components/tiles/cdm/applauncher/i18n/i18n.properties":'#\n#Fri May 10 03:26:32 UTC 2019\ntitle=Static App Launcher\n', "sap/ushell/components/tiles/cdm/applauncher/manifest.json":'{"_version":"1.1.0","sap.flp":{"type":"tile","tileSize":"1x1"},"sap.app":{"id":"sap.ushell.components.tiles.cdm.applauncher","_version":"1.0.0","type":"component","applicationVersion":{"version":"1.0.0"},"title":"{{title}}","description":"","tags":{"keywords":[]},"ach":"CA-FE-FLP-EU"},"sap.ui":{"_version":"1.1.0","icons":{"icon":""},"deviceTypes":{"desktop":true,"tablet":true,"phone":true},"supportedThemes":["sap_hcb","sap_belize","sap_belize_plus"]},"sap.ui5":{"_version":"1.1.0","componentName":"sap.ushell.components.tiles.cdm.applauncher","dependencies":{"minUI5Version":"1.42","libs":{"sap.m":{}}},"models":{"i18n":{"type":"sap.ui.model.resource.ResourceModel","uri":"i18n/i18n.properties"}},"rootView":{"viewName":"sap.ushell.components.tiles.cdm.applauncher.StaticTile","type":"JS"},"handleValidation":false}}', "sap/ushell/components/tiles/cdm/applauncherdynamic/i18n/i18n.properties":'#\n#Fri May 10 03:26:32 UTC 2019\ntitle=Dynamic App Launcher\n', "sap/ushell/components/tiles/cdm/applauncherdynamic/manifest.json":'{"_version":"1.1.0","sap.flp":{"type":"tile","tileSize":"1x1"},"sap.app":{"id":"sap.ushell.components.tiles.cdm.applauncherdynamic","_version":"1.0.0","type":"component","applicationVersion":{"version":"1.0.0"},"title":"{{title}}","description":"","tags":{"keywords":[]},"ach":"CA-FE-FLP-EU"},"sap.ui":{"_version":"1.1.0","icons":{"icon":""},"deviceTypes":{"desktop":true,"tablet":true,"phone":true},"supportedThemes":["sap_hcb","sap_belize","sap_belize_plus"]},"sap.ui5":{"_version":"1.1.0","componentName":"sap.ushell.components.tiles.cdm.applauncherdynamic","dependencies":{"minUI5Version":"1.42","libs":{"sap.m":{}}},"models":{"i18n":{"type":"sap.ui.model.resource.ResourceModel","uri":"i18n/i18n.properties"}},"rootView":{"viewName":"sap.ushell.components.tiles.cdm.applauncherdynamic.DynamicTile","type":"JS"},"handleValidation":false}}' },"sap/ui/core/library-preload" ); //# sourceMappingURL=flp-controls.js.map