@burdenoff/fe-libs 2026.527.2 → 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/button/Button.js +18 -16
- package/dist/chrome/AccountSwitcher.js +10 -7
- package/dist/chrome/AutoBreadcrumbs.js +2 -0
- package/dist/chrome/Breadcrumbs.js +2 -0
- package/dist/chrome/CommandPalette.js +5 -3
- package/dist/chrome/ContextSwitcher.js +90 -338
- package/dist/chrome/DynamicFooter.js +7 -7
- package/dist/chrome/Footer.js +5 -5
- package/dist/chrome/GeographySwitcher.js +3 -3
- package/dist/chrome/GlobalSearch.js +73 -448
- package/dist/chrome/HeaderBar.js +6 -1
- package/dist/chrome/LanguagePickerSheet.js +1 -1
- package/dist/chrome/LanguageSwitcher.js +2 -2
- package/dist/chrome/NotificationCenter.js +69 -694
- package/dist/chrome/PanelTabs.js +7 -4
- package/dist/chrome/PluginContextMenuTarget.js +1 -1
- package/dist/chrome/ProductPickerSheet.js +4 -4
- package/dist/chrome/ProductSideNav.js +1 -1
- package/dist/chrome/ProductSwitcher.js +3 -3
- package/dist/chrome/ProfileSwitcher.js +13 -8
- package/dist/chrome/ShortcutHelpDialog.js +2 -1
- package/dist/chrome/SideNavigation.js +75 -239
- package/dist/chrome/Sidebar.js +1 -0
- 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/form/Checkbox.js +17 -15
- package/dist/form/FormDescription.js +9 -10
- package/dist/form/FormField.js +11 -12
- package/dist/form/FormLabel.js +13 -13
- package/dist/form/FormMessage.js +10 -11
- package/dist/form/Input.js +11 -10
- package/dist/form/Radio.js +25 -21
- package/dist/form/Select.js +81 -66
- package/dist/form/Textarea.js +10 -9
- package/dist/shared/components/AccessDenied.js +8 -4
- package/dist/shared/components/AppErrorBoundary.js +2 -0
- package/dist/shared/components/ContextConversationWidget.js +173 -767
- package/dist/shared/components/ErrorFallback.js +3 -0
- package/dist/shared/components/PWAInstallBanner.js +8 -4
- package/dist/shared/components/RequireAuth.js +4 -4
- package/dist/shared/components/SSORedirectGuard.js +1 -1
- 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/feature-flags/FeatureFlagProvider.js +21 -21
- package/dist/shared/geography/GeographyProvider.js +20 -20
- package/dist/shared/graphql/GatewayContext.js +1 -1
- package/dist/shared/motion/MotionList.js +1 -1
- package/dist/shared/pages/AiPage.js +3 -3
- package/dist/shared/pages/SearchPage.js +293 -1071
- 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/plugins/PluginRuntimeProvider.js +1 -1
- package/dist/shared/providers/shell/ActiveContextProvider.js +12 -12
- package/dist/shared/providers/shell/AppShellContext.js +1 -1
- package/dist/shared/providers/shell/AuthProvider.js +130 -384
- package/dist/shared/providers/shell/AuthTokenProvider.js +6 -6
- package/dist/shared/providers/shell/ContextManagerProvider.js +1 -1
- package/dist/shared/providers/shell/FeatureFlagsProvider.js +5 -5
- package/dist/shared/providers/shell/GlobalUiProvider.js +17 -17
- package/dist/shared/providers/shell/I18nProvider.js +15 -15
- package/dist/shared/providers/shell/PageConversationContextProvider.js +14 -14
- package/dist/shared/providers/shell/PermissionProvider.js +16 -16
- package/dist/shared/providers/shell/ShellUiProvider.js +13 -13
- package/dist/shared/providers/shell/ThemeProvider.js +9 -9
- 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/TourPlayer.js +1 -0
- package/dist/shared/tours/TourPlayerProvider.js +1 -1
- package/dist/shared/tours/TourTooltip.js +3 -0
- package/dist/shared/tours/TourTrigger.js +86 -259
- 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/shared-events.js +3 -3
- package/dist/shared-hooks.js +1 -1
- package/dist/storage/SaveToFilesButton.js +3 -3
- package/dist/storage/SaveToFilesDialog.js +1 -1
- package/dist/tag/TagBadge.js +1 -1
- 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/dist/ui/card.js +44 -39
- package/dist/ui/dropdown-menu.js +82 -66
- package/dist/ui/input.js +10 -10
- package/dist/ui/label.js +13 -11
- package/dist/ui/select.js +80 -66
- package/dist/ui/table.js +61 -54
- package/dist/ui/textarea.js +9 -9
- package/dist/ui/tooltip.js +13 -11
- package/package.json +1 -1
|
@@ -25,14 +25,17 @@ function i({ error: i, resetErrorBoundary: a }) {
|
|
|
25
25
|
/* @__PURE__ */ n("div", {
|
|
26
26
|
className: "flex gap-3 justify-center",
|
|
27
27
|
children: s ? /* @__PURE__ */ n("button", {
|
|
28
|
+
type: "button",
|
|
28
29
|
onClick: c,
|
|
29
30
|
className: "px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover font-medium",
|
|
30
31
|
children: "Reload page"
|
|
31
32
|
}) : /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n("button", {
|
|
33
|
+
type: "button",
|
|
32
34
|
onClick: a,
|
|
33
35
|
className: "px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover font-medium",
|
|
34
36
|
children: "Try again"
|
|
35
37
|
}), /* @__PURE__ */ n("button", {
|
|
38
|
+
type: "button",
|
|
36
39
|
onClick: c,
|
|
37
40
|
className: "px-4 py-2 bg-transparent text-text-secondary border border-border-default rounded-md hover:bg-bg-surface-hover font-medium",
|
|
38
41
|
children: "Reload page"
|
|
@@ -31,7 +31,7 @@ function c({ productName: c = "App", brandInitial: l = "B" }) {
|
|
|
31
31
|
className: "flex items-start gap-3",
|
|
32
32
|
children: [/* @__PURE__ */ o("div", {
|
|
33
33
|
className: "flex-shrink-0",
|
|
34
|
-
children: /* @__PURE__ */ o(i, { className: "
|
|
34
|
+
children: /* @__PURE__ */ o(i, { className: "size-5 text-status-info-text" })
|
|
35
35
|
}), /* @__PURE__ */ s("div", {
|
|
36
36
|
className: "flex-1 min-w-0",
|
|
37
37
|
children: [
|
|
@@ -50,6 +50,7 @@ function c({ productName: c = "App", brandInitial: l = "B" }) {
|
|
|
50
50
|
/* @__PURE__ */ o("div", {
|
|
51
51
|
className: "mt-3 flex gap-2",
|
|
52
52
|
children: /* @__PURE__ */ o("button", {
|
|
53
|
+
type: "button",
|
|
53
54
|
onClick: m,
|
|
54
55
|
className: "px-3 py-1.5 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors",
|
|
55
56
|
children: "Refresh Now"
|
|
@@ -69,7 +70,7 @@ function c({ productName: c = "App", brandInitial: l = "B" }) {
|
|
|
69
70
|
/* @__PURE__ */ o("div", {
|
|
70
71
|
className: "flex-shrink-0",
|
|
71
72
|
children: /* @__PURE__ */ o("div", {
|
|
72
|
-
className: "
|
|
73
|
+
className: "size-10 rounded-lg bg-gradient-to-br from-brand-primary to-brand-secondary flex items-center justify-center text-white font-bold",
|
|
73
74
|
children: l
|
|
74
75
|
})
|
|
75
76
|
}),
|
|
@@ -87,10 +88,12 @@ function c({ productName: c = "App", brandInitial: l = "B" }) {
|
|
|
87
88
|
/* @__PURE__ */ s("div", {
|
|
88
89
|
className: "mt-3 flex gap-2",
|
|
89
90
|
children: [/* @__PURE__ */ s("button", {
|
|
91
|
+
type: "button",
|
|
90
92
|
onClick: v,
|
|
91
93
|
className: "inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors",
|
|
92
|
-
children: [/* @__PURE__ */ o(r, { className: "
|
|
94
|
+
children: [/* @__PURE__ */ o(r, { className: "size-4" }), "Install"]
|
|
93
95
|
}), /* @__PURE__ */ o("button", {
|
|
96
|
+
type: "button",
|
|
94
97
|
onClick: y,
|
|
95
98
|
className: "px-3 py-1.5 text-sm font-medium text-text-secondary hover:text-text-primary transition-colors",
|
|
96
99
|
children: "Not now"
|
|
@@ -99,10 +102,11 @@ function c({ productName: c = "App", brandInitial: l = "B" }) {
|
|
|
99
102
|
]
|
|
100
103
|
}),
|
|
101
104
|
/* @__PURE__ */ o("button", {
|
|
105
|
+
type: "button",
|
|
102
106
|
onClick: y,
|
|
103
107
|
className: "flex-shrink-0 p-1 text-text-muted hover:text-text-secondary transition-colors",
|
|
104
108
|
"aria-label": "Dismiss",
|
|
105
|
-
children: /* @__PURE__ */ o(a, { className: "
|
|
109
|
+
children: /* @__PURE__ */ o(a, { className: "size-4" })
|
|
106
110
|
})
|
|
107
111
|
]
|
|
108
112
|
})
|
|
@@ -8,7 +8,7 @@ function a({ children: e, loginPath: a = "/auth/login", loadingComponent: o, una
|
|
|
8
8
|
className: "flex items-center justify-center min-h-screen bg-bg-canvas",
|
|
9
9
|
children: /* @__PURE__ */ i("div", {
|
|
10
10
|
className: "flex flex-col items-center gap-4",
|
|
11
|
-
children: [/* @__PURE__ */ r("div", { className: "
|
|
11
|
+
children: [/* @__PURE__ */ r("div", { className: "size-8 border-2 border-brand-primary border-t-transparent rounded-full animate-spin" }), /* @__PURE__ */ r("span", {
|
|
12
12
|
className: "text-text-secondary text-sm",
|
|
13
13
|
children: "Loading..."
|
|
14
14
|
})]
|
|
@@ -43,9 +43,9 @@ function a({ children: e, loginPath: a = "/auth/login", loadingComponent: o, una
|
|
|
43
43
|
className: "bg-bg-surface border border-border-default rounded-lg p-8 max-w-md w-full text-center",
|
|
44
44
|
children: [
|
|
45
45
|
/* @__PURE__ */ r("div", {
|
|
46
|
-
className: "
|
|
46
|
+
className: "size-12 mx-auto mb-4 rounded-full bg-status-error-bg-subtle flex items-center justify-center",
|
|
47
47
|
children: /* @__PURE__ */ r("svg", {
|
|
48
|
-
className: "
|
|
48
|
+
className: "size-6 text-status-error-text",
|
|
49
49
|
fill: "none",
|
|
50
50
|
viewBox: "0 0 24 24",
|
|
51
51
|
stroke: "currentColor",
|
|
@@ -79,7 +79,7 @@ function o({ children: i, redirectTo: a = "/", redirect: o }) {
|
|
|
79
79
|
let { isAuthenticated: s, isLoading: c } = t();
|
|
80
80
|
return c ? /* @__PURE__ */ r("div", {
|
|
81
81
|
className: "flex items-center justify-center min-h-screen bg-bg-canvas",
|
|
82
|
-
children: /* @__PURE__ */ r("div", { className: "
|
|
82
|
+
children: /* @__PURE__ */ r("div", { className: "size-8 border-2 border-brand-primary border-t-transparent rounded-full animate-spin" })
|
|
83
83
|
}) : s ? o ? /* @__PURE__ */ r(n, { children: o(a) }) : (typeof window < "u" && e(a), null) : /* @__PURE__ */ r(n, { children: i });
|
|
84
84
|
}
|
|
85
85
|
//#endregion
|
|
@@ -143,7 +143,7 @@ function w() {
|
|
|
143
143
|
function T() {
|
|
144
144
|
return /* @__PURE__ */ o("div", {
|
|
145
145
|
className: "flex items-center justify-center min-h-screen",
|
|
146
|
-
children: /* @__PURE__ */ o("div", { className: "animate-spin rounded-full
|
|
146
|
+
children: /* @__PURE__ */ o("div", { className: "animate-spin rounded-full size-8 border-2 border-action-primary-bg border-t-transparent" })
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
149
|
//#endregion
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Button as e } from "../../../ui/button.js";
|
|
2
|
+
import { Badge as t } from "../../../ui/badge.js";
|
|
3
|
+
import { Textarea as n } from "../../../ui/textarea.js";
|
|
4
|
+
import "../../../ui.js";
|
|
5
|
+
import { Loader2 as r, Paperclip as i, SendHorizontal as a, SmilePlus as o } from "lucide-react";
|
|
6
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
7
|
+
//#region src/shared/components/contextConversationWidget/Composer.tsx
|
|
8
|
+
function l({ composerValue: l, onComposerChange: u, fileInputRef: d, onFilesSelected: f, onAttachClick: p, onSend: m, uploading: h, isSendingMessage: g, featureFlags: _, mentionSuggestions: v, onSelectMention: y, tr: b }) {
|
|
9
|
+
return /* @__PURE__ */ c("div", {
|
|
10
|
+
"data-tour": "page-discussion-composer",
|
|
11
|
+
className: "space-y-3 rounded-lg border border-border bg-background/80 p-3",
|
|
12
|
+
children: [
|
|
13
|
+
/* @__PURE__ */ s(n, {
|
|
14
|
+
value: l,
|
|
15
|
+
onChange: (e) => u(e.target.value),
|
|
16
|
+
rows: 3,
|
|
17
|
+
placeholder: b("conversationWidget.placeholder", "Discuss this page in context…"),
|
|
18
|
+
className: "border-0 bg-transparent px-0 shadow-none focus-visible:ring-0"
|
|
19
|
+
}),
|
|
20
|
+
_.mentions && v.length > 0 ? /* @__PURE__ */ c("div", {
|
|
21
|
+
className: "flex flex-wrap gap-2 rounded-md border border-border bg-muted/20 p-2",
|
|
22
|
+
children: [/* @__PURE__ */ s(o, { className: "mt-0.5 size-4 text-muted-foreground" }), v.map((t) => /* @__PURE__ */ c(e, {
|
|
23
|
+
type: "button",
|
|
24
|
+
variant: "outline",
|
|
25
|
+
size: "sm",
|
|
26
|
+
onClick: () => y(t),
|
|
27
|
+
children: ["@", t.label]
|
|
28
|
+
}, t.id))]
|
|
29
|
+
}) : null,
|
|
30
|
+
/* @__PURE__ */ c("div", {
|
|
31
|
+
className: "flex flex-col gap-3 md:flex-row md:items-center md:justify-between",
|
|
32
|
+
children: [/* @__PURE__ */ c("div", {
|
|
33
|
+
className: "flex flex-wrap items-center gap-2",
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ s("input", {
|
|
36
|
+
ref: d,
|
|
37
|
+
type: "file",
|
|
38
|
+
multiple: !0,
|
|
39
|
+
className: "hidden",
|
|
40
|
+
onChange: (e) => f(e.target.files)
|
|
41
|
+
}),
|
|
42
|
+
/* @__PURE__ */ c(e, {
|
|
43
|
+
type: "button",
|
|
44
|
+
variant: "outline",
|
|
45
|
+
size: "sm",
|
|
46
|
+
onClick: p,
|
|
47
|
+
disabled: h,
|
|
48
|
+
children: [h ? /* @__PURE__ */ s(r, { className: "mr-2 size-4 animate-spin" }) : /* @__PURE__ */ s(i, { className: "mr-2 size-4" }), b("conversationWidget.attach", "Attach files")]
|
|
49
|
+
}),
|
|
50
|
+
_.mentions ? /* @__PURE__ */ s(t, {
|
|
51
|
+
variant: "outline",
|
|
52
|
+
children: b("conversationWidget.mentionsHint", "Type @ to mention participants")
|
|
53
|
+
}) : null
|
|
54
|
+
]
|
|
55
|
+
}), /* @__PURE__ */ c(e, {
|
|
56
|
+
type: "button",
|
|
57
|
+
onClick: m,
|
|
58
|
+
disabled: g || h || !l.trim(),
|
|
59
|
+
children: [g ? /* @__PURE__ */ s(r, { className: "mr-2 size-4 animate-spin" }) : /* @__PURE__ */ s(a, { className: "mr-2 size-4" }), b("conversationWidget.send", "Send")]
|
|
60
|
+
})]
|
|
61
|
+
})
|
|
62
|
+
]
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
//#endregion
|
|
66
|
+
export { l as Composer };
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { Button as e } from "../../../ui/button.js";
|
|
2
|
+
import { Textarea as t } from "../../../ui/textarea.js";
|
|
3
|
+
import "../../../ui.js";
|
|
4
|
+
import { QUICK_REACTIONS as n } from "./types.js";
|
|
5
|
+
import { formatFileSize as r, formatTimestamp as i } from "./utils.js";
|
|
6
|
+
import { Pencil as a, Pin as o, PinOff as s, Reply as c, Trash2 as l } from "lucide-react";
|
|
7
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
8
|
+
//#region src/shared/components/contextConversationWidget/MessageItem.tsx
|
|
9
|
+
function p({ message: p, currentUserId: m, featureFlags: h, editingMessageId: g, editingValue: _, onEditValueChange: v, onStartEdit: y, onCancelEdit: b, onSaveEdit: x, onSetReplyTarget: S, onToggleReaction: C, onDelete: w, onTogglePin: T, tr: E }) {
|
|
10
|
+
let D = p.authorId === m, O = g === p.id;
|
|
11
|
+
return /* @__PURE__ */ d("div", {
|
|
12
|
+
className: `flex ${D ? "justify-end" : "justify-start"}`,
|
|
13
|
+
children: /* @__PURE__ */ f("div", {
|
|
14
|
+
className: `w-full max-w-full rounded-xl border px-3 py-2 text-sm shadow-sm sm:max-w-[92%] ${D ? "border-primary/20 bg-primary/5" : "border-border bg-background"}`,
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ f("div", {
|
|
17
|
+
className: "mb-1 flex items-center justify-between gap-2",
|
|
18
|
+
children: [/* @__PURE__ */ f("div", {
|
|
19
|
+
className: "flex items-center gap-2 text-xs text-muted-foreground",
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ d("span", {
|
|
22
|
+
className: "font-medium text-foreground",
|
|
23
|
+
children: D ? E("conversationWidget.you", "You") : p.authorId
|
|
24
|
+
}),
|
|
25
|
+
/* @__PURE__ */ d("span", { children: i(p.createdAt) }),
|
|
26
|
+
p.isEdited ? /* @__PURE__ */ d("span", { children: E("conversationWidget.edited", "edited") }) : null,
|
|
27
|
+
p.isPinned ? /* @__PURE__ */ d(o, { className: "size-3" }) : null
|
|
28
|
+
]
|
|
29
|
+
}), /* @__PURE__ */ d("div", {
|
|
30
|
+
className: "flex items-center gap-1",
|
|
31
|
+
children: h.reactions && p.permissions.canReact ? n.map((e) => {
|
|
32
|
+
let t = p.reactions.filter((t) => t.emoji === e).length;
|
|
33
|
+
return /* @__PURE__ */ f("button", {
|
|
34
|
+
type: "button",
|
|
35
|
+
className: `min-h-9 rounded-full px-2.5 py-1 text-xs transition-colors ${p.reactions.some((t) => t.emoji === e && t.userId === m) ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground hover:bg-muted/80"}`,
|
|
36
|
+
onClick: () => C(p, e),
|
|
37
|
+
children: [e, t > 0 ? ` ${t}` : ""]
|
|
38
|
+
}, `${p.id}-${e}`);
|
|
39
|
+
}) : null
|
|
40
|
+
})]
|
|
41
|
+
}),
|
|
42
|
+
O ? /* @__PURE__ */ f("div", {
|
|
43
|
+
className: "space-y-2",
|
|
44
|
+
children: [/* @__PURE__ */ d(t, {
|
|
45
|
+
value: _,
|
|
46
|
+
onChange: (e) => v(e.target.value),
|
|
47
|
+
rows: 3
|
|
48
|
+
}), /* @__PURE__ */ f("div", {
|
|
49
|
+
className: "flex flex-wrap items-center justify-end gap-2",
|
|
50
|
+
children: [/* @__PURE__ */ d(e, {
|
|
51
|
+
type: "button",
|
|
52
|
+
variant: "outline",
|
|
53
|
+
size: "sm",
|
|
54
|
+
onClick: b,
|
|
55
|
+
children: E("conversationWidget.cancel", "Cancel")
|
|
56
|
+
}), /* @__PURE__ */ d(e, {
|
|
57
|
+
type: "button",
|
|
58
|
+
size: "sm",
|
|
59
|
+
onClick: x,
|
|
60
|
+
children: E("conversationWidget.save", "Save")
|
|
61
|
+
})]
|
|
62
|
+
})]
|
|
63
|
+
}) : /* @__PURE__ */ f(u, { children: [p.parentMessageId ? /* @__PURE__ */ d("p", {
|
|
64
|
+
className: "mb-1 text-xs text-muted-foreground",
|
|
65
|
+
children: E("conversationWidget.replyingInThread", "Reply in thread")
|
|
66
|
+
}) : null, /* @__PURE__ */ d("p", {
|
|
67
|
+
className: "whitespace-pre-wrap break-words text-sm text-foreground",
|
|
68
|
+
children: p.content
|
|
69
|
+
})] }),
|
|
70
|
+
p.attachments.length > 0 ? /* @__PURE__ */ d("div", {
|
|
71
|
+
className: "mt-3 flex flex-col gap-2",
|
|
72
|
+
children: p.attachments.map((e) => /* @__PURE__ */ f("a", {
|
|
73
|
+
href: e.downloadUrl ?? "#",
|
|
74
|
+
target: e.downloadUrl ? "_blank" : void 0,
|
|
75
|
+
rel: e.downloadUrl ? "noreferrer" : void 0,
|
|
76
|
+
className: "flex items-center justify-between gap-2 rounded-md border border-border bg-muted/40 px-3 py-2 text-xs",
|
|
77
|
+
children: [/* @__PURE__ */ d("span", {
|
|
78
|
+
className: "truncate",
|
|
79
|
+
children: e.fileName
|
|
80
|
+
}), /* @__PURE__ */ d("span", {
|
|
81
|
+
className: "text-muted-foreground",
|
|
82
|
+
children: r(e.fileSize)
|
|
83
|
+
})]
|
|
84
|
+
}, e.id))
|
|
85
|
+
}) : null,
|
|
86
|
+
/* @__PURE__ */ f("div", {
|
|
87
|
+
className: "mt-3 flex flex-wrap items-center gap-2 text-xs",
|
|
88
|
+
children: [
|
|
89
|
+
h.threads && p.permissions.canReply ? /* @__PURE__ */ f(e, {
|
|
90
|
+
type: "button",
|
|
91
|
+
variant: "ghost",
|
|
92
|
+
size: "sm",
|
|
93
|
+
onClick: () => S(p),
|
|
94
|
+
children: [/* @__PURE__ */ d(c, { className: "mr-2 size-3" }), E("conversationWidget.reply", "Reply")]
|
|
95
|
+
}) : null,
|
|
96
|
+
p.permissions.canEdit && !O ? /* @__PURE__ */ f(e, {
|
|
97
|
+
type: "button",
|
|
98
|
+
variant: "ghost",
|
|
99
|
+
size: "sm",
|
|
100
|
+
onClick: () => y(p),
|
|
101
|
+
children: [/* @__PURE__ */ d(a, { className: "mr-2 size-3" }), E("conversationWidget.edit", "Edit")]
|
|
102
|
+
}) : null,
|
|
103
|
+
p.permissions.canDelete ? /* @__PURE__ */ f(e, {
|
|
104
|
+
type: "button",
|
|
105
|
+
variant: "ghost",
|
|
106
|
+
size: "sm",
|
|
107
|
+
onClick: () => w(p),
|
|
108
|
+
children: [/* @__PURE__ */ d(l, { className: "mr-2 size-3" }), E("conversationWidget.delete", "Delete")]
|
|
109
|
+
}) : null,
|
|
110
|
+
p.permissions.canPin ? /* @__PURE__ */ f(e, {
|
|
111
|
+
type: "button",
|
|
112
|
+
variant: "ghost",
|
|
113
|
+
size: "sm",
|
|
114
|
+
onClick: () => T(p),
|
|
115
|
+
children: [p.isPinned ? /* @__PURE__ */ d(s, { className: "mr-2 size-3" }) : /* @__PURE__ */ d(o, { className: "mr-2 size-3" }), p.isPinned ? E("conversationWidget.unpin", "Unpin") : E("conversationWidget.pin", "Pin")]
|
|
116
|
+
}) : null
|
|
117
|
+
]
|
|
118
|
+
})
|
|
119
|
+
]
|
|
120
|
+
})
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
//#endregion
|
|
124
|
+
export { p as MessageItem };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { MessageItem as e } from "./MessageItem.js";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
//#region src/shared/components/contextConversationWidget/MessageList.tsx
|
|
4
|
+
function r({ messages: r, currentUserId: i, featureFlags: a, editingMessageId: o, editingValue: s, messageEndRef: c, onEditValueChange: l, onStartEdit: u, onCancelEdit: d, onSaveEdit: f, onSetReplyTarget: p, onToggleReaction: m, onDelete: h, onTogglePin: g, tr: _ }) {
|
|
5
|
+
return /* @__PURE__ */ t("div", {
|
|
6
|
+
className: "max-h-[24rem] overflow-y-auto rounded-lg border border-border bg-muted/20",
|
|
7
|
+
children: /* @__PURE__ */ n("div", {
|
|
8
|
+
className: "space-y-3 p-4",
|
|
9
|
+
children: [r.length === 0 ? /* @__PURE__ */ t("div", {
|
|
10
|
+
className: "rounded-lg border border-dashed border-border bg-background/70 px-4 py-5 text-sm text-muted-foreground",
|
|
11
|
+
children: _("conversationWidget.empty", "No messages yet. Start the conversation in context.")
|
|
12
|
+
}) : r.map((n) => /* @__PURE__ */ t(e, {
|
|
13
|
+
message: n,
|
|
14
|
+
currentUserId: i,
|
|
15
|
+
featureFlags: a,
|
|
16
|
+
editingMessageId: o,
|
|
17
|
+
editingValue: s,
|
|
18
|
+
onEditValueChange: l,
|
|
19
|
+
onStartEdit: u,
|
|
20
|
+
onCancelEdit: d,
|
|
21
|
+
onSaveEdit: f,
|
|
22
|
+
onSetReplyTarget: p,
|
|
23
|
+
onToggleReaction: m,
|
|
24
|
+
onDelete: h,
|
|
25
|
+
onTogglePin: g,
|
|
26
|
+
tr: _
|
|
27
|
+
}, n.id)), /* @__PURE__ */ t("div", { ref: c })]
|
|
28
|
+
})
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { r as MessageList };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Card as e, CardContent as t, CardHeader as n, CardTitle as r } from "../../../ui/card.js";
|
|
2
|
+
import "../../../ui.js";
|
|
3
|
+
import { MessageCircle as i } from "lucide-react";
|
|
4
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
|
+
//#region src/shared/components/contextConversationWidget/NoWorkspaceCard.tsx
|
|
6
|
+
function s({ className: s, tr: c }) {
|
|
7
|
+
return /* @__PURE__ */ o(e, {
|
|
8
|
+
className: s,
|
|
9
|
+
children: [/* @__PURE__ */ a(n, { children: /* @__PURE__ */ o(r, {
|
|
10
|
+
className: "flex items-center gap-2 text-base",
|
|
11
|
+
children: [/* @__PURE__ */ a(i, { className: "size-4" }), c("conversationWidget.title", "Page conversation")]
|
|
12
|
+
}) }), /* @__PURE__ */ a(t, { children: /* @__PURE__ */ a("p", {
|
|
13
|
+
className: "text-sm text-muted-foreground",
|
|
14
|
+
children: c("conversationWidget.noWorkspace", "Select a workspace to enable contextual conversations on this page.")
|
|
15
|
+
}) })]
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { s as NoWorkspaceCard };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Badge as e } from "../../../ui/badge.js";
|
|
2
|
+
import "../../../ui.js";
|
|
3
|
+
import { Paperclip as t, X as n } from "lucide-react";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
//#region src/shared/components/contextConversationWidget/PendingAttachmentsBar.tsx
|
|
6
|
+
function a({ attachments: a, onRemove: o }) {
|
|
7
|
+
return /* @__PURE__ */ r("div", {
|
|
8
|
+
className: "flex flex-wrap gap-2",
|
|
9
|
+
children: a.map((a) => /* @__PURE__ */ i(e, {
|
|
10
|
+
variant: "secondary",
|
|
11
|
+
className: "gap-2 py-1.5",
|
|
12
|
+
children: [
|
|
13
|
+
/* @__PURE__ */ r(t, { className: "size-3" }),
|
|
14
|
+
/* @__PURE__ */ r("span", {
|
|
15
|
+
className: "max-w-[14rem] truncate",
|
|
16
|
+
children: a.fileName
|
|
17
|
+
}),
|
|
18
|
+
/* @__PURE__ */ r("button", {
|
|
19
|
+
type: "button",
|
|
20
|
+
onClick: () => o(a.fileId),
|
|
21
|
+
children: /* @__PURE__ */ r(n, { className: "size-3" })
|
|
22
|
+
})
|
|
23
|
+
]
|
|
24
|
+
}, a.fileId))
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { a as PendingAttachmentsBar };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Button as e } from "../../../ui/button.js";
|
|
2
|
+
import "../../../ui.js";
|
|
3
|
+
import { X as t } from "lucide-react";
|
|
4
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
|
+
//#region src/shared/components/contextConversationWidget/ReplyBanner.tsx
|
|
6
|
+
function i({ replyTarget: i, onClear: a, tr: o }) {
|
|
7
|
+
return /* @__PURE__ */ r("div", {
|
|
8
|
+
className: "flex items-center justify-between gap-2 rounded-md border border-border bg-muted/40 px-3 py-2 text-sm",
|
|
9
|
+
children: [/* @__PURE__ */ r("div", {
|
|
10
|
+
className: "min-w-0",
|
|
11
|
+
children: [/* @__PURE__ */ r("p", {
|
|
12
|
+
className: "text-xs text-muted-foreground",
|
|
13
|
+
children: [
|
|
14
|
+
o("conversationWidget.replyingTo", "Replying to"),
|
|
15
|
+
" ",
|
|
16
|
+
i.authorId
|
|
17
|
+
]
|
|
18
|
+
}), /* @__PURE__ */ n("p", {
|
|
19
|
+
className: "truncate",
|
|
20
|
+
children: i.content
|
|
21
|
+
})]
|
|
22
|
+
}), /* @__PURE__ */ n(e, {
|
|
23
|
+
type: "button",
|
|
24
|
+
variant: "ghost",
|
|
25
|
+
size: "icon",
|
|
26
|
+
onClick: a,
|
|
27
|
+
children: /* @__PURE__ */ n(t, { className: "size-4" })
|
|
28
|
+
})]
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { i as ReplyBanner };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Button as e } from "../../../ui/button.js";
|
|
2
|
+
import { Badge as t } from "../../../ui/badge.js";
|
|
3
|
+
import { CardHeader as n, CardTitle as r } from "../../../ui/card.js";
|
|
4
|
+
import "../../../ui.js";
|
|
5
|
+
import { ChevronDown as i, ChevronUp as a, ExternalLink as o, MessageCircle as s } from "lucide-react";
|
|
6
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
7
|
+
//#region src/shared/components/contextConversationWidget/WidgetHeader.tsx
|
|
8
|
+
function u({ conversationTitle: u, pageContext: d, resolvedContext: f, unreadCount: p, conversationId: m, collapsed: h, onToggleCollapsed: g, onOpenContext: _, onOpenInbox: v, tr: y }) {
|
|
9
|
+
let b = d.entityType && d.entityId ? `${d.entityType} · ${d.entityId}` : d.pagePath;
|
|
10
|
+
return /* @__PURE__ */ l(n, {
|
|
11
|
+
className: "space-y-3",
|
|
12
|
+
children: [/* @__PURE__ */ l("div", {
|
|
13
|
+
className: "flex flex-col gap-3 md:flex-row md:items-start md:justify-between",
|
|
14
|
+
children: [/* @__PURE__ */ l("div", {
|
|
15
|
+
className: "space-y-1",
|
|
16
|
+
children: [/* @__PURE__ */ l(r, {
|
|
17
|
+
className: "flex items-center gap-2 text-base",
|
|
18
|
+
children: [/* @__PURE__ */ c(s, { className: "size-4" }), u || d.contextTitle || y("conversationWidget.title", "Page conversation")]
|
|
19
|
+
}), /* @__PURE__ */ c("p", {
|
|
20
|
+
className: "text-sm text-muted-foreground truncate whitespace-nowrap overflow-hidden max-w-full",
|
|
21
|
+
title: b,
|
|
22
|
+
children: b
|
|
23
|
+
})]
|
|
24
|
+
}), /* @__PURE__ */ l("div", {
|
|
25
|
+
className: "flex flex-wrap items-center gap-2 md:justify-end",
|
|
26
|
+
children: [
|
|
27
|
+
/* @__PURE__ */ l(e, {
|
|
28
|
+
type: "button",
|
|
29
|
+
variant: "outline",
|
|
30
|
+
size: "sm",
|
|
31
|
+
onClick: _,
|
|
32
|
+
children: [/* @__PURE__ */ c(o, { className: "mr-2 size-4" }), y("conversationWidget.openContext", "Open context")]
|
|
33
|
+
}),
|
|
34
|
+
/* @__PURE__ */ c(e, {
|
|
35
|
+
type: "button",
|
|
36
|
+
"data-tour": "page-discussion-open-full",
|
|
37
|
+
variant: "outline",
|
|
38
|
+
size: "sm",
|
|
39
|
+
onClick: v,
|
|
40
|
+
disabled: !m,
|
|
41
|
+
children: y("conversationWidget.openInbox", "Open in conversations")
|
|
42
|
+
}),
|
|
43
|
+
/* @__PURE__ */ c(e, {
|
|
44
|
+
type: "button",
|
|
45
|
+
variant: "ghost",
|
|
46
|
+
size: "icon",
|
|
47
|
+
onClick: g,
|
|
48
|
+
"aria-label": h ? y("conversationWidget.expand", "Expand page conversation") : y("conversationWidget.collapse", "Collapse page conversation"),
|
|
49
|
+
children: c(h ? i : a, { className: "size-4" })
|
|
50
|
+
})
|
|
51
|
+
]
|
|
52
|
+
})]
|
|
53
|
+
}), /* @__PURE__ */ l("div", {
|
|
54
|
+
className: "flex flex-wrap items-center gap-2",
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ c(t, {
|
|
57
|
+
variant: "secondary",
|
|
58
|
+
children: f.widgetKey
|
|
59
|
+
}),
|
|
60
|
+
f.activeTab ? /* @__PURE__ */ c(t, {
|
|
61
|
+
variant: "outline",
|
|
62
|
+
children: f.activeTab
|
|
63
|
+
}) : null,
|
|
64
|
+
p ? /* @__PURE__ */ l(t, { children: [p, " unread"] }) : null
|
|
65
|
+
]
|
|
66
|
+
})]
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
//#endregion
|
|
70
|
+
export { u as WidgetHeader };
|