@burdenoff/fe-libs 2026.527.3 → 2026.527.4
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/chrome/ContextSwitcher.js +90 -339
- package/dist/chrome/GlobalSearch.js +72 -456
- package/dist/chrome/NotificationCenter.js +69 -703
- package/dist/chrome/SideNavigation.js +73 -241
- package/dist/chrome/contextSwitcher/EmptyState.js +32 -0
- package/dist/chrome/contextSwitcher/OrganizationList.js +34 -0
- package/dist/chrome/contextSwitcher/ProjectList.js +34 -0
- package/dist/chrome/contextSwitcher/SearchInput.js +50 -0
- package/dist/chrome/contextSwitcher/TabButton.js +9 -0
- package/dist/chrome/contextSwitcher/TriggerButton.js +38 -0
- package/dist/chrome/contextSwitcher/WorkspaceList.js +34 -0
- package/dist/chrome/contextSwitcher/icons.js +58 -0
- package/dist/chrome/contextSwitcher/useIsMobile.js +11 -0
- package/dist/chrome/globalSearch/AdvancedFiltersPanel.js +253 -0
- package/dist/chrome/globalSearch/CategoryTabs.js +28 -0
- package/dist/chrome/globalSearch/ResultsList.js +58 -0
- package/dist/chrome/globalSearch/SearchInput.js +28 -0
- package/dist/chrome/globalSearch/SearchModeBar.js +36 -0
- package/dist/chrome/globalSearch/useAdvancedFilters.js +78 -0
- package/dist/chrome/globalSearch/utils.js +22 -0
- package/dist/chrome/notificationCenter/BellButton.js +27 -0
- package/dist/chrome/notificationCenter/NotificationCardItem.js +129 -0
- package/dist/chrome/notificationCenter/NotificationFilters.js +67 -0
- package/dist/chrome/notificationCenter/NotificationFooter.js +23 -0
- package/dist/chrome/notificationCenter/NotificationHeader.js +75 -0
- package/dist/chrome/notificationCenter/NotificationList.js +75 -0
- package/dist/chrome/notificationCenter/NotificationPanel.js +19 -0
- package/dist/chrome/notificationCenter/SkeletonCard.js +18 -0
- package/dist/chrome/notificationCenter/constants.js +93 -0
- package/dist/chrome/notificationCenter/gql.js +58 -0
- package/dist/chrome/notificationCenter/useNotificationCenter.js +149 -0
- package/dist/chrome/notificationCenter/usePanelChrome.js +36 -0
- package/dist/chrome/sideNavigation/CollapseToggle.js +29 -0
- package/dist/chrome/sideNavigation/MobileActionsBar.js +25 -0
- package/dist/chrome/sideNavigation/NavItemRenderer.js +79 -0
- package/dist/chrome/sideNavigation/SidebarHeader.js +29 -0
- package/dist/chrome/sideNavigation/helpers.js +19 -0
- package/dist/chrome/sideNavigation/useSideNavigationState.js +45 -0
- package/dist/shared/components/ContextConversationWidget.js +173 -767
- package/dist/shared/components/contextConversationWidget/Composer.js +66 -0
- package/dist/shared/components/contextConversationWidget/MessageItem.js +124 -0
- package/dist/shared/components/contextConversationWidget/MessageList.js +32 -0
- package/dist/shared/components/contextConversationWidget/NoWorkspaceCard.js +19 -0
- package/dist/shared/components/contextConversationWidget/PendingAttachmentsBar.js +28 -0
- package/dist/shared/components/contextConversationWidget/ReplyBanner.js +32 -0
- package/dist/shared/components/contextConversationWidget/WidgetHeader.js +70 -0
- package/dist/shared/components/contextConversationWidget/queries.js +197 -0
- package/dist/shared/components/contextConversationWidget/types.js +10 -0
- package/dist/shared/components/contextConversationWidget/useAttachmentUpload.js +57 -0
- package/dist/shared/components/contextConversationWidget/useConversationSubscriptions.js +26 -0
- package/dist/shared/components/contextConversationWidget/useMessageActions.js +34 -0
- package/dist/shared/components/contextConversationWidget/useSendMessage.js +45 -0
- package/dist/shared/components/contextConversationWidget/useWidgetMessages.js +44 -0
- package/dist/shared/components/contextConversationWidget/utils.js +56 -0
- package/dist/shared/pages/SearchPage.js +293 -1076
- package/dist/shared/pages/searchPage/ActiveFilterChips.js +176 -0
- package/dist/shared/pages/searchPage/FiltersPanel.js +329 -0
- package/dist/shared/pages/searchPage/ResultsList.js +119 -0
- package/dist/shared/pages/searchPage/ResultsStatus.js +32 -0
- package/dist/shared/pages/searchPage/SearchInput.js +31 -0
- package/dist/shared/pages/searchPage/SearchPagination.js +37 -0
- package/dist/shared/pages/searchPage/SearchToolbar.js +58 -0
- package/dist/shared/pages/searchPage/constants.js +155 -0
- package/dist/shared/pages/searchPage/utils.js +24 -0
- package/dist/shared/providers/shell/AuthProvider.js +130 -384
- package/dist/shared/providers/shell/authProvider/bridgeStateSync.js +34 -0
- package/dist/shared/providers/shell/authProvider/jwt.js +13 -0
- package/dist/shared/providers/shell/authProvider/ssoRelay.js +38 -0
- package/dist/shared/providers/shell/authProvider/useAuthActions.js +170 -0
- package/dist/shared/providers/shell/authProvider/useBridgeInitialization.js +86 -0
- package/dist/shared/providers/shell/authProvider/useRemoteSLO.js +32 -0
- package/dist/shared/providers/shell/authProvider/useStorageSync.js +35 -0
- package/dist/shared/providers/shell/authProvider/useTokenExpiryTimer.js +37 -0
- package/dist/shared/tours/TourTrigger.js +86 -262
- package/dist/shared/tours/ToursContext.js +108 -398
- package/dist/shared/tours/tourTrigger/DesktopTourDropdown.js +48 -0
- package/dist/shared/tours/tourTrigger/MobileTourSheet.js +68 -0
- package/dist/shared/tours/tourTrigger/TourListItemDesktop.js +36 -0
- package/dist/shared/tours/tourTrigger/TourListItemMobile.js +47 -0
- package/dist/shared/tours/tourTrigger/TourStatusChip.js +30 -0
- package/dist/shared/tours/tourTrigger/TourTriggerButton.js +22 -0
- package/dist/shared/tours/toursContext/errors.js +18 -0
- package/dist/shared/tours/toursContext/gql.js +152 -0
- package/dist/shared/tours/toursContext/route.js +20 -0
- package/dist/shared/tours/toursContext/session.js +19 -0
- package/dist/shared/tours/toursContext/useIdleReady.js +18 -0
- package/dist/shared/tours/toursContext/useTourMutations.js +118 -0
- package/dist/tag/TagsWidget.js +81 -226
- package/dist/tag/tagsWidget/AddTagTrigger.js +14 -0
- package/dist/tag/tagsWidget/TagBadgeList.js +17 -0
- package/dist/tag/tagsWidget/TagSearchPopover.js +80 -0
- package/dist/tag/tagsWidget/operations.js +64 -0
- package/dist/tag/tagsWidget/useVocabResolver.js +30 -0
- package/package.json +1 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ADD_REACTION as e, DELETE_MESSAGE as t, EDIT_MESSAGE as n, PIN_MESSAGE as r, REMOVE_REACTION as i, UNPIN_MESSAGE as a } from "./queries.js";
|
|
2
|
+
import { useMutation as o } from "@apollo/client/react";
|
|
3
|
+
//#region src/shared/components/contextConversationWidget/useMessageActions.ts
|
|
4
|
+
function s({ client: s, currentUserId: c, refetchMessages: l }) {
|
|
5
|
+
let [u] = o(n, { client: s }), [d] = o(t, { client: s }), [f] = o(e, { client: s }), [p] = o(i, { client: s }), [m] = o(r, { client: s }), [h] = o(a, { client: s });
|
|
6
|
+
return {
|
|
7
|
+
saveEdit: async (e, t) => {
|
|
8
|
+
await u({ variables: { input: {
|
|
9
|
+
id: e,
|
|
10
|
+
content: { text: t }
|
|
11
|
+
} } }), await l();
|
|
12
|
+
},
|
|
13
|
+
toggleReaction: async (e, t) => {
|
|
14
|
+
e.reactions.some((e) => e.emoji === t && e.userId === c) ? await p({ variables: {
|
|
15
|
+
messageId: e.id,
|
|
16
|
+
emoji: t
|
|
17
|
+
} }) : await f({ variables: {
|
|
18
|
+
messageId: e.id,
|
|
19
|
+
emoji: t
|
|
20
|
+
} }), await l();
|
|
21
|
+
},
|
|
22
|
+
togglePin: async (e) => {
|
|
23
|
+
e.isPinned ? await h({ variables: { messageId: e.id } }) : await m({ variables: { messageId: e.id } }), await l();
|
|
24
|
+
},
|
|
25
|
+
deleteMessageAction: async (e) => {
|
|
26
|
+
await d({ variables: {
|
|
27
|
+
id: e.id,
|
|
28
|
+
hard: !1
|
|
29
|
+
} }), await l();
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { s as useMessageActions };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { SEND_CONTEXT_MESSAGE as e } from "./queries.js";
|
|
2
|
+
import { useState as t } from "react";
|
|
3
|
+
//#region src/shared/components/contextConversationWidget/useSendMessage.ts
|
|
4
|
+
function n({ client: n, workspaceId: r, onError: i }) {
|
|
5
|
+
let [a, o] = t(!1);
|
|
6
|
+
return {
|
|
7
|
+
isSending: a,
|
|
8
|
+
send: async (t) => {
|
|
9
|
+
if (!r || !t.text.trim()) return null;
|
|
10
|
+
o(!0);
|
|
11
|
+
try {
|
|
12
|
+
let i = await n.mutate({
|
|
13
|
+
mutation: e,
|
|
14
|
+
errorPolicy: "none",
|
|
15
|
+
variables: { input: {
|
|
16
|
+
workspaceId: r,
|
|
17
|
+
sourceContext: {
|
|
18
|
+
...t.resolvedContext,
|
|
19
|
+
threadKey: t.conversationThreadKey ?? t.resolvedContext.threadKey
|
|
20
|
+
},
|
|
21
|
+
content: { text: t.text.trim() },
|
|
22
|
+
type: "TEXT",
|
|
23
|
+
parentMessageId: t.parentMessageId,
|
|
24
|
+
mentionUserIds: Array.from(new Set(t.mentionUserIds)),
|
|
25
|
+
attachments: t.attachments.map((e) => ({
|
|
26
|
+
fileId: e.fileId,
|
|
27
|
+
fileName: e.fileName,
|
|
28
|
+
fileSize: e.fileSize,
|
|
29
|
+
mimeType: e.mimeType,
|
|
30
|
+
downloadUrl: e.downloadUrl
|
|
31
|
+
}))
|
|
32
|
+
} }
|
|
33
|
+
});
|
|
34
|
+
if (!i.data?.sendContextMessage?.success) throw Error("Failed to send message");
|
|
35
|
+
return i.data.sendContextMessage.message?.conversationId ? String(i.data.sendContextMessage.message.conversationId) : null;
|
|
36
|
+
} catch (e) {
|
|
37
|
+
return i(e instanceof Error ? e.message : "Failed to send message"), null;
|
|
38
|
+
} finally {
|
|
39
|
+
o(!1);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { n as useSendMessage };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { extractTextContent as e } from "./utils.js";
|
|
2
|
+
import { useMemo as t } from "react";
|
|
3
|
+
//#region src/shared/components/contextConversationWidget/useWidgetMessages.ts
|
|
4
|
+
function n(n) {
|
|
5
|
+
return t(() => (n?.messages?.edges ?? []).map((t) => {
|
|
6
|
+
let n = t.node, r = n.permissions;
|
|
7
|
+
return {
|
|
8
|
+
id: String(n.id ?? ""),
|
|
9
|
+
conversationId: String(n.conversationId ?? ""),
|
|
10
|
+
content: e(n.content),
|
|
11
|
+
authorId: String(n.authorId ?? ""),
|
|
12
|
+
parentMessageId: n.parentMessageId ? String(n.parentMessageId) : void 0,
|
|
13
|
+
threadLevel: Number(n.threadLevel ?? 0),
|
|
14
|
+
replyCount: Number(n.replyCount ?? 0),
|
|
15
|
+
createdAt: String(n.createdAt ?? (/* @__PURE__ */ new Date()).toISOString()),
|
|
16
|
+
updatedAt: String(n.updatedAt ?? (/* @__PURE__ */ new Date()).toISOString()),
|
|
17
|
+
isEdited: !!n.isEdited,
|
|
18
|
+
isPinned: !!n.isPinned,
|
|
19
|
+
permissions: {
|
|
20
|
+
canEdit: !!r?.canEdit,
|
|
21
|
+
canDelete: !!r?.canDelete,
|
|
22
|
+
canReact: !!(r?.canReact ?? !0),
|
|
23
|
+
canReply: !!(r?.canReply ?? !0),
|
|
24
|
+
canPin: !!r?.canPin
|
|
25
|
+
},
|
|
26
|
+
reactions: (n.reactions ?? []).map((e) => ({
|
|
27
|
+
id: String(e.id ?? ""),
|
|
28
|
+
emoji: String(e.emoji ?? ""),
|
|
29
|
+
userId: String(e.userId ?? "")
|
|
30
|
+
})),
|
|
31
|
+
attachments: (n.attachments ?? []).map((e) => ({
|
|
32
|
+
id: String(e.id ?? ""),
|
|
33
|
+
fileId: String(e.fileId ?? ""),
|
|
34
|
+
fileName: String(e.fileName ?? e.fileId ?? "Attachment"),
|
|
35
|
+
fileSize: Number(e.fileSize ?? 0),
|
|
36
|
+
mimeType: String(e.mimeType ?? "application/octet-stream"),
|
|
37
|
+
downloadUrl: e.downloadUrl ? String(e.downloadUrl) : null,
|
|
38
|
+
thumbnail: e.thumbnail ? String(e.thumbnail) : null
|
|
39
|
+
}))
|
|
40
|
+
};
|
|
41
|
+
}), [n]);
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { n as useWidgetMessages };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
//#region src/shared/components/contextConversationWidget/utils.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
return e.trim().toLowerCase().replace(/[^a-z0-9:_/-]+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
4
|
+
}
|
|
5
|
+
function t(t) {
|
|
6
|
+
if (typeof t != "string" || !t.trim()) return null;
|
|
7
|
+
try {
|
|
8
|
+
let n = typeof window < "u" ? window.location.origin : "http://local";
|
|
9
|
+
return e(new URL(t, n).pathname);
|
|
10
|
+
} catch {
|
|
11
|
+
return e(t.split(/[?#]/)[0] ?? t);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
function n(e) {
|
|
15
|
+
return typeof e == "string" && e.trim() ? e : null;
|
|
16
|
+
}
|
|
17
|
+
function r(e) {
|
|
18
|
+
if (!e || typeof e != "object" || Array.isArray(e)) return null;
|
|
19
|
+
let t = e.metadata;
|
|
20
|
+
if (!t || typeof t != "object" || Array.isArray(t)) return null;
|
|
21
|
+
let n = t.sourceContext;
|
|
22
|
+
return n && typeof n == "object" && !Array.isArray(n) ? n : null;
|
|
23
|
+
}
|
|
24
|
+
function i(e, r) {
|
|
25
|
+
if (!e) return !1;
|
|
26
|
+
let i = n(e.product);
|
|
27
|
+
if (i && i !== r.product) return !1;
|
|
28
|
+
let a = n(e.widgetKey);
|
|
29
|
+
if (a && a !== r.widgetKey) return !1;
|
|
30
|
+
if (n(e.threadKey) === r.threadKey) return !0;
|
|
31
|
+
let o = n(e.entityType), s = n(e.entityId);
|
|
32
|
+
if (o && s && o === r.entityType && s === r.entityId) return !0;
|
|
33
|
+
let c = [t(e.pagePath), t(e.contextHref)].filter((e) => !!e), l = [t(r.pagePath), t(r.contextHref)].filter((e) => !!e);
|
|
34
|
+
return c.some((e) => l.includes(e));
|
|
35
|
+
}
|
|
36
|
+
function a(e) {
|
|
37
|
+
if (typeof e == "string") return e;
|
|
38
|
+
if (e && typeof e == "object") {
|
|
39
|
+
let t = e;
|
|
40
|
+
if (typeof t.text == "string") return t.text;
|
|
41
|
+
if (typeof t.markdown == "string") return t.markdown;
|
|
42
|
+
if (typeof t.html == "string") return t.html;
|
|
43
|
+
}
|
|
44
|
+
return "";
|
|
45
|
+
}
|
|
46
|
+
function o(e) {
|
|
47
|
+
return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
48
|
+
}
|
|
49
|
+
function s(e) {
|
|
50
|
+
return new Date(e).toLocaleTimeString([], {
|
|
51
|
+
hour: "2-digit",
|
|
52
|
+
minute: "2-digit"
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
//#endregion
|
|
56
|
+
export { a as extractTextContent, o as formatFileSize, s as formatTimestamp, r as getSourceContext, n as getString, e as normalizeThreadSegment, i as sourceContextMatches };
|