isometrik-plugin-chat-sdk 2.0.8 → 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 +1 -1
- package/dist/cjs/login-page_3.cjs.entry.js +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/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/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/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 +1 -1
- package/dist/esm/login-page_3.entry.js +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-35d9ecdc.entry.js → p-63ff4eea.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-a119be75.entry.js → p-9f036163.entry.js} +2 -2
- 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/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-e1d632b0.entry.js +0 -2
- package/dist/isometrik-webchat/p-e1d632b0.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-35d9ecdc.entry.js.map → p-63ff4eea.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-a119be75.entry.js.map → p-9f036163.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-2195b0c0.entry.js.map → p-ba6de4e2.entry.js.map} +0 -0
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import "../components/ChatUIComponent/shared/toast-notification/toast-notification";
|
|
2
2
|
import { createCustomPartElement } from "./custom-ui";
|
|
3
|
+
import { friendlyToastMessage } from "./friendly-toast-message";
|
|
4
|
+
export { friendlyToastMessage } from './friendly-toast-message';
|
|
3
5
|
class ToastHelper {
|
|
4
6
|
constructor() {
|
|
5
7
|
this.container = document.createElement('div');
|
|
6
|
-
this.container.
|
|
7
|
-
this.container.style
|
|
8
|
+
this.container.id = 'isometrik-toast-root';
|
|
9
|
+
Object.assign(this.container.style, {
|
|
10
|
+
position: 'fixed',
|
|
11
|
+
zIndex: '100000',
|
|
12
|
+
display: 'flex',
|
|
13
|
+
flexDirection: 'column',
|
|
14
|
+
gap: '8px',
|
|
15
|
+
pointerEvents: 'none',
|
|
16
|
+
maxWidth: 'min(22rem, calc(100vw - 2rem))',
|
|
17
|
+
});
|
|
8
18
|
document.body.appendChild(this.container);
|
|
9
19
|
}
|
|
10
20
|
static getInstance() {
|
|
@@ -12,50 +22,95 @@ class ToastHelper {
|
|
|
12
22
|
ToastHelper.instance = new ToastHelper();
|
|
13
23
|
return ToastHelper.instance;
|
|
14
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Solid fallbacks — host themes often leave --danger / --bg-primary unset
|
|
27
|
+
* or map --bg-primary to a light surface (white-on-white toast).
|
|
28
|
+
*/
|
|
15
29
|
getTypeStyles(type = 'info') {
|
|
16
30
|
const styles = {
|
|
17
|
-
success: {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
31
|
+
success: {
|
|
32
|
+
bgColor: 'var(--success, #15803d)',
|
|
33
|
+
color: '#ffffff',
|
|
34
|
+
progressBarColor: 'rgba(255,255,255,0.55)',
|
|
35
|
+
borderColor: 'transparent',
|
|
36
|
+
},
|
|
37
|
+
error: {
|
|
38
|
+
bgColor: 'var(--danger, #b91c1c)',
|
|
39
|
+
color: '#ffffff',
|
|
40
|
+
progressBarColor: 'rgba(255,255,255,0.55)',
|
|
41
|
+
borderColor: 'transparent',
|
|
42
|
+
},
|
|
43
|
+
warning: {
|
|
44
|
+
bgColor: 'var(--text-warning-color, #c2410c)',
|
|
45
|
+
color: '#ffffff',
|
|
46
|
+
progressBarColor: 'rgba(255,255,255,0.55)',
|
|
47
|
+
borderColor: 'transparent',
|
|
48
|
+
},
|
|
49
|
+
info: {
|
|
50
|
+
bgColor: 'var(--hoa-chat-ink, #18181b)',
|
|
51
|
+
color: '#ffffff',
|
|
52
|
+
progressBarColor: 'rgba(255,255,255,0.55)',
|
|
53
|
+
borderColor: 'transparent',
|
|
54
|
+
},
|
|
21
55
|
};
|
|
22
56
|
return styles[type] || styles.info;
|
|
23
57
|
}
|
|
24
58
|
setPosition(position = 'top-right') {
|
|
59
|
+
// Clear previous transform so center variants don't stick.
|
|
60
|
+
this.container.style.transform = '';
|
|
25
61
|
const positions = {
|
|
26
|
-
'top-right': { top: '
|
|
27
|
-
'top-left': { top: '
|
|
28
|
-
|
|
29
|
-
'bottom-
|
|
30
|
-
'
|
|
31
|
-
'
|
|
62
|
+
'top-right': { top: '1rem', right: '1rem', bottom: 'auto', left: 'auto' },
|
|
63
|
+
'top-left': { top: '1rem', right: 'auto', bottom: 'auto', left: '1rem' },
|
|
64
|
+
// Sit above typical chat composer (~5.5rem).
|
|
65
|
+
'bottom-right': { top: 'auto', right: '1rem', bottom: '5.5rem', left: 'auto' },
|
|
66
|
+
'bottom-left': { top: 'auto', right: 'auto', bottom: '5.5rem', left: '1rem' },
|
|
67
|
+
'top-center': {
|
|
68
|
+
top: '1rem',
|
|
69
|
+
right: 'auto',
|
|
70
|
+
bottom: 'auto',
|
|
71
|
+
left: '50%',
|
|
72
|
+
transform: 'translateX(-50%)',
|
|
73
|
+
},
|
|
74
|
+
'bottom-center': {
|
|
75
|
+
top: 'auto',
|
|
76
|
+
right: 'auto',
|
|
77
|
+
bottom: '5.5rem',
|
|
78
|
+
left: '50%',
|
|
79
|
+
transform: 'translateX(-50%)',
|
|
80
|
+
},
|
|
32
81
|
};
|
|
33
82
|
Object.assign(this.container.style, positions[position] || positions['top-right']);
|
|
34
83
|
}
|
|
35
84
|
show(options) {
|
|
36
|
-
const {
|
|
85
|
+
const { duration = 3500, type = 'info', position = 'top-right' } = options;
|
|
86
|
+
const message = friendlyToastMessage(options.message);
|
|
37
87
|
this.setPosition(position);
|
|
38
88
|
const toast = document.createElement('toast-notification');
|
|
39
89
|
const styles = this.getTypeStyles(type);
|
|
40
90
|
toast.bgColor = styles.bgColor;
|
|
41
|
-
toast.color =
|
|
42
|
-
toast.progressBarColor =
|
|
91
|
+
toast.color = styles.color;
|
|
92
|
+
toast.progressBarColor = styles.progressBarColor;
|
|
93
|
+
toast.progressBarBg = 'transparent';
|
|
94
|
+
toast.borderColor = styles.borderColor;
|
|
95
|
+
toast.borderWidth = '0';
|
|
43
96
|
toast.toastMessage = message;
|
|
44
|
-
toast.padding = '12px';
|
|
45
|
-
toast.borderRadius = '
|
|
46
|
-
toast.width = '
|
|
47
|
-
toast.
|
|
97
|
+
toast.padding = '12px 14px';
|
|
98
|
+
toast.borderRadius = '0.5rem';
|
|
99
|
+
toast.width = '100%';
|
|
100
|
+
toast.fontWeight = '600';
|
|
101
|
+
toast.style.pointerEvents = 'auto';
|
|
48
102
|
toast.style.display = 'block';
|
|
103
|
+
toast.style.boxShadow = '0 8px 24px rgba(24, 24, 27, 0.18)';
|
|
49
104
|
this.container.appendChild(toast);
|
|
50
105
|
setTimeout(() => toast.remove(), duration);
|
|
51
106
|
}
|
|
52
107
|
}
|
|
53
108
|
export const showToast = (options) => {
|
|
54
109
|
var _a;
|
|
55
|
-
const custom = createCustomPartElement('toast', options);
|
|
110
|
+
const custom = createCustomPartElement('toast', Object.assign(Object.assign({}, options), { message: friendlyToastMessage(options.message) }));
|
|
56
111
|
if (custom) {
|
|
57
112
|
document.body.appendChild(custom);
|
|
58
|
-
setTimeout(() => custom.remove(), (_a = options.duration) !== null && _a !== void 0 ? _a :
|
|
113
|
+
setTimeout(() => custom.remove(), (_a = options.duration) !== null && _a !== void 0 ? _a : 3500);
|
|
59
114
|
return;
|
|
60
115
|
}
|
|
61
116
|
ToastHelper.getInstance().show(options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.js","sourceRoot":"","sources":["../../src/lib/toast.ts"],"names":[],"mappings":"AAAA,OAAO,4EAA4E,CAAC;AACpF,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"toast.js","sourceRoot":"","sources":["../../src/lib/toast.ts"],"names":[],"mappings":"AAAA,OAAO,4EAA4E,CAAC;AACpF,OAAO,EAAE,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,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAClC,UAAU,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,QAAQ,CAAC,CAAC;IAC7C,CAAC;CACF;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,OAAqB,EAAQ,EAAE;;IACvD,MAAM,MAAM,GAAG,uBAAuB,CAAC,OAAO,EAAE,gCAC3C,OAAO,KACV,OAAO,EAAE,oBAAoB,CAAC,OAAO,CAAC,OAAO,CAAC,GACxC,CAAC,CAAC;IACV,IAAI,MAAM,EAAE,CAAC;QACX,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAClC,UAAU,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,MAAA,OAAO,CAAC,QAAQ,mCAAI,IAAI,CAAC,CAAC;QAC5D,OAAO;IACT,CAAC;IACD,WAAW,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC1C,CAAC,CAAC","sourcesContent":["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"]}
|
|
@@ -5,35 +5,41 @@ const ToastNotification$1 = /*@__PURE__*/ proxyCustomElement(class ToastNotifica
|
|
|
5
5
|
super();
|
|
6
6
|
this.__registerHost();
|
|
7
7
|
this.__attachShadow();
|
|
8
|
-
this.bgColor = '
|
|
8
|
+
this.bgColor = '#18181b';
|
|
9
9
|
this.width = '200px';
|
|
10
10
|
this.height = 'auto';
|
|
11
|
-
this.borderWidth = '
|
|
12
|
-
this.borderColor = '
|
|
13
|
-
this.color = '
|
|
14
|
-
this.fontSize = '
|
|
15
|
-
this.borderRadius = '
|
|
16
|
-
this.fontWeight = '
|
|
17
|
-
this.progressBarBg = '
|
|
18
|
-
this.progressBarHeight = '
|
|
19
|
-
this.progressBarColor = '
|
|
20
|
-
this.progressBarBorderRadius = '
|
|
11
|
+
this.borderWidth = '0';
|
|
12
|
+
this.borderColor = 'transparent';
|
|
13
|
+
this.color = '#ffffff';
|
|
14
|
+
this.fontSize = '0.875rem';
|
|
15
|
+
this.borderRadius = '0.5rem';
|
|
16
|
+
this.fontWeight = '600';
|
|
17
|
+
this.progressBarBg = 'transparent';
|
|
18
|
+
this.progressBarHeight = '3px';
|
|
19
|
+
this.progressBarColor = 'rgba(255,255,255,0.55)';
|
|
20
|
+
this.progressBarBorderRadius = '0';
|
|
21
21
|
this.toastMessage = 'Default message';
|
|
22
22
|
this.padding = undefined;
|
|
23
23
|
}
|
|
24
24
|
render() {
|
|
25
|
-
|
|
25
|
+
const borderW = this.borderWidth || '0';
|
|
26
|
+
const borderC = this.borderColor || 'transparent';
|
|
27
|
+
return (h("div", { key: '26860c462525339767af80e40eb7f81cbd2100fb', class: "toast-container", role: "status", style: {
|
|
26
28
|
backgroundColor: this.bgColor,
|
|
27
29
|
color: this.color,
|
|
28
30
|
width: this.width,
|
|
29
31
|
height: this.height,
|
|
30
|
-
border: `${
|
|
32
|
+
border: borderW === '0' || borderW === '0px' ? 'none' : `${borderW} solid ${borderC}`,
|
|
31
33
|
borderRadius: this.borderRadius,
|
|
32
34
|
fontSize: this.fontSize,
|
|
33
35
|
fontWeight: this.fontWeight,
|
|
34
|
-
} }, h("div", { key: '
|
|
36
|
+
} }, h("div", { key: '894c28f99edda42212508bd4035b99bd125d1681', class: "toast-message", style: { padding: this.padding } }, this.toastMessage), h("div", { key: 'a40e5a0d3e8746efedbd175a555deb4a2fdaea1b', class: "progress-container", style: {
|
|
37
|
+
height: this.progressBarHeight,
|
|
38
|
+
borderRadius: this.progressBarBorderRadius,
|
|
39
|
+
background: this.progressBarBg,
|
|
40
|
+
} }, h("div", { key: 'f3248675f982049e927d41bb6c899050695f02e4', class: "progress-bar", style: { backgroundColor: this.progressBarColor } }))));
|
|
35
41
|
}
|
|
36
|
-
static get style() { return ":host { display: block; }\n .toast-container { box-shadow: 0
|
|
42
|
+
static get style() { return ":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 }"; }
|
|
37
43
|
}, [1, "toast-notification", {
|
|
38
44
|
"bgColor": [1, "bg-color"],
|
|
39
45
|
"width": [1],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"toast-notification.js","mappings":";;
|
|
1
|
+
{"file":"toast-notification.js","mappings":";;MAyBaA,mBAAiB;;;;;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,QACE,4DACE,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,IAED,4DAAK,KAAK,EAAC,eAAe,EAAC,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,IACxD,IAAI,CAAC,YAAY,CACd,EACN,4DACE,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,IAED,4DAAK,KAAK,EAAC,cAAc,EAAC,KAAK,EAAE,EAAE,eAAe,EAAE,IAAI,CAAC,gBAAgB,EAAE,GAAI,CAC3E,CACF,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["ToastNotification"],"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}
|
package/dist/components/toast.js
CHANGED
|
@@ -1,10 +1,56 @@
|
|
|
1
1
|
import { c as createCustomPartElement } from './index2.js';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Map raw API / SDK errors to short user-facing copy.
|
|
5
|
+
* Never surface HTTP status phrases like "Unprocessable entity".
|
|
6
|
+
*/
|
|
7
|
+
function friendlyToastMessage(raw, fallback = 'Something went wrong. Try again.') {
|
|
8
|
+
var _a, _b;
|
|
9
|
+
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 : '')
|
|
10
|
+
.trim()
|
|
11
|
+
.replace(/\s+/g, ' ');
|
|
12
|
+
if (!s)
|
|
13
|
+
return fallback;
|
|
14
|
+
const lower = s.toLowerCase();
|
|
15
|
+
if (lower.includes('unprocessable') ||
|
|
16
|
+
lower.includes('422') ||
|
|
17
|
+
lower === 'bad request' ||
|
|
18
|
+
lower.includes('invalid payload')) {
|
|
19
|
+
return "Couldn't send that message. Please try again.";
|
|
20
|
+
}
|
|
21
|
+
if (lower.includes('network') ||
|
|
22
|
+
lower.includes('failed to fetch') ||
|
|
23
|
+
lower.includes('timeout')) {
|
|
24
|
+
return 'Network issue. Check your connection and try again.';
|
|
25
|
+
}
|
|
26
|
+
if (lower.includes('unauthorized') ||
|
|
27
|
+
lower.includes('401') ||
|
|
28
|
+
lower.includes('forbidden') ||
|
|
29
|
+
lower.includes('403')) {
|
|
30
|
+
return 'Session expired. Please refresh and try again.';
|
|
31
|
+
}
|
|
32
|
+
if (lower.includes('not found') || lower.includes('404')) {
|
|
33
|
+
return 'That chat is no longer available.';
|
|
34
|
+
}
|
|
35
|
+
// Keep short human messages; truncate giant stack/JSON blobs.
|
|
36
|
+
if (s.length > 120 || s.startsWith('{') || s.includes('\n'))
|
|
37
|
+
return fallback;
|
|
38
|
+
return s;
|
|
39
|
+
}
|
|
40
|
+
|
|
3
41
|
class ToastHelper {
|
|
4
42
|
constructor() {
|
|
5
43
|
this.container = document.createElement('div');
|
|
6
|
-
this.container.
|
|
7
|
-
this.container.style
|
|
44
|
+
this.container.id = 'isometrik-toast-root';
|
|
45
|
+
Object.assign(this.container.style, {
|
|
46
|
+
position: 'fixed',
|
|
47
|
+
zIndex: '100000',
|
|
48
|
+
display: 'flex',
|
|
49
|
+
flexDirection: 'column',
|
|
50
|
+
gap: '8px',
|
|
51
|
+
pointerEvents: 'none',
|
|
52
|
+
maxWidth: 'min(22rem, calc(100vw - 2rem))',
|
|
53
|
+
});
|
|
8
54
|
document.body.appendChild(this.container);
|
|
9
55
|
}
|
|
10
56
|
static getInstance() {
|
|
@@ -12,50 +58,95 @@ class ToastHelper {
|
|
|
12
58
|
ToastHelper.instance = new ToastHelper();
|
|
13
59
|
return ToastHelper.instance;
|
|
14
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* Solid fallbacks — host themes often leave --danger / --bg-primary unset
|
|
63
|
+
* or map --bg-primary to a light surface (white-on-white toast).
|
|
64
|
+
*/
|
|
15
65
|
getTypeStyles(type = 'info') {
|
|
16
66
|
const styles = {
|
|
17
|
-
success: {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
67
|
+
success: {
|
|
68
|
+
bgColor: 'var(--success, #15803d)',
|
|
69
|
+
color: '#ffffff',
|
|
70
|
+
progressBarColor: 'rgba(255,255,255,0.55)',
|
|
71
|
+
borderColor: 'transparent',
|
|
72
|
+
},
|
|
73
|
+
error: {
|
|
74
|
+
bgColor: 'var(--danger, #b91c1c)',
|
|
75
|
+
color: '#ffffff',
|
|
76
|
+
progressBarColor: 'rgba(255,255,255,0.55)',
|
|
77
|
+
borderColor: 'transparent',
|
|
78
|
+
},
|
|
79
|
+
warning: {
|
|
80
|
+
bgColor: 'var(--text-warning-color, #c2410c)',
|
|
81
|
+
color: '#ffffff',
|
|
82
|
+
progressBarColor: 'rgba(255,255,255,0.55)',
|
|
83
|
+
borderColor: 'transparent',
|
|
84
|
+
},
|
|
85
|
+
info: {
|
|
86
|
+
bgColor: 'var(--hoa-chat-ink, #18181b)',
|
|
87
|
+
color: '#ffffff',
|
|
88
|
+
progressBarColor: 'rgba(255,255,255,0.55)',
|
|
89
|
+
borderColor: 'transparent',
|
|
90
|
+
},
|
|
21
91
|
};
|
|
22
92
|
return styles[type] || styles.info;
|
|
23
93
|
}
|
|
24
94
|
setPosition(position = 'top-right') {
|
|
95
|
+
// Clear previous transform so center variants don't stick.
|
|
96
|
+
this.container.style.transform = '';
|
|
25
97
|
const positions = {
|
|
26
|
-
'top-right': { top: '
|
|
27
|
-
'top-left': { top: '
|
|
28
|
-
|
|
29
|
-
'bottom-
|
|
30
|
-
'
|
|
31
|
-
'
|
|
98
|
+
'top-right': { top: '1rem', right: '1rem', bottom: 'auto', left: 'auto' },
|
|
99
|
+
'top-left': { top: '1rem', right: 'auto', bottom: 'auto', left: '1rem' },
|
|
100
|
+
// Sit above typical chat composer (~5.5rem).
|
|
101
|
+
'bottom-right': { top: 'auto', right: '1rem', bottom: '5.5rem', left: 'auto' },
|
|
102
|
+
'bottom-left': { top: 'auto', right: 'auto', bottom: '5.5rem', left: '1rem' },
|
|
103
|
+
'top-center': {
|
|
104
|
+
top: '1rem',
|
|
105
|
+
right: 'auto',
|
|
106
|
+
bottom: 'auto',
|
|
107
|
+
left: '50%',
|
|
108
|
+
transform: 'translateX(-50%)',
|
|
109
|
+
},
|
|
110
|
+
'bottom-center': {
|
|
111
|
+
top: 'auto',
|
|
112
|
+
right: 'auto',
|
|
113
|
+
bottom: '5.5rem',
|
|
114
|
+
left: '50%',
|
|
115
|
+
transform: 'translateX(-50%)',
|
|
116
|
+
},
|
|
32
117
|
};
|
|
33
118
|
Object.assign(this.container.style, positions[position] || positions['top-right']);
|
|
34
119
|
}
|
|
35
120
|
show(options) {
|
|
36
|
-
const {
|
|
121
|
+
const { duration = 3500, type = 'info', position = 'top-right' } = options;
|
|
122
|
+
const message = friendlyToastMessage(options.message);
|
|
37
123
|
this.setPosition(position);
|
|
38
124
|
const toast = document.createElement('toast-notification');
|
|
39
125
|
const styles = this.getTypeStyles(type);
|
|
40
126
|
toast.bgColor = styles.bgColor;
|
|
41
|
-
toast.color =
|
|
42
|
-
toast.progressBarColor =
|
|
127
|
+
toast.color = styles.color;
|
|
128
|
+
toast.progressBarColor = styles.progressBarColor;
|
|
129
|
+
toast.progressBarBg = 'transparent';
|
|
130
|
+
toast.borderColor = styles.borderColor;
|
|
131
|
+
toast.borderWidth = '0';
|
|
43
132
|
toast.toastMessage = message;
|
|
44
|
-
toast.padding = '12px';
|
|
45
|
-
toast.borderRadius = '
|
|
46
|
-
toast.width = '
|
|
47
|
-
toast.
|
|
133
|
+
toast.padding = '12px 14px';
|
|
134
|
+
toast.borderRadius = '0.5rem';
|
|
135
|
+
toast.width = '100%';
|
|
136
|
+
toast.fontWeight = '600';
|
|
137
|
+
toast.style.pointerEvents = 'auto';
|
|
48
138
|
toast.style.display = 'block';
|
|
139
|
+
toast.style.boxShadow = '0 8px 24px rgba(24, 24, 27, 0.18)';
|
|
49
140
|
this.container.appendChild(toast);
|
|
50
141
|
setTimeout(() => toast.remove(), duration);
|
|
51
142
|
}
|
|
52
143
|
}
|
|
53
144
|
const showToast = (options) => {
|
|
54
145
|
var _a;
|
|
55
|
-
const custom = createCustomPartElement('toast', options);
|
|
146
|
+
const custom = createCustomPartElement('toast', Object.assign(Object.assign({}, options), { message: friendlyToastMessage(options.message) }));
|
|
56
147
|
if (custom) {
|
|
57
148
|
document.body.appendChild(custom);
|
|
58
|
-
setTimeout(() => custom.remove(), (_a = options.duration) !== null && _a !== void 0 ? _a :
|
|
149
|
+
setTimeout(() => custom.remove(), (_a = options.duration) !== null && _a !== void 0 ? _a : 3500);
|
|
59
150
|
return;
|
|
60
151
|
}
|
|
61
152
|
ToastHelper.getInstance().show(options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"toast.js","mappings":";;AAUA,MAAM,WAAW;IAIf;QACE,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC/C,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;QACrC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;KAC3C;IAEM,OAAO,WAAW;QACvB,IAAI,CAAC,WAAW,CAAC,QAAQ;YAAE,WAAW,CAAC,QAAQ,GAAG,IAAI,WAAW,EAAE,CAAC;QACpE,OAAO,WAAW,CAAC,QAAQ,CAAC;KAC7B;IAEO,aAAa,CAAC,OAAe,MAAM;QACzC,MAAM,MAAM,GAAkE;YAC5E,OAAO,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE;YAC7E,KAAK,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,SAAS,EAAE;YAChE,OAAO,EAAE,EAAE,OAAO,EAAE,oCAAoC,EAAE,gBAAgB,EAAE,SAAS,EAAE;YACvF,IAAI,EAAE,EAAE,OAAO,EAAE,iCAAiC,EAAE,gBAAgB,EAAE,SAAS,EAAE;SAClF,CAAC;QACF,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,MAAM,CA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QAAQ,CAAC,aAAa,CAAC,oBAAoB,CAAQ,CAAC;QAClE,MAAM,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QACxC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;QAC/B,KAAK,CAAC,KAAK,GAAG,mBAAmB,CAAC;QAClC,KAAK,CAAC,gBAAgB,GAAG,mBAAmB,CAAC;QAC7C,KAAK,CAAC,YAAY,GAAG,OAAO,CAAC;QAC7B,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;QACvB,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC;QAC3B,KAAK,CAAC,KAAK,GAAG,OAAO,CAAC;QACtB,KAAK,CAAC,KAAK,CAAC,YAAY,GAAG,MAAM,CAAC;QAClC,KAAK,CAAC,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;QAC9B,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAClC,UAAU,CAAC,MAAM,KAAK,CAAC,MAAM,EAAE,EAAE,QAAQ,CAAC,CAAC;KAC5C;CACF;MAEY,SAAS,GAAG,CAAC,OAAqB;;IAC7C,MAAM,MAAM,GAAG,uBAAuB,CAAC,OAAO,EAAE,OAAc,CAAC,CAAC;IAChE,IAAI,MAAM,EAAE;QACV,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAClC,UAAU,CAAC,MAAM,MAAM,CAAC,MAAM,EAAE,EAAE,MAAA,OAAO,CAAC,QAAQ,mCAAI,IAAI,CAAC,CAAC;QAC5D,OAAO;KACR;IACD,WAAW,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC1C;;;;","names":[],"sources":["src/lib/toast.ts"],"sourcesContent":["import '../components/ChatUIComponent/shared/toast-notification/toast-notification';\nimport { createCustomPartElement } from './custom-ui';\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.style.position = 'fixed';\n this.container.style.zIndex = '9999';\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 private getTypeStyles(type: string = 'info') {\n const styles: Record<string, { bgColor: string; progressBarColor: string }> = {\n success: { bgColor: 'var(--success)', progressBarColor: 'var(--bg-primary)' },\n error: { bgColor: 'var(--danger)', progressBarColor: '#da190b' },\n warning: { bgColor: 'var(--text-warning-color, #cf6f0f)', progressBarColor: '#e68900' },\n info: { bgColor: 'var(--text-info-color, #a5a2a2)', progressBarColor: '#0b7dda' },\n };\n return styles[type] || styles.info;\n }\n\n private setPosition(position: string = 'top-right') {\n const positions: Record<string, Partial<CSSStyleDeclaration>> = {\n 'top-right': { top: '20px', right: '20px', bottom: 'auto', left: 'auto' },\n 'top-left': { top: '20px', right: 'auto', bottom: 'auto', left: '20px' },\n 'bottom-right': { top: 'auto', right: '20px', bottom: '20px', left: 'auto' },\n 'bottom-left': { top: 'auto', right: 'auto', bottom: '20px', left: '20px' },\n 'top-center': { top: '20px', right: 'auto', bottom: 'auto', left: '50%', transform: 'translateX(-50%)' },\n 'bottom-center': { top: 'auto', right: 'auto', bottom: '20px', left: '50%', transform: 'translateX(-50%)' },\n };\n Object.assign(this.container.style, positions[position] || positions['top-right']);\n }\n\n public show(options: ToastOptions): void {\n const { message, duration = 3000, type = 'info', position = 'top-right' } = options;\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 = 'var(--bg-primary)';\n toast.progressBarColor = 'var(--bg-primary)';\n toast.toastMessage = message;\n toast.padding = '12px';\n toast.borderRadius = '5px';\n toast.width = '300px';\n toast.style.marginBottom = '10px';\n toast.style.display = 'block';\n this.container.appendChild(toast);\n setTimeout(() => toast.remove(), duration);\n }\n}\n\nexport const showToast = (options: ToastOptions): void => {\n const custom = createCustomPartElement('toast', options as any);\n if (custom) {\n document.body.appendChild(custom);\n setTimeout(() => custom.remove(), options.duration ?? 3000);\n return;\n }\n ToastHelper.getInstance().show(options);\n};\n"],"version":3}
|
|
1
|
+
{"file":"toast.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,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EACjC;QACA,OAAO,+CAA+C,CAAC;KACxD;IACD,IACE,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC;QACzB,KAAK,CAAC,QAAQ,CAAC,iBAAiB,CAAC;QACjC,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,EACzB;QACA,OAAO,qDAAqD,CAAC;KAC9D;IACD,IACE,KAAK,CAAC,QAAQ,CAAC,cAAc,CAAC;QAC9B,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC;QACrB,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC;QAC3B,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EACrB;QACA,OAAO,gDAAg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K,CAAC,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;QAC9B,KAAK,CAAC,KAAK,CAAC,SAAS,GAAG,mCAAmC,CAAC;QAC5D,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAClC,UAAU,CAAC,MAAM,KAAK,CAAC,MAAM,EAAE,EAAE,QAAQ,CAAC,CAAC;KAC5C;CACF;MAEY,SAAS,GAAG,CAAC,OAAqB;;IAC7C,MAAM,MAAM,GAAG,uBAAuB,CAAC,OAAO,EAAE,gCAC3C,OAAO,KACV,OAAO,EAAE,oBAAoB,CAAC,OAAO,CAAC,OAAO,CAAC,GACxC,CAAC,CAAC;IACV,IAAI,MAAM,EAAE;QACV,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAClC,UAAU,CAAC,MAAM,MAAM,CAAC,MAAM,EAAE,EAAE,MAAA,OAAO,CAAC,QAAQ,mCAAI,IAAI,CAAC,CAAC;QAC5D,OAAO;KACR;IACD,WAAW,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC1C;;;;","names":[],"sources":["src/lib/friendly-toast-message.ts","src/lib/toast.ts"],"sourcesContent":["/**\n * Map raw API / SDK 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,7 +7,7 @@ import { M } from './index.m-8c70037f.js';
|
|
|
7
7
|
import { d as drawerDialogService } from './drawer-d54c2f10.js';
|
|
8
8
|
import { c as clearAll, d as debounce, e as getFormattedTime, a as getDeviceID, b as getGroupcastUrlQuery, g as generateProfileImageByInitials, f as getFormattedDeliveryTime } from './helpers-f33b895c.js';
|
|
9
9
|
import { g as getCustomPartTag, f as findWebChatHost, h as hasNamedSlot } from './index-4c865e34.js';
|
|
10
|
-
import { s as showToast } from './toast-
|
|
10
|
+
import { s as showToast } from './toast-45ac7913.js';
|
|
11
11
|
import { p as postGroupCast, f as getPresignedUrlForGroupcastMedia, h as postGroupCastMessage, i as getGroupcastMessageReadStatus, j as getGroupcastMessageDeliveryStatus, k as deleteGroupcastMessageSelf, l as deleteGroupcastMessageEveryone } from './groupcast-9c7d2a32.js';
|
|
12
12
|
import { i as isometrikLogo } from './IsometrikLogo-36cb0542.js';
|
|
13
13
|
import { c as createStore, g as groupMembersStore } from './group-members-05414da2.js';
|
|
@@ -11,7 +11,7 @@ import { c as createStore, g as groupMembersStore } from './group-members-05414d
|
|
|
11
11
|
import { d as getGroupcastMessage, r as removeGroupcastMember, e as deleteGroupCast } from './groupcast-9c7d2a32.js';
|
|
12
12
|
import { t as takeMediaFiles, M as MAX_MEDIA_PER_MESSAGE, j as attachmentBodyForApi, p as prepareMediaAttachments, u as uploadAndPostMediaMessage, k as isAttachmentBodyPlaceholder, f as fetchMessagesPage, s as searchMessages, b as fetchLinkMessages, c as fetchMediaCount, d as fetchMediaAttachments, l as mediaLimitToastMessage, n as buildLocalMediaAttachments, h as customTypeFromMime, A as ATTACHMENT_BODY_PLACEHOLDER, i as buildReplyMetaData, m as markConversationRead } from './send-media-a946c6dd.js';
|
|
13
13
|
import { g as getOfflineClient, m as mergeMessagesById, i as isBrowserOnline } from './client-4a3e00da.js';
|
|
14
|
-
import { s as showToast } from './toast-
|
|
14
|
+
import { s as showToast } from './toast-45ac7913.js';
|
|
15
15
|
import { r as removeConversationMember, g as getConversationEligibleMembers } from './group-members-d603f29f.js';
|
|
16
16
|
import { h as hasNamedSlot } from './index-4c865e34.js';
|
|
17
17
|
import './destroy-chat-d0ee28d6.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-bc463197.js';
|
|
2
2
|
import { g as getConversationEligibleMembers, a as addConversationMember } from './group-members-d603f29f.js';
|
|
3
3
|
import { b as getGroupcastEligibleMembers, c as addGroupcastMember } from './groupcast-9c7d2a32.js';
|
|
4
|
-
import { s as showToast } from './toast-
|
|
4
|
+
import { s as showToast } from './toast-45ac7913.js';
|
|
5
5
|
import { d as drawerDialogService } from './drawer-d54c2f10.js';
|
|
6
6
|
import { C as Cancel, a as Search } from './chat-assets-bb056958.js';
|
|
7
7
|
import './index.m-8c70037f.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, a as createEvent, h } from './index-bc463197.js';
|
|
2
2
|
import { g as getReactions } from './message-reaction-0a2bb115.js';
|
|
3
|
-
import { s as showToast } from './toast-
|
|
3
|
+
import { s as showToast } from './toast-45ac7913.js';
|
|
4
4
|
import './index.m-8c70037f.js';
|
|
5
5
|
import './index-4c865e34.js';
|
|
6
6
|
|