@antelopejs/dms-saas 0.3.15 → 0.5.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/README.md +61 -14
- package/dist/auth/index.d.ts +1 -0
- package/dist/auth/index.js +1 -0
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/owner-only-permissions-resolver.d.ts +1 -0
- package/dist/auth/owner-only-permissions-resolver.js +25 -0
- package/dist/auth/owner-only-permissions-resolver.js.map +1 -0
- package/dist/billing-state/directory-hooks.d.ts +1 -0
- package/dist/billing-state/directory-hooks.js +35 -0
- package/dist/billing-state/directory-hooks.js.map +1 -0
- package/dist/billing-state/directory.d.ts +29 -0
- package/dist/billing-state/directory.js +152 -0
- package/dist/billing-state/directory.js.map +1 -0
- package/dist/billing-state/index.d.ts +5 -1
- package/dist/billing-state/index.js +14 -2
- package/dist/billing-state/index.js.map +1 -1
- package/dist/billing-state/past-due-banner.d.ts +4 -3
- package/dist/billing-state/past-due-banner.js +30 -10
- package/dist/billing-state/past-due-banner.js.map +1 -1
- package/dist/billing-state/recovery.d.ts +4 -0
- package/dist/billing-state/recovery.js +7 -5
- package/dist/billing-state/recovery.js.map +1 -1
- package/dist/billing-state/trial-ending-banner.d.ts +4 -0
- package/dist/billing-state/trial-ending-banner.js +66 -0
- package/dist/billing-state/trial-ending-banner.js.map +1 -0
- package/dist/config/runtime.d.ts +1 -0
- package/dist/config/runtime.js +5 -0
- package/dist/config/runtime.js.map +1 -1
- package/dist/crons/auto-suspend-past-due.js +4 -5
- package/dist/crons/auto-suspend-past-due.js.map +1 -1
- package/dist/data-api/platformOwner/admin-user-invoices.d.ts +6 -4
- package/dist/data-api/platformOwner/admin-user-invoices.js +52 -30
- package/dist/data-api/platformOwner/admin-user-invoices.js.map +1 -1
- package/dist/data-api/platformOwner/admin-user-workspaces.d.ts +2 -0
- package/dist/data-api/platformOwner/admin-user-workspaces.js +69 -3
- package/dist/data-api/platformOwner/admin-user-workspaces.js.map +1 -1
- package/dist/data-api/platformOwner/credit-note-rows.d.ts +11 -0
- package/dist/data-api/platformOwner/credit-note-rows.js +54 -0
- package/dist/data-api/platformOwner/credit-note-rows.js.map +1 -0
- package/dist/data-api/platformOwner/credit-notes.d.ts +13 -0
- package/dist/data-api/platformOwner/credit-notes.js +149 -10
- package/dist/data-api/platformOwner/credit-notes.js.map +1 -1
- package/dist/data-api/platformOwner/features.d.ts +8 -2
- package/dist/data-api/platformOwner/features.js +155 -35
- package/dist/data-api/platformOwner/features.js.map +1 -1
- package/dist/data-api/platformOwner/invitations.js +29 -9
- package/dist/data-api/platformOwner/invitations.js.map +1 -1
- package/dist/data-api/platformOwner/invoice-cells.d.ts +5 -0
- package/dist/data-api/platformOwner/invoice-cells.js +51 -0
- package/dist/data-api/platformOwner/invoice-cells.js.map +1 -0
- package/dist/data-api/platformOwner/invoice-options.js.map +1 -1
- package/dist/data-api/platformOwner/invoice-rows.d.ts +9 -0
- package/dist/data-api/platformOwner/invoice-rows.js +39 -0
- package/dist/data-api/platformOwner/invoice-rows.js.map +1 -0
- package/dist/data-api/platformOwner/invoices.d.ts +24 -6
- package/dist/data-api/platformOwner/invoices.js +192 -11
- package/dist/data-api/platformOwner/invoices.js.map +1 -1
- package/dist/data-api/platformOwner/members.d.ts +2 -1
- package/dist/data-api/platformOwner/members.js +56 -20
- package/dist/data-api/platformOwner/members.js.map +1 -1
- package/dist/data-api/platformOwner/plan-migrations.d.ts +14 -2
- package/dist/data-api/platformOwner/plan-migrations.js +179 -33
- package/dist/data-api/platformOwner/plan-migrations.js.map +1 -1
- package/dist/data-api/platformOwner/plans.d.ts +30 -6
- package/dist/data-api/platformOwner/plans.js +269 -44
- package/dist/data-api/platformOwner/plans.js.map +1 -1
- package/dist/data-api/platformOwner/segments.d.ts +9 -7
- package/dist/data-api/platformOwner/segments.js +108 -101
- package/dist/data-api/platformOwner/segments.js.map +1 -1
- package/dist/data-api/platformOwner/table-scope.d.ts +6 -0
- package/dist/data-api/platformOwner/table-scope.js +8 -0
- package/dist/data-api/platformOwner/table-scope.js.map +1 -0
- package/dist/data-api/platformOwner/users.d.ts +15 -2
- package/dist/data-api/platformOwner/users.js +171 -15
- package/dist/data-api/platformOwner/users.js.map +1 -1
- package/dist/data-api/platformOwner/workspace-cells.d.ts +12 -0
- package/dist/data-api/platformOwner/workspace-cells.js +90 -0
- package/dist/data-api/platformOwner/workspace-cells.js.map +1 -0
- package/dist/data-api/platformOwner/workspaces.d.ts +26 -4
- package/dist/data-api/platformOwner/workspaces.js +269 -97
- package/dist/data-api/platformOwner/workspaces.js.map +1 -1
- package/dist/data-api/tenant/tenant-invoices.d.ts +4 -0
- package/dist/data-api/tenant/tenant-invoices.js +68 -4
- package/dist/data-api/tenant/tenant-invoices.js.map +1 -1
- package/dist/hooks/register.js +5 -1
- package/dist/hooks/register.js.map +1 -1
- package/dist/i18n/composed-text.d.ts +17 -0
- package/dist/i18n/composed-text.js +71 -0
- package/dist/i18n/composed-text.js.map +1 -0
- package/dist/implementations/dms-saas/billing.d.ts +1 -0
- package/dist/implementations/dms-saas/billing.js +4 -1
- package/dist/implementations/dms-saas/billing.js.map +1 -1
- package/dist/implementations/dms-saas/pages.d.ts +0 -1
- package/dist/implementations/dms-saas/pages.js +0 -4
- package/dist/implementations/dms-saas/pages.js.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/metrics/activity-sources.d.ts +2 -0
- package/dist/metrics/activity-sources.js +60 -0
- package/dist/metrics/activity-sources.js.map +1 -0
- package/dist/metrics/activity.d.ts +25 -0
- package/dist/metrics/activity.js +197 -0
- package/dist/metrics/activity.js.map +1 -0
- package/dist/metrics/directory-summary.d.ts +30 -0
- package/dist/metrics/directory-summary.js +95 -0
- package/dist/metrics/directory-summary.js.map +1 -0
- package/dist/metrics/headline-items.d.ts +32 -0
- package/dist/metrics/headline-items.js +242 -0
- package/dist/metrics/headline-items.js.map +1 -0
- package/dist/metrics/normalised-mrr.d.ts +32 -0
- package/dist/metrics/normalised-mrr.js +75 -0
- package/dist/metrics/normalised-mrr.js.map +1 -0
- package/dist/metrics/revenue.d.ts +30 -0
- package/dist/metrics/revenue.js +126 -0
- package/dist/metrics/revenue.js.map +1 -0
- package/dist/notifications/recipients.d.ts +1 -0
- package/dist/notifications/recipients.js +4 -0
- package/dist/notifications/recipients.js.map +1 -1
- package/dist/notifications/subjects.d.ts +18 -17
- package/dist/notifications/subjects.js +7 -1
- package/dist/notifications/subjects.js.map +1 -1
- package/dist/operator-actions/commands.js +9 -6
- package/dist/operator-actions/commands.js.map +1 -1
- package/dist/operator-actions/invitation-commands.d.ts +7 -1
- package/dist/operator-actions/invitation-commands.js +16 -0
- package/dist/operator-actions/invitation-commands.js.map +1 -1
- package/dist/operator-actions/previews.d.ts +50 -0
- package/dist/operator-actions/previews.js +113 -0
- package/dist/operator-actions/previews.js.map +1 -0
- package/dist/operator-actions/types.d.ts +1 -1
- package/dist/operator-actions/upgrade-preview.d.ts +35 -0
- package/dist/operator-actions/upgrade-preview.js +110 -0
- package/dist/operator-actions/upgrade-preview.js.map +1 -0
- package/dist/operator-billing/billing-rules.d.ts +58 -0
- package/dist/operator-billing/billing-rules.js +90 -0
- package/dist/operator-billing/billing-rules.js.map +1 -0
- package/dist/operator-billing/billing-settings-store.d.ts +3 -0
- package/dist/operator-billing/billing-settings-store.js +34 -0
- package/dist/operator-billing/billing-settings-store.js.map +1 -0
- package/dist/operator-billing/billing-stats.d.ts +37 -0
- package/dist/operator-billing/billing-stats.js +197 -0
- package/dist/operator-billing/billing-stats.js.map +1 -0
- package/dist/operator-billing/credit-allowance.d.ts +17 -0
- package/dist/operator-billing/credit-allowance.js +44 -0
- package/dist/operator-billing/credit-allowance.js.map +1 -0
- package/dist/operator-billing/credit-note-request.d.ts +39 -0
- package/dist/operator-billing/credit-note-request.js +73 -0
- package/dist/operator-billing/credit-note-request.js.map +1 -0
- package/dist/operator-billing/index.d.ts +8 -0
- package/dist/operator-billing/index.js +25 -0
- package/dist/operator-billing/index.js.map +1 -0
- package/dist/operator-billing/invoice-credit.d.ts +41 -0
- package/dist/operator-billing/invoice-credit.js +111 -0
- package/dist/operator-billing/invoice-credit.js.map +1 -0
- package/dist/operator-billing/legal-documents-store.d.ts +12 -0
- package/dist/operator-billing/legal-documents-store.js +46 -0
- package/dist/operator-billing/legal-documents-store.js.map +1 -0
- package/dist/operator-billing/legal-versions.d.ts +5 -0
- package/dist/operator-billing/legal-versions.js +31 -0
- package/dist/operator-billing/legal-versions.js.map +1 -0
- package/dist/pages/block-meta.d.ts +15 -0
- package/dist/pages/block-meta.js +21 -0
- package/dist/pages/block-meta.js.map +1 -0
- package/dist/pages/module.d.ts +1 -3
- package/dist/pages/module.js +1 -8
- package/dist/pages/module.js.map +1 -1
- package/dist/pages/platform/credit-notes.d.ts +1 -0
- package/dist/pages/platform/credit-notes.js +63 -5
- package/dist/pages/platform/credit-notes.js.map +1 -1
- package/dist/pages/platform/dashboard.d.ts +4 -1
- package/dist/pages/platform/dashboard.js +123 -64
- package/dist/pages/platform/dashboard.js.map +1 -1
- package/dist/pages/platform/features.js +83 -12
- package/dist/pages/platform/features.js.map +1 -1
- package/dist/pages/platform/index.d.ts +1 -0
- package/dist/pages/platform/index.js +1 -0
- package/dist/pages/platform/index.js.map +1 -1
- package/dist/pages/platform/invoices.d.ts +6 -0
- package/dist/pages/platform/invoices.js +84 -28
- package/dist/pages/platform/invoices.js.map +1 -1
- package/dist/pages/platform/paths.d.ts +9 -0
- package/dist/pages/platform/paths.js +25 -0
- package/dist/pages/platform/paths.js.map +1 -0
- package/dist/pages/platform/plans/edit.d.ts +2 -2
- package/dist/pages/platform/plans/edit.js +170 -105
- package/dist/pages/platform/plans/edit.js.map +1 -1
- package/dist/pages/platform/plans/index.d.ts +1 -0
- package/dist/pages/platform/plans/index.js +172 -54
- package/dist/pages/platform/plans/index.js.map +1 -1
- package/dist/pages/platform/plans/migrations.d.ts +12 -0
- package/dist/pages/platform/plans/migrations.js +259 -13
- package/dist/pages/platform/plans/migrations.js.map +1 -1
- package/dist/pages/platform/segments/edit.d.ts +17 -0
- package/dist/pages/platform/segments/edit.js +124 -0
- package/dist/pages/platform/segments/edit.js.map +1 -0
- package/dist/pages/platform/segments/index.js +68 -8
- package/dist/pages/platform/segments/index.js.map +1 -1
- package/dist/pages/platform/settings.d.ts +1 -1
- package/dist/pages/platform/settings.js +164 -105
- package/dist/pages/platform/settings.js.map +1 -1
- package/dist/pages/platform/users/detail.js +104 -33
- package/dist/pages/platform/users/detail.js.map +1 -1
- package/dist/pages/platform/users/index.js +52 -18
- package/dist/pages/platform/users/index.js.map +1 -1
- package/dist/pages/platform/workspaces/detail.d.ts +3 -1
- package/dist/pages/platform/workspaces/detail.js +184 -113
- package/dist/pages/platform/workspaces/detail.js.map +1 -1
- package/dist/pages/platform/workspaces/index.d.ts +1 -20
- package/dist/pages/platform/workspaces/index.js +152 -180
- package/dist/pages/platform/workspaces/index.js.map +1 -1
- package/dist/pages/platform/workspaces/shared.d.ts +11 -0
- package/dist/pages/platform/workspaces/shared.js +53 -0
- package/dist/pages/platform/workspaces/shared.js.map +1 -0
- package/dist/pages/public/auth/no-workspace.js +7 -2
- package/dist/pages/public/auth/no-workspace.js.map +1 -1
- package/dist/pages/public/index.js.map +1 -1
- package/dist/pages/public/legal/privacy-policy.d.ts +1 -0
- package/dist/pages/public/legal/privacy-policy.js +9 -4
- package/dist/pages/public/legal/privacy-policy.js.map +1 -1
- package/dist/pages/public/legal/terms-and-conditions.d.ts +1 -0
- package/dist/pages/public/legal/terms-and-conditions.js +9 -4
- package/dist/pages/public/legal/terms-and-conditions.js.map +1 -1
- package/dist/pages/public/legal/terms-of-use.d.ts +1 -0
- package/dist/pages/public/legal/terms-of-use.js +9 -4
- package/dist/pages/public/legal/terms-of-use.js.map +1 -1
- package/dist/pages/public/nav-bar.d.ts +2 -0
- package/dist/pages/public/nav-bar.js +14 -0
- package/dist/pages/public/nav-bar.js.map +1 -0
- package/dist/pages/public/pricing.d.ts +10 -0
- package/dist/pages/public/pricing.js +32 -0
- package/dist/pages/public/pricing.js.map +1 -0
- package/dist/pages/public/register.d.ts +1 -0
- package/dist/pages/public/register.js +6 -3
- package/dist/pages/public/register.js.map +1 -1
- package/dist/pages/public/screens.js +1 -0
- package/dist/pages/public/screens.js.map +1 -1
- package/dist/pages/tenant/billing.d.ts +7 -7
- package/dist/pages/tenant/billing.js +141 -63
- package/dist/pages/tenant/billing.js.map +1 -1
- package/dist/pages/tenant/data-export.d.ts +3 -1
- package/dist/pages/tenant/data-export.js +25 -6
- package/dist/pages/tenant/data-export.js.map +1 -1
- package/dist/pages/tenant/general.d.ts +3 -2
- package/dist/pages/tenant/general.js +91 -11
- package/dist/pages/tenant/general.js.map +1 -1
- package/dist/pages/tenant/index.d.ts +1 -0
- package/dist/pages/tenant/index.js +1 -0
- package/dist/pages/tenant/index.js.map +1 -1
- package/dist/pages/tenant/members-seat-quota.d.ts +3 -0
- package/dist/pages/tenant/members-seat-quota.js +18 -6
- package/dist/pages/tenant/members-seat-quota.js.map +1 -1
- package/dist/pages/tenant/owner-only.d.ts +1 -0
- package/dist/pages/tenant/owner-only.js +14 -0
- package/dist/pages/tenant/owner-only.js.map +1 -0
- package/dist/pages/tenant/workspace-suspended.js +7 -3
- package/dist/pages/tenant/workspace-suspended.js.map +1 -1
- package/dist/plan-changes/applied-upgrade.d.ts +5 -0
- package/dist/plan-changes/applied-upgrade.js +51 -0
- package/dist/plan-changes/applied-upgrade.js.map +1 -0
- package/dist/plan-changes/deferred.js +9 -40
- package/dist/plan-changes/deferred.js.map +1 -1
- package/dist/plan-changes/immediate.d.ts +4 -0
- package/dist/plan-changes/immediate.js +34 -0
- package/dist/plan-changes/immediate.js.map +1 -0
- package/dist/plan-changes/index.d.ts +1 -0
- package/dist/plan-changes/index.js +1 -0
- package/dist/plan-changes/index.js.map +1 -1
- package/dist/plan-changes/pending-target.d.ts +17 -0
- package/dist/plan-changes/pending-target.js +62 -0
- package/dist/plan-changes/pending-target.js.map +1 -0
- package/dist/plans/catalogue-summary.d.ts +24 -0
- package/dist/plans/catalogue-summary.js +97 -0
- package/dist/plans/catalogue-summary.js.map +1 -0
- package/dist/plans/catalogue-usage.d.ts +36 -0
- package/dist/plans/catalogue-usage.js +120 -0
- package/dist/plans/catalogue-usage.js.map +1 -0
- package/dist/plans/feature-guards.d.ts +5 -0
- package/dist/plans/feature-guards.js +31 -0
- package/dist/plans/feature-guards.js.map +1 -0
- package/dist/plans/feature-usage.d.ts +4 -0
- package/dist/plans/feature-usage.js +22 -0
- package/dist/plans/feature-usage.js.map +1 -0
- package/dist/plans/migration-blocks.d.ts +13 -0
- package/dist/plans/migration-blocks.js +337 -0
- package/dist/plans/migration-blocks.js.map +1 -0
- package/dist/plans/migration-detail.d.ts +48 -0
- package/dist/plans/migration-detail.js +80 -0
- package/dist/plans/migration-detail.js.map +1 -0
- package/dist/plans/migration-dialogs.d.ts +8 -0
- package/dist/plans/migration-dialogs.js +103 -0
- package/dist/plans/migration-dialogs.js.map +1 -0
- package/dist/plans/migration-outcomes.d.ts +7 -0
- package/dist/plans/migration-outcomes.js +38 -0
- package/dist/plans/migration-outcomes.js.map +1 -0
- package/dist/plans/migration-realtime.d.ts +2 -0
- package/dist/plans/migration-realtime.js +19 -0
- package/dist/plans/migration-realtime.js.map +1 -0
- package/dist/plans/migration-workspaces.d.ts +40 -0
- package/dist/plans/migration-workspaces.js +121 -0
- package/dist/plans/migration-workspaces.js.map +1 -0
- package/dist/plans/money.d.ts +1 -0
- package/dist/plans/money.js +11 -0
- package/dist/plans/money.js.map +1 -0
- package/dist/plans/plan-access-type.d.ts +25 -0
- package/dist/plans/plan-access-type.js +49 -0
- package/dist/plans/plan-access-type.js.map +1 -0
- package/dist/plans/plan-audience.d.ts +3 -0
- package/dist/plans/plan-audience.js +9 -0
- package/dist/plans/plan-audience.js.map +1 -0
- package/dist/plans/plan-diff.d.ts +13 -0
- package/dist/plans/plan-diff.js +73 -0
- package/dist/plans/plan-diff.js.map +1 -0
- package/dist/plans/plan-permission-tree.d.ts +11 -0
- package/dist/plans/plan-permission-tree.js +58 -0
- package/dist/plans/plan-permission-tree.js.map +1 -0
- package/dist/plans/plan-write.d.ts +17 -0
- package/dist/plans/plan-write.js +111 -0
- package/dist/plans/plan-write.js.map +1 -0
- package/dist/plans/seat-capacity.d.ts +3 -1
- package/dist/plans/seat-capacity.js +10 -2
- package/dist/plans/seat-capacity.js.map +1 -1
- package/dist/plans/seat-hooks.d.ts +1 -0
- package/dist/plans/seat-hooks.js +1 -0
- package/dist/plans/seat-hooks.js.map +1 -1
- package/dist/plans/stripe-sync.d.ts +3 -0
- package/dist/plans/stripe-sync.js +16 -0
- package/dist/plans/stripe-sync.js.map +1 -1
- package/dist/routes/platformOwner/billing-settings.d.ts +11 -35
- package/dist/routes/platformOwner/billing-settings.js +77 -47
- package/dist/routes/platformOwner/billing-settings.js.map +1 -1
- package/dist/routes/platformOwner/billing-stats.d.ts +15 -0
- package/dist/routes/platformOwner/billing-stats.js +106 -0
- package/dist/routes/platformOwner/billing-stats.js.map +1 -0
- package/dist/routes/platformOwner/block-payloads.d.ts +7 -0
- package/dist/routes/platformOwner/block-payloads.js +3 -0
- package/dist/routes/platformOwner/block-payloads.js.map +1 -0
- package/dist/routes/platformOwner/credit-notes-issue.d.ts +7 -8
- package/dist/routes/platformOwner/credit-notes-issue.js +28 -16
- package/dist/routes/platformOwner/credit-notes-issue.js.map +1 -1
- package/dist/routes/platformOwner/dashboard.d.ts +14 -57
- package/dist/routes/platformOwner/dashboard.js +126 -247
- package/dist/routes/platformOwner/dashboard.js.map +1 -1
- package/dist/routes/platformOwner/index.d.ts +7 -0
- package/dist/routes/platformOwner/index.js +7 -0
- package/dist/routes/platformOwner/index.js.map +1 -1
- package/dist/routes/platformOwner/plan-deletion.d.ts +77 -19
- package/dist/routes/platformOwner/plan-deletion.js +219 -67
- package/dist/routes/platformOwner/plan-deletion.js.map +1 -1
- package/dist/routes/platformOwner/plan-dialogs.d.ts +22 -0
- package/dist/routes/platformOwner/plan-dialogs.js +211 -0
- package/dist/routes/platformOwner/plan-dialogs.js.map +1 -0
- package/dist/routes/platformOwner/plan-migration-context.d.ts +9 -0
- package/dist/routes/platformOwner/plan-migration-context.js +147 -0
- package/dist/routes/platformOwner/plan-migration-context.js.map +1 -0
- package/dist/routes/platformOwner/plan-migration-export.d.ts +12 -0
- package/dist/routes/platformOwner/plan-migration-export.js +100 -0
- package/dist/routes/platformOwner/plan-migration-export.js.map +1 -0
- package/dist/routes/platformOwner/plan-migrations.d.ts +43 -0
- package/dist/routes/platformOwner/plan-migrations.js +260 -0
- package/dist/routes/platformOwner/plan-migrations.js.map +1 -0
- package/dist/routes/platformOwner/plans.d.ts +45 -42
- package/dist/routes/platformOwner/plans.js +162 -143
- package/dist/routes/platformOwner/plans.js.map +1 -1
- package/dist/routes/platformOwner/platform-owners.d.ts +8 -6
- package/dist/routes/platformOwner/platform-owners.js +40 -12
- package/dist/routes/platformOwner/platform-owners.js.map +1 -1
- package/dist/routes/platformOwner/segments-export.d.ts +15 -0
- package/dist/routes/platformOwner/segments-export.js +143 -0
- package/dist/routes/platformOwner/segments-export.js.map +1 -0
- package/dist/routes/platformOwner/segments.d.ts +17 -11
- package/dist/routes/platformOwner/segments.js +62 -113
- package/dist/routes/platformOwner/segments.js.map +1 -1
- package/dist/routes/platformOwner/stripe-dashboard.d.ts +6 -0
- package/dist/routes/platformOwner/stripe-dashboard.js +29 -0
- package/dist/routes/platformOwner/stripe-dashboard.js.map +1 -0
- package/dist/routes/platformOwner/users-detail.d.ts +12 -22
- package/dist/routes/platformOwner/users-detail.js +60 -53
- package/dist/routes/platformOwner/users-detail.js.map +1 -1
- package/dist/routes/platformOwner/workspace-detail.d.ts +36 -0
- package/dist/routes/platformOwner/workspace-detail.js +222 -0
- package/dist/routes/platformOwner/workspace-detail.js.map +1 -0
- package/dist/routes/platformOwner/workspace-invitations.d.ts +4 -0
- package/dist/routes/platformOwner/workspace-invitations.js +18 -0
- package/dist/routes/platformOwner/workspace-invitations.js.map +1 -1
- package/dist/routes/platformOwner/workspace-operator-actions.d.ts +14 -2
- package/dist/routes/platformOwner/workspace-operator-actions.js +42 -4
- package/dist/routes/platformOwner/workspace-operator-actions.js.map +1 -1
- package/dist/routes/platformOwner/workspaces-admin.d.ts +17 -12
- package/dist/routes/platformOwner/workspaces-admin.js +122 -28
- package/dist/routes/platformOwner/workspaces-admin.js.map +1 -1
- package/dist/routes/public/index.d.ts +1 -0
- package/dist/routes/public/index.js +1 -0
- package/dist/routes/public/index.js.map +1 -1
- package/dist/routes/public/legal-documents.d.ts +2 -8
- package/dist/routes/public/legal-documents.js +4 -39
- package/dist/routes/public/legal-documents.js.map +1 -1
- package/dist/routes/public/pricing.d.ts +12 -0
- package/dist/routes/public/pricing.js +50 -0
- package/dist/routes/public/pricing.js.map +1 -0
- package/dist/routes/public/public-plan-catalog.d.ts +37 -0
- package/dist/routes/public/public-plan-catalog.js +63 -0
- package/dist/routes/public/public-plan-catalog.js.map +1 -0
- package/dist/routes/public/register.d.ts +13 -0
- package/dist/routes/public/register.js +88 -4
- package/dist/routes/public/register.js.map +1 -1
- package/dist/routes/tenant/billing-pay-invoice.d.ts +13 -0
- package/dist/routes/tenant/billing-pay-invoice.js +82 -0
- package/dist/routes/tenant/billing-pay-invoice.js.map +1 -0
- package/dist/routes/tenant/billing-portal.d.ts +8 -3
- package/dist/routes/tenant/billing-portal.js +34 -16
- package/dist/routes/tenant/billing-portal.js.map +1 -1
- package/dist/routes/tenant/billing-self-refund.d.ts +26 -1
- package/dist/routes/tenant/billing-self-refund.js +95 -46
- package/dist/routes/tenant/billing-self-refund.js.map +1 -1
- package/dist/routes/tenant/complimentary-banner.d.ts +12 -0
- package/dist/routes/tenant/complimentary-banner.js +64 -0
- package/dist/routes/tenant/complimentary-banner.js.map +1 -0
- package/dist/routes/tenant/data-export.js +14 -0
- package/dist/routes/tenant/data-export.js.map +1 -1
- package/dist/routes/tenant/index.d.ts +7 -0
- package/dist/routes/tenant/index.js +7 -0
- package/dist/routes/tenant/index.js.map +1 -1
- package/dist/routes/tenant/tenant-billing.d.ts +1 -0
- package/dist/routes/tenant/tenant-billing.js +18 -13
- package/dist/routes/tenant/tenant-billing.js.map +1 -1
- package/dist/routes/tenant/tenant-plan-authentication.d.ts +13 -0
- package/dist/routes/tenant/tenant-plan-authentication.js +79 -0
- package/dist/routes/tenant/tenant-plan-authentication.js.map +1 -0
- package/dist/routes/tenant/tenant-plan-cancellation.d.ts +12 -0
- package/dist/routes/tenant/tenant-plan-cancellation.js +87 -0
- package/dist/routes/tenant/tenant-plan-cancellation.js.map +1 -0
- package/dist/routes/tenant/tenant-plan-checkout.d.ts +3 -0
- package/dist/routes/tenant/tenant-plan-checkout.js +21 -11
- package/dist/routes/tenant/tenant-plan-checkout.js.map +1 -1
- package/dist/routes/tenant/tenant-plan-ops.d.ts +32 -2
- package/dist/routes/tenant/tenant-plan-ops.js +112 -39
- package/dist/routes/tenant/tenant-plan-ops.js.map +1 -1
- package/dist/routes/tenant/tenant-plan-preview.d.ts +33 -0
- package/dist/routes/tenant/tenant-plan-preview.js +216 -0
- package/dist/routes/tenant/tenant-plan-preview.js.map +1 -0
- package/dist/routes/tenant/tenant-plan-resubscription.d.ts +2 -0
- package/dist/routes/tenant/tenant-plan-resubscription.js +61 -0
- package/dist/routes/tenant/tenant-plan-resubscription.js.map +1 -0
- package/dist/routes/tenant/tenant-plan.d.ts +9 -4
- package/dist/routes/tenant/tenant-plan.js +125 -15
- package/dist/routes/tenant/tenant-plan.js.map +1 -1
- package/dist/routes/tenant/tenant-seats.d.ts +6 -1
- package/dist/routes/tenant/tenant-seats.js +26 -5
- package/dist/routes/tenant/tenant-seats.js.map +1 -1
- package/dist/routes/tenant/tenant-upcoming-invoice.d.ts +26 -0
- package/dist/routes/tenant/tenant-upcoming-invoice.js +200 -0
- package/dist/routes/tenant/tenant-upcoming-invoice.js.map +1 -0
- package/dist/routes/tenant/workspace-access.d.ts +67 -0
- package/dist/routes/tenant/workspace-access.js +224 -0
- package/dist/routes/tenant/workspace-access.js.map +1 -0
- package/dist/routes/tenant/workspaces.d.ts +12 -43
- package/dist/routes/tenant/workspaces.js +82 -192
- package/dist/routes/tenant/workspaces.js.map +1 -1
- package/dist/segments/index.d.ts +29 -0
- package/dist/segments/index.js +116 -0
- package/dist/segments/index.js.map +1 -0
- package/dist/stripe/client.d.ts +1 -0
- package/dist/stripe/client.js +11 -0
- package/dist/stripe/client.js.map +1 -1
- package/dist/stripe/customer-locale.d.ts +3 -0
- package/dist/stripe/customer-locale.js +36 -0
- package/dist/stripe/customer-locale.js.map +1 -0
- package/dist/stripe/dashboard-links.d.ts +2 -0
- package/dist/stripe/dashboard-links.js +8 -0
- package/dist/stripe/dashboard-links.js.map +1 -0
- package/dist/stripe/index.d.ts +3 -0
- package/dist/stripe/index.js +3 -0
- package/dist/stripe/index.js.map +1 -1
- package/dist/stripe/pending-update.d.ts +5 -0
- package/dist/stripe/pending-update.js +56 -0
- package/dist/stripe/pending-update.js.map +1 -0
- package/dist/stripe/plan-schedule.js +4 -1
- package/dist/stripe/plan-schedule.js.map +1 -1
- package/dist/stripe/subscription-cancellation.d.ts +3 -0
- package/dist/stripe/subscription-cancellation.js +26 -0
- package/dist/stripe/subscription-cancellation.js.map +1 -0
- package/dist/stripe/sync-plan.js +5 -6
- package/dist/stripe/sync-plan.js.map +1 -1
- package/dist/stripe/upcoming-invoice.d.ts +9 -0
- package/dist/stripe/upcoming-invoice.js +19 -3
- package/dist/stripe/upcoming-invoice.js.map +1 -1
- package/dist/stripe/webhook-checkout.js +2 -0
- package/dist/stripe/webhook-checkout.js.map +1 -1
- package/dist/stripe/webhook-credit-notes.js +15 -0
- package/dist/stripe/webhook-credit-notes.js.map +1 -1
- package/dist/stripe/webhook-dispatch.js +2 -0
- package/dist/stripe/webhook-dispatch.js.map +1 -1
- package/dist/stripe/webhook-handlers.d.ts +1 -0
- package/dist/stripe/webhook-handlers.js +34 -9
- package/dist/stripe/webhook-handlers.js.map +1 -1
- package/dist/stripe/webhook-shared.d.ts +3 -1
- package/dist/stripe/webhook-shared.js +20 -1
- package/dist/stripe/webhook-shared.js.map +1 -1
- package/dist/stripe/workspace-checkout.d.ts +2 -0
- package/dist/stripe/workspace-checkout.js +4 -0
- package/dist/stripe/workspace-checkout.js.map +1 -1
- package/dist/types/config.d.ts +2 -0
- package/dist/types/config.js.map +1 -1
- package/dist/upcoming-invoice/mapping.js +1 -0
- package/dist/upcoming-invoice/mapping.js.map +1 -1
- package/dist/users/index.d.ts +4 -0
- package/dist/users/index.js +21 -0
- package/dist/users/index.js.map +1 -0
- package/dist/users/platform-role.d.ts +18 -0
- package/dist/users/platform-role.js +127 -0
- package/dist/users/platform-role.js.map +1 -0
- package/dist/users/user-detail.d.ts +43 -0
- package/dist/users/user-detail.js +100 -0
- package/dist/users/user-detail.js.map +1 -0
- package/dist/users/user-facts.d.ts +10 -0
- package/dist/users/user-facts.js +157 -0
- package/dist/users/user-facts.js.map +1 -0
- package/dist/users/user-segments.d.ts +10 -0
- package/dist/users/user-segments.js +32 -0
- package/dist/users/user-segments.js.map +1 -0
- package/dist/utils/billing-displays.d.ts +6 -0
- package/dist/utils/billing-displays.js +17 -0
- package/dist/utils/billing-displays.js.map +1 -0
- package/dist/utils/billing-document-status.d.ts +0 -4
- package/dist/utils/billing-document-status.js +1 -13
- package/dist/utils/billing-document-status.js.map +1 -1
- package/dist/utils/billing-document-type.d.ts +6 -0
- package/dist/utils/billing-document-type.js +13 -0
- package/dist/utils/billing-document-type.js.map +1 -1
- package/dist/utils/content-language.d.ts +2 -0
- package/dist/utils/content-language.js +12 -0
- package/dist/utils/content-language.js.map +1 -0
- package/dist/utils/csv-file.d.ts +2 -0
- package/dist/utils/csv-file.js +23 -0
- package/dist/utils/csv-file.js.map +1 -0
- package/dist/utils/form-insight-type.d.ts +8 -0
- package/dist/utils/form-insight-type.js +34 -0
- package/dist/utils/form-insight-type.js.map +1 -0
- package/dist/utils/index.d.ts +9 -0
- package/dist/utils/index.js +9 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/language.d.ts +1 -0
- package/dist/utils/language.js +7 -0
- package/dist/utils/language.js.map +1 -0
- package/dist/utils/money.d.ts +2 -0
- package/dist/utils/money.js +24 -0
- package/dist/utils/money.js.map +1 -0
- package/dist/utils/segment-evaluator.d.ts +4 -0
- package/dist/utils/segment-evaluator.js +15 -8
- package/dist/utils/segment-evaluator.js.map +1 -1
- package/dist/utils/segment-explain.d.ts +10 -0
- package/dist/utils/segment-explain.js +31 -0
- package/dist/utils/segment-explain.js.map +1 -0
- package/dist/utils/segment-fields.d.ts +13 -2
- package/dist/utils/segment-fields.js +137 -116
- package/dist/utils/segment-fields.js.map +1 -1
- package/dist/utils/segment-matching.d.ts +14 -3
- package/dist/utils/segment-matching.js +47 -13
- package/dist/utils/segment-matching.js.map +1 -1
- package/dist/utils/segment-preview.d.ts +31 -0
- package/dist/utils/segment-preview.js +83 -0
- package/dist/utils/segment-preview.js.map +1 -0
- package/dist/utils/segment-user-projection.d.ts +3 -0
- package/dist/utils/segment-user-projection.js +31 -0
- package/dist/utils/segment-user-projection.js.map +1 -0
- package/dist/utils/segment-validation.d.ts +14 -0
- package/dist/utils/segment-validation.js +98 -0
- package/dist/utils/segment-validation.js.map +1 -0
- package/dist/utils/status-vocabulary.d.ts +57 -0
- package/dist/utils/status-vocabulary.js +92 -0
- package/dist/utils/status-vocabulary.js.map +1 -0
- package/dist/workers/index.d.ts +1 -0
- package/dist/workers/index.js +1 -0
- package/dist/workers/index.js.map +1 -1
- package/dist/workers/plan-migration-resolution.d.ts +14 -0
- package/dist/workers/plan-migration-resolution.js +99 -0
- package/dist/workers/plan-migration-resolution.js.map +1 -0
- package/dist/workers/plan-migration.d.ts +6 -1
- package/dist/workers/plan-migration.js +152 -37
- package/dist/workers/plan-migration.js.map +1 -1
- package/dist/workspaces/billing-identity-lock.d.ts +1 -0
- package/dist/workspaces/billing-identity-lock.js +18 -0
- package/dist/workspaces/billing-identity-lock.js.map +1 -0
- package/dist/workspaces/complimentary-banner.d.ts +11 -0
- package/dist/workspaces/complimentary-banner.js +83 -0
- package/dist/workspaces/complimentary-banner.js.map +1 -0
- package/dist/workspaces/default-member-role.d.ts +2 -0
- package/dist/workspaces/default-member-role.js +43 -0
- package/dist/workspaces/default-member-role.js.map +1 -0
- package/dist/workspaces/deletion-request.d.ts +2 -0
- package/dist/workspaces/deletion-request.js +5 -0
- package/dist/workspaces/deletion-request.js.map +1 -0
- package/dist/workspaces/deletion.d.ts +1 -1
- package/dist/workspaces/deletion.js +19 -7
- package/dist/workspaces/deletion.js.map +1 -1
- package/dist/workspaces/detail-items.d.ts +15 -0
- package/dist/workspaces/detail-items.js +226 -0
- package/dist/workspaces/detail-items.js.map +1 -0
- package/dist/workspaces/first-payment.d.ts +5 -0
- package/dist/workspaces/first-payment.js +28 -0
- package/dist/workspaces/first-payment.js.map +1 -0
- package/dist/workspaces/free-workspaces-per-card.d.ts +6 -0
- package/dist/workspaces/free-workspaces-per-card.js +58 -0
- package/dist/workspaces/free-workspaces-per-card.js.map +1 -0
- package/dist/workspaces/index.d.ts +7 -0
- package/dist/workspaces/index.js +7 -0
- package/dist/workspaces/index.js.map +1 -1
- package/dist/workspaces/invitations.d.ts +2 -1
- package/dist/workspaces/invitations.js +16 -6
- package/dist/workspaces/invitations.js.map +1 -1
- package/dist/workspaces/my-workspaces.d.ts +13 -0
- package/dist/workspaces/my-workspaces.js +68 -0
- package/dist/workspaces/my-workspaces.js.map +1 -0
- package/dist/workspaces/operator-creation.d.ts +39 -0
- package/dist/workspaces/operator-creation.js +123 -0
- package/dist/workspaces/operator-creation.js.map +1 -0
- package/dist/workspaces/operator-view.d.ts +13 -0
- package/dist/workspaces/operator-view.js +37 -0
- package/dist/workspaces/operator-view.js.map +1 -0
- package/dist/workspaces/owner-contact.d.ts +7 -0
- package/dist/workspaces/owner-contact.js +24 -0
- package/dist/workspaces/owner-contact.js.map +1 -0
- package/dist/workspaces/owner-invitation-email.d.ts +12 -0
- package/dist/workspaces/owner-invitation-email.js +53 -0
- package/dist/workspaces/owner-invitation-email.js.map +1 -0
- package/dist/workspaces/provisioning.d.ts +2 -0
- package/dist/workspaces/provisioning.js +37 -15
- package/dist/workspaces/provisioning.js.map +1 -1
- package/dist/workspaces/self-serve-creation.d.ts +38 -0
- package/dist/workspaces/self-serve-creation.js +106 -0
- package/dist/workspaces/self-serve-creation.js.map +1 -0
- package/dist/workspaces/workspace-glance.d.ts +3 -0
- package/dist/workspaces/workspace-glance.js +93 -0
- package/dist/workspaces/workspace-glance.js.map +1 -0
- package/dist/workspaces/workspace-name.d.ts +2 -0
- package/dist/workspaces/workspace-name.js +14 -0
- package/dist/workspaces/workspace-name.js.map +1 -0
- package/dist/workspaces/workspace-overview.d.ts +41 -0
- package/dist/workspaces/workspace-overview.js +84 -0
- package/dist/workspaces/workspace-overview.js.map +1 -0
- package/dist/workspaces/workspace-owner.d.ts +7 -0
- package/dist/workspaces/workspace-owner.js +14 -0
- package/dist/workspaces/workspace-owner.js.map +1 -0
- package/frontend-vue/app/build/PayInvoiceDialog.vue +40 -0
- package/frontend-vue/app/build/PayInvoicePanel.vue +203 -0
- package/frontend-vue/app/build/PlanChangeReview.vue +415 -0
- package/frontend-vue/app/build/PlanFeatureValueInput.vue +143 -0
- package/frontend-vue/app/build/PlanPermissionPicker.vue +246 -0
- package/frontend-vue/app/build/WorkspaceSwitcherRow.vue +116 -0
- package/frontend-vue/app/build/components/CreditNoteInvoiceSummary.vue +82 -0
- package/frontend-vue/app/build/components/FormFieldRow.vue +97 -0
- package/frontend-vue/app/build/components/FormRows.vue +26 -0
- package/frontend-vue/app/build/components/RequiredLegend.vue +7 -0
- package/frontend-vue/app/build/composables/useCreditNoteDraft.ts +142 -0
- package/frontend-vue/app/build/composables/useCreditNoteTexts.ts +123 -0
- package/frontend-vue/app/build/composables/useLiveFormValues.ts +49 -0
- package/frontend-vue/app/build/day-formats.ts +17 -0
- package/frontend-vue/app/build/highlight.ts +28 -0
- package/frontend-vue/app/build/plan-catalog.ts +161 -0
- package/frontend-vue/app/build/plan-change-heading.ts +81 -0
- package/frontend-vue/app/build/plan-permissions.ts +92 -0
- package/frontend-vue/app/build/plan-retire.ts +83 -0
- package/frontend-vue/app/build/public/AccessTimeline.vue +68 -0
- package/frontend-vue/app/build/public/LegalAcceptance.vue +51 -0
- package/frontend-vue/app/build/public/OtherWorkspaces.vue +88 -0
- package/frontend-vue/app/build/public/PricingComparison.vue +227 -0
- package/frontend-vue/app/build/public/PricingFaq.vue +76 -0
- package/frontend-vue/app/build/public/PublicStage.vue +72 -0
- package/frontend-vue/app/build/public/RegistrationCardField.vue +71 -0
- package/frontend-vue/app/build/public/RegistrationPlanCard.vue +122 -0
- package/frontend-vue/app/build/public/access.ts +118 -0
- package/frontend-vue/app/build/public/chosen-plan.ts +36 -0
- package/frontend-vue/app/build/public/legal.ts +99 -0
- package/frontend-vue/app/build/public/pricing.ts +175 -0
- package/frontend-vue/app/build/public/routes.ts +122 -0
- package/frontend-vue/app/build/public/usePublicFetch.ts +44 -0
- package/frontend-vue/app/build/public/usePublicPlanFormat.ts +52 -0
- package/frontend-vue/app/build/segments/tree.ts +137 -0
- package/frontend-vue/app/build/segments/types.ts +119 -0
- package/frontend-vue/app/build/segments/useSegmentCatalog.ts +58 -0
- package/frontend-vue/app/build/segments/useSegmentDraft.ts +33 -0
- package/frontend-vue/app/build/segments/useSegmentPreview.ts +78 -0
- package/frontend-vue/app/build/segments/useSegmentSentence.ts +60 -0
- package/frontend-vue/app/build/segments/useSegmentWords.ts +204 -0
- package/frontend-vue/app/build/useWorkspaceName.ts +14 -0
- package/frontend-vue/app/build/users/useUserDetail.ts +82 -0
- package/frontend-vue/app/build/workspace-detail/ComplimentaryDialog.vue +219 -0
- package/frontend-vue/app/build/workspace-detail/CreditDialog.vue +243 -0
- package/frontend-vue/app/build/workspace-detail/UpgradeDialog.vue +258 -0
- package/frontend-vue/app/build/workspace-detail/WorkspaceActionDialogs.vue +82 -0
- package/frontend-vue/app/build/workspace-detail/planPrice.ts +26 -0
- package/frontend-vue/app/build/workspace-detail/types.ts +138 -0
- package/frontend-vue/app/build/workspace-detail/useWorkspaceActions.ts +177 -0
- package/frontend-vue/app/build/workspace-detail/useWorkspaceOverview.ts +44 -0
- package/frontend-vue/app/build/workspace-paths.ts +8 -0
- package/frontend-vue/app/components/BillingIdentityFields.vue +294 -161
- package/frontend-vue/app/components/CustomerPortalButton.vue +80 -32
- package/frontend-vue/app/components/DataExport.vue +250 -260
- package/frontend-vue/app/components/DataExportHistory.vue +246 -0
- package/frontend-vue/app/components/DunningTimeline.vue +120 -0
- package/frontend-vue/app/components/IssueCreditNoteModal.vue +318 -116
- package/frontend-vue/app/components/LegalDocumentRelease.vue +64 -0
- package/frontend-vue/app/components/LegalLayout.vue +284 -46
- package/frontend-vue/app/components/MigrationStripeCheck.vue +133 -0
- package/frontend-vue/app/components/PastDueAlert.vue +186 -78
- package/frontend-vue/app/components/PastDueBanner.vue +96 -67
- package/frontend-vue/app/components/PayInvoiceModal.vue +57 -0
- package/frontend-vue/app/components/PaymentMethodCard.vue +159 -163
- package/frontend-vue/app/components/PendingCheckoutModal.vue +61 -61
- package/frontend-vue/app/components/PlanAccessEditor.vue +410 -0
- package/frontend-vue/app/components/PlanCard.vue +358 -261
- package/frontend-vue/app/components/PlanCardPublic.vue +123 -51
- package/frontend-vue/app/components/PlanComparisonModal.vue +373 -310
- package/frontend-vue/app/components/PlanEditorPreview.vue +374 -0
- package/frontend-vue/app/components/PlanLimitInput.vue +92 -0
- package/frontend-vue/app/components/PlanTaxSync.vue +118 -0
- package/frontend-vue/app/components/PlanUpgradeModal.vue +265 -156
- package/frontend-vue/app/components/PlatformNotes.vue +215 -255
- package/frontend-vue/app/components/Pricing.vue +236 -0
- package/frontend-vue/app/components/PublicNavBar.vue +70 -0
- package/frontend-vue/app/components/RefundButton.vue +264 -113
- package/frontend-vue/app/components/RefundExample.vue +86 -0
- package/frontend-vue/app/components/Register.vue +217 -121
- package/frontend-vue/app/components/RegistrationClosed.vue +30 -13
- package/frontend-vue/app/components/RetirePlanModal.vue +829 -0
- package/frontend-vue/app/components/SeatQuotaBanner.vue +240 -90
- package/frontend-vue/app/components/SegmentConditionRow.vue +171 -0
- package/frontend-vue/app/components/SegmentConditionsBuilder.vue +89 -162
- package/frontend-vue/app/components/SegmentConditionsGroup.vue +273 -463
- package/frontend-vue/app/components/SegmentLivePreview.vue +301 -0
- package/frontend-vue/app/components/SegmentLogicToggle.vue +24 -0
- package/frontend-vue/app/components/SegmentRulesText.vue +57 -0
- package/frontend-vue/app/components/SegmentValueInput.vue +165 -0
- package/frontend-vue/app/components/SegmentWords.vue +36 -0
- package/frontend-vue/app/components/TenantBillingForm.vue +142 -103
- package/frontend-vue/app/components/TenantPlanCard.vue +635 -281
- package/frontend-vue/app/components/TrialEndingBanner.vue +76 -0
- package/frontend-vue/app/components/UserPlatformRoleCard.vue +102 -0
- package/frontend-vue/app/components/UserSegmentMatches.vue +123 -0
- package/frontend-vue/app/components/UserSummaryCard.vue +107 -158
- package/frontend-vue/app/components/WorkspaceAdminCreateModal.vue +354 -177
- package/frontend-vue/app/components/WorkspaceCreateModal.vue +372 -252
- package/frontend-vue/app/components/WorkspaceDangerZone.vue +178 -126
- package/frontend-vue/app/components/WorkspaceDetailHeader.vue +262 -19
- package/frontend-vue/app/components/WorkspaceInvitationLink.vue +108 -86
- package/frontend-vue/app/components/WorkspaceOperatorActions.vue +105 -330
- package/frontend-vue/app/components/WorkspaceSuspendButton.vue +34 -158
- package/frontend-vue/app/components/WorkspaceSuspended.vue +390 -149
- package/frontend-vue/app/components/WorkspaceSwitcherWidget.vue +145 -161
- package/frontend-vue/app/composables/useBillingIdentity.ts +97 -95
- package/frontend-vue/app/composables/useBillingStatus.ts +56 -24
- package/frontend-vue/app/composables/useCurrentWorkspace.ts +15 -30
- package/frontend-vue/app/composables/useDaysLeft.ts +20 -0
- package/frontend-vue/app/composables/useExportHistory.ts +209 -120
- package/frontend-vue/app/composables/useInvitationLink.ts +39 -53
- package/frontend-vue/app/composables/useMoneyFormat.ts +64 -33
- package/frontend-vue/app/composables/useMyWorkspaces.ts +41 -32
- package/frontend-vue/app/composables/useNextInvoice.ts +20 -0
- package/frontend-vue/app/composables/usePayInvoice.ts +52 -0
- package/frontend-vue/app/composables/usePendingCheckout.ts +71 -67
- package/frontend-vue/app/composables/usePlanCatalog.ts +16 -0
- package/frontend-vue/app/composables/usePlanChangeReview.ts +115 -0
- package/frontend-vue/app/composables/usePlanComparison.ts +17 -8
- package/frontend-vue/app/composables/usePlanDowngrade.ts +25 -23
- package/frontend-vue/app/composables/usePlanFeatureFormat.ts +238 -202
- package/frontend-vue/app/composables/usePlanPriceLabel.ts +28 -0
- package/frontend-vue/app/composables/useSaasRegistration.ts +516 -301
- package/frontend-vue/app/composables/useSaasStatus.ts +81 -0
- package/frontend-vue/app/composables/useSeatQuota.ts +27 -17
- package/frontend-vue/app/composables/useServerConfirm.ts +44 -0
- package/frontend-vue/app/composables/useStripePaymentElement.ts +3 -5
- package/frontend-vue/app/composables/useTenantPlan.ts +235 -99
- package/frontend-vue/app/composables/useUpgradeAuthentication.ts +37 -0
- package/frontend-vue/app/composables/useWorkspaceFinalization.ts +4 -0
- package/frontend-vue/app/composables/useWorkspaceOverview.ts +58 -0
- package/frontend-vue/app/composables/useWorkspaceRenamed.ts +33 -0
- package/frontend-vue/app/custom-pages/auth/no-workspace.vue +391 -312
- package/frontend-vue/app/plugins/auth-links.ts +38 -17
- package/frontend-vue/app/plugins/billing-data-types.ts +111 -58
- package/frontend-vue/app/plugins/footer-links.ts +13 -33
- package/frontend-vue/app/plugins/segment-conditions-data-type.ts +45 -0
- package/frontend-vue/app/plugins/sidebar-widgets.ts +13 -10
- package/frontend-vue/app/types/runtime-config.ts +9 -4
- package/frontend-vue/dms.frontend.build.ts +7 -0
- package/frontend-vue/dms.frontend.ts +6 -13
- package/frontend-vue/i18n/locales/saas-en-GB.json +499 -1380
- package/frontend-vue/i18n/locales/saas-fr-FR.json +499 -1380
- package/frontend-vue/i18n/locales/saas-operator-billing-en-GB.json +282 -0
- package/frontend-vue/i18n/locales/saas-operator-billing-fr-FR.json +282 -0
- package/frontend-vue/i18n/locales/saas-operator-catalog-en-GB.json +597 -0
- package/frontend-vue/i18n/locales/saas-operator-catalog-fr-FR.json +597 -0
- package/frontend-vue/i18n/locales/saas-operator-users-en-GB.json +505 -0
- package/frontend-vue/i18n/locales/saas-operator-users-fr-FR.json +505 -0
- package/frontend-vue/i18n/locales/saas-operator-workspaces-en-GB.json +595 -0
- package/frontend-vue/i18n/locales/saas-operator-workspaces-fr-FR.json +595 -0
- package/frontend-vue/i18n/locales/saas-public-en-GB.json +304 -0
- package/frontend-vue/i18n/locales/saas-public-fr-FR.json +304 -0
- package/frontend-vue/i18n/locales/saas-tenant-billing-en-GB.json +434 -0
- package/frontend-vue/i18n/locales/saas-tenant-billing-fr-FR.json +434 -0
- package/frontend-vue/i18n/locales/saas-tenant-workspace-en-GB.json +252 -0
- package/frontend-vue/i18n/locales/saas-tenant-workspace-fr-FR.json +252 -0
- package/frontend-vue/package.json +1 -1
- package/package.json +10 -10
- package/frontend-vue/app/components/CardGrid.vue +0 -77
- package/frontend-vue/app/components/DeletePlanModal.vue +0 -223
- package/frontend-vue/app/components/FreeAccessBanner.vue +0 -70
- package/frontend-vue/app/components/PlanCardsDisplay.vue +0 -127
- package/frontend-vue/app/components/PlanInheritancePicker.vue +0 -329
- package/frontend-vue/app/components/RecentActivity.vue +0 -72
- package/frontend-vue/app/components/WorkspaceBillingInfo.vue +0 -68
- package/frontend-vue/app/components/WorkspaceCompAccessButton.vue +0 -198
- package/frontend-vue/app/components/WorkspaceIdentity.vue +0 -99
- package/frontend-vue/app/components/WorkspaceJoinButton.vue +0 -50
- package/frontend-vue/app/components/WorkspaceSummaryCard.vue +0 -185
- package/frontend-vue/app/composables/useDetailRefresh.ts +0 -17
- package/frontend-vue/app/composables/usePastDueBannerAction.ts +0 -20
- package/frontend-vue/app/composables/usePlanFeatureLabel.ts +0 -24
- package/frontend-vue/app/plugins/plan-cards-display.client.ts +0 -16
- package/frontend-vue/app/plugins/segment-conditions-data-type.client.ts +0 -122
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, ref, watch } from 'vue'
|
|
3
|
+
import { PLAN_UNLIMITED } from './plan-catalog'
|
|
4
|
+
|
|
5
|
+
type ValueType = 'boolean' | 'number' | 'string'
|
|
6
|
+
type NumberMode = 'off' | 'limit' | 'unlimited'
|
|
7
|
+
|
|
8
|
+
const OFF = 0
|
|
9
|
+
const MIN_LIMIT = 1
|
|
10
|
+
|
|
11
|
+
const props = defineProps<{
|
|
12
|
+
valueType: ValueType
|
|
13
|
+
modelValue: unknown
|
|
14
|
+
unit?: string | null
|
|
15
|
+
disabled?: boolean
|
|
16
|
+
}>()
|
|
17
|
+
|
|
18
|
+
const emit = defineEmits<{ 'update:modelValue': [value: unknown] }>()
|
|
19
|
+
|
|
20
|
+
const { t, locale } = useI18n()
|
|
21
|
+
|
|
22
|
+
function modeOf(value: unknown): NumberMode {
|
|
23
|
+
if (value === PLAN_UNLIMITED) return 'unlimited'
|
|
24
|
+
return typeof value === 'number' && value !== OFF ? 'limit' : 'off'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const mode = computed(() => modeOf(props.modelValue))
|
|
28
|
+
// The last limit typed, kept while Off or Unlimited is picked, so switching
|
|
29
|
+
// back to Limit restores it.
|
|
30
|
+
const limit = ref<number | null>(
|
|
31
|
+
typeof props.modelValue === 'number' && props.modelValue > OFF
|
|
32
|
+
? props.modelValue
|
|
33
|
+
: null,
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
watch(
|
|
37
|
+
() => props.modelValue,
|
|
38
|
+
(value) => {
|
|
39
|
+
if (typeof value === 'number' && value !== OFF && value !== PLAN_UNLIMITED) {
|
|
40
|
+
limit.value = value
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
// A unit stored `singular | plural` reads in the form the typed limit takes.
|
|
46
|
+
const unitLabel = computed(() =>
|
|
47
|
+
props.unit ? agreeUnit(props.unit, limit.value ?? MIN_LIMIT, locale.value) : '',
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
const limitError = computed(() =>
|
|
51
|
+
mode.value === 'limit' &&
|
|
52
|
+
(limit.value === null ||
|
|
53
|
+
!Number.isInteger(limit.value) ||
|
|
54
|
+
limit.value < MIN_LIMIT)
|
|
55
|
+
? t('saas.catalog.editor.feature.limit_error')
|
|
56
|
+
: null,
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
const numberModes = computed(() => [
|
|
60
|
+
{ value: 'off', label: t('saas.catalog.editor.feature.off') },
|
|
61
|
+
{ value: 'limit', label: t('saas.catalog.editor.feature.limit') },
|
|
62
|
+
{ value: 'unlimited', label: t('saas.catalog.editor.feature.unlimited') },
|
|
63
|
+
])
|
|
64
|
+
|
|
65
|
+
const booleanModes = computed(() => [
|
|
66
|
+
{ value: 'off', label: t('saas.catalog.editor.feature.not_included') },
|
|
67
|
+
{ value: 'on', label: t('saas.catalog.editor.feature.included') },
|
|
68
|
+
])
|
|
69
|
+
|
|
70
|
+
const NUMBER_MODE_VALUES: Record<NumberMode, () => unknown> = {
|
|
71
|
+
off: () => OFF,
|
|
72
|
+
limit: () => limit.value ?? MIN_LIMIT,
|
|
73
|
+
unlimited: () => PLAN_UNLIMITED,
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function setNumberMode(next: string | number | undefined): void {
|
|
77
|
+
const picked = (next ?? 'off') as NumberMode
|
|
78
|
+
if (picked === 'limit' && limit.value === null) limit.value = MIN_LIMIT
|
|
79
|
+
emit('update:modelValue', NUMBER_MODE_VALUES[picked]())
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function setLimit(value: number | null | undefined): void {
|
|
83
|
+
limit.value = value ?? null
|
|
84
|
+
emit('update:modelValue', value ?? OFF)
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function setBoolean(next: string | number | undefined): void {
|
|
88
|
+
emit('update:modelValue', next === 'on')
|
|
89
|
+
}
|
|
90
|
+
</script>
|
|
91
|
+
|
|
92
|
+
<template>
|
|
93
|
+
<div class="flex flex-col gap-1">
|
|
94
|
+
<div
|
|
95
|
+
v-if="valueType === 'number'"
|
|
96
|
+
class="flex flex-wrap items-center gap-2"
|
|
97
|
+
>
|
|
98
|
+
<DmsSegmented
|
|
99
|
+
:model-value="mode"
|
|
100
|
+
:items="numberModes"
|
|
101
|
+
:disabled="disabled"
|
|
102
|
+
size="xs"
|
|
103
|
+
:aria-label="$t('saas.catalog.editor.feature.mode')"
|
|
104
|
+
@update:model-value="setNumberMode"
|
|
105
|
+
/>
|
|
106
|
+
<div v-if="mode === 'limit'" class="flex items-center gap-1.5">
|
|
107
|
+
<UInputNumber
|
|
108
|
+
:model-value="limit ?? undefined"
|
|
109
|
+
:min="MIN_LIMIT"
|
|
110
|
+
:step="1"
|
|
111
|
+
size="xs"
|
|
112
|
+
class="w-28"
|
|
113
|
+
:disabled="disabled"
|
|
114
|
+
:color="limitError ? 'error' : undefined"
|
|
115
|
+
:highlight="!!limitError"
|
|
116
|
+
@update:model-value="setLimit"
|
|
117
|
+
/>
|
|
118
|
+
<span v-if="unitLabel" class="text-muted text-xs">{{
|
|
119
|
+
unitLabel
|
|
120
|
+
}}</span>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
<DmsSegmented
|
|
124
|
+
v-else-if="valueType === 'boolean'"
|
|
125
|
+
:model-value="modelValue === true ? 'on' : 'off'"
|
|
126
|
+
:items="booleanModes"
|
|
127
|
+
:disabled="disabled"
|
|
128
|
+
size="xs"
|
|
129
|
+
:aria-label="$t('saas.catalog.editor.feature.mode')"
|
|
130
|
+
@update:model-value="setBoolean"
|
|
131
|
+
/>
|
|
132
|
+
<UInput
|
|
133
|
+
v-else
|
|
134
|
+
:model-value="typeof modelValue === 'string' ? modelValue : ''"
|
|
135
|
+
size="xs"
|
|
136
|
+
class="w-full max-w-xs"
|
|
137
|
+
:disabled="disabled"
|
|
138
|
+
:placeholder="$t('saas.catalog.editor.feature.text_placeholder')"
|
|
139
|
+
@update:model-value="(value: string) => emit('update:modelValue', value)"
|
|
140
|
+
/>
|
|
141
|
+
<p v-if="limitError" class="text-error text-xs">{{ limitError }}</p>
|
|
142
|
+
</div>
|
|
143
|
+
</template>
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, ref, watch } from 'vue'
|
|
3
|
+
import {
|
|
4
|
+
flattenPermissionTree,
|
|
5
|
+
grantPermission,
|
|
6
|
+
matchesSearch,
|
|
7
|
+
type PermissionNode,
|
|
8
|
+
type PermissionRow,
|
|
9
|
+
revokePermission,
|
|
10
|
+
} from './plan-permissions'
|
|
11
|
+
|
|
12
|
+
const props = defineProps<{
|
|
13
|
+
planName: string
|
|
14
|
+
parentName: string | null
|
|
15
|
+
tree: PermissionNode[]
|
|
16
|
+
own: string[]
|
|
17
|
+
inherited: string[]
|
|
18
|
+
}>()
|
|
19
|
+
|
|
20
|
+
const open = defineModel<boolean>('open', { default: false })
|
|
21
|
+
const emit = defineEmits<{ apply: [permissions: string[]] }>()
|
|
22
|
+
|
|
23
|
+
const { processI18n } = useTranslation()
|
|
24
|
+
|
|
25
|
+
const draft = ref<Set<string>>(new Set(props.own))
|
|
26
|
+
const search = ref('')
|
|
27
|
+
const expanded = ref<Set<string>>(new Set())
|
|
28
|
+
|
|
29
|
+
watch(open, (isOpen) => {
|
|
30
|
+
if (!isOpen) return
|
|
31
|
+
draft.value = new Set(props.own)
|
|
32
|
+
search.value = ''
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
const rows = computed(() => flattenPermissionTree(props.tree))
|
|
36
|
+
const inheritedSet = computed(() => new Set(props.inherited))
|
|
37
|
+
const allIds = computed(() => rows.value.map((row) => row.node.id))
|
|
38
|
+
const groups = computed(() => rows.value.filter((row) => row.depth === 0))
|
|
39
|
+
|
|
40
|
+
function labelOf(node: PermissionNode): string {
|
|
41
|
+
return processI18n(node.label)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function isGranted(id: string): boolean {
|
|
45
|
+
return draft.value.has(id) || inheritedSet.value.has(id)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const grantedCount = computed(() => allIds.value.filter(isGranted).length)
|
|
49
|
+
const delta = computed(() => {
|
|
50
|
+
const before = new Set(props.own)
|
|
51
|
+
const added = [...draft.value].filter((id) => !before.has(id)).length
|
|
52
|
+
const removed = props.own.filter((id) => !draft.value.has(id)).length
|
|
53
|
+
return added - removed
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
function groupRows(group: PermissionRow): PermissionRow[] {
|
|
57
|
+
return rows.value.filter(
|
|
58
|
+
(row) =>
|
|
59
|
+
row.groupId === group.node.id &&
|
|
60
|
+
row.depth > 0 &&
|
|
61
|
+
matchesSearch(row, rows.value, search.value, labelOf),
|
|
62
|
+
)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function groupCount(group: PermissionRow): string {
|
|
66
|
+
const ids = [group.node.id, ...group.descendants]
|
|
67
|
+
return `${ids.filter(isGranted).length} / ${ids.length}`
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const shownGroups = computed(() =>
|
|
71
|
+
groups.value.filter((group) =>
|
|
72
|
+
matchesSearch(group, rows.value, search.value, labelOf),
|
|
73
|
+
),
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
function isExpanded(group: PermissionRow): boolean {
|
|
77
|
+
return search.value.length > 0 || expanded.value.has(group.node.id)
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function toggleGroup(group: PermissionRow): void {
|
|
81
|
+
const next = new Set(expanded.value)
|
|
82
|
+
if (next.has(group.node.id)) next.delete(group.node.id)
|
|
83
|
+
else next.add(group.node.id)
|
|
84
|
+
expanded.value = next
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const isAllExpanded = computed(() =>
|
|
88
|
+
groups.value.every((group) => expanded.value.has(group.node.id)),
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
function toggleAll(): void {
|
|
92
|
+
expanded.value = isAllExpanded.value
|
|
93
|
+
? new Set()
|
|
94
|
+
: new Set(groups.value.map((group) => group.node.id))
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function toggleRow(row: PermissionRow, value: boolean | 'indeterminate'): void {
|
|
98
|
+
draft.value =
|
|
99
|
+
value === true
|
|
100
|
+
? grantPermission(draft.value, row)
|
|
101
|
+
: revokePermission(draft.value, row)
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function apply(): void {
|
|
105
|
+
emit(
|
|
106
|
+
'apply',
|
|
107
|
+
[...draft.value].filter((id) => !inheritedSet.value.has(id)),
|
|
108
|
+
)
|
|
109
|
+
open.value = false
|
|
110
|
+
}
|
|
111
|
+
</script>
|
|
112
|
+
|
|
113
|
+
<template>
|
|
114
|
+
<UModal
|
|
115
|
+
v-model:open="open"
|
|
116
|
+
:title="$t('saas.catalog.editor.permissions.title', { name: planName })"
|
|
117
|
+
:description="
|
|
118
|
+
parentName
|
|
119
|
+
? $t('saas.catalog.editor.permissions.description_parent', {
|
|
120
|
+
granted: grantedCount,
|
|
121
|
+
total: allIds.length,
|
|
122
|
+
parent: parentName,
|
|
123
|
+
})
|
|
124
|
+
: $t('saas.catalog.editor.permissions.description', {
|
|
125
|
+
granted: grantedCount,
|
|
126
|
+
total: allIds.length,
|
|
127
|
+
})
|
|
128
|
+
"
|
|
129
|
+
:ui="{ content: 'max-w-2xl' }"
|
|
130
|
+
>
|
|
131
|
+
<template #body>
|
|
132
|
+
<div class="flex flex-col gap-3">
|
|
133
|
+
<div class="flex items-center gap-2">
|
|
134
|
+
<UInput
|
|
135
|
+
v-model="search"
|
|
136
|
+
icon="i-ph-magnifying-glass"
|
|
137
|
+
class="flex-1"
|
|
138
|
+
:placeholder="$t('saas.catalog.editor.permissions.search')"
|
|
139
|
+
/>
|
|
140
|
+
<UButton color="neutral" variant="ghost" size="sm" @click="toggleAll">
|
|
141
|
+
{{
|
|
142
|
+
isAllExpanded
|
|
143
|
+
? $t('saas.catalog.editor.permissions.collapse_all')
|
|
144
|
+
: $t('saas.catalog.editor.permissions.expand_all')
|
|
145
|
+
}}
|
|
146
|
+
</UButton>
|
|
147
|
+
</div>
|
|
148
|
+
<p
|
|
149
|
+
v-if="shownGroups.length === 0"
|
|
150
|
+
class="text-muted py-6 text-center text-sm"
|
|
151
|
+
>
|
|
152
|
+
{{ $t('saas.catalog.editor.permissions.no_match', { search }) }}
|
|
153
|
+
</p>
|
|
154
|
+
<div
|
|
155
|
+
v-for="group in shownGroups"
|
|
156
|
+
:key="group.node.id"
|
|
157
|
+
class="border-default rounded-lg border"
|
|
158
|
+
>
|
|
159
|
+
<div class="flex items-center gap-2 px-3 py-2">
|
|
160
|
+
<UButton
|
|
161
|
+
color="neutral"
|
|
162
|
+
variant="ghost"
|
|
163
|
+
size="xs"
|
|
164
|
+
square
|
|
165
|
+
:icon="isExpanded(group) ? 'i-ph-caret-down' : 'i-ph-caret-right'"
|
|
166
|
+
:aria-expanded="isExpanded(group)"
|
|
167
|
+
:aria-label="labelOf(group.node)"
|
|
168
|
+
@click="toggleGroup(group)"
|
|
169
|
+
/>
|
|
170
|
+
<UCheckbox
|
|
171
|
+
:model-value="isGranted(group.node.id)"
|
|
172
|
+
:disabled="inheritedSet.has(group.node.id)"
|
|
173
|
+
:label="labelOf(group.node)"
|
|
174
|
+
class="flex-1 font-medium"
|
|
175
|
+
@update:model-value="
|
|
176
|
+
(value: boolean | 'indeterminate') => toggleRow(group, value)
|
|
177
|
+
"
|
|
178
|
+
/>
|
|
179
|
+
<span class="text-muted text-xs tabular-nums">
|
|
180
|
+
{{ groupCount(group) }}
|
|
181
|
+
</span>
|
|
182
|
+
</div>
|
|
183
|
+
<ul
|
|
184
|
+
v-if="isExpanded(group)"
|
|
185
|
+
class="border-default divide-default divide-y border-t"
|
|
186
|
+
>
|
|
187
|
+
<li
|
|
188
|
+
v-for="row in groupRows(group)"
|
|
189
|
+
:key="row.node.id"
|
|
190
|
+
class="flex items-center gap-2 py-1.5 pr-3"
|
|
191
|
+
:style="{ paddingLeft: `${row.depth * 1.25 + 2.5}rem` }"
|
|
192
|
+
>
|
|
193
|
+
<UCheckbox
|
|
194
|
+
:model-value="isGranted(row.node.id)"
|
|
195
|
+
:disabled="inheritedSet.has(row.node.id)"
|
|
196
|
+
:label="labelOf(row.node)"
|
|
197
|
+
:description="
|
|
198
|
+
row.node.description
|
|
199
|
+
? processI18n(row.node.description)
|
|
200
|
+
: undefined
|
|
201
|
+
"
|
|
202
|
+
class="flex-1"
|
|
203
|
+
@update:model-value="
|
|
204
|
+
(value: boolean | 'indeterminate') => toggleRow(row, value)
|
|
205
|
+
"
|
|
206
|
+
/>
|
|
207
|
+
<UBadge
|
|
208
|
+
v-if="inheritedSet.has(row.node.id) && parentName"
|
|
209
|
+
size="sm"
|
|
210
|
+
color="neutral"
|
|
211
|
+
variant="soft"
|
|
212
|
+
>
|
|
213
|
+
{{ parentName }}
|
|
214
|
+
</UBadge>
|
|
215
|
+
<UBadge
|
|
216
|
+
v-else-if="draft.has(row.node.id)"
|
|
217
|
+
size="sm"
|
|
218
|
+
color="primary"
|
|
219
|
+
variant="soft"
|
|
220
|
+
>
|
|
221
|
+
{{ planName }}
|
|
222
|
+
</UBadge>
|
|
223
|
+
</li>
|
|
224
|
+
</ul>
|
|
225
|
+
</div>
|
|
226
|
+
</div>
|
|
227
|
+
</template>
|
|
228
|
+
<template #footer>
|
|
229
|
+
<div class="flex w-full items-center justify-end gap-2">
|
|
230
|
+
<span v-if="delta !== 0" class="text-muted mr-auto text-xs">
|
|
231
|
+
{{
|
|
232
|
+
$t('saas.catalog.editor.permissions.delta', {
|
|
233
|
+
count: delta > 0 ? `+${delta}` : `${delta}`,
|
|
234
|
+
})
|
|
235
|
+
}}
|
|
236
|
+
</span>
|
|
237
|
+
<UButton color="neutral" variant="outline" @click="open = false">
|
|
238
|
+
{{ $t('saas.catalog.common.cancel') }}
|
|
239
|
+
</UButton>
|
|
240
|
+
<UButton @click="apply">
|
|
241
|
+
{{ $t('saas.catalog.editor.permissions.apply') }}
|
|
242
|
+
</UButton>
|
|
243
|
+
</div>
|
|
244
|
+
</template>
|
|
245
|
+
</UModal>
|
|
246
|
+
</template>
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import { highlightParts } from './highlight'
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
workspace: MyWorkspace
|
|
7
|
+
query: string
|
|
8
|
+
isSwitching: boolean
|
|
9
|
+
isDisabled: boolean
|
|
10
|
+
}>()
|
|
11
|
+
|
|
12
|
+
const emit = defineEmits<{ select: [workspace: MyWorkspace] }>()
|
|
13
|
+
|
|
14
|
+
const KEYS = 'saas.workspace.switcher'
|
|
15
|
+
/** States that need no word in the list: the workspace simply works. */
|
|
16
|
+
const QUIET_STATUSES = new Set(['active', 'trialing', 'free'])
|
|
17
|
+
const MATCH_CLASS = 'bg-primary/20 text-highlighted rounded-[2px]'
|
|
18
|
+
|
|
19
|
+
const { t } = useI18n()
|
|
20
|
+
const { statusView } = useSaasStatus()
|
|
21
|
+
|
|
22
|
+
const nameParts = computed(() =>
|
|
23
|
+
highlightParts(props.workspace.name, props.query),
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* The owner is named only when the search matched on them, or when the
|
|
28
|
+
* caller does not own the workspace: otherwise the member count says more.
|
|
29
|
+
*/
|
|
30
|
+
const showsOwner = computed(() => {
|
|
31
|
+
const { ownerName, isOwner } = props.workspace
|
|
32
|
+
if (!ownerName) return false
|
|
33
|
+
const needle = props.query.trim().toLowerCase()
|
|
34
|
+
return !isOwner || (!!needle && ownerName.toLowerCase().includes(needle))
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
const ownerParts = computed(() =>
|
|
38
|
+
highlightParts(props.workspace.ownerName ?? '', props.query),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
const leadMeta = computed(() => {
|
|
42
|
+
const { planName, isComplimentary, membersCount } = props.workspace
|
|
43
|
+
const plan = planName ?? t(`${KEYS}.no_plan`)
|
|
44
|
+
if (isComplimentary) return `${plan} · ${t(`${KEYS}.complimentary`)}`
|
|
45
|
+
if (showsOwner.value) return `${plan} · ${t(`${KEYS}.owner_prefix`)}`
|
|
46
|
+
return `${plan} · ${t(`${KEYS}.members_count`, membersCount)}`
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
const status = computed(() =>
|
|
50
|
+
QUIET_STATUSES.has(props.workspace.status)
|
|
51
|
+
? null
|
|
52
|
+
: statusView('workspace', props.workspace.status),
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
function initialOf(name: string): string {
|
|
56
|
+
return (name.trim()[0] ?? '?').toUpperCase()
|
|
57
|
+
}
|
|
58
|
+
</script>
|
|
59
|
+
|
|
60
|
+
<template>
|
|
61
|
+
<button
|
|
62
|
+
type="button"
|
|
63
|
+
class="hover:bg-elevated flex w-full items-center gap-2.5 rounded-md px-2 py-1.5 text-left text-[13px] transition-colors"
|
|
64
|
+
:class="[
|
|
65
|
+
workspace.isCurrent ? 'bg-primary/10' : 'bg-transparent',
|
|
66
|
+
{ 'cursor-default': workspace.isCurrent || isDisabled },
|
|
67
|
+
]"
|
|
68
|
+
:aria-current="workspace.isCurrent ? 'true' : undefined"
|
|
69
|
+
:aria-busy="isSwitching || undefined"
|
|
70
|
+
:disabled="isDisabled && !isSwitching"
|
|
71
|
+
@click="emit('select', workspace)"
|
|
72
|
+
>
|
|
73
|
+
<span
|
|
74
|
+
class="from-primary-500 to-primary-600 bg-linear-to-br inline-flex size-[22px] shrink-0 items-center justify-center rounded-[5px] text-[11px] font-bold text-white"
|
|
75
|
+
aria-hidden="true"
|
|
76
|
+
>
|
|
77
|
+
{{ initialOf(workspace.name) }}
|
|
78
|
+
</span>
|
|
79
|
+
<span class="flex min-w-0 flex-1 flex-col">
|
|
80
|
+
<span class="text-highlighted truncate font-medium">
|
|
81
|
+
<!-- v-text keeps prettier's line breaks out of the highlighted runs -->
|
|
82
|
+
<template v-for="(part, index) in nameParts" :key="index">
|
|
83
|
+
<mark v-if="part.isMatch" :class="MATCH_CLASS" v-text="part.text" />
|
|
84
|
+
<span v-else v-text="part.text" />
|
|
85
|
+
</template>
|
|
86
|
+
</span>
|
|
87
|
+
<span class="text-muted truncate text-[11.5px]">
|
|
88
|
+
{{ leadMeta }}
|
|
89
|
+
<template v-if="showsOwner">
|
|
90
|
+
<template v-for="(part, index) in ownerParts" :key="index">
|
|
91
|
+
<mark v-if="part.isMatch" :class="MATCH_CLASS" v-text="part.text" />
|
|
92
|
+
<span v-else v-text="part.text" />
|
|
93
|
+
</template>
|
|
94
|
+
</template>
|
|
95
|
+
</span>
|
|
96
|
+
</span>
|
|
97
|
+
<DmsStatusPill
|
|
98
|
+
v-if="status"
|
|
99
|
+
size="sm"
|
|
100
|
+
:tone="status.tone"
|
|
101
|
+
:label="status.label"
|
|
102
|
+
/>
|
|
103
|
+
<UIcon
|
|
104
|
+
v-if="isSwitching"
|
|
105
|
+
name="i-ph-spinner-gap"
|
|
106
|
+
class="text-primary size-4 shrink-0 animate-spin"
|
|
107
|
+
:aria-label="$t(`${KEYS}.switching`)"
|
|
108
|
+
/>
|
|
109
|
+
<UIcon
|
|
110
|
+
v-else-if="workspace.isCurrent"
|
|
111
|
+
name="i-ph-check"
|
|
112
|
+
class="text-primary size-4 shrink-0"
|
|
113
|
+
:aria-label="$t(`${KEYS}.current`)"
|
|
114
|
+
/>
|
|
115
|
+
</button>
|
|
116
|
+
</template>
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import type { CreditNotePreview } from '../composables/useCreditNoteDraft'
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{ preview: CreditNotePreview }>()
|
|
6
|
+
|
|
7
|
+
const TEXT = 'saas.operator_billing.credit_modal'
|
|
8
|
+
const LINE_PERIOD_FORMAT: Intl.DateTimeFormatOptions = {
|
|
9
|
+
day: 'numeric',
|
|
10
|
+
month: 'short',
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const { t, locale } = useI18n()
|
|
14
|
+
const { formatMinorUnits } = useMoneyFormat()
|
|
15
|
+
|
|
16
|
+
const currency = computed(() => props.preview.invoice.currency)
|
|
17
|
+
const money = (amount: number) => formatMinorUnits(amount, currency.value)
|
|
18
|
+
const day = (value: string | null) =>
|
|
19
|
+
formatDate(value, locale.value, LINE_PERIOD_FORMAT) ?? ''
|
|
20
|
+
|
|
21
|
+
function linePeriod(start: string | null, end: string | null): string {
|
|
22
|
+
if (!start) return ''
|
|
23
|
+
return end ? `${day(start)} – ${day(end)}` : day(start)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const lineItems = computed(() =>
|
|
27
|
+
props.preview.invoice.lines.map((line, index) => ({
|
|
28
|
+
id: `line-${index}`,
|
|
29
|
+
label: line.description || '—',
|
|
30
|
+
value: money(line.amount),
|
|
31
|
+
type: 'mono' as const,
|
|
32
|
+
detail: linePeriod(line.periodStart, line.periodEnd),
|
|
33
|
+
})),
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
const settledItem = computed(() => {
|
|
37
|
+
const isPaid = props.preview.invoice.status === 'paid'
|
|
38
|
+
return {
|
|
39
|
+
id: 'settled',
|
|
40
|
+
label: t(`${TEXT}.${isPaid ? 'paid' : 'total'}`),
|
|
41
|
+
value: money(
|
|
42
|
+
isPaid ? props.preview.invoice.amountPaid : props.preview.invoice.total,
|
|
43
|
+
),
|
|
44
|
+
type: 'mono' as const,
|
|
45
|
+
}
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
const creditItems = computed(() =>
|
|
49
|
+
props.preview.priorCredits
|
|
50
|
+
.filter((note) => note.status === 'issued')
|
|
51
|
+
.map((note) => ({
|
|
52
|
+
id: note.number,
|
|
53
|
+
label: t(`${TEXT}.already_credited`),
|
|
54
|
+
detail: `${note.number} · ${day(note.issuedAt)}`,
|
|
55
|
+
value: money(-note.amount),
|
|
56
|
+
type: 'mono' as const,
|
|
57
|
+
})),
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
const items = computed(() => [
|
|
61
|
+
...lineItems.value,
|
|
62
|
+
{
|
|
63
|
+
id: 'tax',
|
|
64
|
+
label: t(`${TEXT}.tax`),
|
|
65
|
+
value: money(props.preview.invoice.tax),
|
|
66
|
+
type: 'mono' as const,
|
|
67
|
+
},
|
|
68
|
+
settledItem.value,
|
|
69
|
+
...creditItems.value,
|
|
70
|
+
{
|
|
71
|
+
id: 'creditable',
|
|
72
|
+
label: t(`${TEXT}.still_creditable`),
|
|
73
|
+
value: money(props.preview.creditable),
|
|
74
|
+
type: 'mono' as const,
|
|
75
|
+
tone: 'success' as const,
|
|
76
|
+
},
|
|
77
|
+
])
|
|
78
|
+
</script>
|
|
79
|
+
|
|
80
|
+
<template>
|
|
81
|
+
<DmsKeyValueList :items="items" dense />
|
|
82
|
+
</template>
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* One field of a hand-built form, drawn as a DMS form draws its rows
|
|
4
|
+
* (`FormEntries` / `FormFieldControl`): a `DmsFieldRow` holding the label,
|
|
5
|
+
* its description and the required mark, and a label-less `UFormField`
|
|
6
|
+
* holding the control, its help line and its error, which also marks the
|
|
7
|
+
* control invalid.
|
|
8
|
+
*/
|
|
9
|
+
import { computed, useId } from 'vue'
|
|
10
|
+
|
|
11
|
+
interface FormFieldRowProps {
|
|
12
|
+
label?: string
|
|
13
|
+
/** Under the label. */
|
|
14
|
+
description?: string
|
|
15
|
+
/** Under the control, replaced by the error while there is one. */
|
|
16
|
+
help?: string
|
|
17
|
+
/** Already translated; marks the control invalid. */
|
|
18
|
+
error?: string | null
|
|
19
|
+
required?: boolean
|
|
20
|
+
/** The card's side inset: rows of a `DmsSection`. */
|
|
21
|
+
inset?: boolean
|
|
22
|
+
/**
|
|
23
|
+
* Whether the label names the control the default slot binds the id to;
|
|
24
|
+
* off for a group of controls (cards, a Stripe element).
|
|
25
|
+
*/
|
|
26
|
+
labelsControl?: boolean
|
|
27
|
+
/**
|
|
28
|
+
* Label above the control, no padding nor hairline: one of several fields
|
|
29
|
+
* sharing a row of a card, which spaces them itself.
|
|
30
|
+
*/
|
|
31
|
+
stacked?: boolean
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
interface FormFieldRowControl {
|
|
35
|
+
/** Id of the control, the one the label points to. */
|
|
36
|
+
id: string
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
interface FormFieldRowSlots {
|
|
40
|
+
/** The control; bind `id` onto it. */
|
|
41
|
+
default?: (control: FormFieldRowControl) => unknown
|
|
42
|
+
/** Replaces the help line (rich text, an icon). */
|
|
43
|
+
help?: () => unknown
|
|
44
|
+
/** Inline after the label (a badge). */
|
|
45
|
+
'label-extra'?: () => unknown
|
|
46
|
+
/** Under the help line, in the control column (a summary of the value). */
|
|
47
|
+
after?: () => unknown
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const props = withDefaults(defineProps<FormFieldRowProps>(), {
|
|
51
|
+
label: undefined,
|
|
52
|
+
description: undefined,
|
|
53
|
+
help: undefined,
|
|
54
|
+
error: null,
|
|
55
|
+
required: false,
|
|
56
|
+
inset: false,
|
|
57
|
+
labelsControl: true,
|
|
58
|
+
stacked: false,
|
|
59
|
+
})
|
|
60
|
+
const slots = defineSlots<FormFieldRowSlots>()
|
|
61
|
+
|
|
62
|
+
const controlId = useId()
|
|
63
|
+
|
|
64
|
+
// A form row without a label stacks: in the form layout its control would
|
|
65
|
+
// sit in the 240px label column.
|
|
66
|
+
const layout = computed(() =>
|
|
67
|
+
props.label && !props.stacked ? 'form' : 'stack',
|
|
68
|
+
)
|
|
69
|
+
const spacing = computed(() => (props.stacked ? 'list' : 'row'))
|
|
70
|
+
</script>
|
|
71
|
+
|
|
72
|
+
<template>
|
|
73
|
+
<DmsFieldRow
|
|
74
|
+
:layout="layout"
|
|
75
|
+
:inset="props.inset"
|
|
76
|
+
:spacing="spacing"
|
|
77
|
+
:label="props.label"
|
|
78
|
+
:description="props.description"
|
|
79
|
+
:label-for="props.labelsControl ? controlId : undefined"
|
|
80
|
+
:required="props.required"
|
|
81
|
+
>
|
|
82
|
+
<template v-if="slots['label-extra']" #label-extra>
|
|
83
|
+
<slot name="label-extra" />
|
|
84
|
+
</template>
|
|
85
|
+
<UFormField
|
|
86
|
+
:help="props.help"
|
|
87
|
+
:error="props.error ?? undefined"
|
|
88
|
+
class="min-w-0"
|
|
89
|
+
>
|
|
90
|
+
<slot :id="controlId" />
|
|
91
|
+
<template v-if="slots.help" #help>
|
|
92
|
+
<slot name="help" />
|
|
93
|
+
</template>
|
|
94
|
+
</UFormField>
|
|
95
|
+
<slot name="after" />
|
|
96
|
+
</DmsFieldRow>
|
|
97
|
+
</template>
|