@nivaro/react 0.3.114 → 0.3.115
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/components/ScreenShareHost.js +24 -0
- package/dist/full.css +50 -2
- package/dist/hooks/useSessionRecorder.js +61 -60
- package/dist/index.d.ts +1717 -21
- package/dist/index.js +1091 -950
- package/dist/shared/components/ActivityEntry.js +209 -97
- package/dist/shared/components/AgentPresenceChip.js +51 -0
- package/dist/shared/components/AnnouncementBanner.js +56 -41
- package/dist/shared/components/AutolinkedText.js +98 -85
- package/dist/shared/components/BroadcastView.js +149 -141
- package/dist/shared/components/CacheStamp.js +78 -30
- package/dist/shared/components/CollectionBrowserView.js +4088 -3592
- package/dist/shared/components/ConfigChangeStrip.js +63 -0
- package/dist/shared/components/ConfigReachNote.js +107 -0
- package/dist/shared/components/ConformanceView.js +389 -319
- package/dist/shared/components/DataTable.js +1 -0
- package/dist/shared/components/DelegateCoverLine.js +164 -0
- package/dist/shared/components/EnvironmentNotice.js +56 -65
- package/dist/shared/components/FilePreviewLightbox.js +89 -43
- package/dist/shared/components/FindingFixedMark.js +23 -0
- package/dist/shared/components/GridPresenceLine.js +100 -0
- package/dist/shared/components/IdleReloadWatcher.js +82 -43
- package/dist/shared/components/InStep.js +46 -0
- package/dist/shared/components/ItemEditForm.js +5504 -4889
- package/dist/shared/components/LiveAnnouncer.js +62 -0
- package/dist/shared/components/LiveCount.js +54 -0
- package/dist/shared/components/LiveFigure.js +28 -0
- package/dist/shared/components/LiveListControls.js +114 -0
- package/dist/shared/components/LiveNewMatchesPill.js +25 -0
- package/dist/shared/components/LiveOffNote.js +44 -0
- package/dist/shared/components/LivePreferenceHost.js +42 -0
- package/dist/shared/components/LiveRowMark.js +25 -20
- package/dist/shared/components/LiveTraceView.js +257 -0
- package/dist/shared/components/MapView.js +30 -29
- package/dist/shared/components/MatrixEditor.js +497 -462
- package/dist/shared/components/MyWorkView.js +346 -272
- package/dist/shared/components/NotificationBell.js +215 -201
- package/dist/shared/components/PageRenderer.js +636 -599
- package/dist/shared/components/PresenceDot.js +21 -0
- package/dist/shared/components/ProfileView.js +656 -536
- package/dist/shared/components/RealtimeStatusBanner.js +25 -25
- package/dist/shared/components/RecentRecordsRail.js +51 -48
- package/dist/shared/components/RecordCompare.js +241 -150
- package/dist/shared/components/RecordDrilldownSheet.js +66 -64
- package/dist/shared/components/RecordGridEditor.js +350 -311
- package/dist/shared/components/RecordHoverCard.js +147 -0
- package/dist/shared/components/RecordPeekHost.js +111 -0
- package/dist/shared/components/RecordReadView.js +414 -412
- package/dist/shared/components/RelativeTime.js +16 -0
- package/dist/shared/components/ReportView.js +1396 -1304
- package/dist/shared/components/ScreenRefreshButton.js +77 -0
- package/dist/shared/components/TabCountHost.js +10 -0
- package/dist/shared/components/TickerNumber.js +19 -18
- package/dist/shared/components/TipLayer.js +70 -58
- package/dist/shared/components/WidgetImageMenu.js +59 -0
- package/dist/shared/components/WidgetSlot.js +571 -524
- package/dist/shared/components/activity/RecordActivityStream.js +317 -0
- package/dist/shared/components/bulk/BulkSelectionNotices.js +220 -0
- package/dist/shared/components/cbv/approval-changed.js +20 -0
- package/dist/shared/components/cbv/changed-by-others.js +251 -0
- package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +320 -0
- package/dist/shared/components/change-proposals/ProposalValue.js +28 -0
- package/dist/shared/components/change-proposals/ProposeChangeButton.js +44 -0
- package/dist/shared/components/change-proposals/ProposeChangeDialog.js +359 -0
- package/dist/shared/components/change-proposals/types.js +4 -0
- package/dist/shared/components/chat/ChatPanel.js +1571 -1528
- package/dist/shared/components/chat/Composer.js +276 -298
- package/dist/shared/components/chat/room-due.js +13 -0
- package/dist/shared/components/collections-directory/CollectionRow.js +76 -75
- package/dist/shared/components/collections-directory/CollectionsDirectory.js +415 -395
- package/dist/shared/components/collections-directory/directory-data.js +75 -63
- package/dist/shared/components/imports/ImportConsole.js +159 -155
- package/dist/shared/components/imports/ImportDuplicatesNotice.js +46 -31
- package/dist/shared/components/integrations/SendStatus.js +202 -0
- package/dist/shared/components/integrations/console/IntegrationsConsole.js +45 -36
- package/dist/shared/components/integrations/console/ReadyToSendView.js +453 -0
- package/dist/shared/components/integrations/console/api.js +161 -117
- package/dist/shared/components/integrations/console/tone.js +15 -12
- package/dist/shared/components/item-edit/CatalogPickerField.js +1353 -1245
- package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +162 -0
- package/dist/shared/components/item-edit/CloneDialog.js +208 -206
- package/dist/shared/components/item-edit/DerivedCauseNote.js +57 -0
- package/dist/shared/components/item-edit/DraftRecoveryBanner.js +81 -70
- package/dist/shared/components/item-edit/DuplicateNotice.js +169 -101
- package/dist/shared/components/item-edit/FieldAffordances.js +294 -385
- package/dist/shared/components/item-edit/FieldComments.js +159 -116
- package/dist/shared/components/item-edit/FieldPointer.js +132 -0
- package/dist/shared/components/item-edit/FieldRenderer.js +277 -273
- package/dist/shared/components/item-edit/FieldRow.js +519 -439
- package/dist/shared/components/item-edit/FieldSourceBadge.js +88 -0
- package/dist/shared/components/item-edit/FilePickerField.js +454 -369
- package/dist/shared/components/item-edit/GroupSection.js +618 -567
- package/dist/shared/components/item-edit/HeldEditsChip.js +113 -0
- package/dist/shared/components/item-edit/InlineTableField.js +2891 -2723
- package/dist/shared/components/item-edit/ListNeighborNav.js +79 -0
- package/dist/shared/components/item-edit/LiveTraceSheet.js +26 -0
- package/dist/shared/components/item-edit/M2MCombobox.js +284 -273
- package/dist/shared/components/item-edit/OutboxReviewTray.js +313 -0
- package/dist/shared/components/item-edit/PickerBadges.js +52 -0
- package/dist/shared/components/item-edit/PlanGrid.js +434 -439
- package/dist/shared/components/item-edit/RecalcValue.js +55 -0
- package/dist/shared/components/item-edit/RecordChatActions.js +76 -64
- package/dist/shared/components/item-edit/RecordChatMentionsChip.js +103 -0
- package/dist/shared/components/item-edit/RecordGrantTools.js +87 -86
- package/dist/shared/components/item-edit/RecordHelpChip.js +70 -0
- package/dist/shared/components/item-edit/RecordLiveSync.js +230 -217
- package/dist/shared/components/item-edit/RecordOutbox.js +53 -52
- package/dist/shared/components/item-edit/RecordRecapStrip.js +109 -36
- package/dist/shared/components/item-edit/RelationCombobox.js +229 -217
- package/dist/shared/components/item-edit/RelationGroupedCombobox.js +105 -100
- package/dist/shared/components/item-edit/RemoteChangeUi.js +454 -0
- package/dist/shared/components/item-edit/RemoteUploads.js +55 -0
- package/dist/shared/components/item-edit/RemovedLineNote.js +92 -0
- package/dist/shared/components/item-edit/RichTextEditorImpl.js +298 -223
- package/dist/shared/components/item-edit/ScheduledChangeChip.js +244 -0
- package/dist/shared/components/item-edit/SectionPresence.js +78 -0
- package/dist/shared/components/item-edit/SplitLinesButton.js +166 -0
- package/dist/shared/components/item-edit/catalog-line-watch.js +94 -0
- package/dist/shared/components/item-edit/coedit/collab.js +84 -0
- package/dist/shared/components/item-edit/coedit/context.js +24 -0
- package/dist/shared/components/item-edit/coedit/cursors.js +103 -0
- package/dist/shared/components/item-edit/coedit/safe-link.js +15 -0
- package/dist/shared/components/item-edit/coedit/session.js +382 -0
- package/dist/shared/components/item-edit/coedit/useCoedit.js +49 -0
- package/dist/shared/components/item-edit/file-live.js +77 -0
- package/dist/shared/components/item-edit/file-processing.js +87 -0
- package/dist/shared/components/item-edit/layout-switch.js +148 -0
- package/dist/shared/components/item-edit/live-related.js +23 -0
- package/dist/shared/components/item-edit/live-title.js +66 -0
- package/dist/shared/components/item-edit/partner-needs.js +142 -0
- package/dist/shared/components/item-edit/removed-line.js +58 -0
- package/dist/shared/components/item-edit/render-stability.js +70 -59
- package/dist/shared/components/layout-editor/ChangeNote.js +36 -34
- package/dist/shared/components/layout-editor/CollabParts.js +72 -70
- package/dist/shared/components/layout-editor/LayoutEditor.js +306 -303
- package/dist/shared/components/list/InlineEdit.js +504 -208
- package/dist/shared/components/list/ListViewers.js +81 -0
- package/dist/shared/components/merge/MergeRecordsDialog.js +1227 -0
- package/dist/shared/components/merge/MergeWithFlow.js +290 -0
- package/dist/shared/components/merge/merge-values.js +110 -0
- package/dist/shared/components/monitoring/InactiveUserLinksView.js +285 -258
- package/dist/shared/components/notifications/NotificationCenterView.js +388 -321
- package/dist/shared/components/notifications/NotificationDetailBits.js +205 -130
- package/dist/shared/components/notifications/NotificationRulesEditor.js +72 -52
- package/dist/shared/components/notifications/bundles.js +21 -19
- package/dist/shared/components/notifications/resolved-line.js +25 -0
- package/dist/shared/components/ops/OpsTasksView.js +45 -44
- package/dist/shared/components/panels/AccessGrantedNote.js +85 -0
- package/dist/shared/components/panels/AlertBanners.js +132 -0
- package/dist/shared/components/panels/AsyncUserPicker.js +54 -45
- package/dist/shared/components/panels/BranchLanes.js +82 -54
- package/dist/shared/components/panels/CommentAwareness.js +332 -0
- package/dist/shared/components/panels/CommentImages.js +219 -0
- package/dist/shared/components/panels/CommentPanel.js +649 -530
- package/dist/shared/components/panels/ExternalRequestsChip.js +98 -80
- package/dist/shared/components/panels/NewSinceChip.js +16 -0
- package/dist/shared/components/panels/OwnerOpenedLine.js +85 -0
- package/dist/shared/components/panels/PipelinePanel.js +1644 -1494
- package/dist/shared/components/panels/ResubmissionDiff.js +293 -0
- package/dist/shared/components/panels/SlaBreachBanner.js +30 -29
- package/dist/shared/components/panels/SlaClock.js +130 -99
- package/dist/shared/components/panels/TaskPanel.js +308 -287
- package/dist/shared/components/panels/unseen-move-check.js +101 -0
- package/dist/shared/components/pipeline/OwnerMatrix.js +80 -71
- package/dist/shared/components/pipeline/OwnerMatrixSheet.js +495 -0
- package/dist/shared/components/pipeline/PipelineEditorView.js +1855 -1771
- package/dist/shared/components/profile/AgentNameField.js +141 -0
- package/dist/shared/components/profile/AgentsPanel.js +55 -46
- package/dist/shared/components/profile/PersonAccess.js +398 -330
- package/dist/shared/components/profile/PersonAdminTools.js +127 -113
- package/dist/shared/components/profile/PersonProfile.js +81 -73
- package/dist/shared/components/profile/SignInTroubleshooter.js +361 -0
- package/dist/shared/components/queue/QueueBulkBar.js +101 -84
- package/dist/shared/components/queue/QueueItemSheet.js +66 -66
- package/dist/shared/components/queue/QueueTeamStrip.js +279 -0
- package/dist/shared/components/queue/QueueWorklist.js +1927 -1635
- package/dist/shared/components/send-view/SendViewButton.js +136 -0
- package/dist/shared/components/send-view/SentViewCards.js +147 -0
- package/dist/shared/components/support/ReportProblem.js +1 -0
- package/dist/shared/components/support/ScreenShare.js +554 -0
- package/dist/shared/components/support/SupportView.js +160 -129
- package/dist/shared/components/support/TicketDetailSheet.js +101 -89
- package/dist/shared/components/watch-list/WatchDock.js +1044 -0
- package/dist/shared/components/watch-list/WatchExtras.js +723 -0
- package/dist/shared/components/watch-list/WatchListButton.js +46 -0
- package/dist/shared/components/watch-list/WatchPinButton.js +67 -0
- package/dist/shared/components/watch-list/WatchRows.js +348 -0
- package/dist/shared/lib/activity-sentence.js +87 -75
- package/dist/shared/lib/agent-presence.js +46 -0
- package/dist/shared/lib/approval-progress.js +49 -0
- package/dist/shared/lib/attention-prefs.js +27 -0
- package/dist/shared/lib/cell-locks.js +56 -0
- package/dist/shared/lib/co-edit.js +166 -0
- package/dist/shared/lib/coedit-registry.js +44 -0
- package/dist/shared/lib/comment-awareness.js +124 -0
- package/dist/shared/lib/comment-images.js +45 -0
- package/dist/shared/lib/config-watch.js +94 -0
- package/dist/shared/lib/copy-rules.js +65 -0
- package/dist/shared/lib/count-step.js +30 -0
- package/dist/shared/lib/deadline-ticker.js +68 -0
- package/dist/shared/lib/derived-causes.js +115 -0
- package/dist/shared/lib/draft-store.js +114 -85
- package/dist/shared/lib/error-hints.js +1 -0
- package/dist/shared/lib/field-merge.js +126 -0
- package/dist/shared/lib/filter-sentence.js +10 -10
- package/dist/shared/lib/focus-mode.js +16 -12
- package/dist/shared/lib/grid-cursors.js +77 -0
- package/dist/shared/lib/grid-presence.js +182 -0
- package/dist/shared/lib/idle-reload.js +100 -73
- package/dist/shared/lib/in-step.js +45 -0
- package/dist/shared/lib/integration-chip.js +19 -18
- package/dist/shared/lib/line-locks.js +141 -0
- package/dist/shared/lib/line-split.js +41 -0
- package/dist/shared/lib/linked-changes.js +150 -0
- package/dist/shared/lib/list-return.js +231 -0
- package/dist/shared/lib/list-viewers.js +52 -0
- package/dist/shared/lib/live-announcer.js +86 -0
- package/dist/shared/lib/live-counts.js +85 -0
- package/dist/shared/lib/live-data-changed.js +108 -0
- package/dist/shared/lib/live-deltas.js +81 -0
- package/dist/shared/lib/live-findings.js +113 -0
- package/dist/shared/lib/live-groups.js +122 -0
- package/dist/shared/lib/live-link-labels.js +162 -0
- package/dist/shared/lib/live-list-flow.js +334 -0
- package/dist/shared/lib/live-list.js +143 -129
- package/dist/shared/lib/live-moves.js +51 -0
- package/dist/shared/lib/live-ops.js +26 -26
- package/dist/shared/lib/live-pickers.js +7 -0
- package/dist/shared/lib/live-preference.js +184 -0
- package/dist/shared/lib/live-queries.js +226 -181
- package/dist/shared/lib/live-screen.js +333 -0
- package/dist/shared/lib/live-search.js +108 -0
- package/dist/shared/lib/live-seen.js +35 -0
- package/dist/shared/lib/live-views.js +100 -0
- package/dist/shared/lib/live.js +159 -133
- package/dist/shared/lib/missed-updates.js +198 -0
- package/dist/shared/lib/newer-file.js +56 -0
- package/dist/shared/lib/notification-sound.js +42 -20
- package/dist/shared/lib/own-writes.js +59 -41
- package/dist/shared/lib/picker-badges.js +94 -0
- package/dist/shared/lib/presence-signals.js +131 -84
- package/dist/shared/lib/realtime.js +49 -24
- package/dist/shared/lib/record-gaps.js +85 -0
- package/dist/shared/lib/record-outbox.js +369 -222
- package/dist/shared/lib/record-peek.js +75 -0
- package/dist/shared/lib/record-tabs.js +92 -72
- package/dist/shared/lib/relative-ticker.js +42 -0
- package/dist/shared/lib/request-gate.js +119 -119
- package/dist/shared/lib/rollup-recalc.js +107 -0
- package/dist/shared/lib/room-gaps.js +40 -36
- package/dist/shared/lib/rum.js +137 -87
- package/dist/shared/lib/save-progress.js +20 -0
- package/dist/shared/lib/scheduled-countdown.js +67 -0
- package/dist/shared/lib/screen-refresh.js +160 -0
- package/dist/shared/lib/screen-share.js +234 -0
- package/dist/shared/lib/seen-since.js +74 -0
- package/dist/shared/lib/selection-watch.js +205 -0
- package/dist/shared/lib/send-status.js +132 -0
- package/dist/shared/lib/send-view.js +23 -0
- package/dist/shared/lib/socket-liveness.js +155 -0
- package/dist/shared/lib/socket-realtime.js +168 -140
- package/dist/shared/lib/state-census.js +53 -0
- package/dist/shared/lib/summary-mode.js +61 -39
- package/dist/shared/lib/tab-attention.js +143 -32
- package/dist/shared/lib/table-density.js +64 -0
- package/dist/shared/lib/track-travel.js +40 -0
- package/dist/shared/lib/unseen-changes.js +68 -0
- package/dist/shared/lib/upload-file.js +33 -0
- package/dist/shared/lib/upload-presence.js +127 -0
- package/dist/shared/lib/urgent-chime.js +65 -0
- package/dist/shared/lib/use-online-users.js +32 -11
- package/dist/shared/lib/user-sync.js +155 -39
- package/dist/shared/lib/waiting-count.js +44 -0
- package/dist/shared/lib/watch-desktop.js +83 -0
- package/dist/shared/lib/watch-list.js +447 -0
- package/dist/shared/lib/widget-image-render.js +64 -0
- package/dist/shared/lib/widget-image.js +111 -0
- package/dist/shared/lib/worker-socket.js +130 -104
- package/dist/shared/lib/write-to-screen.js +133 -0
- package/package.json +1 -1
- package/styles.css +49 -1
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useSensors as
|
|
3
|
-
import { sortableKeyboardCoordinates as
|
|
4
|
-
import { useQueryClient as
|
|
5
|
-
import { Star as
|
|
6
|
-
import { useRef as
|
|
7
|
-
import { toast as
|
|
8
|
-
import { ErrorNotice as
|
|
9
|
-
import { Skeleton as
|
|
10
|
-
import { defaultCollectionPath as
|
|
11
|
-
import { CollectionsToolbar as
|
|
12
|
-
import { readLocal as
|
|
13
|
-
import { PINNED_KEY as q, PinnedSection as
|
|
14
|
-
import { buildPageModel as
|
|
15
|
-
import { SortableRow as
|
|
16
|
-
import { useSharedPins as
|
|
17
|
-
const
|
|
1
|
+
import { jsxs as i, jsx as n, Fragment as Q } from "react/jsx-runtime";
|
|
2
|
+
import { useSensors as at, useSensor as _e, PointerSensor as it, KeyboardSensor as st, DndContext as Le, closestCenter as Ee } from "@dnd-kit/core";
|
|
3
|
+
import { sortableKeyboardCoordinates as ct, SortableContext as Me, verticalListSortingStrategy as Te, arrayMove as dt } from "@dnd-kit/sortable";
|
|
4
|
+
import { useQueryClient as ht } from "@tanstack/react-query";
|
|
5
|
+
import { Star as pt, Clock as ft, Link2 as mt, Database as ut, SearchX as gt } from "lucide-react";
|
|
6
|
+
import { useRef as E, useState as u, useEffect as le, useMemo as ae } from "react";
|
|
7
|
+
import { toast as ie } from "sonner";
|
|
8
|
+
import { ErrorNotice as bt } from "../ErrorNotice.js";
|
|
9
|
+
import { Skeleton as se } from "../ui/skeleton.js";
|
|
10
|
+
import { defaultCollectionPath as vt, HostLink as He, CollectionRow as yt, CollectionAvatar as kt } from "./CollectionRow.js";
|
|
11
|
+
import { CollectionsToolbar as wt } from "./CollectionsToolbar.js";
|
|
12
|
+
import { readLocal as De, useDirectoryCollections as xt, useOverviewStats as St, useLiveDirectory as Ct, useHeavyListFlags as Nt, useCollectionUsage as _t, useNavFavoriteCollections as Lt, writeLocal as Re, recordCollectionOpen as Ie, DIRECTORY_KEYS as ce } from "./directory-data.js";
|
|
13
|
+
import { PINNED_KEY as q, PinnedSection as Et } from "./PinnedSection.js";
|
|
14
|
+
import { buildPageModel as Mt, nearSpellings as Tt, label as y } from "./page-model.js";
|
|
15
|
+
import { SortableRow as Pe, Section as M, FolderHeader as F } from "./sections.js";
|
|
16
|
+
import { useSharedPins as Dt } from "./shared-pins.js";
|
|
17
|
+
const Oe = "nivaro_col_collapsed", Fe = "nvr_collections_prefs", T = "__loose__", N = "__links__", Rt = {
|
|
18
18
|
view: "folders",
|
|
19
19
|
density: "compact",
|
|
20
20
|
showHidden: !1,
|
|
21
21
|
showLinks: !1
|
|
22
|
-
},
|
|
23
|
-
function
|
|
22
|
+
}, x = (s) => `cl-section-${s.replace(/[^A-Za-z0-9_-]/g, "_")}`;
|
|
23
|
+
function Pt() {
|
|
24
24
|
return /* @__PURE__ */ n(
|
|
25
25
|
"div",
|
|
26
26
|
{
|
|
@@ -28,61 +28,61 @@ function Mt() {
|
|
|
28
28
|
role: "status",
|
|
29
29
|
"aria-busy": "true",
|
|
30
30
|
"aria-label": "Loading collections",
|
|
31
|
-
children: ["a", "b", "c", "d", "e", "f", "g", "h"].map((
|
|
31
|
+
children: ["a", "b", "c", "d", "e", "f", "g", "h"].map((s) => /* @__PURE__ */ i(
|
|
32
32
|
"div",
|
|
33
33
|
{
|
|
34
34
|
className: "flex items-center gap-2.5 border-b border-slate-100 px-4 py-2 last:border-0 dark:border-white/[0.05]",
|
|
35
35
|
children: [
|
|
36
|
-
/* @__PURE__ */ n(
|
|
37
|
-
/* @__PURE__ */ n(
|
|
38
|
-
/* @__PURE__ */ n(
|
|
36
|
+
/* @__PURE__ */ n(se, { className: "h-6 w-6 rounded" }),
|
|
37
|
+
/* @__PURE__ */ n(se, { className: "h-3.5 w-48" }),
|
|
38
|
+
/* @__PURE__ */ n(se, { className: "ml-auto h-3 w-16" })
|
|
39
39
|
]
|
|
40
40
|
},
|
|
41
|
-
|
|
41
|
+
s
|
|
42
42
|
))
|
|
43
43
|
}
|
|
44
44
|
);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
return /* @__PURE__ */
|
|
48
|
-
/* @__PURE__ */ n("div", { className: "mb-4 flex h-12 w-12 items-center justify-center rounded-xl border border-slate-200 bg-slate-50 dark:border-white/[0.08] dark:bg-white/[0.03]", children: /* @__PURE__ */ n(
|
|
46
|
+
function Ot() {
|
|
47
|
+
return /* @__PURE__ */ i("div", { className: "flex flex-col items-center py-24 text-center", children: [
|
|
48
|
+
/* @__PURE__ */ n("div", { className: "mb-4 flex h-12 w-12 items-center justify-center rounded-xl border border-slate-200 bg-slate-50 dark:border-white/[0.08] dark:bg-white/[0.03]", children: /* @__PURE__ */ n(ut, { className: "h-5 w-5 text-slate-400" }) }),
|
|
49
49
|
/* @__PURE__ */ n("p", { className: "text-[13px] font-semibold text-slate-700 dark:text-slate-300", children: "No collections registered yet" }),
|
|
50
50
|
/* @__PURE__ */ n("p", { className: "mt-1.5 text-[12px] text-slate-500 dark:text-slate-400", children: "Register collections in the Data Model to browse them here." })
|
|
51
51
|
] });
|
|
52
52
|
}
|
|
53
|
-
function
|
|
54
|
-
filter:
|
|
55
|
-
near:
|
|
53
|
+
function Ft({
|
|
54
|
+
filter: s,
|
|
55
|
+
near: S,
|
|
56
56
|
pathFor: p,
|
|
57
|
-
hiddenMatches:
|
|
58
|
-
linkMatches:
|
|
59
|
-
chipsOn:
|
|
57
|
+
hiddenMatches: g,
|
|
58
|
+
linkMatches: b,
|
|
59
|
+
chipsOn: D,
|
|
60
60
|
onShowHidden: h,
|
|
61
61
|
onShowLinks: U,
|
|
62
|
-
onClearChips:
|
|
63
|
-
onCreate:
|
|
62
|
+
onClearChips: K,
|
|
63
|
+
onCreate: R
|
|
64
64
|
}) {
|
|
65
65
|
const t = "rounded-md border border-slate-200 px-2.5 py-1 text-[12px] font-medium text-slate-700 hover:border-slate-300 hover:bg-slate-50 dark:border-white/[0.1] dark:text-slate-200 dark:hover:bg-white/[0.05]";
|
|
66
|
-
return /* @__PURE__ */
|
|
67
|
-
/* @__PURE__ */ n(
|
|
68
|
-
/* @__PURE__ */ n("p", { className: "text-[13px] font-semibold text-slate-700 dark:text-slate-200", children:
|
|
66
|
+
return /* @__PURE__ */ i("div", { className: "flex flex-col items-center py-16 text-center", "data-collections-empty-search": !0, children: [
|
|
67
|
+
/* @__PURE__ */ n(gt, { className: "mb-3 h-6 w-6 text-slate-400" }),
|
|
68
|
+
/* @__PURE__ */ n("p", { className: "text-[13px] font-semibold text-slate-700 dark:text-slate-200", children: s ? /* @__PURE__ */ i(Q, { children: [
|
|
69
69
|
"No collection matches ",
|
|
70
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ i("span", { className: "font-mono", children: [
|
|
71
71
|
"“",
|
|
72
|
-
|
|
72
|
+
s,
|
|
73
73
|
"”"
|
|
74
74
|
] })
|
|
75
75
|
] }) : "No collection matches these filters" }),
|
|
76
|
-
|
|
76
|
+
S.length > 0 && /* @__PURE__ */ i("p", { className: "mt-3 text-[12px] text-slate-600 dark:text-slate-300", children: [
|
|
77
77
|
"Did you mean",
|
|
78
78
|
" ",
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
S.map((C, _) => /* @__PURE__ */ i("span", { children: [
|
|
80
|
+
_ > 0 && (_ === S.length - 1 ? " or " : ", "),
|
|
81
81
|
/* @__PURE__ */ n(
|
|
82
|
-
|
|
82
|
+
He,
|
|
83
83
|
{
|
|
84
84
|
to: p(C.collection),
|
|
85
|
-
onClick: () =>
|
|
85
|
+
onClick: () => Ie(C.collection),
|
|
86
86
|
className: "font-medium text-cyan-700 underline-offset-2 hover:underline dark:text-nvr-cyan",
|
|
87
87
|
children: y(C)
|
|
88
88
|
}
|
|
@@ -90,455 +90,475 @@ function Tt({
|
|
|
90
90
|
] }, C.collection)),
|
|
91
91
|
"?"
|
|
92
92
|
] }),
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
/* @__PURE__ */ i("div", { className: "mt-4 flex flex-wrap justify-center gap-2", children: [
|
|
94
|
+
g > 0 && /* @__PURE__ */ i("button", { type: "button", className: t, onClick: h, children: [
|
|
95
|
+
g,
|
|
96
96
|
" hidden",
|
|
97
97
|
" ",
|
|
98
|
-
|
|
98
|
+
g === 1 ? "collection matches" : "collections match",
|
|
99
99
|
" — show hidden"
|
|
100
100
|
] }),
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
b > 0 && /* @__PURE__ */ i("button", { type: "button", className: t, onClick: U, children: [
|
|
102
|
+
b,
|
|
103
103
|
" link ",
|
|
104
|
-
|
|
104
|
+
b === 1 ? "table matches" : "tables match",
|
|
105
105
|
" — show link tables"
|
|
106
106
|
] }),
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
D && /* @__PURE__ */ n("button", { type: "button", className: t, onClick: K, children: "Clear filters" }),
|
|
108
|
+
R && /* @__PURE__ */ n("button", { type: "button", className: t, onClick: R, children: "Create a table" })
|
|
109
109
|
] })
|
|
110
110
|
] });
|
|
111
111
|
}
|
|
112
|
-
function
|
|
113
|
-
title:
|
|
114
|
-
icon:
|
|
112
|
+
function Ke({
|
|
113
|
+
title: s,
|
|
114
|
+
icon: S,
|
|
115
115
|
cols: p,
|
|
116
|
-
empty:
|
|
117
|
-
pathFor:
|
|
118
|
-
...
|
|
116
|
+
empty: g,
|
|
117
|
+
pathFor: b,
|
|
118
|
+
...D
|
|
119
119
|
}) {
|
|
120
|
-
return !p.length && !
|
|
121
|
-
/* @__PURE__ */
|
|
122
|
-
|
|
123
|
-
|
|
120
|
+
return !p.length && !g ? null : /* @__PURE__ */ i("div", { className: "flex min-w-0 flex-wrap items-center gap-1.5", ...D, children: [
|
|
121
|
+
/* @__PURE__ */ i("span", { className: "mr-1 inline-flex items-center gap-1 text-[11px] font-medium text-slate-500 dark:text-slate-400", children: [
|
|
122
|
+
S,
|
|
123
|
+
s
|
|
124
124
|
] }),
|
|
125
|
-
p.map((h) => /* @__PURE__ */
|
|
126
|
-
|
|
125
|
+
p.map((h) => /* @__PURE__ */ i(
|
|
126
|
+
He,
|
|
127
127
|
{
|
|
128
|
-
to:
|
|
129
|
-
onClick: () =>
|
|
128
|
+
to: b(h.collection),
|
|
129
|
+
onClick: () => Ie(h.collection),
|
|
130
130
|
className: "inline-flex max-w-[220px] items-center gap-1.5 rounded-md border border-slate-200 bg-white py-0.5 pl-1 pr-2 text-[12px] font-medium text-slate-700 transition-colors hover:border-nvr-cyan/50 hover:bg-nvr-cyan/[0.05] dark:border-white/[0.08] dark:bg-white/[0.03] dark:text-slate-200 dark:hover:bg-nvr-cyan/[0.08]",
|
|
131
131
|
children: [
|
|
132
|
-
/* @__PURE__ */ n(
|
|
132
|
+
/* @__PURE__ */ n(kt, { color: h.color, name: y(h), icon: h.icon }),
|
|
133
133
|
/* @__PURE__ */ n("span", { className: "truncate", children: y(h) })
|
|
134
134
|
]
|
|
135
135
|
},
|
|
136
136
|
h.collection
|
|
137
137
|
)),
|
|
138
|
-
!p.length &&
|
|
138
|
+
!p.length && g
|
|
139
139
|
] });
|
|
140
140
|
}
|
|
141
|
-
function
|
|
142
|
-
isAdmin:
|
|
143
|
-
title:
|
|
144
|
-
collectionPath: p =
|
|
145
|
-
include:
|
|
146
|
-
favorites:
|
|
147
|
-
admin:
|
|
141
|
+
function At({
|
|
142
|
+
isAdmin: s,
|
|
143
|
+
title: S,
|
|
144
|
+
collectionPath: p = vt,
|
|
145
|
+
include: g,
|
|
146
|
+
favorites: b,
|
|
147
|
+
admin: D
|
|
148
148
|
}) {
|
|
149
|
-
var
|
|
150
|
-
const h =
|
|
151
|
-
...
|
|
152
|
-
...
|
|
153
|
-
})), [
|
|
149
|
+
var Se, Ce, Ne;
|
|
150
|
+
const h = ht(), U = E(null), K = E(null), R = E(null), t = s ? D : void 0, C = !!(t != null && t.reorder), _ = !!(t != null && t.moveCollections && t.renderMoveDialog), [f, ze] = u(""), [H, Ye] = u(() => ({
|
|
151
|
+
...Rt,
|
|
152
|
+
...De(Fe, {})
|
|
153
|
+
})), [I, de] = u([]), [qe, Qe] = u(!1), [Ue, je] = u(!1), [j, z] = u(/* @__PURE__ */ new Set()), [$e, he] = u(!1), [$, Je] = u(() => ({
|
|
154
154
|
[N]: !0,
|
|
155
155
|
__unregistered__: !0,
|
|
156
156
|
__system__: !0,
|
|
157
|
-
...
|
|
158
|
-
})),
|
|
159
|
-
...
|
|
157
|
+
...De(Oe, {})
|
|
158
|
+
})), c = {
|
|
159
|
+
...H,
|
|
160
160
|
// Admin-only views fall back to Folders for everyone else.
|
|
161
|
-
view: !
|
|
162
|
-
chips:
|
|
163
|
-
arranging: C &&
|
|
164
|
-
selecting:
|
|
165
|
-
}, { data:
|
|
166
|
-
|
|
167
|
-
const
|
|
168
|
-
const o =
|
|
161
|
+
view: !s && (H.view === "records" || H.view === "recent") ? "folders" : H.view,
|
|
162
|
+
chips: I,
|
|
163
|
+
arranging: C && qe,
|
|
164
|
+
selecting: _ && Ue
|
|
165
|
+
}, { data: P, isLoading: Ve, isError: Be, error: Ge, refetch: Xe } = xt(), pe = E(g);
|
|
166
|
+
pe.current = g;
|
|
167
|
+
const fe = (e) => {
|
|
168
|
+
const o = pe.current;
|
|
169
169
|
return o ? e.filter(o) : e;
|
|
170
|
-
}, [J, V] =
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}, [
|
|
174
|
-
const { data:
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
170
|
+
}, [J, V] = u([]);
|
|
171
|
+
le(() => {
|
|
172
|
+
P && V(fe(P));
|
|
173
|
+
}, [P]);
|
|
174
|
+
const { data: k } = St(s);
|
|
175
|
+
Ct(s);
|
|
176
|
+
const [me, ue] = u(k), B = E(!1), ge = E(k);
|
|
177
|
+
ge.current = k, le(() => {
|
|
178
|
+
B.current || ue(k);
|
|
179
|
+
}, [k]);
|
|
180
|
+
const { data: G } = Nt(s), X = _t(), Ze = Lt(!b), { favorite: Z, toggle: Ae } = b ?? Ze, v = Dt(), A = ae(() => new Set(v.pins), [v.pins]), l = ae(
|
|
181
|
+
() => Mt(J, me, c, f, X),
|
|
182
|
+
[J, me, f, X, c.view, c.chips, c.showHidden, c.showLinks]
|
|
183
|
+
), W = ae(() => new Map(l.real.map((e) => [e.collection, e])), [l.real]);
|
|
184
|
+
le(() => {
|
|
185
|
+
const e = K.current, o = R.current;
|
|
180
186
|
if (!e || !o) return;
|
|
181
|
-
const
|
|
187
|
+
const a = () => o.style.setProperty(
|
|
182
188
|
"--cl-toolbar-h",
|
|
183
189
|
`${getComputedStyle(e).position === "sticky" ? e.offsetHeight : 0}px`
|
|
184
190
|
);
|
|
185
|
-
|
|
186
|
-
const r = typeof ResizeObserver > "u" ? null : new ResizeObserver(
|
|
191
|
+
a(), window.addEventListener("resize", a);
|
|
192
|
+
const r = typeof ResizeObserver > "u" ? null : new ResizeObserver(a);
|
|
187
193
|
return r == null || r.observe(e), () => {
|
|
188
|
-
window.removeEventListener("resize",
|
|
194
|
+
window.removeEventListener("resize", a), r == null || r.disconnect();
|
|
189
195
|
};
|
|
190
196
|
}, []);
|
|
191
|
-
const
|
|
197
|
+
const ee = (e) => {
|
|
192
198
|
const o = {
|
|
193
199
|
view: e.view,
|
|
194
200
|
density: e.density,
|
|
195
201
|
showHidden: e.showHidden,
|
|
196
202
|
showLinks: e.showLinks
|
|
197
203
|
};
|
|
198
|
-
|
|
199
|
-
},
|
|
200
|
-
const
|
|
201
|
-
return
|
|
202
|
-
}),
|
|
203
|
-
h.invalidateQueries({ queryKey:
|
|
204
|
-
},
|
|
205
|
-
var
|
|
204
|
+
Ye(o), Re(Fe, o), de(e.chips), Qe(e.arranging), je(e.selecting), e.selecting || z(/* @__PURE__ */ new Set());
|
|
205
|
+
}, L = (e) => Je((o) => {
|
|
206
|
+
const a = { ...o, [e]: !o[e] };
|
|
207
|
+
return Re(Oe, a), a;
|
|
208
|
+
}), te = () => {
|
|
209
|
+
h.invalidateQueries({ queryKey: ce.collections }), h.invalidateQueries({ queryKey: ce.stats });
|
|
210
|
+
}, be = t == null ? void 0 : t.moveCollections, ve = be ? async (e, o) => {
|
|
211
|
+
var a;
|
|
206
212
|
try {
|
|
207
|
-
await
|
|
208
|
-
const r = o ? ((
|
|
209
|
-
|
|
213
|
+
await be([e.collection], o);
|
|
214
|
+
const r = o ? ((a = l.folders.find((d) => d.key === o)) == null ? void 0 : a.label) ?? o : "no folder";
|
|
215
|
+
ie.success(`Moved ${y(e)} to ${r}`), te();
|
|
210
216
|
} catch {
|
|
211
|
-
|
|
217
|
+
ie.error(`Could not move ${y(e)}`);
|
|
212
218
|
}
|
|
213
|
-
} : void 0,
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
),
|
|
219
|
+
} : void 0, ye = at(
|
|
220
|
+
_e(it, { activationConstraint: { distance: 8 } }),
|
|
221
|
+
_e(st, { coordinateGetter: ct })
|
|
222
|
+
), We = (e) => {
|
|
217
223
|
const o = t == null ? void 0 : t.reorder;
|
|
218
224
|
if (!o) return;
|
|
219
|
-
const
|
|
225
|
+
const a = new Map(e.map((r) => [r.collection, r.sort]));
|
|
220
226
|
V(
|
|
221
227
|
(r) => r.map((d) => {
|
|
222
|
-
const
|
|
223
|
-
return
|
|
228
|
+
const m = a.get(d.collection);
|
|
229
|
+
return m === void 0 ? d : { ...d, sort: m };
|
|
224
230
|
})
|
|
225
231
|
), o(e).catch(() => {
|
|
226
|
-
|
|
232
|
+
ie.error("Could not save the new order"), P && V(fe(P)), h.invalidateQueries({ queryKey: ce.collections });
|
|
227
233
|
});
|
|
228
|
-
},
|
|
229
|
-
const { active:
|
|
230
|
-
if (!r ||
|
|
231
|
-
const d = e.indexOf(String(
|
|
232
|
-
d === -1 ||
|
|
233
|
-
|
|
234
|
+
}, ke = (e, o) => {
|
|
235
|
+
const { active: a, over: r } = o;
|
|
236
|
+
if (!r || a.id === r.id) return;
|
|
237
|
+
const d = e.indexOf(String(a.id)), m = e.indexOf(String(r.id));
|
|
238
|
+
d === -1 || m === -1 || We(
|
|
239
|
+
dt(e, d, m).map((rt, lt) => ({ collection: rt, sort: (lt + 1) * 10 }))
|
|
234
240
|
);
|
|
235
|
-
},
|
|
241
|
+
}, ne = (e, o, a) => {
|
|
236
242
|
var r;
|
|
237
243
|
return /* @__PURE__ */ n(
|
|
238
|
-
|
|
244
|
+
yt,
|
|
239
245
|
{
|
|
240
246
|
col: e,
|
|
241
|
-
stat:
|
|
242
|
-
heavyList:
|
|
243
|
-
density:
|
|
244
|
-
favorite:
|
|
247
|
+
stat: k == null ? void 0 : k[e.collection],
|
|
248
|
+
heavyList: s ? G == null ? void 0 : G[e.collection] : void 0,
|
|
249
|
+
density: c.density,
|
|
250
|
+
favorite: Z.has(e.collection),
|
|
245
251
|
onToggleFavorite: () => void Ae(e.collection, y(e)),
|
|
246
|
-
pinnedForAll:
|
|
247
|
-
onTogglePinned:
|
|
248
|
-
onMoveUp:
|
|
249
|
-
onMoveDown:
|
|
250
|
-
quietPin:
|
|
252
|
+
pinnedForAll: A.has(e.collection),
|
|
253
|
+
onTogglePinned: s ? () => void (A.has(e.collection) ? v.unpin(e.collection, y(e)) : v.pin(e.collection, y(e))) : void 0,
|
|
254
|
+
onMoveUp: a == null ? void 0 : a.onMoveUp,
|
|
255
|
+
onMoveDown: a == null ? void 0 : a.onMoveDown,
|
|
256
|
+
quietPin: a == null ? void 0 : a.inPinned,
|
|
251
257
|
folders: l.folders,
|
|
252
|
-
onMove:
|
|
258
|
+
onMove: ve ? (d) => void ve(e, d) : void 0,
|
|
253
259
|
recordsPath: p(e.collection),
|
|
254
260
|
editPath: (r = t == null ? void 0 : t.editPath) == null ? void 0 : r.call(t, e.collection),
|
|
255
261
|
menuExtra: t != null && t.rowMenu ? { heading: t.rowMenu.heading, items: t.rowMenu.items(e.collection) } : void 0,
|
|
256
|
-
selecting:
|
|
262
|
+
selecting: c.selecting,
|
|
257
263
|
selected: j.has(e.collection),
|
|
258
|
-
onSelect: () =>
|
|
259
|
-
const
|
|
260
|
-
return
|
|
264
|
+
onSelect: () => z((d) => {
|
|
265
|
+
const m = new Set(d);
|
|
266
|
+
return m.has(e.collection) ? m.delete(e.collection) : m.add(e.collection), m;
|
|
261
267
|
}),
|
|
262
268
|
dragHandle: o,
|
|
263
|
-
highlight:
|
|
264
|
-
isAdmin:
|
|
269
|
+
highlight: f,
|
|
270
|
+
isAdmin: s
|
|
265
271
|
}
|
|
266
272
|
);
|
|
267
|
-
},
|
|
273
|
+
}, O = (e, o) => {
|
|
268
274
|
if (!o)
|
|
269
|
-
return /* @__PURE__ */ n("div", { className: "divide-y divide-slate-100 dark:divide-white/[0.05]", children: e.map((r) => /* @__PURE__ */ n("div", { children:
|
|
270
|
-
const
|
|
275
|
+
return /* @__PURE__ */ n("div", { className: "divide-y divide-slate-100 dark:divide-white/[0.05]", children: e.map((r) => /* @__PURE__ */ n("div", { children: ne(r) }, r.collection)) });
|
|
276
|
+
const a = e.map((r) => r.collection);
|
|
271
277
|
return /* @__PURE__ */ n(
|
|
272
|
-
|
|
278
|
+
Le,
|
|
273
279
|
{
|
|
274
|
-
sensors:
|
|
275
|
-
collisionDetection:
|
|
276
|
-
onDragEnd: (r) =>
|
|
277
|
-
children: /* @__PURE__ */ n(
|
|
280
|
+
sensors: ye,
|
|
281
|
+
collisionDetection: Ee,
|
|
282
|
+
onDragEnd: (r) => ke(a, r),
|
|
283
|
+
children: /* @__PURE__ */ n(Me, { items: a, strategy: Te, children: /* @__PURE__ */ n("div", { className: "divide-y divide-slate-100 dark:divide-white/[0.05]", children: e.map((r) => /* @__PURE__ */ n(Pe, { id: r.collection, label: y(r), children: (d) => ne(r, d) }, r.collection)) }) })
|
|
278
284
|
}
|
|
279
285
|
);
|
|
280
|
-
},
|
|
281
|
-
...
|
|
286
|
+
}, we = !!f.trim() || I.length > 0, w = (e) => we || !$[e], Y = c.view === "folders", oe = !we && !c.arranging && !c.selecting, et = Y && oe, re = v.pins.map((e) => W.get(e)).filter((e) => !!e), tt = [...Z].map((e) => W.get(e)).filter((e) => !!e), nt = X.recent.filter((e) => !Z.has(e) && !A.has(e)).map((e) => W.get(e)).filter((e) => !!e).slice(0, 6), ot = !!(t != null && t.renderSuggestions) && Y && !f && !I.length && !c.arranging, xe = Y ? [
|
|
287
|
+
...oe && re.length > 0 ? [{ key: q, label: "Pinned", count: re.length }] : [],
|
|
282
288
|
...l.sections.map((e) => ({
|
|
283
289
|
key: e.folder.key,
|
|
284
290
|
label: e.folder.label,
|
|
285
291
|
count: e.cols.length
|
|
286
292
|
})),
|
|
287
|
-
...l.loose.length ? [{ key:
|
|
293
|
+
...l.loose.length ? [{ key: T, label: "Not in a folder", count: l.loose.length }] : [],
|
|
288
294
|
...l.linkTables.length ? [{ key: N, label: "Link tables", count: l.linkTables.length }] : []
|
|
289
295
|
] : [];
|
|
290
296
|
return (
|
|
291
297
|
// Grows with its content (shrink-0): the sticky toolbar only sticks inside this
|
|
292
298
|
// box, so a viewport-tall box let it scroll away and left the folder headers
|
|
293
299
|
// stuck below an empty gap.
|
|
294
|
-
/* @__PURE__ */
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
counts: l.counts,
|
|
310
|
-
isAdmin: c,
|
|
311
|
-
title: x,
|
|
312
|
-
canArrange: C,
|
|
313
|
-
canSelect: S,
|
|
314
|
-
selectedCount: j.size,
|
|
315
|
-
onMoveSelected: () => se(!0),
|
|
316
|
-
onClearSelection: () => I(/* @__PURE__ */ new Set()),
|
|
317
|
-
adminActions: (t == null ? void 0 : t.toolbarActions) ?? null
|
|
318
|
-
}
|
|
319
|
-
)
|
|
320
|
-
}
|
|
321
|
-
),
|
|
322
|
-
/* @__PURE__ */ a("div", { "data-cdr": "", className: "flex gap-6 px-4 py-6 sm:[&[data-cdr]]:px-8", children: [
|
|
323
|
-
/* @__PURE__ */ a("div", { className: "min-w-0 flex-1 space-y-4", children: [
|
|
324
|
-
t == null ? void 0 : t.panels,
|
|
325
|
-
Ue ? /* @__PURE__ */ n(Mt, {}) : je && J.length === 0 ? /* @__PURE__ */ n(mt, { error: $e, what: "the collections", onRetry: () => void Je() }) : l.real.length === 0 ? /* @__PURE__ */ n(Et, {}) : l.shownCount === 0 && l.linkTables.length === 0 ? /* @__PURE__ */ n(
|
|
326
|
-
Tt,
|
|
300
|
+
/* @__PURE__ */ i(
|
|
301
|
+
"div",
|
|
302
|
+
{
|
|
303
|
+
ref: R,
|
|
304
|
+
className: "flex min-h-full shrink-0 flex-col",
|
|
305
|
+
"data-collections-directory": !0,
|
|
306
|
+
onPointerEnter: () => {
|
|
307
|
+
B.current = !0;
|
|
308
|
+
},
|
|
309
|
+
onPointerLeave: () => {
|
|
310
|
+
B.current = !1, ue(ge.current);
|
|
311
|
+
},
|
|
312
|
+
children: [
|
|
313
|
+
/* @__PURE__ */ n(
|
|
314
|
+
"div",
|
|
327
315
|
{
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
chipsOn: H.length > 0,
|
|
334
|
-
onShowHidden: () => W({ ...s, showHidden: !0 }),
|
|
335
|
-
onShowLinks: () => W({ ...s, showLinks: !0 }),
|
|
336
|
-
onClearChips: () => ce([]),
|
|
337
|
-
onCreate: t == null ? void 0 : t.onCreate
|
|
338
|
-
}
|
|
339
|
-
) : /* @__PURE__ */ a(Q, { children: [
|
|
340
|
-
ne && /* @__PURE__ */ n(
|
|
341
|
-
Ct,
|
|
342
|
-
{
|
|
343
|
-
sectionId: w(q),
|
|
344
|
-
cols: oe,
|
|
345
|
-
isAdmin: c,
|
|
346
|
-
status: b.status,
|
|
347
|
-
error: b.error,
|
|
348
|
-
onRetry: () => void b.refetch(),
|
|
349
|
-
onReorder: (e) => void b.reorder(e),
|
|
350
|
-
collapsed: !!$[q],
|
|
351
|
-
onToggle: () => _(q),
|
|
352
|
-
renderRow: (e, o) => te(e, o.handle, {
|
|
353
|
-
onMoveUp: o.onMoveUp,
|
|
354
|
-
onMoveDown: o.onMoveDown,
|
|
355
|
-
inPinned: !0
|
|
356
|
-
})
|
|
357
|
-
}
|
|
358
|
-
),
|
|
359
|
-
Ge && /* @__PURE__ */ a("div", { className: "space-y-2", "data-collections-quick": !0, children: [
|
|
360
|
-
/* @__PURE__ */ n(
|
|
361
|
-
Re,
|
|
362
|
-
{
|
|
363
|
-
"data-collections-favorites": !0,
|
|
364
|
-
title: "My favorites",
|
|
365
|
-
icon: /* @__PURE__ */ n(ct, { className: "h-3 w-3 fill-current" }),
|
|
366
|
-
cols: Xe,
|
|
367
|
-
pathFor: p,
|
|
368
|
-
empty: /* @__PURE__ */ n("span", { className: "text-[12px] text-slate-500 dark:text-slate-400", children: g ? "Star a collection to keep it here and in your sidebar." : "Star a collection to keep it here." })
|
|
369
|
-
}
|
|
370
|
-
),
|
|
371
|
-
/* @__PURE__ */ n(
|
|
372
|
-
Re,
|
|
316
|
+
ref: K,
|
|
317
|
+
"data-cdr": "",
|
|
318
|
+
className: "z-10 md:[&[data-cdr]]:sticky md:[&[data-cdr]]:top-0",
|
|
319
|
+
children: /* @__PURE__ */ n(
|
|
320
|
+
wt,
|
|
373
321
|
{
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
322
|
+
state: c,
|
|
323
|
+
onChange: ee,
|
|
324
|
+
filter: f,
|
|
325
|
+
onFilterChange: ze,
|
|
326
|
+
filterRef: U,
|
|
327
|
+
counts: l.counts,
|
|
328
|
+
isAdmin: s,
|
|
329
|
+
title: S,
|
|
330
|
+
canArrange: C,
|
|
331
|
+
canSelect: _,
|
|
332
|
+
selectedCount: j.size,
|
|
333
|
+
onMoveSelected: () => he(!0),
|
|
334
|
+
onClearSelection: () => z(/* @__PURE__ */ new Set()),
|
|
335
|
+
adminActions: (t == null ? void 0 : t.toolbarActions) ?? null
|
|
379
336
|
}
|
|
380
337
|
)
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
s.arranging ? /* @__PURE__ */ n(
|
|
389
|
-
xe,
|
|
338
|
+
}
|
|
339
|
+
),
|
|
340
|
+
/* @__PURE__ */ i("div", { "data-cdr": "", className: "flex gap-6 px-4 py-6 sm:[&[data-cdr]]:px-8", children: [
|
|
341
|
+
/* @__PURE__ */ i("div", { className: "min-w-0 flex-1 space-y-4", children: [
|
|
342
|
+
t == null ? void 0 : t.panels,
|
|
343
|
+
Ve ? /* @__PURE__ */ n(Pt, {}) : Be && J.length === 0 ? /* @__PURE__ */ n(bt, { error: Ge, what: "the collections", onRetry: () => void Xe() }) : l.real.length === 0 ? /* @__PURE__ */ n(Ot, {}) : l.shownCount === 0 && l.linkTables.length === 0 ? /* @__PURE__ */ n(
|
|
344
|
+
Ft,
|
|
390
345
|
{
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
strategy: Se,
|
|
402
|
-
children: /* @__PURE__ */ n("div", { className: "space-y-4", children: l.sections.map((e) => /* @__PURE__ */ n(
|
|
403
|
-
Ee,
|
|
404
|
-
{
|
|
405
|
-
id: e.folder.key,
|
|
406
|
-
label: e.folder.label,
|
|
407
|
-
children: (o) => /* @__PURE__ */ a(L, { id: w(e.folder.key), children: [
|
|
408
|
-
/* @__PURE__ */ n(
|
|
409
|
-
O,
|
|
410
|
-
{
|
|
411
|
-
folder: e.folder,
|
|
412
|
-
count: e.cols.length,
|
|
413
|
-
hiddenCount: e.hiddenCount,
|
|
414
|
-
collapsed: !k(e.folder.key),
|
|
415
|
-
onToggle: () => _(e.folder.key),
|
|
416
|
-
dragHandle: o
|
|
417
|
-
}
|
|
418
|
-
),
|
|
419
|
-
k(e.folder.key) && P(e.cols, !0)
|
|
420
|
-
] })
|
|
421
|
-
},
|
|
422
|
-
e.folder.key
|
|
423
|
-
)) })
|
|
424
|
-
}
|
|
425
|
-
)
|
|
346
|
+
filter: f.trim(),
|
|
347
|
+
near: f.trim() ? Tt(f, l.real) : [],
|
|
348
|
+
pathFor: p,
|
|
349
|
+
hiddenMatches: l.foldedMatches.hidden.length,
|
|
350
|
+
linkMatches: l.foldedMatches.links.length,
|
|
351
|
+
chipsOn: I.length > 0,
|
|
352
|
+
onShowHidden: () => ee({ ...c, showHidden: !0 }),
|
|
353
|
+
onShowLinks: () => ee({ ...c, showLinks: !0 }),
|
|
354
|
+
onClearChips: () => de([]),
|
|
355
|
+
onCreate: t == null ? void 0 : t.onCreate
|
|
426
356
|
}
|
|
427
|
-
) :
|
|
428
|
-
/* @__PURE__ */ n(
|
|
429
|
-
|
|
357
|
+
) : /* @__PURE__ */ i(Q, { children: [
|
|
358
|
+
oe && /* @__PURE__ */ n(
|
|
359
|
+
Et,
|
|
430
360
|
{
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
361
|
+
sectionId: x(q),
|
|
362
|
+
cols: re,
|
|
363
|
+
isAdmin: s,
|
|
364
|
+
status: v.status,
|
|
365
|
+
error: v.error,
|
|
366
|
+
onRetry: () => void v.refetch(),
|
|
367
|
+
onReorder: (e) => void v.reorder(e),
|
|
368
|
+
collapsed: !!$[q],
|
|
369
|
+
onToggle: () => L(q),
|
|
370
|
+
renderRow: (e, o) => ne(e, o.handle, {
|
|
371
|
+
onMoveUp: o.onMoveUp,
|
|
372
|
+
onMoveDown: o.onMoveDown,
|
|
373
|
+
inPinned: !0
|
|
374
|
+
})
|
|
436
375
|
}
|
|
437
376
|
),
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
377
|
+
et && /* @__PURE__ */ i("div", { className: "space-y-2", "data-collections-quick": !0, children: [
|
|
378
|
+
/* @__PURE__ */ n(
|
|
379
|
+
Ke,
|
|
380
|
+
{
|
|
381
|
+
"data-collections-favorites": !0,
|
|
382
|
+
title: "My favorites",
|
|
383
|
+
icon: /* @__PURE__ */ n(pt, { className: "h-3 w-3 fill-current" }),
|
|
384
|
+
cols: tt,
|
|
385
|
+
pathFor: p,
|
|
386
|
+
empty: /* @__PURE__ */ n("span", { className: "text-[12px] text-slate-500 dark:text-slate-400", children: b ? "Star a collection to keep it here and in your sidebar." : "Star a collection to keep it here." })
|
|
387
|
+
}
|
|
388
|
+
),
|
|
389
|
+
/* @__PURE__ */ n(
|
|
390
|
+
Ke,
|
|
391
|
+
{
|
|
392
|
+
"data-collections-recent": !0,
|
|
393
|
+
title: "Recent",
|
|
394
|
+
icon: /* @__PURE__ */ n(ft, { className: "h-3 w-3" }),
|
|
395
|
+
cols: nt,
|
|
396
|
+
pathFor: p
|
|
397
|
+
}
|
|
398
|
+
)
|
|
399
|
+
] }),
|
|
400
|
+
ot && ((Se = t == null ? void 0 : t.renderSuggestions) == null ? void 0 : Se.call(t, {
|
|
401
|
+
real: l.real,
|
|
402
|
+
folders: l.folders,
|
|
403
|
+
refresh: te
|
|
404
|
+
})),
|
|
405
|
+
Y ? /* @__PURE__ */ i(Q, { children: [
|
|
406
|
+
c.arranging ? /* @__PURE__ */ n(
|
|
407
|
+
Le,
|
|
408
|
+
{
|
|
409
|
+
sensors: ye,
|
|
410
|
+
collisionDetection: Ee,
|
|
411
|
+
onDragEnd: (e) => ke(
|
|
412
|
+
l.sections.map((o) => o.folder.key),
|
|
413
|
+
e
|
|
414
|
+
),
|
|
415
|
+
children: /* @__PURE__ */ n(
|
|
416
|
+
Me,
|
|
417
|
+
{
|
|
418
|
+
items: l.sections.map((e) => e.folder.key),
|
|
419
|
+
strategy: Te,
|
|
420
|
+
children: /* @__PURE__ */ n("div", { className: "space-y-4", children: l.sections.map((e) => /* @__PURE__ */ n(
|
|
421
|
+
Pe,
|
|
422
|
+
{
|
|
423
|
+
id: e.folder.key,
|
|
424
|
+
label: e.folder.label,
|
|
425
|
+
children: (o) => /* @__PURE__ */ i(M, { id: x(e.folder.key), children: [
|
|
426
|
+
/* @__PURE__ */ n(
|
|
427
|
+
F,
|
|
428
|
+
{
|
|
429
|
+
folder: e.folder,
|
|
430
|
+
count: e.cols.length,
|
|
431
|
+
hiddenCount: e.hiddenCount,
|
|
432
|
+
collapsed: !w(e.folder.key),
|
|
433
|
+
onToggle: () => L(e.folder.key),
|
|
434
|
+
dragHandle: o
|
|
435
|
+
}
|
|
436
|
+
),
|
|
437
|
+
w(e.folder.key) && O(e.cols, !0)
|
|
438
|
+
] })
|
|
439
|
+
},
|
|
440
|
+
e.folder.key
|
|
441
|
+
)) })
|
|
442
|
+
}
|
|
443
|
+
)
|
|
444
|
+
}
|
|
445
|
+
) : l.sections.map((e) => /* @__PURE__ */ i(M, { id: x(e.folder.key), children: [
|
|
446
|
+
/* @__PURE__ */ n(
|
|
447
|
+
F,
|
|
448
|
+
{
|
|
449
|
+
folder: e.folder,
|
|
450
|
+
count: e.cols.length,
|
|
451
|
+
hiddenCount: e.hiddenCount,
|
|
452
|
+
collapsed: !w(e.folder.key),
|
|
453
|
+
onToggle: () => L(e.folder.key)
|
|
454
|
+
}
|
|
455
|
+
),
|
|
456
|
+
w(e.folder.key) && O(e.cols, !1)
|
|
457
|
+
] }, e.folder.key)),
|
|
458
|
+
l.loose.length > 0 && /* @__PURE__ */ i(M, { id: x(T), children: [
|
|
459
|
+
/* @__PURE__ */ n(
|
|
460
|
+
F,
|
|
461
|
+
{
|
|
462
|
+
folder: { key: T, label: "Not in a folder", color: "#94a3b8" },
|
|
463
|
+
count: l.loose.length,
|
|
464
|
+
hiddenCount: 0,
|
|
465
|
+
collapsed: !w(T),
|
|
466
|
+
onToggle: () => L(T)
|
|
467
|
+
}
|
|
468
|
+
),
|
|
469
|
+
w(T) && O(l.loose, !1)
|
|
470
|
+
] })
|
|
471
|
+
] }) : /* @__PURE__ */ n(M, { id: x("flat"), children: O(l.flat, !1) }),
|
|
472
|
+
l.linkTables.length > 0 && /* @__PURE__ */ i(M, { id: x(N), children: [
|
|
473
|
+
/* @__PURE__ */ n(
|
|
474
|
+
F,
|
|
475
|
+
{
|
|
476
|
+
folder: { key: N, label: "Link tables", color: "#64748b" },
|
|
477
|
+
icon: /* @__PURE__ */ n(mt, { className: "h-3 w-3 text-slate-500 dark:text-slate-400" }),
|
|
478
|
+
count: l.linkTables.length,
|
|
479
|
+
hiddenCount: 0,
|
|
480
|
+
collapsed: !w(N),
|
|
481
|
+
onToggle: () => L(N)
|
|
482
|
+
}
|
|
483
|
+
),
|
|
484
|
+
w(N) && /* @__PURE__ */ i(Q, { children: [
|
|
485
|
+
/* @__PURE__ */ n("p", { className: "border-b border-slate-100 px-4 py-1.5 text-[11.5px] text-slate-500 dark:border-white/[0.05] dark:text-slate-400", children: "Tables that only connect two collections (many-to-many). Turn on “Show link tables” to list them in their folders." }),
|
|
486
|
+
O(l.linkTables, !1)
|
|
487
|
+
] })
|
|
488
|
+
] }),
|
|
489
|
+
(Ce = t == null ? void 0 : t.renderExtraSections) == null ? void 0 : Ce.call(t, {
|
|
490
|
+
filter: f,
|
|
491
|
+
collapsed: $,
|
|
492
|
+
onToggle: L,
|
|
493
|
+
renderSection: (e) => /* @__PURE__ */ i(M, { id: x(e.key), children: [
|
|
494
|
+
/* @__PURE__ */ n(
|
|
495
|
+
F,
|
|
496
|
+
{
|
|
497
|
+
folder: { key: e.key, label: e.label, color: "#94a3b8" },
|
|
498
|
+
icon: e.icon,
|
|
499
|
+
count: e.count,
|
|
500
|
+
hiddenCount: 0,
|
|
501
|
+
collapsed: !e.open,
|
|
502
|
+
onToggle: e.onToggle
|
|
503
|
+
}
|
|
504
|
+
),
|
|
505
|
+
e.open && e.body
|
|
506
|
+
] }, e.key)
|
|
507
|
+
})
|
|
469
508
|
] })
|
|
470
509
|
] }),
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
510
|
+
xe.length > 2 && /* @__PURE__ */ n(
|
|
511
|
+
"nav",
|
|
512
|
+
{
|
|
513
|
+
"aria-label": "Jump to folder",
|
|
514
|
+
"data-cdr": "",
|
|
515
|
+
className: "hidden w-44 shrink-0 xl:[&[data-cdr]]:block",
|
|
516
|
+
children: /* @__PURE__ */ i(
|
|
517
|
+
"div",
|
|
478
518
|
{
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
519
|
+
className: "sticky space-y-0.5",
|
|
520
|
+
style: { top: "calc(var(--cl-toolbar-h, 0px) + 24px)" },
|
|
521
|
+
children: [
|
|
522
|
+
/* @__PURE__ */ n("p", { className: "px-2 pb-1 text-[11px] font-medium text-slate-500 dark:text-slate-400", children: "Jump to" }),
|
|
523
|
+
xe.map((e) => /* @__PURE__ */ i(
|
|
524
|
+
"button",
|
|
525
|
+
{
|
|
526
|
+
type: "button",
|
|
527
|
+
onClick: () => {
|
|
528
|
+
var o;
|
|
529
|
+
return (o = document.getElementById(x(e.key))) == null ? void 0 : o.scrollIntoView({
|
|
530
|
+
behavior: window.matchMedia("(prefers-reduced-motion: reduce)").matches ? "auto" : "smooth",
|
|
531
|
+
block: "start"
|
|
532
|
+
});
|
|
533
|
+
},
|
|
534
|
+
className: "flex w-full items-center gap-2 rounded px-2 py-1 text-left text-[12px] text-slate-600 transition-colors hover:bg-slate-100 hover:text-slate-900 dark:text-slate-300 dark:hover:bg-white/[0.05] dark:hover:text-slate-100",
|
|
535
|
+
children: [
|
|
536
|
+
/* @__PURE__ */ n("span", { className: "min-w-0 flex-1 truncate", children: e.label }),
|
|
537
|
+
/* @__PURE__ */ n("span", { className: "text-[11px] tabular-nums text-slate-500 dark:text-slate-400", children: e.count })
|
|
538
|
+
]
|
|
539
|
+
},
|
|
540
|
+
e.key
|
|
541
|
+
))
|
|
542
|
+
]
|
|
485
543
|
}
|
|
486
|
-
)
|
|
487
|
-
e.open && e.body
|
|
488
|
-
] }, e.key)
|
|
489
|
-
})
|
|
490
|
-
] })
|
|
491
|
-
] }),
|
|
492
|
-
be.length > 2 && /* @__PURE__ */ n(
|
|
493
|
-
"nav",
|
|
494
|
-
{
|
|
495
|
-
"aria-label": "Jump to folder",
|
|
496
|
-
"data-cdr": "",
|
|
497
|
-
className: "hidden w-44 shrink-0 xl:[&[data-cdr]]:block",
|
|
498
|
-
children: /* @__PURE__ */ a(
|
|
499
|
-
"div",
|
|
500
|
-
{
|
|
501
|
-
className: "sticky space-y-0.5",
|
|
502
|
-
style: { top: "calc(var(--cl-toolbar-h, 0px) + 24px)" },
|
|
503
|
-
children: [
|
|
504
|
-
/* @__PURE__ */ n("p", { className: "px-2 pb-1 text-[11px] font-medium text-slate-500 dark:text-slate-400", children: "Jump to" }),
|
|
505
|
-
be.map((e) => /* @__PURE__ */ a(
|
|
506
|
-
"button",
|
|
507
|
-
{
|
|
508
|
-
type: "button",
|
|
509
|
-
onClick: () => {
|
|
510
|
-
var o;
|
|
511
|
-
return (o = document.getElementById(w(e.key))) == null ? void 0 : o.scrollIntoView({
|
|
512
|
-
behavior: window.matchMedia("(prefers-reduced-motion: reduce)").matches ? "auto" : "smooth",
|
|
513
|
-
block: "start"
|
|
514
|
-
});
|
|
515
|
-
},
|
|
516
|
-
className: "flex w-full items-center gap-2 rounded px-2 py-1 text-left text-[12px] text-slate-600 transition-colors hover:bg-slate-100 hover:text-slate-900 dark:text-slate-300 dark:hover:bg-white/[0.05] dark:hover:text-slate-100",
|
|
517
|
-
children: [
|
|
518
|
-
/* @__PURE__ */ n("span", { className: "min-w-0 flex-1 truncate", children: e.label }),
|
|
519
|
-
/* @__PURE__ */ n("span", { className: "text-[11px] tabular-nums text-slate-500 dark:text-slate-400", children: e.count })
|
|
520
|
-
]
|
|
521
|
-
},
|
|
522
|
-
e.key
|
|
523
|
-
))
|
|
524
|
-
]
|
|
544
|
+
)
|
|
525
545
|
}
|
|
526
546
|
)
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
}
|
|
539
|
-
|
|
547
|
+
] }),
|
|
548
|
+
_ && ((Ne = t == null ? void 0 : t.renderMoveDialog) == null ? void 0 : Ne.call(t, {
|
|
549
|
+
open: $e,
|
|
550
|
+
onOpenChange: he,
|
|
551
|
+
names: [...j],
|
|
552
|
+
folders: l.folders,
|
|
553
|
+
onMoved: () => {
|
|
554
|
+
z(/* @__PURE__ */ new Set()), te();
|
|
555
|
+
}
|
|
556
|
+
}))
|
|
557
|
+
]
|
|
558
|
+
}
|
|
559
|
+
)
|
|
540
560
|
);
|
|
541
561
|
}
|
|
542
562
|
export {
|
|
543
|
-
|
|
563
|
+
At as CollectionsDirectory
|
|
544
564
|
};
|