isometrik-plugin-chat-sdk 2.0.7 → 2.0.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/cjs/attachment-preview_22.cjs.entry.js +46 -15
- package/dist/cjs/attachment-preview_22.cjs.entry.js.map +1 -1
- package/dist/cjs/login-page_3.cjs.entry.js +17 -2
- package/dist/cjs/login-page_3.cjs.entry.js.map +1 -1
- package/dist/cjs/member-add.cjs.entry.js +1 -1
- package/dist/cjs/reaction-container.cjs.entry.js +1 -1
- package/dist/cjs/toast-75ef0607.js +159 -0
- package/dist/cjs/toast-75ef0607.js.map +1 -0
- package/dist/cjs/toast-notification.cjs.entry.js +21 -15
- package/dist/cjs/toast-notification.cjs.entry.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/Header/WebChatHeader.js +21 -3
- package/dist/collection/components/ChatUIComponent/Header/WebChatHeader.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js +14 -11
- package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/contact-info/contact-info.js +10 -1
- package/dist/collection/components/ChatUIComponent/shared/contact-info/contact-info.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/toast-notification/toast-notification.js +32 -26
- package/dist/collection/components/ChatUIComponent/shared/toast-notification/toast-notification.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/mqtt-host.js +16 -1
- package/dist/collection/components/my-component/web-chat/mqtt-host.js.map +1 -1
- package/dist/collection/lib/friendly-toast-message.js +38 -0
- package/dist/collection/lib/friendly-toast-message.js.map +1 -0
- package/dist/collection/lib/toast.js +76 -21
- package/dist/collection/lib/toast.js.map +1 -1
- package/dist/components/WebChat.js +16 -1
- package/dist/components/WebChat.js.map +1 -1
- package/dist/components/WebChatBody.js +14 -11
- package/dist/components/WebChatBody.js.map +1 -1
- package/dist/components/WebChatHeader.js +21 -3
- package/dist/components/WebChatHeader.js.map +1 -1
- package/dist/components/contact-info2.js +11 -1
- package/dist/components/contact-info2.js.map +1 -1
- package/dist/components/toast-notification.js +21 -15
- package/dist/components/toast-notification.js.map +1 -1
- package/dist/components/toast.js +112 -21
- package/dist/components/toast.js.map +1 -1
- package/dist/esm/attachment-preview_22.entry.js +47 -16
- package/dist/esm/attachment-preview_22.entry.js.map +1 -1
- package/dist/esm/login-page_3.entry.js +17 -2
- package/dist/esm/login-page_3.entry.js.map +1 -1
- package/dist/esm/member-add.entry.js +1 -1
- package/dist/esm/reaction-container.entry.js +1 -1
- package/dist/esm/toast-45ac7913.js +157 -0
- package/dist/esm/toast-45ac7913.js.map +1 -0
- package/dist/esm/toast-notification.entry.js +21 -15
- package/dist/esm/toast-notification.entry.js.map +1 -1
- package/dist/isometrik-webchat/isometrik-webchat.esm.js +1 -1
- package/dist/isometrik-webchat/p-0c06a021.js +2 -0
- package/dist/isometrik-webchat/p-0c06a021.js.map +1 -0
- package/dist/isometrik-webchat/{p-76341adb.entry.js → p-6024bf2a.entry.js} +2 -2
- package/dist/isometrik-webchat/p-63ff4eea.entry.js +2 -0
- package/dist/isometrik-webchat/p-63ff4eea.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-9f036163.entry.js +2 -0
- package/dist/isometrik-webchat/p-9f036163.entry.js.map +1 -0
- package/dist/isometrik-webchat/{p-2195b0c0.entry.js → p-ba6de4e2.entry.js} +2 -2
- package/dist/isometrik-webchat/p-d6fd2dd7.entry.js +2 -0
- package/dist/isometrik-webchat/p-d6fd2dd7.entry.js.map +1 -0
- package/dist/types/components/ChatUIComponent/Header/WebChatHeader.d.ts +1 -0
- package/dist/types/components/ChatUIComponent/shared/contact-info/contact-info.d.ts +1 -0
- package/dist/types/lib/friendly-toast-message.d.ts +5 -0
- package/dist/types/lib/toast.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/toast-f810e550.js +0 -68
- package/dist/cjs/toast-f810e550.js.map +0 -1
- package/dist/esm/toast-533dd183.js +0 -66
- package/dist/esm/toast-533dd183.js.map +0 -1
- package/dist/isometrik-webchat/p-4cb54460.js +0 -2
- package/dist/isometrik-webchat/p-4cb54460.js.map +0 -1
- package/dist/isometrik-webchat/p-84424caa.entry.js +0 -2
- package/dist/isometrik-webchat/p-84424caa.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-e1d632b0.entry.js +0 -2
- package/dist/isometrik-webchat/p-e1d632b0.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-ff023d39.entry.js +0 -2
- package/dist/isometrik-webchat/p-ff023d39.entry.js.map +0 -1
- /package/dist/isometrik-webchat/{p-76341adb.entry.js.map → p-6024bf2a.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-2195b0c0.entry.js.map → p-ba6de4e2.entry.js.map} +0 -0
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-f624fc47.js');
|
|
6
6
|
const groupMembers = require('./group-members-1205fc4c.js');
|
|
7
7
|
const groupcast = require('./groupcast-c93d4a7d.js');
|
|
8
|
-
const toast = require('./toast-
|
|
8
|
+
const toast = require('./toast-75ef0607.js');
|
|
9
9
|
const drawer = require('./drawer-960b3f5d.js');
|
|
10
10
|
const chatAssets = require('./chat-assets-686620e7.js');
|
|
11
11
|
require('./index.m-ff115b26.js');
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-f624fc47.js');
|
|
6
6
|
const messageReaction = require('./message-reaction-8f93a048.js');
|
|
7
|
-
const toast = require('./toast-
|
|
7
|
+
const toast = require('./toast-75ef0607.js');
|
|
8
8
|
require('./index.m-ff115b26.js');
|
|
9
9
|
require('./index-66f98408.js');
|
|
10
10
|
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-66f98408.js');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Map raw API / SDK errors to short user-facing copy.
|
|
7
|
+
* Never surface HTTP status phrases like "Unprocessable entity".
|
|
8
|
+
*/
|
|
9
|
+
function friendlyToastMessage(raw, fallback = 'Something went wrong. Try again.') {
|
|
10
|
+
var _a, _b;
|
|
11
|
+
const s = String((_b = (_a = raw === null || raw === void 0 ? void 0 : raw.message) !== null && _a !== void 0 ? _a : raw) !== null && _b !== void 0 ? _b : '')
|
|
12
|
+
.trim()
|
|
13
|
+
.replace(/\s+/g, ' ');
|
|
14
|
+
if (!s)
|
|
15
|
+
return fallback;
|
|
16
|
+
const lower = s.toLowerCase();
|
|
17
|
+
if (lower.includes('unprocessable') ||
|
|
18
|
+
lower.includes('422') ||
|
|
19
|
+
lower === 'bad request' ||
|
|
20
|
+
lower.includes('invalid payload')) {
|
|
21
|
+
return "Couldn't send that message. Please try again.";
|
|
22
|
+
}
|
|
23
|
+
if (lower.includes('network') ||
|
|
24
|
+
lower.includes('failed to fetch') ||
|
|
25
|
+
lower.includes('timeout')) {
|
|
26
|
+
return 'Network issue. Check your connection and try again.';
|
|
27
|
+
}
|
|
28
|
+
if (lower.includes('unauthorized') ||
|
|
29
|
+
lower.includes('401') ||
|
|
30
|
+
lower.includes('forbidden') ||
|
|
31
|
+
lower.includes('403')) {
|
|
32
|
+
return 'Session expired. Please refresh and try again.';
|
|
33
|
+
}
|
|
34
|
+
if (lower.includes('not found') || lower.includes('404')) {
|
|
35
|
+
return 'That chat is no longer available.';
|
|
36
|
+
}
|
|
37
|
+
// Keep short human messages; truncate giant stack/JSON blobs.
|
|
38
|
+
if (s.length > 120 || s.startsWith('{') || s.includes('\n'))
|
|
39
|
+
return fallback;
|
|
40
|
+
return s;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
class ToastHelper {
|
|
44
|
+
constructor() {
|
|
45
|
+
this.container = document.createElement('div');
|
|
46
|
+
this.container.id = 'isometrik-toast-root';
|
|
47
|
+
Object.assign(this.container.style, {
|
|
48
|
+
position: 'fixed',
|
|
49
|
+
zIndex: '100000',
|
|
50
|
+
display: 'flex',
|
|
51
|
+
flexDirection: 'column',
|
|
52
|
+
gap: '8px',
|
|
53
|
+
pointerEvents: 'none',
|
|
54
|
+
maxWidth: 'min(22rem, calc(100vw - 2rem))',
|
|
55
|
+
});
|
|
56
|
+
document.body.appendChild(this.container);
|
|
57
|
+
}
|
|
58
|
+
static getInstance() {
|
|
59
|
+
if (!ToastHelper.instance)
|
|
60
|
+
ToastHelper.instance = new ToastHelper();
|
|
61
|
+
return ToastHelper.instance;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Solid fallbacks — host themes often leave --danger / --bg-primary unset
|
|
65
|
+
* or map --bg-primary to a light surface (white-on-white toast).
|
|
66
|
+
*/
|
|
67
|
+
getTypeStyles(type = 'info') {
|
|
68
|
+
const styles = {
|
|
69
|
+
success: {
|
|
70
|
+
bgColor: 'var(--success, #15803d)',
|
|
71
|
+
color: '#ffffff',
|
|
72
|
+
progressBarColor: 'rgba(255,255,255,0.55)',
|
|
73
|
+
borderColor: 'transparent',
|
|
74
|
+
},
|
|
75
|
+
error: {
|
|
76
|
+
bgColor: 'var(--danger, #b91c1c)',
|
|
77
|
+
color: '#ffffff',
|
|
78
|
+
progressBarColor: 'rgba(255,255,255,0.55)',
|
|
79
|
+
borderColor: 'transparent',
|
|
80
|
+
},
|
|
81
|
+
warning: {
|
|
82
|
+
bgColor: 'var(--text-warning-color, #c2410c)',
|
|
83
|
+
color: '#ffffff',
|
|
84
|
+
progressBarColor: 'rgba(255,255,255,0.55)',
|
|
85
|
+
borderColor: 'transparent',
|
|
86
|
+
},
|
|
87
|
+
info: {
|
|
88
|
+
bgColor: 'var(--hoa-chat-ink, #18181b)',
|
|
89
|
+
color: '#ffffff',
|
|
90
|
+
progressBarColor: 'rgba(255,255,255,0.55)',
|
|
91
|
+
borderColor: 'transparent',
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
return styles[type] || styles.info;
|
|
95
|
+
}
|
|
96
|
+
setPosition(position = 'top-right') {
|
|
97
|
+
// Clear previous transform so center variants don't stick.
|
|
98
|
+
this.container.style.transform = '';
|
|
99
|
+
const positions = {
|
|
100
|
+
'top-right': { top: '1rem', right: '1rem', bottom: 'auto', left: 'auto' },
|
|
101
|
+
'top-left': { top: '1rem', right: 'auto', bottom: 'auto', left: '1rem' },
|
|
102
|
+
// Sit above typical chat composer (~5.5rem).
|
|
103
|
+
'bottom-right': { top: 'auto', right: '1rem', bottom: '5.5rem', left: 'auto' },
|
|
104
|
+
'bottom-left': { top: 'auto', right: 'auto', bottom: '5.5rem', left: '1rem' },
|
|
105
|
+
'top-center': {
|
|
106
|
+
top: '1rem',
|
|
107
|
+
right: 'auto',
|
|
108
|
+
bottom: 'auto',
|
|
109
|
+
left: '50%',
|
|
110
|
+
transform: 'translateX(-50%)',
|
|
111
|
+
},
|
|
112
|
+
'bottom-center': {
|
|
113
|
+
top: 'auto',
|
|
114
|
+
right: 'auto',
|
|
115
|
+
bottom: '5.5rem',
|
|
116
|
+
left: '50%',
|
|
117
|
+
transform: 'translateX(-50%)',
|
|
118
|
+
},
|
|
119
|
+
};
|
|
120
|
+
Object.assign(this.container.style, positions[position] || positions['top-right']);
|
|
121
|
+
}
|
|
122
|
+
show(options) {
|
|
123
|
+
const { duration = 3500, type = 'info', position = 'top-right' } = options;
|
|
124
|
+
const message = friendlyToastMessage(options.message);
|
|
125
|
+
this.setPosition(position);
|
|
126
|
+
const toast = document.createElement('toast-notification');
|
|
127
|
+
const styles = this.getTypeStyles(type);
|
|
128
|
+
toast.bgColor = styles.bgColor;
|
|
129
|
+
toast.color = styles.color;
|
|
130
|
+
toast.progressBarColor = styles.progressBarColor;
|
|
131
|
+
toast.progressBarBg = 'transparent';
|
|
132
|
+
toast.borderColor = styles.borderColor;
|
|
133
|
+
toast.borderWidth = '0';
|
|
134
|
+
toast.toastMessage = message;
|
|
135
|
+
toast.padding = '12px 14px';
|
|
136
|
+
toast.borderRadius = '0.5rem';
|
|
137
|
+
toast.width = '100%';
|
|
138
|
+
toast.fontWeight = '600';
|
|
139
|
+
toast.style.pointerEvents = 'auto';
|
|
140
|
+
toast.style.display = 'block';
|
|
141
|
+
toast.style.boxShadow = '0 8px 24px rgba(24, 24, 27, 0.18)';
|
|
142
|
+
this.container.appendChild(toast);
|
|
143
|
+
setTimeout(() => toast.remove(), duration);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
const showToast = (options) => {
|
|
147
|
+
var _a;
|
|
148
|
+
const custom = index.createCustomPartElement('toast', Object.assign(Object.assign({}, options), { message: friendlyToastMessage(options.message) }));
|
|
149
|
+
if (custom) {
|
|
150
|
+
document.body.appendChild(custom);
|
|
151
|
+
setTimeout(() => custom.remove(), (_a = options.duration) !== null && _a !== void 0 ? _a : 3500);
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
ToastHelper.getInstance().show(options);
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
exports.showToast = showToast;
|
|
158
|
+
|
|
159
|
+
//# sourceMappingURL=toast-75ef0607.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"toast-75ef0607.js","mappings":";;;;AAAA;;;;SAIgB,oBAAoB,CAClC,GAAY,EACZ,QAAQ,GAAG,kCAAkC;;IAE7C,MAAM,CAAC,GAAG,MAAM,CAAC,MAAA,MAAC,GAA6B,aAA7B,GAAG,uBAAH,GAAG,CAA4B,OAAO,mCAAI,GAAG,mCAAI,EAAE,CAAC;SACnE,IAAI,EAAE;SACN,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACxB,IAAI,CAAC,CAAC;QAAE,OAAO,QAAQ,CAAC;IAExB,MAAM,KAAK,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;IAC9B,IACE,KAAK,CAAC,QAAQ,CAAC,eAAe,CAAC;QAC/B,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC;QACrB,KAAK,KAAK,aAAa;QACvB,KAAK,CA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DK errors to short user-facing copy.\n * Never surface HTTP status phrases like \"Unprocessable entity\".\n */\nexport function friendlyToastMessage(\n raw: unknown,\n fallback = 'Something went wrong. Try again.',\n): string {\n const s = String((raw as { message?: unknown })?.message ?? raw ?? '')\n .trim()\n .replace(/\\s+/g, ' ');\n if (!s) return fallback;\n\n const lower = s.toLowerCase();\n if (\n lower.includes('unprocessable') ||\n lower.includes('422') ||\n lower === 'bad request' ||\n lower.includes('invalid payload')\n ) {\n return \"Couldn't send that message. Please try again.\";\n }\n if (\n lower.includes('network') ||\n lower.includes('failed to fetch') ||\n lower.includes('timeout')\n ) {\n return 'Network issue. Check your connection and try again.';\n }\n if (\n lower.includes('unauthorized') ||\n lower.includes('401') ||\n lower.includes('forbidden') ||\n lower.includes('403')\n ) {\n return 'Session expired. Please refresh and try again.';\n }\n if (lower.includes('not found') || lower.includes('404')) {\n return 'That chat is no longer available.';\n }\n // Keep short human messages; truncate giant stack/JSON blobs.\n if (s.length > 120 || s.startsWith('{') || s.includes('\\n')) return fallback;\n return s;\n}\n","import '../components/ChatUIComponent/shared/toast-notification/toast-notification';\nimport { createCustomPartElement } from './custom-ui';\nimport { friendlyToastMessage } from './friendly-toast-message';\n\nexport { friendlyToastMessage } from './friendly-toast-message';\n\nexport interface ToastOptions {\n message: string;\n duration?: number;\n type?: 'success' | 'error' | 'warning' | 'info';\n position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'top-center' | 'bottom-center';\n}\n\nclass ToastHelper {\n private static instance: ToastHelper;\n private container: HTMLDivElement;\n\n private constructor() {\n this.container = document.createElement('div');\n this.container.id = 'isometrik-toast-root';\n Object.assign(this.container.style, {\n position: 'fixed',\n zIndex: '100000',\n display: 'flex',\n flexDirection: 'column',\n gap: '8px',\n pointerEvents: 'none',\n maxWidth: 'min(22rem, calc(100vw - 2rem))',\n } as CSSStyleDeclaration);\n document.body.appendChild(this.container);\n }\n\n public static getInstance(): ToastHelper {\n if (!ToastHelper.instance) ToastHelper.instance = new ToastHelper();\n return ToastHelper.instance;\n }\n\n /**\n * Solid fallbacks — host themes often leave --danger / --bg-primary unset\n * or map --bg-primary to a light surface (white-on-white toast).\n */\n private getTypeStyles(type: string = 'info') {\n const styles: Record<\n string,\n { bgColor: string; color: string; progressBarColor: string; borderColor: string }\n > = {\n success: {\n bgColor: 'var(--success, #15803d)',\n color: '#ffffff',\n progressBarColor: 'rgba(255,255,255,0.55)',\n borderColor: 'transparent',\n },\n error: {\n bgColor: 'var(--danger, #b91c1c)',\n color: '#ffffff',\n progressBarColor: 'rgba(255,255,255,0.55)',\n borderColor: 'transparent',\n },\n warning: {\n bgColor: 'var(--text-warning-color, #c2410c)',\n color: '#ffffff',\n progressBarColor: 'rgba(255,255,255,0.55)',\n borderColor: 'transparent',\n },\n info: {\n bgColor: 'var(--hoa-chat-ink, #18181b)',\n color: '#ffffff',\n progressBarColor: 'rgba(255,255,255,0.55)',\n borderColor: 'transparent',\n },\n };\n return styles[type] || styles.info;\n }\n\n private setPosition(position: string = 'top-right') {\n // Clear previous transform so center variants don't stick.\n this.container.style.transform = '';\n const positions: Record<string, Partial<CSSStyleDeclaration>> = {\n 'top-right': { top: '1rem', right: '1rem', bottom: 'auto', left: 'auto' },\n 'top-left': { top: '1rem', right: 'auto', bottom: 'auto', left: '1rem' },\n // Sit above typical chat composer (~5.5rem).\n 'bottom-right': { top: 'auto', right: '1rem', bottom: '5.5rem', left: 'auto' },\n 'bottom-left': { top: 'auto', right: 'auto', bottom: '5.5rem', left: '1rem' },\n 'top-center': {\n top: '1rem',\n right: 'auto',\n bottom: 'auto',\n left: '50%',\n transform: 'translateX(-50%)',\n },\n 'bottom-center': {\n top: 'auto',\n right: 'auto',\n bottom: '5.5rem',\n left: '50%',\n transform: 'translateX(-50%)',\n },\n };\n Object.assign(this.container.style, positions[position] || positions['top-right']);\n }\n\n public show(options: ToastOptions): void {\n const { duration = 3500, type = 'info', position = 'top-right' } = options;\n const message = friendlyToastMessage(options.message);\n this.setPosition(position);\n const toast = document.createElement('toast-notification') as any;\n const styles = this.getTypeStyles(type);\n toast.bgColor = styles.bgColor;\n toast.color = styles.color;\n toast.progressBarColor = styles.progressBarColor;\n toast.progressBarBg = 'transparent';\n toast.borderColor = styles.borderColor;\n toast.borderWidth = '0';\n toast.toastMessage = message;\n toast.padding = '12px 14px';\n toast.borderRadius = '0.5rem';\n toast.width = '100%';\n toast.fontWeight = '600';\n toast.style.pointerEvents = 'auto';\n toast.style.display = 'block';\n toast.style.boxShadow = '0 8px 24px rgba(24, 24, 27, 0.18)';\n this.container.appendChild(toast);\n setTimeout(() => toast.remove(), duration);\n }\n}\n\nexport const showToast = (options: ToastOptions): void => {\n const custom = createCustomPartElement('toast', {\n ...options,\n message: friendlyToastMessage(options.message),\n } as any);\n if (custom) {\n document.body.appendChild(custom);\n setTimeout(() => custom.remove(), options.duration ?? 3500);\n return;\n }\n ToastHelper.getInstance().show(options);\n};\n"],"version":3}
|
|
@@ -7,36 +7,42 @@ const index = require('./index-f624fc47.js');
|
|
|
7
7
|
const ToastNotification = class {
|
|
8
8
|
constructor(hostRef) {
|
|
9
9
|
index.registerInstance(this, hostRef);
|
|
10
|
-
this.bgColor = '
|
|
10
|
+
this.bgColor = '#18181b';
|
|
11
11
|
this.width = '200px';
|
|
12
12
|
this.height = 'auto';
|
|
13
|
-
this.borderWidth = '
|
|
14
|
-
this.borderColor = '
|
|
15
|
-
this.color = '
|
|
16
|
-
this.fontSize = '
|
|
17
|
-
this.borderRadius = '
|
|
18
|
-
this.fontWeight = '
|
|
19
|
-
this.progressBarBg = '
|
|
20
|
-
this.progressBarHeight = '
|
|
21
|
-
this.progressBarColor = '
|
|
22
|
-
this.progressBarBorderRadius = '
|
|
13
|
+
this.borderWidth = '0';
|
|
14
|
+
this.borderColor = 'transparent';
|
|
15
|
+
this.color = '#ffffff';
|
|
16
|
+
this.fontSize = '0.875rem';
|
|
17
|
+
this.borderRadius = '0.5rem';
|
|
18
|
+
this.fontWeight = '600';
|
|
19
|
+
this.progressBarBg = 'transparent';
|
|
20
|
+
this.progressBarHeight = '3px';
|
|
21
|
+
this.progressBarColor = 'rgba(255,255,255,0.55)';
|
|
22
|
+
this.progressBarBorderRadius = '0';
|
|
23
23
|
this.toastMessage = 'Default message';
|
|
24
24
|
this.padding = undefined;
|
|
25
25
|
}
|
|
26
26
|
render() {
|
|
27
|
-
|
|
27
|
+
const borderW = this.borderWidth || '0';
|
|
28
|
+
const borderC = this.borderColor || 'transparent';
|
|
29
|
+
return (index.h("div", { key: '26860c462525339767af80e40eb7f81cbd2100fb', class: "toast-container", role: "status", style: {
|
|
28
30
|
backgroundColor: this.bgColor,
|
|
29
31
|
color: this.color,
|
|
30
32
|
width: this.width,
|
|
31
33
|
height: this.height,
|
|
32
|
-
border: `${
|
|
34
|
+
border: borderW === '0' || borderW === '0px' ? 'none' : `${borderW} solid ${borderC}`,
|
|
33
35
|
borderRadius: this.borderRadius,
|
|
34
36
|
fontSize: this.fontSize,
|
|
35
37
|
fontWeight: this.fontWeight,
|
|
36
|
-
} }, index.h("div", { key: '
|
|
38
|
+
} }, index.h("div", { key: '894c28f99edda42212508bd4035b99bd125d1681', class: "toast-message", style: { padding: this.padding } }, this.toastMessage), index.h("div", { key: 'a40e5a0d3e8746efedbd175a555deb4a2fdaea1b', class: "progress-container", style: {
|
|
39
|
+
height: this.progressBarHeight,
|
|
40
|
+
borderRadius: this.progressBarBorderRadius,
|
|
41
|
+
background: this.progressBarBg,
|
|
42
|
+
} }, index.h("div", { key: 'f3248675f982049e927d41bb6c899050695f02e4', class: "progress-bar", style: { backgroundColor: this.progressBarColor } }))));
|
|
37
43
|
}
|
|
38
44
|
};
|
|
39
|
-
ToastNotification.style = ":host { display: block; }\n .toast-container { box-shadow: 0
|
|
45
|
+
ToastNotification.style = ":host { display: block; }\n .toast-container {\n overflow: hidden;\n box-shadow: 0 8px 24px rgba(24, 24, 27, 0.18);\n letter-spacing: -0.01em;\n line-height: 1.35;\n }\n .toast-message { padding: 8px; word-break: break-word; }\n .progress-container { width: 100%; overflow: hidden; position: relative; }\n .progress-bar {\n height: 100%; width: 100%; transform-origin: left;\n animation: progress 3.5s linear forwards;\n }\n @keyframes progress {\n from { width: 100%; }\n to { width: 0%; }\n }";
|
|
40
46
|
|
|
41
47
|
exports.toast_notification = ToastNotification;
|
|
42
48
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"toast-notification.entry.cjs.js","mappings":";;;;;;
|
|
1
|
+
{"file":"toast-notification.entry.cjs.js","mappings":";;;;;;MAyBa,iBAAiB;;;uBACF,SAAS;qBACX,OAAO;sBACN,MAAM;2BACD,GAAG;2BACH,aAAa;qBACnB,SAAS;wBACN,UAAU;4BACN,QAAQ;0BACV,KAAK;6BACF,aAAa;iCACT,KAAK;gCACN,wBAAwB;uCACjB,GAAG;4BACd,iBAAiB;;;IAGhD,MAAM;QACJ,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,IAAI,GAAG,CAAC;QACxC,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,IAAI,aAAa,CAAC;QAClD,QACEA,kEACE,KAAK,EAAC,iBAAiB,EACvB,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE;gBACL,eAAe,EAAE,IAAI,CAAC,OAAO;gBAC7B,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,MAAM,EAAE,OAAO,KAAK,GAAG,IAAI,OAAO,KAAK,KAAK,GAAG,MAAM,GAAG,GAAG,OAAO,UAAU,OAAO,EAAE;gBACrF,YAAY,EAAE,IAAI,CAAC,YAAY;gBAC/B,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,UAAU,EAAE,IAAI,CAAC,UAAU;aAC5B,IAEDA,kEAAK,KAAK,EAAC,eAAe,EAAC,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,IACxD,IAAI,CAAC,YAAY,CACd,EACNA,kEACE,KAAK,EAAC,oBAAoB,EAC1B,KAAK,EAAE;gBACL,MAAM,EAAE,IAAI,CAAC,iBAAiB;gBAC9B,YAAY,EAAE,IAAI,CAAC,uBAAuB;gBAC1C,UAAU,EAAE,IAAI,CAAC,aAAa;aAC/B,IAEDA,kEAAK,KAAK,EAAC,cAAc,EAAC,KAAK,EAAE,EAAE,eAAe,EAAE,IAAI,CAAC,gBAAgB,EAAE,GAAI,CAC3E,CACF,EACN;KACH;;;;;;","names":["h"],"sources":["src/components/ChatUIComponent/shared/toast-notification/toast-notification.tsx"],"sourcesContent":["import { Component, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'toast-notification',\n shadow: true,\n styles: `\n :host { display: block; }\n .toast-container {\n overflow: hidden;\n box-shadow: 0 8px 24px rgba(24, 24, 27, 0.18);\n letter-spacing: -0.01em;\n line-height: 1.35;\n }\n .toast-message { padding: 8px; word-break: break-word; }\n .progress-container { width: 100%; overflow: hidden; position: relative; }\n .progress-bar {\n height: 100%; width: 100%; transform-origin: left;\n animation: progress 3.5s linear forwards;\n }\n @keyframes progress {\n from { width: 100%; }\n to { width: 0%; }\n }\n `,\n})\nexport class ToastNotification {\n @Prop() bgColor: string = '#18181b';\n @Prop() width: string = '200px';\n @Prop() height: string = 'auto';\n @Prop() borderWidth: string = '0';\n @Prop() borderColor: string = 'transparent';\n @Prop() color: string = '#ffffff';\n @Prop() fontSize: string = '0.875rem';\n @Prop() borderRadius: string = '0.5rem';\n @Prop() fontWeight: string = '600';\n @Prop() progressBarBg: string = 'transparent';\n @Prop() progressBarHeight: string = '3px';\n @Prop() progressBarColor: string = 'rgba(255,255,255,0.55)';\n @Prop() progressBarBorderRadius: string = '0';\n @Prop() toastMessage: string = 'Default message';\n @Prop() padding: string;\n\n render() {\n const borderW = this.borderWidth || '0';\n const borderC = this.borderColor || 'transparent';\n return (\n <div\n class=\"toast-container\"\n role=\"status\"\n style={{\n backgroundColor: this.bgColor,\n color: this.color,\n width: this.width,\n height: this.height,\n border: borderW === '0' || borderW === '0px' ? 'none' : `${borderW} solid ${borderC}`,\n borderRadius: this.borderRadius,\n fontSize: this.fontSize,\n fontWeight: this.fontWeight,\n }}\n >\n <div class=\"toast-message\" style={{ padding: this.padding }}>\n {this.toastMessage}\n </div>\n <div\n class=\"progress-container\"\n style={{\n height: this.progressBarHeight,\n borderRadius: this.progressBarBorderRadius,\n background: this.progressBarBg,\n }}\n >\n <div class=\"progress-bar\" style={{ backgroundColor: this.progressBarColor }} />\n </div>\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -3,7 +3,7 @@ import "../shared/spinner-loader/spinner-loader";
|
|
|
3
3
|
import "../shared/profile-avatar/profile-avatar";
|
|
4
4
|
import { getFormattedTime } from "../../../lib/helpers";
|
|
5
5
|
import { conversationStore } from "../../../store/conversation";
|
|
6
|
-
import { CloseButton, Block_User, Three_Dots, Left_Arrow, Search, Clear_Chat, Add_User, Info, Logout } from "../../../constants/chat-assets";
|
|
6
|
+
import { CloseButton, Block_User, Three_Dots, Left_Arrow, Search, Clear_Chat, Delete, Add_User, Info, Logout } from "../../../constants/chat-assets";
|
|
7
7
|
import { drawerDialogService } from "../../../lib/drawer";
|
|
8
8
|
import { promptExitGroup } from "../../../lib/prompt-exit-group";
|
|
9
9
|
import { groupMembersStore } from "../../../store/group-members";
|
|
@@ -17,6 +17,24 @@ class WebChatHeader {
|
|
|
17
17
|
this.onConversationCleared();
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
|
+
this.deleteChat = () => {
|
|
21
|
+
this.menuOpen = false;
|
|
22
|
+
const conversationId = this.conversationId();
|
|
23
|
+
if (!conversationId)
|
|
24
|
+
return;
|
|
25
|
+
const name = this.title() || 'this chat';
|
|
26
|
+
drawerDialogService.openDialog('confirm-dialog', {
|
|
27
|
+
title: 'Delete chat',
|
|
28
|
+
description: `Are you sure you want to delete chat with ${name}?`,
|
|
29
|
+
handleConfirm: () => {
|
|
30
|
+
this.el.dispatchEvent(new CustomEvent('contact-action', {
|
|
31
|
+
bubbles: true,
|
|
32
|
+
composed: true,
|
|
33
|
+
detail: { action: 'delete-chat', conversationId },
|
|
34
|
+
}));
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
};
|
|
20
38
|
this.handleSearchInput = (searchText) => {
|
|
21
39
|
var _a;
|
|
22
40
|
(_a = this.onSearchHandler) === null || _a === void 0 ? void 0 : _a.call(this, searchText);
|
|
@@ -236,10 +254,10 @@ class WebChatHeader {
|
|
|
236
254
|
const groupcast = this.isGroupcast();
|
|
237
255
|
const isGroup = !!((_a = this.conversationDetails) === null || _a === void 0 ? void 0 : _a.isGroup) && !groupcast;
|
|
238
256
|
const showBlock = !groupcast && !((_b = this.conversationDetails) === null || _b === void 0 ? void 0 : _b.isGroup);
|
|
239
|
-
return (h(Fragment, { key: '
|
|
257
|
+
return (h(Fragment, { key: '7dc9c100c2cc052b961fdb0236f3d63e688bffef' }, h("div", { key: 'e69c6bd3d8cb3bece316ed7ba5f14bbc7b5ddd76', class: "head-container", style: {
|
|
240
258
|
backgroundColor: this.headerBgColor || undefined,
|
|
241
259
|
color: this.headerUsernameColor || undefined,
|
|
242
|
-
} }, h("div", { key: '
|
|
260
|
+
} }, h("div", { key: '1173e55f29d15c2350b03a54d0228bdebc677d51', class: "head-left" }, h("button", { key: '692dccf76fe4d36c308916d81b7a3389e47bf798', class: "back-button", type: "button", onClick: () => typeof this.onBackButtonClick === 'function' && this.onBackButtonClick(), "aria-label": "Back" }, h("img", { key: 'f8a8b07ca105e9863979362eab889c5e23352922', class: "theme-icon", src: Left_Arrow, alt: "" })), h("div", { key: 'c11d43e4fa2d86d8de96dc77b6192d0a2bf9dec0', class: "identity", onClick: this.handleTextClick }, h("profile-avatar", { key: 'e80c2aa7d3616f7c334d10021ebadf9ca32d9aef', src: this.avatarSrc(), name: this.title(), size: "var(--avatar-sm)", isGroup: this.avatarIsGroup() }), h("div", { key: '9ab9a076176a0479ef6c41e1f601f32a4acdde7c', class: "text-container" }, h("div", { key: 'f084abe95d6e178ffa88adb2ce9927e83f5b5414', class: "title" }, this.title()), h("div", { key: 'c59d4d4e7ac40c245494ad2020f40cb319fa5eb0', class: "subtitle", style: { color: this.headerLastSeenColor || undefined } }, this.subtitle(formattedLastSeen))))), h("div", { key: '8b36023afce02adeb5b730a6ca374ad2ccc05c65', class: "actions" }, !groupcast ? (h("button", { type: "button", class: "icon-btn", title: "Search in conversation", onClick: () => this.openSearch() }, h("img", { class: "theme-icon", src: Search, alt: "" }))) : null, h("div", { key: '02c33a403e1473bee5b18025dccb9897e1f2edf0', class: "more-wrap" }, h("button", { key: '0708283365c2edebd24af299c02d841fb47a8d62', type: "button", class: "icon-btn", title: "Menu", "aria-label": "Menu", "aria-haspopup": "menu", "aria-expanded": this.menuOpen ? 'true' : 'false', onClick: this.toggleMenu }, h("img", { key: '76da82722f5077a85423988ee223717b5cbce143', class: "theme-icon", src: Three_Dots, alt: "" })), this.menuOpen ? (h("div", { class: "more-menu", role: "menu" }, isGroup ? (h(Fragment, null, h("button", { type: "button", class: "more-item", role: "menuitem", onClick: this.openAddMember }, h("img", { class: "theme-icon", src: Add_User, alt: "" }), h("span", null, "Add member")), h("button", { type: "button", class: "more-item", role: "menuitem", onClick: this.openGroupInfo }, h("img", { class: "theme-icon", src: Info, alt: "" }), h("span", null, "Group info")))) : null, !groupcast ? (h("button", { type: "button", class: "more-item", role: "menuitem", onClick: () => this.openSearch() }, h("img", { class: "theme-icon", src: Search, alt: "" }), h("span", null, "Search"))) : null, h("button", { type: "button", class: "more-item", role: "menuitem", onClick: () => this.doCloseChat() }, h("img", { class: "theme-icon", src: CloseButton, alt: "" }), h("span", null, "Close chat")), !groupcast ? (h(Fragment, null, h("button", { type: "button", class: "more-item", role: "menuitem", onClick: this.handleClearChat }, h("img", { class: "theme-icon", src: Clear_Chat, alt: "" }), h("span", null, "Clear chat")), h("button", { type: "button", class: "more-item danger", role: "menuitem", onClick: this.deleteChat }, h("img", { class: "theme-icon", src: Delete, alt: "" }), h("span", null, "Delete chat")))) : null, isGroup ? (h(Fragment, null, h("div", { class: "more-divider" }), h("button", { type: "button", class: "more-item danger", role: "menuitem", onClick: this.exitGroup }, h("img", { class: "theme-icon", src: Logout, alt: "" }), h("span", null, "Exit group")))) : null, showBlock ? (h(Fragment, null, h("div", { class: "more-divider" }), h("button", { type: "button", class: "more-item danger", role: "menuitem", onClick: this.doBlock }, h("img", { class: "theme-icon", src: Block_User, alt: "" }), h("span", null, this.isBlocked ? 'Unblock Chat' : 'Block Chat')))) : null)) : null))), this.isLoading && (h("div", { key: '2c224ca39a8de2a2fb8c6e07191789eb2cb265ba', class: "loading-overlay" }, h("spinner-loader", { key: 'ee2338eec76f57045431a28c78f3c105def0da09', height: "30px", width: "30px", spinTime: "1s", spinnerPrimaryColor: "var(--bg-primary)", spinnerSecondaryColor: "var(--text-primary)", spinnerBorderWidth: "2px" })))));
|
|
243
261
|
}
|
|
244
262
|
static get is() { return "web-chat-header"; }
|
|
245
263
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebChatHeader.js","sourceRoot":"","sources":["../../../../src/components/ChatUIComponent/Header/WebChatHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACjH,OAAO,yCAAyC,CAAC;AACjD,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC7I,OA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F,CACF;YAEL,IAAI,CAAC,SAAS,IAAI,CACjB,4DAAK,KAAK,EAAC,iBAAiB;gBAC1B,uEACE,MAAM,EAAC,MAAM,EACb,KAAK,EAAC,MAAM,EACZ,QAAQ,EAAC,IAAI,EACb,mBAAmB,EAAC,mBAAmB,EACvC,qBAAqB,EAAC,qBAAqB,EAC3C,kBAAkB,EAAC,KAAK,GACxB,CACE,CACP,CACQ,CACZ,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AAED,OAAO,EAAE,aAAa,EAAE,CAAC","sourcesContent":["import { Component, h, Prop, Event, EventEmitter, State, Fragment, Element, Watch, Listen } from '@stencil/core';\nimport '../shared/spinner-loader/spinner-loader';\nimport '../shared/profile-avatar/profile-avatar';\nimport { ConversationDetails } from '../../../types/ConversationDetailsTypes';\nimport { getFormattedTime } from '../../../lib/helpers';\nimport { conversationStore } from '../../../store/conversation';\nimport { CloseButton, Block_User, Three_Dots, Left_Arrow, Search, Clear_Chat, Add_User, Info, Logout } from '../../../constants/chat-assets';\nimport { drawerDialogService } from '../../../lib/drawer';\nimport { promptExitGroup } from '../../../lib/prompt-exit-group';\nimport { groupMembersStore } from '../../../store/group-members';\n\n@Component({\n tag: 'web-chat-header',\n shadow: true,\n styles: `\n :host {\n display: block;\n width: var(--w-full);\n position: relative;\n z-index: 70;\n flex-shrink: 0;\n }\n .loading-overlay {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 10000;\n background-color: var(--overlay);\n height: var(--h-full);\n width: var(--w-full);\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .head-container {\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: 4rem;\n box-sizing: border-box;\n padding: 0 1.25rem;\n background: var(--bg-primary);\n color: var(--text-primary);\n border-bottom: 1px solid var(--border);\n position: relative;\n z-index: 10;\n flex-shrink: 0;\n }\n .head-left {\n display: flex;\n align-items: center;\n gap: var(--gap-12);\n min-width: 0;\n flex: 1;\n }\n .back-button {\n display: none;\n align-items: center;\n justify-content: center;\n border: none;\n background: transparent;\n cursor: pointer;\n padding: var(--space-8);\n border-radius: var(--rounded-full);\n flex-shrink: 0;\n }\n .back-button img {\n width: var(--icon-md);\n height: var(--icon-md);\n display: block;\n }\n .back-button:hover {\n background: var(--hover-overlay);\n }\n @media (max-width: 768px) {\n .back-button {\n display: flex;\n }\n }\n .identity {\n display: flex;\n align-items: center;\n gap: var(--gap-12);\n min-width: 0;\n cursor: pointer;\n }\n .text-container {\n display: flex;\n flex-direction: column;\n min-width: 0;\n }\n .title {\n font-size: var(--text-14);\n font-weight: 600;\n color: var(--text-primary);\n line-height: 1.25;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n .subtitle {\n font-size: var(--text-12);\n color: var(--text-secondary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n .actions {\n display: flex;\n align-items: center;\n gap: var(--gap-6);\n position: relative;\n flex-shrink: 0;\n }\n .icon-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--space-8);\n border: none;\n background: transparent;\n border-radius: var(--rounded-full);\n cursor: pointer;\n color: var(--icon);\n }\n .icon-btn:hover {\n background: var(--hover-overlay);\n color: var(--brand);\n }\n .icon-btn img {\n width: var(--icon-md);\n height: var(--icon-md);\n min-width: var(--icon-md);\n min-height: var(--icon-md);\n object-fit: contain;\n display: block;\n }\n .more-wrap {\n position: relative;\n }\n .more-menu {\n position: absolute;\n right: 0;\n top: 100%;\n margin-top: var(--gap-8);\n width: 12rem;\n background: var(--bg-primary);\n border-radius: var(--rounded-12);\n box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);\n border: 1px solid var(--border-subtle);\n padding: var(--gap-6) 0;\n z-index: 50;\n font-size: var(--text-12);\n color: var(--text-primary);\n }\n .more-item {\n width: var(--w-full);\n display: flex;\n align-items: center;\n gap: var(--gap-8);\n padding: var(--space-8) var(--space-16);\n border: none;\n background: transparent;\n cursor: pointer;\n text-align: left;\n color: inherit;\n font-size: var(--text-12);\n }\n .more-item:hover {\n background: var(--bg-input);\n }\n .more-item.danger {\n color: var(--danger);\n }\n .more-item.danger:hover {\n background: rgba(250, 0, 0, 0.08);\n }\n .more-item img {\n width: var(--icon-sm);\n height: var(--icon-sm);\n min-width: var(--icon-sm);\n min-height: var(--icon-sm);\n object-fit: contain;\n display: block;\n flex-shrink: 0;\n }\n .more-divider {\n height: 1px;\n background: var(--border-subtle);\n margin: var(--gap-4) 0;\n }\n .theme-icon { filter: var(--svg-icon-filter); }\n `,\n})\nclass WebChatHeader {\n @Prop() conversationDetails: ConversationDetails;\n @Prop() isTyping: boolean;\n @Prop() onClearConversation: () => void;\n @Prop() onConversationCleared: () => void;\n @Prop() headerBgColor: string;\n @Prop() headerUsernameColor: string;\n @Prop() headerSvgColor: string;\n @Prop() headerLastSeenColor: string;\n @Prop() searchedMessageDetails: any;\n @Prop() onSearchResultClick: (messageId: string) => void;\n @Prop() chatBodyRef: HTMLWebChatBodyElement;\n @Prop() allAttachments: any;\n @Prop() lastSeen: string;\n @Prop() userMetaData: any;\n @Prop() isLoadingMessage: Boolean;\n @Prop() messageAction: object;\n @Prop() hasMoreEligibleMembers: boolean;\n @Prop() typingConversationId: string;\n @Prop() isBlocked: boolean | string = null;\n @Prop() onBackButtonClick: Function;\n @Event() searchInputChange: EventEmitter<string>;\n @Event() closeChat: EventEmitter<void>;\n @Event() textClick: EventEmitter<void>;\n @Prop() handleCloseChat: () => void;\n @Prop() onSearchHandler: (searchText: string) => void;\n @Prop() selectedConversationId: string;\n @Element() el: HTMLElement;\n @State() isLoading: boolean = false;\n @State() groupMembers: any[] = [];\n @Prop() eligibleMembers: any[] = [];\n @State() displayTitle: string = '';\n @Prop() typingUserName: string = '';\n @State() menuOpen: boolean = false;\n\n componentWillLoad() {\n if (this.conversationDetails) {\n conversationStore.updateConversationDetails({\n conversationTitle: this.conversationDetails.isGroup\n ? this.conversationDetails.conversationTitle\n : this.conversationDetails.opponentDetails?.userName,\n // @ts-ignore\n conversationId: this.conversationDetails.conversationId,\n isGroup: this.conversationDetails.isGroup,\n conversationImageUrl: this.conversationDetails.isGroup\n ? this.conversationDetails.conversationImageUrl\n : this.conversationDetails.opponentDetails?.userProfileImageUrl,\n opponentDetails: this.conversationDetails.opponentDetails,\n });\n }\n conversationStore.onChange('conversationTitle', (value: string) => {\n this.displayTitle = value;\n });\n }\n\n @Watch('conversationDetails')\n handleConversationDetailsChange(newValue: ConversationDetails) {\n if (newValue) {\n conversationStore.updateConversationDetails({\n conversationTitle: newValue.isGroup ? newValue.conversationTitle : newValue.opponentDetails?.userName,\n // @ts-ignore\n conversationId: newValue.conversationId,\n isGroup: newValue.isGroup,\n conversationImageUrl: newValue.isGroup\n ? newValue.conversationImageUrl\n : newValue.opponentDetails?.userProfileImageUrl,\n opponentDetails: newValue.opponentDetails,\n });\n }\n }\n\n @Listen('click', { target: 'document' })\n handleDocumentClick(e: MouseEvent) {\n if (!this.menuOpen) return;\n const wrap = this.el.shadowRoot?.querySelector('.more-wrap');\n if (wrap && !e.composedPath().includes(wrap)) this.menuOpen = false;\n }\n\n handleClearChat = async () => {\n this.menuOpen = false;\n if (this.onClearConversation) {\n await this.onClearConversation();\n if (this.onConversationCleared) this.onConversationCleared();\n }\n };\n\n handleSearchInput = (searchText: string) => {\n this.onSearchHandler?.(searchText);\n this.searchInputChange.emit(searchText);\n };\n\n handleSearchResultClick = async (messageId: string) => {\n if (this.chatBodyRef) await this.chatBodyRef.scrollToMessage(messageId);\n if (this.onSearchResultClick) this.onSearchResultClick(messageId);\n };\n\n handleTextClick = () => {\n this.textClick.emit();\n this.el.dispatchEvent(\n new CustomEvent('open-right-Sidebar', {\n bubbles: true,\n composed: true,\n detail: { type: 'open-right-Sidebar', renderComponent: 'contact-info' },\n }),\n );\n };\n\n private title() {\n const d: any = this.conversationDetails || {};\n return (\n d.groupcastTitle ||\n this.displayTitle ||\n (d.isGroup ? d.conversationTitle : d.opponentDetails?.userName) ||\n ''\n );\n }\n\n private avatarSrc() {\n const d: any = this.conversationDetails || {};\n if (d.groupcastId) return d.groupcastImageUrl || '';\n if (d.isGroup) return d.conversationImageUrl || '';\n return d.opponentDetails?.userProfileImageUrl || '';\n }\n\n private avatarIsGroup() {\n const d: any = this.conversationDetails || {};\n return !!(d.groupcastId || d.isGroup);\n }\n\n private subtitle(formattedLastSeen: string) {\n if (this.isTyping) {\n return this.conversationDetails?.isGroup\n ? `${this.typingUserName || 'Someone'} is typing…`\n : 'Typing…';\n }\n if (this.conversationDetails?.isGroup) {\n const members = (this.conversationDetails as any)?.members || [];\n if (!members.length) return '';\n const names = members\n .slice(0, 6)\n .map((m: any) => (m.userId === this.userMetaData?.userId ? 'You' : m.userName));\n return members.length > 7 ? `${names.join(', ')}… +${members.length - 6}` : names.join(', ');\n }\n return formattedLastSeen || '';\n }\n\n private isGroupcast() {\n return !!(this.conversationDetails as any)?.groupcastId;\n }\n\n private openSearch() {\n this.menuOpen = false;\n this.el.dispatchEvent(\n new CustomEvent('open-right-Sidebar', {\n bubbles: true,\n composed: true,\n detail: { type: 'open-right-Sidebar', renderComponent: 'message-search-container' },\n }),\n );\n }\n\n private doCloseChat() {\n this.menuOpen = false;\n if (typeof this.handleCloseChat === 'function') this.handleCloseChat();\n this.closeChat.emit();\n }\n\n private toggleMenu = (e: Event) => {\n e.stopPropagation();\n this.menuOpen = !this.menuOpen;\n };\n\n private doBlock = () => {\n this.menuOpen = false;\n const d: any = this.conversationDetails || {};\n if (d.isGroup || d.groupcastId) return;\n this.el.dispatchEvent(\n new CustomEvent('contact-action', {\n bubbles: true,\n composed: true,\n detail: {\n action: this.isBlocked ? 'unblock-contact' : 'block-contact',\n oppenentId: d.opponentDetails?.userId,\n userName: d.opponentDetails?.userName || this.title(),\n },\n }),\n );\n };\n\n private conversationId() {\n const d: any = this.conversationDetails || {};\n return this.selectedConversationId || d.conversationId || d.groupcastId || '';\n }\n\n private openAddMember = () => {\n this.menuOpen = false;\n const id = this.conversationId();\n drawerDialogService.openDialog('member-add', {\n selectedConversationId: id,\n conversationId: id,\n isGroupcast: this.isGroupcast(),\n });\n };\n\n private openGroupInfo = () => {\n this.menuOpen = false;\n this.handleTextClick();\n };\n\n private exitGroup = () => {\n this.menuOpen = false;\n const conversationId = this.conversationId();\n const fromDetails = (this.conversationDetails as any)?.members;\n const fromStore =\n groupMembersStore.getCurrentConversationId() === conversationId\n ? groupMembersStore.getMembers()\n : [];\n const members =\n (Array.isArray(fromDetails) && fromDetails.length ? fromDetails : null) ||\n (Array.isArray(this.groupMembers) && this.groupMembers.length\n ? this.groupMembers\n : null) ||\n fromStore ||\n [];\n\n promptExitGroup({\n selfId: String(this.userMetaData?.userId || ''),\n members,\n conversationId: String(conversationId || ''),\n onLeave: () => {\n this.el.dispatchEvent(\n new CustomEvent('contact-action', {\n bubbles: true,\n composed: true,\n detail: { action: 'exit-group', conversationId },\n }),\n );\n },\n });\n };\n\n render() {\n const formattedLastSeen = getFormattedTime(this.lastSeen, true);\n const groupcast = this.isGroupcast();\n const isGroup = !!this.conversationDetails?.isGroup && !groupcast;\n const showBlock = !groupcast && !this.conversationDetails?.isGroup;\n\n return (\n <Fragment>\n <div\n class=\"head-container\"\n style={{\n backgroundColor: this.headerBgColor || undefined,\n color: this.headerUsernameColor || undefined,\n }}\n >\n <div class=\"head-left\">\n <button\n class=\"back-button\"\n type=\"button\"\n onClick={() => typeof this.onBackButtonClick === 'function' && this.onBackButtonClick()}\n aria-label=\"Back\"\n >\n <img class=\"theme-icon\" src={Left_Arrow} alt=\"\" />\n </button>\n <div class=\"identity\" onClick={this.handleTextClick}>\n <profile-avatar\n src={this.avatarSrc()}\n name={this.title()}\n size=\"var(--avatar-sm)\"\n isGroup={this.avatarIsGroup()}\n />\n <div class=\"text-container\">\n <div class=\"title\">{this.title()}</div>\n <div class=\"subtitle\" style={{ color: this.headerLastSeenColor || undefined }}>\n {this.subtitle(formattedLastSeen)}\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"actions\">\n {!groupcast ? (\n <button type=\"button\" class=\"icon-btn\" title=\"Search in conversation\" onClick={() => this.openSearch()}>\n <img class=\"theme-icon\" src={Search} alt=\"\" />\n </button>\n ) : null}\n <div class=\"more-wrap\">\n <button\n type=\"button\"\n class=\"icon-btn\"\n title=\"Menu\"\n aria-label=\"Menu\"\n aria-haspopup=\"menu\"\n aria-expanded={this.menuOpen ? 'true' : 'false'}\n onClick={this.toggleMenu}\n >\n <img class=\"theme-icon\" src={Three_Dots} alt=\"\" />\n </button>\n {this.menuOpen ? (\n <div class=\"more-menu\" role=\"menu\">\n {isGroup ? (\n <Fragment>\n <button type=\"button\" class=\"more-item\" role=\"menuitem\" onClick={this.openAddMember}>\n <img class=\"theme-icon\" src={Add_User} alt=\"\" />\n <span>Add member</span>\n </button>\n <button type=\"button\" class=\"more-item\" role=\"menuitem\" onClick={this.openGroupInfo}>\n <img class=\"theme-icon\" src={Info} alt=\"\" />\n <span>Group info</span>\n </button>\n </Fragment>\n ) : null}\n {!groupcast ? (\n <button type=\"button\" class=\"more-item\" role=\"menuitem\" onClick={() => this.openSearch()}>\n <img class=\"theme-icon\" src={Search} alt=\"\" />\n <span>Search</span>\n </button>\n ) : null}\n <button type=\"button\" class=\"more-item\" role=\"menuitem\" onClick={() => this.doCloseChat()}>\n <img class=\"theme-icon\" src={CloseButton} alt=\"\" />\n <span>Close chat</span>\n </button>\n {!groupcast ? (\n <button type=\"button\" class=\"more-item\" role=\"menuitem\" onClick={this.handleClearChat}>\n <img class=\"theme-icon\" src={Clear_Chat} alt=\"\" />\n <span>Clear chat</span>\n </button>\n ) : null}\n {isGroup ? (\n <Fragment>\n <div class=\"more-divider\" />\n <button type=\"button\" class=\"more-item danger\" role=\"menuitem\" onClick={this.exitGroup}>\n <img class=\"theme-icon\" src={Logout} alt=\"\" />\n <span>Exit group</span>\n </button>\n </Fragment>\n ) : null}\n {showBlock ? (\n <Fragment>\n <div class=\"more-divider\" />\n <button type=\"button\" class=\"more-item danger\" role=\"menuitem\" onClick={this.doBlock}>\n <img class=\"theme-icon\" src={Block_User} alt=\"\" />\n <span>{this.isBlocked ? 'Unblock Chat' : 'Block Chat'}</span>\n </button>\n </Fragment>\n ) : null}\n </div>\n ) : null}\n </div>\n </div>\n </div>\n\n {this.isLoading && (\n <div class=\"loading-overlay\">\n <spinner-loader\n height=\"30px\"\n width=\"30px\"\n spinTime=\"1s\"\n spinnerPrimaryColor=\"var(--bg-primary)\"\n spinnerSecondaryColor=\"var(--text-primary)\"\n spinnerBorderWidth=\"2px\"\n />\n </div>\n )}\n </Fragment>\n );\n }\n}\n\nexport { WebChatHeader };\n"]}
|
|
1
|
+
{"version":3,"file":"WebChatHeader.js","sourceRoot":"","sources":["../../../../src/components/ChatUIComponent/Header/WebChatHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACjH,OAAO,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AAS,IAAI,CACjB,4DAAK,KAAK,EAAC,iBAAiB;gBAC1B,uEACE,MAAM,EAAC,MAAM,EACb,KAAK,EAAC,MAAM,EACZ,QAAQ,EAAC,IAAI,EACb,mBAAmB,EAAC,mBAAmB,EACvC,qBAAqB,EAAC,qBAAqB,EAC3C,kBAAkB,EAAC,KAAK,GACxB,CACE,CACP,CACQ,CACZ,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AAED,OAAO,EAAE,aAAa,EAAE,CAAC","sourcesContent":["import { Component, h, Prop, Event, EventEmitter, State, Fragment, Element, Watch, Listen } from '@stencil/core';\nimport '../shared/spinner-loader/spinner-loader';\nimport '../shared/profile-avatar/profile-avatar';\nimport { ConversationDetails } from '../../../types/ConversationDetailsTypes';\nimport { getFormattedTime } from '../../../lib/helpers';\nimport { conversationStore } from '../../../store/conversation';\nimport { CloseButton, Block_User, Three_Dots, Left_Arrow, Search, Clear_Chat, Delete, Add_User, Info, Logout } from '../../../constants/chat-assets';\nimport { drawerDialogService } from '../../../lib/drawer';\nimport { promptExitGroup } from '../../../lib/prompt-exit-group';\nimport { groupMembersStore } from '../../../store/group-members';\n\n@Component({\n tag: 'web-chat-header',\n shadow: true,\n styles: `\n :host {\n display: block;\n width: var(--w-full);\n position: relative;\n z-index: 70;\n flex-shrink: 0;\n }\n .loading-overlay {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 10000;\n background-color: var(--overlay);\n height: var(--h-full);\n width: var(--w-full);\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .head-container {\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: 4rem;\n box-sizing: border-box;\n padding: 0 1.25rem;\n background: var(--bg-primary);\n color: var(--text-primary);\n border-bottom: 1px solid var(--border);\n position: relative;\n z-index: 10;\n flex-shrink: 0;\n }\n .head-left {\n display: flex;\n align-items: center;\n gap: var(--gap-12);\n min-width: 0;\n flex: 1;\n }\n .back-button {\n display: none;\n align-items: center;\n justify-content: center;\n border: none;\n background: transparent;\n cursor: pointer;\n padding: var(--space-8);\n border-radius: var(--rounded-full);\n flex-shrink: 0;\n }\n .back-button img {\n width: var(--icon-md);\n height: var(--icon-md);\n display: block;\n }\n .back-button:hover {\n background: var(--hover-overlay);\n }\n @media (max-width: 768px) {\n .back-button {\n display: flex;\n }\n }\n .identity {\n display: flex;\n align-items: center;\n gap: var(--gap-12);\n min-width: 0;\n cursor: pointer;\n }\n .text-container {\n display: flex;\n flex-direction: column;\n min-width: 0;\n }\n .title {\n font-size: var(--text-14);\n font-weight: 600;\n color: var(--text-primary);\n line-height: 1.25;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n .subtitle {\n font-size: var(--text-12);\n color: var(--text-secondary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n .actions {\n display: flex;\n align-items: center;\n gap: var(--gap-6);\n position: relative;\n flex-shrink: 0;\n }\n .icon-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--space-8);\n border: none;\n background: transparent;\n border-radius: var(--rounded-full);\n cursor: pointer;\n color: var(--icon);\n }\n .icon-btn:hover {\n background: var(--hover-overlay);\n color: var(--brand);\n }\n .icon-btn img {\n width: var(--icon-md);\n height: var(--icon-md);\n min-width: var(--icon-md);\n min-height: var(--icon-md);\n object-fit: contain;\n display: block;\n }\n .more-wrap {\n position: relative;\n }\n .more-menu {\n position: absolute;\n right: 0;\n top: 100%;\n margin-top: var(--gap-8);\n width: 12rem;\n background: var(--bg-primary);\n border-radius: var(--rounded-12);\n box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);\n border: 1px solid var(--border-subtle);\n padding: var(--gap-6) 0;\n z-index: 50;\n font-size: var(--text-12);\n color: var(--text-primary);\n }\n .more-item {\n width: var(--w-full);\n display: flex;\n align-items: center;\n gap: var(--gap-8);\n padding: var(--space-8) var(--space-16);\n border: none;\n background: transparent;\n cursor: pointer;\n text-align: left;\n color: inherit;\n font-size: var(--text-12);\n }\n .more-item:hover {\n background: var(--bg-input);\n }\n .more-item.danger {\n color: var(--danger);\n }\n .more-item.danger:hover {\n background: rgba(250, 0, 0, 0.08);\n }\n .more-item img {\n width: var(--icon-sm);\n height: var(--icon-sm);\n min-width: var(--icon-sm);\n min-height: var(--icon-sm);\n object-fit: contain;\n display: block;\n flex-shrink: 0;\n }\n .more-divider {\n height: 1px;\n background: var(--border-subtle);\n margin: var(--gap-4) 0;\n }\n .theme-icon { filter: var(--svg-icon-filter); }\n `,\n})\nclass WebChatHeader {\n @Prop() conversationDetails: ConversationDetails;\n @Prop() isTyping: boolean;\n @Prop() onClearConversation: () => void;\n @Prop() onConversationCleared: () => void;\n @Prop() headerBgColor: string;\n @Prop() headerUsernameColor: string;\n @Prop() headerSvgColor: string;\n @Prop() headerLastSeenColor: string;\n @Prop() searchedMessageDetails: any;\n @Prop() onSearchResultClick: (messageId: string) => void;\n @Prop() chatBodyRef: HTMLWebChatBodyElement;\n @Prop() allAttachments: any;\n @Prop() lastSeen: string;\n @Prop() userMetaData: any;\n @Prop() isLoadingMessage: Boolean;\n @Prop() messageAction: object;\n @Prop() hasMoreEligibleMembers: boolean;\n @Prop() typingConversationId: string;\n @Prop() isBlocked: boolean | string = null;\n @Prop() onBackButtonClick: Function;\n @Event() searchInputChange: EventEmitter<string>;\n @Event() closeChat: EventEmitter<void>;\n @Event() textClick: EventEmitter<void>;\n @Prop() handleCloseChat: () => void;\n @Prop() onSearchHandler: (searchText: string) => void;\n @Prop() selectedConversationId: string;\n @Element() el: HTMLElement;\n @State() isLoading: boolean = false;\n @State() groupMembers: any[] = [];\n @Prop() eligibleMembers: any[] = [];\n @State() displayTitle: string = '';\n @Prop() typingUserName: string = '';\n @State() menuOpen: boolean = false;\n\n componentWillLoad() {\n if (this.conversationDetails) {\n conversationStore.updateConversationDetails({\n conversationTitle: this.conversationDetails.isGroup\n ? this.conversationDetails.conversationTitle\n : this.conversationDetails.opponentDetails?.userName,\n // @ts-ignore\n conversationId: this.conversationDetails.conversationId,\n isGroup: this.conversationDetails.isGroup,\n conversationImageUrl: this.conversationDetails.isGroup\n ? this.conversationDetails.conversationImageUrl\n : this.conversationDetails.opponentDetails?.userProfileImageUrl,\n opponentDetails: this.conversationDetails.opponentDetails,\n });\n }\n conversationStore.onChange('conversationTitle', (value: string) => {\n this.displayTitle = value;\n });\n }\n\n @Watch('conversationDetails')\n handleConversationDetailsChange(newValue: ConversationDetails) {\n if (newValue) {\n conversationStore.updateConversationDetails({\n conversationTitle: newValue.isGroup ? newValue.conversationTitle : newValue.opponentDetails?.userName,\n // @ts-ignore\n conversationId: newValue.conversationId,\n isGroup: newValue.isGroup,\n conversationImageUrl: newValue.isGroup\n ? newValue.conversationImageUrl\n : newValue.opponentDetails?.userProfileImageUrl,\n opponentDetails: newValue.opponentDetails,\n });\n }\n }\n\n @Listen('click', { target: 'document' })\n handleDocumentClick(e: MouseEvent) {\n if (!this.menuOpen) return;\n const wrap = this.el.shadowRoot?.querySelector('.more-wrap');\n if (wrap && !e.composedPath().includes(wrap)) this.menuOpen = false;\n }\n\n handleClearChat = async () => {\n this.menuOpen = false;\n if (this.onClearConversation) {\n await this.onClearConversation();\n if (this.onConversationCleared) this.onConversationCleared();\n }\n };\n\n private deleteChat = () => {\n this.menuOpen = false;\n const conversationId = this.conversationId();\n if (!conversationId) return;\n const name = this.title() || 'this chat';\n drawerDialogService.openDialog('confirm-dialog', {\n title: 'Delete chat',\n description: `Are you sure you want to delete chat with ${name}?`,\n handleConfirm: () => {\n this.el.dispatchEvent(\n new CustomEvent('contact-action', {\n bubbles: true,\n composed: true,\n detail: { action: 'delete-chat', conversationId },\n }),\n );\n },\n });\n };\n\n handleSearchInput = (searchText: string) => {\n this.onSearchHandler?.(searchText);\n this.searchInputChange.emit(searchText);\n };\n\n handleSearchResultClick = async (messageId: string) => {\n if (this.chatBodyRef) await this.chatBodyRef.scrollToMessage(messageId);\n if (this.onSearchResultClick) this.onSearchResultClick(messageId);\n };\n\n handleTextClick = () => {\n this.textClick.emit();\n this.el.dispatchEvent(\n new CustomEvent('open-right-Sidebar', {\n bubbles: true,\n composed: true,\n detail: { type: 'open-right-Sidebar', renderComponent: 'contact-info' },\n }),\n );\n };\n\n private title() {\n const d: any = this.conversationDetails || {};\n return (\n d.groupcastTitle ||\n this.displayTitle ||\n (d.isGroup ? d.conversationTitle : d.opponentDetails?.userName) ||\n ''\n );\n }\n\n private avatarSrc() {\n const d: any = this.conversationDetails || {};\n if (d.groupcastId) return d.groupcastImageUrl || '';\n if (d.isGroup) return d.conversationImageUrl || '';\n return d.opponentDetails?.userProfileImageUrl || '';\n }\n\n private avatarIsGroup() {\n const d: any = this.conversationDetails || {};\n return !!(d.groupcastId || d.isGroup);\n }\n\n private subtitle(formattedLastSeen: string) {\n if (this.isTyping) {\n return this.conversationDetails?.isGroup\n ? `${this.typingUserName || 'Someone'} is typing…`\n : 'Typing…';\n }\n if (this.conversationDetails?.isGroup) {\n const members = (this.conversationDetails as any)?.members || [];\n if (!members.length) return '';\n const names = members\n .slice(0, 6)\n .map((m: any) => (m.userId === this.userMetaData?.userId ? 'You' : m.userName));\n return members.length > 7 ? `${names.join(', ')}… +${members.length - 6}` : names.join(', ');\n }\n return formattedLastSeen || '';\n }\n\n private isGroupcast() {\n return !!(this.conversationDetails as any)?.groupcastId;\n }\n\n private openSearch() {\n this.menuOpen = false;\n this.el.dispatchEvent(\n new CustomEvent('open-right-Sidebar', {\n bubbles: true,\n composed: true,\n detail: { type: 'open-right-Sidebar', renderComponent: 'message-search-container' },\n }),\n );\n }\n\n private doCloseChat() {\n this.menuOpen = false;\n if (typeof this.handleCloseChat === 'function') this.handleCloseChat();\n this.closeChat.emit();\n }\n\n private toggleMenu = (e: Event) => {\n e.stopPropagation();\n this.menuOpen = !this.menuOpen;\n };\n\n private doBlock = () => {\n this.menuOpen = false;\n const d: any = this.conversationDetails || {};\n if (d.isGroup || d.groupcastId) return;\n this.el.dispatchEvent(\n new CustomEvent('contact-action', {\n bubbles: true,\n composed: true,\n detail: {\n action: this.isBlocked ? 'unblock-contact' : 'block-contact',\n oppenentId: d.opponentDetails?.userId,\n userName: d.opponentDetails?.userName || this.title(),\n },\n }),\n );\n };\n\n private conversationId() {\n const d: any = this.conversationDetails || {};\n return this.selectedConversationId || d.conversationId || d.groupcastId || '';\n }\n\n private openAddMember = () => {\n this.menuOpen = false;\n const id = this.conversationId();\n drawerDialogService.openDialog('member-add', {\n selectedConversationId: id,\n conversationId: id,\n isGroupcast: this.isGroupcast(),\n });\n };\n\n private openGroupInfo = () => {\n this.menuOpen = false;\n this.handleTextClick();\n };\n\n private exitGroup = () => {\n this.menuOpen = false;\n const conversationId = this.conversationId();\n const fromDetails = (this.conversationDetails as any)?.members;\n const fromStore =\n groupMembersStore.getCurrentConversationId() === conversationId\n ? groupMembersStore.getMembers()\n : [];\n const members =\n (Array.isArray(fromDetails) && fromDetails.length ? fromDetails : null) ||\n (Array.isArray(this.groupMembers) && this.groupMembers.length\n ? this.groupMembers\n : null) ||\n fromStore ||\n [];\n\n promptExitGroup({\n selfId: String(this.userMetaData?.userId || ''),\n members,\n conversationId: String(conversationId || ''),\n onLeave: () => {\n this.el.dispatchEvent(\n new CustomEvent('contact-action', {\n bubbles: true,\n composed: true,\n detail: { action: 'exit-group', conversationId },\n }),\n );\n },\n });\n };\n\n render() {\n const formattedLastSeen = getFormattedTime(this.lastSeen, true);\n const groupcast = this.isGroupcast();\n const isGroup = !!this.conversationDetails?.isGroup && !groupcast;\n const showBlock = !groupcast && !this.conversationDetails?.isGroup;\n\n return (\n <Fragment>\n <div\n class=\"head-container\"\n style={{\n backgroundColor: this.headerBgColor || undefined,\n color: this.headerUsernameColor || undefined,\n }}\n >\n <div class=\"head-left\">\n <button\n class=\"back-button\"\n type=\"button\"\n onClick={() => typeof this.onBackButtonClick === 'function' && this.onBackButtonClick()}\n aria-label=\"Back\"\n >\n <img class=\"theme-icon\" src={Left_Arrow} alt=\"\" />\n </button>\n <div class=\"identity\" onClick={this.handleTextClick}>\n <profile-avatar\n src={this.avatarSrc()}\n name={this.title()}\n size=\"var(--avatar-sm)\"\n isGroup={this.avatarIsGroup()}\n />\n <div class=\"text-container\">\n <div class=\"title\">{this.title()}</div>\n <div class=\"subtitle\" style={{ color: this.headerLastSeenColor || undefined }}>\n {this.subtitle(formattedLastSeen)}\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"actions\">\n {!groupcast ? (\n <button type=\"button\" class=\"icon-btn\" title=\"Search in conversation\" onClick={() => this.openSearch()}>\n <img class=\"theme-icon\" src={Search} alt=\"\" />\n </button>\n ) : null}\n <div class=\"more-wrap\">\n <button\n type=\"button\"\n class=\"icon-btn\"\n title=\"Menu\"\n aria-label=\"Menu\"\n aria-haspopup=\"menu\"\n aria-expanded={this.menuOpen ? 'true' : 'false'}\n onClick={this.toggleMenu}\n >\n <img class=\"theme-icon\" src={Three_Dots} alt=\"\" />\n </button>\n {this.menuOpen ? (\n <div class=\"more-menu\" role=\"menu\">\n {isGroup ? (\n <Fragment>\n <button type=\"button\" class=\"more-item\" role=\"menuitem\" onClick={this.openAddMember}>\n <img class=\"theme-icon\" src={Add_User} alt=\"\" />\n <span>Add member</span>\n </button>\n <button type=\"button\" class=\"more-item\" role=\"menuitem\" onClick={this.openGroupInfo}>\n <img class=\"theme-icon\" src={Info} alt=\"\" />\n <span>Group info</span>\n </button>\n </Fragment>\n ) : null}\n {!groupcast ? (\n <button type=\"button\" class=\"more-item\" role=\"menuitem\" onClick={() => this.openSearch()}>\n <img class=\"theme-icon\" src={Search} alt=\"\" />\n <span>Search</span>\n </button>\n ) : null}\n <button type=\"button\" class=\"more-item\" role=\"menuitem\" onClick={() => this.doCloseChat()}>\n <img class=\"theme-icon\" src={CloseButton} alt=\"\" />\n <span>Close chat</span>\n </button>\n {!groupcast ? (\n <Fragment>\n <button type=\"button\" class=\"more-item\" role=\"menuitem\" onClick={this.handleClearChat}>\n <img class=\"theme-icon\" src={Clear_Chat} alt=\"\" />\n <span>Clear chat</span>\n </button>\n <button type=\"button\" class=\"more-item danger\" role=\"menuitem\" onClick={this.deleteChat}>\n <img class=\"theme-icon\" src={Delete} alt=\"\" />\n <span>Delete chat</span>\n </button>\n </Fragment>\n ) : null}\n {isGroup ? (\n <Fragment>\n <div class=\"more-divider\" />\n <button type=\"button\" class=\"more-item danger\" role=\"menuitem\" onClick={this.exitGroup}>\n <img class=\"theme-icon\" src={Logout} alt=\"\" />\n <span>Exit group</span>\n </button>\n </Fragment>\n ) : null}\n {showBlock ? (\n <Fragment>\n <div class=\"more-divider\" />\n <button type=\"button\" class=\"more-item danger\" role=\"menuitem\" onClick={this.doBlock}>\n <img class=\"theme-icon\" src={Block_User} alt=\"\" />\n <span>{this.isBlocked ? 'Unblock Chat' : 'Block Chat'}</span>\n </button>\n </Fragment>\n ) : null}\n </div>\n ) : null}\n </div>\n </div>\n </div>\n\n {this.isLoading && (\n <div class=\"loading-overlay\">\n <spinner-loader\n height=\"30px\"\n width=\"30px\"\n spinTime=\"1s\"\n spinnerPrimaryColor=\"var(--bg-primary)\"\n spinnerSecondaryColor=\"var(--text-primary)\"\n spinnerBorderWidth=\"2px\"\n />\n </div>\n )}\n </Fragment>\n );\n }\n}\n\nexport { WebChatHeader };\n"]}
|
|
@@ -442,7 +442,7 @@ class WebChatBody {
|
|
|
442
442
|
this.messageDate = '';
|
|
443
443
|
this.messageDeliveryTime = 0;
|
|
444
444
|
this.messageReadTime = 0;
|
|
445
|
-
this.showScrollButton =
|
|
445
|
+
this.showScrollButton = false;
|
|
446
446
|
this.isScrolling = false;
|
|
447
447
|
this.unreadMessageCount = 0;
|
|
448
448
|
this.isChatBodyUnscrollable = false;
|
|
@@ -784,21 +784,24 @@ class WebChatBody {
|
|
|
784
784
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
785
785
|
const currentConversation = (_a = this.conversationList) === null || _a === void 0 ? void 0 : _a.find(conversation => (conversation === null || conversation === void 0 ? void 0 : conversation.conversationId) === this.selectedConversationId);
|
|
786
786
|
const shouldShowPlaceholder = ((_b = this.allMessages) === null || _b === void 0 ? void 0 : _b.length) === 1 && ((_d = (_c = this.allMessages) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.action) !== 'clearConversation' && ((_e = this.allMessages) === null || _e === void 0 ? void 0 : _e.some(message => (message === null || message === void 0 ? void 0 : message.action) === 'clearConversation'));
|
|
787
|
-
return (h("div", { key: '
|
|
787
|
+
return (h("div", { key: '04d498fc21493a71497a28f855d184eb14e32763', class: `chat-body ${this.isChatBodyUnscrollable ? 'unscrollable' : null}` }, (this.showScrollButton || this.newMessageNotification) && (h("div", { key: '42c9a73991cfb913403d104dce510ba6ca9eb5bb', class: "jump-latest", onClick: this.scrollToBottom, role: "button", "aria-label": "Jump to latest messages", style: {
|
|
788
788
|
position: 'sticky',
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
789
|
+
bottom: '1rem',
|
|
790
|
+
marginLeft: 'auto',
|
|
791
|
+
marginRight: '1rem',
|
|
792
|
+
marginTop: '-2.5rem',
|
|
793
|
+
backgroundColor: 'var(--bg-primary, #fff)',
|
|
794
|
+
border: '1px solid var(--border, #e4e4e7)',
|
|
792
795
|
borderRadius: '50%',
|
|
793
|
-
width: '
|
|
794
|
-
height: '
|
|
796
|
+
width: '2.5rem',
|
|
797
|
+
height: '2.5rem',
|
|
795
798
|
display: 'flex',
|
|
796
799
|
alignItems: 'center',
|
|
797
800
|
justifyContent: 'center',
|
|
798
801
|
cursor: 'pointer',
|
|
799
|
-
boxShadow: '0 2px
|
|
802
|
+
boxShadow: '0 2px 8px rgba(0,0,0,0.14)',
|
|
800
803
|
zIndex: '100',
|
|
801
|
-
} }, ((_f = this.newMessageNotification) === null || _f === void 0 ? void 0 : _f.count) > 0 && (h("div", { key: '
|
|
804
|
+
} }, ((_f = this.newMessageNotification) === null || _f === void 0 ? void 0 : _f.count) > 0 && (h("div", { key: '2004cdee625a06da51879110339379878072d93f', style: {
|
|
802
805
|
position: 'absolute',
|
|
803
806
|
bottom: '22px',
|
|
804
807
|
right: '-2px',
|
|
@@ -812,7 +815,7 @@ class WebChatBody {
|
|
|
812
815
|
justifyContent: 'center',
|
|
813
816
|
fontSize: '12px',
|
|
814
817
|
padding: '0 4px',
|
|
815
|
-
} })), h("svg", { key: '
|
|
818
|
+
} })), h("svg", { key: '12e09d0c2ac7327e64ae671ebb1ce406ca0a5538', width: "20px", height: "30px", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'e67f759077573794ea5923aeaff2a18143ec1887', d: "M12 5V19M12 19L19 12M12 19L5 12", stroke: "var(--text-primary-color)", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })))), shouldShowPlaceholder && (h("div", { key: 'ad56d354279bc44df4e53a583976cb02f208bdc8', style: {
|
|
816
819
|
display: 'flex',
|
|
817
820
|
flexDirection: 'column',
|
|
818
821
|
alignItems: 'center',
|
|
@@ -822,7 +825,7 @@ class WebChatBody {
|
|
|
822
825
|
textAlign: 'center',
|
|
823
826
|
color: 'var(--text-secondary-color)',
|
|
824
827
|
marginTop: '20px',
|
|
825
|
-
} }, h("img", { key: '
|
|
828
|
+
} }, h("img", { key: 'bd08d76f2db678ee4af1aae5d39bf0ae3c083b6f', src: NoMessagePlaceholder, alt: "No messages", style: { width: '200px', height: '200px' } }), h("div", { key: '1fbb6c63dbc25065bf7248c4e03503b6693901d4', style: { display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '10px' } }, h("span", { key: 'ffdfd34864bfa277e433ced72e0de8670301b86b', style: { fontSize: '24px', color: 'var(--text-primary-color)' } }, "No messages"), h("span", { key: '5c3827cbd2ab1dacb9f75f248d7bbf4c83b33e89', style: { fontSize: '16px', color: 'var(--text-secondary-color)' } }, "Send a \"Hi\" and make someone's day brighter!")))), this.isMessagesLoading && (h("spinner-loader", { key: '88169d80e7d17419beb4094b3ce89f91927d8784', height: "20px", width: "20px", spinTime: "1s", spinnerPrimaryColor: "#000", spinnerSecondaryColor: "var(--bg-grey-color)", spinnerBorderWidth: "3px" })), ((_g = this.allMessages) === null || _g === void 0 ? void 0 : _g.length) > 0 &&
|
|
826
829
|
((_h = this.userMetaData) === null || _h === void 0 ? void 0 : _h.userId) &&
|
|
827
830
|
(() => {
|
|
828
831
|
const total = this.allMessages.length;
|