@chatsystem/client 1.1.76 → 1.1.78
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/dist/index.cjs +4 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +5 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -92,7 +92,7 @@ For more details see https://formatjs.io/docs/getting-started/message-distributi
|
|
|
92
92
|
dark:bg-white
|
|
93
93
|
transition-colors
|
|
94
94
|
chatsystem-paperplane-button
|
|
95
|
-
${n??""}`,"data-testid":"send-button",onClick:e,disabled:t,type:"button","aria-label":"Send message",children:C.jsx("span",{className:"","data-state":"closed",children:C.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",className:"text-white dark:text-black",children:[C.jsx("path",{d:"M3 20L21 12L3 4L7.5 12L3 20Z",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"}),C.jsx("path",{d:"M7.5 12H14.75",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]})})})});var rt=(e=>(e.FRENCH="fr-FR",e.ENGLISH="en-US",e))(rt||{});const hx={"generic.language.english":"English","generic.language.french":"French","chatbot.placeholder.content":"Message
|
|
95
|
+
${n??""}`,"data-testid":"send-button",onClick:e,disabled:t,type:"button","aria-label":"Send message",children:C.jsx("span",{className:"","data-state":"closed",children:C.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",className:"text-white dark:text-black",children:[C.jsx("path",{d:"M3 20L21 12L3 4L7.5 12L3 20Z",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"}),C.jsx("path",{d:"M7.5 12H14.75",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]})})})});var rt=(e=>(e.FRENCH="fr-FR",e.ENGLISH="en-US",e))(rt||{});const hx={"generic.language.english":"English","generic.language.french":"French","chatbot.placeholder.content":"Message...","chatbot.DiscussionLimitReached.title":"Discussion limit reached","chatbot.DiscussionLimitReached.explaination":"The discussion has reached its maximum number of messages. Please start a new one.","chatbot.DiscussionLimitReached.cta":"Restart","chatbot.error.api.409":"Oups ! The discussion if full. Please start a new one.","chatbot.error.api.429":"⏳ The chatbot is a little busy at the time. Please try again later.","chatbot.error.api.500":"Oops ! There has been an error. Please try again later.","chatbot.chatline.label.user":"You","chatbot.chatline.label.assistant":"Assistant","chatbot.chatline.loading.function.genericSearchMessage":"Thinking ...","chatbot.chatline.loading.function.search":"Search","chatbot.chatline.loading.function.extractProductName":"Looking into the cavern","chatbot.chatline.loading.function.suggestProductName":"Consulting the shadocks","chatbot.chatline.loading.function.criteriaDefinition":"Looking for ziboublis","chatbot.chatline.loading.function.searchStock":"Searching Stock","chatbot.chatline.loading.function.step":"Step","chatbot.chatline.loading.stepName.search":"Searching ...","chatbot.chatline.loading.stepName.building":"Building Query ...","chatbot.chatline.loading.stepName.analyzing":"Analyzing ...","chatbot.chatline.loading.stepName.redacting":"Writing answer","chatbot.chatline.loading.cancel":"Cancel","chatbot.chatline.seeRecentMessages":"see recent messages","chatbot.widget.menu.open":"Open chat menu","chatbot.widget.menu.startNewDiscussion":"Start a new discussion","chatbot.widget.close":"Close chat","recordingOverlay.recording":"Recording...","recordingOverlay.cancel":"Cancel","recordingOverlay.explaination":"Tap the mic to stop","chatbot.infobanner.title":"You have an archived discussion.","chatbot.infobanner.cta":"See"},mx={"generic.language.english":"Anglais","generic.language.french":"Français","chatbot.placeholder.content":"Message...","chatbot.DiscussionLimitReached.title":"Maximum de messages envoyés atteint.","chatbot.DiscussionLimitReached.explaination":"Le robot est à son maximum et ne peut plus envoyer de message. Merci de relancer une conversation.","chatbot.DiscussionLimitReached.cta":"Relancer une nouvelle conversation","chatbot.error.api.409":"Oups ! La discussion est à son maximum. Merci d'en commencer une nouvelle.","chatbot.error.api.429":"⏳ Le robot est un peu occupé actuellement. Merci de réessayer plus tard.","chatbot.error.api.500":"Oups ! Une erreur est survenue. Merci de réessayer plus tard !","chatbot.chatline.label.user":"Vous","chatbot.chatline.label.assistant":"Assistant","chatbot.chatline.loading.function.search":"Recherche","chatbot.chatline.loading.function.genericSearchMessage":"Je réfléchis ...","chatbot.chatline.loading.function.extractProductName":"Recherche dans la caverne","chatbot.chatline.loading.function.suggestProductName":"Consultation des shadocks","chatbot.chatline.loading.function.criteriaDefinition":"Recherche des ziboublis","chatbot.chatline.loading.function.searchStock":"Recherche en stock","chatbot.chatline.loading.function.step":"Etape","chatbot.chatline.loading.stepName.search":"Recherche ...","chatbot.chatline.loading.stepName.building":"Construction ...","chatbot.chatline.loading.stepName.analyzing":"Analyse ...","chatbot.chatline.loading.stepName.redacting":"Rédaction","chatbot.chatline.loading.cancel":"Annuler","chatbot.chatline.seeRecentMessages":"voir les messages plus récents","chatbot.widget.menu.open":"Ouvrir le menu de discussion","chatbot.widget.menu.startNewDiscussion":"Démarrer une nouvelle discussion","chatbot.widget.close":"Fermer la discussion","recordingOverlay.recording":"Micro activé...","recordingOverlay.cancel":"Annuler","recordingOverlay.explaination":"Appuyez sur le micro pour arrêter","chatbot.infobanner.title":"Vous avez une conversation archivée.","chatbot.infobanner.cta":"Voir"},$r={[rt.ENGLISH]:{translatedText:hx,pictureName:rt.ENGLISH,langID:0,locale:rt.ENGLISH},[rt.FRENCH]:{translatedText:mx,pictureName:rt.FRENCH,langID:1,locale:rt.FRENCH}},px=Object.keys($r);px.reduce((e,t)=>{const n=$r[t];return[...e,n]},[]);const gx="languageSettings",Ec=v.createContext({appCurrentLang:$r[rt.ENGLISH],setAppCurrentLang:()=>{}}),bx=e=>/(\[.*|\!\[.*)$/.test(e),Ex=e=>/\)/.test(e),Tx=e=>e.filter(t=>t.userType==="user").length;var ta=(e=>(e.GET_DISCUSSION_ID="/id",e.RESET_DISCUSSION="/delete",e))(ta||{});const xx=e=>!!e.startsWith("/"),yx=(e,t,n,r)=>e===ta.GET_DISCUSSION_ID?t?`Votre ID de discussion est ${t}`:"Votre ID de discussion n'est pas encore défini. Envoyez un premier message pour que ce soit le cas.":e===ta.RESET_DISCUSSION?(n(r),null):`La commande ${e} n'est pas prise en compte.`;class St{static pending="";constructor(){}static transformNDJSONChunkIntoObjects(t){const n=bt();this.pending+=t;const r=this.pending.split(/\r?\n/);this.pending=r.pop()??"";const i=[];for(const a of r){const s=a.trim();if(s)try{i.push(JSON.parse(s))}catch{n.warn("[NDJSON] Could not parse line:",s)}}return i}static flushPending(){const t=this.pending.trim();if(this.pending="",!t)return[];try{return[JSON.parse(t)]}catch{return[]}}static isObjectOutputstreamMessageDeltaDTO=t=>t.type===Oe.OutputStreamTypesEnum.OUTPUT_STREAM_MESSAGE_DELTA;static isObjectOutputstreamMessageStartDTO=t=>t.type===Oe.OutputStreamTypesEnum.OUTPUT_STREAM_MESSAGE_START;static isObjectOutputstreamMessageEndDTO=t=>t.type===Oe.OutputStreamTypesEnum.OUTPUT_STREAM_MESSAGE_END;static isObjectOutputstreamErrorDTO=t=>t.type===Oe.OutputStreamTypesEnum.OUTPUT_STREAM_ERROR;static isObjectOutputstreamLoadingNumberOfStepsDTO=t=>t.type===Oe.OutputStreamTypesEnum.OUTPUT_STREAM_NUMBER_OF_STEPS_TYPE;static isObjectOutputstreamLoadingCurrentStepNumberDTO=t=>t.type===Oe.OutputStreamTypesEnum.OUTPUT_STREAM_CURRENT_STEP_NUMBER_TYPE;static isObjectOutputstreamLoadingCurrentStepNameDTO=t=>t.type===Oe.OutputStreamTypesEnum.OUTPUT_STREAM_CURRENT_STEP_NAME_TYPE;static containsObjectWithLastAnswerToTrue=t=>{for(const n of t)if(this.isObjectOutputstreamMessageEndDTO(n)&&n.isLastAnswer)return!0;return!1}}const Tc=()=>{const e=Qt(),t=e.formatMessage({defaultMessage:"Search",id:"chatbot.chatline.loading.function.search"}),n=e.formatMessage({defaultMessage:"Looking into the cavern",id:"chatbot.chatline.loading.function.extractProductName"}),r=e.formatMessage({defaultMessage:"Consulting the shadocks",id:"chatbot.chatline.loading.function.suggestProductName"}),i=e.formatMessage({defaultMessage:"Looking for ziboublis",id:"chatbot.chatline.loading.function.criteriaDefinition"}),a=e.formatMessage({defaultMessage:"Searching Stock",id:"chatbot.chatline.loading.function.searchStock"}),s=e.formatMessage({defaultMessage:"Step",id:"chatbot.chatline.loading.function.step"}),o=e.formatMessage({defaultMessage:"I'm looking for products",id:"chatbot.chatline.loading.function.genericSearchMessage"}),u=e.formatMessage({defaultMessage:"Searching ...",id:"chatbot.chatline.loading.stepName.search"}),c=e.formatMessage({defaultMessage:"Building Query ...",id:"chatbot.chatline.loading.stepName.building"}),d=e.formatMessage({defaultMessage:"Analyzing ...",id:"chatbot.chatline.loading.stepName.analyzing"}),f=e.formatMessage({defaultMessage:"Writing answer",id:"chatbot.chatline.loading.stepName.redacting"}),m=e.formatMessage({defaultMessage:"Cancel",id:"chatbot.chatline.loading.cancel"}),h=e.formatMessage({defaultMessage:"see recent messages",id:"chatbot.chatline.seeRecentMessages"}),b=w=>w?w.includes("ExtractProductNames")?n:w.includes("SuggestProductNames")?r:w==="Recherche ..."?u:w==="Construction ..."?c:w==="Analyse ..."?d:w==="Rédaction"?f:w.includes("CreateCriteriasFromProductNames")||w.includes("CreateCriteriasOrProductNamesFromDiscussion")?i:w.includes("SearchStock")?a:"":t,A=b();return{searchTranslation:t,extractProductNameTranslation:n,criteriaDefinitionTranslation:i,searchStockTranslation:a,stepTranslation:s,getCurrentStepTranslated:b,defaultStartingStep:A,lookingForProductTranslation:o,cancelTranslation:m,recentMessagesTranslation:h}},Ax=({})=>{const{companySettings:e}=v.useContext(kt);return C.jsx("div",{className:`search
|
|
96
96
|
transition
|
|
97
97
|
ease-in-out
|
|
98
98
|
delay-50
|
|
@@ -2154,6 +2154,9 @@ textarea {
|
|
|
2154
2154
|
}
|
|
2155
2155
|
textarea::placeholder {
|
|
2156
2156
|
font-size: 14px;
|
|
2157
|
+
white-space: nowrap;
|
|
2158
|
+
overflow: hidden;
|
|
2159
|
+
text-overflow: ellipsis;
|
|
2157
2160
|
}
|
|
2158
2161
|
|
|
2159
2162
|
.assetContainer svg {
|