@meetelise/chat 1.20.200 → 1.20.201

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meetelise/chat",
3
- "version": "1.20.200",
3
+ "version": "1.20.201",
4
4
  "description": "",
5
5
  "main": "public/dist/index.js",
6
6
  "type": "module",
@@ -117,68 +117,9 @@
117
117
  <!-- Webpack dev server will serve the bundle, index.js, at the path '/' -->
118
118
  <script type="module" async>
119
119
  import MEChat from "/index.js";
120
- MEChat.healthcareStart({
121
- id: "6a9e65e5-9699-4c96-af75-1741d0df79aa",
122
- // MEChat.start({
123
- // 123 Main Street
124
- // organization: "test-company",
125
- // building: "e2e-test-yardi-building",
126
-
127
- // organization: "edward-rose",
128
- // building: "rivers-edge-apartments",
129
- // // mobileStyles: {
130
- // // bottom: "100px",
131
- // // },
132
-
133
- // // organization: "mill-creek",
134
- // // building: "5ec32c42-2548-11ec-b813-e361780537f5",
135
-
136
- // // organization: "d1a1060d-3844-48d4-a454-1ba26292bc69",
137
- // // building: "25feb690-c76f-11ed-83b9-a7aa9698a486",
138
-
139
- // // organization: "TT",
140
- // // building: "ffc97070-5c73-11ed-8507-77860136d3bf",
141
-
142
- // // AMLI
143
- // organization: "amli",
144
- // building: "6e43581c-c4a4-11ec-a62b-9311f60f23f8",
145
-
146
- // organization: "d1a1060d-3844-48d4-a454-1ba26292bc69",
147
- // building: "25fead9e-c76f-11ed-83b2-7b1e7b442e9f",
148
-
149
- // // Taylor Street Apartments
150
- // organization: "test-company",
151
- // building: "e2e-test-yardi-building",
152
- // position: {
153
- // bottom: 100,
154
- // left: 0,
155
- // },
156
-
157
- // // The Qual People
158
- // // organization: "Pacific Urban Residential",
159
- // // building: "1ac49f90-6150-11ed-b327-1b3f05e7b9db",
160
-
161
- // // organization: "Pacific Urban Residential",
162
- // // building: "1ac49f90-6150-11ed-b327-1b3f05e7b9db",
163
-
164
- // // Cambridge House
165
- // organization: "elise-ai",
166
- // building: "the-cambridge-house-3",
167
-
168
- // // Artistry on 10th
169
- // // organization: "lindy",
170
- // // building: "c4cfc3ec-c4da-11ec-bda4-43aed00ca1b2",
171
-
172
- // // brandColor: "#a44ef5",
173
-
174
- // // organization: "Pacific Urban Residential",
175
- // // building: "1ac49f90-6150-11ed-b327-1b3f05e7b9db",
176
-
177
- // // organization: "sparrow",
178
- // // building: "8e87ae6e-eae8-11ed-aae8-fb82f4692a79",
179
- // });
180
- // MEChat.healthcareStart({
181
- // id: "6a9e65e5-9699-4c96-af75-1741d0df79aa",
120
+ MEChat.start({
121
+ organization: "ab6383d4-6281-45b4-ac47-3476edb26e6f",
122
+ building: "618c0172-9906-11ee-b546-e3efad391a18",
182
123
  });
183
124
  </script>
184
125
  <main>
@@ -187,6 +128,7 @@
187
128
  This is an example page for serving the chat widget locally. Source of
188
129
  truth
189
130
  </p>
131
+
190
132
  <button id="reset" type="button">Restart conversation</button>
191
133
  <button id="navigate" type="button">navigate</button>
192
134
  <button id="unnavigate" type="button">unnavigate</button>
@@ -3485,7 +3485,7 @@ otherwise there's some empty space at the bottom of the button, which interferes
3485
3485
  target="_blank"
3486
3486
  rel="noopener noreferrer"
3487
3487
  >${e}
3488
- </a>`}return U`${t} `}))}<br />`:U``}))}`,this.imagesToDisplay=r,Promise.all(i).then((e=>{this.websitePreviewInfo=e}))}removeTrailingPunctuation(e){return[".",",","!","?",":",";"].includes(e[e.length-1])?this.removeTrailingPunctuation(e.slice(0,-1)):e}mapAndMarkHyperLinks(e){const t=Array.from(e.matchAll(/<https?:\/\/[^|]+\|[^>]+>|<a href="https?:\/\/[^"]+">[^<]+<\/a>/g)),n=[],i=t.map((t=>{const n=t[0];if(void 0===t.index)return;const i=e[t.index-1],r=e[t.index+n.length];if(n.startsWith("<https")||n.startsWith("<http"))return{matchedLink:n,link:n.split("|")[0].replace("<",""),hyperlink:n.split("|")[1].replace(">",""),addSpaceBefore:!(!i||" "===i),addSpaceAfter:!(!r||" "===r)};{const e=n.match(/href="([^"]+)"/),t=n.match(/>[^<]+</);return{matchedLink:n,link:e?e[1]:"",hyperlink:t?t[0].slice(1,-1):"",addSpaceBefore:!(!i||" "===i),addSpaceAfter:!(!r||" "===r)}}}));return i.forEach((t=>{if(t&&t.link&&t.hyperlink){const i=Or().replace(/-/g,"");n.push({link:this.removeTrailingPunctuation(t.link),hyperlink:this.removeTrailingPunctuation(t.hyperlink),mark:t.matchedLink,id:i}),e=e.replace(t.matchedLink,`${t.addSpaceBefore?" ":""}${i}${t.addSpaceAfter?" ":""}`)}})),{hyperlinks:n,markedText:e}}async getLinkData(e){var n,i,r,o;try{const a=(await t().get(e)).data,s=(new DOMParser).parseFromString(a,"text/html");return s?{title:null!==(i=null===(n=s.querySelector("title"))||void 0===n?void 0:n.textContent)&&void 0!==i?i:null,description:(null===(r=s.querySelector('meta[name="description"]'))||void 0===r?void 0:r.getAttribute("content"))||null,image:(null===(o=s.querySelector('meta[property="og:image"]'))||void 0===o?void 0:o.getAttribute("content"))||null,favicon:null,link:e}:{title:null,description:null,image:null,favicon:null,link:e}}catch(t){return console.error("Error fetching website details:",t),{title:null,description:null,image:null,favicon:null,link:e}}}updated(){this.onMount()}render(){return this.message?U`<div class="message-inner-body">
3488
+ </a>`}return U`${t} `}))}<br />`:U``}))}`,this.imagesToDisplay=r,Promise.all(i).then((e=>{this.websitePreviewInfo=e}))}removeTrailingPunctuation(e){return[".",",","!","?",":",";"].includes(e[e.length-1])?this.removeTrailingPunctuation(e.slice(0,-1)):e}mapAndMarkHyperLinks(e){const t=Array.from(e.matchAll(/<https?:\/\/[^|]+\|[^>]+>|<a href="https?:\/\/[^"]+"(?: target="[^"]*")?>[^<]+<\/a>/g)),n=[],i=t.map((t=>{const n=t[0];if(void 0===t.index)return;const i=e[t.index-1],r=e[t.index+n.length];if(n.startsWith("<https")||n.startsWith("<http"))return{matchedLink:n,link:n.split("|")[0].replace("<",""),hyperlink:n.split("|")[1].replace(">",""),addSpaceBefore:!(!i||" "===i),addSpaceAfter:!(!r||" "===r)};{const e=n.match(/href="([^"]+)"/),t=n.match(/>[^<]+</);return{matchedLink:n,link:e?e[1]:"",hyperlink:t?t[0].slice(1,-1):"",addSpaceBefore:!(!i||" "===i),addSpaceAfter:!(!r||" "===r)}}}));return i.forEach((t=>{if(t&&t.link&&t.hyperlink){const i=Or().replace(/-/g,"");n.push({link:this.removeTrailingPunctuation(t.link),hyperlink:this.removeTrailingPunctuation(t.hyperlink),mark:t.matchedLink,id:i}),e=e.replace(t.matchedLink,`${t.addSpaceBefore?" ":""}${i}${t.addSpaceAfter?" ":""}`)}})),{hyperlinks:n,markedText:e}}async getLinkData(e){var n,i,r,o;try{const a=(await t().get(e)).data,s=(new DOMParser).parseFromString(a,"text/html");return s?{title:null!==(i=null===(n=s.querySelector("title"))||void 0===n?void 0:n.textContent)&&void 0!==i?i:null,description:(null===(r=s.querySelector('meta[name="description"]'))||void 0===r?void 0:r.getAttribute("content"))||null,image:(null===(o=s.querySelector('meta[property="og:image"]'))||void 0===o?void 0:o.getAttribute("content"))||null,favicon:null,link:e}:{title:null,description:null,image:null,favicon:null,link:e}}catch(t){return console.error("Error fetching website details:",t),{title:null,description:null,image:null,favicon:null,link:e}}}updated(){this.onMount()}render(){return this.message?U`<div class="message-inner-body">
3489
3489
  <p
3490
3490
  class=${fe({"message-text":!0,"webchat-font__desktop":!ln(),"webchat-font__mobile":ln()})}
3491
3491
  >
@@ -117,7 +117,7 @@ export class PubnubMessage extends LitElement {
117
117
  } {
118
118
  // Updated regex to match both formats (EliseAI and embedded links)
119
119
  const regex =
120
- /<https?:\/\/[^|]+\|[^>]+>|<a href="https?:\/\/[^"]+">[^<]+<\/a>/g;
120
+ /<https?:\/\/[^|]+\|[^>]+>|<a href="https?:\/\/[^"]+"(?: target="[^"]*")?>[^<]+<\/a>/g;
121
121
 
122
122
  const matches = Array.from(text.matchAll(regex));
123
123
  const listHyperlinks: {