From 8671f269e89d48072f67f67b90ed001e4f225403 Mon Sep 17 00:00:00 2001 From: David Nguyen Date: Fri, 8 May 2026 16:04:22 +1000 Subject: [PATCH] fix: lint project (#2693) --- apps/docs/cli.json | 2 +- apps/docs/content/docs/concepts/meta.json | 8 +- .../content/docs/developers/api/meta.json | 11 +- .../docs/users/organisations/meta.json | 11 +- apps/docs/src/app/(home)/layout.tsx | 2 +- apps/docs/src/app/(home)/page.tsx | 99 +- apps/docs/src/app/api/search/route.ts | 2 +- apps/docs/src/app/docs/[[...slug]]/page.tsx | 3 +- apps/docs/src/app/docs/layout.tsx | 27 +- apps/docs/src/app/global.css | 30 +- apps/docs/src/app/layout.tsx | 6 +- apps/docs/src/app/not-found.tsx | 8 +- apps/docs/src/app/og/docs/[...slug]/route.tsx | 177 ++- apps/docs/src/components/ai/page-actions.tsx | 34 +- apps/docs/src/components/mdx/mermaid.tsx | 3 +- apps/docs/src/lib/source.ts | 10 +- apps/docs/src/mdx-components.tsx | 2 +- apps/docs/tsconfig.json | 28 +- apps/openpage-api/lib/add-zero-month.ts | 5 +- apps/openpage-api/lib/cors.ts | 23 +- .../growth/get-monthly-completed-document.ts | 11 +- .../lib/growth/get-signer-conversion.ts | 11 +- .../lib/growth/get-user-monthly-growth.ts | 7 +- apps/openpage-api/lib/transform-data.ts | 10 +- apps/openpage-api/tsconfig.json | 8 +- apps/remix/app/app.css | 36 +- .../dialogs/account-delete-dialog.tsx | 32 +- .../dialogs/admin-document-delete-dialog.tsx | 31 +- .../admin-organisation-create-dialog.tsx | 48 +- ...dmin-organisation-member-delete-dialog.tsx | 57 +- ...dmin-organisation-member-update-dialog.tsx | 54 +- .../admin-swap-subscription-dialog.tsx | 36 +- .../admin-team-member-delete-dialog.tsx | 16 +- .../dialogs/admin-user-delete-dialog.tsx | 33 +- .../dialogs/admin-user-disable-dialog.tsx | 41 +- .../dialogs/admin-user-enable-dialog.tsx | 37 +- .../admin-user-reset-two-factor-dialog.tsx | 45 +- .../dialogs/ai-features-enable-dialog.tsx | 52 +- .../dialogs/ai-field-detection-dialog.tsx | 65 +- .../dialogs/ai-recipient-detection-dialog.tsx | 59 +- .../dialogs/assistant-confirmation-dialog.tsx | 34 +- .../dialogs/claim-create-dialog.tsx | 15 +- .../dialogs/claim-delete-dialog.tsx | 13 +- .../dialogs/claim-update-dialog.tsx | 13 +- .../document-move-to-folder-dialog.tsx | 39 +- .../dialogs/document-resend-dialog.tsx | 33 +- .../dialogs/envelope-delete-dialog.tsx | 21 +- .../dialogs/envelope-distribute-dialog.tsx | 99 +- .../dialogs/envelope-download-dialog.tsx | 146 +- .../dialogs/envelope-duplicate-dialog.tsx | 45 +- .../dialogs/envelope-item-delete-dialog.tsx | 58 +- .../dialogs/envelope-item-edit-dialog.tsx | 60 +- .../dialogs/envelope-redistribute-dialog.tsx | 30 +- .../dialogs/envelope-rename-dialog.tsx | 18 +- .../envelope-save-as-template-dialog.tsx | 15 +- .../dialogs/envelopes-bulk-delete-dialog.tsx | 21 +- .../dialogs/envelopes-bulk-move-dialog.tsx | 45 +- .../dialogs/folder-create-dialog.tsx | 48 +- .../dialogs/folder-delete-dialog.tsx | 36 +- .../components/dialogs/folder-move-dialog.tsx | 34 +- .../dialogs/folder-update-dialog.tsx | 32 +- .../dialogs/organisation-create-dialog.tsx | 109 +- .../dialogs/organisation-delete-dialog.tsx | 38 +- .../organisation-email-create-dialog.tsx | 27 +- .../organisation-email-delete-dialog.tsx | 50 +- ...rganisation-email-domain-create-dialog.tsx | 47 +- ...rganisation-email-domain-delete-dialog.tsx | 33 +- ...ganisation-email-domain-records-dialog.tsx | 17 +- .../organisation-email-update-dialog.tsx | 26 +- .../organisation-group-create-dialog.tsx | 51 +- .../organisation-group-delete-dialog.tsx | 55 +- .../dialogs/organisation-leave-dialog.tsx | 46 +- .../organisation-member-delete-dialog.tsx | 14 +- .../organisation-member-invite-dialog.tsx | 104 +- .../organisation-member-update-dialog.tsx | 62 +- .../dialogs/passkey-create-dialog.tsx | 61 +- .../public-profile-template-manage-dialog.tsx | 84 +- .../dialogs/session-logout-all-dialog.tsx | 10 +- .../dialogs/sign-field-checkbox-dialog.tsx | 279 ++-- .../dialogs/sign-field-dropdown-dialog.tsx | 5 +- .../dialogs/sign-field-email-dialog.tsx | 26 +- .../dialogs/sign-field-initials-dialog.tsx | 129 +- .../dialogs/sign-field-name-dialog.tsx | 122 +- .../dialogs/sign-field-number-dialog.tsx | 25 +- .../dialogs/sign-field-signature-dialog.tsx | 36 +- .../dialogs/sign-field-text-dialog.tsx | 155 +-- .../components/dialogs/team-create-dialog.tsx | 79 +- .../components/dialogs/team-delete-dialog.tsx | 55 +- .../dialogs/team-email-add-dialog.tsx | 49 +- .../dialogs/team-email-delete-dialog.tsx | 64 +- .../dialogs/team-email-update-dialog.tsx | 44 +- .../dialogs/team-group-create-dialog.tsx | 47 +- .../dialogs/team-group-delete-dialog.tsx | 19 +- .../dialogs/team-group-update-dialog.tsx | 46 +- .../team-inherit-member-disable-dialog.tsx | 9 +- .../team-inherit-member-enable-dialog.tsx | 8 +- .../dialogs/team-member-create-dialog.tsx | 79 +- .../dialogs/team-member-delete-dialog.tsx | 58 +- .../dialogs/team-member-update-dialog.tsx | 43 +- .../dialogs/template-bulk-send-dialog.tsx | 68 +- .../dialogs/template-direct-link-dialog.tsx | 92 +- .../template-move-to-folder-dialog.tsx | 35 +- .../dialogs/template-use-dialog.tsx | 116 +- .../dialogs/token-delete-dialog.tsx | 51 +- .../dialogs/webhook-create-dialog.tsx | 52 +- .../dialogs/webhook-delete-dialog.tsx | 43 +- .../dialogs/webhook-edit-dialog.tsx | 44 +- .../dialogs/webhook-test-dialog.tsx | 46 +- .../configure-document-advanced-settings.tsx | 35 +- .../configure-document-recipients.tsx | 80 +- .../authoring/configure-document-upload.tsx | 47 +- .../authoring/configure-document-view.tsx | 36 +- .../configure-document-view.types.ts | 8 +- .../embed/authoring/configure-fields-view.tsx | 81 +- .../authoring/configure-fields-view.types.ts | 7 +- .../field-advanced-settings-drawer.tsx | 12 +- .../embed/embed-authentication-required.tsx | 8 +- .../components/embed/embed-client-loading.tsx | 2 +- .../embed-direct-template-client-page.tsx | 85 +- .../embed/embed-document-completed.tsx | 12 +- .../embed/embed-document-fields.tsx | 20 +- .../embed/embed-document-rejected.tsx | 14 +- .../embed/embed-document-signing-page-v1.tsx | 77 +- .../embed/embed-document-signing-page-v2.tsx | 12 +- .../embed/embed-document-waiting-for-turn.tsx | 11 +- .../app/components/embed/embed-paywall.tsx | 5 +- .../embed/embed-recipient-expired.tsx | 12 +- .../embed/embed-signing-context.tsx | 14 +- .../multisign/multi-sign-document-list.tsx | 61 +- .../multi-sign-document-signing-view.tsx | 101 +- .../components/filters/date-range-filter.tsx | 16 +- .../2fa/disable-authenticator-app-dialog.tsx | 37 +- .../2fa/enable-authenticator-app-dialog.tsx | 220 ++- .../forms/2fa/recovery-code-list.tsx | 19 +- .../forms/2fa/view-recovery-codes-dialog.tsx | 30 +- .../app/components/forms/avatar-image.tsx | 44 +- .../forms/branding-preferences-form.tsx | 62 +- .../forms/document-preferences-form.tsx | 122 +- .../editor/editor-field-checkbox-form.tsx | 60 +- .../forms/editor/editor-field-date-form.tsx | 17 +- .../editor/editor-field-dropdown-form.tsx | 37 +- .../forms/editor/editor-field-email-form.tsx | 15 +- .../editor-field-generic-field-forms.tsx | 38 +- .../editor/editor-field-initials-form.tsx | 15 +- .../forms/editor/editor-field-name-form.tsx | 15 +- .../forms/editor/editor-field-number-form.tsx | 48 +- .../forms/editor/editor-field-radio-form.tsx | 44 +- .../editor/editor-field-signature-form.tsx | 14 +- .../forms/editor/editor-field-text-form.tsx | 27 +- .../forms/email-preferences-form.tsx | 61 +- .../app/components/forms/forgot-password.tsx | 27 +- .../forms/organisation-update-form.tsx | 30 +- apps/remix/app/components/forms/password.tsx | 41 +- apps/remix/app/components/forms/profile.tsx | 33 +- .../components/forms/public-profile-form.tsx | 62 +- .../app/components/forms/reset-password.tsx | 37 +- .../forms/search-param-selector.tsx | 10 +- .../forms/send-confirmation-email.tsx | 31 +- apps/remix/app/components/forms/signin.tsx | 139 +- apps/remix/app/components/forms/signup.tsx | 95 +- .../forms/subscription-claim-form.tsx | 78 +- .../components/forms/support-ticket-form.tsx | 122 +- .../app/components/forms/team-update-form.tsx | 26 +- apps/remix/app/components/forms/token.tsx | 102 +- .../app/components/general/admin-details.tsx | 11 +- .../general/admin-global-settings-section.tsx | 23 +- .../components/general/admin-license-card.tsx | 94 +- .../general/admin-license-status-banner.tsx | 28 +- .../admin-monthly-active-user-charts.tsx | 7 +- .../admin-stats-signer-conversion-chart.tsx | 12 +- .../admin-stats-users-with-documents.tsx | 21 +- .../general/animated-document-scanner.tsx | 18 +- .../app/components/general/app-banner.tsx | 4 +- .../components/general/app-command-menu.tsx | 91 +- .../app/components/general/app-header.tsx | 31 +- .../components/general/app-nav-desktop.tsx | 39 +- .../app/components/general/app-nav-mobile.tsx | 27 +- .../general/avatar-with-recipient.tsx | 17 +- .../app/components/general/billing-plans.tsx | 61 +- .../app/components/general/claim-account.tsx | 36 +- ...efault-recipients-multiselect-combobox.tsx | 36 +- .../direct-template-configure-form.tsx | 39 +- .../direct-template/direct-template-page.tsx | 41 +- .../direct-template-signing-auth-page.tsx | 14 +- .../direct-template-signing-form.tsx | 65 +- .../document-signing/access-auth-2fa-form.tsx | 44 +- .../document-signing-attachments-popover.tsx | 17 +- .../document-signing-auth-2fa.tsx | 33 +- .../document-signing-auth-account.tsx | 40 +- .../document-signing-auth-dialog.tsx | 56 +- .../document-signing-auth-page.tsx | 19 +- .../document-signing-auth-passkey.tsx | 84 +- .../document-signing-auth-password.tsx | 25 +- .../document-signing-auth-provider.tsx | 28 +- .../document-signing-auto-sign.tsx | 34 +- .../document-signing-checkbox-field.tsx | 73 +- .../document-signing-complete-dialog.tsx | 224 ++-- .../document-signing-date-field.tsx | 30 +- .../document-signing-disclosure.tsx | 23 +- .../document-signing-dropdown-field.tsx | 48 +- .../document-signing-email-field.tsx | 21 +- .../document-signing-field-container.tsx | 70 +- .../document-signing-fields.tsx | 16 +- .../document-signing-form.tsx | 249 ++-- .../document-signing-initials-field.tsx | 22 +- .../document-signing-mobile-widget.tsx | 61 +- .../document-signing-name-field.tsx | 42 +- .../document-signing-number-field.tsx | 50 +- .../document-signing-page-view-v1.tsx | 116 +- .../document-signing-page-view-v2.tsx | 51 +- .../document-signing-provider.tsx | 3 +- .../document-signing-radio-field.tsx | 37 +- .../document-signing-recipient-provider.tsx | 19 +- .../document-signing-reject-dialog.tsx | 32 +- .../document-signing-signature-field.tsx | 39 +- .../document-signing-text-field.tsx | 40 +- .../envelope-signing-provider.tsx | 77 +- .../document/document-attachments-popover.tsx | 54 +- .../document-audit-log-download-button.tsx | 21 +- .../document-certificate-download-button.tsx | 18 +- .../document/document-certificate-qr-view.tsx | 35 +- .../general/document/document-edit-form.tsx | 45 +- .../document/document-page-view-button.tsx | 19 +- .../document/document-page-view-dropdown.tsx | 40 +- .../document-page-view-information.tsx | 25 +- .../document-page-view-recent-activity.tsx | 70 +- .../document-page-view-recipients.tsx | 171 ++- .../document-recipient-link-copy-dialog.tsx | 27 +- .../general/document/document-search.tsx | 10 +- .../general/document/document-status.tsx | 17 +- .../document-upload-button-legacy.tsx | 30 +- .../embedded-editor-attachment-popover.tsx | 39 +- .../envelope-editor-fields-drag-drop.tsx | 61 +- .../envelope-editor-fields-page-renderer.tsx | 120 +- .../envelope-editor-fields-page.tsx | 71 +- .../envelope-editor-header.tsx | 25 +- .../envelope-editor-preview-page.tsx | 39 +- .../envelope-editor-recipient-form.tsx | 204 +-- .../envelope-editor-settings-dialog.tsx | 475 +++---- .../envelope-editor-title-input.tsx | 7 +- .../envelope-editor-upload-page.tsx | 122 +- .../envelope-editor/envelope-editor.tsx | 150 +-- .../envelope-file-selector.tsx | 16 +- .../envelope-generic-page-renderer.tsx | 31 +- .../envelope-recipient-selector.tsx | 69 +- .../envelope-signing/envelope-signer-form.tsx | 17 +- .../envelope-signer-header.tsx | 33 +- .../envelope-signer-page-renderer.tsx | 30 +- .../envelope-signing-complete-dialog.tsx | 25 +- .../envelope/envelope-drop-zone-wrapper.tsx | 51 +- .../envelope/envelope-upload-button.tsx | 58 +- .../components/general/folder/folder-card.tsx | 52 +- .../components/general/folder/folder-grid.tsx | 32 +- .../general/generic-error-layout.tsx | 16 +- .../general/legacy-field-warning-popover.tsx | 27 +- .../app/components/general/menu-switcher.tsx | 44 +- .../app/components/general/metric-card.tsx | 11 +- .../general/multiselect-role-combobox.tsx | 32 +- .../components/general/org-menu-switcher.tsx | 89 +- ...ganisation-groups-multiselect-combobox.tsx | 9 +- ...anisation-members-multiselect-combobox.tsx | 9 +- .../organisation-billing-banner.tsx | 58 +- .../organisation-billing-portal-button.tsx | 22 +- .../organisation-invitations.tsx | 19 +- .../pdf-viewer/envelope-pdf-viewer.tsx | 20 +- .../general/pdf-viewer/pdf-viewer-lazy.tsx | 2 +- .../pdf-viewer/pdf-viewer-page-image.tsx | 10 +- .../general/pdf-viewer/pdf-viewer-states.tsx | 3 +- .../general/pdf-viewer/pdf-viewer.tsx | 53 +- .../general/pdf-viewer/use-scroll-to-page.ts | 5 +- .../components/general/period-selector.tsx | 18 +- .../components/general/settings-header.tsx | 13 +- .../general/settings-nav-desktop.tsx | 70 +- .../general/settings-nav-mobile.tsx | 69 +- .../skeletons/document-edit-skeleton.tsx | 5 +- .../app/components/general/stack-avatar.tsx | 4 +- .../general/stack-avatars-with-tooltip.tsx | 52 +- .../app/components/general/stack-avatars.tsx | 7 +- .../general/teams/team-email-dropdown.tsx | 11 +- .../general/teams/team-email-usage.tsx | 60 +- .../teams/team-inherit-member-alert.tsx | 13 +- .../template/template-direct-link-badge.tsx | 15 +- .../general/template/template-edit-form.tsx | 49 +- .../template-page-view-documents-table.tsx | 58 +- .../template-page-view-information.tsx | 23 +- .../template-page-view-recent-activity.tsx | 37 +- .../template-page-view-recipients.tsx | 23 +- .../general/template/template-type.tsx | 5 +- .../general/user-profile-skeleton.tsx | 21 +- .../components/general/user-profile-timur.tsx | 43 +- .../general/verify-email-banner.tsx | 41 +- .../general/virtual-list/use-virtual-list.ts | 11 +- .../components/general/webhook-logs-sheet.tsx | 317 +++-- .../general/webhook-multiselect-combobox.tsx | 10 +- .../components/tables/admin-claims-table.tsx | 30 +- .../tables/admin-dashboard-users-table.tsx | 30 +- .../tables/admin-document-jobs-table.tsx | 29 +- .../tables/admin-document-logs-table.tsx | 26 +- .../admin-document-recipient-item-table.tsx | 62 +- .../admin-organisation-overview-table.tsx | 29 +- .../tables/admin-organisations-table.tsx | 42 +- .../tables/admin-user-teams-table.tsx | 28 +- .../components/tables/document-logs-table.tsx | 22 +- .../tables/documents-table-action-button.tsx | 40 +- .../documents-table-action-dropdown.tsx | 39 +- .../tables/documents-table-empty-state.tsx | 7 +- .../tables/documents-table-sender-filter.tsx | 13 +- .../tables/documents-table-title.tsx | 9 +- .../app/components/tables/documents-table.tsx | 36 +- .../envelopes-table-bulk-action-bar.tsx | 8 +- .../app/components/tables/inbox-table.tsx | 53 +- .../tables/internal-audit-log-table.tsx | 43 +- .../organisation-billing-invoices-table.tsx | 30 +- .../organisation-email-domains-table.tsx | 54 +- .../tables/organisation-groups-table.tsx | 20 +- .../tables/organisation-insights-table.tsx | 33 +- .../organisation-member-invites-table.tsx | 88 +- .../tables/organisation-members-table.tsx | 31 +- .../tables/organisation-teams-table.tsx | 23 +- ...ettings-public-profile-templates-table.tsx | 35 +- .../settings-security-activity-table.tsx | 16 +- ...ettings-security-passkey-table-actions.tsx | 109 +- .../settings-security-passkey-table.tsx | 16 +- .../components/tables/team-groups-table.tsx | 31 +- .../components/tables/team-members-table.tsx | 26 +- .../templates-table-action-dropdown.tsx | 22 +- .../app/components/tables/templates-table.tsx | 57 +- .../user-billing-organisations-table.tsx | 22 +- .../tables/user-organisations-table.tsx | 19 +- apps/remix/app/entry.client.tsx | 8 +- apps/remix/app/entry.server.tsx | 7 +- apps/remix/app/providers/team.tsx | 5 +- apps/remix/app/root.tsx | 25 +- .../app/routes/_authenticated+/_layout.tsx | 11 +- .../routes/_authenticated+/admin+/_layout.tsx | 48 +- .../routes/_authenticated+/admin+/claims.tsx | 14 +- .../_authenticated+/admin+/documents.$id.tsx | 96 +- .../admin+/documents._index.tsx | 55 +- .../admin+/email-domains.$id.tsx | 105 +- .../admin+/email-domains._index.tsx | 62 +- .../admin+/organisation-insights.$id.tsx | 7 +- .../admin+/organisation-insights._index.tsx | 12 +- .../admin+/organisations.$id.tsx | 128 +- .../admin+/organisations._index.tsx | 14 +- .../_authenticated+/admin+/site-settings.tsx | 43 +- .../routes/_authenticated+/admin+/stats.tsx | 86 +- .../_authenticated+/admin+/teams.$id.tsx | 61 +- .../admin+/unsealed-documents._index.tsx | 45 +- .../_authenticated+/admin+/users.$id.tsx | 55 +- .../_authenticated+/admin+/users._index.tsx | 16 +- .../app/routes/_authenticated+/dashboard.tsx | 58 +- .../app/routes/_authenticated+/inbox.tsx | 2 +- .../_authenticated+/o.$orgUrl._index.tsx | 63 +- .../_authenticated+/o.$orgUrl._layout.tsx | 3 +- .../o.$orgUrl.settings._layout.tsx | 13 +- .../o.$orgUrl.settings.billing.tsx | 93 +- .../o.$orgUrl.settings.branding.tsx | 37 +- .../o.$orgUrl.settings.document.tsx | 19 +- .../o.$orgUrl.settings.email-domains.$id.tsx | 49 +- ....$orgUrl.settings.email-domains._index.tsx | 29 +- .../o.$orgUrl.settings.email.tsx | 25 +- .../o.$orgUrl.settings.general.tsx | 26 +- .../o.$orgUrl.settings.groups.$id.tsx | 50 +- .../o.$orgUrl.settings.members.tsx | 17 +- .../o.$orgUrl.settings.sso.tsx | 94 +- .../o.$orgUrl.settings.teams.tsx | 9 +- .../_authenticated+/o.$orgUrl.support.tsx | 64 +- .../_dynamic_personal_routes+/_layout.tsx | 6 +- .../_dynamic_personal_routes+/document.tsx | 2 +- .../public-profile.tsx | 2 +- .../_authenticated+/settings+/_layout.tsx | 2 +- .../_authenticated+/settings+/profile.tsx | 12 +- .../settings+/security._index.tsx | 68 +- .../settings+/security.linked-accounts.tsx | 27 +- .../settings+/security.passkeys.tsx | 6 +- .../settings+/security.sessions.tsx | 26 +- .../_authenticated+/t.$teamUrl+/_index.tsx | 3 +- .../_authenticated+/t.$teamUrl+/_layout.tsx | 22 +- .../t.$teamUrl+/documents.$id._index.tsx | 57 +- .../t.$teamUrl+/documents.$id._layout.tsx | 13 +- .../t.$teamUrl+/documents.$id.edit.tsx | 16 +- .../documents.$id.legacy_editor.tsx | 31 +- .../t.$teamUrl+/documents.$id.logs.tsx | 31 +- .../t.$teamUrl+/documents._index.tsx | 44 +- .../t.$teamUrl+/documents.folders._index.tsx | 30 +- .../t.$teamUrl+/settings._index.tsx | 42 +- .../t.$teamUrl+/settings._layout.tsx | 19 +- .../t.$teamUrl+/settings.branding.tsx | 9 +- .../t.$teamUrl+/settings.document.tsx | 9 +- .../t.$teamUrl+/settings.email.tsx | 15 +- .../t.$teamUrl+/settings.groups.tsx | 14 +- .../t.$teamUrl+/settings.members.tsx | 8 +- .../t.$teamUrl+/settings.public-profile.tsx | 42 +- .../t.$teamUrl+/settings.tokens.tsx | 34 +- .../settings.webhooks.$id._index.tsx | 42 +- .../t.$teamUrl+/settings.webhooks._index.tsx | 30 +- .../t.$teamUrl+/templates.$id._index.tsx | 56 +- .../t.$teamUrl+/templates.$id._layout.tsx | 17 +- .../templates.$id.legacy_editor.tsx | 15 +- .../t.$teamUrl+/templates._index.tsx | 41 +- .../t.$teamUrl+/templates.folders._index.tsx | 30 +- apps/remix/app/routes/_index.tsx | 3 +- .../_internal+/[__htmltopdf]+/audit-log.tsx | 21 +- .../_internal+/[__htmltopdf]+/certificate.tsx | 96 +- apps/remix/app/routes/_profile+/_layout.tsx | 15 +- apps/remix/app/routes/_profile+/p.$url.tsx | 66 +- apps/remix/app/routes/_recipient+/_layout.tsx | 12 +- .../routes/_recipient+/d.$token+/_index.tsx | 57 +- .../_recipient+/sign.$token+/_index.tsx | 102 +- .../_recipient+/sign.$token+/complete.tsx | 64 +- .../_recipient+/sign.$token+/expired.tsx | 22 +- .../_recipient+/sign.$token+/rejected.tsx | 25 +- .../_recipient+/sign.$token+/waiting.tsx | 22 +- .../routes/_share+/share.$slug.opengraph.tsx | 17 +- apps/remix/app/routes/_share+/share.$slug.tsx | 3 +- .../app/routes/_unauthenticated+/_layout.tsx | 3 +- .../articles.signature-disclosure.tsx | 75 +- .../routes/_unauthenticated+/check-email.tsx | 10 +- .../_unauthenticated+/forgot-password.tsx | 9 +- .../_unauthenticated+/o.$orgUrl.signin.tsx | 35 +- .../organisation.decline.$token.tsx | 16 +- .../organisation.invite.$token.tsx | 29 +- .../organisation.sso.confirmation.$token.tsx | 80 +- .../reset-password.$token.tsx | 9 +- .../reset-password._index.tsx | 11 +- .../app/routes/_unauthenticated+/signin.tsx | 26 +- .../app/routes/_unauthenticated+/signup.tsx | 11 +- .../team.verify.email.$token.tsx | 30 +- .../_unauthenticated+/unverified-account.tsx | 19 +- .../_unauthenticated+/verify-email.$token.tsx | 60 +- .../_unauthenticated+/verify-email._index.tsx | 11 +- apps/remix/app/routes/api+/locale.tsx | 3 +- apps/remix/app/routes/embed+/_v0+/_layout.tsx | 8 +- .../app/routes/embed+/_v0+/direct.$token.tsx | 30 +- .../app/routes/embed+/_v0+/sign.$token.tsx | 31 +- apps/remix/app/routes/embed+/playground.tsx | 36 +- .../routes/embed+/v1+/authoring+/_layout.tsx | 12 +- .../embed+/v1+/authoring+/document.create.tsx | 29 +- .../v1+/authoring+/document.edit.$id.tsx | 38 +- .../embed+/v1+/authoring+/template.create.tsx | 15 +- .../v1+/authoring+/template.edit.$id.tsx | 38 +- .../v1+/authoring_.completed.create.tsx | 9 +- .../routes/embed+/v1+/multisign+/_index.tsx | 53 +- .../routes/embed+/v2+/authoring+/_layout.tsx | 20 +- .../v2+/authoring+/envelope.create._index.tsx | 39 +- .../v2+/authoring+/envelope.edit.$id.tsx | 49 +- apps/remix/app/storage/lang-cookie.server.ts | 3 +- .../remix/app/storage/theme-session.server.ts | 3 +- apps/remix/app/utils/css-vars.ts | 3 +- .../app/utils/field-signing/checkbox-field.ts | 18 +- .../app/utils/field-signing/dropdown-field.ts | 3 +- .../app/utils/field-signing/email-field.ts | 3 +- .../app/utils/field-signing/initial-field.ts | 3 +- .../app/utils/field-signing/name-field.ts | 3 +- .../app/utils/field-signing/number-field.ts | 3 +- .../utils/field-signing/signature-field.ts | 12 +- .../app/utils/field-signing/text-field.ts | 3 +- apps/remix/app/utils/meta.ts | 3 +- apps/remix/app/utils/nonce.ts | 3 +- .../utils/polyfills/promise-with-resolvers.ts | 2 +- apps/remix/app/utils/super-json-loader.ts | 11 +- apps/remix/rollup.config.mjs | 2 +- .../server/api/ai/detect-fields.client.ts | 5 +- apps/remix/server/api/ai/detect-fields.ts | 7 +- .../server/api/ai/detect-fields.types.ts | 6 +- .../server/api/ai/detect-recipients.client.ts | 5 +- apps/remix/server/api/ai/detect-recipients.ts | 7 +- .../server/api/ai/detect-recipients.types.ts | 3 +- apps/remix/server/api/download/download.ts | 163 ++- .../server/api/download/download.types.ts | 8 +- apps/remix/server/api/files/files.helpers.ts | 45 +- apps/remix/server/api/files/files.ts | 12 +- apps/remix/server/api/files/files.types.ts | 19 +- .../routes/get-envelope-item-pdf-by-token.ts | 3 +- .../api/files/routes/get-envelope-item-pdf.ts | 9 +- apps/remix/server/context.ts | 10 +- apps/remix/server/middleware.ts | 3 +- apps/remix/server/router.ts | 13 +- apps/remix/server/security-headers.ts | 3 +- apps/remix/server/trpc/hono-trpc-open-api.ts | 8 +- apps/remix/server/trpc/hono-trpc-remix.ts | 3 +- apps/remix/vite-env.d.ts | 4 +- apps/remix/vite.config.ts | 18 +- lingui.config.ts | 4 +- packages/api/hono.ts | 5 +- packages/api/tsconfig.json | 2 +- packages/api/v1/contract.ts | 3 +- packages/api/v1/implementation.ts | 418 +++--- packages/api/v1/middleware/authenticated.ts | 7 +- packages/api/v1/openapi.ts | 3 +- packages/api/v1/schema.ts | 61 +- .../constants/field-alignment-pdf.ts | 15 +- .../app-tests/constants/field-meta-pdf.ts | 3 +- .../app-tests/constants/field-overflow-pdf.ts | 3 +- .../update-organisation-member-role.spec.ts | 3 +- .../e2e/api/trpc/search-documents.spec.ts | 13 +- .../e2e/api/trpc/search-templates.spec.ts | 11 +- .../e2e/api/v1/document-sending.spec.ts | 12 +- .../e2e/api/v1/template-field-prefill.spec.ts | 21 +- .../v1/test-unauthorized-api-access.spec.ts | 48 +- .../e2e/api/v2/distribute-validation.spec.ts | 13 +- .../e2e/api/v2/embedding-presign.spec.ts | 53 +- .../e2e/api/v2/envelopes-api.spec.ts | 84 +- .../e2e/api/v2/find-documents.spec.ts | 69 +- .../e2e/api/v2/find-envelopes.spec.ts | 44 +- .../v2/partial-signed-pdf-download.spec.ts | 25 +- .../e2e/api/v2/placeholder-fields-api.spec.ts | 28 +- .../e2e/api/v2/template-field-prefill.spec.ts | 21 +- .../v2/test-unauthorized-api-access.spec.ts | 1178 +++++++---------- .../api-access-envelope-attachments.spec.ts | 55 +- .../api-access-envelope-bulk.spec.ts | 684 +++++----- .../e2e/api/v2/update-envelope-items.spec.ts | 23 +- .../auto-place-fields-document.spec.ts | 67 +- .../e2e/command-menu/document-search.spec.ts | 3 +- .../e2e/document-auth/access-auth.spec.ts | 3 +- .../e2e/document-auth/action-auth.spec.ts | 59 +- .../assistant-signing-auth.spec.ts | 19 +- .../next-recipient-dictation.spec.ts | 27 +- .../autosave-fields-step.spec.ts | 31 +- .../autosave-settings-step.spec.ts | 7 +- .../autosave-signers-step.spec.ts | 19 +- .../autosave-subject-step.spec.ts | 55 +- .../duplicate-recipients-simple.spec.ts | 3 +- .../duplicate-recipients.spec.ts | 45 +- .../e2e/document-flow/settings-step.spec.ts | 9 +- .../e2e/document-flow/signers-step.spec.ts | 3 +- .../document-flow/stepper-component.spec.ts | 51 +- .../documents/bulk-document-actions.spec.ts | 3 +- .../e2e/documents/delete-documents.spec.ts | 25 +- .../e2e/documents/find-documents.spec.ts | 98 +- .../test-unauthorized-document-access.spec.ts | 9 +- .../envelope-actions.spec.ts | 24 +- .../envelope-attachments.spec.ts | 18 +- .../envelope-editor-embedded.spec.ts | 14 +- .../envelope-fields.spec.ts | 36 +- .../envelope-item-edit-dialog.spec.ts | 32 +- .../envelope-editor-v2/envelope-items.spec.ts | 22 +- .../envelope-recipients.spec.ts | 24 +- .../envelope-replace-pdf.spec.ts | 38 +- .../envelope-save-as-template.spec.ts | 16 +- .../envelope-settings.spec.ts | 76 +- .../envelopes/cert-page-dimensions.spec.ts | 12 +- .../e2e/envelopes/envelope-alignment.spec.ts | 44 +- .../envelope-expiration-send.spec.ts | 11 +- .../envelope-expiration-settings.spec.ts | 7 +- .../envelope-expiration-signing.spec.ts | 3 +- .../e2e/envelopes/envelope-overflow.spec.ts | 34 +- .../envelope-v2-field-insertion.spec.ts | 24 +- .../include-document-certificate.spec.ts | 19 +- packages/app-tests/e2e/fixtures/api-seeds.ts | 33 +- .../app-tests/e2e/fixtures/authentication.ts | 3 +- .../app-tests/e2e/fixtures/envelope-editor.ts | 60 +- packages/app-tests/e2e/fixtures/generic.ts | 2 +- packages/app-tests/e2e/fixtures/konva.ts | 6 +- .../e2e/folders/team-account-folders.spec.ts | 55 +- .../enterprise-feature-restrictions.spec.ts | 416 +++--- .../e2e/license/license-status-banner.spec.ts | 508 ++++--- .../organisations/manage-organisation.spec.ts | 101 +- .../organisation-team-preferences.spec.ts | 19 +- .../e2e/pdf-viewer/pdf-viewer.spec.ts | 83 +- .../public-profiles/public-profiles.spec.ts | 11 +- .../e2e/scenarios/form-flattening.spec.ts | 92 +- .../e2e/teams/default-recipients.spec.ts | 27 +- .../app-tests/e2e/teams/manage-team.spec.ts | 8 +- .../e2e/teams/search-documents.spec.ts | 27 +- .../e2e/teams/team-documents.spec.ts | 83 +- .../app-tests/e2e/teams/team-email.spec.ts | 13 +- .../e2e/teams/team-signature-settings.spec.ts | 17 +- .../duplicate-recipients.spec.ts | 25 +- .../template-autosave-fields-step.spec.ts | 39 +- .../template-autosave-settings-step.spec.ts | 9 +- .../template-autosave-signers-step.spec.ts | 23 +- .../template-settings-step.spec.ts | 21 +- .../template-signers-step.spec.ts | 3 +- .../templates/bulk-template-actions.spec.ts | 3 +- .../create-document-from-template.spec.ts | 76 +- .../e2e/templates/direct-templates.spec.ts | 23 +- .../e2e/templates/manage-templates.spec.ts | 5 +- .../templates/organisation-templates.spec.ts | 94 +- .../test-unauthorized-template-access.spec.ts | 3 +- packages/app-tests/e2e/user/auth-flow.spec.ts | 9 +- .../app-tests/e2e/user/auth-sessions.spec.ts | 17 +- .../app-tests/e2e/user/delete-account.spec.ts | 3 +- packages/app-tests/e2e/user/password.spec.ts | 13 +- .../app-tests/e2e/user/update-name.spec.ts | 3 +- .../e2e/webhooks/webhooks-crud.spec.ts | 17 +- packages/auth/client/index.ts | 19 +- packages/auth/server/index.ts | 7 +- .../server/lib/session/session-cookies.ts | 19 +- packages/auth/server/lib/session/session.ts | 26 +- .../lib/utils/delete-account-provider.ts | 5 +- .../auth/server/lib/utils/get-accounts.ts | 3 +- packages/auth/server/lib/utils/get-session.ts | 9 +- .../lib/utils/handle-oauth-authorize-url.ts | 11 +- .../lib/utils/handle-oauth-callback-url.ts | 32 +- .../handle-oauth-organisation-callback-url.ts | 10 +- .../server/lib/utils/organisation-portal.ts | 6 +- packages/auth/server/routes/callback.ts | 7 +- packages/auth/server/routes/email-password.ts | 25 +- packages/auth/server/routes/passkey.ts | 13 +- packages/auth/server/routes/sign-out.ts | 3 +- packages/auth/server/routes/two-factor.ts | 63 +- .../auth/server/routes/two-factor.types.ts | 4 +- packages/auth/server/types/email-password.ts | 8 +- .../ee/server-only/lib/create-email-domain.ts | 7 +- .../lib/link-organisation-account.ts | 16 +- .../lib/reregister-email-domain.ts | 3 +- ...isation-account-link-confirmation-email.ts | 15 +- .../ee/server-only/lib/verify-email-domain.ts | 3 +- packages/ee/server-only/limits/handler.ts | 3 +- packages/ee/server-only/limits/server.ts | 17 +- .../stripe/create-checkout-session.ts | 3 +- .../stripe/get-internal-claim-plans.ts | 11 +- .../update-subscription-item-quantity.ts | 5 +- .../ee/server-only/stripe/webhook/handler.ts | 24 +- .../stripe/webhook/on-subscription-created.ts | 40 +- .../stripe/webhook/on-subscription-deleted.ts | 3 +- .../stripe/webhook/on-subscription-updated.ts | 17 +- packages/email/mailer.ts | 9 +- packages/email/providers/branding.tsx | 5 +- packages/email/render.tsx | 3 +- .../template-access-auth-2fa.tsx | 17 +- .../template-confirmation-email.tsx | 20 +- .../template-custom-message-body.tsx | 5 +- .../template-document-cancel.tsx | 2 +- .../template-document-completed.tsx | 18 +- .../template-document-image.tsx | 2 +- .../template-document-invite.tsx | 18 +- .../template-document-pending.tsx | 16 +- .../template-document-recipient-signed.tsx | 11 +- .../template-document-rejected.tsx | 4 +- .../template-document-rejection-confirmed.tsx | 11 +- .../template-document-reminder.tsx | 13 +- .../template-document-self-signed.tsx | 37 +- .../template-document-super-delete.tsx | 20 +- .../template-components/template-footer.tsx | 4 +- .../template-forgot-password.tsx | 11 +- .../template-recipient-expired.tsx | 8 +- .../template-reset-password.tsx | 9 +- packages/email/templates/access-auth-2fa.tsx | 8 +- .../email/templates/bulk-send-complete.tsx | 14 +- packages/email/templates/confirm-email.tsx | 13 +- .../email/templates/confirm-team-email.tsx | 50 +- packages/email/templates/document-cancel.tsx | 8 +- .../email/templates/document-completed.tsx | 8 +- .../document-created-from-direct-template.tsx | 17 +- packages/email/templates/document-invite.tsx | 13 +- packages/email/templates/document-pending.tsx | 8 +- .../templates/document-recipient-signed.tsx | 8 +- .../email/templates/document-rejected.tsx | 8 +- .../document-rejection-confirmed.tsx | 8 +- .../email/templates/document-reminder.tsx | 11 +- .../email/templates/document-self-signed.tsx | 8 +- .../email/templates/document-super-delete.tsx | 14 +- packages/email/templates/forgot-password.tsx | 13 +- ...organisation-account-link-confirmation.tsx | 43 +- .../email/templates/organisation-invite.tsx | 37 +- .../email/templates/organisation-join.tsx | 18 +- .../email/templates/organisation-leave.tsx | 18 +- .../email/templates/recipient-expired.tsx | 8 +- .../recipient-removed-from-document.tsx | 10 +- packages/email/templates/reset-password.tsx | 24 +- packages/email/templates/team-delete.tsx | 21 +- .../email/templates/team-email-removed.tsx | 24 +- packages/email/transports/mailchannels.ts | 3 +- packages/email/tsconfig.json | 4 +- .../validate-checkbox.ts | 11 +- packages/lib/client-only/download-pdf.ts | 7 +- .../lib/client-only/hooks/use-analytics.ts | 3 +- .../lib/client-only/hooks/use-autosave.ts | 5 +- .../client-only/hooks/use-copy-share-link.ts | 3 +- .../hooks/use-copy-to-clipboard.ts | 4 +- .../client-only/hooks/use-document-element.ts | 56 +- .../client-only/hooks/use-editor-fields.ts | 27 +- .../hooks/use-editor-recipients.ts | 20 +- .../client-only/hooks/use-element-bounds.ts | 3 +- .../hooks/use-element-scale-size.ts | 2 +- .../hooks/use-envelope-autosave.ts | 4 +- .../hooks/use-field-page-coords.ts | 19 +- .../client-only/hooks/use-is-page-in-dom.ts | 6 +- .../client-only/hooks/use-page-renderer.ts | 7 +- .../client-only/hooks/use-session-storage.ts | 13 +- .../providers/envelope-editor-provider.tsx | 33 +- .../providers/envelope-render-provider.tsx | 13 +- .../lib/client-only/providers/i18n-server.tsx | 6 +- .../lib/client-only/providers/i18n.client.tsx | 3 +- .../client-only/providers/organisation.tsx | 9 +- .../lib/client-only/providers/session.tsx | 13 +- packages/lib/client-only/recipient-type.ts | 13 +- packages/lib/constants/app.ts | 18 +- packages/lib/constants/auth.ts | 4 +- packages/lib/constants/document-visibility.ts | 3 +- packages/lib/constants/document.ts | 7 +- packages/lib/constants/envelope-expiration.ts | 9 +- packages/lib/constants/envelope-reminder.ts | 20 +- packages/lib/constants/locales.ts | 14 +- .../constants/organisations-translations.ts | 10 +- packages/lib/constants/organisations.ts | 4 +- packages/lib/constants/pdf-viewer.ts | 4 +- packages/lib/constants/teams-translations.ts | 11 +- packages/lib/constants/teams.ts | 10 +- packages/lib/errors/app-error.ts | 92 +- packages/lib/jobs/client/_internal/job.ts | 9 +- packages/lib/jobs/client/bullmq.ts | 19 +- packages/lib/jobs/client/inngest.ts | 12 +- packages/lib/jobs/client/local.ts | 22 +- .../emails/send-confirmation-email.ts | 4 +- .../send-document-cancelled-emails.handler.ts | 16 +- .../emails/send-document-cancelled-emails.ts | 2 +- ...ated-from-direct-template-email.handler.ts | 12 +- ...ment-created-from-direct-template-email.ts | 2 +- ...rganisation-member-joined-email.handler.ts | 69 +- .../send-organisation-member-joined-email.ts | 3 +- ...-organisation-member-left-email.handler.ts | 67 +- ...d-owner-recipient-expired-email.handler.ts | 18 +- .../send-owner-recipient-expired-email.ts | 2 +- ...nd-password-reset-success-email.handler.ts | 6 +- .../send-recipient-signed-email.handler.ts | 20 +- .../emails/send-recipient-signed-email.ts | 6 +- .../emails/send-rejection-emails.handler.ts | 24 +- .../emails/send-rejection-emails.ts | 2 +- .../emails/send-signing-email.handler.ts | 59 +- .../definitions/emails/send-signing-email.ts | 11 +- .../emails/send-team-deleted-email.handler.ts | 8 +- .../emails/send-team-deleted-email.ts | 4 +- .../backport-subscription-claims.handler.ts | 8 +- .../internal/backport-subscription-claims.ts | 6 +- .../internal/bulk-send-template.handler.ts | 20 +- .../internal/bulk-send-template.ts | 11 +- .../internal/cleanup-rate-limits.handler.ts | 3 +- .../internal/cleanup-rate-limits.ts | 11 +- .../internal/execute-webhook.handler.ts | 13 +- .../definitions/internal/execute-webhook.ts | 7 +- .../expire-recipients-sweep.handler.ts | 10 +- .../internal/expire-recipients-sweep.ts | 6 +- .../process-recipient-expired.handler.ts | 20 +- .../internal/process-recipient-expired.ts | 6 +- .../process-signing-reminder.handler.ts | 52 +- .../internal/process-signing-reminder.ts | 6 +- .../internal/seal-document-sweep.handler.ts | 7 +- .../internal/seal-document-sweep.ts | 11 +- .../internal/seal-document.handler.ts | 52 +- .../definitions/internal/seal-document.ts | 7 +- .../send-signing-reminders-sweep.handler.ts | 10 +- .../internal/send-signing-reminders-sweep.ts | 2 +- .../internal/sync-email-domains.handler.ts | 3 +- .../internal/sync-email-domains.ts | 11 +- packages/lib/plain/client.ts | 3 +- packages/lib/server-only/2fa/disable-2fa.ts | 8 +- .../2fa/email/send-2fa-token-email.ts | 8 +- packages/lib/server-only/2fa/enable-2fa.ts | 3 +- .../lib/server-only/2fa/get-backup-code.ts | 4 +- .../lib/server-only/2fa/is-2fa-availble.ts | 4 +- packages/lib/server-only/2fa/setup-2fa.ts | 9 +- packages/lib/server-only/2fa/validate-2fa.ts | 5 +- .../lib/server-only/2fa/verify-2fa-token.ts | 4 +- .../lib/server-only/2fa/verify-password.ts | 3 +- .../lib/server-only/2fa/view-backup-codes.ts | 5 +- .../server-only/admin/admin-find-documents.ts | 9 +- .../admin/admin-find-unsealed-documents.ts | 7 +- .../admin/admin-super-delete-document.ts | 27 +- .../server-only/admin/get-documents-stats.ts | 3 +- .../server-only/admin/get-entire-document.ts | 3 +- .../get-organisation-detailed-insights.ts | 14 +- .../server-only/admin/get-recipients-stats.ts | 3 +- .../server-only/admin/get-signing-volume.ts | 27 +- .../lib/server-only/admin/get-users-stats.ts | 3 +- .../lib/server-only/admin/update-recipient.ts | 3 +- packages/lib/server-only/admin/update-user.ts | 3 +- .../ai/envelope/detect-fields/index.ts | 22 +- .../ai/envelope/detect-fields/schema.ts | 4 +- .../ai/envelope/detect-recipients/index.ts | 20 +- .../ai/envelope/detect-recipients/schema.ts | 4 +- .../create-passkey-authentication-options.ts | 5 +- .../create-passkey-registration-options.ts | 9 +- .../auth/create-passkey-signin-options.ts | 3 +- .../lib/server-only/auth/create-passkey.ts | 9 +- .../lib/server-only/auth/delete-passkey.ts | 9 +- .../lib/server-only/auth/find-passkeys.ts | 11 +- .../auth/send-confirmation-email.ts | 11 +- .../server-only/auth/send-forgot-password.ts | 6 +- .../server-only/auth/send-reset-password.ts | 3 +- .../lib/server-only/auth/update-passkey.ts | 10 +- packages/lib/server-only/cert/cert-status.ts | 3 +- packages/lib/server-only/crypto/encrypt.ts | 3 +- .../document-data/create-document-data.ts | 9 +- .../document-meta/upsert-document-meta.ts | 12 +- .../document/complete-document-with-token.ts | 31 +- .../server-only/document/delete-document.ts | 32 +- .../document/find-document-audit-logs.ts | 5 +- .../server-only/document/find-documents.ts | 93 +- .../document/get-document-by-access-token.ts | 3 +- .../document/get-document-by-token.ts | 3 +- .../get-document-certificate-audit-logs.ts | 4 +- .../get-document-with-details-by-id.ts | 6 +- ...-recipient-or-sender-by-share-link-slug.ts | 4 +- .../lib/server-only/document/get-stats.ts | 42 +- .../document/is-recipient-authorized.ts | 15 +- .../document/reject-document-with-token.ts | 10 +- .../server-only/document/resend-document.ts | 68 +- .../document/search-documents-with-keyword.ts | 16 +- .../document/send-completed-email.ts | 22 +- .../server-only/document/send-delete-email.ts | 10 +- .../lib/server-only/document/send-document.ts | 45 +- .../document/send-pending-email.ts | 12 +- .../server-only/document/viewed-document.ts | 14 +- .../server-only/email/get-email-context.ts | 24 +- .../create-embedding-presign-token.ts | 3 +- .../verify-embedding-presign-token.ts | 8 +- .../envelope-attachment/create-attachment.ts | 10 +- .../envelope-attachment/delete-attachment.ts | 3 +- .../find-attachments-by-token.ts | 10 +- .../envelope-attachment/update-attachment.ts | 3 +- .../envelope-item/create-envelope-items.ts | 17 +- .../replace-envelope-item-pdf.ts | 12 +- .../envelope-item/update-envelope-items.ts | 3 +- .../server-only/envelope/create-envelope.ts | 82 +- .../envelope/duplicate-envelope.ts | 24 +- .../server-only/envelope/find-envelopes.ts | 19 +- .../envelope/get-editor-envelope-by-id.ts | 10 +- .../envelope/get-envelope-by-id.ts | 10 +- ...et-envelope-for-direct-template-signing.ts | 7 +- .../get-envelope-for-recipient-signing.ts | 18 +- .../get-envelope-required-access-data.ts | 3 +- .../envelope/get-envelopes-by-ids.ts | 10 +- .../server-only/envelope/orphan-envelopes.ts | 3 +- .../envelope/transfer-team-envelopes.ts | 5 +- .../server-only/envelope/update-envelope.ts | 58 +- .../field/create-envelope-fields.ts | 12 +- .../field/delete-document-field.ts | 10 +- .../field/delete-template-field.ts | 9 +- .../get-completed-fields-for-document.ts | 7 +- .../field/get-completed-fields-for-token.ts | 3 +- .../lib/server-only/field/get-field-by-id.ts | 10 +- .../server-only/field/get-fields-for-token.ts | 3 +- .../field/remove-signed-field-with-token.ts | 8 +- .../field/set-fields-for-document.ts | 48 +- .../field/set-fields-for-template.ts | 23 +- .../field/sign-field-with-token.ts | 46 +- .../field/update-envelope-fields.ts | 28 +- .../folder/find-folders-internal.ts | 10 +- .../lib/server-only/folder/find-folders.ts | 12 +- .../folder/get-folder-breadcrumbs.ts | 16 +- .../htmltopdf/get-audit-logs-pdf.ts | 6 +- .../htmltopdf/get-certificate-pdf.ts | 6 +- .../lib/server-only/license/license-client.ts | 3 +- .../accept-organisation-invitation.ts | 10 +- .../create-organisation-member-invites.ts | 31 +- .../organisation/create-organisation.ts | 26 +- .../pdf/add-rejection-stamp-to-pdf.ts | 4 +- .../lib/server-only/pdf/auto-place-fields.ts | 16 +- .../server-only/pdf/generate-audit-log-pdf.ts | 5 +- .../pdf/generate-certificate-pdf.ts | 18 +- .../pdf/generate-partial-signed-pdf.ts | 8 +- packages/lib/server-only/pdf/helpers.ts | 7 +- .../server-only/pdf/insert-field-in-pdf-v1.ts | 40 +- .../server-only/pdf/insert-field-in-pdf-v2.ts | 9 +- .../pdf/legacy-insert-field-in-pdf.ts | 41 +- .../lib/server-only/pdf/render-audit-logs.ts | 25 +- .../lib/server-only/pdf/render-certificate.ts | 10 +- .../profile/get-public-profile-by-url.ts | 3 +- .../server-only/profile/set-avatar-image.ts | 7 +- .../public-api/create-api-token.ts | 10 +- .../rate-limit/rate-limit-middleware.ts | 13 +- .../recipient/create-envelope-recipients.ts | 14 +- .../recipient/delete-envelope-recipient.ts | 12 +- .../recipient/get-is-recipient-turn.ts | 3 +- .../recipient/get-next-pending-recipient.ts | 3 +- .../recipient/get-recipient-by-id.ts | 20 +- .../recipient/get-recipient-suggestions.ts | 13 +- .../recipient/get-recipients-for-assistant.ts | 3 +- .../recipient/get-recipients-for-document.ts | 9 +- .../recipient/set-document-recipients.ts | 55 +- .../recipient/set-template-recipients.ts | 32 +- .../recipient/update-envelope-recipients.ts | 30 +- .../update-recipient-next-reminder.ts | 16 +- .../share/create-or-get-share-link.ts | 5 +- .../lib/server-only/site-settings/schema.ts | 5 +- .../site-settings/upsert-site-setting.ts | 9 +- .../get-active-subscriptions-by-user-id.ts | 7 +- .../team/create-team-email-verification.ts | 16 +- packages/lib/server-only/team/create-team.ts | 23 +- .../team/delete-team-email-verification.ts | 5 +- .../lib/server-only/team/delete-team-email.ts | 6 +- packages/lib/server-only/team/delete-team.ts | 16 +- .../lib/server-only/team/find-team-members.ts | 13 +- packages/lib/server-only/team/find-teams.ts | 3 +- .../lib/server-only/team/get-member-roles.ts | 5 +- .../team/get-team-email-by-email.ts | 8 +- .../lib/server-only/team/get-team-members.ts | 5 +- .../team/get-team-public-profile.ts | 3 +- packages/lib/server-only/team/get-team.ts | 14 +- packages/lib/server-only/team/get-teams.ts | 3 +- .../server-only/team/get-user-team-groups.ts | 7 +- .../lib/server-only/team/update-team-email.ts | 6 +- .../team/update-team-public-profile.ts | 6 +- packages/lib/server-only/team/update-team.ts | 5 +- .../server-only/telemetry/telemetry-client.ts | 4 +- .../create-document-from-direct-template.ts | 145 +- .../template/create-document-from-template.ts | 53 +- .../template/create-template-direct-link.ts | 14 +- .../template/delete-template-direct-link.ts | 3 +- .../server-only/template/delete-template.ts | 10 +- .../template/find-organisation-templates.ts | 5 +- .../server-only/template/find-templates.ts | 5 +- .../get-organisation-template-by-id.ts | 9 +- .../get-template-by-direct-link-token.ts | 7 +- .../template/get-template-by-id.ts | 3 +- .../template/search-templates-with-keyword.ts | 11 +- .../template/toggle-template-direct-link.ts | 3 +- packages/lib/server-only/user/create-user.ts | 3 +- .../user/find-user-security-audit-logs.ts | 3 +- .../lib/server-only/user/forgot-password.ts | 3 +- .../lib/server-only/user/get-all-users.ts | 10 +- .../user/get-monthly-completed-document.ts | 7 +- ...et-most-recent-email-verification-token.ts | 4 +- .../server-only/user/get-signer-conversion.ts | 7 +- .../user/get-user-monthly-growth.ts | 3 +- .../lib/server-only/user/reset-password.ts | 3 +- .../user/send-confirmation-token.ts | 8 +- .../user/service-accounts/deleted-account.ts | 8 +- .../lib/server-only/user/update-password.ts | 12 +- .../lib/server-only/user/update-profile.ts | 10 +- packages/lib/server-only/user/verify-email.ts | 13 +- .../webhooks/assert-webhook-url.test.ts | 36 +- .../webhooks/assert-webhook-url.ts | 3 +- .../server-only/webhooks/create-webhook.ts | 3 +- .../lib/server-only/webhooks/edit-webhook.ts | 3 +- .../get-all-webhooks-by-event-trigger.ts | 9 +- .../webhooks/trigger-test-webhook.ts | 7 +- .../webhooks/trigger/generate-sample-data.ts | 5 +- .../server-only/webhooks/trigger/handler.ts | 5 +- .../webhooks/zapier/list-documents.ts | 3 +- packages/lib/types/document-audit-logs.ts | 38 +- packages/lib/types/document-auth.ts | 27 +- packages/lib/types/document-email.ts | 33 +- packages/lib/types/document-form-values.ts | 5 +- packages/lib/types/document-meta.ts | 15 +- packages/lib/types/document.ts | 18 +- packages/lib/types/email-domain.ts | 3 +- packages/lib/types/embed-base-schemas.ts | 3 +- packages/lib/types/envelope-editor.ts | 5 +- packages/lib/types/envelope.ts | 3 +- packages/lib/types/field-meta.ts | 13 +- packages/lib/types/field.ts | 18 +- packages/lib/types/organisation-email.ts | 3 +- packages/lib/types/organisation.ts | 7 +- packages/lib/types/recipient.ts | 8 +- packages/lib/types/subscription.ts | 7 +- packages/lib/types/template.ts | 8 +- .../lib/universal/extract-request-metadata.ts | 2 +- .../calculate-overflow-layout.ts | 6 +- .../field-renderer/field-generic-items.ts | 36 +- .../field-renderer/field-renderer.ts | 6 +- .../field-renderer/render-checkbox-field.ts | 53 +- .../field-renderer/render-dropdown-field.ts | 16 +- .../universal/field-renderer/render-field.ts | 13 +- .../render-generic-text-field.ts | 11 +- .../field-renderer/render-grid-lines.ts | 13 +- .../field-renderer/render-radio-field.ts | 53 +- .../field-renderer/render-signature-field.ts | 32 +- .../lib/universal/generate-twitter-intent.ts | 4 +- packages/lib/universal/id.ts | 10 +- .../lib/universal/upload/put-file.server.ts | 8 +- packages/lib/universal/upload/put-file.ts | 37 +- .../lib/universal/upload/server-actions.ts | 13 +- packages/lib/utils/advanced-fields-helpers.ts | 6 +- packages/lib/utils/billing.ts | 8 +- packages/lib/utils/document-audit-logs.ts | 17 +- packages/lib/utils/document-auth.ts | 23 +- packages/lib/utils/document.ts | 23 +- packages/lib/utils/embed-config.ts | 65 +- packages/lib/utils/env.ts | 4 +- packages/lib/utils/envelope-download.ts | 3 +- packages/lib/utils/envelope-signing.ts | 21 +- packages/lib/utils/envelope.ts | 18 +- packages/lib/utils/fields.ts | 8 +- packages/lib/utils/images/avatar.ts | 5 +- .../images/resize-image-to-gemini-image.ts | 5 +- packages/lib/utils/logger.ts | 2 +- .../mask-recipient-tokens-for-document.ts | 3 +- packages/lib/utils/organisations-claims.ts | 3 +- packages/lib/utils/organisations.ts | 17 +- packages/lib/utils/public-profiles.ts | 10 +- packages/lib/utils/recipients.ts | 4 +- .../lib/utils/render-custom-email-template.ts | 5 +- packages/lib/utils/render-email-with-i18n.tsx | 6 +- packages/lib/utils/teams.ts | 11 +- packages/lib/utils/templates.ts | 3 +- packages/lib/utils/timeout.ts | 5 +- packages/lib/utils/zod.ts | 3 +- packages/prisma/index.ts | 7 +- packages/prisma/seed/documents.ts | 17 +- packages/prisma/seed/folders.ts | 6 +- packages/prisma/seed/initial-seed.ts | 38 +- packages/prisma/seed/large-team-seed.ts | 7 +- packages/prisma/seed/organisations.ts | 5 +- packages/prisma/seed/teams.ts | 17 +- packages/prisma/seed/templates.ts | 10 +- packages/prisma/seed/users.ts | 5 +- .../prisma/types/document-legacy-schema.ts | 14 +- .../prisma/types/extended-document-status.ts | 3 +- .../field-with-signature-and-fieldmeta.ts | 3 +- .../prisma/types/template-legacy-schema.ts | 4 +- packages/prisma/types/types.d.ts | 7 +- packages/signing/helpers/tsa.ts | 3 +- packages/signing/index.ts | 10 +- packages/signing/package.json | 2 +- packages/signing/transports/google-cloud.ts | 15 +- packages/signing/transports/local.ts | 3 +- packages/tailwind-config/index.cjs | 6 +- packages/tailwind-config/package.json | 2 +- packages/tailwind-config/tsconfig.json | 2 +- packages/trpc/client/index.ts | 9 +- packages/trpc/react/index.tsx | 5 +- .../admin-router/create-admin-organisation.ts | 3 +- .../create-subscription-claim.types.ts | 3 +- .../server/admin-router/delete-document.ts | 5 +- .../delete-organisation-member.ts | 7 +- .../delete-organisation-member.types.ts | 8 +- .../server/admin-router/delete-team-member.ts | 11 +- .../download-document-audit-logs.ts | 3 +- .../download-document-audit-logs.types.ts | 8 +- .../admin-router/find-admin-organisations.ts | 3 +- .../find-admin-organisations.types.ts | 3 +- .../admin-router/find-document-audit-logs.ts | 11 +- .../find-document-audit-logs.types.ts | 3 +- .../server/admin-router/find-document-jobs.ts | 13 +- .../admin-router/find-document-jobs.types.ts | 3 +- .../admin-router/find-documents.types.ts | 3 +- .../server/admin-router/find-email-domains.ts | 15 +- .../admin-router/find-email-domains.types.ts | 3 +- .../admin-router/find-subscription-claims.ts | 11 +- .../find-subscription-claims.types.ts | 3 +- .../find-unsealed-documents.types.ts | 3 +- .../server/admin-router/find-user-teams.ts | 3 +- .../admin-router/find-user-teams.types.ts | 3 +- .../get-admin-organisation.types.ts | 3 +- .../server/admin-router/get-admin-team.ts | 3 +- .../admin-router/get-admin-team.types.ts | 3 +- .../server/admin-router/get-email-domain.ts | 5 +- .../admin-router/get-email-domain.types.ts | 3 +- .../server/admin-router/get-user.types.ts | 3 +- .../admin-router/promote-member-to-owner.ts | 11 +- .../server/admin-router/reseal-document.ts | 8 +- .../reset-two-factor-authentication.ts | 5 +- .../swap-organisation-subscription.ts | 3 +- .../swap-organisation-subscription.types.ts | 8 +- .../update-organisation-member-role.ts | 15 +- .../update-organisation-member-role.types.ts | 8 +- .../server/admin-router/update-recipient.ts | 5 +- .../admin-router/update-recipient.types.ts | 3 +- .../admin-router/update-site-setting.ts | 5 +- .../admin-router/update-site-setting.types.ts | 3 +- .../admin-router/update-subscription-claim.ts | 5 +- .../server/admin-router/update-user.types.ts | 3 +- .../api-token-router/create-api-token.ts | 5 +- .../api-token-router/delete-api-token.ts | 5 +- .../api-token-router/get-api-tokens.types.ts | 3 +- ...eate-passkey-registration-options.types.ts | 8 +- .../create-passkey-signin-options.types.ts | 8 +- .../trpc/server/auth-router/create-passkey.ts | 3 +- .../auth-router/create-passkey.types.ts | 3 +- .../server/auth-router/find-passkeys.types.ts | 3 +- packages/trpc/server/auth-router/schema.ts | 5 +- packages/trpc/server/context.ts | 14 +- .../access-auth-request-2fa-email.ts | 7 +- .../access-auth-request-2fa-email.types.ts | 8 +- .../attachment/create-attachment.ts | 11 +- .../attachment/delete-attachment.ts | 5 +- .../attachment/find-attachments.ts | 11 +- .../attachment/find-attachments.types.ts | 3 +- .../attachment/update-attachment.ts | 5 +- .../create-document-temporary.ts | 5 +- .../create-document-temporary.types.ts | 22 +- .../server/document-router/create-document.ts | 5 +- .../document-router/create-document.types.ts | 10 +- .../server/document-router/delete-document.ts | 2 +- .../document-router/distribute-document.ts | 4 +- .../distribute-document.types.ts | 3 +- .../download-document-audit-logs.ts | 3 +- .../download-document-audit-logs.types.ts | 8 +- .../document-router/download-document-beta.ts | 13 +- .../download-document-certificate.ts | 3 +- .../download-document-certificate.types.ts | 8 +- .../document-router/download-document.ts | 2 +- .../document-router/duplicate-document.ts | 2 +- .../find-document-audit-logs.ts | 10 +- .../find-document-audit-logs.types.ts | 3 +- .../find-documents-internal.types.ts | 3 +- .../server/document-router/find-documents.ts | 18 +- .../document-router/find-documents.types.ts | 20 +- .../trpc/server/document-router/find-inbox.ts | 5 +- .../document-router/find-inbox.types.ts | 2 +- .../document-router/get-document-by-token.ts | 8 +- .../get-document-by-token.types.ts | 3 +- .../server/document-router/get-document.ts | 6 +- .../document-router/get-document.types.ts | 3 +- .../document-router/get-documents-by-ids.ts | 5 +- .../get-documents-by-ids.types.ts | 3 +- .../server/document-router/get-inbox-count.ts | 3 +- .../document-router/redistribute-document.ts | 2 +- .../redistribute-document.types.ts | 5 +- .../trpc/server/document-router/schema.ts | 10 +- .../server/document-router/search-document.ts | 5 +- .../document-router/share-document.types.ts | 3 +- .../server/document-router/update-document.ts | 2 +- .../document-router/update-document.types.ts | 13 +- .../apply-multi-sign-signature.ts | 10 +- .../apply-multi-sign-signature.types.ts | 8 +- .../create-embedding-document.ts | 7 +- .../create-embedding-document.types.ts | 7 +- .../create-embedding-envelope.types.ts | 5 +- .../create-embedding-presign-token.ts | 5 +- .../create-embedding-presign-token.types.ts | 11 +- .../create-embedding-template.ts | 7 +- .../create-embedding-template.types.ts | 9 +- .../get-multi-sign-document.types.ts | 7 +- .../update-embedding-document.ts | 4 +- .../update-embedding-document.types.ts | 7 +- .../update-embedding-envelope.ts | 21 +- .../update-embedding-envelope.types.ts | 16 +- .../update-embedding-template.ts | 4 +- .../update-embedding-template.types.ts | 9 +- .../verify-embedding-presign-token.ts | 2 +- .../verify-embedding-presign-token.types.ts | 16 +- .../create-organisation-email-domain.types.ts | 11 +- .../create-organisation-email.types.ts | 3 +- ...decline-link-organisation-account.types.ts | 4 +- .../find-organisation-email-domain.ts | 5 +- .../find-organisation-email-domain.types.ts | 9 +- .../find-organisation-emails.ts | 3 +- .../find-organisation-emails.types.ts | 3 +- ...rganisation-authentication-portal.types.ts | 36 +- .../get-organisation-email-domain.ts | 5 +- .../get-organisation-email-domain.types.ts | 7 +- ...date-organisation-authentication-portal.ts | 7 +- ...rganisation-authentication-portal.types.ts | 3 +- .../attachment/create-attachment.ts | 2 +- .../attachment/delete-attachment.ts | 2 +- .../attachment/find-attachments.ts | 2 +- .../attachment/find-attachments.types.ts | 3 +- .../attachment/update-attachment.ts | 2 +- .../envelope-router/bulk-delete-envelopes.ts | 10 +- .../bulk-delete-envelopes.types.ts | 4 +- .../envelope-router/bulk-move-envelopes.ts | 5 +- .../bulk-move-envelopes.types.ts | 8 +- .../envelope-router/create-envelope-items.ts | 7 +- .../create-envelope-items.types.ts | 3 +- .../server/envelope-router/create-envelope.ts | 11 +- .../envelope-router/create-envelope.types.ts | 26 +- .../envelope-router/delete-envelope-item.ts | 4 +- .../server/envelope-router/delete-envelope.ts | 7 +- .../envelope-router/distribute-envelope.ts | 4 +- .../distribute-envelope.types.ts | 3 +- .../envelope-router/download-envelope-item.ts | 2 +- .../envelope-router/duplicate-envelope.ts | 2 +- .../envelope-fields/create-envelope-fields.ts | 2 +- .../create-envelope-fields.types.ts | 3 +- .../envelope-fields/delete-envelope-field.ts | 5 +- .../get-envelope-field-signatures.ts | 3 +- .../get-envelope-field-signatures.types.ts | 8 +- .../envelope-fields/get-envelope-field.ts | 2 +- .../get-envelope-field.types.ts | 3 +- .../envelope-fields/update-envelope-fields.ts | 2 +- .../update-envelope-fields.types.ts | 3 +- .../create-envelope-recipients.ts | 2 +- .../create-envelope-recipients.types.ts | 19 +- .../delete-envelope-recipient.ts | 2 +- .../delete-envelope-recipient.types.ts | 4 +- .../get-envelope-recipient.ts | 2 +- .../get-envelope-recipient.types.ts | 3 +- .../update-envelope-recipients.ts | 2 +- .../update-envelope-recipients.types.ts | 16 +- .../find-envelope-audit-logs.ts | 13 +- .../find-envelope-audit-logs.types.ts | 3 +- .../server/envelope-router/find-envelopes.ts | 19 +- .../envelope-router/find-envelopes.types.ts | 25 +- .../envelope-router/get-editor-envelope.ts | 5 +- .../get-editor-envelope.types.ts | 3 +- .../get-envelope-items-by-token.ts | 11 +- .../get-envelope-items-by-token.types.ts | 3 +- .../envelope-router/get-envelope-items.ts | 5 +- .../get-envelope-items.types.ts | 3 +- .../server/envelope-router/get-envelope.ts | 6 +- .../envelope-router/get-envelope.types.ts | 3 +- .../envelope-router/get-envelopes-by-ids.ts | 2 +- .../get-envelopes-by-ids.types.ts | 3 +- .../envelope-router/redistribute-envelope.ts | 2 +- .../redistribute-envelope.types.ts | 5 +- .../replace-envelope-item-pdf.ts | 2 +- .../replace-envelope-item-pdf.types.ts | 5 +- .../envelope-router/save-as-template.ts | 5 +- .../trpc/server/envelope-router/schema.ts | 3 +- .../envelope-router/set-envelope-fields.ts | 10 +- .../set-envelope-fields.types.ts | 15 +- .../set-envelope-recipients.ts | 5 +- .../set-envelope-recipients.types.ts | 5 +- .../envelope-router/sign-envelope-field.ts | 44 +- .../sign-envelope-field.types.ts | 3 +- .../signing-status-envelope.ts | 6 +- .../envelope-router/update-envelope-items.ts | 4 +- .../update-envelope-items.types.ts | 3 +- .../server/envelope-router/update-envelope.ts | 2 +- .../envelope-router/update-envelope.types.ts | 16 +- .../server/envelope-router/use-envelope.ts | 21 +- .../envelope-router/use-envelope.types.ts | 9 +- packages/trpc/server/field-router/router.ts | 39 +- packages/trpc/server/field-router/schema.ts | 9 +- packages/trpc/server/folder-router/schema.ts | 12 +- packages/trpc/server/open-api.ts | 3 +- ...accept-organisation-member-invite.types.ts | 4 +- .../create-organisation-group.ts | 8 +- ...reate-organisation-member-invites.types.ts | 3 +- .../create-organisation.ts | 12 +- .../decline-organisation-member-invite.ts | 3 +- ...ecline-organisation-member-invite.types.ts | 4 +- .../delete-organisation-group.ts | 3 +- .../delete-organisation-member-invites.ts | 11 +- .../delete-organisation-members.ts | 10 +- .../delete-organisation-members.types.ts | 8 +- .../delete-organisation.ts | 5 +- .../find-organisation-groups.ts | 17 +- .../find-organisation-groups.types.ts | 5 +- .../find-organisation-member-invites.ts | 5 +- .../find-organisation-member-invites.types.ts | 9 +- .../find-organisation-members.ts | 8 +- .../find-organisation-members.types.ts | 7 +- .../get-organisation-member-invites.types.ts | 9 +- .../get-organisation-session.ts | 11 +- .../get-organisation-session.types.ts | 3 +- .../organisation-router/get-organisation.ts | 10 +- .../get-organisation.types.ts | 3 +- .../organisation-router/get-organisations.ts | 5 +- .../get-organisations.types.ts | 3 +- .../organisation-router/leave-organisation.ts | 11 +- .../update-organisation-group.ts | 20 +- .../update-organisation-members.ts | 11 +- .../update-organisation-settings.ts | 12 +- .../update-organisation-settings.types.ts | 8 +- .../update-organisation.ts | 5 +- packages/trpc/server/profile-router/router.ts | 82 +- packages/trpc/server/profile-router/schema.ts | 3 +- .../find-recipient-suggestions.types.ts | 11 +- .../trpc/server/recipient-router/router.ts | 39 +- .../trpc/server/recipient-router/schema.ts | 13 +- .../server/team-router/create-team-groups.ts | 24 +- .../server/team-router/create-team-members.ts | 29 +- .../team-router/create-team-members.types.ts | 3 +- .../server/team-router/create-team.types.ts | 4 +- .../server/team-router/delete-team-group.ts | 5 +- .../server/team-router/delete-team-member.ts | 15 +- .../trpc/server/team-router/delete-team.ts | 3 +- .../server/team-router/find-team-groups.ts | 12 +- .../team-router/find-team-groups.types.ts | 5 +- .../server/team-router/find-team-members.ts | 5 +- .../team-router/find-team-members.types.ts | 3 +- .../server/team-router/find-teams.types.ts | 5 +- .../server/team-router/get-team-members.ts | 5 +- .../team-router/get-team-members.types.ts | 3 +- .../trpc/server/team-router/get-team.types.ts | 3 +- packages/trpc/server/team-router/router.ts | 52 +- packages/trpc/server/team-router/schema.ts | 18 +- .../server/team-router/update-team-group.ts | 5 +- .../server/team-router/update-team-member.ts | 12 +- .../team-router/update-team-settings.ts | 24 +- .../team-router/update-team-settings.types.ts | 8 +- .../template-router/get-templates-by-ids.ts | 9 +- .../get-templates-by-ids.types.ts | 3 +- .../trpc/server/template-router/router.ts | 105 +- .../trpc/server/template-router/schema.ts | 29 +- .../server/template-router/search-template.ts | 5 +- packages/trpc/server/trpc.ts | 10 +- .../webhook-router/find-webhook-calls.ts | 8 +- .../find-webhook-calls.types.ts | 5 +- .../webhook-router/resend-webhook-call.ts | 5 +- packages/trpc/server/webhook-router/router.ts | 134 +- packages/trpc/server/webhook-router/schema.ts | 3 +- packages/trpc/tsconfig.json | 2 +- packages/trpc/utils/openapi-fetch-handler.ts | 4 +- packages/trpc/utils/trpc-error-handler.ts | 6 +- packages/trpc/utils/zod-form-data.ts | 5 +- packages/tsconfig/base.json | 12 +- packages/tsconfig/package.json | 2 +- .../animate/animate-generic-fade-in-out.tsx | 6 +- packages/ui/components/client-only.tsx | 2 +- .../ui/components/common/copy-text-button.tsx | 15 +- .../common/language-switcher-dialog.tsx | 22 +- packages/ui/components/common/local-time.tsx | 10 +- .../document/document-email-checkboxes.tsx | 79 +- .../document-global-auth-access-select.tsx | 22 +- .../document-global-auth-action-select.tsx | 36 +- .../document/document-read-only-fields.tsx | 43 +- .../document-send-email-message-helper.tsx | 18 +- .../document/document-share-button.tsx | 41 +- .../document-signature-settings-tooltip.tsx | 9 +- .../document/document-visibility-select.tsx | 35 +- .../envelope-recipient-field-tooltip.tsx | 40 +- .../document/expiration-period-picker.tsx | 15 +- .../document/reminder-settings-picker.tsx | 27 +- .../field/envelope-field-tooltip.tsx | 33 +- .../ui/components/field/field-tooltip.tsx | 15 +- packages/ui/components/field/field.tsx | 36 +- .../recipient-action-auth-select.tsx | 36 +- .../recipient-autocomplete-input.tsx | 12 +- .../recipient/recipient-role-select.tsx | 51 +- packages/ui/components/signing-card.tsx | 55 +- .../template/template-type-select.tsx | 56 +- packages/ui/icons/signature.tsx | 12 +- packages/ui/icons/verified.tsx | 51 +- packages/ui/lib/handle-dropzone-rejection.tsx | 8 +- packages/ui/primitives/accordion.tsx | 9 +- packages/ui/primitives/alert-dialog.tsx | 40 +- packages/ui/primitives/alert.tsx | 32 +- packages/ui/primitives/auto-sized-text.tsx | 24 +- packages/ui/primitives/avatar.tsx | 30 +- packages/ui/primitives/badge.tsx | 60 +- packages/ui/primitives/button.tsx | 14 +- packages/ui/primitives/calendar.tsx | 8 +- packages/ui/primitives/card.tsx | 33 +- packages/ui/primitives/checkbox.tsx | 7 +- packages/ui/primitives/collapsible.tsx | 2 +- packages/ui/primitives/color-picker.tsx | 9 +- packages/ui/primitives/combobox.tsx | 7 +- packages/ui/primitives/command.tsx | 47 +- packages/ui/primitives/context-menu.tsx | 44 +- .../ui/primitives/data-table-pagination.tsx | 24 +- packages/ui/primitives/data-table.tsx | 13 +- packages/ui/primitives/dialog.tsx | 94 +- packages/ui/primitives/document-dropzone.tsx | 71 +- .../primitives/document-flow/add-fields.tsx | 135 +- .../document-flow/add-fields.types.ts | 3 +- .../primitives/document-flow/add-settings.tsx | 80 +- .../document-flow/add-settings.types.ts | 25 +- .../primitives/document-flow/add-signers.tsx | 184 +-- .../document-flow/add-signers.types.ts | 5 +- .../primitives/document-flow/add-subject.tsx | 99 +- .../document-flow/add-subject.types.ts | 10 +- .../document-flow/document-flow-root.tsx | 23 +- .../document-flow/field-content.tsx | 45 +- .../field-item-advanced-settings.tsx | 52 +- .../primitives/document-flow/field-item.tsx | 55 +- .../checkbox-field.tsx | 64 +- .../date-field.tsx | 21 +- .../dropdown-field.tsx | 43 +- .../email-field.tsx | 21 +- .../initials-field.tsx | 14 +- .../name-field.tsx | 22 +- .../number-field.tsx | 46 +- .../radio-field.tsx | 24 +- .../text-field.tsx | 28 +- .../missing-signature-field-dialog.tsx | 14 +- .../send-document-action-dialog.tsx | 20 +- .../signing-order-confirmation.tsx | 10 +- packages/ui/primitives/document-flow/types.ts | 5 +- .../ui/primitives/document-upload-button.tsx | 27 +- packages/ui/primitives/dropdown-menu.tsx | 41 +- packages/ui/primitives/element-visible.tsx | 3 +- packages/ui/primitives/field-selector.tsx | 23 +- .../ui/primitives/form/form-error-message.tsx | 2 +- packages/ui/primitives/form/form.tsx | 139 +- packages/ui/primitives/hover-card.tsx | 7 +- packages/ui/primitives/input.tsx | 34 +- packages/ui/primitives/label.tsx | 9 +- packages/ui/primitives/menubar.tsx | 57 +- .../ui/primitives/multi-select-combobox.tsx | 14 +- packages/ui/primitives/multiselect.tsx | 131 +- packages/ui/primitives/navigation-menu.tsx | 23 +- packages/ui/primitives/password-input.tsx | 52 +- packages/ui/primitives/pin-input.tsx | 59 +- packages/ui/primitives/popover.tsx | 14 +- packages/ui/primitives/progress.tsx | 7 +- packages/ui/primitives/radio-group.tsx | 7 +- packages/ui/primitives/recipient-selector.tsx | 40 +- packages/ui/primitives/scroll-area.tsx | 15 +- packages/ui/primitives/select.tsx | 32 +- packages/ui/primitives/separator.tsx | 9 +- packages/ui/primitives/sheet.tsx | 238 ++-- .../ui/primitives/signature-pad/canvas.ts | 7 +- packages/ui/primitives/signature-pad/point.ts | 18 +- .../signature-pad-color-picker.tsx | 27 +- .../signature-pad/signature-pad-dialog.tsx | 15 +- .../signature-pad/signature-pad-draw.tsx | 39 +- .../signature-pad/signature-pad-type.tsx | 10 +- .../signature-pad/signature-pad-upload.tsx | 35 +- .../signature-pad/signature-pad.tsx | 21 +- .../signature-pad/signature-render.tsx | 3 +- .../signature-pad/signature-tabs.tsx | 31 +- packages/ui/primitives/skeleton.tsx | 2 +- packages/ui/primitives/slider.tsx | 9 +- packages/ui/primitives/spinner.tsx | 31 +- packages/ui/primitives/stepper.tsx | 2 +- packages/ui/primitives/switch.tsx | 7 +- packages/ui/primitives/table.tsx | 84 +- packages/ui/primitives/tabs.tsx | 11 +- .../template-flow/add-template-fields.tsx | 237 ++-- .../add-template-fields.types.ts | 3 +- .../add-template-placeholder-recipients.tsx | 174 +-- ...d-template-placeholder-recipients.types.ts | 9 +- .../template-flow/add-template-settings.tsx | 153 +-- .../add-template-settings.types.tsx | 26 +- packages/ui/primitives/textarea.tsx | 32 +- packages/ui/primitives/theme-switcher.tsx | 17 +- packages/ui/primitives/toast.tsx | 44 +- packages/ui/primitives/toaster.tsx | 31 +- packages/ui/primitives/toggle.tsx | 9 +- packages/ui/primitives/tooltip.tsx | 11 +- packages/ui/primitives/use-toast.ts | 6 +- packages/ui/styles/theme.css | 4 +- packages/ui/tailwind.config.cjs | 7 +- packages/ui/tsconfig.json | 12 +- scripts/create-justification.ts | 3 +- scripts/create-plan.ts | 3 +- scripts/create-scratch.ts | 3 +- 1414 files changed, 12867 insertions(+), 24335 deletions(-) diff --git a/apps/docs/cli.json b/apps/docs/cli.json index 89d51513d..e299c4676 100644 --- a/apps/docs/cli.json +++ b/apps/docs/cli.json @@ -10,4 +10,4 @@ "baseDir": "src", "uiLibrary": "radix-ui", "commands": {} -} \ No newline at end of file +} diff --git a/apps/docs/content/docs/concepts/meta.json b/apps/docs/content/docs/concepts/meta.json index 925998a98..decdd116e 100644 --- a/apps/docs/content/docs/concepts/meta.json +++ b/apps/docs/content/docs/concepts/meta.json @@ -1,10 +1,4 @@ { "title": "Concepts", - "pages": [ - "document-lifecycle", - "recipient-roles", - "field-types", - "signing-workflow", - "signing-certificates" - ] + "pages": ["document-lifecycle", "recipient-roles", "field-types", "signing-workflow", "signing-certificates"] } diff --git a/apps/docs/content/docs/developers/api/meta.json b/apps/docs/content/docs/developers/api/meta.json index ffabac120..98c9bf00f 100644 --- a/apps/docs/content/docs/developers/api/meta.json +++ b/apps/docs/content/docs/developers/api/meta.json @@ -1,13 +1,4 @@ { "title": "API Reference", - "pages": [ - "documents", - "recipients", - "fields", - "templates", - "teams", - "rate-limits", - "versioning", - "developer-mode" - ] + "pages": ["documents", "recipients", "fields", "templates", "teams", "rate-limits", "versioning", "developer-mode"] } diff --git a/apps/docs/content/docs/users/organisations/meta.json b/apps/docs/content/docs/users/organisations/meta.json index f19f48f4d..79142356a 100644 --- a/apps/docs/content/docs/users/organisations/meta.json +++ b/apps/docs/content/docs/users/organisations/meta.json @@ -1,13 +1,4 @@ { "title": "Organisations", - "pages": [ - "overview", - "create-team", - "members", - "groups", - "email-domains", - "preferences", - "single-sign-on", - "billing" - ] + "pages": ["overview", "create-team", "members", "groups", "email-domains", "preferences", "single-sign-on", "billing"] } diff --git a/apps/docs/src/app/(home)/layout.tsx b/apps/docs/src/app/(home)/layout.tsx index b1bf08edc..77379fac3 100644 --- a/apps/docs/src/app/(home)/layout.tsx +++ b/apps/docs/src/app/(home)/layout.tsx @@ -1,5 +1,5 @@ -import { baseOptions } from '@/lib/layout.shared'; import { HomeLayout } from 'fumadocs-ui/layouts/home'; +import { baseOptions } from '@/lib/layout.shared'; export default function Layout({ children }: LayoutProps<'/'>) { return {children}; diff --git a/apps/docs/src/app/(home)/page.tsx b/apps/docs/src/app/(home)/page.tsx index 0bd99fdd5..5b358b9be 100644 --- a/apps/docs/src/app/(home)/page.tsx +++ b/apps/docs/src/app/(home)/page.tsx @@ -1,16 +1,7 @@ +import { BookOpenIcon, CodeIcon, FileTextIcon, GithubIcon, ServerIcon, ShieldCheckIcon, UserIcon } from 'lucide-react'; import type { Metadata } from 'next'; import Link from 'next/link'; -import { - BookOpenIcon, - CodeIcon, - FileTextIcon, - GithubIcon, - ServerIcon, - ShieldCheckIcon, - UserIcon, -} from 'lucide-react'; - export const metadata: Metadata = { title: 'Documenso Docs', description: @@ -22,21 +13,21 @@ export default function HomePage() {
{/* Hero */}
-

Documenso Documentation

-

- The open-source document signing platform. Send documents for signatures, integrate with - your apps, or self-host with full control. +

Documenso Documentation

+

+ The open-source document signing platform. Send documents for signatures, integrate with your apps, or + self-host with full control.

Get Started View on GitHub @@ -48,64 +39,60 @@ export default function HomePage() {
-

User Guide

-

+

User Guide

+

Send documents, create templates, and manage your team using the web application.

- Get started → + Get started →
-

Developer Guide

-

- Integrate document signing into your applications with the REST API, webhooks, and - embedding. +

Developer Guide

+

+ Integrate document signing into your applications with the REST API, webhooks, and embedding.

- View API docs → + View API docs →
-

Self-Hosting Guide

-

+

Self-Hosting Guide

+

Deploy your own Documenso instance with Docker, Kubernetes, or Railway.

- Deploy now → + Deploy now →
{/* Quick Start & Core Concepts */}
-
+

- + Quick Start

-

Send your first document

-
    +

    Send your first document

    +
    1. - + Create an account
    2. @@ -120,8 +107,8 @@ export default function HomePage() {
-

Integrate with the API

-
    +

    Integrate with the API

    +
-

Deploy self-hosted

-
    +

    Deploy self-hosted

    +
-
+

- + Core Concepts

Document Lifecycle
Draft to completed
Recipient Roles
Signers and approvers
Field Types
Signatures and inputs
Signing Certificates
Digital verification
@@ -206,7 +193,7 @@ export default function HomePage() {
@@ -221,7 +208,7 @@ export default function HomePage() {
@@ -236,22 +223,22 @@ export default function HomePage() {
{/* Community CTA */} -
-

Join the Community

-

+

+

Join the Community

+

Documenso is open source. Contribute, ask questions, or share feedback.

GitHub @@ -260,7 +247,7 @@ export default function HomePage() { Try Documenso diff --git a/apps/docs/src/app/api/search/route.ts b/apps/docs/src/app/api/search/route.ts index 7ba7e8231..5069e9066 100644 --- a/apps/docs/src/app/api/search/route.ts +++ b/apps/docs/src/app/api/search/route.ts @@ -1,5 +1,5 @@ -import { source } from '@/lib/source'; import { createFromSource } from 'fumadocs-core/search/server'; +import { source } from '@/lib/source'; export const { GET } = createFromSource(source, { // https://docs.orama.com/docs/orama-js/supported-languages diff --git a/apps/docs/src/app/docs/[[...slug]]/page.tsx b/apps/docs/src/app/docs/[[...slug]]/page.tsx index f2234442f..590b588a2 100644 --- a/apps/docs/src/app/docs/[[...slug]]/page.tsx +++ b/apps/docs/src/app/docs/[[...slug]]/page.tsx @@ -1,10 +1,9 @@ +import { DocsBody, DocsDescription, DocsPage, DocsTitle } from 'fumadocs-ui/layouts/docs/page'; import type { Metadata } from 'next'; import { notFound } from 'next/navigation'; - import { LLMCopyButton, ViewOptions } from '@/components/ai/page-actions'; import { getPageImage, source } from '@/lib/source'; import { getMDXComponents } from '@/mdx-components'; -import { DocsBody, DocsDescription, DocsPage, DocsTitle } from 'fumadocs-ui/layouts/docs/page'; const gitConfig = { user: 'documenso', diff --git a/apps/docs/src/app/docs/layout.tsx b/apps/docs/src/app/docs/layout.tsx index 8371fe953..39ee4ba60 100644 --- a/apps/docs/src/app/docs/layout.tsx +++ b/apps/docs/src/app/docs/layout.tsx @@ -1,16 +1,14 @@ 'use client'; -import { useMemo } from 'react'; - -import Link from 'next/link'; -import { usePathname } from 'next/navigation'; - -import { cn } from '@/lib/cn'; -import { baseOptions } from '@/lib/layout.shared'; -import { getFilteredPageTree, source } from '@/lib/source'; import type * as PageTree from 'fumadocs-core/page-tree'; import { DocsLayout } from 'fumadocs-ui/layouts/docs'; import { CodeIcon, ServerIcon, UserIcon } from 'lucide-react'; +import Link from 'next/link'; +import { usePathname } from 'next/navigation'; +import { useMemo } from 'react'; +import { cn } from '@/lib/cn'; +import { baseOptions } from '@/lib/layout.shared'; +import { getFilteredPageTree, source } from '@/lib/source'; const ROOT_SECTIONS = [ { @@ -44,7 +42,9 @@ function getFirstPageUrl(children: PageTree.Node[]): string | undefined { } if (child.type === 'folder' && child.children.length > 0) { const url = getFirstPageUrl(child.children); - if (url) return url; + if (url) { + return url; + } } } return undefined; @@ -69,13 +69,8 @@ function SectionSwitcher({ activeSection }: { activeSection: string | null }) { >
- {section.label} - + {section.label} + {section.subtitle}
diff --git a/apps/docs/src/app/global.css b/apps/docs/src/app/global.css index c7e4f0540..7d9c89316 100644 --- a/apps/docs/src/app/global.css +++ b/apps/docs/src/app/global.css @@ -1,6 +1,6 @@ -@import 'tailwindcss'; -@import 'fumadocs-ui/css/shadcn.css'; -@import 'fumadocs-ui/css/preset.css'; +@import "tailwindcss"; +@import "fumadocs-ui/css/shadcn.css"; +@import "fumadocs-ui/css/preset.css"; @theme { /* Brand utility colors */ @@ -43,13 +43,11 @@ --sidebar-border: hsl(223.8136 0.0001% 89.8161%); --sidebar-ring: hsl(223.8136 0% 63.0163%); --font-sans: - ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, - 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', - 'Segoe UI Symbol', 'Noto Color Emoji'; - --font-serif: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif; - --font-mono: - ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', - monospace; + ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, + "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", + "Segoe UI Symbol", "Noto Color Emoji"; + --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; + --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --radius: 0.5rem; --shadow-x: 0; --shadow-y: 1px; @@ -103,13 +101,11 @@ --sidebar-border: hsl(223.8136 0% 15.5096%); --sidebar-ring: hsl(223.8136 0% 32.1993%); --font-sans: - ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, - 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', - 'Segoe UI Symbol', 'Noto Color Emoji'; - --font-serif: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif; - --font-mono: - ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', - monospace; + ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, + "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", + "Segoe UI Symbol", "Noto Color Emoji"; + --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; + --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --radius: 0.5rem; --shadow-x: 0; --shadow-y: 1px; diff --git a/apps/docs/src/app/layout.tsx b/apps/docs/src/app/layout.tsx index 5c52be8ba..391918370 100644 --- a/apps/docs/src/app/layout.tsx +++ b/apps/docs/src/app/layout.tsx @@ -1,7 +1,6 @@ +import { RootProvider } from 'fumadocs-ui/provider/next'; import type { Metadata } from 'next'; import { Inter } from 'next/font/google'; - -import { RootProvider } from 'fumadocs-ui/provider/next'; import PlausibleProvider from 'next-plausible'; import './global.css'; @@ -16,8 +15,7 @@ export const metadata: Metadata = { template: '%s | Documenso Docs', default: 'Documenso Docs', }, - description: - 'The official documentation for Documenso, the open-source document signing platform.', + description: 'The official documentation for Documenso, the open-source document signing platform.', openGraph: { siteName: 'Documenso Docs', type: 'website', diff --git a/apps/docs/src/app/not-found.tsx b/apps/docs/src/app/not-found.tsx index ed252e4a3..cbc25f2ce 100644 --- a/apps/docs/src/app/not-found.tsx +++ b/apps/docs/src/app/not-found.tsx @@ -3,20 +3,20 @@ import Link from 'next/link'; export default function NotFound() { return (
-

Page not found

-

+

Page not found

+

The page you are looking for may have moved. Our documentation was recently restructured.

Browse documentation Go to homepage diff --git a/apps/docs/src/app/og/docs/[...slug]/route.tsx b/apps/docs/src/app/og/docs/[...slug]/route.tsx index 1a7153f47..76815dd3b 100644 --- a/apps/docs/src/app/og/docs/[...slug]/route.tsx +++ b/apps/docs/src/app/og/docs/[...slug]/route.tsx @@ -1,21 +1,16 @@ -import { notFound } from 'next/navigation'; -import { ImageResponse } from 'next/og'; - -import { getPageImage, source } from '@/lib/source'; import { readFile } from 'node:fs/promises'; import { fileURLToPath } from 'node:url'; +import { notFound } from 'next/navigation'; +import { ImageResponse } from 'next/og'; +import { getPageImage, source } from '@/lib/source'; export const revalidate = false; const loadAssets = async () => { const [logoBuffer, interRegularData, interSemiBoldData, interBoldData] = await Promise.all([ readFile(fileURLToPath(new URL('../../../../../public/logo.png', import.meta.url))), - readFile( - fileURLToPath(new URL('../../../../../public/fonts/inter-regular.ttf', import.meta.url)), - ), - readFile( - fileURLToPath(new URL('../../../../../public/fonts/inter-semibold.ttf', import.meta.url)), - ), + readFile(fileURLToPath(new URL('../../../../../public/fonts/inter-regular.ttf', import.meta.url))), + readFile(fileURLToPath(new URL('../../../../../public/fonts/inter-semibold.ttf', import.meta.url))), readFile(fileURLToPath(new URL('../../../../../public/fonts/inter-bold.ttf', import.meta.url))), ]); @@ -40,104 +35,100 @@ export async function GET(_req: Request, { params }: RouteContext<'/og/docs/[... const { logoSrc, fonts } = await loadAssets(); return new ImageResponse( - ( +
+ {/* Green accent bar */} +
+ + {/* Top: Logo */} +
+ {/* eslint-disable-next-line @next/next/no-img-element */} + Documenso + + | + + Docs +
+ + {/* Middle: Title + description */}
- {/* Green accent bar */} -
- - {/* Top: Logo */} -
40 ? '48px' : '56px', + fontWeight: 700, + lineHeight: 1.15, + letterSpacing: '-0.025em', + margin: 0, }} > - {/* eslint-disable-next-line @next/next/no-img-element */} - Documenso - + {page.data.description && ( +

- | - - Docs -

- - {/* Middle: Title + description */} -
-

40 ? '48px' : '56px', - fontWeight: 700, - lineHeight: 1.15, - letterSpacing: '-0.025em', + lineHeight: 1.4, margin: 0, + maxWidth: '900px', + overflow: 'hidden', + textOverflow: 'ellipsis', + display: '-webkit-box', + WebkitLineClamp: 2, + WebkitBoxOrient: 'vertical', }} > - {page.data.title} -

- {page.data.description && ( -

- {page.data.description} -

- )} -
- - {/* Bottom: URL */} -
- - docs.documenso.com{page.url} - -
+ {page.data.description} +

+ )}
- ), + + {/* Bottom: URL */} +
+ docs.documenso.com{page.url} +
+
, { width: 1200, height: 630, diff --git a/apps/docs/src/components/ai/page-actions.tsx b/apps/docs/src/components/ai/page-actions.tsx index 705eaef89..662cbab3d 100644 --- a/apps/docs/src/components/ai/page-actions.tsx +++ b/apps/docs/src/components/ai/page-actions.tsx @@ -1,12 +1,11 @@ 'use client'; -import { useMemo, useState } from 'react'; - -import { cn } from '@/lib/cn'; import { buttonVariants } from 'fumadocs-ui/components/ui/button'; import { Popover, PopoverContent, PopoverTrigger } from 'fumadocs-ui/components/ui/popover'; import { useCopyButton } from 'fumadocs-ui/utils/use-copy-button'; import { Check, ChevronDown, Copy, ExternalLinkIcon, MessageCircleIcon } from 'lucide-react'; +import { useMemo, useState } from 'react'; +import { cn } from '@/lib/cn'; const cache = new Map(); @@ -21,7 +20,9 @@ export function LLMCopyButton({ const [isLoading, setLoading] = useState(false); const [checked, onClick] = useCopyButton(async () => { const cached = cache.get(markdownUrl); - if (cached) return navigator.clipboard.writeText(cached); + if (cached) { + return navigator.clipboard.writeText(cached); + } setLoading(true); @@ -48,7 +49,7 @@ export function LLMCopyButton({ buttonVariants({ color: 'secondary', size: 'sm', - className: '[&_svg]:text-fd-muted-foreground gap-2 [&_svg]:size-3.5', + className: 'gap-2 [&_svg]:size-3.5 [&_svg]:text-fd-muted-foreground', }), )} onClick={onClick} @@ -74,8 +75,7 @@ export function ViewOptions({ githubUrl: string; }) { const items = useMemo(() => { - const fullMarkdownUrl = - typeof window !== 'undefined' ? new URL(markdownUrl, window.location.origin) : 'loading'; + const fullMarkdownUrl = typeof window !== 'undefined' ? new URL(markdownUrl, window.location.origin) : 'loading'; const q = `Read ${fullMarkdownUrl}, I want to ask questions about it.`; return [ @@ -96,12 +96,7 @@ export function ViewOptions({ q, })}`, icon: ( - + OpenAI @@ -113,12 +108,7 @@ export function ViewOptions({ q, })}`, icon: ( - + Anthropic @@ -146,7 +136,7 @@ export function ViewOptions({ )} > Open - + {items.map((item) => ( @@ -155,11 +145,11 @@ export function ViewOptions({ href={item.href} rel="noreferrer noopener" target="_blank" - className="hover:text-fd-accent-foreground hover:bg-fd-accent inline-flex items-center gap-2 rounded-lg p-2 text-sm [&_svg]:size-4" + className="inline-flex items-center gap-2 rounded-lg p-2 text-sm hover:bg-fd-accent hover:text-fd-accent-foreground [&_svg]:size-4" > {item.icon} {item.title} - + ))} diff --git a/apps/docs/src/components/mdx/mermaid.tsx b/apps/docs/src/components/mdx/mermaid.tsx index 58b5c16a6..1cc1467d9 100644 --- a/apps/docs/src/components/mdx/mermaid.tsx +++ b/apps/docs/src/components/mdx/mermaid.tsx @@ -1,8 +1,7 @@ 'use client'; -import { useEffect, useId, useRef, useState } from 'react'; - import { useTheme } from 'next-themes'; +import { useEffect, useId, useRef, useState } from 'react'; export const Mermaid = ({ chart }: { chart: string }) => { const [mounted, setMounted] = useState(false); diff --git a/apps/docs/src/lib/source.ts b/apps/docs/src/lib/source.ts index 0f995f2e8..b885e85b8 100644 --- a/apps/docs/src/lib/source.ts +++ b/apps/docs/src/lib/source.ts @@ -1,7 +1,7 @@ +import { docs } from 'fumadocs-mdx:collections/server'; import type * as PageTree from 'fumadocs-core/page-tree'; import { type InferPageType, loader } from 'fumadocs-core/source'; import { lucideIconsPlugin } from 'fumadocs-core/source/lucide-icons'; -import { docs } from 'fumadocs-mdx:collections/server'; // See https://fumadocs.dev/docs/headless/source-api for more info export const source = loader({ @@ -30,9 +30,7 @@ export function getFilteredPageTree(rootName: string): PageTree.Root { // Find the main section folder const rootFolder = fullTree.children.find( (child): child is PageTree.Folder => - child.type === 'folder' && - typeof child.name === 'string' && - child.name.toLowerCase() === rootName.toLowerCase(), + child.type === 'folder' && typeof child.name === 'string' && child.name.toLowerCase() === rootName.toLowerCase(), ); if (!rootFolder) { @@ -42,9 +40,7 @@ export function getFilteredPageTree(rootName: string): PageTree.Root { // Find shared section folders const sharedFolders = fullTree.children.filter( (child): child is PageTree.Folder => - child.type === 'folder' && - typeof child.name === 'string' && - SHARED_SECTIONS.includes(child.name.toLowerCase()), + child.type === 'folder' && typeof child.name === 'string' && SHARED_SECTIONS.includes(child.name.toLowerCase()), ); // Create separator for main section diff --git a/apps/docs/src/mdx-components.tsx b/apps/docs/src/mdx-components.tsx index 008027298..298b70960 100644 --- a/apps/docs/src/mdx-components.tsx +++ b/apps/docs/src/mdx-components.tsx @@ -1,7 +1,7 @@ -import { Mermaid } from '@/components/mdx/mermaid'; import * as TabsComponents from 'fumadocs-ui/components/tabs'; import defaultMdxComponents from 'fumadocs-ui/mdx'; import type { MDXComponents } from 'mdx/types'; +import { Mermaid } from '@/components/mdx/mermaid'; // eslint-disable-next-line @typescript-eslint/no-explicit-any export function getMDXComponents(components?: MDXComponents): any { diff --git a/apps/docs/tsconfig.json b/apps/docs/tsconfig.json index 77775fb39..0555e582c 100644 --- a/apps/docs/tsconfig.json +++ b/apps/docs/tsconfig.json @@ -2,11 +2,7 @@ "compilerOptions": { "baseUrl": ".", "target": "ESNext", - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], + "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "strict": true, @@ -20,12 +16,8 @@ "jsx": "react-jsx", "incremental": true, "paths": { - "@/*": [ - "./src/*" - ], - "fumadocs-mdx:collections/*": [ - ".source/*" - ] + "@/*": ["./src/*"], + "fumadocs-mdx:collections/*": [".source/*"] }, "plugins": [ { @@ -33,14 +25,6 @@ } ] }, - "include": [ - "next-env.d.ts", - "**/*.ts", - "**/*.tsx", - ".next/types/**/*.ts", - ".next/dev/types/**/*.ts" - ], - "exclude": [ - "node_modules" - ] -} \ No newline at end of file + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", ".next/dev/types/**/*.ts"], + "exclude": ["node_modules"] +} diff --git a/apps/openpage-api/lib/add-zero-month.ts b/apps/openpage-api/lib/add-zero-month.ts index 91e0d89c7..b20bc7cc5 100644 --- a/apps/openpage-api/lib/add-zero-month.ts +++ b/apps/openpage-api/lib/add-zero-month.ts @@ -10,10 +10,7 @@ export type TransformedData = { const FORMAT = 'MMM yyyy'; -export const addZeroMonth = ( - transformedData: TransformedData, - isCumulative = false, -): TransformedData => { +export const addZeroMonth = (transformedData: TransformedData, isCumulative = false): TransformedData => { const result: TransformedData = { labels: [...transformedData.labels], datasets: transformedData.datasets.map((dataset) => ({ diff --git a/apps/openpage-api/lib/cors.ts b/apps/openpage-api/lib/cors.ts index 2d667ab23..78dcebde5 100644 --- a/apps/openpage-api/lib/cors.ts +++ b/apps/openpage-api/lib/cors.ts @@ -60,7 +60,9 @@ async function originHeadersFromReq(req: Request, origin: StaticOrigin | OriginF const reqOrigin = req.headers.get('Origin') || undefined; const value = typeof origin === 'function' ? await origin(reqOrigin, req) : origin; - if (!value) return; + if (!value) { + return; + } return getOriginHeaders(reqOrigin, value); } @@ -85,12 +87,17 @@ export default async function cors(req: Request, res: Response, options?: CorsOp const { headers } = res; const originHeaders = await originHeadersFromReq(req, opts.origin ?? false); const mergeHeaders = (v: string, k: string) => { - if (k === 'Vary') headers.append(k, v); - else headers.set(k, v); + if (k === 'Vary') { + headers.append(k, v); + } else { + headers.set(k, v); + } }; // If there's no origin we won't touch the response - if (!originHeaders) return res; + if (!originHeaders) { + return res; + } originHeaders.forEach(mergeHeaders); @@ -98,9 +105,7 @@ export default async function cors(req: Request, res: Response, options?: CorsOp headers.set('Access-Control-Allow-Credentials', 'true'); } - const exposed = Array.isArray(opts.exposedHeaders) - ? opts.exposedHeaders.join(',') - : opts.exposedHeaders; + const exposed = Array.isArray(opts.exposedHeaders) ? opts.exposedHeaders.join(',') : opts.exposedHeaders; if (exposed) { headers.set('Access-Control-Expose-Headers', exposed); @@ -120,7 +125,9 @@ export default async function cors(req: Request, res: Response, options?: CorsOp headers.set('Access-Control-Max-Age', String(opts.maxAge)); } - if (opts.preflightContinue) return res; + if (opts.preflightContinue) { + return res; + } headers.set('Content-Length', '0'); return new Response(null, { status: opts.optionsSuccessStatus, headers }); diff --git a/apps/openpage-api/lib/growth/get-monthly-completed-document.ts b/apps/openpage-api/lib/growth/get-monthly-completed-document.ts index b704c04eb..2e1eec095 100644 --- a/apps/openpage-api/lib/growth/get-monthly-completed-document.ts +++ b/apps/openpage-api/lib/growth/get-monthly-completed-document.ts @@ -1,8 +1,7 @@ +import { kyselyPrisma, sql } from '@documenso/prisma'; import { DocumentStatus, EnvelopeType } from '@prisma/client'; import { DateTime } from 'luxon'; -import { kyselyPrisma, sql } from '@documenso/prisma'; - import { addZeroMonth } from '../add-zero-month'; export const getCompletedDocumentsMonthly = async (type: 'count' | 'cumulative' = 'count') => { @@ -30,9 +29,7 @@ export const getCompletedDocumentsMonthly = async (type: 'count' | 'cumulative' datasets: [ { label: type === 'count' ? 'Completed Documents per Month' : 'Total Completed Documents', - data: result - .map((row) => (type === 'count' ? Number(row.count) : Number(row.cume_count))) - .reverse(), + data: result.map((row) => (type === 'count' ? Number(row.count) : Number(row.cume_count))).reverse(), }, ], }; @@ -40,6 +37,4 @@ export const getCompletedDocumentsMonthly = async (type: 'count' | 'cumulative' return addZeroMonth(transformedData, type === 'cumulative'); }; -export type GetCompletedDocumentsMonthlyResult = Awaited< - ReturnType ->; +export type GetCompletedDocumentsMonthlyResult = Awaited>; diff --git a/apps/openpage-api/lib/growth/get-signer-conversion.ts b/apps/openpage-api/lib/growth/get-signer-conversion.ts index 8d25e3a14..464ae263e 100644 --- a/apps/openpage-api/lib/growth/get-signer-conversion.ts +++ b/apps/openpage-api/lib/growth/get-signer-conversion.ts @@ -1,6 +1,5 @@ -import { DateTime } from 'luxon'; - import { kyselyPrisma, sql } from '@documenso/prisma'; +import { DateTime } from 'luxon'; import { addZeroMonth } from '../add-zero-month'; @@ -29,9 +28,7 @@ export const getSignerConversionMonthly = async (type: 'count' | 'cumulative' = datasets: [ { label: type === 'count' ? 'Signers That Signed Up' : 'Total Signers That Signed Up', - data: result - .map((row) => (type === 'count' ? Number(row.count) : Number(row.cume_count))) - .reverse(), + data: result.map((row) => (type === 'count' ? Number(row.count) : Number(row.cume_count))).reverse(), }, ], }; @@ -39,6 +36,4 @@ export const getSignerConversionMonthly = async (type: 'count' | 'cumulative' = return addZeroMonth(transformedData, type === 'cumulative'); }; -export type GetSignerConversionMonthlyResult = Awaited< - ReturnType ->; +export type GetSignerConversionMonthlyResult = Awaited>; diff --git a/apps/openpage-api/lib/growth/get-user-monthly-growth.ts b/apps/openpage-api/lib/growth/get-user-monthly-growth.ts index ae428813c..696266d69 100644 --- a/apps/openpage-api/lib/growth/get-user-monthly-growth.ts +++ b/apps/openpage-api/lib/growth/get-user-monthly-growth.ts @@ -1,6 +1,5 @@ -import { DateTime } from 'luxon'; - import { kyselyPrisma, sql } from '@documenso/prisma'; +import { DateTime } from 'luxon'; import { addZeroMonth } from '../add-zero-month'; @@ -26,9 +25,7 @@ export const getUserMonthlyGrowth = async (type: 'count' | 'cumulative' = 'count datasets: [ { label: type === 'count' ? 'New Users' : 'Total Users', - data: result - .map((row) => (type === 'count' ? Number(row.count) : Number(row.cume_count))) - .reverse(), + data: result.map((row) => (type === 'count' ? Number(row.count) : Number(row.cume_count))).reverse(), }, ], }; diff --git a/apps/openpage-api/lib/transform-data.ts b/apps/openpage-api/lib/transform-data.ts index 801dd4281..cadeaac31 100644 --- a/apps/openpage-api/lib/transform-data.ts +++ b/apps/openpage-api/lib/transform-data.ts @@ -1,6 +1,6 @@ import { DateTime } from 'luxon'; -import { type TransformedData, addZeroMonth } from './add-zero-month'; +import { addZeroMonth, type TransformedData } from './add-zero-month'; type MetricKeys = { stars: number; @@ -24,13 +24,7 @@ const FRIENDLY_METRIC_NAMES: { [key in MetricKey]: string } = { earlyAdopters: 'Customers', }; -export function transformData({ - data, - metric, -}: { - data: DataEntry; - metric: MetricKey; -}): TransformedData { +export function transformData({ data, metric }: { data: DataEntry; metric: MetricKey }): TransformedData { try { if (!data || Object.keys(data).length === 0) { return { diff --git a/apps/openpage-api/tsconfig.json b/apps/openpage-api/tsconfig.json index 705f5ce5e..a5575e9de 100644 --- a/apps/openpage-api/tsconfig.json +++ b/apps/openpage-api/tsconfig.json @@ -22,12 +22,6 @@ "@/*": ["./*"] } }, - "include": [ - "next-env.d.ts", - "**/*.ts", - "**/*.tsx", - ".next/types/**/*.ts", - ".next/dev/types/**/*.ts" - ], + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", ".next/dev/types/**/*.ts"], "exclude": ["node_modules"] } diff --git a/apps/remix/app/app.css b/apps/remix/app/app.css index 9255cdb6a..359a10904 100644 --- a/apps/remix/app/app.css +++ b/apps/remix/app/app.css @@ -1,9 +1,9 @@ -@import '@documenso/ui/styles/theme.css'; +@import "@documenso/ui/styles/theme.css"; /* Inter Variable Fonts */ @font-face { - font-family: 'Inter'; - src: url('/fonts/inter-variablefont_opsz,wght.ttf') format('truetype-variations'); + font-family: "Inter"; + src: url("/fonts/inter-variablefont_opsz,wght.ttf") format("truetype-variations"); font-weight: 100 900; font-style: normal; font-display: swap; @@ -11,8 +11,8 @@ /* Inter Italic Variable Fonts */ @font-face { - font-family: 'Inter'; - src: url('/fonts/inter-italic-variablefont_opsz,wght.ttf') format('truetype-variations'); + font-family: "Inter"; + src: url("/fonts/inter-italic-variablefont_opsz,wght.ttf") format("truetype-variations"); font-weight: 100 900; font-style: italic; font-display: swap; @@ -20,16 +20,16 @@ /* Caveat Variable Font */ @font-face { - font-family: 'Caveat'; - src: url('/fonts/caveat-variablefont_wght.ttf') format('truetype-variations'); + font-family: "Caveat"; + src: url("/fonts/caveat-variablefont_wght.ttf") format("truetype-variations"); font-weight: 400 600; font-style: normal; font-display: swap; } @font-face { - font-family: 'Noto Sans'; - src: url('/fonts/noto-sans.ttf') format('truetype-variations'); + font-family: "Noto Sans"; + src: url("/fonts/noto-sans.ttf") format("truetype-variations"); font-weight: 100 900; font-style: normal; font-display: swap; @@ -37,8 +37,8 @@ /* Korean noto sans */ @font-face { - font-family: 'Noto Sans Korean'; - src: url('/fonts/noto-sans-korean.ttf') format('truetype-variations'); + font-family: "Noto Sans Korean"; + src: url("/fonts/noto-sans-korean.ttf") format("truetype-variations"); font-weight: 100 900; font-style: normal; font-display: swap; @@ -46,8 +46,8 @@ /* Japanese noto sans */ @font-face { - font-family: 'Noto Sans Japanese'; - src: url('/fonts/noto-sans-japanese.ttf') format('truetype-variations'); + font-family: "Noto Sans Japanese"; + src: url("/fonts/noto-sans-japanese.ttf") format("truetype-variations"); font-weight: 100 900; font-style: normal; font-display: swap; @@ -55,8 +55,8 @@ /* Chinese noto sans */ @font-face { - font-family: 'Noto Sans Chinese'; - src: url('/fonts/noto-sans-chinese.ttf') format('truetype-variations'); + font-family: "Noto Sans Chinese"; + src: url("/fonts/noto-sans-chinese.ttf") format("truetype-variations"); font-weight: 100 900; font-style: normal; font-display: swap; @@ -64,8 +64,8 @@ @layer base { :root { - --font-sans: 'Inter'; - --font-signature: 'Caveat'; - --font-noto: 'Noto Sans', 'Noto Sans Korean', 'Noto Sans Japanese', 'Noto Sans Chinese'; + --font-sans: "Inter"; + --font-signature: "Caveat"; + --font-noto: "Noto Sans", "Noto Sans Korean", "Noto Sans Japanese", "Noto Sans Chinese"; } } diff --git a/apps/remix/app/components/dialogs/account-delete-dialog.tsx b/apps/remix/app/components/dialogs/account-delete-dialog.tsx index 5c528dfc4..d23a0a74b 100644 --- a/apps/remix/app/components/dialogs/account-delete-dialog.tsx +++ b/apps/remix/app/components/dialogs/account-delete-dialog.tsx @@ -1,9 +1,3 @@ -import { useState } from 'react'; - -import { msg } from '@lingui/core/macro'; -import { useLingui } from '@lingui/react'; -import { Trans } from '@lingui/react/macro'; - import { authClient } from '@documenso/auth/client'; import { useSession } from '@documenso/lib/client-only/providers/session'; import { trpc } from '@documenso/trpc/react'; @@ -21,6 +15,10 @@ import { import { Input } from '@documenso/ui/primitives/input'; import { Label } from '@documenso/ui/primitives/label'; import { useToast } from '@documenso/ui/primitives/use-toast'; +import { msg } from '@lingui/core/macro'; +import { useLingui } from '@lingui/react'; +import { Trans } from '@lingui/react/macro'; +import { useState } from 'react'; export type AccountDeleteDialogProps = { className?: string; @@ -36,8 +34,7 @@ export const AccountDeleteDialog = ({ className }: AccountDeleteDialogProps) => const [enteredEmail, setEnteredEmail] = useState(''); - const { mutateAsync: deleteAccount, isPending: isDeletingAccount } = - trpc.profile.deleteAccount.useMutation(); + const { mutateAsync: deleteAccount, isPending: isDeletingAccount } = trpc.profile.deleteAccount.useMutation(); const onDeleteAccount = async () => { try { @@ -63,18 +60,15 @@ export const AccountDeleteDialog = ({ className }: AccountDeleteDialogProps) => return (
- +
Delete Account - Delete your account and all its contents, including completed documents. This action - is irreversible and will cancel your subscription, so proceed with caution. + Delete your account and all its contents, including completed documents. This action is irreversible and + will cancel your subscription, so proceed with caution.
@@ -109,10 +103,8 @@ export const AccountDeleteDialog = ({ className }: AccountDeleteDialogProps) => - Documenso will delete{' '} - all of your documents, along with all of - your completed documents, signatures, and all other resources belonging to your - Account. + Documenso will delete all of your documents, along with all + of your completed documents, signatures, and all other resources belonging to your Account. @@ -121,9 +113,7 @@ export const AccountDeleteDialog = ({ className }: AccountDeleteDialogProps) =>
diff --git a/apps/remix/app/components/dialogs/admin-document-delete-dialog.tsx b/apps/remix/app/components/dialogs/admin-document-delete-dialog.tsx index 076fb0546..9fbf41a19 100644 --- a/apps/remix/app/components/dialogs/admin-document-delete-dialog.tsx +++ b/apps/remix/app/components/dialogs/admin-document-delete-dialog.tsx @@ -1,10 +1,3 @@ -import { useState } from 'react'; - -import { msg } from '@lingui/core/macro'; -import { useLingui } from '@lingui/react'; -import { Trans } from '@lingui/react/macro'; -import { useNavigate } from 'react-router'; - import { trpc } from '@documenso/trpc/react'; import { Alert, AlertDescription, AlertTitle } from '@documenso/ui/primitives/alert'; import { Button } from '@documenso/ui/primitives/button'; @@ -19,6 +12,11 @@ import { } from '@documenso/ui/primitives/dialog'; import { Input } from '@documenso/ui/primitives/input'; import { useToast } from '@documenso/ui/primitives/use-toast'; +import { msg } from '@lingui/core/macro'; +import { useLingui } from '@lingui/react'; +import { Trans } from '@lingui/react/macro'; +import { useState } from 'react'; +import { useNavigate } from 'react-router'; export type AdminDocumentDeleteDialogProps = { envelopeId: string; @@ -32,8 +30,7 @@ export const AdminDocumentDeleteDialog = ({ envelopeId }: AdminDocumentDeleteDia const [reason, setReason] = useState(''); - const { mutateAsync: deleteDocument, isPending: isDeletingDocument } = - trpc.admin.document.delete.useMutation(); + const { mutateAsync: deleteDocument, isPending: isDeletingDocument } = trpc.admin.document.delete.useMutation(); const handleDeleteDocument = async () => { try { @@ -64,18 +61,13 @@ export const AdminDocumentDeleteDialog = ({ envelopeId }: AdminDocumentDeleteDia return (
- +
Delete Document - - Delete the document. This action is irreversible so proceed with caution. - + Delete the document. This action is irreversible so proceed with caution.
@@ -105,12 +97,7 @@ export const AdminDocumentDeleteDialog = ({ envelopeId }: AdminDocumentDeleteDia To confirm, please enter the reason - setReason(e.target.value)} - /> + setReason(e.target.value)} />
diff --git a/apps/remix/app/components/dialogs/admin-organisation-create-dialog.tsx b/apps/remix/app/components/dialogs/admin-organisation-create-dialog.tsx index 840a4bb5d..d8eb9d35a 100644 --- a/apps/remix/app/components/dialogs/admin-organisation-create-dialog.tsx +++ b/apps/remix/app/components/dialogs/admin-organisation-create-dialog.tsx @@ -1,13 +1,3 @@ -import { useEffect, useState } from 'react'; - -import { zodResolver } from '@hookform/resolvers/zod'; -import { useLingui } from '@lingui/react/macro'; -import { Trans } from '@lingui/react/macro'; -import type * as DialogPrimitive from '@radix-ui/react-dialog'; -import { useForm } from 'react-hook-form'; -import { useNavigate } from 'react-router'; -import type { z } from 'zod'; - import { AppError } from '@documenso/lib/errors/app-error'; import { trpc } from '@documenso/trpc/react'; import { ZCreateAdminOrganisationRequestSchema } from '@documenso/trpc/server/admin-router/create-admin-organisation.types'; @@ -22,16 +12,16 @@ import { DialogTitle, DialogTrigger, } from '@documenso/ui/primitives/dialog'; -import { - Form, - FormControl, - FormField, - FormItem, - FormLabel, - FormMessage, -} from '@documenso/ui/primitives/form/form'; +import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from '@documenso/ui/primitives/form/form'; import { Input } from '@documenso/ui/primitives/input'; import { useToast } from '@documenso/ui/primitives/use-toast'; +import { zodResolver } from '@hookform/resolvers/zod'; +import { Trans, useLingui } from '@lingui/react/macro'; +import type * as DialogPrimitive from '@radix-ui/react-dialog'; +import { useEffect, useState } from 'react'; +import { useForm } from 'react-hook-form'; +import { useNavigate } from 'react-router'; +import type { z } from 'zod'; export type OrganisationCreateDialogProps = { trigger?: React.ReactNode; @@ -44,11 +34,7 @@ const ZCreateAdminOrganisationFormSchema = ZCreateAdminOrganisationRequestSchema type TCreateOrganisationFormSchema = z.infer; -export const AdminOrganisationCreateDialog = ({ - trigger, - ownerUserId, - ...props -}: OrganisationCreateDialogProps) => { +export const AdminOrganisationCreateDialog = ({ trigger, ownerUserId, ...props }: OrganisationCreateDialogProps) => { const { t } = useLingui(); const { toast } = useToast(); @@ -101,11 +87,7 @@ export const AdminOrganisationCreateDialog = ({ }, [open, form]); return ( - !form.formState.isSubmitting && setOpen(value)} - > + !form.formState.isSubmitting && setOpen(value)}> e.stopPropagation()} asChild={true}> {trigger ?? ( - diff --git a/apps/remix/app/components/dialogs/admin-team-member-delete-dialog.tsx b/apps/remix/app/components/dialogs/admin-team-member-delete-dialog.tsx index 05f0f5a1e..fd9945770 100644 --- a/apps/remix/app/components/dialogs/admin-team-member-delete-dialog.tsx +++ b/apps/remix/app/components/dialogs/admin-team-member-delete-dialog.tsx @@ -1,10 +1,3 @@ -import { useState } from 'react'; - -import { msg } from '@lingui/core/macro'; -import { useLingui } from '@lingui/react'; -import { Trans } from '@lingui/react/macro'; -import { useNavigate } from 'react-router'; - import { AppError } from '@documenso/lib/errors/app-error'; import { trpc } from '@documenso/trpc/react'; import { Alert, AlertDescription } from '@documenso/ui/primitives/alert'; @@ -20,6 +13,11 @@ import { DialogTrigger, } from '@documenso/ui/primitives/dialog'; import { useToast } from '@documenso/ui/primitives/use-toast'; +import { msg } from '@lingui/core/macro'; +import { useLingui } from '@lingui/react'; +import { Trans } from '@lingui/react/macro'; +import { useState } from 'react'; +import { useNavigate } from 'react-router'; export type AdminTeamMemberDeleteDialogProps = { teamId: number; @@ -93,8 +91,8 @@ export const AdminTeamMemberDeleteDialog = ({
- You are about to remove the following user from the team{' '} - {teamName}: + You are about to remove the following user from the team {teamName} + : diff --git a/apps/remix/app/components/dialogs/admin-user-delete-dialog.tsx b/apps/remix/app/components/dialogs/admin-user-delete-dialog.tsx index 157cc5284..e98f63320 100644 --- a/apps/remix/app/components/dialogs/admin-user-delete-dialog.tsx +++ b/apps/remix/app/components/dialogs/admin-user-delete-dialog.tsx @@ -1,11 +1,3 @@ -import { useState } from 'react'; - -import { msg } from '@lingui/core/macro'; -import { useLingui } from '@lingui/react'; -import { Trans } from '@lingui/react/macro'; -import { useNavigate } from 'react-router'; -import { match } from 'ts-pattern'; - import { AppError, AppErrorCode } from '@documenso/lib/errors/app-error'; import { trpc } from '@documenso/trpc/react'; import type { TGetUserResponse } from '@documenso/trpc/server/admin-router/get-user.types'; @@ -22,6 +14,12 @@ import { } from '@documenso/ui/primitives/dialog'; import { Input } from '@documenso/ui/primitives/input'; import { useToast } from '@documenso/ui/primitives/use-toast'; +import { msg } from '@lingui/core/macro'; +import { useLingui } from '@lingui/react'; +import { Trans } from '@lingui/react/macro'; +import { useState } from 'react'; +import { useNavigate } from 'react-router'; +import { match } from 'ts-pattern'; export type AdminUserDeleteDialogProps = { className?: string; @@ -34,8 +32,7 @@ export const AdminUserDeleteDialog = ({ className, user }: AdminUserDeleteDialog const navigate = useNavigate(); const [email, setEmail] = useState(''); - const { mutateAsync: deleteUser, isPending: isDeletingUser } = - trpc.admin.user.delete.useMutation(); + const { mutateAsync: deleteUser, isPending: isDeletingUser } = trpc.admin.user.delete.useMutation(); const onDeleteAccount = async () => { try { @@ -69,16 +66,13 @@ export const AdminUserDeleteDialog = ({ className, user }: AdminUserDeleteDialog return (
- +
Delete Account - Delete the users account and all its contents. This action is irreversible and will - cancel their subscription, so proceed with caution. + Delete the users account and all its contents. This action is irreversible and will cancel their + subscription, so proceed with caution.
@@ -111,12 +105,7 @@ export const AdminUserDeleteDialog = ({ className, user }: AdminUserDeleteDialog - setEmail(e.target.value)} - /> + setEmail(e.target.value)} />
diff --git a/apps/remix/app/components/dialogs/admin-user-disable-dialog.tsx b/apps/remix/app/components/dialogs/admin-user-disable-dialog.tsx index 347532a19..08b5cd2e2 100644 --- a/apps/remix/app/components/dialogs/admin-user-disable-dialog.tsx +++ b/apps/remix/app/components/dialogs/admin-user-disable-dialog.tsx @@ -1,10 +1,3 @@ -import { useState } from 'react'; - -import { msg } from '@lingui/core/macro'; -import { useLingui } from '@lingui/react'; -import { Trans } from '@lingui/react/macro'; -import { match } from 'ts-pattern'; - import { AppError, AppErrorCode } from '@documenso/lib/errors/app-error'; import { trpc } from '@documenso/trpc/react'; import type { TGetUserResponse } from '@documenso/trpc/server/admin-router/get-user.types'; @@ -21,23 +14,24 @@ import { } from '@documenso/ui/primitives/dialog'; import { Input } from '@documenso/ui/primitives/input'; import { useToast } from '@documenso/ui/primitives/use-toast'; +import { msg } from '@lingui/core/macro'; +import { useLingui } from '@lingui/react'; +import { Trans } from '@lingui/react/macro'; +import { useState } from 'react'; +import { match } from 'ts-pattern'; export type AdminUserDisableDialogProps = { className?: string; userToDisable: TGetUserResponse; }; -export const AdminUserDisableDialog = ({ - className, - userToDisable, -}: AdminUserDisableDialogProps) => { +export const AdminUserDisableDialog = ({ className, userToDisable }: AdminUserDisableDialogProps) => { const { _ } = useLingui(); const { toast } = useToast(); const [email, setEmail] = useState(''); - const { mutateAsync: disableUser, isPending: isDisablingUser } = - trpc.admin.user.disable.useMutation(); + const { mutateAsync: disableUser, isPending: isDisablingUser } = trpc.admin.user.disable.useMutation(); const onDisableAccount = async () => { try { @@ -69,16 +63,13 @@ export const AdminUserDisableDialog = ({ return (
- +
Disable Account - Disabling the user results in the user not being able to use the account. It also - disables all the related contents such as subscription, webhooks, teams, and API keys. + Disabling the user results in the user not being able to use the account. It also disables all the related + contents such as subscription, webhooks, teams, and API keys.
@@ -100,9 +91,8 @@ export const AdminUserDisableDialog = ({ - This action is reversible, but please be careful as the account may be - affected permanently (e.g. their settings and contents not being restored - properly). + This action is reversible, but please be careful as the account may be affected permanently (e.g. + their settings and contents not being restored properly). @@ -116,12 +106,7 @@ export const AdminUserDisableDialog = ({ - setEmail(e.target.value)} - /> + setEmail(e.target.value)} />
diff --git a/apps/remix/app/components/dialogs/admin-user-enable-dialog.tsx b/apps/remix/app/components/dialogs/admin-user-enable-dialog.tsx index 64f9aa72d..21a3b7e50 100644 --- a/apps/remix/app/components/dialogs/admin-user-enable-dialog.tsx +++ b/apps/remix/app/components/dialogs/admin-user-enable-dialog.tsx @@ -1,10 +1,3 @@ -import { useState } from 'react'; - -import { msg } from '@lingui/core/macro'; -import { useLingui } from '@lingui/react'; -import { Trans } from '@lingui/react/macro'; -import { match } from 'ts-pattern'; - import { AppError, AppErrorCode } from '@documenso/lib/errors/app-error'; import { trpc } from '@documenso/trpc/react'; import type { TGetUserResponse } from '@documenso/trpc/server/admin-router/get-user.types'; @@ -21,6 +14,11 @@ import { } from '@documenso/ui/primitives/dialog'; import { Input } from '@documenso/ui/primitives/input'; import { useToast } from '@documenso/ui/primitives/use-toast'; +import { msg } from '@lingui/core/macro'; +import { useLingui } from '@lingui/react'; +import { Trans } from '@lingui/react/macro'; +import { useState } from 'react'; +import { match } from 'ts-pattern'; export type AdminUserEnableDialogProps = { className?: string; @@ -33,8 +31,7 @@ export const AdminUserEnableDialog = ({ className, userToEnable }: AdminUserEnab const [email, setEmail] = useState(''); - const { mutateAsync: enableUser, isPending: isEnablingUser } = - trpc.admin.user.enable.useMutation(); + const { mutateAsync: enableUser, isPending: isEnablingUser } = trpc.admin.user.enable.useMutation(); const onEnableAccount = async () => { try { @@ -66,16 +63,13 @@ export const AdminUserEnableDialog = ({ className, userToEnable }: AdminUserEnab return (
- +
Enable Account - Enabling the account results in the user being able to use the account again, and all - the related features such as webhooks, teams, and API keys for example. + Enabling the account results in the user being able to use the account again, and all the related features + such as webhooks, teams, and API keys for example.
@@ -103,20 +97,11 @@ export const AdminUserEnableDialog = ({ className, userToEnable }: AdminUserEnab - setEmail(e.target.value)} - /> + setEmail(e.target.value)} />
- diff --git a/apps/remix/app/components/dialogs/admin-user-reset-two-factor-dialog.tsx b/apps/remix/app/components/dialogs/admin-user-reset-two-factor-dialog.tsx index 59372ecc9..3a63ede2a 100644 --- a/apps/remix/app/components/dialogs/admin-user-reset-two-factor-dialog.tsx +++ b/apps/remix/app/components/dialogs/admin-user-reset-two-factor-dialog.tsx @@ -1,11 +1,3 @@ -import { useState } from 'react'; - -import { msg } from '@lingui/core/macro'; -import { useLingui } from '@lingui/react'; -import { Trans } from '@lingui/react/macro'; -import { useRevalidator } from 'react-router'; -import { match } from 'ts-pattern'; - import { AppError, AppErrorCode } from '@documenso/lib/errors/app-error'; import { trpc } from '@documenso/trpc/react'; import type { TGetUserResponse } from '@documenso/trpc/server/admin-router/get-user.types'; @@ -22,24 +14,26 @@ import { } from '@documenso/ui/primitives/dialog'; import { Input } from '@documenso/ui/primitives/input'; import { useToast } from '@documenso/ui/primitives/use-toast'; +import { msg } from '@lingui/core/macro'; +import { useLingui } from '@lingui/react'; +import { Trans } from '@lingui/react/macro'; +import { useState } from 'react'; +import { useRevalidator } from 'react-router'; +import { match } from 'ts-pattern'; export type AdminUserResetTwoFactorDialogProps = { className?: string; user: TGetUserResponse; }; -export const AdminUserResetTwoFactorDialog = ({ - className, - user, -}: AdminUserResetTwoFactorDialogProps) => { +export const AdminUserResetTwoFactorDialog = ({ className, user }: AdminUserResetTwoFactorDialogProps) => { const { _ } = useLingui(); const { toast } = useToast(); const { revalidate } = useRevalidator(); const [email, setEmail] = useState(''); const [open, setOpen] = useState(false); - const { mutateAsync: resetTwoFactor, isPending: isResettingTwoFactor } = - trpc.admin.user.resetTwoFactor.useMutation(); + const { mutateAsync: resetTwoFactor, isPending: isResettingTwoFactor } = trpc.admin.user.resetTwoFactor.useMutation(); const onResetTwoFactor = async () => { try { @@ -64,9 +58,7 @@ export const AdminUserResetTwoFactorDialog = ({ AppErrorCode.UNAUTHORIZED, () => msg`You are not authorized to reset two factor authentcation for this user.`, ) - .otherwise( - () => msg`An error occurred while resetting two factor authentication for the user.`, - ); + .otherwise(() => msg`An error occurred while resetting two factor authentication for the user.`); toast({ title: _(msg`Error`), @@ -87,16 +79,13 @@ export const AdminUserResetTwoFactorDialog = ({ return (
- +
Reset Two Factor Authentication - Reset the users two factor authentication. This action is irreversible and will - disable two factor authentication for the user. + Reset the users two factor authentication. This action is irreversible and will disable two factor + authentication for the user.
@@ -119,8 +108,7 @@ export const AdminUserResetTwoFactorDialog = ({ - This action is irreversible. Please ensure you have informed the user before - proceeding. + This action is irreversible. Please ensure you have informed the user before proceeding. @@ -132,12 +120,7 @@ export const AdminUserResetTwoFactorDialog = ({ - setEmail(e.target.value)} - /> + setEmail(e.target.value)} />
diff --git a/apps/remix/app/components/dialogs/ai-features-enable-dialog.tsx b/apps/remix/app/components/dialogs/ai-features-enable-dialog.tsx index 20c2c1e8e..8508c49a9 100644 --- a/apps/remix/app/components/dialogs/ai-features-enable-dialog.tsx +++ b/apps/remix/app/components/dialogs/ai-features-enable-dialog.tsx @@ -1,20 +1,11 @@ -import { useState } from 'react'; - -import { useLingui } from '@lingui/react/macro'; -import { Trans } from '@lingui/react/macro'; -import { OrganisationMemberRole, TeamMemberRole } from '@prisma/client'; - import { useCurrentOrganisation } from '@documenso/lib/client-only/providers/organisation'; import { trpc } from '@documenso/trpc/react'; import { Alert, AlertDescription } from '@documenso/ui/primitives/alert'; import { Button } from '@documenso/ui/primitives/button'; -import { - Dialog, - DialogContent, - DialogFooter, - DialogHeader, - DialogTitle, -} from '@documenso/ui/primitives/dialog'; +import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle } from '@documenso/ui/primitives/dialog'; +import { Trans, useLingui } from '@lingui/react/macro'; +import { OrganisationMemberRole, TeamMemberRole } from '@prisma/client'; +import { useState } from 'react'; import { useCurrentTeam } from '~/providers/team'; @@ -24,11 +15,7 @@ type AiFeaturesEnableDialogProps = { onEnabled: () => void; }; -export const AiFeaturesEnableDialog = ({ - open, - onOpenChange, - onEnabled, -}: AiFeaturesEnableDialogProps) => { +export const AiFeaturesEnableDialog = ({ open, onOpenChange, onEnabled }: AiFeaturesEnableDialogProps) => { const { t } = useLingui(); const team = useCurrentTeam(); @@ -71,11 +58,7 @@ export const AiFeaturesEnableDialog = ({ onOpenChange(false); } catch (err) { console.error('Failed to enable AI features', err); - setError( - err instanceof Error - ? err.message - : t`We couldn't enable AI features right now. Please try again.`, - ); + setError(err instanceof Error ? err.message : t`We couldn't enable AI features right now. Please try again.`); } }; @@ -89,39 +72,38 @@ export const AiFeaturesEnableDialog = ({
-

+

- Turn on AI detection to automatically find recipients and fields in your documents. AI - providers do not retain your data for training. + Turn on AI detection to automatically find recipients and fields in your documents. AI providers do not + retain your data for training.

- Your document content will be sent securely to our AI provider solely for detection - and will not be stored or used for training. + Your document content will be sent securely to our AI provider solely for detection and will not be + stored or used for training. {canEnableAiFeatures ? ( -

+

- You're an admin. You can enable AI features for this team right away. Everyone on - the team will see AI detection once enabled. + You're an admin. You can enable AI features for this team right away. Everyone on the team will see AI + detection once enabled.

) : ( -

+

- AI features are disabled for your team. Please ask your team owner or organisation - owner to enable them. + AI features are disabled for your team. Please ask your team owner or organisation owner to enable them.

)} - {error ?

{error}

: null} + {error ?

{error}

: null}
diff --git a/apps/remix/app/components/dialogs/ai-field-detection-dialog.tsx b/apps/remix/app/components/dialogs/ai-field-detection-dialog.tsx index 748966960..62f59d9dc 100644 --- a/apps/remix/app/components/dialogs/ai-field-detection-dialog.tsx +++ b/apps/remix/app/components/dialogs/ai-field-detection-dialog.tsx @@ -1,29 +1,17 @@ -import { useCallback, useEffect, useMemo, useState } from 'react'; - +import type { NormalizedFieldWithContext } from '@documenso/lib/server-only/ai/envelope/detect-fields/types'; +import { Alert, AlertDescription } from '@documenso/ui/primitives/alert'; +import { Button } from '@documenso/ui/primitives/button'; +import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle } from '@documenso/ui/primitives/dialog'; +import { Label } from '@documenso/ui/primitives/label'; +import { Textarea } from '@documenso/ui/primitives/textarea'; import type { MessageDescriptor } from '@lingui/core'; import { msg } from '@lingui/core/macro'; import { useLingui } from '@lingui/react'; import { Plural, Trans } from '@lingui/react/macro'; import { CheckIcon, FormInputIcon, ShieldCheckIcon } from 'lucide-react'; +import { useCallback, useEffect, useMemo, useState } from 'react'; -import type { NormalizedFieldWithContext } from '@documenso/lib/server-only/ai/envelope/detect-fields/types'; -import { Alert, AlertDescription } from '@documenso/ui/primitives/alert'; -import { Button } from '@documenso/ui/primitives/button'; -import { - Dialog, - DialogContent, - DialogFooter, - DialogHeader, - DialogTitle, -} from '@documenso/ui/primitives/dialog'; -import { Label } from '@documenso/ui/primitives/label'; -import { Textarea } from '@documenso/ui/primitives/textarea'; - -import { - AiApiError, - type DetectFieldsProgressEvent, - detectFields, -} from '../../../server/api/ai/detect-fields.client'; +import { AiApiError, type DetectFieldsProgressEvent, detectFields } from '../../../server/api/ai/detect-fields.client'; import { AnimatedDocumentScanner } from '../general/animated-document-scanner'; type DialogState = 'PROMPT' | 'PROCESSING' | 'REVIEW' | 'ERROR' | 'RATE_LIMITED'; @@ -171,20 +159,17 @@ export const AiFieldDetectionDialog = ({
-

+

- We'll scan your document to find form fields like signature lines, text inputs, - checkboxes, and more. Detected fields will be suggested for you to review. + We'll scan your document to find form fields like signature lines, text inputs, checkboxes, and more. + Detected fields will be suggested for you to review.

- - Your document is processed securely using AI services that don't retain your - data. - + Your document is processed securely using AI services that don't retain your data. @@ -200,7 +185,7 @@ export const AiFieldDetectionDialog = ({ rows={2} className="resize-none" /> -

+

Help the AI assign fields to the right recipients.

@@ -231,7 +216,7 @@ export const AiFieldDetectionDialog = ({

{_(PROCESSING_MESSAGES[messageIndex])}

{progress && ( -

+

)} -

+

This can take a minute or two depending on the size of your document.

@@ -278,16 +263,16 @@ export const AiFieldDetectionDialog = ({ {detectedFields.length === 0 ? (
-

+

No fields were detected in your document.

-

+

You can add fields manually in the editor.

) : ( <> -

+

(

  • {_(FIELD_TYPE_LABELS[type]) || type} - {count} + {count}
  • ))} @@ -314,7 +299,7 @@ export const AiFieldDetectionDialog = ({ {detectedFields.length > 0 && ( )} @@ -331,11 +316,11 @@ export const AiFieldDetectionDialog = ({
    -

    +

    Something went wrong while detecting fields.

    - {error &&

    {error}

    } + {error &&

    {error}

    }
    @@ -358,10 +343,8 @@ export const AiFieldDetectionDialog = ({
    -

    - - You've made too many detection requests. Please wait a minute before trying again. - +

    + You've made too many detection requests. Please wait a minute before trying again.

    diff --git a/apps/remix/app/components/dialogs/ai-recipient-detection-dialog.tsx b/apps/remix/app/components/dialogs/ai-recipient-detection-dialog.tsx index cef7903c9..b0759e638 100644 --- a/apps/remix/app/components/dialogs/ai-recipient-detection-dialog.tsx +++ b/apps/remix/app/components/dialogs/ai-recipient-detection-dialog.tsx @@ -1,22 +1,14 @@ -import { useCallback, useEffect, useState } from 'react'; - -import { msg } from '@lingui/core/macro'; -import { useLingui } from '@lingui/react'; -import { Plural, Trans } from '@lingui/react/macro'; -import { CheckIcon, ShieldCheckIcon, UserIcon, XIcon } from 'lucide-react'; - import { RECIPIENT_ROLES_DESCRIPTION } from '@documenso/lib/constants/recipient-roles'; import type { TDetectedRecipientSchema } from '@documenso/lib/server-only/ai/envelope/detect-recipients/schema'; import { Alert, AlertDescription } from '@documenso/ui/primitives/alert'; import { AvatarWithText } from '@documenso/ui/primitives/avatar'; import { Button } from '@documenso/ui/primitives/button'; -import { - Dialog, - DialogContent, - DialogFooter, - DialogHeader, - DialogTitle, -} from '@documenso/ui/primitives/dialog'; +import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle } from '@documenso/ui/primitives/dialog'; +import { msg } from '@lingui/core/macro'; +import { useLingui } from '@lingui/react'; +import { Plural, Trans } from '@lingui/react/macro'; +import { CheckIcon, ShieldCheckIcon, UserIcon, XIcon } from 'lucide-react'; +import { useCallback, useEffect, useState } from 'react'; import { AiApiError, @@ -146,20 +138,17 @@ export const AiRecipientDetectionDialog = ({
    -

    +

    - We'll scan your document to find signature fields and identify who needs to sign. - Detected recipients will be suggested for you to review. + We'll scan your document to find signature fields and identify who needs to sign. Detected recipients + will be suggested for you to review.

    - - Your document is processed securely using AI services that don't retain your - data. - + Your document is processed securely using AI services that don't retain your data.
    @@ -189,7 +178,7 @@ export const AiRecipientDetectionDialog = ({

    {_(PROCESSING_MESSAGES[messageIndex])}

    {progress && ( -

    +

    )} -

    +

    This can take a minute or two depending on the size of your document.

    @@ -236,16 +225,16 @@ export const AiRecipientDetectionDialog = ({ {detectedRecipients.length === 0 ? (
    -

    +

    No recipients were detected in your document.

    -

    +

    You can add recipients manually in the editor.

    ) : ( <> -

    +

    +

    {recipient.name || _(msg`Unknown name`)}

    } secondaryText={ -
    -

    +

    +

    {recipient.email || _(msg`No email detected`)}

    {_(RECIPIENT_ROLES_DESCRIPTION[recipient.role].roleName)}

    @@ -304,7 +293,7 @@ export const AiRecipientDetectionDialog = ({ {detectedRecipients.length > 0 && ( )} @@ -321,11 +310,11 @@ export const AiRecipientDetectionDialog = ({
    -

    +

    Something went wrong while detecting recipients.

    - {error &&

    {error}

    } + {error &&

    {error}

    }
    @@ -349,10 +338,8 @@ export const AiRecipientDetectionDialog = ({
    -

    - - You've made too many detection requests. Please wait a minute before trying again. - +

    + You've made too many detection requests. Please wait a minute before trying again.

    diff --git a/apps/remix/app/components/dialogs/assistant-confirmation-dialog.tsx b/apps/remix/app/components/dialogs/assistant-confirmation-dialog.tsx index b6c38e4d0..02297dae9 100644 --- a/apps/remix/app/components/dialogs/assistant-confirmation-dialog.tsx +++ b/apps/remix/app/components/dialogs/assistant-confirmation-dialog.tsx @@ -1,10 +1,3 @@ -import { useState } from 'react'; - -import { zodResolver } from '@hookform/resolvers/zod'; -import { Trans, useLingui } from '@lingui/react/macro'; -import { useForm } from 'react-hook-form'; -import { z } from 'zod'; - import { zEmail } from '@documenso/lib/utils/zod'; import { Button } from '@documenso/ui/primitives/button'; import { @@ -15,15 +8,13 @@ import { DialogHeader, DialogTitle, } from '@documenso/ui/primitives/dialog'; -import { - Form, - FormControl, - FormField, - FormItem, - FormLabel, - FormMessage, -} from '@documenso/ui/primitives/form/form'; +import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from '@documenso/ui/primitives/form/form'; import { Input } from '@documenso/ui/primitives/input'; +import { zodResolver } from '@hookform/resolvers/zod'; +import { Trans, useLingui } from '@lingui/react/macro'; +import { useState } from 'react'; +import { useForm } from 'react-hook-form'; +import { z } from 'zod'; import { DocumentSigningDisclosure } from '../general/document-signing/document-signing-disclosure'; @@ -104,9 +95,8 @@ export function AssistantConfirmationDialog({ - Are you sure you want to complete the document? This action cannot be undone. - Please ensure that you have completed prefilling all relevant fields before - proceeding. + Are you sure you want to complete the document? This action cannot be undone. Please ensure that you + have completed prefilling all relevant fields before proceeding. @@ -116,7 +106,7 @@ export function AssistantConfirmationDialog({
    {!isEditingNextSigner && (
    -

    +

    The next recipient to sign this document will be{' '} {form.watch('name')} ( @@ -147,11 +137,7 @@ export function AssistantConfirmationDialog({ Name - + diff --git a/apps/remix/app/components/dialogs/claim-create-dialog.tsx b/apps/remix/app/components/dialogs/claim-create-dialog.tsx index b308fa485..88c936e5f 100644 --- a/apps/remix/app/components/dialogs/claim-create-dialog.tsx +++ b/apps/remix/app/components/dialogs/claim-create-dialog.tsx @@ -1,8 +1,3 @@ -import { useState } from 'react'; - -import { Trans, useLingui } from '@lingui/react/macro'; -import type { z } from 'zod'; - import type { TLicenseClaim } from '@documenso/lib/types/license'; import { generateDefaultSubscriptionClaim } from '@documenso/lib/utils/organisations-claims'; import { trpc } from '@documenso/trpc/react'; @@ -18,6 +13,9 @@ import { DialogTrigger, } from '@documenso/ui/primitives/dialog'; import { useToast } from '@documenso/ui/primitives/use-toast'; +import { Trans, useLingui } from '@lingui/react/macro'; +import { useState } from 'react'; +import type { z } from 'zod'; import { SubscriptionClaimForm } from '../forms/subscription-claim-form'; @@ -75,12 +73,7 @@ export const ClaimCreateDialog = ({ licenseFlags }: ClaimCreateDialogProps) => { licenseFlags={licenseFlags} formSubmitTrigger={ - diff --git a/apps/remix/app/components/dialogs/claim-delete-dialog.tsx b/apps/remix/app/components/dialogs/claim-delete-dialog.tsx index 61124fa9d..d63a3cf1f 100644 --- a/apps/remix/app/components/dialogs/claim-delete-dialog.tsx +++ b/apps/remix/app/components/dialogs/claim-delete-dialog.tsx @@ -1,7 +1,3 @@ -import { useState } from 'react'; - -import { Trans, useLingui } from '@lingui/react/macro'; - import { trpc } from '@documenso/trpc/react'; import { Alert, AlertDescription } from '@documenso/ui/primitives/alert'; import { Button } from '@documenso/ui/primitives/button'; @@ -15,6 +11,8 @@ import { DialogTrigger, } from '@documenso/ui/primitives/dialog'; import { useToast } from '@documenso/ui/primitives/use-toast'; +import { Trans, useLingui } from '@lingui/react/macro'; +import { useState } from 'react'; export type ClaimDeleteDialogProps = { claimId: string; @@ -23,12 +21,7 @@ export type ClaimDeleteDialogProps = { trigger: React.ReactNode; }; -export const ClaimDeleteDialog = ({ - claimId, - claimName, - claimLocked, - trigger, -}: ClaimDeleteDialogProps) => { +export const ClaimDeleteDialog = ({ claimId, claimName, claimLocked, trigger }: ClaimDeleteDialogProps) => { const { t } = useLingui(); const { toast } = useToast(); diff --git a/apps/remix/app/components/dialogs/claim-update-dialog.tsx b/apps/remix/app/components/dialogs/claim-update-dialog.tsx index 01057910b..bcbd91a56 100644 --- a/apps/remix/app/components/dialogs/claim-update-dialog.tsx +++ b/apps/remix/app/components/dialogs/claim-update-dialog.tsx @@ -1,7 +1,3 @@ -import { useState } from 'react'; - -import { Trans, useLingui } from '@lingui/react/macro'; - import type { TLicenseClaim } from '@documenso/lib/types/license'; import { trpc } from '@documenso/trpc/react'; import type { TFindSubscriptionClaimsResponse } from '@documenso/trpc/server/admin-router/find-subscription-claims.types'; @@ -16,6 +12,8 @@ import { DialogTrigger, } from '@documenso/ui/primitives/dialog'; import { useToast } from '@documenso/ui/primitives/use-toast'; +import { Trans, useLingui } from '@lingui/react/macro'; +import { useState } from 'react'; import { SubscriptionClaimForm } from '../forms/subscription-claim-form'; @@ -74,12 +72,7 @@ export const ClaimUpdateDialog = ({ claim, trigger, licenseFlags }: ClaimUpdateD licenseFlags={licenseFlags} formSubmitTrigger={ - diff --git a/apps/remix/app/components/dialogs/document-move-to-folder-dialog.tsx b/apps/remix/app/components/dialogs/document-move-to-folder-dialog.tsx index 45ec1465a..694f2d56a 100644 --- a/apps/remix/app/components/dialogs/document-move-to-folder-dialog.tsx +++ b/apps/remix/app/components/dialogs/document-move-to-folder-dialog.tsx @@ -1,15 +1,3 @@ -import { useEffect, useState } from 'react'; - -import { zodResolver } from '@hookform/resolvers/zod'; -import { msg } from '@lingui/core/macro'; -import { useLingui } from '@lingui/react'; -import { Trans } from '@lingui/react/macro'; -import type * as DialogPrimitive from '@radix-ui/react-dialog'; -import { FolderIcon, HomeIcon, Loader2, Search } from 'lucide-react'; -import { useForm } from 'react-hook-form'; -import { useNavigate } from 'react-router'; -import { z } from 'zod'; - import { AppError, AppErrorCode } from '@documenso/lib/errors/app-error'; import { FolderType } from '@documenso/lib/types/folder-type'; import { formatDocumentsPath } from '@documenso/lib/utils/teams'; @@ -23,16 +11,19 @@ import { DialogHeader, DialogTitle, } from '@documenso/ui/primitives/dialog'; -import { - Form, - FormControl, - FormField, - FormItem, - FormLabel, - FormMessage, -} from '@documenso/ui/primitives/form/form'; +import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from '@documenso/ui/primitives/form/form'; import { Input } from '@documenso/ui/primitives/input'; import { useToast } from '@documenso/ui/primitives/use-toast'; +import { zodResolver } from '@hookform/resolvers/zod'; +import { msg } from '@lingui/core/macro'; +import { useLingui } from '@lingui/react'; +import { Trans } from '@lingui/react/macro'; +import type * as DialogPrimitive from '@radix-ui/react-dialog'; +import { FolderIcon, HomeIcon, Loader2, Search } from 'lucide-react'; +import { useEffect, useState } from 'react'; +import { useForm } from 'react-hook-form'; +import { useNavigate } from 'react-router'; +import { z } from 'zod'; import { useCurrentTeam } from '~/providers/team'; @@ -165,7 +156,7 @@ export const DocumentMoveToFolderDialog = ({

    - + +
    No folders found
    )} @@ -239,9 +230,7 @@ export const DocumentMoveToFolderDialog = ({ diff --git a/apps/remix/app/components/dialogs/document-resend-dialog.tsx b/apps/remix/app/components/dialogs/document-resend-dialog.tsx index 57e5235cc..d4e4a5168 100644 --- a/apps/remix/app/components/dialogs/document-resend-dialog.tsx +++ b/apps/remix/app/components/dialogs/document-resend-dialog.tsx @@ -1,14 +1,3 @@ -import { useState } from 'react'; - -import { zodResolver } from '@hookform/resolvers/zod'; -import { msg } from '@lingui/core/macro'; -import { useLingui } from '@lingui/react'; -import { Trans } from '@lingui/react/macro'; -import { SigningStatus, type Team, type User } from '@prisma/client'; -import { History } from 'lucide-react'; -import { useForm, useWatch } from 'react-hook-form'; -import * as z from 'zod'; - import { useSession } from '@documenso/lib/client-only/providers/session'; import { getRecipientType } from '@documenso/lib/client-only/recipient-type'; import type { TRecipientLite } from '@documenso/lib/types/recipient'; @@ -28,14 +17,17 @@ import { DialogTrigger, } from '@documenso/ui/primitives/dialog'; import { DropdownMenuItem } from '@documenso/ui/primitives/dropdown-menu'; -import { - Form, - FormControl, - FormField, - FormItem, - FormLabel, -} from '@documenso/ui/primitives/form/form'; +import { Form, FormControl, FormField, FormItem, FormLabel } from '@documenso/ui/primitives/form/form'; import { useToast } from '@documenso/ui/primitives/use-toast'; +import { zodResolver } from '@hookform/resolvers/zod'; +import { msg } from '@lingui/core/macro'; +import { useLingui } from '@lingui/react'; +import { Trans } from '@lingui/react/macro'; +import { SigningStatus, type Team, type User } from '@prisma/client'; +import { History } from 'lucide-react'; +import { useState } from 'react'; +import { useForm, useWatch } from 'react-hook-form'; +import * as z from 'zod'; import { useCurrentTeam } from '~/providers/team'; @@ -142,10 +134,7 @@ export const DocumentResendDialog = ({ document, recipients }: DocumentResendDia render={({ field: { value, onChange } }) => ( <> {recipients.map((recipient) => ( - + {type === EnvelopeType.DOCUMENT ? ( - Please note that this action is irreversible. Once confirmed, - this document will be permanently deleted. + Please note that this action is irreversible. Once confirmed, this document will + be permanently deleted. ) : ( - Please note that this action is irreversible. Once confirmed, - this template will be permanently deleted. + Please note that this action is irreversible. Once confirmed, this template will + be permanently deleted. )} diff --git a/apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx b/apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx index cad5d7f3c..daac27df1 100644 --- a/apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx +++ b/apps/remix/app/components/dialogs/envelope-distribute-dialog.tsx @@ -1,16 +1,3 @@ -import { useEffect, useMemo, useState } from 'react'; - -import { zodResolver } from '@hookform/resolvers/zod'; -import { useLingui } from '@lingui/react/macro'; -import { Trans } from '@lingui/react/macro'; -import { DocumentDistributionMethod, DocumentStatus, EnvelopeType } from '@prisma/client'; -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 { useCurrentEnvelopeEditor } from '@documenso/lib/client-only/providers/envelope-editor-provider'; import { useCurrentOrganisation } from '@documenso/lib/client-only/providers/organisation'; import { DO_NOT_INVALIDATE_QUERY_ON_MUTATION } from '@documenso/lib/constants/trpc'; @@ -32,27 +19,24 @@ import { DialogTitle, DialogTrigger, } from '@documenso/ui/primitives/dialog'; -import { - Form, - FormControl, - FormField, - FormItem, - FormLabel, - FormMessage, -} from '@documenso/ui/primitives/form/form'; +import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from '@documenso/ui/primitives/form/form'; import { Input } from '@documenso/ui/primitives/input'; -import { - Select, - SelectContent, - SelectItem, - SelectTrigger, - SelectValue, -} from '@documenso/ui/primitives/select'; +import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@documenso/ui/primitives/select'; import { SpinnerBox } from '@documenso/ui/primitives/spinner'; import { Tabs, TabsList, TabsTrigger } from '@documenso/ui/primitives/tabs'; import { Textarea } from '@documenso/ui/primitives/textarea'; import { Tooltip, TooltipContent, TooltipTrigger } from '@documenso/ui/primitives/tooltip'; import { useToast } from '@documenso/ui/primitives/use-toast'; +import { zodResolver } from '@hookform/resolvers/zod'; +import { Trans, useLingui } from '@lingui/react/macro'; +import { DocumentDistributionMethod, DocumentStatus, EnvelopeType } from '@prisma/client'; +import { AnimatePresence, motion } from 'framer-motion'; +import { InfoIcon } from 'lucide-react'; +import { useEffect, useMemo, useState } from 'react'; +import { useForm } from 'react-hook-form'; +import { useNavigate } from 'react-router'; +import { match } from 'ts-pattern'; +import * as z from 'zod'; export type EnvelopeDistributeDialogProps = { onDistribute?: () => Promise; @@ -66,10 +50,7 @@ export const ZEnvelopeDistributeFormSchema = z.object({ emailReplyTo: z.preprocess((val) => (val === '' ? undefined : val), zEmail().optional()), subject: z.string(), message: z.string(), - distributionMethod: z - .nativeEnum(DocumentDistributionMethod) - .optional() - .default(DocumentDistributionMethod.EMAIL), + distributionMethod: z.nativeEnum(DocumentDistributionMethod).optional().default(DocumentDistributionMethod.EMAIL), }), }); @@ -100,8 +81,7 @@ export const EnvelopeDistributeDialog = ({ emailReplyTo: envelope.documentMeta?.emailReplyTo || undefined, subject: envelope.documentMeta?.subject ?? '', message: envelope.documentMeta?.message ?? '', - distributionMethod: - envelope.documentMeta?.distributionMethod || DocumentDistributionMethod.EMAIL, + distributionMethod: envelope.documentMeta?.distributionMethod || DocumentDistributionMethod.EMAIL, }, }, resolver: zodResolver(ZEnvelopeDistributeFormSchema), @@ -114,16 +94,15 @@ export const EnvelopeDistributeDialog = ({ formState: { isSubmitting }, } = form; - const { data: emailData, isLoading: isLoadingEmails } = - trpc.enterprise.organisation.email.find.useQuery( - { - organisationId: organisation.id, - perPage: 100, - }, - { - ...DO_NOT_INVALIDATE_QUERY_ON_MUTATION, - }, - ); + const { data: emailData, isLoading: isLoadingEmails } = trpc.enterprise.organisation.email.find.useQuery( + { + organisationId: organisation.id, + perPage: 100, + }, + { + ...DO_NOT_INVALIDATE_QUERY_ON_MUTATION, + }, + ); const emails = emailData?.data || []; @@ -153,9 +132,7 @@ export const EnvelopeDistributeDialog = ({ recipientAuth: recipient.authOptions, }); - return ( - (auth.recipientAccessAuthRequired || auth.recipientActionAuthRequired) && !recipient.email - ); + return (auth.recipientAccessAuthRequired || auth.recipientActionAuthRequired) && !recipient.email; }); }, [recipientsWithIndex, envelope.authOptions]); @@ -310,14 +287,9 @@ export const EnvelopeDistributeDialog = ({ -
    +
    Drop PDF here or click to select diff --git a/apps/remix/app/components/dialogs/envelope-redistribute-dialog.tsx b/apps/remix/app/components/dialogs/envelope-redistribute-dialog.tsx index 616fdde4a..c645df0dd 100644 --- a/apps/remix/app/components/dialogs/envelope-redistribute-dialog.tsx +++ b/apps/remix/app/components/dialogs/envelope-redistribute-dialog.tsx @@ -1,13 +1,3 @@ -import { useEffect, useState } from 'react'; - -import { zodResolver } from '@hookform/resolvers/zod'; -import { msg } from '@lingui/core/macro'; -import { useLingui } from '@lingui/react/macro'; -import { Trans } from '@lingui/react/macro'; -import { DocumentStatus, EnvelopeType, SigningStatus } from '@prisma/client'; -import { useForm } from 'react-hook-form'; -import * as z from 'zod'; - import { getRecipientType } from '@documenso/lib/client-only/recipient-type'; import type { TEnvelope } from '@documenso/lib/types/envelope'; import type { TEnvelopeRecipientLite } from '@documenso/lib/types/recipient'; @@ -26,14 +16,15 @@ import { DialogTitle, DialogTrigger, } from '@documenso/ui/primitives/dialog'; -import { - Form, - FormControl, - FormField, - FormItem, - FormLabel, -} from '@documenso/ui/primitives/form/form'; +import { Form, FormControl, FormField, FormItem, FormLabel } from '@documenso/ui/primitives/form/form'; import { useToast } from '@documenso/ui/primitives/use-toast'; +import { zodResolver } from '@hookform/resolvers/zod'; +import { msg } from '@lingui/core/macro'; +import { Trans, useLingui } from '@lingui/react/macro'; +import { DocumentStatus, EnvelopeType, SigningStatus } from '@prisma/client'; +import { useEffect, useState } from 'react'; +import { useForm } from 'react-hook-form'; +import * as z from 'zod'; import { StackAvatar } from '../general/stack-avatar'; @@ -52,10 +43,7 @@ export const ZEnvelopeRedistributeFormSchema = z.object({ export type TEnvelopeRedistributeFormSchema = z.infer; -export const EnvelopeRedistributeDialog = ({ - envelope, - trigger, -}: EnvelopeRedistributeDialogProps) => { +export const EnvelopeRedistributeDialog = ({ envelope, trigger }: EnvelopeRedistributeDialogProps) => { const recipients = envelope.recipients; const { toast } = useToast(); diff --git a/apps/remix/app/components/dialogs/envelope-rename-dialog.tsx b/apps/remix/app/components/dialogs/envelope-rename-dialog.tsx index 71c69d3c5..ff128738e 100644 --- a/apps/remix/app/components/dialogs/envelope-rename-dialog.tsx +++ b/apps/remix/app/components/dialogs/envelope-rename-dialog.tsx @@ -1,20 +1,12 @@ -import { useEffect, useState } from 'react'; - -import { Trans, useLingui } from '@lingui/react/macro'; - import { trpc as trpcReact } from '@documenso/trpc/react'; import { DOCUMENT_TITLE_MAX_LENGTH } from '@documenso/trpc/server/document-router/schema'; import { Button } from '@documenso/ui/primitives/button'; -import { - Dialog, - DialogContent, - DialogFooter, - DialogHeader, - DialogTitle, -} from '@documenso/ui/primitives/dialog'; +import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle } from '@documenso/ui/primitives/dialog'; import { Input } from '@documenso/ui/primitives/input'; import { Label } from '@documenso/ui/primitives/label'; import { useToast } from '@documenso/ui/primitives/use-toast'; +import { Trans, useLingui } from '@lingui/react/macro'; +import { useEffect, useState } from 'react'; export type EnvelopeRenameDialogProps = { id: string; @@ -89,9 +81,7 @@ export const EnvelopeRenameDialog = ({ !isPending && onOpenChange(value)}> - - {isTemplate ? Rename Template : Rename Document} - + {isTemplate ? Rename Template : Rename Document}
    diff --git a/apps/remix/app/components/dialogs/envelope-save-as-template-dialog.tsx b/apps/remix/app/components/dialogs/envelope-save-as-template-dialog.tsx index b078f00d0..b16a96c56 100644 --- a/apps/remix/app/components/dialogs/envelope-save-as-template-dialog.tsx +++ b/apps/remix/app/components/dialogs/envelope-save-as-template-dialog.tsx @@ -1,9 +1,3 @@ -import { useState } from 'react'; - -import { Trans, useLingui } from '@lingui/react/macro'; -import { Controller, useForm } from 'react-hook-form'; -import { useNavigate } from 'react-router'; - import { formatTemplatesPath } from '@documenso/lib/utils/teams'; import { trpc } from '@documenso/trpc/react'; import { Button } from '@documenso/ui/primitives/button'; @@ -20,6 +14,10 @@ import { } from '@documenso/ui/primitives/dialog'; import { Label } from '@documenso/ui/primitives/label'; import { useToast } from '@documenso/ui/primitives/use-toast'; +import { Trans, useLingui } from '@lingui/react/macro'; +import { useState } from 'react'; +import { Controller, useForm } from 'react-hook-form'; +import { useNavigate } from 'react-router'; import { useCurrentTeam } from '~/providers/team'; @@ -153,10 +151,7 @@ export const EnvelopeSaveAsTemplateDialog = ({ disabled={!includeRecipients} onCheckedChange={(checked) => field.onChange(checked === true)} /> -
    diff --git a/apps/remix/app/components/dialogs/envelopes-bulk-delete-dialog.tsx b/apps/remix/app/components/dialogs/envelopes-bulk-delete-dialog.tsx index 06007ff89..17e8c9740 100644 --- a/apps/remix/app/components/dialogs/envelopes-bulk-delete-dialog.tsx +++ b/apps/remix/app/components/dialogs/envelopes-bulk-delete-dialog.tsx @@ -1,9 +1,3 @@ -import { plural } from '@lingui/core/macro'; -import { Plural, useLingui } from '@lingui/react/macro'; -import { Trans } from '@lingui/react/macro'; -import { EnvelopeType } from '@prisma/client'; -import type * as DialogPrimitive from '@radix-ui/react-dialog'; - import { trpc } from '@documenso/trpc/react'; import { Alert, AlertDescription } from '@documenso/ui/primitives/alert'; import { Button } from '@documenso/ui/primitives/button'; @@ -16,6 +10,10 @@ import { DialogTitle, } from '@documenso/ui/primitives/dialog'; import { useToast } from '@documenso/ui/primitives/use-toast'; +import { plural } from '@lingui/core/macro'; +import { Plural, Trans, useLingui } from '@lingui/react/macro'; +import { EnvelopeType } from '@prisma/client'; +import type * as DialogPrimitive from '@radix-ui/react-dialog'; export type EnvelopesBulkDeleteDialogProps = { envelopeIds: string[]; @@ -88,9 +86,7 @@ export const EnvelopesBulkDeleteDialog = ({ - - {isDocument ? Delete Documents : Delete Templates} - + {isDocument ? Delete Documents : Delete Templates} {isDocument ? ( @@ -149,12 +145,7 @@ export const EnvelopesBulkDeleteDialog = ({ - diff --git a/apps/remix/app/components/dialogs/envelopes-bulk-move-dialog.tsx b/apps/remix/app/components/dialogs/envelopes-bulk-move-dialog.tsx index be50e85a2..f0c81da77 100644 --- a/apps/remix/app/components/dialogs/envelopes-bulk-move-dialog.tsx +++ b/apps/remix/app/components/dialogs/envelopes-bulk-move-dialog.tsx @@ -1,15 +1,3 @@ -import { useEffect, useState } from 'react'; - -import { zodResolver } from '@hookform/resolvers/zod'; -import { Plural, useLingui } from '@lingui/react/macro'; -import { Trans } from '@lingui/react/macro'; -import { EnvelopeType } from '@prisma/client'; -import type * as DialogPrimitive from '@radix-ui/react-dialog'; -import { FolderIcon, HomeIcon, Loader2, Search } from 'lucide-react'; -import { useForm } from 'react-hook-form'; -import { match } from 'ts-pattern'; -import { z } from 'zod'; - import { AppError, AppErrorCode } from '@documenso/lib/errors/app-error'; import { trpc } from '@documenso/trpc/react'; import { Button } from '@documenso/ui/primitives/button'; @@ -21,16 +9,18 @@ import { DialogHeader, DialogTitle, } from '@documenso/ui/primitives/dialog'; -import { - Form, - FormControl, - FormField, - FormItem, - FormLabel, - FormMessage, -} from '@documenso/ui/primitives/form/form'; +import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from '@documenso/ui/primitives/form/form'; import { Input } from '@documenso/ui/primitives/input'; import { useToast } from '@documenso/ui/primitives/use-toast'; +import { zodResolver } from '@hookform/resolvers/zod'; +import { Plural, Trans, useLingui } from '@lingui/react/macro'; +import { EnvelopeType } from '@prisma/client'; +import type * as DialogPrimitive from '@radix-ui/react-dialog'; +import { FolderIcon, HomeIcon, Loader2, Search } from 'lucide-react'; +import { useEffect, useState } from 'react'; +import { useForm } from 'react-hook-form'; +import { match } from 'ts-pattern'; +import { z } from 'zod'; export type EnvelopesBulkMoveDialogProps = { envelopeIds: string[]; @@ -119,10 +109,7 @@ export const EnvelopesBulkMoveDialog = ({ const error = AppError.parseError(err); const errorMessage = match(error.code) - .with( - AppErrorCode.NOT_FOUND, - () => t`The folder you are trying to move the items to does not exist.`, - ) + .with(AppErrorCode.NOT_FOUND, () => t`The folder you are trying to move the items to does not exist.`) .with(AppErrorCode.UNAUTHORIZED, () => t`You are not allowed to move these items.`) .with(AppErrorCode.INVALID_BODY, () => t`All items must be of the same type.`) .otherwise(() => t`An error occurred while moving the items.`); @@ -143,11 +130,7 @@ export const EnvelopesBulkMoveDialog = ({ - {isDocument ? ( - Move Documents to Folder - ) : ( - Move Templates to Folder - )} + {isDocument ? Move Documents to Folder : Move Templates to Folder} @@ -168,7 +151,7 @@ export const EnvelopesBulkMoveDialog = ({
    - + +
    No folders found
    )} diff --git a/apps/remix/app/components/dialogs/folder-create-dialog.tsx b/apps/remix/app/components/dialogs/folder-create-dialog.tsx index f7623885f..c2cf21eaa 100644 --- a/apps/remix/app/components/dialogs/folder-create-dialog.tsx +++ b/apps/remix/app/components/dialogs/folder-create-dialog.tsx @@ -1,14 +1,3 @@ -import { useEffect, useState } from 'react'; - -import { zodResolver } from '@hookform/resolvers/zod'; -import { Trans, useLingui } from '@lingui/react/macro'; -import type { FolderType } from '@prisma/client'; -import type * as DialogPrimitive from '@radix-ui/react-dialog'; -import { FolderPlusIcon } from 'lucide-react'; -import { useForm } from 'react-hook-form'; -import { useParams } from 'react-router'; -import { z } from 'zod'; - import { trpc } from '@documenso/trpc/react'; import { Button } from '@documenso/ui/primitives/button'; import { @@ -20,16 +9,18 @@ import { DialogTitle, DialogTrigger, } from '@documenso/ui/primitives/dialog'; -import { - Form, - FormControl, - FormField, - FormItem, - FormLabel, - FormMessage, -} from '@documenso/ui/primitives/form/form'; +import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from '@documenso/ui/primitives/form/form'; import { Input } from '@documenso/ui/primitives/input'; import { useToast } from '@documenso/ui/primitives/use-toast'; +import { zodResolver } from '@hookform/resolvers/zod'; +import { Trans, useLingui } from '@lingui/react/macro'; +import type { FolderType } from '@prisma/client'; +import type * as DialogPrimitive from '@radix-ui/react-dialog'; +import { FolderPlusIcon } from 'lucide-react'; +import { useEffect, useState } from 'react'; +import { useForm } from 'react-hook-form'; +import { useParams } from 'react-router'; +import { z } from 'zod'; const ZCreateFolderFormSchema = z.object({ name: z.string().min(1, { message: 'Folder name is required' }), @@ -43,12 +34,7 @@ export type FolderCreateDialogProps = { parentFolderId?: string | null; } & Omit; -export const FolderCreateDialog = ({ - type, - trigger, - parentFolderId, - ...props -}: FolderCreateDialogProps) => { +export const FolderCreateDialog = ({ type, trigger, parentFolderId, ...props }: FolderCreateDialogProps) => { const { t } = useLingui(); const { toast } = useToast(); const { folderId } = useParams(); @@ -98,11 +84,7 @@ export const FolderCreateDialog = ({ {trigger ?? ( - @@ -139,11 +121,7 @@ export const FolderCreateDialog = ({ /> - diff --git a/apps/remix/app/components/dialogs/folder-delete-dialog.tsx b/apps/remix/app/components/dialogs/folder-delete-dialog.tsx index cec8b1da0..e05f943b3 100644 --- a/apps/remix/app/components/dialogs/folder-delete-dialog.tsx +++ b/apps/remix/app/components/dialogs/folder-delete-dialog.tsx @@ -1,12 +1,3 @@ -import { useEffect } from 'react'; - -import { zodResolver } from '@hookform/resolvers/zod'; -import { useLingui } from '@lingui/react/macro'; -import { Trans } from '@lingui/react/macro'; -import type * as DialogPrimitive from '@radix-ui/react-dialog'; -import { useForm } from 'react-hook-form'; -import { z } from 'zod'; - import { AppError, AppErrorCode } from '@documenso/lib/errors/app-error'; import { trpc } from '@documenso/trpc/react'; import type { TFolderWithSubfolders } from '@documenso/trpc/server/folder-router/schema'; @@ -20,16 +11,15 @@ import { DialogHeader, DialogTitle, } from '@documenso/ui/primitives/dialog'; -import { - Form, - FormControl, - FormField, - FormItem, - FormLabel, - FormMessage, -} from '@documenso/ui/primitives/form/form'; +import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from '@documenso/ui/primitives/form/form'; import { Input } from '@documenso/ui/primitives/input'; import { useToast } from '@documenso/ui/primitives/use-toast'; +import { zodResolver } from '@hookform/resolvers/zod'; +import { Trans, useLingui } from '@lingui/react/macro'; +import type * as DialogPrimitive from '@radix-ui/react-dialog'; +import { useEffect } from 'react'; +import { useForm } from 'react-hook-form'; +import { z } from 'zod'; export type FolderDeleteDialogProps = { folder: TFolderWithSubfolders; @@ -110,14 +100,12 @@ export const FolderDeleteDialog = ({ folder, isOpen, onOpenChange }: FolderDelet - {(folder._count.documents > 0 || - folder._count.templates > 0 || - folder._count.subfolders > 0) && ( + {(folder._count.documents > 0 || folder._count.templates > 0 || folder._count.subfolders > 0) && ( - This folder contains multiple items. Deleting it will remove all subfolders and move - all nested documents and templates to the root folder. + This folder contains multiple items. Deleting it will remove all subfolders and move all nested + documents and templates to the root folder. @@ -134,9 +122,7 @@ export const FolderDeleteDialog = ({ folder, isOpen, onOpenChange }: FolderDelet Confirm by typing:{' '} - - {deleteMessage} - + {deleteMessage} diff --git a/apps/remix/app/components/dialogs/folder-move-dialog.tsx b/apps/remix/app/components/dialogs/folder-move-dialog.tsx index b12922a6a..c4cc84c9a 100644 --- a/apps/remix/app/components/dialogs/folder-move-dialog.tsx +++ b/apps/remix/app/components/dialogs/folder-move-dialog.tsx @@ -1,13 +1,3 @@ -import { useEffect, useState } from 'react'; - -import { zodResolver } from '@hookform/resolvers/zod'; -import { useLingui } from '@lingui/react/macro'; -import { Trans } from '@lingui/react/macro'; -import type * as DialogPrimitive from '@radix-ui/react-dialog'; -import { FolderIcon, HomeIcon, Search } from 'lucide-react'; -import { useForm } from 'react-hook-form'; -import { z } from 'zod'; - import { AppError, AppErrorCode } from '@documenso/lib/errors/app-error'; import { trpc } from '@documenso/trpc/react'; import type { TFolderWithSubfolders } from '@documenso/trpc/server/folder-router/schema'; @@ -20,15 +10,16 @@ import { DialogHeader, DialogTitle, } from '@documenso/ui/primitives/dialog'; -import { - Form, - FormControl, - FormField, - FormItem, - FormMessage, -} from '@documenso/ui/primitives/form/form'; +import { Form, FormControl, FormField, FormItem, FormMessage } from '@documenso/ui/primitives/form/form'; import { Input } from '@documenso/ui/primitives/input'; import { useToast } from '@documenso/ui/primitives/use-toast'; +import { zodResolver } from '@hookform/resolvers/zod'; +import { Trans, useLingui } from '@lingui/react/macro'; +import type * as DialogPrimitive from '@radix-ui/react-dialog'; +import { FolderIcon, HomeIcon, Search } from 'lucide-react'; +import { useEffect, useState } from 'react'; +import { useForm } from 'react-hook-form'; +import { z } from 'zod'; export type FolderMoveDialogProps = { foldersData: TFolderWithSubfolders[] | undefined; @@ -43,12 +34,7 @@ const ZMoveFolderFormSchema = z.object({ type TMoveFolderFormSchema = z.infer; -export const FolderMoveDialog = ({ - foldersData, - folder, - isOpen, - onOpenChange, -}: FolderMoveDialogProps) => { +export const FolderMoveDialog = ({ foldersData, folder, isOpen, onOpenChange }: FolderMoveDialogProps) => { const { t } = useLingui(); const { toast } = useToast(); const [searchTerm, setSearchTerm] = useState(''); @@ -129,7 +115,7 @@ export const FolderMoveDialog = ({
    - + ( - IS_BILLING_ENABLED() ? 'billing' : 'create', - ); + const [step, setStep] = useState<'billing' | 'create'>(IS_BILLING_ENABLED() ? 'billing' : 'create'); const [selectedPriceId, setSelectedPriceId] = useState(''); @@ -145,11 +133,7 @@ export const OrganisationCreateDialog = ({ trigger, ...props }: OrganisationCrea }; return ( - !form.formState.isSubmitting && setOpen(value)} - > + !form.formState.isSubmitting && setOpen(value)}> e.stopPropagation()} asChild={true}> {trigger ?? ( ) : ( @@ -290,30 +267,23 @@ type BillingPlanFormProps = { canCreateFreeOrganisation: boolean; }; -const BillingPlanForm = ({ - value, - onChange, - plans, - canCreateFreeOrganisation, -}: BillingPlanFormProps) => { +const BillingPlanForm = ({ value, onChange, plans, canCreateFreeOrganisation }: BillingPlanFormProps) => { const { t } = useLingui(); const [billingPeriod, setBillingPeriod] = useState<'monthlyPrice' | 'yearlyPrice'>('yearlyPrice'); const dynamicPlans = useMemo(() => { - return [INTERNAL_CLAIM_ID.INDIVIDUAL, INTERNAL_CLAIM_ID.TEAM, INTERNAL_CLAIM_ID.PLATFORM].map( - (planId) => { - const plan = plans[planId]; + return [INTERNAL_CLAIM_ID.INDIVIDUAL, INTERNAL_CLAIM_ID.TEAM, INTERNAL_CLAIM_ID.PLATFORM].map((planId) => { + const plan = plans[planId]; - return { - id: planId, - name: plan.name, - description: parseMessageDescriptorMacro(t, internalClaimsDescription[planId]), - monthlyPrice: plan.monthlyPrice, - yearlyPrice: plan.yearlyPrice, - }; - }, - ); + return { + id: planId, + name: plan.name, + description: parseMessageDescriptorMacro(t, internalClaimsDescription[planId]), + monthlyPrice: plan.monthlyPrice, + yearlyPrice: plan.yearlyPrice, + }; + }); }, [plans]); useEffect(() => { @@ -357,9 +327,9 @@ const BillingPlanForm = ({
    -
    +

    {plan[billingPeriod]?.friendlyPrice}

    - {billingPeriod === 'monthlyPrice' ? ( - per month - ) : ( - per year - )} + {billingPeriod === 'monthlyPrice' ? per month : per year}
    @@ -417,13 +382,13 @@ const BillingPlanForm = ({
    -

    +

    Enterprise

    -

    +

    Contact sales here

    @@ -434,7 +399,7 @@ const BillingPlanForm = ({
    Compare all plans and features in detail diff --git a/apps/remix/app/components/dialogs/organisation-delete-dialog.tsx b/apps/remix/app/components/dialogs/organisation-delete-dialog.tsx index 10b53833b..fff29a8bd 100644 --- a/apps/remix/app/components/dialogs/organisation-delete-dialog.tsx +++ b/apps/remix/app/components/dialogs/organisation-delete-dialog.tsx @@ -1,13 +1,3 @@ -import { useEffect, useState } from 'react'; - -import { zodResolver } from '@hookform/resolvers/zod'; -import { msg } from '@lingui/core/macro'; -import { useLingui } from '@lingui/react'; -import { Trans } from '@lingui/react/macro'; -import { useForm } from 'react-hook-form'; -import { useNavigate } from 'react-router'; -import { z } from 'zod'; - import { useCurrentOrganisation } from '@documenso/lib/client-only/providers/organisation'; import { useSession } from '@documenso/lib/client-only/providers/session'; import { AppError } from '@documenso/lib/errors/app-error'; @@ -22,16 +12,17 @@ import { DialogTitle, DialogTrigger, } from '@documenso/ui/primitives/dialog'; -import { - Form, - FormControl, - FormField, - FormItem, - FormLabel, - FormMessage, -} from '@documenso/ui/primitives/form/form'; +import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from '@documenso/ui/primitives/form/form'; import { Input } from '@documenso/ui/primitives/input'; import { useToast } from '@documenso/ui/primitives/use-toast'; +import { zodResolver } from '@hookform/resolvers/zod'; +import { msg } from '@lingui/core/macro'; +import { useLingui } from '@lingui/react'; +import { Trans } from '@lingui/react/macro'; +import { useEffect, useState } from 'react'; +import { useForm } from 'react-hook-form'; +import { useNavigate } from 'react-router'; +import { z } from 'zod'; export type OrganisationDeleteDialogProps = { trigger?: React.ReactNode; @@ -117,19 +108,16 @@ export const OrganisationDeleteDialog = ({ trigger }: OrganisationDeleteDialogPr - You are about to delete {organisation.name}. - All data related to this organisation such as teams, documents, and all other - resources will be deleted. This action is irreversible. + You are about to delete {organisation.name}. All data related to + this organisation such as teams, documents, and all other resources will be deleted. This action is + irreversible. -
    +
    { @@ -176,14 +173,14 @@ export const OrganisationEmailCreateDialog = ({ }} placeholder={t`support`} /> -
    +
    @{emailDomain.domain}
    {!form.formState.errors.email && ( - + {field.value ? ( field.value ) : ( @@ -225,11 +222,7 @@ export const OrganisationEmailCreateDialog = ({ Cancel - diff --git a/apps/remix/app/components/dialogs/organisation-email-delete-dialog.tsx b/apps/remix/app/components/dialogs/organisation-email-delete-dialog.tsx index 5f48ce9f1..8438d8772 100644 --- a/apps/remix/app/components/dialogs/organisation-email-delete-dialog.tsx +++ b/apps/remix/app/components/dialogs/organisation-email-delete-dialog.tsx @@ -1,8 +1,3 @@ -import { useState } from 'react'; - -import { useLingui } from '@lingui/react/macro'; -import { Trans } from '@lingui/react/macro'; - import { useCurrentOrganisation } from '@documenso/lib/client-only/providers/organisation'; import { trpc } from '@documenso/trpc/react'; import { Alert, AlertDescription } from '@documenso/ui/primitives/alert'; @@ -17,6 +12,8 @@ import { DialogTrigger, } from '@documenso/ui/primitives/dialog'; import { useToast } from '@documenso/ui/primitives/use-toast'; +import { Trans, useLingui } from '@lingui/react/macro'; +import { useState } from 'react'; export type OrganisationEmailDeleteDialogProps = { emailId: string; @@ -24,11 +21,7 @@ export type OrganisationEmailDeleteDialogProps = { trigger?: React.ReactNode; }; -export const OrganisationEmailDeleteDialog = ({ - trigger, - emailId, - email, -}: OrganisationEmailDeleteDialogProps) => { +export const OrganisationEmailDeleteDialog = ({ trigger, emailId, email }: OrganisationEmailDeleteDialogProps) => { const [open, setOpen] = useState(false); const { t } = useLingui(); @@ -36,26 +29,25 @@ export const OrganisationEmailDeleteDialog = ({ const organisation = useCurrentOrganisation(); - const { mutateAsync: deleteEmail, isPending: isDeleting } = - trpc.enterprise.organisation.email.delete.useMutation({ - onSuccess: () => { - toast({ - title: t`Success`, - description: t`You have successfully removed this email from the organisation.`, - duration: 5000, - }); + const { mutateAsync: deleteEmail, isPending: isDeleting } = trpc.enterprise.organisation.email.delete.useMutation({ + onSuccess: () => { + toast({ + title: t`Success`, + description: t`You have successfully removed this email from the organisation.`, + duration: 5000, + }); - setOpen(false); - }, - onError: () => { - toast({ - title: t`An unknown error occurred`, - description: t`We encountered an unknown error while attempting to remove this email. Please try again later.`, - variant: 'destructive', - duration: 10000, - }); - }, - }); + setOpen(false); + }, + onError: () => { + toast({ + title: t`An unknown error occurred`, + description: t`We encountered an unknown error while attempting to remove this email. Please try again later.`, + variant: 'destructive', + duration: 10000, + }); + }, + }); return ( !isDeleting && setOpen(value)}> diff --git a/apps/remix/app/components/dialogs/organisation-email-domain-create-dialog.tsx b/apps/remix/app/components/dialogs/organisation-email-domain-create-dialog.tsx index d51967b1d..ca57ebac5 100644 --- a/apps/remix/app/components/dialogs/organisation-email-domain-create-dialog.tsx +++ b/apps/remix/app/components/dialogs/organisation-email-domain-create-dialog.tsx @@ -1,12 +1,3 @@ -import { useEffect, useState } from 'react'; - -import { zodResolver } from '@hookform/resolvers/zod'; -import { useLingui } from '@lingui/react/macro'; -import { Trans } from '@lingui/react/macro'; -import type * as DialogPrimitive from '@radix-ui/react-dialog'; -import { useForm } from 'react-hook-form'; -import type { z } from 'zod'; - import { useCurrentOrganisation } from '@documenso/lib/client-only/providers/organisation'; import { AppError, AppErrorCode } from '@documenso/lib/errors/app-error'; import { trpc } from '@documenso/trpc/react'; @@ -32,6 +23,12 @@ import { } from '@documenso/ui/primitives/form/form'; import { Input } from '@documenso/ui/primitives/input'; import { useToast } from '@documenso/ui/primitives/use-toast'; +import { zodResolver } from '@hookform/resolvers/zod'; +import { Trans, useLingui } from '@lingui/react/macro'; +import type * as DialogPrimitive from '@radix-ui/react-dialog'; +import { useEffect, useState } from 'react'; +import { useForm } from 'react-hook-form'; +import type { z } from 'zod'; import { OrganisationEmailDomainRecordContent } from './organisation-email-domain-records-dialog'; @@ -43,9 +40,7 @@ const ZCreateOrganisationEmailDomainFormSchema = ZCreateOrganisationEmailDomainR domain: true, }); -type TCreateOrganisationEmailDomainFormSchema = z.infer< - typeof ZCreateOrganisationEmailDomainFormSchema ->; +type TCreateOrganisationEmailDomainFormSchema = z.infer; type DomainRecord = { name: string; @@ -53,10 +48,7 @@ type DomainRecord = { type: string; }; -export const OrganisationEmailDomainCreateDialog = ({ - trigger, - ...props -}: OrganisationEmailCreateDialogProps) => { +export const OrganisationEmailDomainCreateDialog = ({ trigger, ...props }: OrganisationEmailCreateDialogProps) => { const { t } = useLingui(); const { toast } = useToast(); const organisation = useCurrentOrganisation(); @@ -72,8 +64,7 @@ export const OrganisationEmailDomainCreateDialog = ({ }, }); - const { mutateAsync: createOrganisationEmail } = - trpc.enterprise.organisation.emailDomain.create.useMutation(); + const { mutateAsync: createOrganisationEmail } = trpc.enterprise.organisation.emailDomain.create.useMutation(); // Reset state when dialog closes useEffect(() => { @@ -119,11 +110,7 @@ export const OrganisationEmailDomainCreateDialog = ({ }; return ( - !form.formState.isSubmitting && setOpen(value)} - > + !form.formState.isSubmitting && setOpen(value)}> e.stopPropagation()} asChild={true}> {trigger ?? ( )} @@ -154,19 +141,13 @@ export const PasskeyCreateDialog = ({ trigger, onSuccess, ...props }: PasskeyCre - - Passkeys allow you to sign in and authenticate using biometrics, password managers, - etc. - + Passkeys allow you to sign in and authenticate using biometrics, password managers, etc. -
    +
    - When you click continue, you will be prompted to add the first available - authenticator on your system. + When you click continue, you will be prompted to add the first available authenticator on your + system. - If you do not want to use the authenticator prompted, you can close it, which - will then display the next available authenticator. + If you do not want to use the authenticator prompted, you can close it, which will then display the + next available authenticator. @@ -219,9 +200,7 @@ export const PasskeyCreateDialog = ({ trigger, onSuccess, ...props }: PasskeyCre .with('InvalidStateError', () => ( <> - - Passkey creation cancelled due to one of the following reasons: - + Passkey creation cancelled due to one of the following reasons:
      diff --git a/apps/remix/app/components/dialogs/public-profile-template-manage-dialog.tsx b/apps/remix/app/components/dialogs/public-profile-template-manage-dialog.tsx index 4ef2de031..53c61af2d 100644 --- a/apps/remix/app/components/dialogs/public-profile-template-manage-dialog.tsx +++ b/apps/remix/app/components/dialogs/public-profile-template-manage-dialog.tsx @@ -1,17 +1,4 @@ -import { useEffect, useMemo, useState } from 'react'; - -import { zodResolver } from '@hookform/resolvers/zod'; -import { msg } from '@lingui/core/macro'; -import { useLingui } from '@lingui/react'; -import { Plural, Trans } from '@lingui/react/macro'; -import { type TemplateDirectLink, TemplateType } from '@prisma/client'; -import type * as DialogPrimitive from '@radix-ui/react-dialog'; -import { CheckCircle2Icon, CircleIcon } from 'lucide-react'; -import { useForm } from 'react-hook-form'; -import { P, match } from 'ts-pattern'; -import { z } from 'zod'; - -import { type Template } from '@documenso/prisma/types/template-legacy-schema'; +import type { Template } from '@documenso/prisma/types/template-legacy-schema'; import { trpc } from '@documenso/trpc/react'; import { MAX_TEMPLATE_PUBLIC_DESCRIPTION_LENGTH, @@ -29,25 +16,22 @@ import { DialogTitle, DialogTrigger, } from '@documenso/ui/primitives/dialog'; -import { - Form, - FormControl, - FormField, - FormItem, - FormLabel, - FormMessage, -} from '@documenso/ui/primitives/form/form'; +import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from '@documenso/ui/primitives/form/form'; import { Input } from '@documenso/ui/primitives/input'; -import { - Table, - TableBody, - TableCell, - TableHead, - TableHeader, - TableRow, -} from '@documenso/ui/primitives/table'; +import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@documenso/ui/primitives/table'; import { Textarea } from '@documenso/ui/primitives/textarea'; import { useToast } from '@documenso/ui/primitives/use-toast'; +import { zodResolver } from '@hookform/resolvers/zod'; +import { msg } from '@lingui/core/macro'; +import { useLingui } from '@lingui/react'; +import { Plural, Trans } from '@lingui/react/macro'; +import { type TemplateDirectLink, TemplateType } from '@prisma/client'; +import type * as DialogPrimitive from '@radix-ui/react-dialog'; +import { CheckCircle2Icon, CircleIcon } from 'lucide-react'; +import { useEffect, useMemo, useState } from 'react'; +import { useForm } from 'react-hook-form'; +import { match, P } from 'ts-pattern'; +import { z } from 'zod'; import { useCurrentTeam } from '~/providers/team'; @@ -145,10 +129,7 @@ export const ManagePublicTemplateDialog = ({ } }; - const onFormSubmit = async ({ - publicTitle, - publicDescription, - }: TUpdatePublicTemplateFormSchema) => { + const onFormSubmit = async ({ publicTitle, publicDescription }: TUpdatePublicTemplateFormSchema) => { if (!selectedTemplateId) { return; } @@ -251,9 +232,7 @@ export const ManagePublicTemplateDialog = ({ {team ? ( - - Select a template you'd like to display on your team's public profile - + Select a template you'd like to display on your team's public profile ) : ( Select a template you'd like to display on your public profile )} @@ -290,13 +269,9 @@ export const ManagePublicTemplateDialog = ({ key={row.id} onClick={() => setSelectedTemplateId(row.id)} > - - {row.title} - + {row.title} - - {i18n.date(row.createdAt)} - + {i18n.date(row.createdAt)} {selectedTemplateId === row.id ? ( @@ -317,11 +292,7 @@ export const ManagePublicTemplateDialog = ({ - @@ -340,10 +311,7 @@ export const ManagePublicTemplateDialog = ({ - + Title - + @@ -365,17 +330,14 @@ export const ManagePublicTemplateDialog = ({ control={form.control} name="publicDescription" render={({ field }) => { - const remaningLength = - MAX_TEMPLATE_PUBLIC_DESCRIPTION_LENGTH - (field.value || '').length; + const remaningLength = MAX_TEMPLATE_PUBLIC_DESCRIPTION_LENGTH - (field.value || '').length; return ( Description