@meetelise/chat 1.20.48 → 1.20.49

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.48",
3
+ "version": "1.20.49",
4
4
  "description": "",
5
5
  "main": "public/dist/index.js",
6
6
  "type": "module",
@@ -92,14 +92,18 @@
92
92
  import MEChat from "/index.js";
93
93
  MEChat.start({
94
94
  organization: "test-company",
95
- building: "e2e-test-yardi-building",
96
95
  launcherStyles: { bottom: "300px" },
97
96
  });
98
97
  </script>
99
98
  <main>
100
99
  <h1>Example Page</h1>
101
- <p>This is an example page for serving the chat widget locally.</p>
100
+ <p>
101
+ This is an example page for serving the chat widget locally. Source of
102
+ truth
103
+ </p>
102
104
  <button id="reset" type="button">Restart conversation</button>
105
+ <button id="navigate" type="button">navigate</button>
106
+ <button id="unnavigate" type="button">unnavigate</button>
103
107
  <form id="theme">
104
108
  <label htmlFor="chatTitle">Title</label>
105
109
  <input type="text" id="chatTitle" name="chatTitle" />
@@ -131,5 +135,20 @@
131
135
  </div>
132
136
  </div>
133
137
  </main>
138
+ <script>
139
+ const navigateButton = document.getElementById("navigate");
140
+ navigateButton.addEventListener("click", () => {
141
+ if (window.location.href.includes("/new-url")) {
142
+ window.history.replaceState({}, "old title", "");
143
+ return;
144
+ }
145
+ window.history.replaceState({}, "New title", "/new-url");
146
+ });
147
+
148
+ const unnavigateButton = document.getElementById("unnavigate");
149
+ unnavigateButton.addEventListener("click", () => {
150
+ window.history.replaceState({}, "old title", "/");
151
+ });
152
+ </script>
134
153
  </body>
135
154
  </html>