@cosmicdrift/kumiko-samples 0.374.0 → 0.378.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/package.json +1 -1
- package/packages/bundled-features/package.json +6 -4
- package/packages/bundled-features/src/account-security/changes.json +6 -0
- package/packages/bundled-features/src/account-security/constants.ts +1 -0
- package/packages/bundled-features/src/account-security/index.ts +1 -0
- package/packages/bundled-features/src/admin-shell/web/client-plugin.tsx +1 -1
- package/packages/bundled-features/src/audit/web/client-plugin.tsx +1 -1
- package/packages/bundled-features/src/auth-email-password/mail-notifications.ts +1 -1
- package/packages/bundled-features/src/auth-email-password/web/auth-client.ts +1 -1
- package/packages/bundled-features/src/auth-email-password/web/auth-form-primitives.tsx +1 -1
- package/packages/bundled-features/src/auth-email-password/web/client-plugin.ts +3 -3
- package/packages/bundled-features/src/auth-email-password/web/default-topbar-actions.tsx +1 -1
- package/packages/bundled-features/src/auth-email-password/web/index.ts +1 -1
- package/packages/bundled-features/src/auth-email-password/web/session.tsx +1 -1
- package/packages/bundled-features/src/auth-email-password/web/tenant-menu-items.tsx +1 -1
- package/packages/bundled-features/src/auth-email-password/web/tenant-switcher.tsx +1 -1
- package/packages/bundled-features/src/auth-email-password/web/user-menu.tsx +1 -1
- package/packages/bundled-features/src/auth-foundation/changes.json +6 -0
- package/packages/bundled-features/src/auth-foundation/env.ts +27 -0
- package/packages/bundled-features/src/auth-foundation/index.ts +1 -0
- package/packages/bundled-features/src/billing-foundation/changes.json +6 -0
- package/packages/bundled-features/src/billing-foundation/consumer-protection/confirmation-mail.ts +1 -1
- package/packages/bundled-features/src/billing-foundation/consumer-protection/termination-pages.ts +1 -1
- package/packages/bundled-features/src/billing-foundation/contact-card.ts +14 -0
- package/packages/bundled-features/src/billing-foundation/handlers/billing-plans.query.ts +1 -1
- package/packages/bundled-features/src/billing-foundation/index.ts +1 -0
- package/packages/bundled-features/src/billing-foundation/plan-catalog.ts +1 -0
- package/packages/bundled-features/src/billing-foundation/types.ts +12 -0
- package/packages/bundled-features/src/billing-foundation/validate-options.ts +16 -0
- package/packages/bundled-features/src/billing-foundation/web/billing-contact-plan.tsx +32 -0
- package/packages/bundled-features/src/billing-foundation/web/billing-plans-panel.tsx +5 -15
- package/packages/bundled-features/src/billing-foundation/web/cancel-contract-dialog.tsx +2 -2
- package/packages/bundled-features/src/billing-foundation/web/checkout-consent-dialog.tsx +1 -1
- package/packages/bundled-features/src/billing-foundation/web/client-plugin.tsx +1 -1
- package/packages/bundled-features/src/billing-foundation/web/localized-params.ts +14 -0
- package/packages/bundled-features/src/cap-counter/changes.json +12 -0
- package/packages/bundled-features/src/cap-counter/stock-cap-guard.ts +9 -0
- package/packages/bundled-features/src/cap-overview/web/cap-cards-panel.tsx +3 -3
- package/packages/bundled-features/src/cap-overview/web/client-plugin.tsx +1 -1
- package/packages/bundled-features/src/channel-email/changes.json +6 -0
- package/packages/bundled-features/src/channel-email/email-channel.ts +2 -1
- package/packages/bundled-features/src/compliance-profiles/web/client-plugin.tsx +1 -1
- package/packages/bundled-features/src/config/feature.ts +2 -2
- package/packages/bundled-features/src/config/web/i18n.ts +1 -0
- package/packages/bundled-features/src/crypto-shredding/changes.json +6 -0
- package/packages/bundled-features/src/custom-fields/web/client-plugin.tsx +1 -1
- package/packages/bundled-features/src/delivery/unsubscribe-page.ts +1 -1
- package/packages/bundled-features/src/delivery/web/client-plugin.tsx +1 -1
- package/packages/bundled-features/src/delivery/web/delivery-status-cell.tsx +1 -1
- package/packages/bundled-features/src/feature-toggles/web/client-plugin.tsx +1 -1
- package/packages/bundled-features/src/file-provider-s3/changes.json +6 -0
- package/packages/bundled-features/src/file-provider-s3/env-named-feature.ts +45 -0
- package/packages/bundled-features/src/file-provider-s3/env-schema.ts +20 -13
- package/packages/bundled-features/src/file-provider-s3/index.ts +4 -0
- package/packages/bundled-features/src/folders/web/client-plugin.tsx +1 -1
- package/packages/bundled-features/src/folders/web/folder-section.tsx +3 -4
- package/packages/bundled-features/src/host-routing/README.md +7 -0
- package/packages/bundled-features/src/host-routing/changes.json +6 -0
- package/packages/bundled-features/src/host-routing/constants.ts +4 -0
- package/packages/bundled-features/src/host-routing/dispatch.ts +34 -26
- package/packages/bundled-features/src/host-routing/feature.ts +122 -41
- package/packages/bundled-features/src/host-routing/host.ts +28 -1
- package/packages/bundled-features/src/host-routing/index.ts +3 -0
- package/packages/bundled-features/src/host-routing/options.ts +45 -2
- package/packages/bundled-features/src/host-routing/redirects.ts +33 -0
- package/packages/bundled-features/src/host-routing/tenant-lookup.ts +65 -0
- package/packages/bundled-features/src/host-routing/validate-options.ts +48 -1
- package/packages/bundled-features/src/inbound-mail-foundation/changes.json +13 -0
- package/packages/bundled-features/src/inbound-mail-foundation/feature.ts +8 -0
- package/packages/bundled-features/src/inbound-mail-foundation/handlers/list-accounts.query.ts +11 -4
- package/packages/bundled-features/src/inbound-mail-foundation/i18n.ts +42 -0
- package/packages/bundled-features/src/inbound-mail-foundation/index.ts +4 -0
- package/packages/bundled-features/src/inbound-mail-foundation/screens.ts +100 -0
- package/packages/bundled-features/src/inbound-mail-foundation/types.ts +2 -2
- package/packages/bundled-features/src/jobs/web/client-plugin.tsx +1 -1
- package/packages/bundled-features/src/legal-pages/changes.json +6 -0
- package/packages/bundled-features/src/legal-pages/feature.ts +14 -1
- package/packages/bundled-features/src/legal-pages/layout.ts +6 -6
- package/packages/bundled-features/src/legal-pages/web/client-plugin.ts +1 -1
- package/packages/bundled-features/src/mail-foundation/changes.json +6 -0
- package/packages/bundled-features/src/mail-foundation/feature.ts +21 -22
- package/packages/bundled-features/src/mail-foundation/i18n.ts +3 -2
- package/packages/bundled-features/src/mail-transport-smtp/i18n.ts +1 -1
- package/packages/bundled-features/src/managed-pages/web/client-plugin.tsx +1 -1
- package/packages/bundled-features/src/notes-history/web/client-plugin.tsx +1 -1
- package/packages/bundled-features/src/page-render/branding.ts +1 -1
- package/packages/bundled-features/src/page-render/layout.ts +2 -2
- package/packages/bundled-features/src/page-render/markdown.ts +1 -1
- package/packages/bundled-features/src/personal-access-tokens/i18n.ts +1 -1
- package/packages/bundled-features/src/personal-access-tokens/screens.ts +1 -1
- package/packages/bundled-features/src/secrets/feature.ts +4 -4
- package/packages/bundled-features/src/seo/sitemap.ts +1 -1
- package/packages/bundled-features/src/shared/mail-template-body.ts +1 -1
- package/packages/bundled-features/src/shared/purge-files-reaching-subject.ts +127 -2
- package/packages/bundled-features/src/tags/web/client-plugin.tsx +1 -1
- package/packages/bundled-features/src/template-resolver/changes.json +38 -0
- package/packages/bundled-features/src/template-resolver/compile-document-body.ts +61 -3
- package/packages/bundled-features/src/template-resolver/constants.ts +3 -0
- package/packages/bundled-features/src/template-resolver/document-blocks.ts +36 -0
- package/packages/bundled-features/src/template-resolver/document-images.ts +29 -0
- package/packages/bundled-features/src/template-resolver/document-ops.ts +515 -0
- package/packages/bundled-features/src/template-resolver/document-sanitizer.ts +44 -0
- package/packages/bundled-features/src/template-resolver/document-schema.ts +5 -0
- package/packages/bundled-features/src/template-resolver/feature.ts +79 -34
- package/packages/bundled-features/src/template-resolver/handlers/bundle-import.ts +1 -0
- package/packages/bundled-features/src/template-resolver/handlers/collection-item.query.ts +1 -1
- package/packages/bundled-features/src/template-resolver/handlers/collection-list.query.ts +1 -1
- package/packages/bundled-features/src/template-resolver/handlers/collection-set.write.ts +2 -6
- package/packages/bundled-features/src/template-resolver/handlers/collection-shared.ts +0 -6
- package/packages/bundled-features/src/template-resolver/handlers/copy-locale.write.ts +67 -58
- package/packages/bundled-features/src/template-resolver/handlers/discard-draft.write.ts +36 -13
- package/packages/bundled-features/src/template-resolver/handlers/document-base.ts +86 -0
- package/packages/bundled-features/src/template-resolver/handlers/document-blocks.query.ts +48 -0
- package/packages/bundled-features/src/template-resolver/handlers/export-bundle.query.ts +11 -3
- package/packages/bundled-features/src/template-resolver/handlers/import-bundle.write.ts +37 -28
- package/packages/bundled-features/src/template-resolver/handlers/overview.query.ts +66 -62
- package/packages/bundled-features/src/template-resolver/handlers/patch-draft.write.ts +134 -0
- package/packages/bundled-features/src/template-resolver/handlers/preview.query.ts +2 -1
- package/packages/bundled-features/src/template-resolver/handlers/reset-to-system.write.ts +62 -49
- package/packages/bundled-features/src/template-resolver/handlers/resource-link-pdf.write.ts +44 -29
- package/packages/bundled-features/src/template-resolver/handlers/resource-remove.write.ts +52 -36
- package/packages/bundled-features/src/template-resolver/handlers/resource-upload.write.ts +126 -106
- package/packages/bundled-features/src/template-resolver/handlers/send-test-shared.ts +38 -0
- package/packages/bundled-features/src/template-resolver/handlers/send-test-status.query.ts +31 -0
- package/packages/bundled-features/src/template-resolver/handlers/send-test.write.ts +105 -110
- package/packages/bundled-features/src/template-resolver/handlers/set.write.ts +110 -103
- package/packages/bundled-features/src/template-resolver/handlers/template-write.ts +22 -1
- package/packages/bundled-features/src/template-resolver/handlers/toggle-status.write.ts +56 -28
- package/packages/bundled-features/src/template-resolver/handlers/upsert-tenant.write.ts +38 -29
- package/packages/bundled-features/src/template-resolver/handlers/validate.query.ts +24 -9
- package/packages/bundled-features/src/template-resolver/index.ts +8 -1
- package/packages/bundled-features/src/template-resolver/{web/placeholder-text.ts → placeholder-text.ts} +1 -1
- package/packages/bundled-features/src/template-resolver/qualified-names.ts +4 -0
- package/packages/bundled-features/src/template-resolver/seeding.ts +3 -1
- package/packages/bundled-features/src/template-resolver/template-bundle.ts +6 -1
- package/packages/bundled-features/src/template-resolver/template-edit-policy.ts +91 -0
- package/packages/bundled-features/src/template-resolver/template-preview.ts +32 -10
- package/packages/bundled-features/src/template-resolver/template-validation.ts +32 -11
- package/packages/bundled-features/src/template-resolver/web/client-plugin.tsx +3 -3
- package/packages/bundled-features/src/template-resolver/web/document-editor-extensions.ts +29 -0
- package/packages/bundled-features/src/template-resolver/web/document-tiptap-editor.tsx +43 -5
- package/packages/bundled-features/src/template-resolver/web/document-toolbar-blocks.ts +9 -33
- package/packages/bundled-features/src/template-resolver/web/i18n.ts +30 -0
- package/packages/bundled-features/src/template-resolver/web/placeholder-line-editor.tsx +2 -2
- package/packages/bundled-features/src/tenant/web/client-plugin.tsx +1 -1
- package/packages/bundled-features/src/tenant/web/member-status-cell.tsx +1 -1
- package/packages/bundled-features/src/tier-engine/web/client-plugin.tsx +1 -1
- package/packages/bundled-features/src/user-data-rights/changes.json +6 -0
- package/packages/bundled-features/src/user-data-rights/env.ts +15 -0
- package/packages/bundled-features/src/user-data-rights/feature.ts +4 -2
- package/packages/bundled-features/src/user-data-rights/index.ts +1 -0
- package/packages/bundled-features/src/user-data-rights/lib/mail-transport-resolver.ts +1 -1
- package/packages/bundled-features/src/user-data-rights/lib/storage-provider-resolver.ts +1 -1
- package/packages/bundled-features/src/user-data-rights/mail-notifications.ts +1 -1
- package/packages/bundled-features/src/user-data-rights/web/client-plugin.tsx +1 -1
- package/packages/bundled-features/src/user-data-rights/web/privacy-center-screen.tsx +2 -2
- package/packages/bundled-features/src/waitlist/changes.json +6 -0
- package/packages/bundled-features/src/waitlist/legacy-migrate.ts +51 -2
- package/samples/apps/admin-console/package.json +0 -3
- package/samples/apps/admin-console/src/app/client.tsx +1 -1
- package/samples/apps/admin-console/src/app/shell.tsx +1 -1
- package/samples/apps/config-demo/package.json +1 -3
- package/samples/apps/config-demo/src/app/client.tsx +1 -1
- package/samples/apps/config-demo/src/app/shell.tsx +2 -2
- package/samples/apps/config-demo/src/features/demo/web/index.ts +1 -1
- package/samples/apps/config-demo/tsconfig.json +0 -12
- package/samples/apps/marketing-demo/package.json +1 -3
- package/samples/apps/marketing-demo/src/app/client.tsx +1 -1
- package/samples/apps/marketing-demo/src/app/shell.tsx +1 -1
- package/samples/apps/marketing-demo/src/features/assets/web/index.ts +1 -1
- package/samples/apps/marketing-demo/src/features/helpdesk/web/index.ts +1 -1
- package/samples/apps/showcase/package.json +1 -3
- package/samples/apps/showcase/src/app/client.tsx +1 -1
- package/samples/apps/showcase/src/app/shell.tsx +1 -1
- package/samples/apps/showcase/src/features/demos/web/index.ts +1 -1
- package/samples/apps/showcase/src/features/demos/web/pages/sidebar-panel.tsx +1 -1
- package/samples/apps/showcase/src/features/demos/web/pages/toast.tsx +1 -1
- package/samples/apps/showcase/src/features/items/web/index.ts +1 -1
- package/samples/apps/styleguide/package.json +1 -3
- package/samples/apps/styleguide/src/app/client.tsx +1 -1
- package/samples/apps/styleguide/src/app/shell.tsx +2 -2
- package/samples/apps/styleguide/src/features/ai-settings/web.ts +1 -1
- package/samples/apps/styleguide/src/features/content/web.tsx +2 -2
- package/samples/apps/styleguide/src/features/demo/web.ts +1 -1
- package/samples/apps/styleguide/src/features/examples/web.ts +1 -1
- package/samples/apps/styleguide/src/features/gallery/web/Gallery.tsx +1 -1
- package/samples/apps/styleguide/src/features/gallery/web/index.ts +1 -1
- package/samples/apps/styleguide/src/features/widgets/demo-locale.ts +1 -1
- package/samples/apps/styleguide/src/features/widgets/lib/format.ts +1 -1
- package/samples/apps/styleguide/src/features/widgets/web/DashboardFilterEcho.tsx +1 -1
- package/samples/apps/styleguide/src/features/widgets/web/FormExamples.tsx +1 -1
- package/samples/apps/styleguide/src/features/widgets/web/Widgets.tsx +1 -1
- package/samples/apps/styleguide/src/features/widgets/web/index.ts +1 -1
- package/samples/apps/styleguide/tsconfig.json +0 -12
- package/samples/apps/ui-walkthrough/package.json +1 -3
- package/samples/apps/ui-walkthrough/src/app/client.tsx +1 -1
- package/samples/apps/ui-walkthrough/src/app/help-action.tsx +37 -0
- package/samples/apps/ui-walkthrough/src/app/seed-templates.ts +2 -0
- package/samples/apps/ui-walkthrough/src/app/shell.tsx +7 -1
- package/samples/apps/ui-walkthrough/src/app/template-seed-data.ts +20 -0
- package/samples/apps/ui-walkthrough/src/features/billing/web/index.ts +1 -1
- package/samples/apps/ui-walkthrough/src/features/rental/feature.ts +65 -1
- package/samples/apps/ui-walkthrough/src/features/rental/i18n.ts +70 -0
- package/samples/apps/ui-walkthrough/src/features/rental/invoice-receive.ts +20 -0
- package/samples/apps/ui-walkthrough/src/features/rental/lease-support.ts +15 -0
- package/samples/apps/ui-walkthrough/src/features/rental/qualified-names.ts +2 -0
- package/samples/apps/ui-walkthrough/src/features/rental/screens.ts +79 -0
- package/samples/apps/ui-walkthrough/src/features/rental/web/index.ts +3 -1
- package/samples/apps/ui-walkthrough/src/features/rental/web/upload-standard-layout.tsx +61 -0
- package/samples/apps/ui-walkthrough/src/features/tasks/i18n.ts +8 -0
- package/samples/apps/ui-walkthrough/src/features/tasks/web/index.ts +1 -1
- package/samples/apps/ui-walkthrough/src/features/vehicles/web/index.ts +1 -1
- package/samples/apps/ui-walkthrough/src/run-config.ts +32 -3
- package/samples/apps/use-all-bundled/bin/main.ts +3 -2
- package/samples/apps/use-all-bundled/e2e-billing-gallery/gallery-features.ts +12 -0
- package/samples/apps/use-all-bundled/e2e-billing-gallery/server.ts +1 -1
- package/samples/apps/use-all-bundled/feature-manifest.json +3 -2
- package/samples/apps/use-all-bundled/package.json +1 -3
- package/samples/apps/use-all-bundled/src/app/client.tsx +1 -1
- package/samples/apps/use-all-bundled/src/app/dev-app-options.ts +5 -4
- package/samples/apps/use-all-bundled/src/app/shell.tsx +1 -1
- package/samples/apps/use-all-bundled/src/run-config.ts +10 -1
- package/samples/apps/workspaces/package.json +1 -3
- package/samples/apps/workspaces/src/app/client.tsx +1 -1
- package/samples/apps/workspaces/src/app/shell.tsx +1 -1
- package/samples/apps/workspaces/src/features/demo/web/index.ts +1 -1
- package/samples/apps/workspaces/src/features/demo-driver/web/index.ts +1 -1
- package/samples/recipes/apex-landing/package.json +1 -1
- package/samples/recipes/apex-landing/src/feature.ts +1 -1
- package/samples/recipes/apex-surface-auth/README.md +1 -1
- package/samples/recipes/apex-surface-auth/src/feature.ts +2 -2
- package/samples/recipes/compose-stacks/README.md +7 -4
- package/samples/recipes/delivery-notifications/README.md +1 -1
- package/samples/recipes/embedded/README.md +8 -0
- package/samples/recipes/embedded/src/feature.ts +8 -0
- package/samples/recipes/embedded/src/handlers/invoice-receive.write.ts +38 -0
- package/samples/recipes/embedded/src/screens/invoice-receive.screen.ts +59 -0
- package/samples/recipes/embedded-entity-form/package.json +0 -1
- package/samples/recipes/embedded-entity-form/src/web/accept-suggestion-drawer.tsx +1 -1
- package/samples/recipes/notes-history-basic/README.md +1 -1
- package/samples/recipes/record-detail-layout/package.json +0 -1
- package/samples/recipes/tags-basic/README.md +1 -1
- package/samples/recipes/user-profile/README.md +1 -1
- package/samples/recipes/wizard-form/package.json +0 -1
- package/samples/recipes/wizard-form/src/web/index.ts +2 -2
- package/samples/recipes/wizard-form/src/web/listing-review-section.tsx +2 -2
- package/samples/recipes/writeform-section/package.json +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { emailPasswordClient } from "@cosmicdrift/kumiko-bundled-features/auth-email-password/web";
|
|
2
2
|
import { localeDeClient } from "@cosmicdrift/kumiko-locale-de/web";
|
|
3
|
-
import { createKumikoApp } from "@cosmicdrift/kumiko-renderer
|
|
3
|
+
import { createKumikoApp } from "@cosmicdrift/kumiko-renderer/web";
|
|
4
4
|
import { demoClient } from "../features/demo/web";
|
|
5
5
|
import { driverClient } from "../features/demo-driver/web";
|
|
6
6
|
import { AppShell } from "./shell";
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
DefaultTopbarActions,
|
|
6
6
|
useShellUser,
|
|
7
7
|
} from "@cosmicdrift/kumiko-bundled-features/auth-email-password/web";
|
|
8
|
-
import { type AppSchema, WorkspaceShell } from "@cosmicdrift/kumiko-renderer
|
|
8
|
+
import { type AppSchema, WorkspaceShell } from "@cosmicdrift/kumiko-renderer/web";
|
|
9
9
|
import { MoonStar, Sun } from "lucide-react";
|
|
10
10
|
import type { ReactNode } from "react";
|
|
11
11
|
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
type ApexPage,
|
|
19
19
|
type ApexPricingTier,
|
|
20
20
|
renderApexPage,
|
|
21
|
-
} from "@cosmicdrift/kumiko-headless/apex";
|
|
21
|
+
} from "@cosmicdrift/kumiko-renderer/headless/apex";
|
|
22
22
|
import { HERO_SCREENSHOT } from "./constants";
|
|
23
23
|
|
|
24
24
|
// --- Inputs: shapes the surrounding features hand you -----------------------
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
import {
|
|
35
35
|
RequestAccountDeletionScreen, ConfirmAccountDeletionScreen,
|
|
36
36
|
} from "@cosmicdrift/kumiko-bundled-features/user-data-rights/web";
|
|
37
|
-
import { createPublicSurface } from "@cosmicdrift/kumiko-renderer
|
|
37
|
+
import { createPublicSurface } from "@cosmicdrift/kumiko-renderer/web";
|
|
38
38
|
|
|
39
39
|
// createLoginRoute, not a raw LoginScreen render — it owns the challenge-
|
|
40
40
|
// swap for a second factor, so mounting auth-mfa later doesn't need this
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
// 2. Client (Kommentar unten + README): wie createPublicSurface + AuthShell
|
|
12
12
|
// die Screens in der Apex-Chrome mounten.
|
|
13
13
|
//
|
|
14
|
-
// CLIENT-WIRING (apex.tsx der App — renderer
|
|
14
|
+
// CLIENT-WIRING (apex.tsx der App — renderer/web, hier nur als Referenz, da
|
|
15
15
|
// Recipes keine Browser-Deps ziehen):
|
|
16
16
|
//
|
|
17
17
|
// import {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
// RequestAccountDeletionScreen, ConfirmAccountDeletionScreen,
|
|
23
23
|
// defaultTranslations as deletionI18n,
|
|
24
24
|
// } from "@cosmicdrift/kumiko-bundled-features/user-data-rights/web";
|
|
25
|
-
// import { createPublicSurface } from "@cosmicdrift/kumiko-renderer
|
|
25
|
+
// import { createPublicSurface } from "@cosmicdrift/kumiko-renderer/web";
|
|
26
26
|
//
|
|
27
27
|
// // AuthShell: die Auth-Card rendert in der Marketing-Chrome statt
|
|
28
28
|
// // Fullscreen. Default (ohne Provider) bleibt der Fullscreen-Wrapper.
|
|
@@ -36,22 +36,25 @@ the option.
|
|
|
36
36
|
| `composeGdprStack` | `kmsMode` | `kms` or `allowPlaintextPii` |
|
|
37
37
|
| `composeGdprStack({ selfService })`, `composeUserDataRightsStack` | `mail` | a mounted `channel-email` |
|
|
38
38
|
| `composeSecurityStack` | `kmsMode`, `rateLimit` not `false` | `kms` or `allowPlaintextPii` |
|
|
39
|
-
| `composeSaasStack({ billing: "stripe" })` | `billing` | a mounted subscription provider |
|
|
39
|
+
| `composeSaasStack({ billing: "stripe" })` | `billing` (warning only) | a mounted subscription provider |
|
|
40
40
|
|
|
41
41
|
A missing option fails the boot with:
|
|
42
42
|
|
|
43
43
|
```
|
|
44
44
|
[runProdApp] stacks in `features` need boot options that are not set:
|
|
45
|
-
-
|
|
45
|
+
- composeGdprStack needs the boot option `kmsMode`: set kmsMode: "required" (or { plaintextReason } for a demo)
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
+
A stripe `composeSaasStack` without `billing` boots and logs the same line as a warning, so an
|
|
49
|
+
app can go live before its prices exist.
|
|
50
|
+
|
|
48
51
|
## Flow
|
|
49
52
|
|
|
50
53
|
1. `src/app.ts` lists the stacks and the boot options they need.
|
|
51
54
|
2. The test boots with `KUMIKO_DRY_RUN_ENV=boot`, which runs the whole
|
|
52
55
|
validation and stops before any DB or Redis connection: with the options
|
|
53
|
-
the boot passes, without `
|
|
54
|
-
|
|
56
|
+
the boot passes, without `kmsMode` it fails and names the stacks, and
|
|
57
|
+
without `billing` it warns.
|
|
55
58
|
|
|
56
59
|
## Tests
|
|
57
60
|
|
|
@@ -8,7 +8,7 @@ Shows how a feature sends notifications to multiple channels (InApp + Email + Pu
|
|
|
8
8
|
|
|
9
9
|
**Mail text is stored data:** The boot seed (`seedNotificationTemplates`) writes the declared `template` and `meta` into the template store as system templates. The email channel renders them with `renderer-mail-html`. A notification routed to email without `template` and `meta` fails its delivery.
|
|
10
10
|
|
|
11
|
-
**Tenant override:**
|
|
11
|
+
**Tenant override:** Only a SystemAdmin edits templates unless the app unlocks them. The app lists the mail in `createTemplateResolverFeature({ tenantEditable: [{ kind: "mail", slug, access: { roles: ["TenantAdmin"] } }] })`; then a tenant admin overrides the text through the template-resolver handlers (`upsertTenant`, then `publish`) and every other template is refused with 403. The next mail for that tenant uses the override; the system text stays for everyone else.
|
|
12
12
|
|
|
13
13
|
**Sending:** The write handler calls `ctx.notify(type, { to, data })`. The `data` keys are the template variables; sending fails loudly when a required variable is missing.
|
|
14
14
|
|
|
@@ -19,6 +19,14 @@ object and an embedded list rendered by a declarative `entityEdit` screen.
|
|
|
19
19
|
`createEmbeddedListField`; its renderer receives `embeddedListCells`, so no
|
|
20
20
|
custom screen component is required.
|
|
21
21
|
|
|
22
|
+
- **Derived head totals** (`src/screens/invoice-receive.screen.ts`): an
|
|
23
|
+
`actionForm` declares `derive` so net, VAT, and gross follow the lines
|
|
24
|
+
(`listSum`), or follow a typed net and VAT rate while the list is empty
|
|
25
|
+
(`whenEmpty`, `percent`). The renderer shows them read-only and live; the
|
|
26
|
+
handler wraps its schema with `withFormDerivations(schema, screen)`
|
|
27
|
+
(`src/handlers/invoice-receive.write.ts`), so totals sent by the client are
|
|
28
|
+
replaced on the server.
|
|
29
|
+
|
|
22
30
|
## When to reach for it
|
|
23
31
|
|
|
24
32
|
Use an embedded field or list when the nested data is created, changed, and
|
|
@@ -15,6 +15,9 @@
|
|
|
15
15
|
// on its `lines` sub-fields (Issue #1835), plus a declarative
|
|
16
16
|
// entityEdit screen that renders the list end-to-end via
|
|
17
17
|
// EmbeddedListField, no custom-screen code required
|
|
18
|
+
// invoice-receive — actionForm whose net/VAT/gross head fields are derived
|
|
19
|
+
// from the lines (`derive`); the handler recomputes them with
|
|
20
|
+
// `withFormDerivations`, so client-sent totals are never trusted
|
|
18
21
|
|
|
19
22
|
import { defineFeature } from "@cosmicdrift/kumiko-framework/engine";
|
|
20
23
|
import { contactEntity } from "./entities/contact";
|
|
@@ -22,6 +25,8 @@ import { invoiceEntity } from "./entities/invoice";
|
|
|
22
25
|
import { productEntity } from "./entities/product";
|
|
23
26
|
import { contactCreate } from "./handlers/contact-create.write";
|
|
24
27
|
import { contactDetail } from "./handlers/contact-detail.query";
|
|
28
|
+
import { invoiceReceive } from "./handlers/invoice-receive.write";
|
|
29
|
+
import { invoiceReceiveScreen } from "./screens/invoice-receive.screen";
|
|
25
30
|
|
|
26
31
|
export { contactEntity } from "./entities/contact";
|
|
27
32
|
export { invoiceEntity } from "./entities/invoice";
|
|
@@ -43,6 +48,7 @@ export const embeddedFeature = defineFeature("contacts", (r) => {
|
|
|
43
48
|
|
|
44
49
|
r.writeHandler(contactCreate);
|
|
45
50
|
r.queryHandler(contactDetail);
|
|
51
|
+
r.writeHandler(invoiceReceive);
|
|
46
52
|
|
|
47
53
|
r.crud("product", productEntity, { write: adminWrite, read: openRead });
|
|
48
54
|
r.crud("invoice", invoiceEntity, { write: adminWrite, read: openRead });
|
|
@@ -55,4 +61,6 @@ export const embeddedFeature = defineFeature("contacts", (r) => {
|
|
|
55
61
|
sections: [{ columns: 1, fields: ["customer", "lines"] }],
|
|
56
62
|
},
|
|
57
63
|
});
|
|
64
|
+
|
|
65
|
+
r.screen(invoiceReceiveScreen);
|
|
58
66
|
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import {
|
|
2
|
+
defineWriteHandler,
|
|
3
|
+
fieldToZod,
|
|
4
|
+
withFormDerivations,
|
|
5
|
+
} from "@cosmicdrift/kumiko-framework/engine";
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
import { invoiceReceiveLines, invoiceReceiveScreen } from "../screens/invoice-receive.screen";
|
|
8
|
+
|
|
9
|
+
const moneyPayload = z.object({ amount: z.number(), currency: z.string().min(1) });
|
|
10
|
+
|
|
11
|
+
// The preprocess recomputes net/VAT/gross before validation: totals sent by the
|
|
12
|
+
// client never reach the handler.
|
|
13
|
+
const receiveInput = withFormDerivations(
|
|
14
|
+
z.object({
|
|
15
|
+
supplier: z.string().min(1),
|
|
16
|
+
invoiceNumber: z.string().min(1),
|
|
17
|
+
lines: fieldToZod(invoiceReceiveLines, ["EUR"]),
|
|
18
|
+
netTotal: moneyPayload,
|
|
19
|
+
vatRate: z.number().optional(),
|
|
20
|
+
vatTotal: moneyPayload,
|
|
21
|
+
grossTotal: moneyPayload,
|
|
22
|
+
}),
|
|
23
|
+
invoiceReceiveScreen,
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
export const invoiceReceive = defineWriteHandler({
|
|
27
|
+
name: "invoice:receive",
|
|
28
|
+
schema: receiveInput,
|
|
29
|
+
access: { roles: ["Admin"] },
|
|
30
|
+
handler: async (event) => ({
|
|
31
|
+
isSuccess: true,
|
|
32
|
+
data: {
|
|
33
|
+
netTotal: event.payload.netTotal,
|
|
34
|
+
vatTotal: event.payload.vatTotal,
|
|
35
|
+
grossTotal: event.payload.grossTotal,
|
|
36
|
+
},
|
|
37
|
+
}),
|
|
38
|
+
});
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type ActionFormScreenDefinition,
|
|
3
|
+
createDecimalField,
|
|
4
|
+
createEmbeddedListField,
|
|
5
|
+
createTextField,
|
|
6
|
+
} from "@cosmicdrift/kumiko-framework/engine";
|
|
7
|
+
|
|
8
|
+
const euro = { kind: "literal", code: "EUR" } as const;
|
|
9
|
+
|
|
10
|
+
export const invoiceReceiveLines = createEmbeddedListField(
|
|
11
|
+
{
|
|
12
|
+
description: { type: "text", required: true },
|
|
13
|
+
amount: { type: "money", required: true },
|
|
14
|
+
vatRate: { type: "decimal", scale: 2, required: true },
|
|
15
|
+
vatAmount: { type: "money" },
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
derived: { vatAmount: { op: "percent", from: ["amount", "vatRate"] } },
|
|
19
|
+
totals: ["amount", "vatAmount"],
|
|
20
|
+
},
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
// Net/VAT/gross are derived: with line items they are the sum of the lines,
|
|
24
|
+
// without lines the net amount and the VAT rate are typed and VAT/gross follow.
|
|
25
|
+
export const invoiceReceiveScreen: ActionFormScreenDefinition = {
|
|
26
|
+
id: "invoice-receive",
|
|
27
|
+
type: "actionForm",
|
|
28
|
+
handler: "contacts:write:invoice:receive",
|
|
29
|
+
fields: {
|
|
30
|
+
supplier: createTextField({ required: true, personal: "tenant", find: "none" }),
|
|
31
|
+
invoiceNumber: createTextField({
|
|
32
|
+
required: true,
|
|
33
|
+
personal: false,
|
|
34
|
+
reason: "is_business_data",
|
|
35
|
+
}),
|
|
36
|
+
lines: invoiceReceiveLines,
|
|
37
|
+
netTotal: { type: "money", currency: euro },
|
|
38
|
+
vatRate: createDecimalField({ precision: 5, scale: 2 }),
|
|
39
|
+
vatTotal: { type: "money", currency: euro },
|
|
40
|
+
grossTotal: { type: "money", currency: euro },
|
|
41
|
+
},
|
|
42
|
+
derive: {
|
|
43
|
+
netTotal: { op: "listSum", list: "lines", cell: "amount" },
|
|
44
|
+
vatTotal: {
|
|
45
|
+
op: "listSum",
|
|
46
|
+
list: "lines",
|
|
47
|
+
cell: "vatAmount",
|
|
48
|
+
whenEmpty: { op: "percent", from: ["netTotal", "vatRate"] },
|
|
49
|
+
},
|
|
50
|
+
grossTotal: { op: "sum", from: ["netTotal", "vatTotal"] },
|
|
51
|
+
},
|
|
52
|
+
layout: {
|
|
53
|
+
sections: [
|
|
54
|
+
{ columns: 2, fields: ["supplier", "invoiceNumber"] },
|
|
55
|
+
{ columns: 1, fields: ["lines"] },
|
|
56
|
+
{ columns: 2, fields: ["netTotal", "vatRate", "vatTotal", "grossTotal"] },
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RenderEditControls } from "@cosmicdrift/kumiko-renderer";
|
|
2
2
|
import { RenderEdit, useDispatcher, usePrimitives } from "@cosmicdrift/kumiko-renderer";
|
|
3
|
-
import { Drawer } from "@cosmicdrift/kumiko-renderer
|
|
3
|
+
import { Drawer } from "@cosmicdrift/kumiko-renderer/web";
|
|
4
4
|
import { type ReactNode, useMemo, useRef, useState } from "react";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
import { prospectEntity } from "../entities/prospect";
|
|
@@ -47,7 +47,7 @@ handler as above. Register `notesHistoryClient()` once (for its component +
|
|
|
47
47
|
i18n), then mount it either way:
|
|
48
48
|
|
|
49
49
|
```tsx illustration
|
|
50
|
-
import { createKumikoApp } from "@cosmicdrift/kumiko-renderer
|
|
50
|
+
import { createKumikoApp } from "@cosmicdrift/kumiko-renderer/web";
|
|
51
51
|
import { notesHistoryClient, NotesSection, NOTES_SECTION_EXTENSION_NAME } from "@cosmicdrift/kumiko-bundled-features/notes-history/web";
|
|
52
52
|
|
|
53
53
|
// once, at app boot — required even for standalone use (registers i18n):
|
|
@@ -48,7 +48,7 @@ as above. Register `tagsClient()` once (for its component + i18n), then mount it
|
|
|
48
48
|
either way:
|
|
49
49
|
|
|
50
50
|
```tsx illustration
|
|
51
|
-
import { createKumikoApp } from "@cosmicdrift/kumiko-renderer
|
|
51
|
+
import { createKumikoApp } from "@cosmicdrift/kumiko-renderer/web";
|
|
52
52
|
import { tagsClient, TagSection, TAGS_SECTION_EXTENSION_NAME } from "@cosmicdrift/kumiko-bundled-features/tags/web";
|
|
53
53
|
|
|
54
54
|
// once, at app boot — required even for standalone use (registers i18n):
|
|
@@ -46,7 +46,7 @@ itself needs no client registration):
|
|
|
46
46
|
```tsx illustration
|
|
47
47
|
import { userProfileClient } from "@cosmicdrift/kumiko-bundled-features/user-profile/web";
|
|
48
48
|
import { emailPasswordClient } from "@cosmicdrift/kumiko-bundled-features/auth-email-password/web";
|
|
49
|
-
import { createKumikoApp } from "@cosmicdrift/kumiko-renderer
|
|
49
|
+
import { createKumikoApp } from "@cosmicdrift/kumiko-renderer/web";
|
|
50
50
|
|
|
51
51
|
createKumikoApp({
|
|
52
52
|
clientFeatures: [emailPasswordClient(), userProfileClient()],
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
"@cosmicdrift/kumiko-bundled-features": "workspace:*",
|
|
11
11
|
"@cosmicdrift/kumiko-framework": "workspace:*",
|
|
12
12
|
"@cosmicdrift/kumiko-renderer": "workspace:*",
|
|
13
|
-
"@cosmicdrift/kumiko-renderer-web": "workspace:*",
|
|
14
13
|
"react": "^19.2.6"
|
|
15
14
|
},
|
|
16
15
|
"devDependencies": {
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
// A `kind: "extension"` section only resolves through
|
|
4
4
|
// clientFeatures.extensionSectionComponents (createKumikoApp → ExtensionSectionsProvider)
|
|
5
5
|
// — never imported directly from feature.ts, which keeps the server file
|
|
6
|
-
// free of the renderer
|
|
6
|
+
// free of the renderer/web graph. Without registering this export, an app
|
|
7
7
|
// mounting this recipe gets RenderEdit's fallback placeholder instead of
|
|
8
8
|
// the real review step.
|
|
9
9
|
|
|
10
|
-
import type { ClientFeatureDefinition } from "@cosmicdrift/kumiko-renderer
|
|
10
|
+
import type { ClientFeatureDefinition } from "@cosmicdrift/kumiko-renderer/web";
|
|
11
11
|
import { ListingReviewSection } from "./listing-review-section";
|
|
12
12
|
|
|
13
13
|
export const listingsClient: ClientFeatureDefinition = {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { ExtensionSectionProps } from "@cosmicdrift/kumiko-renderer";
|
|
2
|
-
import { DetailList } from "@cosmicdrift/kumiko-renderer
|
|
2
|
+
import { DetailList } from "@cosmicdrift/kumiko-renderer/web";
|
|
3
3
|
import type { ReactNode } from "react";
|
|
4
4
|
|
|
5
5
|
// Registered under the `__component` name the feature's review section
|
|
6
6
|
// points at (see feature.ts) — never imported by feature.ts itself, the
|
|
7
7
|
// string name is the only link so the server file stays free of the
|
|
8
|
-
// renderer
|
|
8
|
+
// renderer/web graph.
|
|
9
9
|
export function ListingReviewSection({ values }: ExtensionSectionProps): ReactNode {
|
|
10
10
|
return (
|
|
11
11
|
<DetailList
|