{"version":3,"sources":["./src/$_lazy_route_resource lazy namespace object","./src/app/adminTiles/AdminLandingService.ts","./src/app/adminTiles/adminTile.action.ts","./src/app/adminTiles/adminTile.action.types.ts","./src/app/adminTiles/adminTiles.reducer.ts","./src/app/banner/FxpMessageService.ts","./src/app/banner/banner.action.ts","./src/app/banner/banner.action.types.ts","./src/app/banner/banner.reducer.ts","./src/app/claims/claims.action.ts","./src/app/claims/claims.action.types.ts","./src/app/claims/claims.reducer.ts","./src/app/components/app-component/app.component.ts","./src/app/components/fxpbot/fxpbot.component.html","./src/app/components/fxpbot/fxpbot.component.ts","./src/app/components/fxpbot/fxpbot.module.ts","./src/app/components/pageTour-Component/pageTour.component.html","./src/app/components/pageTour-Component/pageTour.component.ts","./src/app/components/pageTour-Component/pageTour.module.ts","./src/app/components/partnerContainer-component/partnerContainer-component.html","./src/app/components/partnerContainer-component/partnerContainer-component.ts","./src/app/components/partnerContainer-component/partnerStateService.ts","./src/app/components/powerbi-component/powerbi-container-component.html","./src/app/components/powerbi-component/powerbi-container-component.ts","./src/app/components/reactContainer-component/reactpartner-component.html","./src/app/components/reactContainer-component/reactpartner-component.ts","./src/app/flighting/featureFlags.action.types.ts","./src/app/flighting/featureFlags.actions.ts","./src/app/flighting/flighting.reducer.ts","./src/app/fxplazyloader.ts","./src/app/init/app.status.action.types.ts","./src/app/init/app.status.reducer.ts","./src/app/leftNavigation/leftNavigation.action.ts","./src/app/leftNavigation/leftNavigation.action.types.ts","./src/app/leftNavigation/leftNavigation.reducer.ts","./src/app/loader/loader.actions.ts","./src/app/loader/loader.actions.types.ts","./src/app/loader/loader.reducer.ts","./src/app/loader/pageLoaderService.ts","./src/app/modules/angular.material.module.ts","./src/app/modules/app.module.ts","./src/app/modules/powerbi-module.ts","./src/app/modules/reactapp.module.ts","./src/app/notifications/notifications.action.type.ts","./src/app/notifications/notifications.reducer.ts","./src/app/obo/obo.action.ts","./src/app/obo/obo.action.types.ts","./src/app/obo/obo.reducer.ts","./src/app/profile/profile.action.ts","./src/app/profile/profile.action.types.ts","./src/app/profile/profile.reducer.ts","./src/app/services/FxpServices.ts","./src/app/store/action.logger.adaptor.ts","./src/app/store/platform.reducer.ts","./src/app/store/platform.store.factory.ts","./src/app/systemMessages/PlannedDownTimeService.ts","./src/app/systemMessages/SystemMessagesService.ts","./src/app/systemMessages/systemMessage.action.ts","./src/app/systemMessages/systemMessage.action.types.ts","./src/app/systemMessages/systemMessage.reducer.ts","./src/app/user/user.reducer.ts","./src/js/common/ApplicationConstants.ts","./src/js/common/PouchDBProvider.ts","./src/js/common/PouchDbConnection.ts","./src/js/common/PouchDbService.ts","./src/js/common/SettingsType.ts","./src/js/common/UserInfo.ts","./src/js/common/enum/ComponentFramework.ts","./src/js/common/enum/Feedback.enum.ts","./src/js/constants/errorCodes.ts","./src/js/context/FxpContext.ts","./src/js/factory/FxpUIDataFactory.ts","./src/js/provider/SettingsServiceProvider.ts","./src/js/resiliency/FxpResiliency.ts","./src/js/services/AdalLoginHelperService.ts","./src/js/services/BroadCastingService.ts","./src/js/services/DataService.ts","./src/js/services/FxpAuthorizationService.ts","./src/js/services/FxpBreadcrumbService.ts","./src/js/services/FxpBroadcastedEvents.ts","./src/js/services/FxpConfiguration.ts","./src/js/services/FxpFeedbackService.ts","./src/js/services/FxpHttpService.ts","./src/js/services/FxpIrisBotService.ts","./src/js/services/FxpOCVFeedbackService.ts","./src/js/services/FxpPartnerHttpInterceptorHooks.ts","./src/js/services/FxpRouteService.ts","./src/js/services/FxpSignalRClient.ts","./src/js/services/FxpStateTransitionService.ts","./src/js/services/FxpStorageService.ts","./src/js/services/HelpCentralService.ts","./src/js/services/MsalAuthenticationService.ts","./src/js/services/NotificationActionCenter.ts","./src/js/services/NotificationService.ts","./src/js/services/NotificationStore.ts","./src/js/services/OBOUserService.ts","./src/js/services/PartnerAppRegistrationService.ts","./src/js/services/PersonalizationService.ts","./src/js/services/TimeZoneHelper.ts","./src/js/services/UserClaimsService.ts","./src/js/services/UserInfoService.ts","./src/js/services/dashboardService.ts","./src/js/services/fxp.global.store.service.ts","./src/js/services/lazyLoaderService.ts","./src/js/services/pageTourEventService.ts","./src/js/services/userProfileService.ts","./src/js/telemetry/EnvironmentData.ts","./src/js/telemetry/ErrorSeverityLevel.ts","./src/js/telemetry/FeatureUsageEvent.ts","./src/js/telemetry/FxpLogHelper.ts","./src/js/telemetry/FxpLoggerServiceExtension.ts","./src/js/telemetry/GlobalExceptionHandler.ts","./src/js/telemetry/LogMetricBag.ts","./src/js/telemetry/LogPropertyBag.ts","./src/js/telemetry/SystemEvent.ts","./src/js/telemetry/TelemetryConst.ts","./src/js/telemetry/fxpLogger.ts","./src/js/telemetry/network-connection.ts","./src/js/telemetry/telemetrycontext.ts","./src/js/utils/CommonUtils.ts","./src/js/utils/devicefactoryService.ts","./src/js/utils/systemDownOverlay.ts","./src/main.ts","external \"angular\""],"names":["webpackEmptyAsyncContext","req","Promise","resolve","then","e","Error","code","keys","module","exports","id","$http","$q","$rootScope","$timeout","fxpConfiguration","loggerService","msalAuthenticationService","fxpMessage","userClaimsService","userInfoService","$base64","globalStoreService","iCount","iReqCount","iUCount","sourceForTelemetry","FXP_TELEMETRY_BASE_NAME","this","http","q","rootScope","timeout","sleepInterval","fxplogger","fxpServiceEndPoint","FxpAppSettings","FxpServiceEndPoint","fxpMessageSvc","GetAdminDataFromServer","source","deferred","defer","self","getUserRoles","response","userResouces","getUserAdminResources","toString","userRoles","encode","encodedUserResources","url","startTrackPerformance","accessTokenRequestInProgress","logError","fxpUIConstants","UIMessages","GetAdminDataFailureError","ErrorMessageTitle","OnGetAdminDataFromServerFailure","Medium","addMessage","GetAdminDataAuthFailureError","ErrorMessage","messageType","error","logTrace","requestHeaders","XUserClaimsToken","XTenantId","window","TenantId","XResources","method","headers","data","JSON","stringify","GetPlatformStore","dispatch","parse","sessionStorageKey","FxpAdminData","getCurrentUser","sessionStorage","reject","stopTrackPerformance","promise","GetAdminTileDetails","isRefresh","adminTilesData","Object","GetPlatformState","AdminTiles","length","GetAdminDataFromCache","adminData","getItem","setAdminTiles","payload","type","SET_ADMIN_TILES","removeOboContext","REMOVE_OBO_CONTEXT","Actions","defaultState","AdminTileReducer","state","action","$interval","fxpConfigurationService","fxpLoggerService","message","doNotAutoClose","trackingId","messageID","focusControlIdOnClose","controlIdToFocusOnClose","showBanner","msgTrackId","trackIdLabel","msgID","msgIDLabel","messages","some","item","MessageType","Message","trackId","uniqueTransactionId","msg","msgDate","Date","info","show","success","undefined","propbag","createPropertyBag","errorMessageWithTrackingId","addToBag","location","hash","logEvent","DispatchGlobalAction","messageClass","isAnyBlockingMessageVisible","$","activeElement","setTimeout","messagecontainers","msgContainer","className","first","focus","clearTimeout","monitorMessages","closeMessage","cancel","msgInterval","clearAndReload","clear","reload","msgTimeout","FxpMessageTimeout","isNaN","bind","FxpBaseConfiguration","FxpConfigurationStrings","UIStrings","MessageToasterTrackId","MessageID","CreateIfNotExist","SubscribeToPlatformState","platformState","updateBanners","Banners","push","i","indexOf","splice","dt","messageExists","toLowerCase","AddBanner","ADD_BANNER_MESSAGE","CloseBanner","CLOSE_BANNER_MESSAGE","BannerActionTypes","BannerReducer","index","slice","AddLoggedInUserClaims","userClaims","ADD_LOGGED_IN_USER_CLAIMS","logEnabled","AddCurrentUserClaims","ADD_CURRENT_USER_CLAIMS","ClaimsActionTypes","defaultClaims","ClaimsReducer","injector","sharedComponentLoaderControl","customElements","define","pageLoaderService","lazyLoadingService","fxpEventBroadCastService","stateService","renderer","isBotCloseButtonListenerAdded","hideVirtualAssistant","element","document","querySelector","removeClass","showVirtualAssistant","addClass","renewCorrelationId","fnShowPageLoader","moduleBundle","IrisModuleBundle","bundle","IrisBundle","getInstance","load","serie","route","get","ngComponent","childComponent","ngModule","_ngModuleDefFactory","ngModuelRef","instantiateModule","loadComponent","compileAndLoadModule","ngModuleRef","catch","console","log","fnHidePageLoader","ngOnInit","On","OnLaunchIrisBot","OnHideIrisBot","moduleRef","component","componentFactory","componentFactoryResolver","resolveComponentFactory","entry","createComponent","showCountClass","initPageTourComponent","pageTourComponent","pageTourBundle","getBundlesForSharedComponent","getSharedComponentDetails","bindEventListeners","OnPageTourFlyoutOpened","setPageTourFlyoutState","OnPageTourFlyoutClosed","event","props","unViewedTourCount","isOpen","isPageTourFlyoutOpen","togglePageTour","hidePageTourFlyout","showPageTourFlyout","broadCast","ShowPageTour","HidePageTour","fxpLoaderService","fxpMessageService","fxpPartnerStateService","compilerFactory","setCompilerFactory","ngOnDestroy","componentRef","remove","currentStateName","currentState","$current","addEventListener","returnValue","path","forEach","name","partnerAppName","routeInfo","getRegisteredAppRoute","sticky","views","currentStateHandle","timerLabel","moduleType","parent","contains","addState","time","timeEnd","properties","logException","Critical","ModuleCompilationError","label","includeRootModule","instance","constructor","ErrorInstantiatingComponent","_currentStateName","stateName","filter","PowerBiFeatureName","preReportRender","embededReportId","params","reportId","embededDashboardId","dashboardId","powerBiBaseUrl","PowerBiReportBaseUrl","powerBiService","Service","hpmFactory","wpmpFactory","routerFactory","isNullOrEmpty","showError","showDashBoard","showReport","powerBiBaseURL","powerBiFeatureUsageEvent","User","PageLoad","Web","startFeatureUsageEvent","config","embedUrl","filters","settings","getReportSettings","getAccessToken","token","accessToken","reportContainer","nativeElement","reset","powerBiReport","embed","attachEventHandlers","finally","embededDashBoardId","dashBoardContainer","powerBiDashBoard","PowerBI_Invalid_Configuration","High","powerBiComponent","featureUsageEvent","handlePowerBiLoaded","handlePowerBiRendered","handlePowerBiError","off","on","getFilters","updatedFilters","getUpdatedFilters","setFilters","propForEvents","clone","propForFeature","ActionStatus","Succeeded","endFeatureUsageEvent","accessRequestUrl","detail","errorMessage","PowerBI_OnError","Failed","filterPaneEnabled","navContentPaneEnabled","existingFilters","newFilter","existingFilterIndex","findIndex","existingFilter","target","table","column","getNewFilters","profile","getCurrentUserProfile","newFilters","operator","values","displaySettings","value","getValueForFilter","$schema","PowerBiFilterSchemaUrl","displayName","filterType","FilterType","Basic","filterValueRegExp","RegExp","PowerBiFilterValueRegularExpression","test","exec","powerBITokenURL","PowerBiEndpoint","acquireTokenAsPromise","PowerBI_Token_Failure","globalStore","stateChangeUnsubscribeCaller","unloadComponent","ngAfterViewInit","SubscribeToPartnerState","routeState","ErrorLoadingReactComponent","ErrorUnloadingReactComponent","warning","FlightingActions","UpsertFeatureFlags","UPSERT_FEATURE_FLAG","FeatureFlagReducer","setRootModuleReference","parentModuleRef","_fxprootModule","_compilerFactory","_compiler","createCompiler","useJit","jitModuleRef","compileModuleAndAllComponentsAsync","factory","partnerModule","ngModuleFactory","create","aotModuleFactoryRef","AppStatusActionTypes","Initialization","Authentication","HitCounter","AppStatusReducer","START_APP_INITIALIZATION","COMPLETE_APP_INITIALIZATION","AUTHENTICATE_USER","FAIL_AUTHENTICATION","UPDATE_COUNTER","setLeftnav","SET_LEFTNAV","LeftNavigationReducer","ShowLoader","showLoader","timeoutCallback","SHOW_LOADER","HideLoader","HIDE_LOADER","ShowSpecificLoader","SHOW_SPECIFIC_LOADER","HideSpecificLoader","HIDE_SPECIFIC_LOADER","LoaderActionTypes","LoaderReducer","loader","defaultLoaderName","timeoutIntervalInMs","PageLoadTimeOut","pageLoadTimers","PageLoaderService","_instance","incomingLoaderState","Loader","showOrHideLoaders","currentLoaderState","loaderToShow","entries","fnChangeLoaderState","disablePageLoaderTimers","setPageLoadTimer","loaderToHide","currentLoader","incomingLoader","timeOutCallback","pageLoadTimer","loadingText","fnCreateLoaderData","fnShowPageLoaderStep","currentStepIndex","totalStepsCount","loadingTextWithStep","fnShowInlineLoader","loaderName","fnBroadcastInlineLoading","fnHideInlineLoader","fnShowFlyoutInlineLoader","loaderTooltip","fnCreateFlyoutLoaderData","fnHideFlyoutInlineLoader","fnShowSpecificPageLoader","fnHideSpecificPageLoader","angular","extend","flyout","loaderInstance","Spinner","lines","width","radius","scale","corners","color","opacity","rotate","direction","speed","trail","fps","spin","getElementById","$broadcast","OnShowHideInlineLoader","timer","NotificationActionTypes","UserNotifications","UnreadNotificationCount","NotificationReducer","Push_Notification","Dismiss_Notification","status","Mark_Notification","Reset_Notification_Collection","AddOBOEntity","ADD_OBO_ENTITY","RemoveOBOEntity","REMOVE_OBO_ENTITY","OBOActionTypes","defaultOBOEntity","OBOReducer","AddLoggedInUserProfile","userProfile","ADD_LOGGED_IN_USER_PROFILE","AddCurrentUserProfile","ADD_CURRENT_USER_PROFILE","ProfileActionTypes","defaultProfile","ProfileReducer","FxpConfigurationServiceFactory","FxpConfigurationServiceProvider","provide","useFactory","deps","FxpEventBroadCastServiceFactory","FxpEventBroadCastServiceProvider","FxpStateTransitionServiceFactory","FxpStateTransitionServiceProvider","FxpHttptServiceFactory","FxpHttpServiceProvider","FxpSignalRServiceFactory","FxpSignalRServiceProvider","MsalAuthenticationServiceFactory","MsalAuthenticationServiceProvider","AdalLoginHelperServiceFactory","AdalLoginHelperServiceProvider","AdminLandingServiceFactory","AdminLandingServiceProvider","DashboardServiceFactory","DashboardServiceProvider","DataServiceFactory","DataServiceProvider","FxpAuthorizationServiceFactory","FxpAuthorizationServiceProvider","FxpBreadcrumbServiceFactory","FxpBreadcrumbServiceProvider","FxpFeedbackServiceFactory","FxpFeedbackServiceProvider","FxpMessageServiceFactory","FxpMessageServiceProvider","FxpRouteServiceFactory","FxpRouteServiceProvider","FxpStorageServiceFactory","FxpStorageServiceProvider","HelpCentralServiceFactory","HelpCentralServiceProvider","NotificationActionCenterFactory","NotificationActionCenterProvider","NotificationServiceFactory","NotificationServiceProvider","NotificationStoreFactory","NotificationStoreProvider","OBOUserServiceFactory","OBOUserServiceProvider","PageLoaderServiceFactory","PageLoaderServiceProvider","pageTourEventServiceFactory","pageTourEventServiceProvider","PersonalizationServiceFactory","PersonalizationServiceProvider","PlannedDownTimeServiceFactory","PlannedDownTimeServiceProvider","SystemMessagesServiceFactory","SystemMessagesServiceProvider","TimeZoneHelperFactory","TimeZoneHelperProvider","UserInfoServiceFactory","UserInfoServiceProvider","UserClaimsServiceFactory","UserClaimsServiceProvider","UserProfileServiceFactory","UserProfileServiceProvider","FxpLoggerServiceFactory","FxpLoggerServiceProvider","FxpConfitServiceFactory","FxpConfitServiceProvider","FxpFeatureFlagServiceFactory","FxpFeatureFlagServiceProvider","FxpUIDataFactory","FxpUIDataProvider","DeviceFactoryFactory","DeviceFactoryProvider","SettingsServiceFactory","SettingsServiceProvider","FxpStateServiceFactory","FxpStateServiceProvider","FxpPartnerHttpInterceptorHooksFactory","FxpHttpInterceptorHooksProvider","FxpContextServiceFactory","FxpContextServiceProvider","LazyLoaderServiceFactory","LazyLoaderServiceProvider","FxpIrisBotServiceFactory","FxpIrisBotServiceProvider","FxpGlobalStoreServiceFactory","FxpGlobalStoreServiceProvider","FxpOCVFeedbackServiceFactory","FxpOCVFeedbackServiceProvider","_fxpLogger","_source","_eventBase","processEvent","eventName","propertyBag","CreatePropertyBag","processException","ReduxStoreException","key","PlatformReducer","Status","LoggedInUser","CurrentUser","OBO","LeftNavigation","SystemMessages","FeatureFlags","Notifications","fxpLogger","PlatformStoreFactory","FxpStore","Create","actionLoggerAdaptor","debugMode","EnvironmentName","Get","SetLogger","CreateStore","Platform","AllowAll","SystemMessagesService","TimeZoneHelper","moment","UiString","logger","$window","fxpSignalRService","dashboardService","fxpRouteService","fxpGlobalStore","errorCount","plannedDownTimeCollection","systemAnnouncementCollection","isFlashVisible","flashMessages","dismissedSysMessageIds","isSystemAnnouncementVisible","timeFormat","signalREventName","signalRTenant","onMessageFromSignalR","operation","x","payLoadObject","cleanSysMessageIdsInLocalStorage","concat","_","each","startTime","convertUtcToLocal","utc","endTime","updateFlash","intervalTimeMinutes","FlashPollingIntervalInMinutes","displayFlashBeforeMinutes","DisplayFlashBeforeMinutes","localStorage","systemMessagesInState","subscribeToSignalREvent","unsubscribeFunction","subscribe","unsubscribeSignalREvent","GetSystemAnnouncementMessageandUpdateFlash","onSystemAnnouncementSuccess","onRejected","getSystemAnnoucementCollection","updateSystemAnnouncementFlash","pollForPlannedDownTimesandUpdateFlash","onSuccess","getPlannedDownTimeCollection","nextLoad","pollForUpdateFlash","cancelNextLoad","loadPromise","pausePlannedDownTimesPoll","resumePlannedDownTimesPoll","currentLeftNavItem","downTime","now","isDownTimeConfigured","tempTime","isSystemDown","tz","guess","format","systemDownMessage","isSameOrAfter","subtract","isSameOrBefore","includes","PlannedDownTime_UpdateFlash_Failure","systemAnnouncementMesage","concatenateFlashMessage","PlannedDownTime_UpdateSystemAccouncement_Failure","businessCapability","isMessageConfiguredOnLeftNav","leftNavLinks","getCachedLeftNavForCurrentUser","dashboardItem","find","targetUIStateName","getDefaultStateName","leftNavItemsWithCurrentState","leftNav","selectedItem","businessFunction","parentId","isAfter","tempMessage","isStateDown","systemDown","downStateName","targetURL","targetEventName","closeSystemAnnouncement","closeSystemMessage","messageId","sysMessage","getSystemMessagesCollectionAsync","messageCount","pageOffset","sortOrder","systemMessagesEndPoint","saveSystemMessageAsync","systemMessage","post","deleteSystemMessageAsync","systemMessageId","delete","promises","allSystemMessagesEndpoint","endpoint","getSystemMessages","all","results","reduce","acc","val","userAlias","getLoggedInUser","allSystemAnnouncementEndpoints","SystemMessageEndpoints","split","SystemAnnouncementEndpoints","systemMessages","UpsertSystemMessage","UPSERT_SYSTEM_MESSAGE","RemoveSystemMessage","REMOVE_SYSTEM_MESSAGE","SystemMessageActions","SystemMessageReducer","defaultUser","Profile","Claims","LoggedInUserReducer","CurrentUserReducer","UserSessionCreated","FxpAppLaunched","StartUpFlagRetrieved","PageTourFlagRetrieved","SkypeBotInit","ProfileNotFound","RedirectedToSales","OnProfileFromGraphAPI","Application","Global","GlobalContextDBName","BootApiUrl","WorkerFilepath","BaseConfigDBName","PersonaConfigByRoleGroupId","PartnerDomain","PartnerDomainIss","UserProfile","UIConfigDB","UserInfo","UserClaims","BaseUrl","FxpBaseUrl","host","AssetsUrl","ProfileStateName","ErrorStateNames","RequiredMessage","CouchBaseLoginContract","FxpSessionKey","FxpApplaunchedKey","RequestStateName","FxpBreadcrumbStorageKey","PageTourFeature","UserPreferencesSettings","FxPAppName","FxPDbName","UserPreferencesStorageKey","PageTourLoggerService","SnowRequestTypeSettings","ESTenanatUrlString","SalesTenantUrlString","GraphApiProfileUrl","DefaultHelpLink","AdalLoginError","AdalLoginRequest","XUserProfileToken","FlightingStatusHeader","PIIFilterRegex","ProfileFlyoutConfig","CONST","fxpUserClaimsSession","String","StateEvents","OnStart","onError","onInvalid","metricConstants","GetBasicProfileSvcName","GetUserClaimsSvcName","FXPApplicationLaunchMetric","FXPApplicationLaunchTimeMetric","UserClaimsResponseTime","UserClaimsResponseTimeError","CurrentTime","StatusText","StartTime","EndTime","ServiceName","ServiceURL","UserAgent","UserProfileService","FxpAppLaunch","SessionId","UserUPN","UserBusinessRole","Geography","BrowserAgent","SearchProfileServiceTime","SearchProfileServiceErrorTime","AdminPersonalizationUserNavLinksCount","FxpLoadDuration","searchProfileSvcName","TimeStamp","L0BusinessProcessName","L0Name","L0Name_L1Name","UserRoleGroup","LeftNavigationClickCountbyRoleGroup","LeftNavigationClickCountbyRole","RequestedUserAlias","RequestedUserRoleGroupId","ScreenRoute","FeedbackType","Action","UserFeedback","UserFeedbackErrorMessage","OBOUserRoleGroupName","OBOUserBusinessRole","OBOUserUPN","BreadcrumbString","BrowserPageTitle","LoggedinUserName","OBOUserName","OperatingSystem","BrowserType","BrowserVersion","DeviceType","TotalDuration","UIRenderDuration","LeftNavPinStatus","GetSettingsAPIResponseDuration","SaveSettingsAPIResponseDuration","ModifiedRoleGroupName","ModifiedRoleGroupID","ModifiedBusinessRoleName","ModifiedBusinessRoleID","OBOUserAlias","LeftNavLinksValueBeforeModification","LeftNavLinksValueAfterModification","ErrorUrl","GlobalErrorDetail","FooterLinkUrl","FooterLinkName","HeaderClickNavigatedStateName","HeaderClickNavigatedStateTemplateURL","MiniProfileIconClick","ProfileLinkClick","ChatIconClick","MailIconClick","HelpLinkParent","HelpLinkChild","HelpIconClicked","HelpView","ErrorText","UserPorfileServiceEndPoint","IsLoginRequired","IsCSABlockedUser","ModuleBootstrapping","OBOConstants","OnBehalfOfUserName","OnBehalfOfUserAlias","OnBehalfOfUserUpn","ActonBehalfMode","OnBehalfOfUserBusinessRoleId","OnBehalfOfUserBusinessRole","OnBehalfOfUserRoleGroup","AdminActOnBehaflOfDuratoin","ActonBehalfofAdminStartTime","ActonBehalfofAdminEndTime","ActionTypes","Add","Save","Submit","Remove","Cancel","Click","keyCodes","escapeKey","arrowRightKey","arrowLeftKey","arrowDownKey","arrowUpKey","enterKey","tabKey","spaceBar","applicableDevice","desktop","mobile","BreadcrumbEventType","BreadcrumbLoad","BreadcrumbClick","askOps","createLink","viewLink","FxpLoad","GetUserClaims","GetUserThumbnail","GetBasicProfileWithAdal","AdalTimeGetBasicProfile","DashboardLoad","LoadRoutes","PreDashboardLoad","SavePersonalizedNavItems","SaveRoleGroupPersonalizedNavItems","GetPersonalizedNavItems","GetMasterLeftNavItems","SendUserFeedback","GetRoleGroupDetails","GetLeftNavData","GetTenantClaims","RoleGroupId","RoleGroupName","TenantKey","TenantName","getDBConnection","applicationName","DbConnection","createDatabase","destroy","localDatabaseName","PouchDB","getDatabase","pouchDbConnection","_docId","_localDbName","_database","save","jsonDocument","jsonDoc","documentId","documentRevision","saveUpdateDocument","put","getAllDocuments","options","allDocs","SettingsType","aadObjectId","alias","firstName","lastName","middleName","fullName","businessDomain","reportsTo","reportsToDisplayName","businessRoleId","seniority","businessRole","standardTitle","addressBookTitleDesc","email","resourceImage","reportsToFullName","preferredFirstName","businessRoleDisplayName","roleGroupId","roleGroupName","isDefaultProfile","domain","personnelNumber","primaryTool","costCenterCode","hiringDate","terminationDate","serviceJobTitle","resourceType","alignmentType","companyCode","subAreaCode","countryCode","homeLocationNotFoundInd","timeZoneId","standardTimeZone","resourceStatus","resourceCategory","resumeUrl","functionHierarchyCode","ComponentFramework","IOCVSource","IOCVFeedbackType","IOCVManifestType","ModuleBoostrapFailure","ModuleBoostrapFailureRequireJS","GlobalExceptionHandler","GlobalExceptionHandler_AngularJs","OnMsalLoginFailure","OnMsalTokenFailure","OnTelemetryContextError","OnSettingsServiceError","OnGetAdminTilesFailure","GetLeftNavData_Failure","SaveLeftNavPinSetting_Error","SystemMessage_Read_Collection_Rejection","SystemMessage_Fetch_Business_Workflow","SystemMessage_Save_Failure","SystemMessage_Update_Failure","SystemMessage_Delete_Failure","AcquireTokenFailure_UnKnown_Reason","OBO_User_Already_Active","Get_OBO_User_Configuration_Failure","OBO_User_Search_Failure","State_Not_Found","State_Change_Failure","Msal_ResourceTokenAcuqisition_Failure","SkypeBotInit_Failure","API_Threshold_Crossed","InitializeFeedback_Failure","Error_SubmittingFeedback","Error_LoadingFeedback","GetRoleGroupDetails_Failure","PublishNotifications_Failure","PublishNotificationsRolesRoleGroup_Failure","GetRequestTypeData_Failure","CloseActOnBehalofUser_Failure","GetContextualHelpArticles_Failure","GetArticleData_Failure","SaveHelpFeedback_Failure","SearchSuggestions_Failure","SaveViewCount_Failure","ShowErrorMsgNavigateToUserLookUp","GetNotifications_Failure","GetUnreadNotificationCount_Failure","MarkAllNotificationsAsRead_Failure","DismissAllNotifications_Failure","ReadNotification_Failure","DeleteNotification_Failure","SaveNotificationDNDSetting","ErrorLoadingDashboard","ErrorFetchingTokenForPowerBI","ErrorLoadingPowerBiDashboard","SubmitRoleGroupNavPresonalization_Failure","GetRoleGroupDetailsPersonalization_Failure","GetGlobalNavMasterList_Failure","GetRoleGroupNavList_Failure","ReadToastNotification_Failure","MarkNotificationAsRead_Failure","UserLookUpSearchUser_Failure","SetSelectedUser_Failure","NavigateToPersonalizationView_Failure","ErrorOnLeftNavClick","HandleProfileServiceResponse","AdalOnError","AdalOnErrorWithErrorCode","DefaultStateNotConfigured","ErrorRegisteringRoute","ErrorInLazyLoading","ErrorUpdatingStateObject","RouteResolveException","HttpInterceptorResponseError","DashboardService_GetLeftNavDataFailure","FxPConfigurationFailure","StartUpFlagRetrieveError","DataService_TokenFailure","FeedbackService_Error","CheckToastNotifications_Failure","SharedComponentNotRegistered","LazyLoadingFailedForSharedComponent","PersonalizationService_GetMasterLeftNav_Failure","PersonalizationService_GetPersonalizedLeftNav_Failure","PersonalizationSerivce_SavePersonalizedNavItems_Failure","PersonalizationSerivce_GetRoleGroupDetails_Failure","PersonalizationSerivce_GetRoleGroupDetailsForNotification_Failure","PersonalizationSerivce_GetRolePersonalizedNavItems_Failure","PersonalizationSerivce_GetRoleGroupPersonalizedList_Failure","PersonalizationSerivce_SaveRoleGroupPersonalizedNavItems_Failure","AuthSerive_UserClaimsEmptyInLocalStorage","AuthSerive_MissingApplicationObjectInClaims","AuthSerive_MissingRolesObjectInClaims","AuthSerive_TenantClaimsEmptyInLocalStorage","AuthSerive_TenantObjectMissingInClaims","AuthSerive_ClaimsMissingInTenantObject","AuthService_TokenAcquisitionInProgress","AuthService_TokenAcquisitionInProgress_TenantClaims","AuthService_TenantClaimsObjectMissingInClaims","AuthService_APICallFailedWithUnknownReason","AuthService_ErrorNotifyingCachedClaims","AuthService_UnknownException","AuthService_GetClaimsFailure","GetUserThumbnail_TokenNotFound","GetBasicProfile_TokenNotFound","GetBasicProfile_BusinessRoleMissing","GetBasicProfile_RoleGroupMissing","GetBasicProfile_ProfileNotFound","BasicProfile_UnknownError","SearchProfile_TokenMissing","ProfileServiceFailure","ProfileService_ErrorNotifyingCachedProfile","ErrorOnProfileSearch","Resiliency_ExternalResourceLoadingError","Resiliency_ModuleLoadingError","SignalR_ErrorOnDisconnect","SignalR_ErrorOnMessageSend","SignalR_ErrorOnJoinGroup","SignalR_ErrorOnLeaveGroup","SignalR_ErrorOnConnection","PartnerAppRegistrationService_ErrorOnAppRegistration","PartnerAppRegistrationService_ErrorOnSharedComponentRegistration","OnStateChangeStartException","iPouchDBProvider","FxpContext","_iPouchDBProvider","pouchService","GetInstance","saveContext","saveData","readContext","readData","getDocumentKeys","getDocumentKeysData","deleteContext","db","getDBService","doc","_rev","err","exception","getFxpBaseUrl","getAssetLibraryUrl","getCurrentSessionId","PropBagInternal","JSONData","include_docs","rows","map","row","fxpFeedbackService","headerText","pageTitle","getHeaderText","setHeaderText","OnAppHeaderChanged","getPageTitle","setPageTitle","OnPageTitleChanged","setPageTitleFromRoute","toState","setScreenRoute","setBrowserTitle","setAppHeaderFromRoute","headerName","getUIDataFactoryObj","FxpUIData","settingsServiceConfig","settingsServiceBaseUrl","$get","$inject","init","otherwise","input","configure","settingsSeerviceConfig","getSettings","settingType","settingId","settingNames","saveSettings","settingName","settingValue","pathUrl","getPathUrl","Array","setting","getSettingsSvc","saveSettingsSvc","unavailablePartnerModules","externalResourceLoadFailed","scriptName","logMsg","FxpLoggerService","getResilientModules","modules","statesWithMissingModules","resilientModules","moduleName","failedModules","checkModuleResiliency","logFailedModulesInfo","app","requires","reverse","join","hasChildren","Resiliency","$resource","serviceEndpoints","registerEndPoint","applicationId","getCachedToken","acquireToken","callback","authResult","result","isTokenRetrievalStarted","resource","subjects","broadCastSubject","eventIndex","getIndexOfObject","subject","onNext","getSubjectInstance","subscribeToSubject","unsubscribeSubject","unsubscribe","callBack","$on","emit","$emit","fxploggerService","retryCount","parentDeferred","getWithAdalTokenSync","getAsObservable","observer","next","complete","retryCountForUrl","propBag","$state","states","stateGo","object","checkStatePermission","isStateAuthorized","redirectToUnauthorizedState","trim","current","telemetrymsg","UnauthorizedUIString","logWarning","preventDefault","go","isAuthorized","appName","stateConfig","appConfig","angularPartnerStateConfig","s","routes","r","isAppAdmin","adminPermissionsRules","getAppAdminRules","hasUserPermissions","hasUserRoles","hasRoles","allRolesMandatory","AllRolesMandatory","roles","Value","getClaimsList","every","checkRoleFunc","hasResourcePermissions","userResourcePermissions","areResourcesAuthorized","allResourcePermissionsMandatory","AllResourcesMandatory","resourcePermissions","p","checkResourcePermissionFunc","allowedPermissions","authorizeRolesAndResources","AuthorizeRolesAndResources","Roles","ResourcePermissions","areRolesAuthorized","authorizationRules","getStateAuthorizationRules","AllowedPermissions","actOnBehalfOfUserActive","IsRestrictedInObo","authRules","AuthorizationRules","StateName","adminRules","tenantClaims","getAppList","getUserTenantClaims","apps","role","permission","Resource","el","a","npd","NPDClaims","claims","hasOwnProperty","hasPermissions","Permissions","AllPermissionsMandatory","permissions","fxpStorageService","fxpTelemetryContext","isLeftNavItemClicked","setBreadcrumbFromRoute","breadcrumbText","href","setCurrentPageBreadcrumb","breadcrumbItem","startNewBreadcrumbOnSpecificState","fxpBreadcrumb","setBreadcrumb","setBreadcrumbItem","storageKey","userNavigatedStatesWithBreadcrumb","getFromLocalStorage","newTabBreadcrumbStorageKey","hashCode","prevSessionBreadcrumbArray","deleteFromLocalStorage","expectedBreadcrumbForCurrentState","getExpectedBreadcrumbForCurrentState","breadcrumbArraySearchKey","storedBreadcrumbForCurrentState","saveInLocalStorage","updateBreadcrumb","breadcrumbList","breadcrumbItemIndex","copy","NonGLNStateCollectionForBreadcrumb","logBreadcrumbTelemetryInfo","userInfo","breadcrumbString","loginUserInfo","sessionId","isActingOnBehalfOf","oboUserInfo","oboUserData","getTimeStamp","logInformation","breadcrumbFeature","LinkClicked","logFeatureUsageEvent","setTempBreadcrumbArray","overrideBreadcrumbText","updateDisplayNameForCurrentBreadcrumbItem","getBreadcrumbItemIndex","fxpBreadcrumbContext","breadcrumbName","saveBreadcrumbContextForCurrentState","breadcrumbLastItem","updateBreadcrumbUrlByName","newUrl","FxpBroadcastedEvents","fxpAppSettings","fxpBaseConfiguration","modelConfiguration","GetConfiguration","rootscope","userProfileService","feedbackRouteData","feedbackPropBag","_feedbackItemCollection","_userId","_subscriprtionId","_feedbackServiceEndpoint","setUserId","userId","getUserID","setFeedbackItemCollection","itemCollection","OnFeedbackConfigurationChanged","getFeedbackItemCollection","setFeedbackEndpoint","getFeedbackEndpoint","setSubscriprtionId","subscriprtionId","getSubscriprtionId","addToFeedbackPropBag","getFeedbackPropBagItems","addFeedbackPropBagRange","property","removeFeedbackPropBagRange","removeFromFeedbackPropBag","browserTitle","OnFeedbackContextChanged","currentRoute","setFeedbackServiceProperties","usersDetails","getEnvironmentDetails","feedbackEnvData","EnvironmetName","ServiceOffering","ServiceLine","setUserDetailsToFeedback","userDetails","oboUserBasicInfo","getBasicProfileByAlias","loginUserBasicInfo","UserId","getLoggedInUserUpn","UserName","BusinessRole","getCurrentUserData","getCurrentUserUpn","logFeedbackInformation","feedbackInfo","feedbackStatusInfo","telemetry_source","tags","feedbackType","feedback","toEs6Promise","qPromise","reason","responseType","patch","jsonp","head","launchIrisBot","hideIrisBot","fxpHttpService","fxpConfigService","SubmitFeedback","feedbackMessage","feedbackPayload","manifestType","feedbackManifestType","appId","OCVAppId","submitTime","toISOString","Client","rating","clientFeedbackId","getNewGuId","comment","application","appData","telemetry","loggableUserId","featureArea","partnerName","officeBuild","BuildNumber","tenantId","survey","surveyId","web","browser","navigator","browserVersion","version","sourcePageName","getElementsByTagName","innerHTML","sourcePageURI","sendFeedback","FeedbackOCVEndpoint","_interceptorHooks","RegisterInterceptorHook","httpInterceptorHookInstance","UnRegisterInterceptorHook","getRegisteredInterceptorHooks","fxpBreadcrumbService","getAllStates","statesList","getURLfromState","statename","navigatetoState","warn","navigatetoNewWindow","open","screen","height","navigatetoSpecificState","transitionOptions","navigateToSpecificUrl","features","replace","navigateToUrl","defaultStateName","setDefaultStateName","getStateDetails","getCurrentStateDetails","isNewTabAllowed","listeners","connectionPromise","pingTimeOutRef","pingInterval","signalRServiceEndPoint","SignalRPlatformEndPoint","processName","Number","isInteger","SignalRPlatformPingIntervalInMinutes","setupPingForSignalServer","ping","sendMessage","connect","connection","Connected","currentProcessName","eventData","DataStore","customProperties","CLASSNAME","METHODNAME","logSystemEvent","setupConnection","disconnect","stop","Low","methodName","send","args","joinGroup","groupName","tenantName","environment","leaveGroup","unsubscribeAll","onMessageFromServer","messageData","callBackFunctions","callbackFunc","SignalRPlatformClientId","withUrl","accessTokenFactory","getTokenForAppIdAsync","accesstoken","withAutomaticReconnect","build","onreconnecting","Reconnecting","onreconnected","connectionId","onclose","Disconnected","start","$injector","$transitions","onStart","onStartStateChangeHandler","onSuccessStateChangeHandler","onErrorStateChangeHandler","onInvalidStateHandler","transition","getStateInfo","syncRouteAction","OnLeftNavHighlightByStateName","to","logFeatureUsageEventForState","logPageView","appNameForTelemetry","partnerTelemetryName","pageName","pageNameForTelemetry","telemetryName","displayNameForPageView","parseFloat","stateChangeStartTime","duration","performance","measurements","createMetricBag","LOGGING_SOURCE","featureName","subFeatureName","actionName","fromState","from","previousFeatureName","displayFeatureName","renewSubCorrelationId","SubFeatureName","toParams","fromParams","onStateChangeStart","onStateChangeSuccess","onStateChangeFailure","onStateNotFound","offStateChangeStart","observers","offStateChangeSuccess","offStateChangeFailure","offStateNotFound","FxpStorageService","setItem","removeItem","deviceFactory","helpCentralServiceEndPoint","HelpCentralServiceEndpoint","helpCentralServiceAppId","HelpCentralAppId","MappedTenantName","getContextualHelpArticles","topArticles","businessFunctions","searchString","deviceType","isMobile","getContextualHelpArticleContent","articleId","urlGetArticle","getSuggestions","searchPhrase","saveArticleFeedback","saveArticleViewCount","publicClientApplication","anonymousEndpointList","anonEndpoints","AuthExcludedDomains","registerEndpoints","initializeAuthentication","configuration","login","accounts","getAllAccounts","setActiveAccount","addEventCallback","eventType","LOGIN_SUCCESS","account","LOGIN_FAILURE","errorDesc","ACQUIRE_TOKEN_FAILURE","errorCode","localPublicClientApplication","handleRedirectPromise","loginResponse","getActiveAccount","loginRedirect","idToken","silentRequest","scopes","forceRefresh","request","loginHint","username","acquireTokenSilent","INVALID_GRANT_ERROR","errorCodes","isServerError","isInteractionRequiredError","isRefreshTokenError","acquireTokenRedirect","isInvalidGrantError","tokenResponse","getTokenRedirect","getTokenRedirectAsync","getAccount","redirectRequest","authExceptionEndpoints","addAuthenticationExceptionEndpoints","getResourceForEndpoint","redirectStartPage","partnerEnpoints","getRegisterEndpoints","endpoints","eval","Endpoints","jsonConcat","_msalEndpoints","clientId","FxpAppClientId","loginResource","redirectUri","bestMatchedConfigEndpoint","configEndpoint","trimStart","startsWith","_getHostFromUri","uri","extractedUri","_config","_msalService","MsalAuthenticationService","notificationActions","NotificationConfiguration","ActionConfiguration","iconConfiguration","IconConfiguration","excecuteNotificationAction","actions","content","notification","Subject","OpenInNewTab","ActionType","absolute","registerNotificationAction","actionType","openInNewTab","notificationAction","appendPropertiesToNotifications","notifications","icon","From","senderAddress","Icon","hasAction","publishedOn","notificationApiWebNotifResourceUrl","notificationApiBaseUrl","NotificationServiceEndpoint","getNotifications","startIndex","count","offset","user","channel","urlGetNotiicationsByPage","requestConfig","deleteNotification","webNotificationId","urlDeleteNotification","deleteAllNotification","urlDeleteAllNotification","markNotificationAsRead","urlMarkAsRead","markAllNotificationsAsRead","urlMarkAllAsRead","publishNotifications","notificationArray","publishEventUrl","Notification","WebNotification","Content","To","publishNotificationsRolesRoleGroup","urlPublish","notificationService","defered","fxpContextService","OBOUser","OBOUserRoutes","OBOUserStatus","OBOUserSessionInfo","OBOUserTenantConfiguration","isOBOAsNewTab","OBOUserService","initilizeOBOEntity","setOBOUserSessionInfo","setActingOnBehalfOfFlag","setCurrentUserOID","setCurrentUser","setCurrentUserUpn","userUpn","saveOBOEntityInContext","setCurrentUserStateFromLoggedInUserState","initializeOBOEntityFromContext","udata","IsError","removeOBOUserContext","oboData","Result","getCalimsSvc","ex","SelectedProfileRoles","$$phase","$apply","getLoggedInUserOID","getOBOUserRoutes","getOBOUser","getOBOUserTenantConfiguration","setLazyLoader","lazyLoaderInstance","lazyLoader","registerPartnerEndpoints","partnerRegisteredEndpoints","getRegisteredEndPointsFromPartnerAppRegistrationClass","getAuthExcpetionFromPartnerAppRegistrationClass","addApplicationWithStores","applicationsWithStore","isStoreRegistered","registerPartnerApp","appInstance","registeredApps","getRoutes","addRouteConfigurationAction","registerPartnerAppRoutes","updateStateObject","componentFramework","body","React","stateInfo","updateRouteConfiguration","getRegisteredRoutes","fxpAppContext","routesInfo","registeredRoutes","apply","registerLazyLoadedApp","registryInstance","registry","updateAppName","bundles","getBundles","getGeneratedBundles","registerPartnerAppBundles","registerPartnerAppEndpoints","getServiceEndPoints","getAuthExceptionEndpoints","registerAuthExceptionEndpoints","getSharedComponentsInfo","registerAngularSharedComponents","configObject","sharedComponentsInfo","disableSharing","angularPartnerSharedComponents","ocBundles","ocBundle","files","sequentialLoading","serviceEndPoint","updateSharedComponentDetails","compName","components","componentName","partnerApp","toLocaleLowerCase","sharedComponents","comp","sharedBundles","generatedBundle","getSharedComponentReference","sharedComponentConfig","sharedComponentReference","sharedComponent","Angular","getSharedComponentFactory","profileStore","ProfileStore","oneProfileEndPoint","ProfileAPIEndPoint","authStore","AuthStore","rolePersonalizationStore","RolePersonalizationStore","tenantClaimsApiEndpoint","TenantClaimsEndPoint","tenantRolesApiEndpoint","TenantRolesEndPoint","tenantNPD","NPD","NotificationStore","NotificationApiEndpoint","NotificationApiEndPoint","getPersistedPersonalization","context","keyContext","persistUserPersonalization","selectedUserPersonalization","removePersistedUserPersonalization","getMasterLeftNavItems","AADAuthFailureError","getPersonalizedNavItems","userRoleId","savePersonalizedNavItems","savedUserPrefNavList","shouldAssignRoles","ShouldAssignRoles","getRoleGroupDetails","getRoleGroupDetailsForNotification","telemtry_source","getRolePersonalizedNavItems","getRoleGroupPersonalizedList","saveRoleGroupPersonalizedNavItems","savedRoleGroupPrefNavList","getRoleGroup","PacificRegion","getCurrentUtcDateTime","addHoursToCurrentUtcDateTime","hours","add","getCurrentLocalDateTime","local","addHoursToLocalUtcDateTime","getCurrentPacificDateTime","AddHoursToCurrentPacificDateTime","convertToPacific","isMoment","convertToLocal","convertToUtc","changeTimeZoneComponentToPacific","utcOffset","changeTimeZoneComponentToUniversal","timeUtc","getCurrentTimeZoneCode","timezone","fxpContext","iTenantReqCount","fxpcontext","loggedInUserAlias","currentUserAlias","claimsApiEndpoint","UserClaimsEndPoint","getLoggedInUserClaims","getUserClaimsForAlias","getLoggedInUserTenantClaims","getUserClaims","getCurrentUserOID","getUserClaimsForScopes","scopeDirection","getClaimsForUserAlias","accumulator","filteredClaims","filterRolesBasedOnScopes","inputClaims","tenants","tenantScopesMap","formTenantScopeMapping","tenant","tenantScopes","propertyName","delegatedClaims","filteredScopes","roleName","roleObj","Scopes","roleScopes","scope","roleScope","tenantScope","filterScope","existingPermission","Set","DefaultPermisssions","modifiedScope","tenantMatch","tenantTrimmedScope","substring","headerScope","roleParts","headerParts","getUserTenatClaimsByObjectId","objectId","userClaimsLocalStorage","getClaimsFromLocalStorage","genericPropBag","getClaimsPropertyBag","AuthServiceReturnsBlankAppError","Applications","AuthServiceReturnsBlankAppRoleError","entityId","entityType","localStorageValue","claimsData","objectToString","ErrorInfo","claimsLocalStorage","isV2ClaimsTenantId","createClaimsPropertyBag","claimId","getTenatClaimsSvc","objectID","areHeadersAvailable","TenantClaimsHeaders","FXP_TELEMETRY_PLATFORM_BOOTSTRAP","getUserClaimsSvc","getObjectIdFromIdentifier","OID","useridentifier","isGuid","loggedInUserInfo","userinfo","telmetry_source","oid","parsedClaims","getClaimsFromGlobalStore","claimsEndpoint","tenantheaders","systemEvent","responseData","dispatchClaimsAction","getClaimsByObjectId","userIdentifier","sendDate","claimData","fxpAppLaunched","isAppLaunched","setUserInfo","localStorageClaims","notify","tResponse","logClaimsMetrics","getDefaultAppRole","saveClaimsData","logClaimsException","IsAuthorizationRequired","isLoginRequired","statusText","responseCode","GetUserClaimsSvcReturnsError","currentClaims","strCalimsData","getAliasFromOID","logInfo","receiveDate","responseTime","getTime","toUTCString","logMetric","AuthzServiceReturnsError","isObo","upn","listOfRoles","ApplicationName","RoleName","DefaultAppRole","getUserDelegatedRoles","getUserConsolidatedRoles","promiseList","userDelegatedRoles","consolidatedRoles","union","getUserResources","listOfResources","FxpNpd","lstClaims","appRole","prefix","isDefaultRole","claimsStorageKey","getSessionStorageUserClaimsKey","currentUser","loggedInUser","currentUserUpn","loggedInUserUpn","loggedInUserOID","currentUserOID","getCurrentUserClaims","getLoggedInUserProfile","setLoggedInUserOID","aadOID","setLoggedInUser","getCurrentUserContext","setUpAjaxCallsHeaders","getAADObjectIDFromAlias","setLoggedInUserUpn","OBOUserSession","isOboActive","aadObjectID","ajaxSetup","userData","userClaimsData","featureFlagService","startUpFlightConfig","pageTourWaitTime","DashboardService","getLeftNavData","leftNavDataKey","leftNavData","GetLeftNavAuthFailureError","internalLinks","getGLNFlatDataStructure","list","L0length","j","L1length","children","fxpConfigurationFailed","userAgent","getGeography","UserRoleGroupFxpConfigNotFoundError","getInitialFeatureFlagsForPlatform","featureFlagPromise","eventNames","initialFlags","getLoggedInUserFlighitngContext","flightingContext","getFeatureFlags","envName","featureNames","InitialFeatureFlags","pageTourEnabled","_logger","appReducer","middlewares","globalActions","shouldReplace","shouldUpdate","_globalStore","RegisterStore","store","RegisterGlobalActions","GetPartnerState","GetGlobalState","DispatchLocalAction","DispatchAction","Subscribe","partner","eager","SubscribeToGlobalState","AddSelectors","selectors","mergeSelectors","SelectPartnerState","selector","defaultReturn","$ocLazyLoad","appControllerHelper","isPageTourInProgress","currentLeftNavPinState","isLeftNavPinned","isLeftNavOpen","telemetrySource","responseStartTime","isBasicProfileRefreshed","telemetryContext","graphAPIProfileUrl","GraphAdEndPoint","graphAPIUserProfileUrl","GraphApiUserProfileUrl","graphAPIUserThumbnailUrl","GraphApiUserThumbnailUrl","profileApiEndpoint","searchProfileApiEndpoint","SearchAPIEndPoint","isProfileRequired","IsProfileRequired","getUserThumbnail","getBasicUserProfile","pDeferred","getBasicProfileByOID","refreshBasicUserProfileInContext","getBasicProfile","currentProfile","AadObjectId","includeInactiveUser","getBasicProfileByAliasIncludingInActiveUser","bag","getFlightingContext","roleGroupIdInternalId","getPropertyValueCaseInsensitive","resourceCategoryInternalId","sDODomainInternalId","opFieldsArray","LeftNavFlightingContextProperties","field","fieldName","getBasicUserProfileLoggedInUser","getCurrentUserFlighitngContext","getProfileURL","userIdentifierType","toUpperCase","getBasicProfileSvc","getShowBannerValue","localStorageProfile","getProfileFromLocalStorage","dispatchProfileActions","attr","BusinessDomain","SDODomain","AddressBookTitleDesc","RoleGroupID","Email","EmailName","DisplayName","FullName","MiddleName","LastName","Seniority","BusinessRoleDisplayName","IsDefaultProfile","BusinessRoleId","UserProfileBusinessRoleMissingError","tenantMapping","newTenant","UserProfileRoleGroupMissingError","getProfileDataFromGraphResponse","setLocalStorageProfile","OnBasicUserProfileRefresh","UserProfileNotFoundError","isBlockedCSAUser","ErrorCode","CSAErrorCode","logBasicProfileFailureError","ProfileServiceCallFailedError","getDeafultUserInfo","Alias","getSessionStorageUserInfoKey","profileStorageKey","searchProfile","parentDiffered","SearchAPIHeaders","FirstName","givenName","surname","userPrincipalName","mailNickname","PersonnelNumber","immutableId","jobTitle","ReportsToDisplayName","ReportsToFullName","aadBasicUserInfo","getAADBasicInfoFromLocalStorage","userProfileAAD","isBotEnabled","fromJson","environmentName","serviceOffering","serviceLine","service","componentId","ictoId","businessProcessName","ComponentId","ComponentName","AppName","IctoId","BusinessProcessName","ErrorSeverityLevel","componentType","FeatureUsageEvent","getTaskName","TaskName","setTaskName","getTaskStatus","TaskStatus","setTaskStatus","getCapabilityType","CapabilityType","setCapabilityType","getEmbeddedExpereinceName","EmbeddedExpereinceName","setEmbeddedExpereinceName","setIsEmbeddedExperience","IsEmbeddedExperience","getIsEmbeddedExperience","getEventName","EventName","getEventType","EventType","setEventType","getDuration","Duration","setDuration","getFeatureName","FeatureName","getSubFeatureName","setSubFeatureName","getActionName","ActionName","getActionType","setExperimentationConfigId","ExperimentationConfigId","getExperimentationConfigId","setExperimentationConfigName","ExperimentationConfigName","getExperimentationConfigName","setExperimentationConfigResult","ExperimentationConfigResult","getExperimentationConfigResult","getTemplateType","TemplateType","getComponentType","ComponentType","getUserRoleName","UserRoleName","setUserRoleName","getStartDateTime","StartDateTime","setStartDateTime","getEndDateTime","EndDateTime","setEndDateTime","getComponentUri","ComponentUri","setComponentUri","getEntityId","EntityId","setEntityId","getActionStatus","setActionStatus","currentDate","day","getDate","month","getMonth","year","getFullYear","getHours","minutes","getMinutes","seconds","getSeconds","suffix","getTelemetryUniqueKey","date","pad2","getNewSessionId","d","c","Math","random","floor","getAppNameFromSource","addEnvironmentDetails","eventProperties","transactionId","aiInstrumentKey","telemetryAppName","environmentData","CurrentContext","globalProperties","getGlobalPropertyBag","addRange","ENVIRONMENTNAME","SERVICEOFFERING","SERVICELINE","SERVICE","COMPONENTID","COMPONENTNAME","XCV","AIAPPKEY","LOGGEDFROM","ICTOID","BUSINESSPROCESSNAME","n","appIngisht","appIngishtInstance","fxpLoggerServiceExtension","FxpLoggerServiceExtension","logBusinessProcessEvent","TrackBusinessProcessEvent","getItems","TrackFeatureUsageEventV2","StartFeatureUsageEvent","EndFeatureUsageEvent","logTrackSystemEvent","TrackSystemEvent","logFxpBootFailure","descriptionText","isCSABlockedUser","sourceName","FxPLoggerService","metricBagInternal","propBagInternal","isObject","stringVal","removePII","removeFromBag","getValue","PouchSyncMode","DiagnosticLevel","PAGENAME","PAGEVISITED","URL","ERRORPREFIX","USER_ALIAS","AIFeatureUsageEvent","AIBusinessProcessEvent","InstrumentationKey","EndPointUrl","ERROR","Metric","WARNING","TRACE","INFORMATION","CUSTOMEVENT","ACTIONURI","APPACTION","COMPONENTTYPE","EVENTTYPE","TARGETENTITYKEY","USERROLENAME","COMPONENTURI","DURATION","LOGGEDINUSERROLEGROUPID","LOGGEDINUSERROLEGROUPNAME","OBOROLEGROUPID","OBOROLEGROUPNAME","LOGGEDINUSERTENANTKEY","LOGGEDINUSERTENANTNAME","OBOTENANTKEY","OBOTENANTNAME","_appInsight","_events","instrumentationKey","Telemetry","clickPluginInstance","configObj","extensions","extensionConfig","identifier","autoCapture","dataTags","useDefaultContentNameOrId","captureAllMetaDataContent","_environmentValues","InitializeTelemetryWithConfiguration","_context","initUserSession","setContextInfo","addContextChangeListener","_correlator","correlator","telemetryInitializer","envelope","telemetryItem","baseData","telemetryInitializerInit","appInsights","addTelemetryInitializer","AddMsitTelemetryInitializers","_loggerServiceExtenstion","_loggerServiceInstance","session","getSessionID","ver","getAppVersion","getCurrentPartnerTelemetryName","finalProperties","assign","ngInjector","stackTrace","severityLevel","stack","internalCustomLog","setTransactionIdAndCommonProperties","TrackException","TrackEvent","pageViewTelemetry","refUri","pageType","isLoggedIn","trackPageView","metricName","metricValue","metricTelemetry","average","trackMetric","TrackTrace","setCorrelationProvider","correlationProvider","getPageLoadMetrics","pageLoadMetric","setPageLoadMetrics","logPageLoadMetrics","pageLoadTime","pageLoadMetricsCalled","pageLoadData","totalDuration","sourceRoute","destinationRoute","pageLoadDuration","pageDisplayName","sourceRouteURL","destinationRouteURL","pageTransitionStatus","stateChangeDuration","preStateDuration","pageLoadError","threshold","thresholdCrossed","thresholdValue","rootscopestartTime","setLoggedInUserContext","loggedInUserRoleId","loggedInUserRoleName","isOBO","loggedInUserTenantKey","loggedInUserTenantName","loggedInUserContext","setOBOUserContext","OBOUserRoleId","OBOUserRoleName","OBOUserTenantKey","OBOUserTenantName","OBOUserContext","logUserAction","setTransactionId","subCorrelationId","getSubCorrelationId","correlationId","getCorrelationId","telemetryTrace","traceID","parentID","addPropertyBagValues","buildCommonLogProperties","logProperties","addUserRoleGroupDetails","addUserTenantDetails","getCurrentNetworkSpeed","getDefaultPropertyBagValues","_connection","mozConnection","webkitConnection","broadcastNetworkChange","_networkConnection","NetworkConnection","_effectiveType","effectiveType","newEffectiveType","networkChangeCustomEvent","CustomEvent","bubbles","cancelable","dispatchEvent","_appName","_appVersion","_userRole","_sessionId","_geography","_envData","_globalPropertyBag","contextChangeListeners","setAppContext","_currentContext","TelemetryContext","addToGlobalPropertyBag","removeFromGlobalPropertyBag","setUserID","userID","appVersion","notifyContextChangeListeners","getAppName","setUserRole","userRole","getUserRole","setSessionID","sessionID","setGeography","geo","setNewUserSession","sessionIdCached","setEnvironmentDetails","envData","setPartnerEnvironmentDetails","partnersTelmetryInfo","partnerTelmetryInfo","Name","listener","jQuery","isEmptyObject","obj","pullFocusToElement","elementId","angularInherits","ctor","superCtor","super_","prototype","enumerable","charCodeAt","getArrayLength","arrayCollection","CommonUtils","compareKey","generateUPN","UPN","Domain","UpnCorpnet","UpnPartner","stringFormat","str","match","number","getTenantURLSpecificPageTitle","obj1","obj2","isObjectAnArray","call","isPlainObject","k","sortJsonObj","inputJson","isArray","inputObject","sort","v","b","getQueryString","string","getScriptBaseUrl","baseUrl","currentScriptUrl","currentScript","lastIndexOf","endsWith","PIIRegex","regexp","getWindowSize","innerWidth","innerHeight","updateType","resolution","size","types","tablet","isSmallScreen","isTablet","isDesktop","devicePixelRatio","lazyUpdate","throttle","OnLayoutChanged","showSystemDownOverlay","supportLinkText","supportLink","showSupportLinks","title","setAttribute","hide","fxpModule","$urlService","deferIntercept","dependentModules","platformReference","bootstrap","documentElement","urlService","run","listen","sync","systemDownHeader","systemDownDescription","systemDownPageTitle","JavaScriptException","PageTitle","errorProperites"],"mappings":"kSAAA,SAASA,yBAAyBC,KAGjC,OAAOC,QAAQC,UAAUC,MAAK,WAC7B,IAAIC,EAAI,IAAIC,MAAM,uBAAyBL,IAAM,KAEjD,MADAI,EAAEE,KAAO,mBACHF,CACP,GACD,CACAL,yBAAyBQ,KAAO,WAAa,MAAO,EAAI,EACxDR,yBAAyBG,QAAUH,yBACnCS,OAAOC,QAAUV,yBACjBA,yBAAyBW,GAAK,sD,+HCV9B,mxBAoBA,+BAiBC,6BACCC,MACAC,GACAC,WACAC,SACAC,iBACAC,cACAC,0BACAC,WACQC,kBACAC,gBACAC,QACAC,oBAHA,KAAAH,oCACA,KAAAC,gCACA,KAAAC,gBACA,KAAAC,sCAlBD,KAAAC,OAAiB,EACjB,KAAAC,UAAoB,EACpB,KAAAC,QAAkB,EAClB,KAAAC,mBAAwB,6EAAmBC,wBAAuB,uBAiBzEC,KAAKC,KAAOlB,MACZiB,KAAKE,EAAIlB,GACTgB,KAAKG,UAAYlB,WACjBe,KAAKI,QAAUlB,SACfc,KAAKK,cAAgB,IACrBL,KAAKb,iBAAmBA,iBACxBa,KAAKM,UAAYlB,cACjBY,KAAKO,mBAAqBP,KAAKb,iBAAiBqB,eAAeC,mBAC/DT,KAAKX,0BAA4BA,0BACj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BAAgB,EAAEC,2BAAqB,EAAEC,yBAAmB,GADlD,IAAI1oF,OAEZ4G,QAAU,uBACZuD,qBAAqBC,wBAAwBhH,WAAWulF,qBACxDH,iBAAmBr+E,qBAAqBC,wBAAwBhH,WAAWulF,oBAAoBrlF,kBAC/FmlF,sBAAwBt+E,qBAAqBC,wBAAwBhH,WAAWulF,oBAAoBhlF,aACpG+kF,oBAAsB,+DAAY3D,8BAA8B56E,qBAAqBC,wBAAwBhH,WAAWulF,oBAAoBC,YAE5Ij6E,QAAQ9K,MAAM,mEAGlB8K,QAAQ9K,MAAM,yBAA0BknC,IAAInkC,SAE5C,IAAMiiF,gBAAkBliF,iBAAiB2B,oBACzCugF,gBAAgBrgF,SAAS,UAAWuiC,IAAInkC,SACxCiiF,gBAAgBrgF,SAAS,YAAa,kEAAWk6B,uBAEjD/7B,iBAAiBiM,aAAazQ,OAAQ4oC,IAAK89C,gBAAiBzgF,UAAWA,UAAW,kFAAmByK,UACrG,yFAAuB8jE,kBAAkBkS,gBAAiB1mF,OAASqmF,iBAAkBC,sBAAuBC,oB,+CC7GhHvoF,OAAOC,QAAUgf,O","file":"ng2Main.bundle.js","sourcesContent":["function webpackEmptyAsyncContext(req) {\n\t// Here Promise.resolve().then() is used instead of new Promise() to prevent\n\t// uncaught exception popping up in devtools\n\treturn Promise.resolve().then(function() {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t});\n}\nwebpackEmptyAsyncContext.keys = function() { return []; };\nwebpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;\nmodule.exports = webpackEmptyAsyncContext;\nwebpackEmptyAsyncContext.id = \"F6A22FA4/./src/$$_lazy_route_resource lazy recursive\";","import { IRootScope } from \"../../js/interfaces/IRootScope\";\r\nimport { ILogger } from \"../../js/interfaces/ILogger\";\r\nimport { FxpConstants, PerfMarkers, ApplicationConstants } from \"../../js/common/ApplicationConstants\";\r\nimport { FxpMessageService } from \"../banner/FxpMessageService\";\r\nimport { FxpConfigurationService } from \"../../js/services/FxpConfiguration\";\r\nimport { UserClaimsService } from \"../../js/services/UserClaimsService\"\r\nimport { UserInfoService } from \"../../js/services/UserInfoService\";\r\nimport { IFxPService } from \"../../js/interfaces/IFxpService\";\r\nimport { FxpGlobalStoreService } from \"../../js/services/fxp.global.store.service\";\r\nimport { setAdminTiles } from \"./adminTile.action\";\r\nimport { TelemetryConstants } from \"../../js/telemetry/TelemetryConst\";\r\nimport { ErrorCodes } from \"../../js/constants/errorCodes\";\r\nimport { ErrorSeverityLevel } from \"../../js/telemetry/ErrorSeverityLevel\";\r\nimport { MsalAuthenticationService } from \"../../js/services/MsalAuthenticationService\";\r\ndeclare var _: any; \r\n/**\r\n * @application Fxp\r\n */\r\n/**\r\n * @module Fxp.Services\r\n */\r\n\r\nexport class AdminLandingService implements IFxPService {\r\n\tprivate http: angular.IHttpService;\r\n\tprivate q: angular.IQService;\r\n\tprivate rootScope: IRootScope;\r\n\tprivate timeout: angular.ITimeoutService;\r\n\tprivate sleepInterval: number;\r\n\tprivate userAlias: string;\r\n\tprivate fxpConfiguration: FxpConfigurationService;\r\n\tprivate fxplogger: ILogger;\r\n\tprivate fxpServiceEndPoint: string;\r\n\tprivate msalAuthenticationService: MsalAuthenticationService;\r\n\tprivate iCount: number = 0;\r\n\tprivate iReqCount: number = 0;\r\n\tprivate iUCount: number = 0;\r\n\tprivate sourceForTelemetry = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.AdminLandingService`;\r\n\tprivate fxpMessageSvc: FxpMessageService;\r\n\r\n\tconstructor(\r\n\t\t$http: angular.IHttpService, \r\n\t\t$q: angular.IQService, \r\n\t\t$rootScope: IRootScope, \r\n\t\t$timeout: angular.ITimeoutService, \r\n\t\tfxpConfiguration: FxpConfigurationService, \r\n\t\tloggerService: ILogger, \r\n\t\tmsalAuthenticationService: MsalAuthenticationService, \r\n\t\tfxpMessage: FxpMessageService, \r\n\t\tprivate userClaimsService: UserClaimsService, \r\n\t\tprivate userInfoService: UserInfoService, \r\n\t\tprivate $base64: any,\r\n\t\tprivate globalStoreService: FxpGlobalStoreService) \r\n\t{\r\n\t\tthis.http = $http;\r\n\t\tthis.q = $q;\r\n\t\tthis.rootScope = $rootScope;\r\n\t\tthis.timeout = $timeout;\r\n\t\tthis.sleepInterval = 100;\r\n\t\tthis.fxpConfiguration = fxpConfiguration;\r\n\t\tthis.fxplogger = loggerService;\r\n\t\tthis.fxpServiceEndPoint = this.fxpConfiguration.FxpAppSettings.FxpServiceEndPoint;\r\n\t\tthis.msalAuthenticationService = msalAuthenticationService;\r\n\t\tthis.fxpMessageSvc = fxpMessage;\r\n\t}\r\n\r\n\tGetAdminDataFromServer(): angular.IPromise {\r\n\t\tlet source = `${this.sourceForTelemetry}.GetAdminDataFromServer`;\r\n\t\tvar deferred = this.q.defer();\r\n\t\tvar self = this;\r\n\t\tself.userClaimsService.getUserRoles()\r\n\t\t\t.then(function (response) {\r\n\t\t\t\tlet userResouces = self.userClaimsService.getUserAdminResources();\r\n\t\t\t\t\r\n\t\t\t\tif (userResouces.toString() == \"\") {\r\n\t\t\t\t\treturn deferred.resolve([]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet userRoles = self.$base64.encode(response).toString();\r\n\t\t\t\tlet encodedUserResources = self.$base64.encode(userResouces).toString();\r\n\t\t\t\tvar url = self.fxpServiceEndPoint + \"/adminTiles/\";\r\n\t\t\t\tself.fxplogger.startTrackPerformance(PerfMarkers.GetAdminDataFromServer);\r\n\t\t\t\tif (self.msalAuthenticationService.accessTokenRequestInProgress(url)) {\r\n\t\t\t\t\tself.iReqCount++;\r\n\t\t\t\t\tif (self.iReqCount == 5) {\r\n\t\t\t\t\t\tself.fxplogger.logError(source, \r\n\t\t\t\t\t\t\t\t\t\t\t\tself.rootScope.fxpUIConstants.UIMessages.GetAdminDataFailureError.ErrorMessageTitle, \r\n\t\t\t\t\t\t\t\t\t\t\t\tErrorCodes.OnGetAdminDataFromServerFailure,\r\n\t\t\t\t\t\t\t\t\t\t\t\tnull,\r\n\t\t\t\t\t\t\t\t\t\t\t\tnull,\r\n\t\t\t\t\t\t\t\t\t\t\t\tnull,\r\n\t\t\t\t\t\t\t\t\t\t\t\tnull,\r\n\t\t\t\t\t\t\t\t\t\t\t\tErrorSeverityLevel.Medium);\r\n\t\t\t\t\t\tself.fxpMessageSvc.addMessage(self.rootScope.fxpUIConstants.UIMessages.GetAdminDataAuthFailureError.ErrorMessage, FxpConstants.messageType.error);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tself.timeout(function () {\r\n\t\t\t\t\t\tself.GetAdminDataFromServer();\r\n\t\t\t\t\t}, self.sleepInterval);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tself.iReqCount = 0;\r\n\t\t\t\t\tself.fxplogger.logTrace(source, \"getAdminDataFromServer\");\r\n\r\n\t\t\t\t\tlet requestHeaders = {};\r\n\t\t\t\t\trequestHeaders[ApplicationConstants.XUserClaimsToken] = userRoles;\r\n\t\t\t\t\trequestHeaders[ApplicationConstants.XTenantId] = window[\"tenantConfiguration\"].TenantId;\r\n\t\t\t\t\trequestHeaders[ApplicationConstants.XResources] = encodedUserResources;\r\n\t\t\t\t\tself.http({\r\n\t\t\t\t\t\tmethod: \"GET\",\r\n\t\t\t\t\t\turl: url,\r\n\t\t\t\t\t\theaders: requestHeaders\r\n\t\t\t\t\t}).then(function (response) {\r\n\t\t\t\t\t\tvar data = JSON.stringify(response.data);\r\n\t\t\t\t\t\tself.globalStoreService.GetPlatformStore().dispatch(setAdminTiles(JSON.parse(data)));\r\n\t\t\t\t\t\tvar sessionStorageKey = ApplicationConstants.FxpAdminData + \"_\" + self.userInfoService.getCurrentUser();\r\n\t\t\t\t\t\tsessionStorage[sessionStorageKey] = data;\r\n\t\t\t\t\t\tdeferred.resolve(response);\r\n\t\t\t\t\t}, function (error) {\r\n\t\t\t\t\t\tdeferred.reject(error);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\tself.fxplogger.stopTrackPerformance(PerfMarkers.GetAdminDataFromServer);\r\n\r\n\t\treturn deferred.promise;\r\n\t}\r\n\r\n\tGetAdminTileDetails(isRefresh: boolean): angular.IPromise {\r\n\t\tvar deferred = this.q.defer();\r\n\t\tvar self = this;\r\n\t\tvar adminTilesData;\r\n\t\tif (!isRefresh) {\r\n\t\t\tadminTilesData = !Object.keys(self.globalStoreService.GetPlatformState().AdminTiles).length ? self.GetAdminDataFromCache() : self.globalStoreService.GetPlatformState().AdminTiles;\r\n\t\t}\r\n\t\tif (adminTilesData == null) {\r\n\t\t\tself.GetAdminDataFromServer().then(function (response) {\r\n\t\t\t\tdeferred.resolve(response.data);\r\n\t\t\t}, function (error) {\r\n\t\t\t\tdeferred.reject(error);\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tdeferred.resolve(adminTilesData);\r\n\t\t}\r\n\r\n\t\treturn deferred.promise;\r\n\t}\r\n\r\n\tGetAdminDataFromCache(): any {\r\n\t\tvar self = this;\r\n\t\tvar sessionStorageKey = ApplicationConstants.FxpAdminData + \"_\" + self.userInfoService.getCurrentUser();\r\n\t\tvar adminData = JSON.parse(window.sessionStorage.getItem(sessionStorageKey));\r\n\t\tself.globalStoreService.GetPlatformStore().dispatch(setAdminTiles(adminData));\r\n\t\treturn adminData;\r\n\t}\r\n\r\n}\r\n","import { IAdminTileGroup } from './adminTiles.model';\r\nimport { IAction } from 'redux-micro-frontend';\r\nimport { Actions } from './adminTile.action.types';\r\n\r\nexport const setAdminTiles = (payload: Array): IAction> => {\r\n return {\r\n type: Actions.SET_ADMIN_TILES,\r\n payload: payload\r\n }\r\n}\r\n\r\nexport const removeOboContext = (): IAction> => {\r\n return {\r\n type: Actions.REMOVE_OBO_CONTEXT,\r\n payload: []\r\n }\r\n}","export enum Actions {\r\n SET_ADMIN_TILES = \"SET_ADMIN_TILE\",\r\n REMOVE_OBO_CONTEXT= \"REMOVE_OBO_CONTEXT\"\r\n}","import { Reducer } from 'redux';\r\nimport { IAction } from 'redux-micro-frontend';\r\nimport { Actions } from './adminTile.action.types';\r\nimport { IAdminTileGroup } from './adminTiles.model';\r\n\r\nconst defaultState: Array = [];\r\n\r\nexport const AdminTileReducer: Reducer, IAction> = (\r\n state: Array = defaultState,\r\n action: IAction\r\n): Array => {\r\n\r\n switch(action.type) {\r\n case Actions.SET_ADMIN_TILES : {\r\n return action.payload;\r\n }\r\n case Actions.REMOVE_OBO_CONTEXT : {\r\n return defaultState;\r\n }\r\n }\r\n \r\n return state;\r\n}\r\n\r\n","import { IRootScope } from \"../../js/interfaces/IRootScope\";\r\nimport { FxpConfigurationService } from \"../../js/services/FxpConfiguration\";\r\nimport { ILogger } from \"../../js/interfaces/ILogger\";\r\nimport { FxpConstants } from \"../../js/common/ApplicationConstants\";\r\nimport { IFxPService } from \"../../js/interfaces/IFxpService\";\r\nimport { AddBanner, CloseBanner } from './banner.action';\r\nimport { IPlatformState } from '../store/platform.state.model';\r\nimport { FxpGlobalStoreService } from \"../../js/services/fxp.global.store.service\";\r\nimport { PlatformStoreFactory } from '../store/platform.store.factory';\r\nimport { TelemetryConstants } from \"../../js/telemetry/TelemetryConst\";\r\n/**\r\n * @application Fxp\r\n */\r\n/**\r\n * @module Fxp.Services\r\n */\r\n/**\r\n * A service to display all types of Messages like Error, Warning, Information\r\n * @class Fxp.Services.fxpMessageService\r\n * @classdesc A service to display all types of Messages like Error, Warning, Information\r\n * @example Example to create an instance of Fxp Message Service \r\n * //Initializing Fxp Message\r\n * angular.module('FxPApp').controller('AppController', ['fxpMessageService', AppController]);\r\n * function AppController(fxpMessageService, fxpConstants){ fxpMessageService.addMessage('message from FXP', Fxp.Common.Constants.FxpConstants.messageType.error); }\r\n */\r\nexport class FxpMessageService implements IFxPService {\r\n\tprivate $rootScope: IRootScope;\r\n\tprivate msgTimeout;\r\n\tprivate msgInterval;\r\n\tprivate $interval: angular.IIntervalService;\r\n\tprivate $timeout: any;\r\n\tprivate fxpConfigurationService: FxpConfigurationService;\r\n\tprivate trackIdLabel;\r\n\tprivate msgIDLabel;\r\n\tprivate controlIdToFocusOnClose: any;\r\n\tpublic showBanner: boolean;\r\n\r\n\tconstructor($rootScope: IRootScope, $interval: angular.IIntervalService, $timeout, fxpConfigurationService: FxpConfigurationService,\r\n\t\tprivate fxpLoggerService: ILogger, private globalStoreService: FxpGlobalStoreService) {\r\n\t\tthis.$rootScope = $rootScope;\r\n\t\tthis.$timeout = $timeout;\r\n\t\tthis.$rootScope.messages = [];\r\n\t\tthis.$rootScope.messageClass = \"modal-hide\";\r\n\t\tthis.$interval = $interval;\r\n\t\tthis.msgTimeout = fxpConfigurationService.FxpAppSettings.FxpMessageTimeout;\r\n\t\tif (this.msgTimeout == \"\" || this.msgTimeout == null || isNaN(this.msgTimeout))\r\n\t\t\tthis.msgTimeout = 2000;\r\n\t\tthis.$rootScope.closeMessage = this.closeMessage.bind(this);\r\n\t\tthis.$rootScope.clearAndReload = this.clearAndReload.bind(this);\r\n\t\tthis.trackIdLabel = fxpConfigurationService.FxpBaseConfiguration.FxpConfigurationStrings.UIStrings.MessageToasterTrackId;\r\n\t\tthis.msgIDLabel = fxpConfigurationService.FxpBaseConfiguration.FxpConfigurationStrings.UIStrings.MessageID;\r\n\t\tthis.showBanner = true;\r\n\r\n\t\tPlatformStoreFactory.CreateIfNotExist(fxpLoggerService);\r\n\r\n\t\tthis.globalStoreService.SubscribeToPlatformState(\"Platform\", (platformState: IPlatformState) => {\r\n\t\t\tthis.updateBanners(platformState);\r\n\t\t});\r\n\t}\r\n\tprivate updateBanners(platformState: IPlatformState) {\r\n\t\tif (platformState.Banners && platformState.Banners.length != this.$rootScope.messages.length) {\r\n\t\t\tvar isNewMessageAdded = platformState.Banners.length > this.$rootScope.messages.length\r\n\t\t\tif (isNewMessageAdded) {\r\n\t\t\t\tvar msg = platformState.Banners[platformState.Banners.length - 1];\r\n\t\t\t\tthis.$rootScope.messages.push(msg);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tfor (var i = 0; i < this.$rootScope.messages.length; i++) {\r\n\t\t\t\t\tvar index = platformState.Banners.indexOf(this.$rootScope.messages[i]);\r\n\t\t\t\t\tif (index == -1) {\r\n\t\t\t\t\t\tthis.$rootScope.messages.splice(i, 1);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\t/**\r\n\t* Displays Error/Warning/Information messages on FXP and Focus\r\n\t* @method Fxp.Services.fxpMessageService.addMessage \r\n\t* @param {string} a mandatory string value which contains Error/Warning/Information. \r\n\t* @param {string} a mandatory string value determing type of messsage Error/Warning/Information. \r\n\t* @example Example to invoke addMessage\r\n\t* fxpMessageService.addMessage('Error from FXP', fxpConstants.messageType.error);\r\n\t*/\r\n\taddMessage = function (message: any, messageType: string, doNotAutoClose?: boolean, trackingId?: string, messageID?: string, focusControlIdOnClose?: any) {\r\n\t\tvar self = this;\r\n\t\tthis.controlIdToFocusOnClose = focusControlIdOnClose;\r\n\t\tif (!this.showBanner) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (!message || message.length === 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar $rootScope = this.$rootScope;\r\n\t\tvar msgTrackId = trackingId ? this.trackIdLabel + trackingId : \"\";\r\n\t\tvar msgID = messageID ? this.msgIDLabel + messageID : \"\";\r\n\r\n\t\tvar isMsgItemExist = $rootScope.messages.some(function (item) {\r\n\r\n\t\t\treturn item.MessageType == messageType && item.Message == message && item.trackId == msgTrackId && item.uniqueTransactionId == msgID;\r\n\t\t});\r\n\t\tif (isMsgItemExist) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar msg: any = {};\r\n\t\tmsg.msgDate = new Date();\r\n\t\tmsg.MessageType = messageType || FxpConstants.messageType.info;\r\n\t\tmsg.Message = message;\r\n\t\tmsg.show = true;\r\n\t\tmsg.trackId = msgTrackId;\r\n\t\tmsg.uniqueTransactionId = msgID;\r\n\r\n\t\tswitch (msg.MessageType) {\r\n\t\t\tcase FxpConstants.messageType.success:\r\n\t\t\t\tmsg.doNotAutoClose = (doNotAutoClose !== undefined && doNotAutoClose !== null) ? doNotAutoClose : false;\r\n\t\t\t\tbreak;\r\n\t\t\tcase FxpConstants.messageType.error:\r\n\t\t\t\tmsg.doNotAutoClose = true; // Never auto close\r\n\t\t\t\tvar propbag = this.fxpLoggerService.createPropertyBag();\r\n\t\t\t\tvar errorMessageWithTrackingId = trackingId ? message + \" \" + trackingId : message;\r\n\t\t\t\tpropbag.addToBag(\"ErrorMessage\", errorMessageWithTrackingId);\r\n\t\t\t\tpropbag.addToBag(\"Location\", window.location.hash);\r\n\t\t\t\tthis.fxpLoggerService.logEvent(`${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.FxpMessageService.addMessage`, `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.ErrorDisplayed`, propbag);\r\n\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\t// Do not auotoclose unless it is asked explicitly\r\n\t\t\t\tmsg.doNotAutoClose = (doNotAutoClose !== undefined && doNotAutoClose !== null) ? doNotAutoClose : true;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\t//Dispatch action to add banner\r\n\t\tself.globalStoreService.DispatchGlobalAction(\"Platform\", AddBanner(msg));\r\n\t\tthis.$rootScope.messageClass = this.$rootScope.messages.length > 0 ? \"modal-show\" : \"modal-hide\";\r\n\r\n\t\tif (this.isAnyBlockingMessageVisible())\r\n\t\t\tthis.$rootScope.messageClass += \" modal-blocker\";\r\n\r\n\t\tif (this.$rootScope.messages.length == 1 && $(\":focus\").length > 0) {\r\n\t\t\tthis.$rootScope.activeElement = $(\":focus\");\r\n\t\t}\r\n\r\n\t\tif (this.$rootScope.messages.length > 0) {\r\n\t\t\tlet timeout = setTimeout(function () {\r\n\t\t\t\tvar messagecontainers = $(\".message-container\");\r\n\t\t\t\tif (messagecontainers.length) {\r\n\t\t\t\t\tlet msgContainer = messagecontainers[$rootScope.messages.length - 1];\r\n\t\t\t\t\t$(\".\" + msgContainer.className + \" > button\").first().focus();\r\n\t\t\t\t}\r\n\t\t\t\tclearTimeout(timeout);\r\n\t\t\t}, 100);\r\n\t\t}\r\n\t\tif (!msg.doNotAutoClose) {\r\n\t\t\tthis.monitorMessages();\r\n\t\t}\r\n\t}\r\n\r\n\tprivate monitorMessages() {\r\n\t\tif (this.msgInterval) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tlet $timeout = this.$timeout;\r\n\t\tlet timeout = this.msgTimeout;\r\n\t\tlet $rootScope = this.$rootScope;\r\n\t\tlet self = this;\r\n\t\tthis.msgInterval = this.$interval(function () {\r\n\t\t\tlet dt: any = new Date();\r\n\t\t\tlet diff: number;\r\n\t\t\tlet messageExists = false;\r\n\t\t\tfor (var i = self.globalStoreService.GetPlatformState().Banners.length - 1; i >= 0; i--) {\r\n\t\t\t\tvar message = self.globalStoreService.GetPlatformState().Banners[i];\r\n\t\t\t\tvar messageType = message.MessageType.toLowerCase();\r\n\r\n\t\t\t\tif ((messageType == \"success\" || messageType == \"warning\" || messageType == \"info\") && (!$rootScope.messages[i].doNotAutoClose)) {\r\n\t\t\t\t\tmessageExists = true;\r\n\t\t\t\t\tdiff = dt - message.msgDate;\r\n\t\t\t\t\tif (diff >= timeout)\r\n\t\t\t\t\t\tself.globalStoreService.DispatchGlobalAction(\"Platform\", CloseBanner(message));\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!messageExists) {\r\n\t\t\t\tself.$interval.cancel(self.msgInterval);\r\n\t\t\t\tself.msgInterval = null;\r\n\t\t\t}\r\n\t\t\tif ($rootScope.messages.length == 0) {\r\n\t\t\t\t$rootScope.messageClass = \"modal-hide\";\r\n\t\t\t\tif ($rootScope.activeElement) {\r\n\t\t\t\t\tlet timeout = $timeout(function () {\r\n\t\t\t\t\t\tif ($rootScope.activeElement)\r\n\t\t\t\t\t\t\t$rootScope.activeElement.focus();\r\n\t\t\t\t\t\t$rootScope.activeElement = undefined;\r\n\t\t\t\t\t\t$timeout.cancel(timeout);\r\n\t\t\t\t\t}, 100);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}, 1000);\r\n\t}\r\n\r\n\t/**\r\n\t* An event handler whenever message close button is clicked.\r\n\t* @method Fxp.Services.fxpMessageService.closeMessage\r\n\t* @param {onject} message An object which is passed from the view.\r\n\t* @example Example to use closeMessage\r\n\t*
Close Message
;\r\n\t*
closeMessage
;\r\n\t*/\r\n\tcloseMessage = function (message) {\r\n\t\tvar self = this;\r\n\t\t//Dispatch action to close banner\r\n\t\tself.globalStoreService.DispatchGlobalAction(\"Platform\", CloseBanner(message));\r\n\t\tthis.$rootScope.messageClass = this.$rootScope.messages.length > 0 ? \"modal-show\" : \"modal-hide\";\r\n\t\tif (this.isAnyBlockingMessageVisible())\r\n\t\t\tthis.$rootScope.messageClass += \" modal-blocker\";\r\n\t\tif (this.$rootScope.messages.length == 0) {\r\n\t\t\tthis.$interval.cancel(this.msgInterval);\r\n\t\t\tsetTimeout(function () {\r\n\t\t\t\tif (!self.controlIdToFocusOnClose) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tif (self.controlIdToFocusOnClose.focus) {\r\n\t\t\t\t\tself.controlIdToFocusOnClose.focus();\r\n\t\t\t\t}\r\n\t\t\t\telse if (typeof (self.controlIdToFocusOnClose) === 'string') {\r\n\t\t\t\t\t$('#' + self.controlIdToFocusOnClose).focus();\r\n\t\t\t\t}\r\n\t\t\t}, 0);\r\n\t\t}\r\n\t\telse\r\n\t\t\tsetTimeout(function () {\r\n\t\t\t\tvar messagecontainers = $(\".message-container\");\r\n\t\t\t\tif (messagecontainers.length) {\r\n\t\t\t\t\tlet msgContainer = messagecontainers[messagecontainers.length - 1];\r\n\t\t\t\t\t$(\".\" + msgContainer.className + \" > button\").first().focus();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}, 100);\r\n\r\n\t}\r\n\r\n\tclearAndReload = function () {\r\n\t\tvar propbag = this.fxpLoggerService.createPropertyBag();\r\n\t\tpropbag.addToBag(\"Message\", \"User clicked reset application\");\r\n\t\tpropbag.addToBag(\"Location\", window.location.hash);\r\n\t\tthis.fxpLoggerService.logEvent(`${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.FxpMessageService.clearAndReload`, `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.ResetApplication`, propbag);\r\n\t\twindow[\"localStorage\"].clear();\r\n\t\twindow[\"sessionStorage\"].clear();\r\n\t\twindow.location.reload();\r\n\t}\r\n\r\n\tprivate isAnyBlockingMessageVisible() {\r\n\r\n\t\treturn this.$rootScope.messages.some(e => e.MessageType == FxpConstants.messageType.error);\r\n\t}\r\n}\r\n","//action creators for Banner\r\nimport { IAction } from 'redux-micro-frontend';\r\nimport { Banner } from \"./banner.model\"\r\nimport { BannerActionTypes } from './banner.action.types';\r\n\r\nexport const AddBanner = (payload: Banner): IAction => {\r\n return {\r\n type: BannerActionTypes.ADD_BANNER_MESSAGE,\r\n payload: payload\r\n }\r\n}\r\nexport const CloseBanner = (payload: Banner): IAction => {\r\n return {\r\n type: BannerActionTypes.CLOSE_BANNER_MESSAGE,\r\n payload: payload\r\n }\r\n}","export enum BannerActionTypes {\r\n ADD_BANNER_MESSAGE = \"ADD_BANNER_MESSAGE\",\r\n CLOSE_BANNER_MESSAGE = \"CLOSE_BANNER_MESSAGE\",\r\n}","import { Reducer } from 'redux'\r\nimport { IAction } from 'redux-micro-frontend';\r\nimport { Banner } from \"./banner.model\"\r\nimport { BannerActionTypes } from './banner.action.types';\r\nconst defaultState: Array = [];\r\n\r\n\r\nexport const BannerReducer: Reducer, IAction> = (\r\n state: Array = defaultState,\r\n action: IAction\r\n): Array => {\r\n switch (action.type) {\r\n case BannerActionTypes.ADD_BANNER_MESSAGE: {\r\n return [...state, action.payload];\r\n }\r\n case BannerActionTypes.CLOSE_BANNER_MESSAGE: {\r\n var index = state.indexOf(action.payload);\r\n return [...state.slice(0, index), ...state.slice(index + 1)];\r\n }\r\n }\r\n\r\n return state;\r\n}","import { IAction } from 'redux-micro-frontend';\r\nimport { Claims } from '../claims/claims.model'\r\nimport { ClaimsActionTypes } from '../claims/claims.action.types';\r\nexport const AddLoggedInUserClaims = (userClaims: Claims): IAction => ({\r\n type: ClaimsActionTypes.ADD_LOGGED_IN_USER_CLAIMS,\r\n payload: userClaims,\r\n logEnabled: false\r\n});\r\n\r\nexport const AddCurrentUserClaims = (userClaims: Claims): IAction => ({\r\n type: ClaimsActionTypes.ADD_CURRENT_USER_CLAIMS,\r\n payload: userClaims,\r\n logEnabled: false\r\n});","export enum ClaimsActionTypes {\r\n ADD_CURRENT_USER_CLAIMS=\"ADD_CURRENT_USER_CLAIMS\",\r\n ADD_LOGGED_IN_USER_CLAIMS=\"ADD_LOGGED_IN_USER_CLAIMS\"\r\n}","import { Reducer } from 'redux';\r\nimport { IAction } from 'redux-micro-frontend';\r\nimport { Claims } from './claims.model';\r\nimport { ClaimsActionTypes } from './claims.action.types';\r\n\r\nconst defaultClaims: Claims = {} as Claims\r\n\r\nexport const ClaimsReducer: Reducer> = (\r\n state: Claims = defaultClaims,\r\n action: IAction): Claims => {\r\n\r\n if (action.type==ClaimsActionTypes.ADD_CURRENT_USER_CLAIMS || action.type == ClaimsActionTypes.ADD_LOGGED_IN_USER_CLAIMS) {\r\n return action.payload;\r\n }\r\n\r\n return state;\r\n}","import {\r\n Component,\r\n Injector} from '@angular/core';\r\nimport { createCustomElement } from '@angular/elements';\r\nimport { FxpSharedComponentLoader } from '@fxp/fxpsharedcomponentloader';\r\nimport { SharedComponentsModule, SharedComponentLoader} from '@fxp/angularcontrols';\r\n\r\n@Component({\r\n selector: 'app-root',\r\n templateUrl: './app.component.html',\r\n})\r\n\r\nexport class AppComponent {\r\n\r\n constructor(injector: Injector) {\r\n //define customElements\r\n const sharedComponentLoaderControl = createCustomElement(FxpSharedComponentLoader, {injector});\r\n customElements.define('fxp-shared-component-control', sharedComponentLoaderControl);\r\n }\r\n\r\n}\r\n\r\n","
\r\n \r\n \r\n \r\n
\r\n","import { Component, Inject, OnInit, ViewChild, ViewContainerRef, forwardRef, Renderer2} from '@angular/core';\r\nimport { StateService } from \"@uirouter/core\";\r\nimport { PartnerAppRegistrationService } from '../../../js/services/PartnerAppRegistrationService';\r\nimport { FxpLazyLoader } from '../../fxplazyloader';\r\nimport { LazyLoaderService } from \"../../../js/services/lazyLoaderService\";\r\nimport { PageLoaderService } from '../../loader/pageLoaderService';\r\nimport { FxpEventBroadCastService } from '../../../js/services/BroadCastingService';\r\nimport { FxpBroadcastedEvents } from '../../../js/services/FxpBroadcastedEvents';\r\nimport { FxpLoggerService } from '../../../js/telemetry/fxpLogger';\r\nimport { ComponentFramework } from '../../../js/common/enum/ComponentFramework';\r\nimport { ISharedComponentReference } from '../../../js/interfaces/ISharedComponentReference';\r\n\r\n@Component({\r\n selector: 'iris-launcher',\r\n templateUrl: './fxpbot.component.html'\r\n})\r\nexport class FxpBotLauncherComponent implements OnInit {\r\n public isBotCloseButtonListenerAdded: boolean = false;\r\n constructor(\r\n @Inject(forwardRef(() => PageLoaderService)) public pageLoaderService: PageLoaderService,\r\n @Inject(forwardRef(() => LazyLoaderService)) public lazyLoadingService: LazyLoaderService,\r\n @Inject(forwardRef(() =>FxpEventBroadCastService)) private fxpEventBroadCastService: FxpEventBroadCastService,\r\n @Inject(forwardRef(() =>FxpLoggerService)) private fxpLoggerService: FxpLoggerService,\r\n @Inject(forwardRef(() => StateService)) private stateService: StateService,\r\n @Inject(forwardRef(() => Renderer2)) private renderer: Renderer2 \r\n ){ \r\n }\r\n\r\n @ViewChild('container', { read: ViewContainerRef, static: false }) entry: ViewContainerRef;\r\n ngOnInit() {\r\n this.fxpEventBroadCastService.On(FxpBroadcastedEvents.OnLaunchIrisBot, this.showVirtualAssistant.bind(this));\r\n this.fxpEventBroadCastService.On(FxpBroadcastedEvents.OnHideIrisBot, this.hideVirtualAssistant.bind(this));\r\n }\r\n hideVirtualAssistant = function(){\r\n var element = document.querySelector('body .fxp-body');\r\n if (element){ \r\n this.renderer.removeClass(element, 'irisVirtualAssistantOpen');\r\n } \r\n }\r\n showVirtualAssistant = function() {\r\n const element = document.querySelector('body .fxp-body');\r\n if (element) { \r\n this.renderer.addClass(element, 'irisVirtualAssistantOpen');\r\n } \r\n this.fxpLoggerService.renewCorrelationId(); \r\n if(window[\"IsBotVisible\"] == undefined || !window[\"IsBotVisible\"]) { \r\n let self = this; \r\n this.pageLoaderService.fnShowPageLoader(\"Loading Bot...\");\r\n var FxpAppSettings = FxpAppSettings || window[\"FxpAppSettings\"] || {};\r\n const moduleBundle = FxpAppSettings.IrisModuleBundle;\r\n const bundle = FxpAppSettings.IrisBundle;\r\n this.lazyLoadingService.getInstance().load([moduleBundle, bundle], { serie: true }).then(function(){\r\n let route = self.stateService.get('iris-launcher');\r\n let ngComponent = route.childComponent;\r\n let ngModule = route.ngModule; \r\n \r\n setTimeout(function () {\r\n if (ngModule._ngModuleDefFactory) {\r\n //Module is AOT compiled\r\n let ngModuelRef = FxpLazyLoader.instantiateModule(ngModule);\r\n self.loadComponent(ngModuelRef, ngComponent);\r\n return;\r\n }\r\n \r\n FxpLazyLoader.compileAndLoadModule(ngModule).then(function (ngModuleRef) {\r\n self.loadComponent(ngModuleRef, ngComponent);\r\n }).catch((error) => {\r\n console.log(error);\r\n });\r\n }, 0);\r\n self.pageLoaderService.fnHidePageLoader();\r\n window[\"IsBotVisible\"] = true;\r\n });\r\n }\r\n }\r\n\r\n\r\n loadComponent(moduleRef: any, component: any): void {\r\n const self = this;\r\n try {\r\n let componentFactory = moduleRef.componentFactoryResolver.resolveComponentFactory(component);\r\n this.entry.createComponent(componentFactory, 0, moduleRef.injector);\r\n }\r\n catch (error) {\r\n console.error(error);\r\n }\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { FxpBotLauncherComponent } from \"./fxpbot.component\";\r\n\r\n@NgModule ({\r\n declarations: [FxpBotLauncherComponent],\r\n entryComponents: [FxpBotLauncherComponent],\r\n providers: []\r\n})\r\n\r\n\r\n\r\nexport class FxpBotModule {}\r\n","
\r\n \r\n \r\n
\r\n {{unViewedTourCount}}\r\n
\r\n \r\n
\r\n","import { Component, Inject, OnInit, ViewChild, ViewContainerRef, forwardRef, ComponentRef } from '@angular/core';\r\nimport { PartnerAppRegistrationService } from '../../../js/services/PartnerAppRegistrationService';\r\nimport { FxpLazyLoader } from '../../fxplazyloader';\r\nimport { LazyLoaderService } from \"../../../js/services/lazyLoaderService\";\r\nimport { PageLoaderService } from '../../loader/pageLoaderService';\r\nimport { FxpEventBroadCastService } from '../../../js/services/BroadCastingService';\r\nimport { FxpBroadcastedEvents } from '../../../js/services/FxpBroadcastedEvents';\r\nimport { FxpLoggerService } from '../../../js/telemetry/fxpLogger';\r\n\r\n@Component({\r\n selector: 'page-tour',\r\n templateUrl: './pageTour.component.html'\r\n})\r\nexport class PageTourLauncherComponent implements OnInit {\r\n private pageTourComponent;\r\n private isPageTourFlyoutOpen: boolean;\r\n public unViewedTourCount: number;\r\n public showCountClass: string = 'hideCount';\r\n constructor(@Inject(forwardRef(() => PageLoaderService)) public pageLoaderService: PageLoaderService,\r\n @Inject(forwardRef(() => LazyLoaderService)) public lazyLoadingService: LazyLoaderService,\r\n @Inject(forwardRef(() => FxpEventBroadCastService)) private fxpEventBroadCastService: FxpEventBroadCastService,\r\n @Inject(forwardRef(() => FxpLoggerService)) private fxpLoggerService: FxpLoggerService\r\n ) {\r\n\r\n }\r\n\r\n @ViewChild('container', { read: ViewContainerRef, static: false }) entry: ViewContainerRef;\r\n ngOnInit() {\r\n this.isPageTourFlyoutOpen = false;\r\n this.initPageTourComponent();\r\n this.bindEventListeners();\r\n\r\n }\r\n\r\n initPageTourComponent = () =>{\r\n this.fxpLoggerService.renewCorrelationId();\r\n if (this.pageTourComponent == null) {\r\n let self = this;\r\n let pageTourBundle = PartnerAppRegistrationService.getBundlesForSharedComponent('pagetour', \"pagetour-flyout\");\r\n this.lazyLoadingService.getInstance().load(pageTourBundle, { serie: true }).then(function(){\r\n let route = PartnerAppRegistrationService.getSharedComponentDetails('pagetour', \"pagetour-flyout\");\r\n let ngComponent = route.component;\r\n let ngModule = route.ngModule;\r\n let ngModuelRef = FxpLazyLoader.instantiateModule(ngModule);\r\n let componentFactory = ngModuelRef.componentFactoryResolver.resolveComponentFactory(ngComponent);\r\n self.pageTourComponent = self.entry.createComponent(componentFactory);\r\n });\r\n }\r\n }\r\n\r\n bindEventListeners = () => {\r\n let self = this;\r\n self.fxpEventBroadCastService.On(FxpBroadcastedEvents.OnPageTourFlyoutOpened, (state)=>this.setPageTourFlyoutState(true));\r\n self.fxpEventBroadCastService.On(FxpBroadcastedEvents.OnPageTourFlyoutClosed, (state)=>this.setPageTourFlyoutState(false));\r\n self.fxpEventBroadCastService.On(\"ShowUnviewedTourCount\", function (event, props) {\r\n self.unViewedTourCount = props.get(\"unviewedTourCount\");\r\n if(self.unViewedTourCount > 0)\r\n self.showCountClass = 'showCount';\r\n });\r\n }\r\n\r\n setPageTourFlyoutState = (isOpen: boolean) =>{\r\n this.isPageTourFlyoutOpen = isOpen;\r\n }\r\n\r\n togglePageTour = () => {\r\n if (!this.isPageTourFlyoutOpen)\r\n this.showPageTourFlyout();\r\n else\r\n this.hidePageTourFlyout();\r\n }\r\n\r\n showPageTourFlyout = function () {\r\n if(this.isPageTourFlyoutOpen) return;\r\n this.fxpEventBroadCastService.broadCast(FxpBroadcastedEvents.ShowPageTour, true);\r\n }\r\n\r\n hidePageTourFlyout = () => {\r\n if(!this.isPageTourFlyoutOpen) return;\r\n if (this.pageTourComponent != null) {\r\n this.fxpEventBroadCastService.broadCast(FxpBroadcastedEvents.HidePageTour, true);\r\n }\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { PageTourLauncherComponent } from \"./pageTour.component\";\r\n\r\n@NgModule ({\r\n declarations: [PageTourLauncherComponent],\r\n entryComponents: [PageTourLauncherComponent],\r\n providers: []\r\n})\r\n\r\n\r\n\r\nexport class FxpPageTourModule {}\r\n","\r\n","import { Component, OnInit, OnDestroy, ViewContainerRef, ViewChild, Inject, forwardRef, NgModuleFactory, CompilerFactory } from \"@angular/core\";\r\nimport { StateService } from \"@uirouter/core\";\r\nimport { FxpLazyLoader } from \"../../../app/fxplazyloader\"\r\nimport { PageLoaderService } from \"../../loader/pageLoaderService\";\r\nimport { PartnerStateService } from \"./partnerStateService\";\r\nimport { FxpMessageService } from \"../../banner/FxpMessageService\";\r\nimport { FxpConstants } from \"../../../js/common/ApplicationConstants\";\r\nimport { PartnerAppRegistrationService } from \"../../../js/services/PartnerAppRegistrationService\";\r\nimport { TelemetryConstants } from \"../../../js/telemetry/TelemetryConst\";\r\nimport { ErrorSeverityLevel } from \"../../../js/telemetry/ErrorSeverityLevel\";\r\nimport { ErrorCodes } from \"../../../js/constants/errorCodes\";\r\nimport { FxpLoggerService } from \"../../../js/telemetry/fxpLogger\";\r\n\r\n@Component({\r\n selector: 'fxp-app-partnerapp',\r\n templateUrl: \"./partnerContainer-component.html\"\r\n})\r\nexport class PartnerContainerComponent implements OnInit, OnDestroy {\r\n\r\n @ViewChild('container', { read: ViewContainerRef, static: false }) entry: ViewContainerRef;\r\n componentRef: any;\r\n\r\n currentStateName: string;\r\n sourceForTelemetry = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.PartnerContainerComponent`;\r\n\r\n constructor(\r\n @Inject(forwardRef(() => StateService)) private stateService: StateService,\r\n @Inject(forwardRef(() => PageLoaderService)) private fxpLoaderService: PageLoaderService,\r\n @Inject(forwardRef(() => FxpLoggerService)) private fxpLoggerService: FxpLoggerService,\r\n @Inject(forwardRef(() => FxpMessageService)) private fxpMessageService: FxpMessageService,\r\n @Inject(PartnerStateService) private fxpPartnerStateService: PartnerStateService,\r\n @Inject(CompilerFactory) private compilerFactory: CompilerFactory\r\n ) {\r\n FxpLazyLoader.setCompilerFactory(this.compilerFactory);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n if (this.componentRef) {\r\n this.entry.clear();\r\n this.componentRef = null;\r\n }\r\n this.fxpPartnerStateService.remove(this.currentStateName);\r\n }\r\n\r\n ngOnInit(): void {\r\n const currentState: any = this.stateService.$current;\r\n\r\n window.addEventListener(\"beforeunload\", function (e) {\r\n if(window[\"_showPageDirtyPopup\"]){\r\n var confirmationMessage = \"\\o/\";\r\n e.returnValue = confirmationMessage; \r\n return confirmationMessage;\r\n }\r\n });\r\n\r\n if (!currentState.ngModule || !currentState.childComponent){\r\n currentState.path.forEach(path => {\r\n if (path.name && path.data && path.data.partnerAppName && (!path.childComponent || !path.ngModule)) {\r\n let routeInfo = PartnerAppRegistrationService.getRegisteredAppRoute(path.data.partnerAppName, path.name);\r\n if (routeInfo) {\r\n path.childComponent = routeInfo.component;\r\n path.ngModule = routeInfo.ngModule;\r\n \r\n if (routeInfo.sticky && routeInfo.views) {\r\n let name = Object.keys(routeInfo.views)[0]; // sticky:true requires there to be a named view in the `views` attribute\r\n path.childComponent = routeInfo.views[name].component;\r\n }\r\n }\r\n }\r\n });\r\n }\r\n \r\n\r\n let ngModule = currentState.ngModule;\r\n let component = currentState.childComponent;\r\n const self = this;\r\n\r\n if (!ngModule) {\r\n let message = \"Reference to module is misisng in route configuration. Please set ngModule property of route config.\";\r\n this.fxpMessageService.addMessage(message, FxpConstants.messageType.error, true);\r\n console.error(message);\r\n return;\r\n }\r\n const moduleName = (ngModule.moduleType && ngModule.moduleType.name)? ngModule.moduleType.name : ngModule.name;\r\n const timerLabel = \"PartnerModule \" + moduleName + \" compilation: \";\r\n this.fxpLoaderService.fnShowPageLoader(\"Loading...\");\r\n let currentStateHandle: any;\r\n currentStateHandle = currentState;\r\n\r\n while (currentStateHandle.parent && currentStateHandle.parent.childComponent && !this.fxpPartnerStateService.contains(currentStateHandle.parent.name)) {\r\n currentStateHandle = currentStateHandle.parent;\r\n }\r\n\r\n this.fxpPartnerStateService.addState(currentStateHandle.name);\r\n this.currentStateName = currentStateHandle.name;\r\n component = currentStateHandle.childComponent;\r\n ngModule = currentStateHandle.ngModule;\r\n\r\n setTimeout(function () {\r\n if (ngModule._ngModuleDefFactory) {\r\n //Module is AOT compiled\r\n let ngModuelRef = FxpLazyLoader.instantiateModule(ngModule);\r\n self.loadComponent(ngModuelRef, component);\r\n console.time(timerLabel);\r\n return;\r\n }\r\n\r\n FxpLazyLoader.compileAndLoadModule(ngModule).then(function (ngModuleRef) {\r\n console.timeEnd(timerLabel);\r\n self.loadComponent(ngModuleRef, component);\r\n }).catch((error) => {\r\n let message = \"An error occured while compiling angular module: \" + ngModule.name + \". Please see the browser console for more details. \";\r\n let properties = self.fxpLoggerService.createPropertyBag();\r\n properties.addToBag(\"ngModuleName\", ngModule.name);\r\n self.fxpLoggerService.logException(`${self.sourceForTelemetry}.NgOnInit`, error, properties, null, null, ErrorSeverityLevel.Critical, ErrorCodes.ModuleCompilationError);\r\n self.fxpMessageService.addMessage(message, FxpConstants.messageType.error, true);\r\n console.error(message);\r\n console.error(error);\r\n self.fxpLoaderService.fnHidePageLoader();\r\n });\r\n }, 0);\r\n }\r\n\r\n loadComponent(moduleRef: any, component: any): void {\r\n const self = this;\r\n try {\r\n const label = \"Loading partner component: \" + component.name;\r\n console.time(label);\r\n let componentFactory = moduleRef.componentFactoryResolver.resolveComponentFactory(component);\r\n const currentState: any = this.stateService.$current\r\n if (currentState.includeRootModule) {\r\n this.componentRef = this.entry.createComponent(componentFactory, 0, moduleRef.injector);\r\n }\r\n else {\r\n this.componentRef = this.entry.createComponent(componentFactory, undefined, undefined, undefined, moduleRef);\r\n }\r\n\r\n this.fxpLoaderService.fnHidePageLoader();\r\n console.timeEnd(label);\r\n }\r\n catch (error) {\r\n let message = \"An error occured while instantiating the component: \" + component.name + \" of Module: \" + moduleRef.instance.constructor.name + \". Please see the browser console for more details. \";\r\n let properties = self.fxpLoggerService.createPropertyBag();\r\n properties.addToBag(\"ComponentName\", component.name);\r\n self.fxpLoggerService.logException(`${self.sourceForTelemetry}.LoadComponent`, error, properties, null, null, ErrorSeverityLevel.Critical, ErrorCodes.ErrorInstantiatingComponent);\r\n self.fxpMessageService.addMessage(message, FxpConstants.messageType.error, true);\r\n console.error(message);\r\n console.error(error);\r\n self.fxpLoaderService.fnHidePageLoader();\r\n }\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\n\r\n@Injectable()\r\nexport class PartnerStateService {\r\n\r\n private _currentStateName: Array = [];\r\n\r\n public get RunningStates(){\r\n return this._currentStateName;\r\n }\r\n\r\n public addState(stateName:string){\r\n this._currentStateName.push(stateName);\r\n }\r\n\r\n public clear(){\r\n this._currentStateName = [];\r\n }\r\n\r\n public contains(stateName:string){\r\n return this._currentStateName.indexOf(stateName) != -1; \r\n }\r\n\r\n public remove(stateName:string){\r\n this._currentStateName = this._currentStateName.filter(function(item){\r\n return item !== stateName\r\n });\r\n }\r\n}\r\n","
\r\n
","import {\r\n Component,\r\n ElementRef,\r\n forwardRef,\r\n Inject,\r\n OnDestroy,\r\n OnInit,\r\n ViewChild,\r\n} from \"@angular/core\";\r\nimport * as pbi from \"powerbi-client\";\r\n\r\nimport { StateService } from \"@uirouter/angular\";\r\nimport { CommonUtils } from \"../../../js/utils/CommonUtils\";\r\nimport { FxpMessageService } from \"../../banner/FxpMessageService\";\r\nimport { FxpConstants } from \"../../../js/common/ApplicationConstants\";\r\nimport { PageLoaderService } from \"../../loader/pageLoaderService\";\r\nimport { ErrorCodes } from \"../../../js/constants/errorCodes\";\r\nimport { ErrorSeverityLevel } from \"../../../js/telemetry/ErrorSeverityLevel\";\r\nimport { FxpLoggerService } from \"../../../js/telemetry/fxpLogger\";\r\nimport { TelemetryConstants } from \"../../../js/telemetry/TelemetryConst\";\r\nimport { FeatureUsageEvent } from \"../../../js/telemetry/FeatureUsageEvent\";\r\nimport {\r\n ActionStatus,\r\n ActionType,\r\n ComponentType,\r\n EventName,\r\n} from \"@microsoftit/telemetry-extensions-npm\";\r\nimport { FxpConfigurationService } from \"../../../js/services/FxpConfiguration\";\r\nimport { UserInfoService } from \"../../../js/services/UserInfoService\";\r\nimport { LogPropertyBag } from \"../../../js/telemetry/LogPropertyBag\";\r\nimport { MsalAuthenticationService } from \"../../../js/services/MsalAuthenticationService\";\r\n\r\nconst PowerBiFeatureName = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.FxPPowerBiIntegration`;\r\n@Component({\r\n selector: \"fxp-app-powerbi-container\",\r\n templateUrl: \"./powerbi-container-component.html\",\r\n})\r\nexport class PowerBIReportContainerComponent implements OnInit, OnDestroy {\r\n private sourceForTelemetry = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.PowerBIReportContainerComponent`;\r\n\r\n @ViewChild(\"reportContainer\", {\r\n static: false,\r\n })\r\n reportContainer: ElementRef;\r\n\r\n constructor(\r\n @Inject(forwardRef(() => MsalAuthenticationService))\r\n private msalAuthenticationService: MsalAuthenticationService,\r\n @Inject(forwardRef(() => FxpLoggerService))\r\n private fxpLoggerService: FxpLoggerService,\r\n @Inject(forwardRef(() => PageLoaderService))\r\n private pageLoaderService: PageLoaderService,\r\n @Inject(forwardRef(() => FxpMessageService))\r\n private fxpMessageService: FxpMessageService,\r\n @Inject(forwardRef(() => FxpConfigurationService))\r\n private fxpConfigurationService: FxpConfigurationService,\r\n @Inject(StateService) public stateService: StateService,\r\n @Inject(forwardRef(() => UserInfoService))\r\n private userInfoService: UserInfoService\r\n ) {}\r\n\r\n ngOnInit(): void {\r\n let self = this;\r\n self.preReportRender();\r\n\r\n const embededReportId = self.stateService.params.reportId\r\n ? self.stateService.params.reportId\r\n : \"\";\r\n const embededDashboardId = self.stateService.params.dashboardId\r\n ? self.stateService.params.dashboardId\r\n : \"\";\r\n let powerBiBaseUrl =\r\n self.fxpConfigurationService.FxpAppSettings.PowerBiReportBaseUrl;\r\n\r\n const powerBiService = new pbi.service.Service(\r\n pbi.factories.hpmFactory,\r\n pbi.factories.wpmpFactory,\r\n pbi.factories.routerFactory\r\n );\r\n const properties = self.fxpLoggerService.createPropertyBag();\r\n\r\n if (CommonUtils.isNullOrEmpty(powerBiBaseUrl)) {\r\n powerBiBaseUrl = \"https://app.powerbi.com\";\r\n }\r\n\r\n if (!CommonUtils.isNullOrEmpty(embededReportId)) {\r\n self.showReport(\r\n embededReportId,\r\n powerBiBaseUrl,\r\n powerBiService,\r\n properties\r\n );\r\n } else if (!CommonUtils.isNullOrEmpty(embededDashboardId)) {\r\n self.showDashBoard(\r\n embededReportId,\r\n powerBiBaseUrl,\r\n powerBiService,\r\n properties\r\n );\r\n } else {\r\n self.showError(properties);\r\n }\r\n }\r\n\r\n preReportRender() {\r\n let self = this;\r\n self.pageLoaderService.fnShowPageLoader(\"Loading...\");\r\n self.fxpLoggerService.renewCorrelationId();\r\n }\r\n\r\n showReport(\r\n embededReportId: string,\r\n powerBiBaseURL: string,\r\n powerBiService: pbi.service.Service,\r\n properties: LogPropertyBag\r\n ) {\r\n let self = this;\r\n const powerBiFeatureUsageEvent = new FeatureUsageEvent(\r\n `${PowerBiFeatureName}`,\r\n ActionType.User,\r\n \"PowerBIReportLoad\",\r\n EventName.PageLoad,\r\n ComponentType.Web\r\n );\r\n self.fxpLoggerService.startFeatureUsageEvent(powerBiFeatureUsageEvent);\r\n\r\n const source = `${self.sourceForTelemetry}.ShowReport`;\r\n const embededUrl = `${powerBiBaseURL}/reportEmbed?reportId=${embededReportId}`;\r\n const settings = self.getReportSettings();\r\n\r\n const config: pbi.IEmbedConfiguration = {\r\n type: \"report\",\r\n id: embededReportId,\r\n embedUrl: embededUrl,\r\n filters: [],\r\n settings: settings,\r\n };\r\n\r\n properties.addToBag(\"embededReportId\", embededReportId);\r\n\r\n self\r\n .getAccessToken()\r\n .then((token) => {\r\n config.accessToken = token;\r\n const reportContainer = this.reportContainer.nativeElement;\r\n powerBiService.reset(reportContainer);\r\n const powerBiReport = (\r\n powerBiService.embed(reportContainer, config)\r\n );\r\n self.attachEventHandlers(\r\n powerBiReport,\r\n source,\r\n powerBiFeatureUsageEvent,\r\n properties\r\n );\r\n })\r\n .finally(() => {\r\n setTimeout(function () {\r\n self.pageLoaderService.fnHidePageLoader();\r\n }, 0);\r\n });\r\n }\r\n\r\n showDashBoard(\r\n embededDashBoardId: string,\r\n powerBiBaseURL: string,\r\n powerBiService: pbi.service.Service,\r\n properties: LogPropertyBag\r\n ) {\r\n let self = this;\r\n const powerBiFeatureUsageEvent = new FeatureUsageEvent(\r\n `${PowerBiFeatureName}`,\r\n ActionType.User,\r\n \"PowerBIDashBoardLoad\",\r\n EventName.PageLoad,\r\n ComponentType.Web\r\n );\r\n self.fxpLoggerService.startFeatureUsageEvent(powerBiFeatureUsageEvent);\r\n\r\n const source = `${self.sourceForTelemetry}.ShowDashBoard`;\r\n const embededUrl = `${powerBiBaseURL}/dashboardEmbed?${embededDashBoardId}`;\r\n\r\n let config: pbi.IEmbedConfiguration = {\r\n type: \"dashboard\",\r\n id: embededDashBoardId,\r\n embedUrl: embededUrl,\r\n filters: [],\r\n };\r\n properties.addToBag(\"embededDashBoardId\", embededDashBoardId);\r\n self\r\n .getAccessToken()\r\n .then((token) => {\r\n config.accessToken = token;\r\n const dashBoardContainer = this.reportContainer.nativeElement;\r\n powerBiService.reset(dashBoardContainer);\r\n const powerBiDashBoard = (\r\n powerBiService.embed(dashBoardContainer, config)\r\n );\r\n self.attachEventHandlers(\r\n powerBiDashBoard,\r\n source,\r\n powerBiFeatureUsageEvent,\r\n properties\r\n );\r\n })\r\n .finally(() => {\r\n setTimeout(function () {\r\n self.pageLoaderService.fnHidePageLoader();\r\n }, 0);\r\n });\r\n }\r\n\r\n showError(properties: LogPropertyBag) {\r\n let self = this;\r\n const source = `${self.sourceForTelemetry}.ShowReport`;\r\n self.fxpLoggerService.logError(\r\n source,\r\n \"Invalid configuration for the report. Missing DashboardId and ReportId\",\r\n ErrorCodes.PowerBI_Invalid_Configuration,\r\n null,\r\n properties,\r\n null,\r\n null,\r\n ErrorSeverityLevel.High\r\n );\r\n self.fxpMessageService.addMessage(\r\n \"System Error has occurred. If the problem persists, please contact IT support.\",\r\n FxpConstants.messageType.error\r\n );\r\n return;\r\n }\r\n\r\n attachEventHandlers(\r\n powerBiComponent: pbi.Report | pbi.Dashboard,\r\n source: string,\r\n featureUsageEvent: FeatureUsageEvent,\r\n properties: LogPropertyBag\r\n ) {\r\n if (powerBiComponent instanceof pbi.Report) {\r\n this.handlePowerBiLoaded(powerBiComponent, source, properties);\r\n }\r\n this.handlePowerBiRendered(\r\n powerBiComponent,\r\n source,\r\n featureUsageEvent,\r\n properties\r\n );\r\n this.handlePowerBiError(\r\n powerBiComponent,\r\n source,\r\n featureUsageEvent,\r\n properties\r\n );\r\n }\r\n\r\n handlePowerBiLoaded(\r\n powerBiReport: pbi.Report,\r\n source: string,\r\n properties: LogPropertyBag\r\n ) {\r\n let self = this;\r\n powerBiReport.off(\"loaded\");\r\n powerBiReport.on(\"loaded\", (event) => {\r\n self.fxpLoggerService.logEvent(\r\n source,\r\n \"FxpPlatform.PowerBIModule.ReportLoaded\",\r\n properties\r\n );\r\n powerBiReport.getFilters().then((filters) => {\r\n const updatedFilters = self.getUpdatedFilters(filters);\r\n powerBiReport.setFilters(updatedFilters).then(() => {\r\n self.fxpLoggerService.logEvent(\r\n source,\r\n \"FxpPlatform.PowerBIModule.ReportFiltersUpdated\",\r\n properties\r\n );\r\n });\r\n });\r\n });\r\n }\r\n\r\n handlePowerBiRendered(\r\n powerBiComponent: pbi.Report | pbi.Dashboard,\r\n source: string,\r\n featureUsageEvent: FeatureUsageEvent,\r\n properties: LogPropertyBag\r\n ) {\r\n let self = this;\r\n powerBiComponent.off(\"rendered\");\r\n powerBiComponent.on(\"rendered\", (event) => {\r\n let propForEvents = CommonUtils.clone(properties);\r\n let propForFeature = CommonUtils.clone(properties);\r\n self.fxpLoggerService.logEvent(\r\n source,\r\n \"FxpPlatform.PowerBIModule.PowerBiRendered\",\r\n propForEvents\r\n );\r\n featureUsageEvent.ActionStatus = ActionStatus.Succeeded;\r\n self.fxpLoggerService.endFeatureUsageEvent(\r\n source,\r\n featureUsageEvent,\r\n propForFeature\r\n );\r\n });\r\n }\r\n\r\n handlePowerBiError(\r\n powerBiComponent: pbi.Report | pbi.Dashboard,\r\n source: string,\r\n featureUsageEvent: FeatureUsageEvent,\r\n properties: LogPropertyBag\r\n ) {\r\n let self = this;\r\n const accessRequestUrl = this.stateService.params.accessRequestUrl\r\n ? this.stateService.params.accessRequestUrl\r\n : \"\";\r\n\r\n powerBiComponent.off(\"error\");\r\n powerBiComponent.on(\"error\", (event) => {\r\n properties.addToBag(\"errorDetails\", JSON.stringify(event.detail));\r\n let errorMessage = \"\";\r\n if (event.detail && event.detail[\"message\"])\r\n errorMessage = event.detail[\"message\"];\r\n self.fxpLoggerService.logError(\r\n source,\r\n \"Error rendering powerbi component: \" + errorMessage,\r\n ErrorCodes.PowerBI_OnError,\r\n null,\r\n properties,\r\n null,\r\n null,\r\n ErrorSeverityLevel.Medium\r\n );\r\n featureUsageEvent.ActionStatus = ActionStatus.Failed;\r\n self.fxpLoggerService.endFeatureUsageEvent(\r\n source,\r\n featureUsageEvent,\r\n properties\r\n );\r\n if (accessRequestUrl && accessRequestUrl !== \"\")\r\n self.fxpMessageService.addMessage(\r\n `Seems you have insufficient access. Please visit [PSDL Portal](${accessRequestUrl}) to raise access`,\r\n FxpConstants.messageType.error\r\n );\r\n else\r\n self.fxpMessageService.addMessage(\r\n \"Error rendering powerbi component\",\r\n FxpConstants.messageType.error\r\n );\r\n this.pageLoaderService.fnHidePageLoader();\r\n });\r\n }\r\n\r\n getReportSettings(): pbi.IEmbedSettings {\r\n const settings: pbi.IEmbedSettings = {\r\n filterPaneEnabled: true,\r\n navContentPaneEnabled: true,\r\n };\r\n return settings;\r\n }\r\n\r\n getUpdatedFilters(\r\n existingFilters: pbi.models.IFilter[]\r\n ): pbi.models.IFilter[] {\r\n const newFilters = this.getNewFilters();\r\n\r\n for (const newFilter of newFilters) {\r\n let existingFilterIndex = existingFilters.findIndex((existingFilter) => {\r\n const target: any = existingFilter.target;\r\n return (\r\n newFilter.target.table == target.table &&\r\n newFilter.target.column == target.column\r\n );\r\n });\r\n\r\n if (existingFilterIndex == -1) existingFilters.push(newFilter);\r\n else existingFilters[existingFilterIndex] = newFilter;\r\n }\r\n return existingFilters;\r\n }\r\n\r\n getNewFilters(): any {\r\n const profile = this.userInfoService.getCurrentUserProfile();\r\n let filters = this.stateService.params.filters;\r\n let newFilters = [];\r\n\r\n for (const filter of filters) {\r\n if (\r\n filter.operator &&\r\n filter.values &&\r\n filter.target &&\r\n filter.displaySettings\r\n ) {\r\n let values = [];\r\n\r\n for (const value of filter.values) {\r\n values.push(this.getValueForFilter(value, profile));\r\n }\r\n\r\n newFilters.push({\r\n $schema:\r\n this.fxpConfigurationService.FxpAppSettings.PowerBiFilterSchemaUrl,\r\n displaySettings: {\r\n displayName: filter.displaySettings.displayName,\r\n },\r\n target: {\r\n table: filter.target.table,\r\n column: filter.target.column,\r\n },\r\n operator: filter.operator,\r\n values: values,\r\n filterType: pbi.models.FilterType.Basic,\r\n });\r\n }\r\n }\r\n return newFilters;\r\n }\r\n\r\n getValueForFilter(value: string, profile): string {\r\n const filterValueRegExp = new RegExp(\r\n this.fxpConfigurationService.FxpAppSettings.PowerBiFilterValueRegularExpression\r\n );\r\n if (filterValueRegExp.test(value)) {\r\n let result = filterValueRegExp.exec(value);\r\n return profile[result[1]];\r\n }\r\n return value;\r\n }\r\n\r\n getAccessToken(): Promise {\r\n let powerBITokenURL =\r\n this.fxpConfigurationService.FxpAppSettings.PowerBiEndpoint;\r\n if (CommonUtils.isNullOrEmpty(powerBITokenURL)) {\r\n powerBITokenURL = \"https://api.powerbi.com\";\r\n }\r\n\r\n const source = `${this.sourceForTelemetry}.GetAccessToken`;\r\n const self = this;\r\n return new Promise((resolve, reject) => {\r\n self.msalAuthenticationService\r\n .acquireTokenAsPromise(powerBITokenURL)\r\n .then((token) => {\r\n resolve(token.accessToken);\r\n })\r\n .catch((error) => {\r\n reject(error);\r\n const properties = self.fxpLoggerService.createPropertyBag();\r\n properties.addToBag(\"API\", powerBITokenURL);\r\n self.fxpLoggerService.logError(\r\n source,\r\n `Failed to acquire access token for ${powerBITokenURL}`,\r\n ErrorCodes.PowerBI_Token_Failure,\r\n null,\r\n properties,\r\n null,\r\n null,\r\n ErrorSeverityLevel.High\r\n );\r\n self.fxpMessageService.addMessage(\r\n \"System Error has occurred. Please try again. If the problem persists, please contact IT support.\",\r\n FxpConstants.messageType.error\r\n );\r\n });\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {}\r\n}\r\n","
\r\n
","import * as React from 'react';\r\nimport * as ReactDOM from 'react-dom';\r\nimport { UiView } from '@fxp/reactrouter';\r\nimport { StateService } from '@uirouter/core';\r\nimport { FxpLazyLoader } from \"../../../app/fxplazyloader\";\r\nimport { FxpMessageService } from \"../../banner/FxpMessageService\";\r\nimport { FxpConstants } from \"../../../js/common/ApplicationConstants\";\r\nimport { PageLoaderService } from \"../../loader/pageLoaderService\";\r\nimport { FxpGlobalStoreService } from \"../../../js/services/fxp.global.store.service\";\r\nimport { PartnerStateService } from \"../partnerContainer-component/partnerStateService\";\r\nimport { Component, ViewChild, Inject, forwardRef, CompilerFactory, ElementRef, AfterViewInit, OnInit } from \"@angular/core\";\r\nimport { TelemetryConstants } from '../../../js/telemetry/TelemetryConst';\r\nimport { FxpLoggerService } from '../../../js/telemetry/fxpLogger';\r\nimport { ErrorSeverityLevel } from '../../../js/telemetry/ErrorSeverityLevel';\r\nimport { ErrorCodes } from '../../../js/constants/errorCodes';\r\n\r\n@Component({\r\n selector: 'fxp-app-partnerreactapp',\r\n templateUrl: \"./reactpartner-component.html\"\r\n})\r\nexport class ReactPartnerContainerComponent implements AfterViewInit, OnInit {\r\n @ViewChild('container1', { read: ElementRef, static: false }) entry: ElementRef;\r\n componentRef: any;\r\n currentStateName: string;\r\n sourceForTelemetry = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.ReactPartnerContainerComponent`;\r\n stateChangeUnsubscribeCaller: () => void;\r\n\r\n constructor(\r\n @Inject(forwardRef(() => PageLoaderService)) private fxpLoaderService: PageLoaderService,\r\n @Inject(forwardRef(() => FxpLoggerService)) private fxpLoggerService: FxpLoggerService,\r\n @Inject(forwardRef(() => FxpMessageService)) private fxpMessageService: FxpMessageService,\r\n @Inject(forwardRef(() => FxpGlobalStoreService)) private globalStore: FxpGlobalStoreService,\r\n @Inject(forwardRef(() => StateService)) private stateService: StateService,\r\n @Inject(PartnerStateService) private fxpPartnerStateService: PartnerStateService,\r\n @Inject(CompilerFactory) private compilerFactory: CompilerFactory\r\n ) {\r\n FxpLazyLoader.setCompilerFactory(this.compilerFactory);\r\n }\r\n ngOnInit(): void {\r\n window.addEventListener(\"beforeunload\", function (e) {\r\n if(window[\"_showPageDirtyPopup\"]){\r\n var confirmationMessage = \"\\o/\";\r\n e.returnValue = confirmationMessage; \r\n return confirmationMessage;\r\n }\r\n });\r\n }\r\n ngOnDestroy(): void {\r\n this.fxpPartnerStateService.remove(this.currentStateName);\r\n if (this.stateChangeUnsubscribeCaller) {\r\n this.stateChangeUnsubscribeCaller();\r\n }\r\n this.unloadComponent(this.entry.nativeElement);\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n const self = this;\r\n this.currentStateName = this.stateService.$current.name;\r\n this.fxpPartnerStateService.addState(this.currentStateName);\r\n this.loadComponent(self.entry.nativeElement);\r\n this.fxpLoaderService.fnHidePageLoader();\r\n\r\n this.stateChangeUnsubscribeCaller =\r\n this.globalStore.SubscribeToPartnerState(\"Fxp.ReactPartnerContainerComponent\", \"PLATFORM_ROUTER\", (routeState) => {\r\n self.loadComponent(self.entry.nativeElement);\r\n });\r\n }\r\n\r\n private loadComponent(nativeElement: any) {\r\n try {\r\n ReactDOM.render(\r\n React.createElement(UiView, null, null),\r\n nativeElement\r\n );\r\n } catch (error) {\r\n this.fxpLoggerService.logException(`${this.sourceForTelemetry}.LoadComponent`, error, null, null, null, ErrorSeverityLevel.Critical, ErrorCodes.ErrorLoadingReactComponent);\r\n this.fxpMessageService.addMessage(\"There was an error in loading the React Component\", FxpConstants.messageType.error);\r\n }\r\n }\r\n\r\n private unloadComponent(nativeElement: any) {\r\n try {\r\n ReactDOM.unmountComponentAtNode(nativeElement);\r\n } catch (error) {\r\n this.fxpLoggerService.logException(`${this.sourceForTelemetry}.UnLoadComponent`, error, null, null, null, ErrorSeverityLevel.Critical, ErrorCodes.ErrorUnloadingReactComponent);\r\n this.fxpMessageService.addMessage(\"There was an error in removing the React Component\", FxpConstants.messageType.warning);\r\n }\r\n }\r\n}\r\n","export enum FlightingActions {\r\n UPSERT_FEATURE_FLAG = \"UPSERT_FEATURE_FLAG\",\r\n}","import { FlightingActions } from \"./featureFlags.action.types\"\r\n\r\nexport const UpsertFeatureFlags = (payload: Record) => {\r\n return {\r\n type: FlightingActions.UPSERT_FEATURE_FLAG,\r\n payload: payload\r\n }\r\n}\r\n\r\n","import { IAction } from 'redux-micro-frontend';\r\nimport { Reducer } from \"redux\";\r\nimport { FlightingActions } from \"./featureFlags.action.types\";\r\n\r\nconst defaultState: Record = {};\r\n\r\nexport const FeatureFlagReducer: Reducer, IAction>> = (\r\n state: Record = defaultState,\r\n action: IAction>\r\n): Record => {\r\n\r\n switch(action.type) {\r\n case FlightingActions.UPSERT_FEATURE_FLAG : { \r\n return {...state, ...action.payload};\r\n }\r\n }\r\n\r\n return state;\r\n}","import { Compiler, NgModuleRef, CompilerFactory, NgModuleFactory } from \"@angular/core\";\r\nimport { AppModule } from \"./modules/app.module\";\r\nimport { PartnerContainerComponent } from \"./components/partnerContainer-component/partnerContainer-component\";\r\n\r\nexport class FxpLazyLoader {\r\n static _partnerModules:{};\r\n static _compiler: Compiler;\r\n static _fxprootModule: NgModuleRef;\r\n static _compilerFactory: CompilerFactory;\r\n\r\n static setRootModuleReference(parentModuleRef: NgModuleRef){\r\n \r\n this._fxprootModule = parentModuleRef;\r\n }\r\n static setCompilerFactory(compilerFactory: CompilerFactory){\r\n this._compilerFactory = compilerFactory;\r\n if (!this._compiler) {\r\n this._compiler = this._compilerFactory.createCompiler([{useJit:true}]);\r\n }\r\n }\r\n\r\n static compileAndLoadModule(jitModuleRef):Promise{\r\n let self = this;\r\n \r\n return new Promise(function(resolve, reject){\r\n self._compiler.compileModuleAndAllComponentsAsync(jitModuleRef).then((factory) => {\r\n let partnerModule = factory.ngModuleFactory.create(self._fxprootModule.injector);\r\n \r\n resolve(partnerModule);\r\n })\r\n .catch(function(e){\r\n reject(e);\r\n });\r\n \r\n });\r\n }\r\n\r\n static instantiateModule(aotModuleFactoryRef: any):any{\r\n return aotModuleFactoryRef.create(this._fxprootModule.injector);\r\n }\r\n \r\n \r\n}\r\n","export enum AppStatusActionTypes {\r\n START_APP_INITIALIZATION = \"START_APP_INITIALIZATION\",\r\n COMPLETE_APP_INITIALIZATION = \"COMPLETE_APP_INITIALIZATION\",\r\n AUTHENTICATE_USER = \"AUTHENTICATE_USER\",\r\n FAIL_AUTHENTICATION = \"FAIL_AUTHENTICATION\",\r\n\r\n // Test\r\n UPDATE_COUNTER = \"UPDATE_COUNTER\"\r\n}","import { Reducer } from 'redux';\r\nimport { IAction } from 'redux-micro-frontend';\r\nimport { AppStatus } from './app.status.model';\r\nimport { AppStatusActionTypes } from './app.status.action.types';\r\n\r\nconst defaultState: AppStatus = {\r\n Initialization: \"Not started\",\r\n Authentication: \"Unauhtenticated\",\r\n HitCounter: 0\r\n};\r\n\r\nexport const AppStatusReducer: Reducer> = (\r\n state: AppStatus = defaultState,\r\n action: IAction\r\n): AppStatus => {\r\n switch(action.type) {\r\n case AppStatusActionTypes.START_APP_INITIALIZATION: {\r\n return { ...state, Initialization: \"STARTED\" }\r\n }\r\n case AppStatusActionTypes.COMPLETE_APP_INITIALIZATION: {\r\n return { ...state, Initialization: \"COMPLETED\" }\r\n }\r\n case AppStatusActionTypes.AUTHENTICATE_USER: {\r\n return { ...state, Authentication: \"Authenticated\" }\r\n }\r\n case AppStatusActionTypes.FAIL_AUTHENTICATION: {\r\n return { ...state, Authentication: \"Failed\" }\r\n }\r\n // Test\r\n case AppStatusActionTypes.UPDATE_COUNTER: {\r\n return { ...state, HitCounter: state.HitCounter + action.payload }\r\n }\r\n }\r\n\r\n return state;\r\n}","import { IAction } from \"redux-micro-frontend\"\r\nimport { Actions } from \"./leftNavigation.action.types\"\r\nimport { ILeftNavigationGroup } from \"./leftNavigation.model\"\r\nexport const setLeftnav = (payload: ILeftNavigationGroup): IAction => {\r\n return {\r\n type: Actions.SET_LEFTNAV,\r\n payload: payload\r\n }\r\n}","export enum Actions {\r\n SET_LEFTNAV = \"SET_LEFTNAV\"\r\n}","import { IAction } from 'redux-micro-frontend';\r\nimport { Reducer } from \"redux\";\r\nimport { Actions } from './leftNavigation.action.types';\r\nimport { ILeftNavigationGroup } from './leftNavigation.model';\r\n\r\nconst defaultState: ILeftNavigationGroup = {} as ILeftNavigationGroup;\r\n\r\nexport const LeftNavigationReducer: Reducer> = (\r\n state: ILeftNavigationGroup = defaultState,\r\n action: IAction\r\n): ILeftNavigationGroup => {\r\n\r\n switch (action.type) {\r\n case Actions.SET_LEFTNAV: {\r\n return action.payload;\r\n }\r\n }\r\n\r\n return state;\r\n}","import { IAction } from 'redux-micro-frontend';\r\nimport { LoaderActionTypes } from \"./loader.actions.types\";\r\nimport { ILoader } from \"./loader.model\";\r\n\r\n\r\nexport const ShowLoader = (payload: ILoader): IAction => {\r\n if(!payload.showLoader) payload.showLoader = true;\r\n\tif(payload.timeoutCallback) payload.timeoutCallback = payload.timeoutCallback.bind(payload);\r\n return {\r\n type: LoaderActionTypes.SHOW_LOADER,\r\n payload: payload\r\n }\r\n}\r\n\r\nexport const HideLoader = (payload: Object): IAction => {\r\n return {\r\n type: LoaderActionTypes.HIDE_LOADER,\r\n payload: payload\r\n }\r\n}\r\n\r\nexport const ShowSpecificLoader = (payload: ILoader) : IAction => {\r\n if(!payload.name) payload.name = 'default-fxp-loader';\r\n if(!payload.showLoader) payload.showLoader = true;\r\n return {\r\n type: LoaderActionTypes.SHOW_SPECIFIC_LOADER,\r\n payload: payload\r\n }\r\n}\r\n\r\nexport const HideSpecificLoader = (payload: Object): IAction => {\r\n return {\r\n type: LoaderActionTypes.HIDE_SPECIFIC_LOADER,\r\n payload: payload\r\n }\r\n}\r\n\r\n","export enum LoaderActionTypes {\r\n SHOW_LOADER = \"SHOW_LOADER\",\r\n HIDE_LOADER = \"HIDE_LOADER\",\r\n SHOW_SPECIFIC_LOADER = \"SHOW_SPECIFIC_LOADER\",\r\n HIDE_SPECIFIC_LOADER = \"HIDE_SPECIFIC_LOADER\",\r\n}","import { IAction } from 'redux-micro-frontend';\r\nimport { Reducer } from \"redux\";\r\nimport { LoaderActionTypes } from \"./loader.actions.types\";\r\nimport { ILoader } from \"./loader.model\";\r\n\r\nconst defaultState: Array = [];\r\n\r\nexport const LoaderReducer: Reducer, IAction > = (\r\n state: Array = defaultState,\r\n action: IAction \r\n): Array => {\r\n switch (action.type) {\r\n case LoaderActionTypes.SHOW_LOADER : {\r\n return [...state, action.payload];\r\n }\r\n case LoaderActionTypes.HIDE_LOADER : {\r\n return defaultState;\r\n }\r\n case LoaderActionTypes.SHOW_SPECIFIC_LOADER : {\r\n return [...state, action.payload];\r\n }\r\n case LoaderActionTypes.HIDE_SPECIFIC_LOADER : {\r\n return action.payload.name ? state.filter(loader => loader.name != action.payload.name) : defaultState;\r\n }\r\n }\r\n\r\n return state;\r\n\r\n};","import { IRootScope } from \"../../js/interfaces/IRootScope\";\r\nimport { FxpConfigurationService } from \"../../js/services/FxpConfiguration\";\r\nimport { FxpBroadcastedEvents } from \"../../js/services/FxpBroadcastedEvents\";\r\nimport { IFxPService } from \"../../js/interfaces/IFxpService\";\r\nimport { FxpGlobalStoreService } from '../../js/services/fxp.global.store.service';\r\nimport { ShowLoader, HideLoader, ShowSpecificLoader, HideSpecificLoader } from './loader.actions';\r\nimport { ILoader } from \"./loader.model\";\r\n/**\r\n * @application Fxp\r\n */\r\n/**\r\n * @module Fxp.Services\r\n */\r\ndeclare var Spinner: any;\r\n\r\n/**\r\n * A service to connect to Page Loader Service to fetch the detaisl of page loader\r\n * @class Fxp.Services.PageLoaderService\r\n * @classdesc A service to connect to Page Loader service to fetch the page loader details\r\n * @example Example to create an instance of Page Loader Service\r\n * //Initializing Page Loader Service\r\n * angular.module('FxPApp').controller('AppController', ['PageLoaderService', AppController]);\r\n * function AppController(PageLoaderService){ PageLoaderService.fnHidePageLoader(); }\r\n */\r\nexport class PageLoaderService implements IFxPService {\r\n\r\n\tprivate http: angular.IHttpService;\r\n\tprivate rootScope: IRootScope;\r\n\tprivate timeout: angular.ITimeoutService;\r\n\tprivate static _instance: PageLoaderService;\r\n\tprivate defaultLoaderName = 'fxploader';\r\n\tprivate loaderInstance;\r\n\tprivate timeoutIntervalInMs;\r\n\tprivate timeOutCallback;\r\n\tprivate pageLoadTimers: Array>;\r\n\tprivate currentLoaderState: Array;\r\n\r\n\tconstructor($http: angular.IHttpService,\r\n\t\t$rootScope: IRootScope,\r\n\t\t$timeout: angular.ITimeoutService,\r\n\t\tfxpConfigurationService: FxpConfigurationService,\r\n\t\tprivate globalStoreService: FxpGlobalStoreService)\r\n\t{\r\n\t\tthis.http = $http;\r\n\t\tthis.rootScope = $rootScope;\r\n\t\tthis.timeout = $timeout;\r\n\t\tthis.timeoutIntervalInMs = fxpConfigurationService.FxpBaseConfiguration.PageLoadTimeOut || 30000;\r\n\t\tthis.pageLoadTimers = [];\r\n\r\n\t\tif (PageLoaderService._instance) {\r\n\t\t\treturn PageLoaderService._instance;\r\n\t\t}\r\n\t\tPageLoaderService._instance = this;\r\n\r\n\t\tthis.globalStoreService.SubscribeToPlatformState(\"Platform\", (state) => {\r\n\t\t\tlet incomingLoaderState = state.Loader;\r\n\t\t\tif(incomingLoaderState !== null && incomingLoaderState !== undefined) {\r\n\t\t\t\tthis.showOrHideLoaders(incomingLoaderState, this.currentLoaderState);\r\n\t\t\t\tthis.currentLoaderState = incomingLoaderState;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n * Decides whether to hide/show loader based on difference of loaderState.\r\n */\r\n\tprivate showOrHideLoaders(incomingLoaderState, currentLoaderState = []) {\r\n\t\tif(incomingLoaderState.length > currentLoaderState.length) {\r\n\t\t\tlet loaderToShow = incomingLoaderState[incomingLoaderState.length ? incomingLoaderState.length - 1 : 0];\r\n\t\t\tif(Object.entries(loaderToShow).length !== 0 && loaderToShow[\"name\"] && loaderToShow[\"name\"] !== \"fxploader\") {\r\n\t\t\t\tthis.fnChangeLoaderState(loaderToShow);\r\n\t\t\t} else {\r\n\t\t\t\tthis.disablePageLoaderTimers();\r\n\t\t\t\tthis.fnChangeLoaderState(loaderToShow);\r\n\t\t\t\tthis.setPageLoadTimer(loaderToShow.timeoutCallback);\r\n\t\t\t}\r\n\t\t} else if (incomingLoaderState.length < currentLoaderState.length) {\r\n\t\t\tlet loaderToHide = currentLoaderState.filter(\r\n\t\t\t\tcurrentLoader =>\r\n\t\t\t\t !incomingLoaderState.some(\r\n\t\t\t\t\tincomingLoader => incomingLoader[\"name\"] === currentLoader[\"name\"]\r\n\t\t\t\t )\r\n\t\t\t);\r\n\r\n\t\t\tif(loaderToHide !== undefined && loaderToHide !== null && loaderToHide.length && loaderToHide[0][\"name\"] && loaderToHide[0][\"name\"] !== \"fxploader\") {\r\n\t\t\t\tthis.fnChangeLoaderState({showLoader: false});\r\n\t\t\t} else {\r\n\t\t\t\tthis.disablePageLoaderTimers();\r\n\t\t\t\tthis.fnChangeLoaderState({showLoader: false});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Sets Page loading time to the PageLoadTimers\r\n\t * @method Fxp.Services.PageLoaderService.setPageLoadTimer \r\n\t * @example Example to invoke setPageLoadTimer \r\n\t * PageLoaderService.setPageLoadTimer(3000 // time in milliseconds); \r\n\t */\r\n\tprivate setPageLoadTimer(timeOutCallback?) {\r\n\t\tvar self = this;\r\n\t\tself.timeOutCallback = timeOutCallback;\r\n\t\tvar pageLoadTimer = self.timeout(function () {\r\n\t\t\tself.fnHidePageLoader();\r\n\t\t\tif (self.timeOutCallback)\r\n\t\t\t\tself.timeOutCallback();\r\n\t\t}, self.timeoutIntervalInMs);\r\n\t\t\r\n\t\t// Storing timers in collection to cancel all of them once hide event is called. \r\n\t\tself.pageLoadTimers.push(pageLoadTimer);\r\n\t}\r\n\r\n\t/**\r\n * Gets Show Page Loader from the Page Loader Service\r\n * @method Fxp.Services.PageLoaderService.fnShowPageLoader \r\n * @example Example to invoke fnShowPageLoader\r\n * PageLoaderService.fnShowPageLoader('loading text');\r\n */\r\n\tfnShowPageLoader(loadingText, timeoutCallback?) {\r\n\t\tvar loader = this.fnCreateLoaderData(true, this.defaultLoaderName, loadingText, timeoutCallback);\r\n\t\tthis.globalStoreService.DispatchGlobalAction(\"Platform\", ShowLoader(loader));\r\n\t}\r\n\r\n\t/**\r\n\t* A method to show page loader which are part of series of steps\r\n\t* @method Fxp.Services.PageLoaderService.fnShowPageLoaderStep\r\n\t* @example Example to invoke fnShowPageLoaderStep\r\n\t* PageLoaderService.fnShowPageLoaderStep('Authenticating', 1, 2); // Will have a string \"Authenticating (1/2)\"\r\n\t*/\r\n\tfnShowPageLoaderStep(loadingText: string, currentStepIndex: number, totalStepsCount: number, timeOutCallback?) {\r\n\t\tlet loadingTextWithStep = `${loadingText} (${currentStepIndex}/${totalStepsCount})`;\r\n\t\tthis.fnShowPageLoader(loadingTextWithStep, timeOutCallback);\r\n\t}\r\n\t/**\r\n\t* Gets Hide Page Loader from the Page Loader Service\r\n\t* @method Fxp.Services.PageLoaderService.fnHidePageLoader\r\n\t* @example Example to invoke fnHidePageLoader\r\n\t* PageLoaderService.fnHidePageLoader();\r\n\t*/\r\n\tfnHidePageLoader() {\r\n\t\tthis.globalStoreService.DispatchGlobalAction(\"Platform\", HideLoader({}));\r\n\t}\r\n\r\n\t/**\r\n * Gets Show In line Loader from the Page Loader Service\r\n * @method Fxp.Services.PageLoaderService.fnShowInlineLoader\r\n * @example Example to invoke fnShowInlineLoader\r\n * PageLoaderService.fnShowInlineLoader('loader name','loading text');\r\n */\r\n\tfnShowInlineLoader(loaderName, loadingText) {\r\n\t\tvar loader = this.fnCreateLoaderData(true, loaderName, loadingText);\r\n\t\tthis.fnBroadcastInlineLoading(loader)\r\n\t}\r\n\r\n\t/**\r\n\t* Gets Hide In line Loader from the Page Loader Service\r\n\t* @method Fxp.Services.PageLoaderService.fnHideInlineLoader\r\n\t* @example Example to invoke fnHideInlineLoader\r\n\t* PageLoaderService.fnHideInlineLoader('loader name');\r\n\t*/\r\n\tfnHideInlineLoader(loaderName) {\r\n\t\tvar loader = this.fnCreateLoaderData(false, loaderName, '');\r\n\t\tthis.fnBroadcastInlineLoading(loader)\r\n\t}\r\n\r\n\t/**\r\n\t* Gets Show Flyout Inline Loader from the Page Loader Service\r\n\t* @method Fxp.Services.PageLoaderService.fnShowFlyoutInlineLoader\r\n\t* @example Example to invoke fnShowFlyoutInlineLoader\r\n\t* PageLoaderService.fnShowFlyoutInlineLoader('loader name','loader tooltip');\r\n\t*/\r\n\tfnShowFlyoutInlineLoader(loaderName, loaderTooltip) {\r\n\t\tvar loader = this.fnCreateFlyoutLoaderData(true, loaderName, loaderTooltip);\r\n\t\tthis.fnBroadcastInlineLoading(loader);\r\n\t}\r\n\r\n\t/**\r\n\t* Gets Hide Flyout Inline Loader from the Page Loader Service\r\n\t* @method Fxp.Services.PageLoaderService.fnHideFlyoutInlineLoader\r\n\t* @example Example to invoke fnHideFlyoutInlineLoader\r\n\t* PageLoaderService.fnHideFlyoutInlineLoader('loader name');\r\n\t*/\r\n\tfnHideFlyoutInlineLoader(loaderName) {\r\n\t\tvar loader = this.fnCreateFlyoutLoaderData(false, loaderName, '');\r\n\t\tthis.fnBroadcastInlineLoading(loader)\r\n\t}\r\n\r\n\t/**\r\n\t* Gets Show Specific Page Loader from the Page Loader Service\r\n\t* @method Fxp.Services.PageLoaderService.fnShowSpecificPageLoader\r\n\t* @example Example to invoke fnShowSpecificPageLoader\r\n\t* PageLoaderService.fnShowSpecificPageLoader('loader name','loader text');\r\n\t*/\r\n\tfnShowSpecificPageLoader(loaderName, loadingText) {\r\n\t\tvar loader = this.fnCreateLoaderData(true, loaderName, loadingText);\r\n\t\tthis.globalStoreService.DispatchGlobalAction(\"Platform\", ShowSpecificLoader(loader));\r\n\t}\r\n\r\n\t/**\r\n\t* Gets Hide Specific Page Loader from the Page Loader Service\r\n\t* @method Fxp.Services.PageLoaderService.fnHideSpecificPageLoader\r\n\t* @example Example to invoke fnHideSpecificPageLoader\r\n\t* PageLoaderService.fnHideSpecificPageLoader('loader name');\r\n\t*/\r\n\tfnHideSpecificPageLoader(loaderName) {\r\n\t\tthis.globalStoreService.DispatchGlobalAction(\"Platform\", HideSpecificLoader({name: loaderName}));\r\n\t}\r\n\r\n\t/**\r\n * Gets Create Loader Data from the Page Loader Service\r\n * @method Fxp.Services.PageLoaderService.fnCreateLoaderData\r\n * @example Example to invoke fnCreateLoaderData\r\n * PageLoaderService.fnCreateLoaderData('show loader','loader name','loading text');\r\n */\r\n\tfnCreateLoaderData(showLoader, loaderName, loadingText, timeOutCallback?) {\r\n\t\treturn { name: loaderName, showLoader: showLoader, loadingText: loadingText, timeoutCallback: timeOutCallback};\r\n\t}\r\n\r\n\t/**\r\n\t* Gets Create Flyout Loader Data from the Page Loader Service\r\n\t* @method Fxp.Services.PageLoaderService.fnCreateFlyoutLoaderData\r\n\t* @example Example to invoke fnCreateFlyoutLoaderData\r\n\t* PageLoaderService.fnCreateFlyoutLoaderData('show loader','loader name','loading text');\r\n\t*/\r\n\tfnCreateFlyoutLoaderData(showLoader, loaderName, loadingText) {\r\n\t\treturn angular.extend(this.fnCreateLoaderData(showLoader, loaderName, loadingText), { flyout: true });\r\n\t}\r\n\r\n\t/**\r\n\t* Gets Broadcast Loading from the Page Loader Service\r\n\t* @method Fxp.Services.PageLoaderService.fnChangeLoaderState\r\n\t* @example Example to invoke fnChangeLoaderState\r\n\t* PageLoaderService.fnChangeLoaderState('loader');\r\n\t*/\r\n\tfnChangeLoaderState(loader) {\r\n\t\tlet self = this;\r\n\t\tself.rootScope.showLoader = loader.showLoader;\r\n\t\tif (loader.showLoader) {\r\n\t\t\t//Timeout to make sure angular digest runs for the above \r\n\t\t\t//statement after which the spinContainer is available.\r\n\t\t\tself.timeout(function () {\r\n\t\t\t\t//Add spinner if not exists already.\r\n\t\t\t\tif (!self.loaderInstance) {\r\n\t\t\t\t\tvar spinConfig = {\r\n\t\t\t\t\t\tlines: 8 // The number of lines to draw\r\n\t\t\t\t\t\t, length: 0 // The length of each line\r\n\t\t\t\t\t\t, width: 8 // The line thickness\r\n\t\t\t\t\t\t, radius: 10 // The radius of the inner circle\r\n\t\t\t\t\t\t, scale: 1.5 // Scales overall size of the spinner\r\n\t\t\t\t\t\t, corners: 1 // Corner roundness (0..1)\r\n\t\t\t\t\t\t, color: '#0063b1' // #rgb or #rrggbb or array of colors\r\n\t\t\t\t\t\t, opacity: 0.25 // Opacity of the lines\r\n\t\t\t\t\t\t, rotate: 0 // The rotation offset\r\n\t\t\t\t\t\t, direction: 1 // 1: clockwise, -1: counterclockwise\r\n\t\t\t\t\t\t, speed: 1.9 // Rounds per second\r\n\t\t\t\t\t\t, trail: 60 // Afterglow percentage\r\n\t\t\t\t\t\t, fps: 20 // Frames per second when using setTimeout() as a fallback for CSS \r\n\t\t\t\t\t\t, className: 'spinner' // The CSS class to assign to the spinner\r\n\t\t\t\t\t};\r\n\t\t\t\t\tself.loaderInstance = new Spinner(spinConfig).spin(document.getElementById('fxp_loadercontainer'));\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tself.rootScope.loadingText = loader.loadingText || \"Loading\";\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n * Gets Broadcast Inline Loading from the Page Loader Service\r\n * @method Fxp.Services.PageLoaderService.fnBroadcastInlineLoading\r\n * @example Example to invoke fnBroadcastInlineLoading\r\n * PageLoaderService.fnBroadcastInlineLoading('loader');\r\n */\r\n\tfnBroadcastInlineLoading(loader) {\r\n\t\tthis.rootScope.$broadcast(FxpBroadcastedEvents.OnShowHideInlineLoader, loader);\r\n\t}\r\n\r\n\tprivate disablePageLoaderTimers() {\r\n\t\tthis.pageLoadTimers.forEach((timer) => this.timeout.cancel(timer));\r\n\t\tthis.pageLoadTimers = [];\r\n\t}\r\n}\r\n\r\n","import { NgModule } from '@angular/core';\r\nimport { OverlayModule } from '@angular/cdk/overlay';\r\n\r\nimport {\r\n MatButtonModule,\r\n MatCheckboxModule,\r\n MatRadioModule,\r\n MatCardModule,\r\n MatAutocompleteModule,\r\n MatFormFieldModule,\r\n MatInputModule,\r\n MatButtonToggleModule,\r\n MatChipsModule,\r\n MatDialogModule,\r\n MatDatepickerModule,\r\n MatDividerModule,\r\n MatExpansionModule,\r\n MatGridListModule,\r\n MatIconModule,\r\n MatNativeDateModule,\r\n MatMenuModule,\r\n MatListModule,\r\n MatProgressBarModule,\r\n MatProgressSpinnerModule,\r\n MatRippleModule,\r\n MatSelectModule,\r\n MatSidenavModule,\r\n MatPaginatorModule,\r\n MatSliderModule,\r\n MatSlideToggleModule,\r\n MatSnackBarModule,\r\n MatSortModule,\r\n MatTableModule,\r\n MatToolbarModule,\r\n MatTabsModule,\r\n MatStepperModule,\r\n MatTooltipModule\r\n} from '@angular/material';\r\n\r\n@NgModule({\r\n imports: [\r\n MatFormFieldModule,\r\n MatAutocompleteModule,\r\n MatButtonModule,\r\n MatButtonToggleModule,\r\n MatCardModule,\r\n MatCheckboxModule,\r\n MatChipsModule,\r\n MatDatepickerModule,\r\n MatDialogModule,\r\n MatDividerModule,\r\n MatExpansionModule,\r\n MatGridListModule,\r\n MatIconModule,\r\n MatInputModule,\r\n MatListModule,\r\n MatMenuModule,\r\n MatNativeDateModule,\r\n MatPaginatorModule,\r\n MatProgressBarModule,\r\n MatProgressSpinnerModule,\r\n MatRadioModule,\r\n MatRippleModule,\r\n MatSelectModule,\r\n MatSidenavModule,\r\n MatSliderModule,\r\n MatSlideToggleModule,\r\n MatSnackBarModule,\r\n MatSortModule,\r\n MatStepperModule,\r\n MatTableModule,\r\n MatTabsModule,\r\n MatToolbarModule,\r\n MatTooltipModule,\r\n OverlayModule\r\n ],\r\n exports: [\r\n MatFormFieldModule,\r\n MatAutocompleteModule,\r\n MatButtonModule,\r\n MatButtonToggleModule,\r\n MatCardModule,\r\n MatCheckboxModule,\r\n MatChipsModule,\r\n MatDatepickerModule,\r\n MatDialogModule,\r\n MatDividerModule,\r\n MatExpansionModule,\r\n MatGridListModule,\r\n MatIconModule,\r\n MatInputModule,\r\n MatListModule,\r\n MatMenuModule,\r\n MatNativeDateModule,\r\n MatPaginatorModule,\r\n MatProgressBarModule,\r\n MatProgressSpinnerModule,\r\n MatRadioModule,\r\n MatRippleModule,\r\n MatSelectModule,\r\n MatSidenavModule,\r\n MatSliderModule,\r\n MatSlideToggleModule,\r\n MatSnackBarModule,\r\n MatSortModule,\r\n MatStepperModule,\r\n MatTableModule,\r\n MatTabsModule,\r\n MatToolbarModule,\r\n MatTooltipModule,\r\n OverlayModule\r\n ]\r\n})\r\nexport class AngularMaterialModule {\r\n \r\n \r\n}\r\n","import { NgModule, COMPILER_OPTIONS, CompilerFactory } from '@angular/core'\r\nimport { BrowserModule } from '@angular/platform-browser';\r\nimport { UpgradeModule } from '@angular/upgrade/static';\r\nimport { HttpClientModule } from \"@angular/common/http\";\r\nimport { FormsModule } from '@angular/forms';\r\nimport { NgbModule } from '@ng-bootstrap/ng-bootstrap';\r\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\r\nimport { ReactAppModule } from './reactapp.module';\r\nimport { PowerBiReportContainerModule } from './powerbi-module';\r\n\r\n\r\nimport {\r\n FxpConfigurationServiceProvider,\r\n AdalLoginHelperServiceProvider,\r\n DashboardServiceProvider,\r\n FxpMessageServiceProvider,\r\n HelpCentralServiceProvider,\r\n OBOUserServiceProvider,\r\n pageTourEventServiceProvider,\r\n SystemMessagesServiceProvider,\r\n UserInfoServiceProvider,\r\n UserProfileServiceProvider,\r\n UserClaimsServiceProvider,\r\n FxpBreadcrumbServiceProvider,\r\n AdminLandingServiceProvider,\r\n DataServiceProvider,\r\n NotificationActionCenterProvider,\r\n FxpStorageServiceProvider,\r\n PersonalizationServiceProvider,\r\n FxpFeedbackServiceProvider,\r\n FxpRouteServiceProvider,\r\n NotificationStoreProvider,\r\n PageLoaderServiceProvider,\r\n PlannedDownTimeServiceProvider,\r\n TimeZoneHelperProvider,\r\n FxpAuthorizationServiceProvider,\r\n NotificationServiceProvider,\r\n FxpEventBroadCastServiceProvider,\r\n FxpHttpServiceProvider,\r\n FxpLoggerServiceProvider,\r\n FxpFeatureFlagServiceProvider,\r\n FxpConfitServiceProvider,\r\n FxpStateTransitionServiceProvider,\r\n FxpUIDataProvider,\r\n SettingsServiceProvider,\r\n DeviceFactoryProvider,\r\n FxpContextServiceProvider,\r\n FxpHttpInterceptorHooksProvider,\r\n LazyLoaderServiceProvider,\r\n FxpIrisBotServiceProvider,\r\n FxpGlobalStoreServiceProvider,\r\n FxpOCVFeedbackServiceProvider,\r\n FxpSignalRServiceProvider,\r\n MsalAuthenticationServiceProvider,\r\n // MsalAuthenticationServiceProvider\r\n\r\n} from '../services/FxpServices';\r\nimport { AppComponent } from '../components/app-component/app.component';\r\nimport { UIRouterUpgradeModule } from '@uirouter/angular-hybrid';\r\nimport { PartnerContainerComponent } from '../components/partnerContainer-component/partnerContainer-component';\r\nimport { PartnerStateService } from '../components/partnerContainer-component/partnerStateService';\r\nimport { UIRouterModule } from '@uirouter/angular';\r\nimport { JitCompilerFactory } from '@angular/platform-browser-dynamic';\r\nimport { FxpBotModule } from '../components/fxpbot/fxpbot.module';\r\nimport { AngularMaterialModule } from './angular.material.module';\r\nimport { FxpSharedComponentLoader, FxpsharedcomponentloaderModule } from '@fxp/fxpsharedcomponentloader';\r\nimport { FxpPageTourModule } from '../components/pageTour-Component/pageTour.module';\r\n\r\nimport { SharedComponentsModule, SharedComponentLoader} from '@fxp/angularcontrols';\r\n\r\nlet importModules = [\r\n BrowserModule,\r\n FormsModule,\r\n UpgradeModule,\r\n HttpClientModule,\r\n UIRouterUpgradeModule,\r\n UIRouterModule,\r\n BrowserAnimationsModule,\r\n NgbModule,\r\n FxpBotModule,\r\n AngularMaterialModule,\r\n ReactAppModule,\r\n FxpsharedcomponentloaderModule,\r\n PowerBiReportContainerModule,\r\n FxpPageTourModule,\r\n SharedComponentsModule\r\n];\r\n\r\nconst fxpServices = [\r\n HttpClientModule,\r\n FxpConfigurationServiceProvider,\r\n MsalAuthenticationServiceProvider,\r\n AdalLoginHelperServiceProvider,\r\n AdminLandingServiceProvider,\r\n DashboardServiceProvider,\r\n DataServiceProvider,\r\n FxpAuthorizationServiceProvider,\r\n FxpBreadcrumbServiceProvider,\r\n FxpFeedbackServiceProvider,\r\n FxpMessageServiceProvider,\r\n FxpRouteServiceProvider,\r\n FxpStorageServiceProvider,\r\n HelpCentralServiceProvider,\r\n NotificationActionCenterProvider,\r\n NotificationServiceProvider,\r\n NotificationStoreProvider,\r\n OBOUserServiceProvider,\r\n PageLoaderServiceProvider,\r\n pageTourEventServiceProvider,\r\n PersonalizationServiceProvider,\r\n PlannedDownTimeServiceProvider,\r\n SystemMessagesServiceProvider,\r\n TimeZoneHelperProvider,\r\n UserInfoServiceProvider,\r\n UserProfileServiceProvider,\r\n UserClaimsServiceProvider,\r\n FxpEventBroadCastServiceProvider,\r\n FxpHttpServiceProvider,\r\n FxpLoggerServiceProvider,\r\n FxpFeatureFlagServiceProvider,\r\n FxpConfitServiceProvider,\r\n FxpStateTransitionServiceProvider,\r\n FxpUIDataProvider,\r\n SettingsServiceProvider,\r\n DeviceFactoryProvider,\r\n PartnerStateService,\r\n FxpContextServiceProvider,\r\n FxpHttpInterceptorHooksProvider,\r\n LazyLoaderServiceProvider,\r\n FxpIrisBotServiceProvider,\r\n FxpOCVFeedbackServiceProvider,\r\n { provide: COMPILER_OPTIONS, useValue: {}, multi: true},\r\n { provide: CompilerFactory, useClass: JitCompilerFactory, deps: [COMPILER_OPTIONS]},\r\n FxpGlobalStoreServiceProvider,\r\n FxpSignalRServiceProvider\r\n];\r\n\r\n@NgModule({\r\n imports: importModules,\r\n declarations: [AppComponent, PartnerContainerComponent ],\r\n providers: fxpServices,\r\n bootstrap: [\r\n AppComponent\r\n ],\r\nentryComponents: [PartnerContainerComponent, FxpSharedComponentLoader, SharedComponentLoader],\r\nexports: [PartnerContainerComponent]\r\n})\r\nexport class AppModule {\r\n\r\n}\r\n\r\n\r\n\r\n\r\n","import { NgModule } from '@angular/core';\r\nimport { PowerBIReportContainerComponent } from '../components/powerbi-component/powerbi-container-component';\r\n\r\n@NgModule({\r\n declarations: [PowerBIReportContainerComponent],\r\n entryComponents: [PowerBIReportContainerComponent],\r\n exports: [PowerBIReportContainerComponent],\r\n bootstrap: [\r\n PowerBIReportContainerComponent\r\n ],\r\n})\r\nexport class PowerBiReportContainerModule {\r\n \r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { ReactPartnerContainerComponent } from '../components/reactContainer-component/reactpartner-component';\r\n\r\n\r\n\r\n\r\n\r\n@NgModule({\r\n declarations: [ReactPartnerContainerComponent],\r\n bootstrap: [\r\n ReactPartnerContainerComponent\r\n ],\r\n entryComponents: [ReactPartnerContainerComponent],\r\n exports: [ReactPartnerContainerComponent]\r\n})\r\nexport class ReactAppModule {\r\n constructor() {\r\n \r\n }\r\n}\r\n","export enum NotificationActionTypes {\r\n Push_Notification= \"Push_Notification\",\r\n Mark_Notification = \"Mark_Notification\",\r\n Dismiss_Notification = \"Dismiss_Notification\",\r\n Reset_Notification_Collection = \"Reset_Notification_Collection\"\r\n}","import { Reducer } from 'redux'\r\nimport { IAction } from 'redux-micro-frontend';\r\nimport { Notification, NotificationDTO } from \"./notifications.model\"\r\nimport { NotificationActionTypes } from './notifications.action.type';\r\nconst defaultState: NotificationDTO = {UserNotifications:[],UnreadNotificationCount:0};\r\n\r\n\r\nexport const NotificationReducer: Reducer> = (\r\n state: NotificationDTO = defaultState,\r\n action: IAction\r\n): NotificationDTO => {\r\n switch (action.type) {\r\n case NotificationActionTypes.Push_Notification: {\r\n return {UserNotifications:[action.payload,...state.UserNotifications],UnreadNotificationCount:state.UnreadNotificationCount+1};\r\n }\r\n case NotificationActionTypes.Dismiss_Notification: {\r\n var index = state.UserNotifications.indexOf(action.payload);\r\n var UserNotifications=[...state.UserNotifications.slice(0, index), ...state.UserNotifications.slice(index + 1)];\r\n if(action.payload.status.name==\"Read\")\r\n return {UserNotifications:UserNotifications,UnreadNotificationCount:state.UnreadNotificationCount}\r\n return {UserNotifications:UserNotifications,UnreadNotificationCount:state.UnreadNotificationCount-1}\r\n \r\n }\r\n case NotificationActionTypes.Mark_Notification: {\r\n var index = state.UserNotifications.indexOf(action.payload);\r\n var notifications= [...state.UserNotifications.slice(0, index),action.payload, ...state.UserNotifications.slice(index + 1)];\r\n return {UserNotifications:notifications,UnreadNotificationCount:state.UnreadNotificationCount-1};\r\n }\r\n case NotificationActionTypes.Reset_Notification_Collection: {\r\n return action.payload;\r\n }\r\n }\r\n\r\n return state;\r\n}","//action creators for OBO Entity\r\nimport { IAction } from 'redux-micro-frontend';\r\nimport { OBOEntity } from \"./obo.model\"\r\nimport { OBOActionTypes } from './obo.action.types';\r\n\r\nexport const AddOBOEntity = (payload: OBOEntity): IAction => {\r\n return {\r\n type: OBOActionTypes.ADD_OBO_ENTITY,\r\n payload: payload\r\n }\r\n}\r\nexport const RemoveOBOEntity = (): IAction => {\r\n return {\r\n type: OBOActionTypes.REMOVE_OBO_ENTITY,\r\n payload: {} as OBOEntity\r\n }\r\n}","export enum OBOActionTypes {\r\n ADD_OBO_ENTITY=\"ADD_OBO_ENTITY\",\r\n REMOVE_OBO_ENTITY=\"REMOVE_OBO_ENTITY\",\r\n \r\n}","import { Reducer } from 'redux';\r\nimport { IAction } from 'redux-micro-frontend';\r\nimport { OBOEntity } from './obo.model';\r\nimport { OBOActionTypes } from './obo.action.types';\r\n\r\nconst defaultOBOEntity: OBOEntity = {} as OBOEntity\r\n\r\nexport const OBOReducer: Reducer> = (\r\n state: OBOEntity = defaultOBOEntity,\r\n action: IAction): OBOEntity => {\r\n switch (action.type) {\r\n case OBOActionTypes.ADD_OBO_ENTITY :{\r\n return action.payload\r\n \r\n }\r\n case OBOActionTypes.REMOVE_OBO_ENTITY:{\r\n return {} as OBOEntity\r\n }\r\n }\r\n return state;\r\n}","import { ProfileActionTypes } from './profile.action.types';\r\nimport {Profile} from './profile.model';\r\nimport { IAction } from 'redux-micro-frontend';\r\nexport const AddLoggedInUserProfile = (userProfile: Profile): IAction => ({\r\n type: ProfileActionTypes.ADD_LOGGED_IN_USER_PROFILE,\r\n payload: userProfile,\r\n logEnabled: false\r\n});\r\nexport const AddCurrentUserProfile = (userProfile: Profile): IAction => ({\r\n type: ProfileActionTypes.ADD_CURRENT_USER_PROFILE,\r\n payload: userProfile,\r\n logEnabled: false\r\n});","export enum ProfileActionTypes {\r\n ADD_CURRENT_USER_PROFILE=\"ADD_CURRENT_USER_PROFILE\",\r\n ADD_LOGGED_IN_USER_PROFILE=\"ADD_LOGGED_IN_USER_PROFILE\"\r\n}","import { Reducer } from 'redux';\r\nimport { IAction } from 'redux-micro-frontend';\r\nimport { Profile } from './profile.model';\r\nimport { ProfileActionTypes } from './profile.action.types';\r\n\r\nconst defaultProfile: Profile = {} as Profile\r\n\r\nexport const ProfileReducer: Reducer> = (\r\n state: Profile = defaultProfile,\r\n action: IAction): Profile => {\r\n\r\n if (action.type == ProfileActionTypes.ADD_CURRENT_USER_PROFILE || action.type == ProfileActionTypes.ADD_LOGGED_IN_USER_PROFILE) {\r\n return action.payload\r\n\r\n }\r\n return state;\r\n}","import { StateService } from \"@uirouter/core\";\r\nimport { FxpConfigurationService } from \"../../js/services/FxpConfiguration\";\r\nimport { FxpEventBroadCastService } from \"../../js/services/BroadCastingService\";\r\nimport { FxpStateTransitionService } from \"../../js/services/FxpStateTransitionService\";\r\nimport { FxpHttpService } from \"../../js/services/FxpHttpService\";\r\n// import { MsalAuthenticationService } from \"../../js/services/MsalAuthenticationService\";\r\nimport { AdminLandingService } from \"../adminTiles/AdminLandingService\";\r\nimport { DashboardService } from \"../../js/services/dashboardService\";\r\nimport { DataService } from \"../../js/services/DataService\";\r\nimport { FxpAuthorizationService } from \"../../js/services/FxpAuthorizationService\";\r\nimport { FxpBreadcrumbService } from \"../../js/services/FxpBreadcrumbService\";\r\nimport { FxpFeedbackService } from \"../../js/services/FxpFeedbackService\";\r\nimport { FxpMessageService } from \"../banner/FxpMessageService\";\r\nimport { FxpRouteService } from \"../../js/services/FxpRouteService\";\r\nimport { FxpStorageService } from \"../../js/services/FxpStorageService\";\r\nimport { HelpCentralService } from \"../../js/services/HelpCentralService\";\r\nimport { NotificationActionCenter } from \"../../js/services/NotificationActionCenter\";\r\nimport { NotificationService } from \"../../js/services/NotificationService\";\r\nimport { NotificationStore } from \"../../js/services/NotificationStore\";\r\nimport { OBOUserService } from \"../../js/services/OBOUserService\";\r\nimport { PageLoaderService } from \"../loader/pageLoaderService\";\r\nimport { pageTourEventService } from \"../../js/services/pageTourEventService\";\r\nimport { PersonalizationService } from \"../../js/services/PersonalizationService\";\r\nimport { PlannedDownTimeService } from \"../systemMessages/PlannedDownTimeService\";\r\nimport { SystemMessagesService } from \"../systemMessages/SystemMessagesService\";\r\nimport { TimeZoneHelper } from \"../../js/services/TimeZoneHelper\";\r\nimport { UserInfoService } from \"../../js/services/UserInfoService\";\r\nimport { UserClaimsService } from \"../../js/services/UserClaimsService\";\r\nimport { UserProfileService } from \"../../js/services/userProfileService\";\r\nimport { ConFitService } from \"@fxp/confitsdk/service/ConfigService\";\r\nimport { FeatureFlagService } from \"@fxp/flightingsdk/service/FeatureFlagServiceProvider\";\r\nimport { FxpUIData } from \"../../js/factory/FxpUIDataFactory\";\r\nimport { DeviceFactoryProvider as deviceFactoryProvider } from './../../js/utils/devicefactoryService';\r\nimport { SettingsServiceProvider as settingsServiceProvider } from './../../js/provider/SettingsServiceProvider';\r\nimport { FxpContext as fxpContextService, FxpContext } from './../../js/context/FxpContext'; \r\nimport { FxpPartnerHttpInterceptorHooks } from \"./../../js/services/FxpPartnerHttpInterceptorHooks\";\r\nimport { LazyLoaderService } from \"../../js/services/lazyLoaderService\";\r\nimport { FxpIrisBotService } from \"../../js/services/FxpIrisBotService\";\r\nimport { FxpGlobalStoreService } from \"../../js/services/fxp.global.store.service\";\r\nimport { FxpOCVFeedbackService } from \"../../js/services/FxpOCVFeedbackService\";\r\nimport { FxpSignalRService } from './../../js/services/FxpSignalRClient'; \r\nimport { FxpLoggerService } from \"../../js/telemetry/fxpLogger\";\r\nimport { AdalLoginHelperService } from \"../../js/services/AdalLoginHelperService\";\r\nimport { MsalAuthenticationService } from \"../../js/services/MsalAuthenticationService\";\r\n\r\nlet fxpComponentRegistrationService = null;\r\nlet partnerAppRegistrationService = null;\r\nlet resiliency = null;\r\n\r\n\r\n// Inject FxpConfigurationService to be used by Angular Component inside Fxp\r\n\r\nexport function FxpConfigurationServiceFactory(i: any) {\r\n return i.get('FxpConfigurationService');\r\n}\r\n\r\nexport let FxpConfigurationServiceProvider = {\r\n provide: FxpConfigurationService,\r\n useFactory: FxpConfigurationServiceFactory,\r\n deps: ['$injector']\r\n};\r\n\r\n// export function MsalAuthenticationServiceFactory(i: any) {\r\n// return i.get('MsalAuthenticationService');\r\n// }\r\n\r\n// export let MsalAuthenticationServiceProvider = {\r\n// provide: MsalAuthenticationService,\r\n// useFactory: MsalAuthenticationServiceFactory,\r\n// deps: ['$injector']\r\n// };\r\n\r\nexport function FxpEventBroadCastServiceFactory(i: any) {\r\n return i.get('FxpEventBroadCastService');\r\n}\r\nexport let FxpEventBroadCastServiceProvider = {\r\n provide: FxpEventBroadCastService,\r\n useFactory: FxpEventBroadCastServiceFactory,\r\n deps: ['$injector']\r\n}\r\n\r\nexport function FxpStateTransitionServiceFactory(i: any) {\r\n return i.get('FxpStateTransitionService');\r\n}\r\nexport let FxpStateTransitionServiceProvider = {\r\n provide: FxpStateTransitionService,\r\n useFactory: FxpStateTransitionServiceFactory,\r\n deps: ['$injector']\r\n}\r\n\r\nexport function FxpHttptServiceFactory(i: any) {\r\n return i.get('FxpHttpService');\r\n}\r\nexport let FxpHttpServiceProvider = {\r\n provide: FxpHttpService,\r\n useFactory: FxpHttptServiceFactory,\r\n deps: ['$injector']\r\n}\r\n\r\nexport function FxpSignalRServiceFactory(i: any) {\r\n return i.get('FxpSignalRService');\r\n}\r\nexport let FxpSignalRServiceProvider = {\r\n provide: FxpSignalRService,\r\n useFactory: FxpSignalRServiceFactory,\r\n deps: ['$injector']\r\n}\r\n\r\nexport function MsalAuthenticationServiceFactory(i: any) {\r\n return i.get('MsalAuthenticationService');\r\n}\r\n\r\nexport let MsalAuthenticationServiceProvider = {\r\n provide: MsalAuthenticationService,\r\n useFactory: MsalAuthenticationServiceFactory,\r\n deps: ['$injector']\r\n};\r\n\r\n// Inject AdalLoginHelperService to be used by Angular Component inside Fxp\r\n\r\nexport function AdalLoginHelperServiceFactory(i: any) {\r\n return i.get('AdalLoginHelperService');\r\n}\r\n\r\nexport let AdalLoginHelperServiceProvider = {\r\n provide: AdalLoginHelperService,\r\n useFactory: AdalLoginHelperServiceFactory,\r\n deps: ['$injector', 'MsalAuthenticationService']\r\n};\r\n\r\nexport function AdminLandingServiceFactory(i: any) {\r\n return i.get('AdminLandingService');\r\n}\r\n\r\nexport let AdminLandingServiceProvider = {\r\n provide: AdminLandingService,\r\n useFactory: AdminLandingServiceFactory,\r\n deps: ['$injector']\r\n};\r\n\r\n// Inject DashboardService to be used by Angular Component inside Fxp\r\n\r\nexport function DashboardServiceFactory(i: any) {\r\n return i.get('DashboardService');\r\n}\r\n\r\nexport let DashboardServiceProvider = {\r\n provide: DashboardService,\r\n useFactory: DashboardServiceFactory,\r\n deps: ['$injector']\r\n};\r\n\r\n// Inject DataService to be used by Angular Component inside Fxp\r\n\r\nexport function DataServiceFactory(i: any) {\r\n return i.get('DataService');\r\n}\r\n\r\nexport let DataServiceProvider = {\r\n provide: DataService,\r\n useFactory: DataServiceFactory,\r\n deps: ['$injector']\r\n};\r\n\r\n// Inject FxpAuthorizationService to be used by Angular Component inside Fxp\r\n\r\nexport function FxpAuthorizationServiceFactory(i: any) {\r\n return i.get('FxpAuthorizationService');\r\n}\r\n\r\nexport let FxpAuthorizationServiceProvider = {\r\n provide: FxpAuthorizationService,\r\n useFactory: FxpAuthorizationServiceFactory,\r\n deps: ['$injector']\r\n};\r\n\r\n// Inject FxpBreadcrumbService to be used by Angular Component inside Fxp\r\n\r\nexport function FxpBreadcrumbServiceFactory(i: any) {\r\n return i.get('FxpBreadcrumbService');\r\n}\r\n\r\nexport let FxpBreadcrumbServiceProvider = {\r\n provide: FxpBreadcrumbService,\r\n useFactory: FxpBreadcrumbServiceFactory,\r\n deps: ['$injector']\r\n};\r\n\r\n// Inject FxpFeedbackService to be used by Angular Component inside Fxp\r\n\r\nexport function FxpFeedbackServiceFactory(i: any) {\r\n return i.get('FxpFeedbackService');\r\n}\r\n\r\nexport let FxpFeedbackServiceProvider = {\r\n provide: FxpFeedbackService,\r\n useFactory: FxpFeedbackServiceFactory,\r\n deps: ['$injector']\r\n};\r\n\r\n// Inject FxpMessageService to be used by Angular Component inside Fxp\r\n\r\nexport function FxpMessageServiceFactory(i: any) {\r\n return i.get('FxpMessageService');\r\n}\r\n\r\nexport let FxpMessageServiceProvider = {\r\n provide: FxpMessageService,\r\n useFactory: FxpMessageServiceFactory,\r\n deps: ['$injector']\r\n};\r\n\r\n// Inject FxpRouteService to be used by Angular Component inside Fxp\r\n\r\nexport function FxpRouteServiceFactory(i: any) {\r\n return i.get('FxpRouteService');\r\n}\r\n\r\nexport let FxpRouteServiceProvider = {\r\n provide: FxpRouteService,\r\n useFactory: FxpRouteServiceFactory,\r\n deps: ['$injector']\r\n};\r\n\r\n// Inject FxpStorageService to be used by Angular Component inside Fxp\r\n\r\nexport function FxpStorageServiceFactory(i: any) {\r\n return i.get('FxpStorageService');\r\n}\r\n\r\nexport let FxpStorageServiceProvider = {\r\n provide: FxpStorageService,\r\n useFactory: FxpStorageServiceFactory,\r\n deps: ['$injector']\r\n};\r\n\r\n// Inject FxpConfigurationService to be used by Angular Component inside Fxp\r\n\r\n\r\n// Inject HelpCentralService to be used by Angular Component inside Fxp\r\n\r\nexport function HelpCentralServiceFactory(i: any) {\r\n return i.get('HelpCentralService');\r\n}\r\n\r\nexport let HelpCentralServiceProvider = {\r\n provide: HelpCentralService,\r\n useFactory: HelpCentralServiceFactory,\r\n deps: ['$injector']\r\n};\r\n\r\n// Inject NotificationActionCenter to be used by Angular Component inside Fxp\r\n\r\nexport function NotificationActionCenterFactory(i: any) {\r\n return i.get('NotificationActionCenter');\r\n}\r\n\r\nexport let NotificationActionCenterProvider = {\r\n provide: NotificationActionCenter,\r\n useFactory: NotificationActionCenterFactory,\r\n deps: ['$injector']\r\n};\r\n\r\n// Inject NotificationService to be used by Angular Component inside Fxp\r\n\r\nexport function NotificationServiceFactory(i: any) {\r\n return i.get('NotificationService');\r\n}\r\n\r\nexport let NotificationServiceProvider = {\r\n provide: NotificationService,\r\n useFactory: NotificationServiceFactory,\r\n deps: ['$injector']\r\n};\r\n\r\n\r\n// Inject NotificationStore to be used by Angular Component inside Fxp\r\n\r\nexport function NotificationStoreFactory(i: any) {\r\n return i.get('NotificationStore');\r\n}\r\n\r\nexport let NotificationStoreProvider = {\r\n provide: NotificationStore,\r\n useFactory: NotificationStoreFactory,\r\n deps: ['$injector']\r\n};\r\n\r\n// Inject OBOUserService to be used by Angular Component inside Fxp\r\n\r\nexport function OBOUserServiceFactory(i: any) {\r\n return i.get('OBOUserService');\r\n}\r\n\r\nexport let OBOUserServiceProvider = {\r\n provide: OBOUserService,\r\n useFactory: OBOUserServiceFactory,\r\n deps: ['$injector']\r\n};\r\n\r\n// Inject PageLoaderService to be used by Angular Component inside Fxp\r\n\r\nexport function PageLoaderServiceFactory(i: any) {\r\n return i.get('PageLoaderService');\r\n}\r\n\r\nexport let PageLoaderServiceProvider = {\r\n provide: PageLoaderService,\r\n useFactory: PageLoaderServiceFactory,\r\n deps: ['$injector']\r\n};\r\n\r\n// Inject pageTourEventService to be used by Angular Component inside Fxp\r\n\r\nexport function pageTourEventServiceFactory(i: any) {\r\n return i.get('pageTourEventService');\r\n}\r\n\r\nexport let pageTourEventServiceProvider = {\r\n provide: pageTourEventService,\r\n useFactory: pageTourEventServiceFactory,\r\n deps: ['$injector']\r\n};\r\n\r\n// Inject PersonalizationService to be used by Angular Component inside Fxp\r\n\r\nexport function PersonalizationServiceFactory(i: any) {\r\n return i.get('PersonalizationService');\r\n}\r\n\r\nexport let PersonalizationServiceProvider = {\r\n provide: PersonalizationService,\r\n useFactory: PersonalizationServiceFactory,\r\n deps: ['$injector']\r\n};\r\n\r\n// Inject PlannedDownTimeService to be used by Angular Component inside Fxp\r\n\r\nexport function PlannedDownTimeServiceFactory(i: any) {\r\n return i.get('PlannedDownTimeService');\r\n}\r\n\r\nexport let PlannedDownTimeServiceProvider = {\r\n provide: PlannedDownTimeService,\r\n useFactory: PlannedDownTimeServiceFactory,\r\n deps: ['$injector']\r\n};\r\n\r\n// Inject SystemMessagesService to be used by Angular Component inside Fxp\r\n\r\nexport function SystemMessagesServiceFactory(i: any) {\r\n return i.get('SystemMessagesService');\r\n}\r\n\r\nexport let SystemMessagesServiceProvider = {\r\n provide: SystemMessagesService,\r\n useFactory: SystemMessagesServiceFactory,\r\n deps: ['$injector']\r\n};\r\n\r\n// Inject FxpConfigurationService to be used by Angular Component inside Fxp\r\n\r\nexport function TimeZoneHelperFactory(i: any) {\r\n return i.get('TimeZoneHelper');\r\n}\r\n\r\nexport let TimeZoneHelperProvider = {\r\n provide: TimeZoneHelper,\r\n useFactory: TimeZoneHelperFactory,\r\n deps: ['$injector']\r\n};\r\n\r\n// Inject UserInfoService to be used by Angular Component inside Fxp\r\n\r\nexport function UserInfoServiceFactory(i: any) {\r\n return i.get('UserInfoService');\r\n}\r\n\r\nexport let UserInfoServiceProvider = {\r\n provide: UserInfoService,\r\n useFactory: UserInfoServiceFactory,\r\n deps: ['$injector']\r\n};\r\n\r\n// Inject UserClaimsService to be used by Angular Component inside Fxp\r\n\r\nexport function UserClaimsServiceFactory(i: any) {\r\n return i.get('UserClaimsService');\r\n}\r\n\r\nexport let UserClaimsServiceProvider = {\r\n provide: UserClaimsService,\r\n useFactory: UserClaimsServiceFactory,\r\n deps: ['$injector']\r\n};\r\n\r\n// Inject UserProfileService to be used by Angular Component inside Fxp\r\n\r\nexport function UserProfileServiceFactory(i: any) {\r\n return i.get('UserProfileService');\r\n}\r\n\r\nexport let UserProfileServiceProvider = {\r\n provide: UserProfileService,\r\n useFactory: UserProfileServiceFactory,\r\n deps: ['$injector']\r\n};\r\n\r\nexport function FxpLoggerServiceFactory(i: any) {\r\n return i.get('FxpLoggerService');\r\n}\r\n\r\nexport let FxpLoggerServiceProvider = {\r\n provide: FxpLoggerService,\r\n useFactory: FxpLoggerServiceFactory,\r\n deps: ['$injector']\r\n};\r\n\r\n\r\nexport function FxpConfitServiceFactory(i: any) {\r\n return i.get('ConFitService');\r\n}\r\n\r\nexport let FxpConfitServiceProvider = {\r\n provide: ConFitService,\r\n useFactory: FxpConfitServiceFactory,\r\n deps: ['$injector']\r\n};\r\n\r\n\r\nexport function FxpFeatureFlagServiceFactory(i: any) {\r\n return i.get('FeatureFlagService');\r\n}\r\n\r\nexport let FxpFeatureFlagServiceProvider = {\r\n provide: FeatureFlagService,\r\n useFactory: FxpFeatureFlagServiceFactory,\r\n deps: ['$injector']\r\n};\r\n\r\nexport function FxpUIDataFactory(i: any) {\r\n return i.get('FxpUIData');\r\n}\r\n\r\nexport let FxpUIDataProvider = {\r\n provide: FxpUIData,\r\n useFactory: FxpUIDataFactory,\r\n deps: ['$injector']\r\n};\r\n\r\nexport function DeviceFactoryFactory(i: any) {\r\n return i.get('DeviceFactory');\r\n}\r\n\r\nexport let DeviceFactoryProvider = {\r\n provide: deviceFactoryProvider,\r\n useFactory: DeviceFactoryFactory,\r\n deps: ['$injector']\r\n};\r\n\r\nexport function SettingsServiceFactory(i: any) {\r\n return i.get('SettingsService');\r\n}\r\n\r\nexport let SettingsServiceProvider = {\r\n provide: settingsServiceProvider,\r\n useFactory: SettingsServiceFactory,\r\n deps: ['$injector']\r\n};\r\n\r\n\r\nexport function FxpStateServiceFactory(i: any) {\r\n return i.get('$state');\r\n}\r\n\r\nexport let FxpStateServiceProvider = {\r\n provide: StateService,\r\n useFactory: FxpStateServiceFactory,\r\n deps: ['$injector']\r\n};\r\n\r\nexport function FxpPartnerHttpInterceptorHooksFactory(i: any) {\r\n return i.get('FxpPartnerHttpInterceptorHooks');\r\n}\r\n\r\nexport let FxpHttpInterceptorHooksProvider = {\r\n provide: FxpPartnerHttpInterceptorHooks,\r\n useFactory: FxpPartnerHttpInterceptorHooksFactory,\r\n deps: ['$injector']\r\n};\r\n\r\nexport function FxpContextServiceFactory(i: any) {\r\n return i.get('FxpContextService');\r\n}\r\n\r\nexport let FxpContextServiceProvider = {\r\n provide: FxpContext,\r\n useFactory: FxpContextServiceFactory,\r\n deps: ['$injector']\r\n};\r\n\r\n\r\nexport function LazyLoaderServiceFactory(i: any) {\r\n return i.get('LazyLoaderService');\r\n}\r\n\r\nexport let LazyLoaderServiceProvider = {\r\n provide: LazyLoaderService,\r\n useFactory: LazyLoaderServiceFactory,\r\n deps: ['$injector']\r\n};\r\n\r\nexport function FxpIrisBotServiceFactory(i: any) {\r\n return i.get('FxpIrisBotService');\r\n}\r\n\r\nexport let FxpIrisBotServiceProvider = {\r\n provide: FxpIrisBotService,\r\n useFactory: FxpIrisBotServiceFactory,\r\n deps: ['$injector']\r\n};\r\n\r\nexport function FxpGlobalStoreServiceFactory(i: any) {\r\n return i.get('FxpGlobalStoreService');\r\n}\r\n\r\nexport let FxpGlobalStoreServiceProvider = {\r\n provide: FxpGlobalStoreService,\r\n useFactory: FxpGlobalStoreServiceFactory,\r\n deps: ['$injector']\r\n};\r\n\r\n\r\nexport function FxpOCVFeedbackServiceFactory(i: any) {\r\n return i.get('FxpOCVFeedbackService');\r\n}\r\n\r\nexport let FxpOCVFeedbackServiceProvider = {\r\n provide: FxpOCVFeedbackService,\r\n useFactory: FxpOCVFeedbackServiceFactory,\r\n deps: ['$injector']\r\n};","import { AbstractLogger } from 'redux-micro-frontend';\r\nimport { LogPropertyBag } from '../../js/telemetry/LogPropertyBag';\r\nimport { ILogger as IFxpLogger } from '../../js/interfaces/ILogger';\r\nimport { ErrorSeverityLevel } from '../../js/telemetry/ErrorSeverityLevel';\r\nimport { ErrorCodes } from '../../js/constants/errorCodes';\r\nimport { TelemetryConstants } from '../../js/telemetry/TelemetryConst';\r\n\r\nexport class ActionLoggerAdapter extends AbstractLogger {\r\n private _source: string = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.Store.ActionLogger`;\r\n private _eventBase: string =`${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.Store`; \r\n\r\n constructor(private _fxpLogger: IFxpLogger) {\r\n super(\"FXP_APP_INSIGHTS_LOGGER\");\r\n }\r\n\r\n processEvent(source: string, eventName: string, properties: any): void {\r\n let propertyBag = this.CreatePropertyBag(properties);\r\n this._fxpLogger.logEvent(this._source, `${this._eventBase}.${eventName}`, propertyBag);\r\n }\r\n\r\n processException(source: string, error: Error, properties: any): void {\r\n let propertyBag = this.CreatePropertyBag(properties);\r\n this._fxpLogger.logException(this._source, error, propertyBag, null, null, ErrorSeverityLevel.Medium, ErrorCodes.ReduxStoreException);\r\n }\r\n\r\n private CreatePropertyBag(properties: any): LogPropertyBag {\r\n let propertyBag = this._fxpLogger.createPropertyBag();\r\n if (properties !== undefined && properties !== null && Object.keys(properties).length) {\r\n Object.keys(properties).forEach(key => {\r\n propertyBag.addToBag(key, properties[key]);\r\n });\r\n }\r\n return propertyBag;\r\n }\r\n}","import { AppStatusReducer } from '../init/app.status.reducer';\r\nimport { AdminTileReducer } from '../adminTiles/adminTiles.reducer';\r\nimport {BannerReducer} from '../banner/banner.reducer'\r\nimport { Reducer, combineReducers } from 'redux';\r\nimport { LoaderReducer } from '../loader/loader.reducer';\r\nimport { LoggedInUserReducer,CurrentUserReducer } from '../user/user.reducer';\r\nimport { OBOReducer } from '../obo/obo.reducer';\r\nimport { LeftNavigationReducer } from '../leftNavigation/leftNavigation.reducer';\r\nimport { FeatureFlagReducer } from '../flighting/flighting.reducer';\r\nimport { SystemMessageReducer } from '../systemMessages/systemMessage.reducer';\r\nimport { NotificationReducer } from '../notifications/notifications.reducer';\r\n\r\nexport const PlatformReducer: Reducer = combineReducers({\r\n Status: AppStatusReducer,\r\n Banners: BannerReducer,\r\n LoggedInUser: LoggedInUserReducer,\r\n CurrentUser: CurrentUserReducer,\r\n OBO:OBOReducer,\r\n AdminTiles: AdminTileReducer,\r\n LeftNavigation: LeftNavigationReducer,\r\n SystemMessages: SystemMessageReducer,\r\n Loader: LoaderReducer,\r\n FeatureFlags: FeatureFlagReducer,\r\n Notifications: NotificationReducer\r\n});","import { Store } from 'redux';\r\nimport { GlobalStore } from 'redux-micro-frontend';\r\nimport { PlatformReducer } from './platform.reducer';\r\nimport { IPlatformState } from './platform.state.model'\r\nimport { ActionLoggerAdapter } from './action.logger.adaptor';\r\nimport { ILogger as IFxpLogger } from '../../js/interfaces/ILogger';\r\nexport class PlatformStoreFactory {\r\n \r\n public static FxpStore: Store;\r\n static CreateIfNotExist(fxpLogger: IFxpLogger): Store {\r\n if (PlatformStoreFactory.FxpStore !== undefined && PlatformStoreFactory.FxpStore !== null) {\r\n return PlatformStoreFactory.FxpStore;\r\n }\r\n return this.Create(fxpLogger);\r\n }\r\n static Create(fxpLogger: IFxpLogger): Store {\r\n let actionLoggerAdaptor = fxpLogger !== undefined && fxpLogger !== null \r\n ? new ActionLoggerAdapter(fxpLogger)\r\n : null;\r\n \r\n let environment = window[\"FxpAppSettings\"].EnvironmentName;\r\n let debugMode = environment !== \"Production\";\r\n let globalStore = GlobalStore.Get(debugMode, actionLoggerAdaptor);\r\n if (actionLoggerAdaptor)\r\n globalStore.SetLogger(actionLoggerAdaptor);\r\n PlatformStoreFactory.FxpStore = globalStore.CreateStore(GlobalStore.Platform, PlatformReducer, [], [GlobalStore.AllowAll], false, true);\r\n return PlatformStoreFactory.FxpStore;\r\n }\r\n\r\n static Get(): Store {\r\n if (PlatformStoreFactory.FxpStore !== undefined && PlatformStoreFactory.FxpStore !== null) {\r\n return PlatformStoreFactory.FxpStore;\r\n }\r\n throw new Error(\"FXP Store hasn't been created\");\r\n }\r\n}","import { ISystemMessage } from \"./systemMessage.model\";\r\nimport { FxpConstants } from \"../../js/common/ApplicationConstants\";\r\nimport { FxpConfigurationService } from \"../../js/services/FxpConfiguration\";\r\nimport { SYSTEM_MESSAGE_UI } from \"../../js/constants/systemMessages.constants\";\r\nimport { ILogger } from \"../../js/interfaces/ILogger\";\r\nimport { TimeZoneHelper } from \"../../js/services/TimeZoneHelper\";\r\nimport { SystemMessagesService } from \"./SystemMessagesService\";\r\nimport { IRootScope } from \"../../js/interfaces/IRootScope\";\r\nimport { IFxPService } from \"../../js/interfaces/IFxpService\";\r\nimport { FxpSignalRService } from \"../../js/services/FxpSignalRClient\";\r\nimport { DashboardService } from \"../../js/services/dashboardService\";\r\nimport { FxpRouteService } from \"../../js/services/FxpRouteService\";\r\nimport { FxpGlobalStoreService } from \"../../js/services/fxp.global.store.service\";\r\nimport { IPlatformState } from \"../store/platform.state.model\";\r\nimport { TelemetryConstants } from \"../../js/telemetry/TelemetryConst\";\r\nimport { RemoveSystemMessage, UpsertSystemMessage } from \"./systemMessage.action\";\r\nimport { ErrorSeverityLevel } from \"../../js/telemetry/ErrorSeverityLevel\";\r\nimport { ErrorCodes } from \"../../js/constants/errorCodes\";\r\n\r\ndeclare var _: any;\r\n\r\nexport class PlannedDownTimeService implements IFxPService {\r\n\tprivate intervalTimeMinutes: number;\r\n\tprivate displayFlashBeforeMinutes: number;\r\n\tprivate errorCount = 0;\r\n\tprivate loadPromise: angular.IPromise;\r\n\tprivate plannedDownTimeCollection: Array = [];\r\n\r\n\tprivate systemAnnouncementCollection: Array = [];\r\n\tprivate isFlashVisible: boolean = false;\r\n\tprivate flashMessages: Array = [];\r\n\tprivate dismissedSysMessageIds: Array = [];\r\n\r\n\tpublic isSystemAnnouncementVisible: boolean = false;\r\n\tprivate systemAnnouncementMesage: string;\r\n\tprivate currentLeftNavItem: any;\r\n\tprivate systemDownMessage: string;\r\n\tprivate timeFormat = \"MM/DD/YYYY h:mm a z\";\r\n\tprivate unsubscribeFunction: any;\r\n\tprivate readonly signalREventName = \"onSystemMessageChange\";\r\n\tprivate readonly signalRTenant = \"FXP\";\r\n\tsourceForTelemetry: string = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.PlannedDownTimeService`;\r\n\r\n\tconstructor(private $timeout: any,\r\n\t\tprivate fxpConfiguration: FxpConfigurationService,\r\n\t\tprivate SystemMessagesService: SystemMessagesService,\r\n\t\tprivate TimeZoneHelper: TimeZoneHelper,\r\n\t\tprivate moment: any,\r\n\t\tprivate UiString: SYSTEM_MESSAGE_UI,\r\n\t\tprivate logger: ILogger,\r\n\t\tprivate $window: angular.IWindowService,\r\n\t\tprivate fxpSignalRService: FxpSignalRService,\r\n\t\tprivate dashboardService: DashboardService,\r\n\t\tprivate $rootScope: IRootScope,\r\n\t\tprivate fxpRouteService: FxpRouteService,\r\n\t\tprivate fxpGlobalStore: FxpGlobalStoreService) {\r\n\r\n\t\tthis.intervalTimeMinutes = fxpConfiguration.FxpAppSettings.FlashPollingIntervalInMinutes;\r\n\t\tthis.displayFlashBeforeMinutes = fxpConfiguration.FxpAppSettings.DisplayFlashBeforeMinutes;\r\n\t\t\r\n\t\tthis.dismissedSysMessageIds = localStorage['DismissedSystemMessages'] ? JSON.parse(localStorage['DismissedSystemMessages']) : [];\r\n\r\n\t\t// subscribe to platform state\r\n\t\tthis.fxpGlobalStore.SubscribeToPlatformState(\"Platform\", (platformState : IPlatformState) => {\r\n\t\t\tlet systemMessagesInState = platformState.SystemMessages;\r\n\t\t\tif(systemMessagesInState.length > 0) {\t\t\r\n\t\t\t\tthis.flashMessages = systemMessagesInState;\r\n\t\t\t\tthis.isFlashVisible = true;\r\n\t\t\t} else {\r\n\t\t\t\tthis.isFlashVisible = false;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\r\n\tpublic subscribeToSignalREvent() {\r\n\t\tif (!this.unsubscribeFunction) {\r\n\t\t\tthis.unsubscribeFunction = this.fxpSignalRService.subscribe(this.signalREventName, this.signalRTenant, this.onMessageFromSignalR.bind(this));\r\n\t\t}\r\n\t}\r\n\r\n\tpublic unsubscribeSignalREvent() {\r\n\t\tif (this.unsubscribeFunction) {\r\n\t\t\tthis.unsubscribeFunction();\r\n\t\t\tthis.unsubscribeFunction = null;\r\n\t\t}\r\n\t}\r\n\r\n\tprivate onMessageFromSignalR = function (response: any) {\r\n\t\tif (!response)\r\n\t\t\treturn;\r\n\r\n\t\tif (response.operation === \"edit\" || response.operation === \"delete\")\r\n\t\t\tthis.plannedDownTimeCollection = this.plannedDownTimeCollection.filter(x => x.id !== response.payLoadObject.id);\r\n\r\n\t\tthis.cleanSysMessageIdsInLocalStorage();\r\n\r\n\t\tif (response.operation === \"add\" || response.operation === \"edit\")\r\n\t\t\tthis.plannedDownTimeCollection = this.plannedDownTimeCollection.concat(response.payLoadObject);\r\n\r\n\t\t_.each(this.plannedDownTimeCollection, (item: ISystemMessage) => {\r\n\t\t\titem.startTime = this.TimeZoneHelper.convertUtcToLocal(this.moment.utc(item.startTime));\r\n\t\t\titem.endTime = this.TimeZoneHelper.convertUtcToLocal(this.moment.utc(item.endTime));\r\n\t\t});\r\n\r\n\t\tthis.updateFlash();\r\n\t}\r\n\r\n\tGetSystemAnnouncementMessageandUpdateFlash() {\r\n\t\tlet self = this;\r\n\t\tconst tenSeconds = 10000;\r\n\t\tself.$timeout(function () {\r\n\t\t\tself.SystemMessagesService.getSystemAnnoucementCollection()\r\n\t\t\t\t.then(onSystemAnnouncementSuccess.bind(self))\r\n\t\t\t\t.then(self.updateSystemAnnouncementFlash.bind(self))\r\n\t\t\t\t.catch(onRejected.bind(self));\r\n\t\t}, tenSeconds);\r\n\r\n\t\tfunction onSystemAnnouncementSuccess(response) {\r\n\t\t\tlet self = this;\r\n\r\n\t\t\tif (!response)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tself.systemAnnouncementCollection = response;\r\n\r\n\t\t\t_.each(self.systemAnnouncementCollection, (item: ISystemMessage) => {\r\n\t\t\t\titem.startTime = self.TimeZoneHelper.convertUtcToLocal(self.moment.utc(item.startTime));\r\n\t\t\t\titem.endTime = self.TimeZoneHelper.convertUtcToLocal(self.moment.utc(item.endTime));\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tfunction onRejected(error) {\r\n\t\t}\r\n\t}\r\n\r\n\tpollForPlannedDownTimesandUpdateFlash() {\r\n\t\tlet self = this;\r\n\t\tconst tenSeconds = 10000;\r\n\t\tself.$timeout(function () {\r\n\t\t\tself.SystemMessagesService.getPlannedDownTimeCollection()\r\n\t\t\t\t.then(onSuccess.bind(self))\r\n\t\t\t\t.then(self.updateFlash.bind(self))\r\n\t\t\t\t.catch(onRejected.bind(self))\r\n\t\t\t\t.finally(self.nextLoad.bind(self));\r\n\t\t}, tenSeconds);\r\n\r\n\t\tfunction onSuccess(response) {\r\n\t\t\tlet self = this;\r\n\r\n\t\t\tif (!response)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tself.plannedDownTimeCollection = response;\r\n\r\n\t\t\t_.each(self.plannedDownTimeCollection, (item: ISystemMessage) => {\r\n\t\t\t\titem.startTime = self.TimeZoneHelper.convertUtcToLocal(self.moment.utc(item.startTime));\r\n\t\t\t\titem.endTime = self.TimeZoneHelper.convertUtcToLocal(self.moment.utc(item.endTime));\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tfunction onRejected(error) {\r\n\t\t}\r\n\t};\r\n\r\n\tprivate pollForUpdateFlash() {\r\n\t\tlet self = this;\r\n\t\tself.updateFlash();\r\n\t\tself.nextLoad();\r\n\t}\r\n\r\n\tcancelNextLoad() {\r\n\t\tlet self = this;\r\n\t\tself.$timeout.cancel(self.loadPromise);\r\n\t};\r\n\r\n\tnextLoad() {\r\n\t\tlet self = this;\r\n\t\tself.cancelNextLoad();\r\n\t\tself.loadPromise = self.$timeout(self.pollForUpdateFlash.bind(self), self.intervalTimeMinutes * 60 * 1000);\r\n\t};\r\n\r\n\tpausePlannedDownTimesPoll() {\r\n\t\tvar self = this;\r\n\t\tif (self.loadPromise) {\r\n\t\t\tself.cancelNextLoad();\r\n\t\t}\r\n\t};\r\n\r\n\tresumePlannedDownTimesPoll() {\r\n\t\tvar self = this;\r\n\t\tself.pollForPlannedDownTimesandUpdateFlash();\r\n\t};\r\n\r\n\tupdateFlash() {\r\n\t\tlet self = this;\r\n\t\tif (!self.plannedDownTimeCollection || !self.currentLeftNavItem)\r\n\t\t\treturn;\r\n\r\n\t\tvar item = self.currentLeftNavItem;\r\n\t\tthis.isFlashVisible = false;\r\n\r\n\t\ttry {\r\n\t\t\tlet messagesToFlash: Array = [];\r\n\t\t\t_.each(self.plannedDownTimeCollection, (downTime: ISystemMessage) => {\r\n\t\t\t\tvar now = this.moment();\r\n\r\n\t\t\t\tif (self.isDownTimeConfigured(item, downTime)) {\r\n\t\t\t\t\t//Intermittent Message or Flash\r\n\t\t\t\t\tvar tempTime = downTime.startTime.clone();\r\n\t\t\t\t\tif (self.isSystemDown(downTime)) {\r\n\t\t\t\t\t\tthis.isFlashVisible = false;\r\n\t\t\t\t\t\tvar end = this.moment.tz(downTime.endTime, this.moment.tz.guess()).format(this.timeFormat);\r\n\t\t\t\t\t\tthis.systemDownMessage = downTime.message;\r\n\t\t\t\t\t\t//If any of the system down time message is active then break the loop.\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (now.isSameOrAfter(tempTime.subtract(self.displayFlashBeforeMinutes, \"minutes\"))\r\n\t\t\t\t\t\t&& now.isSameOrBefore(downTime.endTime)) {\r\n\t\t\t\t\t\t// check for the messageId in the localStorage, push if the id is not found.\r\n\t\t\t\t\t\tif(!this.dismissedSysMessageIds.includes(downTime.id)) {\r\n\t\t\t\t\t\t\tmessagesToFlash.push(downTime);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t});\r\n\t\t\tthis.fxpGlobalStore.DispatchGlobalAction(\"Platform\", UpsertSystemMessage(messagesToFlash));\r\n\t\t}\r\n\t\tcatch (e) {\r\n \t\tself.logger.logException(`${this.sourceForTelemetry}.UpdateFlash`, e, null, null, null, ErrorSeverityLevel.Medium, ErrorCodes.PlannedDownTime_UpdateFlash_Failure);\r\n\t\t}\r\n\r\n\t};\r\n\r\n\tupdateSystemAnnouncementFlash() {\r\n\t\tlet self = this;\r\n\t\tif (!self.systemAnnouncementCollection || !self.currentLeftNavItem)\r\n\t\t\treturn;\r\n\r\n\t\tvar item = self.currentLeftNavItem;\r\n\t\tthis.systemAnnouncementMesage = '';\r\n\t\tthis.isSystemAnnouncementVisible = false;\r\n\r\n\t\ttry {\r\n\t\t\t_.each(self.systemAnnouncementCollection, (downTime: ISystemMessage) => {\r\n\t\t\t\tvar now = this.moment();\r\n\r\n\t\t\t\tif (self.isDownTimeConfigured(item, downTime)) {\r\n\t\t\t\t\t//Intermittent Message or Flash\r\n\t\t\t\t\tvar tempTime = downTime.startTime.clone();\r\n\t\t\t\t\tif (now.isSameOrAfter(tempTime.subtract(self.displayFlashBeforeMinutes, \"minutes\"))\r\n\t\t\t\t\t\t&& now.isSameOrBefore(downTime.endTime)) {\r\n\r\n\t\t\t\t\t\tthis.systemAnnouncementMesage = self.concatenateFlashMessage(this.systemAnnouncementMesage, downTime);\r\n\t\t\t\t\t\tthis.isSystemAnnouncementVisible = true;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\tcatch (e) {\r\n\t\t\tself.logger.logException(`${this.sourceForTelemetry}.UpdateSystemAnnouncementFlash`, e, null, null, null, ErrorSeverityLevel.Medium, ErrorCodes.PlannedDownTime_UpdateSystemAccouncement_Failure);\r\n\t\t}\r\n\t};\r\n\r\n\tisDownTimeConfigured(item: any, downTime: ISystemMessage) {\r\n\r\n\t\t//Return true when capability is All. Id for All is 0.\r\n\t\tif (downTime.businessCapability[0].id == 0) {\r\n\t\t\treturn true;\r\n\t\t} else if (this.isMessageConfiguredOnLeftNav(item, downTime)) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\tvar leftNavLinks = this.dashboardService.getCachedLeftNavForCurrentUser();\r\n\t\t\tif (leftNavLinks === undefined || leftNavLinks === null || leftNavLinks.length <= 0)\r\n\t\t\t\treturn false;\r\n\t\t\tvar dashboardItem = leftNavLinks.find(item => item.id == 100);\r\n\t\t\tif(dashboardItem)\r\n\t\t\t\tdashboardItem.targetUIStateName = this.fxpRouteService.getDefaultStateName();\r\n\t\t\t\r\n\t\t\tvar leftNavItemsWithCurrentState = leftNavLinks.filter(function (leftNav) {\r\n\t\t\t\treturn (leftNav.targetUIStateName && leftNav.targetUIStateName.toLowerCase() === item.targetUIStateName.toLowerCase());\r\n\t\t\t});\r\n\t\t\tif (leftNavItemsWithCurrentState === undefined || leftNavItemsWithCurrentState === null || leftNavItemsWithCurrentState.length <= 0)\r\n\t\t\t\treturn false;\r\n\t\t\tlet isSystemMessageVisible = false;\r\n\t\t\tleftNavItemsWithCurrentState.forEach(selectedItem => {\r\n\t\t\t\tif (this.isMessageConfiguredOnLeftNav(selectedItem, downTime))\r\n\t\t\t\t\tisSystemMessageVisible = true;\r\n\t\t\t});\r\n\t\t\treturn isSystemMessageVisible;\r\n\t\t}\r\n\t}\r\n\r\n\tprivate isMessageConfiguredOnLeftNav(item: any, downTime: ISystemMessage) {\r\n\t\treturn (item.id == downTime.businessCapability[0].id\r\n\t\t\t|| (downTime.businessFunction.length > 0\r\n\t\t\t\t&& item.id == downTime.businessFunction[0].id)\r\n\t\t\t|| (item.parentId == downTime.businessCapability[0].id\r\n\t\t\t\t&& downTime.businessFunction[0].id == 0));\r\n\t}\r\n\r\n\tisSystemDown(downTime: ISystemMessage) {\r\n\t\tvar now = this.moment();\r\n\r\n\t\tif (downTime.messageType == \"SystemDown\"\r\n\t\t\t&& now.isAfter(downTime.startTime)\r\n\t\t\t&& now.isSameOrBefore(downTime.endTime))\r\n\t\t\treturn true;\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tconcatenateFlashMessage(message: string, downTime: ISystemMessage) {\r\n\t\tlet tempMessage = message;\r\n\r\n\t\tif (tempMessage != '')\r\n\t\t\ttempMessage = tempMessage + '
';\r\n\r\n\t\ttempMessage = tempMessage + downTime.message;\r\n\r\n\t\treturn tempMessage;\r\n\t}\r\n\r\n\tisStateDown(stateName) {\r\n\t\tvar self = this;\r\n\r\n\t\tif (!self.plannedDownTimeCollection || !self.currentLeftNavItem)\r\n\t\t\treturn false;\r\n\r\n\t\tvar item = self.currentLeftNavItem;\r\n\t\tvar systemDown = false;\r\n\r\n\t\t_.each(self.plannedDownTimeCollection, (downTime: ISystemMessage) => {\r\n\r\n\t\t\tif (self.isDownTimeConfigured(item, downTime)) {\r\n\t\t\t\tif (self.isSystemDown(downTime)) {\r\n\r\n\t\t\t\t\tvar downStateName = item.targetUIStateName || item.targetURL || item.targetEventName;\r\n\r\n\t\t\t\t\tif (stateName == downStateName) {\r\n\t\t\t\t\t\tsystemDown = true;\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn systemDown;\r\n\t}\r\n\r\n\tcloseSystemAnnouncement() {\r\n\t\tvar self = this;\r\n\t\tself.isSystemAnnouncementVisible = false;\r\n\t\tself.$rootScope.isSystemAnnouncementVisible = false;\r\n\t}\r\n\r\n\t/**\r\n\t * Closes the specific SytemMessage when dismissed. \r\n\t * @param messageId - id of the System Message to be removed\r\n\t */\r\n\tprivate closeSystemMessage(messageId) {\r\n\t\tvar self = this;\r\n\t\t// push the messageId to the dismissedSystemMessages in local storage.\r\n\t\tthis.dismissedSysMessageIds.push(messageId)\r\n\t\tlocalStorage['DismissedSystemMessages'] = JSON.stringify(this.dismissedSysMessageIds);\r\n\t\tself.fxpGlobalStore.DispatchGlobalAction(\"Platform\", RemoveSystemMessage(messageId));\r\n\t}\r\n\r\n\t/**\r\n\t * Cleans the dismissedSysMessageId in local storage by comparing with plannedDownTimeCollection. \r\n\t */\r\n\tprivate cleanSysMessageIdsInLocalStorage() {\r\n\t\tthis.dismissedSysMessageIds = this.dismissedSysMessageIds.filter(id => this.plannedDownTimeCollection.some(sysMessage => sysMessage.id === id));\r\n\t\tlocalStorage['DismissedSystemMessages'] = JSON.stringify(this.dismissedSysMessageIds);\r\n\t}\r\n}\r\n","import { ISystemMessagesService } from \"./ISystemMessagesService\";\r\nimport { FxpConfigurationService } from \"../../js/services/FxpConfiguration\";\r\nimport { ISystemMessage } from \"./systemMessage.model\";\r\nimport { UserInfoService } from \"../../js/services/UserInfoService\";\r\nimport { IHttpPromise, IPromise } from \"angular\";\r\nimport { IFxPService } from \"../../js/interfaces/IFxpService\";\r\n\r\nexport class SystemMessagesService implements ISystemMessagesService,IFxPService {\r\n\tprivate systemMessagesEndPoint: string;\r\n\tprivate allSystemMessagesEndpoint: string[];\r\n\r\n\tprivate allSystemAnnouncementEndpoints: string[];\r\n\r\n\tconstructor(private http: angular.IHttpService,\r\n\t\tprivate fxpConfiguration: FxpConfigurationService, private $q: angular.IQService, private userInfoService: UserInfoService) {\r\n\t\tthis.systemMessagesEndPoint = this.fxpConfiguration.FxpAppSettings.FxpServiceEndPoint + \"/systemmessages\";\r\n\t\tthis.allSystemMessagesEndpoint = this.fxpConfiguration.FxpAppSettings.SystemMessageEndpoints.split(',');\r\n\t\tthis.allSystemAnnouncementEndpoints = this.fxpConfiguration.FxpAppSettings.SystemAnnouncementEndpoints.split(',');\r\n\t}\r\n\r\n\tgetSystemMessagesCollectionAsync = (messageCount: number, pageOffset: number, sortOrder: string): IHttpPromise> => {\r\n\t\tlet params = {\r\n\t\t\t'pageSize': messageCount,\r\n\t\t\t'pageNo': pageOffset,\r\n\t\t\t'sortOrder': sortOrder\r\n\t\t};\r\n\t\treturn this.http.get(this.systemMessagesEndPoint, { params: params });\r\n\t}\r\n\r\n\tsaveSystemMessageAsync = (systemMessage: ISystemMessage): IPromise => {\r\n\t\treturn this.http.post(this.systemMessagesEndPoint, systemMessage, { headers: { 'Content-Type': 'application/json' } });\r\n\t}\r\n\r\n\tdeleteSystemMessageAsync = (systemMessageId: string): IPromise => {\r\n\t\tlet params = { 'id': systemMessageId };\r\n\t\treturn this.http.delete(this.systemMessagesEndPoint, { params: params });\r\n\t}\r\n\r\n\tgetPlannedDownTimeCollection = (): IPromise> => {\r\n\t\tlet promises : Array>> = [];\r\n\t\tlet self = this;\r\n\t\tself.allSystemMessagesEndpoint.forEach(endpoint => { promises.push(this.getSystemMessages(endpoint))})\r\n\t\treturn this.$q.all(promises).then((results: Array>) => {\r\n\t\t\treturn results.reduce((acc, val) => acc.concat(val), []);\r\n\t\t});\r\n\t}\r\n\r\n\tgetSystemAnnoucementCollection = (): IPromise> => {\r\n\t\tlet promises : Array>> = [];\r\n\t\tlet self = this;\r\n\t\tlet userAlias = self.userInfoService.getLoggedInUser();\r\n\t\tlet requestHeaders = {};\r\n\t\trequestHeaders[\"x-alias\"] = userAlias;\r\n\t\tself.allSystemAnnouncementEndpoints.forEach(endpoint => { promises.push(this.getSystemMessages(endpoint, requestHeaders))})\r\n\t\treturn this.$q.all(promises).then((results: Array>) => {\r\n\t\t\t// append all the api results in a single array\r\n\t\t\treturn results.reduce((acc, val) => acc.concat(val), []);\r\n\t\t});\r\n\t}\r\n\r\n\tgetSystemMessages(url: string, headers?: any) : IPromise> {\r\n\t\treturn this.http.get(url, { headers: headers })\r\n\t\t\t.then(response => (response.data).systemMessages);\r\n\t}\r\n}","import { IAction } from 'redux-micro-frontend';\r\nimport { SystemMessageActions } from \"./systemMessage.action.types\";\r\nimport { ISystemMessage } from \"./systemMessage.model\";\r\n\r\nexport const UpsertSystemMessage = (payload: Array): IAction> => {\r\n return { \r\n type: SystemMessageActions.UPSERT_SYSTEM_MESSAGE,\r\n payload: payload\r\n } \r\n}\r\n\r\nexport const RemoveSystemMessage = (payload: string): IAction => {\r\n return {\r\n type: SystemMessageActions.REMOVE_SYSTEM_MESSAGE,\r\n payload: payload\r\n }\r\n}","export enum SystemMessageActions {\r\n UPSERT_SYSTEM_MESSAGE = \"UPSERT_SYSTEM_MESSAGE\",\r\n REMOVE_SYSTEM_MESSAGE = \"REMOVE_SYSTEM_MESSAGE\"\r\n}","import { IAction } from 'redux-micro-frontend';\r\nimport { Reducer } from \"redux\";\r\nimport { SystemMessageActions } from \"./systemMessage.action.types\";\r\nimport { ISystemMessage } from \"./systemMessage.model\";\r\n\r\n\r\nlet defaultState: Array = [];\r\n\r\nexport const SystemMessageReducer: Reducer, IAction | string>> = (\r\n state: Array = defaultState,\r\n action: IAction\r\n): Array => {\r\n\r\n switch(action.type) {\r\n case SystemMessageActions.UPSERT_SYSTEM_MESSAGE: {\r\n return (action.payload === undefined || action.payload === null) ? defaultState : action.payload; \r\n }\r\n case SystemMessageActions.REMOVE_SYSTEM_MESSAGE: {\r\n return state.filter(message => message.id !== action.payload)\r\n }\r\n }\r\n return state;\r\n}\r\n","import { ProfileReducer } from '../profile/profile.reducer';\r\nimport { Reducer, combineReducers } from 'redux';\r\nimport { ClaimsReducer } from '../claims/claims.reducer';\r\nimport { User } from './user.state.model';\r\nimport { IAction } from 'redux-micro-frontend';\r\nimport { Claims } from '../claims/claims.model';\r\nimport { ClaimsActionTypes } from '../claims/claims.action.types';\r\nimport { ProfileActionTypes } from '../profile/profile.action.types';\r\nimport { Profile } from '../profile/profile.model';\r\nvar defaultUser: User = {\r\n Profile: {} as Profile,\r\n Claims: {} as Claims\r\n}\r\nexport const LoggedInUserReducer: Reducer> = (\r\n state: User = defaultUser,\r\n action: IAction): User => {\r\n if (action.type == ClaimsActionTypes.ADD_LOGGED_IN_USER_CLAIMS || action.type == ProfileActionTypes.ADD_LOGGED_IN_USER_PROFILE) {\r\n\r\n return {\r\n Profile: ProfileReducer(state.Profile, action),\r\n Claims: ClaimsReducer(state.Claims, action)\r\n }\r\n }\r\n return state;\r\n}\r\nexport const CurrentUserReducer: Reducer> = (\r\n state: User = defaultUser,\r\n action: IAction): User => {\r\n if (action.type == ClaimsActionTypes.ADD_CURRENT_USER_CLAIMS || action.type ==ProfileActionTypes.ADD_CURRENT_USER_PROFILE) {\r\n\r\n return {\r\n Profile: ProfileReducer(state.Profile, action),\r\n Claims: ClaimsReducer(state.Claims, action)\r\n }\r\n }\r\n return state;\r\n}","import { TelemetryConstants } from \"../telemetry/TelemetryConst\";\r\n\r\nexport class CustomEvents {\r\n\tpublic static UserSessionCreated: string = 'UserSessionCreated';\r\n\tpublic static FxpAppLaunched: string = 'FxpAppLaunched';\r\n\tpublic static StartUpFlagRetrieved = 'StartUpFlagRetrieved';\r\n\tpublic static PageTourFlagRetrieved = 'PageTourFlagRetrieved';\r\n\tpublic static SkypeBotInit = 'SkypeBotInit';\r\n\tpublic static ProfileNotFound = 'ProfileNotFound';\r\n\tpublic static RedirectedToSales = 'RedirectedToSales';\r\n\tpublic static OnProfileFromGraphAPI = 'OnProfileFromGraphAPI';\r\n}\r\n\r\nexport class ApplicationConstants {\r\n\tpublic static Application = \"Application\";\r\n\tpublic static Global = \"Global\";\r\n\tpublic static GlobalContextDBName: string = 'globalV3';\r\n\tpublic static BootApiUrl = \"/Home/GetClientSideConfiguration\";\r\n\tpublic static WorkerFilepath = \"../js/webworker/fxpwebworker.js\";\r\n\tpublic static BaseConfigDBName = \"BaseConfigDB\";\r\n\tpublic static PersonaConfigByRoleGroupId = \"/Home/GetConfiguration\";\r\n\t/*Added for partner Login : OPS is expecting \"Partners~user\" for getBasicprofile api */\r\n\tpublic static PartnerDomain = \"Partners~\";\r\n\tpublic static PartnerDomainIss = \"https://sts.windows.net/a5f51bc5-4d47-4954-a546-bafe55e8db16/\";\r\n\tpublic static UserProfile = \"UserInfo\";\r\n\tpublic static UIConfigDB = \"UIConfigDB\";\r\n\tpublic static UserInfo = \"userInfo\";\r\n\tpublic static UserClaims = \"userClaims\";\r\n\tpublic static BaseUrl = \"BaseUrl\";\r\n\tpublic static FxpBaseUrl = \"https://\" + window.location.host;\r\n\tpublic static AssetsUrl = \"AssetsUrl\";\r\n\tpublic static ProfileStateName = \"profile\";\r\n\tpublic static ErrorStateNames = [\"oneprofile.customErrorPage\", \"unauthorized\"];\r\n\tpublic static RequiredMessage = \"{0} is required\";\r\n\tpublic static CouchBaseLoginContract = \"api/Login?dbName=\";\r\n\tpublic static FxpSessionKey = \"FxpSessionId\";\r\n\tpublic static FxpApplaunchedKey = \"FxpAppLaunched\";\r\n\tpublic static RequestStateName = \"REQSTATE\";\r\n\tpublic static FxpBreadcrumbStorageKey = \"FxpBreadCrumb\";\r\n\tpublic static PageTourFeature = \"PageTour\";\r\n\tpublic static UserPreferencesSettings = \"UserPreferences\";\r\n\tpublic static FxPAppName = \"FxP\";\r\n\tpublic static FxPDbName = \"FxPV2\";\r\n\tpublic static UserPreferencesStorageKey = \"{0}-preferences\";\r\n\tpublic static PageTourLoggerService = \"FxpLoggerService\";\r\n\tpublic static FxpAdminData = \"AdminTilesData\";\r\n\tpublic static SnowRequestTypeSettings = \"SnowRequestType\";\r\n\tpublic static ESTenanatUrlString = \"ESXP\";\r\n\tpublic static SalesTenantUrlString = \"li360\";\r\n\tpublic static XUserClaimsToken = \"X-UserClaimsToken\";\r\n\tpublic static XTenantId = \"X-TenantId\";\r\n\tpublic static XResources = \"X-Resources\";\r\n\tpublic static GraphApiProfileUrl = \"myorganization/me?api-version=1.6\";\r\n\tpublic static DefaultHelpLink = \"Default\";\r\n\tpublic static AdalLoginError = \"AdalLoginError\";\r\n\tpublic static AdalLoginRequest = \"AdalLoginRequest\";\r\n\tpublic static XUserProfileToken =\"X-UserProfileToken\";\r\n\tpublic static FlightingStatusHeader =\"X-Flighting-Call-Status\";\r\n\tpublic static signalRTenant = \"FXP\";\r\n\tpublic static PIIFilterRegex = `[\"Bearer\\\\\\\\sey[^\\\\\"'\\\\\\\\s,]+\"]`\r\n\tpublic static ProfileFlyoutConfig = \"[{\\\"experience\\\":\\\"r360wbExperience\\\",\\\"featureFlag\\\":\\\"VERGE__R360wbflag\\\",\\\"link\\\":\\\"#/myprofile\\\",\\\"displayName\\\":\\\"Manage Profile\\\",\\\"tooltip\\\":\\\"Click to manage profile\\\",\\\"isEnabled\\\":false,\\\"target\\\":\\\"_self\\\",\\\"popoutIcon\\\":false},{\\\"experience\\\":\\\"basicProfileExperience\\\",\\\"featureFlag\\\":\\\"VERGE__R360wbflag\\\",\\\"link\\\":\\\"#/profile/{userAlias}/basic\\\",\\\"displayName\\\":\\\"View Full Profile\\\",\\\"tooltip\\\":\\\"Click to view profile\\\",\\\"isEnabled\\\":false,\\\"target\\\":\\\"_self\\\",\\\"popoutIcon\\\":false}]\";\r\n}\r\n\r\nexport class FxpConstants {\r\n\tpublic static messageType = {\r\n\t\terror: \"error\",\r\n\t\twarning: \"warning\",\r\n\t\tinfo: \"info\",\r\n\t\tsuccess: \"success\",\r\n\t\treload: \"reload\"\r\n\t};\r\n\r\n\tpublic static CONST = {\r\n\t\tfxpUserClaimsSession: \"fxpUserClaims\",\r\n\t\tString: \"string\" \r\n\t};\r\n\r\n\tpublic static StateEvents = {\r\n\t\tOnStart: 1,\r\n\t\tonSuccess: 2,\r\n\t\tonError: 3,\r\n\t\tonInvalid: 4\r\n\t}\r\n\r\n\tpublic static metricConstants = {\r\n\t\tGetBasicProfileSvcName: \"Get Basic Profile Service\",\r\n\t\tGetUserClaimsSvcName: \"Get User Claims Service\",\r\n\t\tFXPApplicationLaunchMetric: \"FXP Application Launch Metric\",\r\n\t\tFXPApplicationLaunchTimeMetric: `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.FXPApplicationLaunchMetric`,\r\n\t\tUserClaimsResponseTime: `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.UserClaimsResponseTime`,\r\n\t\tUserClaimsResponseTimeError: `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.UserClaimsResponseTimeError`,\r\n\t\tStatus: \"Status\",\r\n\t\tCurrentTime: \"CurrentTime\",\r\n\t\tStatusText: \"StatusText\",\r\n\t\tStartTime: \"StartTime\",\r\n\t\tEndTime: \"EndTime\",\r\n\t\tServiceName: \"ServiceName\",\r\n\t\tServiceURL: \"ServiceURL\",\r\n\t\tUserAgent: \"UserAgent\",\r\n\t\tUserProfileService: `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.UserProfileService`,\r\n\t\tFxpAppLaunch: \"Fxp.AppLaunch\",\r\n\t\tSessionId: \"SessionId\",\r\n\t\tUserUPN: \"UserUPN\",\r\n\t\tUserBusinessRole: \"UserBusinessRole\",\r\n\t\tGeography: \"Geography\",\r\n\t\tBrowserAgent: \"BrowserAgent\",\r\n\t\tSearchProfileServiceTime: `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.SearchProfileServiceResponseTime`,\r\n\t\tSearchProfileServiceErrorTime: `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.SearchProfileServiceResponseTime-Error`,\r\n\t\tAdminPersonalizationUserNavLinksCount: `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.AdminPersonalizationUserNavLinksCount`,\r\n\t\tFxpLoadDuration: `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.FxpLoadDuration`,\r\n\t\tsearchProfileSvcName: \"Search Profile Service\",\r\n\t\tTimeStamp: \"TimeStamp\",\r\n\t\tL0BusinessProcessName: \"L0BusinessProcessName\",\r\n\t\tL0Name: \"L0Name\",\r\n\t\tL0Name_L1Name: \"L0Name_L1Name\",\r\n\t\tUserRoleGroup: \"UserRoleGroup\",\r\n\t\tLeftNavigationClickCountbyRoleGroup: `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.LeftNavigationClickCountbyRoleGroup`,\r\n\t\tLeftNavigationClickCountbyRole: `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.LeftNavigationClickCountbyRole`,\r\n\t\tRequestedUserAlias: \"RequestedUserAlias\",\r\n\t\tRequestedUserRoleGroupId: \"RequestedUserRoleGroupId\",\r\n\t\tScreenRoute: \"ScreenRoute\",\r\n\t\tFeedbackType: \"FeedbackType\",\r\n\t\tAction: \"Action\",\r\n\t\tUserFeedback: \"UserFeedback\",\r\n\t\tUserFeedbackErrorMessage: \"UserFeedbackErrorMessage\",\r\n\t\tOBOUserRoleGroupName: \"OBOUserRoleGroupName\",\r\n\t\tOBOUserBusinessRole: \"OBOUserBusinessRole\",\r\n\t\tOBOUserUPN: \"OBOUserUPN\",\r\n\t\tBreadcrumbString: \"BreadcrumbString\",\r\n\t\tBrowserPageTitle: \"BrowserPageTitle\",\r\n\t\tLoggedinUserName: \"UserName\",\r\n\t\tOBOUserName: \"OBOUserName\",\r\n\t\tOperatingSystem: \"OperatingSystem\",\r\n\t\tBrowserType: \"BrowserType\",\r\n\t\tBrowserVersion: \"BrowserVersion\",\r\n\t\tDeviceType: \"DeviceType\",\r\n\t\tTotalDuration: \"TotalDuration\",\r\n\t\tUIRenderDuration: \"UIRenderDuration\",\r\n\t\tLeftNavPinStatus: \"LeftNavPinStatus\",\r\n\t\tGetSettingsAPIResponseDuration: \"GetSettingsAPIResponseDuration\",\r\n\t\tSaveSettingsAPIResponseDuration: \"SaveSettingsAPIResponseDuration\",\r\n\t\tModifiedRoleGroupName: \"ModifiedRoleGroupName\",\r\n\t\tModifiedRoleGroupID: \"ModifiedRoleGroupID\",\r\n\t\tModifiedBusinessRoleName: \"ModifiedBusinessRoleName\",\r\n\t\tModifiedBusinessRoleID: \"ModifiedBusinessRoleID\",\r\n\t\tOBOUserAlias: \"OBOUserAlias\",\r\n\t\tLeftNavLinksValueBeforeModification: \"LeftNavLinksValueBeforeModification\",\r\n\t\tLeftNavLinksValueAfterModification: \"LeftNavLinksValueAfterModification\",\r\n\t\tErrorUrl: \"ErrorUrl\",\r\n\t\tGlobalErrorDetail: \"ErrorDetails\",\r\n\t\tFooterLinkUrl: \"FooterLinkUrl\",\r\n\t\tFooterLinkName: \"FooterLinkName\",\r\n\t\tHeaderClickNavigatedStateName: \"NavigatedStateName\",\r\n\t\tHeaderClickNavigatedStateTemplateURL: \"NavigatedStateTemplateURL\",\r\n\t\tMiniProfileIconClick: \"MiniProfileIconClick\",\r\n\t\tProfileLinkClick: \"ProfileLinkClick\",\r\n\t\tChatIconClick: \"ChatIconClick\",\r\n\t\tMailIconClick: \"MailIconClick\",\r\n\t\tHelpLinkParent: \"HelpLinkParent\",\r\n\t\tHelpLinkChild: \"HelpLinkChild\",\r\n\t\tHelpIconClicked: \"HelpIconClicked\",\r\n\t\tHelpView: \"HelpView\",\r\n\t\tErrorText: \"ErrorText\",\r\n\t\tUserPorfileServiceEndPoint:\"User Porfile Service EndPoint\",\r\n\t\tIsLoginRequired: \"IsLoginRequired\",\r\n\t\tError: \"Error\",\r\n\t\tIsCSABlockedUser: \"IsCSABlockedUser\",\r\n\t\tModuleBootstrapping: `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.ModuleBootstrapping`\r\n\t};\r\n\r\n\tpublic static OBOConstants =\r\n\t\t{\r\n\t\t\tOnBehalfOfUserName: \"OnBehalfOfUserName\",\r\n\t\t\tOnBehalfOfUserAlias: \"OnBehalfOfUserAlias\",\r\n\t\t\tOnBehalfOfUserUpn: \"OnBehalfOfUserUpn\",\r\n\t\t\tActonBehalfMode: \"ActonBehalfMode\",\r\n\t\t\tOnBehalfOfUserBusinessRoleId: \"OnBehalfOfUserBusinessRoleId\",\r\n\t\t\tOnBehalfOfUserBusinessRole: \"OnBehalfOfUserBusinessRole\",\r\n\t\t\tOnBehalfOfUserRoleGroup: \"OnBehalfOfUserRoleGroup\",\r\n\t\t\tAdminActOnBehaflOfDuratoin: \"AdminActOnBehaflOfDuratoin\",\r\n\t\t\tActonBehalfofAdminStartTime: \"ActonBehalfofAdminStartTime\",\r\n\t\t\tActonBehalfofAdminEndTime: \"ActonBehalfofAdminEndTime\"\r\n\t\t};\r\n\tpublic static ActionTypes =\r\n\t\t{\r\n\t\t\tAdd: \"AddedItems\",\r\n\t\t\tSave: \"Save\",\r\n\t\t\tSubmit: \"Submit\",\r\n\t\t\tRemove: \"RemovedItems\",\r\n\t\t\tCancel: \"Cancel\",\r\n\t\t\tClick: \"Click\"\r\n\t\t};\r\n\tpublic static keyCodes =\r\n\t\t{\r\n\t\t\tescapeKey: 27,\r\n\t\t\tarrowRightKey: 39,\r\n\t\t\tarrowLeftKey: 37,\r\n\t\t\tarrowDownKey: 40,\r\n\t\t\tarrowUpKey: 38,\r\n\t\t\tenterKey: 13,\r\n\t\t\ttabKey: 9,\r\n\t\t\tspaceBar: 32\r\n\t\t};\r\n\tpublic static applicableDevice = {\r\n\t\tdesktop: \"Desktop\",\r\n\t\tmobile: \"Mobile\",\r\n\t\tall: \"All\"\r\n\t};\r\n\tpublic static BreadcrumbEventType = {\r\n\t\tBreadcrumbLoad: \"BreadcrumbLoad\",\r\n\t\tBreadcrumbClick: \"BreadcrumbClick\"\r\n\t};\r\n\tpublic static askOps = {\r\n\t\tcreateLink: \"createAskOpsRequest\",\r\n\t\tviewLink: \"https://microsoft.service-now.com/it/my_items.do?view=open_items\"\r\n\t};\r\n}\r\n\r\nexport class PerfMarkers {\r\n\tpublic static FxpLoad = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.FxpLoad`;\r\n\tpublic static GetUserClaims = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.GetUserClaims`;\r\n\tpublic static GetUserThumbnail = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.GetUserThumbnail`;\r\n\tpublic static GetBasicProfileWithAdal = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.GetBasicProfileWithAdal`;\r\n\tpublic static AdalTimeGetBasicProfile = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.AdalTimeGetBasicProfile`;\r\n\tpublic static DashboardLoad = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.DashboardLoad`;\r\n\tpublic static LoadRoutes = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.LoadRoutes`;\r\n\tpublic static PreDashboardLoad = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.PreDashboardLoad`;\r\n\tpublic static SavePersonalizedNavItems = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.SavePersonalizedNavItems`;\r\n\tpublic static SaveRoleGroupPersonalizedNavItems = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.SaveRoleGroupPersonalizedNavItems`;\r\n\tpublic static GetPersonalizedNavItems = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.GetPersonalizedNavItems`;\r\n\tpublic static GetMasterLeftNavItems = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.GetMasterLeftNavItems`;\r\n\tpublic static SendUserFeedback = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.SendUserFeedback`;\r\n\tpublic static GetRoleGroupDetails = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.GetRoleGroupDetails`;\r\n\r\n\tpublic static GetLeftNavData = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.GetLeftNavData`;\r\n\tpublic static GetAdminDataFromServer = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.GetAdminDataFromServer` ;\r\n\tpublic static GetTenantClaims = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.GetTenantClaims`;\r\n}\r\n\r\nexport class RoleGroupInfo {\r\n\tpublic static RoleGroupId = \"RoleGroupId\";\r\n\tpublic static RoleGroupName = \"RoleGroupName\";\r\n}\r\n\r\nexport class TenantInfo {\r\n\tpublic static TenantKey = \"TenantKey\";\r\n\tpublic static TenantName = \"TenantName\";\r\n}","import { IPouchDbService } from \"../interfaces/ipouchdbservice\";\r\nimport { PouchDbConnection } from \"./PouchDbConnection\";\r\nimport { IPouchDBProvider } from \"../interfaces/IPouchDBProvider\";\r\nimport { PouchDbService } from \"./PouchDbService\";\r\n\r\n\r\n/**\r\n* A service which provides PouchDb Connection\r\n* @class Fxp.Common.PouchDBProvider\r\n* @classdesc A service which provides PouchDb Connection\r\n* @example Example to create an instance of Fxp PouchDBProvider \r\n* //Initializing Fxp Message\r\n* angular.module('FxPApp').service('FxpContextService', ['PouchDBProvider', FxpContext]);\r\n* function FxpContext(PouchDBProvider){ PouchDBProvider.getDBConnection(Fxp.Common.Constants.ApplicationConstants.GlobalContextDBName)}\r\n*/\r\nexport class PouchDBProvider implements IPouchDBProvider {\r\n\r\n\tconstructor() { }\r\n\r\n\t/**\r\n * Saves the current value in PouchDB using specified key and returns a Javascript Promise\r\n * @method Fxp.Context.FxpContext#saveContext\r\n * @param {string} applicationName The name of the DB for which connection object has to be fetched \r\n * @example Example to use getDBConnection\r\n * PouchDBProvider.getDBConnection(Fxp.Common.Constants.ApplicationConstants.GlobalContextDBName)\r\n */\r\n\tgetDBConnection(applicationName: string): IPouchDbService {\r\n\t\tvar DbConnection = new PouchDbConnection();\r\n\t\tDbConnection.createDatabase(applicationName);\r\n\t\treturn new PouchDbService(applicationName, DbConnection);\r\n\t}\r\n}","import { IPouchDbConnection } from \"../interfaces/IPouchDbConnection\";\r\n\r\ndeclare var PouchDB: any;\r\n\r\nexport class PouchDbConnection implements IPouchDbConnection {\r\n\r\n\tpublic destroy(localDatabaseName: string) {\r\n\t\tvar database = new PouchDB(localDatabaseName);\r\n\t\tdatabase.destroy();\r\n\t};\r\n\r\n\tpublic createDatabase(localDatabaseName: string) {\r\n\t\tvar database = new PouchDB(localDatabaseName);\r\n\t};\r\n\r\n\tpublic getDatabase(localDatabaseName: string): any {\r\n\t\tvar database = new PouchDB(localDatabaseName);\r\n\t\treturn database;\r\n\t};\r\n\r\n\r\n}","import { IPouchDbService } from \"../interfaces/ipouchdbservice\";\r\nimport { IPouchDbConnection } from \"../interfaces/IPouchDbConnection\";\r\n\r\nexport class PouchDbService implements IPouchDbService {\r\n\tprivate _database: any;\r\n\tprivate _localDbName: string;\r\n\tprivate _docId: string = \"\";\r\n\r\n\tconstructor(localDatabaseName: string, pouchDbConnection: IPouchDbConnection) {\r\n\t\tthis._localDbName = localDatabaseName;\r\n\t\tthis._database = pouchDbConnection.getDatabase(localDatabaseName);\r\n\t}\r\n\r\n\tpublic save(jsonDocument: string): angular.IPromise {\r\n\t\tvar jsonDoc = JSON.parse(jsonDocument);\r\n\t\treturn this._database.post(jsonDoc);\r\n\t};\r\n\r\n\tpublic delete(documentId: string, documentRevision: string) {\r\n\t\treturn this._database.remove(documentId, documentRevision);\r\n\t};\r\n\r\n\tpublic saveUpdateDocument(jsonDocument: string, documentId: string): angular.IPromise {\r\n\t\tvar jsonDoc = JSON.parse(jsonDocument);\r\n\t\treturn this._database.put(jsonDoc, documentId);\r\n\t};\r\n\r\n\tpublic getAllDocuments(options: any = {}): angular.IPromise {\r\n\t\treturn this._database.allDocs(options);\r\n\t};\r\n\r\n\tpublic get(documentId: string): angular.IPromise {\r\n\t\treturn this._database.get(documentId);\r\n\t};\r\n}","export enum SettingsType {\r\n\tUser,\r\n\tUserGroup,\r\n\tApp\r\n}","\r\nexport class HomeLocation {\r\n\tHomeCountry: string;\r\n\tHomeCountryName: string;\r\n\tHomeState: string;\r\n\tHomeCity: string;\r\n\tHomeLocLongitude: string;\r\n\tHomeLocLatitude: string;\r\n}\r\n\r\nexport class WorkLocation {\r\n\tWorkCountryCode: string;\r\n\tWorkCountry: string;\r\n\tWorkState: string;\r\n\tWorkCity: string;\r\n\tWorkLocLatitude: string;\r\n\tWorkLocLogitude: string;\r\n}\r\n\r\nexport class UserInfo {\r\n\tprivate firstName: string;\r\n\tprivate lastName: string;\r\n\tprivate middleName: string;\r\n\tprivate fullName: string;\r\n\tprivate displayName: string;\r\n\tprivate businessDomain: string;\r\n\tprivate reportsTo: string;\r\n\tprivate reportsToDisplayName: string;\r\n\tprivate businessRole: string;\r\n\tprivate addressBookTitleDesc: string;\r\n\tprivate standardTitle: string;\r\n\tprivate email: string;\r\n\tprivate resourceImage: string;\r\n\tprivate businessRoleId: number;\r\n\tprivate reportsToFullName: string;\r\n\tprivate alias: string;\r\n\tprivate preferredFirstName: string;\r\n\tprivate seniority: string;\r\n\tprivate businessRoleDisplayName: string;\r\n\tprivate roleGroupId: number;\r\n\tprivate roleGroupName: string;\r\n\tprivate isDefaultProfile: boolean;\r\n\tprivate domain: string;\r\n\tprivate personnelNumber: number;\r\n\tprivate primaryTool: string;\r\n\tprivate costCenterCode: string;\r\n\tprivate hiringDate: any;\r\n\tprivate terminationDate: any;\r\n\tprivate serviceJobTitle: string;\r\n\tprivate resourceType: string;\r\n\tprivate alignmentType: string;\r\n\tprivate companyCode: number;\r\n\tprivate subAreaCode: number;\r\n\tprivate countryCode: any;\r\n\tprivate homeLocationNotFoundInd: boolean;\r\n\tprivate timeZoneId: number;\r\n\tprivate standardTimeZone: string;\r\n\tprivate resourceStatus: string;\r\n\tprivate resourceCategory: string;\r\n\tprivate resumeUrl: any;\r\n\tprivate functionHierarchyCode: string;\r\n\tprivate aadObjectId: string;\r\n\r\n\tconstructor() {\r\n\t}\r\n\tget AadObjectId(): string {\r\n\t\treturn this.aadObjectId;\r\n\t}\r\n\tset AadObjectId(value: string) {\r\n\t\tthis.aadObjectId = value;\r\n\t}\r\n\tget Alias(): string {\r\n\t\treturn this.alias;\r\n\t}\r\n\tset Alias(value: string) {\r\n\t\tthis.alias = value;\r\n\t}\r\n\tget FirstName(): string {\r\n\t\treturn this.firstName;\r\n\t}\r\n\tset FirstName(value: string) {\r\n\t\tthis.firstName = value;\r\n\t}\r\n\tget LastName(): string {\r\n\t\treturn this.lastName;\r\n\t}\r\n\tset LastName(value: string) {\r\n\t\tthis.lastName = value;\r\n\t}\r\n\tget MiddleName(): string {\r\n\t\treturn this.middleName;\r\n\t}\r\n\tset MiddleName(value: string) {\r\n\t\tthis.middleName = value;\r\n\t}\r\n\tget FullName(): string {\r\n\t\treturn this.fullName;\r\n\t}\r\n\tset FullName(value: string) {\r\n\t\tthis.fullName = value;\r\n\t}\r\n\tget DisplayName(): string {\r\n\t\treturn this.displayName;\r\n\t}\r\n\tset DisplayName(value: string) {\r\n\t\tthis.displayName = value;\r\n\t}\r\n\tget BusinessDomain(): string {\r\n\t\treturn this.businessDomain;\r\n\t}\r\n\tset BusinessDomain(value: string) {\r\n\t\tthis.businessDomain = value;\r\n\t}\r\n\tget ReportsTo(): string {\r\n\t\treturn this.reportsTo;\r\n\t}\r\n\tset ReportsTo(value: string) {\r\n\t\tthis.reportsTo = value;\r\n\t}\r\n\tget ReportsToDisplayName(): string {\r\n\t\treturn this.reportsToDisplayName;\r\n\t}\r\n\tset ReportsToDisplayName(value: string) {\r\n\t\tthis.reportsToDisplayName = value;\r\n\t}\r\n\tget BusinessRoleId(): number {\r\n\t\treturn this.businessRoleId;\r\n\t}\r\n\tset BusinessRoleId(value: number) {\r\n\t\tthis.businessRoleId = value;\r\n\t}\r\n\tget Seniority(): string {\r\n\t\treturn this.seniority;\r\n\t}\r\n\tset Seniority(value: string) {\r\n\t\tthis.seniority = value;\r\n\t}\r\n\tget BusinessRole(): string {\r\n\t\treturn this.businessRole;\r\n\t}\r\n\tset BusinessRole(value: string) {\r\n\t\tthis.businessRole = value;\r\n\t}\r\n\tget StandardTitle(): string {\r\n\t\treturn this.standardTitle;\r\n\t}\r\n\tset StandardTitle(value: string) {\r\n\t\tthis.standardTitle = value;\r\n\t}\r\n\tget AddressBookTitleDesc(): string {\r\n\t\treturn this.addressBookTitleDesc;\r\n\t}\r\n\tset AddressBookTitleDesc(value:string) {\r\n\t\tthis.addressBookTitleDesc = value;\r\n\t}\r\n\tget Email(): string {\r\n\t\treturn this.email;\r\n\t}\r\n\tset Email(value: string) {\r\n\t\tthis.email = value;\r\n\t}\r\n\tget ResourceImage(): string {\r\n\t\treturn this.resourceImage;\r\n\t}\r\n\tset ResourceImage(resourceImage: string) {\r\n\t\tthis.resourceImage = resourceImage;\r\n\t}\r\n\tget ReportsToFullName(): string {\r\n\t\treturn this.reportsToFullName;\r\n\t}\r\n\tset ReportsToFullName(reportsToFullName: string) {\r\n\t\tthis.reportsToFullName = reportsToFullName;\r\n\t}\r\n\tget PreferredFirstName(): string {\r\n\t\treturn this.preferredFirstName;\r\n\t}\r\n\tset PreferredFirstName(value: string) {\r\n\t\tthis.preferredFirstName = value;\r\n\t}\r\n\tget BusinessRoleDisplayName(): string {\r\n\t\treturn this.businessRoleDisplayName;\r\n\t}\r\n\tset BusinessRoleDisplayName(value: string) {\r\n\t\tthis.businessRoleDisplayName = value;\r\n\t}\r\n\tget RoleGroupId(): number {\r\n\t\treturn this.roleGroupId;\r\n\t}\r\n\tset RoleGroupId(value: number) {\r\n\t\tthis.roleGroupId = value;\r\n\t}\r\n\tget RoleGroupName(): string {\r\n\t\treturn this.roleGroupName;\r\n\t}\r\n\tset RoleGroupName(value: string) {\r\n\t\tthis.roleGroupName = value;\r\n\t}\r\n\tget IsDefaultProfile(): boolean {\r\n\t\treturn this.isDefaultProfile;\r\n\t}\r\n\tset IsDefaultProfile(value: boolean) {\r\n\t\tthis.isDefaultProfile = value;\r\n\t}\r\n\tget Domain(): string {\r\n\t\treturn this.domain;\r\n\t}\r\n\tset Domain(value: string) {\r\n\t\tthis.domain = value;\r\n\t}\r\n\tget PersonnelNumber(): number {\r\n\t\treturn this.personnelNumber;\r\n\t}\r\n\tset PersonnelNumber(value: number) {\r\n\t\tthis.personnelNumber = value;\r\n\t}\r\n\tget PrimaryTool(): string {\r\n\t\treturn this.primaryTool;\r\n\t}\r\n\tset PrimaryTool(value: string) {\r\n\t\tthis.primaryTool = value;\r\n\t}\r\n\tget CostCenterCode(): string {\r\n\t\treturn this.costCenterCode;\r\n\t}\r\n\tset CostCenterCode(value: string) {\r\n\t\tthis.costCenterCode = value;\r\n\t}\r\n\tget HiringDate(): any {\r\n\t\treturn this.hiringDate;\r\n\t}\r\n\tset HiringDate(value: any) {\r\n\t\tthis.hiringDate = value;\r\n\t}\r\n\tget TerminationDate(): any {\r\n\t\treturn this.terminationDate;\r\n\t}\r\n\tset TerminationDate(value: any) {\r\n\t\tthis.terminationDate = value;\r\n\t}\r\n\tget ServiceJobTitle(): string {\r\n\t\treturn this.serviceJobTitle;\r\n\t}\r\n\tset ServiceJobTitle(value: string) {\r\n\t\tthis.serviceJobTitle = value;\r\n\t}\r\n\tget ResourceType(): string {\r\n\t\treturn this.resourceType;\r\n\t}\r\n\tset ResourceType(value: string) {\r\n\t\tthis.resourceType = value;\r\n\t}\r\n\tget AlignmentType(): string {\r\n\t\treturn this.alignmentType;\r\n\t}\r\n\tset AlignmentType(value: string) {\r\n\t\tthis.alignmentType = value;\r\n\t}\r\n\tget CompanyCode(): number {\r\n\t\treturn this.companyCode;\r\n\t}\r\n\tset CompanyCode(value: number) {\r\n\t\tthis.companyCode = value;\r\n\t}\r\n\tget SubAreaCode(): number {\r\n\t\treturn this.subAreaCode;\r\n\t}\r\n\tset SubAreaCode(value: number) {\r\n\t\tthis.subAreaCode = value;\r\n\t}\r\n\tget CountryCode(): any {\r\n\t\treturn this.countryCode;\r\n\t}\r\n\tset CountryCode(value: any) {\r\n\t\tthis.countryCode = value;\r\n\t}\r\n\tget HomeLocationNotFoundInd(): boolean {\r\n\t\treturn this.homeLocationNotFoundInd;\r\n\t}\r\n\tset HomeLocationNotFoundInd(value: boolean) {\r\n\t\tthis.homeLocationNotFoundInd = value;\r\n\t}\r\n\tget TimeZoneId(): number {\r\n\t\treturn this.timeZoneId;\r\n\t}\r\n\tset TimeZoneId(value: number) {\r\n\t\tthis.timeZoneId = value;\r\n\t}\r\n\tget StandardTimeZone(): string {\r\n\t\treturn this.standardTimeZone;\r\n\t}\r\n\tset StandardTimeZone(value: string) {\r\n\t\tthis.standardTimeZone = value;\r\n\t}\r\n\tget ResourceStatus(): string {\r\n\t\treturn this.resourceStatus;\r\n\t}\r\n\tset ResourceStatus(value: string) {\r\n\t\tthis.resourceStatus = value;\r\n\t}\r\n\tget ResourceCategory(): string {\r\n\t\treturn this.resourceCategory;\r\n\t}\r\n\tset ResourceCategory(value: string) {\r\n\t\tthis.resourceCategory = value;\r\n\t}\r\n\tget ResumeUrl(): any {\r\n\t\treturn this.resumeUrl;\r\n\t}\r\n\tset ResumeUrl(value: any) {\r\n\t\tthis.resumeUrl = value;\r\n\t}\r\n\tget FunctionHierarchyCode(): string {\r\n\t\treturn this.functionHierarchyCode;\r\n\t}\r\n\tset FunctionHierarchyCode(value: string) {\r\n\t\tthis.functionHierarchyCode = value;\r\n\t}\r\n\tHomeLocation: HomeLocation;\r\n\tWorkLocation: WorkLocation;\r\n\tWeekdays: string[];\r\n\tTenantName: string;\r\n\tMappedTenantName: string;\r\n}","export enum ComponentFramework {\r\n React = \"React\",\r\n Angular = \"Angular\"\r\n}","export enum IOCVSource {\r\n Client = \"Client\",\r\n }\r\n \r\n export enum IOCVFeedbackType {\r\n Smile = \"Smile\",\r\n Frown = \"Frown\",\r\n Idea = \"Idea\",\r\n Survey = \"Survey\",\r\n Bug = \"Bug\",\r\n }\r\n \r\n export enum IOCVManifestType {\r\n Sas = \"Sas\",\r\n Nps = \"Nps\",\r\n Nlqs = \"Nlqs\",\r\n Psat = \"Psat\",\r\n Bps = \"Bps\",\r\n Fps = \"Fps\",\r\n }","import { ErrorSeverityLevel } from \"../telemetry/ErrorSeverityLevel\";\r\nimport { LogPropertyBag } from \"../telemetry/LogPropertyBag\";\r\n\r\nexport class ErrorCodes {\r\n public static readonly ModuleBoostrapFailure = '3012'; \r\n public static readonly ModuleBoostrapFailureRequireJS = '3013';\r\n public static readonly GlobalExceptionHandler = '3301';\r\n public static readonly GlobalExceptionHandler_AngularJs = '3300';\r\n public static readonly OnMsalLoginFailure = '3303';\r\n public static readonly OnMsalTokenFailure = '3305';\r\n public static readonly OnTelemetryContextError = '3306';\r\n public static readonly OnSettingsServiceError = '3307';\r\n\tpublic static readonly OnGetAdminTilesFailure = '2702';\r\n public static readonly OnGetAdminDataFromServerFailure = '2701';\r\n public static readonly PowerBI_Invalid_Configuration = '50003';\r\n public static readonly PowerBI_OnError = '50001'; \r\n public static readonly PowerBI_Token_Failure = '50002';\r\n public static readonly GetLeftNavData_Failure = '1801';\r\n public static readonly SaveLeftNavPinSetting_Error = '3502';\r\n public static readonly PlannedDownTime_UpdateFlash_Failure = '2931'; \r\n public static readonly PlannedDownTime_UpdateSystemAccouncement_Failure = '2932'; \r\n public static readonly SystemMessage_Read_Collection_Rejection = '2916';\r\n public static readonly SystemMessage_Fetch_Business_Workflow = '2917';\r\n public static readonly SystemMessage_Save_Failure = '2918';\r\n public static readonly SystemMessage_Update_Failure = '2918';\r\n public static readonly SystemMessage_Delete_Failure = '2920';\r\n public static readonly AcquireTokenFailure_UnKnown_Reason = '3304';\r\n public static readonly OBO_User_Already_Active = '2907';\r\n public static readonly Get_OBO_User_Configuration_Failure = '2906'; \r\n public static readonly OBO_User_Search_Failure = '2602';\r\n public static readonly State_Not_Found = '2908';\r\n public static readonly State_Change_Failure = '2909';\r\n public static readonly Msal_ResourceTokenAcuqisition_Failure = '3302';\r\n public static readonly SkypeBotInit_Failure = '2911';\r\n public static readonly API_Threshold_Crossed = '2910';\r\n public static readonly InitializeFeedback_Failure = '3400';\r\n public static readonly Error_SubmittingFeedback = '3401';\r\n public static readonly Error_LoadingFeedback = '3402';\r\n public static readonly GetRoleGroupDetails_Failure = '3452';\r\n public static readonly PublishNotifications_Failure = '3451';\r\n public static readonly PublishNotificationsRolesRoleGroup_Failure = '3453';\r\n public static readonly GetRequestTypeData_Failure = '3501';\r\n public static readonly CloseActOnBehalofUser_Failure = '3502';\r\n public static readonly GetContextualHelpArticles_Failure = '4001'; \r\n public static readonly GetArticleData_Failure = '4002';\r\n public static readonly SaveHelpFeedback_Failure = '4003';\r\n public static readonly SearchSuggestions_Failure = '4004';\r\n public static readonly SaveViewCount_Failure = '4005';\r\n public static readonly ShowErrorMsgNavigateToUserLookUp = '4006'; \r\n public static readonly SavePersonalizedNavItems = '4007';\r\n public static readonly GetNotifications_Failure = '2940';\r\n public static readonly GetUnreadNotificationCount_Failure = '2941';\r\n public static readonly MarkAllNotificationsAsRead_Failure = '2943';\r\n public static readonly DismissAllNotifications_Failure = '2942';\r\n public static readonly ReadNotification_Failure = '2943';\r\n public static readonly DeleteNotification_Failure = '2942';\r\n public static readonly SaveNotificationDNDSetting = '3503';\r\n public static readonly ErrorLoadingDashboard = '2913'; \r\n public static readonly ErrorFetchingTokenForPowerBI = '2914';\r\n public static readonly ErrorLoadingPowerBiDashboard = '2915';\r\n public static readonly SubmitRoleGroupNavPresonalization_Failure = '2921';\r\n public static readonly GetRoleGroupDetailsPersonalization_Failure = '2921';\r\n public static readonly GetGlobalNavMasterList_Failure = '2917';\r\n public static readonly GetRoleGroupNavList_Failure = '2916';\r\n public static readonly ReadToastNotification_Failure = '2943';\r\n public static readonly MarkNotificationAsRead_Failure = '2944';\r\n public static readonly UserLookUpSearchUser_Failure = '2945';\r\n public static readonly SetSelectedUser_Failure = '2946';\r\n public static readonly NavigateToPersonalizationView_Failure = '2947';\r\n public static readonly ErrorOnLeftNavClick = '2948';\r\n public static readonly HandleProfileServiceResponse = '2949';\r\n public static readonly AdalOnError = '0001';\r\n public static readonly AdalOnErrorWithErrorCode = '0002';\r\n public static readonly DefaultStateNotConfigured = '2905';\r\n public static readonly ErrorRegisteringRoute = '2904';\r\n public static readonly ErrorInLazyLoading = '2906';\r\n public static readonly ErrorUpdatingStateObject = '2907';\r\n public static readonly RouteResolveException = '2908';\r\n public static readonly HttpInterceptorResponseError = '2500';\r\n public static readonly DashboardService_GetLeftNavDataFailure = '2603';\r\n public static readonly FxPConfigurationFailure = '2604'\r\n public static readonly StartUpFlagRetrieveError = '2912';\r\n public static readonly DataService_TokenFailure = '5001';\r\n public static readonly FeedbackService_Error = '3401';\r\n public static readonly CheckToastNotifications_Failure = '2940';\r\n public static readonly SharedComponentNotRegistered = '2941';\r\n public static readonly LazyLoadingFailedForSharedComponent = '2942';\r\n public static readonly PersonalizationService_GetMasterLeftNav_Failure = '2605'; \r\n public static readonly PersonalizationService_GetPersonalizedLeftNav_Failure = '2606';\r\n public static readonly PersonalizationSerivce_SavePersonalizedNavItems_Failure = '2607';\r\n public static readonly PersonalizationSerivce_GetRoleGroupDetails_Failure = '2608';\r\n public static readonly PersonalizationSerivce_GetRoleGroupDetailsForNotification_Failure = '2609';\r\n public static readonly PersonalizationSerivce_GetRolePersonalizedNavItems_Failure = '2610';\r\n public static readonly PersonalizationSerivce_GetRoleGroupPersonalizedList_Failure = '2611';\r\n public static readonly PersonalizationSerivce_SaveRoleGroupPersonalizedNavItems_Failure = '2612';\r\n public static readonly AuthSerive_UserClaimsEmptyInLocalStorage = \"2804\";\r\n public static readonly AuthSerive_MissingApplicationObjectInClaims = \"2805\";\r\n public static readonly AuthSerive_MissingRolesObjectInClaims = \"2806\";\r\n public static readonly AuthSerive_TenantClaimsEmptyInLocalStorage = \"2801\";\r\n public static readonly AuthSerive_TenantObjectMissingInClaims = \"2802\";\r\n public static readonly AuthSerive_ClaimsMissingInTenantObject = \"2803\";\r\n public static readonly AuthService_TokenAcquisitionInProgress = '2804';\r\n public static readonly AuthService_TokenAcquisitionInProgress_TenantClaims = '2805';\r\n public static readonly AuthService_TenantClaimsObjectMissingInClaims = '2806';\r\n public static readonly AuthService_APICallFailedWithUnknownReason = '2807';\r\n public static readonly AuthService_ErrorNotifyingCachedClaims = '2809';\r\n public static readonly AuthService_UnknownException = '2808';\r\n public static readonly AuthService_GetClaimsFailure = '2810';\r\n public static readonly GetUserThumbnail_TokenNotFound = '2901';\r\n public static readonly GetBasicProfile_TokenNotFound = '2902';\r\n public static readonly GetBasicProfile_BusinessRoleMissing = '2903';\r\n public static readonly GetBasicProfile_RoleGroupMissing = '2904';\r\n public static readonly GetBasicProfile_ProfileNotFound = '2905';\r\n public static readonly BasicProfile_UnknownError = '2906';\r\n public static readonly SearchProfile_TokenMissing = '2908'\r\n public static readonly ProfileServiceFailure = '2909';\r\n public static readonly ProfileService_ErrorNotifyingCachedProfile = '2910';\r\n public static readonly ErrorOnProfileSearch = '2911';\r\n public static readonly ModuleCompilationError = '5000';\r\n public static readonly ErrorInstantiatingComponent = '5001';\r\n public static readonly ErrorLoadingReactComponent = '5002';\r\n public static readonly ErrorUnloadingReactComponent = '5003';\r\n public static readonly Resiliency_ExternalResourceLoadingError = '1800';\r\n public static readonly Resiliency_ModuleLoadingError = '1800';\r\n public static readonly SignalR_ErrorOnDisconnect = '1900';\r\n public static readonly SignalR_ErrorOnMessageSend = '1901';\r\n public static readonly SignalR_ErrorOnJoinGroup = '1902';\r\n public static readonly SignalR_ErrorOnLeaveGroup = '1903';\r\n public static readonly SignalR_ErrorOnConnection = '1904';\r\n public static readonly PartnerAppRegistrationService_ErrorOnAppRegistration = '2001';\r\n public static readonly PartnerAppRegistrationService_ErrorOnSharedComponentRegistration = '2002';\r\n public static readonly ReduxStoreException = '6000';\t\r\n\r\n public static readonly OnStateChangeStartException = '3701'; \r\n\r\n}\r\n","import { IFxpContext } from \"../interfaces/IFxpContext\";\r\nimport { IPouchDbService } from \"../interfaces/ipouchdbservice\";\r\nimport { IPouchDBProvider } from \"../interfaces/IPouchDBProvider\";\r\nimport { ApplicationConstants } from \"../common/ApplicationConstants\";\r\nimport { PouchDBProvider } from \"../common/PouchDBProvider\";\r\nimport { IFxPService } from \"../interfaces/IFxpService\";\r\n\r\ndeclare var Promise: any;\r\n/**\r\n * @module Fxp.Context\r\n */\r\n\r\n/**\r\n * Represents an FxpContext\r\n * @class Fxp.Context.FxpContext\r\n * @example Example to create an object of FxpContext \r\n * //Initializing FxpContext\r\n * var fxpContext = new Fxp.Context.FxpContext(); \r\n */\r\nexport class FxpContext implements IFxpContext,IFxPService {\r\n\tprivate static _instance: FxpContext;\r\n\tprivate pouchService: IPouchDbService;\r\n\tprivate _iPouchDBProvider: IPouchDBProvider;\r\n\r\n\tconstructor(iPouchDBProvider: IPouchDBProvider) {\r\n\t\tif (FxpContext._instance) {\r\n\t\t\treturn FxpContext._instance;\r\n\t\t}\r\n\t\tthis._iPouchDBProvider = iPouchDBProvider;\r\n\t\tthis.pouchService = this._iPouchDBProvider.getDBConnection(ApplicationConstants.GlobalContextDBName);\r\n\r\n\t\tFxpContext._instance = this;\r\n\t}\r\n\r\n\t//Keeping this function as is for backward Compatibility\r\n\tpublic static GetInstance(): FxpContext {\r\n\t\tif (!FxpContext._instance) {\r\n\t\t\tFxpContext._instance = new FxpContext(new PouchDBProvider());\r\n\t\t}\r\n\r\n\t\treturn FxpContext._instance;\r\n\t}\r\n\r\n\t/**\r\n * Saves the current value in PouchDB using specified key and returns a Javascript Promise\r\n * @method Fxp.Context.FxpContext#saveContext\r\n * @param {string} key A key which will be identifier of the value of the data to be saved in PouchDB \r\n * @param {string} value The value that needs to be saved\r\n * @param {string} applicationName The name of application. It is optional.\r\n * @example Example to use saveContext\r\n * var fxpContext = Fxp.Context.FxpContext.GetInstance()\r\n * fxpContext.saveContext(\"UIConfigDB\",\"UIConfigDBName\");\r\n * fxpContext.saveContext(\"UIConfigDB\",\"UIConfigDBName\", \"ApplicationName\");\r\n */\r\n\r\n\tpublic saveContext(key: string, value: string, applicationName?: string): Promise {\r\n\t\treturn this.saveData(key, value, applicationName);\r\n\t}\r\n\r\n\t/**\r\n\t* Read Data from Context using specified key and application name. If application name is null then it will fetch data from Global context otherwise ApplicationContext. \r\n\t* It returns a Javascript Promise\r\n\t* @method Fxp.Context.FxpContext#readContext\r\n\t* @param {string} key A key which will be identifier of the value of the data that needs to be fetched from PouchDB \r\n\t* @param {string} applicationName The name of application. It is optional parameter.\r\n\t* @example Example to use readContext\r\n\t* var fxpContext = Fxp.Context.FxpContext.GetInstance()\r\n\t* fxpContext.readContext(\"sessionId\", \"FXP\");\r\n\t* fxpContext.readContext(\"sessionId\");\r\n\t*/\r\n\tpublic readContext(key: string, applicationName?: string): Promise {\r\n\t\treturn this.readData(key, applicationName);\r\n\t}\r\n\r\n\t /**\r\n * Read Document Keys from Context using specified application name.\r\n * It returns a Javascript Promise\r\n * @method Fxp.Context.FxpContext#readApplicationKeyIDs\r\n * @param {string} applicationName The name of application. \r\n * @example Example to use readApplicationKeyIDs\r\n * var fxpContext = Fxp.Context.FxpContext.GetInstance()\r\n * fxpContext.readApplicationKeyIDs(\"sessionId\");\r\n */\r\n\tpublic getDocumentKeys(applicationName: string): Promise {\r\n\t\treturn this.getDocumentKeysData( applicationName);\r\n\t}\r\n\t/**\r\n * Delete data from context using specified key and application name. If application name is null then it will delete data from Global context otherwise ApplicationContext. \r\n * It returns a Javascript Promise\r\n * @method Fxp.Context.FxpContext#deleteContext\r\n * @param {string} key A key which will be identifier of the value of the data that needs to be fetched from PouchDB \r\n * @param {string} applicationName The name of application. It is optional parameter.\r\n * @example Example to use deleteContext\r\n * var fxpContext = new Fxp.Context.deleteContext()\r\n * fxpContext.deleteContext(\"sessionId\", \"FXP\");\r\n * fxpContext.deleteContext(\"sessionId\");\r\n */\r\n\tpublic deleteContext(key: string, applicationName?: string): Promise {\r\n\t\ttry {\r\n\t\t\tvar db: IPouchDbService = this.getDBService(applicationName);\r\n\r\n\t\t\treturn new Promise(function (resolve, reject) {\r\n\t\t\t\tdb.get(key).then(function (doc) {\r\n\t\t\t\t\tdb.delete(key, doc._rev).\r\n\t\t\t\t\t\tthen(function (doc) {\r\n\t\t\t\t\t\t\tresolve(doc)\r\n\t\t\t\t\t\t}).catch(function (err) {\r\n\t\t\t\t\t\t\tdb.get(key).then(function (doc) {\r\n\t\t\t\t\t\t\t\tdb.delete(key, doc._rev).then(function () {\r\n\t\t\t\t\t\t\t\t\tresolve(doc)\r\n\t\t\t\t\t\t\t\t}).catch(function (err) {\r\n\t\t\t\t\t\t\t\t\tconsole.log(err);\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t});\r\n\t\t\t\t}).catch(function (err) {\r\n\t\t\t\t\tif (err.name == \"not_found\") {\r\n\t\t\t\t\t\tconsole.log(\"not-found\");\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\t\tcatch (exception) {\r\n\t\t\t//TODO: REVISIT THE scenario where exception occurs\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/**\r\n\t* Get FxpBaseUrl from FxpContext. It returns a Javascript Promise.\r\n\t* @method Fxp.Context.FxpContext#getFxpBaseUrl\r\n\t* @example Example to use getFxpBaseUrl\r\n\t* var fxpContext = Fxp.Context.FxpContext.GetInstance()\r\n\t* fxpContext.getFxpBaseUrl();\r\n\t*/\r\n\tpublic getFxpBaseUrl(): Promise {\r\n\t\treturn this.readData(ApplicationConstants.BaseUrl);\r\n\t}\r\n\r\n\t/**\r\n\t* Get SessionId from FxpContext. It returns a Javascript Promise.\r\n\t* @method Fxp.Context.FxpContext#getAssetLibraryUrl\r\n\t* @example Example to use getAssetLibraryUrl\r\n\t* var fxpContext = Fxp.Context.FxpContext.GetInstance()\r\n\t* fxpContext.getAssetLibraryUrl();\r\n\t*/\r\n\tpublic getAssetLibraryUrl(): Promise {\r\n\t\treturn this.readData(ApplicationConstants.AssetsUrl);\r\n\t}\r\n\r\n\t/**\r\n\t* Get SessionId from FxpContext. It returns a Javascript Promise.\r\n\t* @method Fxp.Context.FxpContext#getCurrentSessionId\r\n\t* @example Example to use getCurrentSessionId\r\n\t* var fxpContext = new Fxp.Context.FxpContext()\r\n\t* fxpContext.getCurrentSessionId();\r\n\t*/\r\n\tpublic getCurrentSessionId(): Promise {\r\n\t\treturn this.readData(\"sessionId\");\r\n\t}\r\n\r\n\t/**\r\n * Saves the current value in PouchDB using specified key and returns a Javascript Promise\r\n * @method Fxp.Context.FxpContext#saveData\r\n * @param {string} key A key which will be identifier of the value of the data to be saved in PouchDB \r\n * @param {string} value The value that needs to be saved\r\n * @param {string} applicationName The name of application. It is optional. \r\n */\r\n\tprivate saveData(key: string, value: string, applicationName?: string): Promise {\r\n\r\n\t\tvar saveUpdateDocument = this.saveUpdateDocument;\r\n\r\n\t\ttry {\r\n\t\t\tvar db: IPouchDbService = this.getDBService(applicationName);\r\n\r\n\t\t\treturn new Promise(function (resolve, reject) {\r\n\t\t\t\tdb.get(key).then(function (doc) {\r\n\t\t\t\t\tdoc[key] = value;\r\n\t\t\t\t\tresolve(saveUpdateDocument(db, JSON.stringify(doc), key, value));\r\n\t\t\t\t}).catch(function (err) {\r\n\t\t\t\t\tif (err.name == \"not_found\") {\r\n\t\t\t\t\t\tvar PropBagInternal: any = {};\r\n\t\t\t\t\t\tPropBagInternal[key] = value;\r\n\t\t\t\t\t\tvar JSONData = JSON.stringify(PropBagInternal);\r\n\t\t\t\t\t\tresolve(saveUpdateDocument(db, JSONData, key, value));\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\t\tcatch (exception) { }\r\n\t}\r\n\r\n\t/**\r\n\t* Saves Data to Context\r\n\t* It returns a any\r\n\t* @method Fxp.Context.FxpContext#saveUpdateDocument\r\n\t* @param {Fxp.Interfaces.IPouchDbService} db PouchDB Connnection Object\r\n\t* @param {string} document Json Document to be saved in PouchDB. \r\n\t* @param {string} key A key which will be identifier of the value of the data to be saved in PouchDB \r\n\t* @param {string} value The value that needs to be saved\r\n\t*/\r\n\tprivate saveUpdateDocument(db: IPouchDbService, document: string, key: string, value: string): any {\r\n\t\tdb.saveUpdateDocument(document, key).\r\n\t\t\tthen(function (doc) {\r\n\t\t\t\treturn (doc)\r\n\t\t\t}).catch(function (err) {\r\n\t\t\t\tconsole.log(err);\r\n\t\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t* Read Data from Context using specified key and application name. If application name is null then it will fetch data from Global context otherwise ApplicationContext. \r\n\t* It returns a Javascript Promise\r\n\t* @method Fxp.Context.FxpContext#readData\r\n\t* @param {string} key A key which will be identifier of the value of the data that needs to be fetched from PouchDB \r\n\t* @param {string} applicationName The name of application. It is optional parameter. \r\n\t*/\r\n\tprivate readData(key: string, applicationName?: string): Promise {\r\n\t\ttry {\r\n\t\t\tvar db: IPouchDbService = this.getDBService(applicationName);\r\n\t\t\tvar PropBagInternal: any = {};\r\n\t\t\treturn new Promise(function (resolve, reject) {\r\n\t\t\t\tdb.get(key).then(function (doc) {\r\n\t\t\t\t\tPropBagInternal[\"IsError\"] = false;\r\n\t\t\t\t\tPropBagInternal[\"Result\"] = doc[key];\r\n\t\t\t\t\tPropBagInternal[\"Error\"] = null;\r\n\t\t\t\t\tresolve(PropBagInternal);\r\n\t\t\t\t}).catch(function (err) {\r\n\t\t\t\t\tPropBagInternal[\"IsError\"] = true;\r\n\t\t\t\t\tPropBagInternal[\"Result\"] = null;\r\n\t\t\t\t\tPropBagInternal[\"Error\"] = err;\r\n\t\t\t\t\tresolve(PropBagInternal);\r\n\t\t\t\t});\r\n\t\t\t});\t\t\t\r\n\t\t}\r\n\t\tcatch (exception) {\r\n\t\t\tconsole.log(`Error while reading ${key} from context` + exception);\r\n\t\t }\r\n\t}\r\n\r\n\t /**\r\n * Read Keys of documents from Context using specified application name.\r\n * It returns a Javascript Promise\r\n * @method Fxp.Context.FxpContext#readApplicationKeyIDsData\r\n * @param {string} applicationName The name of application for which keys will be returned.\r\n */\r\n\tprivate getDocumentKeysData(applicationName: string): Promise {\r\n\t\ttry {\r\n\t\tvar db: IPouchDbService = this.getDBService(applicationName);\r\n\t\tvar PropBagInternal: any = {};\r\n\t\treturn new Promise(function (resolve, reject) {\r\n\t\t\tdb.getAllDocuments({ include_docs :false})\r\n\t\t\t.then(function (doc) {\r\n\t\t\t\tPropBagInternal[\"IsError\"] = false;\r\n\t\t\t\tPropBagInternal[\"Result\"] = doc.rows.map(row=>row.key);\r\n\t\t\t\tPropBagInternal[\"Error\"] = null;\r\n\t\t\t\tresolve(PropBagInternal);\r\n\t\t\t})\r\n\t\t\t.catch(function (err) {\r\n\t\t\t\tPropBagInternal[\"IsError\"] = true;\r\n\t\t\t\tPropBagInternal[\"Result\"] = null;\r\n\t\t\t\tPropBagInternal[\"Error\"] = err;\r\n\t\t\t\tresolve(PropBagInternal);\r\n\t\t\t});\r\n\t\t});\r\n\t\t} catch (exception) {\r\n\t\tconsole.log(`Error while reading keys from context` + exception);\r\n\t\t}\r\n\t}\r\n\t/**\r\n\t* Get DB Connetion Object\r\n\t* It returns a Fxp.Interfaces.IPouchDbService\r\n\t* @method Fxp.Context.FxpContext#getDBService \r\n\t* @param {string} applicationName The name of application. It is optional parameter. \r\n\t*/\r\n\tprivate getDBService(applicationName?: string): IPouchDbService {\r\n\t\ttry {\r\n\t\t\tvar db: IPouchDbService;\r\n\t\t\tswitch (applicationName) {\r\n\t\t\t\tcase \"\":\r\n\t\t\t\tcase null:\r\n\t\t\t\tcase undefined:\r\n\t\t\t\t\tdb = this.pouchService;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tdb = this._iPouchDBProvider.getDBConnection(applicationName);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn db;\r\n\t\t}\r\n\t\tcatch (exception) { }\r\n\t}\r\n}","import { FxpFeedbackService } from \"../services/FxpFeedbackService\";\r\nimport { CommonUtils } from \"../utils/CommonUtils\";\r\nimport { FxpBroadcastedEvents } from \"../services/FxpBroadcastedEvents\";\r\nimport { IFxPService } from \"../interfaces/IFxpService\";\r\n\r\n\r\n/**\r\n * @application Fxp\r\n */\r\n\r\n/**\r\n * A main factory which acts as an helper for AppController. This is the factory having common functionalities.\r\n * @class Fxp.Factory.FxpUIData\r\n * @classdesc An factory to get and set main header text\r\n * @example \r\n * //How To use this factory\r\n * angular.module('FxPApp').controller('AppController', ['FxpUIData', FxpUIData]);\r\n * function AppController(AnyDependency){ FxpUIData.getHeaderText(); }\r\n */\r\nexport class FxpUIData implements IFxPService{\r\n\tprivate headerText: string;\r\n\tprivate pageTitle: string;\r\n\tprivate $rootScope: angular.IRootScopeService;\r\n\tprivate fxpFeedbackService: FxpFeedbackService;\r\n\tconstructor($rootScope: angular.IRootScopeService, fxpFeedbackService: FxpFeedbackService) {\r\n\t\tthis.$rootScope = $rootScope;\r\n\t\tthis.fxpFeedbackService = fxpFeedbackService;\r\n\t\tthis.headerText = \"\";\r\n\t\tthis.pageTitle = \"\";\r\n\t}\r\n\r\n\t/**\r\n\t* @method Fxp.Factory.FxpUIData.getHeaderText()\r\n\t* @example Example to use getHeaderText\r\n\t* FxpUIData.getHeaderText();\r\n\t*/\r\n\tpublic getHeaderText() {\r\n\t\treturn this.headerText;\r\n\t}\r\n\r\n\t/**\r\n\t* A method to set the header text.\r\n\t* @method Fxp.Factory.FxpUIData.setHeaderText(\"Professional Services\")\r\n\t* @param {string} headerText Header Text\r\n\t* @example Example to use setHeaderText\r\n\t* FxpUIData.setHeaderText(\"Professional Services\");\r\n\t*/\r\n\tpublic setHeaderText(headerText: string) {\r\n\t\tthis.headerText = headerText;\r\n\t\tthis.$rootScope.$broadcast(FxpBroadcastedEvents.OnAppHeaderChanged, headerText);\r\n\t}\r\n\r\n\t/**\r\n\t* A method to get the Page Title.\r\n\t* @method Fxp.Factory.FxpUIData.getPageTitle()\r\n\t* @example Example to use getPageTitle\r\n\t* FxpUIData.getPageTitle();\r\n\t*/\r\n\tpublic getPageTitle() {\r\n\t\treturn this.pageTitle;\r\n\t}\r\n\r\n\t/**\r\n\t* A method to set the Page Title.\r\n\t* @method Fxp.Factory.FxpUIData.setPageTitle(\"Professional Services\")\r\n\t* @param {string} pageTitle Page Title\r\n\t* @example Example to use setPageTitle\r\n\t* FxpUIData.setPageTitle(\"Professional Services\");\r\n\t*/\r\n\tpublic setPageTitle(pageTitle: string) {\r\n\t\tthis.pageTitle = pageTitle;\r\n\t\tthis.$rootScope.$broadcast(FxpBroadcastedEvents.OnPageTitleChanged, pageTitle);\r\n\t}\r\n\r\n\t/**\r\n\t* A method to set the Page Title RouteChangeSuccess Event.\r\n\t* @method Fxp.Factory.FxpUIData.setpageTitleFromRoute()\r\n\t* @param {any} toState object from ui router\r\n\t* @example Example to use setpageTitleFromRoute\r\n\t* FxpUIData.setpageTitleFromRoute();\r\n\t*/\r\n\tpublic setPageTitleFromRoute(toState) {\r\n\t\tvar self = this;\r\n\t\tself.fxpFeedbackService.setScreenRoute(toState.name);\r\n\t\tvar pageTitle = toState.data.pageTitle;\r\n\t\tif (CommonUtils.isNullOrEmpty(pageTitle)) {\r\n\t\t\tconsole.error(\"Page title is not set for \" + toState.name + \" state\");\r\n\t\t\tpageTitle = \"\";\r\n\t\t}\r\n\t\tself.fxpFeedbackService.setBrowserTitle(pageTitle);\r\n\t\tself.setPageTitle(pageTitle);\r\n\t}\r\n\r\n\t/**\r\n\t A method to set the AppHeader RouteChangeSuccess Event.\r\n\t* @method Fxp.Factory.FxpUIData.seAppHeaderFromRoute()\r\n\t* @param {any} toState object from ui router\r\n\t* @example Example to use setAppHeaderFromRoute\r\n\t* FxpUIData.setAppHeaderFromRoute();\r\n\t*/\r\n\tpublic setAppHeaderFromRoute(toState) {\r\n\t\tvar self = this;\r\n\t\tvar headerName = toState.data.headerName;\r\n\t\tif (CommonUtils.isNullOrEmpty(headerName)) {\r\n\t\t\tconsole.error(\"Appheader is not set for \" + toState.name + \" state\");\r\n\t\t\theaderName = \"\";\r\n\t\t}\r\n\t\tself.setHeaderText(headerName);\r\n\t}\r\n\r\n\tstatic getUIDataFactoryObj($rootScope, fxpFeedbackService) {\r\n\t\treturn new FxpUIData($rootScope, fxpFeedbackService);\r\n\t}\r\n}","import { ISettingsServiceConfig } from \"../interfaces/ISettingsServiceConfig\";\r\nimport { ISettingsService } from \"../interfaces/ISettingsService\";\r\nimport { ISettingsServiceProvider } from \"../interfaces/ISettingsServiceProvider\";\r\nimport { SettingsType } from \"../common/SettingsType\";\r\nimport { IFxPService } from \"../interfaces/IFxpService\";\r\nimport { MsalAuthenticationService } from \"../services/MsalAuthenticationService\";\r\n\r\ndeclare var deferred: any;\r\n\r\nexport class SettingsServiceProvider implements ISettingsServiceProvider, ISettingsService, IFxPService {\r\n\tinit() {\r\n\t\t//throw new Error(\"Method not implemented.\");\r\n\t}\r\n\taddState(stateName: any, config: any): void {\r\n\t\t//throw new Error(\"Method not implemented.\");\r\n\t}\r\n\totherwise(input: any): void {\r\n\t\t//throw new Error(\"Method not implemented.\");\r\n\t}\r\n\tprivate settingsServiceConfig: ISettingsServiceConfig = { settingsServiceBaseUrl: \"\" };\r\n\tprivate iReqCount: number;\r\n\tprivate sleepInterval: number;\r\n\tprivate http: angular.IHttpService;\r\n\tprivate msalAuthenticationService: MsalAuthenticationService;\r\n\tprivate timeout: angular.ITimeoutService;\r\n\tprivate q: angular.IQService;\r\n\r\n\tpublic configure(settingsSeerviceConfig: ISettingsServiceConfig) {\r\n\t\tangular.extend(this.settingsServiceConfig, settingsSeerviceConfig);\r\n\t}\r\n\tconstructor() {\r\n\t\tthis.$get.$inject = ['$http', 'MsalAuthenticationService', '$timeout', '$q'];\r\n\t}\r\n\r\n\t$get($http: angular.IHttpService,\r\n\t\tmsalAuthenticationService: MsalAuthenticationService,\r\n\t\t$timeout: angular.ITimeoutService,\r\n\t\t$q: angular.IQService): ISettingsService {\r\n\t\tthis.http = $http;\r\n\t\tthis.msalAuthenticationService = msalAuthenticationService;\r\n\t\tthis.timeout = $timeout;\r\n\t\tthis.q = $q;\r\n\t\tthis.iReqCount = 0;\r\n\t\tthis.sleepInterval = 100;\r\n\t\tvar settingsService: ISettingsService = {\r\n\t\t\tgetSettings: (settingType: SettingsType, settingId: string, settingNames: string[]): angular.IPromise => this.getSettings(settingType, settingId, settingNames),\r\n\t\t\tsaveSettings: (settingType: SettingsType, settingId: string, settingName: string, settingValue: string): angular.IPromise => this.saveSettings(settingType, settingId, settingName, settingValue)\r\n\t\t};\r\n\t\treturn settingsService;\r\n\t}\r\n\r\n\tgetSettings(settingType: SettingsType, settingId: string, settingNames: string[]): angular.IPromise {\r\n\t\tvar pathUrl = this.getPathUrl(settingType, settingId);\r\n\t\tvar url = this.settingsServiceConfig.settingsServiceBaseUrl + pathUrl + '?';\r\n\t\tif (typeof settingNames == 'string') {\r\n\t\t\turl += 'settingNames=' + settingNames;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (settingNames instanceof Array) {\r\n\t\t\t\tsettingNames.forEach((setting: string, index: number) => {\r\n\t\t\t\t\turl += index > 0 ?\r\n\t\t\t\t\t\t'&settingNames=' + setting :\r\n\t\t\t\t\t\t'settingNames=' + setting;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this.getSettingsSvc(url);\r\n\t}\r\n\r\n\tsaveSettings(settingType: SettingsType, settingId: string, settingName: string, settingValue: string): angular.IPromise {\r\n\t\tvar pathUrl = this.getPathUrl(settingType, settingId);\r\n\t\tvar url = this.settingsServiceConfig.settingsServiceBaseUrl + pathUrl;\r\n\t\treturn this.saveSettingsSvc(url, { settingName: settingName, settingValue: settingValue });\r\n\t}\r\n\r\n\tprivate getSettingsSvc(url: string): angular.IPromise {\r\n\t\tvar self = this;\r\n\t\tvar deferred = self.q.defer();\r\n\t\tif (self.msalAuthenticationService.accessTokenRequestInProgress(url)) {\r\n\t\t\tself.iReqCount++;\r\n\t\t\tif (self.iReqCount == 5) {\r\n\t\t\t\treturn deferred.promise;\r\n\t\t\t}\r\n\r\n\t\t\tself.timeout(function () {\r\n\t\t\t\tself.getSettingsSvc(url);\r\n\t\t\t}, self.sleepInterval);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tself.iReqCount = 0;\r\n\t\t\treturn self.http.get(url);\r\n\t\t}\r\n\r\n\t\treturn deferred.promise;\r\n\t}\r\n\r\n\tprivate saveSettingsSvc(url: string, value: any): angular.IPromise {\r\n\t\tvar self = this;\r\n\t\tvar deferred = self.q.defer();\r\n\t\tif (self.msalAuthenticationService.accessTokenRequestInProgress(url)) {\r\n\t\t\tself.iReqCount++;\r\n\t\t\tif (self.iReqCount == 5) {\r\n\t\t\t\treturn deferred.promise;\r\n\t\t\t}\r\n\r\n\t\t\tself.timeout(function () {\r\n\t\t\t\tself.saveSettingsSvc(url, value);\r\n\t\t\t}, self.sleepInterval);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tself.iReqCount = 0;\r\n\t\t\treturn self.http.post(url, value, { headers: { 'Content-Type': 'application/json' } });\r\n\t\t}\r\n\r\n\t\treturn deferred.promise;\r\n\t}\r\n\r\n\tprivate getPathUrl(settingType: SettingsType, settingId: string): string {\r\n\t\tvar settingTypeValue = SettingsType[settingType];\r\n\t\tvar pathUrl = '/' + settingTypeValue + '/' + settingId + '/settings';\r\n\t\treturn pathUrl;\r\n\t}\r\n}","import { ErrorCodes } from \"../constants/errorCodes\";\r\nimport { ErrorSeverityLevel } from \"../telemetry/ErrorSeverityLevel\";\r\nimport { FxpLoggerService } from \"../telemetry/fxpLogger\";\r\nimport { GlobalExceptionHandler } from \"../telemetry/GlobalExceptionHandler\";\r\nimport { TelemetryConstants } from \"../telemetry/TelemetryConst\";\r\n\r\n///*Fxp.Resiliency can be used to method when Angular boot fails*/\r\nexport class Resiliency {\r\n\tprivate static resilientModules: any;\r\n\tprivate static failedModules: any;\r\n\tprivate static unavailablePartnerModules: any;\r\n\tprivate static hasChildren: boolean = false;\r\n\tpublic static statesWithMissingModules: any = [];\r\n\tpublic static get FxpLoggerService(): FxpLoggerService {\r\n\t\treturn FxpLoggerService.getInstance(); \r\n\t}\r\n\tstatic source = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.Resiliency`;\r\n\r\n\tstatic init(){\r\n\t\t\r\n\t}\r\n\r\n\tpublic static get UnavailablePartnerModules() {\r\n\t\treturn this.unavailablePartnerModules;\r\n\t}\r\n\tpublic static set UnavailablePartnerModules(value: any) {\r\n\t\tthis.unavailablePartnerModules = value;\r\n\t}\r\n\t/**\r\n * @method Fxp.Resiliency.externalResourceLoadFailed to log Global Event when js cdn files is mispelled or not available.\r\n * @param {string} scriptName - name of the script file\r\n */\r\n\tstatic externalResourceLoadFailed(scriptName): void {\r\n\t\tvar logMsg = \"Unable to load resource: \" + scriptName;\r\n\t\tlet properties = this.FxpLoggerService.createPropertyBag();\r\n\t\tproperties.addToBag(\"Details\", logMsg);\r\n\t\tthis.FxpLoggerService.logError(`${this.source}.ExternalResourceLoadFailed`, logMsg, ErrorCodes.Resiliency_ExternalResourceLoadingError, \"\", properties, null, null, ErrorSeverityLevel.Medium); \r\n\t\tconsole.error(\"Fxp Resiliency: \", logMsg);\r\n\t}\r\n\r\n\r\n\t/**\r\n * @method Fxp.Resiliency.getResilientModules to fetch modules which are resilient.\r\n * @param {any} modules -list of modules which needs to be injected\r\n */\r\n\tstatic getResilientModules(modules): any {\r\n\t\t// to capture all resilient modules \r\n\t\tthis.statesWithMissingModules = [];\r\n\t\tthis.unavailablePartnerModules = [];\r\n\t\tthis.resilientModules = [];\r\n\t\tmodules.forEach(function (moduleName, i) {\r\n\t\t\tthis.failedModules = [];\r\n\t\t\tif (this.checkModuleResiliency(moduleName))\r\n\t\t\t\tthis.resilientModules.push(moduleName);\r\n\t\t\telse {\r\n\t\t\t\tthis.unavailablePartnerModules.push(moduleName);\r\n\t\t\t\tthis.failedModules.push(moduleName);\r\n\t\t\t\tthis.logFailedModulesInfo(moduleName);\r\n\t\t\t}\r\n\t\t}, this);\r\n\t\treturn this.resilientModules;\r\n\t}\r\n\r\n\t/**\r\n\t* @method Fxp.Resiliency.checkModuleResiliency to check if the modules are avaialble for FXP module injection .\r\n\t* @param {any} modules - modules whose resiliency needs to be checked\r\n\t*/\r\n\tprivate static checkModuleResiliency(module): boolean {\r\n\t\ttry {\r\n\t\t\tvar app = angular.module(module);\r\n\t\t\tif (app.requires.length > 0) {\r\n\t\t\t\tfor (var i = 0; i < app.requires.length; i++) {\r\n\t\t\t\t\tif (!this.checkModuleResiliency(app.requires[i])) {\r\n\t\t\t\t\t\tthis.failedModules.push(app.requires[i]);\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tcatch (e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t}\r\n\t/**\r\n * @method Fxp.Resiliency.logFailedModulesInfo call global event and log property bag value .\r\n * @param {any} moduleName - modules whose resiliency needs to be checked\r\n */\r\n\tprivate static logFailedModulesInfo(moduleName) {\r\n\t\tvar msg = this.failedModules.length > 1 ? \" due to \" + this.failedModules[0] + \", \" + this.failedModules.reverse().join(\" <- \") : \".\";\r\n\t\tvar logMsg = \"Failed to instantiate module \" + moduleName + `${msg}`;\r\n\t\tlet error = new Error();\r\n\t\terror.message = logMsg; \r\n\t\terror.name = \"AngularJS Module Instantiation Failed\"; \r\n\r\n\t\tlet properties = this.FxpLoggerService.createPropertyBag();\r\n\t\tproperties.addToBag('ModuleName', moduleName);\r\n\t\tthis.FxpLoggerService.logException(this.source, error, properties, undefined, undefined, ErrorSeverityLevel.Critical, ErrorCodes.Resiliency_ModuleLoadingError);\r\n\t\tconsole.error(\"Fxp Resiliency: \", logMsg);\r\n\t}\r\n}\r\nResiliency.init();","/// \r\n/// \r\n/// \r\n\r\nimport { AuthenticationResult } from \"@azure/msal-browser\";\r\nimport { IFxPService } from \"../interfaces/IFxpService\";\r\nimport { IServiceEndPoints } from \"../interfaces/IServiceEndPoints\";\r\nimport { MsalAuthenticationService } from \"./MsalAuthenticationService\";\r\n\r\ndeclare global {\r\n\tinterface Window { _msalEndpoints: any; }\r\n}\r\n/**\r\n * @application Fxp\r\n */\r\n/**\r\n * @module Fxp.Utils.Services\r\n */\r\n\r\n/**\r\n * A service keeping the generic methods used in the fxp application and for multiple adal requests \r\n * @class Fxp.Services.AdalLoginHelperService\r\n * @classdesc A service used for generic methods in the fxp application and adal simultaneous cors requests\r\n * @example Example to create an instance of AdalLoginHelperService\r\n * //Initializing AdalLoginHelperService\r\n * angular.module('FxPApp').controller('AppController', ['AdalLoginHelperService', AppController]);\r\n * function AppController(AdalLoginHelperService){ AdalLoginHelperService.getJsonData(path, callbackfunc); }\r\n */\r\nexport class AdalLoginHelperService implements IFxPService {\r\n\tprivate serviceEndpoints: Array = [];\r\n\tprivate $q;\r\n\tprivate $resource;\r\n\r\n\tconstructor($q: angular.IQService, $resource: angular.resource.IResourceService, private msalAuthenticationService: MsalAuthenticationService) {\r\n\t}\r\n\r\n\t/**\r\n * Checks for whether the adal service request is in progress or not and returns boolean \r\n * @method Fxp.Utils.Services.AdalLoginHelperService.registerEndPoint\r\n * @param {EndPoint} endpoint is the api endpoint for the resource or the api to which adal authorizes.\r\n * @param {ResourceId} ResourceId is the api endpoint for the resource or the api to which adal authorizes.\r\n * @example Example to invoke accessTokenRequestInProgress\r\n * AdalLoginHelperService.registerEndPoint('http://oneprofiledevapi.azurewebsites.net', 'asdasd-asdasd-asdasda-asdasd');\r\n */\r\n\tregisterEndPoint(endpoint: string, applicationId: string) {\r\n\t\tthis.msalAuthenticationService.registerEndPoint(endpoint, applicationId);\r\n\t}\r\n\r\n\t/**\r\n * Checks for whether the adal service request is in progress or not and returns boolean \r\n * @method Fxp.Utils.Services.AdalLoginHelperService.accessTokenRequestInProgress\r\n * @param {EndPoint} endpoint is the api endpoint for the resource or the api to which adal authorizes.\r\n * @example Example to invoke accessTokenRequestInProgress\r\n * AdalLoginHelperService.accessTokenRequestInProgress('http://oneprofiledevapi.azurewebsites.net');\r\n */\r\n\taccessTokenRequestInProgress(endpoint): boolean {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n * Returns cached token for a given endpoint \r\n * @method Fxp.Utils.Services.AdalLoginHelperService.getCachedToken\r\n * @param {EndPoint} endpoint is the api endpoint for the resource or the api to which adal authorizes.\r\n * @example Example to invoke getCachedToken\r\n * AdalLoginHelperService.getCachedToken('http://oneprofiledevapi.azurewebsites.net');\r\n */\r\n\tgetCachedToken(endpoint) {\r\n\t\t// var resource = this.adal.getResourceForEndpoint(endpoint);\r\n\t\t// return this.adal.getCachedToken(resource);\r\n\t\treturn this.msalAuthenticationService.getCachedToken(endpoint);\r\n\t}\r\n\r\n\t/**\r\n * To kick off token acquisition manually on special cases \r\n * @method Fxp.Utils.Services.AdalLoginHelperService.acquireToken\r\n * @param {EndPoint} endpoint is the api endpoint for the resource or the api to which adal authorizes.\r\n * @example Example to invoke acquireToken\r\n * AdalLoginHelperService.acquireToken('http://oneprofiledevapi.azurewebsites.net');\r\n */\r\n\tacquireToken(endpoint, callback) {\r\n\t\tthis.msalAuthenticationService.acquireTokenAsPromise(endpoint).then((authResult: AuthenticationResult) => {\r\n\t\t\tif (authResult && authResult.accessToken) {\r\n\t\t\t\tcallback(null, authResult.accessToken, null);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tconsole.log(\"Token not acquired\");\r\n\t\t\t\tcallback('User login is required', null, 'login required');\r\n\t\t\t}\r\n\t\t}).catch((error: any) => callback('User login is required', null, 'login required'));\r\n\t}\r\n\r\n\tacquireTokenAsPromise(endpoint) {\r\n\t\tvar self = this;\r\n\t\treturn new Promise(function (resolve, reject) {\r\n\t\t\tself.msalAuthenticationService.acquireTokenAsPromise(endpoint)\r\n\t\t\t\t.then((result: AuthenticationResult) => resolve(result.accessToken))\r\n\t\t\t\t.catch((error: any) => reject(error))\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n * Checks for whether the token retrieval is started for the endpoint provided \r\n * @method Fxp.Utils.Services.AdalLoginHelperService.isTokenRetrievalStarted\r\n * @param {Resource} resource an endpoint which is passed to check for it in the logs entry.\r\n * @example Example to invoke isTokenRetrievalStarted\r\n * AdalLoginHelperService.isTokenRetrievalStarted('https://microsoft.onmicrosoft.com/FXPCouchBaseAPI');\r\n */\r\n\tisTokenRetrievalStarted(resource): boolean {\r\n\t\tvar isTokenRetrievalStarted = false;\r\n\r\n\t\t// console.log(this.adal.CONSTANTS.LOG_ENTRY + resource);\r\n\t\t// var log = this.adal._getItem(this.adal.CONSTANTS.LOG_ENTRY + resource);\r\n\t\t// if (log) {\r\n\t\t// \tvar logEntries = log.split(';');\r\n\t\t// \tvar lastEntry = logEntries[logEntries.length - 2];\r\n\t\t// \tvar entryTime = new Date(lastEntry.substr(0, lastEntry.indexOf('GMT:') + 3));\r\n\t\t// \tvar now = new Date();\r\n\t\t// \tisTokenRetrievalStarted = now.getTime() < entryTime.getTime() + 10000;\r\n\t\t// }\r\n\r\n\t\treturn isTokenRetrievalStarted;\r\n\t}\r\n\r\n}\r\n\r\n","import { Subject } from 'rxjs';\r\nimport { IRootScope } from '../interfaces/IRootScope';\r\nimport { CommonUtils } from '../utils/CommonUtils';\r\nimport { IFxPService } from '../interfaces/IFxpService';\r\n\r\nexport class FxpEventBroadCastService implements IFxPService {\r\n\r\n\tprivate subject: Subject;\r\n\tprivate subjects: any = [];\r\n\tconstructor(private $rootScope: IRootScope) {\r\n\t}\r\n\tprivate broadCastSubject(eventName: string, value: any) {\r\n\t\tvar self = this;\r\n\t\tvar eventIndex = CommonUtils.getIndexOfObject(self.subjects, \"eventName\", eventName);\r\n\t\tif (eventIndex > -1) {\r\n\t\t\tself.subjects[eventIndex].subject.onNext(value);\r\n\t\t} else {\r\n\t\t\tlet event = {\r\n\t\t\t\teventName: eventName,\r\n\t\t\t\tsubject: self.getSubjectInstance()\r\n\t\t\t}\r\n\t\t\tself.subjects.push(event);\r\n\t\t}\r\n\t}\r\n\tprivate subscribeToSubject(eventName: string): Subject {\r\n\t\tvar self = this;\r\n\t\tvar eventIndex = CommonUtils.getIndexOfObject(self.subjects, \"eventName\", eventName);\r\n\t\tif (eventIndex > -1) {\r\n\t\t\treturn self.subjects[eventIndex].subject;\r\n\t\t} else {\r\n\t\t\tlet event = {\r\n\t\t\t\teventName: eventName,\r\n\t\t\t\tsubject: self.getSubjectInstance()\r\n\t\t\t}\r\n\t\t\tself.subjects.push(event);\r\n\t\t\treturn event.subject;\r\n\t\t}\r\n\t}\r\n\tprivate unsubscribeSubject(eventName: string) {\r\n\t\tvar self = this;\r\n\t\tvar eventIndex = CommonUtils.getIndexOfObject(self.subjects, \"eventName\", eventName);\r\n\t\tif (eventIndex > -1) {\r\n\t\t\tself.subjects[eventIndex].subject.unsubscribe();\r\n\t\t}\r\n\t}\r\n\tpublic On(eventName: string, callBack: any): any {\r\n\t\tvar self = this;\r\n\t\treturn self.$rootScope.$on(eventName, callBack);\r\n\t}\r\n\tpublic broadCast(eventName: string, value: any) {\r\n\t\tvar self = this;\r\n\t\tself.$rootScope.$broadcast(eventName, value);\r\n\t}\r\n\tpublic emit(eventName: string, callBack: any) {\r\n\t\tvar self = this;\r\n\t\tself.$rootScope.$emit(eventName, callBack);\r\n\t}\r\n\r\n\tprivate getSubjectInstance(): any {\r\n\t\tvar subject = new Subject();\r\n\t\treturn subject;\r\n\t}\r\n\r\n}\r\n","import { IDataService } from \"../interfaces/IDataService\";\r\nimport { ILogger } from \"../interfaces/ILogger\";\r\nimport { Observable } from \"rxjs\";\r\nimport { IFxPService } from \"../interfaces/IFxpService\";\r\nimport { TelemetryConstants } from \"../telemetry/TelemetryConst\";\r\nimport { ErrorCodes } from \"../constants/errorCodes\";\r\nimport { ErrorSeverityLevel } from \"../telemetry/ErrorSeverityLevel\";\r\nimport { MsalAuthenticationService } from \"./MsalAuthenticationService\";\r\n\r\n/**\r\n* @application Fxp\r\n*/\r\n/**\r\n* @module Fxp.Utils.Services\r\n*/\r\nexport class DataService implements IDataService,IFxPService {\r\n\r\n\tprivate sleepInterval: number = 100;\r\n\tprivate retryCount = {};\r\n\tprivate sourceForTelemetry = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.DataService`;\r\n\r\n\tconstructor(\r\n\t\tprivate $http: angular.IHttpService,\r\n\t\tprivate $q: angular.IQService,\r\n\t\tprivate $timeout: angular.ITimeoutService,\r\n\t\tprivate msalAuthenticationService: MsalAuthenticationService,\r\n\t\tprivate fxploggerService: ILogger) {\r\n\t}\r\n\r\n\tpublic get(url: string, parentDeferred: any): angular.IPromise {\r\n\t\treturn this.getWithAdalTokenSync(url, parentDeferred);\r\n\t}\r\n\r\n\tpublic getAsObservable(url: string): Observable {\r\n\t\treturn Observable.create(observer=>{\r\n\t\t\tthis.getWithAdalTokenSync(url, null).then((data) => {\r\n\t\t\t\tobserver.next(data); \r\n\t\t\t\tobserver.complete(); \r\n\t\t\t}).catch((error)=> {\r\n\t\t\t\tobserver.error(error); \r\n\t\t\t})\r\n\t\t})\r\n\t\t\r\n\t}\r\n\tprivate getWithAdalTokenSync(url: string, parentDeferred: any): angular.IPromise {\r\n\t\tvar self = this;\r\n\t\tvar deferred = parentDeferred || self.$q.defer();\r\n\r\n\t\tif (self.msalAuthenticationService.accessTokenRequestInProgress(url)) {\r\n\t\t\tvar retryCountForUrl = self.retryCount[url] || 0;\r\n\t\t\tretryCountForUrl++;\r\n\t\t\tself.retryCount[url] = retryCountForUrl;\r\n\t\t\tif (retryCountForUrl == 5) {\r\n\t\t\t\tdelete self.retryCount[url];\r\n\t\t\t\tvar propBag = self.fxploggerService.createPropertyBag();\r\n\t\t\t\tpropBag.addToBag('ServiceUrl', url);\r\n\r\n\t\t\t\tself.fxploggerService.logError(`${self.sourceForTelemetry}.GetWithAdalTokenSync`, 'AdalTokenAquisitionFailed', ErrorCodes.DataService_TokenFailure, null, propBag, null, null, ErrorSeverityLevel.Medium);\r\n\t\t\t\t\r\n\t\t\t\treturn deferred.promise;\r\n\t\t\t}\r\n\t\t\tself.$timeout(function () {\r\n\t\t\t\tself.getWithAdalTokenSync(url, deferred);\r\n\t\t\t}, self.sleepInterval);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tdelete self.retryCount[url];\r\n\t\t\treturn this.$http.get(url);\r\n\t\t}\r\n\r\n\t\treturn deferred.promise;\r\n\t}\r\n}\r\n\r\n","import { IRootScope } from \"../interfaces/IRootScope\";\r\nimport { ILogger } from \"../interfaces/ILogger\";\r\nimport { UserClaimsService } from \"./UserClaimsService\";\r\nimport { UserInfoService } from \"./UserInfoService\";\r\nimport { FxpConfigurationService } from \"./FxpConfiguration\";\r\nimport { StateService } from \"@uirouter/core\"\r\nimport { PartnerAppRegistrationService } from \"./PartnerAppRegistrationService\";\r\nimport { IUserPermission, IUserRole, IUserResourcePermissions, IResourcePermission } from \"../interfaces/IUserPermission\";\r\nimport { IStateConfig } from \"../interfaces/IStateConfig\";\r\nimport { IStateAuthorizationRule } from \"../interfaces/IStateAuthorizationRule\";\r\nimport { IFxPService } from \"../interfaces/IFxpService\";\r\n\r\n/**\r\n * @application Fxp\r\n */\r\n/**\r\n * @module Fxp.Services\r\n */\r\n/**\r\n * A service to check Authorization Rules\r\n * @class Fxp.Services.FxpAuthorizationService \r\n * @classdesc A service to check Authorization Rules\r\n * @example Example to create an instance of Fxp Authorization Service\r\n * //Initializing Fxp Route Service\r\n * angular.module('FxPApp').controller('AppController', ['FxpAuthorizationService ', AppController]);\r\n */\r\nexport class FxpAuthorizationService implements IFxPService {\r\n\tprivate states;\r\n\tprivate stateGo: StateService;\r\n\tprivate rootScope: IRootScope;\r\n\tprivate fxplogger: ILogger;\r\n\tprivate userClaimsService: UserClaimsService;\r\n\tprivate userInfoService: UserInfoService;\r\n\tprivate fxpConfigurationService: FxpConfigurationService;\r\n\r\n\tconstructor($state: StateService,\r\n\t\t$rootScope: IRootScope,\r\n\t\tloggerService: ILogger,\r\n\t\tuserClaimsService: UserClaimsService,\r\n\t\tuserInfoService: UserInfoService,\r\n\t\tfxpConfigurationService: FxpConfigurationService\r\n\t) {\r\n\t\tthis.states = $state.get();\r\n\t\tthis.stateGo = $state;\r\n\t\tthis.rootScope = $rootScope;\r\n\t\tthis.userClaimsService = userClaimsService;\r\n\t\tthis.userInfoService = userInfoService;\r\n\t\tthis.fxplogger = loggerService;\r\n\t\tthis.fxpConfigurationService = fxpConfigurationService;\r\n\r\n\t}\r\n\r\n\tprivate isNullOrEmpty(object: any) {\r\n\t\treturn (typeof object === 'undefined' || object === null || object.length < 1)\r\n\t}\r\n\r\n\tpublic checkStatePermission(event, state: IStateConfig): void {\r\n\t\tconst self = this;\r\n\t\tif (self.isStateAuthorized(state) === false)\r\n\t\t\tself.redirectToUnauthorizedState(event, state.name);\r\n\t}\r\n\r\n\tpublic redirectToUnauthorizedState(event:any=null, currentState:string=\"\"): void {\r\n\t\tconst self = this;\r\n\t\tconst propbag = self.fxplogger.createPropertyBag();\r\n\t\tif (currentState.trim().length === 0){\r\n\t\t\tcurrentState = self.states.current.name;\r\n\t\t}\r\n\t\tpropbag.addToBag(\"currentUser\", self.userInfoService.getCurrentUser());\r\n\t\tpropbag.addToBag(\"currentState\", currentState);\r\n\t\tvar telemetrymsg = self.rootScope.fxpUIConstants.UIStrings.UnauthorizedUIString + currentState;\r\n\t\tself.fxplogger.logWarning(\"FxpAuthorizationService\", telemetrymsg, propbag);\r\n\t\tif (event){\r\n\t\t\tevent.preventDefault();\r\n\t\t}\r\n\t\tthis.stateGo.go(\"unauthorized\");\r\n\t}\t\r\n\r\n\t/*check if given state for a given app is authorized*/\r\n\tpublic isAuthorized(stateName: string, appName?: string): boolean \r\n\t{\r\n\t\tconst self = this;\r\n\t\tlet stateConfig = { name: stateName } as IStateConfig;\r\n\r\n\t\tif(!self.isNullOrEmpty(appName))\r\n\t\t{\r\n\t\t\tconst appConfig = PartnerAppRegistrationService.angularPartnerStateConfig.find(s => s.applicationName && s.applicationName.toLowerCase() === appName.toLowerCase());\r\n\t\t\tif(!self.isNullOrEmpty(appConfig)) //if it is a registered partner app with its routes registered in Fxp\r\n\t\t\t{\r\n\t\t\t\tstateConfig = appConfig.routes.find(r => r.name.toLowerCase() === stateName.toLowerCase());\t\t\t\r\n\t\t\t}\r\n\t\t}\t\t\r\n\r\n\t\treturn self.isStateAuthorized(stateConfig);\r\n\t}\r\n\r\n\t/*check if user is admin*/\r\n\tpublic isAppAdmin(appName: string): boolean\r\n\t{\r\n\t\tif(!appName)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tconst self = this;\r\n\t\tconst adminPermissionsRules = self.getAppAdminRules(appName);\r\n\r\n\t\tif (self.isNullOrEmpty(adminPermissionsRules)) return false; //if no auth rules defined, the user is not an admin by default\r\n\r\n\t\treturn self.hasUserPermissions(adminPermissionsRules);\r\n\t}\r\n\r\n\t/*check if user has the required role*/\r\n\tpublic hasUserRoles(userRoles: IUserRole) : boolean\r\n\t{\t\r\n\t\tconst self = this;\r\n\t\tlet hasRoles = false;\r\n\t\tif(userRoles)\r\n\t\t{\r\n\t\t\tconst allRolesMandatory = userRoles.AllRolesMandatory;\r\n\t\t\tconst roles = userRoles.Value;\r\n\t\t\t\r\n\t\t\t//Role based authorization\r\n\t\t\tif(!self.isNullOrEmpty(roles)){\r\n\t\t\t\tconst claimsList = self.getClaimsList(userRoles.Value, null);\r\n\t\t\t\tif (allRolesMandatory) {\r\n\t\t\t\t\thasRoles = roles.every(r => self.checkRoleFunc(r, claimsList));\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\thasRoles = roles.some(r => self.checkRoleFunc(r, claimsList));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn hasRoles;\r\n\t}\r\n\r\n\t/*check if user has the required resource permission*/\r\n\tpublic hasResourcePermissions(userResourcePermissions: IUserResourcePermissions) : boolean\r\n\t{\r\n\t\tconst self = this;\r\n\t\tlet areResourcesAuthorized = false;\r\n\t\tif(userResourcePermissions)\r\n\t\t{\r\n\t\t\tconst allResourcePermissionsMandatory = userResourcePermissions.AllResourcesMandatory;\r\n\t\t\tconst resourcePermissions = userResourcePermissions.Value;\r\n\t\t\t\r\n\t\t\t// Resource Permission based authorization\r\n\t\t\tif (!self.isNullOrEmpty(resourcePermissions)){\r\n\t\t\t\tconst tenantClaims = self.getClaimsList(null, userResourcePermissions.Value);\r\n\t\t\t\tif (allResourcePermissionsMandatory) {\r\n\t\t\t\t\tareResourcesAuthorized = resourcePermissions.every(p => self.checkResourcePermissionFunc(p, tenantClaims));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse {\r\n\t\t\t\t\tareResourcesAuthorized = resourcePermissions.some(p => self.checkResourcePermissionFunc(p, tenantClaims));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn areResourcesAuthorized;\r\n\t}\t\r\n\r\n\t/*check if user has the required role/resource permissions*/\r\n\tpublic hasUserPermissions(allowedPermissions: IUserPermission) : boolean\r\n\t{\r\n\t\tconst self = this;\r\n\t\t// if both roles and resource permissions are required\r\n\t\tconst authorizeRolesAndResources = allowedPermissions.AuthorizeRolesAndResources;\t\r\n\t\t\r\n\t\tlet userRoles: IUserRole\r\n\t\tif(allowedPermissions.Roles && !self.isNullOrEmpty(allowedPermissions.Roles.Value)) \r\n\t\t{\r\n\t\t\tuserRoles = allowedPermissions.Roles;\r\n\t\t}\r\n\t\t\r\n\t\tlet userResourcePermissions: IUserResourcePermissions\t\t\r\n\t\tif(allowedPermissions.ResourcePermissions && !self.isNullOrEmpty(allowedPermissions.ResourcePermissions.Value)) \r\n\t\t{\r\n\t\t\tuserResourcePermissions = allowedPermissions.ResourcePermissions;\r\n\t\t}\r\n\r\n\t\tvar areRolesAuthorized = () => {\r\n\t\t\treturn self.hasUserRoles(userRoles);\t\t\r\n\t\t}\r\n\t\tvar areResourcesAuthorized = () => {\r\n\t\t\treturn self.hasResourcePermissions(userResourcePermissions);\r\n\t\t}\r\n\r\n\t\tif(authorizeRolesAndResources){\r\n\t\t\treturn (areRolesAuthorized() && areResourcesAuthorized());\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn (areRolesAuthorized() || areResourcesAuthorized());\r\n\t\t}\r\n\t}\t\t\r\n\t\r\n\tprivate isStateAuthorized(state: IStateConfig): boolean \r\n\t{\r\n\t\tconst self = this;\r\n\t\tconst authorizationRules = self.getStateAuthorizationRules(state)\r\n\r\n\t\tif (self.isNullOrEmpty(authorizationRules) || self.isNullOrEmpty(authorizationRules.AllowedPermissions)) return true; //if no auth rules defined, the state is authorized by default\r\n\t\t\r\n\t\tif (self.rootScope.actOnBehalfOfUserActive && authorizationRules.IsRestrictedInObo === true)\r\n\t\t\treturn false;\r\n\r\n\t\t/*check if either admin or user state is authorized*/\r\n\t\treturn self.hasUserPermissions(authorizationRules.AllowedPermissions) || (state.data && state.data[\"partnerAppName\"] ? self.isAppAdmin(state.data[\"partnerAppName\"]) : false);\r\n\t}\t\r\n\r\n\tprivate getStateAuthorizationRules(state: IStateConfig) : IStateAuthorizationRule\r\n\t{\r\n\t\tconst self = this;\r\n\t\tconst stateName = state.name\r\n\t\tlet authRules = self.fxpConfigurationService.FxpBaseConfiguration.AuthorizationRules.filter(function (item) {\r\n\t\t\treturn (item.StateName === stateName);\r\n\t\t})[0];\r\n\t\tif(!self.isNullOrEmpty(authRules))\r\n\t\t{\r\n\t\t\treturn authRules; // auth rules for the state in startup config takes precedence over partner app config\r\n\t\t}\t\r\n\t\t\r\n\t\treturn state.authorizationRules;\r\n\t}\r\n\r\n\tprivate getAppAdminRules(appName : string) : IUserPermission\r\n\t{\r\n\t\tconst self = this;\r\n\t\tlet adminRules;\r\n\t\tif(!self.isNullOrEmpty(appName))\r\n\t\t{\r\n\t\t\tconst appConfig = PartnerAppRegistrationService.angularPartnerStateConfig.find(s => s.applicationName.toLowerCase() === appName.toLowerCase());\r\n\t\t\tif(appConfig)\r\n\t\t\t{\r\n\t\t\t\tadminRules = appConfig.adminRules\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn adminRules;\r\n\t}\t\r\n\r\n\tprivate getClaimsList(roles: Array, resourcePermissions: Array)\r\n\t{\r\n\t\tconst self = this;\r\n\t\tconst tenantClaims = {};\r\n\r\n\t\tconst apps = self.getAppList(roles, resourcePermissions);\r\n\t\t\r\n\t\t/*get claims as per app Id passed in auth rule*/\r\n\t\tapps.forEach(app => {\r\n try {\r\n tenantClaims[app] = self.userClaimsService.getUserTenantClaims(app);\r\n } catch (e) {\r\n }\r\n\t\t});\r\n\t\treturn tenantClaims;\r\n\t}\r\n\r\n\tprivate getAppList(roles: Array, resourcePermissions: Array = null): Array\r\n\t{\r\n\t\tlet apps = [];\r\n\t\tif(roles)\r\n\t\t{\r\n\t\t\tapps = apps.concat(roles.map((role) => {\r\n\t\t\t\treturn role.split(\".\")[0];\r\n\t\t\t}));\r\n\t\t}\r\n\t\tif(resourcePermissions)\r\n\t\t{\r\n\t\t\tapps = apps.concat(resourcePermissions.map((permission) => {\t\t\t\t\r\n\t\t\t\treturn permission.Resource.split(\".\")[0];\r\n\t\t\t}));\r\n\t\t}\r\n\r\n\t\t/*remove duplicates from app list to avoid calling claims service repeatedly for same app */\r\n\t\tapps = apps.filter((el, i, a) => i === a.indexOf(el))\r\n\t\t\r\n\t\treturn apps;\r\n\t}\t\r\n\r\n\tprivate checkRoleFunc(item: string, tenantClaims) : boolean\r\n\t{\r\n\t\tconst self = this;\r\n\t\tlet hasRoles = false;\r\n\t\tif(!self.isNullOrEmpty(item))\r\n\t\t{\r\n\t\t\tconst[npd, role] = item.split(\".\");\r\n\t\t\tconst NPDClaims = tenantClaims[npd];\r\n\t\t\tif (NPDClaims && NPDClaims.claims.roles.hasOwnProperty(role) === true) {\r\n\t\t\t\thasRoles = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn hasRoles;\r\n\t}\t\r\n\r\n\tprivate checkResourcePermissionFunc(item: IResourcePermission, tenantClaims) : boolean\r\n\t{\r\n\t\tconst self = this;\r\n\t\tlet hasPermissions = false;\r\n\t\tif(item && !self.isNullOrEmpty(item.Resource))\r\n\t\t{\r\n\t\t\tconst[npd, resource] = item.Resource.split(\".\");\r\n\t\t\tconst NPDClaims = tenantClaims[npd];\r\n\t\t\tif (NPDClaims && NPDClaims.claims.resourcePermissions) {\r\n\t\t\t\tconst resourcePermission = NPDClaims.claims.resourcePermissions.find((r) => (r.resource.toLowerCase() == resource.toLowerCase()));\r\n\t\t\t\tif (resourcePermission && resourcePermission.resource) {\r\n\t\t\t\t\tif(!item.Permissions || self.isNullOrEmpty(item.Permissions.Value)) //if no permissions mentioned only check on resource\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\thasPermissions = true;\r\n\t\t\t\t\t\treturn hasPermissions;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tconst allPermissionsMandatory = item.Permissions.AllPermissionsMandatory;\r\n\t\t\t\t\tif(allPermissionsMandatory)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\thasPermissions = item.Permissions.Value.every(p=> resourcePermission.permissions.includes(p));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\thasPermissions = item.Permissions.Value.some(p=> resourcePermission.permissions.includes(p));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn hasPermissions;\r\n\t}\t\t\r\n}\r\n","import { IRootScope } from \"../interfaces/IRootScope\";\r\nimport { ILogger } from \"../interfaces/ILogger\";\r\nimport { TelemetryContext } from \"../telemetry/telemetrycontext\";\r\nimport { CommonUtils } from \"../utils/CommonUtils\";\r\nimport {\r\n ApplicationConstants,\r\n FxpConstants,\r\n} from \"../common/ApplicationConstants\";\r\nimport { FxpLogHelper } from \"../telemetry/FxpLogHelper\";\r\nimport { FxpStorageService } from \"./FxpStorageService\";\r\nimport { UserInfoService } from \"./UserInfoService\";\r\nimport { DashboardService } from \"./dashboardService\";\r\nimport { FxpConfigurationService } from \"./FxpConfiguration\";\r\nimport { StateService } from \"@uirouter/core\";\r\nimport { IFxPService } from \"../interfaces/IFxpService\";\r\nimport { FxpGlobalStoreService } from \"../services/fxp.global.store.service\";\r\nimport { TelemetryConstants } from \"../telemetry/TelemetryConst\";\r\nimport { FeatureUsageEvent } from \"../telemetry/FeatureUsageEvent\";\r\nimport {\r\n ActionStatus,\r\n ActionType,\r\n ComponentType,\r\n EventName,\r\n} from \"@microsoftit/telemetry-extensions-npm\";\r\n/**\r\n * @application Fxp\r\n */\r\n/**\r\n * @module Fxp.Services\r\n */\r\n/**\r\n * A service to connect to FxpBreadcrumbService to maintain breadcrumb across all routes\r\n * @class Fxp.Services.FxpBreadcrumbService\r\n * @classdesc A service to connect to FxpBreadcrumbService to maintain breadcrumb\r\n * @example Example to create an instance of FxpBreadcrumbService\r\n * //Initializing FxpBreadcrumbService\r\n * angular.module('FxPApp').controller('LeftNavController', ['FxpBreadcrumbService', LeftNavController]);\r\n * function LeftNavController(FxpBreadcrumbService){ FxpBreadcrumbService.setBreadcrumbsObj(userAlias,roleGroupId); }\r\n */\r\nexport class FxpBreadcrumbService implements IFxPService {\r\n private $state;\r\n private $rootScope: IRootScope;\r\n private $q: angular.IQService;\r\n private fxpStorageService: FxpStorageService;\r\n private static _instance: FxpBreadcrumbService;\r\n private userInfoService: UserInfoService;\r\n private dashboardService: DashboardService;\r\n private fxpConfigurationService: FxpConfigurationService;\r\n private fxpLogger: ILogger;\r\n private fxpTelemetryContext: TelemetryContext;\r\n private sourceForTelemetry = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.FxpBreadcrumbService`;\r\n public isLeftNavItemClicked: boolean;\r\n\r\n constructor(\r\n $state: StateService,\r\n $q: angular.IQService,\r\n $rootScope: IRootScope,\r\n fxpStorageService: FxpStorageService,\r\n userInfoService: UserInfoService,\r\n dashboardService: DashboardService,\r\n fxpConfigurationService: FxpConfigurationService,\r\n fxpLogger: ILogger,\r\n fxpTelemetryContext: TelemetryContext,\r\n private globalStore: FxpGlobalStoreService\r\n ) {\r\n this.$state = $state;\r\n this.$q = $q;\r\n this.fxpStorageService = fxpStorageService;\r\n this.userInfoService = userInfoService;\r\n this.dashboardService = dashboardService;\r\n this.fxpConfigurationService = fxpConfigurationService;\r\n this.fxpTelemetryContext = fxpTelemetryContext;\r\n this.fxpLogger = fxpLogger;\r\n this.$rootScope = $rootScope;\r\n this.isLeftNavItemClicked = false;\r\n }\r\n\r\n /**\r\n * Create the breadcrumb item and update the breadcrumb Array\r\n * @method Fxp.Services.FxpBreadcrumbService.setBreadcrumbFromRoute\r\n * @param {toState } toState current state object.\r\n * @example Example to invoke setBreadcrumbFromRoute\r\n * FxpBreadcrumbService.setBreadcrumbFromRoute();\r\n */\r\n setBreadcrumbFromRoute(toState: any): void {\r\n var self = this;\r\n var breadcrumbText = !CommonUtils.isNullOrEmpty(toState.data.breadcrumbText)\r\n ? toState.data.breadcrumbText\r\n : \"\";\r\n var href = self.$state.href(toState.name);\r\n if (!breadcrumbText || !href || href.indexOf(\"//\") > -1)\r\n //Don't update breadcrumb for invalid urls'\r\n return;\r\n self.setCurrentPageBreadcrumb({\r\n displayName: breadcrumbText,\r\n href: href,\r\n });\r\n }\r\n\r\n /**\r\n * Set the Breadcrumb for Current Page\r\n * @method Fxp.Services.FxpBreadcrumbService.setCurrentPageBreadcrumb\r\n * @param {breadcrumbItem } breadcrumbItem breadcrumbItem of current page.\r\n * @example Example to invoke setCurrentPageBreadcrumb\r\n * FxpBreadcrumbService.setCurrentPageBreadcrumb(breadcrumbItem);\r\n */\r\n setCurrentPageBreadcrumb(breadcrumbItem: any): void {\r\n var self = this;\r\n var currentStateName = self.$state.current.name;\r\n self.startNewBreadcrumbOnSpecificState(currentStateName);\r\n if (self.isLeftNavItemClicked) {\r\n self.$rootScope.fxpBreadcrumb = new Array();\r\n }\r\n self.setBreadcrumb(breadcrumbItem);\r\n self.isLeftNavItemClicked = false;\r\n }\r\n\r\n /**\r\n * Add breadcrumb item by partners\r\n * @method Fxp.Services.FxpBreadcrumbService.setBreadcrumbItem\r\n * @param {breadcrumbItem } breadcrumbItem breadcrumbItem object.\r\n * @example Example to invoke setBreadcrumbItem\r\n * FxpBreadcrumbService.setBreadcrumbItem(breadcrumbItem);\r\n */\r\n setBreadcrumbItem(breadcrumbItem: any): void {\r\n var self = this;\r\n self.setBreadcrumb(breadcrumbItem);\r\n }\r\n\r\n /**\r\n * Save and Get the breadcrumb array in $rootScope.fxpBreadcrumb and localStorage\r\n * @method Fxp.Services.FxpBreadcrumbService.setBreadcrumb\r\n * @param {breadcrumbItem } breadcrumbItem breadcrumbItem object.\r\n * @example Example to invoke setBreadcrumb\r\n * FxpBreadcrumbService.setBreadcrumb(breadcrumbItem);\r\n */\r\n private setBreadcrumb(breadcrumbItem: any): void {\r\n var self = this;\r\n var storageKey =\r\n self.userInfoService.getCurrentUser() +\r\n \"-\" +\r\n ApplicationConstants.FxpBreadcrumbStorageKey;\r\n var userNavigatedStatesWithBreadcrumb =\r\n self.fxpStorageService.getFromLocalStorage(storageKey) || {};\r\n var newTabBreadcrumbStorageKey = CommonUtils.hashCode(breadcrumbItem.href);\r\n var prevSessionBreadcrumbArray = self.fxpStorageService.getFromLocalStorage(\r\n newTabBreadcrumbStorageKey\r\n );\r\n if (prevSessionBreadcrumbArray) {\r\n self.$rootScope.fxpBreadcrumb = prevSessionBreadcrumbArray;\r\n self.fxpStorageService.deleteFromLocalStorage(newTabBreadcrumbStorageKey);\r\n }\r\n if (!self.$rootScope.fxpBreadcrumb)\r\n self.$rootScope.fxpBreadcrumb = new Array();\r\n var expectedBreadcrumbForCurrentState =\r\n self.getExpectedBreadcrumbForCurrentState(\r\n self.$rootScope.fxpBreadcrumb,\r\n breadcrumbItem\r\n );\r\n var breadcrumbArraySearchKey = CommonUtils.hashCode(\r\n self.$state.current.name.toLowerCase() +\r\n \"_\" +\r\n (breadcrumbItem.href ? breadcrumbItem.href.toLowerCase() : \"\") +\r\n \"_\" +\r\n breadcrumbItem.displayName.toLowerCase()\r\n );\r\n var isBreadcrumbStateExist =\r\n userNavigatedStatesWithBreadcrumb.hasOwnProperty(\r\n breadcrumbArraySearchKey\r\n );\r\n if (!isBreadcrumbStateExist) {\r\n self.$rootScope.fxpBreadcrumb = self.updateBreadcrumb(\r\n self.$rootScope.fxpBreadcrumb,\r\n breadcrumbItem\r\n );\r\n userNavigatedStatesWithBreadcrumb[breadcrumbArraySearchKey] =\r\n self.$rootScope.fxpBreadcrumb;\r\n self.fxpStorageService.saveInLocalStorage(\r\n storageKey,\r\n userNavigatedStatesWithBreadcrumb\r\n );\r\n } else {\r\n if (\r\n (self.$rootScope.fxpBreadcrumb === undefined ||\r\n self.$rootScope.fxpBreadcrumb.length == 0) &&\r\n !self.isLeftNavItemClicked\r\n ) {\r\n self.$rootScope.fxpBreadcrumb =\r\n userNavigatedStatesWithBreadcrumb[breadcrumbArraySearchKey];\r\n return;\r\n }\r\n var storedBreadcrumbForCurrentState =\r\n userNavigatedStatesWithBreadcrumb[breadcrumbArraySearchKey];\r\n if (\r\n CommonUtils.hashCode(\r\n JSON.stringify(expectedBreadcrumbForCurrentState)\r\n ) ===\r\n CommonUtils.hashCode(JSON.stringify(storedBreadcrumbForCurrentState))\r\n ) {\r\n self.$rootScope.fxpBreadcrumb = storedBreadcrumbForCurrentState;\r\n } else {\r\n self.$rootScope.fxpBreadcrumb = expectedBreadcrumbForCurrentState;\r\n userNavigatedStatesWithBreadcrumb[breadcrumbArraySearchKey] =\r\n expectedBreadcrumbForCurrentState;\r\n self.fxpStorageService.saveInLocalStorage(\r\n storageKey,\r\n userNavigatedStatesWithBreadcrumb\r\n );\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * check if breadcrumb item is exist or not in current breadcrumb list\r\n * @method Fxp.Services.FxpBreadcrumbService.updateBreadcrumb\r\n * @param {breadcrumbList } breadcrumbList breadcrumb list\r\n * @param {breadcrumbItem } breadcrumbItem breadcrumbItem\r\n * @example Example to invoke updateBreadcrumb\r\n * FxpBreadcrumbService.updateBreadcrumb(breadcrumbList, breadcrumbItem);\r\n */\r\n private updateBreadcrumb(breadcrumbList: any, breadcrumbItem: any): any {\r\n var breadcrumbItemIndex = -1;\r\n for (let i = 0, length = breadcrumbList.length; i < length; i++) {\r\n if (\r\n breadcrumbList[i].displayName.toLowerCase() ===\r\n breadcrumbItem.displayName.toLowerCase()\r\n ) {\r\n breadcrumbItemIndex = i;\r\n breadcrumbList[i].href = breadcrumbItem.href;\r\n break;\r\n }\r\n }\r\n if (breadcrumbItemIndex > -1) {\r\n breadcrumbList.splice(breadcrumbItemIndex + 1);\r\n } else {\r\n breadcrumbList.push(breadcrumbItem);\r\n }\r\n return breadcrumbList;\r\n }\r\n\r\n /**\r\n * expected breadcrumb when we visit the page.\r\n * @method Fxp.Services.FxpBreadcrumbService.getExpectedBreadcrumbForCurrentState\r\n * @param {breadcrumbList } breadcrumbList breadcrumb list\r\n * @param {breadcrumbItem } breadcrumbItem breadcrumbItem\r\n * @example Example to invoke getExpectedBreadcrumbForCurrentState\r\n * FxpBreadcrumbService.getExpectedBreadcrumbForCurrentState(breadcrumbList, breadcrumbItem);\r\n */\r\n private getExpectedBreadcrumbForCurrentState(\r\n breadcrumbList: any,\r\n breadcrumbItem: any\r\n ): any {\r\n var self = this;\r\n return self.updateBreadcrumb(angular.copy(breadcrumbList), breadcrumbItem);\r\n }\r\n\r\n /**\r\n * in special case where a breadcrumb start as fresh\r\n * @method Fxp.Services.FxpBreadcrumbService.startNewBreadcrumbOnSpecificState\r\n * @param {currentStateName } currentStateName current state name.\r\n * @example Example to invoke startNewBreadcrumbOnSpecificState\r\n * FxpBreadcrumbService.startNewBreadcrumbOnSpecificState(currentStateName);\r\n */\r\n private startNewBreadcrumbOnSpecificState(currentStateName): void {\r\n var self = this;\r\n var nonGLNStateCollectionForBreadcrumb =\r\n self.fxpConfigurationService.FxpBaseConfiguration\r\n .NonGLNStateCollectionForBreadcrumb;\r\n var isStateAvailable = nonGLNStateCollectionForBreadcrumb.some((item) => {\r\n return item.toLowerCase() === currentStateName.toLowerCase();\r\n });\r\n if (isStateAvailable) {\r\n self.$rootScope.fxpBreadcrumb = new Array();\r\n }\r\n }\r\n\r\n /**\r\n * Breadcrumb info capture in Telemetry when user navigate different link options\r\n * @method Fxp.Services.FxpBreadcrumbService.logBreadcrumbTelemetryInfo\r\n * @example Example to invoke logBreadcrumbTelemetryInfo\r\n * FxpBreadcrumbService.logBreadcrumbTelemetryInfo();\r\n */\r\n public logBreadcrumbTelemetryInfo(type: string, breadcrumbItem: any): void {\r\n var self = this,\r\n propBag,\r\n userInfo,\r\n breadcrumbString;\r\n var profile = self.globalStore.GetPlatformState().LoggedInUser.Profile;\r\n if (!CommonUtils.isNullOrEmpty(profile)) userInfo = JSON.stringify(profile);\r\n if (!self.$rootScope.fxpBreadcrumb || !userInfo) return;\r\n\r\n var loginUserInfo = JSON.parse(userInfo);\r\n\r\n if (CommonUtils.isNullOrEmpty(breadcrumbItem)) {\r\n breadcrumbString = self.$rootScope.fxpBreadcrumb\r\n .map(function (breadcrumbItem) {\r\n return breadcrumbItem.displayName;\r\n })\r\n .join(\" > \");\r\n } else {\r\n //To handle breadcrumb text on breadcrumb Click, Need to build breadcrumb text by the item clicked.\r\n var breadcrumbForClick = self.updateBreadcrumb(\r\n self.$rootScope.fxpBreadcrumb,\r\n breadcrumbItem\r\n );\r\n breadcrumbString = breadcrumbForClick\r\n .map(function (breadcrumbItem) {\r\n return breadcrumbItem.displayName;\r\n })\r\n .join(\" > \");\r\n }\r\n\r\n propBag = self.fxpLogger.createPropertyBag();\r\n propBag.addToBag(\r\n FxpConstants.metricConstants.SessionId,\r\n self.$rootScope.sessionId\r\n );\r\n propBag.addToBag(\r\n FxpConstants.metricConstants.UserBusinessRole,\r\n loginUserInfo.businessRole\r\n );\r\n\r\n if (self.userInfoService.isActingOnBehalfOf()) {\r\n var oboUserInfo;\r\n let profile = self.globalStore.GetPlatformState().CurrentUser.Profile;\r\n if (!CommonUtils.isNullOrEmpty(profile))\r\n oboUserInfo = JSON.stringify(profile);\r\n if (!oboUserInfo) return;\r\n var oboUserData = JSON.parse(oboUserInfo);\r\n propBag.addToBag(\r\n FxpConstants.metricConstants.OBOUserBusinessRole,\r\n oboUserData.OBOUserBusinessRole\r\n );\r\n }\r\n propBag.addToBag(\r\n FxpConstants.metricConstants.TimeStamp,\r\n FxpLogHelper.getTimeStamp()\r\n );\r\n propBag.addToBag(\r\n FxpConstants.metricConstants.BreadcrumbString,\r\n breadcrumbString\r\n );\r\n\r\n if (type === FxpConstants.BreadcrumbEventType.BreadcrumbClick) {\r\n self.fxpLogger.logInformation(\r\n self.sourceForTelemetry,\r\n `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.BreadcrumbItemClicked`,\r\n propBag\r\n );\r\n const breadcrumbFeature = new FeatureUsageEvent(\r\n `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.Breadcrumb`,\r\n ActionType.User,\r\n \"BreadcrumbClicked\",\r\n EventName.LinkClicked,\r\n ComponentType.Web\r\n );\r\n breadcrumbFeature.ActionStatus = ActionStatus.Succeeded;\r\n self.fxpLogger.logFeatureUsageEvent(\r\n self.sourceForTelemetry,\r\n breadcrumbFeature,\r\n propBag\r\n );\r\n } else {\r\n self.fxpLogger.logInformation(\r\n self.sourceForTelemetry,\r\n `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.BreadcrumbLoad`,\r\n propBag\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * Store the current fxpBreadcrumb array into localStorage with newTabBreadcrumbStorageKey\r\n * Before opening any link in newtab through click action, have to call setTempBreadcrumbArray\r\n * @method Fxp.Services.FxpBreadcrumbService.setTempBreadcrumbArray\r\n * @example Example to invoke setTempBreadcrumbArray\r\n * FxpBreadcrumbService.setTempBreadcrumbArray();\r\n */\r\n setTempBreadcrumbArray(url: string): void {\r\n var self = this;\r\n var newTabBreadcrumbStorageKey = CommonUtils.hashCode(url);\r\n self.fxpStorageService.saveInLocalStorage(\r\n newTabBreadcrumbStorageKey,\r\n self.$rootScope.fxpBreadcrumb\r\n );\r\n }\r\n\r\n /**\r\n * Partners can override the current State/Url breadcrumbItem displayName using this method\r\n * @method Fxp.Services.FxpBreadcrumbService.overrideBreadcrumbText\r\n * @param {breadcrumbText } breadcrumbText of the current state/url.\r\n * @example Example to invoke overrideBreadcrumbText\r\n * FxpBreadcrumbService.overrideBreadcrumbText(breadcrumbText);\r\n */\r\n overrideBreadcrumbText(breadcrumbText: string): void {\r\n var self = this;\r\n self.updateDisplayNameForCurrentBreadcrumbItem(breadcrumbText);\r\n }\r\n\r\n /**\r\n * Update the DisplayName of current State/Url breadcrumbItem\r\n * @method Fxp.Services.FxpBreadcrumbService.updateDisplayNameForCurrentBreadcrumbItem\r\n * @param {breadcrumbText } breadcrumbText of the current state/url.\r\n * @example Example to invoke updateDisplayNameForCurrentBreadcrumbItem\r\n * FxpBreadcrumbService.updateDisplayNameForCurrentBreadcrumbItem(breadcrumbText);\r\n */\r\n updateDisplayNameForCurrentBreadcrumbItem(breadcrumbText: string): void {\r\n var self = this;\r\n if (\r\n self.$rootScope.fxpBreadcrumb &&\r\n self.$rootScope.fxpBreadcrumb.length > 0\r\n ) {\r\n self.$rootScope.fxpBreadcrumb[\r\n self.$rootScope.fxpBreadcrumb.length - 1\r\n ].displayName = breadcrumbText;\r\n }\r\n }\r\n\r\n /**\r\n * Method to get the index of breadcrumbItem from breadcrumb context.\r\n * @method Fxp.Services.FxpBreadcrumbService.getBreadcrumbItemIndex\r\n * @param {fxpBreadcrumbContext } fxpBreadcrumbContext is an array.\r\n * @param {breadcrumbName } breadcrumbName is the displayName of the breadcrumbItem.\r\n * @example Example to invoke getBreadcrumbItemIndex\r\n * FxpBreadcrumbService.getBreadcrumbItemIndex(fxpBreadcrumbContext, breadcrumbItem);\r\n */\r\n getBreadcrumbItemIndex(\r\n fxpBreadcrumbContext: any,\r\n breadcrumbName: string\r\n ): number {\r\n if (!fxpBreadcrumbContext || !breadcrumbName) {\r\n return -1;\r\n }\r\n for (var i = 0; i < fxpBreadcrumbContext.length; i++) {\r\n if (\r\n fxpBreadcrumbContext[i].displayName.toLowerCase() ===\r\n breadcrumbName.toLowerCase()\r\n ) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n }\r\n\r\n /**\r\n * Method to save the context of breadcrumb for the current state/url in local storage.\r\n * @method Fxp.Services.FxpBreadcrumbService.saveBreadcrumbContextForCurrentState\r\n * @example Example to invoke saveBreadcrumbContextForCurrentState\r\n * FxpBreadcrumbService.saveBreadcrumbContextForCurrentState(breadcrumbArray);\r\n */\r\n saveBreadcrumbContextForCurrentState(): void {\r\n var self = this;\r\n var breadcrumbLastItem =\r\n self.$rootScope.fxpBreadcrumb[self.$rootScope.fxpBreadcrumb.length - 1];\r\n var storageKey =\r\n self.userInfoService.getCurrentUser() +\r\n \"-\" +\r\n ApplicationConstants.FxpBreadcrumbStorageKey;\r\n var userNavigatedStatesWithBreadcrumb =\r\n self.fxpStorageService.getFromLocalStorage(storageKey) || {};\r\n var breadcrumbArraySearchKey = CommonUtils.hashCode(\r\n self.$state.current.name.toLowerCase() +\r\n \"_\" +\r\n (breadcrumbLastItem.href ? breadcrumbLastItem.href.toLowerCase() : \"\") +\r\n \"_\" +\r\n breadcrumbLastItem.displayName.toLowerCase()\r\n );\r\n userNavigatedStatesWithBreadcrumb[breadcrumbArraySearchKey] =\r\n self.$rootScope.fxpBreadcrumb;\r\n self.fxpStorageService.saveInLocalStorage(\r\n storageKey,\r\n userNavigatedStatesWithBreadcrumb\r\n );\r\n }\r\n\r\n /**\r\n * Method to update the url of breadcrumbItem which is sent by partners.\r\n * @method Fxp.Services.FxpBreadcrumbService.updateBreadcrumbUrlByName\r\n * @param {breadcrumbName } breadcrumbName is the displayName of the breadcrumbItem.\r\n * @param {newUrl } newUrl is href of breadcrumbItem.\r\n * @example Example to invoke updateBreadcrumbUrlByName\r\n * FxpBreadcrumbService.updateBreadcrumbUrlByName(breadcrumbName, newUrl);\r\n */\r\n updateBreadcrumbUrlByName(breadcrumbName: string, newUrl: string): void {\r\n var self = this;\r\n var breadcrumbItemIndex = self.getBreadcrumbItemIndex(\r\n self.$rootScope.fxpBreadcrumb,\r\n breadcrumbName\r\n );\r\n if (breadcrumbItemIndex > -1) {\r\n self.$rootScope.fxpBreadcrumb[breadcrumbItemIndex].href = newUrl;\r\n }\r\n self.saveBreadcrumbContextForCurrentState();\r\n }\r\n}\r\n","export enum FxpBroadcastedEvents {\r\n OnUserContextChanged = \"UserContextChanged\",\r\n OnLeftNavHighlightByStateName = \"HighlightLeftNavByStateName\",\r\n OnLeftNavToggleExpandedState = \"toggleLeftNavExpandedState\",\r\n OnLeftNavTogglePinState = \"toggleLeftNavPinState\",\r\n OnFxpLoadCompleted = \"OnFxpLoadedEvent\",\r\n OnAppHeaderChanged = \"AppHeaderChanged\",\r\n OnPageTitleChanged = \"PageTitleChanged\",\r\n OnFeedbackContextChanged = \"FeedbackContext\",\r\n OnFeedbackConfigurationChanged = \"FeedbackConfiguration\",\r\n OnNewNotificationsRecieved = \"newNotifications\",\r\n OnShowHideInlineLoader = \"showHideInlineLoader\",\r\n OnBasicUserProfileRefresh = \"GetLatestBasicUserProfile\",\r\n OnLayoutChanged = \"layoutChanged\",\r\n OnPageLoadComplete = \"OnPageLoadComplete\",\r\n OnUserSessionTimeout = \"FxPUserSessionTimeout\",\r\n OnLaunchIrisBot = 'LaunchIrisBot',\r\n\tOnHideIrisBot = 'HideIrisBot',\r\n OnPageTourFlyoutOpened = 'PageTourFlyoutOpened',\r\n OnPageTourFlyoutClosed = 'PageTourFlyoutClosed',\r\n LaunchHelpSection = 'LaunchHelpSection',\r\n HidePageTour = 'HidePageTour',\r\n ShowPageTour = 'ShowPageTour',\r\n ActOnBehalfClosed = \"ActOnBehalfClosed\",\r\n ShowPopupOnPageDirty = \"ShowPopupOnPageDirty\"\r\n}","import { IFxPService } from \"../interfaces/IFxpService\";\r\n\r\n/**\r\n * @application Fxp\r\n */\r\n/**\r\n * @module Fxp.Services\r\n */\r\n/**\r\n * A service to keep all the configurations used for the application in \r\n * @class Fxp.Services.FxpConfiguration\r\n * @classdesc A service to keep all the settings required for base, application and telemetry settings \r\n * @example Example to use one from FxpConfiguration \r\n * //Using in a Controller\r\n * angular.module('FxPApp').controller('AppController', ['FxpConfigurationService', AppController]);\r\n * function AppController(fxpConfigurationService){ var appSettings = fxpConfigurationService.fxpAppSettings; }\r\n */\r\nexport class FxpConfigurationService implements IFxPService {\r\n\tpublic fxpAppSettings = window[\"FxpAppSettings\"];\r\n\t//TODO: Below two config's should be fetched through Confit service connected from client side\r\n\tprivate fxpBaseConfiguration = window[\"FxpBaseConfiguration\"];\r\n\tprivate modelConfiguration = window[\"ModelConfiguration\"];\r\n\r\n\tpublic get FxpAppSettings(): any {\r\n\t\treturn this.fxpAppSettings;\r\n\t}\r\n\r\n\tget FxpBaseConfiguration(): any {\r\n\t\treturn this.fxpBaseConfiguration;\r\n\t}\r\n\r\n\tget ModelConfiguration(): any {\r\n\t\treturn this.modelConfiguration;\r\n\t}\r\n\r\n\tGetConfiguration(config: string): any {\r\n\r\n\t\tif (window[\"tenantConfiguration\"] && window[\"tenantConfiguration\"][config]) {\r\n\t\t\treturn window[\"tenantConfiguration\"][config];\r\n\t\t}\r\n\t\telse if (this.FxpBaseConfiguration && this.FxpBaseConfiguration[config]) {\r\n\t\t\treturn this.FxpBaseConfiguration[config];\r\n\t\t}\r\n\t\telse if (this.FxpAppSettings && this.FxpAppSettings[config]) {\r\n\t\t\treturn this.FxpAppSettings[config];\r\n\t\t}\r\n\t\telse return;\r\n\r\n\t}\r\n\r\n}","import { ILogger } from \"../interfaces/ILogger\";\r\nimport { TelemetryContext } from \"../telemetry/telemetrycontext\";\r\nimport { FxpConstants } from \"../common/ApplicationConstants\";\r\nimport { UserInfoService } from \"./UserInfoService\";\r\nimport { UserProfileService } from \"./userProfileService\";\r\nimport { FxpBroadcastedEvents } from \"./FxpBroadcastedEvents\";\r\nimport { IFxPService } from \"../interfaces/IFxpService\";\r\nimport { TelemetryConstants } from \"../telemetry/TelemetryConst\";\r\nimport { ErrorCodes } from \"../constants/errorCodes\";\r\nimport { ErrorSeverityLevel } from \"../telemetry/ErrorSeverityLevel\";\r\n\r\nexport class FxpFeedbackService implements IFxPService {\r\n\tprivate fxplogger: ILogger;\r\n\tprivate userInfoService: UserInfoService;\r\n\tprivate fxpTelemetryContext: TelemetryContext;\r\n\tprivate userProfileService: UserProfileService;\r\n\tprivate rootscope: angular.IRootScopeService;\r\n\tprivate feedbackRouteData: any = {};\r\n\tprivate feedbackPropBag = {};\r\n\tprivate _feedbackItemCollection: any = [];\r\n\tprivate _userId: string = \"\";\r\n\tprivate _subscriprtionId: string = \"\";\r\n\tprivate _feedbackServiceEndpoint: string = \"\";\r\n\tprivate sourceForTelemetry = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.FeedbackService`;\r\n\tconstructor(loggerService: ILogger, rootscope: angular.IRootScopeService, userInfoService: UserInfoService, fxpTelemetryContext: TelemetryContext, userProfileService: UserProfileService) {\r\n\t\tthis.fxplogger = loggerService;\r\n\t\tthis.userInfoService = userInfoService;\r\n\t\tthis.rootscope = rootscope;\r\n\t\tthis.fxpTelemetryContext = fxpTelemetryContext;\r\n\t\tthis.userProfileService = userProfileService;\r\n\t}\r\n\r\n\t/**\r\n\t* sets setBrowserTitle of FeedbackService Context Object\r\n\t* @method Fxp.Services.FxpFeedbackService.setBrowserTitle\r\n\t* @param {string} setBrowserTitle a broser tab title.\r\n\t* @example Example to invoke setBrowserTitle\r\n\t* FeedbackWidgetContextService.setBrowserTitle('xxxxxx');\r\n\t*/\r\n\tsetBrowserTitle(browserTitle) {\r\n\t\tvar self = this;\r\n\t\tif (browserTitle) {\r\n\t\t\tself.feedbackRouteData[\"BrowserPageTitle\"] = browserTitle;\r\n\t\t\tself.addToFeedbackPropBag(\"BrowserPageTitle\", browserTitle);\r\n\t\t\tself.rootscope.$broadcast(FxpBroadcastedEvents.OnFeedbackContextChanged);\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t* sets setScreenRoute of FeedbackService Context Object\r\n\t* @method Fxp.Services.FxpFeedbackService.setScreenRoute\r\n\t* @param {object} currentRoute a user navigated screen Route.\r\n\t* @example Example to invoke setScreenRoute\r\n\t* Fxp.Services.FxpFeedbackService.setScreenRoute('xxxxxx');\r\n\t*/\r\n\tsetScreenRoute(currentRoute) {\r\n\t\tvar self = this;\r\n\t\tif (currentRoute) {\r\n\t\t\tself.feedbackRouteData[\"ScreenRoute\"] = currentRoute;\r\n\t\t\tself.addToFeedbackPropBag(\"ScreenRoute\", currentRoute);\r\n\t\t\tself.rootscope.$broadcast(FxpBroadcastedEvents.OnFeedbackContextChanged);\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t* sets setFeedbackServiceProperties for FeedbackService Context Object\r\n\t* @method Fxp.Services.FxpFeedbackService.setFeedbackServiceProperties\r\n\t* @param {object } usersDetails a userdetail object having userName, BusinessRole.\r\n\t* @example Example to invoke setFeedbackServiceProperties\r\n\t* Fxp.Services.FxpFeedbackService.setFeedbackServiceProperties();\r\n\t*/\r\n\tsetFeedbackServiceProperties(usersDetails) {\r\n\t\tvar self = this;\r\n\t\tself.removeFeedbackPropBagRange();\r\n\t\tself.addFeedbackPropBagRange(usersDetails);\r\n\t\tself.addFeedbackPropBagRange(self.getEnvironmentDetails());\r\n\t\tself.addFeedbackPropBagRange(self.feedbackRouteData);\r\n\t\tself.rootscope.$broadcast(FxpBroadcastedEvents.OnFeedbackContextChanged);\r\n\t}\r\n\r\n\t/**\r\n\t* get EnvironmentDetails for FeedbackService Context Object\r\n\t* @method Fxp.Services.FxpFeedbackService.getEnvironmentDetails\r\n\t* @example Example to invoke getEnvironmentDetails\r\n\t* Fxp.Services.FxpFeedbackService.getEnvironmentDetails();\r\n\t*/\r\n\tgetEnvironmentDetails(): any {\r\n\t\tvar self = this;\r\n\t\tvar feedbackEnvData = self.fxpTelemetryContext.getEnvironmentDetails(null);\r\n\t\tif (!feedbackEnvData)\r\n\t\t\treturn;\r\n\r\n\t\treturn {\r\n\t\t\tEnvironmentName: feedbackEnvData.EnvironmetName,\r\n\t\t\tService: feedbackEnvData.Service,\r\n\t\t\tServiceOffering: feedbackEnvData.ServiceOffering,\r\n\t\t\tServiceLine: feedbackEnvData.ServiceLine\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t* this method is used to accumulate all application specific proprities for FeedbackComponent\r\n\t* @method Fxp.Services.FxpFeedbackService.setUserDetailsToFeedback\r\n\t* @example Example to invoke setUserDetailsToFeedback\r\n\t* Fxp.Services.FxpFeedbackService.setUserDetailsToFeedback();\r\n\t*/\r\n\tsetUserDetailsToFeedback(): void {\r\n\t\tvar self = this, userDetails, oboUserBasicInfo;\r\n\t\tself.userProfileService.getBasicProfileByAlias(self.userInfoService.getLoggedInUser(), null).then(function (loginUserBasicInfo:any) {\r\n\t\t\tif (!loginUserBasicInfo)\r\n\t\t\t\treturn\r\n\r\n\t\t\tuserDetails =\r\n\t\t\t\t{\r\n\t\t\t\t\tUserId: self.userInfoService.getLoggedInUserUpn(),\r\n\t\t\t\t\tUserName: loginUserBasicInfo.fullName,\r\n\t\t\t\t\tBusinessRole: loginUserBasicInfo.businessRole,\r\n\t\t\t\t\tRoleGroupName: loginUserBasicInfo.roleGroupName\r\n\t\t\t\t}\r\n\r\n\t\t\tif (self.userInfoService.isActingOnBehalfOf()) {\r\n\t\t\t\toboUserBasicInfo = self.userInfoService.getCurrentUserData();\r\n\t\t\t\tif (!oboUserBasicInfo)\r\n\t\t\t\t\treturn\r\n\r\n\t\t\t\tuserDetails.OBOUserUPN = self.userInfoService.getCurrentUserUpn();\r\n\t\t\t\tuserDetails.OBOUserBusinessRole = oboUserBasicInfo.businessRole;\r\n\t\t\t\tuserDetails.OBOUserRoleGroupName = oboUserBasicInfo.roleGroupName;\r\n\t\t\t\tuserDetails.OBOUserName = oboUserBasicInfo.fullName;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tself.setFeedbackServiceProperties(userDetails);\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t* sets setUserId of FeedbackService Context Object\r\n\t* @method Fxp.Services.FxpFeedbackService.setUserDetails\r\n\t* @param {string} UserID a Logged IN setUserDetails in Application.\r\n\t* @example Example to invoke setUserDetails\r\n\t* FxpFeedbackService.setUserId('xxxxxx');\r\n\t*/\r\n\tsetUserId = function (userId) {\r\n\t\tvar self = this;\r\n\t\tself._userId = userId;\r\n\t};\r\n\r\n\t/**\r\n\t* getUserID of FeedbackService Context Object\r\n\t* @method Feedback.FeedbackWidgetContextService.getUserID\r\n\t* @example Example to invoke getUserID\r\n\t* FxpFeedbackService.getUserID();\r\n\t*/\r\n\tgetUserID = function () {\r\n\t\tvar self = this;\r\n\t\treturn self._userId;\r\n\t};\r\n\r\n\t/**\r\n\t* sets setFeedbackItemCollection of FeedbackWidget Context Object\r\n\t* @method Fxp.Services.FxpFeedbackService.setFeedbackItemCollection\r\n\t* @param { any} ItemCollection a feedback dropdown item collection\r\n\t* @example Example to invoke setFeedbackItemCollection\r\n\t* FxpFeedbackService.setFeedbackItemCollection('xxxxxx');\r\n\t*/\r\n\tsetFeedbackItemCollection = function (itemCollection) {\r\n\t\tvar self = this;\r\n\t\tself._feedbackItemCollection = itemCollection;\r\n\t\tself.rootscope.$broadcast(FxpBroadcastedEvents.OnFeedbackConfigurationChanged)\r\n\t};\r\n\r\n\t/**\r\n\t* get FeedbackItemCollection of FeedbackService Context Object\r\n\t* @method Fxp.Services.FxpFeedbackService.getFeedbackItemCollection\r\n\t* @example Example to invoke getFeedbackItemCollection\r\n\t* FxpFeedbackService.getFeedbackItemCollection();\r\n\t*/\r\n\tgetFeedbackItemCollection = function () {\r\n\t\tvar self = this;\r\n\t\treturn self._feedbackItemCollection;\r\n\t};\r\n\r\n\t/**\r\n\t* sets setFeedbackEndpoint of FeedbackService Context Object\r\n\t* @method Fxp.Services.FxpFeedbackService.setFeedbackEndpoint\r\n\t* @param {string} endpoint a feedback API Endpoint.\r\n\t* @example Example to invoke setFeedbackEndpoint\r\n\t* FxpFeedbackService.setFeedbackEndpoint('xxxxxx');\r\n\t*/\r\n\tsetFeedbackEndpoint = function (endpoint) {\r\n\t\tvar self = this;\r\n\t\tself._feedbackServiceEndpoint = endpoint;\r\n\t\tself.rootscope.$broadcast(FxpBroadcastedEvents.OnFeedbackConfigurationChanged)\r\n\t};\r\n\t/**\r\n\t* sets getFeedbackEndpoint of FeedbackService Context Object\r\n\t* @method Fxp.Services.FxpFeedbackService.getFeedbackEndpoint\r\n\t* @example Example to invoke getFeedbackEndpoint\r\n\t* FxpFeedbackService.getFeedbackEndpoint();\r\n\t*/\r\n\tgetFeedbackEndpoint = function () {\r\n\t\tvar self = this;\r\n\t\treturn self._feedbackServiceEndpoint;\r\n\t};\r\n\t/**\r\n\t* sets setSubsctiptionId of FeedbackService Context Object\r\n\t* @method Fxp.Services.FxpFeedbackService.setSubsctiptionId\r\n\t* @param {string} subsctiptionId a subscrption of consumer Id .\r\n\t* @example Example to invoke setSubsctiptionId\r\n\t* FxpFeedbackService.setSubsctiptionId('xxxxxx');\r\n\t*/\r\n\tsetSubscriprtionId = function (subscriprtionId) {\r\n\t\tvar self = this;\r\n\t\tself._subscriprtionId = subscriprtionId;\r\n\t\tself.rootscope.$broadcast(FxpBroadcastedEvents.OnFeedbackConfigurationChanged)\r\n\t};\r\n\r\n\t/**\r\n\t* getSubsctiptionId of FeedbackService Context Object\r\n\t* @method Fxp.Services.FxpFeedbackService.getSubsctiptionId\r\n\t* @example Example to invoke getSubsctiptionId\r\n\t* FxpFeedbackService.getSubsctiptionId();\r\n\t*/\r\n\tgetSubscriprtionId = function () {\r\n\t\tvar self = this;\r\n\t\treturn self._subscriprtionId;\r\n\t};\r\n\r\n\t/**\r\n\t* sets addToFeedbackPropBag of FeedbackService Context Object\r\n\t* @method Fxp.Services.FxpFeedbackService.addToFeedbackPropBag\r\n\t* @param {string} key a object key.\r\n\t* @param {string} value a object value.\r\n\t* @example Example to invoke addToFeedbackPropBag\r\n\t* FxpFeedbackService.addToFeedbackPropBag('key','value');\r\n\t*/\r\n\taddToFeedbackPropBag = function (key, value) {\r\n\t\tvar self = this;\r\n\t\tself.feedbackPropBag[key] = value;\r\n\t};\r\n\t/**\r\n\t* sets getFeedbackPropBagItems of FeedbackService Context Object\r\n\t* @method Feedback.FeedbackWidgetContextService.getItems\r\n\t* @example Example to invoke getFeedbackPropBagItems\r\n\t* FxpFeedbackService.getFeedbackPropBagItems();\r\n\t*/\r\n\tgetFeedbackPropBagItems = function () {\r\n\t\tvar self = this;\r\n\t\treturn self.feedbackPropBag;\r\n\t};\r\n\t/**\r\n\t * sets addFeedbackPropBagRange of FeedbackService Context Object\r\n\t * @method Fxp.Services.FxpFeedbackService.addRange\r\n\t * @param { object } properties is collection of properties like object.\r\n\t * @example Example to invoke addFeedbackPropBagRange\r\n\t * FxpFeedbackService.addFeedbackPropBagRange('xxxxxx');\r\n\t */\r\n\taddFeedbackPropBagRange = function (properties) {\r\n\t\tvar self = this;\r\n\t\tfor (var property in properties) {\r\n\t\t\tself.addToFeedbackPropBag(property, properties[property]);\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * removeFeedbackPropBagRange of FeedbackService Context Object\r\n\t * @method Fxp.Services.FxpFeedbackService.removeFeedbackPropBagRange\r\n\t * @example Example to invoke addRange\r\n\t * FxpFeedbackService.removeFeedbackPropBagRange();\r\n\t */\r\n\tremoveFeedbackPropBagRange = function () {\r\n\t\tvar self = this;\r\n\t\tif (self.feedbackPropBag)\r\n\t\t\tself.feedbackPropBag = {};\r\n\t};\r\n\r\n\t/**\r\n\t* sets removeFromFeedbackPropBag of FeedbackService Context Object\r\n\t* @method Fxp.Services.FxpFeedbackService.removeFromFeedbackPropBag\r\n\t* @param {string} key a property key.\r\n\t* @example Example to invoke key\r\n\t* FxpFeedbackService.removeFromFeedbackPropBag('xxxxxx');\r\n\t*/\r\n\tremoveFromFeedbackPropBag = function (key) {\r\n\t\tvar self = this;\r\n\t\tdelete self.feedbackPropBag[key];\r\n\t};\r\n\r\n\r\n\t/**\r\n\t*A method to use the log the UserFeedback Information.\r\n\t* @method Fxp.Services.FxpFeedbackService.logFeedbackInformation\r\n\t* @param {feedbackInfo } toState feedbackInfo.\r\n\t* @param {feedbackStatusInfo } toState feedbackStatusInfo.\r\n\t* @param {status } toState status.\r\n\t* @param {error } toState error.\r\n\t* @example Example to use logFeedbackInformation\r\n\t* logFeedbackInformation(feedbackInfo: any, feedbackStatusInfo: string, status: string, error: any)\r\n\t*/\r\n\tlogFeedbackInformation(feedbackInfo: any, feedbackStatusInfo: string, status: string, error: any): void {\r\n\t\tvar self = this, propBag;\r\n\t\tconst telemetry_source = `${this.sourceForTelemetry}.LogFeedbackInformation`;\r\n\t\tpropBag = self.fxplogger.createPropertyBag();\r\n\t\tpropBag.addToBag(FxpConstants.metricConstants.UserUPN, feedbackInfo.userId);\r\n\t\tpropBag.addToBag(FxpConstants.metricConstants.UserBusinessRole, feedbackInfo.tags.BusinessRole);\r\n\t\tpropBag.addToBag(FxpConstants.metricConstants.UserRoleGroup, feedbackInfo.tags.RoleGroupName);\r\n\t\tpropBag.addToBag(FxpConstants.metricConstants.LoggedinUserName, feedbackInfo.tags.UserName);\r\n\t\tpropBag.addToBag(FxpConstants.metricConstants.BrowserPageTitle, feedbackInfo.tags.BrowserPageTitle);\r\n\t\tpropBag.addToBag(FxpConstants.metricConstants.FeedbackType, feedbackInfo.feedbackType);\r\n\t\tpropBag.addToBag(FxpConstants.metricConstants.Action, feedbackInfo.tags.Action);\r\n\t\tpropBag.addToBag(FxpConstants.metricConstants.UserFeedback, feedbackInfo.feedback);\r\n\t\tpropBag.addToBag(FxpConstants.metricConstants.BrowserType, feedbackInfo.tags.BrowserType);\r\n\t\tpropBag.addToBag(FxpConstants.metricConstants.BrowserVersion, feedbackInfo.tags.BrowserVersion);\r\n\t\tpropBag.addToBag(FxpConstants.metricConstants.OperatingSystem, feedbackInfo.tags.OperatingSystem);\r\n\t\tpropBag.addToBag(FxpConstants.metricConstants.ScreenRoute, feedbackInfo.tags.ScreenRoute);\r\n\t\tpropBag.addToBag(FxpConstants.metricConstants.DeviceType, feedbackInfo.tags.DeviceType);\r\n\t\tpropBag.addToBag(FxpConstants.metricConstants.TotalDuration, feedbackInfo.TotalDuration);\r\n\t\tpropBag.addToBag(FxpConstants.metricConstants.UIRenderDuration, feedbackInfo.UIRenderDuration);\r\n\r\n\t\tif (self.userInfoService.isActingOnBehalfOf()) {\r\n\t\t\tpropBag.addToBag(FxpConstants.metricConstants.OBOUserUPN, feedbackInfo.tags.OBOUserUPN);\r\n\t\t\tpropBag.addToBag(FxpConstants.metricConstants.OBOUserName, feedbackInfo.tags.OBOUserName);\r\n\t\t\tpropBag.addToBag(FxpConstants.metricConstants.OBOUserBusinessRole, feedbackInfo.tags.OBOUserBusinessRole);\r\n\t\t\tpropBag.addToBag(FxpConstants.metricConstants.OBOUserRoleGroupName, feedbackInfo.tags.OBOUserRoleGroupName);\r\n\t\t}\r\n\r\n\t\tif (status === FxpConstants.messageType.success)\r\n\t\t\tself.fxplogger.logInformation(telemetry_source, feedbackStatusInfo, propBag);\r\n\r\n\t\tif (status === FxpConstants.messageType.error)\r\n\t\t\tself.fxplogger.logError(telemetry_source, feedbackStatusInfo + \". Error Message: \" + error, ErrorCodes.FeedbackService_Error, null, propBag, null, null, ErrorSeverityLevel.Medium);\r\n\t}\r\n}\r\n","import { IFxPService } from \"../interfaces/IFxpService\";\r\n\r\n//import { Observable , from as fromPromise } from 'rxjs';\r\n\r\nexport class FxpHttpService implements IFxPService {\r\n constructor(private $http: angular.IHttpService) {\r\n }\r\n\r\n private toEs6Promise(qPromise: any) {\r\n return new Promise(function (resolve, reject) {\r\n qPromise.then(function (response) {\r\n resolve(response);\r\n }).catch(function (reason) {\r\n reject(reason);\r\n })\r\n });\r\n }\r\n get(url: string, headers?: any, responseType?: string): Promise {\r\n var self = this;\r\n return this.toEs6Promise(self.$http.get(url, { headers: headers, responseType: responseType }));\r\n }\r\n put(url: string, data: any, headers?: any): Promise {\r\n var self = this;\r\n return this.toEs6Promise(self.$http.put(url, data, { headers: headers }));\r\n }\r\n patch(url: string, data: any, headers?: any): Promise {\r\n var self = this;\r\n return this.toEs6Promise(self.$http.patch(url, data, { headers: headers }));\r\n }\r\n post(url: string, data: any, headers?: any, responseType?: string): Promise {\r\n var self = this;\r\n return this.toEs6Promise(self.$http.post(url, data, { headers: headers, responseType: responseType }));\r\n }\r\n jsonp(url: string, data: any, headers?: any): Promise {\r\n var self = this;\r\n return this.toEs6Promise(self.$http.jsonp(url, { headers: headers }));\r\n }\r\n delete(url: string, headers?: any, data?: any): Promise {\r\n var self = this;\r\n if (data) {\r\n return this.toEs6Promise(self.$http({ method: 'DELETE', url: url, data: data, headers: headers}));\r\n }\r\n\r\n return this.toEs6Promise(self.$http.delete(url, { headers: headers }));\r\n }\r\n head(url: string, headers?: any): Promise {\r\n var self = this;\r\n return this.toEs6Promise(self.$http.head(url, { headers: headers }));\r\n }\r\n}\r\n","import { FxpEventBroadCastService } from \"./BroadCastingService\";\r\nimport { FxpBroadcastedEvents } from './FxpBroadcastedEvents';\r\n\r\n\r\nexport class FxpIrisBotService {\r\n\r\n constructor(private fxpEventBroadCastService: FxpEventBroadCastService) {\r\n\r\n }\r\n\r\n launchIrisBot() {\r\n this.fxpEventBroadCastService.broadCast( FxpBroadcastedEvents.OnLaunchIrisBot , \"Launch Bot\");\r\n }\r\n\r\n hideIrisBot() {\r\n this.fxpEventBroadCastService.broadCast( FxpBroadcastedEvents.OnHideIrisBot, \"Hide Bot\");\r\n }\r\n \r\n}","import { ILogger } from \"../interfaces/ILogger\";\r\nimport { UserInfoService } from \"./UserInfoService\";\r\nimport { IOCVSource } from \"../common/enum/Feedback.enum\";\r\nimport { IOCVFeedbackPayload } from \"../interfaces/IOCVFeedbackPayload\";\r\nimport { CommonUtils } from \"../utils/CommonUtils\";\r\nimport { FxpHttpService } from \"./FxpHttpService\";\r\nimport { IFxpFeedbackMessage } from \"../interfaces/IFxpFeedbackMessage\";\r\nimport { FxpConfigurationService } from \"./FxpConfiguration\";\r\nimport { FxpGlobalStoreService } from \"./fxp.global.store.service\";\r\n\r\nexport class FxpOCVFeedbackService {\r\n\r\n private fxplogger: ILogger;\r\n private fxpHttpService: FxpHttpService;\r\n private fxpConfigService: FxpConfigurationService;\r\n\r\n constructor(loggerService: ILogger, private globalStore: FxpGlobalStoreService, fxpHttpService: FxpHttpService, fxpConfigurationService: FxpConfigurationService) {\r\n\t\tthis.fxplogger = loggerService;\r\n this.fxpHttpService = fxpHttpService;\r\n this.fxpConfigService = fxpConfigurationService;\r\n }\r\n \r\n public SubmitFeedback(feedbackMessage: IFxpFeedbackMessage) : Promise {\r\n let feedbackPayload: IOCVFeedbackPayload = {\r\n manifestType: feedbackMessage.feedbackManifestType,\r\n appId: this.fxpConfigService.FxpAppSettings.OCVAppId,\r\n submitTime: new Date().toISOString(),\r\n source: IOCVSource.Client,\r\n type: feedbackMessage.feedbackType,\r\n rating: feedbackMessage.rating,\r\n clientFeedbackId: CommonUtils.getNewGuId(),\r\n comment: feedbackMessage.feedbackMessage,\r\n email: feedbackMessage.email,\r\n application: {\r\n appData: feedbackMessage.appData\r\n },\r\n telemetry: {\r\n loggableUserId: this.globalStore.GetPlatformState().CurrentUser.Claims.aadObjectId,\r\n featureArea: feedbackMessage.partnerName,\r\n officeBuild: this.fxpConfigService.FxpAppSettings.BuildNumber,\r\n tenantId: this.fxpConfigService.FxpAppSettings.TenantId\r\n },\r\n survey: {\r\n surveyId: feedbackMessage.surveyId\r\n },\r\n web: {\r\n browser: navigator[\"browserDetails\"] ? navigator[\"browserDetails\"].name : \"\",\r\n browserVersion: navigator[\"browserDetails\"] ? navigator[\"browserDetails\"].version : \"\",\r\n sourcePageName: document.getElementsByTagName(\"title\")[0].innerHTML,\r\n sourcePageURI: window.location.href\r\n }\r\n };\r\n return this.sendFeedback(feedbackPayload);\r\n }\r\n\r\n private sendFeedback(feedbackPayload: IOCVFeedbackPayload) : Promise\r\n { \r\n let url = this.fxpConfigService.FxpAppSettings.FeedbackOCVEndpoint;\r\n let requestHeaders = {};\r\n requestHeaders[\"Content-Type\"] = \"application/json\";\r\n return this.fxpHttpService.post(url, feedbackPayload, requestHeaders);\r\n }\r\n}","import { IFxpHttpInterceptorHook } from './../interfaces/IFxpHttpInterceptorHook'; \r\nimport { IFxPService } from '../interfaces/IFxpService';\r\nexport class FxpPartnerHttpInterceptorHooks implements IFxPService {\r\n \r\n\tprotected _interceptorHooks : Array = [];\r\n\t\r\n\tRegisterInterceptorHook = function(httpInterceptorHookInstance: IFxpHttpInterceptorHook):void {\r\n\t\tif (this._interceptorHooks.indexOf(httpInterceptorHookInstance)>=0){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._interceptorHooks.push(httpInterceptorHookInstance); \r\n\t}\r\n\tUnRegisterInterceptorHook =function(httpInterceptorHookInstance: IFxpHttpInterceptorHook):void {\r\n\t\tconst index = this._interceptorHooks.indexOf(httpInterceptorHookInstance);\r\n\t\tthis._interceptorHooks.splice(index, 1); \r\n\t}\r\n\r\n\tgetRegisteredInterceptorHooks=function(): Array{\r\n\t\treturn this._interceptorHooks;\r\n\t}\r\n}\r\n\r\n","import { IRootScope } from \"../interfaces/IRootScope\";\r\nimport { ILogger } from \"../interfaces/ILogger\";\r\nimport { FxpBreadcrumbService } from \"./FxpBreadcrumbService\";\r\nimport { FxpConstants } from \"../common/ApplicationConstants\";\r\nimport { Resiliency } from \"../resiliency/FxpResiliency\";\r\nimport { UserProfileService } from \"./userProfileService\";\r\nimport { UserInfoService } from \"./UserInfoService\";\r\nimport { StateService, TransitionOptions } from \"@uirouter/core\";\r\nimport { IFxPService } from \"../interfaces/IFxpService\";\r\n\r\n/**\r\n * @application Fxp\r\n */\r\n/**\r\n * @module Fxp.Services\r\n */\r\n/**\r\n * A service to connect to user Route users to their configured URLs\r\n * @class Fxp.Services.FxpRouteService\r\n * @classdesc A service to Route users to their configured URLs\r\n * @example Example to create an instance of Fxp Route Service\r\n * //Initializing Fxp Route Service\r\n * angular.module('FxPApp').controller('AppController', ['FxpRouteService', AppController]);\r\n * function AppController(FxpRouteService){ FxpRouteService.getAllStates(); }\r\n */\r\nexport class FxpRouteService implements IFxPService{\r\n\tprivate stateGo: StateService;\r\n\tprivate rootScope: IRootScope;\r\n\tprivate fxplogger: ILogger;\r\n\tprivate userProfileService: UserProfileService;\r\n\tprivate userInfoService: UserInfoService;\r\n\tprivate fxpBreadcrumbService: FxpBreadcrumbService;\r\n\tprivate defaultStateName: string;\r\n\tconstructor($state: StateService, $rootScope: IRootScope, loggerService: ILogger, userProfileService: UserProfileService, userInfoService: UserInfoService, fxpBreadcrumbService: FxpBreadcrumbService) {\r\n\t\tthis.stateGo = $state;\r\n\t\tthis.rootScope = $rootScope;\r\n\t\tthis.userProfileService = userProfileService;\r\n\t\tthis.userInfoService = userInfoService;\r\n\t\tthis.fxplogger = loggerService;\r\n\t\tthis.fxpBreadcrumbService = fxpBreadcrumbService;\r\n\t\tif (this.rootScope.isNewTabAllowed === undefined) {\r\n\t\t\tthis.rootScope.isNewTabAllowed = true;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t* Gets List of States from URL State Provider\r\n\t* @method Fxp.Services.FxpRouteService.getAllStates\r\n\t* @example Example to invoke getAllStates\r\n\t* FxpRouteService.getAllStates();\r\n\t*/\r\n\tgetAllStates = function (): any {\r\n\t\tvar statesList = [];\r\n\t\tfor (var i = 0; i < this.states.length; i++) {\r\n\t\t\tstatesList.push(this.states[i].name);\r\n\t\t}\r\n\t\treturn statesList;\r\n\t}\r\n\r\n\tget states():any {\r\n\t\treturn this.stateGo.get();\r\n\t}\r\n\r\n\t/**\r\n\t* Gets URL of mentioned state from URL State Provider\r\n\t* @method Fxp.Services.FxpRouteService.getURLfromState\r\n\t* @param statename {string} a mandatory string value.\r\n\t* @param params {any} $state parameters values\r\n\t* @param options {any} an options values.\r\n\t* @example Example to invoke getURLfromState\r\n\t* FxpRouteService.getURLfromState(stateOrName [, params] [, options]);\r\n\t* FxpRouteService.getURLfromState($state.current.name, $state.params, {absolute: true});\r\n\t*/\r\n\tgetURLfromState = function (statename: string, params?: any, options?: any) {\r\n\t\tfor (var i = 0; i < this.states.length; i++) {\r\n\t\t\tif (this.states[i].name == statename)\r\n\t\t\t\treturn this.stateGo.href(this.states[i].name, params, options);\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n\t/**\r\n\t* @deprecated Use new method FxpRouteService.navigatetoNewWindow('Home')\r\n\t*/\r\n\tnavigatetoState = function (statename: string) {\r\n\t\tconsole.warn(\"This method has been deprecated.Please use navigatetoNewWindow(statename) \");\r\n\t\tthis.navigatetoNewWindow(statename);\r\n\t}\r\n\t/**\r\n\t* Open a New Browser Window of mentioned state by Picking URL from URL State Provider\r\n\t* @method Fxp.Services.FxpRouteService.navigatetoNewWindow\r\n\t* @param {string} a mandatory string value.\r\n\t* @example Example to invoke navigatetoNewWindow\r\n\t* FxpRouteService.navigatetoNewWindow('Home');\r\n\t*/\r\n\r\n\tnavigatetoNewWindow = function (statename: string) {\r\n\r\n\t\t//Check if the requested state is missing any dependencies.\r\n\t\tif (Resiliency.statesWithMissingModules && Resiliency.statesWithMissingModules.indexOf(statename) > -1) {\r\n\t\t\tthrow new Error('The requested state cannot be navigated due to missing dependencies.');\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < this.states.length; i++) {\r\n\t\t\tif (this.states[i].name == statename) {\r\n\t\t\t\twindow.open(\"#\" + this.states[i].url, \"Popup\", \"location=1,status=1,scrollbars=1, resizable=1, directories=1, toolbar=1, titlebar=1, width=\" + screen.width + \", height=\" + screen.height);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t/**\r\n * Navigates to a the specific state which is passed as a parameter,also can pass optional parameters like params,target,features,replace\r\n * @method Fxp.Services.FxpRouteService.navigatetoSpecificState\r\n * @param {string} statename string specifies the name of the state.\r\n * @param {any} params any specifies the object.\r\n * @param {TransitionOptions} transitionOptions TransitionOptions specifies the options.\r\n\r\n * @example Example to invoke navigatetoSpecificState\r\n * FxpRouteService.navigatetoSpecificState('Home');\r\n */\r\n\tnavigatetoSpecificState = function (statename: string, params?: any, transitionOptions?: TransitionOptions) {\r\n\r\n\t\t//Check if the requested state is missing any dependencies.\r\n\t\tif (Resiliency.statesWithMissingModules && Resiliency.statesWithMissingModules.indexOf(statename) > -1) {\r\n\t\t\tthrow new Error('The requested state cannot be navigated due to missing dependencies.');\r\n\t\t}\r\n\r\n if (params !== undefined && params !== null && transitionOptions !== undefined && transitionOptions !== null)\r\n this.stateGo.go(statename, params, transitionOptions);\r\n\t\telse if (params !== undefined && params !== null)\r\n\t\t\tthis.stateGo.go(statename, params);\r\n\t\telse\r\n\t\t\tthis.stateGo.go(statename);\r\n\t}\r\n\r\n\t/**\r\n\t* Navigates to a the specific URL which is passed as a parameter,also can pass optional parameters like target,features,replace\r\n\t* @method Fxp.Services.FxpRouteService.navigateToSpecificUrl\r\n\t* @param {string} url string that specifies the URL of the document to display.\r\n\t* @param {string} target string that specifies the name of the window.\r\n\t* @param {string} features string that contains a list of items separated by commas.\r\n\t* @param {boolean} replace boolean that specifies whether the url creates a new entry or replaces the current entry in the window's history list.\r\n\t* @example Example to invoke navigateToSpecificUrl\r\n\t* FxpRouteService.navigateToSpecificUrl('#/Home');\r\n\t*/\r\n\tnavigateToSpecificUrl = function (url: string, target?: string, features?: string, replace?: boolean) {\r\n\t\tvar self = this;\r\n\t\tself.navigateToUrl(url, target, features, replace);\r\n\t}\r\n\r\n\t/**\r\n\t* Navigates to a the URL which is passed as a parameter,also can pass optional parameters like target,features,replace\r\n\t* @method Fxp.Services.FxpRouteService.navigateToSpecificUrl\r\n\t* @param {string} url string that specifies the URL of the document to display.\r\n\t* @param {string} target string that specifies the name of the window.\r\n\t* @param {string} features string that contains a list of items separated by commas.\r\n\t* @param {boolean} replace boolean that specifies whether the url creates a new entry or replaces the current entry in the window's history list.\r\n\t* @example Example to invoke navigateToUrl\r\n\t* FxpRouteService.navigateToUrl('#/Home');\r\n\t*/\r\n\tprivate navigateToUrl(url: string, target?: string, features?: string, replace?: boolean) {\r\n\t\tvar self = this;\r\n\t\ttarget = self.rootScope.isNewTabAllowed && target != undefined ? target : \"_self\";\r\n\t\tfeatures = features || \"\";\r\n\t\treplace = replace || false;\r\n\t\tif (target === \"_blank\") {\r\n\t\t\tself.fxpBreadcrumbService.setTempBreadcrumbArray(url);\r\n\t\t}\r\n\t\twindow.open(url, target, features, replace);\r\n\t}\r\n\r\n\t/**\r\n\t* getDefaultStateName\r\n\t* @method Fxp.Services.FxpRouteService.getDefaultStateName\r\n\t* @example Example to invoke getDefaultStateName\r\n\t* FxpRouteService.getDefaultStateName();\r\n\t*/\r\n\tgetDefaultStateName = function () {\r\n\t\treturn this.defaultStateName;\r\n\t}\r\n\r\n\t/**\r\n\t* setDefaultStateName\r\n\t* @method Fxp.Services.FxpRouteService.setDefaultStateName\r\n\t* @param {string} value mandatory string value to set as default StateName.\r\n\t* @example Example to invoke setDefaultStateName\r\n\t* FxpRouteService.setDefaultStateName('Home');\r\n\t*/\r\n\tsetDefaultStateName = function (value: string) {\r\n\t\tthis.defaultStateName = value;\r\n\t}\r\n\r\n\t/**\r\n\t* getStateDetails\r\n\t* @method Fxp.Services.FxpRouteService.getStateDetails\r\n\t* @param {string} value mandatory string value to get the state details.\r\n\t* @example Example to invoke getStateDetails\r\n\t* FxpRouteService.getStateDetails('Home');\r\n\t*/\r\n\tgetStateDetails = function (stateName: string) {\r\n\t\treturn this.states.find((item) => (item.name == stateName));\r\n\t}\r\n\r\n\t/**\r\n\t* getCurrentStateDetails\r\n\t* @method Fxp.Services.FxpRouteService.getCurrentStateDetails\r\n\t* @example Example to invoke getCurrentStateDetails\r\n\t* FxpRouteService.getCurrentStateDetails();\r\n\t*/\r\n\tgetCurrentStateDetails = function () {\r\n\t\treturn this.getStateDetails(this.stateGo.current.name);\r\n\t}\r\n}\r\n","import { HubConnection, HubConnectionBuilder, HubConnectionState } from '@microsoft/signalr';\r\nimport { FxpConfigurationService } from \"./FxpConfiguration\";\r\nimport { SystemEvent } from \"./../telemetry/SystemEvent\";\r\nimport { ComponentType } from \"@microsoftit/telemetry-extensions-npm\";\r\nimport { TelemetryConstants } from \"../telemetry/TelemetryConst\";\r\nimport { ILogger } from \"../interfaces/ILogger\";\r\nimport { ErrorSeverityLevel } from \"../telemetry/ErrorSeverityLevel\";\r\nimport { ErrorCodes } from \"../constants/errorCodes\";\r\nimport { MsalAuthenticationService } from \"./MsalAuthenticationService\";\r\n\r\n\r\nexport class FxpSignalRService {\r\n private connection: HubConnection;\r\n private signalRServiceEndPoint: string;\r\n private listeners = {};\r\n private connectionPromise: Promise = null;\r\n private pingTimeOutRef = null;\r\n private pingInterval = 10; //default value 10 mins\r\n private processName: string;\r\n private signalREventName: string;\r\n private readonly sourceForTelemetry = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.FxpSignalRService`;\r\n\r\n constructor(\r\n protected logger: ILogger,\r\n private fxpConfigurationService: FxpConfigurationService,\r\n private msalAuthenticationService: MsalAuthenticationService\r\n ) {\r\n this.signalRServiceEndPoint = fxpConfigurationService.FxpAppSettings.SignalRPlatformEndPoint;\r\n this.processName = TelemetryConstants.FXP_TELEMETRY_BASE_NAME + \".SignalRClient\";\r\n this.signalREventName = \"SignalREventName\";\r\n\r\n if (Number.isInteger(fxpConfigurationService.FxpAppSettings.SignalRPlatformPingIntervalInMinutes)){\r\n this.pingInterval = fxpConfigurationService.FxpAppSettings.SignalRPlatformPingIntervalInMinutes;\r\n }\r\n this.pingInterval = this.pingInterval * 60 * 1000;\r\n\r\n }\r\n\r\n\r\n private setupPingForSignalServer() {\r\n const self = this;\r\n self.ping();\r\n self.nextLoad();\r\n }\r\n\r\n cancelNextLoad() {\r\n const self = this;\r\n if (self.pingTimeOutRef) {\r\n clearTimeout(self.pingTimeOutRef);\r\n self.pingTimeOutRef = null;\r\n }\r\n };\r\n\r\n nextLoad() {\r\n const self = this;\r\n self.cancelNextLoad();\r\n self.pingTimeOutRef = setTimeout(self.setupPingForSignalServer.bind(self), self.pingInterval);\r\n };\r\n\r\n private ping(): void {\r\n this.sendMessage(\"ping\", \"ping server\");\r\n }\r\n\r\n private connect(): Promise {\r\n const self = this;\r\n\r\n return new Promise((resolve, reject) => {\r\n if (self.connection && self.connection.state === HubConnectionState.Connected) {\r\n resolve();\r\n let currentProcessName = this.processName + '.SignalServerConnected';\r\n let eventData = new SystemEvent(currentProcessName, ComponentType.DataStore, 'SignalServer Connection Created');\r\n let customProperties = this.logger.createPropertyBag();\r\n customProperties.addToBag(TelemetryConstants.CLASSNAME, \"FxpSignalRClient\");\r\n customProperties.addToBag(TelemetryConstants.METHODNAME, \"connect\");\r\n this.logger.logSystemEvent(this.sourceForTelemetry, eventData, customProperties);\r\n\r\n return;\r\n }\r\n self.setupConnection().then(() => {\r\n resolve();\r\n });\r\n });\r\n }\r\n\r\n private disconnect(): void {\r\n if (this.connection && this.connection.state === HubConnectionState.Connected) {\r\n this.connection.stop()\r\n .then(() => {\r\n let currentProcessName = this.processName + '.SignalServerDisconnected';\r\n let eventData = new SystemEvent(currentProcessName, ComponentType.DataStore, 'SignalServer disconnected');\r\n let customProperties = this.logger.createPropertyBag();\r\n customProperties.addToBag(TelemetryConstants.CLASSNAME, \"FxpSignalRClient\");\r\n customProperties.addToBag(TelemetryConstants.METHODNAME, \"disconnect\");\r\n this.logger.logSystemEvent(this.sourceForTelemetry, eventData, customProperties);\r\n })\r\n .catch(error => {\r\n this.logger.logException(this.sourceForTelemetry, error, null, null, null, ErrorSeverityLevel.Low, ErrorCodes.SignalR_ErrorOnDisconnect);\r\n });\r\n };\r\n\r\n }\r\n\r\n private sendMessage(methodName: string, ...args): Promise {\r\n return this.connection.send(methodName, args)\r\n .catch(error => {\r\n this.logger.logException(this.sourceForTelemetry, error, null, null, null, ErrorSeverityLevel.Medium, ErrorCodes.SignalR_ErrorOnMessageSend);\r\n });\r\n }\r\n\r\n private joinGroup(groupName: string, tenantName: string, environment: string): Promise {\r\n try {\r\n if(environment)\r\n return this.sendMessage(\"joinGroup\", groupName, tenantName, environment);\r\n else\r\n return this.sendMessage(\"joinGroup\", groupName, tenantName);\r\n }\r\n catch (error) {\r\n this.logger.logException(this.sourceForTelemetry, error, null, null, null, ErrorSeverityLevel.High, ErrorCodes.SignalR_ErrorOnJoinGroup);\r\n }\r\n }\r\n\r\n private leaveGroup(groupName: string, tenantName: string, environment: string): Promise {\r\n try {\r\n if(environment)\r\n return this.sendMessage(\"leaveGroup\", groupName, tenantName, environment);\r\n else\r\n return this.sendMessage(\"leaveGroup\", groupName, tenantName);\r\n\r\n }\r\n catch (error) {\r\n this.logger.logException(this.sourceForTelemetry, error, null, null, null, ErrorSeverityLevel.Medium, ErrorCodes.SignalR_ErrorOnLeaveGroup);\r\n }\r\n }\r\n\r\n subscribe(eventName, tenantName: string, callBack: any) {\r\n const self = this;\r\n const environment = this.fxpConfigurationService.FxpAppSettings.EnvironmentName;\r\n this.connect().then(() => {\r\n self.joinGroup(eventName, tenantName, environment);\r\n if (!self.listeners.hasOwnProperty(eventName)) {\r\n self.listeners[eventName] = [];\r\n }\r\n self.listeners[eventName].push(callBack);\r\n let currentProcessName = this.processName + '.SubscribeEvent.' + eventName;\r\n let eventData = new SystemEvent(currentProcessName, ComponentType.DataStore, `Subscribed to event: ${eventName}`);\r\n let customProperties = this.logger.createPropertyBag();\r\n customProperties.addToBag(TelemetryConstants.CLASSNAME, \"FxpSignalRClient\");\r\n customProperties.addToBag(TelemetryConstants.METHODNAME, \"subscribe\");\r\n customProperties.addToBag(this.signalREventName, eventName);\r\n this.logger.logSystemEvent(this.sourceForTelemetry, eventData, customProperties);\r\n\r\n });\r\n\r\n return function () {\r\n self.unsubscribe(eventName, tenantName, callBack, environment);\r\n\r\n }\r\n }\r\n\r\n private unsubscribe(eventName, tenantName: string, callBack: any, environment: string = null) {\r\n this.leaveGroup(eventName, tenantName, environment);\r\n\r\n let currentProcessName = this.processName + '.UnSubscribeEvent.' + eventName;\r\n let eventData = new SystemEvent(currentProcessName, ComponentType.DataStore, `UnSubscribed to event: ${eventName}`);\r\n let customProperties = this.logger.createPropertyBag();\r\n customProperties.addToBag(TelemetryConstants.CLASSNAME, \"FxpSignalRClient\");\r\n customProperties.addToBag(TelemetryConstants.METHODNAME, \"unsubscribe\");\r\n customProperties.addToBag(this.signalREventName, eventName);\r\n this.logger.logSystemEvent(this.sourceForTelemetry, eventData, customProperties);\r\n\r\n if (!this.listeners.hasOwnProperty(eventName)) {\r\n return;\r\n }\r\n this.listeners[eventName] = this.listeners[eventName].filter(x => x != callBack);\r\n if (this.listeners[eventName].length === 0) {\r\n delete this.listeners[eventName];\r\n }\r\n if (Object.keys(this.listeners).length === 0) {\r\n this.disconnect();\r\n }\r\n }\r\n\r\n unsubscribeAll() {\r\n this.listeners = {};\r\n this.disconnect();\r\n }\r\n\r\n private onMessageFromServer(eventName: string, messageData: any) {\r\n if (eventName === \"pingResponse\") {\r\n return;\r\n }\r\n\r\n let currentProcessName = this.processName + '.MessageFromServer.' + eventName;\r\n let eventData = new SystemEvent(currentProcessName, ComponentType.DataStore, `Message from SignalR Server for event: ${eventName}`);\r\n let customProperties = this.logger.createPropertyBag();\r\n customProperties.addToBag(TelemetryConstants.CLASSNAME, \"FxpSignalRClient\");\r\n customProperties.addToBag(TelemetryConstants.METHODNAME, \"onMessageFromServer\");\r\n customProperties.addToBag(this.signalREventName, eventName);\r\n this.logger.logSystemEvent(this.sourceForTelemetry, eventData, customProperties);\r\n\r\n if (this.listeners.hasOwnProperty(eventName)) {\r\n const callBackFunctions = this.listeners[eventName];\r\n if (callBackFunctions.length > 0) {\r\n callBackFunctions.forEach(callbackFunc => {\r\n callbackFunc(messageData);\r\n });\r\n }\r\n }\r\n }\r\n\r\n private setupConnection(): Promise {\r\n const self = this;\r\n const resource = self.fxpConfigurationService.FxpAppSettings.SignalRPlatformClientId;\r\n\r\n if (self.connectionPromise) {\r\n return self.connectionPromise;\r\n }\r\n self.connection = new HubConnectionBuilder()\r\n .withUrl(self.signalRServiceEndPoint, { accessTokenFactory: async ()=>{\r\n let token;\r\n await this.msalAuthenticationService.getTokenForAppIdAsync(resource).then(function (accesstoken) {\r\n token = accesstoken;\r\n })\r\n return token;\r\n } })\r\n .withAutomaticReconnect()\r\n .build();\r\n\r\n self.connection.onreconnecting(error => {\r\n if(self.connection.state === HubConnectionState.Reconnecting){\r\n self.logger.logEvent(this.sourceForTelemetry, `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.SignalRReconnecting`)\r\n }\r\n });\r\n\r\n self.connection.onreconnected(connectionId => {\r\n if(self.connection.state === HubConnectionState.Connected){\r\n self.logger.logEvent(this.sourceForTelemetry, `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.SignalRReconnected`)\r\n }\r\n });\r\n self.connection.onclose(error => {\r\n if (self.connection.state === HubConnectionState.Disconnected) {\r\n self.logger.logEvent(this.sourceForTelemetry, `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.SignalRDisconnected`)\r\n }\r\n });\r\n\r\n self.connectionPromise = self.connection.start().then(() => {\r\n self.connection.on('eventFromServer', self.onMessageFromServer.bind(self));\r\n self.connectionPromise = null;\r\n self.setupPingForSignalServer();\r\n self.logger.logEvent(this.sourceForTelemetry, `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.SignalRConnected`)\r\n\r\n })\r\n .catch(error => {\r\n // Logging disabled to reduce noise\r\n // self.logger.logException(this.sourceForTelemetry, error, null, null, null, ErrorSeverityLevel.High, ErrorCodes.SignalR_ErrorOnConnection);\r\n })\r\n return self.connectionPromise;\r\n\r\n }\r\n\r\n}\r\n","import { Subject } from \"rxjs\";\r\nimport { StateService } from \"@uirouter/core\";\r\nimport { SyncRoutes } from \"@fxp/staterouter\";\r\nimport { IFxPService } from \"../interfaces/IFxpService\";\r\nimport { FxpConstants } from \"../common/ApplicationConstants\";\r\nimport { FxpGlobalStoreService } from \"./fxp.global.store.service\";\r\nimport { IRootScope } from \"../interfaces/IRootScope\";\r\nimport { FxpBroadcastedEvents } from \"./FxpBroadcastedEvents\";\r\n//import { FxpLoggerService } from './../telemetry/FxpLogger';\r\nimport { TelemetryConstants } from \"../telemetry/TelemetryConst\";\r\nimport { CommonUtils } from \"../utils/CommonUtils\";\r\nimport { FeatureUsageEvent } from \"../telemetry/FeatureUsageEvent\";\r\nimport {\r\n ActionStatus,\r\n ActionType,\r\n ComponentType,\r\n EventName,\r\n} from \"@microsoftit/telemetry-extensions-npm\";\r\nimport { FxpLoggerService } from \"../telemetry/fxpLogger\";\r\nimport { LogMetricBag } from \"../telemetry/LogMetricBag\";\r\nimport { LogPropertyBag } from \"../telemetry/LogPropertyBag\";\r\n\r\nexport class FxpStateTransitionService implements IFxPService {\r\n private $transitions;\r\n private subjects: any = [];\r\n private $rootScope: IRootScope;\r\n constructor(\r\n $rootScope: IRootScope,\r\n private $injector: angular.auto.IInjectorService,\r\n private stateService: StateService,\r\n private globalStore: FxpGlobalStoreService,\r\n private logger: FxpLoggerService\r\n ) {\r\n this.$transitions = this.$injector.get(\"$transitions\");\r\n this.$transitions.onStart({}, this.onStartStateChangeHandler.bind(this));\r\n this.$transitions.onSuccess(\r\n {},\r\n this.onSuccessStateChangeHandler.bind(this)\r\n );\r\n this.$transitions.onError({}, this.onErrorStateChangeHandler.bind(this));\r\n this.stateService.onInvalid(this.onInvalidStateHandler.bind(this));\r\n this.$rootScope = $rootScope;\r\n this.subjects = [\r\n { id: FxpConstants.StateEvents.OnStart, subject: new Subject() },\r\n { id: FxpConstants.StateEvents.onSuccess, subject: new Subject() },\r\n { id: FxpConstants.StateEvents.onError, subject: new Subject() },\r\n { id: FxpConstants.StateEvents.onInvalid, subject: new Subject() },\r\n ];\r\n }\r\n\r\n onStartStateChangeHandler(transition: any): void {\r\n const self = this;\r\n self.subjects\r\n .filter((event) => event.id === FxpConstants.StateEvents.OnStart)[0]\r\n .subject.next(self.getStateInfo(transition));\r\n }\r\n\r\n onSuccessStateChangeHandler(transition: any): void {\r\n const self = this;\r\n self.subjects\r\n .filter((event) => event.id === FxpConstants.StateEvents.onSuccess)[0]\r\n .subject.next(self.getStateInfo(transition));\r\n const syncRouteAction = SyncRoutes({\r\n $current: this.stateService.$current,\r\n params: this.stateService.params,\r\n });\r\n this.globalStore.DispatchGlobalAction(\r\n \"Fxp.FxpStateTransitionService\",\r\n syncRouteAction\r\n );\r\n self.$rootScope.$broadcast(\r\n FxpBroadcastedEvents.OnLeftNavHighlightByStateName,\r\n transition.to().name\r\n );\r\n this.logFeatureUsageEventForState(transition);\r\n this.logPageView(transition);\r\n }\r\n\r\n private logPageView(transition: any) {\r\n const currentState = transition.to();\r\n const appName =\r\n currentState.data.appNameForTelemetry ||\r\n currentState.data.partnerTelemetryName;\r\n const pageName =\r\n currentState.data.pageNameForTelemetry ||\r\n currentState.data.breadcrumbText;\r\n const telemetryName =\r\n currentState.data.partnerTelemetryName ||\r\n TelemetryConstants.FXP_TELEMETRY_BASE_NAME;\r\n let displayNameForPageView = \"\";\r\n if (pageName && appName) {\r\n displayNameForPageView = `${appName}.${pageName}`;\r\n } else {\r\n displayNameForPageView = currentState.data.headerName;\r\n }\r\n const startTime = parseFloat(this.$rootScope.stateChangeStartTime);\r\n let duration = 0;\r\n if (!isNaN(startTime) || startTime !== 0) {\r\n duration = (performance.now() - startTime) / 1000;\r\n }\r\n const measurements = this.logger.createMetricBag();\r\n const properties = this.logger.createPropertyBag();\r\n\r\n properties.addToBag(\r\n TelemetryConstants.LOGGING_SOURCE,\r\n `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.FxpStateTransitionService.logFeatureUsageEventForState`\r\n );\r\n properties.addToBag(\"Unit\", \"Seconds\");\r\n measurements.addToBag(\"StateTransitionTime\", duration);\r\n this.logger.logPageView(\r\n telemetryName,\r\n displayNameForPageView,\r\n window.location.href,\r\n properties,\r\n measurements,\r\n duration\r\n );\r\n }\r\n\r\n private logFeatureUsageEventForState(transition: any) {\r\n const currentState = transition.to();\r\n const appName = currentState.data.appNameForTelemetry;\r\n const featureName = currentState.data.featureName;\r\n const subFeatureName = currentState.data.subFeatureName;\r\n const actionName = currentState.data.actionName;\r\n const telemetryName =\r\n currentState.data.partnerTelemetryName ||\r\n TelemetryConstants.FXP_TELEMETRY_BASE_NAME;\r\n const fromState = transition.from();\r\n let previousFeatureName = \"\",\r\n previousAppName: \"\",\r\n previousSubFeatureName = \"\";\r\n if (fromState && fromState.data) {\r\n previousFeatureName = fromState.data.featureName;\r\n previousAppName = fromState.data.appNameForTelemetry;\r\n previousSubFeatureName = fromState.data.subFeatureName;\r\n }\r\n let displayFeatureName = \"\";\r\n if (!CommonUtils.isNullOrEmpty(featureName)) {\r\n displayFeatureName = `${appName}.${featureName}`;\r\n if (!CommonUtils.isNullOrEmpty(subFeatureName)) {\r\n displayFeatureName = `${displayFeatureName}.${subFeatureName}`;\r\n if (\r\n !CommonUtils.isNullOrEmpty(featureName) &&\r\n previousFeatureName === featureName\r\n ) {\r\n this.logger.renewSubCorrelationId();\r\n } else {\r\n this.logger.renewCorrelationId();\r\n }\r\n } else {\r\n this.logger.renewCorrelationId();\r\n }\r\n //TODO: May be we can create featureusageevent object and set subfeature instead of playing with strings.\r\n const featureUsageEvent = new FeatureUsageEvent(\r\n displayFeatureName,\r\n ActionType.User,\r\n actionName,\r\n EventName.PageLoad,\r\n ComponentType.Web\r\n );\r\n featureUsageEvent.SubFeatureName = subFeatureName;\r\n featureUsageEvent.ActionStatus = ActionStatus.Succeeded;\r\n const properties = this.logger.createPropertyBag();\r\n properties.addToBag(\r\n TelemetryConstants.LOGGING_SOURCE,\r\n `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.FxpStateTransitionService.logFeatureUsageEventForState`\r\n );\r\n this.logger.logFeatureUsageEvent(\r\n telemetryName,\r\n featureUsageEvent,\r\n properties,\r\n null,\r\n null\r\n );\r\n }\r\n }\r\n\r\n onErrorStateChangeHandler(transition: any): void {\r\n const self = this;\r\n self.subjects\r\n .filter((event) => event.id === FxpConstants.StateEvents.onError)[0]\r\n .subject.next(self.getStateInfo(transition));\r\n }\r\n\r\n onInvalidStateHandler(toState: any, fromState: any, injector: any): void {\r\n const self = this;\r\n self.subjects\r\n .filter((event) => event.id === FxpConstants.StateEvents.onInvalid)[0]\r\n .subject.next({\r\n toState: toState,\r\n fromState: fromState,\r\n injector: injector,\r\n });\r\n }\r\n\r\n getStateInfo(transition: any): any {\r\n const stateInfo = {\r\n toState: transition.to(),\r\n toParams: transition.params(\"to\"),\r\n fromState: transition.from(),\r\n fromParams: transition.params(\"from\"),\r\n error: transition.error(),\r\n };\r\n return stateInfo;\r\n }\r\n\r\n onStateChangeStart(callback): Subject {\r\n const self = this;\r\n return self.subjects\r\n .filter((event) => event.id === FxpConstants.StateEvents.OnStart)[0]\r\n .subject.subscribe(callback);\r\n }\r\n onStateChangeSuccess(callback): Subject {\r\n const self = this;\r\n return self.subjects\r\n .filter((event) => event.id === FxpConstants.StateEvents.onSuccess)[0]\r\n .subject.subscribe(callback);\r\n }\r\n onStateChangeFailure(callback): Subject {\r\n const self = this;\r\n return self.subjects\r\n .filter((event) => event.id === FxpConstants.StateEvents.onError)[0]\r\n .subject.subscribe(callback);\r\n }\r\n onStateNotFound(callback): Subject {\r\n const self = this;\r\n return self.subjects\r\n .filter((event) => event.id === FxpConstants.StateEvents.onInvalid)[0]\r\n .subject.subscribe(callback);\r\n }\r\n\r\n offStateChangeStart(observer): void {\r\n const self = this;\r\n const currentSubject = self.subjects.filter(\r\n (event) => event.id === FxpConstants.StateEvents.OnStart\r\n )[0].subject;\r\n currentSubject.observers.filter((x) => x == observer)[0].unsubscribe();\r\n }\r\n\r\n offStateChangeSuccess(observer): void {\r\n const self = this;\r\n const currentSubject = self.subjects.filter(\r\n (event) => event.id === FxpConstants.StateEvents.onSuccess\r\n )[0].subject;\r\n currentSubject.observers.filter((x) => x == observer)[0].unsubscribe();\r\n }\r\n\r\n offStateChangeFailure(observer): void {\r\n const self = this;\r\n const currentSubject = self.subjects.filter(\r\n (event) => event.id === FxpConstants.StateEvents.onError\r\n )[0].subject;\r\n currentSubject.observers.filter((x) => x == observer)[0].unsubscribe();\r\n }\r\n\r\n offStateNotFound(observer): void {\r\n const self = this;\r\n const currentSubject = self.subjects.filter(\r\n (event) => event.id === FxpConstants.StateEvents.onInvalid\r\n )[0].subject;\r\n currentSubject.observers.filter((x) => x == observer)[0].unsubscribe();\r\n }\r\n}\r\n","import { IFxPService } from \"../interfaces/IFxpService\";\r\n\r\n/**\r\n * @application Fxp\r\n */\r\n/**\r\n * @module Fxp.Services\r\n */\r\n/**\r\n * A service to connect to dashboard service to fetch the leftnav data of the user\r\n * @class Fxp.Services.FxpStorageService\r\n * @classdesc A service to connect to dashaboard service to fetch the leftnav data \r\n * @example Example to create an instance of dashboard service \r\n * //Initializing FxpStorageService\r\n * angular.module('FxPApp').controller('LeftNavController', ['FxpStorageService', LeftNavController]);\r\n * function LeftNavController(FxpStorageService){ FxpStorageService.getLeftNavData(userAlias,roleGroupId); }\r\n */\r\nexport class FxpStorageService implements IFxPService{\r\n\tprivate static _instance: FxpStorageService;\r\n\tprivate $window;\r\n\r\n\tconstructor($window) {\r\n\t\tthis.$window = $window;\r\n\t\tif (FxpStorageService._instance) {\r\n\t\t\treturn FxpStorageService._instance;\r\n\t\t}\r\n\t\tFxpStorageService._instance = this;\r\n\t}\r\n\r\n\tsaveInLocalStorage(key: string, data: any): void {\r\n\t\tvar self = this;\r\n\t\tif (data)\r\n\t\t\tself.$window.localStorage && self.$window.localStorage.setItem(key, JSON.stringify(data));\r\n\t}\r\n\r\n\tgetFromLocalStorage(key: string): any {\r\n\t\tvar self = this;\r\n\t\tvar data;\r\n\t\tdata = (self.$window.localStorage && self.$window.localStorage.getItem(key));\r\n\t\tif (data)\r\n\t\t\tdata = JSON.parse(data);\r\n\t\treturn data;\r\n\t}\r\n\r\n\tdeleteFromLocalStorage(key: string): any {\r\n\t\tvar self = this;\r\n\t\tself.$window.localStorage && self.$window.localStorage.removeItem(key);\r\n\t}\r\n}","import { IHelpCentralService } from \"../interfaces/IHelpCentralService\";\r\nimport { FxpConfigurationService } from \"./FxpConfiguration\";\r\nimport { UserInfoService } from \"./UserInfoService\";\r\nimport { IFxPService } from \"../interfaces/IFxpService\";\r\n\r\n/**\r\n * @application Fxp\r\n */\r\n/**\r\n * @module Fxp.Services\r\n */\r\n/**\r\n * A service to handle service call for Contextual Help Articles\r\n * @class Fxp.Services.HelpCentralService\r\n * @classdesc A service to handle service calls for Contextual Help Articles\r\n * @example Example to create an instance of HelpCentralService\r\n * //Initializing HelpCentralService\r\n * angular.module('FxPApp').controller('AppController', ['HelpCentralService', AppController]);\r\n * function AppController(helpCentralService, fxpConstants){ helpCentralService.getContextualHelpArticles(); }\r\n */\r\nexport class HelpCentralService implements IHelpCentralService,IFxPService {\r\n\r\n\tprivate helpCentralServiceEndPoint: string;\r\n\tprivate roleGroupId: string;\r\n\tprivate tenantName: string;\r\n\tprivate helpCentralServiceAppId: string;\r\n\tconstructor(\r\n\t\tprivate $http: angular.IHttpService,\r\n\t\tprivate fxpConfiguration: FxpConfigurationService,\r\n\t\tprivate userInfoService: UserInfoService,\r\n\t\tprivate deviceFactory: any\r\n\t) {\r\n\r\n\t\tthis.helpCentralServiceEndPoint = fxpConfiguration.FxpAppSettings.HelpCentralServiceEndpoint;\r\n\t\tthis.helpCentralServiceAppId = window[\"tenantConfiguration\"].UIStrings.HelpCentralAppId;\r\n\t\tthis.roleGroupId = this.userInfoService.getCurrentUserData().roleGroupId;\r\n\t\tthis.tenantName = this.userInfoService.getCurrentUserData().MappedTenantName ? this.userInfoService.getCurrentUserData().MappedTenantName : this.userInfoService.getCurrentUserData().TenantName;\r\n\t}\r\n\r\n\t/**\r\n\t* Get Help Article content\r\n\t* @method Fxp.Services.HelpCentralService.getContextualHelpArticles\r\n\t* @param {number} topArticles mandatory number value which contains number of notification to be fetched.\r\n\t* @param {number} businessCapability optional number value which contains GLN-L0 Help Articles to be fetched.\r\n\t* @param {number} businessFunctions optional number value which contains GLN-L1 Help Articles to be fetched.\r\n\t* @param {string} searchString optional string value which contains search value against which Help Articles are to be fetched.\r\n\t* @example Example to invoke getNotifications\r\n\t* helpCentralService.getContextualHelpArticles(startIndex, count);\r\n\t*/\r\n\tgetContextualHelpArticles(topArticles, businessCapability?, businessFunctions?, searchString?, route?): angular.IPromise {\r\n\t\tvar self = this,\r\n\t\t\tdeviceType = self.deviceFactory.isMobile() ? \"Mobile\" : \"Desktop\";\r\n\t\tvar url = self.helpCentralServiceEndPoint + \"tenants/\" + self.tenantName + \"/app/\" + self.helpCentralServiceAppId\r\n\t\t\t+ \"/search?Filter=Meta_ViewPort:\" + deviceType + \";\";\r\n\t\tif (searchString) {\r\n\t\t\turl += \"&SearchString=\" + searchString;\r\n\t\t} else {\r\n\t\t\turl += \"Meta_RoleGroup:\" + self.roleGroupId + \";\";\r\n\t\t\turl += (businessCapability) ? \"Meta_L0:\" + businessCapability + \";\" : '';\r\n\t\t\turl += (businessFunctions) ? \"Meta_L1:\" + businessFunctions + \";\" : '';\r\n\t\t\turl += (route) ? \"Meta_Route:\" + route + \";\" : '';\r\n\t\t}\r\n\t\turl += \"&top=\" + topArticles + \"&skip=0\";\r\n\t\treturn this.$http.get(url);\r\n\t}\r\n\r\n\t/**\r\n\t* Get Help Article content\r\n\t* @method Fxp.Services.HelpCentralService.getContextualHelpArticleContent\r\n\t* @param {object} articleId mandatory value which contains id of article to be fetched.\r\n\t* @example Example to invoke getContextualHelpArticleContent\r\n\t* helpCentralService.getContextualHelpArticleContent(articleId);\r\n\t*/\r\n\tgetContextualHelpArticleContent(articleId): angular.IPromise {\r\n\t\tvar urlGetArticle = this.helpCentralServiceEndPoint + \"articles/\" + articleId + \"?tenantid=\" + this.tenantName + \"&appid=\" + this.helpCentralServiceAppId;\r\n\t\treturn this.$http.get(urlGetArticle);\r\n\t}\r\n\tgetSuggestions(searchPhrase: string): angular.IPromise {\r\n\t\tvar url = this.helpCentralServiceEndPoint + \"tenants/\" + this.tenantName + \"/app/\" + this.helpCentralServiceAppId + \"/suggest?SuggestString=\" + searchPhrase + \"&FuzzySearch=true\";\r\n\t\treturn this.$http.get(url);\r\n\t}\r\n\r\n\tsaveArticleFeedback(feedback): angular.IPromise {\r\n\t\tvar url = this.helpCentralServiceEndPoint + \"article/feedback?tenantid=\" + this.tenantName + \"&appid=\" + this.helpCentralServiceAppId;\r\n\t\treturn this.$http.post(url, feedback, { headers: { 'Content-Type': 'application/json' } });\r\n\t}\r\n\r\n\tsaveArticleViewCount(articleId): angular.IPromise {\r\n\t\tvar url = this.helpCentralServiceEndPoint + \"articles/\" + articleId + \"/readhistory?tenantid=\" + this.tenantName + \"&appid=\" + this.helpCentralServiceAppId;\r\n\t\treturn this.$http.post(url, { headers: { 'Content-Type': 'application/json' } });\r\n\t}\r\n}\r\n\r\n","import { AccountInfo, AuthenticationResult, BrowserAuthError, Configuration, EventType, InteractionRequiredAuthError, PublicClientApplication, RedirectRequest, ServerError, SilentRequest } from \"@azure/msal-browser\";\r\nimport { IRootScope } from \"../interfaces/IRootScope\";\r\nimport { CommonUtils } from \"../utils/CommonUtils\";\r\nimport { PartnerAppRegistrationService } from \"./PartnerAppRegistrationService\";\r\nimport { BrowserConstants } from \"@azure/msal-browser/dist/utils/BrowserConstants\";\r\n\r\n/**\r\n * @application Fxp\r\n */\r\n/**\r\n * @module Fxp.Services\r\n */\r\n\r\n/**\r\n * A service keeping the generic methods used in the fxp application and for multiple adal requests\r\n * @class Fxp.Services.MsalAuthenticationService\r\n * @classdesc A service used for generic methods in the fxp application and adal simultaneous cors requests\r\n * @example Example to create an instance of MsalAuthenticationService\r\n * //Initializing MsalAuthenticationService\r\n * angular.module('FxPApp').controller('AppController', ['MsalAuthenticationService', AppController]);\r\n * function AppController(MsalAuthenticationService){ MsalAuthenticationService.getJsonData(path, callbackfunc); }\r\n */\r\nexport class MsalAuthenticationService {\r\n\r\n private publicClientApplication: PublicClientApplication = null;\r\n private anonymousEndpointList = [];\r\n constructor(config: Configuration) {\r\n if (!this.publicClientApplication) {\r\n this.publicClientApplication = new PublicClientApplication(config);\r\n }\r\n\r\n var FxpAppSettings = FxpAppSettings || window[\"FxpAppSettings\"] || {};\r\n var anonEndpoints = FxpAppSettings.AuthExcludedDomains;\r\n if (anonEndpoints) {\r\n this.anonymousEndpointList = anonEndpoints.split(';');\r\n }\r\n }\r\n\r\n registerEndPoint(endpoint: string, applicationId: string) {\r\n PartnerAppRegistrationService.registerEndpoints(endpoint, applicationId);\r\n }\r\n\r\n\r\n initializeAuthentication(configuration: Configuration) {\r\n if (!this.publicClientApplication)\r\n this.publicClientApplication = new PublicClientApplication(configuration);\r\n }\r\n\r\n /**\r\n * Checks for whether the adal service request is in progress or not and returns boolean\r\n * @method Fxp.Utils.Services.MsalAuthenticationService.accessTokenRequestInProgress\r\n * @param {EndPoint} endpoint is the api endpoint for the resource or the api to which adal authorizes.\r\n * @example Example to invoke accessTokenRequestInProgress\r\n * MsalAuthenticationService.accessTokenRequestInProgress('http://oneprofiledevapi.azurewebsites.net');\r\n */\r\n accessTokenRequestInProgress(endpoint): boolean {\r\n return false;\r\n }\r\n\r\n async login($rootScope: IRootScope) {\r\n\r\n const accounts = this.publicClientApplication.getAllAccounts();\r\n if (accounts.length > 0) {\r\n this.publicClientApplication.setActiveAccount(accounts[0]);\r\n }\r\n\r\n const callbackId = this.publicClientApplication.addEventCallback((message: any) => {\r\n // Update UI or interact with EventMessage here\r\n if (message.eventType === EventType.LOGIN_SUCCESS) {\r\n const payload: any = message.payload;\r\n this.publicClientApplication.setActiveAccount(payload?.account as AccountInfo);\r\n } else if (message.eventType === EventType.LOGIN_FAILURE) {\r\n console.log(\"MsalError: \" + message.error);\r\n $rootScope.$broadcast('msal:loginFailure', { errorDesc: message.error, err: message.eventType});\r\n }\r\n else if (message.eventType === EventType.ACQUIRE_TOKEN_FAILURE) {\r\n console.log(\"MsalError: \" + message.error);\r\n $rootScope.$broadcast('msal:acquireTokenFailure', message.error, message.eventType, \"\", message?.error?.errorDesc?.errorCode);\r\n }\r\n });\r\n\r\n var localPublicClientApplication = this.publicClientApplication;\r\n if (accounts.length === 0) {\r\n await this.publicClientApplication\r\n .handleRedirectPromise()\r\n .then(async (loginResponse: AuthenticationResult | null) => {\r\n if (loginResponse !== null) {\r\n const account = localPublicClientApplication.getActiveAccount();\r\n if (!account) {\r\n // redirect anonymous user to login page\r\n await localPublicClientApplication.loginRedirect();\r\n }\r\n $rootScope.$broadcast('msal:loginSuccess', loginResponse.idToken);\r\n }\r\n else {\r\n await localPublicClientApplication.loginRedirect();\r\n }\r\n })\r\n .catch((error: any) => {\r\n console.log(error);\r\n throw (error);\r\n });\r\n }\r\n else {\r\n var silentRequest = {\r\n scopes: [\"User.Read\"],\r\n account: accounts[0],\r\n forceRefresh: false\r\n };\r\n\r\n var request = {\r\n scopes: [\"User.Read\"],\r\n loginHint: accounts[0].username // For v1 endpoints, use upn from idToken claims\r\n };\r\n\r\n const tokenResponse = await this.publicClientApplication.acquireTokenSilent(silentRequest).catch(error => {\r\n console.log(\"MsalError: Login Error\");\r\n $rootScope.$broadcast('msal:acquireTokenFailure', { errorDesc: \"Login Error msal:acquireTokenFailure\", err: error });\r\n $rootScope.$broadcast('msal:loginFailure', { errorDesc: \"Login Error due to Refresh Token msal:loginFailure\", err: \"Login Error due to Refresh Token msal:loginFailure\" });\r\n if (error.errorCode === BrowserConstants.INVALID_GRANT_ERROR) {\r\n // Refresh token expired, prompt for re-authentication\r\n if (error.error === \"invalid_grant\" && error.errorCodes && error.errorCodes.includes(700084))\r\n {\r\n localStorage.clear();\r\n $rootScope.$broadcast('msal:loginFailure', { errorDesc: \"Session expired, please re-authenticate\", err: error });\r\n $rootScope.$broadcast('msal:acquireTokenFailure', { errorDesc: \"Session expired, please re-authenticate 1\", err: error });\r\n return this.publicClientApplication.loginRedirect(); // Redirect for re-authentication\r\n }\r\n \r\n }\r\n const isServerError = error instanceof ServerError;\r\n const isInteractionRequiredError = error instanceof InteractionRequiredAuthError;\r\n const isRefreshTokenError = error instanceof BrowserAuthError;\r\n\r\n\r\n if (isInteractionRequiredError) {\r\n // fallback to interaction when silent call fails\r\n localStorage.clear();\r\n return this.publicClientApplication.acquireTokenRedirect(request)\r\n }\r\n else {\r\n if (isRefreshTokenError) {\r\n localStorage.clear();\r\n window.location.reload();\r\n }\r\n else {\r\n const isInvalidGrantError = (error.errorCode === BrowserConstants.INVALID_GRANT_ERROR);\r\n if (isServerError && isInvalidGrantError && !isInteractionRequiredError) {\r\n console.log(\"MsalError: Login Error due to Refresh Token\");\r\n $rootScope.$broadcast('msal:loginFailure', { errorDesc: \"Login Error due to Refresh Token\", err: \"Login Error due to Refresh Token\" });\r\n localStorage.clear();\r\n window.location.reload();\r\n }\r\n else {\r\n const isMonitorTimeoutError = (error.errorCode === \"monitor_window_timeout\");\r\n if (isMonitorTimeoutError) {\r\n console.log(\"MsalError: Login Error due to Refresh token on Iframe Timeout\");\r\n $rootScope.$broadcast('msal:loginFailure', { errorDesc: \"Token acquisition in iframe failed due to timeout\", err: \"Token acquisition in iframe failed due to timeout\" });\r\n localStorage.clear();\r\n window.location.reload();\r\n }\r\n }\r\n }\r\n }\r\n })\r\n if (tokenResponse) {\r\n $rootScope.$broadcast('msal:loginSuccess', tokenResponse.idToken);\r\n }\r\n // const idToken = (await this.getTokenRedirect(null, this.publicClientApplication.getActiveAccount()));\r\n // if (idToken) {\r\n // $rootScope.$broadcast('msal:loginSuccess', idToken);\r\n // }\r\n // else {\r\n\r\n // }\r\n\r\n }\r\n }\r\n\r\n /**\r\n * Returns cached token for a given endpoint\r\n * @method Fxp.Utils.Services.MsalAuthenticationService.getCachedToken\r\n * @param {EndPoint} endpoint is the api endpoint for the resource or the api to which adal authorizes.\r\n * @example Example to invoke getCachedToken\r\n * MsalAuthenticationService.getCachedToken('http://oneprofiledevapi.azurewebsites.net');\r\n */\r\n async getCachedToken(endpoint) {\r\n return await this.getTokenRedirect(endpoint);\r\n }\r\n\r\n /**\r\n * To kick off token acquisition manually on special cases\r\n * @method Fxp.Utils.Services.MsalAuthenticationService.acquireToken\r\n * @param {EndPoint} endpoint is the api endpoint for the resource or the api to which adal authorizes.\r\n * @example Example to invoke acquireToken\r\n * MsalAuthenticationService.acquireToken('http://oneprofiledevapi.azurewebsites.net');\r\n */\r\n async acquireToken(endpoint) {\r\n return await (await this.getTokenRedirectAsync(endpoint)).accessToken;\r\n }\r\n\r\n acquireTokenAsPromise(endpoint) {\r\n return this.getTokenRedirectAsync(endpoint);\r\n }\r\n\r\n /**\r\n * Checks for whether the token retrieval is started for the endpoint provided\r\n * @method Fxp.Utils.Services.MsalAuthenticationService.isTokenRetrievalStarted\r\n * @param {Resource} resource an endpoint which is passed to check for it in the logs entry.\r\n * @example Example to invoke isTokenRetrievalStarted\r\n * MsalAuthenticationService.isTokenRetrievalStarted('https://microsoft.onmicrosoft.com/FXPCouchBaseAPI');\r\n */\r\n isTokenRetrievalStarted(resource): boolean {\r\n return false;\r\n }\r\n\r\n getAccount(): AccountInfo {\r\n return this.publicClientApplication.getActiveAccount();\r\n }\r\n\r\n private async getTokenRedirect(\r\n endpoint: string, account: AccountInfo = null\r\n ): Promise {\r\n try {\r\n var response = await this.getTokenRedirectAsync(endpoint, account);\r\n return response.accessToken;\r\n } catch (error) {\r\n console.error(error);\r\n console.log(\"silent token acquisition fails.\");\r\n if (error.errorCode === BrowserConstants.INVALID_GRANT_ERROR) {\r\n // Refresh token expired, prompt for re-authentication\r\n localStorage.clear();\r\n this.publicClientApplication.loginRedirect(); // Redirect for re-authentication\r\n }\r\n else if (error instanceof InteractionRequiredAuthError) {\r\n console.log(\"acquiring token using redirect\");\r\n this.publicClientApplication.loginRedirect();\r\n } else {\r\n console.error(error);\r\n }\r\n }\r\n }\r\n\r\n async getTokenForAppIdAsync(appId: string): Promise {\r\n return new Promise((resolve, reject) => {\r\n var silentRequest = { scopes: [appId + \"/.default\"] };\r\n var redirectRequest: RedirectRequest = { scopes: [\"User.Read\"] };\r\n redirectRequest.account = this.publicClientApplication.getActiveAccount();\r\n try {\r\n this.publicClientApplication.acquireTokenSilent(\r\n silentRequest\r\n ).then((response: AuthenticationResult) => resolve(response.accessToken));\r\n } catch (e) {\r\n console.log(\"silent token acquisition fails.\");\r\n if (e instanceof InteractionRequiredAuthError) {\r\n console.log(\"acquiring token using redirect\");\r\n this.publicClientApplication.acquireTokenRedirect(redirectRequest);\r\n } else {\r\n console.error(e);\r\n reject(\"error getting token: \" + e);\r\n }\r\n }\r\n })\r\n }\r\n\r\n private getTokenRedirectAsync(\r\n endpoint: string, account: AccountInfo = null\r\n ): Promise {\r\n var silentRequest: SilentRequest = { scopes: [\"User.Read\"] };\r\n var redirectRequest: RedirectRequest = { scopes: [\"User.Read\"] };\r\n if (account) {\r\n silentRequest = { scopes: [\"User.Read\"] };\r\n redirectRequest = { scopes: [\"User.Read\"] };\r\n redirectRequest.account = account;\r\n }\r\n else if (endpoint) {\r\n var authExceptionEndpoints = PartnerAppRegistrationService.addAuthenticationExceptionEndpoints();\r\n this.anonymousEndpointList = this.anonymousEndpointList.concat(authExceptionEndpoints);\r\n if (this.anonymousEndpointList) {\r\n for (var i = 0; i < this.anonymousEndpointList.length; i++) {\r\n if (endpoint.indexOf(this.anonymousEndpointList[i]) > -1) {\r\n return Promise.resolve({ accessToken: '' } as AuthenticationResult);\r\n\r\n }\r\n }\r\n }\r\n\r\n var resource = this.getResourceForEndpoint(endpoint);\r\n if (resource) {\r\n silentRequest = { scopes: [resource + \"/.default\"] };\r\n redirectRequest = { scopes: [\"User.Read\"], redirectStartPage: window.location.href };\r\n redirectRequest.account = this.publicClientApplication.getActiveAccount();\r\n }\r\n }\r\n try {\r\n return this.publicClientApplication.acquireTokenSilent(\r\n silentRequest\r\n );\r\n } catch (e) {\r\n console.log(\"silent token acquisition fails.\");\r\n if (e.errorCode === BrowserConstants.INVALID_GRANT_ERROR) {\r\n // Refresh token expired, prompt for re-authentication\r\n localStorage.clear();\r\n this.publicClientApplication.loginRedirect(); // Redirect for re-authentication\r\n }\r\n else if (e instanceof InteractionRequiredAuthError) {\r\n console.log(\"acquiring token using redirect\");\r\n this.publicClientApplication.acquireTokenRedirect(redirectRequest);\r\n } else {\r\n console.error(e);\r\n }\r\n }\r\n\r\n return new Promise((resolve, reject) => reject('No resource found for the Request'));\r\n }\r\n\r\n private getResourceForEndpoint(endpoint) {\r\n\r\n var config = window[\"ModelConfiguration\"];\r\n var FxpAppSettings = FxpAppSettings || window[\"FxpAppSettings\"] || {};\r\n var partnerEnpoints = PartnerAppRegistrationService.getRegisterEndpoints();\r\n var endpoints = JSON.parse(JSON.stringify(eval(\"(\" + \"{\" + config.Endpoints + \"}\" + \")\"))); // CodeQL [SM04509] Intent is to set a config value\r\n\r\n endpoints = CommonUtils.jsonConcat(endpoints, partnerEnpoints);\r\n window._msalEndpoints = endpoints;\r\n var clientId = FxpAppSettings.FxpAppClientId;\r\n // var clientId = \"853531f8-add1-44d2-824b-b4a2790b08ac\";\r\n endpoints.loginResource = this.publicClientApplication ? clientId /*FxpAppSettings.FxpAppClientId */ : null;\r\n endpoints.redirectUri = this.publicClientApplication ? window.location.host : null;\r\n\r\n if (endpoints) {\r\n var bestMatchedConfigEndpoint = \"\";\r\n endpoint = endpoint.trimStart();\r\n for (var configEndpoint in endpoints) {\r\n if (endpoint.startsWith(configEndpoint) && configEndpoint.length > bestMatchedConfigEndpoint.length) {\r\n bestMatchedConfigEndpoint = configEndpoint;\r\n }\r\n }\r\n if (bestMatchedConfigEndpoint !== \"\") {\r\n return endpoints[bestMatchedConfigEndpoint];\r\n }\r\n // for (var configEndpoint in endpoints) {\r\n // // configEndpoint is like /api/Todo requested endpoint can be /api/Todo/1\r\n // myArray.filter(element => element.includes(\"substring\"));\r\n // if (endpoint.indexOf(configEndpoint) > -1) {\r\n // return endpoints[configEndpoint];\r\n // }\r\n // }\r\n }\r\n\r\n // default resource will be clientid if nothing specified\r\n // App will use idtoken for calls to itself\r\n // check if it's staring from http or https, needs to match with app host\r\n if (endpoint.indexOf('http://') > -1 || endpoint.indexOf('https://') > -1) {\r\n if (this._getHostFromUri(endpoint) === this._getHostFromUri(endpoints.redirectUri)) {\r\n return endpoints.loginResource;\r\n }\r\n else {\r\n if (endpoint.indexOf('azureedge.net') > -1) {\r\n return '';\r\n }\r\n }\r\n }\r\n else {\r\n // in angular level, the url for $http interceptor call could be relative url,\r\n // if it's relative call, we'll treat it as app backend call.\r\n return endpoints.loginResource;\r\n }\r\n\r\n // if not the app's own backend or not a domain listed in the endpoints structure\r\n return null;\r\n };\r\n\r\n /**\r\n * Strips the protocol part of the URL and returns it.\r\n * @ignore\r\n */\r\n private _getHostFromUri(uri) {\r\n // remove http:// or https:// from uri\r\n var extractedUri = String(uri).replace(/^(https?:)\\/\\//, '');\r\n extractedUri = extractedUri.split('/')[0];\r\n return extractedUri;\r\n };\r\n\r\n}\r\n\r\nexport class MsalAuthenticationServiceProvider implements angular.IServiceProvider {\r\n\r\n _config: any;\r\n _msalService: MsalAuthenticationService;\r\n public configure(config: Configuration): void {\r\n this._config = config;\r\n if (!this._msalService) {\r\n this._msalService = new MsalAuthenticationService(this._config);\r\n }\r\n }\r\n\r\n $get(): any {\r\n return this._msalService;\r\n }\r\n\r\n init() {\r\n // throw new Error(\"Method not implemented.\");\r\n }\r\n addState(stateName: any, config: any): void {\r\n // throw new Error(\"Method not implemented.\");\r\n }\r\n otherwise(input: any): void {\r\n // throw new Error(\"Method not implemented.\");\r\n }\r\n}\r\n\r\n","import { FxpRouteService } from \"./FxpRouteService\";\r\nimport { FxpConfigurationService } from \"./FxpConfiguration\";\r\nimport { IRootScope } from \"../interfaces/IRootScope\";\r\nimport { StateService } from \"@uirouter/core\"\r\nimport { IFxPService } from \"../interfaces/IFxpService\";\r\nimport { CommonUtils } from '../../js/utils/CommonUtils';\r\n/**\r\n * @application Fxp\r\n */\r\n/**\r\n * @module Fxp.Services\r\n */\r\n/**\r\n * A service to handle notification actions\r\n * @class Fxp.Services.NotificationActionCenter\r\n * @classdesc A service to handle actions for Notifications\r\n * @example Example to create an instance of NotificationActionCenter \r\n * //Initializing NotificationActionCenter\r\n * angular.module('FxPApp').controller('AppController', ['NotificationActionCenter', AppController]);\r\n * function AppController(notificationActionCenter, fxpConstants){ notificationActionCenter.excecuteNotificationAction('New Resource Request'); }\r\n */\r\nexport class NotificationActionCenter implements IFxPService{\r\n\tprivate notificationActions: any;\r\n\tprivate iconConfiguration: any;\r\n\tconstructor(\r\n\t\tprivate $rootScope: IRootScope,\r\n\t\tprivate $state: StateService,\r\n\t\tfxpConfigurationService: FxpConfigurationService,\r\n\t\tprivate fxpRouteService: FxpRouteService\r\n\t) {\r\n\t\tthis.notificationActions = fxpConfigurationService.FxpBaseConfiguration.NotificationConfiguration ? fxpConfigurationService.FxpBaseConfiguration.NotificationConfiguration.ActionConfiguration : [];\r\n\t\tthis.iconConfiguration = fxpConfigurationService.FxpBaseConfiguration.NotificationConfiguration ? fxpConfigurationService.FxpBaseConfiguration.NotificationConfiguration.IconConfiguration : [];\r\n\t}\r\n\r\n\t/**\r\n * Navigate to a state/url based on the subject passed\r\n * @method Fxp.Services.notificationActionCenter.excecuteNotificationAction\r\n * @param {any} is an object of containing details of notification.\r\n * @example Example to invoke excecuteNotificationAction\r\n * notificationActionCenter.excecuteNotificationAction('New Resource Request');\r\n */\r\n\texcecuteNotificationAction(item) {\r\n\t\tvar self = this,\r\n\t\t\ttarget = \"\",\r\n\t\t\tactions = [];\r\n\r\n\t\ttry {\r\n\t\t\tactions.push(JSON.parse(item.content));\r\n\t\t} catch (e) {\r\n\t\t\tactions = self.notificationActions.filter(function (notification) {\r\n\t\t\t\treturn !CommonUtils.isNullOrEmpty(item.subject) && notification.Subject.toLowerCase() == item.subject.toLowerCase();\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif (actions.length) {\r\n\t\t\tif (actions[0].OpenInNewTab) {\r\n\t\t\t\ttarget = \"_blank\";\r\n\t\t\t}\r\n\t\t\tif (actions[0].ActionType.toLowerCase() == \"state\" && self.$state.get(actions[0].Action)) {\r\n\t\t\t\tif (target)\r\n\t\t\t\t\tself.fxpRouteService.navigateToSpecificUrl(self.$state.href(actions[0].Action, {}, { absolute: true }), target);\r\n\t\t\t\telse\r\n\t\t\t\t\tself.fxpRouteService.navigatetoSpecificState(actions[0].Action);\r\n\t\t\t} else if (actions[0].ActionType.toLowerCase() == \"url\") {\r\n\t\t\t\tself.fxpRouteService.navigateToSpecificUrl(actions[0].Action, target);\r\n\t\t\t} else if (actions[0].ActionType.toLowerCase() == \"function\") {\r\n\t\t\t\tself.$rootScope.$broadcast(actions[0].Action, item);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t* Register to a new state to map with notification\r\n\t* @method Fxp.Services.notificationActionCenter.registerNotificationAction\r\n\t* @param {string} a mandatory string value which contains notification subject.\r\n\t* @param {string} a mandatory string value which contains action to be performed.\r\n\t* @param {string} a mandatory string value which contains action type: state/url/function.\r\n\t* @param {boolean} a mandatory bool value whether to perform the action in new tab.\r\n\t* @example Example to invoke registerNotificationAction\r\n\t* notificationActionCenter.registerNotificationAction('New Resource Request');\r\n\t*/\r\n\tregisterNotificationAction(subject, action, actionType, openInNewTab) {\r\n\t\tvar notificationAction = this.notificationActions.filter(item => item.Subject == subject);\r\n\t\tif (!notificationAction.length) {\r\n\t\t\tthis.notificationActions.push({\r\n\t\t\t\tSubject: subject,\r\n\t\t\t\tActionType: actionType,\r\n\t\t\t\tOpenInNewTab: openInNewTab,\r\n\t\t\t\tAction: action\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tnotificationAction[0].ActionType = actionType;\r\n\t\t\tnotificationAction[0].OpenInNewTab = openInNewTab;\r\n\t\t\tnotificationAction[0].Action = action;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t* Appends icons and other properties to the notification\r\n\t* @method Fxp.Services.notificationActionCenter.appendPropertiesToNotifications\r\n\t* @param {any} notifications mandatory array of notifications.\r\n\t* @example Example to invoke appendPropertiesToNotifications\r\n\t* notificationActionCenter.appendPropertiesToNotifications([]);\r\n\t*/\r\n\tappendPropertiesToNotifications(notifications) {\r\n\t\tvar self = this;\r\n\t\tnotifications.forEach(function (item) {\r\n\t\t\t// Find icon corresponding to notification.\r\n\t\t\tvar icon = self.iconConfiguration.filter(function (icon) {\r\n\t\t\t\treturn icon.From.toLowerCase() == item.senderAddress.toLowerCase();\r\n\t\t\t});\r\n\t\t\t// Check if notification has corresponding icon.\r\n\t\t\tif (icon.length)\r\n\t\t\t\titem.icon = icon[0].Icon;\r\n\r\n\t\t\t// Check for dynamic action\r\n\t\t\titem.hasAction = item.content.indexOf(\"ActionType\") > -1;\r\n\r\n\t\t\t// Check notification has corresponding action.\r\n\t\t\tif (!item.hasAction) {\r\n\t\t\t\titem.hasAction = self.notificationActions.some(function (action) {\r\n\t\t\t\t\treturn !CommonUtils.isNullOrEmpty(item.subject) && action.Subject.toLowerCase() == item.subject.toLowerCase();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\t// Convert date to local.\r\n\t\t\titem.publishedOn = new Date(item.publishedOn);\r\n\t\t});\r\n\t\treturn notifications;\r\n\t}\r\n}\r\n","import { UserInfoService } from './UserInfoService'\r\nimport { IFxPService } from \"../interfaces/IFxpService\";\r\nimport { FxpConfigurationService } from \"./FxpConfiguration\";\r\nimport { INotificationService } from \"../interfaces/INotificationService\";\r\n\r\n/**\r\n * @application Fxp\r\n */\r\n/**\r\n * @module Fxp.Services\r\n */\r\n/**\r\n\t* A service to handle service call for notifications\r\n\t* @class Fxp.Services.NotificationService\r\n\t* @classdesc A service to handle service calls for notifications\r\n\t* @example Example to create an instance of NotificationService\r\n\t* //Initializing NotificationService\r\n\t* angular.module('FxPApp').controller('AppController', ['NotificationService', AppController]);\r\n\t* function AppController(notificationService, fxpConstants){ notificationService.getUnreadNotificationCount(); }\r\n\t*/\r\nexport class NotificationService implements INotificationService, IFxPService {\r\n\tprivate notificationApiBaseUrl: string;\r\n\tprivate fxpServiceEndPoint: string;\r\n\tprivate notificationApiWebNotifResourceUrl: string = \"/api/webnotifications\";\r\n\t\r\n\tconstructor(\r\n\t\tprivate $http: angular.IHttpService,\r\n\t\tprivate fxpConfiguration: FxpConfigurationService,\r\n\t\tprivate userInfoService: UserInfoService\r\n\t\t) {\r\n\t\tthis.notificationApiBaseUrl = fxpConfiguration.FxpAppSettings.NotificationServiceEndpoint;\r\n\t\tthis.fxpServiceEndPoint = fxpConfiguration.FxpAppSettings.FxpServiceEndPoint;\r\n\t\tthis.notificationApiWebNotifResourceUrl = this.notificationApiBaseUrl + this.notificationApiWebNotifResourceUrl;\r\n\t \r\n\t}\r\n\r\n\t/**\r\n\t* Get notifications\r\n\t* @method Fxp.Services.notificationService.getNotifications\r\n\t* @param {number} startIndex mandatory number value which contains index after which notification is to be fetched.\r\n\t* @param {number} count mandatory number value which contains number of notification to be fetched.\r\n\t* @param {string} status optional string value which contains status of notifications to be fetched.\r\n\t* @param {number} offset optional number value which contains id of last notification fetched.\r\n\t* @example Example to invoke getNotifications\r\n\t* notificationService.getNotifications(startIndex, count);\r\n\t*/\r\n\tgetNotifications(startIndex, count, status?, offset?, user?, channel?): angular.IPromise {\r\n\t\tuser = user ? user : this.userInfoService.getCurrentUserUpn();\r\n\t\tchannel = channel ? channel : this.fxpConfiguration.FxpAppSettings[\"NotificationServiceChannel\"];\r\n\t\tvar urlGetNotiicationsByPage = this.notificationApiWebNotifResourceUrl + \"?channel=\" + channel + \"&userId=\" + user + \"&skip=\" + startIndex + \"&take=\" + count;\r\n\t\tif (status) {\r\n\t\t\turlGetNotiicationsByPage += \"&status=\" + status;\r\n\t\t}\r\n\t\tif (offset) {\r\n\t\t\turlGetNotiicationsByPage += \"&filter=notification.PublishedOnTicks >\" + offset;\r\n\t\t}\r\n\t\turlGetNotiicationsByPage += \"&Order=notification.PublishedOnTicks DESC\";\r\n\t\tvar requestConfig: any = {};\r\n\r\n\t\tif (this.fxpConfiguration.FxpAppSettings[\"NotificationServiceAllowNullHeader\"]) {\r\n\t\t\trequestConfig = {\r\n\t\t\t\theaders: {}\r\n\t\t\t};\r\n\t\t\trequestConfig.headers[this.fxpConfiguration.FxpAppSettings[\"NotificationServiceAllowNullHeader\"]] = true;\r\n\t\t}\r\n\t\treturn this.$http.get(urlGetNotiicationsByPage, requestConfig);\r\n\t}\r\n\r\n\t/**\r\n\t* Delete notification\r\n\t* @method Fxp.Services.notificationService.deleteNotification\r\n\t* @param {number} webNotificationId mandatory number value which contains id of the notification which is to be deleted.\r\n\t* @example Example to invoke deleteNotification\r\n\t* notificationService.deleteNotification(webNotificationId);\r\n\t*/\r\n\tdeleteNotification(webNotificationId, user?, channel?): angular.IPromise {\r\n\t\tuser = user ? user : this.userInfoService.getCurrentUserUpn();\r\n\t\tchannel = channel ? channel : this.fxpConfiguration.FxpAppSettings[\"NotificationServiceChannel\"];\r\n\t\tvar urlDeleteNotification = this.notificationApiWebNotifResourceUrl + \"/\" + webNotificationId + \"?channel=\" + channel + \"&userId=\" + user;\r\n\t\treturn this.$http.delete(urlDeleteNotification);\r\n\t}\r\n\r\n\t/**\r\n\t* Delete all notification\r\n\t* @method Fxp.Services.notificationService.deleteAllNotification\r\n\t* @example Example to invoke deleteAllNotification\r\n\t* notificationService.deleteAllNotification();\r\n\t*/\r\n\tdeleteAllNotification(user?, channel?): angular.IPromise {\r\n\t\tuser = user ? user : this.userInfoService.getCurrentUserUpn();\r\n\t\tchannel = channel ? channel : this.fxpConfiguration.FxpAppSettings[\"NotificationServiceChannel\"];\r\n\t\tvar urlDeleteAllNotification = this.notificationApiWebNotifResourceUrl + \"?channel=\" + channel + \"&userId=\" + user;\r\n\t\treturn this.$http.delete(urlDeleteAllNotification);\r\n\t}\r\n\r\n\t/**\r\n\t* Mark notification as Read\r\n\t* @method Fxp.Services.notificationService.markNotificationAsRead\r\n\t* @param {number} webNotificationId mandatory number value which contains id of the notification which is to be marked as read.\r\n\t* @example Example to invoke markNotificationAsRead\r\n\t* notificationService.markNotificationAsRead(webNotificationId);\r\n\t*/\r\n\tmarkNotificationAsRead(webNotificationId, user?, channel?): angular.IPromise {\r\n\t\tuser = user ? user : this.userInfoService.getCurrentUserUpn();\r\n\t\tchannel = channel ? channel : this.fxpConfiguration.FxpAppSettings[\"NotificationServiceChannel\"];\r\n\t\tvar urlMarkAsRead = this.notificationApiWebNotifResourceUrl + \"/\" + webNotificationId + \"/mark\" + \"?channel=\" + channel + \"&userId=\" + user;\r\n\t\treturn this.$http.put(urlMarkAsRead, {});\r\n\t}\r\n\r\n\t/**\r\n\t* Mark all notification as Read\r\n\t* @method Fxp.Services.notificationService.markAllNotificationAsRead\r\n\t* @example Example to invoke markAllNotificationAsRead\r\n\t* notificationService.markAllNotificationAsRead();\r\n\t*/\r\n\tmarkAllNotificationsAsRead(user?, channel?): angular.IPromise {\r\n\t\tuser = user ? user : this.userInfoService.getCurrentUserUpn();\r\n\t\tchannel = channel ? channel : this.fxpConfiguration.FxpAppSettings[\"NotificationServiceChannel\"];\r\n\t\tvar urlMarkAllAsRead = this.notificationApiWebNotifResourceUrl + \"/mark\" + \"?channel=\" + channel + \"&userId=\" + user;\r\n\t\treturn this.$http.put(urlMarkAllAsRead, {});\r\n\t}\r\n\r\n\t/**\r\n\t* Publish Notification\r\n\t* @method Fxp.Services.notificationService.publishNotifications\r\n\t* @example Example to invoke publishNotifications\r\n\t* notificationService.publishNotifications();\r\n\t*/\r\n\tpublishNotifications(notificationArray: Array): angular.IPromise {\r\n\t\tvar publishEventUrl = this.fxpConfiguration.FxpAppSettings[\"EventStoreEndpoint\"] + \"api/events\";\r\n\t\tvar event = {\r\n\t\t\t\"EventName\": this.fxpConfiguration.FxpAppSettings[\"EventStoreDefaultNotificationEventName\"],\r\n\t\t\t\"EventType\": \"notification\",\r\n\t\t\t\"EventSubject\": this.fxpConfiguration.FxpAppSettings[\"EventStoreDefaultNotificationEventName\"],\r\n\t\t\t\"Publisher\": {\r\n\t\t\t\t\"Id\": this.fxpConfiguration.FxpAppSettings[\"EventStoreDefaultNotificationPublisherId\"],\r\n\t\t\t\t\"Name\": this.fxpConfiguration.FxpAppSettings[\"EventStoreDefaultNotificationPublisherName\"],\r\n\t\t\t},\r\n\t\t\t\"Payload\": \"\",\r\n\t\t\t\"Notification\": {\r\n\t\t\t\t\"WebNotification\": {\r\n\t\t\t\t\t\"Enabled\": true,\r\n\t\t\t\t\t\"Channel\": this.fxpConfiguration.FxpAppSettings[\"NotificationServiceChannel\"],\r\n\t\t\t\t\t\"Notifications\": []\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tif (notificationArray) {\r\n\t\t\tfor (var notification of notificationArray) {\r\n\t\t\t\tevent.Notification.WebNotification.Notifications.push({\r\n\t\t\t\t\t\"SenderAddress\": notification.From ? notification.From : this.fxpConfiguration.FxpAppSettings[\"FxPAdminName\"],\r\n\t\t\t\t\t\"Subject\": notification.Subject ? notification.Subject : \"\",\r\n\t\t\t\t\t\"Content\": notification.Content,\r\n\t\t\t\t\t\"ReceiverAddresses\": [notification.To]\r\n\t\t\t\t})\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this.$http.post(\r\n\t\t\tpublishEventUrl,\r\n\t\t\tevent,\r\n\t\t\t{\r\n\t\t\t\theaders:\r\n\t\t\t\t{\r\n\t\t\t\t\t'Content-Type': 'application/json'\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t* Publish Notification (Deprecated - DO NOT USE)\r\n\t* @method Fxp.Services.notificationService.publishNotificationsRolesRoleGroup\r\n\t* @example Example to invoke publishNotificationsRolesRoleGroup\r\n\t* notificationService.publishNotificationsRolesRoleGroup();\r\n\t*/\r\n\tpublishNotificationsRolesRoleGroup(notificationArray): angular.IPromise {\r\n\t\tvar urlPublish = this.fxpServiceEndPoint + \"/notification\";\r\n\r\n\t\treturn this.$http.post(\r\n\t\t\turlPublish,\r\n\t\t\tnotificationArray,\r\n\t\t\t{\r\n\t\t\t\theaders:\r\n\t\t\t\t{\r\n\t\t\t\t\t'Content-Type': 'application/json; charset=UTF-8'\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t}\r\n}","import { IRootScope } from \"../interfaces/IRootScope\";\r\nimport { NotificationService } from \"./NotificationService\";\r\nimport { FxpBroadcastedEvents } from \"./FxpBroadcastedEvents\";\r\nimport { IFxPService } from \"../interfaces/IFxpService\";\r\nimport { CommonUtils } from '../../js/utils/CommonUtils';\r\n/**\r\n * @application Fxp\r\n */\r\n/**\r\n * @module Fxp.Services\r\n */\r\n/**\r\n* A service to handle service call for notifications\r\n* @class Fxp.Services.NotificationStore\r\n* @classdesc A service to handle service calls for notifications\r\n* @example Example to create an instance of NotificationStore\r\n* //Initializing NotificationService\r\n* angular.module('FxPApp').controller('AppController', ['NotificationStore', AppController]);\r\n* function AppController(notificationStore, fxpConstants){ notificationStore.getUnreadNotificationCount(); }\r\n*/\r\nexport class NotificationStore implements IFxPService {\r\n\tconstructor(\r\n\t\tprivate $rootScope: IRootScope,\r\n\t\tprivate $q: angular.IQService,\r\n\t\tprivate notificationService: NotificationService\r\n\t) {\r\n\t}\r\n\r\n\t/**\r\n\t* Get notifications\r\n\t* @method Fxp.Services.notificationStore.getNotifications\r\n\t* @param {number} startIndex mandatory number value which contains index after which notification is to be fetched.\r\n\t* @param {number} count mandatory number value which contains number of notification to be fetched.\r\n\t* @param {string} status optional string value which contains status of notification to be fetched.\r\n\t* @param {number} offset optional number value which contains id of last notification fetched.\r\n\t* @example Example to invoke getNotifications\r\n\t* notificationStore.getNotifications(startIndex, count);\r\n\t*/\r\n\tgetNotifications(startIndex, count, status?, offset?): angular.IPromise {\r\n\t\tvar self = this,\r\n\t\t\tdefered = self.$q.defer();\r\n\t\tself.notificationService.getNotifications(startIndex, count, status, offset).then((response) => {\r\n\t\t\t\r\n\t\t\tdefered.resolve(response);\r\n\t\t}, (error) => {\r\n\t\t\tdefered.reject(error);\r\n\t\t});\r\n\t\treturn defered.promise;\r\n\t}\r\n\t\r\n\t\r\n\t/**\r\n\t* Delete notification\r\n\t* @method Fxp.Services.notificationStore.deleteNotification\r\n\t* @param {number} webNotificationId mandatory number value which contains id of the notification which is to be deleted.\r\n\t* @example Example to invoke deleteNotification\r\n\t* notificationStore.deleteNotification(webNotificationId);\r\n\t*/\r\n\tdeleteNotification(webNotificationId): angular.IPromise {\r\n\t\tvar self = this,\r\n\t\t\tdefered = self.$q.defer();\r\n\t\tif (!CommonUtils.isNullOrEmpty(webNotificationId)) {\r\n\t\t\t//Delete particular notification\r\n\t\t\tself.notificationService.deleteNotification(webNotificationId).then((response) => {\r\n\t\t\t\tdefered.resolve(response);\r\n\t\t\t}, (error) => {\r\n\t\t\t\tdefered.reject(error);\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\t//Delete all notification\r\n\t\t\tself.notificationService.deleteAllNotification().then((response) => {\r\n\t\t\t\tdefered.resolve(response);\r\n\t\t\t}, (error) => {\r\n\t\t\t\tdefered.reject(error);\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn defered.promise;\r\n\t}\r\n\r\n\t/**\r\n\t* Mark notification as Read\r\n\t* @method Fxp.Services.notificationStore.markNotificationAsRead\r\n\t* @param {number} webNotificationId mandatory number value which contains id of the notification which is to be marked as read.\r\n\t* @example Example to invoke markNotificationAsRead\r\n\t* notificationStore.markNotificationAsRead(webNotificationId);\r\n\t*/\r\n\tmarkNotificationAsRead(webNotificationId?): angular.IPromise {\r\n\t\tvar self = this,\r\n\t\t\tdefered = self.$q.defer();\r\n\t\tif (webNotificationId) {\r\n\t\t\t//Mark particular notification as Read\r\n\t\t\tself.notificationService.markNotificationAsRead(webNotificationId).then((response) => {\r\n\t\t\t\tdefered.resolve(response);\r\n\t\t\t}, (error) => {\r\n\t\t\t\tdefered.reject(error);\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\t//Mark particular notification as Read\r\n\t\t\tself.notificationService.markAllNotificationsAsRead().then((response) => {\r\n\t\t\t\tdefered.resolve(response);\r\n\t\t\t}, (error) => {\r\n\t\t\t\tdefered.reject(error);\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn defered.promise;\r\n\t}\r\n\r\n\t/**\r\n\t* Publish notifications\r\n\t* @method Fxp.Services.notificationStore.publishNotifications\r\n\t* @param {any} notificationArray array of notification object.\r\n\t* @example Example to invoke publishNotifications\r\n\t* notificationStore.publishNotifications(startIndex, count);\r\n\t*/\r\n\tpublishNotifications(notificationArray): angular.IPromise {\r\n\t\tvar self = this,\r\n\t\t\tdefered = self.$q.defer();\r\n\t\tself.notificationService.publishNotifications(notificationArray).then((response) => {\r\n\t\t\tdefered.resolve(response);\r\n\t\t}, (error) => {\r\n\t\t\tdefered.reject(error);\r\n\t\t});\r\n\t\treturn defered.promise;\r\n\t}\r\n\t/**\r\n\t* Publish notifications\r\n\t* @method Fxp.Services.notificationStore.publishNotificationsRolesRoleGroup\r\n\t* @param {any} notificationArray array of notification object.\r\n\t* @example Example to invoke publishNotificationsRolesRoleGroup\r\n\t* notificationStore.publishNotificationsRolesRoleGroup(notificationArray);\r\n\t*/\r\n\tpublishNotificationsRolesRoleGroup(notificationArray): angular.IPromise {\r\n\t\tvar self = this,\r\n\t\t\tdefered = self.$q.defer();\r\n\t\tself.notificationService.publishNotificationsRolesRoleGroup(notificationArray).then((response) => {\r\n\t\t\tdefered.resolve(response);\r\n\t\t}, (error) => {\r\n\t\t\tdefered.reject(error);\r\n\t\t});\r\n\t\treturn defered.promise;\r\n\t}\r\n}","import { IRootScope } from \"../interfaces/IRootScope\";\r\nimport { FxpContext } from \"../context/FxpContext\";\r\nimport { FxpMessageService } from \"../../app/banner/FxpMessageService\";\r\nimport { FxpConstants } from \"../common/ApplicationConstants\";\r\nimport { UserInfoService } from \"./UserInfoService\";\r\nimport { UserProfileService } from \"./userProfileService\";\r\nimport { UserClaimsService } from \"./UserClaimsService\";\r\nimport { IFxPService } from \"../interfaces/IFxpService\";\r\nimport { FxpGlobalStoreService } from \"./fxp.global.store.service\";\r\nimport { AddCurrentUserClaims } from \"../../app/claims/claims.action\";\r\nimport { AddCurrentUserProfile } from \"../../app/profile/profile.action\";\r\nimport {AddOBOEntity , RemoveOBOEntity} from \"../../app/obo/obo.action\";\r\nimport { removeOboContext } from \"../../app/adminTiles/adminTile.action\";\r\n\r\n/**\r\n * @application Fxp\r\n */\r\n/**\r\n * @module Fxp.Services\r\n */\r\n/**\r\n * A service to connect to user profile service to fetch the detaisl of user info and user claims related to partner apps\r\n * @class Fxp.Services.OBOUserService\r\n * @classdesc A service to connect to user profile service to fetch the user profile details and claims \r\n * @example Example to create an instance of user profile service \r\n * //Initializing User Profile Service\r\n * angular.module('FxPApp').controller('AppController', ['OBOUserService', AppController]);\r\n * function AppController(OBOUserService){ OBOUserService.InitializeOBOEntityFromContext(); }\r\n */\r\n\r\nexport class OBOUserService implements IFxPService {\r\n\tprivate $rootScope: IRootScope;\r\n\tprivate static _instance: OBOUserService;\r\n\tprivate fxpContextService: FxpContext;\r\n\tprivate q: angular.IQService;\r\n\tprivate OBOUserStatus: boolean;\r\n\tprivate OBOUserRoutes: any;\r\n\tprivate OBOUser: any;\r\n\tprivate OBOUserSessionInfo: string;\r\n\tprivate OBOUserTenantConfiguration: any;\r\n\tprivate fxpMessageService: FxpMessageService;\r\n\tprivate userInfoService: UserInfoService;\r\n\tprivate userProfileService: UserProfileService;\r\n\tprivate isOBOAsNewTab: boolean;\r\n\tprivate userClaimsService:UserClaimsService;\r\n\t\r\n\tconstructor($rootScope: IRootScope, fxpContextService: FxpContext, q: angular.IQService, fxpMessageService: FxpMessageService, userInfoService: UserInfoService, userProfileService: UserProfileService,userClaimsService:UserClaimsService,private globalStoreService:FxpGlobalStoreService) {\r\n\t\tthis.$rootScope = $rootScope;\r\n\t\tthis.fxpContextService = fxpContextService;\r\n\t\tthis.q = q;\r\n\t\tthis.OBOUser = \"\";\r\n\t\tthis.OBOUserRoutes = \"\";\r\n\t\tthis.OBOUserStatus = false;\r\n\t\tthis.OBOUserSessionInfo = \"\";\r\n\t\tthis.OBOUserTenantConfiguration = \"\";\r\n\t\tthis.fxpMessageService = fxpMessageService;\r\n\t\tthis.userInfoService = userInfoService;\r\n\t\tthis.userProfileService = userProfileService;\r\n\t\tthis.isOBOAsNewTab = false;\r\n\t\tthis.userClaimsService=userClaimsService;\r\n\r\n\t\tif (OBOUserService._instance) {\r\n\t\t\treturn OBOUserService._instance;\r\n\t\t}\r\n\t\tOBOUserService._instance = this;\r\n\t}\r\n\r\n\t/**\r\n * Intitalizes the in memory variables for OBO using the value passed\r\n * @method Fxp.Services.OBOUserService.initilizeOBOEntity\r\n * @param {any} value the json value for OBO entity\r\n * @example Example to invoke initilizeOBOEntity\r\n * OBOUserService.initilizeOBOEntity(value);\r\n */\r\n\tinitilizeOBOEntity(value: any): void {\r\n\t\tthis.$rootScope.actOnBehalfOfUserActive = value.OBOUserStatus;\r\n\t\tthis.OBOUser = value.OBOUser;\r\n\t\tthis.OBOUserRoutes = value.OBOUserRoutes;\r\n\t\tthis.OBOUserStatus = value.OBOUserStatus;\r\n\t\tthis.OBOUserSessionInfo = value.OBOUserSessionInfo;\r\n\t\tthis.OBOUserTenantConfiguration = value.OBOUserTenantConfiguration;\r\n\t\tthis.userInfoService.setOBOUserSessionInfo(value.OBOUserSessionInfo);\r\n\t\tthis.userInfoService.setActingOnBehalfOfFlag(true);\r\n\t\tif (!this.isOBOAsNewTab) {\r\n\t\t\tthis.userInfoService.setCurrentUserOID(value.OBOUser.aadObjectId);\r\n\t\t\tthis.userInfoService.setCurrentUser(this.OBOUser.alias);\r\n\t\t\tthis.userInfoService.setCurrentUserUpn(this.OBOUser.userUpn);\r\n\t\t}\r\n\t\t//Dispatch action to save obo entity state\r\n\t\tthis.globalStoreService.DispatchGlobalAction(\"Platform\",AddOBOEntity(value));\r\n\t}\r\n\r\n\r\n\t/**\r\n\t* Saves the entity of OBO in context and local inmemory variables\r\n\t* @method Fxp.Services.OBOUserService.saveOBOEntityInContext\r\n\t* @param {any} value the json value for OBO entity\r\n\t* @example Example to invoke saveOBOEntityInContext\r\n\t* OBOUserService.saveOBOEntityInContext(value);\r\n\t*/\r\n\tsaveOBOEntityInContext(value: any): void {\r\n\t\tthis.initilizeOBOEntity(value);\r\n\t\tthis.fxpContextService.saveContext(\"OBOEntity\", JSON.stringify(value));\r\n\t}\r\n\r\n\tsetCurrentUserStateFromLoggedInUserState():void{\r\n\t\t//set current user details from logged in user details\r\n\t\tlet profile = this.globalStoreService.GetPlatformState().LoggedInUser.Profile;\r\n\t\tlet claims = this.globalStoreService.GetPlatformState().LoggedInUser.Claims;\r\n\t\tthis.globalStoreService.DispatchGlobalAction(\"Platform\", AddCurrentUserClaims(claims));\r\n\t\tthis.globalStoreService.DispatchGlobalAction(\"Platform\", AddCurrentUserProfile(profile));\r\n\t}\r\n\t/**\r\n\t * Saves the entity of OBO in context and local inmemory variables\r\n\t * @method Fxp.Services.OBOUserService.saveOBOEntityInContext\r\n\t * @param {any} value the json value for OBO entity\r\n\t * @example Example to invoke saveOBOEntityInContext\r\n\t * OBOUserService.saveOBOEntityInContext(value);\r\n\t */\r\n\r\n initializeOBOEntityFromContext(): angular.IPromise {\r\n let self = this;\r\n //Wrapping it up in a promise just to make FxP wait until this is done. This promise need to succeed in all the cases. \r\n let defer = self.q.defer();\r\n this.fxpContextService.readContext(\"OBOEntity\").then(function (udata) {\r\n if (!udata.IsError) {\r\n\t\t var oboData = JSON.parse(udata.Result);\r\n\t\t self.userInfoService.setCurrentUserOID(oboData.OBOUser.aadObjectId);\r\n\t\t self.userProfileService.setCurrentUser(oboData.OBOUser.alias);\r\n try {\r\n\t\t\tself.initilizeOBOEntity(oboData);\r\n self.userClaimsService.getCalimsSvc(oboData.OBOUser.alias).then(function () {\r\n self.isOBOAsNewTab = true;\r\n defer.resolve(oboData.OBOUser);\r\n }).catch(function () {\r\n //TODO: Log exception here.\r\n\t\t\t defer.resolve(null);\r\n\t\t\t self.removeOBOUserContext();\r\n });\r\n }\r\n catch (ex) {\r\n self.fxpMessageService.addMessage(self.$rootScope.fxpUIConstants.UIMessages.SelectedProfileRoles.ErrorMessage, FxpConstants.messageType.error);\r\n //TODO: Log exception here. \r\n // Do not reject this promise otherwise FxP will not load. If this is failing OBO will not get initialized but FxP will boot normal. \r\n\t\t\tdefer.resolve(null);\r\n\t\t\tself.removeOBOUserContext();\r\n }\r\n }\r\n else {\r\n self.removeOBOUserContext();\r\n defer.resolve(null);\r\n }\r\n //Due to async nature of the call to this method, the variable \r\n //actOnBehalfOfUserActive is not being set by the time FXP has \r\n //reached Home page.Hence forcing it to apply the rootscope once again.\r\n if (!self.$rootScope.$$phase) {\r\n self.$rootScope.$apply();\r\n }\r\n\r\n }, function (error) {\r\n self.removeOBOUserContext();\r\n //Due to async nature of the call to this method, the variable \r\n //actOnBehalfOfUserActive is not being set by the time FXP has \r\n //reached Home page.Hence forcing it to apply the rootscope once again.\r\n if (!self.$rootScope.$$phase) {\r\n self.$rootScope.$apply();\r\n }\r\n defer.resolve(null);\r\n\r\n });\r\n\r\n return defer.promise;\r\n }\r\n\r\n\t/**\r\n\t* Reset the value in context and in memory variables for OBO User by removing values from there\r\n\t* @method Fxp.Services.OBOUserService.removeOBOUserContext\r\n\t* @example Example to invoke removeOBOUserContext\r\n\t* OBOUserService.removeOBOUserContext();\r\n\t*/\r\n\tremoveOBOUserContext(): void {\r\n\t\tvar self = this;\r\n\t\t//dispatch action to remove obo context state\r\n\t\tself.globalStoreService.DispatchGlobalAction(\"Platform\",RemoveOBOEntity());\r\n\t\r\n\t\tself.$rootScope.actOnBehalfOfUserActive = false;\r\n\t\tif (self.OBOUser != \"\" && self.OBOUser.alias) {\r\n\t\t\tself.fxpContextService.deleteContext(self.OBOUser.alias + \"-userInfo\").then(function (data) {\r\n\t\t\t\tconsole.log(self.OBOUser.alias + \"-userInfo - deleted\" + data);\r\n\t\t\t}, function (error) {\r\n\t\t\t\tconsole.log(self.OBOUser.alias + \"-userInfo - deleted Error :\", error);\r\n\t\t\t});\r\n\r\n\t\t\tself.fxpContextService.deleteContext(self.OBOUser.alias + \"-userclaims\").then(function (data) {\r\n\t\t\t\tconsole.log(self.OBOUser.alias + \"-userclaims - deleted\" + data);\r\n\t\t\t}, function (error) {\r\n\t\t\t\tconsole.log(self.OBOUser.alias + \"-userclaims - deleted Error :\", error);\r\n\t\t\t});\r\n\t\t\tself.fxpContextService.deleteContext(self.OBOUser.aadObjectId + \"-userclaims\").then(function (data) {\r\n\t\t\t\tconsole.log(self.OBOUser.aadObjectId + \"-userclaims - deleted\" + data);\r\n\t\t\t}, function (error) {\r\n\t\t\t\tconsole.log(self.OBOUser.aadObjectId + \"-userclaims - deleted Error :\", error);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis.OBOUserRoutes = \"\";\r\n\t\tthis.OBOUser = \"\";\r\n\t\tthis.OBOUserStatus = false\r\n\t\tthis.OBOUserTenantConfiguration = \"\";\r\n\t\tthis.fxpContextService.deleteContext(\"OBOEntity\");\r\n\t\tthis.userInfoService.setActingOnBehalfOfFlag(false);\r\n\t\tthis.userInfoService.setCurrentUserOID(this.userInfoService.getLoggedInUserOID());\r\n\t\tthis.userInfoService.setCurrentUser(this.userInfoService.getLoggedInUser());\r\n\t\tthis.userInfoService.setCurrentUserUpn(this.userInfoService.getLoggedInUserUpn());\r\n\t\tthis.globalStoreService.GetPlatformStore().dispatch(removeOboContext());\r\n\t};\r\n\r\n\r\n\t/**\r\n\t* Get the routes for OBO User\r\n\t* @method Fxp.Services.OBOUserService.getOBOUserRoutes\r\n\t* @example Example to invoke getOBOUserRoutes\r\n\t* OBOUserService.getOBOUserRoutes();\r\n\t*/\r\n\tgetOBOUserRoutes(): any {\r\n\t\treturn this.OBOUserRoutes;\r\n\t};\r\n\r\n\t/**\r\n\t* get the OBO User Informations\r\n\t* @method Fxp.Services.OBOUserService.getOBOUser\r\n\t* @example Example to invoke getOBOUser\r\n\t* OBOUserService.getOBOUser(OBOUser);\r\n\t*/\r\n\tgetOBOUser(): any {\r\n\t\treturn this.OBOUser;\r\n\t};\r\n\r\n\t/**\r\n\t* get the OBO User Tenant UIStrings\r\n\t* @method Fxp.Services.OBOUserService.getOBOUserTenantConfiguration\r\n\t* @example Example to invoke getOBOUserTenantConfiguration\r\n\t* OBOUserService.getOBOUserTenantConfiguration();\r\n\t*/\r\n\tgetOBOUserTenantConfiguration(): any {\r\n\t\treturn this.OBOUserTenantConfiguration;\r\n\t};\r\n}\r\n","import { IStateConfig } from \"../interfaces/IStateConfig\";\r\nimport { GlobalExceptionHandler } from \"../telemetry/GlobalExceptionHandler\";\r\nimport { IFxpAppContext } from \"../interfaces/IFxpAppContext\";\r\nimport { CommonUtils } from \"../utils/CommonUtils\";\r\nimport { IAuthExceptionServiceEndPoints, IServiceEndPoints } from \"../interfaces/IServiceEndPoints\";\r\nimport { IRouteInfo } from \"../interfaces/IRouteInfo\";\r\nimport { ILazyloadBundle } from \"../interfaces/ILazyLoadBundle\";\r\nimport { IPartnerBundle } from \"../interfaces/IPartnerBundle\";\r\nimport { AddRouteConfiguration, UpdateRouteConfiguration } from \"@fxp/staterouter\";\r\nimport { GlobalStore } from 'redux-micro-frontend';\r\nimport { FxpLazyLoader } from \"../../app/fxplazyloader\";\r\nimport { ISharedComponents } from \"../interfaces/ISharedComponents\";\r\nimport { ISharedComponentConfig } from \"../interfaces/ISharedComponentConfig\";\r\nimport { TelemetryConstants } from \"../telemetry/TelemetryConst\";\r\nimport { ErrorSeverityLevel } from \"../telemetry/ErrorSeverityLevel\";\r\nimport { ErrorCodes } from \"../constants/errorCodes\";\r\nimport { FxpLoggerService } from \"../telemetry/fxpLogger\";\r\nimport { ComponentFramework } from \"../common/enum/ComponentFramework\";\r\nimport { ISharedComponentReference } from \"../interfaces/ISharedComponentReference\";\r\nimport { IStateInfo } from \"@fxp/staterouter/src/common/interfaces/IStateInfo\";\r\n\r\n\r\nexport class PartnerAppRegistrationService {\r\n private static registeredApps: any = {};\r\n private static registerPartnerEndpoints = {};\r\n private static registeredRoutes: Array = [];\r\n public static angularPartnerStateConfig: Array = [];\r\n public static partnerRegisteredEndpoints = {};\r\n public static authExceptionEndpoints = [];\r\n\r\n private static lazyLoader = null;\r\n public static angularPartnerSharedComponents: Array = [];\r\n private static applicationsWithStore: Array = [];\r\n private static get FxpLoggerService(): FxpLoggerService {\r\n return FxpLoggerService.getInstance();\r\n }\r\n private static sourceForTelemetry = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.PartnerAppRegistrationService`;\r\n\r\n public static setLazyLoader(lazyLoaderInstance){\r\n if (!this.lazyLoader){\r\n this.lazyLoader = lazyLoaderInstance;\r\n }\r\n }\r\n\r\n\r\n public static registerEndpoints(endpoint: string, clientId: string) {\r\n console.warn(\"[Obsolete] - PartnerAppRegistrationService.registerEndpoints() has been marked as obsolete and will be removed in future. Please start using getServiceEndPoints() method of IAppService.\");\r\n if (!this.registerPartnerEndpoints[endpoint]) {\r\n this.registerPartnerEndpoints[endpoint] = clientId;\r\n }\r\n }\r\n\r\n public static getRegisterEndpoints() {\r\n const partnerRegisteredEndpoints = this.getRegisteredEndPointsFromPartnerAppRegistrationClass();\r\n return CommonUtils.jsonConcat(partnerRegisteredEndpoints, this.registerPartnerEndpoints);\r\n }\r\n\r\n public static addAuthenticationExceptionEndpoints() {\r\n const partnerExceptionEndpoints = this.getAuthExcpetionFromPartnerAppRegistrationClass();\r\n return partnerExceptionEndpoints;\r\n }\r\n\r\n public static addApplicationWithStores(appName: string): void{\r\n if(this.applicationsWithStore.indexOf(appName) >= 0){\r\n return;\r\n }\r\n this.applicationsWithStore.push(appName);\r\n }\r\n\r\n public static isStoreRegistered(appName: string): boolean{\r\n return this.applicationsWithStore.indexOf(appName) >= 0;\r\n }\r\n\r\n public static registerPartnerApp(appName: string, appInstance): void {\r\n let properties = this.FxpLoggerService.createPropertyBag();\r\n properties.addToBag('PartnerAppName', appName );\r\n if (!this.registeredApps[appName]) {\r\n this.registeredApps[appName] = appInstance;\r\n //TO-DO (Discussion needed) - Where do we need to configure the routes with proper action?\r\n const routeInfo = (new appInstance()).getRoutes();\r\n const addRouteConfigurationAction = AddRouteConfiguration(routeInfo);\r\n GlobalStore.Get().DispatchGlobalAction(\"Fxp.PartnerAppRegistrationService\", addRouteConfigurationAction);\r\n this.registerPartnerAppRoutes(routeInfo);\r\n }\r\n else {\r\n const error = new Error();\r\n error.message = 'Application name with ' + appName + ' is already registered.';\r\n console.error(error.message);\r\n this.FxpLoggerService.logException(`${this.sourceForTelemetry}.RegisterPartnerApp`, error, properties, null, null, ErrorSeverityLevel.High, ErrorCodes.PartnerAppRegistrationService_ErrorOnAppRegistration);\r\n }\r\n }\r\n\r\n public static updateStateObject(stateName: string, ngModule: any, component: any, componentFramework?: ComponentFramework){\r\n const $stateService:any = angular.element(document.body).injector().get(\"$state\");\r\n const $state = $stateService.get(stateName);\r\n if($state != null) {\r\n $state.ngModule = ngModule;\r\n $state.childComponent = component;\r\n $state.componentFramework = componentFramework\r\n\r\n if ($state.componentFramework == ComponentFramework.React && $state.data.partnerAppName){\r\n const stateInfo: IStateInfo = {\r\n stateName: stateName,\r\n component: component,\r\n applicationName: $state.data.partnerAppName\r\n }\r\n const updateRouteConfiguration = UpdateRouteConfiguration(stateInfo);\r\n\r\n GlobalStore.Get().DispatchGlobalAction(\"Fxp.PartnerAppRegistrationService\", updateRouteConfiguration);\r\n\r\n }\r\n }\r\n }\r\n\r\n public static getRegisteredRoutes(fxpAppContext: IFxpAppContext): Array {\r\n Object.keys(this.registeredApps).forEach((key) => {\r\n const appInstance = new this.registeredApps[key]();\r\n const routesInfo = appInstance.getRoutes(fxpAppContext);\r\n this.registeredRoutes.push.apply(this.registeredRoutes, routesInfo);\r\n });\r\n return this.registeredRoutes;\r\n }\r\n\r\n public static getRegisteredAppRoute(appName: string, stateName: string): IStateConfig {\r\n let routeInfo;\r\n if (this.registeredApps.hasOwnProperty(appName)) {\r\n const appInstance = new this.registeredApps[appName]();\r\n const routeCollection = appInstance.getRoutes().routes;\r\n routeInfo = routeCollection.find(route => { return route.name === stateName });\r\n }\r\n return routeInfo;\r\n }\r\n\r\n public static registerLazyLoadedApp(registryInstance: any, appName?: string) {\r\n const registry = new registryInstance();\r\n const routeInfo = this.updateAppName(registry.getRoutes(), appName);\r\n let bundles: Array = [];\r\n if (registry.getBundles){\r\n bundles = [...bundles, ...registry.getBundles()];\r\n }\r\n if (registry.getGeneratedBundles){\r\n bundles = [...bundles, ...registry.getGeneratedBundles()];\r\n }\r\n this.registerPartnerAppBundles(bundles);\r\n this.registerPartnerAppRoutes(routeInfo);\r\n this.registerPartnerAppEndpoints(registry.getServiceEndPoints(), routeInfo.applicationName);\r\n if(registry.getAuthExceptionEndpoints)\r\n this.registerAuthExceptionEndpoints(registry.getAuthExceptionEndpoints(), routeInfo.applicationName);\r\n if (registry.getSharedComponentsInfo) {\r\n this.registerAngularSharedComponents(this.updateAppName(registry.getSharedComponentsInfo(), appName));\r\n }\r\n }\r\n\r\n private static updateAppName(configObject: any, appName?: string){\r\n if(appName && appName.length>0){\r\n configObject.appName = appName\r\n }\r\n return configObject;\r\n }\r\n\r\n private static registerAngularSharedComponents(sharedComponentsInfo: ISharedComponents) {\r\n if (sharedComponentsInfo.appName && !sharedComponentsInfo.disableSharing) {\r\n this.angularPartnerSharedComponents.push(sharedComponentsInfo);\r\n }\r\n else if(!sharedComponentsInfo.appName)\r\n {\r\n const error = new Error();\r\n error.message = 'Application name is not provided for the shared components';\r\n console.error(error.message);\r\n let props = this.FxpLoggerService.createPropertyBag();\r\n props.addToBag(\"Details\", error.message);\r\n\r\n this.FxpLoggerService.logException(`${this.sourceForTelemetry}.RegisterAngularSharedComponents`,\r\n error,\r\n props,\r\n null,\r\n null,\r\n ErrorSeverityLevel.High,\r\n ErrorCodes.PartnerAppRegistrationService_ErrorOnSharedComponentRegistration);\r\n }\r\n }\r\n\r\n private static registerPartnerAppRoutes(config: IRouteInfo): void {\r\n this.angularPartnerStateConfig.push(config);\r\n }\r\n\r\n private static registerPartnerAppBundles(bundles: Array): void {\r\n const ocBundles = Array();\r\n bundles.forEach(bundle => {\r\n const ocBundle: ILazyloadBundle = {\r\n name: bundle.name,\r\n files: bundle.files,\r\n serie: bundle.sequentialLoading\r\n }\r\n ocBundles.push(ocBundle);\r\n });\r\n\r\n window[\"OcModules\"] = [...window[\"OcModules\"], ...ocBundles];\r\n }\r\n\r\n private static registerPartnerAppEndpoints(endpoints: Array, key: string) {\r\n endpoints.forEach(endpoint => {\r\n if (!endpoint.serviceEndPoint) {\r\n console.error(\"[ValidationError-\" + key + \"] - Endpoint/Url is missing in the data provided in getServiceEndPoints() method.\");\r\n return;\r\n }\r\n if (!endpoint.clientId) {\r\n console.error(\"[ValidationError-\" + key + \"] - ClientId is missing in the data provided in getServiceEndPoints() method.\");\r\n return;\r\n }\r\n if (!this.partnerRegisteredEndpoints[endpoint.serviceEndPoint]) {\r\n this.partnerRegisteredEndpoints[endpoint.serviceEndPoint] = endpoint.clientId;\r\n }\r\n });\r\n }\r\n\r\n private static registerAuthExceptionEndpoints(endpoints: Array, key: string) {\r\n endpoints.forEach(endpoint => {\r\n if (!endpoint.serviceEndPoint) {\r\n console.error(\"[ValidationError-\" + key + \"] - Endpoint/Url is missing in the data provided in getAuthException() method.\");\r\n return;\r\n }\r\n \r\n if (!this.authExceptionEndpoints[endpoint.serviceEndPoint]) {\r\n this.authExceptionEndpoints.push(endpoint.serviceEndPoint);\r\n }\r\n });\r\n }\r\n\r\n private static getRegisteredEndPointsFromPartnerAppRegistrationClass() {\r\n Object.keys(this.registeredApps).forEach((key) => {\r\n const appInstance = new this.registeredApps[key]();\r\n if (!appInstance || !appInstance.getServiceEndPoints) {\r\n return;\r\n }\r\n const endpoints = appInstance.getServiceEndPoints();\r\n if (!endpoints || endpoints.length === 0) {\r\n return;\r\n }\r\n this.registerPartnerAppEndpoints(endpoints, key);\r\n });\r\n\r\n return this.partnerRegisteredEndpoints;\r\n }\r\n\r\n private static getAuthExcpetionFromPartnerAppRegistrationClass() {\r\n Object.keys(this.registeredApps).forEach((key) => {\r\n const appInstance = new this.registeredApps[key]();\r\n if (!appInstance || !appInstance.getAuthExceptionEndpoints) {\r\n return;\r\n }\r\n \r\n const endpoints = appInstance.getAuthExceptionEndpoints();\r\n if (!endpoints || endpoints.length === 0) {\r\n return;\r\n }\r\n this.registerAuthExceptionEndpoints(endpoints, key);\r\n });\r\n\r\n return this.authExceptionEndpoints;\r\n }\r\n\r\n public static updateSharedComponentDetails(appName: string, compName: string, component: any, ngModule: any, componentFramework?: ComponentFramework){\r\n this.angularPartnerSharedComponents.forEach(item => {\r\n if (item.appName === appName){\r\n const sharedComponentDetails = item;\r\n if (sharedComponentDetails){\r\n sharedComponentDetails.components.forEach(item=> {\r\n if (item.componentName.toString().toLowerCase().trim() === compName.toString().toLowerCase().trim()){\r\n item.component = component;\r\n item.ngModule = ngModule;\r\n item.componentFramework = componentFramework;\r\n }\r\n })\r\n }\r\n }\r\n });\r\n }\r\n\r\n public static getSharedComponentDetails(appName: string, compName: string): ISharedComponentConfig {\r\n const partnerApp: ISharedComponents = this.angularPartnerSharedComponents.find((partnerApp) => (partnerApp.appName.toLocaleLowerCase() === appName.toLocaleLowerCase()));\r\n if (partnerApp){\r\n const sharedComponents = partnerApp.components.find((comp) => (comp.componentName.toLocaleLowerCase() === compName.toLocaleLowerCase()));\r\n if (sharedComponents){\r\n return sharedComponents;\r\n }\r\n }\r\n }\r\n\r\n public static getBundlesForSharedComponent(appName: string, compName:string): Array {\r\n let bundles = [ ];\r\n const partnerApp:ISharedComponents = this.angularPartnerSharedComponents.find((partnerApp) => (partnerApp.appName.toLocaleLowerCase() === appName.toLocaleLowerCase()));\r\n if (partnerApp){\r\n if (partnerApp.sharedBundles){\r\n bundles = partnerApp.sharedBundles;\r\n }\r\n const sharedComponents = partnerApp.components.find((comp) => (comp.componentName.toLocaleLowerCase() === compName.toLocaleLowerCase()));\r\n if (sharedComponents && !CommonUtils.isNullOrEmpty(sharedComponents.generatedBundle)){\r\n bundles.push(sharedComponents.generatedBundle);\r\n }\r\n }\r\n return bundles;\r\n }\r\n\r\n public static getSharedComponentReference(appName: string, compName: string): Promise {\r\n const self = this;\r\n const telemetry_source = `${this.sourceForTelemetry}.GetSharedComponentFactory`;\r\n let properties = self.FxpLoggerService.createPropertyBag();\r\n properties.addToBag(\"AppName\", appName);\r\n properties.addToBag(\"ComponentName\", compName);\r\n return new Promise(function (resolve, reject) {\r\n //let partnerApp:ISharedComponents = self.angularPartnerSharedComponents.find((partnerApp) => (partnerApp.appName.toLocaleLowerCase() === appName.toLocaleLowerCase()));\r\n let sharedComponentConfig = self.getSharedComponentDetails(appName, compName);\r\n if (sharedComponentConfig) {\r\n let bundles = self.getBundlesForSharedComponent(appName, compName);\r\n self.lazyLoader.load(bundles, { serie: true }).then(() => {\r\n let component, componentFramework, ngModule = null ;\r\n let sharedComponentReference: ISharedComponentReference;\r\n sharedComponentConfig = self.getSharedComponentDetails(appName, compName);\r\n if (sharedComponentConfig.component){ // Non lazyloaded angular bundles.\r\n component = sharedComponentConfig.component;\r\n ngModule = sharedComponentConfig.ngModule;\r\n componentFramework = sharedComponentConfig.componentFramework;\r\n }\r\n else {\r\n const application = self.registeredApps[appName];\r\n const instance = new application();\r\n const componentInfo = instance.getSharedComponentsInfo();\r\n const sharedComponent = componentInfo.components.find(item=> item.componentName == compName);\r\n if (sharedComponent){\r\n component = sharedComponent.component;\r\n ngModule = sharedComponent.ngModule;\r\n componentFramework = sharedComponent.componentFramework;\r\n }\r\n }\r\n // This is Angular block\r\n if (ngModule){\r\n if (ngModule._ngModuleDefFactory){\r\n const moduleRef = FxpLazyLoader.instantiateModule(ngModule);\r\n const factory = moduleRef.componentFactoryResolver.resolveComponentFactory(component);\r\n sharedComponentReference = {component: factory, componentFramework: ComponentFramework.Angular, ngModule: moduleRef};\r\n resolve(sharedComponentReference);\r\n return ;\r\n }\r\n FxpLazyLoader.compileAndLoadModule(ngModule).then(function (ngModuleRef) {\r\n const factory = ngModuleRef.componentFactoryResolver.resolveComponentFactory(component);\r\n sharedComponentReference = {component: factory, componentFramework: ComponentFramework.Angular, ngModule: ngModuleRef};\r\n resolve(factory);\r\n }).catch((error) => {\r\n reject(error);\r\n });\r\n return;\r\n\r\n }\r\n // React\r\n if (componentFramework && componentFramework === ComponentFramework.React) {\r\n sharedComponentReference = {component: component, componentFramework: ComponentFramework.React, ngModule: null};\r\n resolve(sharedComponentReference);\r\n return;\r\n }\r\n\r\n const errorMessage = `Unable to identify the JS Framwork for Component: ${compName} of Application: ${appName}. Please specify componentFramework in getSharedComponentsInfo() of application.ts file.`;\r\n console.error(errorMessage);\r\n self.FxpLoggerService.logException(telemetry_source,\r\n new Error(errorMessage),\r\n properties,\r\n null,\r\n null,\r\n ErrorSeverityLevel.High,\r\n ErrorCodes.LazyLoadingFailedForSharedComponent);\r\n })\r\n .catch(function (e) {\r\n self.FxpLoggerService.logException(telemetry_source,\r\n e,\r\n properties,\r\n null,\r\n null,\r\n ErrorSeverityLevel.High,\r\n ErrorCodes.LazyLoadingFailedForSharedComponent);\r\n reject(e);\r\n });\r\n\r\n }\r\n else {\r\n let error = `${appName} app shared components not registered.`;\r\n reject(error);\r\n self.FxpLoggerService.logError(telemetry_source,\r\n error,\r\n ErrorCodes.SharedComponentNotRegistered,\r\n \"\",\r\n properties,\r\n null,\r\n null,\r\n ErrorSeverityLevel.High);\r\n }\r\n });\r\n }\r\n\r\n public static getSharedComponentFactory(appName: string, compName: string): Promise {\r\n return this.getSharedComponentReference(appName, compName).then(function(componentRef: ISharedComponentReference){\r\n return componentRef.component;\r\n });\r\n }\r\n}\r\n","import { IPersonalizationService } from \"../interfaces/IPersonalizationService\";\r\nimport { FxpContext } from \"../context/FxpContext\";\r\nimport { IRootScope } from \"../interfaces/IRootScope\";\r\nimport { FxpConfigurationService } from \"./FxpConfiguration\";\r\nimport { ILogger } from \"../interfaces/ILogger\";\r\nimport { FxpMessageService } from \"../../app/banner/FxpMessageService\";\r\nimport { FxpConstants, PerfMarkers } from \"../common/ApplicationConstants\";\r\nimport { CommonUtils } from \"../utils/CommonUtils\";\r\nimport { IFxPService } from \"../interfaces/IFxpService\";\r\nimport { TelemetryConstants } from \"../telemetry/TelemetryConst\";\r\nimport { ErrorCodes } from \"../constants/errorCodes\";\r\nimport { ErrorSeverityLevel } from \"../telemetry/ErrorSeverityLevel\";\r\nimport { MsalAuthenticationService } from \"./MsalAuthenticationService\";\r\n\r\nexport class PersonalizationService implements IPersonalizationService,IFxPService {\r\n\tprivate sleepInterval: number;\r\n\tprivate iCount: number = 0;\r\n\tprivate iReqCount: number = 0;\r\n\tprivate iUCount: number = 0;\r\n\tprivate fxpServiceEndPoint: string;\r\n\tprivate oneProfileEndPoint: string;\r\n\tprivate sourceForTelemetry = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.PersonalizationService`;\r\n\tprivate tenantClaimsApiEndpoint: string;\r\n\tprivate tenantRolesApiEndpoint: string;\r\n\tprivate tenantNPD: string;\r\n\tprivate NotificationApiEndpoint: string;\r\n\tconstructor(private http: angular.IHttpService,\r\n\t\tprivate q: angular.IQService,\r\n\t\tprivate rootScope: IRootScope,\r\n\t\tprivate fxpConfiguration: FxpConfigurationService,\r\n\t\tprivate timeout: angular.ITimeoutService,\r\n\t\tprivate fxplogger: ILogger,\r\n\t\tprivate msalAuthenticationService: MsalAuthenticationService,\r\n\t\tprivate fxpMessageSvc: FxpMessageService) {\r\n\r\n\t\tthis.sleepInterval = 100;\r\n\t\tthis.fxpServiceEndPoint = this.fxpConfiguration.FxpAppSettings.FxpServiceEndPoint;\r\n\t\tlet profileStore = window[\"tenantConfiguration\"].ProfileStore || {};\r\n\t\tthis.oneProfileEndPoint = profileStore.ProfileAPIEndPoint;\r\n\t\tlet authStore = window[\"tenantConfiguration\"].AuthStore || {};\r\n\t\tlet rolePersonalizationStore = window[\"tenantConfiguration\"].RolePersonalizationStore || {};\r\n\t\tthis.tenantClaimsApiEndpoint = authStore.TenantClaimsEndPoint;\r\n\t\tthis.tenantRolesApiEndpoint = rolePersonalizationStore.TenantRolesEndPoint;\r\n\t\tthis.tenantNPD = window[\"tenantConfiguration\"].NPD;\r\n\t\tlet NotificationStore = window[\"tenantConfiguration\"].NotificationStore || {};\r\n\t\tthis.NotificationApiEndpoint = NotificationStore.NotificationApiEndPoint;\r\n\r\n\t}\r\n\r\n\t/**\r\n\t* A method to Get the Persisted Pesanalization User Informantion\r\n\t* @method Fxp.Services.PersonalizationService.getPersistedPersonalization\r\n\t* @example Example to use getPersistedPersonalization\r\n\t* PersonalizationService.getPersistedPersonalization()\r\n\t*/\r\n\tgetPersistedPersonalization(): any {\r\n\t\tlet context = localStorage.getItem(\"selectedUserPersonalization\");\r\n\t\tlet keyContext = null;\r\n\t\tif (!CommonUtils.isNullOrEmpty(context)) {\r\n\t\t\tlet data = JSON.parse(context);\r\n\t\t\tkeyContext = data.user;\r\n\t\t}\r\n\t\treturn keyContext;\r\n\r\n\t}\r\n\t/**\r\n * A method to Persisted Pesanalization for selected User\r\n * @method Fxp.Services.PersonalizationService.getPersistedPersonalization\r\n * @example Example to use getPersistedPersonalization\r\n * PersonalizationService.persistUserPersonalization()\r\n */\r\n\tpersistUserPersonalization(value): void {\r\n\t\tlet context = localStorage.getItem(\"selectedUserPersonalization\");\r\n\t\tlet selectedUserPersonalization = null;\r\n\t\tif (!CommonUtils.isNullOrEmpty(context)) {\r\n\t\t\tselectedUserPersonalization = JSON.parse(context);\r\n\t\t} else {\r\n\t\t\tselectedUserPersonalization = {\r\n\t\t\t\tuser: null\r\n\t\t\t}\r\n\t\t}\r\n\t\tselectedUserPersonalization.user = value;\r\n\t\tif (!CommonUtils.isNullOrEmpty(selectedUserPersonalization)) {\r\n\t\t\tlocalStorage.setItem(\"selectedUserPersonalization\", JSON.stringify(selectedUserPersonalization));\r\n\t\t}\r\n\t}\r\n\t/**\r\n * A method to Remove the Persisted Pesanalization User Informantion\r\n * @method Fxp.Services.PersonalizationService.removePersistedUserPersonalization\r\n * @example Example to use removePersistedUserPersonalization\r\n * PersonalizationService.removePersistedUserPersonalization()\r\n */\r\n\tremovePersistedUserPersonalization(): void {\r\n\t\tlocalStorage.removeItem(\"selectedUserPersonalization\");\r\n\t}\r\n\t/**\r\n\t *A method to use Fetch the Global Master LeftNav Items From Api\r\n\t * @method Fxp.Services.PersonalizationService.getMasterLeftNavItems\r\n\t * @example Example to use getMasterLeftNavItems\r\n\t * PersonalizationService.getMasterLeftNavItems()\r\n\t */\r\n\tgetMasterLeftNavItems(): angular.IPromise {\r\n\t\tvar self = this;\r\n\t\tconst telemetry_source = `${self.sourceForTelemetry}.GetMasterLeftNavItems`;\r\n\t\tvar deferred = self.q.defer();\r\n\t\tvar url = self.fxpServiceEndPoint + \"/leftNav/master\";\r\n\t\tif (self.msalAuthenticationService.accessTokenRequestInProgress(url)) {\r\n\t\t\tself.iReqCount++;\r\n\t\t\tif (self.iReqCount == 5) {\r\n\t\t\t\tself.fxplogger.logError(telemetry_source, self.rootScope.fxpUIConstants.UIMessages.AADAuthFailureError.ErrorMessageTitle, ErrorCodes.PersonalizationService_GetMasterLeftNav_Failure, null, null, null, null, ErrorSeverityLevel.High);\r\n\t\t\t\tself.fxpMessageSvc.addMessage(self.rootScope.fxpUIConstants.UIMessages.AADAuthFailureError.ErrorMessage, FxpConstants.messageType.error);\r\n\t\t\t}\r\n\t\t\tself.timeout(function () {\r\n\t\t\t\tself.getMasterLeftNavItems();\r\n\t\t\t}, self.sleepInterval);\r\n\t\t} else {\r\n\t\t\tself.fxplogger.startTrackPerformance(PerfMarkers.GetMasterLeftNavItems);\r\n\t\t\tself.iReqCount = 0;\r\n\t\t\tlet requestHeaders = {};\r\n\t\t\trequestHeaders[\"X-TenantId\"] = window[\"tenantConfiguration\"].TenantId;\r\n\t\t\treturn self.http.get(url, { headers: requestHeaders });\r\n\t\t}\r\n\t\tself.fxplogger.stopTrackPerformance(PerfMarkers.GetMasterLeftNavItems);\r\n\t\treturn deferred.promise;\r\n\t}\r\n\r\n\t/**\r\n\t*A method to use Fetch the Personalaized NavItems From Api\r\n\t* @method Fxp.Services.PersonalizationService.getPersonalizedNavItems\r\n\t* @example Example to use getPersonalizedNavItems\r\n\t* PersonalizationService.getPersonalizedNavItems()\r\n\t*/\r\n\tgetPersonalizedNavItems(userAlias: string, roleGroupId: string, userRoleId: string): angular.IPromise {\r\n\t\tvar self = this;\r\n\t\tvar deferred = self.q.defer();\r\n\t\tconst telemetry_source = `${self.sourceForTelemetry}.GetPersonalizedNavItems`;\r\n\t\tvar url = this.fxpServiceEndPoint + \"/user/\" + userAlias + \"/leftNav/personalization?roleGroupId=\" + roleGroupId + \"&userRoleId=\" + userRoleId;\r\n\t\tif (self.msalAuthenticationService.accessTokenRequestInProgress(url)) {\r\n\t\t\tself.iReqCount++;\r\n\t\t\tif (self.iReqCount == 5) {\r\n\t\t\t\tself.fxplogger.logError(telemetry_source, self.rootScope.fxpUIConstants.UIMessages.AADAuthFailureError.ErrorMessageTitle, ErrorCodes.PersonalizationService_GetPersonalizedLeftNav_Failure, null, null, null, null, ErrorSeverityLevel.Medium);\r\n\t\t\t\tself.fxpMessageSvc.addMessage(self.rootScope.fxpUIConstants.UIMessages.AADAuthFailureError.ErrorMessage, FxpConstants.messageType.error);\r\n\t\t\t}\r\n\t\t\tself.timeout(function () {\r\n\t\t\t\tself.getPersonalizedNavItems(userAlias, roleGroupId, userRoleId);\r\n\t\t\t}, self.sleepInterval);\r\n\t\t} else {\r\n\t\t\tself.fxplogger.startTrackPerformance(PerfMarkers.GetPersonalizedNavItems);\r\n\t\t\tself.iReqCount = 0;\r\n\t\t\treturn self.http.get(url);\r\n\t\t}\r\n\t\tself.fxplogger.stopTrackPerformance(PerfMarkers.GetPersonalizedNavItems);\r\n\t\treturn deferred.promise;\r\n\t}\r\n\r\n\t/**\r\n\t*A method to use save the Personalaized NavItems to Api\r\n\t* @method Fxp.Services.PersonalizationService.savePersonalizedNavItems\r\n\t* @example Example to use savePersonalizedNavItems\r\n\t* PersonalizationService.savePersonalizedNavItems(userAlias: string, savedUserPrefNavList: any)\r\n\t*/\r\n\tsavePersonalizedNavItems(userAlias: string, savedUserPrefNavList: any, shouldAssignRoles: boolean = true): angular.IPromise {\r\n\t\tvar self = this;\r\n\t\tvar deferred = self.q.defer();\r\n\t\tconst telemetry_source = `${self.sourceForTelemetry}.SavePersonalizedNavItems`;\r\n\t\tvar url = self.fxpServiceEndPoint + \"/user/\" + userAlias + \"/leftNav/personalization\";\r\n\t\tsavedUserPrefNavList.ShouldAssignRoles = shouldAssignRoles;\r\n\t\tif (self.msalAuthenticationService.accessTokenRequestInProgress(url)) {\r\n\t\t\tself.iReqCount++;\r\n\t\t\tif (self.iReqCount == 5) {\r\n\t\t\t\tself.fxplogger.logError(telemetry_source, self.rootScope.fxpUIConstants.UIMessages.AADAuthFailureError.ErrorMessageTitle, ErrorCodes.PersonalizationSerivce_SavePersonalizedNavItems_Failure, null, null, null, null, ErrorSeverityLevel.High);\r\n\t\t\t\tself.fxpMessageSvc.addMessage(self.rootScope.fxpUIConstants.UIMessages.AADAuthFailureError.ErrorMessage, FxpConstants.messageType.error);\r\n\t\t\t}\r\n\t\t\tself.timeout(function () {\r\n\t\t\t\tself.savePersonalizedNavItems(userAlias, savedUserPrefNavList);\r\n\t\t\t}, self.sleepInterval);\r\n\t\t} else {\r\n\t\t\tself.fxplogger.startTrackPerformance(PerfMarkers.SavePersonalizedNavItems);\r\n\t\t\tself.iReqCount = 0;\r\n\t\t\treturn self.http.post(url, savedUserPrefNavList, { headers: { 'Content-Type': 'application/json' } });\r\n\t\t}\r\n\t\tself.fxplogger.stopTrackPerformance(PerfMarkers.SavePersonalizedNavItems);\r\n\t\treturn deferred.promise;\r\n\t}\r\n\r\n\t/**\r\n\t*A method to use Fetch the RoleGroupDetails From Api\r\n\t* @method Fxp.Services.PersonalizationService.getRoleGroupDetails\r\n\t* @example Example to use getRoleGroupDetails\r\n\t* PersonalizationService.getRoleGroupDetails()\r\n\t*/\r\n\tgetRoleGroupDetails(): angular.IPromise {\r\n\t\tvar self = this;\r\n\t\tvar deferred = self.q.defer();\r\n\t\tconst telemetry_source = `${this.sourceForTelemetry}.GetRoleGroupDetails`; \r\n\t\tvar url = self.tenantRolesApiEndpoint + \"/roles\";\r\n\t\tif (self.msalAuthenticationService.accessTokenRequestInProgress(url)) {\r\n\t\t\tself.iReqCount++;\r\n\t\t\tif (self.iReqCount == 5) {\r\n\t\t\t\tself.fxplogger.logError(telemetry_source, self.rootScope.fxpUIConstants.UIMessages.AADAuthFailureError.ErrorMessageTitle, ErrorCodes.PersonalizationSerivce_GetRoleGroupDetails_Failure, null, null, null, null, ErrorSeverityLevel.High);\r\n\t\t\t\tself.fxpMessageSvc.addMessage(self.rootScope.fxpUIConstants.UIMessages.AADAuthFailureError.ErrorMessage, FxpConstants.messageType.error);\r\n\t\t\t}\r\n\t\t\tself.timeout(function () {\r\n\t\t\t\tself.getRoleGroupDetails();\r\n\t\t\t}, self.sleepInterval);\r\n\t\t} else {\r\n\t\t\tself.fxplogger.startTrackPerformance(PerfMarkers.GetRoleGroupDetails);\r\n\t\t\tself.iReqCount = 0;\r\n\t\t\tlet requestHeaders = {};\r\n\t\t\trequestHeaders[\"X-Tenants\"] = self.tenantNPD;\r\n\t\t\treturn this.http.get(url, { headers: requestHeaders });\r\n\r\n\t\t}\r\n\t\tself.fxplogger.stopTrackPerformance(PerfMarkers.GetRoleGroupDetails);\r\n\t\treturn deferred.promise;\r\n\t}\r\n\r\n\t/**\r\n\t*A method to use Fetch the RoleGroupDetails From Api\r\n\t* @method Fxp.Services.PersonalizationService.getRoleGroupDetailsForNotification\r\n\t* @example Example to use getRoleGroupDetails\r\n\t* PersonalizationService.getRoleGroupDetailsForNotification()\r\n\t*/\r\n\tgetRoleGroupDetailsForNotification(): angular.IPromise {\r\n\t\tvar self = this;\r\n\t\tvar deferred = self.q.defer();\r\n\t\tconst telemtry_source = `${this.sourceForTelemetry}.GetRoleGroupDetailsForNotification`;\r\n\t\tvar url = self.NotificationApiEndpoint + \"/master/rolegroup\";\r\n\t\tif (self.msalAuthenticationService.accessTokenRequestInProgress(url)) {\r\n\t\t\tself.iReqCount++;\r\n\t\t\tif (self.iReqCount == 5) {\r\n\t\t\t\tself.fxplogger.logError(telemtry_source, self.rootScope.fxpUIConstants.UIMessages.AADAuthFailureError.ErrorMessageTitle, ErrorCodes.PersonalizationSerivce_GetRoleGroupDetailsForNotification_Failure, null, null, null, null, ErrorSeverityLevel.High);\r\n\t\t\t\tself.fxpMessageSvc.addMessage(self.rootScope.fxpUIConstants.UIMessages.AADAuthFailureError.ErrorMessage, FxpConstants.messageType.error);\r\n\t\t\t}\r\n\t\t\tself.timeout(function () {\r\n\t\t\t\tself.getRoleGroupDetails();\r\n\t\t\t}, self.sleepInterval);\r\n\t\t} else {\r\n\t\t\tself.fxplogger.startTrackPerformance(PerfMarkers.GetRoleGroupDetails);\r\n\t\t\tself.iReqCount = 0;\r\n\t\t\treturn this.http.get(url);\r\n\r\n\t\t}\r\n\t\tself.fxplogger.stopTrackPerformance(PerfMarkers.GetRoleGroupDetails);\r\n\t\treturn deferred.promise;\r\n\t}\r\n\r\n\t/**\r\n\t*A method to use get the Role Personalaized NavItems from Api\r\n\t* @method Fxp.Services.PersonalizationService.getRolePersonalizedNavItems\r\n\t* @example Example to use getRolePersonalizedNavItems\r\n\t* PersonalizationService.getRolePersonalizedNavItems(userRoleId, roleGroupId)\r\n\t*/\r\n\tgetRolePersonalizedNavItems(userRoleId: string, roleGroupId: string): angular.IPromise {\r\n\t\tvar self = this;\r\n\t\tvar deferred = self.q.defer();\r\n\t\tvar url = this.fxpServiceEndPoint + \"/navigation/personalization?roleGroupId=\" + roleGroupId;\r\n\t\tconst telemetry_source = `${this.sourceForTelemetry}.GetRolePersonalizedNavItems`;\r\n\t\tif (self.msalAuthenticationService.accessTokenRequestInProgress(url)) {\r\n\t\t\tself.iReqCount++;\r\n\t\t\tif (self.iReqCount == 5) {\r\n\t\t\t\tself.fxplogger.logError(telemetry_source, self.rootScope.fxpUIConstants.UIMessages.AADAuthFailureError.ErrorMessageTitle, ErrorCodes.PersonalizationSerivce_GetRolePersonalizedNavItems_Failure, null, null, null, null, ErrorSeverityLevel.High);\r\n\t\t\t\tself.fxpMessageSvc.addMessage(self.rootScope.fxpUIConstants.UIMessages.AADAuthFailureError.ErrorMessage, FxpConstants.messageType.error);\r\n\t\t\t}\r\n\t\t\tself.timeout(function () {\r\n\t\t\t\tself.getRolePersonalizedNavItems(userRoleId, roleGroupId);\r\n\t\t\t}, self.sleepInterval);\r\n\t\t} else {\r\n\t\t\tself.fxplogger.startTrackPerformance(PerfMarkers.GetPersonalizedNavItems);\r\n\t\t\tself.iReqCount = 0;\r\n\t\t\tvar requestHeaders = {}\r\n\t\t\trequestHeaders[\"tenantId\"] = window[\"tenantConfiguration\"].TenantId;\r\n\t\t\treturn self.http.get(url, { headers: requestHeaders });\r\n\t\t}\r\n\t\tself.fxplogger.stopTrackPerformance(PerfMarkers.GetPersonalizedNavItems);\r\n\t\treturn deferred.promise;\r\n\t}\r\n\r\n\t/**\r\n\t*A method to use get the RoleGroup Personalaized NavItems from Api\r\n\t* @method Fxp.Services.PersonalizationService.savePersonalizedNavItems\r\n\t* @example Example to use getRoleGroupPersonalizedList\r\n\t* PersonalizationService.getRoleGroupPersonalizedList(roleGroupId)\r\n\t*/\r\n\tgetRoleGroupPersonalizedList(roleGroupId: string): angular.IPromise {\r\n\t\tvar self = this;\r\n\t\tvar deferred = self.q.defer();\r\n\t\tconst telemetry_source = `${this.sourceForTelemetry}.GetRoleGroupPersonalizedList`;\r\n\t\tvar url = self.fxpServiceEndPoint + \"/navigation/personalization?AppRole=\" + roleGroupId;\r\n\r\n\t\tif (self.msalAuthenticationService.accessTokenRequestInProgress(url)) {\r\n\t\t\tself.iReqCount++;\r\n\t\t\tif (self.iReqCount == 5) {\r\n\t\t\t\tself.fxplogger.logError(telemetry_source, self.rootScope.fxpUIConstants.UIMessages.AADAuthFailureError.ErrorMessageTitle, ErrorCodes.PersonalizationSerivce_GetRoleGroupPersonalizedList_Failure, null, null, null, null, ErrorSeverityLevel.High);\r\n\t\t\t\tself.fxpMessageSvc.addMessage(self.rootScope.fxpUIConstants.UIMessages.AADAuthFailureError.ErrorMessage, FxpConstants.messageType.error);\r\n\t\t\t}\r\n\t\t\tself.timeout(function () {\r\n\t\t\t\tself.getRoleGroupPersonalizedList(roleGroupId);\r\n\t\t\t}, self.sleepInterval);\r\n\t\t} else {\r\n\t\t\tself.fxplogger.startTrackPerformance(PerfMarkers.GetPersonalizedNavItems);\r\n\t\t\tself.iReqCount = 0;\r\n\t\t\treturn self.http.get(url, { headers: { \"X-TenantId\": window[\"tenantConfiguration\"].TenantId } });\r\n\t\t}\r\n\t\tself.fxplogger.stopTrackPerformance(PerfMarkers.GetPersonalizedNavItems);\r\n\t\treturn deferred.promise;\r\n\t}\r\n\r\n\t/**\r\n\t*A method to use save the Personalaized NavItems to Api\r\n\t* @method Fxp.Services.PersonalizationService.savePersonalizedNavItems\r\n\t* @example Example to use savePersonalizedNavItems\r\n\t* PersonalizationService. saveRoleGroupPersonalizedNavItems(roleGroupId: string, userRoleId: string, savedRoleGroupPrefNavList: any)\r\n\t*/\r\n\tsaveRoleGroupPersonalizedNavItems(savedRoleGroupPrefNavList: any, shouldAssignRoles: boolean = true): angular.IPromise {\r\n\t\tvar self = this, url;\r\n\t\tvar deferred = self.q.defer();\r\n\t\tconst telemetry_source = `${this.sourceForTelemetry}.SaveRoleGroupPersonalizedNavItems`; \r\n\t\tsavedRoleGroupPrefNavList.ShouldAssignRoles = shouldAssignRoles;\r\n\t\turl = self.fxpServiceEndPoint + \"/navigation/personalization\";\r\n\r\n\t\tif (self.msalAuthenticationService.accessTokenRequestInProgress(url)) {\r\n\t\t\tself.iReqCount++;\r\n\t\t\tif (self.iReqCount == 5) {\r\n\t\t\t\tself.fxplogger.logError(telemetry_source, self.rootScope.fxpUIConstants.UIMessages.AADAuthFailureError.ErrorMessageTitle, ErrorCodes.PersonalizationSerivce_SaveRoleGroupPersonalizedNavItems_Failure, null, null, null, null, ErrorSeverityLevel.High);\r\n\t\t\t\tself.fxpMessageSvc.addMessage(self.rootScope.fxpUIConstants.UIMessages.AADAuthFailureError.ErrorMessage, FxpConstants.messageType.error);\r\n\t\t\t}\r\n\t\t\tself.timeout(function () {\r\n\t\t\t\tself.saveRoleGroupPersonalizedNavItems(savedRoleGroupPrefNavList, shouldAssignRoles);\r\n\t\t\t}, self.sleepInterval);\r\n\t\t} else {\r\n\t\t\tself.fxplogger.startTrackPerformance(PerfMarkers.SaveRoleGroupPersonalizedNavItems);\r\n\t\t\tself.iReqCount = 0;\r\n\t\t\treturn self.http.post(url, savedRoleGroupPrefNavList, { headers: { 'Content-Type': 'application/json', 'X-TenantId': window['tenantConfiguration'].TenantId } });\r\n\t\t}\r\n\t\tself.fxplogger.stopTrackPerformance(PerfMarkers.SaveRoleGroupPersonalizedNavItems);\r\n\t\treturn deferred.promise;\r\n\t}\r\n\r\n\t/**\r\n\t*A method to use get the RoleGroup which is configured in Sysytem\r\n\t* @method Fxp.Services.PersonalizationService.getDefaultRoleGroup\r\n\t* @example Example to use getDefaultRoleGroup\r\n\t* PersonalizationService.getDefaultRoleGroup(roleGroupId: number)\r\n\t*/\r\n\tgetRoleGroup(roleGroupId: number): any {\r\n\t\tvar self = this;\r\n\t\treturn self.http.get(\"/Home/GetRoleGroup?roleGroupId=\" + roleGroupId);\r\n\t}\r\n}\r\n","import { IFxPService } from \"../interfaces/IFxpService\";\r\nexport class TimeZoneHelper implements IFxPService{\r\n\r\n\tprivate PacificRegion = \"America/Los_Angeles\";\r\n\r\n\tconstructor(private moment: any) {\r\n\t}\r\n\r\n\tgetCurrentUtcDateTime = () => {\r\n\t\treturn this.moment.utc();\r\n\t}\r\n\r\n\taddHoursToCurrentUtcDateTime = (hours) => {\r\n\t\treturn this.moment.utc.add(hours,'hours');\r\n\t}\r\n\r\n\tgetCurrentLocalDateTime = () => {\r\n\t\treturn this.moment.utc().local();\r\n\t}\r\n\r\n\taddHoursToLocalUtcDateTime = (hours) => {\r\n\t\treturn this.moment.utc().local().add(hours,'hours');\r\n\t}\r\n\r\n\r\n\tgetCurrentPacificDateTime = () => {\r\n\t\treturn this.moment.tz(this.PacificRegion);\r\n\t}\r\n\r\n\tAddHoursToCurrentPacificDateTime = (hours) => {\r\n\t\treturn this.moment.tz(this.PacificRegion).add(hours,'hours');\r\n\t}\r\n\r\n\tconvertToPacific = (moment) => {\r\n\t\tlet a = this.moment.isMoment(moment) ? moment : this.moment(moment);\r\n\t\treturn this.moment.tz(a, this.PacificRegion);\r\n\t}\r\n\r\n\tconvertToLocal = (moment) => {\r\n\t\tlet currentTime = this.moment.isMoment(moment) ? moment : this.moment(moment);\r\n\t\treturn currentTime.utc().local();\r\n\t}\r\n\r\n\tconvertToUtc = (moment) => {\r\n\t\treturn this.moment.utc(moment);\r\n\t}\r\n\r\n\tchangeTimeZoneComponentToPacific = (moment) => {\r\n\t\tlet clone = moment.clone();\r\n\t\tclone = this.moment.tz(clone, this.PacificRegion);\r\n\t\tclone.add(moment.utcOffset() - clone.utcOffset(), 'minutes');\r\n\t\treturn clone;\r\n\t}\r\n\tchangeTimeZoneComponentToUniversal = (time) => {\r\n\t\tlet timeUtc = this.moment.utc(time.clone());\r\n\t\ttimeUtc.add(time.utcOffset(), 'minutes');\r\n\t\treturn timeUtc;\r\n\t}\r\n\tconvertUtcToLocal = (time) => {\r\n\t\tlet utcDate = this.moment.utc(time.clone());\r\n\t\tlet timeLocal = utcDate.local();\r\n\t\treturn timeLocal;\r\n\t}\r\n\r\n\tgetCurrentTimeZoneCode = (timezone) => {\r\n\t\treturn this.moment().tz(timezone).format('zz')\r\n\t}\r\n}\r\n","import { IRootScope } from \"../interfaces/IRootScope\";\r\nimport { ILogger } from \"../interfaces/ILogger\";\r\nimport { FxpContext } from \"../context/FxpContext\";\r\nimport { FxpMessageService } from \"../../app/banner/FxpMessageService\";\r\nimport { FxpConstants, ApplicationConstants, PerfMarkers } from \"../common/ApplicationConstants\";\r\nimport { UserInfoService } from \"./UserInfoService\";\r\nimport { CommonUtils } from \"../utils/CommonUtils\";\r\nimport { LogPropertyBag } from \"../telemetry/LogPropertyBag\";\r\nimport { FxpConfigurationService } from \"./FxpConfiguration\";\r\nimport { IFxPService } from \"../interfaces/IFxpService\";\r\nimport { FxpGlobalStoreService } from \"../services/fxp.global.store.service\";\r\nimport { AddLoggedInUserClaims, AddCurrentUserClaims } from \"../../app/claims/claims.action\";\r\n\r\ndeclare var _: any;\r\nimport { TelemetryConstants } from './../telemetry/TelemetryConst';\r\nimport { SystemEvent } from './../telemetry/SystemEvent';\r\nimport { ComponentType } from '@microsoftit/telemetry-extensions-npm';\r\nimport { ErrorCodes } from \"../constants/errorCodes\";\r\nimport { ErrorSeverityLevel } from \"../telemetry/ErrorSeverityLevel\";\r\nimport { UserProfileService } from \"./userProfileService\";\r\nimport { MsalAuthenticationService } from \"./MsalAuthenticationService\";\r\n\r\ndeclare var _: any;\r\n/**\r\n * A service to connect to user cliams service to fetch the detaisl of user claims related to partner apps\r\n * @class Fxp.Services.UserClaimsService\r\n * @classdesc A service to connect to user cliams service to fetch the detaisl of user claims related to partner apps\r\n * @example Example to create an instance of user cliams service\r\n * //Initializing User Cliams Service\r\n * angular.module('FxPApp').controller('AppController', ['UserClaimsService', AppController]);\r\n * function AppController(userClaimsService){ userClaimsService.getUserThumbnail(upn); }\r\n */\r\nexport class UserClaimsService implements IFxPService {\r\n private http: angular.IHttpService;\r\n private q: angular.IQService;\r\n private rootScope: IRootScope;\r\n private timeout: angular.ITimeoutService;\r\n private sleepInterval: number;\r\n private msalAuthenticationService: MsalAuthenticationService;\r\n private claimsApiEndpoint: string;\r\n private tenantClaimsApiEndpoint: string;\r\n private loggedInUserAlias: string;\r\n private fxplogger: ILogger;\r\n private fxpcontext: FxpContext;\r\n private userAlias: string;\r\n private fxpMessageSvc: FxpMessageService;\r\n private iReqCount: number = 0;\r\n private iTenantReqCount: number = 0;\r\n private userInfoService: UserInfoService;\r\n public currentUserAlias;\r\n private sourceForTelemetry = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.UserClaimsService`;\r\n\r\n constructor($http: angular.IHttpService, $q: angular.IQService, $rootScope: IRootScope, $timeout: angular.ITimeoutService, loggerService: ILogger,\r\n msalAuthenticationService: MsalAuthenticationService, fxpMessage: FxpMessageService, fxpContext: FxpContext,\r\n userInfoService: UserInfoService, private fxpConfiguration: FxpConfigurationService, private globalStoreService: FxpGlobalStoreService, private userProfileService: UserProfileService) {\r\n this.http = $http;\r\n this.q = $q;\r\n this.rootScope = $rootScope;\r\n this.timeout = $timeout;\r\n this.sleepInterval = 100;\r\n this.msalAuthenticationService = msalAuthenticationService;\r\n this.fxplogger = loggerService;\r\n this.fxpMessageSvc = fxpMessage;\r\n this.fxpcontext = fxpContext;\r\n this.userAlias = \"\";\r\n this.loggedInUserAlias = \"\";\r\n this.currentUserAlias = \"\";\r\n this.userInfoService = userInfoService;\r\n let authStore = window[\"tenantConfiguration\"].AuthStore || {};\r\n this.claimsApiEndpoint = authStore.UserClaimsEndPoint;\r\n this.tenantClaimsApiEndpoint = authStore.TenantClaimsEndPoint;\r\n }\r\n\r\n\r\n /**\r\n * Gets userclaims of the logged in user from the fxp context for an application.\r\n * @method Fxp.Services.UserClaimsService.getLoggedInUserClaims\r\n * @param {ApplcationId } appId application name for which the roles defined.\r\n * @example Example to invoke getLoggedInUserClaims\r\n * UserClaimsService.getLoggedInUserClaims('oneProfile');\r\n */\r\n getLoggedInUserClaims(appId: string): any {\r\n return this.getUserClaimsForAlias(appId, this.userInfoService.getLoggedInUserOID());\r\n }\r\n\r\n /**\r\n * Gets tenant claims of the logged in user from the fxp context for an application.\r\n * @method Fxp.Services.UserProfileService.getUserClaims\r\n * @param {string } tenantId tenant id for which the roles defined.\r\n * @example Example to invoke getUserClaims\r\n * UserClaimsService.getUserClaims('oneProfile');\r\n */\r\n getLoggedInUserTenantClaims(tenantId: string): any {\r\n return this.getUserClaimsForAlias(tenantId, this.userInfoService.getLoggedInUserOID());\r\n }\r\n\r\n /**\r\n * Gets userclaims of the logged in user from the fxp context for an application.\r\n * @method Fxp.Services.UserClaimsService.getUserClaims\r\n * @param {string} appId application name for which the roles defined.\r\n * @example Example to invoke getUserClaims\r\n * UserClaimsService.getUserClaims('oneProfile');\r\n */\r\n getUserClaims(appId: string): any {\r\n return this.getUserClaimsForAlias(appId, this.userInfoService.getCurrentUserOID());\r\n }\r\n\r\n /**\r\n * Gets userclaims of the logged in user from the fxp context for an application.\r\n * @method Fxp.Services.UserClaimsService.getUserClaimsForScopes\r\n * @param {string} userAlias alias of the user\r\n * @param {string[]} appId application / tenant names for which the roles defined.\r\n * @param {string[]} scopes scopes of role, for which the claims has to be returned.\r\n * @param {string} scopeDirection direction on which you want to search the scopes for, this inclues \"Exact\", \"ScopeAndAbove\", \"ScopeAndBelow\". By default it is \"ScopeAndBelow\"\r\n * @example Example to invoke getUserClaimsForScopes\r\n * UserClaimsService.getUserClaimsForScopes('your-alias', ['ps','mdm'], ['/contracts/role/abc','/contracts/role/abc'], 'ScopeAndBelow');\r\n */\r\n async getUserClaimsForScopes(userAlias: string, appId: string[], scopes: string[] = [], scopeDirection: string = \"ScopeAndBelow\") {\r\n const self = this;\r\n if(CommonUtils.isNullOrEmpty(userAlias)){\r\n throw new Error('User Alias cannot be null or Empty');\r\n }\r\n if(CommonUtils.isNullOrEmpty(appId)){\r\n throw new Error('Tenant ID cannot be null or empty');\r\n }\r\n let userClaims = await this.getClaimsForUserAlias(userAlias, appId);\r\n if(!CommonUtils.isNullOrEmpty(userClaims.tenantClaims)){\r\n let userClaimsCopy = JSON.parse(JSON.stringify(userClaims));\r\n let tenantClaims = Object.keys(userClaimsCopy.tenantClaims).reduce((accumulator, key)=> {\r\n accumulator[key.toLowerCase()] = userClaimsCopy.tenantClaims[key]; \r\n return accumulator;\r\n },{});\r\n appId = appId.map(app => app.toLowerCase());\r\n let filteredClaims = self.filterRolesBasedOnScopes(tenantClaims, appId, scopes, scopeDirection);\r\n userClaimsCopy.tenantClaims = {};\r\n for(let app of appId){\r\n if(!CommonUtils.isNullOrEmpty(filteredClaims[app])) {\r\n userClaimsCopy.tenantClaims[app] = filteredClaims[app]\r\n }\r\n }\r\n return userClaimsCopy;\r\n } else {\r\n throw new Error('Tenant claims is empty');\r\n }\r\n }\r\n\r\n filterRolesBasedOnScopes(inputClaims, tenants, scopes, scopeDirection) {\r\n if (CommonUtils.isNullOrEmpty(inputClaims)) {\r\n throw new Error('Tenant claims cannot be null.');\r\n }\r\n \r\n let tenantScopesMap = this.formTenantScopeMapping(scopes, tenants);\r\n \r\n for (const tenant of tenants) {\r\n if (CommonUtils.isNullOrEmpty(tenantScopesMap[tenant])) {\r\n continue;\r\n }\r\n\r\n let tenantScopes = tenantScopesMap[tenant];\r\n \r\n const properties = Object.keys(inputClaims[tenant]);\r\n for (let i = 0; i < properties.length; i++) {\r\n const propertyName = properties[i];\r\n \r\n if (propertyName !== 'claims' && propertyName !== 'delegatedClaims') {\r\n break;\r\n }\r\n \r\n let roles = {};\r\n if (propertyName === 'claims') {\r\n roles = inputClaims[tenant].claims.roles;\r\n inputClaims[tenant].claims.resourcePermissions = [];\r\n } else if (propertyName === 'delegatedClaims') {\r\n roles = inputClaims[tenant].delegatedClaims.roles;\r\n inputClaims[tenant].delegatedClaims.resourcePermissions = [];\r\n }\r\n let filteredScopes = [];\r\n \r\n for (const roleName in roles) {\r\n if (!roles.hasOwnProperty(roleName)) {\r\n continue;\r\n }\r\n \r\n const roleObj = roles[roleName];\r\n \r\n if (!roleObj || !roleObj.Scopes) {\r\n continue;\r\n }\r\n \r\n const roleScopes = roleObj.Scopes;\r\n \r\n switch (scopeDirection) {\r\n case 'None':\r\n filteredScopes = [];\r\n break;\r\n case 'Exact':\r\n filteredScopes = roleScopes.filter((scope) =>tenantScopes.includes(scope));\r\n break;\r\n case 'ScopeAndBelow':\r\n filteredScopes = roleScopes.filter((roleScope) => {\r\n return tenantScopes.some((tenantScope) =>\r\n this.filterScope(roleScope, tenantScope)\r\n );\r\n });\r\n break;\r\n case 'ScopeAndAbove':\r\n filteredScopes = roleScopes.filter((roleScope) => tenantScopes.some((tenantScope) => tenantScope.startsWith(roleScope)));\r\n break;\r\n default:\r\n throw new Error('Invalid search direction');\r\n }\r\n \r\n if (filteredScopes.length === 0) {\r\n if (propertyName === 'claims') {\r\n delete inputClaims[tenant].claims.roles[roleName];\r\n } else if (propertyName === 'delegatedClaims') {\r\n delete inputClaims[tenant].delegatedClaims.roles[roleName];\r\n }\r\n } else {\r\n if (propertyName === 'claims') {\r\n inputClaims[tenant].claims.roles[roleName].Scopes = filteredScopes;\r\n if(roleObj.resourcePermissions){\r\n for (const permission of roleObj.resourcePermissions) {\r\n const existingPermission = inputClaims[tenant].claims.resourcePermissions.find((existingPermission) => \r\n existingPermission.resource.toLowerCase() === permission.resource.toLowerCase());\r\n if (existingPermission) {\r\n existingPermission.permissions.push(...permission.permissions);\r\n existingPermission.permissions = Array.from(\r\n new Set(existingPermission.permissions)\r\n );\r\n continue;\r\n }\r\n inputClaims[tenant].claims.resourcePermissions.push(permission);\r\n }\r\n }\r\n } else if (propertyName === 'delegatedClaims') {\r\n inputClaims[tenant].delegatedClaims.roles[roleName].Scopes = filteredScopes;\r\n if(roleObj?.DefaultPermisssions){\r\n for (const permission of roleObj.DefaultPermisssions) {\r\n const existingPermission =\r\n inputClaims[tenant].delegatedClaims.resourcePermissions.find(\r\n (existingPermission) =>\r\n existingPermission.resource.toLowerCase() ===\r\n permission.resource.toLowerCase()\r\n );\r\n \r\n if (existingPermission) {\r\n existingPermission.permissions.push(...permission.permissions);\r\n existingPermission.permissions = Array.from(\r\n new Set(existingPermission.permissions)\r\n );\r\n continue;\r\n }\r\n inputClaims[tenant].delegatedClaims.resourcePermissions.push(permission);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return inputClaims;\r\n }\r\n\r\n formTenantScopeMapping(scopes, tenants) {\r\n let tenantScopesMap = {};\r\n (tenants ?? []).forEach((tenant) => {\r\n tenantScopesMap[tenant] = [];\r\n });\r\n\r\n if (scopes && scopes.length > 0) {\r\n (scopes ?? []).forEach((scope) => {\r\n let modifiedScope = scope.replace(/^\\/+/, '');\r\n let tenantMatch = tenants.find((tenant) =>\r\n modifiedScope.toLowerCase().startsWith(tenant.toLowerCase())\r\n );\r\n if (tenantMatch) {\r\n let tenantTrimmedScope =\r\n modifiedScope.indexOf('/') >= 0\r\n ? modifiedScope.substring(modifiedScope.indexOf('/'))\r\n : null;\r\n if (tenantTrimmedScope) {\r\n tenantScopesMap[tenantMatch].push(tenantTrimmedScope);\r\n }\r\n }\r\n });\r\n }\r\n return tenantScopesMap;\r\n }\r\n filterScope(roleScope, headerScope) {\r\n const roleParts = roleScope.split('/');\r\n const headerParts = headerScope.split('/');\r\n if (headerParts.length > roleParts.length) {\r\n return false;\r\n }\r\n for (let i = 0; i < headerParts.length; i++) {\r\n if (headerParts[i].toLowerCase() !== roleParts[i].toLowerCase()) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n * Gets userclaims of the logged in user from the fxp context for an application.\r\n * @method Fxp.Services.UserProfileService.getUserClaims\r\n * @param {ApplcationId } appId application name for which the roles defined.\r\n * @example Example to invoke getUserClaims\r\n * UserClaimsService.getUserClaims('oneProfile');\r\n */\r\n getUserTenantClaims(tenantId: string): any {\r\n return this.getUserTenatClaimsByObjectId(this.userInfoService.getCurrentUserOID(), tenantId);\r\n }\r\n\r\n /**\r\n * Gets userclaims of the user from the fxp context for an application.\r\n * @method Fxp.Services.UserProfileService.getUserClaims\r\n * @param {ApplcationId } appId application name for which the roles defined.\r\n * @example Example to invoke getUserClaims\r\n * UserClaimsService.getUserClaims('oneProfile');\r\n */\r\n\r\n private getUserClaimsForAlias(appId: string, objectId: string): any {\r\n let userClaimsLocalStorage = this.getClaimsFromLocalStorage(objectId);\r\n let genericPropBag = this.getClaimsPropertyBag(objectId, appId, \"AppId\");\r\n const telemetry_source = `${this.sourceForTelemetry}.GetUserClaimsForAlias`;\r\n if (CommonUtils.isNullOrEmpty(userClaimsLocalStorage)) {\r\n this.fxplogger.logError(telemetry_source, this.rootScope.fxpUIConstants.UIMessages.AuthServiceReturnsBlankAppError.ErrorMessageTitle, ErrorCodes.AuthSerive_UserClaimsEmptyInLocalStorage, null, genericPropBag, null, null, ErrorSeverityLevel.High);\r\n throw new Error(this.rootScope.fxpUIConstants.UIMessages.AuthServiceReturnsBlankAppError.ErrorMessage);\r\n }\r\n let userClaims = JSON.parse(userClaimsLocalStorage);\r\n if (CommonUtils.isNullOrEmpty(appId))\r\n return userClaims.Applications;\r\n\r\n if (!userClaims.Applications || Object.keys(userClaims.Applications).indexOf(appId) < 0) {\r\n this.fxplogger.logError(telemetry_source, this.rootScope.fxpUIConstants.UIMessages.AuthServiceReturnsBlankAppError.ErrorMessageTitle, ErrorCodes.AuthSerive_MissingApplicationObjectInClaims, null, genericPropBag, null, null, ErrorSeverityLevel.High);\r\n throw new Error(this.rootScope.fxpUIConstants.UIMessages.AuthServiceReturnsBlankAppError.ErrorMessage);\r\n }\r\n\r\n let application = userClaims.Applications[appId];\r\n\r\n if (application.Roles === undefined || Object.keys(application.Roles).length === 0) {\r\n this.fxplogger.logError(telemetry_source, this.rootScope.fxpUIConstants.UIMessages.AuthServiceReturnsBlankAppRoleError.ErrorMessageTitle, ErrorCodes.AuthSerive_MissingRolesObjectInClaims, null, genericPropBag, null, null, ErrorSeverityLevel.High);\r\n throw new Error(this.rootScope.fxpUIConstants.UIMessages.AuthServiceReturnsBlankAppRoleError.ErrorMessage);\r\n }\r\n return application;\r\n }\r\n\r\n private getClaimsPropertyBag(alias: string, entityId: string, entityType: string): LogPropertyBag {\r\n let propertyBag = this.fxplogger.createPropertyBag();\r\n try {\r\n let localStorageValue = this.getClaimsFromLocalStorage(alias);\r\n propertyBag.addToBag('alias', alias);\r\n propertyBag.addToBag(`${entityType}`, entityId);\r\n\r\n if (!CommonUtils.isNullOrEmpty(localStorageValue)) {\r\n let claimsData = JSON.parse(localStorageValue);\r\n propertyBag.addToBag(\"localStorage-V1Claims\", CommonUtils.objectToString(claimsData.Applications));\r\n propertyBag.addToBag(\"localStorage-V2Claims\", CommonUtils.objectToString(claimsData.tenantClaims));\r\n propertyBag.addToBag(\"localStorage-ErrorInfor\", CommonUtils.objectToString(claimsData.ErrorInfo));\r\n }\r\n else {\r\n propertyBag.addToBag(\"IsLocalStorageEmpty\", 'True');\r\n }\r\n\r\n }\r\n catch (e) {\r\n //ingore if something is breaking. \r\n }\r\n return propertyBag;\r\n }\r\n /**\r\n * Gets tenant claims of the user based on alias and tenantId\r\n * @method Fxp.Services.UserProfileService.getUserTenatClaimsByAlias\r\n * @param {string } alias user alias information\r\n * @param {string } tenantId tenant id\r\n * @example Example to invoke getUserTenatClaimsByAlias\r\n * UserClaimsService.getUserTenatClaimsByAlias('oneProfile');\r\n */\r\n private getUserTenatClaimsByObjectId(objectId: string, tenantId?: string): any {\r\n let claimsLocalStorage = this.getClaimsFromLocalStorage(objectId);\r\n let genericPropBag = this.getClaimsPropertyBag(objectId, tenantId, \"TenantId\");\r\n const telemetry_source = `${this.sourceForTelemetry}.GetUserTenatClaimsByAlias`;\r\n\r\n if (CommonUtils.isNullOrEmpty(claimsLocalStorage)) {\r\n this.fxplogger.logError(telemetry_source, this.rootScope.fxpUIConstants.UIMessages.AuthServiceReturnsBlankAppError.ErrorMessageTitle, ErrorCodes.AuthSerive_TenantClaimsEmptyInLocalStorage, null, genericPropBag, null, null, ErrorSeverityLevel.High);\r\n throw new Error(this.rootScope.fxpUIConstants.UIMessages.AuthServiceReturnsBlankAppError.ErrorMessage);\r\n }\r\n let claimsData = JSON.parse(claimsLocalStorage);\r\n if (CommonUtils.isNullOrEmpty(tenantId))\r\n return claimsData.tenantClaims;\r\n\r\n if (Object.keys(claimsData.tenantClaims).indexOf(tenantId) < 0) {\r\n\r\n this.fxplogger.logError(telemetry_source, this.rootScope.fxpUIConstants.UIMessages.AuthServiceReturnsBlankAppError.ErrorMessageTitle, ErrorCodes.AuthSerive_TenantObjectMissingInClaims, null, genericPropBag, null, null, ErrorSeverityLevel.High);\r\n throw new Error(this.rootScope.fxpUIConstants.UIMessages.AuthServiceReturnsBlankAppError.ErrorMessage);\r\n }\r\n let tenant = claimsData.tenantClaims[tenantId];\r\n if (tenant.claims === undefined || Object.keys(tenant.claims).length === 0) {\r\n this.fxplogger.logError(telemetry_source, this.rootScope.fxpUIConstants.UIMessages.AuthServiceReturnsBlankAppRoleError.ErrorMessageTitle, ErrorCodes.AuthSerive_ClaimsMissingInTenantObject, null, genericPropBag, null, null, ErrorSeverityLevel.High);\r\n throw new Error(this.rootScope.fxpUIConstants.UIMessages.AuthServiceReturnsBlankAppRoleError.ErrorMessage);\r\n }\r\n\r\n return tenant;\r\n }\r\n\r\n public isV2ClaimsTenantId(appId: string): boolean {\r\n let result: boolean = false;\r\n let alias = this.userInfoService.getCurrentUser();\r\n\r\n\r\n var claimsData = this.globalStoreService.GetPlatformState().LoggedInUser.Claims;\r\n if (!CommonUtils.isNullOrEmpty(appId) && !CommonUtils.isNullOrEmpty(claimsData) && claimsData.tenantClaims && (Object.keys(claimsData.tenantClaims).indexOf(appId) >= 0)) {\r\n {\r\n result = true;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n private createClaimsPropertyBag(claimId: string, claims: any, method: string): LogPropertyBag {\r\n let propBag = this.fxplogger.createPropertyBag();\r\n propBag.addToBag('Method', method);\r\n propBag.addToBag('ClaimId', claimId);\r\n propBag.addToBag('V1Claims', CommonUtils.objectToString(claims.Applications));\r\n propBag.addToBag('V2Claims', CommonUtils.objectToString(claims.tenantClaims));\r\n propBag.addToBag('ErrorInfo', CommonUtils.objectToString(claims.ErrorInfo));\r\n propBag.addToBag('ClaimsURL', this.tenantClaimsApiEndpoint);\r\n return propBag;\r\n }\r\n /**\r\n * this method used get get tenant claims\r\n * @method Fxp.Services.UserProfileService.getTenatClaimsSvc\r\n * @param {string} alias it contains user alias information\r\n * @example Example to invoke getTenatClaimsSvc\r\n * UserClaimsService.getTenatClaimsSvc(alias);\r\n */\r\n getTenatClaimsSvc(objectID, parentDeferred?: any) {\r\n let self = this;\r\n const telemetry_source = `${this.sourceForTelemetry}.GetTenatClaimsSvc`;\r\n let deferred = parentDeferred || self.q.defer();\r\n if (this.tenantClaimsApiEndpoint) {\r\n let url = this.tenantClaimsApiEndpoint + '/User/' + objectID + '/claims';\r\n if (self.msalAuthenticationService.accessTokenRequestInProgress(url)) {\r\n self.iTenantReqCount++;\r\n if (self.iTenantReqCount === 5) {\r\n self.fxplogger.logError(telemetry_source, self.rootScope.fxpUIConstants.UIMessages.AADAuthFailureError.ErrorMessageTitle, ErrorCodes.AuthService_TokenAcquisitionInProgress, null, null, null, null, ErrorSeverityLevel.Medium);\r\n self.fxpMessageSvc.addMessage(self.rootScope.fxpUIConstants.UIMessages.AADAuthFailureError.ErrorMessage, FxpConstants.messageType.error);\r\n return deferred.promise;\r\n }\r\n self.timeout(function () {\r\n self.getTenatClaimsSvc(objectID, deferred);\r\n }, self.sleepInterval);\r\n }\r\n else {\r\n self.iTenantReqCount = 0;\r\n let areHeadersAvailable = window[\"tenantConfiguration\"].AuthStore != null && window[\"tenantConfiguration\"].AuthStore.TenantClaimsHeaders != null;\r\n let currentProcessName = TelemetryConstants.FXP_TELEMETRY_PLATFORM_BOOTSTRAP + '.Authorization.FetchUserClaims';\r\n let eventData = new SystemEvent(currentProcessName, ComponentType.DataStore, 'Fetching User Claims data. ');\r\n\r\n self.fxplogger.logSystemEvent(telemetry_source, eventData, null);\r\n\r\n return areHeadersAvailable ?\r\n this.http.get(url, { headers: window[\"tenantConfiguration\"].AuthStore.TenantClaimsHeaders }) : this.http.get(url);\r\n }\r\n } else {\r\n let defer = self.q.defer();\r\n defer.resolve({ data: { tenantClaims: {} } });\r\n return defer.promise;\r\n }\r\n return deferred.promise;\r\n }\r\n\r\n /**\r\n * Gets user claims by connecting to the service through the url\r\n * @method Fxp.Services.UserProfileService.getUserClaimsSvc\r\n * @example Example to invoke getUserClaimsSvc\r\n * UserClaimsService.getUserClaimsSvc();\r\n */\r\n getUserClaimsSvc(alias: string, parentDeferred?: any): angular.IPromise {\r\n let self = this;\r\n let deferred = parentDeferred || self.q.defer();\r\n let url: string;\r\n const telemetry_source = `${this.sourceForTelemetry}.GetUserClaimsSvc`;\r\n if (self.claimsApiEndpoint) {\r\n this.getObjectIdFromIdentifier(alias).then(function (result) {\r\n let OID = result;\r\n url = self.claimsApiEndpoint + \"/User/\" + OID + \"/claims\";\r\n this.fxplogger.startTrackPerformance(PerfMarkers.GetUserClaims);\r\n if (self.msalAuthenticationService.accessTokenRequestInProgress(url)) {\r\n self.iReqCount++;\r\n if (self.iReqCount == 5) {\r\n self.fxplogger.logError(telemetry_source, self.rootScope.fxpUIConstants.UIMessages.AADAuthFailureError.ErrorMessageTitle, ErrorCodes.AuthService_TokenAcquisitionInProgress_TenantClaims, null, null, null, null, ErrorSeverityLevel.Medium);\r\n self.fxpMessageSvc.addMessage(self.rootScope.fxpUIConstants.UIMessages.AADAuthFailureError.ErrorMessage, FxpConstants.messageType.error);\r\n return deferred.promise;\r\n }\r\n self.timeout(function () {\r\n self.getUserClaimsSvc(alias);\r\n }, self.sleepInterval);\r\n }\r\n else {\r\n this.iReqCount = 0;\r\n return this.http.get(url);\r\n }\r\n self.fxplogger.stopTrackPerformance(PerfMarkers.GetUserClaims);\r\n });\r\n }\r\n else {\r\n let defer = self.q.defer();\r\n //returning empty claims if profile api is not configured\r\n defer.resolve({ data: { \"Applications\": {} } });\r\n return defer.promise;\r\n }\r\n return deferred.promise;\r\n }\r\n \r\n getObjectIdFromIdentifier(useridentifier: string): angular.IPromise {\r\n var self = this;\r\n let deferred = this.q.defer();\r\n if (CommonUtils.isGuid(useridentifier))\r\n deferred.resolve(useridentifier);\r\n\r\n else if (useridentifier.toLowerCase() == self.userInfoService.getLoggedInUser().toLowerCase())\r\n deferred.resolve(self.userInfoService.getLoggedInUserOID());\r\n\r\n\r\n else if (useridentifier.toLowerCase() == self.userInfoService.getCurrentUser().toLowerCase())\r\n deferred.resolve(self.userInfoService.getCurrentUserOID());\r\n\r\n\r\n else {\r\n // get oid from one profile call\r\n self.userProfileService.getBasicProfileByAlias(useridentifier).then(function (loggedInUserInfo: any) {\r\n var userinfo = loggedInUserInfo;\r\n deferred.resolve(userinfo.aadObjectId);\r\n });\r\n }\r\n return deferred.promise;\r\n }\r\n\r\n /**\r\n * This is a temporary method used to get claims for the given alias.\r\n * This method is written to ensure that error cases are gracefully handled by partners\r\n * @param alias Alias of the user\r\n * @param tenants List of Tenants for which claims are needed. If not passed then the list is picked from tenant configuration\r\n */\r\n getClaimsForUserAlias(alias: string, tenants?: string[]): angular.IPromise {\r\n let self = this;\r\n let deferred = this.q.defer();\r\n const telmetry_source = `${this.sourceForTelemetry}.GetClaimsForUserAlias`;\r\n\r\n self.getObjectIdFromIdentifier(alias).then(function (oid) {\r\n let objectID = oid;\r\n var parsedClaims = self.getClaimsFromGlobalStore(objectID);\r\n\r\n if (!CommonUtils.isNullOrEmpty(parsedClaims)) {\r\n deferred.resolve(parsedClaims);\r\n return deferred.promise;\r\n }\r\n let claimsEndpoint = self.tenantClaimsApiEndpoint + \"/User/\" + objectID + \"/claims\";\r\n let tenantheaders = tenants === undefined || tenants === null || tenants.length === 0\r\n ? window[\"tenantConfiguration\"].AuthStore.TenantClaimsHeaders\r\n : { \"X-Tenants\": tenants.join(\",\") };\r\n\r\n self.http.get(claimsEndpoint, {\r\n headers: tenantheaders\r\n }).then(response => {\r\n let properties = self.fxplogger.createPropertyBag();\r\n properties.addToBag(\"Alias\", alias);\r\n let systemEvent = new SystemEvent(`${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.ClaimsCallSuccessfull`, ComponentType.Web, `Claims received for alias: ${alias}`);\r\n self.fxplogger.logSystemEvent(self.sourceForTelemetry, systemEvent, properties, null, null);\r\n var responseData = JSON.stringify(response.data);\r\n self.dispatchClaimsAction(responseData, objectID);\r\n deferred.resolve(response.data);\r\n }, error => {\r\n let properties = self.fxplogger.createPropertyBag();\r\n properties.addToBag(\"UserAlias\", alias);\r\n self.fxplogger.logException(telmetry_source,\r\n error,\r\n properties,\r\n null,\r\n null,\r\n ErrorSeverityLevel.Critical,\r\n ErrorCodes.ProfileServiceFailure);\r\n deferred.reject(error)\r\n });\r\n });\r\n return deferred.promise;\r\n }\r\n\r\n /**\r\n * This method is used to get user claims by Object ID\r\n * This method is written to ensure that error cases are gracefully handled by partners\r\n * @param objectId Object ID of the user\r\n * @param tenants List of Tenants for which claims are needed. If not passed then the list is picked from tenant configuration\r\n */\r\n getClaimsByObjectId(objectId: string, tenants?: string[]): angular.IPromise {\r\n let self = this;\r\n let deferred = this.q.defer();\r\n const telmetry_source = `${this.sourceForTelemetry}.GetClaimsByObjectId`;\r\n var parsedClaims = self.getClaimsFromGlobalStore(objectId);\r\n\r\n if (!CommonUtils.isNullOrEmpty(parsedClaims)) {\r\n deferred.resolve(parsedClaims);\r\n return deferred.promise;\r\n }\r\n let claimsEndpoint = this.tenantClaimsApiEndpoint + \"/User/\" + objectId + \"/claims\";\r\n let tenantheaders = tenants === undefined || tenants === null || tenants.length === 0\r\n ? window[\"tenantConfiguration\"].AuthStore.TenantClaimsHeaders\r\n : { \"X-Tenants\": tenants.join(\",\") };\r\n\r\n this.http.get(claimsEndpoint, {\r\n headers: tenantheaders\r\n }).then(response => {\r\n let properties = self.fxplogger.createPropertyBag();\r\n properties.addToBag(\"ObjectId\", objectId);\r\n let systemEvent = new SystemEvent(`${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.ClaimsCallSuccessfull`, ComponentType.Web, `Claims received for Object ID: ${objectId}`);\r\n self.fxplogger.logSystemEvent(this.sourceForTelemetry, systemEvent, properties, null, null);\r\n var responseData = JSON.stringify(response.data);\r\n self.dispatchClaimsAction(responseData, objectId);\r\n deferred.resolve(response.data);\r\n }, error => {\r\n let properties = self.fxplogger.createPropertyBag();\r\n properties.addToBag(\"ObjectId\", objectId);\r\n self.fxplogger.logException(telmetry_source,\r\n error,\r\n properties,\r\n null,\r\n null,\r\n ErrorSeverityLevel.Critical,\r\n ErrorCodes.ProfileServiceFailure);\r\n deferred.reject(error)\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n /**\r\n * this method used get user claims and tenant cliams based on user alias\r\n * @method Fxp.Services.UserClaimsService.getCalimsSvc\r\n * @param {string} alias it contains user alias info\r\n * @example Example to invoke getCalimsSvc\r\n * UserClaimsService.getCalimsSvc(alias);\r\n */\r\n getCalimsSvc(userIdentifier?: string): angular.IPromise {\r\n let self = this;\r\n let deferred = self.q.defer();\r\n let sendDate = new Date();\r\n const telemetry_source = `${this.sourceForTelemetry}.GetCalimsSvc`;\r\n self.getObjectIdFromIdentifier(userIdentifier).then(function (response) {\r\n let objectId = response;\r\n let customProperties = self.fxplogger.createPropertyBag();\r\n customProperties.addToBag(\"AADObjectId\", objectId);\r\n\r\n var fxpAppLaunched = window.sessionStorage.getItem(ApplicationConstants.FxpApplaunchedKey);\r\n let isAppLaunched = !CommonUtils.isNullOrEmpty(fxpAppLaunched) && fxpAppLaunched === \"true\";\r\n\r\n let claimData;\r\n claimData = self.getClaimsFromGlobalStore(objectId);\r\n\r\n if (isAppLaunched && !CommonUtils.isNullOrEmpty(claimData)) {\r\n self.setUserInfo(claimData);\r\n self.timeout(function () {\r\n deferred.resolve(claimData);\r\n }, self.sleepInterval);\r\n return deferred.promise;\r\n } else {\r\n let appCliams = {};\r\n var localStorageClaims = self.getClaimsFromLocalStorage(objectId);\r\n if (localStorageClaims) {\r\n self.dispatchClaimsAction(localStorageClaims, objectId);\r\n let claims = JSON.parse(localStorageClaims);\r\n if (claims.tenantClaims) {\r\n self.timeout(function () {\r\n try {\r\n deferred.notify(JSON.parse(localStorageClaims));\r\n let currentProcessName = TelemetryConstants.FXP_TELEMETRY_PLATFORM_BOOTSTRAP + '.Authorization.GetUserClaimsFromCache';\r\n let eventData = new SystemEvent(currentProcessName, ComponentType.DataStore, 'User Claims data from browser cache. ');\r\n self.fxplogger.logSystemEvent(telemetry_source, eventData, customProperties);\r\n\r\n } catch (exception) {\r\n self.fxplogger.logException(telemetry_source, exception, customProperties, null, null, ErrorSeverityLevel.Medium, ErrorCodes.AuthService_ErrorNotifyingCachedClaims);\r\n }\r\n }, self.sleepInterval);\r\n }\r\n }\r\n\r\n self.getTenatClaimsSvc(objectId)\r\n .then(function (tResponse) {\r\n if (tResponse.data) {\r\n appCliams = tResponse.data;\r\n self.setUserInfo(appCliams);\r\n self.logClaimsMetrics(sendDate, 'getTenatClaimsSvc() Start');\r\n\r\n if (appCliams[\"tenantClaims\"] == undefined || Object.keys(appCliams[\"tenantClaims\"]).length == 0) {\r\n let propBag = self.createClaimsPropertyBag('', appCliams, 'getCalimsSvc-getTenatClaimsSvc');\r\n self.fxplogger.logError(telemetry_source, self.rootScope.fxpUIConstants.UIMessages.AuthServiceReturnsBlankAppError.ErrorMessageTitle, ErrorCodes.AuthService_TenantClaimsObjectMissingInClaims, null, propBag, null, null, ErrorSeverityLevel.High);\r\n }\r\n appCliams[\"defaultAppRole\"] = self.getDefaultAppRole(appCliams[\"tenantClaims\"]);\r\n\r\n self.logClaimsMetrics(sendDate, 'getUserAppRolesSvc() End');\r\n }\r\n self.saveClaimsData(objectId, appCliams);\r\n deferred.resolve(appCliams);\r\n }, function (err) {\r\n console.log(\"ClaimsFailed\" + new Date());\r\n self.logClaimsException(err, sendDate);\r\n if (window[\"tenantConfiguration\"].IsAuthorizationRequired || self.rootScope.isLoginRequired) {\r\n let error = {};\r\n if (err.data && err.data.ErrorInfo != null) {\r\n if (err.data.ErrorInfo[\"V1\"] != null)\r\n error = { statusText: \"V1 Claims Call Failed\", status: err.data.ErrorInfo[\"V1\"].responseCode, config: err.config };\r\n if (err.data.ErrorInfo[\"V2\"] != null)\r\n error = { statusText: \"V2 Claims Call Failed\", status: err.data.ErrorInfo[\"V2\"].responseCode, config: err.config };\r\n if (!err.data.ErrorInfo) {\r\n error = { statusText: \"Claims service call failed with unknown reasons - Error information not found\" };\r\n }\r\n }\r\n else {\r\n error = { statusText: \"Claims service call failed with unknown reasons - Error data not found\" };\r\n }\r\n let genericPropBag = self.fxplogger.createPropertyBag();\r\n genericPropBag.addToBag(FxpConstants.metricConstants.IsLoginRequired, self.rootScope.isLoginRequired);\r\n genericPropBag.addToBag(FxpConstants.metricConstants.Error, JSON.stringify(error));\r\n self.fxplogger.logError(telemetry_source, self.rootScope.fxpUIConstants.UIMessages.GetUserClaimsSvcReturnsError.ErrorMessageTitle, ErrorCodes.AuthService_APICallFailedWithUnknownReason, null, genericPropBag, null, null, ErrorSeverityLevel.Critical);\r\n deferred.reject(error);\r\n }\r\n else {\r\n\r\n if (self.getClaimsFromLocalStorage(objectId)) {\r\n appCliams[\"defaultAppRole\"] = self.getClaimsFromLocalStorage(objectId);\r\n }\r\n else {\r\n appCliams[\"defaultAppRole\"] = self.getDefaultAppRole(null);\r\n self.saveClaimsData(objectId, appCliams);\r\n }\r\n deferred.resolve(appCliams);\r\n }\r\n });\r\n\r\n\r\n }\r\n }, function (err) {\r\n self.logClaimsException(err, sendDate);\r\n deferred.reject(err);\r\n });\r\n return deferred.promise;\r\n }\r\n\r\n private dispatchClaimsAction(localStorageClaims: string, objectId: string) {\r\n var self = this;\r\n if (objectId == self.userInfoService.getLoggedInUserOID()) {\r\n self.globalStoreService.DispatchGlobalAction(\"Platform\", AddLoggedInUserClaims(JSON.parse(localStorageClaims)));\r\n }\r\n if (objectId == self.userInfoService.getCurrentUserOID()) {\r\n self.globalStoreService.DispatchGlobalAction(\"Platform\", AddCurrentUserClaims(JSON.parse(localStorageClaims)));\r\n\r\n }\r\n }\r\n\r\n private getClaimsFromGlobalStore(objectId: string) {\r\n var self = this;\r\n var claimData;\r\n if (objectId == self.userInfoService.getLoggedInUserOID()) {\r\n claimData = self.globalStoreService.GetPlatformState().LoggedInUser.Claims;\r\n }\r\n else if (objectId == self.userInfoService.getCurrentUserOID()) {\r\n let currentClaims = self.globalStoreService.GetPlatformState().CurrentUser.Claims;\r\n if (!CommonUtils.isNullOrEmpty(currentClaims) && objectId == currentClaims.aadObjectId)\r\n claimData = currentClaims;\r\n }\r\n\r\n return claimData;\r\n }\r\n\r\n /**\r\n * this method is used to save claims data into session storage\r\n * @method Fxp.Services.UserClaimsService.setUserInfo\r\n * @param {string} alias user alias\r\n * @param {Object} claimsData it contains claims data\r\n * @example Example to invoke saveClaimsData\r\n * UserClaimsService.saveClaimsData(alias, claimsData, sessionkey, contextkey);\r\n */\r\n saveClaimsData(objectId: string, claimsData): void {\r\n let strCalimsData = JSON.stringify(claimsData);\r\n var self = this;\r\n this.dispatchClaimsAction(strCalimsData, objectId);\r\n localStorage[FxpConstants.CONST.fxpUserClaimsSession + \"_\" + objectId] = strCalimsData;\r\n this.fxpcontext.saveContext(objectId + '-' + ApplicationConstants.UserClaims, strCalimsData);\r\n let alias = self.getAliasFromOID(objectId);\r\n if (!CommonUtils.isNullOrEmpty(alias)) {\r\n localStorage[FxpConstants.CONST.fxpUserClaimsSession + \"_\" + alias.toLowerCase()] = strCalimsData;\r\n this.fxpcontext.saveContext(alias.toLowerCase() + '-' + ApplicationConstants.UserClaims, strCalimsData);\r\n }\r\n }\r\n getAliasFromOID(objectId: string): string {\r\n return objectId == this.userInfoService.getLoggedInUserOID() ? this.userInfoService.getLoggedInUser() :\r\n objectId == this.userInfoService.getCurrentUserOID() ? this.userInfoService.getCurrentUser() : \"\";\r\n }\r\n /**\r\n * this method is used to log get user cliams api response metrics\r\n * @method Fxp.Services.UserClaimsService.logUserClaimsMetrics\r\n * @param {date} sendDate it contains user claims service intiate date and time\r\n * @example Example to invoke saveClaimsData\r\n * UserClaimsService.logUserClaimsMetrics(sendDate);\r\n */\r\n private logClaimsMetrics(sendDate, logInfo: string): void {\r\n let self = this,\r\n propbag = self.fxplogger.createPropertyBag(),\r\n receiveDate = new Date(),\r\n responseTime = receiveDate.getTime() - sendDate.getTime(); // in millisecs\r\n\r\n propbag.addToBag(FxpConstants.metricConstants.StartTime, sendDate.toUTCString());\r\n propbag.addToBag(FxpConstants.metricConstants.EndTime, receiveDate.toUTCString());\r\n propbag.addToBag(FxpConstants.metricConstants.ServiceName, FxpConstants.metricConstants.GetBasicProfileSvcName);\r\n\r\n self.fxplogger.logMetric(self.sourceForTelemetry, FxpConstants.metricConstants.UserClaimsResponseTime, responseTime, propbag);\r\n //self.fxplogger.logInformation(self.classNameUserClaimsService, logInfo);\r\n }\r\n\r\n /**\r\n * this method is used to log exception details of user cliams api =\r\n * @method Fxp.Services.UserClaimsService.logUserClaimsException\r\n * @param {object} exception it contains exception details\r\n * @param {date} sendDate it contains user claims service intiate date and time\r\n * @example Example to invoke logUserClaimsException\r\n * UserClaimsService.logUserClaimsException(exception,sendDate);\r\n */\r\n private logClaimsException(exception, sendDate): void {\r\n let self = this, propbag = self.fxplogger.createPropertyBag(),\r\n receiveDate = new Date(),\r\n responseTime = receiveDate.getTime() - sendDate.getTime();\r\n propbag.addToBag(FxpConstants.metricConstants.Status, exception.status);\r\n propbag.addToBag(FxpConstants.metricConstants.StatusText, exception.statusText);\r\n propbag.addToBag(FxpConstants.metricConstants.ErrorUrl, exception.config ? exception.config.url : '');\r\n propbag.addToBag(FxpConstants.metricConstants.ErrorText, exception.data ? JSON.stringify(exception.data) : '');\r\n self.fxplogger.logError(`${self.sourceForTelemetry}.LogClaimsException`, self.rootScope.fxpUIConstants.UIMessages.AuthServiceReturnsBlankAppError.ErrorMessageTitle, ErrorCodes.AuthService_UnknownException, \"\", propbag, null, null, ErrorSeverityLevel.High);\r\n propbag.addToBag(FxpConstants.metricConstants.StartTime, sendDate.toUTCString());\r\n propbag.addToBag(FxpConstants.metricConstants.EndTime, receiveDate.toUTCString());\r\n propbag.addToBag(FxpConstants.metricConstants.ServiceName, FxpConstants.metricConstants.GetUserClaimsSvcName);\r\n self.fxplogger.logMetric(self.sourceForTelemetry, FxpConstants.metricConstants.UserClaimsResponseTimeError, responseTime, propbag);\r\n if (window[\"tenantConfiguration\"].IsAuthorizationRequired)\r\n self.fxpMessageSvc.addMessage(self.rootScope.fxpUIConstants.UIMessages.AuthzServiceReturnsError.ErrorMessage, FxpConstants.messageType.error);\r\n }\r\n\r\n /**\r\n * this method is used to get is Acting On Behalf Of is activate\r\n * @example Example to invoke logTenantClaimsException\r\n * UserClaimsService.isObo();\r\n */\r\n private isObo(): boolean {\r\n return this.userInfoService.isActingOnBehalfOf();\r\n }\r\n\r\n /**\r\n * this method is used to set the Upn and AAD Object ID for the Resepective users\r\n * @method Fxp.Services.UserClaimsService.setUserInfo\r\n * @param {claimsData } claimsData user cliams\r\n * @example Example to invoke setUserInfo\r\n * UserClaimsService.setUserInfo(claimsData);\r\n */\r\n private setUserInfo(claimsData): void {\r\n this.userInfoService.setCurrentUserUpn(claimsData.upn);\r\n }\r\n\r\n /**\r\n * intializing current user alias\r\n * @method Fxp.Services.UserClaimsService.setCurrentUser\r\n * @param {string } alias it contains user alias\r\n * @example Example to invoke setCurrentUser\r\n * UserClaimsService.setCurrentUser(alias);\r\n */\r\n setCurrentUser(alias: string) {\r\n this.userAlias = alias;\r\n this.currentUserAlias = alias;\r\n }\r\n\r\n getUserRoles(alias?: string): angular.IPromise {\r\n let self = this;\r\n let deferred = self.q.defer();\r\n let listOfRoles = [];\r\n let userIdentifier = alias || self.userInfoService.getCurrentUser();\r\n if(CommonUtils.isNullOrEmpty(userIdentifier))\r\n userIdentifier = self.userInfoService.getCurrentUserOID();\r\n try {\r\n self.getCalimsSvc(userIdentifier)\r\n .then(function (response) {\r\n let result = response;\r\n if (result.Applications) {\r\n _.each(result.Applications, function (app) {\r\n var appName = app.ApplicationName;\r\n _.each(app.Roles, function (role) {\r\n listOfRoles.push(appName + \".\" + role.RoleName);\r\n });\r\n });\r\n }\r\n if (result.tenantClaims) {\r\n for (let npd in result.tenantClaims) {\r\n _.each(result.tenantClaims[npd].claims.roles, function (role) {\r\n listOfRoles.push(role.roleName);\r\n });\r\n }\r\n }\r\n if (listOfRoles.length == 0) {\r\n //adding dummy app role if user dont have app roles\r\n listOfRoles.push(window[\"tenantConfiguration\"].DefaultAppRole);\r\n }\r\n deferred.resolve(listOfRoles);\r\n });\r\n }\r\n catch (ex) {\r\n deferred.reject(ex);\r\n self.fxpMessageSvc.addMessage(self.rootScope.fxpUIConstants.UIMessages.SelectedProfileRoles.ErrorMessage, FxpConstants.messageType.error);\r\n }\r\n return deferred.promise;\r\n }\r\n\r\n getUserDelegatedRoles(alias?: string): angular.IPromise {\r\n let self = this;\r\n let deferred = self.q.defer();\r\n let listOfRoles: string[] = [];\r\n let userIdentifier = alias || self.userInfoService.getCurrentUser();\r\n if(CommonUtils.isNullOrEmpty(userIdentifier))\r\n userIdentifier = self.userInfoService.getCurrentUserOID();\r\n try {\r\n self.getCalimsSvc(userIdentifier)\r\n .then(function (response) {\r\n let result = response;\r\n if (result.tenantClaims) {\r\n for (let npd in result.tenantClaims) {\r\n if (result.tenantClaims[npd].delegatedClaims !== undefined\r\n && result.tenantClaims[npd].delegatedClaims !== null\r\n && result.tenantClaims[npd].delegatedClaims.roles !== undefined\r\n && result.tenantClaims[npd].delegatedClaims.roles !== null) {\r\n _.each(result.tenantClaims[npd].delegatedClaims.roles, function (role) {\r\n listOfRoles.push(role.roleName);\r\n });\r\n }\r\n }\r\n }\r\n deferred.resolve(listOfRoles);\r\n });\r\n }\r\n catch (ex) {\r\n deferred.reject(ex);\r\n self.fxpMessageSvc.addMessage(self.rootScope.fxpUIConstants.UIMessages.SelectedProfileRoles.ErrorMessage, FxpConstants.messageType.error);\r\n }\r\n return deferred.promise;\r\n }\r\n\r\n getUserConsolidatedRoles(alias?: string): angular.IPromise {\r\n let self = this;\r\n let deferred = self.q.defer();\r\n let getUserRolesPromise = self.getUserRoles(alias);\r\n let getUserDelegatedRolesPromise = self.getUserDelegatedRoles(alias);\r\n\r\n let promiseList = [getUserRolesPromise, getUserDelegatedRolesPromise];\r\n self.q.all(promiseList)\r\n .then(function (result) {\r\n if (result === undefined || result === null || result.length === 0) {\r\n deferred.resolve([]);\r\n }\r\n let userRoles = result.length > 0 ? result[0] : [];\r\n let userDelegatedRoles = result.length > 1 ? result[1] : [];\r\n let consolidatedRoles = _.union(userRoles, userDelegatedRoles);\r\n deferred.resolve(consolidatedRoles);\r\n });\r\n return deferred.promise;\r\n }\r\n\r\n /**\r\n * userd to get user resources list\r\n * @method Fxp.Services.UserClaimsService.getUserResources\r\n * @param {string } alias it contains user alias\r\n * @example Example to invoke getUserResources\r\n * UserClaimsService.getUserResources(alias);\r\n *\r\n */\r\n getUserResources(objectId?: string) {\r\n let self = this;\r\n let listOfResources = [];\r\n objectId = objectId || self.userInfoService.getCurrentUserOID();\r\n try {\r\n let result = self.getUserTenatClaimsByObjectId(objectId);\r\n if (result && result[window[\"tenantConfiguration\"].NPD]) {\r\n _.each(result[window[\"tenantConfiguration\"].NPD].claims.resourcePermissions, function (item) {\r\n listOfResources.push(item.resource);\r\n });\r\n }\r\n }\r\n catch (ex) {\r\n self.fxpMessageSvc.addMessage(self.rootScope.fxpUIConstants.UIMessages.SelectedProfileRoles.ErrorMessage, FxpConstants.messageType.error);\r\n }\r\n return listOfResources;\r\n }\r\n\r\n /**\r\n * userd to get user resources list\r\n * @method Fxp.Services.UserClaimsService.getUserResources\r\n * @param {string } alias it contains user alias\r\n * @example Example to invoke getUserResources\r\n * UserClaimsService.getUserResources(alias);\r\n *\r\n */\r\n getUserAdminResources(objectId?: string) {\r\n let self = this;\r\n let listOfResources = [];\r\n objectId = objectId || self.userInfoService.getCurrentUserOID();\r\n try {\r\n let result = self.getUserTenatClaimsByObjectId(objectId);\r\n if (result) {\r\n _.each(result[self.fxpConfiguration.FxpAppSettings.FxpNpd].claims.resourcePermissions, function (item) {\r\n listOfResources.push(item.resource);\r\n });\r\n }\r\n }\r\n catch (ex) {\r\n self.fxpMessageSvc.addMessage(self.rootScope.fxpUIConstants.UIMessages.SelectedProfileRoles.ErrorMessage, FxpConstants.messageType.error);\r\n }\r\n return listOfResources;\r\n }\r\n\r\n getDefaultAppRole(lstClaims) {\r\n let appRole;\r\n if (lstClaims && lstClaims[window[\"tenantConfiguration\"].NPD]) {\r\n var tenantClaims = lstClaims[window[\"tenantConfiguration\"].NPD];\r\n var prefix = window[\"tenantConfiguration\"].TenantId;\r\n _.each(tenantClaims.claims.roles, function (role) {\r\n if (role.isDefaultRole) {\r\n appRole = prefix + \".\" + role.roleName;\r\n }\r\n });\r\n }\r\n return (appRole) ? appRole : window[\"tenantConfiguration\"].DefaultAppRole;\r\n }\r\n\r\n private getClaimsFromLocalStorage(userIdentifier) {\r\n if (!userIdentifier)\r\n return null;\r\n\r\n let claimsStorageKey = CommonUtils.getSessionStorageUserClaimsKey(userIdentifier);\r\n if (!claimsStorageKey) \r\n return null;\r\n \r\n var localStorageProfile = localStorage[claimsStorageKey];\r\n return localStorageProfile;\r\n }\r\n}\r\n","import { CommonUtils } from \"../utils/CommonUtils\";\r\nimport { IUserContext } from \"../interfaces/IUserContext\";\r\nimport { IFxPService } from \"../interfaces/IFxpService\";\r\nimport { FxpGlobalStoreService } from \"../services/fxp.global.store.service\";\r\nimport { Profile } from \"../../app/profile/profile.model\";\r\nimport { Claims } from \"../../app/claims/claims.model\";\r\n/**\r\n * A service to connect to user profile service to fetch the detaisl of user info and user claims related to partner apps\r\n * @class Fxp.Services.UserInfoService\r\n * @classdesc A service to connect to user profile service to fetch the user profile details and claims \r\n * @example Example to create an instance of user profile service \r\n * //Initializing User Profile Service\r\n * angular.module('FxPApp').service('UserInfoService', [UserInfoService]); \r\n */\r\nexport class UserInfoService implements IFxPService {\r\n\tprivate currentUser: string;\r\n\tprivate loggedInUser: string;\r\n\tprivate loggedInUserOID: string;\r\n\tprivate currentUserOID: string;\r\n\tprivate currentUserUpn: string;\r\n\tprivate loggedInUserUpn: string;\r\n\tprivate OBOUserSession: any;\r\n\tprivate isOboActive: boolean;\r\n\tprivate globalStoreService: FxpGlobalStoreService;\r\n\tconstructor(globalStoreService: FxpGlobalStoreService) {\r\n\t\tthis.currentUser = \"\";\r\n\t\tthis.loggedInUser = \"\";\r\n\t\tthis.currentUserUpn = \"\";\r\n\t\tthis.loggedInUserUpn = \"\";\r\n\t\tthis.loggedInUserOID=\"\";\r\n\t\tthis.currentUserOID=\"\";\r\n\t\tthis.globalStoreService = globalStoreService;\r\n\t}\r\n\tgetCurrentUserProfile():Profile{\r\n\t\treturn this.globalStoreService.GetPlatformState().CurrentUser.Profile;\r\n\t}\r\n\tgetCurrentUserClaims():Claims{\r\n\t\treturn this.globalStoreService.GetPlatformState().CurrentUser.Claims;\r\n\t}\r\n\tgetLoggedInUserProfile():Profile{\r\n\t\treturn this.globalStoreService.GetPlatformState().LoggedInUser.Profile;\r\n\t}\r\n\tpublic \tgetLoggedInUserOID():string{\r\n\t\treturn this.loggedInUserOID;\r\n\t}\r\n\tpublic \tgetCurrentUserOID():string{\r\n\t\treturn this.currentUserOID;\r\n\t}\r\n\tpublic \tsetLoggedInUserOID(aadOID:string){\r\n\t\t this.loggedInUserOID = aadOID;\r\n\t}\r\n\tpublic \tsetCurrentUserOID(aadOID:string){\r\n\t\tthis.currentUserOID = aadOID;\r\n\t}\r\n\tpublic getCurrentUser(): string {\r\n\t\treturn this.currentUser;\r\n\t}\r\n\r\n\tpublic setCurrentUser(alias: string) {\r\n\t\tthis.currentUser = alias ? alias.toLowerCase() : alias;\r\n\t}\r\n\r\n\tpublic getLoggedInUser(): string {\r\n\t\treturn this.loggedInUser;\r\n\t}\r\n\r\n\tpublic setLoggedInUser(alias: string) {\r\n\t\tthis.loggedInUser = alias;\r\n\t}\r\n\r\n\tpublic getCurrentUserUpn(): string {\r\n\t\tlet userClaims = this.getCurrentUserContext().userClaims;\r\n\t\tif (userClaims) {\r\n\t\t\tlet upn = userClaims.upn;\r\n\t\t\treturn upn;\r\n\t\t}\r\n\t\telse return this.getCurrentUser();\r\n\t}\r\n\r\n\tpublic setCurrentUserUpn(upn: string) {\r\n\t\tthis.currentUserUpn = upn;\r\n\t\tthis.setUpAjaxCallsHeaders();\r\n\r\n\t}\r\n\r\n\tpublic getAADObjectIDFromAlias(alias: string): string {\r\n\t\treturn alias == this.getCurrentUser() ? this.currentUserOID : this.loggedInUserOID\r\n\t}\r\n\r\n\tpublic setLoggedInUserUpn(upn: string) {\r\n\t\tthis.loggedInUserUpn = upn;\r\n\t}\r\n\r\n\tpublic getLoggedInUserUpn() {\r\n\t\treturn this.loggedInUserUpn;\r\n\t}\r\n\r\n\tpublic setOBOUserSessionInfo(value: string) {\r\n\t\tthis.OBOUserSession = value;\r\n\t}\r\n\r\n\tpublic getCurrentUserData() {\r\n\t\tvar userInfo;\r\n\t\tvar self = this;\r\n\r\n\t\t//remove sessionStorage and keep the data only in state for loggedinUser\r\n\t\tif (!self.isActingOnBehalfOf()) {\r\n\r\n\t\t\tvar profile = self.getLoggedInUserProfile();\r\n\t\t\tif (profile && !CommonUtils.isNullOrEmpty(profile))\r\n\t\t\t\tuserInfo = JSON.stringify(profile);\r\n\r\n\r\n\t\t}\r\n\t\telse {\r\n\t\t\tuserInfo = self.OBOUserSession;\r\n\t\t}\r\n\t\tif (userInfo) {\r\n\t\t\tuserInfo = JSON.parse(userInfo);\r\n\t\t\treturn userInfo;\r\n\t\t}\r\n\t}\r\n\r\n\tpublic isActingOnBehalfOf() {\r\n\t\treturn this.isOboActive;\r\n\t}\r\n\r\n\tpublic setActingOnBehalfOfFlag(value: boolean) {\r\n\t\tthis.isOboActive = value;\r\n\t}\r\n\r\n\tprivate setUpAjaxCallsHeaders() {\r\n\t\tif (this.isActingOnBehalfOf()) {\r\n\t\t\tlet userClaims = this.getCurrentUserContext().userClaims;\r\n\t\t\tlet upn;\r\n\t\t\tlet aadObjectID;\r\n\t\t\tif (!userClaims) {\r\n\t\t\t\tupn = this.getCurrentUser();\r\n\t\t\t\taadObjectID = this.getAADObjectIDFromAlias(this.getCurrentUser());\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tupn = userClaims.upn;\r\n\t\t\t\taadObjectID = userClaims.aadObjectId;\r\n\t\t\t}\r\n\t\t\t$.ajaxSetup({\r\n\t\t\t\theaders: { \"X-ActonBehalfMode\": 'true', \"X-OnBehalfOfUser\": upn, \"X-OnBehalfOfUserObjectId\": aadObjectID }\r\n\t\t\t});\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$.ajaxSetup({\r\n\t\t\t\theaders: { \"X-ActonBehalfMode\": 'false', \"X-OnBehalfOfUser\": '', \"X-OnBehalfOfUserObjectId\": '' }\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tpublic getCurrentUserContext(): IUserContext {\r\n\t\tvar self = this;\r\n\t\tlet userData = null;\r\n\t\tlet userClaimsData = null;\r\n\t\tvar profile = self.globalStoreService.GetPlatformState().CurrentUser.Profile;\r\n\r\n\t\tif (!CommonUtils.isNullOrEmpty(profile)) {\r\n\t\t\tuserData = profile\r\n\t\t}\r\n\t\tvar claims = self.globalStoreService.GetPlatformState().CurrentUser.Claims;\r\n\t\tif (!CommonUtils.isNullOrEmpty(claims)) {\r\n\t\t\tuserClaimsData = claims;\r\n\t\t}\r\n\r\n\t\tlet userContext: IUserContext = {\r\n\t\t\tuserInfo: userData,\r\n\t\t\tuserClaims: userClaimsData\r\n\t\t};\r\n\t\treturn userContext;\r\n\t}\r\n}","import { IRootScope } from \"../interfaces/IRootScope\";\r\nimport { ILogger } from \"../interfaces/ILogger\";\r\nimport { FxpConstants, ApplicationConstants, PerfMarkers, CustomEvents } from \"../common/ApplicationConstants\";\r\nimport { TelemetryContext } from \"../telemetry/telemetrycontext\";\r\nimport { FxpLogHelper } from \"../telemetry/FxpLogHelper\";\r\nimport { FxpConfigurationService } from \"./FxpConfiguration\";\r\nimport { FxpMessageService } from \"../../app/banner/FxpMessageService\";\r\nimport { UserInfoService } from \"./UserInfoService\";\r\nimport { UserProfileService } from \"./userProfileService\";\r\nimport { FeatureFlagService } from \"@fxp/flightingsdk\";\r\nimport { IFxPService } from \"../interfaces/IFxpService\";\r\nimport { FxpGlobalStoreService } from \"./fxp.global.store.service\";\r\nimport { setLeftnav } from \"../../app/leftNavigation/leftNavigation.action\";\r\nimport { ILeftNavigationGroup } from \"../../app/leftNavigation/leftNavigation.model\";\r\nimport { HideLoader } from \"../../app/loader/loader.actions\";\r\nimport { TelemetryConstants } from \"../telemetry/TelemetryConst\";\r\nimport { ErrorCodes } from \"../constants/errorCodes\";\r\nimport { ErrorSeverityLevel } from \"../telemetry/ErrorSeverityLevel\";\r\nimport { UpsertFeatureFlags } from \"../../app/flighting/featureFlags.actions\";\r\nimport { MsalAuthenticationService } from \"./MsalAuthenticationService\";\r\n\r\n/**\r\n * @application Fxp\r\n */\r\n/**\r\n * @module Fxp.Services\r\n */\r\n/**\r\n * A service to connect to dashboard service to fetch the leftnav data of the user\r\n * @class Fxp.Services.DashboardService\r\n * @classdesc A service to connect to dashaboard service to fetch the leftnav data \r\n * @example Example to create an instance of dashboard service \r\n * //Initializing DashboardService\r\n * angular.module('FxPApp').controller('LeftNavController', ['DashboardService', LeftNavController]);\r\n * function LeftNavController(dashboardService){ dashboardService.getLeftNavData(userAlias,roleGroupId); }\r\n */\r\ndeclare type IStateService = any;\r\n\r\nexport class DashboardService implements IFxPService {\r\n\tprivate http: angular.IHttpService;\r\n\tprivate q: angular.IQService;\r\n\tprivate rootScope: IRootScope;\r\n\tprivate fxpConfiguration: FxpConfigurationService;\r\n\tprivate timeout: angular.ITimeoutService;\r\n\tprivate sleepInterval: number;\r\n\tprivate fxplogger: ILogger;\r\n\tprivate userAlias: string;\r\n\tprivate fxpMessageSvc: FxpMessageService;\r\n\tprivate userInfoService: UserInfoService;\r\n\tprivate fxpConstants: FxpConstants;\r\n\tprivate fxpTelemetryContext: TelemetryContext;\r\n\tprivate userProfileService: UserProfileService;\r\n\tprivate iCount: number = 0;\r\n\tprivate iReqCount: number = 0;\r\n\tprivate iUCount: number = 0;\r\n\tprivate fxpServiceEndPoint: string;\r\n\tprivate sourceForTelemetry = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.DashboardService`;\r\n\tprivate static _instance: DashboardService;\r\n\tprivate pageTourWaitTime: number = 2000;\r\n\tprivate msalAuthenticationService: MsalAuthenticationService;\r\n\r\n\tprivate static featureFlagPromise: angular.IPromise;\r\n\r\n\tconstructor($http: angular.IHttpService, \r\n\t\t$q: angular.IQService, \r\n\t\t$rootScope: IRootScope, \r\n\t\tfxpConfiguration: FxpConfigurationService, \r\n\t\t$timeout: angular.ITimeoutService, \r\n\t\tloggerService: ILogger, \r\n\t\tmsalAuthenticationService: MsalAuthenticationService, \r\n\t\tfxpMessage: FxpMessageService, \r\n\t\tuserInfoService: UserInfoService,\r\n\t\tfxpTelemetryContext: TelemetryContext, \r\n\t\tuserProfileService: UserProfileService, \r\n\t\tprivate featureFlagService: FeatureFlagService, \r\n\t\tprivate startUpFlightConfig: any,\r\n\t\tprivate globalStoreService: FxpGlobalStoreService\r\n\t\t) {\r\n\t\tthis.http = $http;\r\n\t\tthis.q = $q;\r\n\t\tthis.rootScope = $rootScope;\r\n\t\tthis.timeout = $timeout;\r\n\t\tthis.sleepInterval = 100;\r\n\t\tthis.fxplogger = loggerService;\r\n\t\tthis.fxpMessageSvc = fxpMessage;\r\n\t\tthis.fxpTelemetryContext = fxpTelemetryContext;\r\n\t\tthis.fxpConfiguration = fxpConfiguration;\r\n\t\tthis.userInfoService = userInfoService;\r\n\t\tthis.userProfileService = userProfileService;\r\n\t\tthis.fxpServiceEndPoint = this.fxpConfiguration.FxpAppSettings.FxpServiceEndPoint;\r\n\t\tthis.msalAuthenticationService = msalAuthenticationService;\r\n\t\tif (DashboardService._instance) {\r\n\t\t\treturn DashboardService._instance;\r\n\t\t}\r\n\t\tDashboardService._instance = this;\r\n\t}\r\n\t/**\r\n* Get the Leftnavigation data of the user\r\n* @method Fxp.Services.DashboardService.getLeftNavData\r\n* @param {tenantId } tenantId of the user.\r\n* @param {userRoles } userRoles of the user.\r\n* @example Example to invoke getLeftNavData\r\n* DashboardService.getLeftNavData(tenantId,userRoles);\r\n*/\r\n\tgetLeftNavData(tenantId: string, userProfile: string): angular.IPromise {\r\n\t\tvar deferred = this.q.defer();\r\n\t\tconst telemetry_source = `${this.sourceForTelemetry}.GetLeftNavData`; \r\n\t\tvar url = this.fxpServiceEndPoint + \"/navigation\";\r\n\t\tvar self = this;\r\n\t\tlet currentUser = this.userInfoService.getCurrentUser();\r\n\t\t// if current alias is undefined\r\n\t\tconst leftNavDataKey = currentUser? \"LeftNavData-\" + currentUser.toLowerCase() : \"LeftNavData-\" + this.userInfoService.getCurrentUserOID();\r\n\t\tlet leftNavData = localStorage.getItem(leftNavDataKey);\t\t\r\n\t\tif (leftNavData && leftNavData.length > 0) {\r\n\t\t\ttry {\r\n\t\t\t\tself.globalStoreService.GetPlatformStore().dispatch(setLeftnav(JSON.parse(leftNavData)));\r\n\t\t\t\tlet timeoutHandle = setTimeout(function () {\r\n\t\t\t\t\tleftNavData = JSON.parse(leftNavData);\r\n\t\t\t\t\tdeferred.notify(leftNavData);\r\n\t\t\t\t\tclearTimeout(timeoutHandle);\r\n\t\t\t\t}, 0);\r\n\t\t\t}\r\n\t\t\tcatch (e) {\r\n\t\t\t\t//ingore. \r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.fxplogger.startTrackPerformance(PerfMarkers.GetLeftNavData);\r\n\t\tif (self.msalAuthenticationService.accessTokenRequestInProgress(url)) {\r\n\t\t\tself.iReqCount++;\r\n\t\t\tif (self.iReqCount == 5) {\r\n\t\t\t\tself.fxplogger.logError(telemetry_source, self.rootScope.fxpUIConstants.UIMessages.GetLeftNavAuthFailureError.ErrorMessageTitle, ErrorCodes.DashboardService_GetLeftNavDataFailure, null, null, null, null, ErrorSeverityLevel.High);\r\n\t\t\t\tself.fxpMessageSvc.addMessage(self.rootScope.fxpUIConstants.UIMessages.GetLeftNavAuthFailureError.ErrorMessage, FxpConstants.messageType.error);\r\n\t\t\t}\r\n\t\t\tself.timeout(function () {\r\n\t\t\t\tself.getLeftNavData(tenantId, userProfile);\r\n\t\t\t}, self.sleepInterval);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tself.iReqCount = 0;\r\n\t\t\tlet requestHeaders = {};\r\n\t\t\trequestHeaders[ApplicationConstants.XTenantId] = tenantId;\r\n\t\t\trequestHeaders[ApplicationConstants.XUserProfileToken] = userProfile;\r\n\t\t\tthis.http.get(url, {\r\n\t\t\t\theaders: requestHeaders\r\n\t\t\t}).then(function (responseData) {\r\n\t\t\t\tlocalStorage[leftNavDataKey] = JSON.stringify(responseData.data);\r\n\t\t\t\tlet data : ILeftNavigationGroup = JSON.parse(JSON.stringify(responseData.data));\r\n\t\t\t\tself.globalStoreService.GetPlatformStore().dispatch(setLeftnav(data));\r\n\t\t\t\tdeferred.resolve(responseData);\r\n\t\t\t\tif (responseData.headers != undefined) {\r\n\t\t\t\t\tvar properties = self.fxplogger.createPropertyBag();\r\n\t\t\t\t\tproperties.addToBag(\"Flighting-Call-Status\", responseData.headers(ApplicationConstants.FlightingStatusHeader));\r\n\t\t\t\t}\r\n\t\t\t}).catch(function (err) {\r\n\t\t\t\tdeferred.reject(err);\r\n\t\t\t});\r\n\t\t}\r\n\t\tself.fxplogger.stopTrackPerformance(PerfMarkers.GetLeftNavData);\r\n\t\treturn deferred.promise;\r\n\t}\r\n\r\n\tgetCachedLeftNavForCurrentUser() {\r\n\t\tlet currentUser = this.userInfoService.getCurrentUser();\r\n\t\tconst leftNavDataKey = currentUser? \"LeftNavData-\" + currentUser.toLowerCase() : \"LeftNavData-\" + this.userInfoService.getCurrentUserOID();\r\n\t\t\r\n\t\tlet leftNavData = JSON.parse(localStorage.getItem(leftNavDataKey));\r\n\t\tthis.globalStoreService.GetPlatformStore().dispatch(setLeftnav(leftNavData));\r\n\t\tif (leftNavData && leftNavData.internalLinks.length > 0) {\r\n\t\t\treturn this.getGLNFlatDataStructure(leftNavData.internalLinks);\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n\t/**\r\n\t* Get the flat structure of Leftnavigation data\r\n\t* @method Fxp.Services.DashboardService.getGLNFlatDataStructure\r\n\t* @param {leftnavData } leftNavData leftnavigation data of the user.\r\n\t* @example Example to invoke getGLNFlatDataStructure\r\n\t* DashboardService.getGLNFlatDataStructure();\r\n\t*/\r\n\tgetGLNFlatDataStructure(leftNavData: any) {\r\n\t\tvar list = new Array();\r\n\t\tfor (var i = 0, L0length = leftNavData.length; i < L0length; i++) {\r\n\t\t\tif (leftNavData[i].hasChildren) {\r\n\t\t\t\tfor (var j = 0, L1length = leftNavData[i].children.length; j < L1length; j++) {\r\n\t\t\t\t\tlist.push(leftNavData[i].children[j]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tlist.push(leftNavData[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn list;\r\n\t}\r\n\r\n\t/**\r\n\t* Logging Telemetry Info and Display Error message when FxpUIConfiguration Fetching is Failed by RoleGroupId\r\n\t* @method Fxp.Services.DashboardService.fxpConfigurationFailed\r\n\t* @example Example to invoke fxpConfigurationFailed\r\n\t* DashboardService.fxpConfigurationFailed();\r\n\t*/\r\n\tfxpConfigurationFailed(): void {\r\n\t\tvar self = this;\r\n\t\tvar userData = self.globalStoreService.GetPlatformState().CurrentUser.Profile;\r\n\t\tvar propbag = self.fxplogger.createPropertyBag();\r\n\t\tpropbag.addToBag(FxpConstants.metricConstants.SessionId, self.rootScope.sessionId);\r\n\t\tpropbag.addToBag(FxpConstants.metricConstants.TimeStamp, FxpLogHelper.getTimeStamp());\r\n\t\tpropbag.addToBag(FxpConstants.metricConstants.UserUPN, self.userInfoService.getCurrentUser());\r\n\t\tpropbag.addToBag(FxpConstants.metricConstants.UserBusinessRole, userData.businessRole);\r\n\t\tpropbag.addToBag(FxpConstants.metricConstants.UserRoleGroup, userData.roleGroupName);\r\n\t\tpropbag.addToBag(FxpConstants.metricConstants.UserAgent, navigator.userAgent);\r\n\t\tpropbag.addToBag(FxpConstants.metricConstants.Geography, self.fxpTelemetryContext.getGeography());\r\n\t\tself.fxplogger.logError(`${self.sourceForTelemetry}.FxpConfigurationFailed`, self.rootScope.fxpUIConstants.UIMessages.UserRoleGroupFxpConfigNotFoundError.ErrorMessageTitle, ErrorCodes.FxPConfigurationFailure, \"\", propbag, null, null, ErrorSeverityLevel.High);\r\n\t\tself.fxpMessageSvc.addMessage(self.rootScope.fxpUIConstants.UIMessages.UserRoleGroupFxpConfigNotFoundError.ErrorMessage, FxpConstants.messageType.error);\r\n\t\tself.globalStoreService.DispatchGlobalAction(\"Platform\", HideLoader({}));\r\n\t}\r\n\r\n\tgetInitialFeatureFlagsForPlatform(): angular.IPromise {\r\n\t\tif (DashboardService.featureFlagPromise) return DashboardService.featureFlagPromise;\r\n\r\n\t\tvar self = this;\r\n\t\tvar context = {};\r\n\t\tvar eventNames = CustomEvents;\r\n\t\tself.rootScope.initialFlags = {}; //to avoid undefined errors\r\n\t\tvar config = self.startUpFlightConfig;\r\n\r\n\t\tvar deferred = this.q.defer();\r\n\t\tself.userProfileService.getLoggedInUserFlighitngContext().then((flightingContext) => {\r\n\t\t\tDashboardService.featureFlagPromise = self.featureFlagService\r\n\t\t\t\t.getFeatureFlags(config.appName, config.envName, config.featureNames, flightingContext)\r\n\t\t\t\t.then(function (response) {\r\n\t\t\t\t\tresponse = self.fxpConfiguration?.FxpAppSettings?.InitialFeatureFlags ?\r\n\t\t\t\t\t{...JSON.parse(self.fxpConfiguration?.FxpAppSettings?.InitialFeatureFlags), ...response} :\r\n\t\t\t\t\tresponse;\r\n\t\t\t\r\n\t\t\t\t\tself.globalStoreService.DispatchGlobalAction(\"Platform\", UpsertFeatureFlags(response));\r\n\t\t\t\t\tlocalStorage[\"FeatureFlags\"] = JSON.stringify(response);\r\n\t\t\t\t\tlet pageTourEnabled = response.pageTourEnabled;\r\n\t\t\t\t\tself.rootScope.initialFlags = response;\r\n\t\t\t\t\tself.rootScope.initialFlags.pageTourEnabled = false;\r\n\r\n\t\t\t\t\t// Remove timeout once pagetour api is optimized.\r\n\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\tself.rootScope.initialFlags.pageTourEnabled = pageTourEnabled;\r\n\t\t\t\t\t\tself.rootScope.$emit(eventNames.PageTourFlagRetrieved);\r\n\t\t\t\t\t}, self.pageTourWaitTime);\r\n\r\n\t\t\t\t\tself.rootScope.$emit(eventNames.StartUpFlagRetrieved);\r\n\t\t\t\t\tDashboardService.featureFlagPromise = null;\r\n\t\t\t\t\tdeferred.resolve();\r\n\t\t\t\t}, function (error) {\r\n\t\t\t\t\tself.fxplogger.logException(`${self.sourceForTelemetry}.GetInitialFeatureFlagsForPlatform`, error, null, null, null, ErrorSeverityLevel.High, ErrorCodes.StartUpFlagRetrieveError);\r\n\t\t\t\t\tself.rootScope.$emit(eventNames.StartUpFlagRetrieved);\r\n\t\t\t\t\tDashboardService.featureFlagPromise = null;\r\n\t\t\t\t\tdeferred.reject(error);\r\n\t\t\t\t});\r\n\t\t}, function (error) {\r\n\t\t\tdeferred.reject(error);\r\n\t\t});\r\n\t\treturn deferred.promise;\r\n\r\n\t}\r\n}\r\n","import { Store, Reducer, Middleware } from 'redux';\r\nimport { IFxPService } from \"../interfaces/IFxpService\";\r\nimport { FxpLoggerService } from '../telemetry/fxpLogger';\r\nimport { IPlatformState } from '../../app/store/platform.state.model';\r\nimport { PlatformStoreFactory } from '../../app/store/platform.store.factory';\r\nimport { IAction, IGlobalStore, GlobalStore, AbstractLogger as ILogger } from 'redux-micro-frontend';\r\n\r\n/**\r\n * Summary: Anuglar 1 service to access the global store.\r\n * Description: Angular 1 wrapper on top of the Global Store.\r\n */\r\nexport class FxpGlobalStoreService implements IGlobalStore,IFxPService {\r\n private readonly _globalStore: IGlobalStore;\r\n\r\n constructor(private _logger: FxpLoggerService) {\r\n this._globalStore = GlobalStore.Get(this._logger);\r\n }\r\n\r\n AddSelectors(source: string, selectors: Record, mergeSelectors?: boolean): void {\r\n this._globalStore.AddSelectors(source, selectors, mergeSelectors);\r\n }\r\n\r\n SelectPartnerState(partner: string, selector: string, defaultReturn?: any) {\r\n this._globalStore.SelectPartnerState(partner, selector, defaultReturn);\r\n }\r\n\r\n CreateStore = (appName: string, appReducer: Reducer, middlewares?: Array, globalActions?: Array, shouldReplace: boolean = false, shouldUpdate: boolean = false): Store =>\r\n this._globalStore.CreateStore(appName, appReducer, middlewares, globalActions, shouldReplace, shouldUpdate);\r\n RegisterStore = (appName: string, store: Store, globalActions?: Array, shouldReplace: boolean = false): void => \r\n this._globalStore.RegisterStore(appName, store, globalActions, shouldReplace)\r\n RegisterGlobalActions = (appName: string, actions: Array): void => \r\n this._globalStore.RegisterGlobalActions(appName, actions);\r\n\r\n GetPlatformState = (): any => this._globalStore.GetPlatformState();\r\n GetPlatformStore = (): Store => PlatformStoreFactory.Get();\r\n GetPartnerState = (partnerName: string): any => this._globalStore.GetPartnerState(partnerName);\r\n GetGlobalState = (): any => this._globalStore.GetGlobalState();\r\n\r\n DispatchGlobalAction = (source: string, action: IAction): void =>\r\n this._globalStore.DispatchGlobalAction(source, action);\r\n DispatchLocalAction = (source: string, action: IAction): void => \r\n this._globalStore.DispatchLocalAction(source, action);\r\n DispatchAction = (source: string, action: IAction): void => \r\n this._globalStore.DispatchAction(source, action)\r\n\r\n Subscribe = (source: string, callback: (state: any) => void): () => void => \r\n this._globalStore.Subscribe(source, callback);\r\n SubscribeToPlatformState = (source: string, callback: (state: any) => void): () => void =>\r\n this._globalStore.SubscribeToPlatformState(source, callback);\r\n SubscribeToPartnerState = (source: string, partner: string, callback: (state: any) => void, eager: boolean = true): () => void =>\r\n this._globalStore.SubscribeToPartnerState(source, partner, callback, eager);\r\n SubscribeToGlobalState = (source: string, callback: (state: any) => void): () => void =>\r\n this._globalStore.SubscribeToGlobalState(source, callback);\r\n SetLogger = (logger: ILogger): void => this._globalStore.SetLogger(logger);\r\n}","import { $injector } from \"@uirouter/core\";\r\nimport { IFxPService } from \"../interfaces/IFxpService\";\r\n\r\nexport class LazyLoaderService implements IFxPService{\r\n\r\n constructor(private $ocLazyLoad){\r\n }\r\n \r\n public getInstance(): ILazyLoaderService{\r\n return this.$ocLazyLoad; \r\n }\r\n}\r\n\r\nexport interface ILazyLoaderService{\r\n load(bundles:Array, options: Object); \r\n}\r\n","import { IRootScope } from \"../interfaces/IRootScope\";\r\nimport { UserProfileService } from \"./userProfileService\";\r\nimport { AppControllerHelper } from \"../factory/AppControllerHelper\";\r\nimport { IFxPService } from \"../interfaces/IFxpService\";\r\n\r\nexport class pageTourEventService implements IFxPService{\r\n\tprivate rootScope: IRootScope;\r\n\tcurrentLeftNavPinState: boolean;\r\n\tisPageTourInProgress: boolean;\r\n\tconstructor($rootScope: IRootScope,\r\n\t\tprivate userProfileService: UserProfileService,\r\n\t\tappControllerHelper: AppControllerHelper\r\n\t) {\r\n\t\tthis.rootScope = $rootScope;\r\n\t\tthis.isPageTourInProgress = false;\r\n\t}\r\n\tinit() {\r\n\t\tvar self = this;\r\n\t\tself.rootScope.$on('pageTour-initialize', function (event) {\r\n\t\t\tself.isPageTourInProgress = true;\r\n\t\t\tself.currentLeftNavPinState = self.rootScope.isLeftNavPinned;\r\n\t\t\tself.rootScope.isLeftNavOpen = true;\r\n\t\t\tself.rootScope.isLeftNavPinned = true;\r\n\t\t\tself.rootScope.isNewTabAllowed = false;\r\n\t\t});\r\n\r\n\t\tself.rootScope.$on('pageTour-Completed', function (event) {\r\n\t\t\tself.isPageTourInProgress = false;\r\n\t\t\tself.rootScope.isLeftNavPinned = self.rootScope.isLeftNavOpen = self.currentLeftNavPinState;\r\n\t\t\tself.rootScope.isNewTabAllowed = true;\r\n\t\t});\r\n\r\n\t\tself.rootScope.$on('collapse-leftNav', function (event) {\r\n\t\t\tself.rootScope.isLeftNavPinned = false;\r\n\t\t\tself.rootScope.isLeftNavOpen = false\r\n\t\t\tself.currentLeftNavPinState = false;\r\n\t\t\tself.rootScope.isNewTabAllowed = true;\r\n\t\t});\r\n\r\n\t\tself.rootScope.$on('reset-leftNav', function (event) {\r\n\t\t\tself.rootScope.isLeftNavPinned = true;\r\n\t\t\tself.rootScope.isLeftNavOpen = true;\r\n\t\t\tself.currentLeftNavPinState = true;\r\n\t\t\tself.rootScope.isNewTabAllowed = true;\r\n\t\t});\r\n\r\n\t}\r\n}","import { IRootScope } from \"../interfaces/IRootScope\";\r\nimport { ILogger } from \"../interfaces/ILogger\";\r\nimport { FxpContext } from \"../context/FxpContext\";\r\nimport { FxpMessageService } from \"../../app/banner/FxpMessageService\";\r\nimport { FxpConstants, ApplicationConstants, PerfMarkers, CustomEvents } from \"../common/ApplicationConstants\";\r\nimport { FxpConfigurationService } from \"./FxpConfiguration\";\r\nimport { TelemetryContext } from \"../telemetry/telemetrycontext\";\r\nimport { UserInfoService } from \"./UserInfoService\";\r\nimport { CommonUtils } from \"../utils/CommonUtils\";\r\nimport { LogPropertyBag } from \"../telemetry/LogPropertyBag\";\r\nimport { FxpLogHelper } from \"../telemetry/FxpLogHelper\";\r\nimport { UserInfo } from \"../common/UserInfo\";\r\nimport { IHttpPromise } from \"angular\";\r\nimport { FxpBroadcastedEvents } from \"./FxpBroadcastedEvents\";\r\nimport { IFxPService } from \"../interfaces/IFxpService\";\r\nimport { FxpGlobalStoreService } from \"../services/fxp.global.store.service\";\r\nimport { PlatformStoreFactory } from \"../../app/store/platform.store.factory\";\r\nimport { AddLoggedInUserProfile, AddCurrentUserProfile } from \"../../app/profile/profile.action\";\r\nimport { TelemetryConstants } from \"../telemetry/TelemetryConst\";\r\nimport { SystemEvent } from \"../telemetry/SystemEvent\";\r\nimport { ComponentType } from \"@microsoftit/telemetry-extensions-npm\";\r\nimport { ErrorCodes } from \"../constants/errorCodes\";\r\nimport { ErrorSeverityLevel } from \"../telemetry/ErrorSeverityLevel\";\r\nimport { IUserInfo } from \"../interfaces/IUserInfo\";\r\nimport { MsalAuthenticationService } from \"./MsalAuthenticationService\";\r\n//import { FxpLoggerService } from \"../telemetry/FxpLogger\";\r\n\r\n\r\n/**\r\n * A service to connect to user profile service to fetch the detaisl of user info and user claims related to partner apps\r\n * @class Fxp.Services.UserProfileService\r\n * @classdesc A service to connect to user profile service to fetch the user profile details and claims\r\n * @example Example to create an instance of user profile service\r\n * //Initializing User Profile Service\r\n * angular.module('FxPApp').controller('AppController', ['UserProfileService', AppController]);\r\n * function AppController(userProfileService){ userProfileService.getUserThumbnail(upn); }\r\n */\r\nexport class UserProfileService implements IFxPService {\r\n private q: angular.IQService;\r\n private rootScope: IRootScope;\r\n private timeout: angular.ITimeoutService;\r\n private sleepInterval: number;\r\n private msalAuthenticationService: MsalAuthenticationService;\r\n private profileApiEndpoint: string;\r\n private claimsApiEndpoint: string;\r\n private loggedInUserAlias: string;\r\n private fxplogger: ILogger;\r\n private fxpcontext: FxpContext;\r\n private userAlias: string;\r\n private fxpMessageSvc: FxpMessageService;\r\n private fxpConfiguration: FxpConfigurationService;\r\n private iCount: number = 0;\r\n private iReqCount: number = 0;\r\n private iUCount: number = 0;\r\n private telemetryContext: TelemetryContext;\r\n private userInfoService: UserInfoService;\r\n public currentUserAlias;\r\n private telemetrySource = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.UserProfileService`;\r\n private responseStartTime = 0;\r\n private isBasicProfileRefreshed = true;\r\n private graphAPIProfileUrl: string;\r\n private graphAPIUserThumbnailUrl: string;\r\n private graphAPIUserProfileUrl: string;\r\n private defaultRoleGroupId: number;\r\n private defaultBusinessRoleId: number;\r\n private searchProfileApiEndpoint: string;\r\n private isProfileRequired: boolean;\r\n constructor(private $http: angular.IHttpService, $q: angular.IQService, $rootScope: IRootScope, $timeout: angular.ITimeoutService, loggerService: ILogger, msalAuthenticationService: MsalAuthenticationService, fxpMessage: FxpMessageService, fxpContext: FxpContext, fxpConfiguration: FxpConfigurationService,\r\n fxpTelemetryContext: TelemetryContext, userInfoService: UserInfoService, private globalStoreService: FxpGlobalStoreService) {\r\n this.telemetryContext = fxpTelemetryContext;\r\n this.q = $q;\r\n this.rootScope = $rootScope;\r\n this.timeout = $timeout;\r\n this.sleepInterval = 100;\r\n this.msalAuthenticationService = msalAuthenticationService;\r\n this.fxplogger = loggerService;\r\n this.fxpMessageSvc = fxpMessage;\r\n this.fxpConfiguration = fxpConfiguration;\r\n this.fxpcontext = fxpContext;\r\n this.userAlias = \"\";\r\n this.loggedInUserAlias = \"\";\r\n this.currentUserAlias = \"\";\r\n this.userInfoService = userInfoService;\r\n this.graphAPIProfileUrl = fxpConfiguration.FxpAppSettings.GraphAdEndPoint;\r\n this.graphAPIUserProfileUrl = fxpConfiguration.FxpAppSettings.GraphApiUserProfileUrl;\r\n this.graphAPIUserThumbnailUrl = fxpConfiguration.FxpAppSettings.GraphApiUserThumbnailUrl;\r\n let profileStore = window[\"tenantConfiguration\"].ProfileStore || {};\r\n this.profileApiEndpoint = profileStore.ProfileAPIEndPoint;\r\n this.searchProfileApiEndpoint = profileStore.SearchAPIEndPoint;\r\n this.isProfileRequired = window[\"tenantConfiguration\"].IsProfileRequired;\r\n }\r\n\r\n /**\r\n * Gets thumbnail image from the graph api service\r\n * @method Fxp.Services.UserProfileService.getUserThumbnail\r\n * @param {Email} upn a User Principal Name (UPN) is the name of a system user in an e-mail address format.\r\n * @param {Boolean} deferred a boolean value which is false by default.\r\n * @example Example to invoke getUserThumbnail\r\n * userProfileService.getUserThumbnail('logged in user email');\r\n */\r\n getUserThumbnail(upn: string, parentDeferred: any): any {\r\n let url = this.graphAPIUserProfileUrl + upn + this.graphAPIUserThumbnailUrl;\r\n let deferred = parentDeferred || this.q.defer();\r\n let self = this;\r\n\r\n if (self.msalAuthenticationService.accessTokenRequestInProgress(url)) {\r\n self.iCount++;\r\n if (self.iCount == 5) {\r\n // log only error. \r\n self.fxplogger.logError(self.telemetrySource, self.rootScope.fxpUIConstants.UIMessages.AADAuthFailureError.ErrorMessageTitle, ErrorCodes.GetUserThumbnail_TokenNotFound, null, null, null, null, ErrorSeverityLevel.Medium);\r\n return deferred.promise;\r\n }\r\n self.timeout(function () {\r\n self.getUserThumbnail(upn, deferred);\r\n }, self.sleepInterval);\r\n }\r\n else {\r\n self.iCount = 0;\r\n let currentProcessName = TelemetryConstants.FXP_TELEMETRY_PLATFORM_BOOTSTRAP + '.Authorization.FetchUserThumbnail';\r\n let eventData = new SystemEvent(currentProcessName, ComponentType.DataStore, 'Fetching user thumbnail from graph');\r\n let customProperties = self.fxplogger.createPropertyBag();\r\n customProperties.addToBag(TelemetryConstants.CLASSNAME, \"UserProfileService\");\r\n customProperties.addToBag(TelemetryConstants.METHODNAME, \"getUserThumbnail\");\r\n self.fxplogger.logSystemEvent(TelemetryConstants.FXP_TELEMETRY_BASE_NAME + \".UserProfileService\", eventData, customProperties);\r\n\r\n return self.$http({\r\n url: url,\r\n method: \"get\",\r\n responseType: \"blob\"\r\n });\r\n }\r\n\r\n return deferred.promise;\r\n };\r\n\r\n /**\r\n * Gets user's basic profile details by connecting to the service through the url\r\n * @method Fxp.Services.UserProfileService.getBasicUserProfile\r\n * @example Example to invoke getBasicUserProfile\r\n * userProfileService.getBasicUserProfile();\r\n */\r\n getBasicUserProfile(pDeferred: Object, showBanner?: boolean): angular.IPromise {\r\n if (!this.isBasicProfileRefreshed)\r\n console.warn(\"getBasicUserProfile was called before basic profile details were refreshed\");\r\n return this.getBasicProfileByOID(this.userInfoService.getCurrentUserOID(), pDeferred, showBanner);\r\n }\r\n /**\r\n * Gets user's latest basic profile details by connecting to the service through the url\r\n * @method Fxp.Services.UserProfileService.refreshBasicUserProfileInContext\r\n * @example Example to invoke refreshBasicUserProfileInContext\r\n * userProfileService.refreshBasicUserProfileInContext();\r\n */\r\n refreshBasicUserProfileInContext(pDeferred: any): angular.IPromise {\r\n let self = this;\r\n let deferred = pDeferred || this.q.defer();\r\n self.isBasicProfileRefreshed = false;\r\n self.responseStartTime = performance.now();\r\n console.log(\"Basic Profile Api Call Start Time : \" + self.responseStartTime);\r\n self.getBasicProfile(this.currentUserAlias, true, deferred);\r\n return deferred.promise;\r\n }\r\n /**\r\n * Gets user's basic profile details for passed in Alias\r\n * @method Fxp.Services.UserProfileService.getBasicProfileByOID\r\n * @param {Alias} alias an alias of a user\r\n * @param {Object} deferred holds promise of a parent caller if set\r\n * @example Example to invoke getBasicProfileSvc\r\n * userProfileService.getBasicProfileByOID('<>');\r\n */\r\n public getBasicProfileByOID(aadObjectID: string, pDeferred?: any, showBanner?: boolean): angular.IPromise {\r\n let self = this;\r\n let deferred = pDeferred || this.q.defer();\r\n let userData = null;\r\n // Removed as part of FXP Event Cleanup (keep comments for near future reference)\r\n if (self.userInfoService.getLoggedInUserOID() == aadObjectID) {\r\n userData = self.globalStoreService.GetPlatformState().LoggedInUser.Profile;\r\n\r\n }\r\n else if (aadObjectID == self.userInfoService.getCurrentUserOID()) {\r\n let currentProfile = self.globalStoreService.GetPlatformState().CurrentUser.Profile;\r\n if (!CommonUtils.isNullOrEmpty(currentProfile) && aadObjectID == currentProfile.AadObjectId)\r\n userData = currentProfile;\r\n\r\n }\r\n if (!CommonUtils.isNullOrEmpty(userData)) {\r\n self.timeout(() => {\r\n deferred.resolve(userData);\r\n }, self.sleepInterval);\r\n\r\n }\r\n else {\r\n self.getBasicProfile(aadObjectID, true, deferred, showBanner);\r\n }\r\n return deferred.promise;\r\n }\r\n public getBasicProfileByAlias(alias: string, pDeferred?: any, showBanner?: boolean,includeInactiveUser: boolean = false): angular.IPromise {\r\n if (includeInactiveUser)\r\n return this.getBasicProfileByAliasIncludingInActiveUser(alias);\r\n let self = this;\r\n let deferred = pDeferred || this.q.defer();\r\n let userData = null;\r\n // Removed as part of FXP Event Cleanup (keep comments for near future reference)\r\n if (self.loggedInUserAlias == alias) {\r\n userData = self.globalStoreService.GetPlatformState().LoggedInUser.Profile;\r\n\r\n }\r\n else if (alias == self.currentUserAlias) {\r\n let currentProfile = self.globalStoreService.GetPlatformState().CurrentUser.Profile;\r\n if (!CommonUtils.isNullOrEmpty(currentProfile) && alias == currentProfile.alias)\r\n userData = currentProfile;\r\n\r\n }\r\n if (!CommonUtils.isNullOrEmpty(userData)) {\r\n self.timeout(() => {\r\n deferred.resolve(userData);\r\n }, self.sleepInterval);\r\n\r\n }\r\n else {\r\n self.getBasicProfile(alias, true, deferred, showBanner);\r\n }\r\n return deferred.promise;\r\n }\r\n\r\n private getBasicProfileByAliasIncludingInActiveUser(alias: string): angular.IPromise {\r\n var self = this;\r\n var url = self.searchProfileApiEndpoint + '/profile/' + alias+ '?IncludeInactive='+true;\r\n\r\n var deferred = self.q.defer();\r\n\r\n if (self.msalAuthenticationService.accessTokenRequestInProgress(url)) {\r\n self.iUCount++;\r\n if (self.iUCount == 5) {\r\n self.fxplogger.logError(self.telemetrySource, self.rootScope.fxpUIConstants.UIMessages.AADAuthFailureError.ErrorMessageTitle, ErrorCodes.SearchProfile_TokenMissing, null, null, null, null, ErrorSeverityLevel.Medium);\r\n return deferred.promise;\r\n }\r\n self.timeout(function () {\r\n self.getBasicProfileByAliasIncludingInActiveUser(alias);\r\n }, self.sleepInterval);\r\n }\r\n else {\r\n self.iUCount = 0;\r\n let bag = this.fxplogger.createPropertyBag();\r\n bag.addToBag('Url', url);\r\n const currentProcessName = TelemetryConstants.FXP_TELEMETRY_BASE_NAME + '.getBasicProfileByAliasIncludeInActiveUser';\r\n const eventData = new SystemEvent(currentProcessName, ComponentType.DataStore, 'User Profile api call');\r\n\r\n self.fxplogger.logSystemEvent(TelemetryConstants.FXP_TELEMETRY_BASE_NAME + \".UserProfileService.getBasicProfileByAliasIncludeInActiveUser\", eventData, bag);\r\n\r\n return self.$http.get(url);\r\n }\r\n return deferred.promise;\r\n }\r\n // get flighting context from user profile data\r\n getFlightingContext(data: any, userUpn: string): any {\r\n let roleGroupIdInternalId = CommonUtils.getPropertyValueCaseInsensitive(data, \"RoleGroupId\");\r\n if (roleGroupIdInternalId === null || roleGroupIdInternalId === undefined) {\r\n roleGroupIdInternalId = -1;\r\n }\r\n let resourceCategoryInternalId = CommonUtils.getPropertyValueCaseInsensitive(data, \"ResourceCategoryId\");\r\n if (resourceCategoryInternalId === null || resourceCategoryInternalId === undefined) {\r\n resourceCategoryInternalId = -1\r\n }\r\n let sDODomainInternalId = CommonUtils.getPropertyValueCaseInsensitive(data, \"SDODomainId\");\r\n if (sDODomainInternalId === null || sDODomainInternalId === undefined) {\r\n sDODomainInternalId = -1;\r\n }\r\n\r\n var FxpAppSettings = FxpAppSettings || window[\"FxpAppSettings\"] || {};\r\n var flightingContext = {};\r\n var opFields = FxpAppSettings.LeftNavFlightingContextProperties;\r\n var opFieldsArray = opFields.split(',');\r\n var field = \"\";\r\n\r\n flightingContext[\"RoleGroupId\"] = roleGroupIdInternalId;\r\n flightingContext[\"ResourceCategoryId\"] = resourceCategoryInternalId;\r\n flightingContext[\"SDODomainId\"] = sDODomainInternalId;\r\n flightingContext[\"userUpn\"] = userUpn;\r\n\r\n opFieldsArray.forEach(fieldName => {\r\n field = CommonUtils.getPropertyValueCaseInsensitive(data, fieldName);\r\n flightingContext[fieldName] = field;\r\n });\r\n \r\n return flightingContext;\r\n }\r\n\r\n /**\r\n * Get flighting context for logged in user\r\n * @method Fxp.Services.UserProfileService.getLoggedInUserFlighitngContext\r\n * @example Example to invoke getLoggedInUserFlighitngContext\r\n * userProfileService.getLoggedInUserFlighitngContext();\r\n */\r\n getLoggedInUserFlighitngContext(): angular.IPromise {\r\n let self = this;\r\n let deferred = this.q.defer();\r\n let flightingContext = {};\r\n this.getBasicUserProfileLoggedInUser().then(\r\n (data) => {\r\n flightingContext = self.getFlightingContext(data, self.userInfoService.getLoggedInUserUpn());\r\n deferred.resolve(flightingContext);\r\n }, (error) => {\r\n this.fxplogger.logEvent('Fxp.userProfileService.getBasicUserProfileLoggedInUser', `BasicProfile:${this.userInfoService.getLoggedInUserOID()} failed.`);\r\n deferred.reject(error);\r\n });\r\n return deferred.promise;\r\n }\r\n\r\n /**\r\n * Get flighting context for Current user\r\n * @method Fxp.Services.UserProfileService.getCurrentUserFlighitngContext\r\n * @example Example to invoke getCurrentUserFlighitngContext\r\n * userProfileService.getCurrentUserFlighitngContext();\r\n */\r\n getCurrentUserFlighitngContext(): angular.IPromise {\r\n let self = this;\r\n let deferred = this.q.defer();\r\n let flightingContext = {};\r\n this.getBasicProfileByOID(this.userInfoService.getCurrentUserOID(), null).then(\r\n (data) => {\r\n flightingContext = self.getFlightingContext(data, self.userInfoService.getCurrentUserUpn());\r\n deferred.resolve(flightingContext);\r\n }, (error) => {\r\n this.fxplogger.logEvent('Fxp.userProfileService.getBasicProfileByAlias', `BasicProfile:${this.userInfoService.getCurrentUserOID()} failed.`);\r\n deferred.reject(error);\r\n });\r\n return deferred.promise;\r\n }\r\n\r\n\r\n /**\r\n * Gets user's basic profile details by connecting to the service through the url\r\n * @method Fxp.Services.UserProfileService.getBasicProfileSvc\r\n * @param {Alias} alias an alias is the name of a user upto the symbol @ in the upn.\r\n * @param {Boolean} deferred a boolean value which is false by default.\r\n * @example Example to invoke getBasicProfileSvc\r\n * userProfileService.getBasicProfileSvc('logged in user alias', false);\r\n */\r\n private getProfileURL(userIdentifier: string, userIdentifierType: string) {\r\n var self = this;\r\n var url = '';\r\n if (self.profileApiEndpoint && userIdentifierType.toUpperCase() == \"OBJECTID\") {\r\n url = self.profileApiEndpoint + \"/profile/basic/\" + userIdentifier;\r\n\r\n }\r\n else if (self.profileApiEndpoint && userIdentifierType.toUpperCase() == \"ALIAS\") {\r\n url = self.profileApiEndpoint + \"/profile/\" + userIdentifier;\r\n }\r\n\r\n else {\r\n //call graph API\r\n url = self.graphAPIProfileUrl + ApplicationConstants.GraphApiProfileUrl;\r\n }\r\n return url;\r\n }\r\n private getBasicProfileSvc(userIdentifier: string, parentDeferred: any, showBanner?: boolean): IHttpPromise {\r\n let self = this;\r\n var userIdentifierType = CommonUtils.isGuid(userIdentifier) ? \"objectid\" : \"alias\";\r\n let url = this.getProfileURL(userIdentifier, userIdentifierType);\r\n let deferred = parentDeferred || self.q.defer();\r\n\r\n if (self.msalAuthenticationService.accessTokenRequestInProgress(url)) {\r\n self.iUCount++;\r\n if (self.iUCount == 5) {\r\n self.fxplogger.logError(self.telemetrySource, self.rootScope.fxpUIConstants.UIMessages.AADAuthFailureError.ErrorMessageTitle, ErrorCodes.GetBasicProfile_TokenNotFound, null, null, null, null, ErrorSeverityLevel.Medium);\r\n self.fxpMessageSvc.addMessage(self.rootScope.fxpUIConstants.UIMessages.AADAuthFailureError.ErrorMessage, FxpConstants.messageType.error);\r\n return deferred.promise;\r\n }\r\n self.timeout(function () {\r\n self.getBasicProfileSvc(userIdentifier, deferred, showBanner);\r\n }, self.sleepInterval);\r\n }\r\n else {\r\n self.iUCount = 0;\r\n self.fxplogger.stopTrackPerformance(PerfMarkers.AdalTimeGetBasicProfile);\r\n let bag = this.fxplogger.createPropertyBag();\r\n bag.addToBag('Url', url);\r\n let currentProcessName = TelemetryConstants.FXP_TELEMETRY_PLATFORM_BOOTSTRAP + '.Authorization.FetchBasicProfile';\r\n let eventData = new SystemEvent(currentProcessName, ComponentType.DataStore, 'Basic Profile api call');\r\n\r\n bag.addToBag(TelemetryConstants.CLASSNAME, \"UserProfileService\");\r\n bag.addToBag(TelemetryConstants.METHODNAME, \"getBasicProfileSvc\");\r\n self.fxplogger.logSystemEvent(TelemetryConstants.FXP_TELEMETRY_BASE_NAME + \".UserProfileService\", eventData, bag);\r\n\r\n return this.$http.get(url);\r\n }\r\n return deferred.promise;\r\n }\r\n\r\n getBasicProfile(userIdentifier: string, isRefresh: boolean, pDeferred?: any, showBanner?: boolean): angular.IPromise {\r\n let self = this;\r\n let userData = null;\r\n let receiveDate;\r\n let responseTime;\r\n let rootScope = this.rootScope;\r\n let deferred = pDeferred || this.q.defer();\r\n let telemetryContext = this.telemetryContext;\r\n showBanner = this.getShowBannerValue(showBanner);\r\n var userIdentifierType = CommonUtils.isGuid(userIdentifier) ? \"objectid\" : \"alias\";\r\n if (!isRefresh) {\r\n return self.getBasicUserProfile(deferred, showBanner);\r\n }\r\n else {\r\n let currentProcessName = TelemetryConstants.FXP_TELEMETRY_PLATFORM_BOOTSTRAP + '.Authorization.GetBasicProfileFromCache';\r\n let customProperties = self.fxplogger.createPropertyBag();\r\n customProperties.addToBag(TelemetryConstants.CLASSNAME, \"UserProfileService\");\r\n customProperties.addToBag(TelemetryConstants.METHODNAME, \"getBasicProfile\");\r\n customProperties.addToBag(userIdentifierType, userIdentifier);\r\n var localStorageProfile = this.getProfileFromLocalStorage(userIdentifier);\r\n if (localStorageProfile) {\r\n self.dispatchProfileActions(localStorageProfile, userIdentifier);\r\n self.timeout(function () {\r\n try {\r\n deferred.notify(JSON.parse(localStorageProfile));\r\n let eventData = new SystemEvent(currentProcessName, ComponentType.DataStore, 'Returned Basic Profile from browser cache');\r\n self.fxplogger.logSystemEvent(TelemetryConstants.FXP_TELEMETRY_BASE_NAME + \".UserProfileService\", eventData, customProperties);\r\n }\r\n catch (exception) {\r\n self.fxplogger.logException(currentProcessName, new Error(\"Invalid JSON in local Storage for Basic Profile\"), customProperties, null, null, ErrorSeverityLevel.Medium, ErrorCodes.ProfileService_ErrorNotifyingCachedProfile);\r\n }\r\n }, self.sleepInterval);\r\n }\r\n\r\n let sendDate = new Date();\r\n this.fxplogger.startTrackPerformance(PerfMarkers.GetBasicProfileWithAdal);\r\n this.fxplogger.startTrackPerformance(PerfMarkers.AdalTimeGetBasicProfile);\r\n self.getBasicProfileSvc(userIdentifier, false, showBanner).then(function (data) {\r\n userData = data;\r\n // Logging a metric with the response\r\n\r\n receiveDate = new Date();\r\n responseTime = receiveDate.getTime() - sendDate.getTime(); // in millisecs\r\n var propbag = self.fxplogger.createPropertyBag();\r\n propbag.addToBag(FxpConstants.metricConstants.Status, userData.status);\r\n propbag.addToBag(FxpConstants.metricConstants.StatusText, userData.statusText);\r\n\r\n propbag.addToBag(FxpConstants.metricConstants.StartTime, sendDate.toUTCString());\r\n propbag.addToBag(FxpConstants.metricConstants.EndTime, receiveDate.toUTCString());\r\n propbag.addToBag(FxpConstants.metricConstants.ServiceName, FxpConstants.metricConstants.GetBasicProfileSvcName);\r\n let url = self.getProfileURL(userIdentifier, userIdentifierType);\r\n propbag.addToBag(FxpConstants.metricConstants.ServiceURL, url);\r\n propbag.addToBag(FxpConstants.metricConstants.UserAgent, navigator.userAgent);\r\n\r\n propbag.addToBag(FxpConstants.metricConstants.SessionId, rootScope.sessionId);\r\n propbag.addToBag(userIdentifierType, userIdentifier);\r\n propbag.addToBag(FxpConstants.metricConstants.UserBusinessRole, userData.BusinessRole);\r\n propbag.addToBag(FxpConstants.metricConstants.Geography, telemetryContext.getGeography());\r\n self.fxplogger.stopTrackPerformance(PerfMarkers.GetBasicProfileWithAdal);\r\n self.fxplogger.logMetric(self.telemetrySource, FxpConstants.metricConstants.UserProfileService, responseTime, propbag);\r\n\r\n if (userData.data != undefined && userData.data != null) {\r\n userData = userData.data;\r\n if (userData.hasOwnProperty(\"CacheHit\")) {\r\n delete userData[\"CacheHit\"];\r\n }\r\n var userInfo = new UserInfo();\r\n if (self.profileApiEndpoint) {\r\n for (var attr in userData) {\r\n userInfo[attr] = userData[attr];\r\n }\r\n\r\n // Adding BusinessDomain\r\n userInfo.BusinessDomain = userData.SDODomain;\r\n userInfo.AddressBookTitleDesc = userData.AddressBookTitleDesc;\r\n //Adding RoleGrouId\r\n userInfo.RoleGroupId = userData.RoleGroupID;\r\n rootScope.BusinessRole = userInfo.BusinessRole;\r\n\r\n // Adding Email\r\n userInfo.Email = userData.EmailName;\r\n\r\n // Adding FirstName to FullName\r\n if (!CommonUtils.isNullOrEmpty(userInfo.DisplayName)) {\r\n userInfo.FullName = userInfo.DisplayName;\r\n }\r\n\r\n // Adding MiddleName to FullName\r\n if (!CommonUtils.isNullOrEmpty(userInfo.MiddleName)) {\r\n userInfo.FullName += (userInfo.FullName.length > 0 ? \" \" : \"\") + userInfo.MiddleName;\r\n }\r\n\r\n // Adding LastName to FullName\r\n if (!CommonUtils.isNullOrEmpty(userInfo.LastName)) {\r\n userInfo.FullName += (userInfo.FullName.length > 0 ? \" \" : \"\") + userInfo.LastName;\r\n }\r\n\r\n //Adding BusinessRoleDisplayName\r\n if (!CommonUtils.isNullOrEmpty(userInfo.BusinessRole)) {\r\n if (!CommonUtils.isNullOrEmpty(userInfo.Seniority)) {\r\n userInfo.BusinessRoleDisplayName = userInfo.Seniority + \" \" + userInfo.BusinessRole;\r\n }\r\n else {\r\n userInfo.BusinessRoleDisplayName = userInfo.BusinessRole;\r\n }\r\n }\r\n\r\n //Checking isDefaultProfile flag\r\n userInfo.IsDefaultProfile = false;\r\n\r\n //Checking BusinessRole and BusinessRoleId\r\n if ((userInfo.BusinessRoleId == null || userInfo.BusinessRoleId == 0) ||\r\n (CommonUtils.isNullOrEmpty(userInfo.BusinessRole))) {\r\n self.fxplogger.logError(self.telemetrySource, rootScope.fxpUIConstants.UIMessages.UserProfileBusinessRoleMissingError.ErrorMessageTitle, ErrorCodes.GetBasicProfile_BusinessRoleMissing, null, null, null, null, ErrorSeverityLevel.High);\r\n if (showBanner) {\r\n self.fxpMessageSvc.addMessage(rootScope.fxpUIConstants.UIMessages.UserProfileBusinessRoleMissingError.ErrorMessage, FxpConstants.messageType.error);\r\n }\r\n }\r\n\r\n // Adding old tenant\r\n var tenantMapping = self.fxpConfiguration.FxpAppSettings[\"UserTenantMapping\"];\r\n if (tenantMapping) {\r\n tenantMapping = JSON.parse(tenantMapping);\r\n var newTenant = userInfo.TenantName;\r\n if (tenantMapping[newTenant]) {\r\n userInfo.MappedTenantName = tenantMapping[newTenant];\r\n } else {\r\n userInfo.MappedTenantName = newTenant;\r\n }\r\n }\r\n\r\n // Checking RoleGroup\r\n if ((!userInfo.RoleGroupId || userInfo.RoleGroupId <= 0) ||\r\n (CommonUtils.isNullOrEmpty(userInfo.RoleGroupName))) {\r\n propbag = self.fxplogger.createPropertyBag();\r\n propbag.addToBag(FxpConstants.metricConstants.SessionId, rootScope.sessionId);\r\n propbag.addToBag(FxpConstants.metricConstants.TimeStamp, FxpLogHelper.getTimeStamp());\r\n //change\r\n // propbag.addToBag(FxpConstants.metricConstants.UserUPN, alias);\r\n propbag.addToBag(FxpConstants.metricConstants.UserAgent, navigator.userAgent);\r\n propbag.addToBag(FxpConstants.metricConstants.UserBusinessRole, userInfo.BusinessRole);\r\n propbag.addToBag(FxpConstants.metricConstants.Geography, telemetryContext.getGeography());\r\n self.fxplogger.logError(self.telemetrySource, rootScope.fxpUIConstants.UIMessages.UserProfileRoleGroupMissingError.ErrorMessageTitle, ErrorCodes.GetBasicProfile_RoleGroupMissing, \"\", propbag, null, null, ErrorSeverityLevel.Critical);\r\n }\r\n\r\n } else {\r\n //read data incase graph api call\r\n userInfo = self.getProfileDataFromGraphResponse(userData);\r\n }\r\n\r\n // adding user profile data to the local \r\n self.setLocalStorageProfile(userInfo);\r\n let localStorageProfile = JSON.stringify(userInfo);\r\n self.dispatchProfileActions(localStorageProfile, userIdentifier);\r\n var responseEndTime = performance.now();\r\n var responseTotalDuration = responseEndTime - self.responseStartTime;\r\n self.isBasicProfileRefreshed = true;\r\n self.rootScope.$broadcast(FxpBroadcastedEvents.OnBasicUserProfileRefresh);\r\n }\r\n else {\r\n self.fxplogger.logError(self.telemetrySource, this.rootScope.fxpUIConstants.UIMessages.UserProfileNotFoundError.ErrorMessageTitle, ErrorCodes.GetBasicProfile_ProfileNotFound, null, null, null, null, ErrorSeverityLevel.Critical);\r\n if (self.isProfileRequired && showBanner)\r\n self.fxpMessageSvc.addMessage(rootScope.fxpUIConstants.UIMessages.UserProfileNotFoundError.ErrorMessage, FxpConstants.messageType.error);\r\n }\r\n\r\n deferred.resolve(userInfo);\r\n }).catch(function (err) {\r\n self.fxplogger.stopTrackPerformance(PerfMarkers.GetBasicProfileWithAdal);\r\n self.rootScope.isBlockedCSAUser = false;\r\n\r\n if (err && err.data && err.data.ErrorCode && err.data.ErrorCode.toString() === self.fxpConfiguration.FxpAppSettings.CSAErrorCode) {\r\n self.rootScope.isBlockedCSAUser = true;\r\n }\r\n // property bag for error\r\n if (self.isProfileRequired || self.rootScope.isLoginRequired || self.rootScope.isBlockedCSAUser) {\r\n var propbag = self.fxplogger.createPropertyBag();\r\n receiveDate = new Date();\r\n responseTime = receiveDate.getTime() - sendDate.getTime(); // in millisecs\r\n propbag.addToBag(FxpConstants.metricConstants.StartTime, sendDate.toUTCString());\r\n propbag.addToBag(FxpConstants.metricConstants.EndTime, receiveDate.toUTCString());\r\n propbag.addToBag(FxpConstants.metricConstants.ServiceName, FxpConstants.metricConstants.GetBasicProfileSvcName);\r\n propbag.addToBag(FxpConstants.metricConstants.IsLoginRequired, self.rootScope.isLoginRequired);\r\n if (err != null) {\r\n propbag.addToBag(FxpConstants.metricConstants.Status, err.status);\r\n propbag.addToBag(FxpConstants.metricConstants.StatusText, err.statusText);\r\n propbag.addToBag(FxpConstants.metricConstants.ErrorUrl, err.config ? err.config.url : '');\r\n propbag.addToBag(FxpConstants.metricConstants.IsCSABlockedUser, self.rootScope.isBlockedCSAUser.toString());\r\n\r\n if (err.status == \"404\") {\r\n self.fxplogger.logEvent(`${self.telemetrySource}.getBasicProfile`, CustomEvents.ProfileNotFound, propbag);\r\n }\r\n else {\r\n self.logBasicProfileFailureError(propbag);\r\n }\r\n\r\n //Added a flag to show/hide banner. By default banner will be visible. User need to send false value to hide the flag\r\n if (showBanner && !self.rootScope.isBlockedCSAUser) {\r\n self.fxpMessageSvc.addMessage(rootScope.fxpUIConstants.UIMessages.ProfileServiceCallFailedError.ErrorMessage, FxpConstants.messageType.error);\r\n }\r\n } else {\r\n propbag.addToBag(FxpConstants.metricConstants.ServiceURL, self.getProfileURL(userIdentifier, userIdentifierType));\r\n propbag.addToBag(FxpConstants.metricConstants.ErrorText, \"Error object is null\");\r\n self.logBasicProfileFailureError(propbag);\r\n }\r\n deferred.reject(err);\r\n }\r\n else {\r\n var userInfo = self.getDeafultUserInfo();\r\n self.isBasicProfileRefreshed = true;\r\n self.setLocalStorageProfile(userInfo);\r\n let localStorageProfile = JSON.stringify(userInfo);\r\n self.dispatchProfileActions(localStorageProfile, userIdentifier);\r\n deferred.resolve(userInfo);\r\n }\r\n });\r\n }\r\n\r\n return deferred.promise;\r\n }\r\n private setLocalStorageProfile(profile: UserInfo) {\r\n let alias = profile.Alias;\r\n let OID = profile.AadObjectId;\r\n let localStorageProfile = JSON.stringify(profile);\r\n if (!CommonUtils.isNullOrEmpty(alias))\r\n localStorage[CommonUtils.getSessionStorageUserInfoKey(alias)] = localStorageProfile;\r\n if (!CommonUtils.isNullOrEmpty(OID))\r\n localStorage[CommonUtils.getSessionStorageUserInfoKey(OID)] = localStorageProfile;\r\n }\r\n\r\n // need to save for both so will work always both here\r\n private getProfileFromLocalStorage(userIdentifier) {\r\n if (!userIdentifier)\r\n return null;\r\n\r\n let profileStorageKey = CommonUtils.getSessionStorageUserInfoKey(userIdentifier);\r\n if (!profileStorageKey)\r\n return null;\r\n \r\n var localStorageProfile = localStorage[profileStorageKey];\r\n return localStorageProfile;\r\n }\r\n\r\n private dispatchProfileActions(localStorageProfile: any, userIdentifier: string) {\r\n let self = this;\r\n if (userIdentifier == self.userInfoService.getLoggedInUserOID() || userIdentifier == self.loggedInUserAlias) {\r\n //dispatch action with payload as localStorage\r\n self.globalStoreService.DispatchGlobalAction(\"Platform\", AddLoggedInUserProfile(JSON.parse(localStorageProfile)));\r\n this.setLoggedInUser(localStorageProfile);\r\n }\r\n if (userIdentifier == self.userInfoService.getCurrentUserOID() || userIdentifier == self.currentUserAlias)\r\n {\r\n self.globalStoreService.DispatchGlobalAction(\"Platform\", AddCurrentUserProfile(JSON.parse(localStorageProfile)));\r\n \r\n }\r\n }\r\n\r\n /**\r\n * Logs exception occured in get basic profile\r\n * @method Fxp.Services.UserProfileService.logBasicProfileFailureError\r\n * @param {object} propbag contains all property bag values.\r\n * userProfileService.logBasicProfileFailureError(propbag);\r\n */\r\n logBasicProfileFailureError(propbag: LogPropertyBag): void {\r\n var self = this;\r\n self.fxplogger.logError(self.telemetrySource, self.rootScope.fxpUIConstants.UIMessages.ProfileServiceCallFailedError.ErrorMessageTitle, ErrorCodes.BasicProfile_UnknownError, null, propbag, null, null, ErrorSeverityLevel.Critical);\r\n }\r\n\r\n /**\r\n * Gets logged in user's basic profile details by getBasicUserProfileLoggedInUser to the service through the url\r\n * @method Fxp.Services.UserProfileService.getBasicUserProfile\r\n * @example Example to invoke getBasicUserProfileLoggedInUser\r\n * userProfileService.getBasicUserProfileLoggedInUser();\r\n */\r\n getBasicUserProfileLoggedInUser(): angular.IPromise {\r\n return this.getBasicProfileByOID(this.userInfoService.getLoggedInUserOID(), null);\r\n }\r\n\r\n setLoggedInUser(localStorageProfile) {\r\n let userProfile = JSON.parse(localStorageProfile);\r\n this.loggedInUserAlias = userProfile.alias;\r\n this.userInfoService.setLoggedInUser(this.loggedInUserAlias);\r\n if (!this.isObo())\r\n {\r\n this.userInfoService.setCurrentUser(this.loggedInUserAlias);\r\n this.setCurrentUser(this.loggedInUserAlias);\r\n }\r\n }\r\n\r\n setCurrentUser(alias: string) {\r\n if (alias) {\r\n this.userAlias = alias;\r\n this.currentUserAlias = alias;\r\n this.userInfoService.setCurrentUser(alias);\r\n }\r\n }\r\n\r\n isObo(): boolean {\r\n return this.userInfoService.isActingOnBehalfOf();\r\n }\r\n /**\r\n * Returns search results from the profile API for the specified search string\r\n * @method Fxp.Services.UserProfileService.searchProfile\r\n * @param {string} searchString search string for a user alias.\r\n * @example Example to invoke searchProfile\r\n * userProfileService.searchProfile('search string');\r\n */\r\n searchProfile(searchString, parentDiffered?) {\r\n var self = this;\r\n var url = self.searchProfileApiEndpoint + '/profile/searchprofile?searchText=' + searchString;\r\n\r\n var deferred = parentDiffered || self.q.defer();\r\n\r\n if (self.msalAuthenticationService.accessTokenRequestInProgress(url)) {\r\n self.iUCount++;\r\n if (self.iUCount == 5) {\r\n self.fxplogger.logError(self.telemetrySource, self.rootScope.fxpUIConstants.UIMessages.AADAuthFailureError.ErrorMessageTitle, ErrorCodes.SearchProfile_TokenMissing, null, null, null, null, ErrorSeverityLevel.Medium);\r\n self.fxpMessageSvc.addMessage(self.rootScope.fxpUIConstants.UIMessages.AADAuthFailureError.ErrorMessage, FxpConstants.messageType.error);\r\n return deferred.promise;\r\n }\r\n self.timeout(function () {\r\n self.searchProfile(searchString, deferred);\r\n }, self.sleepInterval);\r\n }\r\n else {\r\n self.iUCount = 0;\r\n let bag = this.fxplogger.createPropertyBag();\r\n bag.addToBag('Url', url);\r\n //this.fxplogger.logEvent('Fxp.userProfileService.getBasicProfileSvc', 'GetBasicProfile:StartingServiceCall', bag);\r\n const currentProcessName = TelemetryConstants.FXP_TELEMETRY_BASE_NAME + '.UserProfileSearch';\r\n const eventData = new SystemEvent(currentProcessName, ComponentType.DataStore, 'User Profile api call');\r\n\r\n self.fxplogger.logSystemEvent(TelemetryConstants.FXP_TELEMETRY_BASE_NAME + \".UserProfileService.searchProfile\", eventData, bag);\r\n\r\n return (window[\"tenantConfiguration\"].ProfileStore && window[\"tenantConfiguration\"].ProfileStore.SearchAPIHeaders) ?\r\n self.$http.get(url, { headers: window[\"tenantConfiguration\"].ProfileStore.SearchAPIHeaders }) : self.$http.get(url);\r\n }\r\n return deferred.promise;\r\n }\r\n\r\n\r\n\r\n private getProfileDataFromGraphResponse(userData: any): any {\r\n var userInfo = new UserInfo();\r\n userInfo.FirstName = userData.givenName;\r\n userInfo.LastName = userData.surname;\r\n userInfo.FullName = userData.displayName;\r\n userInfo.Email = userData.userPrincipalName;\r\n userInfo.DisplayName = userData.displayName;\r\n userInfo.Alias = userData.mailNickname;\r\n userInfo.PersonnelNumber = userData.immutableId;\r\n userInfo.BusinessRole = userData.jobTitle || {};\r\n userInfo.BusinessRoleDisplayName = userData.jobTitle || {};\r\n userInfo.IsDefaultProfile = false;\r\n\r\n for (let item in userData) {\r\n if (item.indexOf(\"ReportsToFullName\") > 0) {\r\n userInfo.ReportsToDisplayName = userData[item]\r\n userInfo.ReportsToFullName = userInfo.ReportsToDisplayName;\r\n break;\r\n }\r\n }\r\n return userInfo;\r\n }\r\n private getDeafultUserInfo() {\r\n var aadBasicUserInfo = this.getAADBasicInfoFromLocalStorage();\r\n var userInfo = new UserInfo();\r\n if (aadBasicUserInfo === null) {\r\n userInfo.Email = \"\";\r\n userInfo.FirstName = \"\";\r\n userInfo.LastName = \"\";\r\n userInfo.FullName = \"\";\r\n userInfo.DisplayName = \"\";\r\n }\r\n else {\r\n console.log('Fetching user info from AAD user info.')\r\n var userProfileAAD = aadBasicUserInfo['profile'];\r\n userInfo.Email = userProfileAAD['upn'];\r\n userInfo.FirstName = userProfileAAD['given_name'];\r\n userInfo.LastName = userProfileAAD['family_name'];\r\n userInfo.FullName = userProfileAAD['name'];\r\n userInfo.DisplayName = userProfileAAD['name'];\r\n }\r\n\r\n userInfo.IsDefaultProfile = true;\r\n userInfo.BusinessRole = \"0\";\r\n userInfo.BusinessRoleDisplayName = \"0\";\r\n\r\n this.rootScope.$broadcast(CustomEvents.OnProfileFromGraphAPI);\r\n this.rootScope.isBotEnabled = false;\r\n\r\n return userInfo;\r\n }\r\n\r\n private getAADBasicInfoFromLocalStorage(): any {\r\n return angular.fromJson(localStorage.getItem(\"AADBasicInfo\"));\r\n }\r\n\r\n private getShowBannerValue(showBanner: boolean) {\r\n //Setting the showBanner variable to true when the value is undefined. Banner will be showing by default \r\n return (showBanner === false) ? false : true;\r\n }\r\n}\r\n","export class EnvironmentData {\r\n\tpublic EnvironmetName;\r\n\tpublic ServiceOffering;\r\n\tpublic ServiceLine;\r\n\tpublic Service;\r\n\tpublic ComponentId;\r\n\tpublic ComponentName;\r\n\tpublic AppName;\r\n\tpublic IctoId;\r\n\tpublic BusinessProcessName;\r\n\r\n\tconstructor(private environmentName: string, private serviceOffering: string, private serviceLine: string, private service: string, private componentId: string, private componentName: string, private appName: string, private ictoId: string, private businessProcessName: string) {\r\n\t\tthis.EnvironmetName = environmentName;\r\n\t\tthis.ServiceOffering = serviceOffering;\r\n\t\tthis.ServiceLine = serviceLine;\r\n\t\tthis.Service = service;\r\n\t\tthis.ComponentId = componentId;\r\n\t\tthis.ComponentName = componentName;\r\n\t\tthis.AppName = appName;\r\n\t\tthis.IctoId = ictoId;\r\n\t\tthis.BusinessProcessName = businessProcessName;\r\n\t}\r\n}","export enum ErrorSeverityLevel {\r\n Low = 1, // Error in which user or workflow in not impacted.\r\n Medium = 2, // Error which can impact a feature or workflow partially but user can proceed to complete it with workarounds. \r\n High = 3, // Any error which can bring feature(s) down. \r\n Critical = 4 // Any error which can bring FxP Platform down. \r\n} ","import { ComponentType, ActionType, FeatureUsageEventV2, EventName, ActionStatus, TaskStatus, ItEventType } from '@microsoftit/telemetry-extensions-npm'\r\nexport class FeatureUsageEvent extends FeatureUsageEventV2 {\r\n constructor(featureName: string, actionType: ActionType, actionName: string, eventName: EventName, componentType: ComponentType) {\r\n super(featureName, actionType, actionName, eventName, componentType);\r\n }\r\n \r\n public getTaskName(): string {\r\n return this.TaskName;\r\n }\r\n public setTaskName(value: string) {\r\n this.TaskName = value;\r\n }\r\n public getTaskStatus(): TaskStatus {\r\n return this.TaskStatus;\r\n }\r\n public setTaskStatus(value: TaskStatus) {\r\n this.TaskStatus = value;\r\n }\r\n public getCapabilityType(): string {\r\n return this.CapabilityType;\r\n }\r\n public setCapabilityType(value: string) {\r\n this.CapabilityType = value;\r\n }\r\n public getEmbeddedExpereinceName(): string {\r\n return this.EmbeddedExpereinceName;\r\n }\r\n public setEmbeddedExpereinceName(value: string) {\r\n this.EmbeddedExpereinceName = value;\r\n }\r\n public setIsEmbeddedExperience(value: boolean) {\r\n this.IsEmbeddedExperience = value;\r\n }\r\n public getIsEmbeddedExperience(): boolean {\r\n return this.IsEmbeddedExperience;\r\n }\r\n public getEventName(): EventName {\r\n return this.EventName;\r\n }\r\n public getEventType(): ItEventType {\r\n return this.EventType;\r\n }\r\n public setEventType(value: ItEventType) {\r\n this.EventType = value;\r\n }\r\n public getDuration(): number {\r\n return this.Duration;\r\n }\r\n public setDuration(value: number) {\r\n this.Duration = value;\r\n }\r\n public getFeatureName(): string {\r\n return this.FeatureName;\r\n }\r\n public getSubFeatureName(): string {\r\n return this.SubFeatureName;\r\n }\r\n public setSubFeatureName(value: string) {\r\n this.SubFeatureName = value;\r\n }\r\n public getActionName(): string {\r\n return this.ActionName;\r\n }\r\n public getActionType(): ActionType {\r\n return this.ActionType;\r\n }\r\n public setExperimentationConfigId(value: string) {\r\n this.ExperimentationConfigId = value;\r\n }\r\n public getExperimentationConfigId(): string {\r\n return this.ExperimentationConfigId;\r\n }\r\n public setExperimentationConfigName(value: string) {\r\n this.ExperimentationConfigName = value;\r\n }\r\n public getExperimentationConfigName(): string {\r\n return this.ExperimentationConfigName;\r\n }\r\n public setExperimentationConfigResult(value: boolean) {\r\n this.ExperimentationConfigResult = value;\r\n }\r\n public getExperimentationConfigResult(): boolean {\r\n return this.ExperimentationConfigResult;\r\n }\r\n public getTemplateType(): string {\r\n return this.TemplateType;\r\n }\r\n public getComponentType(): ComponentType {\r\n return this.ComponentType;\r\n }\r\n public getUserRoleName(): string {\r\n return this.UserRoleName;\r\n }\r\n public setUserRoleName(value: string) {\r\n this.UserRoleName = value;\r\n }\r\n public getStartDateTime(): Date {\r\n return this.StartDateTime;\r\n }\r\n public setStartDateTime(value: Date) {\r\n this.StartDateTime = value;\r\n }\r\n public getEndDateTime(): Date {\r\n return this.EndDateTime;\r\n }\r\n public setEndDateTime(value: Date) {\r\n this.EndDateTime = value;\r\n }\r\n public getComponentUri(): string {\r\n return this.ComponentUri;\r\n }\r\n public setComponentUri(value: string) {\r\n this.ComponentUri = value;\r\n }\r\n public getEntityId(): string {\r\n return this.EntityId;\r\n }\r\n public setEntityId(value: string) {\r\n this.EntityId = value;\r\n }\r\n public getActionStatus() {\r\n return this.ActionStatus;\r\n }\r\n public setActionStatus(status: ActionStatus) {\r\n this.ActionStatus = status;\r\n }\r\n}","import { LogPropertyBag } from \"./LogPropertyBag\";\r\nimport { LogMetricBag } from \"./LogMetricBag\";\r\nimport { CommonUtils } from \"../utils/CommonUtils\";\r\nimport { TelemetryContext } from \"./telemetrycontext\";\r\nimport { EnvironmentData } from \"./TelemetryConst\";\r\n\r\n/**\r\n * @application Fxp\r\n */\r\n/**\r\n * @module Fxp.Telemetry.Helper\r\n */\r\n\r\n/**\r\n * Telmetry Log helper Class.\r\n * @class Fxp.Telemetry.Helper.FxpLogHelper\r\n * @classdesc Telmetry Log helper Class\r\n * @example \r\n * //To Use Telemetry.Helper.FxpLogHelper\r\n * var telemetryData = new Fxp.Telemetry.Helper.FxpLogHelper();\r\n */\r\nexport class FxpLogHelper {\r\n\t/**\r\n\t* Method Create Property Bag Object.\r\n\t* @method Fxp.Telemetry.Helper.FxpLogHelper().createPropertyBag()\r\n\t* @example Example to use new Fxp.Telemetry.Helper.FxpLogHelper().createPropertyBag()\r\n\t*/\r\n\tstatic createPropertyBag(): LogPropertyBag {\r\n\t\treturn new LogPropertyBag();\r\n\t}\r\n\r\n\t/**\r\n\t* Method Create Metric Bag Object.\r\n\t* @method Fxp.Telemetry.Helper.FxpLogHelper().createMetricBag()\r\n\t* @example Example to use new Fxp.Telemetry.Helper.FxpLogHelper().createMetricBag()\r\n\t*/\r\n\tstatic createMetricBag(): LogMetricBag {\r\n\t\treturn new LogMetricBag();\r\n\t}\r\n\r\n\t/**\r\n\t* Method to Get Current Time Stamp\r\n\t* @method Fxp.Telemetry.Helper.FxpLogHelper().getTimeStamp()\r\n\t* @example Example to use new Fxp.Telemetry.Helper.FxpLogHelper().getTimeStamp()\r\n\t*/\r\n\tstatic getTimeStamp(): string {\r\n\t\tvar currentDate = new Date();\r\n\t\tvar day: any = currentDate.getDate(),\r\n\t\t\tmonth: any = currentDate.getMonth() + 1,\r\n\t\t\tyear: any = currentDate.getFullYear(),\r\n\t\t\thours: any = currentDate.getHours(),\r\n\t\t\tminutes: any = currentDate.getMinutes(),\r\n\t\t\tseconds: any = currentDate.getSeconds();\r\n\t\tif (day < 10)\r\n\t\t\tday = \"0\" + day;\r\n\t\tif (month < 10)\r\n\t\t\tmonth = \"0\" + month;\r\n\t\tif (minutes < 10)\r\n\t\t\tminutes = \"0\" + minutes;\r\n\t\tif (seconds < 10)\r\n\t\t\tseconds = \"0\" + seconds;\r\n\t\tvar suffix = \"AM\";\r\n\t\tif (hours >= 12) {\r\n\t\t\tsuffix = \"PM\";\r\n\t\t\thours = hours - 12;\r\n\t\t}\r\n\t\tif (hours == 0) {\r\n\t\t\thours = 12;\r\n\t\t}\r\n\t\tif (hours < 10)\r\n\t\t\thours = \"0\" + hours;\r\n\t\treturn day + '/' + month + '/' + year + ' ' + hours + ':' + minutes + ':' + seconds + ' ' + suffix;\r\n\t}\r\n\r\n\t/**\r\n\t* Method to Get Telemetry Unique Key\r\n\t* @method Fxp.Telemetry.Helper.FxpLogHelper().getTelemetryUniqueKey()\r\n\t* @example Example to use new Fxp.Telemetry.Helper.FxpLogHelper().getTelemetryUniqueKey()\r\n\t*/\r\n\tstatic getTelemetryUniqueKey(): string {\r\n\t\tvar date = new Date();\r\n\r\n\t\treturn date.getFullYear().toString() +\r\n\t\t\tthis.pad2(date.getMonth() + 1) +\r\n\t\t\tthis.pad2(date.getDate()) +\r\n\t\t\tthis.pad2(date.getHours()) +\r\n\t\t\tthis.pad2(date.getMinutes()) +\r\n\t\t\tthis.pad2(date.getSeconds());\r\n\t}\r\n\r\n\t/**\r\n\t* Method to Get New SessionId\r\n\t* @method Fxp.Telemetry.Helper.FxpLogHelper().getNewSessionId()\r\n\t* @example Example to use new Fxp.Telemetry.Helper.FxpLogHelper().getNewSessionId()\r\n\t*/\r\n\tpublic static getNewSessionId(): string {\r\n\t\tvar d: number = new Date().getTime();\r\n\t\tvar guid: string = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\r\n\t\t\tvar r = (d + Math.random() * 16) % 16 | 0;\r\n\t\t\td = Math.floor(d / 16);\r\n\t\t\treturn (c == 'x' ? r : (r & 0x3 | 0x8)).toString(16);\r\n\t\t});\r\n\r\n\t\treturn guid;\r\n\t}\r\n\r\n\tprivate static getAppNameFromSource(source: string): string{\r\n\t\tif (CommonUtils.isNullOrEmpty(source)) return; \r\n\t\treturn source.split('.')[0]; \r\n\t}\r\n\r\n/**\r\n * Adds environment detials to property bag\r\n * @param properties\r\n * @param transactionId\r\n */\r\n\tpublic static addEnvironmentDetails(eventProperties: LogPropertyBag, transactionId?: string, source?: string, aiInstrumentKey?: string, telemetryAppName?: string) {\r\n\t\tconst defaultAppName = \"FXP\" ;\r\n\t\tlet appName = (telemetryAppName)? telemetryAppName : null; \r\n\r\n\t\tif (!appName){\r\n\t\t\tappName = this.getAppNameFromSource(source);\r\n\t\t}\r\n\r\n\t\tif (!appName){\r\n\t\t\tappName = defaultAppName; \r\n\t\t}\r\n\r\n\t\t//get Environment details based on appName if environment details is not avilable then getting fxp environment details \r\n\t\tconst environmentData = TelemetryContext.CurrentContext.getEnvironmentDetails(appName) || TelemetryContext.CurrentContext.getEnvironmentDetails(defaultAppName);\r\n\t\tconst globalProperties = TelemetryContext.CurrentContext.getGlobalPropertyBag();\r\n\t\teventProperties.addRange(globalProperties);\r\n\t\tif (environmentData != null) {\r\n\t\t\teventProperties.addToBag(EnvironmentData.ENVIRONMENTNAME, environmentData.EnvironmetName || '');\r\n\t\t\teventProperties.addToBag(EnvironmentData.SERVICEOFFERING, environmentData.ServiceOffering || '');\r\n\t\t\teventProperties.addToBag(EnvironmentData.SERVICELINE, environmentData.ServiceLine || '');\r\n\t\t\teventProperties.addToBag(EnvironmentData.SERVICE, environmentData.Service || '');\r\n\t\t\teventProperties.addToBag(EnvironmentData.COMPONENTID, environmentData.ComponentId || '');\r\n\t\t\teventProperties.addToBag(EnvironmentData.COMPONENTNAME, environmentData.ComponentName || '');\r\n\t\t\teventProperties.addToBag(EnvironmentData.XCV, transactionId || '');\r\n\t\t\teventProperties.addToBag(EnvironmentData.AIAPPKEY, aiInstrumentKey || '');\r\n\t\t\teventProperties.addToBag(EnvironmentData.LOGGEDFROM, environmentData.AppName || '');\r\n\t\t\teventProperties.addToBag(EnvironmentData.ICTOID, environmentData.IctoId || '');\r\n\t\t\teventProperties.addToBag(EnvironmentData.BUSINESSPROCESSNAME, environmentData.BusinessProcessName || '');\r\n\t\t\teventProperties.addToBag(EnvironmentData.BuildNumber, window[\"FxpAppSettings\"].BuildNumber);\r\n\t\t}\r\n\t\treturn eventProperties;\r\n\t}\r\n\r\n\tprivate static pad2(n: number): string {\r\n\t\treturn n < 10 ? '0' + n.toString() : n.toString()\r\n\t}\r\n}\r\n","/**\r\n * A service to connect to FxpLoggerServiceExtension to log businessprocess,featureusage,systemevent etc.,\r\n * @class FxpTelemetry.FxpLoggerServiceExtension\r\n * @classdesc A service to connect to FxpLoggerServiceExtension to log businessprocess,featureusage,systemevent etc.,\r\n * @example Example to create an instance of FxpLoggerServiceExtension service\r\n * //Initializing Fxp FxpLoggerServiceExtension Service\r\n * angular.module('FxPApp').controller('AppController', ['FxpLoggerServiceExtension', AppController]);\r\n * function AppController(FxpLoggerServiceExtension){ FxpLoggerServiceExtension.logBusinessProcessEvent(); }\r\n */\r\n\r\nimport { LogPropertyBag } from './LogPropertyBag';\r\nimport { LogMetricBag } from './LogMetricBag';\r\nimport { BusinessProcessEvent } from './BusinessProcessEvent';\r\nimport { FeatureUsageEvent } from './FeatureUsageEvent';\r\nimport { SystemEvent } from './SystemEvent';\r\nimport { GlobalExceptionHandler } from './GlobalExceptionHandler';\r\nimport { AppInsights, Correlator } from \"@microsoftit/telemetry-extensions-npm/\";\r\n\r\nexport class FxpLoggerServiceExtension {\r\n\t//private msitInstance: any;\r\n\tprivate appIngishtInstance: AppInsights;\r\n\tprivate static fxpLoggerServiceExtension: FxpLoggerServiceExtension;\r\n\r\n\tconstructor() {\r\n\t}\r\n\r\n\t/**\r\n\t* Diagnostic method to log business process events\r\n\t* @method FxpTelemetry.FxpLoggerServiceExtension#init\r\n\t* @param {AppInsights} appIngisht - Application Insight Instance\r\n\t*/\r\n\tinit(appIngisht: AppInsights){\r\n\t\tthis.appIngishtInstance = appIngisht; \r\n\t\treturn this;\r\n\t}\r\n\r\n\tstatic getInstance() {\r\n\t\tif (!this.fxpLoggerServiceExtension){\r\n\t\t\tthis.fxpLoggerServiceExtension = new FxpLoggerServiceExtension(); \r\n\t\t}\r\n\t\treturn this.fxpLoggerServiceExtension; \r\n\t}\r\n\r\n\t/**\r\n\t* Diagnostic method to log business process events\r\n\t* @method FxpTelemetry.fxpLogger#logBusinessProcessEvent\r\n\t* @param {string} source - Source\r\n\t* @param {FeatureUsageEvent} eventData - event data that is to be logged\r\n\t* @param {Fxp.Telemetry.Helper.LogPropertyBag} properties - log properties\r\n\t* @param {Fxp.Telemetry.Helper.LogMetricBag} measurements - log metrics\r\n\t*/\r\n\tlogBusinessProcessEvent(eventData: BusinessProcessEvent, properties?: LogPropertyBag,\r\n\t\tmeasurements?:LogMetricBag) {\r\n\t this.appIngishtInstance.TrackBusinessProcessEvent(eventData, properties == null ? null : properties.getItems(), measurements == null ? null : measurements.getItems());\r\n\t}\r\n\r\n\t/**\r\n\t* Diagnostic method to log Feature Usage events\r\n\t* @method FxpTelemetry.FxpLoggerServiceExtension#logFeatureUsageEvent\r\n\t* @param {string} source - Source\r\n\t* @param {FeatureUsageEvent} eventData - event data that is to be logged\r\n\t* @param {Fxp.Telemetry.Helper.LogPropertyBag} properties - log properties\r\n\t* @param {Fxp.Telemetry.Helper.LogMetricBag} measurements - log metrics\r\n\t*/\r\n\tlogFeatureUsageEvent(eventData: FeatureUsageEvent, properties?: LogPropertyBag,\r\n\t\tmeasurements?: LogMetricBag) {\r\n\t\tthis.appIngishtInstance.TrackFeatureUsageEventV2(eventData, properties == null ? null : properties.getItems(), measurements == null ? null : measurements.getItems());\r\n\t}\r\n\r\n\tstartFeatureUsageEvent(featureUsageEvent: FeatureUsageEvent){\r\n this.appIngishtInstance.StartFeatureUsageEvent(featureUsageEvent); \r\n\t}\r\n\t\r\n endFeatureUsageEvent (featureUsageEvent: FeatureUsageEvent, properties?: LogPropertyBag){\r\n this.appIngishtInstance.EndFeatureUsageEvent(featureUsageEvent, properties == null ? null : properties.getItems()); \r\n }\r\n\r\n\t/**\r\n\t* Diagnostic method to log Track System events\r\n\t* @method FxpTelemetry.FxpLoggerServiceExtension#logTrackSystemEvent\r\n\t* @param {string} source - Source\r\n\t* @param {FeatureUsageEvent} eventData - event data that is to be logged\r\n\t* @param {Fxp.Telemetry.Helper.LogPropertyBag} properties - log properties\r\n\t* @param {Fxp.Telemetry.Helper.LogMetricBag} measurements - log metrics\r\n\t*/\r\n\tlogTrackSystemEvent(eventData: SystemEvent, properties?: LogPropertyBag,\r\n\t\tmeasurements?: LogMetricBag) {\r\n\t\tthis.appIngishtInstance.TrackSystemEvent(eventData, properties == null ? null : properties.getItems(), measurements == null ? null : measurements.getItems());\r\n\t}\r\n\t\r\n}","import { showSystemDownOverlay } from \"../utils/systemDownOverlay\";\r\nimport { TelemetryConstants } from \"./TelemetryConst\";\r\nimport { CommonUtils } from \"../utils/CommonUtils\";\r\nimport { LogPropertyBag } from \"./LogPropertyBag\";\r\nimport { FxpLoggerService } from \"./fxpLogger\";\r\n\r\nexport class GlobalExceptionHandler {\r\n\r\n\t\r\n\tprivate static telemetrySource = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.GlobalExceptionHandler`;\r\n\t\r\n\tprivate static get FxPLoggerService(): FxpLoggerService {\r\n\t\treturn FxpLoggerService.getInstance();\r\n\t}\r\n\r\n\t\r\n\t\r\n\t/**\r\n * @method Fxp.GlobalExceptionHandler.logFxpBootFailure to log Global Event when Fxp App Boot Fails and redirect to System down page.\r\n * @param {any} properties - extra details which needs to be logged.\r\n * @param {string} source - source from where it is triggered.\r\n * @param {boolean} isDefaultPropertiesAvailable flag to check if default parameters are passed or not\r\n * @param {boolean} headerText for system down page.\r\n * @param {boolean} descriptionText for system down page.\r\n */\r\n\tstatic logFxpBootFailure(properties: LogPropertyBag, source: string, headerText: string, descriptionText: string, pageTitle: string, isCSABlockedUser: boolean = false) {\r\n\t\tconst eventName = `${TelemetryConstants.FXP_TELEMETRY_PLATFORM_BOOTSTRAP}.FxPBootAppFailure`;\r\n\t\tconst sourceName = CommonUtils.isNullOrEmpty(source)? this.telemetrySource: source; \r\n\t\t\r\n\t\tif (!properties) {\r\n\t\t\tproperties = this.FxPLoggerService.createPropertyBag();\r\n\t\t}\r\n\t\tif (!isCSABlockedUser){\r\n\t\t\tproperties.addToBag('Reason', 'Failed to boot FxP App');\r\n\t\t}\r\n\t\telse {\r\n\t\t\tproperties.addToBag('Reason', 'CSA Blocked Profile');\r\n\t\t}\r\n\t\tthis.FxPLoggerService.logEvent(sourceName, eventName, properties); \r\n\t\tshowSystemDownOverlay(headerText, descriptionText, pageTitle, undefined, undefined, !isCSABlockedUser);\r\n\t}\r\n}\r\n","export class LogMetricBag {\r\n\tprivate metricBagInternal: any = {};\r\n\tconstructor() {\r\n\t}\r\n\r\n\taddToBag(key: string, value: number) {\r\n\t\tthis.metricBagInternal[key] = value;\r\n\t}\r\n\r\n\tgetItems() {\r\n\t\treturn this.metricBagInternal;\r\n\t}\r\n}\r\n","import { CommonUtils } from \"../utils/CommonUtils\";\r\n\r\nexport class LogPropertyBag {\r\n\tprivate propBagInternal: any = {};\r\n\tconstructor() {\r\n\t}\r\n\r\n\taddToBag(key: string, value: string): void {\r\n\t\tif(CommonUtils.isNullOrEmpty(value)){\r\n\t\t\tthis.propBagInternal[key] = value;\r\n\t\t}\r\n\t\telse if(CommonUtils.isObject(value)){\r\n\t\t\tlet stringVal = CommonUtils.objectToString(value);\r\n\t\t\tif(!CommonUtils.isNullOrEmpty(stringVal)){\r\n\t\t\t\tthis.propBagInternal[key] = CommonUtils.removePII(stringVal);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.propBagInternal[key] = CommonUtils.removePII(String(value));\r\n\t\t}\r\n\t}\r\n\tgetItems(): any {\r\n\t\treturn this.propBagInternal;\r\n\t}\r\n\taddRange(propertyBag: LogPropertyBag) {\r\n\t\tvar properties = propertyBag.getItems();\r\n\r\n\t\tfor (var property in properties) {\r\n\t\t\tthis.addToBag(property, properties[property]);\r\n\t\t}\r\n\t}\r\n\tremoveFromBag(key: string) {\r\n\t\tdelete this.propBagInternal[key];\r\n\t}\r\n\tgetValue(key: string){\r\n\t\treturn this.propBagInternal[key];\r\n\t}\r\n\r\n}\r\n","\r\nimport * as MsitTelemetry from '@microsoftit/telemetry-extensions-npm';\r\n\r\nexport class SystemEvent extends MsitTelemetry.SystemEvent {\r\n \r\n\tconstructor(eventName: string, componentType: MsitTelemetry.ComponentType, systemMessage: string) {\r\n\t\tsuper(eventName, componentType, systemMessage);\r\n\t}\r\n}","/**\r\n * Defines telemetry constants\r\n * @class Fxp.common.Telemetry\r\n */\r\nexport class TelemetryConstants {\r\n\tpublic static PAGENAME: string = 'PageName';\r\n\tpublic static PAGEVISITED: string = 'PageVisited';\r\n\tpublic static URL: string = 'Url';\r\n\tpublic static Duration: string = 'Duration';\r\n\tpublic static ERRORPREFIX: string = 'Error in fxp logger : ';\r\n\tpublic static CLASSNAME: string = 'ClassName';\r\n\tpublic static METHODNAME: string = \"MethodName\";\r\n\tpublic static FXP_TELEMETRY_BASE_NAME = 'FxpPlatform';\r\n\tpublic static FXP_TELEMETRY_PLATFORM_BOOTSTRAP = \"FxpPlatform.PlatformBootstrap\"\r\n\tpublic static USER_ALIAS = \"alias\";\r\n\tpublic static LOGGING_SOURCE = 'LoggingSource'; \r\n}\r\n\r\nexport class TelemetryEventType {\r\n\tpublic static AIFeatureUsageEvent: string = 'AI.FeatureUsageEvent';\r\n\tpublic static AIBusinessProcessEvent: string = 'AI.BusinessProcessEvent';\r\n}\r\n\r\nexport class TelemetryConfigDefaults {\r\n\tpublic static InstrumentationKey: string = 'bdacee2d-2b6a-41b6-8454-f0e155db2721';\r\n\tpublic static EndPointUrl: string = '';\r\n}\r\n\r\n/**\r\n* Defines trackinglevel constants\r\n* @class Fxp.common.TracingLevel\r\n*/\r\nexport class TracingLevel {\r\n\t/** \r\n\t* @member {string} Fxp.common.TracingLevel#ERROR   \r\n\t*/\r\n\tpublic static ERROR: string = 'Error';\r\n\r\n\t/** \r\n * @member {string} Fxp.common.TracingLevel#ERRORWITHMETRIC   \r\n */\r\n\tpublic static Metric: string = 'Metric';\r\n\r\n\t/** \r\n * @member {string} Fxp.common.TracingLevel#WARNING   \r\n */\r\n\tpublic static WARNING: string = 'Warning';\r\n\r\n\t/** \r\n * @member {string} Fxp.common.TracingLevel#WARNING   \r\n */\r\n\tpublic static TRACE: string = 'Trace';\r\n\r\n\t/** \r\n * @member {string} Fxp.common.TracingLevel#INFORMATION   \r\n */\r\n\tpublic static INFORMATION: string = 'Information';\r\n\r\n\t/** \r\n * @member {string} Fxp.common.TracingLevel#CUSTOMEVENT\r\n */\r\n\tpublic static CUSTOMEVENT: string = 'CustomEvent';\r\n}\r\n\r\nexport enum PouchSyncMode {\r\n\tPush,\r\n\tPull,\r\n\tBoth,\r\n\tNone\r\n}\r\n\r\nexport enum DiagnosticLevel {\r\n\tOff = 0,\r\n\tError = 1,\r\n\tWarning = 2,\r\n\tInfo = 3,\r\n\tVerbose = 4\r\n}\r\n\r\nexport class EventDataProperties {\r\n\tpublic static ACTIONURI: string = 'ActionUri';\r\n\tpublic static APPACTION: string = 'AppAction';\r\n\tpublic static COMPONENTTYPE: string = 'ComponentType';\r\n\tpublic static EVENTTYPE: string = 'EventType';\r\n\tpublic static TARGETENTITYKEY: string = 'TargetEntityKey';\r\n\tpublic static USERROLENAME: string = 'UserRoleName';\r\n\tpublic static XCV: string = 'Xcv';\r\n\tpublic static COMPONENTURI: string = 'ComponentUri';\r\n\tpublic static DURATION: string = 'Duration';\r\n}\r\n\r\nexport class EnvironmentData {\r\n\tpublic static ENVIRONMENTNAME: string = 'EnvironmentName';\r\n\tpublic static SERVICEOFFERING: string = 'ServiceOffering';\r\n\tpublic static SERVICELINE: string = 'ServiceLine';\r\n\tpublic static SERVICE: string = 'Service';\r\n\tpublic static COMPONENTID: string = 'ComponentId';\r\n\tpublic static COMPONENTNAME: string = 'ComponentName';\r\n\tpublic static XCV: string = 'Xcv';\r\n\tpublic static AIAPPKEY: string = 'AiAppKey';\r\n\tpublic static LOGGEDFROM: string = 'AppName';\r\n\tpublic static ICTOID: string = 'IctoId';\r\n\tpublic static BUSINESSPROCESSNAME: string = 'BusinessProcessName';\r\n\tpublic static BuildNumber: string = 'BuildNumber';\r\n\r\n}\r\n\r\nexport class RoleGroupDetails {\r\n\tpublic static LOGGEDINUSERROLEGROUPID: string = 'LoggedInUserRoleGroupId';\r\n\tpublic static LOGGEDINUSERROLEGROUPNAME: string = 'LoggedInUserRoleGroupName';\r\n\tpublic static OBOROLEGROUPID: string = 'OBOUserRoleGroupId';\r\n\tpublic static OBOROLEGROUPNAME: string = 'OBOUserRoleGroupName';\r\n}\r\nexport class TenantDetails {\r\n\tpublic static LOGGEDINUSERTENANTKEY: string = 'LoggedInUserTenantKey';\r\n\tpublic static LOGGEDINUSERTENANTNAME: string = 'LoggedInUserTenantName';\r\n\tpublic static OBOTENANTKEY: string = 'OBOUserTenantKey';\r\n\tpublic static OBOTENANTNAME: string = 'OBOUserTenantName';\r\n}\r\n","import { ILogger } from \"../interfaces/ILogger\";\r\nimport { IFxPService } from \"../interfaces/IFxpService\";\r\nimport { ICorrelationProvider } from \"../interfaces/ICorrelationProvider\";\r\nimport { BusinessProcessEvent } from \"./BusinessProcessEvent\";\r\nimport { FeatureUsageEvent } from \"./FeatureUsageEvent\";\r\nimport { LogMetricBag } from \"./LogMetricBag\";\r\nimport { LogPropertyBag } from \"./LogPropertyBag\";\r\nimport { SystemEvent } from \"./SystemEvent\";\r\nimport {\r\n AppInsights,\r\n Correlator,\r\n EnvironmentValues,\r\n FeatureUsageEventV2,\r\n} from \"@microsoftit/telemetry-extensions-npm\";\r\nimport { ClickAnalyticsPlugin } from \"@microsoft/applicationinsights-clickanalytics-js\";\r\nimport { TelemetryContext } from \"./telemetrycontext\";\r\nimport { FxpLogHelper } from \"./FxpLogHelper\";\r\nimport { ITelemetryContextListener } from \"../interfaces/ITelemetryContextListener\";\r\nimport { CommonUtils } from \"../utils/CommonUtils\";\r\nimport { ErrorSeverityLevel } from \"./ErrorSeverityLevel\";\r\nimport { RoleGroupInfo, TenantInfo } from \"../common/ApplicationConstants\";\r\nimport {\r\n RoleGroupDetails,\r\n TelemetryConstants,\r\n TenantDetails,\r\n} from \"./TelemetryConst\";\r\nimport {\r\n IPageViewTelemetry,\r\n IMetricTelemetry,\r\n} from \"@microsoft/applicationinsights-common\";\r\nimport { FxpLoggerServiceExtension } from \"./FxpLoggerServiceExtension\";\r\nimport { NetworkConnection } from \"./network-connection\";\r\n\r\ndeclare type Envelope = any;\r\nconst PerfMarkerPrefix: string = \"Perf\";\r\n/**\r\n * A service for telemetry logging\r\n * @class FxpLoggerService\r\n * @classdesc A service to instrument data in Telemetry\r\n */\r\nexport class FxpLoggerService\r\n implements ILogger, IFxPService, ITelemetryContextListener\r\n{\r\n private _appInsight: AppInsights;\r\n private _environmentValues: EnvironmentValues;\r\n private _context: TelemetryContext;\r\n private _correlator: Correlator;\r\n private static _loggerServiceInstance: FxpLoggerService;\r\n private loggedInUserContext: any;\r\n private OBOUserContext: any;\r\n private isObo: boolean;\r\n private correlationProvider: ICorrelationProvider;\r\n private instrumentationKey: string;\r\n private pageLoadMetric: any;\r\n private _loggerServiceExtenstion: FxpLoggerServiceExtension;\r\n private _events: {\r\n [key: string]: number;\r\n };\r\n\r\n private constructor() {\r\n //this.init();\r\n }\r\n\r\n private init() {\r\n let FxpAppSettings: any = window[\"FxpAppSettings\"];\r\n let FxpBaseConfiguration: any = window[\"FxpBaseConfiguration\"];\r\n if (!this._appInsight) {\r\n this._events = {};\r\n this._appInsight = new AppInsights();\r\n this.instrumentationKey =\r\n FxpBaseConfiguration.Telemetry.InstrumentationKey;\r\n const clickPluginInstance = new ClickAnalyticsPlugin();\r\n // Click Analytics configuration\r\n const clickPluginConfig = {\r\n autoCapture: true,\r\n dataTags: {\r\n useDefaultContentNameOrId: true,\r\n captureAllMetaDataContent: true,\r\n },\r\n };\r\n // Application Insights Configuration\r\n const configObj = {\r\n instrumentationKey: FxpBaseConfiguration.Telemetry.InstrumentationKey,\r\n extensions: [clickPluginInstance],\r\n extensionConfig: {\r\n [clickPluginInstance.identifier]: clickPluginConfig,\r\n },\r\n };\r\n this._environmentValues = new EnvironmentValues(\r\n FxpAppSettings.EnvironmentName,\r\n FxpAppSettings.ServiceOffering,\r\n FxpAppSettings.ServiceLine,\r\n FxpAppSettings.Service,\r\n FxpAppSettings.ComponentName,\r\n FxpAppSettings.ComponentId,\r\n FxpAppSettings.IctoId\r\n );\r\n this._appInsight.InitializeTelemetryWithConfiguration(\r\n this._environmentValues,\r\n configObj\r\n );\r\n\r\n this._context = TelemetryContext.getInstance();\r\n this._context.initUserSession();\r\n this.setContextInfo();\r\n this._context.addContextChangeListener(this);\r\n this._correlator = new Correlator();\r\n $.correlator = this._correlator;\r\n const telemetryInitializer = {\r\n init: (envelope: Envelope) => {\r\n try {\r\n const telemetryItem = envelope.baseData;\r\n this.telemetryInitializerInit(\r\n telemetryItem,\r\n FxpBaseConfiguration.Telemetry.InstrumentationKey\r\n );\r\n } finally {\r\n envelope.tags[\"ai.cloud.role\"] = \"FxP-Client\";\r\n return true;\r\n }\r\n },\r\n };\r\n this._appInsight.appInsights.addTelemetryInitializer(\r\n telemetryInitializer.init\r\n );\r\n this._appInsight.AddMsitTelemetryInitializers(this._correlator);\r\n this._loggerServiceExtenstion =\r\n FxpLoggerServiceExtension.getInstance().init(this._appInsight);\r\n }\r\n }\r\n\r\n /**\r\n * Static method to get instance of FxpLoggerService\r\n * @abstract\r\n * @method Fxp.telemetry.fxpLogger#getInstance\r\n * @returns {FxpLoggerService} - Returns instance of FxpLoggerService\r\n */\r\n static getInstance(): FxpLoggerService {\r\n if (!this._loggerServiceInstance) {\r\n this._loggerServiceInstance = new FxpLoggerService();\r\n this._loggerServiceInstance.init();\r\n }\r\n return this._loggerServiceInstance;\r\n }\r\n\r\n notify() {\r\n this.setContextInfo();\r\n }\r\n\r\n private setContextInfo() {\r\n this._appInsight.appInsights.context.session.id =\r\n this._context.getSessionID();\r\n this._appInsight.appInsights.context.application.ver =\r\n this._context.getAppVersion();\r\n }\r\n\r\n private telemetryInitializerInit(\r\n telemetryItem: any,\r\n instrumentationKey: string\r\n ): void {\r\n const telemetryAppName = this.getCurrentPartnerTelemetryName();\r\n const properties = FxpLogHelper.addEnvironmentDetails(\r\n new LogPropertyBag(),\r\n null,\r\n null,\r\n instrumentationKey,\r\n telemetryAppName\r\n );\r\n let finalProperties = {};\r\n\r\n if (telemetryItem.properties) {\r\n finalProperties = Object.assign(\r\n {},\r\n telemetryItem.properties,\r\n properties.getItems()\r\n );\r\n }\r\n\r\n if (finalProperties[\"AppName\"] && finalProperties[\"AppName\"] === \"Fxp\") {\r\n finalProperties[\"AppName\"] = TelemetryConstants.FXP_TELEMETRY_BASE_NAME;\r\n }\r\n\r\n telemetryItem.properties = finalProperties;\r\n }\r\n\r\n private getCurrentPartnerTelemetryName(): string {\r\n const ngInjector = angular.element(document.body).injector();\r\n if (!ngInjector) return;\r\n\r\n const stateService: any = ngInjector.get(\"$state\");\r\n if (!stateService) return;\r\n\r\n const currentState = stateService.current;\r\n return currentState.data ? currentState.data.partnerTelemetryName : null;\r\n }\r\n\r\n /**\r\n * Diagnostic method to log error in telemetry\r\n * @abstract\r\n * @method Fxp.telemetry.fxpLogger#logError\r\n * @param {string} source - Source where this exception originated. It should be in Format ..\r\n * @param {string} message - Error Message.\r\n * @param {string} errorCode - Error Code or Error Constant.\r\n * @param {string} stackTrace - StackTrace of the Error.\r\n * @param {LogPropertyBag} properties - Properties for the customDimensions.\r\n * @param {LogMetricBag} measurements - measurements to be logged in customDimensions.\r\n * @param {string} transactionId - Transaction id or Operation id of the transaction.\r\n * @param {ErrorSeverityLevel} severityLevel - Severity Level of the error.\r\n */\r\n logError(\r\n source: string,\r\n message: string,\r\n errorCode: string,\r\n stackTrace?: string,\r\n properties?: LogPropertyBag,\r\n measurements?: LogMetricBag,\r\n transactionId?: string,\r\n severityLevel?: ErrorSeverityLevel\r\n ): void {\r\n try {\r\n let error = new Error();\r\n error.message = CommonUtils.removePII(message);\r\n error.stack = CommonUtils.removePII(stackTrace);\r\n this.logException(\r\n source,\r\n error,\r\n properties,\r\n measurements,\r\n transactionId,\r\n severityLevel,\r\n errorCode\r\n );\r\n } catch (exception) {\r\n this.internalCustomLog(exception);\r\n }\r\n }\r\n\r\n /**\r\n * Diagnostic method to log exception object\r\n * @abstract\r\n * @method Fxp.telemetry.fxpLogger#logError\r\n * @param {string} source - Source where this exception originated. It should be in Format ..\r\n * @param {Error} exception - Exception object.\r\n * @param {LogPropertyBag} properties - Properties for the customDimensions.\r\n * @param {LogMetricBag} measurements - measurements to be logged in customDimensions.\r\n * @param {string} transactionId - Transaction id or Operation id of the transaction.\r\n * @param {ErrorSeverityLevel} severityLevel - Severity Level of the error.\r\n * @param {string} errorCode - Error Code or Error Constant.\r\n */\r\n logException(\r\n source: string,\r\n exception: Error,\r\n properties?: LogPropertyBag,\r\n measurements?: LogMetricBag,\r\n transactionId?: string,\r\n severityLevel?: ErrorSeverityLevel,\r\n errorCode?: string\r\n ): void {\r\n try {\r\n exception.stack = CommonUtils.removePII(exception?.stack);\r\n exception.message = CommonUtils.removePII(exception?.message);\r\n exception.name = CommonUtils.removePII(exception?.name);\r\n errorCode = CommonUtils.removePII(errorCode);\r\n properties = this.setTransactionIdAndCommonProperties(\r\n source,\r\n transactionId,\r\n properties,\r\n errorCode,\r\n exception.stack\r\n );\r\n this._appInsight.TrackException(\r\n exception,\r\n severityLevel,\r\n properties.getItems(),\r\n measurements == null ? null : measurements.getItems()\r\n );\r\n } catch (exception) {\r\n this.internalCustomLog(exception);\r\n }\r\n }\r\n\r\n /**\r\n * Creates and returns a new instance of LogPropertyBag object.\r\n * @abstract\r\n * @method Fxp.telemetry.fxpLogger#createMetricBag\r\n * @returns {LogPropertyBag}\r\n */\r\n createPropertyBag(): LogPropertyBag {\r\n return FxpLogHelper.createPropertyBag();\r\n }\r\n\r\n /**\r\n * Creates and returns a new instance of LogmetricBag object.\r\n * @abstract\r\n * @method Fxp.telemetry.fxpLogger#createMetricBag\r\n * @returns {LogMetricBag}\r\n */\r\n createMetricBag(): LogMetricBag {\r\n return FxpLogHelper.createMetricBag();\r\n }\r\n\r\n /**\r\n * Diagnostic method to log warnings which will be captured in customEvents of application insights with EventType as Warning\r\n * @abstract\r\n * @method Fxp.telemetry.fxpLogger#logWarning\r\n * @param {string} source - Source from where the Warning is logged. It should be in Format ..\r\n * @param {string} message - Warning Message.\r\n * @param {LogPropertyBag} properties - Properties for the customDimensions.\r\n * @param {LogMetricBag} measurements - measurements to be logged in customDimensions.\r\n * @param {string} transactionId - Transaction id or Operation id of the transaction.\r\n */\r\n logWarning(\r\n source: string,\r\n message: string,\r\n properties?: LogPropertyBag,\r\n measurements?: LogMetricBag,\r\n transactionId?: string\r\n ): void {\r\n try {\r\n if (!properties) {\r\n properties = this.createPropertyBag();\r\n }\r\n properties.addToBag(\"EventType\", \"Warning\");\r\n this.logEvent(source, message, properties, measurements, transactionId);\r\n } catch (exception) {\r\n this.internalCustomLog(exception);\r\n }\r\n }\r\n\r\n /**\r\n * Diagnostic method to log Information which will be captured in customEvents of application insights with EventType as Information\r\n * @abstract\r\n * @method Fxp.telemetry.fxpLogger#logInformation\r\n * @param {string} message - Information Message\r\n * @param {LogPropertyBag} properties - Properties for the customDimensions.\r\n * @param {LogMetricBag} measurements - measurements to be logged in customDimensions.\r\n * @param {string} transactionId - Transaction id or Operation id of the transaction.\r\n */\r\n logInformation(\r\n source: string,\r\n message: string,\r\n properties?: LogPropertyBag,\r\n measurements?: LogMetricBag,\r\n transactionId?: string\r\n ): void {\r\n try {\r\n if (!properties) {\r\n properties = this.createPropertyBag();\r\n }\r\n properties.addToBag(\"EventType\", \"Information\");\r\n this.logEvent(source, message, properties, measurements, transactionId);\r\n } catch (exception) {\r\n this.internalCustomLog(exception);\r\n }\r\n }\r\n\r\n /**\r\n * Diagnostic method to log Events which will be captured in customEvents of application insights.\r\n * @abstract\r\n * @method Fxp.telemetry.fxpLogger#logCustomEvents\r\n * @param {string} source - Source from where the Event is getting logged. It should be in Format ..\r\n * @param {string} eventName - Event Name to be logged.\r\n * @param {LogPropertyBag} properties - Properties for the customDimensions.\r\n * @param {LogMetricBag} measurements - measurements to be logged in customDimensions.\r\n * @param {string} transactionId - Transaction id or Operation id of the transaction.\r\n */\r\n logEvent(\r\n source: string,\r\n eventName: string,\r\n properties?: LogPropertyBag,\r\n measurements?: LogMetricBag,\r\n transactionId?: string\r\n ): void {\r\n try {\r\n properties = this.setTransactionIdAndCommonProperties(\r\n source,\r\n transactionId,\r\n properties\r\n );\r\n this._appInsight.TrackEvent(\r\n eventName,\r\n properties.getItems(),\r\n measurements\r\n );\r\n } catch (exception) {\r\n this.internalCustomLog(exception);\r\n }\r\n }\r\n\r\n /**\r\n * Diagnostic method to Track Page Views in telemetry\r\n * @abstract\r\n * @method Fxp.telemetry.fxpLogger#logPageView\r\n * @param {string} source - Source from where this is getting logged. It should be in Format ..\r\n * @param pageName - Name of the visited page as string\r\n * @param {string} url - Url of the visited page.\r\n * @param {LogPropertyBag} properties - Properties for the customDimensions.\r\n * @param {LogMetricBag} measurements - measurements to be logged in customDimensions.\r\n * @param {number} duration - Time took to load the page. The value should be a positive integer.\r\n * @param {string} transactionId - Transaction id or Operation id of the transaction.\r\n */\r\n logPageView(\r\n source: string,\r\n pageName: string,\r\n url?: string,\r\n properties?: LogPropertyBag,\r\n measurements?: LogMetricBag,\r\n duration?: number,\r\n transactionId?: string\r\n ): void {\r\n try {\r\n properties = this.setTransactionIdAndCommonProperties(\r\n source,\r\n transactionId,\r\n properties\r\n );\r\n if (!measurements) {\r\n measurements = this.createMetricBag();\r\n }\r\n if (duration) {\r\n measurements.addToBag(`${pageName}-LoadDuration`, duration);\r\n }\r\n let pageViewTelemetry: IPageViewTelemetry = {\r\n name: pageName,\r\n uri: url,\r\n refUri: null,\r\n pageType: null,\r\n isLoggedIn: null,\r\n properties: properties.getItems(),\r\n measurements: measurements.getItems(),\r\n };\r\n this._appInsight.appInsights.trackPageView(pageViewTelemetry);\r\n } catch (exception) {\r\n this.internalCustomLog(exception);\r\n }\r\n }\r\n\r\n /**\r\n * OBSOLETE Method. Diagnostic method to Track Page Views\r\n * @abstract\r\n * @method Fxp.telemetry.fxpLogger#trackPageView\r\n * @param {string} url - Url of the visited page.\r\n * @param {LogPropertyBag} properties - Properties for the customDimensions.\r\n * @param {LogMetricBag} measurements - measurements to be logged in customDimensions.\r\n * @param duration - Time took to load the page. The value should be a number.\r\n * @deprecated - This method is deprecated and will be removed in future. Please use logPageView method instead.\r\n */\r\n trackPageView(\r\n url?: string,\r\n properties?: LogPropertyBag,\r\n measurements?: LogMetricBag,\r\n duration?: number,\r\n transactionId?: string\r\n ): void {\r\n try {\r\n this.logPageView(null, null, url, properties, measurements, duration);\r\n } catch (exception) {\r\n this.internalCustomLog(exception);\r\n }\r\n }\r\n\r\n /**\r\n * Diagnostic method to Track Metrics in telemetry\r\n * @abstract\r\n * @method Fxp.telemetry.fxpLogger#logMetric\r\n * @param {string} source - Source from where this is getting logged. It should be in Format ..\r\n * @param {string} metricName - Name of the metric.\r\n * @param {number} metricValue - The value of the metric as number.\r\n * @param {LogPropertyBag} properties - Properties for the customDimensions.\r\n * @param {string} transactionId - Transaction id or Operation id of the transaction.\r\n */\r\n logMetric(\r\n source: string,\r\n metricName: string,\r\n metricValue: number,\r\n properties?: LogPropertyBag,\r\n transactionId?: string\r\n ): void {\r\n try {\r\n properties = this.setTransactionIdAndCommonProperties(\r\n source,\r\n transactionId,\r\n properties\r\n );\r\n let metricTelemetry: IMetricTelemetry = {\r\n name: metricName,\r\n average: metricValue,\r\n properties: properties.getItems(),\r\n };\r\n this._appInsight.appInsights.trackMetric(metricTelemetry);\r\n } catch (exception) {\r\n this.internalCustomLog(exception);\r\n }\r\n }\r\n\r\n /**\r\n * Method to start tracking FeatureUsageEvent.\r\n * @description Method to start tracking FeatureUsageEvent.\r\n * @abstract\r\n * @method Fxp.telemetry.fxpLogger#logSystemEvent\r\n * @param {FeatureUsageEvent} featureUsageEvent - Instance of FeatureUsageEvent type.\r\n */\r\n startFeatureUsageEvent(featureUsageEvent: FeatureUsageEvent) {\r\n this._loggerServiceExtenstion.startFeatureUsageEvent(featureUsageEvent);\r\n }\r\n\r\n /**\r\n * Method to complete tracking FeatureUsageEvent.\r\n * @description Method to complete tracking FeatureUsageEvent.\r\n * @abstract\r\n * @method Fxp.telemetry.fxpLogger#endFeatureUsageEvent\r\n * @param {string} source - Source from where this is getting logged. It should be in Format ..\r\n * @param {FeatureUsageEvent} featureUsageEvent - Instance of SystemEvent type.\r\n * @param {LogPropertyBag} properties - Properties for the customDimensions.\r\n * @param {string} transactionId - Transaction id or Operation id of the transaction.\r\n */\r\n endFeatureUsageEvent(\r\n source: string,\r\n featureUsageEvent: FeatureUsageEvent,\r\n properties?: LogPropertyBag,\r\n transactionId?: any\r\n ) {\r\n properties = this.setTransactionIdAndCommonProperties(\r\n source,\r\n transactionId,\r\n properties\r\n );\r\n this._loggerServiceExtenstion.endFeatureUsageEvent(\r\n featureUsageEvent,\r\n properties\r\n );\r\n }\r\n\r\n /**\r\n * Diagnostic method to log Feature Usage in telemetry. This method can be used for tracking single session workflows.\r\n * @abstract\r\n * @method Fxp.telemetry.fxpLogger#logFeatureUsageEvent\r\n * @param {string} source - Source from where this is getting logged. It should be in Format ..\r\n * @param {FeatureUsageEvent} eventData - Instance of FeatureUsageEvent.\r\n * @param {LogPropertyBag} properties - Properties for the customDimensions.\r\n * @param {LogMetricBag} measurements - measurements to be logged in customDimensions.\r\n * @param {string} transactionId - Transaction id or Operation id of the transaction.\r\n */\r\n logFeatureUsageEvent(\r\n source: string,\r\n eventData: FeatureUsageEvent,\r\n properties?: LogPropertyBag,\r\n measurements?: LogMetricBag,\r\n transactionId?: any\r\n ): void {\r\n try {\r\n properties = this.setTransactionIdAndCommonProperties(\r\n source,\r\n transactionId,\r\n properties\r\n );\r\n this._loggerServiceExtenstion.logFeatureUsageEvent(\r\n eventData,\r\n properties,\r\n measurements\r\n );\r\n } catch (exception) {\r\n this.internalCustomLog(exception);\r\n }\r\n }\r\n\r\n /**\r\n * Diagnostic method to log Business Process Event in telemetry.\r\n * @abstract\r\n * @method Fxp.telemetry.fxpLogger#logBusinessProcessEvent\r\n * @param {string} source - Source from where this is getting logged. It should be in Format ..\r\n * @param {BusinessProcessEvent} eventData - Instance of FeatureUsageEvent.\r\n * @param {LogPropertyBag} properties - Properties for the customDimensions.\r\n * @param {LogMetricBag} measurements - measurements to be logged in customDimensions.\r\n * @param {string} transactionId - Transaction id or Operation id of the transaction.\r\n */\r\n logBusinessProcessEvent(\r\n source: string,\r\n eventData: BusinessProcessEvent,\r\n properties?: LogPropertyBag,\r\n measurements?: LogMetricBag,\r\n transactionId?: any\r\n ): void {\r\n try {\r\n properties = this.setTransactionIdAndCommonProperties(\r\n source,\r\n transactionId,\r\n properties\r\n );\r\n this._loggerServiceExtenstion.logBusinessProcessEvent(\r\n eventData,\r\n properties,\r\n measurements\r\n );\r\n } catch (exception) {\r\n this.internalCustomLog(exception);\r\n }\r\n }\r\n\r\n /**\r\n * Diagnostic method to log trace information in telemetry.\r\n * @abstract\r\n * @method Fxp.telemetry.fxpLogger#logTrace\r\n * @param {string} source - Source from where this is getting logged. It should be in Format ..\r\n * @param {string} message - Trace message.\r\n * @param {LogPropertyBag} properties - Properties for the customDimensions.\r\n * @param {LogMetricBag} measurements - measurements to be logged in customDimensions.\r\n * @param {string} transactionId - Transaction id or Operation id of the transaction.\r\n */\r\n logTrace(\r\n source: string,\r\n message: string,\r\n properties?: LogPropertyBag,\r\n transactionId?: string\r\n ): void {\r\n try {\r\n properties = this.setTransactionIdAndCommonProperties(\r\n source,\r\n transactionId,\r\n properties\r\n );\r\n this._appInsight.TrackTrace(message, properties.getItems());\r\n } catch (exception) {\r\n this.internalCustomLog(exception);\r\n }\r\n }\r\n\r\n /**\r\n * Internal method to Set the correlationProvider object for FxpLoggerService. This method should only be invoked from Platform during initialization.\r\n * @abstract\r\n * @method Fxp.telemetry.fxpLogger#setCorrelationProvider\r\n * @param {ICorrelationProvider} correlationProvider - Instance of ICorrelationProvider\r\n */\r\n setCorrelationProvider(correlationProvider: ICorrelationProvider) {\r\n this.correlationProvider = correlationProvider;\r\n }\r\n\r\n /**\r\n * Method to start performance tracking.\r\n * @abstract\r\n * @method Fxp.telemetry.fxpLogger#startTrackPerformance\r\n * @param {string} eventName - Name of the event\r\n * @param {string} transactionId - Transaction id or Operation id of the transaction.\r\n */\r\n startTrackPerformance(eventName: string, transactionId?: any): void {\r\n const metricName = PerfMarkerPrefix + eventName;\r\n try {\r\n if (!CommonUtils.isNullOrEmpty(this._events[metricName])) {\r\n console.warn(\r\n \"Start was called before calling stop for event : \" + metricName\r\n );\r\n } else {\r\n this._events[metricName] = performance.now();\r\n }\r\n } catch (exception) {\r\n this.internalCustomLog(exception);\r\n }\r\n }\r\n\r\n /**\r\n * Method to complete performance tracking.\r\n * @abstract\r\n * @method Fxp.telemetry.fxpLogger#stopTrackPerformance\r\n * @param {string} eventName - Name of the event\r\n * @param {LogPropertyBag} properties - Properties for the customDimensions.\r\n * @param {LogMetricBag} measurements - measurements to be logged in customDimensions.\r\n * @param {string} transactionId - Transaction id or Operation id of the transaction.\r\n */\r\n stopTrackPerformance(\r\n eventName: string,\r\n source?: string,\r\n properties?: LogPropertyBag,\r\n measurements?: LogMetricBag,\r\n transactionId?: any\r\n ): void {\r\n const metricName = PerfMarkerPrefix + eventName;\r\n const start = this._events[metricName];\r\n\r\n if (isNaN(start)) {\r\n console.warn(\r\n \"Stop was called before calling start for event : \" + eventName\r\n );\r\n } else {\r\n const duration = performance.now() - start;\r\n delete this._events[eventName];\r\n this._events[eventName] = undefined;\r\n if (CommonUtils.isNullOrEmpty(measurements)) {\r\n measurements = new LogMetricBag();\r\n }\r\n\r\n try {\r\n measurements.addToBag(metricName, duration);\r\n properties = this.setTransactionIdAndCommonProperties(\r\n source,\r\n transactionId,\r\n properties\r\n );\r\n properties.addToBag(\"Unit\", \"Milliseconds\");\r\n let metricTelemetry: IMetricTelemetry = {\r\n name: metricName,\r\n average: duration,\r\n properties: properties.getItems(),\r\n };\r\n\r\n this._appInsight.appInsights.trackMetric(metricTelemetry);\r\n } catch (exception) {\r\n this.internalCustomLog(exception);\r\n }\r\n }\r\n }\r\n\r\n getPageLoadMetrics() {\r\n return this.pageLoadMetric;\r\n }\r\n\r\n setPageLoadMetrics(value: any) {\r\n this.pageLoadMetric = value;\r\n }\r\n\r\n logPageLoadMetrics(pageLoadTime?: number): void {\r\n try {\r\n var pageLoadMetricsCalled = performance.now();\r\n var propBag = this.createPropertyBag();\r\n var pageLoadData = this.pageLoadMetric;\r\n\r\n pageLoadData.totalDuration = performance.now() - pageLoadData.startTime;\r\n\r\n if (\r\n !CommonUtils.isNullOrEmpty(pageLoadData.sourceRoute) &&\r\n !CommonUtils.isNullOrEmpty(pageLoadData.destinationRoute)\r\n ) {\r\n if (\r\n pageLoadTime != null &&\r\n pageLoadTime != undefined &&\r\n typeof pageLoadTime == \"number\"\r\n ) {\r\n pageLoadData.pageLoadDuration = pageLoadTime;\r\n } else pageLoadData.pageLoadDuration = 0;\r\n\r\n propBag.addToBag(\"pageDisplayName\", pageLoadData.pageDisplayName);\r\n propBag.addToBag(\"sourceRoute\", pageLoadData.sourceRoute);\r\n propBag.addToBag(\r\n \"sourceRouteURL\",\r\n CommonUtils.isNullOrEmpty(pageLoadData.sourceRouteURL)\r\n ? \"No_SourceRouteURL_Found\"\r\n : pageLoadData.sourceRouteURL\r\n );\r\n propBag.addToBag(\"destinationRoute\", pageLoadData.destinationRoute);\r\n propBag.addToBag(\r\n \"destinationRouteURL\",\r\n CommonUtils.isNullOrEmpty(pageLoadData.destinationRouteURL)\r\n ? \"No_DestinationRouteURL_Found\"\r\n : pageLoadData.destinationRouteURL\r\n );\r\n propBag.addToBag(\r\n \"pageTransitionStatus\",\r\n pageLoadData.pageTransitionStatus\r\n );\r\n propBag.addToBag(\r\n \"stateChangeDuration\",\r\n pageLoadData.stateChangeDuration.toString()\r\n );\r\n propBag.addToBag(\r\n \"preStateDuration\",\r\n pageLoadData.preStateDuration.toString()\r\n );\r\n propBag.addToBag(\"error\", pageLoadData.pageLoadError);\r\n propBag.addToBag(\r\n \"partnerPageLoadDuration\",\r\n pageLoadData.pageLoadDuration.toString()\r\n );\r\n propBag.addToBag(\r\n \"totalDuration\",\r\n pageLoadData.totalDuration.toString()\r\n );\r\n propBag.addToBag(\r\n \"thresholdCrossed\",\r\n pageLoadData.threshold.thresholdCrossed.toString()\r\n );\r\n propBag.addToBag(\r\n \"thresholdValue\",\r\n pageLoadData.threshold.thresholdValue.toString()\r\n );\r\n\r\n // Temp properties added for trouble shooting\r\n propBag.addToBag(\"startTime\", pageLoadData.startTime.toString());\r\n propBag.addToBag(\r\n \"$rootScope.startTime\",\r\n CommonUtils.isNullOrEmpty(pageLoadData.rootscopestartTime)\r\n ? \"0\"\r\n : pageLoadData.rootscopestartTime.toString()\r\n );\r\n propBag.addToBag(\r\n \"$rootScope.stateChangeStartTime\",\r\n CommonUtils.isNullOrEmpty(pageLoadData.stateChangeStartTime)\r\n ? \"0\"\r\n : pageLoadData.stateChangeStartTime.toString()\r\n );\r\n propBag.addToBag(\r\n \"pageLoadMetricsCalled\",\r\n pageLoadMetricsCalled.toString()\r\n );\r\n this.logEvent(\r\n pageLoadData.sourceRoute,\r\n \"FxpTelemetry.PageMetrics\",\r\n propBag\r\n );\r\n }\r\n } catch (exception) {\r\n this.internalCustomLog(exception);\r\n }\r\n }\r\n\r\n setLoggedInUserContext(\r\n loggedInUserRoleId: string,\r\n loggedInUserRoleName: string,\r\n isOBO: boolean,\r\n loggedInUserTenantKey: string,\r\n loggedInUserTenantName: string\r\n ) {\r\n this.loggedInUserContext = {\r\n [RoleGroupInfo.RoleGroupId]: loggedInUserRoleId\r\n ? loggedInUserRoleId.toString()\r\n : loggedInUserRoleId,\r\n [RoleGroupInfo.RoleGroupName]: loggedInUserRoleName,\r\n [TenantInfo.TenantKey]: loggedInUserTenantKey,\r\n [TenantInfo.TenantName]: loggedInUserTenantName,\r\n };\r\n this.isObo = isOBO;\r\n }\r\n\r\n setOBOUserContext(\r\n OBOUserRoleId: string,\r\n OBOUserRoleName: string,\r\n isOBO: boolean,\r\n OBOUserTenantKey: string,\r\n OBOUserTenantName: string\r\n ) {\r\n this.OBOUserContext = {\r\n [RoleGroupInfo.RoleGroupId]: OBOUserRoleId\r\n ? OBOUserRoleId.toString()\r\n : OBOUserRoleId,\r\n [RoleGroupInfo.RoleGroupName]: OBOUserRoleName,\r\n [TenantInfo.TenantKey]: OBOUserTenantKey,\r\n [TenantInfo.TenantName]: OBOUserTenantName,\r\n };\r\n this.isObo = isOBO;\r\n }\r\n\r\n /**\r\n * Method to log user actions which will be logged in customEvents with EventType as UserAction.\r\n * @abstract\r\n * @method Fxp.telemetry.fxpLogger#logSystemEvent\r\n * @param {string} source - Source from where this is getting logged. It should be in format ..\r\n * @param {string} eventName - Name of the event. It should be in format .\r\n * @param {LogPropertyBag} properties - Properties for the customDimensions.\r\n * @param {LogMetricBag} measurements - measurements to be logged in customDimensions.\r\n * @param {string} transactionId - Transaction id or Operation id of the transaction.\r\n */\r\n logUserAction(\r\n source,\r\n eventName: string,\r\n message: string,\r\n properties?: LogPropertyBag,\r\n measurements?: LogMetricBag,\r\n transactionId?: string\r\n ) {\r\n try {\r\n if (!properties) {\r\n properties = this.createPropertyBag();\r\n }\r\n properties.addToBag(\"EventType\", \"UserAction\");\r\n properties.addToBag(\"message\", message);\r\n this.logEvent(source, eventName, properties, measurements, transactionId);\r\n } catch (exception) {\r\n this.internalCustomLog(exception);\r\n }\r\n }\r\n\r\n /**\r\n * Method to log system events which will be logged in customEvents with EventType as SystemEvent.\r\n * @abstract\r\n * @method Fxp.telemetry.fxpLogger#logSystemEvent\r\n * @param {string} source - Source from where this is getting logged. It should be in Format ..\r\n * @param {SystemEvent} eventData - Instance of SystemEvent type.\r\n * @param {LogPropertyBag} properties - Properties for the customDimensions.\r\n * @param {LogMetricBag} measurements - measurements to be logged in customDimensions.\r\n * @param {string} transactionId - Transaction id or Operation id of the transaction.\r\n */\r\n logSystemEvent(\r\n source: string,\r\n eventData: SystemEvent,\r\n properties?: LogPropertyBag,\r\n measurements?: LogMetricBag,\r\n transactionId?: any\r\n ) {\r\n try {\r\n properties = this.setTransactionIdAndCommonProperties(\r\n source,\r\n transactionId,\r\n properties\r\n );\r\n this._appInsight.TrackSystemEvent(\r\n eventData,\r\n properties.getItems(),\r\n measurements\r\n );\r\n } catch (exception) {\r\n this.internalCustomLog(exception);\r\n }\r\n }\r\n\r\n private setTransactionId(transactionId?: any) {\r\n if (transactionId) {\r\n this._appInsight.appInsights.context.telemetryTrace.traceID =\r\n transactionId;\r\n return;\r\n }\r\n const subCorrelationId = this._correlator.getSubCorrelationId();\r\n const correlationId = this._correlator.getCorrelationId();\r\n if (subCorrelationId) {\r\n this._appInsight.appInsights.context.telemetryTrace.traceID =\r\n subCorrelationId;\r\n this._appInsight.appInsights.context.telemetryTrace.parentID =\r\n correlationId;\r\n return subCorrelationId;\r\n }\r\n this._appInsight.appInsights.context.telemetryTrace.traceID = correlationId;\r\n return correlationId;\r\n }\r\n\r\n private setTransactionIdAndCommonProperties(\r\n source?: string,\r\n transactionId?: any,\r\n properties?: LogPropertyBag,\r\n errorCode?: string,\r\n stackTrace?: string\r\n ) {\r\n this.setTransactionId(transactionId);\r\n properties = this.addPropertyBagValues(properties, transactionId, source);\r\n properties = this.buildCommonLogProperties(properties, source, null, null);\r\n return properties;\r\n }\r\n\r\n /**\r\n * To Builds log properties that are common to all methods\r\n * @param properties\r\n * @param source\r\n * @param errorCode\r\n * @param stackTrace\r\n */\r\n private buildCommonLogProperties(\r\n properties: LogPropertyBag,\r\n source: string,\r\n errorCode: string,\r\n stackTrace: string\r\n ) {\r\n const logProperties = properties || this.createPropertyBag();\r\n if (logProperties.getValue(TelemetryConstants.LOGGING_SOURCE)) {\r\n logProperties.addToBag(\r\n \"Source\",\r\n properties.getValue(TelemetryConstants.LOGGING_SOURCE)\r\n );\r\n logProperties.removeFromBag(TelemetryConstants.LOGGING_SOURCE);\r\n } else if (!CommonUtils.isNullOrEmpty(source)) {\r\n logProperties.addToBag(\"Source\", source);\r\n }\r\n if (!CommonUtils.isNullOrEmpty(errorCode))\r\n logProperties.addToBag(\"ErrorCode\", errorCode);\r\n\r\n if (!CommonUtils.isNullOrEmpty(stackTrace))\r\n logProperties.addToBag(\"StackTrace\", stackTrace);\r\n\r\n return logProperties;\r\n }\r\n\r\n private addPropertyBagValues(\r\n eventProperties: LogPropertyBag,\r\n transactionId?: string,\r\n source?: string\r\n ) {\r\n eventProperties = eventProperties || new LogPropertyBag();\r\n const appNameForTelemetry = this.getCurrentPartnerTelemetryName();\r\n eventProperties = FxpLogHelper.addEnvironmentDetails(\r\n eventProperties,\r\n transactionId,\r\n source,\r\n this.instrumentationKey,\r\n appNameForTelemetry\r\n );\r\n eventProperties = this.addUserRoleGroupDetails(eventProperties);\r\n eventProperties = this.addUserTenantDetails(eventProperties);\r\n eventProperties.addToBag(\r\n \"networkSpeed\",\r\n NetworkConnection.getInstance().getCurrentNetworkSpeed()\r\n );\r\n return eventProperties;\r\n }\r\n\r\n private addUserRoleGroupDetails(eventProperties: LogPropertyBag) {\r\n if (this.loggedInUserContext) {\r\n eventProperties.addToBag(\r\n RoleGroupDetails.LOGGEDINUSERROLEGROUPID,\r\n this.loggedInUserContext.RoleGroupId == undefined\r\n ? \"\"\r\n : this.loggedInUserContext.RoleGroupId\r\n );\r\n eventProperties.addToBag(\r\n RoleGroupDetails.LOGGEDINUSERROLEGROUPNAME,\r\n this.loggedInUserContext.RoleGroupName == undefined\r\n ? \"\"\r\n : this.loggedInUserContext.RoleGroupName\r\n );\r\n }\r\n if (this.isObo && this.OBOUserContext) {\r\n eventProperties.addToBag(\r\n RoleGroupDetails.OBOROLEGROUPID,\r\n this.OBOUserContext.RoleGroupId == undefined\r\n ? \"\"\r\n : this.OBOUserContext.RoleGroupId\r\n );\r\n eventProperties.addToBag(\r\n RoleGroupDetails.OBOROLEGROUPNAME,\r\n this.OBOUserContext.RoleGroupName == undefined\r\n ? \"\"\r\n : this.OBOUserContext.RoleGroupName\r\n );\r\n }\r\n return eventProperties;\r\n }\r\n\r\n /**\r\n * To add loggedIn user tenant properties that are common to all methods\r\n * @param properties\r\n */\r\n private addUserTenantDetails(eventProperties: LogPropertyBag) {\r\n if (this.loggedInUserContext) {\r\n eventProperties.addToBag(\r\n TenantDetails.LOGGEDINUSERTENANTKEY,\r\n this.loggedInUserContext == undefined\r\n ? \"\"\r\n : this.loggedInUserContext.TenantKey\r\n );\r\n eventProperties.addToBag(\r\n TenantDetails.LOGGEDINUSERTENANTNAME,\r\n this.loggedInUserContext.TenantName == undefined\r\n ? \"\"\r\n : this.loggedInUserContext.TenantName\r\n );\r\n }\r\n if (this.isObo && this.OBOUserContext) {\r\n eventProperties.addToBag(\r\n TenantDetails.OBOTENANTKEY,\r\n this.OBOUserContext == undefined ? \"\" : this.OBOUserContext.TenantKey\r\n );\r\n eventProperties.addToBag(\r\n TenantDetails.OBOTENANTNAME,\r\n this.OBOUserContext.TenantName == undefined\r\n ? \"\"\r\n : this.OBOUserContext.TenantName\r\n );\r\n }\r\n return eventProperties;\r\n }\r\n\r\n public getCorrelationId(correlationId?: string): string {\r\n if (!CommonUtils.isNullOrEmpty(correlationId)) return;\r\n if (this.correlationProvider)\r\n return this.correlationProvider.getCorrelationId();\r\n if (this._correlator) return this._correlator.getCorrelationId();\r\n if ($.correlator) return $.correlator.getCorrelationId();\r\n }\r\n\r\n public getSubCorrelationId(): string {\r\n if (this._correlator) return this._correlator.getSubCorrelationId();\r\n }\r\n\r\n /**\r\n * Method to renew the correlation identity.\r\n * @abstract\r\n * @method Fxp.telemetry.fxpLogger#renewCorrelationId\r\n */\r\n public renewCorrelationId() {\r\n if (this._correlator) return this._correlator.renewCorrelationId();\r\n }\r\n\r\n /**\r\n * Method to renew the sub correlation identity.\r\n * @abstract\r\n * @method Fxp.telemetry.fxpLogger#renewSubCorrelationId\r\n * @description Method to renew the sub correlation identity.\r\n */\r\n public renewSubCorrelationId() {\r\n if (this._correlator) return this._correlator.renewSubCorrelationId();\r\n }\r\n\r\n /**\r\n * logs error to console\r\n * @param exception\r\n */\r\n private internalCustomLog(exception) {\r\n console.error(TelemetryConstants.ERRORPREFIX + JSON.stringify(exception));\r\n }\r\n\r\n getDefaultPropertyBagValues(properties?: LogPropertyBag): LogPropertyBag {\r\n let propBag = properties || this.createPropertyBag();\r\n propBag = this.addPropertyBagValues(propBag);\r\n return propBag;\r\n }\r\n}\r\n","declare var navigator: any; \r\n\r\nexport class NetworkConnection {\r\n _connection: any = navigator.connection || navigator.mozConnection || navigator.webkitConnection;\r\n _effectiveType: any;\r\n static _networkConnection: NetworkConnection; \r\n\r\n constructor(){\r\n this._connection.addEventListener('change', this.broadcastNetworkChange.bind(this));\r\n this.getCurrentNetworkSpeed();\r\n }\r\n\r\n static getInstance(): NetworkConnection{\r\n if (!this._networkConnection)\r\n this._networkConnection = new NetworkConnection(); \r\n\r\n return this._networkConnection;\r\n }\r\n\r\n getCurrentNetworkSpeed(){\r\n this._effectiveType = this._connection.effectiveType;\r\n return this._effectiveType; \r\n }\r\n\r\n broadcastNetworkChange() {\r\n const newEffectiveType = this._connection.effectiveType;\r\n const networkChangeCustomEvent = new CustomEvent(\"network_speed_changed\", {\r\n bubbles: true, // only bubbles and cancelable\r\n cancelable: true, // work in the Event constructor\r\n detail: {'from': this._effectiveType, 'to': newEffectiveType}\r\n });\r\n window.dispatchEvent(networkChangeCustomEvent);\r\n this._effectiveType = newEffectiveType; \r\n \r\n }\r\n}\r\n","import { LogPropertyBag } from \"./LogPropertyBag\";\r\nimport { EnvironmentData } from \"./EnvironmentData\";\r\nimport { FxpLogHelper } from \"./FxpLogHelper\";\r\nimport { ApplicationConstants } from \"../common/ApplicationConstants\";\r\nimport { ITelemetryContextListener } from \"../interfaces/ITelemetryContextListener\";\r\nimport { CommonUtils } from \"../utils/CommonUtils\";\r\n\r\n/**\r\n* A service to get/set telemetry context\r\n* @class Fxp.Telemetry.TelemetryContext\r\n* @classdesc A service to get/set telemetry context\r\n* @example Example to create an instance of FxpTelemetryContext \r\n* //Initializing FxpTelemetryContext Service\r\n* angular.module('FxPApp').controller('AppController', ['FxpTelemetryContext', AppController]);\r\n* function AppController(FxpTelemetryContext){ FxpTelemetryContext.setUserID(\"xxxxx\"); }\r\n*/\r\nexport class TelemetryContext {\r\n\r\n\tprivate static _currentContext: TelemetryContext;\r\n\tprivate _userId: string = \"\";\r\n\tprivate _appName: string = \"\";\r\n\tprivate _appVersion: string = \"\";\r\n\tprivate _userRole: string = \"\";\r\n\tprivate _sessionId: string = \"\";\r\n\tprivate _geography: string = \"\";\r\n\tprivate _envData: any = null;\r\n\tprivate _globalPropertyBag: LogPropertyBag = new LogPropertyBag();\r\n\tprivate contextChangeListeners: Array = new Array();\r\n\r\n\tprivate constructor() {\r\n\t\tthis.setAppContext('FXP', 'V1');\r\n\t\tthis._envData = [];\r\n\t}\r\n\r\n\tstatic getInstance(): TelemetryContext{\r\n\t\tif (!this._currentContext) {\r\n\t\t\tthis._currentContext = new TelemetryContext(); \r\n\t\t}\r\n\t\treturn this._currentContext;\r\n\t}\r\n\r\n\r\n\tgetGlobalPropertyBag(): LogPropertyBag {\r\n\t\treturn this._globalPropertyBag;\r\n\t}\r\n\r\n\taddToGlobalPropertyBag(key: string, value: string) {\r\n\t\tthis._globalPropertyBag.addToBag(key, value);\r\n\t}\r\n\r\n\tremoveFromGlobalPropertyBag(key: string) {\r\n\t\tthis._globalPropertyBag.removeFromBag(key);\r\n\t}\r\n\r\n\r\n\t/**\r\n\t* gets instance of TelemetryContext Object\r\n\t* @method Fxp.Telemetry.TelemetryContext.CurrentContext \r\n\t* @example Example to invoke CurrentContext\r\n\t* FxpTelemetryContext.CurrentContext();\r\n\t*/\r\n\t//Keeping this function as is for backward Compatibility\r\n\tpublic static get CurrentContext(): TelemetryContext {\r\n\t\tif (TelemetryContext._currentContext) {\r\n\t\t\treturn TelemetryContext._currentContext;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tTelemetryContext._currentContext = new TelemetryContext();\r\n\t\t\treturn TelemetryContext._currentContext;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t* sets UserId of Telemetry Context Object\r\n\t* @method Fxp.Telemetry.TelemetryContext.setUserID\r\n\t* @param {string} UserID a Logged IN UserId in FXP. \r\n\t* @example Example to invoke setUserID\r\n\t* FxpTelemetryContext.setUserID('xxxxxx');\r\n\t*/\r\n\tsetUserID(userID: string) {\r\n\t\tif (userID)\r\n\t\t\tthis._userId = userID;\r\n\t\telse\r\n\t\t\tthrow new Error(ApplicationConstants.RequiredMessage.replace('{0}', \"User Id\"));\r\n\t}\r\n\r\n\t/**\r\n\t* gets UserId of Telemetry Context Object, return type of the method is a string\r\n\t* @method Fxp.Telemetry.TelemetryContext.setUserID \r\n\t* @example Example to invoke getUserID\r\n\t* FxpTelemetryContext.getUserID();\r\n\t*/\r\n\tgetUserID(): string {\r\n\t\treturn this._userId;\r\n\t}\r\n\r\n\r\n\t/**\r\n\t* sets Application Context of Telemetry Context Object\r\n\t* @method Fxp.Telemetry.TelemetryContext.setAppContext\r\n\t* @param {string} appName Application Name. \r\n\t* @param {string} appVersion Application Version. \r\n\t* @example Example to invoke setAppContext\r\n\t* FxpTelemetryContext.setAppContext('FXP','V1');\r\n\t*/\r\n\tsetAppContext(appName: string, appVersion: string) {\r\n\t\tif (appName)\r\n\t\t\tthis._appName = appName;\r\n\t\telse\r\n\t\t\tthrow new Error(ApplicationConstants.RequiredMessage.replace('{0}', \"Application Name\"));\r\n\r\n\t\tif (appVersion)\r\n\t\t\tthis._appVersion = appVersion;\r\n\t\telse\r\n\t\t\tthrow new Error(ApplicationConstants.RequiredMessage.replace('{0}', \"Application Version\"));\r\n\r\n\t\tthis.notifyContextChangeListeners();\r\n\t}\r\n\r\n\t/**\r\n\t* gets getAppVersion of Telemetry Context Object, return type of the method is a string\r\n\t* @method Fxp.Telemetry.TelemetryContext.getAppVersion \r\n\t* @example Example to invoke getAppVersion\r\n\t* FxpTelemetryContext.getAppVersion();\r\n\t*/\r\n\tgetAppVersion(): string {\r\n\t\treturn this._appVersion;\r\n\t}\r\n\r\n\t/**\r\n\t* gets Application Name of Telemetry Context Object, return type of the method is a string\r\n\t* @method Fxp.Telemetry.TelemetryContext.getAppName \r\n\t* @example Example to invoke getAppName\r\n\t* FxpTelemetryContext.getAppName();\r\n\t*/\r\n\tgetAppName(): string {\r\n\t\treturn this._appName;\r\n\t}\r\n\r\n\t/**\r\n\t* sets UserRole of Telemetry Context Object\r\n\t* @method Fxp.Telemetry.TelemetryContext.setUserRole \r\n\t* @param {string} userRole Business Role of Logged in User. \r\n\t* @example Example to invoke setUserRole\r\n\t* FxpTelemetryContext.setUserRole('Architect');\r\n\t*/\r\n\tsetUserRole(userRole: string) {\r\n\t\tif (userRole) {\r\n\t\t\tthis._userRole = userRole;\r\n\t\t\tthis.notifyContextChangeListeners();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new Error(ApplicationConstants.RequiredMessage.replace('{0}', \"User Role\"));\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t* gets UserRole of Telemetry Context Object, return type of the method is a string\r\n\t* @method Fxp.Telemetry.TelemetryContext.getUserRole \r\n\t* @example Example to invoke getUserRole\r\n\t* FxpTelemetryContext.getUserRole();\r\n\t*/\r\n\tgetUserRole(): string {\r\n\t\treturn this._userRole;\r\n\t}\r\n\r\n\t/**\r\n\t* sets SessionID of Telemetry Context Object\r\n\t* @method Fxp.Telemetry.TelemetryContext.setSessionID \r\n\t* @param {string} SessionID SessionId of Logged in User. \r\n\t* @example Example to invoke setSessionID\r\n\t* FxpTelemetryContext.setSessionID(\"12345-56789-123364\");\r\n\t*/\r\n\tsetSessionID(sessionID: string) {\r\n\t\tif (sessionID)\r\n\t\t\tthis._sessionId = sessionID;\r\n\t\telse\r\n\t\t\tthrow new Error(ApplicationConstants.RequiredMessage.replace('{0}', \"Session Id\"));\r\n\t}\r\n\r\n\t/**\r\n\t* gets SessionID of Telemetry Context Object, return type of the method is a string\r\n\t* @method Fxp.Telemetry.TelemetryContext.setSessionID \r\n\t* @example Example to invoke setSessionID\r\n\t* FxpTelemetryContext.setSessionID();\r\n\t*/\r\n\tgetSessionID(): string {\r\n\t\treturn this._sessionId;\r\n\t}\r\n\r\n\t/**\r\n\t* gets Geography Information of Telemetry Context Object, return type of the method is a string\r\n\t* @method Fxp.Telemetry.TelemetryContext.getGeography \r\n\t* @example Example to invoke getGeography\r\n\t* FxpTelemetryContext.getGeography();\r\n\t*/\r\n\tgetGeography(): string {\r\n\t\treturn this._geography;\r\n\t}\r\n\r\n\t/**\r\n\t* sets Geography of Telemetry Context Object\r\n\t* @method Fxp.Telemetry.TelemetryContext.setGeography \r\n\t* @param {string} geo IP Address of Logged in User. \r\n\t* @example Example to invoke setGeography\r\n\t* FxpTelemetryContext.setGeography(\"127.0.0.1\");\r\n\t*/\r\n\tsetGeography(geo: string) {\r\n\t\tif (geo) {\r\n\t\t\tthis._geography = geo;\r\n\t\t\tthis.notifyContextChangeListeners();\r\n\t\t}\r\n\t\telse\r\n\t\t\tthrow new Error(ApplicationConstants.RequiredMessage.replace('{0}', \"Geography\"));\r\n\r\n\t}\r\n\r\n\t/**\r\n\t* Sets user Session of Telemetry Context Object\r\n\t* @method Fxp.Telemetry.TelemetryContext.setNewUserSession \r\n\t* @param {Fxp.Telemetry.UserInfo} userInfo UserInfo of Logged in User. \r\n\t* @param {string} sessionId sessionId of Logged in User. \r\n\t* @example Example to invoke setNewUserSession\r\n\t* FxpTelemetryContext.setNewUserSession();\r\n\t*/\r\n\tsetNewUserSession(userId: string, sessionId?: string): string {\r\n\t\tif (!sessionId)\r\n\t\t\tsessionId = FxpLogHelper.getNewSessionId(); // CodeQL [js/insecure-randomness] Not a security-sensitive data\r\n\r\n\t\tif (userId) {\r\n\t\t\tthis.setUserID(userId);\r\n\t\t\tthis.setSessionID(sessionId);\r\n\t\t\tthis.notifyContextChangeListeners();\r\n\t\t}\r\n\t\telse\r\n\t\t\tthrow new Error(ApplicationConstants.RequiredMessage.replace('{0}', \"UserInfo\"));\r\n\r\n\t\treturn sessionId;\r\n\t}\r\n\r\n\tinitUserSession(){\r\n\t\tlet sessionIdCached = window.sessionStorage.getItem(ApplicationConstants.FxpSessionKey);\r\n\t\tif (CommonUtils.isNullOrEmpty(sessionIdCached)) {\r\n\t\t\tsessionIdCached = FxpLogHelper.getNewSessionId(); // CodeQL [SM01527] Insecure randomness - The value generated here is not a secret, guids for tracking purpose only\r\n\t\t\twindow.sessionStorage.setItem(ApplicationConstants.FxpSessionKey, sessionIdCached);\r\n\t\t}\r\n\t\tthis.setSessionID(sessionIdCached);\r\n\t\tthis.notifyContextChangeListeners();\r\n\t\tconsole.log(`SessionId: ${sessionIdCached}`) ;\r\n\t}\r\n\r\n\t/**\r\n\t* sets Enviroonment Details of FXP in Telemetry Context Object\r\n\t* @method Fxp.Telemetry.TelemetryContext.setEnvironmentDetails\r\n\t* @param {string} appName Application Name\r\n\t* @param {Fxp.Telemetry.EnvironmentData} envData Environment Details of FXP. \r\n\t* @example Example to invoke setEnvironmentDetails\r\n\t* FxpTelemetryContext.setEnvironmentDetails();\r\n\t*/\r\n\tsetEnvironmentDetails(appName: string, envData: EnvironmentData) {\r\n\t\tif (!CommonUtils.isNullOrEmpty(appName) && (envData))\r\n\t\t\tthis._envData[appName.toLowerCase()] = envData;\r\n\t\telse\r\n\t\t\tthrow new Error(ApplicationConstants.RequiredMessage.replace('{0}', \"Environment Data\"));\r\n\t}\r\n\t/**\r\n\t* sets Partner Enviroonment Details of FXP in Telemetry Context Object\r\n\t* @method Fxp.Telemetry.TelemetryContext.setEnvironmentDetails\r\n\t* @param {string} environmentName EnvironmentName is Environment Name of the Application like \"Development\" or \"Production\" etc..\r\n\t* @param {Object} partnersTelmetryInfo is a collection of partner telemetry environment details\r\n\t* @example Example to invoke setEnvironmentDetails\r\n\t* FxpTelemetryContext.setPartnerEnvironmentDetails();\r\n\t*/\r\n\tsetPartnerEnvironmentDetails(environmentName, partnersTelmetryInfo) {\r\n\t\tvar self = this;\r\n\t\ttry {\r\n\t\t\tif (!CommonUtils.isNullOrEmpty(partnersTelmetryInfo)) {\r\n\t\t\t\tfor (var index = 0, length = partnersTelmetryInfo.length; index < length; index++) {\r\n\t\t\t\t\tvar partnerTelmetryInfo = partnersTelmetryInfo[index];\r\n\t\t\t\t\tif (!CommonUtils.isNullOrEmpty(partnerTelmetryInfo.Name))\r\n\t\t\t\t\t\tself._envData[partnerTelmetryInfo.Name.toLowerCase()] = new EnvironmentData(environmentName,\r\n\t\t\t\t\t\t\tpartnerTelmetryInfo.ServiceOffering,\r\n\t\t\t\t\t\t\tpartnerTelmetryInfo.ServiceLine,\r\n\t\t\t\t\t\t\t!CommonUtils.isNullOrEmpty(partnerTelmetryInfo.Service) ? partnerTelmetryInfo.Service : \"\",\r\n\t\t\t\t\t\t\t!CommonUtils.isNullOrEmpty(partnerTelmetryInfo.ComponentId) ? partnerTelmetryInfo.ComponentId : \"\",\r\n\t\t\t\t\t\t\tpartnerTelmetryInfo.ComponentName,\r\n\t\t\t\t\t\t\tpartnerTelmetryInfo.Name,\r\n\t\t\t\t\t\t\tpartnerTelmetryInfo.IctoId,\r\n\t\t\t\t\t\t\tpartnerTelmetryInfo.BusinessProcessName);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (exception) {\r\n\t\t\tconsole.log(exception);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t* gets Environment Details of FXP, return type of the method is a type of Fxp.Telemetry.EnvironmentData class\r\n\t* @method Fxp.Telemetry.TelemetryContext.getEnvironmentDetails\r\n\t* @param {string} appName Application Name\r\n\t* @example Example to invoke getEnvironmentDetails\r\n\t* FxpTelemetryContext.getEnvironmentDetails();\r\n\t*/\r\n\tgetEnvironmentDetails(appName: string): EnvironmentData {\r\n\t\tvar envData;\r\n\t\tif (!CommonUtils.isNullOrEmpty(appName))\r\n\t\t\tenvData = this._envData[appName.toLowerCase()];\r\n\t\treturn envData;\r\n\t}\r\n\r\n\t/**\r\n\t* adds Context Change Event Listner\r\n\t* @method Fxp.Telemetry.TelemetryContext.addContextChangeListener \r\n\t* @param {Fxp.Interfaces.ITelemetryContextListener} listener Context Change Event Listner\r\n\t* @example Example to invoke addContextChangeListener\r\n\t* FxpTelemetryContext.addContextChangeListener(\"xxxx\");\r\n\t*/\r\n\taddContextChangeListener(listener: ITelemetryContextListener) {\r\n\t\tthis.contextChangeListeners.push(listener);\r\n\t}\r\n\r\n\tprivate notifyContextChangeListeners() {\r\n\t\tfor (var listener in this.contextChangeListeners)\r\n\t\t\tthis.contextChangeListeners[listener].notify();\r\n\t}\r\n}\r\n","import { ApplicationConstants } from \"../common/ApplicationConstants\";\r\n\r\nexport class CommonUtils {\r\n\r\n public static clone(input: object): any {\r\n return JSON.parse(JSON.stringify(input));\r\n }\r\n\r\n public static isNullOrEmpty(input: any) {\r\n return (input === null || input === undefined || jQuery.isEmptyObject(input) || input.toString().length === 0 || input === \"null\");\r\n }\r\n\r\n public static getNewGuId(): string {\r\n var d: number = new Date().getTime();\r\n var guid: string = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\r\n var r = (d + Math.random() * 16) % 16 | 0;\r\n d = Math.floor(d / 16);\r\n return (c == 'x' ? r : (r & 0x3 | 0x8)).toString(16);\r\n });\r\n\r\n return guid;\r\n }\r\n\r\n public static isObject(obj: any): boolean {\r\n return (!!obj) && (obj.constructor === Object);\r\n }\r\n\r\n public static pullFocusToElement(elementId): void {\r\n $('#' + elementId).focus();\r\n }\r\n\r\n public static angularInherits(ctor, superCtor): void {\r\n ctor.super_ = superCtor;\r\n if (superCtor) {\r\n ctor.prototype = Object.create(superCtor.prototype, {\r\n constructor: {\r\n value: ctor,\r\n enumerable: false\r\n }\r\n });\r\n }\r\n }\r\n\r\n public static hashCode(value): string {\r\n var hash = 0;\r\n if (value.length == 0)\r\n return hash.toString();\r\n for (var i = 0; i < value.length; i++) {\r\n var char = value.toString().charCodeAt(i);\r\n hash = ((hash << 5) - hash) + char;\r\n hash = hash & hash; // Convert to 32bit integer\r\n }\r\n return hash.toString();\r\n }\r\n\r\n public static isGuid(value) {\r\n var regex = /[a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12}/i;\r\n var match = regex.exec(value);\r\n return match != null;\r\n }\r\n\r\n public static getSessionStorageUserInfoKey(userIdentifier: string): string {\r\n if (userIdentifier === undefined || userIdentifier === null)\r\n return null;\r\n\r\n if (this.isGuid(userIdentifier))\r\n return userIdentifier + \"-userInfo\";\r\n return userIdentifier.toLowerCase() + \"-userInfo\";\r\n }\r\n\r\n public static getSessionStorageUserClaimsKey(userIdentifier: string): string {\r\n if (userIdentifier === undefined || userIdentifier === null)\r\n return null;\r\n\r\n if (this.isGuid(userIdentifier))\r\n return \"fxpUserClaims_\" + userIdentifier;\r\n return \"fxpUserClaims_\" + userIdentifier.toLowerCase();\r\n }\r\n\r\n public static getArrayLength(arrayCollection): number {\r\n return CommonUtils.isNullOrEmpty(arrayCollection) ? 0 : arrayCollection.length;\r\n }\r\n\r\n public static getIndexOfObject(source, compareKey, value): number {\r\n var index = -1;\r\n var length = source.length;\r\n for (let i = 0; i < length; i++) {\r\n if (source[i][compareKey] === value) {\r\n index = i;\r\n break;\r\n }\r\n }\r\n return index;\r\n }\r\n\r\n public static generateUPN(userInfo: any, fxpAppSettings: any): string {\r\n // getting user alias and removing partners~ from it if it is there.\r\n let UPN = userInfo.Alias;\r\n if (userInfo.Domain.toLowerCase() == \"corpnet\")\r\n // appending domain.\r\n UPN += fxpAppSettings.UpnCorpnet;\r\n else\r\n // removing partners~ from UPN if it is there and appending partner domain.\r\n UPN = UPN.substring(UPN.indexOf('~') + 1) + fxpAppSettings.UpnPartner;\r\n return UPN.toLowerCase();\r\n }\r\n\r\n public static stringFormat(str: string, ...params: string[]) {\r\n return str.replace(/{(\\d+)}/g, function (match, number) {\r\n return typeof params[number] != 'undefined'\r\n ? params[number]\r\n : match\r\n ;\r\n });\r\n }\r\n\r\n public static getTenantURLSpecificPageTitle(str: string) {\r\n if (window.location.href.indexOf(ApplicationConstants.SalesTenantUrlString) > -1) {\r\n return str.replace(ApplicationConstants.ESTenanatUrlString, ApplicationConstants.SalesTenantUrlString);\r\n }\r\n return str;\r\n }\r\n\r\n public static jsonConcat(obj1: any, obj2: any) {\r\n for (var key in obj2) {\r\n obj1[key] = obj2[key];\r\n }\r\n return obj1;\r\n }\r\n\r\n private static isObjectAnArray(val: any): boolean {\r\n return Object.prototype.toString.call(val) === '[object Array]';\r\n }\r\n\r\n private static isPlainObject(val: any): boolean {\r\n return Object.prototype.toString.call(val) === '[object Object]';\r\n }\r\n\r\n /**\r\n * This method reads the value of the property specified with key parameter from the given object in case insensitive way.\r\n * @abstract\r\n * @method CommonUtils#getPropertyValueCaseInsensitive\r\n * @param {object} object - Object on which property has to be read.\r\n * @param {string} key - Name of the property in any case (Upper, Lower, Pascal, Camel)\r\n * @returns {string} - The value of the property on the given object.\r\n */\r\n public static getPropertyValueCaseInsensitive(object: object, key: string) {\r\n return object[Object.keys(object).filter(function (k) {\r\n return k.toLowerCase() === key.toLowerCase();\r\n })[0]];\r\n }\r\n\r\n public static sortJsonObj(inputJson: any, isArray: boolean = false) {\r\n isArray = isArray || false;\r\n let inputObject: any = {};\r\n if (CommonUtils.isObjectAnArray(inputJson)) {\r\n // Sort or don't sort arrays\r\n if (isArray) {\r\n inputObject = inputJson;\r\n } else {\r\n inputObject = inputJson.sort();\r\n }\r\n\r\n inputObject.forEach(function (v, i) {\r\n inputObject[i] = CommonUtils.sortJsonObj(v, isArray);\r\n });\r\n\r\n if (!isArray) {\r\n inputObject = inputObject.sort(function (a, b) {\r\n a = JSON.stringify(a);\r\n b = JSON.stringify(b);\r\n return a < b ? -1 : (a > b ? 1 : 0);\r\n });\r\n }\r\n } else if (CommonUtils.isPlainObject(inputJson)) {\r\n inputObject = {};\r\n Object.keys(inputJson).sort(function (a, b) {\r\n if (a.toLowerCase() < b.toLowerCase()) return -1;\r\n if (a.toLowerCase() > b.toLowerCase()) return 1;\r\n return 0;\r\n }).forEach(function (key) {\r\n inputObject[key] = CommonUtils.sortJsonObj(inputJson[key], isArray);\r\n });\r\n } else {\r\n inputObject = inputJson;\r\n }\r\n return inputObject;\r\n }\r\n\r\n public static objectToString(input: any): string {\r\n if (!input) return null;\r\n if (typeof input === \"string\") {\r\n return input;\r\n }\r\n if (!CommonUtils.isObject(input)) return null;\r\n\r\n try {\r\n return JSON.stringify(input);\r\n }\r\n catch (e) {\r\n return null;\r\n }\r\n\r\n }\r\n\r\n public static getQueryString(field: string, url?: string) {\r\n var href = url ? url : window.location.href;\r\n var reg = new RegExp('[?&]' + field + '=([^&#]*)', 'i');\r\n var string = reg.exec(href);\r\n return string ? string[1] : null;\r\n };\r\n\r\n public static getScriptBaseUrl(){\r\n var baseUrl = '';\r\n var currentScriptUrl = document.currentScript['src'];\r\n if (currentScriptUrl.indexOf('exclude.inline.bundle') > 0) {\r\n currentScriptUrl = Error().stack.match(/(https?:\\/\\/[^ ]*)/g);\r\n baseUrl = currentScriptUrl\r\n .filter((item) => item.indexOf('localhost:5000') === -1)[0]\r\n .toLowerCase();\r\n baseUrl = baseUrl.substring(0, baseUrl.lastIndexOf('/'));\r\n } else {\r\n baseUrl = currentScriptUrl.substring(0, currentScriptUrl.lastIndexOf('/'));\r\n }\r\n if (baseUrl.endsWith(\"/\")){\r\n baseUrl = baseUrl.substring(0, baseUrl.lastIndexOf('/'));\r\n }\r\n return baseUrl;\r\n }\r\n\r\n public static removePII(data: string):string{\r\n let FxpAppSettings: any = window[\"FxpAppSettings\"];\r\n if (CommonUtils.isNullOrEmpty(data)) {\r\n return data;\r\n }\r\n else if(CommonUtils.isObject(data)){\r\n\t\t\tdata = CommonUtils.objectToString(data);\r\n\t\t\tif(CommonUtils.isNullOrEmpty(data)){\r\n\t\t\t\treturn data;\r\n\t\t\t}\r\n\t\t}\r\n else {\r\n data = String(data);\r\n }\r\n let PIIRegex;\r\n if (CommonUtils.isNullOrEmpty(FxpAppSettings?.PIIFilterRegex) \r\n && !CommonUtils.isNullOrEmpty(ApplicationConstants?.PIIFilterRegex)) {\r\n PIIRegex = JSON.parse(ApplicationConstants?.PIIFilterRegex);\r\n }\r\n else {\r\n PIIRegex = JSON.parse(FxpAppSettings?.PIIFilterRegex);\r\n }\r\n if(!CommonUtils.isNullOrEmpty(PIIRegex)){\r\n PIIRegex.forEach((filter) => {\r\n const regexp = new RegExp(filter, \"g\");\r\n data = data?.replace(regexp, \"REDACTED\");\r\n });\r\n }\r\n return data;\r\n }\r\n}\r\n","import { IWindowService } from \"angular\";\r\nimport { FxpBroadcastedEvents } from \"../services/FxpBroadcastedEvents\";\r\nimport { IFxPService } from \"../interfaces/IFxpService\";\r\ndeclare var _: any; \r\n\r\nexport class DeviceFactoryProvider implements IFxPService{ \r\n\r\n resolution: any;\r\n\r\n constructor(private $window:angular.IWindowService, private $rootScope:angular.IWindowService, private $timeout:angular.ITimeoutService){\r\n this.resolution = {\r\n devicePixelRatio:$window.devicePixelRatio,\r\n types: {\r\n mobile: 'xs',\r\n tablet: 'sm',\r\n desktop: 'lg'\r\n }\r\n };\r\n\r\n this.resolution.size = this.getWindowSize();\r\n this.resolution.type = this.updateType();\r\n\r\n var self = this;\r\n var lazyUpdate = _.throttle(function (event) {\r\n $timeout(function () {\r\n self.resolution.size = self.getWindowSize();\r\n self.resolution.type = self.updateType();\r\n $rootScope.$broadcast(FxpBroadcastedEvents.OnLayoutChanged, self.resolution.type);\r\n });\r\n }, 250);\r\n\r\n angular\r\n .element($window)\r\n .bind('resize', lazyUpdate);\r\n }\r\n\r\n getWindowSize = function () {\r\n return {\r\n width: this.$window.innerWidth,\r\n height: this.$window.innerHeight\r\n };\r\n };\r\n\r\n updateType = function () {\r\n if (this.resolution.size.width <= 736) {\r\n return this.resolution.types.mobile;\r\n }\r\n else if (this.resolution.size.width <= 1024) {\r\n return this.resolution.types.tablet;\r\n }\r\n else if (this.resolution.size.width > 1024) {\r\n return this.resolution.types.desktop;\r\n }\r\n };\r\n\r\n isSmallScreen = function () {\r\n return this.resolution.type === this.resolution.types.mobile\r\n || this.resolution.type === this.resolution.types.tablet;\r\n };\r\n\r\n isMobile = function () {\r\n return this.resolution.type === this.resolution.types.mobile;\r\n };\r\n\r\n isTablet = function () {\r\n return this.resolution.type === this.resolution.types.tablet;\r\n };\r\n\r\n isDesktop = function () {\r\n return this.resolution.type === this.resolution.types.desktop;\r\n };\r\n\r\n}\r\n","// download system-down-div.html and put in index.cshtml div.\r\nexport function showSystemDownOverlay(headerText, descriptionText, pageTitle, supportLinkText?, supportLink?, showSupportLinks?) {\r\n\tdocument.title = pageTitle;\r\n\t$(\"#contentHost\").load(\"templates/system-down-div.html\", function () {\r\n\t\tif (headerText)\r\n\t\t\tdocument.getElementById(\"headerText\").innerHTML = headerText;\r\n\t\tif (descriptionText)\r\n\t\t\tdocument.getElementById(\"descriptionText\").innerHTML = descriptionText;\r\n\r\n\t\tif (!showSupportLinks){\r\n\t\t\t$('#supportLinkContainer').hide();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (supportLinkText)\r\n\t\t\tdocument.getElementById(\"supportLink\").innerHTML = supportLinkText;\r\n\t\tif (supportLink) {\r\n\t\t\tdocument.getElementById(\"supportLink\").setAttribute(\"href\", supportLink);\r\n\t\t}\r\n\t});\r\n}","import * as core from '@angular/core';\r\nimport * as common from '@angular/common';\r\nimport * as forms from '@angular/forms';\r\nimport * as animations from \"@angular/animations\";\r\nimport * as router from '@uirouter/angular';\r\nimport * as rx from 'rxjs';\r\nimport * as plat from '@angular/platform-browser';\r\nimport * as dny from '@angular/platform-browser-dynamic';\r\nimport * as upgrade from '@angular/upgrade';\r\nimport * as ngbootstrap from '@ng-bootstrap/ng-bootstrap';\r\n\r\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\r\nimport { UpgradeModule, downgradeComponent } from '@angular/upgrade/static';\r\n\r\nimport { UrlService } from '@uirouter/core';\r\nimport '@uirouter/angularjs/release/stateEvents';\r\nimport { AppModule } from './app/modules/app.module';\r\nimport { CommonUtils } from './js/utils/CommonUtils';\r\nimport { GlobalExceptionHandler } from './js/telemetry/GlobalExceptionHandler';\r\nimport { enableProdMode, Compiler, NgZone } from '@angular/core';\r\nimport { FxpLazyLoader } from './app/fxplazyloader';\r\nimport { Resiliency } from './js/resiliency/FxpResiliency';\r\nimport { getUIRouter } from '@uirouter/angular-hybrid'\r\nimport { TelemetryConstants } from './js/telemetry/TelemetryConst';\r\nimport { SystemEvent } from './js/telemetry/SystemEvent';\r\nimport { ComponentType } from \"@microsoftit/telemetry-extensions-npm\";\r\nimport { FxpConstants } from './js/common/ApplicationConstants';\r\nimport { ErrorSeverityLevel } from './js/telemetry/ErrorSeverityLevel';\r\nimport { FxpLoggerService } from './js/telemetry/fxpLogger';\r\nimport { ErrorCodes } from './js/constants/errorCodes';\r\n\r\n//Exposing _showPageDirtyPopup in browser console.\r\ndeclare global {\r\n\tinterface Window { _showPageDirtyPopup: boolean; }\r\n}\r\ndeclare const angular: any;\r\nconst fxpLoggerService: FxpLoggerService = FxpLoggerService.getInstance(); \r\n\r\nconst fxpModule = angular.module('FxPApp');\r\nfxpModule.config(['$urlServiceProvider', ($urlService: UrlService) => $urlService.deferIntercept()]);\r\n\r\nconst dependentModules = Resiliency.getResilientModules(fxpModule.requires);\r\n// TODO: This needs to go to configuration.\r\ndependentModules.push('ui.router.upgrade');\r\ndependentModules.push('ui.router.state.events');\r\ndeclare const FxpBaseConfiguration: any;\r\n\r\nfxpModule.requires = dependentModules;\r\n\r\nconst source = `${TelemetryConstants.FXP_TELEMETRY_BASE_NAME}.Main` ;\r\n\r\nif (!CommonUtils.getQueryString(\"debug\")) {\r\n enableProdMode();\r\n console.log('Disabling console.log in PROD mode'); \r\n console.log = function(){}\r\n}\r\n\r\ntry {\r\n\r\n \r\n const customProperties = fxpLoggerService.createPropertyBag();\r\n \r\n fxpLoggerService.logSystemEvent(source, \r\n new SystemEvent(TelemetryConstants.FXP_TELEMETRY_PLATFORM_BOOTSTRAP + \".ModuleBootstrapBegin\", \r\n ComponentType.Web, \"Bootstrapping angular modules\"),\r\n customProperties);\r\n\r\n const preBootstrapTimeStamp = performance.now();\r\n platformBrowserDynamic().bootstrapModule(AppModule).then(platformReference => {\r\n fxpLoggerService.logSystemEvent(source, \r\n new SystemEvent(TelemetryConstants.FXP_TELEMETRY_PLATFORM_BOOTSTRAP + \".ModuleBootstrapEnd\", \r\n ComponentType.Web, \r\n \"Bootstrapping angular modules completed\"), \r\n customProperties); \r\n \r\n customProperties.addToBag('SystemMessage', 'Time taken to Bootstrap FxP @angular and angularjs modules .');\r\n const duration: any = performance.now() - preBootstrapTimeStamp;\r\n fxpLoggerService.logMetric(source, FxpConstants.metricConstants.ModuleBootstrapping, duration, customProperties); \r\n\r\n const upgradeModule = platformReference.injector.get(UpgradeModule); \r\n upgradeModule.bootstrap(document.documentElement, ['FxPApp']);\r\n const url: UrlService = getUIRouter(platformReference.injector).urlService; //platformReference.injector.get(UrlService);\r\n function startUIRouter() {\r\n url.listen();\r\n url.sync();\r\n }\r\n const ngZone: NgZone = platformReference.injector.get(NgZone);\r\n ngZone.run(startUIRouter);\r\n FxpLazyLoader.setRootModuleReference(platformReference);\r\n });\r\n} catch (err) {\r\n const error = new Error();\r\n let systemDownHeader, systemDownDescription, systemDownPageTitle;\r\n error.message = 'FxP App Boot Failure';\r\n if (FxpBaseConfiguration.FxpConfigurationStrings.UIMessages.JavaScriptException) {\r\n systemDownHeader = FxpBaseConfiguration.FxpConfigurationStrings.UIMessages.JavaScriptException.ErrorMessageTitle;\r\n systemDownDescription = FxpBaseConfiguration.FxpConfigurationStrings.UIMessages.JavaScriptException.ErrorMessage;\r\n systemDownPageTitle = CommonUtils.getTenantURLSpecificPageTitle(FxpBaseConfiguration.FxpConfigurationStrings.UIMessages.JavaScriptException.PageTitle);\r\n } else {\r\n console.error(\"Failed to load JavaScriptException error string from UIMessages\");\r\n }\r\n // More specific error logging.\r\n console.error(\"FxP App Boot Failure: \", err.message);\r\n \r\n const errorProperites = fxpLoggerService.createPropertyBag();\r\n errorProperites.addToBag(\"Message\", err.message);\r\n errorProperites.addToBag('ErrorCode', ErrorCodes.ModuleBoostrapFailure)\r\n\r\n fxpLoggerService.logException(source, err, errorProperites, undefined, undefined, ErrorSeverityLevel.Critical); \r\n GlobalExceptionHandler.logFxpBootFailure(errorProperites, source, systemDownHeader, systemDownDescription, systemDownPageTitle);\r\n}\r\n","module.exports = angular;"],"sourceRoot":"webpack:///FxpNG2"}