@verii/components-organizations-registrar 1.0.0-pre.1756096826 → 1.0.0-pre.1756224043
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.
- package/dist/chunks/{ConsentProvider.DIG3atk-.js → ConsentProvider.6M2ucqXH.js} +3 -3
- package/dist/chunks/ConsentProvider.6M2ucqXH.js.map +1 -0
- package/dist/chunks/{ConsentProvider.DTG51XMy.js → ConsentProvider.Bbc0preP.js} +2 -2
- package/dist/chunks/ConsentProvider.Bbc0preP.js.map +1 -0
- package/dist/chunks/{CreateOrganization.utils.C5C_r3Zp.js → CreateOrganizationUtils.C5C_r3Zp.js} +1 -1
- package/dist/chunks/CreateOrganizationUtils.C5C_r3Zp.js.map +1 -0
- package/dist/chunks/{CreateOrganization.utils.8cSBFSYF.js → CreateOrganizationUtils.Xq78HHkP.js} +7 -7
- package/dist/chunks/CreateOrganizationUtils.Xq78HHkP.js.map +1 -0
- package/dist/chunks/{CustomAppBar.DuFQqld7.js → CustomAppBar.BOlNFosS.js} +5 -7
- package/dist/chunks/CustomAppBar.BOlNFosS.js.map +1 -0
- package/dist/chunks/{CustomAppBar.BfQvuTHz.js → CustomAppBar.DaXLAwPh.js} +4 -6
- package/dist/chunks/CustomAppBar.DaXLAwPh.js.map +1 -0
- package/dist/chunks/{LinkedInRegistrationInput.C-qzrR-S.js → LinkedInRegistrationInput.CmYmSJoq.js} +8 -5
- package/dist/chunks/LinkedInRegistrationInput.CmYmSJoq.js.map +1 -0
- package/dist/chunks/{LinkedInRegistrationInput.DKRMHYRh.js → LinkedInRegistrationInput.gnYgP1Hf.js} +11 -8
- package/dist/chunks/LinkedInRegistrationInput.gnYgP1Hf.js.map +1 -0
- package/dist/chunks/{Loading.UJl_3_cf.js → Loading.Bcm3xNJU.js} +2 -3
- package/dist/chunks/Loading.Bcm3xNJU.js.map +1 -0
- package/dist/chunks/{Loading.DYBk0Ktb.js → Loading.cGHE59CV.js} +2 -3
- package/dist/chunks/Loading.cGHE59CV.js.map +1 -0
- package/dist/chunks/{MainLayout.CWFkijrE.js → MainLayout.BzfaZs8j.js} +2 -2
- package/dist/chunks/{MainLayout.CWFkijrE.js.map → MainLayout.BzfaZs8j.js.map} +1 -1
- package/dist/chunks/{MainLayout.6Hq5XQ-L.js → MainLayout.V-ymVxxR.js} +3 -3
- package/dist/chunks/{MainLayout.6Hq5XQ-L.js.map → MainLayout.V-ymVxxR.js.map} +1 -1
- package/dist/chunks/{OrganizationAvatar.BEwRZ9tC.js → OrganizationAvatar.BXW4diDT.js} +2 -2
- package/dist/chunks/{OrganizationAvatar.BEwRZ9tC.js.map → OrganizationAvatar.BXW4diDT.js.map} +1 -1
- package/dist/chunks/{OrganizationAvatar.lWcXtbM6.js → OrganizationAvatar.Dgg5VSPI.js} +2 -2
- package/dist/chunks/{OrganizationAvatar.lWcXtbM6.js.map → OrganizationAvatar.Dgg5VSPI.js.map} +1 -1
- package/dist/chunks/{ServicesEdit.BUAbbXgV.js → ServicesEdit.BnnqC203.js} +3 -3
- package/dist/chunks/ServicesEdit.BnnqC203.js.map +1 -0
- package/dist/chunks/{ServicesEdit.CrtEcP_7.js → ServicesEdit.DDgjS5kU.js} +2 -2
- package/dist/chunks/ServicesEdit.DDgjS5kU.js.map +1 -0
- package/dist/chunks/{SetInvitationService.BUZqAilX.js → SetInvitationService.PxAGwk-I.js} +11 -11
- package/dist/chunks/SetInvitationService.PxAGwk-I.js.map +1 -0
- package/dist/chunks/{SetInvitationService.B0ezxTzf.js → SetInvitationService.ZT5lP003.js} +5 -5
- package/dist/chunks/SetInvitationService.ZT5lP003.js.map +1 -0
- package/dist/chunks/TermsAndConditionsPdf.Ba8-5Hcm.js.map +1 -1
- package/dist/chunks/TermsAndConditionsPdf.ewC7N9Vy.js.map +1 -1
- package/dist/chunks/{CreateOrganization.C2Kf44eJ.js → ValidateTextInput.D5kgjulG.js} +328 -14
- package/dist/chunks/ValidateTextInput.D5kgjulG.js.map +1 -0
- package/dist/chunks/{CreateOrganization.A11-a_8R.js → ValidateTextInput.DEBaVB1L.js} +356 -42
- package/dist/chunks/ValidateTextInput.DEBaVB1L.js.map +1 -0
- package/dist/chunks/{index.DZOVpocw.js → index.CYCWawJT.js} +6 -6
- package/dist/chunks/index.CYCWawJT.js.map +1 -0
- package/dist/chunks/{index.DmM8ShwP.js → index.Cmn4FlUL.js} +5 -5
- package/dist/chunks/index.Cmn4FlUL.js.map +1 -0
- package/dist/chunks/{index.DlFajFTS.js → index.DIizFYFZ.js} +3 -3
- package/dist/chunks/index.DIizFYFZ.js.map +1 -0
- package/dist/chunks/{index.ZAmuSdK1.js → index.DIur8MCO.js} +4 -4
- package/dist/chunks/index.DIur8MCO.js.map +1 -0
- package/dist/chunks/{index.Ch4ynES2.js → index.DMWKdmxs.js} +4 -5
- package/dist/chunks/index.DMWKdmxs.js.map +1 -0
- package/dist/chunks/{index.Dir1xwV4.js → index.DND10PiY.js} +5 -6
- package/dist/chunks/index.DND10PiY.js.map +1 -0
- package/dist/chunks/{index.Cpod3Il3.js → index.YjnxLFjk.js} +3 -3
- package/dist/chunks/index.YjnxLFjk.js.map +1 -0
- package/dist/chunks/index.iexmV4Mr.js.map +1 -1
- package/dist/chunks/remoteDataProvider.BCiFSYnk.js.map +1 -1
- package/dist/chunks/remoteDataProvider.gtTXA1-g.js.map +1 -1
- package/dist/chunks/useIsIssuingInspection.C76mY_wb.js.map +1 -1
- package/dist/chunks/useIsIssuingInspection.DavhBs5B.js.map +1 -1
- package/dist/components/AppBar.cjs +1 -1
- package/dist/components/AppBar.js +1 -1
- package/dist/components/common.cjs +3 -3
- package/dist/components/common.js +3 -3
- package/dist/components/invitations.cjs +1 -1
- package/dist/components/invitations.js +1 -1
- package/dist/components/organizations.cjs +12 -301
- package/dist/components/organizations.cjs.map +1 -1
- package/dist/components/organizations.js +10 -299
- package/dist/components/organizations.js.map +1 -1
- package/dist/components/services.cjs +1 -1
- package/dist/components/services.js +1 -1
- package/dist/components.cjs +2 -2
- package/dist/components.js +2 -2
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/layouts.cjs +1 -1
- package/dist/layouts.js +1 -1
- package/dist/pages/individuals.cjs +4 -4
- package/dist/pages/individuals.cjs.map +1 -1
- package/dist/pages/individuals.js +5 -5
- package/dist/pages/individuals.js.map +1 -1
- package/dist/pages/invitations.cjs +11 -12
- package/dist/pages/invitations.cjs.map +1 -1
- package/dist/pages/invitations.js +9 -10
- package/dist/pages/invitations.js.map +1 -1
- package/dist/pages/organizations.cjs +74 -75
- package/dist/pages/organizations.cjs.map +1 -1
- package/dist/pages/organizations.js +10 -11
- package/dist/pages/organizations.js.map +1 -1
- package/dist/pages/services.cjs +6 -6
- package/dist/pages/services.cjs.map +1 -1
- package/dist/pages/services.js +5 -5
- package/dist/pages/services.js.map +1 -1
- package/dist/pages.cjs +1 -1
- package/dist/pages.cjs.map +1 -1
- package/dist/pages.js +1 -1
- package/dist/pages.js.map +1 -1
- package/package.json +12 -9
- package/setup-tests.js +31 -0
- package/dist/chunks/ConsentProvider.DIG3atk-.js.map +0 -1
- package/dist/chunks/ConsentProvider.DTG51XMy.js.map +0 -1
- package/dist/chunks/CreateOrganization.A11-a_8R.js.map +0 -1
- package/dist/chunks/CreateOrganization.C2Kf44eJ.js.map +0 -1
- package/dist/chunks/CreateOrganization.utils.8cSBFSYF.js.map +0 -1
- package/dist/chunks/CreateOrganization.utils.C5C_r3Zp.js.map +0 -1
- package/dist/chunks/CustomAppBar.BfQvuTHz.js.map +0 -1
- package/dist/chunks/CustomAppBar.DuFQqld7.js.map +0 -1
- package/dist/chunks/LinkedInRegistrationInput.C-qzrR-S.js.map +0 -1
- package/dist/chunks/LinkedInRegistrationInput.DKRMHYRh.js.map +0 -1
- package/dist/chunks/Loading.DYBk0Ktb.js.map +0 -1
- package/dist/chunks/Loading.UJl_3_cf.js.map +0 -1
- package/dist/chunks/OrganisationSubmitButton.D32qynh9.js +0 -40
- package/dist/chunks/OrganisationSubmitButton.D32qynh9.js.map +0 -1
- package/dist/chunks/OrganisationSubmitButton.D3w1nG1X.js +0 -41
- package/dist/chunks/OrganisationSubmitButton.D3w1nG1X.js.map +0 -1
- package/dist/chunks/ServicesEdit.BUAbbXgV.js.map +0 -1
- package/dist/chunks/ServicesEdit.CrtEcP_7.js.map +0 -1
- package/dist/chunks/SetInvitationService.B0ezxTzf.js.map +0 -1
- package/dist/chunks/SetInvitationService.BUZqAilX.js.map +0 -1
- package/dist/chunks/index.Ch4ynES2.js.map +0 -1
- package/dist/chunks/index.Cpod3Il3.js.map +0 -1
- package/dist/chunks/index.DZOVpocw.js.map +0 -1
- package/dist/chunks/index.Dir1xwV4.js.map +0 -1
- package/dist/chunks/index.DlFajFTS.js.map +0 -1
- package/dist/chunks/index.DmM8ShwP.js.map +0 -1
- package/dist/chunks/index.ZAmuSdK1.js.map +0 -1
- package/jest.config.cjs +0 -29
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"services.cjs","sources":["../../src/pages/services/ServiceCreateForm.jsx","../../src/pages/services/useDeleteService.js","../../src/pages/services/ServicesList.jsx"],"sourcesContent":["/**\n * Copyright 2023 Velocity Team\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useEffect, useRef, useState, useCallback } from 'react';\nimport { kebabCase } from 'lodash/string';\nimport { useRedirect, useCreate, useGetList } from 'react-admin';\nimport { useLocation, useNavigate } from 'react-router';\nimport PropTypes from 'prop-types';\n\nimport Popup from '@/components/common/Popup.jsx';\nimport { credentialTypesByServiceTypes } from '@/utils/serviceTypes';\nimport { dataResources } from '@/utils/remoteDataProvider';\nimport { getNewServiceIndex } from '@/utils/invitations';\nimport useSelectedOrganization from '@/state/selectedOrganizationState';\nimport { useIsIssuingInspection } from './hooks/useIsIssuingInspection';\nimport { ServiceTypeSelection } from './components/ServiceTypeSelection/index.jsx';\nimport { ServiceEndpointSelection } from './components/ServiceEndpointSelection/index.jsx';\nimport { SecretKeysPopup } from './components/SecretKeysPopup/index.jsx';\n\nconst defaultAuthClient = { clientSecret: '', clientId: '' };\n\nconst ServiceCreateForm = ({ onServiceCreated, services, InterceptOnCreate }) => {\n const { pathname } = useLocation();\n const redirect = useRedirect();\n const navigate = useNavigate();\n const [createService] = useCreate();\n\n const [did] = useSelectedOrganization();\n const openedStateRef = useRef(true);\n const isModalOpened = /\\/services\\/create/.test(pathname);\n\n const [serviceId, setServiceId] = useState('');\n const [selectedCAO, setSelectedCAO] = useState('');\n\n const { data: credentialAgentOperators, isLoading: isLoadingCAO } = useGetList(\n dataResources.SEARCH_PROFILES,\n {\n filter: { serviceTypes: 'CredentialAgentOperator' },\n },\n );\n\n const [selectedStep, setSelectedStep] = useState(1);\n const [selectedServiceType, setSelectedServiceType] = useState('');\n const [authClient, setAuthClient] = useState(defaultAuthClient);\n const [createServiceInProgress, setCreateServiceInProgress] = useState(false);\n\n const [isInterceptOnCreateOpen, setIsInterceptOnCreateOpen] = useState(false);\n const [isKeysPopupOpened, setIsKeysPopupOpened] = useState(false);\n\n const { isIssuingOrInspection, isCAO } = useIsIssuingInspection(selectedServiceType);\n\n const onClose = useCallback(() => {\n navigate(-1);\n }, [navigate]);\n\n // clear previous state after close\n useEffect(() => {\n const reset = () => {\n setSelectedStep(1);\n setSelectedServiceType('');\n setAuthClient(defaultAuthClient);\n };\n if (openedStateRef.current === false && isModalOpened) {\n reset();\n }\n // eslint-disable-next-line better-mutation/no-mutation\n openedStateRef.current = isModalOpened;\n\n return reset;\n }, [isModalOpened]);\n\n useEffect(() => {\n if (InterceptOnCreate && serviceId) {\n setIsInterceptOnCreateOpen(true);\n }\n }, [InterceptOnCreate, serviceId]);\n\n const onCreateService = async ({ serviceEndpoint }) => {\n const type = selectedServiceType.id.match(/.+v1/);\n const kebabType = kebabCase(type[0]);\n const id = `${did}#${kebabType}-${getNewServiceIndex(services, kebabType)}`;\n try {\n setCreateServiceInProgress(true);\n const result = await createService(\n dataResources.SERVICES,\n {\n data: {\n organizationId: did,\n payload: {\n id,\n serviceEndpoint,\n type: type[0],\n credentialTypes: credentialTypesByServiceTypes[selectedServiceType.id],\n },\n },\n },\n { returnPromise: true },\n );\n setCreateServiceInProgress(false);\n setServiceId(result.id);\n if (result.authClient) {\n setAuthClient(result.authClient);\n } else {\n setSelectedCAO(serviceEndpoint.split('#')[0]);\n }\n onServiceCreated();\n } catch (e) {\n setCreateServiceInProgress(false);\n }\n };\n\n return (\n <>\n <Popup\n onClose={onClose}\n title=\"\"\n isOpen={isModalOpened}\n mainContainerStyles={styles.mainContainer}\n disableCloseButton={createServiceInProgress}\n >\n {selectedStep === 1 && (\n <ServiceTypeSelection\n selectedServiceType={selectedServiceType}\n setSelectedServiceType={setSelectedServiceType}\n isLoading={isLoadingCAO}\n handleNext={() => setSelectedStep(2)}\n />\n )}\n {selectedStep === 2 && (\n <ServiceEndpointSelection\n credentialAgentOperators={credentialAgentOperators}\n isIssueOrInspection={isIssuingOrInspection}\n inProgress={createServiceInProgress}\n onCreate={onCreateService}\n handleBack={() => setSelectedStep(1)}\n />\n )}\n </Popup>\n\n <InterceptOnCreate\n isInterceptOnCreateOpen={isInterceptOnCreateOpen}\n serviceId={serviceId}\n onNext={() => setIsKeysPopupOpened(true)}\n onClose={() => {\n redirect('list', 'services');\n }}\n isIssueOrInspection={isIssuingOrInspection}\n selectedCAO={selectedCAO}\n isCAO={isCAO}\n />\n\n <SecretKeysPopup\n isOpen={isKeysPopupOpened}\n secretKeys={{ authClients: [authClient] }}\n onClose={() => {\n setIsKeysPopupOpened(false);\n navigate(-1);\n }}\n wording={{\n title:\n // eslint-disable-next-line max-len\n 'Here are your secret identifiers. Please keep a copy of these as they will not be availableonce you close this dialog. You may need to pass this to the admin of your Credential Agent.',\n subtitle: 'Download or copy your secret encryption keys and keep them somewhere safe.',\n }}\n warningWording={{\n title: 'You must download a copy of your keys before exiting',\n subtitle:\n 'They will not be available again and are critical for managing your organization data.',\n }}\n />\n </>\n );\n};\n\nconst styles = {\n mainContainer: { pt: 2 },\n};\n\n// eslint-disable-next-line better-mutation/no-mutation\nServiceCreateForm.propTypes = {\n onServiceCreated: PropTypes.func,\n services: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string.isRequired,\n }),\n ).isRequired,\n InterceptOnCreate: PropTypes.elementType,\n};\n\nexport default ServiceCreateForm;\n","/**\n * Copyright 2023 Velocity Team\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useState } from 'react';\nimport { useDelete } from 'react-admin';\nimport { dataResources } from '../../utils/remoteDataProvider';\nimport useSelectedOrganization from '../../state/selectedOrganizationState';\n\nconst useDeleteService = (refetch) => {\n const [did] = useSelectedOrganization();\n const [serviceToDelete, setServiceToDelete] = useState(null);\n const [isDeletingService, setIsDeletingService] = useState(false);\n const [deleteOne] = useDelete(\n dataResources.SERVICES,\n {\n id: serviceToDelete,\n },\n {\n onSettled: () =>\n refetch().finally(() => {\n setIsDeletingService(false);\n setServiceToDelete(null);\n }),\n },\n );\n\n const handleServiceDeleteConfirm = async () => {\n setIsDeletingService(true);\n try {\n await deleteOne(dataResources.SERVICES, {\n id: serviceToDelete.id,\n previousData: {\n organizationId: did,\n },\n });\n } catch (e) {\n setIsDeletingService(false);\n throw e;\n }\n };\n\n return { handleServiceDeleteConfirm, isDeletingService, serviceToDelete, setServiceToDelete };\n};\n\nexport default useDeleteService;\n","/**\n * Copyright 2023 Velocity Team\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useMemo } from 'react';\nimport { useSearchParams } from 'react-router';\nimport { Box, Button, Container, Stack, Typography } from '@mui/material';\nimport EditIcon from '@mui/icons-material/Edit';\nimport DeleteIcon from '@mui/icons-material/Delete';\nimport { useGetOne, useRedirect, useUpdate } from 'react-admin';\n\nimport PropTypes from 'prop-types';\nimport ListItem from '@/components/common/ListItem.jsx';\nimport Loading from '@/components/Loading.jsx';\nimport ServicesEdit from '@/components/services/ServicesEdit.jsx';\nimport ServicesDelete from '@/components/services/ServicesDelete.jsx';\nimport useSelectedOrganization from '@/state/selectedOrganizationState';\nimport { dataResources } from '@/utils/remoteDataProvider';\nimport useParticipantAgreementState from '@/state/participantAgreementState';\nimport ServiceCreateForm from './ServiceCreateForm.jsx';\nimport { serviceTypeTitlesMap } from '../../utils/serviceTypes';\nimport useDeleteService from './useDeleteService';\n\nconst SAVE_ERROR_MESSAGE =\n 'We were unable to update your service with the details provided. Please check to ensure you have provided valid information and then try again.';\n\nconst getAmountTitle = (total) => `${total} active service${total > 1 ? 's' : ''}`;\n\nconst ServicesList = ({\n // override props, defaulting to your internal components\n EditComponent = ServicesEdit,\n CreateComponent = ServiceCreateForm,\n DeleteComponent = ServicesDelete,\n AdditionalServiceProperties = {},\n}) => {\n const [params, setParams] = useSearchParams();\n const currentlyEditableServiceId = params.get('id');\n const [did] = useSelectedOrganization();\n\n const [, setParticipantAgreementApproved] = useParticipantAgreementState();\n\n const {\n data,\n isLoading,\n isFetching,\n refetch: refetchOrganizationServices,\n } = useGetOne('organizations', { id: did }, { enabled: !!did });\n\n const { handleServiceDeleteConfirm, isDeletingService, serviceToDelete, setServiceToDelete } =\n useDeleteService(refetchOrganizationServices);\n\n const services = useMemo(() => data?.didDoc?.service || [], [data?.didDoc?.service]);\n const servicesActivated = useMemo(\n () =>\n services.map((item) => ({\n ...item,\n activated: data?.activatedServiceIds?.includes(item.id) || false,\n })),\n [services, data],\n );\n\n const totalActivatedServices = servicesActivated.filter(({ activated }) => activated).length;\n const currentlyEditableService = useMemo(\n () =>\n currentlyEditableServiceId\n ? services.find((item) => item.id === currentlyEditableServiceId)\n : null,\n [services, currentlyEditableServiceId],\n );\n\n const [updateService] = useUpdate(undefined, undefined, {\n onSuccess: () => {\n setParticipantAgreementApproved(true);\n\n refetchOrganizationServices();\n },\n });\n\n const serviceTitle = (service) => {\n if (service.type === 'VlcContactIssuer_v1') {\n if (service.credentialTypes?.includes('EmailV1.0')) {\n return 'Primary Source Email Issuer (eg. Email Service Provider)';\n }\n return 'Primary Source Phone Issuer (eg. Telco)';\n }\n return serviceTypeTitlesMap[service.type] || service.type;\n };\n\n // eslint-disable-next-line consistent-return\n const onSave = async ({ serviceEndpoint }) => {\n try {\n await updateService(\n dataResources.SERVICES,\n {\n id: currentlyEditableService.id,\n data: {\n organizationId: did,\n payload: {\n serviceEndpoint,\n },\n },\n },\n { returnPromise: true },\n );\n } catch (e) {\n return {\n serviceEndpoint: SAVE_ERROR_MESSAGE,\n };\n }\n };\n\n const editAction = useMemo(\n () => ({\n title: 'EDIT',\n icon: <EditIcon />,\n action: (id) => setParams({ id }),\n }),\n [setParams],\n );\n\n const deleteAction = useMemo(\n () => ({\n title: 'DELETE',\n icon: <DeleteIcon />,\n action: (id) => setServiceToDelete(id),\n }),\n [setServiceToDelete],\n );\n\n const isLoadingVisible = isLoading || isFetching;\n\n const redirect = useRedirect();\n const handleCloseEdit = () => {\n setParams({});\n };\n\n return (\n <Container maxWidth=\"xl\" sx={{ mt: 5 }}>\n <Typography variant=\"h3\">Manage Services</Typography>\n <Box sx={{ mt: 2, mb: 4, maxWidth: '720px' }}>\n <Typography variant=\"subtitle1\">\n Setup the services your organization is to be offering across the Velocity Network™:\n Issuing, Verifying, Operating a Credential Agent and/or operating a Node.\n </Typography>\n </Box>\n <Stack\n sx={{ mb: 2 }}\n flexDirection=\"row\"\n justifyContent=\"space-between\"\n alignItems=\"flex-end\"\n >\n <Button variant=\"outlined\" onClick={() => redirect('create', 'services')}>\n Add service +\n </Button>\n {!!totalActivatedServices && (\n <Typography color=\"secondary.light\" sx={{ fontSize: 14 }}>\n {getAmountTitle(totalActivatedServices)}\n </Typography>\n )}\n </Stack>\n {isLoadingVisible && <Loading sx={{ pt: '60px' }} />}\n {!isLoadingVisible &&\n servicesActivated.map((service) => (\n <ListItem\n key={service.id}\n id={service.id}\n title={serviceTitle(service)}\n status={\n service.activated\n ? { title: 'ACTIVATED', color: 'primary.success' }\n : { title: 'INACTIVE', color: 'primary.main' }\n }\n showActions\n actions={[editAction, deleteAction]}\n content={[\n [\n { name: 'service id', value: service.id },\n { name: 'service endpoint', value: service.serviceEndpoint },\n ...(service.credentialTypes\n ? [\n {\n name: 'credential types',\n value: service.credentialTypes.join(', '),\n },\n ]\n : []),\n ...(AdditionalServiceProperties && AdditionalServiceProperties[service.type]\n ? [\n {\n name: AdditionalServiceProperties[service.type]?.name,\n value: AdditionalServiceProperties[service.type]?.value,\n },\n ]\n : []),\n ],\n ]}\n />\n ))}\n <EditComponent\n onClose={handleCloseEdit}\n onSave={onSave}\n selectedService={currentlyEditableService}\n />\n <CreateComponent onServiceCreated={refetchOrganizationServices} services={services} />\n <DeleteComponent\n isLoading={isDeletingService}\n onClose={() => setServiceToDelete(null)}\n onConfirm={handleServiceDeleteConfirm}\n selectedService={serviceToDelete}\n />\n </Container>\n );\n};\n// eslint-disable-next-line better-mutation/no-mutation\nServicesList.propTypes = {\n EditComponent: PropTypes.elementType,\n CreateComponent: PropTypes.elementType,\n DeleteComponent: PropTypes.elementType,\n AdditionalServiceProperties: PropTypes.object,\n};\n\nexport default ServicesList;\n"],"names":["useLocation","useRedirect","useNavigate","useCreate","useSelectedOrganization","useRef","useState","useGetList","dataResources","useIsIssuingInspection","useCallback","useEffect","kebabCase","getNewServiceIndex","credentialTypesByServiceTypes","jsxs","Fragment","Popup","jsx","ServiceTypeSelection","ServiceEndpointSelection","SecretKeysPopup","useDelete","ServicesEdit","ServicesDelete","useSearchParams","useParticipantAgreementState","useGetOne","useMemo","useUpdate","serviceTypeTitlesMap","Container","Typography","Box","Stack","Button","Loading","ListItem"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAgCA,MAAM,oBAAoB,EAAE,cAAc,IAAI,UAAU,GAAA;AAExD,MAAM,oBAAoB,CAAC,EAAE,kBAAkB,UAAU,wBAAwB;AAC/E,QAAM,EAAE,SAAA,IAAaA,wBAAA;AACrB,QAAM,WAAWC,WAAAA,YAAA;AACjB,QAAM,WAAWC,YAAAA,YAAA;AACjB,QAAM,CAAC,aAAa,IAAIC,qBAAA;AAExB,QAAM,CAAC,GAAG,IAAIC,kDAAA;AACd,QAAM,iBAAiBC,MAAAA,OAAO,IAAI;AAClC,QAAM,gBAAgB,qBAAqB,KAAK,QAAQ;AAExD,QAAM,CAAC,WAAW,YAAY,IAAIC,MAAAA,SAAS,EAAE;AAC7C,QAAM,CAAC,aAAa,cAAc,IAAIA,MAAAA,SAAS,EAAE;AAEjD,QAAM,EAAE,MAAM,0BAA0B,WAAW,iBAAiBC,WAAAA;AAAAA,IAClEC,mBAAAA,cAAc;AAAA,IACd;AAAA,MACE,QAAQ,EAAE,cAAc,0BAAA;AAAA,IAA0B;AAAA,EACpD;AAGF,QAAM,CAAC,cAAc,eAAe,IAAIF,MAAAA,SAAS,CAAC;AAClD,QAAM,CAAC,qBAAqB,sBAAsB,IAAIA,MAAAA,SAAS,EAAE;AACjE,QA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,QAClC,SAAS;AAAA,UACP;AAAA,YACE,EAAE,MAAM,cAAc,OAAO,QAAQ,GAAA;AAAA,YACrC,EAAE,MAAM,oBAAoB,OAAO,QAAQ,gBAAA;AAAA,YAC3C,GAAI,QAAQ,kBACR;AAAA,cACE;AAAA,gBACE,MAAM;AAAA,gBACN,OAAO,QAAQ,gBAAgB,KAAK,IAAI;AAAA,cAAA;AAAA,YAC1C,IAEF,CAAA;AAAA,YACJ,GAAI,+BAA+B,4BAA4B,QAAQ,IAAI,IACvE;AAAA,cACE;AAAA,gBACE,MAAM,4BAA4B,QAAQ,IAAI,GAAG;AAAA,gBACjD,OAAO,4BAA4B,QAAQ,IAAI,GAAG;AAAA,cAAA;AAAA,YACpD,IAEF,CAAA;AAAA,UAAC;AAAA,QACP;AAAA,MACF;AAAA,MA/BK,QAAQ;AAAA,IAAA,CAiChB;AAAA,IACHnB,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC,SAAS;AAAA,QACT;AAAA,QACA,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,IAEnBA,2BAAAA,IAAC,iBAAA,EAAgB,kBAAkB,6BAA6B,SAAA,CAAoB;AAAA,IACpFA,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAW;AAAA,QACX,SAAS,MAAM,mBAAmB,IAAI;AAAA,QACtC,WAAW;AAAA,QACX,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,EACnB,GACF;AAEJ;AAEA,aAAa,YAAY;AAAA,EACvB,eAAe,UAAU;AAAA,EACzB,iBAAiB,UAAU;AAAA,EAC3B,iBAAiB,UAAU;AAAA,EAC3B,6BAA6B,UAAU;AACzC;;;;"}
|
|
1
|
+
{"version":3,"file":"services.cjs","sources":["../../src/pages/services/ServiceCreateForm.jsx","../../src/pages/services/useDeleteService.js","../../src/pages/services/ServicesList.jsx"],"sourcesContent":["/**\n * Copyright 2023 Velocity Team\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useEffect, useRef, useState, useCallback } from 'react';\nimport { kebabCase } from 'lodash-es';\nimport { useRedirect, useCreate, useGetList } from 'react-admin';\nimport { useLocation, useNavigate } from 'react-router';\nimport PropTypes from 'prop-types';\n\nimport Popup from '@/components/common/Popup.jsx';\nimport { credentialTypesByServiceTypes } from '@/utils/serviceTypes.js';\nimport { dataResources } from '@/utils/remoteDataProvider.js';\nimport { getNewServiceIndex } from '@/utils/invitations.js';\nimport useSelectedOrganization from '@/state/selectedOrganizationState.js';\nimport { useIsIssuingInspection } from './hooks/useIsIssuingInspection.js';\nimport { ServiceTypeSelection } from './components/ServiceTypeSelection/index.jsx';\nimport { ServiceEndpointSelection } from './components/ServiceEndpointSelection/index.jsx';\nimport { SecretKeysPopup } from './components/SecretKeysPopup/index.jsx';\n\nconst defaultAuthClient = { clientSecret: '', clientId: '' };\n\nconst ServiceCreateForm = ({ onServiceCreated, services, InterceptOnCreate }) => {\n const { pathname } = useLocation();\n const redirect = useRedirect();\n const navigate = useNavigate();\n const [createService] = useCreate();\n\n const [did] = useSelectedOrganization();\n const openedStateRef = useRef(true);\n const isModalOpened = /\\/services\\/create/.test(pathname);\n\n const [serviceId, setServiceId] = useState('');\n const [selectedCAO, setSelectedCAO] = useState('');\n\n const { data: credentialAgentOperators, isLoading: isLoadingCAO } = useGetList(\n dataResources.SEARCH_PROFILES,\n {\n filter: { serviceTypes: 'CredentialAgentOperator' },\n },\n );\n\n const [selectedStep, setSelectedStep] = useState(1);\n const [selectedServiceType, setSelectedServiceType] = useState('');\n const [authClient, setAuthClient] = useState(defaultAuthClient);\n const [createServiceInProgress, setCreateServiceInProgress] = useState(false);\n\n const [isInterceptOnCreateOpen, setIsInterceptOnCreateOpen] = useState(false);\n const [isKeysPopupOpened, setIsKeysPopupOpened] = useState(false);\n\n const { isIssuingOrInspection, isCAO } = useIsIssuingInspection(selectedServiceType);\n\n const onClose = useCallback(() => {\n navigate(-1);\n }, [navigate]);\n\n // clear previous state after close\n useEffect(() => {\n const reset = () => {\n setSelectedStep(1);\n setSelectedServiceType('');\n setAuthClient(defaultAuthClient);\n };\n if (openedStateRef.current === false && isModalOpened) {\n reset();\n }\n // eslint-disable-next-line better-mutation/no-mutation\n openedStateRef.current = isModalOpened;\n\n return reset;\n }, [isModalOpened]);\n\n useEffect(() => {\n if (InterceptOnCreate && serviceId) {\n setIsInterceptOnCreateOpen(true);\n }\n }, [InterceptOnCreate, serviceId]);\n\n const onCreateService = async ({ serviceEndpoint }) => {\n const type = selectedServiceType.id.match(/.+v1/);\n const kebabType = kebabCase(type[0]);\n const id = `${did}#${kebabType}-${getNewServiceIndex(services, kebabType)}`;\n try {\n setCreateServiceInProgress(true);\n const result = await createService(\n dataResources.SERVICES,\n {\n data: {\n organizationId: did,\n payload: {\n id,\n serviceEndpoint,\n type: type[0],\n credentialTypes: credentialTypesByServiceTypes[selectedServiceType.id],\n },\n },\n },\n { returnPromise: true },\n );\n setCreateServiceInProgress(false);\n setServiceId(result.id);\n if (result.authClient) {\n setAuthClient(result.authClient);\n } else {\n setSelectedCAO(serviceEndpoint.split('#')[0]);\n }\n onServiceCreated();\n } catch (e) {\n setCreateServiceInProgress(false);\n }\n };\n\n return (\n <>\n <Popup\n onClose={onClose}\n title=\"\"\n isOpen={isModalOpened}\n mainContainerStyles={styles.mainContainer}\n disableCloseButton={createServiceInProgress}\n >\n {selectedStep === 1 && (\n <ServiceTypeSelection\n selectedServiceType={selectedServiceType}\n setSelectedServiceType={setSelectedServiceType}\n isLoading={isLoadingCAO}\n handleNext={() => setSelectedStep(2)}\n />\n )}\n {selectedStep === 2 && (\n <ServiceEndpointSelection\n credentialAgentOperators={credentialAgentOperators}\n isIssueOrInspection={isIssuingOrInspection}\n inProgress={createServiceInProgress}\n onCreate={onCreateService}\n handleBack={() => setSelectedStep(1)}\n />\n )}\n </Popup>\n\n <InterceptOnCreate\n isInterceptOnCreateOpen={isInterceptOnCreateOpen}\n serviceId={serviceId}\n onNext={() => setIsKeysPopupOpened(true)}\n onClose={() => {\n redirect('list', 'services');\n }}\n isIssueOrInspection={isIssuingOrInspection}\n selectedCAO={selectedCAO}\n isCAO={isCAO}\n />\n\n <SecretKeysPopup\n isOpen={isKeysPopupOpened}\n secretKeys={{ authClients: [authClient] }}\n onClose={() => {\n setIsKeysPopupOpened(false);\n navigate(-1);\n }}\n wording={{\n title:\n // eslint-disable-next-line max-len\n 'Here are your secret identifiers. Please keep a copy of these as they will not be availableonce you close this dialog. You may need to pass this to the admin of your Credential Agent.',\n subtitle: 'Download or copy your secret encryption keys and keep them somewhere safe.',\n }}\n warningWording={{\n title: 'You must download a copy of your keys before exiting',\n subtitle:\n 'They will not be available again and are critical for managing your organization data.',\n }}\n />\n </>\n );\n};\n\nconst styles = {\n mainContainer: { pt: 2 },\n};\n\n// eslint-disable-next-line better-mutation/no-mutation\nServiceCreateForm.propTypes = {\n onServiceCreated: PropTypes.func,\n services: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string.isRequired,\n }),\n ).isRequired,\n InterceptOnCreate: PropTypes.elementType,\n};\n\nexport default ServiceCreateForm;\n","/**\n * Copyright 2023 Velocity Team\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useState } from 'react';\nimport { useDelete } from 'react-admin';\nimport { dataResources } from '../../utils/remoteDataProvider.js';\nimport useSelectedOrganization from '../../state/selectedOrganizationState.js';\n\nconst useDeleteService = (refetch) => {\n const [did] = useSelectedOrganization();\n const [serviceToDelete, setServiceToDelete] = useState(null);\n const [isDeletingService, setIsDeletingService] = useState(false);\n const [deleteOne] = useDelete(\n dataResources.SERVICES,\n {\n id: serviceToDelete,\n },\n {\n onSettled: () =>\n refetch().finally(() => {\n setIsDeletingService(false);\n setServiceToDelete(null);\n }),\n },\n );\n\n const handleServiceDeleteConfirm = async () => {\n setIsDeletingService(true);\n try {\n await deleteOne(dataResources.SERVICES, {\n id: serviceToDelete.id,\n previousData: {\n organizationId: did,\n },\n });\n } catch (e) {\n setIsDeletingService(false);\n throw e;\n }\n };\n\n return { handleServiceDeleteConfirm, isDeletingService, serviceToDelete, setServiceToDelete };\n};\n\nexport default useDeleteService;\n","/**\n * Copyright 2023 Velocity Team\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useMemo } from 'react';\nimport { useSearchParams } from 'react-router';\nimport { Box, Button, Container, Stack, Typography } from '@mui/material';\nimport EditIcon from '@mui/icons-material/Edit';\nimport DeleteIcon from '@mui/icons-material/Delete';\nimport { useGetOne, useRedirect, useUpdate } from 'react-admin';\n\nimport PropTypes from 'prop-types';\nimport ListItem from '@/components/common/ListItem.jsx';\nimport Loading from '@/components/Loading.jsx';\nimport ServicesEdit from '@/components/services/ServicesEdit.jsx';\nimport ServicesDelete from '@/components/services/ServicesDelete.jsx';\nimport useSelectedOrganization from '@/state/selectedOrganizationState.js';\nimport { dataResources } from '@/utils/remoteDataProvider.js';\nimport useParticipantAgreementState from '@/state/participantAgreementState.js';\nimport ServiceCreateForm from './ServiceCreateForm.jsx';\nimport { serviceTypeTitlesMap } from '../../utils/serviceTypes.js';\nimport useDeleteService from './useDeleteService.js';\n\nconst SAVE_ERROR_MESSAGE =\n 'We were unable to update your service with the details provided. Please check to ensure you have provided valid information and then try again.';\n\nconst getAmountTitle = (total) => `${total} active service${total > 1 ? 's' : ''}`;\n\nconst ServicesList = ({\n // override props, defaulting to your internal components\n EditComponent = ServicesEdit,\n CreateComponent = ServiceCreateForm,\n DeleteComponent = ServicesDelete,\n AdditionalServiceProperties = {},\n}) => {\n const [params, setParams] = useSearchParams();\n const currentlyEditableServiceId = params.get('id');\n const [did] = useSelectedOrganization();\n\n const [, setParticipantAgreementApproved] = useParticipantAgreementState();\n\n const {\n data,\n isLoading,\n isFetching,\n refetch: refetchOrganizationServices,\n } = useGetOne('organizations', { id: did }, { enabled: !!did });\n\n const { handleServiceDeleteConfirm, isDeletingService, serviceToDelete, setServiceToDelete } =\n useDeleteService(refetchOrganizationServices);\n\n const services = useMemo(() => data?.didDoc?.service || [], [data?.didDoc?.service]);\n const servicesActivated = useMemo(\n () =>\n services.map((item) => ({\n ...item,\n activated: data?.activatedServiceIds?.includes(item.id) || false,\n })),\n [services, data],\n );\n\n const totalActivatedServices = servicesActivated.filter(({ activated }) => activated).length;\n const currentlyEditableService = useMemo(\n () =>\n currentlyEditableServiceId\n ? services.find((item) => item.id === currentlyEditableServiceId)\n : null,\n [services, currentlyEditableServiceId],\n );\n\n const [updateService] = useUpdate(undefined, undefined, {\n onSuccess: () => {\n setParticipantAgreementApproved(true);\n\n refetchOrganizationServices();\n },\n });\n\n const serviceTitle = (service) => {\n if (service.type === 'VlcContactIssuer_v1') {\n if (service.credentialTypes?.includes('EmailV1.0')) {\n return 'Primary Source Email Issuer (eg. Email Service Provider)';\n }\n return 'Primary Source Phone Issuer (eg. Telco)';\n }\n return serviceTypeTitlesMap[service.type] || service.type;\n };\n\n // eslint-disable-next-line consistent-return\n const onSave = async ({ serviceEndpoint }) => {\n try {\n await updateService(\n dataResources.SERVICES,\n {\n id: currentlyEditableService.id,\n data: {\n organizationId: did,\n payload: {\n serviceEndpoint,\n },\n },\n },\n { returnPromise: true },\n );\n } catch (e) {\n return {\n serviceEndpoint: SAVE_ERROR_MESSAGE,\n };\n }\n };\n\n const editAction = useMemo(\n () => ({\n title: 'EDIT',\n icon: <EditIcon />,\n action: (id) => setParams({ id }),\n }),\n [setParams],\n );\n\n const deleteAction = useMemo(\n () => ({\n title: 'DELETE',\n icon: <DeleteIcon />,\n action: (id) => setServiceToDelete(id),\n }),\n [setServiceToDelete],\n );\n\n const isLoadingVisible = isLoading || isFetching;\n\n const redirect = useRedirect();\n const handleCloseEdit = () => {\n setParams({});\n };\n\n return (\n <Container maxWidth=\"xl\" sx={{ mt: 5 }}>\n <Typography variant=\"h3\">Manage Services</Typography>\n <Box sx={{ mt: 2, mb: 4, maxWidth: '720px' }}>\n <Typography variant=\"subtitle1\">\n Setup the services your organization is to be offering across the Velocity Network™:\n Issuing, Verifying, Operating a Credential Agent and/or operating a Node.\n </Typography>\n </Box>\n <Stack\n sx={{ mb: 2 }}\n flexDirection=\"row\"\n justifyContent=\"space-between\"\n alignItems=\"flex-end\"\n >\n <Button variant=\"outlined\" onClick={() => redirect('create', 'services')}>\n Add service +\n </Button>\n {!!totalActivatedServices && (\n <Typography color=\"secondary.light\" sx={{ fontSize: 14 }}>\n {getAmountTitle(totalActivatedServices)}\n </Typography>\n )}\n </Stack>\n {isLoadingVisible && <Loading sx={{ pt: '60px' }} />}\n {!isLoadingVisible &&\n servicesActivated.map((service) => (\n <ListItem\n key={service.id}\n id={service.id}\n title={serviceTitle(service)}\n status={\n service.activated\n ? { title: 'ACTIVATED', color: 'primary.success' }\n : { title: 'INACTIVE', color: 'primary.main' }\n }\n showActions\n actions={[editAction, deleteAction]}\n content={[\n [\n { name: 'service id', value: service.id },\n { name: 'service endpoint', value: service.serviceEndpoint },\n ...(service.credentialTypes\n ? [\n {\n name: 'credential types',\n value: service.credentialTypes.join(', '),\n },\n ]\n : []),\n ...(AdditionalServiceProperties && AdditionalServiceProperties[service.type]\n ? [\n {\n name: AdditionalServiceProperties[service.type]?.name,\n value: AdditionalServiceProperties[service.type]?.value,\n },\n ]\n : []),\n ],\n ]}\n />\n ))}\n <EditComponent\n onClose={handleCloseEdit}\n onSave={onSave}\n selectedService={currentlyEditableService}\n />\n <CreateComponent onServiceCreated={refetchOrganizationServices} services={services} />\n <DeleteComponent\n isLoading={isDeletingService}\n onClose={() => setServiceToDelete(null)}\n onConfirm={handleServiceDeleteConfirm}\n selectedService={serviceToDelete}\n />\n </Container>\n );\n};\n// eslint-disable-next-line better-mutation/no-mutation\nServicesList.propTypes = {\n EditComponent: PropTypes.elementType,\n CreateComponent: PropTypes.elementType,\n DeleteComponent: PropTypes.elementType,\n AdditionalServiceProperties: PropTypes.object,\n};\n\nexport default ServicesList;\n"],"names":["useLocation","useRedirect","useNavigate","useCreate","useSelectedOrganization","useRef","useState","useGetList","dataResources","useIsIssuingInspection","useCallback","useEffect","kebabCase","getNewServiceIndex","credentialTypesByServiceTypes","jsxs","Fragment","Popup","jsx","ServiceTypeSelection","ServiceEndpointSelection","SecretKeysPopup","useDelete","ServicesEdit","ServicesDelete","useSearchParams","useParticipantAgreementState","useGetOne","useMemo","useUpdate","serviceTypeTitlesMap","Container","Typography","Box","Stack","Button","Loading","ListItem"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAgCA,MAAM,oBAAoB,EAAE,cAAc,IAAI,UAAU,GAAA;AAExD,MAAM,oBAAoB,CAAC,EAAE,kBAAkB,UAAU,wBAAwB;AAC/E,QAAM,EAAE,SAAA,IAAaA,wBAAA;AACrB,QAAM,WAAWC,WAAAA,YAAA;AACjB,QAAM,WAAWC,YAAAA,YAAA;AACjB,QAAM,CAAC,aAAa,IAAIC,qBAAA;AAExB,QAAM,CAAC,GAAG,IAAIC,kDAAA;AACd,QAAM,iBAAiBC,MAA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AAAA,QACC,WAAW;AAAA,QACX,SAAS,MAAM,mBAAmB,IAAI;AAAA,QACtC,WAAW;AAAA,QACX,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,EACnB,GACF;AAEJ;AAEA,aAAa,YAAY;AAAA,EACvB,eAAe,UAAU;AAAA,EACzB,iBAAiB,UAAU;AAAA,EAC3B,iBAAiB,UAAU;AAAA,EAC3B,6BAA6B,UAAU;AACzC;;;;"}
|
package/dist/pages/services.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useRef, useState, useCallback, useEffect, useMemo } from "react";
|
|
3
|
-
import { kebabCase } from "lodash
|
|
3
|
+
import { kebabCase } from "lodash-es";
|
|
4
4
|
import { useRedirect, useCreate, useGetList, useDelete, useGetOne, useUpdate } from "react-admin";
|
|
5
5
|
import { useLocation, useNavigate, useSearchParams } from "react-router";
|
|
6
6
|
import PropTypes from "prop-types";
|
|
@@ -10,14 +10,14 @@ import { d as dataResources } from "../chunks/remoteDataProvider.gtTXA1-g.js";
|
|
|
10
10
|
import { g as getNewServiceIndex } from "../chunks/invitations.BbK6WSY8.js";
|
|
11
11
|
import { u as useSelectedOrganization } from "../chunks/selectedOrganizationState.DBpKeOn0.js";
|
|
12
12
|
import { u as useIsIssuingInspection } from "../chunks/useIsIssuingInspection.C76mY_wb.js";
|
|
13
|
-
import { S as ServiceTypeSelection, a as ServiceEndpointSelection } from "../chunks/index.
|
|
14
|
-
import { S as SecretKeysPopup } from "../chunks/index.
|
|
13
|
+
import { S as ServiceTypeSelection, a as ServiceEndpointSelection } from "../chunks/index.Cmn4FlUL.js";
|
|
14
|
+
import { S as SecretKeysPopup } from "../chunks/index.DMWKdmxs.js";
|
|
15
15
|
import { Container, Typography, Box, Stack, Button } from "@mui/material";
|
|
16
16
|
import EditIcon from "@mui/icons-material/Edit";
|
|
17
17
|
import DeleteIcon from "@mui/icons-material/Delete";
|
|
18
18
|
import { L as ListItem } from "../chunks/ListItem.DgXqrom8.js";
|
|
19
|
-
import { L as Loading } from "../chunks/Loading.
|
|
20
|
-
import { a as ServicesEdit, S as ServicesDelete } from "../chunks/ServicesEdit.
|
|
19
|
+
import { L as Loading } from "../chunks/Loading.Bcm3xNJU.js";
|
|
20
|
+
import { a as ServicesEdit, S as ServicesDelete } from "../chunks/ServicesEdit.DDgjS5kU.js";
|
|
21
21
|
import { u as useParticipantAgreementState } from "../chunks/participantAgreementState.DFCQsamR.js";
|
|
22
22
|
const defaultAuthClient = { clientSecret: "", clientId: "" };
|
|
23
23
|
const ServiceCreateForm = ({ onServiceCreated, services, InterceptOnCreate }) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"services.js","sources":["../../src/pages/services/ServiceCreateForm.jsx","../../src/pages/services/useDeleteService.js","../../src/pages/services/ServicesList.jsx"],"sourcesContent":["/**\n * Copyright 2023 Velocity Team\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useEffect, useRef, useState, useCallback } from 'react';\nimport { kebabCase } from 'lodash/string';\nimport { useRedirect, useCreate, useGetList } from 'react-admin';\nimport { useLocation, useNavigate } from 'react-router';\nimport PropTypes from 'prop-types';\n\nimport Popup from '@/components/common/Popup.jsx';\nimport { credentialTypesByServiceTypes } from '@/utils/serviceTypes';\nimport { dataResources } from '@/utils/remoteDataProvider';\nimport { getNewServiceIndex } from '@/utils/invitations';\nimport useSelectedOrganization from '@/state/selectedOrganizationState';\nimport { useIsIssuingInspection } from './hooks/useIsIssuingInspection';\nimport { ServiceTypeSelection } from './components/ServiceTypeSelection/index.jsx';\nimport { ServiceEndpointSelection } from './components/ServiceEndpointSelection/index.jsx';\nimport { SecretKeysPopup } from './components/SecretKeysPopup/index.jsx';\n\nconst defaultAuthClient = { clientSecret: '', clientId: '' };\n\nconst ServiceCreateForm = ({ onServiceCreated, services, InterceptOnCreate }) => {\n const { pathname } = useLocation();\n const redirect = useRedirect();\n const navigate = useNavigate();\n const [createService] = useCreate();\n\n const [did] = useSelectedOrganization();\n const openedStateRef = useRef(true);\n const isModalOpened = /\\/services\\/create/.test(pathname);\n\n const [serviceId, setServiceId] = useState('');\n const [selectedCAO, setSelectedCAO] = useState('');\n\n const { data: credentialAgentOperators, isLoading: isLoadingCAO } = useGetList(\n dataResources.SEARCH_PROFILES,\n {\n filter: { serviceTypes: 'CredentialAgentOperator' },\n },\n );\n\n const [selectedStep, setSelectedStep] = useState(1);\n const [selectedServiceType, setSelectedServiceType] = useState('');\n const [authClient, setAuthClient] = useState(defaultAuthClient);\n const [createServiceInProgress, setCreateServiceInProgress] = useState(false);\n\n const [isInterceptOnCreateOpen, setIsInterceptOnCreateOpen] = useState(false);\n const [isKeysPopupOpened, setIsKeysPopupOpened] = useState(false);\n\n const { isIssuingOrInspection, isCAO } = useIsIssuingInspection(selectedServiceType);\n\n const onClose = useCallback(() => {\n navigate(-1);\n }, [navigate]);\n\n // clear previous state after close\n useEffect(() => {\n const reset = () => {\n setSelectedStep(1);\n setSelectedServiceType('');\n setAuthClient(defaultAuthClient);\n };\n if (openedStateRef.current === false && isModalOpened) {\n reset();\n }\n // eslint-disable-next-line better-mutation/no-mutation\n openedStateRef.current = isModalOpened;\n\n return reset;\n }, [isModalOpened]);\n\n useEffect(() => {\n if (InterceptOnCreate && serviceId) {\n setIsInterceptOnCreateOpen(true);\n }\n }, [InterceptOnCreate, serviceId]);\n\n const onCreateService = async ({ serviceEndpoint }) => {\n const type = selectedServiceType.id.match(/.+v1/);\n const kebabType = kebabCase(type[0]);\n const id = `${did}#${kebabType}-${getNewServiceIndex(services, kebabType)}`;\n try {\n setCreateServiceInProgress(true);\n const result = await createService(\n dataResources.SERVICES,\n {\n data: {\n organizationId: did,\n payload: {\n id,\n serviceEndpoint,\n type: type[0],\n credentialTypes: credentialTypesByServiceTypes[selectedServiceType.id],\n },\n },\n },\n { returnPromise: true },\n );\n setCreateServiceInProgress(false);\n setServiceId(result.id);\n if (result.authClient) {\n setAuthClient(result.authClient);\n } else {\n setSelectedCAO(serviceEndpoint.split('#')[0]);\n }\n onServiceCreated();\n } catch (e) {\n setCreateServiceInProgress(false);\n }\n };\n\n return (\n <>\n <Popup\n onClose={onClose}\n title=\"\"\n isOpen={isModalOpened}\n mainContainerStyles={styles.mainContainer}\n disableCloseButton={createServiceInProgress}\n >\n {selectedStep === 1 && (\n <ServiceTypeSelection\n selectedServiceType={selectedServiceType}\n setSelectedServiceType={setSelectedServiceType}\n isLoading={isLoadingCAO}\n handleNext={() => setSelectedStep(2)}\n />\n )}\n {selectedStep === 2 && (\n <ServiceEndpointSelection\n credentialAgentOperators={credentialAgentOperators}\n isIssueOrInspection={isIssuingOrInspection}\n inProgress={createServiceInProgress}\n onCreate={onCreateService}\n handleBack={() => setSelectedStep(1)}\n />\n )}\n </Popup>\n\n <InterceptOnCreate\n isInterceptOnCreateOpen={isInterceptOnCreateOpen}\n serviceId={serviceId}\n onNext={() => setIsKeysPopupOpened(true)}\n onClose={() => {\n redirect('list', 'services');\n }}\n isIssueOrInspection={isIssuingOrInspection}\n selectedCAO={selectedCAO}\n isCAO={isCAO}\n />\n\n <SecretKeysPopup\n isOpen={isKeysPopupOpened}\n secretKeys={{ authClients: [authClient] }}\n onClose={() => {\n setIsKeysPopupOpened(false);\n navigate(-1);\n }}\n wording={{\n title:\n // eslint-disable-next-line max-len\n 'Here are your secret identifiers. Please keep a copy of these as they will not be availableonce you close this dialog. You may need to pass this to the admin of your Credential Agent.',\n subtitle: 'Download or copy your secret encryption keys and keep them somewhere safe.',\n }}\n warningWording={{\n title: 'You must download a copy of your keys before exiting',\n subtitle:\n 'They will not be available again and are critical for managing your organization data.',\n }}\n />\n </>\n );\n};\n\nconst styles = {\n mainContainer: { pt: 2 },\n};\n\n// eslint-disable-next-line better-mutation/no-mutation\nServiceCreateForm.propTypes = {\n onServiceCreated: PropTypes.func,\n services: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string.isRequired,\n }),\n ).isRequired,\n InterceptOnCreate: PropTypes.elementType,\n};\n\nexport default ServiceCreateForm;\n","/**\n * Copyright 2023 Velocity Team\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useState } from 'react';\nimport { useDelete } from 'react-admin';\nimport { dataResources } from '../../utils/remoteDataProvider';\nimport useSelectedOrganization from '../../state/selectedOrganizationState';\n\nconst useDeleteService = (refetch) => {\n const [did] = useSelectedOrganization();\n const [serviceToDelete, setServiceToDelete] = useState(null);\n const [isDeletingService, setIsDeletingService] = useState(false);\n const [deleteOne] = useDelete(\n dataResources.SERVICES,\n {\n id: serviceToDelete,\n },\n {\n onSettled: () =>\n refetch().finally(() => {\n setIsDeletingService(false);\n setServiceToDelete(null);\n }),\n },\n );\n\n const handleServiceDeleteConfirm = async () => {\n setIsDeletingService(true);\n try {\n await deleteOne(dataResources.SERVICES, {\n id: serviceToDelete.id,\n previousData: {\n organizationId: did,\n },\n });\n } catch (e) {\n setIsDeletingService(false);\n throw e;\n }\n };\n\n return { handleServiceDeleteConfirm, isDeletingService, serviceToDelete, setServiceToDelete };\n};\n\nexport default useDeleteService;\n","/**\n * Copyright 2023 Velocity Team\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useMemo } from 'react';\nimport { useSearchParams } from 'react-router';\nimport { Box, Button, Container, Stack, Typography } from '@mui/material';\nimport EditIcon from '@mui/icons-material/Edit';\nimport DeleteIcon from '@mui/icons-material/Delete';\nimport { useGetOne, useRedirect, useUpdate } from 'react-admin';\n\nimport PropTypes from 'prop-types';\nimport ListItem from '@/components/common/ListItem.jsx';\nimport Loading from '@/components/Loading.jsx';\nimport ServicesEdit from '@/components/services/ServicesEdit.jsx';\nimport ServicesDelete from '@/components/services/ServicesDelete.jsx';\nimport useSelectedOrganization from '@/state/selectedOrganizationState';\nimport { dataResources } from '@/utils/remoteDataProvider';\nimport useParticipantAgreementState from '@/state/participantAgreementState';\nimport ServiceCreateForm from './ServiceCreateForm.jsx';\nimport { serviceTypeTitlesMap } from '../../utils/serviceTypes';\nimport useDeleteService from './useDeleteService';\n\nconst SAVE_ERROR_MESSAGE =\n 'We were unable to update your service with the details provided. Please check to ensure you have provided valid information and then try again.';\n\nconst getAmountTitle = (total) => `${total} active service${total > 1 ? 's' : ''}`;\n\nconst ServicesList = ({\n // override props, defaulting to your internal components\n EditComponent = ServicesEdit,\n CreateComponent = ServiceCreateForm,\n DeleteComponent = ServicesDelete,\n AdditionalServiceProperties = {},\n}) => {\n const [params, setParams] = useSearchParams();\n const currentlyEditableServiceId = params.get('id');\n const [did] = useSelectedOrganization();\n\n const [, setParticipantAgreementApproved] = useParticipantAgreementState();\n\n const {\n data,\n isLoading,\n isFetching,\n refetch: refetchOrganizationServices,\n } = useGetOne('organizations', { id: did }, { enabled: !!did });\n\n const { handleServiceDeleteConfirm, isDeletingService, serviceToDelete, setServiceToDelete } =\n useDeleteService(refetchOrganizationServices);\n\n const services = useMemo(() => data?.didDoc?.service || [], [data?.didDoc?.service]);\n const servicesActivated = useMemo(\n () =>\n services.map((item) => ({\n ...item,\n activated: data?.activatedServiceIds?.includes(item.id) || false,\n })),\n [services, data],\n );\n\n const totalActivatedServices = servicesActivated.filter(({ activated }) => activated).length;\n const currentlyEditableService = useMemo(\n () =>\n currentlyEditableServiceId\n ? services.find((item) => item.id === currentlyEditableServiceId)\n : null,\n [services, currentlyEditableServiceId],\n );\n\n const [updateService] = useUpdate(undefined, undefined, {\n onSuccess: () => {\n setParticipantAgreementApproved(true);\n\n refetchOrganizationServices();\n },\n });\n\n const serviceTitle = (service) => {\n if (service.type === 'VlcContactIssuer_v1') {\n if (service.credentialTypes?.includes('EmailV1.0')) {\n return 'Primary Source Email Issuer (eg. Email Service Provider)';\n }\n return 'Primary Source Phone Issuer (eg. Telco)';\n }\n return serviceTypeTitlesMap[service.type] || service.type;\n };\n\n // eslint-disable-next-line consistent-return\n const onSave = async ({ serviceEndpoint }) => {\n try {\n await updateService(\n dataResources.SERVICES,\n {\n id: currentlyEditableService.id,\n data: {\n organizationId: did,\n payload: {\n serviceEndpoint,\n },\n },\n },\n { returnPromise: true },\n );\n } catch (e) {\n return {\n serviceEndpoint: SAVE_ERROR_MESSAGE,\n };\n }\n };\n\n const editAction = useMemo(\n () => ({\n title: 'EDIT',\n icon: <EditIcon />,\n action: (id) => setParams({ id }),\n }),\n [setParams],\n );\n\n const deleteAction = useMemo(\n () => ({\n title: 'DELETE',\n icon: <DeleteIcon />,\n action: (id) => setServiceToDelete(id),\n }),\n [setServiceToDelete],\n );\n\n const isLoadingVisible = isLoading || isFetching;\n\n const redirect = useRedirect();\n const handleCloseEdit = () => {\n setParams({});\n };\n\n return (\n <Container maxWidth=\"xl\" sx={{ mt: 5 }}>\n <Typography variant=\"h3\">Manage Services</Typography>\n <Box sx={{ mt: 2, mb: 4, maxWidth: '720px' }}>\n <Typography variant=\"subtitle1\">\n Setup the services your organization is to be offering across the Velocity Network™:\n Issuing, Verifying, Operating a Credential Agent and/or operating a Node.\n </Typography>\n </Box>\n <Stack\n sx={{ mb: 2 }}\n flexDirection=\"row\"\n justifyContent=\"space-between\"\n alignItems=\"flex-end\"\n >\n <Button variant=\"outlined\" onClick={() => redirect('create', 'services')}>\n Add service +\n </Button>\n {!!totalActivatedServices && (\n <Typography color=\"secondary.light\" sx={{ fontSize: 14 }}>\n {getAmountTitle(totalActivatedServices)}\n </Typography>\n )}\n </Stack>\n {isLoadingVisible && <Loading sx={{ pt: '60px' }} />}\n {!isLoadingVisible &&\n servicesActivated.map((service) => (\n <ListItem\n key={service.id}\n id={service.id}\n title={serviceTitle(service)}\n status={\n service.activated\n ? { title: 'ACTIVATED', color: 'primary.success' }\n : { title: 'INACTIVE', color: 'primary.main' }\n }\n showActions\n actions={[editAction, deleteAction]}\n content={[\n [\n { name: 'service id', value: service.id },\n { name: 'service endpoint', value: service.serviceEndpoint },\n ...(service.credentialTypes\n ? [\n {\n name: 'credential types',\n value: service.credentialTypes.join(', '),\n },\n ]\n : []),\n ...(AdditionalServiceProperties && AdditionalServiceProperties[service.type]\n ? [\n {\n name: AdditionalServiceProperties[service.type]?.name,\n value: AdditionalServiceProperties[service.type]?.value,\n },\n ]\n : []),\n ],\n ]}\n />\n ))}\n <EditComponent\n onClose={handleCloseEdit}\n onSave={onSave}\n selectedService={currentlyEditableService}\n />\n <CreateComponent onServiceCreated={refetchOrganizationServices} services={services} />\n <DeleteComponent\n isLoading={isDeletingService}\n onClose={() => setServiceToDelete(null)}\n onConfirm={handleServiceDeleteConfirm}\n selectedService={serviceToDelete}\n />\n </Container>\n );\n};\n// eslint-disable-next-line better-mutation/no-mutation\nServicesList.propTypes = {\n EditComponent: PropTypes.elementType,\n CreateComponent: PropTypes.elementType,\n DeleteComponent: PropTypes.elementType,\n AdditionalServiceProperties: PropTypes.object,\n};\n\nexport default ServicesList;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgCA,MAAM,oBA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/services/ServiceCreateForm.jsx","../../src/pages/services/useDeleteService.js","../../src/pages/services/ServicesList.jsx"],"sourcesContent":["/**\n * Copyright 2023 Velocity Team\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useEffect, useRef, useState, useCallback } from 'react';\nimport { kebabCase } from 'lodash-es';\nimport { useRedirect, useCreate, useGetList } from 'react-admin';\nimport { useLocation, useNavigate } from 'react-router';\nimport PropTypes from 'prop-types';\n\nimport Popup from '@/components/common/Popup.jsx';\nimport { credentialTypesByServiceTypes } from '@/utils/serviceTypes.js';\nimport { dataResources } from '@/utils/remoteDataProvider.js';\nimport { getNewServiceIndex } from '@/utils/invitations.js';\nimport useSelectedOrganization from '@/state/selectedOrganizationState.js';\nimport { useIsIssuingInspection } from './hooks/useIsIssuingInspection.js';\nimport { ServiceTypeSelection } from './components/ServiceTypeSelection/index.jsx';\nimport { ServiceEndpointSelection } from './components/ServiceEndpointSelection/index.jsx';\nimport { SecretKeysPopup } from './components/SecretKeysPopup/index.jsx';\n\nconst defaultAuthClient = { clientSecret: '', clientId: '' };\n\nconst ServiceCreateForm = ({ onServiceCreated, services, InterceptOnCreate }) => {\n const { pathname } = useLocation();\n const redirect = useRedirect();\n const navigate = useNavigate();\n const [createService] = useCreate();\n\n const [did] = useSelectedOrganization();\n const openedStateRef = useRef(true);\n const isModalOpened = /\\/services\\/create/.test(pathname);\n\n const [serviceId, setServiceId] = useState('');\n const [selectedCAO, setSelectedCAO] = useState('');\n\n const { data: credentialAgentOperators, isLoading: isLoadingCAO } = useGetList(\n dataResources.SEARCH_PROFILES,\n {\n filter: { serviceTypes: 'CredentialAgentOperator' },\n },\n );\n\n const [selectedStep, setSelectedStep] = useState(1);\n const [selectedServiceType, setSelectedServiceType] = useState('');\n const [authClient, setAuthClient] = useState(defaultAuthClient);\n const [createServiceInProgress, setCreateServiceInProgress] = useState(false);\n\n const [isInterceptOnCreateOpen, setIsInterceptOnCreateOpen] = useState(false);\n const [isKeysPopupOpened, setIsKeysPopupOpened] = useState(false);\n\n const { isIssuingOrInspection, isCAO } = useIsIssuingInspection(selectedServiceType);\n\n const onClose = useCallback(() => {\n navigate(-1);\n }, [navigate]);\n\n // clear previous state after close\n useEffect(() => {\n const reset = () => {\n setSelectedStep(1);\n setSelectedServiceType('');\n setAuthClient(defaultAuthClient);\n };\n if (openedStateRef.current === false && isModalOpened) {\n reset();\n }\n // eslint-disable-next-line better-mutation/no-mutation\n openedStateRef.current = isModalOpened;\n\n return reset;\n }, [isModalOpened]);\n\n useEffect(() => {\n if (InterceptOnCreate && serviceId) {\n setIsInterceptOnCreateOpen(true);\n }\n }, [InterceptOnCreate, serviceId]);\n\n const onCreateService = async ({ serviceEndpoint }) => {\n const type = selectedServiceType.id.match(/.+v1/);\n const kebabType = kebabCase(type[0]);\n const id = `${did}#${kebabType}-${getNewServiceIndex(services, kebabType)}`;\n try {\n setCreateServiceInProgress(true);\n const result = await createService(\n dataResources.SERVICES,\n {\n data: {\n organizationId: did,\n payload: {\n id,\n serviceEndpoint,\n type: type[0],\n credentialTypes: credentialTypesByServiceTypes[selectedServiceType.id],\n },\n },\n },\n { returnPromise: true },\n );\n setCreateServiceInProgress(false);\n setServiceId(result.id);\n if (result.authClient) {\n setAuthClient(result.authClient);\n } else {\n setSelectedCAO(serviceEndpoint.split('#')[0]);\n }\n onServiceCreated();\n } catch (e) {\n setCreateServiceInProgress(false);\n }\n };\n\n return (\n <>\n <Popup\n onClose={onClose}\n title=\"\"\n isOpen={isModalOpened}\n mainContainerStyles={styles.mainContainer}\n disableCloseButton={createServiceInProgress}\n >\n {selectedStep === 1 && (\n <ServiceTypeSelection\n selectedServiceType={selectedServiceType}\n setSelectedServiceType={setSelectedServiceType}\n isLoading={isLoadingCAO}\n handleNext={() => setSelectedStep(2)}\n />\n )}\n {selectedStep === 2 && (\n <ServiceEndpointSelection\n credentialAgentOperators={credentialAgentOperators}\n isIssueOrInspection={isIssuingOrInspection}\n inProgress={createServiceInProgress}\n onCreate={onCreateService}\n handleBack={() => setSelectedStep(1)}\n />\n )}\n </Popup>\n\n <InterceptOnCreate\n isInterceptOnCreateOpen={isInterceptOnCreateOpen}\n serviceId={serviceId}\n onNext={() => setIsKeysPopupOpened(true)}\n onClose={() => {\n redirect('list', 'services');\n }}\n isIssueOrInspection={isIssuingOrInspection}\n selectedCAO={selectedCAO}\n isCAO={isCAO}\n />\n\n <SecretKeysPopup\n isOpen={isKeysPopupOpened}\n secretKeys={{ authClients: [authClient] }}\n onClose={() => {\n setIsKeysPopupOpened(false);\n navigate(-1);\n }}\n wording={{\n title:\n // eslint-disable-next-line max-len\n 'Here are your secret identifiers. Please keep a copy of these as they will not be availableonce you close this dialog. You may need to pass this to the admin of your Credential Agent.',\n subtitle: 'Download or copy your secret encryption keys and keep them somewhere safe.',\n }}\n warningWording={{\n title: 'You must download a copy of your keys before exiting',\n subtitle:\n 'They will not be available again and are critical for managing your organization data.',\n }}\n />\n </>\n );\n};\n\nconst styles = {\n mainContainer: { pt: 2 },\n};\n\n// eslint-disable-next-line better-mutation/no-mutation\nServiceCreateForm.propTypes = {\n onServiceCreated: PropTypes.func,\n services: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string.isRequired,\n }),\n ).isRequired,\n InterceptOnCreate: PropTypes.elementType,\n};\n\nexport default ServiceCreateForm;\n","/**\n * Copyright 2023 Velocity Team\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useState } from 'react';\nimport { useDelete } from 'react-admin';\nimport { dataResources } from '../../utils/remoteDataProvider.js';\nimport useSelectedOrganization from '../../state/selectedOrganizationState.js';\n\nconst useDeleteService = (refetch) => {\n const [did] = useSelectedOrganization();\n const [serviceToDelete, setServiceToDelete] = useState(null);\n const [isDeletingService, setIsDeletingService] = useState(false);\n const [deleteOne] = useDelete(\n dataResources.SERVICES,\n {\n id: serviceToDelete,\n },\n {\n onSettled: () =>\n refetch().finally(() => {\n setIsDeletingService(false);\n setServiceToDelete(null);\n }),\n },\n );\n\n const handleServiceDeleteConfirm = async () => {\n setIsDeletingService(true);\n try {\n await deleteOne(dataResources.SERVICES, {\n id: serviceToDelete.id,\n previousData: {\n organizationId: did,\n },\n });\n } catch (e) {\n setIsDeletingService(false);\n throw e;\n }\n };\n\n return { handleServiceDeleteConfirm, isDeletingService, serviceToDelete, setServiceToDelete };\n};\n\nexport default useDeleteService;\n","/**\n * Copyright 2023 Velocity Team\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useMemo } from 'react';\nimport { useSearchParams } from 'react-router';\nimport { Box, Button, Container, Stack, Typography } from '@mui/material';\nimport EditIcon from '@mui/icons-material/Edit';\nimport DeleteIcon from '@mui/icons-material/Delete';\nimport { useGetOne, useRedirect, useUpdate } from 'react-admin';\n\nimport PropTypes from 'prop-types';\nimport ListItem from '@/components/common/ListItem.jsx';\nimport Loading from '@/components/Loading.jsx';\nimport ServicesEdit from '@/components/services/ServicesEdit.jsx';\nimport ServicesDelete from '@/components/services/ServicesDelete.jsx';\nimport useSelectedOrganization from '@/state/selectedOrganizationState.js';\nimport { dataResources } from '@/utils/remoteDataProvider.js';\nimport useParticipantAgreementState from '@/state/participantAgreementState.js';\nimport ServiceCreateForm from './ServiceCreateForm.jsx';\nimport { serviceTypeTitlesMap } from '../../utils/serviceTypes.js';\nimport useDeleteService from './useDeleteService.js';\n\nconst SAVE_ERROR_MESSAGE =\n 'We were unable to update your service with the details provided. Please check to ensure you have provided valid information and then try again.';\n\nconst getAmountTitle = (total) => `${total} active service${total > 1 ? 's' : ''}`;\n\nconst ServicesList = ({\n // override props, defaulting to your internal components\n EditComponent = ServicesEdit,\n CreateComponent = ServiceCreateForm,\n DeleteComponent = ServicesDelete,\n AdditionalServiceProperties = {},\n}) => {\n const [params, setParams] = useSearchParams();\n const currentlyEditableServiceId = params.get('id');\n const [did] = useSelectedOrganization();\n\n const [, setParticipantAgreementApproved] = useParticipantAgreementState();\n\n const {\n data,\n isLoading,\n isFetching,\n refetch: refetchOrganizationServices,\n } = useGetOne('organizations', { id: did }, { enabled: !!did });\n\n const { handleServiceDeleteConfirm, isDeletingService, serviceToDelete, setServiceToDelete } =\n useDeleteService(refetchOrganizationServices);\n\n const services = useMemo(() => data?.didDoc?.service || [], [data?.didDoc?.service]);\n const servicesActivated = useMemo(\n () =>\n services.map((item) => ({\n ...item,\n activated: data?.activatedServiceIds?.includes(item.id) || false,\n })),\n [services, data],\n );\n\n const totalActivatedServices = servicesActivated.filter(({ activated }) => activated).length;\n const currentlyEditableService = useMemo(\n () =>\n currentlyEditableServiceId\n ? services.find((item) => item.id === currentlyEditableServiceId)\n : null,\n [services, currentlyEditableServiceId],\n );\n\n const [updateService] = useUpdate(undefined, undefined, {\n onSuccess: () => {\n setParticipantAgreementApproved(true);\n\n refetchOrganizationServices();\n },\n });\n\n const serviceTitle = (service) => {\n if (service.type === 'VlcContactIssuer_v1') {\n if (service.credentialTypes?.includes('EmailV1.0')) {\n return 'Primary Source Email Issuer (eg. Email Service Provider)';\n }\n return 'Primary Source Phone Issuer (eg. Telco)';\n }\n return serviceTypeTitlesMap[service.type] || service.type;\n };\n\n // eslint-disable-next-line consistent-return\n const onSave = async ({ serviceEndpoint }) => {\n try {\n await updateService(\n dataResources.SERVICES,\n {\n id: currentlyEditableService.id,\n data: {\n organizationId: did,\n payload: {\n serviceEndpoint,\n },\n },\n },\n { returnPromise: true },\n );\n } catch (e) {\n return {\n serviceEndpoint: SAVE_ERROR_MESSAGE,\n };\n }\n };\n\n const editAction = useMemo(\n () => ({\n title: 'EDIT',\n icon: <EditIcon />,\n action: (id) => setParams({ id }),\n }),\n [setParams],\n );\n\n const deleteAction = useMemo(\n () => ({\n title: 'DELETE',\n icon: <DeleteIcon />,\n action: (id) => setServiceToDelete(id),\n }),\n [setServiceToDelete],\n );\n\n const isLoadingVisible = isLoading || isFetching;\n\n const redirect = useRedirect();\n const handleCloseEdit = () => {\n setParams({});\n };\n\n return (\n <Container maxWidth=\"xl\" sx={{ mt: 5 }}>\n <Typography variant=\"h3\">Manage Services</Typography>\n <Box sx={{ mt: 2, mb: 4, maxWidth: '720px' }}>\n <Typography variant=\"subtitle1\">\n Setup the services your organization is to be offering across the Velocity Network™:\n Issuing, Verifying, Operating a Credential Agent and/or operating a Node.\n </Typography>\n </Box>\n <Stack\n sx={{ mb: 2 }}\n flexDirection=\"row\"\n justifyContent=\"space-between\"\n alignItems=\"flex-end\"\n >\n <Button variant=\"outlined\" onClick={() => redirect('create', 'services')}>\n Add service +\n </Button>\n {!!totalActivatedServices && (\n <Typography color=\"secondary.light\" sx={{ fontSize: 14 }}>\n {getAmountTitle(totalActivatedServices)}\n </Typography>\n )}\n </Stack>\n {isLoadingVisible && <Loading sx={{ pt: '60px' }} />}\n {!isLoadingVisible &&\n servicesActivated.map((service) => (\n <ListItem\n key={service.id}\n id={service.id}\n title={serviceTitle(service)}\n status={\n service.activated\n ? { title: 'ACTIVATED', color: 'primary.success' }\n : { title: 'INACTIVE', color: 'primary.main' }\n }\n showActions\n actions={[editAction, deleteAction]}\n content={[\n [\n { name: 'service id', value: service.id },\n { name: 'service endpoint', value: service.serviceEndpoint },\n ...(service.credentialTypes\n ? [\n {\n name: 'credential types',\n value: service.credentialTypes.join(', '),\n },\n ]\n : []),\n ...(AdditionalServiceProperties && AdditionalServiceProperties[service.type]\n ? [\n {\n name: AdditionalServiceProperties[service.type]?.name,\n value: AdditionalServiceProperties[service.type]?.value,\n },\n ]\n : []),\n ],\n ]}\n />\n ))}\n <EditComponent\n onClose={handleCloseEdit}\n onSave={onSave}\n selectedService={currentlyEditableService}\n />\n <CreateComponent onServiceCreated={refetchOrganizationServices} services={services} />\n <DeleteComponent\n isLoading={isDeletingService}\n onClose={() => setServiceToDelete(null)}\n onConfirm={handleServiceDeleteConfirm}\n selectedService={serviceToDelete}\n />\n </Container>\n );\n};\n// eslint-disable-next-line better-mutation/no-mutation\nServicesList.propTypes = {\n EditComponent: PropTypes.elementType,\n CreateComponent: PropTypes.elementType,\n DeleteComponent: PropTypes.elementType,\n AdditionalServiceProperties: PropTypes.object,\n};\n\nexport default ServicesList;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgCA,MAAM,oBAAoB,EAAE,cAAc,IAAI,UAAU,GAAA;AAExD,MAAM,oBAAoB,CAAC,EAAE,kBAAkB,UAAU,wBAAwB;AAC/E,QAAM,EAAE,SAAA,IAAa,YAAA;AACrB,QAAM,WAAW,YAAA;AACjB,QAAM,WAAW,YAAA;AACjB,QAAM,CAAC,aAAa,IAAI,UAAA;AAExB,QAAM,CAAC,GAAG,IAAI,wBAAA;AACd,QAAM,iBAAiB,OAAO,IAAI;AAClC,QAAM,gBAAgB,qBAAqB,KAAK,QAAQ;AAExD,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,EAAE;AAC7C,QAAM,CAAC,aAAa,cAAc,IAAI,SAAS,EAAE;AAEjD,QAAM,EAAE,MAAM,0BAA0B,WAA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AAI,+BAA+B,4BAA4B,QAAQ,IAAI,IACvE;AAAA,cACE;AAAA,gBACE,MAAM,4BAA4B,QAAQ,IAAI,GAAG;AAAA,gBACjD,OAAO,4BAA4B,QAAQ,IAAI,GAAG;AAAA,cAAA;AAAA,YACpD,IAEF,CAAA;AAAA,UAAC;AAAA,QACP;AAAA,MACF;AAAA,MA/BK,QAAQ;AAAA,IAAA,CAiChB;AAAA,IACH;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,SAAS;AAAA,QACT;AAAA,QACA,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,IAEnB,oBAAC,iBAAA,EAAgB,kBAAkB,6BAA6B,SAAA,CAAoB;AAAA,IACpF;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAW;AAAA,QACX,SAAS,MAAM,mBAAmB,IAAI;AAAA,QACtC,WAAW;AAAA,QACX,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,EACnB,GACF;AAEJ;AAEA,aAAa,YAAY;AAAA,EACvB,eAAe,UAAU;AAAA,EACzB,iBAAiB,UAAU;AAAA,EAC3B,iBAAiB,UAAU;AAAA,EAC3B,6BAA6B,UAAU;AACzC;"}
|
package/dist/pages.cjs
CHANGED
|
@@ -5,7 +5,7 @@ const material = require("@mui/material");
|
|
|
5
5
|
const reactRouter = require("react-router");
|
|
6
6
|
const theme = require("./chunks/theme.CDQ6GHCD.js");
|
|
7
7
|
const raCore = require("ra-core");
|
|
8
|
-
const Loading = require("./chunks/Loading.
|
|
8
|
+
const Loading = require("./chunks/Loading.cGHE59CV.js");
|
|
9
9
|
const remoteDataProvider = require("./chunks/remoteDataProvider.BCiFSYnk.js");
|
|
10
10
|
const React = require("react");
|
|
11
11
|
const ConfigContext = require("./chunks/ConfigContext.CqbiiiBD.js");
|
package/dist/pages.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pages.cjs","sources":["../src/pages/PrivacyPolicy.jsx","../src/pages/SignatoryLanding/hooks/useSignatoryResponse.js","../src/pages/SignatoryLanding/components/Wording.jsx","../src/pages/SignatoryLanding/index.jsx","../src/pages/users.jsx"],"sourcesContent":["/**\n * Copyright 2023 Velocity Team\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Typography, Link, Box, Toolbar, AppBar, List, ListItem } from '@mui/material';\n\nimport { Link as ReactRouterLink } from 'react-router';\n\nimport theme, { FOOTER_HEIGHT } from '../theme/theme';\n\nconst PrivacyPolicy = () => {\n return (\n <Box>\n <AppBar position=\"static\" sx={styles.appBar}>\n <Toolbar>\n <ReactRouterLink to=\"/\" style={{ display: 'flex' }} role=\"link\">\n <img src=\"/assets/images/logo.svg\" alt=\"Velocity\" />\n </ReactRouterLink>\n </Toolbar>\n </AppBar>\n <Box sx={styles.container}>\n <Typography variant=\"h3\" mb=\"30px\">\n REGISTRAR UI PRIVACY POLICY\n </Typography>\n <Typography textTransform=\"uppercase\" variant=\"pm\">\n Last updated: December 2022\n </Typography>\n <Typography paragraph mt=\"51px\">\n <Box component=\"span\">\n This Policy is designed to apply to the Registrar UI as available online on\n Velocity’s Registrar UI website <br />\n https://registrarapp.velocitynetwork.foundation/ (the “\n </Box>\n <Box fontWeight=\"fontWeightBold\" display=\"inline\" component=\"b\">\n Site\n </Box>\n <Box component=\"span\">”).</Box>\n </Typography>\n <Typography paragraph variant=\"h4\" sx={styles.subtitle}>\n Identity and contact details of the controller and Data Privacy officer\n </Typography>\n <Typography paragraph>\n <Box component=\"span\">Velocity Network Foundation, Inc. and its affiliates (“</Box>\n <Box component=\"span\" sx={styles.bold}>\n Velocity\n </Box>\n <Box component=\"span\">” or “</Box>\n <Box component=\"span\" sx={styles.bold}>\n we\n </Box>\n <Box component=\"span\">” or “</Box>\n <Box component=\"span\" sx={styles.bold}>\n us\n </Box>\n <Box component=\"span\">” or “</Box>\n <Box component=\"span\" sx={styles.bold}>\n our\n </Box>\n <Box component=\"span\">\n ”), as controller of personal data, is responsible for the processing of personal\n data that relates to you (“\n </Box>\n <Box component=\"span\" sx={styles.bold}>\n you\n </Box>\n <Box component=\"span\">” or “</Box>\n <Box component=\"span\" sx={styles.bold}>\n User\n </Box>\n <Box component=\"span\">\n ”) under applicable data protection laws and regulations.\n </Box>\n </Typography>\n <Typography paragraph>\n If you have questions regarding the processing of your personal data, please contact\n Velocity’s data privacy officer at \n <Link href=\"mailto:DataOfficer@VelocityNetwork.Foundation\">\n DataOfficer@VelocityNetwork.Foundation\n </Link>\n .\n </Typography>\n <Typography paragraph marginBottom=\"0px\">\n For the purposes of this Privacy Policy, “\n <Box component=\"span\" sx={styles.bold}>\n personal data\n </Box>\n ” is any information about a specific individual or that identifies or may identify\n a specific individual. In other words, it is any piece of information than can be linked\n to you.\n </Typography>\n <Typography paragraph marginTop=\"0px\">\n The term "process” or “processing” means any use of personal data,\n including but not limited to the collection, recording, organization, storing, adaptation,\n alteration, transferring, making available, blocking, deletion or destruction of personal\n data.\n </Typography>\n <Typography variant=\"h4\" sx={styles.subtitle}>\n Our Role as a Data Controller\n </Typography>\n <Typography paragraph>\n Velocity acts in the capacity of a data controller with regard to the Personal Data\n processed through the Registrar UI (the “\n <Box component=\"span\" sx={styles.bold}>\n Service\n </Box>\n ”), as well as the Career Wallet Service (as defined in the Career Wallet App\n Privacy Policy) in terms of the applicable data protection laws, including the EU General\n Data Protection Regulation (GDPR). This privacy policy does not apply to the Career Wallet\n Service, to which the Career Wallet App Privacy Policy applies.\n </Typography>\n <Typography paragraph>\n We are responsible for the collection, usage and processing of your personal data\n collected through the Site (the “\n <Box component=\"span\" sx={styles.bold}>\n Service Data\n </Box>\n ”). The Service Data may include information such as name, email, telephone number,\n payment details, including information you provide us of your employees, agents, vendors\n etc., for providing our services to You. We make decisions about the types of personal\n data that should be collected from you and purposes for which such personal data should be\n used. Therefore, we act as a data controller with regard to the Service data. This Privacy\n Policy applies to such processing.\n </Typography>\n <Typography>\n <Box component=\"span\" sx={styles.bold}>\n Separate Controllers\n </Box>\n . Additionally, Velocity and User are separately responsible for the Personal Data of the\n Velocity Career Wallet end users (“\n <Box component=\"span\" sx={styles.bold}>\n Wallet Holders\n </Box>\n ”) collected, shared and processed by Velocity and User and its further use through\n the Wallet Service. As mentioned above, this Privacy Policy does not apply to such\n processes. Please review the terms described in the Verification Service User Agreement\n for further details.\n </Typography>\n <Typography paragraph variant=\"h4\" sx={styles.subtitle}>\n Changes in the Policy\n </Typography>\n <Typography paragraph>\n We reserve all rights to adjust this Privacy Policy at any time and for any reason. You\n will be made aware of such an adjustment by reference to a change in the “Last\n updated” date of this Privacy Policy (referenced above). You are encouraged to\n periodically review this Privacy Policy to stay informed of any updates or changes. You\n will be deemed to have been made aware of, will be subject to, and to have accepted the\n changes in any revised Privacy Policy by your continued use of the Site after the date\n such updated Privacy Policy is posted here.\n </Typography>\n <Typography paragraph variant=\"h3\" sx={styles.subtitle} mb=\"30px\">\n COLLECTION OF YOUR SERVICE DATA\n </Typography>\n <Typography paragraph variant=\"h4\" sx={styles.subtitle}>\n Types and Purposes of Service Data\n </Typography>\n <Typography paragraph>\n We use Service Data for limited, specified and legitimate purposes explicitly mentioned in\n this Privacy Policy. When processing personal data, we make sure that we do so by relying\n on one of the available legal bases under applicable data protection laws, as described\n herein:\n </Typography>\n <List sx={styles.list}>\n <ListItem sx={styles.listItem}>\n <Box component=\"span\" sx={styles.bold}>\n Contact Details\n </Box>\n . When you sign up on the Site, we collect some information about You and your contact\n persons which include full name, email address, and password. We use such information to\n register you, contact you (if necessary) and maintain our business records. The legal\n bases on which we rely are ‘performance of a contract’ and ‘pursuing\n our legitimate interests’ (to administer Velocity’s business).{' '}\n </ListItem>\n <ListItem sx={styles.listItem}>\n <Box component=\"span\" sx={styles.bold}>\n Inquiries\n </Box>\n . When you contact us by any mean available, we collect your full name, email address,\n and any information that you decide to include in your message. We have no control over\n the information you decide to provide in your message, and we advise you not to share\n sensitive Personal Data. If provide you information about others, it is your\n responsibility to have their proper consent. We use such data to respond to your\n inquiries. The legal basis on which we rely is ‘pursuing our legitimate\n interests’.\n </ListItem>\n <ListItem sx={styles.listItem}>\n <Box component=\"span\" sx={styles.bold}>\n Payment processing\n </Box>\n . When you make a payment, we collect your full name, email address, organization,\n country, billing address, and payment information (name on your card, card number, and\n expiration date). We use such data to process your payment, provide you with the\n requested services, contact you (if necessary), and keep our business records. The legal\n bases on which we rely are ‘performance of a contract’ with you and\n ‘pursuing our legitimate business interests’ (i.e., to administer our\n business and comply with the applicable laws).{' '}\n </ListItem>\n </List>\n <Typography paragraph variant=\"h4\" sx={styles.subtitle}>\n HOW WE MAY SHARE SERVICE DATA\n </Typography>\n <Typography paragraph>\n Velocity may share your Personal Data it has collected about you in certain situations,\n for the specified purposes set out above. Your Personal Data may be disclosed with third\n parties such as Velocity’s suppliers, including companies and suppliers outside the\n EU/EEA.\n </Typography>\n <Typography paragraph>\n Part of our third-party suppliers consists of suppliers that facilitate us with the usage\n and performance of our Site which includes monitoring of traffic and analytics within the\n Site through the use of cookies and other similar technologies. For further information\n regarding the usage of cookies refer to our{' '}\n <Link\n sx={styles.link}\n // eslint-disable-next-line max-len\n href=\"https://www.google.com/url?q=https://www.velocitycareerlabs.com/cookies&sa=D&source=editors&ust=1678103921266161&usg=AOvVaw10nOumNzNSR0c2ET1SbBWH\"\n >\n Velocity Career Labs Cookie Policy\n </Link>\n .\n </Typography>\n <Typography paragraph>\n In particular, we use Google Analytics. For further details on the way Google uses\n personal information see the link “\n <Link\n sx={styles.link}\n // eslint-disable-next-line max-len\n href=\"https://www.google.com/url?q=https://policies.google.com/technologies/partner-sites&sa=D&source=editors&ust=1678103921266696&usg=AOvVaw2gk6GX4UYXYo1WrV_MZVX8\"\n >\n How Google uses data when you use our partners’ sites or apps\n </Link>\n ”.\n </Typography>\n <Typography paragraph>\n In the event we will transfer Service Data to our third-party suppliers that are located\n outside of the EU/EEA, and if required under applicable law, Velocity will ensure the\n implementation of appropriate safeguards in place to provide adequate level of protection\n to the Service Data in accordance with the applicable data protection laws (including the\n EU General Data Protection Regulation – ‘\n <Box component=\"span\" sx={styles.bold}>\n GDPR\n </Box>\n ’). For example, this may include the use of EU approved Standard Contractual\n Clauses or such other mechanism as have been recognized or approved by the relevant\n authorities from time to time. We will disclose Personal Data to comply with any court\n order, law or legal process, including to respond to any government or regulatory request.\n </Typography>\n <Typography paragraph>\n Finally, if we ever sell Velocity, or participate in a merger or consolidation, Service\n Data may be transferred accordingly.\n </Typography>\n <Typography paragraph variant=\"h4\" sx={styles.subtitle}>\n FOR HOW LONG WILL VELOCITY KEEP THE SERVICE DATA?\n </Typography>\n <Typography paragraph>\n Velocity will retain Service Data only for as long as needed for the purpose of providing\n you the Service After this period, Velocity will only process Service Data as may be\n required to comply with local legal obligations or to satisfy any legal requirements in\n the event of an actual, threatened or anticipated dispute or claim.\n </Typography>\n <Typography paragraph variant=\"h4\" sx={styles.subtitle}>\n YOUR DATA PROTECTION RIGHTS\n </Typography>\n <Typography>\n You may be entitled, where provided for under applicable data protection laws and\n regulations, to:\n </Typography>\n <List sx={styles.list}>\n <ListItem sx={styles.listItem}>\n Request access to the Service Data Velocity processes about you: this right entitles you\n to know whether we hold personal data about you and, if we do, to obtain information on\n and a copy of the specific pieces and categories of personal data.\n </ListItem>\n <ListItem sx={styles.listItem}>\n Request a rectification of your Service Data: this right entitles you to have your\n Service Data corrected if it is inaccurate or incomplete.\n </ListItem>\n <ListItem sx={styles.listItem}>\n Object to the processing of your Service Data: this right entitles you to request that\n Velocity no longer process your Service Data.\n </ListItem>\n <ListItem sx={styles.listItem}>\n In certain situations, as it may be applied in the applicable data protection law, and\n when you wish to terminate your account, you can request the erasure or deletion of your\n Service Data: this right entitles you to request the erasure or deletion of your Service\n Data.\n </ListItem>\n <ListItem sx={styles.listItem}>\n Request the restriction of the processing of your Service Data: this right entitles you\n to request that Velocity processes your Service Data only in limited circumstances.\n </ListItem>\n <ListItem sx={styles.listItem}>\n Request portability of your Service Data: this right entitles you to receive a copy (in\n a portable and, if technically feasible, readily usable format) of your Service Data.\n </ListItem>\n <ListItem sx={styles.listItem}>\n In the event that our processing of your Service Data or part thereof is based on your\n consent, to withdraw at any time your consent, in which case Velocity will cease any\n further processing activities of your Service Data or the relevant part thereof (however\n such withdrawal will not affect the legality of the data processing activities prior to\n the withdrawal). Please note that Velocity may not always be obliged to comply with a\n request of deletion, restriction, objection or data portability. Assessment may be made\n on a case-by-case basis of Velocity’s legal obligations and the exception to such\n rights.\n </ListItem>\n </List>\n <Typography paragraph>\n You also have the right to lodge any complaints you may have regarding Velocity’s\n processing of your Service Data to a supervisory authority. For more information about\n these rights and how to exercise them, please contact the Velocity Privacy Officer via the\n contact details set out above.\n </Typography>\n <Typography paragraph variant=\"h4\" sx={styles.subtitle}>\n HOW DOES VELOCITY SAFEGUARD THE SERVICE DATA\n </Typography>\n <Typography paragraph>\n Velocity utilizes appropriate and reasonable legal, technical and organizational security\n measures, including information technology security and physical security measures, to\n adequately protect the Service Data.\n </Typography>\n <Typography paragraph>\n These measures are appropriate to the risks posed by the processing of the Service Data\n and to the sensitivity of the Service Data and take into account the requirements of\n applicable local law. In addition, the measures are continuously improved in line with the\n development of available security products and services.\n </Typography>\n <Typography paragraph>\n Velocity requires all persons to abide by applicable security policies related to personal\n data when using Velocity systems. \n </Typography>\n <Typography paragraph variant=\"h4\" sx={styles.subtitle}>\n CONTACT US\n </Typography>\n <Typography paragraph>\n If you have questions or comments about this Privacy Policy, please contact us at:{' '}\n <Link href=\"mailto:DataOfficer@VelocityNetwork.Foundation\">\n DataOfficer@VelocityNetwork.Foundation\n </Link>\n .\n </Typography>\n </Box>\n </Box>\n );\n};\n\nconst styles = {\n container: {\n pt: '62px',\n pb: `calc(90px + ${FOOTER_HEIGHT})`,\n ml: '80px',\n maxWidth: '67.71%',\n textAlign: 'justify',\n color: theme.palette.text.primary,\n },\n subtitle: {\n mt: '50px',\n mb: '20px',\n },\n bold: {\n fontWeight: '700',\n },\n list: {\n listStyleType: 'disc',\n marginLeft: '21px',\n padding: 0,\n },\n listItem: {\n display: 'list-item',\n padding: '8px 0 8px 5px',\n textAlign: 'justify',\n lineHeight: 1.5,\n },\n appBar: {\n boxShadow: 'none',\n backgroundColor: 'transparent',\n minHeight: '79px',\n display: 'flex',\n justifyContent: 'center',\n },\n};\n\nexport default PrivacyPolicy;\n","import { useEffect, useState } from 'react';\nimport { useConfig } from '@/utils/ConfigContext';\n\n/**\n * useSignatoryResponse hook\n * @param {string} did\n * @param {string} authCode\n * @param {string} response\n * @returns {Object} { isLoading, errorCode }\n */\nexport const useSignatoryResponse = ({ did, authCode, response }) => {\n const config = useConfig();\n\n const [isLoading, setIsLoading] = useState(false);\n const [errorCode, setErrorCode] = useState(null);\n\n useEffect(() => {\n const addResponse = async () => {\n setIsLoading(true);\n setErrorCode(null);\n try {\n const resp = await fetch(\n `${config.registrarApi}/organizations/${did}/signatories/response/${response}?authCode=${authCode}`,\n );\n if (!resp.ok) {\n const data = await resp.json();\n setErrorCode(data?.errorCode || null);\n }\n } catch (e) {\n setErrorCode(e?.errorCode || null);\n } finally {\n setIsLoading(false);\n }\n };\n if (did && authCode && response && config.registrarApi) {\n addResponse();\n }\n }, [did, authCode, response, config.registrarApi]);\n\n return { isLoading, errorCode };\n};\n\nexport default useSignatoryResponse;\n","import { Typography } from '@mui/material';\nimport PropTypes from 'prop-types';\n\nconst SignatoryErrorCodes = {\n AUTH_CODE_MUST_BE_MOST_RECENT: 'auth_code_must_be_most_recent',\n AUTH_CODE_EXPIRED: 'auth_code_expired',\n UNAUTHORIZED: 'unauthorized',\n SIGNATORY_STATUS_ALREADY_COMPLETE: 'signatory_status_already_complete',\n};\n\nexport const Wording = ({ response, errorCode, name }) => {\n if (errorCode === SignatoryErrorCodes.SIGNATORY_STATUS_ALREADY_COMPLETE) {\n return (\n <>\n <Typography variant=\"h1\" textAlign=\"center\" marginBottom={3.5}>\n This process has already been completed\n </Typography>\n <Typography variant=\"pL\" textAlign=\"center\" marginBottom={11}>\n If you have any queries please contact us for assistance.\n </Typography>\n </>\n );\n }\n\n if (\n [\n SignatoryErrorCodes.AUTH_CODE_MUST_BE_MOST_RECENT,\n SignatoryErrorCodes.AUTH_CODE_EXPIRED,\n SignatoryErrorCodes.UNAUTHORIZED,\n ].includes(errorCode)\n ) {\n return (\n <>\n <Typography variant=\"h1\" textAlign=\"center\" marginBottom={3.5}>\n This link has expired.\n </Typography>\n <Typography variant=\"pL\" textAlign=\"center\" marginBottom={11}>\n Please check your inbox for the most recent reminder email and use the updated link\n provided there to complete your action. <br />\n If you can’t find the latest email, please contact us for assistance.\n </Typography>\n </>\n );\n }\n\n return (\n <>\n <Typography variant=\"h1\" textAlign=\"center\" marginBottom={3.5}>\n Thank you!\n </Typography>\n <Typography variant=\"pL\" textAlign=\"center\" marginBottom={11}>\n Your {response === 'approve' ? 'approval' : 'rejection'} regarding the addition of {name} on\n the Velocity Network has been acknowledged.\n </Typography>\n </>\n );\n};\n\n// eslint-disable-next-line better-mutation/no-mutation\nWording.propTypes = {\n response: PropTypes.string.isRequired,\n errorCode: PropTypes.string.isRequired,\n name: PropTypes.string.isRequired,\n};\n\nexport default Wording;\n","import { useParams, useSearchParams } from 'react-router';\nimport { Box } from '@mui/material';\n\nimport { useGetOne } from 'ra-core';\nimport Loading from '@/components/Loading.jsx';\nimport { dataResources } from '@/utils/remoteDataProvider';\nimport { useSignatoryResponse } from './hooks/useSignatoryResponse';\nimport { Wording } from './components/Wording.jsx';\n\nconst SignatoryLanding = () => {\n const { response } = useParams();\n const [searchParams] = useSearchParams();\n const did = searchParams.get('did');\n const authCode = searchParams.get('authCode');\n\n const { data: profile, isLoading } = useGetOne(dataResources.VERIFIED_PROFILE, { id: did });\n\n const { isLoading: isSignatoryLoading, errorCode } = useSignatoryResponse({\n did,\n authCode,\n response,\n });\n\n if (isLoading || isSignatoryLoading) {\n return (\n <Box sx={styles.loading} pt={5} pb={10} pr={8} pl={9}>\n <Loading />\n </Box>\n );\n }\n\n return (\n <Box sx={styles.container}>\n <Box sx={styles.content}>\n <img\n src=\"/assets/images/logo.svg\"\n alt=\"Velocity\"\n width={196}\n height={42}\n style={styles.image}\n />\n <Wording response={response} errorCode={errorCode} name={profile.credentialSubject.name} />\n </Box>\n </Box>\n );\n};\n\nconst styles = {\n container: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: '100%',\n height: '100vh',\n },\n content: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n transform: 'translateY(-60px)',\n maxWidth: '670px',\n },\n image: {\n marginBottom: 110,\n },\n loading: {\n height: '100vh',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n },\n};\n\nexport default SignatoryLanding;\n","/**\n * Copyright 2023 Velocity Team\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useMediaQuery } from '@mui/material';\nimport { SimpleList, List, Datagrid, EmailField, TextField } from 'react-admin';\n\nconst UserList = (props) => {\n const isSmall = useMediaQuery((theme) => theme.breakpoints.down('sm'));\n\n return (\n <List title=\"All users\" {...props}>\n {isSmall ? (\n <SimpleList\n primaryText={(record) => record.name}\n secondaryText={(record) => record.username}\n tertiaryText={(record) => record.email}\n />\n ) : (\n <Datagrid>\n <TextField source=\"id\" />\n <TextField source=\"name\" />\n <TextField source=\"username\" />\n <EmailField source=\"email\" />\n </Datagrid>\n )}\n </List>\n );\n};\n\nexport default UserList;\n"],"names":["Box","jsx","AppBar","styles","Toolbar","ReactRouterLink","jsxs","Typography","Link","List","ListItem","FOOTER_HEIGHT","theme","useConfig","useState","useEffect","Fragment","useParams","useSearchParams","useGetOne","dataResources","Loading","useMediaQuery","SimpleList","Datagrid","TextField","EmailField"],"mappings":";;;;;;;;;;;;;;AAsBA,MAAM,gBAAgB,MAAM;AAC1B,yCACGA,cAAA,EACC,UAAA;AAAA,IAAAC,2BAAAA,IAACC,SAAAA,QAAA,EAAO,UAAS,UAAS,IAAIC,SAAO,QACnC,UAAAF,2BAAAA,IAACG,SAAAA,SAAA,EACC,UAAAH,2BAAAA,IAACI,YAAAA,MAAA,EAAgB,IAAG,KAAI,OAAO,EAAE,SAAS,OAAA,GAAU,MAAK,QACvD,UAAAJ,+BAAC,OAAA,EAAI,KAAI,2BAA0B,KAAI,WAAA,CAAW,EAAA,CACpD,EAAA,CACF,GACF;AAAA,IACAK,2BAAAA,KAACN,SAAAA,KAAA,EAAI,IAAIG,SAAO,WACd,UAAA;AAAA,MAAAF,+BAACM,SAAAA,YAAA,EAAW,SAAQ,MAAK,IAAG,QAAO,UAAA,+BAEnC;AAAA,qCACCA,SAAAA,YAAA,EAAW,eAAc,aAAY,SAAQ,MAAK,UAAA,+BAEnD;AAAA,MACAD,2BAAAA,KAACC,SAAAA,YAAA,EAAW,WAAS,MAAC,IAAG,QACvB,UAAA;AAAA,QAAAD,2BAAAA,KAACN,SAAAA,KAAA,EAAI,WAAU,QAAO,UAAA;AAAA,UAAA;AAAA,yCAEmB,MAAA,EAAG;AAAA,UAAE;AAAA,QAAA,GAE9C;AAAA,QACAC,2BAAAA,IAACD,SAAAA,OAAI,YAAW,kBAAiB,SAAQ,UAAS,WAAU,KAAI,UAAA,OAAA,CAEhE;AAAA,QACAC,2BAAAA,IAACD,SAAAA,KAAA,EAAI,WAAU,QAAO,UAAA,MAAA,CAAS;AAAA,MAAA,GACjC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SignatoryResponse.js","../src/pages/SignatoryLanding/components/Wording.jsx","../src/pages/SignatoryLanding/index.jsx","../src/pages/users.jsx"],"sourcesContent":["/**\n * Copyright 2023 Velocity Team\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Typography, Link, Box, Toolbar, AppBar, List, ListItem } from '@mui/material';\n\nimport { Link as ReactRouterLink } from 'react-router';\n\nimport theme, { FOOTER_HEIGHT } from '../theme/theme.js';\n\nconst PrivacyPolicy = () => {\n return (\n <Box>\n <AppBar position=\"static\" sx={styles.appBar}>\n <Toolbar>\n <ReactRouterLink to=\"/\" style={{ display: 'flex' }} role=\"link\">\n <img src=\"/assets/images/logo.svg\" alt=\"Velocity\" />\n </ReactRouterLink>\n </Toolbar>\n </AppBar>\n <Box sx={styles.container}>\n <Typography variant=\"h3\" mb=\"30px\">\n REGISTRAR UI PRIVACY POLICY\n </Typography>\n <Typography textTransform=\"uppercase\" variant=\"pm\">\n Last updated: December 2022\n </Typography>\n <Typography paragraph mt=\"51px\">\n <Box component=\"span\">\n This Policy is designed to apply to the Registrar UI as available online on\n Velocity’s Registrar UI website <br />\n https://registrarapp.velocitynetwork.foundation/ (the “\n </Box>\n <Box fontWeight=\"fontWeightBold\" display=\"inline\" component=\"b\">\n Site\n </Box>\n <Box component=\"span\">”).</Box>\n </Typography>\n <Typography paragraph variant=\"h4\" sx={styles.subtitle}>\n Identity and contact details of the controller and Data Privacy officer\n </Typography>\n <Typography paragraph>\n <Box component=\"span\">Velocity Network Foundation, Inc. and its affiliates (“</Box>\n <Box component=\"span\" sx={styles.bold}>\n Velocity\n </Box>\n <Box component=\"span\">” or “</Box>\n <Box component=\"span\" sx={styles.bold}>\n we\n </Box>\n <Box component=\"span\">” or “</Box>\n <Box component=\"span\" sx={styles.bold}>\n us\n </Box>\n <Box component=\"span\">” or “</Box>\n <Box component=\"span\" sx={styles.bold}>\n our\n </Box>\n <Box component=\"span\">\n ”), as controller of personal data, is responsible for the processing of personal\n data that relates to you (“\n </Box>\n <Box component=\"span\" sx={styles.bold}>\n you\n </Box>\n <Box component=\"span\">” or “</Box>\n <Box component=\"span\" sx={styles.bold}>\n User\n </Box>\n <Box component=\"span\">\n ”) under applicable data protection laws and regulations.\n </Box>\n </Typography>\n <Typography paragraph>\n If you have questions regarding the processing of your personal data, please contact\n Velocity’s data privacy officer at \n <Link href=\"mailto:DataOfficer@VelocityNetwork.Foundation\">\n DataOfficer@VelocityNetwork.Foundation\n </Link>\n .\n </Typography>\n <Typography paragraph marginBottom=\"0px\">\n For the purposes of this Privacy Policy, “\n <Box component=\"span\" sx={styles.bold}>\n personal data\n </Box>\n ” is any information about a specific individual or that identifies or may identify\n a specific individual. In other words, it is any piece of information than can be linked\n to you.\n </Typography>\n <Typography paragraph marginTop=\"0px\">\n The term "process” or “processing” means any use of personal data,\n including but not limited to the collection, recording, organization, storing, adaptation,\n alteration, transferring, making available, blocking, deletion or destruction of personal\n data.\n </Typography>\n <Typography variant=\"h4\" sx={styles.subtitle}>\n Our Role as a Data Controller\n </Typography>\n <Typography paragraph>\n Velocity acts in the capacity of a data controller with regard to the Personal Data\n processed through the Registrar UI (the “\n <Box component=\"span\" sx={styles.bold}>\n Service\n </Box>\n ”), as well as the Career Wallet Service (as defined in the Career Wallet App\n Privacy Policy) in terms of the applicable data protection laws, including the EU General\n Data Protection Regulation (GDPR). This privacy policy does not apply to the Career Wallet\n Service, to which the Career Wallet App Privacy Policy applies.\n </Typography>\n <Typography paragraph>\n We are responsible for the collection, usage and processing of your personal data\n collected through the Site (the “\n <Box component=\"span\" sx={styles.bold}>\n Service Data\n </Box>\n ”). The Service Data may include information such as name, email, telephone number,\n payment details, including information you provide us of your employees, agents, vendors\n etc., for providing our services to You. We make decisions about the types of personal\n data that should be collected from you and purposes for which such personal data should be\n used. Therefore, we act as a data controller with regard to the Service data. This Privacy\n Policy applies to such processing.\n </Typography>\n <Typography>\n <Box component=\"span\" sx={styles.bold}>\n Separate Controllers\n </Box>\n . Additionally, Velocity and User are separately responsible for the Personal Data of the\n Velocity Career Wallet end users (“\n <Box component=\"span\" sx={styles.bold}>\n Wallet Holders\n </Box>\n ”) collected, shared and processed by Velocity and User and its further use through\n the Wallet Service. As mentioned above, this Privacy Policy does not apply to such\n processes. Please review the terms described in the Verification Service User Agreement\n for further details.\n </Typography>\n <Typography paragraph variant=\"h4\" sx={styles.subtitle}>\n Changes in the Policy\n </Typography>\n <Typography paragraph>\n We reserve all rights to adjust this Privacy Policy at any time and for any reason. You\n will be made aware of such an adjustment by reference to a change in the “Last\n updated” date of this Privacy Policy (referenced above). You are encouraged to\n periodically review this Privacy Policy to stay informed of any updates or changes. You\n will be deemed to have been made aware of, will be subject to, and to have accepted the\n changes in any revised Privacy Policy by your continued use of the Site after the date\n such updated Privacy Policy is posted here.\n </Typography>\n <Typography paragraph variant=\"h3\" sx={styles.subtitle} mb=\"30px\">\n COLLECTION OF YOUR SERVICE DATA\n </Typography>\n <Typography paragraph variant=\"h4\" sx={styles.subtitle}>\n Types and Purposes of Service Data\n </Typography>\n <Typography paragraph>\n We use Service Data for limited, specified and legitimate purposes explicitly mentioned in\n this Privacy Policy. When processing personal data, we make sure that we do so by relying\n on one of the available legal bases under applicable data protection laws, as described\n herein:\n </Typography>\n <List sx={styles.list}>\n <ListItem sx={styles.listItem}>\n <Box component=\"span\" sx={styles.bold}>\n Contact Details\n </Box>\n . When you sign up on the Site, we collect some information about You and your contact\n persons which include full name, email address, and password. We use such information to\n register you, contact you (if necessary) and maintain our business records. The legal\n bases on which we rely are ‘performance of a contract’ and ‘pursuing\n our legitimate interests’ (to administer Velocity’s business).{' '}\n </ListItem>\n <ListItem sx={styles.listItem}>\n <Box component=\"span\" sx={styles.bold}>\n Inquiries\n </Box>\n . When you contact us by any mean available, we collect your full name, email address,\n and any information that you decide to include in your message. We have no control over\n the information you decide to provide in your message, and we advise you not to share\n sensitive Personal Data. If provide you information about others, it is your\n responsibility to have their proper consent. We use such data to respond to your\n inquiries. The legal basis on which we rely is ‘pursuing our legitimate\n interests’.\n </ListItem>\n <ListItem sx={styles.listItem}>\n <Box component=\"span\" sx={styles.bold}>\n Payment processing\n </Box>\n . When you make a payment, we collect your full name, email address, organization,\n country, billing address, and payment information (name on your card, card number, and\n expiration date). We use such data to process your payment, provide you with the\n requested services, contact you (if necessary), and keep our business records. The legal\n bases on which we rely are ‘performance of a contract’ with you and\n ‘pursuing our legitimate business interests’ (i.e., to administer our\n business and comply with the applicable laws).{' '}\n </ListItem>\n </List>\n <Typography paragraph variant=\"h4\" sx={styles.subtitle}>\n HOW WE MAY SHARE SERVICE DATA\n </Typography>\n <Typography paragraph>\n Velocity may share your Personal Data it has collected about you in certain situations,\n for the specified purposes set out above. Your Personal Data may be disclosed with third\n parties such as Velocity’s suppliers, including companies and suppliers outside the\n EU/EEA.\n </Typography>\n <Typography paragraph>\n Part of our third-party suppliers consists of suppliers that facilitate us with the usage\n and performance of our Site which includes monitoring of traffic and analytics within the\n Site through the use of cookies and other similar technologies. For further information\n regarding the usage of cookies refer to our{' '}\n <Link\n sx={styles.link}\n // eslint-disable-next-line max-len\n href=\"https://www.google.com/url?q=https://www.velocitycareerlabs.com/cookies&sa=D&source=editors&ust=1678103921266161&usg=AOvVaw10nOumNzNSR0c2ET1SbBWH\"\n >\n Velocity Career Labs Cookie Policy\n </Link>\n .\n </Typography>\n <Typography paragraph>\n In particular, we use Google Analytics. For further details on the way Google uses\n personal information see the link “\n <Link\n sx={styles.link}\n // eslint-disable-next-line max-len\n href=\"https://www.google.com/url?q=https://policies.google.com/technologies/partner-sites&sa=D&source=editors&ust=1678103921266696&usg=AOvVaw2gk6GX4UYXYo1WrV_MZVX8\"\n >\n How Google uses data when you use our partners’ sites or apps\n </Link>\n ”.\n </Typography>\n <Typography paragraph>\n In the event we will transfer Service Data to our third-party suppliers that are located\n outside of the EU/EEA, and if required under applicable law, Velocity will ensure the\n implementation of appropriate safeguards in place to provide adequate level of protection\n to the Service Data in accordance with the applicable data protection laws (including the\n EU General Data Protection Regulation – ‘\n <Box component=\"span\" sx={styles.bold}>\n GDPR\n </Box>\n ’). For example, this may include the use of EU approved Standard Contractual\n Clauses or such other mechanism as have been recognized or approved by the relevant\n authorities from time to time. We will disclose Personal Data to comply with any court\n order, law or legal process, including to respond to any government or regulatory request.\n </Typography>\n <Typography paragraph>\n Finally, if we ever sell Velocity, or participate in a merger or consolidation, Service\n Data may be transferred accordingly.\n </Typography>\n <Typography paragraph variant=\"h4\" sx={styles.subtitle}>\n FOR HOW LONG WILL VELOCITY KEEP THE SERVICE DATA?\n </Typography>\n <Typography paragraph>\n Velocity will retain Service Data only for as long as needed for the purpose of providing\n you the Service After this period, Velocity will only process Service Data as may be\n required to comply with local legal obligations or to satisfy any legal requirements in\n the event of an actual, threatened or anticipated dispute or claim.\n </Typography>\n <Typography paragraph variant=\"h4\" sx={styles.subtitle}>\n YOUR DATA PROTECTION RIGHTS\n </Typography>\n <Typography>\n You may be entitled, where provided for under applicable data protection laws and\n regulations, to:\n </Typography>\n <List sx={styles.list}>\n <ListItem sx={styles.listItem}>\n Request access to the Service Data Velocity processes about you: this right entitles you\n to know whether we hold personal data about you and, if we do, to obtain information on\n and a copy of the specific pieces and categories of personal data.\n </ListItem>\n <ListItem sx={styles.listItem}>\n Request a rectification of your Service Data: this right entitles you to have your\n Service Data corrected if it is inaccurate or incomplete.\n </ListItem>\n <ListItem sx={styles.listItem}>\n Object to the processing of your Service Data: this right entitles you to request that\n Velocity no longer process your Service Data.\n </ListItem>\n <ListItem sx={styles.listItem}>\n In certain situations, as it may be applied in the applicable data protection law, and\n when you wish to terminate your account, you can request the erasure or deletion of your\n Service Data: this right entitles you to request the erasure or deletion of your Service\n Data.\n </ListItem>\n <ListItem sx={styles.listItem}>\n Request the restriction of the processing of your Service Data: this right entitles you\n to request that Velocity processes your Service Data only in limited circumstances.\n </ListItem>\n <ListItem sx={styles.listItem}>\n Request portability of your Service Data: this right entitles you to receive a copy (in\n a portable and, if technically feasible, readily usable format) of your Service Data.\n </ListItem>\n <ListItem sx={styles.listItem}>\n In the event that our processing of your Service Data or part thereof is based on your\n consent, to withdraw at any time your consent, in which case Velocity will cease any\n further processing activities of your Service Data or the relevant part thereof (however\n such withdrawal will not affect the legality of the data processing activities prior to\n the withdrawal). Please note that Velocity may not always be obliged to comply with a\n request of deletion, restriction, objection or data portability. Assessment may be made\n on a case-by-case basis of Velocity’s legal obligations and the exception to such\n rights.\n </ListItem>\n </List>\n <Typography paragraph>\n You also have the right to lodge any complaints you may have regarding Velocity’s\n processing of your Service Data to a supervisory authority. For more information about\n these rights and how to exercise them, please contact the Velocity Privacy Officer via the\n contact details set out above.\n </Typography>\n <Typography paragraph variant=\"h4\" sx={styles.subtitle}>\n HOW DOES VELOCITY SAFEGUARD THE SERVICE DATA\n </Typography>\n <Typography paragraph>\n Velocity utilizes appropriate and reasonable legal, technical and organizational security\n measures, including information technology security and physical security measures, to\n adequately protect the Service Data.\n </Typography>\n <Typography paragraph>\n These measures are appropriate to the risks posed by the processing of the Service Data\n and to the sensitivity of the Service Data and take into account the requirements of\n applicable local law. In addition, the measures are continuously improved in line with the\n development of available security products and services.\n </Typography>\n <Typography paragraph>\n Velocity requires all persons to abide by applicable security policies related to personal\n data when using Velocity systems. \n </Typography>\n <Typography paragraph variant=\"h4\" sx={styles.subtitle}>\n CONTACT US\n </Typography>\n <Typography paragraph>\n If you have questions or comments about this Privacy Policy, please contact us at:{' '}\n <Link href=\"mailto:DataOfficer@VelocityNetwork.Foundation\">\n DataOfficer@VelocityNetwork.Foundation\n </Link>\n .\n </Typography>\n </Box>\n </Box>\n );\n};\n\nconst styles = {\n container: {\n pt: '62px',\n pb: `calc(90px + ${FOOTER_HEIGHT})`,\n ml: '80px',\n maxWidth: '67.71%',\n textAlign: 'justify',\n color: theme.palette.text.primary,\n },\n subtitle: {\n mt: '50px',\n mb: '20px',\n },\n bold: {\n fontWeight: '700',\n },\n list: {\n listStyleType: 'disc',\n marginLeft: '21px',\n padding: 0,\n },\n listItem: {\n display: 'list-item',\n padding: '8px 0 8px 5px',\n textAlign: 'justify',\n lineHeight: 1.5,\n },\n appBar: {\n boxShadow: 'none',\n backgroundColor: 'transparent',\n minHeight: '79px',\n display: 'flex',\n justifyContent: 'center',\n },\n};\n\nexport default PrivacyPolicy;\n","import { useEffect, useState } from 'react';\nimport { useConfig } from '@/utils/ConfigContext.js';\n\n/**\n * useSignatoryResponse hook\n * @param {string} did\n * @param {string} authCode\n * @param {string} response\n * @returns {Object} { isLoading, errorCode }\n */\nexport const useSignatoryResponse = ({ did, authCode, response }) => {\n const config = useConfig();\n\n const [isLoading, setIsLoading] = useState(false);\n const [errorCode, setErrorCode] = useState(null);\n\n useEffect(() => {\n const addResponse = async () => {\n setIsLoading(true);\n setErrorCode(null);\n try {\n const resp = await fetch(\n `${config.registrarApi}/organizations/${did}/signatories/response/${response}?authCode=${authCode}`,\n );\n if (!resp.ok) {\n const data = await resp.json();\n setErrorCode(data?.errorCode || null);\n }\n } catch (e) {\n setErrorCode(e?.errorCode || null);\n } finally {\n setIsLoading(false);\n }\n };\n if (did && authCode && response && config.registrarApi) {\n addResponse();\n }\n }, [did, authCode, response, config.registrarApi]);\n\n return { isLoading, errorCode };\n};\n\nexport default useSignatoryResponse;\n","import { Typography } from '@mui/material';\nimport PropTypes from 'prop-types';\n\nconst SignatoryErrorCodes = {\n AUTH_CODE_MUST_BE_MOST_RECENT: 'auth_code_must_be_most_recent',\n AUTH_CODE_EXPIRED: 'auth_code_expired',\n UNAUTHORIZED: 'unauthorized',\n SIGNATORY_STATUS_ALREADY_COMPLETE: 'signatory_status_already_complete',\n};\n\nexport const Wording = ({ response, errorCode, name }) => {\n if (errorCode === SignatoryErrorCodes.SIGNATORY_STATUS_ALREADY_COMPLETE) {\n return (\n <>\n <Typography variant=\"h1\" textAlign=\"center\" marginBottom={3.5}>\n This process has already been completed\n </Typography>\n <Typography variant=\"pL\" textAlign=\"center\" marginBottom={11}>\n If you have any queries please contact us for assistance.\n </Typography>\n </>\n );\n }\n\n if (\n [\n SignatoryErrorCodes.AUTH_CODE_MUST_BE_MOST_RECENT,\n SignatoryErrorCodes.AUTH_CODE_EXPIRED,\n SignatoryErrorCodes.UNAUTHORIZED,\n ].includes(errorCode)\n ) {\n return (\n <>\n <Typography variant=\"h1\" textAlign=\"center\" marginBottom={3.5}>\n This link has expired.\n </Typography>\n <Typography variant=\"pL\" textAlign=\"center\" marginBottom={11}>\n Please check your inbox for the most recent reminder email and use the updated link\n provided there to complete your action. <br />\n If you can’t find the latest email, please contact us for assistance.\n </Typography>\n </>\n );\n }\n\n return (\n <>\n <Typography variant=\"h1\" textAlign=\"center\" marginBottom={3.5}>\n Thank you!\n </Typography>\n <Typography variant=\"pL\" textAlign=\"center\" marginBottom={11}>\n Your {response === 'approve' ? 'approval' : 'rejection'} regarding the addition of {name} on\n the Velocity Network has been acknowledged.\n </Typography>\n </>\n );\n};\n\n// eslint-disable-next-line better-mutation/no-mutation\nWording.propTypes = {\n response: PropTypes.string.isRequired,\n errorCode: PropTypes.string.isRequired,\n name: PropTypes.string.isRequired,\n};\n\nexport default Wording;\n","import { useParams, useSearchParams } from 'react-router';\nimport { Box } from '@mui/material';\n\nimport { useGetOne } from 'ra-core';\nimport Loading from '@/components/Loading.jsx';\nimport { dataResources } from '@/utils/remoteDataProvider.js';\nimport { useSignatoryResponse } from './hooks/useSignatoryResponse.js';\nimport { Wording } from './components/Wording.jsx';\n\nconst SignatoryLanding = () => {\n const { response } = useParams();\n const [searchParams] = useSearchParams();\n const did = searchParams.get('did');\n const authCode = searchParams.get('authCode');\n\n const { data: profile, isLoading } = useGetOne(dataResources.VERIFIED_PROFILE, { id: did });\n\n const { isLoading: isSignatoryLoading, errorCode } = useSignatoryResponse({\n did,\n authCode,\n response,\n });\n\n if (isLoading || isSignatoryLoading) {\n return (\n <Box sx={styles.loading} pt={5} pb={10} pr={8} pl={9}>\n <Loading />\n </Box>\n );\n }\n\n return (\n <Box sx={styles.container}>\n <Box sx={styles.content}>\n <img\n src=\"/assets/images/logo.svg\"\n alt=\"Velocity\"\n width={196}\n height={42}\n style={styles.image}\n />\n <Wording response={response} errorCode={errorCode} name={profile.credentialSubject.name} />\n </Box>\n </Box>\n );\n};\n\nconst styles = {\n container: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: '100%',\n height: '100vh',\n },\n content: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n transform: 'translateY(-60px)',\n maxWidth: '670px',\n },\n image: {\n marginBottom: 110,\n },\n loading: {\n height: '100vh',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n },\n};\n\nexport default SignatoryLanding;\n","/**\n * Copyright 2023 Velocity Team\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useMediaQuery } from '@mui/material';\nimport { SimpleList, List, Datagrid, EmailField, TextField } from 'react-admin';\n\nconst UserList = (props) => {\n const isSmall = useMediaQuery((theme) => theme.breakpoints.down('sm'));\n\n return (\n <List title=\"All users\" {...props}>\n {isSmall ? (\n <SimpleList\n primaryText={(record) => record.name}\n secondaryText={(record) => record.username}\n tertiaryText={(record) => record.email}\n />\n ) : (\n <Datagrid>\n <TextField source=\"id\" />\n <TextField source=\"name\" />\n <TextField source=\"username\" />\n <EmailField source=\"email\" />\n </Datagrid>\n )}\n </List>\n );\n};\n\nexport default UserList;\n"],"names":["Box","jsx","AppBar","styles","Toolbar","ReactRouterLink","jsxs","Typography","Link","List","ListItem","FOOTER_HEIGHT","theme","useConfig","useState","useEffect","Fragment","useParams","useSearchParams","useGetOne","dataResources","Loading","useMediaQuery","SimpleList","Datagrid","TextField","EmailField"],"mappings":";;;;;;;;;;;;;;AAsBA,MAAM,gBAAgB,MAAM;AAC1B,yCACGA,cAAA,EACC,UAAA;AAAA,IAAAC,2BAAAA,IAACC,SAAAA,QAAA,EAAO,UAAS,UAAS,IAAIC,SAAO,QACnC,UAAAF,2BAAAA,IAACG,SAAAA,SAAA,EACC,UAAAH,2BAAAA,IAACI,YAAAA,MAAA,EAAgB,IAAG,KAAI,OAAO,EAAE,SAAS,OAAA,GAAU,MAAK,QACvD,UAAAJ,+BAAC,OAAA,EAAI,KAAI,2BAA0B,KAAI,WAAA,CAAW,EAAA,CACpD,EAAA,CACF,GACF;AAAA,IACAK,2BAAAA,KAACN,SAAAA,KAAA,EAAI,IAAIG,SAAO,WACd,UAAA;AAAA,MAAAF,+BAACM,SAAAA,YAAA,EAAW,SAAQ,MAAK,IAAG,QAAO,UAAA,+BAEnC;AAAA,qCACCA,SAAAA,YAAA,EAAW,eAAc,aAAY,SAAQ,MAAK,UAAA,+BAEnD;AAAA,MACAD,2BAAAA,KAACC,SAAAA,YAAA,EAAW,WAAS,MAAC,IAAG,QACvB,UAAA;AAAA,QAAAD,2BAAAA,KAACN,SAAAA,KAAA,EAAI,WAAU,QAAO,UAAA;AAAA,UAAA;AAAA,yCAEmB,MAAA,EAAG;AAAA,UAAE;AAAA,QAAA,GAE9C;AAAA,QACAC,2BAAAA,IAACD,SAAAA,OAAI,YAAW,kBAAiB,SAAQ,UAAS,WAAU,KAAI,UAAA,OAAA,CAEhE;AAAA,QACAC,2BAAAA,IAACD,SAAAA,KAAA,EAAI,WAAU,QAAO,UAAA,MAAA,CAAS;AAAA,MAAA,G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Item, useMe
|
|
|
3
3
|
import { Link, useParams, useSearchParams } from "react-router";
|
|
4
4
|
import { t as theme, F as FOOTER_HEIGHT } from "./chunks/theme.CYcVcsx-.js";
|
|
5
5
|
import { useGetOne } from "ra-core";
|
|
6
|
-
import { L as Loading } from "./chunks/Loading.
|
|
6
|
+
import { L as Loading } from "./chunks/Loading.Bcm3xNJU.js";
|
|
7
7
|
import { d as dataResources } from "./chunks/remoteDataProvider.gtTXA1-g.js";
|
|
8
8
|
import { useState, useEffect } from "react";
|
|
9
9
|
import { u as useConfig } from "./chunks/ConfigContext.Cd8KjWqG.js";
|