{"size": 1902, "ext": "js", "max_stars_repo_path": "sapui5-sdk-1.74.0/resources/sap/ui/comp/navpopover/RTAHandler.js", "max_stars_repo_name": "juanfelipe82193/opensap", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "sapui5-sdk-1.74.0/resources/sap/ui/comp/navpopover/RTAHandler.js", "max_issues_repo_name": "juanfelipe82193/opensap", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "sapui5-sdk-1.74.0/resources/sap/ui/comp/navpopover/RTAHandler.js", "max_forks_repo_name": "juanfelipe82193/opensap", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 237.75, "max_line_length": 1825, "alphanum_fraction": 0.7592008412}
/*
 * ! SAPUI5

		(c) Copyright 2009-2020 SAP SE. All rights reserved
	
 */
sap.ui.define(['sap/ui/comp/library','sap/ui/comp/personalization/Controller','sap/ui/comp/personalization/Util','./Util','sap/ui/comp/navpopover/flexibility/changes/AddLink','sap/ui/comp/navpopover/flexibility/changes/RemoveLink','./Factory'],function(C,a,P,U,A,R,F){"use strict";var b=C.navpopover.ChangeHandlerType;var c={};c.isSettingsAvailable=function(){return!!F.getService("CrossApplicationNavigation");};c.getStableElements=function(n){if(!n||!(n.isA("sap.ui.comp.navpopover.NavigationPopoverHandler"))){return null;}var s=n.getNavigationPopoverStableId();if(!s){return null;}var o=n.getAppComponent();if(!o){return null;}return[{id:s,appComponent:o}];};c.execute=function(n,g,r){return new Promise(function(d,e){if(!n||!(n.isA("sap.ui.comp.navpopover.NavigationPopoverHandler"))){return e(new Error("oNavigationPopoverHandler is not of supported type sap.ui.comp.navpopover.NavigationPopoverHandler"));}if(!n.getNavigationPopoverStableId()){return e(new Error("StableId is not defined. SemanticObject="+n.getSemanticObject()));}var o=n.getAppComponent();if(!o){return e(new Error("AppComponent is not defined. oControl="+n.getControl()));}n._getNavigationContainer().then(function(N){var m=[];var M=[];var f=function(h){var s=N.getId();m=h.filter(function(i){return i.visible===true;}).map(function(i){return{selectorControl:{id:s,controlType:"sap.ui.comp.navpopover.NavigationContainer",appComponent:o},changeSpecificData:{changeType:b.addLink,content:i}};});M=h.filter(function(i){return i.visible===false;}).map(function(i){return{selectorControl:{id:s,controlType:"sap.ui.comp.navpopover.NavigationContainer",appComponent:o},changeSpecificData:{changeType:b.removeLink,content:i}};});};N.openSelectionDialog(true,false,f,false,r,undefined).then(function(){N.destroy();d(m.concat(M));});});});};return c;},true);
