@cossistant/react 0.0.30 → 0.0.31
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 +3 -1
- package/hooks/private/use-grouped-messages.d.ts.map +1 -1
- package/hooks/private/use-grouped-messages.js +34 -10
- package/hooks/private/use-grouped-messages.js.map +1 -1
- package/hooks/use-conversation-page.js +4 -2
- package/hooks/use-conversation-page.js.map +1 -1
- package/hooks/use-conversation-preview.d.ts.map +1 -1
- package/hooks/use-conversation-preview.js +2 -1
- package/hooks/use-conversation-preview.js.map +1 -1
- package/package.json +5 -4
- package/packages/types/src/api/conversation.d.ts +21 -15
- package/packages/types/src/api/conversation.d.ts.map +1 -1
- package/packages/types/src/api/timeline-item.d.ts +9 -9
- package/packages/types/src/realtime-events.d.ts +19 -15
- package/packages/types/src/realtime-events.d.ts.map +1 -1
- package/packages/types/src/schemas.d.ts +6 -4
- package/packages/types/src/schemas.d.ts.map +1 -1
- package/primitives/multimodal-input.d.ts +2 -2
- package/primitives/multimodal-input.d.ts.map +1 -1
- package/primitives/timeline-item.d.ts.map +1 -1
- package/primitives/timeline-item.js +22 -7
- package/primitives/timeline-item.js.map +1 -1
- package/support/components/button.d.ts +1 -1
- package/support/components/conversation-resolved-feedback.d.ts +21 -0
- package/support/components/conversation-resolved-feedback.d.ts.map +1 -0
- package/support/components/conversation-resolved-feedback.js +59 -0
- package/support/components/conversation-resolved-feedback.js.map +1 -0
- package/support/components/conversation-timeline-utils.d.ts +5 -0
- package/support/components/conversation-timeline-utils.d.ts.map +1 -0
- package/support/components/conversation-timeline-utils.js +10 -0
- package/support/components/conversation-timeline-utils.js.map +1 -0
- package/support/components/conversation-timeline.d.ts.map +1 -1
- package/support/components/conversation-timeline.js +2 -1
- package/support/components/conversation-timeline.js.map +1 -1
- package/support/components/icons.d.ts +1 -1
- package/support/components/icons.d.ts.map +1 -1
- package/support/components/icons.js +6 -2
- package/support/components/icons.js.map +1 -1
- package/support/components/index.d.ts +2 -1
- package/support/components/index.js +2 -1
- package/support/pages/conversation.d.ts.map +1 -1
- package/support/pages/conversation.js +33 -7
- package/support/pages/conversation.js.map +1 -1
- package/support/text/locales/en.js +9 -0
- package/support/text/locales/en.js.map +1 -1
- package/support/text/locales/es.js +9 -0
- package/support/text/locales/es.js.map +1 -1
- package/support/text/locales/fr.js +9 -0
- package/support/text/locales/fr.js.map +1 -1
- package/support/text/locales/keys.d.ts +11 -0
- package/support/text/locales/keys.d.ts.map +1 -1
- package/support/text/locales/keys.js +3 -0
- package/support/text/locales/keys.js.map +1 -1
|
@@ -15,6 +15,10 @@ const iconRegistry = {
|
|
|
15
15
|
default: "M2 10C2 7.19974 2 5.79961 2.54497 4.73005C3.02433 3.78924 3.78924 3.02433 4.73005 2.54497C5.79961 2 7.19974 2 10 2H14C16.8003 2 18.2004 2 19.27 2.54497C20.2108 3.02433 20.9757 3.78924 21.455 4.73005C22 5.79961 22 7.19974 22 10V19.1708C22 20.1969 22 20.71 21.8373 21.0302C21.5642 21.5676 20.996 21.8893 20.3947 21.847C20.0363 21.8218 19.5964 21.5578 18.7165 21.0299V21.0299C18.1917 20.715 17.9293 20.5576 17.6542 20.4347C17.1972 20.2306 16.7122 20.0962 16.2154 20.0362C15.9163 20 15.6103 20 14.9983 20H10C7.19974 20 5.79961 20 4.73005 19.455C3.78924 18.9757 3.02433 18.2108 2.54497 17.27C2 16.2004 2 14.8003 2 12V10Z",
|
|
16
16
|
filled: "M9.25 1.25C6.44974 1.25 5.04961 1.25 3.98005 1.79497C3.03924 2.27433 2.27433 3.03924 1.79497 3.98005C1.25 5.04961 1.25 6.44974 1.25 9.25V12.75C1.25 15.5503 1.25 16.9504 1.79497 18.02C2.27433 18.9608 3.03924 19.7257 3.98005 20.205C5.04961 20.75 6.44974 20.75 9.25 20.75H14.5764C15.4012 20.75 15.8135 20.75 16.2144 20.8156C16.5703 20.8738 16.9189 20.9703 17.254 21.1035C17.6315 21.2535 17.9851 21.4657 18.6924 21.8901L19.1152 22.1438C20.3049 22.8576 20.8998 23.2145 21.3892 23.1689C21.816 23.1291 22.2054 22.9086 22.4591 22.5631C22.75 22.1669 22.75 21.4732 22.75 20.0858V9.25C22.75 6.44974 22.75 5.04961 22.205 3.98005C21.7257 3.03924 20.9608 2.27433 20.02 1.79497C18.9504 1.25 17.5503 1.25 14.75 1.25H9.25Z"
|
|
17
17
|
},
|
|
18
|
+
star: {
|
|
19
|
+
default: "M12 2L14.618 8.472L21.5 9.09L16.25 13.77L17.804 20.5L12 17.1L6.196 20.5L7.75 13.77L2.5 9.09L9.382 8.472L12 2Z",
|
|
20
|
+
filled: "M12 2L14.618 8.472L21.5 9.09L16.25 13.77L17.804 20.5L12 17.1L6.196 20.5L7.75 13.77L2.5 9.09L9.382 8.472L12 2Z"
|
|
21
|
+
},
|
|
18
22
|
check: {
|
|
19
23
|
default: "M4 13L9 18L20 6",
|
|
20
24
|
filled: "M4 13L9 18L20 6"
|
|
@@ -86,7 +90,7 @@ const Icon = ({ name, variant = "default", className, filledOnHover }) => {
|
|
|
86
90
|
stroke: "currentColor",
|
|
87
91
|
strokeLinecap: "round",
|
|
88
92
|
strokeLinejoin: "round",
|
|
89
|
-
strokeWidth: "
|
|
93
|
+
strokeWidth: "2"
|
|
90
94
|
})]
|
|
91
95
|
}), /* @__PURE__ */ jsxs("svg", {
|
|
92
96
|
className: cn("absolute inset-0 h-full w-full opacity-0 transition-opacity duration-200 group-hover/btn:opacity-100", { "opacity-100": variant === "filled" }, className),
|
|
@@ -120,7 +124,7 @@ const Icon = ({ name, variant = "default", className, filledOnHover }) => {
|
|
|
120
124
|
stroke: "currentColor",
|
|
121
125
|
strokeLinecap: "round",
|
|
122
126
|
strokeLinejoin: "round",
|
|
123
|
-
strokeWidth: "
|
|
127
|
+
strokeWidth: "2"
|
|
124
128
|
})]
|
|
125
129
|
});
|
|
126
130
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.js","names":["iconRegistry: Record<IconName, Record<IconVariant, string>>","Icon: React.FC<IconProps>"],"sources":["../../../src/support/components/icons.tsx"],"sourcesContent":["import type React from \"react\";\nimport { cn } from \"../utils\";\n\nexport type IconVariant = \"default\" | \"filled\";\n\nexport type IconName =\n\t| \"sidebar\"\n\t| \"check\"\n\t| \"x\"\n\t| \"clipboard\"\n\t| \"send\"\n\t| \"chevron-down\"\n\t| \"arrow-left\"\n\t| \"arrow-right\"\n\t| \"arrow-up-right\"\n\t| \"attachment\"\n\t| \"file\"\n\t| \"close\"\n\t| \"home\"\n\t| \"articles\"\n\t| \"chat\";\n\nexport type IconProps = {\n\tname: IconName;\n\tvariant?: IconVariant;\n\tclassName?: string;\n\tfilledOnHover?: boolean;\n};\n\n// Thanks to Aaon for the icons\nconst iconRegistry: Record<IconName, Record<IconVariant, string>> = {\n\tsidebar: {\n\t\tdefault:\n\t\t\t\"M9 2L9 22M10 22H14C16.8003 22 18.2004 22 19.27 21.455C20.2108 20.9757 20.9757 20.2108 21.455 19.27C22 18.2004 22 16.8003 22 14V10C22 7.19974 22 5.79961 21.455 4.73005C20.9757 3.78924 20.2108 3.02433 19.27 2.54497C18.2004 2 16.8003 2 14 2H10C7.19974 2 5.79961 2 4.73005 2.54497C3.78924 3.02433 3.02433 3.78924 2.54497 4.73005C2 5.79961 2 7.19974 2 10V14C2 16.8003 2 18.2004 2.54497 19.27C3.02433 20.2108 3.78924 20.9757 4.73005 21.455C5.79961 22 7.19974 22 10 22Z\",\n\t\tfilled:\n\t\t\t\"M9.25 2.58333C9.25 2.27334 9.25 2.11835 9.21593 1.99118C9.12346 1.64609 8.85391 1.37654 8.50882 1.28407C8.38165 1.25 8.22666 1.25 7.91667 1.25C6.36671 1.25 5.59174 1.25 4.9559 1.42037C3.23044 1.88271 1.88271 3.23044 1.42037 4.9559C1.25 5.59174 1.25 6.36671 1.25 7.91667V16.0833C1.25 17.6333 1.25 18.4083 1.42037 19.0441C1.88271 20.7696 3.23044 22.1173 4.9559 22.5796C5.59174 22.75 6.36671 22.75 7.91667 22.75C8.22666 22.75 8.38165 22.75 8.50882 22.7159C8.85391 22.6235 9.12346 22.3539 9.21593 22.0088C9.25 21.8817 9.25 21.7267 9.25 21.4167L9.25 2.58333ZM10.75 21.15C10.75 21.7101 10.75 21.9901 10.859 22.204C10.9549 22.3922 11.1078 22.5451 11.296 22.641C11.5099 22.75 11.7899 22.75 12.35 22.75H14.75C17.5503 22.75 18.9504 22.75 20.02 22.205C20.9608 21.7257 21.7257 20.9608 22.205 20.02C22.75 18.9504 22.75 17.5503 22.75 14.75V9.25C22.75 6.44974 22.75 5.04961 22.205 3.98005C21.7257 3.03924 20.9608 2.27433 20.02 1.79497C18.9504 1.25 17.5503 1.25 14.75 1.25H12.35C11.7899 1.25 11.5099 1.25 11.296 1.35899C11.1078 1.45487 10.9549 1.60785 10.859 1.79601C10.75 2.00992 10.75 2.28995 10.75 2.85L10.75 21.15Z\",\n\t},\n\n\tclipboard: {\n\t\tdefault:\n\t\t\t\"M15.9999 3V3C18.209 3 19.9999 4.79086 19.9999 7V14C19.9999 16.8003 19.9999 18.2004 19.4549 19.27C18.9755 20.2108 18.2106 20.9757 17.2698 21.455C16.2003 22 14.8001 22 11.9999 22V22C9.19962 22 7.79948 22 6.72993 21.455C5.78911 20.9757 5.02421 20.2108 4.54485 19.27C3.99988 18.2004 3.99988 16.8003 3.99988 14V7C3.99988 4.79086 5.79074 3 7.99988 3V3M15.9999 3V3C15.9999 1.89543 15.1044 1 13.9999 1H9.99988C8.89531 1 7.99988 1.89543 7.99988 3V3M15.9999 3V3C15.9999 4.10457 15.1044 5 13.9999 5H9.99988C8.89531 5 7.99988 4.10457 7.99988 3V3\",\n\t\tfilled:\n\t\t\t\"M10.136 0.25C8.85118 0.25 7.70111 1.04698 7.24994 2.25C5.0407 2.25 3.24976 4.04094 3.24976 6.25018V14.75C3.24976 17.5503 3.24976 18.9504 3.79472 20.02C4.27409 20.9608 5.03899 21.7257 5.9798 22.205C7.04936 22.75 8.44949 22.75 11.2498 22.75H12.7498C15.55 22.75 16.9501 22.75 18.0197 22.205C18.9605 21.7257 19.7254 20.9608 20.2048 20.02C20.7498 18.9504 20.7498 17.5503 20.7498 14.75V6.24982C20.7498 4.04078 18.959 2.25 16.7499 2.25C16.2988 1.04699 15.1488 0.25 13.864 0.25H10.136ZM9.99994 4.25C9.30958 4.25 8.74994 3.69036 8.74994 3C8.74994 2.30964 9.30958 1.75 9.99994 1.75H13.9999C14.6903 1.75 15.2499 2.30964 15.2499 3C15.2499 3.69036 14.6903 4.25 13.9999 4.25H9.99994Z\",\n\t},\n\tchat: {\n\t\tdefault:\n\t\t\t\"M2 10C2 7.19974 2 5.79961 2.54497 4.73005C3.02433 3.78924 3.78924 3.02433 4.73005 2.54497C5.79961 2 7.19974 2 10 2H14C16.8003 2 18.2004 2 19.27 2.54497C20.2108 3.02433 20.9757 3.78924 21.455 4.73005C22 5.79961 22 7.19974 22 10V19.1708C22 20.1969 22 20.71 21.8373 21.0302C21.5642 21.5676 20.996 21.8893 20.3947 21.847C20.0363 21.8218 19.5964 21.5578 18.7165 21.0299V21.0299C18.1917 20.715 17.9293 20.5576 17.6542 20.4347C17.1972 20.2306 16.7122 20.0962 16.2154 20.0362C15.9163 20 15.6103 20 14.9983 20H10C7.19974 20 5.79961 20 4.73005 19.455C3.78924 18.9757 3.02433 18.2108 2.54497 17.27C2 16.2004 2 14.8003 2 12V10Z\",\n\t\tfilled:\n\t\t\t\"M9.25 1.25C6.44974 1.25 5.04961 1.25 3.98005 1.79497C3.03924 2.27433 2.27433 3.03924 1.79497 3.98005C1.25 5.04961 1.25 6.44974 1.25 9.25V12.75C1.25 15.5503 1.25 16.9504 1.79497 18.02C2.27433 18.9608 3.03924 19.7257 3.98005 20.205C5.04961 20.75 6.44974 20.75 9.25 20.75H14.5764C15.4012 20.75 15.8135 20.75 16.2144 20.8156C16.5703 20.8738 16.9189 20.9703 17.254 21.1035C17.6315 21.2535 17.9851 21.4657 18.6924 21.8901L19.1152 22.1438C20.3049 22.8576 20.8998 23.2145 21.3892 23.1689C21.816 23.1291 22.2054 22.9086 22.4591 22.5631C22.75 22.1669 22.75 21.4732 22.75 20.0858V9.25C22.75 6.44974 22.75 5.04961 22.205 3.98005C21.7257 3.03924 20.9608 2.27433 20.02 1.79497C18.9504 1.25 17.5503 1.25 14.75 1.25H9.25Z\",\n\t},\n\tcheck: {\n\t\tdefault: \"M4 13L9 18L20 6\",\n\t\tfilled: \"M4 13L9 18L20 6\",\n\t},\n\tx: {\n\t\tdefault: \"M6 18L18 6M6 6L18 18\",\n\t\tfilled: \"M6 18L18 6M6 6L18 18\",\n\t},\n\t\"chevron-down\": {\n\t\tdefault: \"M6 9L12 15L18 9\",\n\t\tfilled:\n\t\t\t\"M10.8686 14.8686L7.73137 11.7314C6.87462 10.8746 6.44624 10.4462 6.4173 10.0785C6.39218 9.75934 6.52136 9.44749 6.76477 9.23959C7.04529 9 7.65111 9 8.86274 9H15.1373C16.3489 9 16.9547 9 17.2352 9.23959C17.4786 9.44749 17.6078 9.75934 17.5827 10.0785C17.5538 10.4462 17.1254 10.8746 16.2686 11.7314L13.1314 14.8686C12.7354 15.2646 12.5373 15.4627 12.309 15.5368C12.1082 15.6021 11.8918 15.6021 11.691 15.5368C11.4627 15.4627 11.2646 15.2646 10.8686 14.8686Z\",\n\t},\n\t\"arrow-left\": {\n\t\tdefault: \"M15 19l-7-7 7-7\",\n\t\tfilled: \"M15 19l-7-7 7-7\",\n\t},\n\t\"arrow-right\": {\n\t\tdefault: \"M9 5l7 7-7 7\",\n\t\tfilled: \"M9 5l7 7-7 7\",\n\t},\n\t\"arrow-up-right\": {\n\t\tdefault: \"M15 19l-7-7 7-7\",\n\t\tfilled: \"M15 19l-7-7 7-7\",\n\t},\n\tsend: {\n\t\tdefault:\n\t\t\t\"M11 13L12.5345 16.9899C13.5893 19.7326 14.1168 21.1039 14.825 21.4489C15.4375 21.7472 16.1598 21.7132 16.7415 21.3586C17.4142 20.9486 17.8104 19.5338 18.6027 16.7041L21.466 6.47824C21.9677 4.68672 22.2185 3.79096 21.9857 3.17628C21.7827 2.64035 21.3596 2.21724 20.8237 2.01427C20.209 1.78147 19.3133 2.03228 17.5217 2.53391L7.29584 5.39716C4.46617 6.18947 3.05133 6.58563 2.64136 7.25828C2.28678 7.84005 2.25275 8.56231 2.55106 9.17484C2.89597 9.88306 4.26729 10.4105 7.00993 11.4654L11 13ZM11 13L13.5 10.5\",\n\t\tfilled:\n\t\t\t\"M6.88154 12.2191C3.45325 10.9005 1.7391 10.2412 1.30796 9.35595C0.935078 8.59028 0.977616 7.68746 1.42084 6.96024C1.93331 6.11943 3.70185 5.62424 7.23894 4.63385L17.234 1.83523C19.4734 1.2082 20.5931 0.894684 21.3615 1.18568C22.0314 1.43939 22.5603 1.96829 22.814 2.63819C23.1049 3.40654 22.7914 4.52624 22.1644 6.76565L19.3657 16.7606C18.3753 20.2977 17.88 22.0663 17.0392 22.5788C16.312 23.022 15.4092 23.0645 14.6435 22.6916C13.7582 22.2605 13.099 20.5463 11.7804 17.1179L11.0877 15.3166C10.9525 14.9653 10.885 14.7897 10.8813 14.6151C10.878 14.4608 10.9104 14.3078 10.9761 14.1681C11.0504 14.0101 11.1835 13.877 11.4496 13.6109L13.9999 11.0606C14.2928 10.7677 14.2928 10.2928 13.9999 9.99995C13.7071 9.70705 13.2322 9.70705 12.9393 9.99995L10.3891 12.5501C10.123 12.8163 9.98991 12.9493 9.83189 13.0236C9.69221 13.0893 9.53921 13.1218 9.38489 13.1185C9.2103 13.1148 9.03466 13.0472 8.68338 12.9121L6.88154 12.2191Z\",\n\t},\n\tattachment: {\n\t\tdefault:\n\t\t\t\"M22 12L15.25 18.75C12.3505 21.6495 7.64949 21.6495 4.75 18.75V18.75C1.85051 15.8505 1.8505 11.1495 4.75 8.25L9.5 3.5C11.433 1.56701 14.567 1.567 16.5 3.5V3.5C18.433 5.433 18.433 8.567 16.5 10.5L11.75 15.25C10.7835 16.2165 9.2165 16.2165 8.25 15.25V15.25C7.2835 14.2835 7.2835 12.7165 8.25 11.75L13 7\",\n\t\tfilled:\n\t\t\t\"M22 12L15.25 18.75C12.3505 21.6495 7.64949 21.6495 4.75 18.75V18.75C1.85051 15.8505 1.8505 11.1495 4.75 8.25L9.5 3.5C11.433 1.56701 14.567 1.567 16.5 3.5V3.5C18.433 5.433 18.433 8.567 16.5 10.5L11.75 15.25C10.7835 16.2165 9.2165 16.2165 8.25 15.25V15.25C7.2835 14.2835 7.2835 12.7165 8.25 11.75L13 7\",\n\t},\n\tfile: {\n\t\tdefault:\n\t\t\t\"M14 2.5V4.80003C14 5.92013 14 6.48019 14.218 6.90801C14.4097 7.28433 14.7157 7.5903 15.092 7.78204C15.5198 8.00003 16.0799 8.00003 17.2 8.00003H19.5M20 10.3137V14C20 16.8003 20 18.2004 19.455 19.27C18.9757 20.2108 18.2108 20.9757 17.27 21.455C16.2004 22 14.8003 22 12 22V22C9.19974 22 7.79961 22 6.73005 21.455C5.78924 20.9757 5.02433 20.2108 4.54497 19.27C4 18.2004 4 16.8003 4 14V9.77817C4 7.18697 4 5.89136 4.46859 4.88663C4.96536 3.82147 5.82147 2.96536 6.88663 2.46859C7.89136 2 9.18697 2 11.7782 2V2C12.9105 2 13.4766 2 14.0113 2.11855C14.5806 2.24479 15.1235 2.46965 15.6153 2.78296C16.0772 3.07721 16.4775 3.47753 17.2782 4.27817L17.6569 4.65685C18.5216 5.52161 18.954 5.95399 19.2632 6.45858C19.5373 6.90594 19.7394 7.39366 19.8618 7.90384C20 8.47928 20 9.09076 20 10.3137Z\",\n\t\tfilled:\n\t\t\t\"M13.25 1.26002C12.9109 1.24999 12.5071 1.24999 11.997 1.24999H11.25C8.44974 1.24999 7.04961 1.24999 5.98005 1.79495C5.03924 2.27432 4.27433 3.03922 3.79497 3.98003C3.25 5.04959 3.25 6.44972 3.25 9.24999V14.75C3.25 17.5502 3.25 18.9504 3.79497 20.0199C4.27433 20.9608 5.03924 21.7257 5.98005 22.205C7.04961 22.75 8.44974 22.75 11.25 22.75H12.75C15.5503 22.75 16.9504 22.75 18.02 22.205C18.9608 21.7257 19.7257 20.9608 20.205 20.0199C20.75 18.9504 20.75 17.5503 20.75 14.75V10.003C20.75 9.49287 20.75 9.08912 20.74 8.75H17.2H17.1695H17.1695C16.6354 8.75001 16.1896 8.75002 15.8253 8.72026C15.4454 8.68922 15.0888 8.62211 14.7515 8.45027C14.2341 8.18662 13.8134 7.76592 13.5497 7.24847C13.3779 6.91121 13.3108 6.55455 13.2797 6.17467C13.25 5.81044 13.25 5.36459 13.25 4.83043V4.8V1.26002ZM20.5164 7.25C20.3941 6.86401 20.2252 6.49389 20.0132 6.1479C19.704 5.64332 19.2716 5.21094 18.4069 4.3462L18.4069 4.34618L17.6538 3.59313L17.6538 3.59313C16.789 2.72837 16.3567 2.29599 15.8521 1.98679C15.5061 1.77477 15.136 1.60589 14.75 1.48358V4.8C14.75 5.37243 14.7506 5.75664 14.7748 6.05252C14.7982 6.33965 14.8401 6.47693 14.8862 6.56749C15.0061 6.80269 15.1973 6.99392 15.4325 7.11376C15.5231 7.1599 15.6604 7.20178 15.9475 7.22524C16.2434 7.24942 16.6276 7.25 17.2 7.25H20.5164Z\",\n\t},\n\tclose: {\n\t\tdefault: \"M6 18L18 6M6 6L18 18\",\n\t\tfilled: \"M6 18L18 6M6 6L18 18\",\n\t},\n\thome: {\n\t\tdefault:\n\t\t\t\"M15 22V15C15 14.0681 15 13.6022 14.8478 13.2346C14.6448 12.7446 14.2554 12.3552 13.7654 12.1522C13.3978 12 12.9319 12 12 12V12C11.0681 12 10.6022 12 10.2346 12.1522C9.74458 12.3552 9.35523 12.7446 9.15224 13.2346C9 13.6022 9 14.0681 9 15V22M7.00244 3.99805L5.00244 5.59805C3.89986 6.48011 3.34857 6.92115 2.95174 7.46857C2.6002 7.95353 2.33865 8.49771 2.17957 9.07517C2 9.72701 2 10.433 2 11.845V14C2 16.8003 2 18.2004 2.54497 19.27C3.02433 20.2108 3.78924 20.9757 4.73005 21.455C5.79961 22 7.19974 22 10 22H14C16.8003 22 18.2004 22 19.27 21.455C20.2108 20.9757 20.9757 20.2108 21.455 19.27C22 18.2004 22 16.8003 22 14V11.845C22 10.433 22 9.72701 21.8204 9.07517C21.6613 8.49771 21.3998 7.95353 21.0483 7.46857C20.6514 6.92115 20.1001 6.48011 18.9976 5.59805L16.9976 3.99805C15.214 2.57118 14.3222 1.85774 13.3332 1.58413C12.4608 1.34279 11.5392 1.34279 10.6668 1.58413C9.67783 1.85774 8.78603 2.57118 7.00244 3.99805Z\",\n\t\tfilled:\n\t\t\t\"M17.9971 3.83672C15.8568 2.12447 14.7866 1.26835 13.5998 0.94002C12.5529 0.650409 11.4471 0.650409 10.4002 0.94002C9.21339 1.26835 8.14324 2.12447 6.00293 3.83672L4.85293 4.75672C3.52983 5.8152 2.86828 6.34444 2.39209 7.00134C1.97024 7.58329 1.65638 8.23631 1.46548 8.92927C1.25 9.71147 1.25 10.5587 1.25 12.2531V13.1495C1.25 16.5098 1.25 18.19 1.90396 19.4735C2.4792 20.6024 3.39708 21.5203 4.52606 22.0956C5.80953 22.7495 7.48969 22.7495 10.85 22.7495H13.15C16.5103 22.7495 18.1905 22.7495 19.4739 22.0956C20.6029 21.5203 21.5208 20.6024 22.096 19.4735C22.75 18.19 22.75 16.5098 22.75 13.1495V12.2531C22.75 10.5587 22.75 9.71147 22.5345 8.92927C22.3436 8.23631 22.0298 7.58329 21.6079 7.00134C21.1317 6.34444 20.4702 5.8152 19.1471 4.75672L17.9971 3.83672ZM13.4 21C13.9601 21 14.2401 21 14.454 20.891C14.6422 20.7951 14.7951 20.6422 14.891 20.454C15 20.2401 15 19.9601 15 19.4V14C15 13.0681 15 12.6022 14.8478 12.2346C14.6448 11.7446 14.2554 11.3552 13.7654 11.1522C13.3978 11 12.9319 11 12 11C11.0681 11 10.6022 11 10.2346 11.1522C9.74458 11.3552 9.35523 11.7446 9.15224 12.2346C9 12.6022 9 13.0681 9 14V19.4C9 19.9601 9 20.2401 9.10899 20.454C9.20487 20.6422 9.35785 20.7951 9.54601 20.891C9.75992 21 10.0399 21 10.6 21H13.4Z\",\n\t},\n\tarticles: {\n\t\tdefault:\n\t\t\t\"M12 18C14.4268 16.4399 16.2646 16.0156 18.7998 15.9002C19.9707 15.8469 20.5562 15.8203 20.9643 15.5957C21.3343 15.3921 21.6076 15.106 21.7942 14.7271C22 14.3093 22 13.7586 22 12.6571V2C17.5556 2 15.3333 2 12 4.14286M12 18C9.57324 16.4399 7.7354 16.0156 5.20023 15.9002C4.02927 15.8469 3.44379 15.8203 3.03575 15.5957C2.66572 15.3921 2.39236 15.106 2.20576 14.7271C2 14.3093 2 13.7586 2 12.6571V2C6.44444 2 8.66667 2 12 4.14286M12 18V4.14286M21 19.5C17 19.5 15 20 12 22C9 20 7 19.5 3 19.5\",\n\t\tfilled:\n\t\t\t\"M22.2065 1.35502C21.9935 1.24571 21.7123 1.24458 21.15 1.24232C19.5779 1.236 18 1.25792 16.4538 1.52901C16.0981 1.59138 15.7497 1.66744 15.4043 1.75978C14.7337 1.9391 14.3983 2.02876 13.9246 2.392C13.5814 2.65517 13.1441 3.22469 12.9785 3.62425C12.75 4.17575 12.75 4.68234 12.75 5.69552V9.99989C12.75 10.4141 12.4142 10.7499 12 10.7499C11.5858 10.7499 11.25 10.4141 11.25 9.99989V5.69552C11.25 4.68234 11.25 4.17575 11.0215 3.62425C10.8559 3.22469 10.4186 2.65517 10.0754 2.392C9.60165 2.02876 9.26632 1.9391 8.59568 1.75978C8.25035 1.66744 7.90193 1.59138 7.54618 1.52901C5.99997 1.25792 4.42208 1.236 2.84998 1.24232C2.28768 1.24458 2.00654 1.24571 1.7935 1.35502C1.60561 1.45142 1.45409 1.60355 1.35845 1.79183C1.25 2.0053 1.25 2.28683 1.25 2.84989V11.807C1.25 13.3974 1.25 14.1926 1.5397 14.803C1.81132 15.3754 2.17112 15.7706 2.71551 16.0947C3.29615 16.4403 4.2131 16.5266 6.04701 16.6992C6.46239 16.7383 6.87605 16.7915 7.28715 16.8636C8.70571 17.1123 10.0018 17.6069 11.5944 18.6308L12 18.8915L12.4056 18.6308C13.9982 17.6069 15.2943 17.1123 16.7129 16.8636C17.1239 16.7915 17.5376 16.7383 17.953 16.6992C19.7869 16.5266 20.7039 16.4403 21.2845 16.0947C21.8289 15.7706 22.1887 15.3754 22.4603 14.803C22.75 14.1926 22.75 13.3974 22.75 11.807V2.84989C22.75 2.28683 22.75 2.0053 22.6416 1.79183C22.5459 1.60355 22.3944 1.45142 22.2065 1.35502ZM3 18.7499C2.58578 18.7499 2.25 19.0857 2.25 19.4999C2.25 19.9141 2.58578 20.2499 3 20.2499C4.97376 20.2499 6.39687 20.3742 7.67766 20.7235C8.95055 21.0706 10.1262 21.6521 11.584 22.6239C11.8359 22.7919 12.1641 22.7919 12.416 22.6239C13.8738 21.6521 15.0494 21.0706 16.3223 20.7235C17.6031 20.3742 19.0262 20.2499 21 20.2499C21.4142 20.2499 21.75 19.9141 21.75 19.4999C21.75 19.0857 21.4142 18.7499 21 18.7499C18.9738 18.7499 17.3969 18.8756 15.9277 19.2763C14.585 19.6425 13.3686 20.2282 12 21.1039C10.6314 20.2282 9.41498 19.6425 8.07234 19.2763C6.60313 18.8756 5.02623 18.7499 3 18.7499Z\",\n\t},\n};\n\nconst getIconPath = (name: IconName, variant: IconVariant): string =>\n\ticonRegistry[name]?.[variant] || iconRegistry[name]?.default || \"\";\n\nconst getIconType = (variant: IconVariant) =>\n\tvariant === \"filled\" ? \"filled\" : \"stroked\";\n\nexport const Icon: React.FC<IconProps> = ({\n\tname,\n\tvariant = \"default\",\n\tclassName,\n\tfilledOnHover,\n}) => {\n\tconst defaultPath = getIconPath(name, \"default\");\n\tconst filledPath = getIconPath(name, \"filled\");\n\tconst currentPath = getIconPath(name, variant);\n\tconst iconType = getIconType(variant);\n\n\tif (!currentPath) {\n\t\treturn null;\n\t}\n\n\t// If filledOnHover is true, render both variants with CSS-only hover\n\tif (filledOnHover && defaultPath && filledPath) {\n\t\treturn (\n\t\t\t<span\n\t\t\t\tclassName={`relative inline-block shrink-0 ${className || \"h-4 w-4\"}`}\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\"absolute inset-0 h-full w-full opacity-100 transition-opacity duration-200 group-hover/btn:opacity-0\",\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"opacity-0\": variant === \"filled\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclassName\n\t\t\t\t\t)}\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\theight=\"24\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\twidth=\"24\"\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t>\n\t\t\t\t\t<title>{name}</title>\n\t\t\t\t\t<path\n\t\t\t\t\t\td={defaultPath}\n\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\t\t\tstrokeWidth=\"1.5\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t\t<svg\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\"absolute inset-0 h-full w-full opacity-0 transition-opacity duration-200 group-hover/btn:opacity-100\",\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"opacity-100\": variant === \"filled\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclassName\n\t\t\t\t\t)}\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\theight=\"24\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\twidth=\"24\"\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t>\n\t\t\t\t\t<title>{name}</title>\n\t\t\t\t\t<path\n\t\t\t\t\t\tclipRule=\"evenodd\"\n\t\t\t\t\t\td={filledPath}\n\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t</span>\n\t\t);\n\t}\n\n\t// Standard rendering for non-hover variants\n\treturn (\n\t\t<svg\n\t\t\tclassName={`inline-block shrink-0 ${className || \"h-4 w-4\"}`}\n\t\t\tfill=\"none\"\n\t\t\theight=\"24\"\n\t\t\tviewBox=\"0 0 24 24\"\n\t\t\twidth=\"24\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t>\n\t\t\t<title>{name}</title>\n\t\t\t{iconType === \"filled\" ? (\n\t\t\t\t<path\n\t\t\t\t\tclipRule=\"evenodd\"\n\t\t\t\t\td={currentPath}\n\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<path\n\t\t\t\t\td={currentPath}\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\t\tstrokeWidth=\"1.5\"\n\t\t\t\t/>\n\t\t\t)}\n\t\t</svg>\n\t);\n};\n\nexport type AddNewIconTemplate = {\n\t[key: string]: {\n\t\tdefault: string;\n\t\tfilled: string;\n\t};\n};\n\nexport default Icon;\n"],"mappings":";;;;AA8BA,MAAMA,eAA8D;CACnE,SAAS;EACR,SACC;EACD,QACC;EACD;CAED,WAAW;EACV,SACC;EACD,QACC;EACD;CACD,MAAM;EACL,SACC;EACD,QACC;EACD;CACD,OAAO;EACN,SAAS;EACT,QAAQ;EACR;CACD,GAAG;EACF,SAAS;EACT,QAAQ;EACR;CACD,gBAAgB;EACf,SAAS;EACT,QACC;EACD;CACD,cAAc;EACb,SAAS;EACT,QAAQ;EACR;CACD,eAAe;EACd,SAAS;EACT,QAAQ;EACR;CACD,kBAAkB;EACjB,SAAS;EACT,QAAQ;EACR;CACD,MAAM;EACL,SACC;EACD,QACC;EACD;CACD,YAAY;EACX,SAC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GACA,GAAG;GACH,QAAO;GACP,eAAc;GACd,gBAAe;GACf,aAAY;IACX;GAEE;;AAWR,oBAAe"}
|
|
1
|
+
{"version":3,"file":"icons.js","names":["iconRegistry: Record<IconName, Record<IconVariant, string>>","Icon: React.FC<IconProps>"],"sources":["../../../src/support/components/icons.tsx"],"sourcesContent":["import type React from \"react\";\nimport { cn } from \"../utils\";\n\nexport type IconVariant = \"default\" | \"filled\";\n\nexport type IconName =\n\t| \"sidebar\"\n\t| \"check\"\n\t| \"x\"\n\t| \"clipboard\"\n\t| \"send\"\n\t| \"chevron-down\"\n\t| \"arrow-left\"\n\t| \"arrow-right\"\n\t| \"arrow-up-right\"\n\t| \"attachment\"\n\t| \"file\"\n\t| \"close\"\n\t| \"home\"\n\t| \"articles\"\n\t| \"chat\"\n\t| \"star\";\n\nexport type IconProps = {\n\tname: IconName;\n\tvariant?: IconVariant;\n\tclassName?: string;\n\tfilledOnHover?: boolean;\n};\n\n// Thanks to Aaon for the icons\nconst iconRegistry: Record<IconName, Record<IconVariant, string>> = {\n\tsidebar: {\n\t\tdefault:\n\t\t\t\"M9 2L9 22M10 22H14C16.8003 22 18.2004 22 19.27 21.455C20.2108 20.9757 20.9757 20.2108 21.455 19.27C22 18.2004 22 16.8003 22 14V10C22 7.19974 22 5.79961 21.455 4.73005C20.9757 3.78924 20.2108 3.02433 19.27 2.54497C18.2004 2 16.8003 2 14 2H10C7.19974 2 5.79961 2 4.73005 2.54497C3.78924 3.02433 3.02433 3.78924 2.54497 4.73005C2 5.79961 2 7.19974 2 10V14C2 16.8003 2 18.2004 2.54497 19.27C3.02433 20.2108 3.78924 20.9757 4.73005 21.455C5.79961 22 7.19974 22 10 22Z\",\n\t\tfilled:\n\t\t\t\"M9.25 2.58333C9.25 2.27334 9.25 2.11835 9.21593 1.99118C9.12346 1.64609 8.85391 1.37654 8.50882 1.28407C8.38165 1.25 8.22666 1.25 7.91667 1.25C6.36671 1.25 5.59174 1.25 4.9559 1.42037C3.23044 1.88271 1.88271 3.23044 1.42037 4.9559C1.25 5.59174 1.25 6.36671 1.25 7.91667V16.0833C1.25 17.6333 1.25 18.4083 1.42037 19.0441C1.88271 20.7696 3.23044 22.1173 4.9559 22.5796C5.59174 22.75 6.36671 22.75 7.91667 22.75C8.22666 22.75 8.38165 22.75 8.50882 22.7159C8.85391 22.6235 9.12346 22.3539 9.21593 22.0088C9.25 21.8817 9.25 21.7267 9.25 21.4167L9.25 2.58333ZM10.75 21.15C10.75 21.7101 10.75 21.9901 10.859 22.204C10.9549 22.3922 11.1078 22.5451 11.296 22.641C11.5099 22.75 11.7899 22.75 12.35 22.75H14.75C17.5503 22.75 18.9504 22.75 20.02 22.205C20.9608 21.7257 21.7257 20.9608 22.205 20.02C22.75 18.9504 22.75 17.5503 22.75 14.75V9.25C22.75 6.44974 22.75 5.04961 22.205 3.98005C21.7257 3.03924 20.9608 2.27433 20.02 1.79497C18.9504 1.25 17.5503 1.25 14.75 1.25H12.35C11.7899 1.25 11.5099 1.25 11.296 1.35899C11.1078 1.45487 10.9549 1.60785 10.859 1.79601C10.75 2.00992 10.75 2.28995 10.75 2.85L10.75 21.15Z\",\n\t},\n\n\tclipboard: {\n\t\tdefault:\n\t\t\t\"M15.9999 3V3C18.209 3 19.9999 4.79086 19.9999 7V14C19.9999 16.8003 19.9999 18.2004 19.4549 19.27C18.9755 20.2108 18.2106 20.9757 17.2698 21.455C16.2003 22 14.8001 22 11.9999 22V22C9.19962 22 7.79948 22 6.72993 21.455C5.78911 20.9757 5.02421 20.2108 4.54485 19.27C3.99988 18.2004 3.99988 16.8003 3.99988 14V7C3.99988 4.79086 5.79074 3 7.99988 3V3M15.9999 3V3C15.9999 1.89543 15.1044 1 13.9999 1H9.99988C8.89531 1 7.99988 1.89543 7.99988 3V3M15.9999 3V3C15.9999 4.10457 15.1044 5 13.9999 5H9.99988C8.89531 5 7.99988 4.10457 7.99988 3V3\",\n\t\tfilled:\n\t\t\t\"M10.136 0.25C8.85118 0.25 7.70111 1.04698 7.24994 2.25C5.0407 2.25 3.24976 4.04094 3.24976 6.25018V14.75C3.24976 17.5503 3.24976 18.9504 3.79472 20.02C4.27409 20.9608 5.03899 21.7257 5.9798 22.205C7.04936 22.75 8.44949 22.75 11.2498 22.75H12.7498C15.55 22.75 16.9501 22.75 18.0197 22.205C18.9605 21.7257 19.7254 20.9608 20.2048 20.02C20.7498 18.9504 20.7498 17.5503 20.7498 14.75V6.24982C20.7498 4.04078 18.959 2.25 16.7499 2.25C16.2988 1.04699 15.1488 0.25 13.864 0.25H10.136ZM9.99994 4.25C9.30958 4.25 8.74994 3.69036 8.74994 3C8.74994 2.30964 9.30958 1.75 9.99994 1.75H13.9999C14.6903 1.75 15.2499 2.30964 15.2499 3C15.2499 3.69036 14.6903 4.25 13.9999 4.25H9.99994Z\",\n\t},\n\tchat: {\n\t\tdefault:\n\t\t\t\"M2 10C2 7.19974 2 5.79961 2.54497 4.73005C3.02433 3.78924 3.78924 3.02433 4.73005 2.54497C5.79961 2 7.19974 2 10 2H14C16.8003 2 18.2004 2 19.27 2.54497C20.2108 3.02433 20.9757 3.78924 21.455 4.73005C22 5.79961 22 7.19974 22 10V19.1708C22 20.1969 22 20.71 21.8373 21.0302C21.5642 21.5676 20.996 21.8893 20.3947 21.847C20.0363 21.8218 19.5964 21.5578 18.7165 21.0299V21.0299C18.1917 20.715 17.9293 20.5576 17.6542 20.4347C17.1972 20.2306 16.7122 20.0962 16.2154 20.0362C15.9163 20 15.6103 20 14.9983 20H10C7.19974 20 5.79961 20 4.73005 19.455C3.78924 18.9757 3.02433 18.2108 2.54497 17.27C2 16.2004 2 14.8003 2 12V10Z\",\n\t\tfilled:\n\t\t\t\"M9.25 1.25C6.44974 1.25 5.04961 1.25 3.98005 1.79497C3.03924 2.27433 2.27433 3.03924 1.79497 3.98005C1.25 5.04961 1.25 6.44974 1.25 9.25V12.75C1.25 15.5503 1.25 16.9504 1.79497 18.02C2.27433 18.9608 3.03924 19.7257 3.98005 20.205C5.04961 20.75 6.44974 20.75 9.25 20.75H14.5764C15.4012 20.75 15.8135 20.75 16.2144 20.8156C16.5703 20.8738 16.9189 20.9703 17.254 21.1035C17.6315 21.2535 17.9851 21.4657 18.6924 21.8901L19.1152 22.1438C20.3049 22.8576 20.8998 23.2145 21.3892 23.1689C21.816 23.1291 22.2054 22.9086 22.4591 22.5631C22.75 22.1669 22.75 21.4732 22.75 20.0858V9.25C22.75 6.44974 22.75 5.04961 22.205 3.98005C21.7257 3.03924 20.9608 2.27433 20.02 1.79497C18.9504 1.25 17.5503 1.25 14.75 1.25H9.25Z\",\n\t},\n\tstar: {\n\t\tdefault:\n\t\t\t\"M12 2L14.618 8.472L21.5 9.09L16.25 13.77L17.804 20.5L12 17.1L6.196 20.5L7.75 13.77L2.5 9.09L9.382 8.472L12 2Z\",\n\t\tfilled:\n\t\t\t\"M12 2L14.618 8.472L21.5 9.09L16.25 13.77L17.804 20.5L12 17.1L6.196 20.5L7.75 13.77L2.5 9.09L9.382 8.472L12 2Z\",\n\t},\n\tcheck: {\n\t\tdefault: \"M4 13L9 18L20 6\",\n\t\tfilled: \"M4 13L9 18L20 6\",\n\t},\n\tx: {\n\t\tdefault: \"M6 18L18 6M6 6L18 18\",\n\t\tfilled: \"M6 18L18 6M6 6L18 18\",\n\t},\n\t\"chevron-down\": {\n\t\tdefault: \"M6 9L12 15L18 9\",\n\t\tfilled:\n\t\t\t\"M10.8686 14.8686L7.73137 11.7314C6.87462 10.8746 6.44624 10.4462 6.4173 10.0785C6.39218 9.75934 6.52136 9.44749 6.76477 9.23959C7.04529 9 7.65111 9 8.86274 9H15.1373C16.3489 9 16.9547 9 17.2352 9.23959C17.4786 9.44749 17.6078 9.75934 17.5827 10.0785C17.5538 10.4462 17.1254 10.8746 16.2686 11.7314L13.1314 14.8686C12.7354 15.2646 12.5373 15.4627 12.309 15.5368C12.1082 15.6021 11.8918 15.6021 11.691 15.5368C11.4627 15.4627 11.2646 15.2646 10.8686 14.8686Z\",\n\t},\n\t\"arrow-left\": {\n\t\tdefault: \"M15 19l-7-7 7-7\",\n\t\tfilled: \"M15 19l-7-7 7-7\",\n\t},\n\t\"arrow-right\": {\n\t\tdefault: \"M9 5l7 7-7 7\",\n\t\tfilled: \"M9 5l7 7-7 7\",\n\t},\n\t\"arrow-up-right\": {\n\t\tdefault: \"M15 19l-7-7 7-7\",\n\t\tfilled: \"M15 19l-7-7 7-7\",\n\t},\n\tsend: {\n\t\tdefault:\n\t\t\t\"M11 13L12.5345 16.9899C13.5893 19.7326 14.1168 21.1039 14.825 21.4489C15.4375 21.7472 16.1598 21.7132 16.7415 21.3586C17.4142 20.9486 17.8104 19.5338 18.6027 16.7041L21.466 6.47824C21.9677 4.68672 22.2185 3.79096 21.9857 3.17628C21.7827 2.64035 21.3596 2.21724 20.8237 2.01427C20.209 1.78147 19.3133 2.03228 17.5217 2.53391L7.29584 5.39716C4.46617 6.18947 3.05133 6.58563 2.64136 7.25828C2.28678 7.84005 2.25275 8.56231 2.55106 9.17484C2.89597 9.88306 4.26729 10.4105 7.00993 11.4654L11 13ZM11 13L13.5 10.5\",\n\t\tfilled:\n\t\t\t\"M6.88154 12.2191C3.45325 10.9005 1.7391 10.2412 1.30796 9.35595C0.935078 8.59028 0.977616 7.68746 1.42084 6.96024C1.93331 6.11943 3.70185 5.62424 7.23894 4.63385L17.234 1.83523C19.4734 1.2082 20.5931 0.894684 21.3615 1.18568C22.0314 1.43939 22.5603 1.96829 22.814 2.63819C23.1049 3.40654 22.7914 4.52624 22.1644 6.76565L19.3657 16.7606C18.3753 20.2977 17.88 22.0663 17.0392 22.5788C16.312 23.022 15.4092 23.0645 14.6435 22.6916C13.7582 22.2605 13.099 20.5463 11.7804 17.1179L11.0877 15.3166C10.9525 14.9653 10.885 14.7897 10.8813 14.6151C10.878 14.4608 10.9104 14.3078 10.9761 14.1681C11.0504 14.0101 11.1835 13.877 11.4496 13.6109L13.9999 11.0606C14.2928 10.7677 14.2928 10.2928 13.9999 9.99995C13.7071 9.70705 13.2322 9.70705 12.9393 9.99995L10.3891 12.5501C10.123 12.8163 9.98991 12.9493 9.83189 13.0236C9.69221 13.0893 9.53921 13.1218 9.38489 13.1185C9.2103 13.1148 9.03466 13.0472 8.68338 12.9121L6.88154 12.2191Z\",\n\t},\n\tattachment: {\n\t\tdefault:\n\t\t\t\"M22 12L15.25 18.75C12.3505 21.6495 7.64949 21.6495 4.75 18.75V18.75C1.85051 15.8505 1.8505 11.1495 4.75 8.25L9.5 3.5C11.433 1.56701 14.567 1.567 16.5 3.5V3.5C18.433 5.433 18.433 8.567 16.5 10.5L11.75 15.25C10.7835 16.2165 9.2165 16.2165 8.25 15.25V15.25C7.2835 14.2835 7.2835 12.7165 8.25 11.75L13 7\",\n\t\tfilled:\n\t\t\t\"M22 12L15.25 18.75C12.3505 21.6495 7.64949 21.6495 4.75 18.75V18.75C1.85051 15.8505 1.8505 11.1495 4.75 8.25L9.5 3.5C11.433 1.56701 14.567 1.567 16.5 3.5V3.5C18.433 5.433 18.433 8.567 16.5 10.5L11.75 15.25C10.7835 16.2165 9.2165 16.2165 8.25 15.25V15.25C7.2835 14.2835 7.2835 12.7165 8.25 11.75L13 7\",\n\t},\n\tfile: {\n\t\tdefault:\n\t\t\t\"M14 2.5V4.80003C14 5.92013 14 6.48019 14.218 6.90801C14.4097 7.28433 14.7157 7.5903 15.092 7.78204C15.5198 8.00003 16.0799 8.00003 17.2 8.00003H19.5M20 10.3137V14C20 16.8003 20 18.2004 19.455 19.27C18.9757 20.2108 18.2108 20.9757 17.27 21.455C16.2004 22 14.8003 22 12 22V22C9.19974 22 7.79961 22 6.73005 21.455C5.78924 20.9757 5.02433 20.2108 4.54497 19.27C4 18.2004 4 16.8003 4 14V9.77817C4 7.18697 4 5.89136 4.46859 4.88663C4.96536 3.82147 5.82147 2.96536 6.88663 2.46859C7.89136 2 9.18697 2 11.7782 2V2C12.9105 2 13.4766 2 14.0113 2.11855C14.5806 2.24479 15.1235 2.46965 15.6153 2.78296C16.0772 3.07721 16.4775 3.47753 17.2782 4.27817L17.6569 4.65685C18.5216 5.52161 18.954 5.95399 19.2632 6.45858C19.5373 6.90594 19.7394 7.39366 19.8618 7.90384C20 8.47928 20 9.09076 20 10.3137Z\",\n\t\tfilled:\n\t\t\t\"M13.25 1.26002C12.9109 1.24999 12.5071 1.24999 11.997 1.24999H11.25C8.44974 1.24999 7.04961 1.24999 5.98005 1.79495C5.03924 2.27432 4.27433 3.03922 3.79497 3.98003C3.25 5.04959 3.25 6.44972 3.25 9.24999V14.75C3.25 17.5502 3.25 18.9504 3.79497 20.0199C4.27433 20.9608 5.03924 21.7257 5.98005 22.205C7.04961 22.75 8.44974 22.75 11.25 22.75H12.75C15.5503 22.75 16.9504 22.75 18.02 22.205C18.9608 21.7257 19.7257 20.9608 20.205 20.0199C20.75 18.9504 20.75 17.5503 20.75 14.75V10.003C20.75 9.49287 20.75 9.08912 20.74 8.75H17.2H17.1695H17.1695C16.6354 8.75001 16.1896 8.75002 15.8253 8.72026C15.4454 8.68922 15.0888 8.62211 14.7515 8.45027C14.2341 8.18662 13.8134 7.76592 13.5497 7.24847C13.3779 6.91121 13.3108 6.55455 13.2797 6.17467C13.25 5.81044 13.25 5.36459 13.25 4.83043V4.8V1.26002ZM20.5164 7.25C20.3941 6.86401 20.2252 6.49389 20.0132 6.1479C19.704 5.64332 19.2716 5.21094 18.4069 4.3462L18.4069 4.34618L17.6538 3.59313L17.6538 3.59313C16.789 2.72837 16.3567 2.29599 15.8521 1.98679C15.5061 1.77477 15.136 1.60589 14.75 1.48358V4.8C14.75 5.37243 14.7506 5.75664 14.7748 6.05252C14.7982 6.33965 14.8401 6.47693 14.8862 6.56749C15.0061 6.80269 15.1973 6.99392 15.4325 7.11376C15.5231 7.1599 15.6604 7.20178 15.9475 7.22524C16.2434 7.24942 16.6276 7.25 17.2 7.25H20.5164Z\",\n\t},\n\tclose: {\n\t\tdefault: \"M6 18L18 6M6 6L18 18\",\n\t\tfilled: \"M6 18L18 6M6 6L18 18\",\n\t},\n\thome: {\n\t\tdefault:\n\t\t\t\"M15 22V15C15 14.0681 15 13.6022 14.8478 13.2346C14.6448 12.7446 14.2554 12.3552 13.7654 12.1522C13.3978 12 12.9319 12 12 12V12C11.0681 12 10.6022 12 10.2346 12.1522C9.74458 12.3552 9.35523 12.7446 9.15224 13.2346C9 13.6022 9 14.0681 9 15V22M7.00244 3.99805L5.00244 5.59805C3.89986 6.48011 3.34857 6.92115 2.95174 7.46857C2.6002 7.95353 2.33865 8.49771 2.17957 9.07517C2 9.72701 2 10.433 2 11.845V14C2 16.8003 2 18.2004 2.54497 19.27C3.02433 20.2108 3.78924 20.9757 4.73005 21.455C5.79961 22 7.19974 22 10 22H14C16.8003 22 18.2004 22 19.27 21.455C20.2108 20.9757 20.9757 20.2108 21.455 19.27C22 18.2004 22 16.8003 22 14V11.845C22 10.433 22 9.72701 21.8204 9.07517C21.6613 8.49771 21.3998 7.95353 21.0483 7.46857C20.6514 6.92115 20.1001 6.48011 18.9976 5.59805L16.9976 3.99805C15.214 2.57118 14.3222 1.85774 13.3332 1.58413C12.4608 1.34279 11.5392 1.34279 10.6668 1.58413C9.67783 1.85774 8.78603 2.57118 7.00244 3.99805Z\",\n\t\tfilled:\n\t\t\t\"M17.9971 3.83672C15.8568 2.12447 14.7866 1.26835 13.5998 0.94002C12.5529 0.650409 11.4471 0.650409 10.4002 0.94002C9.21339 1.26835 8.14324 2.12447 6.00293 3.83672L4.85293 4.75672C3.52983 5.8152 2.86828 6.34444 2.39209 7.00134C1.97024 7.58329 1.65638 8.23631 1.46548 8.92927C1.25 9.71147 1.25 10.5587 1.25 12.2531V13.1495C1.25 16.5098 1.25 18.19 1.90396 19.4735C2.4792 20.6024 3.39708 21.5203 4.52606 22.0956C5.80953 22.7495 7.48969 22.7495 10.85 22.7495H13.15C16.5103 22.7495 18.1905 22.7495 19.4739 22.0956C20.6029 21.5203 21.5208 20.6024 22.096 19.4735C22.75 18.19 22.75 16.5098 22.75 13.1495V12.2531C22.75 10.5587 22.75 9.71147 22.5345 8.92927C22.3436 8.23631 22.0298 7.58329 21.6079 7.00134C21.1317 6.34444 20.4702 5.8152 19.1471 4.75672L17.9971 3.83672ZM13.4 21C13.9601 21 14.2401 21 14.454 20.891C14.6422 20.7951 14.7951 20.6422 14.891 20.454C15 20.2401 15 19.9601 15 19.4V14C15 13.0681 15 12.6022 14.8478 12.2346C14.6448 11.7446 14.2554 11.3552 13.7654 11.1522C13.3978 11 12.9319 11 12 11C11.0681 11 10.6022 11 10.2346 11.1522C9.74458 11.3552 9.35523 11.7446 9.15224 12.2346C9 12.6022 9 13.0681 9 14V19.4C9 19.9601 9 20.2401 9.10899 20.454C9.20487 20.6422 9.35785 20.7951 9.54601 20.891C9.75992 21 10.0399 21 10.6 21H13.4Z\",\n\t},\n\tarticles: {\n\t\tdefault:\n\t\t\t\"M12 18C14.4268 16.4399 16.2646 16.0156 18.7998 15.9002C19.9707 15.8469 20.5562 15.8203 20.9643 15.5957C21.3343 15.3921 21.6076 15.106 21.7942 14.7271C22 14.3093 22 13.7586 22 12.6571V2C17.5556 2 15.3333 2 12 4.14286M12 18C9.57324 16.4399 7.7354 16.0156 5.20023 15.9002C4.02927 15.8469 3.44379 15.8203 3.03575 15.5957C2.66572 15.3921 2.39236 15.106 2.20576 14.7271C2 14.3093 2 13.7586 2 12.6571V2C6.44444 2 8.66667 2 12 4.14286M12 18V4.14286M21 19.5C17 19.5 15 20 12 22C9 20 7 19.5 3 19.5\",\n\t\tfilled:\n\t\t\t\"M22.2065 1.35502C21.9935 1.24571 21.7123 1.24458 21.15 1.24232C19.5779 1.236 18 1.25792 16.4538 1.52901C16.0981 1.59138 15.7497 1.66744 15.4043 1.75978C14.7337 1.9391 14.3983 2.02876 13.9246 2.392C13.5814 2.65517 13.1441 3.22469 12.9785 3.62425C12.75 4.17575 12.75 4.68234 12.75 5.69552V9.99989C12.75 10.4141 12.4142 10.7499 12 10.7499C11.5858 10.7499 11.25 10.4141 11.25 9.99989V5.69552C11.25 4.68234 11.25 4.17575 11.0215 3.62425C10.8559 3.22469 10.4186 2.65517 10.0754 2.392C9.60165 2.02876 9.26632 1.9391 8.59568 1.75978C8.25035 1.66744 7.90193 1.59138 7.54618 1.52901C5.99997 1.25792 4.42208 1.236 2.84998 1.24232C2.28768 1.24458 2.00654 1.24571 1.7935 1.35502C1.60561 1.45142 1.45409 1.60355 1.35845 1.79183C1.25 2.0053 1.25 2.28683 1.25 2.84989V11.807C1.25 13.3974 1.25 14.1926 1.5397 14.803C1.81132 15.3754 2.17112 15.7706 2.71551 16.0947C3.29615 16.4403 4.2131 16.5266 6.04701 16.6992C6.46239 16.7383 6.87605 16.7915 7.28715 16.8636C8.70571 17.1123 10.0018 17.6069 11.5944 18.6308L12 18.8915L12.4056 18.6308C13.9982 17.6069 15.2943 17.1123 16.7129 16.8636C17.1239 16.7915 17.5376 16.7383 17.953 16.6992C19.7869 16.5266 20.7039 16.4403 21.2845 16.0947C21.8289 15.7706 22.1887 15.3754 22.4603 14.803C22.75 14.1926 22.75 13.3974 22.75 11.807V2.84989C22.75 2.28683 22.75 2.0053 22.6416 1.79183C22.5459 1.60355 22.3944 1.45142 22.2065 1.35502ZM3 18.7499C2.58578 18.7499 2.25 19.0857 2.25 19.4999C2.25 19.9141 2.58578 20.2499 3 20.2499C4.97376 20.2499 6.39687 20.3742 7.67766 20.7235C8.95055 21.0706 10.1262 21.6521 11.584 22.6239C11.8359 22.7919 12.1641 22.7919 12.416 22.6239C13.8738 21.6521 15.0494 21.0706 16.3223 20.7235C17.6031 20.3742 19.0262 20.2499 21 20.2499C21.4142 20.2499 21.75 19.9141 21.75 19.4999C21.75 19.0857 21.4142 18.7499 21 18.7499C18.9738 18.7499 17.3969 18.8756 15.9277 19.2763C14.585 19.6425 13.3686 20.2282 12 21.1039C10.6314 20.2282 9.41498 19.6425 8.07234 19.2763C6.60313 18.8756 5.02623 18.7499 3 18.7499Z\",\n\t},\n};\n\nconst getIconPath = (name: IconName, variant: IconVariant): string =>\n\ticonRegistry[name]?.[variant] || iconRegistry[name]?.default || \"\";\n\nconst getIconType = (variant: IconVariant) =>\n\tvariant === \"filled\" ? \"filled\" : \"stroked\";\n\nexport const Icon: React.FC<IconProps> = ({\n\tname,\n\tvariant = \"default\",\n\tclassName,\n\tfilledOnHover,\n}) => {\n\tconst defaultPath = getIconPath(name, \"default\");\n\tconst filledPath = getIconPath(name, \"filled\");\n\tconst currentPath = getIconPath(name, variant);\n\tconst iconType = getIconType(variant);\n\n\tif (!currentPath) {\n\t\treturn null;\n\t}\n\n\t// If filledOnHover is true, render both variants with CSS-only hover\n\tif (filledOnHover && defaultPath && filledPath) {\n\t\treturn (\n\t\t\t<span\n\t\t\t\tclassName={`relative inline-block shrink-0 ${className || \"h-4 w-4\"}`}\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\"absolute inset-0 h-full w-full opacity-100 transition-opacity duration-200 group-hover/btn:opacity-0\",\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"opacity-0\": variant === \"filled\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclassName\n\t\t\t\t\t)}\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\theight=\"24\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\twidth=\"24\"\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t>\n\t\t\t\t\t<title>{name}</title>\n\t\t\t\t\t<path\n\t\t\t\t\t\td={defaultPath}\n\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\t\t\tstrokeWidth=\"2\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t\t<svg\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\"absolute inset-0 h-full w-full opacity-0 transition-opacity duration-200 group-hover/btn:opacity-100\",\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"opacity-100\": variant === \"filled\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclassName\n\t\t\t\t\t)}\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\theight=\"24\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\twidth=\"24\"\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t>\n\t\t\t\t\t<title>{name}</title>\n\t\t\t\t\t<path\n\t\t\t\t\t\tclipRule=\"evenodd\"\n\t\t\t\t\t\td={filledPath}\n\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t</span>\n\t\t);\n\t}\n\n\t// Standard rendering for non-hover variants\n\treturn (\n\t\t<svg\n\t\t\tclassName={`inline-block shrink-0 ${className || \"h-4 w-4\"}`}\n\t\t\tfill=\"none\"\n\t\t\theight=\"24\"\n\t\t\tviewBox=\"0 0 24 24\"\n\t\t\twidth=\"24\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t>\n\t\t\t<title>{name}</title>\n\t\t\t{iconType === \"filled\" ? (\n\t\t\t\t<path\n\t\t\t\t\tclipRule=\"evenodd\"\n\t\t\t\t\td={currentPath}\n\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<path\n\t\t\t\t\td={currentPath}\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\t\tstrokeWidth=\"2\"\n\t\t\t\t/>\n\t\t\t)}\n\t\t</svg>\n\t);\n};\n\nexport type AddNewIconTemplate = {\n\t[key: string]: {\n\t\tdefault: string;\n\t\tfilled: string;\n\t};\n};\n\nexport default Icon;\n"],"mappings":";;;;AA+BA,MAAMA,eAA8D;CACnE,SAAS;EACR,SACC;EACD,QACC;EACD;CAED,WAAW;EACV,SACC;EACD,QACC;EACD;CACD,MAAM;EACL,SACC;EACD,QACC;EACD;CACD,MAAM;EACL,SACC;EACD,QACC;EACD;CACD,OAAO;EACN,SAAS;EACT,QAAQ;EACR;CACD,GAAG;EACF,SAAS;EACT,QAAQ;EACR;CACD,gBAAgB;EACf,SAAS;EACT,QACC;EACD;CACD,cAAc;EACb,SAAS;EACT,QAAQ;EACR;CACD,eAAe;EACd,SAAS;EACT,QAAQ;EACR;CACD,kBAAkB;EACjB,SAAS;EACT,QAAQ;EACR;CACD,MAAM;EACL,SACC;EACD,QACC;EACD;CACD,YAAY;EACX,SACC;EACD,QACC;EACD;CACD,MAAM;EACL,SACC;EACD,QACC;EACD;CACD,OAAO;EACN,SAAS;EACT,QAAQ;EACR;CACD,MAAM;EACL,SACC;EACD,QACC;EACD;CACD,UAAU;EACT,SACC;EACD,QACC;EACD;CACD;AAED,MAAM,eAAe,MAAgB,YACpC,aAAa,QAAQ,YAAY,aAAa,OAAO,WAAW;AAEjE,MAAM,eAAe,YACpB,YAAY,WAAW,WAAW;AAEnC,MAAaC,QAA6B,EACzC,MACA,UAAU,WACV,WACA,oBACK;CACL,MAAM,cAAc,YAAY,MAAM,UAAU;CAChD,MAAM,aAAa,YAAY,MAAM,SAAS;CAC9C,MAAM,cAAc,YAAY,MAAM,QAAQ;CAC9C,MAAM,WAAW,YAAY,QAAQ;AAErC,KAAI,CAAC,YACJ,QAAO;AAIR,KAAI,iBAAiB,eAAe,WACnC,QACC,qBAAC;EACA,WAAW,kCAAkC,aAAa;aAE1D,qBAAC;GACA,WAAW,GACV,wGACA,EACC,aAAa,YAAY,UACzB,EACD,UACA;GACD,MAAK;GACL,QAAO;GACP,SAAQ;GACR,OAAM;GACN,OAAM;cAEN,oBAAC,qBAAO,OAAa,EACrB,oBAAC;IACA,GAAG;IACH,QAAO;IACP,eAAc;IACd,gBAAe;IACf,aAAY;KACX;IACG,EACN,qBAAC;GACA,WAAW,GACV,wGACA,EACC,eAAe,YAAY,UAC3B,EACD,UACA;GACD,MAAK;GACL,QAAO;GACP,SAAQ;GACR,OAAM;GACN,OAAM;cAEN,oBAAC,qBAAO,OAAa,EACrB,oBAAC;IACA,UAAS;IACT,GAAG;IACH,MAAK;IACL,UAAS;KACR;IACG;GACA;AAKT,QACC,qBAAC;EACA,WAAW,yBAAyB,aAAa;EACjD,MAAK;EACL,QAAO;EACP,SAAQ;EACR,OAAM;EACN,OAAM;aAEN,oBAAC,qBAAO,OAAa,EACpB,aAAa,WACb,oBAAC;GACA,UAAS;GACT,GAAG;GACH,MAAK;GACL,UAAS;IACR,GAEF,oBAAC;GACA,GAAG;GACH,QAAO;GACP,eAAc;GACd,gBAAe;GACf,aAAY;IACX;GAEE;;AAWR,oBAAe"}
|
|
@@ -2,6 +2,7 @@ import { TypingIndicator, TypingIndicatorProps, TypingParticipant, TypingPartici
|
|
|
2
2
|
import { ContentProps } from "../types.js";
|
|
3
3
|
import { Content } from "./content.js";
|
|
4
4
|
import { ConversationEvent, ConversationEventProps } from "./conversation-event.js";
|
|
5
|
+
import { ConversationResolvedFeedback } from "./conversation-resolved-feedback.js";
|
|
5
6
|
import { ConversationTimelineList, ConversationTimelineProps } from "./conversation-timeline.js";
|
|
6
7
|
import { Icon, IconName, IconProps, IconVariant } from "./icons.js";
|
|
7
8
|
import { SendButton } from "./multimodal-input.js";
|
|
@@ -9,4 +10,4 @@ import { Root, RootProps } from "./root.js";
|
|
|
9
10
|
import { TimelineMessageGroup, TimelineMessageGroupProps } from "./timeline-message-group.js";
|
|
10
11
|
import { TimelineMessageItem, TimelineMessageItemProps } from "./timeline-message-item.js";
|
|
11
12
|
import { DefaultTrigger, DefaultTriggerProps } from "./trigger.js";
|
|
12
|
-
export { Content, type ContentProps, ConversationEvent, type ConversationEventProps, ConversationTimelineList, type ConversationTimelineProps, DefaultTrigger, type DefaultTriggerProps, Icon, type IconName, type IconProps, type IconVariant, Root, type RootProps, SendButton, TimelineMessageGroup, type TimelineMessageGroupProps, TimelineMessageItem, type TimelineMessageItemProps, TypingIndicator, type TypingIndicatorProps, type TypingParticipant, type TypingParticipantType };
|
|
13
|
+
export { Content, type ContentProps, ConversationEvent, type ConversationEventProps, ConversationResolvedFeedback, ConversationTimelineList, type ConversationTimelineProps, DefaultTrigger, type DefaultTriggerProps, Icon, type IconName, type IconProps, type IconVariant, Root, type RootProps, SendButton, TimelineMessageGroup, type TimelineMessageGroupProps, TimelineMessageItem, type TimelineMessageItemProps, TypingIndicator, type TypingIndicatorProps, type TypingParticipant, type TypingParticipantType };
|
|
@@ -3,10 +3,11 @@ import icons_default from "./icons.js";
|
|
|
3
3
|
import { Content } from "./content.js";
|
|
4
4
|
import { Root } from "./root.js";
|
|
5
5
|
import { DefaultTrigger } from "./trigger.js";
|
|
6
|
+
import { ConversationResolvedFeedback } from "./conversation-resolved-feedback.js";
|
|
6
7
|
import { ConversationEvent } from "./conversation-event.js";
|
|
7
8
|
import { TimelineMessageItem } from "./timeline-message-item.js";
|
|
8
9
|
import { TimelineMessageGroup } from "./timeline-message-group.js";
|
|
9
10
|
import { ConversationTimelineList } from "./conversation-timeline.js";
|
|
10
11
|
import { SendButton } from "./multimodal-input.js";
|
|
11
12
|
|
|
12
|
-
export { Content, ConversationEvent, ConversationTimelineList, DefaultTrigger, icons_default as Icon, Root, SendButton, TimelineMessageGroup, TimelineMessageItem, TypingIndicator };
|
|
13
|
+
export { Content, ConversationEvent, ConversationResolvedFeedback, ConversationTimelineList, DefaultTrigger, icons_default as Icon, Root, SendButton, TimelineMessageGroup, TimelineMessageItem, TypingIndicator };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.d.ts","names":[],"sources":["../../../src/support/pages/conversation.tsx"],"sourcesContent":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","names":[],"sources":["../../../src/support/pages/conversation.tsx"],"sourcesContent":[],"mappings":";;;;KAgBK,qBAAA;;AAd2E;AAsC3D;EAQR,MAAA,CAAA,EAAA;;;;;;;;;;;;YAdH;;;;UAMD;;;;;KAMJ,yBAAA,WAAoC,0BAA0B;cAEtD,kBAAkB"}
|
|
@@ -5,11 +5,12 @@ import { useNewMessageSound } from "../../hooks/use-new-message-sound.js";
|
|
|
5
5
|
import { Header } from "../components/header.js";
|
|
6
6
|
import { Text, useSupportText } from "../text/index.js";
|
|
7
7
|
import { useConversationPage } from "../../hooks/use-conversation-page.js";
|
|
8
|
+
import { ConversationResolvedFeedback } from "../components/conversation-resolved-feedback.js";
|
|
8
9
|
import { ConversationTimelineList } from "../components/conversation-timeline.js";
|
|
9
10
|
import { MultimodalInput } from "../components/multimodal-input.js";
|
|
10
11
|
import { IdentificationTimelineTool } from "../components/timeline-identification-tool.js";
|
|
11
12
|
import { useSupport } from "../../provider.js";
|
|
12
|
-
import { useEffect, useMemo, useRef } from "react";
|
|
13
|
+
import { useEffect, useMemo, useRef, useState } from "react";
|
|
13
14
|
import { ConversationStatus } from "@cossistant/types";
|
|
14
15
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
16
|
|
|
@@ -27,6 +28,8 @@ const ConversationPage = ({ params, conversationId: legacyConversationId, initia
|
|
|
27
28
|
playbackRate: 1
|
|
28
29
|
});
|
|
29
30
|
const previousItemsRef = useRef([]);
|
|
31
|
+
const [pendingRating, setPendingRating] = useState(null);
|
|
32
|
+
const [isSubmittingRating, setIsSubmittingRating] = useState(false);
|
|
30
33
|
const timelineTools = useMemo(() => ({ identification: { component: IdentificationTimelineTool } }), []);
|
|
31
34
|
const conversation = useConversationPage({
|
|
32
35
|
conversationId: initialConversationId,
|
|
@@ -42,6 +45,30 @@ const ConversationPage = ({ params, conversationId: legacyConversationId, initia
|
|
|
42
45
|
});
|
|
43
46
|
const activeConversation = useStoreSelector(client?.conversationsStore ?? null, (state) => conversation.isPending || !state ? null : state.byId[conversation.conversationId]);
|
|
44
47
|
const isConversationClosed = Boolean(activeConversation && (activeConversation.status === ConversationStatus.RESOLVED || activeConversation.status === ConversationStatus.SPAM || activeConversation.deletedAt));
|
|
48
|
+
const resolvedRating = activeConversation?.visitorRating ?? pendingRating ?? null;
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
setPendingRating(null);
|
|
51
|
+
setIsSubmittingRating(false);
|
|
52
|
+
}, [activeConversation?.id]);
|
|
53
|
+
const handleRateConversation = async (value) => {
|
|
54
|
+
if (!(client && activeConversation)) return;
|
|
55
|
+
if (activeConversation.status !== ConversationStatus.RESOLVED || activeConversation.visitorRating) return;
|
|
56
|
+
if (isSubmittingRating) return;
|
|
57
|
+
setPendingRating(value);
|
|
58
|
+
setIsSubmittingRating(true);
|
|
59
|
+
try {
|
|
60
|
+
await client.submitConversationRating({
|
|
61
|
+
conversationId: activeConversation.id,
|
|
62
|
+
rating: value,
|
|
63
|
+
visitorId: visitor?.id ?? void 0
|
|
64
|
+
});
|
|
65
|
+
} catch (error) {
|
|
66
|
+
console.error("[support] Failed to submit rating", error);
|
|
67
|
+
setPendingRating(null);
|
|
68
|
+
} finally {
|
|
69
|
+
setIsSubmittingRating(false);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
45
72
|
const handleGoBack = () => {
|
|
46
73
|
if (canGoBack) goBack();
|
|
47
74
|
else navigate({ page: "HOME" });
|
|
@@ -93,12 +120,11 @@ const ConversationPage = ({ params, conversationId: legacyConversationId, initia
|
|
|
93
120
|
items: conversation.items,
|
|
94
121
|
tools: timelineTools
|
|
95
122
|
}),
|
|
96
|
-
isConversationClosed ? /* @__PURE__ */ jsx(
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
})
|
|
123
|
+
isConversationClosed ? /* @__PURE__ */ jsx(ConversationResolvedFeedback, {
|
|
124
|
+
isSubmitting: isSubmittingRating,
|
|
125
|
+
onRate: handleRateConversation,
|
|
126
|
+
rating: resolvedRating,
|
|
127
|
+
status: activeConversation?.status ?? null
|
|
102
128
|
}) : /* @__PURE__ */ jsx("div", {
|
|
103
129
|
className: "flex-shrink-0 p-1",
|
|
104
130
|
children: /* @__PURE__ */ jsx(MultimodalInput, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.js","names":["ConversationPage: ConversationPageComponent"],"sources":["../../../src/support/pages/conversation.tsx"],"sourcesContent":["import { ConversationStatus } from \"@cossistant/types\";\nimport type { TimelineItem } from \"@cossistant/types/api/timeline-item\";\nimport { type ReactElement, useEffect, useMemo, useRef } from \"react\";\nimport { useStoreSelector } from \"../../hooks/private/store/use-store-selector\";\nimport { useConversationPage } from \"../../hooks/use-conversation-page\";\nimport { useNewMessageSound } from \"../../hooks/use-new-message-sound\";\nimport { useSupport } from \"../../provider\";\nimport { AvatarStack } from \"../components/avatar-stack\";\nimport { ConversationTimelineList } from \"../components/conversation-timeline\";\nimport { Header } from \"../components/header\";\nimport { MultimodalInput } from \"../components/multimodal-input\";\nimport { IdentificationTimelineTool } from \"../components/timeline-identification-tool\";\nimport { useSupportConfig, useSupportNavigation } from \"../store\";\nimport { Text, useSupportText } from \"../text\";\n\ntype ConversationPageProps = {\n\t/**\n\t * Page params object (for compatibility with Page component)\n\t */\n\tparams?: {\n\t\t/**\n\t\t * The conversation ID to display (can be PENDING_CONVERSATION_ID or a real ID).\n\t\t */\n\t\tconversationId: string;\n\n\t\t/**\n\t\t * Optional initial message to send when opening the conversation.\n\t\t */\n\t\tinitialMessage?: string;\n\n\t\t/**\n\t\t * Optional timeline items to display (for optimistic updates or initial state).\n\t\t */\n\t\titems?: TimelineItem[];\n\t};\n\n\t// Legacy direct props support (deprecated but maintained for backward compatibility)\n\tconversationId?: string;\n\tinitialMessage?: string;\n\titems?: TimelineItem[];\n};\n\n/**\n * Conversation page with message timeline and input composer.\n */\ntype ConversationPageComponent = (props: ConversationPageProps) => ReactElement;\n\nexport const ConversationPage: ConversationPageComponent = ({\n\tparams,\n\tconversationId: legacyConversationId,\n\tinitialMessage: legacyInitialMessage,\n\titems: legacyItems,\n}: ConversationPageProps) => {\n\t// Support both params object (new) and direct props (legacy)\n\tconst initialConversationId =\n\t\tparams?.conversationId ?? legacyConversationId ?? \"\";\n\tconst initialMessage = params?.initialMessage ?? legacyInitialMessage;\n\tconst passedItems = params?.items ?? legacyItems ?? [];\n\tconst { website, availableAIAgents, availableHumanAgents, visitor, client } =\n\t\tuseSupport();\n\tconst { navigate, replace, goBack, canGoBack } = useSupportNavigation();\n\tconst { isOpen } = useSupportConfig();\n\tconst text = useSupportText();\n\tconst playNewMessageSound = useNewMessageSound({\n\t\tvolume: 0.7,\n\t\tplaybackRate: 1.0,\n\t});\n\tconst previousItemsRef = useRef<TimelineItem[]>([]);\n\n\tconst timelineTools = useMemo(\n\t\t() => ({\n\t\t\tidentification: { component: IdentificationTimelineTool },\n\t\t}),\n\t\t[]\n\t);\n\n\t// Main conversation hook - handles all logic\n\tconst conversation = useConversationPage({\n\t\tconversationId: initialConversationId,\n\t\titems: passedItems,\n\t\tinitialMessage,\n\t\tautoSeenEnabled: isOpen,\n\t\tonConversationIdChange: (newConversationId) => {\n\t\t\t// Update navigation when conversation is created\n\t\t\treplace({\n\t\t\t\tpage: \"CONVERSATION\",\n\t\t\t\tparams: { conversationId: newConversationId },\n\t\t\t});\n\t\t},\n\t});\n\n\t// Get conversation from store (no API call) to check status\n\tconst activeConversation = useStoreSelector(\n\t\tclient?.conversationsStore ?? null,\n\t\t(state) =>\n\t\t\tconversation.isPending || !state\n\t\t\t\t? null\n\t\t\t\t: state.byId[conversation.conversationId]\n\t);\n\n\tconst isConversationClosed = Boolean(\n\t\tactiveConversation &&\n\t\t\t(activeConversation.status === ConversationStatus.RESOLVED ||\n\t\t\t\tactiveConversation.status === ConversationStatus.SPAM ||\n\t\t\t\tactiveConversation.deletedAt)\n\t);\n\n\tconst handleGoBack = () => {\n\t\tif (canGoBack) {\n\t\t\tgoBack();\n\t\t} else {\n\t\t\tnavigate({ page: \"HOME\" });\n\t\t}\n\t};\n\n\t// Play sound when new messages arrive from agents (not visitor)\n\tuseEffect(() => {\n\t\tconst currentItems = conversation.items;\n\t\tconst previousItems = previousItemsRef.current;\n\n\t\t// Check if there are new items\n\t\tif (currentItems.length > previousItems.length) {\n\t\t\t// Find the new items\n\t\t\tconst newItems = currentItems.slice(previousItems.length);\n\n\t\t\t// Play sound only if new message is from agent (not visitor)\n\t\t\tfor (const item of newItems) {\n\t\t\t\tif (item.type === \"message\" && !item.visitorId) {\n\t\t\t\t\tplayNewMessageSound();\n\t\t\t\t\tbreak; // Only play once per batch\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Update the ref\n\t\tpreviousItemsRef.current = currentItems;\n\t}, [conversation.items, playNewMessageSound]);\n\n\treturn (\n\t\t<div className=\"flex h-full flex-col gap-0 overflow-hidden\">\n\t\t\t<Header onGoBack={handleGoBack}>\n\t\t\t\t<div className=\"flex w-full items-center justify-between gap-2 py-3\">\n\t\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t\t<p className=\"font-medium text-co-primary text-sm\">\n\t\t\t\t\t\t\t{website?.name}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\tas=\"p\"\n\t\t\t\t\t\t\tclassName=\"text-co-muted-foreground text-sm\"\n\t\t\t\t\t\t\ttextKey=\"common.labels.supportOnline\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<AvatarStack\n\t\t\t\t\t\taiAgents={availableAIAgents}\n\t\t\t\t\t\tgapWidth={2}\n\t\t\t\t\t\thumanAgents={availableHumanAgents}\n\t\t\t\t\t\tsize={32}\n\t\t\t\t\t\tspacing={28}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</Header>\n\n\t\t\t<ConversationTimelineList\n\t\t\t\tavailableAIAgents={availableAIAgents}\n\t\t\t\tavailableHumanAgents={availableHumanAgents}\n\t\t\t\tclassName=\"min-h-0 flex-1 px-4\"\n\t\t\t\tconversationId={conversation.conversationId}\n\t\t\t\tcurrentVisitorId={visitor?.id}\n\t\t\t\titems={conversation.items}\n\t\t\t\ttools={timelineTools}\n\t\t\t/>\n\n\t\t\t{isConversationClosed ? (\n\t\t\t\t<div className=\"m-4 flex items-center justify-center text-balance px-4 pb-6 text-center font-medium text-co-muted-foreground text-sm\">\n\t\t\t\t\t<Text as=\"p\" textKey=\"component.conversationPage.closedMessage\" />\n\t\t\t\t</div>\n\t\t\t) : (\n\t\t\t\t<div className=\"flex-shrink-0 p-1\">\n\t\t\t\t\t<MultimodalInput\n\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\tconversation.composer.isSubmitting ||\n\t\t\t\t\t\t\tconversation.composer.isUploading\n\t\t\t\t\t\t}\n\t\t\t\t\t\terror={conversation.error}\n\t\t\t\t\t\tfiles={conversation.composer.files}\n\t\t\t\t\t\tisSubmitting={conversation.composer.isSubmitting}\n\t\t\t\t\t\tisUploading={conversation.composer.isUploading}\n\t\t\t\t\t\tonChange={conversation.composer.setMessage}\n\t\t\t\t\t\tonFileSelect={conversation.composer.addFiles}\n\t\t\t\t\t\tonRemoveFile={conversation.composer.removeFile}\n\t\t\t\t\t\tonSubmit={conversation.composer.submit}\n\t\t\t\t\t\tplaceholder={text(\"component.multimodalInput.placeholder\")}\n\t\t\t\t\t\tvalue={conversation.composer.message}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n"],"mappings":";;;;;;;;;;;;;;;;AA+CA,MAAaA,oBAA+C,EAC3D,QACA,gBAAgB,sBAChB,gBAAgB,sBAChB,OAAO,kBACqB;CAE5B,MAAM,wBACL,QAAQ,kBAAkB,wBAAwB;CACnD,MAAM,iBAAiB,QAAQ,kBAAkB;CACjD,MAAM,cAAc,QAAQ,SAAS,eAAe,EAAE;CACtD,MAAM,EAAE,SAAS,mBAAmB,sBAAsB,SAAS,WAClE,YAAY;CACb,MAAM,EAAE,UAAU,SAAS,QAAQ,cAAc,sBAAsB;CACvE,MA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,oBAAC;MACA,UAAU;MACV,UAAU;MACV,aAAa;MACb,MAAM;MACN,SAAS;OACR;MACG;KACE;GAET,oBAAC;IACmB;IACG;IACtB,WAAU;IACV,gBAAgB,aAAa;IAC7B,kBAAkB,SAAS;IAC3B,OAAO,aAAa;IACpB,OAAO;KACN;GAED,uBACA,oBAAC;IAAI,WAAU;cACd,oBAAC;KAAK,IAAG;KAAI,SAAQ;MAA6C;KAC7D,GAEN,oBAAC;IAAI,WAAU;cACd,oBAAC;KACA,UACC,aAAa,SAAS,gBACtB,aAAa,SAAS;KAEvB,OAAO,aAAa;KACpB,OAAO,aAAa,SAAS;KAC7B,cAAc,aAAa,SAAS;KACpC,aAAa,aAAa,SAAS;KACnC,UAAU,aAAa,SAAS;KAChC,cAAc,aAAa,SAAS;KACpC,cAAc,aAAa,SAAS;KACpC,UAAU,aAAa,SAAS;KAChC,aAAa,KAAK,wCAAwC;KAC1D,OAAO,aAAa,SAAS;MAC5B;KACG;;GAEF"}
|
|
1
|
+
{"version":3,"file":"conversation.js","names":["ConversationPage: ConversationPageComponent"],"sources":["../../../src/support/pages/conversation.tsx"],"sourcesContent":["import { ConversationStatus } from \"@cossistant/types\";\nimport type { TimelineItem } from \"@cossistant/types/api/timeline-item\";\nimport { type ReactElement, useEffect, useMemo, useRef, useState } from \"react\";\nimport { useStoreSelector } from \"../../hooks/private/store/use-store-selector\";\nimport { useConversationPage } from \"../../hooks/use-conversation-page\";\nimport { useNewMessageSound } from \"../../hooks/use-new-message-sound\";\nimport { useSupport } from \"../../provider\";\nimport { AvatarStack } from \"../components/avatar-stack\";\nimport { ConversationResolvedFeedback } from \"../components/conversation-resolved-feedback\";\nimport { ConversationTimelineList } from \"../components/conversation-timeline\";\nimport { Header } from \"../components/header\";\nimport { MultimodalInput } from \"../components/multimodal-input\";\nimport { IdentificationTimelineTool } from \"../components/timeline-identification-tool\";\nimport { useSupportConfig, useSupportNavigation } from \"../store\";\nimport { Text, useSupportText } from \"../text\";\n\ntype ConversationPageProps = {\n\t/**\n\t * Page params object (for compatibility with Page component)\n\t */\n\tparams?: {\n\t\t/**\n\t\t * The conversation ID to display (can be PENDING_CONVERSATION_ID or a real ID).\n\t\t */\n\t\tconversationId: string;\n\n\t\t/**\n\t\t * Optional initial message to send when opening the conversation.\n\t\t */\n\t\tinitialMessage?: string;\n\n\t\t/**\n\t\t * Optional timeline items to display (for optimistic updates or initial state).\n\t\t */\n\t\titems?: TimelineItem[];\n\t};\n\n\t// Legacy direct props support (deprecated but maintained for backward compatibility)\n\tconversationId?: string;\n\tinitialMessage?: string;\n\titems?: TimelineItem[];\n};\n\n/**\n * Conversation page with message timeline and input composer.\n */\ntype ConversationPageComponent = (props: ConversationPageProps) => ReactElement;\n\nexport const ConversationPage: ConversationPageComponent = ({\n\tparams,\n\tconversationId: legacyConversationId,\n\tinitialMessage: legacyInitialMessage,\n\titems: legacyItems,\n}: ConversationPageProps) => {\n\t// Support both params object (new) and direct props (legacy)\n\tconst initialConversationId =\n\t\tparams?.conversationId ?? legacyConversationId ?? \"\";\n\tconst initialMessage = params?.initialMessage ?? legacyInitialMessage;\n\tconst passedItems = params?.items ?? legacyItems ?? [];\n\tconst { website, availableAIAgents, availableHumanAgents, visitor, client } =\n\t\tuseSupport();\n\tconst { navigate, replace, goBack, canGoBack } = useSupportNavigation();\n\tconst { isOpen } = useSupportConfig();\n\tconst text = useSupportText();\n\tconst playNewMessageSound = useNewMessageSound({\n\t\tvolume: 0.7,\n\t\tplaybackRate: 1.0,\n\t});\n\tconst previousItemsRef = useRef<TimelineItem[]>([]);\n\tconst [pendingRating, setPendingRating] = useState<number | null>(null);\n\tconst [isSubmittingRating, setIsSubmittingRating] = useState(false);\n\n\tconst timelineTools = useMemo(\n\t\t() => ({\n\t\t\tidentification: { component: IdentificationTimelineTool },\n\t\t}),\n\t\t[]\n\t);\n\n\t// Main conversation hook - handles all logic\n\tconst conversation = useConversationPage({\n\t\tconversationId: initialConversationId,\n\t\titems: passedItems,\n\t\tinitialMessage,\n\t\tautoSeenEnabled: isOpen,\n\t\tonConversationIdChange: (newConversationId) => {\n\t\t\t// Update navigation when conversation is created\n\t\t\treplace({\n\t\t\t\tpage: \"CONVERSATION\",\n\t\t\t\tparams: { conversationId: newConversationId },\n\t\t\t});\n\t\t},\n\t});\n\n\t// Get conversation from store (no API call) to check status\n\tconst activeConversation = useStoreSelector(\n\t\tclient?.conversationsStore ?? null,\n\t\t(state) =>\n\t\t\tconversation.isPending || !state\n\t\t\t\t? null\n\t\t\t\t: state.byId[conversation.conversationId]\n\t);\n\n\tconst isConversationClosed = Boolean(\n\t\tactiveConversation &&\n\t\t\t(activeConversation.status === ConversationStatus.RESOLVED ||\n\t\t\t\tactiveConversation.status === ConversationStatus.SPAM ||\n\t\t\t\tactiveConversation.deletedAt)\n\t);\n\tconst resolvedRating =\n\t\tactiveConversation?.visitorRating ?? pendingRating ?? null;\n\n\tuseEffect(() => {\n\t\tsetPendingRating(null);\n\t\tsetIsSubmittingRating(false);\n\t}, [activeConversation?.id]);\n\n\tconst handleRateConversation = async (value: number) => {\n\t\tif (!(client && activeConversation)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (\n\t\t\tactiveConversation.status !== ConversationStatus.RESOLVED ||\n\t\t\tactiveConversation.visitorRating\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isSubmittingRating) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetPendingRating(value);\n\t\tsetIsSubmittingRating(true);\n\n\t\ttry {\n\t\t\tawait client.submitConversationRating({\n\t\t\t\tconversationId: activeConversation.id,\n\t\t\t\trating: value,\n\t\t\t\tvisitorId: visitor?.id ?? undefined,\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tconsole.error(\"[support] Failed to submit rating\", error);\n\t\t\tsetPendingRating(null);\n\t\t} finally {\n\t\t\tsetIsSubmittingRating(false);\n\t\t}\n\t};\n\n\tconst handleGoBack = () => {\n\t\tif (canGoBack) {\n\t\t\tgoBack();\n\t\t} else {\n\t\t\tnavigate({ page: \"HOME\" });\n\t\t}\n\t};\n\n\t// Play sound when new messages arrive from agents (not visitor)\n\tuseEffect(() => {\n\t\tconst currentItems = conversation.items;\n\t\tconst previousItems = previousItemsRef.current;\n\n\t\t// Check if there are new items\n\t\tif (currentItems.length > previousItems.length) {\n\t\t\t// Find the new items\n\t\t\tconst newItems = currentItems.slice(previousItems.length);\n\n\t\t\t// Play sound only if new message is from agent (not visitor)\n\t\t\tfor (const item of newItems) {\n\t\t\t\tif (item.type === \"message\" && !item.visitorId) {\n\t\t\t\t\tplayNewMessageSound();\n\t\t\t\t\tbreak; // Only play once per batch\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Update the ref\n\t\tpreviousItemsRef.current = currentItems;\n\t}, [conversation.items, playNewMessageSound]);\n\n\treturn (\n\t\t<div className=\"flex h-full flex-col gap-0 overflow-hidden\">\n\t\t\t<Header onGoBack={handleGoBack}>\n\t\t\t\t<div className=\"flex w-full items-center justify-between gap-2 py-3\">\n\t\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t\t<p className=\"font-medium text-co-primary text-sm\">\n\t\t\t\t\t\t\t{website?.name}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\tas=\"p\"\n\t\t\t\t\t\t\tclassName=\"text-co-muted-foreground text-sm\"\n\t\t\t\t\t\t\ttextKey=\"common.labels.supportOnline\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<AvatarStack\n\t\t\t\t\t\taiAgents={availableAIAgents}\n\t\t\t\t\t\tgapWidth={2}\n\t\t\t\t\t\thumanAgents={availableHumanAgents}\n\t\t\t\t\t\tsize={32}\n\t\t\t\t\t\tspacing={28}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</Header>\n\n\t\t\t<ConversationTimelineList\n\t\t\t\tavailableAIAgents={availableAIAgents}\n\t\t\t\tavailableHumanAgents={availableHumanAgents}\n\t\t\t\tclassName=\"min-h-0 flex-1 px-4\"\n\t\t\t\tconversationId={conversation.conversationId}\n\t\t\t\tcurrentVisitorId={visitor?.id}\n\t\t\t\titems={conversation.items}\n\t\t\t\ttools={timelineTools}\n\t\t\t/>\n\n\t\t\t{isConversationClosed ? (\n\t\t\t\t<ConversationResolvedFeedback\n\t\t\t\t\tisSubmitting={isSubmittingRating}\n\t\t\t\t\tonRate={handleRateConversation}\n\t\t\t\t\trating={resolvedRating}\n\t\t\t\t\tstatus={activeConversation?.status ?? null}\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<div className=\"flex-shrink-0 p-1\">\n\t\t\t\t\t<MultimodalInput\n\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\tconversation.composer.isSubmitting ||\n\t\t\t\t\t\t\tconversation.composer.isUploading\n\t\t\t\t\t\t}\n\t\t\t\t\t\terror={conversation.error}\n\t\t\t\t\t\tfiles={conversation.composer.files}\n\t\t\t\t\t\tisSubmitting={conversation.composer.isSubmitting}\n\t\t\t\t\t\tisUploading={conversation.composer.isUploading}\n\t\t\t\t\t\tonChange={conversation.composer.setMessage}\n\t\t\t\t\t\tonFileSelect={conversation.composer.addFiles}\n\t\t\t\t\t\tonRemoveFile={conversation.composer.removeFile}\n\t\t\t\t\t\tonSubmit={conversation.composer.submit}\n\t\t\t\t\t\tplaceholder={text(\"component.multimodalInput.placeholder\")}\n\t\t\t\t\t\tvalue={conversation.composer.message}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AAgDA,MAAaA,oBAA+C,EAC3D,QACA,gBAAgB,sBAChB,gBAAgB,sBAChB,OAAO,kBACqB;CAE5B,MAAM,wBACL,QAAQ,kBAAkB,wBAAwB;CACnD,MAAM,iBAAiB,QAAQ,kBAAkB;CACjD,MAAM,cAAc,QAAQ,SAAS,eAAe,EAAE;CACtD,MAAM,EAAE,SAAS,mBAAmB,sBAAsB,SAAS,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AAK,wCAAwC;KAC1D,OAAO,aAAa,SAAS;MAC5B;KACG;;GAEF"}
|
|
@@ -70,6 +70,15 @@ const en = {
|
|
|
70
70
|
"component.identificationTool.inputLabel": "Email address",
|
|
71
71
|
"component.identificationTool.eventLog": "Visitor confirmed their email address",
|
|
72
72
|
"component.conversationPage.closedMessage": "This conversation is closed, start a new one to talk with us",
|
|
73
|
+
"component.conversationPage.ratingPrompt": "How did we do?",
|
|
74
|
+
"component.conversationPage.ratingThanks": "Thanks for your feedback!",
|
|
75
|
+
"component.conversationPage.ratingLabel": ({ variables, utils }) => {
|
|
76
|
+
const noun = utils.pluralize(variables.rating, {
|
|
77
|
+
one: "star",
|
|
78
|
+
other: "stars"
|
|
79
|
+
});
|
|
80
|
+
return `Rate ${variables.rating} ${noun}`;
|
|
81
|
+
},
|
|
73
82
|
"component.multimodalInput.placeholder": "Type your message...",
|
|
74
83
|
"component.multimodalInput.remove": ({ variables }) => `Remove ${variables.fileName}`,
|
|
75
84
|
"component.navigation.articles": "Articles",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.js","names":["en: SupportLocaleMessages","phrases: Record<typeof period.token, string>"],"sources":["../../../../src/support/text/locales/en.tsx"],"sourcesContent":["import type { SupportLocaleMessages } from \"./keys\";\n\nconst en: SupportLocaleMessages = {\n\t\"common.actions.askQuestion\": \"Ask us a question\",\n\t\"common.actions.attachFiles\": \"Attach files\",\n\t\"common.actions.removeFile\": ({ variables }) =>\n\t\t`Remove ${variables.fileName}`,\n\t\"common.brand.watermark\": \"We run on\",\n\t\"common.fallbacks.aiAssistant\": \"AI assistant\",\n\t\"common.fallbacks.cossistant\": \"Cossistant\",\n\t\"common.fallbacks.someone\": \"Someone\",\n\t\"common.fallbacks.supportTeam\": \"Support\",\n\t\"common.fallbacks.unknown\": \"Unknown\",\n\t\"common.fallbacks.you\": \"You\",\n\t\"common.labels.aiAgentIndicator\": \"AI agent\",\n\t\"common.labels.supportOnline\": \"Support online\",\n\t\"page.conversationHistory.showMore\": ({ variables, utils }) =>\n\t\t`+${utils.formatNumber(variables.count)} more`,\n\t\"page.conversationHistory.title\": \"Conversation history\",\n\t\"page.home.greeting\": ({ variables, context, utils }) => {\n\t\tconst period = utils.timeOfDay();\n\t\tconst phrases: Record<typeof period.token, string> = {\n\t\t\tmorning: \"Morning\",\n\t\t\tafternoon: \"Afternoon\",\n\t\t\tevening: \"Evening\",\n\t\t};\n\t\tconst visitorName =\n\t\t\tvariables?.visitorName || context.visitor?.contact?.name;\n\t\treturn `${phrases[period.token]}${visitorName ? ` ${visitorName}` : \"\"}, how can we help?`;\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\",\n\t\t\tother: \"conversations\",\n\t\t});\n\t\treturn `+ ${utils.formatNumber(count)} more ${noun}`;\n\t},\n\t\"page.home.tagline\": ({ variables, context, utils }) => {\n\t\tconst websiteName = variables?.websiteName || context.website?.name || \"\";\n\t\tconst formatted = websiteName\n\t\t\t? `${utils.titleCase(websiteName)} support`\n\t\t\t: \"Support\";\n\t\treturn formatted;\n\t},\n\t\"component.conversationButtonLink.fallbackTitle\": \"Untitled conversation\",\n\t\"component.conversationButtonLink.lastMessage.agent\": ({ variables }) =>\n\t\t`${variables.name} - ${variables.time}`,\n\t\"component.conversationButtonLink.lastMessage.visitor\": ({ variables }) =>\n\t\t`You - ${variables.time}`,\n\t\"component.conversationButtonLink.typing\": ({ variables }) =>\n\t\t`${variables.name} is typing...`,\n\t\"component.conversationButtonLink.status.open\": \"Open\",\n\t\"component.conversationButtonLink.status.resolved\": \"Resolved\",\n\t\"component.conversationButtonLink.status.spam\": \"Spam\",\n\t\"component.conversationButtonLink.status.closed\": \"closed\",\n\t\"component.conversationEvent.assigned\": ({ variables }) =>\n\t\t`${variables.actorName} assigned the conversation`,\n\t\"component.conversationEvent.unassigned\": ({ variables }) =>\n\t\t`${variables.actorName} unassigned the conversation`,\n\t\"component.conversationEvent.default\": ({ variables }) =>\n\t\t`${variables.actorName} performed an action`,\n\t\"component.conversationEvent.participantJoined\": ({ variables }) =>\n\t\t`${variables.actorName} joined the conversation`,\n\t\"component.conversationEvent.participantLeft\": ({ variables }) =>\n\t\t`${variables.actorName} left the conversation`,\n\t\"component.conversationEvent.participantRequested\": ({ variables }) =>\n\t\t`${variables.actorName} requested a team member to join`,\n\t\"component.conversationEvent.priorityChanged\": ({ variables }) =>\n\t\t`${variables.actorName} changed the priority`,\n\t\"component.conversationEvent.reopened\": ({ variables }) =>\n\t\t`${variables.actorName} reopened the conversation`,\n\t\"component.conversationEvent.resolved\": ({ variables }) =>\n\t\t`${variables.actorName} resolved the conversation`,\n\t\"component.conversationEvent.statusChanged\": ({ variables }) =>\n\t\t`${variables.actorName} changed the status`,\n\t\"component.conversationEvent.tagAdded\": ({ variables }) =>\n\t\t`${variables.actorName} added a tag`,\n\t\"component.conversationEvent.tagRemoved\": ({ variables }) =>\n\t\t`${variables.actorName} removed a tag`,\n\t\"component.conversationEvent.visitorBlocked\": ({ variables }) =>\n\t\t`${variables.actorName} blocked the visitor`,\n\t\"component.conversationEvent.visitorUnblocked\": ({ variables }) =>\n\t\t`${variables.actorName} unblocked the visitor`,\n\t\"component.conversationEvent.visitorIdentified\": () =>\n\t\t\"Contact details confirmed\",\n\t\"component.identificationTool.title\": \"Let us keep in touch\",\n\t\"component.identificationTool.description\":\n\t\t\"Leave your email so we can follow up on this conversation.\",\n\t\"component.identificationTool.cta\": \"Share email\",\n\t\"component.identificationTool.loading\": \"Saving...\",\n\t\"component.identificationTool.success\":\n\t\t\"Thanks! We'll reach out to you at this email if we need to.\",\n\t\"component.identificationTool.error\":\n\t\t\"We couldn't save your email. Please try again.\",\n\t\"component.identificationTool.validation\":\n\t\t\"Enter an email address to continue.\",\n\t\"component.identificationTool.inputPlaceholder\": \"you@example.com\",\n\t\"component.identificationTool.inputLabel\": \"Email address\",\n\t\"component.identificationTool.eventLog\":\n\t\t\"Visitor confirmed their email address\",\n\t\"component.conversationPage.closedMessage\":\n\t\t\"This conversation is closed, start a new one to talk with us\",\n\t\"component.multimodalInput.placeholder\": \"Type your message...\",\n\t\"component.multimodalInput.remove\": ({ variables }) =>\n\t\t`Remove ${variables.fileName}`,\n\t\"component.navigation.articles\": \"Articles\",\n\t\"component.navigation.home\": \"Home\",\n\t\"component.message.timestamp.aiIndicator\": \"• AI agent\",\n};\n\nexport default en;\n"],"mappings":";AAEA,MAAMA,KAA4B;CACjC,8BAA8B;CAC9B,8BAA8B;CAC9B,8BAA8B,EAAE,gBAC/B,UAAU,UAAU;CACrB,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;EACxD,MAAM,SAAS,MAAM,WAAW;EAChC,MAAMC,UAA+C;GACpD,SAAS;GACT,WAAW;GACX,SAAS;GACT;EACD,MAAM,cACL,WAAW,eAAe,QAAQ,SAAS,SAAS;AACrD,SAAO,GAAG,QAAQ,OAAO,SAAS,cAAc,IAAI,gBAAgB,GAAG;;CAExE,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,QAAQ;;CAE/C,sBAAsB,EAAE,WAAW,SAAS,YAAY;EACvD,MAAM,cAAc,WAAW,eAAe,QAAQ,SAAS,QAAQ;AAIvE,SAHkB,cACf,GAAG,MAAM,UAAU,YAAY,CAAC,YAChC;;CAGJ,kDAAkD;CAClD,uDAAuD,EAAE,gBACxD,GAAG,UAAU,KAAK,KAAK,UAAU;CAClC,yDAAyD,EAAE,gBAC1D,SAAS,UAAU;CACpB,4CAA4C,EAAE,gBAC7C,GAAG,UAAU,KAAK;CACnB,gDAAgD;CAChD,oDAAoD;CACpD,gDAAgD;CAChD,kDAAkD;CAClD,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,+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,UAAU,UAAU;CACrB,iCAAiC;CACjC,6BAA6B;CAC7B,2CAA2C;CAC3C;AAED,iBAAe"}
|
|
1
|
+
{"version":3,"file":"en.js","names":["en: SupportLocaleMessages","phrases: Record<typeof period.token, string>"],"sources":["../../../../src/support/text/locales/en.tsx"],"sourcesContent":["import type { SupportLocaleMessages } from \"./keys\";\n\nconst en: SupportLocaleMessages = {\n\t\"common.actions.askQuestion\": \"Ask us a question\",\n\t\"common.actions.attachFiles\": \"Attach files\",\n\t\"common.actions.removeFile\": ({ variables }) =>\n\t\t`Remove ${variables.fileName}`,\n\t\"common.brand.watermark\": \"We run on\",\n\t\"common.fallbacks.aiAssistant\": \"AI assistant\",\n\t\"common.fallbacks.cossistant\": \"Cossistant\",\n\t\"common.fallbacks.someone\": \"Someone\",\n\t\"common.fallbacks.supportTeam\": \"Support\",\n\t\"common.fallbacks.unknown\": \"Unknown\",\n\t\"common.fallbacks.you\": \"You\",\n\t\"common.labels.aiAgentIndicator\": \"AI agent\",\n\t\"common.labels.supportOnline\": \"Support online\",\n\t\"page.conversationHistory.showMore\": ({ variables, utils }) =>\n\t\t`+${utils.formatNumber(variables.count)} more`,\n\t\"page.conversationHistory.title\": \"Conversation history\",\n\t\"page.home.greeting\": ({ variables, context, utils }) => {\n\t\tconst period = utils.timeOfDay();\n\t\tconst phrases: Record<typeof period.token, string> = {\n\t\t\tmorning: \"Morning\",\n\t\t\tafternoon: \"Afternoon\",\n\t\t\tevening: \"Evening\",\n\t\t};\n\t\tconst visitorName =\n\t\t\tvariables?.visitorName || context.visitor?.contact?.name;\n\t\treturn `${phrases[period.token]}${visitorName ? ` ${visitorName}` : \"\"}, how can we help?`;\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\",\n\t\t\tother: \"conversations\",\n\t\t});\n\t\treturn `+ ${utils.formatNumber(count)} more ${noun}`;\n\t},\n\t\"page.home.tagline\": ({ variables, context, utils }) => {\n\t\tconst websiteName = variables?.websiteName || context.website?.name || \"\";\n\t\tconst formatted = websiteName\n\t\t\t? `${utils.titleCase(websiteName)} support`\n\t\t\t: \"Support\";\n\t\treturn formatted;\n\t},\n\t\"component.conversationButtonLink.fallbackTitle\": \"Untitled conversation\",\n\t\"component.conversationButtonLink.lastMessage.agent\": ({ variables }) =>\n\t\t`${variables.name} - ${variables.time}`,\n\t\"component.conversationButtonLink.lastMessage.visitor\": ({ variables }) =>\n\t\t`You - ${variables.time}`,\n\t\"component.conversationButtonLink.typing\": ({ variables }) =>\n\t\t`${variables.name} is typing...`,\n\t\"component.conversationButtonLink.status.open\": \"Open\",\n\t\"component.conversationButtonLink.status.resolved\": \"Resolved\",\n\t\"component.conversationButtonLink.status.spam\": \"Spam\",\n\t\"component.conversationButtonLink.status.closed\": \"closed\",\n\t\"component.conversationEvent.assigned\": ({ variables }) =>\n\t\t`${variables.actorName} assigned the conversation`,\n\t\"component.conversationEvent.unassigned\": ({ variables }) =>\n\t\t`${variables.actorName} unassigned the conversation`,\n\t\"component.conversationEvent.default\": ({ variables }) =>\n\t\t`${variables.actorName} performed an action`,\n\t\"component.conversationEvent.participantJoined\": ({ variables }) =>\n\t\t`${variables.actorName} joined the conversation`,\n\t\"component.conversationEvent.participantLeft\": ({ variables }) =>\n\t\t`${variables.actorName} left the conversation`,\n\t\"component.conversationEvent.participantRequested\": ({ variables }) =>\n\t\t`${variables.actorName} requested a team member to join`,\n\t\"component.conversationEvent.priorityChanged\": ({ variables }) =>\n\t\t`${variables.actorName} changed the priority`,\n\t\"component.conversationEvent.reopened\": ({ variables }) =>\n\t\t`${variables.actorName} reopened the conversation`,\n\t\"component.conversationEvent.resolved\": ({ variables }) =>\n\t\t`${variables.actorName} resolved the conversation`,\n\t\"component.conversationEvent.statusChanged\": ({ variables }) =>\n\t\t`${variables.actorName} changed the status`,\n\t\"component.conversationEvent.tagAdded\": ({ variables }) =>\n\t\t`${variables.actorName} added a tag`,\n\t\"component.conversationEvent.tagRemoved\": ({ variables }) =>\n\t\t`${variables.actorName} removed a tag`,\n\t\"component.conversationEvent.visitorBlocked\": ({ variables }) =>\n\t\t`${variables.actorName} blocked the visitor`,\n\t\"component.conversationEvent.visitorUnblocked\": ({ variables }) =>\n\t\t`${variables.actorName} unblocked the visitor`,\n\t\"component.conversationEvent.visitorIdentified\": () =>\n\t\t\"Contact details confirmed\",\n\t\"component.identificationTool.title\": \"Let us keep in touch\",\n\t\"component.identificationTool.description\":\n\t\t\"Leave your email so we can follow up on this conversation.\",\n\t\"component.identificationTool.cta\": \"Share email\",\n\t\"component.identificationTool.loading\": \"Saving...\",\n\t\"component.identificationTool.success\":\n\t\t\"Thanks! We'll reach out to you at this email if we need to.\",\n\t\"component.identificationTool.error\":\n\t\t\"We couldn't save your email. Please try again.\",\n\t\"component.identificationTool.validation\":\n\t\t\"Enter an email address to continue.\",\n\t\"component.identificationTool.inputPlaceholder\": \"you@example.com\",\n\t\"component.identificationTool.inputLabel\": \"Email address\",\n\t\"component.identificationTool.eventLog\":\n\t\t\"Visitor confirmed their email address\",\n\t\"component.conversationPage.closedMessage\":\n\t\t\"This conversation is closed, start a new one to talk with us\",\n\t\"component.conversationPage.ratingPrompt\": \"How did we do?\",\n\t\"component.conversationPage.ratingThanks\": \"Thanks for your feedback!\",\n\t\"component.conversationPage.ratingLabel\": ({ variables, utils }) => {\n\t\tconst noun = utils.pluralize(variables.rating, {\n\t\t\tone: \"star\",\n\t\t\tother: \"stars\",\n\t\t});\n\t\treturn `Rate ${variables.rating} ${noun}`;\n\t},\n\t\"component.multimodalInput.placeholder\": \"Type your message...\",\n\t\"component.multimodalInput.remove\": ({ variables }) =>\n\t\t`Remove ${variables.fileName}`,\n\t\"component.navigation.articles\": \"Articles\",\n\t\"component.navigation.home\": \"Home\",\n\t\"component.message.timestamp.aiIndicator\": \"• AI agent\",\n};\n\nexport default en;\n"],"mappings":";AAEA,MAAMA,KAA4B;CACjC,8BAA8B;CAC9B,8BAA8B;CAC9B,8BAA8B,EAAE,gBAC/B,UAAU,UAAU;CACrB,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,a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AU;CACxB,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,2CAA2C;CAC3C,2CAA2C;CAC3C,2CAA2C,EAAE,WAAW,YAAY;EACnE,MAAM,OAAO,MAAM,UAAU,UAAU,QAAQ;GAC9C,KAAK;GACL,OAAO;GACP,CAAC;AACF,SAAO,QAAQ,UAAU,OAAO,GAAG;;CAEpC,yCAAyC;CACzC,qCAAqC,EAAE,gBACtC,UAAU,UAAU;CACrB,iCAAiC;CACjC,6BAA6B;CAC7B,2CAA2C;CAC3C;AAED,iBAAe"}
|
|
@@ -69,6 +69,15 @@ const es = {
|
|
|
69
69
|
"component.identificationTool.inputLabel": "Correo electrónico",
|
|
70
70
|
"component.identificationTool.eventLog": "El visitante confirmó su correo electrónico",
|
|
71
71
|
"component.conversationPage.closedMessage": "Esta conversación está cerrada, inicia una nueva para hablar con nosotros",
|
|
72
|
+
"component.conversationPage.ratingPrompt": "¿Cómo lo hicimos?",
|
|
73
|
+
"component.conversationPage.ratingThanks": "¡Gracias por tu comentario!",
|
|
74
|
+
"component.conversationPage.ratingLabel": ({ variables, utils }) => {
|
|
75
|
+
const noun = utils.pluralize(variables.rating, {
|
|
76
|
+
one: "estrella",
|
|
77
|
+
other: "estrellas"
|
|
78
|
+
});
|
|
79
|
+
return `Calificar con ${variables.rating} ${noun}`;
|
|
80
|
+
},
|
|
72
81
|
"component.multimodalInput.placeholder": "Escribe tu mensaje...",
|
|
73
82
|
"component.multimodalInput.remove": ({ variables }) => `Eliminar ${variables.fileName}`,
|
|
74
83
|
"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.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ó que un miembro del equipo se uniera`,\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;CAC9B,8BAA8B,EAAE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,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"}
|
|
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ó que un miembro del equipo se uniera`,\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.conversationPage.ratingPrompt\": \"¿Cómo lo hicimos?\",\n\t\"component.conversationPage.ratingThanks\": \"¡Gracias por tu comentario!\",\n\t\"component.conversationPage.ratingLabel\": ({ variables, utils }) => {\n\t\tconst noun = utils.pluralize(variables.rating, {\n\t\t\tone: \"estrella\",\n\t\t\tother: \"estrellas\",\n\t\t});\n\t\treturn `Calificar con ${variables.rating} ${noun}`;\n\t},\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,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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AAG,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,2CAA2C;CAC3C,2CAA2C;CAC3C,2CAA2C,EAAE,WAAW,YAAY;EACnE,MAAM,OAAO,MAAM,UAAU,UAAU,QAAQ;GAC9C,KAAK;GACL,OAAO;GACP,CAAC;AACF,SAAO,iBAAiB,UAAU,OAAO,GAAG;;CAE7C,yCAAyC;CACzC,qCAAqC,EAAE,gBACtC,YAAY,UAAU;CACvB,iCAAiC;CACjC,6BAA6B;CAC7B,2CAA2C;CAC3C;AAED,iBAAe"}
|
|
@@ -69,6 +69,15 @@ const fr = {
|
|
|
69
69
|
"component.identificationTool.inputLabel": "Adresse e-mail",
|
|
70
70
|
"component.identificationTool.eventLog": "Le visiteur a confirmé son adresse e-mail",
|
|
71
71
|
"component.conversationPage.closedMessage": "Cette conversation est close, commencez-en une nouvelle pour discuter avec nous",
|
|
72
|
+
"component.conversationPage.ratingPrompt": "Comment avons-nous fait ?",
|
|
73
|
+
"component.conversationPage.ratingThanks": "Merci pour votre retour !",
|
|
74
|
+
"component.conversationPage.ratingLabel": ({ variables, utils }) => {
|
|
75
|
+
const noun = utils.pluralize(variables.rating, {
|
|
76
|
+
one: "étoile",
|
|
77
|
+
other: "étoiles"
|
|
78
|
+
});
|
|
79
|
+
return `Noter ${variables.rating} ${noun}`;
|
|
80
|
+
},
|
|
72
81
|
"component.multimodalInput.placeholder": "Écrivez votre message...",
|
|
73
82
|
"component.multimodalInput.remove": ({ variables }) => `Supprimer ${variables.fileName}`,
|
|
74
83
|
"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.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é à un membre de l'équipe de 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,sCA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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,+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,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é à un membre de l'équipe de 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.conversationPage.ratingPrompt\": \"Comment avons-nous fait ?\",\n\t\"component.conversationPage.ratingThanks\": \"Merci pour votre retour !\",\n\t\"component.conversationPage.ratingLabel\": ({ variables, utils }) => {\n\t\tconst noun = utils.pluralize(variables.rating, {\n\t\t\tone: \"étoile\",\n\t\t\tother: \"étoiles\",\n\t\t});\n\t\treturn `Noter ${variables.rating} ${noun}`;\n\t},\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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AiD;CACjD,2CAA2C;CAC3C,yCACC;CACD,4CACC;CACD,2CAA2C;CAC3C,2CAA2C;CAC3C,2CAA2C,EAAE,WAAW,YAAY;EACnE,MAAM,OAAO,MAAM,UAAU,UAAU,QAAQ;GAC9C,KAAK;GACL,OAAO;GACP,CAAC;AACF,SAAO,SAAS,UAAU,OAAO,GAAG;;CAErC,yCAAyC;CACzC,qCAAqC,EAAE,gBACtC,aAAa,UAAU;CACxB,iCAAiC;CACjC,6BAA6B;CAC7B,2CAA2C;CAC3C;AAED,iBAAe"}
|
|
@@ -225,6 +225,17 @@ declare const supportTextDefinitions: {
|
|
|
225
225
|
readonly "component.conversationPage.closedMessage": {
|
|
226
226
|
readonly variables: undefined;
|
|
227
227
|
};
|
|
228
|
+
readonly "component.conversationPage.ratingPrompt": {
|
|
229
|
+
readonly variables: undefined;
|
|
230
|
+
};
|
|
231
|
+
readonly "component.conversationPage.ratingThanks": {
|
|
232
|
+
readonly variables: undefined;
|
|
233
|
+
};
|
|
234
|
+
readonly "component.conversationPage.ratingLabel": {
|
|
235
|
+
readonly variables: {
|
|
236
|
+
readonly rating: number;
|
|
237
|
+
};
|
|
238
|
+
};
|
|
228
239
|
readonly "component.multimodalInput.placeholder": {
|
|
229
240
|
readonly variables: undefined;
|
|
230
241
|
};
|
|
@@ -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;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,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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"}
|
|
@@ -60,6 +60,9 @@ const supportTextDefinitions = {
|
|
|
60
60
|
"component.identificationTool.inputLabel": { variables: void 0 },
|
|
61
61
|
"component.identificationTool.eventLog": { variables: void 0 },
|
|
62
62
|
"component.conversationPage.closedMessage": { variables: void 0 },
|
|
63
|
+
"component.conversationPage.ratingPrompt": { variables: void 0 },
|
|
64
|
+
"component.conversationPage.ratingThanks": { variables: void 0 },
|
|
65
|
+
"component.conversationPage.ratingLabel": { variables: { rating: 0 } },
|
|
63
66
|
"component.multimodalInput.placeholder": { variables: void 0 },
|
|
64
67
|
"component.multimodalInput.remove": { variables: { fileName: "" } },
|
|
65
68
|
"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.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,WAA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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,8CAA8C,EAC7C,WAAW,EAAE,WAAW,IAAc,EACtC;CACD,gDAAgD,EAC/C,WAAW,EAAE,WAAW,IAAc,EACtC;CACD,iDAAiD,EAChD,WAAW,EAAE,WAAW,IAAc,EACtC;CACD,sCAAsC,EAAE,WAAW,QAAW;CAC9D,4CAA4C,EAAE,WAAW,QAAW;CACpE,oCAAoC,EAAE,WAAW,QAAW;CAC5D,wCAAwC,EAAE,WAAW,QAAW;CAChE,wCAAwC,EAAE,WAAW,QAAW;CAChE,sCAAsC,EAAE,WAAW,QAAW;CAC9D,2CAA2C,EAAE,WAAW,QAAW;CACnE,iDAAiD,EAAE,WAAW,QAAW;CACzE,2CAA2C,EAAE,WAAW,QAAW;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"}
|
|
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.conversationPage.ratingPrompt\": {\n\t\tvariables: undefined,\n\t},\n\t\"component.conversationPage.ratingThanks\": {\n\t\tvariables: undefined,\n\t},\n\t\"component.conversationPage.ratingLabel\": {\n\t\tvariables: { rating: 0 as number },\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,gCAAg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