@cossistant/react 0.0.4 → 0.0.6
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 +27 -0
- package/_virtual/rolldown_runtime.js +19 -0
- package/conversation.d.ts +23 -0
- package/conversation.d.ts.map +1 -1
- package/hooks/index.d.ts +5 -3
- package/hooks/index.js +7 -5
- package/hooks/private/store/use-conversations-store.d.ts +8 -0
- package/hooks/private/store/use-conversations-store.d.ts.map +1 -1
- package/hooks/private/store/use-conversations-store.js +8 -0
- package/hooks/private/store/use-conversations-store.js.map +1 -1
- package/hooks/private/store/use-store-selector.d.ts +4 -0
- package/hooks/private/store/use-store-selector.d.ts.map +1 -1
- package/hooks/private/store/use-store-selector.js +5 -2
- package/hooks/private/store/use-store-selector.js.map +1 -1
- package/hooks/private/store/use-website-store.d.ts +4 -0
- package/hooks/private/store/use-website-store.d.ts.map +1 -1
- package/hooks/private/store/use-website-store.js +6 -3
- package/hooks/private/store/use-website-store.js.map +1 -1
- package/hooks/private/typing.d.ts +35 -0
- package/hooks/private/typing.d.ts.map +1 -0
- package/hooks/private/typing.js +49 -0
- package/hooks/private/typing.js.map +1 -0
- package/hooks/private/use-client-query.d.ts +5 -0
- package/hooks/private/use-client-query.d.ts.map +1 -1
- package/hooks/private/use-client-query.js +5 -0
- package/hooks/private/use-client-query.js.map +1 -1
- package/hooks/private/use-grouped-messages.d.ts +10 -4
- package/hooks/private/use-grouped-messages.d.ts.map +1 -1
- package/hooks/private/use-grouped-messages.js +24 -4
- package/hooks/private/use-grouped-messages.js.map +1 -1
- package/hooks/private/use-multimodal-input.d.ts.map +1 -1
- package/hooks/private/use-rest-client.d.ts.map +1 -1
- package/hooks/private/use-visitor-typing-reporter.d.ts +6 -0
- package/hooks/private/use-visitor-typing-reporter.d.ts.map +1 -1
- package/hooks/private/use-visitor-typing-reporter.js +6 -0
- package/hooks/private/use-visitor-typing-reporter.js.map +1 -1
- package/hooks/use-composer-refocus.d.ts.map +1 -1
- package/hooks/use-conversation-auto-seen.d.ts +9 -0
- package/hooks/use-conversation-auto-seen.d.ts.map +1 -1
- package/hooks/use-conversation-auto-seen.js +44 -3
- package/hooks/use-conversation-auto-seen.js.map +1 -1
- package/hooks/use-conversation-history-page.d.ts.map +1 -1
- package/hooks/use-conversation-history-page.js +16 -18
- package/hooks/use-conversation-history-page.js.map +1 -1
- package/hooks/use-conversation-lifecycle.d.ts.map +1 -1
- package/hooks/use-conversation-lifecycle.js +2 -4
- package/hooks/use-conversation-lifecycle.js.map +1 -1
- package/hooks/use-conversation-page.d.ts +6 -0
- package/hooks/use-conversation-page.d.ts.map +1 -1
- package/hooks/use-conversation-page.js +41 -3
- package/hooks/use-conversation-page.js.map +1 -1
- package/hooks/use-conversation-preview.d.ts +61 -0
- package/hooks/use-conversation-preview.d.ts.map +1 -0
- package/hooks/use-conversation-preview.js +173 -0
- package/hooks/use-conversation-preview.js.map +1 -0
- package/hooks/use-conversation-seen.d.ts +4 -0
- package/hooks/use-conversation-seen.d.ts.map +1 -1
- package/hooks/use-conversation-seen.js +4 -0
- package/hooks/use-conversation-seen.js.map +1 -1
- package/hooks/use-conversation-timeline-items.d.ts +4 -0
- package/hooks/use-conversation-timeline-items.d.ts.map +1 -1
- package/hooks/use-conversation-timeline-items.js +4 -0
- package/hooks/use-conversation-timeline-items.js.map +1 -1
- package/hooks/use-conversation-timeline.d.ts +32 -0
- package/hooks/use-conversation-timeline.d.ts.map +1 -0
- package/hooks/use-conversation-timeline.js +41 -0
- package/hooks/use-conversation-timeline.js.map +1 -0
- package/hooks/use-conversation-typing.d.ts +4 -0
- package/hooks/use-conversation-typing.d.ts.map +1 -1
- package/hooks/use-conversation-typing.js +4 -0
- package/hooks/use-conversation-typing.js.map +1 -1
- package/hooks/use-conversation.d.ts +11 -0
- package/hooks/use-conversation.d.ts.map +1 -1
- package/hooks/use-conversation.js +11 -0
- package/hooks/use-conversation.js.map +1 -1
- package/hooks/use-conversations.d.ts +12 -0
- package/hooks/use-conversations.d.ts.map +1 -1
- package/hooks/use-conversations.js +12 -0
- package/hooks/use-conversations.js.map +1 -1
- package/hooks/use-create-conversation.d.ts +5 -0
- package/hooks/use-create-conversation.d.ts.map +1 -1
- package/hooks/use-create-conversation.js +12 -9
- package/hooks/use-create-conversation.js.map +1 -1
- package/hooks/use-home-page.d.ts.map +1 -1
- package/hooks/use-home-page.js +6 -4
- package/hooks/use-home-page.js.map +1 -1
- package/hooks/use-message-composer.d.ts.map +1 -1
- package/hooks/use-realtime-support.d.ts.map +1 -1
- package/hooks/use-send-message.d.ts +9 -0
- package/hooks/use-send-message.d.ts.map +1 -1
- package/hooks/use-send-message.js +15 -13
- package/hooks/use-send-message.js.map +1 -1
- package/hooks/use-visitor.d.ts.map +1 -1
- package/hooks/use-visitor.js +28 -30
- package/hooks/use-visitor.js.map +1 -1
- package/hooks/use-window-visibility-focus.d.ts +4 -0
- package/hooks/use-window-visibility-focus.d.ts.map +1 -1
- package/hooks/use-window-visibility-focus.js +5 -2
- package/hooks/use-window-visibility-focus.js.map +1 -1
- package/identify-visitor.d.ts +12 -3
- package/identify-visitor.d.ts.map +1 -1
- package/identify-visitor.js +58 -9
- package/identify-visitor.js.map +1 -1
- package/index.d.ts +10 -7
- package/index.js +10 -9
- package/package.json +12 -16
- package/primitives/avatar/avatar.d.ts.map +1 -1
- package/primitives/avatar/fallback.d.ts.map +1 -1
- package/primitives/avatar/fallback.js +1 -3
- package/primitives/avatar/fallback.js.map +1 -1
- package/primitives/avatar/image.d.ts.map +1 -1
- package/primitives/avatar/index.d.ts +1 -0
- package/primitives/bubble.d.ts +2 -0
- package/primitives/bubble.d.ts.map +1 -1
- package/primitives/bubble.js +8 -2
- package/primitives/bubble.js.map +1 -1
- package/primitives/button.d.ts.map +1 -1
- package/primitives/conversation-timeline.d.ts.map +1 -1
- package/primitives/conversation-timeline.js +58 -5
- package/primitives/conversation-timeline.js.map +1 -1
- package/primitives/index.d.ts +1 -0
- package/primitives/index.parts.d.ts +1 -0
- package/primitives/multimodal-input.d.ts.map +1 -1
- package/primitives/timeline-item-group.d.ts +7 -7
- package/primitives/timeline-item-group.d.ts.map +1 -1
- package/primitives/timeline-item-group.js.map +1 -1
- package/primitives/timeline-item.d.ts +1 -1
- package/primitives/timeline-item.d.ts.map +1 -1
- package/primitives/timeline-item.js +7 -1
- package/primitives/timeline-item.js.map +1 -1
- package/primitives/window.d.ts +1 -1
- package/primitives/window.d.ts.map +1 -1
- package/primitives/window.js +4 -4
- package/primitives/window.js.map +1 -1
- package/provider.d.ts +23 -43
- package/provider.d.ts.map +1 -1
- package/provider.js +152 -49
- package/provider.js.map +1 -1
- package/realtime/event-filter.d.ts +4 -0
- package/realtime/event-filter.d.ts.map +1 -1
- package/realtime/event-filter.js +4 -0
- package/realtime/event-filter.js.map +1 -1
- package/realtime/index.js +1 -1
- package/realtime/provider.d.ts +7 -2
- package/realtime/provider.d.ts.map +1 -1
- package/realtime/provider.js +23 -1
- package/realtime/provider.js.map +1 -1
- package/realtime/seen-store.d.ts +13 -0
- package/realtime/seen-store.d.ts.map +1 -1
- package/realtime/seen-store.js +14 -2
- package/realtime/seen-store.js.map +1 -1
- package/realtime/support-provider.d.ts +1 -2
- package/realtime/support-provider.d.ts.map +1 -1
- package/realtime/support-provider.js +19 -20
- package/realtime/support-provider.js.map +1 -1
- package/realtime/typing-store.d.ts +18 -0
- package/realtime/typing-store.d.ts.map +1 -1
- package/realtime/typing-store.js +19 -2
- package/realtime/typing-store.js.map +1 -1
- package/realtime/use-realtime.d.ts +8 -4
- package/realtime/use-realtime.d.ts.map +1 -1
- package/realtime/use-realtime.js +4 -0
- package/realtime/use-realtime.js.map +1 -1
- package/realtime-events.d.ts +15 -1
- package/realtime-events.d.ts.map +1 -1
- package/schemas.d.ts +6 -0
- package/schemas.d.ts.map +1 -1
- package/support/components/avatar-stack.d.ts +8 -4
- package/support/components/avatar-stack.d.ts.map +1 -1
- package/support/components/avatar-stack.js +4 -0
- package/support/components/avatar-stack.js.map +1 -1
- package/support/components/avatar.d.ts +11 -6
- package/support/components/avatar.d.ts.map +1 -1
- package/support/components/avatar.js +4 -0
- package/support/components/avatar.js.map +1 -1
- package/support/components/bubble.d.ts.map +1 -1
- package/support/components/bubble.js +29 -6
- package/support/components/bubble.js.map +1 -1
- package/support/components/button.d.ts +8 -5
- package/support/components/button.d.ts.map +1 -1
- package/support/components/button.js +5 -1
- package/support/components/button.js.map +1 -1
- package/support/components/container.d.ts +0 -1
- package/support/components/container.d.ts.map +1 -1
- package/support/components/container.js +2 -8
- package/support/components/container.js.map +1 -1
- package/support/components/conversation-button-link.d.ts +8 -21
- package/support/components/conversation-button-link.d.ts.map +1 -1
- package/support/components/conversation-button-link.js +62 -178
- package/support/components/conversation-button-link.js.map +1 -1
- package/support/components/conversation-event.d.ts.map +1 -1
- package/support/components/conversation-event.js +4 -0
- package/support/components/conversation-event.js.map +1 -1
- package/support/components/conversation-timeline.d.ts +10 -1
- package/support/components/conversation-timeline.d.ts.map +1 -1
- package/support/components/conversation-timeline.js +63 -57
- package/support/components/conversation-timeline.js.map +1 -1
- package/support/components/cossistant-branding.d.ts +5 -2
- package/support/components/cossistant-branding.d.ts.map +1 -1
- package/support/components/cossistant-branding.js +3 -0
- package/support/components/cossistant-branding.js.map +1 -1
- package/support/components/header.d.ts.map +1 -1
- package/support/components/header.js +2 -2
- package/support/components/header.js.map +1 -1
- package/support/components/icons.d.ts.map +1 -1
- package/support/components/multimodal-input.d.ts.map +1 -1
- package/support/components/multimodal-input.js +5 -24
- package/support/components/multimodal-input.js.map +1 -1
- package/support/components/navigation-tab.d.ts +7 -2
- package/support/components/navigation-tab.d.ts.map +1 -1
- package/support/components/navigation-tab.js +4 -0
- package/support/components/navigation-tab.js.map +1 -1
- package/support/components/support-content.d.ts +1 -1
- package/support/components/support-content.d.ts.map +1 -1
- package/support/components/support-content.js +7 -10
- package/support/components/support-content.js.map +1 -1
- package/support/components/text-effect.d.ts +5 -2
- package/support/components/text-effect.d.ts.map +1 -1
- package/support/components/text-effect.js +4 -0
- package/support/components/text-effect.js.map +1 -1
- package/support/components/timeline-identification-tool.d.ts +7 -0
- package/support/components/timeline-identification-tool.d.ts.map +1 -0
- package/support/components/timeline-identification-tool.js +139 -0
- package/support/components/timeline-identification-tool.js.map +1 -0
- package/support/components/timeline-message-group.d.ts +2 -1
- package/support/components/timeline-message-group.d.ts.map +1 -1
- package/support/components/timeline-message-group.js +4 -19
- package/support/components/timeline-message-group.js.map +1 -1
- package/support/components/timeline-message-item.d.ts +6 -2
- package/support/components/timeline-message-item.d.ts.map +1 -1
- package/support/components/timeline-message-item.js +8 -4
- package/support/components/timeline-message-item.js.map +1 -1
- package/support/components/typing-indicator.d.ts +5 -2
- package/support/components/typing-indicator.d.ts.map +1 -1
- package/support/components/typing-indicator.js +4 -4
- package/support/components/typing-indicator.js.map +1 -1
- package/support/components/watermark.d.ts.map +1 -1
- package/support/context/websocket.d.ts +8 -0
- package/support/context/websocket.d.ts.map +1 -1
- package/support/context/websocket.js +12 -6
- package/support/context/websocket.js.map +1 -1
- package/support/index.d.ts +8 -8
- package/support/index.d.ts.map +1 -1
- package/support/index.js +18 -18
- package/support/index.js.map +1 -1
- package/support/pages/conversation-history.js +46 -54
- package/support/pages/conversation-history.js.map +1 -1
- package/support/pages/conversation.d.ts +3 -6
- package/support/pages/conversation.d.ts.map +1 -1
- package/support/pages/conversation.js +19 -9
- package/support/pages/conversation.js.map +1 -1
- package/support/pages/home.d.ts +2 -2
- package/support/pages/home.d.ts.map +1 -1
- package/support/pages/home.js +64 -77
- package/support/pages/home.js.map +1 -1
- package/support/store/support-store.d.ts +18 -2
- package/support/store/support-store.d.ts.map +1 -1
- package/support/store/support-store.js +20 -5
- package/support/store/support-store.js.map +1 -1
- package/support/{support-CMoDLQoC.css → support-Ck4jy29i.css} +1 -2
- package/support/support-Ck4jy29i.css.map +1 -0
- package/support/text/index.d.ts +15 -2
- package/support/text/index.d.ts.map +1 -1
- package/support/text/index.js +15 -2
- package/support/text/index.js.map +1 -1
- package/support/text/locales/en.js +22 -4
- package/support/text/locales/en.js.map +1 -1
- package/support/text/locales/es.js +18 -0
- package/support/text/locales/es.js.map +1 -1
- package/support/text/locales/fr.js +18 -0
- package/support/text/locales/fr.js.map +1 -1
- package/support/text/locales/keys.d.ts +69 -9
- package/support/text/locales/keys.d.ts.map +1 -1
- package/support/text/locales/keys.js +18 -0
- package/support/text/locales/keys.js.map +1 -1
- package/support/text/runtime.d.ts +21 -0
- package/support/text/runtime.d.ts.map +1 -1
- package/support/text/runtime.js +21 -0
- package/support/text/runtime.js.map +1 -1
- package/support/utils/index.d.ts +4 -0
- package/support/utils/index.d.ts.map +1 -1
- package/support/utils/index.js +4 -1
- package/support/utils/index.js.map +1 -1
- package/support/utils/time.d.ts +3 -0
- package/support/utils/time.d.ts.map +1 -1
- package/support/utils/time.js +3 -0
- package/support/utils/time.js.map +1 -1
- package/support-config.d.ts +2 -1
- package/support-config.d.ts.map +1 -1
- package/support-config.js.map +1 -1
- package/support.css +2 -2
- package/tailwind.css +404 -0
- package/timeline-item.d.ts +10 -0
- package/timeline-item.d.ts.map +1 -1
- package/utils/conversation.d.ts +7 -0
- package/utils/conversation.d.ts.map +1 -0
- package/utils/conversation.js +18 -0
- package/utils/conversation.js.map +1 -0
- package/utils/id.d.ts +3 -0
- package/utils/id.d.ts.map +1 -1
- package/utils/id.js +3 -0
- package/utils/id.js.map +1 -1
- package/utils/index.d.ts +2 -1
- package/utils/index.js +2 -1
- package/utils/metadata-hash.d.ts +12 -0
- package/utils/metadata-hash.d.ts.map +1 -0
- package/utils/metadata-hash.js +26 -0
- package/utils/metadata-hash.js.map +1 -0
- package/utils/text.d.ts +3 -0
- package/utils/text.d.ts.map +1 -1
- package/utils/text.js +3 -0
- package/utils/text.js.map +1 -1
- package/utils/use-render-element.d.ts +3 -0
- package/utils/use-render-element.d.ts.map +1 -1
- package/utils/use-render-element.js +3 -0
- package/utils/use-render-element.js.map +1 -1
- package/support/context/config.d.ts +0 -32
- package/support/context/config.d.ts.map +0 -1
- package/support/context/config.js +0 -27
- package/support/context/config.js.map +0 -1
- package/support/support-CMoDLQoC.css.map +0 -1
|
@@ -39,6 +39,9 @@ const es = {
|
|
|
39
39
|
"component.conversationButtonLink.lastMessage.agent": ({ variables }) => `${variables.name} - ${variables.time}`,
|
|
40
40
|
"component.conversationButtonLink.lastMessage.visitor": ({ variables }) => `Tú - ${variables.time}`,
|
|
41
41
|
"component.conversationButtonLink.typing": ({ variables }) => `${variables.name} está escribiendo...`,
|
|
42
|
+
"component.conversationButtonLink.status.open": "Abierta",
|
|
43
|
+
"component.conversationButtonLink.status.resolved": "Resuelta",
|
|
44
|
+
"component.conversationButtonLink.status.spam": "Spam",
|
|
42
45
|
"component.conversationEvent.assigned": ({ variables }) => `${variables.actorName} asignó la conversación`,
|
|
43
46
|
"component.conversationEvent.unassigned": ({ variables }) => `${variables.actorName} retiró la asignación de la conversación`,
|
|
44
47
|
"component.conversationEvent.default": ({ variables }) => `${variables.actorName} realizó una acción`,
|
|
@@ -48,9 +51,24 @@ const es = {
|
|
|
48
51
|
"component.conversationEvent.priorityChanged": ({ variables }) => `${variables.actorName} cambió la prioridad`,
|
|
49
52
|
"component.conversationEvent.reopened": ({ variables }) => `${variables.actorName} reabrió la conversación`,
|
|
50
53
|
"component.conversationEvent.resolved": ({ variables }) => `${variables.actorName} resolvió la conversación`,
|
|
54
|
+
"component.conversationButtonLink.status.closed": "Cerrada",
|
|
51
55
|
"component.conversationEvent.statusChanged": ({ variables }) => `${variables.actorName} cambió el estado`,
|
|
52
56
|
"component.conversationEvent.tagAdded": ({ variables }) => `${variables.actorName} agregó una etiqueta`,
|
|
53
57
|
"component.conversationEvent.tagRemoved": ({ variables }) => `${variables.actorName} quitó una etiqueta`,
|
|
58
|
+
"component.conversationEvent.visitorBlocked": ({ variables }) => `${variables.actorName} bloqueó al visitante`,
|
|
59
|
+
"component.conversationEvent.visitorUnblocked": ({ variables }) => `${variables.actorName} desbloqueó al visitante`,
|
|
60
|
+
"component.conversationEvent.visitorIdentified": () => "Detalles de contacto confirmados",
|
|
61
|
+
"component.identificationTool.title": "Comparte tu correo",
|
|
62
|
+
"component.identificationTool.description": "Déjanos tu correo electrónico para que podamos continuar la conversación.",
|
|
63
|
+
"component.identificationTool.cta": "Compartir correo",
|
|
64
|
+
"component.identificationTool.loading": "Guardando...",
|
|
65
|
+
"component.identificationTool.success": "¡Gracias! Usaremos este correo si necesitamos contactarte.",
|
|
66
|
+
"component.identificationTool.error": "No pudimos guardar tu correo. Inténtalo de nuevo.",
|
|
67
|
+
"component.identificationTool.validation": "Ingresa un correo electrónico para continuar.",
|
|
68
|
+
"component.identificationTool.inputPlaceholder": "tu@ejemplo.com",
|
|
69
|
+
"component.identificationTool.inputLabel": "Correo electrónico",
|
|
70
|
+
"component.identificationTool.eventLog": "El visitante confirmó su correo electrónico",
|
|
71
|
+
"component.conversationPage.closedMessage": "Esta conversación está cerrada, inicia una nueva para hablar con nosotros",
|
|
54
72
|
"component.multimodalInput.placeholder": "Escribe tu mensaje...",
|
|
55
73
|
"component.multimodalInput.remove": ({ variables }) => `Eliminar ${variables.fileName}`,
|
|
56
74
|
"component.navigation.articles": "Artículos",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"es.js","names":["es: SupportLocaleMessages"],"sources":["../../../../src/support/text/locales/es.tsx"],"sourcesContent":["import type { SupportLocaleMessages } from \"./keys\";\n\nconst es: SupportLocaleMessages = {\n\t\"common.actions.askQuestion\": \"Haznos una pregunta\",\n\t\"common.actions.attachFiles\": \"Adjuntar archivos\",\n\t\"common.actions.removeFile\": ({ variables }) =>\n\t\t`Eliminar ${variables.fileName}`,\n\t\"common.brand.watermark\": \"Impulsado por\",\n\t\"common.fallbacks.aiAssistant\": \"Asistente de IA\",\n\t\"common.fallbacks.cossistant\": \"Cossistant\",\n\t\"common.fallbacks.someone\": \"Alguien\",\n\t\"common.fallbacks.supportTeam\": \"Soporte\",\n\t\"common.fallbacks.unknown\": \"Desconocido\",\n\t\"common.fallbacks.you\": \"Tú\",\n\t\"common.labels.aiAgentIndicator\": \"Agente IA\",\n\t\"common.labels.supportOnline\": \"Soporte en línea\",\n\t\"page.conversationHistory.showMore\": ({ variables, utils }) =>\n\t\t`+${utils.formatNumber(variables.count)} más`,\n\t\"page.conversationHistory.title\": \"Historial de conversaciones\",\n\t\"page.home.greeting\": ({ variables, context, utils }) => {\n\t\tconst period = utils.timeOfDay();\n\t\tconst prefixes: Record<typeof period.token, string> = {\n\t\t\tmorning: \"Buenos días\",\n\t\t\tafternoon: \"Buenas tardes\",\n\t\t\tevening: \"Buenas noches\",\n\t\t};\n\t\tconst prefix = prefixes[period.token];\n\t\tconst visitorName =\n\t\t\tvariables?.visitorName || context.visitor?.contact?.name;\n\t\treturn `${prefix}${visitorName ? ` ${visitorName}` : \"\"}, ¿en qué podemos ayudarte?`;\n\t},\n\t\"page.home.history.more\": ({ variables, utils }) => {\n\t\tconst count = variables.count;\n\t\tconst noun = utils.pluralize(count, {\n\t\t\tone: \"conversación más\",\n\t\t\tother: \"conversaciones más\",\n\t\t});\n\t\treturn `+ ${utils.formatNumber(count)} ${noun}`;\n\t},\n\t\"page.home.tagline\": ({ variables, context, utils }) => {\n\t\tconst websiteName = variables?.websiteName || context.website?.name || \"\";\n\t\treturn websiteName ? `Soporte ${utils.titleCase(websiteName)}` : \"Soporte\";\n\t},\n\t\"component.conversationButtonLink.fallbackTitle\": \"Conversación sin título\",\n\t\"component.conversationButtonLink.lastMessage.agent\": ({ variables }) =>\n\t\t`${variables.name} - ${variables.time}`,\n\t\"component.conversationButtonLink.lastMessage.visitor\": ({ variables }) =>\n\t\t`Tú - ${variables.time}`,\n\t\"component.conversationButtonLink.typing\": ({ variables }) =>\n\t\t`${variables.name} está escribiendo...`,\n\t\"component.conversationEvent.assigned\": ({ variables }) =>\n\t\t`${variables.actorName} asignó la conversación`,\n\t\"component.conversationEvent.unassigned\": ({ variables }) =>\n\t\t`${variables.actorName} retiró la asignación de la conversación`,\n\t\"component.conversationEvent.default\": ({ variables }) =>\n\t\t`${variables.actorName} realizó una acción`,\n\t\"component.conversationEvent.participantJoined\": ({ variables }) =>\n\t\t`${variables.actorName} se unió a la conversación`,\n\t\"component.conversationEvent.participantLeft\": ({ variables }) =>\n\t\t`${variables.actorName} salió de la conversación`,\n\t\"component.conversationEvent.participantRequested\": ({ variables }) =>\n\t\t`${variables.actorName} solicitó unirse`,\n\t\"component.conversationEvent.priorityChanged\": ({ variables }) =>\n\t\t`${variables.actorName} cambió la prioridad`,\n\t\"component.conversationEvent.reopened\": ({ variables }) =>\n\t\t`${variables.actorName} reabrió la conversación`,\n\t\"component.conversationEvent.resolved\": ({ variables }) =>\n\t\t`${variables.actorName} resolvió la conversación`,\n\t\"component.conversationEvent.statusChanged\": ({ variables }) =>\n\t\t`${variables.actorName} cambió el estado`,\n\t\"component.conversationEvent.tagAdded\": ({ variables }) =>\n\t\t`${variables.actorName} agregó una etiqueta`,\n\t\"component.conversationEvent.tagRemoved\": ({ variables }) =>\n\t\t`${variables.actorName} quitó una etiqueta`,\n\t\"component.multimodalInput.placeholder\": \"Escribe tu mensaje...\",\n\t\"component.multimodalInput.remove\": ({ variables }) =>\n\t\t`Eliminar ${variables.fileName}`,\n\t\"component.navigation.articles\": \"Artículos\",\n\t\"component.navigation.home\": \"Inicio\",\n\t\"component.message.timestamp.aiIndicator\": \"• Agente IA\",\n};\n\nexport default es;\n"],"mappings":";AAEA,MAAMA,KAA4B;CACjC,8BAA8B;CAC9B,8BAA8B;CAC9B,8BAA8B,EAAE,gBAC/B,YAAY,UAAU;CACvB,0BAA0B;CAC1B,gCAAgC;CAChC,+BAA+B;CAC/B,4BAA4B;CAC5B,gCAAgC;CAChC,4BAA4B;CAC5B,wBAAwB;CACxB,kCAAkC;CAClC,+BAA+B;CAC/B,sCAAsC,EAAE,WAAW,YAClD,IAAI,MAAM,aAAa,UAAU,MAAM,CAAC;CACzC,kCAAkC;CAClC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GAAG,UAAU,UAAU;CACxB,yCAAyC;CACzC,qCAAqC,EAAE,gBACtC,YAAY,UAAU;CACvB,iCAAiC;CACjC,6BAA6B;CAC7B,2CAA2C;CAC3C;AAED,iBAAe"}
|
|
1
|
+
{"version":3,"file":"es.js","names":["es: SupportLocaleMessages"],"sources":["../../../../src/support/text/locales/es.tsx"],"sourcesContent":["import type { SupportLocaleMessages } from \"./keys\";\n\nconst es: SupportLocaleMessages = {\n\t\"common.actions.askQuestion\": \"Haznos una pregunta\",\n\t\"common.actions.attachFiles\": \"Adjuntar archivos\",\n\t\"common.actions.removeFile\": ({ variables }) =>\n\t\t`Eliminar ${variables.fileName}`,\n\t\"common.brand.watermark\": \"Impulsado por\",\n\t\"common.fallbacks.aiAssistant\": \"Asistente de IA\",\n\t\"common.fallbacks.cossistant\": \"Cossistant\",\n\t\"common.fallbacks.someone\": \"Alguien\",\n\t\"common.fallbacks.supportTeam\": \"Soporte\",\n\t\"common.fallbacks.unknown\": \"Desconocido\",\n\t\"common.fallbacks.you\": \"Tú\",\n\t\"common.labels.aiAgentIndicator\": \"Agente IA\",\n\t\"common.labels.supportOnline\": \"Soporte en línea\",\n\t\"page.conversationHistory.showMore\": ({ variables, utils }) =>\n\t\t`+${utils.formatNumber(variables.count)} más`,\n\t\"page.conversationHistory.title\": \"Historial de conversaciones\",\n\t\"page.home.greeting\": ({ variables, context, utils }) => {\n\t\tconst period = utils.timeOfDay();\n\t\tconst prefixes: Record<typeof period.token, string> = {\n\t\t\tmorning: \"Buenos días\",\n\t\t\tafternoon: \"Buenas tardes\",\n\t\t\tevening: \"Buenas noches\",\n\t\t};\n\t\tconst prefix = prefixes[period.token];\n\t\tconst visitorName =\n\t\t\tvariables?.visitorName || context.visitor?.contact?.name;\n\t\treturn `${prefix}${visitorName ? ` ${visitorName}` : \"\"}, ¿en qué podemos ayudarte?`;\n\t},\n\t\"page.home.history.more\": ({ variables, utils }) => {\n\t\tconst count = variables.count;\n\t\tconst noun = utils.pluralize(count, {\n\t\t\tone: \"conversación más\",\n\t\t\tother: \"conversaciones más\",\n\t\t});\n\t\treturn `+ ${utils.formatNumber(count)} ${noun}`;\n\t},\n\t\"page.home.tagline\": ({ variables, context, utils }) => {\n\t\tconst websiteName = variables?.websiteName || context.website?.name || \"\";\n\t\treturn websiteName ? `Soporte ${utils.titleCase(websiteName)}` : \"Soporte\";\n\t},\n\t\"component.conversationButtonLink.fallbackTitle\": \"Conversación sin título\",\n\t\"component.conversationButtonLink.lastMessage.agent\": ({ variables }) =>\n\t\t`${variables.name} - ${variables.time}`,\n\t\"component.conversationButtonLink.lastMessage.visitor\": ({ variables }) =>\n\t\t`Tú - ${variables.time}`,\n\t\"component.conversationButtonLink.typing\": ({ variables }) =>\n\t\t`${variables.name} está escribiendo...`,\n\t\"component.conversationButtonLink.status.open\": \"Abierta\",\n\t\"component.conversationButtonLink.status.resolved\": \"Resuelta\",\n\t\"component.conversationButtonLink.status.spam\": \"Spam\",\n\t\"component.conversationEvent.assigned\": ({ variables }) =>\n\t\t`${variables.actorName} asignó la conversación`,\n\t\"component.conversationEvent.unassigned\": ({ variables }) =>\n\t\t`${variables.actorName} retiró la asignación de la conversación`,\n\t\"component.conversationEvent.default\": ({ variables }) =>\n\t\t`${variables.actorName} realizó una acción`,\n\t\"component.conversationEvent.participantJoined\": ({ variables }) =>\n\t\t`${variables.actorName} se unió a la conversación`,\n\t\"component.conversationEvent.participantLeft\": ({ variables }) =>\n\t\t`${variables.actorName} salió de la conversación`,\n\t\"component.conversationEvent.participantRequested\": ({ variables }) =>\n\t\t`${variables.actorName} solicitó unirse`,\n\t\"component.conversationEvent.priorityChanged\": ({ variables }) =>\n\t\t`${variables.actorName} cambió la prioridad`,\n\t\"component.conversationEvent.reopened\": ({ variables }) =>\n\t\t`${variables.actorName} reabrió la conversación`,\n\t\"component.conversationEvent.resolved\": ({ variables }) =>\n\t\t`${variables.actorName} resolvió la conversación`,\n\t\"component.conversationButtonLink.status.closed\": \"Cerrada\",\n\t\"component.conversationEvent.statusChanged\": ({ variables }) =>\n\t\t`${variables.actorName} cambió el estado`,\n\t\"component.conversationEvent.tagAdded\": ({ variables }) =>\n\t\t`${variables.actorName} agregó una etiqueta`,\n\t\"component.conversationEvent.tagRemoved\": ({ variables }) =>\n\t\t`${variables.actorName} quitó una etiqueta`,\n\t\"component.conversationEvent.visitorBlocked\": ({ variables }) =>\n\t\t`${variables.actorName} bloqueó al visitante`,\n\t\"component.conversationEvent.visitorUnblocked\": ({ variables }) =>\n\t\t`${variables.actorName} desbloqueó al visitante`,\n\t\"component.conversationEvent.visitorIdentified\": () =>\n\t\t\"Detalles de contacto confirmados\",\n\t\"component.identificationTool.title\": \"Comparte tu correo\",\n\t\"component.identificationTool.description\":\n\t\t\"Déjanos tu correo electrónico para que podamos continuar la conversación.\",\n\t\"component.identificationTool.cta\": \"Compartir correo\",\n\t\"component.identificationTool.loading\": \"Guardando...\",\n\t\"component.identificationTool.success\":\n\t\t\"¡Gracias! Usaremos este correo si necesitamos contactarte.\",\n\t\"component.identificationTool.error\":\n\t\t\"No pudimos guardar tu correo. Inténtalo de nuevo.\",\n\t\"component.identificationTool.validation\":\n\t\t\"Ingresa un correo electrónico para continuar.\",\n\t\"component.identificationTool.inputPlaceholder\": \"tu@ejemplo.com\",\n\t\"component.identificationTool.inputLabel\": \"Correo electrónico\",\n\t\"component.identificationTool.eventLog\":\n\t\t\"El visitante confirmó su correo electrónico\",\n\t\"component.conversationPage.closedMessage\":\n\t\t\"Esta conversación está cerrada, inicia una nueva para hablar con nosotros\",\n\t\"component.multimodalInput.placeholder\": \"Escribe tu mensaje...\",\n\t\"component.multimodalInput.remove\": ({ variables }) =>\n\t\t`Eliminar ${variables.fileName}`,\n\t\"component.navigation.articles\": \"Artículos\",\n\t\"component.navigation.home\": \"Inicio\",\n\t\"component.message.timestamp.aiIndicator\": \"• Agente IA\",\n};\n\nexport default es;\n"],"mappings":";AAEA,MAAMA,KAA4B;CACjC,8BAA8B;CAC9B,8BAA8B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U;CACxB,qDAAqD,EAAE,gBACtD,GAAG,UAAU,UAAU;CACxB,gDAAgD,EAAE,gBACjD,GAAG,UAAU,UAAU;CACxB,yCAAyC,EAAE,gBAC1C,GAAG,UAAU,UAAU;CACxB,yCAAyC,EAAE,gBAC1C,GAAG,UAAU,UAAU;CACxB,kDAAkD;CAClD,8CAA8C,EAAE,gBAC/C,GAAG,UAAU,UAAU;CACxB,yCAAyC,EAAE,gBAC1C,GAAG,UAAU,UAAU;CACxB,2CAA2C,EAAE,gBAC5C,GAAG,UAAU,UAAU;CACxB,+CAA+C,EAAE,gBAChD,GAAG,UAAU,UAAU;CACxB,iDAAiD,EAAE,gBAClD,GAAG,UAAU,UAAU;CACxB,uDACC;CACD,sCAAsC;CACtC,4CACC;CACD,oCAAoC;CACpC,wCAAwC;CACxC,wCACC;CACD,sCACC;CACD,2CACC;CACD,iDAAiD;CACjD,2CAA2C;CAC3C,yCACC;CACD,4CACC;CACD,yCAAyC;CACzC,qCAAqC,EAAE,gBACtC,YAAY,UAAU;CACvB,iCAAiC;CACjC,6BAA6B;CAC7B,2CAA2C;CAC3C;AAED,iBAAe"}
|
|
@@ -39,6 +39,10 @@ const fr = {
|
|
|
39
39
|
"component.conversationButtonLink.lastMessage.agent": ({ variables }) => `${variables.name} - ${variables.time}`,
|
|
40
40
|
"component.conversationButtonLink.lastMessage.visitor": ({ variables }) => `Vous - ${variables.time}`,
|
|
41
41
|
"component.conversationButtonLink.typing": ({ variables }) => `${variables.name} est en train d'écrire...`,
|
|
42
|
+
"component.conversationButtonLink.status.open": "Ouverte",
|
|
43
|
+
"component.conversationButtonLink.status.resolved": "Résolue",
|
|
44
|
+
"component.conversationButtonLink.status.closed": "Fermée",
|
|
45
|
+
"component.conversationButtonLink.status.spam": "Indésirable",
|
|
42
46
|
"component.conversationEvent.assigned": ({ variables }) => `${variables.actorName} a attribué la conversation`,
|
|
43
47
|
"component.conversationEvent.unassigned": ({ variables }) => `${variables.actorName} a retiré l'attribution de la conversation`,
|
|
44
48
|
"component.conversationEvent.default": ({ variables }) => `${variables.actorName} a effectué une action`,
|
|
@@ -51,6 +55,20 @@ const fr = {
|
|
|
51
55
|
"component.conversationEvent.statusChanged": ({ variables }) => `${variables.actorName} a modifié le statut`,
|
|
52
56
|
"component.conversationEvent.tagAdded": ({ variables }) => `${variables.actorName} a ajouté une étiquette`,
|
|
53
57
|
"component.conversationEvent.tagRemoved": ({ variables }) => `${variables.actorName} a retiré une étiquette`,
|
|
58
|
+
"component.conversationEvent.visitorBlocked": ({ variables }) => `${variables.actorName} a bloqué le visiteur`,
|
|
59
|
+
"component.conversationEvent.visitorUnblocked": ({ variables }) => `${variables.actorName} a débloqué le visiteur`,
|
|
60
|
+
"component.conversationEvent.visitorIdentified": () => "Coordonnées confirmées",
|
|
61
|
+
"component.identificationTool.title": "Partagez votre e-mail",
|
|
62
|
+
"component.identificationTool.description": "Laissez-nous votre adresse e-mail afin que nous puissions vous recontacter.",
|
|
63
|
+
"component.identificationTool.cta": "Partager l'e-mail",
|
|
64
|
+
"component.identificationTool.loading": "Enregistrement...",
|
|
65
|
+
"component.identificationTool.success": "Merci ! Nous utiliserons cette adresse si nous devons vous recontacter.",
|
|
66
|
+
"component.identificationTool.error": "Impossible d'enregistrer votre e-mail. Veuillez réessayer.",
|
|
67
|
+
"component.identificationTool.validation": "Veuillez saisir une adresse e-mail pour continuer.",
|
|
68
|
+
"component.identificationTool.inputPlaceholder": "vous@example.com",
|
|
69
|
+
"component.identificationTool.inputLabel": "Adresse e-mail",
|
|
70
|
+
"component.identificationTool.eventLog": "Le visiteur a confirmé son adresse e-mail",
|
|
71
|
+
"component.conversationPage.closedMessage": "Cette conversation est close, commencez-en une nouvelle pour discuter avec nous",
|
|
54
72
|
"component.multimodalInput.placeholder": "Écrivez votre message...",
|
|
55
73
|
"component.multimodalInput.remove": ({ variables }) => `Supprimer ${variables.fileName}`,
|
|
56
74
|
"component.navigation.articles": "Articles",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fr.js","names":["fr: SupportLocaleMessages"],"sources":["../../../../src/support/text/locales/fr.tsx"],"sourcesContent":["import type { SupportLocaleMessages } from \"./keys\";\n\nconst fr: SupportLocaleMessages = {\n\t\"common.actions.askQuestion\": \"Posez-nous une question\",\n\t\"common.actions.attachFiles\": \"Joindre des fichiers\",\n\t\"common.actions.removeFile\": ({ variables }) =>\n\t\t`Supprimer ${variables.fileName}`,\n\t\"common.brand.watermark\": \"Propulsé par\",\n\t\"common.fallbacks.aiAssistant\": \"Assistant IA\",\n\t\"common.fallbacks.cossistant\": \"Cossistant\",\n\t\"common.fallbacks.someone\": \"Quelqu'un\",\n\t\"common.fallbacks.supportTeam\": \"Support\",\n\t\"common.fallbacks.unknown\": \"Inconnu\",\n\t\"common.fallbacks.you\": \"Vous\",\n\t\"common.labels.aiAgentIndicator\": \"Agent IA\",\n\t\"common.labels.supportOnline\": \"Support en ligne\",\n\t\"page.conversationHistory.showMore\": ({ variables, utils }) =>\n\t\t`+${utils.formatNumber(variables.count)} de plus`,\n\t\"page.conversationHistory.title\": \"Historique des conversations\",\n\t\"page.home.greeting\": ({ variables, context, utils }) => {\n\t\tconst period = utils.timeOfDay();\n\t\tconst prefixes: Record<typeof period.token, string> = {\n\t\t\tmorning: \"Bonjour\",\n\t\t\tafternoon: \"Bon après-midi\",\n\t\t\tevening: \"Bonsoir\",\n\t\t};\n\t\tconst prefix = prefixes[period.token];\n\t\tconst visitorName =\n\t\t\tvariables?.visitorName || context.visitor?.contact?.name;\n\t\treturn `${prefix}${visitorName ? ` ${visitorName}` : \"\"}, comment pouvons-nous vous aider ?`;\n\t},\n\t\"page.home.history.more\": ({ variables, utils }) => {\n\t\tconst count = variables.count;\n\t\tconst noun = utils.pluralize(count, {\n\t\t\tone: \"conversation supplémentaire\",\n\t\t\tother: \"conversations supplémentaires\",\n\t\t});\n\t\treturn `+ ${utils.formatNumber(count)} ${noun}`;\n\t},\n\t\"page.home.tagline\": ({ variables, context, utils }) => {\n\t\tconst websiteName = variables?.websiteName || context.website?.name || \"\";\n\t\treturn websiteName ? `Support ${utils.titleCase(websiteName)}` : \"Support\";\n\t},\n\t\"component.conversationButtonLink.fallbackTitle\": \"Conversation sans titre\",\n\t\"component.conversationButtonLink.lastMessage.agent\": ({ variables }) =>\n\t\t`${variables.name} - ${variables.time}`,\n\t\"component.conversationButtonLink.lastMessage.visitor\": ({ variables }) =>\n\t\t`Vous - ${variables.time}`,\n\t\"component.conversationButtonLink.typing\": ({ variables }) =>\n\t\t`${variables.name} est en train d'écrire...`,\n\t\"component.conversationEvent.assigned\": ({ variables }) =>\n\t\t`${variables.actorName} a attribué la conversation`,\n\t\"component.conversationEvent.unassigned\": ({ variables }) =>\n\t\t`${variables.actorName} a retiré l'attribution de la conversation`,\n\t\"component.conversationEvent.default\": ({ variables }) =>\n\t\t`${variables.actorName} a effectué une action`,\n\t\"component.conversationEvent.participantJoined\": ({ variables }) =>\n\t\t`${variables.actorName} a rejoint la conversation`,\n\t\"component.conversationEvent.participantLeft\": ({ variables }) =>\n\t\t`${variables.actorName} a quitté la conversation`,\n\t\"component.conversationEvent.participantRequested\": ({ variables }) =>\n\t\t`${variables.actorName} a demandé à rejoindre`,\n\t\"component.conversationEvent.priorityChanged\": ({ variables }) =>\n\t\t`${variables.actorName} a modifié la priorité`,\n\t\"component.conversationEvent.reopened\": ({ variables }) =>\n\t\t`${variables.actorName} a rouvert la conversation`,\n\t\"component.conversationEvent.resolved\": ({ variables }) =>\n\t\t`${variables.actorName} a résolu la conversation`,\n\t\"component.conversationEvent.statusChanged\": ({ variables }) =>\n\t\t`${variables.actorName} a modifié le statut`,\n\t\"component.conversationEvent.tagAdded\": ({ variables }) =>\n\t\t`${variables.actorName} a ajouté une étiquette`,\n\t\"component.conversationEvent.tagRemoved\": ({ variables }) =>\n\t\t`${variables.actorName} a retiré une étiquette`,\n\t\"component.multimodalInput.placeholder\": \"Écrivez votre message...\",\n\t\"component.multimodalInput.remove\": ({ variables }) =>\n\t\t`Supprimer ${variables.fileName}`,\n\t\"component.navigation.articles\": \"Articles\",\n\t\"component.navigation.home\": \"Accueil\",\n\t\"component.message.timestamp.aiIndicator\": \"• Agent IA\",\n};\n\nexport default fr;\n"],"mappings":";AAEA,MAAMA,KAA4B;CACjC,8BAA8B;CAC9B,8BAA8B;CAC9B,8BAA8B,EAAE,gBAC/B,aAAa,UAAU;CACxB,0BAA0B;CAC1B,gCAAgC;CAChC,+BAA+B;CAC/B,4BAA4B;CAC5B,gCAAgC;CAChC,4BAA4B;CAC5B,wBAAwB;CACxB,kCAAkC;CAClC,+BAA+B;CAC/B,sCAAsC,EAAE,WAAW,YAClD,IAAI,MAAM,aAAa,UAAU,MAAM,CAAC;CACzC,kCAAkC;CAClC,uBAAuB,EAAE,WAAW,SAAS,YAAY;EAOxD,MAAM,SALgD;GACrD,SAAS;GACT,WAAW;GACX,SAAS;GACT,CALc,MAAM,WAAW,CAMD;EAC/B,MAAM,cACL,WAAW,eAAe,QAAQ,SAAS,SAAS;AACrD,SAAO,GAAG,SAAS,cAAc,IAAI,gBAAgB,GAAG;;CAEzD,2BAA2B,EAAE,WAAW,YAAY;EACnD,MAAM,QAAQ,UAAU;EACxB,MAAM,OAAO,MAAM,UAAU,OAAO;GACnC,KAAK;GACL,OAAO;GACP,CAAC;AACF,SAAO,KAAK,MAAM,aAAa,MAAM,CAAC,GAAG;;CAE1C,sBAAsB,EAAE,WAAW,SAAS,YAAY;EACvD,MAAM,cAAc,WAAW,eAAe,QAAQ,SAAS,QAAQ;AACvE,SAAO,cAAc,WAAW,MAAM,UAAU,YAAY,KAAK;;CAElE,kDAAkD;CAClD,uDAAuD,EAAE,gBACxD,GAAG,UAAU,KAAK,KAAK,UAAU;CAClC,yDAAyD,EAAE,gBAC1D,UAAU,UAAU;CACrB,4CAA4C,EAAE,gBAC7C,GAAG,UAAU,KAAK;CACnB,yCAAyC,EAAE,gBAC1C,GAAG,UAAU,UAAU;CACxB,2CAA2C,EAAE,gBAC5C,GAAG,UAAU,UAAU;CACxB,wCAAwC,EAAE,gBACzC,GAAG,UAAU,UAAU;CACxB,kDAAkD,EAAE,gBACnD,GAAG,UAAU,UAAU;CACxB,gDAAgD,EAAE,gBACjD,GAAG,UAAU,UAAU;CACxB,qDAAqD,EAAE,gBACtD,GAAG,UAAU,UAAU;CACxB,gDAAgD,EAAE,gBACjD,GAAG,UAAU,UAAU;CACxB,yCAAyC,EAAE,gBAC1C,GAAG,UAAU,UAAU;CACxB,yCAAyC,EAAE,gBAC1C,GAAG,UAAU,UAAU;CACxB,8CAA8C,EAAE,gBAC/C,GAAG,UAAU,UAAU;CACxB,yCAAyC,EAAE,gBAC1C,GAAG,UAAU,UAAU;CACxB,2CAA2C,EAAE,gBAC5C,GAAG,UAAU,UAAU;CACxB,yCAAyC;CACzC,qCAAqC,EAAE,gBACtC,aAAa,UAAU;CACxB,iCAAiC;CACjC,6BAA6B;CAC7B,2CAA2C;CAC3C;AAED,iBAAe"}
|
|
1
|
+
{"version":3,"file":"fr.js","names":["fr: SupportLocaleMessages"],"sources":["../../../../src/support/text/locales/fr.tsx"],"sourcesContent":["import type { SupportLocaleMessages } from \"./keys\";\n\nconst fr: SupportLocaleMessages = {\n\t\"common.actions.askQuestion\": \"Posez-nous une question\",\n\t\"common.actions.attachFiles\": \"Joindre des fichiers\",\n\t\"common.actions.removeFile\": ({ variables }) =>\n\t\t`Supprimer ${variables.fileName}`,\n\t\"common.brand.watermark\": \"Propulsé par\",\n\t\"common.fallbacks.aiAssistant\": \"Assistant IA\",\n\t\"common.fallbacks.cossistant\": \"Cossistant\",\n\t\"common.fallbacks.someone\": \"Quelqu'un\",\n\t\"common.fallbacks.supportTeam\": \"Support\",\n\t\"common.fallbacks.unknown\": \"Inconnu\",\n\t\"common.fallbacks.you\": \"Vous\",\n\t\"common.labels.aiAgentIndicator\": \"Agent IA\",\n\t\"common.labels.supportOnline\": \"Support en ligne\",\n\t\"page.conversationHistory.showMore\": ({ variables, utils }) =>\n\t\t`+${utils.formatNumber(variables.count)} de plus`,\n\t\"page.conversationHistory.title\": \"Historique des conversations\",\n\t\"page.home.greeting\": ({ variables, context, utils }) => {\n\t\tconst period = utils.timeOfDay();\n\t\tconst prefixes: Record<typeof period.token, string> = {\n\t\t\tmorning: \"Bonjour\",\n\t\t\tafternoon: \"Bon après-midi\",\n\t\t\tevening: \"Bonsoir\",\n\t\t};\n\t\tconst prefix = prefixes[period.token];\n\t\tconst visitorName =\n\t\t\tvariables?.visitorName || context.visitor?.contact?.name;\n\t\treturn `${prefix}${visitorName ? ` ${visitorName}` : \"\"}, comment pouvons-nous vous aider ?`;\n\t},\n\t\"page.home.history.more\": ({ variables, utils }) => {\n\t\tconst count = variables.count;\n\t\tconst noun = utils.pluralize(count, {\n\t\t\tone: \"conversation supplémentaire\",\n\t\t\tother: \"conversations supplémentaires\",\n\t\t});\n\t\treturn `+ ${utils.formatNumber(count)} ${noun}`;\n\t},\n\t\"page.home.tagline\": ({ variables, context, utils }) => {\n\t\tconst websiteName = variables?.websiteName || context.website?.name || \"\";\n\t\treturn websiteName ? `Support ${utils.titleCase(websiteName)}` : \"Support\";\n\t},\n\t\"component.conversationButtonLink.fallbackTitle\": \"Conversation sans titre\",\n\t\"component.conversationButtonLink.lastMessage.agent\": ({ variables }) =>\n\t\t`${variables.name} - ${variables.time}`,\n\t\"component.conversationButtonLink.lastMessage.visitor\": ({ variables }) =>\n\t\t`Vous - ${variables.time}`,\n\t\"component.conversationButtonLink.typing\": ({ variables }) =>\n\t\t`${variables.name} est en train d'écrire...`,\n\t\"component.conversationButtonLink.status.open\": \"Ouverte\",\n\t\"component.conversationButtonLink.status.resolved\": \"Résolue\",\n\t\"component.conversationButtonLink.status.closed\": \"Fermée\",\n\t\"component.conversationButtonLink.status.spam\": \"Indésirable\",\n\t\"component.conversationEvent.assigned\": ({ variables }) =>\n\t\t`${variables.actorName} a attribué la conversation`,\n\t\"component.conversationEvent.unassigned\": ({ variables }) =>\n\t\t`${variables.actorName} a retiré l'attribution de la conversation`,\n\t\"component.conversationEvent.default\": ({ variables }) =>\n\t\t`${variables.actorName} a effectué une action`,\n\t\"component.conversationEvent.participantJoined\": ({ variables }) =>\n\t\t`${variables.actorName} a rejoint la conversation`,\n\t\"component.conversationEvent.participantLeft\": ({ variables }) =>\n\t\t`${variables.actorName} a quitté la conversation`,\n\t\"component.conversationEvent.participantRequested\": ({ variables }) =>\n\t\t`${variables.actorName} a demandé à rejoindre`,\n\t\"component.conversationEvent.priorityChanged\": ({ variables }) =>\n\t\t`${variables.actorName} a modifié la priorité`,\n\t\"component.conversationEvent.reopened\": ({ variables }) =>\n\t\t`${variables.actorName} a rouvert la conversation`,\n\t\"component.conversationEvent.resolved\": ({ variables }) =>\n\t\t`${variables.actorName} a résolu la conversation`,\n\t\"component.conversationEvent.statusChanged\": ({ variables }) =>\n\t\t`${variables.actorName} a modifié le statut`,\n\t\"component.conversationEvent.tagAdded\": ({ variables }) =>\n\t\t`${variables.actorName} a ajouté une étiquette`,\n\t\"component.conversationEvent.tagRemoved\": ({ variables }) =>\n\t\t`${variables.actorName} a retiré une étiquette`,\n\t\"component.conversationEvent.visitorBlocked\": ({ variables }) =>\n\t\t`${variables.actorName} a bloqué le visiteur`,\n\t\"component.conversationEvent.visitorUnblocked\": ({ variables }) =>\n\t\t`${variables.actorName} a débloqué le visiteur`,\n\t\"component.conversationEvent.visitorIdentified\": () =>\n\t\t\"Coordonnées confirmées\",\n\t\"component.identificationTool.title\": \"Partagez votre e-mail\",\n\t\"component.identificationTool.description\":\n\t\t\"Laissez-nous votre adresse e-mail afin que nous puissions vous recontacter.\",\n\t\"component.identificationTool.cta\": \"Partager l'e-mail\",\n\t\"component.identificationTool.loading\": \"Enregistrement...\",\n\t\"component.identificationTool.success\":\n\t\t\"Merci ! Nous utiliserons cette adresse si nous devons vous recontacter.\",\n\t\"component.identificationTool.error\":\n\t\t\"Impossible d'enregistrer votre e-mail. Veuillez réessayer.\",\n\t\"component.identificationTool.validation\":\n\t\t\"Veuillez saisir une adresse e-mail pour continuer.\",\n\t\"component.identificationTool.inputPlaceholder\": \"vous@example.com\",\n\t\"component.identificationTool.inputLabel\": \"Adresse e-mail\",\n\t\"component.identificationTool.eventLog\":\n\t\t\"Le visiteur a confirmé son adresse e-mail\",\n\t\"component.conversationPage.closedMessage\":\n\t\t\"Cette conversation est close, commencez-en une nouvelle pour discuter avec nous\",\n\t\"component.multimodalInput.placeholder\": \"Écrivez votre message...\",\n\t\"component.multimodalInput.remove\": ({ variables }) =>\n\t\t`Supprimer ${variables.fileName}`,\n\t\"component.navigation.articles\": \"Articles\",\n\t\"component.navigation.home\": \"Accueil\",\n\t\"component.message.timestamp.aiIndicator\": \"• Agent IA\",\n};\n\nexport default fr;\n"],"mappings":";AAEA,MAAMA,KAA4B;CACjC,8BAA8B;CAC9B,8BAA8B;CAC9B,8BAA8B,EAAE,gBAC/B,aAAa,UAAU;CACxB,0BAA0B;CAC1B,gCAAgC;CAChC,+BAA+B;CAC/B,4BAA4B;CAC5B,gCAAgC;CAChC,4BAA4B;CAC5B,wBAAwB;CACxB,kCAAkC;CAClC,+BAA+B;CAC/B,sCAAsC,EAAE,WAAW,YAClD,IAAI,MAAM,aAAa,UAAU,MAAM,CAAC;CACzC,kCAAkC;CAClC,uBAAuB,EAAE,WAAW,SAAS,YAAY;EAOxD,MAAM,SALgD;GACrD,SAAS;GACT,WAAW;GACX,SAAS;GACT,CALc,MAAM,WAAW,CAMD;EAC/B,MAAM,cACL,WAAW,eAAe,QAAQ,SAAS,SAAS;AACrD,SAAO,GAAG,SAAS,cAAc,IAAI,gBAAgB,GAAG;;CAEzD,2BAA2B,EAAE,WAAW,YAAY;EACnD,MAAM,QAAQ,UAAU;EACxB,MAAM,OAAO,MAAM,UAAU,OAAO;GACnC,KAAK;GACL,OAAO;GACP,CAAC;AACF,SAAO,KAAK,MAAM,aAAa,MAAM,CAAC,GAAG;;CAE1C,sBAAsB,EAAE,WAAW,SAAS,YAAY;EACvD,MAAM,cAA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6 +105,18 @@ declare const supportTextDefinitions: {
|
|
|
105
105
|
readonly name: string;
|
|
106
106
|
};
|
|
107
107
|
};
|
|
108
|
+
readonly "component.conversationButtonLink.status.open": {
|
|
109
|
+
readonly variables: undefined;
|
|
110
|
+
};
|
|
111
|
+
readonly "component.conversationButtonLink.status.resolved": {
|
|
112
|
+
readonly variables: undefined;
|
|
113
|
+
};
|
|
114
|
+
readonly "component.conversationButtonLink.status.closed": {
|
|
115
|
+
readonly variables: undefined;
|
|
116
|
+
};
|
|
117
|
+
readonly "component.conversationButtonLink.status.spam": {
|
|
118
|
+
readonly variables: undefined;
|
|
119
|
+
};
|
|
108
120
|
readonly "component.conversationEvent.assigned": {
|
|
109
121
|
readonly variables: {
|
|
110
122
|
readonly actorName: string;
|
|
@@ -165,6 +177,54 @@ declare const supportTextDefinitions: {
|
|
|
165
177
|
readonly actorName: string;
|
|
166
178
|
};
|
|
167
179
|
};
|
|
180
|
+
readonly "component.conversationEvent.visitorBlocked": {
|
|
181
|
+
readonly variables: {
|
|
182
|
+
readonly actorName: string;
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
readonly "component.conversationEvent.visitorUnblocked": {
|
|
186
|
+
readonly variables: {
|
|
187
|
+
readonly actorName: string;
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
readonly "component.conversationEvent.visitorIdentified": {
|
|
191
|
+
readonly variables: {
|
|
192
|
+
readonly actorName: string;
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
readonly "component.identificationTool.title": {
|
|
196
|
+
readonly variables: undefined;
|
|
197
|
+
};
|
|
198
|
+
readonly "component.identificationTool.description": {
|
|
199
|
+
readonly variables: undefined;
|
|
200
|
+
};
|
|
201
|
+
readonly "component.identificationTool.cta": {
|
|
202
|
+
readonly variables: undefined;
|
|
203
|
+
};
|
|
204
|
+
readonly "component.identificationTool.loading": {
|
|
205
|
+
readonly variables: undefined;
|
|
206
|
+
};
|
|
207
|
+
readonly "component.identificationTool.success": {
|
|
208
|
+
readonly variables: undefined;
|
|
209
|
+
};
|
|
210
|
+
readonly "component.identificationTool.error": {
|
|
211
|
+
readonly variables: undefined;
|
|
212
|
+
};
|
|
213
|
+
readonly "component.identificationTool.validation": {
|
|
214
|
+
readonly variables: undefined;
|
|
215
|
+
};
|
|
216
|
+
readonly "component.identificationTool.inputPlaceholder": {
|
|
217
|
+
readonly variables: undefined;
|
|
218
|
+
};
|
|
219
|
+
readonly "component.identificationTool.inputLabel": {
|
|
220
|
+
readonly variables: undefined;
|
|
221
|
+
};
|
|
222
|
+
readonly "component.identificationTool.eventLog": {
|
|
223
|
+
readonly variables: undefined;
|
|
224
|
+
};
|
|
225
|
+
readonly "component.conversationPage.closedMessage": {
|
|
226
|
+
readonly variables: undefined;
|
|
227
|
+
};
|
|
168
228
|
readonly "component.multimodalInput.placeholder": {
|
|
169
229
|
readonly variables: undefined;
|
|
170
230
|
};
|
|
@@ -185,26 +245,26 @@ declare const supportTextDefinitions: {
|
|
|
185
245
|
};
|
|
186
246
|
type SupportTextDefinitions = typeof supportTextDefinitions;
|
|
187
247
|
type SupportTextKey = keyof SupportTextDefinitions;
|
|
188
|
-
type SupportTextVariables<K extends SupportTextKey> = SupportTextDefinitions[K]["variables"];
|
|
189
|
-
type OptionalFlag<K extends SupportTextKey> = SupportTextDefinitions[K] extends {
|
|
248
|
+
type SupportTextVariables<K$1 extends SupportTextKey> = SupportTextDefinitions[K$1]["variables"];
|
|
249
|
+
type OptionalFlag<K$1 extends SupportTextKey> = SupportTextDefinitions[K$1] extends {
|
|
190
250
|
optional: true;
|
|
191
251
|
} ? true : false;
|
|
192
|
-
type MessageVariables<K extends SupportTextKey, Vars = SupportTextVariables<K>> = Vars extends undefined ? undefined : OptionalFlag<K> extends true ? Vars | undefined : Vars;
|
|
193
|
-
type SupportTextMessage<K extends SupportTextKey, Vars = SupportTextVariables<K>> = string | ((args: {
|
|
194
|
-
variables: MessageVariables<K, Vars>;
|
|
252
|
+
type MessageVariables<K$1 extends SupportTextKey, Vars = SupportTextVariables<K$1>> = Vars extends undefined ? undefined : OptionalFlag<K$1> extends true ? Vars | undefined : Vars;
|
|
253
|
+
type SupportTextMessage<K$1 extends SupportTextKey, Vars = SupportTextVariables<K$1>> = string | ((args: {
|
|
254
|
+
variables: MessageVariables<K$1, Vars>;
|
|
195
255
|
context: SupportTextContext;
|
|
196
256
|
utils: SupportTextUtils;
|
|
197
257
|
}) => string);
|
|
198
258
|
type SupportLocaleMessages = { [K in SupportTextKey]: SupportTextMessage<K> };
|
|
199
259
|
type SupportTextContentOverrides<Locale extends string = SupportLocale> = Partial<{ [K in SupportTextKey]: SupportTextMessage<K> | Partial<Record<SupportLocale | Locale, SupportTextMessage<K>>> }>;
|
|
200
260
|
type SupportTextFormatter = {
|
|
201
|
-
<K extends SupportTextKey>(key: K, variables: SupportTextVariables<K>): string;
|
|
202
|
-
<K extends SupportTextKey>(key: K): string;
|
|
261
|
+
<K$1 extends SupportTextKey>(key: K$1, variables: SupportTextVariables<K$1>): string;
|
|
262
|
+
<K$1 extends SupportTextKey>(key: K$1): string;
|
|
203
263
|
};
|
|
204
264
|
type KeysWithVariables = { [K in SupportTextKey]: SupportTextVariables<K> extends undefined ? never : OptionalFlag<K> extends true ? never : K }[SupportTextKey];
|
|
205
265
|
type StrictSupportTextFormatter = {
|
|
206
|
-
<K extends KeysWithVariables>(key: K, variables: SupportTextVariables<K>): string;
|
|
207
|
-
<K extends Exclude<SupportTextKey, KeysWithVariables>>(key: K, variables?: SupportTextVariables<K>): string;
|
|
266
|
+
<K$1 extends KeysWithVariables>(key: K$1, variables: SupportTextVariables<K$1>): string;
|
|
267
|
+
<K$1 extends Exclude<SupportTextKey, KeysWithVariables>>(key: K$1, variables?: SupportTextVariables<K$1>): string;
|
|
208
268
|
};
|
|
209
269
|
type SupportTextResolvedFormatter = StrictSupportTextFormatter & SupportTextFormatter;
|
|
210
270
|
type SupportTextProviderValue = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keys.d.ts","names":[],"sources":["../../../../src/support/text/locales/keys.ts"],"sourcesContent":[],"mappings":";;;KAMY,aAAA;KAEA,qBAAA;AAFA,KAIA,qBAAA,GAJa;EAEb,KAAA,EAGJ,qBAHyB;EAErB,KAAA,EAAA,MAAA;AAKZ,CAAA;
|
|
1
|
+
{"version":3,"file":"keys.d.ts","names":[],"sources":["../../../../src/support/text/locales/keys.ts"],"sourcesContent":[],"mappings":";;;KAMY,aAAA;KAEA,qBAAA;AAFA,KAIA,qBAAA,GAJa;EAEb,KAAA,EAGJ,qBAHyB;EAErB,KAAA,EAAA,MAAA;AAKZ,CAAA;AAOY,KAPA,gBAAA,GAOkB;EACpB,YAAA,EAAA,CAAA,KAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EAP+B,IAAA,CAAK,mBAOpC,EAAA,GAAA,MAAA;EACA,SAAA,EAAA,CAAA,KAAA,EAAA,MAAA,EAAA,OAAA,EAAA;IACI,GAAA,EAAA,MAAA;IACH,KAAA,EAAA,MAAA;EAAgB,CAAA,EAAA,GAAA,MAAA;EAad,SAAA,EAAA,CAAA,KAAA,EAAA,MAyHsD,EAAA,GAAA,MAAA;EAEvD,SAAA,EAAA,GAAA,GA/IM,qBA+I0B;AAC5C,CAAA;AAEY,KA/IA,kBAAA,GA+IoB;EAAW,OAAA,EA9IjC,qBA8IiC,GAAA,IAAA;EAC1C,OAAA,EA9IS,qBA8IT,CAAA,SAAA,CAAA,GAAA,IAAA;EAAuB,WAAA,EA7IV,mBA6IU,EAAA;EAAC,QAAA,EA5Id,gBA4Ic,EAAA;AAAe,CAAA;AAEZ,cAjIf,sBAiIe,EAAA;EAC3B,SAAA,4BAAA,EAAA;IAAuB,SAAA,SAAA,EAAA,SAAA;EAAC,CAAA;EAEpB,SAAA,4BAAgB,EAAA;IACV,SAAA,SAAA,EAAA,SAAA;EACkB,CAAA;EAArB,SAAA,2BAAA,EAAA;IACJ,SAAA,SAAA,EAAA;MAEY,SAAA,QAAA,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DAAA,EAAA;IAAgB,SAAA,SAAA,EAAA,SAAA;EAAxB,CAAA;EACL,SAAA,oDAAA,EAAA;IAC4B,SAAA,SAAA,EAAA;MAArB,SAAA,IAAA,EAAA,MAAA;MAAoB,SAAA,IAAA,EAAA,MAAA;IAItB,CAAA;EAGA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAvEA,sBAAA,UAAgC;KAChC,cAAA,SAAuB;KAEvB,iCAA+B,kBAC1C,uBAAuB;KAEnB,yBAAuB,kBAC3B,uBAAuB;;;KAEnB,6BACM,uBACH,qBAAqB,QACzB,qCAED,aAAa,oBACZ,mBACA;KAEQ,+BACD,uBACH,qBAAqB;aAIf,iBAAiB,KAAG;WACtB;SACF;;KAGE,qBAAA,WACL,iBAAiB,mBAAmB;KAG/B,oDAAoD,iBAC/D,gBACO,iBACH,mBAAmB,KACnB,QAAQ,OAAO,gBAAgB,QAAQ,mBAAmB;KAGnD,oBAAA;eACA,qBACL,gBACM,qBAAqB;eAGtB,qBAAqB;;KAG5B,iBAAA,WACE,iBAAiB,qBAAqB,+BAEzC,aAAa,0BAEZ,IACH;KAEU,0BAAA;eACA,wBACL,gBACM,qBAAqB;eAEtB,QAAQ,gBAAgB,yBAC7B,iBACO,qBAAqB;;KAIvB,4BAAA,GAA+B,6BAC1C;KAEW,wBAAA;UACH"}
|
|
@@ -30,6 +30,10 @@ const supportTextDefinitions = {
|
|
|
30
30
|
} },
|
|
31
31
|
"component.conversationButtonLink.lastMessage.visitor": { variables: { time: "" } },
|
|
32
32
|
"component.conversationButtonLink.typing": { variables: { name: "" } },
|
|
33
|
+
"component.conversationButtonLink.status.open": { variables: void 0 },
|
|
34
|
+
"component.conversationButtonLink.status.resolved": { variables: void 0 },
|
|
35
|
+
"component.conversationButtonLink.status.closed": { variables: void 0 },
|
|
36
|
+
"component.conversationButtonLink.status.spam": { variables: void 0 },
|
|
33
37
|
"component.conversationEvent.assigned": { variables: { actorName: "" } },
|
|
34
38
|
"component.conversationEvent.unassigned": { variables: { actorName: "" } },
|
|
35
39
|
"component.conversationEvent.default": { variables: { actorName: "" } },
|
|
@@ -42,6 +46,20 @@ const supportTextDefinitions = {
|
|
|
42
46
|
"component.conversationEvent.statusChanged": { variables: { actorName: "" } },
|
|
43
47
|
"component.conversationEvent.tagAdded": { variables: { actorName: "" } },
|
|
44
48
|
"component.conversationEvent.tagRemoved": { variables: { actorName: "" } },
|
|
49
|
+
"component.conversationEvent.visitorBlocked": { variables: { actorName: "" } },
|
|
50
|
+
"component.conversationEvent.visitorUnblocked": { variables: { actorName: "" } },
|
|
51
|
+
"component.conversationEvent.visitorIdentified": { variables: { actorName: "" } },
|
|
52
|
+
"component.identificationTool.title": { variables: void 0 },
|
|
53
|
+
"component.identificationTool.description": { variables: void 0 },
|
|
54
|
+
"component.identificationTool.cta": { variables: void 0 },
|
|
55
|
+
"component.identificationTool.loading": { variables: void 0 },
|
|
56
|
+
"component.identificationTool.success": { variables: void 0 },
|
|
57
|
+
"component.identificationTool.error": { variables: void 0 },
|
|
58
|
+
"component.identificationTool.validation": { variables: void 0 },
|
|
59
|
+
"component.identificationTool.inputPlaceholder": { variables: void 0 },
|
|
60
|
+
"component.identificationTool.inputLabel": { variables: void 0 },
|
|
61
|
+
"component.identificationTool.eventLog": { variables: void 0 },
|
|
62
|
+
"component.conversationPage.closedMessage": { variables: void 0 },
|
|
45
63
|
"component.multimodalInput.placeholder": { variables: void 0 },
|
|
46
64
|
"component.multimodalInput.remove": { variables: { fileName: "" } },
|
|
47
65
|
"component.navigation.articles": { variables: void 0 },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keys.js","names":[],"sources":["../../../../src/support/text/locales/keys.ts"],"sourcesContent":["import type {\n\tAvailableAIAgent,\n\tAvailableHumanAgent,\n\tPublicWebsiteResponse,\n} from \"@cossistant/types\";\n\nexport type SupportLocale = \"en\" | \"fr\" | \"es\";\n\nexport type SupportTimeOfDayToken = \"morning\" | \"afternoon\" | \"evening\";\n\nexport type SupportTimeOfDayValue = {\n\ttoken: SupportTimeOfDayToken;\n\tlabel: string;\n};\n\nexport type SupportTextUtils = {\n\tformatNumber: (value: number, options?: Intl.NumberFormatOptions) => string;\n\tpluralize: (count: number, options: { one: string; other: string }) => string;\n\ttitleCase: (value: string) => string;\n\ttimeOfDay: () => SupportTimeOfDayValue;\n};\n\nexport type SupportTextContext = {\n\twebsite: PublicWebsiteResponse | null;\n\tvisitor: PublicWebsiteResponse[\"visitor\"] | null;\n\thumanAgents: AvailableHumanAgent[];\n\taiAgents: AvailableAIAgent[];\n};\n\ntype SupportTextDefinition<Vars> =\n\t| {\n\t\t\tvariables: Vars;\n\t\t\toptional?: false;\n\t }\n\t| {\n\t\t\tvariables: Vars;\n\t\t\toptional: true;\n\t };\n\nexport const supportTextDefinitions = {\n\t\"common.actions.askQuestion\": { variables: undefined },\n\t\"common.actions.attachFiles\": { variables: undefined },\n\t\"common.actions.removeFile\": { variables: { fileName: \"\" as string } },\n\t\"common.brand.watermark\": { variables: undefined },\n\t\"common.fallbacks.aiAssistant\": { variables: undefined },\n\t\"common.fallbacks.cossistant\": { variables: undefined },\n\t\"common.fallbacks.someone\": { variables: undefined },\n\t\"common.fallbacks.supportTeam\": { variables: undefined },\n\t\"common.fallbacks.unknown\": { variables: undefined },\n\t\"common.fallbacks.you\": { variables: undefined },\n\t\"common.labels.aiAgentIndicator\": { variables: undefined },\n\t\"common.labels.supportOnline\": { variables: undefined },\n\t\"page.conversationHistory.showMore\": { variables: { count: 0 as number } },\n\t\"page.conversationHistory.title\": { variables: undefined },\n\t\"page.home.greeting\": {\n\t\tvariables: { visitorName: \"\" as string | undefined },\n\t\toptional: true,\n\t},\n\t\"page.home.history.more\": { variables: { count: 0 as number } },\n\t\"page.home.tagline\": {\n\t\tvariables: { websiteName: \"\" as string | null },\n\t\toptional: true,\n\t},\n\t\"component.conversationButtonLink.fallbackTitle\": {\n\t\tvariables: undefined,\n\t},\n\t\"component.conversationButtonLink.lastMessage.agent\": {\n\t\tvariables: { name: \"\" as string, time: \"\" as string },\n\t},\n\t\"component.conversationButtonLink.lastMessage.visitor\": {\n\t\tvariables: { time: \"\" as string },\n\t},\n\t\"component.conversationButtonLink.typing\": {\n\t\tvariables: { name: \"\" as string },\n\t},\n\t\"component.conversationEvent.assigned\": {\n\t\tvariables: { actorName: \"\" as string },\n\t},\n\t\"component.conversationEvent.unassigned\": {\n\t\tvariables: { actorName: \"\" as string },\n\t},\n\t\"component.conversationEvent.default\": {\n\t\tvariables: { actorName: \"\" as string },\n\t},\n\t\"component.conversationEvent.participantJoined\": {\n\t\tvariables: { actorName: \"\" as string },\n\t},\n\t\"component.conversationEvent.participantLeft\": {\n\t\tvariables: { actorName: \"\" as string },\n\t},\n\t\"component.conversationEvent.participantRequested\": {\n\t\tvariables: { actorName: \"\" as string },\n\t},\n\t\"component.conversationEvent.priorityChanged\": {\n\t\tvariables: { actorName: \"\" as string },\n\t},\n\t\"component.conversationEvent.reopened\": {\n\t\tvariables: { actorName: \"\" as string },\n\t},\n\t\"component.conversationEvent.resolved\": {\n\t\tvariables: { actorName: \"\" as string },\n\t},\n\t\"component.conversationEvent.statusChanged\": {\n\t\tvariables: { actorName: \"\" as string },\n\t},\n\t\"component.conversationEvent.tagAdded\": {\n\t\tvariables: { actorName: \"\" as string },\n\t},\n\t\"component.conversationEvent.tagRemoved\": {\n\t\tvariables: { actorName: \"\" as string },\n\t},\n\t\"component.multimodalInput.placeholder\": {\n\t\tvariables: undefined,\n\t},\n\t\"component.multimodalInput.remove\": {\n\t\tvariables: { fileName: \"\" as string },\n\t},\n\t\"component.navigation.articles\": {\n\t\tvariables: undefined,\n\t},\n\t\"component.navigation.home\": {\n\t\tvariables: undefined,\n\t},\n\t\"component.message.timestamp.aiIndicator\": {\n\t\tvariables: undefined,\n\t},\n} as const satisfies Record<string, SupportTextDefinition<unknown>>;\n\nexport type SupportTextDefinitions = typeof supportTextDefinitions;\nexport type SupportTextKey = keyof SupportTextDefinitions;\n\nexport type SupportTextVariables<K extends SupportTextKey> =\n\tSupportTextDefinitions[K][\"variables\"];\n\ntype OptionalFlag<K extends SupportTextKey> =\n\tSupportTextDefinitions[K] extends { optional: true } ? true : false;\n\ntype MessageVariables<\n\tK extends SupportTextKey,\n\tVars = SupportTextVariables<K>,\n> = Vars extends undefined\n\t? undefined\n\t: OptionalFlag<K> extends true\n\t\t? Vars | undefined\n\t\t: Vars;\n\nexport type SupportTextMessage<\n\tK extends SupportTextKey,\n\tVars = SupportTextVariables<K>,\n> =\n\t| string\n\t| ((args: {\n\t\t\tvariables: MessageVariables<K, Vars>;\n\t\t\tcontext: SupportTextContext;\n\t\t\tutils: SupportTextUtils;\n\t }) => string);\n\nexport type SupportLocaleMessages = {\n\t[K in SupportTextKey]: SupportTextMessage<K>;\n};\n\nexport type SupportTextContentOverrides<Locale extends string = SupportLocale> =\n\tPartial<{\n\t\t[K in SupportTextKey]:\n\t\t\t| SupportTextMessage<K>\n\t\t\t| Partial<Record<SupportLocale | Locale, SupportTextMessage<K>>>;\n\t}>;\n\nexport type SupportTextFormatter = {\n\t<K extends SupportTextKey>(\n\t\tkey: K,\n\t\tvariables: SupportTextVariables<K>\n\t): string;\n\t// biome-ignore lint/style/useUnifiedTypeSignatures: overload needed for strict variable checking\n\t<K extends SupportTextKey>(key: K): string;\n};\n\ntype KeysWithVariables = {\n\t[K in SupportTextKey]: SupportTextVariables<K> extends undefined\n\t\t? never\n\t\t: OptionalFlag<K> extends true\n\t\t\t? never\n\t\t\t: K;\n}[SupportTextKey];\n\nexport type StrictSupportTextFormatter = {\n\t<K extends KeysWithVariables>(\n\t\tkey: K,\n\t\tvariables: SupportTextVariables<K>\n\t): string;\n\t<K extends Exclude<SupportTextKey, KeysWithVariables>>(\n\t\tkey: K,\n\t\tvariables?: SupportTextVariables<K>\n\t): string;\n};\n\nexport type SupportTextResolvedFormatter = StrictSupportTextFormatter &\n\tSupportTextFormatter;\n\nexport type SupportTextProviderValue = {\n\tformat: SupportTextResolvedFormatter;\n\tlocale: string;\n};\n"],"mappings":";AAuCA,MAAa,yBAAyB;CACrC,8BAA8B,EAAE,WAAW,QAAW;CACtD,8BAA8B,EAAE,WAAW,QAAW;CACtD,6BAA6B,EAAE,WAAW,EAAE,UAAU,IAAc,EAAE;CACtE,0BAA0B,EAAE,WAAW,QAAW;CAClD,gCAAgC,EAAE,WAAW,QAAW;CACxD,+BAA+B,EAAE,WAAW,QAAW;CACvD,4BAA4B,EAAE,WAAW,QAAW;CACpD,gCAAgC,EAAE,WAAW,QAAW;CACxD,4BAA4B,EAAE,WAAW,QAAW;CACpD,wBAAwB,EAAE,WAAW,QAAW;CAChD,kCAAkC,EAAE,WAAW,QAAW;CAC1D,+BAA+B,EAAE,WAAW,QAAW;CACvD,qCAAqC,EAAE,WAAW,EAAE,OAAO,GAAa,EAAE;CAC1E,kCAAkC,EAAE,WAAW,QAAW;CAC1D,sBAAsB;EACrB,WAAW,EAAE,aAAa,IAA0B;EACpD,UAAU;EACV;CACD,0BAA0B,EAAE,WAAW,EAAE,OAAO,GAAa,EAAE;CAC/D,qBAAqB;EACpB,WAAW,EAAE,aAAa,IAAqB;EAC/C,UAAU;EACV;CACD,kDAAkD,EACjD,WAAW,QACX;CACD,sDAAsD,EACrD,WAAW;EAAE,MAAM;EAAc,MAAM;EAAc,EACrD;CACD,wDAAwD,EACvD,WAAW,EAAE,MAAM,IAAc,EACjC;CACD,2CAA2C,EAC1C,WAAW,EAAE,MAAM,IAAc,EACjC;CACD,wCAAwC,EACvC,WAAW,EAAE,WAAW,IAAc,EACtC;CACD,0CAA0C,EACzC,WAAW,EAAE,WAAW,IAAc,EACtC;CACD,uCAAuC,EACtC,WAAW,EAAE,WAAW,IAAc,EACtC;CACD,iDAAiD,EAChD,WAAW,EAAE,WAAW,IAAc,EACtC;CACD,+CAA+C,EAC9C,WAAW,EAAE,WAAW,IAAc,EACtC;CACD,oDAAoD,EACnD,WAAW,EAAE,WAAW,IAAc,EACtC;CACD,+CAA+C,EAC9C,WAAW,EAAE,WAAW,IAAc,EACtC;CACD,wCAAwC,EACvC,WAAW,EAAE,WAAW,IAAc,EACtC;CACD,wCAAwC,EACvC,WAAW,EAAE,WAAW,IAAc,EACtC;CACD,6CAA6C,EAC5C,WAAW,EAAE,WAAW,IAAc,EACtC;CACD,wCAAwC,EACvC,WAAW,EAAE,WAAW,IAAc,EACtC;CACD,0CAA0C,EACzC,WAAW,EAAE,WAAW,IAAc,EACtC;CACD,yCAAyC,EACxC,WAAW,QACX;CACD,oCAAoC,EACnC,WAAW,EAAE,UAAU,IAAc,EACrC;CACD,iCAAiC,EAChC,WAAW,QACX;CACD,6BAA6B,EAC5B,WAAW,QACX;CACD,2CAA2C,EAC1C,WAAW,QACX;CACD"}
|
|
1
|
+
{"version":3,"file":"keys.js","names":[],"sources":["../../../../src/support/text/locales/keys.ts"],"sourcesContent":["import type {\n\tAvailableAIAgent,\n\tAvailableHumanAgent,\n\tPublicWebsiteResponse,\n} from \"@cossistant/types\";\n\nexport type SupportLocale = \"en\" | \"fr\" | \"es\";\n\nexport type SupportTimeOfDayToken = \"morning\" | \"afternoon\" | \"evening\";\n\nexport type SupportTimeOfDayValue = {\n\ttoken: SupportTimeOfDayToken;\n\tlabel: string;\n};\n\nexport type SupportTextUtils = {\n\tformatNumber: (value: number, options?: Intl.NumberFormatOptions) => string;\n\tpluralize: (count: number, options: { one: string; other: string }) => string;\n\ttitleCase: (value: string) => string;\n\ttimeOfDay: () => SupportTimeOfDayValue;\n};\n\nexport type SupportTextContext = {\n\twebsite: PublicWebsiteResponse | null;\n\tvisitor: PublicWebsiteResponse[\"visitor\"] | null;\n\thumanAgents: AvailableHumanAgent[];\n\taiAgents: AvailableAIAgent[];\n};\n\ntype SupportTextDefinition<Vars> =\n\t| {\n\t\t\tvariables: Vars;\n\t\t\toptional?: false;\n\t }\n\t| {\n\t\t\tvariables: Vars;\n\t\t\toptional: true;\n\t };\n\nexport const supportTextDefinitions = {\n\t\"common.actions.askQuestion\": { variables: undefined },\n\t\"common.actions.attachFiles\": { variables: undefined },\n\t\"common.actions.removeFile\": { variables: { fileName: \"\" as string } },\n\t\"common.brand.watermark\": { variables: undefined },\n\t\"common.fallbacks.aiAssistant\": { variables: undefined },\n\t\"common.fallbacks.cossistant\": { variables: undefined },\n\t\"common.fallbacks.someone\": { variables: undefined },\n\t\"common.fallbacks.supportTeam\": { variables: undefined },\n\t\"common.fallbacks.unknown\": { variables: undefined },\n\t\"common.fallbacks.you\": { variables: undefined },\n\t\"common.labels.aiAgentIndicator\": { variables: undefined },\n\t\"common.labels.supportOnline\": { variables: undefined },\n\t\"page.conversationHistory.showMore\": { variables: { count: 0 as number } },\n\t\"page.conversationHistory.title\": { variables: undefined },\n\t\"page.home.greeting\": {\n\t\tvariables: { visitorName: \"\" as string | undefined },\n\t\toptional: true,\n\t},\n\t\"page.home.history.more\": { variables: { count: 0 as number } },\n\t\"page.home.tagline\": {\n\t\tvariables: { websiteName: \"\" as string | null },\n\t\toptional: true,\n\t},\n\t\"component.conversationButtonLink.fallbackTitle\": {\n\t\tvariables: undefined,\n\t},\n\t\"component.conversationButtonLink.lastMessage.agent\": {\n\t\tvariables: { name: \"\" as string, time: \"\" as string },\n\t},\n\t\"component.conversationButtonLink.lastMessage.visitor\": {\n\t\tvariables: { time: \"\" as string },\n\t},\n\t\"component.conversationButtonLink.typing\": {\n\t\tvariables: { name: \"\" as string },\n\t},\n\t\"component.conversationButtonLink.status.open\": {\n\t\tvariables: undefined,\n\t},\n\t\"component.conversationButtonLink.status.resolved\": {\n\t\tvariables: undefined,\n\t},\n\t\"component.conversationButtonLink.status.closed\": {\n\t\tvariables: undefined,\n\t},\n\t\"component.conversationButtonLink.status.spam\": {\n\t\tvariables: undefined,\n\t},\n\t\"component.conversationEvent.assigned\": {\n\t\tvariables: { actorName: \"\" as string },\n\t},\n\t\"component.conversationEvent.unassigned\": {\n\t\tvariables: { actorName: \"\" as string },\n\t},\n\t\"component.conversationEvent.default\": {\n\t\tvariables: { actorName: \"\" as string },\n\t},\n\t\"component.conversationEvent.participantJoined\": {\n\t\tvariables: { actorName: \"\" as string },\n\t},\n\t\"component.conversationEvent.participantLeft\": {\n\t\tvariables: { actorName: \"\" as string },\n\t},\n\t\"component.conversationEvent.participantRequested\": {\n\t\tvariables: { actorName: \"\" as string },\n\t},\n\t\"component.conversationEvent.priorityChanged\": {\n\t\tvariables: { actorName: \"\" as string },\n\t},\n\t\"component.conversationEvent.reopened\": {\n\t\tvariables: { actorName: \"\" as string },\n\t},\n\t\"component.conversationEvent.resolved\": {\n\t\tvariables: { actorName: \"\" as string },\n\t},\n\t\"component.conversationEvent.statusChanged\": {\n\t\tvariables: { actorName: \"\" as string },\n\t},\n\t\"component.conversationEvent.tagAdded\": {\n\t\tvariables: { actorName: \"\" as string },\n\t},\n\t\"component.conversationEvent.tagRemoved\": {\n\t\tvariables: { actorName: \"\" as string },\n\t},\n\t\"component.conversationEvent.visitorBlocked\": {\n\t\tvariables: { actorName: \"\" as string },\n\t},\n\t\"component.conversationEvent.visitorUnblocked\": {\n\t\tvariables: { actorName: \"\" as string },\n\t},\n\t\"component.conversationEvent.visitorIdentified\": {\n\t\tvariables: { actorName: \"\" as string },\n\t},\n\t\"component.identificationTool.title\": { variables: undefined },\n\t\"component.identificationTool.description\": { variables: undefined },\n\t\"component.identificationTool.cta\": { variables: undefined },\n\t\"component.identificationTool.loading\": { variables: undefined },\n\t\"component.identificationTool.success\": { variables: undefined },\n\t\"component.identificationTool.error\": { variables: undefined },\n\t\"component.identificationTool.validation\": { variables: undefined },\n\t\"component.identificationTool.inputPlaceholder\": { variables: undefined },\n\t\"component.identificationTool.inputLabel\": { variables: undefined },\n\t\"component.identificationTool.eventLog\": { variables: undefined },\n\t\"component.conversationPage.closedMessage\": {\n\t\tvariables: undefined,\n\t},\n\t\"component.multimodalInput.placeholder\": {\n\t\tvariables: undefined,\n\t},\n\t\"component.multimodalInput.remove\": {\n\t\tvariables: { fileName: \"\" as string },\n\t},\n\t\"component.navigation.articles\": {\n\t\tvariables: undefined,\n\t},\n\t\"component.navigation.home\": {\n\t\tvariables: undefined,\n\t},\n\t\"component.message.timestamp.aiIndicator\": {\n\t\tvariables: undefined,\n\t},\n} as const satisfies Record<string, SupportTextDefinition<unknown>>;\n\nexport type SupportTextDefinitions = typeof supportTextDefinitions;\nexport type SupportTextKey = keyof SupportTextDefinitions;\n\nexport type SupportTextVariables<K extends SupportTextKey> =\n\tSupportTextDefinitions[K][\"variables\"];\n\ntype OptionalFlag<K extends SupportTextKey> =\n\tSupportTextDefinitions[K] extends { optional: true } ? true : false;\n\ntype MessageVariables<\n\tK extends SupportTextKey,\n\tVars = SupportTextVariables<K>,\n> = Vars extends undefined\n\t? undefined\n\t: OptionalFlag<K> extends true\n\t\t? Vars | undefined\n\t\t: Vars;\n\nexport type SupportTextMessage<\n\tK extends SupportTextKey,\n\tVars = SupportTextVariables<K>,\n> =\n\t| string\n\t| ((args: {\n\t\t\tvariables: MessageVariables<K, Vars>;\n\t\t\tcontext: SupportTextContext;\n\t\t\tutils: SupportTextUtils;\n\t }) => string);\n\nexport type SupportLocaleMessages = {\n\t[K in SupportTextKey]: SupportTextMessage<K>;\n};\n\nexport type SupportTextContentOverrides<Locale extends string = SupportLocale> =\n\tPartial<{\n\t\t[K in SupportTextKey]:\n\t\t\t| SupportTextMessage<K>\n\t\t\t| Partial<Record<SupportLocale | Locale, SupportTextMessage<K>>>;\n\t}>;\n\nexport type SupportTextFormatter = {\n\t<K extends SupportTextKey>(\n\t\tkey: K,\n\t\tvariables: SupportTextVariables<K>\n\t): string;\n\t// biome-ignore lint/style/useUnifiedTypeSignatures: overload needed for strict variable checking\n\t<K extends SupportTextKey>(key: K): string;\n};\n\ntype KeysWithVariables = {\n\t[K in SupportTextKey]: SupportTextVariables<K> extends undefined\n\t\t? never\n\t\t: OptionalFlag<K> extends true\n\t\t\t? never\n\t\t\t: K;\n}[SupportTextKey];\n\nexport type StrictSupportTextFormatter = {\n\t<K extends KeysWithVariables>(\n\t\tkey: K,\n\t\tvariables: SupportTextVariables<K>\n\t): string;\n\t<K extends Exclude<SupportTextKey, KeysWithVariables>>(\n\t\tkey: K,\n\t\tvariables?: SupportTextVariables<K>\n\t): string;\n};\n\nexport type SupportTextResolvedFormatter = StrictSupportTextFormatter &\n\tSupportTextFormatter;\n\nexport type SupportTextProviderValue = {\n\tformat: SupportTextResolvedFormatter;\n\tlocale: string;\n};\n"],"mappings":";AAuCA,MAAa,yBAAyB;CACrC,8BAA8B,EAAE,WAAW,QAAW;CACtD,8BAA8B,EAAE,WAAW,QAAW;CACtD,6BAA6B,EAAE,WAAW,EAAE,UAAU,IAAc,EAAE;CACtE,0BAA0B,EAAE,WAAW,QAAW;CAClD,gCAAgC,EAAE,WAAW,QAAW;CACxD,+BAA+B,EAAE,WAAW,QAAW;CACvD,4BAA4B,EAAE,WAAW,QAAW;CACpD,gCAAgC,EAAE,WAAW,QAAW;CACxD,4BAA4B,EAAE,WAAW,QAAW;CACpD,wBAAwB,EAAE,WAAW,QAAW;CAChD,kCAAkC,EAAE,WAAW,QAAW;CAC1D,+BAA+B,EAAE,WAAW,QAAW;CACvD,qCAAqC,EAAE,WAAW,EAAE,OAAO,GAAa,EAAE;CAC1E,kCAAkC,EAAE,WAAW,QAAW;CAC1D,sBAAsB;EACrB,WAAW,EAAE,aAAa,IAA0B;EACpD,UAAU;EACV;CACD,0BAA0B,EAAE,WAAW,EAAE,OAAO,GAAa,EAAE;CAC/D,qBAAqB;EACpB,WAAW,EAAE,aAAa,IAAqB;EAC/C,UAAU;EACV;CACD,kDAAkD,EACjD,WAAW,QACX;CACD,sDAAsD,EACrD,WAAW;EAAE,MAAM;EAAc,MAAM;EAAc,EACrD;CACD,wDAAwD,EACvD,WAAW,EAAE,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CACnE,yCAAyC,EAAE,WAAW,QAAW;CACjE,4CAA4C,EAC3C,WAAW,QACX;CACD,yCAAyC,EACxC,WAAW,QACX;CACD,oCAAoC,EACnC,WAAW,EAAE,UAAU,IAAc,EACrC;CACD,iCAAiC,EAChC,WAAW,QACX;CACD,6BAA6B,EAC5B,WAAW,QACX;CACD,2CAA2C,EAC1C,WAAW,QACX;CACD"}
|
|
@@ -7,10 +7,31 @@ type NormalizedOverride<K extends SupportTextKey> = {
|
|
|
7
7
|
};
|
|
8
8
|
type NormalizedOverrides = Map<SupportTextKey, NormalizedOverride<SupportTextKey>>;
|
|
9
9
|
declare const BUILTIN_LOCALES: Record<SupportLocale, SupportLocaleMessages>;
|
|
10
|
+
/**
|
|
11
|
+
* Builds formatting helpers tailored for the visitor locale. The utilities are
|
|
12
|
+
* memoized by callers and include number formatting, pluralization, title
|
|
13
|
+
* casing and dynamic time-of-day descriptions.
|
|
14
|
+
*/
|
|
10
15
|
declare function createTextUtils(locale: string, isHydrated?: boolean): SupportTextUtils;
|
|
16
|
+
/**
|
|
17
|
+
* Derives the locale preference order from visitor/provider hints while
|
|
18
|
+
* guaranteeing an English fallback.
|
|
19
|
+
*/
|
|
11
20
|
declare function buildLocaleChain(preferences: Array<string | null | undefined>): string[];
|
|
21
|
+
/**
|
|
22
|
+
* Canonicalizes text override definitions into a lookup map that can be
|
|
23
|
+
* consumed efficiently at runtime.
|
|
24
|
+
*/
|
|
12
25
|
declare function normalizeOverrides(overrides?: SupportTextContentOverrides<string>): NormalizedOverrides;
|
|
26
|
+
/**
|
|
27
|
+
* Finds the best matching localized string for a key, consulting overrides
|
|
28
|
+
* before bundled locale dictionaries.
|
|
29
|
+
*/
|
|
13
30
|
declare function resolveMessage<K extends SupportTextKey>(key: K, localeChain: string[], overrides: NormalizedOverrides): SupportLocaleMessages[K];
|
|
31
|
+
/**
|
|
32
|
+
* Produces the final rendered string by executing function overrides or
|
|
33
|
+
* interpolating variables into template literals.
|
|
34
|
+
*/
|
|
14
35
|
declare function evaluateMessage<K extends SupportTextKey>(key: K, message: SupportLocaleMessages[K], variables: SupportTextVariables<K> | undefined, context: SupportTextContext, utils: SupportTextUtils): string;
|
|
15
36
|
//#endregion
|
|
16
37
|
export { BUILTIN_LOCALES, NormalizedOverride, NormalizedOverrides, buildLocaleChain, createTextUtils, evaluateMessage, normalizeOverrides, resolveMessage };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","names":[],"sources":["../../../src/support/text/runtime.ts"],"sourcesContent":[],"mappings":";;;KAeY,6BAA6B;cAC5B,sBAAsB;EADvB,QAAA,EAED,GAFC,CAAA,MAAA,EAEW,qBAFO,CAEe,CAFf,CAAA,CAAA;
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","names":[],"sources":["../../../src/support/text/runtime.ts"],"sourcesContent":[],"mappings":";;;KAeY,6BAA6B;cAC5B,sBAAsB;EADvB,QAAA,EAED,GAFC,CAAA,MAAA,EAEW,qBAFO,CAEe,CAFf,CAAA,CAAA;CAAW;AAC5B,KAID,mBAAA,GAAsB,GAJrB,CAKZ,cALY,EAMZ,kBANY,CAMO,cANP,CAAA,CAAA;AAAsB,cAStB,eATsB,EASL,MATK,CASE,aATF,EASiB,qBATjB,CAAA;;;;;AAInC;AACC,iBA6De,eAAA,CA7Df,MAAA,EAAA,MAAA,EAAA,UAAA,CAAA,EAAA,OAAA,CAAA,EAgEE,gBAhEF;;;;;AAIY,iBA2HG,gBAAA,CAvHf,WAAA,EAwHa,KAxHb,CAAA,MAAA,GAAA,IAAA,GAAA,SAAA,CAAA,CAAA,EAAA,MAAA,EAAA;;;;;AAqDe,iBAoGA,kBAAA,CAjGb,SAAgB,CAAA,EAkGN,2BAlGM,CAAA,MAAA,CAAA,CAAA,EAmGhB,mBAnGgB;AA+DnB;AAkCA;AA4CA;;AACM,iBADU,cACV,CAAA,UADmC,cACnC,CAAA,CAAA,GAAA,EAAA,CAAA,EAAA,WAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAEM,mBAFN,CAAA,EAGH,qBAHG,CAGmB,CAHnB,CAAA;;;;;AA8BU,iBAAA,eAAe,CAAA,UAAW,cAAX,CAAA,CAAA,GAAA,EACzB,CADyB,EAAA,OAAA,EAErB,qBAFqB,CAEC,CAFD,CAAA,EAAA,SAAA,EAGnB,oBAHmB,CAGE,CAHF,CAAA,GAAA,SAAA,EAAA,OAAA,EAIrB,kBAJqB,EAAA,KAAA,EAKvB,gBALuB,CAAA,EAAA,MAAA"}
|
package/support/text/runtime.js
CHANGED
|
@@ -50,6 +50,11 @@ function buildDayPeriodLabels(locale) {
|
|
|
50
50
|
return fallback;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Builds formatting helpers tailored for the visitor locale. The utilities are
|
|
55
|
+
* memoized by callers and include number formatting, pluralization, title
|
|
56
|
+
* casing and dynamic time-of-day descriptions.
|
|
57
|
+
*/
|
|
53
58
|
function createTextUtils(locale, isHydrated = false) {
|
|
54
59
|
const numberFormatter = new Intl.NumberFormat(locale);
|
|
55
60
|
const pluralRules = new Intl.PluralRules(locale);
|
|
@@ -91,6 +96,10 @@ function normalizeLocaleString(locale) {
|
|
|
91
96
|
const [base] = locale.toLowerCase().split("-");
|
|
92
97
|
return base || locale.toLowerCase();
|
|
93
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* Derives the locale preference order from visitor/provider hints while
|
|
101
|
+
* guaranteeing an English fallback.
|
|
102
|
+
*/
|
|
94
103
|
function buildLocaleChain(preferences) {
|
|
95
104
|
const seen = /* @__PURE__ */ new Set();
|
|
96
105
|
const chain = [];
|
|
@@ -108,6 +117,10 @@ function buildLocaleChain(preferences) {
|
|
|
108
117
|
if (!seen.has("en")) chain.push("en");
|
|
109
118
|
return chain;
|
|
110
119
|
}
|
|
120
|
+
/**
|
|
121
|
+
* Canonicalizes text override definitions into a lookup map that can be
|
|
122
|
+
* consumed efficiently at runtime.
|
|
123
|
+
*/
|
|
111
124
|
function normalizeOverrides(overrides) {
|
|
112
125
|
const map = /* @__PURE__ */ new Map();
|
|
113
126
|
if (!overrides) return map;
|
|
@@ -130,6 +143,10 @@ function normalizeOverrides(overrides) {
|
|
|
130
143
|
}
|
|
131
144
|
return map;
|
|
132
145
|
}
|
|
146
|
+
/**
|
|
147
|
+
* Finds the best matching localized string for a key, consulting overrides
|
|
148
|
+
* before bundled locale dictionaries.
|
|
149
|
+
*/
|
|
133
150
|
function resolveMessage(key, localeChain, overrides) {
|
|
134
151
|
const override = overrides.get(key);
|
|
135
152
|
if (override) {
|
|
@@ -142,6 +159,10 @@ function resolveMessage(key, localeChain, overrides) {
|
|
|
142
159
|
for (const locale of localeChain) if (locale in BUILTIN_LOCALES) return BUILTIN_LOCALES[locale][key];
|
|
143
160
|
return BUILTIN_LOCALES.en[key];
|
|
144
161
|
}
|
|
162
|
+
/**
|
|
163
|
+
* Produces the final rendered string by executing function overrides or
|
|
164
|
+
* interpolating variables into template literals.
|
|
165
|
+
*/
|
|
145
166
|
function evaluateMessage(key, message, variables, context, utils) {
|
|
146
167
|
if (typeof message === "function") return message({
|
|
147
168
|
variables,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","names":["BUILTIN_LOCALES: Record<SupportLocale, SupportLocaleMessages>","TIME_OF_DAY_THRESHOLDS: Array<{\n\ttoken: SupportTimeOfDayToken;\n\thour: number;\n}>","fallback: Record<SupportTimeOfDayToken, string>","labels: Partial<Record<SupportTimeOfDayToken, string>>","token: SupportTimeOfDayToken","chain: string[]","map: NormalizedOverrides"],"sources":["../../../src/support/text/runtime.ts"],"sourcesContent":["/** biome-ignore-all lint/nursery/useMaxParams: ok here */\nimport en from \"./locales/en\";\nimport es from \"./locales/es\";\nimport fr from \"./locales/fr\";\nimport type {\n\tSupportLocale,\n\tSupportLocaleMessages,\n\tSupportTextContentOverrides,\n\tSupportTextContext,\n\tSupportTextKey,\n\tSupportTextUtils,\n\tSupportTextVariables,\n\tSupportTimeOfDayToken,\n} from \"./locales/keys\";\n\nexport type NormalizedOverride<K extends SupportTextKey> = {\n\tanyLocale?: SupportLocaleMessages[K];\n\tbyLocale: Map<string, SupportLocaleMessages[K]>;\n};\n\nexport type NormalizedOverrides = Map<\n\tSupportTextKey,\n\tNormalizedOverride<SupportTextKey>\n>;\n\nexport const BUILTIN_LOCALES: Record<SupportLocale, SupportLocaleMessages> = {\n\ten,\n\tfr,\n\tes,\n};\n\nconst TIME_OF_DAY_THRESHOLDS: Array<{\n\ttoken: SupportTimeOfDayToken;\n\thour: number;\n}> = [\n\t{ token: \"morning\", hour: 9 },\n\t{ token: \"afternoon\", hour: 15 },\n\t{ token: \"evening\", hour: 20 },\n];\n\nfunction buildDayPeriodLabels(\n\tlocale: string\n): Record<SupportTimeOfDayToken, string> {\n\tconst fallback: Record<SupportTimeOfDayToken, string> = {\n\t\tmorning: \"morning\",\n\t\tafternoon: \"afternoon\",\n\t\tevening: \"evening\",\n\t};\n\n\ttry {\n\t\tconst formatter = new Intl.DateTimeFormat(locale, {\n\t\t\thour: \"numeric\",\n\t\t\thour12: true,\n\t\t});\n\n\t\tconst labels: Partial<Record<SupportTimeOfDayToken, string>> = {};\n\t\tfor (const { token, hour } of TIME_OF_DAY_THRESHOLDS) {\n\t\t\tconst parts = formatter.formatToParts(new Date(2020, 0, 1, hour));\n\t\t\tconst part = parts.find((segment) => segment.type === \"dayPeriod\");\n\t\t\tif (part?.value) {\n\t\t\t\tconst normalized = part.value.trim();\n\t\t\t\tif (normalized) {\n\t\t\t\t\tlabels[token] = normalized;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tmorning: labels.morning ?? fallback.morning,\n\t\t\tafternoon: labels.afternoon ?? fallback.afternoon,\n\t\t\tevening: labels.evening ?? fallback.evening,\n\t\t};\n\t} catch {\n\t\treturn fallback;\n\t}\n}\n\nexport function createTextUtils(\n\tlocale: string,\n\tisHydrated = false\n): SupportTextUtils {\n\tconst numberFormatter = new Intl.NumberFormat(locale);\n\tconst pluralRules = new Intl.PluralRules(locale);\n\tconst dayPeriodLabels = buildDayPeriodLabels(locale);\n\n\treturn {\n\t\tformatNumber: (value: number, options?: Intl.NumberFormatOptions) =>\n\t\t\toptions\n\t\t\t\t? new Intl.NumberFormat(locale, options).format(value)\n\t\t\t\t: numberFormatter.format(value),\n\t\tpluralize: (count: number, options: { one: string; other: string }) => {\n\t\t\tconst rule = pluralRules.select(count);\n\t\t\treturn rule === \"one\" ? options.one : options.other;\n\t\t},\n\t\ttitleCase: (value: string) => {\n\t\t\tif (!value) {\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t\treturn value.charAt(0).toUpperCase() + value.slice(1);\n\t\t},\n\t\ttimeOfDay: () => {\n\t\t\t// Return a stable default during SSR to avoid hydration mismatches\n\t\t\tif (!isHydrated) {\n\t\t\t\treturn {\n\t\t\t\t\ttoken: \"morning\" as SupportTimeOfDayToken,\n\t\t\t\t\tlabel: dayPeriodLabels.morning,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst hour = new Date().getHours();\n\t\t\tlet token: SupportTimeOfDayToken;\n\t\t\tif (hour < 12) {\n\t\t\t\ttoken = \"morning\";\n\t\t\t} else if (hour < 18) {\n\t\t\t\ttoken = \"afternoon\";\n\t\t\t} else {\n\t\t\t\ttoken = \"evening\";\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\ttoken,\n\t\t\t\tlabel: dayPeriodLabels[token],\n\t\t\t};\n\t\t},\n\t};\n}\n\n/**\n * Normalize a locale string to its base language code\n * Examples:\n * - \"en-US\" -> \"en\"\n * - \"en-GB\" -> \"en\"\n * - \"fr-FR\" -> \"fr\"\n */\nfunction normalizeLocaleString(locale: string): string {\n\tconst [base] = locale.toLowerCase().split(\"-\");\n\treturn base || locale.toLowerCase();\n}\n\nexport function buildLocaleChain(\n\tpreferences: Array<string | null | undefined>\n): string[] {\n\tconst seen = new Set<string>();\n\tconst chain: string[] = [];\n\n\tconst pushLocale = (value: string) => {\n\t\t// Always normalize to base language (en-US -> en, en-GB -> en)\n\t\tconst normalized = normalizeLocaleString(value);\n\t\tif (!seen.has(normalized)) {\n\t\t\tseen.add(normalized);\n\t\t\tchain.push(normalized);\n\t\t}\n\t};\n\n\tfor (const candidate of preferences) {\n\t\tif (!candidate) {\n\t\t\tcontinue;\n\t\t}\n\t\tpushLocale(candidate);\n\t}\n\n\t// Always fallback to English\n\tif (!seen.has(\"en\")) {\n\t\tchain.push(\"en\");\n\t}\n\n\treturn chain;\n}\n\nexport function normalizeOverrides(\n\toverrides?: SupportTextContentOverrides<string>\n): NormalizedOverrides {\n\tconst map: NormalizedOverrides = new Map();\n\n\tif (!overrides) {\n\t\treturn map;\n\t}\n\n\tfor (const key of Object.keys(overrides) as SupportTextKey[]) {\n\t\tconst value = overrides[key];\n\t\tif (!value) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (typeof value === \"string\" || typeof value === \"function\") {\n\t\t\tmap.set(key, {\n\t\t\t\tanyLocale: value as SupportLocaleMessages[typeof key],\n\t\t\t\tbyLocale: new Map(),\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst byLocale = new Map<string, SupportLocaleMessages[typeof key]>();\n\t\tfor (const [locale, localizedValue] of Object.entries(value)) {\n\t\t\tif (!localizedValue) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tbyLocale.set(\n\t\t\t\tlocale.toLowerCase(),\n\t\t\t\tlocalizedValue as SupportLocaleMessages[typeof key]\n\t\t\t);\n\t\t}\n\n\t\tmap.set(key, { byLocale });\n\t}\n\n\treturn map;\n}\n\nexport function resolveMessage<K extends SupportTextKey>(\n\tkey: K,\n\tlocaleChain: string[],\n\toverrides: NormalizedOverrides\n): SupportLocaleMessages[K] {\n\tconst override = overrides.get(key) as NormalizedOverride<K> | undefined;\n\tif (override) {\n\t\tfor (const locale of localeChain) {\n\t\t\tconst localized = override.byLocale.get(locale);\n\t\t\tif (localized) {\n\t\t\t\treturn localized;\n\t\t\t}\n\t\t}\n\t\tif (override.anyLocale) {\n\t\t\treturn override.anyLocale;\n\t\t}\n\t}\n\n\tfor (const locale of localeChain) {\n\t\tif (locale in BUILTIN_LOCALES) {\n\t\t\treturn BUILTIN_LOCALES[locale as SupportLocale][key];\n\t\t}\n\t}\n\n\treturn BUILTIN_LOCALES.en[key];\n}\n\nexport function evaluateMessage<K extends SupportTextKey>(\n\tkey: K,\n\tmessage: SupportLocaleMessages[K],\n\tvariables: SupportTextVariables<K> | undefined,\n\tcontext: SupportTextContext,\n\tutils: SupportTextUtils\n): string {\n\tif (typeof message === \"function\") {\n\t\treturn message({\n\t\t\tvariables: variables as never,\n\t\t\tcontext,\n\t\t\tutils,\n\t\t});\n\t}\n\n\treturn message;\n}\n"],"mappings":";;;;;AAyBA,MAAaA,kBAAgE;CAC5E;CACA;CACA;CACA;AAED,MAAMC,yBAGD;CACJ;EAAE,OAAO;EAAW,MAAM;EAAG;CAC7B;EAAE,OAAO;EAAa,MAAM;EAAI;CAChC;EAAE,OAAO;EAAW,MAAM;EAAI;CAC9B;AAED,SAAS,qBACR,QACwC;CACxC,MAAMC,WAAkD;EACvD,SAAS;EACT,WAAW;EACX,SAAS;EACT;AAED,KAAI;EACH,MAAM,YAAY,IAAI,KAAK,eAAe,QAAQ;GACjD,MAAM;GACN,QAAQ;GACR,CAAC;EAEF,MAAMC,SAAyD,EAAE;AACjE,OAAK,MAAM,EAAE,OAAO,UAAU,wBAAwB;GAErD,MAAM,OADQ,UAAU,cAAc,IAAI,KAAK,MAAM,GAAG,GAAG,KAAK,CAAC,CAC9C,MAAM,YAAY,QAAQ,SAAS,YAAY;AAClE,OAAI,MAAM,OAAO;IAChB,MAAM,aAAa,KAAK,MAAM,MAAM;AACpC,QAAI,WACH,QAAO,SAAS;;;AAKnB,SAAO;GACN,SAAS,OAAO,WAAW,SAAS;GACpC,WAAW,OAAO,aAAa,SAAS;GACxC,SAAS,OAAO,WAAW,SAAS;GACpC;SACM;AACP,SAAO;;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AAK;AAGjB,QAAO;;AAGR,SAAgB,mBACf,WACsB;CACtB,MAAMC,sBAA2B,IAAI,KAAK;AAE1C,KAAI,CAAC,UACJ,QAAO;AAGR,MAAK,MAAM,OAAO,OAAO,KAAK,UAAU,EAAsB;EAC7D,MAAM,QAAQ,UAAU;AACxB,MAAI,CAAC,MACJ;AAGD,MAAI,OAAO,UAAU,YAAY,OAAO,UAAU,YAAY;AAC7D,OAAI,IAAI,KAAK;IACZ,WAAW;IACX,0BAAU,IAAI,KAAK;IACnB,CAAC;AACF;;EAGD,MAAM,2BAAW,IAAI,KAAgD;AACrE,OAAK,MAAM,CAAC,QAAQ,mBAAmB,OAAO,QAAQ,MAAM,EAAE;AAC7D,OAAI,CAAC,eACJ;AAED,YAAS,IACR,OAAO,aAAa,EACpB,eACA;;AAGF,MAAI,IAAI,KAAK,EAAE,UAAU,CAAC;;AAG3B,QAAO;;AAGR,SAAgB,eACf,KACA,aACA,WAC2B;CAC3B,MAAM,WAAW,UAAU,IAAI,IAAI;AACnC,KAAI,UAAU;AACb,OAAK,MAAM,UAAU,aAAa;GACjC,MAAM,YAAY,SAAS,SAAS,IAAI,OAAO;AAC/C,OAAI,UACH,QAAO;;AAGT,MAAI,SAAS,UACZ,QAAO,SAAS;;AAIlB,MAAK,MAAM,UAAU,YACpB,KAAI,UAAU,gBACb,QAAO,gBAAgB,QAAyB;AAIlD,QAAO,gBAAgB,GAAG;;AAG3B,SAAgB,gBACf,KACA,SACA,WACA,SACA,OACS;AACT,KAAI,OAAO,YAAY,WACtB,QAAO,QAAQ;EACH;EACX;EACA;EACA,CAAC;AAGH,QAAO"}
|
|
1
|
+
{"version":3,"file":"runtime.js","names":["BUILTIN_LOCALES: Record<SupportLocale, SupportLocaleMessages>","TIME_OF_DAY_THRESHOLDS: Array<{\n\ttoken: SupportTimeOfDayToken;\n\thour: number;\n}>","fallback: Record<SupportTimeOfDayToken, string>","labels: Partial<Record<SupportTimeOfDayToken, string>>","token: SupportTimeOfDayToken","chain: string[]","map: NormalizedOverrides"],"sources":["../../../src/support/text/runtime.ts"],"sourcesContent":["/** biome-ignore-all lint/nursery/useMaxParams: ok here */\nimport en from \"./locales/en\";\nimport es from \"./locales/es\";\nimport fr from \"./locales/fr\";\nimport type {\n\tSupportLocale,\n\tSupportLocaleMessages,\n\tSupportTextContentOverrides,\n\tSupportTextContext,\n\tSupportTextKey,\n\tSupportTextUtils,\n\tSupportTextVariables,\n\tSupportTimeOfDayToken,\n} from \"./locales/keys\";\n\nexport type NormalizedOverride<K extends SupportTextKey> = {\n\tanyLocale?: SupportLocaleMessages[K];\n\tbyLocale: Map<string, SupportLocaleMessages[K]>;\n};\n\nexport type NormalizedOverrides = Map<\n\tSupportTextKey,\n\tNormalizedOverride<SupportTextKey>\n>;\n\nexport const BUILTIN_LOCALES: Record<SupportLocale, SupportLocaleMessages> = {\n\ten,\n\tfr,\n\tes,\n};\n\nconst TIME_OF_DAY_THRESHOLDS: Array<{\n\ttoken: SupportTimeOfDayToken;\n\thour: number;\n}> = [\n\t{ token: \"morning\", hour: 9 },\n\t{ token: \"afternoon\", hour: 15 },\n\t{ token: \"evening\", hour: 20 },\n];\n\nfunction buildDayPeriodLabels(\n\tlocale: string\n): Record<SupportTimeOfDayToken, string> {\n\tconst fallback: Record<SupportTimeOfDayToken, string> = {\n\t\tmorning: \"morning\",\n\t\tafternoon: \"afternoon\",\n\t\tevening: \"evening\",\n\t};\n\n\ttry {\n\t\tconst formatter = new Intl.DateTimeFormat(locale, {\n\t\t\thour: \"numeric\",\n\t\t\thour12: true,\n\t\t});\n\n\t\tconst labels: Partial<Record<SupportTimeOfDayToken, string>> = {};\n\t\tfor (const { token, hour } of TIME_OF_DAY_THRESHOLDS) {\n\t\t\tconst parts = formatter.formatToParts(new Date(2020, 0, 1, hour));\n\t\t\tconst part = parts.find((segment) => segment.type === \"dayPeriod\");\n\t\t\tif (part?.value) {\n\t\t\t\tconst normalized = part.value.trim();\n\t\t\t\tif (normalized) {\n\t\t\t\t\tlabels[token] = normalized;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tmorning: labels.morning ?? fallback.morning,\n\t\t\tafternoon: labels.afternoon ?? fallback.afternoon,\n\t\t\tevening: labels.evening ?? fallback.evening,\n\t\t};\n\t} catch {\n\t\treturn fallback;\n\t}\n}\n\n/**\n * Builds formatting helpers tailored for the visitor locale. The utilities are\n * memoized by callers and include number formatting, pluralization, title\n * casing and dynamic time-of-day descriptions.\n */\nexport function createTextUtils(\n\tlocale: string,\n\tisHydrated = false\n): SupportTextUtils {\n\tconst numberFormatter = new Intl.NumberFormat(locale);\n\tconst pluralRules = new Intl.PluralRules(locale);\n\tconst dayPeriodLabels = buildDayPeriodLabels(locale);\n\n\treturn {\n\t\tformatNumber: (value: number, options?: Intl.NumberFormatOptions) =>\n\t\t\toptions\n\t\t\t\t? new Intl.NumberFormat(locale, options).format(value)\n\t\t\t\t: numberFormatter.format(value),\n\t\tpluralize: (count: number, options: { one: string; other: string }) => {\n\t\t\tconst rule = pluralRules.select(count);\n\t\t\treturn rule === \"one\" ? options.one : options.other;\n\t\t},\n\t\ttitleCase: (value: string) => {\n\t\t\tif (!value) {\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t\treturn value.charAt(0).toUpperCase() + value.slice(1);\n\t\t},\n\t\ttimeOfDay: () => {\n\t\t\t// Return a stable default during SSR to avoid hydration mismatches\n\t\t\tif (!isHydrated) {\n\t\t\t\treturn {\n\t\t\t\t\ttoken: \"morning\" as SupportTimeOfDayToken,\n\t\t\t\t\tlabel: dayPeriodLabels.morning,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst hour = new Date().getHours();\n\t\t\tlet token: SupportTimeOfDayToken;\n\t\t\tif (hour < 12) {\n\t\t\t\ttoken = \"morning\";\n\t\t\t} else if (hour < 18) {\n\t\t\t\ttoken = \"afternoon\";\n\t\t\t} else {\n\t\t\t\ttoken = \"evening\";\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\ttoken,\n\t\t\t\tlabel: dayPeriodLabels[token],\n\t\t\t};\n\t\t},\n\t};\n}\n\n/**\n * Normalize a locale string to its base language code\n * Examples:\n * - \"en-US\" -> \"en\"\n * - \"en-GB\" -> \"en\"\n * - \"fr-FR\" -> \"fr\"\n */\nfunction normalizeLocaleString(locale: string): string {\n\tconst [base] = locale.toLowerCase().split(\"-\");\n\treturn base || locale.toLowerCase();\n}\n\n/**\n * Derives the locale preference order from visitor/provider hints while\n * guaranteeing an English fallback.\n */\nexport function buildLocaleChain(\n\tpreferences: Array<string | null | undefined>\n): string[] {\n\tconst seen = new Set<string>();\n\tconst chain: string[] = [];\n\n\tconst pushLocale = (value: string) => {\n\t\t// Always normalize to base language (en-US -> en, en-GB -> en)\n\t\tconst normalized = normalizeLocaleString(value);\n\t\tif (!seen.has(normalized)) {\n\t\t\tseen.add(normalized);\n\t\t\tchain.push(normalized);\n\t\t}\n\t};\n\n\tfor (const candidate of preferences) {\n\t\tif (!candidate) {\n\t\t\tcontinue;\n\t\t}\n\t\tpushLocale(candidate);\n\t}\n\n\t// Always fallback to English\n\tif (!seen.has(\"en\")) {\n\t\tchain.push(\"en\");\n\t}\n\n\treturn chain;\n}\n\n/**\n * Canonicalizes text override definitions into a lookup map that can be\n * consumed efficiently at runtime.\n */\nexport function normalizeOverrides(\n\toverrides?: SupportTextContentOverrides<string>\n): NormalizedOverrides {\n\tconst map: NormalizedOverrides = new Map();\n\n\tif (!overrides) {\n\t\treturn map;\n\t}\n\n\tfor (const key of Object.keys(overrides) as SupportTextKey[]) {\n\t\tconst value = overrides[key];\n\t\tif (!value) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (typeof value === \"string\" || typeof value === \"function\") {\n\t\t\tmap.set(key, {\n\t\t\t\tanyLocale: value as SupportLocaleMessages[typeof key],\n\t\t\t\tbyLocale: new Map(),\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst byLocale = new Map<string, SupportLocaleMessages[typeof key]>();\n\t\tfor (const [locale, localizedValue] of Object.entries(value)) {\n\t\t\tif (!localizedValue) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tbyLocale.set(\n\t\t\t\tlocale.toLowerCase(),\n\t\t\t\tlocalizedValue as SupportLocaleMessages[typeof key]\n\t\t\t);\n\t\t}\n\n\t\tmap.set(key, { byLocale });\n\t}\n\n\treturn map;\n}\n\n/**\n * Finds the best matching localized string for a key, consulting overrides\n * before bundled locale dictionaries.\n */\nexport function resolveMessage<K extends SupportTextKey>(\n\tkey: K,\n\tlocaleChain: string[],\n\toverrides: NormalizedOverrides\n): SupportLocaleMessages[K] {\n\tconst override = overrides.get(key) as NormalizedOverride<K> | undefined;\n\tif (override) {\n\t\tfor (const locale of localeChain) {\n\t\t\tconst localized = override.byLocale.get(locale);\n\t\t\tif (localized) {\n\t\t\t\treturn localized;\n\t\t\t}\n\t\t}\n\t\tif (override.anyLocale) {\n\t\t\treturn override.anyLocale;\n\t\t}\n\t}\n\n\tfor (const locale of localeChain) {\n\t\tif (locale in BUILTIN_LOCALES) {\n\t\t\treturn BUILTIN_LOCALES[locale as SupportLocale][key];\n\t\t}\n\t}\n\n\treturn BUILTIN_LOCALES.en[key];\n}\n\n/**\n * Produces the final rendered string by executing function overrides or\n * interpolating variables into template literals.\n */\nexport function evaluateMessage<K extends SupportTextKey>(\n\tkey: K,\n\tmessage: SupportLocaleMessages[K],\n\tvariables: SupportTextVariables<K> | undefined,\n\tcontext: SupportTextContext,\n\tutils: SupportTextUtils\n): string {\n\tif (typeof message === \"function\") {\n\t\treturn message({\n\t\t\tvariables: variables as never,\n\t\t\tcontext,\n\t\t\tutils,\n\t\t});\n\t}\n\n\treturn message;\n}\n"],"mappings":";;;;;AAyBA,MAAaA,kBAAgE;CAC5E;CACA;CACA;CACA;AAED,MAAMC,yBAGD;CACJ;EAAE,OAAO;EAAW,MAAM;EAAG;CAC7B;EAAE,OAAO;EAAa,MAAM;EAAI;CAChC;EAAE,OAAO;EAAW,MAA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AACnC,KAAI,UAAU;AACb,OAAK,MAAM,UAAU,aAAa;GACjC,MAAM,YAAY,SAAS,SAAS,IAAI,OAAO;AAC/C,OAAI,UACH,QAAO;;AAGT,MAAI,SAAS,UACZ,QAAO,SAAS;;AAIlB,MAAK,MAAM,UAAU,YACpB,KAAI,UAAU,gBACb,QAAO,gBAAgB,QAAyB;AAIlD,QAAO,gBAAgB,GAAG;;;;;;AAO3B,SAAgB,gBACf,KACA,SACA,WACA,SACA,OACS;AACT,KAAI,OAAO,YAAY,WACtB,QAAO,QAAQ;EACH;EACX;EACA;EACA,CAAC;AAGH,QAAO"}
|
package/support/utils/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/support/utils/index.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/support/utils/index.ts"],"sourcesContent":[],"mappings":";;;;;;AAMA;iBAAgB,EAAA,YAAc"}
|
package/support/utils/index.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { clsx } from "
|
|
1
|
+
import { clsx } from "clsx";
|
|
2
2
|
import { twMerge } from "tailwind-merge";
|
|
3
3
|
|
|
4
4
|
//#region src/support/utils/index.ts
|
|
5
|
+
/**
|
|
6
|
+
* Tailwind-aware class name merger used across support components.
|
|
7
|
+
*/
|
|
5
8
|
function cn(...inputs) {
|
|
6
9
|
return twMerge(clsx(inputs));
|
|
7
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/support/utils/index.ts"],"sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/support/utils/index.ts"],"sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Tailwind-aware class name merger used across support components.\n */\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n"],"mappings":";;;;;;;AAMA,SAAgB,GAAG,GAAG,QAAsB;AAC3C,QAAO,QAAQ,KAAK,OAAO,CAAC"}
|
package/support/utils/time.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time.d.ts","names":[],"sources":["../../../src/support/utils/time.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"time.d.ts","names":[],"sources":["../../../src/support/utils/time.ts"],"sourcesContent":[],"mappings":";;AAGA;;iBAAgB,aAAA,OAAoB"}
|
package/support/utils/time.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time.js","names":[],"sources":["../../../src/support/utils/time.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"time.js","names":[],"sources":["../../../src/support/utils/time.ts"],"sourcesContent":["/**\n * Friendly relative time formatter used throughout the support widget.\n */\nexport function formatTimeAgo(date: Date | string): string {\n\tconst now = new Date();\n\tconst messageDate = typeof date === \"string\" ? new Date(date) : date;\n\tconst diffMs = now.getTime() - messageDate.getTime();\n\tconst diffMins = Math.floor(diffMs / (1000 * 60));\n\tconst diffHours = Math.floor(diffMs / (1000 * 60 * 60));\n\tconst diffDays = Math.floor(diffMs / (1000 * 60 * 60 * 24));\n\n\tif (diffMins < 1) {\n\t\treturn \"now\";\n\t}\n\tif (diffMins < 60) {\n\t\treturn `${diffMins}m ago`;\n\t}\n\tif (diffHours < 24) {\n\t\treturn `${diffHours}h ago`;\n\t}\n\tif (diffDays === 1) {\n\t\treturn \"Yesterday\";\n\t}\n\tif (diffDays < 7) {\n\t\treturn `${diffDays} days ago`;\n\t}\n\tif (diffDays < 30) {\n\t\tconst weeks = Math.floor(diffDays / 7);\n\t\treturn `${weeks} ${weeks === 1 ? \"week\" : \"weeks\"} ago`;\n\t}\n\tif (diffDays < 365) {\n\t\tconst months = Math.floor(diffDays / 30);\n\t\treturn `${months} ${months === 1 ? \"month\" : \"months\"} ago`;\n\t}\n\tconst years = Math.floor(diffDays / 365);\n\treturn `${years} ${years === 1 ? \"year\" : \"years\"} ago`;\n}\n"],"mappings":";;;;AAGA,SAAgB,cAAc,MAA6B;CAC1D,MAAM,sBAAM,IAAI,MAAM;CACtB,MAAM,cAAc,OAAO,SAAS,WAAW,IAAI,KAAK,KAAK,GAAG;CAChE,MAAM,SAAS,IAAI,SAAS,GAAG,YAAY,SAAS;CACpD,MAAM,WAAW,KAAK,MAAM,UAAU,MAAO,IAAI;CACjD,MAAM,YAAY,KAAK,MAAM,UAAU,MAAO,KAAK,IAAI;CACvD,MAAM,WAAW,KAAK,MAAM,UAAU,MAAO,KAAK,KAAK,IAAI;AAE3D,KAAI,WAAW,EACd,QAAO;AAER,KAAI,WAAW,GACd,QAAO,GAAG,SAAS;AAEpB,KAAI,YAAY,GACf,QAAO,GAAG,UAAU;AAErB,KAAI,aAAa,EAChB,QAAO;AAER,KAAI,WAAW,EACd,QAAO,GAAG,SAAS;AAEpB,KAAI,WAAW,IAAI;EAClB,MAAM,QAAQ,KAAK,MAAM,WAAW,EAAE;AACtC,SAAO,GAAG,MAAM,GAAG,UAAU,IAAI,SAAS,QAAQ;;AAEnD,KAAI,WAAW,KAAK;EACnB,MAAM,SAAS,KAAK,MAAM,WAAW,GAAG;AACxC,SAAO,GAAG,OAAO,GAAG,WAAW,IAAI,UAAU,SAAS;;CAEvD,MAAM,QAAQ,KAAK,MAAM,WAAW,IAAI;AACxC,QAAO,GAAG,MAAM,GAAG,UAAU,IAAI,SAAS,QAAQ"}
|
package/support-config.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
1
2
|
import { DefaultMessage } from "@cossistant/types";
|
|
2
3
|
|
|
3
4
|
//#region src/support-config.d.ts
|
|
@@ -12,7 +13,7 @@ declare const SupportConfig: {
|
|
|
12
13
|
({
|
|
13
14
|
defaultMessages,
|
|
14
15
|
quickOptions
|
|
15
|
-
}: SupportConfigProps): null;
|
|
16
|
+
}: SupportConfigProps): React$1.ReactElement | null;
|
|
16
17
|
displayName: string;
|
|
17
18
|
};
|
|
18
19
|
//#endregion
|
package/support-config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"support-config.d.ts","names":[],"sources":["../src/support-config.tsx"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"support-config.d.ts","names":[],"sources":["../src/support-config.tsx"],"sourcesContent":[],"mappings":";;;;KAMY,kBAAA;oBACO;EADP,YAAA,CAAA,EAAA,MAAkB,EAAA;AAQ9B,CAAA;;;;AAGwB,cAHX,aAGiB,EAAA;EAAY,CAAA;IAAA,eAAA;IAAA;EAAA,CAAA,EAAvC,kBAAuC,CAAA,EAAlB,OAAA,CAAM,YAAY,GAAA,IAAA"}
|