{"version":3,"sources":["aws-exports.js","aws-exports-adjusted.js","components/XeroLoginButton/index.js","components/Loading/LoadingContext.js","components/User/user.js","components/Loading/UserLoadingScreen.js","components/Navigation/RequireAuth.js","graphql/mutations.js","graphql/queries.js","components/Loading/LoadingContent.js","components/Term/terms.txt","components/Privacy/privacy.txt","components/Privacy/PrivacyLink.js","components/Term/TermLink.js","components/Pages/Dashboard.js","components/Plan/AddPlan.js","components/Message/index.js","components/Pages/Plans.js","components/XeroConnectButton/connect-blue.svg","components/Alert/AlertContext.js","components/Alert/useAlert.js","components/XeroConnectButton/index.js","components/XeroDisconnectButton/disconnect-white.svg","components/XeroDisconnectButton/index.js","components/Pages/Connections.js","components/CopyButton/copyButton.js","components/SiteConnection/AddSiteConnection.js","components/SiteConnection/SiteConnectionRemoveButton.js","components/Pages/Sites.js","components/UsageLog/index.js","components/Pages/Logs.js","components/Alert/index.js","logo.svg","components/Pages/LoggedInPageLayout.js","App.js","reportWebVitals.js","index.js"],"names":["awsmobile","redirectLink","oauthSection","awsConfig","oauth","redirectSignIn","redirectSignOut","domain","updatedAwsConfig","Auth","cookieStorage","process","path","expires","sameSite","secure","XeroLoginButton","props","ButtonText","signUp","className","onClick","handleLoginClick","type","src","alt","LoadingContext","createContext","isLoading","setLoading","LoadingProvider","children","params","URL","document","location","searchParams","useState","has","value","Provider","useLoading","context","useContext","Error","configure","UserContext","React","UserProvider","user","setUser","navigate","useNavigate","state","useLocation","useEffect","getUser","currentAuthenticatedUser","then","userData","catch","console","log","Hub","listen","payload","event","data","eraseCookie","name","cookie","login","signup","cookies","split","i","length","federatedSignIn","customProvider","logout","signOut","values","useMemo","useUser","undefined","UserLoadingScreen","showScreen","setShowScreen","timer","setTimeout","clearTimeout","fill","viewBox","xmlns","clipRule","d","fillRule","RequireAuth","to","replace","pathname","HideLoginFromUsers","addPlan","acceptTerms","listXeroOnboardings","planByOwner","LoadingContent","PrivacyLink","open","setOpen","text","setText","fetch","textfile","response","textContent","Root","show","as","Fragment","onClose","Child","enter","enterFrom","enterTo","leave","leaveFrom","leaveTo","Overlay","Title","TermLink","isAccepting","setIsAccepting","titleRef","useRef","termsAccepted","termTitleContent","content","disabled","acceptTermsHandler","initialFocus","ref","Amplify","Dashboard","isLoadingOnboarding","setIsLoadingOnboarding","setTermsAccepted","connectionCreated","setConnectionCreated","planAdded","setPlanAdded","apiCredentialsCreated","setApiCredentialsCreated","isXeroSignUpUser","setIsXeroSignUpUser","API","graphql","query","authMode","onboardingData","items","usedSignUpWithXero","fetchOnboarding","handleAccept","e","target","checked","consolidatedErrors","errors","map","elem","message","join","handleAcceptTermsFromModal","credentials","attributes","sub","installationInstructionsForXeroSignUps","window","id","onChange","htmlFor","href","given_name","AddPlan","action","rows","onChangeHandler","placeholder","handleAddPlanClick","Message","ExclamationIcon","CheckCircleIcon","initialState","foomanSerialNumber","Plans","formState","setFormState","isLoadingPlans","setIsLoadingPlans","formErrorState","setFormErrorState","plans","setPlans","fetchPlans","useCallback","variables","owner","username","planData","plan","displayErrors","forEach","element","push","error","maybeXeroDelayNotice","maybeSerialNumberInput","key","planName","includedRequestsPerMonth","planStatus","foomanPlanId","AlertContext","AlertProvider","alert","setAlert","alertText","setAlertText","success","timeout","clear","useAlert","handleConnectClick","url","xeroConsentUrlDataAccess","XeroConnectButton","ConnectXeroButton","XeroDisconnectButton","isDisconnecting","setIsDisconnecting","cancelButtonRef","disconnectTitleContent","disconnectHandler","tenantId","DisconnectXeroButton","Connections","isLoadingConnections","setIsLoadingConnections","connections","setConnections","queryParams","setQueryParams","fetchConnections","connectionData","xeroConnections","parsedParams","URLSearchParams","search","Object","fromEntries","handleDisconnectClick","filter","connection","connectionList","tenantName","connectionStatus","isDemoOrg","status","msg","CopyButton","commandCopyForElement","setCommandCopyForElement","copyContent","buttonTitle","finalButtonTitle","handleCopyClick","title","CheckIcon","DocumentDuplicateIcon","AddSiteConnection","addSiteConnectionHandler","sites","useForm","register","handleSubmit","unconnectedConnections","result","siteConnection","buttonContent","connectionInput","planInput","associatedDomain","onSubmit","SiteConnectionRemoveButton","isDeleting","setIsDeleting","deleteTitleContent","foomanApiKey","Sites","isLoadingSites","setIsLoadingSites","listErrorState","setListErrorState","setSites","fetchSites","xeroSiteConnectionByOwner","site","siteConnectionStatus","xeroConnectionByOwner","handleSiteConnectionAdd","input","handleSiteDisconnectClick","apiKey","foomanApiSecret","addSiteConnections","echarts","TitleComponent","LegendComponent","TooltipComponent","GridComponent","LineChart","CanvasRenderer","UsageLog","isLoadingUsage","setIsLoadingUsage","usage","setUsage","fetchUsage","usageData","getUsage","usageList","entry","label","style","height","width","option","xAxis","x","yAxis","tooltip","trigger","legend","orient","top","series","yAxisIndex","Logs","isLoadingLogs","setIsLoadingLogs","logs","setLogs","fetchLogs","sortDirection","logData","actionLogByOwner","options","year","month","day","hour","minute","logList","Date","createdAt","toLocaleDateString","Alert","_excluded","_extends","assign","bind","arguments","source","prototype","hasOwnProperty","call","apply","this","_objectWithoutProperties","excluded","sourceKeys","keys","indexOf","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","SvgLogo","_ref","svgRef","titleId","xmlnsXlink","xmlSpace","strokeLinejoin","strokeMiterlimit","transform","ForwardRef","classNames","classes","Boolean","LoggedInPageLayout","navigation","current","templateUser","family_name","userNavigation","onclick","handleLinkClick","destination","stopPropagation","item","email","Button","UserIcon","Items","Item","active","XIcon","MenuIcon","Panel","App","Home","exact","reportWebVitals","onPerfEntry","Function","getCLS","getFID","getFCP","getLCP","getTTFB","ReactDOM","render","StrictMode","getElementById"],"mappings":"qNAsDeA,EAnDG,CACd,mBAAsB,YACtB,uBAA0B,CACtB,CACI,KAAQ,UACR,SAAY,8DACZ,OAAU,cAGlB,4BAA+B,iFAC/B,mBAAsB,YACtB,+BAAkC,4BAClC,6BAAgC,iDAChC,mBAAsB,YACtB,kBAAqB,sBACrB,6BAAgC,6BAChC,MAAS,CACL,OAAU,mDACV,MAAS,CACL,QACA,QACA,SACA,UACA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FzM,KAAK,eACLyM,QACI,cAAC,EAAW,UACR,cAAC,GAAkB,UACf,cAAC,GAAW,UAK5B,cAAC,IAAK,CACFzM,KAAK,WACLyM,QACI,cAAC,EAAW,UACR,cAAC,GAAkB,UACf,cAAC,GAAK,UAKtB,cAAC,IAAK,CACFzM,KAAK,QACLyM,QACI,cAAC,EAAW,UACR,cAAC,GAAkB,UACf,cAAC,GAAI,UAKrB,cAAC,IAAK,CACFkN,OAAK,EACL3Z,KAAK,IACLyM,QACI,cAAC,EAAkB,UACf,cAACiN,EAAI,YAUjC,ECvFeE,GAZS,SAAAC,GAClBA,GAAeA,aAAuBC,UACxC,8BAAqBhX,MAAK,YAAkD,IAA/CiX,EAAM,EAANA,OAAQC,EAAM,EAANA,OAAQC,EAAM,EAANA,OAAQC,EAAM,EAANA,OAAQC,EAAO,EAAPA,QAC3DJ,EAAOF,GACPG,EAAOH,GACPI,EAAOJ,GACPK,EAAOL,GACPM,EAAQN,EACV,GAEJ,E,UCEA3R,IAAQjG,UAAU1C,GAElB6a,IAASC,OACP,cAAC,IAAMC,WAAU,UACb,cAAC,KAAa,UACV,cAAC,EAAa,UACV,cAACpZ,EAAe,UACZ,cAAC,EAAY,UACT,cAAC,GAAG,cAMxBI,SAASiZ,eAAe,SAM1BX,I","file":"static/js/main.03b6b494.chunk.js","sourcesContent":["/* eslint-disable */\n// WARNING: DO NOT EDIT. This file is automatically generated by AWS Amplify. It will be overwritten.\n\nconst awsmobile = {\n \"aws_project_region\": \"us-east-1\",\n \"aws_cloud_logic_custom\": [\n {\n \"name\": \"apirest\",\n \"endpoint\": \"https://uj49ay0do5.execute-api.us-east-1.amazonaws.com/prod\",\n \"region\": \"us-east-1\"\n }\n ],\n \"aws_appsync_graphqlEndpoint\": \"https://agz6divzezbaxaea3w4vsa5puy.appsync-api.us-east-1.amazonaws.com/graphql\",\n \"aws_appsync_region\": \"us-east-1\",\n \"aws_appsync_authenticationType\": \"AMAZON_COGNITO_USER_POOLS\",\n \"aws_cognito_identity_pool_id\": \"us-east-1:ec68deef-df9c-4c20-b50c-7d9d6cc41f59\",\n \"aws_cognito_region\": \"us-east-1\",\n \"aws_user_pools_id\": \"us-east-1_I661eJ8CC\",\n \"aws_user_pools_web_client_id\": \"5t85d1q229roi6ah8h5qipnba7\",\n \"oauth\": {\n \"domain\": \"xerosignin-prod.auth.us-east-1.amazoncognito.com\",\n \"scope\": [\n \"phone\",\n \"email\",\n \"openid\",\n \"profile\",\n \"aws.cognito.signin.user.admin\"\n ],\n \"redirectSignIn\": \"https://develop.db8a0ep3im830.amplifyapp.com/,http://localhost:3000/\",\n \"redirectSignOut\": \"https://develop.db8a0ep3im830.amplifyapp.com/,http://localhost:3000/\",\n \"responseType\": \"code\"\n },\n \"federationTarget\": \"COGNITO_USER_POOLS\",\n \"aws_cognito_username_attributes\": [\n \"EMAIL\"\n ],\n \"aws_cognito_social_providers\": [],\n \"aws_cognito_signup_attributes\": [\n \"EMAIL\"\n ],\n \"aws_cognito_mfa_configuration\": \"OFF\",\n \"aws_cognito_mfa_types\": [\n \"SMS\"\n ],\n \"aws_cognito_password_protection_settings\": {\n \"passwordPolicyMinLength\": 8,\n \"passwordPolicyCharacters\": []\n },\n \"aws_cognito_verification_mechanisms\": [\n \"EMAIL\"\n ]\n};\n\n\nexport default awsmobile;\n","import awsConfig from \"./aws-exports\";\nconst redirectLink = process.env.REACT_APP_COOKIE_DOMAIN ? \"https://\"+process.env.REACT_APP_COOKIE_DOMAIN : 'http://localhost:3000/';\n\nconst oauthSection = {\n ...awsConfig.oauth,\n redirectSignIn: redirectLink,\n redirectSignOut: redirectLink,\n domain: process.env.REACT_APP_COOKIE_DOMAIN ? 'auth.'+process.env.REACT_APP_COOKIE_DOMAIN : 'auth.connect-dev.fooman.com'\n};\nconst updatedAwsConfig = {\n ...awsConfig,\n oauth: {\n ...oauthSection,\n },\n Auth: {\n ...awsConfig,\n oauth: {\n ...oauthSection,\n },\n cookieStorage: {\n domain: process.env.REACT_APP_COOKIE_DOMAIN ? process.env.REACT_APP_COOKIE_DOMAIN : 'localhost',\n path: \"/\",\n expires: 1,\n sameSite: \"strict\",\n secure: process.env.REACT_APP_COOKIE_DOMAIN ? true : false,\n }\n }\n //storage: sessionStorage\n}\n\nexport default updatedAwsConfig;","import React from 'react';\n\nconst XeroLoginButton = (props) => {\n const ButtonText = props.signUp ? \"Sign Up with Xero\" : \"Sign In with Xero\";\n return (\n
\n
\n

\n Fooman Connect\n

\n

\n Login with Xero to get started.\n

\n props.handleLoginClick()}\n type=\"button\"\n className=\"font-xero inline-flex items-center px-6 py-3 border border-transparent shadow-sm text-base font-medium rounded-md bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-500\"\n >\n \"Xero\n {ButtonText}\n \n
\n
\n );\n};\n\nexport default XeroLoginButton;\n","import { createContext, useContext, useState } from \"react\";\n\nconst LoadingContext = createContext({\n isLoading: false,\n setLoading: null,\n});\n\nexport function LoadingProvider({ children }) {\n let params = (new URL(document.location)).searchParams;\n const [isLoading, setLoading] = useState(params.has('code')?\"Getting User Details\":\"Loading Page\");\n const value = { isLoading, setLoading };\n return (\n {children}\n );\n}\n\nexport function useLoading() {\n const context = useContext(LoadingContext);\n if (!context) {\n throw new Error(\"useLoading must be used within LoadingProvider\");\n }\n return context;\n}","import React, {useEffect} from 'react';\nimport {Auth, Hub} from 'aws-amplify';\nimport awsConfig from './../../aws-exports-adjusted';\nimport { useLoading } from \"../Loading/LoadingContext\";\nimport { useNavigate, useLocation } from 'react-router-dom'\n//TODO\n//token refresh\n//https://docs.amplify.aws/lib/auth/advanced/q/platform/js/#token-refresh\nAuth.configure(awsConfig);\n\n// Create a context that will hold the values that we are going to expose to our components.\n// Don't worry about the `null` value. It's gonna be *instantly* overriden by the component below\nexport const UserContext = React.createContext(null);\n\n// Create a \"controller\" component that will calculate all the data that we need to give to our\n// components bellow via the `UserContext.Provider` component. This is where the Amplify will be\n// mapped to a different interface, the one that we are going to expose to the rest of the app.\nexport const UserProvider = ({ children }) => {\n const [user, setUser] = React.useState(null);\n const { setLoading } = useLoading();\n const navigate = useNavigate();\n const { state } = useLocation();\n\n useEffect(() => {\n const getUser = () => {\n setLoading(\"Getting User Details\");\n return Auth.currentAuthenticatedUser()\n .then(userData => userData)\n .catch(() => {\n console.log('Not signed in');\n setLoading(false);\n });\n }\n Hub.listen('auth', ({ payload: { event, data } }) => {\n switch (event) {\n case 'signIn':\n case 'cognitoHostedUI':\n getUser().then(userData => setUser(userData));\n navigate(state?.path || \"/dashboard\");\n break;\n case 'signOut':\n setUser(null);\n break;\n case 'signIn_failure':\n case 'cognitoHostedUI_failure':\n console.log('Sign in failure');\n break;\n case 'oAuthSignOut':\n break;\n default:\n break;\n }\n });\n\n getUser().then(userData => {\n setUser(userData);\n setLoading(false)}\n );\n }, [navigate, setLoading, state?.path]);\n\n const eraseCookie = (name) => {\n document.cookie = `${name}=; Max-Age=-99999999;`;\n };\n\n const login = (signup=false) => {\n const cookies = document.cookie.split(\";\");\n for (var i = 0; i < cookies.length; i++)\n eraseCookie(cookies[i].split(\"=\")[0]);\n setLoading(\"Logging in with Xero\");\n if (signup) {\n Auth.federatedSignIn({customProvider: 'XeroSignUp'});\n } else {\n Auth.federatedSignIn({customProvider: 'Xero'});\n }\n }\n\n const logout = () => {\n setLoading(\"Logging out\");\n Auth.signOut().then(data => {\n setUser(null);\n return data;\n });\n }\n\n\n // Make sure to not force a re-render on the components that are reading these values,\n // unless the `user` value has changed. This is an optimisation that is mostly needed in cases\n // where the parent of the current component re-renders and thus the current component is forced\n // to re-render as well. If it does, we want to make sure to give the `UserContext.Provider` the\n // same value as long as the user data is the same. If you have multiple other \"controller\"\n // components or Providers above this component, then this will be a performance booster.\n const values = React.useMemo(() => ({ user, login, logout }), [user]);\n\n // Finally, return the interface that we want to expose to our other components\n return {children};\n};\n\n// We also create a simple custom hook to read these values from. We want our React components\n// to know as little as possible on how everything is handled, so we are not only abtracting them from\n// the fact that we are using React's context, but we also skip some imports.\nexport const useUser = () => {\n const context = React.useContext(UserContext);\n\n if(context === undefined) {\n throw new Error('`useUser` hook must be used within a `UserProvider` component');\n }\n return context;\n};","import React, {useState, useEffect} from 'react';\nimport {useLoading} from \"./LoadingContext\";\n\nexport function UserLoadingScreen() {\n const {isLoading} = useLoading();\n const [showScreen, setShowScreen] = useState(false);\n\n useEffect(() => {\n const timer = setTimeout(() => setShowScreen(true), 350);\n\n return () => clearTimeout(timer);\n });\n return (\n showScreen &&
\n
\n\n \n \n \n\n
{isLoading} ...
\n
\n
\n )\n}\n","import React from 'react';\nimport { Navigate, useLocation } from \"react-router-dom\";\nimport {useUser} from \"../User/user\";\n\nexport const RequireAuth = ({ children }) => {\n const { user } = useUser();\n const location = useLocation();\n return user\n ? children\n : ;\n}\n\nexport const HideLoginFromUsers = ({ children }) => {\n const { user } = useUser();\n return !user\n ? children\n : ;\n}\n","/* eslint-disable */\n// this is an auto generated file. This will be overwritten\n\nexport const addPlan = /* GraphQL */ `\n mutation AddPlan($foomanSerialNumber: String!) {\n addPlan(foomanSerialNumber: $foomanSerialNumber)\n }\n`;\nexport const removeConnection = /* GraphQL */ `\n mutation RemoveConnection($tenantId: String!) {\n removeConnection(tenantId: $tenantId)\n }\n`;\nexport const addSiteConnection = /* GraphQL */ `\n mutation AddSiteConnection($input: AddSiteConnectionInput!) {\n addSiteConnection(input: $input)\n }\n`;\nexport const removeSiteConnection = /* GraphQL */ `\n mutation RemoveSiteConnection($foomanApiKey: String!) {\n removeSiteConnection(foomanApiKey: $foomanApiKey)\n }\n`;\nexport const acceptTerms = /* GraphQL */ `\n mutation AcceptTerms {\n acceptTerms\n }\n`;\n","/* eslint-disable */\n// this is an auto generated file. This will be overwritten\n\nexport const xeroConsentUrlDataAccess = /* GraphQL */ `\n query XeroConsentUrlDataAccess {\n xeroConsentUrlDataAccess\n }\n`;\nexport const xeroConnections = /* GraphQL */ `\n query XeroConnections {\n xeroConnections {\n tenantId\n owner\n ownerEmail\n xeroConnectionId\n authEventId\n tenantName\n isDemoOrg\n connectionStatus\n createdAt\n updatedAt\n __typename\n }\n }\n`;\nexport const getUsage = /* GraphQL */ `\n query GetUsage {\n getUsage {\n label\n data {\n date\n label\n used\n remaining\n __typename\n }\n __typename\n }\n }\n`;\nexport const getPlan = /* GraphQL */ `\n query GetPlan($foomanPlanId: String!) {\n getPlan(foomanPlanId: $foomanPlanId) {\n foomanPlanId\n owner\n xeroSubscriptionId\n foomanSerialNumber\n planName\n planCode\n planStatus\n includedSiteConnections\n includedRequestsPerMonth\n associatedDomain\n usagePlanId\n createdAt\n updatedAt\n __typename\n }\n }\n`;\nexport const listPlans = /* GraphQL */ `\n query ListPlans(\n $foomanPlanId: String\n $filter: ModelPlanFilterInput\n $limit: Int\n $nextToken: String\n $sortDirection: ModelSortDirection\n ) {\n listPlans(\n foomanPlanId: $foomanPlanId\n filter: $filter\n limit: $limit\n nextToken: $nextToken\n sortDirection: $sortDirection\n ) {\n items {\n foomanPlanId\n owner\n xeroSubscriptionId\n foomanSerialNumber\n planName\n planCode\n planStatus\n includedSiteConnections\n includedRequestsPerMonth\n associatedDomain\n usagePlanId\n createdAt\n updatedAt\n __typename\n }\n nextToken\n __typename\n }\n }\n`;\nexport const getXeroConnection = /* GraphQL */ `\n query GetXeroConnection($tenantId: String!) {\n getXeroConnection(tenantId: $tenantId) {\n tenantId\n owner\n ownerEmail\n xeroConnectionId\n authEventId\n tenantName\n isDemoOrg\n connectionStatus\n createdAt\n updatedAt\n __typename\n }\n }\n`;\nexport const listXeroConnections = /* GraphQL */ `\n query ListXeroConnections(\n $tenantId: String\n $filter: ModelXeroConnectionFilterInput\n $limit: Int\n $nextToken: String\n $sortDirection: ModelSortDirection\n ) {\n listXeroConnections(\n tenantId: $tenantId\n filter: $filter\n limit: $limit\n nextToken: $nextToken\n sortDirection: $sortDirection\n ) {\n items {\n tenantId\n owner\n ownerEmail\n xeroConnectionId\n authEventId\n tenantName\n isDemoOrg\n connectionStatus\n createdAt\n updatedAt\n __typename\n }\n nextToken\n __typename\n }\n }\n`;\nexport const getXeroSiteConnection = /* GraphQL */ `\n query GetXeroSiteConnection($foomanApiKey: String!) {\n getXeroSiteConnection(foomanApiKey: $foomanApiKey) {\n foomanApiKey\n siteConnectionStatus\n foomanApiSecret\n apiKeyId\n usagePlanId\n foomanPlanId\n owner\n tenantId\n tenantName\n isDemoOrg\n associatedDomain\n createdAt\n updatedAt\n __typename\n }\n }\n`;\nexport const listXeroSiteConnections = /* GraphQL */ `\n query ListXeroSiteConnections(\n $foomanApiKey: String\n $filter: ModelXeroSiteConnectionFilterInput\n $limit: Int\n $nextToken: String\n $sortDirection: ModelSortDirection\n ) {\n listXeroSiteConnections(\n foomanApiKey: $foomanApiKey\n filter: $filter\n limit: $limit\n nextToken: $nextToken\n sortDirection: $sortDirection\n ) {\n items {\n foomanApiKey\n siteConnectionStatus\n foomanApiSecret\n apiKeyId\n usagePlanId\n foomanPlanId\n owner\n tenantId\n tenantName\n isDemoOrg\n associatedDomain\n createdAt\n updatedAt\n __typename\n }\n nextToken\n __typename\n }\n }\n`;\nexport const getXeroOnboarding = /* GraphQL */ `\n query GetXeroOnboarding($owner: String!) {\n getXeroOnboarding(owner: $owner) {\n owner\n usedSignUpWithXero\n termsAccepted\n connectionCreated\n planAdded\n apiCredentialsCreated\n createdAt\n updatedAt\n __typename\n }\n }\n`;\nexport const listXeroOnboardings = /* GraphQL */ `\n query ListXeroOnboardings(\n $owner: String\n $filter: ModelXeroOnboardingFilterInput\n $limit: Int\n $nextToken: String\n $sortDirection: ModelSortDirection\n ) {\n listXeroOnboardings(\n owner: $owner\n filter: $filter\n limit: $limit\n nextToken: $nextToken\n sortDirection: $sortDirection\n ) {\n items {\n owner\n usedSignUpWithXero\n termsAccepted\n connectionCreated\n planAdded\n apiCredentialsCreated\n createdAt\n updatedAt\n __typename\n }\n nextToken\n __typename\n }\n }\n`;\nexport const getActionLog = /* GraphQL */ `\n query GetActionLog($id: String!) {\n getActionLog(id: $id) {\n id\n status\n owner\n type\n content\n createdAt\n updatedAt\n __typename\n }\n }\n`;\nexport const listActionLogs = /* GraphQL */ `\n query ListActionLogs(\n $id: String\n $filter: ModelActionLogFilterInput\n $limit: Int\n $nextToken: String\n $sortDirection: ModelSortDirection\n ) {\n listActionLogs(\n id: $id\n filter: $filter\n limit: $limit\n nextToken: $nextToken\n sortDirection: $sortDirection\n ) {\n items {\n id\n status\n owner\n type\n content\n createdAt\n updatedAt\n __typename\n }\n nextToken\n __typename\n }\n }\n`;\nexport const planByOwner = /* GraphQL */ `\n query PlanByOwner(\n $owner: String!\n $sortDirection: ModelSortDirection\n $filter: ModelPlanFilterInput\n $limit: Int\n $nextToken: String\n ) {\n planByOwner(\n owner: $owner\n sortDirection: $sortDirection\n filter: $filter\n limit: $limit\n nextToken: $nextToken\n ) {\n items {\n foomanPlanId\n owner\n xeroSubscriptionId\n foomanSerialNumber\n planName\n planCode\n planStatus\n includedSiteConnections\n includedRequestsPerMonth\n associatedDomain\n usagePlanId\n createdAt\n updatedAt\n __typename\n }\n nextToken\n __typename\n }\n }\n`;\nexport const xeroConnectionByOwner = /* GraphQL */ `\n query XeroConnectionByOwner(\n $owner: String!\n $sortDirection: ModelSortDirection\n $filter: ModelXeroConnectionFilterInput\n $limit: Int\n $nextToken: String\n ) {\n xeroConnectionByOwner(\n owner: $owner\n sortDirection: $sortDirection\n filter: $filter\n limit: $limit\n nextToken: $nextToken\n ) {\n items {\n tenantId\n owner\n ownerEmail\n xeroConnectionId\n authEventId\n tenantName\n isDemoOrg\n connectionStatus\n createdAt\n updatedAt\n __typename\n }\n nextToken\n __typename\n }\n }\n`;\nexport const siteConnectionByPlanAndStatus = /* GraphQL */ `\n query SiteConnectionByPlanAndStatus(\n $foomanPlanId: String!\n $siteConnectionStatus: ModelStringKeyConditionInput\n $sortDirection: ModelSortDirection\n $filter: ModelXeroSiteConnectionFilterInput\n $limit: Int\n $nextToken: String\n ) {\n siteConnectionByPlanAndStatus(\n foomanPlanId: $foomanPlanId\n siteConnectionStatus: $siteConnectionStatus\n sortDirection: $sortDirection\n filter: $filter\n limit: $limit\n nextToken: $nextToken\n ) {\n items {\n foomanApiKey\n siteConnectionStatus\n foomanApiSecret\n apiKeyId\n usagePlanId\n foomanPlanId\n owner\n tenantId\n tenantName\n isDemoOrg\n associatedDomain\n createdAt\n updatedAt\n __typename\n }\n nextToken\n __typename\n }\n }\n`;\nexport const xeroSiteConnectionByOwner = /* GraphQL */ `\n query XeroSiteConnectionByOwner(\n $owner: String!\n $sortDirection: ModelSortDirection\n $filter: ModelXeroSiteConnectionFilterInput\n $limit: Int\n $nextToken: String\n ) {\n xeroSiteConnectionByOwner(\n owner: $owner\n sortDirection: $sortDirection\n filter: $filter\n limit: $limit\n nextToken: $nextToken\n ) {\n items {\n foomanApiKey\n siteConnectionStatus\n foomanApiSecret\n apiKeyId\n usagePlanId\n foomanPlanId\n owner\n tenantId\n tenantName\n isDemoOrg\n associatedDomain\n createdAt\n updatedAt\n __typename\n }\n nextToken\n __typename\n }\n }\n`;\nexport const onboardingByCreatedAt = /* GraphQL */ `\n query OnboardingByCreatedAt(\n $createdAt: AWSDateTime!\n $sortDirection: ModelSortDirection\n $filter: ModelXeroOnboardingFilterInput\n $limit: Int\n $nextToken: String\n ) {\n onboardingByCreatedAt(\n createdAt: $createdAt\n sortDirection: $sortDirection\n filter: $filter\n limit: $limit\n nextToken: $nextToken\n ) {\n items {\n owner\n usedSignUpWithXero\n termsAccepted\n connectionCreated\n planAdded\n apiCredentialsCreated\n createdAt\n updatedAt\n __typename\n }\n nextToken\n __typename\n }\n }\n`;\nexport const actionLogByOwner = /* GraphQL */ `\n query ActionLogByOwner(\n $owner: String!\n $createdAt: ModelStringKeyConditionInput\n $sortDirection: ModelSortDirection\n $filter: ModelActionLogFilterInput\n $limit: Int\n $nextToken: String\n ) {\n actionLogByOwner(\n owner: $owner\n createdAt: $createdAt\n sortDirection: $sortDirection\n filter: $filter\n limit: $limit\n nextToken: $nextToken\n ) {\n items {\n id\n status\n owner\n type\n content\n createdAt\n updatedAt\n __typename\n }\n nextToken\n __typename\n }\n }\n`;\nexport const invoicesByOrganisation = /* GraphQL */ `\n query InvoicesByOrganisation(\n $tenantId: String!\n $updatedAt: ModelStringKeyConditionInput\n $sortDirection: ModelSortDirection\n $filter: ModelXeroPaidInvoiceFilterInput\n $limit: Int\n $nextToken: String\n ) {\n invoicesByOrganisation(\n tenantId: $tenantId\n updatedAt: $updatedAt\n sortDirection: $sortDirection\n filter: $filter\n limit: $limit\n nextToken: $nextToken\n ) {\n items {\n xeroInvoiceId\n xeroInvoiceNumber\n xeroReference\n tenantId\n createdAt\n updatedAt\n owner\n __typename\n }\n nextToken\n __typename\n }\n }\n`;\nexport const invoicesByOrganisationAndReference = /* GraphQL */ `\n query InvoicesByOrganisationAndReference(\n $tenantId: String!\n $xeroReference: ModelStringKeyConditionInput\n $sortDirection: ModelSortDirection\n $filter: ModelXeroPaidInvoiceFilterInput\n $limit: Int\n $nextToken: String\n ) {\n invoicesByOrganisationAndReference(\n tenantId: $tenantId\n xeroReference: $xeroReference\n sortDirection: $sortDirection\n filter: $filter\n limit: $limit\n nextToken: $nextToken\n ) {\n items {\n xeroInvoiceId\n xeroInvoiceNumber\n xeroReference\n tenantId\n createdAt\n updatedAt\n owner\n __typename\n }\n nextToken\n __typename\n }\n }\n`;\nexport const subscriptionByOrganisation = /* GraphQL */ `\n query SubscriptionByOrganisation(\n $tenantId: String!\n $sortDirection: ModelSortDirection\n $filter: ModelXeroSubscriptionFilterInput\n $limit: Int\n $nextToken: String\n ) {\n subscriptionByOrganisation(\n tenantId: $tenantId\n sortDirection: $sortDirection\n filter: $filter\n limit: $limit\n nextToken: $nextToken\n ) {\n items {\n xeroSubscriptionId\n owner\n status\n tenantId\n createdAt\n currentPeriodEnd\n endDate\n updatedAt\n __typename\n }\n nextToken\n __typename\n }\n }\n`;\n","import React from \"react\";\nconst LoadingContent = () => {\n return (\n \n \n \n )\n}\nexport default LoadingContent;","export default __webpack_public_path__ + \"static/media/terms.f725d815.txt\";","export default __webpack_public_path__ + \"static/media/privacy.f37553f4.txt\";","import React, {Fragment, useState, useEffect} from 'react';\nimport { Dialog, Transition } from '@headlessui/react';\nimport textfile from \"./privacy.txt\";\n\nconst PrivacyLink = (props) => {\n const [open, setOpen] = useState(false);\n const [text, setText] = useState(\"Loading...\");\n\n useEffect(() => {\n fetch(textfile)\n .then((response) => response.text())\n .then((textContent) => {\n setText(textContent);\n });\n return text || \"Loading...\";\n }, [text]);\n\n return (\n \n \n \n
\n \n \n \n\n {/* This element is to trick the browser into centering the modal contents. */}\n \n ​\n \n \n
\n
\n
\n \n Fooman - Privacy Policy\n \n
\n
\n                                                {text}\n                                            
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n setOpen(true)} >Privacy Policy\n
\n );\n};\n\nexport default PrivacyLink;\n","import React, {Fragment, useRef, useState, useEffect} from 'react';\nimport { Dialog, Transition } from '@headlessui/react';\nimport LoadingContent from \"../Loading/LoadingContent\";\nimport textfile from \"./terms.txt\";\nimport PrivacyLink from \"../Privacy/PrivacyLink\";\n\nconst TermLink = (props) => {\n const [open, setOpen] = useState(false);\n const [isAccepting, setIsAccepting] = useState(false);\n const titleRef = useRef(null);\n const {termsAccepted} = props;\n const [text, setText] = useState(\"Loading...\");\n\n useEffect(() => {\n fetch(textfile)\n .then((response) => response.text())\n .then((textContent) => {\n setText(textContent);\n });\n return text || \"Loading...\";\n }, [text]);\n\n const termTitleContent = isAccepting?\n Terms and Conditions / Accepting ...:\n 'Terms and Conditions';\n\n const content = isAccepting?\n :\n (termsAccepted ?\n :\n {setIsAccepting(true); props.acceptTermsHandler(setOpen, setIsAccepting);}}\n >\n Accept\n )\n ;\n\n return (\n \n \n \n
\n \n \n \n\n {/* This element is to trick the browser into centering the modal contents. */}\n \n ​\n \n \n
\n
\n
\n \n {termTitleContent}\n \n
\n
\n                                                {text}\n                                            
\n
\n
\n
\n
\n {content}\n \n
\n
\n \n
\n
\n
\n setOpen(true)} >Terms and Conditions\n
\n );\n};\n\nexport default TermLink;\n","import React, { Fragment, useEffect, useState } from 'react'\nimport {useUser} from \"../User/user\";\nimport { Amplify, API } from 'aws-amplify'\nimport awsConfig from \"../../aws-exports-adjusted\";\nimport {acceptTerms} from \"../../graphql/mutations\";\nimport {listXeroOnboardings} from \"../../graphql/queries\";\nimport TermLink from \"../Term/TermLink\";\nimport LoadingContent from \"../Loading/LoadingContent\";\nimport { useNavigate } from 'react-router-dom';\nAmplify.configure(awsConfig);\n\nconst Dashboard = (props) => {\n const { user } = useUser();\n const navigate = useNavigate();\n const [isLoadingOnboarding, setIsLoadingOnboarding] = useState(false);\n const [termsAccepted, setTermsAccepted] = useState(false);\n const [connectionCreated, setConnectionCreated] = useState(false);\n const [planAdded, setPlanAdded] = useState(false);\n const [apiCredentialsCreated, setApiCredentialsCreated] = useState(false);\n const [isXeroSignUpUser, setIsXeroSignUpUser] = useState(false);\n \n useEffect(() => {\n fetchOnboarding();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n async function fetchOnboarding() {\n setIsLoadingOnboarding(true);\n try {\n const onboardingData = await API.graphql({\n query: listXeroOnboardings,\n authMode: 'AMAZON_COGNITO_USER_POOLS'\n }\n );\n if (onboardingData.data.listXeroOnboardings.items.length > 0) {\n setTermsAccepted(onboardingData.data.listXeroOnboardings.items[0].termsAccepted);\n setConnectionCreated(onboardingData.data.listXeroOnboardings.items[0].connectionCreated);\n setPlanAdded(onboardingData.data.listXeroOnboardings.items[0].planAdded);\n setApiCredentialsCreated(onboardingData.data.listXeroOnboardings.items[0].apiCredentialsCreated);\n setIsXeroSignUpUser(onboardingData.data.listXeroOnboardings.items[0].usedSignUpWithXero);\n }\n } catch (err) {\n console.log('error fetching accepted terms')\n } finally {\n setIsLoadingOnboarding(false);\n }\n }\n\n const handleAccept = async(e) => {\n if (e.target.checked) {\n try {\n await API.graphql({\n query: acceptTerms,\n authMode: 'AMAZON_COGNITO_USER_POOLS'\n });\n setTermsAccepted(true);\n } catch (err) {\n const consolidatedErrors = err.errors.map(function(elem){return elem.message;}).join(\",\");\n console.log(consolidatedErrors);\n } finally {\n }\n }\n }\n\n const handleAcceptTermsFromModal = async(setOpen, setIsAccepting) => {\n try {\n await API.graphql({\n query: acceptTerms,\n authMode: 'AMAZON_COGNITO_USER_POOLS'\n });\n setTermsAccepted(true);\n } catch (err) {\n const consolidatedErrors = err.errors.map(function(elem){return elem.message;}).join(\",\");\n console.log(consolidatedErrors);\n } finally {\n setOpen(false);\n setIsAccepting(false);\n }\n }\n const credentials = user.attributes? (user.attributes.sub.split('-')[0]+':'+user.attributes.sub.split('-')[1]):'';\n const installationInstructionsForXeroSignUps = isXeroSignUpUser ?\n
\n

Installation Instructions

\n
\n From a command line in your Magento root folder run\n
\n
\n \n 1. composer config repositories.foomanconnect composer https://{credentials}@repo-connect.fooman.com{\"\\n\"}\n 2. composer require fooman/connect-sub-m2:^8.0{\"\\n\"}\n 3. bin/magento module:enable Fooman_ConnectLicenseSub Fooman_Connect{\"\\n\"}\n 4. bin/magento setup:upgrade{\"\\n\"}\n \n
\n\n
\n If you are using Production Mode please also run\n
\n
\n \n 5. bin/magento setup:static-content:deploy{\"\\n\"}\n 6. bin/magento setup:di:compile{\"\\n\"}\n \n
\n
\n Once installed please follow our setup guide to configure the integration to your requirements:
\n window.location ='https://magento2-support.fooman.co.nz/article/1299-2-enter-api-credentials'}\n className=\"mt-2 inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm hover:text-white hover:bg-gray-600 bg-foomanyellow text-black focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-500\">\n View Setup Guide\n \n
\n
\n : null;\n\n const content = isLoadingOnboarding ?\n :\n
\n
\n
\n \n
\n
\n \n
\n
\n \n
\n \n
\n \n
\n
\n \n
;\n\n return (\n \n
\n
\n

Dashboard

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

Hi {user.attributes?user.attributes.given_name:''}, let's get you set up as quickly as possible.

\n
\n {content}\n
\n
\n {installationInstructionsForXeroSignUps}\n
\n
\n );\n}\n\nexport default Dashboard;","import React, { Fragment } from 'react';\n\nconst AddPlan = (props) => {\n return (\n \n
\n
\n
\n \n \n