@meetelise/chat 1.21.0 → 1.21.2

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.
Files changed (76) hide show
  1. package/.github/pull_request_template.md +61 -0
  2. package/.idea/codeStyles/Project.xml +57 -0
  3. package/.idea/codeStyles/codeStyleConfig.xml +5 -0
  4. package/.idea/inspectionProfiles/Project_Default.xml +6 -0
  5. package/.idea/vcs.xml +6 -0
  6. package/.idea/workspace.xml +67 -0
  7. package/README.md +29 -14
  8. package/declarations.d.ts +12 -0
  9. package/package.json +5 -1
  10. package/public/demo/index.html +62 -4
  11. package/public/demo/secret.html +63 -0
  12. package/public/dist/index.js +3184 -1105
  13. package/public/dist/index.js.LICENSE.txt +19 -9
  14. package/public/index.html +6 -4
  15. package/src/MEChat.ts +207 -52
  16. package/src/MyPubnub.ts +657 -0
  17. package/src/WebComponent/LeadSourceClient.ts +300 -0
  18. package/src/WebComponent/Scheduler/date-picker.ts +1 -1
  19. package/src/WebComponent/Scheduler/time-picker.ts +86 -76
  20. package/src/WebComponent/Scheduler/tour-scheduler.ts +694 -764
  21. package/src/WebComponent/Scheduler/tour-type-option.ts +17 -3
  22. package/src/WebComponent/Scheduler/tourSchedulerStyles.ts +418 -0
  23. package/src/WebComponent/actions/InputStyles.ts +32 -10
  24. package/src/WebComponent/actions/action-confirm-button.ts +16 -11
  25. package/src/WebComponent/actions/call-us-window.ts +341 -58
  26. package/src/WebComponent/actions/details-window.ts +30 -16
  27. package/src/WebComponent/actions/email-us-window.ts +89 -58
  28. package/src/WebComponent/actions/formatPhoneNumber.ts +15 -1
  29. package/src/WebComponent/actions/minimize-expand-button.ts +92 -0
  30. package/src/WebComponent/health-chat.ts +267 -0
  31. package/src/WebComponent/healthcare/healthcare-launcher-styles.ts +34 -0
  32. package/src/WebComponent/healthcare/healthcare-launcher.ts +100 -0
  33. package/src/WebComponent/healthchat-styles.ts +119 -0
  34. package/src/WebComponent/index.ts +1 -1
  35. package/src/WebComponent/launcher/Launcher.ts +919 -0
  36. package/src/WebComponent/{launcherStyles.ts → launcher/launcherStyles.ts} +172 -29
  37. package/src/WebComponent/launcher/mobile-launcher.ts +127 -0
  38. package/src/WebComponent/launcher/typeEmojiStyles.ts +161 -0
  39. package/src/WebComponent/launcher/typeMiniStyles.ts +60 -0
  40. package/src/WebComponent/launcher/typeMobileStyles.ts +50 -0
  41. package/src/WebComponent/leasing-chat-styles.ts +114 -0
  42. package/src/WebComponent/me-chat.ts +964 -351
  43. package/src/WebComponent/me-select.ts +48 -21
  44. package/src/WebComponent/mini-loader.ts +28 -0
  45. package/src/WebComponent/pubnub-chat-styles.ts +192 -0
  46. package/src/WebComponent/pubnub-chat.ts +707 -0
  47. package/src/WebComponent/pubnub-media.ts +208 -0
  48. package/src/WebComponent/pubnub-message-styles.ts +54 -0
  49. package/src/WebComponent/pubnub-message.ts +421 -0
  50. package/src/analytics.ts +114 -14
  51. package/src/assetUrls.ts +2 -0
  52. package/src/disclaimers.ts +56 -0
  53. package/src/fetchBuildingABTestType.ts +4 -0
  54. package/src/fetchBuildingInfo.ts +25 -17
  55. package/src/fetchFeatureFlag.ts +147 -0
  56. package/src/fetchLeadSources.ts +67 -1
  57. package/src/fetchPhoneNumberFromSource.ts +31 -0
  58. package/src/fetchWebchatPreferences.ts +55 -0
  59. package/src/getAvailabilities.ts +7 -3
  60. package/src/getBuildingPhoneNumber.ts +26 -0
  61. package/src/getShouldAllowScheduling.ts +16 -0
  62. package/src/getTimezoneString.ts +39 -0
  63. package/src/gtm.ts +17 -0
  64. package/src/handleChatId.ts +101 -0
  65. package/src/insertDNIIntoWebsite.ts +136 -0
  66. package/src/insertLeadSourceIntoSchedulerLinks.ts +50 -0
  67. package/src/postLeadSources.ts +39 -35
  68. package/src/svgIcons.ts +62 -53
  69. package/src/themes.ts +47 -121
  70. package/src/utils.ts +88 -1
  71. package/src/WebComponent/Launcher.ts +0 -559
  72. package/src/WebComponent/actions/text-us-window.ts +0 -279
  73. package/src/chatID.ts +0 -64
  74. package/src/createConversation.ts +0 -57
  75. package/src/fetchCurrentParsedLeadSource.ts +0 -24
  76. package/src/getRegisteredPhoneNumbers.ts +0 -56
@@ -0,0 +1,61 @@
1
+ # Issue Checklist
2
+
3
+ **this is important because webchat goes down far too frequently from a variety of sources (i.e. bad merges, chat provider issues, backend changes)**
4
+
5
+ ## Basic Popup Checks
6
+
7
+ - [ ] On click 'Chat with us', talkjs popup opens
8
+ - [ ] On click 'Email an Agent', email form pops up
9
+ - [ ] On click 'Call or text us', call and/or text us popup opens
10
+ - [ ] On click 'Book a tour', booking tour popup with calendar view opens
11
+
12
+ ## Email an Agent Form
13
+
14
+ **Applies only if Email widget is enabled for building**
15
+
16
+ - [ ] The form should require the lead's name, email address, and phone number. Message is optional.
17
+ - [ ] Upon submission, the form should create a Guest Card (GC) with the lead's information.
18
+ - [ ] The marketing source should be correctly logged on the GC (the source should ‘property-website’ AND whatever attribute the lead selected in the dropdown)
19
+
20
+ ## Web conversation
21
+
22
+ **Applies only if webchat applied to building**
23
+
24
+ - [ ] Chat widget should be responsive to questions asked
25
+ - [ ] Chat widget should accept a text input
26
+ - [ ] AI should provide appropiate responses based on the user's message
27
+ - [ ] Typing indicator should appear while lead is waiting back for response
28
+
29
+ ## Booking a Tour
30
+
31
+ **Applies only if scheduling widget is enabled for the building**
32
+
33
+ - [ ] Chat widget should provide an option to book a tour
34
+ - [ ] The available tour types should be displayed based on the community offerings.
35
+ - [ ] If there is only a single tour type offered, then that should be automatically selected
36
+ - [ ] The lead should be able to select a tour type, date, and time.
37
+ - [ ] The lead's layout and unit preferences should be recorded and passed through on the GC.
38
+
39
+ ## Marketing Source Attribution
40
+
41
+ **Behavior depends on this flag: https://app.launchdarkly.com/default/production/features/webchat-marketing-source-dropdown-configuration/targeting**
42
+
43
+ - [ ] We grab the source from `utm_source` in the url’s query parameters. So if you want it to be “Zillow” add `utm_source=zillow` to query parameters
44
+ - [ ] If flag set to “never”, marketing source dropdown should never appear
45
+ - [ ] If flag set to “always”, marketing source dropdown should always appear
46
+ - [ ] If flag set to “on-attribution-failure”, marketing source dropdown should appear if we fail to attribute the originating source.
47
+
48
+ ## Dynamic Number Insertion
49
+
50
+ **Behavior depends on this flag: https://app.launchdarkly.com/default/production/features/webchat-marketing-source-dropdown-configuration/targeting**
51
+
52
+ - [ ] We grab the source from `utm_source` in the url’s query parameters. So if you want it to be “Zillow” add `utm_source=zillow` to query parameters
53
+ - [ ] If flag set to “never”, marketing source dropdown should never appear
54
+ - [ ] If flag set to “always”, marketing source dropdown should always appear
55
+ - [ ] If flag set to “on-attribution-failure”, marketing source dropdown should appear if we fail to attribute the originating source.
56
+
57
+ ## Misc Checks
58
+
59
+ - [ ] The chat widget should adapt to various screen sizes and devices without compromising functionality or user experience.
60
+ - [ ] The chat widget should follow web accessibility guidelines (WCAG and ADA) to ensure that users with disabilities can interact with it effectively.
61
+ - [ ] The widget should support customization to match the company's branding and website design.
@@ -0,0 +1,57 @@
1
+ <component name="ProjectCodeStyleConfiguration">
2
+ <code_scheme name="Project" version="173">
3
+ <HTMLCodeStyleSettings>
4
+ <option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
5
+ </HTMLCodeStyleSettings>
6
+ <JSCodeStyleSettings version="0">
7
+ <option name="FORCE_SEMICOLON_STYLE" value="true" />
8
+ <option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
9
+ <option name="FORCE_QUOTE_STYlE" value="true" />
10
+ <option name="ENFORCE_TRAILING_COMMA" value="Remove" />
11
+ <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
12
+ <option name="SPACES_WITHIN_IMPORTS" value="true" />
13
+ </JSCodeStyleSettings>
14
+ <TypeScriptCodeStyleSettings version="0">
15
+ <option name="FORCE_SEMICOLON_STYLE" value="true" />
16
+ <option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
17
+ <option name="FORCE_QUOTE_STYlE" value="true" />
18
+ <option name="ENFORCE_TRAILING_COMMA" value="Remove" />
19
+ <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
20
+ <option name="SPACES_WITHIN_IMPORTS" value="true" />
21
+ </TypeScriptCodeStyleSettings>
22
+ <VueCodeStyleSettings>
23
+ <option name="INTERPOLATION_NEW_LINE_AFTER_START_DELIMITER" value="false" />
24
+ <option name="INTERPOLATION_NEW_LINE_BEFORE_END_DELIMITER" value="false" />
25
+ </VueCodeStyleSettings>
26
+ <codeStyleSettings language="HTML">
27
+ <option name="SOFT_MARGINS" value="80" />
28
+ <indentOptions>
29
+ <option name="INDENT_SIZE" value="2" />
30
+ <option name="CONTINUATION_INDENT_SIZE" value="2" />
31
+ <option name="TAB_SIZE" value="2" />
32
+ </indentOptions>
33
+ </codeStyleSettings>
34
+ <codeStyleSettings language="JavaScript">
35
+ <option name="SOFT_MARGINS" value="80" />
36
+ <indentOptions>
37
+ <option name="INDENT_SIZE" value="2" />
38
+ <option name="CONTINUATION_INDENT_SIZE" value="2" />
39
+ <option name="TAB_SIZE" value="2" />
40
+ </indentOptions>
41
+ </codeStyleSettings>
42
+ <codeStyleSettings language="TypeScript">
43
+ <option name="SOFT_MARGINS" value="80" />
44
+ <indentOptions>
45
+ <option name="INDENT_SIZE" value="2" />
46
+ <option name="CONTINUATION_INDENT_SIZE" value="2" />
47
+ <option name="TAB_SIZE" value="2" />
48
+ </indentOptions>
49
+ </codeStyleSettings>
50
+ <codeStyleSettings language="Vue">
51
+ <option name="SOFT_MARGINS" value="80" />
52
+ <indentOptions>
53
+ <option name="CONTINUATION_INDENT_SIZE" value="2" />
54
+ </indentOptions>
55
+ </codeStyleSettings>
56
+ </code_scheme>
57
+ </component>
@@ -0,0 +1,5 @@
1
+ <component name="ProjectCodeStyleConfiguration">
2
+ <state>
3
+ <option name="USE_PER_PROJECT_SETTINGS" value="true" />
4
+ </state>
5
+ </component>
@@ -0,0 +1,6 @@
1
+ <component name="InspectionProjectProfileManager">
2
+ <profile version="1.0">
3
+ <option name="myName" value="Project Default" />
4
+ <inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
5
+ </profile>
6
+ </component>
package/.idea/vcs.xml ADDED
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="" vcs="Git" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,67 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="AutoImportSettings">
4
+ <option name="autoReloadType" value="SELECTIVE" />
5
+ </component>
6
+ <component name="ChangeListManager">
7
+ <list default="true" id="8a49536e-718f-486f-a432-96e09a9aad1b" name="Changes" comment="">
8
+ <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
9
+ <change beforePath="$PROJECT_DIR$/public/demo/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/public/demo/index.html" afterDir="false" />
10
+ <change beforePath="$PROJECT_DIR$/src/WebComponent/Scheduler/tour-scheduler.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/WebComponent/Scheduler/tour-scheduler.ts" afterDir="false" />
11
+ </list>
12
+ <option name="SHOW_DIALOG" value="false" />
13
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
14
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
15
+ <option name="LAST_RESOLUTION" value="IGNORE" />
16
+ </component>
17
+ <component name="Git.Settings">
18
+ <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
19
+ </component>
20
+ <component name="MarkdownSettingsMigration">
21
+ <option name="stateVersion" value="1" />
22
+ </component>
23
+ <component name="ProjectColorInfo">{
24
+ &quot;associatedIndex&quot;: 0
25
+ }</component>
26
+ <component name="ProjectId" id="2de4xc4cpejeyTqwsCfYp8zg99D" />
27
+ <component name="ProjectViewState">
28
+ <option name="hideEmptyMiddlePackages" value="true" />
29
+ <option name="showLibraryContents" value="true" />
30
+ </component>
31
+ <component name="PropertiesComponent"><![CDATA[{
32
+ "keyToString": {
33
+ "RunOnceActivity.OpenProjectViewOnStart": "true",
34
+ "RunOnceActivity.ShowReadmeOnStart": "true",
35
+ "git-widget-placeholder": "add-tenant-occupied",
36
+ "last_opened_file_path": "/Users/colekingston/Desktop/chat-ui",
37
+ "node.js.detected.package.eslint": "true",
38
+ "node.js.detected.package.tslint": "true",
39
+ "node.js.selected.package.eslint": "(autodetect)",
40
+ "node.js.selected.package.tslint": "(autodetect)",
41
+ "nodejs_package_manager_path": "npm",
42
+ "ts.external.directory.path": "/Users/colekingston/Desktop/chat-ui/node_modules/typescript/lib",
43
+ "vue.rearranger.settings.migration": "true"
44
+ }
45
+ }]]></component>
46
+ <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
47
+ <component name="TaskManager">
48
+ <task active="true" id="Default" summary="Default task">
49
+ <changelist id="8a49536e-718f-486f-a432-96e09a9aad1b" name="Changes" comment="" />
50
+ <created>1710355459321</created>
51
+ <option name="number" value="Default" />
52
+ <option name="presentableId" value="Default" />
53
+ <updated>1710355459321</updated>
54
+ <workItem from="1710355460813" duration="2821000" />
55
+ <workItem from="1713446762231" duration="3583000" />
56
+ </task>
57
+ <servers />
58
+ </component>
59
+ <component name="TypeScriptGeneratedFilesManager">
60
+ <option name="version" value="3" />
61
+ <option name="exactExcludedFiles">
62
+ <list>
63
+ <option value="$PROJECT_DIR$/src/MEChat.d.ts" />
64
+ </list>
65
+ </option>
66
+ </component>
67
+ </project>
package/README.md CHANGED
@@ -14,7 +14,9 @@ To install MeetElise webchat on your site, add the following code:
14
14
  </script>
15
15
  ```
16
16
 
17
- For the mini widget:
17
+ ### Custom Positioning
18
+
19
+ To _reposition_ your chat widget on the page, add the `position` object to your snippet.
18
20
 
19
21
  ```html
20
22
  <script type="module">
@@ -22,24 +24,37 @@ For the mini widget:
22
24
  Chat.start({
23
25
  organization: "{your org here}",
24
26
  building: "{your building here}",
25
- mini: true,
27
+ position: {
28
+ bottom: 100, // Change these values to suit your needs
29
+ left: 0,
30
+ },
26
31
  });
27
32
  </script>
28
33
  ```
29
34
 
30
- ### Custom Styles
35
+ ### Configure Settings
36
+
37
+ To configure colors, options, and other settings you can navigate to https://app.meetelise.com/settings/widgets
38
+
39
+ ### Separate Call to Actions
40
+
41
+ You can open any of the widgets via the functions given in the window.eliseAi namespace. The options given are
42
+
43
+ `onOpenCallUsWindow`
44
+ `onOpenChat`
45
+ `onOpenEmailUsWindow`
46
+ `onOpenSST`
47
+
48
+ Example usage with an `<a>` tag would be:
49
+
50
+ ```html
51
+ <a href="javacript:void(0)" onclick="window.eliseAi.onOpenChat()"
52
+ >Chat with us</a
53
+ >
54
+ ```
31
55
 
32
- To customize the brand colors, title, and subtitle of your chat widget, configure your webchat through the MeetElise portal. To _reposition_ your chat widget on the page, add the following code to your web page.
56
+ While an example with a `<button>` tag would be
33
57
 
34
58
  ```html
35
- <style>
36
- .meetelise-chat.launcher {
37
- bottom: 50px; /* change these values to suit your needs */
38
- right: 40px;
39
- }
40
- .meetelise-chat.pane {
41
- bottom: 70px;
42
- right: 40px;
43
- }
44
- </style>
59
+ <button onclick="window.eliseAi.onOpenSst()">Open SST</button>
45
60
  ```
package/declarations.d.ts CHANGED
@@ -2,3 +2,15 @@ declare module "*.scss" {
2
2
  const content: Record<string, string>;
3
3
  export default content;
4
4
  }
5
+
6
+ // TODO: get the project to recognize these as valid types
7
+ declare global {
8
+ interface Window {
9
+ eliseAi: {
10
+ onOpenSST?: (callback: () => void) => void;
11
+ onOpenChat?: (callback: () => void) => void;
12
+ onOpenCallUsWindow?: (callback: () => void) => void;
13
+ onOpenEmailUsWindow?: (callback: () => void) => void;
14
+ };
15
+ }
16
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meetelise/chat",
3
- "version": "1.21.0",
3
+ "version": "1.21.2",
4
4
  "description": "",
5
5
  "main": "public/dist/index.js",
6
6
  "type": "module",
@@ -57,12 +57,16 @@
57
57
  },
58
58
  "dependencies": {
59
59
  "@meetelise/rest-sdk": "^0.0.161",
60
+ "@types/dompurify": "^3.0.5",
61
+ "@types/pubnub": "^7.2.1",
60
62
  "axios": "^0.27.2",
61
63
  "classnames": "^2.3.1",
62
64
  "date-fns": "^2.28.0",
65
+ "dompurify": "^3.1.2",
63
66
  "dotenv": "^16.0.1",
64
67
  "lit": "^2.2.4",
65
68
  "lodash": "^4.17.21",
69
+ "pubnub": "^7.2.2",
66
70
  "react": "^17.0.2",
67
71
  "talkjs": "^0.14.5",
68
72
  "uuid": "^8.3.2"
@@ -1,8 +1,25 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="en-GB">
3
3
  <head>
4
+ <!-- Google Tag Manager -->
5
+ <script>
6
+ (function (w, d, s, l, i) {
7
+ w[l] = w[l] || [];
8
+ w[l].push({ "gtm.start": new Date().getTime(), event: "gtm.js" });
9
+ var f = d.getElementsByTagName(s)[0],
10
+ j = d.createElement(s),
11
+ dl = l != "dataLayer" ? "&l=" + l : "";
12
+ j.async = true;
13
+ j.src = "https://www.googletagmanager.com/gtm.js?id=" + i + dl;
14
+ f.parentNode.insertBefore(j, f);
15
+ })(window, document, "script", "dataLayer", "GTM-PDVW5Q8");
16
+ </script>
17
+ <!-- End Google Tag Manager -->
4
18
  <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1" />
19
+ <meta
20
+ name="viewport"
21
+ content="width=device-width, initial-scale=1 user-scalable=1"
22
+ />
6
23
  <title>Chat Dev Page</title>
7
24
  <style>
8
25
  /* Uncomment this to check if changing the root font size interferes with any of our widget's styles */
@@ -87,13 +104,42 @@
87
104
  </style>
88
105
  </head>
89
106
  <body>
107
+ <!-- Google Tag Manager (noscript) -->
108
+ <noscript
109
+ ><iframe
110
+ src="https://www.googletagmanager.com/ns.html?id=GTM-PDVW5Q8"
111
+ height="0"
112
+ width="0"
113
+ style="display: none; visibility: hidden"
114
+ ></iframe
115
+ ></noscript>
116
+ <!-- End Google Tag Manager (noscript) -->
90
117
  <!-- Webpack dev server will serve the bundle, index.js, at the path '/' -->
91
118
  <script type="module" async>
92
119
  import MEChat from "/index.js";
120
+ // MEChat.healthcareStart({
121
+ // id: "6a9e65e5-9699-4c96-af75-1741d0df79aa",
122
+
123
+ const buttonOfInterest = document.querySelector("#reset");
124
+ if (buttonOfInterest) {
125
+ buttonOfInterest.setAttribute("style", "visibility: hidden;");
126
+ }
127
+ const onWidgetLoaded = () => {
128
+ buttonOfInterest.setAttribute("style", "visibility: visible;");
129
+ buttonOfInterest.innerHTML = "You've been yeeted my boy";
130
+ console.log("Widget loaded");
131
+ };
132
+
93
133
  MEChat.start({
94
- organization: "greystar",
95
- building: "e7677f10-a645-11ed-9432-53d3fdbf30f6",
96
- launcherStyles: { bottom: "300px" },
134
+ // organization: "avb",
135
+ // building: "ava-somerville-2",
136
+
137
+ organization: "elise-ai",
138
+ building: "930196d8-3527-11ee-a65a-b70940a36fe6",
139
+ // onWidgetLoaded: onWidgetLoaded,
140
+
141
+ // MEChat.healthcareStart({
142
+ // id: "6a9e65e5-9699-4c96-af75-1741d0df79aa",
97
143
  });
98
144
  </script>
99
145
  <main>
@@ -102,9 +148,21 @@
102
148
  This is an example page for serving the chat widget locally. Source of
103
149
  truth
104
150
  </p>
151
+
105
152
  <button id="reset" type="button">Restart conversation</button>
106
153
  <button id="navigate" type="button">navigate</button>
107
154
  <button id="unnavigate" type="button">unnavigate</button>
155
+ <a href="/secret.html">
156
+ <button id="navigate" type="button">Show me a secret!</button>
157
+ </a>
158
+ <button onclick="window.eliseAi.onOpenChat()">
159
+ Open chat without widget
160
+ </button>
161
+ <div>
162
+ <a href="javascript:void(0);" onclick="window.eliseAi.onOpenSST()"
163
+ >Open SST without using widget</a
164
+ >
165
+ </div>
108
166
  <form id="theme">
109
167
  <label htmlFor="chatTitle">Title</label>
110
168
  <input type="text" id="chatTitle" name="chatTitle" />
@@ -0,0 +1,63 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en-GB">
3
+ <head>
4
+ <!-- Google Tag Manager -->
5
+ <script>
6
+ (function (w, d, s, l, i) {
7
+ w[l] = w[l] || [];
8
+ w[l].push({ "gtm.start": new Date().getTime(), event: "gtm.js" });
9
+ var f = d.getElementsByTagName(s)[0],
10
+ j = d.createElement(s),
11
+ dl = l != "dataLayer" ? "&l=" + l : "";
12
+ j.async = true;
13
+ j.src = "https://www.googletagmanager.com/gtm.js?id=" + i + dl;
14
+ f.parentNode.insertBefore(j, f);
15
+ })(window, document, "script", "dataLayer", "GTM-PDVW5Q8");
16
+ </script>
17
+ <!-- End Google Tag Manager -->
18
+ <meta charset="utf-8" />
19
+ <meta
20
+ name="viewport"
21
+ content="width=device-width, initial-scale=1 user-scalable=1"
22
+ />
23
+ <title>Chat Dev Page</title>
24
+ <style>
25
+ body {
26
+ background: url("https://assets.dnainfo.com/photo/2016/9/1473799613-272887/original.jpg");
27
+ background-size: cover;
28
+ font-family: sans-serif;
29
+ display: flex;
30
+ flex-direction: column;
31
+ align-items: center;
32
+ letter-spacing: 4px;
33
+ }
34
+ </style>
35
+ </head>
36
+ <body>
37
+ <noscript
38
+ ><iframe
39
+ src="https://www.googletagmanager.com/ns.html?id=GTM-PDVW5Q8"
40
+ height="0"
41
+ width="0"
42
+ style="display: none; visibility: hidden"
43
+ ></iframe
44
+ ></noscript>
45
+ <script type="module" async>
46
+ import MEChat from "/index.js";
47
+ MEChat.start({
48
+ organization: "elise-ai",
49
+ building: "the-cambridge-house-3",
50
+ });
51
+ </script>
52
+ <main>
53
+ <h1>Secret Page</h1>
54
+ <p>
55
+ This is an example page for serving the chat widget locally. Source of
56
+ truth
57
+ </p>
58
+ <a href="/">
59
+ <button id="navigate" type="button">Take me home</button>
60
+ </a>
61
+ </main>
62
+ </body>
63
+ </html>