isometrik-plugin-chat-sdk 2.0.23 → 2.0.24
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/{app-globals-0e7848be.js → app-globals-f55c4dba.js} +4 -4
- package/dist/cjs/{app-globals-0e7848be.js.map → app-globals-f55c4dba.js.map} +1 -1
- package/dist/cjs/attachment-preview_23.cjs.entry.js +98 -97
- package/dist/cjs/attachment-preview_23.cjs.entry.js.map +1 -1
- package/dist/cjs/{chat-tile_3.cjs.entry.js → chat-tile_2.cjs.entry.js} +1 -66
- package/dist/cjs/chat-tile_2.cjs.entry.js.map +1 -0
- package/dist/cjs/forward-memebers.cjs.entry.js +24 -5
- package/dist/cjs/forward-memebers.cjs.entry.js.map +1 -1
- package/dist/cjs/groupcast-9456b0c7.js +356 -0
- package/dist/cjs/groupcast-9456b0c7.js.map +1 -0
- package/dist/cjs/index.cjs.js +9 -9
- package/dist/cjs/iso-group-info.cjs.entry.js +74 -0
- package/dist/cjs/iso-group-info.cjs.entry.js.map +1 -0
- package/dist/cjs/isometrik-webchat.cjs.js +5 -5
- package/dist/cjs/loader.cjs.js +5 -5
- package/dist/cjs/login-page_3.cjs.entry.js +177 -69
- package/dist/cjs/login-page_3.cjs.entry.js.map +1 -1
- package/dist/cjs/member-add.cjs.entry.js +23 -5
- package/dist/cjs/member-add.cjs.entry.js.map +1 -1
- package/dist/cjs/{runtime-controls-a70872fe.js → runtime-controls-6d4fd7ed.js} +8 -7
- package/dist/cjs/runtime-controls-6d4fd7ed.js.map +1 -0
- package/dist/cjs/{groupcast-bb393c81.js → session-d44ca719.js} +1 -20
- package/dist/cjs/session-d44ca719.js.map +1 -0
- package/dist/collection/api/groupcast.js +42 -4
- package/dist/collection/components/ChatUIComponent/AddMember.js +24 -5
- package/dist/collection/components/ChatUIComponent/AddMember.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/ChatSidebar/ChatSidebar.js +25 -2
- package/dist/collection/components/ChatUIComponent/ChatSidebar/ChatSidebar.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/Footer/ChatFooter.js +58 -3
- package/dist/collection/components/ChatUIComponent/Footer/ChatFooter.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/Header/WebChatHeader.js +15 -6
- package/dist/collection/components/ChatUIComponent/Header/WebChatHeader.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/ForwardMessageList/ForwardMessageList.js +24 -5
- package/dist/collection/components/ChatUIComponent/shared/ForwardMessageList/ForwardMessageList.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/GroupCast/GroupCast.js +29 -110
- package/dist/collection/components/ChatUIComponent/shared/GroupCast/GroupCast.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/contact-info/contact-info.js +4 -2
- package/dist/collection/components/ChatUIComponent/shared/contact-info/contact-info.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/message-search/message-search.js +4 -4
- package/dist/collection/components/ChatUIComponent/shared/message-search/message-search.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/WebChat.js +49 -4
- package/dist/collection/components/my-component/web-chat/WebChat.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/bootstrap.js +4 -0
- package/dist/collection/components/my-component/web-chat/bootstrap.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/data-fetch.js +2 -2
- package/dist/collection/components/my-component/web-chat/data-fetch.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/event-handlers.js +23 -6
- package/dist/collection/components/my-component/web-chat/event-handlers.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/groupcast-draft.js +67 -0
- package/dist/collection/components/my-component/web-chat/groupcast-draft.js.map +1 -0
- package/dist/collection/components/my-component/web-chat/shell-render.js +2 -6
- package/dist/collection/components/my-component/web-chat/shell-render.js.map +1 -1
- package/dist/collection/lib/chat/groupcast.js +81 -1
- package/dist/collection/lib/chat/groupcast.js.map +1 -1
- package/dist/collection/lib/chat/index.js +1 -1
- package/dist/collection/lib/chat/index.js.map +1 -1
- package/dist/components/ChatFooter.js +41 -5
- package/dist/components/ChatFooter.js.map +1 -1
- package/dist/components/ChatSidebar.js +26 -3
- package/dist/components/ChatSidebar.js.map +1 -1
- package/dist/components/{GroupCast2.js → GroupCast3.js} +21 -98
- package/dist/components/GroupCast3.js.map +1 -0
- package/dist/components/WebChat.js +172 -62
- package/dist/components/WebChat.js.map +1 -1
- package/dist/components/WebChatBody.js +2 -2
- package/dist/components/WebChatHeader.js +15 -6
- package/dist/components/WebChatHeader.js.map +1 -1
- package/dist/components/chat-app.js +1 -1
- package/dist/components/client.js +1 -17
- package/dist/components/client.js.map +1 -1
- package/dist/components/contact-info2.js +4 -2
- package/dist/components/contact-info2.js.map +1 -1
- package/dist/components/forward-memebers.js +24 -5
- package/dist/components/forward-memebers.js.map +1 -1
- package/dist/components/group-cast.js +1 -1
- package/dist/components/groupcast.js +94 -192
- package/dist/components/groupcast.js.map +1 -1
- package/dist/{esm/groupcast-c6da3918.js → components/groupcast2.js} +45 -7
- package/dist/components/groupcast2.js.map +1 -0
- package/dist/components/helpers.js +1 -1
- package/dist/components/index.js +3 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/member-add.js +24 -5
- package/dist/components/member-add.js.map +1 -1
- package/dist/components/message-search2.js +4 -4
- package/dist/components/message-search2.js.map +1 -1
- package/dist/esm/{app-globals-eba1ca0c.js → app-globals-5dd18915.js} +3 -3
- package/dist/esm/{app-globals-eba1ca0c.js.map → app-globals-5dd18915.js.map} +1 -1
- package/dist/esm/attachment-preview_23.entry.js +99 -98
- package/dist/esm/attachment-preview_23.entry.js.map +1 -1
- package/dist/esm/audio-bubble_4.entry.js +1 -1
- package/dist/esm/{chat-tile_3.entry.js → chat-tile_2.entry.js} +3 -67
- package/dist/esm/chat-tile_2.entry.js.map +1 -0
- package/dist/esm/forward-memebers.entry.js +24 -5
- package/dist/esm/forward-memebers.entry.js.map +1 -1
- package/dist/esm/group-chat-contacts.entry.js +1 -1
- package/dist/esm/groupcast-e32d3b10.js +331 -0
- package/dist/esm/groupcast-e32d3b10.js.map +1 -0
- package/dist/esm/{helpers-1632a4c7.js → helpers-d452bc0f.js} +2 -2
- package/dist/esm/{helpers-1632a4c7.js.map → helpers-d452bc0f.js.map} +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/iso-group-info.entry.js +70 -0
- package/dist/esm/iso-group-info.entry.js.map +1 -0
- package/dist/esm/isometrik-webchat.js +5 -5
- package/dist/esm/loader.js +5 -5
- package/dist/esm/login-page_3.entry.js +168 -60
- package/dist/esm/login-page_3.entry.js.map +1 -1
- package/dist/esm/member-add.entry.js +25 -7
- package/dist/esm/member-add.entry.js.map +1 -1
- package/dist/esm/new-chat-sidebar.entry.js +1 -1
- package/dist/esm/{runtime-controls-bdb84aeb.js → runtime-controls-6dafba73.js} +3 -2
- package/dist/esm/runtime-controls-6dafba73.js.map +1 -0
- package/dist/esm/{groupcast-4f15b050.js → session-ed7217a7.js} +2 -18
- package/dist/esm/session-ed7217a7.js.map +1 -0
- package/dist/isometrik-webchat/index.esm.js +1 -1
- package/dist/isometrik-webchat/isometrik-webchat.esm.js +1 -1
- package/dist/isometrik-webchat/isometrik-webchat.esm.js.map +1 -1
- package/dist/isometrik-webchat/p-056f6809.entry.js +2 -0
- package/dist/isometrik-webchat/p-056f6809.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-05b33578.js +2 -0
- package/dist/isometrik-webchat/{p-57f97cef.entry.js → p-0649db69.entry.js} +2 -2
- package/dist/isometrik-webchat/p-068abd0a.entry.js +2 -0
- package/dist/isometrik-webchat/p-068abd0a.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-22404d0d.entry.js +2 -0
- package/dist/isometrik-webchat/p-22404d0d.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-7d01ccbb.js +2 -0
- package/dist/isometrik-webchat/p-7d01ccbb.js.map +1 -0
- package/dist/isometrik-webchat/p-90c38a4e.entry.js +2 -0
- package/dist/isometrik-webchat/p-90c38a4e.entry.js.map +1 -0
- package/dist/isometrik-webchat/{p-0bb42151.entry.js → p-94f0c983.entry.js} +2 -2
- package/dist/isometrik-webchat/p-ac671eb5.js +2 -0
- package/dist/isometrik-webchat/p-ac671eb5.js.map +1 -0
- package/dist/isometrik-webchat/p-b884d9ee.entry.js +2 -0
- package/dist/isometrik-webchat/p-b884d9ee.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-c4333279.entry.js +2 -0
- package/dist/isometrik-webchat/p-c4333279.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-cce7d971.js +2 -0
- package/dist/isometrik-webchat/{p-a83932d4.js.map → p-cce7d971.js.map} +1 -1
- package/dist/isometrik-webchat/{p-02db2116.entry.js → p-ec03caec.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-3dca1e56.js → p-f97e3f6d.js} +2 -2
- package/dist/types/components/ChatUIComponent/AddMember.d.ts +1 -0
- package/dist/types/components/ChatUIComponent/Footer/ChatFooter.d.ts +3 -1
- package/dist/types/components/ChatUIComponent/shared/ForwardMessageList/ForwardMessageList.d.ts +3 -0
- package/dist/types/components/ChatUIComponent/shared/GroupCast/GroupCast.d.ts +2 -11
- package/dist/types/components/my-component/web-chat/WebChat.d.ts +23 -0
- package/dist/types/components/my-component/web-chat/groupcast-draft.d.ts +23 -0
- package/dist/types/components.d.ts +13 -2
- package/dist/types/lib/chat/groupcast.d.ts +66 -0
- package/dist/types/lib/chat/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/cjs/chat-tile_3.cjs.entry.js.map +0 -1
- package/dist/cjs/groupcast-bb393c81.js.map +0 -1
- package/dist/cjs/groupcast-e1e52bd1.js +0 -213
- package/dist/cjs/groupcast-e1e52bd1.js.map +0 -1
- package/dist/cjs/runtime-controls-a70872fe.js.map +0 -1
- package/dist/components/GroupCast2.js.map +0 -1
- package/dist/esm/chat-tile_3.entry.js.map +0 -1
- package/dist/esm/groupcast-4f15b050.js.map +0 -1
- package/dist/esm/groupcast-c6da3918.js.map +0 -1
- package/dist/esm/runtime-controls-bdb84aeb.js.map +0 -1
- package/dist/isometrik-webchat/p-03933431.entry.js +0 -2
- package/dist/isometrik-webchat/p-03933431.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-1f0e8230.entry.js +0 -2
- package/dist/isometrik-webchat/p-1f0e8230.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-3a0409fc.js +0 -2
- package/dist/isometrik-webchat/p-3a0409fc.js.map +0 -1
- package/dist/isometrik-webchat/p-46be73c5.js +0 -2
- package/dist/isometrik-webchat/p-46be73c5.js.map +0 -1
- package/dist/isometrik-webchat/p-605cb14e.entry.js +0 -2
- package/dist/isometrik-webchat/p-605cb14e.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-69d953cb.entry.js +0 -2
- package/dist/isometrik-webchat/p-69d953cb.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-6c5eb178.js +0 -2
- package/dist/isometrik-webchat/p-a83932d4.js +0 -2
- package/dist/isometrik-webchat/p-b0f6f9ab.entry.js +0 -2
- package/dist/isometrik-webchat/p-b0f6f9ab.entry.js.map +0 -1
- /package/dist/isometrik-webchat/{p-6c5eb178.js.map → p-05b33578.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-57f97cef.entry.js.map → p-0649db69.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-0bb42151.entry.js.map → p-94f0c983.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-02db2116.entry.js.map → p-ec03caec.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-3dca1e56.js.map → p-f97e3f6d.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as initializeIsometrikWebchat, d as destroyIsometrikWebchat, e as ensureIsometrikWebchat, r as retainIsometrikWebchat, a as releaseIsometrikWebchat, b as isometrikWebchatApi, c as createWebChatApi, m as mountReactInSlot, f as defineReactCustomPart, u as unmountReactSlot, s as switchChatTheme, g as applyCustomTheme, t as toggleTheme, h as resolveThemeProvider, j as resolveWebChat } from './runtime-controls-
|
|
2
|
-
import { T as THEME_TOKEN_NAMES } from './
|
|
1
|
+
import { i as initializeIsometrikWebchat, d as destroyIsometrikWebchat, e as ensureIsometrikWebchat, r as retainIsometrikWebchat, a as releaseIsometrikWebchat, b as isometrikWebchatApi, c as createWebChatApi, m as mountReactInSlot, f as defineReactCustomPart, u as unmountReactSlot, s as switchChatTheme, g as applyCustomTheme, t as toggleTheme, h as resolveThemeProvider, j as resolveWebChat } from './runtime-controls-6dafba73.js';
|
|
2
|
+
import { T as THEME_TOKEN_NAMES } from './session-ed7217a7.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Expose public SDK helpers on window for www demos / script-tag hosts.
|
|
@@ -33,4 +33,4 @@ const globalScripts = appGlobalScript;
|
|
|
33
33
|
|
|
34
34
|
export { globalScripts as g };
|
|
35
35
|
|
|
36
|
-
//# sourceMappingURL=app-globals-
|
|
36
|
+
//# sourceMappingURL=app-globals-5dd18915.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"app-globals-
|
|
1
|
+
{"file":"app-globals-5dd18915.js","mappings":";;;AAAA;;;;;IAwBE,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,OAAO;IAC1C,MAAM,CAAC,GAAG,MAAa,CAAC;IACxB,CAAC,CAAC,0BAA0B,GAAG,0BAA0B,CAAC;IAC1D,CAAC,CAAC,uBAAuB,GAAG,uBAAuB,CAAC;IACpD,CAAC,CAAC,sBAAsB,GAAG,sBAAsB,CAAC;IAClD,CAAC,CAAC,sBAAsB,GAAG,sBAAsB,CAAC;IAClD,CAAC,CAAC,uBAAuB,GAAG,uBAAuB,CAAC;IACpD,CAAC,CAAC,cAAc,GAAG,0BAA0B,CAAC;IAC9C,CAAC,CAAC,WAAW,GAAG,uBAAuB,CAAC;IACxC,CAAC,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;IAC5C,CAAC,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;IACtC,CAAC,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IACxC,CAAC,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;IACtC,CAAC,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;IAChD,CAAC,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;IACtC,CAAC,CAAC,eAAe,GAAG,eAAe,CAAC;IACpC,CAAC,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;IACtC,CAAC,CAAC,WAAW,GAAG,WAAW,CAAC;IAC5B,CAAC,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;IAC9C,CAAC,CAAC,cAAc,GAAG,cAAc,CAAC;AACpC;;AC3CY,MAAC,aAAa,GAAG;;;;","names":[],"sources":["src/global/expose-sdk.ts","@stencil/core/internal/app-globals"],"sourcesContent":["/**\n * Expose public SDK helpers on window for www demos / script-tag hosts.\n * Bundlers should prefer named ESM imports from the package entry.\n */\nimport {\n initializeIsometrikWebchat,\n destroyIsometrikWebchat,\n ensureIsometrikWebchat,\n retainIsometrikWebchat,\n releaseIsometrikWebchat,\n mountReactInSlot,\n defineReactCustomPart,\n unmountReactSlot,\n createWebChatApi,\n isometrikWebchatApi,\n THEME_TOKEN_NAMES,\n switchChatTheme,\n applyCustomTheme,\n toggleTheme,\n resolveThemeProvider,\n resolveWebChat,\n} from '../sdk';\n\nexport default function () {\n if (typeof window === 'undefined') return;\n const w = window as any;\n w.initializeIsometrikWebchat = initializeIsometrikWebchat;\n w.destroyIsometrikWebchat = destroyIsometrikWebchat;\n w.ensureIsometrikWebchat = ensureIsometrikWebchat;\n w.retainIsometrikWebchat = retainIsometrikWebchat;\n w.releaseIsometrikWebchat = releaseIsometrikWebchat;\n w.initializeChat = initializeIsometrikWebchat;\n w.destroyChat = destroyIsometrikWebchat;\n w.isometrikWebchatApi = isometrikWebchatApi;\n w.createWebChatApi = createWebChatApi;\n w.THEME_TOKEN_NAMES = THEME_TOKEN_NAMES;\n w.mountReactInSlot = mountReactInSlot;\n w.defineReactCustomPart = defineReactCustomPart;\n w.unmountReactSlot = unmountReactSlot;\n w.switchChatTheme = switchChatTheme;\n w.applyCustomTheme = applyCustomTheme;\n w.toggleTheme = toggleTheme;\n w.resolveThemeProvider = resolveThemeProvider;\n w.resolveWebChat = resolveWebChat;\n}\n","import appGlobalScript from '/Users/3embed/Desktop/isometrik-webchat/src/global/expose-sdk.ts';\nexport const globalScripts = appGlobalScript;\n"],"version":3}
|
|
@@ -5,12 +5,12 @@ import { y as formatBytes, z as isOverLimit, A as usedFraction, B as shouldWarnN
|
|
|
5
5
|
import { i as isPdfAttachment, D as DoubleCheck } from './doublecheck-261763ef.js';
|
|
6
6
|
import { M } from './index.m-8c70037f.js';
|
|
7
7
|
import { drawerDialogService } from './drawer-a457d820.js';
|
|
8
|
-
import { d as clearAll, u as uniqueById, a as appendUniqueById, e as debounce, f as getFormattedTime,
|
|
8
|
+
import { d as clearAll, u as uniqueById, a as appendUniqueById, e as debounce, f as getFormattedTime, c as getDeviceID, b as getGroupcastUrlQuery, g as generateProfileImageByInitials, h as getFormattedDeliveryTime } from './helpers-d452bc0f.js';
|
|
9
9
|
import { b as getCustomPartTag, f as findWebChatHost, h as hasNamedSlot } from './index-142896ce.js';
|
|
10
10
|
import { s as showToast } from './toast-f681e916.js';
|
|
11
11
|
import { c as createStore, s as storageQuotaStore, g as groupMembersStore, u as updateConversationNotifications, w as withConversationPushFlag } from './storage-quota-6329fabe.js';
|
|
12
12
|
import { m as messagePushContextFrom, w as withHostMessagePushFields } from './local-notification-f9ae9062.js';
|
|
13
|
-
import { p as postGroupCast,
|
|
13
|
+
import { p as postGroupCast, D as DEFAULT_GROUPCAST_TITLE, n as getPresignedUrlForGroupcastMedia, i as isGroupcastDraftId, o as postGroupCastMessage, q as getGroupcastMessageReadStatus, s as getGroupcastMessageDeliveryStatus, t as deleteGroupcastMessageSelf, v as deleteGroupcastMessageEveryone } from './groupcast-e32d3b10.js';
|
|
14
14
|
import { P as PlayIcon, D as DocumentsIcon, a as PhotosIcon } from './play-05ae077a.js';
|
|
15
15
|
import { i as isometrikLogo } from './IsometrikLogo-36cb0542.js';
|
|
16
16
|
import { n as needsAdminTransferBeforeLeave, b as adminTransferCandidates, m as memberDisplayName, a as memberUserId } from './group-admin-leave-a60b9b1a.js';
|
|
@@ -489,10 +489,30 @@ const ChatSidebar = class {
|
|
|
489
489
|
this.submitMemberPicker = (selectedIds, selectedNames) => {
|
|
490
490
|
if (!(selectedIds === null || selectedIds === void 0 ? void 0 : selectedIds.length))
|
|
491
491
|
return;
|
|
492
|
-
|
|
492
|
+
const members = selectedIds.map((id, i) => ({
|
|
493
493
|
userId: id,
|
|
494
494
|
userName: (selectedNames === null || selectedNames === void 0 ? void 0 : selectedNames[i]) || id,
|
|
495
495
|
}));
|
|
496
|
+
if (this.memberPickerIsGroupCast) {
|
|
497
|
+
if (selectedIds.length < 2) {
|
|
498
|
+
showToast({
|
|
499
|
+
message: 'Select at least 2 recipients for a groupcast',
|
|
500
|
+
type: 'error',
|
|
501
|
+
position: 'bottom-right',
|
|
502
|
+
});
|
|
503
|
+
return;
|
|
504
|
+
}
|
|
505
|
+
this.showMemberPicker = false;
|
|
506
|
+
this.showNewChat = false;
|
|
507
|
+
this.pendingGroupMembers = [];
|
|
508
|
+
this.el.dispatchEvent(new CustomEvent('groupcast-draft-ready', {
|
|
509
|
+
detail: { members },
|
|
510
|
+
bubbles: true,
|
|
511
|
+
composed: true,
|
|
512
|
+
}));
|
|
513
|
+
return;
|
|
514
|
+
}
|
|
515
|
+
this.pendingGroupMembers = members;
|
|
496
516
|
this.selectedGroupUserIds = selectedIds;
|
|
497
517
|
this.showMemberPicker = false;
|
|
498
518
|
this.showGroupInfo = true;
|
|
@@ -1302,6 +1322,9 @@ const ChatSidebar = class {
|
|
|
1302
1322
|
}
|
|
1303
1323
|
async handleGroupSubmitted(event) {
|
|
1304
1324
|
const { conversationTitle, imageFile, selectedUserIds, isGroupCast, selectedUsers } = event.detail;
|
|
1325
|
+
// Groupcast uses lazy create (groupcast-draft-ready); not this form.
|
|
1326
|
+
if (isGroupCast)
|
|
1327
|
+
return;
|
|
1305
1328
|
try {
|
|
1306
1329
|
this.isGroupCreationLoading = true;
|
|
1307
1330
|
let conversationImageUrl = '';
|
|
@@ -1460,7 +1483,7 @@ const ChatSidebar = class {
|
|
|
1460
1483
|
}
|
|
1461
1484
|
render() {
|
|
1462
1485
|
const filteredConversations = (this.sortedConversationList || []).filter((tile) => conversationMatchesSearch(tile, this.searchQuery));
|
|
1463
|
-
return (h("div", { key: '
|
|
1486
|
+
return (h("div", { key: 'ba7c00d29272c4645a3554b400e27fc588addb56', class: "chat-sidebar-container", style: { backgroundColor: this.sidebarColor || undefined } }, this.isGroupCreationLoading && (h("div", { key: '78d764f8af984da76a108c15aacf2fe83e628819', class: "loader" }, h("spinner-loader", { key: '06f5fbf342060935780f8309a07e24db398e89bd', height: "30px", width: "30px", spinTime: "1s", spinnerPrimaryColor: "var(--bg-primary)", spinnerSecondaryColor: "var(--text-primary)", spinnerBorderWidth: "2px" }))), this.showGroupInfo ? (h("div", { class: "new-chat-panel" }, h("iso-group-info", { label: this.memberPickerIsGroupCast ? 'Create New Groupcast' : 'Create New Group', selectedUserIds: this.pendingGroupMembers.map(m => m.userId), selectedUsers: this.pendingGroupMembers, isGroupCast: this.memberPickerIsGroupCast, closeGroupInfo: this.closeGroupInfoStep, afterCreate: this.finishGroupInfoStep }))) : this.showMemberPicker ? (h("div", { class: "new-chat-panel" }, h("div", { class: "picker-back" }, h("button", { type: "button", onClick: this.closeMemberPicker, "aria-label": "Back" }, h("img", { class: "theme-icon", src: Left_Arrow, alt: "" })), h("h2", { class: "picker-title" }, this.memberPickerIsGroupCast ? 'New Group Cast' : 'New Group')), h("searchable-list", { label: this.memberPickerIsGroupCast ? 'New Group Cast' : 'New Group', hideTopbar: true, contactList: this.nonBlockedContacts, isSearching: true, isLoading: this.isLoadingMember, hasMore: this.hasMoreMembers, skip: this.skip, paginationLoading: this.isPaginationMember, getForwardMessageMemberList: (query, skip) => this.getAllGroupMemeber(query || '', skip || 0), onSend: this.submitMemberPicker, height: "100%" }))) : this.showNewChat ? (h("div", { class: "new-chat-panel" }, h("new-chat", { contactList: this.nonBlockedContacts, isLoading: this.isLoadingMember, hasMore: this.hasMoreMembers, skip: this.skip, paginationLoading: this.isPaginationMember, onSearch: (query, skip) => this.getAllMemeber(query || '', skip || 0), onSelect: this.handleNewChatContactPick, onClose: () => this.closeNewChat(), customParts: this.customParts, groupcastEnabled: this.groupcastEnabled }))) : ([
|
|
1464
1487
|
h("div", { class: "chat-sidebar-top" }, h("div", { class: "chat-sidebar-header-row" }, this.isSidebarHeaderLabel ? (h("h1", { class: "chat-sidebar-header" }, this.sidebarHeaderLabel || 'Chats')) : (h("span", null)), h("div", { class: "chat-sidebar-actions" }, this.showMqttStatus !== false ? (h("span", { class: { 'mqtt-status': true, 'is-offline': !this.isMqttConnected }, title: this.isMqttConnected ? 'Realtime connected' : 'Realtime disconnected', "aria-label": this.isMqttConnected ? 'MQTT connected' : 'MQTT disconnected' }, h("span", { class: { 'mqtt-status-dot': true, 'is-connected': !!this.isMqttConnected } }), this.isMqttConnected ? 'Live' : 'Offline')) : null, h("button", { type: "button", class: "icon-btn", title: "New Chat", onClick: () => this.openNewChat() }, h("img", { src: New_Chat, alt: "New chat" })), h("div", { class: "more-wrap" }, h("button", { type: "button", class: "icon-btn", title: "More Options", "aria-label": "More options", "aria-haspopup": "menu", "aria-expanded": this.showMoreMenu ? 'true' : 'false', onClick: this.toggleMoreMenu }, h("img", { class: "theme-icon", src: Three_Dots, alt: "" })), this.showMoreMenu ? (h("div", { class: "more-menu", role: "menu" }, h("button", { type: "button", class: "more-item", role: "menuitem", onClick: this.onNewGroupFromMenu }, h("img", { class: "theme-icon", src: New_Group, alt: "" }), h("span", null, "New group")), h("div", { class: "more-divider" }), h("button", { type: "button", class: "more-item danger", role: "menuitem", onClick: this.onLogoutFromMenu }, h("img", { class: "theme-icon", src: Logout, alt: "" }), h("span", null, "Log out")))) : null))), this.isSidebarHeaderSearch !== false ? (h("div", { class: "chat-sidebar-search" }, h("input", { type: "search", placeholder: "Search or start new chat", value: this.searchQuery, onInput: (e) => this.handleSearch(e) }))) : null, this.renderStorageQuotaBanner()),
|
|
1465
1488
|
h("div", { class: "chat-sidebar-list", onScroll: (e) => this.handleListScroll(e) }, this.isConversationLoading ? (h("div", { class: "chat-sidebar-loading" }, h("spinner-loader", { height: "15px", width: "15px", spinTime: "1s", spinnerPrimaryColor: "var(--bg-primary)", spinnerSecondaryColor: "var(--text-primary)", spinnerBorderWidth: "2px" }))) : filteredConversations.length > 0 ? (filteredConversations.map((tile) => this.renderConversationTile(tile))) : (h("div", { class: "chat-sidebar-empty" }, "No conversation found")), this.isLoading && this.hasMoreConversations && (h("div", { class: "chat-sidebar-loading" }, h("spinner-loader", { height: "15px", width: "15px", spinTime: "1s", spinnerPrimaryColor: "var(--bg-primary)", spinnerSecondaryColor: "var(--text-primary)", spinnerBorderWidth: "2px" })))),
|
|
1466
1489
|
])));
|
|
@@ -1528,6 +1551,7 @@ const GroupCast = class {
|
|
|
1528
1551
|
registerInstance(this, hostRef);
|
|
1529
1552
|
this.groupcastTileSelected = createEvent(this, "groupcastTileSelected", 7);
|
|
1530
1553
|
this.groupcastScrolledToBottom = createEvent(this, "groupcastScrolledToBottom", 7);
|
|
1554
|
+
this.groupcastDraftReady = createEvent(this, "groupcast-draft-ready", 7);
|
|
1531
1555
|
this.handleScroll = (event) => {
|
|
1532
1556
|
const target = event.target;
|
|
1533
1557
|
const isBottom = target.scrollHeight - target.scrollTop <= target.clientHeight + 100;
|
|
@@ -1564,14 +1588,10 @@ const GroupCast = class {
|
|
|
1564
1588
|
};
|
|
1565
1589
|
this.openCreate = () => {
|
|
1566
1590
|
this.showMemberPicker = true;
|
|
1567
|
-
this.showGroupInfo = false;
|
|
1568
|
-
this.pendingMembers = [];
|
|
1569
1591
|
this.getMembers('', 0);
|
|
1570
1592
|
};
|
|
1571
1593
|
this.closeCreate = () => {
|
|
1572
1594
|
this.showMemberPicker = false;
|
|
1573
|
-
this.showGroupInfo = false;
|
|
1574
|
-
this.pendingMembers = [];
|
|
1575
1595
|
this.nonBlockedContacts = [];
|
|
1576
1596
|
};
|
|
1577
1597
|
this.getMembers = async (searchTag = '', skip = 0) => {
|
|
@@ -1611,30 +1631,20 @@ const GroupCast = class {
|
|
|
1611
1631
|
this.onMembersNext = (selectedIds, selectedNames) => {
|
|
1612
1632
|
if (!(selectedIds === null || selectedIds === void 0 ? void 0 : selectedIds.length))
|
|
1613
1633
|
return;
|
|
1614
|
-
|
|
1634
|
+
if (selectedIds.length < 2) {
|
|
1635
|
+
showToast({
|
|
1636
|
+
message: 'Select at least 2 recipients for a groupcast',
|
|
1637
|
+
type: 'error',
|
|
1638
|
+
position: 'bottom-right',
|
|
1639
|
+
});
|
|
1640
|
+
return;
|
|
1641
|
+
}
|
|
1642
|
+
const members = selectedIds.map((id, i) => ({
|
|
1615
1643
|
userId: id,
|
|
1616
1644
|
userName: (selectedNames === null || selectedNames === void 0 ? void 0 : selectedNames[i]) || id,
|
|
1617
1645
|
}));
|
|
1618
|
-
this.
|
|
1619
|
-
this.
|
|
1620
|
-
};
|
|
1621
|
-
this.backToMembers = () => {
|
|
1622
|
-
this.showGroupInfo = false;
|
|
1623
|
-
this.showMemberPicker = true;
|
|
1624
|
-
};
|
|
1625
|
-
this.getPresignedUrl = async (file) => {
|
|
1626
|
-
var _a;
|
|
1627
|
-
const mediaExtension = file.name.split('.').pop();
|
|
1628
|
-
const res = await M.getInstance().user.getPresignedurlCreate({
|
|
1629
|
-
userIdentifier: (_a = this.userMetaData) === null || _a === void 0 ? void 0 : _a.userIdentifier,
|
|
1630
|
-
mediaExtension,
|
|
1631
|
-
});
|
|
1632
|
-
await fetch(res.presignedUrl, {
|
|
1633
|
-
method: 'PUT',
|
|
1634
|
-
body: file,
|
|
1635
|
-
headers: { 'Content-Type': file.type },
|
|
1636
|
-
});
|
|
1637
|
-
return res.mediaUrl;
|
|
1646
|
+
this.closeCreate();
|
|
1647
|
+
this.groupcastDraftReady.emit({ members });
|
|
1638
1648
|
};
|
|
1639
1649
|
this.groupCastData = [];
|
|
1640
1650
|
this.isLoadingMore = undefined;
|
|
@@ -1645,15 +1655,11 @@ const GroupCast = class {
|
|
|
1645
1655
|
this.isContextMenuOpen = false;
|
|
1646
1656
|
this.selectedTileForMenu = undefined;
|
|
1647
1657
|
this.showMemberPicker = false;
|
|
1648
|
-
this.showGroupInfo = false;
|
|
1649
|
-
this.pendingMembers = [];
|
|
1650
1658
|
this.nonBlockedContacts = [];
|
|
1651
1659
|
this.skip = 0;
|
|
1652
1660
|
this.hasMoreMembers = false;
|
|
1653
1661
|
this.isLoadingMember = false;
|
|
1654
1662
|
this.isPaginationMember = false;
|
|
1655
|
-
this.isCreating = false;
|
|
1656
|
-
this.onCreated = undefined;
|
|
1657
1663
|
}
|
|
1658
1664
|
async componentDidLoad() {
|
|
1659
1665
|
document.addEventListener('menu-item-selected', this.handleMenuItemSelected);
|
|
@@ -1683,49 +1689,6 @@ const GroupCast = class {
|
|
|
1683
1689
|
this.isContextMenuOpen = true;
|
|
1684
1690
|
this.selectedTileForMenu = tile;
|
|
1685
1691
|
}
|
|
1686
|
-
async handleCreateSubmitted(event) {
|
|
1687
|
-
var _a;
|
|
1688
|
-
const { conversationTitle, imageFile, selectedUserIds, selectedUsers } = event.detail || {};
|
|
1689
|
-
try {
|
|
1690
|
-
this.isCreating = true;
|
|
1691
|
-
// Empty → avatar fallback (avoid broken CDN placeholder X).
|
|
1692
|
-
let groupcastImageUrl = '';
|
|
1693
|
-
if (imageFile)
|
|
1694
|
-
groupcastImageUrl = await this.getPresignedUrl(imageFile);
|
|
1695
|
-
const members = (selectedUserIds || []).map((id) => {
|
|
1696
|
-
const user = selectedUsers === null || selectedUsers === void 0 ? void 0 : selectedUsers.find((u) => (u === null || u === void 0 ? void 0 : u.userId) === id);
|
|
1697
|
-
return {
|
|
1698
|
-
newConversationTypingEvents: true,
|
|
1699
|
-
newConversationReadEvents: true,
|
|
1700
|
-
newConversationPushNotificationsEvents: true,
|
|
1701
|
-
newConversationMetadata: {},
|
|
1702
|
-
memberId: id,
|
|
1703
|
-
newConversationCustomType: 'Groupcast',
|
|
1704
|
-
userName: (user === null || user === void 0 ? void 0 : user.userName) || id,
|
|
1705
|
-
};
|
|
1706
|
-
});
|
|
1707
|
-
const trimmedGroupcastImage = (groupcastImageUrl || '').trim();
|
|
1708
|
-
const res = await postGroupCast(Object.assign(Object.assign({ groupcastTitle: conversationTitle }, (trimmedGroupcastImage ? { groupcastImageUrl: trimmedGroupcastImage } : {})), { searchableTags: [conversationTitle], metaData: { description: 'groupcast created', members: selectedUsers }, customType: 'groupcast', members }));
|
|
1709
|
-
this.closeCreate();
|
|
1710
|
-
const groupcastId = res.groupcastId;
|
|
1711
|
-
const created = Object.assign(Object.assign({ groupcastId, groupcastTitle: conversationTitle }, (trimmedGroupcastImage ? { groupcastImageUrl: trimmedGroupcastImage } : {})), { membersCount: members.length, createdAt: Date.now(), metaData: { description: 'groupcast created' } });
|
|
1712
|
-
(_a = this.onCreated) === null || _a === void 0 ? void 0 : _a.call(this, created);
|
|
1713
|
-
const url = new URL(window.location.href);
|
|
1714
|
-
url.search = '';
|
|
1715
|
-
url.searchParams.set('groupcast', groupcastId);
|
|
1716
|
-
window.history.pushState({}, '', url);
|
|
1717
|
-
this.groupcastTileSelected.emit({ groupcastId });
|
|
1718
|
-
showToast({ message: 'Group Cast created successfully', type: 'success', position: 'bottom-right' });
|
|
1719
|
-
}
|
|
1720
|
-
catch (error) {
|
|
1721
|
-
console.error(error);
|
|
1722
|
-
showToast({ message: 'Failed to create group cast', type: 'error', position: 'bottom-right' });
|
|
1723
|
-
}
|
|
1724
|
-
finally {
|
|
1725
|
-
this.isCreating = false;
|
|
1726
|
-
this.closeCreate();
|
|
1727
|
-
}
|
|
1728
|
-
}
|
|
1729
1692
|
renderList() {
|
|
1730
1693
|
if (!this.groupCastData) {
|
|
1731
1694
|
return h("div", { class: "empty" }, "Unable to load groupcast chats");
|
|
@@ -1756,12 +1719,6 @@ const GroupCast = class {
|
|
|
1756
1719
|
});
|
|
1757
1720
|
}
|
|
1758
1721
|
render() {
|
|
1759
|
-
if (this.showGroupInfo) {
|
|
1760
|
-
return (h("div", { class: "group-cast-container", style: { position: 'relative' } }, this.isCreating ? (h("div", { class: "loader" }, h("spinner-loader", { height: "30px", width: "30px" }))) : null, h("div", { class: "create-panel" }, h("iso-group-info", { label: "Create New Groupcast", selectedUserIds: this.pendingMembers.map(m => m.userId), selectedUsers: this.pendingMembers, isGroupCast: true, closeGroupInfo: this.backToMembers, afterCreate: () => {
|
|
1761
|
-
this.showGroupInfo = false;
|
|
1762
|
-
this.showMemberPicker = false;
|
|
1763
|
-
} }))));
|
|
1764
|
-
}
|
|
1765
1722
|
if (this.showMemberPicker) {
|
|
1766
1723
|
return (h("div", { class: "group-cast-container" }, h("div", { class: "create-panel" }, h("div", { class: "picker-back" }, h("button", { type: "button", onClick: this.closeCreate, "aria-label": "Back" }, "\u2190")), h("searchable-list", { label: "New Group Cast", contactList: this.nonBlockedContacts, isSearching: true, isLoading: this.isLoadingMember, hasMore: this.hasMoreMembers, skip: this.skip, paginationLoading: this.isPaginationMember, getForwardMessageMemberList: (query, skip) => this.getMembers(query || '', skip || 0), onSend: this.onMembersNext, height: "100%" }))));
|
|
1767
1724
|
}
|
|
@@ -1775,7 +1732,7 @@ const GroupCast = class {
|
|
|
1775
1732
|
}
|
|
1776
1733
|
get element() { return getElement(this); }
|
|
1777
1734
|
};
|
|
1778
|
-
GroupCast.style = ":host {\n display: block;\n height: 100%;\n background: var(--bg-primary, var(--bg-primary-color));\n color: var(--text-primary, var(--text-primary-color));\n }\n .group-cast-container {\n padding: 20px 0 20px 20px;\n height: 96%;\n display: flex;\n flex-direction: column;\n gap: 5px;\n box-sizing: border-box;\n }\n .group-cast-header-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0 20px 0 0;\n }\n .group-cast-header {\n font-size: var(--title-font-size, 24px);\n font-weight: 600;\n margin: 0;\n }\n .icon-btn {\n border: none;\n background: transparent;\n cursor: pointer;\n padding: 0;\n display: flex;\n align-items: center;\n }\n .icon-btn img {\n width: 28px;\n height: 28px;\n }\n .group-cast-body {\n flex: 1;\n min-height: 0;\n overflow: hidden auto;\n padding: 0 15px 0 0;\n }\n .group-cast-body::-webkit-scrollbar { width: 5px; }\n .group-cast-body::-webkit-scrollbar-track { background: transparent; }\n .group-cast-body::-webkit-scrollbar-thumb {\n background-color: var(--bg-secondary, var(--bg-secondary-color)) !important;\n border-radius: 10px;\n }\n chat-tile:hover {\n background-color: var(--bg-secondary, var(--bg-secondary-color)) !important;\n }\n .create-panel {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0;\n height: 100%;\n padding-right: 20px;\n }\n .create-panel searchable-list
|
|
1735
|
+
GroupCast.style = ":host {\n display: block;\n height: 100%;\n background: var(--bg-primary, var(--bg-primary-color));\n color: var(--text-primary, var(--text-primary-color));\n }\n .group-cast-container {\n padding: 20px 0 20px 20px;\n height: 96%;\n display: flex;\n flex-direction: column;\n gap: 5px;\n box-sizing: border-box;\n }\n .group-cast-header-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0 20px 0 0;\n }\n .group-cast-header {\n font-size: var(--title-font-size, 24px);\n font-weight: 600;\n margin: 0;\n }\n .icon-btn {\n border: none;\n background: transparent;\n cursor: pointer;\n padding: 0;\n display: flex;\n align-items: center;\n }\n .icon-btn img {\n width: 28px;\n height: 28px;\n }\n .group-cast-body {\n flex: 1;\n min-height: 0;\n overflow: hidden auto;\n padding: 0 15px 0 0;\n }\n .group-cast-body::-webkit-scrollbar { width: 5px; }\n .group-cast-body::-webkit-scrollbar-track { background: transparent; }\n .group-cast-body::-webkit-scrollbar-thumb {\n background-color: var(--bg-secondary, var(--bg-secondary-color)) !important;\n border-radius: 10px;\n }\n chat-tile:hover {\n background-color: var(--bg-secondary, var(--bg-secondary-color)) !important;\n }\n .create-panel {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0;\n height: 100%;\n padding-right: 20px;\n }\n .create-panel searchable-list {\n display: block;\n flex: 1;\n min-height: 0;\n height: 100%;\n }\n .picker-back {\n display: flex;\n align-items: center;\n padding: 0 0 8px;\n }\n .picker-back button {\n border: none;\n background: transparent;\n color: inherit;\n font-size: 18px;\n cursor: pointer;\n }\n .empty {\n text-align: center;\n padding: 20px;\n color: var(--text-tertiary, var(--text-tertiary-color));\n }\n .theme-icon { filter: var(--svg-icon-filter); }";
|
|
1779
1736
|
|
|
1780
1737
|
const WebChatHeader = class {
|
|
1781
1738
|
constructor(hostRef) {
|
|
@@ -1987,11 +1944,19 @@ const WebChatHeader = class {
|
|
|
1987
1944
|
this.menuOpen = false;
|
|
1988
1945
|
}
|
|
1989
1946
|
title() {
|
|
1990
|
-
var _a;
|
|
1947
|
+
var _a, _b, _c, _d;
|
|
1991
1948
|
const d = this.conversationDetails || {};
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1949
|
+
if (d.groupcastId) {
|
|
1950
|
+
const title = d.groupcastTitle;
|
|
1951
|
+
if (!title || title === DEFAULT_GROUPCAST_TITLE) {
|
|
1952
|
+
const n = (_c = (_a = d.membersCount) !== null && _a !== void 0 ? _a : (_b = d.members) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0;
|
|
1953
|
+
if (n > 0)
|
|
1954
|
+
return `${n} Recipients Selected`;
|
|
1955
|
+
}
|
|
1956
|
+
return title || this.displayTitle || '';
|
|
1957
|
+
}
|
|
1958
|
+
return (this.displayTitle ||
|
|
1959
|
+
(d.isGroup ? d.conversationTitle : (_d = d.opponentDetails) === null || _d === void 0 ? void 0 : _d.userName) ||
|
|
1995
1960
|
'');
|
|
1996
1961
|
}
|
|
1997
1962
|
avatarSrc() {
|
|
@@ -2077,10 +2042,10 @@ const WebChatHeader = class {
|
|
|
2077
2042
|
const groupcast = this.isGroupcast();
|
|
2078
2043
|
const isGroup = !!((_a = this.conversationDetails) === null || _a === void 0 ? void 0 : _a.isGroup) && !groupcast;
|
|
2079
2044
|
const showBlock = !groupcast && !((_b = this.conversationDetails) === null || _b === void 0 ? void 0 : _b.isGroup);
|
|
2080
|
-
return (h(Fragment, { key: '
|
|
2045
|
+
return (h(Fragment, { key: 'c68bdc0943a8cc40e5c824f7db173837abceb47c' }, h("div", { key: '54c2e8da13e855def886ab2dd032e53f256ac90b', class: "head-container", style: {
|
|
2081
2046
|
backgroundColor: this.headerBgColor || undefined,
|
|
2082
2047
|
color: this.headerUsernameColor || undefined,
|
|
2083
|
-
} }, h("div", { key: '
|
|
2048
|
+
} }, h("div", { key: '65fe7a87cf1f6d8592a0520e8d8330000b8232b7', class: "head-left" }, h("button", { key: '6bab0547697d7cf42181840c29eb09ac4fbe9670', class: "back-button", type: "button", onClick: () => typeof this.onBackButtonClick === 'function' && this.onBackButtonClick(), "aria-label": "Back" }, h("img", { key: 'dab7d02b39cdba326dfef6a98f0766f025c5d7d6', class: "theme-icon", src: Left_Arrow, alt: "" })), h("div", { key: '52bac68e64e3d3544b58d29673a0b6d6184868a4', class: "identity", onClick: this.handleTextClick }, h("profile-avatar", { key: 'cf6ad330b5390f027f09da32e00f6f2809a29fdd', src: this.avatarSrc(), name: this.title(), size: "var(--avatar-sm)", isGroup: this.avatarIsGroup() }), h("div", { key: '25333a9f60b44307fb4997af01eb8bac7cd069f7', class: "text-container" }, h("div", { key: '2df66ba46c912a15bd0ce1967b29fbc9e5bd4aa4', class: "title" }, this.title()), h("div", { key: 'be4b3217e2062a47a010449c78f7d112d63b5808', class: "subtitle", style: { color: this.headerLastSeenColor || undefined } }, this.subtitle(formattedLastSeen))))), h("div", { key: '8a7669948f4481f9c8ab21df0ed91079701676a6', 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: 'd5e70edf9f5d66bae8c2b308ea12a776d7b811be', class: "more-wrap" }, h("button", { key: 'bf4401660fa67ee3d45b7832a420a9e1b41278fd', 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: '62aa9d892f20715623b8e921d53c81aad8ffed3a', class: "theme-icon", src: Three_Dots, alt: "" })), this.menuOpen ? (h("div", { class: "more-menu", role: "menu" }, isGroup ? (h(Fragment, null, this.isSelfAdmin() ? (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"))) : null, 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")), !isGroup ? (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)) : 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: '53b3961296cc5c5bbb0b62fbe2cf99a77675a8a6', class: "loading-overlay" }, h("spinner-loader", { key: '452252d887289026b1633128565371cb12fba34f', height: "30px", width: "30px", spinTime: "1s", spinnerPrimaryColor: "var(--bg-primary)", spinnerSecondaryColor: "var(--text-primary)", spinnerBorderWidth: "2px" })))));
|
|
2084
2049
|
}
|
|
2085
2050
|
get el() { return getElement(this); }
|
|
2086
2051
|
static get watchers() { return {
|
|
@@ -5720,6 +5685,7 @@ const ChatFooter = class {
|
|
|
5720
5685
|
this.conversationDetails = {};
|
|
5721
5686
|
this.allConversationList = [];
|
|
5722
5687
|
this.updateConversationListProp = undefined;
|
|
5688
|
+
this.ensureGroupcastReady = undefined;
|
|
5723
5689
|
this.showCamera = false;
|
|
5724
5690
|
this.linkPreview = '';
|
|
5725
5691
|
this.linkToPreview = '';
|
|
@@ -5843,7 +5809,24 @@ const ChatFooter = class {
|
|
|
5843
5809
|
conversation: this.conversationDetails,
|
|
5844
5810
|
});
|
|
5845
5811
|
if (isGroupcast) {
|
|
5846
|
-
|
|
5812
|
+
let resolvedGroupcastId = groupcastId;
|
|
5813
|
+
if (isGroupcastDraftId(groupcastId) && this.ensureGroupcastReady) {
|
|
5814
|
+
try {
|
|
5815
|
+
resolvedGroupcastId = await this.ensureGroupcastReady();
|
|
5816
|
+
this.groupcastId = resolvedGroupcastId;
|
|
5817
|
+
}
|
|
5818
|
+
catch (err) {
|
|
5819
|
+
console.error(err);
|
|
5820
|
+
showToast({
|
|
5821
|
+
message: (err === null || err === void 0 ? void 0 : err.message) || 'Could not create groupcast',
|
|
5822
|
+
type: 'error',
|
|
5823
|
+
position: 'bottom-right',
|
|
5824
|
+
});
|
|
5825
|
+
this.changeMessageSendingState(false);
|
|
5826
|
+
return;
|
|
5827
|
+
}
|
|
5828
|
+
}
|
|
5829
|
+
const payloadForGroupcastMessage = withHostMessagePushFields(Object.assign({ showInConversation: true, sendPushForNewConversationCreated: true, searchableTags: this.generateSearchableTags(body), metaData: this.getReplyMetadata(), body: body, groupcastId: resolvedGroupcastId, readCount: 1, notifyOnCompletion: true, messageType: this.replyMessage ? 2 : 0, hideNewConversationsForSender: true, encrypted: true, deviceId: this.deviceId, deliveryCount: 1, customType: (body === null || body === void 0 ? void 0 : body.match(/(https?:\/\/[^\s]+)/g))
|
|
5847
5830
|
? 'AttachmentMessage:Link'
|
|
5848
5831
|
: 'AttachmentMessage:Text' }, (mentionedUsers.length > 0 && { mentionedUsers })), pushContext, this.el);
|
|
5849
5832
|
try {
|
|
@@ -6064,7 +6047,23 @@ const ChatFooter = class {
|
|
|
6064
6047
|
deviceId: this.deviceId,
|
|
6065
6048
|
metaData: this.getReplyMetadata(),
|
|
6066
6049
|
}, pushContext, this.el);
|
|
6067
|
-
let
|
|
6050
|
+
let resolvedGroupcastId = this.groupcastId;
|
|
6051
|
+
if (this.isGroupcast && isGroupcastDraftId(String(resolvedGroupcastId)) && this.ensureGroupcastReady) {
|
|
6052
|
+
try {
|
|
6053
|
+
resolvedGroupcastId = await this.ensureGroupcastReady();
|
|
6054
|
+
this.groupcastId = resolvedGroupcastId;
|
|
6055
|
+
}
|
|
6056
|
+
catch (err) {
|
|
6057
|
+
console.error(err);
|
|
6058
|
+
showToast({
|
|
6059
|
+
message: (err === null || err === void 0 ? void 0 : err.message) || 'Could not create groupcast',
|
|
6060
|
+
type: 'error',
|
|
6061
|
+
position: 'bottom-right',
|
|
6062
|
+
});
|
|
6063
|
+
return;
|
|
6064
|
+
}
|
|
6065
|
+
}
|
|
6066
|
+
let payloadForGroupcastMessage = withHostMessagePushFields(Object.assign(Object.assign({}, payload), { hideNewConversationsForSender: false, groupcastId: resolvedGroupcastId, notifyOnCompletion: true, sendPushForNewConversationCreated: true }), pushContext, this.el);
|
|
6068
6067
|
const mentionedUsers = this.mentionedUsersForApi(caption);
|
|
6069
6068
|
if (mentionedUsers.length > 0) {
|
|
6070
6069
|
payload['mentionedUsers'] = mentionedUsers;
|
|
@@ -6130,7 +6129,7 @@ const ChatFooter = class {
|
|
|
6130
6129
|
const webChat = findWebChatHost(this.el);
|
|
6131
6130
|
const hasCustomReply = (webChat ? hasNamedSlot(webChat, 'reply-preview') : false) || hasNamedSlot(this.el, 'reply-preview');
|
|
6132
6131
|
const showAttachment = this.attachmentDetails || this.showCamera;
|
|
6133
|
-
return (h(Host, { key: '
|
|
6132
|
+
return (h(Host, { key: '3523142e7c942228bda8f3ff08ab160d3ab29350', class: { 'attachment-open': !!showAttachment } }, h("div", { key: '4127452ec1c81f7ccd83070f04b22be1b7a14f4b', class: "chat-footer-container" }, showAttachment ? (h("slot", { name: "attachment-preview" }, h("attachment-preview", { showCamera: this.showCamera, onClose: this.handleClearAttachment, width: "150px", height: "150px", bgColor: "var(--bg-primary-light)", padding: "3px", margin: "10px 0 0 0", contentType: contentType, content: this.mediaPreviews, onSend: this.handleSendMessage, "onfile-uploaded": this.handleFileUpload, "onattachment-removed": this.handleRemoveAttachment, "oncamera-retake": this.handleCameraRetake, key: this.inputKey, inputValue: this.messageBody, "oninput-change": this.handleInputChange, backgroundColor: "var(--bg-primary-color)", containerBoxShadow: "none", inputFontColor: "var(--text-primary-color)", inputBorderRadius: "10px", conversationDetails: this.conversationDetails, userMetaData: this.userMetaData }))) : (h(Fragment, null, hasCustomReply ? h("slot", { name: "reply-preview" }) : null, h("slot", { name: "composer-input" }, !hasCustomReply && this.replyMessage ? (h("reply-block", { messageBody: (_a = this.replyMessage) === null || _a === void 0 ? void 0 : _a.body, messageInfo: this.replyMessage, senderName: ((_b = this.userMetaData) === null || _b === void 0 ? void 0 : _b.userId) === ((_d = (_c = this.replyMessage) === null || _c === void 0 ? void 0 : _c.senderInfo) === null || _d === void 0 ? void 0 : _d.userId)
|
|
6134
6133
|
? 'You'
|
|
6135
6134
|
: (_f = (_e = this.replyMessage) === null || _e === void 0 ? void 0 : _e.senderInfo) === null || _f === void 0 ? void 0 : _f.userName, onIconClick: this.handleremoveReplyMessage })) : null, h("div", { class: "composer-wrap", key: this.inputKey, ref: el => (this.composerWrapRef = el) }, this.showEmojiPicker ? (h("div", { class: "emoji-panel", style: this.emojiPanelStyle }, h("div", { class: "emoji-panel-header" }, h("span", null, "Emoji"), h("button", { class: "emoji-panel-close", type: "button", "aria-label": "Close", onClick: this.handleEmojiToggle }, "\u00D7")), h("emoji-picker", { class: "emoji-picker light", ref: this.bindEmojiPicker }))) : null, h("div", { class: { composer: true, recording: this.isRecording } }, this.isRecording ? (h("div", { class: "rec-body" }, h("div", { class: "rec-left" }, h("button", { class: "rec-icon-btn danger", type: "button", title: "Delete recording", "aria-label": "Delete recording", onClick: this.handleRecDelete }, h("img", { class: "theme-icon", src: Delete, alt: "" })), h("div", { class: "rec-timer-wrap" }, h("span", { class: { 'rec-dot': true, live: !this.isPaused } }), h("span", { class: "rec-timer" }, this.formatRecTime(this.recordingSeconds)))), h("div", { class: "rec-wave" }, h("audio-bubble", { liveRecord: true, audioProgressColor: "#2563eb", audioWaveColor: "#2563eb", ref: el => (this.recBubble = el), onRecordingProgress: this.onRecordingProgress, onRecordingError: this.onRecordingError })), h("button", { class: { 'rec-icon-btn': true, 'rec-toggle': true, pause: !this.isPaused }, type: "button", title: this.isPaused ? 'Resume recording' : 'Pause recording', "aria-label": this.isPaused ? 'Resume recording' : 'Pause recording', onClick: this.handleRecPauseToggle }, h("img", { class: "theme-icon", src: this.isPaused ? PlayIcon : PauseIcon, alt: "" })), h("button", { class: "rec-send", type: "button", title: "Send voice note", "aria-label": "Send voice note", onClick: this.handleRecSend }, h("img", { src: Send, alt: "" })))) : (h(Fragment, null, h("div", { class: "attach-wrap" }, h("button", { class: "icon-btn", type: "button", title: "Attach file", "aria-label": "Attach", onClick: this.handleAttachClick }, h("img", { src: Attachment, alt: "" })), this.showAttachMenu ? (h("div", { class: "attach-menu", style: this.attachMenuStyle }, h("button", { class: "attach-opt", type: "button", onClick: this.pickDocument }, h("span", { class: "attach-opt-icon attach-opt-icon--doc" }, h("img", { src: DocumentsIcon, alt: "" })), h("span", null, "Document")), h("button", { class: "attach-opt", type: "button", onClick: this.pickPhotos }, h("span", { class: "attach-opt-icon attach-opt-icon--photos" }, h("img", { class: "theme-icon", src: PhotosIcon, alt: "" })), h("span", null, "Photos & videos")), h("button", { class: "attach-opt", type: "button", onClick: this.pickCamera }, h("span", { class: "attach-opt-icon attach-opt-icon--camera" }, h("img", { class: "theme-icon", src: CameraIcon, alt: "" })), h("span", null, "Camera")))) : null), h("button", { class: "icon-btn", type: "button", title: "Emojis", "aria-label": "Emojis", onClick: this.handleEmojiToggle }, h("img", { src: Smile, alt: "" })), h("input", { class: "file-input", type: "file", multiple: true, accept: ".jpg,.jpeg,.png,.gif,.webp,.bmp,.heic,.mp4,.mov,.webm,.mkv,.mp3,.wav,.m4a,.aac,.ogg", ref: el => (this.mediaInputRef = el), onChange: this.handleNativeFileChange }), h("input", { class: "file-input", type: "file", multiple: true, accept: ".pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt,.csv,.rtf,application/*", ref: el => (this.docInputRef = el), onChange: this.handleNativeFileChange }), h("textarea", { class: "composer-input", rows: 1, placeholder: "Type a message", value: this.messageBody, ref: el => (this.inputRef = el), onInput: this.handleComposerInput, onKeyDown: this.handleComposerKeyDown, onPaste: this.handleComposerPaste }), this.messageBody.trim() ? (h("button", { class: "icon-btn", type: "button", title: "Send", "aria-label": "Send", onClick: this.handleSendMessage }, h("img", { src: Send, alt: "" }))) : (h("button", { class: "icon-btn", type: "button", title: "Voice note", "aria-label": "Voice note", onClick: this.handleMicClick }, h("img", { src: Microphone, alt: "" })))))))))))));
|
|
6136
6135
|
}
|
|
@@ -6512,6 +6511,7 @@ const ContactInfo = class {
|
|
|
6512
6511
|
});
|
|
6513
6512
|
};
|
|
6514
6513
|
this.openAddMember = () => {
|
|
6514
|
+
var _a;
|
|
6515
6515
|
if (!this.isSelfAdmin())
|
|
6516
6516
|
return;
|
|
6517
6517
|
const id = this.groupcastId || this.conversationId;
|
|
@@ -6521,6 +6521,7 @@ const ContactInfo = class {
|
|
|
6521
6521
|
selectedConversationId: id,
|
|
6522
6522
|
conversationId: id,
|
|
6523
6523
|
isGroupcast: !!this.isGroupcast || !!this.groupcastId,
|
|
6524
|
+
metaData: (_a = this.conversationMetaData) === null || _a === void 0 ? void 0 : _a.metaData,
|
|
6524
6525
|
});
|
|
6525
6526
|
};
|
|
6526
6527
|
this.startTitleEdit = (e) => {
|
|
@@ -6855,9 +6856,9 @@ const ContactInfo = class {
|
|
|
6855
6856
|
render() {
|
|
6856
6857
|
const members = this.isGroupcast ? this.groupcastMembers || [] : this.groupMembers || [];
|
|
6857
6858
|
const isGroup = !!(this.isGroup || this.isGroupcast);
|
|
6858
|
-
return (h("div", { key: '
|
|
6859
|
+
return (h("div", { key: '4c2dccbd52cfc7ebe82d59fa1d7b971000997b3b', class: "panel" }, !this.infoMediaListOpen ? (h("div", { class: "header" }, h("button", { class: "close-btn", type: "button", "aria-label": "Close", title: "Close", onClick: () => this.close() }, h("img", { class: "theme-icon", src: CancelIcon, alt: "" })), h("h2", null, isGroup ? 'Group info' : 'Contact info'))) : null, h("div", { key: '27f75b9b69e23705882843b1c5b88a6655693e7a', class: "body", style: this.infoMediaListOpen
|
|
6859
6860
|
? { flex: '1', display: 'flex', flexDirection: 'column', minHeight: '0', overflow: 'hidden' }
|
|
6860
|
-
: undefined }, !this.infoMediaListOpen ? (h("div", { class: "card hero" }, h("div", { class: "hero-avatar-wrap" }, h("profile-avatar", { src: this.contactImage || '', name: this.contactName || '?', size: "7rem", isGroup: isGroup }), this.canEditGroupInfo() ? (h("button", { class: "photo-edit-btn", type: "button", "aria-label": "Change group photo", title: "Change group photo", disabled: this.imageUploading, onClick: this.openImagePicker }, h("img", { class: "theme-icon", src: CameraAddIcon, alt: "" }))) : null, h("input", { type: "file", accept: "image/*", hidden: true, ref: el => (this.imageFileInput = el), onChange: this.onImageFileChange })), this.titleEditing ? (h("div", { class: "title-edit-row" }, h("input", { class: "title-edit-input", type: "text", maxlength: 100, value: this.titleDraft, "aria-label": "Group name", onInput: this.onTitleDraftInput, onKeyDown: this.onTitleDraftKeyDown }), h("button", { class: "title-edit-save", type: "button", onClick: this.saveTitleEdit }, "Save"), h("button", { class: "title-edit-cancel", type: "button", onClick: this.cancelTitleEdit }, "Cancel"))) : (h("div", { class: "hero-name-row" }, h("h3", { class: "hero-name" }, this.contactName || 'Unknown'), this.canEditGroupInfo() ? (h("button", { class: "title-edit-btn", type: "button", "aria-label": "Edit group name", title: "Edit group name", onClick: this.startTitleEdit }, h("img", { class: "theme-icon", src: EditIcon, alt: "" }))) : null)), isGroup ? (h("p", { class: "hero-meta" }, "Group \u00B7 ", h("span", { class: "count" }, members.length, " members"))) : this.contactEmail ? (h("p", { class: "hero-meta" }, this.contactEmail)) : null)) : null, h("info-panel-media", { key: '
|
|
6861
|
+
: undefined }, !this.infoMediaListOpen ? (h("div", { class: "card hero" }, h("div", { class: "hero-avatar-wrap" }, h("profile-avatar", { src: this.contactImage || '', name: this.contactName || '?', size: "7rem", isGroup: isGroup }), this.canEditGroupInfo() ? (h("button", { class: "photo-edit-btn", type: "button", "aria-label": "Change group photo", title: "Change group photo", disabled: this.imageUploading, onClick: this.openImagePicker }, h("img", { class: "theme-icon", src: CameraAddIcon, alt: "" }))) : null, h("input", { type: "file", accept: "image/*", hidden: true, ref: el => (this.imageFileInput = el), onChange: this.onImageFileChange })), this.titleEditing ? (h("div", { class: "title-edit-row" }, h("input", { class: "title-edit-input", type: "text", maxlength: 100, value: this.titleDraft, "aria-label": "Group name", onInput: this.onTitleDraftInput, onKeyDown: this.onTitleDraftKeyDown }), h("button", { class: "title-edit-save", type: "button", onClick: this.saveTitleEdit }, "Save"), h("button", { class: "title-edit-cancel", type: "button", onClick: this.cancelTitleEdit }, "Cancel"))) : (h("div", { class: "hero-name-row" }, h("h3", { class: "hero-name" }, this.contactName || 'Unknown'), this.canEditGroupInfo() ? (h("button", { class: "title-edit-btn", type: "button", "aria-label": "Edit group name", title: "Edit group name", onClick: this.startTitleEdit }, h("img", { class: "theme-icon", src: EditIcon, alt: "" }))) : null)), isGroup ? (h("p", { class: "hero-meta" }, "Group \u00B7 ", h("span", { class: "count" }, members.length, " members"))) : this.contactEmail ? (h("p", { class: "hero-meta" }, this.contactEmail)) : null)) : null, h("info-panel-media", { key: '5062cfc6469a6faf05dd89b3ab6a2dbb20acdaf5', ref: el => (this.mediaPanelRef = el), allAttachments: this.allAttachments, allLinks: this.allLinks, allLinksCount: this.allLinksCount, conversationId: this.conversationId, onMediaListOpenChange: this.onMediaListOpenChange }), !this.infoMediaListOpen && isGroup ? (h("div", { class: "card" }, h("div", { class: "members-head" }, members.length, " members"), this.isSelfAdmin() ? (h("button", { type: "button", class: "add-member-row", onClick: this.openAddMember }, h("span", { class: "add-member-icon" }, h("img", { class: "theme-icon", src: AddUserIcon, alt: "" })), h("span", null, "Add member"))) : null, members.map((m) => {
|
|
6861
6862
|
var _a, _b, _c;
|
|
6862
6863
|
const isSelf = m.userId === ((_a = this.userMetaData) === null || _a === void 0 ? void 0 : _a.userId);
|
|
6863
6864
|
const canManage = this.isSelfAdmin() && !isSelf;
|
|
@@ -7016,7 +7017,7 @@ const MessageSearch = class {
|
|
|
7016
7017
|
this.onSearchHandler(query);
|
|
7017
7018
|
}, 500);
|
|
7018
7019
|
this.onInput = (e) => {
|
|
7019
|
-
const value =
|
|
7020
|
+
const value = e.target.value || '';
|
|
7020
7021
|
this.searchValue = value;
|
|
7021
7022
|
this.debouncedSearch(value);
|
|
7022
7023
|
};
|
|
@@ -7056,12 +7057,12 @@ const MessageSearch = class {
|
|
|
7056
7057
|
return text || '';
|
|
7057
7058
|
const esc = q.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
7058
7059
|
return String(text)
|
|
7059
|
-
.split(new RegExp(`(${esc})`, '
|
|
7060
|
-
.map((part, i) => (part
|
|
7060
|
+
.split(new RegExp(`(${esc})`, 'g'))
|
|
7061
|
+
.map((part, i) => (part === q ? h("span", { class: "hit", key: i }, part) : part));
|
|
7061
7062
|
}
|
|
7062
7063
|
render() {
|
|
7063
7064
|
const results = this.searchedMessageDetails || [];
|
|
7064
|
-
return (h("div", { key: '
|
|
7065
|
+
return (h("div", { key: 'f974d61f345d826542b3ed930ac9593e7116d19e', class: "panel", onClick: e => e.stopPropagation() }, h("div", { key: 'c3bd4d1ff017f363fda20d33f9326d298bc6b4a7', class: "header" }, h("button", { key: '52a69e649d336b7bd62e358d07575e9bc31ad61c', class: "icon-btn", type: "button", "aria-label": "Close", onClick: () => this.closeSearch() }, h("img", { key: 'fa53c6faf6f3eba7642630c583a802e7a8d693cf', class: "theme-icon", src: CancelIcon, alt: "" })), h("h3", { key: '97d0cb42cc31cf024128dee83096d98a189e2c1c', class: "title" }, "Search messages")), h("div", { key: '50428bbca2b2a8659eeef745c770e2a146bb2b4a', class: "search-wrap" }, h("div", { key: '523403917721237a6502e61970a9809e85776aa9', class: "search-bar" }, h("img", { key: 'a1adf0dac5c992b0b3e3a88da63220ad7c337afd', class: "theme-icon search-icon", src: Search, alt: "" }), h("input", { key: '0b0149ba1426e95bfc2148ddb39040035b711d3f', type: "text", placeholder: "Search", value: this.searchValue, onInput: this.onInput, autofocus: true }), this.searchValue ? (h("button", { class: "clear-btn", type: "button", "aria-label": "Clear", onClick: this.clearInput }, h("img", { class: "theme-icon", src: CancelIcon, alt: "" }))) : null)), h("div", { key: 'c45c12f41704a489e5f946008bd92d5ad648a5fc', class: "results" }, this.isLoadingMessage ? (h("div", { class: "empty" }, h("spinner-loader", { height: "15px", width: "15px" }))) : results.length === 0 ? (h("div", { class: "empty" }, h("p", null, this.searchValue ? 'No results found' : 'Search for messages'))) : (results.map(message => (h("div", { class: "row", onClick: () => this.handleResultClick(message.messageId) }, h("span", { class: "date" }, this.formatDate(message.sentAt)), h("span", { class: "body" }, this.highlight(message.body)))))))));
|
|
7065
7066
|
}
|
|
7066
7067
|
};
|
|
7067
7068
|
MessageSearch.style = ":host {\n display: block;\n height: 100%;\n font-family: var(--font-primary);\n color: var(--text-primary);\n }\n .panel {\n display: flex;\n flex-direction: column;\n height: 100%;\n box-sizing: border-box;\n background: var(--bg-primary);\n }\n .header {\n height: 4rem;\n padding: 0 var(--space-16);\n display: flex;\n align-items: center;\n gap: var(--gap-12);\n border-bottom: 1px solid var(--border);\n flex-shrink: 0;\n box-sizing: border-box;\n }\n .icon-btn {\n width: var(--control);\n height: var(--control);\n border: none;\n border-radius: var(--rounded-full);\n background: transparent;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n color: var(--icon);\n flex-shrink: 0;\n }\n .icon-btn:hover { background: var(--hover-overlay); color: var(--text-primary); }\n .icon-btn img {\n width: var(--icon-sm);\n height: var(--icon-sm);\n display: block;\n }\n .title {\n margin: 0;\n font-size: var(--text-16);\n font-weight: var(--fw-600);\n color: var(--text-primary);\n }\n .search-wrap {\n padding: var(--space-16) var(--space-16) var(--space-8);\n border-bottom: 1px solid var(--border-subtle);\n }\n .search-bar {\n position: relative;\n display: flex;\n align-items: center;\n }\n .search-icon {\n position: absolute;\n left: 0.75rem;\n width: 1.125rem;\n height: 1.125rem;\n opacity: 0.55;\n pointer-events: none;\n }\n .search-bar input {\n width: 100%;\n box-sizing: border-box;\n border: none;\n outline: none;\n border-radius: var(--rounded-8);\n background: var(--bg-input);\n color: var(--text-primary);\n font-size: var(--text-14);\n font-family: var(--font-primary);\n padding: var(--gap-8) 2.25rem var(--gap-8) 2.25rem;\n }\n .search-bar input::placeholder { color: var(--text-tertiary); }\n .search-bar input:focus {\n box-shadow: 0 0 0 2px var(--focus-ring);\n }\n .clear-btn {\n position: absolute;\n right: 0.5rem;\n width: 1.75rem;\n height: 1.75rem;\n border: none;\n border-radius: var(--rounded-full);\n background: transparent;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n color: var(--text-tertiary);\n }\n .clear-btn:hover { color: var(--text-secondary); }\n .clear-btn img { width: 0.875rem; height: 0.875rem; display: block; }\n .results {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n }\n .empty {\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 2rem;\n text-align: center;\n box-sizing: border-box;\n }\n .empty p {\n margin: 0;\n max-width: 15rem;\n font-size: var(--text-12);\n color: var(--text-tertiary);\n line-height: 1.6;\n }\n .row {\n display: flex;\n flex-direction: column;\n gap: var(--gap-4);\n padding: var(--space-12) var(--space-16);\n border-bottom: 1px solid var(--border-subtle);\n cursor: pointer;\n }\n .row:hover { background: var(--hover-overlay); }\n .date {\n font-size: var(--text-12);\n color: var(--text-secondary);\n }\n .body {\n font-size: var(--text-14);\n color: var(--text-primary);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .hit {\n background-color: var(--brand, #2563eb);\n color: var(--text-on-brand, #ffffff);\n border-radius: var(--rounded-2);\n padding: 0 2px;\n }\n .theme-icon { filter: var(--svg-icon-filter); }";
|