@medplum/react 0.9.31 → 0.9.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -37,9 +37,9 @@ function getGoogleClientId(clientId) {
37
37
  return clientId;
38
38
  }
39
39
  const origin = window.location.protocol + '//' + window.location.host;
40
- const authorizedOrigins = (_b = (_a = "http://localhost:3000,http://127.0.0.1:3000,http://localhost:6006,http://127.0.0.1:6006,https://app.medplum.com,https://docs.medplum.com") === null || _a === void 0 ? void 0 : _a.split(',')) !== null && _b !== void 0 ? _b : [];
40
+ const authorizedOrigins = (_b = (_a = "undefined") === null || _a === void 0 ? void 0 : _a.split(',')) !== null && _b !== void 0 ? _b : [];
41
41
  if (authorizedOrigins.includes(origin)) {
42
- return "921088377005-3j1sa10vr6hj86jgmdfh2l53v3mp7lfi.apps.googleusercontent.com";
42
+ return "undefined";
43
43
  }
44
44
  return undefined;
45
45
  }
@@ -1 +1 @@
1
- {"version":3,"file":"GoogleButton.js","sources":["../../src/GoogleButton.tsx"],"sourcesContent":["import { GoogleCredentialResponse } from '@medplum/core';\nimport React, { useEffect, useRef, useState } from 'react';\nimport { useMedplum } from './MedplumProvider';\nimport { createScriptTag } from './utils';\n\ninterface GoogleApi {\n accounts: {\n id: {\n initialize: (args: any) => void;\n renderButton: (parent: HTMLElement, args: any) => void;\n };\n };\n}\n\ndeclare const google: GoogleApi;\n\nexport interface GoogleButtonProps {\n readonly googleClientId?: string;\n readonly handleGoogleCredential: (response: GoogleCredentialResponse) => void;\n}\n\nexport function GoogleButton(props: GoogleButtonProps): JSX.Element | null {\n const medplum = useMedplum();\n const { googleClientId, handleGoogleCredential } = props;\n const parentRef = useRef<HTMLDivElement>(null);\n const [scriptLoaded, setScriptLoaded] = useState<boolean>(typeof google !== 'undefined');\n const [initialized, setInitialized] = useState<boolean>(false);\n const [buttonRendered, setButtonRendered] = useState<boolean>(false);\n\n useEffect(() => {\n if (typeof google === 'undefined') {\n createScriptTag('https://accounts.google.com/gsi/client', () => setScriptLoaded(true));\n return;\n }\n\n if (!initialized) {\n google.accounts.id.initialize({\n client_id: googleClientId,\n callback: handleGoogleCredential,\n });\n setInitialized(true);\n }\n\n if (parentRef.current && !buttonRendered) {\n google.accounts.id.renderButton(parentRef.current, {});\n setButtonRendered(true);\n }\n }, [medplum, googleClientId, initialized, scriptLoaded, parentRef, buttonRendered, handleGoogleCredential]);\n\n if (!googleClientId) {\n return null;\n }\n\n return <div ref={parentRef} />;\n}\n\nexport function getGoogleClientId(clientId: string | undefined): string | undefined {\n if (clientId) {\n return clientId;\n }\n\n const origin = window.location.protocol + '//' + window.location.host;\n const authorizedOrigins = process.env.GOOGLE_AUTH_ORIGINS?.split(',') ?? [];\n if (authorizedOrigins.includes(origin)) {\n return process.env.GOOGLE_CLIENT_ID;\n }\n\n return undefined;\n}\n"],"names":[],"mappings":";;;;AAqBM,SAAU,YAAY,CAAC,KAAwB,EAAA;AACnD,IAAA,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;AAC7B,IAAA,MAAM,EAAE,cAAc,EAAE,sBAAsB,EAAE,GAAG,KAAK,CAAC;AACzD,IAAA,MAAM,SAAS,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;AAC/C,IAAA,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAU,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC;IACzF,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAU,KAAK,CAAC,CAAC;IAC/D,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAU,KAAK,CAAC,CAAC;IAErE,SAAS,CAAC,MAAK;AACb,QAAA,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;YACjC,eAAe,CAAC,wCAAwC,EAAE,MAAM,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;YACvF,OAAO;AACR,SAAA;QAED,IAAI,CAAC,WAAW,EAAE;A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CAAC,MAAM,CAAC,EAAE;AACtC,QAAA,OAAO,0EAA4B,CAAC;AACrC,KAAA;AAED,IAAA,OAAO,SAAS,CAAC;AACnB;;;;"}
1
+ {"version":3,"file":"GoogleButton.js","sources":["../../src/GoogleButton.tsx"],"sourcesContent":["import { GoogleCredentialResponse } from '@medplum/core';\nimport React, { useEffect, useRef, useState } from 'react';\nimport { useMedplum } from './MedplumProvider';\nimport { createScriptTag } from './utils';\n\ninterface GoogleApi {\n accounts: {\n id: {\n initialize: (args: any) => void;\n renderButton: (parent: HTMLElement, args: any) => void;\n };\n };\n}\n\ndeclare const google: GoogleApi;\n\nexport interface GoogleButtonProps {\n readonly googleClientId?: string;\n readonly handleGoogleCredential: (response: GoogleCredentialResponse) => void;\n}\n\nexport function GoogleButton(props: GoogleButtonProps): JSX.Element | null {\n const medplum = useMedplum();\n const { googleClientId, handleGoogleCredential } = props;\n const parentRef = useRef<HTMLDivElement>(null);\n const [scriptLoaded, setScriptLoaded] = useState<boolean>(typeof google !== 'undefined');\n const [initialized, setInitialized] = useState<boolean>(false);\n const [buttonRendered, setButtonRendered] = useState<boolean>(false);\n\n useEffect(() => {\n if (typeof google === 'undefined') {\n createScriptTag('https://accounts.google.com/gsi/client', () => setScriptLoaded(true));\n return;\n }\n\n if (!initialized) {\n google.accounts.id.initialize({\n client_id: googleClientId,\n callback: handleGoogleCredential,\n });\n setInitialized(true);\n }\n\n if (parentRef.current && !buttonRendered) {\n google.accounts.id.renderButton(parentRef.current, {});\n setButtonRendered(true);\n }\n }, [medplum, googleClientId, initialized, scriptLoaded, parentRef, buttonRendered, handleGoogleCredential]);\n\n if (!googleClientId) {\n return null;\n }\n\n return <div ref={parentRef} />;\n}\n\nexport function getGoogleClientId(clientId: string | undefined): string | undefined {\n if (clientId) {\n return clientId;\n }\n\n const origin = window.location.protocol + '//' + window.location.host;\n const authorizedOrigins = process.env.GOOGLE_AUTH_ORIGINS?.split(',') ?? [];\n if (authorizedOrigins.includes(origin)) {\n return process.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,EAAE,cAAc,EAAE,sBAAsB,CAAC,CAAC,CAAC;IAE5G,IAAI,CAAC,cAAc,EAAE;AACnB,QAAA,OAAO,IAAI,CAAC;AACb,KAAA;AAED,IAAA,OAAO,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,GAAG,EAAE,SAAS,GAAI,CAAC;AACjC,CAAC;AAEK,SAAU,iBAAiB,CAAC,QAA4B,EAAA;;AAC5D,IAAA,IAAI,QAAQ,EAAE;AACZ,QAAA,OAAO,QAAQ,CAAC;AACjB,KAAA;AAED,IAAA,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,GAAG,IAAI,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;AACtE,IAAA,MAAM,iBAAiB,GAAG,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,WAA+B,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAE,KAAK,CAAC,GAAG,CAAC,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAI,EAAE,CAAC;AAC5E,IAAA,IAAI,iBAAiB,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;AACtC,QAAA,OAAO,WAA4B,CAAC;AACrC,KAAA;AAED,IAAA,OAAO,SAAS,CAAC;AACnB;;;;"}
@@ -31,7 +31,7 @@ function RegisterForm(props) {
31
31
  }
32
32
  return (React.createElement(Document, { width: 450 },
33
33
  outcome && React.createElement("pre", null, JSON.stringify(outcome, null, 2)),
34
- !login && (React.createElement(NewUserForm, { projectId: projectId, googleClientId: googleClientId, recaptchaSiteKey: recaptchaSiteKey, handleAuthResponse: handleAuthResponse })),
34
+ !login && (React.createElement(NewUserForm, { projectId: projectId, googleClientId: googleClientId, recaptchaSiteKey: recaptchaSiteKey, handleAuthResponse: handleAuthResponse }, props.children)),
35
35
  login && type === 'project' && React.createElement(NewProjectForm, { login: login, handleAuthResponse: handleAuthResponse })));
36
36
  }
37
37
 
@@ -1 +1 @@
1
- {"version":3,"file":"RegisterForm.js","sources":["../../../src/auth/RegisterForm.tsx"],"sourcesContent":["import { LoginAuthenticationResponse } from '@medplum/core';\nimport { OperationOutcome } from '@medplum/fhirtypes';\nimport React, { useEffect, useState } from 'react';\nimport { Document } from '../Document';\nimport { useMedplum } from '../MedplumProvider';\nimport { NewProjectForm } from './NewProjectForm';\nimport { NewUserForm } from './NewUserForm';\nimport './SignInForm.css';\nimport '../util.css';\n\nexport interface RegisterFormProps {\n readonly type: 'patient' | 'project';\n readonly projectId?: string;\n readonly googleClientId?: string;\n readonly recaptchaSiteKey: string;\n readonly children?: React.ReactNode;\n readonly onSuccess: () => void;\n}\n\nexport function RegisterForm(props: RegisterFormProps): JSX.Element {\n const { type, projectId, googleClientId, recaptchaSiteKey, onSuccess } = props;\n const medplum = useMedplum();\n const [login, setLogin] = useState<string | undefined>(undefined);\n const [outcome, setOutcome] = useState<OperationOutcome>();\n\n useEffect(() => {\n if (type === 'patient' && login) {\n medplum\n .startNewPatient({ login, projectId: projectId as string })\n .then((response) => medplum.processCode(response.code as string))\n .then(() => onSuccess())\n .catch((err) => setOutcome(err as OperationOutcome));\n }\n }, [medplum, type, projectId, login, onSuccess]);\n\n function handleAuthResponse(response: LoginAuthenticationResponse): void {\n if (response.code) {\n medplum\n .processCode(response.code)\n .then(() => onSuccess())\n .catch(console.log);\n } else if (response.login) {\n setLogin(response.login);\n }\n }\n\n return (\n <Document width={450}>\n {outcome && <pre>{JSON.stringify(outcome, null, 2)}</pre>}\n {!login && (\n <NewUserForm\n projectId={projectId as string}\n googleClientId={googleClientId}\n recaptchaSiteKey={recaptchaSiteKey}\n handleAuthResponse={handleAuthResponse}\n />\n )}\n {login && type === 'project' && <NewProjectForm login={login} handleAuthResponse={handleAuthResponse} />}\n </Document>\n );\n}\n"],"names":[],"mappings":";;;;;;AAmBM,SAAU,YAAY,CAAC,KAAwB,EAAA;AACnD,IAAA,MAAM,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A;AACjB,QAAA,OAAO,IAAI,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,IAAA,EAAM,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAO;QACxD,CAAC,KAAK,KACL,KAAA,CAAA,aAAA,CAAC,WAAW,EACV,EAAA,SAAS,EAAE,SAAmB,EAC9B,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,gBAAgB,EAClC,kBAAkB,EAAE,kBAAkB,EAAA,CACtC,CACH;AACA,QAAA,KAAK,IAAI,IAAI,KAAK,SAAS,IAAI,KAAA,CAAA,aAAA,CAAC,cAAc,EAAC,EAAA,KAAK,EAAE,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAI,CAAA,CAC/F,EACX;AACJ;;;;"}
1
+ {"version":3,"file":"RegisterForm.js","sources":["../../../src/auth/RegisterForm.tsx"],"sourcesContent":["import { LoginAuthenticationResponse } from '@medplum/core';\nimport { OperationOutcome } from '@medplum/fhirtypes';\nimport React, { useEffect, useState } from 'react';\nimport { Document } from '../Document';\nimport { useMedplum } from '../MedplumProvider';\nimport { NewProjectForm } from './NewProjectForm';\nimport { NewUserForm } from './NewUserForm';\nimport './SignInForm.css';\nimport '../util.css';\n\nexport interface RegisterFormProps {\n readonly type: 'patient' | 'project';\n readonly projectId?: string;\n readonly googleClientId?: string;\n readonly recaptchaSiteKey: string;\n readonly children?: React.ReactNode;\n readonly onSuccess: () => void;\n}\n\nexport function RegisterForm(props: RegisterFormProps): JSX.Element {\n const { type, projectId, googleClientId, recaptchaSiteKey, onSuccess } = props;\n const medplum = useMedplum();\n const [login, setLogin] = useState<string | undefined>(undefined);\n const [outcome, setOutcome] = useState<OperationOutcome>();\n\n useEffect(() => {\n if (type === 'patient' && login) {\n medplum\n .startNewPatient({ login, projectId: projectId as string })\n .then((response) => medplum.processCode(response.code as string))\n .then(() => onSuccess())\n .catch((err) => setOutcome(err as OperationOutcome));\n }\n }, [medplum, type, projectId, login, onSuccess]);\n\n function handleAuthResponse(response: LoginAuthenticationResponse): void {\n if (response.code) {\n medplum\n .processCode(response.code)\n .then(() => onSuccess())\n .catch(console.log);\n } else if (response.login) {\n setLogin(response.login);\n }\n }\n\n return (\n <Document width={450}>\n {outcome && <pre>{JSON.stringify(outcome, null, 2)}</pre>}\n {!login && (\n <NewUserForm\n projectId={projectId as string}\n googleClientId={googleClientId}\n recaptchaSiteKey={recaptchaSiteKey}\n handleAuthResponse={handleAuthResponse}\n >\n {props.children}\n </NewUserForm>\n )}\n {login && type === 'project' && <NewProjectForm login={login} handleAuthResponse={handleAuthResponse} />}\n </Document>\n );\n}\n"],"names":[],"mappings":";;;;;;AAmBM,SAAU,YAAY,CAAC,KAAwB,EAAA;AACnD,IAAA,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,cAAc,EAAE,gBAAgB,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;AAC/E,IAAA,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAqB,SAAS,CAAC,CAAC;IAClE,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,EAAoB,CAAC;IAE3D,SAAS,CAAC,MAAK;AACb,QAAA,IAAI,IAAI,KAAK,SAAS,IAAI,KAAK,EAAE;YAC/B,OAAO;iBACJ,eAAe,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,SAAmB,EAAE,CAAC;AAC1D,iBAAA,IAAI,CAAC,CAAC,QAAQ,KAAK,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAc,CAAC,CAAC;AAChE,iBAAA,IAAI,CAAC,MAAM,SAAS,EAAE,CAAC;iBACvB,KAAK,CAAC,CAAC,GAAG,KAAK,UAAU,CAAC,GAAuB,CAAC,CAAC,CAAC;AACxD,SAAA;AACH,KAAC,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EA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