@eifi1/ui-kit 0.45.0 → 0.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -12
- package/dist/admin/admin-area-labels.d.ts +9 -0
- package/dist/admin/admin-area-labels.js +5 -1
- package/dist/admin/admin-area-labels.js.map +1 -1
- package/dist/admin/admin-overview.d.ts +16 -1
- package/dist/admin/admin-overview.js +12 -1
- package/dist/admin/admin-overview.js.map +1 -1
- package/dist/admin/mail-test-card.d.ts +3 -2
- package/dist/admin/mail-test-card.js +3 -1
- package/dist/admin/mail-test-card.js.map +1 -1
- package/dist/components/appearance-labels.d.ts +10 -0
- package/dist/components/appearance-labels.js +6 -1
- package/dist/components/appearance-labels.js.map +1 -1
- package/dist/components/data-table-column-settings.js +2 -2
- package/dist/components/data-table-column-settings.js.map +1 -1
- package/dist/components/data-table-head.js +2 -2
- package/dist/components/data-table-head.js.map +1 -1
- package/dist/components/data-table-row-actions.d.ts +18 -2
- package/dist/components/data-table-row-actions.js +86 -2
- package/dist/components/data-table-row-actions.js.map +1 -1
- package/dist/components/data-table-shared.js +9 -2
- package/dist/components/data-table-shared.js.map +1 -1
- package/dist/components/data-table.d.ts +43 -2
- package/dist/components/data-table.js +9 -4
- package/dist/components/data-table.js.map +1 -1
- package/dist/components/date-format-setting.d.ts +29 -0
- package/dist/components/date-format-setting.js +36 -0
- package/dist/components/date-format-setting.js.map +1 -0
- package/dist/components/swipeable-row.d.ts +8 -0
- package/dist/components/swipeable-row.js.map +1 -1
- package/dist/components/tabs.d.ts +3 -2
- package/dist/components/tabs.js +1 -1
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/translation-review-editor.js +1 -0
- package/dist/components/translation-review-editor.js.map +1 -1
- package/dist/components/translation-review-labels.d.ts +5 -0
- package/dist/components/translation-review-labels.js +2 -0
- package/dist/components/translation-review-labels.js.map +1 -1
- package/dist/components/translation-review.d.ts +18 -8
- package/dist/components/translation-review.js +64 -7
- package/dist/components/translation-review.js.map +1 -1
- package/dist/components/write-lock-labels.js +2 -1
- package/dist/components/write-lock-labels.js.map +1 -1
- package/dist/components/write-lock.d.ts +33 -3
- package/dist/components/write-lock.js +9 -0
- package/dist/components/write-lock.js.map +1 -1
- package/dist/data-table.d.ts +1 -1
- package/dist/data-table.js.map +1 -1
- package/dist/eslint/index.js +1 -1
- package/dist/feedback/feedback-row-detail.d.ts +4 -2
- package/dist/feedback/feedback-row-detail.js +17 -26
- package/dist/feedback/feedback-row-detail.js.map +1 -1
- package/dist/feedback/feedback-swipe.d.ts +18 -0
- package/dist/feedback/feedback-swipe.js +10 -1
- package/dist/feedback/feedback-swipe.js.map +1 -1
- package/dist/i18n/german.js +41 -5
- package/dist/i18n/german.js.map +1 -1
- package/dist/i18n/kit-labels.d.ts +12 -1
- package/dist/i18n/kit-labels.js +8 -2
- package/dist/i18n/kit-labels.js.map +1 -1
- package/dist/i18n/locales/en.js +40 -6
- package/dist/i18n/locales/en.js.map +2 -2
- package/dist/i18n/locales/es.js +41 -5
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.js +41 -5
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hu.js +41 -5
- package/dist/i18n/locales/hu.js.map +1 -1
- package/dist/i18n/locales/it.js +41 -5
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/zh.js +41 -5
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/i18n/review.js +3 -1
- package/dist/i18n/review.js.map +1 -1
- package/dist/index.d.ts +15 -2
- package/dist/index.js +35 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/date-format.d.ts +81 -0
- package/dist/lib/date-format.js +56 -0
- package/dist/lib/date-format.js.map +1 -0
- package/dist/lib/format.d.ts +3 -0
- package/dist/lib/format.js +5 -4
- package/dist/lib/format.js.map +1 -1
- package/dist/notifications/device-zone-report.d.ts +27 -0
- package/dist/notifications/device-zone-report.js +24 -0
- package/dist/notifications/device-zone-report.js.map +1 -0
- package/dist/notifications/feedback-notification-types-labels.d.ts +7 -1
- package/dist/notifications/feedback-notification-types-labels.js +4 -1
- package/dist/notifications/feedback-notification-types-labels.js.map +1 -1
- package/dist/notifications/feedback-notification-types.d.ts +11 -5
- package/dist/notifications/feedback-notification-types.js +2 -1
- package/dist/notifications/feedback-notification-types.js.map +1 -1
- package/dist/notifications/notification-bell.d.ts +33 -0
- package/dist/notifications/notification-bell.js +74 -0
- package/dist/notifications/notification-bell.js.map +1 -0
- package/dist/notifications/notification-inbox.d.ts +77 -0
- package/dist/notifications/notification-inbox.js +206 -0
- package/dist/notifications/notification-inbox.js.map +1 -0
- package/dist/notifications/notification-types-setting.d.ts +6 -4
- package/dist/notifications/notification-types-setting.js +103 -45
- package/dist/notifications/notification-types-setting.js.map +1 -1
- package/dist/notifications/notification-types.d.ts +19 -7
- package/dist/notifications/notifications-labels.d.ts +41 -7
- package/dist/notifications/notifications-labels.js +18 -1
- package/dist/notifications/notifications-labels.js.map +1 -1
- package/dist/notifications/push-devices-setting.d.ts +20 -3
- package/dist/notifications/push-devices-setting.js +93 -33
- package/dist/notifications/push-devices-setting.js.map +1 -1
- package/dist/notifications/push-worker.d.ts +108 -0
- package/dist/notifications/push-worker.js +62 -0
- package/dist/notifications/push-worker.js.map +1 -0
- package/dist/notifications/quiet-hours-setting.d.ts +29 -17
- package/dist/notifications/quiet-hours-setting.js +9 -41
- package/dist/notifications/quiet-hours-setting.js.map +1 -1
- package/dist/notifications/time-zone-select.d.ts +5 -2
- package/dist/notifications/time-zone-select.js.map +1 -1
- package/dist/notifications/use-push-device.d.ts +4 -17
- package/dist/notifications/use-push-device.js +7 -15
- package/dist/notifications/use-push-device.js.map +1 -1
- package/dist/offline/local-first.d.ts +33 -0
- package/dist/offline/local-first.js +39 -0
- package/dist/offline/local-first.js.map +1 -0
- package/dist/offline/query-persistence.d.ts +26 -1
- package/dist/offline/query-persistence.js +27 -23
- package/dist/offline/query-persistence.js.map +1 -1
- package/dist/offline/service-worker-updates.d.ts +46 -0
- package/dist/offline/service-worker-updates.js +39 -0
- package/dist/offline/service-worker-updates.js.map +1 -0
- package/dist/offline.d.ts +5 -2
- package/dist/offline.js +11 -2
- package/dist/offline.js.map +1 -1
- package/dist/push-worker.d.ts +2 -0
- package/dist/push-worker.js +14 -0
- package/dist/push-worker.js.map +1 -0
- package/dist/shell/account-menu-text-size.d.ts +33 -0
- package/dist/shell/account-menu-text-size.js +51 -0
- package/dist/shell/account-menu-text-size.js.map +1 -0
- package/dist/shell/top-bar-actions.d.ts +6 -2
- package/dist/shell/top-bar-actions.js +1 -0
- package/dist/shell/top-bar-actions.js.map +1 -1
- package/dist/shell.d.ts +2 -0
- package/dist/shell.js +2 -0
- package/dist/shell.js.map +1 -1
- package/dist/sync/db.d.ts +76 -0
- package/dist/sync/db.js +24 -0
- package/dist/sync/db.js.map +1 -0
- package/dist/sync/engine.d.ts +124 -0
- package/dist/sync/engine.js +474 -0
- package/dist/sync/engine.js.map +1 -0
- package/dist/sync/hooks.d.ts +30 -0
- package/dist/sync/hooks.js +67 -0
- package/dist/sync/hooks.js.map +1 -0
- package/dist/sync/testing.d.ts +28 -0
- package/dist/sync/testing.js +41 -0
- package/dist/sync/testing.js.map +1 -0
- package/dist/sync/wire.d.ts +50 -0
- package/dist/sync/wire.js +2 -0
- package/dist/sync/wire.js.map +1 -0
- package/dist/sync.d.ts +7 -0
- package/dist/sync.js +22 -0
- package/dist/sync.js.map +1 -0
- package/dist/tour/tour-labels.js +1 -0
- package/dist/tour/tour-labels.js.map +1 -1
- package/dist/tour/tour.d.ts +30 -0
- package/dist/tour/tour.js +50 -6
- package/dist/tour/tour.js.map +1 -1
- package/package.json +19 -1
- package/src/admin/admin-area-labels.ts +13 -0
- package/src/admin/admin-overview.tsx +37 -2
- package/src/admin/mail-test-card.tsx +7 -3
- package/src/components/appearance-labels.ts +16 -0
- package/src/components/data-table-column-settings.tsx +2 -2
- package/src/components/data-table-head.tsx +2 -2
- package/src/components/data-table-row-actions.tsx +118 -2
- package/src/components/data-table-shared.tsx +21 -2
- package/src/components/data-table.tsx +51 -6
- package/src/components/date-format-setting.tsx +64 -0
- package/src/components/swipeable-row.tsx +8 -0
- package/src/components/tabs.tsx +4 -3
- package/src/components/translation-review-editor.tsx +2 -0
- package/src/components/translation-review-labels.ts +7 -0
- package/src/components/translation-review.tsx +102 -14
- package/src/components/write-lock-labels.ts +1 -0
- package/src/components/write-lock.tsx +36 -3
- package/src/data-table.ts +1 -0
- package/src/feedback/feedback-row-detail.tsx +18 -23
- package/src/feedback/feedback-swipe.tsx +28 -1
- package/src/i18n/german.ts +44 -4
- package/src/i18n/kit-labels.tsx +18 -1
- package/src/i18n/locales/en.ts +1 -0
- package/src/i18n/locales/es.ts +44 -4
- package/src/i18n/locales/fr.ts +44 -4
- package/src/i18n/locales/hu.ts +44 -4
- package/src/i18n/locales/it.ts +44 -4
- package/src/i18n/locales/zh.ts +44 -2
- package/src/i18n/review.ts +3 -1
- package/src/index.ts +42 -0
- package/src/lib/date-format.ts +151 -0
- package/src/lib/format.ts +10 -4
- package/src/notifications/device-zone-report.ts +54 -0
- package/src/notifications/feedback-notification-types-labels.ts +10 -1
- package/src/notifications/feedback-notification-types.ts +12 -5
- package/src/notifications/notification-bell.tsx +116 -0
- package/src/notifications/notification-inbox.tsx +304 -0
- package/src/notifications/notification-types-setting.tsx +151 -55
- package/src/notifications/notification-types.ts +20 -8
- package/src/notifications/notifications-labels.ts +69 -11
- package/src/notifications/push-devices-setting.tsx +123 -34
- package/src/notifications/push-worker.ts +160 -0
- package/src/notifications/quiet-hours-setting.tsx +41 -58
- package/src/notifications/time-zone-select.tsx +5 -2
- package/src/notifications/use-push-device.ts +20 -33
- package/src/offline/local-first.ts +76 -0
- package/src/offline/query-persistence.ts +57 -24
- package/src/offline/service-worker-updates.ts +81 -0
- package/src/offline.ts +7 -1
- package/src/push-worker.ts +25 -0
- package/src/shell/account-menu-text-size.tsx +77 -0
- package/src/shell/top-bar-actions.tsx +6 -1
- package/src/shell.ts +3 -0
- package/src/sync/db.ts +103 -0
- package/src/sync/engine.ts +699 -0
- package/src/sync/hooks.ts +93 -0
- package/src/sync/testing.ts +73 -0
- package/src/sync/wire.ts +61 -0
- package/src/sync.ts +29 -0
- package/src/tour/tour-labels.ts +1 -0
- package/src/tour/tour.tsx +100 -7
|
@@ -611,6 +611,14 @@ export interface UiKitProviderProps {
|
|
|
611
611
|
* view when it moves the prefix here.
|
|
612
612
|
*/
|
|
613
613
|
tableStorageKeyPrefix?: string;
|
|
614
|
+
/**
|
|
615
|
+
* 0.46 (docs/notifications-harmonization.md §10.3): the IANA zone ("Europe/Zurich") every
|
|
616
|
+
* TIMESTAMP below is shown in through `useKitFormat().formatDate` /
|
|
617
|
+
* `formatRelativeTime`, when the call names none — the account's picked zone, for an app
|
|
618
|
+
* that shows times in it. A bare "YYYY-MM-DD" is never shifted (a calendar day is the day
|
|
619
|
+
* it names in every zone). Left out, timestamps follow the device, as before.
|
|
620
|
+
*/
|
|
621
|
+
timeZone?: string;
|
|
614
622
|
children: ReactNode;
|
|
615
623
|
}
|
|
616
624
|
/**
|
|
@@ -621,7 +629,7 @@ export interface UiKitProviderProps {
|
|
|
621
629
|
* it names, so a page can re-label one table's `dataTable.table` without restating
|
|
622
630
|
* the language.
|
|
623
631
|
*/
|
|
624
|
-
export declare function UiKitProvider({ labels, locale, weekStartsOn, linkComponent, chartTooltipPlacement, formatDate, tableStorageKeyPrefix, children, }: UiKitProviderProps): import("react").JSX.Element;
|
|
632
|
+
export declare function UiKitProvider({ labels, locale, weekStartsOn, linkComponent, chartTooltipPlacement, formatDate, tableStorageKeyPrefix, timeZone, children, }: UiKitProviderProps): import("react").JSX.Element;
|
|
625
633
|
/**
|
|
626
634
|
* What the nearest provider says about one namespace — `undefined` outside one. Nested
|
|
627
635
|
* providers' words come merged, at every depth; no English default is filled in.
|
|
@@ -662,6 +670,9 @@ export declare function useKitDateFormatter(): KitDateFormatter | undefined;
|
|
|
662
670
|
/** The nearest provider's `tableStorageKeyPrefix`, or `undefined` — a table's own
|
|
663
671
|
* `storageKeyPrefix` wins over it, and the kit's `"hbui-table:"` comes after both. */
|
|
664
672
|
export declare function useKitTableStorageKeyPrefix(): string | undefined;
|
|
673
|
+
/** The nearest provider's `timeZone` (0.46), or `undefined` — the device's. A call's own
|
|
674
|
+
* `timeZone` wins over it. */
|
|
675
|
+
export declare function useKitTimeZone(): string | undefined;
|
|
665
676
|
/** {@link DEFAULT_FILE_LABELS}, but formatting in the provider's locale. */
|
|
666
677
|
export declare function useKitFileLabels(prop?: Partial<FileLabels>): FileLabels;
|
|
667
678
|
/**
|
package/dist/i18n/kit-labels.js
CHANGED
|
@@ -24,6 +24,7 @@ function UiKitProvider({
|
|
|
24
24
|
chartTooltipPlacement,
|
|
25
25
|
formatDate,
|
|
26
26
|
tableStorageKeyPrefix,
|
|
27
|
+
timeZone,
|
|
27
28
|
children
|
|
28
29
|
}) {
|
|
29
30
|
const outer = useContext(KitI18nContext);
|
|
@@ -35,9 +36,10 @@ function UiKitProvider({
|
|
|
35
36
|
linkComponent: linkComponent ?? outer.linkComponent,
|
|
36
37
|
chartTooltipPlacement: chartTooltipPlacement ?? outer.chartTooltipPlacement,
|
|
37
38
|
formatDate: formatDate ?? outer.formatDate,
|
|
38
|
-
tableStorageKeyPrefix: tableStorageKeyPrefix ?? outer.tableStorageKeyPrefix
|
|
39
|
+
tableStorageKeyPrefix: tableStorageKeyPrefix ?? outer.tableStorageKeyPrefix,
|
|
40
|
+
timeZone: timeZone ?? outer.timeZone
|
|
39
41
|
}),
|
|
40
|
-
[outer, labels, locale, weekStartsOn, linkComponent, chartTooltipPlacement, formatDate, tableStorageKeyPrefix]
|
|
42
|
+
[outer, labels, locale, weekStartsOn, linkComponent, chartTooltipPlacement, formatDate, tableStorageKeyPrefix, timeZone]
|
|
41
43
|
);
|
|
42
44
|
useTableViewsJoin(value.tableStorageKeyPrefix ?? DEFAULT_TABLE_STORAGE_KEY_PREFIX);
|
|
43
45
|
return /* @__PURE__ */ jsx(KitI18nContext.Provider, { value, children });
|
|
@@ -115,6 +117,9 @@ function useKitDateFormatter() {
|
|
|
115
117
|
function useKitTableStorageKeyPrefix() {
|
|
116
118
|
return useContext(KitI18nContext).tableStorageKeyPrefix;
|
|
117
119
|
}
|
|
120
|
+
function useKitTimeZone() {
|
|
121
|
+
return useContext(KitI18nContext).timeZone;
|
|
122
|
+
}
|
|
118
123
|
function useKitFileLabels(prop) {
|
|
119
124
|
const locale = useKitLocale();
|
|
120
125
|
const defaults = useMemo(
|
|
@@ -168,6 +173,7 @@ export {
|
|
|
168
173
|
useKitLink,
|
|
169
174
|
useKitLocale,
|
|
170
175
|
useKitTableStorageKeyPrefix,
|
|
176
|
+
useKitTimeZone,
|
|
171
177
|
useKitWeekStart
|
|
172
178
|
};
|
|
173
179
|
//# sourceMappingURL=kit-labels.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/i18n/kit-labels.tsx"],"sourcesContent":["import { createContext, useContext, useEffect, useMemo } from \"react\";\nimport {\n DEFAULT_APP_SHELL_LABELS,\n DEFAULT_CALCULATOR_LABELS,\n DEFAULT_COMBOBOX_LABELS,\n DEFAULT_COMMON_LABELS,\n DEFAULT_CURRENCY_LABELS,\n DEFAULT_DATE_PICKER_LABELS,\n DEFAULT_FILE_LABELS,\n DEFAULT_MULTI_SELECT_LABELS,\n DEFAULT_PICKER_SHEET_LABELS,\n DEFAULT_SWIPEABLE_ROW_LABELS,\n DEFAULT_TOP_BAR_LABELS,\n formatFileSize,\n} from \"./shared-labels\";\nimport type { AnchorHTMLAttributes, ReactElement, Ref } from \"react\";\nimport type { ReactNode } from \"react\";\nimport type { DataTableLabels } from \"../components/data-table-labels\";\nimport type { MiniCalendarLabels, WeekDay } from \"../components/mini-calendar\";\nimport type { CalendarHeatmapLabels } from \"../components/calendar-heatmap\";\nimport type { PopoverLabels } from \"../components/popover\";\nimport type { ChipInputLabels } from \"../components/chip\";\nimport type { FieldSyncLabels } from \"../components/field-sync\";\nimport type { CharacterCountLabels, PasswordRevealLabels } from \"../components/field-base\";\nimport type { TabsLabels } from \"../components/tabs\";\nimport type { WizardLabels } from \"../wizard/types\";\nimport type { TourLabels } from \"../tour/tour\";\nimport type { TourCatalogueLabels } from \"../tour/tour-catalogue-labels\";\nimport type { CommandPaletteLabels } from \"../search/command-palette\";\nimport type { GlobalSearchLabels } from \"../search/global-search\";\nimport type { MonthPickerLabels } from \"../components/month-picker\";\nimport type { PageContentsLabels } from \"../components/page-contents\";\nimport type { SeriesChartLabels } from \"../components/series-chart-labels\";\nimport type { PieChartLabels } from \"../components/pie-chart-labels\";\nimport type { SparklineLabels } from \"../components/sparkline\";\nimport type { StatTileLabels } from \"../components/stat-tile\";\nimport type { SignaturePadLabels } from \"../components/signature-pad\";\nimport type { PasswordStrengthLabels } from \"../components/password-strength\";\nimport type { DangerConfirmLabels } from \"../components/danger-confirm\";\nimport type { SwatchPickerLabels } from \"../components/swatch-picker\";\nimport type { IconPickerLabels } from \"../components/icon-picker\";\nimport type { DialogFrameLabels } from \"../components/dialog-frame\";\nimport type { FilePickerLabels } from \"../components/file-button\";\nimport type { MeasuredGridLabels } from \"../components/measured-grid\";\nimport type { FeedbackAttachmentFieldLabels } from \"../feedback/feedback-attachment\";\nimport type { FeedbackDialogTextLabels } from \"../feedback/feedback-dialog\";\nimport type { FeedbackComposerLabels, FeedbackThreadLabels } from \"../feedback/feedback-thread\";\nimport type {\n FeedbackCategoryLabels,\n FeedbackStatusLabels,\n FeedbackToastLabels,\n} from \"../feedback/feedback-labels\";\nimport type { FeedbackMenuLabels } from \"../feedback/feedback-menu\";\nimport type { FeedbackPublicLabels } from \"../feedback/feedback-public-labels\";\nimport type { FeedbackNotificationTypesLabels } from \"../notifications/feedback-notification-types-labels\";\nimport type { FeedbackContextLabels } from \"../feedback/feedback-context\";\nimport type { FeedbackPageLabels } from \"../feedback/feedback-table\";\nimport type { FeedbackDetailLabels } from \"../feedback/feedback-row-detail\";\nimport type { FeedbackVoteLabels } from \"../feedback/feedback-vote-button\";\nimport type { FeedbackCommentsLabels } from \"../feedback/feedback-comment-thread\";\nimport type { FeedbackRepliesLabels } from \"../feedback/feedback-replies\";\nimport type { AccountSettingsLabels } from \"../account/account-settings-labels\";\nimport type { ConfirmDialogLabels } from \"../components/confirm-dialog\";\nimport type { FloatingPanelLabels } from \"../components/floating-panel\";\nimport type { CopyButtonLabels } from \"../components/copy-button\";\nimport type { BulkActionBarLabels } from \"../components/bulk-action-bar\";\nimport type { ListLabels } from \"../components/list\";\nimport type { BreadcrumbsLabels } from \"../components/breadcrumbs\";\nimport type { ToastLabels } from \"../components/toast\";\nimport type { FormActionsLabels } from \"../components/form-actions\";\nimport type { DescriptionListLabels } from \"../components/description-list\";\nimport type { LineItemsLabels } from \"../components/line-items\";\nimport type { ProgressBarLabels } from \"../components/progress-bar\";\nimport type { SignedAmountLabels } from \"../components/signed-amount\";\nimport type { ErrorBoundaryLabels } from \"../components/error-boundary\";\nimport type { AuthedImageLabels } from \"../components/authed-image\";\nimport type { ImageGridLabels } from \"../components/image-grid\";\nimport type { LightboxLabels } from \"../components/lightbox\";\nimport type { WriteLockLabels } from \"../components/write-lock\";\nimport type { LegalLabels } from \"../components/legal\";\nimport type { SignInLabels } from \"../auth/sign-in-form\";\nimport type { RegisterLabels } from \"../auth/register-form\";\nimport type { CompleteNameLabels } from \"../auth/complete-name-dialog\";\nimport type { ForgotPasswordLabels } from \"../auth/forgot-password-form\";\nimport type { ResetPasswordLabels } from \"../auth/reset-password-form\";\nimport type { VerifyEmailLabels } from \"../auth/verify-email\";\nimport type { NotFoundLabels } from \"../auth/not-found-page\";\nimport type { AcceptInvitationLabels } from \"../auth/accept-invitation\";\nimport type { CompanySwitcherLabels } from \"../shell/company-switcher\";\nimport type { EmailChangeLabels } from \"../account/email-change-setting\";\nimport type { SessionsLabels } from \"../account/sessions-setting\";\nimport type { DeleteAccountLabels } from \"../account/delete-account-setting\";\nimport type { DataExportLabels } from \"../account/data-export-setting\";\nimport type { UserRosterLabels } from \"../admin/user-roster\";\nimport type { RoleSelectLabels } from \"../admin/role-select\";\nimport type { ReviewerScopeLabels } from \"../admin/reviewer-scope-editor\";\nimport type { AdminActionLabels } from \"../admin/admin-action-confirm\";\nimport type { AdminActionLogLabels } from \"../admin/admin-action-log\";\nimport type { TransferOwnershipLabels } from \"../admin/transfer-ownership-dialog\";\nimport type { InvitationsLabels } from \"../admin/invitations-panel\";\nimport type { SettingsLabels } from \"../settings/settings-labels\";\nimport type { LandingLabels } from \"../landing/landing-labels\";\nimport type { DemoLabels } from \"../demo/demo-labels\";\nimport type { BillingLabels } from \"../billing/billing-labels\";\nimport type { PlanChangeLabels } from \"../admin/plan-change\";\nimport type { AppearanceLabels } from \"../components/appearance-labels\";\nimport type { DeviceResetLabels } from \"../settings/device-reset-setting\";\nimport type { RowActionsLabels } from \"../components/row-actions\";\nimport type { AppShellMoreLabels } from \"../shell/app-shell\";\nimport type { AccountStateLabels } from \"../components/account-chips\";\nimport type { ShareCardLabels } from \"../components/share-card\";\nimport type { ReauthDialogLabels } from \"../components/reauth-dialog\";\nimport type { ServerWakeLabels } from \"../components/server-wake\";\nimport type { TranslationReviewLabels } from \"../components/translation-review-labels\";\nimport type { CountrySelectLabels } from \"../components/country-select\";\nimport type { InlineEditLabels } from \"../components/inline-edit-field\";\nimport type { IbanInputLabels } from \"../components/iban-input\";\nimport type { PhoneInputLabels } from \"../components/phone-input\";\nimport type { SignChipLabels } from \"../components/sign-chip\";\nimport type { ColumnMapperLabels } from \"../components/column-mapper\";\nimport type { NotificationsLabels } from \"../notifications/notifications-labels\";\nimport type { AdminAreaLabels } from \"../admin/admin-area-labels\";\nimport type { MailTestCardLabels } from \"../admin/mail-test-card\";\nimport type { TopBarPartsLabels } from \"../shell/top-bar-parts-labels\";\nimport type { SignOutPendingDialogLabels } from \"../offline/sign-out-pending-dialog\";\nimport type { PwaUpdatePromptLabels } from \"../offline/pwa-update-prompt\";\nimport type { SharedComputerLabels } from \"../offline/shared-computer\";\n\n/**\n * EVERY string the kit renders, as one typed tree — and an optional provider that\n * hands it to every component at once.\n *\n * WHY THIS EXISTS. The kit renders only labels; it ships seven catalogues (since 0.7.0,\n * `@eifi1/ui-kit/i18n/<code>`); the app decides the language and hands the words in.\n * What was wrong was HOW it had to hand them in —\n * one `labels` prop per component instance, under a different prop name per\n * component (`labels`, `calendarLabels`, `passwordLabels`, `clearLabel`,\n * `searchPlaceholder`, `ariaLabel` …). A translated app therefore rendered English\n * wherever one call site forgot one prop, and nothing told it so: a German showcase\n * still said \"Rows per page\", \"Collapse sidebar\" and \"Popover\" in seven languages.\n *\n * Now there is one key per string, addressed by a dot path (`dataTable.pageSize`,\n * `datePicker.today`), and three sources in a fixed order of precedence:\n *\n * the component's own prop > <UiKitProvider labels> > English default\n *\n * A consumer loads a shipped catalogue (`loadUiKitLabels(code)`) or writes its own\n * `UiKitLabels` (or a partial of one), mounts `<UiKitProvider labels={…} locale={…}>`\n * at the root, and every kit component\n * below speaks that language — including the ones nested inside other kit components\n * (the calendar inside the data table's date filter, the popover inside the date\n * picker), which no prop at the outer call site could reach before.\n *\n * Messages that carry a value are FUNCTIONS of that value, never a template to fill:\n * a number glued into an English sentence is untranslatable, because the grammar\n * around it moves with it in most languages.\n */\n\n/* ── Namespaces that had no labels type of their own ─────────────────────── */\n\n/** The words several components share. A component's own namespace wins over these\n * where both exist; these are what a new component reaches for first. */\nexport interface CommonLabels {\n close: string;\n clear: string;\n search: string;\n done: string;\n cancel: string;\n save: string;\n back: string;\n next: string;\n remove: string;\n loading: string;\n noResults: string;\n /** \"Name: value\" — how a field's accessible name is composed with its value.\n * A colon-and-space is not universal punctuation (French puts a space before\n * the colon, Chinese uses a full-width one). */\n fieldValue: (field: string, value: string) => string;\n /** The × that puts away a banner or a notice (`AlertBanner onDismiss`). Not `close`:\n * nothing opened, and \"Close\" on a banner reads as closing the page it sits on. */\n dismiss: string;\n /** Read after a link that opens a new tab (`<Button href external>`, TextLink):\n * nothing else tells a screen reader the page is about to change tabs. */\n opensInNewTab: string;\n /** The name of a field's `help` \"?\" and its panel (round 0.36): \"About “<field>”\", the\n * field's label as the argument, quoted so a capitalised label reads as a name — \"About\n * “Jerk shape”\" (round 0.37; the other locales quoted it already). A `HelpPopover`\n * passed as `help` keeps its own name. */\n aboutField: (field: string) => string;\n /** …and of a `help` \"?\" on a field with no label and no `aria-label` to name it by. */\n help: string;\n}\n\n/** `DatePicker` / `DateRangePicker` chrome. The calendar inside has its own\n * namespace, `miniCalendar`. */\nexport interface DatePickerLabels {\n /** Accessible name of the popover panel the calendar opens in. */\n panel: string;\n /** The same, for `DateRangePicker`'s panel. */\n rangePanel: string;\n clear: string;\n previousDay: string;\n nextDay: string;\n today: string;\n /** `DateRangePicker commit=\"apply\"`: the button that commits the drafted range. */\n apply: string;\n /** …and the one that discards it. */\n cancel: string;\n /** Accessible name of `DateRangePicker`'s preset column. */\n presets: string;\n}\n\n/** The whole combobox family: `Combobox`, `EntityCombobox`,\n * `MultiEntityCombobox`, `InlineEntityCombobox`, `Autocomplete`. */\nexport interface ComboboxLabels {\n search: string;\n noResults: string;\n clear: string;\n loading: string;\n /** The \"add this\" row when free entry is allowed. */\n create: (query: string) => string;\n /** Trigger summary once more than one value is picked. */\n selectedCount: (count: number) => string;\n /** An async lookup (`loadOptions`) failed. */\n loadError: string;\n /** Announced (live region) when the list settles on `count` > 0 rows. */\n resultCount: (count: number) => string;\n /** The query is shorter than the `minChars` a lookup needs. */\n minChars: (count: number) => string;\n}\n\nexport interface MultiSelectLabels {\n search: string;\n selectAll: string;\n clear: string;\n /** Trigger text when nothing is picked, which a multi-select reads as \"all\". */\n all: string;\n /** Trigger summary once some (but not all) values are picked. The English\n * default is the bare count, which is what the trigger has always shown. */\n selectedCount: (count: number) => string;\n}\n\n/** `CalculatorButton` (desktop popover keypad) and `NumberPadSheet` (phone sheet). */\nexport interface CalculatorLabels {\n /** The button that opens the calculator. */\n open: string;\n /** The popover / sheet itself. */\n panel: string;\n calculation: string;\n backspace: string;\n clear: string;\n equals: string;\n /** The primary key of the phone pad — visible text, not an aria-label. */\n done: string;\n /** Names of the operator keys and the decimal key. Their glyphs are not names a\n * screen reader agrees on — \"÷\" is read as \"division sign\", \"divided by\" or\n * nothing at all depending on the reader — so each says what it does. */\n plus: string;\n minus: string;\n times: string;\n divide: string;\n decimal: string;\n}\n\n/** `CurrencySelect` and the currency half of `AmountInput`. */\nexport interface CurrencyLabels {\n currency: string;\n search: string;\n}\n\nexport interface AppShellLabels {\n collapse: string;\n expand: string;\n /** Accessible name of an inline group's disclosure button (`subNav=\"inline\"`). */\n toggleGroup: (groupLabel: string) => string;\n}\n\nexport interface TopBarLabels {\n theme: string;\n palette: string;\n language: string;\n switchRole: string;\n /** The role switcher's tooltip, given the active role's name. */\n role: (value: string) => string;\n}\n\nexport interface PickerSheetLabels {\n close: string;\n /** The sticky footer button that closes a multi-select sheet once the rows are ticked\n * (0.40) — the ticks are already applied, so it confirms rather than saves. */\n done: string;\n}\n\nexport interface SwipeableRowLabels {\n actions: string;\n}\n\nexport interface FileLabels {\n /** A file size for display, given its size in BYTES. The default uses\n * `Intl.NumberFormat`'s unit formatting in the provider's locale. */\n size: (bytes: number) => string;\n}\n\n/** The complete tree. `UiKitProvider` takes any partial of it. */\nexport interface UiKitLabels {\n common: CommonLabels;\n dataTable: DataTableLabels;\n miniCalendar: MiniCalendarLabels;\n calendarHeatmap: CalendarHeatmapLabels;\n datePicker: DatePickerLabels;\n monthPicker: MonthPickerLabels;\n popover: PopoverLabels;\n combobox: ComboboxLabels;\n multiSelect: MultiSelectLabels;\n calculator: CalculatorLabels;\n currency: CurrencyLabels;\n chipInput: ChipInputLabels;\n fieldSync: FieldSyncLabels;\n passwordReveal: PasswordRevealLabels;\n tabs: TabsLabels;\n appShell: AppShellLabels;\n pageContents: PageContentsLabels;\n topBar: TopBarLabels;\n pickerSheet: PickerSheetLabels;\n swipeableRow: SwipeableRowLabels;\n file: FileLabels;\n wizard: WizardLabels;\n tour: TourLabels;\n /** 0.43.0: the tours page — `TourCatalogue` and its card (docs/tours-harmonization.md §3). */\n tourCatalogue: TourCatalogueLabels;\n commandPalette: CommandPaletteLabels;\n globalSearch: GlobalSearchLabels;\n seriesChart: SeriesChartLabels;\n pieChart: PieChartLabels;\n sparkline: SparklineLabels;\n statTile: StatTileLabels;\n signaturePad: SignaturePadLabels;\n passwordStrength: PasswordStrengthLabels;\n dangerConfirm: DangerConfirmLabels;\n swatchPicker: SwatchPickerLabels;\n iconPicker: IconPickerLabels;\n dialogFrame: DialogFrameLabels;\n filePicker: FilePickerLabels;\n measuredGrid: MeasuredGridLabels;\n feedbackAttachment: FeedbackAttachmentFieldLabels;\n /** 0.12.0: `FeedbackDialog`'s own strings; `FeedbackThread` / `FeedbackComposer`. */\n feedbackDialog: FeedbackDialogTextLabels;\n feedbackThread: FeedbackThreadLabels;\n feedbackComposer: FeedbackComposerLabels;\n /** 0.27.0: the feedback harmonisation (docs/feedback-harmonization.md §4) — a report's\n * status and category words, keyed by the enum value; the toasts a feedback page\n * shows; `FeedbackMenu`; `FeedbackContextBox`; the two pages' table; the row detail.\n * keksdose's wording is the canon, in every language. */\n feedbackStatus: FeedbackStatusLabels;\n feedbackCategory: FeedbackCategoryLabels;\n feedbackToast: FeedbackToastLabels;\n feedbackMenu: FeedbackMenuLabels;\n /** 0.38.0: the public feedback pages — `FeedbackPublicList`, `FeedbackPublicDetail`,\n * `FeedbackPublicSwitch` (docs/feedback-harmonization.md §9.15). */\n feedbackPublic: FeedbackPublicLabels;\n /** 0.38.0: `useFeedbackNotificationTypes` — the two feedback types' setting words\n * (§9.11). */\n feedbackNotificationTypes: FeedbackNotificationTypesLabels;\n feedbackContext: FeedbackContextLabels;\n feedbackPage: FeedbackPageLabels;\n feedbackDetail: FeedbackDetailLabels;\n /** 0.38.0: public feedback (docs/feedback-harmonization.md §9.15) — the vote button,\n * the comment thread, the replies' timeline and composer. */\n feedbackVote: FeedbackVoteLabels;\n feedbackComments: FeedbackCommentsLabels;\n feedbackReplies: FeedbackRepliesLabels;\n /** 0.12.0: `ProfileSetting`, `PasswordSetting`, `TwoFactorSetting`, `PasskeysSetting`\n * — one record per section. The provider takes a whole section record; the\n * components merge it key by key, as a prop. */\n accountSettings: AccountSettingsLabels;\n confirmDialog: ConfirmDialogLabels;\n floatingPanel: FloatingPanelLabels;\n copyButton: CopyButtonLabels;\n bulkActionBar: BulkActionBarLabels;\n list: ListLabels;\n breadcrumbs: BreadcrumbsLabels;\n toast: ToastLabels;\n form: FormActionsLabels;\n descriptionList: DescriptionListLabels;\n lineItems: LineItemsLabels;\n progressBar: ProgressBarLabels;\n signedAmount: SignedAmountLabels;\n errorBoundary: ErrorBoundaryLabels;\n authedImage: AuthedImageLabels;\n imageGrid: ImageGridLabels;\n lightbox: LightboxLabels;\n /** 0.18.0: `WriteLockProvider`'s fallback reason, `AccountStateChip`, `SharePanel` /\n * `ShareCard` / `ShareDialog`, `ReauthDialog`. */\n writeLock: WriteLockLabels;\n accountState: AccountStateLabels;\n shareCard: ShareCardLabels;\n reauthDialog: ReauthDialogLabels;\n /** 0.18.0: `ServerWakeNotice` — keksdose's cold-start notice, for every app. */\n serverWake: ServerWakeLabels;\n /** 0.19.0: the translation-review parts (`TranslationReviewPanel`, its editor, chip,\n * progress, locale tabs and export) — keksdose's /translations, for every app. */\n translationReview: TranslationReviewLabels;\n /** 0.19.0: `LegalLinks`' navigation name. 0.28.0: every kit-owned word of the legal\n * pages — the link labels, titles, back link, terms checkbox and notices, and the\n * sections that are the same in every app, filled in with the app's operator\n * (docs/legal-harmonization.md §4.3/§4.4). */\n legal: LegalLabels;\n /** 0.29.0: sign-in form: credentials, passkey, 2FA, forced new password (docs/auth-harmonization.md §5). */\n signIn: SignInLabels;\n /** 0.29.0: the sign-up form, with the +app address tag (§4.1, §4.5). */\n register: RegisterLabels;\n /** 0.29.0: asking a migrated account for first and last name once (§3.3). */\n completeName: CompleteNameLabels;\n /** 0.29.0: requesting a reset link (always the same answer). */\n forgotPassword: ForgotPasswordLabels;\n /** 0.29.0: choosing a new password from a reset link; not a sign-in (§6.3). */\n resetPassword: ResetPasswordLabels;\n /** 0.29.0: the verify-email page and the unverified banner. */\n verifyEmail: VerifyEmailLabels;\n /** 0.29.0: the 404 page. */\n notFound: NotFoundLabels;\n /** 0.29.0: accepting an invitation with an account (§4.4). */\n acceptInvitation: AcceptInvitationLabels;\n /** 0.29.0: kastlan's switcher between a user's companies (§5.3). */\n companySwitcher: CompanySwitcherLabels;\n /** 0.30.0: changing the account's address with re-verification (docs/user-admin-harmonization.md §6.2). */\n emailChange: EmailChangeLabels;\n /** 0.30.0: sign out everywhere, and kastlan's device list (§6.3). */\n sessions: SessionsLabels;\n /** 0.30.0: deletion in two stages (§6.4). */\n deleteAccount: DeleteAccountLabels;\n /** 0.30.0: the self-service JSON export (§6.5). */\n dataExport: DataExportLabels;\n /** 0.30.0: the admin user list's columns (§3). */\n userRoster: UserRosterLabels;\n /** 0.30.0: picking one or several roles, with the reasons a choice is locked (§4.1). */\n roleSelect: RoleSelectLabels;\n /** 0.30.0: a translation reviewer's languages and areas. */\n reviewerScope: ReviewerScopeLabels;\n /** 0.30.0: an admin action's confirmation and refusals (§4.2). */\n adminAction: AdminActionLabels;\n /** 0.30.0: the admin_actions list (§4.3). */\n adminActionLog: AdminActionLogLabels;\n /** 0.30.0: handing an account's work to another (Kurvenschmiede). */\n transferOwnership: TransferOwnershipLabels;\n /** 0.30.0: the invitations panel (§5). */\n invitations: InvitationsLabels;\n /** 0.31.0: the settings and admin pages' shell (docs/settings-harmonization.md §4.3). */\n settings: SettingsLabels;\n /** 0.31.0: the public landing page's kit words (docs/landing-demo-harmonization.md §4). */\n landing: LandingLabels;\n /** 0.31.0: the demo's start, banner and end (§5). */\n demo: DemoLabels;\n /** 0.32.0: plans, standing, banners and the limit notice (docs/billing-harmonization.md §7). */\n billing: BillingLabels;\n /** 0.33.0: the operator's plan parts — `planColumn`, `PlanChangeConfirm` and the\n * lines of `usePlanChangeResult` (docs/billing-harmonization.md §14.12). */\n planChange: PlanChangeLabels;\n /** 0.32.0: the text-size and contrast settings (docs/text-size-harmonization.md §6). */\n appearance: AppearanceLabels;\n /** 0.36.0: resetting this device's settings, the appearance group's last card\n * (docs/settings-harmonization.md §11.3). */\n deviceReset: DeviceResetLabels;\n /** 0.32.0: a row's actions folded into a \"⋯\" menu at Large (text size §10.8). */\n rowActions: RowActionsLabels;\n /** 0.32.0: the phone bar's \"More\" cell and sheet (text size §10.7). */\n appShellMore: AppShellMoreLabels;\n /** 0.22.0: the screen-reader words of `Input` / `Textarea`'s `showCount` counter. */\n characterCount: CharacterCountLabels;\n /** 0.22.0: `CountrySelect`. Its list's \"no results\" and counts are `combobox`'s. */\n countrySelect: CountrySelectLabels;\n /** 0.22.0: `InlineEditField` — keksdose K9. */\n inlineEdit: InlineEditLabels;\n /** 0.22.0: `IbanInput`'s messages, one per problem. */\n ibanInput: IbanInputLabels;\n /** 0.22.0: `PhoneInput`'s country-code select. */\n phoneInput: PhoneInputLabels;\n /** 0.22.0: `SignChip` — the outflow / inflow toggle beside an amount. */\n signChip: SignChipLabels;\n /** 0.23.0: `ColumnMapper` / `ColumnRoleTable` — a pasted or dropped table, a role per\n * column. */\n columnMapper: ColumnMapperLabels;\n /** 0.36.0: the notification cards — the types, quiet hours and the zone picker, this\n * device's push, the device list, and the unsubscribe page\n * (docs/notifications-harmonization.md §4.2). */\n notifications: NotificationsLabels;\n /** 0.42.0: the admin area's shared words — the account menu's \"Administration\" row, the\n * 403 page, the shared sections, the overview's tiles and the Tools list\n * (docs/admin-harmonization.md §3.1). */\n adminArea: AdminAreaLabels;\n /** 0.42.0: the top bar's shared parts — `TourMenu`, `SyncStatusIndicator`, `DevSwitchers`\n * (docs/top-bar-harmonization.md §3.1). */\n topBarParts: TopBarPartsLabels;\n /** 0.45.0: \"Send a test mail to me\" (docs/admin-harmonization.md §9.2.4). */\n mailTestCard: MailTestCardLabels;\n /** 0.45.0: the sign-out question while changes wait to sync (`@eifi1/ui-kit/offline`,\n * docs/local-first-harmonization.md §1.6). */\n signOutPending: SignOutPendingDialogLabels;\n /** 0.45.0: the service-worker update toast (local-first §1.5 D8). */\n pwaUpdate: PwaUpdatePromptLabels;\n /** 0.45.0: \"This is a shared computer\" on the sign-in form (local-first §1.5 D6). */\n sharedComputer: SharedComputerLabels;\n}\n\n/**\n * A label override, as deep as the labels go: an object of labels (a namespace, or a\n * record inside one such as `accountSettings.passkeys` or `dataTable.presets`) may be\n * partial at every level, because the provider merges it key by key at every level.\n * A leaf stays as it is: a string, a function-valued label (`(n) => …`), and anything\n * that is not purely an object (a `ReactNode` union) is given whole.\n */\nexport type LabelOverride<T> = [T] extends [(...args: never[]) => unknown]\n ? T\n : [T] extends [readonly unknown[]]\n ? T\n : [T] extends [object]\n ? { [K in keyof T]?: LabelOverride<T[K]> }\n : T;\n\n/** Any subset of the tree — each namespace may be partial, and so may any record\n * inside one (`accountSettings.passkeys`, `dataTable.presets`): they are merged key\n * by key, at every depth. */\nexport type UiKitLabelOverrides = { [K in keyof UiKitLabels]?: LabelOverride<UiKitLabels[K]> };\n\n/* ── English defaults for the namespaces defined here ────────────────────── */\n\n// They live in ./shared-labels, a module of words, as every component's defaults live in\n// its `*-labels.ts` (round 0.34). Imported and exported as this module's own, as each\n// component does with its defaults: the names, and where the README lists them, stay.\nexport {\n DEFAULT_APP_SHELL_LABELS,\n DEFAULT_CALCULATOR_LABELS,\n DEFAULT_COMBOBOX_LABELS,\n DEFAULT_COMMON_LABELS,\n DEFAULT_CURRENCY_LABELS,\n DEFAULT_DATE_PICKER_LABELS,\n DEFAULT_FILE_LABELS,\n DEFAULT_MULTI_SELECT_LABELS,\n DEFAULT_PICKER_SHEET_LABELS,\n DEFAULT_SWIPEABLE_ROW_LABELS,\n DEFAULT_TOP_BAR_LABELS,\n formatFileSize,\n};\n\n/* ── The provider ────────────────────────────────────────────────────────── */\n\ninterface KitI18n {\n labels?: UiKitLabelOverrides;\n locale?: string;\n weekStartsOn?: WeekDay;\n linkComponent?: KitLinkComponent;\n chartTooltipPlacement?: ChartTooltipPlacement;\n formatDate?: KitDateFormatter;\n tableStorageKeyPrefix?: string;\n}\n\n/** What a {@link KitDateFormatter} is told about the date it is formatting. */\nexport interface KitDateFormatContext {\n /**\n * How much of a date the string is: `\"day\"` — the `iso` is `\"YYYY-MM-DD\"`; `\"month\"` —\n * `\"YYYY-MM\"` (a `MonthPicker`); `\"year\"` — `\"YYYY\"` (`MonthPicker mode=\"year\"`).\n */\n unit: \"day\" | \"month\" | \"year\";\n /** Which kit surface asks: the trigger of a `DatePicker`, of a `DateRangePicker`\n * (called once per end), of a `MonthPicker`, or a `DateMark`. */\n source: \"datePicker\" | \"dateRangePicker\" | \"monthPicker\" | \"dateMark\";\n /** The locale the kit would have formatted in — the component's `locale` prop, else\n * the provider's — or `undefined` for the runtime's. */\n locale: string | undefined;\n /**\n * The kit's suggestion: whether this date stands alone where the day of the week\n * helps — `true` for a `DatePicker`'s trigger and a `DateMark`, `false` for the two\n * ends of a range (twice the width, in a sentence-like \"from – to\") and for a month\n * or a year. keksdose's rule, which this follows: *\"A date in a COLUMN carries the\n * weekday. A date in a SENTENCE does not.\"* (date-cell.tsx, dev#546). A formatter\n * is free to ignore it.\n */\n weekday: boolean;\n}\n\n/**\n * The app's ONE answer to \"what does a date look like here\" — keksdose K12. Returns the\n * text for an ISO date (see {@link KitDateFormatContext.unit} for the three shapes).\n * Return `\"\"` to fall back to the kit's own formatting for that date.\n */\nexport type KitDateFormatter = (iso: string, context: KitDateFormatContext) => string;\n\n/** Where a chart shows the values under the pointer — see `SeriesChartTooltip.placement`. */\nexport type ChartTooltipPlacement = \"cursor\" | \"above\" | \"below\" | \"auto\";\n\n/**\n * What every kit link receives: the anchor attributes the kit decided (href, class,\n * aria-current, handlers, children, ref). An app's router link maps them —\n * `({ href, ...p }) => <Link to={href} {...p} />` — ONCE, on the provider.\n *\n * `replace` is the one prop that is not an anchor attribute: see there. Map it\n * explicitly if your router link is not react-router's —\n * `({ href, replace, ...p }) => <Link to={href} replace={replace} {...p} />` — and never\n * spread it onto a DOM `<a>`, where React warns about an unknown attribute.\n */\nexport type KitLinkProps = AnchorHTMLAttributes<HTMLAnchorElement> & {\n href: string;\n ref?: Ref<HTMLAnchorElement>;\n /**\n * Navigate by REPLACING the current history entry, so Back skips it — keksdose F1:\n * a one-shot URL (a magic-link landing, `?checkout=done`, a wizard's \"finish\" hop)\n * that must not come back when the user presses Back. Present ONLY when the kit link\n * was given `replace` (`true`), so a provider link that spreads its props onto a\n * plain `<a>` keeps working for every link that never asks for it. react-router's\n * `<Link>` takes the same prop, so `({ href, ...p }) => <Link to={href} {...p} />`\n * honours it with no change; any other router maps it to its own replace option.\n * The kit never puts it on a DOM element itself.\n */\n replace?: boolean;\n};\nexport type KitLinkComponent = (props: KitLinkProps) => ReactElement;\n\nconst KitI18nContext = createContext<KitI18n>({});\n\nexport interface UiKitProviderProps {\n /** Any part of {@link UiKitLabels}. Missing keys fall back to English. */\n labels?: UiKitLabelOverrides;\n /**\n * BCP 47 tag used by every kit component that formats something — dates, numbers,\n * month and weekday names, file sizes — when it is not handed a `locale` prop of\n * its own. Without a provider, and without a prop, those use the runtime default.\n */\n locale?: string;\n /**\n * The first day of the week (0 = Sunday, 1 = Monday …) for every calendar below —\n * `MiniCalendar` and the pickers built on it — that is not handed a `weekStartsOn`\n * of its own. Without it the week start follows `locale`'s week info.\n *\n * Separate from `locale` because the two are separate decisions: a German-built\n * app running in English (`locale=\"en\"`) would otherwise start its weeks on Sunday,\n * and switching it to `en-GB` to get Monday changes every date and number format.\n */\n weekStartsOn?: WeekDay;\n /**\n * The app's router link, used by every kit component that renders an in-app link\n * and was not handed its own `renderLink` — so `renderLink` stops being repeated on\n * each ListItem, Breadcrumbs, StatTile, Chip… (kastlan). A component's own\n * `renderLink` wins; external links and in-page `#anchor`s stay plain `<a>`, and a\n * hash-router `#/path` is handed to it like `/path` (see `pickLinkRenderer`).\n */\n linkComponent?: KitLinkComponent;\n /**\n * Where every `SeriesChart` below shows its tooltip when it does not say so itself\n * (`tooltip.placement`) — set once so an app's phone charts stop putting the box under\n * the reader's finger (keksdose #359). Default: `\"cursor\"`, the box that follows the\n * pointer, as before.\n */\n chartTooltipPlacement?: ChartTooltipPlacement;\n /**\n * How every kit date below is written, when the component is not told otherwise —\n * keksdose K12. keksdose has a date-format preference (Settings ▸ date format, feedback\n * #180) that is not the UI language, and a weekday in the UI language beside digits\n * in the preference's order (live #246, dev#546): two locales in one string, which\n * no `locale` + `Intl` options can say. Its `DateField` wraps every `DatePicker` to\n * pass `formatValue`, and its report range field formats both ends by hand; with this\n * set once on the provider, those wrappers thin to nothing.\n *\n * Used for the trigger text of `DatePicker`, `DateRangePicker` and `MonthPicker`\n * (month and year mode), and for `DateMark display=\"date\"`. A component's own\n * `formatValue` or `formatOptions` (`dateStyle` on a DateMark) wins: prop >\n * provider > the kit's `Intl` default, the order every kit setting resolves in. Left\n * out (or returning `\"\"`), everything formats exactly as before.\n *\n * Keep it stable (`useCallback`, or a module function): it is in the provider's\n * context value, so a new function every render re-renders every consumer.\n */\n formatDate?: KitDateFormatter;\n /**\n * The `localStorage` prefix every kit table below keeps its view under (sort, filters,\n * page size, widths, hidden columns), when the table is not handed a\n * `storageKeyPrefix` of its own — round 0.34 C5, KS U4. Left out, it is the kit's\n * `\"hbui-table:\"`, as before.\n *\n * Set once here rather than per table because not every table is the app's to pass a\n * prop to: `TranslationReviewPanel` wraps a `DataTable`, and until this the panel's\n * view landed under the kit's prefix whatever the app's was — so an app that lists\n * what it stores (a privacy page) had to list the kit's prefix as a key of its own.\n * Resolves like every kit setting: the table's own prop > this > the default. The\n * key is the prefix plus the table's `storageKey`, verbatim, so an app that wrapped\n * `DataTable` to pass its prefix (Keksdose's `keksdose-table:`) keeps every stored\n * view when it moves the prefix here.\n */\n tableStorageKeyPrefix?: string;\n children: ReactNode;\n}\n\n/**\n * Hand every kit component below this point its strings and its locale.\n *\n * Optional: a component outside any provider behaves exactly as it did before the\n * provider existed. Nesting works as a merge — an inner provider overrides only what\n * it names, so a page can re-label one table's `dataTable.table` without restating\n * the language.\n */\nexport function UiKitProvider({\n labels,\n locale,\n weekStartsOn,\n linkComponent,\n chartTooltipPlacement,\n formatDate,\n tableStorageKeyPrefix,\n children,\n}: UiKitProviderProps) {\n const outer = useContext(KitI18nContext);\n const value = useMemo<KitI18n>(\n () => ({\n locale: locale ?? outer.locale,\n weekStartsOn: weekStartsOn ?? outer.weekStartsOn,\n labels: mergeOverrides(outer.labels, labels),\n linkComponent: linkComponent ?? outer.linkComponent,\n chartTooltipPlacement: chartTooltipPlacement ?? outer.chartTooltipPlacement,\n formatDate: formatDate ?? outer.formatDate,\n tableStorageKeyPrefix: tableStorageKeyPrefix ?? outer.tableStorageKeyPrefix,\n }),\n [outer, labels, locale, weekStartsOn, linkComponent, chartTooltipPlacement, formatDate, tableStorageKeyPrefix],\n );\n useTableViewsJoin(value.tableStorageKeyPrefix ?? DEFAULT_TABLE_STORAGE_KEY_PREFIX);\n return <KitI18nContext.Provider value={value}>{children}</KitI18nContext.Provider>;\n}\n\n/** The kit's own table prefix: `DEFAULT_PERSIST_PREFIX` of components/use-table-state,\n * restated because that module imports the router (a test pins the two equal). */\nconst DEFAULT_TABLE_STORAGE_KEY_PREFIX = \"hbui-table:\";\n\n/**\n * Reset this device's settings (docs/settings-harmonization.md §11.4): the tables below a\n * provider keep their views under its prefix, so the provider joins the registry with\n * that prefix — a view, no `reset`, since a table reads its view when it next mounts —\n * while it is mounted. Nested providers with one prefix hold one entry.\n *\n * Through a literal `import()`, not a static import: every catalogue reaches this module,\n * and a catalogue may reach nothing outside i18n/ (scripts/check-module-graph.mjs,\n * english-catalogue-graph.test.ts). The theme stores and the shell import the registry\n * statically, so it is loaded already and the join lands a microtask after the mount.\n */\nfunction useTableViewsJoin(prefix: string): void {\n useEffect(() => {\n let leave: (() => void) | undefined;\n let gone = false;\n import(\"../lib/device-settings\").then(\n ({ registerDeviceSetting }) => {\n if (!gone) leave = registerDeviceSetting({ key: prefix, prefix: true, kind: \"view\" });\n },\n // A module of the kit's own that fails to load has nothing to join; the provider\n // and its tables work as before.\n () => undefined,\n );\n return () => {\n gone = true;\n leave?.();\n };\n }, [prefix]);\n}\n\nfunction isRecord(v: unknown): v is Record<string, unknown> {\n return typeof v === \"object\" && v !== null && !Array.isArray(v);\n}\n\n/** A record of labels to merge into — not a React element, which is an object too but\n * is a label given whole. */\nfunction isLabelRecord(v: unknown): v is Record<string, unknown> {\n return isRecord(v) && !(\"$$typeof\" in v);\n}\n\n/** Merged key by key at EVERY depth — a namespace, a record inside it\n * (`accountSettings.passkeys`, `dataTable.presets`), and so on down — to match\n * {@link LabelOverride}. An `undefined` is skipped at every depth, so it never blanks\n * out what is under it. */\nfunction mergeNamespace<T extends object>(base: T, over: LabelOverride<T> | Partial<T> | undefined): T {\n if (!over) return base;\n const out = { ...base } as Record<string, unknown>;\n for (const [k, v] of Object.entries(over)) {\n if (v === undefined) continue;\n const prev = out[k];\n out[k] = isLabelRecord(prev) && isLabelRecord(v) ? mergeNamespace(prev, v) : v;\n }\n return out as T;\n}\n\nfunction mergeOverrides(\n a: UiKitLabelOverrides | undefined,\n b: UiKitLabelOverrides | undefined,\n): UiKitLabelOverrides | undefined {\n if (!a) return b;\n if (!b) return a;\n const out: Record<string, unknown> = { ...a };\n for (const [ns, v] of Object.entries(b)) {\n out[ns] = mergeNamespace((out[ns] as object | undefined) ?? {}, v as object);\n }\n return out as UiKitLabelOverrides;\n}\n\n/**\n * What the nearest provider says about one namespace — `undefined` outside one. Nested\n * providers' words come merged, at every depth; no English default is filled in.\n *\n * A {@link LabelOverride}, partial at every depth, like the components' `labels` props\n * that take it: a provider that names one key of a section (`accountSettings.passkeys`)\n * or one preset (`dataTable.presets`) hands over just that (round 0.35 R3 — until then\n * it was typed partial at the top only, so a nested section read as complete).\n *\n * For a component whose own resolver does more than a merge (the data table derives\n * `columnsCount` from `columns`): merge the component's prop over it — a record key by\n * key — and feed the result to that resolver.\n */\nexport function useKitLabelOverrides<K extends keyof UiKitLabels>(\n ns: K,\n): LabelOverride<UiKitLabels[K]> | undefined {\n return useContext(KitI18nContext).labels?.[ns];\n}\n\n/**\n * One namespace, resolved: `defaults`, then the provider, then the component's own\n * `prop`. Record-valued keys are merged key by key at each step — so `prop` is a\n * {@link LabelOverride}, partial at every depth as the provider's labels are, and a\n * component's `labels` prop, typed the same, is handed over without a cast (refactor\n * audit 2026-10, API-9).\n */\nexport function useKitLabels<K extends keyof UiKitLabels>(\n ns: K,\n defaults: UiKitLabels[K],\n prop?: LabelOverride<UiKitLabels[K]>,\n): UiKitLabels[K] {\n const fromProvider = useKitLabelOverrides(ns);\n return useMemo(\n () => mergeNamespace(mergeNamespace(defaults, fromProvider), prop),\n [defaults, fromProvider, prop],\n );\n}\n\n/** The component's own `locale` prop, else the provider's, else `undefined` (which\n * every `Intl` API reads as \"the runtime's default\"). */\nexport function useKitLocale(prop?: string): string | undefined {\n const fromProvider = useContext(KitI18nContext).locale;\n return prop ?? fromProvider;\n}\n\n/** The week start the nearest `<UiKitProvider weekStartsOn>` pins, else `undefined`\n * (the caller then asks the locale). A component's own prop goes first:\n * `prop ?? useKitWeekStart()`. */\n/** The provider's router link, or `undefined` — a component's own `renderLink` should\n * win over it: `const Link = renderLink ?? useKitLink()`. */\nexport function useKitLink(): KitLinkComponent | undefined {\n return useContext(KitI18nContext).linkComponent;\n}\n\nexport function useKitWeekStart(): WeekDay | undefined {\n return useContext(KitI18nContext).weekStartsOn;\n}\n\n/** The provider's `chartTooltipPlacement`, or `undefined` — a chart's own prop wins. */\nexport function useKitChartTooltipPlacement(): ChartTooltipPlacement | undefined {\n return useContext(KitI18nContext).chartTooltipPlacement;\n}\n\n/** The nearest provider's `formatDate`, or `undefined` — a component's own\n * `formatValue` / `formatOptions` wins over it. See {@link KitDateFormatter}. */\nexport function useKitDateFormatter(): KitDateFormatter | undefined {\n return useContext(KitI18nContext).formatDate;\n}\n\n/** The nearest provider's `tableStorageKeyPrefix`, or `undefined` — a table's own\n * `storageKeyPrefix` wins over it, and the kit's `\"hbui-table:\"` comes after both. */\nexport function useKitTableStorageKeyPrefix(): string | undefined {\n return useContext(KitI18nContext).tableStorageKeyPrefix;\n}\n\n/** {@link DEFAULT_FILE_LABELS}, but formatting in the provider's locale. */\nexport function useKitFileLabels(prop?: Partial<FileLabels>): FileLabels {\n const locale = useKitLocale();\n const defaults = useMemo<FileLabels>(\n () => ({ size: (bytes) => formatFileSize(bytes, locale) }),\n [locale],\n );\n return useKitLabels(\"file\", defaults, prop);\n}\n\n/**\n * The dot paths of every key `labels` does NOT supply — the ones a translated app is\n * still showing in English. Assert on it in the app's own test:\n *\n * expect(missingKitLabels(labels, DEFAULT_UI_KIT_LABELS)).toEqual([]);\n *\n * `reference` is the complete tree to check against — pass\n * {@link DEFAULT_UI_KIT_LABELS} (src/i18n/defaults.ts). It is a parameter rather than an import\n * because the defaults live beside their components, and this module is imported BY\n * those components. Left out (a test file is not type-checked), it throws saying so\n * rather than \"Cannot convert undefined or null to object\" (keksdose, 0.18).\n */\nexport function missingKitLabels(\n labels: UiKitLabelOverrides | undefined,\n reference: UiKitLabels,\n): string[] {\n if (!isRecord(reference)) {\n throw new TypeError(\n \"missingKitLabels(labels, reference): pass DEFAULT_UI_KIT_LABELS as the reference — \" +\n \"it is the tree the labels are checked against.\",\n );\n }\n const missing: string[] = [];\n for (const [ns, keys] of Object.entries(reference)) {\n const given = (labels as Record<string, Record<string, unknown> | undefined> | undefined)?.[ns];\n for (const [key, value] of Object.entries(keys as Record<string, unknown>)) {\n const got = given?.[key];\n if (got === undefined) {\n missing.push(`${ns}.${key}`);\n } else if (isRecord(value) && isRecord(got)) {\n for (const sub of Object.keys(value)) {\n if (got[sub] === undefined) missing.push(`${ns}.${key}.${sub}`);\n }\n }\n }\n }\n return missing;\n}\n"],"mappings":"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","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/i18n/kit-labels.tsx"],"sourcesContent":["import { createContext, useContext, useEffect, useMemo } from \"react\";\nimport {\n DEFAULT_APP_SHELL_LABELS,\n DEFAULT_CALCULATOR_LABELS,\n DEFAULT_COMBOBOX_LABELS,\n DEFAULT_COMMON_LABELS,\n DEFAULT_CURRENCY_LABELS,\n DEFAULT_DATE_PICKER_LABELS,\n DEFAULT_FILE_LABELS,\n DEFAULT_MULTI_SELECT_LABELS,\n DEFAULT_PICKER_SHEET_LABELS,\n DEFAULT_SWIPEABLE_ROW_LABELS,\n DEFAULT_TOP_BAR_LABELS,\n formatFileSize,\n} from \"./shared-labels\";\nimport type { AnchorHTMLAttributes, ReactElement, Ref } from \"react\";\nimport type { ReactNode } from \"react\";\nimport type { DataTableLabels } from \"../components/data-table-labels\";\nimport type { MiniCalendarLabels, WeekDay } from \"../components/mini-calendar\";\nimport type { CalendarHeatmapLabels } from \"../components/calendar-heatmap\";\nimport type { PopoverLabels } from \"../components/popover\";\nimport type { ChipInputLabels } from \"../components/chip\";\nimport type { FieldSyncLabels } from \"../components/field-sync\";\nimport type { CharacterCountLabels, PasswordRevealLabels } from \"../components/field-base\";\nimport type { TabsLabels } from \"../components/tabs\";\nimport type { WizardLabels } from \"../wizard/types\";\nimport type { TourLabels } from \"../tour/tour\";\nimport type { TourCatalogueLabels } from \"../tour/tour-catalogue-labels\";\nimport type { CommandPaletteLabels } from \"../search/command-palette\";\nimport type { GlobalSearchLabels } from \"../search/global-search\";\nimport type { MonthPickerLabels } from \"../components/month-picker\";\nimport type { PageContentsLabels } from \"../components/page-contents\";\nimport type { SeriesChartLabels } from \"../components/series-chart-labels\";\nimport type { PieChartLabels } from \"../components/pie-chart-labels\";\nimport type { SparklineLabels } from \"../components/sparkline\";\nimport type { StatTileLabels } from \"../components/stat-tile\";\nimport type { SignaturePadLabels } from \"../components/signature-pad\";\nimport type { PasswordStrengthLabels } from \"../components/password-strength\";\nimport type { DangerConfirmLabels } from \"../components/danger-confirm\";\nimport type { SwatchPickerLabels } from \"../components/swatch-picker\";\nimport type { IconPickerLabels } from \"../components/icon-picker\";\nimport type { DialogFrameLabels } from \"../components/dialog-frame\";\nimport type { FilePickerLabels } from \"../components/file-button\";\nimport type { MeasuredGridLabels } from \"../components/measured-grid\";\nimport type { FeedbackAttachmentFieldLabels } from \"../feedback/feedback-attachment\";\nimport type { FeedbackDialogTextLabels } from \"../feedback/feedback-dialog\";\nimport type { FeedbackComposerLabels, FeedbackThreadLabels } from \"../feedback/feedback-thread\";\nimport type {\n FeedbackCategoryLabels,\n FeedbackStatusLabels,\n FeedbackToastLabels,\n} from \"../feedback/feedback-labels\";\nimport type { FeedbackMenuLabels } from \"../feedback/feedback-menu\";\nimport type { FeedbackPublicLabels } from \"../feedback/feedback-public-labels\";\nimport type { FeedbackNotificationTypesLabels } from \"../notifications/feedback-notification-types-labels\";\nimport type { FeedbackContextLabels } from \"../feedback/feedback-context\";\nimport type { FeedbackPageLabels } from \"../feedback/feedback-table\";\nimport type { FeedbackDetailLabels } from \"../feedback/feedback-row-detail\";\nimport type { FeedbackVoteLabels } from \"../feedback/feedback-vote-button\";\nimport type { FeedbackCommentsLabels } from \"../feedback/feedback-comment-thread\";\nimport type { FeedbackRepliesLabels } from \"../feedback/feedback-replies\";\nimport type { AccountSettingsLabels } from \"../account/account-settings-labels\";\nimport type { ConfirmDialogLabels } from \"../components/confirm-dialog\";\nimport type { FloatingPanelLabels } from \"../components/floating-panel\";\nimport type { CopyButtonLabels } from \"../components/copy-button\";\nimport type { BulkActionBarLabels } from \"../components/bulk-action-bar\";\nimport type { ListLabels } from \"../components/list\";\nimport type { BreadcrumbsLabels } from \"../components/breadcrumbs\";\nimport type { ToastLabels } from \"../components/toast\";\nimport type { FormActionsLabels } from \"../components/form-actions\";\nimport type { DescriptionListLabels } from \"../components/description-list\";\nimport type { LineItemsLabels } from \"../components/line-items\";\nimport type { ProgressBarLabels } from \"../components/progress-bar\";\nimport type { SignedAmountLabels } from \"../components/signed-amount\";\nimport type { ErrorBoundaryLabels } from \"../components/error-boundary\";\nimport type { AuthedImageLabels } from \"../components/authed-image\";\nimport type { ImageGridLabels } from \"../components/image-grid\";\nimport type { LightboxLabels } from \"../components/lightbox\";\nimport type { WriteLockLabels } from \"../components/write-lock\";\nimport type { LegalLabels } from \"../components/legal\";\nimport type { SignInLabels } from \"../auth/sign-in-form\";\nimport type { RegisterLabels } from \"../auth/register-form\";\nimport type { CompleteNameLabels } from \"../auth/complete-name-dialog\";\nimport type { ForgotPasswordLabels } from \"../auth/forgot-password-form\";\nimport type { ResetPasswordLabels } from \"../auth/reset-password-form\";\nimport type { VerifyEmailLabels } from \"../auth/verify-email\";\nimport type { NotFoundLabels } from \"../auth/not-found-page\";\nimport type { AcceptInvitationLabels } from \"../auth/accept-invitation\";\nimport type { CompanySwitcherLabels } from \"../shell/company-switcher\";\nimport type { EmailChangeLabels } from \"../account/email-change-setting\";\nimport type { SessionsLabels } from \"../account/sessions-setting\";\nimport type { DeleteAccountLabels } from \"../account/delete-account-setting\";\nimport type { DataExportLabels } from \"../account/data-export-setting\";\nimport type { UserRosterLabels } from \"../admin/user-roster\";\nimport type { RoleSelectLabels } from \"../admin/role-select\";\nimport type { ReviewerScopeLabels } from \"../admin/reviewer-scope-editor\";\nimport type { AdminActionLabels } from \"../admin/admin-action-confirm\";\nimport type { AdminActionLogLabels } from \"../admin/admin-action-log\";\nimport type { TransferOwnershipLabels } from \"../admin/transfer-ownership-dialog\";\nimport type { InvitationsLabels } from \"../admin/invitations-panel\";\nimport type { SettingsLabels } from \"../settings/settings-labels\";\nimport type { LandingLabels } from \"../landing/landing-labels\";\nimport type { DemoLabels } from \"../demo/demo-labels\";\nimport type { BillingLabels } from \"../billing/billing-labels\";\nimport type { PlanChangeLabels } from \"../admin/plan-change\";\nimport type { AppearanceLabels } from \"../components/appearance-labels\";\nimport type { DeviceResetLabels } from \"../settings/device-reset-setting\";\nimport type { RowActionsLabels } from \"../components/row-actions\";\nimport type { AppShellMoreLabels } from \"../shell/app-shell\";\nimport type { AccountStateLabels } from \"../components/account-chips\";\nimport type { ShareCardLabels } from \"../components/share-card\";\nimport type { ReauthDialogLabels } from \"../components/reauth-dialog\";\nimport type { ServerWakeLabels } from \"../components/server-wake\";\nimport type { TranslationReviewLabels } from \"../components/translation-review-labels\";\nimport type { CountrySelectLabels } from \"../components/country-select\";\nimport type { InlineEditLabels } from \"../components/inline-edit-field\";\nimport type { IbanInputLabels } from \"../components/iban-input\";\nimport type { PhoneInputLabels } from \"../components/phone-input\";\nimport type { SignChipLabels } from \"../components/sign-chip\";\nimport type { ColumnMapperLabels } from \"../components/column-mapper\";\nimport type { NotificationsLabels } from \"../notifications/notifications-labels\";\nimport type { AdminAreaLabels } from \"../admin/admin-area-labels\";\nimport type { MailTestCardLabels } from \"../admin/mail-test-card\";\nimport type { TopBarPartsLabels } from \"../shell/top-bar-parts-labels\";\nimport type { SignOutPendingDialogLabels } from \"../offline/sign-out-pending-dialog\";\nimport type { PwaUpdatePromptLabels } from \"../offline/pwa-update-prompt\";\nimport type { SharedComputerLabels } from \"../offline/shared-computer\";\n\n/**\n * EVERY string the kit renders, as one typed tree — and an optional provider that\n * hands it to every component at once.\n *\n * WHY THIS EXISTS. The kit renders only labels; it ships seven catalogues (since 0.7.0,\n * `@eifi1/ui-kit/i18n/<code>`); the app decides the language and hands the words in.\n * What was wrong was HOW it had to hand them in —\n * one `labels` prop per component instance, under a different prop name per\n * component (`labels`, `calendarLabels`, `passwordLabels`, `clearLabel`,\n * `searchPlaceholder`, `ariaLabel` …). A translated app therefore rendered English\n * wherever one call site forgot one prop, and nothing told it so: a German showcase\n * still said \"Rows per page\", \"Collapse sidebar\" and \"Popover\" in seven languages.\n *\n * Now there is one key per string, addressed by a dot path (`dataTable.pageSize`,\n * `datePicker.today`), and three sources in a fixed order of precedence:\n *\n * the component's own prop > <UiKitProvider labels> > English default\n *\n * A consumer loads a shipped catalogue (`loadUiKitLabels(code)`) or writes its own\n * `UiKitLabels` (or a partial of one), mounts `<UiKitProvider labels={…} locale={…}>`\n * at the root, and every kit component\n * below speaks that language — including the ones nested inside other kit components\n * (the calendar inside the data table's date filter, the popover inside the date\n * picker), which no prop at the outer call site could reach before.\n *\n * Messages that carry a value are FUNCTIONS of that value, never a template to fill:\n * a number glued into an English sentence is untranslatable, because the grammar\n * around it moves with it in most languages.\n */\n\n/* ── Namespaces that had no labels type of their own ─────────────────────── */\n\n/** The words several components share. A component's own namespace wins over these\n * where both exist; these are what a new component reaches for first. */\nexport interface CommonLabels {\n close: string;\n clear: string;\n search: string;\n done: string;\n cancel: string;\n save: string;\n back: string;\n next: string;\n remove: string;\n loading: string;\n noResults: string;\n /** \"Name: value\" — how a field's accessible name is composed with its value.\n * A colon-and-space is not universal punctuation (French puts a space before\n * the colon, Chinese uses a full-width one). */\n fieldValue: (field: string, value: string) => string;\n /** The × that puts away a banner or a notice (`AlertBanner onDismiss`). Not `close`:\n * nothing opened, and \"Close\" on a banner reads as closing the page it sits on. */\n dismiss: string;\n /** Read after a link that opens a new tab (`<Button href external>`, TextLink):\n * nothing else tells a screen reader the page is about to change tabs. */\n opensInNewTab: string;\n /** The name of a field's `help` \"?\" and its panel (round 0.36): \"About “<field>”\", the\n * field's label as the argument, quoted so a capitalised label reads as a name — \"About\n * “Jerk shape”\" (round 0.37; the other locales quoted it already). A `HelpPopover`\n * passed as `help` keeps its own name. */\n aboutField: (field: string) => string;\n /** …and of a `help` \"?\" on a field with no label and no `aria-label` to name it by. */\n help: string;\n}\n\n/** `DatePicker` / `DateRangePicker` chrome. The calendar inside has its own\n * namespace, `miniCalendar`. */\nexport interface DatePickerLabels {\n /** Accessible name of the popover panel the calendar opens in. */\n panel: string;\n /** The same, for `DateRangePicker`'s panel. */\n rangePanel: string;\n clear: string;\n previousDay: string;\n nextDay: string;\n today: string;\n /** `DateRangePicker commit=\"apply\"`: the button that commits the drafted range. */\n apply: string;\n /** …and the one that discards it. */\n cancel: string;\n /** Accessible name of `DateRangePicker`'s preset column. */\n presets: string;\n}\n\n/** The whole combobox family: `Combobox`, `EntityCombobox`,\n * `MultiEntityCombobox`, `InlineEntityCombobox`, `Autocomplete`. */\nexport interface ComboboxLabels {\n search: string;\n noResults: string;\n clear: string;\n loading: string;\n /** The \"add this\" row when free entry is allowed. */\n create: (query: string) => string;\n /** Trigger summary once more than one value is picked. */\n selectedCount: (count: number) => string;\n /** An async lookup (`loadOptions`) failed. */\n loadError: string;\n /** Announced (live region) when the list settles on `count` > 0 rows. */\n resultCount: (count: number) => string;\n /** The query is shorter than the `minChars` a lookup needs. */\n minChars: (count: number) => string;\n}\n\nexport interface MultiSelectLabels {\n search: string;\n selectAll: string;\n clear: string;\n /** Trigger text when nothing is picked, which a multi-select reads as \"all\". */\n all: string;\n /** Trigger summary once some (but not all) values are picked. The English\n * default is the bare count, which is what the trigger has always shown. */\n selectedCount: (count: number) => string;\n}\n\n/** `CalculatorButton` (desktop popover keypad) and `NumberPadSheet` (phone sheet). */\nexport interface CalculatorLabels {\n /** The button that opens the calculator. */\n open: string;\n /** The popover / sheet itself. */\n panel: string;\n calculation: string;\n backspace: string;\n clear: string;\n equals: string;\n /** The primary key of the phone pad — visible text, not an aria-label. */\n done: string;\n /** Names of the operator keys and the decimal key. Their glyphs are not names a\n * screen reader agrees on — \"÷\" is read as \"division sign\", \"divided by\" or\n * nothing at all depending on the reader — so each says what it does. */\n plus: string;\n minus: string;\n times: string;\n divide: string;\n decimal: string;\n}\n\n/** `CurrencySelect` and the currency half of `AmountInput`. */\nexport interface CurrencyLabels {\n currency: string;\n search: string;\n}\n\nexport interface AppShellLabels {\n collapse: string;\n expand: string;\n /** Accessible name of an inline group's disclosure button (`subNav=\"inline\"`). */\n toggleGroup: (groupLabel: string) => string;\n}\n\nexport interface TopBarLabels {\n theme: string;\n palette: string;\n language: string;\n switchRole: string;\n /** The role switcher's tooltip, given the active role's name. */\n role: (value: string) => string;\n}\n\nexport interface PickerSheetLabels {\n close: string;\n /** The sticky footer button that closes a multi-select sheet once the rows are ticked\n * (0.40) — the ticks are already applied, so it confirms rather than saves. */\n done: string;\n}\n\nexport interface SwipeableRowLabels {\n actions: string;\n}\n\nexport interface FileLabels {\n /** A file size for display, given its size in BYTES. The default uses\n * `Intl.NumberFormat`'s unit formatting in the provider's locale. */\n size: (bytes: number) => string;\n}\n\n/** The complete tree. `UiKitProvider` takes any partial of it. */\nexport interface UiKitLabels {\n common: CommonLabels;\n dataTable: DataTableLabels;\n miniCalendar: MiniCalendarLabels;\n calendarHeatmap: CalendarHeatmapLabels;\n datePicker: DatePickerLabels;\n monthPicker: MonthPickerLabels;\n popover: PopoverLabels;\n combobox: ComboboxLabels;\n multiSelect: MultiSelectLabels;\n calculator: CalculatorLabels;\n currency: CurrencyLabels;\n chipInput: ChipInputLabels;\n fieldSync: FieldSyncLabels;\n passwordReveal: PasswordRevealLabels;\n tabs: TabsLabels;\n appShell: AppShellLabels;\n pageContents: PageContentsLabels;\n topBar: TopBarLabels;\n pickerSheet: PickerSheetLabels;\n swipeableRow: SwipeableRowLabels;\n file: FileLabels;\n wizard: WizardLabels;\n tour: TourLabels;\n /** 0.43.0: the tours page — `TourCatalogue` and its card (docs/tours-harmonization.md §3). */\n tourCatalogue: TourCatalogueLabels;\n commandPalette: CommandPaletteLabels;\n globalSearch: GlobalSearchLabels;\n seriesChart: SeriesChartLabels;\n pieChart: PieChartLabels;\n sparkline: SparklineLabels;\n statTile: StatTileLabels;\n signaturePad: SignaturePadLabels;\n passwordStrength: PasswordStrengthLabels;\n dangerConfirm: DangerConfirmLabels;\n swatchPicker: SwatchPickerLabels;\n iconPicker: IconPickerLabels;\n dialogFrame: DialogFrameLabels;\n filePicker: FilePickerLabels;\n measuredGrid: MeasuredGridLabels;\n feedbackAttachment: FeedbackAttachmentFieldLabels;\n /** 0.12.0: `FeedbackDialog`'s own strings; `FeedbackThread` / `FeedbackComposer`. */\n feedbackDialog: FeedbackDialogTextLabels;\n feedbackThread: FeedbackThreadLabels;\n feedbackComposer: FeedbackComposerLabels;\n /** 0.27.0: the feedback harmonisation (docs/feedback-harmonization.md §4) — a report's\n * status and category words, keyed by the enum value; the toasts a feedback page\n * shows; `FeedbackMenu`; `FeedbackContextBox`; the two pages' table; the row detail.\n * keksdose's wording is the canon, in every language. */\n feedbackStatus: FeedbackStatusLabels;\n feedbackCategory: FeedbackCategoryLabels;\n feedbackToast: FeedbackToastLabels;\n feedbackMenu: FeedbackMenuLabels;\n /** 0.38.0: the public feedback pages — `FeedbackPublicList`, `FeedbackPublicDetail`,\n * `FeedbackPublicSwitch` (docs/feedback-harmonization.md §9.15). */\n feedbackPublic: FeedbackPublicLabels;\n /** 0.38.0: `useFeedbackNotificationTypes` — the two feedback types' setting words\n * (§9.11). */\n feedbackNotificationTypes: FeedbackNotificationTypesLabels;\n feedbackContext: FeedbackContextLabels;\n feedbackPage: FeedbackPageLabels;\n feedbackDetail: FeedbackDetailLabels;\n /** 0.38.0: public feedback (docs/feedback-harmonization.md §9.15) — the vote button,\n * the comment thread, the replies' timeline and composer. */\n feedbackVote: FeedbackVoteLabels;\n feedbackComments: FeedbackCommentsLabels;\n feedbackReplies: FeedbackRepliesLabels;\n /** 0.12.0: `ProfileSetting`, `PasswordSetting`, `TwoFactorSetting`, `PasskeysSetting`\n * — one record per section. The provider takes a whole section record; the\n * components merge it key by key, as a prop. */\n accountSettings: AccountSettingsLabels;\n confirmDialog: ConfirmDialogLabels;\n floatingPanel: FloatingPanelLabels;\n copyButton: CopyButtonLabels;\n bulkActionBar: BulkActionBarLabels;\n list: ListLabels;\n breadcrumbs: BreadcrumbsLabels;\n toast: ToastLabels;\n form: FormActionsLabels;\n descriptionList: DescriptionListLabels;\n lineItems: LineItemsLabels;\n progressBar: ProgressBarLabels;\n signedAmount: SignedAmountLabels;\n errorBoundary: ErrorBoundaryLabels;\n authedImage: AuthedImageLabels;\n imageGrid: ImageGridLabels;\n lightbox: LightboxLabels;\n /** 0.18.0: `WriteLockProvider`'s fallback reason, `AccountStateChip`, `SharePanel` /\n * `ShareCard` / `ShareDialog`, `ReauthDialog`. */\n writeLock: WriteLockLabels;\n accountState: AccountStateLabels;\n shareCard: ShareCardLabels;\n reauthDialog: ReauthDialogLabels;\n /** 0.18.0: `ServerWakeNotice` — keksdose's cold-start notice, for every app. */\n serverWake: ServerWakeLabels;\n /** 0.19.0: the translation-review parts (`TranslationReviewPanel`, its editor, chip,\n * progress, locale tabs and export) — keksdose's /translations, for every app. */\n translationReview: TranslationReviewLabels;\n /** 0.19.0: `LegalLinks`' navigation name. 0.28.0: every kit-owned word of the legal\n * pages — the link labels, titles, back link, terms checkbox and notices, and the\n * sections that are the same in every app, filled in with the app's operator\n * (docs/legal-harmonization.md §4.3/§4.4). */\n legal: LegalLabels;\n /** 0.29.0: sign-in form: credentials, passkey, 2FA, forced new password (docs/auth-harmonization.md §5). */\n signIn: SignInLabels;\n /** 0.29.0: the sign-up form, with the +app address tag (§4.1, §4.5). */\n register: RegisterLabels;\n /** 0.29.0: asking a migrated account for first and last name once (§3.3). */\n completeName: CompleteNameLabels;\n /** 0.29.0: requesting a reset link (always the same answer). */\n forgotPassword: ForgotPasswordLabels;\n /** 0.29.0: choosing a new password from a reset link; not a sign-in (§6.3). */\n resetPassword: ResetPasswordLabels;\n /** 0.29.0: the verify-email page and the unverified banner. */\n verifyEmail: VerifyEmailLabels;\n /** 0.29.0: the 404 page. */\n notFound: NotFoundLabels;\n /** 0.29.0: accepting an invitation with an account (§4.4). */\n acceptInvitation: AcceptInvitationLabels;\n /** 0.29.0: kastlan's switcher between a user's companies (§5.3). */\n companySwitcher: CompanySwitcherLabels;\n /** 0.30.0: changing the account's address with re-verification (docs/user-admin-harmonization.md §6.2). */\n emailChange: EmailChangeLabels;\n /** 0.30.0: sign out everywhere, and kastlan's device list (§6.3). */\n sessions: SessionsLabels;\n /** 0.30.0: deletion in two stages (§6.4). */\n deleteAccount: DeleteAccountLabels;\n /** 0.30.0: the self-service JSON export (§6.5). */\n dataExport: DataExportLabels;\n /** 0.30.0: the admin user list's columns (§3). */\n userRoster: UserRosterLabels;\n /** 0.30.0: picking one or several roles, with the reasons a choice is locked (§4.1). */\n roleSelect: RoleSelectLabels;\n /** 0.30.0: a translation reviewer's languages and areas. */\n reviewerScope: ReviewerScopeLabels;\n /** 0.30.0: an admin action's confirmation and refusals (§4.2). */\n adminAction: AdminActionLabels;\n /** 0.30.0: the admin_actions list (§4.3). */\n adminActionLog: AdminActionLogLabels;\n /** 0.30.0: handing an account's work to another (Kurvenschmiede). */\n transferOwnership: TransferOwnershipLabels;\n /** 0.30.0: the invitations panel (§5). */\n invitations: InvitationsLabels;\n /** 0.31.0: the settings and admin pages' shell (docs/settings-harmonization.md §4.3). */\n settings: SettingsLabels;\n /** 0.31.0: the public landing page's kit words (docs/landing-demo-harmonization.md §4). */\n landing: LandingLabels;\n /** 0.31.0: the demo's start, banner and end (§5). */\n demo: DemoLabels;\n /** 0.32.0: plans, standing, banners and the limit notice (docs/billing-harmonization.md §7). */\n billing: BillingLabels;\n /** 0.33.0: the operator's plan parts — `planColumn`, `PlanChangeConfirm` and the\n * lines of `usePlanChangeResult` (docs/billing-harmonization.md §14.12). */\n planChange: PlanChangeLabels;\n /** 0.32.0: the text-size and contrast settings (docs/text-size-harmonization.md §6). */\n appearance: AppearanceLabels;\n /** 0.36.0: resetting this device's settings, the appearance group's last card\n * (docs/settings-harmonization.md §11.3). */\n deviceReset: DeviceResetLabels;\n /** 0.32.0: a row's actions folded into a \"⋯\" menu at Large (text size §10.8). */\n rowActions: RowActionsLabels;\n /** 0.32.0: the phone bar's \"More\" cell and sheet (text size §10.7). */\n appShellMore: AppShellMoreLabels;\n /** 0.22.0: the screen-reader words of `Input` / `Textarea`'s `showCount` counter. */\n characterCount: CharacterCountLabels;\n /** 0.22.0: `CountrySelect`. Its list's \"no results\" and counts are `combobox`'s. */\n countrySelect: CountrySelectLabels;\n /** 0.22.0: `InlineEditField` — keksdose K9. */\n inlineEdit: InlineEditLabels;\n /** 0.22.0: `IbanInput`'s messages, one per problem. */\n ibanInput: IbanInputLabels;\n /** 0.22.0: `PhoneInput`'s country-code select. */\n phoneInput: PhoneInputLabels;\n /** 0.22.0: `SignChip` — the outflow / inflow toggle beside an amount. */\n signChip: SignChipLabels;\n /** 0.23.0: `ColumnMapper` / `ColumnRoleTable` — a pasted or dropped table, a role per\n * column. */\n columnMapper: ColumnMapperLabels;\n /** 0.36.0: the notification cards — the types, quiet hours and the zone picker, this\n * device's push, the device list, and the unsubscribe page\n * (docs/notifications-harmonization.md §4.2). */\n notifications: NotificationsLabels;\n /** 0.42.0: the admin area's shared words — the account menu's \"Administration\" row, the\n * 403 page, the shared sections, the overview's tiles and the Tools list\n * (docs/admin-harmonization.md §3.1). */\n adminArea: AdminAreaLabels;\n /** 0.42.0: the top bar's shared parts — `TourMenu`, `SyncStatusIndicator`, `DevSwitchers`\n * (docs/top-bar-harmonization.md §3.1). */\n topBarParts: TopBarPartsLabels;\n /** 0.45.0: \"Send a test mail to me\" (docs/admin-harmonization.md §9.2.4). */\n mailTestCard: MailTestCardLabels;\n /** 0.45.0: the sign-out question while changes wait to sync (`@eifi1/ui-kit/offline`,\n * docs/local-first-harmonization.md §1.6). */\n signOutPending: SignOutPendingDialogLabels;\n /** 0.45.0: the service-worker update toast (local-first §1.5 D8). */\n pwaUpdate: PwaUpdatePromptLabels;\n /** 0.45.0: \"This is a shared computer\" on the sign-in form (local-first §1.5 D6). */\n sharedComputer: SharedComputerLabels;\n}\n\n/**\n * A label override, as deep as the labels go: an object of labels (a namespace, or a\n * record inside one such as `accountSettings.passkeys` or `dataTable.presets`) may be\n * partial at every level, because the provider merges it key by key at every level.\n * A leaf stays as it is: a string, a function-valued label (`(n) => …`), and anything\n * that is not purely an object (a `ReactNode` union) is given whole.\n */\nexport type LabelOverride<T> = [T] extends [(...args: never[]) => unknown]\n ? T\n : [T] extends [readonly unknown[]]\n ? T\n : [T] extends [object]\n ? { [K in keyof T]?: LabelOverride<T[K]> }\n : T;\n\n/** Any subset of the tree — each namespace may be partial, and so may any record\n * inside one (`accountSettings.passkeys`, `dataTable.presets`): they are merged key\n * by key, at every depth. */\nexport type UiKitLabelOverrides = { [K in keyof UiKitLabels]?: LabelOverride<UiKitLabels[K]> };\n\n/* ── English defaults for the namespaces defined here ────────────────────── */\n\n// They live in ./shared-labels, a module of words, as every component's defaults live in\n// its `*-labels.ts` (round 0.34). Imported and exported as this module's own, as each\n// component does with its defaults: the names, and where the README lists them, stay.\nexport {\n DEFAULT_APP_SHELL_LABELS,\n DEFAULT_CALCULATOR_LABELS,\n DEFAULT_COMBOBOX_LABELS,\n DEFAULT_COMMON_LABELS,\n DEFAULT_CURRENCY_LABELS,\n DEFAULT_DATE_PICKER_LABELS,\n DEFAULT_FILE_LABELS,\n DEFAULT_MULTI_SELECT_LABELS,\n DEFAULT_PICKER_SHEET_LABELS,\n DEFAULT_SWIPEABLE_ROW_LABELS,\n DEFAULT_TOP_BAR_LABELS,\n formatFileSize,\n};\n\n/* ── The provider ────────────────────────────────────────────────────────── */\n\ninterface KitI18n {\n labels?: UiKitLabelOverrides;\n locale?: string;\n weekStartsOn?: WeekDay;\n linkComponent?: KitLinkComponent;\n chartTooltipPlacement?: ChartTooltipPlacement;\n formatDate?: KitDateFormatter;\n tableStorageKeyPrefix?: string;\n timeZone?: string;\n}\n\n/** What a {@link KitDateFormatter} is told about the date it is formatting. */\nexport interface KitDateFormatContext {\n /**\n * How much of a date the string is: `\"day\"` — the `iso` is `\"YYYY-MM-DD\"`; `\"month\"` —\n * `\"YYYY-MM\"` (a `MonthPicker`); `\"year\"` — `\"YYYY\"` (`MonthPicker mode=\"year\"`).\n */\n unit: \"day\" | \"month\" | \"year\";\n /** Which kit surface asks: the trigger of a `DatePicker`, of a `DateRangePicker`\n * (called once per end), of a `MonthPicker`, or a `DateMark`. */\n source: \"datePicker\" | \"dateRangePicker\" | \"monthPicker\" | \"dateMark\";\n /** The locale the kit would have formatted in — the component's `locale` prop, else\n * the provider's — or `undefined` for the runtime's. */\n locale: string | undefined;\n /**\n * The kit's suggestion: whether this date stands alone where the day of the week\n * helps — `true` for a `DatePicker`'s trigger and a `DateMark`, `false` for the two\n * ends of a range (twice the width, in a sentence-like \"from – to\") and for a month\n * or a year. keksdose's rule, which this follows: *\"A date in a COLUMN carries the\n * weekday. A date in a SENTENCE does not.\"* (date-cell.tsx, dev#546). A formatter\n * is free to ignore it.\n */\n weekday: boolean;\n}\n\n/**\n * The app's ONE answer to \"what does a date look like here\" — keksdose K12. Returns the\n * text for an ISO date (see {@link KitDateFormatContext.unit} for the three shapes).\n * Return `\"\"` to fall back to the kit's own formatting for that date.\n */\nexport type KitDateFormatter = (iso: string, context: KitDateFormatContext) => string;\n\n/** Where a chart shows the values under the pointer — see `SeriesChartTooltip.placement`. */\nexport type ChartTooltipPlacement = \"cursor\" | \"above\" | \"below\" | \"auto\";\n\n/**\n * What every kit link receives: the anchor attributes the kit decided (href, class,\n * aria-current, handlers, children, ref). An app's router link maps them —\n * `({ href, ...p }) => <Link to={href} {...p} />` — ONCE, on the provider.\n *\n * `replace` is the one prop that is not an anchor attribute: see there. Map it\n * explicitly if your router link is not react-router's —\n * `({ href, replace, ...p }) => <Link to={href} replace={replace} {...p} />` — and never\n * spread it onto a DOM `<a>`, where React warns about an unknown attribute.\n */\nexport type KitLinkProps = AnchorHTMLAttributes<HTMLAnchorElement> & {\n href: string;\n ref?: Ref<HTMLAnchorElement>;\n /**\n * Navigate by REPLACING the current history entry, so Back skips it — keksdose F1:\n * a one-shot URL (a magic-link landing, `?checkout=done`, a wizard's \"finish\" hop)\n * that must not come back when the user presses Back. Present ONLY when the kit link\n * was given `replace` (`true`), so a provider link that spreads its props onto a\n * plain `<a>` keeps working for every link that never asks for it. react-router's\n * `<Link>` takes the same prop, so `({ href, ...p }) => <Link to={href} {...p} />`\n * honours it with no change; any other router maps it to its own replace option.\n * The kit never puts it on a DOM element itself.\n */\n replace?: boolean;\n};\nexport type KitLinkComponent = (props: KitLinkProps) => ReactElement;\n\nconst KitI18nContext = createContext<KitI18n>({});\n\nexport interface UiKitProviderProps {\n /** Any part of {@link UiKitLabels}. Missing keys fall back to English. */\n labels?: UiKitLabelOverrides;\n /**\n * BCP 47 tag used by every kit component that formats something — dates, numbers,\n * month and weekday names, file sizes — when it is not handed a `locale` prop of\n * its own. Without a provider, and without a prop, those use the runtime default.\n */\n locale?: string;\n /**\n * The first day of the week (0 = Sunday, 1 = Monday …) for every calendar below —\n * `MiniCalendar` and the pickers built on it — that is not handed a `weekStartsOn`\n * of its own. Without it the week start follows `locale`'s week info.\n *\n * Separate from `locale` because the two are separate decisions: a German-built\n * app running in English (`locale=\"en\"`) would otherwise start its weeks on Sunday,\n * and switching it to `en-GB` to get Monday changes every date and number format.\n */\n weekStartsOn?: WeekDay;\n /**\n * The app's router link, used by every kit component that renders an in-app link\n * and was not handed its own `renderLink` — so `renderLink` stops being repeated on\n * each ListItem, Breadcrumbs, StatTile, Chip… (kastlan). A component's own\n * `renderLink` wins; external links and in-page `#anchor`s stay plain `<a>`, and a\n * hash-router `#/path` is handed to it like `/path` (see `pickLinkRenderer`).\n */\n linkComponent?: KitLinkComponent;\n /**\n * Where every `SeriesChart` below shows its tooltip when it does not say so itself\n * (`tooltip.placement`) — set once so an app's phone charts stop putting the box under\n * the reader's finger (keksdose #359). Default: `\"cursor\"`, the box that follows the\n * pointer, as before.\n */\n chartTooltipPlacement?: ChartTooltipPlacement;\n /**\n * How every kit date below is written, when the component is not told otherwise —\n * keksdose K12. keksdose has a date-format preference (Settings ▸ date format, feedback\n * #180) that is not the UI language, and a weekday in the UI language beside digits\n * in the preference's order (live #246, dev#546): two locales in one string, which\n * no `locale` + `Intl` options can say. Its `DateField` wraps every `DatePicker` to\n * pass `formatValue`, and its report range field formats both ends by hand; with this\n * set once on the provider, those wrappers thin to nothing.\n *\n * Used for the trigger text of `DatePicker`, `DateRangePicker` and `MonthPicker`\n * (month and year mode), and for `DateMark display=\"date\"`. A component's own\n * `formatValue` or `formatOptions` (`dateStyle` on a DateMark) wins: prop >\n * provider > the kit's `Intl` default, the order every kit setting resolves in. Left\n * out (or returning `\"\"`), everything formats exactly as before.\n *\n * Keep it stable (`useCallback`, or a module function): it is in the provider's\n * context value, so a new function every render re-renders every consumer.\n */\n formatDate?: KitDateFormatter;\n /**\n * The `localStorage` prefix every kit table below keeps its view under (sort, filters,\n * page size, widths, hidden columns), when the table is not handed a\n * `storageKeyPrefix` of its own — round 0.34 C5, KS U4. Left out, it is the kit's\n * `\"hbui-table:\"`, as before.\n *\n * Set once here rather than per table because not every table is the app's to pass a\n * prop to: `TranslationReviewPanel` wraps a `DataTable`, and until this the panel's\n * view landed under the kit's prefix whatever the app's was — so an app that lists\n * what it stores (a privacy page) had to list the kit's prefix as a key of its own.\n * Resolves like every kit setting: the table's own prop > this > the default. The\n * key is the prefix plus the table's `storageKey`, verbatim, so an app that wrapped\n * `DataTable` to pass its prefix (Keksdose's `keksdose-table:`) keeps every stored\n * view when it moves the prefix here.\n */\n tableStorageKeyPrefix?: string;\n /**\n * 0.46 (docs/notifications-harmonization.md §10.3): the IANA zone (\"Europe/Zurich\") every\n * TIMESTAMP below is shown in through `useKitFormat().formatDate` /\n * `formatRelativeTime`, when the call names none — the account's picked zone, for an app\n * that shows times in it. A bare \"YYYY-MM-DD\" is never shifted (a calendar day is the day\n * it names in every zone). Left out, timestamps follow the device, as before.\n */\n timeZone?: string;\n children: ReactNode;\n}\n\n/**\n * Hand every kit component below this point its strings and its locale.\n *\n * Optional: a component outside any provider behaves exactly as it did before the\n * provider existed. Nesting works as a merge — an inner provider overrides only what\n * it names, so a page can re-label one table's `dataTable.table` without restating\n * the language.\n */\nexport function UiKitProvider({\n labels,\n locale,\n weekStartsOn,\n linkComponent,\n chartTooltipPlacement,\n formatDate,\n tableStorageKeyPrefix,\n timeZone,\n children,\n}: UiKitProviderProps) {\n const outer = useContext(KitI18nContext);\n const value = useMemo<KitI18n>(\n () => ({\n locale: locale ?? outer.locale,\n weekStartsOn: weekStartsOn ?? outer.weekStartsOn,\n labels: mergeOverrides(outer.labels, labels),\n linkComponent: linkComponent ?? outer.linkComponent,\n chartTooltipPlacement: chartTooltipPlacement ?? outer.chartTooltipPlacement,\n formatDate: formatDate ?? outer.formatDate,\n tableStorageKeyPrefix: tableStorageKeyPrefix ?? outer.tableStorageKeyPrefix,\n timeZone: timeZone ?? outer.timeZone,\n }),\n [outer, labels, locale, weekStartsOn, linkComponent, chartTooltipPlacement, formatDate, tableStorageKeyPrefix, timeZone],\n );\n useTableViewsJoin(value.tableStorageKeyPrefix ?? DEFAULT_TABLE_STORAGE_KEY_PREFIX);\n return <KitI18nContext.Provider value={value}>{children}</KitI18nContext.Provider>;\n}\n\n/** The kit's own table prefix: `DEFAULT_PERSIST_PREFIX` of components/use-table-state,\n * restated because that module imports the router (a test pins the two equal). */\nconst DEFAULT_TABLE_STORAGE_KEY_PREFIX = \"hbui-table:\";\n\n/**\n * Reset this device's settings (docs/settings-harmonization.md §11.4): the tables below a\n * provider keep their views under its prefix, so the provider joins the registry with\n * that prefix — a view, no `reset`, since a table reads its view when it next mounts —\n * while it is mounted. Nested providers with one prefix hold one entry.\n *\n * Through a literal `import()`, not a static import: every catalogue reaches this module,\n * and a catalogue may reach nothing outside i18n/ (scripts/check-module-graph.mjs,\n * english-catalogue-graph.test.ts). The theme stores and the shell import the registry\n * statically, so it is loaded already and the join lands a microtask after the mount.\n */\nfunction useTableViewsJoin(prefix: string): void {\n useEffect(() => {\n let leave: (() => void) | undefined;\n let gone = false;\n import(\"../lib/device-settings\").then(\n ({ registerDeviceSetting }) => {\n if (!gone) leave = registerDeviceSetting({ key: prefix, prefix: true, kind: \"view\" });\n },\n // A module of the kit's own that fails to load has nothing to join; the provider\n // and its tables work as before.\n () => undefined,\n );\n return () => {\n gone = true;\n leave?.();\n };\n }, [prefix]);\n}\n\nfunction isRecord(v: unknown): v is Record<string, unknown> {\n return typeof v === \"object\" && v !== null && !Array.isArray(v);\n}\n\n/** A record of labels to merge into — not a React element, which is an object too but\n * is a label given whole. */\nfunction isLabelRecord(v: unknown): v is Record<string, unknown> {\n return isRecord(v) && !(\"$$typeof\" in v);\n}\n\n/** Merged key by key at EVERY depth — a namespace, a record inside it\n * (`accountSettings.passkeys`, `dataTable.presets`), and so on down — to match\n * {@link LabelOverride}. An `undefined` is skipped at every depth, so it never blanks\n * out what is under it. */\nfunction mergeNamespace<T extends object>(base: T, over: LabelOverride<T> | Partial<T> | undefined): T {\n if (!over) return base;\n const out = { ...base } as Record<string, unknown>;\n for (const [k, v] of Object.entries(over)) {\n if (v === undefined) continue;\n const prev = out[k];\n out[k] = isLabelRecord(prev) && isLabelRecord(v) ? mergeNamespace(prev, v) : v;\n }\n return out as T;\n}\n\nfunction mergeOverrides(\n a: UiKitLabelOverrides | undefined,\n b: UiKitLabelOverrides | undefined,\n): UiKitLabelOverrides | undefined {\n if (!a) return b;\n if (!b) return a;\n const out: Record<string, unknown> = { ...a };\n for (const [ns, v] of Object.entries(b)) {\n out[ns] = mergeNamespace((out[ns] as object | undefined) ?? {}, v as object);\n }\n return out as UiKitLabelOverrides;\n}\n\n/**\n * What the nearest provider says about one namespace — `undefined` outside one. Nested\n * providers' words come merged, at every depth; no English default is filled in.\n *\n * A {@link LabelOverride}, partial at every depth, like the components' `labels` props\n * that take it: a provider that names one key of a section (`accountSettings.passkeys`)\n * or one preset (`dataTable.presets`) hands over just that (round 0.35 R3 — until then\n * it was typed partial at the top only, so a nested section read as complete).\n *\n * For a component whose own resolver does more than a merge (the data table derives\n * `columnsCount` from `columns`): merge the component's prop over it — a record key by\n * key — and feed the result to that resolver.\n */\nexport function useKitLabelOverrides<K extends keyof UiKitLabels>(\n ns: K,\n): LabelOverride<UiKitLabels[K]> | undefined {\n return useContext(KitI18nContext).labels?.[ns];\n}\n\n/**\n * One namespace, resolved: `defaults`, then the provider, then the component's own\n * `prop`. Record-valued keys are merged key by key at each step — so `prop` is a\n * {@link LabelOverride}, partial at every depth as the provider's labels are, and a\n * component's `labels` prop, typed the same, is handed over without a cast (refactor\n * audit 2026-10, API-9).\n */\nexport function useKitLabels<K extends keyof UiKitLabels>(\n ns: K,\n defaults: UiKitLabels[K],\n prop?: LabelOverride<UiKitLabels[K]>,\n): UiKitLabels[K] {\n const fromProvider = useKitLabelOverrides(ns);\n return useMemo(\n () => mergeNamespace(mergeNamespace(defaults, fromProvider), prop),\n [defaults, fromProvider, prop],\n );\n}\n\n/** The component's own `locale` prop, else the provider's, else `undefined` (which\n * every `Intl` API reads as \"the runtime's default\"). */\nexport function useKitLocale(prop?: string): string | undefined {\n const fromProvider = useContext(KitI18nContext).locale;\n return prop ?? fromProvider;\n}\n\n/** The week start the nearest `<UiKitProvider weekStartsOn>` pins, else `undefined`\n * (the caller then asks the locale). A component's own prop goes first:\n * `prop ?? useKitWeekStart()`. */\n/** The provider's router link, or `undefined` — a component's own `renderLink` should\n * win over it: `const Link = renderLink ?? useKitLink()`. */\nexport function useKitLink(): KitLinkComponent | undefined {\n return useContext(KitI18nContext).linkComponent;\n}\n\nexport function useKitWeekStart(): WeekDay | undefined {\n return useContext(KitI18nContext).weekStartsOn;\n}\n\n/** The provider's `chartTooltipPlacement`, or `undefined` — a chart's own prop wins. */\nexport function useKitChartTooltipPlacement(): ChartTooltipPlacement | undefined {\n return useContext(KitI18nContext).chartTooltipPlacement;\n}\n\n/** The nearest provider's `formatDate`, or `undefined` — a component's own\n * `formatValue` / `formatOptions` wins over it. See {@link KitDateFormatter}. */\nexport function useKitDateFormatter(): KitDateFormatter | undefined {\n return useContext(KitI18nContext).formatDate;\n}\n\n/** The nearest provider's `tableStorageKeyPrefix`, or `undefined` — a table's own\n * `storageKeyPrefix` wins over it, and the kit's `\"hbui-table:\"` comes after both. */\nexport function useKitTableStorageKeyPrefix(): string | undefined {\n return useContext(KitI18nContext).tableStorageKeyPrefix;\n}\n\n/** The nearest provider's `timeZone` (0.46), or `undefined` — the device's. A call's own\n * `timeZone` wins over it. */\nexport function useKitTimeZone(): string | undefined {\n return useContext(KitI18nContext).timeZone;\n}\n\n/** {@link DEFAULT_FILE_LABELS}, but formatting in the provider's locale. */\nexport function useKitFileLabels(prop?: Partial<FileLabels>): FileLabels {\n const locale = useKitLocale();\n const defaults = useMemo<FileLabels>(\n () => ({ size: (bytes) => formatFileSize(bytes, locale) }),\n [locale],\n );\n return useKitLabels(\"file\", defaults, prop);\n}\n\n/**\n * The dot paths of every key `labels` does NOT supply — the ones a translated app is\n * still showing in English. Assert on it in the app's own test:\n *\n * expect(missingKitLabels(labels, DEFAULT_UI_KIT_LABELS)).toEqual([]);\n *\n * `reference` is the complete tree to check against — pass\n * {@link DEFAULT_UI_KIT_LABELS} (src/i18n/defaults.ts). It is a parameter rather than an import\n * because the defaults live beside their components, and this module is imported BY\n * those components. Left out (a test file is not type-checked), it throws saying so\n * rather than \"Cannot convert undefined or null to object\" (keksdose, 0.18).\n */\nexport function missingKitLabels(\n labels: UiKitLabelOverrides | undefined,\n reference: UiKitLabels,\n): string[] {\n if (!isRecord(reference)) {\n throw new TypeError(\n \"missingKitLabels(labels, reference): pass DEFAULT_UI_KIT_LABELS as the reference — \" +\n \"it is the tree the labels are checked against.\",\n );\n }\n const missing: string[] = [];\n for (const [ns, keys] of Object.entries(reference)) {\n const given = (labels as Record<string, Record<string, unknown> | undefined> | undefined)?.[ns];\n for (const [key, value] of Object.entries(keys as Record<string, unknown>)) {\n const got = given?.[key];\n if (got === undefined) {\n missing.push(`${ns}.${key}`);\n } else if (isRecord(value) && isRecord(got)) {\n for (const sub of Object.keys(value)) {\n if (got[sub] === undefined) missing.push(`${ns}.${key}.${sub}`);\n }\n }\n }\n }\n return missing;\n}\n"],"mappings":";AA8tBS;AA9tBT,SAAS,eAAe,YAAY,WAAW,eAAe;AAC9D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AA4lBP,MAAM,iBAAiB,cAAuB,CAAC,CAAC;AA0FzC,SAAS,cAAc;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAuB;AACrB,QAAM,QAAQ,WAAW,cAAc;AACvC,QAAM,QAAQ;AAAA,IACZ,OAAO;AAAA,MACL,QAAQ,UAAU,MAAM;AAAA,MACxB,cAAc,gBAAgB,MAAM;AAAA,MACpC,QAAQ,eAAe,MAAM,QAAQ,MAAM;AAAA,MAC3C,eAAe,iBAAiB,MAAM;AAAA,MACtC,uBAAuB,yBAAyB,MAAM;AAAA,MACtD,YAAY,cAAc,MAAM;AAAA,MAChC,uBAAuB,yBAAyB,MAAM;AAAA,MACtD,UAAU,YAAY,MAAM;AAAA,IAC9B;AAAA,IACA,CAAC,OAAO,QAAQ,QAAQ,cAAc,eAAe,uBAAuB,YAAY,uBAAuB,QAAQ;AAAA,EACzH;AACA,oBAAkB,MAAM,yBAAyB,gCAAgC;AACjF,SAAO,oBAAC,eAAe,UAAf,EAAwB,OAAe,UAAS;AAC1D;AAIA,MAAM,mCAAmC;AAazC,SAAS,kBAAkB,QAAsB;AAC/C,YAAU,MAAM;AACd,QAAI;AACJ,QAAI,OAAO;AACX,WAAO,wBAAwB,EAAE;AAAA,MAC/B,CAAC,EAAE,sBAAsB,MAAM;AAC7B,YAAI,CAAC,KAAM,SAAQ,sBAAsB,EAAE,KAAK,QAAQ,QAAQ,MAAM,MAAM,OAAO,CAAC;AAAA,MACtF;AAAA;AAAA;AAAA,MAGA,MAAM;AAAA,IACR;AACA,WAAO,MAAM;AACX,aAAO;AACP,cAAQ;AAAA,IACV;AAAA,EACF,GAAG,CAAC,MAAM,CAAC;AACb;AAEA,SAAS,SAAS,GAA0C;AAC1D,SAAO,OAAO,MAAM,YAAY,MAAM,QAAQ,CAAC,MAAM,QAAQ,CAAC;AAChE;AAIA,SAAS,cAAc,GAA0C;AAC/D,SAAO,SAAS,CAAC,KAAK,EAAE,cAAc;AACxC;AAMA,SAAS,eAAiC,MAAS,MAAoD;AACrG,MAAI,CAAC,KAAM,QAAO;AAClB,QAAM,MAAM,EAAE,GAAG,KAAK;AACtB,aAAW,CAAC,GAAG,CAAC,KAAK,OAAO,QAAQ,IAAI,GAAG;AACzC,QAAI,MAAM,OAAW;AACrB,UAAM,OAAO,IAAI,CAAC;AAClB,QAAI,CAAC,IAAI,cAAc,IAAI,KAAK,cAAc,CAAC,IAAI,eAAe,MAAM,CAAC,IAAI;AAAA,EAC/E;AACA,SAAO;AACT;AAEA,SAAS,eACP,GACA,GACiC;AACjC,MAAI,CAAC,EAAG,QAAO;AACf,MAAI,CAAC,EAAG,QAAO;AACf,QAAM,MAA+B,EAAE,GAAG,EAAE;AAC5C,aAAW,CAAC,IAAI,CAAC,KAAK,OAAO,QAAQ,CAAC,GAAG;AACvC,QAAI,EAAE,IAAI,eAAgB,IAAI,EAAE,KAA4B,CAAC,GAAG,CAAW;AAAA,EAC7E;AACA,SAAO;AACT;AAeO,SAAS,qBACd,IAC2C;AAC3C,SAAO,WAAW,cAAc,EAAE,SAAS,EAAE;AAC/C;AASO,SAAS,aACd,IACA,UACA,MACgB;AAChB,QAAM,eAAe,qBAAqB,EAAE;AAC5C,SAAO;AAAA,IACL,MAAM,eAAe,eAAe,UAAU,YAAY,GAAG,IAAI;AAAA,IACjE,CAAC,UAAU,cAAc,IAAI;AAAA,EAC/B;AACF;AAIO,SAAS,aAAa,MAAmC;AAC9D,QAAM,eAAe,WAAW,cAAc,EAAE;AAChD,SAAO,QAAQ;AACjB;AAOO,SAAS,aAA2C;AACzD,SAAO,WAAW,cAAc,EAAE;AACpC;AAEO,SAAS,kBAAuC;AACrD,SAAO,WAAW,cAAc,EAAE;AACpC;AAGO,SAAS,8BAAiE;AAC/E,SAAO,WAAW,cAAc,EAAE;AACpC;AAIO,SAAS,sBAAoD;AAClE,SAAO,WAAW,cAAc,EAAE;AACpC;AAIO,SAAS,8BAAkD;AAChE,SAAO,WAAW,cAAc,EAAE;AACpC;AAIO,SAAS,iBAAqC;AACnD,SAAO,WAAW,cAAc,EAAE;AACpC;AAGO,SAAS,iBAAiB,MAAwC;AACvE,QAAM,SAAS,aAAa;AAC5B,QAAM,WAAW;AAAA,IACf,OAAO,EAAE,MAAM,CAAC,UAAU,eAAe,OAAO,MAAM,EAAE;AAAA,IACxD,CAAC,MAAM;AAAA,EACT;AACA,SAAO,aAAa,QAAQ,UAAU,IAAI;AAC5C;AAcO,SAAS,iBACd,QACA,WACU;AACV,MAAI,CAAC,SAAS,SAAS,GAAG;AACxB,UAAM,IAAI;AAAA,MACR;AAAA,IAEF;AAAA,EACF;AACA,QAAM,UAAoB,CAAC;AAC3B,aAAW,CAAC,IAAI,IAAI,KAAK,OAAO,QAAQ,SAAS,GAAG;AAClD,UAAM,QAAS,SAA6E,EAAE;AAC9F,eAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,IAA+B,GAAG;AAC1E,YAAM,MAAM,QAAQ,GAAG;AACvB,UAAI,QAAQ,QAAW;AACrB,gBAAQ,KAAK,GAAG,EAAE,IAAI,GAAG,EAAE;AAAA,MAC7B,WAAW,SAAS,KAAK,KAAK,SAAS,GAAG,GAAG;AAC3C,mBAAW,OAAO,OAAO,KAAK,KAAK,GAAG;AACpC,cAAI,IAAI,GAAG,MAAM,OAAW,SAAQ,KAAK,GAAG,EAAE,IAAI,GAAG,IAAI,GAAG,EAAE;AAAA,QAChE;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;","names":[]}
|
package/dist/i18n/locales/en.js
CHANGED
|
@@ -182,6 +182,7 @@ var DEFAULT_TOUR_LABELS = {
|
|
|
182
182
|
skip: "Skip",
|
|
183
183
|
done: "Done",
|
|
184
184
|
awaitClickHint: "Click the highlighted element to continue",
|
|
185
|
+
awaitInputHint: "Enter a value in the highlighted field to continue",
|
|
185
186
|
step: (c, t) => `${c} / ${t}`
|
|
186
187
|
};
|
|
187
188
|
|
|
@@ -515,7 +516,10 @@ var DEFAULT_FEEDBACK_NOTIFICATION_TYPES_LABELS = {
|
|
|
515
516
|
answered: "Answers to your reports",
|
|
516
517
|
answeredDescription: "When a report you wrote or commented on gets an answer.",
|
|
517
518
|
comment: "Comments on reports you follow",
|
|
518
|
-
commentDescription: "When someone comments on a report you wrote or commented on."
|
|
519
|
+
commentDescription: "When someone comments on a report you wrote or commented on.",
|
|
520
|
+
received: "New feedback and reworks",
|
|
521
|
+
receivedDescription: "When someone files a report or sends one back.",
|
|
522
|
+
adminGroup: "Admin"
|
|
519
523
|
};
|
|
520
524
|
|
|
521
525
|
// src/feedback/feedback-context-labels.ts
|
|
@@ -792,7 +796,8 @@ var DEFAULT_LIGHTBOX_LABELS = {
|
|
|
792
796
|
|
|
793
797
|
// src/components/write-lock-labels.ts
|
|
794
798
|
var DEFAULT_WRITE_LOCK_LABELS = {
|
|
795
|
-
reason: "You can view this but not change it."
|
|
799
|
+
reason: "You can view this but not change it.",
|
|
800
|
+
offline: "Needs a connection."
|
|
796
801
|
};
|
|
797
802
|
|
|
798
803
|
// src/components/legal-labels.ts
|
|
@@ -1534,7 +1539,12 @@ var DEFAULT_APPEARANCE_LABELS = {
|
|
|
1534
1539
|
contrast: "Contrast",
|
|
1535
1540
|
contrastHelp: "More contrast darkens quiet text and lines, and thickens focus frames. System follows this device.",
|
|
1536
1541
|
contrastModes: { system: "System", standard: "Standard", more: "More" },
|
|
1537
|
-
saveFailed: "Couldn't save this to your account. It still applies on this device."
|
|
1542
|
+
saveFailed: "Couldn't save this to your account. It still applies on this device.",
|
|
1543
|
+
dateFormat: "Date format",
|
|
1544
|
+
dateFormatHelp: "How dates are written throughout the app. Independent of the interface language, so you can read the app in English and still see German dates.",
|
|
1545
|
+
dateFormatAuto: "Follow language",
|
|
1546
|
+
textSmaller: "Smaller text",
|
|
1547
|
+
textLarger: "Larger text"
|
|
1538
1548
|
};
|
|
1539
1549
|
|
|
1540
1550
|
// src/settings/device-reset-setting-labels.ts
|
|
@@ -1594,7 +1604,11 @@ var DEFAULT_ADMIN_AREA_LABELS = {
|
|
|
1594
1604
|
deletionRequests: "Deletion requests",
|
|
1595
1605
|
invitationsPending: "Pending invitations",
|
|
1596
1606
|
users: "Users",
|
|
1597
|
-
usersNew: (count) => `${count} new in 7 days
|
|
1607
|
+
usersNew: (count) => `${count} new in 7 days`,
|
|
1608
|
+
awaitingVerdict: "Awaiting a verdict",
|
|
1609
|
+
awaitingVerdictHint: "Answered, and waiting for you or the reporter to confirm the fix",
|
|
1610
|
+
releasedForWork: "Released for work",
|
|
1611
|
+
releasedForWorkHint: "Ready, rework requested or in progress"
|
|
1598
1612
|
},
|
|
1599
1613
|
overviewError: "The overview couldn\u2019t be loaded.",
|
|
1600
1614
|
retry: "Try again",
|
|
@@ -1748,6 +1762,8 @@ var DEFAULT_TRANSLATION_REVIEW_LABELS = {
|
|
|
1748
1762
|
approve: "Approve",
|
|
1749
1763
|
flag: "Needs a change",
|
|
1750
1764
|
suggest: "Suggest translation",
|
|
1765
|
+
flagRow: "Flag for a change\u2026",
|
|
1766
|
+
suggestRow: "Add a translation\u2026",
|
|
1751
1767
|
reset: "Mark unreviewed",
|
|
1752
1768
|
cancel: "Cancel",
|
|
1753
1769
|
approveSelected: "Approve selected",
|
|
@@ -1848,6 +1864,9 @@ var DEFAULT_NOTIFICATIONS_LABELS = {
|
|
|
1848
1864
|
typesTitle: "Notify me about",
|
|
1849
1865
|
typesDescription: "Choose what you hear about, and how.",
|
|
1850
1866
|
byEmail: "By e-mail",
|
|
1867
|
+
channelApp: "In the app",
|
|
1868
|
+
channelPush: "Push",
|
|
1869
|
+
channelEmail: "E-mail",
|
|
1851
1870
|
emailUnverified: "Confirm your address to receive these.",
|
|
1852
1871
|
digestCadence: "Frequency",
|
|
1853
1872
|
digestWeekly: "Weekly",
|
|
@@ -1855,7 +1874,8 @@ var DEFAULT_NOTIFICATIONS_LABELS = {
|
|
|
1855
1874
|
typesLoading: "Loading notification settings\u2026",
|
|
1856
1875
|
typesEmpty: "There are no notifications for this account.",
|
|
1857
1876
|
quietTitle: "Quiet hours",
|
|
1858
|
-
quietDescription: (inbox) => inbox ? "No push notifications during this window. They still reach your inbox." : "No push notifications during this window.",
|
|
1877
|
+
quietDescription: (inbox, held) => held ? inbox ? "Push notifications wait during this window and arrive when it ends. They reach your inbox at once." : "Push notifications wait during this window and arrive when it ends." : inbox ? "No push notifications during this window. They still reach your inbox." : "No push notifications during this window.",
|
|
1878
|
+
quietZone: (zone) => `In your time zone (${zone}), which follows the device you last used.`,
|
|
1859
1879
|
quietFrom: "From",
|
|
1860
1880
|
quietUntil: "Until",
|
|
1861
1881
|
quietIncomplete: "Set both a start and an end time. Quiet hours take effect once both are set.",
|
|
@@ -1909,6 +1929,19 @@ var DEFAULT_NOTIFICATIONS_LABELS = {
|
|
|
1909
1929
|
remove: "Remove",
|
|
1910
1930
|
removeItem: (device) => `Remove ${device}`,
|
|
1911
1931
|
removePrompt: "Stop sending notifications to this device?",
|
|
1932
|
+
deviceTypes: "Types on this device",
|
|
1933
|
+
deviceTypesDescription: "Turn a type off to mute it on this device only.",
|
|
1934
|
+
deviceTypesEmpty: "No type has push notifications turned on.",
|
|
1935
|
+
inboxTitle: "Inbox",
|
|
1936
|
+
inboxLoading: "Loading notifications\u2026",
|
|
1937
|
+
inboxEmpty: "You\u2019re all caught up.",
|
|
1938
|
+
markAllRead: "Mark all as read",
|
|
1939
|
+
clearAll: "Clear all",
|
|
1940
|
+
clearPrompt: "Delete all notifications from your inbox?",
|
|
1941
|
+
showMore: "Show more",
|
|
1942
|
+
bellLabel: "Notifications",
|
|
1943
|
+
bellUnread: (count) => `${count} unread`,
|
|
1944
|
+
allNotifications: "All notifications",
|
|
1912
1945
|
unsubscribeTitle: "E-mail notifications",
|
|
1913
1946
|
unsubscribeAbout: (type) => `You get e-mails about: ${type}.`,
|
|
1914
1947
|
unsubscribeGeneric: "You get notification e-mails.",
|
|
@@ -2298,7 +2331,8 @@ function uiKitLabelsEn(numberLocale = "en-US") {
|
|
|
2298
2331
|
notifications: {
|
|
2299
2332
|
...d.notifications,
|
|
2300
2333
|
testSent: (count) => count === 1 ? "Test sent to 1 device" : `Test sent to ${n(count)} devices`,
|
|
2301
|
-
failures: (count) => count === 1 ? "1 failed delivery in a row" : `${n(count)} failed deliveries in a row
|
|
2334
|
+
failures: (count) => count === 1 ? "1 failed delivery in a row" : `${n(count)} failed deliveries in a row`,
|
|
2335
|
+
bellUnread: (count) => `${n(count)} unread`
|
|
2302
2336
|
},
|
|
2303
2337
|
settings: {
|
|
2304
2338
|
...d.settings,
|