@cosmicdrift/kumiko-bundled-features 0.377.0 → 0.379.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account-security/feature.js +2 -2
- package/dist/account-security/index.d.ts +2 -2
- package/dist/account-security/index.js +2 -2
- package/dist/account-security/{constants.js → web/constants.js} +0 -1
- package/dist/account-security/{i18n.js → web/i18n.js} +0 -1
- package/dist/admin-shell/feature.js +4 -3
- package/dist/admin-shell/index.d.ts +2 -2
- package/dist/admin-shell/index.js +2 -2
- package/dist/admin-shell/web/client-plugin.js +2 -3
- package/dist/admin-shell/{constants.js → web/constants.js} +0 -1
- package/dist/admin-shell/web/default-translations.d.ts +2 -0
- package/dist/admin-shell/web/default-translations.js +4 -0
- package/dist/admin-shell/web/i18n.d.ts +5 -2
- package/dist/admin-shell/web/i18n.js +50 -5
- package/dist/admin-shell/web/index.js +0 -1
- package/dist/audit/feature.js +58 -59
- package/dist/audit/handlers/audit-events.d.ts +102 -0
- package/dist/audit/handlers/audit-events.js +112 -0
- package/dist/audit/handlers/audit-system-db.d.ts +1 -0
- package/dist/audit/handlers/audit-system-db.js +9 -0
- package/dist/audit/handlers/details-all-tenants.query.d.ts +15 -0
- package/dist/audit/handlers/details-all-tenants.query.js +20 -0
- package/dist/audit/handlers/details.query.d.ts +2 -1
- package/dist/audit/handlers/details.query.js +8 -24
- package/dist/audit/handlers/list-all-tenants.query.d.ts +41 -0
- package/dist/audit/handlers/list-all-tenants.query.js +32 -0
- package/dist/audit/handlers/list.query.d.ts +2 -1
- package/dist/audit/handlers/list.query.js +9 -99
- package/dist/audit/handlers/resolve-audit-tenant.d.ts +3 -1
- package/dist/audit/handlers/resolve-audit-tenant.js +21 -7
- package/dist/audit/index.d.ts +1 -1
- package/dist/audit/index.js +1 -1
- package/dist/audit/run-escape-hatch-retention.js +1 -1
- package/dist/audit/screens.d.ts +65 -0
- package/dist/audit/screens.js +73 -0
- package/dist/audit/web/client-plugin.js +2 -3
- package/dist/audit/{constants.d.ts → web/constants.d.ts} +8 -0
- package/dist/audit/{constants.js → web/constants.js} +8 -1
- package/dist/audit/web/default-translations.d.ts +2 -0
- package/dist/audit/web/default-translations.js +3 -0
- package/dist/audit/web/i18n.d.ts +5 -2
- package/dist/audit/web/i18n.js +31 -4
- package/dist/audit/web/index.js +0 -1
- package/dist/auth-email-password/bootstrap.d.ts +1 -1
- package/dist/auth-email-password/bootstrap.js +4 -4
- package/dist/auth-email-password/errors.js +1 -1
- package/dist/auth-email-password/feature.js +2 -2
- package/dist/auth-email-password/handlers/confirm-account-unlock.write.js +1 -1
- package/dist/auth-email-password/handlers/invite-accept-with-login.write.js +1 -1
- package/dist/auth-email-password/handlers/invite-create.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/invite-create.write.js +3 -3
- package/dist/auth-email-password/handlers/invite-info.query.js +1 -1
- package/dist/auth-email-password/handlers/login.write.d.ts +1 -0
- package/dist/auth-email-password/handlers/login.write.js +26 -1
- package/dist/auth-email-password/handlers/request-account-unlock.write.js +1 -1
- package/dist/auth-email-password/handlers/request-email-verification.write.js +1 -1
- package/dist/auth-email-password/handlers/request-password-reset.write.js +1 -1
- package/dist/auth-email-password/handlers/reset-password.write.js +1 -1
- package/dist/auth-email-password/handlers/verify-email.write.js +1 -1
- package/dist/auth-email-password/index.d.ts +1 -1
- package/dist/auth-email-password/index.js +1 -1
- package/dist/auth-email-password/mail-notifications.js +1 -1
- package/dist/auth-email-password/signup-activation.js +1 -1
- package/dist/auth-email-password/web/auth-client.js +0 -1
- package/dist/auth-email-password/web/auth-form-logic.js +0 -1
- package/dist/auth-email-password/web/auth-form-primitives.js +0 -1
- package/dist/auth-email-password/web/auth-gate.js +0 -1
- package/dist/auth-email-password/web/auth-redirect.js +0 -1
- package/dist/auth-email-password/web/client-actions.js +0 -1
- package/dist/auth-email-password/web/client-plugin.js +1 -2
- package/dist/auth-email-password/web/confirm-account-unlock-screen.js +0 -1
- package/dist/auth-email-password/{constants.js → web/constants.js} +3 -6
- package/dist/auth-email-password/web/default-topbar-actions.js +0 -1
- package/dist/auth-email-password/web/forgot-password-screen.js +0 -1
- package/dist/auth-email-password/{i18n.js → web/i18n.js} +3 -4
- package/dist/auth-email-password/web/index.d.ts +1 -1
- package/dist/auth-email-password/web/index.js +1 -2
- package/dist/auth-email-password/web/invite-accept-screen.d.ts +2 -2
- package/dist/auth-email-password/web/invite-accept-screen.js +0 -1
- package/dist/auth-email-password/web/login-screen.js +0 -1
- package/dist/auth-email-password/{mail-i18n.js → web/mail-i18n.js} +0 -1
- package/dist/auth-email-password/web/request-account-unlock-screen.js +0 -1
- package/dist/auth-email-password/web/reset-password-screen.js +0 -1
- package/dist/auth-email-password/web/session-bootstrap-error.js +0 -1
- package/dist/auth-email-password/web/session.js +0 -1
- package/dist/auth-email-password/web/signup-complete-screen.d.ts +2 -2
- package/dist/auth-email-password/web/signup-complete-screen.js +0 -1
- package/dist/auth-email-password/web/signup-screen.js +0 -1
- package/dist/auth-email-password/web/tenant-menu-items.js +0 -1
- package/dist/auth-email-password/web/tenant-switcher.js +0 -1
- package/dist/auth-email-password/web/use-shell-user.js +0 -1
- package/dist/auth-email-password/web/user-menu.js +0 -1
- package/dist/auth-email-password/web/verify-email-screen.js +0 -1
- package/dist/auth-mfa/errors.d.ts +1 -1
- package/dist/auth-mfa/errors.js +2 -2
- package/dist/auth-mfa/handlers/enable-confirm-preauth.write.js +1 -1
- package/dist/auth-mfa/handlers/enable-start-preauth.write.js +1 -1
- package/dist/auth-mfa/handlers/enable-start.write.js +1 -1
- package/dist/auth-mfa/handlers/verify.write.js +1 -1
- package/dist/auth-mfa/index.d.ts +1 -1
- package/dist/auth-mfa/index.js +1 -1
- package/dist/auth-mfa/mfa-status-checker.js +1 -1
- package/dist/auth-mfa/screens.js +1 -1
- package/dist/auth-mfa/web/client-plugin.js +0 -1
- package/dist/auth-mfa/{constants.js → web/constants.js} +0 -1
- package/dist/auth-mfa/web/i18n.js +0 -1
- package/dist/auth-mfa/web/index.js +0 -1
- package/dist/auth-mfa/web/mfa-client.js +0 -1
- package/dist/auth-mfa/web/mfa-disable-dialog.js +1 -2
- package/dist/auth-mfa/web/mfa-recovery-codes-reveal.js +0 -1
- package/dist/auth-mfa/web/mfa-regenerate-recovery-dialog.js +1 -2
- package/dist/auth-mfa/web/mfa-setup-preauth-screen.js +11 -18
- package/dist/auth-mfa/web/mfa-verify-screen.js +0 -1
- package/dist/billing-foundation/checkout-core.js +1 -1
- package/dist/billing-foundation/consumer-protection/consent-text.d.ts +2 -2
- package/dist/billing-foundation/consumer-protection/consent-text.js +1 -1
- package/dist/billing-foundation/consumer-protection/issue-confirmation.js +7 -3
- package/dist/billing-foundation/consumer-protection/mail-notifications.js +3 -1
- package/dist/billing-foundation/consumer-protection/register-consent.js +1 -1
- package/dist/billing-foundation/consumer-protection/register-termination.js +8 -2
- package/dist/billing-foundation/consumer-protection/stored-user-email.d.ts +1 -0
- package/dist/billing-foundation/consumer-protection/stored-user-email.js +8 -0
- package/dist/billing-foundation/consumer-protection/termination-mail.d.ts +5 -1
- package/dist/billing-foundation/consumer-protection/termination-mail.js +3 -1
- package/dist/billing-foundation/consumer-protection/termination-notify.js +1 -1
- package/dist/billing-foundation/consumer-protection/termination-pages.js +109 -15
- package/dist/billing-foundation/consumer-protection/termination-record.d.ts +8 -1
- package/dist/billing-foundation/consumer-protection/termination-record.js +76 -3
- package/dist/billing-foundation/consumer-protection/termination-request.js +33 -6
- package/dist/billing-foundation/consumer-protection/termination-revoke.d.ts +28 -0
- package/dist/billing-foundation/consumer-protection/termination-revoke.js +149 -0
- package/dist/billing-foundation/consumer-protection/termination-texts.d.ts +17 -1
- package/dist/billing-foundation/consumer-protection/termination-texts.js +39 -0
- package/dist/billing-foundation/events.d.ts +9 -0
- package/dist/billing-foundation/events.js +14 -2
- package/dist/billing-foundation/feature.js +1 -1
- package/dist/billing-foundation/handlers/process-event.write.d.ts +5 -1
- package/dist/billing-foundation/handlers/process-event.write.js +57 -3
- package/dist/billing-foundation/handlers/switch-plan.write.js +1 -1
- package/dist/billing-foundation/handlers/sync-subscription.write.js +1 -1
- package/dist/billing-foundation/index.d.ts +2 -2
- package/dist/billing-foundation/index.js +2 -2
- package/dist/billing-foundation/plan-catalog.js +1 -1
- package/dist/billing-foundation/screens.js +1 -1
- package/dist/billing-foundation/subscription-tier-sync.js +1 -1
- package/dist/billing-foundation/types.d.ts +14 -2
- package/dist/billing-foundation/types.js +1 -1
- package/dist/billing-foundation/validate-options.js +3 -3
- package/dist/billing-foundation/web/billing-contact-plan.js +1 -2
- package/dist/billing-foundation/web/billing-plans-panel.js +1 -2
- package/dist/billing-foundation/web/cancel-contract-dialog.js +1 -2
- package/dist/billing-foundation/web/checkout-consent-dialog.js +1 -2
- package/dist/billing-foundation/web/client-plugin.js +1 -1
- package/dist/billing-foundation/{constants.d.ts → web/constants.d.ts} +21 -14
- package/dist/billing-foundation/{constants.js → web/constants.js} +35 -31
- package/dist/billing-foundation/{consumer-protection → web/consumer-protection}/consent-locale.js +0 -1
- package/dist/billing-foundation/{contact-card.js → web/contact-card.js} +0 -1
- package/dist/billing-foundation/web/index.d.ts +2 -2
- package/dist/billing-foundation/web/index.js +2 -3
- package/dist/billing-foundation/web/localized-params.js +0 -1
- package/dist/billing-foundation/webhook-handler.js +4 -1
- package/dist/cap-counter/stock-cap-guard.js +8 -0
- package/dist/cap-overview/feature.js +1 -1
- package/dist/cap-overview/handlers/caps-usage.query.js +1 -1
- package/dist/cap-overview/handlers/tenant-caps-list.query.js +2 -2
- package/dist/cap-overview/index.d.ts +2 -2
- package/dist/cap-overview/index.js +2 -2
- package/dist/cap-overview/screens.js +1 -1
- package/dist/cap-overview/web/cap-cards-panel.js +1 -1
- package/dist/cap-overview/web/cap-usage-bar.js +1 -2
- package/dist/cap-overview/web/client-plugin.js +1 -1
- package/dist/cap-overview/{constants.js → web/constants.js} +0 -1
- package/dist/cap-overview/web/index.js +0 -1
- package/dist/cap-overview/{usage-math.d.ts → web/usage-math.d.ts} +1 -1
- package/dist/compliance-profiles/feature.js +1 -1
- package/dist/compliance-profiles/index.d.ts +1 -1
- package/dist/compliance-profiles/index.js +1 -1
- package/dist/compliance-profiles/web/client-plugin.js +1 -2
- package/dist/compliance-profiles/web/compliance-profile-catalog.js +1 -2
- package/dist/compliance-profiles/{constants.js → web/constants.js} +0 -1
- package/dist/compliance-profiles/web/index.js +0 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.js +1 -1
- package/dist/config/web/client-plugin.d.ts +1 -1
- package/dist/config/web/client-plugin.js +1 -2
- package/dist/config/{constants.js → web/constants.js} +0 -1
- package/dist/config/web/i18n.js +1 -1
- package/dist/config/web/index.d.ts +1 -1
- package/dist/config/web/index.js +1 -2
- package/dist/config/write-helpers.js +1 -1
- package/dist/custom-fields/feature.js +1 -1
- package/dist/custom-fields/handlers/clear-custom-field.write.js +1 -1
- package/dist/custom-fields/handlers/define-tenant-field.write.js +1 -1
- package/dist/custom-fields/handlers/delete-system-field.write.js +1 -1
- package/dist/custom-fields/handlers/delete-tenant-field.write.js +1 -1
- package/dist/custom-fields/handlers/set-custom-field.write.js +1 -1
- package/dist/custom-fields/handlers/update-tenant-field.write.js +1 -1
- package/dist/custom-fields/index.d.ts +1 -1
- package/dist/custom-fields/index.js +1 -1
- package/dist/custom-fields/lib/value-schema.js +1 -1
- package/dist/custom-fields/schemas.js +1 -1
- package/dist/custom-fields/web/client-plugin.js +1 -2
- package/dist/custom-fields/{constants.js → web/constants.js} +18 -19
- package/dist/custom-fields/web/custom-fields-form-section.js +1 -2
- package/dist/custom-fields/web/i18n.js +0 -1
- package/dist/custom-fields/web/index.d.ts +1 -1
- package/dist/custom-fields/web/index.js +1 -2
- package/dist/custom-fields/wire-for-entity.js +1 -1
- package/dist/delivery/address-opt-out.js +1 -1
- package/dist/delivery/attempt-log-retention.js +21 -3
- package/dist/delivery/constants.d.ts +1 -1
- package/dist/delivery/constants.js +2 -2
- package/dist/delivery/i18n.js +1 -1
- package/dist/delivery/unsubscribe-page.js +1 -1
- package/dist/delivery/web/client-plugin.js +1 -1
- package/dist/delivery/web/delivery-channel-cell.js +0 -1
- package/dist/delivery/web/delivery-error-cell.js +0 -1
- package/dist/delivery/web/delivery-status-cell.js +1 -2
- package/dist/delivery/web/delivery-time-cell.js +0 -1
- package/dist/delivery/web/delivery-type-cell.js +0 -1
- package/dist/delivery/web/index.js +0 -1
- package/dist/delivery/{public-names.js → web/public-names.js} +0 -1
- package/dist/document-ingest-foundation/events.d.ts +1 -0
- package/dist/document-ingest-foundation/events.js +3 -0
- package/dist/document-ingest-foundation/executor.js +2 -1
- package/dist/document-ingest-foundation/feature.js +16 -5
- package/dist/document-ingest-foundation/index.d.ts +1 -1
- package/dist/document-ingest-foundation/index.js +1 -1
- package/dist/feature-toggles/feature.d.ts +1 -1
- package/dist/feature-toggles/feature.js +2 -2
- package/dist/feature-toggles/handlers/list.query.js +1 -1
- package/dist/feature-toggles/handlers/registered.query.js +1 -1
- package/dist/feature-toggles/handlers/set.write.js +1 -1
- package/dist/feature-toggles/index.d.ts +1 -1
- package/dist/feature-toggles/index.js +1 -1
- package/dist/feature-toggles/web/client-plugin.js +1 -2
- package/dist/feature-toggles/{constants.js → web/constants.js} +0 -1
- package/dist/feature-toggles/web/index.js +0 -1
- package/dist/folders/feature.js +1 -1
- package/dist/folders/handlers/clear-folder.write.js +1 -1
- package/dist/folders/handlers/delete-folder.write.js +1 -1
- package/dist/folders/handlers/set-folder.write.js +1 -1
- package/dist/folders/index.d.ts +1 -1
- package/dist/folders/index.js +1 -1
- package/dist/folders/web/client-plugin.js +1 -2
- package/dist/folders/{constants.js → web/constants.js} +0 -1
- package/dist/folders/web/folder-manager.js +1 -2
- package/dist/folders/web/folder-section.js +1 -2
- package/dist/folders/web/i18n.js +0 -1
- package/dist/folders/web/index.d.ts +1 -1
- package/dist/folders/web/index.js +1 -2
- package/dist/folders/web/tree.js +0 -1
- package/dist/form-draft/db/queries/cleanup.d.ts +3 -2
- package/dist/form-draft/db/queries/cleanup.js +18 -9
- package/dist/form-draft/decrypt-draft.d.ts +2 -0
- package/dist/form-draft/decrypt-draft.js +19 -0
- package/dist/form-draft/entity.js +6 -9
- package/dist/form-draft/feature.js +1 -1
- package/dist/form-draft/handlers/cleanup.job.d.ts +1 -0
- package/dist/form-draft/handlers/cleanup.job.js +17 -4
- package/dist/form-draft/handlers/discard.write.js +1 -1
- package/dist/form-draft/handlers/get.query.js +6 -7
- package/dist/form-draft/handlers/list.query.js +11 -7
- package/dist/form-draft/handlers/save.write.js +1 -1
- package/dist/form-draft/index.d.ts +1 -1
- package/dist/form-draft/index.js +1 -1
- package/dist/form-draft/lookup.d.ts +2 -2
- package/dist/form-draft/lookup.js +7 -2
- package/dist/form-draft/schemas.js +1 -1
- package/dist/form-draft/{constants.js → web/constants.js} +0 -1
- package/dist/form-draft-user-data/hooks.js +2 -2
- package/dist/inbound-mail-foundation/handlers/list-accounts.query.d.ts +1 -1
- package/dist/inbound-mail-foundation/handlers/list-accounts.query.js +11 -3
- package/dist/inbound-mail-foundation/retention-sweep.js +7 -5
- package/dist/jobs/feature.js +2 -2
- package/dist/jobs/handlers/retry.write.js +1 -1
- package/dist/jobs/handlers/trigger.write.js +1 -1
- package/dist/jobs/index.d.ts +1 -1
- package/dist/jobs/index.js +1 -1
- package/dist/jobs/web/client-plugin.js +2 -3
- package/dist/jobs/{constants.js → web/constants.js} +0 -1
- package/dist/jobs/web/default-translations.d.ts +2 -0
- package/dist/jobs/web/default-translations.js +3 -0
- package/dist/jobs/web/i18n.d.ts +5 -2
- package/dist/jobs/web/i18n.js +51 -4
- package/dist/jobs/web/index.js +0 -1
- package/dist/ledger/entity.d.ts +1 -1
- package/dist/ledger/entity.js +1 -1
- package/dist/ledger/feature.js +1 -1
- package/dist/ledger/handlers/confirm-schedule-period.write.js +2 -5
- package/dist/ledger/handlers/create-transaction.write.js +1 -1
- package/dist/ledger/handlers/reports.query.js +1 -1
- package/dist/ledger/handlers/reverse-transaction.write.js +1 -1
- package/dist/ledger/index.d.ts +1 -1
- package/dist/ledger/index.js +1 -1
- package/dist/ledger/recurring.d.ts +1 -1
- package/dist/ledger/reports.d.ts +1 -1
- package/dist/ledger/schemas.js +1 -1
- package/dist/ledger/{constants.js → web/constants.js} +0 -1
- package/dist/ledger/web/index.d.ts +1 -1
- package/dist/ledger/web/index.js +1 -2
- package/dist/legal-pages/feature.d.ts +1 -1
- package/dist/legal-pages/feature.js +1 -1
- package/dist/legal-pages/index.d.ts +1 -1
- package/dist/legal-pages/index.js +1 -1
- package/dist/legal-pages/lib/boot-check.d.ts +1 -1
- package/dist/legal-pages/lib/boot-check.js +1 -1
- package/dist/legal-pages/lib/validate-routes.d.ts +1 -1
- package/dist/legal-pages/web/client-plugin.js +1 -2
- package/dist/legal-pages/{constants.js → web/constants.js} +6 -8
- package/dist/legal-pages/web/index.js +0 -1
- package/dist/mail-foundation/i18n.d.ts +5 -2
- package/dist/mail-foundation/i18n.js +3 -2
- package/dist/mail-transport-smtp/i18n.d.ts +1 -1
- package/dist/mail-transport-smtp/i18n.js +1 -1
- package/dist/managed-pages/feature.js +1 -1
- package/dist/managed-pages/web/client-plugin.js +1 -2
- package/dist/managed-pages/web/default-translations.d.ts +2 -0
- package/dist/managed-pages/web/default-translations.js +11 -0
- package/dist/managed-pages/web/i18n.d.ts +5 -2
- package/dist/managed-pages/web/i18n.js +53 -12
- package/dist/managed-pages/web/index.d.ts +1 -1
- package/dist/managed-pages/web/index.js +1 -2
- package/dist/metrics/compute.d.ts +1 -1
- package/dist/metrics/compute.js +1 -1
- package/dist/metrics/feature.js +1 -1
- package/dist/metrics/index.d.ts +1 -1
- package/dist/metrics/index.js +1 -1
- package/dist/metrics/types.d.ts +1 -1
- package/dist/metrics/validate.js +1 -1
- package/dist/metrics/{constants.js → web/constants.js} +0 -1
- package/dist/metrics/window.d.ts +1 -1
- package/dist/notes-history/feature.js +1 -1
- package/dist/notes-history/handlers/add-note.write.js +1 -1
- package/dist/notes-history/index.d.ts +1 -1
- package/dist/notes-history/index.js +1 -1
- package/dist/notes-history/web/client-plugin.js +1 -2
- package/dist/notes-history/{constants.js → web/constants.js} +0 -1
- package/dist/notes-history/web/i18n.js +0 -1
- package/dist/notes-history/web/index.d.ts +1 -1
- package/dist/notes-history/web/index.js +1 -2
- package/dist/notes-history/web/notes-section.js +2 -3
- package/dist/personal-access-tokens/feature.d.ts +2 -2
- package/dist/personal-access-tokens/feature.js +6 -4
- package/dist/personal-access-tokens/handlers/available-scopes.query.d.ts +1 -1
- package/dist/personal-access-tokens/handlers/create.write.js +1 -1
- package/dist/personal-access-tokens/handlers/revoke.write.js +1 -1
- package/dist/personal-access-tokens/hash.js +1 -1
- package/dist/personal-access-tokens/i18n.d.ts +1 -1
- package/dist/personal-access-tokens/i18n.js +1 -1
- package/dist/personal-access-tokens/index.d.ts +5 -5
- package/dist/personal-access-tokens/index.js +3 -3
- package/dist/personal-access-tokens/resolver.d.ts +1 -1
- package/dist/personal-access-tokens/resolver.js +1 -1
- package/dist/personal-access-tokens/schema/api-token.js +1 -1
- package/dist/personal-access-tokens/screens.d.ts +1 -1
- package/dist/personal-access-tokens/screens.js +1 -1
- package/dist/personal-access-tokens/{constants.js → web/constants.js} +0 -1
- package/dist/presets/index.d.ts +0 -1
- package/dist/presets/index.js +0 -1
- package/dist/presets/security-baseline.d.ts +1 -1
- package/dist/presets/security-baseline.js +1 -1
- package/dist/secrets/feature.js +1 -1
- package/dist/secrets/handlers/delete.write.js +1 -1
- package/dist/secrets/handlers/list.query.js +1 -1
- package/dist/secrets/handlers/set.write.js +1 -1
- package/dist/secrets/i18n.js +1 -1
- package/dist/secrets/index.d.ts +1 -1
- package/dist/secrets/index.js +1 -1
- package/dist/secrets/{constants.js → web/constants.js} +0 -1
- package/dist/secrets/write-gate.js +1 -1
- package/dist/sessions/feature.js +7 -4
- package/dist/sessions/{i18n.js → web/i18n.js} +0 -1
- package/dist/shared/index.d.ts +1 -1
- package/dist/shared/index.js +1 -1
- package/dist/shared/purge-files-reaching-subject.js +7 -3
- package/dist/subscription-stripe/feature.js +2 -1
- package/dist/subscription-stripe/plugin-methods.d.ts +3 -0
- package/dist/subscription-stripe/plugin-methods.js +14 -0
- package/dist/subscription-stripe/verify-webhook.js +1 -0
- package/dist/tags/feature.js +1 -1
- package/dist/tags/handlers/assign-tag.write.js +11 -7
- package/dist/tags/handlers/create-tag.write.js +1 -1
- package/dist/tags/handlers/delete-tag.write.js +4 -1
- package/dist/tags/handlers/remove-tag.write.js +1 -1
- package/dist/tags/handlers/update-tag.write.js +1 -1
- package/dist/tags/index.d.ts +1 -1
- package/dist/tags/index.js +1 -1
- package/dist/tags/screens.js +1 -1
- package/dist/tags/web/client-plugin.js +1 -2
- package/dist/tags/{constants.d.ts → web/constants.d.ts} +1 -0
- package/dist/tags/{constants.js → web/constants.js} +3 -1
- package/dist/tags/web/entity-tags.js +1 -2
- package/dist/tags/web/i18n.js +2 -2
- package/dist/tags/web/index.d.ts +1 -1
- package/dist/tags/web/index.js +1 -2
- package/dist/tags/web/tag-filter.js +1 -2
- package/dist/tags/web/tag-manager.js +5 -4
- package/dist/tags/web/tag-picker.js +0 -1
- package/dist/tags/web/tag-section.js +1 -2
- package/dist/tags/web/tags-cell.js +1 -2
- package/dist/template-resolver/api.d.ts +21 -23
- package/dist/template-resolver/api.js +34 -6
- package/dist/template-resolver/compile-document-body.d.ts +3 -0
- package/dist/template-resolver/compile-document-body.js +51 -4
- package/dist/template-resolver/compile-steps-block.js +2 -2
- package/dist/template-resolver/document-ops.d.ts +1 -1
- package/dist/template-resolver/document-ops.js +3 -3
- package/dist/template-resolver/document-sanitizer.d.ts +2 -2
- package/dist/template-resolver/document-sanitizer.js +23 -3
- package/dist/template-resolver/feature.d.ts +11 -0
- package/dist/template-resolver/feature.js +68 -35
- package/dist/template-resolver/handlers/by-slug.query.js +6 -1
- package/dist/template-resolver/handlers/by-tenant.query.js +6 -2
- package/dist/template-resolver/handlers/collection-item.query.js +2 -1
- package/dist/template-resolver/handlers/collection-list.query.js +2 -1
- package/dist/template-resolver/handlers/collection-set.write.d.ts +2 -1
- package/dist/template-resolver/handlers/collection-set.write.js +15 -3
- package/dist/template-resolver/handlers/collection-shared.d.ts +1 -2
- package/dist/template-resolver/handlers/collection-shared.js +0 -4
- package/dist/template-resolver/handlers/copy-locale.write.d.ts +2 -1
- package/dist/template-resolver/handlers/copy-locale.write.js +69 -65
- package/dist/template-resolver/handlers/diff-to-system.query.js +5 -1
- package/dist/template-resolver/handlers/discard-draft.write.d.ts +3 -2
- package/dist/template-resolver/handlers/discard-draft.write.js +19 -7
- package/dist/template-resolver/handlers/document-base.d.ts +1 -1
- package/dist/template-resolver/handlers/document-base.js +6 -1
- package/dist/template-resolver/handlers/document-blocks.query.d.ts +1 -1
- package/dist/template-resolver/handlers/document-blocks.query.js +2 -2
- package/dist/template-resolver/handlers/export-bundle.query.js +5 -2
- package/dist/template-resolver/handlers/find-by-id.query.js +4 -2
- package/dist/template-resolver/handlers/import-bundle.write.d.ts +2 -1
- package/dist/template-resolver/handlers/import-bundle.write.js +30 -25
- package/dist/template-resolver/handlers/layout-source.query.js +5 -5
- package/dist/template-resolver/handlers/list.query.js +5 -2
- package/dist/template-resolver/handlers/overview.query.d.ts +12 -3
- package/dist/template-resolver/handlers/overview.query.js +87 -51
- package/dist/template-resolver/handlers/patch-draft.write.d.ts +2 -1
- package/dist/template-resolver/handlers/patch-draft.write.js +93 -87
- package/dist/template-resolver/handlers/reset-to-system.write.d.ts +2 -1
- package/dist/template-resolver/handlers/reset-to-system.write.js +51 -44
- package/dist/template-resolver/handlers/resource-link-pdf.write.d.ts +2 -1
- package/dist/template-resolver/handlers/resource-link-pdf.write.js +34 -28
- package/dist/template-resolver/handlers/resource-remove.write.d.ts +2 -1
- package/dist/template-resolver/handlers/resource-remove.write.js +39 -33
- package/dist/template-resolver/handlers/resource-shared.js +1 -1
- package/dist/template-resolver/handlers/resource-upload.write.d.ts +2 -1
- package/dist/template-resolver/handlers/resource-upload.write.js +105 -97
- package/dist/template-resolver/handlers/send-test-shared.d.ts +5 -0
- package/dist/template-resolver/handlers/send-test-shared.js +19 -0
- package/dist/template-resolver/handlers/send-test-status.query.d.ts +9 -0
- package/dist/template-resolver/handlers/send-test-status.query.js +18 -0
- package/dist/template-resolver/handlers/send-test.write.d.ts +2 -1
- package/dist/template-resolver/handlers/send-test.write.js +89 -91
- package/dist/template-resolver/handlers/set.write.d.ts +2 -1
- package/dist/template-resolver/handlers/set.write.js +95 -91
- package/dist/template-resolver/handlers/shared.js +1 -1
- package/dist/template-resolver/handlers/template-gates.d.ts +1 -1
- package/dist/template-resolver/handlers/template-gates.js +1 -1
- package/dist/template-resolver/handlers/template-write.d.ts +1 -1
- package/dist/template-resolver/handlers/template-write.js +1 -1
- package/dist/template-resolver/handlers/toggle-status.write.d.ts +6 -7
- package/dist/template-resolver/handlers/toggle-status.write.js +28 -10
- package/dist/template-resolver/handlers/upsert-tenant.write.d.ts +2 -1
- package/dist/template-resolver/handlers/upsert-tenant.write.js +30 -24
- package/dist/template-resolver/handlers/usage.query.js +3 -2
- package/dist/template-resolver/handlers/validate.query.d.ts +1 -1
- package/dist/template-resolver/handlers/validate.query.js +3 -1
- package/dist/template-resolver/i18n.d.ts +3 -0
- package/dist/template-resolver/i18n.js +24 -0
- package/dist/template-resolver/index.d.ts +8 -5
- package/dist/template-resolver/index.js +6 -4
- package/dist/template-resolver/layout-appearance.js +1 -1
- package/dist/template-resolver/layout-regions.d.ts +1 -1
- package/dist/template-resolver/seeding.d.ts +4 -1
- package/dist/template-resolver/seeding.js +13 -7
- package/dist/template-resolver/store-template-resource.js +2 -2
- package/dist/template-resolver/table.js +1 -1
- package/dist/template-resolver/template-bundle.js +2 -2
- package/dist/template-resolver/template-delivery-policy.d.ts +22 -0
- package/dist/template-resolver/template-delivery-policy.js +40 -0
- package/dist/template-resolver/template-draft.d.ts +1 -1
- package/dist/template-resolver/template-draft.js +1 -1
- package/dist/template-resolver/template-edit-policy.d.ts +22 -0
- package/dist/template-resolver/template-edit-policy.js +45 -0
- package/dist/template-resolver/template-meta.d.ts +2 -2
- package/dist/template-resolver/template-meta.js +2 -2
- package/dist/template-resolver/template-preview.d.ts +1 -1
- package/dist/template-resolver/template-preview.js +15 -6
- package/dist/template-resolver/template-usage.d.ts +1 -1
- package/dist/template-resolver/template-usage.js +1 -1
- package/dist/template-resolver/template-validation.js +34 -14
- package/dist/template-resolver/testing.js +1 -1
- package/dist/template-resolver/user-content-table.js +1 -1
- package/dist/template-resolver/web/client-plugin.js +1 -2
- package/dist/template-resolver/{constants.d.ts → web/constants.d.ts} +4 -1
- package/dist/template-resolver/{constants.js → web/constants.js} +9 -10
- package/dist/template-resolver/{document-blocks.d.ts → web/document-blocks.d.ts} +2 -2
- package/dist/template-resolver/{document-blocks.js → web/document-blocks.js} +1 -0
- package/dist/template-resolver/web/document-editor-extensions.d.ts +1 -0
- package/dist/template-resolver/web/document-editor-extensions.js +22 -2
- package/dist/template-resolver/web/document-editor.js +0 -1
- package/dist/template-resolver/web/document-images.d.ts +2 -0
- package/dist/template-resolver/web/document-images.js +27 -0
- package/dist/template-resolver/{document-schema.d.ts → web/document-schema.d.ts} +2 -1
- package/dist/template-resolver/{document-schema.js → web/document-schema.js} +4 -1
- package/dist/template-resolver/{document-steps.js → web/document-steps.js} +0 -1
- package/dist/template-resolver/web/document-tiptap-editor.d.ts +1 -1
- package/dist/template-resolver/web/document-tiptap-editor.js +24 -9
- package/dist/template-resolver/web/document-toolbar-blocks.d.ts +4 -2
- package/dist/template-resolver/web/document-toolbar-blocks.js +1 -1
- package/dist/template-resolver/web/editor-handle.js +1 -1
- package/dist/template-resolver/web/i18n.js +5 -1
- package/dist/template-resolver/web/index.d.ts +3 -3
- package/dist/template-resolver/web/index.js +3 -4
- package/dist/template-resolver/{mail-constants.js → web/mail-constants.js} +0 -1
- package/dist/template-resolver/{pdf-constants.js → web/pdf-constants.js} +0 -1
- package/dist/template-resolver/web/placeholder-line-editor-lazy.js +0 -1
- package/dist/template-resolver/web/placeholder-line-editor.js +6 -4
- package/dist/template-resolver/{qualified-names.d.ts → web/qualified-names.d.ts} +2 -0
- package/dist/template-resolver/{qualified-names.js → web/qualified-names.js} +2 -1
- package/dist/template-resolver/web/use-stable-by-key.js +0 -1
- package/dist/tenant/handlers/add-member.write.js +1 -1
- package/dist/tenant/index.d.ts +1 -1
- package/dist/tenant/index.js +1 -1
- package/dist/tenant/invitation-table.js +1 -1
- package/dist/tenant/invited-membership.js +1 -1
- package/dist/tenant/last-tenant-admin.js +1 -1
- package/dist/tenant/member-role-options.js +1 -1
- package/dist/tenant/screens.js +1 -1
- package/dist/tenant/web/client-plugin.js +1 -2
- package/dist/tenant/{constants.js → web/constants.js} +3 -6
- package/dist/tenant/web/index.js +0 -1
- package/dist/tenant/web/member-roles-cell.js +0 -1
- package/dist/tenant/web/member-status-cell.js +0 -1
- package/dist/tenant-lifecycle/stages.js +2 -3
- package/dist/tier-engine/entity.d.ts +1 -1
- package/dist/tier-engine/entity.js +1 -1
- package/dist/tier-engine/feature.js +2 -2
- package/dist/tier-engine/handlers/set-tenant-tier.write.js +1 -1
- package/dist/tier-engine/index.d.ts +1 -1
- package/dist/tier-engine/index.js +1 -1
- package/dist/tier-engine/web/client-plugin.js +2 -3
- package/dist/tier-engine/{constants.js → web/constants.js} +2 -3
- package/dist/tier-engine/{i18n.js → web/i18n.js} +0 -1
- package/dist/tier-engine/web/index.js +0 -1
- package/dist/user/handlers/create.write.js +1 -1
- package/dist/user/handlers/update-roles.js +1 -1
- package/dist/user/handlers/update.write.js +1 -1
- package/dist/user/index.d.ts +1 -1
- package/dist/user/index.js +1 -1
- package/dist/user/invited-global-roles.d.ts +1 -1
- package/dist/user/invited-global-roles.js +1 -1
- package/dist/user/schema/user.js +1 -1
- package/dist/user/{constants.js → web/constants.js} +0 -1
- package/dist/user-data-rights/env.js +1 -1
- package/dist/user-data-rights/feature.js +3 -3
- package/dist/user-data-rights/index.d.ts +1 -1
- package/dist/user-data-rights/index.js +1 -1
- package/dist/user-data-rights/lib/resolve-tenant-model.js +1 -1
- package/dist/user-data-rights/mail-notifications.js +1 -1
- package/dist/user-data-rights/web/client-plugin.js +2 -3
- package/dist/user-data-rights/web/confirm-deletion-screen.js +0 -1
- package/dist/user-data-rights/{constants.js → web/constants.js} +11 -12
- package/dist/user-data-rights/web/default-translations.d.ts +2 -0
- package/dist/user-data-rights/web/default-translations.js +59 -0
- package/dist/user-data-rights/web/i18n.d.ts +5 -2
- package/dist/user-data-rights/web/i18n.js +37 -59
- package/dist/user-data-rights/web/index.d.ts +1 -1
- package/dist/user-data-rights/web/index.js +1 -2
- package/dist/user-data-rights/web/privacy-center-screen.js +1 -2
- package/dist/user-data-rights/web/request-deletion-screen.js +0 -1
- package/dist/user-data-rights-defaults/hooks/file-ref.userdata-hook.js +6 -1
- package/dist/user-profile/feature.js +1 -1
- package/dist/user-profile/handlers/change-email.write.js +1 -1
- package/dist/user-profile/index.d.ts +1 -1
- package/dist/user-profile/index.js +1 -1
- package/dist/user-profile/web/client-plugin.js +2 -3
- package/dist/user-profile/{constants.js → web/constants.js} +0 -1
- package/dist/user-profile/{i18n.js → web/i18n.js} +0 -1
- package/dist/user-profile/web/profile-screen.js +2 -3
- package/dist/waitlist/entity.js +1 -1
- package/dist/waitlist/feature.js +1 -1
- package/dist/waitlist/handlers/export-purge.write.js +1 -1
- package/dist/waitlist/handlers/invite.write.js +1 -1
- package/dist/waitlist/handlers/reject.write.js +1 -1
- package/dist/waitlist/handlers/submit.write.js +4 -3
- package/dist/waitlist/import.d.ts +1 -1
- package/dist/waitlist/index.d.ts +1 -1
- package/dist/waitlist/index.js +1 -1
- package/dist/waitlist/legacy-migrate.js +1 -1
- package/dist/waitlist/link-on-signup.js +1 -1
- package/dist/waitlist/mail.d.ts +0 -1
- package/dist/waitlist/mail.js +6 -4
- package/dist/waitlist/payloads.js +1 -1
- package/dist/waitlist/screens.js +1 -1
- package/dist/waitlist/{constants.js → web/constants.js} +0 -1
- package/kumiko-es-tables.json +102 -0
- package/package.json +30 -29
- package/src/audit/changes.json +7 -0
- package/src/auth-email-password/changes.json +6 -0
- package/src/auth-mfa/changes.json +6 -0
- package/src/billing-foundation/changes.json +18 -0
- package/src/cap-counter/changes.json +12 -0
- package/src/delivery/changes.json +6 -0
- package/src/document-ingest-foundation/changes.json +6 -0
- package/src/files/changes.json +7 -0
- package/src/form-draft/changes.json +7 -0
- package/src/inbound-mail-foundation/changes.json +6 -0
- package/src/ledger/changes.json +7 -0
- package/src/mail-foundation/changes.json +6 -0
- package/src/presets/changes.json +7 -0
- package/src/tags/changes.json +6 -0
- package/src/template-resolver/changes.json +63 -0
- package/src/user-data-rights/changes.json +14 -0
- package/src/waitlist/changes.json +6 -0
- package/dist/admin-shell/i18n.d.ts +0 -5
- package/dist/admin-shell/i18n.js +0 -51
- package/dist/audit/i18n.d.ts +0 -5
- package/dist/audit/i18n.js +0 -22
- package/dist/jobs/i18n.d.ts +0 -5
- package/dist/jobs/i18n.js +0 -52
- package/dist/managed-pages/i18n.d.ts +0 -5
- package/dist/managed-pages/i18n.js +0 -55
- package/dist/presets/dsgvo-self-service.d.ts +0 -10
- package/dist/presets/dsgvo-self-service.js +0 -24
- package/dist/user-data-rights/i18n.d.ts +0 -5
- package/dist/user-data-rights/i18n.js +0 -39
- /package/dist/account-security/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/account-security/{i18n.d.ts → web/i18n.d.ts} +0 -0
- /package/dist/admin-shell/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/auth-email-password/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/auth-email-password/{i18n.d.ts → web/i18n.d.ts} +0 -0
- /package/dist/auth-email-password/{mail-i18n.d.ts → web/mail-i18n.d.ts} +0 -0
- /package/dist/auth-mfa/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/billing-foundation/{consumer-protection → web/consumer-protection}/consent-locale.d.ts +0 -0
- /package/dist/billing-foundation/{contact-card.d.ts → web/contact-card.d.ts} +0 -0
- /package/dist/cap-overview/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/cap-overview/{usage-math.js → web/usage-math.js} +0 -0
- /package/dist/compliance-profiles/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/config/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/custom-fields/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/delivery/{public-names.d.ts → web/public-names.d.ts} +0 -0
- /package/dist/feature-toggles/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/folders/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/form-draft/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/jobs/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/ledger/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/legal-pages/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/metrics/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/notes-history/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/personal-access-tokens/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/personal-access-tokens/{scopes.d.ts → web/scopes.d.ts} +0 -0
- /package/dist/personal-access-tokens/{scopes.js → web/scopes.js} +0 -0
- /package/dist/secrets/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/sessions/{i18n.d.ts → web/i18n.d.ts} +0 -0
- /package/dist/template-resolver/{document-steps.d.ts → web/document-steps.d.ts} +0 -0
- /package/dist/template-resolver/{mail-constants.d.ts → web/mail-constants.d.ts} +0 -0
- /package/dist/template-resolver/{pdf-constants.d.ts → web/pdf-constants.d.ts} +0 -0
- /package/dist/template-resolver/{placeholder-text.d.ts → web/placeholder-text.d.ts} +0 -0
- /package/dist/template-resolver/{placeholder-text.js → web/placeholder-text.js} +0 -0
- /package/dist/tenant/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/tier-engine/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/tier-engine/{i18n.d.ts → web/i18n.d.ts} +0 -0
- /package/dist/user/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/user-data-rights/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/user-profile/{constants.d.ts → web/constants.d.ts} +0 -0
- /package/dist/user-profile/{i18n.d.ts → web/i18n.d.ts} +0 -0
- /package/dist/waitlist/{constants.d.ts → web/constants.d.ts} +0 -0
|
@@ -7,6 +7,7 @@ export type DocumentEditorLabels = {
|
|
|
7
7
|
readonly pageBreak: string;
|
|
8
8
|
readonly button?: string;
|
|
9
9
|
readonly steps?: string;
|
|
10
|
+
readonly images?: string;
|
|
10
11
|
/** Canvas block label of an image, e.g. "Image · inline". */
|
|
11
12
|
readonly imageBlock?: string;
|
|
12
13
|
readonly variableLabels?: Readonly<Record<string, string>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ListKeymap } from "@tiptap/extension-list";
|
|
2
2
|
import { Dropcursor, Gapcursor, Placeholder, UndoRedo } from "@tiptap/extensions";
|
|
3
|
-
import { DocumentButton, DocumentPageBreak, DocumentResource, DocumentSteps, DocumentVariable, documentExtensions, } from "
|
|
4
|
-
import { readDocumentStepsAttribute } from "
|
|
3
|
+
import { DocumentButton, DocumentImages, DocumentPageBreak, DocumentResource, DocumentSteps, DocumentVariable, documentExtensions, } from "./document-schema.js";
|
|
4
|
+
import { readDocumentStepsAttribute } from "./document-steps.js";
|
|
5
5
|
const DOCUMENT_RESOURCE_SIZE_TOKEN = "{size}";
|
|
6
6
|
export const DOCUMENT_BLOCK_ATTRIBUTE = "data-document-block";
|
|
7
7
|
function createElementWithClass(tag, className, text) {
|
|
@@ -134,6 +134,24 @@ function createStepsView(labels) {
|
|
|
134
134
|
return { dom };
|
|
135
135
|
};
|
|
136
136
|
}
|
|
137
|
+
// A sketch only: the photos are record data, known at render time.
|
|
138
|
+
function createImagesView(labels) {
|
|
139
|
+
return ({ node }) => {
|
|
140
|
+
const dom = createElementWithClass("div", "relative my-3 rounded border border-dashed border-input px-3 pb-3 pt-4");
|
|
141
|
+
dom.setAttribute(DOCUMENT_BLOCK_ATTRIBUTE, "");
|
|
142
|
+
dom.contentEditable = "false";
|
|
143
|
+
const variable = String(node.attrs["variable"]);
|
|
144
|
+
const variableLabels = labels.variableLabels ?? {};
|
|
145
|
+
const variableLabel = Object.hasOwn(variableLabels, variable)
|
|
146
|
+
? variableLabels[variable]
|
|
147
|
+
: undefined;
|
|
148
|
+
dom.append(createBlockLabel(`${labels.images ?? "Photos"} · ${variableLabel ?? variable}`));
|
|
149
|
+
const grid = createElementWithClass("div", "grid grid-cols-2 gap-1.5");
|
|
150
|
+
grid.append(createElementWithClass("div", "h-12 rounded bg-muted"), createElementWithClass("div", "h-12 rounded bg-muted"));
|
|
151
|
+
dom.append(grid);
|
|
152
|
+
return { dom };
|
|
153
|
+
};
|
|
154
|
+
}
|
|
137
155
|
// Replaced by name, not appended: the schema must keep exactly one node per
|
|
138
156
|
// name, and only the editor view differs from the shared document schema.
|
|
139
157
|
export function createDocumentEditorExtensions(labels) {
|
|
@@ -151,6 +169,8 @@ export function createDocumentEditorExtensions(labels) {
|
|
|
151
169
|
: extension;
|
|
152
170
|
case DocumentSteps.name:
|
|
153
171
|
return DocumentSteps.extend({ addNodeView: () => createStepsView(labels) });
|
|
172
|
+
case DocumentImages.name:
|
|
173
|
+
return DocumentImages.extend({ addNodeView: () => createImagesView(labels) });
|
|
154
174
|
case DocumentPageBreak.name:
|
|
155
175
|
return DocumentPageBreak.extend({
|
|
156
176
|
addNodeView: () => createPageBreakView(labels.pageBreak),
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// The record's photos: a block bound to an `images` variable whose FileRef ids the
|
|
2
|
+
// app passes at render time. Universal like document-schema.ts.
|
|
3
|
+
import { Node } from "@tiptap/core";
|
|
4
|
+
export function createDocumentImagesNode(isReferenceName) {
|
|
5
|
+
return Node.create({
|
|
6
|
+
name: "images",
|
|
7
|
+
group: "block",
|
|
8
|
+
atom: true,
|
|
9
|
+
addAttributes() {
|
|
10
|
+
return { variable: { default: null } };
|
|
11
|
+
},
|
|
12
|
+
parseHTML() {
|
|
13
|
+
return [
|
|
14
|
+
{
|
|
15
|
+
tag: "div[data-images]",
|
|
16
|
+
getAttrs: (element) => {
|
|
17
|
+
const variable = element.getAttribute("data-images");
|
|
18
|
+
return variable !== null && isReferenceName(variable) ? { variable } : false;
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
},
|
|
23
|
+
renderHTML({ node }) {
|
|
24
|
+
return ["div", { "data-images": node.attrs["variable"] }];
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
}
|
|
@@ -3,13 +3,14 @@ export declare function isDocumentPlaceholderHref(href: string): boolean;
|
|
|
3
3
|
export declare function isAllowedDocumentLinkHref(href: string): boolean;
|
|
4
4
|
export declare function isDocumentReferenceName(value: string): boolean;
|
|
5
5
|
export declare function isDocumentResourceKey(value: string): boolean;
|
|
6
|
-
export declare const DOCUMENT_NODE_NAMES: readonly ["variable", "resource", "button", "divider", "pageBreak", "steps"];
|
|
6
|
+
export declare const DOCUMENT_NODE_NAMES: readonly ["variable", "resource", "button", "divider", "pageBreak", "steps", "images"];
|
|
7
7
|
export declare const DocumentVariable: Node<any, any>;
|
|
8
8
|
export declare const DocumentResource: Node<any, any>;
|
|
9
9
|
export declare const DocumentButton: Node<any, any>;
|
|
10
10
|
export declare const DocumentDivider: Node<any, any>;
|
|
11
11
|
export declare const DocumentPageBreak: Node<any, any>;
|
|
12
12
|
export declare const DocumentSteps: Node<any, any>;
|
|
13
|
+
export declare const DocumentImages: Node<any, any>;
|
|
13
14
|
export declare const DocumentTableRow: Node<import("@tiptap/extension-table").TableRowOptions, any>;
|
|
14
15
|
export declare const DocumentTable: Node<import("@tiptap/extension-table").TableOptions, any>;
|
|
15
16
|
export declare const DocumentTableCell: Node<import("@tiptap/extension-table").TableCellOptions, any>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// @runtime client
|
|
2
1
|
// Canonical document model for template bodies (kinds mail, document-pdf).
|
|
3
2
|
// Universal on purpose: the web editor and the server sanitizer load the same
|
|
4
3
|
// extension list, so what the editor can produce is exactly what the server
|
|
@@ -8,6 +7,7 @@ import { Extension, Node } from "@tiptap/core";
|
|
|
8
7
|
import { Link } from "@tiptap/extension-link";
|
|
9
8
|
import { Table, TableCell, TableHeader, TableRow } from "@tiptap/extension-table";
|
|
10
9
|
import StarterKit from "@tiptap/starter-kit";
|
|
10
|
+
import { createDocumentImagesNode } from "./document-images.js";
|
|
11
11
|
import { createDocumentStepsNode } from "./document-steps.js";
|
|
12
12
|
const PLACEHOLDER_HREF = /^\{\{(.+)\}\}$/;
|
|
13
13
|
const REFERENCE_NAME = /^[A-Za-z_][A-Za-z0-9_]*(\.[A-Za-z_][A-Za-z0-9_]*)*$/;
|
|
@@ -65,6 +65,7 @@ export const DOCUMENT_NODE_NAMES = [
|
|
|
65
65
|
"divider",
|
|
66
66
|
"pageBreak",
|
|
67
67
|
"steps",
|
|
68
|
+
"images",
|
|
68
69
|
];
|
|
69
70
|
export const DocumentVariable = Node.create({
|
|
70
71
|
name: "variable",
|
|
@@ -170,6 +171,7 @@ export const DocumentPageBreak = Node.create({
|
|
|
170
171
|
},
|
|
171
172
|
});
|
|
172
173
|
export const DocumentSteps = createDocumentStepsNode(isDocumentReferenceName);
|
|
174
|
+
export const DocumentImages = createDocumentImagesNode(isDocumentReferenceName);
|
|
173
175
|
// A repeat row is a table row carrying `each`: prosemirror-tables requires
|
|
174
176
|
// the tableRow node type, so a separate node type is not an option.
|
|
175
177
|
export const DocumentTableRow = TableRow.extend({
|
|
@@ -346,6 +348,7 @@ export const documentExtensions = [
|
|
|
346
348
|
DocumentDivider,
|
|
347
349
|
DocumentPageBreak,
|
|
348
350
|
DocumentSteps,
|
|
351
|
+
DocumentImages,
|
|
349
352
|
DocumentTextAlign,
|
|
350
353
|
DocumentTextSize,
|
|
351
354
|
DocumentCondition,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import { type DocumentEditorProps } from "./document-toolbar-blocks.ts";
|
|
3
|
-
export default function DocumentTiptapEditor({ id, value, onChange, variables, readOnly, blocks, variableLabels, systemVariables, resourcePreviews, chrome, toolbar, renderPaper, toolbarHost, onEditorReady, }: DocumentEditorProps): ReactNode;
|
|
3
|
+
export default function DocumentTiptapEditor({ id, value, onChange, variables, readOnly, blocks: configuredBlocks, imageVariables, variableLabels, systemVariables, resourcePreviews, chrome, toolbar, renderPaper, toolbarHost, onEditorReady, }: DocumentEditorProps): ReactNode;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// @runtime client
|
|
3
2
|
//
|
|
4
3
|
// tiptap-backed implementation behind DocumentContentEditor's lazy() boundary —
|
|
5
4
|
// never import this file statically, tiptap must only load when a "document"
|
|
@@ -10,12 +9,12 @@ import { cn } from "@cosmicdrift/kumiko-renderer/web";
|
|
|
10
9
|
import { isOneOf } from "@cosmicdrift/kumiko-types/type-guards";
|
|
11
10
|
import { EditorContent, useEditor, useEditorState } from "@tiptap/react";
|
|
12
11
|
import { BubbleMenu } from "@tiptap/react/menus";
|
|
13
|
-
import { AlignCenter, AlignJustify, AlignLeft, AlignRight, Bold as BoldIcon, Braces, ChevronDown, Image as ImageIcon, Italic as ItalicIcon, Link as LinkIcon, List, ListChecks, ListOrdered, Minus, MousePointerClick, Repeat, Scissors, Table as TableIcon, Underline as UnderlineIcon, } from "lucide-react";
|
|
12
|
+
import { AlignCenter, AlignJustify, AlignLeft, AlignRight, Bold as BoldIcon, Braces, ChevronDown, GalleryThumbnails, Image as ImageIcon, Italic as ItalicIcon, Link as LinkIcon, List, ListChecks, ListOrdered, Minus, MousePointerClick, Repeat, Scissors, Table as TableIcon, Underline as UnderlineIcon, } from "lucide-react";
|
|
14
13
|
import { Fragment, useEffect, useMemo, useState } from "react";
|
|
15
14
|
import { createPortal } from "react-dom";
|
|
16
|
-
import { DOCUMENT_TEXT_ALIGNMENTS, isAllowedDocumentLinkHref, isDocumentPlaceholderHref, isDocumentReferenceName, isDocumentResourceKey, } from "../document-schema.js";
|
|
17
|
-
import { parseDocumentStepsInput } from "../document-steps.js";
|
|
18
15
|
import { createDocumentEditorExtensions, DOCUMENT_BLOCK_ATTRIBUTE, } from "./document-editor-extensions.js";
|
|
16
|
+
import { DOCUMENT_TEXT_ALIGNMENTS, isAllowedDocumentLinkHref, isDocumentPlaceholderHref, isDocumentReferenceName, isDocumentResourceKey, } from "./document-schema.js";
|
|
17
|
+
import { parseDocumentStepsInput } from "./document-steps.js";
|
|
19
18
|
import { MAIL_DOCUMENT_BLOCKS, } from "./document-toolbar-blocks.js";
|
|
20
19
|
import { createEditorHandle } from "./editor-handle.js";
|
|
21
20
|
import { useStableByKey } from "./use-stable-by-key.js";
|
|
@@ -35,6 +34,7 @@ const BLOCK_PANEL = {
|
|
|
35
34
|
repeat: "repeat",
|
|
36
35
|
align: "align",
|
|
37
36
|
steps: "steps",
|
|
37
|
+
images: "images",
|
|
38
38
|
};
|
|
39
39
|
const ALIGNMENT_ICONS = {
|
|
40
40
|
left: _jsx(AlignLeft, { size: 16 }),
|
|
@@ -243,7 +243,11 @@ function InsertPanel({ editor, editorId, kind, variables, variableLabels, onClos
|
|
|
243
243
|
}
|
|
244
244
|
insertAndClose({ type: "steps", attrs: { variable: selectedName, steps } });
|
|
245
245
|
};
|
|
246
|
-
const needsVariables = kind === "button" ||
|
|
246
|
+
const needsVariables = kind === "button" ||
|
|
247
|
+
kind === "repeat" ||
|
|
248
|
+
kind === "placeholder" ||
|
|
249
|
+
kind === "steps" ||
|
|
250
|
+
kind === "images";
|
|
247
251
|
const noVariables = needsVariables && selectable.length === 0;
|
|
248
252
|
const idPrefix = `${editorId}-panel`;
|
|
249
253
|
return (_jsxs("div", { className: "flex flex-col gap-2 border-b border-input bg-muted/40 p-2", children: [noVariables && (_jsx("p", { className: "text-sm text-muted-foreground", children: t("template-resolver.documentEditor.noVariables") })), kind === "link" && (_jsx(Field, { id: `${idPrefix}-href`, label: t("template-resolver.documentEditor.linkHref"), children: _jsx(Input, { kind: "text", id: `${idPrefix}-href`, name: "href", value: href, onChange: setHref, placeholder: t("template-resolver.documentEditor.linkHrefPlaceholder") }) })), kind === "placeholder" && !noVariables && (_jsx("div", { className: "flex flex-wrap gap-1", children: _jsx(VariableChips, { variables: selectable, labels: variableLabels, onInsert: (name) => insertAndClose({ type: "variable", attrs: { name } }) }) })), kind === "align" && (_jsx("div", { className: "flex flex-wrap gap-1", children: DOCUMENT_TEXT_ALIGNMENTS.map((alignment) => (_jsxs(Button, { type: "button", variant: "secondary", size: "sm", onClick: () => {
|
|
@@ -254,7 +258,7 @@ function InsertPanel({ editor, editorId, kind, variables, variableLabels, onClos
|
|
|
254
258
|
.updateAttributes("heading", { textAlign: alignment })
|
|
255
259
|
.run();
|
|
256
260
|
onClose();
|
|
257
|
-
}, children: [ALIGNMENT_ICONS[alignment], t(ALIGNMENT_LABEL_KEYS[alignment])] }, alignment))) })), kind === "image" && (_jsxs(_Fragment, { children: [_jsx(Field, { id: `${idPrefix}-resource`, label: t("template-resolver.documentEditor.resourceKey"), children: _jsx(Input, { kind: "text", id: `${idPrefix}-resource`, name: "resource", value: resource, onChange: setResource }) }), _jsx(Field, { id: `${idPrefix}-alt`, label: t("template-resolver.documentEditor.imageAlt"), children: _jsx(Input, { kind: "text", id: `${idPrefix}-alt`, name: "alt", value: alt, onChange: setAlt }) })] })), kind === "button" && !noVariables && (_jsxs(_Fragment, { children: [_jsx(NameSelect, { id: `${idPrefix}-target`, label: t("template-resolver.documentEditor.buttonTarget"), names: selectable, labels: variableLabels, value: selectedName, onChange: setChosenName }), _jsx(Field, { id: `${idPrefix}-text`, label: t("template-resolver.documentEditor.buttonText"), children: _jsx(Input, { kind: "text", id: `${idPrefix}-text`, name: "text", value: buttonText, onChange: setButtonText }) })] })), kind === "repeat" && !noVariables && (_jsx(NameSelect, { id: `${idPrefix}-list`, label: t("template-resolver.documentEditor.repeatList"), names: selectable, labels: variableLabels, value: selectedName, onChange: setChosenName })), kind === "steps" && !noVariables && (_jsxs(_Fragment, { children: [_jsx(NameSelect, { id: `${idPrefix}-steps-variable`, label: t("template-resolver.documentEditor.stepsVariable"), names: selectable, labels: variableLabels, value: selectedName, onChange: setChosenName }), _jsx(Field, { id: `${idPrefix}-steps-list`, label: t("template-resolver.documentEditor.stepsList"), children: _jsx(Input, { kind: "text", id: `${idPrefix}-steps-list`, name: "steps", value: stepsText, onChange: setStepsText }) })] })), error !== null && (_jsx("p", { role: "alert", className: "text-sm text-destructive", children: error })), _jsx("div", { className: "flex flex-wrap gap-2", children: _jsx(PanelActions, { onCancel: onClose, ...(kind === "link" && { onInsert: submitLink }), ...(kind === "link" &&
|
|
261
|
+
}, children: [ALIGNMENT_ICONS[alignment], t(ALIGNMENT_LABEL_KEYS[alignment])] }, alignment))) })), kind === "image" && (_jsxs(_Fragment, { children: [_jsx(Field, { id: `${idPrefix}-resource`, label: t("template-resolver.documentEditor.resourceKey"), children: _jsx(Input, { kind: "text", id: `${idPrefix}-resource`, name: "resource", value: resource, onChange: setResource }) }), _jsx(Field, { id: `${idPrefix}-alt`, label: t("template-resolver.documentEditor.imageAlt"), children: _jsx(Input, { kind: "text", id: `${idPrefix}-alt`, name: "alt", value: alt, onChange: setAlt }) })] })), kind === "button" && !noVariables && (_jsxs(_Fragment, { children: [_jsx(NameSelect, { id: `${idPrefix}-target`, label: t("template-resolver.documentEditor.buttonTarget"), names: selectable, labels: variableLabels, value: selectedName, onChange: setChosenName }), _jsx(Field, { id: `${idPrefix}-text`, label: t("template-resolver.documentEditor.buttonText"), children: _jsx(Input, { kind: "text", id: `${idPrefix}-text`, name: "text", value: buttonText, onChange: setButtonText }) })] })), kind === "repeat" && !noVariables && (_jsx(NameSelect, { id: `${idPrefix}-list`, label: t("template-resolver.documentEditor.repeatList"), names: selectable, labels: variableLabels, value: selectedName, onChange: setChosenName })), kind === "images" && !noVariables && (_jsx(NameSelect, { id: `${idPrefix}-images-variable`, label: t("template-resolver.documentEditor.imagesVariable"), names: selectable, labels: variableLabels, value: selectedName, onChange: setChosenName })), kind === "steps" && !noVariables && (_jsxs(_Fragment, { children: [_jsx(NameSelect, { id: `${idPrefix}-steps-variable`, label: t("template-resolver.documentEditor.stepsVariable"), names: selectable, labels: variableLabels, value: selectedName, onChange: setChosenName }), _jsx(Field, { id: `${idPrefix}-steps-list`, label: t("template-resolver.documentEditor.stepsList"), children: _jsx(Input, { kind: "text", id: `${idPrefix}-steps-list`, name: "steps", value: stepsText, onChange: setStepsText }) })] })), error !== null && (_jsx("p", { role: "alert", className: "text-sm text-destructive", children: error })), _jsx("div", { className: "flex flex-wrap gap-2", children: _jsx(PanelActions, { onCancel: onClose, ...(kind === "link" && { onInsert: submitLink }), ...(kind === "link" &&
|
|
258
262
|
editor.isActive("link") && {
|
|
259
263
|
onRemoveLink: () => {
|
|
260
264
|
editor.chain().focus().extendMarkRange("link").unsetLink().run();
|
|
@@ -268,9 +272,12 @@ function InsertPanel({ editor, editorId, kind, variables, variableLabels, onClos
|
|
|
268
272
|
content: buttonText ? [{ type: "text", text: buttonText }] : [],
|
|
269
273
|
}),
|
|
270
274
|
}), ...(kind === "repeat" &&
|
|
271
|
-
!noVariables && { onInsert: () => insertAndClose(repeatTableContent(selectedName)) }), ...(kind === "steps" && !noVariables && { onInsert: submitSteps })
|
|
275
|
+
!noVariables && { onInsert: () => insertAndClose(repeatTableContent(selectedName)) }), ...(kind === "steps" && !noVariables && { onInsert: submitSteps }), ...(kind === "images" &&
|
|
276
|
+
!noVariables && {
|
|
277
|
+
onInsert: () => insertAndClose({ type: "images", attrs: { variable: selectedName } }),
|
|
278
|
+
}) }) })] }));
|
|
272
279
|
}
|
|
273
|
-
export default function DocumentTiptapEditor({ id, value, onChange, variables, readOnly, blocks = MAIL_DOCUMENT_BLOCKS, variableLabels = NO_LABELS, systemVariables = NO_NAMES, resourcePreviews = NO_PREVIEWS, chrome = "default", toolbar = "full", renderPaper, toolbarHost, onEditorReady, }) {
|
|
280
|
+
export default function DocumentTiptapEditor({ id, value, onChange, variables, readOnly, blocks: configuredBlocks = MAIL_DOCUMENT_BLOCKS, imageVariables = NO_NAMES, variableLabels = NO_LABELS, systemVariables = NO_NAMES, resourcePreviews = NO_PREVIEWS, chrome = "default", toolbar = "full", renderPaper, toolbarHost, onEditorReady, }) {
|
|
274
281
|
const t = useTranslation();
|
|
275
282
|
const { ActionOverflowMenu, Button, Field, Input } = usePrimitives();
|
|
276
283
|
const [openPanel, setOpenPanel] = useState(null);
|
|
@@ -279,12 +286,17 @@ export default function DocumentTiptapEditor({ id, value, onChange, variables, r
|
|
|
279
286
|
const canvas = chrome === "canvas";
|
|
280
287
|
const compact = toolbar === "compact" && !canvas;
|
|
281
288
|
const hosted = toolbarHost !== undefined;
|
|
289
|
+
// A photo block needs an images variable to bind to; without one the button would open an empty panel.
|
|
290
|
+
const blocks = imageVariables.length === 0
|
|
291
|
+
? configuredBlocks.filter((block) => block !== "images")
|
|
292
|
+
: configuredBlocks;
|
|
282
293
|
const placeholderLabel = t("template-resolver.documentEditor.placeholder");
|
|
283
294
|
const imageLabel = t("template-resolver.documentEditor.image");
|
|
284
295
|
const imageBlockLabel = t("template-resolver.documentEditor.imageBlock");
|
|
285
296
|
const pageBreakLabel = t("template-resolver.documentEditor.pageBreak");
|
|
286
297
|
const buttonLabel = t("template-resolver.documentEditor.button");
|
|
287
298
|
const stepsLabel = t("template-resolver.documentEditor.steps");
|
|
299
|
+
const imagesLabel = t("template-resolver.documentEditor.images");
|
|
288
300
|
const stableLabels = useStableByKey(variableLabels, JSON.stringify(variableLabels));
|
|
289
301
|
const stableSystem = useStableByKey(systemVariables, systemVariables.join("\n"));
|
|
290
302
|
const stablePreviews = useStableByKey(resourcePreviews, previewsKey(resourcePreviews));
|
|
@@ -294,6 +306,7 @@ export default function DocumentTiptapEditor({ id, value, onChange, variables, r
|
|
|
294
306
|
pageBreak: pageBreakLabel,
|
|
295
307
|
button: buttonLabel,
|
|
296
308
|
steps: stepsLabel,
|
|
309
|
+
images: imagesLabel,
|
|
297
310
|
imageBlock: imageBlockLabel,
|
|
298
311
|
variableLabels: stableLabels,
|
|
299
312
|
systemVariables: stableSystem,
|
|
@@ -306,6 +319,7 @@ export default function DocumentTiptapEditor({ id, value, onChange, variables, r
|
|
|
306
319
|
pageBreakLabel,
|
|
307
320
|
buttonLabel,
|
|
308
321
|
stepsLabel,
|
|
322
|
+
imagesLabel,
|
|
309
323
|
stableLabels,
|
|
310
324
|
stableSystem,
|
|
311
325
|
stablePreviews,
|
|
@@ -415,6 +429,7 @@ export default function DocumentTiptapEditor({ id, value, onChange, variables, r
|
|
|
415
429
|
pageBreak: { label: pageBreakLabel, icon: _jsx(Scissors, { size: 16 }) },
|
|
416
430
|
align: { label: t("template-resolver.documentEditor.align"), icon: _jsx(AlignLeft, { size: 16 }) },
|
|
417
431
|
steps: { label: stepsLabel, icon: _jsx(ListChecks, { size: 16 }) },
|
|
432
|
+
images: { label: imagesLabel, icon: _jsx(GalleryThumbnails, { size: 16 }) },
|
|
418
433
|
};
|
|
419
434
|
const repeatTable = activeState?.repeatTable ?? null;
|
|
420
435
|
const repeatListLabel = repeatTable !== null && repeatTable.lists.length === 1
|
|
@@ -507,7 +522,7 @@ export default function DocumentTiptapEditor({ id, value, onChange, variables, r
|
|
|
507
522
|
: t("template-resolver.documentEditor.buttonTarget"), ": ", selectedBlock.type === "button" ? (_jsx("strong", { children: buttonTargetLabel(selectedBlock.detail, variableLabels) })) : (_jsx("code", { children: selectedBlock.detail }))] }), _jsx(Button, { type: "button", size: "sm", variant: "danger-ghost", onClick: () => {
|
|
508
523
|
editor.chain().focus().deleteNode(selectedBlock.type).run();
|
|
509
524
|
}, children: t("template-resolver.documentEditor.removeBlock") })] })) : (repeatTable !== null && (_jsxs("div", { "data-testid": "document-repeat-bar", className: BUBBLE_BAR_CLASS, children: [_jsx("span", { className: "px-1.5 text-[10px] uppercase tracking-wide text-muted-foreground", children: repeatBarLabel }), _jsx(Button, { type: "button", variant: "secondary", size: "sm", pressed: repeatTable.headerRepeats, onClick: () => toggleRepeatHeader(editor), children: t("template-resolver.documentEditor.repeatHeader") })] }))) }, mountKeyOf(editor)));
|
|
510
|
-
const insertPanel = openPanel !== null && !readOnly && (_jsx(InsertPanel, { editor: editor, editorId: id, kind: openPanel, variables: variables, variableLabels: stableLabels, onClose: () => setOpenPanel(null) }, openPanel));
|
|
525
|
+
const insertPanel = openPanel !== null && !readOnly && (_jsx(InsertPanel, { editor: editor, editorId: id, kind: openPanel, variables: openPanel === "images" ? imageVariables : variables, variableLabels: stableLabels, onClose: () => setOpenPanel(null) }, openPanel));
|
|
511
526
|
if (hosted) {
|
|
512
527
|
return (_jsxs(_Fragment, { children: [toolbarHost !== null &&
|
|
513
528
|
createPortal(_jsxs(_Fragment, { children: [toolbarBar, insertPanel] }), toolbarHost), !readOnly && bubbleMenu, editorContent] }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ContentEditorProps } from "@cosmicdrift/kumiko-renderer";
|
|
2
2
|
import type { ReactNode } from "react";
|
|
3
|
-
import type { DocumentToolbarBlock } from "
|
|
3
|
+
import type { DocumentToolbarBlock } from "./document-blocks.ts";
|
|
4
4
|
/** Imperative access for an outside panel (placeholder list, resource list). */
|
|
5
5
|
export type DocumentEditorHandle = {
|
|
6
6
|
readonly insertPlaceholder: (name: string) => void;
|
|
@@ -17,6 +17,8 @@ export type DocumentResourcePreview = {
|
|
|
17
17
|
export type DocumentEditorChrome = "default" | "canvas";
|
|
18
18
|
export type DocumentEditorProps = ContentEditorProps & {
|
|
19
19
|
readonly blocks?: readonly DocumentToolbarBlock[];
|
|
20
|
+
/** Names of the template's images variables; the photo block offers exactly these and is hidden without any. */
|
|
21
|
+
readonly imageVariables?: readonly string[];
|
|
20
22
|
/** Display label per variable name, as inserted (list item fields use the
|
|
21
23
|
* dotted form, e.g. "lines.description"). A chip shows label and name. */
|
|
22
24
|
readonly variableLabels?: Readonly<Record<string, string>>;
|
|
@@ -35,4 +37,4 @@ export type DocumentEditorProps = ContentEditorProps & {
|
|
|
35
37
|
/** Called with the handle once the editor exists and with null when it is destroyed (unmount or rebuild), so a held handle never outlives its editor. */
|
|
36
38
|
readonly onEditorReady?: (handle: DocumentEditorHandle | null) => void;
|
|
37
39
|
};
|
|
38
|
-
export { type DocumentToolbarBlock, documentBlocksForKind, MAIL_DOCUMENT_BLOCKS, PDF_DOCUMENT_BLOCKS, } from "
|
|
40
|
+
export { type DocumentToolbarBlock, documentBlocksForKind, MAIL_DOCUMENT_BLOCKS, PDF_DOCUMENT_BLOCKS, } from "./document-blocks.ts";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { documentBlocksForKind, MAIL_DOCUMENT_BLOCKS, PDF_DOCUMENT_BLOCKS, } from "
|
|
1
|
+
export { documentBlocksForKind, MAIL_DOCUMENT_BLOCKS, PDF_DOCUMENT_BLOCKS, } from "./document-blocks.js";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// @runtime client
|
|
2
1
|
// Default translation bundle for the text-block editor. textBlocksClient()
|
|
3
2
|
// hangs it into the LocaleProvider as a fallback bundle — apps override
|
|
4
3
|
// individual keys via mergeTranslations at the createKumikoApp level.
|
|
@@ -39,6 +38,8 @@ export const defaultTranslations = {
|
|
|
39
38
|
"template-resolver.documentEditor.removeLink": "Remove link",
|
|
40
39
|
"template-resolver.documentEditor.repeat": "Repeat",
|
|
41
40
|
"template-resolver.documentEditor.repeatList": "List to repeat",
|
|
41
|
+
"template-resolver.documentEditor.images": "Photos",
|
|
42
|
+
"template-resolver.documentEditor.imagesVariable": "Photos from",
|
|
42
43
|
"template-resolver.documentEditor.steps": "Steps",
|
|
43
44
|
"template-resolver.documentEditor.stepsVariable": "Current step from",
|
|
44
45
|
"template-resolver.documentEditor.stepsList": "Steps, separated by commas (value=label)",
|
|
@@ -52,6 +53,7 @@ export const defaultTranslations = {
|
|
|
52
53
|
"template-resolver.editor.saving": "Saving…",
|
|
53
54
|
"template-resolver.editor.created": "Created.",
|
|
54
55
|
"template-resolver.editor.saved": "Saved.",
|
|
56
|
+
"templateResolver.errors.document.imagesBlockPdfOnly": "Photo blocks are only allowed in PDF documents.",
|
|
55
57
|
"templateResolver.errors.document.buttonHrefNotPlaceholder": "The button target “{detail}” must be a placeholder.",
|
|
56
58
|
"templateResolver.errors.document.disallowedLinkHref": "Link target “{detail}” is not allowed; use https, http, mailto, tel or a placeholder.",
|
|
57
59
|
"templateResolver.errors.document.documentRequiresHtmlFormat": "This template kind requires the html format, got “{detail}”.",
|
|
@@ -91,6 +93,8 @@ export const defaultTranslations = {
|
|
|
91
93
|
"templateResolver.errors.noSystemTemplate": "There is no active system template to reset to.",
|
|
92
94
|
"templateResolver.errors.noDraft": "There is no draft to discard.",
|
|
93
95
|
"templateResolver.errors.systemOnlyTemplate": "Only the platform maintains this template; it cannot be overridden per tenant.",
|
|
96
|
+
"templateResolver.errors.templateNotTenantEditable": "Only the platform may edit this template.",
|
|
97
|
+
"templateResolver.overview.lockedOverride": "Own version stored but not delivered: the template is not unlocked for tenants.",
|
|
94
98
|
"templateResolver.errors.template.invalidMeta": "The template settings are invalid.",
|
|
95
99
|
"templateResolver.errors.template.meta.subject.required": "The subject is missing.",
|
|
96
100
|
"templateResolver.errors.template.meta.subject.invalid": "The subject is invalid (at most 200 characters, no line breaks).",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { MAIL_TONES, type MailTone } from "../mail-constants.ts";
|
|
2
|
-
export { PDF_DEFAULT_MARGIN_MM, PDF_FOOTER_MARGIN_MM, PDF_HEADER_MARGIN_MM, PDF_ORIENTATIONS, PDF_PAGE_FORMATS, } from "../pdf-constants.ts";
|
|
3
|
-
export { TemplateResolverErrors, TemplateResolverHandlers, TemplateResolverQueries, } from "../qualified-names.ts";
|
|
4
1
|
export { textBlocksClient } from "./client-plugin.tsx";
|
|
5
2
|
export { DocumentContentEditor } from "./document-editor.tsx";
|
|
6
3
|
export { type DocumentEditorChrome, type DocumentEditorHandle, type DocumentEditorProps, type DocumentResourcePreview, type DocumentToolbarBlock, MAIL_DOCUMENT_BLOCKS, PDF_DOCUMENT_BLOCKS, } from "./document-toolbar-blocks.ts";
|
|
4
|
+
export { MAIL_TONES, type MailTone } from "./mail-constants.ts";
|
|
5
|
+
export { PDF_DEFAULT_MARGIN_MM, PDF_FOOTER_MARGIN_MM, PDF_HEADER_MARGIN_MM, PDF_ORIENTATIONS, PDF_PAGE_FORMATS, } from "./pdf-constants.ts";
|
|
7
6
|
export { PlaceholderLineEditor, type PlaceholderLineEditorProps, } from "./placeholder-line-editor-lazy.tsx";
|
|
7
|
+
export { TemplateResolverErrors, TemplateResolverHandlers, TemplateResolverQueries, } from "./qualified-names.ts";
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
// @runtime client
|
|
2
1
|
// Public exports for the browser side of template-resolver. Consumed through
|
|
3
2
|
// the sub-path export `@cosmicdrift/kumiko-bundled-features/template-resolver/web`
|
|
4
3
|
// — the server side (defineFeature) lives in
|
|
5
4
|
// `@cosmicdrift/kumiko-bundled-features/template-resolver` and has no React or
|
|
6
5
|
// DOM deps.
|
|
7
|
-
export { MAIL_TONES } from "../mail-constants.js";
|
|
8
|
-
export { PDF_DEFAULT_MARGIN_MM, PDF_FOOTER_MARGIN_MM, PDF_HEADER_MARGIN_MM, PDF_ORIENTATIONS, PDF_PAGE_FORMATS, } from "../pdf-constants.js";
|
|
9
|
-
export { TemplateResolverErrors, TemplateResolverHandlers, TemplateResolverQueries, } from "../qualified-names.js";
|
|
10
6
|
export { textBlocksClient } from "./client-plugin.js";
|
|
11
7
|
export { DocumentContentEditor } from "./document-editor.js";
|
|
12
8
|
export { MAIL_DOCUMENT_BLOCKS, PDF_DOCUMENT_BLOCKS, } from "./document-toolbar-blocks.js";
|
|
9
|
+
export { MAIL_TONES } from "./mail-constants.js";
|
|
10
|
+
export { PDF_DEFAULT_MARGIN_MM, PDF_FOOTER_MARGIN_MM, PDF_HEADER_MARGIN_MM, PDF_ORIENTATIONS, PDF_PAGE_FORMATS, } from "./pdf-constants.js";
|
|
13
11
|
export { PlaceholderLineEditor, } from "./placeholder-line-editor-lazy.js";
|
|
12
|
+
export { TemplateResolverErrors, TemplateResolverHandlers, TemplateResolverQueries, } from "./qualified-names.js";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// @runtime client
|
|
3
2
|
//
|
|
4
3
|
// Single-line editor for plain-text fields that carry {{placeholders}}
|
|
5
4
|
// (subject, preheader). The stored value stays plain text; placeholders show
|
|
@@ -10,10 +9,10 @@ import { Placeholder, UndoRedo } from "@tiptap/extensions";
|
|
|
10
9
|
import { EditorContent, useEditor } from "@tiptap/react";
|
|
11
10
|
import StarterKit from "@tiptap/starter-kit";
|
|
12
11
|
import { useMemo, useState } from "react";
|
|
13
|
-
import { DocumentVariable } from "../document-schema.js";
|
|
14
|
-
import { contentToLine, lineToContent, singleLine } from "../placeholder-text.js";
|
|
15
12
|
import { createVariableView } from "./document-editor-extensions.js";
|
|
13
|
+
import { DocumentVariable } from "./document-schema.js";
|
|
16
14
|
import { createEditorHandle } from "./editor-handle.js";
|
|
15
|
+
import { contentToLine, lineToContent, singleLine } from "./placeholder-text.js";
|
|
17
16
|
import { useStableByKey } from "./use-stable-by-key.js";
|
|
18
17
|
const LineDocument = Node.create({ name: "doc", topNode: true, content: "paragraph" });
|
|
19
18
|
// One line only: Enter must not split the paragraph.
|
|
@@ -75,7 +74,10 @@ function LineEditorBody({ id, initialValue, onChange, variableLabels, systemVari
|
|
|
75
74
|
onDestroy: () => onEditorReady?.(null),
|
|
76
75
|
onUpdate: ({ editor: e }) => onChange(contentToLine(e.getJSON().content?.[0]?.content)),
|
|
77
76
|
});
|
|
78
|
-
return (_jsx(EditorContent, { editor: editor, className: cn("flex items-center bg-transparent text-base md:text-sm", flat ? "min-h-10" : "min-h-9 rounded-md border border-input px-3", "[&_.ProseMirror]:w-full [&_.ProseMirror]:whitespace-nowrap [&_.ProseMirror]:outline-none", "[&_p]:m-0",
|
|
77
|
+
return (_jsx(EditorContent, { editor: editor, className: cn("flex items-center bg-transparent text-base md:text-sm", flat ? "min-h-10" : "min-h-9 rounded-md border border-input px-3", "[&_.ProseMirror]:w-full [&_.ProseMirror]:whitespace-nowrap [&_.ProseMirror]:outline-none", "[&_p]:m-0",
|
|
78
|
+
// Absolute and truncated: a hint longer than the field ends in an ellipsis instead of
|
|
79
|
+
// running past the frame or over the text below it.
|
|
80
|
+
"[&_.is-editor-empty]:relative [&_.is-editor-empty]:before:pointer-events-none [&_.is-editor-empty]:before:absolute [&_.is-editor-empty]:before:inset-x-0 [&_.is-editor-empty]:before:truncate [&_.is-editor-empty]:before:text-muted-foreground [&_.is-editor-empty]:before:content-[attr(data-placeholder)]", readOnly && "opacity-60") }));
|
|
79
81
|
}
|
|
80
82
|
export default function PlaceholderLineEditor({ id, value, onChange, variableLabels = NO_LABELS, systemVariables = NO_NAMES, readOnly = false, flat = false, placeholder, onEditorReady, "aria-label": ariaLabel, }) {
|
|
81
83
|
const stableLabels = useStableByKey(variableLabels, JSON.stringify(variableLabels));
|
|
@@ -31,6 +31,7 @@ export declare const TemplateResolverQueries: {
|
|
|
31
31
|
readonly preview: "template-resolver:query:preview";
|
|
32
32
|
readonly documentBlocks: "template-resolver:query:document-blocks";
|
|
33
33
|
readonly exportBundle: "template-resolver:query:export-bundle";
|
|
34
|
+
readonly sendTestStatus: "template-resolver:query:send-test-status";
|
|
34
35
|
readonly bySlug: "template-resolver:query:by-slug";
|
|
35
36
|
readonly byTenant: "template-resolver:query:by-tenant";
|
|
36
37
|
};
|
|
@@ -47,6 +48,7 @@ export declare const TemplateResolverErrors: {
|
|
|
47
48
|
readonly targetExists: "target_exists";
|
|
48
49
|
readonly systemResourcesNeedSystemTenant: "system_resources_need_system_tenant";
|
|
49
50
|
readonly systemOnlyTemplate: "system_only_template";
|
|
51
|
+
readonly templateNotTenantEditable: "template_not_tenant_editable";
|
|
50
52
|
readonly bundleLocalesDiffer: "bundle_locales_differ";
|
|
51
53
|
readonly resourceTooLarge: "template_resource_too_large";
|
|
52
54
|
readonly resourceUnsupportedImage: "template_resource_unsupported_image";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// @runtime client
|
|
2
1
|
// Feature name + qualified handler/query names (QN: scope:type:name).
|
|
3
2
|
export const TEMPLATE_RESOLVER_FEATURE = "template-resolver";
|
|
4
3
|
export const TemplateResolverHandlers = {
|
|
@@ -33,6 +32,7 @@ export const TemplateResolverQueries = {
|
|
|
33
32
|
preview: "template-resolver:query:preview",
|
|
34
33
|
documentBlocks: "template-resolver:query:document-blocks",
|
|
35
34
|
exportBundle: "template-resolver:query:export-bundle",
|
|
35
|
+
sendTestStatus: "template-resolver:query:send-test-status",
|
|
36
36
|
// Public pair — anonymous-reachable, kind pinned to text-block.
|
|
37
37
|
bySlug: "template-resolver:query:by-slug",
|
|
38
38
|
byTenant: "template-resolver:query:by-tenant",
|
|
@@ -58,6 +58,7 @@ export const TemplateResolverErrors = {
|
|
|
58
58
|
targetExists: "target_exists",
|
|
59
59
|
systemResourcesNeedSystemTenant: "system_resources_need_system_tenant",
|
|
60
60
|
systemOnlyTemplate: "system_only_template",
|
|
61
|
+
templateNotTenantEditable: "template_not_tenant_editable",
|
|
61
62
|
bundleLocalesDiffer: "bundle_locales_differ",
|
|
62
63
|
resourceTooLarge: "template_resource_too_large",
|
|
63
64
|
resourceUnsupportedImage: "template_resource_unsupported_image",
|
|
@@ -2,9 +2,9 @@ import { createEventStoreExecutor, fetchOne } from "@cosmicdrift/kumiko-framewor
|
|
|
2
2
|
import { defineWriteHandler, SYSTEM_ROLE, SYSTEM_USER_ID, } from "@cosmicdrift/kumiko-framework/engine";
|
|
3
3
|
import { AccessDeniedError, ConflictError, InternalError, writeFailure, } from "@cosmicdrift/kumiko-framework/errors";
|
|
4
4
|
import * as z from "zod";
|
|
5
|
-
import { TenantErrors } from "../constants.js";
|
|
6
5
|
import { findForbiddenMembershipRole, reservedMembershipRoleError } from "../membership-roles.js";
|
|
7
6
|
import { tenantMembershipEntity, tenantMembershipsTable } from "../membership-table.js";
|
|
7
|
+
import { TenantErrors } from "../web/constants.js";
|
|
8
8
|
const executor = createEventStoreExecutor(tenantMembershipsTable, tenantMembershipEntity, {
|
|
9
9
|
entityName: "tenant-membership",
|
|
10
10
|
});
|
package/dist/tenant/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { cancelPendingInvitation } from "./cancel-pending-invitation.ts";
|
|
2
2
|
export { TenantCommandSchemas } from "./command-schemas.ts";
|
|
3
|
-
export { OWNER_INVITE_ROLE_OPTIONS, TENANT_FEATURE, TenantErrors, TenantHandlers, TenantQueries, } from "./constants.ts";
|
|
4
3
|
export { decryptTenantNames } from "./decrypt-tenant-names.ts";
|
|
5
4
|
export { collectAssignableAppRoles, createTenantFeature } from "./feature.ts";
|
|
6
5
|
export type { InvitationStatus } from "./invitation-table.ts";
|
|
@@ -8,3 +7,4 @@ export { INVITATION_STATUS, INVITATION_STATUSES, tenantInvitationEntity, tenantI
|
|
|
8
7
|
export { isTenantServingPublicContent } from "./is-tenant-serving-public-content.ts";
|
|
9
8
|
export { tenantMembershipEntity, tenantMembershipsTable } from "./membership-table.ts";
|
|
10
9
|
export { TENANT_LIFECYCLE_STATUSES, type TenantLifecycleStatus, tenantEntity, tenantTable, } from "./schema/tenant.ts";
|
|
10
|
+
export { OWNER_INVITE_ROLE_OPTIONS, TENANT_FEATURE, TenantErrors, TenantHandlers, TenantQueries, } from "./web/constants.ts";
|
package/dist/tenant/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { cancelPendingInvitation } from "./cancel-pending-invitation.js";
|
|
2
2
|
export { TenantCommandSchemas } from "./command-schemas.js";
|
|
3
|
-
export { OWNER_INVITE_ROLE_OPTIONS, TENANT_FEATURE, TenantErrors, TenantHandlers, TenantQueries, } from "./constants.js";
|
|
4
3
|
export { decryptTenantNames } from "./decrypt-tenant-names.js";
|
|
5
4
|
export { collectAssignableAppRoles, createTenantFeature } from "./feature.js";
|
|
6
5
|
export { INVITATION_STATUS, INVITATION_STATUSES, tenantInvitationEntity, tenantInvitationsTable, } from "./invitation-table.js";
|
|
7
6
|
export { isTenantServingPublicContent } from "./is-tenant-serving-public-content.js";
|
|
8
7
|
export { tenantMembershipEntity, tenantMembershipsTable } from "./membership-table.js";
|
|
9
8
|
export { TENANT_LIFECYCLE_STATUSES, tenantEntity, tenantTable, } from "./schema/tenant.js";
|
|
9
|
+
export { OWNER_INVITE_ROLE_OPTIONS, TENANT_FEATURE, TenantErrors, TenantHandlers, TenantQueries, } from "./web/constants.js";
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
import { buildEntityTable } from "@cosmicdrift/kumiko-framework/db";
|
|
25
25
|
import { createEntity, createMultiSelectField, createNumberField, createSelectField, createTextField, createTimestampField, } from "@cosmicdrift/kumiko-framework/engine";
|
|
26
26
|
// kumiko-lint-ignore cross-feature-import global-role options are owned by the user feature
|
|
27
|
-
import { GLOBAL_ROLE_OPTIONS } from "../user/constants.js";
|
|
27
|
+
import { GLOBAL_ROLE_OPTIONS } from "../user/web/constants.js";
|
|
28
28
|
// Status-const-Object damit Handler-Code keine Magic-Strings nutzt.
|
|
29
29
|
// Bei rename (z.B. "cancelled" → "revoked") fällt jeder caller auf
|
|
30
30
|
// einmal auf statt verstreut über 5 Stellen.
|
|
@@ -3,10 +3,10 @@ import { createSystemUser } from "@cosmicdrift/kumiko-framework/engine";
|
|
|
3
3
|
import { ConflictError, writeFailure } from "@cosmicdrift/kumiko-framework/errors";
|
|
4
4
|
import { parseRoles } from "@cosmicdrift/kumiko-framework/utils";
|
|
5
5
|
import { Temporal } from "@cosmicdrift/kumiko-types/temporal";
|
|
6
|
-
import { TenantErrors } from "./constants.js";
|
|
7
6
|
import { findForbiddenMembershipRole, reservedMembershipRoleError } from "./membership-roles.js";
|
|
8
7
|
import { tenantMembershipEntity, tenantMembershipsTable } from "./membership-table.js";
|
|
9
8
|
import { seedTenantMembership } from "./seeding.js";
|
|
9
|
+
import { TenantErrors } from "./web/constants.js";
|
|
10
10
|
const membershipExecutor = createEventStoreExecutor(tenantMembershipsTable, tenantMembershipEntity, { entityName: "tenant-membership" });
|
|
11
11
|
const MEMBERSHIP_CREATED_VERSION = 1;
|
|
12
12
|
// 0 = the user has no membership in the tenant yet.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { acquireNamespacedAdvisoryLock, selectMany } from "@cosmicdrift/kumiko-framework/db";
|
|
2
2
|
import { ConflictError, writeFailure } from "@cosmicdrift/kumiko-framework/errors";
|
|
3
3
|
import { parseRoles } from "@cosmicdrift/kumiko-framework/utils";
|
|
4
|
-
import { TenantErrors } from "./constants.js";
|
|
5
4
|
import { tenantMembershipsTable } from "./membership-table.js";
|
|
5
|
+
import { TenantErrors } from "./web/constants.js";
|
|
6
6
|
// Serializes last-TenantAdmin demotion/removal checks per tenant inside the write TX
|
|
7
7
|
// (dispatcher batch wraps handlers in transaction — xact lock holds through update).
|
|
8
8
|
export const LAST_TENANT_ADMIN_LOCK_NAMESPACE = 0x7461646d; // 'tadm'
|
package/dist/tenant/screens.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AuthHandlers } from "@cosmicdrift/kumiko-bundled-features/auth-email-password/constants";
|
|
2
2
|
import { access, i18nKey, isAssignableByRole, } from "@cosmicdrift/kumiko-framework/engine";
|
|
3
|
-
import { DEFAULT_INVITE_ROLE_OPTIONS, INVITE_CREATE_SCREEN_ID, MEMBER_ROLES_CELL_COMPONENT, MEMBER_ROLES_EDIT_SCREEN_ID, MEMBER_STATUS_CELL_COMPONENT, MEMBERS_SCREEN_ID, TenantHandlers, TenantQueries, } from "./constants.js";
|
|
4
3
|
import { memberRoleOptions } from "./member-role-options.js";
|
|
4
|
+
import { DEFAULT_INVITE_ROLE_OPTIONS, INVITE_CREATE_SCREEN_ID, MEMBER_ROLES_CELL_COMPONENT, MEMBER_ROLES_EDIT_SCREEN_ID, MEMBER_STATUS_CELL_COMPONENT, MEMBERS_SCREEN_ID, TenantHandlers, TenantQueries, } from "./web/constants.js";
|
|
5
5
|
// Cross-tenant SystemAdmin platform view of the tenants themselves. The tenant
|
|
6
6
|
// feature runs with `r.systemScope()`, so the entityList returns every tenant.
|
|
7
7
|
// Both screens are SystemAdmin-gated and inert until an app navs them.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
// @runtime client
|
|
2
1
|
import { mergeTranslations } from "@cosmicdrift/kumiko-renderer";
|
|
3
|
-
import { MEMBER_ROLES_CELL_COMPONENT, MEMBER_STATUS_CELL_COMPONENT, TENANT_FEATURE, } from "
|
|
2
|
+
import { MEMBER_ROLES_CELL_COMPONENT, MEMBER_STATUS_CELL_COMPONENT, TENANT_FEATURE, } from "./constants.js";
|
|
4
3
|
import { MemberRolesCell } from "./member-roles-cell.js";
|
|
5
4
|
import { MemberStatusCell } from "./member-status-cell.js";
|
|
6
5
|
export function tenantClient(options) {
|