@meetelise/chat 1.43.8 → 1.43.9
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/dist/src/WebComponent/pubnub-chat.d.ts +2 -2
- package/dist/src/disclaimers.d.ts +2 -1
- package/dist/src/fetchBuildingWebchatView.d.ts +1 -0
- package/package.json +1 -1
- package/public/dist/index.js +209 -200
- package/src/WebComponent/leasing-chat-styles.ts +7 -0
- package/src/WebComponent/pubnub-chat.ts +4 -2
- package/src/disclaimers.ts +10 -2
- package/src/fetchBuildingWebchatView.ts +1 -0
|
@@ -2,7 +2,6 @@ import { html, LitElement, TemplateResult } from "lit";
|
|
|
2
2
|
import { customElement, property, query, state } from "lit/decorators.js";
|
|
3
3
|
import { classMap } from "lit/directives/class-map.js";
|
|
4
4
|
import { styleMap } from "lit/directives/style-map.js";
|
|
5
|
-
import { Building } from "../fetchBuildingInfo";
|
|
6
5
|
import MyPubnub, {
|
|
7
6
|
SimpleMessageTypes,
|
|
8
7
|
SimpleChatMessage,
|
|
@@ -36,6 +35,7 @@ import {
|
|
|
36
35
|
CURRENT_CONSENT_ID,
|
|
37
36
|
getConsentPreChatDisclaimer,
|
|
38
37
|
} from "../disclaimers";
|
|
38
|
+
import { BuildingWebchatView } from "../fetchBuildingWebchatView";
|
|
39
39
|
|
|
40
40
|
@customElement("pubnub-chat")
|
|
41
41
|
export class PubnubChat extends LitElement {
|
|
@@ -81,7 +81,7 @@ export class PubnubChat extends LitElement {
|
|
|
81
81
|
widgetType: WidgetType = WidgetType.Default;
|
|
82
82
|
|
|
83
83
|
@property({ attribute: true })
|
|
84
|
-
building:
|
|
84
|
+
building: BuildingWebchatView | undefined;
|
|
85
85
|
|
|
86
86
|
@property({ attribute: true })
|
|
87
87
|
primaryColor: string = defaultPrimaryColor;
|
|
@@ -640,6 +640,8 @@ export class PubnubChat extends LitElement {
|
|
|
640
640
|
orgSlug: this.orgSlug ?? "",
|
|
641
641
|
buildingState: this.building?.state ?? null,
|
|
642
642
|
type: "leasing",
|
|
643
|
+
customAdditionalDisclaimer:
|
|
644
|
+
this.building?.customAdditionalDisclaimer,
|
|
643
645
|
})}
|
|
644
646
|
${this.building.welcomeMessage
|
|
645
647
|
? html` <li
|
package/src/disclaimers.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { html, TemplateResult } from "lit";
|
|
2
2
|
import { styleMap } from "lit/directives/style-map.js";
|
|
3
|
+
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
3
4
|
import { CheckboxEmpty } from "./svgIcons";
|
|
4
5
|
import { HeyThereEmoji } from "./WebComponent/icons/HeyThereEmojiIcon";
|
|
5
6
|
|
|
@@ -221,11 +222,16 @@ export const inChatThreadDisclaimer = ({
|
|
|
221
222
|
orgSlug,
|
|
222
223
|
buildingState,
|
|
223
224
|
type,
|
|
225
|
+
customAdditionalDisclaimer,
|
|
224
226
|
}: {
|
|
225
227
|
orgSlug: string;
|
|
226
228
|
buildingState: string | null;
|
|
227
229
|
type: "healthcare" | "utilities" | "leasing";
|
|
230
|
+
customAdditionalDisclaimer?: string | null;
|
|
228
231
|
}): TemplateResult => {
|
|
232
|
+
const safeAdditionalDisclaimer = customAdditionalDisclaimer
|
|
233
|
+
? html`<br />${unsafeHTML(customAdditionalDisclaimer)}`
|
|
234
|
+
: html``;
|
|
229
235
|
if (type === "utilities") {
|
|
230
236
|
return html` <p class="utilities-disclaimer-inner">
|
|
231
237
|
By interacting with this system, you consent to
|
|
@@ -268,7 +274,7 @@ export const inChatThreadDisclaimer = ({
|
|
|
268
274
|
}
|
|
269
275
|
if (buildingState && GENERATIVE_AI_DISCLAIMER_STATES.includes(buildingState.toUpperCase())) {
|
|
270
276
|
return html`
|
|
271
|
-
<li class="
|
|
277
|
+
<li class="disclaimer-container disclaimer-message">
|
|
272
278
|
<p class="disclaimer-inner">
|
|
273
279
|
By interacting with this system, you consent to
|
|
274
280
|
<a
|
|
@@ -280,13 +286,14 @@ export const inChatThreadDisclaimer = ({
|
|
|
280
286
|
</a>
|
|
281
287
|
and to interacting with generative AI or a human & having your
|
|
282
288
|
conversation recorded and used by a third party.
|
|
289
|
+
${safeAdditionalDisclaimer}
|
|
283
290
|
</p>
|
|
284
291
|
</li>
|
|
285
292
|
`;
|
|
286
293
|
}
|
|
287
294
|
|
|
288
295
|
return html`
|
|
289
|
-
<li class="
|
|
296
|
+
<li class="disclaimer-container disclaimer-message">
|
|
290
297
|
<p class="disclaimer-inner">
|
|
291
298
|
By interacting with this system, you consent to
|
|
292
299
|
<a
|
|
@@ -298,6 +305,7 @@ export const inChatThreadDisclaimer = ({
|
|
|
298
305
|
</a>
|
|
299
306
|
, including being contacted by AI or a human & having your
|
|
300
307
|
conversation recorded and used by a third party.
|
|
308
|
+
${safeAdditionalDisclaimer}
|
|
301
309
|
</p>
|
|
302
310
|
</li>
|
|
303
311
|
`;
|
|
@@ -143,6 +143,7 @@ export interface BuildingWebchatView {
|
|
|
143
143
|
featureFlagWebchatUseDniPhoneNumberBySource: boolean;
|
|
144
144
|
featureFlagInsertDniIntoWebsite: boolean;
|
|
145
145
|
featureFlagWebchatReplaceAnyScheduleTourCtaWebsite: boolean;
|
|
146
|
+
customAdditionalDisclaimer: string | null;
|
|
146
147
|
}
|
|
147
148
|
|
|
148
149
|
/**
|