@meetelise/chat 1.25.0 → 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.
Files changed (136) hide show
  1. package/coverage/lcov-report/base.css +224 -0
  2. package/coverage/lcov-report/block-navigation.js +79 -0
  3. package/coverage/lcov-report/favicon.png +0 -0
  4. package/coverage/lcov-report/index.html +111 -0
  5. package/coverage/lcov-report/index.js.html +17093 -0
  6. package/coverage/lcov-report/prettify.css +1 -0
  7. package/coverage/lcov-report/prettify.js +2 -0
  8. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  9. package/coverage/lcov-report/sorter.js +170 -0
  10. package/coverage/lcov.info +9986 -0
  11. package/dist/index.d.ts +1 -0
  12. package/package.json +1 -1
  13. package/.eslintignore +0 -2
  14. package/.eslintrc.cjs +0 -23
  15. package/.github/pull_request_template.md +0 -61
  16. package/.github/workflows/pull.yml +0 -46
  17. package/.github/workflows/release.yml +0 -23
  18. package/.husky/commit-msg +0 -2
  19. package/.husky/pre-commit +0 -4
  20. package/.idea/codeStyles/Project.xml +0 -57
  21. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  22. package/.idea/inspectionProfiles/Project_Default.xml +0 -6
  23. package/.idea/vcs.xml +0 -6
  24. package/.idea/workspace.xml +0 -67
  25. package/.prettierignore +0 -2
  26. package/.prettierrc.json +0 -1
  27. package/.vscode/settings.json +0 -13
  28. package/CONTRIBUTING.md +0 -36
  29. package/public/demo/index.html +0 -347
  30. package/public/demo/secret.html +0 -63
  31. package/src/MyPubnub.ts +0 -792
  32. package/src/WebComponent/FeeCalculator/components/collapsible-fee-section/collapsible-fee-section-styles.ts +0 -86
  33. package/src/WebComponent/FeeCalculator/components/collapsible-fee-section/collapsible-fee-section.ts +0 -94
  34. package/src/WebComponent/FeeCalculator/components/fee-item/fee-item-styles.ts +0 -47
  35. package/src/WebComponent/FeeCalculator/components/fee-item/fee-item.ts +0 -50
  36. package/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector-styles.ts +0 -46
  37. package/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector.ts +0 -70
  38. package/src/WebComponent/FeeCalculator/components/index.ts +0 -3
  39. package/src/WebComponent/FeeCalculator/components/promo-card/promo-card-styles.ts +0 -39
  40. package/src/WebComponent/FeeCalculator/components/promo-card/promo-card.ts +0 -39
  41. package/src/WebComponent/FeeCalculator/fee-calculator-styles.ts +0 -280
  42. package/src/WebComponent/FeeCalculator/fee-calculator.ts +0 -256
  43. package/src/WebComponent/FeeCalculator/index.ts +0 -4
  44. package/src/WebComponent/FeeCalculator/model/building-fee.ts +0 -83
  45. package/src/WebComponent/FeeCalculator/model/transaction-category.ts +0 -23
  46. package/src/WebComponent/LeadSourceClient.ts +0 -332
  47. package/src/WebComponent/MEChat.css +0 -5
  48. package/src/WebComponent/OfficeHours.ts +0 -73
  49. package/src/WebComponent/Scheduler/date-picker.ts +0 -405
  50. package/src/WebComponent/Scheduler/time-picker.ts +0 -190
  51. package/src/WebComponent/Scheduler/tour-scheduler.ts +0 -1352
  52. package/src/WebComponent/Scheduler/tour-type-option.ts +0 -112
  53. package/src/WebComponent/Scheduler/tourSchedulerStyles.ts +0 -418
  54. package/src/WebComponent/actions/InputStyles.ts +0 -57
  55. package/src/WebComponent/actions/action-confirm-button.ts +0 -125
  56. package/src/WebComponent/actions/call-us-window.ts +0 -445
  57. package/src/WebComponent/actions/collapse-expand-button.ts +0 -65
  58. package/src/WebComponent/actions/details-window.ts +0 -150
  59. package/src/WebComponent/actions/email-us-window.ts +0 -555
  60. package/src/WebComponent/actions/formatPhoneNumber.ts +0 -72
  61. package/src/WebComponent/actions/minimize-expand-button.ts +0 -93
  62. package/src/WebComponent/chat-additional-actions.ts +0 -135
  63. package/src/WebComponent/health-chat.ts +0 -270
  64. package/src/WebComponent/healthchat-styles.ts +0 -119
  65. package/src/WebComponent/icons/ApplyOutlineIcon.ts +0 -22
  66. package/src/WebComponent/icons/BookTourOutlineIcon.ts +0 -13
  67. package/src/WebComponent/icons/CalculatorOutlineIcon.ts +0 -22
  68. package/src/WebComponent/icons/ChatOutlineIcon.ts +0 -10
  69. package/src/WebComponent/icons/ChevronLeftIcon.ts +0 -7
  70. package/src/WebComponent/icons/ChevronRightIcon.ts +0 -7
  71. package/src/WebComponent/icons/ContactResidentIcon.ts +0 -9
  72. package/src/WebComponent/icons/DollarOutlineIcon.ts +0 -18
  73. package/src/WebComponent/icons/EmailOutlineIcon.ts +0 -7
  74. package/src/WebComponent/icons/HeyThereEmojiIcon.ts +0 -12
  75. package/src/WebComponent/icons/PhoneOutlineIcon.ts +0 -7
  76. package/src/WebComponent/icons/SendMessageIcon.ts +0 -17
  77. package/src/WebComponent/icons/TourSelfGuidedIcon.ts +0 -17
  78. package/src/WebComponent/icons/TourVirtuallyIcon.ts +0 -17
  79. package/src/WebComponent/icons/TourWithAgentIcon.ts +0 -17
  80. package/src/WebComponent/icons/XOutlineIcon.ts +0 -8
  81. package/src/WebComponent/index.ts +0 -2
  82. package/src/WebComponent/launcher/Launcher.ts +0 -1193
  83. package/src/WebComponent/launcher/launcherStyles.ts +0 -500
  84. package/src/WebComponent/launcher/mobile-launcher.ts +0 -159
  85. package/src/WebComponent/launcher/typeEmojiStyles.ts +0 -161
  86. package/src/WebComponent/launcher/typeMiniStyles.ts +0 -60
  87. package/src/WebComponent/launcher/typeMobileStyles.ts +0 -50
  88. package/src/WebComponent/leasing-chat-styles.ts +0 -114
  89. package/src/WebComponent/me-chat.ts +0 -1257
  90. package/src/WebComponent/me-select.ts +0 -322
  91. package/src/WebComponent/mini-loader.ts +0 -28
  92. package/src/WebComponent/pubnub-chat-styles.ts +0 -204
  93. package/src/WebComponent/pubnub-chat.ts +0 -928
  94. package/src/WebComponent/pubnub-media.ts +0 -208
  95. package/src/WebComponent/pubnub-message-styles.ts +0 -54
  96. package/src/WebComponent/pubnub-message.ts +0 -431
  97. package/src/WebComponent/simple-launcher/simple-launcher-styles.ts +0 -34
  98. package/src/WebComponent/simple-launcher/simple-launcher.ts +0 -100
  99. package/src/WebComponent/utilities-chat.ts +0 -270
  100. package/src/WebComponent/utilities-styles.ts +0 -110
  101. package/src/WebComponent/utils.ts +0 -82
  102. package/src/analytics.ts +0 -217
  103. package/src/assetUrls.ts +0 -6
  104. package/src/disclaimers.ts +0 -58
  105. package/src/fetchBuildingABTestType.ts +0 -21
  106. package/src/fetchBuildingInfo.ts +0 -87
  107. package/src/fetchBuildingWebchatView.ts +0 -154
  108. package/src/fetchFeatureFlag.ts +0 -250
  109. package/src/fetchLeadSources.ts +0 -98
  110. package/src/fetchPhoneNumberFromSource.ts +0 -31
  111. package/src/fetchWebchatPreferences.ts +0 -54
  112. package/src/getAvailabilities.ts +0 -174
  113. package/src/getBuildingPhoneNumber.ts +0 -26
  114. package/src/getShouldAllowScheduling.ts +0 -16
  115. package/src/getShouldShowWebchat.ts +0 -114
  116. package/src/getTimezoneString.ts +0 -39
  117. package/src/globals.ts +0 -1
  118. package/src/gtm.ts +0 -17
  119. package/src/handleChatId.ts +0 -101
  120. package/src/insertDNIIntoWebsite.ts +0 -146
  121. package/src/insertLeadSourceIntoSchedulerLinks.ts +0 -71
  122. package/src/main/MEChat.test.ts +0 -110
  123. package/src/main/MEChat.ts +0 -404
  124. package/src/main/utils.ts +0 -70
  125. package/src/postLeadSources.ts +0 -44
  126. package/src/rentgrata.ts +0 -74
  127. package/src/replaceSelectButtonsWithNewLink.ts +0 -68
  128. package/src/services/fees/fetchBuildingFees.ts +0 -28
  129. package/src/svgIcons.ts +0 -14
  130. package/src/themes.ts +0 -65
  131. package/src/types/rest-sdk.types.ts +0 -13
  132. package/src/types/webchat-no-show-reason.ts +0 -6
  133. package/src/utils.ts +0 -121
  134. package/tsconfig.json +0 -84
  135. package/web-test-runner.config.js +0 -10
  136. package/webpack.config.cjs +0 -48
@@ -1,500 +0,0 @@
1
- import { css } from "lit";
2
-
3
- export const launcherStyles = css`
4
- * {
5
- font-family: "Helvetica Neue", Arial;
6
- font-size: 14px;
7
-
8
- transition: all 0.2s ease-in-out; /* apply a smooth transition effect to all properties */
9
- }
10
- :host {
11
- --glowBarHeight: 11.2px;
12
- --enterAnimationDuration: 0.5s;
13
- --desktopZIndex: 100000;
14
- }
15
-
16
- @keyframes slideInFromRight {
17
- from {
18
- transform: translateX(100%);
19
- }
20
- to {
21
- transform: translateX(0);
22
- }
23
- }
24
- .launcher {
25
- font-family: "Helvetica Neue", Arial;
26
- user-select: none;
27
- position: fixed;
28
- }
29
- .launcher:not(.miniLauncher) {
30
- display: flex;
31
- justify-content: space-evenly;
32
- align-items: center;
33
- background-color: rgba(255, 255, 255, 0.8);
34
- color: #202020;
35
- backdrop-filter: blur(50px);
36
- box-shadow: 0px 8px 8px 4px rgba(0, 0, 0, 0.25);
37
- }
38
- .launcher:not(.miniLauncher).launcher__mobile {
39
- width: 100%;
40
- bottom: 0px;
41
- left: 0px;
42
- padding: 5px;
43
- }
44
- .launcher:not(.miniLauncher).launcher__desktop {
45
- width: 245px;
46
- height: 112px;
47
- padding-left: 10px;
48
- }
49
- .launcher.launcher__desktop {
50
- right: 0px;
51
- overflow: hidden;
52
- border-radius: 10px 0px 0px 10px;
53
- bottom: 40px;
54
- z-index: 100000;
55
- }
56
- .launcher.launcher__desktop.firstMount {
57
- animation: slideInFromRight var(--enterAnimationDuration);
58
- }
59
- .launcher .glowBar {
60
- overflow: hidden;
61
- background-position: center;
62
- position: absolute;
63
- top: 3px;
64
- left: 3px;
65
- height: 11.2px;
66
- width: 100%;
67
- object-fit: fill;
68
- border-top-left-radius: 10px;
69
- }
70
-
71
- .launcher .glowBar + * {
72
- margin-top: calc(var(--glowBarHeight) + 8px);
73
- }
74
- .launcher .content {
75
- display: flex;
76
- flex-direction: column;
77
- align-items: center;
78
- gap: 10px;
79
- margin-bottom: 6px;
80
- }
81
- .launcher .content .header {
82
- display: flex;
83
- align-items: center;
84
- }
85
- .launcher .content .header .headerText {
86
- font-weight: 600;
87
- font-size: 20px;
88
- }
89
- .launcher .content .subtitle {
90
- font-size: 12px;
91
- font-weight: 600;
92
- }
93
- .miniLauncher {
94
- display: flex;
95
- align-items: center;
96
- background-color: #202020;
97
- position: fixed;
98
- }
99
- .miniLauncher:hover {
100
- background: radial-gradient(
101
- 36.85% 65.32% at 50% 106.31%,
102
- #03ecc4 0%,
103
- rgba(131, 129, 142, 1) 100%
104
- );
105
- }
106
- .miniLauncher.firstMount {
107
- animation: slideInFromRight 0.5s;
108
- }
109
- .miniLauncher.launcher__desktop {
110
- padding-right: 20px;
111
- right: 0px;
112
- overflow: hidden;
113
- bottom: 40px;
114
- z-index: var(--desktopZIndex);
115
- }
116
- .miniLauncher.launcher__mobile {
117
- right: 10px;
118
- bottom: 20px;
119
- }
120
-
121
- .launcher__primary-action-text {
122
- font-family: "Helvetica Neue", Arial;
123
- font-weight: 700;
124
- font-size: 24px;
125
- line-height: 22px;
126
- cursor: pointer;
127
- }
128
-
129
- .launcher__primary-action:hover {
130
- color: #350da6;
131
- }
132
-
133
- .launcher__primary-action {
134
- transition: color 0.5s cubic-bezier(0.2, 0.19, 0.27, 0.98),
135
- fill 0.5s cubic-bezier(0.2, 0.19, 0.27, 0.98);
136
- cursor: pointer;
137
- }
138
-
139
- .launcher__primary-action:hover path {
140
- fill: #350da6;
141
- }
142
-
143
- .launcher__primary-action:hover .launcher__ask-underline {
144
- background: #350da6;
145
- }
146
-
147
- .launcher__primary-action svg {
148
- height: 28px;
149
- width: 28px;
150
- transform: translateX(2px);
151
- }
152
-
153
- .launcher__ask-underline {
154
- width: 47px;
155
- height: 3px;
156
- background: #1e1e1e;
157
- transition: background 0.5s cubic-bezier(0.2, 0.19, 0.27, 0.98);
158
- }
159
-
160
- .launcher__filler-text {
161
- font-size: 10px;
162
- line-height: 22px;
163
- color: #1e1e1e;
164
- }
165
-
166
- .launcher__call-to-action-option {
167
- font-weight: 700;
168
- font-size: 12px;
169
- line-height: 22px;
170
-
171
- color: #1e1e1e;
172
- border-bottom: 2px solid #1e1e1e;
173
- width: fit-content;
174
- height: fit-content;
175
- cursor: pointer;
176
- transition: color 0.2s cubic-bezier(0.2, 0.19, 0.27, 0.98);
177
- }
178
-
179
- .launcher__call-to-action-option:hover {
180
- color: #350da6;
181
- border-bottom: 2px solid #350da6;
182
- }
183
-
184
- .launcher__call-to-actions-wrapper {
185
- width: 100%;
186
- display: flex;
187
- }
188
-
189
- .launcher__call-to-actions-wrapper
190
- > .launcher__call-to-action-option:not(:last-child) {
191
- margin-right: 15px;
192
- }
193
-
194
- .launcher__window-wrapper {
195
- position: fixed;
196
- right: 0;
197
- bottom: 172px;
198
- }
199
-
200
- .launcher__mini-launcher-wrapper {
201
- position: fixed;
202
- right: 0px;
203
- bottom: 110px;
204
- z-index: 100000;
205
- display: flex;
206
- align-items: center;
207
- width: fit-content;
208
- }
209
- .launcher__mobile-launcher-wrapper {
210
- position: fixed;
211
- right: 12px;
212
- bottom: 0px;
213
- z-index: 100000;
214
- display: flex;
215
- align-items: center;
216
- }
217
-
218
- .launcher__mini-option {
219
- position: relative;
220
- // This is so that the pseudo elements we created will be visible despite being beneath the element it is a pseudo element for
221
- border: 4px solid transparent;
222
- height: 48px;
223
- width: 48px;
224
- display: flex;
225
- align-items: center;
226
- justify-content: center;
227
- border-radius: 50%;
228
- background: rgba(240, 240, 240, 0.9);
229
- background-clip: padding-box;
230
- padding: 4px;
231
- box-shadow: 0px 8px 8px 4px rgba(0, 0, 0, 0.25);
232
- cursor: pointer;
233
- }
234
-
235
- .launcher__mini-option-wrapper {
236
- margin-right: 12px;
237
- }
238
-
239
- .launcher__mini-option:not(:hover)::before {
240
- position: absolute;
241
- top: -4px;
242
- bottom: -4px;
243
- left: -4px;
244
- right: -4px;
245
- background: #ffffff;
246
- content: "";
247
- z-index: -1;
248
- border-radius: 50%;
249
- }
250
-
251
- .launcher__secondary-option {
252
- width: 30px;
253
- height: 30px;
254
- }
255
-
256
- .launcher__mini-option-wrapper {
257
- background-clip: padding-box;
258
- }
259
-
260
- .launcher__mini-option:hover {
261
- border: none;
262
- }
263
-
264
- .launcher__mini-option:hover::before {
265
- position: absolute;
266
- top: -4px;
267
- bottom: -4px;
268
- left: -4px;
269
- right: -4px;
270
- background: linear-gradient(to right, #350da6, #8c58e5, #e66933);
271
- background-size: cover;
272
- content: "";
273
- z-index: -1;
274
- border-radius: 50%;
275
- }
276
-
277
- @media screen and (max-width: 768px) {
278
- .launcher__mini-elevated {
279
- bottom: 75px;
280
- }
281
- }
282
-
283
- @media screen and (max-width: 767px) {
284
- .launcher:not(.miniLauncher).launcher__desktop {
285
- width: 100%;
286
- }
287
-
288
- .launcher.launcher__desktop {
289
- bottom: 0px;
290
- }
291
-
292
- .launcher.launcher__desktop {
293
- border-radius: 0px;
294
- }
295
-
296
- .launcher .glowBar {
297
- top: 3px;
298
- left: 0;
299
- border-top-left-radius: 0px;
300
- }
301
-
302
- .launcher .content {
303
- flex-direction: row;
304
- padding-top: 15px;
305
- padding-bottom: 15px;
306
- }
307
-
308
- .launcher__primary-action-text {
309
- font-size: 18px;
310
- flex-grow: 1;
311
- }
312
-
313
- .launcher__call-to-actions-wrapper {
314
- width: fit-content;
315
- }
316
-
317
- .launcher__ask-underline {
318
- width: 35px;
319
- }
320
-
321
- .launcher__window-wrapper {
322
- left: 0;
323
- bottom: 0;
324
- }
325
- }
326
-
327
- .minimize-button {
328
- position: absolute;
329
- top: -24px;
330
- right: 4px;
331
-
332
- background: #ffffff;
333
- border-radius: 4px;
334
- border: none;
335
-
336
- width: 18px;
337
- height: 18px;
338
-
339
- padding: 0;
340
- cursor: pointer;
341
- z-index: 1;
342
- box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
343
- }
344
- .minimize-button:hover {
345
- filter: brightness(0.9);
346
- }
347
-
348
- .chevron-down,
349
- .chevron-up {
350
- padding: 0;
351
- display: flex;
352
- align-items: center;
353
- justify-content: center;
354
- }
355
-
356
- .chevron-down {
357
- transform: rotate(90deg);
358
- }
359
- .chevron-up {
360
- transform: rotate(-90deg);
361
- }
362
-
363
- .type-gradient__list {
364
- width: 199px;
365
- height: 262px;
366
- left: 1218px;
367
- top: 604px;
368
-
369
- border: 1px solid #ffffff;
370
- border-radius: 20px 0px 20px 20px;
371
- background: #262626;
372
- color: #fff;
373
- display: flex;
374
- flex-direction: column;
375
- justify-content: flex-end;
376
- overflow: hidden;
377
- cursor: pointer;
378
-
379
- box-shadow: 0px 8px 8px 4px rgba(0, 0, 0, 0.5);
380
- }
381
- .type-gradient__top-container {
382
- position: relative;
383
- width: 100%;
384
- height: 100%;
385
- background: #ffffff;
386
- overflow: hidden;
387
- }
388
- .video-container {
389
- position: relative;
390
- margin-left: -48px;
391
- }
392
- .glowBackground {
393
- position: absolute;
394
- width: 100%;
395
- height: 100%;
396
- top: 0px;
397
- left: 0px;
398
- object-fit: cover;
399
- transform: scale(1.3);
400
- filter: brightness(80%);
401
- }
402
- .type-gradient__scroll-info {
403
- padding: 18px;
404
- display: flex;
405
- flex-direction: column;
406
- z-index: 99999;
407
-
408
- margin-top: 0em;
409
-
410
- opacity: 0.95;
411
- }
412
- .type-gradient__scroll-info:hover {
413
- text-shadow: 0px 0px 5px rgba(255, 255, 255, 0.85);
414
- }
415
- .type-gradient__scroll-info:hover > .type-gradient__description > li {
416
- opacity: 0.99;
417
- }
418
-
419
- .type-gradient__chat-container {
420
- display: flex;
421
- align-items: center;
422
- gap: 8px;
423
- margin-top: 4px;
424
- }
425
- .type-gradient__chat-header > .title-bold {
426
- font-family: "Helvetica Neue", Arial;
427
- font-style: normal;
428
- font-size: 22px;
429
- line-height: 28px;
430
- color: #ffffff;
431
- opacity: 0.95;
432
- }
433
- .type-gradient__chat-header {
434
- font-family: "Helvetica Neue", Arial;
435
- font-style: normal;
436
- font-size: 22px;
437
- line-height: 28px;
438
- color: #ffffff;
439
- font-weight: 300;
440
- }
441
- .type-gradient__description {
442
- padding: 0;
443
- margin: 0;
444
- list-style: none;
445
- }
446
- .type-gradient__description > li {
447
- font-family: "Helvetica Neue", Arial;
448
- font-style: normal;
449
- font-weight: 300;
450
- font-size: 18px;
451
- line-height: 24px;
452
-
453
- color: #ffffff;
454
- opacity: 0.5;
455
- }
456
-
457
- .type-gradient__email {
458
- background: #000000;
459
- border-top: 1px solid #4d4d4d;
460
- border-bottom: 1px solid #4d4d4d;
461
- }
462
-
463
- .type-gradient__bottom-tab {
464
- font-family: "Helvetica Neue", Arial;
465
- font-style: normal;
466
- font-weight: 400;
467
- font-size: 16px;
468
- line-height: 18px;
469
- padding: 16px 20px;
470
-
471
- color: #ffffff;
472
- display: flex;
473
- align-items: center;
474
- gap: 10px;
475
- }
476
- .type-gradient__bottom-tab:hover {
477
- text-shadow: 0px 0px 5px rgba(255, 255, 255, 0.85);
478
- background: linear-gradient(265.11deg, #000000 16.43%, #3c3c3c 87.21%);
479
- }
480
- .type-gradient__icon {
481
- display: flex;
482
- justify-content: center;
483
- align-items: center;
484
- }
485
- .type-gradient__icon svg {
486
- color: #ffffff;
487
- }
488
-
489
- @media screen and (max-height: 750px) {
490
- .launcher__window-wrapper {
491
- bottom: 0;
492
- }
493
- }
494
- @media screen and (min-width: 1000px) {
495
- .inner-pill-wrapper {
496
- height: 50px;
497
- width: 164px;
498
- }
499
- }
500
- `;
@@ -1,159 +0,0 @@
1
- import { html, LitElement, TemplateResult } from "lit";
2
- import { customElement, property } from "lit/decorators.js";
3
- import { typeMobileStyles } from "./typeMobileStyles";
4
- import { styleMap } from "lit/directives/style-map.js";
5
- import { defaultBackgroundColor, defaultPrimaryColor } from "../../themes";
6
- import { EmailOutlineIcon } from "../icons/EmailOutlineIcon";
7
- import { PhoneOutlineIcon } from "../icons/PhoneOutlineIcon";
8
- import { BookTourOutlineIcon } from "../icons/BookTourOutlineIcon";
9
- import { ChatOutlineIcon } from "../icons/ChatOutlineIcon";
10
- import { ApplyOutlineIcon } from "../icons/ApplyOutlineIcon";
11
- import { CalculatorOutlineIcon } from "../icons/CalculatorOutlineIcon";
12
-
13
- @customElement("mobile-launcher")
14
- export class MobileLauncher extends LitElement {
15
- static styles = [typeMobileStyles];
16
-
17
- @property({ attribute: true })
18
- onClickMinimize: () => void = () => {
19
- return;
20
- };
21
-
22
- @property({ attribute: true })
23
- onClickEmailOption: (e: MouseEvent) => void = () => {
24
- return;
25
- };
26
- @property({ attribute: true })
27
- onClickPhoneOption: (e: MouseEvent) => void = () => {
28
- return;
29
- };
30
- @property({ attribute: true })
31
- onClickSSTOption: (e: MouseEvent) => void = () => {
32
- return;
33
- };
34
- @property({ attribute: true })
35
- onClickApplyNowOption: (e: MouseEvent) => void = () => {
36
- return;
37
- };
38
- @property({ attribute: true })
39
- onClickPriceCalculatorOption: (e: MouseEvent) => void = () => {
40
- return;
41
- };
42
- @property({ attribute: true })
43
- onChatTapped: (e: MouseEvent) => void = () => {
44
- return;
45
- };
46
-
47
- @property({ attribute: true })
48
- hideChat = false;
49
-
50
- @property({ attribute: true })
51
- isMobileDesign = false;
52
-
53
- @property({ attribute: true })
54
- primaryColor: string = defaultPrimaryColor;
55
-
56
- @property({ attribute: true })
57
- backgroundColor: string = defaultBackgroundColor;
58
-
59
- @property({ attribute: true })
60
- hasChatEnabled = false;
61
-
62
- @property({ attribute: true })
63
- hasEmailEnabled = false;
64
-
65
- @property({ attribute: true })
66
- hasCallUsEnabled = false;
67
-
68
- @property({ attribute: true })
69
- hasTextUsEnabled = false;
70
-
71
- @property({ attribute: true })
72
- hasSSTEnabled = false;
73
-
74
- @property({ attribute: true })
75
- hasApplyNowEnabled = false;
76
-
77
- @property({ attribute: true })
78
- hasPricingCalculatorEnabled = false;
79
-
80
- @property({ attribute: true })
81
- applicationLink = "";
82
-
83
- @property({ attribute: true })
84
- overrideRentgrata = false;
85
-
86
- private renderListElement = (
87
- isEnabled: boolean,
88
- onClick: (e: MouseEvent) => void,
89
- icon: TemplateResult<2> // is an svg icon in lit
90
- ) => {
91
- if (!isEnabled) {
92
- return "";
93
- }
94
- return html` <li
95
- @click=${onClick}
96
- class="typeMobile-bttn"
97
- style=${styleMap({
98
- background: `${this.primaryColor}`,
99
- })}
100
- >
101
- <div
102
- class="typeMobile-inner"
103
- style=${styleMap({
104
- background: `${this.backgroundColor}`,
105
- })}
106
- >
107
- <div class="typeMobile-icon">${icon}</div>
108
- </div>
109
- </li>`;
110
- };
111
-
112
- render(): TemplateResult {
113
- return html`<div class="typeMobile-list">
114
- <ul>
115
- ${this.renderListElement(
116
- !!(this.hasApplyNowEnabled && this.applicationLink),
117
- this.onClickApplyNowOption,
118
- ApplyOutlineIcon("black")
119
- )}
120
- ${this.renderListElement(
121
- this.hasPricingCalculatorEnabled,
122
- this.onClickPriceCalculatorOption,
123
- CalculatorOutlineIcon("black")
124
- )}
125
- ${this.renderListElement(
126
- this.hasEmailEnabled,
127
- this.onClickEmailOption,
128
- EmailOutlineIcon("black")
129
- )}
130
- ${this.renderListElement(
131
- this.hasCallUsEnabled || this.hasTextUsEnabled,
132
- this.onClickPhoneOption,
133
- PhoneOutlineIcon("black")
134
- )}
135
- ${this.renderListElement(
136
- this.hasSSTEnabled,
137
- this.onClickSSTOption,
138
- BookTourOutlineIcon("black")
139
- )}
140
- ${this.renderListElement(
141
- this.hasChatEnabled && !this.hideChat, // hide chat if under talkjs popup
142
- this.onChatTapped,
143
- ChatOutlineIcon("black")
144
- )}
145
- ${!this.isMobileDesign && !this.hideChat
146
- ? html`
147
- <li>
148
- <minimize-expand-button
149
- .onClick=${this.onClickMinimize}
150
- .primaryColor=${this.primaryColor}
151
- .toExpand=${true}
152
- ></minimize-expand-button>
153
- </li>
154
- `
155
- : ""}
156
- </ul>
157
- </div>`;
158
- }
159
- }