@meetelise/chat 1.25.1 → 1.25.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.
- package/coverage/lcov-report/index.html +1 -1
- package/coverage/lcov-report/index.js.html +1 -1
- package/package.json +1 -1
- package/.prettierignore +0 -2
- package/dist/src/MyPubnub.d.ts +0 -116
- package/dist/src/WebComponent/FeeCalculator/components/collapsible-fee-section/collapsible-fee-section-styles.d.ts +0 -2
- package/dist/src/WebComponent/FeeCalculator/components/collapsible-fee-section/collapsible-fee-section.d.ts +0 -20
- package/dist/src/WebComponent/FeeCalculator/components/fee-item/fee-item-styles.d.ts +0 -2
- package/dist/src/WebComponent/FeeCalculator/components/fee-item/fee-item.d.ts +0 -14
- package/dist/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector-styles.d.ts +0 -2
- package/dist/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector.d.ts +0 -17
- package/dist/src/WebComponent/FeeCalculator/components/index.d.ts +0 -3
- package/dist/src/WebComponent/FeeCalculator/components/promo-card/promo-card-styles.d.ts +0 -2
- package/dist/src/WebComponent/FeeCalculator/components/promo-card/promo-card.d.ts +0 -13
- package/dist/src/WebComponent/FeeCalculator/fee-calculator-styles.d.ts +0 -1
- package/dist/src/WebComponent/FeeCalculator/fee-calculator.d.ts +0 -31
- package/dist/src/WebComponent/FeeCalculator/index.d.ts +0 -2
- package/dist/src/WebComponent/FeeCalculator/model/building-fee.d.ts +0 -75
- package/dist/src/WebComponent/FeeCalculator/model/transaction-category.d.ts +0 -23
- package/dist/src/WebComponent/LeadSourceClient.d.ts +0 -46
- package/dist/src/WebComponent/OfficeHours.d.ts +0 -21
- package/dist/src/WebComponent/Scheduler/date-picker.d.ts +0 -28
- package/dist/src/WebComponent/Scheduler/time-picker.d.ts +0 -14
- package/dist/src/WebComponent/Scheduler/tour-scheduler.d.ts +0 -99
- package/dist/src/WebComponent/Scheduler/tour-type-option.d.ts +0 -13
- package/dist/src/WebComponent/Scheduler/tourSchedulerStyles.d.ts +0 -1
- package/dist/src/WebComponent/actions/InputStyles.d.ts +0 -1
- package/dist/src/WebComponent/actions/action-confirm-button.d.ts +0 -13
- package/dist/src/WebComponent/actions/call-us-window.d.ts +0 -37
- package/dist/src/WebComponent/actions/collapse-expand-button.d.ts +0 -8
- package/dist/src/WebComponent/actions/details-window.d.ts +0 -14
- package/dist/src/WebComponent/actions/email-us-window.d.ts +0 -46
- package/dist/src/WebComponent/actions/formatPhoneNumber.d.ts +0 -17
- package/dist/src/WebComponent/actions/minimize-expand-button.d.ts +0 -8
- package/dist/src/WebComponent/chat-additional-actions.d.ts +0 -28
- package/dist/src/WebComponent/health-chat.d.ts +0 -47
- package/dist/src/WebComponent/healthchat-styles.d.ts +0 -1
- package/dist/src/WebComponent/icons/ApplyOutlineIcon.d.ts +0 -2
- package/dist/src/WebComponent/icons/BookTourOutlineIcon.d.ts +0 -2
- package/dist/src/WebComponent/icons/CalculatorOutlineIcon.d.ts +0 -2
- package/dist/src/WebComponent/icons/ChatOutlineIcon.d.ts +0 -2
- package/dist/src/WebComponent/icons/ChevronLeftIcon.d.ts +0 -2
- package/dist/src/WebComponent/icons/ChevronRightIcon.d.ts +0 -2
- package/dist/src/WebComponent/icons/ContactResidentIcon.d.ts +0 -2
- package/dist/src/WebComponent/icons/DollarOutlineIcon.d.ts +0 -3
- package/dist/src/WebComponent/icons/EmailOutlineIcon.d.ts +0 -2
- package/dist/src/WebComponent/icons/HeyThereEmojiIcon.d.ts +0 -2
- package/dist/src/WebComponent/icons/PhoneOutlineIcon.d.ts +0 -2
- package/dist/src/WebComponent/icons/SendMessageIcon.d.ts +0 -3
- package/dist/src/WebComponent/icons/TourSelfGuidedIcon.d.ts +0 -2
- package/dist/src/WebComponent/icons/TourVirtuallyIcon.d.ts +0 -2
- package/dist/src/WebComponent/icons/TourWithAgentIcon.d.ts +0 -2
- package/dist/src/WebComponent/icons/XOutlineIcon.d.ts +0 -2
- package/dist/src/WebComponent/index.d.ts +0 -2
- package/dist/src/WebComponent/launcher/Launcher.d.ts +0 -98
- package/dist/src/WebComponent/launcher/launcherStyles.d.ts +0 -1
- package/dist/src/WebComponent/launcher/mobile-launcher.d.ts +0 -26
- package/dist/src/WebComponent/launcher/typeEmojiStyles.d.ts +0 -1
- package/dist/src/WebComponent/launcher/typeMiniStyles.d.ts +0 -1
- package/dist/src/WebComponent/launcher/typeMobileStyles.d.ts +0 -1
- package/dist/src/WebComponent/leasing-chat-styles.d.ts +0 -1
- package/dist/src/WebComponent/me-chat.d.ts +0 -91
- package/dist/src/WebComponent/me-select.d.ts +0 -24
- package/dist/src/WebComponent/mini-loader.d.ts +0 -5
- package/dist/src/WebComponent/pubnub-chat-styles.d.ts +0 -1
- package/dist/src/WebComponent/pubnub-chat.d.ts +0 -49
- package/dist/src/WebComponent/pubnub-media.d.ts +0 -14
- package/dist/src/WebComponent/pubnub-message-styles.d.ts +0 -1
- package/dist/src/WebComponent/pubnub-message.d.ts +0 -39
- package/dist/src/WebComponent/simple-launcher/simple-launcher-styles.d.ts +0 -1
- package/dist/src/WebComponent/simple-launcher/simple-launcher.d.ts +0 -12
- package/dist/src/WebComponent/utilities-chat.d.ts +0 -47
- package/dist/src/WebComponent/utilities-styles.d.ts +0 -1
- package/dist/src/WebComponent/utils.d.ts +0 -31
- package/dist/src/analytics.d.ts +0 -64
- package/dist/src/disclaimers.d.ts +0 -8
- package/dist/src/fetchBuildingABTestType.d.ts +0 -8
- package/dist/src/fetchBuildingInfo.d.ts +0 -57
- package/dist/src/fetchBuildingWebchatView.d.ts +0 -122
- package/dist/src/fetchFeatureFlag.d.ts +0 -14
- package/dist/src/fetchLeadSources.d.ts +0 -4
- package/dist/src/fetchPhoneNumberFromSource.d.ts +0 -6
- package/dist/src/getAvailabilities.d.ts +0 -44
- package/dist/src/getBuildingPhoneNumber.d.ts +0 -1
- package/dist/src/getShouldAllowScheduling.d.ts +0 -1
- package/dist/src/getShouldShowWebchat.d.ts +0 -3
- package/dist/src/getTimezoneString.d.ts +0 -1
- package/dist/src/globals.d.ts +0 -1
- package/dist/src/gtm.d.ts +0 -6
- package/dist/src/handleChatId.d.ts +0 -11
- package/dist/src/insertDNIIntoWebsite.d.ts +0 -5
- package/dist/src/insertLeadSourceIntoSchedulerLinks.d.ts +0 -4
- package/dist/src/main/MEChat.d.ts +0 -74
- package/dist/src/main/utils.d.ts +0 -2
- package/dist/src/postLeadSources.d.ts +0 -3
- package/dist/src/rentgrata.d.ts +0 -4
- package/dist/src/replaceSelectButtonsWithNewLink.d.ts +0 -5
- package/dist/src/services/fees/fetchBuildingFees.d.ts +0 -3
- package/dist/src/svgIcons.d.ts +0 -5
- package/dist/src/themes.d.ts +0 -5
- package/dist/src/types/rest-sdk.types.d.ts +0 -11
- package/dist/src/types/webchat-no-show-reason.d.ts +0 -1
- package/dist/src/utils.d.ts +0 -13
- package/public/demo/index.html +0 -347
- package/public/demo/secret.html +0 -63
- package/src/MyPubnub.ts +0 -792
- package/src/WebComponent/FeeCalculator/components/collapsible-fee-section/collapsible-fee-section-styles.ts +0 -86
- package/src/WebComponent/FeeCalculator/components/collapsible-fee-section/collapsible-fee-section.ts +0 -94
- package/src/WebComponent/FeeCalculator/components/fee-item/fee-item-styles.ts +0 -47
- package/src/WebComponent/FeeCalculator/components/fee-item/fee-item.ts +0 -50
- package/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector-styles.ts +0 -46
- package/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector.ts +0 -70
- package/src/WebComponent/FeeCalculator/components/index.ts +0 -3
- package/src/WebComponent/FeeCalculator/components/promo-card/promo-card-styles.ts +0 -39
- package/src/WebComponent/FeeCalculator/components/promo-card/promo-card.ts +0 -39
- package/src/WebComponent/FeeCalculator/fee-calculator-styles.ts +0 -280
- package/src/WebComponent/FeeCalculator/fee-calculator.ts +0 -256
- package/src/WebComponent/FeeCalculator/index.ts +0 -4
- package/src/WebComponent/FeeCalculator/model/building-fee.ts +0 -83
- package/src/WebComponent/FeeCalculator/model/transaction-category.ts +0 -23
- package/src/WebComponent/LeadSourceClient.ts +0 -332
- package/src/WebComponent/MEChat.css +0 -5
- package/src/WebComponent/OfficeHours.ts +0 -73
- package/src/WebComponent/Scheduler/date-picker.ts +0 -405
- package/src/WebComponent/Scheduler/time-picker.ts +0 -190
- package/src/WebComponent/Scheduler/tour-scheduler.ts +0 -1352
- package/src/WebComponent/Scheduler/tour-type-option.ts +0 -112
- package/src/WebComponent/Scheduler/tourSchedulerStyles.ts +0 -418
- package/src/WebComponent/actions/InputStyles.ts +0 -57
- package/src/WebComponent/actions/action-confirm-button.ts +0 -125
- package/src/WebComponent/actions/call-us-window.ts +0 -445
- package/src/WebComponent/actions/collapse-expand-button.ts +0 -65
- package/src/WebComponent/actions/details-window.ts +0 -150
- package/src/WebComponent/actions/email-us-window.ts +0 -555
- package/src/WebComponent/actions/formatPhoneNumber.ts +0 -72
- package/src/WebComponent/actions/minimize-expand-button.ts +0 -93
- package/src/WebComponent/chat-additional-actions.ts +0 -135
- package/src/WebComponent/health-chat.ts +0 -270
- package/src/WebComponent/healthchat-styles.ts +0 -119
- package/src/WebComponent/icons/ApplyOutlineIcon.ts +0 -22
- package/src/WebComponent/icons/BookTourOutlineIcon.ts +0 -13
- package/src/WebComponent/icons/CalculatorOutlineIcon.ts +0 -22
- package/src/WebComponent/icons/ChatOutlineIcon.ts +0 -10
- package/src/WebComponent/icons/ChevronLeftIcon.ts +0 -7
- package/src/WebComponent/icons/ChevronRightIcon.ts +0 -7
- package/src/WebComponent/icons/ContactResidentIcon.ts +0 -9
- package/src/WebComponent/icons/DollarOutlineIcon.ts +0 -18
- package/src/WebComponent/icons/EmailOutlineIcon.ts +0 -7
- package/src/WebComponent/icons/HeyThereEmojiIcon.ts +0 -12
- package/src/WebComponent/icons/PhoneOutlineIcon.ts +0 -7
- package/src/WebComponent/icons/SendMessageIcon.ts +0 -17
- package/src/WebComponent/icons/TourSelfGuidedIcon.ts +0 -17
- package/src/WebComponent/icons/TourVirtuallyIcon.ts +0 -17
- package/src/WebComponent/icons/TourWithAgentIcon.ts +0 -17
- package/src/WebComponent/icons/XOutlineIcon.ts +0 -8
- package/src/WebComponent/index.ts +0 -2
- package/src/WebComponent/launcher/Launcher.ts +0 -1193
- package/src/WebComponent/launcher/launcherStyles.ts +0 -500
- package/src/WebComponent/launcher/mobile-launcher.ts +0 -159
- package/src/WebComponent/launcher/typeEmojiStyles.ts +0 -161
- package/src/WebComponent/launcher/typeMiniStyles.ts +0 -60
- package/src/WebComponent/launcher/typeMobileStyles.ts +0 -50
- package/src/WebComponent/leasing-chat-styles.ts +0 -114
- package/src/WebComponent/me-chat.ts +0 -1257
- package/src/WebComponent/me-select.ts +0 -322
- package/src/WebComponent/mini-loader.ts +0 -28
- package/src/WebComponent/pubnub-chat-styles.ts +0 -204
- package/src/WebComponent/pubnub-chat.ts +0 -928
- package/src/WebComponent/pubnub-media.ts +0 -208
- package/src/WebComponent/pubnub-message-styles.ts +0 -54
- package/src/WebComponent/pubnub-message.ts +0 -431
- package/src/WebComponent/simple-launcher/simple-launcher-styles.ts +0 -34
- package/src/WebComponent/simple-launcher/simple-launcher.ts +0 -100
- package/src/WebComponent/utilities-chat.ts +0 -270
- package/src/WebComponent/utilities-styles.ts +0 -110
- package/src/WebComponent/utils.ts +0 -82
- package/src/analytics.ts +0 -217
- package/src/assetUrls.ts +0 -6
- package/src/disclaimers.ts +0 -58
- package/src/fetchBuildingABTestType.ts +0 -21
- package/src/fetchBuildingInfo.ts +0 -87
- package/src/fetchBuildingWebchatView.ts +0 -154
- package/src/fetchFeatureFlag.ts +0 -250
- package/src/fetchLeadSources.ts +0 -98
- package/src/fetchPhoneNumberFromSource.ts +0 -31
- package/src/fetchWebchatPreferences.ts +0 -54
- package/src/getAvailabilities.ts +0 -174
- package/src/getBuildingPhoneNumber.ts +0 -26
- package/src/getShouldAllowScheduling.ts +0 -16
- package/src/getShouldShowWebchat.ts +0 -114
- package/src/getTimezoneString.ts +0 -39
- package/src/globals.ts +0 -1
- package/src/gtm.ts +0 -17
- package/src/handleChatId.ts +0 -101
- package/src/insertDNIIntoWebsite.ts +0 -146
- package/src/insertLeadSourceIntoSchedulerLinks.ts +0 -71
- package/src/main/MEChat.test.ts +0 -110
- package/src/main/MEChat.ts +0 -404
- package/src/main/utils.ts +0 -70
- package/src/postLeadSources.ts +0 -44
- package/src/rentgrata.ts +0 -74
- package/src/replaceSelectButtonsWithNewLink.ts +0 -68
- package/src/services/fees/fetchBuildingFees.ts +0 -28
- package/src/svgIcons.ts +0 -14
- package/src/themes.ts +0 -65
- package/src/types/rest-sdk.types.ts +0 -13
- package/src/types/webchat-no-show-reason.ts +0 -6
- package/src/utils.ts +0 -121
- package/tsconfig.json +0 -84
|
@@ -1,322 +0,0 @@
|
|
|
1
|
-
import { LitElement, html, TemplateResult, css } from "lit";
|
|
2
|
-
import { property, state, query, customElement } from "lit/decorators.js";
|
|
3
|
-
import { classMap } from "lit/directives/class-map.js";
|
|
4
|
-
import { isMobile } from "../utils";
|
|
5
|
-
import { InputStyles } from "./actions/InputStyles";
|
|
6
|
-
|
|
7
|
-
type MeSelectOption = {
|
|
8
|
-
label: string;
|
|
9
|
-
value: string;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
@customElement("me-select")
|
|
13
|
-
export class MESelect extends LitElement {
|
|
14
|
-
@property({ attribute: false })
|
|
15
|
-
options: MeSelectOption[] = [];
|
|
16
|
-
|
|
17
|
-
@property({ type: String })
|
|
18
|
-
placeholder?: string = "Select";
|
|
19
|
-
|
|
20
|
-
@property({ type: String })
|
|
21
|
-
value?: string;
|
|
22
|
-
|
|
23
|
-
@state()
|
|
24
|
-
private activeOption: MeSelectOption | null = null;
|
|
25
|
-
|
|
26
|
-
@state()
|
|
27
|
-
private isOpen?: boolean = false;
|
|
28
|
-
|
|
29
|
-
@state()
|
|
30
|
-
private activeOptionIndex: number | null = null;
|
|
31
|
-
|
|
32
|
-
@query("#select", true)
|
|
33
|
-
meSelect!: HTMLDivElement;
|
|
34
|
-
|
|
35
|
-
focus = (): void => {
|
|
36
|
-
this.meSelect.focus();
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
toggleSelect = (): void => {
|
|
40
|
-
if (this.isOpen) {
|
|
41
|
-
this.activeOption = null;
|
|
42
|
-
}
|
|
43
|
-
this.isOpen = !this.isOpen;
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
setSelectedOption = (option: MeSelectOption, closeSelect = true): void => {
|
|
47
|
-
if (this.value !== option.value) {
|
|
48
|
-
this.value = option.value;
|
|
49
|
-
} else {
|
|
50
|
-
this.value = undefined;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
if (closeSelect) {
|
|
54
|
-
this.isOpen = !this.isOpen;
|
|
55
|
-
this.activeOption = null;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
if (!this.value) {
|
|
59
|
-
this.meSelect.style.color = "rgba(32, 32, 32, 0.5)";
|
|
60
|
-
} else {
|
|
61
|
-
this.meSelect.style.color = "rgba(32, 32, 32, 1)";
|
|
62
|
-
}
|
|
63
|
-
this.dispatchEvent(new Event("change", { bubbles: true, composed: true }));
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
handleKeydown = (
|
|
67
|
-
keyOrKeys: string | string[],
|
|
68
|
-
callback: () => void
|
|
69
|
-
): ((event: KeyboardEvent) => void) => {
|
|
70
|
-
return (e: KeyboardEvent) => {
|
|
71
|
-
if (typeof keyOrKeys === "string" && e.key === keyOrKeys) {
|
|
72
|
-
callback();
|
|
73
|
-
} else if (typeof keyOrKeys === "object" && keyOrKeys.includes(e.key)) {
|
|
74
|
-
callback();
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
private adjustScrollToActiveOption(): void {
|
|
80
|
-
if (this.activeOptionIndex != null) {
|
|
81
|
-
const optionElements = this.renderRoot.querySelectorAll(".option");
|
|
82
|
-
const activeOptionElement = optionElements[this.activeOptionIndex];
|
|
83
|
-
if (activeOptionElement) {
|
|
84
|
-
activeOptionElement.scrollIntoView({ block: "nearest" });
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
constructor() {
|
|
90
|
-
super();
|
|
91
|
-
// TODO: the current thing works, but want to investigate more. why doesn't it work with `this`?
|
|
92
|
-
// https://lamplightdev.com/blog/2021/04/10/how-to-detect-clicks-outside-of-a-web-component/
|
|
93
|
-
// TODO: "If your component adds an event listener to anything except itself or its templated DOM
|
|
94
|
-
// – for example, to Window, Document, or some element in the main DOM – you should add the
|
|
95
|
-
// listener in connectedCallback and remove it in disconnectedCallback." (https://lit.dev/docs/components/events/)
|
|
96
|
-
document.addEventListener("click", (event: MouseEvent) => {
|
|
97
|
-
if (!event.composedPath().includes(this.meSelect)) {
|
|
98
|
-
this.isOpen = false;
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
static styles = [
|
|
104
|
-
css`
|
|
105
|
-
:host {
|
|
106
|
-
--light-grey: #e3e3e3;
|
|
107
|
-
--active-option-color: #f5f7f9;
|
|
108
|
-
--light-border: 1px solid $light-border-color;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
#selectText {
|
|
112
|
-
background-color: transparent;
|
|
113
|
-
border: none;
|
|
114
|
-
outline: none;
|
|
115
|
-
font-size: 14px;
|
|
116
|
-
line-height: 14px;
|
|
117
|
-
font-family: "Helvetica Neue", Arial;
|
|
118
|
-
width: 100%;
|
|
119
|
-
padding: 0;
|
|
120
|
-
height: 14px;
|
|
121
|
-
display: flex;
|
|
122
|
-
align-items: center;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
ul {
|
|
126
|
-
padding-left: 0;
|
|
127
|
-
margin-bottom: 0;
|
|
128
|
-
max-height: 140px;
|
|
129
|
-
overflow-y: scroll;
|
|
130
|
-
position: absolute;
|
|
131
|
-
min-height: 40px;
|
|
132
|
-
min-width: 144px;
|
|
133
|
-
max-width: 400px;
|
|
134
|
-
width: max-content;
|
|
135
|
-
background-color: white;
|
|
136
|
-
z-index: 20;
|
|
137
|
-
margin-top: 4px;
|
|
138
|
-
border: var(--light-border);
|
|
139
|
-
box-sizing: border-box;
|
|
140
|
-
box-shadow: 0px 4px 14px rgba(0, 0, 0, 0.15);
|
|
141
|
-
border-radius: 10px;
|
|
142
|
-
|
|
143
|
-
font-size: 14px;
|
|
144
|
-
line-height: 14px;
|
|
145
|
-
font-family: "Helvetica Neue", Arial;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
#outer-select-container {
|
|
149
|
-
position: relative;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
#select {
|
|
153
|
-
width: -webkit-fill-available;
|
|
154
|
-
display: flex;
|
|
155
|
-
align-items: center;
|
|
156
|
-
justify-content: space-between;
|
|
157
|
-
color: rgba(32, 32, 32, 0.5);
|
|
158
|
-
white-space: nowrap;
|
|
159
|
-
overflow: hidden;
|
|
160
|
-
text-overflow: ellipsis;
|
|
161
|
-
height: 30px;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
::-webkit-scrollbar {
|
|
165
|
-
-webkit-appearance: none;
|
|
166
|
-
width: 8px;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
::-webkit-scrollbar-thumb {
|
|
170
|
-
border-radius: 10px;
|
|
171
|
-
background-color: rgba(0, 0, 0, 0.4);
|
|
172
|
-
-webkit-box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.option {
|
|
176
|
-
list-style: none;
|
|
177
|
-
padding: 10px;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.option:first-child {
|
|
181
|
-
border-top-left-radius: 10px;
|
|
182
|
-
border-top-right-radius: 10px;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.option:last-child {
|
|
186
|
-
border-bottom-left-radius: 10px;
|
|
187
|
-
border-bottom-right-radius: 10px;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
/* TODO: why two diff ones? copied from EWA but don't understand */
|
|
191
|
-
.option:active {
|
|
192
|
-
background-color: var(--light-grey);
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.option.active {
|
|
196
|
-
background-color: var(--active-option-color);
|
|
197
|
-
}
|
|
198
|
-
`,
|
|
199
|
-
InputStyles,
|
|
200
|
-
];
|
|
201
|
-
|
|
202
|
-
firstUpdated = (): void => {
|
|
203
|
-
if (this.value && this.meSelect) {
|
|
204
|
-
this.meSelect.style.color = "rgba(32, 32, 32, 1)";
|
|
205
|
-
}
|
|
206
|
-
};
|
|
207
|
-
render(): TemplateResult {
|
|
208
|
-
return html`
|
|
209
|
-
<div id="outer-select-container">
|
|
210
|
-
<div
|
|
211
|
-
id="select"
|
|
212
|
-
class=${classMap({
|
|
213
|
-
["webchat-input"]: true,
|
|
214
|
-
["webchat-font__desktop"]: !isMobile(),
|
|
215
|
-
["webchat-font__mobile"]: isMobile(),
|
|
216
|
-
})}
|
|
217
|
-
tabindex="0"
|
|
218
|
-
@click=${() => (this.isOpen = !this.isOpen)}
|
|
219
|
-
@keydown="${(e: KeyboardEvent) => {
|
|
220
|
-
switch (e.key) {
|
|
221
|
-
case "Enter":
|
|
222
|
-
case " ":
|
|
223
|
-
e.preventDefault();
|
|
224
|
-
if (this.isOpen && this.activeOption) {
|
|
225
|
-
this.setSelectedOption(this.activeOption);
|
|
226
|
-
} else {
|
|
227
|
-
this.toggleSelect();
|
|
228
|
-
}
|
|
229
|
-
break;
|
|
230
|
-
case "Escape":
|
|
231
|
-
e.preventDefault();
|
|
232
|
-
this.isOpen = false;
|
|
233
|
-
break;
|
|
234
|
-
case "Tab":
|
|
235
|
-
if (this.isOpen) {
|
|
236
|
-
e.preventDefault();
|
|
237
|
-
}
|
|
238
|
-
break;
|
|
239
|
-
case "ArrowUp":
|
|
240
|
-
e.preventDefault();
|
|
241
|
-
if (this.isOpen && this.activeOptionIndex != null) {
|
|
242
|
-
this.activeOptionIndex = Math.max(
|
|
243
|
-
0,
|
|
244
|
-
this.activeOptionIndex - 1
|
|
245
|
-
);
|
|
246
|
-
this.activeOption = this.options[this.activeOptionIndex];
|
|
247
|
-
this.adjustScrollToActiveOption();
|
|
248
|
-
}
|
|
249
|
-
break;
|
|
250
|
-
|
|
251
|
-
case "ArrowDown":
|
|
252
|
-
e.preventDefault();
|
|
253
|
-
if (this.isOpen) {
|
|
254
|
-
if (this.activeOptionIndex == null) {
|
|
255
|
-
this.activeOptionIndex = 0;
|
|
256
|
-
} else if (this.activeOptionIndex < this.options.length - 1) {
|
|
257
|
-
this.activeOptionIndex++;
|
|
258
|
-
}
|
|
259
|
-
this.activeOption = this.options[this.activeOptionIndex];
|
|
260
|
-
this.adjustScrollToActiveOption();
|
|
261
|
-
}
|
|
262
|
-
break;
|
|
263
|
-
}
|
|
264
|
-
}}"
|
|
265
|
-
>
|
|
266
|
-
${this.options.find((o) => o.value === this.value)?.label
|
|
267
|
-
? html` <span id="selectText"
|
|
268
|
-
>${this.options.find((o) => o.value === this.value)?.label ??
|
|
269
|
-
this.placeholder}</span
|
|
270
|
-
>`
|
|
271
|
-
: html` <input
|
|
272
|
-
readonly
|
|
273
|
-
placeholder="${this.placeholder}"
|
|
274
|
-
.value="${this.options.find((o) => o.value === this.value)
|
|
275
|
-
?.label ||
|
|
276
|
-
this.value ||
|
|
277
|
-
""}"
|
|
278
|
-
id="selectText"
|
|
279
|
-
/>`}
|
|
280
|
-
|
|
281
|
-
<svg
|
|
282
|
-
width="10"
|
|
283
|
-
height="6"
|
|
284
|
-
viewBox="0 0 10 6"
|
|
285
|
-
fill="none"
|
|
286
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
287
|
-
>
|
|
288
|
-
<path
|
|
289
|
-
d="M0.189941 1.25439L1.35369 0.0906372L4.84494 3.58189L8.33619 0.0906372L9.49994 1.25439L4.84494 5.90939L0.189941 1.25439Z"
|
|
290
|
-
fill="#83818E"
|
|
291
|
-
/>
|
|
292
|
-
</svg>
|
|
293
|
-
</div>
|
|
294
|
-
${this.isOpen
|
|
295
|
-
? html`<ul>
|
|
296
|
-
${this.options.map(
|
|
297
|
-
(option) =>
|
|
298
|
-
html`<li
|
|
299
|
-
@click="${() => this.setSelectedOption(option)}"
|
|
300
|
-
@keydown="${this.handleKeydown(["Enter", " "], () =>
|
|
301
|
-
this.setSelectedOption(option)
|
|
302
|
-
)}"
|
|
303
|
-
@mousemove="${() => {
|
|
304
|
-
this.activeOption = option;
|
|
305
|
-
}}"
|
|
306
|
-
@mouseleave="${() => {
|
|
307
|
-
this.activeOption = null;
|
|
308
|
-
}}"
|
|
309
|
-
class="option ${classMap({
|
|
310
|
-
active: this.activeOption === option,
|
|
311
|
-
})}"
|
|
312
|
-
tabindex="0"
|
|
313
|
-
>
|
|
314
|
-
${option.label}
|
|
315
|
-
</li>`
|
|
316
|
-
)}
|
|
317
|
-
</ul>`
|
|
318
|
-
: ""}
|
|
319
|
-
</div>
|
|
320
|
-
`;
|
|
321
|
-
}
|
|
322
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { css, html, LitElement, TemplateResult } from "lit";
|
|
2
|
-
import { customElement } from "lit/decorators.js";
|
|
3
|
-
@customElement("mini-loader")
|
|
4
|
-
export class MiniLoader extends LitElement {
|
|
5
|
-
static styles = css`
|
|
6
|
-
.spinner {
|
|
7
|
-
border: 2px solid rgba(0, 0, 0, 0.2);
|
|
8
|
-
border-top: 2px solid #c057ff;
|
|
9
|
-
border-radius: 50%;
|
|
10
|
-
width: 6px;
|
|
11
|
-
height: 6px;
|
|
12
|
-
animation: spin 0.4s linear infinite;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
@keyframes spin {
|
|
16
|
-
0% {
|
|
17
|
-
transform: rotate(0deg);
|
|
18
|
-
}
|
|
19
|
-
100% {
|
|
20
|
-
transform: rotate(360deg);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
`;
|
|
24
|
-
|
|
25
|
-
render(): TemplateResult {
|
|
26
|
-
return html`<div class="spinner"></div>`;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
2
|
-
|
|
3
|
-
export const pubnubChatStyles = css`
|
|
4
|
-
#header-text {
|
|
5
|
-
font-size: 12px;
|
|
6
|
-
font-weight: 700;
|
|
7
|
-
line-height: 18px;
|
|
8
|
-
letter-spacing: 0em;
|
|
9
|
-
text-align: left;
|
|
10
|
-
}
|
|
11
|
-
#header-subtext {
|
|
12
|
-
font-size: 12px;
|
|
13
|
-
font-weight: light;
|
|
14
|
-
line-height: 18px;
|
|
15
|
-
letter-spacing: 0em;
|
|
16
|
-
text-align: left;
|
|
17
|
-
color: #737373;
|
|
18
|
-
}
|
|
19
|
-
#exit-chat-bttn {
|
|
20
|
-
display: flex;
|
|
21
|
-
align-items: center;
|
|
22
|
-
justify-content: center;
|
|
23
|
-
background: none;
|
|
24
|
-
border: none;
|
|
25
|
-
cursor: pointer;
|
|
26
|
-
}
|
|
27
|
-
#conversation-body {
|
|
28
|
-
flex: 1;
|
|
29
|
-
width: 100%;
|
|
30
|
-
height: 100%;
|
|
31
|
-
overflow-y: scroll;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
#message-thread-list {
|
|
35
|
-
display: flex;
|
|
36
|
-
flex-direction: column;
|
|
37
|
-
position: relative;
|
|
38
|
-
padding: 0px 16px;
|
|
39
|
-
gap: 12px;
|
|
40
|
-
list-style: none;
|
|
41
|
-
}
|
|
42
|
-
.lead-message {
|
|
43
|
-
background: black;
|
|
44
|
-
border-radius: 8px 8px 0px 8px;
|
|
45
|
-
|
|
46
|
-
align-self: flex-end;
|
|
47
|
-
color: white;
|
|
48
|
-
|
|
49
|
-
box-shadow: 0px 18.048254013061523px 75.2010498046875px 0px #d9d9d91a;
|
|
50
|
-
box-shadow: 0px 1.7331933975219727px 2.599790096282959px 0px #0000000a;
|
|
51
|
-
}
|
|
52
|
-
.message-container {
|
|
53
|
-
display: flex;
|
|
54
|
-
padding: 6px;
|
|
55
|
-
width: fit-content;
|
|
56
|
-
max-width: calc(100% - 60px);
|
|
57
|
-
box-sizing: border-box;
|
|
58
|
-
}
|
|
59
|
-
.ai-message {
|
|
60
|
-
background: white;
|
|
61
|
-
border-radius: 10px 10px 10px 0px;
|
|
62
|
-
color: black;
|
|
63
|
-
box-shadow: 0px 18.048254013061523px 75.2010498046875px 0px #d9d9d91a;
|
|
64
|
-
box-shadow: 0px 1.7331933975219727px 2.599790096282959px 0px #0000000a;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.with-box-shadow {
|
|
68
|
-
box-shadow: 0px 8px 10px 0px rgba(0, 0, 0, 0.05);
|
|
69
|
-
}
|
|
70
|
-
.message-text {
|
|
71
|
-
word-break: break-word;
|
|
72
|
-
margin: 0;
|
|
73
|
-
padding: 6px 12px;
|
|
74
|
-
line-height: 130%;
|
|
75
|
-
|
|
76
|
-
font-size: 12px;
|
|
77
|
-
font-weight: 400;
|
|
78
|
-
line-height: 17px;
|
|
79
|
-
letter-spacing: 0em;
|
|
80
|
-
text-align: left;
|
|
81
|
-
}
|
|
82
|
-
.message-text-large {
|
|
83
|
-
word-break: break-word;
|
|
84
|
-
margin: 0;
|
|
85
|
-
padding: 4px 8px;
|
|
86
|
-
line-height: 130%;
|
|
87
|
-
|
|
88
|
-
font-size: 14px;
|
|
89
|
-
font-weight: 400;
|
|
90
|
-
line-height: 18px;
|
|
91
|
-
letter-spacing: 0em;
|
|
92
|
-
text-align: left;
|
|
93
|
-
}
|
|
94
|
-
.displayed-message-image {
|
|
95
|
-
max-width: 100%;
|
|
96
|
-
max-height: 300px;
|
|
97
|
-
width: auto;
|
|
98
|
-
height: auto;
|
|
99
|
-
}
|
|
100
|
-
.displayed-message-image-error {
|
|
101
|
-
display: none;
|
|
102
|
-
}
|
|
103
|
-
.redirect-link {
|
|
104
|
-
color: inherit;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
#loading-message {
|
|
108
|
-
padding: 12px;
|
|
109
|
-
}
|
|
110
|
-
.loading-dot {
|
|
111
|
-
width: 4px;
|
|
112
|
-
height: 4px;
|
|
113
|
-
border-radius: 50%;
|
|
114
|
-
margin: 5px;
|
|
115
|
-
animation: pulse 4s linear infinite;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.dot-1 {
|
|
119
|
-
background-color: #7d7d7d;
|
|
120
|
-
animation-delay: 0s;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.dot-2 {
|
|
124
|
-
background-color: #7d7d7d;
|
|
125
|
-
animation-delay: 1s;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.dot-3 {
|
|
129
|
-
background-color: #7d7d7d;
|
|
130
|
-
animation-delay: 2s;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
@keyframes pulse {
|
|
134
|
-
0% {
|
|
135
|
-
background-color: #7d7d7d;
|
|
136
|
-
transform: scale(1);
|
|
137
|
-
}
|
|
138
|
-
50% {
|
|
139
|
-
background-color: #c7c7c7;
|
|
140
|
-
transform: scale(2);
|
|
141
|
-
}
|
|
142
|
-
100% {
|
|
143
|
-
background-color: #7d7d7d;
|
|
144
|
-
transform: scale(1);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.hidden {
|
|
149
|
-
display: none !important;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.legal-confirmation-container {
|
|
153
|
-
display: flex;
|
|
154
|
-
flex-direction: column;
|
|
155
|
-
gap: 16px;
|
|
156
|
-
font-size: 14px;
|
|
157
|
-
line-height: 22px;
|
|
158
|
-
flex: 1;
|
|
159
|
-
width: 100%;
|
|
160
|
-
height: 100%;
|
|
161
|
-
background: #f5f5f5;
|
|
162
|
-
overflow-y: scroll;
|
|
163
|
-
border-top: 1px solid rgba(0, 0, 0, 0.1);
|
|
164
|
-
border-bottom: 6px solid black;
|
|
165
|
-
|
|
166
|
-
padding: 12px;
|
|
167
|
-
box-sizing: border-box;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.legal-confirmation-inner-container {
|
|
171
|
-
margin: 0 16px;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.privacy-policy-link {
|
|
175
|
-
color: blue;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
.agreeButton {
|
|
179
|
-
background: #000;
|
|
180
|
-
border-radius: 20px;
|
|
181
|
-
color: #fff;
|
|
182
|
-
padding: 8px 16px;
|
|
183
|
-
border: none;
|
|
184
|
-
cursor: pointer;
|
|
185
|
-
width: fit-content;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.confirmation-with-checkbox {
|
|
189
|
-
display: flex;
|
|
190
|
-
align: center;
|
|
191
|
-
justify-content: center;
|
|
192
|
-
gap: 12px;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.checkbox {
|
|
196
|
-
display: flex;
|
|
197
|
-
align-items: center;
|
|
198
|
-
justify-content: center;
|
|
199
|
-
cursor: pointer;
|
|
200
|
-
}
|
|
201
|
-
.checkbox:hover {
|
|
202
|
-
opacity: 0.5;
|
|
203
|
-
}
|
|
204
|
-
`;
|