diff --git a/apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx b/apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx index 27ada2347..f9ca72f5e 100644 --- a/apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx +++ b/apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx @@ -15,18 +15,16 @@ import { import { AnimatePresence, motion } from 'framer-motion'; import { InfoIcon } from 'lucide-react'; import { useForm } from 'react-hook-form'; +import { useNavigate } from 'react-router'; import { match } from 'ts-pattern'; import * as z from 'zod'; import { useCurrentOrganisation } from '@documenso/lib/client-only/providers/organisation'; -import { RECIPIENT_ROLES_DESCRIPTION } from '@documenso/lib/constants/recipient-roles'; import type { TEnvelope } from '@documenso/lib/types/envelope'; -import { formatSigningLink } from '@documenso/lib/utils/recipients'; import { trpc, trpc as trpcReact } from '@documenso/trpc/react'; -import { CopyTextButton } from '@documenso/ui/components/common/copy-text-button'; import { DocumentSendEmailMessageHelper } from '@documenso/ui/components/document/document-send-email-message-helper'; +import { cn } from '@documenso/ui/lib/utils'; import { Alert, AlertDescription } from '@documenso/ui/primitives/alert'; -import { AvatarWithText } from '@documenso/ui/primitives/avatar'; import { Button } from '@documenso/ui/primitives/button'; import { Dialog, @@ -65,6 +63,7 @@ export type EnvelopeDistributeDialogProps = { fields: Pick[]; }; onDistribute?: () => Promise; + documentRootPath: string; trigger?: React.ReactNode; }; @@ -89,6 +88,7 @@ export type TEnvelopeDistributeFormSchema = z.infer { const organisation = useCurrentOrganisation(); @@ -97,6 +97,7 @@ export const EnvelopeDistributeDialog = ({ const { toast } = useToast(); const { t } = useLingui(); + const navigate = useNavigate(); const [isOpen, setIsOpen] = useState(false); @@ -163,6 +164,14 @@ export const EnvelopeDistributeDialog = ({ await onDistribute?.(); + let redirectPath = `${documentRootPath}/${envelope.id}`; + + if (meta.distributionMethod === DocumentDistributionMethod.NONE) { + redirectPath += '?action=copy-links'; + } + + await navigate(redirectPath); + toast({ title: t`Envelope distributed`, description: t`Your envelope has been distributed successfully.`, @@ -198,6 +207,7 @@ export const EnvelopeDistributeDialog = ({ Recipients will be able to sign the document once sent + {!invalidEnvelopeCode ? (
@@ -220,7 +230,11 @@ export const EnvelopeDistributeDialog = ({ -
+
{distributionMethod === DocumentDistributionMethod.EMAIL && ( - {envelope.status === DocumentStatus.DRAFT ? ( -
-

- We won't send anything to notify recipients. -

+
+

+ We won't send anything to notify recipients. +

-

- - We will generate signing links for you, which you can send to the - recipients through your method of choice. - -

-
- ) : ( -
    - {/* Todo: Envelopes - I don't think this section shows up */} - - {recipients.length === 0 && ( -
  • - No recipients -
  • - )} - - {recipients.map((recipient) => ( -
  • - - {recipient.email} -

    - } - secondaryText={ -

    - {t(RECIPIENT_ROLES_DESCRIPTION[recipient.role].roleName)} -

    - } - /> - - {recipient.role !== RecipientRole.CC && ( - { - toast({ - title: t`Copied to clipboard`, - description: t`The signing link has been copied to your clipboard.`, - }); - }} - badgeContentUncopied={ -

    - Copy -

    - } - badgeContentCopied={ -

    - Copied -

    - } - /> - )} -
  • - ))} -
- )} +

+ + We will generate signing links for you, which you can send to the + recipients through your method of choice. + +

+
)}
diff --git a/apps/remix/app/components/dialogs/envelope-download-dialog.tsx b/apps/remix/app/components/dialogs/envelope-download-dialog.tsx index 26a46e0ba..c735c773c 100644 --- a/apps/remix/app/components/dialogs/envelope-download-dialog.tsx +++ b/apps/remix/app/components/dialogs/envelope-download-dialog.tsx @@ -213,8 +213,6 @@ export const EnvelopeDownloadDialog = ({
)) )} - - {/* Todo: Envelopes - Download all button */}
diff --git a/apps/remix/app/components/general/document-signing/document-signing-attachments-popover.tsx b/apps/remix/app/components/general/document-signing/document-signing-attachments-popover.tsx index 7aba97846..35296fa26 100644 --- a/apps/remix/app/components/general/document-signing/document-signing-attachments-popover.tsx +++ b/apps/remix/app/components/general/document-signing/document-signing-attachments-popover.tsx @@ -8,11 +8,13 @@ import { Popover, PopoverContent, PopoverTrigger } from '@documenso/ui/primitive export type DocumentSigningAttachmentsPopoverProps = { envelopeId: string; token: string; + trigger?: React.ReactNode; }; export const DocumentSigningAttachmentsPopover = ({ envelopeId, token, + trigger, }: DocumentSigningAttachmentsPopoverProps) => { const { data: attachments } = trpc.envelope.attachment.find.useQuery({ envelopeId, @@ -26,15 +28,17 @@ export const DocumentSigningAttachmentsPopover = ({ return ( - + {trigger ?? ( + + )} diff --git a/apps/remix/app/components/general/document-signing/document-signing-page-view-v2.tsx b/apps/remix/app/components/general/document-signing/document-signing-page-view-v2.tsx index 0ded12ff3..c75aba3da 100644 --- a/apps/remix/app/components/general/document-signing/document-signing-page-view-v2.tsx +++ b/apps/remix/app/components/general/document-signing/document-signing-page-view-v2.tsx @@ -3,7 +3,7 @@ import { lazy, useMemo } from 'react'; import { Plural, Trans } from '@lingui/react/macro'; import { EnvelopeType, RecipientRole } from '@prisma/client'; import { motion } from 'framer-motion'; -import { ArrowLeftIcon, BanIcon, DownloadCloudIcon } from 'lucide-react'; +import { ArrowLeftIcon, BanIcon, DownloadCloudIcon, PaperclipIcon } from 'lucide-react'; import { Link } from 'react-router'; import { match } from 'ts-pattern'; @@ -75,7 +75,7 @@ export const DocumentSigningPageViewV2 = () => { {/* Main Content Area */} -
+
{/* Left Section - Step Navigation */}
@@ -121,12 +121,16 @@ export const DocumentSigningPageViewV2 = () => { Actions -
- -
+ + + Attachments + + } + /> { - return envelopeData.recipient.fields.filter((field) => isFieldUnsignedAndRequired(field)); + const requiredFields = envelopeData.recipient.fields + .filter((field) => isFieldUnsignedAndRequired(field)) + .map((field) => { + const envelopeItem = envelope.envelopeItems.find( + (item) => item.id === field.envelopeItemId, + ); + + if (!envelopeItem) { + throw new Error('Missing envelope item'); + } + + return { + ...field, + envelopeItemOrder: envelopeItem.order, + }; + }); + + return sortBy( + requiredFields, + [prop('envelopeItemOrder'), 'asc'], + [prop('page'), 'asc'], + [prop('positionY'), 'asc'], + ); }, [envelopeData.recipient.fields]); /** diff --git a/apps/remix/app/components/general/document/document-certificate-qr-view.tsx b/apps/remix/app/components/general/document/document-certificate-qr-view.tsx index 2fe50c8ce..b4360d6bb 100644 --- a/apps/remix/app/components/general/document/document-certificate-qr-view.tsx +++ b/apps/remix/app/components/general/document/document-certificate-qr-view.tsx @@ -4,7 +4,10 @@ import { Trans } from '@lingui/react/macro'; import type { DocumentData, EnvelopeItem } from '@prisma/client'; import { DateTime } from 'luxon'; -import { EnvelopeRenderProvider } from '@documenso/lib/client-only/providers/envelope-render-provider'; +import { + EnvelopeRenderProvider, + useCurrentEnvelopeRender, +} from '@documenso/lib/client-only/providers/envelope-render-provider'; import { formatDocumentsPath } from '@documenso/lib/utils/teams'; import { trpc } from '@documenso/trpc/react'; import PDFViewerKonvaLazy from '@documenso/ui/components/pdf-viewer/pdf-viewer-konva-lazy'; @@ -92,6 +95,60 @@ export const DocumentCertificateQRView = ({ )} + {internalVersion === 2 ? ( + + + + ) : ( + <> +
+
+

{title}

+
+

+ {recipientCount} recipients +

+ +

+ Completed on {formattedDate} +

+
+
+ + +
+ +
+ +
+ + )} +
+ ); +}; + +type DocumentCertificateQrV2Props = { + title: string; + recipientCount: number; + formattedDate: string; +}; + +const DocumentCertificateQrV2 = ({ + title, + recipientCount, + formattedDate, +}: DocumentCertificateQrV2Props) => { + const { currentEnvelopeItem } = useCurrentEnvelopeRender(); + + return ( +

{title}

@@ -106,21 +163,18 @@ export const DocumentCertificateQRView = ({
- + {currentEnvelopeItem && ( + + )}
- {internalVersion === 2 ? ( - - + - - - ) : ( - <> - - - )} +
); diff --git a/apps/remix/app/components/general/document/document-page-view-recipients.tsx b/apps/remix/app/components/general/document/document-page-view-recipients.tsx index 372d4a7df..a134d75f4 100644 --- a/apps/remix/app/components/general/document/document-page-view-recipients.tsx +++ b/apps/remix/app/components/general/document/document-page-view-recipients.tsx @@ -1,7 +1,10 @@ +import { useEffect, useState } from 'react'; + import { msg } from '@lingui/core/macro'; import { useLingui } from '@lingui/react'; import { Trans } from '@lingui/react/macro'; import { DocumentStatus, RecipientRole, SigningStatus } from '@prisma/client'; +import { TooltipArrow } from '@radix-ui/react-tooltip'; import { AlertTriangle, CheckIcon, @@ -12,7 +15,7 @@ import { PlusIcon, UserIcon, } from 'lucide-react'; -import { Link } from 'react-router'; +import { Link, useSearchParams } from 'react-router'; import { match } from 'ts-pattern'; import { RECIPIENT_ROLES_DESCRIPTION } from '@documenso/lib/constants/recipient-roles'; @@ -24,6 +27,12 @@ import { SignatureIcon } from '@documenso/ui/icons/signature'; import { AvatarWithText } from '@documenso/ui/primitives/avatar'; import { Badge } from '@documenso/ui/primitives/badge'; import { PopoverHover } from '@documenso/ui/primitives/popover'; +import { + Tooltip, + TooltipContent, + TooltipProvider, + TooltipTrigger, +} from '@documenso/ui/primitives/tooltip'; import { useToast } from '@documenso/ui/primitives/use-toast'; export type DocumentPageViewRecipientsProps = { @@ -37,8 +46,24 @@ export const DocumentPageViewRecipients = ({ }: DocumentPageViewRecipientsProps) => { const { _ } = useLingui(); const { toast } = useToast(); + const [searchParams, setSearchParams] = useSearchParams(); const recipients = envelope.recipients; + const [shouldHighlightCopyButtons, setShouldHighlightCopyButtons] = useState(false); + + // Check for action=view-tokens query parameter and set highlighting state + useEffect(() => { + const hasViewTokensAction = searchParams.get('action') === 'copy-links'; + + if (hasViewTokensAction) { + setShouldHighlightCopyButtons(true); + + // Remove the query parameter immediately + const params = new URLSearchParams(searchParams); + params.delete('action'); + setSearchParams(params); + } + }, [searchParams, setSearchParams]); return (
@@ -69,7 +94,7 @@ export const DocumentPageViewRecipients = ({ )} - {recipients.map((recipient) => ( + {recipients.map((recipient, i) => (
  • { - toast({ - title: _(msg`Copied to clipboard`), - description: _(msg`The signing link has been copied to your clipboard.`), - }); - }} - /> + + + +
    setShouldHighlightCopyButtons(false)} + > + { + toast({ + title: _(msg`Copied to clipboard`), + description: _( + msg`The signing link has been copied to your clipboard.`, + ), + }); + setShouldHighlightCopyButtons(false); + }} + /> +
    +
    + + Copy Signing Links + + +
    +
    )}
  • diff --git a/apps/remix/app/components/general/envelope-editor/envelope-editor-fields-page.tsx b/apps/remix/app/components/general/envelope-editor/envelope-editor-fields-page.tsx index 3d49e6af9..1f9bd878d 100644 --- a/apps/remix/app/components/general/envelope-editor/envelope-editor-fields-page.tsx +++ b/apps/remix/app/components/general/envelope-editor/envelope-editor-fields-page.tsx @@ -5,6 +5,7 @@ import { msg } from '@lingui/core/macro'; import { Trans, useLingui } from '@lingui/react/macro'; import { FieldType, RecipientRole } from '@prisma/client'; import { FileTextIcon } from 'lucide-react'; +import { Link } from 'react-router'; import { isDeepEqual } from 'remeda'; import { match } from 'ts-pattern'; @@ -61,7 +62,7 @@ const FieldSettingsTypeTranslations: Record = { }; export const EnvelopeEditorFieldsPage = () => { - const { envelope, editorFields } = useCurrentEnvelopeEditor(); + const { envelope, editorFields, relativePath } = useCurrentEnvelopeEditor(); const { currentEnvelopeItem } = useCurrentEnvelopeRender(); @@ -104,12 +105,12 @@ export const EnvelopeEditorFieldsPage = () => { return (
    -
    +
    {/* Horizontal envelope item selector */} {/* Document View */} -
    +
    {currentEnvelopeItem !== null ? ( ) : ( @@ -128,7 +129,7 @@ export const EnvelopeEditorFieldsPage = () => { {/* Right Section - Form Fields Panel */} {currentEnvelopeItem && ( -
    +
    {/* Recipient selector section. */}

    @@ -137,8 +138,14 @@ export const EnvelopeEditorFieldsPage = () => { {envelope.recipients.length === 0 ? ( - + You need at least one recipient to add fields + + +

    + Click here to add a recipient +

    +
    ) : ( diff --git a/apps/remix/app/components/general/envelope-editor/envelope-editor-header.tsx b/apps/remix/app/components/general/envelope-editor/envelope-editor-header.tsx index 97f72b8c0..420f8b5b1 100644 --- a/apps/remix/app/components/general/envelope-editor/envelope-editor-header.tsx +++ b/apps/remix/app/components/general/envelope-editor/envelope-editor-header.tsx @@ -37,7 +37,6 @@ export default function EnvelopeEditorHeader() { updateEnvelope, autosaveError, relativePath, - syncEnvelope, editorFields, } = useCurrentEnvelopeEditor(); @@ -152,7 +151,7 @@ export default function EnvelopeEditorHeader() { ...envelope, fields: editorFields.localFields, }} - onDistribute={syncEnvelope} + documentRootPath={relativePath.documentRootPath} trigger={ +

    + + {showAdvancedSettings && + organisation.organisationClaim.flags.cfr21 && ( + ( + + + + + + + + )} + /> + )}
    )} diff --git a/apps/remix/app/components/general/envelope-editor/envelope-editor-settings-dialog.tsx b/apps/remix/app/components/general/envelope-editor/envelope-editor-settings-dialog.tsx index e2df6b45c..0c505d55c 100644 --- a/apps/remix/app/components/general/envelope-editor/envelope-editor-settings-dialog.tsx +++ b/apps/remix/app/components/general/envelope-editor/envelope-editor-settings-dialog.tsx @@ -355,7 +355,7 @@ export const EnvelopeEditorSettingsDialog = ({
    diff --git a/apps/remix/app/components/general/envelope-editor/envelope-editor.tsx b/apps/remix/app/components/general/envelope-editor/envelope-editor.tsx index 0462909a1..1b7c8b77b 100644 --- a/apps/remix/app/components/general/envelope-editor/envelope-editor.tsx +++ b/apps/remix/app/components/general/envelope-editor/envelope-editor.tsx @@ -81,7 +81,6 @@ export default function EnvelopeEditor() { isAutosaving, flushAutosave, relativePath, - syncEnvelope, editorFields, } = useCurrentEnvelopeEditor(); @@ -157,7 +156,7 @@ export default function EnvelopeEditor() { {/* Main Content Area */} -
    +
    {/* Left Section - Step Navigation */}
    {/* Left section step selector. */} @@ -251,7 +250,7 @@ export default function EnvelopeEditor() { ...envelope, fields: editorFields.localFields, }} - onDistribute={syncEnvelope} + documentRootPath={relativePath.documentRootPath} trigger={
    {/* Main Content - Changes based on current step */} -
    - - {match({ currentStep, isStepLoading }) - .with({ isStepLoading: true }, () => ) - .with({ currentStep: 'upload' }, () => ) - .with({ currentStep: 'addFields' }, () => ) - .with({ currentStep: 'preview' }, () => ) - .exhaustive()} - -
    + + {match({ currentStep, isStepLoading }) + .with({ isStepLoading: true }, () => ) + .with({ currentStep: 'upload' }, () => ) + .with({ currentStep: 'addFields' }, () => ) + .with({ currentStep: 'preview' }, () => ) + .exhaustive()} +
    ); diff --git a/apps/remix/app/components/general/envelope-editor/envelope-file-selector.tsx b/apps/remix/app/components/general/envelope-editor/envelope-file-selector.tsx index f03b22e37..1d570bed7 100644 --- a/apps/remix/app/components/general/envelope-editor/envelope-file-selector.tsx +++ b/apps/remix/app/components/general/envelope-editor/envelope-file-selector.tsx @@ -20,7 +20,8 @@ export const EnvelopeItemSelector = ({ }: EnvelopeItemSelectorProps) => { return (
    @@ -61,7 +62,7 @@ export const EnvelopeRendererFileSelector = ({ const { envelopeItems, currentEnvelopeItem, setCurrentEnvelopeItem } = useCurrentEnvelopeRender(); return ( -
    +
    {envelopeItems.map((doc, i) => ( { if (!pageLayer.current || !stage.current) { @@ -93,14 +92,12 @@ export default function EnvelopeGenericPageRenderer() { group.name() === 'field-group' && !localPageFields.some((field) => field.id.toString() === group.id()) ) { - console.log('Field removed, removing from canvas'); group.destroy(); } }); // If it exists, rerender. localPageFields.forEach((field) => { - console.log('Field created/updated, rendering on canvas'); renderFieldOnLayer(field); }); diff --git a/apps/remix/app/components/general/share-document-download-button.tsx b/apps/remix/app/components/general/share-document-download-button.tsx index af92fb895..5ee7d0453 100644 --- a/apps/remix/app/components/general/share-document-download-button.tsx +++ b/apps/remix/app/components/general/share-document-download-button.tsx @@ -15,7 +15,6 @@ export type ShareDocumentDownloadButtonProps = { documentData: DocumentData; }; -// Todo: Envelopes - Support multiple item downloads. export const ShareDocumentDownloadButton = ({ title, documentData, diff --git a/apps/remix/app/routes/_authenticated+/t.$teamUrl+/documents.$id._index.tsx b/apps/remix/app/routes/_authenticated+/t.$teamUrl+/documents.$id._index.tsx index e3547b5c4..4e7814a13 100644 --- a/apps/remix/app/routes/_authenticated+/t.$teamUrl+/documents.$id._index.tsx +++ b/apps/remix/app/routes/_authenticated+/t.$teamUrl+/documents.$id._index.tsx @@ -148,6 +148,7 @@ export default function DocumentPage({ params }: Route.ComponentProps) { recipient.id)} > {isMultiEnvelopeItem && ( diff --git a/apps/remix/app/routes/_authenticated+/t.$teamUrl+/documents.$id.edit.tsx b/apps/remix/app/routes/_authenticated+/t.$teamUrl+/documents.$id.edit.tsx index 1b9072780..5494cb9e7 100644 --- a/apps/remix/app/routes/_authenticated+/t.$teamUrl+/documents.$id.edit.tsx +++ b/apps/remix/app/routes/_authenticated+/t.$teamUrl+/documents.$id.edit.tsx @@ -99,7 +99,11 @@ export default function EnvelopeEditorPage({ params }: Route.ComponentProps) { return ( - + recipient.id)} + > diff --git a/apps/remix/app/routes/_authenticated+/t.$teamUrl+/templates.$id._index.tsx b/apps/remix/app/routes/_authenticated+/t.$teamUrl+/templates.$id._index.tsx index ab5c265ae..337d85d92 100644 --- a/apps/remix/app/routes/_authenticated+/t.$teamUrl+/templates.$id._index.tsx +++ b/apps/remix/app/routes/_authenticated+/t.$teamUrl+/templates.$id._index.tsx @@ -168,7 +168,11 @@ export default function TemplatePage({ params }: Route.ComponentProps) {
    {envelope.internalVersion === 2 ? (
    - + recipient.id)} + > {isMultiEnvelopeItem && ( )} diff --git a/packages/lib/client-only/providers/envelope-render-provider.tsx b/packages/lib/client-only/providers/envelope-render-provider.tsx index a60c4d5ed..367693dac 100644 --- a/packages/lib/client-only/providers/envelope-render-provider.tsx +++ b/packages/lib/client-only/providers/envelope-render-provider.tsx @@ -3,6 +3,9 @@ import React from 'react'; import type { DocumentData } from '@prisma/client'; +import type { TRecipientColor } from '@documenso/ui/lib/recipient-colors'; +import { AVAILABLE_RECIPIENT_COLORS } from '@documenso/ui/lib/recipient-colors'; + import type { TEnvelope } from '../../types/envelope'; import { getFile } from '../../universal/upload/get-file'; @@ -23,6 +26,7 @@ type EnvelopeRenderProviderValue = { currentEnvelopeItem: EnvelopeRenderItem | null; setCurrentEnvelopeItem: (envelopeItemId: string) => void; fields: TEnvelope['fields']; + getRecipientColorKey: (recipientId: number) => TRecipientColor; }; interface EnvelopeRenderProviderProps { @@ -35,6 +39,13 @@ interface EnvelopeRenderProviderProps { * Only pass if the CustomRenderer you are passing in wants fields. */ fields?: TEnvelope['fields']; + + /** + * Optional recipient IDs used to determine the color of the fields. + * + * Only required for generic page renderers. + */ + recipientIds?: number[]; } const EnvelopeRenderContext = createContext(null); @@ -56,6 +67,7 @@ export const EnvelopeRenderProvider = ({ children, envelope, fields, + recipientIds = [], }: EnvelopeRenderProviderProps) => { // Indexed by documentDataId. const [files, setFiles] = useState>({}); @@ -132,6 +144,17 @@ export const EnvelopeRenderProvider = ({ } }, [envelope.envelopeItems]); + const getRecipientColorKey = useCallback( + (recipientId: number) => { + const recipientIndex = recipientIds.findIndex((id) => id === recipientId); + + return AVAILABLE_RECIPIENT_COLORS[ + Math.max(recipientIndex, 0) % AVAILABLE_RECIPIENT_COLORS.length + ]; + }, + [recipientIds], + ); + return ( {children} diff --git a/packages/lib/jobs/definitions/internal/seal-document.handler.ts b/packages/lib/jobs/definitions/internal/seal-document.handler.ts index 50c011e7d..f0c05a9ef 100644 --- a/packages/lib/jobs/definitions/internal/seal-document.handler.ts +++ b/packages/lib/jobs/definitions/internal/seal-document.handler.ts @@ -189,7 +189,6 @@ export const run = async ({ settings, }); - // Todo: Envelopes - Is it okay to have dynamic IDs? const newDocumentData = await Promise.all( envelopeItems.map(async (envelopeItem) => io.runTask(`decorate-and-sign-envelope-item-${envelopeItem.id}`, async () => { diff --git a/packages/lib/server-only/document/send-document.ts b/packages/lib/server-only/document/send-document.ts index 95914eaa5..c9a982430 100644 --- a/packages/lib/server-only/document/send-document.ts +++ b/packages/lib/server-only/document/send-document.ts @@ -256,11 +256,10 @@ export const sendDocument = async ({ }); } - // Todo: Envelopes - [AUDIT_LOGS] if (envelope.internalVersion === 2) { - await Promise.all( + const autoInsertedFields = await Promise.all( fieldsToAutoInsert.map(async (field) => { - await tx.field.update({ + return await tx.field.update({ where: { id: field.fieldId, }, @@ -271,6 +270,21 @@ export const sendDocument = async ({ }); }), ); + + await tx.documentAuditLog.create({ + data: createDocumentAuditLogData({ + type: DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_FIELDS_AUTO_INSERTED, + envelopeId: envelope.id, + data: { + fields: autoInsertedFields.map((field) => ({ + fieldId: field.id, + fieldType: field.type, + recipientId: field.recipientId, + })), + }, + // Don't put metadata or user here since it's a system event. + }), + }); } return await tx.envelope.update({ diff --git a/packages/lib/translations/de/web.po b/packages/lib/translations/de/web.po index a2b53fee7..cae038302 100644 --- a/packages/lib/translations/de/web.po +++ b/packages/lib/translations/de/web.po @@ -262,10 +262,20 @@ msgstr "{prefix} hat ein Feld hinzugefügt" msgid "{prefix} added a recipient" msgstr "{prefix} hat einen Empfänger hinzugefügt" +#. placeholder {0}: data.envelopeItemTitle +#: packages/lib/utils/document-audit-logs.ts +msgid "{prefix} created an envelope item with title {0}" +msgstr "" + #: packages/lib/utils/document-audit-logs.ts msgid "{prefix} created the document" msgstr "{prefix} hat das Dokument erstellt" +#. placeholder {0}: data.envelopeItemTitle +#: packages/lib/utils/document-audit-logs.ts +msgid "{prefix} deleted an envelope item with title {0}" +msgstr "" + #: packages/lib/utils/document-audit-logs.ts msgid "{prefix} deleted the document" msgstr "{prefix} hat das Dokument gelöscht" @@ -356,6 +366,7 @@ msgstr "{recipientActionVerb} Dokument" msgid "{recipientActionVerb} the document to complete the process." msgstr "{recipientActionVerb} das Dokument, um den Prozess abzuschließen." +#: apps/remix/app/components/general/document/document-certificate-qr-view.tsx #: apps/remix/app/components/general/document/document-certificate-qr-view.tsx msgid "{recipientCount} recipients" msgstr "{recipientCount} Empfänger" @@ -1742,8 +1753,9 @@ msgstr "" #: apps/remix/app/components/general/document/document-attachments-popover.tsx msgid "Attachment removed successfully." -msgstr "" +msgstr "<<<<<<< Updated upstream=======" +#: apps/remix/app/components/general/document-signing/document-signing-page-view-v2.tsx #: apps/remix/app/components/general/document-signing/document-signing-attachments-popover.tsx #: apps/remix/app/components/general/document-signing/document-signing-attachments-popover.tsx #: apps/remix/app/components/general/document/document-attachments-popover.tsx @@ -2158,6 +2170,10 @@ msgstr "Filter löschen" msgid "Clear Signature" msgstr "Unterschrift löschen" +#: apps/remix/app/components/general/envelope-editor/envelope-editor-fields-page.tsx +msgid "Click here to add a recipient" +msgstr "" + #: apps/remix/app/components/tables/settings-public-profile-templates-table.tsx msgid "Click here to get started" msgstr "Klicken Sie hier, um zu beginnen" @@ -2280,6 +2296,7 @@ msgstr "Abgeschlossene Dokumente" msgid "Completed Documents" msgstr "Abgeschlossene Dokumente" +#: apps/remix/app/components/general/document/document-certificate-qr-view.tsx #: apps/remix/app/components/general/document/document-certificate-qr-view.tsx msgid "Completed on {formattedDate}" msgstr "Abgeschlossen am {formattedDate}" @@ -2479,7 +2496,6 @@ msgid "Controls which signatures are allowed to be used when signing a document. msgstr "Bestimmt, welche Signaturen beim Unterschreiben eines Dokuments verwendet werden dürfen." #: apps/remix/app/components/general/document/document-recipient-link-copy-dialog.tsx -#: apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx #: packages/ui/primitives/document-flow/add-subject.tsx msgid "Copied" msgstr "Kopiert" @@ -2497,14 +2513,12 @@ msgstr "Kopiert" #: apps/remix/app/components/dialogs/organisation-email-domain-records-dialog.tsx #: apps/remix/app/components/dialogs/organisation-email-domain-records-dialog.tsx #: apps/remix/app/components/dialogs/organisation-email-domain-records-dialog.tsx -#: apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx #: packages/ui/primitives/document-flow/add-subject.tsx #: packages/ui/components/document/document-share-button.tsx msgid "Copied to clipboard" msgstr "In die Zwischenablage kopiert" #: apps/remix/app/components/general/document/document-recipient-link-copy-dialog.tsx -#: apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx #: packages/ui/primitives/document-flow/add-subject.tsx msgid "Copy" msgstr "Kopieren" @@ -2522,6 +2536,7 @@ msgid "Copy Shareable Link" msgstr "Kopiere den teilbaren Link" #: apps/remix/app/components/general/document/document-recipient-link-copy-dialog.tsx +#: apps/remix/app/components/general/document/document-page-view-recipients.tsx msgid "Copy Signing Links" msgstr "Signierlinks kopieren" @@ -3646,7 +3661,6 @@ msgstr "Legen Sie Ihr Dokument hier ab" #: apps/remix/app/components/general/envelope-editor/envelope-editor-fields-drag-drop.tsx #: packages/ui/primitives/template-flow/add-template-fields.tsx #: packages/ui/primitives/document-flow/add-fields.tsx -#: packages/lib/utils/fields.ts msgid "Dropdown" msgstr "Dropdown" @@ -4035,6 +4049,14 @@ msgstr "" msgid "Envelope Item Count" msgstr "" +#: packages/lib/utils/document-audit-logs.ts +msgid "Envelope item created" +msgstr "" + +#: packages/lib/utils/document-audit-logs.ts +msgid "Envelope item deleted" +msgstr "" + #: apps/remix/app/components/dialogs/envelope-redistribute-dialog.tsx msgid "Envelope resent" msgstr "" @@ -5544,7 +5566,6 @@ msgstr "Kein passender Empfänger mit dieser Beschreibung gefunden." #: apps/remix/app/components/general/template/template-page-view-recipients.tsx #: apps/remix/app/components/general/document/document-recipient-link-copy-dialog.tsx #: apps/remix/app/components/general/document/document-page-view-recipients.tsx -#: apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx #: packages/ui/primitives/document-flow/add-subject.tsx msgid "No recipients" msgstr "Keine Empfänger" @@ -7066,6 +7087,10 @@ msgstr "Wählen Sie Mitglieder oder Gruppen von Mitgliedern, die dem Team hinzug msgid "Select members to add to this team" msgstr "Wählen Sie Mitglieder aus, die diesem Team hinzugefügt werden sollen" +#: packages/lib/utils/fields.ts +msgid "Select Option" +msgstr "" + #: apps/remix/app/components/general/document-signing/document-signing-auth-passkey.tsx msgid "Select passkey" msgstr "Passkey auswählen" @@ -7870,6 +7895,15 @@ msgstr "E-Mail-Domains synchronisieren" msgid "Sync failed, changes not saved" msgstr "" +#: packages/lib/utils/document-audit-logs.ts +msgctxt "Audit log format" +msgid "System auto inserted fields" +msgstr "" + +#: packages/lib/utils/document-audit-logs.ts +msgid "System auto inserted fields" +msgstr "" + #: apps/remix/app/routes/_unauthenticated+/articles.signature-disclosure.tsx msgid "System Requirements" msgstr "Systemanforderungen" @@ -8412,7 +8446,6 @@ msgstr "Der Name des Unterzeichners" #: apps/remix/app/components/general/avatar-with-recipient.tsx #: apps/remix/app/components/general/document/document-recipient-link-copy-dialog.tsx #: apps/remix/app/components/general/document/document-page-view-recipients.tsx -#: apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx #: packages/ui/primitives/document-flow/add-subject.tsx msgid "The signing link has been copied to your clipboard." msgstr "Der Signierlink wurde in die Zwischenablage kopiert." diff --git a/packages/lib/translations/en/web.po b/packages/lib/translations/en/web.po index 0a764ccf3..6e292032d 100644 --- a/packages/lib/translations/en/web.po +++ b/packages/lib/translations/en/web.po @@ -257,10 +257,20 @@ msgstr "{prefix} added a field" msgid "{prefix} added a recipient" msgstr "{prefix} added a recipient" +#. placeholder {0}: data.envelopeItemTitle +#: packages/lib/utils/document-audit-logs.ts +msgid "{prefix} created an envelope item with title {0}" +msgstr "{prefix} created an envelope item with title {0}" + #: packages/lib/utils/document-audit-logs.ts msgid "{prefix} created the document" msgstr "{prefix} created the document" +#. placeholder {0}: data.envelopeItemTitle +#: packages/lib/utils/document-audit-logs.ts +msgid "{prefix} deleted an envelope item with title {0}" +msgstr "{prefix} deleted an envelope item with title {0}" + #: packages/lib/utils/document-audit-logs.ts msgid "{prefix} deleted the document" msgstr "{prefix} deleted the document" @@ -351,6 +361,7 @@ msgstr "{recipientActionVerb} document" msgid "{recipientActionVerb} the document to complete the process." msgstr "{recipientActionVerb} the document to complete the process." +#: apps/remix/app/components/general/document/document-certificate-qr-view.tsx #: apps/remix/app/components/general/document/document-certificate-qr-view.tsx msgid "{recipientCount} recipients" msgstr "{recipientCount} recipients" @@ -1737,8 +1748,9 @@ msgstr "Attachment added successfully." #: apps/remix/app/components/general/document/document-attachments-popover.tsx msgid "Attachment removed successfully." -msgstr "Attachment removed successfully." +msgstr "Attachment removed successfully.<<<<<<< Updated upstream=======" +#: apps/remix/app/components/general/document-signing/document-signing-page-view-v2.tsx #: apps/remix/app/components/general/document-signing/document-signing-attachments-popover.tsx #: apps/remix/app/components/general/document-signing/document-signing-attachments-popover.tsx #: apps/remix/app/components/general/document/document-attachments-popover.tsx @@ -2153,6 +2165,10 @@ msgstr "Clear filters" msgid "Clear Signature" msgstr "Clear Signature" +#: apps/remix/app/components/general/envelope-editor/envelope-editor-fields-page.tsx +msgid "Click here to add a recipient" +msgstr "Click here to add a recipient" + #: apps/remix/app/components/tables/settings-public-profile-templates-table.tsx msgid "Click here to get started" msgstr "Click here to get started" @@ -2275,6 +2291,7 @@ msgstr "Completed documents" msgid "Completed Documents" msgstr "Completed Documents" +#: apps/remix/app/components/general/document/document-certificate-qr-view.tsx #: apps/remix/app/components/general/document/document-certificate-qr-view.tsx msgid "Completed on {formattedDate}" msgstr "Completed on {formattedDate}" @@ -2474,7 +2491,6 @@ msgid "Controls which signatures are allowed to be used when signing a document. msgstr "Controls which signatures are allowed to be used when signing a document." #: apps/remix/app/components/general/document/document-recipient-link-copy-dialog.tsx -#: apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx #: packages/ui/primitives/document-flow/add-subject.tsx msgid "Copied" msgstr "Copied" @@ -2492,14 +2508,12 @@ msgstr "Copied" #: apps/remix/app/components/dialogs/organisation-email-domain-records-dialog.tsx #: apps/remix/app/components/dialogs/organisation-email-domain-records-dialog.tsx #: apps/remix/app/components/dialogs/organisation-email-domain-records-dialog.tsx -#: apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx #: packages/ui/primitives/document-flow/add-subject.tsx #: packages/ui/components/document/document-share-button.tsx msgid "Copied to clipboard" msgstr "Copied to clipboard" #: apps/remix/app/components/general/document/document-recipient-link-copy-dialog.tsx -#: apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx #: packages/ui/primitives/document-flow/add-subject.tsx msgid "Copy" msgstr "Copy" @@ -2517,6 +2531,7 @@ msgid "Copy Shareable Link" msgstr "Copy Shareable Link" #: apps/remix/app/components/general/document/document-recipient-link-copy-dialog.tsx +#: apps/remix/app/components/general/document/document-page-view-recipients.tsx msgid "Copy Signing Links" msgstr "Copy Signing Links" @@ -3641,7 +3656,6 @@ msgstr "Drop your document here" #: apps/remix/app/components/general/envelope-editor/envelope-editor-fields-drag-drop.tsx #: packages/ui/primitives/template-flow/add-template-fields.tsx #: packages/ui/primitives/document-flow/add-fields.tsx -#: packages/lib/utils/fields.ts msgid "Dropdown" msgstr "Dropdown" @@ -4030,6 +4044,14 @@ msgstr "Envelope ID" msgid "Envelope Item Count" msgstr "Envelope Item Count" +#: packages/lib/utils/document-audit-logs.ts +msgid "Envelope item created" +msgstr "Envelope item created" + +#: packages/lib/utils/document-audit-logs.ts +msgid "Envelope item deleted" +msgstr "Envelope item deleted" + #: apps/remix/app/components/dialogs/envelope-redistribute-dialog.tsx msgid "Envelope resent" msgstr "Envelope resent" @@ -5539,7 +5561,6 @@ msgstr "No recipient matching this description was found." #: apps/remix/app/components/general/template/template-page-view-recipients.tsx #: apps/remix/app/components/general/document/document-recipient-link-copy-dialog.tsx #: apps/remix/app/components/general/document/document-page-view-recipients.tsx -#: apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx #: packages/ui/primitives/document-flow/add-subject.tsx msgid "No recipients" msgstr "No recipients" @@ -7061,6 +7082,10 @@ msgstr "Select members or groups of members to add to the team." msgid "Select members to add to this team" msgstr "Select members to add to this team" +#: packages/lib/utils/fields.ts +msgid "Select Option" +msgstr "Select Option" + #: apps/remix/app/components/general/document-signing/document-signing-auth-passkey.tsx msgid "Select passkey" msgstr "Select passkey" @@ -7865,6 +7890,15 @@ msgstr "Sync Email Domains" msgid "Sync failed, changes not saved" msgstr "Sync failed, changes not saved" +#: packages/lib/utils/document-audit-logs.ts +msgctxt "Audit log format" +msgid "System auto inserted fields" +msgstr "System auto inserted fields" + +#: packages/lib/utils/document-audit-logs.ts +msgid "System auto inserted fields" +msgstr "System auto inserted fields" + #: apps/remix/app/routes/_unauthenticated+/articles.signature-disclosure.tsx msgid "System Requirements" msgstr "System Requirements" @@ -8417,7 +8451,6 @@ msgstr "The signer's name" #: apps/remix/app/components/general/avatar-with-recipient.tsx #: apps/remix/app/components/general/document/document-recipient-link-copy-dialog.tsx #: apps/remix/app/components/general/document/document-page-view-recipients.tsx -#: apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx #: packages/ui/primitives/document-flow/add-subject.tsx msgid "The signing link has been copied to your clipboard." msgstr "The signing link has been copied to your clipboard." diff --git a/packages/lib/translations/es/web.po b/packages/lib/translations/es/web.po index ab57b4e1c..c0cf19307 100644 --- a/packages/lib/translations/es/web.po +++ b/packages/lib/translations/es/web.po @@ -262,10 +262,20 @@ msgstr "{prefix} agregó un campo" msgid "{prefix} added a recipient" msgstr "{prefix} agregó un destinatario" +#. placeholder {0}: data.envelopeItemTitle +#: packages/lib/utils/document-audit-logs.ts +msgid "{prefix} created an envelope item with title {0}" +msgstr "" + #: packages/lib/utils/document-audit-logs.ts msgid "{prefix} created the document" msgstr "{prefix} creó el documento" +#. placeholder {0}: data.envelopeItemTitle +#: packages/lib/utils/document-audit-logs.ts +msgid "{prefix} deleted an envelope item with title {0}" +msgstr "" + #: packages/lib/utils/document-audit-logs.ts msgid "{prefix} deleted the document" msgstr "{prefix} eliminó el documento" @@ -356,6 +366,7 @@ msgstr "{recipientActionVerb} documento" msgid "{recipientActionVerb} the document to complete the process." msgstr "{recipientActionVerb} el documento para completar el proceso." +#: apps/remix/app/components/general/document/document-certificate-qr-view.tsx #: apps/remix/app/components/general/document/document-certificate-qr-view.tsx msgid "{recipientCount} recipients" msgstr "{recipientCount} destinatarios" @@ -1742,8 +1753,9 @@ msgstr "" #: apps/remix/app/components/general/document/document-attachments-popover.tsx msgid "Attachment removed successfully." -msgstr "" +msgstr "<<<<<<< Updated upstream=======" +#: apps/remix/app/components/general/document-signing/document-signing-page-view-v2.tsx #: apps/remix/app/components/general/document-signing/document-signing-attachments-popover.tsx #: apps/remix/app/components/general/document-signing/document-signing-attachments-popover.tsx #: apps/remix/app/components/general/document/document-attachments-popover.tsx @@ -2158,6 +2170,10 @@ msgstr "Limpiar filtros" msgid "Clear Signature" msgstr "Limpiar firma" +#: apps/remix/app/components/general/envelope-editor/envelope-editor-fields-page.tsx +msgid "Click here to add a recipient" +msgstr "" + #: apps/remix/app/components/tables/settings-public-profile-templates-table.tsx msgid "Click here to get started" msgstr "Haga clic aquí para comenzar" @@ -2280,6 +2296,7 @@ msgstr "Documentos completados" msgid "Completed Documents" msgstr "Documentos Completados" +#: apps/remix/app/components/general/document/document-certificate-qr-view.tsx #: apps/remix/app/components/general/document/document-certificate-qr-view.tsx msgid "Completed on {formattedDate}" msgstr "Completado el {formattedDate}" @@ -2479,7 +2496,6 @@ msgid "Controls which signatures are allowed to be used when signing a document. msgstr "Controla qué firmas están permitidas al firmar un documento." #: apps/remix/app/components/general/document/document-recipient-link-copy-dialog.tsx -#: apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx #: packages/ui/primitives/document-flow/add-subject.tsx msgid "Copied" msgstr "Copiado" @@ -2497,14 +2513,12 @@ msgstr "Copiado" #: apps/remix/app/components/dialogs/organisation-email-domain-records-dialog.tsx #: apps/remix/app/components/dialogs/organisation-email-domain-records-dialog.tsx #: apps/remix/app/components/dialogs/organisation-email-domain-records-dialog.tsx -#: apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx #: packages/ui/primitives/document-flow/add-subject.tsx #: packages/ui/components/document/document-share-button.tsx msgid "Copied to clipboard" msgstr "Copiado al portapapeles" #: apps/remix/app/components/general/document/document-recipient-link-copy-dialog.tsx -#: apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx #: packages/ui/primitives/document-flow/add-subject.tsx msgid "Copy" msgstr "Copiar" @@ -2522,6 +2536,7 @@ msgid "Copy Shareable Link" msgstr "Copiar enlace compartible" #: apps/remix/app/components/general/document/document-recipient-link-copy-dialog.tsx +#: apps/remix/app/components/general/document/document-page-view-recipients.tsx msgid "Copy Signing Links" msgstr "Copiar enlaces de firma" @@ -3646,7 +3661,6 @@ msgstr "Suelta tu documento aquí" #: apps/remix/app/components/general/envelope-editor/envelope-editor-fields-drag-drop.tsx #: packages/ui/primitives/template-flow/add-template-fields.tsx #: packages/ui/primitives/document-flow/add-fields.tsx -#: packages/lib/utils/fields.ts msgid "Dropdown" msgstr "Menú desplegable" @@ -4035,6 +4049,14 @@ msgstr "" msgid "Envelope Item Count" msgstr "" +#: packages/lib/utils/document-audit-logs.ts +msgid "Envelope item created" +msgstr "" + +#: packages/lib/utils/document-audit-logs.ts +msgid "Envelope item deleted" +msgstr "" + #: apps/remix/app/components/dialogs/envelope-redistribute-dialog.tsx msgid "Envelope resent" msgstr "" @@ -5544,7 +5566,6 @@ msgstr "No se encontró ningún destinatario que coincidiera con esta descripci #: apps/remix/app/components/general/template/template-page-view-recipients.tsx #: apps/remix/app/components/general/document/document-recipient-link-copy-dialog.tsx #: apps/remix/app/components/general/document/document-page-view-recipients.tsx -#: apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx #: packages/ui/primitives/document-flow/add-subject.tsx msgid "No recipients" msgstr "Sin destinatarios" @@ -7066,6 +7087,10 @@ msgstr "Seleccione miembros o grupos de miembros para agregar al equipo." msgid "Select members to add to this team" msgstr "Seleccione los miembros para añadir a este equipo" +#: packages/lib/utils/fields.ts +msgid "Select Option" +msgstr "" + #: apps/remix/app/components/general/document-signing/document-signing-auth-passkey.tsx msgid "Select passkey" msgstr "Seleccionar clave de acceso" @@ -7870,6 +7895,15 @@ msgstr "Sincronizar dominios de correo electrónico" msgid "Sync failed, changes not saved" msgstr "" +#: packages/lib/utils/document-audit-logs.ts +msgctxt "Audit log format" +msgid "System auto inserted fields" +msgstr "" + +#: packages/lib/utils/document-audit-logs.ts +msgid "System auto inserted fields" +msgstr "" + #: apps/remix/app/routes/_unauthenticated+/articles.signature-disclosure.tsx msgid "System Requirements" msgstr "Requisitos del Sistema" @@ -8412,7 +8446,6 @@ msgstr "El nombre del firmante" #: apps/remix/app/components/general/avatar-with-recipient.tsx #: apps/remix/app/components/general/document/document-recipient-link-copy-dialog.tsx #: apps/remix/app/components/general/document/document-page-view-recipients.tsx -#: apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx #: packages/ui/primitives/document-flow/add-subject.tsx msgid "The signing link has been copied to your clipboard." msgstr "El enlace de firma ha sido copiado a tu portapapeles." diff --git a/packages/lib/translations/fr/web.po b/packages/lib/translations/fr/web.po index 9a2173251..b6edb22c6 100644 --- a/packages/lib/translations/fr/web.po +++ b/packages/lib/translations/fr/web.po @@ -262,10 +262,20 @@ msgstr "{prefix} a ajouté un champ" msgid "{prefix} added a recipient" msgstr "{prefix} a ajouté un destinataire" +#. placeholder {0}: data.envelopeItemTitle +#: packages/lib/utils/document-audit-logs.ts +msgid "{prefix} created an envelope item with title {0}" +msgstr "" + #: packages/lib/utils/document-audit-logs.ts msgid "{prefix} created the document" msgstr "{prefix} a créé le document" +#. placeholder {0}: data.envelopeItemTitle +#: packages/lib/utils/document-audit-logs.ts +msgid "{prefix} deleted an envelope item with title {0}" +msgstr "" + #: packages/lib/utils/document-audit-logs.ts msgid "{prefix} deleted the document" msgstr "{prefix} a supprimé le document" @@ -356,6 +366,7 @@ msgstr "{recipientActionVerb} document" msgid "{recipientActionVerb} the document to complete the process." msgstr "{recipientActionVerb} the document to complete the process." +#: apps/remix/app/components/general/document/document-certificate-qr-view.tsx #: apps/remix/app/components/general/document/document-certificate-qr-view.tsx msgid "{recipientCount} recipients" msgstr "{recipientCount} destinataires" @@ -1742,8 +1753,9 @@ msgstr "" #: apps/remix/app/components/general/document/document-attachments-popover.tsx msgid "Attachment removed successfully." -msgstr "" +msgstr "<<<<<<< Updated upstream=======" +#: apps/remix/app/components/general/document-signing/document-signing-page-view-v2.tsx #: apps/remix/app/components/general/document-signing/document-signing-attachments-popover.tsx #: apps/remix/app/components/general/document-signing/document-signing-attachments-popover.tsx #: apps/remix/app/components/general/document/document-attachments-popover.tsx @@ -2158,6 +2170,10 @@ msgstr "Effacer les filtres" msgid "Clear Signature" msgstr "Effacer la signature" +#: apps/remix/app/components/general/envelope-editor/envelope-editor-fields-page.tsx +msgid "Click here to add a recipient" +msgstr "" + #: apps/remix/app/components/tables/settings-public-profile-templates-table.tsx msgid "Click here to get started" msgstr "Cliquez ici pour commencer" @@ -2280,6 +2296,7 @@ msgstr "Documents complétés" msgid "Completed Documents" msgstr "Documents Complétés" +#: apps/remix/app/components/general/document/document-certificate-qr-view.tsx #: apps/remix/app/components/general/document/document-certificate-qr-view.tsx msgid "Completed on {formattedDate}" msgstr "Terminé le {formattedDate}" @@ -2479,7 +2496,6 @@ msgid "Controls which signatures are allowed to be used when signing a document. msgstr "Contrôle quelles signatures sont autorisées lors de la signature d'un document." #: apps/remix/app/components/general/document/document-recipient-link-copy-dialog.tsx -#: apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx #: packages/ui/primitives/document-flow/add-subject.tsx msgid "Copied" msgstr "Copié" @@ -2497,14 +2513,12 @@ msgstr "Copié" #: apps/remix/app/components/dialogs/organisation-email-domain-records-dialog.tsx #: apps/remix/app/components/dialogs/organisation-email-domain-records-dialog.tsx #: apps/remix/app/components/dialogs/organisation-email-domain-records-dialog.tsx -#: apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx #: packages/ui/primitives/document-flow/add-subject.tsx #: packages/ui/components/document/document-share-button.tsx msgid "Copied to clipboard" msgstr "Copié dans le presse-papiers" #: apps/remix/app/components/general/document/document-recipient-link-copy-dialog.tsx -#: apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx #: packages/ui/primitives/document-flow/add-subject.tsx msgid "Copy" msgstr "Copier" @@ -2522,6 +2536,7 @@ msgid "Copy Shareable Link" msgstr "Copier le lien partageable" #: apps/remix/app/components/general/document/document-recipient-link-copy-dialog.tsx +#: apps/remix/app/components/general/document/document-page-view-recipients.tsx msgid "Copy Signing Links" msgstr "Copier les liens de signature" @@ -3646,7 +3661,6 @@ msgstr "Déposez votre document ici" #: apps/remix/app/components/general/envelope-editor/envelope-editor-fields-drag-drop.tsx #: packages/ui/primitives/template-flow/add-template-fields.tsx #: packages/ui/primitives/document-flow/add-fields.tsx -#: packages/lib/utils/fields.ts msgid "Dropdown" msgstr "Liste déroulante" @@ -4035,6 +4049,14 @@ msgstr "" msgid "Envelope Item Count" msgstr "" +#: packages/lib/utils/document-audit-logs.ts +msgid "Envelope item created" +msgstr "" + +#: packages/lib/utils/document-audit-logs.ts +msgid "Envelope item deleted" +msgstr "" + #: apps/remix/app/components/dialogs/envelope-redistribute-dialog.tsx msgid "Envelope resent" msgstr "" @@ -5544,7 +5566,6 @@ msgstr "Aucun destinataire correspondant à cette description n'a été trouvé. #: apps/remix/app/components/general/template/template-page-view-recipients.tsx #: apps/remix/app/components/general/document/document-recipient-link-copy-dialog.tsx #: apps/remix/app/components/general/document/document-page-view-recipients.tsx -#: apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx #: packages/ui/primitives/document-flow/add-subject.tsx msgid "No recipients" msgstr "Aucun destinataire" @@ -7066,6 +7087,10 @@ msgstr "Sélectionnez des membres ou groupes de membres à ajouter à l'équipe. msgid "Select members to add to this team" msgstr "Sélectionnez des membres à ajouter à cette équipe" +#: packages/lib/utils/fields.ts +msgid "Select Option" +msgstr "" + #: apps/remix/app/components/general/document-signing/document-signing-auth-passkey.tsx msgid "Select passkey" msgstr "Sélectionner la clé d'authentification" @@ -7870,6 +7895,15 @@ msgstr "Synchroniser les domaines de messagerie" msgid "Sync failed, changes not saved" msgstr "" +#: packages/lib/utils/document-audit-logs.ts +msgctxt "Audit log format" +msgid "System auto inserted fields" +msgstr "" + +#: packages/lib/utils/document-audit-logs.ts +msgid "System auto inserted fields" +msgstr "" + #: apps/remix/app/routes/_unauthenticated+/articles.signature-disclosure.tsx msgid "System Requirements" msgstr "Exigences du système" @@ -8412,7 +8446,6 @@ msgstr "Le nom du signataire" #: apps/remix/app/components/general/avatar-with-recipient.tsx #: apps/remix/app/components/general/document/document-recipient-link-copy-dialog.tsx #: apps/remix/app/components/general/document/document-page-view-recipients.tsx -#: apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx #: packages/ui/primitives/document-flow/add-subject.tsx msgid "The signing link has been copied to your clipboard." msgstr "Le lien de signature a été copié dans votre presse-papiers." diff --git a/packages/lib/translations/it/web.po b/packages/lib/translations/it/web.po index ec061fde5..96fb4fd2b 100644 --- a/packages/lib/translations/it/web.po +++ b/packages/lib/translations/it/web.po @@ -262,10 +262,20 @@ msgstr "{prefix} ha aggiunto un campo" msgid "{prefix} added a recipient" msgstr "{prefix} ha aggiunto un destinatario" +#. placeholder {0}: data.envelopeItemTitle +#: packages/lib/utils/document-audit-logs.ts +msgid "{prefix} created an envelope item with title {0}" +msgstr "" + #: packages/lib/utils/document-audit-logs.ts msgid "{prefix} created the document" msgstr "{prefix} ha creato il documento" +#. placeholder {0}: data.envelopeItemTitle +#: packages/lib/utils/document-audit-logs.ts +msgid "{prefix} deleted an envelope item with title {0}" +msgstr "" + #: packages/lib/utils/document-audit-logs.ts msgid "{prefix} deleted the document" msgstr "{prefix} ha eliminato il documento" @@ -356,6 +366,7 @@ msgstr "{recipientActionVerb} documento" msgid "{recipientActionVerb} the document to complete the process." msgstr "{recipientActionVerb} il documento per completare il processo." +#: apps/remix/app/components/general/document/document-certificate-qr-view.tsx #: apps/remix/app/components/general/document/document-certificate-qr-view.tsx msgid "{recipientCount} recipients" msgstr "{recipientCount} destinatari" @@ -1742,8 +1753,9 @@ msgstr "" #: apps/remix/app/components/general/document/document-attachments-popover.tsx msgid "Attachment removed successfully." -msgstr "" +msgstr "<<<<<<< Updated upstream=======" +#: apps/remix/app/components/general/document-signing/document-signing-page-view-v2.tsx #: apps/remix/app/components/general/document-signing/document-signing-attachments-popover.tsx #: apps/remix/app/components/general/document-signing/document-signing-attachments-popover.tsx #: apps/remix/app/components/general/document/document-attachments-popover.tsx @@ -2158,6 +2170,10 @@ msgstr "Cancella filtri" msgid "Clear Signature" msgstr "Cancella firma" +#: apps/remix/app/components/general/envelope-editor/envelope-editor-fields-page.tsx +msgid "Click here to add a recipient" +msgstr "" + #: apps/remix/app/components/tables/settings-public-profile-templates-table.tsx msgid "Click here to get started" msgstr "Clicca qui per iniziare" @@ -2280,6 +2296,7 @@ msgstr "Documenti Completati" msgid "Completed Documents" msgstr "Documenti Completati" +#: apps/remix/app/components/general/document/document-certificate-qr-view.tsx #: apps/remix/app/components/general/document/document-certificate-qr-view.tsx msgid "Completed on {formattedDate}" msgstr "Completato il {formattedDate}" @@ -2479,7 +2496,6 @@ msgid "Controls which signatures are allowed to be used when signing a document. msgstr "Controlla quali firme sono consentite per firmare un documento." #: apps/remix/app/components/general/document/document-recipient-link-copy-dialog.tsx -#: apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx #: packages/ui/primitives/document-flow/add-subject.tsx msgid "Copied" msgstr "Copiato" @@ -2497,14 +2513,12 @@ msgstr "Copiato" #: apps/remix/app/components/dialogs/organisation-email-domain-records-dialog.tsx #: apps/remix/app/components/dialogs/organisation-email-domain-records-dialog.tsx #: apps/remix/app/components/dialogs/organisation-email-domain-records-dialog.tsx -#: apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx #: packages/ui/primitives/document-flow/add-subject.tsx #: packages/ui/components/document/document-share-button.tsx msgid "Copied to clipboard" msgstr "Copiato negli appunti" #: apps/remix/app/components/general/document/document-recipient-link-copy-dialog.tsx -#: apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx #: packages/ui/primitives/document-flow/add-subject.tsx msgid "Copy" msgstr "Copia" @@ -2522,6 +2536,7 @@ msgid "Copy Shareable Link" msgstr "Copia il Link Condivisibile" #: apps/remix/app/components/general/document/document-recipient-link-copy-dialog.tsx +#: apps/remix/app/components/general/document/document-page-view-recipients.tsx msgid "Copy Signing Links" msgstr "Copia link di firma" @@ -3646,7 +3661,6 @@ msgstr "Rilascia qui il tuo documento" #: apps/remix/app/components/general/envelope-editor/envelope-editor-fields-drag-drop.tsx #: packages/ui/primitives/template-flow/add-template-fields.tsx #: packages/ui/primitives/document-flow/add-fields.tsx -#: packages/lib/utils/fields.ts msgid "Dropdown" msgstr "Menu a tendina" @@ -4035,6 +4049,14 @@ msgstr "" msgid "Envelope Item Count" msgstr "" +#: packages/lib/utils/document-audit-logs.ts +msgid "Envelope item created" +msgstr "" + +#: packages/lib/utils/document-audit-logs.ts +msgid "Envelope item deleted" +msgstr "" + #: apps/remix/app/components/dialogs/envelope-redistribute-dialog.tsx msgid "Envelope resent" msgstr "" @@ -5544,7 +5566,6 @@ msgstr "Nessun destinatario corrispondente a questa descrizione è stato trovato #: apps/remix/app/components/general/template/template-page-view-recipients.tsx #: apps/remix/app/components/general/document/document-recipient-link-copy-dialog.tsx #: apps/remix/app/components/general/document/document-page-view-recipients.tsx -#: apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx #: packages/ui/primitives/document-flow/add-subject.tsx msgid "No recipients" msgstr "Nessun destinatario" @@ -7066,6 +7087,10 @@ msgstr "Seleziona membri o gruppi di membri da aggiungere al team." msgid "Select members to add to this team" msgstr "Seleziona membri da aggiungere a questo team" +#: packages/lib/utils/fields.ts +msgid "Select Option" +msgstr "" + #: apps/remix/app/components/general/document-signing/document-signing-auth-passkey.tsx msgid "Select passkey" msgstr "Seleziona una chiave di accesso" @@ -7870,6 +7895,15 @@ msgstr "Sincronizza Domini Email" msgid "Sync failed, changes not saved" msgstr "" +#: packages/lib/utils/document-audit-logs.ts +msgctxt "Audit log format" +msgid "System auto inserted fields" +msgstr "" + +#: packages/lib/utils/document-audit-logs.ts +msgid "System auto inserted fields" +msgstr "" + #: apps/remix/app/routes/_unauthenticated+/articles.signature-disclosure.tsx msgid "System Requirements" msgstr "Requisiti di sistema" @@ -8420,7 +8454,6 @@ msgstr "Il nome del firmatario" #: apps/remix/app/components/general/avatar-with-recipient.tsx #: apps/remix/app/components/general/document/document-recipient-link-copy-dialog.tsx #: apps/remix/app/components/general/document/document-page-view-recipients.tsx -#: apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx #: packages/ui/primitives/document-flow/add-subject.tsx msgid "The signing link has been copied to your clipboard." msgstr "Il link di firma è stato copiato negli appunti." diff --git a/packages/lib/translations/pl/web.po b/packages/lib/translations/pl/web.po index 7958f9cb5..3239ebb9b 100644 --- a/packages/lib/translations/pl/web.po +++ b/packages/lib/translations/pl/web.po @@ -262,10 +262,20 @@ msgstr "Użytkownik {prefix} dodał pole" msgid "{prefix} added a recipient" msgstr "Użytkownik {prefix} dodał odbiorcę" +#. placeholder {0}: data.envelopeItemTitle +#: packages/lib/utils/document-audit-logs.ts +msgid "{prefix} created an envelope item with title {0}" +msgstr "" + #: packages/lib/utils/document-audit-logs.ts msgid "{prefix} created the document" msgstr "Użytkownik {prefix} utworzył dokument" +#. placeholder {0}: data.envelopeItemTitle +#: packages/lib/utils/document-audit-logs.ts +msgid "{prefix} deleted an envelope item with title {0}" +msgstr "" + #: packages/lib/utils/document-audit-logs.ts msgid "{prefix} deleted the document" msgstr "Użytkownik {prefix} usunął dokument" @@ -356,6 +366,7 @@ msgstr "{recipientActionVerb} dokument" msgid "{recipientActionVerb} the document to complete the process." msgstr "Sprawdź i {recipientActionVerb} dokument, aby zakończyć proces." +#: apps/remix/app/components/general/document/document-certificate-qr-view.tsx #: apps/remix/app/components/general/document/document-certificate-qr-view.tsx msgid "{recipientCount} recipients" msgstr "{recipientCount} odbiorców" @@ -1742,8 +1753,9 @@ msgstr "" #: apps/remix/app/components/general/document/document-attachments-popover.tsx msgid "Attachment removed successfully." -msgstr "" +msgstr "<<<<<<< Updated upstream=======" +#: apps/remix/app/components/general/document-signing/document-signing-page-view-v2.tsx #: apps/remix/app/components/general/document-signing/document-signing-attachments-popover.tsx #: apps/remix/app/components/general/document-signing/document-signing-attachments-popover.tsx #: apps/remix/app/components/general/document/document-attachments-popover.tsx @@ -2158,6 +2170,10 @@ msgstr "Wyczyść filtry" msgid "Clear Signature" msgstr "Wyczyść podpis" +#: apps/remix/app/components/general/envelope-editor/envelope-editor-fields-page.tsx +msgid "Click here to add a recipient" +msgstr "" + #: apps/remix/app/components/tables/settings-public-profile-templates-table.tsx msgid "Click here to get started" msgstr "Kliknij, aby rozpocząć" @@ -2280,6 +2296,7 @@ msgstr "Dokumenty zakończone" msgid "Completed Documents" msgstr "Zakończone dokumenty" +#: apps/remix/app/components/general/document/document-certificate-qr-view.tsx #: apps/remix/app/components/general/document/document-certificate-qr-view.tsx msgid "Completed on {formattedDate}" msgstr "Zakończono {formattedDate}" @@ -2479,7 +2496,6 @@ msgid "Controls which signatures are allowed to be used when signing a document. msgstr "Kontroluje, które podpisy są dozwolone do użycia podczas podpisywania dokumentu." #: apps/remix/app/components/general/document/document-recipient-link-copy-dialog.tsx -#: apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx #: packages/ui/primitives/document-flow/add-subject.tsx msgid "Copied" msgstr "Skopiowano" @@ -2497,14 +2513,12 @@ msgstr "Skopiowano" #: apps/remix/app/components/dialogs/organisation-email-domain-records-dialog.tsx #: apps/remix/app/components/dialogs/organisation-email-domain-records-dialog.tsx #: apps/remix/app/components/dialogs/organisation-email-domain-records-dialog.tsx -#: apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx #: packages/ui/primitives/document-flow/add-subject.tsx #: packages/ui/components/document/document-share-button.tsx msgid "Copied to clipboard" msgstr "Skopiowano do schowka" #: apps/remix/app/components/general/document/document-recipient-link-copy-dialog.tsx -#: apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx #: packages/ui/primitives/document-flow/add-subject.tsx msgid "Copy" msgstr "Kopiuj" @@ -2522,6 +2536,7 @@ msgid "Copy Shareable Link" msgstr "Kopiuj udostępniany link" #: apps/remix/app/components/general/document/document-recipient-link-copy-dialog.tsx +#: apps/remix/app/components/general/document/document-page-view-recipients.tsx msgid "Copy Signing Links" msgstr "Kopiuj linki do podpisania" @@ -3646,7 +3661,6 @@ msgstr "Upuść swój dokument tutaj" #: apps/remix/app/components/general/envelope-editor/envelope-editor-fields-drag-drop.tsx #: packages/ui/primitives/template-flow/add-template-fields.tsx #: packages/ui/primitives/document-flow/add-fields.tsx -#: packages/lib/utils/fields.ts msgid "Dropdown" msgstr "Lista rozwijana" @@ -4035,6 +4049,14 @@ msgstr "" msgid "Envelope Item Count" msgstr "" +#: packages/lib/utils/document-audit-logs.ts +msgid "Envelope item created" +msgstr "" + +#: packages/lib/utils/document-audit-logs.ts +msgid "Envelope item deleted" +msgstr "" + #: apps/remix/app/components/dialogs/envelope-redistribute-dialog.tsx msgid "Envelope resent" msgstr "" @@ -5544,7 +5566,6 @@ msgstr "Nie znaleziono odbiorcy pasującego do tego opisu." #: apps/remix/app/components/general/template/template-page-view-recipients.tsx #: apps/remix/app/components/general/document/document-recipient-link-copy-dialog.tsx #: apps/remix/app/components/general/document/document-page-view-recipients.tsx -#: apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx #: packages/ui/primitives/document-flow/add-subject.tsx msgid "No recipients" msgstr "Brak odbiorców" @@ -7066,6 +7087,10 @@ msgstr "Wybierz członków lub grupy członków, aby dodać do zespołu." msgid "Select members to add to this team" msgstr "Wybierz członków, aby dodać do tego zespołu" +#: packages/lib/utils/fields.ts +msgid "Select Option" +msgstr "" + #: apps/remix/app/components/general/document-signing/document-signing-auth-passkey.tsx msgid "Select passkey" msgstr "Wybierz klucz uwierzytelniający" @@ -7870,6 +7895,15 @@ msgstr "Synchronizuj domeny e-mail" msgid "Sync failed, changes not saved" msgstr "" +#: packages/lib/utils/document-audit-logs.ts +msgctxt "Audit log format" +msgid "System auto inserted fields" +msgstr "" + +#: packages/lib/utils/document-audit-logs.ts +msgid "System auto inserted fields" +msgstr "" + #: apps/remix/app/routes/_unauthenticated+/articles.signature-disclosure.tsx msgid "System Requirements" msgstr "Wymagania systemowe" @@ -8412,7 +8446,6 @@ msgstr "Nazwa podpisującego" #: apps/remix/app/components/general/avatar-with-recipient.tsx #: apps/remix/app/components/general/document/document-recipient-link-copy-dialog.tsx #: apps/remix/app/components/general/document/document-page-view-recipients.tsx -#: apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx #: packages/ui/primitives/document-flow/add-subject.tsx msgid "The signing link has been copied to your clipboard." msgstr "Link do podpisu został skopiowany do schowka." diff --git a/packages/lib/types/document-audit-logs.ts b/packages/lib/types/document-audit-logs.ts index 9c6529c6e..05be5fc35 100644 --- a/packages/lib/types/document-audit-logs.ts +++ b/packages/lib/types/document-audit-logs.ts @@ -21,10 +21,14 @@ export const ZDocumentAuditLogTypeSchema = z.enum([ 'RECIPIENT_DELETED', 'RECIPIENT_UPDATED', + 'ENVELOPE_ITEM_CREATED', + 'ENVELOPE_ITEM_DELETED', + // Document events. 'DOCUMENT_COMPLETED', // When the document is sealed and fully completed. 'DOCUMENT_CREATED', // When the document is created. 'DOCUMENT_DELETED', // When the document is soft deleted. + 'DOCUMENT_FIELDS_AUTO_INSERTED', // When a field is auto inserted during send due to default values (radio/dropdown/checkbox). 'DOCUMENT_FIELD_INSERTED', // When a field is inserted (signed/approved/etc) by a recipient. 'DOCUMENT_FIELD_UNINSERTED', // When a field is uninserted by a recipient. 'DOCUMENT_FIELD_PREFILLED', // When a field is prefilled by an assistant. @@ -181,6 +185,28 @@ const ZBaseRecipientDataSchema = z.object({ recipientRole: z.string(), }); +/** + * Event: Envelope item created. + */ +export const ZDocumentAuditLogEventEnvelopeItemCreatedSchema = z.object({ + type: z.literal(DOCUMENT_AUDIT_LOG_TYPE.ENVELOPE_ITEM_CREATED), + data: z.object({ + envelopeItemId: z.string(), + envelopeItemTitle: z.string(), + }), +}); + +/** + * Event: Envelope item deleted. + */ +export const ZDocumentAuditLogEventEnvelopeItemDeletedSchema = z.object({ + type: z.literal(DOCUMENT_AUDIT_LOG_TYPE.ENVELOPE_ITEM_DELETED), + data: z.object({ + envelopeItemId: z.string(), + envelopeItemTitle: z.string(), + }), +}); + /** * Event: Email sent. */ @@ -315,6 +341,22 @@ export const ZDocumentAuditLogEventDocumentFieldInsertedSchema = z.object({ }), }); +/** + * Event: Document field auto inserted. + */ +export const ZDocumentAuditLogEventDocumentFieldsAutoInsertedSchema = z.object({ + type: z.literal(DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_FIELDS_AUTO_INSERTED), + data: z.object({ + fields: z.array( + z.object({ + fieldId: z.number(), + fieldType: z.nativeEnum(FieldType), + recipientId: z.number(), + }), + ), + }), +}); + /** * Event: Document field uninserted. */ @@ -652,11 +694,14 @@ export const ZDocumentAuditLogBaseSchema = z.object({ export const ZDocumentAuditLogSchema = ZDocumentAuditLogBaseSchema.and( z.union([ + ZDocumentAuditLogEventEnvelopeItemCreatedSchema, + ZDocumentAuditLogEventEnvelopeItemDeletedSchema, ZDocumentAuditLogEventEmailSentSchema, ZDocumentAuditLogEventDocumentCompletedSchema, ZDocumentAuditLogEventDocumentCreatedSchema, ZDocumentAuditLogEventDocumentDeletedSchema, ZDocumentAuditLogEventDocumentMovedToTeamSchema, + ZDocumentAuditLogEventDocumentFieldsAutoInsertedSchema, ZDocumentAuditLogEventDocumentFieldInsertedSchema, ZDocumentAuditLogEventDocumentFieldUninsertedSchema, ZDocumentAuditLogEventDocumentFieldPrefilledSchema, diff --git a/packages/lib/types/field.ts b/packages/lib/types/field.ts index 185d2f94f..133bfc671 100644 --- a/packages/lib/types/field.ts +++ b/packages/lib/types/field.ts @@ -71,7 +71,6 @@ export const ZFieldHeightSchema = z.number().min(1).describe('The height of the // --------------------------------------------- -// Todo: Envelopes - dunno man const PrismaDecimalSchema = z.preprocess( (val) => (typeof val === 'string' ? new Prisma.Decimal(val) : val), z.instanceof(Prisma.Decimal, { message: 'Must be a Decimal' }), diff --git a/packages/lib/universal/field-renderer/field-generic-items.ts b/packages/lib/universal/field-renderer/field-generic-items.ts index e91d43c8c..9b5d948b1 100644 --- a/packages/lib/universal/field-renderer/field-generic-items.ts +++ b/packages/lib/universal/field-renderer/field-generic-items.ts @@ -129,3 +129,58 @@ export const createSpinner = ({ return loadingGroup; }; + +type CreateFieldHoverInteractionOptions = { + options: RenderFieldElementOptions; + fieldGroup: Konva.Group; + fieldRect: Konva.Rect; +}; + +/** + * Adds smooth transition-like behavior for hover effects to the field group and rectangle. + */ +export const createFieldHoverInteraction = ({ + options, + fieldGroup, + fieldRect, +}: CreateFieldHoverInteractionOptions) => { + const { mode } = options; + + if (mode === 'export' || !options.color) { + return; + } + + const hoverColor = RECIPIENT_COLOR_STYLES[options.color].baseRingHover; + + fieldGroup.on('mouseover', () => { + new Konva.Tween({ + node: fieldRect, + duration: 0.3, + fill: hoverColor, + }).play(); + }); + + fieldGroup.on('mouseout', () => { + new Konva.Tween({ + node: fieldRect, + duration: 0.3, + fill: DEFAULT_RECT_BACKGROUND, + }).play(); + }); + + fieldGroup.on('transformstart', () => { + new Konva.Tween({ + node: fieldRect, + duration: 0.3, + fill: hoverColor, + }).play(); + }); + + fieldGroup.on('transformend', () => { + new Konva.Tween({ + node: fieldRect, + duration: 0.3, + fill: DEFAULT_RECT_BACKGROUND, + }).play(); + }); +}; diff --git a/packages/lib/universal/field-renderer/render-checkbox-field.ts b/packages/lib/universal/field-renderer/render-checkbox-field.ts index f5ddb734e..28a2cefdc 100644 --- a/packages/lib/universal/field-renderer/render-checkbox-field.ts +++ b/packages/lib/universal/field-renderer/render-checkbox-field.ts @@ -4,6 +4,7 @@ import { match } from 'ts-pattern'; import { DEFAULT_STANDARD_FONT_SIZE } from '../../constants/pdf'; import type { TCheckboxFieldMeta } from '../../types/field-meta'; import { + createFieldHoverInteraction, konvaTextFill, konvaTextFontFamily, upsertFieldGroup, @@ -26,25 +27,27 @@ export const renderCheckboxFieldElement = ( ) => { const { pageWidth, pageHeight, pageLayer, mode } = options; - const isFirstRender = !pageLayer.findOne(`#${field.renderId}`); - - const fieldGroup = upsertFieldGroup(field, options); - - // Clear previous children and listeners to re-render fresh. - fieldGroup.removeChildren(); - fieldGroup.off('transform'); - - fieldGroup.add(upsertFieldRect(field, options)); + const { fieldWidth, fieldHeight } = calculateFieldPosition(field, pageWidth, pageHeight); const checkboxMeta: TCheckboxFieldMeta | null = (field.fieldMeta as TCheckboxFieldMeta) || null; const checkboxValues = checkboxMeta?.values || []; - const fontSize = checkboxMeta?.fontSize || DEFAULT_STANDARD_FONT_SIZE; + const isFirstRender = !pageLayer.findOne(`#${field.renderId}`); + + // Clear previous children and listeners to re-render fresh. + const fieldGroup = upsertFieldGroup(field, options); + fieldGroup.removeChildren(); + fieldGroup.off('transform'); if (isFirstRender) { pageLayer.add(fieldGroup); } + const fieldRect = upsertFieldRect(field, options); + fieldGroup.add(fieldRect); + + const fontSize = checkboxMeta?.fontSize || DEFAULT_STANDARD_FONT_SIZE; + // Handle rescaling items during transforms. fieldGroup.on('transform', () => { const groupScaleX = fieldGroup.scaleX(); @@ -127,11 +130,9 @@ export const renderCheckboxFieldElement = ( pageLayer.batchDraw(); }); - const { fieldWidth, fieldHeight } = calculateFieldPosition(field, pageWidth, pageHeight); - const checkedValues: number[] = field.customText ? JSON.parse(field.customText) : []; - checkboxValues.forEach(({ id, value, checked }, index) => { + checkboxValues.forEach(({ value, checked }, index) => { const isCheckboxChecked = match(mode) .with('edit', () => checked) .with('sign', () => checkedValues.includes(index)) @@ -145,8 +146,6 @@ export const renderCheckboxFieldElement = ( }) .exhaustive(); - console.log('wtf?'); - const itemSize = calculateCheckboxSize(fontSize); const { itemInputX, itemInputY, textX, textY, textWidth, textHeight } = @@ -211,6 +210,8 @@ export const renderCheckboxFieldElement = ( fieldGroup.add(text); }); + createFieldHoverInteraction({ fieldGroup, fieldRect, options }); + return { fieldGroup, isFirstRender, diff --git a/packages/lib/universal/field-renderer/render-dropdown-field.ts b/packages/lib/universal/field-renderer/render-dropdown-field.ts index bad4c9570..15dd03e14 100644 --- a/packages/lib/universal/field-renderer/render-dropdown-field.ts +++ b/packages/lib/universal/field-renderer/render-dropdown-field.ts @@ -1,8 +1,10 @@ +import { FieldType } from '@prisma/client'; import Konva from 'konva'; import { DEFAULT_STANDARD_FONT_SIZE } from '../../constants/pdf'; import type { TDropdownFieldMeta } from '../../types/field-meta'; import { + createFieldHoverInteraction, konvaTextFill, konvaTextFontFamily, upsertFieldGroup, @@ -48,79 +50,30 @@ export const renderDropdownFieldElement = ( field: FieldToRender, options: RenderFieldElementOptions, ) => { - const { pageWidth, pageHeight, pageLayer, mode } = options; + const { pageWidth, pageHeight, pageLayer, mode, translations } = options; + + const { fieldWidth, fieldHeight } = calculateFieldPosition(field, pageWidth, pageHeight); + + const dropdownMeta: TDropdownFieldMeta | null = (field.fieldMeta as TDropdownFieldMeta) || null; + + let selectedValue = translations?.[FieldType.DROPDOWN] || 'Select Option'; const isFirstRender = !pageLayer.findOne(`#${field.renderId}`); - const fieldGroup = upsertFieldGroup(field, options); - // Clear previous children to re-render fresh. + const fieldGroup = upsertFieldGroup(field, options); fieldGroup.removeChildren(); + fieldGroup.off('transform'); - fieldGroup.add(upsertFieldRect(field, options)); + const fieldRect = upsertFieldRect(field, options); + fieldGroup.add(fieldRect); if (isFirstRender) { pageLayer.add(fieldGroup); - - fieldGroup.on('transform', () => { - const groupScaleX = fieldGroup.scaleX(); - const groupScaleY = fieldGroup.scaleY(); - - const fieldRect = fieldGroup.findOne('.field-rect'); - const text = fieldGroup.findOne('.dropdown-selected-text'); - const arrow = fieldGroup.findOne('.dropdown-arrow'); - - if (!fieldRect || !text || !arrow) { - console.log('fieldRect or text or arrow not found'); - return; - } - - const rectWidth = fieldRect.width() * groupScaleX; - const rectHeight = fieldRect.height() * groupScaleY; - - const { arrowX, arrowY, textX, textY, textWidth, textHeight } = calculateDropdownPosition({ - fieldWidth: rectWidth, - fieldHeight: rectHeight, - }); - - arrow.setAttrs({ - x: arrowX, - y: arrowY, - scaleX: 1, - scaleY: 1, - }); - - text.setAttrs({ - scaleX: 1, - scaleY: 1, - x: textX, - y: textY, - width: textWidth, - height: textHeight, - }); - - fieldRect.setAttrs({ - width: rectWidth, - height: rectHeight, - }); - - fieldGroup.scale({ - x: 1, - y: 1, - }); - - pageLayer.batchDraw(); - }); } - const dropdownMeta: TDropdownFieldMeta | null = (field.fieldMeta as TDropdownFieldMeta) || null; - const { fieldWidth, fieldHeight } = calculateFieldPosition(field, pageWidth, pageHeight); - const fontSize = dropdownMeta?.fontSize || DEFAULT_STANDARD_FONT_SIZE; - // Todo: Envelopes - Translations - let selectedValue = 'Select Option'; - if (field.inserted) { selectedValue = field.customText; } @@ -158,27 +111,63 @@ export const renderDropdownFieldElement = ( visible: mode !== 'export', }); - // Add hover state for dropdown - fieldGroup.on('mouseenter', () => { - // dropdownContainer.stroke('#2563EB'); - // dropdownContainer.strokeWidth(2); - document.body.style.cursor = 'pointer'; - pageLayer.batchDraw(); - }); - - fieldGroup.on('mouseleave', () => { - // dropdownContainer.stroke('#374151'); - // dropdownContainer.strokeWidth(2); - document.body.style.cursor = 'default'; - pageLayer.batchDraw(); - }); - fieldGroup.add(selectedText); if (!field.inserted || mode === 'export') { fieldGroup.add(arrow); } + fieldGroup.on('transform', () => { + const groupScaleX = fieldGroup.scaleX(); + const groupScaleY = fieldGroup.scaleY(); + + const fieldRect = fieldGroup.findOne('.field-rect'); + const text = fieldGroup.findOne('.dropdown-selected-text'); + const arrow = fieldGroup.findOne('.dropdown-arrow'); + + if (!fieldRect || !text || !arrow) { + return; + } + + const rectWidth = fieldRect.width() * groupScaleX; + const rectHeight = fieldRect.height() * groupScaleY; + + const { arrowX, arrowY, textX, textY, textWidth, textHeight } = calculateDropdownPosition({ + fieldWidth: rectWidth, + fieldHeight: rectHeight, + }); + + arrow.setAttrs({ + x: arrowX, + y: arrowY, + scaleX: 1, + scaleY: 1, + }); + + text.setAttrs({ + scaleX: 1, + scaleY: 1, + x: textX, + y: textY, + width: textWidth, + height: textHeight, + }); + + fieldRect.setAttrs({ + width: rectWidth, + height: rectHeight, + }); + + fieldGroup.scale({ + x: 1, + y: 1, + }); + + pageLayer.batchDraw(); + }); + + createFieldHoverInteraction({ fieldGroup, fieldRect, options }); + return { fieldGroup, isFirstRender, diff --git a/packages/lib/universal/field-renderer/render-radio-field.ts b/packages/lib/universal/field-renderer/render-radio-field.ts index b1eb607ff..fa329938a 100644 --- a/packages/lib/universal/field-renderer/render-radio-field.ts +++ b/packages/lib/universal/field-renderer/render-radio-field.ts @@ -4,6 +4,7 @@ import { match } from 'ts-pattern'; import { DEFAULT_STANDARD_FONT_SIZE } from '../../constants/pdf'; import type { TRadioFieldMeta } from '../../types/field-meta'; import { + createFieldHoverInteraction, konvaTextFill, konvaTextFontFamily, upsertFieldGroup, @@ -26,25 +27,24 @@ export const renderRadioFieldElement = ( ) => { const { pageWidth, pageHeight, pageLayer, mode } = options; - const isFirstRender = !pageLayer.findOne(`#${field.renderId}`); - - const fieldGroup = upsertFieldGroup(field, options); - - // Clear previous children to re-render fresh - fieldGroup.removeChildren(); - - fieldGroup.add(upsertFieldRect(field, options)); - const radioMeta: TRadioFieldMeta | null = (field.fieldMeta as TRadioFieldMeta) || null; const radioValues = radioMeta?.values || []; - const fontSize = radioMeta?.fontSize || DEFAULT_STANDARD_FONT_SIZE; + const isFirstRender = !pageLayer.findOne(`#${field.renderId}`); + + // Clear previous children and listeners to re-render fresh + const fieldGroup = upsertFieldGroup(field, options); + fieldGroup.removeChildren(); + fieldGroup.off('transform'); if (isFirstRender) { pageLayer.add(fieldGroup); } - fieldGroup.off('transform'); + const fieldRect = upsertFieldRect(field, options); + fieldGroup.add(fieldRect); + + const fontSize = radioMeta?.fontSize || DEFAULT_STANDARD_FONT_SIZE; // Handle rescaling items during transforms. fieldGroup.on('transform', () => { @@ -195,6 +195,8 @@ export const renderRadioFieldElement = ( fieldGroup.add(text); }); + createFieldHoverInteraction({ fieldGroup, fieldRect, options }); + return { fieldGroup, isFirstRender, diff --git a/packages/lib/universal/field-renderer/render-signature-field.ts b/packages/lib/universal/field-renderer/render-signature-field.ts index e09c5fe0a..2b8877484 100644 --- a/packages/lib/universal/field-renderer/render-signature-field.ts +++ b/packages/lib/universal/field-renderer/render-signature-field.ts @@ -1,13 +1,12 @@ import Konva from 'konva'; -import { - DEFAULT_RECT_BACKGROUND, - RECIPIENT_COLOR_STYLES, -} from '@documenso/ui/lib/recipient-colors'; - import { DEFAULT_SIGNATURE_TEXT_FONT_SIZE } from '../../constants/pdf'; import { AppError } from '../../errors/app-error'; -import { upsertFieldGroup, upsertFieldRect } from './field-generic-items'; +import { + createFieldHoverInteraction, + upsertFieldGroup, + upsertFieldRect, +} from './field-generic-items'; import { calculateFieldPosition } from './field-renderer'; import type { FieldToRender, RenderFieldElementOptions } from './field-renderer'; @@ -212,33 +211,7 @@ export const renderSignatureFieldElement = ( fieldRect.opacity(0); } - // Todo: Doesn't work. - if (mode !== 'export') { - const hoverColor = options.color - ? RECIPIENT_COLOR_STYLES[options.color].baseRingHover - : '#e5e7eb'; - - // Todo: Envelopes - On hover add text color - - // Add smooth transition-like behavior for hover effects - fieldGroup.on('mouseover', () => { - new Konva.Tween({ - node: fieldRect, - duration: 0.3, - fill: hoverColor, - }).play(); - }); - - fieldGroup.on('mouseout', () => { - new Konva.Tween({ - node: fieldRect, - duration: 0.3, - fill: DEFAULT_RECT_BACKGROUND, - }).play(); - }); - - fieldGroup.add(fieldRect); - } + createFieldHoverInteraction({ fieldGroup, fieldRect, options }); return { fieldGroup, diff --git a/packages/lib/universal/field-renderer/render-text-field.ts b/packages/lib/universal/field-renderer/render-text-field.ts index 919a60a31..c1fc95227 100644 --- a/packages/lib/universal/field-renderer/render-text-field.ts +++ b/packages/lib/universal/field-renderer/render-text-field.ts @@ -1,13 +1,9 @@ import Konva from 'konva'; -import { - DEFAULT_RECT_BACKGROUND, - RECIPIENT_COLOR_STYLES, -} from '@documenso/ui/lib/recipient-colors'; - import { DEFAULT_STANDARD_FONT_SIZE } from '../../constants/pdf'; import type { TTextFieldMeta } from '../../types/field-meta'; import { + createFieldHoverInteraction, konvaTextFill, konvaTextFontFamily, upsertFieldGroup, @@ -19,12 +15,12 @@ import { calculateFieldPosition } from './field-renderer'; const upsertFieldText = (field: FieldToRender, options: RenderFieldElementOptions): Konva.Text => { const { pageWidth, pageHeight, mode = 'edit', pageLayer, translations } = options; - const fieldTypeName = translations?.[field.type] || field.type; - const { fieldWidth, fieldHeight } = calculateFieldPosition(field, pageWidth, pageHeight); const textMeta = field.fieldMeta as TTextFieldMeta | undefined; + const fieldTypeName = translations?.[field.type] || field.type; + const fieldText: Konva.Text = pageLayer.findOne(`#${field.renderId}-text`) || new Konva.Text({ @@ -118,9 +114,8 @@ export const renderTextFieldElement = ( const isFirstRender = !pageLayer.findOne(`#${field.renderId}`); - const fieldGroup = upsertFieldGroup(field, options); - // Clear previous children and listeners to re-render fresh. + const fieldGroup = upsertFieldGroup(field, options); fieldGroup.removeChildren(); fieldGroup.off('transform'); @@ -183,33 +178,7 @@ export const renderTextFieldElement = ( fieldRect.opacity(0); } - // Todo: Doesn't work. - if (mode !== 'export') { - const hoverColor = options.color - ? RECIPIENT_COLOR_STYLES[options.color].baseRingHover - : '#e5e7eb'; - - // Todo: Envelopes - On hover add text color - - // Add smooth transition-like behavior for hover effects - fieldGroup.on('mouseover', () => { - new Konva.Tween({ - node: fieldRect, - duration: 0.3, - fill: hoverColor, - }).play(); - }); - - fieldGroup.on('mouseout', () => { - new Konva.Tween({ - node: fieldRect, - duration: 0.3, - fill: DEFAULT_RECT_BACKGROUND, - }).play(); - }); - - fieldGroup.add(fieldRect); - } + createFieldHoverInteraction({ fieldGroup, fieldRect, options }); return { fieldGroup, diff --git a/packages/lib/utils/document-audit-logs.ts b/packages/lib/utils/document-audit-logs.ts index dc7788e83..767de4677 100644 --- a/packages/lib/utils/document-audit-logs.ts +++ b/packages/lib/utils/document-audit-logs.ts @@ -353,6 +353,13 @@ export const formatDocumentAuditLogAction = ( }), identified: msg`${prefix} deleted the document`, })) + .with({ type: DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_FIELDS_AUTO_INSERTED }, () => ({ + anonymous: msg({ + message: `System auto inserted fields`, + context: `Audit log format`, + }), + identified: msg`System auto inserted fields`, + })) .with({ type: DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_FIELD_INSERTED }, () => ({ anonymous: msg({ message: `Field signed`, @@ -515,6 +522,14 @@ export const formatDocumentAuditLogAction = ( context: `Audit log format`, }), })) + .with({ type: DOCUMENT_AUDIT_LOG_TYPE.ENVELOPE_ITEM_CREATED }, ({ data }) => ({ + anonymous: msg`Envelope item created`, + identified: msg`${prefix} created an envelope item with title ${data.envelopeItemTitle}`, + })) + .with({ type: DOCUMENT_AUDIT_LOG_TYPE.ENVELOPE_ITEM_DELETED }, ({ data }) => ({ + anonymous: msg`Envelope item deleted`, + identified: msg`${prefix} deleted an envelope item with title ${data.envelopeItemTitle}`, + })) .exhaustive(); return { diff --git a/packages/lib/utils/fields.ts b/packages/lib/utils/fields.ts index db2f9ad2c..d56fe084e 100644 --- a/packages/lib/utils/fields.ts +++ b/packages/lib/utils/fields.ts @@ -101,7 +101,7 @@ export const getClientSideFieldTranslations = ({ t }: I18n): Record { - const { user, teamId } = ctx; + const { user, teamId, metadata } = ctx; const { envelopeId, items } = input; ctx.logger.info({ @@ -110,17 +112,39 @@ export const createEnvelopeItemsRoute = authenticatedProcedure const currentHighestOrderValue = envelope.envelopeItems[envelope.envelopeItems.length - 1]?.order ?? 1; - const result = await prisma.envelopeItem.createManyAndReturn({ - data: items.map((item) => ({ - id: prefixedId('envelope_item'), - envelopeId, - title: item.title, - documentDataId: item.documentDataId, - order: currentHighestOrderValue + 1, - })), - include: { - documentData: true, - }, + const result = await prisma.$transaction(async (tx) => { + const createdItems = await tx.envelopeItem.createManyAndReturn({ + data: items.map((item) => ({ + id: prefixedId('envelope_item'), + envelopeId, + title: item.title, + documentDataId: item.documentDataId, + order: currentHighestOrderValue + 1, + })), + include: { + documentData: true, + }, + }); + + await tx.documentAuditLog.createMany({ + data: createdItems.map((item) => + createDocumentAuditLogData({ + type: DOCUMENT_AUDIT_LOG_TYPE.ENVELOPE_ITEM_CREATED, + envelopeId: envelope.id, + data: { + envelopeItemId: item.id, + envelopeItemTitle: item.title, + }, + user: { + name: user.name, + email: user.email, + }, + requestMetadata: metadata.requestMetadata, + }), + ), + }); + + return createdItems; }); return { diff --git a/packages/trpc/server/envelope-router/delete-envelope-item.ts b/packages/trpc/server/envelope-router/delete-envelope-item.ts index 7cc9d4bc8..832322d76 100644 --- a/packages/trpc/server/envelope-router/delete-envelope-item.ts +++ b/packages/trpc/server/envelope-router/delete-envelope-item.ts @@ -1,5 +1,7 @@ import { AppError, AppErrorCode } from '@documenso/lib/errors/app-error'; import { getEnvelopeWhereInput } from '@documenso/lib/server-only/envelope/get-envelope-by-id'; +import { DOCUMENT_AUDIT_LOG_TYPE } from '@documenso/lib/types/document-audit-logs'; +import { createDocumentAuditLogData } from '@documenso/lib/utils/document-audit-logs'; import { canEnvelopeItemsBeModified } from '@documenso/lib/utils/envelope'; import { prisma } from '@documenso/prisma'; @@ -13,7 +15,7 @@ export const deleteEnvelopeItemRoute = authenticatedProcedure .input(ZDeleteEnvelopeItemRequestSchema) .output(ZDeleteEnvelopeItemResponseSchema) .mutation(async ({ input, ctx }) => { - const { user, teamId } = ctx; + const { user, teamId, metadata } = ctx; const { envelopeId, envelopeItemId } = input; ctx.logger.info({ @@ -52,29 +54,48 @@ export const deleteEnvelopeItemRoute = authenticatedProcedure }); } - const deletedEnvelopeItem = await prisma.envelopeItem.delete({ - where: { - id: envelopeItemId, - envelopeId: envelope.id, - }, - select: { - documentData: { - select: { - id: true, + const result = await prisma.$transaction(async (tx) => { + const deletedEnvelopeItem = await tx.envelopeItem.delete({ + where: { + id: envelopeItemId, + envelopeId: envelope.id, + }, + select: { + id: true, + title: true, + documentData: { + select: { + id: true, + }, }, }, - }, + }); + + await tx.documentAuditLog.create({ + data: createDocumentAuditLogData({ + type: DOCUMENT_AUDIT_LOG_TYPE.ENVELOPE_ITEM_DELETED, + envelopeId: envelope.id, + data: { + envelopeItemId: deletedEnvelopeItem.id, + envelopeItemTitle: deletedEnvelopeItem.title, + }, + user: { + name: user.name, + email: user.email, + }, + requestMetadata: metadata.requestMetadata, + }), + }); + + return deletedEnvelopeItem; }); - // Todo: Envelopes [ASK] - Should we delete the document data? await prisma.documentData.delete({ where: { - id: deletedEnvelopeItem.documentData.id, + id: result.documentData.id, envelopeItem: { is: null, }, }, }); - - // Todo: Envelope [AUDIT_LOGS] }); diff --git a/packages/ui/components/recipient/recipient-action-auth-select.tsx b/packages/ui/components/recipient/recipient-action-auth-select.tsx index 37de3be2f..d49f5b158 100644 --- a/packages/ui/components/recipient/recipient-action-auth-select.tsx +++ b/packages/ui/components/recipient/recipient-action-auth-select.tsx @@ -10,6 +10,8 @@ import { RecipientActionAuth } from '@documenso/lib/types/document-auth'; import { MultiSelect, type Option } from '@documenso/ui/primitives/multiselect'; import { Tooltip, TooltipContent, TooltipTrigger } from '@documenso/ui/primitives/tooltip'; +import { cn } from '../../lib/utils'; + export interface RecipientActionAuthSelectProps { value?: string[]; defaultValue?: string[]; @@ -73,7 +75,11 @@ export const RecipientActionAuthSelect = ({ /> - + 0, + })} + > diff --git a/packages/ui/lib/recipient-colors.ts b/packages/ui/lib/recipient-colors.ts index c28abbcb4..76fbfaf11 100644 --- a/packages/ui/lib/recipient-colors.ts +++ b/packages/ui/lib/recipient-colors.ts @@ -9,6 +9,7 @@ export type RecipientColorStyles = { base: string; baseRing: string; baseRingHover: string; + baseTextHover: string; fieldButton: string; fieldItem: string; fieldItemInitials: string; @@ -24,6 +25,7 @@ export const RECIPIENT_COLOR_STYLES = { base: 'ring-neutral-400', baseRing: 'rgba(176, 176, 176, 1)', baseRingHover: 'rgba(176, 176, 176, 1)', + baseTextHover: 'rgba(176, 176, 176, 1)', fieldButton: 'border-neutral-400 hover:border-neutral-400', fieldItem: 'group/field-item rounded-[2px]', fieldItemInitials: '', @@ -36,6 +38,7 @@ export const RECIPIENT_COLOR_STYLES = { base: 'ring-recipient-green hover:bg-recipient-green/30', baseRing: 'rgba(122, 195, 85, 1)', baseRingHover: 'rgba(122, 195, 85, 0.3)', + baseTextHover: 'rgba(122, 195, 85, 1)', fieldButton: 'hover:border-recipient-green hover:bg-recipient-green/30 ', fieldItem: 'group/field-item rounded-[2px]', fieldItemInitials: 'group-hover/field-item:bg-recipient-green', @@ -48,6 +51,7 @@ export const RECIPIENT_COLOR_STYLES = { base: 'ring-recipient-blue hover:bg-recipient-blue/30', baseRing: 'rgba(56, 123, 199, 1)', baseRingHover: 'rgba(56, 123, 199, 0.3)', + baseTextHover: 'rgba(56, 123, 199, 1)', fieldButton: 'hover:border-recipient-blue hover:bg-recipient-blue/30', fieldItem: 'group/field-item rounded-[2px]', fieldItemInitials: 'group-hover/field-item:bg-recipient-blue', @@ -60,6 +64,7 @@ export const RECIPIENT_COLOR_STYLES = { base: 'ring-recipient-purple hover:bg-recipient-purple/30', baseRing: 'rgba(151, 71, 255, 1)', baseRingHover: 'rgba(151, 71, 255, 0.3)', + baseTextHover: 'rgba(151, 71, 255, 1)', fieldButton: 'hover:border-recipient-purple hover:bg-recipient-purple/30', fieldItem: 'group/field-item rounded-[2px]', fieldItemInitials: 'group-hover/field-item:bg-recipient-purple', @@ -72,6 +77,7 @@ export const RECIPIENT_COLOR_STYLES = { base: 'ring-recipient-orange hover:bg-recipient-orange/30', baseRing: 'rgba(246, 159, 30, 1)', baseRingHover: 'rgba(246, 159, 30, 0.3)', + baseTextHover: 'rgba(246, 159, 30, 1)', fieldButton: 'hover:border-recipient-orange hover:bg-recipient-orange/30', fieldItem: 'group/field-item rounded-[2px]', fieldItemInitials: 'group-hover/field-item:bg-recipient-orange', @@ -84,6 +90,7 @@ export const RECIPIENT_COLOR_STYLES = { base: 'ring-recipient-yellow hover:bg-recipient-yellow/30', baseRing: 'rgba(219, 186, 0, 1)', baseRingHover: 'rgba(219, 186, 0, 0.3)', + baseTextHover: 'rgba(219, 186, 0, 1)', fieldButton: 'hover:border-recipient-yellow hover:bg-recipient-yellow/30', fieldItem: 'group/field-item rounded-[2px]', fieldItemInitials: 'group-hover/field-item:bg-recipient-yellow', @@ -96,6 +103,7 @@ export const RECIPIENT_COLOR_STYLES = { base: 'ring-recipient-pink hover:bg-recipient-pink/30', baseRing: 'rgba(217, 74, 186, 1)', baseRingHover: 'rgba(217, 74, 186, 0.3)', + baseTextHover: 'rgba(217, 74, 186, 1)', fieldButton: 'hover:border-recipient-pink hover:bg-recipient-pink/30', fieldItem: 'group/field-item rounded-[2px]', fieldItemInitials: 'group-hover/field-item:bg-recipient-pink',