@eifi1/ui-kit 0.46.1 → 0.47.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 +5 -5
- package/dist/components/data-table.js +18 -1
- package/dist/components/data-table.js.map +1 -1
- package/dist/components/row-actions.d.ts +25 -0
- package/dist/components/row-actions.js +13 -3
- package/dist/components/row-actions.js.map +1 -1
- package/dist/components/tabs.d.ts +24 -16
- package/dist/components/tabs.js +37 -31
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/ui-labels.js +1 -1
- package/dist/components/ui-labels.js.map +1 -1
- package/dist/eslint/index.js +1 -1
- package/dist/feedback/feedback-attachment-download.d.ts +19 -0
- package/dist/feedback/feedback-attachment-download.js +59 -0
- package/dist/feedback/feedback-attachment-download.js.map +1 -0
- package/dist/feedback/feedback-comment-thread.d.ts +17 -6
- package/dist/feedback/feedback-comment-thread.js +21 -2
- package/dist/feedback/feedback-comment-thread.js.map +1 -1
- package/dist/feedback/feedback-entry-file.d.ts +61 -0
- package/dist/feedback/feedback-entry-file.js +76 -0
- package/dist/feedback/feedback-entry-file.js.map +1 -0
- package/dist/feedback/feedback-public-list.d.ts +18 -5
- package/dist/feedback/feedback-public-list.js +8 -0
- package/dist/feedback/feedback-public-list.js.map +1 -1
- package/dist/feedback/feedback-public-types.d.ts +7 -2
- package/dist/feedback/feedback-replies.d.ts +26 -9
- package/dist/feedback/feedback-replies.js +20 -10
- package/dist/feedback/feedback-replies.js.map +1 -1
- package/dist/feedback/feedback-row-detail-labels.js +0 -1
- package/dist/feedback/feedback-row-detail-labels.js.map +1 -1
- package/dist/feedback/feedback-row-detail.d.ts +23 -10
- package/dist/feedback/feedback-row-detail.js +10 -54
- package/dist/feedback/feedback-row-detail.js.map +1 -1
- package/dist/feedback.d.ts +1 -0
- package/dist/feedback.js +1 -0
- package/dist/feedback.js.map +1 -1
- package/dist/i18n/german.js +1 -6
- package/dist/i18n/german.js.map +1 -1
- package/dist/i18n/locales/en.js +1 -6
- package/dist/i18n/locales/en.js.map +2 -2
- package/dist/i18n/locales/es.js +1 -6
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.js +1 -6
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hu.js +1 -6
- package/dist/i18n/locales/hu.js.map +1 -1
- package/dist/i18n/locales/it.js +1 -6
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/zh.js +1 -6
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/i18n/review.js +0 -1
- package/dist/i18n/review.js.map +1 -1
- package/dist/index.d.ts +2 -4
- package/dist/index.js +11 -4
- package/dist/index.js.map +1 -1
- package/dist/notifications/device-zone-report.d.ts +1 -1
- package/dist/notifications/device-zone-report.js.map +1 -1
- package/dist/notifications/notification-types.d.ts +0 -3
- package/dist/notifications/notifications-labels.d.ts +2 -15
- package/dist/notifications/notifications-labels.js +0 -4
- package/dist/notifications/notifications-labels.js.map +1 -1
- package/dist/notifications/quiet-hours-setting.d.ts +3 -8
- package/dist/notifications/quiet-hours-setting.js +8 -3
- package/dist/notifications/quiet-hours-setting.js.map +1 -1
- package/dist/theme/theme-store.d.ts +4 -4
- package/dist/theme/theme-store.js +1 -0
- package/dist/theme/theme-store.js.map +1 -1
- package/package.json +2 -2
- package/src/components/data-table.tsx +29 -3
- package/src/components/row-actions.tsx +42 -3
- package/src/components/tabs.tsx +66 -44
- package/src/components/ui-labels.ts +1 -1
- package/src/feedback/feedback-attachment-download.tsx +77 -0
- package/src/feedback/feedback-comment-thread.tsx +42 -7
- package/src/feedback/feedback-entry-file.tsx +150 -0
- package/src/feedback/feedback-public-list.tsx +25 -4
- package/src/feedback/feedback-public-types.ts +7 -2
- package/src/feedback/feedback-replies.tsx +46 -19
- package/src/feedback/feedback-row-detail-labels.ts +0 -1
- package/src/feedback/feedback-row-detail.tsx +35 -86
- package/src/feedback.ts +1 -0
- package/src/i18n/german.ts +1 -6
- package/src/i18n/locales/es.ts +1 -6
- package/src/i18n/locales/fr.ts +1 -6
- package/src/i18n/locales/hu.ts +1 -6
- package/src/i18n/locales/it.ts +1 -6
- package/src/i18n/locales/zh.ts +1 -6
- package/src/i18n/review.ts +0 -1
- package/src/index.ts +10 -3
- package/src/notifications/device-zone-report.ts +1 -1
- package/src/notifications/notification-types.ts +0 -3
- package/src/notifications/notifications-labels.ts +2 -19
- package/src/notifications/quiet-hours-setting.tsx +16 -11
- package/src/theme/theme-store.ts +13 -5
- package/dist/notifications/time-zone-select.d.ts +0 -54
- package/dist/notifications/time-zone-select.js +0 -71
- package/dist/notifications/time-zone-select.js.map +0 -1
- package/src/notifications/time-zone-select.tsx +0 -125
package/src/i18n/german.ts
CHANGED
|
@@ -202,7 +202,6 @@ export function germanLabels(numberLocale: string): UiKitLabels {
|
|
|
202
202
|
outcomeUpdate: "Aktualisieren",
|
|
203
203
|
outcomePlaceholder: "Was wurde umgesetzt, entschieden oder warum nicht.",
|
|
204
204
|
rework: "Nacharbeit",
|
|
205
|
-
openPage: "Seite öffnen",
|
|
206
205
|
reworkTitle: "Zur Nacharbeit senden",
|
|
207
206
|
reworkSend: "Nacharbeit senden",
|
|
208
207
|
reworkPlaceholder: "Was muss noch angepasst werden? Neue Anforderungen oder Richtungswechsel.",
|
|
@@ -541,7 +540,7 @@ export function germanLabels(numberLocale: string): UiKitLabels {
|
|
|
541
540
|
add: "Tab hinzufügen",
|
|
542
541
|
remove: (tab) => `${tab} entfernen`,
|
|
543
542
|
more: "Weitere Tabs",
|
|
544
|
-
|
|
543
|
+
previous: "Vorherige Tabs",
|
|
545
544
|
},
|
|
546
545
|
appShell: {
|
|
547
546
|
collapse: "Seitenleiste einklappen",
|
|
@@ -1184,7 +1183,6 @@ export function germanLabels(numberLocale: string): UiKitLabels {
|
|
|
1184
1183
|
notifications: {
|
|
1185
1184
|
typesTitle: "Benachrichtigungen zu",
|
|
1186
1185
|
typesDescription: "Wählen Sie, worüber Sie benachrichtigt werden, und wie.",
|
|
1187
|
-
byEmail: "Per E-Mail",
|
|
1188
1186
|
channelApp: "In der App",
|
|
1189
1187
|
channelPush: "Push",
|
|
1190
1188
|
channelEmail: "E-Mail",
|
|
@@ -1207,9 +1205,6 @@ export function germanLabels(numberLocale: string): UiKitLabels {
|
|
|
1207
1205
|
quietFrom: "Von",
|
|
1208
1206
|
quietUntil: "Bis",
|
|
1209
1207
|
quietIncomplete: "Legen Sie eine Start- und eine Endzeit fest. Ruhezeiten gelten erst, wenn beide gesetzt sind.",
|
|
1210
|
-
timeZone: "Zeitzone",
|
|
1211
|
-
deviceZone: (zone) => `Dieses Gerät ist in der Zeitzone ${zone}.`,
|
|
1212
|
-
useDeviceZone: "Übernehmen",
|
|
1213
1208
|
regions: {
|
|
1214
1209
|
Africa: "Afrika",
|
|
1215
1210
|
America: "Amerika",
|
package/src/i18n/locales/es.ts
CHANGED
|
@@ -193,7 +193,6 @@ export function uiKitLabelsEs(numberLocale = "es-ES"): UiKitLabels {
|
|
|
193
193
|
outcomeUpdate: "Actualizar",
|
|
194
194
|
outcomePlaceholder: "Qué se ha hecho o decidido, o por qué no se abordará.",
|
|
195
195
|
rework: "Corrección",
|
|
196
|
-
openPage: "Abrir página",
|
|
197
196
|
reworkTitle: "Devolver para corrección",
|
|
198
197
|
reworkSend: "Solicitar corrección",
|
|
199
198
|
reworkPlaceholder: "¿Qué falta por pulir? Nuevos requisitos o cambios de rumbo.",
|
|
@@ -528,7 +527,7 @@ export function uiKitLabelsEs(numberLocale = "es-ES"): UiKitLabels {
|
|
|
528
527
|
add: "Añadir pestaña",
|
|
529
528
|
remove: (tab) => `Quitar ${tab}`,
|
|
530
529
|
more: "Más pestañas",
|
|
531
|
-
|
|
530
|
+
previous: "Pestañas anteriores",
|
|
532
531
|
},
|
|
533
532
|
appShell: {
|
|
534
533
|
collapse: "Contraer barra lateral",
|
|
@@ -1158,7 +1157,6 @@ export function uiKitLabelsEs(numberLocale = "es-ES"): UiKitLabels {
|
|
|
1158
1157
|
notifications: {
|
|
1159
1158
|
typesTitle: "Avisarme de",
|
|
1160
1159
|
typesDescription: "Elija de qué se entera y cómo.",
|
|
1161
|
-
byEmail: "Por correo electrónico",
|
|
1162
1160
|
channelApp: "En la app",
|
|
1163
1161
|
channelPush: "Push",
|
|
1164
1162
|
channelEmail: "Correo",
|
|
@@ -1182,9 +1180,6 @@ export function uiKitLabelsEs(numberLocale = "es-ES"): UiKitLabels {
|
|
|
1182
1180
|
quietUntil: "Hasta",
|
|
1183
1181
|
quietIncomplete:
|
|
1184
1182
|
"Indique una hora de inicio y una de fin. Las horas de silencio se aplican cuando ambas están definidas.",
|
|
1185
|
-
timeZone: "Zona horaria",
|
|
1186
|
-
deviceZone: (zone) => `Este dispositivo está en ${zone}.`,
|
|
1187
|
-
useDeviceZone: "Usarla",
|
|
1188
1183
|
regions: {
|
|
1189
1184
|
Africa: "África",
|
|
1190
1185
|
America: "América",
|
package/src/i18n/locales/fr.ts
CHANGED
|
@@ -191,7 +191,6 @@ export function uiKitLabelsFr(numberLocale = "fr-FR"): UiKitLabels {
|
|
|
191
191
|
outcomeUpdate: "Mettre à jour",
|
|
192
192
|
outcomePlaceholder: "Ce qui a été fait ou décidé, ou pourquoi ce point ne sera pas traité.",
|
|
193
193
|
rework: "Reprise",
|
|
194
|
-
openPage: "Ouvrir la page",
|
|
195
194
|
reworkTitle: "Renvoyer pour reprise",
|
|
196
195
|
reworkSend: "Demander la reprise",
|
|
197
196
|
reworkPlaceholder:
|
|
@@ -536,7 +535,7 @@ export function uiKitLabelsFr(numberLocale = "fr-FR"): UiKitLabels {
|
|
|
536
535
|
add: "Ajouter un onglet",
|
|
537
536
|
remove: (tab) => `Supprimer ${tab}`,
|
|
538
537
|
more: "Autres onglets",
|
|
539
|
-
|
|
538
|
+
previous: "Onglets précédents",
|
|
540
539
|
},
|
|
541
540
|
appShell: {
|
|
542
541
|
collapse: "Réduire la barre latérale",
|
|
@@ -1186,7 +1185,6 @@ export function uiKitLabelsFr(numberLocale = "fr-FR"): UiKitLabels {
|
|
|
1186
1185
|
notifications: {
|
|
1187
1186
|
typesTitle: "Me notifier pour",
|
|
1188
1187
|
typesDescription: "Choisissez ce dont vous êtes averti, et comment.",
|
|
1189
|
-
byEmail: "Par e-mail",
|
|
1190
1188
|
channelApp: "Dans l’app",
|
|
1191
1189
|
channelPush: "Push",
|
|
1192
1190
|
channelEmail: "E-mail",
|
|
@@ -1210,9 +1208,6 @@ export function uiKitLabelsFr(numberLocale = "fr-FR"): UiKitLabels {
|
|
|
1210
1208
|
quietUntil: "Jusqu’à",
|
|
1211
1209
|
quietIncomplete:
|
|
1212
1210
|
"Définissez une heure de début et une heure de fin. Les heures calmes s’appliquent une fois les deux renseignées.",
|
|
1213
|
-
timeZone: "Fuseau horaire",
|
|
1214
|
-
deviceZone: (zone) => `Cet appareil est dans le fuseau ${zone}.`,
|
|
1215
|
-
useDeviceZone: "L’utiliser",
|
|
1216
1211
|
regions: {
|
|
1217
1212
|
Africa: "Afrique",
|
|
1218
1213
|
America: "Amériques",
|
package/src/i18n/locales/hu.ts
CHANGED
|
@@ -190,7 +190,6 @@ export function uiKitLabelsHu(numberLocale = "hu-HU"): UiKitLabels {
|
|
|
190
190
|
outcomeUpdate: "Frissítés",
|
|
191
191
|
outcomePlaceholder: "Mi készült el, mi a döntés, vagy miért nem valósul meg.",
|
|
192
192
|
rework: "Átdolgozás",
|
|
193
|
-
openPage: "Oldal megnyitása",
|
|
194
193
|
reworkTitle: "Visszaküldés átdolgozásra",
|
|
195
194
|
reworkSend: "Átdolgozás kérése",
|
|
196
195
|
reworkPlaceholder: "Min kell még finomítani? Új feltételek vagy irányváltás.",
|
|
@@ -526,7 +525,7 @@ export function uiKitLabelsHu(numberLocale = "hu-HU"): UiKitLabels {
|
|
|
526
525
|
add: "Lap hozzáadása",
|
|
527
526
|
remove: (tab) => `${tab} eltávolítása`,
|
|
528
527
|
more: "További lapok",
|
|
529
|
-
|
|
528
|
+
previous: "Előző lapok",
|
|
530
529
|
},
|
|
531
530
|
appShell: {
|
|
532
531
|
collapse: "Oldalsáv összecsukása",
|
|
@@ -1169,7 +1168,6 @@ export function uiKitLabelsHu(numberLocale = "hu-HU"): UiKitLabels {
|
|
|
1169
1168
|
notifications: {
|
|
1170
1169
|
typesTitle: "Értesítést kérek ezekről",
|
|
1171
1170
|
typesDescription: "Válassza ki, miről és hogyan kapjon értesítést.",
|
|
1172
|
-
byEmail: "E-mailben",
|
|
1173
1171
|
channelApp: "Az appban",
|
|
1174
1172
|
channelPush: "Push",
|
|
1175
1173
|
channelEmail: "E-mail",
|
|
@@ -1193,9 +1191,6 @@ export function uiKitLabelsHu(numberLocale = "hu-HU"): UiKitLabels {
|
|
|
1193
1191
|
quietUntil: "Eddig",
|
|
1194
1192
|
quietIncomplete:
|
|
1195
1193
|
"Adjon meg kezdő és záró időpontot is. A csendes órák csak akkor lépnek életbe, ha mindkettő be van állítva.",
|
|
1196
|
-
timeZone: "Időzóna",
|
|
1197
|
-
deviceZone: (zone) => `Ez az eszköz ebben az időzónában van: ${zone}.`,
|
|
1198
|
-
useDeviceZone: "Ezt használom",
|
|
1199
1194
|
regions: {
|
|
1200
1195
|
Africa: "Afrika",
|
|
1201
1196
|
America: "Amerika",
|
package/src/i18n/locales/it.ts
CHANGED
|
@@ -193,7 +193,6 @@ export function uiKitLabelsIt(numberLocale = "it-IT"): UiKitLabels {
|
|
|
193
193
|
outcomeUpdate: "Aggiorna",
|
|
194
194
|
outcomePlaceholder: "Cosa è stato fatto o deciso, oppure perché non verrà affrontato.",
|
|
195
195
|
rework: "Rielaborazione",
|
|
196
|
-
openPage: "Apri pagina",
|
|
197
196
|
reworkTitle: "Rimanda in rielaborazione",
|
|
198
197
|
reworkSend: "Richiedi rielaborazione",
|
|
199
198
|
reworkPlaceholder: "Cosa va ancora perfezionato? Eventuali nuovi vincoli o cambi di direzione.",
|
|
@@ -531,7 +530,7 @@ export function uiKitLabelsIt(numberLocale = "it-IT"): UiKitLabels {
|
|
|
531
530
|
add: "Aggiungi scheda",
|
|
532
531
|
remove: (tab) => `Rimuovi ${tab}`,
|
|
533
532
|
more: "Altre schede",
|
|
534
|
-
|
|
533
|
+
previous: "Schede precedenti",
|
|
535
534
|
},
|
|
536
535
|
appShell: {
|
|
537
536
|
collapse: "Comprimi barra laterale",
|
|
@@ -1170,7 +1169,6 @@ export function uiKitLabelsIt(numberLocale = "it-IT"): UiKitLabels {
|
|
|
1170
1169
|
notifications: {
|
|
1171
1170
|
typesTitle: "Avvisami per",
|
|
1172
1171
|
typesDescription: "Scelga di cosa essere avvisato, e come.",
|
|
1173
|
-
byEmail: "Per e-mail",
|
|
1174
1172
|
channelApp: "Nell’app",
|
|
1175
1173
|
channelPush: "Push",
|
|
1176
1174
|
channelEmail: "E-mail",
|
|
@@ -1194,9 +1192,6 @@ export function uiKitLabelsIt(numberLocale = "it-IT"): UiKitLabels {
|
|
|
1194
1192
|
quietUntil: "Alle",
|
|
1195
1193
|
quietIncomplete:
|
|
1196
1194
|
"Imposti sia l’ora di inizio sia quella di fine. Le ore di silenzio valgono solo quando sono impostate entrambe.",
|
|
1197
|
-
timeZone: "Fuso orario",
|
|
1198
|
-
deviceZone: (zone) => `Questo dispositivo è nel fuso ${zone}.`,
|
|
1199
|
-
useDeviceZone: "Usa questo",
|
|
1200
1195
|
regions: {
|
|
1201
1196
|
Africa: "Africa",
|
|
1202
1197
|
America: "Americhe",
|
package/src/i18n/locales/zh.ts
CHANGED
|
@@ -183,7 +183,6 @@ export function uiKitLabelsZh(numberLocale = "zh-CN"): UiKitLabels {
|
|
|
183
183
|
outcomeUpdate: "更新",
|
|
184
184
|
outcomePlaceholder: "做了什么、作出了什么决定,或为什么不予处理。",
|
|
185
185
|
rework: "返工",
|
|
186
|
-
openPage: "打开页面",
|
|
187
186
|
reworkTitle: "退回返工",
|
|
188
187
|
reworkSend: "提交返工",
|
|
189
188
|
reworkPlaceholder: "还有哪些需要完善?如有新的限制或方向调整,请一并说明。",
|
|
@@ -514,7 +513,7 @@ export function uiKitLabelsZh(numberLocale = "zh-CN"): UiKitLabels {
|
|
|
514
513
|
// Quoted, so the spacing rule holds whether the tab's name is Han or Latin.
|
|
515
514
|
remove: (tab) => `移除“${tab}”`,
|
|
516
515
|
more: "更多标签页",
|
|
517
|
-
|
|
516
|
+
previous: "之前的标签页",
|
|
518
517
|
},
|
|
519
518
|
appShell: {
|
|
520
519
|
collapse: "收起侧边栏",
|
|
@@ -1129,7 +1128,6 @@ export function uiKitLabelsZh(numberLocale = "zh-CN"): UiKitLabels {
|
|
|
1129
1128
|
notifications: {
|
|
1130
1129
|
typesTitle: "通知我以下内容",
|
|
1131
1130
|
typesDescription: "选择要接收哪些通知,以及接收方式。",
|
|
1132
|
-
byEmail: "通过电子邮件",
|
|
1133
1131
|
channelApp: "应用内",
|
|
1134
1132
|
channelPush: "推送",
|
|
1135
1133
|
channelEmail: "电子邮件",
|
|
@@ -1152,9 +1150,6 @@ export function uiKitLabelsZh(numberLocale = "zh-CN"): UiKitLabels {
|
|
|
1152
1150
|
quietFrom: "从",
|
|
1153
1151
|
quietUntil: "到",
|
|
1154
1152
|
quietIncomplete: "请同时设置开始和结束时间。两者都设置后,免打扰时段才会生效。",
|
|
1155
|
-
timeZone: "时区",
|
|
1156
|
-
deviceZone: (zone) => `此设备位于 ${zone} 时区。`,
|
|
1157
|
-
useDeviceZone: "使用此时区",
|
|
1158
1153
|
regions: {
|
|
1159
1154
|
Africa: "非洲",
|
|
1160
1155
|
America: "美洲",
|
package/src/i18n/review.ts
CHANGED
|
@@ -333,7 +333,6 @@ export const KIT_LABEL_SAMPLES: Readonly<Record<string, readonly (readonly unkno
|
|
|
333
333
|
"notifications.quietDescription": [[false], [true], [false, true], [true, true]],
|
|
334
334
|
"notifications.quietZone": [["{{zone}}"]],
|
|
335
335
|
"notifications.bellUnread": one,
|
|
336
|
-
"notifications.deviceZone": [["{{zone}}"]],
|
|
337
336
|
"notifications.iosInstall": [["{{app}}"]],
|
|
338
337
|
"notifications.testSent": one,
|
|
339
338
|
"notifications.explainerBody": [["{{app}}"]],
|
package/src/index.ts
CHANGED
|
@@ -567,7 +567,15 @@ export {
|
|
|
567
567
|
export type { DateFormatPreference, DateFormatOptions, ResolvedDateFormat } from "./lib/date-format";
|
|
568
568
|
export { DateFormatSetting } from "./components/date-format-setting";
|
|
569
569
|
export type { DateFormatSettingProps } from "./components/date-format-setting";
|
|
570
|
-
export {
|
|
570
|
+
export {
|
|
571
|
+
RowActions,
|
|
572
|
+
rowActionsColumn,
|
|
573
|
+
DEFAULT_ROW_ACTIONS_LABELS,
|
|
574
|
+
// 0.47.0 (keksdose N17): a hand-built table's actions heading and cell.
|
|
575
|
+
RowActionsHead,
|
|
576
|
+
ROW_ACTIONS_CELL_CLASS,
|
|
577
|
+
ROW_ACTIONS_HEAD_CLASS,
|
|
578
|
+
} from "./components/row-actions";
|
|
571
579
|
export type {
|
|
572
580
|
RowAction,
|
|
573
581
|
RowActionList,
|
|
@@ -576,6 +584,7 @@ export type {
|
|
|
576
584
|
RowActionsCollapse,
|
|
577
585
|
RowActionsSize,
|
|
578
586
|
RowActionsColumnOptions,
|
|
587
|
+
RowActionsHeadProps,
|
|
579
588
|
RowActionTone,
|
|
580
589
|
} from "./components/row-actions";
|
|
581
590
|
// 0.22.0: the inputs round (kastlan's, keksdose's and Kurvenschmiede's audits).
|
|
@@ -971,8 +980,6 @@ export { NotificationTypesSetting } from "./notifications/notification-types-set
|
|
|
971
980
|
export type { NotificationTypesSettingProps } from "./notifications/notification-types-setting";
|
|
972
981
|
export { QuietHoursSetting } from "./notifications/quiet-hours-setting";
|
|
973
982
|
export type { QuietHoursSettingProps } from "./notifications/quiet-hours-setting";
|
|
974
|
-
export { TimeZoneSelect, timeZoneOptions } from "./notifications/time-zone-select";
|
|
975
|
-
export type { TimeZoneSelectProps } from "./notifications/time-zone-select";
|
|
976
983
|
// 0.46 (docs/notifications-harmonization.md §10.1, §10.3): the inbox list, the bell and
|
|
977
984
|
// the device-zone report (the account's zone is automatic only, amended 2026-10-20).
|
|
978
985
|
export { NotificationInbox, INBOX_BADGE_INTERVAL } from "./notifications/notification-inbox";
|
|
@@ -20,7 +20,7 @@ export interface DeviceZoneReportOptions {
|
|
|
20
20
|
* This device's IANA zone ("Europe/Zurich"), or `"UTC"` where the runtime names none —
|
|
21
21
|
* the zone `useDeviceZoneReport` reports, which becomes the account's (§10.3, automatic
|
|
22
22
|
* only), and the one sign-up sends (`RegisterRequest.device_timezone`). Here since 0.46.1
|
|
23
|
-
* (keksdose N6)
|
|
23
|
+
* (keksdose N6).
|
|
24
24
|
*/
|
|
25
25
|
export function deviceTimeZone(): string {
|
|
26
26
|
try {
|
|
@@ -68,9 +68,6 @@ export interface NotificationSettingsPatch<Id extends string = string> {
|
|
|
68
68
|
digest_cadence?: DigestCadence;
|
|
69
69
|
quiet_hours_start?: string | null;
|
|
70
70
|
quiet_hours_end?: string | null;
|
|
71
|
-
/** @deprecated 0.46 — the zone is the account's, automatic only (§10.3), and server-kit 0.16 refuses it here;
|
|
72
|
-
* removed in 0.47. No kit card sends it. */
|
|
73
|
-
timezone?: string;
|
|
74
71
|
}
|
|
75
72
|
|
|
76
73
|
/** One registered push device, as `GET /notifications/devices` lists it (§3.5), oldest
|
|
@@ -21,7 +21,7 @@ export interface NotificationRegionLabels {
|
|
|
21
21
|
/**
|
|
22
22
|
* Every string the notification parts render — the `notifications` namespace of
|
|
23
23
|
* `<UiKitProvider labels>`, overridable per instance through `labels`: the types card,
|
|
24
|
-
* quiet hours
|
|
24
|
+
* quiet hours, this device's push, the device list, and the
|
|
25
25
|
* unsubscribe page. Cancel is `common.cancel`.
|
|
26
26
|
*/
|
|
27
27
|
export interface NotificationsLabels {
|
|
@@ -30,9 +30,6 @@ export interface NotificationsLabels {
|
|
|
30
30
|
typesTitle: string;
|
|
31
31
|
/** The line under it. */
|
|
32
32
|
typesDescription: string;
|
|
33
|
-
/** @deprecated 0.46 — the card's channels are columns now (`channelEmail`); removed in 0.47. Unused,
|
|
34
|
-
* kept so an app's override still type-checks. */
|
|
35
|
-
byEmail: string;
|
|
36
33
|
/** 0.46 (§10.2): the channel columns' headings, and each switch's name. */
|
|
37
34
|
channelApp: string;
|
|
38
35
|
channelPush: string;
|
|
@@ -64,17 +61,7 @@ export interface NotificationsLabels {
|
|
|
64
61
|
quietUntil: string;
|
|
65
62
|
/** One time set, the other not: quiet hours fail open until both are. */
|
|
66
63
|
quietIncomplete: string;
|
|
67
|
-
/** The zone
|
|
68
|
-
* @deprecated 0.46 — the zone is automatic (§10.3): only the deprecated `TimeZoneSelect` reads it, the
|
|
69
|
-
* 0.46 card does not; removed in 0.47. Kept so an app's override still type-checks. */
|
|
70
|
-
timeZone: string;
|
|
71
|
-
/** @deprecated 0.46 — the zone is automatic (§10.3), the card offers no device zone; removed in 0.47.
|
|
72
|
-
* Unused, kept so an app's override still type-checks. */
|
|
73
|
-
deviceZone: (zone: string) => string;
|
|
74
|
-
/** @deprecated 0.46 — the zone is automatic (§10.3), nothing to take; removed in 0.47. Unused, kept
|
|
75
|
-
* so an app's override still type-checks. */
|
|
76
|
-
useDeviceZone: string;
|
|
77
|
-
/** The zone's region headings, in the picker and in a zone's name ("Europe / Zurich"). */
|
|
64
|
+
/** The zone's region headings, in a zone's name ("Europe / Zurich"). */
|
|
78
65
|
regions: NotificationRegionLabels;
|
|
79
66
|
|
|
80
67
|
/* ── This device ────────────────────────────────────────────────────── */
|
|
@@ -187,7 +174,6 @@ export interface NotificationsLabels {
|
|
|
187
174
|
export const DEFAULT_NOTIFICATIONS_LABELS: NotificationsLabels = {
|
|
188
175
|
typesTitle: "Notify me about",
|
|
189
176
|
typesDescription: "Choose what you hear about, and how.",
|
|
190
|
-
byEmail: "By e-mail",
|
|
191
177
|
channelApp: "In the app",
|
|
192
178
|
channelPush: "Push",
|
|
193
179
|
channelEmail: "E-mail",
|
|
@@ -211,9 +197,6 @@ export const DEFAULT_NOTIFICATIONS_LABELS: NotificationsLabels = {
|
|
|
211
197
|
quietFrom: "From",
|
|
212
198
|
quietUntil: "Until",
|
|
213
199
|
quietIncomplete: "Set both a start and an end time. Quiet hours take effect once both are set.",
|
|
214
|
-
timeZone: "Time zone",
|
|
215
|
-
deviceZone: (zone) => `This device is in ${zone}.`,
|
|
216
|
-
useDeviceZone: "Use it",
|
|
217
200
|
regions: {
|
|
218
201
|
Africa: "Africa",
|
|
219
202
|
America: "Americas",
|
|
@@ -10,22 +10,29 @@ import { CARD_DESCRIPTION_CLASS } from "../settings/settings-card-classes";
|
|
|
10
10
|
import { SettingsCardTitle } from "../settings/settings-heading";
|
|
11
11
|
import { settle, useMounted } from "../account/account-parts";
|
|
12
12
|
import { describeFailure, FailureLine, useNotificationsLabels, useWriteOverlay } from "./notification-parts";
|
|
13
|
-
import type { NotificationsLabels } from "./notifications-labels";
|
|
13
|
+
import type { NotificationRegionLabels, NotificationsLabels } from "./notifications-labels";
|
|
14
14
|
import type { NotificationSettingsPatch } from "./notification-types";
|
|
15
|
-
import { zoneName } from "./time-zone-select";
|
|
16
15
|
|
|
17
16
|
/** The zone the server applies while no device ever reported one (§10.3): every app's. */
|
|
18
17
|
const DEFAULT_FALLBACK_ZONE = "Europe/Zurich";
|
|
19
18
|
|
|
19
|
+
/** A zone for a sentence: "Europe / Zurich", the region in the kit's words (`labels.regions`);
|
|
20
|
+
* a region the labels do not know keeps its IANA name, a zone with none ("UTC") is itself. */
|
|
21
|
+
function zoneName(zone: string, regions: NotificationRegionLabels): string {
|
|
22
|
+
const slash = zone.indexOf("/");
|
|
23
|
+
if (slash < 0) return zone;
|
|
24
|
+
const region = zone.slice(0, slash);
|
|
25
|
+
const named = Object.prototype.hasOwnProperty.call(regions, region)
|
|
26
|
+
? regions[region as keyof NotificationRegionLabels]
|
|
27
|
+
: region;
|
|
28
|
+
return `${named} / ${zone.slice(slash + 1).replace(/_/g, " ").replace(/\//g, " / ")}`;
|
|
29
|
+
}
|
|
30
|
+
|
|
20
31
|
export interface QuietHoursSettingProps extends Omit<ComponentPropsWithRef<"div">, "children" | "onChange"> {
|
|
21
32
|
/** The `GET`'s `quiet_hours_start`, `"HH:MM"`, or `null`. */
|
|
22
33
|
start: string | null;
|
|
23
34
|
/** The `GET`'s `quiet_hours_end`. */
|
|
24
35
|
end: string | null;
|
|
25
|
-
/** The zone the 0.36 card showed, an IANA name, or `null`.
|
|
26
|
-
* @deprecated 0.46 — pass `zone` (§10.3: the zone is the account's, automatic only); removed in 0.47.
|
|
27
|
-
* Shown read-only while `zone` is left out; the card no longer offers a picker. */
|
|
28
|
-
timezone?: string | null;
|
|
29
36
|
/**
|
|
30
37
|
* 0.46 (§10.3, amended 2026-10-20: automatic only): the account's zone — `/auth/me`'s
|
|
31
38
|
* `device_timezone`, the zone of the device last used; `null` while no device has
|
|
@@ -43,7 +50,7 @@ export interface QuietHoursSettingProps extends Omit<ComponentPropsWithRef<"div"
|
|
|
43
50
|
* rejects.
|
|
44
51
|
*/
|
|
45
52
|
onChange: (patch: NotificationSettingsPatch) => Promise<unknown> | void;
|
|
46
|
-
/** The zone named while
|
|
53
|
+
/** The zone named while `zone` names none: the one the server
|
|
47
54
|
* applies. Default `"Europe/Zurich"`, every app's. */
|
|
48
55
|
fallbackZone?: string;
|
|
49
56
|
/** The app keeps an inbox, and the description says a held push still reaches it. */
|
|
@@ -69,15 +76,13 @@ type QuietField = "quiet_hours_start" | "quiet_hours_end";
|
|
|
69
76
|
*
|
|
70
77
|
* - **Two times**, each saved as it is entered; a cleared time sends `null`. While only
|
|
71
78
|
* one is set the card says so: the window fails open until both are.
|
|
72
|
-
* - **The zone** shows while a time is set: `zone`, else
|
|
73
|
-
* `fallbackZone`.
|
|
79
|
+
* - **The zone** shows while a time is set: `zone`, else `fallbackZone`.
|
|
74
80
|
*
|
|
75
81
|
* Under a write lock the fields are `commit` controls exempt from billing.
|
|
76
82
|
*/
|
|
77
83
|
export function QuietHoursSetting({
|
|
78
84
|
start,
|
|
79
85
|
end,
|
|
80
|
-
timezone = null,
|
|
81
86
|
zone,
|
|
82
87
|
held = false,
|
|
83
88
|
onChange,
|
|
@@ -99,7 +104,7 @@ export function QuietHoursSetting({
|
|
|
99
104
|
overlay.has(field) ? (overlay.get(field) ?? null) : server;
|
|
100
105
|
const startShown = shown("quiet_hours_start", start);
|
|
101
106
|
const endShown = shown("quiet_hours_end", end);
|
|
102
|
-
const accountZone =
|
|
107
|
+
const accountZone = zone ?? fallbackZone;
|
|
103
108
|
|
|
104
109
|
const save = (patch: NotificationSettingsPatch) => {
|
|
105
110
|
const fields = Object.keys(patch) as QuietField[];
|
package/src/theme/theme-store.ts
CHANGED
|
@@ -47,20 +47,28 @@ function preferenceFromState(
|
|
|
47
47
|
return "system";
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* Toggle the `.dark` class on <html> for a resolved light/dark mode, and say the same
|
|
52
|
+
* to the BROWSER through `color-scheme` (0.47, keksdose dev #600): the class switches
|
|
53
|
+
* the kit's tokens, but everything the browser paints itself — a native `<select>`'s
|
|
54
|
+
* open list, a date input's popup, scrollbars, autofill — follows `color-scheme` only,
|
|
55
|
+
* and stayed light on the dark theme. Inline on <html>, so it holds whatever an app's
|
|
56
|
+
* stylesheet says, and it is set by the pre-paint {@link applyPersistedTheme} too.
|
|
57
|
+
*/
|
|
51
58
|
function applyThemeClass(mode: ThemeMode): void {
|
|
52
59
|
const root = document.documentElement;
|
|
53
60
|
if (mode === "dark") root.classList.add("dark");
|
|
54
61
|
else root.classList.remove("dark");
|
|
62
|
+
root.style.colorScheme = mode;
|
|
55
63
|
}
|
|
56
64
|
|
|
57
65
|
/**
|
|
58
66
|
* Pre-hydration: read the theme PREFERENCE persisted under `storageKey` straight
|
|
59
67
|
* from localStorage, resolve it to a concrete light/dark mode, and toggle the
|
|
60
|
-
* `.dark` class on <html> — BEFORE React and the store mount,
|
|
61
|
-
* already has the right theme (no flash). Returns the resolved
|
|
62
|
-
* can chain {@link applyPersistedPalette}. Encapsulates the
|
|
63
|
-
* envelope + the legacy `mode`→`preference` fallback so apps never re-type the
|
|
68
|
+
* `.dark` class (and `color-scheme`) on <html> — BEFORE React and the store mount,
|
|
69
|
+
* so the first paint already has the right theme (no flash). Returns the resolved
|
|
70
|
+
* mode so the caller can chain {@link applyPersistedPalette}. Encapsulates the
|
|
71
|
+
* zustand-persist envelope + the legacy `mode`→`preference` fallback so apps never re-type the
|
|
64
72
|
* storage shape in their entrypoint.
|
|
65
73
|
*/
|
|
66
74
|
export function applyPersistedTheme(storageKey: string): ThemeMode {
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
2
|
-
import type { LabelOverride } from "../i18n/kit-labels.js";
|
|
3
|
-
import type { ComboOption } from "../components/combobox-core.js";
|
|
4
|
-
import type { CommitScope } from "../components/write-lock.js";
|
|
5
|
-
import type { NotificationRegionLabels, NotificationsLabels } from "./notifications-labels.js";
|
|
6
|
-
/**
|
|
7
|
-
* This device's IANA zone — the same function as the package root's, which lives beside
|
|
8
|
-
* `useDeviceZoneReport` now (0.46.1).
|
|
9
|
-
* @deprecated 0.46 — import `deviceTimeZone` from `@eifi1/ui-kit` (notifications/device-zone-report); this
|
|
10
|
-
* module is removed in 0.47.
|
|
11
|
-
*/
|
|
12
|
-
export declare const deviceTimeZone: () => string;
|
|
13
|
-
/**
|
|
14
|
-
* The zone picker's rows (keksdose `notifications-card.tsx:131-146`): every zone `Intl`
|
|
15
|
-
* lists, as its city ("Argentina / Buenos Aires") under its region, the region named by
|
|
16
|
-
* `regionLabel` — which answers `undefined` for a region it does not know, and the region
|
|
17
|
-
* keeps its IANA name. A zone with no region ("UTC") comes first, ahead of every heading,
|
|
18
|
-
* rather than trailing the last group as if it were Pacific. `current` is kept even when
|
|
19
|
-
* the runtime does not list it (an old alias such as "Europe/Kiev"): a picker without its
|
|
20
|
-
* own value would show an empty field.
|
|
21
|
-
* @deprecated 0.46 — the zone is automatic (§10.3, amended 2026-10-20), no app picks one; removed in 0.47.
|
|
22
|
-
*/
|
|
23
|
-
export declare function timeZoneOptions(current: string, regionLabel: (region: string) => string | undefined): ComboOption<string>[];
|
|
24
|
-
/** The region's name in `regions`, or `undefined` for one the labels do not know.
|
|
25
|
-
* @internal Not part of the barrel. */
|
|
26
|
-
export declare function regionName(regions: NotificationRegionLabels, region: string): string | undefined;
|
|
27
|
-
/** A zone as the picker shows it, for a sentence: "Europe / Zurich", the region in the
|
|
28
|
-
* kit's words. @internal Not part of the barrel. */
|
|
29
|
-
export declare function zoneName(zone: string, regions: NotificationRegionLabels): string;
|
|
30
|
-
/** @deprecated 0.46 — the zone is automatic (§10.3, amended 2026-10-20), no app picks one; removed in 0.47. */
|
|
31
|
-
export interface TimeZoneSelectProps {
|
|
32
|
-
/** The IANA zone. Not clearable: a zone can be changed, never emptied. */
|
|
33
|
-
value: string;
|
|
34
|
-
/** The zone picked. Never called for the value it already has. */
|
|
35
|
-
onChange: (zone: string) => void;
|
|
36
|
-
/** Default `labels.timeZone`. */
|
|
37
|
-
label?: ReactNode;
|
|
38
|
-
disabled?: boolean;
|
|
39
|
-
/** The input's id. */
|
|
40
|
-
id?: string;
|
|
41
|
-
className?: string;
|
|
42
|
-
/** The picker SAVES on change (quiet hours do): locked under a write lock in scope. */
|
|
43
|
-
commit?: CommitScope;
|
|
44
|
-
labels?: LabelOverride<NotificationsLabels>;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* An IANA time zone, searchable (docs/notifications-harmonization.md §4.2, keksdose's
|
|
48
|
-
* quiet-hours picker): type "Zur" for Europe/Zurich, and on a phone the kit's sheet with
|
|
49
|
-
* a search box instead of a 400-row wheel. Rows are the city under its region, the region
|
|
50
|
-
* in the kit's words (`labels.regions`); a zone with no region first; a stored zone the
|
|
51
|
-
* runtime does not list is kept. On the kit's {@link InlineEntityCombobox}.
|
|
52
|
-
* @deprecated 0.46 — the zone is automatic (§10.3, amended 2026-10-20), no app picks one; removed in 0.47.
|
|
53
|
-
*/
|
|
54
|
-
export declare function TimeZoneSelect({ value, onChange, label, disabled, id, className, commit, labels: labelsProp, }: TimeZoneSelectProps): import("react").JSX.Element;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { useMemo } from "react";
|
|
4
|
-
import { InlineEntityCombobox } from "../components/inline-entity-combobox.js";
|
|
5
|
-
import { deviceTimeZone as zoneOfDevice } from "./device-zone-report.js";
|
|
6
|
-
import { useNotificationsLabels } from "./notification-parts.js";
|
|
7
|
-
const deviceTimeZone = zoneOfDevice;
|
|
8
|
-
function runtimeZones() {
|
|
9
|
-
const intl = Intl;
|
|
10
|
-
return typeof intl.supportedValuesOf === "function" ? intl.supportedValuesOf("timeZone") : [];
|
|
11
|
-
}
|
|
12
|
-
function cityOf(rest) {
|
|
13
|
-
return rest.replace(/_/g, " ").replace(/\//g, " / ");
|
|
14
|
-
}
|
|
15
|
-
function timeZoneOptions(current, regionLabel) {
|
|
16
|
-
const zones = runtimeZones();
|
|
17
|
-
const all = !current || zones.includes(current) ? zones : [...zones, current].sort();
|
|
18
|
-
const rows = all.map((zone) => {
|
|
19
|
-
const slash = zone.indexOf("/");
|
|
20
|
-
if (slash < 0) return { value: zone, label: zone };
|
|
21
|
-
const region = zone.slice(0, slash);
|
|
22
|
-
return { value: zone, label: cityOf(zone.slice(slash + 1)), group: regionLabel(region) ?? region };
|
|
23
|
-
});
|
|
24
|
-
return [...rows.filter((row) => !row.group), ...rows.filter((row) => row.group)];
|
|
25
|
-
}
|
|
26
|
-
function regionName(regions, region) {
|
|
27
|
-
return Object.prototype.hasOwnProperty.call(regions, region) ? regions[region] : void 0;
|
|
28
|
-
}
|
|
29
|
-
function zoneName(zone, regions) {
|
|
30
|
-
const slash = zone.indexOf("/");
|
|
31
|
-
if (slash < 0) return zone;
|
|
32
|
-
const region = zone.slice(0, slash);
|
|
33
|
-
return `${regionName(regions, region) ?? region} / ${cityOf(zone.slice(slash + 1))}`;
|
|
34
|
-
}
|
|
35
|
-
function TimeZoneSelect({
|
|
36
|
-
value,
|
|
37
|
-
onChange,
|
|
38
|
-
label,
|
|
39
|
-
disabled,
|
|
40
|
-
id,
|
|
41
|
-
className,
|
|
42
|
-
commit,
|
|
43
|
-
labels: labelsProp
|
|
44
|
-
}) {
|
|
45
|
-
const labels = useNotificationsLabels(labelsProp);
|
|
46
|
-
const { regions } = labels;
|
|
47
|
-
const options = useMemo(() => timeZoneOptions(value, (region) => regionName(regions, region)), [value, regions]);
|
|
48
|
-
return /* @__PURE__ */ jsx(
|
|
49
|
-
InlineEntityCombobox,
|
|
50
|
-
{
|
|
51
|
-
id,
|
|
52
|
-
label: label ?? labels.timeZone,
|
|
53
|
-
value,
|
|
54
|
-
options,
|
|
55
|
-
disabled,
|
|
56
|
-
commit,
|
|
57
|
-
onChange: (zone) => {
|
|
58
|
-
if (zone && zone !== value) onChange(zone);
|
|
59
|
-
},
|
|
60
|
-
className
|
|
61
|
-
}
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
export {
|
|
65
|
-
TimeZoneSelect,
|
|
66
|
-
deviceTimeZone,
|
|
67
|
-
regionName,
|
|
68
|
-
timeZoneOptions,
|
|
69
|
-
zoneName
|
|
70
|
-
};
|
|
71
|
-
//# sourceMappingURL=time-zone-select.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/notifications/time-zone-select.tsx"],"sourcesContent":["import { useMemo } from \"react\";\nimport type { ReactNode } from \"react\";\n\nimport type { LabelOverride } from \"../i18n/kit-labels\";\nimport type { ComboOption } from \"../components/combobox-core\";\nimport { InlineEntityCombobox } from \"../components/inline-entity-combobox\";\nimport type { CommitScope } from \"../components/write-lock\";\nimport { deviceTimeZone as zoneOfDevice } from \"./device-zone-report\";\nimport { useNotificationsLabels } from \"./notification-parts\";\nimport type { NotificationRegionLabels, NotificationsLabels } from \"./notifications-labels\";\n\n/**\n * This device's IANA zone — the same function as the package root's, which lives beside\n * `useDeviceZoneReport` now (0.46.1).\n * @deprecated 0.46 — import `deviceTimeZone` from `@eifi1/ui-kit` (notifications/device-zone-report); this\n * module is removed in 0.47.\n */\nexport const deviceTimeZone: () => string = zoneOfDevice;\n\n/** Every zone the runtime lists; `[]` where `Intl.supportedValuesOf` is missing. */\nfunction runtimeZones(): string[] {\n const intl = Intl as typeof Intl & { supportedValuesOf?: (key: \"timeZone\") => string[] };\n return typeof intl.supportedValuesOf === \"function\" ? intl.supportedValuesOf(\"timeZone\") : [];\n}\n\n/** \"Argentina/Buenos_Aires\" → \"Argentina / Buenos Aires\": the zone's city, as a row. */\nfunction cityOf(rest: string): string {\n return rest.replace(/_/g, \" \").replace(/\\//g, \" / \");\n}\n\n/**\n * The zone picker's rows (keksdose `notifications-card.tsx:131-146`): every zone `Intl`\n * lists, as its city (\"Argentina / Buenos Aires\") under its region, the region named by\n * `regionLabel` — which answers `undefined` for a region it does not know, and the region\n * keeps its IANA name. A zone with no region (\"UTC\") comes first, ahead of every heading,\n * rather than trailing the last group as if it were Pacific. `current` is kept even when\n * the runtime does not list it (an old alias such as \"Europe/Kiev\"): a picker without its\n * own value would show an empty field.\n * @deprecated 0.46 — the zone is automatic (§10.3, amended 2026-10-20), no app picks one; removed in 0.47.\n */\nexport function timeZoneOptions(\n current: string,\n regionLabel: (region: string) => string | undefined,\n): ComboOption<string>[] {\n const zones = runtimeZones();\n const all = !current || zones.includes(current) ? zones : [...zones, current].sort();\n const rows = all.map((zone): ComboOption<string> => {\n const slash = zone.indexOf(\"/\");\n if (slash < 0) return { value: zone, label: zone };\n const region = zone.slice(0, slash);\n return { value: zone, label: cityOf(zone.slice(slash + 1)), group: regionLabel(region) ?? region };\n });\n return [...rows.filter((row) => !row.group), ...rows.filter((row) => row.group)];\n}\n\n/** The region's name in `regions`, or `undefined` for one the labels do not know.\n * @internal Not part of the barrel. */\nexport function regionName(regions: NotificationRegionLabels, region: string): string | undefined {\n return Object.prototype.hasOwnProperty.call(regions, region)\n ? regions[region as keyof NotificationRegionLabels]\n : undefined;\n}\n\n/** A zone as the picker shows it, for a sentence: \"Europe / Zurich\", the region in the\n * kit's words. @internal Not part of the barrel. */\nexport function zoneName(zone: string, regions: NotificationRegionLabels): string {\n const slash = zone.indexOf(\"/\");\n if (slash < 0) return zone;\n const region = zone.slice(0, slash);\n return `${regionName(regions, region) ?? region} / ${cityOf(zone.slice(slash + 1))}`;\n}\n\n/** @deprecated 0.46 — the zone is automatic (§10.3, amended 2026-10-20), no app picks one; removed in 0.47. */\nexport interface TimeZoneSelectProps {\n /** The IANA zone. Not clearable: a zone can be changed, never emptied. */\n value: string;\n /** The zone picked. Never called for the value it already has. */\n onChange: (zone: string) => void;\n /** Default `labels.timeZone`. */\n label?: ReactNode;\n disabled?: boolean;\n /** The input's id. */\n id?: string;\n className?: string;\n /** The picker SAVES on change (quiet hours do): locked under a write lock in scope. */\n commit?: CommitScope;\n labels?: LabelOverride<NotificationsLabels>;\n}\n\n/**\n * An IANA time zone, searchable (docs/notifications-harmonization.md §4.2, keksdose's\n * quiet-hours picker): type \"Zur\" for Europe/Zurich, and on a phone the kit's sheet with\n * a search box instead of a 400-row wheel. Rows are the city under its region, the region\n * in the kit's words (`labels.regions`); a zone with no region first; a stored zone the\n * runtime does not list is kept. On the kit's {@link InlineEntityCombobox}.\n * @deprecated 0.46 — the zone is automatic (§10.3, amended 2026-10-20), no app picks one; removed in 0.47.\n */\nexport function TimeZoneSelect({\n value,\n onChange,\n label,\n disabled,\n id,\n className,\n commit,\n labels: labelsProp,\n}: TimeZoneSelectProps) {\n const labels = useNotificationsLabels(labelsProp);\n const { regions } = labels;\n const options = useMemo(() => timeZoneOptions(value, (region) => regionName(regions, region)), [value, regions]);\n return (\n <InlineEntityCombobox<string>\n id={id}\n label={label ?? labels.timeZone}\n value={value}\n options={options}\n disabled={disabled}\n commit={commit}\n onChange={(zone) => {\n if (zone && zone !== value) onChange(zone);\n }}\n className={className}\n />\n );\n}\n"],"mappings":";AA+GI;AA/GJ,SAAS,eAAe;AAKxB,SAAS,4BAA4B;AAErC,SAAS,kBAAkB,oBAAoB;AAC/C,SAAS,8BAA8B;AAShC,MAAM,iBAA+B;AAG5C,SAAS,eAAyB;AAChC,QAAM,OAAO;AACb,SAAO,OAAO,KAAK,sBAAsB,aAAa,KAAK,kBAAkB,UAAU,IAAI,CAAC;AAC9F;AAGA,SAAS,OAAO,MAAsB;AACpC,SAAO,KAAK,QAAQ,MAAM,GAAG,EAAE,QAAQ,OAAO,KAAK;AACrD;AAYO,SAAS,gBACd,SACA,aACuB;AACvB,QAAM,QAAQ,aAAa;AAC3B,QAAM,MAAM,CAAC,WAAW,MAAM,SAAS,OAAO,IAAI,QAAQ,CAAC,GAAG,OAAO,OAAO,EAAE,KAAK;AACnF,QAAM,OAAO,IAAI,IAAI,CAAC,SAA8B;AAClD,UAAM,QAAQ,KAAK,QAAQ,GAAG;AAC9B,QAAI,QAAQ,EAAG,QAAO,EAAE,OAAO,MAAM,OAAO,KAAK;AACjD,UAAM,SAAS,KAAK,MAAM,GAAG,KAAK;AAClC,WAAO,EAAE,OAAO,MAAM,OAAO,OAAO,KAAK,MAAM,QAAQ,CAAC,CAAC,GAAG,OAAO,YAAY,MAAM,KAAK,OAAO;AAAA,EACnG,CAAC;AACD,SAAO,CAAC,GAAG,KAAK,OAAO,CAAC,QAAQ,CAAC,IAAI,KAAK,GAAG,GAAG,KAAK,OAAO,CAAC,QAAQ,IAAI,KAAK,CAAC;AACjF;AAIO,SAAS,WAAW,SAAmC,QAAoC;AAChG,SAAO,OAAO,UAAU,eAAe,KAAK,SAAS,MAAM,IACvD,QAAQ,MAAwC,IAChD;AACN;AAIO,SAAS,SAAS,MAAc,SAA2C;AAChF,QAAM,QAAQ,KAAK,QAAQ,GAAG;AAC9B,MAAI,QAAQ,EAAG,QAAO;AACtB,QAAM,SAAS,KAAK,MAAM,GAAG,KAAK;AAClC,SAAO,GAAG,WAAW,SAAS,MAAM,KAAK,MAAM,MAAM,OAAO,KAAK,MAAM,QAAQ,CAAC,CAAC,CAAC;AACpF;AA2BO,SAAS,eAAe;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AACV,GAAwB;AACtB,QAAM,SAAS,uBAAuB,UAAU;AAChD,QAAM,EAAE,QAAQ,IAAI;AACpB,QAAM,UAAU,QAAQ,MAAM,gBAAgB,OAAO,CAAC,WAAW,WAAW,SAAS,MAAM,CAAC,GAAG,CAAC,OAAO,OAAO,CAAC;AAC/G,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,OAAO,SAAS,OAAO;AAAA,MACvB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,UAAU,CAAC,SAAS;AAClB,YAAI,QAAQ,SAAS,MAAO,UAAS,IAAI;AAAA,MAC3C;AAAA,MACA;AAAA;AAAA,EACF;AAEJ;","names":[]}
|