@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
|
@@ -1,1147 +1,364 @@
|
|
|
1
1
|
import { useActiveContext as e } from "../providers/shell/ActiveContextProvider.js";
|
|
2
2
|
import { useShellNavigate as t } from "../utils/appHelpers.js";
|
|
3
3
|
import { useGlobalSearch as n } from "../hooks/shell/useGlobalSearch.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { EMPTY_METADATA_CONDITION as r, ENTITY_TYPE_ICONS as i, ENTITY_TYPE_OPTIONS as a, PRODUCT_OPTIONS as ee } from "./searchPage/constants.js";
|
|
5
|
+
import { normalizeMetadataConditions as te, safeParseJson as ne, serializeCsv as o, splitCsv as s } from "./searchPage/utils.js";
|
|
6
|
+
import { SearchInput as re } from "./searchPage/SearchInput.js";
|
|
7
|
+
import { SearchToolbar as ie } from "./searchPage/SearchToolbar.js";
|
|
8
|
+
import { FiltersPanel as ae } from "./searchPage/FiltersPanel.js";
|
|
9
|
+
import { ActiveFilterChips as oe } from "./searchPage/ActiveFilterChips.js";
|
|
10
|
+
import { ResultsStatus as se } from "./searchPage/ResultsStatus.js";
|
|
11
|
+
import { ResultsList as ce } from "./searchPage/ResultsList.js";
|
|
12
|
+
import { SearchPagination as le } from "./searchPage/SearchPagination.js";
|
|
13
|
+
import { useCallback as ue, useEffect as de, useMemo as c, useState as l } from "react";
|
|
14
|
+
import { FileText as fe } from "lucide-react";
|
|
15
|
+
import { jsx as u, jsxs as pe } from "react/jsx-runtime";
|
|
16
|
+
import { useSearchParams as me } from "react-router-dom";
|
|
8
17
|
//#region src/shared/pages/SearchPage.tsx
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
tag: h,
|
|
13
|
-
document: l,
|
|
14
|
-
file: c,
|
|
15
|
-
page: l,
|
|
16
|
-
member: _,
|
|
17
|
-
user: _,
|
|
18
|
-
"calendar-event": s,
|
|
19
|
-
meeting: s,
|
|
20
|
-
project: u,
|
|
21
|
-
conversation: f,
|
|
22
|
-
thread: f,
|
|
23
|
-
task: te,
|
|
24
|
-
projects: u,
|
|
25
|
-
workspaces: d,
|
|
26
|
-
workspace: d,
|
|
27
|
-
docs: l,
|
|
28
|
-
tags: h,
|
|
29
|
-
members: _,
|
|
30
|
-
calendar: s,
|
|
31
|
-
conversations: f,
|
|
32
|
-
tasks: te,
|
|
33
|
-
Agent: m,
|
|
34
|
-
agent: m,
|
|
35
|
-
agents: m,
|
|
36
|
-
Vibe: u,
|
|
37
|
-
vibe: u,
|
|
38
|
-
vibes: u,
|
|
39
|
-
Session: g,
|
|
40
|
-
session: g,
|
|
41
|
-
sessions: g,
|
|
42
|
-
Note: l,
|
|
43
|
-
note: l,
|
|
44
|
-
notes: l,
|
|
45
|
-
Target: m,
|
|
46
|
-
target: m,
|
|
47
|
-
targets: m
|
|
48
|
-
}, pe = {
|
|
49
|
-
PARTIAL: {
|
|
50
|
-
label: "Partial",
|
|
51
|
-
description: "Matches prefixes and substrings (autocomplete)"
|
|
52
|
-
},
|
|
53
|
-
FULLTEXT: {
|
|
54
|
-
label: "Full-text",
|
|
55
|
-
description: "BM25 word matching with stemming"
|
|
56
|
-
},
|
|
57
|
-
EXACT: {
|
|
58
|
-
label: "Exact",
|
|
59
|
-
description: "All search terms must appear exactly"
|
|
60
|
-
}
|
|
61
|
-
}, me = [
|
|
62
|
-
{
|
|
63
|
-
value: "SCORE_DESC",
|
|
64
|
-
label: "Relevance"
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
value: "CREATED_DESC",
|
|
68
|
-
label: "Newest first"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
value: "CREATED_ASC",
|
|
72
|
-
label: "Oldest first"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
value: "UPDATED_DESC",
|
|
76
|
-
label: "Recently updated"
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
value: "UPDATED_ASC",
|
|
80
|
-
label: "Least recently updated"
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
value: "TITLE_ASC",
|
|
84
|
-
label: "Title A-Z"
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
value: "TITLE_DESC",
|
|
88
|
-
label: "Title Z-A"
|
|
89
|
-
}
|
|
90
|
-
], he = [
|
|
91
|
-
{
|
|
92
|
-
value: "workspace",
|
|
93
|
-
label: "Workspaces"
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
value: "project",
|
|
97
|
-
label: "Projects"
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
value: "member",
|
|
101
|
-
label: "Members"
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
value: "user",
|
|
105
|
-
label: "Users"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
value: "UniversalTag",
|
|
109
|
-
label: "Tags"
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
value: "TagVocabulary",
|
|
113
|
-
label: "Vocabularies"
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
value: "document",
|
|
117
|
-
label: "Documents"
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
value: "file",
|
|
121
|
-
label: "Files"
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
value: "task",
|
|
125
|
-
label: "Tasks"
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
value: "calendar-event",
|
|
129
|
-
label: "Calendar Events"
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
value: "conversation",
|
|
133
|
-
label: "Conversations"
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
value: "Agent",
|
|
137
|
-
label: "Agents"
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
value: "Vibe",
|
|
141
|
-
label: "Vibes"
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
value: "Session",
|
|
145
|
-
label: "Sessions"
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
value: "Note",
|
|
149
|
-
label: "Notes"
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
value: "Target",
|
|
153
|
-
label: "Targets"
|
|
154
|
-
}
|
|
155
|
-
], ge = [], x = 20, _e = {
|
|
156
|
-
key: "",
|
|
157
|
-
value: "",
|
|
158
|
-
operator: "EQUALS"
|
|
159
|
-
};
|
|
160
|
-
function S(e) {
|
|
161
|
-
return e.split(",").map((e) => e.trim()).filter(Boolean);
|
|
162
|
-
}
|
|
163
|
-
function C(e) {
|
|
164
|
-
return e.length > 0 ? e.join(",") : void 0;
|
|
165
|
-
}
|
|
166
|
-
function ve(e, t) {
|
|
167
|
-
if (!e) return t;
|
|
168
|
-
try {
|
|
169
|
-
return JSON.parse(e);
|
|
170
|
-
} catch {
|
|
171
|
-
return t;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
function ye(e) {
|
|
175
|
-
return (e ?? []).filter((e) => e.key?.trim() || e.value?.trim()).map((e) => ({
|
|
176
|
-
key: e.key ?? "",
|
|
177
|
-
value: e.value ?? "",
|
|
178
|
-
operator: e.operator ?? "EQUALS"
|
|
179
|
-
}));
|
|
180
|
-
}
|
|
181
|
-
function be({ entityTypeOptions: s = he, entityTypeIcons: te = fe, productOptions: c = ge, defaultProductSources: u = [], placeholder: d = "Search for documents, tags, projects, tasks...", subtitle: f = "Search across all entities in your workspace", supplementalSearch: m } = {}) {
|
|
182
|
-
let h = t(), [g, _] = de(), { workspaceId: be } = e(), { searchFull: xe, isSearching: w } = n(), Se = g.get("q") || "", Ce = g.get("mode") || "FULLTEXT", we = g.get("sortBy") || "SCORE_DESC", Te = S(g.get("types") || ""), Ee = S(g.get("excludeTypes") || ""), De = S(g.get("products") || ""), Oe = g.get("createdBy") || "", ke = g.get("updatedBy") || "", Ae = g.get("projectId") || "", je = g.get("from") || "", Me = g.get("to") || "", Ne = g.get("updatedFrom") || "", Pe = g.get("updatedTo") || "", Fe = S(g.get("excludeIds") || ""), T = ve(g.get("tagFilter"), {}), Ie = ye(ve(g.get("metadataConditions"), [])), Le = parseInt(g.get("page") || "1", 10), [E, Re] = o(Se), [D, ze] = o(Ce), [O, Be] = o(we), [k, Ve] = o(Te), [A, He] = o(Ee), [j, Ue] = o(De.length > 0 ? De : u), [M, N] = o(Oe), [P, F] = o(ke), [I, We] = o(Ae), [L, Ge] = o(je), [R, Ke] = o(Me), [z, qe] = o(Ne), [B, Je] = o(Pe), [Ye, Xe] = o(Fe.join(", ")), [Ze, Qe] = o((T.tagIds ?? []).join(", ")), [$e, et] = o((T.tagKeys ?? []).join(", ")), [tt, nt] = o((T.hierarchyPaths ?? []).join(", ")), [rt, it] = o((T.vocabularyKeys ?? []).join(", ")), [at, ot] = o(T.matchAll ?? !1), [st, ct] = o(T.includeDescendants ?? !0), [V, lt] = o(T.depth === void 0 ? "" : String(T.depth)), [H, U] = o(Ie), [W, G] = o(Le), [K, ut] = o([]), [dt, ft] = o(0), [pt, mt] = o(!1), [ht, gt] = o(0), [_t, vt] = o(), [yt, q] = o(null), [J, bt] = o(!1), [xt, St] = o(Se), Ct = r((e) => {
|
|
183
|
-
let t = new URLSearchParams(g);
|
|
18
|
+
function d({ entityTypeOptions: d = a, entityTypeIcons: he = i, productOptions: ge = ee, defaultProductSources: _e = [], placeholder: ve = "Search for documents, tags, projects, tasks...", subtitle: ye = "Search across all entities in your workspace", supplementalSearch: f } = {}) {
|
|
19
|
+
let be = t(), [p, xe] = me(), { workspaceId: Se } = e(), { searchFull: Ce, isSearching: we } = n(), Te = p.get("q") || "", Ee = p.get("mode") || "FULLTEXT", De = p.get("sortBy") || "SCORE_DESC", Oe = s(p.get("types") || ""), ke = s(p.get("excludeTypes") || ""), Ae = s(p.get("products") || ""), je = p.get("createdBy") || "", Me = p.get("updatedBy") || "", Ne = p.get("projectId") || "", Pe = p.get("from") || "", Fe = p.get("to") || "", Ie = p.get("updatedFrom") || "", Le = p.get("updatedTo") || "", Re = s(p.get("excludeIds") || ""), m = ne(p.get("tagFilter"), {}), ze = te(ne(p.get("metadataConditions"), [])), Be = parseInt(p.get("page") || "1", 10), [h, Ve] = l(Te), [g, He] = l(Ee), [_, Ue] = l(De), [v, We] = l(Oe), [y, Ge] = l(ke), [b, Ke] = l(Ae.length > 0 ? Ae : _e), [x, qe] = l(je), [S, Je] = l(Me), [C, Ye] = l(Ne), [w, Xe] = l(Pe), [T, E] = l(Fe), [D, O] = l(Ie), [k, Ze] = l(Le), [A, j] = l(Re.join(", ")), [M, N] = l((m.tagIds ?? []).join(", ")), [P, F] = l((m.tagKeys ?? []).join(", ")), [I, L] = l((m.hierarchyPaths ?? []).join(", ")), [R, z] = l((m.vocabularyKeys ?? []).join(", ")), [B, V] = l(m.matchAll ?? !1), [H, U] = l(m.includeDescendants ?? !0), [W, G] = l(m.depth === void 0 ? "" : String(m.depth)), [K, q] = l(ze), [J, Y] = l(Be), [Qe, $e] = l([]), [et, tt] = l(0), [nt, rt] = l(!1), [it, at] = l(0), [ot, st] = l(), [ct, X] = l(null), [lt, ut] = l(!1), [dt, ft] = l(Te), pt = ue((e) => {
|
|
20
|
+
let t = new URLSearchParams(p);
|
|
184
21
|
Object.entries(e).forEach(([e, n]) => {
|
|
185
22
|
n ? t.set(e, n) : t.delete(e);
|
|
186
|
-
}),
|
|
187
|
-
}, [
|
|
188
|
-
let e =
|
|
23
|
+
}), xe(t, { replace: !0 });
|
|
24
|
+
}, [p, xe]), Z = c(() => s(A), [A]), Q = c(() => K.filter((e) => e.key.trim() && e.value.trim()), [K]), $ = c(() => {
|
|
25
|
+
let e = s(M), t = s(P), n = s(I), r = s(R), i = W.trim() ? Number(W.trim()) : void 0;
|
|
189
26
|
if (e.length > 0 || t.length > 0 || n.length > 0 || r.length > 0) return {
|
|
190
27
|
tagIds: e.length > 0 ? e : void 0,
|
|
191
28
|
tagKeys: t.length > 0 ? t : void 0,
|
|
192
29
|
hierarchyPaths: n.length > 0 ? n : void 0,
|
|
193
30
|
vocabularyKeys: r.length > 0 ? r : void 0,
|
|
194
|
-
matchAll:
|
|
195
|
-
includeDescendants:
|
|
31
|
+
matchAll: B,
|
|
32
|
+
includeDescendants: H,
|
|
196
33
|
depth: i !== void 0 && Number.isFinite(i) ? i : void 0
|
|
197
34
|
};
|
|
198
35
|
}, [
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
]),
|
|
36
|
+
H,
|
|
37
|
+
W,
|
|
38
|
+
M,
|
|
39
|
+
P,
|
|
40
|
+
B,
|
|
41
|
+
I,
|
|
42
|
+
R
|
|
43
|
+
]), mt = ue(() => {
|
|
207
44
|
let e = {
|
|
208
|
-
searchMode:
|
|
209
|
-
sortBy:
|
|
210
|
-
limit:
|
|
211
|
-
offset: (
|
|
45
|
+
searchMode: g,
|
|
46
|
+
sortBy: _,
|
|
47
|
+
limit: 20,
|
|
48
|
+
offset: (J - 1) * 20
|
|
212
49
|
};
|
|
213
|
-
return
|
|
50
|
+
return v.length > 0 && (e.entityTypes = v), y.length > 0 && (e.excludeEntityTypes = y), b.length > 0 && (e.productSources = b), C.trim() && (e.projectId = C.trim()), x.trim() && (e.createdBy = x.trim()), S.trim() && (e.updatedBy = S.trim()), (w || T) && (e.dateRange = {}, w && (e.dateRange.from = new Date(w).toISOString()), T && (e.dateRange.to = new Date(T).toISOString())), (D || k) && (e.updatedDateRange = {}, D && (e.updatedDateRange.from = new Date(D).toISOString()), k && (e.updatedDateRange.to = new Date(k).toISOString())), Z.length > 0 && (e.excludeIds = Z), Q.length > 0 && (e.metadataConditions = Q), $ && (e.tagFilter = $), e;
|
|
214
51
|
}, [
|
|
52
|
+
$,
|
|
53
|
+
x,
|
|
54
|
+
w,
|
|
55
|
+
T,
|
|
56
|
+
y,
|
|
215
57
|
Z,
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
58
|
+
Q,
|
|
59
|
+
g,
|
|
60
|
+
_,
|
|
61
|
+
J,
|
|
62
|
+
C,
|
|
63
|
+
v,
|
|
64
|
+
b,
|
|
65
|
+
S,
|
|
222
66
|
D,
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
j,
|
|
228
|
-
P,
|
|
229
|
-
z,
|
|
230
|
-
B
|
|
231
|
-
]), Tt = r(async () => {
|
|
232
|
-
if (!E.trim()) {
|
|
233
|
-
ut([]), ft(0), mt(!1), gt(0), vt(void 0), q(null);
|
|
67
|
+
k
|
|
68
|
+
]), ht = ue(async () => {
|
|
69
|
+
if (!h.trim()) {
|
|
70
|
+
$e([]), tt(0), rt(!1), at(0), st(void 0), X(null);
|
|
234
71
|
return;
|
|
235
72
|
}
|
|
236
|
-
if (!
|
|
237
|
-
|
|
73
|
+
if (!Se) {
|
|
74
|
+
X("No workspace selected. Please select a workspace to search.");
|
|
238
75
|
return;
|
|
239
76
|
}
|
|
240
|
-
|
|
77
|
+
X(null);
|
|
241
78
|
let e = performance.now();
|
|
242
79
|
try {
|
|
243
|
-
let t =
|
|
244
|
-
|
|
80
|
+
let t = mt(), n = await Ce(h, void 0, t), r = performance.now(), i = f && n.results.length === 0 ? await f(h, t) : [], a = n.results.length > 0 ? n.results : i;
|
|
81
|
+
$e(a), tt(a.length > 0 ? a.length : n.total), rt(n.hasMore), st(n.facets), at(n.searchTimeMs ?? Math.round(r - e));
|
|
245
82
|
} catch (e) {
|
|
246
|
-
|
|
83
|
+
X(e instanceof Error ? e.message : "Search failed"), $e([]), tt(0), st(void 0);
|
|
247
84
|
}
|
|
248
85
|
}, [
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
86
|
+
h,
|
|
87
|
+
Se,
|
|
88
|
+
Ce,
|
|
89
|
+
mt,
|
|
90
|
+
f
|
|
254
91
|
]);
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
}, [
|
|
258
|
-
|
|
259
|
-
q:
|
|
260
|
-
mode:
|
|
261
|
-
sortBy:
|
|
262
|
-
types:
|
|
263
|
-
excludeTypes:
|
|
264
|
-
products:
|
|
265
|
-
createdBy:
|
|
266
|
-
updatedBy:
|
|
267
|
-
projectId:
|
|
268
|
-
from:
|
|
269
|
-
to:
|
|
270
|
-
updatedFrom:
|
|
271
|
-
updatedTo:
|
|
272
|
-
excludeIds:
|
|
273
|
-
tagFilter:
|
|
274
|
-
metadataConditions:
|
|
275
|
-
page:
|
|
92
|
+
de(() => {
|
|
93
|
+
ht();
|
|
94
|
+
}, [ht]), de(() => {
|
|
95
|
+
pt({
|
|
96
|
+
q: h || void 0,
|
|
97
|
+
mode: g === "FULLTEXT" ? void 0 : g,
|
|
98
|
+
sortBy: _ === "SCORE_DESC" ? void 0 : _,
|
|
99
|
+
types: o(v),
|
|
100
|
+
excludeTypes: o(y),
|
|
101
|
+
products: o(b),
|
|
102
|
+
createdBy: x || void 0,
|
|
103
|
+
updatedBy: S || void 0,
|
|
104
|
+
projectId: C || void 0,
|
|
105
|
+
from: w || void 0,
|
|
106
|
+
to: T || void 0,
|
|
107
|
+
updatedFrom: D || void 0,
|
|
108
|
+
updatedTo: k || void 0,
|
|
109
|
+
excludeIds: o(Z),
|
|
110
|
+
tagFilter: $ ? JSON.stringify($) : void 0,
|
|
111
|
+
metadataConditions: Q.length > 0 ? JSON.stringify(Q) : void 0,
|
|
112
|
+
page: J > 1 ? String(J) : void 0
|
|
276
113
|
});
|
|
277
114
|
}, [
|
|
115
|
+
$,
|
|
116
|
+
x,
|
|
117
|
+
w,
|
|
118
|
+
T,
|
|
119
|
+
y,
|
|
278
120
|
Z,
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
121
|
+
Q,
|
|
122
|
+
h,
|
|
123
|
+
C,
|
|
124
|
+
g,
|
|
125
|
+
_,
|
|
126
|
+
v,
|
|
127
|
+
b,
|
|
128
|
+
J,
|
|
129
|
+
S,
|
|
287
130
|
D,
|
|
288
|
-
O,
|
|
289
131
|
k,
|
|
290
|
-
|
|
291
|
-
W,
|
|
292
|
-
P,
|
|
293
|
-
z,
|
|
294
|
-
B,
|
|
295
|
-
Ct
|
|
132
|
+
pt
|
|
296
133
|
]);
|
|
297
|
-
let
|
|
298
|
-
e.preventDefault(),
|
|
299
|
-
},
|
|
300
|
-
|
|
301
|
-
},
|
|
302
|
-
|
|
303
|
-
},
|
|
304
|
-
|
|
305
|
-
},
|
|
306
|
-
|
|
134
|
+
let gt = (e) => {
|
|
135
|
+
e.preventDefault(), Ve(dt), Y(1);
|
|
136
|
+
}, _t = (e) => {
|
|
137
|
+
We((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]), Y(1);
|
|
138
|
+
}, vt = (e) => {
|
|
139
|
+
Ge((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]), Y(1);
|
|
140
|
+
}, yt = () => {
|
|
141
|
+
q((e) => [...e, { ...r }]);
|
|
142
|
+
}, bt = (e, t) => {
|
|
143
|
+
q((n) => n.map((n, r) => r === e ? {
|
|
307
144
|
...n,
|
|
308
145
|
...t
|
|
309
|
-
} : n)),
|
|
310
|
-
},
|
|
311
|
-
|
|
312
|
-
},
|
|
313
|
-
|
|
314
|
-
},
|
|
146
|
+
} : n)), Y(1);
|
|
147
|
+
}, xt = (e) => {
|
|
148
|
+
q((t) => t.filter((t, n) => n !== e)), Y(1);
|
|
149
|
+
}, St = () => {
|
|
150
|
+
He("FULLTEXT"), Ue("SCORE_DESC"), We([]), Ge([]), Ke([]), qe(""), Je(""), Ye(""), Xe(""), E(""), O(""), Ze(""), j(""), N(""), F(""), L(""), z(""), V(!1), U(!0), G(""), q([]), Y(1);
|
|
151
|
+
}, Ct = c(() => {
|
|
315
152
|
let e = 0;
|
|
316
|
-
return
|
|
153
|
+
return g !== "FULLTEXT" && e++, _ !== "SCORE_DESC" && e++, v.length > 0 && e++, y.length > 0 && e++, b.length > 0 && e++, x && e++, S && e++, C && e++, (w || T) && e++, (D || k) && e++, Z.length > 0 && e++, $ && e++, Q.length > 0 && e++, e;
|
|
317
154
|
}, [
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
155
|
+
$,
|
|
156
|
+
x,
|
|
157
|
+
w,
|
|
158
|
+
T,
|
|
159
|
+
y,
|
|
160
|
+
Z.length,
|
|
161
|
+
Q.length,
|
|
162
|
+
C,
|
|
163
|
+
g,
|
|
164
|
+
b,
|
|
165
|
+
v,
|
|
166
|
+
_,
|
|
167
|
+
S,
|
|
326
168
|
D,
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
z,
|
|
332
|
-
B
|
|
333
|
-
]), $ = Math.ceil(dt / x), Nt = (e) => {
|
|
334
|
-
e.href && h(e.href);
|
|
335
|
-
}, Pt = (e) => te[e] || l, Ft = a(() => {
|
|
169
|
+
k
|
|
170
|
+
]), wt = Math.ceil(et / 20), Tt = (e) => {
|
|
171
|
+
e.href && be(e.href);
|
|
172
|
+
}, Et = (e) => he[e] || fe, Dt = c(() => {
|
|
336
173
|
let e = /* @__PURE__ */ new Map();
|
|
337
|
-
for (let t of
|
|
338
|
-
for (let t of
|
|
174
|
+
for (let t of ge) e.set(t.value, t);
|
|
175
|
+
for (let t of b) e.has(t) || e.set(t, {
|
|
339
176
|
value: t,
|
|
340
177
|
label: t
|
|
341
178
|
});
|
|
342
|
-
for (let t of
|
|
179
|
+
for (let t of ot?.byProduct ?? []) e.has(t.product) || e.set(t.product, {
|
|
343
180
|
value: t.product,
|
|
344
181
|
label: t.product
|
|
345
182
|
});
|
|
346
183
|
return Array.from(e.values());
|
|
347
184
|
}, [
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
]),
|
|
352
|
-
|
|
185
|
+
ot?.byProduct,
|
|
186
|
+
ge,
|
|
187
|
+
b
|
|
188
|
+
]), Ot = (e) => {
|
|
189
|
+
Ke((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]), Y(1);
|
|
353
190
|
};
|
|
354
|
-
return /* @__PURE__ */
|
|
191
|
+
return /* @__PURE__ */ u("div", {
|
|
355
192
|
className: "min-h-screen bg-bg-canvas",
|
|
356
|
-
children: /* @__PURE__ */
|
|
193
|
+
children: /* @__PURE__ */ pe("div", {
|
|
357
194
|
className: "container mx-auto max-w-5xl py-6 px-4",
|
|
358
195
|
children: [
|
|
359
|
-
/* @__PURE__ */
|
|
196
|
+
/* @__PURE__ */ pe("div", {
|
|
360
197
|
className: "mb-6",
|
|
361
|
-
children: [/* @__PURE__ */
|
|
198
|
+
children: [/* @__PURE__ */ u("h1", {
|
|
362
199
|
className: "text-2xl font-bold text-text-primary mb-2",
|
|
363
200
|
children: "Search"
|
|
364
|
-
}), /* @__PURE__ */
|
|
201
|
+
}), /* @__PURE__ */ u("p", {
|
|
365
202
|
className: "text-text-secondary",
|
|
366
|
-
children:
|
|
203
|
+
children: ye
|
|
367
204
|
})]
|
|
368
205
|
}),
|
|
369
|
-
/* @__PURE__ */
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
type: "text",
|
|
378
|
-
value: xt,
|
|
379
|
-
onChange: (e) => St(e.target.value),
|
|
380
|
-
placeholder: d,
|
|
381
|
-
className: "w-full h-12 pl-12 pr-12 text-lg rounded-lg border border-border-default bg-bg-surface text-text-primary placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-primary-default focus:border-transparent",
|
|
382
|
-
autoFocus: !0
|
|
383
|
-
}),
|
|
384
|
-
xt && /* @__PURE__ */ y("button", {
|
|
385
|
-
type: "button",
|
|
386
|
-
onClick: () => {
|
|
387
|
-
St(""), Re("");
|
|
388
|
-
},
|
|
389
|
-
className: "absolute right-4 top-1/2 -translate-y-1/2 p-1 rounded hover:bg-bg-muted transition-colors",
|
|
390
|
-
children: /* @__PURE__ */ y(v, { className: "size-4 text-text-tertiary" })
|
|
391
|
-
})
|
|
392
|
-
]
|
|
393
|
-
})
|
|
206
|
+
/* @__PURE__ */ u(re, {
|
|
207
|
+
inputValue: dt,
|
|
208
|
+
placeholder: ve,
|
|
209
|
+
onInputChange: ft,
|
|
210
|
+
onSubmit: gt,
|
|
211
|
+
onClear: () => {
|
|
212
|
+
ft(""), Ve("");
|
|
213
|
+
}
|
|
394
214
|
}),
|
|
395
|
-
/* @__PURE__ */
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
},
|
|
409
|
-
className: `px-3 py-1.5 text-sm font-medium rounded-md transition-colors ${D === e ? "bg-primary-default text-primary-foreground" : "text-text-secondary hover:bg-bg-muted"}`,
|
|
410
|
-
title: pe[e].description,
|
|
411
|
-
children: pe[e].label
|
|
412
|
-
}, e))
|
|
413
|
-
}),
|
|
414
|
-
/* @__PURE__ */ b("div", {
|
|
415
|
-
className: "flex items-center gap-2",
|
|
416
|
-
children: [/* @__PURE__ */ y(ee, { className: "size-4 text-text-tertiary" }), /* @__PURE__ */ y("select", {
|
|
417
|
-
value: O,
|
|
418
|
-
onChange: (e) => {
|
|
419
|
-
Be(e.target.value), G(1);
|
|
420
|
-
},
|
|
421
|
-
className: "h-9 px-3 text-sm rounded-md border border-border-default bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-primary-default",
|
|
422
|
-
children: me.map((e) => /* @__PURE__ */ y("option", {
|
|
423
|
-
value: e.value,
|
|
424
|
-
children: e.label
|
|
425
|
-
}, e.value))
|
|
426
|
-
})]
|
|
427
|
-
}),
|
|
428
|
-
/* @__PURE__ */ b("button", {
|
|
429
|
-
onClick: () => bt(!J),
|
|
430
|
-
className: `flex items-center gap-2 px-3 py-2 text-sm rounded-md border transition-colors ${J || Q > 0 ? "border-primary-default bg-primary-default/10 text-primary-default" : "border-border-default bg-bg-surface text-text-secondary hover:bg-bg-muted"}`,
|
|
431
|
-
children: [
|
|
432
|
-
/* @__PURE__ */ y(le, { className: "size-4" }),
|
|
433
|
-
"Filters",
|
|
434
|
-
Q > 0 && /* @__PURE__ */ y("span", {
|
|
435
|
-
className: "ml-1 px-1.5 py-0.5 text-xs font-medium bg-primary-default text-primary-foreground rounded-full",
|
|
436
|
-
children: Q
|
|
437
|
-
}),
|
|
438
|
-
y(J ? ae : ne, { className: "size-4" })
|
|
439
|
-
]
|
|
440
|
-
}),
|
|
441
|
-
Q > 0 && /* @__PURE__ */ y("button", {
|
|
442
|
-
type: "button",
|
|
443
|
-
onClick: Mt,
|
|
444
|
-
className: "text-sm text-text-secondary hover:text-text-primary underline",
|
|
445
|
-
children: "Clear all filters"
|
|
446
|
-
})
|
|
447
|
-
]
|
|
215
|
+
/* @__PURE__ */ u(ie, {
|
|
216
|
+
searchMode: g,
|
|
217
|
+
sortBy: _,
|
|
218
|
+
showFilters: lt,
|
|
219
|
+
activeFilterCount: Ct,
|
|
220
|
+
onSearchModeChange: (e) => {
|
|
221
|
+
He(e), Y(1);
|
|
222
|
+
},
|
|
223
|
+
onSortByChange: (e) => {
|
|
224
|
+
Ue(e), Y(1);
|
|
225
|
+
},
|
|
226
|
+
onToggleFilters: () => ut(!lt),
|
|
227
|
+
onClearFilters: St
|
|
448
228
|
}),
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
type: "text",
|
|
558
|
-
value: P,
|
|
559
|
-
onChange: (e) => {
|
|
560
|
-
F(e.target.value), G(1);
|
|
561
|
-
},
|
|
562
|
-
placeholder: "Actor ID",
|
|
563
|
-
className: "w-full h-9 px-3 text-sm rounded-md border border-border-default bg-bg-canvas text-text-primary focus:outline-none focus:ring-2 focus:ring-primary-default"
|
|
564
|
-
})] })
|
|
565
|
-
]
|
|
566
|
-
})] }),
|
|
567
|
-
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h3", {
|
|
568
|
-
className: "text-sm font-medium text-text-primary mb-3",
|
|
569
|
-
children: "Created Date Range"
|
|
570
|
-
}), /* @__PURE__ */ b("div", {
|
|
571
|
-
className: "space-y-3",
|
|
572
|
-
children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
573
|
-
className: "block text-xs text-text-tertiary mb-1",
|
|
574
|
-
children: "From"
|
|
575
|
-
}), /* @__PURE__ */ y("input", {
|
|
576
|
-
"aria-label": "Created from date",
|
|
577
|
-
type: "date",
|
|
578
|
-
value: L,
|
|
579
|
-
onChange: (e) => {
|
|
580
|
-
Ge(e.target.value), G(1);
|
|
581
|
-
},
|
|
582
|
-
className: "w-full h-9 px-3 text-sm rounded-md border border-border-default bg-bg-canvas text-text-primary focus:outline-none focus:ring-2 focus:ring-primary-default"
|
|
583
|
-
})] }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
584
|
-
className: "block text-xs text-text-tertiary mb-1",
|
|
585
|
-
children: "To"
|
|
586
|
-
}), /* @__PURE__ */ y("input", {
|
|
587
|
-
"aria-label": "Created to date",
|
|
588
|
-
type: "date",
|
|
589
|
-
value: R,
|
|
590
|
-
onChange: (e) => {
|
|
591
|
-
Ke(e.target.value), G(1);
|
|
592
|
-
},
|
|
593
|
-
className: "w-full h-9 px-3 text-sm rounded-md border border-border-default bg-bg-canvas text-text-primary focus:outline-none focus:ring-2 focus:ring-primary-default"
|
|
594
|
-
})] })]
|
|
595
|
-
})] }),
|
|
596
|
-
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h3", {
|
|
597
|
-
className: "text-sm font-medium text-text-primary mb-3",
|
|
598
|
-
children: "Updated Date Range"
|
|
599
|
-
}), /* @__PURE__ */ b("div", {
|
|
600
|
-
className: "space-y-3",
|
|
601
|
-
children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
602
|
-
className: "block text-xs text-text-tertiary mb-1",
|
|
603
|
-
children: "From"
|
|
604
|
-
}), /* @__PURE__ */ y("input", {
|
|
605
|
-
"aria-label": "Updated from date",
|
|
606
|
-
type: "date",
|
|
607
|
-
value: z,
|
|
608
|
-
onChange: (e) => {
|
|
609
|
-
qe(e.target.value), G(1);
|
|
610
|
-
},
|
|
611
|
-
className: "w-full h-9 px-3 text-sm rounded-md border border-border-default bg-bg-canvas text-text-primary focus:outline-none focus:ring-2 focus:ring-primary-default"
|
|
612
|
-
})] }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
613
|
-
className: "block text-xs text-text-tertiary mb-1",
|
|
614
|
-
children: "To"
|
|
615
|
-
}), /* @__PURE__ */ y("input", {
|
|
616
|
-
"aria-label": "Updated to date",
|
|
617
|
-
type: "date",
|
|
618
|
-
value: B,
|
|
619
|
-
onChange: (e) => {
|
|
620
|
-
Je(e.target.value), G(1);
|
|
621
|
-
},
|
|
622
|
-
className: "w-full h-9 px-3 text-sm rounded-md border border-border-default bg-bg-canvas text-text-primary focus:outline-none focus:ring-2 focus:ring-primary-default"
|
|
623
|
-
})] })]
|
|
624
|
-
})] }),
|
|
625
|
-
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h3", {
|
|
626
|
-
className: "text-sm font-medium text-text-primary mb-3",
|
|
627
|
-
children: "Tag Filters"
|
|
628
|
-
}), /* @__PURE__ */ b("div", {
|
|
629
|
-
className: "space-y-3",
|
|
630
|
-
children: [
|
|
631
|
-
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
632
|
-
className: "block text-xs text-text-tertiary mb-1",
|
|
633
|
-
children: "Tag IDs"
|
|
634
|
-
}), /* @__PURE__ */ y("input", {
|
|
635
|
-
"aria-label": "Tag IDs filter",
|
|
636
|
-
type: "text",
|
|
637
|
-
value: Ze,
|
|
638
|
-
onChange: (e) => {
|
|
639
|
-
Qe(e.target.value), G(1);
|
|
640
|
-
},
|
|
641
|
-
placeholder: "Comma-separated tag IDs",
|
|
642
|
-
className: "w-full h-9 px-3 text-sm rounded-md border border-border-default bg-bg-canvas text-text-primary focus:outline-none focus:ring-2 focus:ring-primary-default"
|
|
643
|
-
})] }),
|
|
644
|
-
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
645
|
-
className: "block text-xs text-text-tertiary mb-1",
|
|
646
|
-
children: "Tag Keys"
|
|
647
|
-
}), /* @__PURE__ */ y("input", {
|
|
648
|
-
"aria-label": "Tag keys filter",
|
|
649
|
-
type: "text",
|
|
650
|
-
value: $e,
|
|
651
|
-
onChange: (e) => {
|
|
652
|
-
et(e.target.value), G(1);
|
|
653
|
-
},
|
|
654
|
-
placeholder: "Comma-separated tag keys",
|
|
655
|
-
className: "w-full h-9 px-3 text-sm rounded-md border border-border-default bg-bg-canvas text-text-primary focus:outline-none focus:ring-2 focus:ring-primary-default"
|
|
656
|
-
})] }),
|
|
657
|
-
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
658
|
-
className: "block text-xs text-text-tertiary mb-1",
|
|
659
|
-
children: "Hierarchy Paths"
|
|
660
|
-
}), /* @__PURE__ */ y("input", {
|
|
661
|
-
"aria-label": "Tag hierarchy paths filter",
|
|
662
|
-
type: "text",
|
|
663
|
-
value: tt,
|
|
664
|
-
onChange: (e) => {
|
|
665
|
-
nt(e.target.value), G(1);
|
|
666
|
-
},
|
|
667
|
-
placeholder: "team/engineering, finance/payables",
|
|
668
|
-
className: "w-full h-9 px-3 text-sm rounded-md border border-border-default bg-bg-canvas text-text-primary focus:outline-none focus:ring-2 focus:ring-primary-default"
|
|
669
|
-
})] }),
|
|
670
|
-
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
671
|
-
className: "block text-xs text-text-tertiary mb-1",
|
|
672
|
-
children: "Vocabulary Keys"
|
|
673
|
-
}), /* @__PURE__ */ y("input", {
|
|
674
|
-
"aria-label": "Tag vocabulary keys filter",
|
|
675
|
-
type: "text",
|
|
676
|
-
value: rt,
|
|
677
|
-
onChange: (e) => {
|
|
678
|
-
it(e.target.value), G(1);
|
|
679
|
-
},
|
|
680
|
-
placeholder: "project-tags, workspace-tags",
|
|
681
|
-
className: "w-full h-9 px-3 text-sm rounded-md border border-border-default bg-bg-canvas text-text-primary focus:outline-none focus:ring-2 focus:ring-primary-default"
|
|
682
|
-
})] }),
|
|
683
|
-
/* @__PURE__ */ b("div", {
|
|
684
|
-
className: "grid grid-cols-2 gap-3",
|
|
685
|
-
children: [/* @__PURE__ */ b("label", {
|
|
686
|
-
className: "flex items-center gap-2 text-sm text-text-secondary cursor-pointer",
|
|
687
|
-
children: [/* @__PURE__ */ y("input", {
|
|
688
|
-
type: "checkbox",
|
|
689
|
-
checked: at,
|
|
690
|
-
onChange: (e) => {
|
|
691
|
-
ot(e.target.checked), G(1);
|
|
692
|
-
},
|
|
693
|
-
className: "size-4 rounded border-border-default text-primary-default focus:ring-primary-default"
|
|
694
|
-
}), "Match all"]
|
|
695
|
-
}), /* @__PURE__ */ b("label", {
|
|
696
|
-
className: "flex items-center gap-2 text-sm text-text-secondary cursor-pointer",
|
|
697
|
-
children: [/* @__PURE__ */ y("input", {
|
|
698
|
-
type: "checkbox",
|
|
699
|
-
checked: st,
|
|
700
|
-
onChange: (e) => {
|
|
701
|
-
ct(e.target.checked), G(1);
|
|
702
|
-
},
|
|
703
|
-
className: "size-4 rounded border-border-default text-primary-default focus:ring-primary-default"
|
|
704
|
-
}), "Include descendants"]
|
|
705
|
-
})]
|
|
706
|
-
}),
|
|
707
|
-
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
708
|
-
className: "block text-xs text-text-tertiary mb-1",
|
|
709
|
-
children: "Tag depth"
|
|
710
|
-
}), /* @__PURE__ */ y("input", {
|
|
711
|
-
"aria-label": "Tag depth filter",
|
|
712
|
-
type: "number",
|
|
713
|
-
min: "1",
|
|
714
|
-
value: V,
|
|
715
|
-
onChange: (e) => {
|
|
716
|
-
lt(e.target.value), G(1);
|
|
717
|
-
},
|
|
718
|
-
placeholder: "Optional depth limit",
|
|
719
|
-
className: "w-full h-9 px-3 text-sm rounded-md border border-border-default bg-bg-canvas text-text-primary focus:outline-none focus:ring-2 focus:ring-primary-default"
|
|
720
|
-
})] })
|
|
721
|
-
]
|
|
722
|
-
})] }),
|
|
723
|
-
/* @__PURE__ */ b("div", {
|
|
724
|
-
className: "xl:col-span-2",
|
|
725
|
-
children: [/* @__PURE__ */ b("div", {
|
|
726
|
-
className: "flex items-center justify-between mb-3",
|
|
727
|
-
children: [/* @__PURE__ */ y("h3", {
|
|
728
|
-
className: "text-sm font-medium text-text-primary",
|
|
729
|
-
children: "Metadata Conditions"
|
|
730
|
-
}), /* @__PURE__ */ b("button", {
|
|
731
|
-
type: "button",
|
|
732
|
-
onClick: kt,
|
|
733
|
-
className: "inline-flex items-center gap-1 text-xs text-primary-default hover:text-primary-default/80",
|
|
734
|
-
children: [/* @__PURE__ */ y(ce, { className: "size-3.5" }), "Add condition"]
|
|
735
|
-
})]
|
|
736
|
-
}), /* @__PURE__ */ y("div", {
|
|
737
|
-
className: "space-y-3",
|
|
738
|
-
children: H.length === 0 ? /* @__PURE__ */ y("span", {
|
|
739
|
-
className: "text-sm text-text-tertiary",
|
|
740
|
-
children: "No metadata conditions applied."
|
|
741
|
-
}) : H.map((e, t) => /* @__PURE__ */ b("div", {
|
|
742
|
-
className: "grid grid-cols-1 md:grid-cols-[1.4fr_auto_1.4fr_auto] gap-2 items-center",
|
|
743
|
-
children: [
|
|
744
|
-
/* @__PURE__ */ y("input", {
|
|
745
|
-
"aria-label": `Metadata key ${t + 1}`,
|
|
746
|
-
type: "text",
|
|
747
|
-
value: e.key,
|
|
748
|
-
onChange: (e) => At(t, { key: e.target.value }),
|
|
749
|
-
placeholder: "metadata.path",
|
|
750
|
-
className: "h-9 px-3 text-sm rounded-md border border-border-default bg-bg-canvas text-text-primary focus:outline-none focus:ring-2 focus:ring-primary-default"
|
|
751
|
-
}),
|
|
752
|
-
/* @__PURE__ */ b("select", {
|
|
753
|
-
"aria-label": `Metadata operator ${t + 1}`,
|
|
754
|
-
value: e.operator,
|
|
755
|
-
onChange: (e) => At(t, { operator: e.target.value }),
|
|
756
|
-
className: "h-9 px-3 text-sm rounded-md border border-border-default bg-bg-canvas text-text-primary focus:outline-none focus:ring-2 focus:ring-primary-default",
|
|
757
|
-
children: [
|
|
758
|
-
/* @__PURE__ */ y("option", {
|
|
759
|
-
value: "EQUALS",
|
|
760
|
-
children: "Equals"
|
|
761
|
-
}),
|
|
762
|
-
/* @__PURE__ */ y("option", {
|
|
763
|
-
value: "NOT_EQUALS",
|
|
764
|
-
children: "Not equals"
|
|
765
|
-
}),
|
|
766
|
-
/* @__PURE__ */ y("option", {
|
|
767
|
-
value: "CONTAINS",
|
|
768
|
-
children: "Contains"
|
|
769
|
-
}),
|
|
770
|
-
/* @__PURE__ */ y("option", {
|
|
771
|
-
value: "STARTS_WITH",
|
|
772
|
-
children: "Starts with"
|
|
773
|
-
})
|
|
774
|
-
]
|
|
775
|
-
}),
|
|
776
|
-
/* @__PURE__ */ y("input", {
|
|
777
|
-
"aria-label": `Metadata value ${t + 1}`,
|
|
778
|
-
type: "text",
|
|
779
|
-
value: e.value,
|
|
780
|
-
onChange: (e) => At(t, { value: e.target.value }),
|
|
781
|
-
placeholder: "Expected value",
|
|
782
|
-
className: "h-9 px-3 text-sm rounded-md border border-border-default bg-bg-canvas text-text-primary focus:outline-none focus:ring-2 focus:ring-primary-default"
|
|
783
|
-
}),
|
|
784
|
-
/* @__PURE__ */ y("button", {
|
|
785
|
-
type: "button",
|
|
786
|
-
onClick: () => jt(t),
|
|
787
|
-
className: "inline-flex items-center justify-center size-9 rounded-md border border-border-default text-text-secondary hover:bg-bg-muted",
|
|
788
|
-
"aria-label": `Remove metadata condition ${t + 1}`,
|
|
789
|
-
children: /* @__PURE__ */ y(v, { className: "size-4" })
|
|
790
|
-
})
|
|
791
|
-
]
|
|
792
|
-
}, `metadata-condition-${t}`))
|
|
793
|
-
})]
|
|
794
|
-
}),
|
|
795
|
-
/* @__PURE__ */ b("div", {
|
|
796
|
-
className: "xl:col-span-2",
|
|
797
|
-
children: [/* @__PURE__ */ y("h3", {
|
|
798
|
-
className: "text-sm font-medium text-text-primary mb-3",
|
|
799
|
-
children: "Exclusions & Active Filters"
|
|
800
|
-
}), /* @__PURE__ */ b("div", {
|
|
801
|
-
className: "space-y-4",
|
|
802
|
-
children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
803
|
-
className: "block text-xs text-text-tertiary mb-1",
|
|
804
|
-
children: "Exclude entity IDs"
|
|
805
|
-
}), /* @__PURE__ */ y("input", {
|
|
806
|
-
"aria-label": "Exclude entity IDs filter",
|
|
807
|
-
type: "text",
|
|
808
|
-
value: Ye,
|
|
809
|
-
onChange: (e) => {
|
|
810
|
-
Xe(e.target.value), G(1);
|
|
811
|
-
},
|
|
812
|
-
placeholder: "Comma-separated entity IDs",
|
|
813
|
-
className: "w-full h-9 px-3 text-sm rounded-md border border-border-default bg-bg-canvas text-text-primary focus:outline-none focus:ring-2 focus:ring-primary-default"
|
|
814
|
-
})] }), /* @__PURE__ */ b("div", {
|
|
815
|
-
className: "flex flex-wrap gap-2",
|
|
816
|
-
children: [
|
|
817
|
-
k.map((e) => /* @__PURE__ */ b("span", {
|
|
818
|
-
className: "inline-flex items-center gap-1 px-2 py-1 text-xs bg-primary-default/10 text-primary-default rounded-full",
|
|
819
|
-
children: [s.find((t) => t.value === e)?.label || e, /* @__PURE__ */ y("button", {
|
|
820
|
-
type: "button",
|
|
821
|
-
onClick: () => Dt(e),
|
|
822
|
-
className: "hover:bg-primary-default/20 rounded-full p-0.5",
|
|
823
|
-
children: /* @__PURE__ */ y(v, { className: "size-3" })
|
|
824
|
-
})]
|
|
825
|
-
}, `include-${e}`)),
|
|
826
|
-
A.map((e) => /* @__PURE__ */ b("span", {
|
|
827
|
-
className: "inline-flex items-center gap-1 px-2 py-1 text-xs bg-bg-muted text-text-secondary rounded-full",
|
|
828
|
-
children: [
|
|
829
|
-
"Excluding ",
|
|
830
|
-
e,
|
|
831
|
-
/* @__PURE__ */ y("button", {
|
|
832
|
-
type: "button",
|
|
833
|
-
onClick: () => Ot(e),
|
|
834
|
-
className: "hover:bg-bg-canvas rounded-full p-0.5",
|
|
835
|
-
children: /* @__PURE__ */ y(v, { className: "size-3" })
|
|
836
|
-
})
|
|
837
|
-
]
|
|
838
|
-
}, `exclude-chip-${e}`)),
|
|
839
|
-
j.map((e) => /* @__PURE__ */ b("span", {
|
|
840
|
-
className: "inline-flex items-center gap-1 px-2 py-1 text-xs bg-primary-default/10 text-primary-default rounded-full",
|
|
841
|
-
children: [
|
|
842
|
-
"Product: ",
|
|
843
|
-
Ft.find((t) => t.value === e)?.label || e,
|
|
844
|
-
/* @__PURE__ */ y("button", {
|
|
845
|
-
type: "button",
|
|
846
|
-
onClick: () => It(e),
|
|
847
|
-
className: "hover:bg-primary-default/20 rounded-full p-0.5",
|
|
848
|
-
children: /* @__PURE__ */ y(v, { className: "size-3" })
|
|
849
|
-
})
|
|
850
|
-
]
|
|
851
|
-
}, e)),
|
|
852
|
-
M && /* @__PURE__ */ b("span", {
|
|
853
|
-
className: "inline-flex items-center gap-1 px-2 py-1 text-xs bg-primary-default/10 text-primary-default rounded-full",
|
|
854
|
-
children: [
|
|
855
|
-
"Created by: ",
|
|
856
|
-
M,
|
|
857
|
-
/* @__PURE__ */ y("button", {
|
|
858
|
-
type: "button",
|
|
859
|
-
onClick: () => N(""),
|
|
860
|
-
className: "hover:bg-primary-default/20 rounded-full p-0.5",
|
|
861
|
-
children: /* @__PURE__ */ y(v, { className: "size-3" })
|
|
862
|
-
})
|
|
863
|
-
]
|
|
864
|
-
}),
|
|
865
|
-
P && /* @__PURE__ */ b("span", {
|
|
866
|
-
className: "inline-flex items-center gap-1 px-2 py-1 text-xs bg-primary-default/10 text-primary-default rounded-full",
|
|
867
|
-
children: [
|
|
868
|
-
"Updated by: ",
|
|
869
|
-
P,
|
|
870
|
-
/* @__PURE__ */ y("button", {
|
|
871
|
-
type: "button",
|
|
872
|
-
onClick: () => F(""),
|
|
873
|
-
className: "hover:bg-primary-default/20 rounded-full p-0.5",
|
|
874
|
-
children: /* @__PURE__ */ y(v, { className: "size-3" })
|
|
875
|
-
})
|
|
876
|
-
]
|
|
877
|
-
}),
|
|
878
|
-
I && /* @__PURE__ */ b("span", {
|
|
879
|
-
className: "inline-flex items-center gap-1 px-2 py-1 text-xs bg-primary-default/10 text-primary-default rounded-full",
|
|
880
|
-
children: [
|
|
881
|
-
"Project: ",
|
|
882
|
-
I,
|
|
883
|
-
/* @__PURE__ */ y("button", {
|
|
884
|
-
type: "button",
|
|
885
|
-
onClick: () => We(""),
|
|
886
|
-
className: "hover:bg-primary-default/20 rounded-full p-0.5",
|
|
887
|
-
children: /* @__PURE__ */ y(v, { className: "size-3" })
|
|
888
|
-
})
|
|
889
|
-
]
|
|
890
|
-
}),
|
|
891
|
-
(L || R) && /* @__PURE__ */ b("span", {
|
|
892
|
-
className: "inline-flex items-center gap-1 px-2 py-1 text-xs bg-primary-default/10 text-primary-default rounded-full",
|
|
893
|
-
children: [
|
|
894
|
-
"Created: ",
|
|
895
|
-
L || "…",
|
|
896
|
-
" → ",
|
|
897
|
-
R || "…",
|
|
898
|
-
/* @__PURE__ */ y("button", {
|
|
899
|
-
type: "button",
|
|
900
|
-
onClick: () => {
|
|
901
|
-
Ge(""), Ke("");
|
|
902
|
-
},
|
|
903
|
-
className: "hover:bg-primary-default/20 rounded-full p-0.5",
|
|
904
|
-
children: /* @__PURE__ */ y(v, { className: "size-3" })
|
|
905
|
-
})
|
|
906
|
-
]
|
|
907
|
-
}),
|
|
908
|
-
(z || B) && /* @__PURE__ */ b("span", {
|
|
909
|
-
className: "inline-flex items-center gap-1 px-2 py-1 text-xs bg-primary-default/10 text-primary-default rounded-full",
|
|
910
|
-
children: [
|
|
911
|
-
"Updated: ",
|
|
912
|
-
z || "…",
|
|
913
|
-
" → ",
|
|
914
|
-
B || "…",
|
|
915
|
-
/* @__PURE__ */ y("button", {
|
|
916
|
-
type: "button",
|
|
917
|
-
onClick: () => {
|
|
918
|
-
qe(""), Je("");
|
|
919
|
-
},
|
|
920
|
-
className: "hover:bg-primary-default/20 rounded-full p-0.5",
|
|
921
|
-
children: /* @__PURE__ */ y(v, { className: "size-3" })
|
|
922
|
-
})
|
|
923
|
-
]
|
|
924
|
-
}),
|
|
925
|
-
Z && /* @__PURE__ */ b("span", {
|
|
926
|
-
className: "inline-flex items-center gap-1 px-2 py-1 text-xs bg-primary-default/10 text-primary-default rounded-full",
|
|
927
|
-
children: ["Tag filter active", /* @__PURE__ */ y("button", {
|
|
928
|
-
type: "button",
|
|
929
|
-
onClick: () => {
|
|
930
|
-
Qe(""), et(""), nt(""), it(""), ot(!1), ct(!0), lt("");
|
|
931
|
-
},
|
|
932
|
-
className: "hover:bg-primary-default/20 rounded-full p-0.5",
|
|
933
|
-
children: /* @__PURE__ */ y(v, { className: "size-3" })
|
|
934
|
-
})]
|
|
935
|
-
}),
|
|
936
|
-
X.length > 0 && /* @__PURE__ */ b("span", {
|
|
937
|
-
className: "inline-flex items-center gap-1 px-2 py-1 text-xs bg-primary-default/10 text-primary-default rounded-full",
|
|
938
|
-
children: [
|
|
939
|
-
X.length,
|
|
940
|
-
" metadata condition",
|
|
941
|
-
X.length > 1 ? "s" : "",
|
|
942
|
-
/* @__PURE__ */ y("button", {
|
|
943
|
-
type: "button",
|
|
944
|
-
onClick: () => U([]),
|
|
945
|
-
className: "hover:bg-primary-default/20 rounded-full p-0.5",
|
|
946
|
-
children: /* @__PURE__ */ y(v, { className: "size-3" })
|
|
947
|
-
})
|
|
948
|
-
]
|
|
949
|
-
}),
|
|
950
|
-
Y.length > 0 && /* @__PURE__ */ b("span", {
|
|
951
|
-
className: "inline-flex items-center gap-1 px-2 py-1 text-xs bg-bg-muted text-text-secondary rounded-full",
|
|
952
|
-
children: [
|
|
953
|
-
Y.length,
|
|
954
|
-
" excluded ID",
|
|
955
|
-
Y.length > 1 ? "s" : "",
|
|
956
|
-
/* @__PURE__ */ y("button", {
|
|
957
|
-
type: "button",
|
|
958
|
-
onClick: () => Xe(""),
|
|
959
|
-
className: "hover:bg-bg-canvas rounded-full p-0.5",
|
|
960
|
-
children: /* @__PURE__ */ y(v, { className: "size-3" })
|
|
961
|
-
})
|
|
962
|
-
]
|
|
963
|
-
}),
|
|
964
|
-
Q === 0 && /* @__PURE__ */ y("span", {
|
|
965
|
-
className: "text-sm text-text-tertiary",
|
|
966
|
-
children: "No active filters"
|
|
967
|
-
})
|
|
968
|
-
]
|
|
969
|
-
})]
|
|
970
|
-
})]
|
|
971
|
-
})
|
|
972
|
-
]
|
|
229
|
+
lt && /* @__PURE__ */ u(ae, {
|
|
230
|
+
entityTypeOptions: d,
|
|
231
|
+
selectedTypes: v,
|
|
232
|
+
excludedTypes: y,
|
|
233
|
+
availableProductOptions: Dt,
|
|
234
|
+
selectedProducts: b,
|
|
235
|
+
facets: ot,
|
|
236
|
+
projectId: C,
|
|
237
|
+
createdBy: x,
|
|
238
|
+
updatedBy: S,
|
|
239
|
+
dateFrom: w,
|
|
240
|
+
dateTo: T,
|
|
241
|
+
updatedDateFrom: D,
|
|
242
|
+
updatedDateTo: k,
|
|
243
|
+
tagIdsInput: M,
|
|
244
|
+
tagKeysInput: P,
|
|
245
|
+
tagPathsInput: I,
|
|
246
|
+
tagVocabularyKeysInput: R,
|
|
247
|
+
tagMatchAll: B,
|
|
248
|
+
includeDescendants: H,
|
|
249
|
+
tagDepth: W,
|
|
250
|
+
metadataConditions: K,
|
|
251
|
+
onToggleEntityType: _t,
|
|
252
|
+
onToggleExcludedType: vt,
|
|
253
|
+
onToggleProductSource: Ot,
|
|
254
|
+
onProjectIdChange: (e) => {
|
|
255
|
+
Ye(e), Y(1);
|
|
256
|
+
},
|
|
257
|
+
onCreatedByChange: (e) => {
|
|
258
|
+
qe(e), Y(1);
|
|
259
|
+
},
|
|
260
|
+
onUpdatedByChange: (e) => {
|
|
261
|
+
Je(e), Y(1);
|
|
262
|
+
},
|
|
263
|
+
onDateFromChange: (e) => {
|
|
264
|
+
Xe(e), Y(1);
|
|
265
|
+
},
|
|
266
|
+
onDateToChange: (e) => {
|
|
267
|
+
E(e), Y(1);
|
|
268
|
+
},
|
|
269
|
+
onUpdatedDateFromChange: (e) => {
|
|
270
|
+
O(e), Y(1);
|
|
271
|
+
},
|
|
272
|
+
onUpdatedDateToChange: (e) => {
|
|
273
|
+
Ze(e), Y(1);
|
|
274
|
+
},
|
|
275
|
+
onTagIdsChange: (e) => {
|
|
276
|
+
N(e), Y(1);
|
|
277
|
+
},
|
|
278
|
+
onTagKeysChange: (e) => {
|
|
279
|
+
F(e), Y(1);
|
|
280
|
+
},
|
|
281
|
+
onTagPathsChange: (e) => {
|
|
282
|
+
L(e), Y(1);
|
|
283
|
+
},
|
|
284
|
+
onTagVocabularyKeysChange: (e) => {
|
|
285
|
+
z(e), Y(1);
|
|
286
|
+
},
|
|
287
|
+
onTagMatchAllChange: (e) => {
|
|
288
|
+
V(e), Y(1);
|
|
289
|
+
},
|
|
290
|
+
onIncludeDescendantsChange: (e) => {
|
|
291
|
+
U(e), Y(1);
|
|
292
|
+
},
|
|
293
|
+
onTagDepthChange: (e) => {
|
|
294
|
+
G(e), Y(1);
|
|
295
|
+
},
|
|
296
|
+
onAddMetadataCondition: yt,
|
|
297
|
+
onUpdateMetadataCondition: bt,
|
|
298
|
+
onRemoveMetadataCondition: xt,
|
|
299
|
+
children: /* @__PURE__ */ u(oe, {
|
|
300
|
+
excludeIdsInput: A,
|
|
301
|
+
selectedTypes: v,
|
|
302
|
+
excludedTypes: y,
|
|
303
|
+
selectedProducts: b,
|
|
304
|
+
entityTypeOptions: d,
|
|
305
|
+
availableProductOptions: Dt,
|
|
306
|
+
createdBy: x,
|
|
307
|
+
updatedBy: S,
|
|
308
|
+
projectId: C,
|
|
309
|
+
dateFrom: w,
|
|
310
|
+
dateTo: T,
|
|
311
|
+
updatedDateFrom: D,
|
|
312
|
+
updatedDateTo: k,
|
|
313
|
+
builtTagFilter: $,
|
|
314
|
+
normalizedMetadataConditionsCount: Q.length,
|
|
315
|
+
normalizedExcludeIds: Z,
|
|
316
|
+
activeFilterCount: Ct,
|
|
317
|
+
onExcludeIdsChange: (e) => {
|
|
318
|
+
j(e), Y(1);
|
|
319
|
+
},
|
|
320
|
+
onToggleEntityType: _t,
|
|
321
|
+
onToggleExcludedType: vt,
|
|
322
|
+
onToggleProductSource: Ot,
|
|
323
|
+
onClearCreatedBy: () => qe(""),
|
|
324
|
+
onClearUpdatedBy: () => Je(""),
|
|
325
|
+
onClearProjectId: () => Ye(""),
|
|
326
|
+
onClearCreatedDateRange: () => {
|
|
327
|
+
Xe(""), E("");
|
|
328
|
+
},
|
|
329
|
+
onClearUpdatedDateRange: () => {
|
|
330
|
+
O(""), Ze("");
|
|
331
|
+
},
|
|
332
|
+
onClearTagFilter: () => {
|
|
333
|
+
N(""), F(""), L(""), z(""), V(!1), U(!0), G("");
|
|
334
|
+
},
|
|
335
|
+
onClearMetadataConditions: () => q([]),
|
|
336
|
+
onClearExcludeIds: () => j("")
|
|
973
337
|
})
|
|
974
338
|
}),
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
className: "flex items-center gap-2",
|
|
981
|
-
children: [/* @__PURE__ */ y(se, { className: "size-4 animate-spin" }), "Searching..."]
|
|
982
|
-
}) : yt ? /* @__PURE__ */ y("span", {
|
|
983
|
-
className: "text-danger-default",
|
|
984
|
-
children: yt
|
|
985
|
-
}) : /* @__PURE__ */ b("span", { children: [
|
|
986
|
-
"Found ",
|
|
987
|
-
/* @__PURE__ */ y("strong", { children: dt }),
|
|
988
|
-
" results",
|
|
989
|
-
ht > 0 && /* @__PURE__ */ b("span", {
|
|
990
|
-
className: "text-text-tertiary",
|
|
991
|
-
children: [
|
|
992
|
-
" in ",
|
|
993
|
-
ht,
|
|
994
|
-
"ms"
|
|
995
|
-
]
|
|
996
|
-
})
|
|
997
|
-
] })
|
|
998
|
-
})
|
|
339
|
+
h && /* @__PURE__ */ u(se, {
|
|
340
|
+
isSearching: we,
|
|
341
|
+
error: ct,
|
|
342
|
+
total: et,
|
|
343
|
+
searchTimeMs: it
|
|
999
344
|
}),
|
|
1000
|
-
/* @__PURE__ */
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
4,
|
|
1008
|
-
5
|
|
1009
|
-
].map((e) => /* @__PURE__ */ y("div", {
|
|
1010
|
-
className: "p-4 bg-bg-surface rounded-lg border border-border-default animate-pulse",
|
|
1011
|
-
children: /* @__PURE__ */ b("div", {
|
|
1012
|
-
className: "flex items-start gap-3",
|
|
1013
|
-
children: [/* @__PURE__ */ y("div", { className: "size-10 rounded-md bg-bg-muted" }), /* @__PURE__ */ b("div", {
|
|
1014
|
-
className: "flex-1",
|
|
1015
|
-
children: [/* @__PURE__ */ y("div", { className: "h-5 w-1/3 bg-bg-muted rounded mb-2" }), /* @__PURE__ */ y("div", { className: "h-4 w-2/3 bg-bg-muted rounded" })]
|
|
1016
|
-
})]
|
|
1017
|
-
})
|
|
1018
|
-
}, e)) }),
|
|
1019
|
-
!w && !yt && K.length === 0 && E && /* @__PURE__ */ b("div", {
|
|
1020
|
-
className: "py-12 text-center",
|
|
1021
|
-
children: [
|
|
1022
|
-
/* @__PURE__ */ y(p, { className: "size-12 mx-auto text-text-tertiary mb-4" }),
|
|
1023
|
-
/* @__PURE__ */ y("h3", {
|
|
1024
|
-
className: "text-lg font-medium text-text-primary mb-2",
|
|
1025
|
-
children: "No results found"
|
|
1026
|
-
}),
|
|
1027
|
-
/* @__PURE__ */ b("p", {
|
|
1028
|
-
className: "text-text-secondary max-w-md mx-auto",
|
|
1029
|
-
children: [
|
|
1030
|
-
"No results found for \"",
|
|
1031
|
-
E,
|
|
1032
|
-
"\". Try adjusting your search terms or filters."
|
|
1033
|
-
]
|
|
1034
|
-
}),
|
|
1035
|
-
/* @__PURE__ */ b("div", {
|
|
1036
|
-
className: "mt-6 space-y-2 text-sm text-text-tertiary",
|
|
1037
|
-
children: [/* @__PURE__ */ y("p", { children: "Suggestions:" }), /* @__PURE__ */ b("ul", {
|
|
1038
|
-
className: "list-disc list-inside",
|
|
1039
|
-
children: [
|
|
1040
|
-
/* @__PURE__ */ y("li", { children: "Check your spelling" }),
|
|
1041
|
-
/* @__PURE__ */ y("li", { children: "Try more general keywords" }),
|
|
1042
|
-
/* @__PURE__ */ y("li", { children: "Use fewer filters" }),
|
|
1043
|
-
/* @__PURE__ */ y("li", { children: "Try \"Partial\" search mode for autocomplete" })
|
|
1044
|
-
]
|
|
1045
|
-
})]
|
|
1046
|
-
})
|
|
1047
|
-
]
|
|
1048
|
-
}),
|
|
1049
|
-
!w && !E && /* @__PURE__ */ b("div", {
|
|
1050
|
-
className: "py-12 text-center",
|
|
1051
|
-
children: [
|
|
1052
|
-
/* @__PURE__ */ y(p, { className: "size-12 mx-auto text-text-tertiary mb-4" }),
|
|
1053
|
-
/* @__PURE__ */ y("h3", {
|
|
1054
|
-
className: "text-lg font-medium text-text-primary mb-2",
|
|
1055
|
-
children: "Start searching"
|
|
1056
|
-
}),
|
|
1057
|
-
/* @__PURE__ */ y("p", {
|
|
1058
|
-
className: "text-text-secondary max-w-md mx-auto",
|
|
1059
|
-
children: "Enter a search term above to find documents, tags, projects, tasks, and more across your workspace."
|
|
1060
|
-
})
|
|
1061
|
-
]
|
|
1062
|
-
}),
|
|
1063
|
-
K.map((e) => /* @__PURE__ */ y("button", {
|
|
1064
|
-
type: "button",
|
|
1065
|
-
onClick: () => Nt(e),
|
|
1066
|
-
className: "w-full p-4 bg-bg-surface rounded-lg border border-border-default hover:border-primary-default hover:shadow-sm transition-all text-left group",
|
|
1067
|
-
children: /* @__PURE__ */ b("div", {
|
|
1068
|
-
className: "flex items-start gap-3",
|
|
1069
|
-
children: [/* @__PURE__ */ y("div", {
|
|
1070
|
-
className: "flex-shrink-0 size-10 rounded-md bg-bg-muted flex items-center justify-center group-hover:bg-primary-default/10 transition-colors",
|
|
1071
|
-
children: /* @__PURE__ */ y(Pt(e.entityType || e.category), { className: "size-5 text-text-tertiary group-hover:text-primary-default" })
|
|
1072
|
-
}), /* @__PURE__ */ b("div", {
|
|
1073
|
-
className: "flex-1 min-w-0",
|
|
1074
|
-
children: [
|
|
1075
|
-
/* @__PURE__ */ b("div", {
|
|
1076
|
-
className: "flex items-center gap-2 mb-1",
|
|
1077
|
-
children: [
|
|
1078
|
-
/* @__PURE__ */ y("h3", {
|
|
1079
|
-
className: "text-base font-medium text-text-primary truncate group-hover:text-primary-default",
|
|
1080
|
-
children: e.title
|
|
1081
|
-
}),
|
|
1082
|
-
/* @__PURE__ */ y("span", {
|
|
1083
|
-
className: "flex-shrink-0 px-2 py-0.5 text-xs font-medium bg-bg-muted text-text-tertiary rounded",
|
|
1084
|
-
children: e.entityType || e.category
|
|
1085
|
-
}),
|
|
1086
|
-
e.productSource && /* @__PURE__ */ y("span", {
|
|
1087
|
-
className: "flex-shrink-0 px-2 py-0.5 text-xs font-medium bg-bg-muted text-text-tertiary rounded",
|
|
1088
|
-
children: e.productSource
|
|
1089
|
-
})
|
|
1090
|
-
]
|
|
1091
|
-
}),
|
|
1092
|
-
e.description && /* @__PURE__ */ y("p", {
|
|
1093
|
-
className: "text-sm text-text-secondary line-clamp-2",
|
|
1094
|
-
children: e.description
|
|
1095
|
-
}),
|
|
1096
|
-
/* @__PURE__ */ b("div", {
|
|
1097
|
-
className: "flex items-center gap-4 mt-2 text-xs text-text-tertiary",
|
|
1098
|
-
children: [e.score !== void 0 && e.score > 0 && /* @__PURE__ */ b("span", {
|
|
1099
|
-
className: "flex items-center gap-1",
|
|
1100
|
-
children: ["Score: ", e.score.toFixed(2)]
|
|
1101
|
-
}), e.metadata?.createdAt && /* @__PURE__ */ b("span", {
|
|
1102
|
-
className: "flex items-center gap-1",
|
|
1103
|
-
children: [/* @__PURE__ */ y(oe, { className: "size-3" }), new Date(String(e.metadata.createdAt)).toLocaleDateString()]
|
|
1104
|
-
})]
|
|
1105
|
-
})
|
|
1106
|
-
]
|
|
1107
|
-
})]
|
|
1108
|
-
})
|
|
1109
|
-
}, e.id))
|
|
1110
|
-
]
|
|
345
|
+
/* @__PURE__ */ u(ce, {
|
|
346
|
+
isSearching: we,
|
|
347
|
+
error: ct,
|
|
348
|
+
query: h,
|
|
349
|
+
results: Qe,
|
|
350
|
+
getEntityIcon: Et,
|
|
351
|
+
onResultClick: Tt
|
|
1111
352
|
}),
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
onClick: () => G((e) => Math.max(1, e - 1)),
|
|
1118
|
-
disabled: W === 1,
|
|
1119
|
-
className: "flex items-center gap-1 px-3 py-2 text-sm rounded-md border border-border-default bg-bg-surface text-text-secondary hover:bg-bg-muted disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1120
|
-
children: [/* @__PURE__ */ y(re, { className: "size-4" }), "Previous"]
|
|
1121
|
-
}),
|
|
1122
|
-
/* @__PURE__ */ y("div", {
|
|
1123
|
-
className: "flex items-center gap-1",
|
|
1124
|
-
children: Array.from({ length: Math.min(5, $) }, (e, t) => {
|
|
1125
|
-
let n;
|
|
1126
|
-
return n = $ <= 5 || W <= 3 ? t + 1 : W >= $ - 2 ? $ - 4 + t : W - 2 + t, /* @__PURE__ */ y("button", {
|
|
1127
|
-
onClick: () => G(n),
|
|
1128
|
-
className: `w-9 h-9 text-sm rounded-md transition-colors ${W === n ? "bg-primary-default text-primary-foreground" : "border border-border-default bg-bg-surface text-text-secondary hover:bg-bg-muted"}`,
|
|
1129
|
-
children: n
|
|
1130
|
-
}, n);
|
|
1131
|
-
})
|
|
1132
|
-
}),
|
|
1133
|
-
/* @__PURE__ */ b("button", {
|
|
1134
|
-
type: "button",
|
|
1135
|
-
onClick: () => G((e) => Math.min($, e + 1)),
|
|
1136
|
-
disabled: W === $ || !pt,
|
|
1137
|
-
className: "flex items-center gap-1 px-3 py-2 text-sm rounded-md border border-border-default bg-bg-surface text-text-secondary hover:bg-bg-muted disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1138
|
-
children: ["Next", /* @__PURE__ */ y(ie, { className: "size-4" })]
|
|
1139
|
-
})
|
|
1140
|
-
]
|
|
353
|
+
Qe.length > 0 && wt > 1 && /* @__PURE__ */ u(le, {
|
|
354
|
+
currentPage: J,
|
|
355
|
+
totalPages: wt,
|
|
356
|
+
hasMore: nt,
|
|
357
|
+
onPageChange: Y
|
|
1141
358
|
})
|
|
1142
359
|
]
|
|
1143
360
|
})
|
|
1144
361
|
});
|
|
1145
362
|
}
|
|
1146
363
|
//#endregion
|
|
1147
|
-
export {
|
|
364
|
+
export { d as SearchPage };
|