{"version":3,"sources":["i18n.js","constants.js","actions/featureFlagActions.js","actions/integrationsActions.js","actions/projectActions.js","apis/ProjectConfigApi.js","actions/projectConfigActions.js","actions/vimeoActions.js","apis/ProjectVersionApi.js","apis/MediaApi.js","actions/menuItemActions.js","actions/contentActions.js","actions/projectVersionsActions.js","apis/TemplateApi.js","actions/templateActions.js","actions/moduleActions.js","actions/messageActions.js","actions/cropActions.js","apis/CloverApi.js","objects/getObjectKeyFromValue.js","actions/cloverActions.js","actions/index.js","actions/profileActions.js","apis/ProfileApi.js","actions/mediaActions.js","actions/organizationActions.js","actions/calendarActions.js","actions/waffleActions.js","actions/menuActions.js","actions/studiocActions.js","errors/handleError.js","components/common/CaptionTooltip.js","actions/alertActions.js","assets/styles/img/navbar-brand.svg","token/refreshToken.js","apis/FmsIdApi.js","actions/FmsActions.js"],"names":["i18n","use","Backend","LanguageDetector","reactI18nextModule","init","lng","fallbackLng","ns","defaultNS","debug","interpolation","escapeValue","react","wait","backend","loadpath","concat","window","GENESIS_CMS_URL","requestOptions","cache","constants","LiveStatus","Name","Id","BridgeProductType","ColorBaseTheme","FeaturedType","ImageType","MinWidth","MinHeight","MenuStyle","ModuleType","Group","IsUnity","MenuSubType","MediaType","ViewLayoutType","ConfigErrorCode","ErrorCode","Link","HelpResellerIds","ResellerName","ResellerCode","MenuType","ContentType","Type","StyleColors","blue15","grey35","error2","successDark","infoDark","warningDark","white","IconList","value","label","getFlags","orgId","dispatch","type","types","axios","get","GENESIS_CMS_API_URL","then","response","payload","data","catch","error","errorHandler","handleError","getLiveProjectConfig","cid","getProjects","params","sessionId","localStorage","getItem","token","includeLatestVersion","checkProjectConfig","projectId","projectConfigApi","errorMessage","status","addAlert","message","t","view","id","dismissable","setTimeout","updateProjectVersionViaApi","projectVersionModel","url","method","getMedia","getProjectVersionMenuItems","getPagesforDropdown","genesisToken","getPagesforProject","skipDropdown","arguments","length","undefined","getProjectVersion","projectVersionApi","Promise","all","updateProjectVersion","updateProjectVersionForSermonDisconnect","updateProjectVersionWithMedia","projectVersionIn","mediaType","cloverAccountProduct","cloverAccountEmail","version","media","throwMediaError","err","resolve","reject","mediaUrl","clearAlert","getTemplatesApi","messageResp","errorMessages","getMessages","limit","offset","sinceTime","beforeTime","timeAscending","noOfMessages","getMessagesTotal","resetWarning","uploadAssetImageForCrop","imageType","file","parentId","crop","imageFormData","FormData","append","Math","random","toString","replace","substr","headers","originalImage","getCloverProductsViaAPI","tokenResponse","GENESIS_CLOVER_ACCOUNTS_URL","Authorization","access_token","getObjectKeyFromValue","obj","val","Object","keys","slice","find","key","setSelectedCloverPage","pageId","product","projectVersion","mediaItems","media_item_uuid","mediaItemUUId","owner","email","product_name","n","getCloverProductPages","cloverToken","productName","GENESIS_CLOVER_API_URL","pages","filter","page","mediaSection","select","logout","changeProjects","getCurrentProfile","state","setItem","organizationId","givingChurchId","getProject","createProject","name","isUnity","projData","projectName","ids","newProjectId","updateProjectVersionbyParameter","parameterName","parameterValue","put","deleteProjectVersion","delete","getTemplates","getTemplate","searchForTemplate","templ","handleApiResponseAndGetTemplate","templates","template","getTemplateFromList","handleApiErrorFn","getProjectVersionModules","enabled","map","moduleType","updateModule","moduleParamsArray","updateModuleParameter","field","endpoint","Array","isArray","feedUpdated","fetchPages","moduleEnable","console","log","getModuleByType","getModuleByTypeAndForms","getForms","getProjectMedia","bulkUpdateModules","modules","getEmbedCode","notLive","getChmsCalendarFeeds","feeds","_feeds$data","_feeds$data$data","calendars","getWaffleToken","deleteSingleImageForCrop","imageId","cropImageForCrop","getOriginalCroppedImageForCrop","imagePath","getOriginalImageForCrop","deleteImagesForCropForCrop","resetCroppedImage","resetImageData","clearCropModal","publishProject","resp","errorTypeString","comment","getCloverProducts","username","password","apiToken","Username","Password","getCloverToken","_unused","productResponse","disconnectCloverAccount","setMenuOpenSection","sectionName","toggleMenuShown","currentState","toggleMobileMenuShown","togglePreviewShown","createMessage","subject","body","scheduledTime","pageInfo","formMessage","formId","formTitle","updateMessage","messageId","deleteMessage","getMessage","searchStreams","term","encodeURIComponent","Accept","checkShareFaithEmail","updateMenuItemParameter","subTypeId","menu","bulkUpdateMenuItems","menuItems","getVimeoFeeds","retObj","push","uri","getVimeoToken","code","redirect","addContentSectionToPage","deleteContentSection","sectionId","global","reorderPageSections","sections","contentSections","updateContentSection","section","addContentToSection","contentObject","tapType","updateContent","deleteContent","contentId","deletePage","pageName","addPage","icon","showAlert","menuItemAdded","substring","updatePage","menuItemRemoved","getStudioCConfiguration","errorObject","dontRedirectOn404","_error$data","_error$data2","clear","loginRedirectUrl","location","pathname","indexOf","CaptionTooltip","props","placement","_jsx","Tooltip","trigger","mouseEnterDelay","mouseLeaveDelay","overlay","children","tooltipText","overlayClassName","alertId","alert","refreshToken","sessionStorage","setToken","createsession","jwt","Data","session","user","current_organization","logo_url","first_name","last_name","appBuilderModuleName","modulesLength","i","is_dark_provisioned","active","ModulesData","JSON","stringify","includes","current_status","Message","getFmsClientId","getCurrentFmsId"],"mappings":"8HAAA,2DAKAA,IACKC,IAAIC,KACJD,IAAIE,KACJF,IAAIG,KACJC,KAAK,CACFC,IAAK,QACLC,YAAa,QAGbC,GAAI,CAAC,gBACLC,UAAW,eAEXC,OAAO,EAEPC,cAAe,CACXC,aAAa,GAGjBC,MAAO,CACHC,MAAM,GAEVC,QAAS,CAELC,SAAS,GAADC,OAAKC,OAAOC,gBAAe,gCACnCC,eAAgB,CACZC,MAAO,eAKRrB,MAAI,C,mCC48BJsB,IA/+BG,CACdC,WAAY,CACR,CACIC,KAAM,OACNC,GAAI,GAER,CACID,KAAM,OACNC,GAAI,IAGZC,kBAAmB,GACnBC,eAAgB,CACZ,CACIH,KAAM,QACNC,GAAI,GAER,CACID,KAAM,OACNC,GAAI,IAGZG,aAAc,CACV,CACIJ,KAAM,SACNC,GAAI,GAER,CACID,KAAM,WACNC,GAAI,IAGZI,UAAW,CACP,CACIL,KAAM,OACNC,GAAI,GAER,CACID,KAAM,SACNC,GAAI,GAER,CACID,KAAM,SACNC,GAAI,GAER,CACID,KAAM,aACNC,GAAI,GAER,CACID,KAAM,OACNC,GAAI,EACJK,SAAU,IACVC,UAAW,KAEf,CACIP,KAAM,SACNC,GAAI,GAER,CACID,KAAM,mBACNC,GAAI,GAER,CACID,KAAM,mBACNC,GAAI,GAER,CACID,KAAM,gBACNC,GAAI,EACJM,UAAW,IACXD,SAAU,MAEd,CACIN,KAAM,uBACNC,GAAI,GACJM,UAAW,IACXD,SAAU,MAGlBE,UACI,CACI,CACIR,KAAM,SACNC,GAAI,GAER,CACID,KAAM,WACNC,GAAI,GAER,CACID,KAAM,QACNC,GAAI,IAGhBQ,WACI,CACI,CACIT,KAAM,WACNC,GAAI,EACJS,MAAO,QAEX,CACIV,KAAM,UACNC,GAAI,EACJS,MAAO,QAEX,CACIV,KAAM,SACNC,GAAI,EACJS,MAAO,QAEX,CACIV,KAAM,SACNC,GAAI,EACJS,MAAO,QAEX,CACIV,KAAM,UACNC,GAAI,EACJS,MAAO,QAEX,CACIV,KAAM,gBACNC,GAAI,EACJS,MAAO,UAEX,CACIV,KAAM,WACNC,GAAI,EACJS,MAAO,QAEX,CACIV,KAAM,cACNC,GAAI,EACJS,MAAO,QAEX,CACIV,KAAM,SACNC,GAAI,EACJS,MAAO,QAEX,CACIV,KAAM,WACNC,GAAI,GACJS,MAAO,QAEX,CACIV,KAAM,SACNC,GAAI,GACJS,MAAO,QAEX,CACIV,KAAM,eACNC,GAAI,GACJS,MAAO,QAEX,CACEV,KAAM,0BACNC,GAAI,GACJS,MAAO,OACPC,SAAS,GAEX,CACIX,KAAM,UACNC,GAAI,GACJS,MAAO,SAGnBE,YACI,CACI,CACIZ,KAAM,WACNC,GAAI,GAER,CACID,KAAM,UACNC,GAAI,GAER,CACID,KAAM,SACNC,GAAI,GAER,CACID,KAAM,SACNC,GAAI,GAER,CACID,KAAM,UACNC,GAAI,GAER,CACID,KAAM,WACNC,GAAI,GAER,CACID,KAAM,cACNC,GAAI,GAER,CACID,KAAM,SACNC,GAAI,GAER,CACID,KAAM,WACNC,GAAI,IAER,CACID,KAAM,SACNC,GAAI,IAER,CACID,KAAM,eACNC,GAAI,IAER,CACID,KAAM,mBACNC,GAAI,IAER,CACID,KAAM,UACNC,GAAI,KAGhBY,UACI,CACI,CACIb,KAAM,OACNC,GAAI,GAER,CACID,KAAM,UACNC,GAAI,GAER,CACID,KAAM,QACNC,GAAI,GAER,CACID,KAAM,aACNC,GAAI,GAER,CACID,KAAM,SACNC,GAAI,GAER,CACID,KAAM,WACNC,GAAI,IAGhBa,eACI,CACI,CACId,KAAM,OACNC,GAAI,GAER,CACID,KAAM,OACNC,GAAI,IAGhBc,gBACI,CACI,CACIC,UAAW,0BACXC,KAAM,IAEV,CACID,UAAW,iBACXC,KAAM,IAEV,CACID,UAAW,iCACXC,KAAM,0BAEV,CACID,UAAW,wCACXC,KAAM,0BAEV,CACID,UAAW,2CACXC,KAAM,0BAEV,CACID,UAAW,yBACXC,KAAM,mBAEV,CACID,UAAW,+BACXC,KAAM,kBAEV,CACID,UAAW,4BACXC,KAAM,0BAEV,CACID,UAAW,oCACXC,KAAM,oBAEV,CACID,UAAW,2BACXC,KAAM,mBAEV,CACID,UAAW,iCACXC,KAAM,kBAEV,CACID,UAAW,2BACXC,KAAM,kBAEV,CACID,UAAW,8BACXC,KAAM,mBAEV,CACID,UAAW,qCACXC,KAAM,gBAEV,CACID,UAAW,yBACXC,KAAM,gBAEV,CACID,UAAW,0BACXC,KAAM,gBAEV,CACID,UAAW,0BACXC,KAAM,gBACP,CACCD,UAAW,mBACXC,KAAM,SAEV,CACID,UAAW,mBACXC,KAAM,SAEV,CACID,UAAW,qBACXC,KAAM,UAEV,CACID,UAAW,4BACXC,KAAM,gBAEV,CACID,UAAW,iCACXC,KAAM,oBAEV,CACID,UAAW,oCACXC,KAAM,oBAEV,CACID,UAAW,gCACXC,KAAM,oBAEV,CACID,UAAW,+BACXC,KAAM,gBAEV,CACID,UAAW,wBACXC,KAAM,kBAEV,CACID,UAAW,wBACXC,KAAM,kBAEV,CACID,UAAW,qCACXC,KAAM,eAEV,CACID,UAAW,sCACXC,KAAM,eAEV,CACID,UAAW,wCACXC,KAAM,0BAEV,CACID,UAAW,4BACXC,KAAM,eAEV,CACID,UAAW,4BACXC,KAAM,IAEV,CACID,UAAW,sBACXC,KAAM,eAEV,CACID,UAAW,kCACXC,KAAM,iBAGlBC,gBACI,CACI,CACIC,aAAc,YACdC,aAAc,IAElB,CACID,aAAc,sBACdC,aAAc,IAElB,CACID,aAAc,gBACdC,aAAc,IAElB,CACID,aAAc,cACdC,aAAc,IAElB,CACID,aAAc,uBACdC,aAAc,IAElB,CACID,aAAc,cACdC,aAAc,IAElB,CACID,aAAc,cACdC,aAAc,IAElB,CACID,aAAc,uBACdC,aAAc,IAElB,CACID,aAAc,QACdC,aAAc,IAElB,CACID,aAAc,0BACdC,aAAc,IAElB,CACID,aAAc,oBACdC,aAAc,IAElB,CACID,aAAc,aACdC,aAAc,IAElB,CACID,aAAc,sBACdC,aAAc,IAElB,CACID,aAAc,UACdC,aAAc,IAElB,CACID,aAAc,oBACdC,aAAc,IAElB,CACID,aAAc,qBACdC,aAAc,IAElB,CACID,aAAc,mBACdC,aAAc,IAElB,CACID,aAAc,aACdC,aAAc,IAElB,CACID,aAAc,wBACdC,aAAc,IAElB,CACID,aAAc,kBACdC,aAAc,IAElB,CACID,aAAc,mBACdC,aAAc,IAElB,CACID,aAAc,cACdC,aAAc,IAElB,CACID,aAAc,uBACdC,aAAc,IAElB,CACID,aAAc,eACdC,aAAc,IAElB,CACID,aAAc,YACdC,aAAc,IAElB,CACID,aAAc,eACdC,aAAc,IAElB,CACID,aAAc,eACdC,aAAc,IAElB,CACID,aAAc,kBACdC,aAAc,IAElB,CACID,aAAc,UACdC,aAAc,IAElB,CACID,aAAc,qBACdC,aAAc,IAElB,CACID,aAAc,eACdC,aAAc,IAElB,CACID,aAAc,2BACdC,aAAc,IAElB,CACID,aAAc,wBACdC,aAAc,IAElB,CACID,aAAc,UACdC,aAAc,IAElB,CACID,aAAc,QACdC,aAAc,KAG1BC,SAAU,CACN,CACIrB,KAAM,SACNC,GAAI,GAER,CACID,KAAM,QACNC,GAAI,IAGZqB,YAAa,CACT,CACItB,KAAM,kBACNC,GAAI,IACJsB,KAAM,UAEV,CACIvB,KAAM,kBACNC,GAAI,IACJsB,KAAM,UAEV,CACIvB,KAAM,OACNC,GAAI,IACJsB,KAAM,WAEV,CACIvB,KAAM,SACNC,GAAI,IACJsB,KAAM,WAEV,CACIvB,KAAM,QACNC,GAAI,IACJsB,KAAM,WAEV,CACIvB,KAAM,eACNC,GAAI,IACJsB,KAAM,WAEV,CACIvB,KAAM,aACNC,GAAI,IACJsB,KAAM,WAEV,CACIvB,KAAM,UACNC,GAAI,IACJsB,KAAM,YAGdC,YAAa,CACTC,OAAQ,UACRC,OAAQ,UACRC,OAAQ,UACRC,YAAa,UACbC,SAAU,UACVC,YAAa,UACbC,MAAO,WAEXC,SAAU,CACN,CACIC,MAAO,eACPC,MAAO,gEAEX,CACID,MAAO,QACPC,MAAO,0HAEX,CACID,MAAO,OACPC,MAAO,6DAEX,CACID,MAAO,WACPC,MAAO,4EAEX,CACID,MAAO,aACPC,MAAO,iFAEX,CACID,MAAO,YACPC,MAAO,8FAEX,CACID,MAAO,YACPC,MAAO,uFAEX,CACID,MAAO,OACPC,MAAO,mFAEX,CACID,MAAO,WACPC,MAAO,mDAEX,CACID,MAAO,oBACPC,MAAO,mEAEX,CACID,MAAO,YACPC,MAAO,gCAEX,CACID,MAAO,WACPC,MAAO,gDAEX,CACID,MAAO,WACPC,MAAO,6CACR,CACCD,MAAO,eACPC,MAAO,sEAEX,CACID,MAAO,iBACPC,MAAO,sFAEX,CACID,MAAO,eACPC,MAAO,2EAEX,CACID,MAAO,WACPC,MAAO,sEAEX,CACID,MAAO,eACPC,MAAO,6CAEX,CACID,MAAO,SACPC,MAAO,8GAEX,CACID,MAAO,QACPC,MAAO,uBAEX,CACID,MAAO,QACPC,MAAO,8CAEX,CACID,MAAO,mBACPC,MAAO,gFAEX,CACID,MAAO,UACPC,MAAO,uCAEX,CACID,MAAO,UACPC,MAAO,0CAEX,CACID,MAAO,QACPC,MAAO,kFAEX,CACID,MAAO,YACPC,MAAO,oDAEX,CACID,MAAO,uBACPC,MAAO,wFAEX,CACID,MAAO,gBACPC,MAAO,kDAEX,CACID,MAAO,WACPC,MAAO,wCAEX,CACID,MAAO,qBACPC,MAAO,8CAEX,CACID,MAAO,cACPC,MAAO,0BAEX,CACID,MAAO,WACPC,MAAO,yDAEX,CACID,MAAO,YACPC,MAAO,yDAEX,CACID,MAAO,OACPC,MAAO,uDAEX,CACID,MAAO,WACPC,MAAO,kCAEX,CACID,MAAO,OACPC,MAAO,uEAEX,CACID,MAAO,OACPC,MAAO,0BAEX,CACID,MAAO,SACPC,MAAO,qDAEX,CACID,MAAO,iBACPC,MAAO,wEAEX,CACID,MAAO,QACPC,MAAO,wCAEX,CACID,MAAO,kBACPC,MAAO,6EAEX,CACID,MAAO,qBACPC,MAAO,0FAEX,CACID,MAAO,wBACPC,MAAO,8FAEX,CACID,MAAO,cACPC,MAAO,yFAEX,CACID,MAAO,aACPC,MAAO,6EAEX,CACID,MAAO,eACPC,MAAO,oFAEX,CACID,MAAO,aACPC,MAAO,oEAEX,CACID,MAAO,QACPC,MAAO,qEACR,CACCD,MAAO,YACPC,MAAO,yCAEX,CACID,MAAO,UACPC,MAAO,yCACR,CACCD,MAAO,WACPC,MAAO,6EAEX,CACID,MAAO,aACPC,MAAO,yFAEX,CACID,MAAO,QACPC,MAAO,oCAEX,CACID,MAAO,cACPC,MAAO,2BAEX,CACID,MAAO,cACPC,MAAO,mCAEX,CACID,MAAO,cACPC,MAAO,yCAEX,CACID,MAAO,YACPC,MAAO,4DAEX,CACID,MAAO,OACPC,MAAO,qCAEX,CACID,MAAO,WACPC,MAAO,oEAEX,CACID,MAAO,iBACPC,MAAO,qCAEX,CACID,MAAO,kBACPC,MAAO,4CAEX,CACID,MAAO,YACPC,MAAO,2BAEX,CACID,MAAO,OACPC,MAAO,qBACR,CACCD,MAAO,iBACPC,MAAO,wDACR,CACCD,MAAO,mBACPC,MAAO,iFACR,CACCD,MAAO,mBACPC,MAAO,gFACR,CACCD,MAAO,aACPC,MAAO,wDACR,CACCD,MAAO,UACPC,MAAO,8DACR,CACCD,MAAO,MACPC,MAAO,iDACR,CACCD,MAAO,SACPC,MAAO,4FACR,CACCD,MAAO,iBACPC,MAAO,2EACR,CACCD,MAAO,mBACPC,MAAO,gFACR,CACCD,MAAO,aACPC,MAAO,6FACR,CACCD,MAAO,SACPC,MAAO,uEACR,CACCD,MAAO,mBACPC,MAAO,2DACR,CACCD,MAAO,UACPC,MAAO,kEACR,CACCD,MAAO,MACPC,MAAO,kEACR,CACCD,MAAO,QACPC,MAAO,2CACR,CACCD,MAAO,YACPC,MAAO,yDACR,CACCD,MAAO,cACPC,MAAO,mCACR,CACCD,MAAO,QACPC,MAAO,2DACR,CACCD,MAAO,mBACPC,MAAO,kFACR,CACCD,MAAO,OACPC,MAAO,2EACR,CACCD,MAAO,UACPC,MAAO,oEACR,CACCD,MAAO,QACPC,MAAO,sEACR,CACCD,MAAO,SACPC,MAAO,kFACR,CACCD,MAAO,SACPC,MAAO,mFACR,CACCD,MAAO,WACPC,MAAO,+DACR,CACCD,MAAO,QACPC,MAAO,4DACR,CACCD,MAAO,WACPC,MAAO,8BACR,CACCD,MAAO,iBACPC,MAAO,4DACR,CACCD,MAAO,OACPC,MAAO,uBACR,CACCD,MAAO,QACPC,MAAO,uBACR,CACCD,MAAO,cACPC,MAAO,+BACR,CACCD,MAAO,iBACPC,MAAO,2BACR,CACCD,MAAO,KACPC,MAAO,8EACR,CACCD,MAAO,WACPC,MAAO,oFACR,CACCD,MAAO,cACPC,MAAO,6FACR,CACCD,MAAO,eACPC,MAAO,iFACR,CACCD,MAAO,OACPC,MAAO,6FACR,CACCD,MAAO,gBACPC,MAAO,+GACR,CACCD,MAAO,QACPC,MAAO,2GACR,CACC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,YAAYF,GAAO,IAM5C,CAegBC,CAAaZ,EAAUW,EAAMJ,SAAUL,KAC3C,GACR,CACJ,CAEO,SAAS4T,IACZ,OAAOD,IACFvT,MAAK,SAACC,GACHY,aAAagH,QAAQ,QAAS5H,EAASE,KAAKA,KAChD,IACCC,OAAM,WACP,GACR,C","file":"static/js/2.a8417fb9.chunk.js","sourcesContent":["import i18n from 'i18next';\r\nimport Backend from 'i18next-xhr-backend';\r\nimport LanguageDetector from 'i18next-browser-languagedetector';\r\nimport { reactI18nextModule } from 'react-i18next';\r\n\r\ni18n\r\n .use(Backend)\r\n .use(LanguageDetector)\r\n .use(reactI18nextModule)\r\n .init({\r\n lng: 'en-US',\r\n fallbackLng: 'en-US',\r\n\r\n // have a common namespace used around the full app\r\n ns: ['translations'],\r\n defaultNS: 'translations',\r\n\r\n debug: false,\r\n\r\n interpolation: {\r\n escapeValue: false, // not needed for react!!\r\n },\r\n\r\n react: {\r\n wait: true,\r\n },\r\n backend: {\r\n // for all available options read the backend's repository readme file\r\n loadpath: `${window.GENESIS_CMS_URL}/locales/{{lng}}/{{ns}}.json`,\r\n requestOptions: {\r\n cache: 'no-store',\r\n },\r\n },\r\n });\r\n\r\nexport default i18n;\r\n","const constants = {\r\n LiveStatus: [\r\n {\r\n Name: 'Edit',\r\n Id: 1,\r\n },\r\n {\r\n Name: 'Live',\r\n Id: 2,\r\n },\r\n ],\r\n BridgeProductType: 14,\r\n ColorBaseTheme: [\r\n {\r\n Name: 'Light',\r\n Id: 1,\r\n },\r\n {\r\n Name: 'Dark',\r\n Id: 2,\r\n },\r\n ],\r\n FeaturedType: [\r\n {\r\n Name: 'Latest',\r\n Id: 1,\r\n },\r\n {\r\n Name: 'Featured',\r\n Id: 2,\r\n },\r\n ],\r\n ImageType: [\r\n {\r\n Name: 'Icon',\r\n Id: 0,\r\n },\r\n {\r\n Name: 'Header',\r\n Id: 1,\r\n },\r\n {\r\n Name: 'Launch',\r\n Id: 2,\r\n },\r\n {\r\n Name: 'Screenshot',\r\n Id: 3,\r\n },\r\n {\r\n Name: 'Logo',\r\n Id: 4,\r\n MinWidth: 372,\r\n MinHeight: 372,\r\n },\r\n {\r\n Name: 'Splash',\r\n Id: 5,\r\n },\r\n {\r\n Name: 'SplashBackground',\r\n Id: 6,\r\n },\r\n {\r\n Name: 'LaunchBackground',\r\n Id: 7,\r\n },\r\n {\r\n Name: 'ContentBanner',\r\n Id: 9,\r\n MinHeight: 720,\r\n MinWidth: 1280,\r\n },\r\n {\r\n Name: 'ContentImageWithText',\r\n Id: 10,\r\n MinHeight: 300,\r\n MinWidth: 300,\r\n },\r\n ],\r\n MenuStyle:\r\n [\r\n {\r\n Name: 'Bottom',\r\n Id: 1,\r\n },\r\n {\r\n Name: 'SlideOut',\r\n Id: 2,\r\n },\r\n {\r\n Name: 'Tiled',\r\n Id: 3,\r\n },\r\n ],\r\n ModuleType:\r\n [\r\n {\r\n Name: 'Discover',\r\n Id: 1,\r\n Group: 'Core',\r\n },\r\n {\r\n Name: 'Sermons',\r\n Id: 2,\r\n Group: 'Core',\r\n },\r\n {\r\n Name: 'Giving',\r\n Id: 3,\r\n Group: 'Core',\r\n },\r\n {\r\n Name: 'Events',\r\n Id: 4,\r\n Group: 'Core',\r\n },\r\n {\r\n Name: 'Contact',\r\n Id: 5,\r\n Group: 'Core',\r\n },\r\n {\r\n Name: 'LiveStreaming',\r\n Id: 6,\r\n Group: 'Hidden',\r\n },\r\n {\r\n Name: 'Check-In',\r\n Id: 7,\r\n Group: 'Chms',\r\n },\r\n {\r\n Name: 'Devotionals',\r\n Id: 8,\r\n Group: 'Core',\r\n },\r\n {\r\n Name: 'People',\r\n Id: 9,\r\n Group: 'Chms',\r\n },\r\n {\r\n Name: 'Calendar',\r\n Id: 10,\r\n Group: 'Core',\r\n },\r\n {\r\n Name: 'Groups',\r\n Id: 11,\r\n Group: 'Chms',\r\n },\r\n {\r\n Name: 'Interactions',\r\n Id: 12,\r\n Group: 'Chms',\r\n },\r\n {\r\n Name: 'Service Planning (Beta)',\r\n Id: 13,\r\n Group: 'Core',\r\n IsUnity: true\r\n },\r\n {\r\n Name: 'StudioC',\r\n Id: 14,\r\n Group: 'Chms',\r\n }\r\n ],\r\n MenuSubType:\r\n [\r\n {\r\n Name: 'Discover',\r\n Id: 1,\r\n },\r\n {\r\n Name: 'Sermons',\r\n Id: 2,\r\n },\r\n {\r\n Name: 'Giving',\r\n Id: 3,\r\n },\r\n {\r\n Name: 'Events',\r\n Id: 4,\r\n },\r\n {\r\n Name: 'Contact',\r\n Id: 5,\r\n },\r\n {\r\n Name: 'Check-in',\r\n Id: 7,\r\n },\r\n {\r\n Name: 'Devotionals',\r\n Id: 8,\r\n },\r\n {\r\n Name: 'People',\r\n Id: 9,\r\n },\r\n {\r\n Name: 'Calendar',\r\n Id: 10,\r\n },\r\n {\r\n Name: 'Groups',\r\n Id: 11,\r\n },\r\n {\r\n Name: 'Interactions',\r\n Id: 12,\r\n },\r\n {\r\n Name: 'Service Planning',\r\n Id: 13,\r\n },\r\n {\r\n Name: 'StudioC',\r\n Id: 14,\r\n },\r\n ],\r\n MediaType:\r\n [\r\n {\r\n Name: 'None',\r\n Id: 0,\r\n },\r\n {\r\n Name: 'YouTube',\r\n Id: 1,\r\n },\r\n {\r\n Name: 'Vimeo',\r\n Id: 2,\r\n },\r\n {\r\n Name: 'RSSPodcast',\r\n Id: 3,\r\n },\r\n {\r\n Name: 'Clover',\r\n Id: 4,\r\n },\r\n {\r\n Name: 'VimeoAPI',\r\n Id: 5,\r\n },\r\n ],\r\n ViewLayoutType:\r\n [\r\n {\r\n Name: 'List',\r\n Id: 1,\r\n },\r\n {\r\n Name: 'Grid',\r\n Id: 2,\r\n },\r\n ],\r\n ConfigErrorCode:\r\n [\r\n {\r\n ErrorCode: 'EXTERNAL_RESOURCE_ERROR',\r\n Link: '',\r\n },\r\n {\r\n ErrorCode: 'PUBLISH_FAILED',\r\n Link: '',\r\n },\r\n {\r\n ErrorCode: 'MODS_ERR_DIRECTORY_NOT_ENABLED',\r\n Link: 'modules/enable-modules',\r\n },\r\n {\r\n ErrorCode: 'MODS_ERR_DISCENABLEDSERMONOREVENTSNOT',\r\n Link: 'modules/enable-modules',\r\n },\r\n {\r\n ErrorCode: 'MODS_ERR_STREAMINGENABLEDSERMONORDISCNOT',\r\n Link: 'modules/enable-modules',\r\n },\r\n {\r\n ErrorCode: 'MODS_ERR_NOCONTACTFORM',\r\n Link: 'modules/contact',\r\n },\r\n {\r\n ErrorCode: 'MODS_ERR_NOFEATUREDEVENTFORM',\r\n Link: 'modules/events',\r\n },\r\n {\r\n ErrorCode: 'MODS_ERR_NOMODULESENABLED',\r\n Link: 'modules/enable-modules',\r\n },\r\n {\r\n ErrorCode: 'MODS_ERR_DISCENABLEDSHOWEXTRAFEAT',\r\n Link: 'modules/discover',\r\n },\r\n {\r\n ErrorCode: 'MODS_ERR_NOPRAYERREQFORM',\r\n Link: 'modules/contact',\r\n },\r\n {\r\n ErrorCode: 'MODS_ERR_NOSPECIALDONATIONFORM',\r\n Link: 'modules/giving',\r\n },\r\n {\r\n ErrorCode: 'MODS_ERR_NOGIVINGFORMSET',\r\n Link: 'modules/giving',\r\n },\r\n {\r\n ErrorCode: 'MODS_ERR_NOVALIDMEDIASOURCE',\r\n Link: 'modules/sermons',\r\n },\r\n {\r\n ErrorCode: 'MODS_ERR_NOTIFYBUTNULLNOTIFICATION',\r\n Link: 'integrations',\r\n },\r\n {\r\n ErrorCode: 'PCONF_ERR_NOCHURCHNAME',\r\n Link: 'general-info',\r\n },\r\n {\r\n ErrorCode: 'PCONF_ERR_NOVERSIONDESC',\r\n Link: 'general-info',\r\n },\r\n {\r\n ErrorCode: 'PCONF_ERR_NOVERSIONNAME',\r\n Link: 'general-info',\r\n }, {\r\n ErrorCode: 'PCONF_ERR_NOICON',\r\n Link: 'icons',\r\n },\r\n {\r\n ErrorCode: 'PCONF_ERR_NOLOGO',\r\n Link: 'logos',\r\n },\r\n {\r\n ErrorCode: 'PCONF_ERR_NOSPLASH',\r\n Link: 'splash',\r\n },\r\n {\r\n ErrorCode: 'PCONF_ERR_ADDRESSNOTVALID',\r\n Link: 'general-info',\r\n },\r\n {\r\n ErrorCode: 'MODS_ERR_NOVALIDCALENDARSOURCE',\r\n Link: 'modules/calendar',\r\n },\r\n {\r\n ErrorCode: 'MODS_ERR_CHMSFEEDONBUTNOTSELECTED',\r\n Link: 'modules/calendar',\r\n },\r\n {\r\n ErrorCode: 'MODS_ERR_CUSTOMICALURLINVALID',\r\n Link: 'modules/calendar',\r\n },\r\n {\r\n ErrorCode: 'PCONF_ERR_ADDRESSNOTCOMPLETE',\r\n Link: 'general-info',\r\n },\r\n {\r\n ErrorCode: 'MODS_ERR_PEOPLE_EMPTY',\r\n Link: 'modules/people',\r\n },\r\n {\r\n ErrorCode: 'MODS_ERR_GROUPS_EMPTY',\r\n Link: 'modules/groups',\r\n },\r\n {\r\n ErrorCode: 'PAGES_ERR_DESTINATION_FMS_NOTFOUND',\r\n Link: 'pages/pages',\r\n },\r\n {\r\n ErrorCode: 'PAGES_ERR_DESTINATION_PAGE_NOTFOUND',\r\n Link: 'pages/pages',\r\n },\r\n {\r\n ErrorCode: 'PAGES_ERR_DESTINATION_MODULE_DISABLED',\r\n Link: 'modules/enable-modules',\r\n },\r\n {\r\n ErrorCode: 'PAGE_ERR_DESTINATION_SELF',\r\n Link: 'pages/pages',\r\n },\r\n {\r\n ErrorCode: 'PAGES_ERR_MENUPAGEMISSING',\r\n Link: '',\r\n },\r\n {\r\n ErrorCode: 'PAGES_ERR_BLANKNAME',\r\n Link: 'pages/pages',\r\n },\r\n {\r\n ErrorCode: 'S_ERR_OLD_LIVESTREAMING_ACCOUNT',\r\n Link: 'integrations',\r\n },\r\n ],\r\n HelpResellerIds:\r\n [\r\n {\r\n ResellerName: 'easyTithe',\r\n ResellerCode: 51,\r\n },\r\n {\r\n ResellerName: 'ShelbyNext | Giving',\r\n ResellerCode: 52,\r\n },\r\n {\r\n ResellerName: 'Elexio Giving',\r\n ResellerCode: 50,\r\n },\r\n {\r\n ResellerName: 'Clover Give',\r\n ResellerCode: 53,\r\n },\r\n {\r\n ResellerName: 'Church Office Giving',\r\n ResellerCode: 60,\r\n },\r\n {\r\n ResellerName: 'e360 Giving',\r\n ResellerCode: 58,\r\n },\r\n {\r\n ResellerName: 'eGiving.com',\r\n ResellerCode: 56,\r\n },\r\n {\r\n ResellerName: 'FellowshipOne Giving',\r\n ResellerCode: 61,\r\n },\r\n {\r\n ResellerName: 'MoGiv',\r\n ResellerCode: 57,\r\n },\r\n {\r\n ResellerName: 'eGiving by NCS Services',\r\n ResellerCode: 55,\r\n },\r\n {\r\n ResellerName: 'ParishSOFT Giving',\r\n ResellerCode: 63,\r\n },\r\n {\r\n ResellerName: 'SimpleGive',\r\n ResellerCode: 54,\r\n },\r\n {\r\n ResellerName: 'SimpleChurch Giving',\r\n ResellerCode: 59,\r\n },\r\n {\r\n ResellerName: 'Kindrid',\r\n ResellerCode: 64,\r\n },\r\n {\r\n ResellerName: 'Sharefaith Giving',\r\n ResellerCode: 65,\r\n },\r\n {\r\n ResellerName: 'SiteOrganic Giving',\r\n ResellerCode: 66,\r\n },\r\n {\r\n ResellerName: 'Giving Help Desk',\r\n ResellerCode: 69,\r\n },\r\n {\r\n ResellerName: 'Sharefaith',\r\n ResellerCode: 65,\r\n },\r\n {\r\n ResellerName: 'Bridge Element Giving',\r\n ResellerCode: 70,\r\n },\r\n {\r\n ResellerName: 'E-zekiel Giving',\r\n ResellerCode: 71,\r\n },\r\n {\r\n ResellerName: 'Rocket Donations',\r\n ResellerCode: 72,\r\n },\r\n {\r\n ResellerName: 'Giving Base',\r\n ResellerCode: 73,\r\n },\r\n {\r\n ResellerName: 'Faith Highway Giving',\r\n ResellerCode: 74,\r\n },\r\n {\r\n ResellerName: 'Simple Tithe',\r\n ResellerCode: 75,\r\n },\r\n {\r\n ResellerName: 'eGive USA',\r\n ResellerCode: 76,\r\n },\r\n {\r\n ResellerName: 'Giving Kiosk',\r\n ResellerCode: 77,\r\n },\r\n {\r\n ResellerName: 'MinistryLinq',\r\n ResellerCode: 78,\r\n },\r\n {\r\n ResellerName: 'BlueFire Giving',\r\n ResellerCode: 79,\r\n },\r\n {\r\n ResellerName: 'EFTPlus',\r\n ResellerCode: 80,\r\n },\r\n {\r\n ResellerName: 'DonorDirect Giving',\r\n ResellerCode: 81,\r\n },\r\n {\r\n ResellerName: 'ChurchSquare',\r\n ResellerCode: 82,\r\n },\r\n {\r\n ResellerName: 'My Church Website Giving',\r\n ResellerCode: 83,\r\n },\r\n {\r\n ResellerName: 'Servant Keeper Giving',\r\n ResellerCode: 85,\r\n },\r\n {\r\n ResellerName: 'WeShare',\r\n ResellerCode: 87,\r\n },\r\n {\r\n ResellerName: 'Unity',\r\n ResellerCode: 89,\r\n },\r\n ],\r\n MenuType: [\r\n {\r\n Name: 'Module',\r\n Id: 1,\r\n },\r\n {\r\n Name: 'Pages',\r\n Id: 2,\r\n },\r\n ],\r\n ContentType: [\r\n {\r\n Name: 'Featured Sermon',\r\n Id: 101,\r\n Type: 'module',\r\n },\r\n {\r\n Name: 'Upcoming Events',\r\n Id: 100,\r\n Type: 'module',\r\n },\r\n {\r\n Name: 'Text',\r\n Id: 104,\r\n Type: 'content',\r\n },\r\n {\r\n Name: 'Banner',\r\n Id: 107,\r\n Type: 'content',\r\n },\r\n {\r\n Name: 'Video',\r\n Id: 103,\r\n Type: 'content',\r\n },\r\n {\r\n Name: 'Image & Text',\r\n Id: 105,\r\n Type: 'content',\r\n },\r\n {\r\n Name: 'LinkButton',\r\n Id: 106,\r\n Type: 'content',\r\n },\r\n {\r\n Name: 'Divider',\r\n Id: 102,\r\n Type: 'content',\r\n },\r\n ],\r\n StyleColors: {\r\n blue15: '#616B7D',\r\n grey35: '#6b6c7e',\r\n error2: '#C84040',\r\n successDark: '#3CA455',\r\n infoDark: '#176bfb',\r\n warningDark: '#E67337',\r\n white: '#FFFFFF',\r\n },\r\n IconList: [\r\n {\r\n value: 'address-book',\r\n label: 'Address, Information, Personal, Bio, User, Profile,Volunteer',\r\n },\r\n {\r\n value: 'bible',\r\n label: 'Book, Cross, Christian, Church, Fellowship, Study, Scripture, Holy, Faith, Devotional, Pray,Study,Teach,Lesson,Baptism',\r\n },\r\n {\r\n value: 'bolt',\r\n label: 'Lightning, Electric, Electricity, Activity, Dynamic, Buzz',\r\n },\r\n {\r\n value: 'book-alt',\r\n label: 'Book, Notebook, Log, Record, Page, Bible, Devotional, Study,Teach,Lesson',\r\n },\r\n {\r\n value: 'book-heart',\r\n label: 'Bible, Love, Heart, Book, Devotional, Serve,Pray,Study,Teach,Lesson,Volunteer',\r\n },\r\n {\r\n value: 'book-open',\r\n label: 'Book, Open, Bible, Notebook, Notes, History, Bulletin, Devotional, Study,Pray,Teach,Lesson',\r\n },\r\n {\r\n value: 'book-user',\r\n label: 'User, Book, Info, Personal, Details, Profile, Contact, Study,Teach,Lesson,Volunteer',\r\n },\r\n {\r\n value: 'book',\r\n label: 'Bible, Notebook, Script, Info, Contact, Address, Devotional, Study,Teach,Lesson',\r\n },\r\n {\r\n value: 'bookmark',\r\n label: 'Page, Favorite, Saved, Devotional, Study,Lesson',\r\n },\r\n {\r\n value: 'briefcase-medical',\r\n label: 'Medical, Briefcase, Cross, Health, Files, Work, Serve,Volunteer',\r\n },\r\n {\r\n value: 'briefcase',\r\n label: 'Files, Work, Serve,Volunteer',\r\n },\r\n {\r\n value: 'building',\r\n label: 'Work, School, Church, House, Office, Service',\r\n },\r\n {\r\n value: 'bullhorn',\r\n label: 'announcement, Alert, Megaphone, Broadcast',\r\n }, {\r\n value: 'calendar-alt',\r\n label: 'Calendar, Event, Date, Register, RSVP, Schedule, Volunteer,Service',\r\n },\r\n {\r\n value: 'calendar-check',\r\n label: 'Calendar, Event, Date, Check, Confirm, Register, RSVP, Schedule, Volunteer,Service',\r\n },\r\n {\r\n value: 'calendar-day',\r\n label: 'Calendar, Event, Date, Day, Register, RSVP, Schedule, Volunteer,Service',\r\n },\r\n {\r\n value: 'calendar',\r\n label: 'Calendar, Event, Date, Register, RSVP, Schedule, Volunteer,Service',\r\n },\r\n {\r\n value: 'check-circle',\r\n label: 'Checkmark, Success, Confirm, Done, Circle',\r\n },\r\n {\r\n value: 'church',\r\n label: 'Building, Sanctuary, Congregation, Worship, Christian, Pray, Parish, Cross, Steeple, Serve,Service,Baptism',\r\n },\r\n {\r\n value: 'cloud',\r\n label: 'Online, Data, Store',\r\n },\r\n {\r\n value: 'coins',\r\n label: 'Money, Currency, Serve,Giving, Tithe, Fund',\r\n },\r\n {\r\n value: 'comment-alt-dots',\r\n label: 'Comment, Chat, Message, More, Help, Dots, Ellipses, Ellipsis, Contact, Write',\r\n },\r\n {\r\n value: 'comment',\r\n label: 'Message, Chat, Help, Contact, Write',\r\n },\r\n {\r\n value: 'compass',\r\n label: 'Home, Place, Location, Discover, Serve',\r\n },\r\n {\r\n value: 'cross',\r\n label: 'Christian, Christ, Jesus, Church, Pray, Love, God, Serve,Study,Service,Baptism',\r\n },\r\n {\r\n value: 'door-open',\r\n label: 'Door, Log out, Sign out, Outreach, Serve,Service',\r\n },\r\n {\r\n value: 'envelope-open-dollar',\r\n label: 'Envelope, Message, Mail, Giving, Statement, Gift, Donation, Money, Pay, Open, Letter',\r\n },\r\n {\r\n value: 'envelope-open',\r\n label: 'Envelope, Mail, Message, Send, Receive, Letter',\r\n },\r\n {\r\n value: 'envelope',\r\n label: 'Mail, Message, Send, Receive, Letter',\r\n },\r\n {\r\n value: 'exclamation-circle',\r\n label: 'Error, Exclamation, Alert, Help, Attention',\r\n },\r\n {\r\n value: 'feather-alt',\r\n label: 'Feather, Write, Letter',\r\n },\r\n {\r\n value: 'file-alt',\r\n label: 'File, Page, Paper, Notes, Info, Contact, About, Write',\r\n },\r\n {\r\n value: 'file-user',\r\n label: 'File, Contact, Profile, Info, Address, Bio, Volunteer',\r\n },\r\n {\r\n value: 'file',\r\n label: 'Contact, Page, Notes, Info, Paper, About, Resources',\r\n },\r\n {\r\n value: 'fire-alt',\r\n label: 'Fire, Flame, New, Hot, Popular',\r\n },\r\n {\r\n value: 'fish',\r\n label: 'Christian, Faith, Hope, Religion, Church, Jesus, Serve,Pray,Baptism',\r\n },\r\n {\r\n value: 'flag',\r\n label: 'Banner, Country, Cause',\r\n },\r\n {\r\n value: 'folder',\r\n label: 'File, Info, Data, Contact, Save, Store, Resources',\r\n },\r\n {\r\n value: 'globe-americas',\r\n label: 'Globe, World, Earth, Planet, Space, Nation, Country, Serve,Volunteer',\r\n },\r\n {\r\n value: 'globe',\r\n label: 'Web, Data, Internet, Serve,Volunteer',\r\n },\r\n {\r\n value: 'guitar-electric',\r\n label: 'Guitar, Music, Worship, Ministry, Song, Ministry, Serve,Volunteer,Service',\r\n },\r\n {\r\n value: 'hand-holding-heart',\r\n label: 'Hand, Heart, Holding, Hold, Giving, Gift, Donation, Donate, Pay, Love, Serve,Volunteer',\r\n },\r\n {\r\n value: 'hand-holding-seedling',\r\n label: 'Hand, Seedling, Seed, Grow, Holding, Hold, Giving, Gift, Donation, Donate, Serve,Volunteer',\r\n },\r\n {\r\n value: 'hands-heart',\r\n label: 'Hand, Hands, Heart, Holding, Hold, Giving, Gift, Donation, Pay, Love, Serve,Volunteer',\r\n },\r\n {\r\n value: 'headphones',\r\n label: 'Listen, Earphones, Podcast, Sermons, Videos, Resources, Study,Live Stream',\r\n },\r\n {\r\n value: 'heart-circle',\r\n label: 'Heart, Circle, Love, Like, Giving, Give, Gift, Donate, Donation, Serve,Volunteer',\r\n },\r\n {\r\n value: 'heart-rate',\r\n label: 'Trending, Trend, Dynamic, Active, New, Discover, Serve,Volunteer',\r\n },\r\n {\r\n value: 'heart',\r\n label: 'Like, Love, Give, Giving, Gift, Donate, Donation, Serve,Volunteer',\r\n }, {\r\n value: 'heartbeat',\r\n label: 'Heart, New, Serve,Discover, Volunteer',\r\n },\r\n {\r\n value: 'history',\r\n label: 'Clock, Rewind, Previous, Revert, Time',\r\n }, {\r\n value: 'home-alt',\r\n label: 'Home, House, Building, Church, Class, Parish, Sanctuary, Shelter, Service',\r\n },\r\n {\r\n value: 'home-heart',\r\n label: 'Home, House, Heart, Love, Church, Parish, Sanctuary, Shelter, Serve,Service,Volunteer',\r\n },\r\n {\r\n value: 'image',\r\n label: 'Landscape, Photo, Picture, Media',\r\n },\r\n {\r\n value: 'info-circle',\r\n label: 'Info, About, Help, More',\r\n },\r\n {\r\n value: 'info-square',\r\n label: 'Info, About, Help, More, Square',\r\n },\r\n {\r\n value: 'layer-group',\r\n label: 'Layers, Group, Content, Assets, Stack',\r\n },\r\n {\r\n value: 'lightbulb',\r\n label: 'Light, Idea, New, Trending, Electric, Study,Lesson,Teach',\r\n },\r\n {\r\n value: 'link',\r\n label: 'Web, Webpage, Page, Site, Website',\r\n },\r\n {\r\n value: 'list-alt',\r\n label: 'List, Bullets, Point, Notes, Page, Info, About, Contact, Address',\r\n },\r\n {\r\n value: 'location-arrow',\r\n label: 'Place, Point, Directions, Address',\r\n },\r\n {\r\n value: 'location-circle',\r\n label: 'Place, Point, Address, Directions, Arrow',\r\n },\r\n {\r\n value: 'lock-open',\r\n label: 'Lock, Security, Protect',\r\n },\r\n {\r\n value: 'lock',\r\n label: 'Security, Protect',\r\n }, {\r\n value: 'map-marker-alt',\r\n label: 'Mark, Map, Location, Place, Directions, Address, Pin',\r\n }, {\r\n value: 'map-marker-check',\r\n label: 'Mark, Map, Location, Success, Check, Confirm, Place, Directions, Address, Pin',\r\n }, {\r\n value: 'map-marker-smile',\r\n label: 'Mark, Map, Location, Smiley, Success, Place, Directions, Address, Pin, Happy',\r\n }, {\r\n value: 'map-marker',\r\n label: 'Mark, Map, Location, Place, Directions, Address, Pin',\r\n }, {\r\n value: 'map-pin',\r\n label: 'Mark, Marker, Needle, Location, Place, Directions, Address',\r\n }, {\r\n value: 'map',\r\n label: 'Location, Place, Directions, Address, Contact',\r\n }, {\r\n value: 'medkit',\r\n label: 'Medicine, Medical, Aid, First Aid, Briefcase, Missions, Serve,Ministry, Cross, Volunteer',\r\n }, {\r\n value: 'microphone-alt',\r\n label: 'Broadcast, Sermons, Live Stream, Listen, Resources, Mic, Speak, Podcast',\r\n }, {\r\n value: 'microphone-stand',\r\n label: 'Broadcast, Sermons, Music, Worship, Live Stream, Listen, Speak, Mic, Podcast',\r\n }, {\r\n value: 'microphone',\r\n label: 'Mic, Broadcast, Live Stream, Sermons, Music, Worship, Live Stream, Listen, Speak, Podcast',\r\n }, {\r\n value: 'mobile',\r\n label: 'Phone, Contact, Profile, Info, App, iPhone, Android, Text, Messages',\r\n }, {\r\n value: 'money-check-edit',\r\n label: 'Pencil, Info, Gift, Giving, Donation, Donate, Pay, Fund',\r\n }, {\r\n value: 'mug-hot',\r\n label: 'Tea, Coffee, Water, Drink, Social, Shop, Study, Cup, Volunteer',\r\n }, {\r\n value: 'mug',\r\n label: 'Cup, Tea, Coffee, Shop, Social, Drink, Water, Study, Volunteer',\r\n }, {\r\n value: 'music',\r\n label: 'Notes, Worship, Sing, Volunteer,Service',\r\n }, {\r\n value: 'newspaper',\r\n label: 'Newsletter, News, Discover, Info, Trending, New, Home',\r\n }, {\r\n value: 'paper-plane',\r\n label: 'Message, Send, Deliver, Contact',\r\n }, {\r\n value: 'phone',\r\n label: 'Telephone, Call, Contact, Number, Info, Address, Mobile',\r\n }, {\r\n value: 'place-of-worship',\r\n label: 'Sanctuary, Building, Church, Hall, School, Steeple, Serve,Pray,Baptism,Service',\r\n }, {\r\n value: 'plug',\r\n label: 'Plugged, Electric, Engage, Serve, Ministry, Ministries, Serve,Volunteer',\r\n }, {\r\n value: 'podcast',\r\n label: 'Broadcast, Sermons, Live Stream, Listen, Resources, Teach,Lesson',\r\n }, {\r\n value: 'route',\r\n label: 'Directions, Location, Place, Contact, Map, Mark, Marker, Pin, Trip',\r\n }, {\r\n value: 'school',\r\n label: 'Clock, Time, Building, Town, Church, Schoolhouse, Serve,Teach,Lesson,Volunteer',\r\n }, {\r\n value: 'scroll',\r\n label: 'Content, Read, Events, Announcement, Info, Profile, Paper, Page, List, Discover',\r\n }, {\r\n value: 'seedling',\r\n label: 'Seed, Leaf, Leaves, Plant, Grow, Tree, New, Serve,Volunteer',\r\n }, {\r\n value: 'smile',\r\n label: 'Face, Happy, Smiley, Give, Giving, Gift,Serve, Volunteer',\r\n }, {\r\n value: 'sparkles',\r\n label: 'Stars, New, Discover, Home',\r\n }, {\r\n value: 'star-christmas',\r\n label: 'Star, Sparkles, Christmas, New, Home, Discover, Location',\r\n }, {\r\n value: 'star',\r\n label: 'New, Discover, Home',\r\n }, {\r\n value: 'stars',\r\n label: 'New, Discover, Home',\r\n }, {\r\n value: 'tennis-ball',\r\n label: 'Youth, Sports, Events, Ball',\r\n }, {\r\n value: 'tree-christmas',\r\n label: 'Holiday, Season, Advent',\r\n }, {\r\n value: 'tv',\r\n label: 'Television, Watch, Stream, Live, Videos, Sermons, Media, Screen, Resources',\r\n }, {\r\n value: 'user-alt',\r\n label: 'Profile, Individual, Info, Account, People, Person, Congregant, Group, Volunteer',\r\n }, {\r\n value: 'user-circle',\r\n label: 'Profile, Individual, Info, Account, People, Person, Congregant, Group, Contact, Volunteer',\r\n }, {\r\n value: 'user-friends',\r\n label: 'Account, Profile, People, Group, Congregant, People, Info, Contact, Volunteer',\r\n }, {\r\n value: 'user',\r\n label: 'Profile, Individual, Info, Account, People, Person, Congregant, Group, Contact, Volunteer',\r\n }, {\r\n value: 'users-medical',\r\n label: 'Profile, Add, Individual, Info, Account, People, Group, Person, Family, Contact, Congregant, Aid, Volunteer',\r\n }, {\r\n value: 'users',\r\n label: 'Profile, Individual, Info, Account, People, Person, Congregant, Group, Congregation, Contact, Volunteer',\r\n }, {\r\n value: 'video',\r\n label: 'Live, Stream, Watch, Sermons, Resources, Media, Record, Service',\r\n }, {\r\n value: 'volume-down',\r\n label: 'Speaker, Listen, Sermons, Announce, Broadcast, Resources, Contact, Message, Media, Live, Stream',\r\n }, {\r\n value: 'wallet',\r\n label: 'Payment, Money, Give, Giving, Gift, Donate, Donations',\r\n }, {\r\n value: 'waveform-path',\r\n label: 'Sound, New, Discover, Hot, Home, Buzz, News',\r\n }, {\r\n value: 'waveform',\r\n label: 'Sound, New, Discover, Hot, Home, Buzz, News',\r\n }, {\r\n value: 'window-alt',\r\n label: 'Web, Webpage, Page, Screen, Website, Computer, Media, Internet',\r\n },\r\n {\r\n value: 'people-arrows',\r\n label: 'Interactions',\r\n },\r\n {\r\n value: 'map-marker-alt',\r\n label: 'Check-in'\r\n },\r\n {\r\n value: 'clipboard-list-check',\r\n label: 'Service Planning',\r\n },\r\n {\r\n value: 'school',\r\n label: 'StudioC',\r\n }\r\n ],\r\n};\r\nexport default constants;\r\n","import axios from 'axios';\r\nimport * as types from './actionTypes';\r\n\r\nexport function getFlags(orgId) {\r\n return function (dispatch) {\r\n dispatch({ type: types.GET_FLAGS_PENDING });\r\n return axios\r\n .get(`${window.GENESIS_CMS_API_URL}/v2/organizations/${orgId}/features`)\r\n .then((response) => {\r\n // response.data.data.analytics = false;\r\n dispatch({\r\n type: types.GET_FLAGS_SUCCESS,\r\n payload: response.data.data,\r\n });\r\n })\r\n .catch((error) => {\r\n dispatch({\r\n type: types.GET_FLAGS_FAILED,\r\n payload: error,\r\n });\r\n });\r\n };\r\n}\r\n","import axios from 'axios';\r\nimport * as types from './actionTypes';\r\nimport { handleError } from '../errors/handleError';\r\n\r\nexport function errorHandler(dispatch, error, type) {\r\n const errorMessage = handleError(error, true);\r\n\r\n dispatch({\r\n type,\r\n error: errorMessage,\r\n });\r\n}\r\n\r\nexport function searchStreams(term) {\r\n return function (dispatch) {\r\n if (term !== '') {\r\n dispatch({\r\n type: types.SEARCH_STREAMS_PENDING,\r\n });\r\n return axios({\r\n url: `${window.GENESIS_CMS_API_URL}/v2/livestreams/search?email=${encodeURIComponent(term)}`,\r\n headers: {\r\n Accept: 'application/json',\r\n },\r\n method: 'GET',\r\n })\r\n .then((response) => {\r\n dispatch({\r\n type: types.SEARCH_STREAMS_SUCCESS,\r\n payload: response.data.data,\r\n });\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.SEARCH_STREAMS_FAILED);\r\n });\r\n }\r\n return '';\r\n };\r\n}\r\n\r\nexport function checkShareFaithEmail(email) {\r\n return function (dispatch) {\r\n if (email !== '') {\r\n dispatch({\r\n type: types.CHECK_SF_EMAIL_PENDING,\r\n });\r\n return axios({\r\n url: `${window.GENESIS_CMS_API_URL}/v2/devotionals/memberId/?email=${encodeURIComponent(email)}`,\r\n method: 'GET',\r\n headers: {\r\n Accept: 'application/json',\r\n },\r\n })\r\n .then((response) => {\r\n dispatch({\r\n type: types.CHECK_SF_EMAIL_SUCCESS,\r\n payload: response.data.data,\r\n });\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.CHECK_SF_EMAIL_FAILED);\r\n });\r\n }\r\n return '';\r\n };\r\n}\r\n","import axios from 'axios';\r\nimport * as types from './actionTypes';\r\nimport { handleError } from '../errors/handleError';\r\n\r\nexport function errorHandler(dispatch, error, type) {\r\n const errorMessage = handleError(error);\r\n\r\n dispatch({\r\n type,\r\n error: errorMessage,\r\n });\r\n}\r\n\r\nexport function changeProjects() {\r\n return {\r\n type: types.CHANGE_PROJECTS,\r\n };\r\n}\r\n\r\nexport function getProject(projectId) {\r\n return function (dispatch) {\r\n dispatch({ type: types.GET_PROJECT_PENDING });\r\n return axios\r\n .get(`${window.GENESIS_CMS_API_URL}/v2/projects/${projectId}/project?sessionId=${localStorage.getItem('SessionId')}&token=${localStorage.getItem('AuthToken')}`)\r\n .then((response) => {\r\n dispatch({\r\n type: types.GET_PROJECT_SUCCESS,\r\n payload: response.data.data,\r\n });\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.GET_PROJECT_FAILED);\r\n });\r\n };\r\n}\r\n\r\nexport function getLiveProjectConfig(cid) {\r\n return function (dispatch) {\r\n return axios\r\n .get(`${window.GENESIS_CMS_API_URL}/v2/projects/config?cid=${cid}&forCMS=true`)\r\n .then((response) => {\r\n dispatch({\r\n type: types.GET_LIVE_CONFIG,\r\n payload: response.data.data,\r\n });\r\n })\r\n .catch(() => {\r\n });\r\n };\r\n}\r\n\r\nexport function getProjects() {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.GET_PROJECTS_PENDING,\r\n });\r\n return axios\r\n .get(`${window.GENESIS_CMS_API_URL}/v2/projects`, {\r\n params: {\r\n sessionId: localStorage.getItem('SessionId'),\r\n token: localStorage.getItem('AuthToken'),\r\n includeLatestVersion: true,\r\n },\r\n })\r\n .then((response) => {\r\n dispatch({\r\n type: types.GET_PROJECTS_SUCCESS,\r\n payload: response.data.data,\r\n });\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.GET_PROJECTS_FAILED);\r\n });\r\n };\r\n}\r\n\r\nexport function createProject(name, isUnity) {\r\n let projData = {projectName: name, isUnity: isUnity}; \r\n\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.CREATE_PROJECT_PENDING,\r\n });\r\n const createProjectInApi = () => {\r\n return axios({\r\n url: `${window.GENESIS_CMS_API_URL}/v2/projects/create?sessionId=${localStorage.getItem('SessionId')}&token=${localStorage.getItem('AuthToken')}`,\r\n data: projData,\r\n method: 'PUT',\r\n headers: {'Content-Type': 'application/json'},\r\n });\r\n };\r\n\r\n const dispatchProjectAction = (response) => {\r\n dispatch({\r\n type: types.CREATE_PROJECT_SUCCESS,\r\n payload: {\r\n data: response.data.data,\r\n ids: {\r\n newProjectId: response.data.data.id,\r\n },\r\n },\r\n });\r\n };\r\n\r\n const handleErrorFn = (error) => {\r\n errorHandler(dispatch, error.response, types.CREATE_PROJECT_FAILED);\r\n };\r\n\r\n return createProjectInApi()\r\n .then(dispatchProjectAction)\r\n .catch(handleErrorFn);\r\n };\r\n}\r\n","import axios from 'axios'; // eslint-disable-line\r\n\r\nexport const checkProjectConfig = (projectId) => { return axios.get(`${window.GENESIS_CMS_API_URL}/v2/projects/${projectId}/checklatest?sessionId=${localStorage.getItem('SessionId')}&token=${localStorage.getItem('AuthToken')}`); };\r\n\r\nexport const publishProject = (projectId) => {\r\n return axios({\r\n method: 'PUT',\r\n url: `${window.GENESIS_CMS_API_URL}/v2/projects/${projectId}/versions/publishVersion/latest?sessionId=${localStorage.getItem('SessionId')}&token=${localStorage.getItem('AuthToken')}`,\r\n });\r\n};\r\n","import thunk from 'redux-thunk';\r\nimport * as types from './actionTypes';\r\nimport { handleError } from '../errors/handleError';\r\nimport * as projectConfigApi from '../apis/ProjectConfigApi';\r\n\r\nexport function errorHandler(dispatch, error, type) {\r\n const errorMessage = handleError(error);\r\n\r\n dispatch({\r\n type,\r\n error: errorMessage,\r\n });\r\n}\r\n\r\nexport function checkProjectConfig(projectId) {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.CHECK_PROJECT_CONFIG_PENDING,\r\n });\r\n return projectConfigApi.checkProjectConfig(projectId)\r\n .then((response) => {\r\n dispatch({\r\n type: types.CHECK_PROJECT_CONFIG_SUCCESS,\r\n payload: response.data.data,\r\n });\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.CHECK_PROJECT_CONFIG_FAILED);\r\n });\r\n };\r\n}\r\n","import thunk from 'redux-thunk';\r\nimport axios from 'axios';\r\nimport * as types from './actionTypes';\r\nimport { handleError } from '../errors/handleError';\r\nimport i18n from '../i18n';\r\nimport { addAlert } from './alertActions';\r\n\r\nexport function errorHandler(dispatch, error, type) {\r\n let errorMessage = '';\r\n if (error?.status === 401 || error?.status === 400) {\r\n dispatch(addAlert({\r\n message: i18n.t('vimeo.invalid-code'),\r\n view: '/modules/sermons',\r\n type: 'error',\r\n id: 'invalid-login',\r\n dismissable: true,\r\n }));\r\n } else {\r\n errorMessage = handleError(error);\r\n }\r\n dispatch({\r\n type,\r\n error: errorMessage,\r\n });\r\n\r\n const clearError = () => {\r\n dispatch({\r\n type,\r\n error: '',\r\n });\r\n };\r\n\r\n setTimeout(clearError, 3000);\r\n}\r\n\r\nexport function getVimeoToken(code, projectId, redirect) {\r\n return function (dispatch) {\r\n return axios\r\n .put(`${window.GENESIS_CMS_API_URL}/v2/vimeo/${projectId}/getToken?token=${window.genesisToken()}&code=${code}&redirect=${redirect}&sessionId=${localStorage.getItem('SessionId')}`)\r\n\r\n .then((response) => {\r\n dispatch({\r\n type: types.GET_PROJECT_VERSION_SUCCESS,\r\n payload: response.data.data,\r\n });\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.GET_VIMEO_FEED_TOKEN);\r\n });\r\n };\r\n}\r\n\r\nexport function getVimeoFeeds(token) {\r\n return function (dispatch) {\r\n // get all albums https://api.vimeo.com/me/albums?fields=name,uri\r\n // get all channels https://api.vimeo.com/me/channels?filter=moderated&fields=name,uri\r\n // get all portfolios. Using this adds to QA load so this is staying commented out https://api.vimeo.com/me/portfolios?fields=name,uri\r\n // all uploaded videos will live at https://api.vimeo.com/me/videos - we do not need to make a request to know this\r\n\r\n let retObj = [];\r\n retObj.push({\r\n uri: '/me',\r\n name: 'All uploaded videos',\r\n });\r\n\r\n const getChannels = () => {\r\n return axios({\r\n method: 'GET',\r\n url: 'https://api.vimeo.com/me/channels?filter=moderated&fields=name,uri',\r\n headers: {\r\n Authorization: `Bearer ${token}`,\r\n 'content-type': 'application/json',\r\n Accept: 'application/vnd.vimeo.*+json;version=3.4',\r\n },\r\n })\r\n .then((response) => {\r\n retObj = retObj.concat(response.data.data);\r\n });\r\n };\r\n const getShowcases = () => {\r\n return axios({\r\n method: 'GET',\r\n url: 'https://api.vimeo.com/me/albums?fields=name,uri',\r\n headers: {\r\n Authorization: `Bearer ${token}`,\r\n 'content-type': 'application/json',\r\n Accept: 'application/vnd.vimeo.*+json;version=3.4',\r\n },\r\n })\r\n .then((response) => {\r\n retObj = retObj.concat(response.data.data);\r\n dispatch({\r\n type: types.GET_VIMEO_FEEDS_LIST_SUCCESS,\r\n payload: {\r\n data: retObj,\r\n },\r\n });\r\n });\r\n };\r\n const handleErrorFn = (error) => {\r\n errorHandler(dispatch, error.response, types.GET_VIMEO_FEEDS_LIST_FAILED);\r\n };\r\n\r\n return getChannels()\r\n // .then(getPortfolios)\r\n .then(getShowcases)\r\n .catch(handleErrorFn);\r\n };\r\n}\r\n","import axios from 'axios'; // eslint-disable-line\r\n\r\nexport const updateProjectVersionViaApi = (projectVersionModel, projectId) => {\r\n return axios({\r\n url: `${window.GENESIS_CMS_API_URL}/v2/projects/${projectId}/updatelatest?sessionId=${localStorage.getItem('SessionId')}&token=${localStorage.getItem('AuthToken')}`,\r\n data: projectVersionModel,\r\n method: 'PUT',\r\n });\r\n};\r\n\r\nexport const getLatestProjectVersionViaApi = (projectId) => { return axios.get(`${window.GENESIS_CMS_API_URL}/v2/projects/${projectId}/versions/latest?sessionId=${localStorage.getItem('SessionId')}&token=${localStorage.getItem('AuthToken')}`); };\r\n\r\nexport const deleteProjectViaApi = (projectId) => {\r\n return axios.delete(`${window.GENESIS_CMS_API_URL}/v2/projects/${projectId}`, {\r\n params: {\r\n sessionId: localStorage.getItem('SessionId'),\r\n token: localStorage.getItem('AuthToken'),\r\n },\r\n });\r\n};\r\n","import axios from 'axios'; \r\n\r\n\r\nexport const getMedia = (projectId) => {\r\n return axios\r\n .get(`${window.GENESIS_CMS_API_URL}/v2/projects/${projectId}/latestmedia`);\r\n};\r\n","import axios from 'axios';\r\nimport * as types from './actionTypes';\r\nimport { handleError } from '../errors/handleError';\r\nimport { checkProjectConfig } from './projectConfigActions';\r\n\r\nexport function errorHandler(dispatch, error, type) {\r\n const errorMessage = handleError(error);\r\n\r\n dispatch({\r\n type,\r\n error: errorMessage,\r\n });\r\n}\r\n\r\nexport function getProjectVersionMenuItems(projectId) {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.GET_PROJECT_VERSION_MENUITEMS_PENDING,\r\n });\r\n return axios.get(`${window.GENESIS_CMS_API_URL}/v3/menu/${projectId}/menus/latest?sessionId=${localStorage.getItem('SessionId')}&token=${localStorage.getItem('AuthToken')}`)\r\n .then((response) => {\r\n dispatch({\r\n type: types.GET_PROJECT_VERSION_MENUITEMS_SUCCESS,\r\n payload: response.data,\r\n });\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.GET_PROJECT_VERSION_MENUITEMS_FAILED);\r\n });\r\n };\r\n}\r\n\r\nexport function updateMenuItemParameter(projectId, subTypeId, menu, field, value) {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.UPDATE_MENUITEM_PARAMETER_PENDING,\r\n });\r\n return axios.put(\r\n `${window.GENESIS_CMS_API_URL}/v3/menu/${projectId}/menuItem/latestsingle?sessionId=${localStorage.getItem('SessionId')}&menuSubTypeId=${subTypeId}&menuTypeId=${menu}&token=${localStorage.getItem('AuthToken')}`,\r\n {\r\n parameterName: field,\r\n parameterValue: value,\r\n },\r\n )\r\n .then((response) => {\r\n return Promise.all([\r\n dispatch({\r\n type: types.UPDATE_MENUITEM_PARAMETER_SUCCESS,\r\n payload: response.data,\r\n }),\r\n dispatch(getProjectVersionMenuItems(projectId)),\r\n dispatch(checkProjectConfig(projectId)),\r\n dispatch({\r\n type: types.SHOW_NOTIFICATION,\r\n }),\r\n setTimeout(() => {\r\n dispatch({ type: types.HIDE_NOTIFICATION });\r\n }, 7000),\r\n ]);\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.UPDATE_MENUITEM_PARAMETER_FAILED);\r\n });\r\n };\r\n}\r\n\r\nexport function bulkUpdateMenuItems(projectId, menuItems) {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.UPDATE_MENUITEMS_PENDING,\r\n });\r\n return axios({\r\n url: `${window.GENESIS_CMS_API_URL}/v3/menu/${projectId}/menulatest?sessionId=${localStorage.getItem('SessionId')}&token=${localStorage.getItem('AuthToken')}`,\r\n data: menuItems,\r\n method: 'PUT',\r\n })\r\n .then((response) => {\r\n return Promise.all([\r\n dispatch({\r\n type: types.UPDATE_MENUITEMS_SUCCESS,\r\n payload: response.data,\r\n }),\r\n dispatch(checkProjectConfig(projectId)),\r\n dispatch({\r\n type: types.SHOW_NOTIFICATION,\r\n }),\r\n setTimeout(() => {\r\n dispatch({ type: types.HIDE_NOTIFICATION });\r\n }, 7000),\r\n ]);\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.UPDATE_MENUITEMS_FAILED);\r\n });\r\n };\r\n}\r\n","import axios from 'axios';\r\nimport * as types from './actionTypes';\r\nimport { handleError } from '../errors/handleError';\r\nimport i18n from '../i18n';\r\nimport { addAlert } from './alertActions';\r\nimport { checkProjectConfig } from './projectConfigActions';\r\nimport { getProjectVersionMenuItems } from './menuItemActions';\r\n\r\nexport function errorHandler(dispatch, error, type) {\r\n const errorMessage = handleError(error);\r\n\r\n dispatch({\r\n type,\r\n error: errorMessage,\r\n });\r\n}\r\n\r\nexport function getPagesforDropdown(projectId) {\r\n const token = window.genesisToken();\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.GET_PROJECT_PAGES_DROPDOWN_PENDING,\r\n });\r\n return axios.get(`${window.GENESIS_CMS_API_URL}/v3/pages/${projectId}/latest?includeModules=true&token=${token}&sessionId=${localStorage.getItem('SessionId')}`)\r\n .then((response) => {\r\n dispatch({\r\n type: types.GET_PROJECT_PAGES_DROPDOWN_SUCCESS,\r\n payload: response.data,\r\n });\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.GET_PROJECT_PAGES_DROPDOWN_FAILED);\r\n });\r\n };\r\n}\r\n\r\nexport function getPagesforProject(projectId, skipDropdown = false) {\r\n const token = window.genesisToken();\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.GET_PROJECT_PAGES_PENDING,\r\n });\r\n return axios.get(`${window.GENESIS_CMS_API_URL}/v3/pages/${projectId}/latest?token=${token}&sessionId=${localStorage.getItem('SessionId')}`)\r\n .then((response) => {\r\n if (skipDropdown === false) dispatch(getPagesforDropdown(projectId));\r\n dispatch({\r\n type: types.GET_PROJECT_PAGES_SUCCESS,\r\n payload: response.data,\r\n });\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.GET_PROJECT_PAGES_FAILED);\r\n });\r\n };\r\n}\r\n\r\nexport function addContentSectionToPage(pageId, projectId) {\r\n const token = window.genesisToken();\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.ADD_CONTENT_SECTION_PENDING,\r\n });\r\n return axios({\r\n url: `${window.GENESIS_CMS_API_URL}/v3/sections?token=${token}&sessionId=${localStorage.getItem('SessionId')}`,\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n },\r\n data: { pageId },\r\n method: 'POST',\r\n })\r\n .then((response) => {\r\n dispatch({\r\n type: types.ADD_CONTENT_SECTION_SUCCESS,\r\n payload: response.data.data,\r\n });\r\n dispatch(getPagesforProject(projectId));\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.ADD_CONTENT_SECTION_FAILED);\r\n });\r\n };\r\n}\r\n\r\nexport function reorderPageSections(pageId, projectId, sections) {\r\n const token = window.genesisToken();\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.REORDER_SECTIONS_PENDING,\r\n });\r\n return axios({\r\n url: `${window.GENESIS_CMS_API_URL}/v3/pages/${pageId}/reorder?token=${token}&sessionId=${localStorage.getItem('SessionId')}`,\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n },\r\n data: { id: pageId, contentSections: sections },\r\n method: 'POST',\r\n })\r\n .then((response) => {\r\n dispatch({\r\n type: types.REORDER_SECTIONS_SUCCESS,\r\n payload: response.data.data,\r\n });\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.REORDER_SECTIONS_FAILED);\r\n });\r\n };\r\n}\r\n\r\nexport function deleteContentSection(sectionId, projectId) {\r\n const token = window.genesisToken();\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.DELETE_CONTENT_SECTION_PENDING,\r\n });\r\n return axios.delete(`${window.GENESIS_CMS_API_URL}/v3/sections/${sectionId}?token=${token}&sessionId=${localStorage.getItem('SessionId')}`)\r\n .then((response) => {\r\n dispatch({\r\n type: types.DELETE_CONTENT_SECTION_SUCCESS,\r\n payload: response.data,\r\n });\r\n dispatch(addAlert({\r\n message: i18n.t('content.delete-content-section'),\r\n global: true,\r\n type: 'info',\r\n id: `delete-content-section-${sectionId}`,\r\n dismissable: true,\r\n }));\r\n dispatch(getPagesforProject(projectId));\r\n dispatch(checkProjectConfig(projectId));\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.DELETE_CONTENT_SECTION_FAILED);\r\n });\r\n };\r\n}\r\n\r\nexport function updateContentSection(section, projectId) {\r\n const token = window.genesisToken();\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.UPDATE_CONTENT_SECTION_PENDING,\r\n });\r\n return axios.put(`${window.GENESIS_CMS_API_URL}/v3/sections/?token=${token}&sessionId=${localStorage.getItem('SessionId')}`, section)\r\n .then((response) => {\r\n dispatch({\r\n type: types.UPDATE_CONTENT_SECTION_SUCCESS,\r\n payload: response.data,\r\n });\r\n dispatch(getPagesforProject(projectId));\r\n dispatch(checkProjectConfig(projectId));\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.UPDATE_CONTENT_SECTION_FAILED);\r\n });\r\n };\r\n}\r\n\r\nexport function addContentToSection(contentObject, projectId) {\r\n const token = window.genesisToken();\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.ADD_CONTENT_PENDING,\r\n });\r\n return axios({\r\n url: `${window.GENESIS_CMS_API_URL}/v3/content?token=${token}&sessionId=${localStorage.getItem('SessionId')}`,\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n },\r\n data: contentObject,\r\n method: 'POST',\r\n })\r\n .then((response) => {\r\n dispatch({\r\n type: types.ADD_CONTENT_SUCCESS,\r\n payload: response.data.data,\r\n });\r\n dispatch(checkProjectConfig(projectId));\r\n if (contentObject.tapType && contentObject.tapType === 5) {\r\n dispatch(addAlert({\r\n message: i18n.t('content.page-added'),\r\n global: true,\r\n type: 'success',\r\n id: `page-added-${response.data.data.id}`,\r\n dismissable: true,\r\n }));\r\n }\r\n dispatch(getPagesforProject(projectId));\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.ADD_CONTENT_FAILED);\r\n });\r\n };\r\n}\r\n\r\nexport function updateContent(contentObject, projectId) {\r\n const token = window.genesisToken();\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.UPDATE_CONTENT_PENDING,\r\n });\r\n return axios.put(`${window.GENESIS_CMS_API_URL}/v3/content/?token=${token}&sessionId=${localStorage.getItem('SessionId')}`, contentObject)\r\n .then((response) => {\r\n dispatch({\r\n type: types.UPDATE_CONTENT_SUCCESS,\r\n payload: response.data,\r\n });\r\n dispatch(checkProjectConfig(projectId));\r\n if (contentObject.tapType && contentObject.tapType === 5) {\r\n dispatch(addAlert({\r\n message: i18n.t('content.page-added'),\r\n global: true,\r\n type: 'success',\r\n id: `page-added-${response.data.data.id}`,\r\n dismissable: true,\r\n }));\r\n }\r\n dispatch(getPagesforProject(projectId));\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.UPDATE_CONTENT_FAILED);\r\n });\r\n };\r\n}\r\n\r\nexport function deleteContent(contentId, projectId) {\r\n const token = window.genesisToken();\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.DELETE_CONTENT_PENDING,\r\n });\r\n return axios.delete(`${window.GENESIS_CMS_API_URL}/v3/content/${contentId}?token=${token}&sessionId=${localStorage.getItem('SessionId')}`)\r\n .then((response) => {\r\n dispatch({\r\n type: types.DELETE_CONTENT_SUCCESS,\r\n payload: response.data,\r\n });\r\n dispatch(getPagesforProject(projectId));\r\n dispatch(checkProjectConfig(projectId));\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.DELETE_CONTENT_FAILED);\r\n });\r\n };\r\n}\r\n\r\nexport function deletePage(pageId, pageName, projectId) {\r\n const token = window.genesisToken();\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.DELETE_PAGE_PENDING,\r\n });\r\n return axios.delete(`${window.GENESIS_CMS_API_URL}/v3/pages/${pageId}?token=${token}&sessionId=${localStorage.getItem('SessionId')}`)\r\n .then((response) => {\r\n dispatch({\r\n type: types.DELETE_PAGE_SUCCESS,\r\n payload: response.data,\r\n });\r\n dispatch(checkProjectConfig(projectId));\r\n dispatch(addAlert({\r\n message: `'${pageName}' ${i18n.t('hasBeenDeleted')}`,\r\n // view: '/pages/pages',\r\n global: true,\r\n type: 'info',\r\n id: `delete-page-success-${pageId}`,\r\n dismissable: true,\r\n }));\r\n dispatch(getPagesforProject(projectId));\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.DELETE_PAGE_FAILED);\r\n });\r\n };\r\n}\r\n\r\nexport function addPage(page, projectId, icon, showAlert = false) {\r\n const token = window.genesisToken();\r\n page.icon = icon;\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.ADD_PAGE_PENDING,\r\n });\r\n return axios({\r\n url: `${window.GENESIS_CMS_API_URL}/v3/pages?token=${token}&sessionId=${localStorage.getItem('SessionId')}`,\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n },\r\n data: page,\r\n method: 'POST',\r\n })\r\n .then((response) => {\r\n dispatch({\r\n type: types.ADD_PAGE_SUCCESS,\r\n payload: response.data.data,\r\n });\r\n if (icon !== null) {\r\n dispatch(getProjectVersionMenuItems(projectId));\r\n }\r\n if (showAlert === true) {\r\n dispatch(addAlert({\r\n message: i18n.t('content.page-added'),\r\n global: true,\r\n type: 'success',\r\n id: `page-added-${response.data.data.id}`,\r\n dismissable: true,\r\n }));\r\n } else if (response.data.data.menuItemAdded) {\r\n dispatch(addAlert({\r\n message: `'${response.data.data.name.length > 12 ? response.data.data.name.substring(0, 12) : response.data.data.name}' ${i18n.t('content.page-added-with-menu')}`,\r\n global: true,\r\n type: 'success',\r\n id: `page-added-with-menu-${response.data.data.id}`,\r\n dismissable: true,\r\n }));\r\n }\r\n dispatch(getPagesforProject(projectId));\r\n dispatch(checkProjectConfig(projectId));\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.ADD_PAGE_FAILED);\r\n });\r\n };\r\n}\r\n\r\nexport function updatePage(page, projectId) {\r\n const token = window.genesisToken();\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.UPDATE_PAGE_PENDING,\r\n });\r\n return axios.put(`${window.GENESIS_CMS_API_URL}/v3/pages/?token=${token}&sessionId=${localStorage.getItem('SessionId')}`, page)\r\n .then((response) => {\r\n dispatch({\r\n type: types.UPDATE_PAGE_SUCCESS,\r\n payload: response.data,\r\n });\r\n if (response.data.data.menuItemRemoved) {\r\n dispatch(addAlert({\r\n message: `'${page.name}' ${i18n.t('content.page-edited-with-removed-menu')}`,\r\n global: true,\r\n type: 'success',\r\n id: `page-edit-menu-${response.data.data.id}`,\r\n dismissable: true,\r\n }));\r\n } else if (response.data.data.menuItemAdded) {\r\n dispatch(addAlert({\r\n message: `'${page.name}' ${i18n.t('content.page-added-with-menu')}`,\r\n global: true,\r\n type: 'success',\r\n id: `page-edit-without-menu-${response.data.data.id}`,\r\n dismissable: true,\r\n }));\r\n }\r\n dispatch(getPagesforProject(projectId));\r\n dispatch(checkProjectConfig(projectId));\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.UPDATE_PAGE_FAILED);\r\n });\r\n };\r\n}\r\n","import thunk from 'redux-thunk';\r\nimport axios from 'axios';\r\nimport * as types from './actionTypes';\r\nimport { handleError } from '../errors/handleError';\r\nimport * as projectVersionApi from '../apis/ProjectVersionApi';\r\nimport * as projectConfigApi from '../apis/ProjectConfigApi';\r\nimport { getMedia } from '../apis/MediaApi';\r\nimport { addAlert, clearAlert } from './alertActions';\r\nimport { getLiveProjectConfig, getProjects } from './projectActions';\r\nimport { checkProjectConfig } from './projectConfigActions';\r\nimport { getPagesforProject } from './contentActions';\r\nimport { getProjectVersionMenuItems } from './menuItemActions';\r\n\r\nexport function errorHandler(dispatch, error, type) {\r\n const errorMessage = handleError(error);\r\n\r\n dispatch({\r\n type,\r\n error: errorMessage,\r\n });\r\n}\r\n\r\nexport function getProjectVersion(projectId) {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.GET_PROJECT_VERSION_PENDING,\r\n });\r\n return projectVersionApi.getLatestProjectVersionViaApi(projectId)\r\n .then((response) => {\r\n return Promise.all([dispatch({\r\n type: types.GET_PROJECT_VERSION_SUCCESS,\r\n payload: response.data.data,\r\n }), dispatch(checkProjectConfig(projectId))]);\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.GET_PROJECT_VERSION_FAILED);\r\n });\r\n };\r\n}\r\nexport function updateProjectVersion(projectId, projectVersionModel) {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.UPDATE_PROJECT_VERSION_PENDING,\r\n });\r\n return projectVersionApi.updateProjectVersionViaApi(projectVersionModel, projectId)\r\n .then((response) => {\r\n return Promise.all([\r\n dispatch({\r\n type: types.UPDATE_PROJECT_VERSION_SUCCESS,\r\n payload: response.data.data,\r\n }),\r\n dispatch(checkProjectConfig(projectId)),\r\n dispatch({\r\n type: types.SHOW_NOTIFICATION,\r\n }),\r\n setTimeout(() => {\r\n dispatch({ type: types.HIDE_NOTIFICATION });\r\n }, 7000)]);\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.UPDATE_PROJECT_VERSION_FAILED);\r\n });\r\n };\r\n}\r\n\r\nexport function updateProjectVersionForSermonDisconnect(projectId, projectVersionModel) {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.DISCONNECT_MEDIA_PENDING,\r\n });\r\n return dispatch(updateProjectVersion(projectId, projectVersionModel))\r\n .then(() => {\r\n return dispatch({\r\n type: types.DISCONNECT_MEDIA_SUCCESS,\r\n });\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.DISCONNECT_MEDIA_FAILED);\r\n });\r\n };\r\n}\r\n\r\nexport function updateProjectVersionbyParameter(projectId, parameterName, parameterValue) {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.UPDATE_PROJECT_VERSION_PARAMETER_PENDING,\r\n });\r\n return axios.put(`${window.GENESIS_CMS_API_URL}/v2/projects/${projectId}/singlelatest?sessionId=${localStorage.getItem('SessionId')}&token=${localStorage.getItem('AuthToken')}`, {\r\n parameterName,\r\n parameterValue,\r\n })\r\n .then((response) => {\r\n return Promise.all([\r\n dispatch({\r\n type: types.UPDATE_PROJECT_VERSION_PARAMETER_SUCCESS,\r\n payload: response.data.data,\r\n }),\r\n dispatch(checkProjectConfig(projectId)),\r\n dispatch({\r\n type: types.SHOW_NOTIFICATION,\r\n }),\r\n setTimeout(() => {\r\n dispatch({ type: types.HIDE_NOTIFICATION });\r\n }, 7000),\r\n ]);\r\n })\r\n .catch((response) => {\r\n errorHandler(\r\n dispatch,\r\n response.response,\r\n types.UPDATE_PROJECT_VERSION_PARAMETER_FAILED,\r\n );\r\n });\r\n };\r\n}\r\n\r\nexport function togglePreviewShown(currentState) {\r\n return {\r\n type: types.TOGGLE_PREVIEW_SHOWN,\r\n payload: !currentState,\r\n };\r\n}\r\n\r\nexport function updateProjectVersionWithMedia(projectId, projectVersionIn) {\r\n return function (dispatch) {\r\n let projectVersionModel = projectVersionIn;\r\n dispatch({\r\n type: types.UPDATE_PROJECT_VERSION_PENDING,\r\n });\r\n\r\n if (projectVersionModel.mediaType !== 4 && projectVersionModel.cloverAccountProduct) {\r\n projectVersionModel.cloverAccountProduct = '';\r\n projectVersionModel.cloverAccountEmail = '';\r\n }\r\n let version = {};\r\n let media = {};\r\n\r\n const storeUpdatedVersion = (response) => {\r\n version = response.data.data;\r\n };\r\n\r\n const throwMediaError = (err) => {\r\n let error = err;\r\n dispatch({\r\n type: types.GET_PROJECT_VERSION_FAILED,\r\n });\r\n dispatch({\r\n type: types.GET_PROJECT_MEDIA_FAILED,\r\n });\r\n if (typeof error !== 'string') {\r\n error = error.message;\r\n }\r\n dispatch(addAlert({\r\n message: error,\r\n view: '/modules/sermons',\r\n type: 'error',\r\n dismissable: true,\r\n id: 'sermon-media-invalid',\r\n }));\r\n };\r\n\r\n const getMediaForVersion = () => {\r\n return new Promise((resolve, reject) => {\r\n dispatch({\r\n type: types.GET_PROJECT_MEDIA_PENDING,\r\n });\r\n\r\n function handleError(error) {\r\n if (version.mediaUrl) {\r\n dispatch({\r\n type: types.GET_PROJECT_MEDIA_FAILED,\r\n });\r\n throwMediaError(error);\r\n resolve(error);\r\n } else {\r\n reject(error);\r\n }\r\n }\r\n\r\n function checkMedia(response) {\r\n media = response.data.data;\r\n if (typeof version === 'string') {\r\n handleError(version);\r\n } else {\r\n resolve(media);\r\n dispatch(clearAlert('sermon-media-invalid'));\r\n }\r\n }\r\n\r\n return getMedia(projectId)\r\n .then(checkMedia)\r\n .catch(handleError);\r\n });\r\n };\r\n\r\n const handleErrorForProjectVersion = (error) => {\r\n throwMediaError(error);\r\n };\r\n\r\n const returnAllObjects = () => {\r\n dispatch({\r\n type: types.UPDATE_PROJECT_VERSION_SUCCESS,\r\n payload: version,\r\n });\r\n dispatch(checkProjectConfig(projectId));\r\n dispatch({\r\n type: types.CLEAR_CLOVER_OBJECTS,\r\n });\r\n dispatch({\r\n type: types.GET_PROJECT_MEDIA_SUCCESS,\r\n payload: media,\r\n });\r\n };\r\n\r\n return projectVersionApi\r\n .updateProjectVersionViaApi(projectVersionModel, projectId)\r\n .then(storeUpdatedVersion)\r\n .then(getMediaForVersion)\r\n .then(returnAllObjects)\r\n .catch(handleErrorForProjectVersion);\r\n };\r\n}\r\n\r\nexport function deleteProjectVersion(projectId) {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.DELETE_PROJECT_VERSION_PENDING,\r\n });\r\n return projectVersionApi.deleteProjectViaApi(projectId)\r\n .then(() => {\r\n return Promise.all([\r\n dispatch({\r\n type: types.DELETE_PROJECT_VERSION_SUCCESS,\r\n }),\r\n dispatch(getProjects()),\r\n ]);\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.DELETE_PROJECT_VERSION_FAILED);\r\n });\r\n };\r\n}\r\n\r\nexport function publishProject(projectId, cid) {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.PUBLISH_PROJECT_PENDING,\r\n });\r\n return projectConfigApi.checkProjectConfig(projectId)\r\n .then((response) => {\r\n dispatch({\r\n type: types.CHECK_PROJECT_CONFIG_SUCCESS,\r\n payload: response.data.data,\r\n });\r\n if (response.data.data.length === 0) {\r\n const fetchPages = () => {\r\n return function () {\r\n dispatch(getPagesforProject(projectId));\r\n };\r\n };\r\n const fetchMenuItems = () => {\r\n return function () {\r\n dispatch(getProjectVersionMenuItems(projectId));\r\n };\r\n };\r\n\r\n return projectConfigApi.publishProject(projectId)\r\n .then((resp) => {\r\n dispatch(fetchPages());\r\n dispatch(fetchMenuItems());\r\n dispatch({\r\n type: types.PUBLISH_PROJECT_SUCCESS,\r\n payload: resp.data.data,\r\n });\r\n dispatch({\r\n type: types.SHOW_PUBLISH_NOTIFICATION,\r\n });\r\n dispatch(getLiveProjectConfig(cid));\r\n setTimeout(() => {\r\n dispatch({ type: types.HIDE_PUBLISH_NOTIFICATION });\r\n }, 7000);\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.PUBLISH_PROJECT_FAILED);\r\n if (error.response\r\n && error.response.data\r\n && error.response.data.data\r\n && error.response.data.data.length > 0) {\r\n dispatch({\r\n type: types.CHECK_PROJECT_CONFIG_SUCCESS,\r\n payload: error.response.data.data,\r\n });\r\n } else {\r\n dispatch({\r\n type: types.CHECK_PROJECT_CONFIG_SUCCESS,\r\n payload:\r\n [{\r\n errorMessage: 'An error occurred; please try again soon or contact support.',\r\n errorTypeString: 'PUBLISH_FAILED',\r\n comment: 'Please contact support if error persists',\r\n }],\r\n });\r\n }\r\n });\r\n }\r\n\r\n return dispatch({\r\n type: types.PUBLISH_PROJECT_FAILED,\r\n });\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.CHECK_PROJECT_CONFIG_FAILED);\r\n });\r\n };\r\n}\r\n","import axios from 'axios'; \r\n\r\n\r\nexport const getTemplatesApi = () => { return axios.get(`${window.GENESIS_CMS_API_URL}/v2/templates?sessionId=${localStorage.getItem('SessionId')}&token=${localStorage.getItem('AuthToken')}`); };\r\n","import * as types from './actionTypes';\r\nimport { handleError } from '../errors/handleError';\r\nimport { getTemplatesApi } from '../apis/TemplateApi';\r\n\r\nexport function errorHandler(dispatch, error, type) {\r\n const errorMessage = handleError(error);\r\n\r\n dispatch({\r\n type,\r\n error: errorMessage,\r\n });\r\n}\r\n\r\nexport function getTemplates() {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.GET_TEMPLATES_PENDING,\r\n });\r\n\r\n const handleResponse = (response) => {\r\n dispatch({\r\n type: types.GET_TEMPLATES_SUCCESS,\r\n payload: response.data.data,\r\n });\r\n };\r\n\r\n const handleErrorFn = (error) => {\r\n errorHandler(dispatch, error.response, types.GET_TEMPLATES_FAILED);\r\n };\r\n return getTemplatesApi()\r\n .then(handleResponse)\r\n .catch(handleErrorFn);\r\n };\r\n}\r\n\r\nexport function getTemplate(state, id) {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.GET_TEMPLATE_PENDING,\r\n });\r\n const dataList = (data) => {\r\n return new Promise(((resolve) => {\r\n resolve(data);\r\n }));\r\n };\r\n const searchForTemplate = (templ) => { return templ.id === id; };\r\n\r\n const getTemplateFromList = (templates) => {\r\n const template = templates.find(searchForTemplate);\r\n if (typeof template !== 'undefined') {\r\n return dispatch({\r\n type: types.GET_TEMPLATE_SUCCESS,\r\n payload: template,\r\n });\r\n }\r\n return dispatch({\r\n type: types.GET_TEMPLATE_FAILED,\r\n });\r\n };\r\n\r\n const handleApiResponseAndGetTemplate = (response) => {\r\n dispatch({\r\n type: types.GET_TEMPLATES_SUCCESS,\r\n payload: response.data.data,\r\n });\r\n\r\n getTemplateFromList(response.data.data);\r\n };\r\n\r\n const handleApiErrorFn = (error) => {\r\n errorHandler(dispatch, error.response, types.GET_TEMPLATES_FAILED);\r\n };\r\n\r\n if (!state.data) {\r\n return getTemplatesApi()\r\n .then(handleApiResponseAndGetTemplate)\r\n .catch(handleApiErrorFn);\r\n }\r\n return dataList({ data: state })\r\n .then(handleApiResponseAndGetTemplate)\r\n .catch(handleApiErrorFn);\r\n };\r\n}\r\n","import axios from 'axios';\r\nimport * as types from './actionTypes';\r\nimport { handleError } from '../errors/handleError';\r\nimport { getForms } from './FmsActions';\r\nimport { checkProjectConfig } from './projectConfigActions';\r\nimport { getProjectVersionMenuItems } from './menuItemActions';\r\nimport { addAlert } from './alertActions';\r\nimport i18n from '../i18n';\r\nimport { getPagesforProject } from './contentActions';\r\n\r\nexport function errorHandler(dispatch, error, type) {\r\n const errorMessage = handleError(error);\r\n\r\n dispatch({\r\n type,\r\n error: errorMessage,\r\n });\r\n}\r\n\r\nexport function getProjectVersionModules(projectId) {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.GET_PROJECT_VERSION_MODULES_PENDING,\r\n });\r\n return axios.get(`${window.GENESIS_CMS_API_URL}/v2/projects/${projectId}/modules/latest?sessionId=${localStorage.getItem('SessionId')}&token=${localStorage.getItem('AuthToken')}`)\r\n .then((response) => {\r\n dispatch({\r\n type: types.GET_PROJECT_VERSION_MODULES_SUCCESS,\r\n payload: response.data,\r\n });\r\n dispatch({\r\n type: types.GET_MODULES_FOR_MENU,\r\n payload: response.data.data.filter((obj) => {\r\n return obj.enabled;\r\n })\r\n .map((obj) => {\r\n return obj.moduleType;\r\n }),\r\n });\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.GET_PROJECT_VERSION_MODULES_FAILED);\r\n });\r\n };\r\n}\r\n\r\nexport function getModuleByType(projectId, type) {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.GET_MODULE_PENDING,\r\n });\r\n return axios.get(`${window.GENESIS_CMS_API_URL}/v2/projects/${projectId}/modules/latest?sessionId=${localStorage.getItem('SessionId')}&token=${localStorage.getItem('AuthToken')}&type=${type}`)\r\n .then((response) => {\r\n dispatch({\r\n type: types.GET_MODULE_SUCCESS,\r\n payload: response.data.data[0],\r\n });\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.GET_MODULE_FAILED);\r\n });\r\n };\r\n}\r\n\r\nexport function getModuleByTypeAndForms(projectId, type) {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.GET_MODULE_PENDING,\r\n });\r\n return axios.get(`${window.GENESIS_CMS_API_URL}/v2/projects/${projectId}/modules/latest?sessionId=${localStorage.getItem('SessionId')}&token=${localStorage.getItem('AuthToken')}&type=${type}`)\r\n .then((response) => {\r\n return Promise.all([\r\n dispatch(getForms(type === 1 ? 0 : type)),\r\n dispatch({\r\n type: types.GET_MODULE_SUCCESS,\r\n payload: response.data.data[0],\r\n }),\r\n ]);\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.GET_MODULE_FAILED);\r\n });\r\n };\r\n}\r\n\r\nexport function updateModule(projectId, moduleType, moduleParamsArray) {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.UPDATE_MODULE_PENDING,\r\n });\r\n return axios({\r\n url: `${window.GENESIS_CMS_API_URL}/v2/projects/${projectId}/modules/latestmultiple?sessionId=${localStorage.getItem('SessionId')}&type=${moduleType}&token=${localStorage.getItem('AuthToken')}`,\r\n data: moduleParamsArray,\r\n method: 'PUT',\r\n })\r\n .then((response) => {\r\n return Promise.all([\r\n dispatch({\r\n type: types.UPDATE_MODULE_SUCCESS,\r\n payload: response.data.data,\r\n }),\r\n dispatch(checkProjectConfig(projectId)),\r\n dispatch({\r\n type: types.SHOW_NOTIFICATION,\r\n }),\r\n setTimeout(() => {\r\n dispatch({ type: types.HIDE_NOTIFICATION });\r\n }, 7000),\r\n ]);\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.UPDATE_MODULE_FAILED);\r\n });\r\n };\r\n}\r\n\r\nexport function updateModuleParameter(projectId, moduleType, field, value) {\r\n let endpoint = 'latestsingle';\r\n if (Array.isArray(value)) {\r\n endpoint = 'latestsinglelist';\r\n }\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.UPDATE_MODULE_PARAMETER_PENDING,\r\n });\r\n return axios.put(\r\n `${window.GENESIS_CMS_API_URL}/v2/projects/${projectId}/modules/${endpoint}?sessionId=${localStorage.getItem('SessionId')}&type=${moduleType}&token=${localStorage.getItem('AuthToken')}`,\r\n {\r\n parameterName: field,\r\n parameterValue: value,\r\n }\r\n )\r\n .then((response) => {\r\n let feedUpdated = () => {\r\n return dispatch({ type: 'FEED_NOT_UPDATED' });\r\n };\r\n if (field === 'icalFeedUrl') {\r\n feedUpdated = () => {\r\n return dispatch({\r\n type: types.FEED_UPDATED,\r\n payload: response.data.data,\r\n });\r\n };\r\n }\r\n let fetchPages = () => {\r\n return dispatch({ type: 'NONPAGE_MODULE_UPDATE' });\r\n };\r\n if (moduleType === 1) {\r\n fetchPages = () => {\r\n return function () {\r\n dispatch(getPagesforProject(projectId));\r\n };\r\n };\r\n }\r\n return Promise.all([\r\n dispatch({\r\n type: types.UPDATE_MODULE_PARAMETER_SUCCESS,\r\n payload: response.data.data,\r\n moduleEnable: field === 'enabled',\r\n }),\r\n dispatch(feedUpdated()),\r\n dispatch(fetchPages()),\r\n dispatch(checkProjectConfig(projectId)),\r\n dispatch({\r\n type: types.SHOW_NOTIFICATION,\r\n }),\r\n dispatch(getProjectVersionMenuItems(projectId)),\r\n setTimeout(() => {\r\n dispatch({ type: types.HIDE_NOTIFICATION });\r\n }, 7000),\r\n ]);\r\n })\r\n .catch((error) => {\r\n console.log(`Update Single Failure: ${error.response} ${field}`);\r\n if (field === 'icalFeedUrl' && error.response && error.response.status !== 404) {\r\n dispatch(addAlert({\r\n message: i18n.t('calendar.invalid'),\r\n view: '/modules/calendar',\r\n type: 'error',\r\n dismissable: true,\r\n id: 'calendar-feed-invalid',\r\n }));\r\n dispatch({ type: types.CALENDAR_FEED_INVALID });\r\n }\r\n errorHandler(dispatch, error.response, types.UPDATE_MODULE_PARAMETER_FAILED);\r\n });\r\n };\r\n}\r\n\r\nexport function bulkUpdateModules(projectId, modules) {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.UPDATE_MODULES_PENDING,\r\n });\r\n return axios({\r\n url: `${window.GENESIS_CMS_API_URL}/v2/projects/${projectId}/moduleslatest?sessionId=${localStorage.getItem('SessionId')}&token=${localStorage.getItem('AuthToken')}`,\r\n data: modules,\r\n method: 'PUT',\r\n })\r\n .then((response) => {\r\n return Promise.all([\r\n dispatch({\r\n type: types.UPDATE_MODULES_SUCCESS,\r\n payload: response.data.data,\r\n }),\r\n dispatch(checkProjectConfig(projectId)),\r\n dispatch({\r\n type: types.SHOW_NOTIFICATION,\r\n }),\r\n setTimeout(() => {\r\n dispatch({ type: types.HIDE_NOTIFICATION });\r\n }, 7000),\r\n ]);\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.UPDATE_MODULES_FAILED);\r\n });\r\n };\r\n}\r\n","import axios from 'axios';\r\nimport { handleError } from '../errors/handleError';\r\nimport * as types from './actionTypes';\r\nimport { addAlert } from './alertActions';\r\n\r\nexport function errorHandler(dispatch, error, type) {\r\n const errorMessage = handleError(error);\r\n dispatch({\r\n type,\r\n error: errorMessage,\r\n });\r\n let messageResp;\r\n if (error.data && error.data.errorMessages && error.data.errorMessages.length > 0) {\r\n messageResp = error.data.errorMessages[0];\r\n } else {\r\n messageResp = errorMessage;\r\n }\r\n dispatch(addAlert({\r\n message: messageResp,\r\n view: '/messages',\r\n type: 'banner',\r\n dismissable: true,\r\n id: 'message-api',\r\n }));\r\n}\r\n\r\nexport function getMessages(limit, offset, orgId, sinceTime, beforeTime, timeAscending) {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.GET_MESSAGES_PENDING,\r\n });\r\n return axios.get(`${window.GENESIS_CMS_API_URL}/v2/message?limit=${limit}&offset=${offset}&orgId=${orgId}&sinceTime=${sinceTime}&beforeTime=${beforeTime}&timeAscending=${timeAscending}&showAll=true`)\r\n .then((response) => {\r\n if (sinceTime === 0) {\r\n dispatch({\r\n type: types.GET_MESSAGES_TOTAL,\r\n payload: response.data.data.noOfMessages,\r\n });\r\n }\r\n dispatch({\r\n type: types.GET_MESSAGES_SUCCESS,\r\n payload: response.data.data,\r\n });\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.GET_MESSAGES_FAILED);\r\n });\r\n };\r\n}\r\n\r\nexport function getMessagesTotal(orgId) {\r\n return function (dispatch) {\r\n return axios.get(`${window.GENESIS_CMS_API_URL}/v2/message/count?orgId=${orgId}`)\r\n .then((response) => {\r\n dispatch({\r\n type: types.GET_MESSAGES_TOTAL,\r\n payload: response.data.data.noOfMessages,\r\n });\r\n })\r\n .catch(() => {\r\n });\r\n };\r\n}\r\nexport function deleteMessage(messageId, pageInfo) {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.DELETE_MESSAGE_PENDING,\r\n });\r\n return axios.delete(`${window.GENESIS_CMS_API_URL}/v2/message/${messageId}?token=${window.genesisToken()}&sessionId=${localStorage.getItem('SessionId')}`)\r\n .then((response) => {\r\n return Promise.all([dispatch({\r\n type: types.DELETE_MESSAGE_SUCCESS,\r\n payload: response.data.data,\r\n }),\r\n dispatch(\r\n getMessages(\r\n pageInfo.limit,\r\n pageInfo.offset,\r\n pageInfo.orgId,\r\n pageInfo.sinceTime,\r\n pageInfo.beforeTime,\r\n pageInfo.timeAscending,\r\n ),\r\n ),\r\n ]);\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.DELETE_MESSAGE_FAILED);\r\n });\r\n };\r\n}\r\n\r\nexport function updateMessage(messageId, subject, body, scheduledTime, pageInfo, formMessage, formId, formTitle) {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.UPDATE_MESSAGE_PENDING,\r\n });\r\n return axios.put(`${window.GENESIS_CMS_API_URL}/v2/message/${messageId}?token=${window.genesisToken()}&sessionId=${localStorage.getItem('SessionId')}`, {\r\n subject,\r\n body,\r\n scheduledTime,\r\n formMessage,\r\n formId,\r\n formTitle,\r\n })\r\n .then((response) => {\r\n return Promise.all([dispatch({\r\n type: types.UPDATE_MESSAGE_SUCCESS,\r\n payload: response.data.data,\r\n }),\r\n dispatch(\r\n getMessages(\r\n pageInfo.limit,\r\n pageInfo.offset,\r\n pageInfo.orgId,\r\n pageInfo.sinceTime,\r\n pageInfo.beforeTime,\r\n pageInfo.timeAscending,\r\n ),\r\n ),\r\n ]);\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.UPDATE_MESSAGE_FAILED);\r\n });\r\n };\r\n}\r\n\r\nexport function getMessage(messageId) {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.GET_MESSAGE_PENDING,\r\n });\r\n return axios.get(`${window.GENESIS_CMS_API_URL}/v2/message/${messageId}?token=${window.genesisToken()}&sessionId=${localStorage.getItem('SessionId')}`)\r\n .then((response) => {\r\n dispatch({\r\n type: types.GET_MESSAGE_SUCCESS,\r\n payload: response.data.data,\r\n });\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.GET_MESSAGE_FAILED);\r\n });\r\n };\r\n}\r\n\r\nexport function createMessage(subject, body, scheduledTime, pageInfo, formMessage, formId, formTitle) {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.CREATE_MESSAGE_PENDING,\r\n });\r\n return axios.put(`${window.GENESIS_CMS_API_URL + '/v2'}/message/create?token=${window.genesisToken()}&sessionId=${localStorage.getItem('SessionId')}`, {\r\n subject,\r\n body,\r\n scheduledTime,\r\n formMessage,\r\n formId,\r\n formTitle,\r\n })\r\n .then((response) => {\r\n return Promise.all([dispatch({\r\n type: types.CREATE_MESSAGE_SUCCESS,\r\n payload: response.data.data,\r\n }),\r\n dispatch(\r\n getMessages(\r\n pageInfo.limit,\r\n pageInfo.offset,\r\n pageInfo.orgId,\r\n pageInfo.sinceTime,\r\n pageInfo.beforeTime,\r\n pageInfo.timeAscending,\r\n ),\r\n ),\r\n dispatch(getMessagesTotal(pageInfo.orgId)),\r\n ]);\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.CREATE_MESSAGE_FAILED);\r\n });\r\n };\r\n}\r\n","import thunk from 'redux-thunk';\r\nimport axios from 'axios';\r\nimport * as types from './actionTypes';\r\nimport { handleError } from '../errors/handleError';\r\nimport { checkProjectConfig } from './projectConfigActions';\r\nimport { getProjectVersion } from './projectVersionsActions';\r\n\r\n// ERROR HANDLER\r\nexport function errorHandler(dispatch, error, type) {\r\n const errorMessage = handleError(error);\r\n\r\n dispatch({\r\n type,\r\n error: errorMessage,\r\n });\r\n}\r\n\r\n// triggers clearing size warning\r\nexport function resetWarning() {\r\n return {\r\n type: types.RESET_WARNING,\r\n payload: 'Image size warning has been reset',\r\n };\r\n}\r\n\r\n// triggers clearing cropped image data from redux store\r\nexport function resetCroppedImage() {\r\n return {\r\n type: types.RESET_CROPPED_IMAGE,\r\n };\r\n}\r\n\r\n// triggers clearing all image data from redux store\r\nexport function resetImageData() {\r\n return {\r\n type: types.RESET_IMAGE_DATA,\r\n };\r\n}\r\n\r\n// Handles close of cropper without save\r\nexport function clearCropModal() {\r\n return {\r\n type: types.CLOSE_CROPPER,\r\n };\r\n}\r\n\r\n// Uploads the original and dispatches the data for cropper to use, also uploads and saves the cropped version\r\nexport function uploadAssetImageForCrop(projectId, imageType, file, parentId = '00000000-0000-0000-0000-000000000000', crop = false) {\r\n const imageFormData = new FormData();\r\n imageFormData.append('imageFile', file, `logo${Math.random()\r\n .toString(36)\r\n .replace(/[^a-z]+/g, '')\r\n .substr(0, 5)}.png`);\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.UPLOAD_ASSET_IMAGE_CROP_PENDING,\r\n });\r\n return axios({\r\n url: `${window.GENESIS_CMS_API_URL}/v2/projects/${projectId}/uploadlatest?sessionid=${localStorage.getItem('SessionId')}&token=${localStorage.getItem('AuthToken')}&imageType=${imageType}&crop=${crop}&parentId=${parentId}`,\r\n headers: {\r\n 'Content-Type': 'multipart/form-data',\r\n },\r\n data: imageFormData,\r\n method: 'POST',\r\n })\r\n .then((response) => {\r\n if (response.status === 200) {\r\n dispatch({\r\n type: types.UPLOAD_ASSET_IMAGE_CROP_SUCCESS,\r\n payload: response.data.data,\r\n crop,\r\n });\r\n if (!crop) {\r\n dispatch({\r\n type: types.CREATE_IMAGE_CROP_SUCCESS,\r\n payload: response.data.data,\r\n });\r\n } else {\r\n dispatch({\r\n type: types.CROP_IMAGE_CROP_SUCCESS,\r\n payload: response.data.data,\r\n });\r\n dispatch(getProjectVersion(projectId));\r\n }\r\n } else {\r\n errorHandler(\r\n dispatch,\r\n response.data.originalImage.ErrorCode,\r\n types.CREATE_IMAGE_CROP_FAILED,\r\n );\r\n }\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.UPLOAD_ASSET_IMAGE_CROP_FAILED);\r\n });\r\n };\r\n}\r\n\r\n// Action called by the cropper itself\r\nexport function cropImageForCrop(projectId, imageType, file, parentId) {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.CROP_IMAGE_CROP_PENDING,\r\n });\r\n return dispatch(uploadAssetImageForCrop(projectId, imageType, file, parentId, true));\r\n };\r\n}\r\n\r\n// Use for live previews, displays of image, etc - called for logo on pages that use logo in live preview\r\nexport function getOriginalCroppedImageForCrop(projectId, imageType, parentId) {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.GET_CROPPED_IMAGE_CROP_PENDING,\r\n });\r\n\r\n return axios.get(`${window.GENESIS_CMS_API_URL}/v2/projects/${projectId}/images/croppedImageLatest?imageType=${imageType}&sessionId=${localStorage.getItem('SessionId')}&token=${localStorage.getItem('AuthToken')}&parentId=${parentId}`)\r\n .then((response) => {\r\n if (response.data.data.imagePath == null) {\r\n dispatch({\r\n type: types.GET_CROPPED_IMAGE_CROP_FAILED,\r\n });\r\n } else {\r\n dispatch({\r\n type: types.GET_CROPPED_IMAGE_CROP_SUCCESS,\r\n payload: response.data.data,\r\n });\r\n }\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.GET_CROPPED_IMAGE_CROP_FAILED);\r\n });\r\n };\r\n}\r\n\r\n// Use to get original image for a recrop\r\nexport function getOriginalImageForCrop(projectId, imageType, parentId) {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.GET_ORIGINAL_IMAGE_CROP_PENDING,\r\n });\r\n\r\n return axios.get(`${window.GENESIS_CMS_API_URL}/v2/projects/${projectId}/images/originalImageLatest?imageType=${imageType}&sessionId=${localStorage.getItem('SessionId')}&token=${localStorage.getItem('AuthToken')}&parentId=${parentId}`)\r\n .then((response) => {\r\n dispatch({\r\n type: types.GET_ORIGINAL_IMAGE_CROP_SUCCESS,\r\n payload: response.data.data,\r\n });\r\n dispatch(resetWarning());\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.GET_ORIGINAL_IMAGE_CROP_FAILED);\r\n });\r\n };\r\n}\r\n\r\n/*\r\nDelete button on logo page. Fully delete original and all crops; for latest version.\r\n */\r\nexport function deleteImagesForCropForCrop(projectId, imageType, parentId) {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.DELETE_ALL_CROPPED_IMAGES_CROP_PENDING,\r\n });\r\n\r\n return axios({\r\n url: `${window.GENESIS_CMS_API_URL}/v2/projects/${projectId}/images/${imageType}/imageslatest?sessionId=${localStorage.getItem('SessionId')}&token=${localStorage.getItem('AuthToken')}&parentId=${parentId}`,\r\n method: 'DELETE',\r\n })\r\n .then((response) => {\r\n return Promise.all([\r\n dispatch({\r\n type: types.DELETE_ALL_CROPPED_IMAGES_CROP_SUCCESS,\r\n payload: response.data,\r\n }),\r\n dispatch(getProjectVersion(projectId)),\r\n dispatch(checkProjectConfig(projectId)),\r\n ]);\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.DELETE_ALL_CROPPED_IMAGES_CROP_FAILED);\r\n });\r\n };\r\n}\r\n\r\n/*\r\nDelete images that are uploaded but not cropped.\r\nCan be refactored out when we stop uploading images that aren't saved.\r\n*/\r\nexport function deleteSingleImageForCrop(imageId) {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.DELETE_SINGLE_IMAGE_CROP_PENDING,\r\n });\r\n\r\n return axios({\r\n url: `${window.GENESIS_CMS_API_URL}/v2/projects/${imageId}/images?sessionId=${localStorage.getItem('SessionId')}&token=${localStorage.getItem('AuthToken')}`,\r\n method: 'DELETE',\r\n })\r\n .then((response) => {\r\n dispatch({\r\n type: types.DELETE_SINGLE_IMAGE_CROP_SUCCESS,\r\n payload: response.data,\r\n });\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.DELETE_SINGLE_IMAGE_CROP_FAILED);\r\n });\r\n };\r\n}\r\n","import axios from 'axios'; // eslint-disable-line\r\n\r\nexport const getCloverToken = (username, password) => {\r\n return axios({\r\n url: `${window.GENESIS_CMS_API_URL}/v2/clover/getauthtoken`,\r\n data: {\r\n Username: username,\r\n Password: password,\r\n },\r\n method: 'POST',\r\n });\r\n};\r\n\r\nexport const getCloverProductsViaAPI = (tokenResponse) => {\r\n return axios.get(`${window.GENESIS_CLOVER_ACCOUNTS_URL}/api/v1/products`, {\r\n headers: {\r\n Authorization: `Bearer ${tokenResponse.data.data.access_token}`,\r\n },\r\n });\r\n};\r\n\r\nexport const getCloverPayloadFromProductViaAPI = (productName, token) => {\r\n return axios.get(`${window.GENESIS_CLOVER_API_URL}/v1/sites/${productName}/payload`, {\r\n headers: {\r\n Authorization: `Bearer ${token}`,\r\n },\r\n });\r\n};\r\n","export const getObjectKeyFromValue = (obj, val) => { // eslint-disable-line\r\n return Object.keys(obj)\r\n .slice()\r\n .find(key => obj[key] === val); // eslint-disable-line\r\n};\r\n\r\nexport default getObjectKeyFromValue;\r\n","import thunk from 'redux-thunk';\r\nimport * as types from './actionTypes';\r\nimport { handleError } from '../errors/handleError';\r\nimport {\r\n getCloverToken,\r\n getCloverProductsViaAPI,\r\n getCloverPayloadFromProductViaAPI,\r\n} from '../apis/CloverApi';\r\nimport { getObjectKeyFromValue } from '../objects/getObjectKeyFromValue';\r\nimport {\r\n updateProjectVersionWithMedia,\r\n updateProjectVersionForSermonDisconnect,\r\n} from './projectVersionsActions';\r\nimport constants from '../constants';\r\nimport i18n from '../i18n';\r\nimport { addAlert } from './alertActions';\r\n\r\nexport function errorHandler(dispatch, error, type) {\r\n let errorMessage = '';\r\n if (error.status === 401) {\r\n dispatch(addAlert({\r\n message: i18n.t('clover.invalid-login'),\r\n view: '/modules/sermons',\r\n type: 'error',\r\n id: 'invalid-login',\r\n dismissable: true,\r\n }));\r\n } else {\r\n errorMessage = handleError(error);\r\n }\r\n dispatch({\r\n type,\r\n error: errorMessage,\r\n });\r\n\r\n const clearError = () => {\r\n dispatch({\r\n type,\r\n error: '',\r\n });\r\n };\r\n\r\n setTimeout(clearError, 3000);\r\n}\r\n\r\nexport function setSelectedCloverPage(pageId, payload, product, projectVersionIn) {\r\n let projectVersion = projectVersionIn;\r\n const mediaItems = payload.media_item_uuid;\r\n const mediaItemUUId = getObjectKeyFromValue(mediaItems, pageId);\r\n if (!mediaItemUUId) {\r\n return {\r\n type: types.GET_CLOVER_PAGES_FAILURE,\r\n error: i18n.t('clover.not-found'),\r\n };\r\n }\r\n if (typeof projectVersion === 'string') {\r\n projectVersion = {};\r\n }\r\n projectVersion.cloverAccountEmail = product.owner.email;\r\n projectVersion.cloverAccountProduct = product.product_name;\r\n projectVersion.mediaUrl = `http://${projectVersion.cloverAccountProduct}.cloversites.com/podcast/${mediaItemUUId}.xml`;\r\n projectVersion.mediaType = constants.MediaType.find((n) => { return n.Name === 'Clover'; }).Id;\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.CLEAR_CLOVER_OBJECTS,\r\n });\r\n return dispatch(updateProjectVersionWithMedia(projectVersion.projectId, projectVersion));\r\n };\r\n}\r\n\r\nexport function getCloverProductPages(product, cloverToken, projectVersion) {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.GET_CLOVER_PAGES,\r\n });\r\n const handleResponseFn = function (response) {\r\n const payload = response.data;\r\n const mediaItems = payload.media_item_uuid;\r\n\r\n const filterToMediaPages = (page) => {\r\n const mediaSection = getObjectKeyFromValue(mediaItems, page.id);\r\n return mediaSection && mediaSection.length > 0;\r\n };\r\n\r\n const pages = payload.pages.filter(filterToMediaPages);\r\n if (pages.length === 0) {\r\n dispatch(addAlert({\r\n message: i18n.t('clover.not-found'),\r\n view: '/modules/sermons',\r\n type: 'error',\r\n id: 'invalid-pages',\r\n dismissable: true,\r\n }));\r\n dispatch({\r\n type: types.CLEAR_CLOVER_OBJECTS,\r\n });\r\n }\r\n if (pages.length === 1) {\r\n dispatch(setSelectedCloverPage(pages[0].id, payload, product, projectVersion));\r\n } else {\r\n dispatch({\r\n type: types.GET_CLOVER_PAGES_SUCCEED,\r\n pages,\r\n payload,\r\n token: cloverToken,\r\n select: product,\r\n });\r\n }\r\n };\r\n\r\n const handleErrorFn = (error) => {\r\n errorHandler(dispatch, error, types.GET_CLOVER_PRODUCTS_FAILED);\r\n };\r\n\r\n return getCloverPayloadFromProductViaAPI(product.product_name, cloverToken)\r\n .then(handleResponseFn)\r\n .catch(handleErrorFn);\r\n };\r\n}\r\n\r\nexport function getCloverProducts(username, password, projectVersion) {\r\n return function (dispatch) {\r\n let apiToken = '';\r\n\r\n dispatch({\r\n type: types.GET_CLOVER_PRODUCTS_PENDING,\r\n });\r\n\r\n const handleTokenResponse = (tokenResponse) => {\r\n return new Promise((resolve, reject) => {\r\n try {\r\n apiToken = tokenResponse.data.data.access_token;\r\n resolve(tokenResponse);\r\n } catch {\r\n reject(tokenResponse);\r\n }\r\n });\r\n };\r\n\r\n const handleResponse = (productResponse) => {\r\n if (productResponse.data.length > 1) {\r\n dispatch({\r\n type: types.GET_CLOVER_PRODUCTS_SUCCESS,\r\n payload: productResponse.data,\r\n token: apiToken,\r\n });\r\n } else {\r\n dispatch({\r\n type: types.GET_CLOVER_PRODUCTS_SUCCESS,\r\n });\r\n dispatch(getCloverProductPages(productResponse.data[0], apiToken, projectVersion));\r\n }\r\n };\r\n\r\n const handleErrorFn = (error) => {\r\n errorHandler(dispatch, error.response, types.GET_CLOVER_PRODUCTS_FAILED);\r\n };\r\n return getCloverToken(username, password)\r\n .then(handleTokenResponse)\r\n .then(getCloverProductsViaAPI)\r\n .then(handleResponse)\r\n .catch(handleErrorFn);\r\n };\r\n}\r\n\r\nexport function disconnectCloverAccount(projectVersionIn) {\r\n return function (dispatch) {\r\n let projectVersion = projectVersionIn;\r\n dispatch({\r\n type: types.CLEAR_CLOVER_OBJECTS,\r\n });\r\n projectVersion.cloverAccountEmail = '';\r\n projectVersion.cloverAccountProduct = '';\r\n projectVersion.mediaUrl = null;\r\n projectVersion.mediaType = 0;\r\n\r\n dispatch(updateProjectVersionForSermonDisconnect(projectVersion.projectId, projectVersion));\r\n };\r\n}\r\n","import { \r\n getCurrentProfile,\r\n logout,\r\n}\r\n from './profileActions';\r\n\r\n// import {\r\n// getCurrentAuthAction,\r\n// }\r\n// from './UnityAuthenticationAction';\r\n\r\nimport {\r\n getFlags,\r\n}\r\n from './featureFlagActions';\r\n\r\nimport {\r\n searchStreams,\r\n checkShareFaithEmail,\r\n} from './integrationsActions';\r\n\r\nimport {\r\n getProject,\r\n getProjects,\r\n createProject,\r\n changeProjects,\r\n getLiveProjectConfig,\r\n}\r\n from './projectActions';\r\n\r\nimport {\r\n checkProjectConfig,\r\n}\r\n from './projectConfigActions';\r\n\r\nimport {\r\n getEmbedCode,\r\n}\r\n from './organizationActions';\r\n\r\nimport {\r\n getVimeoFeeds,\r\n getVimeoToken,\r\n} from './vimeoActions';\r\n\r\nimport {\r\n getProjectVersion,\r\n updateProjectVersion,\r\n updateProjectVersionbyParameter,\r\n deleteProjectVersion,\r\n updateProjectVersionWithMedia,\r\n publishProject,\r\n togglePreviewShown,\r\n updateProjectVersionForSermonDisconnect,\r\n}\r\n from './projectVersionsActions';\r\n\r\nimport {\r\n getTemplates,\r\n getTemplate,\r\n}\r\n from './templateActions';\r\n\r\nimport {\r\n getProjectVersionModules,\r\n updateModule,\r\n updateModuleParameter,\r\n getModuleByType,\r\n getModuleByTypeAndForms,\r\n bulkUpdateModules,\r\n}\r\n from './moduleActions';\r\n\r\nimport {\r\n getProjectVersionMenuItems,\r\n updateMenuItemParameter,\r\n bulkUpdateMenuItems,\r\n} from './menuItemActions';\r\n\r\nimport {\r\n getProjectMedia,\r\n}\r\n from './mediaActions';\r\nimport {\r\n getPagesforDropdown,\r\n getPagesforProject,\r\n deleteContentSection,\r\n addContentSectionToPage,\r\n reorderPageSections,\r\n updateContentSection,\r\n addContentToSection,\r\n updateContent,\r\n deleteContent,\r\n deletePage,\r\n addPage,\r\n updatePage,\r\n} from './contentActions';\r\n\r\nimport {\r\n getForms,\r\n}\r\n from './FmsActions';\r\n\r\nimport {\r\n addAlert,\r\n clearAlert,\r\n} from './alertActions';\r\n\r\nimport {\r\n createMessage,\r\n updateMessage,\r\n deleteMessage,\r\n getMessages,\r\n getMessage,\r\n getMessagesTotal,\r\n} from './messageActions';\r\n\r\n// ONLY FOR CROP\r\nimport {\r\n deleteSingleImageForCrop,\r\n cropImageForCrop,\r\n uploadAssetImageForCrop,\r\n getOriginalCroppedImageForCrop,\r\n getOriginalImageForCrop,\r\n deleteImagesForCropForCrop,\r\n resetWarning,\r\n resetCroppedImage,\r\n resetImageData,\r\n clearCropModal,\r\n}\r\n from './cropActions';\r\n\r\nimport {\r\n getCloverProducts,\r\n getCloverProductPages,\r\n setSelectedCloverPage,\r\n disconnectCloverAccount,\r\n}\r\n from './cloverActions';\r\n\r\nimport {\r\n setMenuOpenSection,\r\n toggleMenuShown,\r\n toggleMobileMenuShown,\r\n}\r\n from './menuActions';\r\n\r\nimport {\r\n getChmsCalendarFeeds,\r\n} from './calendarActions';\r\n\r\nimport { getWaffleToken } from './waffleActions';\r\n\r\nimport {\r\n getStudioCConfiguration,\r\n}\r\n from './studiocActions';\r\n\r\nexport default {\r\n logout,\r\n changeProjects,\r\n getCurrentProfile,\r\n getProject,\r\n getProjects,\r\n createProject,\r\n getProjectVersion,\r\n updateProjectVersion,\r\n updateProjectVersionbyParameter,\r\n deleteProjectVersion,\r\n updateProjectVersionForSermonDisconnect,\r\n getTemplates,\r\n getTemplate,\r\n getProjectVersionModules,\r\n updateModule,\r\n updateModuleParameter,\r\n getModuleByType,\r\n getModuleByTypeAndForms,\r\n getForms,\r\n getProjectMedia,\r\n updateProjectVersionWithMedia,\r\n addAlert,\r\n clearAlert,\r\n bulkUpdateModules,\r\n getEmbedCode,\r\n getLiveProjectConfig,\r\n getChmsCalendarFeeds,\r\n getWaffleToken,\r\n\r\n // ONLY FOR CROP\r\n deleteSingleImageForCrop,\r\n cropImageForCrop,\r\n uploadAssetImageForCrop,\r\n getOriginalCroppedImageForCrop,\r\n getOriginalImageForCrop,\r\n deleteImagesForCropForCrop,\r\n resetWarning,\r\n resetCroppedImage,\r\n resetImageData,\r\n clearCropModal,\r\n\r\n // project config\r\n checkProjectConfig,\r\n publishProject,\r\n getCloverProducts,\r\n getCloverProductPages,\r\n setSelectedCloverPage,\r\n disconnectCloverAccount,\r\n setMenuOpenSection,\r\n toggleMenuShown,\r\n toggleMobileMenuShown,\r\n togglePreviewShown,\r\n\r\n // messages\r\n createMessage,\r\n updateMessage,\r\n deleteMessage,\r\n getMessages,\r\n getMessage,\r\n getMessagesTotal,\r\n\r\n searchStreams,\r\n checkShareFaithEmail,\r\n getFlags,\r\n\r\n // menuItems\r\n getProjectVersionMenuItems,\r\n updateMenuItemParameter,\r\n bulkUpdateMenuItems,\r\n\r\n getVimeoFeeds,\r\n getVimeoToken,\r\n\r\n addContentSectionToPage,\r\n getPagesforProject,\r\n getPagesforDropdown,\r\n deleteContentSection,\r\n reorderPageSections,\r\n updateContentSection,\r\n addContentToSection,\r\n updateContent,\r\n deleteContent,\r\n deletePage,\r\n addPage,\r\n updatePage,\r\n getStudioCConfiguration\r\n // Unity\r\n // getCurrentAuthAction,\r\n};\r\n","import * as types from './actionTypes';\r\nimport { handleError } from '../errors/handleError';\r\nimport { getProfileFromAPI } from '../apis/ProfileApi';\r\nimport { getFlags } from './featureFlagActions';\r\n\r\nexport function errorHandler(dispatch, error, type) {\r\n const errorMessage = handleError(error);\r\n\r\n dispatch({\r\n type,\r\n error: errorMessage,\r\n });\r\n}\r\n\r\nexport function logout() {\r\n return {\r\n type: types.LOG_OUT,\r\n };\r\n}\r\n\r\nexport function getCurrentProfile(state) {\r\n if (state.data && (state.token === window.genesisToken()) && state.token !== '') {\r\n return {\r\n type: types.GET_PROFILE_SUCCESS,\r\n payload: state.data,\r\n };\r\n }\r\n return function (dispatch) {\r\n return getProfileFromAPI()\r\n .then((response) => {\r\n dispatch({\r\n type: types.GET_PROFILE_SUCCESS,\r\n payload: response.data.data,\r\n token: window.genesisToken(),\r\n });\r\n localStorage.setItem('OrganizationId', response.data.data.organizationId);\r\n localStorage.setItem('GivingChurchId', response.data.data.givingChurchId);\r\n dispatch(getFlags(response.data.data.organizationId));\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.GET_PROFILE_FAILED);\r\n });\r\n };\r\n}\r\n","import axios from 'axios'; \r\n\r\n\r\nexport const getProfileFromAPI = () => {\r\n return axios\r\n .get(`${window.GENESIS_CMS_API_URL}/v2/profiles/me?sessionId=${localStorage.getItem('SessionId')}&token=${localStorage.getItem('AuthToken')}`);\r\n};\r\n","import * as types from './actionTypes';\r\nimport { handleError } from '../errors/handleError';\r\nimport { getMedia } from '../apis/MediaApi';\r\nimport { addAlert, clearAlert } from './alertActions';\r\n\r\nexport function errorHandler(dispatch, error, type) {\r\n const errorMessage = handleError(error);\r\n\r\n dispatch({\r\n type,\r\n error: errorMessage,\r\n });\r\n}\r\n\r\nexport function getProjectMedia(projectId) {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.GET_PROJECT_MEDIA_PENDING,\r\n });\r\n return getMedia(projectId)\r\n .then((response) => {\r\n dispatch({\r\n type: types.GET_PROJECT_MEDIA_SUCCESS,\r\n payload: response.data.data,\r\n });\r\n dispatch(clearAlert('sermon-media-invalid'));\r\n })\r\n .catch((error) => {\r\n if (error.response && error.response.status !== 404) {\r\n dispatch(addAlert({\r\n message: error,\r\n view: '/modules/sermons',\r\n type: 'error',\r\n dismissable: true,\r\n id: 'sermon-media-invalid',\r\n }));\r\n }\r\n errorHandler(dispatch, error, types.GET_PROJECT_MEDIA_FAILED);\r\n });\r\n };\r\n}\r\n","import axios from 'axios';\r\nimport * as types from './actionTypes';\r\nimport { handleError } from '../errors/handleError';\r\n\r\nexport function errorHandler(dispatch, error, type) {\r\n const errorMessage = handleError(error);\r\n\r\n dispatch({\r\n type,\r\n error: errorMessage,\r\n });\r\n}\r\n\r\nexport function getEmbedCode() {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.GET_EMBED_CODE_PENDING,\r\n });\r\n axios.get(`${window.GENESIS_CMS_API_URL}/v2/organizations/organization/embed?token=${window.genesisToken()}&sessionId=${localStorage.getItem('SessionId')}`)\r\n .then((response) => {\r\n if (response.data.data === 'No live version found') {\r\n dispatch({\r\n type: types.GET_EMBED_CODE_SUCCESS,\r\n payload: { notLive: true },\r\n });\r\n } else {\r\n dispatch({\r\n type: types.GET_EMBED_CODE_SUCCESS,\r\n payload: response.data.data,\r\n });\r\n }\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.GET_EMBED_CODE_FAILED);\r\n });\r\n };\r\n}\r\n","import axios from 'axios';\r\nimport * as types from './actionTypes';\r\nimport { handleError } from '../errors/handleError';\r\n\r\nexport function errorHandler(dispatch, error, type) {\r\n const errorMessage = handleError(error, true);\r\n dispatch({\r\n type,\r\n error: errorMessage,\r\n });\r\n}\r\n\r\nexport function getChmsCalendarFeeds() {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.GET_CALENDARS_PENDING,\r\n });\r\n return axios.get(`${window.GENESIS_CMS_API_URL}/v2/calendar/sccrm?token=${window.genesisToken()}&sessionId=${localStorage.getItem('SessionId')}&organizationId=${localStorage.getItem('OrganizationId')}`)\r\n .then((feeds) => {\r\n dispatch({\r\n type: types.GET_CALENDARS_SUCCESS,\r\n payload: feeds.data?.data?.calendars,\r\n });\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.GET_CALENDARS_FAILED);\r\n });\r\n };\r\n}\r\n","import axios from 'axios'; // eslint-disable-line\r\nimport * as types from './actionTypes';\r\nimport { handleError } from '../errors/handleError';\r\n\r\nexport function errorHandler(dispatch, error, type) {\r\n const errorMessage = handleError(error, true);\r\n\r\n dispatch({\r\n type,\r\n error: errorMessage,\r\n });\r\n}\r\n\r\nexport function getWaffleToken() {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.GET_WAFFLE_TOKEN_PENDING,\r\n });\r\n return axios.get(`${window.GENESIS_CMS_API_URL}/v2/waffle?sessionId=${localStorage.getItem('SessionId')}&token=${localStorage.getItem('AuthToken')}`)\r\n .then((response) => {\r\n dispatch({\r\n type: types.GET_WAFFLE_TOKEN_SUCCESS,\r\n payload: response.data,\r\n });\r\n if (response.data.data === '') {\r\n setTimeout(() => {\r\n dispatch(getWaffleToken());\r\n }, 5000);\r\n }\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.GET_WAFFLE_TOKEN_FAILED);\r\n });\r\n };\r\n}\r\n","import * as types from './actionTypes';\r\n\r\nexport function setMenuOpenSection(sectionName) {\r\n return {\r\n type: types.SET_MENU_OPEN_SECTION,\r\n payload: sectionName,\r\n };\r\n}\r\n\r\nexport function toggleMenuShown(currentState) {\r\n return {\r\n type: types.TOGGLE_MENU_SHOWN,\r\n payload: !currentState,\r\n };\r\n}\r\n\r\nexport function toggleMobileMenuShown(currentState) {\r\n return {\r\n type: types.TOGGLE_MOBILE_MENU_SHOWN,\r\n payload: !currentState,\r\n };\r\n}\r\n","import axios from 'axios';\r\nimport * as types from './actionTypes';\r\nimport { handleError } from '../errors/handleError';\r\n\r\nexport function errorHandler(dispatch, error, type) {\r\n const errorMessage = handleError(error);\r\n\r\n dispatch({\r\n type,\r\n error: errorMessage,\r\n });\r\n}\r\n\r\nexport function getStudioCConfiguration() {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.GET_STUDIOC_CONFIGURATION_MODULES_PENDING,\r\n });\r\n return axios.get(`${window.GENESIS_CMS_API_URL}/v5/studio-c/configuration?sessionId=${localStorage.getItem('SessionId')}&token=${localStorage.getItem('AuthToken')}`)\r\n .then((response) => {\r\n dispatch({\r\n type: types.GET_STUDIOC_CONFIGURATION_MODULES_SUCCESS,\r\n payload: response.data,\r\n });\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.GET_STUDIOC_CONFIGURATION_MODULES_FAILED);\r\n });\r\n };\r\n}","import i18n from './../i18n'; // eslint-disable-line\r\n\r\nexport const handleError = (error, dontRedirectOn404 = false) => {\r\n let errorMessage = '';\r\n let errorObject;\r\n if (error) {\r\n if (error.data?.status) {\r\n errorMessage = error.data.status.errorMessage; // eslint-disable-line\r\n errorObject = error.data.status;\r\n } else if (error.data?.error) {\r\n errorMessage = error.data.error;\r\n errorObject = error.data;\r\n } else if (error.data) {\r\n errorMessage = error.data;\r\n errorObject = error;\r\n } else {\r\n errorMessage = error;\r\n }\r\n if (error.status === 401 && !dontRedirectOn404) {\r\n localStorage.clear();\r\n const loginRedirectUrl = errorMessage.message;\r\n if (window.location.pathname !== 'logged-out' && loginRedirectUrl && (loginRedirectUrl.indexOf('http') > -1)) {\r\n window.location = '/no-access';\r\n window.location = loginRedirectUrl;\r\n } else if (window.location.pathname !== '/logged-out' && window.location.pathname !== '/no-access') {\r\n window.location = '/no-access';\r\n }\r\n } else {\r\n return i18n.t('handle-error');\r\n }\r\n }\r\n if (window.console) {\r\n if (errorObject) {\r\n console.error(errorObject);\r\n } else {\r\n console.log(errorMessage);\r\n }\r\n }\r\n return errorMessage;\r\n};\r\n\r\nexport default handleError;\r\n","import React from 'react'; // eslint-disable-line\r\nimport Tooltip from 'rc-tooltip';\r\n\r\nconst CaptionTooltip = (props) => {\r\n const placement = props.placement ? props.placement : 'bottom';\r\n return (\r\n {props.tooltipText}}\r\n overlayClassName=\"smallTooltip\"\r\n >\r\n {props.children}\r\n \r\n );\r\n};\r\n\r\nexport default CaptionTooltip;\r\n","import * as types from './actionTypes';\r\n\r\nexport function clearAlert(alertId) {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.CLEAR_ALERT,\r\n payload: alertId,\r\n });\r\n };\r\n}\r\nexport function addAlert(alert) {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.FIRE_ALERT,\r\n payload: alert,\r\n });\r\n if (alert.type === 'success') setTimeout(() => { dispatch(clearAlert(alert.id)); }, 5000);\r\n if (alert.type === 'info') setTimeout(() => { dispatch(clearAlert(alert.id)); }, 15000);\r\n };\r\n}\r\n","export default __webpack_public_path__ + \"static/media/navbar-brand.53aed933.svg\";","import axios from 'axios'; // eslint-disable-line\r\nimport { setToken } from './setToken';\r\n\r\nexport const refreshToken = () => {\r\n axios({\r\n url: `${window.GENESIS_CMS_API_URL}/v3/token/refresh`,\r\n params: {\r\n token: window.genesisToken(),\r\n },\r\n method: 'POST',\r\n })\r\n .then((response) => {\r\n localStorage.setItem('AuthToken', response.data.data.token);\r\n sessionStorage.setItem('SessionId', response.data.data.sessionId);\r\n setToken();\r\n })\r\n .catch(() => {\r\n // throw error?\r\n });\r\n};\r\n\r\nexport function createsession() {\r\n const jwt = window.genesisToken();\r\n axios({\r\n url: `${window.GENESIS_CMS_API_URL}/v3/unity/createsession`,\r\n params: {\r\n jwt\r\n },\r\n method: 'POST',\r\n })\r\n .then((response) => {\r\n console.log('saving session');\r\n localStorage.setItem('SessionId', response.data.Data.data.session.id);\r\n sessionStorage.setItem('SessionId', response.data.Data.data.session.id);\r\n localStorage.setItem('AuthToken', jwt);\r\n console.log('About to set the unity orgid');\r\n localStorage.setItem('UnityOrgId', response.data.Data.data.user.current_organization.id);\r\n localStorage.setItem('ChurchName', response.data.Data.data.user.current_organization.name);\r\n localStorage.setItem('ChurchLogo', response.data.Data.data.user.current_organization.logo_url);\r\n localStorage.setItem('AllData', response.data.Data.data.user.current_organization);\r\n /* following local storage set items is for pendo in appbuilderHeader file */\r\n localStorage.setItem('UnityUserId', response.data.Data.data.user.id);\r\n localStorage.setItem('UnityEmail', response.data.Data.data.user.email);\r\n localStorage.setItem('FirstName', response.data.Data.data.user.first_name);\r\n localStorage.setItem('LastName', response.data.Data.data.user.last_name);\r\n /*******************/\r\n let givingAdminModule = 'unknown';\r\n let givingDarkProvision = 'unknown';\r\n localStorage.setItem('HasGiving', 'false');\r\n let appBuilderModuleName = 'unknown';\r\n let trial = 'unknown';\r\n let modulesLength = response.data.Data.data.user.current_organization.modules.length;\r\n for (let i = 0; i < modulesLength; i++) {\r\n givingAdminModule = response.data.Data.data.user.current_organization.modules[i].name;\r\n if(givingAdminModule === 'Giving Admin') {\r\n givingDarkProvision = response.data.Data.data.user.current_organization.modules[i].is_dark_provisioned.toString();\r\n if(givingDarkProvision === 'false' ){\r\n localStorage.setItem('HasGiving', response.data.Data.data.user.current_organization.modules[i].active);\r\n }\r\n }\r\n }\r\n localStorage.setItem('ChurchLogo', response.data.Data.data.user.current_organization.logo_url);\r\n let ModulesData = JSON.stringify(response.data.Data.data.user.current_organization.modules);\r\n localStorage.setItem('ModulesData', ModulesData);\r\n\r\n for (let i = 0; i < modulesLength; i++) {\r\n appBuilderModuleName = response.data.Data.data.user.current_organization.modules[i].name.toString();\r\n if (['Mobile App', 'App Builder'].includes(appBuilderModuleName)) {\r\n trial = response.data.Data.data.user.current_organization.modules[i].current_status.toString();\r\n if (trial === 'Trialing'){\r\n localStorage.setItem('IsTrial', 'true');\r\n }\r\n }\r\n }\r\n })\r\n .catch((error) => {\r\n localStorage.clear();\r\n console.log(error);\r\n window.location = error.response.data.Message;\r\n });\r\n}\r\n\r\nexport default refreshToken;\r\n","import axios from 'axios'; // eslint-disable-line\r\n\r\n// eslint-disable-next-line \r\nexport const getFmsClientId = () => {\r\n return axios\r\n .get(`${window.GENESIS_CMS_API_URL}/v3/forms/bridgeId?orgId=${localStorage.getItem('OrganizationId')}&churchId=${localStorage.getItem('GivingChurchId')}&sessionId=${localStorage.getItem('SessionId')}`);\r\n};\r\n","import axios from 'axios';\r\nimport * as types from './actionTypes';\r\nimport { handleError } from '../errors/handleError';\r\nimport { getFmsClientId } from '../apis/FmsIdApi';\r\n\r\nexport function errorHandler(dispatch, error, type) {\r\n const errorMessage = handleError(error, true);\r\n\r\n dispatch({\r\n type,\r\n error: errorMessage,\r\n });\r\n}\r\n\r\nexport function getForms(type) {\r\n return function (dispatch) {\r\n dispatch({\r\n type: types.GET_FORMS_PENDING,\r\n });\r\n return axios.get(`${window.GENESIS_CMS_API_URL}/v3/forms?queryType=${type}&token=${window.genesisToken()}&sessionid=${localStorage.getItem('SessionId')}`)\r\n .then((response) => {\r\n dispatch({\r\n type: types.GET_FORMS_SUCCESS,\r\n payload: response.data.data,\r\n });\r\n })\r\n .catch((error) => {\r\n errorHandler(dispatch, error.response, types.GET_FORMS_FAILED);\r\n });\r\n };\r\n}\r\n\r\nexport function getCurrentFmsId() {\r\n return getFmsClientId()\r\n .then((response) => {\r\n localStorage.setItem('FmsId', response.data.data);\r\n })\r\n .catch(() => {\r\n });\r\n}\r\n"],"sourceRoot":""}