@micha.bigler/ui-core-micha 4.30.0 → 4.32.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.
@@ -8,7 +8,8 @@ import { AuthContext } from '../auth/AuthContext';
8
8
  import { fetchCookieStatement, fetchPrivacyStatement } from '../auth/authApi';
9
9
  import { resolveErrorText } from '../utils/resolveErrorText';
10
10
  import { refreshProfileDraft } from '../utils/profileDraft';
11
- export function ProfileComponent({ onSubmit, submitText, showName = true, showPrivacy = true, showCookies = true, showStatements = true, privacyStatementText = null, cookieStatementText = null, }) {
11
+ import { PrivacyNoticeLink } from '../privacy/PrivacyNoticeLink';
12
+ export function ProfileComponent({ onSubmit, submitText, showName = true, showPrivacy = true, showCookies = true, showStatements = true, privacyStatementText = null, cookieStatementText = null, privacyMode = 'legacy', }) {
12
13
  const { t, i18n } = useTranslation();
13
14
  // WICHTIG: Wir holen den User direkt aus dem globalen State
14
15
  // Das verhindert den doppelten Request und den ReferenceError
@@ -33,7 +34,7 @@ export function ProfileComponent({ onSubmit, submitText, showName = true, showPr
33
34
  useEffect(() => {
34
35
  const refreshed = refreshProfileDraft(user, previousUserIdentity.current, editedFields.current, {
35
36
  firstName, lastName, acceptedPrivacy, acceptedCookies,
36
- });
37
+ }, privacyMode);
37
38
  previousUserIdentity.current = refreshed.identity;
38
39
  editedFields.current = refreshed.editedFields;
39
40
  setUsername(refreshed.values.username);
@@ -42,7 +43,7 @@ export function ProfileComponent({ onSubmit, submitText, showName = true, showPr
42
43
  setLastName(refreshed.values.lastName);
43
44
  setAcceptedPrivacy(refreshed.values.acceptedPrivacy);
44
45
  setAcceptedCookies(refreshed.values.acceptedCookies);
45
- }, [user]);
46
+ }, [user, privacyMode]);
46
47
  useEffect(() => {
47
48
  if (privacyStatementText !== null && privacyStatementText !== undefined) {
48
49
  setPrivacyStatement(String(privacyStatementText));
@@ -56,7 +57,7 @@ export function ProfileComponent({ onSubmit, submitText, showName = true, showPr
56
57
  useEffect(() => {
57
58
  let cancelled = false;
58
59
  const loadStatements = async () => {
59
- if (!showStatements)
60
+ if (!showStatements || privacyMode === 'central')
60
61
  return;
61
62
  if (showPrivacy && (privacyStatementText === null || privacyStatementText === undefined)) {
62
63
  setLoadingPrivacyStatement(true);
@@ -95,7 +96,7 @@ export function ProfileComponent({ onSubmit, submitText, showName = true, showPr
95
96
  return () => {
96
97
  cancelled = true;
97
98
  };
98
- }, [showStatements, showPrivacy, showCookies, privacyStatementText, cookieStatementText]);
99
+ }, [showStatements, showPrivacy, showCookies, privacyStatementText, cookieStatementText, privacyMode]);
99
100
  const handleSubmit = async (event) => {
100
101
  event.preventDefault();
101
102
  if (!onSubmit)
@@ -106,9 +107,9 @@ export function ProfileComponent({ onSubmit, submitText, showName = true, showPr
106
107
  const payload = Object.assign(Object.assign(Object.assign({}, (showName && {
107
108
  first_name: firstName,
108
109
  last_name: lastName,
109
- })), (showPrivacy && {
110
+ })), (privacyMode !== 'central' && showPrivacy && {
110
111
  accepted_privacy_statement: acceptedPrivacy,
111
- })), (showCookies && {
112
+ })), (privacyMode !== 'central' && showCookies && {
112
113
  accepted_convenience_cookies: acceptedCookies,
113
114
  }));
114
115
  try {
@@ -140,11 +141,11 @@ export function ProfileComponent({ onSubmit, submitText, showName = true, showPr
140
141
  }, fullWidth: true }), _jsx(TextField, { label: t('Profile.LAST_NAME_LABEL'), value: lastName, onChange: (e) => {
141
142
  editedFields.current.add('lastName');
142
143
  setLastName(e.target.value);
143
- }, fullWidth: true })] })), (showPrivacy || showCookies) && (_jsxs(Box, { sx: { mt: 1 }, children: [_jsx(Typography, { variant: "subtitle1", gutterBottom: true, children: t('Profile.PRIVACY_SECTION_TITLE') }), _jsxs(Stack, { spacing: 1, children: [showPrivacy && (_jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: acceptedPrivacy, onChange: (e) => {
144
+ }, fullWidth: true })] })), (showPrivacy || showCookies) && (_jsxs(Box, { sx: { mt: 1 }, children: [_jsx(Typography, { variant: "subtitle1", gutterBottom: true, children: t('Profile.PRIVACY_SECTION_TITLE') }), _jsxs(Stack, { spacing: 1, children: [privacyMode === 'central' && _jsx(PrivacyNoticeLink, {}), privacyMode !== 'central' && showPrivacy && (_jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: acceptedPrivacy, onChange: (e) => {
144
145
  editedFields.current.add('acceptedPrivacy');
145
146
  setAcceptedPrivacy(e.target.checked);
146
- } }), label: t('Profile.ACCEPT_PRIVACY_LABEL') })), showCookies && (_jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: acceptedCookies, onChange: (e) => {
147
+ } }), label: t('Profile.ACCEPT_PRIVACY_LABEL') })), privacyMode !== 'central' && showCookies && (_jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: acceptedCookies, onChange: (e) => {
147
148
  editedFields.current.add('acceptedCookies');
148
149
  setAcceptedCookies(e.target.checked);
149
- } }), label: t('Profile.ACCEPT_COOKIES_LABEL') }))] }), showStatements && (_jsxs(Stack, { spacing: 1.25, sx: { mt: 1.5 }, children: [showPrivacy && (_jsxs(Accordion, { disableGutters: true, children: [_jsx(AccordionSummary, { children: _jsx(Typography, { variant: "body2", fontWeight: 600, children: t('Profile.PRIVACY_STATEMENT_TITLE', 'Privacy statement') }) }), _jsx(AccordionDetails, { children: loadingPrivacyStatement ? (_jsx(Typography, { variant: "body2", color: "text.secondary", children: t('Profile.STATEMENT_LOADING', 'Loading statement...') })) : (_jsx(Typography, { variant: "body2", sx: { whiteSpace: 'pre-wrap' }, children: privacyStatement || t('Profile.PRIVACY_STATEMENT_EMPTY', 'Privacy statement is currently unavailable.') })) })] })), showCookies && (_jsxs(Accordion, { disableGutters: true, children: [_jsx(AccordionSummary, { children: _jsx(Typography, { variant: "body2", fontWeight: 600, children: t('Profile.COOKIES_STATEMENT_TITLE', 'Cookie statement') }) }), _jsx(AccordionDetails, { children: loadingCookieStatement ? (_jsx(Typography, { variant: "body2", color: "text.secondary", children: t('Profile.STATEMENT_LOADING', 'Loading statement...') })) : (_jsx(Typography, { variant: "body2", sx: { whiteSpace: 'pre-wrap' }, children: cookieStatement || t('Profile.COOKIES_STATEMENT_EMPTY', 'Cookie statement is currently unavailable.') })) })] }))] }))] })), _jsx(Box, { sx: { mt: 2 }, children: _jsx(Button, { type: "submit", variant: "contained", disabled: saving, children: saving ? submitLabelLoading : submitLabel }) })] }));
150
+ } }), label: t('Profile.ACCEPT_COOKIES_LABEL') }))] }), showStatements && privacyMode !== 'central' && (_jsxs(Stack, { spacing: 1.25, sx: { mt: 1.5 }, children: [showPrivacy && (_jsxs(Accordion, { disableGutters: true, children: [_jsx(AccordionSummary, { children: _jsx(Typography, { variant: "body2", fontWeight: 600, children: t('Profile.PRIVACY_STATEMENT_TITLE', 'Privacy statement') }) }), _jsx(AccordionDetails, { children: loadingPrivacyStatement ? (_jsx(Typography, { variant: "body2", color: "text.secondary", children: t('Profile.STATEMENT_LOADING', 'Loading statement...') })) : (_jsx(Typography, { variant: "body2", sx: { whiteSpace: 'pre-wrap' }, children: privacyStatement || t('Profile.PRIVACY_STATEMENT_EMPTY', 'Privacy statement is currently unavailable.') })) })] })), showCookies && (_jsxs(Accordion, { disableGutters: true, children: [_jsx(AccordionSummary, { children: _jsx(Typography, { variant: "body2", fontWeight: 600, children: t('Profile.COOKIES_STATEMENT_TITLE', 'Cookie statement') }) }), _jsx(AccordionDetails, { children: loadingCookieStatement ? (_jsx(Typography, { variant: "body2", color: "text.secondary", children: t('Profile.STATEMENT_LOADING', 'Loading statement...') })) : (_jsx(Typography, { variant: "body2", sx: { whiteSpace: 'pre-wrap' }, children: cookieStatement || t('Profile.COOKIES_STATEMENT_EMPTY', 'Cookie statement is currently unavailable.') })) })] }))] }))] })), _jsx(Box, { sx: { mt: 2 }, children: _jsx(Button, { type: "submit", variant: "contained", disabled: saving, children: saving ? submitLabelLoading : submitLabel }) })] }));
150
151
  }
@@ -7,6 +7,7 @@ import { fetchPrivacyStatement, updateUserProfile } from '../auth/authApi';
7
7
  import { defaultTermsApi } from '../auth/termsApi';
8
8
  import { resolveErrorText } from '../utils/resolveErrorText';
9
9
  import { profileIdentity, refreshProfileDraft } from '../utils/profileDraft';
10
+ import { PrivacyNoticeLink } from '../privacy/PrivacyNoticeLink';
10
11
  export const PROFILE_STEP_OPTION_SX = { alignItems: 'flex-start' };
11
12
  export const PROFILE_STEP_CHECKBOX_SX = { mt: -0.5 };
12
13
  // Only http(s) documents are linked; the terms URL comes from the server.
@@ -57,7 +58,7 @@ function termsFromResponse(body) {
57
58
  * a host action (for example `SetupWizardShell`'s `primaryForm`) submits it.
58
59
  * - `submitLabel`, `disabled`, `onBusyChange(busy)`.
59
60
  */
60
- export function ProfileStepContent({ draft, onDraftChange, onComplete, onBusyChange, termsEnabled = false, termsApi = defaultTermsApi, privacyUrl, formId, submitLabel, disabled = false, }) {
61
+ export function ProfileStepContent({ draft, onDraftChange, onComplete, onBusyChange, termsEnabled = false, termsApi = defaultTermsApi, privacyMode = 'legacy', privacyUrl, formId, submitLabel, disabled = false, }) {
61
62
  var _a;
62
63
  const { t, i18n } = useTranslation();
63
64
  const { user, login } = useContext(AuthContext) || {};
@@ -75,13 +76,16 @@ export function ProfileStepContent({ draft, onDraftChange, onComplete, onBusyCha
75
76
  const activeDraft = onDraftChange ? draft : internalDraft;
76
77
  const draftMatches = Boolean(activeDraft) && activeDraft.identity === identity;
77
78
  const editedFields = new Set(draftMatches ? activeDraft.editedFields || [] : []);
78
- const { values } = refreshProfileDraft(user, identity, editedFields, draftMatches ? activeDraft.values || {} : {});
79
+ const { values } = refreshProfileDraft(user, identity, editedFields, draftMatches ? activeDraft.values || {} : {}, privacyMode);
79
80
  const currentTerms = terms && terms.owner === identity ? terms : null;
80
81
  const commit = (patch) => {
81
82
  Object.keys(patch).forEach((key) => editedFields.add(key));
82
83
  const next = {
83
84
  identity,
84
- values: Object.assign({ firstName: values.firstName, lastName: values.lastName, acceptedPrivacy: values.acceptedPrivacy, acceptedCookies: values.acceptedCookies }, patch),
85
+ values: Object.assign(Object.assign({ firstName: values.firstName, lastName: values.lastName }, (privacyMode !== 'central' ? {
86
+ acceptedPrivacy: values.acceptedPrivacy,
87
+ acceptedCookies: values.acceptedCookies,
88
+ } : {})), patch),
85
89
  editedFields: [...editedFields],
86
90
  };
87
91
  if (onDraftChange)
@@ -92,9 +96,9 @@ export function ProfileStepContent({ draft, onDraftChange, onComplete, onBusyCha
92
96
  const applyTerms = useCallback((body, owner, privacyAccepted) => {
93
97
  const next = termsFromResponse(body);
94
98
  setTerms(Object.assign({ owner }, next));
95
- setTermsChecked(next.accepted && Boolean(privacyAccepted));
99
+ setTermsChecked(next.accepted && (privacyMode === 'central' || Boolean(privacyAccepted)));
96
100
  return next;
97
- }, []);
101
+ }, [privacyMode]);
98
102
  // Terms evidence is per person: reset and reload whenever the identity changes.
99
103
  useEffect(() => {
100
104
  setTerms(null);
@@ -102,7 +106,7 @@ export function ProfileStepContent({ draft, onDraftChange, onComplete, onBusyCha
102
106
  if (!termsEnabled || !user)
103
107
  return undefined;
104
108
  let active = true;
105
- const privacyAccepted = Boolean(user.accepted_privacy_statement);
109
+ const privacyAccepted = privacyMode === 'central' || Boolean(user.accepted_privacy_statement);
106
110
  termsApi.getAcceptance()
107
111
  .then((body) => {
108
112
  if (active)
@@ -117,7 +121,7 @@ export function ProfileStepContent({ draft, onDraftChange, onComplete, onBusyCha
117
121
  return () => {
118
122
  active = false;
119
123
  };
120
- }, [termsEnabled, termsApi, identity]);
124
+ }, [termsEnabled, termsApi, identity, privacyMode]);
121
125
  useEffect(() => {
122
126
  onBusyChange === null || onBusyChange === void 0 ? void 0 : onBusyChange(saving);
123
127
  }, [saving]);
@@ -139,12 +143,15 @@ export function ProfileStepContent({ draft, onDraftChange, onComplete, onBusyCha
139
143
  }
140
144
  setPrivacyOpen((previous) => !previous);
141
145
  };
142
- const requiredChecked = termsEnabled ? termsChecked : Boolean(values.acceptedPrivacy);
146
+ const requiredChecked = termsEnabled
147
+ ? termsChecked
148
+ : privacyMode === 'central' || Boolean(values.acceptedPrivacy);
143
149
  const handleRequiredChange = (event) => {
144
150
  const { checked } = event.target;
145
151
  if (termsEnabled)
146
152
  setTermsChecked(checked);
147
- commit({ acceptedPrivacy: checked });
153
+ if (privacyMode !== 'central')
154
+ commit({ acceptedPrivacy: checked });
148
155
  };
149
156
  // Returns true when the acceptance is on record for the current version.
150
157
  const acceptCurrentTerms = async (version) => {
@@ -179,8 +186,10 @@ export function ProfileStepContent({ draft, onDraftChange, onComplete, onBusyCha
179
186
  setErrorKey(t('Auth.PROFILE_NAME_REQUIRED'));
180
187
  return;
181
188
  }
182
- if (!requiredChecked) {
183
- setErrorKey(t(termsEnabled ? 'Auth.TERMS_PRIVACY_REQUIRED' : 'Auth.PRIVACY_REQUIRED'));
189
+ if ((termsEnabled || privacyMode !== 'central') && !requiredChecked) {
190
+ setErrorKey(t(termsEnabled
191
+ ? (privacyMode === 'central' ? 'Auth.TERMS_REQUIRED' : 'Auth.TERMS_PRIVACY_REQUIRED')
192
+ : 'Auth.PRIVACY_REQUIRED'));
184
193
  return;
185
194
  }
186
195
  savingRef.current = true;
@@ -198,12 +207,15 @@ export function ProfileStepContent({ draft, onDraftChange, onComplete, onBusyCha
198
207
  throw new Error('terms_not_available');
199
208
  }
200
209
  stage = 'profile';
201
- const updatedUser = await updateUserProfile({
210
+ const profileUpdate = {
202
211
  first_name: (values.firstName || '').trim(),
203
212
  last_name: (values.lastName || '').trim(),
204
- accepted_privacy_statement: true,
205
- accepted_convenience_cookies: Boolean(values.acceptedCookies),
206
- });
213
+ };
214
+ if (privacyMode !== 'central') {
215
+ profileUpdate.accepted_privacy_statement = true;
216
+ profileUpdate.accepted_convenience_cookies = Boolean(values.acceptedCookies);
217
+ }
218
+ const updatedUser = await updateUserProfile(profileUpdate);
207
219
  if (updatedUser)
208
220
  login === null || login === void 0 ? void 0 : login(updatedUser);
209
221
  if (termsEnabled && !termsState.accepted) {
@@ -232,6 +244,6 @@ export function ProfileStepContent({ draft, onDraftChange, onComplete, onBusyCha
232
244
  const busy = disabled || saving;
233
245
  const privacyLink = privacyHref ? (_jsx(Link, { href: privacyHref, target: "_blank", rel: "noopener noreferrer", children: t('Auth.PRIVACY_LINK_LABEL') })) : (_jsx(Link, { component: "button", type: "button", variant: "body1", onClick: togglePrivacyText, sx: { verticalAlign: 'baseline' }, children: t('Auth.PRIVACY_LINK_LABEL') }));
234
246
  const termsLink = termsHref ? (_jsx(Link, { href: termsHref, target: "_blank", rel: "noopener noreferrer", children: t('Auth.TERMS_LINK_LABEL') })) : t('Auth.TERMS_LINK_LABEL');
235
- const requiredLabel = termsEnabled ? (_jsxs("span", { children: [t('Auth.TERMS_PRIVACY_PREFIX'), termsLink, t('Auth.TERMS_PRIVACY_AND'), privacyLink, t('Auth.TERMS_PRIVACY_SUFFIX')] })) : (_jsxs("span", { children: [t('Auth.PRIVACY_REQUIRED_LABEL'), ' ', privacyLink, t('Auth.TERMS_PRIVACY_SUFFIX')] }));
236
- return (_jsxs(Box, { component: "form", id: formId, onSubmit: handleSubmit, noValidate: true, "aria-busy": saving || undefined, sx: { display: 'flex', flexDirection: 'column', gap: 2 }, children: [errorKey && _jsx(Alert, { ref: errorRef, severity: "error", tabIndex: -1, children: errorKey }), _jsx(TextField, { label: t('Profile.FIRST_NAME_LABEL'), value: values.firstName || '', onChange: (event) => commit({ firstName: event.target.value }), autoComplete: "given-name", required: true, fullWidth: true, disabled: busy }), _jsx(TextField, { label: t('Profile.LAST_NAME_LABEL'), value: values.lastName || '', onChange: (event) => commit({ lastName: event.target.value }), autoComplete: "family-name", required: true, fullWidth: true, disabled: busy }), _jsxs(Stack, { spacing: 0.5, children: [_jsx(FormControlLabel, { sx: PROFILE_STEP_OPTION_SX, control: (_jsx(Checkbox, { checked: requiredChecked, onChange: handleRequiredChange, disabled: busy || (termsEnabled && !currentTerms), sx: PROFILE_STEP_CHECKBOX_SX })), label: requiredLabel }), privacyOpen && privacyText && !privacyHref && (_jsx(Typography, { variant: "body2", color: "text.secondary", sx: { whiteSpace: 'pre-wrap', pl: 4 }, children: privacyText })), _jsx(FormControlLabel, { sx: PROFILE_STEP_OPTION_SX, control: (_jsx(Checkbox, { checked: Boolean(values.acceptedCookies), onChange: (event) => commit({ acceptedCookies: event.target.checked }), disabled: busy, sx: PROFILE_STEP_CHECKBOX_SX })), label: t('Auth.CONVENIENCE_COOKIES_LABEL') })] }), !formId && (_jsx(Box, { children: _jsx(Button, { type: "submit", variant: "contained", disabled: busy, children: submitLabel || t('Profile.SAVE_BUTTON') }) }))] }));
247
+ const requiredLabel = termsEnabled && privacyMode === 'central' ? (_jsxs("span", { children: [t('Auth.TERMS_PRIVACY_PREFIX'), termsLink, t('Auth.TERMS_PRIVACY_SUFFIX')] })) : termsEnabled ? (_jsxs("span", { children: [t('Auth.TERMS_PRIVACY_PREFIX'), termsLink, t('Auth.TERMS_PRIVACY_AND'), privacyLink, t('Auth.TERMS_PRIVACY_SUFFIX')] })) : privacyMode === 'central' ? null : (_jsxs("span", { children: [t('Auth.PRIVACY_REQUIRED_LABEL'), ' ', privacyLink, t('Auth.TERMS_PRIVACY_SUFFIX')] }));
248
+ return (_jsxs(Box, { component: "form", id: formId, onSubmit: handleSubmit, noValidate: true, "aria-busy": saving || undefined, sx: { display: 'flex', flexDirection: 'column', gap: 2 }, children: [errorKey && _jsx(Alert, { ref: errorRef, severity: "error", tabIndex: -1, children: errorKey }), _jsx(TextField, { label: t('Profile.FIRST_NAME_LABEL'), value: values.firstName || '', onChange: (event) => commit({ firstName: event.target.value }), autoComplete: "given-name", required: true, fullWidth: true, disabled: busy }), _jsx(TextField, { label: t('Profile.LAST_NAME_LABEL'), value: values.lastName || '', onChange: (event) => commit({ lastName: event.target.value }), autoComplete: "family-name", required: true, fullWidth: true, disabled: busy }), (termsEnabled || privacyMode !== 'central') && _jsxs(Stack, { spacing: 0.5, children: [(termsEnabled || privacyMode !== 'central') && (_jsx(FormControlLabel, { sx: PROFILE_STEP_OPTION_SX, control: (_jsx(Checkbox, { checked: requiredChecked, onChange: handleRequiredChange, disabled: busy || (termsEnabled && !currentTerms), sx: PROFILE_STEP_CHECKBOX_SX })), label: requiredLabel })), privacyOpen && privacyText && !privacyHref && (_jsx(Typography, { variant: "body2", color: "text.secondary", sx: { whiteSpace: 'pre-wrap', pl: 4 }, children: privacyText })), privacyMode !== 'central' && _jsx(FormControlLabel, { sx: PROFILE_STEP_OPTION_SX, control: (_jsx(Checkbox, { checked: Boolean(values.acceptedCookies), onChange: (event) => commit({ acceptedCookies: event.target.checked }), disabled: busy, sx: PROFILE_STEP_CHECKBOX_SX })), label: t('Auth.CONVENIENCE_COOKIES_LABEL') })] }), privacyMode === 'central' && _jsx(Box, { children: _jsx(PrivacyNoticeLink, {}) }), !formId && (_jsx(Box, { children: _jsx(Button, { type: "submit", variant: "contained", disabled: busy, children: submitLabel || t('Profile.SAVE_BUTTON') }) }))] }));
237
249
  }
@@ -2675,6 +2675,13 @@ export const authTranslations = {
2675
2675
  "en": "Please accept the terms of use and the privacy statement.",
2676
2676
  "sw": "Tafadhali kubali masharti ya matumizi na taarifa ya faragha."
2677
2677
  },
2678
+ "Auth.TERMS_REQUIRED": {
2679
+ "de": "Bitte akzeptieren Sie die Nutzungsbedingungen.",
2680
+ "de_informal": "Bitte akzeptiere die Nutzungsbedingungen.",
2681
+ "fr": "Veuillez accepter les conditions d’utilisation.",
2682
+ "en": "Please accept the terms of use.",
2683
+ "sw": "Tafadhali kubali masharti ya matumizi."
2684
+ },
2678
2685
  "Auth.PRIVACY_REQUIRED": {
2679
2686
  "de": "Bitte akzeptieren Sie die Datenschutzerklärung.",
2680
2687
  "de_informal": "Bitte akzeptiere die Datenschutzerklärung.",
@@ -120,4 +120,78 @@ export const billingTranslations = {
120
120
  'Billing.OP_SAVE_ERROR': { de: 'Die Änderung konnte nicht gespeichert werden.', de_informal: 'Die Änderung konnte nicht gespeichert werden.', en: 'The change could not be saved.', fr: 'Impossible d’enregistrer la modification.', sw: 'Mabadiliko hayakuweza kuhifadhiwa.' },
121
121
  'Billing.OP_FORBIDDEN': { de: 'Dafür fehlt die Berechtigung.', de_informal: 'Dafür fehlt die Berechtigung.', en: 'You do not have permission for this action.', fr: 'Vous n’avez pas l’autorisation pour cette action.', sw: 'Huna ruhusa ya kufanya kitendo hiki.' },
122
122
  'Billing.OP_NO_AI_COST': { de: 'In diesem Monat gab es keine KI-Aufrufe.', de_informal: 'In diesem Monat gab es keine KI-Aufrufe.', en: 'There were no AI calls this month.', fr: 'Aucun appel à l’IA ce mois-ci.', sw: 'Hakukuwa na miito ya AI mwezi huu.' },
123
+ 'Billing.CONTRACT_TITLE': { de: 'Vertrag', de_informal: 'Vertrag', en: 'Contract', fr: 'Contrat', sw: 'Mkataba' },
124
+ 'Billing.CONTRACT_PHASE_INITIAL': { de: 'Erste Vertragsphase', de_informal: 'Erste Vertragsphase', en: 'Initial contract period', fr: 'Période contractuelle initiale', sw: 'Kipindi cha mwanzo cha mkataba' },
125
+ 'Billing.CONTRACT_PHASE_CONTINUATION': { de: 'Vertragsverlängerung', de_informal: 'Vertragsverlängerung', en: 'Continuation period', fr: 'Période de reconduction', sw: 'Kipindi cha kuendelea kwa mkataba' },
126
+ 'Billing.CONTRACT_PHASE_NONE': { de: 'Keine laufende Vertragsphase', de_informal: 'Keine laufende Vertragsphase', en: 'No current contract period', fr: 'Aucune période contractuelle en cours', sw: 'Hakuna kipindi cha sasa cha mkataba' },
127
+ 'Billing.CONTRACT_STATUS_ACTIVE': { de: 'Aktiv', de_informal: 'Aktiv', en: 'Active', fr: 'Actif', sw: 'Unatumika' },
128
+ 'Billing.CONTRACT_STATUS_CANCELLATION_SCHEDULED': { de: 'Kündigung vorgemerkt', de_informal: 'Kündigung vorgemerkt', en: 'Cancellation scheduled', fr: 'Résiliation programmée', sw: 'Kughairi kumepangwa' },
129
+ 'Billing.CONTRACT_STATUS_ENDED': { de: 'Beendet', de_informal: 'Beendet', en: 'Ended', fr: 'Terminé', sw: 'Umemalizika' },
130
+ 'Billing.CONTRACT_STATUS_WITHDRAWN': { de: 'Widerrufen', de_informal: 'Widerrufen', en: 'Withdrawn', fr: 'Rétracté', sw: 'Umebatilishwa' },
131
+ 'Billing.CONTRACT_STARTED_AT': { de: 'Beginn: {{date}}', de_informal: 'Beginn: {{date}}', en: 'Started: {{date}}', fr: 'Début : {{date}}', sw: 'Ilianza: {{date}}' },
132
+ 'Billing.CONTRACT_PAID_THROUGH': { de: 'Bezahlt bis {{date}}', de_informal: 'Bezahlt bis {{date}}', en: 'Paid through {{date}}', fr: 'Payé jusqu’au {{date}}', sw: 'Imelipiwa hadi {{date}}' },
133
+ 'Billing.CONTRACT_NEXT_CHARGE': { de: 'Nächste Zahlung: {{amount}}', de_informal: 'Nächste Zahlung: {{amount}}', en: 'Next charge: {{amount}}', fr: 'Prochain paiement : {{amount}}', sw: 'Malipo yajayo: {{amount}}' },
134
+ 'Billing.CONTRACT_NEXT_CHARGE_DATE': { de: 'Fällig am {{date}}', de_informal: 'Fällig am {{date}}', en: 'Due on {{date}}', fr: 'Échéance le {{date}}', sw: 'Inalipwa tarehe {{date}}' },
135
+ 'Billing.CONTRACT_NEXT_ALLOWANCE': { de: 'Kontingent danach: {{tokens}} Token', de_informal: 'Kontingent danach: {{tokens}} Token', en: 'Allowance after renewal: {{tokens}} tokens', fr: 'Crédit après renouvellement : {{tokens}} jetons', sw: 'Kiwango baada ya kusasisha: tokeni {{tokens}}' },
136
+ 'Billing.CONTRACT_CANCEL_EFFECTIVE': { de: 'Kündigung wirksam am {{date}}', de_informal: 'Kündigung wirksam am {{date}}', en: 'Cancellation effective on {{date}}', fr: 'Résiliation effective le {{date}}', sw: 'Kughairi kutaanza kutumika tarehe {{date}}' },
137
+ 'Billing.CONTRACT_REFUND_DUE': { de: 'Voraussichtlich bis {{date}}', de_informal: 'Voraussichtlich bis {{date}}', en: 'Expected by {{date}}', fr: 'Prévu avant le {{date}}', sw: 'Inatarajiwa kufikia {{date}}' },
138
+ 'Billing.DECLARATION_STATUS_RECEIVED': { de: 'eingegangen', de_informal: 'eingegangen', en: 'received', fr: 'reçue', sw: 'imepokelewa' },
139
+ 'Billing.DECLARATION_STATUS_AWAITING_CONFIRMATION': { de: 'wartet auf Bestätigung per E-Mail', de_informal: 'wartet auf Bestätigung per E-Mail', en: 'awaiting email confirmation', fr: 'en attente de confirmation par e-mail', sw: 'inasubiri uthibitisho kwa barua pepe' },
140
+ 'Billing.DECLARATION_STATUS_NEEDS_REVIEW': { de: 'wird geprüft', de_informal: 'wird geprüft', en: 'under review', fr: 'en cours d’examen', sw: 'inakaguliwa' },
141
+ 'Billing.DECLARATION_STATUS_ACCEPTED': { de: 'angenommen', de_informal: 'angenommen', en: 'accepted', fr: 'acceptée', sw: 'imekubaliwa' },
142
+ 'Billing.DECLARATION_STATUS_SCHEDULED': { de: 'vorgemerkt', de_informal: 'vorgemerkt', en: 'scheduled', fr: 'planifiée', sw: 'imepangwa' },
143
+ 'Billing.DECLARATION_STATUS_EFFECTIVE': { de: 'wirksam', de_informal: 'wirksam', en: 'effective', fr: 'effective', sw: 'imeanza kutumika' },
144
+ 'Billing.DECLARATION_STATUS_REJECTED': { de: 'abgelehnt', de_informal: 'abgelehnt', en: 'rejected', fr: 'refusée', sw: 'imekataliwa' },
145
+ 'Billing.DECLARATION_STATUS_UNKNOWN': { de: 'Status unbekannt', de_informal: 'Status unbekannt', en: 'status unknown', fr: 'statut inconnu', sw: 'hali haijulikani' },
146
+ 'Billing.CONTRACT_DECLARATION': { de: '{{kind}} · {{status}}', de_informal: '{{kind}} · {{status}}', en: '{{kind}} · {{status}}', fr: '{{kind}} · {{status}}', sw: '{{kind}} · {{status}}' },
147
+ 'Billing.CONTRACT_LOAD_ERROR': { de: 'Vertragsdaten konnten nicht geladen werden.', de_informal: 'Vertragsdaten konnten nicht geladen werden.', en: 'Contract details could not be loaded.', fr: 'Impossible de charger les détails du contrat.', sw: 'Maelezo ya mkataba hayakuweza kupakiwa.' },
148
+ 'Billing.CANCEL_OPEN': { de: 'Verträge hier kündigen', de_informal: 'Verträge hier kündigen', en: 'Cancel contracts here', fr: 'Résilier les contrats ici', sw: 'Ghairi mikataba hapa' },
149
+ 'Billing.CANCEL_TITLE': { de: 'Vertrag kündigen', de_informal: 'Vertrag kündigen', en: 'Cancel contract', fr: 'Résilier le contrat', sw: 'Ghairi mkataba' },
150
+ 'Billing.CANCEL_TYPE_LABEL': { de: 'Art der Kündigung', de_informal: 'Art der Kündigung', en: 'Cancellation type', fr: 'Type de résiliation', sw: 'Aina ya kughairi' },
151
+ 'Billing.CANCEL_ORDINARY': { de: 'Ordentliche Kündigung', de_informal: 'Ordentliche Kündigung', en: 'Ordinary cancellation', fr: 'Résiliation ordinaire', sw: 'Kughairi kwa kawaida' },
152
+ 'Billing.CANCEL_EXTRAORDINARY': { de: 'Ausserordentliche Kündigung', de_informal: 'Ausserordentliche Kündigung', en: 'Extraordinary cancellation', fr: 'Résiliation extraordinaire', sw: 'Kughairi kwa dharura' },
153
+ 'Billing.CANCEL_REQUESTED_END_DATE': { de: 'Gewünschtes Vertragsende (optional)', de_informal: 'Gewünschtes Vertragsende (optional)', en: 'Requested contract end date (optional)', fr: 'Date de fin souhaitée (facultatif)', sw: 'Tarehe ya mwisho inayotakiwa (si lazima)' },
154
+ 'Billing.CANCEL_REASON': { de: 'Begründung', de_informal: 'Begründung', en: 'Reason', fr: 'Motif', sw: 'Sababu' },
155
+ 'Billing.CANCEL_REASON_REQUIRED': { de: 'Bitte geben Sie eine Begründung ein.', de_informal: 'Bitte gib eine Begründung ein.', en: 'Enter a reason.', fr: 'Veuillez indiquer un motif.', sw: 'Tafadhali weka sababu.' },
156
+ 'Billing.CANCEL_SUBMIT': { de: 'Jetzt kündigen', de_informal: 'Jetzt kündigen', en: 'Confirm cancellation', fr: 'Confirmer la résiliation', sw: 'Thibitisha kughairi' },
157
+ 'Billing.CANCEL_SUCCESS': { de: 'Kündigung übermittelt', de_informal: 'Kündigung übermittelt', en: 'Cancellation submitted', fr: 'Résiliation envoyée', sw: 'Ombi la kughairi limetumwa' },
158
+ 'Billing.CANCEL_SUCCESS_EFFECTIVE': { de: 'Der Vertrag endet am {{date}}.', de_informal: 'Der Vertrag endet am {{date}}.', en: 'The contract ends on {{date}}.', fr: 'Le contrat prend fin le {{date}}.', sw: 'Mkataba utaisha tarehe {{date}}.' },
159
+ 'Billing.CANCEL_PENDING_REVIEW': { de: 'Ihre Kündigung wurde übermittelt und wird geprüft.', de_informal: 'Deine Kündigung wurde übermittelt und wird geprüft.', en: 'Your cancellation was submitted and is pending review.', fr: 'Votre résiliation a été envoyée et doit être examinée.', sw: 'Ombi lako la kughairi limetumwa na linasubiri ukaguzi.' },
160
+ 'Billing.CANCEL_ERROR': { de: 'Die Kündigung konnte nicht übermittelt werden. Bitte versuchen Sie es erneut.', de_informal: 'Die Kündigung konnte nicht übermittelt werden. Bitte versuche es erneut.', en: 'The cancellation could not be submitted. Please try again.', fr: 'La résiliation n’a pas pu être envoyée. Veuillez réessayer.', sw: 'Kughairi hakukuweza kutumwa. Tafadhali jaribu tena.' },
161
+ 'Billing.DECLARATION_KIND_LABEL': { de: 'Erklärung', de_informal: 'Erklärung', en: 'Declaration', fr: 'Déclaration', sw: 'Tamko' },
162
+ 'Billing.DECLARATION_CANCELLATION': { de: 'Kündigung', de_informal: 'Kündigung', en: 'Cancellation', fr: 'Résiliation', sw: 'Kughairi' },
163
+ 'Billing.DECLARATION_WITHDRAWAL': { de: 'Widerruf', de_informal: 'Widerruf', en: 'Withdrawal', fr: 'Rétractation', sw: 'Kujiondoa' },
164
+ 'Billing.DECLARATION_NAME': { de: 'Vor- und Nachname', de_informal: 'Vor- und Nachname', en: 'Full name', fr: 'Nom complet', sw: 'Jina kamili' },
165
+ 'Billing.DECLARATION_EMAIL': { de: 'E-Mail-Adresse', de_informal: 'E-Mail-Adresse', en: 'Email address', fr: 'Adresse e-mail', sw: 'Anwani ya barua pepe' },
166
+ 'Billing.DECLARATION_CONTRACT_HINT': { de: 'Vertragsangabe (optional)', de_informal: 'Vertragsangabe (optional)', en: 'Contract details (optional)', fr: 'Détails du contrat (facultatif)', sw: 'Maelezo ya mkataba (si lazima)' },
167
+ 'Billing.DECLARATION_REQUESTED_END_DATE': { de: 'Gewünschtes Vertragsende (optional)', de_informal: 'Gewünschtes Vertragsende (optional)', en: 'Requested contract end date (optional)', fr: 'Date de fin souhaitée (facultatif)', sw: 'Tarehe ya mwisho inayotakiwa (si lazima)' },
168
+ 'Billing.DECLARATION_REASON': { de: 'Begründung', de_informal: 'Begründung', en: 'Reason', fr: 'Motif', sw: 'Sababu' },
169
+ 'Billing.DECLARATION_REASON_REQUIRED': { de: 'Bitte geben Sie für eine ausserordentliche Kündigung eine Begründung ein.', de_informal: 'Bitte gib für eine ausserordentliche Kündigung eine Begründung ein.', en: 'Enter a reason for an extraordinary cancellation.', fr: 'Indiquez un motif pour une résiliation extraordinaire.', sw: 'Weka sababu ya kughairi kwa dharura.' },
170
+ 'Billing.DECLARATION_MESSAGE': { de: 'Nachricht (optional)', de_informal: 'Nachricht (optional)', en: 'Message (optional)', fr: 'Message (facultatif)', sw: 'Ujumbe (si lazima)' },
171
+ 'Billing.DECLARATION_SUBMIT': { de: 'Erklärung absenden', de_informal: 'Erklärung absenden', en: 'Submit declaration', fr: 'Envoyer la déclaration', sw: 'Tuma tamko' },
172
+ 'Billing.DECLARATION_SUBMITTING': { de: 'Wird übermittelt …', de_informal: 'Wird übermittelt …', en: 'Submitting …', fr: 'Envoi en cours…', sw: 'Inatuma…' },
173
+ 'Billing.DECLARATION_RECEIVED': { de: 'Erklärung eingegangen', de_informal: 'Erklärung eingegangen', en: 'Declaration received', fr: 'Déclaration reçue', sw: 'Tamko limepokelewa' },
174
+ 'Billing.DECLARATION_REFERENCE': { de: 'Referenz: {{reference}}', de_informal: 'Referenz: {{reference}}', en: 'Reference: {{reference}}', fr: 'Référence : {{reference}}', sw: 'Nambari ya kumbukumbu: {{reference}}' },
175
+ 'Billing.DECLARATION_RECEIVED_AT': { de: 'Eingegangen am {{date}}', de_informal: 'Eingegangen am {{date}}', en: 'Received on {{date}}', fr: 'Reçue le {{date}}', sw: 'Limepokelewa {{date}}' },
176
+ 'Billing.DECLARATION_SAVE': { de: 'Bestätigung speichern', de_informal: 'Bestätigung speichern', en: 'Save acknowledgement', fr: 'Enregistrer l’accusé de réception', sw: 'Hifadhi uthibitisho' },
177
+ 'Billing.DECLARATION_PRINT': { de: 'Drucken', de_informal: 'Drucken', en: 'Print', fr: 'Imprimer', sw: 'Chapisha' },
178
+ 'Billing.DECLARATION_REQUIRED': { de: 'Dieses Feld ist erforderlich.', de_informal: 'Dieses Feld ist erforderlich.', en: 'This field is required.', fr: 'Ce champ est obligatoire.', sw: 'Sehemu hii inahitajika.' },
179
+ 'Billing.DECLARATION_INVALID_EMAIL': { de: 'Bitte geben Sie eine gültige E-Mail-Adresse ein.', de_informal: 'Bitte gib eine gültige E-Mail-Adresse ein.', en: 'Enter a valid email address.', fr: 'Saisissez une adresse e-mail valide.', sw: 'Weka anwani sahihi ya barua pepe.' },
180
+ 'Billing.DECLARATION_TOO_LONG': { de: 'Der Text ist zu lang.', de_informal: 'Der Text ist zu lang.', en: 'This text is too long.', fr: 'Ce texte est trop long.', sw: 'Maandishi haya ni marefu sana.' },
181
+ 'Billing.DECLARATION_ERROR': { de: 'Die Erklärung konnte nicht übermittelt werden. Ihre Eingaben sind weiterhin verfügbar; bitte versuchen Sie es erneut.', de_informal: 'Die Erklärung konnte nicht übermittelt werden. Deine Eingaben sind weiterhin verfügbar; bitte versuche es erneut.', en: 'The declaration could not be submitted. Your entries are still here; please try again.', fr: 'La déclaration n’a pas pu être envoyée. Vos réponses sont conservées ; veuillez réessayer.', sw: 'Tamko halikuweza kutumwa. Ulichoweka bado kipo; tafadhali jaribu tena.' },
182
+ 'Billing.DECLARATION_CONFIRM_TITLE': { de: 'E-Mail-Adresse für die Erklärung bestätigen', de_informal: 'E-Mail-Adresse für die Erklärung bestätigen', en: 'Confirm the email address for your declaration', fr: 'Confirmez l’adresse e-mail de votre déclaration', sw: 'Thibitisha anwani ya barua pepe ya tamko lako' },
183
+ 'Billing.DECLARATION_CONFIRM': { de: 'E-Mail bestätigen', de_informal: 'E-Mail bestätigen', en: 'Confirm email', fr: 'Confirmer l’adresse e-mail', sw: 'Thibitisha barua pepe' },
184
+ 'Billing.DECLARATION_CONFIRM_SUCCESS': { de: 'Erklärung {{reference}} bestätigt.', de_informal: 'Erklärung {{reference}} bestätigt.', en: 'Declaration {{reference}} confirmed.', fr: 'Déclaration {{reference}} confirmée.', sw: 'Tamko {{reference}} limethibitishwa.' },
185
+ 'Billing.DECLARATION_CONFIRM_ERROR': { de: 'Dieser Bestätigungslink konnte nicht überprüft werden.', de_informal: 'Dieser Bestätigungslink konnte nicht überprüft werden.', en: 'This confirmation link could not be verified.', fr: 'Ce lien de confirmation n’a pas pu être vérifié.', sw: 'Kiungo hiki cha uthibitisho hakikuweza kuthibitishwa.' },
186
+ 'Billing.REFUND_STATUS_PENDING': { de: 'Rückzahlung ausstehend', de_informal: 'Rückzahlung ausstehend', en: 'Refund pending', fr: 'Remboursement en attente', sw: 'Marejesho yanasubiri' },
187
+ 'Billing.REFUND_STATUS_REQUESTED': { de: 'Rückzahlung angefordert', de_informal: 'Rückzahlung angefordert', en: 'Refund requested', fr: 'Remboursement demandé', sw: 'Marejesho yameombwa' },
188
+ 'Billing.REFUND_STATUS_SUCCEEDED': { de: 'Rückzahlung erfolgt', de_informal: 'Rückzahlung erfolgt', en: 'Refund paid', fr: 'Remboursement effectué', sw: 'Marejesho yamelipwa' },
189
+ 'Billing.REFUND_STATUS_FAILED': { de: 'Rückzahlung fehlgeschlagen', de_informal: 'Rückzahlung fehlgeschlagen', en: 'Refund failed', fr: 'Échec du remboursement', sw: 'Marejesho yameshindwa' },
190
+ 'Billing.REFUND_STATUS_REQUIRES_ACTION': { de: 'Rückzahlung erfordert eine Aktion', de_informal: 'Rückzahlung erfordert eine Aktion', en: 'Refund requires action', fr: 'Une action est requise pour le remboursement', sw: 'Marejesho yanahitaji hatua' },
191
+ 'Billing.REFUND_STATUS_CANCELLED': { de: 'Rückzahlung storniert', de_informal: 'Rückzahlung storniert', en: 'Refund cancelled', fr: 'Remboursement annulé', sw: 'Marejesho yameghairiwa' },
192
+ 'Billing.REFUND_STATUS_UNKNOWN': { de: 'Rückzahlungsstatus unbekannt', de_informal: 'Rückzahlungsstatus unbekannt', en: 'Refund status unknown', fr: 'Statut du remboursement inconnu', sw: 'Hali ya marejesho haijulikani' },
193
+ 'Billing.WITHDRAW_CONTRACT': { de: 'Vertrag widerrufen', de_informal: 'Vertrag widerrufen', en: 'Withdraw from contract', fr: 'Se rétracter du contrat', sw: 'Jiondoe kwenye mkataba' },
194
+ 'Billing.WITHDRAWAL_PAID_TOTAL': { de: 'Insgesamt gezahlt: {{amount}}', de_informal: 'Insgesamt gezahlt: {{amount}}', en: 'Total paid: {{amount}}', fr: 'Total payé : {{amount}}', sw: 'Jumla iliyolipwa: {{amount}}' },
195
+ 'Billing.WITHDRAWAL_REFUNDED_BEFORE': { de: 'Bereits zurückerstattet: {{amount}}', de_informal: 'Bereits zurückerstattet: {{amount}}', en: 'Previously refunded: {{amount}}', fr: 'Déjà remboursé : {{amount}}', sw: 'Kiasi kilichorejeshwa awali: {{amount}}' },
196
+ 'Billing.PLAN_CONTINUATION': { de: 'Danach monatlich {{amount}} zuzüglich anfallender Steuern für {{tokens}} Token; monatlich kündbar', de_informal: 'Danach monatlich {{amount}} zuzüglich anfallender Steuern für {{tokens}} Token; monatlich kündbar', en: 'Then {{amount}} monthly plus applicable taxes for {{tokens}} tokens; cancellable monthly', fr: 'Puis {{amount}} par mois, taxes applicables en sus, pour {{tokens}} jetons ; résiliable chaque mois', sw: 'Kisha {{amount}} kwa mwezi pamoja na kodi zinazohusika kwa tokeni {{tokens}}; unaweza kughairi kila mwezi' },
123
197
  };
@@ -0,0 +1,37 @@
1
+ export const privacyTranslations = {
2
+ 'Privacy.CHOICE_TITLE': { de: 'Datenschutzauswahl', fr: 'Choix de confidentialité', en: 'Privacy choices', sw: 'Chaguo za faragha' },
3
+ 'Privacy.CHANGE_ANYTIME': { de: 'Sie können Ihre Auswahl jederzeit hier ändern.', fr: 'Vous pouvez modifier votre choix ici à tout moment.', en: 'You can change your choice here at any time.', sw: 'Unaweza kubadilisha chaguo lako hapa wakati wowote.' },
4
+ 'Privacy.CONTROLLER': { de: 'Verantwortliche Stelle', fr: 'Responsable du traitement', en: 'Data controller', sw: 'Mdhibiti wa data' },
5
+ 'Privacy.CLOSE': { de: 'Schliessen', fr: 'Fermer', en: 'Close', sw: 'Funga' },
6
+ 'Privacy.NECESSARY_ONLY': { de: 'Nur notwendige Funktionen', fr: 'Fonctions nécessaires uniquement', en: 'Necessary only', sw: 'Muhimu pekee' },
7
+ 'Privacy.ALLOW_ALL': { de: 'Alle erlauben', fr: 'Tout autoriser', en: 'Allow all', sw: 'Ruhusu yote' },
8
+ 'Privacy.SETTINGS': { de: 'Einstellungen', fr: 'Paramètres', en: 'Settings', sw: 'Mipangilio' },
9
+ 'Privacy.SETTINGS_TITLE': { de: 'Datenschutzeinstellungen', fr: 'Paramètres de confidentialité', en: 'Privacy settings', sw: 'Mipangilio ya faragha' },
10
+ 'Privacy.ALWAYS_ACTIVE': { de: 'Immer aktiv', fr: 'Toujours actives', en: 'Always active', sw: 'Huwashwa kila wakati' },
11
+ 'Privacy.REQUIRED_INFORMATION': { de: 'Für Anmeldung, Sicherheit und ausdrücklich angeforderte Funktionen.', fr: 'Pour la connexion, la sécurité et les fonctions expressément demandées.', en: 'For sign-in, security and functions you explicitly request.', sw: 'Kwa kuingia, usalama na vitendaji unavyoomba waziwazi.' },
12
+ 'Privacy.NECESSARY_ONLY_ACTIVE': { de: 'Nur notwendige Funktionen sind aktiv.', fr: 'Seules les fonctions nécessaires sont actives.', en: 'Only necessary functions are active.', sw: 'Vitendaji muhimu pekee ndivyo vinavyotumika.' },
13
+ 'Privacy.NO_OPTIONAL': { de: 'Diese App verwendet nur notwendige Funktionen.', fr: 'Cette application utilise uniquement les fonctions nécessaires.', en: 'This app uses only necessary functions.', sw: 'Programu hii hutumia vitendaji muhimu pekee.' },
14
+ 'Privacy.SAVED': { de: 'Ihre Auswahl ist gespeichert.', fr: 'Votre choix a été enregistré.', en: 'Your selection has been saved.', sw: 'Chaguo lako limehifadhiwa.' },
15
+ 'Privacy.SAVE_ERROR': { de: 'Speichern derzeit nicht möglich. Optionale Dienste bleiben ausgeschaltet.', fr: 'Enregistrement impossible pour le moment. Les services facultatifs restent désactivés.', en: 'Unable to save right now. Optional services remain off.', sw: 'Haiwezekani kuhifadhi kwa sasa. Huduma za hiari zitaendelea kuzimwa.' },
16
+ 'Privacy.SAVE_ERROR_WITH_GRANTS': { de: 'Speichern derzeit nicht möglich. Die Änderung ist nicht gespeichert; widerrufene Dienste bleiben auf dieser Seite ausgeschaltet.', fr: 'Enregistrement impossible pour le moment. La modification n’est pas enregistrée ; les services retirés restent désactivés sur cette page.', en: 'Unable to save right now. The change is not stored; withdrawn services remain off on this page.', sw: 'Haiwezekani kuhifadhi kwa sasa. Mabadiliko hayajahifadhiwa; huduma zilizoondolewa zitaendelea kuzimwa kwenye ukurasa huu.' },
17
+ 'Privacy.NOTICE_LINK': { de: 'Datenschutzerklärung', fr: 'Politique de confidentialité', en: 'Privacy notice', sw: 'Taarifa ya faragha' },
18
+ 'Privacy.NOTICE_EXPLANATION': { de: 'Welche Daten wir wofür verwenden, steht in der Datenschutzerklärung.', fr: 'Notre avis de confidentialité explique quelles données nous utilisons et pourquoi.', en: 'Our privacy notice explains which data we use and why.', sw: 'Taarifa yetu ya faragha inaeleza data tunayotumia na sababu zake.' },
19
+ 'Privacy.PROVIDER_STORAGE_DETAIL': { de: 'Anbieter: {{provider}}. Speicherart und Laufzeit werden für die tatsächlich eingesetzten Funktionen ausgewiesen.', fr: 'Fournisseur : {{provider}}. Le type de stockage et sa durée sont indiqués pour les fonctions réellement utilisées.', en: 'Provider: {{provider}}. Storage types and duration are listed for the functions actually used.', sw: 'Mtoa huduma: {{provider}}. Aina na muda wa hifadhi vimeorodheshwa kwa vitendaji vinavyotumika.' },
20
+ 'Privacy.SERVER_RETENTION': { de: 'Aufbewahrung auf dem Server: {{retention}}', fr: 'Conservation sur le serveur : {{retention}}', en: 'Server retention: {{retention}}', sw: 'Muda wa kuhifadhi kwenye seva: {{retention}}' },
21
+ 'Privacy.DATA_CATEGORIES': { de: 'Datenkategorien: {{values}}', fr: 'Catégories de données : {{values}}', en: 'Data categories: {{values}}', sw: 'Aina za data: {{values}}' },
22
+ 'Privacy.RECIPIENTS': { de: 'Empfänger: {{values}}', fr: 'Destinataires : {{values}}', en: 'Recipients: {{values}}', sw: 'Wapokeaji: {{values}}' },
23
+ 'Privacy.TRANSFERS': { de: 'Übermittlungen: {{values}}', fr: 'Transferts : {{values}}', en: 'Transfers: {{values}}', sw: 'Uhamisho: {{values}}' },
24
+ 'Privacy.NECESSARY_STORAGE': { de: 'Notwendiger Speicher', fr: 'Stockage nécessaire', en: 'Necessary storage', sw: 'Hifadhi muhimu' },
25
+ 'Privacy.DETAILS': { de: 'Details', fr: 'Détails', en: 'Details', sw: 'Maelezo' },
26
+ 'Privacy.SAVE': { de: 'Auswahl speichern', fr: 'Enregistrer le choix', en: 'Save selection', sw: 'Hifadhi chaguo' },
27
+ 'Privacy.SAVING': { de: 'Wird gespeichert …', fr: 'Enregistrement…', en: 'Saving…', sw: 'Inahifadhi…' },
28
+ 'Privacy.RETRY': { de: 'Erneut versuchen', fr: 'Réessayer', en: 'Retry', sw: 'Jaribu tena' },
29
+ 'Privacy.NECESSARY_ALWAYS_ACTIVE': { de: 'Notwendige Funktionen sind immer aktiv.', fr: 'Les fonctions nécessaires sont toujours actives.', en: 'Necessary functions are always active.', sw: 'Vitendaji muhimu huwa vimewashwa kila wakati.' },
30
+ 'Privacy.FOOTER_NAV': { de: 'Rechtliches und Datenschutz', fr: 'Mentions légales et confidentialité', en: 'Legal and privacy', sw: 'Kisheria na faragha' },
31
+ 'Privacy.FOOTER_PRIVACY': { de: 'Datenschutzerklärung', fr: 'Politique de confidentialité', en: 'Privacy notice', sw: 'Taarifa ya faragha' },
32
+ 'Privacy.FOOTER_TERMS': { de: 'Nutzungsbedingungen', fr: 'Conditions d’utilisation', en: 'Terms of use', sw: 'Masharti ya matumizi' },
33
+ 'Privacy.FOOTER_DATA_PROCESSING': { de: 'Auftragsverarbeitung', fr: 'Traitement des données', en: 'Data processing', sw: 'Uchakataji wa data' },
34
+ 'Privacy.FOOTER_CANCELLATION': { de: 'Kündigung und Rückerstattung', fr: 'Résiliation et remboursement', en: 'Cancellation and refunds', sw: 'Kughairi na marejesho' },
35
+ 'Privacy.LOADING': { de: 'Datenschutzeinstellungen werden geladen.', fr: 'Chargement des paramètres de confidentialité.', en: 'Loading privacy settings.', sw: 'Inapakia mipangilio ya faragha.' },
36
+ 'Privacy.UNAVAILABLE': { de: 'Datenschutzeinstellungen sind derzeit nicht verfügbar. Optionale Dienste bleiben ausgeschaltet.', fr: 'Les paramètres de confidentialité sont indisponibles. Les services facultatifs restent désactivés.', en: 'Privacy settings are unavailable right now. Optional services remain off.', sw: 'Mipangilio ya faragha haipatikani sasa. Huduma za hiari zitaendelea kuzimwa.' },
37
+ };
@@ -17,9 +17,10 @@ import { messagingTranslations } from './messagingTranslations';
17
17
  import { notificationsTranslations } from './notificationsTranslations';
18
18
  import { receiptsTranslations } from './receiptsTranslations';
19
19
  import { onboardingTranslations } from './onboardingTranslations';
20
+ import { privacyTranslations } from './privacyTranslations';
20
21
  import { sectionNavTranslations } from './sectionNavTranslations';
21
22
  import { userMenuTranslations } from './userMenuTranslations';
22
- export const uiCoreTranslations = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, authTranslations), billingTranslations), chartsTranslations), chatTranslations), messagingTranslations), notificationsTranslations), receiptsTranslations), onboardingTranslations), sectionNavTranslations), userMenuTranslations);
23
+ export const uiCoreTranslations = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, authTranslations), billingTranslations), chartsTranslations), chatTranslations), messagingTranslations), notificationsTranslations), receiptsTranslations), onboardingTranslations), privacyTranslations), sectionNavTranslations), userMenuTranslations);
23
24
  export function createUiCoreTranslations({ germanVariant = 'formal' } = {}) {
24
25
  return Object.fromEntries(Object.entries(uiCoreTranslations).map(([key, value]) => {
25
26
  const { de_informal } = value, rest = __rest(value, ["de_informal"]);
package/dist/index.js CHANGED
@@ -60,6 +60,10 @@ export { BillingAccessCell } from './billing/BillingAccessCell';
60
60
  export { useBillingUsersColumn } from './billing/useBillingUsersColumn';
61
61
  export { useOperatorAccounts } from './billing/useOperatorAccounts';
62
62
  export { WithdrawalDialog } from './billing/WithdrawalDialog';
63
+ export { ContractSummary } from './billing/ContractSummary';
64
+ export { CancellationDialog } from './billing/CancellationDialog';
65
+ export { DeclarationForm } from './billing/DeclarationForm';
66
+ export { DeclarationConfirm } from './billing/DeclarationConfirm';
63
67
  export { useBilling } from './billing/useBilling';
64
68
  export { createBillingApi, createCheckoutIdempotencyKey, defaultBillingApi } from './billing/api';
65
69
  export { createTermsApi, defaultTermsApi } from './auth/termsApi';
@@ -121,3 +125,13 @@ export { createReceiptsApi, defaultReceiptsApi } from './receipts/api';
121
125
  export { receiptFileProblem, prepareReceiptFile } from './receipts/files';
122
126
  export { RECEIPT_ACCEPT, RECEIPT_MAX_BYTES } from './receipts/wire';
123
127
  export { createUiCoreTranslations, uiCoreTranslations } from './i18n/uiCoreTranslations';
128
+ // --- 11. Privacy choices (opt-in; requires django-core-micha >= 3.22.0) ---
129
+ export { PrivacyProvider, usePrivacy } from './privacy/PrivacyProvider';
130
+ export { createPrivacyApi, defaultPrivacyApi } from './privacy/privacyApi';
131
+ export { PrivacyBanner } from './privacy/PrivacyBanner';
132
+ export { PrivacySettingsDialog, PrivacySettingsPanel } from './privacy/PrivacySettings';
133
+ export { PrivacySettingsLink } from './privacy/PrivacySettingsLink';
134
+ export { PrivacyFooterLinks, buildLegalReaderUrl, legalDocumentLanguage } from './privacy/PrivacyFooterLinks';
135
+ export { PrivacyNoticeLink, safePrivacyDocumentUrl } from './privacy/PrivacyNoticeLink';
136
+ export { registerPrivacyService, useGrantedPurpose, guardedImport, createPrivacyGuard, isPurposeGranted, } from './privacy/serviceRegistry';
137
+ export { privacyTranslations } from './i18n/privacyTranslations';
@@ -129,7 +129,7 @@ function getInitialPwaInstallState() {
129
129
  // consumer even when no extraContext is passed.
130
130
  const EMPTY_EXTRA_CONTEXT = {};
131
131
  const EMPTY_BROWSER_PUSH = {};
132
- export function OnboardingProvider({ children, extraSteps = [], extraContext = EMPTY_EXTRA_CONTEXT, pwaInstallEnabled = false, browserPush = EMPTY_BROWSER_PUSH, }) {
132
+ export function OnboardingProvider({ children, extraSteps = [], extraContext = EMPTY_EXTRA_CONTEXT, pwaInstallEnabled = false, browserPush = EMPTY_BROWSER_PUSH, privacyMode = 'legacy', }) {
133
133
  const { user } = useContext(AuthContext);
134
134
  const [configMap, setConfigMap] = useState({});
135
135
  const [configLoaded, setConfigLoaded] = useState(false);
@@ -139,7 +139,10 @@ export function OnboardingProvider({ children, extraSteps = [], extraContext = E
139
139
  const [dismissedSet, setDismissedSet] = useState(loadDismissedSteps);
140
140
  const seenAtMountRef = useRef(loadSeenSteps());
141
141
  const resolvedBrowserPush = useMemo(() => (Object.assign({ nagUntil: 'any-channel', showOnce: false }, browserPush)), [browserPush]);
142
- const descriptors = useMemo(() => [...UNIVERSAL_STEP_DESCRIPTORS, ...extraSteps], [extraSteps]);
142
+ const descriptors = useMemo(() => [
143
+ ...UNIVERSAL_STEP_DESCRIPTORS.filter((step) => privacyMode !== 'central' || step.id !== 'cookie_consent'),
144
+ ...extraSteps,
145
+ ], [extraSteps, privacyMode]);
143
146
  useEffect(() => {
144
147
  let cancelled = false;
145
148
  if (!user) {
@@ -11,6 +11,7 @@ import Link from '@mui/material/Link';
11
11
  import Typography from '@mui/material/Typography';
12
12
  import PrivacyTipIcon from '@mui/icons-material/PrivacyTip';
13
13
  import { fetchCookieStatement, fetchPrivacyStatement, updateUserProfile } from '../../auth/authApi';
14
+ /** @deprecated Adopt PrivacyProvider, PrivacyBanner and PrivacySettingsLink instead. */
14
15
  export function CookieConsentStep({ onComplete }) {
15
16
  const { t } = useTranslation();
16
17
  const [privacyAccepted, setPrivacyAccepted] = useState(false);
@@ -0,0 +1,60 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React, { useEffect, useRef } from 'react';
3
+ import { Box, Button, Paper, Stack, Typography } from '@mui/material';
4
+ import CloseIcon from '@mui/icons-material/Close';
5
+ import { useTranslation } from 'react-i18next';
6
+ import { usePrivacy } from './PrivacyProvider';
7
+ function localized(value, language) {
8
+ if (!value || typeof value !== 'object')
9
+ return '';
10
+ const normalized = String(language || '').replace('_', '-').toLowerCase();
11
+ const exact = Object.keys(value).find((key) => key.toLowerCase() === normalized);
12
+ if (exact)
13
+ return value[exact];
14
+ const base = normalized.split('-')[0];
15
+ const baseMatch = Object.keys(value).find((key) => key.toLowerCase() === base);
16
+ return value[baseMatch || Object.keys(value)[0]] || '';
17
+ }
18
+ export const PRIVACY_BANNER_PAPER_SX = {
19
+ position: 'fixed',
20
+ zIndex: (theme) => theme.zIndex.snackbar,
21
+ insetInline: 0,
22
+ bottom: 0,
23
+ p: { xs: 2, sm: 3 },
24
+ // Long manifests or translations must never push the choices off a small screen.
25
+ maxHeight: '90dvh',
26
+ overflowY: 'auto',
27
+ };
28
+ // The baseline MuiButton already sets minHeight; only the width and padding of the icon-only target are local.
29
+ export const PRIVACY_BANNER_CLOSE_SX = { minWidth: 44, p: 0, flexShrink: 0 };
30
+ export function PrivacyBanner() {
31
+ var _a, _b;
32
+ const privacy = usePrivacy();
33
+ const { t, i18n } = useTranslation();
34
+ const headingRef = useRef(null);
35
+ useEffect(() => {
36
+ var _a;
37
+ if (!(privacy === null || privacy === void 0 ? void 0 : privacy.bannerVisible))
38
+ return;
39
+ // The banner is nonmodal and loads asynchronously: move focus only when nothing else holds it,
40
+ // so it never interrupts someone who is already using the page.
41
+ const active = typeof document !== 'undefined' ? document.activeElement : null;
42
+ if (!active || active === document.body)
43
+ (_a = headingRef.current) === null || _a === void 0 ? void 0 : _a.focus();
44
+ }, [privacy === null || privacy === void 0 ? void 0 : privacy.bannerVisible]);
45
+ if (!(privacy === null || privacy === void 0 ? void 0 : privacy.bannerVisible))
46
+ return null;
47
+ const onKeyDown = (event) => {
48
+ if (event.key === 'Escape') {
49
+ event.stopPropagation();
50
+ privacy.dismissBanner();
51
+ }
52
+ };
53
+ const purposes = ((_b = (_a = privacy.manifest) === null || _a === void 0 ? void 0 : _a.purposes) === null || _b === void 0 ? void 0 : _b.filter((purpose) => !purpose.required)) || [];
54
+ const hasOtherGrant = purposes.some((purpose) => { var _a, _b, _c; return ((_c = (_b = (_a = privacy.choices) === null || _a === void 0 ? void 0 : _a.choices) === null || _b === void 0 ? void 0 : _b[purpose.id]) === null || _c === void 0 ? void 0 : _c.state) === 'granted'; });
55
+ return (_jsx(Paper, { role: "region", "aria-labelledby": "privacy-banner-title",
56
+ // Stays mounted while the settings dialog is open (it sits above modals and would cover the dialog's
57
+ // actions) so the dialog can return focus to the Settings button that opened it.
58
+ hidden: privacy.settingsOpen, onKeyDown: onKeyDown, elevation: 8, sx: PRIVACY_BANNER_PAPER_SX, children: _jsxs(Box, { sx: { maxWidth: 960, mx: 'auto' }, children: [_jsxs(Stack, { direction: "row", alignItems: "flex-start", justifyContent: "space-between", spacing: 2, children: [_jsxs(Box, { children: [_jsx(Typography, { id: "privacy-banner-title", component: "h2", variant: "h6", tabIndex: -1, ref: headingRef, children: t('Privacy.CHOICE_TITLE') }), _jsxs(Typography, { variant: "body2", color: "text.secondary", sx: { mt: 0.75 }, children: [t('Privacy.NECESSARY_ALWAYS_ACTIVE'), " ", t('Privacy.CHANGE_ANYTIME')] })] }), _jsx(Button, { type: "button", "aria-label": t('Privacy.CLOSE'), onClick: privacy.dismissBanner, sx: PRIVACY_BANNER_CLOSE_SX, children: _jsx(CloseIcon, { "aria-hidden": "true" }) })] }), _jsx(Stack, { spacing: 1.25, sx: { mt: 1.5 }, children: purposes.map((purpose) => (_jsxs(Box, { children: [localized(purpose.label, i18n.language) && _jsx(Typography, { variant: "subtitle2", children: localized(purpose.label, i18n.language) }), localized(purpose.summary, i18n.language) && (_jsx(Typography, { variant: "body2", color: "text.secondary", children: localized(purpose.summary, i18n.language) }))] }, purpose.id))) }), privacy.saveState === 'error' && (_jsx(Typography, { role: "alert", color: "error", variant: "body2", sx: { mt: 1.5 }, children: t(hasOtherGrant ? 'Privacy.SAVE_ERROR_WITH_GRANTS' : 'Privacy.SAVE_ERROR') })), _jsxs(Stack, { direction: { xs: 'column', sm: 'row' }, spacing: 1.25, sx: { mt: 2 }, children: [_jsx(Button, { type: "button", variant: "contained", size: "medium", disabled: privacy.saveState === 'saving', onClick: () => privacy.necessaryOnly('banner'), children: t('Privacy.NECESSARY_ONLY') }), _jsx(Button, { type: "button", variant: "contained", size: "medium", disabled: privacy.saveState === 'saving', onClick: () => privacy.acceptAll('banner'), children: t('Privacy.ALLOW_ALL') }), _jsx(Button, { type: "button", variant: "text", onClick: privacy.openSettings, children: t('Privacy.SETTINGS') })] })] }) }));
59
+ }
60
+ export default PrivacyBanner;
@@ -0,0 +1,69 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import React from 'react';
14
+ import { Box, Link } from '@mui/material';
15
+ import { useTranslation } from 'react-i18next';
16
+ import { PrivacySettingsLink } from './PrivacySettingsLink';
17
+ const LEGAL_SLUGS = ['privacy', 'terms', 'data-processing', 'cancellation'];
18
+ const APP_ID = /^[a-z0-9][a-z0-9_-]{0,63}$/;
19
+ /**
20
+ * Document language for the central legal reader. Only verified DE/EN documents exist: every other UI
21
+ * language links an explicitly supported fallback and never a manufactured translation.
22
+ */
23
+ export function legalDocumentLanguage(uiLanguage, fallback = 'en') {
24
+ const base = String(uiLanguage || '').toLowerCase().split(/[-_]/)[0];
25
+ if (base === 'de' || base === 'en')
26
+ return base;
27
+ return fallback === 'de' ? 'de' : 'en';
28
+ }
29
+ /**
30
+ * `<origin>/legal/<slug>?app=<id>&lang=<de|en>` — the stable link contract of the bigler-consult legal reader.
31
+ * Pure and static: it needs no privacy API, so legal hyperlinks survive a failed settings request.
32
+ * Returns null for an unsafe origin, unknown slug or malformed application id (no account or page data is ever added).
33
+ */
34
+ export function buildLegalReaderUrl({ origin, slug, appId, lang }) {
35
+ if (!LEGAL_SLUGS.includes(slug) || !APP_ID.test(String(appId || '')))
36
+ return null;
37
+ let base;
38
+ try {
39
+ base = new URL(String(origin || ''));
40
+ }
41
+ catch (_a) {
42
+ return null;
43
+ }
44
+ if ((base.protocol !== 'https:' && base.protocol !== 'http:') || base.username || base.password)
45
+ return null;
46
+ const query = new URLSearchParams({ app: appId, lang: lang === 'de' ? 'de' : 'en' });
47
+ return `${base.origin}/legal/${slug}?${query.toString()}`;
48
+ }
49
+ /**
50
+ * Persistent legal footer entries: Privacy notice and Terms (static reader links) plus the local
51
+ * "Privacy settings" action. The settings action opens THIS app's shared settings (never the reader's) and is
52
+ * hidden only when the host has not adopted the privacy module; the legal links are always rendered.
53
+ */
54
+ export function PrivacyFooterLinks(_a) {
55
+ var { legalOrigin, appId, documents = ['privacy', 'terms'], fallbackLanguage = 'en', showSettings = true, sx } = _a, props = __rest(_a, ["legalOrigin", "appId", "documents", "fallbackLanguage", "showSettings", "sx"]);
56
+ const { t, i18n } = useTranslation();
57
+ const lang = legalDocumentLanguage(i18n === null || i18n === void 0 ? void 0 : i18n.language, fallbackLanguage);
58
+ const labels = {
59
+ privacy: t('Privacy.FOOTER_PRIVACY'),
60
+ terms: t('Privacy.FOOTER_TERMS'),
61
+ 'data-processing': t('Privacy.FOOTER_DATA_PROCESSING'),
62
+ cancellation: t('Privacy.FOOTER_CANCELLATION'),
63
+ };
64
+ const links = documents
65
+ .map((slug) => ({ slug, href: buildLegalReaderUrl({ origin: legalOrigin, slug, appId, lang }) }))
66
+ .filter((item) => item.href);
67
+ return (_jsxs(Box, Object.assign({ component: "nav", "aria-label": t('Privacy.FOOTER_NAV'), sx: Object.assign({ display: 'flex', flexWrap: 'wrap', gap: 1.5, alignItems: 'center' }, sx) }, props, { children: [links.map(({ slug, href }) => (_jsx(Link, { href: href, variant: "body2", underline: "hover", children: labels[slug] }, slug))), showSettings ? _jsx(PrivacySettingsLink, { variant: "body2", underline: "hover" }) : null] })));
68
+ }
69
+ export default PrivacyFooterLinks;