@cosmicdrift/kumiko-bundled-features 0.123.0 → 0.123.2
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 +7 -6
- package/src/managed-pages/i18n.ts +5 -0
- package/src/managed-pages/web/client-plugin.tsx +22 -0
- package/src/managed-pages/web/i18n.ts +24 -0
- package/src/managed-pages/web/index.ts +3 -0
- package/src/user-data-rights/web/privacy-center-screen.tsx +3 -3
- package/src/user-profile/web/profile-screen.tsx +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-bundled-features",
|
|
3
|
-
"version": "0.123.
|
|
3
|
+
"version": "0.123.2",
|
|
4
4
|
"description": "Built-in features — tenant, user, auth, delivery. The stuff you'd rewrite anyway, already typed.",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
|
|
@@ -92,15 +92,16 @@
|
|
|
92
92
|
"./legal-pages/web": "./src/legal-pages/web/index.ts",
|
|
93
93
|
"./page-render": "./src/page-render/index.ts",
|
|
94
94
|
"./managed-pages": "./src/managed-pages/index.ts",
|
|
95
|
+
"./managed-pages/web": "./src/managed-pages/web/index.ts",
|
|
95
96
|
"./managed-pages/seeding": "./src/managed-pages/seeding.ts",
|
|
96
97
|
"./step-dispatcher": "./src/step-dispatcher/index.ts"
|
|
97
98
|
},
|
|
98
99
|
"dependencies": {
|
|
99
|
-
"@cosmicdrift/kumiko-dispatcher-live": "0.123.
|
|
100
|
-
"@cosmicdrift/kumiko-framework": "0.123.
|
|
101
|
-
"@cosmicdrift/kumiko-headless": "0.123.
|
|
102
|
-
"@cosmicdrift/kumiko-renderer": "0.123.
|
|
103
|
-
"@cosmicdrift/kumiko-renderer-web": "0.123.
|
|
100
|
+
"@cosmicdrift/kumiko-dispatcher-live": "0.123.2",
|
|
101
|
+
"@cosmicdrift/kumiko-framework": "0.123.2",
|
|
102
|
+
"@cosmicdrift/kumiko-headless": "0.123.2",
|
|
103
|
+
"@cosmicdrift/kumiko-renderer": "0.123.2",
|
|
104
|
+
"@cosmicdrift/kumiko-renderer-web": "0.123.2",
|
|
104
105
|
"@mollie/api-client": "^4.5.0",
|
|
105
106
|
"@node-rs/argon2": "^2.0.2",
|
|
106
107
|
"@types/nodemailer": "^8.0.0",
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
// @runtime client
|
|
2
|
+
// Pure-Data (i18n-Keys) — client-marked, damit das web/-Bundle sie in den
|
|
3
|
+
// Browser-Store pivotieren darf; feature.ts (server) importiert sie ebenso
|
|
4
|
+
// (server darf client-safe Pure-Data importieren, wie PAT constants.ts).
|
|
5
|
+
//
|
|
1
6
|
// Übersetzungs-Bundle für die managed-pages Admin-Screens. Ohne diese Keys
|
|
2
7
|
// rendert die UI die Roh-i18n-Keys (screen:*.title, entity:*:field:*, Section-
|
|
3
8
|
// Header). Der Boot-Validator (required-surface-keys) verlangt — sobald ein
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// @runtime client
|
|
2
|
+
// Client-Feature-Factory für managed-pages. Bringt NUR die Übersetzungen mit —
|
|
3
|
+
// die Screens (page-list/page-edit/branding-settings) sind schema-driven
|
|
4
|
+
// (entityList/entityEdit/configEdit), also keine custom-React-Components zu
|
|
5
|
+
// registrieren. Apps mounten es in createKumikoApp({ clientFeatures:
|
|
6
|
+
// [managedPagesClient()] }), damit die Admin-Labels übersetzt rendern.
|
|
7
|
+
|
|
8
|
+
import { mergeTranslations, type TranslationsByLocale } from "@cosmicdrift/kumiko-renderer";
|
|
9
|
+
import type { ClientFeatureDefinition } from "@cosmicdrift/kumiko-renderer-web";
|
|
10
|
+
import { defaultTranslations } from "./i18n";
|
|
11
|
+
|
|
12
|
+
export type ManagedPagesClientOptions = {
|
|
13
|
+
/** Key-wise Overrides über die Default-Bundles (de/en). */
|
|
14
|
+
readonly translations?: TranslationsByLocale;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export function managedPagesClient(options?: ManagedPagesClientOptions): ClientFeatureDefinition {
|
|
18
|
+
return {
|
|
19
|
+
name: "managed-pages",
|
|
20
|
+
translations: mergeTranslations(defaultTranslations, options?.translations ?? {}),
|
|
21
|
+
};
|
|
22
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// @runtime client
|
|
2
|
+
// Client-i18n-Bundle für die managed-pages Admin-Screens. Der Browser-Renderer
|
|
3
|
+
// baut seinen Fallback-Locale-Store NUR aus clientFeatures[].translations — der
|
|
4
|
+
// server-seitige r.translations-Bundle (feature.ts) erreicht ihn nie. Damit die
|
|
5
|
+
// configEdit/entityEdit-Labels im Client übersetzt rendern statt roh, spiegeln
|
|
6
|
+
// wir hier dieselben Keys.
|
|
7
|
+
//
|
|
8
|
+
// Single source: pivotiert MANAGED_PAGES_I18N (key-first { key: {de,en} },
|
|
9
|
+
// Server-Form) in die locale-first TranslationsByLocale-Form die der Client
|
|
10
|
+
// erwartet — kein Key-Duplikat, kein Drift.
|
|
11
|
+
|
|
12
|
+
import type { TranslationsByLocale } from "@cosmicdrift/kumiko-renderer";
|
|
13
|
+
import { MANAGED_PAGES_I18N } from "../i18n";
|
|
14
|
+
|
|
15
|
+
const LOCALES = ["de", "en"] as const;
|
|
16
|
+
|
|
17
|
+
export const defaultTranslations: TranslationsByLocale = Object.fromEntries(
|
|
18
|
+
LOCALES.map((locale) => [
|
|
19
|
+
locale,
|
|
20
|
+
Object.fromEntries(
|
|
21
|
+
Object.entries(MANAGED_PAGES_I18N).map(([key, value]) => [key, value[locale]]),
|
|
22
|
+
),
|
|
23
|
+
]),
|
|
24
|
+
);
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
useQuery,
|
|
20
20
|
useTranslation,
|
|
21
21
|
} from "@cosmicdrift/kumiko-renderer";
|
|
22
|
-
import { postWithDownload } from "@cosmicdrift/kumiko-renderer-web";
|
|
22
|
+
import { FormScreenShell, postWithDownload } from "@cosmicdrift/kumiko-renderer-web";
|
|
23
23
|
import { type ReactNode, useEffect, useState } from "react";
|
|
24
24
|
import {
|
|
25
25
|
EXPORT_JOB_STATUS,
|
|
@@ -384,12 +384,12 @@ export function PrivacyCenterScreen({
|
|
|
384
384
|
};
|
|
385
385
|
|
|
386
386
|
return (
|
|
387
|
-
<
|
|
387
|
+
<FormScreenShell className="flex flex-col gap-6" testId="privacy-center-screen">
|
|
388
388
|
<Heading variant="page">{t("userDataRights.privacyCenter.title")}</Heading>
|
|
389
389
|
<p className="text-sm text-muted-foreground">{t("userDataRights.privacyCenter.intro")}</p>
|
|
390
390
|
<ExportSection />
|
|
391
391
|
<RestrictionSection me={me} onChanged={refetch} />
|
|
392
392
|
{showDeletion && <DeletionSection me={me} onChanged={refetch} />}
|
|
393
|
-
</
|
|
393
|
+
</FormScreenShell>
|
|
394
394
|
);
|
|
395
395
|
}
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
useQuery,
|
|
13
13
|
useTranslation,
|
|
14
14
|
} from "@cosmicdrift/kumiko-renderer";
|
|
15
|
+
import { FormScreenShell } from "@cosmicdrift/kumiko-renderer-web";
|
|
15
16
|
import { type ReactNode, useState } from "react";
|
|
16
17
|
import { AuthHandlers } from "../../auth-email-password/constants";
|
|
17
18
|
import { requestEmailVerification } from "../../auth-email-password/web";
|
|
@@ -360,7 +361,7 @@ export function ProfileScreen(): ReactNode {
|
|
|
360
361
|
};
|
|
361
362
|
|
|
362
363
|
return (
|
|
363
|
-
<
|
|
364
|
+
<FormScreenShell className="flex flex-col gap-6" testId="profile-screen">
|
|
364
365
|
<Heading variant="page">{t("profile.title")}</Heading>
|
|
365
366
|
{/* Die zwei kurzen Konto-Forms teilen sich eine Reihe (md+); die
|
|
366
367
|
Danger-Zone bleibt volle Breite darunter. */}
|
|
@@ -369,6 +370,6 @@ export function ProfileScreen(): ReactNode {
|
|
|
369
370
|
<ChangePasswordSection />
|
|
370
371
|
</div>
|
|
371
372
|
<DangerZoneSection me={me} onChanged={refetch} />
|
|
372
|
-
</
|
|
373
|
+
</FormScreenShell>
|
|
373
374
|
);
|
|
374
375
|
}
|