@cosmicdrift/kumiko-document-designer 0.417.0 → 0.419.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/web/apply-layout-dialog.d.ts +7 -0
- package/dist/web/apply-layout-dialog.js +95 -0
- package/dist/web/company-data-rail.d.ts +5 -0
- package/dist/web/company-data-rail.js +51 -0
- package/dist/web/frame-position.d.ts +18 -0
- package/dist/web/frame-position.js +28 -0
- package/dist/web/frame-settings-section.d.ts +13 -0
- package/dist/web/frame-settings-section.js +57 -0
- package/dist/web/i18n.js +250 -3
- package/dist/web/layout-appearance-section.d.ts +8 -0
- package/dist/web/layout-appearance-section.js +55 -0
- package/dist/web/layout-editor-body.js +5 -2
- package/dist/web/layout-editor-logic.d.ts +3 -1
- package/dist/web/layout-editor-logic.js +15 -7
- package/dist/web/layout-editor-paper.d.ts +1 -1
- package/dist/web/layout-editor-paper.js +36 -8
- package/dist/web/layout-html.js +2 -2
- package/dist/web/layout-meta.d.ts +37 -0
- package/dist/web/layout-meta.js +83 -1
- package/dist/web/layout-rails.d.ts +7 -1
- package/dist/web/layout-rails.js +9 -4
- package/dist/web/layout-types.d.ts +2 -2
- package/dist/web/layout-usage-section.d.ts +4 -0
- package/dist/web/layout-usage-section.js +71 -0
- package/dist/web/page-canvas.d.ts +6 -3
- package/dist/web/page-canvas.js +23 -32
- package/dist/web/page-ruler.d.ts +6 -0
- package/dist/web/page-ruler.js +33 -0
- package/dist/web/paper-geometry.d.ts +50 -0
- package/dist/web/paper-geometry.js +106 -0
- package/dist/web/paper-sheet.d.ts +11 -0
- package/dist/web/paper-sheet.js +24 -0
- package/dist/web/pdf-editor-panes.js +5 -4
- package/dist/web/pdf-editor-view.d.ts +4 -0
- package/dist/web/pdf-editor-view.js +23 -3
- package/dist/web/pdf-left-rail.d.ts +8 -0
- package/dist/web/pdf-left-rail.js +23 -3
- package/dist/web/settings-panel.d.ts +10 -2
- package/dist/web/settings-panel.js +32 -17
- package/dist/web/use-apply-layout.d.ts +28 -0
- package/dist/web/use-apply-layout.js +13 -0
- package/dist/web/use-layout-editor-state.d.ts +5 -0
- package/dist/web/use-layout-editor-state.js +38 -15
- package/dist/web/use-pdf-editor-state.d.ts +5 -0
- package/dist/web/use-pdf-editor-state.js +42 -10
- package/package.json +6 -6
- package/src/changes.json +25 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export declare function ApplyLayoutDialog({ layoutSlug, layoutTitle, onOpenChange, onApplied, }: {
|
|
3
|
+
readonly layoutSlug: string;
|
|
4
|
+
readonly layoutTitle: string;
|
|
5
|
+
readonly onOpenChange: (open: boolean) => void;
|
|
6
|
+
readonly onApplied: () => void;
|
|
7
|
+
}): ReactNode;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { MAX_SELECTED_TEMPLATES } from "@cosmicdrift/kumiko-bundled-features/template-resolver/web";
|
|
3
|
+
import { dispatcherErrorText, usePrimitives, useTranslation } from "@cosmicdrift/kumiko-renderer";
|
|
4
|
+
import { pluralKey } from "@cosmicdrift/kumiko-renderer/headless";
|
|
5
|
+
import { useState } from "react";
|
|
6
|
+
import { statusLabel } from "./status-label.js";
|
|
7
|
+
import { DOCUMENT_PDF_KIND } from "./types.js";
|
|
8
|
+
import { templateOutcomeText, useApplyLayout, } from "./use-apply-layout.js";
|
|
9
|
+
import { useOverviewRows } from "./use-overview-rows.js";
|
|
10
|
+
import { templateTitle } from "./used-by-label.js";
|
|
11
|
+
const refKey = ({ slug, locale }) => `${slug}\u0000${locale}`;
|
|
12
|
+
// An open draft beside the served version is what the template shows as its state.
|
|
13
|
+
function rowStatusText(t, row) {
|
|
14
|
+
return row.draftVersion === null
|
|
15
|
+
? statusLabel(t, row.status, row.version)
|
|
16
|
+
: statusLabel(t, "draft", row.draftVersion);
|
|
17
|
+
}
|
|
18
|
+
function TemplateRow({ row, checked, onToggle, statusText, }) {
|
|
19
|
+
const t = useTranslation();
|
|
20
|
+
const { Input, Field } = usePrimitives();
|
|
21
|
+
const checkId = `layout-apply-check-${row.slug}`;
|
|
22
|
+
return (_jsxs("li", { className: "flex items-center justify-between gap-3 px-3 py-2", "data-testid": `layout-apply-row-${row.slug}`, children: [_jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [_jsx(Field, { id: checkId, label: templateTitle(t, row), layout: "inline", children: _jsx(Input, { kind: "boolean", id: checkId, name: "layout-apply-check", value: checked, onChange: onToggle }) }), _jsx("span", { className: "text-xs text-muted-foreground", children: row.locales.join(", ") })] }), _jsx("span", { className: "shrink-0 text-xs text-muted-foreground", children: statusText })] }));
|
|
23
|
+
}
|
|
24
|
+
function ResultList({ items, label, }) {
|
|
25
|
+
return (_jsx("ul", { className: "list-disc pl-5 text-sm", children: items.map((item) => (_jsx("li", { children: label(item) }, refKey(item)))) }));
|
|
26
|
+
}
|
|
27
|
+
function TargetPicker({ title, mode, onModeChange, rows, selected, onToggle, systemCount, entryCount, tooManyEntries, }) {
|
|
28
|
+
const t = useTranslation();
|
|
29
|
+
const { Banner, Input, Field } = usePrimitives();
|
|
30
|
+
return (_jsxs(_Fragment, { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: t("documentDesigner.applyLayout.intro") }), _jsx(Field, { id: "layout-apply-mode", label: title, hideLabel: true, children: _jsx(Input, { kind: "select", id: "layout-apply-mode", name: "layout-apply-mode", value: mode, onChange: (value) => onModeChange(value === "all" ? "all" : "selected"), radioVariant: "card", options: [
|
|
31
|
+
{
|
|
32
|
+
value: "all",
|
|
33
|
+
label: t("documentDesigner.applyLayout.all"),
|
|
34
|
+
description: t("documentDesigner.applyLayout.allHint"),
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
value: "selected",
|
|
38
|
+
label: t("documentDesigner.applyLayout.selected"),
|
|
39
|
+
description: t("documentDesigner.applyLayout.selectedHint"),
|
|
40
|
+
},
|
|
41
|
+
] }) }), mode === "selected" && (_jsx("ul", { className: "flex max-h-64 flex-col divide-y overflow-auto rounded-md border", children: rows.map((row) => (_jsx(TemplateRow, { row: row, checked: selected.has(row.slug), onToggle: () => onToggle(row.slug), statusText: rowStatusText(t, row) }, row.slug))) })), mode === "selected" && systemCount > 0 && (_jsx(Banner, { variant: "warning", children: t(pluralKey("documentDesigner.applyLayout.systemWarning", systemCount), {
|
|
42
|
+
count: systemCount,
|
|
43
|
+
}) })), tooManyEntries && (_jsx("p", { className: "text-xs text-destructive", "data-testid": "layout-apply-too-many", children: t("documentDesigner.applyLayout.tooMany", {
|
|
44
|
+
count: entryCount,
|
|
45
|
+
max: MAX_SELECTED_TEMPLATES,
|
|
46
|
+
}) }))] }));
|
|
47
|
+
}
|
|
48
|
+
function ApplyResult({ mode, applied, onClose, }) {
|
|
49
|
+
const t = useTranslation();
|
|
50
|
+
const { Button } = usePrimitives();
|
|
51
|
+
return (_jsxs("div", { className: "flex flex-col gap-3", "data-testid": "layout-apply-result", children: [mode === "all" ? (_jsx("p", { className: "text-sm", children: t("documentDesigner.applyLayout.allDone") })) : (_jsx("p", { className: "text-sm", children: t(pluralKey("documentDesigner.applyLayout.drafted", applied.applied.length), {
|
|
52
|
+
count: applied.applied.length,
|
|
53
|
+
}) })), applied.skipped.length > 0 && (_jsxs(_Fragment, { children: [_jsx("strong", { className: "text-sm", children: t("documentDesigner.applyLayout.skipped") }), _jsx(ResultList, { items: applied.skipped, label: (item) => templateOutcomeText(t, item) })] })), _jsx("div", { className: "flex justify-end", children: _jsx(Button, { variant: "secondary", onClick: onClose, children: t("documentDesigner.applyLayout.close") }) })] }));
|
|
54
|
+
}
|
|
55
|
+
export function ApplyLayoutDialog({ layoutSlug, layoutTitle, onOpenChange, onApplied, }) {
|
|
56
|
+
const t = useTranslation();
|
|
57
|
+
const { Modal, Button, Banner } = usePrimitives();
|
|
58
|
+
const { rows } = useOverviewRows(DOCUMENT_PDF_KIND);
|
|
59
|
+
const { apply } = useApplyLayout();
|
|
60
|
+
const [mode, setMode] = useState("selected");
|
|
61
|
+
const [selected, setSelected] = useState(new Set());
|
|
62
|
+
const [applied, setApplied] = useState(null);
|
|
63
|
+
const [error, setError] = useState(null);
|
|
64
|
+
const chosen = rows.filter((row) => selected.has(row.slug));
|
|
65
|
+
const systemCount = chosen.filter((row) => row.origin === "system").length;
|
|
66
|
+
const toggle = (slug) => {
|
|
67
|
+
const next = new Set(selected);
|
|
68
|
+
if (!next.delete(slug))
|
|
69
|
+
next.add(slug);
|
|
70
|
+
setSelected(next);
|
|
71
|
+
};
|
|
72
|
+
const entries = chosen.flatMap((row) => row.locales.map((locale) => ({ slug: row.slug, locale })));
|
|
73
|
+
const tooManyEntries = mode === "selected" && entries.length > MAX_SELECTED_TEMPLATES;
|
|
74
|
+
const submit = async () => {
|
|
75
|
+
setError(null);
|
|
76
|
+
const target = mode === "all" ? { mode } : { mode, templates: entries };
|
|
77
|
+
const result = await apply.mutate({ layoutSlug, target });
|
|
78
|
+
if (!result.isSuccess) {
|
|
79
|
+
setError(dispatcherErrorText(result.error, t));
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
setApplied(result.data);
|
|
83
|
+
onApplied();
|
|
84
|
+
};
|
|
85
|
+
const canSubmit = mode === "all" || (chosen.length > 0 && !tooManyEntries);
|
|
86
|
+
const title = t("documentDesigner.applyLayout.title", { name: layoutTitle });
|
|
87
|
+
const submitLabel = mode === "all"
|
|
88
|
+
? t("documentDesigner.applyLayout.submitAll")
|
|
89
|
+
: chosen.length === 0
|
|
90
|
+
? t("documentDesigner.applyLayout.submitNone")
|
|
91
|
+
: t(pluralKey("documentDesigner.applyLayout.submit", chosen.length), {
|
|
92
|
+
count: chosen.length,
|
|
93
|
+
});
|
|
94
|
+
return (_jsx(Modal, { open: true, onOpenChange: onOpenChange, title: title, size: "wide", testId: "layout-apply-dialog", children: _jsxs("div", { className: "flex flex-col gap-4", children: [error !== null && _jsx(Banner, { variant: "error", children: error }), applied === null ? (_jsxs(_Fragment, { children: [_jsx(TargetPicker, { title: title, mode: mode, onModeChange: setMode, rows: rows, selected: selected, onToggle: toggle, systemCount: systemCount, entryCount: entries.length, tooManyEntries: tooManyEntries }), _jsxs("div", { className: "flex items-end gap-4", children: [_jsx("p", { className: "min-w-0 flex-1 text-xs text-muted-foreground", children: t("documentDesigner.applyLayout.note") }), _jsxs("div", { className: "flex shrink-0 gap-2", children: [_jsx(Button, { variant: "secondary", onClick: () => onOpenChange(false), children: t("documentDesigner.applyLayout.cancel") }), _jsx(Button, { disabled: !canSubmit || apply.pending, loading: apply.pending, onClick: submit, testId: "layout-apply-submit", children: submitLabel })] })] })] })) : (_jsx(ApplyResult, { mode: mode, applied: applied, onClose: () => onOpenChange(false) }))] }) }));
|
|
95
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { SessionContext } from "@cosmicdrift/kumiko-bundled-features/auth-email-password/web";
|
|
3
|
+
import { COMPANY_PLACEHOLDERS } from "@cosmicdrift/kumiko-bundled-features/template-resolver/web";
|
|
4
|
+
import { useAppFeatures, useNav, usePrimitives, useQuery, useTranslation, } from "@cosmicdrift/kumiko-renderer";
|
|
5
|
+
import { toKebab } from "@cosmicdrift/kumiko-types/kebab-case";
|
|
6
|
+
import { useContext } from "react";
|
|
7
|
+
import { PLACEHOLDER_SYMBOL } from "./mail-draft.js";
|
|
8
|
+
import { RailHint, RailRow, RailSection } from "./rail.js";
|
|
9
|
+
const CONFIG_FEATURE_NAME = "config";
|
|
10
|
+
const CONFIG_VALUES_QUERY_QN = "config:query:values";
|
|
11
|
+
const COMPANY_SETTINGS_SCREEN_ID = "tenant-tenant";
|
|
12
|
+
const TENANT_CONFIG_PREFIX = "tenant:config:";
|
|
13
|
+
const COMPANY_CONFIG_KEYS = Object.fromEntries(COMPANY_PLACEHOLDERS.map((name) => [name, `${TENANT_CONFIG_PREFIX}${toKebab(name)}`]));
|
|
14
|
+
function textValueOf(values, name) {
|
|
15
|
+
const key = COMPANY_CONFIG_KEYS[name];
|
|
16
|
+
const value = key === undefined ? undefined : values?.[key]?.value;
|
|
17
|
+
return typeof value === "string" ? value.trim().replace(/\s*\n\s*/g, " · ") : "";
|
|
18
|
+
}
|
|
19
|
+
// RailRow cannot color its label, and a missing value is a prompt rather than an error.
|
|
20
|
+
function MissingValueRow({ name, label, trailing, onPress, }) {
|
|
21
|
+
const content = (_jsxs(_Fragment, { children: [_jsx("span", { className: "min-w-0 grow wrap-anywhere text-sm text-status-warn", children: label }), _jsx("span", { className: "shrink-0 text-xs text-primary", children: trailing })] }));
|
|
22
|
+
const rowClass = "flex min-h-10 min-w-0 grow items-center gap-2 px-3.5 text-left";
|
|
23
|
+
return (_jsx("div", { className: "flex items-center border-b", "data-testid": `company-data-${name}`, children: onPress === undefined ? (_jsx("div", { className: rowClass, children: content })) : (_jsx("button", { type: "button", onClick: onPress, className: `${rowClass} hover:bg-muted`, "data-testid": `company-data-${name}-insert`, children: content })) }));
|
|
24
|
+
}
|
|
25
|
+
export function CompanyDataRail({ onInsert, used, }) {
|
|
26
|
+
const t = useTranslation();
|
|
27
|
+
const nav = useNav();
|
|
28
|
+
const { Link } = usePrimitives();
|
|
29
|
+
const features = useAppFeatures();
|
|
30
|
+
// The designer also renders without an auth provider (tests, embeds): no session, no name.
|
|
31
|
+
const session = useContext(SessionContext);
|
|
32
|
+
const tenantName = session?.tenants.find((tenant) => tenant.tenantId === session.activeTenantId)?.name ?? "";
|
|
33
|
+
const configMounted = features.some((feature) => feature.featureName === CONFIG_FEATURE_NAME);
|
|
34
|
+
const hasSettingsScreen = features.some((feature) => feature.featureName === CONFIG_FEATURE_NAME &&
|
|
35
|
+
feature.screens.some((screen) => screen.id === COMPANY_SETTINGS_SCREEN_ID));
|
|
36
|
+
const values = useQuery(CONFIG_VALUES_QUERY_QN, { keys: Object.values(COMPANY_CONFIG_KEYS) }, { enabled: configMounted });
|
|
37
|
+
const editLink = hasSettingsScreen ? (_jsx(Link, { href: nav.hrefFor({ screenId: COMPANY_SETTINGS_SCREEN_ID }), onPress: () => nav.navigate({ screenId: COMPANY_SETTINGS_SCREEN_ID }), testId: "company-data-edit", children: t("documentDesigner.company.edit") })) : undefined;
|
|
38
|
+
return (_jsxs(RailSection, { title: t("documentDesigner.company.title"), action: editLink, testId: "company-data-rail", children: [["tenantName", ...COMPANY_PLACEHOLDERS].map((name) => {
|
|
39
|
+
const text = name === "tenantName" ? tenantName : textValueOf(values.data ?? undefined, name);
|
|
40
|
+
const onPress = onInsert === undefined ? undefined : () => onInsert(name);
|
|
41
|
+
if (used === undefined && text === "") {
|
|
42
|
+
return (_jsx(MissingValueRow, { name: name, label: t(`documentDesigner.placeholder.${name}`), trailing: t("documentDesigner.company.enter"), onPress: onPress }, name));
|
|
43
|
+
}
|
|
44
|
+
const status = used === undefined
|
|
45
|
+
? { text, tone: "muted" }
|
|
46
|
+
: used.has(name)
|
|
47
|
+
? { text: "✓", tone: "ok" }
|
|
48
|
+
: { text: "–", tone: "muted" };
|
|
49
|
+
return (_jsx(RailRow, { testId: `company-data-${name}`, ...(used === undefined ? {} : { symbol: PLACEHOLDER_SYMBOL.text }), label: t(`documentDesigner.placeholder.${name}`), trailing: status.text, trailingTone: status.tone, ...(onPress === undefined ? {} : { onPress }) }, name));
|
|
50
|
+
}), _jsx(RailHint, { children: t("documentDesigner.company.hint") })] }));
|
|
51
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { MarginsMm, PaperSize } from "./paper-geometry.ts";
|
|
2
|
+
export type FrameBox = {
|
|
3
|
+
readonly xMm: number;
|
|
4
|
+
readonly yMm: number;
|
|
5
|
+
readonly widthMm: number;
|
|
6
|
+
readonly heightMm: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const DIN_5008_FORMS: readonly ["form-a", "form-b"];
|
|
9
|
+
export type Din5008Form = (typeof DIN_5008_FORMS)[number];
|
|
10
|
+
export type FramePosition = Din5008Form | "free";
|
|
11
|
+
export declare function din5008Box(form: Din5008Form): FrameBox;
|
|
12
|
+
export declare function framePositionOf(box: FrameBox): FramePosition;
|
|
13
|
+
export type FrameOverhang = {
|
|
14
|
+
readonly intoTopMargin: boolean;
|
|
15
|
+
readonly beyondPaper: boolean;
|
|
16
|
+
};
|
|
17
|
+
export declare function frameOverhangOf(box: FrameBox, paper: PaperSize, margins: MarginsMm): FrameOverhang;
|
|
18
|
+
export declare function hasFrameOverhang(overhang: FrameOverhang): boolean;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export const DIN_5008_FORMS = ["form-a", "form-b"];
|
|
2
|
+
const DIN_5008_LEFT_MM = 20;
|
|
3
|
+
const DIN_5008_WIDTH_MM = 85;
|
|
4
|
+
const DIN_5008_HEIGHT_MM = 45;
|
|
5
|
+
const DIN_5008_TOP_MM = { "form-a": 27, "form-b": 45 };
|
|
6
|
+
export function din5008Box(form) {
|
|
7
|
+
return {
|
|
8
|
+
xMm: DIN_5008_LEFT_MM,
|
|
9
|
+
yMm: DIN_5008_TOP_MM[form],
|
|
10
|
+
widthMm: DIN_5008_WIDTH_MM,
|
|
11
|
+
heightMm: DIN_5008_HEIGHT_MM,
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function sameBox(a, b) {
|
|
15
|
+
return a.xMm === b.xMm && a.yMm === b.yMm && a.widthMm === b.widthMm && a.heightMm === b.heightMm;
|
|
16
|
+
}
|
|
17
|
+
export function framePositionOf(box) {
|
|
18
|
+
return DIN_5008_FORMS.find((form) => sameBox(box, din5008Box(form))) ?? "free";
|
|
19
|
+
}
|
|
20
|
+
export function frameOverhangOf(box, paper, margins) {
|
|
21
|
+
return {
|
|
22
|
+
intoTopMargin: box.yMm < margins.top,
|
|
23
|
+
beyondPaper: box.xMm + box.widthMm > paper.widthMm || box.yMm + box.heightMm > paper.heightMm,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export function hasFrameOverhang(overhang) {
|
|
27
|
+
return overhang.intoTopMargin || overhang.beyondPaper;
|
|
28
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DocumentFrameControl } from "@cosmicdrift/kumiko-bundled-features/template-resolver/web";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
import type { MarginsMm, PaperSize } from "./paper-geometry.ts";
|
|
4
|
+
export type RecipientOption = {
|
|
5
|
+
readonly value: string;
|
|
6
|
+
readonly label: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function FrameSettingsSection({ control, paper, margins, recipientOptions, }: {
|
|
9
|
+
readonly control: DocumentFrameControl;
|
|
10
|
+
readonly paper: PaperSize;
|
|
11
|
+
readonly margins: MarginsMm;
|
|
12
|
+
readonly recipientOptions: readonly RecipientOption[];
|
|
13
|
+
}): ReactNode;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { usePrimitives, useTranslation } from "@cosmicdrift/kumiko-renderer";
|
|
3
|
+
import { DIN_5008_FORMS, din5008Box, frameOverhangOf, framePositionOf, hasFrameOverhang, } from "./frame-position.js";
|
|
4
|
+
import { RailField, RailHint, RailSection } from "./rail.js";
|
|
5
|
+
const NO_RECIPIENT = "";
|
|
6
|
+
const BOX_FIELDS = [
|
|
7
|
+
{
|
|
8
|
+
key: "xMm",
|
|
9
|
+
testId: "frame-x",
|
|
10
|
+
labelKey: "documentDesigner.frame.left",
|
|
11
|
+
patch: (xMm) => ({ xMm }),
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
key: "yMm",
|
|
15
|
+
testId: "frame-y",
|
|
16
|
+
labelKey: "documentDesigner.frame.top",
|
|
17
|
+
patch: (yMm) => ({ yMm }),
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
key: "widthMm",
|
|
21
|
+
testId: "frame-width",
|
|
22
|
+
labelKey: "documentDesigner.frame.width",
|
|
23
|
+
patch: (widthMm) => ({ widthMm }),
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
key: "heightMm",
|
|
27
|
+
testId: "frame-height",
|
|
28
|
+
labelKey: "documentDesigner.frame.height",
|
|
29
|
+
patch: (heightMm) => ({ heightMm }),
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
export function FrameSettingsSection({ control, paper, margins, recipientOptions, }) {
|
|
33
|
+
const t = useTranslation();
|
|
34
|
+
const { Button, Field, Input } = usePrimitives();
|
|
35
|
+
const { attrs } = control;
|
|
36
|
+
const isAddress = attrs.preset === "address";
|
|
37
|
+
const overhang = frameOverhangOf(attrs, paper, margins);
|
|
38
|
+
return (_jsxs(RailSection, { title: t(isAddress ? "documentDesigner.frame.titleAddress" : "documentDesigner.frame.title"), testId: "pdf-editor-frame", children: [_jsxs(RailField, { children: [isAddress && (_jsx("div", { "data-testid": "frame-position", children: _jsx(Field, { id: "dd-frame-position", label: t("documentDesigner.frame.position"), children: _jsx(Input, { kind: "select", id: "dd-frame-position", name: "framePosition", value: framePositionOf(attrs), onChange: (value) => {
|
|
39
|
+
const form = DIN_5008_FORMS.find((candidate) => candidate === value);
|
|
40
|
+
if (form !== undefined)
|
|
41
|
+
control.update(din5008Box(form));
|
|
42
|
+
}, display: "dropdown", options: [
|
|
43
|
+
...DIN_5008_FORMS.map((form) => ({
|
|
44
|
+
value: form,
|
|
45
|
+
label: t(`documentDesigner.frame.position.${form}`),
|
|
46
|
+
})),
|
|
47
|
+
{ value: "free", label: t("documentDesigner.frame.position.free") },
|
|
48
|
+
] }) }) })), _jsxs("fieldset", { className: "m-0 border-0 p-0", children: [_jsx("legend", { className: "mb-1 p-0 text-[13px] font-medium text-foreground", children: t("documentDesigner.frame.positionMm") }), _jsx("div", { className: "grid grid-cols-4 gap-1", children: BOX_FIELDS.map((field) => (_jsx(Field, { id: `dd-${field.testId}`, label: t(field.labelKey), children: _jsx(Input, { kind: "number", id: `dd-${field.testId}`, name: field.key, value: attrs[field.key], onChange: (value) => {
|
|
49
|
+
if (value !== undefined)
|
|
50
|
+
control.update(field.patch(value));
|
|
51
|
+
}, testId: field.testId }) }, field.key))) })] }), isAddress && (_jsx("div", { "data-testid": "frame-sender", children: _jsx(Field, { id: "dd-frame-sender", label: t("documentDesigner.frame.sender"), layout: "inline", children: _jsx(Input, { kind: "boolean", id: "dd-frame-sender", name: "frameSender", value: control.senderLine, onChange: control.setSenderLine }) }) })), isAddress && (_jsx("div", { "data-testid": "frame-recipient", children: _jsx(Field, { id: "dd-frame-recipient", label: t("documentDesigner.frame.recipient"), children: _jsx(Input, { kind: "select", id: "dd-frame-recipient", name: "frameRecipient", value: control.recipient ?? NO_RECIPIENT, onChange: (name) => control.setRecipient(name === NO_RECIPIENT ? null : name), display: "dropdown", options: [
|
|
52
|
+
{ value: NO_RECIPIENT, label: t("documentDesigner.frame.recipientNone") },
|
|
53
|
+
...recipientOptions,
|
|
54
|
+
] }) }) })), _jsx("div", { "data-testid": "frame-reserve-flow", children: _jsx(Field, { id: "dd-frame-reserve-flow", label: t("documentDesigner.frame.reserveFlow"), layout: "inline", children: _jsx(Input, { kind: "boolean", id: "dd-frame-reserve-flow", name: "frameReserveFlow", value: attrs.reserveFlow, onChange: (reserveFlow) => control.update({ reserveFlow }) }) }) })] }), isAddress && _jsx(RailHint, { children: t("documentDesigner.frame.positionHint") }), hasFrameOverhang(overhang) && (_jsx("div", { "data-testid": "frame-margin-hint", children: _jsx(RailHint, { children: overhang.beyondPaper
|
|
55
|
+
? t("documentDesigner.frame.beyondPaper")
|
|
56
|
+
: t("documentDesigner.frame.intoMargin") }) })), _jsx("div", { className: "flex justify-start px-3.5 pb-2", children: _jsx(Button, { variant: "danger-ghost", size: "sm", onClick: control.remove, testId: "frame-remove", children: t(isAddress ? "documentDesigner.frame.removeAddress" : "documentDesigner.frame.remove") }) })] }));
|
|
57
|
+
}
|
package/dist/web/i18n.js
CHANGED
|
@@ -58,6 +58,10 @@ export const DOCUMENT_DESIGNER_I18N = {
|
|
|
58
58
|
en: "No template uses this layout yet.",
|
|
59
59
|
de: "Noch keine Vorlage nutzt dieses Layout.",
|
|
60
60
|
},
|
|
61
|
+
"documentDesigner.usedBy.publishHint": {
|
|
62
|
+
en: "Publishing puts each listed template's whole draft live, including text changes made outside this layout.",
|
|
63
|
+
de: "Beim Veröffentlichen geht der gesamte Entwurf jeder aufgeführten Vorlage live, auch Textänderungen, die nicht aus diesem Layout stammen.",
|
|
64
|
+
},
|
|
61
65
|
"documentDesigner.overriddenBy.tenants": { en: "{active} tenants", de: "{active} Mandanten" },
|
|
62
66
|
"documentDesigner.overriddenBy.ofTotal": {
|
|
63
67
|
en: "{active} of {total} tenants",
|
|
@@ -84,12 +88,25 @@ export const DOCUMENT_DESIGNER_I18N = {
|
|
|
84
88
|
de: "Layout-Platzhalter",
|
|
85
89
|
},
|
|
86
90
|
"documentDesigner.placeholders.content": { en: "Template content", de: "Inhalt der Vorlage" },
|
|
87
|
-
"documentDesigner.placeholder.tenantName": { en: "
|
|
91
|
+
"documentDesigner.placeholder.tenantName": { en: "Company name", de: "Firmenname" },
|
|
88
92
|
"documentDesigner.placeholder.signature": { en: "Signature", de: "Signatur" },
|
|
89
93
|
"documentDesigner.placeholder.imprint": { en: "Imprint", de: "Impressum" },
|
|
90
94
|
"documentDesigner.placeholder.unsubscribeUrl": { en: "Unsubscribe link", de: "Abmeldelink" },
|
|
91
|
-
"documentDesigner.placeholder.page": { en: "Page number", de: "
|
|
92
|
-
"documentDesigner.placeholder.pages": { en: "Page count", de: "
|
|
95
|
+
"documentDesigner.placeholder.page": { en: "Page number", de: "Seite" },
|
|
96
|
+
"documentDesigner.placeholder.pages": { en: "Page count", de: "Seiten" },
|
|
97
|
+
"documentDesigner.placeholder.companyAddress": { en: "Address", de: "Anschrift" },
|
|
98
|
+
"documentDesigner.placeholder.companyPhone": { en: "Phone", de: "Telefon" },
|
|
99
|
+
"documentDesigner.placeholder.companyEmail": { en: "Email", de: "E-Mail" },
|
|
100
|
+
"documentDesigner.placeholder.companyWebsite": { en: "Website", de: "Website" },
|
|
101
|
+
"documentDesigner.placeholder.companyRegister": {
|
|
102
|
+
en: "Commercial register",
|
|
103
|
+
de: "Handelsregister",
|
|
104
|
+
},
|
|
105
|
+
"documentDesigner.placeholder.companyVatId": { en: "VAT ID", de: "USt-IdNr." },
|
|
106
|
+
"documentDesigner.placeholder.companyManagement": { en: "Management", de: "Geschäftsführung" },
|
|
107
|
+
"documentDesigner.placeholder.companyBank": { en: "Bank", de: "Bank" },
|
|
108
|
+
"documentDesigner.placeholder.companyIban": { en: "IBAN", de: "IBAN" },
|
|
109
|
+
"documentDesigner.placeholder.companyBic": { en: "BIC", de: "BIC" },
|
|
93
110
|
"documentDesigner.appearance.title": { en: "Appearance", de: "Darstellung" },
|
|
94
111
|
"documentDesigner.appearance.width": { en: "Width", de: "Breite" },
|
|
95
112
|
"documentDesigner.appearance.font": { en: "Font", de: "Schrift" },
|
|
@@ -228,6 +245,14 @@ export const DOCUMENT_DESIGNER_I18N = {
|
|
|
228
245
|
"documentDesigner.editor.region.content": { en: "Template content", de: "Inhalt der Vorlage" },
|
|
229
246
|
"documentDesigner.editor.region.signature": { en: "Signature area", de: "Signatur-Bereich" },
|
|
230
247
|
"documentDesigner.editor.region.footer": { en: "Footer", de: "Fuß" },
|
|
248
|
+
"documentDesigner.editor.region.footerColumns.one": {
|
|
249
|
+
en: "Footer · 1 column",
|
|
250
|
+
de: "Fuß · 1 Spalte",
|
|
251
|
+
},
|
|
252
|
+
"documentDesigner.editor.region.footerColumns.other": {
|
|
253
|
+
en: "Footer · {count} columns",
|
|
254
|
+
de: "Fuß · {count} Spalten",
|
|
255
|
+
},
|
|
231
256
|
"documentDesigner.editor.slot.mail": {
|
|
232
257
|
en: "The content of every mail template is inserted here. Subject and preview text come from the template.",
|
|
233
258
|
de: "Hier wird der Inhalt jeder Mail-Vorlage eingesetzt. Betreff und Vorschautext kommen aus der Vorlage.",
|
|
@@ -240,6 +265,14 @@ export const DOCUMENT_DESIGNER_I18N = {
|
|
|
240
265
|
en: "Checking the layout …",
|
|
241
266
|
de: "Layout wird geprüft …",
|
|
242
267
|
},
|
|
268
|
+
"documentDesigner.editor.footer.okMail.none": {
|
|
269
|
+
en: "Content placeholder present.",
|
|
270
|
+
de: "Inhalts-Platzhalter vorhanden.",
|
|
271
|
+
},
|
|
272
|
+
"documentDesigner.editor.footer.okPdf.none": {
|
|
273
|
+
en: "Content placeholder present.",
|
|
274
|
+
de: "Inhalts-Platzhalter vorhanden.",
|
|
275
|
+
},
|
|
243
276
|
"documentDesigner.editor.footer.okMail.one": {
|
|
244
277
|
en: "Content placeholder present. After publishing, the change applies to 1 template.",
|
|
245
278
|
de: "Inhalts-Platzhalter vorhanden. Änderung wirkt nach Veröffentlichen auf 1 Vorlage.",
|
|
@@ -873,4 +906,218 @@ export const DOCUMENT_DESIGNER_I18N = {
|
|
|
873
906
|
en: "Too many test mails, please try again later.",
|
|
874
907
|
de: "Zu viele Test-Mails, bitte später erneut versuchen.",
|
|
875
908
|
},
|
|
909
|
+
"documentDesigner.editor.frame.addressFormA": {
|
|
910
|
+
en: "Address field · DIN 5008 form A",
|
|
911
|
+
de: "Adressfeld · DIN 5008 Form A",
|
|
912
|
+
},
|
|
913
|
+
"documentDesigner.editor.frame.addressFormB": {
|
|
914
|
+
en: "Address field · DIN 5008 form B",
|
|
915
|
+
de: "Adressfeld · DIN 5008 Form B",
|
|
916
|
+
},
|
|
917
|
+
"documentDesigner.editor.frame.address": { en: "Address field", de: "Adressfeld" },
|
|
918
|
+
"documentDesigner.editor.frame.text": { en: "Text frame", de: "Textrahmen" },
|
|
919
|
+
"documentDesigner.editor.blockMenu": { en: "Building blocks", de: "Baustein" },
|
|
920
|
+
"documentDesigner.editor.block.address": { en: "Address field", de: "Adressfeld" },
|
|
921
|
+
"documentDesigner.editor.block.textFrame": { en: "Text frame", de: "Textrahmen" },
|
|
922
|
+
"documentDesigner.editor.block.columns": { en: "Columns", de: "Spalten" },
|
|
923
|
+
"documentDesigner.editor.block.address.hint": {
|
|
924
|
+
en: "Sender and recipient positioned for window envelopes",
|
|
925
|
+
de: "Absender und Empfänger an der Position fürs Fensterkuvert",
|
|
926
|
+
},
|
|
927
|
+
"documentDesigner.editor.block.textFrame.hint": {
|
|
928
|
+
en: "Freely placeable block on page 1",
|
|
929
|
+
de: "Frei platzierbarer Block auf Seite 1",
|
|
930
|
+
},
|
|
931
|
+
"documentDesigner.editor.block.columns.hint": {
|
|
932
|
+
en: "Borderless table, for header and footer in the layout",
|
|
933
|
+
de: "Randlose Tabelle, im Layout für Kopf und Fuß",
|
|
934
|
+
},
|
|
935
|
+
"documentDesigner.editor.table.repeatStrip": {
|
|
936
|
+
en: "Repeat · {name}",
|
|
937
|
+
de: "Wiederholung · {name}",
|
|
938
|
+
},
|
|
939
|
+
"documentDesigner.applyLayout.submitNone": {
|
|
940
|
+
en: "Select templates",
|
|
941
|
+
de: "Vorlagen auswählen",
|
|
942
|
+
},
|
|
943
|
+
"documentDesigner.pdf.lookFromLayout": {
|
|
944
|
+
en: "Fonts and colors come from the layout.",
|
|
945
|
+
de: "Schrift und Farben kommen aus dem Layout.",
|
|
946
|
+
},
|
|
947
|
+
"documentDesigner.editor.colorReset": { en: "Remove colour", de: "Farbe entfernen" },
|
|
948
|
+
"documentDesigner.editor.defaultSize": { en: "{value} pt", de: "{value} pt" },
|
|
949
|
+
"documentDesigner.editor.defaultLineHeight": { en: "{value}", de: "{value}" },
|
|
950
|
+
"documentDesigner.editor.defaultSpaceBefore": { en: "Before {value} pt", de: "Davor {value} pt" },
|
|
951
|
+
"documentDesigner.editor.defaultSpaceAfter": {
|
|
952
|
+
en: "Spacing {value} pt",
|
|
953
|
+
de: "Abstand {value} pt",
|
|
954
|
+
},
|
|
955
|
+
"documentDesigner.editor.font": { en: "Font", de: "Schrift" },
|
|
956
|
+
"documentDesigner.editor.fontSize": { en: "Font size (pt)", de: "Schriftgröße (pt)" },
|
|
957
|
+
"documentDesigner.editor.textColor": { en: "Text colour", de: "Textfarbe" },
|
|
958
|
+
"documentDesigner.editor.lineHeight": { en: "Line spacing", de: "Zeilenabstand" },
|
|
959
|
+
"documentDesigner.editor.spaceBefore": { en: "Space before (pt)", de: "Abstand davor (pt)" },
|
|
960
|
+
"documentDesigner.editor.spaceAfter": { en: "Space after (pt)", de: "Abstand danach (pt)" },
|
|
961
|
+
"documentDesigner.editor.lineHeightShort": { en: "Line", de: "Zeile" },
|
|
962
|
+
"documentDesigner.editor.spaceBeforeShort": { en: "Before", de: "Davor" },
|
|
963
|
+
"documentDesigner.editor.spaceAfterShort": { en: "Spacing", de: "Abstand" },
|
|
964
|
+
"documentDesigner.editor.tableBorders": { en: "Borders", de: "Rahmen" },
|
|
965
|
+
"documentDesigner.editor.cellColor": { en: "Cell colour", de: "Zellfarbe" },
|
|
966
|
+
"documentDesigner.editor.table.addColumn": { en: "Add column", de: "Spalte hinzufügen" },
|
|
967
|
+
"documentDesigner.editor.table.removeColumn": { en: "Remove column", de: "Spalte entfernen" },
|
|
968
|
+
"documentDesigner.editor.imageBleed": { en: "Full bleed", de: "Bis an den Rand" },
|
|
969
|
+
"documentDesigner.frame.title": { en: "Frame", de: "Rahmen" },
|
|
970
|
+
"documentDesigner.frame.titleAddress": { en: "Address field", de: "Adressfeld" },
|
|
971
|
+
"documentDesigner.frame.position": { en: "Position", de: "Lage" },
|
|
972
|
+
"documentDesigner.frame.positionMm": { en: "Position in mm", de: "Position in mm" },
|
|
973
|
+
"documentDesigner.frame.position.form-a": { en: "DIN 5008 form A", de: "DIN 5008 Form A" },
|
|
974
|
+
"documentDesigner.frame.position.form-b": { en: "DIN 5008 form B", de: "DIN 5008 Form B" },
|
|
975
|
+
"documentDesigner.frame.position.free": { en: "Free", de: "Frei" },
|
|
976
|
+
"documentDesigner.frame.left": { en: "Left", de: "Links" },
|
|
977
|
+
"documentDesigner.frame.top": { en: "Top", de: "Oben" },
|
|
978
|
+
"documentDesigner.frame.width": { en: "Width", de: "Breite" },
|
|
979
|
+
"documentDesigner.frame.height": { en: "Height", de: "Höhe" },
|
|
980
|
+
"documentDesigner.frame.sender": {
|
|
981
|
+
en: "Sender above the address",
|
|
982
|
+
de: "Absender über der Anschrift",
|
|
983
|
+
},
|
|
984
|
+
"documentDesigner.frame.recipient": { en: "Recipient", de: "Empfänger" },
|
|
985
|
+
"documentDesigner.frame.recipientNone": { en: "None", de: "Keiner" },
|
|
986
|
+
"documentDesigner.frame.reserveFlow": { en: "Text starts below", de: "Text beginnt darunter" },
|
|
987
|
+
"documentDesigner.frame.remove": { en: "Remove frame", de: "Rahmen entfernen" },
|
|
988
|
+
"documentDesigner.frame.removeAddress": {
|
|
989
|
+
en: "Remove address field",
|
|
990
|
+
de: "Adressfeld entfernen",
|
|
991
|
+
},
|
|
992
|
+
"documentDesigner.frame.positionHint": {
|
|
993
|
+
en: 'Form A and B differ in the head height: 27 or 45 mm. Changing the values switches to "Free".',
|
|
994
|
+
de: "Form A und B unterscheiden sich in der Kopfhöhe: 27 oder 45 mm. Wer die Werte ändert, wechselt auf „Frei“.",
|
|
995
|
+
},
|
|
996
|
+
"documentDesigner.frame.intoMargin": {
|
|
997
|
+
en: "The frame reaches into the top margin and can cover the header.",
|
|
998
|
+
de: "Der Rahmen ragt in den oberen Rand und kann den Kopf überdecken.",
|
|
999
|
+
},
|
|
1000
|
+
"documentDesigner.frame.beyondPaper": {
|
|
1001
|
+
en: "The frame extends beyond the paper.",
|
|
1002
|
+
de: "Der Rahmen ragt über das Papier hinaus.",
|
|
1003
|
+
},
|
|
1004
|
+
"documentDesigner.appearance.pdfTitle": { en: "Appearance", de: "Aussehen" },
|
|
1005
|
+
"documentDesigner.appearance.fontSizePt": { en: "Size", de: "Größe" },
|
|
1006
|
+
"documentDesigner.appearance.textColor": { en: "Text color", de: "Textfarbe" },
|
|
1007
|
+
"documentDesigner.appearance.tableStyle": { en: "Tables", de: "Tabellen" },
|
|
1008
|
+
"documentDesigner.appearance.tableStyle.plain": { en: "No lines", de: "Ohne Linien" },
|
|
1009
|
+
"documentDesigner.appearance.tableStyle.lines": { en: "Row lines", de: "Zeilenlinien" },
|
|
1010
|
+
"documentDesigner.appearance.tableStyle.grid": { en: "Grid", de: "Gitter" },
|
|
1011
|
+
"documentDesigner.appearance.tableStyle.header": {
|
|
1012
|
+
en: "Line under header",
|
|
1013
|
+
de: "Linie unter dem Kopf",
|
|
1014
|
+
},
|
|
1015
|
+
"documentDesigner.appearance.tableHeader": {
|
|
1016
|
+
en: "Table header background",
|
|
1017
|
+
de: "Tabellenkopf-Hintergrund",
|
|
1018
|
+
},
|
|
1019
|
+
"documentDesigner.appearance.pdfInvalid": {
|
|
1020
|
+
en: "Colors must be #rrggbb, the font size 6 to 24 pt and margins 0 to 100 mm.",
|
|
1021
|
+
de: "Farben als #rrggbb, Schriftgröße 6 bis 24 pt und Ränder 0 bis 100 mm angeben.",
|
|
1022
|
+
},
|
|
1023
|
+
"documentDesigner.margins.legend": {
|
|
1024
|
+
en: "Margins in mm (top, right, bottom, left)",
|
|
1025
|
+
de: "Ränder in mm (oben, rechts, unten, links)",
|
|
1026
|
+
},
|
|
1027
|
+
"documentDesigner.margins.legendShort": { en: "Margins in mm", de: "Ränder in mm" },
|
|
1028
|
+
"documentDesigner.margins.top": { en: "Top (mm)", de: "Oben (mm)" },
|
|
1029
|
+
"documentDesigner.margins.right": { en: "Right (mm)", de: "Rechts (mm)" },
|
|
1030
|
+
"documentDesigner.margins.bottom": { en: "Bottom (mm)", de: "Unten (mm)" },
|
|
1031
|
+
"documentDesigner.margins.left": { en: "Left (mm)", de: "Links (mm)" },
|
|
1032
|
+
"documentDesigner.margins.layoutHint": {
|
|
1033
|
+
en: "Templates take this over. A template only stores what differs.",
|
|
1034
|
+
de: "Vorlagen übernehmen das. Eine Vorlage speichert nur, was bei ihr anders ist.",
|
|
1035
|
+
},
|
|
1036
|
+
"documentDesigner.margins.fromLayout": {
|
|
1037
|
+
en: "From layout: {margins}",
|
|
1038
|
+
de: "Aus Layout: {margins}",
|
|
1039
|
+
},
|
|
1040
|
+
"documentDesigner.margins.override": {
|
|
1041
|
+
en: "Change for this template",
|
|
1042
|
+
de: "Für diese Vorlage ändern",
|
|
1043
|
+
},
|
|
1044
|
+
"documentDesigner.margins.useLayout": { en: "Use the layout's margins", de: "Wie im Layout" },
|
|
1045
|
+
"documentDesigner.company.title": { en: "Company data", de: "Firmendaten" },
|
|
1046
|
+
"documentDesigner.company.edit": { en: "Edit", de: "Bearbeiten" },
|
|
1047
|
+
"documentDesigner.company.enter": { en: "enter", de: "eintragen" },
|
|
1048
|
+
"documentDesigner.company.hint": {
|
|
1049
|
+
en: "Maintain once, every template and layout inserts them as placeholders.",
|
|
1050
|
+
de: "Einmal pflegen, jede Vorlage und jedes Layout setzt sie als Platzhalter ein.",
|
|
1051
|
+
},
|
|
1052
|
+
"documentDesigner.applyLayout.open": {
|
|
1053
|
+
en: "Apply to more templates",
|
|
1054
|
+
de: "Auf weitere Vorlagen anwenden",
|
|
1055
|
+
},
|
|
1056
|
+
"documentDesigner.applyLayout.title": {
|
|
1057
|
+
en: "Apply “{name}” to more templates",
|
|
1058
|
+
de: "„{name}“ auf weitere Vorlagen anwenden",
|
|
1059
|
+
},
|
|
1060
|
+
"documentDesigner.applyLayout.intro": {
|
|
1061
|
+
en: "Header, footer, font and colors then come from this layout. The text of the templates stays as it is.",
|
|
1062
|
+
de: "Kopf, Fuß, Schrift und Farben kommen danach aus diesem Layout. Der Text der Vorlagen bleibt, wie er ist.",
|
|
1063
|
+
},
|
|
1064
|
+
"documentDesigner.applyLayout.all": { en: "All PDF templates", de: "Alle PDF-Vorlagen" },
|
|
1065
|
+
"documentDesigner.applyLayout.allHint": {
|
|
1066
|
+
en: "Becomes the default layout of the tenant. No copies are made, new texts of system templates keep arriving.",
|
|
1067
|
+
de: "Wird das Standard-Layout des Mandanten. Es entstehen keine Kopien, neue Texte von System-Vorlagen kommen weiter an.",
|
|
1068
|
+
},
|
|
1069
|
+
"documentDesigner.applyLayout.selected": { en: "Only these templates", de: "Nur diese Vorlagen" },
|
|
1070
|
+
"documentDesigner.applyLayout.selectedHint": {
|
|
1071
|
+
en: "Creates one draft per template and language.",
|
|
1072
|
+
de: "Legt je Vorlage und Sprache einen Entwurf an.",
|
|
1073
|
+
},
|
|
1074
|
+
"documentDesigner.applyLayout.note": {
|
|
1075
|
+
en: "Mail templates do not appear here. You need the right to edit every chosen template.",
|
|
1076
|
+
de: "Mail-Vorlagen erscheinen hier nicht. Du brauchst das Bearbeitungsrecht auf jede gewählte Vorlage.",
|
|
1077
|
+
},
|
|
1078
|
+
"documentDesigner.applyLayout.cancel": { en: "Cancel", de: "Abbrechen" },
|
|
1079
|
+
"documentDesigner.applyLayout.tooMany": {
|
|
1080
|
+
en: "{count} entries selected, at most {max} per run. Choose fewer templates.",
|
|
1081
|
+
de: "{count} Einträge gewählt, höchstens {max} pro Durchgang. Wähle weniger Vorlagen aus.",
|
|
1082
|
+
},
|
|
1083
|
+
"documentDesigner.applyLayout.close": { en: "Close", de: "Schließen" },
|
|
1084
|
+
"documentDesigner.applyLayout.submitAll": {
|
|
1085
|
+
en: "Set as default layout",
|
|
1086
|
+
de: "Als Standard-Layout setzen",
|
|
1087
|
+
},
|
|
1088
|
+
"documentDesigner.applyLayout.allDone": {
|
|
1089
|
+
en: "The layout is now the default layout of the tenant.",
|
|
1090
|
+
de: "Das Layout ist jetzt das Standard-Layout des Mandanten.",
|
|
1091
|
+
},
|
|
1092
|
+
"documentDesigner.applyLayout.skipped": { en: "Skipped", de: "Übersprungen" },
|
|
1093
|
+
"documentDesigner.applyLayout.failed": { en: "Not published", de: "Nicht veröffentlicht" },
|
|
1094
|
+
"documentDesigner.applyLayout.systemWarning.one": {
|
|
1095
|
+
en: "1 system template becomes an adjustment of your tenant. New texts of it then no longer arrive automatically.",
|
|
1096
|
+
de: "1 System-Vorlage wird zur Anpassung deines Mandanten. Neue Texte dieser System-Vorlage kommen dann nicht mehr automatisch an.",
|
|
1097
|
+
},
|
|
1098
|
+
"documentDesigner.applyLayout.systemWarning.other": {
|
|
1099
|
+
en: "{count} system templates become adjustments of your tenant. New texts of these system templates then no longer arrive automatically.",
|
|
1100
|
+
de: "{count} System-Vorlagen werden zu Anpassungen deines Mandanten. Neue Texte dieser System-Vorlagen kommen dann nicht mehr automatisch an.",
|
|
1101
|
+
},
|
|
1102
|
+
"documentDesigner.applyLayout.submit.one": {
|
|
1103
|
+
en: "Create draft for 1 template",
|
|
1104
|
+
de: "Entwurf für 1 Vorlage anlegen",
|
|
1105
|
+
},
|
|
1106
|
+
"documentDesigner.applyLayout.submit.other": {
|
|
1107
|
+
en: "Create drafts for {count} templates",
|
|
1108
|
+
de: "Entwürfe für {count} Vorlagen anlegen",
|
|
1109
|
+
},
|
|
1110
|
+
"documentDesigner.applyLayout.drafted.one": { en: "1 draft created.", de: "1 Entwurf angelegt." },
|
|
1111
|
+
"documentDesigner.applyLayout.drafted.other": {
|
|
1112
|
+
en: "{count} drafts created.",
|
|
1113
|
+
de: "{count} Entwürfe angelegt.",
|
|
1114
|
+
},
|
|
1115
|
+
"documentDesigner.applyLayout.publish.one": {
|
|
1116
|
+
en: "Publish 1 draft",
|
|
1117
|
+
de: "1 Entwurf veröffentlichen",
|
|
1118
|
+
},
|
|
1119
|
+
"documentDesigner.applyLayout.publish.other": {
|
|
1120
|
+
en: "Publish {count} drafts",
|
|
1121
|
+
de: "{count} Entwürfe veröffentlichen",
|
|
1122
|
+
},
|
|
876
1123
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type PdfLayoutLook } from "./layout-meta.ts";
|
|
3
|
+
export declare function LayoutAppearanceSection({ look, hasHeader, hasFooter, onChange, }: {
|
|
4
|
+
readonly look: PdfLayoutLook;
|
|
5
|
+
readonly hasHeader: boolean;
|
|
6
|
+
readonly hasFooter: boolean;
|
|
7
|
+
readonly onChange: (next: PdfLayoutLook) => void;
|
|
8
|
+
}): ReactNode;
|