athena-xai-chat 1.0.74 → 1.0.76

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.
@@ -3010,7 +3010,7 @@ ae.styles = dA`
3010
3010
  .athena-xai-select-chat__loader-heading {
3011
3011
  font-weight: 300;
3012
3012
  font-size: clamp(20px, 4vw, 44px);
3013
- line-height: 48px;
3013
+ line-height: clamp(1.05, 1.2, 1.3);
3014
3014
  letter-spacing: 0;
3015
3015
  text-align: center;
3016
3016
  text-transform: uppercase;
@@ -6832,7 +6832,10 @@ let NA = class extends k {
6832
6832
  if (t) return p`<athena-xai-select-chat-error></athena-xai-select-chat-error>`;
6833
6833
  const n = e.some((v) => v?.results?.length);
6834
6834
  return p`
6835
- <section class="athena-xai-select-chat__chat-outer-container">
6835
+ <section
6836
+ class="athena-xai-select-chat__chat-outer-container"
6837
+ ${n ? 'style="min-height: 850px;"' : 'style="min-height: 650px;"'}
6838
+ >
6836
6839
  <h1 class="athena-xai-select-chat__initial-heading">
6837
6840
  ${J.selectChatTranslations[this._lang].title}
6838
6841
  </h1>
@@ -6846,10 +6849,12 @@ let NA = class extends k {
6846
6849
  </div>
6847
6850
 
6848
6851
  <section
6849
- class=${n ? "athena-xai-select-chat__chat-inner-container" : "athena-xai-select-chat__chat-inner-container athena-xai-select-chat__max-width"}
6852
+ class=${n ? "athena-xai-select-chat__chat-inner-container-results" : "athena-xai-select-chat__chat-inner-container athena-xai-select-chat__max-width"}
6850
6853
  >
6851
6854
  ${e.map((v, r) => p`
6852
- <div class="athena-xai-select-chat__message-wrapper">
6855
+ <div
6856
+ class=${n ? "athena-xai-select-chat__message-wrapper-results" : "athena-xai-select-chat__message-wrapper"}
6857
+ >
6853
6858
  ${v?.text !== "" ? p`
6854
6859
  <div class="athena-xai-select-chat__bubble-container">
6855
6860
  <div class="athena-xai-select-chat__bubble-image-container">
@@ -6919,7 +6924,6 @@ NA.styles = [dA`
6919
6924
  align-items: flex-end;
6920
6925
  flex: 1;
6921
6926
  background: #FFFFFF;
6922
- min-height: 850px;
6923
6927
  position: relative;
6924
6928
  overflow: auto;
6925
6929
  scrollbar-width: none;
@@ -6941,6 +6945,16 @@ NA.styles = [dA`
6941
6945
  padding: 20px 0;
6942
6946
  margin: 0 auto;
6943
6947
  }
6948
+
6949
+ .athena-xai-select-chat__chat-inner-container-results {
6950
+ display: flex;
6951
+ flex-direction: column;
6952
+ gap: 8px;
6953
+
6954
+ width: 100%;
6955
+ padding: 20px 0;
6956
+ margin: 0 auto;
6957
+ }
6944
6958
 
6945
6959
  .athena-xai-select-chat__max-width {
6946
6960
  max-width: 500px;
@@ -7080,6 +7094,13 @@ NA.styles = [dA`
7080
7094
  justify-content: flex-end;
7081
7095
  }
7082
7096
 
7097
+ .athena-xai-select-chat__message-wrapper-results {
7098
+ display: flex;
7099
+ flex-direction: column;
7100
+ gap: 8px;
7101
+ justify-content: flex-end;
7102
+ }
7103
+
7083
7104
  .athena-xai-select-chat__message-wrapper:last-of-type {
7084
7105
  padding-bottom: 160px !important;
7085
7106
  }
@@ -7134,7 +7155,7 @@ NA.styles = [dA`
7134
7155
 
7135
7156
  @media(max-width: 768px) {
7136
7157
  .athena-xai-select-chat__chat-outer-container {
7137
- min-height: auto;
7158
+ min-height: auto !important;
7138
7159
  }
7139
7160
 
7140
7161
  .athena-xai-select-chat__initial-image {
@@ -943,7 +943,7 @@ Ces cadeaux viennent du cœur:`}}}},$t=A=>`${I.api.baseUrl}${I.api.endpoints[A]}
943
943
  .athena-xai-select-chat__loader-heading {
944
944
  font-weight: 300;
945
945
  font-size: clamp(20px, 4vw, 44px);
946
- line-height: 48px;
946
+ line-height: clamp(1.05, 1.2, 1.3);
947
947
  letter-spacing: 0;
948
948
  text-align: center;
949
949
  text-transform: uppercase;
@@ -1713,7 +1713,10 @@ Ces cadeaux viennent du cœur:`}}}},$t=A=>`${I.api.baseUrl}${I.api.endpoints[A]}
1713
1713
  }
1714
1714
  }
1715
1715
  `],lA([Y()],zA.prototype,"_selectedResult",2),lA([Y()],zA.prototype,"_isMobile",2),lA([Y()],zA.prototype,"_isSwiperInitialized",2),lA([OA({type:Array})],zA.prototype,"results",2),lA([Y()],zA.prototype,"_activeTextMessage",2),lA([Y()],zA.prototype,"_seenResults",2),lA([Y()],zA.prototype,"_isRelaxed",2),lA([Y()],zA.prototype,"_loveLanguage",2),lA([Y()],zA.prototype,"_lang",2),zA=lA([eA("athena-xai-select-chat-results")],zA);var Dv=Object.defineProperty,Mv=Object.getOwnPropertyDescriptor,Pe=(A,e,t,n)=>{for(var f=n>1?void 0:n?Mv(e,t):e,r=A.length-1,v;r>=0;r--)(v=A[r])&&(f=(n?v(e,t,f):v(f))||f);return n&&f&&Dv(e,t,f),f};let WA=class extends h{constructor(){super(...arguments),this._isVisible=!0,this._shouldShowFirstPage=!0,this._lang="en",this.websiteToken=""}_scrollDownObserver(){const A=this.renderRoot.querySelector(".athena-xai-select-chat__chat-outer-container");if(!A||A._observerAttached)return;A._observerAttached=!0,new MutationObserver(()=>{A.scrollTo({top:A.scrollHeight,behavior:"smooth"})}).observe(A,{childList:!0,subtree:!0})}_resetChat(){this.addEventListener("select-chat-reset",async()=>{this._isVisible=!0,await this.selectChatController?.reset(),window.innerWidth<=768&&this._isVisible&&window.scrollTo({top:60,behavior:"smooth"})})}_makeNewRecommendation(){this.addEventListener("make-new-recommendation",async A=>{await this.selectChatController?.fetchRecommendedProducts(A?.detail?.seen_results)})}async connectedCallback(){super.connectedCallback(),this._lang=document.documentElement.lang||"en",window.innerWidth<=768&&this._isVisible&&window.scrollTo({top:60,behavior:"smooth"}),await tr(),this.selectChatController=new Lr(this,this.websiteToken),this.addEventListener("initialize-select-chat",async()=>{this._shouldShowFirstPage=!1,await this.selectChatController?.startConversation()}),this._resetChat(),this._makeNewRecommendation()}updated(){this._scrollDownObserver()}render(){if(this._shouldShowFirstPage)return Z`<athena-xai-select-chat-initial></athena-xai-select-chat-initial>`;if(!this.selectChatController)return;const{messages:A,isLoading:e,isResetLoading:t,isError:n}=this.selectChatController;if(e)return Z`<athena-xai-select-chat-loader></athena-xai-select-chat-loader>`;if(n)return Z`<athena-xai-select-chat-error></athena-xai-select-chat-error>`;const f=A.some(r=>r?.results?.length);return Z`
1716
- <section class="athena-xai-select-chat__chat-outer-container">
1716
+ <section
1717
+ class="athena-xai-select-chat__chat-outer-container"
1718
+ ${f?'style="min-height: 850px;"':'style="min-height: 650px;"'}
1719
+ >
1717
1720
  <h1 class="athena-xai-select-chat__initial-heading">
1718
1721
  ${I.selectChatTranslations[this._lang].title}
1719
1722
  </h1>
@@ -1727,10 +1730,12 @@ Ces cadeaux viennent du cœur:`}}}},$t=A=>`${I.api.baseUrl}${I.api.endpoints[A]}
1727
1730
  </div>
1728
1731
 
1729
1732
  <section
1730
- class=${f?"athena-xai-select-chat__chat-inner-container":"athena-xai-select-chat__chat-inner-container athena-xai-select-chat__max-width"}
1733
+ class=${f?"athena-xai-select-chat__chat-inner-container-results":"athena-xai-select-chat__chat-inner-container athena-xai-select-chat__max-width"}
1731
1734
  >
1732
1735
  ${A.map((r,v)=>Z`
1733
- <div class="athena-xai-select-chat__message-wrapper">
1736
+ <div
1737
+ class=${f?"athena-xai-select-chat__message-wrapper-results":"athena-xai-select-chat__message-wrapper"}
1738
+ >
1734
1739
  ${r?.text!==""?Z`
1735
1740
  <div class="athena-xai-select-chat__bubble-container">
1736
1741
  <div class="athena-xai-select-chat__bubble-image-container">
@@ -1795,7 +1800,6 @@ Ces cadeaux viennent du cœur:`}}}},$t=A=>`${I.api.baseUrl}${I.api.endpoints[A]}
1795
1800
  align-items: flex-end;
1796
1801
  flex: 1;
1797
1802
  background: #FFFFFF;
1798
- min-height: 850px;
1799
1803
  position: relative;
1800
1804
  overflow: auto;
1801
1805
  scrollbar-width: none;
@@ -1817,6 +1821,16 @@ Ces cadeaux viennent du cœur:`}}}},$t=A=>`${I.api.baseUrl}${I.api.endpoints[A]}
1817
1821
  padding: 20px 0;
1818
1822
  margin: 0 auto;
1819
1823
  }
1824
+
1825
+ .athena-xai-select-chat__chat-inner-container-results {
1826
+ display: flex;
1827
+ flex-direction: column;
1828
+ gap: 8px;
1829
+
1830
+ width: 100%;
1831
+ padding: 20px 0;
1832
+ margin: 0 auto;
1833
+ }
1820
1834
 
1821
1835
  .athena-xai-select-chat__max-width {
1822
1836
  max-width: 500px;
@@ -1956,6 +1970,13 @@ Ces cadeaux viennent du cœur:`}}}},$t=A=>`${I.api.baseUrl}${I.api.endpoints[A]}
1956
1970
  justify-content: flex-end;
1957
1971
  }
1958
1972
 
1973
+ .athena-xai-select-chat__message-wrapper-results {
1974
+ display: flex;
1975
+ flex-direction: column;
1976
+ gap: 8px;
1977
+ justify-content: flex-end;
1978
+ }
1979
+
1959
1980
  .athena-xai-select-chat__message-wrapper:last-of-type {
1960
1981
  padding-bottom: 160px !important;
1961
1982
  }
@@ -2010,7 +2031,7 @@ Ces cadeaux viennent du cœur:`}}}},$t=A=>`${I.api.baseUrl}${I.api.endpoints[A]}
2010
2031
 
2011
2032
  @media(max-width: 768px) {
2012
2033
  .athena-xai-select-chat__chat-outer-container {
2013
- min-height: auto;
2034
+ min-height: auto !important;
2014
2035
  }
2015
2036
 
2016
2037
  .athena-xai-select-chat__initial-image {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "files": [
5
5
  "dist"
6
6
  ],
7
- "version": "1.0.74",
7
+ "version": "1.0.76",
8
8
  "type": "module",
9
9
  "scripts": {
10
10
  "dev": "vite",