@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
|
@@ -1,1142 +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: "h-4 w-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
|
-
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"}`,
|
|
409
|
-
title: pe[e].description,
|
|
410
|
-
children: pe[e].label
|
|
411
|
-
}, e))
|
|
412
|
-
}),
|
|
413
|
-
/* @__PURE__ */ b("div", {
|
|
414
|
-
className: "flex items-center gap-2",
|
|
415
|
-
children: [/* @__PURE__ */ y(ee, { className: "h-4 w-4 text-text-tertiary" }), /* @__PURE__ */ y("select", {
|
|
416
|
-
value: O,
|
|
417
|
-
onChange: (e) => {
|
|
418
|
-
Be(e.target.value), G(1);
|
|
419
|
-
},
|
|
420
|
-
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",
|
|
421
|
-
children: me.map((e) => /* @__PURE__ */ y("option", {
|
|
422
|
-
value: e.value,
|
|
423
|
-
children: e.label
|
|
424
|
-
}, e.value))
|
|
425
|
-
})]
|
|
426
|
-
}),
|
|
427
|
-
/* @__PURE__ */ b("button", {
|
|
428
|
-
onClick: () => bt(!J),
|
|
429
|
-
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"}`,
|
|
430
|
-
children: [
|
|
431
|
-
/* @__PURE__ */ y(le, { className: "h-4 w-4" }),
|
|
432
|
-
"Filters",
|
|
433
|
-
Q > 0 && /* @__PURE__ */ y("span", {
|
|
434
|
-
className: "ml-1 px-1.5 py-0.5 text-xs font-medium bg-primary-default text-primary-foreground rounded-full",
|
|
435
|
-
children: Q
|
|
436
|
-
}),
|
|
437
|
-
y(J ? ae : ne, { className: "h-4 w-4" })
|
|
438
|
-
]
|
|
439
|
-
}),
|
|
440
|
-
Q > 0 && /* @__PURE__ */ y("button", {
|
|
441
|
-
onClick: Mt,
|
|
442
|
-
className: "text-sm text-text-secondary hover:text-text-primary underline",
|
|
443
|
-
children: "Clear all filters"
|
|
444
|
-
})
|
|
445
|
-
]
|
|
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
|
|
446
228
|
}),
|
|
447
|
-
|
|
448
|
-
|
|
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
|
-
type: "text",
|
|
556
|
-
value: P,
|
|
557
|
-
onChange: (e) => {
|
|
558
|
-
F(e.target.value), G(1);
|
|
559
|
-
},
|
|
560
|
-
placeholder: "Actor ID",
|
|
561
|
-
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"
|
|
562
|
-
})] })
|
|
563
|
-
]
|
|
564
|
-
})] }),
|
|
565
|
-
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h3", {
|
|
566
|
-
className: "text-sm font-medium text-text-primary mb-3",
|
|
567
|
-
children: "Created Date Range"
|
|
568
|
-
}), /* @__PURE__ */ b("div", {
|
|
569
|
-
className: "space-y-3",
|
|
570
|
-
children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
571
|
-
className: "block text-xs text-text-tertiary mb-1",
|
|
572
|
-
children: "From"
|
|
573
|
-
}), /* @__PURE__ */ y("input", {
|
|
574
|
-
"aria-label": "Created from date",
|
|
575
|
-
type: "date",
|
|
576
|
-
value: L,
|
|
577
|
-
onChange: (e) => {
|
|
578
|
-
Ge(e.target.value), G(1);
|
|
579
|
-
},
|
|
580
|
-
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"
|
|
581
|
-
})] }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
582
|
-
className: "block text-xs text-text-tertiary mb-1",
|
|
583
|
-
children: "To"
|
|
584
|
-
}), /* @__PURE__ */ y("input", {
|
|
585
|
-
"aria-label": "Created to date",
|
|
586
|
-
type: "date",
|
|
587
|
-
value: R,
|
|
588
|
-
onChange: (e) => {
|
|
589
|
-
Ke(e.target.value), G(1);
|
|
590
|
-
},
|
|
591
|
-
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"
|
|
592
|
-
})] })]
|
|
593
|
-
})] }),
|
|
594
|
-
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h3", {
|
|
595
|
-
className: "text-sm font-medium text-text-primary mb-3",
|
|
596
|
-
children: "Updated Date Range"
|
|
597
|
-
}), /* @__PURE__ */ b("div", {
|
|
598
|
-
className: "space-y-3",
|
|
599
|
-
children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
600
|
-
className: "block text-xs text-text-tertiary mb-1",
|
|
601
|
-
children: "From"
|
|
602
|
-
}), /* @__PURE__ */ y("input", {
|
|
603
|
-
"aria-label": "Updated from date",
|
|
604
|
-
type: "date",
|
|
605
|
-
value: z,
|
|
606
|
-
onChange: (e) => {
|
|
607
|
-
qe(e.target.value), G(1);
|
|
608
|
-
},
|
|
609
|
-
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"
|
|
610
|
-
})] }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
611
|
-
className: "block text-xs text-text-tertiary mb-1",
|
|
612
|
-
children: "To"
|
|
613
|
-
}), /* @__PURE__ */ y("input", {
|
|
614
|
-
"aria-label": "Updated to date",
|
|
615
|
-
type: "date",
|
|
616
|
-
value: B,
|
|
617
|
-
onChange: (e) => {
|
|
618
|
-
Je(e.target.value), G(1);
|
|
619
|
-
},
|
|
620
|
-
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"
|
|
621
|
-
})] })]
|
|
622
|
-
})] }),
|
|
623
|
-
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h3", {
|
|
624
|
-
className: "text-sm font-medium text-text-primary mb-3",
|
|
625
|
-
children: "Tag Filters"
|
|
626
|
-
}), /* @__PURE__ */ b("div", {
|
|
627
|
-
className: "space-y-3",
|
|
628
|
-
children: [
|
|
629
|
-
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
630
|
-
className: "block text-xs text-text-tertiary mb-1",
|
|
631
|
-
children: "Tag IDs"
|
|
632
|
-
}), /* @__PURE__ */ y("input", {
|
|
633
|
-
"aria-label": "Tag IDs filter",
|
|
634
|
-
type: "text",
|
|
635
|
-
value: Ze,
|
|
636
|
-
onChange: (e) => {
|
|
637
|
-
Qe(e.target.value), G(1);
|
|
638
|
-
},
|
|
639
|
-
placeholder: "Comma-separated tag IDs",
|
|
640
|
-
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"
|
|
641
|
-
})] }),
|
|
642
|
-
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
643
|
-
className: "block text-xs text-text-tertiary mb-1",
|
|
644
|
-
children: "Tag Keys"
|
|
645
|
-
}), /* @__PURE__ */ y("input", {
|
|
646
|
-
"aria-label": "Tag keys filter",
|
|
647
|
-
type: "text",
|
|
648
|
-
value: $e,
|
|
649
|
-
onChange: (e) => {
|
|
650
|
-
et(e.target.value), G(1);
|
|
651
|
-
},
|
|
652
|
-
placeholder: "Comma-separated tag keys",
|
|
653
|
-
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"
|
|
654
|
-
})] }),
|
|
655
|
-
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
656
|
-
className: "block text-xs text-text-tertiary mb-1",
|
|
657
|
-
children: "Hierarchy Paths"
|
|
658
|
-
}), /* @__PURE__ */ y("input", {
|
|
659
|
-
"aria-label": "Tag hierarchy paths filter",
|
|
660
|
-
type: "text",
|
|
661
|
-
value: tt,
|
|
662
|
-
onChange: (e) => {
|
|
663
|
-
nt(e.target.value), G(1);
|
|
664
|
-
},
|
|
665
|
-
placeholder: "team/engineering, finance/payables",
|
|
666
|
-
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"
|
|
667
|
-
})] }),
|
|
668
|
-
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
669
|
-
className: "block text-xs text-text-tertiary mb-1",
|
|
670
|
-
children: "Vocabulary Keys"
|
|
671
|
-
}), /* @__PURE__ */ y("input", {
|
|
672
|
-
"aria-label": "Tag vocabulary keys filter",
|
|
673
|
-
type: "text",
|
|
674
|
-
value: rt,
|
|
675
|
-
onChange: (e) => {
|
|
676
|
-
it(e.target.value), G(1);
|
|
677
|
-
},
|
|
678
|
-
placeholder: "project-tags, workspace-tags",
|
|
679
|
-
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"
|
|
680
|
-
})] }),
|
|
681
|
-
/* @__PURE__ */ b("div", {
|
|
682
|
-
className: "grid grid-cols-2 gap-3",
|
|
683
|
-
children: [/* @__PURE__ */ b("label", {
|
|
684
|
-
className: "flex items-center gap-2 text-sm text-text-secondary cursor-pointer",
|
|
685
|
-
children: [/* @__PURE__ */ y("input", {
|
|
686
|
-
type: "checkbox",
|
|
687
|
-
checked: at,
|
|
688
|
-
onChange: (e) => {
|
|
689
|
-
ot(e.target.checked), G(1);
|
|
690
|
-
},
|
|
691
|
-
className: "h-4 w-4 rounded border-border-default text-primary-default focus:ring-primary-default"
|
|
692
|
-
}), "Match all"]
|
|
693
|
-
}), /* @__PURE__ */ b("label", {
|
|
694
|
-
className: "flex items-center gap-2 text-sm text-text-secondary cursor-pointer",
|
|
695
|
-
children: [/* @__PURE__ */ y("input", {
|
|
696
|
-
type: "checkbox",
|
|
697
|
-
checked: st,
|
|
698
|
-
onChange: (e) => {
|
|
699
|
-
ct(e.target.checked), G(1);
|
|
700
|
-
},
|
|
701
|
-
className: "h-4 w-4 rounded border-border-default text-primary-default focus:ring-primary-default"
|
|
702
|
-
}), "Include descendants"]
|
|
703
|
-
})]
|
|
704
|
-
}),
|
|
705
|
-
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
706
|
-
className: "block text-xs text-text-tertiary mb-1",
|
|
707
|
-
children: "Tag depth"
|
|
708
|
-
}), /* @__PURE__ */ y("input", {
|
|
709
|
-
"aria-label": "Tag depth filter",
|
|
710
|
-
type: "number",
|
|
711
|
-
min: "1",
|
|
712
|
-
value: V,
|
|
713
|
-
onChange: (e) => {
|
|
714
|
-
lt(e.target.value), G(1);
|
|
715
|
-
},
|
|
716
|
-
placeholder: "Optional depth limit",
|
|
717
|
-
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"
|
|
718
|
-
})] })
|
|
719
|
-
]
|
|
720
|
-
})] }),
|
|
721
|
-
/* @__PURE__ */ b("div", {
|
|
722
|
-
className: "xl:col-span-2",
|
|
723
|
-
children: [/* @__PURE__ */ b("div", {
|
|
724
|
-
className: "flex items-center justify-between mb-3",
|
|
725
|
-
children: [/* @__PURE__ */ y("h3", {
|
|
726
|
-
className: "text-sm font-medium text-text-primary",
|
|
727
|
-
children: "Metadata Conditions"
|
|
728
|
-
}), /* @__PURE__ */ b("button", {
|
|
729
|
-
type: "button",
|
|
730
|
-
onClick: kt,
|
|
731
|
-
className: "inline-flex items-center gap-1 text-xs text-primary-default hover:text-primary-default/80",
|
|
732
|
-
children: [/* @__PURE__ */ y(ce, { className: "h-3.5 w-3.5" }), "Add condition"]
|
|
733
|
-
})]
|
|
734
|
-
}), /* @__PURE__ */ y("div", {
|
|
735
|
-
className: "space-y-3",
|
|
736
|
-
children: H.length === 0 ? /* @__PURE__ */ y("span", {
|
|
737
|
-
className: "text-sm text-text-tertiary",
|
|
738
|
-
children: "No metadata conditions applied."
|
|
739
|
-
}) : H.map((e, t) => /* @__PURE__ */ b("div", {
|
|
740
|
-
className: "grid grid-cols-1 md:grid-cols-[1.4fr_auto_1.4fr_auto] gap-2 items-center",
|
|
741
|
-
children: [
|
|
742
|
-
/* @__PURE__ */ y("input", {
|
|
743
|
-
"aria-label": `Metadata key ${t + 1}`,
|
|
744
|
-
type: "text",
|
|
745
|
-
value: e.key,
|
|
746
|
-
onChange: (e) => At(t, { key: e.target.value }),
|
|
747
|
-
placeholder: "metadata.path",
|
|
748
|
-
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"
|
|
749
|
-
}),
|
|
750
|
-
/* @__PURE__ */ b("select", {
|
|
751
|
-
"aria-label": `Metadata operator ${t + 1}`,
|
|
752
|
-
value: e.operator,
|
|
753
|
-
onChange: (e) => At(t, { operator: e.target.value }),
|
|
754
|
-
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",
|
|
755
|
-
children: [
|
|
756
|
-
/* @__PURE__ */ y("option", {
|
|
757
|
-
value: "EQUALS",
|
|
758
|
-
children: "Equals"
|
|
759
|
-
}),
|
|
760
|
-
/* @__PURE__ */ y("option", {
|
|
761
|
-
value: "NOT_EQUALS",
|
|
762
|
-
children: "Not equals"
|
|
763
|
-
}),
|
|
764
|
-
/* @__PURE__ */ y("option", {
|
|
765
|
-
value: "CONTAINS",
|
|
766
|
-
children: "Contains"
|
|
767
|
-
}),
|
|
768
|
-
/* @__PURE__ */ y("option", {
|
|
769
|
-
value: "STARTS_WITH",
|
|
770
|
-
children: "Starts with"
|
|
771
|
-
})
|
|
772
|
-
]
|
|
773
|
-
}),
|
|
774
|
-
/* @__PURE__ */ y("input", {
|
|
775
|
-
"aria-label": `Metadata value ${t + 1}`,
|
|
776
|
-
type: "text",
|
|
777
|
-
value: e.value,
|
|
778
|
-
onChange: (e) => At(t, { value: e.target.value }),
|
|
779
|
-
placeholder: "Expected value",
|
|
780
|
-
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"
|
|
781
|
-
}),
|
|
782
|
-
/* @__PURE__ */ y("button", {
|
|
783
|
-
type: "button",
|
|
784
|
-
onClick: () => jt(t),
|
|
785
|
-
className: "inline-flex items-center justify-center h-9 w-9 rounded-md border border-border-default text-text-secondary hover:bg-bg-muted",
|
|
786
|
-
"aria-label": `Remove metadata condition ${t + 1}`,
|
|
787
|
-
children: /* @__PURE__ */ y(v, { className: "h-4 w-4" })
|
|
788
|
-
})
|
|
789
|
-
]
|
|
790
|
-
}, `metadata-condition-${t}`))
|
|
791
|
-
})]
|
|
792
|
-
}),
|
|
793
|
-
/* @__PURE__ */ b("div", {
|
|
794
|
-
className: "xl:col-span-2",
|
|
795
|
-
children: [/* @__PURE__ */ y("h3", {
|
|
796
|
-
className: "text-sm font-medium text-text-primary mb-3",
|
|
797
|
-
children: "Exclusions & Active Filters"
|
|
798
|
-
}), /* @__PURE__ */ b("div", {
|
|
799
|
-
className: "space-y-4",
|
|
800
|
-
children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
801
|
-
className: "block text-xs text-text-tertiary mb-1",
|
|
802
|
-
children: "Exclude entity IDs"
|
|
803
|
-
}), /* @__PURE__ */ y("input", {
|
|
804
|
-
"aria-label": "Exclude entity IDs filter",
|
|
805
|
-
type: "text",
|
|
806
|
-
value: Ye,
|
|
807
|
-
onChange: (e) => {
|
|
808
|
-
Xe(e.target.value), G(1);
|
|
809
|
-
},
|
|
810
|
-
placeholder: "Comma-separated entity IDs",
|
|
811
|
-
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"
|
|
812
|
-
})] }), /* @__PURE__ */ b("div", {
|
|
813
|
-
className: "flex flex-wrap gap-2",
|
|
814
|
-
children: [
|
|
815
|
-
k.map((e) => /* @__PURE__ */ b("span", {
|
|
816
|
-
className: "inline-flex items-center gap-1 px-2 py-1 text-xs bg-primary-default/10 text-primary-default rounded-full",
|
|
817
|
-
children: [s.find((t) => t.value === e)?.label || e, /* @__PURE__ */ y("button", {
|
|
818
|
-
type: "button",
|
|
819
|
-
onClick: () => Dt(e),
|
|
820
|
-
className: "hover:bg-primary-default/20 rounded-full p-0.5",
|
|
821
|
-
children: /* @__PURE__ */ y(v, { className: "h-3 w-3" })
|
|
822
|
-
})]
|
|
823
|
-
}, `include-${e}`)),
|
|
824
|
-
A.map((e) => /* @__PURE__ */ b("span", {
|
|
825
|
-
className: "inline-flex items-center gap-1 px-2 py-1 text-xs bg-bg-muted text-text-secondary rounded-full",
|
|
826
|
-
children: [
|
|
827
|
-
"Excluding ",
|
|
828
|
-
e,
|
|
829
|
-
/* @__PURE__ */ y("button", {
|
|
830
|
-
type: "button",
|
|
831
|
-
onClick: () => Ot(e),
|
|
832
|
-
className: "hover:bg-bg-canvas rounded-full p-0.5",
|
|
833
|
-
children: /* @__PURE__ */ y(v, { className: "h-3 w-3" })
|
|
834
|
-
})
|
|
835
|
-
]
|
|
836
|
-
}, `exclude-chip-${e}`)),
|
|
837
|
-
j.map((e) => /* @__PURE__ */ b("span", {
|
|
838
|
-
className: "inline-flex items-center gap-1 px-2 py-1 text-xs bg-primary-default/10 text-primary-default rounded-full",
|
|
839
|
-
children: [
|
|
840
|
-
"Product: ",
|
|
841
|
-
Ft.find((t) => t.value === e)?.label || e,
|
|
842
|
-
/* @__PURE__ */ y("button", {
|
|
843
|
-
type: "button",
|
|
844
|
-
onClick: () => It(e),
|
|
845
|
-
className: "hover:bg-primary-default/20 rounded-full p-0.5",
|
|
846
|
-
children: /* @__PURE__ */ y(v, { className: "h-3 w-3" })
|
|
847
|
-
})
|
|
848
|
-
]
|
|
849
|
-
}, e)),
|
|
850
|
-
M && /* @__PURE__ */ b("span", {
|
|
851
|
-
className: "inline-flex items-center gap-1 px-2 py-1 text-xs bg-primary-default/10 text-primary-default rounded-full",
|
|
852
|
-
children: [
|
|
853
|
-
"Created by: ",
|
|
854
|
-
M,
|
|
855
|
-
/* @__PURE__ */ y("button", {
|
|
856
|
-
type: "button",
|
|
857
|
-
onClick: () => N(""),
|
|
858
|
-
className: "hover:bg-primary-default/20 rounded-full p-0.5",
|
|
859
|
-
children: /* @__PURE__ */ y(v, { className: "h-3 w-3" })
|
|
860
|
-
})
|
|
861
|
-
]
|
|
862
|
-
}),
|
|
863
|
-
P && /* @__PURE__ */ b("span", {
|
|
864
|
-
className: "inline-flex items-center gap-1 px-2 py-1 text-xs bg-primary-default/10 text-primary-default rounded-full",
|
|
865
|
-
children: [
|
|
866
|
-
"Updated by: ",
|
|
867
|
-
P,
|
|
868
|
-
/* @__PURE__ */ y("button", {
|
|
869
|
-
type: "button",
|
|
870
|
-
onClick: () => F(""),
|
|
871
|
-
className: "hover:bg-primary-default/20 rounded-full p-0.5",
|
|
872
|
-
children: /* @__PURE__ */ y(v, { className: "h-3 w-3" })
|
|
873
|
-
})
|
|
874
|
-
]
|
|
875
|
-
}),
|
|
876
|
-
I && /* @__PURE__ */ b("span", {
|
|
877
|
-
className: "inline-flex items-center gap-1 px-2 py-1 text-xs bg-primary-default/10 text-primary-default rounded-full",
|
|
878
|
-
children: [
|
|
879
|
-
"Project: ",
|
|
880
|
-
I,
|
|
881
|
-
/* @__PURE__ */ y("button", {
|
|
882
|
-
type: "button",
|
|
883
|
-
onClick: () => We(""),
|
|
884
|
-
className: "hover:bg-primary-default/20 rounded-full p-0.5",
|
|
885
|
-
children: /* @__PURE__ */ y(v, { className: "h-3 w-3" })
|
|
886
|
-
})
|
|
887
|
-
]
|
|
888
|
-
}),
|
|
889
|
-
(L || R) && /* @__PURE__ */ b("span", {
|
|
890
|
-
className: "inline-flex items-center gap-1 px-2 py-1 text-xs bg-primary-default/10 text-primary-default rounded-full",
|
|
891
|
-
children: [
|
|
892
|
-
"Created: ",
|
|
893
|
-
L || "…",
|
|
894
|
-
" → ",
|
|
895
|
-
R || "…",
|
|
896
|
-
/* @__PURE__ */ y("button", {
|
|
897
|
-
type: "button",
|
|
898
|
-
onClick: () => {
|
|
899
|
-
Ge(""), Ke("");
|
|
900
|
-
},
|
|
901
|
-
className: "hover:bg-primary-default/20 rounded-full p-0.5",
|
|
902
|
-
children: /* @__PURE__ */ y(v, { className: "h-3 w-3" })
|
|
903
|
-
})
|
|
904
|
-
]
|
|
905
|
-
}),
|
|
906
|
-
(z || B) && /* @__PURE__ */ b("span", {
|
|
907
|
-
className: "inline-flex items-center gap-1 px-2 py-1 text-xs bg-primary-default/10 text-primary-default rounded-full",
|
|
908
|
-
children: [
|
|
909
|
-
"Updated: ",
|
|
910
|
-
z || "…",
|
|
911
|
-
" → ",
|
|
912
|
-
B || "…",
|
|
913
|
-
/* @__PURE__ */ y("button", {
|
|
914
|
-
type: "button",
|
|
915
|
-
onClick: () => {
|
|
916
|
-
qe(""), Je("");
|
|
917
|
-
},
|
|
918
|
-
className: "hover:bg-primary-default/20 rounded-full p-0.5",
|
|
919
|
-
children: /* @__PURE__ */ y(v, { className: "h-3 w-3" })
|
|
920
|
-
})
|
|
921
|
-
]
|
|
922
|
-
}),
|
|
923
|
-
Z && /* @__PURE__ */ b("span", {
|
|
924
|
-
className: "inline-flex items-center gap-1 px-2 py-1 text-xs bg-primary-default/10 text-primary-default rounded-full",
|
|
925
|
-
children: ["Tag filter active", /* @__PURE__ */ y("button", {
|
|
926
|
-
type: "button",
|
|
927
|
-
onClick: () => {
|
|
928
|
-
Qe(""), et(""), nt(""), it(""), ot(!1), ct(!0), lt("");
|
|
929
|
-
},
|
|
930
|
-
className: "hover:bg-primary-default/20 rounded-full p-0.5",
|
|
931
|
-
children: /* @__PURE__ */ y(v, { className: "h-3 w-3" })
|
|
932
|
-
})]
|
|
933
|
-
}),
|
|
934
|
-
X.length > 0 && /* @__PURE__ */ b("span", {
|
|
935
|
-
className: "inline-flex items-center gap-1 px-2 py-1 text-xs bg-primary-default/10 text-primary-default rounded-full",
|
|
936
|
-
children: [
|
|
937
|
-
X.length,
|
|
938
|
-
" metadata condition",
|
|
939
|
-
X.length > 1 ? "s" : "",
|
|
940
|
-
/* @__PURE__ */ y("button", {
|
|
941
|
-
type: "button",
|
|
942
|
-
onClick: () => U([]),
|
|
943
|
-
className: "hover:bg-primary-default/20 rounded-full p-0.5",
|
|
944
|
-
children: /* @__PURE__ */ y(v, { className: "h-3 w-3" })
|
|
945
|
-
})
|
|
946
|
-
]
|
|
947
|
-
}),
|
|
948
|
-
Y.length > 0 && /* @__PURE__ */ b("span", {
|
|
949
|
-
className: "inline-flex items-center gap-1 px-2 py-1 text-xs bg-bg-muted text-text-secondary rounded-full",
|
|
950
|
-
children: [
|
|
951
|
-
Y.length,
|
|
952
|
-
" excluded ID",
|
|
953
|
-
Y.length > 1 ? "s" : "",
|
|
954
|
-
/* @__PURE__ */ y("button", {
|
|
955
|
-
type: "button",
|
|
956
|
-
onClick: () => Xe(""),
|
|
957
|
-
className: "hover:bg-bg-canvas rounded-full p-0.5",
|
|
958
|
-
children: /* @__PURE__ */ y(v, { className: "h-3 w-3" })
|
|
959
|
-
})
|
|
960
|
-
]
|
|
961
|
-
}),
|
|
962
|
-
Q === 0 && /* @__PURE__ */ y("span", {
|
|
963
|
-
className: "text-sm text-text-tertiary",
|
|
964
|
-
children: "No active filters"
|
|
965
|
-
})
|
|
966
|
-
]
|
|
967
|
-
})]
|
|
968
|
-
})]
|
|
969
|
-
})
|
|
970
|
-
]
|
|
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("")
|
|
971
337
|
})
|
|
972
338
|
}),
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
className: "flex items-center gap-2",
|
|
979
|
-
children: [/* @__PURE__ */ y(se, { className: "h-4 w-4 animate-spin" }), "Searching..."]
|
|
980
|
-
}) : yt ? /* @__PURE__ */ y("span", {
|
|
981
|
-
className: "text-danger-default",
|
|
982
|
-
children: yt
|
|
983
|
-
}) : /* @__PURE__ */ b("span", { children: [
|
|
984
|
-
"Found ",
|
|
985
|
-
/* @__PURE__ */ y("strong", { children: dt }),
|
|
986
|
-
" results",
|
|
987
|
-
ht > 0 && /* @__PURE__ */ b("span", {
|
|
988
|
-
className: "text-text-tertiary",
|
|
989
|
-
children: [
|
|
990
|
-
" in ",
|
|
991
|
-
ht,
|
|
992
|
-
"ms"
|
|
993
|
-
]
|
|
994
|
-
})
|
|
995
|
-
] })
|
|
996
|
-
})
|
|
339
|
+
h && /* @__PURE__ */ u(se, {
|
|
340
|
+
isSearching: we,
|
|
341
|
+
error: ct,
|
|
342
|
+
total: et,
|
|
343
|
+
searchTimeMs: it
|
|
997
344
|
}),
|
|
998
|
-
/* @__PURE__ */
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
4,
|
|
1006
|
-
5
|
|
1007
|
-
].map((e) => /* @__PURE__ */ y("div", {
|
|
1008
|
-
className: "p-4 bg-bg-surface rounded-lg border border-border-default animate-pulse",
|
|
1009
|
-
children: /* @__PURE__ */ b("div", {
|
|
1010
|
-
className: "flex items-start gap-3",
|
|
1011
|
-
children: [/* @__PURE__ */ y("div", { className: "w-10 h-10 rounded-md bg-bg-muted" }), /* @__PURE__ */ b("div", {
|
|
1012
|
-
className: "flex-1",
|
|
1013
|
-
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" })]
|
|
1014
|
-
})]
|
|
1015
|
-
})
|
|
1016
|
-
}, e)) }),
|
|
1017
|
-
!w && !yt && K.length === 0 && E && /* @__PURE__ */ b("div", {
|
|
1018
|
-
className: "py-12 text-center",
|
|
1019
|
-
children: [
|
|
1020
|
-
/* @__PURE__ */ y(p, { className: "h-12 w-12 mx-auto text-text-tertiary mb-4" }),
|
|
1021
|
-
/* @__PURE__ */ y("h3", {
|
|
1022
|
-
className: "text-lg font-medium text-text-primary mb-2",
|
|
1023
|
-
children: "No results found"
|
|
1024
|
-
}),
|
|
1025
|
-
/* @__PURE__ */ b("p", {
|
|
1026
|
-
className: "text-text-secondary max-w-md mx-auto",
|
|
1027
|
-
children: [
|
|
1028
|
-
"No results found for \"",
|
|
1029
|
-
E,
|
|
1030
|
-
"\". Try adjusting your search terms or filters."
|
|
1031
|
-
]
|
|
1032
|
-
}),
|
|
1033
|
-
/* @__PURE__ */ b("div", {
|
|
1034
|
-
className: "mt-6 space-y-2 text-sm text-text-tertiary",
|
|
1035
|
-
children: [/* @__PURE__ */ y("p", { children: "Suggestions:" }), /* @__PURE__ */ b("ul", {
|
|
1036
|
-
className: "list-disc list-inside",
|
|
1037
|
-
children: [
|
|
1038
|
-
/* @__PURE__ */ y("li", { children: "Check your spelling" }),
|
|
1039
|
-
/* @__PURE__ */ y("li", { children: "Try more general keywords" }),
|
|
1040
|
-
/* @__PURE__ */ y("li", { children: "Use fewer filters" }),
|
|
1041
|
-
/* @__PURE__ */ y("li", { children: "Try \"Partial\" search mode for autocomplete" })
|
|
1042
|
-
]
|
|
1043
|
-
})]
|
|
1044
|
-
})
|
|
1045
|
-
]
|
|
1046
|
-
}),
|
|
1047
|
-
!w && !E && /* @__PURE__ */ b("div", {
|
|
1048
|
-
className: "py-12 text-center",
|
|
1049
|
-
children: [
|
|
1050
|
-
/* @__PURE__ */ y(p, { className: "h-12 w-12 mx-auto text-text-tertiary mb-4" }),
|
|
1051
|
-
/* @__PURE__ */ y("h3", {
|
|
1052
|
-
className: "text-lg font-medium text-text-primary mb-2",
|
|
1053
|
-
children: "Start searching"
|
|
1054
|
-
}),
|
|
1055
|
-
/* @__PURE__ */ y("p", {
|
|
1056
|
-
className: "text-text-secondary max-w-md mx-auto",
|
|
1057
|
-
children: "Enter a search term above to find documents, tags, projects, tasks, and more across your workspace."
|
|
1058
|
-
})
|
|
1059
|
-
]
|
|
1060
|
-
}),
|
|
1061
|
-
K.map((e) => /* @__PURE__ */ y("button", {
|
|
1062
|
-
onClick: () => Nt(e),
|
|
1063
|
-
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",
|
|
1064
|
-
children: /* @__PURE__ */ b("div", {
|
|
1065
|
-
className: "flex items-start gap-3",
|
|
1066
|
-
children: [/* @__PURE__ */ y("div", {
|
|
1067
|
-
className: "flex-shrink-0 w-10 h-10 rounded-md bg-bg-muted flex items-center justify-center group-hover:bg-primary-default/10 transition-colors",
|
|
1068
|
-
children: /* @__PURE__ */ y(Pt(e.entityType || e.category), { className: "h-5 w-5 text-text-tertiary group-hover:text-primary-default" })
|
|
1069
|
-
}), /* @__PURE__ */ b("div", {
|
|
1070
|
-
className: "flex-1 min-w-0",
|
|
1071
|
-
children: [
|
|
1072
|
-
/* @__PURE__ */ b("div", {
|
|
1073
|
-
className: "flex items-center gap-2 mb-1",
|
|
1074
|
-
children: [
|
|
1075
|
-
/* @__PURE__ */ y("h3", {
|
|
1076
|
-
className: "text-base font-medium text-text-primary truncate group-hover:text-primary-default",
|
|
1077
|
-
children: e.title
|
|
1078
|
-
}),
|
|
1079
|
-
/* @__PURE__ */ y("span", {
|
|
1080
|
-
className: "flex-shrink-0 px-2 py-0.5 text-xs font-medium bg-bg-muted text-text-tertiary rounded",
|
|
1081
|
-
children: e.entityType || e.category
|
|
1082
|
-
}),
|
|
1083
|
-
e.productSource && /* @__PURE__ */ y("span", {
|
|
1084
|
-
className: "flex-shrink-0 px-2 py-0.5 text-xs font-medium bg-bg-muted text-text-tertiary rounded",
|
|
1085
|
-
children: e.productSource
|
|
1086
|
-
})
|
|
1087
|
-
]
|
|
1088
|
-
}),
|
|
1089
|
-
e.description && /* @__PURE__ */ y("p", {
|
|
1090
|
-
className: "text-sm text-text-secondary line-clamp-2",
|
|
1091
|
-
children: e.description
|
|
1092
|
-
}),
|
|
1093
|
-
/* @__PURE__ */ b("div", {
|
|
1094
|
-
className: "flex items-center gap-4 mt-2 text-xs text-text-tertiary",
|
|
1095
|
-
children: [e.score !== void 0 && e.score > 0 && /* @__PURE__ */ b("span", {
|
|
1096
|
-
className: "flex items-center gap-1",
|
|
1097
|
-
children: ["Score: ", e.score.toFixed(2)]
|
|
1098
|
-
}), e.metadata?.createdAt && /* @__PURE__ */ b("span", {
|
|
1099
|
-
className: "flex items-center gap-1",
|
|
1100
|
-
children: [/* @__PURE__ */ y(oe, { className: "h-3 w-3" }), new Date(String(e.metadata.createdAt)).toLocaleDateString()]
|
|
1101
|
-
})]
|
|
1102
|
-
})
|
|
1103
|
-
]
|
|
1104
|
-
})]
|
|
1105
|
-
})
|
|
1106
|
-
}, e.id))
|
|
1107
|
-
]
|
|
345
|
+
/* @__PURE__ */ u(ce, {
|
|
346
|
+
isSearching: we,
|
|
347
|
+
error: ct,
|
|
348
|
+
query: h,
|
|
349
|
+
results: Qe,
|
|
350
|
+
getEntityIcon: Et,
|
|
351
|
+
onResultClick: Tt
|
|
1108
352
|
}),
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
disabled: W === 1,
|
|
1115
|
-
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",
|
|
1116
|
-
children: [/* @__PURE__ */ y(re, { className: "h-4 w-4" }), "Previous"]
|
|
1117
|
-
}),
|
|
1118
|
-
/* @__PURE__ */ y("div", {
|
|
1119
|
-
className: "flex items-center gap-1",
|
|
1120
|
-
children: Array.from({ length: Math.min(5, $) }, (e, t) => {
|
|
1121
|
-
let n;
|
|
1122
|
-
return n = $ <= 5 || W <= 3 ? t + 1 : W >= $ - 2 ? $ - 4 + t : W - 2 + t, /* @__PURE__ */ y("button", {
|
|
1123
|
-
onClick: () => G(n),
|
|
1124
|
-
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"}`,
|
|
1125
|
-
children: n
|
|
1126
|
-
}, n);
|
|
1127
|
-
})
|
|
1128
|
-
}),
|
|
1129
|
-
/* @__PURE__ */ b("button", {
|
|
1130
|
-
onClick: () => G((e) => Math.min($, e + 1)),
|
|
1131
|
-
disabled: W === $ || !pt,
|
|
1132
|
-
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",
|
|
1133
|
-
children: ["Next", /* @__PURE__ */ y(ie, { className: "h-4 w-4" })]
|
|
1134
|
-
})
|
|
1135
|
-
]
|
|
353
|
+
Qe.length > 0 && wt > 1 && /* @__PURE__ */ u(le, {
|
|
354
|
+
currentPage: J,
|
|
355
|
+
totalPages: wt,
|
|
356
|
+
hasMore: nt,
|
|
357
|
+
onPageChange: Y
|
|
1136
358
|
})
|
|
1137
359
|
]
|
|
1138
360
|
})
|
|
1139
361
|
});
|
|
1140
362
|
}
|
|
1141
363
|
//#endregion
|
|
1142
|
-
export {
|
|
364
|
+
export { d as SearchPage };
|