@verii/components-organizations-registrar 1.0.0 → 1.0.2
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/HolderWalletSelection.BYj3foq0.js +167 -0
- package/dist/chunks/HolderWalletSelection.BYj3foq0.js.map +1 -0
- package/dist/chunks/HolderWalletSelection.BvPFTrTh.js +166 -0
- package/dist/chunks/HolderWalletSelection.BvPFTrTh.js.map +1 -0
- package/dist/chunks/{ServicesEdit.BnnqC203.js → ServicesEdit.CrmS66vz.js} +75 -50
- package/dist/chunks/ServicesEdit.CrmS66vz.js.map +1 -0
- package/dist/chunks/{ServicesEdit.DDgjS5kU.js → ServicesEdit.DFxcohIF.js} +75 -50
- package/dist/chunks/ServicesEdit.DFxcohIF.js.map +1 -0
- package/dist/chunks/{SetInvitationService.PxAGwk-I.js → SetInvitationService.BeU7-IBo.js} +3 -3
- package/dist/chunks/{SetInvitationService.PxAGwk-I.js.map → SetInvitationService.BeU7-IBo.js.map} +1 -1
- package/dist/chunks/{SetInvitationService.ZT5lP003.js → SetInvitationService.DtVH6OkH.js} +3 -3
- package/dist/chunks/{SetInvitationService.ZT5lP003.js.map → SetInvitationService.DtVH6OkH.js.map} +1 -1
- package/dist/chunks/{ValidateTextInput.D5kgjulG.js → ValidateTextInput.1Fv1GPyZ.js} +2 -2
- package/dist/chunks/{ValidateTextInput.D5kgjulG.js.map → ValidateTextInput.1Fv1GPyZ.js.map} +1 -1
- package/dist/chunks/{ValidateTextInput.DEBaVB1L.js → ValidateTextInput.DPruGgff.js} +2 -2
- package/dist/chunks/{ValidateTextInput.DEBaVB1L.js.map → ValidateTextInput.DPruGgff.js.map} +1 -1
- package/dist/chunks/{index.Cmn4FlUL.js → index.BDTIIDNe.js} +251 -114
- package/dist/chunks/index.BDTIIDNe.js.map +1 -0
- package/dist/chunks/{index.YjnxLFjk.js → index.CaxYybSL.js} +115 -56
- package/dist/chunks/index.CaxYybSL.js.map +1 -0
- package/dist/chunks/{index.DIizFYFZ.js → index.Cjk52g3G.js} +115 -56
- package/dist/chunks/index.Cjk52g3G.js.map +1 -0
- package/dist/chunks/{index.DMWKdmxs.js → index.DFMQZMWE.js} +12 -2
- package/dist/chunks/index.DFMQZMWE.js.map +1 -0
- package/dist/chunks/{index.DND10PiY.js → index.DTlm8AhC.js} +11 -1
- package/dist/chunks/index.DTlm8AhC.js.map +1 -0
- package/dist/chunks/{index.CYCWawJT.js → index.DmF-wFBs.js} +249 -112
- package/dist/chunks/index.DmF-wFBs.js.map +1 -0
- package/dist/chunks/{serviceTypes.D7c4G5GY.js → serviceTypes.BWVBK33e.js} +52 -31
- package/dist/chunks/serviceTypes.BWVBK33e.js.map +1 -0
- package/dist/chunks/{serviceTypes.CxLXtDIT.js → serviceTypes.BbBTNXB9.js} +52 -31
- package/dist/chunks/serviceTypes.BbBTNXB9.js.map +1 -0
- package/dist/components/common.cjs +1 -1
- package/dist/components/common.js +1 -1
- package/dist/components/invitations.cjs +1 -1
- package/dist/components/invitations.js +1 -1
- package/dist/components/organizations.cjs +1 -1
- package/dist/components/organizations.js +1 -1
- package/dist/components/services.cjs +1 -1
- package/dist/components/services.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/pages/invitations.cjs +5 -6
- package/dist/pages/invitations.cjs.map +1 -1
- package/dist/pages/invitations.js +4 -5
- package/dist/pages/invitations.js.map +1 -1
- package/dist/pages/organizations.cjs +11 -16
- package/dist/pages/organizations.cjs.map +1 -1
- package/dist/pages/organizations.js +10 -15
- package/dist/pages/organizations.js.map +1 -1
- package/dist/pages/services.cjs +27 -30
- package/dist/pages/services.cjs.map +1 -1
- package/dist/pages/services.js +26 -29
- package/dist/pages/services.js.map +1 -1
- package/package.json +3 -3
- package/dist/chunks/ServicesEdit.BnnqC203.js.map +0 -1
- package/dist/chunks/ServicesEdit.DDgjS5kU.js.map +0 -1
- package/dist/chunks/index.CYCWawJT.js.map +0 -1
- package/dist/chunks/index.Cmn4FlUL.js.map +0 -1
- package/dist/chunks/index.DIizFYFZ.js.map +0 -1
- package/dist/chunks/index.DMWKdmxs.js.map +0 -1
- package/dist/chunks/index.DND10PiY.js.map +0 -1
- package/dist/chunks/index.YjnxLFjk.js.map +0 -1
- package/dist/chunks/invitations.BI_Qo5Ca.js +0 -10
- package/dist/chunks/invitations.BI_Qo5Ca.js.map +0 -1
- package/dist/chunks/invitations.BbK6WSY8.js +0 -11
- package/dist/chunks/invitations.BbK6WSY8.js.map +0 -1
- package/dist/chunks/serviceTypes.CxLXtDIT.js.map +0 -1
- package/dist/chunks/serviceTypes.D7c4G5GY.js.map +0 -1
- package/dist/chunks/useIsIssuingInspection.C76mY_wb.js +0 -14
- package/dist/chunks/useIsIssuingInspection.C76mY_wb.js.map +0 -1
- package/dist/chunks/useIsIssuingInspection.DavhBs5B.js +0 -13
- package/dist/chunks/useIsIssuingInspection.DavhBs5B.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizations.js","sources":["../../src/pages/organizations/OrganizationAddService.jsx","../../src/pages/organizations/components/OrganizationBrand.jsx","../../src/pages/organizations/components/OrganizationSubmitButton.jsx","../../src/pages/organizations/components/OrganizationCreateTitle.jsx","../../src/pages/organizations/utils/index.js","../../src/pages/organizations/OrganizationCreate.jsx","../../src/pages/organizations/OrganizationEdit.jsx","../../src/pages/organizations/OrganizationShow.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 { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { useGetList } from 'react-admin';\nimport PropTypes from 'prop-types';\nimport { kebabCase } from 'lodash-es';\n\nimport Loading from '../../components/Loading.jsx';\nimport Popup from '../../components/common/Popup.jsx';\nimport { credentialTypesByServiceTypes } from '../../utils/serviceTypes.js';\nimport { dataResources } from '../../utils/remoteDataProvider.js';\n\nimport { ServiceEndpointSelection } from '../services/components/ServiceEndpointSelection/index.jsx';\nimport { ServiceTypeSelection } from '../services/components/ServiceTypeSelection/index.jsx';\nimport { SecretKeysPopup } from '../services/components/SecretKeysPopup/index.jsx';\nimport { useIsIssuingInspection } from '../services/hooks/useIsIssuingInspection.js';\n\nconst OrganizationAddService = ({\n isModalOpened,\n isSending,\n onCreate,\n isCreated,\n secretKeys,\n onClose,\n // did,\n selectedServiceType,\n setSelectedServiceType,\n selectedCAO,\n setSelectedCAO,\n InterceptOnCreate,\n}) => {\n const [selectedStep, setSelectedStep] = useState(1);\n const [isKeysPopupOpened, setIsKeysPopupOpened] = useState(false);\n const [isInterceptOnCreateOpen, setIsInterceptOnCreateOpen] = useState(false);\n\n const serviceId = useMemo(() => {\n if (selectedServiceType) {\n const type = selectedServiceType.id.match(/.+v1/);\n return `${kebabCase(type[0])}-1`;\n }\n return '';\n }, [selectedServiceType]);\n\n const openedStateRef = useRef(isModalOpened);\n\n const { isIssuingOrInspection, isCAO } = useIsIssuingInspection(selectedServiceType);\n\n const { data: credentialAgentOperators, isLoading: isLoadingCAO } = useGetList(\n dataResources.SEARCH_PROFILES,\n {\n filter: { serviceTypes: 'CredentialAgentOperator' },\n },\n );\n\n // clear previous state after close\n useEffect(() => {\n const reset = () => {\n setSelectedStep(1);\n };\n if (openedStateRef.current === false && isModalOpened && !isCreated) {\n reset();\n }\n\n // eslint-disable-next-line better-mutation/no-mutation\n openedStateRef.current = isModalOpened;\n return reset;\n }, [isModalOpened, isCreated]);\n\n useEffect(() => {\n if (InterceptOnCreate && isCreated) {\n setIsInterceptOnCreateOpen(true);\n }\n }, [InterceptOnCreate, isCreated]);\n\n const onCreateCallback = useCallback(\n ({ serviceEndpoint }) => {\n const type = selectedServiceType.id.match(/.+v1/);\n setSelectedCAO(serviceEndpoint.split('#')[0]);\n onCreate({\n serviceEndpoint,\n type: type[0],\n ...(selectedServiceType.id.includes('Issuing') && {\n credentialTypes: credentialTypesByServiceTypes[selectedServiceType.id],\n }),\n });\n },\n [onCreate, selectedServiceType.id, setSelectedCAO],\n );\n\n return (\n <>\n <Popup\n onClose={onClose}\n title=\"\"\n isOpen={isModalOpened}\n mainContainerStyles={styles.mainContainer}\n disableCloseButton={isSending}\n >\n {isSending && <Loading color=\"error\" sx={{ pl: '10px' }} size={26} />}\n\n {selectedStep === 1 && (\n <ServiceTypeSelection\n handleNext={() => setSelectedStep(2)}\n isLoading={isLoadingCAO}\n selectedServiceType={selectedServiceType}\n setSelectedServiceType={setSelectedServiceType}\n onDoLater={() => {\n onCreate(null);\n }}\n />\n )}\n {selectedStep === 2 && (\n <ServiceEndpointSelection\n credentialAgentOperators={credentialAgentOperators}\n isIssueOrInspection={isIssuingOrInspection}\n inProgress={isSending}\n onCreate={onCreateCallback}\n handleBack={() => setSelectedStep(1)}\n />\n )}\n </Popup>\n\n <InterceptOnCreate\n isInterceptOnCreateOpen={isInterceptOnCreateOpen}\n serviceId={serviceId}\n onNext={() => setIsKeysPopupOpened(true)}\n onClose={() => setIsKeysPopupOpened(true)}\n isIssueOrInspection={isIssuingOrInspection}\n selectedCAO={selectedCAO}\n isCAO={isCAO}\n />\n\n <SecretKeysPopup\n isOpen={isKeysPopupOpened}\n secretKeys={secretKeys}\n onClose={() => {\n setIsKeysPopupOpened(false);\n onClose();\n }}\n wording={{\n title: 'Your organization is now registered on Velocity Network™.',\n subtitle:\n 'Please save your organization’s unique keys in a secure location, as they will not be available once you close this window.',\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\nOrganizationAddService.propTypes = {\n isModalOpened: PropTypes.bool,\n isSending: PropTypes.bool,\n onCreate: PropTypes.func,\n isCreated: PropTypes.bool,\n // eslint-disable-next-line react/forbid-prop-types\n secretKeys: PropTypes.object,\n onClose: PropTypes.func,\n did: PropTypes.string,\n selectedServiceType: PropTypes.shape({\n id: PropTypes.string,\n title: PropTypes.string,\n }),\n setSelectedServiceType: PropTypes.func,\n selectedCAO: PropTypes.string,\n setSelectedCAO: PropTypes.func,\n InterceptOnCreate: PropTypes.func,\n};\n\nexport default OrganizationAddService;\n","import React from 'react';\nimport { Box } from '@mui/material';\nimport { TextInput } from 'react-admin';\nimport { useFormContext } from 'react-hook-form';\nimport { maxLength, required } from 'ra-core';\nimport CustomImageInput from '../../../components/common/CustomImageInput/index.jsx';\n\n/* eslint-disable react/prop-types */\nexport const OrganizationBrand = ({ formData, scopedFormData }) => {\n let brandNameValidate = [maxLength(100)];\n if (scopedFormData && scopedFormData.logo) {\n brandNameValidate = [...brandNameValidate, required('Commercial name field is required')];\n }\n const form = useFormContext();\n const index = formData?.profile?.commercialEntities?.indexOf(scopedFormData) || 0;\n const innerSource = `profile.commercialEntities[${index}]`;\n return (\n <>\n <TextInput\n fullWidth\n label=\"Commercial Name\"\n placeholder=\"Commercial Name\"\n source=\"name\"\n validate={brandNameValidate}\n defaultValue=\"\"\n />\n <Box mt={2} sx={sx.brandLogoContainer}>\n <CustomImageInput\n label={false}\n labelText=\"Logo\"\n editMode\n addTo={innerSource}\n imgSrc={scopedFormData?.logo}\n style={sx.brandLogo}\n isRequired={!!scopedFormData?.name}\n onChange={() => {\n form.setFocus(`${innerSource}.name`);\n form.trigger(`${innerSource}.name`);\n }}\n />\n </Box>\n </>\n );\n};\n/* eslint-enable */\n\nconst sx = {\n brandLogo: { minHeight: '272px' },\n};\n","import { Button } from 'react-admin';\nimport { useFormContext } from 'react-hook-form';\n\nexport const OrganizationSubmitButton = () => {\n const form = useFormContext();\n\n return (\n <Button\n disabled={!form.formState.isValid}\n variant=\"outlined\"\n color=\"primary\"\n type=\"submit\"\n size=\"large\"\n sx={sx.submit}\n >\n Add Service\n </Button>\n );\n};\n\nconst sx = {\n submit: {\n minWidth: 196,\n },\n};\n\nexport default OrganizationSubmitButton;\n","import { Typography } from '@mui/material';\nimport { useConfig } from '@/utils/ConfigContext.js';\n\nexport const OrganizationCreateTitle = () => {\n const config = useConfig();\n\n return (\n <>\n <Typography variant=\"h1\" mb={2} textAlign=\"center\">\n Let’s get your organization registered on The Velocity Network™ {config.chainName}.\n </Typography>\n <Typography variant=\"pl\" mb={6.5} textAlign=\"center\">\n To start, fill in the form below to allow other Network participants to identify your\n organization.\n </Typography>\n </>\n );\n};\n\nexport default OrganizationCreateTitle;\n","import { required, maxLength, email } from 'react-admin';\nimport { authorityOptions } from '@/constants/messageCodes.js';\n\nexport const validateName = [required(), maxLength(100)];\nexport const validateEmail = [required(), email()];\n\nexport const getSellSizeIfLocalAuthority = (authority) => {\n if (authorityOptions[authority] === authorityOptions.NationalAuthority) {\n return 6;\n }\n return 12;\n};\n\nexport const requestOptions = {\n retryOnMount: false,\n refetchOnWindowFocus: false,\n refetchOnReconnect: false,\n refetchOnMount: false,\n};\n\nexport const organizationPlaceholder =\n 'Add a few words describing your organization (boilerplate text) so that other Network participants can learn about it.';\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, useEffect } from 'react';\nimport { useLocation, useNavigate } from 'react-router';\nimport {\n AutocompleteInput,\n Button,\n Form,\n maxLength,\n required,\n TextInput,\n useCreateController,\n useRedirect,\n ArrayInput,\n SimpleFormIterator,\n FormDataConsumer,\n useGetOne,\n useNotify,\n useGetList,\n} from 'react-admin';\n\nimport { Box, Stack, Tooltip, Typography, Grid } from '@mui/material';\nimport InfoIcon from '@mui/icons-material/Info';\nimport { kebabCase } from 'lodash-es';\nimport PropTypes from 'prop-types';\n\nimport useSelectedOrganization from '@/state/selectedOrganizationState.js';\nimport Loading from '@/components/Loading.jsx';\nimport {\n validateWebsite,\n validateWebsiteStrict,\n} from '@/components/organizations/CreateOrganizationUtils.js';\nimport CustomImageInput from '@/components/common/CustomImageInput/index.jsx';\nimport PlusButtonBlock from '@/components/common/PlusButtonBlock.jsx';\nimport {\n formatWebSiteUrl,\n formatRegistrationNumbers,\n SUPPORT_EMAIL_HINT,\n TECHNICAL_EMAIL_HINT,\n ADMINISTRATOR_DETAILS_HINT,\n SIGNATORY_DETAILS_HINT,\n WEBSITE_HINT,\n SIGNATORY_EMAIL_HINT,\n parseJwt,\n ERRORS,\n} from '@/utils/index.jsx';\nimport useCountryCodes from '@/utils/countryCodes.js';\nimport { useAuth } from '@/utils/auth/AuthContext.js';\nimport { dataResources } from '@/utils/remoteDataProvider.js';\nimport { credentialTypesByServiceTypes } from '@/utils/serviceTypes.js';\n\nimport AuthorityRegistrationNumbersInput from './components/AuthorityRegistrationInput.jsx';\nimport { LinkedInRegistrationInput } from './components/LinkedInRegistrationInput.jsx';\nimport { OrganizationBrand } from './components/OrganizationBrand.jsx';\nimport { OrganizationSubmitButton } from './components/OrganizationSubmitButton.jsx';\nimport { OrganizationCreateTitle } from './components/OrganizationCreateTitle.jsx';\nimport ServiceCreateFormContainer from './OrganizationAddService.jsx';\nimport {\n requestOptions,\n organizationPlaceholder,\n validateName,\n validateEmail,\n} from './utils/index.js';\n\nexport const defaultBrandValue = [\n {\n name: '',\n },\n];\n\nexport const allBrandsFilled = (values) => values?.every((brand) => !!brand.name && brand.logo);\nexport const isAddBrandDisabled = (values) => {\n return values && !allBrandsFilled(values) && (values.length % 2 === 0 || values.length !== 1);\n};\n\nconst OrganizationCreate = ({\n CreateServiceComponent = ServiceCreateFormContainer,\n MockOrganization,\n}) => {\n const navigate = useNavigate();\n const location = useLocation();\n const notify = useNotify();\n const redirect = useRedirect();\n\n const { logout, user, getAccessToken } = useAuth();\n\n const { data: countryCodes, isLoading } = useCountryCodes();\n const [did, setDid] = useSelectedOrganization();\n\n const [organizationData, setOrganizationData] = useState(null);\n const [isServiceCreated, setServiceCreated] = useState(false);\n const [secretKeys, setSecretKeys] = useState(null);\n const [isCreateRequestLoading, setCreateRequestLoading] = useState(false);\n const [hasOrganisations, setHasOrganisations] = useState(false);\n const [serviceType, setServiceType] = useState('');\n const [selectedCAO, setSelectedCAO] = useState('');\n const [initialRecord, setInitialRecord] = useState({ profile: { name: '' } });\n\n const { refetch } = useGetList('organizations', undefined, {\n enabled: false,\n });\n const { data: userData, isLoading: isUserDataLoading } = useGetOne(\n dataResources.USERS,\n {\n id: user.sub,\n },\n {\n enabled: !!user.sub,\n ...requestOptions,\n },\n );\n\n useEffect(() => {\n (async () => {\n try {\n const token = await getAccessToken();\n const tokenDecoded = parseJwt(token);\n setHasOrganisations(\n Boolean(\n tokenDecoded['http://velocitynetwork.foundation/groupId'] ||\n tokenDecoded.scope.includes('admin'),\n ),\n );\n } catch (e) {\n console.error(e);\n }\n })();\n }, [getAccessToken, setHasOrganisations]);\n\n const { save } = useCreateController({\n resource: 'organizations',\n mutationOptions: {\n onSuccess: async (resp) => {\n refetch();\n setDid(resp.id);\n setSecretKeys({ keys: resp.keys, authClients: resp.authClients });\n setServiceCreated(true);\n setCreateRequestLoading(false);\n navigate(-1);\n getAccessToken({ cacheMode: 'off' });\n },\n onError: ({ body }) => {\n setCreateRequestLoading(false);\n if (body.errorCode === 'website_already_exists') {\n notify(ERRORS.websiteExists, { type: 'error' }, { autoHideDuration: 5000 });\n } else {\n notify(body.message || ERRORS.default, { type: 'error' }, { autoHideDuration: 5000 });\n }\n navigate(-1);\n setServiceCreated(false);\n },\n },\n });\n\n const goToCreateServiceStep = (data) => {\n setOrganizationData(data);\n navigate('service');\n };\n\n const onClose = () => {\n if (isServiceCreated === true) {\n redirect('list', 'services');\n } else {\n navigate(-1);\n setOrganizationData(null);\n setServiceCreated(false);\n }\n };\n\n const onCreate = async (serviceData) => {\n setCreateRequestLoading(true);\n const organization = {\n ...organizationData,\n profile: {\n ...(organizationData?.profile || {}),\n website: formatWebSiteUrl(organizationData?.profile?.website),\n linkedInProfile: formatWebSiteUrl(organizationData?.profile?.linkedInProfile),\n registrationNumbers: formatRegistrationNumbers(\n organizationData?.profile?.registrationNumbers,\n ),\n commercialEntities: organizationData?.profile?.commercialEntities\n ?.filter((brand) => brand.logo)\n ?.map((commercial) => ({\n ...commercial,\n type: 'Brand',\n })),\n },\n };\n await save({\n ...organization,\n serviceEndpoints: serviceData\n ? [\n {\n id: `${did}#${kebabCase(serviceData.type)}-1`,\n serviceEndpoint: serviceData.serviceEndpoint,\n type: serviceData.type,\n credentialTypes: credentialTypesByServiceTypes[serviceData.type],\n },\n ]\n : [],\n });\n };\n\n if (isLoading || isUserDataLoading) {\n return <Loading sx={{ pt: '60px' }} />;\n }\n return (\n <Box sx={sx.root}>\n <Stack sx={sx.content}>\n {MockOrganization && <MockOrganization setInitialRecord={setInitialRecord} />}\n\n <OrganizationCreateTitle />\n\n <Form record={initialRecord} onSubmit={goToCreateServiceStep} noValidate mode=\"onTouched\">\n <FormDataConsumer>\n {({ formData }) => (\n <>\n <Grid container spacing={4} rowSpacing={1}>\n <Grid size={{ xs: 6 }}>\n <Stack container flex={1} flexDirection=\"column\">\n <Grid size={{ xs: 12 }}>\n <Stack flexDirection=\"row\" gap={1.75}>\n <TextInput\n fullWidth\n label=\"Legal Name\"\n source=\"profile.name\"\n validate={validateName}\n />\n </Stack>\n </Grid>\n <Grid size={{ xs: 12 }}>\n <Stack flexDirection=\"row\" gap={1.75}>\n <TextInput\n fullWidth\n label=\"Website\"\n source=\"profile.website\"\n validate={[...validateWebsiteStrict, required()]}\n />\n <Box mt={2}>\n <Tooltip title={WEBSITE_HINT}>\n <InfoIcon color=\"info\" fontSize=\"small\" cursor=\"pointer\" />\n </Tooltip>\n </Box>\n </Stack>\n </Grid>\n <Grid size={{ xs: 12 }}>\n <TextInput\n fullWidth\n label=\"Address\"\n source=\"profile.physicalAddress.line1\"\n validate={[required(), maxLength(1024)]}\n />\n </Grid>\n <Grid size={{ xs: 12 }}>\n <AutocompleteInput\n label=\"Country\"\n source=\"profile.location.countryCode\"\n choices={countryCodes}\n validate={required()}\n />\n </Grid>\n </Stack>\n </Grid>\n <Grid size={{ xs: 6 }} pb={1}>\n <CustomImageInput label={false} editMode addTo=\"profile\" />\n </Grid>\n <Grid size={{ xs: 6 }}>\n <TextInput\n fullWidth\n label=\"LinkedIn Page\"\n source=\"profile.linkedInProfile\"\n validate={[...validateWebsite, required()]}\n />\n </Grid>\n <Grid size={{ xs: 6 }}>\n <LinkedInRegistrationInput\n formData={formData.profile}\n source=\"profile.registrationNumbers\"\n />\n </Grid>\n <Grid size={{ xs: 6 }}>\n <Stack flexDirection=\"row\" gap={1.75}>\n <TextInput\n fullWidth\n label=\"Support Email\"\n source=\"profile.contactEmail\"\n validate={validateEmail}\n />\n <Box mt={2}>\n <Tooltip title={SUPPORT_EMAIL_HINT}>\n <InfoIcon color=\"info\" fontSize=\"small\" cursor=\"pointer\" />\n </Tooltip>\n </Box>\n </Stack>\n </Grid>\n <Grid size={{ xs: 6 }}>\n <Stack flexDirection=\"row\" gap={1.75}>\n <TextInput\n fullWidth\n label=\"Technical Contact Email\"\n source=\"profile.technicalEmail\"\n validate={validateEmail}\n />\n <Box mt={2}>\n <Tooltip title={TECHNICAL_EMAIL_HINT}>\n <InfoIcon color=\"info\" fontSize=\"small\" cursor=\"pointer\" />\n </Tooltip>\n </Box>\n </Stack>\n </Grid>\n <AuthorityRegistrationNumbersInput\n source=\"profile.registrationNumbers\"\n orientation=\"horizontal\"\n />\n <Grid size={{ xs: 12 }}>\n <TextInput\n fullWidth\n multiline\n label=\"Short Description\"\n placeholder={organizationPlaceholder}\n source=\"profile.description\"\n validate={required()}\n />\n </Grid>\n <Grid size={{ xs: 12 }}>\n <Typography variant=\"h5\">Key individuals</Typography>\n </Grid>\n <Grid size={{ xs: 6 }}>\n <Stack flexDirection=\"row\" gap={1.75}>\n <Typography variant=\"body1\" my={2} sx={sx.sectionTitle}>\n Administrator’s Details\n </Typography>\n <Box mt={2}>\n <Tooltip title={ADMINISTRATOR_DETAILS_HINT}>\n <InfoIcon color=\"info\" fontSize=\"small\" cursor=\"pointer\" />\n </Tooltip>\n </Box>\n </Stack>\n </Grid>\n <Grid size={{ xs: 6 }}>\n <Stack flexDirection=\"row\" gap={1.75}>\n <Typography variant=\"body1\" my={2} sx={sx.sectionTitle}>\n Signatory Authority’s Details\n </Typography>\n <Box mt={2}>\n <Tooltip title={SIGNATORY_DETAILS_HINT}>\n <InfoIcon color=\"info\" fontSize=\"small\" cursor=\"pointer\" />\n </Tooltip>\n </Box>\n </Stack>\n </Grid>\n <Grid size={{ xs: 6 }}>\n <Stack flexDirection=\"row\" gap={1.75}>\n <TextInput\n fullWidth\n label=\"First name\"\n source=\"profile.adminGivenName\"\n validate={[maxLength(1024), required()]}\n defaultValue={userData ? userData.givenName : ''}\n />\n </Stack>\n <Stack flexDirection=\"row\" gap={1.75}>\n <TextInput\n fullWidth\n label=\"Last name\"\n source=\"profile.adminFamilyName\"\n validate={[maxLength(1024), required()]}\n defaultValue={userData ? userData.familyName : ''}\n />\n </Stack>\n </Grid>\n <Grid size={{ xs: 6 }}>\n <Stack flexDirection=\"row\" gap={1.75}>\n <TextInput\n fullWidth\n label=\"First name\"\n source=\"profile.signatoryGivenName\"\n validate={[maxLength(1024), required()]}\n />\n </Stack>\n <Stack flexDirection=\"row\" gap={1.75}>\n <TextInput\n fullWidth\n label=\"Last name\"\n source=\"profile.signatoryFamilyName\"\n validate={[maxLength(1024), required()]}\n />\n </Stack>\n </Grid>\n <Grid size={{ xs: 6 }}>\n <Stack flexDirection=\"row\" gap={1.75}>\n <TextInput\n fullWidth\n label=\"Job Title\"\n source=\"profile.adminTitle\"\n validate={[maxLength(1024), required()]}\n />\n </Stack>\n </Grid>\n <Grid size={{ xs: 6 }}>\n <Stack flexDirection=\"row\" gap={1.75}>\n <TextInput\n fullWidth\n label=\"Job Title\"\n source=\"profile.signatoryTitle\"\n validate={[maxLength(1024), required()]}\n />\n </Stack>\n </Grid>\n <Grid size={{ xs: 6 }}>\n <Stack flexDirection=\"row\" gap={1.75}>\n <TextInput\n fullWidth\n label=\"Email\"\n source=\"profile.adminEmail\"\n validate={validateEmail}\n defaultValue={userData ? userData.email : ''}\n />\n </Stack>\n </Grid>\n <Grid size={{ xs: 6 }}>\n <Stack flexDirection=\"row\" gap={1.75}>\n <TextInput\n fullWidth\n label=\"Email\"\n source=\"profile.signatoryEmail\"\n validate={validateEmail}\n />\n <Box mt={2}>\n <Tooltip title={SIGNATORY_EMAIL_HINT}>\n <InfoIcon color=\"info\" fontSize=\"small\" cursor=\"pointer\" />\n </Tooltip>\n </Box>\n </Stack>\n </Grid>\n <Grid size={{ xs: 12 }}>\n <Typography variant=\"h4\" mb={2} mt={4}>\n Commercial Names\n </Typography>\n </Grid>\n <Grid size={{ xs: 12 }}>\n <ArrayInput\n source=\"profile.commercialEntities\"\n defaultValue={defaultBrandValue}\n sx={{ '& .RaArrayInput-label': { display: 'none' } }}\n >\n <SimpleFormIterator\n addButton={\n <PlusButtonBlock\n style={sx.plusButtonBlock}\n disabled={!allBrandsFilled(formData.profile.commercialEntities)}\n position={formData.profile?.commercialEntities?.length}\n />\n }\n disableAdd={isAddBrandDisabled(formData.profile.commercialEntities)}\n fullWidth\n sx={sx.brandList}\n >\n <FormDataConsumer>\n {({ scopedFormData }) => {\n return (\n <OrganizationBrand\n formData={formData}\n scopedFormData={scopedFormData}\n />\n );\n }}\n </FormDataConsumer>\n </SimpleFormIterator>\n </ArrayInput>\n </Grid>\n </Grid>\n <Box display=\"flex\" justifyContent=\"center\" pt={4}>\n <Button\n variant=\"outlined\"\n color=\"secondary\"\n size=\"large\"\n sx={sx.cancelButton}\n onClick={() => (hasOrganisations ? navigate('/') : logout())}\n >\n Cancel\n </Button>\n <OrganizationSubmitButton />\n </Box>\n <CreateServiceComponent\n isModalOpened={/create\\/service/.test(location.pathname) || isServiceCreated}\n isSending={isCreateRequestLoading}\n onClose={onClose}\n onCreate={onCreate}\n isCreated={isServiceCreated}\n secretKeys={secretKeys}\n did={did}\n selectedServiceType={serviceType}\n setSelectedServiceType={setServiceType}\n selectedCAO={selectedCAO}\n setSelectedCAO={setSelectedCAO}\n />\n </>\n )}\n </FormDataConsumer>\n </Form>\n </Stack>\n </Box>\n );\n};\n\n// eslint-disable-next-line better-mutation/no-mutation\nOrganizationCreate.propTypes = {\n CreateServiceComponent: PropTypes.elementType,\n MockOrganization: PropTypes.elementType,\n};\n\nexport default OrganizationCreate;\n\nconst sx = {\n root: {\n pt: 7.5,\n pb: 2,\n pl: 1,\n boxSizing: 'border-box',\n display: 'flex',\n justifyContent: 'center',\n },\n content: {\n maxWidth: 886,\n alignItems: 'center',\n },\n cancelButton: {\n minWidth: 160,\n mr: 2,\n },\n mockButton: {\n color: 'primary.main',\n },\n formValidationCustomMessage: { color: 'primary.main' },\n brandList: {\n display: 'flex',\n flexWrap: 'wrap',\n px: '0.5rem',\n gap: '2rem',\n justifyContent: 'space-between',\n '& .RaSimpleFormIterator-action': { display: 'none' },\n '& .RaSimpleFormIterator-buttons': { width: '48%' },\n '& .RaSimpleFormIterator-add': { width: '100%' },\n '& .RaSimpleFormIterator-clear': { display: 'none' },\n '& .RaSimpleFormIterator-list': {\n display: 'flex',\n flexWrap: 'wrap',\n justifyContent: 'space-between',\n gap: '2rem',\n flexGrow: '2',\n width: '100%',\n '&:has(li:only-child)': { width: '48%' },\n },\n '& .RaSimpleFormIterator-line': {\n width: '48%',\n '&:only-child': { width: '100%' },\n },\n '& .RaSimpleFormIterator-form': {\n width: '100%',\n },\n },\n brandLogoContainer: { width: '100%' },\n brandLogo: { minHeight: '272px' },\n plusButtonBlock: { height: '23.9rem' },\n sectionTitle: {\n fontSize: '14px',\n textTransform: 'uppercase',\n },\n errorMessage: {\n fontSize: '0.75rem',\n color: 'primary.main',\n marginLeft: '1.25em',\n height: '1.75em',\n },\n fullWidth: {\n width: '100%',\n },\n};\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 {\n AutocompleteInput,\n email,\n Form,\n Edit,\n required,\n useEditController,\n SaveButton,\n FormDataConsumer,\n ArrayInput,\n SimpleFormIterator,\n TextInput,\n} from 'react-admin';\nimport { useParams } from 'react-router';\nimport { Box, Grid, Stack, Tooltip, Typography } from '@mui/material';\nimport InfoIcon from '@mui/icons-material/Info';\nimport { useState } from 'react';\nimport {\n validateWebsite,\n validateWebsiteStrict,\n} from '../../components/organizations/CreateOrganizationUtils.js';\nimport Loading from '../../components/Loading.jsx';\nimport {\n ERRORS,\n formatWebSiteUrl,\n formatRegistrationNumbers,\n SUPPORT_EMAIL_HINT,\n TECHNICAL_EMAIL_HINT,\n WEBSITE_HINT_SHORT,\n} from '../../utils/index.jsx';\nimport useCountryCodes from '../../utils/countryCodes.js';\nimport CustomImageInput from '../../components/common/CustomImageInput/index.jsx';\nimport { defaultBrandValue, allBrandsFilled, isAddBrandDisabled } from './OrganizationCreate.jsx';\nimport PlusButtonBlock from '../../components/common/PlusButtonBlock.jsx';\nimport { OrganizationBrand } from './components/OrganizationBrand.jsx';\nimport AuthorityRegistrationNumbersInput from './components/AuthorityRegistrationInput.jsx';\nimport { LinkedInRegistrationInput } from './components/LinkedInRegistrationInput.jsx';\n\nconst validateEmail = [required(), email()];\n\nconst transform = (data) => ({\n ...data,\n profile: {\n ...data.profile,\n website: formatWebSiteUrl(data.profile.website),\n linkedInProfile: formatWebSiteUrl(data.profile.linkedInProfile),\n registrationNumbers: formatRegistrationNumbers(data.profile?.registrationNumbers),\n commercialEntities: data.profile.commercialEntities\n .filter((brand) => brand.logo)\n .map((brand) => ({\n ...brand,\n type: 'Brand',\n })),\n },\n});\n\nconst modifyRecord = (record) => ({\n ...record,\n profile: {\n ...record.profile,\n commercialEntities: record.profile?.commercialEntities?.length\n ? record.profile.commercialEntities\n : defaultBrandValue,\n },\n});\n\nconst OrganizationEdit = () => {\n const { id } = useParams();\n const { data: countryCodes, isLoading: isCodesLoading } = useCountryCodes();\n const [errorMessage, setErrorMessage] = useState('');\n const { record, isLoading } = useEditController({\n resource: 'organizations',\n id,\n });\n\n const onError = ({ body }) => {\n if (body.errorCode === 'webhook_not_protocol_compliant') {\n setErrorMessage(ERRORS.secureWebHook);\n } else {\n setErrorMessage(ERRORS.default);\n }\n };\n\n if (isLoading || isCodesLoading) return <Loading sx={{ pt: '60px' }} />;\n\n return (\n <Stack pt={5} pb={10} pr={8} pl={9}>\n <Typography variant=\"h3\" mb={4}>\n Edit profile\n </Typography>\n <Edit\n mutationMode=\"pessimistic\"\n mutationOptions={{ onError }}\n actions={false}\n sx={sx.formContainer}\n transform={(data) => transform(data)}\n >\n <Form record={modifyRecord(record)} mode=\"onTouched\">\n <FormDataConsumer>\n {/* eslint-disable-next-line complexity */}\n {({ formData }) => (\n <>\n <Grid container spacing={5} rowSpacing={1.25}>\n <Grid size={{ xs: 6 }}>\n <Stack container flex={1} flexDirection=\"column\">\n <Grid size={{ xs: 12 }}>\n <TextInput\n fullWidth\n source=\"profile.name\"\n label=\"Legal Name\"\n validate={required()}\n readOnly\n />\n </Grid>\n <Grid size={{ xs: 12 }}>\n <Stack flexDirection=\"row\" gap={1.75}>\n <TextInput\n fullWidth\n label=\"Website\"\n source=\"profile.website\"\n validate={[...validateWebsiteStrict, required()]}\n disabled\n />\n <Box mt={2}>\n <Tooltip title={WEBSITE_HINT_SHORT}>\n <InfoIcon color=\"info\" fontSize=\"small\" cursor=\"pointer\" />\n </Tooltip>\n </Box>\n </Stack>\n </Grid>\n <Grid size={{ xs: 12 }}>\n <TextInput\n fullWidth\n label=\"Address\"\n source=\"profile.physicalAddress.line1\"\n validate={required()}\n />\n </Grid>\n <Grid size={{ xs: 12 }}>\n <AutocompleteInput\n fullWidth\n label=\"Country\"\n source=\"profile.location.countryCode\"\n validate={required()}\n choices={countryCodes}\n />\n </Grid>\n </Stack>\n </Grid>\n <Grid size={{ xs: 6 }} p={1}>\n <CustomImageInput\n label={false}\n source=\"profile.url\"\n editMode={false}\n imgSrc={formData.profile?.logo}\n addTo=\"profile\"\n />\n </Grid>\n <Grid size={{ xs: 6 }}>\n <Stack flexDirection=\"row\" gap={1.75}>\n <TextInput\n fullWidth\n label=\"LinkedIn Page\"\n source=\"profile.linkedInProfile\"\n validate={[...validateWebsite, required()]}\n />\n </Stack>\n </Grid>\n <Grid size={{ xs: 6 }}>\n <LinkedInRegistrationInput\n formData={{ ...record, ...formData.profile }}\n source=\"profile.registrationNumbers\"\n />\n </Grid>\n <Grid size={{ xs: 6 }}>\n <Stack flexDirection=\"row\" gap={1.75}>\n <TextInput\n fullWidth\n label=\"Support Email\"\n source=\"profile.contactEmail\"\n validate={validateEmail}\n />\n <Box mt={2}>\n <Tooltip title={SUPPORT_EMAIL_HINT}>\n <InfoIcon color=\"info\" fontSize=\"small\" cursor=\"pointer\" />\n </Tooltip>\n </Box>\n </Stack>\n </Grid>\n <Grid size={{ xs: 6 }}>\n <Stack flexDirection=\"row\" gap={1.75}>\n <TextInput\n fullWidth\n label=\"Technical Contact Email\"\n source=\"profile.technicalEmail\"\n validate={validateEmail}\n />\n <Box mt={2}>\n <Tooltip title={TECHNICAL_EMAIL_HINT}>\n <InfoIcon color=\"info\" fontSize=\"small\" cursor=\"pointer\" />\n </Tooltip>\n </Box>\n </Stack>\n </Grid>\n <AuthorityRegistrationNumbersInput\n source=\"profile.registrationNumbers\"\n orientation=\"horizontal\"\n />\n <Grid size={{ xs: 12 }}>\n <TextInput fullWidth disabled label=\"DID\" source=\"id\" />\n </Grid>\n {formData.didDoc?.alsoKnownAs && (\n <Grid size={{ xs: 12 }}>\n <TextInput\n fullWidth\n multiline\n disabled\n sx={sx.textArea}\n label=\"Also Known As\"\n source=\"didDoc.alsoKnownAs\"\n format={(value) => (Array.isArray(value) ? value.join('\\n') : value)}\n />\n </Grid>\n )}\n <Grid size={{ xs: 12 }}>\n <TextInput\n fullWidth\n multiline\n label=\"Short Description\"\n source=\"profile.description\"\n validate={required()}\n sx={sx.description}\n />\n </Grid>\n <Grid size={{ xs: 12 }}>\n <Typography variant=\"h4\" mb={2} mt={4}>\n Commercial Names\n </Typography>\n </Grid>\n <Grid size={{ xs: 12 }}>\n <ArrayInput\n source=\"profile.commercialEntities\"\n defaultValue={defaultBrandValue}\n sx={{ '& .RaArrayInput-label': { display: 'none' } }}\n >\n <SimpleFormIterator\n addButton={\n <PlusButtonBlock\n style={sx.plusButtonBlock}\n disabled={\n !allBrandsFilled([\n ...(record.profile.commercialEntities || []),\n ...(formData.profile.commercialEntities || []),\n ])\n }\n position={formData.profile?.commercialEntities?.length}\n />\n }\n disableAdd={isAddBrandDisabled([\n ...(record.profile.commercialEntities || []),\n ...(formData.profile.commercialEntities || []),\n ])}\n fullWidth\n sx={sx.brandList}\n >\n <FormDataConsumer>\n {({ scopedFormData }) => {\n return (\n <OrganizationBrand\n formData={formData}\n scopedFormData={scopedFormData}\n />\n );\n }}\n </FormDataConsumer>\n </SimpleFormIterator>\n </ArrayInput>\n </Grid>\n </Grid>\n <SaveButton\n icon={null}\n variant=\"outlined\"\n color=\"primary\"\n type=\"submit\"\n sx={{ mt: 3 }}\n label=\"Update profile\"\n />\n <Grid size={{ xs: 12 }}>\n <Stack flexDirection=\"row\" mt={2}>\n <Typography variant=\"subtitle2\" sx={{ color: 'primary.main' }}>\n {errorMessage}\n </Typography>\n </Stack>\n </Grid>\n </>\n )}\n </FormDataConsumer>\n </Form>\n </Edit>\n </Stack>\n );\n};\n\nexport default OrganizationEdit;\n\nconst sx = {\n formContainer: {\n '& .RaEdit-card': { boxShadow: 'none', paddingTop: '0.5em' },\n '& .RaEdit-noActions': { marginTop: 0 },\n },\n brandList: {\n display: 'flex',\n flexWrap: 'wrap',\n gap: '2rem',\n px: '0.5em',\n justifyContent: 'space-between',\n '& .RaSimpleFormIterator-action': { display: 'none' },\n '& .RaSimpleFormIterator-buttons': { width: '48%' },\n '& .RaSimpleFormIterator-add': { width: '100%' },\n '& .RaSimpleFormIterator-clear': { display: 'none' },\n '& .RaSimpleFormIterator-list': {\n display: 'flex',\n flexWrap: 'wrap',\n justifyContent: 'space-between',\n gap: '2rem',\n flexGrow: '2',\n width: '100%',\n '&:has(li:only-child)': { width: '48%' },\n },\n '& .RaSimpleFormIterator-line': {\n width: '48%',\n '&:only-child': { width: '100%' },\n },\n '& .RaSimpleFormIterator-form': {\n width: '100%',\n },\n '& .MuiBox-root fieldset': {\n height: 'calc(24.5rem - 75px) !important',\n },\n },\n brandLogoContainer: { width: '100%' },\n brandLogo: { minHeight: '272px' },\n plusButtonBlock: { height: '25rem' },\n errorMessage: {\n fontSize: '0.75rem',\n color: 'primary.main',\n marginLeft: '1.25em',\n height: '1.75em',\n },\n fullWidth: {\n width: '100%',\n },\n textArea: { '& textarea': { padding: '0' } },\n description: { '& textarea': { paddingLeft: '0', paddingRight: '0' } },\n};\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 React, { useEffect } from 'react';\nimport { Box, Button, Divider, Paper, Stack, Typography, Grid } from '@mui/material';\nimport PropTypes from 'prop-types';\nimport EditIcon from '@mui/icons-material/Edit';\nimport { useParams, useNavigate } from 'react-router';\nimport { useGetOne, useRedirect } from 'react-admin';\nimport {\n copyTextToClipboard,\n WEBSITE_HINT_SHORT,\n DID_HINT,\n LINKEDIN_ORGANIZATION_ID,\n SUPPORT_EMAIL_HINT,\n TECHNICAL_EMAIL_HINT,\n DUNS_HINT,\n LEI_HINT,\n NATIONAL_AUTHORITY_HINT,\n ALSO_KNOWN_AS_HINT,\n} from '@/utils/index.jsx';\nimport Loading from '@/components/Loading.jsx';\nimport OrganizationAvatar from '@/components/common/OrganizationAvatar.jsx';\nimport useCountryCodes from '@/utils/countryCodes.js';\nimport useSelectedOrganization from '@/state/selectedOrganizationState.js';\nimport { AuthoritiesList, Authorities, authorityOptions } from '@/constants/messageCodes.js';\nimport DataItem from '@/components/common/DataItem.jsx';\nimport { useAuth } from '@/utils/auth/AuthContext.js';\n\n// eslint-disable-next-line complexity\nconst OrganizationShow = () => {\n const [savedDid, setDid] = useSelectedOrganization();\n const { id } = useParams();\n const { getCountryNameByCode } = useCountryCodes();\n const redirect = useRedirect();\n const { data: record, isLoading } = useGetOne(\n 'organizations',\n { id },\n {\n onError: () => {\n setDid('');\n redirect('/');\n },\n },\n );\n\n const navigate = useNavigate();\n\n useEffect(() => {\n if (id !== savedDid) {\n navigate(`/organizations/${savedDid}/show`, { replace: true });\n }\n }, [id, savedDid, navigate]);\n\n const { getAccessToken } = useAuth();\n const [token, setToken] = React.useState('');\n const [isCopied, setIsCopied] = React.useState(false);\n\n React.useEffect(() => {\n const getToken = async () => {\n try {\n const accessToken = await getAccessToken();\n setToken(accessToken);\n } catch (e) {\n // eslint-disable-next-line no-console\n console.log(e.message);\n }\n };\n getToken();\n }, [getAccessToken]);\n\n const handleCopyClick = () => {\n copyTextToClipboard(token, (err) => {\n setIsCopied(!err);\n });\n };\n\n if (!token || isLoading) {\n return (\n <Box pt={5} pb={10} pr={8} pl={9}>\n <Loading />\n </Box>\n );\n }\n\n return (\n <Box pt={5} pb={10} pr={8} pl={9}>\n <Stack mb={3.75} direction=\"row\" alignItems=\"center\" justifyContent=\"space-between\">\n <Typography variant=\"h3\">Organization profile</Typography>\n <Button\n variant=\"outlined\"\n onClick={() => redirect('edit', 'organizations', id)}\n startIcon={<EditIcon />}\n >\n Edit Profile\n </Button>\n </Stack>\n <Paper elevation={2} sx={{ p: 6 }}>\n <Grid container spacing={4}>\n <Grid size={{ xs: 4 }}>\n <Box display=\"flex\" alignItems=\"flex-start\" mb={5}>\n <OrganizationAvatar name={record.profile.name} logo={record.profile.logo} size={66} />\n </Box>\n <Typography component=\"div\" mb={1.5} variant=\"h4\" sx={[sx.value, sx.header]}>\n {record.profile.name}\n </Typography>\n <Typography component=\"div\" mb={1.5} variant=\"pm\">\n {getCountryNameByCode(record.profile.location.countryCode)}\n </Typography>\n </Grid>\n <Grid size={{ xs: 8 }}>\n <Grid sx={sx.dataRow} container spacing={4}>\n <Grid size={{ xs: 6 }}>\n <DataItem title=\"Legal Name\" value={record.profile.name} sxValue={sx.value} />\n </Grid>\n <Grid size={{ xs: 6 }}>\n <DataItem\n title=\"Website\"\n value={record.profile.website}\n sxValue={sx.value}\n hint={WEBSITE_HINT_SHORT}\n />\n </Grid>\n <Grid size={{ xs: 6 }}>\n <DataItem\n title=\"Address\"\n value={record.profile.physicalAddress?.line1}\n sxValue={sx.value}\n />\n </Grid>\n <Grid size={{ xs: 6 }}>\n <DataItem\n title=\"Country\"\n value={getCountryNameByCode(record.profile.location.countryCode)}\n sxValue={sx.value}\n />\n </Grid>\n <Grid size={{ xs: 6 }}>\n <DataItem\n title=\"LinkedIn Page\"\n value={record.profile.linkedInProfile}\n sxValue={sx.value}\n />\n </Grid>\n <Grid size={{ xs: 6 }}>\n <DataItemRegistrationNumbers\n hint={LINKEDIN_ORGANIZATION_ID}\n title=\"LinkedIn Company Page ID\"\n record={record}\n type=\"number\"\n fieldType=\"LinkedIn\"\n />\n </Grid>\n <Grid size={{ xs: 6 }}>\n <DataItem\n title=\"Support Email\"\n value={record.profile.contactEmail}\n sxValue={sx.value}\n hint={SUPPORT_EMAIL_HINT}\n />\n </Grid>\n <Grid size={{ xs: 6 }}>\n <DataItem\n title=\"Technical Contact Email\"\n value={record.profile.technicalEmail}\n sxValue={sx.value}\n hint={TECHNICAL_EMAIL_HINT}\n />\n </Grid>\n <Grid size={{ xs: 6 }}>\n <DataItemRegistrationNumbers\n hint={DUNS_HINT}\n title={authorityOptions[Authorities.DunnAndBradstreet]}\n type=\"number\"\n record={record}\n fieldType={Authorities.DunnAndBradstreet}\n />\n </Grid>\n <Grid size={{ xs: 6 }}>\n <DataItemRegistrationNumbers\n hint={LEI_HINT}\n title={authorityOptions[Authorities.GLEIF]}\n type=\"number\"\n record={record}\n fieldType={Authorities.GLEIF}\n />\n </Grid>\n <Grid size={{ xs: 6 }}>\n <DataItemRegistrationNumbers\n hint={NATIONAL_AUTHORITY_HINT}\n title={authorityOptions[Authorities.NationalAuthority]}\n type=\"number\"\n record={record}\n fieldType={Authorities.NationalAuthority}\n />\n </Grid>\n <Grid size={{ xs: 6 }}>\n <DataItemRegistrationNumbers\n hint=\"\"\n title=\"\"\n type=\"uri\"\n record={record}\n fieldType={Authorities.NationalAuthority}\n />\n </Grid>\n </Grid>\n <Grid size={{ xs: 12 }} sx={sx.dataRow}>\n <DataItem title=\"DID\" value={record.id} hint={DID_HINT} sxValue={sx.value} />\n </Grid>\n {record.didDoc?.alsoKnownAs && (\n <Grid size={{ xs: 12 }}>\n <DataItem\n title=\"Also known as\"\n value={record.didDoc.alsoKnownAs}\n hint={ALSO_KNOWN_AS_HINT}\n sxValue={sx.value}\n />\n </Grid>\n )}\n </Grid>\n </Grid>\n <Divider sx={{ my: 5 }} />\n <Box>\n <Typography component=\"div\" mb={1} variant=\"pm\">\n Short Description\n </Typography>\n <Typography component=\"p\" variant=\"pm\">\n {record.profile.description || '-'}\n </Typography>\n </Box>\n {!!record.profile?.commercialEntities?.length && (\n <>\n <Typography component=\"div\" mt={4} textTransform=\"uppercase\" variant=\"pm\">\n Commercial Names\n </Typography>\n <Divider sx={{ mt: 2, mb: 5 }} />\n <Grid container spacing={4}>\n {record.profile.commercialEntities.map((commercial) => (\n <Grid\n item\n size={{ xs: 4 }}\n key={commercial.logo}\n sx={sx.commercials}\n justifyContent=\"flex-start\"\n alignItems=\"center\"\n >\n <Box display=\"flex\">\n <OrganizationAvatar size={52} name={commercial.name} logo={commercial.logo} />\n </Box>\n <Typography>{commercial.name}</Typography>\n </Grid>\n ))}\n </Grid>\n </>\n )}\n <Divider sx={{ my: 5 }} />\n <Box mb={3}>\n <Typography component=\"div\" mb={1} textTransform=\"uppercase\" variant=\"pm\">\n Registrar Access Token\n </Typography>\n <Typography component=\"p\" variant=\"pm\" sx={sx.token}>\n {token}\n </Typography>\n </Box>\n <Button variant=\"outlined\" color=\"secondary\" size=\"small\" onClick={handleCopyClick}>\n {isCopied ? 'COPIED' : 'COPY'}\n </Button>\n </Paper>\n </Box>\n );\n};\n\nconst DataItemRegistrationNumbers = ({ fieldType, record, type, ...props }) => {\n const transformedValue =\n record?.profile?.registrationNumbers &&\n record?.profile?.registrationNumbers.find(({ authority }) => {\n return authority === fieldType;\n })?.[type];\n\n return <DataItem {...props} value={transformedValue} sxValue={sx.value} />;\n};\n\n// eslint-disable-next-line better-mutation/no-mutation\nDataItemRegistrationNumbers.propTypes = {\n // eslint-disable-next-line react/forbid-prop-types\n record: PropTypes.object.isRequired,\n title: PropTypes.string,\n hint: PropTypes.string,\n type: PropTypes.string,\n fieldType: PropTypes.oneOf(AuthoritiesList).isRequired,\n};\n\nconst sx = {\n avatar: {\n width: '66px',\n height: '66px',\n bgcolor: 'primary.main',\n border: '6px solid white',\n },\n avatarBorder: {\n mb: 5,\n display: 'flex',\n borderRadius: '50%',\n border: (theme) => `1px solid ${theme.palette.divider.main}`,\n },\n token: {\n color: 'text.secondary',\n wordBreak: 'break-all',\n },\n dataRow: {\n mb: 4,\n },\n value: {\n wordBreak: 'break-word',\n fontWeight: 600,\n },\n commercials: { display: 'flex', gap: '1em' },\n title: { height: '1em' },\n header: {\n fontSize: '1.25rem',\n marginBottom: '.75rem',\n },\n};\n\nexport default OrganizationShow;\n"],"names":["sx","required","maxLength","validateEmail","ServiceCreateFormContainer","AuthorityRegistrationNumbersInput","Button"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,MAAM,yBAAyB,CAAC;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,CAAC,cAAc,eAAe,IAAI,SAAS,CAAC;AAClD,QAAM,CAAC,mBAAmB,oBAAoB,IAAI,SAAS,KAAK;AAChE,QAAM,CAAC,yBAAyB,0BAA0B,IAAI,SAAS,KAAK;AAE5E,QAAM,YAAY,QAAQ,MAAM;AAC9B,QAAI,qBAAqB;AACvB,YAAM,OAAO,oBAAoB,GAAG,MAAM,MAAM;AAChD,aAAO,GAAG,UAAU,KAAK,CAAC,CAAC,CAAC;AAAA,IAC9B;AACA,WAAO;AAAA,EACT,GAAG,CAAC,mBAAmB,CAAC;AAExB,QAAM,iBAAiB,OAAO,aAAa;AAE3C,QAAM,EAAE,uBAAuB,UAAU,uBAAuB,mBAAmB;AAEnF,QAAM,EAAE,MAAM,0BAA0B,WAAW,iBAAiB;AAAA,IAClE,cAAc;AAAA,IACd;AAAA,MACE,QAAQ,EAAE,cAAc,0BAAA;AAAA,IAA0B;AAAA,EACpD;AAIF,YAAU,MAAM;AACd,UAAM,QAAQ,MAAM;AAClB,sBAAgB,CAAC;AAAA,IACnB;AACA,QAAI,eAAe,YA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sources":["../../src/pages/organizations/OrganizationAddService.jsx","../../src/pages/organizations/components/OrganizationBrand.jsx","../../src/pages/organizations/components/OrganizationSubmitButton.jsx","../../src/pages/organizations/components/OrganizationCreateTitle.jsx","../../src/pages/organizations/utils/index.js","../../src/pages/organizations/OrganizationCreate.jsx","../../src/pages/organizations/OrganizationEdit.jsx","../../src/pages/organizations/OrganizationShow.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 { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { useGetList } from 'react-admin';\nimport PropTypes from 'prop-types';\nimport { kebabCase } from 'lodash-es';\n\nimport Loading from '../../components/Loading.jsx';\nimport Popup from '../../components/common/Popup.jsx';\nimport { dataResources } from '../../utils/remoteDataProvider.js';\n\nimport { ServiceEndpointSelection } from '../services/components/ServiceEndpointSelection/index.jsx';\nimport { ServiceTypeSelection } from '../services/components/ServiceTypeSelection/index.jsx';\nimport { SecretKeysPopup } from '../services/components/SecretKeysPopup/index.jsx';\nimport { useIsIssuingInspection } from '../services/hooks/useIsIssuingInspection.js';\nimport { buildPayload } from '../services/utils/buildPayload.js';\n\nconst OrganizationAddService = ({\n isModalOpened,\n isSending,\n onCreate,\n isCreated,\n secretKeys,\n onClose,\n // did,\n selectedServiceType,\n setSelectedServiceType,\n selectedCAO,\n setSelectedCAO,\n InterceptOnCreate,\n}) => {\n const [selectedStep, setSelectedStep] = useState(1);\n const [isKeysPopupOpened, setIsKeysPopupOpened] = useState(false);\n const [isInterceptOnCreateOpen, setIsInterceptOnCreateOpen] = useState(false);\n\n const serviceId = useMemo(() => {\n if (selectedServiceType) {\n const type = selectedServiceType.id.match(/.+v1/);\n return `${kebabCase(type[0])}-1`;\n }\n return '';\n }, [selectedServiceType]);\n\n const openedStateRef = useRef(isModalOpened);\n\n const { isIssuingOrInspection, isCAO } = useIsIssuingInspection(selectedServiceType);\n\n const { data: credentialAgentOperators, isLoading: isLoadingCAO } = useGetList(\n dataResources.SEARCH_PROFILES,\n {\n filter: { serviceTypes: 'CredentialAgentOperator' },\n },\n );\n\n // clear previous state after close\n useEffect(() => {\n const reset = () => {\n setSelectedStep(1);\n };\n if (openedStateRef.current === false && isModalOpened && !isCreated) {\n reset();\n }\n\n // eslint-disable-next-line better-mutation/no-mutation\n openedStateRef.current = isModalOpened;\n return reset;\n }, [isModalOpened, isCreated]);\n\n useEffect(() => {\n if (InterceptOnCreate && isCreated) {\n setIsInterceptOnCreateOpen(true);\n }\n }, [InterceptOnCreate, isCreated]);\n\n const onCreateCallback = useCallback(\n (service) => {\n const type = selectedServiceType.id.match(/.+v1/);\n setSelectedCAO(service.serviceEndpoint.split('#')[0]);\n const payload = buildPayload(service, type[0]);\n onCreate({\n ...payload,\n });\n },\n [onCreate, selectedServiceType.id, setSelectedCAO],\n );\n\n return (\n <>\n <Popup\n onClose={onClose}\n title=\"\"\n isOpen={isModalOpened}\n mainContainerStyles={styles.mainContainer}\n disableCloseButton={isSending}\n >\n {isSending && <Loading color=\"error\" sx={{ pl: '10px' }} size={26} />}\n\n {selectedStep === 1 && (\n <ServiceTypeSelection\n handleNext={() => setSelectedStep(2)}\n isLoading={isLoadingCAO}\n selectedServiceType={selectedServiceType}\n setSelectedServiceType={setSelectedServiceType}\n onDoLater={() => {\n onCreate(null);\n }}\n />\n )}\n {selectedStep === 2 && (\n <ServiceEndpointSelection\n credentialAgentOperators={credentialAgentOperators}\n isIssueOrInspection={isIssuingOrInspection}\n selectedServiceType={selectedServiceType}\n inProgress={isSending}\n onCreate={onCreateCallback}\n handleBack={() => setSelectedStep(1)}\n />\n )}\n </Popup>\n\n <InterceptOnCreate\n isInterceptOnCreateOpen={isInterceptOnCreateOpen}\n serviceId={serviceId}\n onNext={() => setIsKeysPopupOpened(true)}\n onClose={() => setIsKeysPopupOpened(true)}\n isIssueOrInspection={isIssuingOrInspection}\n selectedCAO={selectedCAO}\n isCAO={isCAO}\n />\n\n <SecretKeysPopup\n isOpen={isKeysPopupOpened}\n secretKeys={secretKeys}\n onClose={() => {\n setIsKeysPopupOpened(false);\n onClose();\n }}\n wording={{\n title: 'Your organization is now registered on Velocity Network™.',\n subtitle:\n 'Please save your organization’s unique keys in a secure location, as they will not be available once you close this window.',\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\nOrganizationAddService.propTypes = {\n isModalOpened: PropTypes.bool,\n isSending: PropTypes.bool,\n onCreate: PropTypes.func,\n isCreated: PropTypes.bool,\n // eslint-disable-next-line react/forbid-prop-types\n secretKeys: PropTypes.object,\n onClose: PropTypes.func,\n did: PropTypes.string,\n selectedServiceType: PropTypes.shape({\n id: PropTypes.string,\n title: PropTypes.string,\n }),\n setSelectedServiceType: PropTypes.func,\n selectedCAO: PropTypes.string,\n setSelectedCAO: PropTypes.func,\n InterceptOnCreate: PropTypes.func,\n};\n\nexport default OrganizationAddService;\n","import React from 'react';\nimport { Box } from '@mui/material';\nimport { TextInput } from 'react-admin';\nimport { useFormContext } from 'react-hook-form';\nimport { maxLength, required } from 'ra-core';\nimport CustomImageInput from '../../../components/common/CustomImageInput/index.jsx';\n\n/* eslint-disable react/prop-types */\nexport const OrganizationBrand = ({ formData, scopedFormData }) => {\n let brandNameValidate = [maxLength(100)];\n if (scopedFormData && scopedFormData.logo) {\n brandNameValidate = [...brandNameValidate, required('Commercial name field is required')];\n }\n const form = useFormContext();\n const index = formData?.profile?.commercialEntities?.indexOf(scopedFormData) || 0;\n const innerSource = `profile.commercialEntities[${index}]`;\n return (\n <>\n <TextInput\n fullWidth\n label=\"Commercial Name\"\n placeholder=\"Commercial Name\"\n source=\"name\"\n validate={brandNameValidate}\n defaultValue=\"\"\n />\n <Box mt={2} sx={sx.brandLogoContainer}>\n <CustomImageInput\n label={false}\n labelText=\"Logo\"\n editMode\n addTo={innerSource}\n imgSrc={scopedFormData?.logo}\n style={sx.brandLogo}\n isRequired={!!scopedFormData?.name}\n onChange={() => {\n form.setFocus(`${innerSource}.name`);\n form.trigger(`${innerSource}.name`);\n }}\n />\n </Box>\n </>\n );\n};\n/* eslint-enable */\n\nconst sx = {\n brandLogo: { minHeight: '272px' },\n};\n","import { Button } from 'react-admin';\nimport { useFormContext } from 'react-hook-form';\n\nexport const OrganizationSubmitButton = () => {\n const form = useFormContext();\n\n return (\n <Button\n disabled={!form.formState.isValid}\n variant=\"outlined\"\n color=\"primary\"\n type=\"submit\"\n size=\"large\"\n sx={sx.submit}\n >\n Add Service\n </Button>\n );\n};\n\nconst sx = {\n submit: {\n minWidth: 196,\n },\n};\n\nexport default OrganizationSubmitButton;\n","import { Typography } from '@mui/material';\nimport { useConfig } from '@/utils/ConfigContext.js';\n\nexport const OrganizationCreateTitle = () => {\n const config = useConfig();\n\n return (\n <>\n <Typography variant=\"h1\" mb={2} textAlign=\"center\">\n Let’s get your organization registered on The Velocity Network™ {config.chainName}.\n </Typography>\n <Typography variant=\"pl\" mb={6.5} textAlign=\"center\">\n To start, fill in the form below to allow other Network participants to identify your\n organization.\n </Typography>\n </>\n );\n};\n\nexport default OrganizationCreateTitle;\n","import { required, maxLength, email } from 'react-admin';\nimport { authorityOptions } from '@/constants/messageCodes.js';\n\nexport const validateName = [required(), maxLength(100)];\nexport const validateEmail = [required(), email()];\n\nexport const getSellSizeIfLocalAuthority = (authority) => {\n if (authorityOptions[authority] === authorityOptions.NationalAuthority) {\n return 6;\n }\n return 12;\n};\n\nexport const requestOptions = {\n retryOnMount: false,\n refetchOnWindowFocus: false,\n refetchOnReconnect: false,\n refetchOnMount: false,\n};\n\nexport const organizationPlaceholder =\n 'Add a few words describing your organization (boilerplate text) so that other Network participants can learn about it.';\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, useEffect } from 'react';\nimport { useLocation, useNavigate } from 'react-router';\nimport {\n AutocompleteInput,\n Button,\n Form,\n maxLength,\n required,\n TextInput,\n useCreateController,\n useRedirect,\n ArrayInput,\n SimpleFormIterator,\n FormDataConsumer,\n useGetOne,\n useNotify,\n useGetList,\n} from 'react-admin';\n\nimport { Box, Stack, Tooltip, Typography, Grid } from '@mui/material';\nimport InfoIcon from '@mui/icons-material/Info';\nimport { kebabCase } from 'lodash-es';\nimport PropTypes from 'prop-types';\n\nimport useSelectedOrganization from '@/state/selectedOrganizationState.js';\nimport Loading from '@/components/Loading.jsx';\nimport {\n validateWebsite,\n validateWebsiteStrict,\n} from '@/components/organizations/CreateOrganizationUtils.js';\nimport CustomImageInput from '@/components/common/CustomImageInput/index.jsx';\nimport PlusButtonBlock from '@/components/common/PlusButtonBlock.jsx';\nimport {\n formatWebSiteUrl,\n formatRegistrationNumbers,\n SUPPORT_EMAIL_HINT,\n TECHNICAL_EMAIL_HINT,\n ADMINISTRATOR_DETAILS_HINT,\n SIGNATORY_DETAILS_HINT,\n WEBSITE_HINT,\n SIGNATORY_EMAIL_HINT,\n parseJwt,\n ERRORS,\n} from '@/utils/index.jsx';\nimport useCountryCodes from '@/utils/countryCodes.js';\nimport { useAuth } from '@/utils/auth/AuthContext.js';\nimport { dataResources } from '@/utils/remoteDataProvider.js';\n\nimport AuthorityRegistrationNumbersInput from './components/AuthorityRegistrationInput.jsx';\nimport { LinkedInRegistrationInput } from './components/LinkedInRegistrationInput.jsx';\nimport { OrganizationBrand } from './components/OrganizationBrand.jsx';\nimport { OrganizationSubmitButton } from './components/OrganizationSubmitButton.jsx';\nimport { OrganizationCreateTitle } from './components/OrganizationCreateTitle.jsx';\nimport ServiceCreateFormContainer from './OrganizationAddService.jsx';\nimport {\n requestOptions,\n organizationPlaceholder,\n validateName,\n validateEmail,\n} from './utils/index.js';\n\nexport const defaultBrandValue = [\n {\n name: '',\n },\n];\n\nexport const allBrandsFilled = (values) => values?.every((brand) => !!brand.name && brand.logo);\nexport const isAddBrandDisabled = (values) => {\n return values && !allBrandsFilled(values) && (values.length % 2 === 0 || values.length !== 1);\n};\n\nconst OrganizationCreate = ({\n CreateServiceComponent = ServiceCreateFormContainer,\n MockOrganization,\n}) => {\n const navigate = useNavigate();\n const location = useLocation();\n const notify = useNotify();\n const redirect = useRedirect();\n\n const { logout, user, getAccessToken } = useAuth();\n\n const { data: countryCodes, isLoading } = useCountryCodes();\n const [did, setDid] = useSelectedOrganization();\n\n const [organizationData, setOrganizationData] = useState(null);\n const [isServiceCreated, setServiceCreated] = useState(false);\n const [secretKeys, setSecretKeys] = useState(null);\n const [isCreateRequestLoading, setCreateRequestLoading] = useState(false);\n const [hasOrganisations, setHasOrganisations] = useState(false);\n const [serviceType, setServiceType] = useState('');\n const [selectedCAO, setSelectedCAO] = useState('');\n const [initialRecord, setInitialRecord] = useState({ profile: { name: '' } });\n\n const { refetch } = useGetList('organizations', undefined, {\n enabled: false,\n });\n const { data: userData, isLoading: isUserDataLoading } = useGetOne(\n dataResources.USERS,\n {\n id: user.sub,\n },\n {\n enabled: !!user.sub,\n ...requestOptions,\n },\n );\n\n useEffect(() => {\n (async () => {\n try {\n const token = await getAccessToken();\n const tokenDecoded = parseJwt(token);\n setHasOrganisations(\n Boolean(\n tokenDecoded['http://velocitynetwork.foundation/groupId'] ||\n tokenDecoded.scope.includes('admin'),\n ),\n );\n } catch (e) {\n console.error(e);\n }\n })();\n }, [getAccessToken, setHasOrganisations]);\n\n const { save } = useCreateController({\n resource: 'organizations',\n mutationOptions: {\n onSuccess: async (resp) => {\n refetch();\n setDid(resp.id);\n setSecretKeys({ keys: resp.keys, authClients: resp.authClients });\n setServiceCreated(true);\n setCreateRequestLoading(false);\n navigate(-1);\n getAccessToken({ cacheMode: 'off' });\n },\n onError: ({ body }) => {\n setCreateRequestLoading(false);\n if (body.errorCode === 'website_already_exists') {\n notify(ERRORS.websiteExists, { type: 'error' }, { autoHideDuration: 5000 });\n } else {\n notify(body.message || ERRORS.default, { type: 'error' }, { autoHideDuration: 5000 });\n }\n navigate(-1);\n setServiceCreated(false);\n },\n },\n });\n\n const goToCreateServiceStep = (data) => {\n setOrganizationData(data);\n navigate('service');\n };\n\n const onClose = () => {\n if (isServiceCreated === true) {\n redirect('list', 'services');\n } else {\n navigate(-1);\n setOrganizationData(null);\n setServiceCreated(false);\n }\n };\n\n const onCreate = async (serviceData) => {\n setCreateRequestLoading(true);\n const organization = {\n ...organizationData,\n profile: {\n ...(organizationData?.profile || {}),\n website: formatWebSiteUrl(organizationData?.profile?.website),\n linkedInProfile: formatWebSiteUrl(organizationData?.profile?.linkedInProfile),\n registrationNumbers: formatRegistrationNumbers(\n organizationData?.profile?.registrationNumbers,\n ),\n commercialEntities: organizationData?.profile?.commercialEntities\n ?.filter((brand) => brand.logo)\n ?.map((commercial) => ({\n ...commercial,\n type: 'Brand',\n })),\n },\n };\n await save({\n ...organization,\n serviceEndpoints: serviceData\n ? [\n {\n id: `${did}#${kebabCase(serviceData.type)}-1`,\n ...serviceData,\n },\n ]\n : [],\n });\n };\n\n if (isLoading || isUserDataLoading) {\n return <Loading sx={{ pt: '60px' }} />;\n }\n return (\n <Box sx={sx.root}>\n <Stack sx={sx.content}>\n {MockOrganization && <MockOrganization setInitialRecord={setInitialRecord} />}\n\n <OrganizationCreateTitle />\n\n <Form record={initialRecord} onSubmit={goToCreateServiceStep} noValidate mode=\"onTouched\">\n <FormDataConsumer>\n {({ formData }) => (\n <>\n <Grid container spacing={4} rowSpacing={1}>\n <Grid size={{ xs: 6 }}>\n <Stack container flex={1} flexDirection=\"column\">\n <Grid size={{ xs: 12 }}>\n <Stack flexDirection=\"row\" gap={1.75}>\n <TextInput\n fullWidth\n label=\"Legal Name\"\n source=\"profile.name\"\n validate={validateName}\n />\n </Stack>\n </Grid>\n <Grid size={{ xs: 12 }}>\n <Stack flexDirection=\"row\" gap={1.75}>\n <TextInput\n fullWidth\n label=\"Website\"\n source=\"profile.website\"\n validate={[...validateWebsiteStrict, required()]}\n />\n <Box mt={2}>\n <Tooltip title={WEBSITE_HINT}>\n <InfoIcon color=\"info\" fontSize=\"small\" cursor=\"pointer\" />\n </Tooltip>\n </Box>\n </Stack>\n </Grid>\n <Grid size={{ xs: 12 }}>\n <TextInput\n fullWidth\n label=\"Address\"\n source=\"profile.physicalAddress.line1\"\n validate={[required(), maxLength(1024)]}\n />\n </Grid>\n <Grid size={{ xs: 12 }}>\n <AutocompleteInput\n label=\"Country\"\n source=\"profile.location.countryCode\"\n choices={countryCodes}\n validate={required()}\n />\n </Grid>\n </Stack>\n </Grid>\n <Grid size={{ xs: 6 }} pb={1}>\n <CustomImageInput label={false} editMode addTo=\"profile\" />\n </Grid>\n <Grid size={{ xs: 6 }}>\n <TextInput\n fullWidth\n label=\"LinkedIn Page\"\n source=\"profile.linkedInProfile\"\n validate={[...validateWebsite, required()]}\n />\n </Grid>\n <Grid size={{ xs: 6 }}>\n <LinkedInRegistrationInput\n formData={formData.profile}\n source=\"profile.registrationNumbers\"\n />\n </Grid>\n <Grid size={{ xs: 6 }}>\n <Stack flexDirection=\"row\" gap={1.75}>\n <TextInput\n fullWidth\n label=\"Support Email\"\n source=\"profile.contactEmail\"\n validate={validateEmail}\n />\n <Box mt={2}>\n <Tooltip title={SUPPORT_EMAIL_HINT}>\n <InfoIcon color=\"info\" fontSize=\"small\" cursor=\"pointer\" />\n </Tooltip>\n </Box>\n </Stack>\n </Grid>\n <Grid size={{ xs: 6 }}>\n <Stack flexDirection=\"row\" gap={1.75}>\n <TextInput\n fullWidth\n label=\"Technical Contact Email\"\n source=\"profile.technicalEmail\"\n validate={validateEmail}\n />\n <Box mt={2}>\n <Tooltip title={TECHNICAL_EMAIL_HINT}>\n <InfoIcon color=\"info\" fontSize=\"small\" cursor=\"pointer\" />\n </Tooltip>\n </Box>\n </Stack>\n </Grid>\n <AuthorityRegistrationNumbersInput\n source=\"profile.registrationNumbers\"\n orientation=\"horizontal\"\n />\n <Grid size={{ xs: 12 }}>\n <TextInput\n fullWidth\n multiline\n label=\"Short Description\"\n placeholder={organizationPlaceholder}\n source=\"profile.description\"\n validate={required()}\n />\n </Grid>\n <Grid size={{ xs: 12 }}>\n <Typography variant=\"h5\">Key individuals</Typography>\n </Grid>\n <Grid size={{ xs: 6 }}>\n <Stack flexDirection=\"row\" gap={1.75}>\n <Typography variant=\"body1\" my={2} sx={sx.sectionTitle}>\n Administrator’s Details\n </Typography>\n <Box mt={2}>\n <Tooltip title={ADMINISTRATOR_DETAILS_HINT}>\n <InfoIcon color=\"info\" fontSize=\"small\" cursor=\"pointer\" />\n </Tooltip>\n </Box>\n </Stack>\n </Grid>\n <Grid size={{ xs: 6 }}>\n <Stack flexDirection=\"row\" gap={1.75}>\n <Typography variant=\"body1\" my={2} sx={sx.sectionTitle}>\n Signatory Authority’s Details\n </Typography>\n <Box mt={2}>\n <Tooltip title={SIGNATORY_DETAILS_HINT}>\n <InfoIcon color=\"info\" fontSize=\"small\" cursor=\"pointer\" />\n </Tooltip>\n </Box>\n </Stack>\n </Grid>\n <Grid size={{ xs: 6 }}>\n <Stack flexDirection=\"row\" gap={1.75}>\n <TextInput\n fullWidth\n label=\"First name\"\n source=\"profile.adminGivenName\"\n validate={[maxLength(1024), required()]}\n defaultValue={userData ? userData.givenName : ''}\n />\n </Stack>\n <Stack flexDirection=\"row\" gap={1.75}>\n <TextInput\n fullWidth\n label=\"Last name\"\n source=\"profile.adminFamilyName\"\n validate={[maxLength(1024), required()]}\n defaultValue={userData ? userData.familyName : ''}\n />\n </Stack>\n </Grid>\n <Grid size={{ xs: 6 }}>\n <Stack flexDirection=\"row\" gap={1.75}>\n <TextInput\n fullWidth\n label=\"First name\"\n source=\"profile.signatoryGivenName\"\n validate={[maxLength(1024), required()]}\n />\n </Stack>\n <Stack flexDirection=\"row\" gap={1.75}>\n <TextInput\n fullWidth\n label=\"Last name\"\n source=\"profile.signatoryFamilyName\"\n validate={[maxLength(1024), required()]}\n />\n </Stack>\n </Grid>\n <Grid size={{ xs: 6 }}>\n <Stack flexDirection=\"row\" gap={1.75}>\n <TextInput\n fullWidth\n label=\"Job Title\"\n source=\"profile.adminTitle\"\n validate={[maxLength(1024), required()]}\n />\n </Stack>\n </Grid>\n <Grid size={{ xs: 6 }}>\n <Stack flexDirection=\"row\" gap={1.75}>\n <TextInput\n fullWidth\n label=\"Job Title\"\n source=\"profile.signatoryTitle\"\n validate={[maxLength(1024), required()]}\n />\n </Stack>\n </Grid>\n <Grid size={{ xs: 6 }}>\n <Stack flexDirection=\"row\" gap={1.75}>\n <TextInput\n fullWidth\n label=\"Email\"\n source=\"profile.adminEmail\"\n validate={validateEmail}\n defaultValue={userData ? userData.email : ''}\n />\n </Stack>\n </Grid>\n <Grid size={{ xs: 6 }}>\n <Stack flexDirection=\"row\" gap={1.75}>\n <TextInput\n fullWidth\n label=\"Email\"\n source=\"profile.signatoryEmail\"\n validate={validateEmail}\n />\n <Box mt={2}>\n <Tooltip title={SIGNATORY_EMAIL_HINT}>\n <InfoIcon color=\"info\" fontSize=\"small\" cursor=\"pointer\" />\n </Tooltip>\n </Box>\n </Stack>\n </Grid>\n <Grid size={{ xs: 12 }}>\n <Typography variant=\"h4\" mb={2} mt={4}>\n Commercial Names\n </Typography>\n </Grid>\n <Grid size={{ xs: 12 }}>\n <ArrayInput\n source=\"profile.commercialEntities\"\n defaultValue={defaultBrandValue}\n sx={{ '& .RaArrayInput-label': { display: 'none' } }}\n >\n <SimpleFormIterator\n addButton={\n <PlusButtonBlock\n style={sx.plusButtonBlock}\n disabled={!allBrandsFilled(formData.profile.commercialEntities)}\n position={formData.profile?.commercialEntities?.length}\n />\n }\n disableAdd={isAddBrandDisabled(formData.profile.commercialEntities)}\n fullWidth\n sx={sx.brandList}\n >\n <FormDataConsumer>\n {({ scopedFormData }) => {\n return (\n <OrganizationBrand\n formData={formData}\n scopedFormData={scopedFormData}\n />\n );\n }}\n </FormDataConsumer>\n </SimpleFormIterator>\n </ArrayInput>\n </Grid>\n </Grid>\n <Box display=\"flex\" justifyContent=\"center\" pt={4}>\n <Button\n variant=\"outlined\"\n color=\"secondary\"\n size=\"large\"\n sx={sx.cancelButton}\n onClick={() => (hasOrganisations ? navigate('/') : logout())}\n >\n Cancel\n </Button>\n <OrganizationSubmitButton />\n </Box>\n <CreateServiceComponent\n isModalOpened={/create\\/service/.test(location.pathname) || isServiceCreated}\n isSending={isCreateRequestLoading}\n onClose={onClose}\n onCreate={onCreate}\n isCreated={isServiceCreated}\n secretKeys={secretKeys}\n did={did}\n selectedServiceType={serviceType}\n setSelectedServiceType={setServiceType}\n selectedCAO={selectedCAO}\n setSelectedCAO={setSelectedCAO}\n />\n </>\n )}\n </FormDataConsumer>\n </Form>\n </Stack>\n </Box>\n );\n};\n\n// eslint-disable-next-line better-mutation/no-mutation\nOrganizationCreate.propTypes = {\n CreateServiceComponent: PropTypes.elementType,\n MockOrganization: PropTypes.elementType,\n};\n\nexport default OrganizationCreate;\n\nconst sx = {\n root: {\n pt: 7.5,\n pb: 2,\n pl: 1,\n boxSizing: 'border-box',\n display: 'flex',\n justifyContent: 'center',\n },\n content: {\n maxWidth: 886,\n alignItems: 'center',\n },\n cancelButton: {\n minWidth: 160,\n mr: 2,\n },\n mockButton: {\n color: 'primary.main',\n },\n formValidationCustomMessage: { color: 'primary.main' },\n brandList: {\n display: 'flex',\n flexWrap: 'wrap',\n px: '0.5rem',\n gap: '2rem',\n justifyContent: 'space-between',\n '& .RaSimpleFormIterator-action': { display: 'none' },\n '& .RaSimpleFormIterator-buttons': { width: '48%' },\n '& .RaSimpleFormIterator-add': { width: '100%' },\n '& .RaSimpleFormIterator-clear': { display: 'none' },\n '& .RaSimpleFormIterator-list': {\n display: 'flex',\n flexWrap: 'wrap',\n justifyContent: 'space-between',\n gap: '2rem',\n flexGrow: '2',\n width: '100%',\n '&:has(li:only-child)': { width: '48%' },\n },\n '& .RaSimpleFormIterator-line': {\n width: '48%',\n '&:only-child': { width: '100%' },\n },\n '& .RaSimpleFormIterator-form': {\n width: '100%',\n },\n },\n brandLogoContainer: { width: '100%' },\n brandLogo: { minHeight: '272px' },\n plusButtonBlock: { height: '23.9rem' },\n sectionTitle: {\n fontSize: '14px',\n textTransform: 'uppercase',\n },\n errorMessage: {\n fontSize: '0.75rem',\n color: 'primary.main',\n marginLeft: '1.25em',\n height: '1.75em',\n },\n fullWidth: {\n width: '100%',\n },\n};\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 {\n AutocompleteInput,\n email,\n Form,\n Edit,\n required,\n useEditController,\n SaveButton,\n FormDataConsumer,\n ArrayInput,\n SimpleFormIterator,\n TextInput,\n} from 'react-admin';\nimport { useParams } from 'react-router';\nimport { Box, Grid, Stack, Tooltip, Typography } from '@mui/material';\nimport InfoIcon from '@mui/icons-material/Info';\nimport { useState } from 'react';\nimport {\n validateWebsite,\n validateWebsiteStrict,\n} from '../../components/organizations/CreateOrganizationUtils.js';\nimport Loading from '../../components/Loading.jsx';\nimport {\n ERRORS,\n formatWebSiteUrl,\n formatRegistrationNumbers,\n SUPPORT_EMAIL_HINT,\n TECHNICAL_EMAIL_HINT,\n WEBSITE_HINT_SHORT,\n} from '../../utils/index.jsx';\nimport useCountryCodes from '../../utils/countryCodes.js';\nimport CustomImageInput from '../../components/common/CustomImageInput/index.jsx';\nimport { defaultBrandValue, allBrandsFilled, isAddBrandDisabled } from './OrganizationCreate.jsx';\nimport PlusButtonBlock from '../../components/common/PlusButtonBlock.jsx';\nimport { OrganizationBrand } from './components/OrganizationBrand.jsx';\nimport AuthorityRegistrationNumbersInput from './components/AuthorityRegistrationInput.jsx';\nimport { LinkedInRegistrationInput } from './components/LinkedInRegistrationInput.jsx';\n\nconst validateEmail = [required(), email()];\n\nconst transform = (data) => ({\n ...data,\n profile: {\n ...data.profile,\n website: formatWebSiteUrl(data.profile.website),\n linkedInProfile: formatWebSiteUrl(data.profile.linkedInProfile),\n registrationNumbers: formatRegistrationNumbers(data.profile?.registrationNumbers),\n commercialEntities: data.profile.commercialEntities\n .filter((brand) => brand.logo)\n .map((brand) => ({\n ...brand,\n type: 'Brand',\n })),\n },\n});\n\nconst modifyRecord = (record) => ({\n ...record,\n profile: {\n ...record.profile,\n commercialEntities: record.profile?.commercialEntities?.length\n ? record.profile.commercialEntities\n : defaultBrandValue,\n },\n});\n\nconst OrganizationEdit = () => {\n const { id } = useParams();\n const { data: countryCodes, isLoading: isCodesLoading } = useCountryCodes();\n const [errorMessage, setErrorMessage] = useState('');\n const { record, isLoading } = useEditController({\n resource: 'organizations',\n id,\n });\n\n const onError = ({ body }) => {\n if (body.errorCode === 'webhook_not_protocol_compliant') {\n setErrorMessage(ERRORS.secureWebHook);\n } else {\n setErrorMessage(ERRORS.default);\n }\n };\n\n if (isLoading || isCodesLoading) return <Loading sx={{ pt: '60px' }} />;\n\n return (\n <Stack pt={5} pb={10} pr={8} pl={9}>\n <Typography variant=\"h3\" mb={4}>\n Edit profile\n </Typography>\n <Edit\n mutationMode=\"pessimistic\"\n mutationOptions={{ onError }}\n actions={false}\n sx={sx.formContainer}\n transform={(data) => transform(data)}\n >\n <Form record={modifyRecord(record)} mode=\"onTouched\">\n <FormDataConsumer>\n {/* eslint-disable-next-line complexity */}\n {({ formData }) => (\n <>\n <Grid container spacing={5} rowSpacing={1.25}>\n <Grid size={{ xs: 6 }}>\n <Stack container flex={1} flexDirection=\"column\">\n <Grid size={{ xs: 12 }}>\n <TextInput\n fullWidth\n source=\"profile.name\"\n label=\"Legal Name\"\n validate={required()}\n readOnly\n />\n </Grid>\n <Grid size={{ xs: 12 }}>\n <Stack flexDirection=\"row\" gap={1.75}>\n <TextInput\n fullWidth\n label=\"Website\"\n source=\"profile.website\"\n validate={[...validateWebsiteStrict, required()]}\n disabled\n />\n <Box mt={2}>\n <Tooltip title={WEBSITE_HINT_SHORT}>\n <InfoIcon color=\"info\" fontSize=\"small\" cursor=\"pointer\" />\n </Tooltip>\n </Box>\n </Stack>\n </Grid>\n <Grid size={{ xs: 12 }}>\n <TextInput\n fullWidth\n label=\"Address\"\n source=\"profile.physicalAddress.line1\"\n validate={required()}\n />\n </Grid>\n <Grid size={{ xs: 12 }}>\n <AutocompleteInput\n fullWidth\n label=\"Country\"\n source=\"profile.location.countryCode\"\n validate={required()}\n choices={countryCodes}\n />\n </Grid>\n </Stack>\n </Grid>\n <Grid size={{ xs: 6 }} p={1}>\n <CustomImageInput\n label={false}\n source=\"profile.url\"\n editMode={false}\n imgSrc={formData.profile?.logo}\n addTo=\"profile\"\n />\n </Grid>\n <Grid size={{ xs: 6 }}>\n <Stack flexDirection=\"row\" gap={1.75}>\n <TextInput\n fullWidth\n label=\"LinkedIn Page\"\n source=\"profile.linkedInProfile\"\n validate={[...validateWebsite, required()]}\n />\n </Stack>\n </Grid>\n <Grid size={{ xs: 6 }}>\n <LinkedInRegistrationInput\n formData={{ ...record, ...formData.profile }}\n source=\"profile.registrationNumbers\"\n />\n </Grid>\n <Grid size={{ xs: 6 }}>\n <Stack flexDirection=\"row\" gap={1.75}>\n <TextInput\n fullWidth\n label=\"Support Email\"\n source=\"profile.contactEmail\"\n validate={validateEmail}\n />\n <Box mt={2}>\n <Tooltip title={SUPPORT_EMAIL_HINT}>\n <InfoIcon color=\"info\" fontSize=\"small\" cursor=\"pointer\" />\n </Tooltip>\n </Box>\n </Stack>\n </Grid>\n <Grid size={{ xs: 6 }}>\n <Stack flexDirection=\"row\" gap={1.75}>\n <TextInput\n fullWidth\n label=\"Technical Contact Email\"\n source=\"profile.technicalEmail\"\n validate={validateEmail}\n />\n <Box mt={2}>\n <Tooltip title={TECHNICAL_EMAIL_HINT}>\n <InfoIcon color=\"info\" fontSize=\"small\" cursor=\"pointer\" />\n </Tooltip>\n </Box>\n </Stack>\n </Grid>\n <AuthorityRegistrationNumbersInput\n source=\"profile.registrationNumbers\"\n orientation=\"horizontal\"\n />\n <Grid size={{ xs: 12 }}>\n <TextInput fullWidth disabled label=\"DID\" source=\"id\" />\n </Grid>\n {formData.didDoc?.alsoKnownAs && (\n <Grid size={{ xs: 12 }}>\n <TextInput\n fullWidth\n multiline\n disabled\n sx={sx.textArea}\n label=\"Also Known As\"\n source=\"didDoc.alsoKnownAs\"\n format={(value) => (Array.isArray(value) ? value.join('\\n') : value)}\n />\n </Grid>\n )}\n <Grid size={{ xs: 12 }}>\n <TextInput\n fullWidth\n multiline\n label=\"Short Description\"\n source=\"profile.description\"\n validate={required()}\n sx={sx.description}\n />\n </Grid>\n <Grid size={{ xs: 12 }}>\n <Typography variant=\"h4\" mb={2} mt={4}>\n Commercial Names\n </Typography>\n </Grid>\n <Grid size={{ xs: 12 }}>\n <ArrayInput\n source=\"profile.commercialEntities\"\n defaultValue={defaultBrandValue}\n sx={{ '& .RaArrayInput-label': { display: 'none' } }}\n >\n <SimpleFormIterator\n addButton={\n <PlusButtonBlock\n style={sx.plusButtonBlock}\n disabled={\n !allBrandsFilled([\n ...(record.profile.commercialEntities || []),\n ...(formData.profile.commercialEntities || []),\n ])\n }\n position={formData.profile?.commercialEntities?.length}\n />\n }\n disableAdd={isAddBrandDisabled([\n ...(record.profile.commercialEntities || []),\n ...(formData.profile.commercialEntities || []),\n ])}\n fullWidth\n sx={sx.brandList}\n >\n <FormDataConsumer>\n {({ scopedFormData }) => {\n return (\n <OrganizationBrand\n formData={formData}\n scopedFormData={scopedFormData}\n />\n );\n }}\n </FormDataConsumer>\n </SimpleFormIterator>\n </ArrayInput>\n </Grid>\n </Grid>\n <SaveButton\n icon={null}\n variant=\"outlined\"\n color=\"primary\"\n type=\"submit\"\n sx={{ mt: 3 }}\n label=\"Update profile\"\n />\n <Grid size={{ xs: 12 }}>\n <Stack flexDirection=\"row\" mt={2}>\n <Typography variant=\"subtitle2\" sx={{ color: 'primary.main' }}>\n {errorMessage}\n </Typography>\n </Stack>\n </Grid>\n </>\n )}\n </FormDataConsumer>\n </Form>\n </Edit>\n </Stack>\n );\n};\n\nexport default OrganizationEdit;\n\nconst sx = {\n formContainer: {\n '& .RaEdit-card': { boxShadow: 'none', paddingTop: '0.5em' },\n '& .RaEdit-noActions': { marginTop: 0 },\n },\n brandList: {\n display: 'flex',\n flexWrap: 'wrap',\n gap: '2rem',\n px: '0.5em',\n justifyContent: 'space-between',\n '& .RaSimpleFormIterator-action': { display: 'none' },\n '& .RaSimpleFormIterator-buttons': { width: '48%' },\n '& .RaSimpleFormIterator-add': { width: '100%' },\n '& .RaSimpleFormIterator-clear': { display: 'none' },\n '& .RaSimpleFormIterator-list': {\n display: 'flex',\n flexWrap: 'wrap',\n justifyContent: 'space-between',\n gap: '2rem',\n flexGrow: '2',\n width: '100%',\n '&:has(li:only-child)': { width: '48%' },\n },\n '& .RaSimpleFormIterator-line': {\n width: '48%',\n '&:only-child': { width: '100%' },\n },\n '& .RaSimpleFormIterator-form': {\n width: '100%',\n },\n '& .MuiBox-root fieldset': {\n height: 'calc(24.5rem - 75px) !important',\n },\n },\n brandLogoContainer: { width: '100%' },\n brandLogo: { minHeight: '272px' },\n plusButtonBlock: { height: '25rem' },\n errorMessage: {\n fontSize: '0.75rem',\n color: 'primary.main',\n marginLeft: '1.25em',\n height: '1.75em',\n },\n fullWidth: {\n width: '100%',\n },\n textArea: { '& textarea': { padding: '0' } },\n description: { '& textarea': { paddingLeft: '0', paddingRight: '0' } },\n};\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 React, { useEffect } from 'react';\nimport { Box, Button, Divider, Paper, Stack, Typography, Grid } from '@mui/material';\nimport PropTypes from 'prop-types';\nimport EditIcon from '@mui/icons-material/Edit';\nimport { useParams, useNavigate } from 'react-router';\nimport { useGetOne, useRedirect } from 'react-admin';\nimport {\n copyTextToClipboard,\n WEBSITE_HINT_SHORT,\n DID_HINT,\n LINKEDIN_ORGANIZATION_ID,\n SUPPORT_EMAIL_HINT,\n TECHNICAL_EMAIL_HINT,\n DUNS_HINT,\n LEI_HINT,\n NATIONAL_AUTHORITY_HINT,\n ALSO_KNOWN_AS_HINT,\n} from '@/utils/index.jsx';\nimport Loading from '@/components/Loading.jsx';\nimport OrganizationAvatar from '@/components/common/OrganizationAvatar.jsx';\nimport useCountryCodes from '@/utils/countryCodes.js';\nimport useSelectedOrganization from '@/state/selectedOrganizationState.js';\nimport { AuthoritiesList, Authorities, authorityOptions } from '@/constants/messageCodes.js';\nimport DataItem from '@/components/common/DataItem.jsx';\nimport { useAuth } from '@/utils/auth/AuthContext.js';\n\n// eslint-disable-next-line complexity\nconst OrganizationShow = () => {\n const [savedDid, setDid] = useSelectedOrganization();\n const { id } = useParams();\n const { getCountryNameByCode } = useCountryCodes();\n const redirect = useRedirect();\n const { data: record, isLoading } = useGetOne(\n 'organizations',\n { id },\n {\n onError: () => {\n setDid('');\n redirect('/');\n },\n },\n );\n\n const navigate = useNavigate();\n\n useEffect(() => {\n if (id !== savedDid) {\n navigate(`/organizations/${savedDid}/show`, { replace: true });\n }\n }, [id, savedDid, navigate]);\n\n const { getAccessToken } = useAuth();\n const [token, setToken] = React.useState('');\n const [isCopied, setIsCopied] = React.useState(false);\n\n React.useEffect(() => {\n const getToken = async () => {\n try {\n const accessToken = await getAccessToken();\n setToken(accessToken);\n } catch (e) {\n // eslint-disable-next-line no-console\n console.log(e.message);\n }\n };\n getToken();\n }, [getAccessToken]);\n\n const handleCopyClick = () => {\n copyTextToClipboard(token, (err) => {\n setIsCopied(!err);\n });\n };\n\n if (!token || isLoading) {\n return (\n <Box pt={5} pb={10} pr={8} pl={9}>\n <Loading />\n </Box>\n );\n }\n\n return (\n <Box pt={5} pb={10} pr={8} pl={9}>\n <Stack mb={3.75} direction=\"row\" alignItems=\"center\" justifyContent=\"space-between\">\n <Typography variant=\"h3\">Organization profile</Typography>\n <Button\n variant=\"outlined\"\n onClick={() => redirect('edit', 'organizations', id)}\n startIcon={<EditIcon />}\n >\n Edit Profile\n </Button>\n </Stack>\n <Paper elevation={2} sx={{ p: 6 }}>\n <Grid container spacing={4}>\n <Grid size={{ xs: 4 }}>\n <Box display=\"flex\" alignItems=\"flex-start\" mb={5}>\n <OrganizationAvatar name={record.profile.name} logo={record.profile.logo} size={66} />\n </Box>\n <Typography component=\"div\" mb={1.5} variant=\"h4\" sx={[sx.value, sx.header]}>\n {record.profile.name}\n </Typography>\n <Typography component=\"div\" mb={1.5} variant=\"pm\">\n {getCountryNameByCode(record.profile.location.countryCode)}\n </Typography>\n </Grid>\n <Grid size={{ xs: 8 }}>\n <Grid sx={sx.dataRow} container spacing={4}>\n <Grid size={{ xs: 6 }}>\n <DataItem title=\"Legal Name\" value={record.profile.name} sxValue={sx.value} />\n </Grid>\n <Grid size={{ xs: 6 }}>\n <DataItem\n title=\"Website\"\n value={record.profile.website}\n sxValue={sx.value}\n hint={WEBSITE_HINT_SHORT}\n />\n </Grid>\n <Grid size={{ xs: 6 }}>\n <DataItem\n title=\"Address\"\n value={record.profile.physicalAddress?.line1}\n sxValue={sx.value}\n />\n </Grid>\n <Grid size={{ xs: 6 }}>\n <DataItem\n title=\"Country\"\n value={getCountryNameByCode(record.profile.location.countryCode)}\n sxValue={sx.value}\n />\n </Grid>\n <Grid size={{ xs: 6 }}>\n <DataItem\n title=\"LinkedIn Page\"\n value={record.profile.linkedInProfile}\n sxValue={sx.value}\n />\n </Grid>\n <Grid size={{ xs: 6 }}>\n <DataItemRegistrationNumbers\n hint={LINKEDIN_ORGANIZATION_ID}\n title=\"LinkedIn Company Page ID\"\n record={record}\n type=\"number\"\n fieldType=\"LinkedIn\"\n />\n </Grid>\n <Grid size={{ xs: 6 }}>\n <DataItem\n title=\"Support Email\"\n value={record.profile.contactEmail}\n sxValue={sx.value}\n hint={SUPPORT_EMAIL_HINT}\n />\n </Grid>\n <Grid size={{ xs: 6 }}>\n <DataItem\n title=\"Technical Contact Email\"\n value={record.profile.technicalEmail}\n sxValue={sx.value}\n hint={TECHNICAL_EMAIL_HINT}\n />\n </Grid>\n <Grid size={{ xs: 6 }}>\n <DataItemRegistrationNumbers\n hint={DUNS_HINT}\n title={authorityOptions[Authorities.DunnAndBradstreet]}\n type=\"number\"\n record={record}\n fieldType={Authorities.DunnAndBradstreet}\n />\n </Grid>\n <Grid size={{ xs: 6 }}>\n <DataItemRegistrationNumbers\n hint={LEI_HINT}\n title={authorityOptions[Authorities.GLEIF]}\n type=\"number\"\n record={record}\n fieldType={Authorities.GLEIF}\n />\n </Grid>\n <Grid size={{ xs: 6 }}>\n <DataItemRegistrationNumbers\n hint={NATIONAL_AUTHORITY_HINT}\n title={authorityOptions[Authorities.NationalAuthority]}\n type=\"number\"\n record={record}\n fieldType={Authorities.NationalAuthority}\n />\n </Grid>\n <Grid size={{ xs: 6 }}>\n <DataItemRegistrationNumbers\n hint=\"\"\n title=\"\"\n type=\"uri\"\n record={record}\n fieldType={Authorities.NationalAuthority}\n />\n </Grid>\n </Grid>\n <Grid size={{ xs: 12 }} sx={sx.dataRow}>\n <DataItem title=\"DID\" value={record.id} hint={DID_HINT} sxValue={sx.value} />\n </Grid>\n {record.didDoc?.alsoKnownAs && (\n <Grid size={{ xs: 12 }}>\n <DataItem\n title=\"Also known as\"\n value={record.didDoc.alsoKnownAs}\n hint={ALSO_KNOWN_AS_HINT}\n sxValue={sx.value}\n />\n </Grid>\n )}\n </Grid>\n </Grid>\n <Divider sx={{ my: 5 }} />\n <Box>\n <Typography component=\"div\" mb={1} variant=\"pm\">\n Short Description\n </Typography>\n <Typography component=\"p\" variant=\"pm\">\n {record.profile.description || '-'}\n </Typography>\n </Box>\n {!!record.profile?.commercialEntities?.length && (\n <>\n <Typography component=\"div\" mt={4} textTransform=\"uppercase\" variant=\"pm\">\n Commercial Names\n </Typography>\n <Divider sx={{ mt: 2, mb: 5 }} />\n <Grid container spacing={4}>\n {record.profile.commercialEntities.map((commercial) => (\n <Grid\n item\n size={{ xs: 4 }}\n key={commercial.logo}\n sx={sx.commercials}\n justifyContent=\"flex-start\"\n alignItems=\"center\"\n >\n <Box display=\"flex\">\n <OrganizationAvatar size={52} name={commercial.name} logo={commercial.logo} />\n </Box>\n <Typography>{commercial.name}</Typography>\n </Grid>\n ))}\n </Grid>\n </>\n )}\n <Divider sx={{ my: 5 }} />\n <Box mb={3}>\n <Typography component=\"div\" mb={1} textTransform=\"uppercase\" variant=\"pm\">\n Registrar Access Token\n </Typography>\n <Typography component=\"p\" variant=\"pm\" sx={sx.token}>\n {token}\n </Typography>\n </Box>\n <Button variant=\"outlined\" color=\"secondary\" size=\"small\" onClick={handleCopyClick}>\n {isCopied ? 'COPIED' : 'COPY'}\n </Button>\n </Paper>\n </Box>\n );\n};\n\nconst DataItemRegistrationNumbers = ({ fieldType, record, type, ...props }) => {\n const transformedValue =\n record?.profile?.registrationNumbers &&\n record?.profile?.registrationNumbers.find(({ authority }) => {\n return authority === fieldType;\n })?.[type];\n\n return <DataItem {...props} value={transformedValue} sxValue={sx.value} />;\n};\n\n// eslint-disable-next-line better-mutation/no-mutation\nDataItemRegistrationNumbers.propTypes = {\n // eslint-disable-next-line react/forbid-prop-types\n record: PropTypes.object.isRequired,\n title: PropTypes.string,\n hint: PropTypes.string,\n type: PropTypes.string,\n fieldType: PropTypes.oneOf(AuthoritiesList).isRequired,\n};\n\nconst sx = {\n avatar: {\n width: '66px',\n height: '66px',\n bgcolor: 'primary.main',\n border: '6px solid white',\n },\n avatarBorder: {\n mb: 5,\n display: 'flex',\n borderRadius: '50%',\n border: (theme) => `1px solid ${theme.palette.divider.main}`,\n },\n token: {\n color: 'text.secondary',\n wordBreak: 'break-all',\n },\n dataRow: {\n mb: 4,\n },\n value: {\n wordBreak: 'break-word',\n fontWeight: 600,\n },\n commercials: { display: 'flex', gap: '1em' },\n title: { height: '1em' },\n header: {\n fontSize: '1.25rem',\n marginBottom: '.75rem',\n },\n};\n\nexport default OrganizationShow;\n"],"names":["sx","required","maxLength","validateEmail","ServiceCreateFormContainer","AuthorityRegistrationNumbersInput","Button"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,MAAM,yBAAyB,CAAC;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,CAAC,cAAc,eAAe,IAAI,SAAS,CAAC;AAClD,QAAM,CAAC,mBAAmB,oBAAoB,IAAI,SAAS,KAAK;AAChE,QAAM,CAAC,yBAAyB,0BAA0B,IAAI,SAAS,KAAK;AAE5E,QAAM,YAAY,QAAQ,MAAM;AAC9B,QAAI,qBAAqB;AACvB,YAAM,OAAO,oBAAoB,GAAG,MAAM,MAAM;AACh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AA;AAAA,EAEb,SAAS;AAAA,IACP,IAAI;AAAA,EAAA;AAAA,EAEN,OAAO;AAAA,IACL,WAAW;AAAA,IACX,YAAY;AAAA,EAAA;AAAA,EAEd,aAAa,EAAE,SAAS,QAAQ,KAAK,MAAA;AAAA,EAErC,QAAQ;AAAA,IACN,UAAU;AAAA,IACV,cAAc;AAAA,EAAA;AAElB;"}
|
package/dist/pages/services.cjs
CHANGED
|
@@ -2,25 +2,29 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const React = require("react");
|
|
5
|
-
const lodashEs = require("lodash-es");
|
|
6
5
|
const reactAdmin = require("react-admin");
|
|
7
6
|
const reactRouter = require("react-router");
|
|
8
7
|
const PropTypes = require("prop-types");
|
|
9
8
|
const Popup = require("../chunks/Popup.H_MqnNtr.js");
|
|
10
|
-
const serviceTypes = require("../chunks/serviceTypes.D7c4G5GY.js");
|
|
11
9
|
const remoteDataProvider = require("../chunks/remoteDataProvider.BCiFSYnk.js");
|
|
12
|
-
const invitations = require("../chunks/invitations.BI_Qo5Ca.js");
|
|
13
10
|
const selectedOrganizationState = require("../chunks/selectedOrganizationState.BR4G8K3M.js");
|
|
14
|
-
const
|
|
15
|
-
const index = require("../chunks/index.
|
|
16
|
-
const index$1 = require("../chunks/index.
|
|
11
|
+
const HolderWalletSelection = require("../chunks/HolderWalletSelection.BvPFTrTh.js");
|
|
12
|
+
const index = require("../chunks/index.DmF-wFBs.js");
|
|
13
|
+
const index$1 = require("../chunks/index.DTlm8AhC.js");
|
|
17
14
|
const material = require("@mui/material");
|
|
18
15
|
const EditIcon = require("@mui/icons-material/Edit");
|
|
19
16
|
const DeleteIcon = require("@mui/icons-material/Delete");
|
|
17
|
+
const lodashEs = require("lodash-es");
|
|
20
18
|
const ListItem = require("../chunks/ListItem.Auy7hQ9Z.js");
|
|
21
19
|
const Loading = require("../chunks/Loading.cGHE59CV.js");
|
|
22
|
-
const ServicesEdit = require("../chunks/ServicesEdit.
|
|
20
|
+
const ServicesEdit = require("../chunks/ServicesEdit.CrmS66vz.js");
|
|
23
21
|
const participantAgreementState = require("../chunks/participantAgreementState.DwmEQmuZ.js");
|
|
22
|
+
const serviceTypes = require("../chunks/serviceTypes.BWVBK33e.js");
|
|
23
|
+
const buildServiceContent = (item, title) => {
|
|
24
|
+
if (!item) return [];
|
|
25
|
+
const value = Array.isArray(item) ? item.join(", ") : item;
|
|
26
|
+
return [{ name: title, value }];
|
|
27
|
+
};
|
|
24
28
|
const defaultAuthClient = { clientSecret: "", clientId: "" };
|
|
25
29
|
const ServiceCreateForm = ({ onServiceCreated, services, InterceptOnCreate }) => {
|
|
26
30
|
const { pathname } = reactRouter.useLocation();
|
|
@@ -44,7 +48,7 @@ const ServiceCreateForm = ({ onServiceCreated, services, InterceptOnCreate }) =>
|
|
|
44
48
|
const [createServiceInProgress, setCreateServiceInProgress] = React.useState(false);
|
|
45
49
|
const [isInterceptOnCreateOpen, setIsInterceptOnCreateOpen] = React.useState(false);
|
|
46
50
|
const [isKeysPopupOpened, setIsKeysPopupOpened] = React.useState(false);
|
|
47
|
-
const { isIssuingOrInspection, isCAO } =
|
|
51
|
+
const { isIssuingOrInspection, isCAO } = HolderWalletSelection.useIsIssuingInspection(selectedServiceType);
|
|
48
52
|
const onClose = React.useCallback(() => {
|
|
49
53
|
navigate(-1);
|
|
50
54
|
}, [navigate]);
|
|
@@ -65,10 +69,9 @@ const ServiceCreateForm = ({ onServiceCreated, services, InterceptOnCreate }) =>
|
|
|
65
69
|
setIsInterceptOnCreateOpen(true);
|
|
66
70
|
}
|
|
67
71
|
}, [InterceptOnCreate, serviceId]);
|
|
68
|
-
const onCreateService = async (
|
|
72
|
+
const onCreateService = async (service) => {
|
|
69
73
|
const type = selectedServiceType.id.match(/.+v1/);
|
|
70
|
-
const
|
|
71
|
-
const id = `${did}#${kebabType}-${invitations.getNewServiceIndex(services, kebabType)}`;
|
|
74
|
+
const payload = index.buildPayload(service, type[0], did, services);
|
|
72
75
|
try {
|
|
73
76
|
setCreateServiceInProgress(true);
|
|
74
77
|
const result = await createService(
|
|
@@ -76,12 +79,7 @@ const ServiceCreateForm = ({ onServiceCreated, services, InterceptOnCreate }) =>
|
|
|
76
79
|
{
|
|
77
80
|
data: {
|
|
78
81
|
organizationId: did,
|
|
79
|
-
payload
|
|
80
|
-
id,
|
|
81
|
-
serviceEndpoint,
|
|
82
|
-
type: type[0],
|
|
83
|
-
credentialTypes: serviceTypes.credentialTypesByServiceTypes[selectedServiceType.id]
|
|
84
|
-
}
|
|
82
|
+
payload
|
|
85
83
|
}
|
|
86
84
|
},
|
|
87
85
|
{ returnPromise: true }
|
|
@@ -91,7 +89,7 @@ const ServiceCreateForm = ({ onServiceCreated, services, InterceptOnCreate }) =>
|
|
|
91
89
|
if (result.authClient) {
|
|
92
90
|
setAuthClient(result.authClient);
|
|
93
91
|
} else {
|
|
94
|
-
setSelectedCAO(serviceEndpoint.split("#")[0]);
|
|
92
|
+
setSelectedCAO(service.serviceEndpoint.split("#")[0]);
|
|
95
93
|
}
|
|
96
94
|
onServiceCreated();
|
|
97
95
|
} catch (e) {
|
|
@@ -121,7 +119,7 @@ const ServiceCreateForm = ({ onServiceCreated, services, InterceptOnCreate }) =>
|
|
|
121
119
|
index.ServiceEndpointSelection,
|
|
122
120
|
{
|
|
123
121
|
credentialAgentOperators,
|
|
124
|
-
|
|
122
|
+
selectedServiceType,
|
|
125
123
|
inProgress: createServiceInProgress,
|
|
126
124
|
onCreate: onCreateService,
|
|
127
125
|
handleBack: () => setSelectedStep(1)
|
|
@@ -232,7 +230,7 @@ const ServicesList = ({
|
|
|
232
230
|
refetch: refetchOrganizationServices
|
|
233
231
|
} = reactAdmin.useGetOne("organizations", { id: did }, { enabled: !!did });
|
|
234
232
|
const { handleServiceDeleteConfirm, isDeletingService, serviceToDelete, setServiceToDelete } = useDeleteService(refetchOrganizationServices);
|
|
235
|
-
const services = React.useMemo(() => data?.
|
|
233
|
+
const services = React.useMemo(() => data?.services || [], [data?.services]);
|
|
236
234
|
const servicesActivated = React.useMemo(
|
|
237
235
|
() => services.map((item) => ({
|
|
238
236
|
...item,
|
|
@@ -260,7 +258,7 @@ const ServicesList = ({
|
|
|
260
258
|
}
|
|
261
259
|
return serviceTypes.serviceTypeTitlesMap[service.type] || service.type;
|
|
262
260
|
};
|
|
263
|
-
const onSave = async (
|
|
261
|
+
const onSave = async (payload) => {
|
|
264
262
|
try {
|
|
265
263
|
await updateService(
|
|
266
264
|
remoteDataProvider.dataResources.SERVICES,
|
|
@@ -268,9 +266,7 @@ const ServicesList = ({
|
|
|
268
266
|
id: currentlyEditableService.id,
|
|
269
267
|
data: {
|
|
270
268
|
organizationId: did,
|
|
271
|
-
payload:
|
|
272
|
-
serviceEndpoint
|
|
273
|
-
}
|
|
269
|
+
payload: lodashEs.omit(payload, ["id", "type"])
|
|
274
270
|
}
|
|
275
271
|
},
|
|
276
272
|
{ returnPromise: true }
|
|
@@ -331,12 +327,13 @@ const ServicesList = ({
|
|
|
331
327
|
[
|
|
332
328
|
{ name: "service id", value: service.id },
|
|
333
329
|
{ name: "service endpoint", value: service.serviceEndpoint },
|
|
334
|
-
...service.credentialTypes
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
330
|
+
...buildServiceContent(service.credentialTypes, "credential types"),
|
|
331
|
+
...buildServiceContent(service.name, "wallet name"),
|
|
332
|
+
...buildServiceContent(service.supportedExchangeProtocols, "protocols"),
|
|
333
|
+
...buildServiceContent(service.playStoreUrl, "play store url"),
|
|
334
|
+
...buildServiceContent(service.googlePlayId, "google play id"),
|
|
335
|
+
...buildServiceContent(service.appleAppStoreUrl, "apple app store url"),
|
|
336
|
+
...buildServiceContent(service.appleAppId, "apple app id"),
|
|
340
337
|
...AdditionalServiceProperties && AdditionalServiceProperties[service.type] ? [
|
|
341
338
|
{
|
|
342
339
|
name: AdditionalServiceProperties[service.type]?.name,
|