You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@salesforcedevs/docs-components

Package Overview
Dependencies
Maintainers
17
Versions
795
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@salesforcedevs/docs-components - npm Package Compare versions

Comparing version

to
0.0.18-chat

src/modules/doc/chat/README.md

2

package.json
{
"name": "@salesforcedevs/docs-components",
"version": "0.0.17-chat",
"version": "0.0.18-chat",
"description": "Docs Lightning web components for DSC",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -38,2 +38,11 @@ import { LightningElement, api, track } from "lwc";

@api
get isOpen() {
return this._isOpen;
}
set isOpen(value) {
this._isOpen = normalizeBoolean(value);
}
@track messages: ChatMessage[] = [];

@@ -45,2 +54,3 @@ @track currentMessage: string = "";

private _showTimestamp: boolean = false;
private _isOpen: boolean = false;
private messageIdCounter: number = 0;

@@ -56,6 +66,11 @@

"chat-container",
this.disabled && "chat-container--disabled"
this.disabled && "chat-container--disabled",
this.isOpen && "chat-container--open"
);
}
get showTriggerButton() {
return !this.isOpen;
}
get messagesWithTyping() {

@@ -166,2 +181,38 @@ const messages = [...this.messages];

}
handleCloseClick() {
this.isOpen = false;
// Dispatch custom event to notify parent components
this.dispatchEvent(new CustomEvent('chatclosed', {
detail: { closed: true }
}));
}
handleOpenClick() {
this.isOpen = true;
// Dispatch custom event to notify parent components
this.dispatchEvent(new CustomEvent('chatopened', {
detail: { opened: true }
}));
}
openChat() {
this.isOpen = true;
// Dispatch custom event to notify parent components
this.dispatchEvent(new CustomEvent('chatopened', {
detail: { opened: true }
}));
}
closeChat() {
this.isOpen = false;
// Dispatch custom event to notify parent components
this.dispatchEvent(new CustomEvent('chatclosed', {
detail: { closed: true }
}));
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet