{"version":3,"sources":["authConfig.js","helpers/sidebar-helpers.ts","_nav.js","containers/DefaultLayout/Sidebar.tsx","helpers/expirationDate-helpers.ts","components/HelpInfoModal.tsx","components/PageTitle.tsx","containers/DefaultLayout/DefaultFooter.tsx","components/ChannelBillingEmail.tsx","components/ExpirationDateModal.tsx","containers/DefaultLayout/AntDefaultLayout.tsx","views/Pages/LoadingLayout.tsx","views/Pages/Login/Login.tsx","components/PrivateRoute.tsx","routes.js","App.tsx","helpers/agGridLoader.js","index.js","auth/endpointPermissions.ts","auth/authAxiosRequest.js","redux/slices/user.slice.js","views/Google/helpers/google-analytics-init.ts","components/Loading.tsx","data/api.ts","components/SupportInfo.tsx","redux/slices/analytics.slice.js","redux/slices/featureFlags.slice.js","redux/slices/catalogData.slice.js","redux/actions/featureFlags.action.js","containers/DefaultLayout/DefaultHeader.tsx","redux/slices/index.js","redux/store.js","redux/slices/expirationDate.slice.js","components/ErrorFallback.tsx","hooks/useFeature.js","auth/featureDecisions.ts","redux/slices/catalog.slice.js","hooks/useAxiosRequest.ts","components/CustomErrorMsgRHF.tsx","redux/slices/ids.slice.js","views/Logins/CatalogSelect.tsx","app-config.js","views/Pages/SelectCatalog/SelectCatalog.tsx","redux/selectors/catalog.selector.js","redux/selectors/user.selector.js","redux/selectors/analytics.selector.js","redux/selectors/ids.selector.js","redux/selectors/featureFlags.selector.js","redux/selectors/expirationDate.selector.js"],"names":["msalConfig","config","REACT_APP_AZURE_TENANTID","auth","clientId","REACT_APP_AZURE_CLIENTID","authority","knownAuthorities","redirectUri","postLogoutRedirectUri","navigateToLoginRequestUrl","cache","cacheLocation","storeAuthStateInCookie","system","loggerOptions","loggerCallback","level","message","containsPii","LogLevel","Error","console","error","Info","info","Verbose","debug","Warning","warn","loginScopes","scopes","REACT_APP_AZURE_API_CLIENTID","limitAntNavTree","navConfig","featureFlags","filteredSidebar","forEach","sidebarItem","concat","addSidebarItemToAntNavTree","flagName","children","rest","push","lastItemIndex","length","reduce","childItem","key","icon","DesktopOutlined","label","to","TeamOutlined","DatabaseOutlined","PictureOutlined","FileOutlined","ReadOutlined","RiseOutlined","SettingOutlined","FolderOutlined","Sider","Layout","Sidebar","props","collapsed","setCollapsed","setCollapseType","sidebarWidth","setSidebarWidth","path","useRouteMatch","useFeature","features","useState","antSidebarConfig","limitedSidebar","setLimitedSidebar","initialKeys","sidebarConfig","segments","split","topRoute","find","segmentKeys","segmentIndex","nextSegment","nextRoute","childSidebarItem","selectedKeys","openKeys","initializeRoute","setSelectedKeys","setOpenKeys","savedOpenKeys","setSavedOpenKeys","useEffect","className","collapsible","onBreakpoint","broken","onCollapse","collapsing","type","breakpoint","collapsedWidth","mode","forceSubMenuRender","items","theme","defaultOpenKeys","onOpenChange","updatedOpenKeys","onSelect","checkDateValidity","expirationDate","moment","isValid","HelpInfoModal","activeRoute","useSelector","getServiceExpirationDate","showHelpCard","setShowHelpCard","isValidDate","HelpCard","helpCard","Fragment","title","aria-label","shape","size","onClick","QuestionCircleFilled","wrapClassName","open","destroyOnClose","onCancel","footer","color","name","Card","style","maxHeight","overflow","CardBody","Container","href","target","rel","SupportInfo","PageTitle","Helmet","DefaultFooter","currentYear","year","fontSize","ChannelBillingEmail","ExpirationDateModal","dispatch","useDispatch","isExpirationConfirmed","isExpirationModalConfirmed","showModal","setShowModal","isNearlyExpired","isBefore","add","checkDateNearlyExpired","isExpired","checkDateExpired","maskClosable","data-testid","confirmExpirationDateModal","FormGroup","marginLeft","Header","Content","Footer","AntDefaultLayout","window","innerWidth","collapseType","DefaultHeader","Item","fluid","LoadingLayout","hideCatalog","Loading","Login","loginWithRedirect","useAuth0","instance","useMsal","Row","Col","sm","md","CardGroup","src","REACT_APP_COMPANY_LOGO","alt","maxWidth","paddingBottom","xs","REACT_APP_AZURE_AUTH","loginRedirect","redirectStartPage","PrivateRoute","Component","component","isAuthenticatedAuth0","isAuthenticated","accounts","isAuthenticatedAzure","useIsAuthenticated","log","a","location","account","pathname","appState","targetUrl","fn","exact","render","Redirect","lazy","Dashboard","DashboardHelp","SelectCatalog","Categories","CategoriesHelp","ReorderCategory","CategoryReorderHelp","UpdateCategory","CreateCategory","CategoryFormHelp","Brands","BrandsHelp","UpdateBrand","then","componentFile","default","UpdateBrandWrapper","CreateBrand","BrandFormHelp","AssetManagementFormHelp","AssetManagement","UpdateAsset","UpdateAssetWrapper","AssetManagementViewHelp","UpdateResource","CreateResource","ResourceFormHelp","ResourceCenter","ResourcesWrapper","ResourceCenterHelp","ReorderResource","ResourceReorderHelp","SearchManagement","SearchManagementHelp","Warehouses","WarehousesHelp","UpdateWarehouse","UpdateWarehouseWrapper","CreateWarehouse","WarehouseFormHelp","ReorderWarehouse","WarehouseReorderHelp","ProductBackups","ProductBackupHelp","RestoreProductBackup","CreateProductBackup","RestoreProductBackupHelp","CreateProductBackupHelp","Import","ImportHelp","Products","ProductsHelp","UpdateProduct","UpdateProductWrapper","CreateNewProduct","ProductHelp","Coupons","CouponsWrapper","CouponsHelp","UpdateCoupon","UpdateCouponWrapper","CreateNewCoupon","CouponHelp","UpdateCustomer","UpdateCustomerWrapper","CreateNewCustomer","CustomerHelp","Customers","CustomersHelp","UpdateLogin","UpdateLoginWrapper","CreateNewLogin","LoginHelp","Logins","LoginsHelp","UpdateShippingMethod","UpdateShipMethodWrapper","CreateNewShippingMethod","ShippingMethodHelp","ShippingMethods","ShippingMethodsHelp","UpdateShippingRate","UpdateShipRateWrapper","CreateNewShippingRate","ShippingRateHelp","ShippingRates","ShippingRatesWrapper","ShippingRatesHelp","UpdateTerm","UpdateTermWrapper","CreateNewTerm","TermHelp","Terms","TermsHelp","Translations","TranslationsHelp","UpdateTranslation","UpdateTranslationWrapper","CreateNewTranslation","TranslationHelp","CustomerNumbers","CustNumsHelp","UpdateCustomerNumber","UpdateCustNumWrapper","CreateCustomerNumber","CustNumHelp","ContentGroups","ContentGroupsWrapper","UpdateContentGroup","UpdateContentGroupWrapper","CreateContentGroup","ContentGroupHelp","ContentGroupsViewHelp","OrderHistory","OrderHistoryWrapper","OrderHistoryHelp","AbandonedCartReports","AbandonedCartHelp","LoginReports","LoginReportsHelp","SuccessfulSearches","SuccessfulSearchesHelp","FailedSearches","UsageReports","UsageReportsHelp","ACHReports","ACHReportsWrapper","ACHReportsHelp","AudienceOverview","AudienceOverviewHelp","EcommerceOverview","EcommerceOverviewHelp","GoogleAnalyticsSettings","GoogleAnalyticsSettingsHelp","WebSetupCountries","CountriesWrapper","WebSetupCountriesHelp","UpdateWebSetupCountry","UpdateCountryWrapper","CreateWebSetupCountry","CreateCountryWrapper","WebSetupCountryHelp","WebSetupStates","StatesViewWrapper","WebSetupStatesHelp","UpdateWebSetupState","UpdateStateWrapper","CreateWebSetupState","CreateStateWrapper","WebSetupStateHelp","WebSetupCustomFields","CustomFieldsWrapper","WebSetupCustomFieldsViewHelp","CreateWebSetupCustomField","CreateCustomFieldWrapper","UpdateWebSetupCustomFields","ReorderCustomFieldsWrapper","WebSetupCustomFieldViewHelp","WebSetupReorderCustomFieldHelp","WebSetupWebControls","WebControlsWrapper","WebSetupWebControlsHelp","UpdateWebControl","UpdateWebControlWrapper","WebSetupWebControlHelp","SalesReps","SalesRepsWrapper","SalesRepsHelp","UpdateSalesRep","UpdateSalesRepWrapper","CreateSalesRep","SalesRepHelp","SalesRepTypes","SalesRepTypesWrapper","UpdateRepType","UpdateRepTypeWrapper","CreateRepType","FeatureFlagsView","FeatureFlagsWrapper","UpdateFeatureFlagView","UpdateFeatureFlagWrapper","FeatureFlagsViewHelp","FeatureFlagHelp","ShippingAddressesView","ShippingAddressesWrapper","ShippingAddressesHelp","UpdateShippingAddressView","UpdateShipAddressWrapper","CreateShippingAddressView","ShippingAddressHelp","ExtraBillingView","ExtraBillingsWrapper","ExtraBillingsHelp","UpdateExtraBillingView","UpdateExtraBillingWrapper","CreateExtraBillingView","ExtraBillingHelp","ApprovalGroupsView","ApprovalGroupsWrapper","ApprovalGroupsHelp","UpdateApprovalGroupView","UpdateApprovalGroupWrapper","CreateApprovalGroupView","ApprovalGroupHelp","LoginBudgets","LoginBudgetsWrapper","LoginBudgetsHelp","UpdateLoginBudget","UpdateLoginBudgetWrapper","CreateLoginBudget","LoginBudgetHelp","ImageOverlays","ImageOverlaysHelp","UpdateImageOverlay","UpdateOverlayWrapper","CreateNewImageOverlay","ImageOverlayHelp","routes","App","isLoading","user","getAccessTokenSilently","inProgress","token","getToken","tokenLoadedFlag","isTokenLoaded","catalog","getPermissions","isPermissionsLoaded","getCatalog","catalogSelectedFlag","isCatalogSelected","catalogDataLoadedFlag","isCatalogDataLoaded","gaConfigFetchedFlag","isGAConfigFetched","featureFlagsLoadedFlag","isFeatureFlagsLoaded","showAnalytics","pendingTokenRequest","setPendingTokenRequest","updateTokenFxn","authorizationParams","audience","REACT_APP_AUTH0_AUDIENCE","setToken","slice","setPermissions","InteractionStatus","None","request","acquireTokenSilent","res","accessToken","catch","InteractionRequiredAuthError","acquireTokenRedirect","finally","userAuthObject","roles","username","toLowerCase","includes","fetchFeatureFlags","data","setFeatureFlags","err","fetchCatalog","setCatalogData","getAnalyticsConfig","setAnalytics","status","REACT_APP_PUBLIC_URL","basename","SelectCatalogView","map","route","idx","InnerComponent","fallback","FallbackComponent","ErrorFallback","from","LicenseManager","setLicenseKey","ModuleRegistry","registerModules","ClientSideRowModelModule","InfiniteRowModelModule","RowGroupingModule","MasterDetailModule","SideBarModule","FiltersToolPanelModule","CsvExportModule","ExcelExportModule","ServerSideRowModelModule","AuthWrapper","queryClient","QueryClient","defaultOptions","queries","retry","staleTime","refetchOnMount","refetchOnWindowFocus","AppGuts","client","panelProps","bottom","msalInstance","PublicClientApplication","getActiveAccount","getAllAccounts","setActiveAccount","addEventCallback","event","eventType","EventType","LOGIN_SUCCESS","ACQUIRE_TOKEN_SUCCESS","SSO_SILENT_SUCCESS","payload","domain","REACT_APP_AUTH0_DOMAIN","REACT_APP_AUTH0_CLIENTID","redirect_uri","origin","onRedirectCallback","history","replaceState","document","crypto","subtle","webkitSubtle","container","getElementById","createRoot","store","permissionMap","isUrlPermitted","reqOptions","foundEndpoint","endpointObj","url","replace","method","featureDecisions","createFeatureDecisionsFromStore","includeFeature","getAPIVariable","REACT_APP_API","axios","create","baseURL","controller","AbortController","failedReqAttempts","wrappedRequest","options","storeData","reduxStore","getState","Promise","reject","optionsWithAuth","signal","headers","Authorization","Pragma","response","undefined","abort","userSlice","createSlice","initialState","permissions","reducers","state","action","actions","reducer","createValidationSchema","dataModel","analyticsModel","schema","Object","keys","field","validationScheme","clientEmail","initialValue","Yup","nullable","required","privateKey","applicationName","propertyId","convertDatesForGA4","dateRange","startDate","format","endDate","getGA4DashboardCardData","metrics","metricIndex","parseFloat","metricValues","value","parseGA4TopRevenueData","analyticsData","tableRows","rows","rowData","dimensionValues","parseGA4TrafficChartData","chartDates","chartMetrics","metrics1","metrics2","metrics3","metrics4","labels","data1","data2","data3","data4","parseGA4EcommerceChartData","metricHeaders","fetchCatalogs","axiosWrapper","fetchCategories","fetchCategory","categoryID","fetchCategoryTree","deleteCategory","updateCategory","values","createCategory","reorderCategories","categoryStructure","alphabetizeCategories","propagateCatImages","fetchPagedProducts","optionsString","querystring","stringify","fetchProduct","webID","checkPartNumberUnique","partNumber","checkFriendlyUrlUnique","friendlyUrl","createProduct","productData","updateProduct","deleteProduct","deleteProducts","webIdArray","exportProducts","responseType","exportRelatedProducts","exportVariantProducts","exportGalleryImages","exportCategories","fetchBrands","fetchBrand","brandId","updateBrand","brandData","createBrand","deleteBrand","fetchProductBackups","fetchProductBackup","backupId","createProductBackup","restoreProductBackup","deleteProductBackup","fetchWarehouses","fetchWarehouse","warehouseId","createWarehouse","updateWarehouse","deleteWarehouse","reorderWarehouses","warehouseStructure","uploadSpreadsheet","importSpreadsheet","onProgress","formData","FormData","append","onUploadProgress","total","loaded","percent","Math","round","mapProductFieldsFromUpload","spreadsheetId","activeSheet","callV3ProductImport","body","attachmentId","worksheetName","endpoint","mapCategoryFieldsFromUpload","mapCustomerFieldsFromUpload","mapTranslationFieldsFromUpload","mapBillingFieldsFromUpload","mapProductDocFieldsFromUpload","mapProductGalleryFieldsFromUpload","tusImageUpload","tusDocumentUpload","deleteBulkUpload","fetchCoupons","fetchCoupon","couponType","couponID","createProductCoupon","productCouponData","updateProductCoupon","couponId","createOrderCoupon","orderCouponData","updateOrderCoupon","deleteCoupon","fetchSearchConfig","updateSearchConfig","searchSettingsPatch","indexSearch","productSearch","fetchCustomers","fetchCustomer","customerId","createCustomer","updateCustomer","id","deleteCustomer","fetchLogins","custId","fetchLogin","userId","createLogin","updateLogin","deleteLogin","resetLoginPW","fetchShippingMethods","fetchShippingMethod","createShippingMethod","updateShippingMethod","deleteShippingMethod","fetchCatalogTerms","fetchTerm","createTerm","updateTerm","deleteTerm","fetchTranslations","fetchTranslation","translationId","createTranslation","updateTranslation","deleteTranslation","fetchShippingRates","fetchShippingRate","rateId","createShippingRate","updateShippingRate","deleteShippingRate","fetchShipTos","fetchShipTo","shipToId","createShipTo","updateShipTo","addressId","deleteShipTo","fetchCustomerNums","fetchCustomerNum","custNumId","fetchCustNumsByCustId","updateCustomerNum","createCustomerNum","deleteCustomerNum","fetchContentGroups","fetchContentGroup","groupId","createContentGroup","updateContentGroup","deleteContentGroup","getOrderHistory","pageOptions","getAbandonedCarts","showEmptyEmails","getLoginReports","getFailedSearches","getSuccessfulSearches","getUsageReports","getPaginatedACHReports","exportPaginatedACHReports","updateAnalyticsConfig","deleteAnalyticsConfig","getDashboardCardAnalytics","ga4DateRange","getTopRevenue","rowCount","fetchAudienceOverviewData","fetchGASessionInfoCountry","fetchGASessionInfoBrowser","fetchGASessionInfoDevice","fetchGAWebsiteTrafficData","fetchGATopRevenueProducts","fetchEcommerceOverviewData","metric1","metric2","fetchProductPerformanceData","fetchResourceTree","fetchResources","fetchResource","resourceId","updateResource","createResource","deleteResource","reorderResources","resourceStructure","syncAssets","fetchAssets","exportAssets","fetchAsset","assetId","uploadAsset","asset","formattedName","uploadRemoteAsset","updateAsset","deleteAsset","fetchAssetLabels","searchTerm","queryParam","q","fetchOverlays","fetchOverlay","overlayId","updateOverlay","createOverlay","deleteOverlay","fetchCountries","fetchCountry","countryId","updateCountry","createCountry","deleteCountry","fetchStates","fetchState","stateId","updateState","createState","deleteState","fetchCustomFields","createCustomField","updateCustomFieldsList","tabsList","deleteCustomField","fieldName","fetchBooleanWebControls","fetchIntegerWebControls","fetchStringWebControls","fetchTileWebControls","fetchSiteWebControls","fetchOtherWebControls","updateWebControl","fetchSalesReps","fetchSalesRep","repId","createSalesRep","updateSalesRep","deleteSalesRep","fetchSalesRepTypes","fetchSalesRepType","repTypeId","createSalesRepType","updateSalesRepType","deleteSalesRepType","catalogName","fetchFeatureFlag","updateFeatureFlag","featureName","fetchCostCenters","fetchCostCenter","createCostCenter","updateCostCenter","deleteCostCenter","fetchApprovalGroups","fetchApprovalGroup","fetchApprovalGroupNames","createApprovalGroup","updateApprovalGroup","deleteApprovalGroup","fetchLoginBudgets","fetchLoginBudget","budgetId","createLoginBudget","updateLoginBudget","deleteLoginBudget","fetchCompanyInfos","updateCompanyInfo","companyName","savedFlag","localStorage","getItem","analyticsSlice","setItem","extraReducers","builder","addCase","UPDATE_FEATURE_FLAG","flag","featureFlagsSlice","featureFlagsState","flagData","enabled","featureEnabled","featureValue","featureFlagData","catalogDataSlice","createAction","logout","logoutRedirect","logoutParams","returnTo","combineReducers","catalogData","analytics","ids","configureStore","rootReducer","expirationDateSlice","display","justifyContent","featureDecisionSelector","createSelector","getFeatureFlags","createFeatureDecisions","featureFunction","_permissions","_featureFlags","_showAnalytics","showExperimentalFeatures","exposeAdminUI","exposeContentGroups","exposeGoogleAnalytics","exposeAnalytics","exposeResourceCenter","nonIntegratedClientFlag","nonIntegratedClient","exposeSalesRep","exposeACHReports","exposeCoupons","exposeShipAddresses","exposeShipRates","enableCostCenters","exposeApprovalGroups","exposeProductDocuments","exposeProductInventoryMessage","exposeOrderHistory","exposeApprovalBudget","exposeLoginPricing","showPricing","exposeERPCompanyId","exposeNewProductImport","savedCatalog","catalogSlice","setCatalog","axiosRequest","setStatus","setIsLoading","dependencies","CustomErrorMsg","control","errors","useFormState","idsSlice","paginationParams","addIds","clearIds","setNextPageParams","CatalogSelect","allowClear","multiSelect","placeholder","selectedCatalog","handleChange","onBlur","setCatalogsError","useAxiosRequest","catalogs","catalogsError","sortedList","setSortedList","useErrorHandler","sort","b","localeCompare","getPopupContainer","showSearch","optionFilterProp","defaultValue","onChange","JSON","parse","innerHTML","useQueryClient","setSelectedCatalog","selectedCatalogData","setSelectedCatalogData","redirect","setRedirect","fetching","setFetching","catalogError","setCatalogError","for","removeQueries","disabled","getCatalogData","getIds","globalState","getNextPageParams","getResetEmailLifetime","pwResetExpirationMinutes","getCreateEmailLifetime","pwCreateExpirationMinutes","ExpirationDate"],"mappings":"ulBAkCaA,GAlBG,qCAAD,OAAuCC,IAAOC,0BAkBnC,CACxBC,KAAM,CACJC,SAAUH,IAAOI,yBACjBC,UAAU,qCAAD,OAAuCL,IAAOC,0BACvDK,iBAAkB,GAClBC,YAAY,eACZC,sBAAuB,SAIvBC,2BAA2B,GAE7BC,MAAO,CACLC,cAAe,iBACfC,wBAAwB,GAE1BC,OAAQ,CAENC,cAAe,CACbC,eAAgB,SAACC,EAAOC,EAASC,GAC/B,IAAIA,EAGJ,OAAQF,GACN,KAAKG,IAASC,MAEZ,YADAC,QAAQC,MAAML,GAEhB,KAAKE,IAASI,KAEZ,YADAF,QAAQG,KAAKP,GAEf,KAAKE,IAASM,QAEZ,YADAJ,QAAQK,MAAMT,GAEhB,KAAKE,IAASQ,QAEZ,YADAN,QAAQO,KAAKX,GAEf,QACE,aAgCCY,EAAc,CACzBC,OAAQ,CAAC,SAAD,OAAU9B,IAAO+B,6BAAjB,e,0NChGGC,EAAkB,SAACC,EAAmCC,GAEjE,IAAIC,EAAkB,GAKtB,OAHAF,EAAUG,SAAQ,SAAAC,GAChBF,EAAkBA,EAAgBG,OAAOC,EAA2BF,EAAaH,OAE5EC,GAQHI,EAA6B,SAA7BA,EAA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AAIA,EAAM5jB,cAOjC6/B,EAAwB,SAAAjc,GAAK,yBAAIA,EAAM5jB,oBAAV,iBAAI,EAAoB8/B,gCAAxB,aAAI,EAA8Cpa,OAK/Eqa,EAAyB,SAAAnc,GAAK,yBAAIA,EAAM5jB,oBAAV,iBAAI,EAAoBggC,iCAAxB,aAAI,EAA+Cta,OCfjFngB,EAA2B,SAAAqe,GAAK,yBAAIA,EAAM5jB,oBAAV,iBAAI,EAAoBigC,sBAAxB,aAAI,EAAoCva,OAIxE1d,EAA6B,SAAA4b,GAAK,OAAIA,EAAM3e,kB","file":"static/js/main.86f0982b.chunk.js","sourcesContent":["import { LogLevel } from \"@azure/msal-browser\";\nimport config from \"./app-config\";\n\n/**\n * Enter here the user flows and custom policies for your B2C application\n * To learn more about user flows, visit: https://docs.microsoft.com/en-us/azure/active-directory-b2c/user-flow-overview\n * To learn more about custom policies, visit: https://docs.microsoft.com/en-us/azure/active-directory-b2c/custom-policy-overview\n */\nexport const b2cPolicies = {\n names: {\n signUpSignIn: 'B2C_1_susi_v2',\n forgotPassword: 'B2C_1_reset_v3',\n editProfile: 'B2C_1_edit_profile_v2',\n },\n authorities: {\n signUpSignIn: {\n authority: `https://login.microsoftonline.com/${config.REACT_APP_AZURE_TENANTID}`,\n },\n forgotPassword: {\n authority: 'https://fabrikamb2c.b2clogin.com/fabrikamb2c.onmicrosoft.com/B2C_1_reset_v3',\n },\n editProfile: {\n authority: 'https://fabrikamb2c.b2clogin.com/fabrikamb2c.onmicrosoft.com/b2c_1_edit_profile_v2',\n },\n },\n authorityDomain: 'login.microsoftonline.com',\n};\n\n\n/**\n * Configuration object to be passed to MSAL instance on creation.\n * For a full list of MSAL.js configuration parameters, visit:\n * https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/configuration.md\n */\nexport const msalConfig = {\n auth: {\n clientId: config.REACT_APP_AZURE_CLIENTID, // This is the ONLY mandatory field that you need to supply.\n authority: `https://login.microsoftonline.com/${config.REACT_APP_AZURE_TENANTID}`, // Choose SUSI as your default authority.\n knownAuthorities: [], // Mark your B2C tenant's domain as trusted.\n redirectUri: `/signin-oidc`, // You must register this URI on Azure Portal/App Registration. Defaults to window.location.origin\n postLogoutRedirectUri: '/login', // Indicates the page to navigate after logout.\n // If \"true\", will navigate back to the original request location before processing the auth code response.\n // allows the user to be returned to the page where the auth request was initiated,\n // instead of being returned to the catch-all \"Dashboard\" route\n navigateToLoginRequestUrl: true\n },\n cache: {\n cacheLocation: 'sessionStorage', // Configures cache location. \"sessionStorage\" is more secure, but \"localStorage\" gives you SSO between tabs.\n storeAuthStateInCookie: false, // Set this to \"true\" if you are having issues on IE11 or Edge\n },\n system: {\n // provides console logging for MSAL actions\n loggerOptions: {\n loggerCallback: (level, message, containsPii) => {\n if (containsPii) {\n return;\n }\n switch (level) {\n case LogLevel.Error:\n console.error(message);\n return;\n case LogLevel.Info:\n console.info(message);\n return;\n case LogLevel.Verbose:\n console.debug(message);\n return;\n case LogLevel.Warning:\n console.warn(message);\n return;\n default:\n return;\n }\n },\n },\n },\n};\n\n/**\n * Add here the endpoints and scopes when obtaining an access token for protected web APIs. For more information, see:\n * https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/resources-and-scopes.md\n */\n\n// we don't currently use scopes this fine - every user has the scope View.All\n// for their client's API. Scopes passed on login and on token refresh are identical.\n// this may change in the future. For now, see loginScopes below\n\n// export const protectedResources = {\n// apiTodoList: {\n// endpoint: 'http://localhost:5000/api/todolist',\n// scopes: {\n// read: ['https://fabrikamb2c.onmicrosoft.com/TodoList/ToDoList.Read'],\n// write: ['https://fabrikamb2c.onmicrosoft.com/TodoList/ToDoList.ReadWrite'],\n// },\n// },\n// };\n\n/**\n * Scopes you add here will be prompted for user consent during sign-in.\n * By default, MSAL.js will add OIDC scopes (openid, profile, email) to any login request.\n * For more information about OIDC scopes, visit:\n * https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-permissions-and-consent#openid-connect-scopes\n */\nexport const loginScopes = {\n scopes: [`api://${config.REACT_APP_AZURE_API_CLIENTID}/View.All`]\n};\n","import { AntSidebarConfigItem, FeatureDecisions } from \"../models/App\";\n\n/**\n * Function that returns a navbar config to be used in the App's sidebar. Adds links to the sidebar config\n * depending on various feature flag values.\n * @param {AntSidebarConfigItem} navConfig - an object representing the sidebar with all links exposed\n * @param {FeatureDecisions} featureFlags - an object containing feature flag hooks\n */\nexport const limitAntNavTree = (navConfig: AntSidebarConfigItem[], featureFlags: FeatureDecisions) => {\n // instantiate a variable to build up the filtered sidebar items\n let filteredSidebar = [] as AntSidebarConfigItem[]\n // loop over the full list of sidebar items\n navConfig.forEach(sidebarItem => {\n filteredSidebar = filteredSidebar.concat(addSidebarItemToAntNavTree(sidebarItem, featureFlags))\n })\n return filteredSidebar\n}\n\n/**\n * Recursive function to traverse a branch of the navbar config tree and add links based on various feature flag values.\n * @param {AntSidebarConfigItem} sidebarItem - the branch of the sidebar tree being traversed\n * @param {FeatureDecisions} featureFlags - an object containing feature flag hooks\n */\nconst addSidebarItemToAntNavTree = (sidebarItem: AntSidebarConfigItem, featureFlags: FeatureDecisions) => {\n const filteredSidebar = [] as AntSidebarConfigItem[]\n let addSidebarItem = false\n // assess value of addSidebarItem\n if (sidebarItem.flagName) {\n // if the sidebarItem has a limiting feature flag, check the flag's value in state\n // to determine whether the item should be included in the sidebar\n addSidebarItem = featureFlags[sidebarItem.flagName]()\n }\n // otherwise the sidebarItem has no limiting feature flag,\n // and is always included in the sidebar\n else addSidebarItem = true\n // add the sidebarItem if it should be included\n // don't add children initially b/c their flags must be assessed in a similar way as above\n if (addSidebarItem) {\n const {children, flagName, ...rest} = sidebarItem\n filteredSidebar.push(rest)\n let lastItemIndex = filteredSidebar.length - 1\n if (children) {\n filteredSidebar[lastItemIndex].children = sidebarItem.children!.reduce((children, childItem) => {\n //@ts-ignore\n return children.concat(addSidebarItemToAntNavTree(childItem, featureFlags))\n }, [])\n }\n }\n return filteredSidebar\n}\n\n/**\n * Given the current pathname, finds the matching Route from the app's list of routes, then splits that Route's path into segments.\n * Uses segments to locate the correct nav item in the sidebarConfig tree so it can be set in state as the current selected key\n * and indicated as such in the sidebar UI. Along the way, keeps track of each intermediate nav item so they can be set\n * in state as open keys and shown as expanded submenus in the sidebar UI.\n *\n * @param {string} path - the path of the current route, provided by react-router's useLocation hook\n * @param {AntSidebarConfigItem[]} sidebarConfig - an array representing the sidebar tree with all links exposed\n * @returns {{selectedKeys: string[], openKeys: string[]}} - an object listing the currently-selected key and the intermediate\n * expanded keys in the sidebar, used to set initial values for hooks in the Sidebar component. Provides visual indicator to user\n * of the current location in the app.\n */\nexport const initializeRoute = (path: string, sidebarConfig: AntSidebarConfigItem[]) => {\n if (path) {\n // split the current route's path into segments like ['', 'user-maintenance', 'logins', 'update', ':id']\n const segments = path.split('/')\n // ensure we have more than one segment - eg that we're not at 'baseUrl/'\n if (segments.length > 1) {\n // find the top-level sidebar item with a key corresponding to segment[1] eg 'user-maintenance'\n // sidebar item keys are provided as partial urls, so look for '/user-maintenance'\n const topRoute = sidebarConfig.find(sidebarItem => sidebarItem.key === `/${segments[1]}`)\n if (topRoute) {\n // keep a record of each sidebar item we locate. Their keys will be used to set\n // the open keys so the correct submenus are expanded for a given route in the sidebar UI.\n const segmentKeys = [topRoute.key]\n // begin at index 2, since segment[0] is '' and we've already located the sidebar item corresponding to segment[1]\n let segmentIndex = 2\n // initialize nextSegment to start with the prior sidebar item's key, eg '/user-maintenance'\n let nextSegment = `/${segments[1]}`\n // prepare to search the children of the last found sidebar item for the next segment\n let nextRoute: AntSidebarConfigItem | undefined = topRoute\n do {\n // append the next segment in segments[] so it becomes '/user-maintenance/logins'\n nextSegment += `/${segments[segmentIndex]}`\n // search children of the last found sidebar item to find the item with key corresponding to '/user-maintenance/logins'\n nextRoute = nextRoute?.children?.find((childSidebarItem: {key: string}) => childSidebarItem.key === nextSegment)\n // if we found a matching child, add its key to the tracked hierarchy of sidebar item keys\n if (nextRoute) {\n segmentKeys.push(nextRoute.key)\n segmentIndex +=1\n }\n // if nextRoute is undefined, we've reached a leaf node on the sidebarConfig tree and should have identified each sidebar\n // item in the hierarchy for the current route\n } while (nextRoute)\n // return the final key in segmentKeys, which will be set in state as the currently-selected sidebar item,\n // and return the full hierarchy of segmentKeys, which will be set in state as the open submenu items terminating in the selected item\n return {\n selectedKeys: [segmentKeys[segmentKeys.length - 1]],\n openKeys: segmentKeys\n }\n }\n }\n }\n return {\n selectedKeys: [],\n openKeys: []\n }\n}\n","import React from 'react';\nimport { Link } from 'react-router-dom';\nimport {\n DatabaseOutlined,\n DesktopOutlined,\n FileOutlined, FolderOutlined,\n PictureOutlined, RiseOutlined, SettingOutlined,\n TeamOutlined, ReadOutlined\n} from '@ant-design/icons';\n\n/**\n * Function returning an array representing the sidebar tree with all links exposed. This nav map will be consumed\n * in Sidebar.tsx. The Sidebar will limit the exposed links per the current featureFlag values in redux.\n * It will also use this nav map to locate the user within the app based on their path so the sidebar\n * can open the correct submenus and highlight the correct link for that current path.\n *\n * When adding a new route to the app, must include it here to get it to appear in the sidebar.\n * @returns AntSidebarConfigItem[]\n */\nexport default function() {\n return [\n {\n // must be unique. by convention, use route's path\n key: '/dashboard',\n // antd icon to be shown for top-level items in sidebar UI\n icon: ,\n // navigable routes/'leaf nodes' will have a label that is a Link.\n label: \n Dashboard\n \n // if a route was restricted by feature flags, it would also have a flagName key\n // with the value of the controlling feature flag as below. Eg, see User Maintenance -> Content Groups\n // flagName: 'exposeContentGroups'\n },\n {\n key: '/user-maintenance',\n icon: ,\n // non-navigable sidebar items have a label that is just text\n // can't navigate to a 'User Maintenance' UI component\n label: 'User Maintenance',\n // nodes that hold a submenu have children, which may or may not be navigable nodes themselves\n // (User Maintenance -> Customers vs User Maintenance -> Sales Reps)\n children: [\n {\n key: '/user-maintenance/customers',\n label: \n Customers\n \n },\n {\n key: '/user-maintenance/logins',\n label: \n Logins\n \n },\n {\n key: '/user-maintenance/customer-numbers',\n label: \n Customer Numbers\n \n },\n {\n key: '/user-maintenance/shipping-methods',\n label: \n Shipping Methods\n \n },\n {\n key: '/user-maintenance/shipping-rates',\n flagName: 'exposeShipRates',\n label: \n Shipping Rates\n \n },\n {\n key: '/user-maintenance/shipping-addresses',\n flagName: 'exposeShipAddresses',\n label: \n Shipping Addresses\n \n },\n {\n key: '/user-maintenance/terms',\n label: \n Terms\n \n },\n {\n key: '/user-maintenance/translations',\n label: \n Translations\n \n },\n {\n key: '/user-maintenance/content-groups',\n flagName: 'exposeContentGroups',\n label: \n Content Groups\n \n },\n {\n key: '/user-maintenance/warehouses',\n label: \n Warehouses\n \n },\n {\n key: '/user-maintenance/extra-billing',\n flagName: 'enableCostCenters',\n label: \n Extra Billing\n \n },\n {\n key: '/user-maintenance/approval-groups',\n label: 'Approval Groups',\n flagName: 'exposeApprovalGroups',\n children: [\n {\n key: '/user-maintenance/approval-groups/groups',\n flagName: 'exposeApprovalGroups',\n label: \n Approval Groups\n \n },\n {\n key: '/user-maintenance/approval-groups/budgets',\n flagName: 'exposeApprovalBudget',\n label: \n Login Budgets\n \n }\n ]\n },\n {\n key: '/user-maintenance/sales-reps',\n label: 'Sales Reps',\n flagName: 'exposeSalesRep',\n children: [\n {\n key: '/user-maintenance/sales-reps/reps',\n label: \n Sales Reps\n \n },\n {\n key: '/user-maintenance/sales-reps/rep-types',\n label: \n Sales Rep Types\n \n }\n ]\n },\n ]\n },\n {\n key: '/product-maintenance',\n icon: ,\n label: 'Product Manager',\n children: [\n {\n key: '/product-maintenance/products',\n label: \n Products\n \n },\n {\n key: '/product-maintenance/categories',\n label: \n Categories\n \n },\n {\n key: '/product-maintenance/brands',\n label: \n Brands\n \n },\n {\n key: '/product-maintenance/coupons',\n flagName: 'exposeCoupons',\n label: \n Coupons\n \n },\n {\n key: '/product-maintenance/search-management',\n label: \n Search\n \n },\n {\n key: '/product-maintenance/product-backups',\n label: \n Product Backups\n \n }\n ]\n },\n {\n key: '/resource-maintenance',\n icon: ,\n label: 'Resource Manager',\n children: [\n {\n key: '/resource-maintenance/asset-management',\n label: \n Assets\n \n },\n {\n key: '/resource-maintenance/overlays',\n label: \n Image Overlays\n \n },\n {\n key: '/resource-maintenance/resources',\n flagName: 'exposeResourceCenter',\n label: \n Resources\n \n },\n ]\n },{\n key: '/import',\n icon: ,\n label: \n Import Data\n \n },\n {\n key: '/analytics',\n icon: ,\n label: 'Site Reports',\n children: [\n {\n key: '/analytics/ach-reports',\n flagName: 'exposeACHReports',\n label: \n ACH Reports\n \n },\n {\n key: '/analytics/order-history',\n flagName: 'exposeOrderHistory',\n label: \n Order History\n \n },\n {\n key: '/analytics/abandoned-cart-reports',\n label: \n Abandoned Cart\n \n },\n {\n key: '/analytics/login-reports',\n label: \n Login Reports\n \n },\n {\n key: '/analytics/successful-searches',\n label: \n Successful Searches\n \n },\n {\n key: '/analytics/failed-searches',\n label: \n Failed Searches\n \n },\n {\n key: '/analytics/usage-reports',\n label: \n Usage Reports\n \n }\n ]\n },\n {\n key: '/google',\n icon: ,\n label: 'Google Analytics',\n flagName: 'exposeAnalytics',\n children: [\n {\n key: '/google/audience-overview',\n flagName: 'showAnalytics',\n label: \n Audience Overview\n \n },\n {\n key: '/google/ecommerce-overview',\n flagName: 'showAnalytics',\n label: \n Ecommerce Overview\n \n },\n {\n key: '/google/ga-config',\n label: \n Settings\n \n }\n ]\n },\n {\n key: '/admin',\n icon: ,\n label: 'Admin',\n flagName: 'exposeAdminUI',\n children: [\n {\n key: '/admin/feature-flags',\n flagName: 'exposeAdminUI',\n label: \n Feature Flags\n \n },\n {\n key: '/admin/company-info',\n flagName: 'exposeAdminUI',\n label: \n Company Info\n \n },\n {\n key: '/admin/websetup',\n label: 'WebSetup',\n flagName: 'exposeAdminUI',\n children: [\n {\n key: '/admin/websetup/countries',\n label: \n Countries\n \n },\n {\n key: '/admin/websetup/states',\n label: \n States\n \n },\n {\n key: '/admin/websetup/custom-fields',\n label: \n Custom Fields\n \n },\n {\n key: '/admin/websetup/webcontrols',\n label: 'WebControl',\n children: [\n {\n key: '/admin/websetup/webcontrols/booleans',\n label: \n Boolean\n \n },\n {\n key: '/admin/websetup/webcontrols/integers',\n label: \n Integer\n \n },\n {\n key: '/admin/websetup/webcontrols/strings',\n label: \n String\n \n },\n {\n key: '/admin/websetup/webcontrols/tiles',\n label: \n Tile\n \n },\n {\n key: '/admin/websetup/webcontrols/sites',\n label: \n Site\n \n },\n {\n key: '/admin/websetup/webcontrols/other',\n label: \n Other\n \n },\n ]\n }\n ]\n }\n ]\n },\n {\n key: '/select-catalog',\n icon: ,\n label: \n Change Catalog\n \n }\n ];\n}\n","import React, { useState, useEffect } from 'react';\nimport { useRouteMatch } from 'react-router-dom';\nimport { Layout, Menu } from 'antd';\nimport useFeature from '../../hooks/useFeature';\nimport { AntSidebarConfigItem, FeatureDecisions } from \"../../models/App\";\nimport { limitAntNavTree, initializeRoute } from \"../../helpers/sidebar-helpers\";\nimport antSidebarConfig from \"../../_nav\";\n\nconst { Sider } = Layout;\n\n/**\n * App's sidebar implemented using antd components; replaces deprecated CoreUI sidebar. Limits the sidebar\n * links shown to users per featureFlag values in redux.\n * @module Sidebar\n * @component\n */\nconst Sidebar = function Sidebar (props: any) {\n const {\n collapsed, setCollapsed,\n setCollapseType,\n sidebarWidth, setSidebarWidth\n } = props\n // get the path for the current route so we can split it up to locate the corresponding hierarchy of sidebar items\n // allows us to correctly calculate the initial selected and open key(s)\n const { path } = useRouteMatch()\n // get a snapshot of the current feature flags from redux so we can hide sidebar items if needed\n const featureFlags = useFeature((features: FeatureDecisions) => features);\n // keep track of the sidebar config so we can update it if feature flags change\n // initialize the hook to use a config based on the current feature flag values\n const [limitedSidebar, setLimitedSidebar] = useState(limitAntNavTree(antSidebarConfig(), featureFlags))\n // calculate the initial selected and open key(s) based on the current path\n const initialKeys = initializeRoute(path, antSidebarConfig())\n // initialize the selected key based on the current path\n const [selectedKeys, setSelectedKeys] = useState(initialKeys.selectedKeys)\n // initialize the open keys. avoids collapsing sidebar submenus each time a new sidebar item is selected\n const [openKeys, setOpenKeys] = useState(initialKeys.openKeys)\n // a copy of the current openKeys. used to re-initialize openKeys\n // per the user's current path when sidebar is expanded from a collapsed state\n const [savedOpenKeys, setSavedOpenKeys] = useState(initialKeys.openKeys)\n\n // if feature flag values in redux change, recalculate the visible sidebar items\n useEffect(() => {\n if (featureFlags) {\n setLimitedSidebar(limitAntNavTree(antSidebarConfig(), featureFlags))\n }\n }, [featureFlags])\n\n // on sidebar collapse, openKeys is set to [] in onOpenChange\n // when re-opening sidebar from a collapsed state, use savedOpenKeys to re-initialize openKeys\n // per the user's current path\n useEffect(() => {\n if (!collapsed) setOpenKeys(savedOpenKeys)\n }, [collapsed])\n\n return (\n {\n // when collapsing via breakpoint,\n if (broken) {\n // collapse menu\n setCollapsed(true)\n // indicate full collapse\n setCollapseType('zero')\n }\n // if expanding via breakpoint,\n else {\n // if sider was previously minimized,\n if (sidebarWidth === 'minimized') {\n // maintain setCollapsed(true)\n // and indicate sider is still minimized\n setCollapseType('minimized')\n }\n // if sider was previously full-width,\n else {\n // expand collapsed state\n setCollapsed(false)\n // and update collapsed state/sidebar width\n setCollapseType('full')\n setSidebarWidth('full')\n }\n }\n }}\n onCollapse={(collapsing, type) => {\n // type can be 'responsive' or 'clickTrigger'\n // only act if collapsing via sider button (type = 'clickTrigger')\n // type = 'responsive' is handled in onBreakpoint above\n if (type === 'clickTrigger') {\n // if collapsing via sider button,\n if (collapsing) {\n // collapse menu\n setCollapsed(true)\n // indicate partial collapsed state\n setCollapseType('minimized')\n // set sidebar width correctly\n setSidebarWidth('minimized')\n }\n // if expanding via sider button,\n else {\n // expand collapsed state\n setCollapsed(false)\n // and update collapsed state/sidebar width\n setCollapseType('full')\n setSidebarWidth('full')\n }\n\n }\n }}\n breakpoint={\"lg\"}\n collapsedWidth={50}\n >\n {\n // when fxn is called, make a record of the current state of open menus\n // if sidebar is hidden, savedOpenKeys will be used to re-initialize openKeys when sidebar is re-opened\n setSavedOpenKeys(openKeys)\n // control open submenus manually\n setOpenKeys(updatedOpenKeys)\n }}\n onSelect={({key}) => {\n setSelectedKeys([key])\n }}/>\n \n )\n}\n\nexport default Sidebar\n","import moment from \"moment\";\n\n/**\n * Assesses whether the current SAAS contract expiration date value is a valid date\n * @param {string} expirationDate - a string in the format MM-DD-YYYY\n * @returns {boolean}\n */\nexport const checkDateValidity = (expirationDate: string) => {\n return moment(expirationDate, \"MM-DD-YYYY\").isValid()\n}\n\n/**\n * Assesses whether the current SAAS contract expiration date value is within 14 days of today\n * @param {string} expirationDate - a string in the format MM-DD-YYYY\n * @returns {boolean}\n */\nexport const checkDateNearlyExpired = (expirationDate: string) => {\n return moment(expirationDate, \"MM-DD-YYYY\").isBefore(moment().add(14, \"days\"))\n}\n\n/**\n * Assesses whether the current SAAS contract expiration date value is before today's date\n * @param {string} expirationDate - a string in the format MM-DD-YYYY\n * @returns {boolean}\n */\nexport const checkDateExpired = (expirationDate: string) => {\n return moment(expirationDate, \"MM-DD-YYYY\").isBefore(moment())\n}\n","import React, { useState } from 'react';\nimport { Modal, Button } from 'antd';\nimport { QuestionCircleFilled } from '@ant-design/icons'\nimport { Card, CardBody, Container } from 'reactstrap';\nimport { AppRoute } from \"../models/App\";\nimport SupportInfo from \"./SupportInfo\";\nimport { useSelector } from \"react-redux\";\nimport { getServiceExpirationDate } from \"../redux/selectors\";\nimport { checkDateValidity } from \"../helpers/expirationDate-helpers\";\n\n/**\n * Component that conditionally renders help button/modal and the helpCard prop for the current route.\n * @module HelpInfoModal\n * @component\n */\n\nexport default function HelpInfoModal({ activeRoute }: { activeRoute: AppRoute }) {\n\n // retrieve service expiration date from feature flags in store so it can be shown in help modal\n const expirationDate = useSelector(getServiceExpirationDate)\n\n const [showHelpCard, setShowHelpCard] = useState(false);\n\n // check the value of the expiration date:\n // if date is invalid or missing, modal text will indicate there's a problem with the value\n const isValidDate = checkDateValidity(expirationDate)\n\n const HelpCard = (activeRoute && activeRoute.helpCard) ? activeRoute.helpCard : null;\n\n return (\n \n {(activeRoute && HelpCard) && (\n
\n setShowHelpCard(true)}>\n \n \n setShowHelpCard(false)}\n footer={[\n setShowHelpCard(false)}>\n Ok\n \n ]}>\n

Console Help: {activeRoute?.name ? activeRoute.name : ''} page

\n \n \n \n \n \n \n \n

\n \n Click here\n to view the Console User's Guide.\n

\n

\n \n Click here\n to view the latest release notes.\n

\n {expirationDate && (\n

Your subscription contract expiration date is {isValidDate ? `${expirationDate}.` : 'invalid. Contact Channel Software Support for assistance.'}

\n )}\n

Need additional support? Contact us at !

\n \n
\n )}\n
\n )\n}\n","import React from 'react'\nimport { Helmet } from 'react-helmet';\nimport { AppRoute } from \"../models/App\";\n\nconst PageTitle = function PageTitle({ activeRoute }: { activeRoute: AppRoute }) {\n\n return (\n \n {activeRoute && activeRoute.name ? activeRoute.name : 'CSX Console'}\n \n )\n};\n\nexport default PageTitle\n","import React from 'react';\nimport moment from 'moment';\n\nexport default function DefaultFooter() {\n\n const currentYear = moment().year();\n\n return (\n \n Channel Software © {currentYear}\n \n );\n};\n\n\n","import React from 'react';\n\nexport default function ChannelBillingEmail () {\n return (\n \n billing@channelsoftware.com \n \n )\n}\n","import React, { useState, useEffect } from 'react';\nimport { Modal, Button } from 'antd';\nimport { Container, FormGroup } from 'reactstrap';\nimport { useDispatch, useSelector } from \"react-redux\";\nimport SupportInfo from \"./SupportInfo\";\nimport ChannelBillingEmail from \"./ChannelBillingEmail\"\nimport { getServiceExpirationDate, isExpirationModalConfirmed } from \"../redux/selectors\";\nimport { confirmExpirationDateModal } from '../redux/slices/expirationDate.slice'\nimport {\n checkDateExpired,\n checkDateNearlyExpired,\n checkDateValidity,\n} from \"../helpers/expirationDate-helpers\";\n\n/**\n * Component that assesses the console's SAAS contract expiration date\n * retrieved from the feature flag 'ExpirationDate' and stored in redux.\n * If expiration date is within 14 days, in the past, or invalid, shows a modal alerting\n * the user. Should only appear 1x per session. Lives in AntDefaultLayout.\n * @module ExpirationDateModal\n * @component\n */\nconst ExpirationDateModal = function ExpirationDateModal(props: any) {\n\n const dispatch = useDispatch();\n // retrieve service expiration date from feature flags in store\n // if client is past/approaching the end of their service contract, we'll show a modal alerting them\n const expirationDate = useSelector(getServiceExpirationDate)\n // check whether the user has already acknowledged the modal during this session -\n // if so, we won't show it again until a new session: user logs out/logs in again, or refreshes their browser\n const isExpirationConfirmed = useSelector(isExpirationModalConfirmed)\n\n // hook controlling visibility of expiration alert modal\n const [showModal, setShowModal] = useState(false)\n\n // check the value of the ExpirationDate feature flag:\n // if date is invalid or missing, modal text will indicate there's a problem with the value\n const isValidDate = checkDateValidity(expirationDate)\n // if date is within 14 days of today, modal text will indicate their service period is nearly over\n const isNearlyExpired = checkDateNearlyExpired(expirationDate)\n // if date is expired, modal text will indicate their service period is over\n const isExpired = checkDateExpired(expirationDate)\n\n useEffect(() => {\n // if expiration date is invalid or < 14 days from today,\n // AND if user has not yet acknowledged the current expiration date during this session,\n // show the modal\n if (!isExpirationConfirmed && (!isValidDate || isNearlyExpired)) {\n setShowModal(true)\n }\n }, [expirationDate, isExpirationConfirmed])\n\n return (\n {\n dispatch(confirmExpirationDateModal(true))\n setShowModal(false)\n }}\n footer={[\n {\n dispatch(confirmExpirationDateModal(true))\n setShowModal(false)\n }}\n >Ok]}\n >\n \n {!isValidDate && (\n
\n \n Your subscription contract expiration date is invalid.\n \n \n To resolve this issue, contact Channel Software support at .\n \n
\n )}\n {isExpired && (\n
\n \n Your subscription contract expired on:\n \n \n {expirationDate}\n \n \n Channel Software has mailed a renewal invoice. Please ensure this invoice is paid in full. To receive a copy of this invoice please contact\n .\n \n
\n )}\n {isValidDate && !isExpired && isNearlyExpired && (\n
\n \n You are nearing the end of your subscription contract, which is set to expire on:\n \n \n {expirationDate}\n \n \n Channel Software has mailed a renewal invoice. Please ensure this invoice is paid in full by the renewal date. To receive a copy of this invoice please contact\n .\n \n
\n )}\n
\n \n )\n}\n\nexport default ExpirationDateModal\n","import React, { useState } from 'react';\nimport { Container } from 'reactstrap';\nimport { Breadcrumb, Layout } from 'antd';\nimport Sidebar from './Sidebar'\nimport HelpInfoModal from '../../components/HelpInfoModal';\nimport PageTitle from '../../components/PageTitle'\nimport DefaultFooter from './DefaultFooter';\nimport DefaultHeader from './DefaultHeader';\nimport ExpirationDateModal from \"../../components/ExpirationDateModal\";\n\nconst { Header, Content, Footer } = Layout;\n\n/**\n * App's layout implemented using antd components; replaces deprecated CoreUI layout. Renders fixed\n * header/footer, a sidebar permitting navigation, and the current route's components.\n * @module AntDefaultLayout\n * @component\n */\nconst AntDefaultLayout = function AntDefaultLayout(props: any) {\n const {\n activeRoute,\n children\n } = props;\n\n // hook controlling the boolean collapsed/expanded state of the sidebar\n // 'collapsed' state can indicate either a fully collapsed sidebar OR a minimized sidebar -\n // the antd sidebar considers these both 'collapsed'\n const [collapsed, setCollapsed] = useState(false);\n\n // the sidebar's current collapsed state - 'full', 'minimized', or 'zero'\n // instantiate based on viewport size to avoid flickering of sidebar when this component is rendered\n // breakpoint for collapse is 'lg'\n const [collapseType, setCollapseType] = useState(window.innerWidth <=991 ? 'zero' : 'full');\n // the sidebar's current width, whether hidden or showing - 'full' or 'minimized'\n // will be correctly initialized by the component when first rendered\n // stores sidebar width when collapsed state changes\n const [sidebarWidth, setSidebarWidth] = useState('')\n\n return (\n
\n \n
\n \n
\n \n \n \n \n
\n \n \n {activeRoute?.name ? activeRoute.name : ''}\n \n \n
\n \n {/* HOC wraps the component currently being rendered based on route - see App.tsx */}\n {children}\n \n
\n
\n
\n
\n \n
\n
\n \n
\n )\n}\n\nexport default AntDefaultLayout\n","import React from 'react';\nimport { Layout } from 'antd';\nimport DefaultHeader from \"../../containers/DefaultLayout/DefaultHeader\";\nimport Loading from \"../../components/Loading\";\n\nconst { Header } = Layout;\n\n/**\n * Component to render a loading bouncer in a layout with a limited header (no catalog or sidebar btn).\n * Displayed as a fallback UI by App.tsx if user is authenticated and has a catalog but feature\n * flags are not yet loaded.\n * @module LoadingLayout\n * @component\n */\nexport const LoadingLayout = function LoadingLayout() {\n\n return (\n \n
\n \n
\n \n
\n )\n}\n\nexport default LoadingLayout\n","import React from 'react';\nimport { Button } from 'antd';\nimport { Card, CardBody, CardGroup, Col, Container, Row } from 'reactstrap';\nimport { useAuth0 } from \"@auth0/auth0-react\";\nimport { useMsal } from \"@azure/msal-react\";\nimport config from \"../../../app-config\";\nimport { loginScopes } from \"../../../authConfig\";\n\nexport default function Login() {\n\n const { loginWithRedirect } = useAuth0();\n const { instance } = useMsal();\n\n return (\n
\n \n \n \n \n \n \n \n \n \n

Login

\n

Sign In to the Admin Console

\n \n \n {\n if (config.REACT_APP_AZURE_AUTH === 'true') {\n // after successful auth, AAD routes user to the provided redirectUri\n // in authConfig.js so the auth code can be exchanged for an access token.\n // after token is obtained, send user to the redirectStartPage below\n // instead of back to /login, where they will be 'stuck' w/ no navigation UI.\n instance.loginRedirect({\n redirectStartPage: '/dashboard',\n scopes: loginScopes.scopes\n })\n }\n else if (config.REACT_APP_AZURE_AUTH !== 'true') {\n loginWithRedirect({})\n }\n }}>Login\n \n \n
\n
\n
\n \n
\n
\n
\n )\n}\n","import React, { useEffect } from \"react\";\nimport { Route, RouteProps } from \"react-router-dom\";\nimport { useAuth0 } from \"@auth0/auth0-react\";\nimport { useMsal, useIsAuthenticated } from \"@azure/msal-react\";\nimport { RouteComponentProps } from \"react-router\";\nimport config from \"../app-config\";\nimport { loginScopes } from \"../authConfig\";\n\n// because we pass props like catalog to each Route's Component,\n// we have to modify auth0's PrivateRoute to pass those props through\n\nconst PrivateRoute = ({ component: Component, path, ...rest }:\n RouteProps) => {\n const { isAuthenticated: isAuthenticatedAuth0, loginWithRedirect } = useAuth0();\n const { instance, accounts } = useMsal();\n const isAuthenticatedAzure = useIsAuthenticated();\n console.log('a0', isAuthenticatedAuth0);\n console.log('az', isAuthenticatedAzure)\n useEffect(() => {\n const fn = async () => {\n if ((config.REACT_APP_AZURE_AUTH === 'true') && !isAuthenticatedAzure && rest.location) {\n console.log('reached azure redirect')\n await instance.loginRedirect({\n account: accounts[0],\n scopes: loginScopes.scopes\n })\n }\n else if (config.REACT_APP_AZURE_AUTH !== 'true' && !isAuthenticatedAuth0 && rest.location) {\n console.log('reached auth0 redirect')\n console.log(rest.location.pathname)\n await loginWithRedirect({\n appState: { targetUrl: rest.location.pathname }\n });\n }\n };\n fn();\n}, [isAuthenticatedAzure, isAuthenticatedAuth0, path]);\n\n const render = (props: RouteComponentProps) => {\n // check authentication\n // only return component if authenticated\n return (isAuthenticatedAzure || isAuthenticatedAuth0) && Component ? : null;\n };\n// render prop consuming UI component\n return ;\n};\n\nexport default PrivateRoute;\n","import { lazy } from 'react';\n\nconst Redirect = lazy(() => import('./components/Redirect'))\n\nconst Dashboard = lazy(() => import('./views/Dashboard/Dashboard'))\n\nconst DashboardHelp = lazy(() => import('./views/Dashboard/DashboardHelp'))\n\nconst SelectCatalog = lazy(() => import('./views/Pages/SelectCatalog/SelectCatalog'))\n\nconst Categories = lazy(() => import('./views/Categories/CategoriesView'))\n\nconst CategoriesHelp = lazy(() => import('./views/Categories/Components/CategoriesViewHelp'))\n\nconst ReorderCategory = lazy(() => import('./views/Categories/reorder/ReorderTreeDataView'))\n\nconst CategoryReorderHelp = lazy(() => import('./views/Categories/reorder/CategoryReorderHelp'))\n\nconst UpdateCategory = lazy(() => import('./views/Categories/update/UpdateCategoryView'))\n\nconst CreateCategory = lazy(() => import('./views/Categories/create/CreateCategoryView'))\n\nconst CategoryFormHelp = lazy(() => import('./views/Categories/Components/CategoryFormHelp'))\n\nconst Brands = lazy(() => import('./views/Brands/BrandsView'))\n\nconst BrandsHelp = lazy(() => import('./views/Brands/Components/BrandsViewHelp'))\n\nconst UpdateBrand = lazy(() => import('./views/Brands/UpdateBrandView').then(componentFile => {\n return { default: componentFile.UpdateBrandWrapper }\n}))\n\nconst CreateBrand = lazy(() => import('./views/Brands/CreateBrandView'))\n\nconst BrandFormHelp = lazy(() => import('./views/Brands/Components/BrandFormHelp'))\n\nconst AssetManagementFormHelp = lazy(() => import('./views/AssetManagement/AssetManagementFormHelp'))\n\nconst AssetManagement = lazy(() => import('./views/AssetManagement/AssetManagementView'))\n\nconst UpdateAsset = lazy(() => import('./views/AssetManagement/UpdateAssetView').then(componentFile => {\n return { default: componentFile.UpdateAssetWrapper }\n}))\n\nconst AssetManagementViewHelp = lazy(() => import('./views/AssetManagement/AssetManagementViewHelp'))\n\nconst UpdateResource = lazy(() => import('./views/ResourceCenter/UpdateResourceView'))\n\nconst CreateResource = lazy(() => import('./views/ResourceCenter/CreateResourceView'))\n\nconst ResourceFormHelp = lazy(() => import('./views/ResourceCenter/Components/ResourceFormHelp'))\n\nconst ResourceCenter = lazy(() => import('./views/ResourceCenter/ResourcesView').then(componentFile => {\n return { default: componentFile.ResourcesWrapper}\n}))\n\nconst ResourceCenterHelp = lazy(() => import('./views/ResourceCenter/ResourcesViewHelp'))\n\nconst ReorderResource = lazy(() => import('./views/Categories/reorder/ReorderTreeDataView'))\n\nconst ResourceReorderHelp = lazy(() => import('./views/ResourceCenter/reorder/ResourceReorderHelp'))\n\nconst SearchManagement = lazy(() => import('./views/Search/UpdateSearchConfig'))\n\nconst SearchManagementHelp = lazy(() => import('./views/Search/Components/SearchManagementHelp'))\n\nconst Warehouses = lazy(() => import('./views/Warehouses/WarehousesView'))\n\nconst WarehousesHelp = lazy(() => import('./views/Warehouses/WarehousesViewHelp'))\n\nconst UpdateWarehouse = lazy(() => import('./views/Warehouses/UpdateWarehouseView').then(componentFile => {\n return { default: componentFile.UpdateWarehouseWrapper}\n}))\n\nconst CreateWarehouse = lazy(() => import('./views/Warehouses/CreateWarehouseView'))\n\nconst WarehouseFormHelp = lazy(() => import('./views/Warehouses/WarehouseFormHelp'))\n\nconst ReorderWarehouse = lazy(() => import('./views/Warehouses/ReorderFlatDataView'))\n\nconst WarehouseReorderHelp = lazy(() => import('./views/Warehouses/ReorderWarehouseHelp'))\n\nconst ProductBackups = lazy(() => import('./views/DataBackup/Products/ProductBackupView'))\n\nconst ProductBackupHelp = lazy(() => import('./views/DataBackup/Products/ProductBackupHelp'))\n\nconst RestoreProductBackup = lazy(() => import('./views/DataBackup/Products/RestoreProductBackupView'))\n\nconst CreateProductBackup = lazy(() => import('./views/DataBackup/Products/CreateProductBackupView'))\n\nconst RestoreProductBackupHelp = lazy(() => import('./views/DataBackup/Products/RestoreProductBackupHelp'))\n\nconst CreateProductBackupHelp = lazy(() => import('./views/DataBackup/Products/CreateProductBackupHelp'))\n\nconst Import = lazy(() => import('./views/Import/ImportStartWrapper'))\n\nconst ImportHelp = lazy(() => import('./views/Import/ImportHelp'))\n\nconst Products = lazy(() => import('./views/Products/ProductsView'))\n\nconst ProductsHelp = lazy(() => import('./views/Products/ProductsViewHelp'))\n\nconst UpdateProduct = lazy(() => import('./views/Products/update/UpdateProductView').then(componentFile => {\n return { default: componentFile.UpdateProductWrapper}\n}))\n\nconst CreateNewProduct = lazy(() => import('./views/Products/create/CreateProductView'))\n\nconst ProductHelp = lazy(() => import('./views/Products/Components/ProductFormHelp'))\n\nconst Coupons = lazy(() => import('./views/Coupons/CouponsView').then(componentFile => {\n return { default: componentFile.CouponsWrapper}\n}))\n\nconst CouponsHelp = lazy(() => import('./views/Coupons/CouponsViewHelp'))\n\nconst UpdateCoupon = lazy(() => import('./views/Coupons/update/UpdateCouponView').then(componentFile => {\n return { default: componentFile.UpdateCouponWrapper}\n}))\n\nconst CreateNewCoupon = lazy(() => import('./views/Coupons/create/CreateCouponView'))\n\nconst CouponHelp = lazy(() => import('./views/Coupons/Components/CouponFormHelp'))\n\nconst UpdateCustomer = lazy(() => import('./views/Customers/UpdateCustomerView').then(componentFile => {\n return { default: componentFile.UpdateCustomerWrapper}\n}))\n\nconst CreateNewCustomer = lazy(() => import('./views/Customers/CreateCustomerView'))\n\nconst CustomerHelp = lazy(() => import('./views/Customers/CustomerFormHelp'))\n\nconst Customers = lazy(() => import('./views/Customers/CustomersView'))\n\nconst CustomersHelp = lazy(() => import('./views/Customers/CustomersViewHelp'))\n\nconst UpdateLogin = lazy(() => import('./views/Logins/UpdateLoginView').then(componentFile => {\n return { default: componentFile.UpdateLoginWrapper}\n}))\n\nconst CreateNewLogin = lazy(() => import('./views/Logins/CreateLoginView'))\n\nconst LoginHelp = lazy(() => import('./views/Logins/LoginFormHelp'))\n\nconst Logins = lazy(() => import('./views/Logins/LoginsView'))\n\nconst LoginsHelp = lazy(() => import('./views/Logins/LoginsViewHelp'))\n\nconst UpdateShippingMethod = lazy(() => import('./views/ShippingMethods/UpdateShipMethodView').then(componentFile => {\n return { default: componentFile.UpdateShipMethodWrapper}\n}))\n\nconst CreateNewShippingMethod = lazy(() => import('./views/ShippingMethods/CreateShipMethodView'))\n\nconst ShippingMethodHelp = lazy(() => import('./views/ShippingMethods/ShippingFormHelp'))\n\nconst ShippingMethods = lazy(() => import('./views/ShippingMethods/ShippingMethodsView'))\n\nconst ShippingMethodsHelp = lazy(() => import('./views/ShippingMethods/ShippingMethodsViewHelp'))\n\nconst UpdateShippingRate = lazy(() => import('./views/ShippingRates/UpdateShipRateView').then(componentFile => {\n return { default: componentFile.UpdateShipRateWrapper}\n}))\n\nconst CreateNewShippingRate = lazy(() => import('./views/ShippingRates/CreateShipRateView'))\n\nconst ShippingRateHelp = lazy(() => import('./views/ShippingRates/ShippingRateHelp'))\n\nconst ShippingRates = lazy(() => import('./views/ShippingRates/ShippingRatesView').then(componentFile => {\n return { default: componentFile.ShippingRatesWrapper}\n}))\n\nconst ShippingRatesHelp = lazy(() => import('./views/ShippingRates/ShippingRatesViewHelp'))\n\nconst UpdateTerm = lazy(() => import('./views/Terms/UpdateTermView').then(componentFile => {\n return { default: componentFile.UpdateTermWrapper}\n}))\n\nconst CreateNewTerm = lazy(() => import('./views/Terms/CreateTermView'))\n\nconst TermHelp = lazy(() => import('./views/Terms/TermFormHelp'))\n\nconst Terms = lazy(() => import('./views/Terms/TermsView'))\n\nconst TermsHelp = lazy(() => import('./views/Terms/TermsViewHelp'))\n\nconst Translations = lazy(() => import('./views/Translations/TranslationsView'))\n\nconst TranslationsHelp = lazy(() => import('./views/Translations/TranslationsViewHelp'))\n\nconst UpdateTranslation = lazy(() => import('./views/Translations/UpdateTranslationView').then(componentFile => {\n return { default: componentFile.UpdateTranslationWrapper }\n })\n)\n\nconst CreateNewTranslation = lazy(() => import('./views/Translations/CreateTranslationView'))\n\nconst TranslationHelp = lazy(() => import('./views/Translations/TranslationFormHelp'))\n\nconst CustomerNumbers = lazy(() => import('./views/CustomerNumbers/CustomerNumbersView'))\n\nconst CustNumsHelp = lazy(() => import('./views/CustomerNumbers/CustNumsViewHelp'))\n\nconst UpdateCustomerNumber = lazy(() => import('./views/CustomerNumbers/UpdateCustNumView').then(componentFile => {\n return { default: componentFile.UpdateCustNumWrapper}\n}))\n\nconst CreateCustomerNumber = lazy(() => import('./views/CustomerNumbers/CreateCustNumView'))\n\nconst CustNumHelp = lazy(() => import('./views/CustomerNumbers/CustNumFormHelp'))\n\nconst ContentGroups = lazy(() => import('./views/ContentGroups/ContentGroupsView').then(componentFile => {\n return { default: componentFile.ContentGroupsWrapper}\n}))\n\nconst UpdateContentGroup = lazy(() => import('./views/ContentGroups/UpdateContentGroupView').then(componentFile => {\n return { default: componentFile.UpdateContentGroupWrapper}\n}))\n\nconst CreateContentGroup = lazy(() => import('./views/ContentGroups/CreateContentGroupView'))\n\nconst ContentGroupHelp = lazy(() => import('./views/ContentGroups/ContentGroupFormHelp'))\n\nconst ContentGroupsViewHelp = lazy(() => import('./views/ContentGroups/ContentGroupViewHelp'))\n\nconst OrderHistory = lazy(() => import('./views/Analytics/components/OrderHistory').then(componentFile => {\n return { default: componentFile.OrderHistoryWrapper}\n}))\n\nconst OrderHistoryHelp = lazy(() => import('./views/Analytics/components/OrderHistoryHelp'))\n\nconst AbandonedCartReports = lazy(() => import('./views/Analytics/components/AbandonedCartReports'))\n\nconst AbandonedCartHelp = lazy(() => import('./views/Analytics/components/AbandonedCartHelp'))\n\nconst LoginReports = lazy(() => import('./views/Analytics/components/LoginReports'))\n\nconst LoginReportsHelp = lazy(() => import('./views/Analytics/components/LoginReportsHelp'))\n\nconst SuccessfulSearches = lazy(() => import('./views/Analytics/components/SuccessfulSearches'))\n\nconst SuccessfulSearchesHelp = lazy(() => import('./views/Analytics/components/SuccessfulSearchesHelp'))\n\nconst FailedSearches = lazy(() => import('./views/Analytics/components/FailedSearches'))\n\nconst UsageReports = lazy(() => import('./views/Analytics/components/UsageReports'))\n\nconst UsageReportsHelp = lazy(() => import('./views/Analytics/components/UsageReportsHelp'))\n\nconst ACHReports = lazy(() => import('./views/Analytics/components/PaginatedACHReports').then(componentFile => {\n return { default: componentFile.ACHReportsWrapper}\n}))\n\nconst ACHReportsHelp = lazy(() => import('./views/Analytics/components/ACHReportsHelp'))\n\nconst AudienceOverview = lazy(() => import('./views/Google/AudienceOverview'))\n\nconst AudienceOverviewHelp = lazy(() => import('./views/Google/components/AudienceOverviewHelp'))\n\nconst EcommerceOverview = lazy(() => import('./views/Google/EcommerceOverview'))\n\nconst EcommerceOverviewHelp = lazy(() => import('./views/Google/components/EcommerceOverviewHelp'))\n\nconst GoogleAnalyticsSettings = lazy(() => import('./views/Google/UpdateAnalyticsSettingsView'))\n\nconst GoogleAnalyticsSettingsHelp = lazy(() => import('./views/Google/AnalyticsSettingsHelp'))\n\nconst WebSetupCountries = lazy(() => import('./views/WebSetup/Countries/CountriesView').then(componentFile => {\n return { default: componentFile.CountriesWrapper}\n}))\n\nconst WebSetupCountriesHelp = lazy(() => import('./views/WebSetup/Countries/CountriesViewHelp'))\n\nconst UpdateWebSetupCountry = lazy(() => import('./views/WebSetup/Countries/UpdateCountryView').then(componentFile => {\n return { default: componentFile.UpdateCountryWrapper}\n}))\n\nconst CreateWebSetupCountry = lazy(() => import('./views/WebSetup/Countries/CreateCountryView').then(componentFile => {\n return { default: componentFile.CreateCountryWrapper}\n}))\n\nconst WebSetupCountryHelp = lazy(() => import('./views/WebSetup/Countries/CountryViewHelp'))\n\nconst WebSetupStates = lazy(() => import('./views/WebSetup/States/StatesView').then(componentFile => {\n return { default: componentFile.StatesViewWrapper}\n}))\n\nconst WebSetupStatesHelp = lazy(() => import('./views/WebSetup/States/StatesViewHelp'))\n\nconst UpdateWebSetupState = lazy(() => import('./views/WebSetup/States/UpdateStateView').then(componentFile => {\n return { default: componentFile.UpdateStateWrapper}\n}))\n\nconst CreateWebSetupState = lazy(() => import('./views/WebSetup/States/CreateStateView').then(componentFile => {\n return { default: componentFile.CreateStateWrapper}\n}))\n\nconst WebSetupStateHelp = lazy(() => import('./views/WebSetup/States/StateViewHelp'))\n\nconst WebSetupCustomFields = lazy(() => import('./views/WebSetup/CustomFields/CustomFieldsView').then(componentFile => {\n return { default: componentFile.CustomFieldsWrapper}\n}))\n\nconst WebSetupCustomFieldsViewHelp = lazy(() => import('./views/WebSetup/CustomFields/CustomFieldsViewHelp'))\n\nconst CreateWebSetupCustomField = lazy(() => import('./views/WebSetup/CustomFields/CreateCustomFieldView').then(componentFile => {\n return { default: componentFile.CreateCustomFieldWrapper}\n}))\n\nconst UpdateWebSetupCustomFields = lazy(() => import('./views/WebSetup/CustomFields/ReorderCustomFieldsView').then(componentFile => {\n return { default: componentFile.ReorderCustomFieldsWrapper}\n}))\n\nconst WebSetupCustomFieldViewHelp = lazy(() => import('./views/WebSetup/CustomFields/CustomFieldViewHelp'))\n\nconst WebSetupReorderCustomFieldHelp = lazy(() => import('./views/WebSetup/CustomFields/ReorderCustomFieldHelp'))\n\nconst WebSetupWebControls = lazy(() => import('./views/WebSetup/WebControls/WebControlsView').then(componentFile => {\n return { default: componentFile.WebControlsWrapper}\n}))\n\nconst WebSetupWebControlsHelp = lazy(() => import('./views/WebSetup/WebControls/WebControlsHelp'))\n\nconst UpdateWebControl = lazy(() => import('./views/WebSetup/WebControls/UpdateWebControlView').then(componentFile => {\n return { default: componentFile.UpdateWebControlWrapper}\n}))\n\nconst WebSetupWebControlHelp = lazy(() => import('./views/WebSetup/WebControls/WebControlHelp'))\n\nconst SalesReps = lazy(() => import('./views/SalesReps/Reps/SalesRepsView').then(componentFile => {\n return { default: componentFile.SalesRepsWrapper}\n}))\n\nconst SalesRepsHelp = lazy(() => import('./views/SalesReps/Reps/SalesRepsViewHelp'))\n\nconst UpdateSalesRep = lazy(() => import('./views/SalesReps/Reps/UpdateSalesRepView').then(componentFile => {\n return { default: componentFile.UpdateSalesRepWrapper}\n}))\n\nconst CreateSalesRep = lazy(() => import('./views/SalesReps/Reps/CreateSalesRepView'))\n\nconst SalesRepHelp = lazy(() => import('./views/SalesReps/Reps/SalesRepFormHelp'))\n\nconst SalesRepTypes = lazy(() => import('./views/SalesReps/RepTypes/RepTypesView').then(componentFile => {\n return { default: componentFile.SalesRepTypesWrapper}\n}))\n\nconst UpdateRepType = lazy(() => import('./views/SalesReps/RepTypes/UpdateRepTypeView').then(componentFile => {\n return { default: componentFile.UpdateRepTypeWrapper}\n}))\n\nconst CreateRepType = lazy(() => import('./views/SalesReps/RepTypes/CreateRepTypeView'))\n\nconst FeatureFlagsView = lazy(() => import('./views/FeatureFlags/FeatureFlagsView').then(componentFile => {\n return { default: componentFile.FeatureFlagsWrapper }\n}))\n\nconst UpdateFeatureFlagView = lazy(() => import('./views/FeatureFlags/UpdateFeatureFlagView').then(componentFile => {\n return { default: componentFile.UpdateFeatureFlagWrapper}\n}))\n\nconst FeatureFlagsViewHelp = lazy(() => import('./views/FeatureFlags/FlagHelpCards/FeatureFlagsViewHelp'))\n\nconst FeatureFlagHelp = lazy(() => import('./views/FeatureFlags/FlagHelpCards/FeatureFlagHelp'))\n\nconst ShippingAddressesView = lazy(() => import('./views/ShippingAddresses/ShippingAddressesView').then(componentFile => {\n return { default: componentFile.ShippingAddressesWrapper}\n}))\n\nconst ShippingAddressesHelp = lazy(() => import('./views/ShippingAddresses/ShippingAddressesViewHelp'))\n\nconst UpdateShippingAddressView = lazy(() => import('./views/ShippingAddresses/UpdateShipAddressView').then(componentFile => {\n return { default: componentFile.UpdateShipAddressWrapper}\n}))\n\nconst CreateShippingAddressView = lazy(() => import('./views/ShippingAddresses/CreateShipAddressView'))\n\nconst ShippingAddressHelp = lazy(() => import('./views/ShippingAddresses/ShipAddressFormHelp'))\n\nconst ExtraBillingView = lazy(() => import('./views/ExtraBilling/ExtraBillingsView').then(componentFile => {\n return { default: componentFile.ExtraBillingsWrapper}\n}))\n\nconst ExtraBillingsHelp = lazy(() => import('./views/ExtraBilling/ExtraBillingsViewHelp'))\n\nconst UpdateExtraBillingView = lazy(() => import('./views/ExtraBilling/UpdateExtraBillingView').then(componentFile => {\n return { default: componentFile.UpdateExtraBillingWrapper}\n}))\n\nconst CreateExtraBillingView = lazy(() => import('./views/ExtraBilling/CreateExtraBillingView'))\n\nconst ExtraBillingHelp = lazy(() => import('./views/ExtraBilling/ExtraBillingFormHelp'))\n\nconst ApprovalGroupsView = lazy(() => import('./views/ApprovalGroups/ApprovalGroupsView').then(componentFile => {\n return { default: componentFile.ApprovalGroupsWrapper}\n}))\n\nconst ApprovalGroupsHelp = lazy(() => import('./views/ApprovalGroups/ApprovalGroupsViewHelp'))\n\nconst UpdateApprovalGroupView = lazy(() => import('./views/ApprovalGroups/UpdateApprovalGroupView').then(componentFile => {\n return { default: componentFile.UpdateApprovalGroupWrapper}\n}))\n\nconst CreateApprovalGroupView = lazy(() => import('./views/ApprovalGroups/CreateApprovalGroupView'))\n\nconst ApprovalGroupHelp = lazy(() => import('./views/ApprovalGroups/ApprovalGroupFormHelp'))\n\nconst LoginBudgets = lazy(() => import('./views/LoginBudgets/LoginBudgetsView').then(componentFile => {\n return { default: componentFile.LoginBudgetsWrapper}\n}))\n\nconst LoginBudgetsHelp = lazy(() => import('./views/LoginBudgets/LoginBudgetsViewHelp'))\n\nconst UpdateLoginBudget = lazy(() => import('./views/LoginBudgets/UpdateLoginBudgetView').then(componentFile => {\n return { default: componentFile.UpdateLoginBudgetWrapper}\n}))\n\nconst CreateLoginBudget = lazy(() => import('./views/LoginBudgets/CreateLoginBudgetView'))\n\nconst LoginBudgetHelp = lazy(() => import('./views/LoginBudgets/LoginBudgetViewHelp'))\n\nconst ImageOverlays = lazy(() => import('./views/ImageOverlays/ImageOverlaysView'))\n\nconst ImageOverlaysHelp = lazy(() => import('./views/ImageOverlays/OverlaysViewHelp'))\n\nconst UpdateImageOverlay = lazy(() => import('./views/ImageOverlays/UpdateOverlayView').then(componentFile => {\n return { default: componentFile.UpdateOverlayWrapper}\n}))\n\nconst CreateNewImageOverlay = lazy(() => import('./views/ImageOverlays/CreateOverlayView'))\n\nconst ImageOverlayHelp = lazy(() => import('./views/ImageOverlays/OverlayFormHelp'))\n\nconst UpdateCompanyInfo = lazy(() => import('./views/CompanyInfo/UpdateCompanyInfoView'))\n\nconst CompanyInfoHelp = lazy(() => import('./views/CompanyInfo/CompanyInfoFormHelp'))\n\n// https://github.com/ReactTraining/react-router/tree/master/packages/react-router-config\nconst routes = [\n { path: '/dashboard', name: 'Dashboard', component: Dashboard, helpCard: DashboardHelp },\n // { path: '/custom-dashboard', name: 'Custom Dashboard', component: CustomDashboard, helpCard: CustomDashboardHelp },\n { path: '/select-catalog', name: 'SelectCatalog', component: SelectCatalog },\n { path: '/import', name: 'Import Data', component: Import, helpCard: ImportHelp },\n { path: '/product-maintenance/product-backups/restore/:id', name: 'Restore Product Backup', component: RestoreProductBackup, helpCard: RestoreProductBackupHelp},\n { path: '/product-maintenance/product-backups/create', name: 'Create Product Backup', component: CreateProductBackup, helpCard: CreateProductBackupHelp},\n { path: '/product-maintenance/product-backups', name: 'Product Backups', component: ProductBackups, helpCard: ProductBackupHelp},\n { path: '/product-maintenance/products/update/:id', name: 'Update Product', component: UpdateProduct, helpCard: ProductHelp },\n { path: '/product-maintenance/products/create', name: 'Create Product', component: CreateNewProduct, helpCard: ProductHelp },\n { path: '/product-maintenance/products', name: 'Products', component: Products, helpCard: ProductsHelp},\n { path: '/product-maintenance/coupons/update/:id', name: 'Update Coupon', component: UpdateCoupon, helpCard: CouponHelp },\n { path: '/product-maintenance/coupons/create', name: 'Create Coupon', component: CreateNewCoupon, helpCard: CouponHelp },\n { path: '/product-maintenance/coupons', name: 'Coupons', component: Coupons, helpCard: CouponsHelp },\n { path: '/product-maintenance/categories/reorder', name: 'Reorder Categories', component: ReorderCategory, helpCard: CategoryReorderHelp },\n { path: '/product-maintenance/categories/update/:id', name: 'Update Category', component: UpdateCategory, helpCard: CategoryFormHelp },\n { path: '/product-maintenance/categories/create', name: 'Create Category', component: CreateCategory, helpCard: CategoryFormHelp },\n { path: '/product-maintenance/categories', name: 'Categories', component: Categories, helpCard: CategoriesHelp },\n { path: '/product-maintenance/brands/update/:id', name: 'Update Brand', component: UpdateBrand, helpCard: BrandFormHelp },\n { path: '/product-maintenance/brands/create', name: 'Create Brand', component: CreateBrand, helpCard: BrandFormHelp },\n { path: '/product-maintenance/brands', name: 'Brands', component: Brands, helpCard: BrandsHelp },\n { path: '/product-maintenance/search-management', name: 'Search', component: SearchManagement, helpCard: SearchManagementHelp },\n { path: '/resource-maintenance/asset-management/update/:id', name: 'Update Asset', component: UpdateAsset, helpCard: AssetManagementFormHelp },\n { path: '/resource-maintenance/asset-management', name: 'Assets', component: AssetManagement, helpCard: AssetManagementViewHelp },\n { path: '/resource-maintenance/resources/reorder', name: 'Reorder Resources', component: ReorderResource, helpCard: ResourceReorderHelp },\n { path: '/resource-maintenance/resources/update/:id', name: 'Update Resource', component: UpdateResource, helpCard: ResourceFormHelp },\n { path: '/resource-maintenance/resources/create', name: 'Create Resource', component: CreateResource, helpCard: ResourceFormHelp },\n { path: '/resource-maintenance/resources', name: 'Resources', component: ResourceCenter, helpCard: ResourceCenterHelp },\n { path: '/resource-maintenance/overlays/update/:id', name: 'Update Overlay', component: UpdateImageOverlay, helpCard: ImageOverlayHelp },\n { path: '/resource-maintenance/overlays/create', name: 'Create Overlay', component: CreateNewImageOverlay, helpCard: ImageOverlayHelp },\n { path: '/resource-maintenance/overlays', name: 'Image Overlays', component: ImageOverlays, helpCard: ImageOverlaysHelp },\n { path: '/user-maintenance/customers/update/:id', name: 'Update Customer', component: UpdateCustomer, helpCard: CustomerHelp },\n { path: '/user-maintenance/customers/create', name: 'Create Customer', component: CreateNewCustomer, helpCard: CustomerHelp },\n { path: '/user-maintenance/customers', name: 'Customers', component: Customers, helpCard: CustomersHelp },\n { path: '/user-maintenance/logins/update/:id', name: 'Update Login', component: UpdateLogin, helpCard: LoginHelp },\n { path: '/user-maintenance/logins/create', name: 'Create Login', component: CreateNewLogin, helpCard: LoginHelp },\n { path: '/user-maintenance/logins', name: 'Logins', component: Logins, helpCard: LoginsHelp },\n { path: '/user-maintenance/shipping-methods/update/:id', name: 'Update Shipping Method', component: UpdateShippingMethod, helpCard: ShippingMethodHelp },\n { path: '/user-maintenance/shipping-methods/create', name: 'Create Shipping Method', component: CreateNewShippingMethod, helpCard: ShippingMethodHelp },\n { path: '/user-maintenance/shipping-methods', name: 'Shipping Methods', component: ShippingMethods, helpCard: ShippingMethodsHelp },\n { path: '/user-maintenance/shipping-rates/update/:id', name: 'Update Shipping Rate', component: UpdateShippingRate, helpCard: ShippingRateHelp },\n { path: '/user-maintenance/shipping-rates/create', name: 'Create Shipping Rate', component: CreateNewShippingRate, helpCard: ShippingRateHelp },\n { path: '/user-maintenance/shipping-rates', name: 'Shipping Rates', component: ShippingRates, helpCard: ShippingRatesHelp },\n { path: '/user-maintenance/terms/update/:id', name: 'Update Term', component: UpdateTerm, helpCard: TermHelp },\n { path: '/user-maintenance/terms/create', name: 'Create Term', component: CreateNewTerm, helpCard: TermHelp },\n { path: '/user-maintenance/terms', name: 'Terms', component: Terms, helpCard: TermsHelp },\n { path: '/user-maintenance/translations/update/:id', name: 'Update Translation', component: UpdateTranslation, helpCard: TranslationHelp },\n { path: '/user-maintenance/translations/create', name: 'Create Translation', component: CreateNewTranslation, helpCard: TranslationHelp },\n { path: '/user-maintenance/translations', name: 'Translations', component: Translations, helpCard: TranslationsHelp },\n { path: '/user-maintenance/customer-numbers/update/:id', name: 'Update Customer Number', component: UpdateCustomerNumber, helpCard: CustNumHelp },\n { path: '/user-maintenance/customer-numbers/create', name: 'Create Customer Number', component: CreateCustomerNumber, helpCard: CustNumHelp },\n { path: '/user-maintenance/customer-numbers', name: 'Customer Numbers', component: CustomerNumbers, helpCard: CustNumsHelp },\n { path: '/user-maintenance/content-groups/update/:id', name: 'Update Content Group', component: UpdateContentGroup, helpCard: ContentGroupHelp },\n { path: '/user-maintenance/content-groups/create', name: 'Create Content Group', component: CreateContentGroup, helpCard: ContentGroupHelp },\n { path: '/user-maintenance/content-groups', name: 'Content Groups', component: ContentGroups, helpCard: ContentGroupsViewHelp },\n { path: '/user-maintenance/warehouses/update/:id', name: 'Update Warehouse', component: UpdateWarehouse, helpCard: WarehouseFormHelp },\n { path: '/user-maintenance/warehouses/create', name: 'Create Warehouse', component: CreateWarehouse, helpCard: WarehouseFormHelp },\n { path: '/user-maintenance/warehouses/reorder', name: 'Reorder Warehouses', component: ReorderWarehouse, helpCard: WarehouseReorderHelp },\n { path: '/user-maintenance/warehouses', name: 'Warehouses', component: Warehouses, helpCard: WarehousesHelp },\n { path: '/analytics/order-history', name: 'Order History', component: OrderHistory, helpCard: OrderHistoryHelp },\n { path: '/analytics/abandoned-cart-reports', name: 'Abandoned Cart Reports', component: AbandonedCartReports, helpCard: AbandonedCartHelp },\n { path: '/analytics/login-reports', name: 'Login Reports', component: LoginReports, helpCard: LoginReportsHelp },\n { path: '/analytics/successful-searches', name: 'Successful Searches', component: SuccessfulSearches, helpCard: SuccessfulSearchesHelp },\n { path: '/analytics/failed-searches', name: 'Failed Searches', component: FailedSearches, helpCard: SuccessfulSearchesHelp },\n { path: '/analytics/usage-reports', name: 'Usage Reports', component: UsageReports, helpCard: UsageReportsHelp },\n { path: '/analytics/ach-reports', name: 'ACH Reports', component: ACHReports, helpCard: ACHReportsHelp },\n { path: '/google/audience-overview', name: 'Audience Overview', component: AudienceOverview, helpCard: AudienceOverviewHelp },\n { path: '/google/ecommerce-overview', name: 'Ecommerce Overview', component: EcommerceOverview, helpCard: EcommerceOverviewHelp },\n { path: '/google/ga-config', name: 'Google Analytics Settings', component: GoogleAnalyticsSettings, helpCard: GoogleAnalyticsSettingsHelp },\n { path: '/admin/websetup/countries/update/:id', name: 'Update Country', component: UpdateWebSetupCountry, helpCard: WebSetupCountryHelp },\n { path: '/admin/websetup/countries/create', name: 'Create Country', component: CreateWebSetupCountry, helpCard: WebSetupCountryHelp },\n { path: '/admin/websetup/countries', name: 'Countries', component: WebSetupCountries, helpCard: WebSetupCountriesHelp },\n { path: '/admin/websetup/states/update/:id', name: 'Update State', component: UpdateWebSetupState, helpCard: WebSetupStateHelp },\n { path: '/admin/websetup/states/create', name: 'Create State', component: CreateWebSetupState, helpCard: WebSetupStateHelp },\n { path: '/admin/websetup/states', name: 'States', component: WebSetupStates, helpCard: WebSetupStatesHelp },\n { path: '/admin/websetup/custom-fields/create', name: 'Create Custom Field', component: CreateWebSetupCustomField, helpCard: WebSetupCustomFieldViewHelp },\n { path: '/admin/websetup/custom-fields/reorder', name: 'Update Custom Fields', component: UpdateWebSetupCustomFields, helpCard: WebSetupReorderCustomFieldHelp },\n { path: '/admin/websetup/custom-fields', name: 'Custom Fields', component: WebSetupCustomFields, helpCard: WebSetupCustomFieldsViewHelp },\n { path: '/admin/websetup/webcontrols/booleans/update/:key', name: `Update Boolean WebControl`, component: UpdateWebControl, helpCard: WebSetupWebControlHelp },\n { path: '/admin/websetup/webcontrols/booleans', name: `Boolean WebControls`, component: WebSetupWebControls, helpCard: WebSetupWebControlsHelp },\n { path: '/admin/websetup/webcontrols/integers/update/:key', name: `Update Integer WebControl`, component: UpdateWebControl, helpCard: WebSetupWebControlHelp },\n { path: '/admin/websetup/webcontrols/integers', name: `Integer WebControls`, component: WebSetupWebControls, helpCard: WebSetupWebControlsHelp },\n { path: '/admin/websetup/webcontrols/strings/update/:key', name: `Update String WebControl`, component: UpdateWebControl, helpCard: WebSetupWebControlHelp },\n { path: '/admin/websetup/webcontrols/strings', name: `String WebControls`, component: WebSetupWebControls, helpCard: WebSetupWebControlsHelp },\n { path: '/admin/websetup/webcontrols/tiles/update/:key', name: `Update Tile WebControl`, component: UpdateWebControl, helpCard: WebSetupWebControlHelp },\n { path: '/admin/websetup/webcontrols/tiles', name: `Tile WebControls`, component: WebSetupWebControls, helpCard: WebSetupWebControlsHelp },\n { path: '/admin/websetup/webcontrols/sites/update/:key', name: `Update Site WebControl`, component: UpdateWebControl, helpCard: WebSetupWebControlHelp },\n { path: '/admin/websetup/webcontrols/sites', name: `Site WebControls`, component: WebSetupWebControls, helpCard: WebSetupWebControlsHelp },\n { path: '/admin/websetup/webcontrols/other/update/:key', name: `Update Other WebControl`, component: UpdateWebControl, helpCard: WebSetupWebControlHelp },\n { path: '/admin/websetup/webcontrols/other', name: `Other WebControls`, component: WebSetupWebControls, helpCard: WebSetupWebControlsHelp },\n { path: '/user-maintenance/sales-reps/reps/update/:id', name: `Update Sales Rep`, component: UpdateSalesRep, helpCard: SalesRepHelp },\n { path: '/user-maintenance/sales-reps/reps/create', name: `Create Sales Rep`, component: CreateSalesRep, helpCard: SalesRepHelp },\n { path: '/user-maintenance/sales-reps/reps', name: `Sales Reps`, component: SalesReps, helpCard: SalesRepsHelp },\n { path: '/user-maintenance/sales-reps/rep-types/update/:id', name: `Update Rep Type`, component: UpdateRepType, helpCard: SalesRepHelp },\n { path: '/user-maintenance/sales-reps/rep-types/create', name: `Create Rep Type`, component: CreateRepType, helpCard: SalesRepHelp },\n { path: '/user-maintenance/sales-reps/rep-types', name: `Sales Rep Types`, component: SalesRepTypes, helpCard: SalesRepsHelp },\n { path: '/user-maintenance/shipping-addresses/update/:id', name: `Update Shipping Address`, component: UpdateShippingAddressView, helpCard: ShippingAddressHelp },\n { path: '/user-maintenance/shipping-addresses/create', name: `Create Shipping Address`, component: CreateShippingAddressView, helpCard: ShippingAddressHelp },\n { path: '/user-maintenance/shipping-addresses', name: `Shipping Addresses`, component: ShippingAddressesView, helpCard: ShippingAddressesHelp },\n { path: '/user-maintenance/extra-billing/update/:id', name: `Update Extra Billing`, component: UpdateExtraBillingView, helpCard: ExtraBillingHelp },\n { path: '/user-maintenance/extra-billing/create', name: `Create Extra Billing`, component: CreateExtraBillingView, helpCard: ExtraBillingHelp },\n { path: '/user-maintenance/extra-billing', name: `Extra Billing`, component: ExtraBillingView, helpCard: ExtraBillingsHelp },\n { path: '/user-maintenance/approval-groups/groups/update/:id', name: `Update Approval Group`, component: UpdateApprovalGroupView, helpCard: ApprovalGroupHelp },\n { path: '/user-maintenance/approval-groups/groups/create', name: `Create Approval Group`, component: CreateApprovalGroupView, helpCard: ApprovalGroupHelp },\n { path: '/user-maintenance/approval-groups/groups', name: `Approval Groups`, component: ApprovalGroupsView, helpCard: ApprovalGroupsHelp },\n { path: '/user-maintenance/approval-groups/budgets/update/:id', name: `Update Login Budget`, component: UpdateLoginBudget, helpCard: LoginBudgetHelp },\n { path: '/user-maintenance/approval-groups/budgets/create', name: `Create Login Budget`, component: CreateLoginBudget, helpCard: LoginBudgetHelp },\n { path: '/user-maintenance/approval-groups/budgets', name: `Login Budgets`, component: LoginBudgets, helpCard: LoginBudgetsHelp },\n { path: '/admin/feature-flags/update/:key', name: `Update Feature Flag`, component: UpdateFeatureFlagView, helpCard: FeatureFlagHelp },\n { path: '/admin/feature-flags', name: `Feature Flags`, component: FeatureFlagsView, helpCard: FeatureFlagsViewHelp },\n { path: '/admin/company-info', name: `Update Company Info`, component: UpdateCompanyInfo, helpCard: CompanyInfoHelp },\n { path: '/redirect', name: 'Redirect', component: Redirect }\n];\n\nexport default routes;\n","import React, { useEffect, useState, Suspense } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { BrowserRouter as Router, Redirect, Route, Switch } from 'react-router-dom';\nimport { ErrorBoundary } from 'react-error-boundary';\nimport { RouteComponentProps } from \"react-router\";\nimport { useAuth0 } from \"@auth0/auth0-react\";\nimport { InteractionStatus, InteractionRequiredAuthError } from '@azure/msal-browser';\nimport { useIsAuthenticated, useMsal } from '@azure/msal-react';\nimport useFeature from \"./hooks/useFeature\";\nimport {\n getCatalog,\n getPermissions,\n getToken,\n isCatalogDataLoaded,\n isCatalogSelected,\n isFeatureFlagsLoaded,\n isGAConfigFetched,\n isPermissionsLoaded,\n isTokenLoaded\n} from './redux/selectors';\nimport { setToken, setPermissions } from './redux/slices/user.slice';\nimport { setAnalytics } from './redux/slices/analytics.slice';\nimport { setCatalogData } from './redux/slices/catalogData.slice';\nimport { setFeatureFlags } from './redux/slices/featureFlags.slice'\nimport ErrorFallback from './components/ErrorFallback';\nimport AntDefaultLayout from './containers/DefaultLayout/AntDefaultLayout';\nimport Loading from './components/Loading';\nimport LoadingLayout from \"./views/Pages/LoadingLayout\";\nimport { Login, SelectCatalogView } from './views/Pages';\nimport PrivateRoute from \"./components/PrivateRoute\";\nimport { fetchCatalog, getAnalyticsConfig, fetchFeatureFlags } from './data/api';\nimport routes from './routes';\nimport config from \"./app-config\";\nimport { loginScopes } from \"./authConfig\";\n/// Ag-Grid styles\nimport '@ag-grid-community/core/dist/styles/ag-grid.css';\nimport '@ag-grid-community/core/dist/styles/ag-theme-balham.css';\n// antd UI styles\nimport 'antd/dist/antd.css';\n// react-tooltip styles\nimport 'react-tooltip/dist/react-tooltip.css'\n// app styles\nimport './scss/style.css';\nimport './scss/App.css';\nimport './scss/DefaultLayout.css'\nimport './scss/SelectCatalog.css';\nimport './scss/Dashboard.css'\nimport './scss/DragDrop.css'\nimport './scss/Google.css'\nimport './scss/HelpInfoModal.css'\nimport './scss/ImportView.css'\nimport './scss/OrderHistory.css'\nimport './scss/ProductsView.css'\nimport './scss/ProductForm.css'\nimport './scss/ResourceCenter.css'\nimport './scss/PreviewResource.css'\nimport './scss/SearchManagement.css'\nimport { FeatureDecisions } from \"./models/App\";\n\nconst App = () => {\n const { isAuthenticated: isAuthenticatedAuth0, isLoading, user, getAccessTokenSilently } = useAuth0();\n /**\n * useMsal is hook that returns the PublicClientApplication instance,\n * an array of all accounts currently signed in and an inProgress value\n * that tells you what msal is currently doing. For more, visit:\n * https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-react/docs/hooks.md\n */\n const { instance, accounts, inProgress } = useMsal();\n const isAuthenticatedAzure = useIsAuthenticated();\n\n // retrieve initial state and 'existence' flags from store with redux hooks\n const token = useSelector(getToken);\n const tokenLoadedFlag = useSelector(isTokenLoaded);\n const permissions = useSelector(getPermissions);\n const permissionsLoadedFlag = useSelector(isPermissionsLoaded);\n const catalog = useSelector(getCatalog);\n const catalogSelectedFlag = useSelector(isCatalogSelected);\n const catalogDataLoadedFlag = useSelector(isCatalogDataLoaded);\n const gaConfigFetchedFlag = useSelector(isGAConfigFetched);\n const featureFlagsLoadedFlag = useSelector(isFeatureFlagsLoaded)\n const showAnalytics = useFeature((features: FeatureDecisions) => features.showAnalytics());\n\n // ensures we don't get overlapping calls to getTokenSilently\n const [pendingTokenRequest, setPendingTokenRequest] = useState(false);\n // get a reference to redux dispatch fxn\n const dispatch = useDispatch();\n // get an up-to-date access token every time isAuthenticated changes\n // put it in redux store so it can be attached to API requests\n // see authAxiosRequest.js\n useEffect(() => {\n console.log('a0 token hook');\n console.log('a0 flag', isAuthenticatedAuth0);\n if (config.REACT_APP_AZURE_AUTH !== 'true') {\n const updateTokenFxn = async () => {\n try {\n console.log('getting token silently');\n // set pending request flag to avoid overlapping calls to getTokenSilently\n // otherwise, refetching a stale/invalid token can cause a rerendering loop\n setPendingTokenRequest(true);\n // user permissions extracted from ID token in effect below\n const token = await getAccessTokenSilently({\n authorizationParams: {\n audience: config.REACT_APP_AUTH0_AUDIENCE\n }\n });\n dispatch(setToken(token))\n } catch (err) {\n console.error(err)\n } finally {\n setPendingTokenRequest(false)\n }\n };\n if (isAuthenticatedAuth0 && !tokenLoadedFlag && !pendingTokenRequest) {\n updateTokenFxn()\n }\n // not sure if we ever encounter this state but it's good practice to handle it\n // nullify the token and permissions so the user has no access until re-auth'd\n else if (!isAuthenticatedAuth0 && !pendingTokenRequest && tokenLoadedFlag) {\n console.log('not authenticated but have a token');\n dispatch(setToken(null));\n dispatch(setPermissions([]))\n } else if (!isAuthenticatedAuth0 && !tokenLoadedFlag && !pendingTokenRequest) {\n console.log('no auth & no token')\n // proceed even though we're not authed and have no token.\n // protected routes have an effect that will trigger user to login if not already auth'd.\n // we can't trigger a login here b/c some pages (like /login) are not protected and don't require auth.\n } else {\n console.log('auth\\'d and token ', token ? token.slice(-3) : 'none')\n }\n }\n }, [isAuthenticatedAuth0, tokenLoadedFlag, pendingTokenRequest]);\n\n useEffect(() => {\n console.log('az token hook');\n console.log('az flag', isAuthenticatedAzure);\n if (config.REACT_APP_AZURE_AUTH === 'true') {\n console.log('accounts', accounts)\n console.log('tokenLoaded', tokenLoadedFlag);\n console.log('pendingTokenReq', pendingTokenRequest);\n console.log(inProgress)\n if ((accounts.length > 0) && isAuthenticatedAzure && !tokenLoadedFlag && !pendingTokenRequest && inProgress === InteractionStatus.None) {\n console.log('getting token silently');\n // set pending request flag to avoid overlapping calls to getTokenSilently\n // otherwise, refetching a stale/invalid token can cause a rerendering loop\n setPendingTokenRequest(true);\n const request = {\n account: accounts[0],\n scopes: loginScopes.scopes\n }\n instance.acquireTokenSilent(request)\n .then(res => {\n dispatch(setToken(res.accessToken))\n console.log('stored az token ', res.accessToken ? res.accessToken.slice(-3) : 'none')\n })\n .catch(error => {\n console.log('acquireTokenSilent failed, falling back to acquireTokenRedirect')\n console.log(error)\n // acquireTokenSilent can fail for a number of reasons, fallback to interaction\n if (error instanceof InteractionRequiredAuthError) {\n // instance.acquireTokenPopup(request).then(res => {\n // return promise so .finally will not run until acquireTokenRedirect is resolved.\n // we don't want to call setPendingTokenRequest(false) if acquireTokenRedirect is in-process -\n // it re-runs this effect and will make a redundant call to acquireTokenSilent\n return instance.acquireTokenRedirect(request)\n .then(res => {\n console.log('stored az token from redirect')\n //@ts-ignore\n dispatch(setToken(res.accessToken))\n });\n }\n\n })\n .finally(() => {\n console.log('setPendingTokenRequest to false')\n setPendingTokenRequest(false)\n })\n }\n // not sure if we ever encounter this state but it's good practice to handle it\n // nullify the token and permissions so the user has no access until re-auth'd\n else if (!isAuthenticatedAzure && !pendingTokenRequest && tokenLoadedFlag) {\n console.log('not authenticated but have a token');\n dispatch(setToken(null));\n dispatch(setPermissions([]))\n } else if (!isAuthenticatedAzure && !tokenLoadedFlag && !pendingTokenRequest) {\n console.log('no auth & no token')\n // proceed even though we're not authed and have no token.\n // protected routes have an effect that will trigger user to login if not already auth'd.\n // we can't trigger a login here b/c some pages (like /login) are not protected and don't require auth.\n }\n }\n }, [isAuthenticatedAzure, accounts, tokenLoadedFlag, pendingTokenRequest, inProgress])\n\n useEffect(() => {\n console.log('getting user')\n if (isAuthenticatedAuth0) {\n if (user) {\n console.log('user loaded')\n let userAuthObject = user['http://www.channelsoftware.com/user-authorization'];\n // get user roles from id token (if relevant auth0 action is added to login flow):\n if (userAuthObject && userAuthObject.roles && userAuthObject.roles.length > 0) {\n dispatch(setPermissions([...userAuthObject.roles]));\n }\n } else {\n console.log('No ID token')\n // todo: add error handling to display message to user\n }\n }\n if (isAuthenticatedAzure) {\n // can't assign custom roles to our AD users at our current pricing tier -\n // instead, parse the username for the '@channelsoftware.com' domain\n // and dispatch the 'Channel Admin' permission manually\n if (accounts[0] && accounts[0].username && accounts[0].username.toLowerCase().includes('@channelsoftware.com')) {\n dispatch(setPermissions(['Channel Admin']))\n } else {\n dispatch(setPermissions([]))\n }\n }\n }, [isAuthenticatedAuth0, isAuthenticatedAzure, user, accounts])\n\n // if we have API access and a catalog, fetch the feature flag values from the API\n // and put them in redux. Flag values populate some fields in the\n // feature decision factory that are used to show/hide various UI elements\n useEffect(() => {\n if ((isAuthenticatedAuth0 || isAuthenticatedAzure) && tokenLoadedFlag && catalogSelectedFlag && !featureFlagsLoadedFlag) {\n console.log('getting flags')\n fetchFeatureFlags(catalog).then(({data}) => {\n console.log('flags loaded')\n dispatch(setFeatureFlags(data))\n }).catch(err => {\n // if endpoint throws an error, set an empty obj in\n // redux to make all flag checks falsey (hide content by default)\n console.log(err);\n dispatch(setFeatureFlags([]))\n })\n\n }\n }, [catalog, isAuthenticatedAuth0, isAuthenticatedAzure, tokenLoadedFlag, catalogSelectedFlag, featureFlagsLoadedFlag])\n\n // if we have API access, a catalog name from redux/localStorage, and no catalog data,\n // fetch catalog data so it can be put in Redux\n useEffect(() => {\n if ((isAuthenticatedAuth0 || isAuthenticatedAzure) && tokenLoadedFlag && catalogSelectedFlag && !catalogDataLoadedFlag) {\n console.log('getting catalog')\n fetchCatalog(catalog).then(({data}) => {\n console.log('catalog loaded')\n dispatch(setCatalogData(data))\n }).catch(err => {\n console.log(err)\n })\n }\n }, [catalog, catalogDataLoadedFlag, catalogSelectedFlag, tokenLoadedFlag, isAuthenticatedAuth0, isAuthenticatedAzure]);\n\n // if we have API access, a catalog name from redux, and no showAnalytics (google analytics) key in localStorage,\n // check if a GA config exists so DefaultLayout can hide GA data if needed\n // this effect is called when site is loaded for the 1st time in user's browser, or is viewed in private browser\n useEffect(() => {\n if ((isAuthenticatedAuth0 || isAuthenticatedAzure) && tokenLoadedFlag && catalogSelectedFlag && !gaConfigFetchedFlag && !showAnalytics) {\n console.log('getting analytics')\n getAnalyticsConfig(catalog).then((res) => {\n console.log('analytics loaded')\n dispatch(setAnalytics(res.status === 200));\n }).catch(err => {\n console.log(err);\n dispatch(setAnalytics(false))\n })\n }\n }, [catalog, catalogSelectedFlag, tokenLoadedFlag, gaConfigFetchedFlag, isAuthenticatedAuth0, isAuthenticatedAzure]);\n\n // ensure that the auth module (azure or auth0) is initialized, AND that the user has a token if they're auth'd\n // it's OK to not be auth'd at this point - non-auth'd users must be able to reach the route,\n // and protected routes have logic to require login if user is not auth'd\n // the check below catches the edge case where the auth module is initialized but\n // is in the process of retrieving a token and storing it, causing API requests to fail.\n\n // it's also OK to not have feature flags loaded yet - routes dependent on feature flags will not load\n // until flags are loaded due to the featureFlagsLoadedFlag check in the below\n\n // return loading if the auth module is initializing\n if (((inProgress !== InteractionStatus.None) && (inProgress !== InteractionStatus.Login))\n || ((config.REACT_APP_AZURE_AUTH !== 'true') && isLoading)\n // return loading if we're auth'd but have no token\n || (isAuthenticatedAuth0 && !tokenLoadedFlag)\n || (isAuthenticatedAzure && !tokenLoadedFlag)) {\n return (\n \n );\n }\n console.log('public URL: ' + config.REACT_APP_PUBLIC_URL);\n return (\n \n \n {/* Login route must be unprotected, because users will not yet be auth'd */}\n \n \n \n {/*\n * Restrict access to the rest of the application with PrivateRoutes, which run an auth check.\n * SelectCatalog routes must go here, before the check for featureFlagsLoadedFlag,\n * because a catalog is required in order to fetch the flags\n */}\n \n {/* Do not allow users to access further routes without first selecting a catalog. */}\n {!catalogSelectedFlag && }\n {/*\n * to show UI for any other route in the app, users must first have the feature flags loaded.\n * Feature flags determine which items are shown in the sidebar and which routes users have access to\n * Do not allow users to access further routes without loaded flags. If flags are in the process of loading,\n * show a loading spinner w/ limited header. This check is done here, instead of before the is returned,\n * in order to avoid re-render timing issues with redirecting after selecting a catalog.\n */}\n {!featureFlagsLoadedFlag && (\n \n )}\n {/* nested switch statements prevent users from being returned to their last location on login, so we can't use\n \n * where DefaultLayout exposes the current component with another Switch.\n * Instead we map the routes here, passing the current component\n * already wrapped in DefaultLayout HOC, as a prop for PrivateRoute */}\n {routes.map((route, idx) => {\n if (route.component) {\n const InnerComponent = route.component;\n\n // UI route component wrapped with default layout\n const wrappedComponent = (props: RouteComponentProps) => (\n \n }>\n \n \n \n \n \n );\n\n // protected route; checks authentication before returning wrapped component\n return \n }\n return (null)\n })}\n {/* fallback redirect - if there's a mismatch in routing, route to the dashboard */}\n \n \n \n );\n};\n\nexport default App;\n\n","import { LicenseManager } from '@ag-grid-enterprise/core';\nimport {\n ClientSideRowModelModule,\n CsvExportModule,\n InfiniteRowModelModule,\n ModuleRegistry\n} from '@ag-grid-community/all-modules';\nimport { RowGroupingModule } from '@ag-grid-enterprise/row-grouping';\nimport { MasterDetailModule } from '@ag-grid-enterprise/master-detail';\nimport { SideBarModule } from '@ag-grid-enterprise/side-bar';\nimport { FiltersToolPanelModule } from '@ag-grid-enterprise/filter-tool-panel';\nimport { ExcelExportModule } from '@ag-grid-enterprise/excel-export';\nimport { ServerSideRowModelModule } from '@ag-grid-enterprise/server-side-row-model'\n\n/**\n * Reusable function that initializes ag-grid. Provides license key to register enterprise version,\n * and registers modules for the functionality we use. Called in index.js and unit test renderers.\n */\nexport default function initializeAgGrid () {\n // per their docs, embedding the key in the frontend code is acceptable\n LicenseManager.setLicenseKey(\"CompanyName=Channel Software,LicensedApplication=CSX Console,LicenseType=SingleApplication,LicensedConcurrentDeveloperCount=1,LicensedProductionInstancesCount=-1,AssetReference=AG-028652,SupportServicesEnd=23_June_2023_[v2]_MTY4NzQ3NDgwMDAwMA==44b81140c61389cee9ddc7e090145160\");\n\n // globally register ag-grid modules here, before any grid is instantiated.\n// modularization lets us import a fraction of the ag-grid-enterprise library,\n// reducing bundle size by 0.7 MB.\n// registering modules globally prevents us from having to register them one-by-one\n// on each grid instance.\n ModuleRegistry.registerModules([\n ClientSideRowModelModule,\n InfiniteRowModelModule,\n RowGroupingModule,\n MasterDetailModule,\n SideBarModule,\n FiltersToolPanelModule,\n CsvExportModule,\n ExcelExportModule,\n ServerSideRowModelModule\n ])\n}\n","import 'react-app-polyfill/ie11';\nimport 'react-app-polyfill/stable';\nimport React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { Provider } from 'react-redux';\nimport { Helmet } from 'react-helmet'\nimport { QueryClient, QueryClientProvider } from \"react-query\";\nimport { Auth0Provider } from \"@auth0/auth0-react\";\nimport { ReactQueryDevtools } from 'react-query/devtools'\nimport { MsalProvider } from '@azure/msal-react';\nimport { PublicClientApplication, EventType } from \"@azure/msal-browser\";\nimport { msalConfig } from \"./authConfig.js\";\nimport App from './App';\nimport store from './redux/store';\nimport config from \"./app-config\";\nimport initializeAgGrid from './helpers/agGridLoader'\n\n// provision enterprise ag-grid and register modules\ninitializeAgGrid()\n\n\n// client for react-query; assists in caching query data\nconst queryClient = new QueryClient({\n defaultOptions: {\n queries: {\n retry: false,\n // default stale time of 5 min\n staleTime: 1000 * 60 * 5,\n // if query is stale, refetch when its useQuery hook is mounted\n // (can override this to refetch immediately w/ refetchInactive)\n refetchOnMount: true,\n refetchOnWindowFocus: false\n }\n }\n});\n\n// A function that routes the user to the right place after login\nconst onRedirectCallback = appState => {\n window.history.replaceState(\n {},\n document.title,\n appState && appState.targetUrl\n ? appState.targetUrl\n : window.location.pathname\n );\n};\n\n// While we migrate to an auth flow that uses Azure AD instead of Auth0, we'll need to support both paths.\n// The wrapping Auth provider will change based on which path we're currently using.\n// First, assign the common child components to a reusable variable:\nconst AppGuts = (\n \n \n CSX Admin Console\n \n \n \n \n \n \n)\n\n// The path will be dictated by the REACT_APP_AZURE_AUTH env var. If true, wrap the common child components\n// in the Azure auth provider:\nlet AuthWrapper;\nif (config.REACT_APP_AZURE_AUTH === 'true') {\n console.log('az wrap')\n // MSAL should be instantiated outside of the component tree to prevent it from being re-instantiated on re-renders.\n // For more, visit: https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-react/docs/getting-started.md\n const msalInstance = new PublicClientApplication(msalConfig);\n\n// Default to using the first account if no account is active on page load\n if (!msalInstance.getActiveAccount() && msalInstance.getAllAccounts().length > 0) {\n // Account selection logic is app dependent. Adjust as needed for different use cases.\n msalInstance.setActiveAccount(msalInstance.getAllAccounts()[0]);\n }\n msalInstance.addEventCallback((event) => {\n if (\n (event.eventType === EventType.LOGIN_SUCCESS ||\n event.eventType === EventType.ACQUIRE_TOKEN_SUCCESS ||\n event.eventType === EventType.SSO_SILENT_SUCCESS) &&\n event.payload.account\n ) {\n msalInstance.setActiveAccount(event.payload.account);\n }\n });\n\n AuthWrapper = (\n \n {AppGuts}\n \n )\n} else {\n console.log('a0 wrap')\n // otherwise, if the env var is falsey, wrap the common child components in the Auth0 provider:\n AuthWrapper = (\n \n {AppGuts}\n \n )\n}\n\n// support for earlier safari versions\nif (window.crypto && !window.crypto.subtle && window.crypto.webkitSubtle) {\n window.crypto.subtle = window.crypto.webkitSubtle;\n}\n\nconst container = document.getElementById('root')\nconst root = createRoot(container)\n\nroot.render(\n \n {AuthWrapper}\n \n);\n\n","import { createFeatureDecisionsFromStore } from './featureDecisions'\nimport { ProtectedEndpoint, ReqOptions, StoreData } from \"../models/App\";\n\n// When user makes an API call, check their permissions in the redux store to\n// ensure they have the access to call the endpoint.\n// A user should never be able to reach this state if UI permissions are working correctly,\n// but this adds an extra layer of auth protection.\n\n/**\n * A list of protected endpoints, including the specific feature decision that determines\n * whether the user has permission to call the endpoint.\n */\nconst permissionMap: ProtectedEndpoint[] = [\n // {\n // method: 'GET',\n // url: `/content-groups`,\n // includeFeature: (features: FeatureDecisions) => features.includeWriteSites()\n // // permission: 'write:sites'\n // }\n];\n\n/**\n * Function that checks whether user has the correct permissions to call an endpoint.\n * Called by authAxiosRequest.\n * @param {ReqOptions} reqOptions - Options for the request currently being made/checked.\n * Used to determine whether the request is being made to a protected endpoint.\n * @param {StoreData} store - current state of data in redux store\n * @returns {boolean} - boolean representing user's permission to call the endpoint\n */\nconst isUrlPermitted = (reqOptions: ReqOptions, store: StoreData) => {\n const catalog = store.catalog;\n // first find the correct endpoint in the array of protected endpoints\n const foundEndpoint = permissionMap.find(endpointObj => {\n return ((endpointObj.url.replace(':catalog', catalog) === reqOptions.url) && (endpointObj.method === reqOptions.method))\n });\n\n if (!foundEndpoint) return true;\n\n // then generate the feature decisions based on the current store values\n const featureDecisions = createFeatureDecisionsFromStore(store);\n // return permission boolean\n return foundEndpoint.includeFeature(featureDecisions)\n};\n\nexport default isUrlPermitted\n","import axios from 'axios';\nimport reduxStore from '../redux/store';\nimport { setToken } from '../redux/slices/user.slice';\nimport config from \"../app-config\";\nimport isUrlPermitted from './endpointPermissions'\n\n/**\n * Generates the base API URL to be used in API requests. For most older clients this value is supplied via\n * a pipeline variable, which in production is embedded in the built index.html and extracted by app-config.\n * For most newer clients the base API URL is by convention an extension of the URL where the console frontend\n * is hosted, so we can use the window location to construct it.\n * @returns {string} - the base URL to be used in API requests\n */\nexport const getAPIVariable = () => {\n if (config.REACT_APP_API && config.REACT_APP_API.length > 0) return config.REACT_APP_API;\n else return `${window.location.origin}/api`\n};\n\n/**\n * Creates an Axios Client with default url to make API requests.\n */\nconst client = axios.create({\n baseURL: getAPIVariable()\n});\n\n/**\n * Initializes a cancellation token that will be called if app gets stuck in a 401 loop. Sometimes when using a stale token\n * the app will get stuck in a cycle of retrying a denied request with the expired token instead of fetching/using a new\n * token. This rare timing issue is challenging to debug and completely resolve, so we protect against it by issuing a\n * cancellation token used to break the loop if the app encounters > 5 failed reqs due to 401s.\n * @type {CancelTokenStatic}\n */\n// const CancelToken = axios.CancelToken;\n// const source = CancelToken.source();\nconst controller = new AbortController()\n/**\n * Initializes count for failed 401 requests. If the count reaches 5, cancellation token will be called to exit 401 loop.\n * @type {number}\n */\nlet failedReqAttempts = 0;\n\n/**\n * Initializes a request wrapper with default success/error actions. This wrapper prepares axios requests for our API\n * by attaching an access token from redux, setting necessary request headers and adding the cancellation token initialized\n * above. Used to implement API endpoints in api.ts.\n * @param {Object} options - request params such as method, request route, and body data\n */\nconst wrappedRequest = function (options) {\n let accessToken = null;\n\n const storeData = reduxStore.getState();\n\n if (storeData.user && storeData.user.accessToken) {\n accessToken = storeData.user.accessToken\n }\n // if we still have a null token value at this point, reject request\n // helps avoid race condition where redux token perpetually loops btwn stale value and null\n if (!accessToken) return Promise.reject({data: 'no token'});\n\n // check user's permissions to see if they have access to call the endpoint\n // not currently implemented but available if we want to add an additional layer of protection for\n // provisioned/restricted features\n if (!isUrlPermitted(options, storeData)) {\n return Promise.reject({data: `You don't have permission to call the endpoint ${options.method} ${options.url}.`})\n }\n\n // attach token to wrapped axios request, add cancellation token, set headers\n const optionsWithAuth = {\n ...options,\n // cancelToken: source.token,\n signal: controller.signal,\n headers: {\n ...options.headers,\n Authorization: 'Bearer ' + accessToken,\n Pragma: 'no-cache'\n }\n };\n\n // called if request returns a success code\n const onSuccess = function(response) {\n const requestPath = optionsWithAuth.url;\n // on a successful response, set the failed 401 count back to 0 -\n // any 401 thrown was likely due to a stale token which has since been refetched\n // however - don't reset the count if the successful request was to a google-analytics endpoint:\n // these are currently unprotected so will always succeed even with an invalid token\n // (may be resolved in SUB2-1617)\n if (!requestPath.includes('google-analytics')) failedReqAttempts = 0;\n // catch malformed responses - responses where the API returns a success code but the payload is malformed\n // in the past this has presented as a string value for response.data (html for the frontend bundle)\n // likely caused by an issue with API implementation/routing\n // won't implement for now - high risk since it affects every xhr request - but we can if we start seeing more malformed issues\n // if (!response.data || typeof response.data !== 'object') throw new Error('malformed response');\n // console.debug('Request Successful!', response);\n // if (response.data && response.data.data) return response.data;\n // sometimes a valid response.data.data value === false, as when checking for part number uniqueness\n // make sure response.data exists, then return response.data.data (if it exists) OR response.data === null (also a potentially valid response)\n if (response.data !== undefined && (response.data === null || response.data.data !== undefined)) return response.data;\n else return response;\n };\n\n // called if request returns an error code; rejects request Promise\n const onError = function(err) {\n console.error('Request failed:', err.response);\n if (err.response) {\n // Request was made but server responded with something other than 2xx\n console.error('Status:', err.response.status);\n console.error('Error:', err.response.data && err.response.data.error ? err.response.data.error : err.response.data);\n console.error('Headers:', err.response.headers);\n if (err.response.status == 401) {\n // user is unauthorized:\n // either they're using a stale access token, or there's an issue with the API\n console.log('received 401');\n // to avoid an infinite loop of retrying requests,\n // increment count for failed requests...\n failedReqAttempts++;\n // ...and if we've reached the limit, issue the req cancellation token\n // to stop the loop from hammering the API\n // if (failedReqAttempts > 5) source.cancel('Cancelled requests - invalid access token');\n if (failedReqAttempts > 5) {\n controller.abort();\n console.log('Cancelled requests - invalid access token')\n }\n // otherwise it was likely a stale token\n // so clear token in store so app.js renews it\n if (accessToken && failedReqAttempts <= 5 ) {\n console.log('nullifying token')\n reduxStore.dispatch(setToken(null));\n }\n }\n } else {\n // Something else happened while setting up the request\n // triggered the error\n console.error('Error Message:', err);\n }\n return Promise.reject(err.response || err.data || err);\n };\n\n // setup promise chain\n return client(optionsWithAuth)\n .then(onSuccess)\n .catch(onError)\n};\n\nexport default wrappedRequest;\n","import { createSlice } from '@reduxjs/toolkit';\n\nconst userSlice = createSlice({\n name: 'user',\n initialState: {\n accessToken: null,\n permissions: null\n },\n reducers: {\n setToken(state, action) {\n state.accessToken = action.payload\n },\n setPermissions(state, action) {\n state.permissions = action.payload\n }\n }\n})\n\n// Extract the action creators object and the reducer\nconst { actions, reducer } = userSlice\n// Extract and export each action creator by name\nexport const { setToken, setPermissions } = actions\n// Export the reducer, either as a default or named export\nexport default reducer\n","import * as Yup from 'yup';\nimport { DataModelFieldObj } from '../../../models/Product';\nimport { AnalyticsDateRange } from \"../../../models/App\";\nimport moment from \"moment\";\nimport {\n GA4GoogleAnalyticsData,\n GA4GoogleAnalyticsDataRow,\n ParsedAnalyticsData\n} from \"../../../models/Analytics\";\n\n// helper functions used by google analytics settings form\n\n// generates analytics model and initial values when loading the form\n\nexport function createAnalyticsData () {\n const dataModel: Record> = analyticsModel();\n const initialValues: Record = {};\n Object.keys(dataModel).forEach(field => initialValues[field] = dataModel[field].initialValue);\n return initialValues\n}\n\n// generates validation schema for RHF and adds custom Yup validations when initializing form\nexport function createValidationSchema () {\n const dataModel: Record> = analyticsModel();\n const schema: Record = {};\n Object.keys(dataModel).forEach(field => schema[field] = dataModel[field].validationScheme());\n return schema\n}\n\n// data source for generating analytics model/initial values when loading the form\n// also used to initialize validation schema and custom Yup methods\nexport const analyticsModel = () => {\n return {\n clientEmail: {\n initialValue: null,\n validationScheme: () => Yup.string().nullable().required('Required field'),\n },\n privateKey: {\n initialValue: null,\n validationScheme: () => Yup.string().nullable().required('Required field'),\n },\n applicationName: {\n initialValue: null,\n validationScheme: () => Yup.string().nullable().required('Required field'),\n },\n propertyId: {\n initialValue: null,\n validationScheme: () => Yup.string().nullable().required('Required field'),\n },\n }\n};\n\n/**\n * converts a MM-DD-YYYY date range (used by 'old' UA google analytics API) to the\n * YYYY-MM-DD format (used by 'new' GA4 google analytics API). allows the date picker to use a single\n * format, which is converted when making the API request.\n * @param {AnalyticsDateRange} dateRange\n */\nexport const convertDatesForGA4 = (dateRange: AnalyticsDateRange) => {\n return {\n startDate: moment(dateRange.startDate, 'MM-DD-YYYY').format('YYYY-MM-DD'),\n endDate: moment(dateRange.endDate, 'MM-DD-YYYY').format('YYYY-MM-DD')\n }\n}\n\n/**\n * Extracts GA4 row metric data so totals can be displayed on cards on the dashboard\n * @param {GA4GoogleAnalyticsDataRow[]} metrics\n * @param {number} metricIndex\n */\n\nexport const getGA4DashboardCardData = (metrics: GA4GoogleAnalyticsDataRow[], metricIndex: number) => {\n const data = metrics.length > 0 ? parseFloat(metrics[0].metricValues[metricIndex].value) : 0\n return data\n}\n\n/**\n * Prepares GA4 top revenue product data for display in a table in our UI. In some implementations,\n * image field will be populated later in an effect so image tooltips can be shown.\n *\n * @param {GA4GoogleAnalyticsData} analyticsData\n */\nexport const parseGA4TopRevenueData = (analyticsData: GA4GoogleAnalyticsData) => {\n let tableRows = [] as ParsedAnalyticsData[];\n\n analyticsData.rows.forEach((rowData: GA4GoogleAnalyticsDataRow) => {\n tableRows.push({\n \"dimensions\": rowData.dimensionValues[0].value,\n \"dimensions2\": rowData.dimensionValues[1].value,\n \"metrics1\": rowData.metricValues[0].value,\n \"metrics2\": rowData.metricValues[1].value,\n \"image\": 'loading'\n })\n })\n return tableRows;\n};\n\n/**\n * Prepares GA4 traffic data for display in a bar chart. x-axis is date dimension,\n * y-axis is a metric returned by the API - sessions, total users, new users, and bounce rate.\n * We convert bounce rate to total bounced sessions/day by multiplying it by session data\n * (rowData.metricValues[0]). This keeps it consistent with UA data.\n * @param {GA4GoogleAnalyticsData} analyticsData\n */\nexport const parseGA4TrafficChartData = (analyticsData: GA4GoogleAnalyticsData) => {\n let chartDates: string[] = []\n let chartMetrics: any = {\n metrics1: [],\n metrics2: [],\n metrics3: [],\n metrics4: [],\n }\n analyticsData.rows.forEach((rowData: any) => {\n chartDates.push(rowData.dimensionValues[0].value)\n chartMetrics.metrics1.push(rowData.metricValues[0].value)\n chartMetrics.metrics2.push(rowData.metricValues[1].value)\n chartMetrics.metrics3.push(rowData.metricValues[2].value)\n chartMetrics.metrics4.push(rowData.metricValues[3].value * rowData.metricValues[0].value)\n })\n return {\n labels: chartDates,\n data1: chartMetrics.metrics1,\n data2: chartMetrics.metrics2,\n data3: chartMetrics.metrics3,\n data4: chartMetrics.metrics4,\n };\n}\n\n/**\n * Prepares ecommerce GA4 data for display in a bar chart. x-axis is date dimension,\n * y-axis is an ecommerce metric returned by the API - purchaseRevenue, averagePurchaseRevenue,\n * transactionsPerPurchaser, or itemsPurchased.\n * @param {GA4GoogleAnalyticsData} analyticsData\n */\nexport const parseGA4EcommerceChartData = (analyticsData: GA4GoogleAnalyticsData) => {\n let chartDates: string[] = []\n let chartMetrics: any = {\n metrics1: [],\n metrics2: [],\n metrics3: [],\n metrics4: [],\n }\n analyticsData.rows.forEach((rowData: any) => {\n chartDates.push(rowData.dimensionValues[0].value)\n // if showing a rate metric, multiple by 100 to show a percentage\n if (analyticsData.metricHeaders[0].name && analyticsData.metricHeaders[0].name === 'sessionConversionRate') {\n chartMetrics.metrics1.push(rowData.metricValues[0].value * 100)\n }\n else chartMetrics.metrics1.push(rowData.metricValues[0].value)\n })\n return {\n labels: chartDates,\n data1: chartMetrics.metrics1,\n data2: chartMetrics.metrics2\n };\n}\n","import React from 'react';\nimport BeatLoader from 'react-spinners/BeatLoader';\n\nconst Loading = () => (\n
\n \n
\n);\n\nexport default Loading;\n","import querystring from'querystring';\nimport axiosWrapper from '../auth/authAxiosRequest';\nimport { getAPIVariable } from '../auth/authAxiosRequest'\nimport { CategoryToApi, SequencedCategory } from \"../models/Category\";\nimport {\n ExportProductReqParams,\n PaginatedAssetsReqParams,\n PaginatedProductReqParams,\n ProductToApi\n} from \"../models/Product\";\nimport { Brand } from \"../models/Brand\";\nimport { ReorderedWarehouse, Warehouse } from \"../models/Warehouse\";\nimport {\n BillingImport,\n CategoryImport,\n CustomerImportToApi,\n ImportFormValues, ProductDocImport, ProductGalleryImport,\n ProductImportToApi,\n TranslationImport\n} from \"../models/Import\";\nimport { Coupon } from \"../models/Coupon\";\nimport { SearchConfig } from \"../models/Search\";\nimport { Customer } from \"../models/Customer\";\nimport { Login, ResetLoginPWBody } from \"../models/Login\";\nimport { ShippingMethod } from \"../models/ShippingMethod\";\nimport { Term } from \"../models/Term\";\nimport { Translation } from \"../models/Translation\";\nimport { ShippingRate } from \"../models/ShippingRate\";\nimport { CustomerNumber } from \"../models/CustomerNumber\";\nimport { ContentGroup } from \"../models/ContentGroup\";\nimport {\n ACHPaginationParams,\n AnalyticsDateRange, GoogleAnalyticsConfig, FeatureFlagToApi,\n OrderHistoryPaginationParams, SharedACHPaginationParams\n} from \"../models/App\";\nimport { BaseResource, ImageOverlayToApi, LibraryAsset } from \"../models/Resource\";\nimport { Country, CustomField, State, WebControl } from \"../models/Websetup\";\nimport { SalesRepToApi, SalesRepType } from \"../models/SalesRep\";\nimport { ShipTo } from \"../models/ShipTo\";\nimport { ACHExportStatus } from \"../models/Analytics\";\nimport { ExtraBilling } from \"../models/ExtraBilling\";\nimport { ApprovalGroup } from \"../models/ApprovalGroup\";\nimport { LoginBudgetToApi } from \"../models/LoginBudget\"\nimport { convertDatesForGA4 } from \"../views/Google/helpers/google-analytics-init\";\nimport { CompanyInfoToAPI } from \"../models/CompanyInfo\";\n\nconst url = getAPIVariable();\n\n// response.data\nconst fetchCatalogs = () => {\n return axiosWrapper({ method: 'GET', url: `/v2/catalogs` });\n};\n\n// response.data\nconst fetchCatalog = (catalog: string) => {\n return axiosWrapper({ method: 'GET', url: `/v2/catalogs/${catalog}` });\n}\n\n// response.data\nconst fetchCategories = (catalog: string) => axiosWrapper({\n method: 'GET',\n url: `v2/catalogs/${catalog}/categories`\n});\n\n// response.data\nconst fetchCategory = (catalog: string, categoryID: number | string) => axiosWrapper({\n method: 'GET',\n url: `v2/catalogs/${catalog}/categories/${categoryID}`\n});\n\n// response.data\nconst fetchCategoryTree = (catalog: string) => {\n return axiosWrapper({\n method: 'GET',\n url: `v2/catalogs/${catalog}/categories/tree`\n });\n// return Promise.resolve({data: categoryTreeData})\n}\n\n\n// empty response\nconst deleteCategory = (catalog: string, categoryID: number | string) => axiosWrapper({\n method: 'DELETE',\n url: `v2/catalogs/${catalog}/categories/${categoryID}`\n});\n\n// empty response\nconst updateCategory = (catalog: string, categoryID: number, values: CategoryToApi) => axiosWrapper({\n method: 'PATCH',\n url: `v2/catalogs/${catalog}/categories/${categoryID}`,\n data: { ...values }\n});\n\n// response\nconst createCategory = (catalog: string, values: CategoryToApi) => axiosWrapper({\n method: 'POST',\n url: `v2/catalogs/${catalog}/categories`,\n data: { ...values }\n});\n\n// empty response\nconst reorderCategories = (catalog: string, categoryStructure: SequencedCategory[]) => axiosWrapper({\n method: 'PATCH',\n url: `v2/catalogs/${catalog}/categories`,\n data: [ ...categoryStructure ]\n});\n\n// reorders subcategories by category name\nconst alphabetizeCategories = (catalog: string) => axiosWrapper({method: 'POST', url: `v2/catalogs/${catalog}/categories/_alphabetize`, data: {}});\n\n// empty response\n// if >=1 product belonging to a category has an assigned image, adds that image to categories that do not have an assigned image\nconst propagateCatImages = (catalog: string) => axiosWrapper({method: 'POST', url: `v2/catalogs/${catalog}/categories/_propagateImages`, data: {}});\n\n// for testing race condition between fetchPagedProducts/fetchProduct\n// function wait(milliseconds: number) {\n// return new Promise(resolve => setTimeout(resolve, milliseconds));\n// }\n\n// response.data\nconst fetchPagedProducts = (catalog: string, options: PaginatedProductReqParams) => {\n // @ts-ignore\n const optionsString = querystring.stringify(options);\n //pageNumber, pageSize, sortColumn, searchString\n return axiosWrapper({ method: 'GET', url: `v2/catalogs/${catalog}/products?${optionsString}` });\n\n // testing race condition\n // return wait(1000).then(() => {\n // return axiosWrapper({ method: 'GET', url: `v2/catalogs/${catalog}/products?${optionsString}` });\n // })\n};\n\n// response.data\nconst fetchProduct = (catalog: string, webID: number | string) => {\n return axiosWrapper({ method: 'GET', url: `v3/catalogs/${catalog}/products/${webID}` });\n};\n\n// response.data\nconst checkPartNumberUnique = (catalog: string, partNumber: string) => axiosWrapper({ method: 'GET', url: `v2/catalogs/${catalog}/products/_exists?partNumber=${partNumber}` });\n\n// response.data\nconst checkFriendlyUrlUnique = (catalog: string, friendlyUrl: string) => axiosWrapper({ method: 'GET', url: `v2/catalogs/${catalog}/products/_friendlyUrlNameExists?friendlyUrlName=${friendlyUrl}` });\n// Promise.resolve({\"data\": {\"data\": false}})\n\n// response.data\nconst createProduct = (catalog: string, productData: ProductToApi) => {\n return axiosWrapper({\n method: 'POST',\n url: `v3/catalogs/${catalog}/products`,\n data: productData\n });\n};\n\n// empty response\nconst updateProduct = (\n catalog: string,\n webID: number,\n productData: ProductToApi\n) => {\n return axiosWrapper({\n method: 'PATCH',\n url: `v3/catalogs/${catalog}/products/${webID}`,\n data: productData\n });\n};\n\n// empty response\nconst deleteProduct = (catalog: string, webID: number | string) => axiosWrapper({ method: 'DELETE', url: `v2/catalogs/${catalog}/products/${webID}` });\n\n// empty response\nconst deleteProducts = (catalog: string, webIdArray: number[]) => {\n return axiosWrapper({ method: 'POST', url: `v2/catalogs/${catalog}/products/_delete`, data: webIdArray });\n};\n\n// response\nconst exportProducts = (catalog: string, options: ExportProductReqParams) => {\n // @ts-ignore\n const optionsString = querystring.stringify(options);\n return axiosWrapper({ method: 'GET', url: `v2/catalogs/${catalog}/products/_export?${optionsString}`, responseType: 'blob'});\n}\n\nconst exportRelatedProducts = (catalog: string) => {\n return axiosWrapper({ method: 'GET', url: `v2/catalogs/${catalog}/products/relatedProducts/_export`, responseType: 'blob'});\n}\n\nconst exportVariantProducts = (catalog: string) => {\n return axiosWrapper({ method: 'GET', url: `v3/catalogs/${catalog}/products/variantProducts/_export`, responseType: 'blob'});\n}\n\nconst exportGalleryImages = (catalog: string) => {\n return axiosWrapper({ method: 'GET', url: `v3/catalogs/${catalog}/products/galleryImages/_export`, responseType: 'blob'});\n}\n\n// response\nconst exportCategories = (catalog: string) => axiosWrapper({ method: 'GET', url: `v2/catalogs/${catalog}/categories/_export`, responseType: 'blob'});\n\n// response.data\nconst fetchBrands = (catalog: string) => axiosWrapper({ method: 'GET', url: `/catalogs/${catalog}/brands` });\n\n// response.data\nconst fetchBrand = (catalog: string, brandId: number | string) => {\n return axiosWrapper({ method: 'GET', url: `/catalogs/${catalog}/brands/${brandId}` });\n};\n\n// empty response\nconst updateBrand = (catalog: string, brandId: number, brandData: Brand) => axiosWrapper({ method: 'PATCH', url: `/catalogs/${catalog}/brands/${brandId}`, data: brandData });\n\n// response.data (w/ complete brand data)\nconst createBrand = (catalog: string, brandData: Brand) => axiosWrapper({ method: 'POST', url: `/catalogs/${catalog}/brands`, data: brandData });\n\n// empty response\nconst deleteBrand = (catalog: string, brandId: number | string) => axiosWrapper({ method: 'DELETE', url: `/catalogs/${catalog}/brands/${brandId}` });\n\n// response\nconst fetchProductBackups = (catalog: string) => axiosWrapper({ method: 'GET', url: `/catalogs/${catalog}/backups` });\n\n// response\nconst fetchProductBackup = (catalog: string, backupId: number | string) => axiosWrapper({ method: 'GET', url: `/catalogs/${catalog}/backups/${backupId}` });\n\n// empty response\nconst createProductBackup = (catalog: string, data: {notes: string}) => axiosWrapper({ method: 'POST', url: `/catalogs/${catalog}/backups`, data });\n\n// assume empty response\nconst restoreProductBackup = (catalog: string, backupId: number) => axiosWrapper({ method: 'POST', url: `/catalogs/${catalog}/backups/${backupId}/_restore` });\n\n// empty response\nconst deleteProductBackup = (catalog: string, backupId: number | string) => axiosWrapper({ method: 'DELETE', url: `/catalogs/${catalog}/backups/${backupId}` });\n\n// response.data\nconst fetchWarehouses = () => axiosWrapper({ method: 'GET', url: `/Warehouses` });\n\n// assume response.data (endpoint currently throwing 500)\nconst fetchWarehouse = (warehouseId: number | string) => axiosWrapper({ method: 'GET', url: `/warehouses/${warehouseId}` });\n\n// response (w/ complete whse data)\nconst createWarehouse = (data: Warehouse) => axiosWrapper({ method: 'POST', url: `/warehouses`, data });\n\n// assume empty response (fetchWarehouse currently throwing 500)\nconst updateWarehouse = (warehouseId: number, data: Warehouse) => axiosWrapper({ method: 'PATCH', url: `/warehouses/${warehouseId}`, data });\n\n// empty response\nconst deleteWarehouse = (warehouseId: number | string) => axiosWrapper({ method: 'DELETE', url: `/warehouses/${warehouseId}` });\n\nconst reorderWarehouses = (warehouseStructure: ReorderedWarehouse[]) => {\n return axiosWrapper({\n method: 'PATCH',\n url: `/warehouses`,\n data: [ ...warehouseStructure ]\n });\n};\n\n// response\nconst uploadSpreadsheet = (importSpreadsheet: File, onProgress: Function) => {\n const formData = new FormData();\n // 3rd param filename needed for requests in Edge\n // otherwise user's entire local filepath is POSTed\n formData.append('attachment', importSpreadsheet, importSpreadsheet.name);\n return axiosWrapper({\n method: 'POST',\n url: `${url}/Attachments`,\n data: formData,\n headers: {\n 'Content-Type': 'multipart/form-data'\n },\n onUploadProgress: ({ total, loaded }: {total: number, loaded: number}) => {\n onProgress({ percent: Math.round(loaded / total * 100) });\n }\n });\n};\n\n// used when importing products from .xslx\n// empty response\nconst mapProductFieldsFromUpload = (\n catalog: string,\n spreadsheetId: number,\n activeSheet: string,\n values: ImportFormValues,\n callV3ProductImport: boolean\n) => {\n const body = {\n ...values,\n attachmentId: spreadsheetId,\n worksheetName: activeSheet\n };\n\n const endpoint = !!callV3ProductImport ? `${url}/v3/catalogs/${catalog}/Products/_import` : `${url}/v2/catalogs/${catalog}/Products/_import`\n\n return axiosWrapper({\n method: 'POST',\n url: endpoint,\n data: body,\n headers: { 'Content-Type': 'application/json-patch+json' }\n });\n};\n\n// used when importing categories from .xslx\n// empty response\nconst mapCategoryFieldsFromUpload = (\n catalog: string,\n spreadsheetId: number,\n activeSheet: string,\n values: ImportFormValues\n) => {\n const body = {\n ...values,\n attachmentId: spreadsheetId,\n worksheetName: activeSheet\n };\n\n return axiosWrapper({\n method: 'POST',\n url: `${url}/v2/catalogs/${catalog}/Categories/_import`,\n data: body,\n headers: { 'Content-Type': 'application/json-patch+json' }\n });\n};\n\n// used when importing customers/logins from .xslx\n// empty response\nconst mapCustomerFieldsFromUpload = (\n spreadsheetId: number,\n activeSheet: string,\n values: ImportFormValues\n) => {\n const body = {\n ...values,\n attachmentId: spreadsheetId,\n worksheetName: activeSheet\n };\n return axiosWrapper({\n method: 'POST',\n url: `${url}/Customers/v2/_import`,\n data: body,\n headers: { 'Content-Type': 'application/json-patch+json' }\n });\n};\n\n// used when importing translations from .xslx\n// empty response\nconst mapTranslationFieldsFromUpload = (\n catalog: string,\n spreadsheetId: number,\n activeSheet: string,\n values: ImportFormValues\n) => {\n const body = {\n ...values,\n attachmentId: spreadsheetId,\n worksheetName: activeSheet\n };\n return axiosWrapper({\n method: 'POST',\n url: `${url}/catalogs/${catalog}/Translations/_import`,\n data: body,\n headers: { 'Content-Type': 'application/json-patch+json' }\n });\n};\n\n// used when importing cost centers from .xslx\n// empty response\nconst mapBillingFieldsFromUpload = (\n spreadsheetId: number,\n activeSheet: string,\n values: ImportFormValues\n) => {\n const body = {\n ...values,\n attachmentId: spreadsheetId,\n worksheetName: activeSheet\n };\n return axiosWrapper({\n method: 'POST',\n url: `${url}/costcenters/_import`,\n data: body,\n headers: { 'Content-Type': 'application/json-patch+json' }\n });\n};\n\n// used when mapping product documents via .xslx\n// empty response\nconst mapProductDocFieldsFromUpload = (\n catalog: string,\n spreadsheetId: number,\n activeSheet: string,\n values: ImportFormValues\n) => {\n const body = {\n ...values,\n attachmentId: spreadsheetId,\n worksheetName: activeSheet\n };\n return axiosWrapper({\n method: 'POST',\n url: `${url}/catalogs/${catalog}/productDocuments/_import`,\n data: body,\n headers: { 'Content-Type': 'application/json-patch+json' }\n });\n};\n\n// used when mapping product gallery images via .xslx\n// empty response\nconst mapProductGalleryFieldsFromUpload = (\n catalog: string,\n spreadsheetId: number,\n activeSheet: string,\n values: ImportFormValues\n) => {\n const body = {\n ...values,\n attachmentId: spreadsheetId,\n worksheetName: activeSheet\n };\n return axiosWrapper({\n method: 'POST',\n url: `${url}/catalogs/${catalog}/galleryImages/_import`,\n data: body,\n headers: { 'Content-Type': 'application/json-patch+json' }\n });\n};\n\n// url used in tus upload POST - wrapping handled in component,\n// doesn't directly use axiosWrapper\n// empty response; returns 201 on success; throws 404 on new dev API\nconst tusImageUpload = () => `${url}/catalog-images`;\n\n// empty response; returns 201 on success; throws 404 on new dev API\nconst tusDocumentUpload = () => `${url}/documents`;\n\n// delete bulk-uploaded resource created on API\n// url is defined on bulk upload, will be supplied by onSuccess handler\n// empty response\nconst deleteBulkUpload = (url: string) => axiosWrapper({\n headers: {\n 'Tus-Resumable': '1.0.0'\n },\n method: 'DELETE',\n url\n});\n\n// response\n// const fetchCoupons = (catalog: string, couponType: string) => axiosWrapper({ method: 'GET', url: `/catalogs/${catalog}/${couponType}-coupons` });\nconst fetchCoupons = (catalog: string) => axiosWrapper({ method: 'GET', url: `v2/catalogs/${catalog}/coupons` });\n\n// response\nconst fetchCoupon = (catalog: string, couponType: string, couponID: number | string) => axiosWrapper({ method: 'GET', url: `v2/catalogs/${catalog}/${couponType}Coupons/${couponID}` });\n\n// response (w/ complete coupon data)\nconst createProductCoupon = (\n catalog: string,\n productCouponData: Coupon\n) => {\n return axiosWrapper({\n method: 'POST',\n url: `v2/catalogs/${catalog}/ProductCoupons`,\n data: productCouponData\n });\n};\n\n// empty response\nconst updateProductCoupon = (\n catalog: string,\n couponId: number,\n productCouponData: Coupon\n) => {\n return axiosWrapper({\n method: 'PUT',\n url: `v2/catalogs/${catalog}/ProductCoupons/${couponId}`,\n data: productCouponData\n });\n};\n\n// response (w/ complete coupon data)\nconst createOrderCoupon = (\n catalog: string,\n orderCouponData: Coupon\n) => {\n return axiosWrapper({\n method: 'POST',\n url: `v2/catalogs/${catalog}/OrderCoupons`,\n data: orderCouponData\n });\n};\n\n// empty response\nconst updateOrderCoupon = (\n catalog: string,\n couponId: number,\n orderCouponData: Coupon\n) => {\n return axiosWrapper({\n method: 'PUT',\n url: `v2/catalogs/${catalog}/OrderCoupons/${couponId}`,\n data: orderCouponData\n });\n};\n// empty response\nconst deleteCoupon = (catalog: string, couponType: string, couponId: number | string) => {\n return axiosWrapper({ method: 'DELETE', url: `v2/catalogs/${catalog}/${couponType}Coupons/${couponId}` });\n};\n\n// response.data\nconst fetchSearchConfig = (catalog: string) => {\n return axiosWrapper({ method: 'GET', url: `/v2/catalogs/${catalog}/search-configuration` });\n};\n\n// empty response\nconst updateSearchConfig = (\n catalog: string,\n searchSettingsPatch: SearchConfig\n) => {\n return axiosWrapper({ method: 'PATCH', url: `/v2/catalogs/${catalog}/search-configuration`, data: searchSettingsPatch });\n};\n\n// empty response\nconst indexSearch = (catalog: string) => {\n return axiosWrapper({ method: 'POST', url: `/v2/catalogs/${catalog}/products/_index` });\n};\n\n// response.data\nconst productSearch = (catalog: string, partNumber: string) => {\n return axiosWrapper({ method: 'GET', url: `v2/catalogs/${catalog}/Products?q=${partNumber}` });\n};\n\n// response\nconst fetchCustomers = () => {\n return axiosWrapper({ method: 'GET', url: `/Customers` });\n};\n\n// response\nconst fetchCustomer = (customerId: number | string) => {\n return axiosWrapper({ method: 'GET', url: `/Customers/${customerId}` });\n};\n\n// empty response\nconst createCustomer = (values: Customer) => {\n return axiosWrapper({ method: 'POST', url: `/Customers`, data: { ...values } });\n};\n\n// empty response\nconst updateCustomer = (values: Customer) => {\n return axiosWrapper({ method: 'PUT', url: `/Customers/${values.id}`, data: { ...values } });\n};\n\n// empty response\nconst deleteCustomer = (customerId: number | string) => {\n return axiosWrapper({ method: 'DELETE', url: `/Customers/${customerId}` });\n};\n\n// response.data\nconst fetchLogins = (custId?: number | string) => {\n return axiosWrapper({ method: 'GET', url: `/v2/Logins${custId ? `?customerId=${custId}` : ''}` });\n};\n\n// response.data\nconst fetchLogin = (userId: string) => {\n return axiosWrapper({ method: 'GET', url: `/v2/Logins/${userId}` });\n};\n\n// empty response\nconst createLogin = (values: Login) => {\n return axiosWrapper({ method: 'POST', url: `/v3/Logins`, data: { ...values } });\n};\n\n// empty response\nconst updateLogin = (values: Login) => {\n return axiosWrapper({ method: 'PATCH', url: `/v3/Logins/${values.userId}`, data: { ...values } });\n};\n\n// empty response\nconst deleteLogin = (userId: string) => {\n return axiosWrapper({ method: 'DELETE', url: `/Logins/${userId}` });\n};\n\nconst resetLoginPW = (values: ResetLoginPWBody) => {\n return axiosWrapper({method: 'POST', url: `/Logins/ResetPassword`, data: {...values}})\n // test success response\n // return Promise.resolve()\n // test error response\n // return Promise.reject({data: 'error!'})\n}\n\n// response\nconst fetchShippingMethods = (catalog: string) => {\n return axiosWrapper({ method: 'GET', url: `/catalogs/${catalog}/shipping-methods` });\n};\n\n// response\nconst fetchShippingMethod = (catalog: string, id: number | string) => {\n return axiosWrapper({ method: 'GET', url: `/catalogs/${catalog}/shipping-methods/${id}` });\n};\n\n// empty response\nconst createShippingMethod = (catalog: string, values: ShippingMethod) => {\n return axiosWrapper({ method: 'POST', url: `/catalogs/${catalog}/shipping-methods`, data: { ...values } });\n};\n\n// empty response\nconst updateShippingMethod = (catalog: string, values: ShippingMethod) => {\n return axiosWrapper({ method: 'PUT', url: `/catalogs/${catalog}/shipping-methods/${values.id}`, data: { ...values } });\n};\n\n// empty response\nconst deleteShippingMethod = (catalog: string, id: number | string) => {\n return axiosWrapper({ method: 'DELETE', url: `/catalogs/${catalog}/shipping-methods/${id}` });\n};\n\n// response.data\nconst fetchCatalogTerms = (catalog: string) => {\n return axiosWrapper({ method: 'GET', url: `v2/catalogs/${catalog}/terms` });\n};\n\n// response.data\nconst fetchTerm = (catalog: string, id: number | string) => {\n return axiosWrapper({ method: 'GET', url: `v2/catalogs/${catalog}/terms/${id}` });\n};\n\n// empty response\nconst createTerm = (catalog: string, values: Term) => {\n return axiosWrapper({ method: 'POST', url: `v2/catalogs/${catalog}/terms`, data: { ...values } });\n};\n\n// empty response\nconst updateTerm = (catalog: string, id: number, values: Term) => {\n return axiosWrapper({ method: 'PATCH', url: `v2/catalogs/${catalog}/terms/${id}`, data: { ...values } });\n};\n\n// empty response\nconst deleteTerm = (catalog: string, id: number | string) => {\n return axiosWrapper({ method: 'DELETE', url: `v2/catalogs/${catalog}/terms/${id}`});\n};\n\n// response\nconst fetchTranslations = (catalog: string) => {\n return axiosWrapper({ method: 'GET', url: `/catalogs/${catalog}/Translations` });\n};\n\n// response\nconst fetchTranslation = (catalog: string, translationId: number | string) => {\n return axiosWrapper({ method: 'GET', url: `/catalogs/${catalog}/Translations/${translationId}` });\n};\n\n// empty response\nconst createTranslation = (catalog: string, values: Translation) => {\n return axiosWrapper({ method: 'POST', url: `/catalogs/${catalog}/Translations`, data: { ...values } });\n};\n\n// empty response\nconst updateTranslation = (catalog: string, translationId: number, values: Translation) => {\n return axiosWrapper({ method: 'PUT', url: `/catalogs/${catalog}/Translations/${translationId}`, data: { ...values } });\n};\n\n// empty response\nconst deleteTranslation = (catalog: string, translationId: number | string) => {\n return axiosWrapper({ method: 'DELETE', url: `/catalogs/${catalog}/Translations/${translationId}` });\n};\n\n// assume response\nconst fetchShippingRates = (catalog: string) => {\n return axiosWrapper({ method: 'GET', url: `/catalogs/${catalog}/shipping-rates` });\n};\n\n// assume response\nconst fetchShippingRate = (catalog: string, rateId: number | string) => {\n return axiosWrapper({ method: 'GET', url: `/catalogs/${catalog}/shipping-rates/${rateId}` });\n};\n\n// assume empty response\nconst createShippingRate = (catalog: string, values: ShippingRate) => {\n return axiosWrapper({ method: 'POST', url: `v2/catalogs/${catalog}/shipping-rates`, data: { ...values } });\n};\n\n// assume empty response\nconst updateShippingRate = (catalog: string, rateId: number, values: ShippingRate) => {\n return axiosWrapper({ method: 'PUT', url: `v2/catalogs/${catalog}/shipping-rates/${rateId}`, data: { ...values } });\n};\n\n// assume empty response\nconst deleteShippingRate = (catalog: string, rateId: number | string) => {\n return axiosWrapper({ method: 'DELETE', url: `/catalogs/${catalog}/shipping-rates/${rateId}` });\n};\n\nconst fetchShipTos = () => {\n return axiosWrapper({ method: 'GET', url: `/shipTos` });\n}\n\nconst fetchShipTo = (shipToId: number | string) => {\n return axiosWrapper({ method: 'GET', url: `/shipTos/${shipToId}` });\n}\n\nconst createShipTo = (values: ShipTo) => {\n return axiosWrapper({ method: 'POST', url: `/shipTos`, data: { ...values } });\n}\n\nconst updateShipTo = (addressId: number, values: ShipTo) => {\n return axiosWrapper({ method: 'PUT', url: `/shipTos/${addressId}`, data: { ...values } });\n}\n\nconst deleteShipTo = (shipToId: number | string) => {\n return axiosWrapper({ method: 'DELETE', url: `/shipTos/${shipToId}` });\n}\n\n// assume response\nconst fetchCustomerNums = (catalog: string) => {\n return axiosWrapper({ method: 'GET', url: `/catalogs/${catalog}/CustomerNumbers/GetAllCustomerNumbers` });\n};\n\n// assume response\nconst fetchCustomerNum = (catalog: string, custNumId: number | string) => {\n return axiosWrapper({ method: 'GET', url: `/catalogs/${catalog}/CustomerNumbers/GetByPkid/${custNumId}` });\n};\n\n// assume response\nconst fetchCustNumsByCustId = (catalog: string, custId: number) => {\n return axiosWrapper({ method: 'GET', url: `/catalogs/${catalog}/CustomerNumbers/GetByCustID/${custId}` });\n};\n\n// assume empty response\nconst updateCustomerNum = (catalog: string, values: CustomerNumber) => {\n return axiosWrapper({ method: 'POST', url: `/catalogs/${catalog}/CustomerNumbers/UpdateCustomerNumber`, data: { ...values } });\n};\n\n// assume empty response\nconst createCustomerNum = (catalog: string, values: CustomerNumber) => {\n return axiosWrapper({ method: 'POST', url: `/catalogs/${catalog}/CustomerNumbers/AddCustomerNumber`, data: { ...values } });\n};\n\n// assume empty response\nconst deleteCustomerNum = (catalog: string, custNumId: number | string) => {\n return axiosWrapper({ method: 'DELETE', url: `/catalogs/${catalog}/CustomerNumbers/DeleteCustomerNumberByPkid/${custNumId}` });\n};\n\n// response\nconst fetchContentGroups = () => {\n return axiosWrapper({ method: 'GET', url: `/content-groups` });\n};\n\n// response\nconst fetchContentGroup = (groupId: number | string) => {\n return axiosWrapper({ method: 'GET', url: `/content-groups/${groupId}` });\n};\n\n// response (containing new group data)\nconst createContentGroup = (values: ContentGroup) => {\n return axiosWrapper({ method: 'POST', url: `/content-groups`, data: { ...values } });\n};\n\n// empty response\nconst updateContentGroup = (groupId: number, values: ContentGroup) => {\n return axiosWrapper({ method: 'PUT', url: `/content-groups/${groupId}`, data: { ...values } });\n};\n\n// empty response\nconst deleteContentGroup = (groupId: number | string) => {\n return axiosWrapper({ method: 'DELETE', url: `/content-groups/${groupId}` });\n};\n\n// response\nconst getOrderHistory = (catalog: string, pageOptions: OrderHistoryPaginationParams) => {\n const optionsString = querystring.stringify(pageOptions as Record);\n return axiosWrapper({ method: 'GET', url: `/v2/catalogs/${catalog}/orders?${optionsString}` })\n};\n\n// assume response\nconst getAbandonedCarts = (catalog: string, dateRange: AnalyticsDateRange, showEmptyEmails: boolean) => {\n return axiosWrapper({ method: 'GET', url: `/catalogs/${catalog}/abandoned-carts?dateRange=${dateRange.startDate},${dateRange.endDate}&showEmptyEmails=${showEmptyEmails}` })\n};\n\n// response ({columnDefs[], rowData[]})\nconst getLoginReports = (catalog: string, dateRange: AnalyticsDateRange) => {\n return axiosWrapper({ method: 'GET', url: `/catalogs/${catalog}/reports?dateRange=${dateRange.startDate},${dateRange.endDate}` })\n};\n\n// response ({columnDefs[], rowData[]})\nconst getFailedSearches = (catalog: string, dateRange: AnalyticsDateRange) => {\n return axiosWrapper({ method: 'GET', url: `/catalogs/${catalog}/failed-searches?dateRange=${dateRange.startDate},${dateRange.endDate}` })\n};\n\n// response ({columnDefs[], rowData[]})\nconst getSuccessfulSearches = (catalog: string, dateRange: AnalyticsDateRange) => {\n return axiosWrapper({ method: 'GET', url: `/catalogs/${catalog}/successful-searches?dateRange=${dateRange.startDate},${dateRange.endDate}` })\n};\n\n// response\nconst getUsageReports = (catalog: string, dateRange: AnalyticsDateRange) => {\n return axiosWrapper({ method: 'GET', url: `/v2/catalogs/${catalog}/statistics?dateRange=${dateRange.startDate},${dateRange.endDate}` })\n};\n\nconst getACHReports = (catalog: string, dateRange: AnalyticsDateRange) => {\n return axiosWrapper({ method: 'GET', url: `/catalogs/${catalog}/v2/ach?dateRange=${dateRange.startDate},${dateRange.endDate}` })\n};\n\nconst getPaginatedACHReports = (catalog: string, pageOptions: ACHPaginationParams) => {\n return axiosWrapper({ method: 'POST', url: `/catalogs/${catalog}/v3/ach`, data: {...pageOptions} })\n}\n\nconst updateACHReportStatus = (catalog: string, exportedIds: ACHExportStatus[]) => {\n return axiosWrapper({ method: 'PATCH', url: `/catalogs/${catalog}/ACHExport`, data: {\"achIds\": [ ...exportedIds ]} })\n}\n\nconst exportPaginatedACHReports = (catalog: string, pageOptions: SharedACHPaginationParams) => {\n return axiosWrapper({ method: 'POST', url: `/catalogs/${catalog}/v3/ach/export`, data: {...pageOptions}, responseType: 'blob' })\n}\n\n// response\nconst getAnalyticsConfig = (catalog: string) => {\n return axiosWrapper({ method: 'GET', url: `v2/catalogs/${catalog}/google-analytics/configuration` })\n};\n\n// empty response\nconst updateAnalyticsConfig = (catalog: string, values: GoogleAnalyticsConfig) => {\n return axiosWrapper({ method: 'PUT', url: `v2/catalogs/${catalog}/google-analytics/configuration`, data: { ...values } })\n};\n\n// empty response\nconst deleteAnalyticsConfig = (catalog: string) => {\n return axiosWrapper({ method: 'DELETE', url: `v2/catalogs/${catalog}/google-analytics/configuration`})\n};\n// response\nconst getDashboardCardAnalytics = (catalog: string, dateRange: AnalyticsDateRange) => {\n const ga4DateRange = convertDatesForGA4(dateRange)\n return axiosWrapper({ method: 'POST', url: `v2/catalogs/${catalog}/google-analytics`, data: {\n \"dimensions\":[],\n \"metrics\":[\n {\n \"name\":\"purchaseRevenue\"\n },\n {\n \"name\": \"averagePurchaseRevenuePerUser\"\n },\n {\n \"name\": \"ecommercePurchases\"\n },\n {\n \"name\": \"activeUsers\"\n },\n {\n \"name\": \"newUsers\"\n }\n ],\n \"dateRanges\":[\n {\n \"startDate\":ga4DateRange.startDate,\n \"endDate\":ga4DateRange.endDate\n }\n ],\n \"orderBys\":[]\n }})\n};\n\n// response\nconst getTopRevenue = (catalog: string, rowCount: number) => {\n return axiosWrapper({ method: 'GET', url: `/catalogs/${catalog}/top-revenue?limit=${rowCount}` })\n};\n\n// response\nconst fetchAudienceOverviewData = (catalog: string, dateRange: AnalyticsDateRange) => {\n const ga4DateRange = convertDatesForGA4(dateRange)\n return axiosWrapper({ method: 'POST', url: `v2/catalogs/${catalog}/google-analytics`, data: {\n \"dimensions\":[\n {\n \"name\":\"date\"\n }\n ],\n \"metrics\":[\n {\n \"name\":\"sessions\"\n },\n {\n \"name\":\"totalUsers\"\n },\n {\n \"name\":\"newUsers\"\n },\n {\n \"name\":\"bounceRate\"\n },\n ],\n \"dateRanges\":[\n {\n \"startDate\":ga4DateRange.startDate,\n \"endDate\":ga4DateRange.endDate\n }\n ],\n \"orderBys\":[\n {\n \"dimension\":{\n \"dimensionName\":\"date\"\n },\n \"desc\": false\n }\n ]\n }})\n};\n\n// response\nconst fetchGASessionInfoCountry = (catalog: string, dateRange: AnalyticsDateRange) => {\n const ga4DateRange = convertDatesForGA4(dateRange)\n return axiosWrapper({ method: 'POST', url: `v2/catalogs/${catalog}/google-analytics`, data: {\n \"dimensions\":[\n {\n \"name\":\"region\"\n }\n ],\n \"metrics\":[\n {\n \"name\":\"sessions\"\n }\n ],\n \"dateRanges\":[\n {\n \"startDate\":ga4DateRange.startDate,\n \"endDate\":ga4DateRange.endDate\n }\n ],\n \"orderBys\":[\n {\n \"metric\":{\n \"metricName\":\"sessions\"\n },\n \"desc\": true\n }\n ]\n }})\n};\n\n// response\nconst fetchGASessionInfoBrowser = (catalog: string, dateRange: AnalyticsDateRange) => {\n const ga4DateRange = convertDatesForGA4(dateRange)\n return axiosWrapper({ method: 'POST', url: `v2/catalogs/${catalog}/google-analytics`, data: {\n \"dimensions\":[\n {\n \"name\":\"browser\"\n }\n ],\n \"metrics\":[\n {\n \"name\":\"sessions\"\n }\n ],\n \"dateRanges\":[\n {\n \"startDate\":ga4DateRange.startDate,\n \"endDate\":ga4DateRange.endDate\n }\n ],\n \"orderBys\":[\n {\n \"metric\":{\n \"metricName\":\"sessions\"\n },\n \"desc\": true\n }\n ]\n }})\n};\n\n// response\nconst fetchGASessionInfoDevice = (catalog: string, dateRange: AnalyticsDateRange) => {\n const ga4DateRange = convertDatesForGA4(dateRange)\n return axiosWrapper({ method: 'POST', url: `v2/catalogs/${catalog}/google-analytics`, data: {\n \"dimensions\":[\n {\n \"name\":\"deviceCategory\"\n }\n ],\n \"metrics\":[\n {\n \"name\":\"sessions\"\n }\n ],\n \"dateRanges\":[\n {\n \"startDate\":ga4DateRange.startDate,\n \"endDate\":ga4DateRange.endDate\n }\n ],\n \"orderBys\":[\n {\n \"metric\":{\n \"metricName\":\"sessions\"\n },\n \"desc\": true\n }\n ]\n }})\n};\n\n// response\nconst fetchGAWebsiteTrafficData = (catalog: string, dateRange: AnalyticsDateRange) => {\n const ga4DateRange = convertDatesForGA4(dateRange)\n return axiosWrapper({ method: 'POST', url: `v2/catalogs/${catalog}/google-analytics`, data: {\n \"dimensions\":[\n {\n \"name\":\"pagePath\"\n }\n ],\n \"metrics\":[\n {\n \"name\":\"screenPageViews\"\n },\n {\n \"name\":\"sessions\"\n },\n {\n \"name\":\"userEngagementDuration\"\n }\n ],\n \"dateRanges\":[\n {\n \"startDate\":ga4DateRange.startDate,\n \"endDate\":ga4DateRange.endDate\n }\n ],\n \"orderBys\":[\n {\n \"metric\":{\n \"metricName\":\"screenPageViews\"\n },\n \"desc\": true\n }\n ]\n }})\n};\n\n// response\nconst fetchGATopRevenueProducts = (catalog: string, dateRange: AnalyticsDateRange) => {\n const ga4DateRange = convertDatesForGA4(dateRange)\n return axiosWrapper({ method: 'POST', url: `v2/catalogs/${catalog}/google-analytics`, data: {\n \"dimensions\":[\n {\n \"name\":\"itemId\"\n },\n {\n \"name\":\"itemName\"\n }\n ],\n \"metrics\":[\n {\n \"name\": \"itemsPurchased\"\n },\n {\n \"name\":\"itemRevenue\"\n }\n ],\n \"dateRanges\":[\n {\n \"startDate\":ga4DateRange.startDate,\n \"endDate\":ga4DateRange.endDate\n }\n ],\n \"orderBys\":[\n {\n \"metric\":{\n \"metricName\":\"itemRevenue\"\n },\n \"desc\": true\n }\n ],\n \"limit\": 10\n }})\n};\n\n// response\nconst fetchEcommerceOverviewData = (catalog: string, metric1: string, metric2: string, dateRange: AnalyticsDateRange) => {\n const ga4DateRange = convertDatesForGA4(dateRange)\n return axiosWrapper({ method: 'POST', url: `v2/catalogs/${catalog}/google-analytics`, data: {\n \"dimensions\":[\n {\n \"name\":\"date\"\n }\n ],\n \"metrics\":[\n {\n \"name\": `${metric1}`\n }\n ],\n \"dateRanges\":[\n {\n \"startDate\":ga4DateRange.startDate,\n \"endDate\":ga4DateRange.endDate\n }\n ],\n \"orderBys\":[\n {\n \"dimension\":{\n \"dimensionName\":\"date\"\n },\n \"desc\": false\n }\n ]\n }})\n};\n\n// response\nconst fetchProductPerformanceData = (catalog: string, dateRange: AnalyticsDateRange) => {\n const ga4DateRange = convertDatesForGA4(dateRange)\n return axiosWrapper({ method: 'POST', url: `v2/catalogs/${catalog}/google-analytics`, data: {\n \"dimensions\":[\n {\n \"name\":\"itemId\"\n },\n {\n \"name\":\"itemName\"\n }\n ],\n \"metrics\":[\n {\n \"name\": \"itemsPurchased\"\n },\n {\n \"name\":\"itemRevenue\"\n }\n ],\n \"dateRanges\":[\n {\n \"startDate\":ga4DateRange.startDate,\n \"endDate\":ga4DateRange.endDate\n }\n ],\n \"orderBys\":[\n {\n \"metric\":{\n \"metricName\":\"itemRevenue\"\n },\n \"desc\": true\n }\n ]\n }})\n};\n\nconst fetchAvgPageLoadData = (catalog: string, dateRange: AnalyticsDateRange) => {\n return axiosWrapper({ method: 'GET', url: `/catalogs/${catalog}/google-analytics?param1=ga:avgPageLoadTime,ga:pageviews¶m2=ga:pagePath¶m3=ga:avgPageLoadTime¶m4=${dateRange.startDate},${dateRange.endDate}¶m5=50` })\n};\n\n// response.data\nconst fetchResourceTree = (catalog: string) => {\n return axiosWrapper({\n method: 'GET',\n url: `/catalogs/${catalog}/document-categories/tree`\n });\n};\n\n// response.data\nconst fetchResources = (catalog: string) => {\n return axiosWrapper({\n method: 'GET',\n url: `/catalogs/${catalog}/document-categories`\n });\n};\n\n// response.data\nconst fetchResource = (catalog: string, resourceId: number| string) => {\n return axiosWrapper({\n method: 'GET',\n url: `/catalogs/${catalog}/document-categories/${resourceId}`\n });\n};\n\n// empty response\nconst updateResource = (catalog: string, resourceId: number, values: BaseResource) => axiosWrapper({\n method: 'PATCH',\n url: `v2/catalogs/${catalog}/document-categories/${resourceId}`,\n data: { ...values }\n});\n\n// empty response\nconst createResource = (catalog: string, values: BaseResource) => axiosWrapper({\n method: 'POST',\n url: `v2/catalogs/${catalog}/document-categories`,\n data: { ...values }\n});\n\n// empty response\nconst deleteResource = (catalog: string, resourceId: number) => axiosWrapper({\n method: 'DELETE',\n url: `/catalogs/${catalog}/document-categories/${resourceId}`\n});\n\nconst reorderResources = (catalog: string, resourceStructure: SequencedCategory[]) => axiosWrapper({\n method: 'PATCH',\n url: `/catalogs/${catalog}/document-categories`,\n data: [ ...resourceStructure ]\n});\n\nconst syncAssets = () => {\n return axiosWrapper({method: 'GET', url: `/assets/_sync`})\n}\n\n// response.data\nconst fetchAssets = (catalog: string, pageOptions: PaginatedAssetsReqParams) => {\n const optionsString = querystring.stringify(pageOptions as Record);\n return axiosWrapper({ method: 'GET', url: `/v3/catalogs/${catalog}/assets?${optionsString}` })\n // return axiosWrapper({ method: 'GET', url: `/v2/catalogs/${catalog}/assets?fileType=document&pageSize=100&prefix=ah&continuationToken=` })\n // return Promise.resolve({\"data\":{\"continuationToken\":\"\",\"assets\":[]},\"error\":null}) as Promise\n // return Promise.reject({\"data\": 'API error'}) as Promise\n};\n\nconst exportAssets = (catalog: string) => axiosWrapper({ method: 'GET', url: `v2/catalogs/${catalog}/assets/_export`, responseType: 'blob'});\n\nconst fetchAsset = (catalog: string, assetId: number | string) => {\n return axiosWrapper({\n method: 'GET',\n url: `v2/catalogs/${catalog}/assets/${assetId}`\n })\n // return Promise.resolve({data: {\n // altText: \"metal-flange\",\n // assetLinkedCategories: [],\n // assetLinkedProducts: [{id: 3109, name: \"test attr issue\"}, {id: 4014, name: \"new test image\"}],\n // assetLinkedResources: [{id: 12, name: \"test\"}],\n // assetTags: [],\n // description: \"some kind of metal flange\",\n // id: 2227,\n // name: \"003347.jpg\",\n // path: \"images/003347.jpg\"\n // }})\n}\n\n// response (containing asset name and path)\nconst uploadAsset = (asset: File, onProgress: Function) => {\n const formData = new FormData();\n const formattedName = `${asset.name}`;\n // 3rd param filename needed for requests in Edge\n // otherwise user's entire local filepath is POSTed\n formData.append('file', asset, formattedName);\n //@ts-ignore\n formData.append('data', '{}');\n return axiosWrapper({\n method: 'POST', url: `/v2/assets`, data: formData, headers: {\n 'Content-Type': 'multipart/form-data'\n },\n onUploadProgress: ({ total, loaded }: { total: number, loaded: number }) => {\n onProgress({ percent: Math.round(loaded / total * 100) }, asset);\n }\n });\n};\n\nconst uploadRemoteAsset = (values: any) => {\n return axiosWrapper({\n method: 'POST',\n url: '/assets/remote',\n data: {...values}\n })\n}\n\nconst updateAsset = (assetId: number, values: LibraryAsset) => {\n return axiosWrapper({\n method: 'PATCH',\n url: `v2/assets/${assetId}`,\n data: {...values}\n })\n};\n\n// empty response\nconst deleteAsset = (catalog: string, assetId: number | string) => {\n return axiosWrapper({\n method: 'DELETE',\n url: `/v3/catalogs/${catalog}/assets/${assetId}`\n });\n}\n\nconst fetchAssetLabels = (searchTerm?: string) => {\n const queryParam = querystring.stringify({q: searchTerm})\n return axiosWrapper({\n method: 'GET',\n url: `/assets/assetTags?${queryParam}`\n })\n}\n\nconst fetchOverlays = (catalog: string) => axiosWrapper({\n method: 'GET',\n url: `catalogs/${catalog}/imageoverlaytypes`\n});\n\nconst fetchOverlay = (catalog: string, overlayId: number | string) => axiosWrapper({\n method: 'GET', url: `catalogs/${catalog}/imageoverlaytypes/${overlayId}`\n});\n\nconst updateOverlay = (catalog: string, overlayId: number, values: ImageOverlayToApi) => axiosWrapper({\n method: 'PATCH',\n url: `catalogs/${catalog}/imageoverlaytypes/${overlayId}`,\n data: { ...values }\n})\n\nconst createOverlay = (catalog: string, values: ImageOverlayToApi) => axiosWrapper({\n method: 'POST',\n url: `catalogs/${catalog}/imageoverlaytypes`,\n data: { ...values }\n})\n\nconst deleteOverlay = (catalog: string, overlayId: number | string) => axiosWrapper({\n method: 'DELETE',\n url: `catalogs/${catalog}/imageoverlaytypes/${overlayId}`\n});\n\nconst fetchCountries = (catalog: string) => axiosWrapper({\n method: 'GET',\n url: `/catalogs/${catalog}/countries`\n});\n\nconst fetchCountry = (catalog: string, countryId: number | string) => axiosWrapper({\n method: 'GET',\n url: `/catalogs/${catalog}/countries/${countryId}`\n});\n\nconst updateCountry = (catalog: string, countryId: number, values: Country) => axiosWrapper({\n method: 'PUT',\n url: `/catalogs/${catalog}/countries/${countryId}`,\n data: { ...values }\n});\n\nconst createCountry = (catalog: string, values: Country) => axiosWrapper({\n method: 'POST',\n url: `/catalogs/${catalog}/countries`,\n data: { ...values }\n});\n\nconst deleteCountry = (catalog: string, countryId: number | string) => axiosWrapper({\n method: 'DELETE',\n url: `/catalogs/${catalog}/countries/${countryId}`\n});\n\nconst fetchStates = (catalog: string) => axiosWrapper({\n method: 'GET',\n url: `/catalogs/${catalog}/states`\n});\n\nconst fetchState = (catalog: string, stateId: number | string) => axiosWrapper({\n method: 'GET',\n url: `/catalogs/${catalog}/states/${stateId}`\n});\n\nconst updateState = (catalog: string, stateId: number, values: State) => axiosWrapper({\n method: 'PUT',\n url: `/catalogs/${catalog}/states/${stateId}`,\n data: { ...values }\n});\n\nconst createState = (catalog: string, values: State) => axiosWrapper({\n method: 'POST',\n url: `/catalogs/${catalog}/states`,\n data: { ...values }\n});\n\nconst deleteState = (catalog: string, stateId: number | string) => axiosWrapper({\n method: 'DELETE',\n url: `/catalogs/${catalog}/states/${stateId}`\n});\n\nconst fetchCustomFields = (catalog: string) => axiosWrapper({\n method: 'GET',\n url: `/catalogs/${catalog}/customfields`\n});\n\n\nconst createCustomField = (catalog: string, values: CustomField) => {\n return axiosWrapper({\n method: 'POST',\n url: `/catalogs/${catalog}/customfields`,\n data: {...values}\n })};\n// console.log(values)\n// return Promise.resolve({\"data\": \"\"})\n// }\n\nconst updateCustomFieldsList = (catalog: string, tabsList: { tabs: string[] }) => {\n return axiosWrapper({\n method: 'PATCH',\n url: `/catalogs/${catalog}/customfields/_sorttabs`,\n data: tabsList\n })\n // return Promise.resolve(tabsList)\n}\n\nconst deleteCustomField = (catalog: string, fieldName: string) => axiosWrapper({\n method: 'DELETE',\n url: `/catalogs/${catalog}/customfields/${fieldName}`\n});\n\nconst fetchBooleanWebControls = (catalog: string) => axiosWrapper({\n method: 'GET',\n url: `/catalogs/${catalog}/GetBooleanWebControls`\n});\n\nconst fetchIntegerWebControls = (catalog: string) => axiosWrapper({\n method: 'GET',\n url: `/catalogs/${catalog}/GetIntegerWebControls`\n});\n\nconst fetchStringWebControls = (catalog: string) => axiosWrapper({\n method: 'GET',\n url: `/catalogs/${catalog}/GetStringWebControls`\n});\n\nconst fetchTileWebControls = (catalog: string) => axiosWrapper({\n method: 'GET',\n url: `/catalogs/${catalog}/GetTileWebControls`\n});\n\nconst fetchSiteWebControls = (catalog: string) => axiosWrapper({\n method: 'GET',\n url: `/catalogs/${catalog}/GetSiteWebControls`\n});\n\nconst fetchOtherWebControls = (catalog: string) => axiosWrapper({\n method: 'GET',\n url: `/catalogs/${catalog}/GetOtherWebControls`\n});\n\nconst updateWebControl = (catalog: string, values: WebControl) => axiosWrapper({\n method: 'POST',\n url: `/catalogs/${catalog}/UpdateWebControl`,\n data: { ...values }\n});\n\nconst fetchSalesReps = () => axiosWrapper({\n method: 'GET',\n url: `/reps`\n})\n\nconst fetchSalesRep = (repId: number| string) => axiosWrapper({\n method: 'GET',\n url: `/reps/${repId}`\n})\n\nconst createSalesRep = (values: SalesRepToApi) => axiosWrapper({\n method: 'POST',\n url: `/reps`,\n data: { ...values }\n})\n\nconst updateSalesRep = (repId: number, values: SalesRepToApi) => axiosWrapper({\n method: 'PUT',\n url: `/reps/${repId}`,\n data: { ...values }\n})\n\nconst deleteSalesRep = (repId: number | string) => {\n return axiosWrapper({ method: 'DELETE', url: `/reps/${repId}` });\n};\n\nconst fetchSalesRepTypes = () => axiosWrapper({\n method: 'GET',\n url: `/reptypes`\n})\n\nconst fetchSalesRepType = (repTypeId: number| string) => axiosWrapper({\n method: 'GET',\n url: `/reptypes/${repTypeId}`\n})\n\nconst createSalesRepType = (values: SalesRepType) => axiosWrapper({\n method: 'POST',\n url: `/repTypes`,\n data: { ...values }\n})\n\nconst updateSalesRepType = (repId: number, values: SalesRepType) => axiosWrapper({\n method: 'PUT',\n url: `/repTypes/${repId}`,\n data: { ...values }\n})\n\nconst deleteSalesRepType = (repId: number | string) => {\n return axiosWrapper({ method: 'DELETE', url: `/RepTypes/${repId}` });\n};\n\nconst fetchFeatureFlags = (catalogName: string) => {\n return axiosWrapper({\n method: 'GET',\n url: `v2/catalogs/${catalogName}/features`\n })\n};\n\nconst fetchFeatureFlag = (catalogName: string, flagName: string) => {\n return axiosWrapper({\n method: 'GET',\n url: `v2/catalogs/${catalogName}/feature/${flagName}`\n })\n}\n\nconst updateFeatureFlag = (catalogName: string, featureName: string, values: FeatureFlagToApi) => {\n return axiosWrapper({\n method: 'PATCH',\n url: `v2/catalogs/${catalogName}/feature/${featureName}`,\n data: {...values}\n })\n}\n\nconst fetchCostCenters = () => {\n return axiosWrapper({\n method: 'GET',\n url: `/costcenters`\n })\n};\n\nconst fetchCostCenter = (id: number| string) => {\n return axiosWrapper({\n method: 'GET',\n url: `/costcenters/${id}`\n })\n};\n\nconst createCostCenter = (values: ExtraBilling) => axiosWrapper({\n method: 'POST',\n url: `/costcenters`,\n data: { ...values }\n})\n\nconst updateCostCenter = (id: number, values: ExtraBilling) => axiosWrapper({\n method: 'PATCH',\n url: `/costcenters/${id}`,\n data: { ...values }\n})\n\nconst deleteCostCenter = (id: number | string) => {\n return axiosWrapper({ method: 'DELETE', url: `/costcenters/${id}` });\n};\n\nconst fetchApprovalGroups = () => {\n return axiosWrapper({ method: 'GET', url: `/approvalManagers` });\n}\n\nconst fetchApprovalGroup = (groupId: number | string) => {\n return axiosWrapper({ method: 'GET', url: `/approvalManagers/${groupId}` });\n}\n\n// returns a list of group names. Used to autosuggest existing names\n// for selection on InnerApprovalGroupForm\nconst fetchApprovalGroupNames = () => {\n return axiosWrapper({ method: 'GET', url: \"/approvalManagers/approvalGroupList\" });\n}\n\nconst createApprovalGroup = (values: ApprovalGroup) => {\n return axiosWrapper({ method: 'POST', url: `/approvalManagers`, data: { ...values } });\n}\n\nconst updateApprovalGroup = (groupId: number, values: ApprovalGroup) => {\n return axiosWrapper({ method: 'PATCH', url: `/approvalManagers/${groupId}`, data: { ...values } });\n}\n\nconst deleteApprovalGroup = (groupId: number | string) => {\n return axiosWrapper({ method: 'DELETE', url: `/approvalManagers/${groupId}` });\n}\n\nconst fetchLoginBudgets = () => {\n return axiosWrapper({ method: 'GET', url: `/LoginBudget` });\n}\n\nconst fetchLoginBudget = (budgetId: number | string) => {\n return axiosWrapper({ method: 'GET', url: `/LoginBudget/${budgetId}` });\n}\n\nconst createLoginBudget = (values: LoginBudgetToApi) => {\n return axiosWrapper({ method: 'POST', url: `/LoginBudget`, data: { ...values } });\n}\n\nconst updateLoginBudget = (budgetId: number | string, values: LoginBudgetToApi) => {\n return axiosWrapper({ method: 'PUT', url: `/LoginBudget/${budgetId}`, data: { ...values } });\n}\n\nconst deleteLoginBudget = (budgetId: number | string) => {\n return axiosWrapper({ method: 'DELETE', url: `/LoginBudget/${budgetId}` });\n}\n\nconst fetchCompanyInfos = (catalog: string) => {\n return axiosWrapper({ method: 'GET', url: `catalogs/${catalog}/CompanyInfos` });\n}\n\nconst fetchCompanyInfo = (catalog: string, companyName: string) => {\n return axiosWrapper({ method: 'GET', url: `catalogs/${catalog}/CompanyInfo/${companyName}` });\n}\n\nconst updateCompanyInfo = (catalog: string, companyName: string, values: CompanyInfoToAPI) => {\n return axiosWrapper({ method: 'PATCH', url: `catalogs/${catalog}/CompanyInfo/${companyName}`, data: {...values} });\n}\n\nexport {\n url,\n fetchCatalogs,\n fetchCatalog,\n fetchCategories,\n fetchCategory,\n fetchCategoryTree,\n deleteCategory,\n updateCategory,\n createCategory,\n reorderCategories,\n alphabetizeCategories,\n exportCategories,\n propagateCatImages,\n createProduct,\n deleteProduct,\n deleteProducts,\n exportProducts,\n exportRelatedProducts,\n exportVariantProducts,\n exportGalleryImages,\n fetchProduct,\n checkPartNumberUnique,\n checkFriendlyUrlUnique,\n fetchPagedProducts,\n updateProduct,\n fetchBrands,\n fetchBrand,\n updateBrand,\n createBrand,\n deleteBrand,\n fetchProductBackups,\n fetchProductBackup,\n createProductBackup,\n restoreProductBackup,\n deleteProductBackup,\n fetchWarehouses,\n fetchWarehouse,\n createWarehouse,\n updateWarehouse,\n deleteWarehouse,\n reorderWarehouses,\n uploadSpreadsheet,\n mapProductFieldsFromUpload,\n mapCategoryFieldsFromUpload,\n mapCustomerFieldsFromUpload,\n mapTranslationFieldsFromUpload,\n mapBillingFieldsFromUpload,\n mapProductDocFieldsFromUpload,\n mapProductGalleryFieldsFromUpload,\n deleteBulkUpload,\n fetchCoupons,\n fetchCoupon,\n createProductCoupon,\n createOrderCoupon,\n deleteCoupon,\n updateProductCoupon,\n updateOrderCoupon,\n fetchSearchConfig,\n updateSearchConfig,\n indexSearch,\n productSearch,\n fetchCustomers,\n fetchCustomer,\n createCustomer,\n updateCustomer,\n deleteCustomer,\n fetchLogins,\n fetchLogin,\n createLogin,\n updateLogin,\n deleteLogin,\n resetLoginPW,\n fetchShippingMethods,\n fetchShippingMethod,\n createShippingMethod,\n updateShippingMethod,\n deleteShippingMethod,\n fetchCatalogTerms,\n fetchTerm,\n createTerm,\n updateTerm,\n deleteTerm,\n fetchTranslations,\n fetchTranslation,\n createTranslation,\n updateTranslation,\n deleteTranslation,\n fetchShippingRates,\n fetchShippingRate,\n createShippingRate,\n updateShippingRate,\n deleteShippingRate,\n fetchShipTos,\n fetchShipTo,\n createShipTo,\n updateShipTo,\n deleteShipTo,\n fetchCustomerNums,\n fetchCustNumsByCustId,\n fetchCustomerNum,\n updateCustomerNum,\n createCustomerNum,\n deleteCustomerNum,\n fetchContentGroups,\n fetchContentGroup,\n createContentGroup,\n updateContentGroup,\n deleteContentGroup,\n getDashboardCardAnalytics,\n getTopRevenue,\n getOrderHistory,\n getAbandonedCarts,\n getLoginReports,\n getFailedSearches,\n getSuccessfulSearches,\n getUsageReports,\n getACHReports,\n getPaginatedACHReports,\n updateACHReportStatus,\n exportPaginatedACHReports,\n getAnalyticsConfig,\n updateAnalyticsConfig,\n deleteAnalyticsConfig,\n fetchAudienceOverviewData,\n fetchGASessionInfoCountry,\n fetchGASessionInfoBrowser,\n fetchGASessionInfoDevice,\n fetchGAWebsiteTrafficData,\n fetchGATopRevenueProducts,\n fetchEcommerceOverviewData,\n fetchProductPerformanceData,\n fetchAvgPageLoadData,\n tusImageUpload,\n tusDocumentUpload,\n fetchResourceTree,\n fetchResources,\n fetchResource,\n updateResource,\n createResource,\n deleteResource,\n reorderResources,\n syncAssets,\n fetchAssets,\n exportAssets,\n fetchAsset,\n uploadAsset,\n uploadRemoteAsset,\n updateAsset,\n fetchAssetLabels,\n deleteAsset,\n fetchOverlays,\n fetchOverlay,\n updateOverlay,\n createOverlay,\n deleteOverlay,\n fetchCountries,\n fetchCountry,\n updateCountry,\n createCountry,\n deleteCountry,\n fetchStates,\n fetchState,\n updateState,\n createState,\n deleteState,\n fetchCustomFields,\n createCustomField,\n updateCustomFieldsList,\n deleteCustomField,\n fetchBooleanWebControls,\n fetchIntegerWebControls,\n fetchStringWebControls,\n fetchTileWebControls,\n fetchSiteWebControls,\n fetchOtherWebControls,\n updateWebControl,\n fetchSalesReps,\n fetchSalesRep,\n updateSalesRep,\n createSalesRep,\n deleteSalesRep,\n fetchSalesRepTypes,\n fetchSalesRepType,\n createSalesRepType,\n updateSalesRepType,\n deleteSalesRepType,\n fetchFeatureFlags,\n fetchFeatureFlag,\n updateFeatureFlag,\n fetchCostCenters,\n fetchCostCenter,\n createCostCenter,\n updateCostCenter,\n deleteCostCenter,\n fetchApprovalGroups,\n fetchApprovalGroup,\n fetchApprovalGroupNames,\n createApprovalGroup,\n updateApprovalGroup,\n deleteApprovalGroup,\n fetchLoginBudgets,\n fetchLoginBudget,\n createLoginBudget,\n updateLoginBudget,\n deleteLoginBudget,\n fetchCompanyInfos,\n fetchCompanyInfo,\n updateCompanyInfo\n};\n","import React from 'react';\n\nexport default function SupportInfo () {\n return (\n \n support@channelsoftware.com \n or (888)786-3487\n \n )\n}\n","import { createSlice } from '@reduxjs/toolkit';\nimport { UPDATE_FEATURE_FLAG } from '../actions/featureFlags.action';\n\nconst savedFlag = localStorage.getItem('showAnalytics');\n\n// savedFlag is a string. set initialState to be a boolean based on savedFlag value\n// if localStorage doesn't have a showAnalytics key, initialState will be null\n// null initialState indicates to the app that a google analytics config has not yet been fetched -\n// so it will be fetched in App.tsx.\n\n// if GET /google-analytics/config returns 404, no GA config was previously saved for this client, so\n// showAnalytics in localStorage, redux's state.analytics AND our custom showAnalytics hook will all be false\n\n// if GET /google-analytics/config returns 200, a GA config was previously saved for this client, so\n// showAnalytics in localStorage, redux's state.analytics AND our custom showAnalytics hook will all be true\n\nconst analyticsSlice = createSlice({\n name: 'analytics',\n initialState: savedFlag ? savedFlag === 'true' : null,\n reducers: {\n setAnalytics(state, action) {\n // keep localStorage in sync w/ redux store\n localStorage.setItem('showAnalytics', action.payload);\n return action.payload\n }\n },\n // allow this slice to respond to action types it has not generated via the reducers key:\n // because featureFlags.slice must also respond to the UPDATE_FEATURE_FLAG action,\n // the featureFlag action specified here is generated in featureFlags.action\n // instead of in featureFlagsSlice.reducers to avoid circular reference issues\n extraReducers: (builder) => {\n builder\n .addCase(UPDATE_FEATURE_FLAG, (state, action) => {\n // if the exposeGoogleAnalytics flag is updated, set analytics to false\n // this will hide analytics UI until we've refetched GA config\n // so if a client is converting from UA to GA4, analytics UI won't be\n // shown until we're sure a valid GA4 config has been saved\n const flag = action.payload.featureName === 'exposeGoogleAnalytics' ? false : state\n // keep localStorage in sync w/ redux store\n localStorage.setItem('showAnalytics', flag);\n return flag\n })\n }\n})\n\n// Extract the action creators object and the reducer\nconst { actions, reducer } = analyticsSlice\n// Extract and export each action creator by name\n// no need to extract/export the UPDATE_FEATURE_FLAG action; it's already exported from featureFlags.action\nexport const { setAnalytics } = actions\n// Export the reducer, either as a default or named export\nexport default reducer\n","import { createSlice } from '@reduxjs/toolkit';\nimport {\n UPDATE_FEATURE_FLAG\n} from '../actions/featureFlags.action';\n\n\nconst featureFlagsSlice = createSlice({\n name: 'featureFlags',\n // don't start with an empty object, or an object w/ featureName keys -\n// initial state must be falsy in order to trigger initial fetch\n// of featureFlag data in App.tsx\n initialState: null,\n // used to initialize all feature flags in redux after calling GET /features; called in App.tsx\n // we could leave the action in featureFlags.action and add it here in featureFlagsSlice.extraReducers,\n // but putting it here avoids a TS error when the reducer is called in the fetchFeatureFlags error case in App.tsx\n reducers: {\n setFeatureFlags(state, action) {\n let featureFlagsState = {}\n // handle case where feature flags are cleared, such as when selecting a new catalog\n if (action.payload === null) featureFlagsState = null\n else {\n action.payload.forEach((flagData) => {\n featureFlagsState[flagData.featureName] = {\n enabled: flagData.featureEnabled,\n value: flagData.featureValue\n }\n })\n }\n return featureFlagsState\n }\n },\n // allow this slice to respond to action types it has not generated via the reducers key:\n // because analytics.slice must also respond to the UPDATE_FEATURE_FLAG action,\n // the featureFlag actions specified here are generated in featureFlags.action\n // instead of in featureFlags.slice.reducers to avoid circular reference issues\n extraReducers: (builder) => {\n builder\n .addCase(UPDATE_FEATURE_FLAG, (state, action) => {\n const featureFlagData = action.payload;\n state[featureFlagData.featureName] = {\n enabled: featureFlagData.featureEnabled,\n value: featureFlagData.featureValue\n }\n })\n }\n})\n\n// Extract the actions and reducer\nconst { actions, reducer } = featureFlagsSlice\n// Extract and export each action creator by name\nexport const { setFeatureFlags } = actions\n// Export the reducer, either as a default or named export\nexport default reducer\n","import { createSlice } from '@reduxjs/toolkit';\n\nconst catalogDataSlice = createSlice({\n name: 'catalogData',\n initialState: null,\n reducers: {\n setCatalogData(state, action) {\n return action.payload\n }\n }\n})\n\n// Extract the action creators object and the reducer\nconst { actions, reducer } = catalogDataSlice\n// Extract and export each action creator by name\nexport const { setCatalogData } = actions\n// Export the reducer, either as a default or named export\nexport default reducer\n","import { createAction } from '@reduxjs/toolkit';\nexport const UPDATE_FEATURE_FLAG = 'UPDATE_FEATURE_FLAG'\nexport const SET_FEATURE_FLAGS = 'SET_FEATURE_FLAGS'\n\n// used to update a specific flag's boolean after updating via PATCH /feature/{featureName}\n// this action defined here, instead of in featureFlags.slice, because multiple slices' reducers must\n// respond to this action (analytics, featureFlags, expirationDate)\n// defining it here, in a separate file, avoids circular reference issues\nexport const updateFeatureFlag = createAction(UPDATE_FEATURE_FLAG)\n\n// old implementation\n// // used to update a specific flag's boolean after updating via PATCH /feature/{featureName}\n// export const updateFeatureFlag = (featureFlagData) => ({\n// type: UPDATE_FEATURE_FLAG,\n// payload: featureFlagData\n// })\n//\n// // used to initialize all feature flags in redux after calling GET /features\n// // called in App.tsx\n// export const setFeatureFlags = (featureFlagsData) => ({\n// type: SET_FEATURE_FLAGS,\n// payload: featureFlagsData\n// })\n\n","import React from 'react';\nimport { Button } from 'antd';\nimport { useAuth0 } from '@auth0/auth0-react';\nimport { useMsal, useIsAuthenticated } from \"@azure/msal-react\";\nimport { useSelector } from 'react-redux';\nimport { MenuOutlined } from '@ant-design/icons'\nimport { getCatalog } from '../../redux/selectors';\nimport config from \"../../app-config\";\n\n/**\n * Sticky header used in app's layout. Shows logos, currently-selected catalog, logout button,\n * and button used to expand/collapse app's sidebar.\n *\n * When rendered by special SelectCatalogView UI, DefaultHeader is reused but does not show current catalog\n * or sidebar expander button. This is because not much can be done w/o a catalog set -\n * it is a 'top-level' piece of data and is a param in most API requests\n *\n * @module DefaultHeader\n * @component\n */\nexport default function DefaultHeader(props: any) {\n const { isAuthenticated: isAuthenticatedAuth0, logout } = useAuth0();\n const { instance } = useMsal();\n const isAuthenticatedAzure = useIsAuthenticated();\n const { hideCatalog,\n collapsed, setCollapsed,\n collapseType, setCollapseType,\n sidebarWidth, setSidebarWidth\n } = props;\n\n const catalog = useSelector(getCatalog);\n\n return (\n \n {!hideCatalog && (\n \n \n \n )}\n \n {!hideCatalog && (\n

Catalog: {catalog}

\n )}\n \n {/*logout button */}\n {(isAuthenticatedAuth0 || isAuthenticatedAzure) && (\n {\n if (config.REACT_APP_AZURE_AUTH === 'true') {\n instance.logoutRedirect()\n }\n else if (config.REACT_APP_AZURE_AUTH !== 'true') {\n logout({\n clientId: config.REACT_APP_AUTH0_CLIENTID,\n logoutParams: {\n returnTo: `${window.location.origin}${config.REACT_APP_PUBLIC_URL}/login`\n }\n })\n }\n }}\n >\n Logout\n \n )}\n
\n );\n}\n\n\n\n","import { combineReducers } from '@reduxjs/toolkit';\nimport catalog from './catalog.slice';\nimport catalogData from './catalogData.slice';\nimport user from './user.slice';\nimport analytics from './analytics.slice';\nimport ids from './ids.slice'\nimport featureFlags from './featureFlags.slice'\nimport expirationDate from './expirationDate.slice'\n\nexport default combineReducers({\n catalog,\n catalogData,\n user,\n analytics,\n ids,\n featureFlags,\n expirationDate\n});\n","import { configureStore } from '@reduxjs/toolkit'\nimport rootReducer from './slices';\n\nexport default configureStore({\n reducer: rootReducer\n});\n","import { createSlice } from '@reduxjs/toolkit';\nimport { UPDATE_FEATURE_FLAG } from '../actions/featureFlags.action';\n\nconst expirationDateSlice = createSlice({\n name: 'expirationDate',\n initialState: false,\n reducers: {\n confirmExpirationDateModal(state, action) {\n return action.payload\n }\n },\n // allow this slice to respond to action types it has not generated via the reducers key:\n // because expirationDate.slice must also respond to the UPDATE_FEATURE_FLAG action,\n // the featureFlag actions specified here are generated in featureFlags.action\n // instead of in expirationDateSlice.reducers to avoid circular reference issues\n extraReducers: (builder) => {\n builder\n .addCase(UPDATE_FEATURE_FLAG, (state, action) => {\n // if the ExpirationDate flag is updated, set confirmExpirationDateModal back to false\n return action.payload.featureName === 'ExpirationDate' ? false : state\n })\n }\n})\n\n// Extract the action creators object and the reducer\nconst { actions, reducer } = expirationDateSlice\n// Extract and export each action creator by name\nexport const { confirmExpirationDateModal } = actions\n// Export the reducer, either as a default or named export\nexport default reducer\n","import React from 'react';\n\nexport default function ErrorFallback({error}: {error: Error}) {\n // default error message displayed by ErrorBoundary component\n console.error('error: ', error);\n return (\n

An error occurred. Check your browser console for more information.

\n )\n}\n","import { useSelector } from 'react-redux';\nimport { createSelector } from '@reduxjs/toolkit';\nimport { getPermissions, getFeatureFlags } from '../redux/selectors';\nimport createFeatureDecisions from '../auth/featureDecisions'\n\n// useFeature is a custom hook that enables feature flags to respond to store changes in components\n// example use case: Resource Center UI visibility is dictated by the value of the feature flag exposeResourceCenter.\n// if the user changes the value of this flag, the store must be able to set the new flag value\n// in memory immediately to avoid timing issues that may result in Resource Center UI being shown/hidden\n// out of sync w/ the flag's value\n\n// create a memoized selector for feature decisions\n// this seems to be the most efficient way of keeping featureDecisions up to date w latest store data\n// avoids calling createFeatureDecisions unless a store dependency has changed\nconst featureDecisionSelector = createSelector(\n // 'input' selector - extracts values from arguments\n getPermissions,\n // 'input' selector\n getFeatureFlags,\n // 'input' selector\n // get latest analytics flag. could abstract this selector, like the others\n state => state.analytics,\n // 'output' selector - receives extracted values and returns a derived value. See featureDecisions.ts.\n // will only be called if extracted values change - for example, if the user's permissions change or a\n // feature flag value is updated via the UI\n createFeatureDecisions\n);\n\n// called in the app as 'useFeature' hook\nexport default function(featureFunction) {\n // use memoized selector created above to get an up-to-date featureDecision obj\n const featureDecisions = useSelector(featureDecisionSelector);\n // then call the feature function with the up-to-date obj\n return featureFunction(featureDecisions)\n}\n","import { getPermissions, getFeatureFlags } from '../redux/selectors';\nimport { FeatureFlagSettings, StoreData } from \"../models/App\";\n\n/**\n * Translates permissions and other feature dependencies (like catalog data)\n * into booleans for use in UI rendering/API endpoint protection\n *\n * @param {string[]} _permissions - a list of the current user's permissions/roles extracted\n * from auth0's ID token supplied at login. Implements role-based access on a per-user basis.\n * @param {FeatureFlagSettings} _featureFlags - current state of internal feature flags, fetched from API on login.\n * Hides/exposes various UI feature elements.\n * @param {boolean} _showAnalytics - boolean indicating whether this console instance has supplied\n * a valid google analytics config. Determines whether to show components displaying GA data.\n */\nfunction createFeatureDecisions (_permissions: string[], _featureFlags: FeatureFlagSettings, _showAnalytics = false) {\n const permissions = _permissions ? _permissions : [];\n const featureFlags = _featureFlags ? _featureFlags : {} as FeatureFlagSettings;\n const showAnalytics = _showAnalytics !== null ? _showAnalytics : false;\n\n return {\n showExperimentalFeatures() {\n return permissions.includes('Experimental Features')\n },\n // permissions are extracted from the user's ID token in App.tsx\n // they are assigned via a user's roles on the auth0 dashboard\n // the Channel Admin role allows users to see admin-only UI - feature flags and WebSetup\n exposeAdminUI() {\n return permissions.includes('Channel Admin')\n },\n exposeContentGroups() {\n return !!featureFlags.exposeContentGroups?.enabled\n },\n // indicates whether a valid GA config has been saved to the API.\n // controls whether GA widgets appear on dashboard, and whether add'l links\n // appear in sidebar under Google Analytics\n showAnalytics() {\n return !!featureFlags.exposeGoogleAnalytics?.enabled && showAnalytics\n },\n // indicates whether the GoogleAnalyticsVersion flag is enabled.\n // controls whether Google Analytics menu appears in sidebar, allowing user to save a GA config to the API\n exposeAnalytics() {\n return !!featureFlags.exposeGoogleAnalytics?.enabled\n },\n exposeResourceCenter() {\n return !!featureFlags.exposeResourceCenter?.enabled\n },\n // exposes fields used by clients that are not integrated with an ERP,\n // such as the custom field 'Price\"\n nonIntegratedClientFlag() {\n return !!featureFlags.nonIntegratedClient?.enabled\n },\n exposeSalesRep() {\n return !!featureFlags.exposeSalesRep?.enabled\n },\n exposeACHReports() {\n return !!featureFlags.exposeACHReports?.enabled\n },\n exposeCoupons() {\n return !!featureFlags.exposeCoupons?.enabled\n },\n exposeShipAddresses() {\n return !!featureFlags.exposeShipAddresses?.enabled\n },\n exposeShipRates() {\n return !!featureFlags.exposeShipRates?.enabled\n },\n enableCostCenters() {\n return !!featureFlags.enableCostCenters?.enabled\n },\n exposeApprovalGroups() {\n return !!featureFlags.exposeApprovalGroups?.enabled\n },\n exposeProductDocuments() {\n return !!featureFlags.exposeProductDocuments?.enabled\n },\n exposeProductInventoryMessage() {\n return !!featureFlags.exposeProductInventoryMessage?.enabled\n },\n exposeOrderHistory() {\n return !!featureFlags.exposeOrderHistory?.enabled\n },\n exposeApprovalBudget() {\n return !!featureFlags.exposeApprovalBudget?.enabled\n },\n exposeLoginPricing() {\n return !!featureFlags.showPricing?.enabled\n },\n exposeERPCompanyId() {\n return !!featureFlags.exposeERPCompanyId?.enabled\n },\n exposeNewProductImport() {\n return !!featureFlags.exposeNewProductImport?.enabled\n }\n }\n}\nexport default createFeatureDecisions\n\n/**\n * Returns a list of all feature decision functions. Used to determine whether the user\n * has the correct permissions to call an endpoint.\n * @param {StoreData} store - current state of data in redux store. contains a list of:\n * permissions (roles) taken from the user's id token on login;\n * catalog data fetched from the API;\n * whether the client has a google analytics account linked to this console instance;\n * and the state of the frontend feature flags, fetched from the API on login\n */\nexport function createFeatureDecisionsFromStore(store: StoreData) {\n const permissions = getPermissions(store);\n const featureFlags = getFeatureFlags(store)\n const showAnalytics = store.analytics;\n\n return createFeatureDecisions(permissions, featureFlags, showAnalytics)\n}\n","import { createSlice } from '@reduxjs/toolkit';\n\nconst savedCatalog = localStorage.getItem('catalog');\n\nconst catalogSlice = createSlice({\n name: 'catalog',\n initialState: savedCatalog ? savedCatalog : '',\n reducers: {\n setCatalog(state, action) {\n return action.payload\n }\n }\n})\n\n// Extract the action creators object and the reducer\nconst { actions, reducer } = catalogSlice\n// Extract and export each action creator by name\nexport const { setCatalog } = actions\n// Export the reducer, either as a default or named export\nexport default reducer\n","import { useState, useEffect } from 'react';\nimport { ApiResponse, AxiosReqStatus } from \"../models/App\";\n\n// axiosRequest is the function indicating which API endpoint should be called\n// other params are dependencies to trigger useEffect/refetch\n\n/**\n * Custom hook handling API requests. Takes in a function for calling an axios request and any dependencies\n * causing the request to be refetched. Returns an array with the API response payload, an error object\n * (if it exists), a setter for manually setting the request data in state (see ProductForm.tsx),\n * and a flag indicating whether the request is in process.\n * @param {Promise>} axiosRequest - the name of the axios request being sent to the API\n * @param {any} dependencies - a list of variables to be used as useEffect dependencies triggering the axios request\n */\nexport default function(axiosRequest: () => Promise>, ...dependencies: any[]) {\n const [status, setStatus] = useState>({} as AxiosReqStatus);\n const [isLoading, setIsLoading] = useState(false)\n\n useEffect(() => {\n setIsLoading(true)\n axiosRequest()\n .then((response) => {\n setStatus({ ...status, data: response.data as T });\n setIsLoading(false)\n return response.data\n })\n .catch((error) => {\n setStatus({ ...status, error })\n setIsLoading(false)\n });\n }, dependencies ? dependencies : []);\n\n return [status.data, status.error, setStatus, isLoading] as const\n}\n","import React from 'react';\nimport { ErrorMessage } from \"@hookform/error-message\"\nimport { useFormState } from \"react-hook-form\";\nimport { RHFErrMsgProps } from \"../models/App\";\n\n/**\n * Custom implementation of react-hook-form's ErrorMessage to improve accessibility.\n * Allows us to pass an ID to the rendered element displaying the error message.\n * This ID can be referenced by the companion Input's aria-describedby attribute.\n * @param {RHFErrMsgProps} props - incoming props\n * @param {Control} props.control - the form errors object managed by RHF\n * @param {string} props.id - a unique ID on the rendered error message. used in the companion Input's aria-describedby attr\n * @param {string} props.name - the field name containing the error message to render\n * @param {string} props.className - optional prop adding add'l classes to the rendered error\n * @component\n */\nexport function CustomErrorMsg({control, id, name, className}: RHFErrMsgProps) {\n // extract errors obj from useFormState -\n // isolates re-renders at this component level instead of parent form components\n const {errors} = useFormState({control})\n\n return (\n
{message}
}\n />\n )\n}\n","import { createSlice } from '@reduxjs/toolkit';\n\nconst idsSlice = createSlice({\n name: 'ids',\n initialState: {ids: [], paginationParams: {}},\n reducers: {\n addIds(state, action) {\n state.ids.push(...action.payload)\n },\n clearIds(state) {\n state.ids = []\n },\n // clearIds: {\n // reducer: (state, action) => {\n // state.ids = action.payload\n // },\n // prepare: () => {\n // return { payload: []}\n // }\n // },\n setNextPageParams(state, action) {\n state.paginationParams = action.payload\n }\n }\n})\n\n\n// Extract the action creators object and the reducer\nconst { actions, reducer } = idsSlice\n// Extract and export each action creator by name\nexport const { addIds, clearIds, setNextPageParams } = actions\n// Export the reducer, either as a default or named export\nexport default reducer\n","import React, { useEffect, useState } from 'react';\nimport { Select } from 'antd';\nimport { useErrorHandler } from 'react-error-boundary';\nimport useAxiosRequest from '../../hooks/useAxiosRequest';\nimport { fetchCatalogs } from '../../data/api';\nimport Loading from '../../components/Loading';\nimport { CustomErrorMsg } from \"../../components/CustomErrorMsgRHF\";\nimport { SelectDropdownOption } from \"../../models/Product\";\n\n\n/**\n * Sorts and transforms fetched catalog data for consumption by Select component.\n * @param {string[]} catalogList - a list of catalogs fetched from the API\n * @returns {SelectDropdownOption[]} - a list of catalogs, sorted alphabetically, with testIds,\n * structured to be used as options by the Select component\n * @memberof module:CatalogSelect\n * @inner\n */\nconst prepareCatalogData = (catalogList: string[]) => {\n const sortedList = catalogList.sort((a, b) => {\n return a.toLowerCase().localeCompare(b.toLowerCase())\n });\n return sortedList.map(catalog => ({label: catalog, value: catalog, 'data-testid':`catalog-${catalog}`}))\n}\n\n/**\n * Component to render a sorted list of catalogs from the API in a searchable, multi- or single-select dropdown.\n * Used in two different contexts:\n * - on forms using RHF validation\n * -- allows users to associate catalog(s) with an entity record (Login, Warehouse or Login Budget)\n * -- has access to validation props to enter catalog(s) into state\n * - OR on the SelectCatalogView\n * -- allows users to set their current catalog used when navigating around the console and making API requests\n * -- uses standard hook getters/setters to enter catalog into state\n *\n * To implement in the RHF context, CatalogSelect is wrapped by CatalogSelectWrapper, which translates\n * RHF's onChange into the handleChange prop and RHF's value[fieldName] into the selectedCatalog prop.\n *\n * @param props\n * @module CatalogSelect\n * @component\n */\nconst CatalogSelect = function CatalogSelect(props: any) {\n const {\n control,\n fieldName,\n allowClear,\n multiSelect,\n placeholder,\n selectedCatalog,\n handleChange,\n onBlur,\n setCatalogsError\n } = props;\n\n // custom hook used to request catalog data and put it in state\n const [catalogs, catalogsError] = useAxiosRequest(() => fetchCatalogs());\n // hook holding the sorted catalog data used to populate dropdown list\n const [sortedList, setSortedList] = useState(undefined);\n // if an error occurs on fetching catalogs, assess whether to populate useErrorHandler or use the setCatalogsError hook:\n // if CatalogSelect is being used in a RHF context, setCatalogsError will be undefined and useErrorHandler will be populated.\n // if CatalogSelect is being used in the SelectCatalogView, the error must be set in the parent's state\n // so that the UI can be displayed correctly in this top-level error case\n useErrorHandler(setCatalogsError ? null : catalogsError);\n\n // if CatalogSelect is being used in the SelectCatalogView, useErrorHandler will not be populated,\n // so this effect will run to set the error in the parent's state. The error will limit the actions\n // the user can take on the SelectCatalogView and will display a more complex error message\n useEffect(() => {\n if (catalogsError) setCatalogsError(true)\n }, [catalogsError])\n\n // When data is fetched, sort/transform it for consumption by Select component\n useEffect(() => {\n if (catalogs) setSortedList(prepareCatalogData(catalogs))\n }, [catalogs]);\n\n if (!sortedList) return ;\n\n return (\n \n \n document.getElementById('catalog-picker-wrapper') || document.body}\n data-testid='catalog-picker'\n mode={multiSelect ? 'multiple' : undefined}\n placeholder={placeholder ? placeholder : `Select catalog${multiSelect ? 's' : ''}`}\n showSearch={true}\n optionFilterProp={'label'}\n defaultValue={selectedCatalog}\n value={selectedCatalog}\n allowClear={allowClear ? allowClear : false}\n onChange={value => {\n // in RHF context, handleChange prop will call onChange(value)\n // in SelectCatalogView, handleChange prop will call setSelectedCatalog hook\n handleChange(value)\n }}\n onBlur={() => {\n // in RHF context, onBlur prop will call onBlur(true)\n // in SelectCatalogView, no onBlur prop is passed\n if (onBlur) onBlur()\n }}\n options={sortedList} />\n {/* only show CustomErrorMsg in RHF context - props.control is not passed in SelectCatalogView */}\n {/* CustomErrorMsg displays errors when validating via a Yup schema within RHF implementation,\n such as 'required' errors. Not needed in SelectCatalogView, where error handling is managed via useState/useEffect */}\n {!!control && (\n \n )}\n \n \n )\n};\n\nexport default CatalogSelect\n","function getRuntimeConfig() {\n // in production, consume the config JSON provided during client deployment\n if (process.env.NODE_ENV === 'production') {\n return JSON.parse(\n document.getElementById('azure-json-config').innerHTML\n );\n }\n // otherwise, if not in production, use local env vars\n // AUTH0_DOMAIN and PUBLIC_URL are necessary to run the app locally. in production, these\n // are provided by the pipeline and don't need to be added to the variable library\n else return {\n REACT_APP_API: process.env.REACT_APP_API,\n REACT_APP_AUTH0_DOMAIN: process.env.REACT_APP_AUTH0_DOMAIN,\n REACT_APP_AUTH0_CLIENTID: process.env.REACT_APP_AUTH0_CLIENTID,\n REACT_APP_AUTH0_AUDIENCE: process.env.REACT_APP_AUTH0_AUDIENCE,\n REACT_APP_COMPANY_LOGO: process.env.REACT_APP_COMPANY_LOGO,\n REACT_APP_PUBLIC_URL: process.env.REACT_APP_PUBLIC_URL,\n REACT_APP_AZURE_AUTH: process.env.REACT_APP_AZURE_AUTH,\n REACT_APP_AZURE_CLIENTID: process.env.REACT_APP_AZURE_CLIENTID,\n REACT_APP_AZURE_API_CLIENTID: process.env.REACT_APP_AZURE_API_CLIENTID,\n REACT_APP_AZURE_TENANTID: process.env.REACT_APP_AZURE_TENANTID\n }\n}\n\nconst config = getRuntimeConfig();\n\nexport default config;\n","import React, { useState, useEffect } from 'react';\nimport { useSelector, useDispatch } from 'react-redux';\nimport { Redirect } from 'react-router-dom';\nimport { Label, Button } from 'reactstrap';\nimport { Layout } from 'antd';\nimport { ErrorBoundary } from \"react-error-boundary\";\nimport { useQueryClient } from \"react-query\";\nimport { getCatalog } from '../../../redux/selectors';\nimport Loading from '../../../components/Loading';\nimport { fetchCatalog } from '../../../data/api';\nimport { setCatalog } from '../../../redux/slices/catalog.slice';\nimport { setCatalogData } from '../../../redux/slices/catalogData.slice';\nimport { setAnalytics } from '../../../redux/slices/analytics.slice';\nimport { setFeatureFlags } from \"../../../redux/slices/featureFlags.slice\";\nimport { CatalogData } from \"../../../models/App\";\nimport SupportInfo from \"../../../components/SupportInfo\";\nimport DefaultHeader from \"../../../containers/DefaultLayout/DefaultHeader\";\nimport CatalogSelect from '../../Logins/CatalogSelect'\nimport ErrorFallback from \"../../../components/ErrorFallback\";\n\n\nconst { Header } = Layout;\n\n/**\n * Special UI component allowing user to update the currently-selected catalog from a list fetched\n * from the API.\n * @module SelectCatalogView\n * @component\n */\nexport const SelectCatalogView = function SelectCatalogView(props: any) {\n const dispatch = useDispatch();\n const catalog = useSelector(getCatalog);\n const queryClient = useQueryClient()\n // hook holding the name of the catalog currently selected from the dropdown list\n // instantiated based on current catalog in redux, if any\n const [selectedCatalog, setSelectedCatalog] = useState(catalog ? catalog : undefined);\n // hook holding the data associated with the currently-selected catalog\n const [selectedCatalogData, setSelectedCatalogData] = useState(null);\n // hook holding the current error state from the catalogs list fetch call. Used to show/hide\n // CatalogSelectUI, or an error message if fetch failed\n const [catalogsError, setCatalogsError] = useState(false)\n // hook holding the redirect flag; used to route the user to the dashboard after\n // confirming their catalog selection\n const [redirect, setRedirect] = useState(false);\n // hook indicating whether the fetch for an individual catalog's data is underway.\n // disables 'confirm' button and indicates API activity to user\n const [fetching, setFetching] = useState(false);\n // hook holding the current error state from the individual catalog data fetch call.\n // disables 'confirm' button and shows error message if true.\n const [catalogError, setCatalogError] = useState(false);\n\n // when user selects a catalog from the list, fetch data for that catalog\n // if catalog fetch errors, set the error hook so error text can be shown\n useEffect(() => {\n if (selectedCatalog) {\n setFetching(true);\n setCatalogError(false);\n fetchCatalog(selectedCatalog)\n .then(res => {\n setSelectedCatalogData(res.data);\n setFetching(false)\n })\n .catch(err => {\n setFetching(false);\n setCatalogError(true)\n })\n }\n }, [selectedCatalog]);\n\n const handleChange = (event: string) => {\n setSelectedCatalog(event)\n };\n\n // when user clicks 'confirm,' set catalog and catalogData in redux,\n // set feature flags to null to re-fetch them for the new catalog,\n // set analytics flag to null to re-fetch config,\n // and set catalog name in local storage\n // then redirect to dashboard\n const confirm = () => {\n if (selectedCatalog) {\n // set the selected catalog and its data in redux\n dispatch(setCatalog(selectedCatalog));\n dispatch(setCatalogData(selectedCatalogData));\n // set feature flags to null so App.tsx will re-fetch them for the new catalog\n dispatch(setFeatureFlags(null))\n // set GA flag to null so App.tsx will re-fetch analytics config\n // this fixes the issue where client must manually go to\n // GA settings page to trigger analytics on dashboard after catalog change\n dispatch(setAnalytics(null));\n // cache the selected catalog. this will allow most returning users to avoid selecting\n // a catalog when logging in again.\n localStorage.setItem('catalog', selectedCatalog);\n // clear out any cached data queries so that no queries from a stale catalog will exist in\n // the queryClient. Avoids inadvertent refetching of non-relevant queries.\n // This can be optimized if needed; see SUB2-7889\n queryClient.removeQueries()\n // finally, redirect to the dashboard\n setRedirect(true)\n }\n };\n\n // when redirect flag is true, redirect to dashboard\n if (redirect) {\n return ;\n }\n\n return (\n
\n \n
\n \n
\n \n
\n {/* if catalogs fetch errors, no recovery is possible b/c a catalog is needed to access the app */}\n {/* show error text instructing user to contact support */}\n {catalogsError && (

An error occurred when fetching catalogs. Contact Channel Software support at .

)}\n {/* else, if catalogs fetch succeeds, show catalog picker UI */}\n {!catalogsError && (\n \n \n \n \n \n {/* disable button if catalog data is loading or has errored */}\n \n Confirm\n \n {/* if catalog data fetch errors, show error text instructing user to contact support */}\n {/* but continue to show catalog picker in case another catalog IS retrievable */}\n {catalogError && (\n

An error occurred when fetching this catalog. Contact Channel Software support at .

\n )}\n {/* if catalog data fetch is in process, show Loader for user cue that something is being fetched */}\n {fetching && (\n \n )}\n
\n )}\n
\n
\n
\n
\n );\n};\n\nexport default SelectCatalogView\n","// create existence flag for each piece of store data\n// makes it easier to debug timing issues in App.tsx\n\nexport const isCatalogSelected = state => !!state.catalog;\nexport const getCatalog = state => state.catalog;\n\nexport const isCatalogDataLoaded = state => !!state.catalogData;\nexport const getCatalogData = state => state.catalogData;\n","// create existence flag for each piece of store data\n// makes it easier to debug timing issues in App.tsx\n\nexport const isTokenLoaded = state => !!state.user && !!state.user.accessToken;\nexport const getToken = state => state.user.accessToken;\n\nexport const isPermissionsLoaded = state => !!state.user && !!state.user.permissions;\nexport const getPermissions = state => state.user.permissions;\n","// create existence flag for each piece of store data\n// makes it easier to debug timing issues in App.tsx\n\nexport const isGAConfigFetched = state => {\n return state.analytics !== null;\n};\n\nexport const getShowAnalytics = state => state.analytics;\n","export const getIds = globalState => globalState.ids.ids;\nexport const getNextPageParams = globalState => globalState.ids.paginationParams;\n","// if false, triggers initial fetch of feature flag data from API in App.tsx\nexport const isFeatureFlagsLoaded = state => !!state.featureFlags;\n\n// retrieves feature flag state from Redux for use in setting up feature decisions\n// see featureDecisions.ts\nexport const getFeatureFlags = state => state.featureFlags;\n\n// no separate slice for pw expiration window params, so put these selectors here\n\n// retrieves value of the feature flag with featureName: pwResetExpirationMinutes\n// used to customize the valid lifetime of a pw reset email generated when resetting a login record's pw\n// by calling POST /Logins/ResetPassword\nexport const getResetEmailLifetime = state => state.featureFlags?.pwResetExpirationMinutes?.value\n\n// retrieves value of the feature flag with featureName: pwCreateExpirationMinutes\n// used to customize the valid lifetime of a pw create email generated when creating a new login record\n// by calling POST /Logins and POST /customers/_import.\nexport const getCreateEmailLifetime = state => state.featureFlags?.pwCreateExpirationMinutes?.value\n","// retrieves value of the feature flag with featureName: ExpirationDate\n// used in determining whether to show user a message about their expiring console SAAS contract\nexport const getServiceExpirationDate = state => state.featureFlags?.ExpirationDate?.value\n\n// keeps track of whether user has already acknowledged the ExpirationDate modal during this session\n// prevents the user from having to see/confirm modal >1x per session\nexport const isExpirationModalConfirmed = state => state.expirationDate\n"],"sourceRoot":""}