@nivaro/react 0.3.140 → 0.3.141
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/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/shared/components/CollectionBrowserView.js +842 -830
- package/dist/shared/components/ItemEditForm.js +825 -819
- package/dist/shared/components/RowPresence.js +83 -76
- package/dist/shared/components/UnseenDot.js +183 -22
- package/dist/shared/components/delivery-analytics/drill.js +32 -32
- package/dist/shared/components/item-edit/InlineTableField.js +338 -338
- package/dist/shared/components/item-edit/RecordRecapChanges.js +116 -74
- package/dist/shared/components/item-edit/RecordRecapStrip.js +148 -160
- package/dist/shared/components/item-edit/summary-layout-request.js +15 -0
- package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
- package/dist/shared/components/layout-editor/settings/ResolveSettings.js +226 -157
- package/dist/shared/components/layout-editor/settings/WhoSection.js +53 -52
- package/dist/shared/components/layout-editor/settings/controls.js +98 -90
- package/dist/shared/components/layout-editor/settings/settings-registry.js +8 -0
- package/dist/shared/components/queue/QueueWorklist.js +556 -545
- package/dist/shared/components/support/RequestList.js +2 -2
- package/dist/shared/lib/layout-resolve.js +64 -48
- package/package.json +1 -1
|
@@ -1,124 +1,124 @@
|
|
|
1
1
|
import { jsx as a, jsxs as d, Fragment as Je } from "react/jsx-runtime";
|
|
2
|
-
import { useQueryClient as Ar, useMutation as Wt, useQuery as te, useQueries as
|
|
3
|
-
import { Sparkles as Ws, RotateCw as wr, X as zs, ChevronDown as
|
|
4
|
-
import
|
|
5
|
-
import { createPortal as
|
|
2
|
+
import { useQueryClient as Ar, useMutation as Wt, useQuery as te, useQueries as Ka } from "@tanstack/react-query";
|
|
3
|
+
import { Sparkles as Ws, RotateCw as wr, X as zs, ChevronDown as Ua, Wand2 as fi, FileText as hi, FileDiff as bi, Network as jc, Map as Bc, Group as Uc, Check as Vs, ListChecks as Qc, Rows3 as Wc, Rows2 as zc, SlidersHorizontal as Vc, Loader2 as Hs, Download as Hc, MoreHorizontal as Gc, Bell as Yc, BellOff as Jc, Search as td, ChevronsLeft as Xc, ChevronsRight as Zc, Pin as eu } from "lucide-react";
|
|
4
|
+
import tu, { useState as w, useRef as Z, useEffect as se, useMemo as oe, useLayoutEffect as gi } from "react";
|
|
5
|
+
import { createPortal as nd } from "react-dom";
|
|
6
6
|
import { toast as Fe } from "sonner";
|
|
7
|
-
import { useNivaroClient as en, useItemNavigation as
|
|
7
|
+
import { useNivaroClient as en, useItemNavigation as ad, useOverlayState as nu, useItemEditAuth as Or, useApiFetchConfig as au } from "../context.js";
|
|
8
8
|
import { useDebounced as _r } from "../hooks/useDebounced.js";
|
|
9
|
-
import { useElapsedLoading as
|
|
10
|
-
import { useSlowReason as
|
|
11
|
-
import { atRiskReferencedFields as
|
|
12
|
-
import { rowActionSentence as
|
|
13
|
-
import { useBulkProgressFeed as
|
|
14
|
-
import { csvNumber as
|
|
15
|
-
import { warmPageLookups as
|
|
9
|
+
import { useElapsedLoading as ru } from "../hooks/useElapsedLoading.js";
|
|
10
|
+
import { useSlowReason as su } from "../hooks/useSlowReason.js";
|
|
11
|
+
import { atRiskReferencedFields as lu } from "../lib/at-risk-fields.js";
|
|
12
|
+
import { rowActionSentence as ou } from "../lib/bulk-copy.js";
|
|
13
|
+
import { useBulkProgressFeed as iu, newBulkProgressId as du, startBulkProgress as cu, endBulkProgress as uu } from "../lib/bulk-progress.js";
|
|
14
|
+
import { csvNumber as pu, csvDateTime as mu, readExportExtras as fu, VIRTUAL_HEADERS as hu, virtualExportCell as bu } from "../lib/cbv-export.js";
|
|
15
|
+
import { warmPageLookups as gu } from "../lib/cbv-page-warm.js";
|
|
16
16
|
import { post as qe, get as X, patch as Nr, del as Rr } from "../lib/commands.js";
|
|
17
|
-
import { compareValueText as
|
|
18
|
-
import { useConfigUpdateRefresh as
|
|
19
|
-
import { parseDateFilter as Pr, dateFilterBounds as
|
|
20
|
-
import { rowDeleteOffered as
|
|
21
|
-
import { errorSentence as
|
|
17
|
+
import { compareValueText as xu } from "../lib/compare-value.js";
|
|
18
|
+
import { useConfigUpdateRefresh as vu } from "../lib/config-update-refresh.js";
|
|
19
|
+
import { parseDateFilter as Pr, dateFilterBounds as yu, describeDateFilter as ku, DATE_FILTER_OPS as wu, formatDateFilter as _u } from "../lib/date-filter.js";
|
|
20
|
+
import { rowDeleteOffered as Nu } from "../lib/delete-offer.js";
|
|
21
|
+
import { errorSentence as Su } from "../lib/error-message.js";
|
|
22
22
|
import { errorToastOptions as Fr, toastError as Gs } from "../lib/error-toast.js";
|
|
23
|
-
import { startLocalExport as
|
|
24
|
-
import { extractExpressionTokens as
|
|
25
|
-
import { clauseFromCondition as Ys, clauseFromControlValue as
|
|
26
|
-
import { releaseLiveOwner as
|
|
27
|
-
import { formatValue as Sr, formatMultiValue as vi, countFromResolved as
|
|
28
|
-
import { IN_STEP_COLUMN as
|
|
29
|
-
import { dotsForRecord as
|
|
30
|
-
import { useKeepRowCheckboxFocus as
|
|
31
|
-
import { createCursorBook as
|
|
32
|
-
import { normalizeInlineEdit as
|
|
33
|
-
import { sanitizeCbvLinkState as
|
|
34
|
-
import { rememberedListPage as
|
|
35
|
-
import { peekListAway as
|
|
36
|
-
import { useLiveEvent as
|
|
23
|
+
import { startLocalExport as Cu, ExportCancelledError as $u, isStartedExportRun as qu, followExportRun as Tu, downloadUrl as Lu, throwIfCancelled as Ru } from "../lib/export-runs.js";
|
|
24
|
+
import { extractExpressionTokens as Fu, evaluateNumeric as xi } from "../lib/expression.js";
|
|
25
|
+
import { clauseFromCondition as Ys, clauseFromControlValue as Eu, filterSentence as Ou } from "../lib/filter-sentence.js";
|
|
26
|
+
import { releaseLiveOwner as Pu, deliverLive as Du } from "../lib/focus-mode.js";
|
|
27
|
+
import { formatValue as Sr, formatMultiValue as vi, countFromResolved as Mu } from "../lib/format-value.js";
|
|
28
|
+
import { IN_STEP_COLUMN as Qn, inStepText as Au, IN_STEP_SORT as Ia } from "../lib/in-step.js";
|
|
29
|
+
import { dotsForRecord as Iu } from "../lib/integration-dots.js";
|
|
30
|
+
import { useKeepRowCheckboxFocus as Ku } from "../lib/keep-row-focus.js";
|
|
31
|
+
import { createCursorBook as ju, pageRequest as Bu, noteNextCursor as Uu, isCursorRefusal as Qu, stopCursors as Wu } from "../lib/keyset-pager.js";
|
|
32
|
+
import { normalizeInlineEdit as zu, inlineM2oTarget as Vu, inlineChoices as Hu, inlineEditFor as Gu, nextInlineKey as Yu } from "../lib/list-inline-edit.js";
|
|
33
|
+
import { sanitizeCbvLinkState as Ju, readListLinkFromLocation as Xu, encodeListLink as Zu, replaceListLinkParam as ep } from "../lib/list-link.js";
|
|
34
|
+
import { rememberedListPage as tp, pageWhileSettling as yi, rememberListPage as np, restoreWindowOutcome as ap, historyKey as rp, arrivedByListReturn as sp, ensureHistoryKey as lp } from "../lib/list-page-memory.js";
|
|
35
|
+
import { peekListAway as op, planListReturn as ki, takeListAway as ip, standbyListAway as dp, changedRowIds as cp, readListReturn as up, markReturnRow as pp, rowInView as mp, noteListOpen as fp } from "../lib/list-return.js";
|
|
36
|
+
import { useLiveEvent as hp, expandCoalesced as bp, LIVE_ASPECTS as Wn } from "../lib/live.js";
|
|
37
37
|
import { createCoalescer as Js } from "../lib/live-counts.js";
|
|
38
|
-
import { useSteadyGroups as
|
|
39
|
-
import { useLiveLinkLabels as
|
|
40
|
-
import { useRowChanges as
|
|
41
|
-
import { useLiveBurst as
|
|
42
|
-
import { loadErrorStatus as
|
|
43
|
-
import { useShownRecords as
|
|
44
|
-
import { listTrailDetail as
|
|
45
|
-
import { toFiniteNumber as
|
|
46
|
-
import { OPEN_IN_TABS_CAP as
|
|
47
|
-
import { isOwnWrite as
|
|
48
|
-
import { useIdleNextPage as
|
|
49
|
-
import { useRowPresence as
|
|
50
|
-
import { queryKeys as
|
|
51
|
-
import { cascadeFilter as
|
|
52
|
-
import { useOptionalRealtime as
|
|
53
|
-
import { rowMenuRef as il, recordRefLabel as
|
|
54
|
-
import { rowHighlightDotClass as
|
|
55
|
-
import { ROW_SURFACE_SELECTED as
|
|
56
|
-
import { userErrorMessage as
|
|
57
|
-
import { logSearch as
|
|
58
|
-
import { selKey as
|
|
59
|
-
import { listViewInput as
|
|
60
|
-
import { shapeForField as
|
|
61
|
-
import { knownTotalFrom as
|
|
62
|
-
import { nextSortValue as
|
|
63
|
-
import { approvalBadgeStates as
|
|
64
|
-
import { isFileCollection as
|
|
65
|
-
import { useTableDensity as
|
|
66
|
-
import { fitPins as
|
|
67
|
-
import { templateRelationPaths as
|
|
68
|
-
import { useBelowMd as
|
|
69
|
-
import { useMyScopes as
|
|
70
|
-
import { useNewItemLayouts as
|
|
71
|
-
import { loadUserCard as
|
|
72
|
-
import { cn as fn, formatNumber as Ct, humanHours as
|
|
73
|
-
import { useWatchActions as
|
|
74
|
-
import { usePublishAskContext as
|
|
75
|
-
import { useBuiltinGate as
|
|
76
|
-
import { BulkCompareButton as
|
|
77
|
-
import { BulkFieldUpdate as
|
|
78
|
-
import { BulkRowMark as
|
|
79
|
-
import { BulkSelectionNotices as
|
|
80
|
-
import { bulkUpdateOutcome as
|
|
81
|
-
import { MessageStakeholdersForm as
|
|
82
|
-
import { useRowPushActions as
|
|
83
|
-
import { CellCopyLayer as
|
|
84
|
-
import { CollectionImportBanner as
|
|
85
|
-
import { CopyAsButton as
|
|
86
|
-
import { isApprovalChangedFilter as
|
|
87
|
-
import { useTreeConfig as
|
|
88
|
-
import { ColumnHeaderMenu as
|
|
89
|
-
import { viewChangedConditions as Li, isChangedFilter as
|
|
90
|
-
import { loadTotalOverrides as Fi, shownTotals as
|
|
91
|
-
import { EXPORT_MAX_ROWS as Oi, readExportRows as
|
|
92
|
-
import { FormulaColumnAdder as
|
|
93
|
-
import { FoundElsewhere as
|
|
94
|
-
import { useHierarchyScope as
|
|
95
|
-
import { tabStopRowKey as
|
|
96
|
-
import { splitRiskFilter as Pi, riskFilterEntry as
|
|
97
|
-
import { isFilterRefusal as tl, unknownFieldsOf as Di, dropUnknownField as
|
|
98
|
-
import { ViewDefaultMenu as
|
|
99
|
-
import { CbvFileLabel as
|
|
100
|
-
import { exactCountParams as
|
|
101
|
-
import { relationFilterRequests as
|
|
102
|
-
import { useRecordRoomTypes as
|
|
103
|
-
import { FilterControl as
|
|
104
|
-
import { FocusModeToggle as
|
|
105
|
-
import { FULFILMENT_FILTER_OPTIONS as Mi, FulfilmentPill as
|
|
106
|
-
import { HScrollProxy as
|
|
107
|
-
import { InStepCell as
|
|
108
|
-
import { useDocumentAutofillConfig as
|
|
109
|
-
import { INTEGRATIONS_FILTER_OPTIONS as Ai, IntegrationDots as
|
|
38
|
+
import { useSteadyGroups as gp, useRowGlide as xp, movingRowTitle as vp } from "../lib/live-groups.js";
|
|
39
|
+
import { useLiveLinkLabels as yp } from "../lib/live-link-labels.js";
|
|
40
|
+
import { useRowChanges as kp, flashRows as wp, useRowLocks as wi, lockLabel as _p, viewerMatches as _i, conditionFields as Ni, mayAffectMatch as Np, writerOf as Sp } from "../lib/live-list.js";
|
|
41
|
+
import { useLiveBurst as Cp, useLivePause as $p, useSteadyRows as qp, useKeptEntries as Xs, GONE_ROW_CLASS as Tp, GONE_ROW_TITLE as Lp, resumeAsRefetch as Rp, burstWriter as Fp, totalsMayMove as Ep } from "../lib/live-list-flow.js";
|
|
42
|
+
import { loadErrorStatus as Op, listLoadErrorText as Pp } from "../lib/load-error.js";
|
|
43
|
+
import { useShownRecords as Dp } from "../lib/missed-updates.js";
|
|
44
|
+
import { listTrailDetail as Mp, setTrailDetail as Ap } from "../lib/nav-trail.js";
|
|
45
|
+
import { toFiniteNumber as Ip, formatFieldNumber as Kp } from "../lib/number-format.js";
|
|
46
|
+
import { OPEN_IN_TABS_CAP as jp, openInTabs as Bp, openInTabsMessage as Si } from "../lib/open-in-tabs.js";
|
|
47
|
+
import { isOwnWrite as Up } from "../lib/own-writes.js";
|
|
48
|
+
import { useIdleNextPage as Qp, intentProps as Wp, prefetchRecord as zp } from "../lib/prefetch.js";
|
|
49
|
+
import { useRowPresence as Vp, rowPresenceKey as Zs } from "../lib/presence-hooks.js";
|
|
50
|
+
import { queryKeys as Hp } from "../lib/query-keys.js";
|
|
51
|
+
import { cascadeFilter as Gp, fetchCascadeRelations as Yp } from "../lib/quick-filter-cascade.js";
|
|
52
|
+
import { useOptionalRealtime as Jp } from "../lib/realtime.js";
|
|
53
|
+
import { rowMenuRef as il, recordRefLabel as Xp, friendlyIdOf as el, copyWhenReady as Zp, shareableRecordId as em, friendlyIdFieldOf as tm } from "../lib/record-ref.js";
|
|
54
|
+
import { rowHighlightDotClass as nm, rowHighlightClass as am } from "../lib/row-highlight.js";
|
|
55
|
+
import { ROW_SURFACE_SELECTED as rm, ROW_SURFACE as Ci, ROW_SURFACE_HOVER as $i, PINNED_CELL_SURFACE as sm } from "../lib/row-surface.js";
|
|
56
|
+
import { userErrorMessage as ja } from "../lib/safe-error.js";
|
|
57
|
+
import { logSearch as lm, logSearchOpen as om } from "../lib/search-log.js";
|
|
58
|
+
import { selKey as im, useSelectionPicks as dm, useSelectionLiveMarks as cm, useSelectionChanges as um, useSelectedRowMemory as pm, selectionSums as mm } from "../lib/selection-watch.js";
|
|
59
|
+
import { listViewInput as fm } from "../lib/send-view.js";
|
|
60
|
+
import { shapeForField as hm } from "../lib/skeleton-shapes.js";
|
|
61
|
+
import { knownTotalFrom as bm } from "../lib/slow-reason.js";
|
|
62
|
+
import { nextSortValue as gm } from "../lib/sort-cycle.js";
|
|
63
|
+
import { approvalBadgeStates as xm, normalizeSummaryModeRules as vm } from "../lib/summary-mode.js";
|
|
64
|
+
import { isFileCollection as ym } from "../lib/system-collections.js";
|
|
65
|
+
import { useTableDensity as km } from "../lib/table-density.js";
|
|
66
|
+
import { fitPins as wm } from "../lib/table-pins.js";
|
|
67
|
+
import { templateRelationPaths as _m } from "../lib/template-paths.js";
|
|
68
|
+
import { useBelowMd as Nm } from "../lib/use-below-md.js";
|
|
69
|
+
import { useMyScopes as Sm, matchScopeDimension as qi, effectiveScopeSeedIds as Cm, translateScopeValues as $m } from "../lib/use-my-scopes.js";
|
|
70
|
+
import { useNewItemLayouts as qm } from "../lib/use-new-item-layouts.js";
|
|
71
|
+
import { loadUserCard as Tm, userCardQuery as Lm } from "../lib/user-cards.js";
|
|
72
|
+
import { cn as fn, formatNumber as Ct, humanHours as Rm, formatDateTime as Fm } from "../lib/utils.js";
|
|
73
|
+
import { useWatchActions as rd } from "../lib/watch-list.js";
|
|
74
|
+
import { usePublishAskContext as Em, useAskRecordDrag as Om } from "./ai/ask-context.js";
|
|
75
|
+
import { useBuiltinGate as sd, useAvailableBulkActions as Pm, bulkActionEnabled as Dm, mergeBulkActions as Mm, guardMatches as Am, BulkActionButtons as Im } from "./bulk/BulkActionButtons.js";
|
|
76
|
+
import { BulkCompareButton as Km } from "./bulk/BulkCompareButton.js";
|
|
77
|
+
import { BulkFieldUpdate as jm } from "./bulk/BulkFieldUpdate.js";
|
|
78
|
+
import { BulkRowMark as Bm } from "./bulk/BulkRowMark.js";
|
|
79
|
+
import { BulkSelectionNotices as Um, SelectionFigures as Qm } from "./bulk/BulkSelectionNotices.js";
|
|
80
|
+
import { bulkUpdateOutcome as Wm } from "./bulk/bulk-update-preview.js";
|
|
81
|
+
import { MessageStakeholdersForm as zm } from "./bulk/MessageStakeholders.js";
|
|
82
|
+
import { useRowPushActions as Vm, runRowPush as Hm } from "./bulk/RowPushActions.js";
|
|
83
|
+
import { CellCopyLayer as Gm } from "./CellCopyLayer.js";
|
|
84
|
+
import { CollectionImportBanner as Ym } from "./CollectionImportBanner.js";
|
|
85
|
+
import { CopyAsButton as Jm } from "./CopyAsButton.js";
|
|
86
|
+
import { isApprovalChangedFilter as $n, APPROVAL_CHANGED_LABEL as Ti, approvalChangedEntry as Xm } from "./cbv/approval-changed.js";
|
|
87
|
+
import { useTreeConfig as Zm, CollectionTree as e0 } from "./cbv/CollectionTree.js";
|
|
88
|
+
import { ColumnHeaderMenu as t0 } from "./cbv/ColumnHeaderMenu.js";
|
|
89
|
+
import { viewChangedConditions as Li, isChangedFilter as zn, changedPhrase as n0, ChangedByOthersChip as a0, viewChangedTip as Ri, changedCondition as r0 } from "./cbv/changed-by-others.js";
|
|
90
|
+
import { loadTotalOverrides as Fi, shownTotals as s0, totalsBatchParams as l0, readTotal as o0, combineTerms as i0, formatTotal as Ei, totalTip as d0, totalsEligibleKey as c0, totalsSupport as u0, isTotalFn as p0, rememberTotalOverrides as m0, setOverride as f0, overridesAfterSave as h0 } from "./cbv/column-totals.js";
|
|
91
|
+
import { EXPORT_MAX_ROWS as Oi, readExportRows as b0, stableSort as g0, m2oLabelPaths as x0, resolveAllPaths as v0, userLabel as y0, m2oLabel as k0, localYmd as w0 } from "./cbv/export-rows.js";
|
|
92
|
+
import { FormulaColumnAdder as _0 } from "./cbv/FormulaColumnAdder.js";
|
|
93
|
+
import { FoundElsewhere as N0 } from "./cbv/FoundElsewhere.js";
|
|
94
|
+
import { useHierarchyScope as S0, HierarchyScopePicker as C0 } from "./cbv/HierarchyScope.js";
|
|
95
|
+
import { tabStopRowKey as $0, rowFocusTarget as q0 } from "./cbv/row-focus.js";
|
|
96
|
+
import { splitRiskFilter as Pi, riskFilterEntry as T0 } from "./cbv/saved-view-risk.js";
|
|
97
|
+
import { isFilterRefusal as tl, unknownFieldsOf as Di, dropUnknownField as L0 } from "./cbv/unknown-fields.js";
|
|
98
|
+
import { ViewDefaultMenu as R0 } from "./cbv/ViewDefaultMenu.js";
|
|
99
|
+
import { CbvFileLabel as F0 } from "./cbv-file-label.js";
|
|
100
|
+
import { exactCountParams as E0, lastPageFromCount as O0 } from "./cbv-pager.js";
|
|
101
|
+
import { relationFilterRequests as P0, mergeFilterOptions as D0 } from "./cbv-relation-filter.js";
|
|
102
|
+
import { useRecordRoomTypes as M0, canOpenChatRoom as A0, discussRecord as I0 } from "./chat/chat-core.js";
|
|
103
|
+
import { FilterControl as K0 } from "./DataTable.js";
|
|
104
|
+
import { FocusModeToggle as j0 } from "./FocusModeToggle.js";
|
|
105
|
+
import { FULFILMENT_FILTER_OPTIONS as Mi, FulfilmentPill as B0, fulfilmentFigures as U0 } from "./FulfilmentPill.js";
|
|
106
|
+
import { HScrollProxy as Q0 } from "./HScrollProxy.js";
|
|
107
|
+
import { InStepCell as W0 } from "./InStep.js";
|
|
108
|
+
import { useDocumentAutofillConfig as z0, startDocumentExtraction as V0 } from "./import/DocumentAutofillButton.js";
|
|
109
|
+
import { INTEGRATIONS_FILTER_OPTIONS as Ai, IntegrationDots as H0 } from "./integrations/IntegrationDots.js";
|
|
110
110
|
import { SendStatusMarks as Ii } from "./integrations/SendStatus.js";
|
|
111
|
-
import { useQuickPickerSteps as
|
|
112
|
-
import { usePickerExclusion as
|
|
111
|
+
import { useQuickPickerSteps as G0, QuickPickerDialog as Y0 } from "./item-edit/QuickPickerDialog.js";
|
|
112
|
+
import { usePickerExclusion as J0 } from "./item-edit/RecordGrantTools.js";
|
|
113
113
|
import { invalidateRecordQueries as Ki } from "./item-edit/RecordLiveSync.js";
|
|
114
|
-
import { relatedMissing as
|
|
114
|
+
import { relatedMissing as X0 } from "./item-edit/related-missing.js";
|
|
115
115
|
import { UserRosterCluster as ji, UserChip as Bi } from "./item-edit/UserChip.js";
|
|
116
116
|
import { LiveCount as Ui } from "./LiveCount.js";
|
|
117
|
-
import { LivePauseButton as
|
|
118
|
-
import { LiveRowMark as
|
|
119
|
-
import { CopyListLinkButton as
|
|
120
|
-
import { useInlineEdit as
|
|
121
|
-
import { ListViewers as
|
|
117
|
+
import { LivePauseButton as Z0, LiveBurstPill as ef } from "./LiveListControls.js";
|
|
118
|
+
import { LiveRowMark as tf, MovingRowChip as nf } from "./LiveRowMark.js";
|
|
119
|
+
import { CopyListLinkButton as af } from "./list/CopyListLinkButton.js";
|
|
120
|
+
import { useInlineEdit as rf, InlineEditCell as sf } from "./list/InlineEdit.js";
|
|
121
|
+
import { ListViewers as Qi } from "./list/ListViewers.js";
|
|
122
122
|
import { PhonePager as lf } from "./list/PhonePager.js";
|
|
123
123
|
import { MapView as of } from "./MapView.js";
|
|
124
124
|
import { MergeRecordsDialog as df } from "./merge/MergeRecordsDialog.js";
|
|
@@ -127,7 +127,7 @@ import { OverflowRail as uf } from "./OverflowRail.js";
|
|
|
127
127
|
import { usePickerExcludedRows as pf, PICKER_EXCLUDED_ROW_CLASS as mf, PICKER_EXCLUDED_TITLE as ff } from "./PickerExcludedRows.js";
|
|
128
128
|
import { ConfirmButton as dl } from "./profile/primitives.js";
|
|
129
129
|
import { pruneQuickSelection as nl } from "./quick-filters/config.js";
|
|
130
|
-
import { QuickFilterBarEditor as hf, QuickFilterEditButton as
|
|
130
|
+
import { QuickFilterBarEditor as hf, QuickFilterEditButton as Wi } from "./quick-filters/QuickFilterBarEditor.js";
|
|
131
131
|
import { useQuickFilterEditing as bf } from "./quick-filters/useQuickFilterEditing.js";
|
|
132
132
|
import { RealtimeStaleMark as gf } from "./RealtimeStatusBanner.js";
|
|
133
133
|
import { RecordDrilldownSheet as xf } from "./RecordDrilldownSheet.js";
|
|
@@ -139,9 +139,9 @@ import { TableSkeletonRows as _f } from "./Skeletons.js";
|
|
|
139
139
|
import { SlowNoticeView as Nf } from "./SlowNotice.js";
|
|
140
140
|
import { SendViewButton as Sf } from "./send-view/SendViewButton.js";
|
|
141
141
|
import { TipLayer as Cf } from "./TipLayer.js";
|
|
142
|
-
import { UnseenDot as
|
|
142
|
+
import { UnseenDot as zi } from "./UnseenDot.js";
|
|
143
143
|
import { Popover as Cr, PopoverTrigger as $r, PopoverContent as qr } from "./ui/popover.js";
|
|
144
|
-
import { SimpleSelectXs as ha, SimpleSelect as
|
|
144
|
+
import { SimpleSelectXs as ha, SimpleSelect as Vi } from "./ui/SimpleSelect.js";
|
|
145
145
|
import { Skeleton as $f } from "./ui/skeleton.js";
|
|
146
146
|
import { useAccessRegained as qf, AccessGrantedNote as Tf } from "./panels/AccessGrantedNote.js";
|
|
147
147
|
import { ListAccessDenied as Lf } from "./panels/AccessDeniedPanel.js";
|
|
@@ -159,14 +159,14 @@ function Tr(n, i) {
|
|
|
159
159
|
const h = i.relation.many_collection, c = i.relation.junction_field;
|
|
160
160
|
return !h || !c ? null : ((y = n.find((C) => C.many_collection === h && C.many_field === c)) == null ? void 0 : y.one_collection) ?? null;
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function Ba(n) {
|
|
163
163
|
if (!n) return "id";
|
|
164
164
|
const i = new Set(n.fields.map((c) => c.field)), h = [...(n.display_template ?? "").matchAll(/\{\{(\w+)/g)].map((c) => c[1]);
|
|
165
165
|
for (const c of h) if (i.has(c)) return c;
|
|
166
|
-
for (const c of
|
|
166
|
+
for (const c of ld) if (i.has(c)) return c;
|
|
167
167
|
return "id";
|
|
168
168
|
}
|
|
169
|
-
const
|
|
169
|
+
const Hi = (n) => typeof n == "string" ? n : n.key, Gi = {
|
|
170
170
|
red: "text-red-600 dark:text-red-400 font-semibold",
|
|
171
171
|
amber: "text-amber-600 dark:text-amber-400 font-semibold",
|
|
172
172
|
green: "text-emerald-600 dark:text-emerald-400 font-semibold",
|
|
@@ -213,7 +213,7 @@ const Pf = [
|
|
|
213
213
|
{ label: "Relative time", cfg: { type: "datetime", template: "relative" } },
|
|
214
214
|
{ label: "Yes / No", cfg: { type: "boolean", true_label: "Yes", false_label: "No" } },
|
|
215
215
|
{ label: "Count (related)", cfg: { type: "count" } }
|
|
216
|
-
], Qe = (n) => n.replace(/_/g, " ").replace(/\b\w/g, (i) => i.toUpperCase()),
|
|
216
|
+
], Qe = (n) => n.replace(/_/g, " ").replace(/\b\w/g, (i) => i.toUpperCase()), ld = ["name", "title", "label", "display_name", "subject", "email", "slug"];
|
|
217
217
|
function cl(n, i) {
|
|
218
218
|
if (!n) return i === "id" ? null : `id,${i}`;
|
|
219
219
|
const h = [...n.matchAll(/\{\{([\w.]+)\}\}/g)].map((c) => c[1]);
|
|
@@ -221,7 +221,7 @@ function cl(n, i) {
|
|
|
221
221
|
}
|
|
222
222
|
function Dr(n, i) {
|
|
223
223
|
if (!n) {
|
|
224
|
-
for (const h of
|
|
224
|
+
for (const h of ld) {
|
|
225
225
|
const c = i[h];
|
|
226
226
|
if (c != null && c !== "") return String(c);
|
|
227
227
|
}
|
|
@@ -250,8 +250,8 @@ function Df(n) {
|
|
|
250
250
|
const C = Math.floor(y / 24);
|
|
251
251
|
return C < 7 ? `${C}d ago` : i.toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" });
|
|
252
252
|
}
|
|
253
|
-
const St = (n) => n.toLocaleString("en-US"),
|
|
254
|
-
function
|
|
253
|
+
const St = (n) => n.toLocaleString("en-US"), od = /* @__PURE__ */ new Set(["nivaro_users", "directus_users"]), zt = (n) => n.startsWith("directus_") || n.startsWith("nivaro_"), al = /* @__PURE__ */ new Map();
|
|
254
|
+
function id(n, i, h, c = []) {
|
|
255
255
|
const y = c.length > 0 ? `${i}\0${c.join(",")}` : i;
|
|
256
256
|
let C = al.get(y);
|
|
257
257
|
C || (C = { ids: /* @__PURE__ */ new Set(), waiters: [], promise: null }, al.set(y, C));
|
|
@@ -323,21 +323,21 @@ function Af({ summary: n }) {
|
|
|
323
323
|
);
|
|
324
324
|
}
|
|
325
325
|
function pl({ relatedCollection: n, id: i }) {
|
|
326
|
-
return
|
|
326
|
+
return ym(n) ? /* @__PURE__ */ a(F0, { id: i }) : /* @__PURE__ */ a(If, { relatedCollection: n, id: i });
|
|
327
327
|
}
|
|
328
328
|
function If({
|
|
329
329
|
relatedCollection: n,
|
|
330
330
|
id: i
|
|
331
331
|
}) {
|
|
332
|
-
const h = en(), c =
|
|
332
|
+
const h = en(), c = od.has(n), y = i != null && i !== "", { data: C, isPending: q } = te({
|
|
333
333
|
queryKey: ["cbv-collection-meta", n],
|
|
334
334
|
queryFn: () => h.request(X(`/collections/${n}`)).then((O) => O.data),
|
|
335
335
|
staleTime: 10 * 6e4,
|
|
336
336
|
enabled: !zt(n),
|
|
337
337
|
retry: !1
|
|
338
|
-
}), E =
|
|
338
|
+
}), E = _m(C == null ? void 0 : C.display_template), $ = zt(n) || !q, { data: F, isLoading: Q } = te({
|
|
339
339
|
queryKey: ["cbv-relation-item", n, String(i), E.join(",")],
|
|
340
|
-
queryFn: () => c ? h.request(X(`/users/${i}`)).then((O) => O.data) :
|
|
340
|
+
queryFn: () => c ? h.request(X(`/users/${i}`)).then((O) => O.data) : id(h, n, String(i), E),
|
|
341
341
|
enabled: y && $ && (c || !zt(n)),
|
|
342
342
|
staleTime: 30 * 6e4,
|
|
343
343
|
retry: !1
|
|
@@ -346,7 +346,7 @@ function If({
|
|
|
346
346
|
if (Q || !$)
|
|
347
347
|
return /* @__PURE__ */ a("span", { className: "inline-block h-3.5 w-24 animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" });
|
|
348
348
|
if (!F) {
|
|
349
|
-
const O =
|
|
349
|
+
const O = X0(null);
|
|
350
350
|
return /* @__PURE__ */ a(
|
|
351
351
|
"span",
|
|
352
352
|
{
|
|
@@ -365,10 +365,10 @@ function If({
|
|
|
365
365
|
/* @__PURE__ */ a(vf, { collection: n, id: i, disabled: c, side: "right", children: /* @__PURE__ */ a("span", { className: "text-[12px] text-slate-700 dark:text-slate-200", children: U }) })
|
|
366
366
|
);
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function dd(n, i, h, c, y, C) {
|
|
369
369
|
const q = i.getQueryData(["cbv-collection-meta", h]);
|
|
370
|
-
return
|
|
371
|
-
|
|
370
|
+
return Zp(
|
|
371
|
+
em(n, h, q, c, y).then(
|
|
372
372
|
(E) => window.location.origin + C({ collection: h, itemId: E })
|
|
373
373
|
)
|
|
374
374
|
).catch(() => {
|
|
@@ -412,8 +412,8 @@ function Bf({
|
|
|
412
412
|
disabled: U = !1,
|
|
413
413
|
label: O
|
|
414
414
|
}) {
|
|
415
|
-
var
|
|
416
|
-
const S = en(), f = Ar(), { isAdmin: ne } = Or(), L =
|
|
415
|
+
var Ot, ht, $t, Gt, ga, Pt, xa, lt, va, qn, Tn, Ze, vn, Dt, bt, ya, Vn, Qa, Hn, yn;
|
|
416
|
+
const S = en(), f = Ar(), { isAdmin: ne } = Or(), L = rd(), N = il({
|
|
417
417
|
label: O,
|
|
418
418
|
meta: f.getQueryData(["cbv-collection-meta", n]),
|
|
419
419
|
row: F,
|
|
@@ -428,10 +428,10 @@ function Bf({
|
|
|
428
428
|
queryFn: () => S.request(X("/security/my/permissions")).then((b) => b.data),
|
|
429
429
|
enabled: M && !ne,
|
|
430
430
|
staleTime: 5 * 6e4
|
|
431
|
-
}), Ie =
|
|
431
|
+
}), Ie = J0(n, String(i), {
|
|
432
432
|
enabled: M && ne,
|
|
433
433
|
onDone: () => g(!1)
|
|
434
|
-
}), [
|
|
434
|
+
}), [Ft, ct] = w(!1), Et = M0(M), on = A0() && !!(Et != null && Et.some((b) => b.collection === n));
|
|
435
435
|
se(() => {
|
|
436
436
|
if (!M) return;
|
|
437
437
|
const b = (R) => {
|
|
@@ -453,14 +453,14 @@ function Bf({
|
|
|
453
453
|
}), Y = oe(
|
|
454
454
|
() => ((we == null ? void 0 : we.available_transitions) ?? []).filter((b) => b.in_row_menu !== !1),
|
|
455
455
|
[we]
|
|
456
|
-
), { data: _e } =
|
|
456
|
+
), { data: _e } = Pm(M ? [n] : []), We = Nu({
|
|
457
457
|
isAdmin: ne,
|
|
458
458
|
roleMayDelete: jf(He, n),
|
|
459
|
-
builtinOpen: _e ? (_e[n] ?? []).some((b) => b.source === "builtin" && b.key === "delete") &&
|
|
459
|
+
builtinOpen: _e ? (_e[n] ?? []).some((b) => b.source === "builtin" && b.key === "delete") && Dm(Q, n, "delete") : void 0,
|
|
460
460
|
hasPipeline: h,
|
|
461
461
|
run: h ? we === void 0 ? void 0 : we : null
|
|
462
462
|
}), ie = oe(
|
|
463
|
-
() => M ?
|
|
463
|
+
() => M ? Mm(_e, [n], Q).filter(
|
|
464
464
|
// Transition-kind registry actions (Cancel / Uncancel) are the pipeline
|
|
465
465
|
// transitions already listed above — never the same move twice.
|
|
466
466
|
(b) => b.kind !== "builtin" && b.kind !== "transition"
|
|
@@ -487,8 +487,8 @@ function Bf({
|
|
|
487
487
|
return !((R = P.guard) != null && R.length);
|
|
488
488
|
});
|
|
489
489
|
const b = { ...v ?? {}, ...F ?? {} };
|
|
490
|
-
return ie.filter((P) =>
|
|
491
|
-
}, [ie, ut, v, F]), { pushActions: me, failedPartners: Ge } =
|
|
490
|
+
return ie.filter((P) => Am(P.guard, b) !== !1);
|
|
491
|
+
}, [ie, ut, v, F]), { pushActions: me, failedPartners: Ge } = Vm({
|
|
492
492
|
collection: n,
|
|
493
493
|
id: i,
|
|
494
494
|
open: M,
|
|
@@ -527,7 +527,7 @@ function Bf({
|
|
|
527
527
|
se(() => {
|
|
528
528
|
M || (st(null), bn(""), ct(!1));
|
|
529
529
|
}, [M]);
|
|
530
|
-
const Me = ((
|
|
530
|
+
const Me = ((Ot = W == null ? void 0 : W.push) == null ? void 0 : Ot.kind) === "push" && W.push.action.choose ? W.push.action : null, Ke = te({
|
|
531
531
|
queryKey: ["item-action-choices", (Me == null ? void 0 : Me.id) ?? null, n, String(i)],
|
|
532
532
|
queryFn: () => S.request(
|
|
533
533
|
X(`/item-actions/${Me.id}/choices`, { collection: n, item: String(i) })
|
|
@@ -537,7 +537,7 @@ function Bf({
|
|
|
537
537
|
}), [gn, xn] = w(null), _ = (Me == null ? void 0 : Me.id) ?? null;
|
|
538
538
|
se(() => xn(null), [_]);
|
|
539
539
|
const ee = Ke.data ? Ff(Ke.data) : null, he = ee && !ee.ask ? ee.value : gn, ge = !!Me && (!ee || ee.ask && gn == null);
|
|
540
|
-
|
|
540
|
+
tu.useLayoutEffect(() => {
|
|
541
541
|
var ot;
|
|
542
542
|
if (!M) return;
|
|
543
543
|
const b = K.current;
|
|
@@ -563,7 +563,7 @@ function Bf({
|
|
|
563
563
|
Fe.success(R ? `${N.name} moved to ${hn(R)}` : `${N.name} moved`), Er(f, n), Ki(f, n, [i]), $ == null || $();
|
|
564
564
|
},
|
|
565
565
|
onError: (b) => Fe.error(
|
|
566
|
-
|
|
566
|
+
ja(b, "Transition failed"),
|
|
567
567
|
Fr(b, { action: "Transition" })
|
|
568
568
|
)
|
|
569
569
|
}), Te = Wt({
|
|
@@ -580,7 +580,7 @@ function Bf({
|
|
|
580
580
|
return;
|
|
581
581
|
}
|
|
582
582
|
if (!P.succeeded && P.skipped) {
|
|
583
|
-
const kn = (mt = (ot = P.outcomes) == null ? void 0 : ot.find((
|
|
583
|
+
const kn = (mt = (ot = P.outcomes) == null ? void 0 : ot.find((Wa) => Wa.outcome === "skip")) == null ? void 0 : mt.reason;
|
|
584
584
|
Fe.info(`${N.name}: ${kn ?? "nothing to change"}`);
|
|
585
585
|
return;
|
|
586
586
|
}
|
|
@@ -588,10 +588,10 @@ function Bf({
|
|
|
588
588
|
},
|
|
589
589
|
onError: (b) => {
|
|
590
590
|
const P = b.response;
|
|
591
|
-
Fe.error((P == null ? void 0 : P.error) ??
|
|
591
|
+
Fe.error((P == null ? void 0 : P.error) ?? ja(b, "Action failed"), Fr(b));
|
|
592
592
|
}
|
|
593
593
|
}), dn = Wt({
|
|
594
|
-
mutationFn: ({ op: b, note: P, pick: R }) =>
|
|
594
|
+
mutationFn: ({ op: b, note: P, pick: R }) => Hm(S, n, i, b, P, R).then((Le) => ({ op: b, outcome: Le })),
|
|
595
595
|
onSuccess: ({ op: b, outcome: P }) => {
|
|
596
596
|
g(!1);
|
|
597
597
|
const R = b.kind === "push" ? b.action.label : "Retry";
|
|
@@ -609,7 +609,7 @@ function Bf({
|
|
|
609
609
|
},
|
|
610
610
|
onError: (b) => {
|
|
611
611
|
const P = b.response;
|
|
612
|
-
Fe.error((P == null ? void 0 : P.error) ??
|
|
612
|
+
Fe.error((P == null ? void 0 : P.error) ?? ja(b, "Push failed"), Fr(b));
|
|
613
613
|
}
|
|
614
614
|
}), tn = !!W && !W.push && pt.trim().length === 0 && (W.action ? W.action.require_reason : ((ht = Y.find((b) => b.id === W.picked)) == null ? void 0 : ht.comment_mode) === "required"), _t = (b, P, R = !1) => /* @__PURE__ */ a(
|
|
615
615
|
"button",
|
|
@@ -637,11 +637,11 @@ function Bf({
|
|
|
637
637
|
className: "inline-flex h-6 items-center gap-1 rounded border border-slate-200 bg-white px-2 text-[11px] font-medium text-slate-600 hover:border-slate-300 hover:text-slate-800 disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:border-slate-200 disabled:hover:text-slate-600 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-300 dark:hover:text-slate-100 dark:disabled:hover:border-slate-700 dark:disabled:hover:text-slate-300",
|
|
638
638
|
children: [
|
|
639
639
|
"Actions",
|
|
640
|
-
/* @__PURE__ */ a(
|
|
640
|
+
/* @__PURE__ */ a(Ua, { "aria-hidden": !0, className: "h-3 w-3 text-slate-400" })
|
|
641
641
|
]
|
|
642
642
|
}
|
|
643
643
|
),
|
|
644
|
-
M &&
|
|
644
|
+
M && nd(
|
|
645
645
|
/* @__PURE__ */ a(
|
|
646
646
|
"div",
|
|
647
647
|
{
|
|
@@ -666,7 +666,7 @@ function Bf({
|
|
|
666
666
|
{
|
|
667
667
|
className: "mb-1.5 px-1 text-[11.5px] leading-snug text-slate-500 dark:text-slate-400",
|
|
668
668
|
"data-row-action-sentence": !0,
|
|
669
|
-
children:
|
|
669
|
+
children: ou(W.action, N.name)
|
|
670
670
|
}
|
|
671
671
|
),
|
|
672
672
|
W.push && /* @__PURE__ */ a(
|
|
@@ -711,9 +711,9 @@ function Bf({
|
|
|
711
711
|
{
|
|
712
712
|
value: pt,
|
|
713
713
|
onChange: (b) => bn(b.target.value),
|
|
714
|
-
placeholder: ((ga = W.push) == null ? void 0 : ga.kind) === "push" ? ((xa = (
|
|
714
|
+
placeholder: ((ga = W.push) == null ? void 0 : ga.kind) === "push" ? ((xa = (Pt = W.push.action.confirm) == null ? void 0 : Pt.input) == null ? void 0 : xa.placeholder) ?? ((va = (lt = W.push.action.confirm) == null ? void 0 : lt.input) == null ? void 0 : va.label) ?? "" : (qn = W.action) != null && qn.require_reason || ((Tn = Y.find((b) => b.id === W.picked)) == null ? void 0 : Tn.comment_mode) === "required" ? "Reason (required — recorded on the record’s history)…" : "Reason (optional)…",
|
|
715
715
|
rows: 2,
|
|
716
|
-
"aria-label": ((Ze = W.push) == null ? void 0 : Ze.kind) === "push" ? ((
|
|
716
|
+
"aria-label": ((Ze = W.push) == null ? void 0 : Ze.kind) === "push" ? ((Dt = (vn = W.push.action.confirm) == null ? void 0 : vn.input) == null ? void 0 : Dt.label) ?? "Note" : "Reason",
|
|
717
717
|
"aria-describedby": tn ? `row-reason-hint-${String(i)}` : void 0,
|
|
718
718
|
className: "w-full resize-none rounded-md border border-slate-200 bg-white px-2 py-1.5 text-[12px] outline-none focus:border-nvr-cyan/50 dark:border-slate-700 dark:bg-slate-800 dark:text-slate-100"
|
|
719
719
|
}
|
|
@@ -732,13 +732,13 @@ function Bf({
|
|
|
732
732
|
"button",
|
|
733
733
|
{
|
|
734
734
|
type: "button",
|
|
735
|
-
disabled: W.push ? dn.isPending || ge || W.push.kind === "push" && !!((ya = (bt = W.push.action.confirm) == null ? void 0 : bt.input) != null && ya.required) && pt.trim().length === 0 : W.action ? Te.isPending || W.action.require_reason && pt.trim().length === 0 : !W.picked || je.isPending || ((
|
|
735
|
+
disabled: W.push ? dn.isPending || ge || W.push.kind === "push" && !!((ya = (bt = W.push.action.confirm) == null ? void 0 : bt.input) != null && ya.required) && pt.trim().length === 0 : W.action ? Te.isPending || W.action.require_reason && pt.trim().length === 0 : !W.picked || je.isPending || ((Vn = Y.find((b) => b.id === W.picked)) == null ? void 0 : Vn.comment_mode) === "required" && pt.trim().length === 0,
|
|
736
736
|
onClick: () => {
|
|
737
737
|
W.push ? dn.mutate({ op: W.push, note: pt, pick: he }) : W.action ? Te.mutate({ action: W.action, comment: pt }) : W.picked && je.mutate({ transitionId: W.picked, comment: pt });
|
|
738
738
|
},
|
|
739
739
|
"data-row-action-confirm": !0,
|
|
740
|
-
className: `h-7 flex-1 rounded-md text-[12px] font-semibold text-white disabled:opacity-40 ${((
|
|
741
|
-
children: je.isPending || Te.isPending || dn.isPending ? "Applying…" : ((
|
|
740
|
+
className: `h-7 flex-1 rounded-md text-[12px] font-semibold text-white disabled:opacity-40 ${((Qa = W.action) == null ? void 0 : Qa.variant) === "danger" ? "bg-red-600" : "bg-nvr-cyan"}`,
|
|
741
|
+
children: je.isPending || Te.isPending || dn.isPending ? "Applying…" : ((Hn = W.push) == null ? void 0 : Hn.kind) === "push" ? ((yn = W.push.action.confirm) == null ? void 0 : yn.confirm_label) ?? "Send" : W.push ? "Retry" : "Confirm"
|
|
742
742
|
}
|
|
743
743
|
),
|
|
744
744
|
/* @__PURE__ */ a(
|
|
@@ -769,7 +769,7 @@ function Bf({
|
|
|
769
769
|
});
|
|
770
770
|
}),
|
|
771
771
|
on && _t("Discuss in chat", () => {
|
|
772
|
-
g(!1),
|
|
772
|
+
g(!1), I0(S, n, String(i)).then((b) => {
|
|
773
773
|
b || Fe.error("This record has no chat room you can open");
|
|
774
774
|
}).catch(() => Fe.error("Could not open the chat room"));
|
|
775
775
|
}),
|
|
@@ -880,7 +880,7 @@ function Bf({
|
|
|
880
880
|
g(!1), (b = navigator.clipboard) == null || b.writeText(N.copy ?? ""), Fe.success("ID copied");
|
|
881
881
|
}),
|
|
882
882
|
_t("Copy link", () => {
|
|
883
|
-
g(!1),
|
|
883
|
+
g(!1), dd(S, f, n, F, i, q), Fe.success("Link copied");
|
|
884
884
|
}),
|
|
885
885
|
ne && /* @__PURE__ */ d(Je, { children: [
|
|
886
886
|
Ht,
|
|
@@ -908,7 +908,7 @@ function Bf({
|
|
|
908
908
|
] }),
|
|
909
909
|
We && /* @__PURE__ */ d(Je, { children: [
|
|
910
910
|
Ht,
|
|
911
|
-
|
|
911
|
+
Ft ? /* @__PURE__ */ d("div", { className: "px-3 py-1.5", "data-row-delete-confirm": !0, children: [
|
|
912
912
|
/* @__PURE__ */ d("p", { className: "text-[11.5px] leading-snug text-slate-600 dark:text-slate-300", children: [
|
|
913
913
|
"Delete ",
|
|
914
914
|
N.name,
|
|
@@ -948,7 +948,7 @@ function Bf({
|
|
|
948
948
|
function rl(n) {
|
|
949
949
|
return n === "id" || /(^|_)id$/i.test(n) || /(^|_)uuid$/i.test(n);
|
|
950
950
|
}
|
|
951
|
-
function
|
|
951
|
+
function Yi({
|
|
952
952
|
collection: n,
|
|
953
953
|
field: i,
|
|
954
954
|
fieldType: h,
|
|
@@ -961,8 +961,8 @@ function Gi({
|
|
|
961
961
|
return /* @__PURE__ */ a(pl, { relatedCollection: q.one_collection, id: y });
|
|
962
962
|
if (y == null) return /* @__PURE__ */ a("span", { className: "text-[12px] text-slate-300", children: "—" });
|
|
963
963
|
const E = c ?? { field: i, type: h }, $ = Of(E);
|
|
964
|
-
if ((typeof y == "number" || typeof y == "string" && $) && $ !== "plain" &&
|
|
965
|
-
const F =
|
|
964
|
+
if ((typeof y == "number" || typeof y == "string" && $) && $ !== "plain" && Ip(y) != null) {
|
|
965
|
+
const F = Kp(y, E);
|
|
966
966
|
if (F && F !== String(y).trim())
|
|
967
967
|
return /* @__PURE__ */ a("span", { className: "text-[12px] tabular-nums text-slate-700 dark:text-slate-200", children: F });
|
|
968
968
|
}
|
|
@@ -1074,7 +1074,7 @@ function Ir({
|
|
|
1074
1074
|
children: "✕"
|
|
1075
1075
|
}
|
|
1076
1076
|
),
|
|
1077
|
-
/* @__PURE__ */ a(
|
|
1077
|
+
/* @__PURE__ */ a(Ua, { "aria-hidden": !0, className: "h-3 w-3 shrink-0 text-slate-400" })
|
|
1078
1078
|
]
|
|
1079
1079
|
}
|
|
1080
1080
|
),
|
|
@@ -1126,12 +1126,12 @@ function Uf({
|
|
|
1126
1126
|
staleTime: 10 * 6e4,
|
|
1127
1127
|
enabled: $,
|
|
1128
1128
|
retry: !1
|
|
1129
|
-
}), S =
|
|
1129
|
+
}), S = Ba(O), f = (O == null ? void 0 : O.display_template) ?? null, { data: ne = [], isLoading: L } = te({
|
|
1130
1130
|
// Own key shape (an array of {value,label}) — 'cbv-filter-options' held the
|
|
1131
1131
|
// page-only list; a new name keeps an old cached entry from answering.
|
|
1132
1132
|
queryKey: ["cbv-filter-options-all", n, S, f ?? "", F, U],
|
|
1133
1133
|
queryFn: async () => {
|
|
1134
|
-
const H =
|
|
1134
|
+
const H = P0({
|
|
1135
1135
|
search: F,
|
|
1136
1136
|
preferIds: y,
|
|
1137
1137
|
labelField: S,
|
|
@@ -1144,7 +1144,7 @@ function Uf({
|
|
|
1144
1144
|
(He) => C.request(X(`/items/${n}`, He)).then((Ie) => I(Ie.data ?? []))
|
|
1145
1145
|
)
|
|
1146
1146
|
);
|
|
1147
|
-
return
|
|
1147
|
+
return D0(K);
|
|
1148
1148
|
},
|
|
1149
1149
|
staleTime: 10 * 6e4,
|
|
1150
1150
|
enabled: $ && !!O,
|
|
@@ -1239,7 +1239,7 @@ function Wf({
|
|
|
1239
1239
|
var f;
|
|
1240
1240
|
if (!n) return "All";
|
|
1241
1241
|
const S = Pr(n);
|
|
1242
|
-
return S ?
|
|
1242
|
+
return S ? ku(S) : ((f = Mr.find((ne) => ne.value === n)) == null ? void 0 : f.label) ?? n;
|
|
1243
1243
|
})(), [Q, U] = w("between");
|
|
1244
1244
|
se(() => {
|
|
1245
1245
|
var S;
|
|
@@ -1247,7 +1247,7 @@ function Wf({
|
|
|
1247
1247
|
}, [h, n]);
|
|
1248
1248
|
const O = () => {
|
|
1249
1249
|
const S = y || q;
|
|
1250
|
-
S && (i(
|
|
1250
|
+
S && (i(_u({ op: Q, from: S, to: q || y || S })), c(!1));
|
|
1251
1251
|
};
|
|
1252
1252
|
return /* @__PURE__ */ d("div", { ref: $, className: "relative w-full", children: [
|
|
1253
1253
|
/* @__PURE__ */ d(
|
|
@@ -1273,7 +1273,7 @@ function Wf({
|
|
|
1273
1273
|
children: "✕"
|
|
1274
1274
|
}
|
|
1275
1275
|
),
|
|
1276
|
-
/* @__PURE__ */ a(
|
|
1276
|
+
/* @__PURE__ */ a(Ua, { "aria-hidden": !0, className: "h-3 w-3 shrink-0 text-slate-400" })
|
|
1277
1277
|
]
|
|
1278
1278
|
}
|
|
1279
1279
|
),
|
|
@@ -1292,7 +1292,7 @@ function Wf({
|
|
|
1292
1292
|
)) }),
|
|
1293
1293
|
/* @__PURE__ */ d("div", { className: "border-t border-slate-100 p-2 dark:border-slate-800", children: [
|
|
1294
1294
|
/* @__PURE__ */ a("p", { className: "pb-1 text-[10px] font-semibold uppercase tracking-wide text-slate-400", children: "Date or range" }),
|
|
1295
|
-
/* @__PURE__ */ a("div", { className: "grid grid-cols-3 gap-1 pb-1.5", children:
|
|
1295
|
+
/* @__PURE__ */ a("div", { className: "grid grid-cols-3 gap-1 pb-1.5", children: wu.map((S) => /* @__PURE__ */ a(
|
|
1296
1296
|
"button",
|
|
1297
1297
|
{
|
|
1298
1298
|
type: "button",
|
|
@@ -1363,9 +1363,9 @@ function zf({
|
|
|
1363
1363
|
i.map(String).sort().join(",")
|
|
1364
1364
|
],
|
|
1365
1365
|
queryFn: async () => {
|
|
1366
|
-
const L = U !== "[]" ?
|
|
1366
|
+
const L = U !== "[]" ? Gp(
|
|
1367
1367
|
n.collection,
|
|
1368
|
-
await
|
|
1368
|
+
await Yp(q, E, n.collection),
|
|
1369
1369
|
C
|
|
1370
1370
|
) : null, N = (H, I) => q.request(
|
|
1371
1371
|
X(`/items/${n.collection}`, {
|
|
@@ -1412,7 +1412,7 @@ function zf({
|
|
|
1412
1412
|
}
|
|
1413
1413
|
);
|
|
1414
1414
|
}
|
|
1415
|
-
const
|
|
1415
|
+
const cd = [
|
|
1416
1416
|
{ value: "_eq", label: "=" },
|
|
1417
1417
|
{ value: "_neq", label: "≠" },
|
|
1418
1418
|
{ value: "_gt", label: ">" },
|
|
@@ -1440,7 +1440,7 @@ const dd = [
|
|
|
1440
1440
|
_lt: "_gte",
|
|
1441
1441
|
_lte: "_gt"
|
|
1442
1442
|
};
|
|
1443
|
-
function
|
|
1443
|
+
function ud(n) {
|
|
1444
1444
|
const i = /* @__PURE__ */ new Date(), h = (y) => y.toISOString().slice(0, 10), c = h(i);
|
|
1445
1445
|
if (n === "today") return { from: c, to: c };
|
|
1446
1446
|
if (n === "7d" || n === "30d" || n === "90d") {
|
|
@@ -1453,8 +1453,8 @@ function sl(n) {
|
|
|
1453
1453
|
var h;
|
|
1454
1454
|
const i = [];
|
|
1455
1455
|
for (const c of n) {
|
|
1456
|
-
if (
|
|
1457
|
-
i.push(
|
|
1456
|
+
if (zn(c)) {
|
|
1457
|
+
i.push(r0(c));
|
|
1458
1458
|
continue;
|
|
1459
1459
|
}
|
|
1460
1460
|
const y = c.fieldType === "date" || c.fieldType === "datetime" || c.fieldType === "timestamp";
|
|
@@ -1468,12 +1468,12 @@ function sl(n) {
|
|
|
1468
1468
|
E && i.push({ path: c.path, op: "_gte", value: E }), $ && i.push({ path: c.path, op: "_lte", value: y ? `${$}T23:59:59` : $ });
|
|
1469
1469
|
continue;
|
|
1470
1470
|
}
|
|
1471
|
-
if ((h = c.path[0]) != null && h.startsWith("$has_") || c.path[0] === "$missing_required" || c.path[0] === "$unseen" ||
|
|
1471
|
+
if ((h = c.path[0]) != null && h.startsWith("$has_") || c.path[0] === "$missing_required" || c.path[0] === "$unseen" || $n(c)) {
|
|
1472
1472
|
i.push({ path: c.path, op: "_eq", value: !c.not });
|
|
1473
1473
|
continue;
|
|
1474
1474
|
}
|
|
1475
1475
|
if (c.op === "_preset") {
|
|
1476
|
-
const E =
|
|
1476
|
+
const E = ud(String(c.value));
|
|
1477
1477
|
E && (c.not ? i.push({
|
|
1478
1478
|
or: [
|
|
1479
1479
|
{ path: c.path, op: "_lt", value: E.from },
|
|
@@ -1487,7 +1487,7 @@ function sl(n) {
|
|
|
1487
1487
|
}
|
|
1488
1488
|
return i;
|
|
1489
1489
|
}
|
|
1490
|
-
const
|
|
1490
|
+
const Ji = [
|
|
1491
1491
|
{ label: "Contains", value: "_contains" },
|
|
1492
1492
|
{ label: "Doesn't contain", value: "_ncontains" },
|
|
1493
1493
|
{ label: "Equals", value: "_eq" },
|
|
@@ -1512,8 +1512,8 @@ const Yi = [
|
|
|
1512
1512
|
{ label: "Is empty", value: "_null" },
|
|
1513
1513
|
{ label: "Is not empty", value: "_nnull" }
|
|
1514
1514
|
], Hf = {
|
|
1515
|
-
string:
|
|
1516
|
-
text:
|
|
1515
|
+
string: Ji,
|
|
1516
|
+
text: Ji,
|
|
1517
1517
|
integer: ll,
|
|
1518
1518
|
decimal: ll,
|
|
1519
1519
|
float: ll,
|
|
@@ -1601,7 +1601,7 @@ function ml({
|
|
|
1601
1601
|
}
|
|
1602
1602
|
),
|
|
1603
1603
|
f && L && /* @__PURE__ */ a(
|
|
1604
|
-
|
|
1604
|
+
pd,
|
|
1605
1605
|
{
|
|
1606
1606
|
aliasInfo: f,
|
|
1607
1607
|
depth: i + 1,
|
|
@@ -1614,7 +1614,7 @@ function ml({
|
|
|
1614
1614
|
] }, O.field);
|
|
1615
1615
|
}) });
|
|
1616
1616
|
}
|
|
1617
|
-
function
|
|
1617
|
+
function pd({
|
|
1618
1618
|
aliasInfo: n,
|
|
1619
1619
|
depth: i,
|
|
1620
1620
|
path: h,
|
|
@@ -1650,7 +1650,7 @@ function ud({
|
|
|
1650
1650
|
}
|
|
1651
1651
|
) : /* @__PURE__ */ a("div", { className: "px-3 py-1.5", style: { paddingLeft: `${0.5 + i}rem` }, children: /* @__PURE__ */ a("span", { className: "inline-block h-3 w-20 animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" }) });
|
|
1652
1652
|
}
|
|
1653
|
-
function
|
|
1653
|
+
function Xi(n, i, h) {
|
|
1654
1654
|
if (i) return "relation";
|
|
1655
1655
|
const c = n.type ?? "string";
|
|
1656
1656
|
return c === "integer" || c === "decimal" || c === "float" ? "number" : c === "datetime" || c === "timestamp" ? "date" : c;
|
|
@@ -1683,7 +1683,7 @@ function Yf({
|
|
|
1683
1683
|
}
|
|
1684
1684
|
}
|
|
1685
1685
|
return [...N].slice(0, 12);
|
|
1686
|
-
}, [$, n]), Q =
|
|
1686
|
+
}, [$, n]), Q = Ka({
|
|
1687
1687
|
queries: F.map((N) => ({
|
|
1688
1688
|
queryKey: ["cbv-collection-meta", N],
|
|
1689
1689
|
queryFn: () => E.request(X(`/collections/${N}`)).then((M) => M.data),
|
|
@@ -1734,7 +1734,7 @@ function Yf({
|
|
|
1734
1734
|
} else S(M) && f.push({
|
|
1735
1735
|
key: N.field,
|
|
1736
1736
|
label: M,
|
|
1737
|
-
hint:
|
|
1737
|
+
hint: Xi(N, void 0),
|
|
1738
1738
|
leaf: { path: H, pathLabels: I, fieldType: N.type ?? "string" }
|
|
1739
1739
|
});
|
|
1740
1740
|
}
|
|
@@ -1756,7 +1756,7 @@ function Yf({
|
|
|
1756
1756
|
key: `${N.field}.${H.field}`,
|
|
1757
1757
|
label: I,
|
|
1758
1758
|
breadcrumb: J,
|
|
1759
|
-
hint:
|
|
1759
|
+
hint: Xi(H, K ?? void 0),
|
|
1760
1760
|
leaf: {
|
|
1761
1761
|
path: [...i, N.field, H.field],
|
|
1762
1762
|
pathLabels: [...h, J, I],
|
|
@@ -1816,7 +1816,7 @@ function Jf({
|
|
|
1816
1816
|
queryFn: () => y.request(X(`/collections/${n}`)).then((f) => f.data),
|
|
1817
1817
|
staleTime: 10 * 6e4,
|
|
1818
1818
|
retry: !1
|
|
1819
|
-
}), $ =
|
|
1819
|
+
}), $ = Ba(E), F = (E == null ? void 0 : E.display_template) ?? null, { data: Q = [], isLoading: U } = te({
|
|
1820
1820
|
queryKey: ["cbv-filter-options", n, $, F ?? ""],
|
|
1821
1821
|
queryFn: () => {
|
|
1822
1822
|
const f = cl(F, $);
|
|
@@ -1876,7 +1876,7 @@ function Jf({
|
|
|
1876
1876
|
] })
|
|
1877
1877
|
] });
|
|
1878
1878
|
}
|
|
1879
|
-
function
|
|
1879
|
+
function md(n) {
|
|
1880
1880
|
var h, c;
|
|
1881
1881
|
const i = n.pathLabels.join(" › ");
|
|
1882
1882
|
if (Array.isArray(n.value)) {
|
|
@@ -1895,7 +1895,7 @@ function pd(n) {
|
|
|
1895
1895
|
const y = ((h = Mr.find((C) => C.value === n.value)) == null ? void 0 : h.label) ?? String(n.value);
|
|
1896
1896
|
return { field: i, op: "in the", value: `${y} (rolling)` };
|
|
1897
1897
|
}
|
|
1898
|
-
return (c = n.path[0]) != null && c.startsWith("$has_") || n.path[0] === "$missing_required" ||
|
|
1898
|
+
return (c = n.path[0]) != null && c.startsWith("$has_") || n.path[0] === "$missing_required" || $n(n) ? { field: i, op: "", value: "" } : { field: i, op: Gf(n.op).toLowerCase(), value: String(n.value ?? "") };
|
|
1899
1899
|
}
|
|
1900
1900
|
function Xf({
|
|
1901
1901
|
collection: n,
|
|
@@ -1909,12 +1909,12 @@ function Xf({
|
|
|
1909
1909
|
collection: n,
|
|
1910
1910
|
path: [],
|
|
1911
1911
|
pathLabels: []
|
|
1912
|
-
}), [O, S] = w(null), [f, ne] = w("_contains"), [L, N] = w(""), [M, g] = w(""), [J, H] = w([]), [I, K] = w({}), [He, Ie] = w(null),
|
|
1912
|
+
}), [O, S] = w(null), [f, ne] = w("_contains"), [L, N] = w(""), [M, g] = w(""), [J, H] = w([]), [I, K] = w({}), [He, Ie] = w(null), Ft = Z(null);
|
|
1913
1913
|
se(() => {
|
|
1914
1914
|
if (!q) return;
|
|
1915
1915
|
const v = (me) => {
|
|
1916
1916
|
var Ge;
|
|
1917
|
-
(Ge =
|
|
1917
|
+
(Ge = Ft.current) != null && Ge.contains(me.target) || E(!1);
|
|
1918
1918
|
}, ae = (me) => {
|
|
1919
1919
|
me.key === "Escape" && E(!1);
|
|
1920
1920
|
};
|
|
@@ -1924,7 +1924,7 @@ function Xf({
|
|
|
1924
1924
|
}, [q]);
|
|
1925
1925
|
const ct = () => {
|
|
1926
1926
|
F(""), U({ collection: n, path: [], pathLabels: [] }), S(null), ne("_contains"), N(""), g(""), H([]), K({}), Ie(null);
|
|
1927
|
-
},
|
|
1927
|
+
}, Et = () => {
|
|
1928
1928
|
ct(), E(!0);
|
|
1929
1929
|
}, on = (v) => {
|
|
1930
1930
|
C(He ? y.map((ae) => ae.id === He ? { ...v, id: He } : ae) : [...y, { ...v, id: crypto.randomUUID() }]), E(!1), ct();
|
|
@@ -1969,7 +1969,7 @@ function Xf({
|
|
|
1969
1969
|
if (O.relTarget !== void 0) return "relation";
|
|
1970
1970
|
const v = O.fieldType;
|
|
1971
1971
|
return v === "integer" || v === "decimal" || v === "float" ? "number" : v === "date" || v === "datetime" || v === "timestamp" ? "date" : v === "boolean" ? "boolean" : "string";
|
|
1972
|
-
})(), ie =
|
|
1972
|
+
})(), ie = cd, ut = [
|
|
1973
1973
|
{ value: "_contains", label: "Contains" },
|
|
1974
1974
|
{ value: "_ncontains", label: "Doesn't contain" },
|
|
1975
1975
|
{ value: "_eq", label: "Equals" },
|
|
@@ -1987,7 +1987,7 @@ function Xf({
|
|
|
1987
1987
|
/* @__PURE__ */ d("div", { className: "flex min-w-0 max-w-[24rem] flex-1 items-center gap-2", children: [
|
|
1988
1988
|
/* @__PURE__ */ d("div", { className: "relative min-w-0 flex-1", children: [
|
|
1989
1989
|
/* @__PURE__ */ a(
|
|
1990
|
-
|
|
1990
|
+
td,
|
|
1991
1991
|
{
|
|
1992
1992
|
"aria-hidden": !0,
|
|
1993
1993
|
className: "pointer-events-none absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400"
|
|
@@ -2004,12 +2004,12 @@ function Xf({
|
|
|
2004
2004
|
}
|
|
2005
2005
|
)
|
|
2006
2006
|
] }),
|
|
2007
|
-
/* @__PURE__ */ d("div", { className: "relative shrink-0", ref:
|
|
2007
|
+
/* @__PURE__ */ d("div", { className: "relative shrink-0", ref: Ft, children: [
|
|
2008
2008
|
/* @__PURE__ */ a(
|
|
2009
2009
|
"button",
|
|
2010
2010
|
{
|
|
2011
2011
|
type: "button",
|
|
2012
|
-
onClick: () => q ? E(!1) :
|
|
2012
|
+
onClick: () => q ? E(!1) : Et(),
|
|
2013
2013
|
className: "inline-flex h-8 items-center gap-1 whitespace-nowrap rounded-md border border-dashed border-slate-300 px-2.5 text-[12.5px] text-slate-500 hover:border-slate-400 hover:text-slate-700 dark:border-slate-600 dark:text-slate-400",
|
|
2014
2014
|
children: "+ Add Filter"
|
|
2015
2015
|
}
|
|
@@ -2274,8 +2274,8 @@ function Xf({
|
|
|
2274
2274
|
] }) })
|
|
2275
2275
|
] })
|
|
2276
2276
|
] }),
|
|
2277
|
-
y.filter((v) => !
|
|
2278
|
-
const ae =
|
|
2277
|
+
y.filter((v) => !zn(v) && !$n(v)).map((v) => {
|
|
2278
|
+
const ae = md(v);
|
|
2279
2279
|
return /* @__PURE__ */ d(
|
|
2280
2280
|
"span",
|
|
2281
2281
|
{
|
|
@@ -2363,7 +2363,7 @@ function Zf({
|
|
|
2363
2363
|
}
|
|
2364
2364
|
),
|
|
2365
2365
|
F && $ && /* @__PURE__ */ a(
|
|
2366
|
-
|
|
2366
|
+
pd,
|
|
2367
2367
|
{
|
|
2368
2368
|
aliasInfo: $,
|
|
2369
2369
|
depth: 1,
|
|
@@ -2393,7 +2393,7 @@ function eh({
|
|
|
2393
2393
|
}) {
|
|
2394
2394
|
var xn;
|
|
2395
2395
|
Or();
|
|
2396
|
-
const S = en(), f = Ar(), ne =
|
|
2396
|
+
const S = en(), f = Ar(), ne = ad(), [L, N] = w(
|
|
2397
2397
|
"actions"
|
|
2398
2398
|
), [M, g] = w(!1), J = Z(!1), H = cf(n, null, i.length >= 2), I = Z(Q);
|
|
2399
2399
|
I.current = Q, se(() => {
|
|
@@ -2403,11 +2403,11 @@ function eh({
|
|
|
2403
2403
|
var _;
|
|
2404
2404
|
return (_ = I.current) == null ? void 0 : _.call(I, !1);
|
|
2405
2405
|
}, []);
|
|
2406
|
-
const K =
|
|
2406
|
+
const K = sd([n], q), { data: He = [] } = te({
|
|
2407
2407
|
queryKey: ["bulk-recipes", n],
|
|
2408
2408
|
queryFn: () => S.request(X("/bulk-recipes", { collection: n })).then((_) => _.data ?? []).catch(() => []),
|
|
2409
2409
|
staleTime: 6e4
|
|
2410
|
-
}), [Ie,
|
|
2410
|
+
}), [Ie, Ft] = w(null), [ct, Et] = w(""), on = async () => {
|
|
2411
2411
|
if (!(!Ie || !ct.trim()))
|
|
2412
2412
|
try {
|
|
2413
2413
|
await S.request(
|
|
@@ -2417,7 +2417,7 @@ function eh({
|
|
|
2417
2417
|
action_type: Ie.action_type,
|
|
2418
2418
|
config: Ie.config
|
|
2419
2419
|
})
|
|
2420
|
-
), f.invalidateQueries({ queryKey: ["bulk-recipes", n] }), Me(`Recipe "${ct.trim()}" saved`),
|
|
2420
|
+
), f.invalidateQueries({ queryKey: ["bulk-recipes", n] }), Me(`Recipe "${ct.trim()}" saved`), Ft(null), Et(""), N("actions");
|
|
2421
2421
|
} catch {
|
|
2422
2422
|
Me("Failed to save recipe");
|
|
2423
2423
|
}
|
|
@@ -2487,15 +2487,15 @@ function eh({
|
|
|
2487
2487
|
retry: !1
|
|
2488
2488
|
}), [st, pt] = w(!1), [bn, Me] = w(null), Ke = async (_) => {
|
|
2489
2489
|
pt(!0), Me(null);
|
|
2490
|
-
const ee =
|
|
2491
|
-
|
|
2490
|
+
const ee = du();
|
|
2491
|
+
cu(ee, i);
|
|
2492
2492
|
try {
|
|
2493
2493
|
const he = await _(ee);
|
|
2494
2494
|
Me(he), O(), U(), N("actions");
|
|
2495
2495
|
} catch (he) {
|
|
2496
|
-
Me(
|
|
2496
|
+
Me(Su(he, "Bulk action failed"));
|
|
2497
2497
|
} finally {
|
|
2498
|
-
|
|
2498
|
+
uu(ee), pt(!1);
|
|
2499
2499
|
}
|
|
2500
2500
|
}, gn = (_, ee) => void Ke(async (he) => {
|
|
2501
2501
|
const ge = await S.request(
|
|
@@ -2505,7 +2505,7 @@ function eh({
|
|
|
2505
2505
|
by_form: !0
|
|
2506
2506
|
})
|
|
2507
2507
|
);
|
|
2508
|
-
return
|
|
2508
|
+
return Wm(ge);
|
|
2509
2509
|
});
|
|
2510
2510
|
return /* @__PURE__ */ d(
|
|
2511
2511
|
"div",
|
|
@@ -2574,19 +2574,19 @@ function eh({
|
|
|
2574
2574
|
{
|
|
2575
2575
|
type: "button",
|
|
2576
2576
|
onClick: () => {
|
|
2577
|
-
const _ =
|
|
2577
|
+
const _ = Bp(
|
|
2578
2578
|
i.map((ee) => ne.urlFor({ collection: n, itemId: String(ee) }))
|
|
2579
2579
|
);
|
|
2580
2580
|
_.blocked > 0 || _.capped > 0 ? Fe.warning(Si(_)) : Fe.success(Si(_));
|
|
2581
2581
|
},
|
|
2582
2582
|
"data-bulk-open-tabs": !0,
|
|
2583
|
-
title: `Open the selected records in new tabs (up to ${
|
|
2583
|
+
title: `Open the selected records in new tabs (up to ${jp})`,
|
|
2584
2584
|
className: "h-8 rounded-md border border-white/20 dark:border-border px-3 text-[12.5px] font-medium hover:bg-white/10 dark:hover:bg-muted",
|
|
2585
2585
|
children: "Open in tabs"
|
|
2586
2586
|
}
|
|
2587
2587
|
),
|
|
2588
2588
|
K("compare") && /* @__PURE__ */ a(
|
|
2589
|
-
|
|
2589
|
+
Km,
|
|
2590
2590
|
{
|
|
2591
2591
|
targets: i.map((_) => ({ collection: n, id: _ })),
|
|
2592
2592
|
fields: y,
|
|
@@ -2607,7 +2607,7 @@ function eh({
|
|
|
2607
2607
|
}
|
|
2608
2608
|
),
|
|
2609
2609
|
/* @__PURE__ */ a(
|
|
2610
|
-
|
|
2610
|
+
Im,
|
|
2611
2611
|
{
|
|
2612
2612
|
targets: i.map((_) => ({ collection: n, id: _ })),
|
|
2613
2613
|
enabledKeys: q,
|
|
@@ -2619,7 +2619,7 @@ function eh({
|
|
|
2619
2619
|
}
|
|
2620
2620
|
),
|
|
2621
2621
|
K("update-field") && /* @__PURE__ */ a(
|
|
2622
|
-
|
|
2622
|
+
jm,
|
|
2623
2623
|
{
|
|
2624
2624
|
collection: n,
|
|
2625
2625
|
selectedIds: i,
|
|
@@ -2627,7 +2627,7 @@ function eh({
|
|
|
2627
2627
|
onApply: gn,
|
|
2628
2628
|
pointAt: E,
|
|
2629
2629
|
onSaveRecipe: (_, ee) => {
|
|
2630
|
-
|
|
2630
|
+
Et(""), Ft({ action_type: "update", config: { field: _, value: ee } });
|
|
2631
2631
|
},
|
|
2632
2632
|
className: "h-8 rounded-md border border-white/20 dark:border-border px-3 text-[12.5px] font-medium hover:bg-white/10 dark:hover:bg-muted disabled:opacity-40"
|
|
2633
2633
|
}
|
|
@@ -2675,7 +2675,7 @@ function eh({
|
|
|
2675
2675
|
}
|
|
2676
2676
|
),
|
|
2677
2677
|
L === "message" && /* @__PURE__ */ a(
|
|
2678
|
-
|
|
2678
|
+
zm,
|
|
2679
2679
|
{
|
|
2680
2680
|
collection: n,
|
|
2681
2681
|
selectedIds: i,
|
|
@@ -2705,7 +2705,7 @@ function eh({
|
|
|
2705
2705
|
},
|
|
2706
2706
|
children: [
|
|
2707
2707
|
/* @__PURE__ */ a(
|
|
2708
|
-
|
|
2708
|
+
Vi,
|
|
2709
2709
|
{
|
|
2710
2710
|
value: Y,
|
|
2711
2711
|
onChange: (_) => {
|
|
@@ -2720,7 +2720,7 @@ function eh({
|
|
|
2720
2720
|
}
|
|
2721
2721
|
),
|
|
2722
2722
|
v && Vt && /* @__PURE__ */ a(
|
|
2723
|
-
|
|
2723
|
+
Vi,
|
|
2724
2724
|
{
|
|
2725
2725
|
value: ae,
|
|
2726
2726
|
onChange: me,
|
|
@@ -2787,7 +2787,7 @@ function eh({
|
|
|
2787
2787
|
disabled: !Y,
|
|
2788
2788
|
onClick: () => {
|
|
2789
2789
|
const _ = v;
|
|
2790
|
-
_ && (
|
|
2790
|
+
_ && (Et(""), Ft({ action_type: "transition", config: { transition_label: _.label } }));
|
|
2791
2791
|
},
|
|
2792
2792
|
title: "Save this transition as a reusable recipe",
|
|
2793
2793
|
className: "h-8 rounded-md border border-white/20 dark:border-border px-2.5 text-[12.5px] text-slate-300 dark:text-muted-foreground hover:bg-white/10 dark:hover:bg-muted disabled:opacity-40",
|
|
@@ -2820,7 +2820,7 @@ function eh({
|
|
|
2820
2820
|
{
|
|
2821
2821
|
autoFocus: !0,
|
|
2822
2822
|
value: ct,
|
|
2823
|
-
onChange: (_) =>
|
|
2823
|
+
onChange: (_) => Et(_.target.value),
|
|
2824
2824
|
placeholder: "e.g. Close out — duplicate",
|
|
2825
2825
|
className: "h-8 w-56 rounded-md border border-white/20 dark:border-border bg-white/10 dark:bg-background px-2 text-[12.5px] text-white dark:text-foreground placeholder:text-slate-400 dark:placeholder:text-muted-foreground"
|
|
2826
2826
|
}
|
|
@@ -2838,7 +2838,7 @@ function eh({
|
|
|
2838
2838
|
"button",
|
|
2839
2839
|
{
|
|
2840
2840
|
type: "button",
|
|
2841
|
-
onClick: () =>
|
|
2841
|
+
onClick: () => Ft(null),
|
|
2842
2842
|
className: "h-8 px-2 text-[12.5px] text-slate-300 dark:text-muted-foreground hover:text-white dark:hover:text-foreground",
|
|
2843
2843
|
children: "Cancel"
|
|
2844
2844
|
}
|
|
@@ -2896,7 +2896,7 @@ const th = {
|
|
|
2896
2896
|
tasks: "short",
|
|
2897
2897
|
addendums: "short",
|
|
2898
2898
|
in_step: "short"
|
|
2899
|
-
},
|
|
2899
|
+
}, Zi = "bg-[color:color-mix(in_srgb,hsl(var(--card))_97%,rgb(var(--nvr-cyan-rgb)))] dark:bg-[color:color-mix(in_srgb,hsl(var(--card))_94%,rgb(var(--nvr-cyan-rgb)))]";
|
|
2900
2900
|
function nh() {
|
|
2901
2901
|
const n = "Changed by someone else since you last opened this view";
|
|
2902
2902
|
return /* @__PURE__ */ a(
|
|
@@ -2920,14 +2920,14 @@ function rh(n) {
|
|
|
2920
2920
|
const h = document.activeElement;
|
|
2921
2921
|
return !(h && i.contains(h) && /^(INPUT|TEXTAREA|SELECT)$/.test(h.tagName || ""));
|
|
2922
2922
|
}
|
|
2923
|
-
function
|
|
2923
|
+
function ed(n, i, h) {
|
|
2924
2924
|
const c = i[0];
|
|
2925
2925
|
return (h ? c !== h : c !== "cbv-resolved" && c !== "cbv-risk") ? !1 : i[1] === n;
|
|
2926
2926
|
}
|
|
2927
2927
|
function sh(n) {
|
|
2928
2928
|
return new Set(
|
|
2929
2929
|
n.flatMap(
|
|
2930
|
-
(i) =>
|
|
2930
|
+
(i) => lu(
|
|
2931
2931
|
i.conditions
|
|
2932
2932
|
)
|
|
2933
2933
|
)
|
|
@@ -2959,53 +2959,53 @@ function Jg({
|
|
|
2959
2959
|
className: S
|
|
2960
2960
|
}) {
|
|
2961
2961
|
var ei, ti, ni, ai, ri, si, li, oi, ii, di, ci, ui;
|
|
2962
|
-
const f = en(), ne =
|
|
2963
|
-
() =>
|
|
2962
|
+
const f = en(), ne = rd(), L = Ar(), { open: N, urlFor: M } = ad(), [g] = w(
|
|
2963
|
+
() => Ju(Xu(`cbv:${n}`))
|
|
2964
2964
|
), [J] = w(
|
|
2965
2965
|
() => g ? Pi(g.f ?? []) : null
|
|
2966
2966
|
), [H] = w(
|
|
2967
|
-
() => g ? null :
|
|
2968
|
-
), [I, K] = w((g == null ? void 0 : g.p) ?? H ?? 1), [He] = w(() =>
|
|
2967
|
+
() => g ? null : tp(`cbv:${n}`)
|
|
2968
|
+
), [I, K] = w((g == null ? void 0 : g.p) ?? H ?? 1), [He] = w(() => op(`cbv:${n}`)), [Ie, Ft] = w(() => ki(He) !== "fresh"), ct = Z(H);
|
|
2969
2969
|
se(() => {
|
|
2970
2970
|
const e = yi(ct.current, I);
|
|
2971
2971
|
if (e !== I) {
|
|
2972
2972
|
K(e);
|
|
2973
2973
|
return;
|
|
2974
2974
|
}
|
|
2975
|
-
|
|
2975
|
+
np(`cbv:${n}`, I);
|
|
2976
2976
|
}, [n, I]);
|
|
2977
|
-
const
|
|
2977
|
+
const Et = Z(ju()), [on, we] = w(g ? g.q ?? "" : C), Y = _r(on.trim(), 350), [_e, We] = w(
|
|
2978
2978
|
J ? J.filters : q ?? []
|
|
2979
2979
|
), [ie, ut] = w(g ? g.s ?? "" : c ?? ""), [v, ae] = w(h ?? null), [me, Ge] = w({}), [Xe, Vt] = w({}), [vt, hn] = w(null), [de, W] = w({}), [st, pt] = w({}), [bn, Me] = w(
|
|
2980
2980
|
() => Fi(n)
|
|
2981
2981
|
), Ke = oe(
|
|
2982
|
-
() =>
|
|
2982
|
+
() => s0(st, bn),
|
|
2983
2983
|
[st, bn]
|
|
2984
2984
|
), gn = (e) => Me((t) => {
|
|
2985
2985
|
const r = e(t);
|
|
2986
|
-
return
|
|
2987
|
-
}), xn = (e, t) => gn((r) =>
|
|
2986
|
+
return m0(n, r), r;
|
|
2987
|
+
}), xn = (e, t) => gn((r) => f0(r, e, t)), [_, ee] = w({}), [he, ge] = w({}), [je, Te] = w(null), [dn, tn] = w(!1), _t = Z(null), [Ht, Ot] = w(
|
|
2988
2988
|
() => (g == null ? void 0 : g.qf) ?? {}
|
|
2989
2989
|
), [ht, $t] = w(
|
|
2990
2990
|
() => (g == null ? void 0 : g.qf) ?? {}
|
|
2991
2991
|
), [Gt, ga] = w(
|
|
2992
2992
|
g ? g.lc ?? [] : E ?? []
|
|
2993
|
-
), { scopes:
|
|
2993
|
+
), { scopes: Pt, ready: xa } = Sm(), [lt, va] = w(!1), [qn, Tn] = w(/* @__PURE__ */ new Set()), [Ze, vn] = w(
|
|
2994
2994
|
() => (g == null ? void 0 : g.cf) ?? {}
|
|
2995
|
-
),
|
|
2995
|
+
), Dt = nu("drill.browser"), bt = Dt.value, [ya, Vn] = w(null), [Qa, Hn] = w(!1), [yn, b] = km(), P = () => b(yn === "compact" ? "comfortable" : "compact"), [R, Le] = w(() => {
|
|
2996
2996
|
if (g) return g.g ?? null;
|
|
2997
2997
|
try {
|
|
2998
2998
|
return localStorage.getItem(`nvr_cbv_group_${n}`) || null;
|
|
2999
2999
|
} catch {
|
|
3000
3000
|
return null;
|
|
3001
3001
|
}
|
|
3002
|
-
}), [ot, mt] = w(!1), [kn,
|
|
3003
|
-
Le(e),
|
|
3002
|
+
}), [ot, mt] = w(!1), [kn, Wa] = w(/* @__PURE__ */ new Set()), Kr = (e) => {
|
|
3003
|
+
Le(e), Wa(/* @__PURE__ */ new Set()), mt(!1), K(1);
|
|
3004
3004
|
try {
|
|
3005
3005
|
e ? localStorage.setItem(`nvr_cbv_group_${n}`, e) : localStorage.removeItem(`nvr_cbv_group_${n}`);
|
|
3006
3006
|
} catch {
|
|
3007
3007
|
}
|
|
3008
|
-
}, [
|
|
3008
|
+
}, [za, jr] = w(!1), [ka, Br] = w(""), [xe, fl] = w(null), Gn = Wt({
|
|
3009
3009
|
mutationFn: (e) => f.request(qe("/ai/query", { collection: n, prompt: e, limit: 200 })),
|
|
3010
3010
|
onSuccess: (e) => {
|
|
3011
3011
|
var t;
|
|
@@ -3020,13 +3020,13 @@ function Jg({
|
|
|
3020
3020
|
const t = e.status, r = (s = e.response) == null ? void 0 : s.error;
|
|
3021
3021
|
t === 503 ? Fe.error("AI is not configured — add an Anthropic API key in Settings.") : Fe.error(r ?? "Could not answer that question");
|
|
3022
3022
|
}
|
|
3023
|
-
}),
|
|
3023
|
+
}), fd = () => {
|
|
3024
3024
|
fl(null), Br("");
|
|
3025
3025
|
}, hl = Z(!1);
|
|
3026
3026
|
se(() => {
|
|
3027
|
-
!F || hl.current || (hl.current = !0, jr(!0), Br(F),
|
|
3027
|
+
!F || hl.current || (hl.current = !0, jr(!0), Br(F), Gn.mutate(F));
|
|
3028
3028
|
}, [F]);
|
|
3029
|
-
const [ce, wn] = w(null), [
|
|
3029
|
+
const [ce, wn] = w(null), [Ln, bl] = w(() => (g == null ? void 0 : g.ex) ?? []);
|
|
3030
3030
|
se(() => {
|
|
3031
3031
|
if (!ce) return;
|
|
3032
3032
|
const e = () => wn(null);
|
|
@@ -3035,12 +3035,12 @@ function Jg({
|
|
|
3035
3035
|
};
|
|
3036
3036
|
}, [ce]);
|
|
3037
3037
|
const [tt, _n] = w([]);
|
|
3038
|
-
|
|
3039
|
-
const [Pe,
|
|
3040
|
-
|
|
3041
|
-
const Wr = !g && (((E == null ? void 0 : E.length) ?? 0) > 0 || ((q == null ? void 0 : q.length) ?? 0) > 0),
|
|
3038
|
+
iu();
|
|
3039
|
+
const [Pe, Yn] = w(null), [hd, Ur] = w(!1), [Rn, Qr] = w(""), [Va, gl] = w(!1), [bd, xl] = w(!1), [gd, wa] = w(!1), Ha = Z(null);
|
|
3040
|
+
Ku(Ha);
|
|
3041
|
+
const Wr = !g && (((E == null ? void 0 : E.length) ?? 0) > 0 || ((q == null ? void 0 : q.length) ?? 0) > 0), Ga = Z(!!g || Wr), { isAdmin: qt } = Or(), vl = Z(n);
|
|
3042
3042
|
se(() => {
|
|
3043
|
-
vl.current !== n && (vl.current = n, K(1), we(C), We([]), ut(c ?? ""), ae(h ?? null), Ge({}), Vt({}), W({}), pt({}), Me(Fi(n)), _n([]),
|
|
3043
|
+
vl.current !== n && (vl.current = n, K(1), we(C), We([]), ut(c ?? ""), ae(h ?? null), Ge({}), Vt({}), W({}), pt({}), Me(Fi(n)), _n([]), Yn(null), Ot({}), $t({}), vn({}), ga([]), bt != null && bt.length && Dt.back(bt.length), Vn(null), Ga.current = !1);
|
|
3044
3044
|
}, [n]);
|
|
3045
3045
|
const { data: T } = te({
|
|
3046
3046
|
queryKey: ["cbv-collection-meta", n],
|
|
@@ -3048,39 +3048,39 @@ function Jg({
|
|
|
3048
3048
|
staleTime: 10 * 6e4,
|
|
3049
3049
|
retry: !1
|
|
3050
3050
|
});
|
|
3051
|
-
|
|
3052
|
-
const
|
|
3051
|
+
vu([n], [["cbv-collection-meta", n]]);
|
|
3052
|
+
const Mt = oe(() => ((T == null ? void 0 : T.fields) ?? []).filter((e) => !e.hidden), [T]), Ae = (T == null ? void 0 : T.browser_config) ?? {}, Be = (ei = Ae.fulfilment) != null && ei.shipped_field && ((ti = Ae.fulfilment) != null && ti.requested_field) ? Ae.fulfilment : null, yl = Z(!!g);
|
|
3053
3053
|
se(() => {
|
|
3054
3054
|
yl.current || !T || (yl.current = !0, !c && !ie && Ae.default_sort && ut(Ae.default_sort));
|
|
3055
3055
|
}, [T]);
|
|
3056
|
-
const
|
|
3057
|
-
ze && _n([]),
|
|
3058
|
-
}, [
|
|
3056
|
+
const At = Ae.checkbox_selection !== !1, kl = Ae.show_actions !== !1, [ze, xd] = w(!1), vd = () => {
|
|
3057
|
+
ze && _n([]), xd(!ze);
|
|
3058
|
+
}, [yd, wl] = w(null);
|
|
3059
3059
|
se(() => {
|
|
3060
3060
|
tt.length === 0 && wl(null);
|
|
3061
3061
|
}, [tt.length]);
|
|
3062
|
-
const
|
|
3063
|
-
|
|
3062
|
+
const kd = sd(n ? [n] : [], Ae.bulk_actions ?? null), wd = At ? kd("update-field") ? ze ? null : "Turn on Select, then tick the rows to change." : "Bulk update is switched off for this list." : "This list has no row selection.", Ya = U && Ae.allow_create !== !1, _l = typeof Ae.create_label == "string" && Ae.create_label.trim().slice(0, 40) || "New item", Ja = qm(Ya && !(T != null && T.singleton) ? n : null), [zr, _a] = w(!1), [Vr, Xa] = w(null), { steps: Hr } = G0(
|
|
3063
|
+
Ya && !(T != null && T.singleton) ? n : null,
|
|
3064
3064
|
null
|
|
3065
3065
|
), Nl = (e) => {
|
|
3066
|
-
e ? N({ collection: n, itemId: "new", layoutSlug: e }) :
|
|
3067
|
-
}, Na =
|
|
3066
|
+
e ? N({ collection: n, itemId: "new", layoutSlug: e }) : Cn("new");
|
|
3067
|
+
}, Na = z0(Ya && !(T != null && T.singleton) ? n : null), _d = au(), Sl = Z(null), [Nd, Sd] = w(null), [Cl, $l] = w(!1), ql = (e) => {
|
|
3068
3068
|
var t;
|
|
3069
|
-
|
|
3070
|
-
},
|
|
3069
|
+
Sd(e), (t = Sl.current) == null || t.click();
|
|
3070
|
+
}, Cd = async (e) => {
|
|
3071
3071
|
const t = Array.from(e.target.files ?? []);
|
|
3072
3072
|
if (e.target.value = "", !!t.length) {
|
|
3073
3073
|
$l(!0);
|
|
3074
3074
|
try {
|
|
3075
|
-
const r = await
|
|
3076
|
-
N({ collection: n, itemId: "new", layoutSlug:
|
|
3075
|
+
const r = await V0(_d, t, n);
|
|
3076
|
+
N({ collection: n, itemId: "new", layoutSlug: Nd, query: { autofill: r } });
|
|
3077
3077
|
} catch (r) {
|
|
3078
3078
|
Gs(r, "The document could not be read", { action: "New from document" });
|
|
3079
3079
|
} finally {
|
|
3080
3080
|
$l(!1);
|
|
3081
3081
|
}
|
|
3082
3082
|
}
|
|
3083
|
-
},
|
|
3083
|
+
}, $d = (e) => Array.isArray(e == null ? void 0 : e.quick_picker) ? e.quick_picker.filter((t) => typeof t == "string") : [], Gr = Z(null), Tl = Z(null);
|
|
3084
3084
|
se(() => {
|
|
3085
3085
|
if (!zr) return;
|
|
3086
3086
|
const e = (t) => {
|
|
@@ -3089,26 +3089,26 @@ function Jg({
|
|
|
3089
3089
|
};
|
|
3090
3090
|
return window.addEventListener("mousedown", e), () => window.removeEventListener("mousedown", e);
|
|
3091
3091
|
}, [zr]);
|
|
3092
|
-
const et = g != null && g.ps ? g.ps : Ae.page_size && Ae.page_size > 0 ? Math.min(Ae.page_size, 200) : y,
|
|
3092
|
+
const et = g != null && g.ps ? g.ps : Ae.page_size && Ae.page_size > 0 ? Math.min(Ae.page_size, 200) : y, Tt = i.length > 0 ? i : Ae.quick_filters ?? [], Ll = async (e) => {
|
|
3093
3093
|
const t = {};
|
|
3094
|
-
if (!
|
|
3094
|
+
if (!Pt) return t;
|
|
3095
3095
|
for (const r of e) {
|
|
3096
|
-
const s = qi(
|
|
3096
|
+
const s = qi(Pt, { key: r.key, collection: r.collection });
|
|
3097
3097
|
if (!s) continue;
|
|
3098
|
-
const l =
|
|
3098
|
+
const l = Cm(Pt, s.name);
|
|
3099
3099
|
if (l.length === 0) continue;
|
|
3100
|
-
const o = await
|
|
3100
|
+
const o = await $m(f, s, l, r.value_field).catch(
|
|
3101
3101
|
() => []
|
|
3102
3102
|
);
|
|
3103
3103
|
o.length > 0 && (t[r.key] = o);
|
|
3104
3104
|
}
|
|
3105
3105
|
return t;
|
|
3106
|
-
},
|
|
3106
|
+
}, Sa = qt && i.length === 0, Yr = Z(null), Fn = bf({
|
|
3107
3107
|
collection: n,
|
|
3108
|
-
filters:
|
|
3108
|
+
filters: Tt,
|
|
3109
3109
|
onApplied: (e, t) => {
|
|
3110
|
-
const r = { sel: Ht, applied: ht, seeded:
|
|
3111
|
-
|
|
3110
|
+
const r = { sel: Ht, applied: ht, seeded: qn };
|
|
3111
|
+
Ot((l) => nl(l, t, e)), $t((l) => nl(l, t, e)), Tn((l) => {
|
|
3112
3112
|
const o = nl(
|
|
3113
3113
|
Object.fromEntries([...l].map((u) => [u, []])),
|
|
3114
3114
|
t,
|
|
@@ -3125,24 +3125,24 @@ function Jg({
|
|
|
3125
3125
|
for (const [A, j] of Object.entries(l)) (((x = m[A]) == null ? void 0 : x.length) ?? 0) || (m[A] = j);
|
|
3126
3126
|
return m;
|
|
3127
3127
|
};
|
|
3128
|
-
|
|
3128
|
+
Ot(o), $t(o), Tn((u) => /* @__PURE__ */ new Set([...u, ...Object.keys(l)]));
|
|
3129
3129
|
}), window.setTimeout(() => {
|
|
3130
3130
|
var l;
|
|
3131
3131
|
return (l = Yr.current) == null ? void 0 : l.focus();
|
|
3132
3132
|
}, 0), () => {
|
|
3133
|
-
|
|
3133
|
+
Ot(r.sel), $t(r.applied), Tn(r.seeded);
|
|
3134
3134
|
};
|
|
3135
3135
|
}
|
|
3136
3136
|
});
|
|
3137
3137
|
se(() => {
|
|
3138
3138
|
if (lt || !xa || i.length === 0 && !T) return;
|
|
3139
|
-
const e =
|
|
3140
|
-
if (!e ||
|
|
3139
|
+
const e = Pt, t = Object.values((e == null ? void 0 : e.defaults) ?? {}).some((r) => r.length > 0) || Object.values((e == null ? void 0 : e.restricted) ?? {}).some((r) => r.length > 0);
|
|
3140
|
+
if (!e || Tt.length === 0 || !t || g || Wr) {
|
|
3141
3141
|
va(!0);
|
|
3142
3142
|
return;
|
|
3143
3143
|
}
|
|
3144
3144
|
(async () => {
|
|
3145
|
-
const r = await Ll(
|
|
3145
|
+
const r = await Ll(Tt);
|
|
3146
3146
|
if (Object.keys(r).length > 0) {
|
|
3147
3147
|
const s = (l) => {
|
|
3148
3148
|
var u;
|
|
@@ -3151,34 +3151,34 @@ function Jg({
|
|
|
3151
3151
|
(((u = o[m]) == null ? void 0 : u.length) ?? 0) > 0 || (o[m] = x);
|
|
3152
3152
|
return o;
|
|
3153
3153
|
};
|
|
3154
|
-
|
|
3154
|
+
Ot(s), $t(s), Tn(new Set(Object.keys(r)));
|
|
3155
3155
|
}
|
|
3156
3156
|
va(!0);
|
|
3157
3157
|
})();
|
|
3158
|
-
}, [lt, xa,
|
|
3158
|
+
}, [lt, xa, Pt, T, Tt]);
|
|
3159
3159
|
const Rl = (e) => {
|
|
3160
|
-
const t = qi(
|
|
3160
|
+
const t = qi(Pt, { key: e.key, collection: e.collection }), r = t ? (Pt == null ? void 0 : Pt.restricted[t.name]) ?? [] : [];
|
|
3161
3161
|
return r.length > 0 ? r : void 0;
|
|
3162
|
-
}, nt = oe(() => new Map(
|
|
3162
|
+
}, nt = oe(() => new Map(Mt.map((e) => [e.field, e])), [Mt]), it = (T == null ? void 0 : T.relations) ?? [], Fl = oe(() => zu(Ae.inline_edit), [Ae.inline_edit]), { data: qd } = te({
|
|
3163
3163
|
queryKey: ["my-permissions"],
|
|
3164
3164
|
queryFn: () => f.request(X("/security/my/permissions")).then((e) => e.data),
|
|
3165
3165
|
enabled: Fl.enabled && !qt,
|
|
3166
3166
|
staleTime: 5 * 6e4
|
|
3167
|
-
}),
|
|
3167
|
+
}), Td = qt || Kf(qd, n), El = oe(
|
|
3168
3168
|
() => new Map(((T == null ? void 0 : T.fields) ?? []).map((e) => [e.field, e])),
|
|
3169
3169
|
[T]
|
|
3170
|
-
), Ol =
|
|
3170
|
+
), Ol = rf(), Pl = (e) => (
|
|
3171
3171
|
// Ask-the-table answers are a one-off overlay, not the list's own rows.
|
|
3172
|
-
xe ? null :
|
|
3172
|
+
xe ? null : Gu({
|
|
3173
3173
|
config: Fl,
|
|
3174
3174
|
key: e,
|
|
3175
3175
|
field: El.get(e),
|
|
3176
3176
|
collection: n,
|
|
3177
3177
|
relations: it,
|
|
3178
|
-
mayUpdate:
|
|
3178
|
+
mayUpdate: Td
|
|
3179
3179
|
})
|
|
3180
|
-
),
|
|
3181
|
-
const o = e.id, u = l === 0 ? null :
|
|
3180
|
+
), Ld = (e, t, r, s, l) => {
|
|
3181
|
+
const o = e.id, u = l === 0 ? null : Yu(
|
|
3182
3182
|
le.filter((m) => !!Pl(m)),
|
|
3183
3183
|
t,
|
|
3184
3184
|
l
|
|
@@ -3207,48 +3207,48 @@ function Jg({
|
|
|
3207
3207
|
// Rollups, computed columns and the row's position may follow the change.
|
|
3208
3208
|
onSaved: () => void L.invalidateQueries({ queryKey: ["cbv-items", n] })
|
|
3209
3209
|
});
|
|
3210
|
-
},
|
|
3210
|
+
}, Rd = (e, t, r, s) => {
|
|
3211
3211
|
const l = r ? null : Pl(t);
|
|
3212
3212
|
if (!l) return s;
|
|
3213
3213
|
const o = El.get(t);
|
|
3214
3214
|
return /* @__PURE__ */ a(
|
|
3215
|
-
|
|
3215
|
+
sf,
|
|
3216
3216
|
{
|
|
3217
3217
|
controller: Ol,
|
|
3218
3218
|
cellKey: `${String(e.id)}|${t}`,
|
|
3219
3219
|
kind: l,
|
|
3220
3220
|
value: e[t],
|
|
3221
3221
|
label: at(t),
|
|
3222
|
-
choices: o ?
|
|
3223
|
-
target: l === "m2o" ?
|
|
3222
|
+
choices: o ? Hu(o) : void 0,
|
|
3223
|
+
target: l === "m2o" ? Vu(it, n, t) : null,
|
|
3224
3224
|
collection: n,
|
|
3225
3225
|
itemId: e.id,
|
|
3226
3226
|
field: t,
|
|
3227
|
-
onCommit: (u, m) =>
|
|
3227
|
+
onCommit: (u, m) => Ld(e, t, l, u, m),
|
|
3228
3228
|
children: s
|
|
3229
3229
|
}
|
|
3230
3230
|
);
|
|
3231
|
-
}, le = oe(() => (v ??
|
|
3232
|
-
(t) => t.includes(".") || nt.has(t) || t ===
|
|
3233
|
-
), [v,
|
|
3231
|
+
}, le = oe(() => (v ?? Mt.slice(0, 7).map((t) => t.field)).filter(
|
|
3232
|
+
(t) => t.includes(".") || nt.has(t) || t === Qn || t.startsWith("__f:") && !!Xe[t]
|
|
3233
|
+
), [v, Mt, nt, Xe]), [Za, er] = w(null), En = oe(
|
|
3234
3234
|
() => Za ?? (le[0] ? { [le[0]]: "left" } : {}),
|
|
3235
3235
|
[Za, le]
|
|
3236
|
-
), Jr =
|
|
3237
|
-
() => Jr ? le[0] ? { [le[0]]: "left" } : {} :
|
|
3238
|
-
[Jr, le,
|
|
3236
|
+
), Jr = Nm(), Jn = oe(
|
|
3237
|
+
() => Jr ? le[0] ? { [le[0]]: "left" } : {} : En,
|
|
3238
|
+
[Jr, le, En]
|
|
3239
3239
|
);
|
|
3240
3240
|
let Dl = Jn;
|
|
3241
|
-
const Ml = (e) => e === "__actions__" ? 3 : e === "__state__" ? 2 : e === "__owners__" ? 0 : 1, nn = (e) => Dl[e],
|
|
3242
|
-
const t = { ...
|
|
3241
|
+
const Ml = (e) => e === "__actions__" ? 3 : e === "__state__" ? 2 : e === "__owners__" ? 0 : 1, nn = (e) => Dl[e], Fd = (e) => {
|
|
3242
|
+
const t = { ...En }, r = t[e];
|
|
3243
3243
|
r ? r === "left" ? t[e] = "right" : delete t[e] : t[e] = "left", er(t);
|
|
3244
|
-
}, at = (e) => me[e] ?? (e ===
|
|
3244
|
+
}, at = (e) => me[e] ?? (e === Qn ? "In step" : e.startsWith("__f:") ? Xe[e] ?? "Formula" : e.includes(".") ? e.split(".").map(Qe).join(" › ") : e === "id" ? "ID" : Qe(e)), Al = (e, t) => {
|
|
3245
3245
|
var s, l, o;
|
|
3246
3246
|
const r = t.includes(".") ? (o = (l = (s = Oe == null ? void 0 : Oe.rows) == null ? void 0 : s[String(e.id)]) == null ? void 0 : l[t]) == null ? void 0 : o.value : e[t];
|
|
3247
3247
|
return typeof r == "string" && /^-?\d+(\.\d+)?$/.test(r.trim()) ? Number(r) : r;
|
|
3248
3248
|
}, Il = (e, t) => {
|
|
3249
3249
|
const r = Xe[t];
|
|
3250
3250
|
return r ? xi(r, (s) => Al(e, s)) : null;
|
|
3251
|
-
},
|
|
3251
|
+
}, Ed = (e, t) => {
|
|
3252
3252
|
const r = Xe[t];
|
|
3253
3253
|
if (r)
|
|
3254
3254
|
return r.replace(/\{\{\s*([^}]+?)\s*\}\}/g, (s, l) => {
|
|
@@ -3265,14 +3265,14 @@ function Jg({
|
|
|
3265
3265
|
...new Set(Nn.map((e) => e.info.relation.many_collection ?? "").filter(Boolean))
|
|
3266
3266
|
],
|
|
3267
3267
|
[Nn]
|
|
3268
|
-
), Kl =
|
|
3268
|
+
), Kl = Ka({
|
|
3269
3269
|
queries: Xr.map((e) => ({
|
|
3270
3270
|
queryKey: ["cbv-collection-meta", e],
|
|
3271
3271
|
queryFn: () => f.request(X(`/collections/${e}`)).then((t) => t.data),
|
|
3272
3272
|
staleTime: 10 * 6e4,
|
|
3273
3273
|
retry: !1
|
|
3274
3274
|
}))
|
|
3275
|
-
}),
|
|
3275
|
+
}), On = oe(() => {
|
|
3276
3276
|
const e = /* @__PURE__ */ new Map();
|
|
3277
3277
|
return Xr.forEach((t, r) => {
|
|
3278
3278
|
var s;
|
|
@@ -3282,15 +3282,15 @@ function Jg({
|
|
|
3282
3282
|
() => [
|
|
3283
3283
|
...new Set(
|
|
3284
3284
|
Nn.filter((e) => e.info.kind === "m2m").map((e) => {
|
|
3285
|
-
const t = e.info.relation.many_collection ?? "", r =
|
|
3285
|
+
const t = e.info.relation.many_collection ?? "", r = On.get(t), s = r == null ? void 0 : r.relations.find(
|
|
3286
3286
|
(l) => l.many_collection === t && l.many_field === e.info.relation.junction_field
|
|
3287
3287
|
);
|
|
3288
3288
|
return (s == null ? void 0 : s.one_collection) ?? "";
|
|
3289
3289
|
}).filter(Boolean)
|
|
3290
3290
|
)
|
|
3291
3291
|
],
|
|
3292
|
-
[Nn,
|
|
3293
|
-
), jl =
|
|
3292
|
+
[Nn, On]
|
|
3293
|
+
), jl = Ka({
|
|
3294
3294
|
queries: Zr.map((e) => ({
|
|
3295
3295
|
queryKey: ["cbv-collection-meta", e],
|
|
3296
3296
|
queryFn: () => f.request(X(`/collections/${e}`)).then((t) => t.data),
|
|
@@ -3308,31 +3308,31 @@ function Jg({
|
|
|
3308
3308
|
for (const t of Nn) {
|
|
3309
3309
|
const r = t.info.relation.many_collection ?? "";
|
|
3310
3310
|
if (t.info.kind === "o2m")
|
|
3311
|
-
e[t.field] = `${t.field}.${
|
|
3311
|
+
e[t.field] = `${t.field}.${Ba(On.get(r))}`;
|
|
3312
3312
|
else {
|
|
3313
|
-
const s =
|
|
3313
|
+
const s = On.get(r), l = s == null ? void 0 : s.relations.find(
|
|
3314
3314
|
(u) => u.many_collection === r && u.many_field === t.info.relation.junction_field
|
|
3315
3315
|
), o = (l == null ? void 0 : l.one_collection) ?? "";
|
|
3316
|
-
e[t.field] = `${t.field}.${
|
|
3316
|
+
e[t.field] = `${t.field}.${Ba(o ? Bl.get(o) : void 0)}`;
|
|
3317
3317
|
}
|
|
3318
3318
|
}
|
|
3319
3319
|
return e;
|
|
3320
|
-
}, [Nn,
|
|
3320
|
+
}, [Nn, On, Bl]), Ul = oe(() => {
|
|
3321
3321
|
const e = {};
|
|
3322
3322
|
for (const t of Nn)
|
|
3323
3323
|
if (t.info.kind === "o2m")
|
|
3324
3324
|
e[t.field] = { kind: "o2m" };
|
|
3325
3325
|
else {
|
|
3326
|
-
const r = t.info.relation.many_collection ?? "", s =
|
|
3326
|
+
const r = t.info.relation.many_collection ?? "", s = On.get(r), l = s == null ? void 0 : s.relations.find(
|
|
3327
3327
|
(o) => o.many_collection === r && o.many_field === t.info.relation.junction_field
|
|
3328
3328
|
);
|
|
3329
3329
|
l != null && l.one_collection && (e[t.field] = { kind: "m2m", target: l.one_collection });
|
|
3330
3330
|
}
|
|
3331
3331
|
return e;
|
|
3332
|
-
}, [Nn,
|
|
3332
|
+
}, [Nn, On]), es = _r(Ze, 350), [an, Od] = w((g == null ? void 0 : g.a) === !0), [Ql, Pd] = w(null), Ca = S0(n, Ql), [Lt, Wl] = w(null), { data: $a } = Zm(n), [It, tr] = w(() => (J == null ? void 0 : J.riskIds) ?? []), Ne = oe(() => {
|
|
3333
3333
|
var t;
|
|
3334
3334
|
const e = sl(_e);
|
|
3335
|
-
for (const r of
|
|
3335
|
+
for (const r of Tt) {
|
|
3336
3336
|
const s = ht[r.key] ?? [];
|
|
3337
3337
|
s.length !== 0 && ((t = r.or_paths) != null && t.length ? e.push({
|
|
3338
3338
|
or: r.or_paths.map((l) => ({ path: l, op: "_in", value: s }))
|
|
@@ -3368,37 +3368,37 @@ function Jg({
|
|
|
3368
3368
|
e.push({ path: [r], op: s.op, value: Number(s.value) });
|
|
3369
3369
|
else if (s.kind === "bool") e.push({ path: [r], op: "_eq", value: s.value === "true" });
|
|
3370
3370
|
else if (s.kind === "date" && s.value) {
|
|
3371
|
-
const l = Pr(s.value), u = (l ?
|
|
3371
|
+
const l = Pr(s.value), u = (l ? yu(l) : null) ?? ud(s.value);
|
|
3372
3372
|
u && (u.from && e.push({ path: [r], op: "_gte", value: u.from }), u.to && e.push({ path: [r], op: "_lte", value: `${u.to}T23:59:59` }));
|
|
3373
3373
|
}
|
|
3374
3374
|
}
|
|
3375
3375
|
for (const r of Gt) e.push({ path: r.path, op: r.op, value: r.value });
|
|
3376
|
-
for (const r of
|
|
3376
|
+
for (const r of Ln)
|
|
3377
3377
|
e.push({
|
|
3378
3378
|
or: [
|
|
3379
3379
|
{ path: r.path, op: r.op, value: r.value },
|
|
3380
3380
|
{ path: r.path, op: "_null", value: !0 }
|
|
3381
3381
|
]
|
|
3382
3382
|
});
|
|
3383
|
-
return an && e.push({ path: ["$addendums"], op: "_eq", value: "active" }),
|
|
3383
|
+
return an && e.push({ path: ["$addendums"], op: "_eq", value: "active" }), Ca.condition && e.push(Ca.condition), It.length === 1 ? e.push({ path: ["$at_risk"], op: "_eq", value: It[0] }) : It.length > 1 && e.push({
|
|
3384
3384
|
or: It.map((r) => ({ path: ["$at_risk"], op: "_eq", value: r }))
|
|
3385
3385
|
}), e.length > 0 ? JSON.stringify(e) : void 0;
|
|
3386
3386
|
}, [
|
|
3387
3387
|
_e,
|
|
3388
|
-
|
|
3388
|
+
Tt,
|
|
3389
3389
|
ht,
|
|
3390
3390
|
es,
|
|
3391
3391
|
Gt,
|
|
3392
|
-
|
|
3392
|
+
Ln,
|
|
3393
3393
|
an,
|
|
3394
|
-
|
|
3394
|
+
Ca.condition,
|
|
3395
3395
|
It
|
|
3396
3396
|
]), Xn = oe(() => {
|
|
3397
3397
|
const e = ((T == null ? void 0 : T.fields) ?? []).map((l) => l.field), t = e.find((l) => /^(latitude|lat)$/i.test(l)) ?? null, r = e.find((l) => /^(longitude|lng|long|lon)$/i.test(l)) ?? null;
|
|
3398
3398
|
if (!t || !r) return null;
|
|
3399
3399
|
const s = e.find((l) => ["name", "title", "label", "short_name"].includes(l.toLowerCase())) ?? null;
|
|
3400
3400
|
return { latField: t, lngField: r, labelField: s };
|
|
3401
|
-
}, [T]), [
|
|
3401
|
+
}, [T]), [Pn, zl] = w(!1), [Vl, Dd] = w(!1), Hl = Z(Ne);
|
|
3402
3402
|
se(() => {
|
|
3403
3403
|
Hl.current !== Ne && (Hl.current = Ne, K(yi(ct.current, 1)));
|
|
3404
3404
|
}, [Ne]);
|
|
@@ -3421,7 +3421,7 @@ function Jg({
|
|
|
3421
3421
|
X(`/items/${n}`, { ...t, page: u, ...ie ? { sort: ie } : {} })
|
|
3422
3422
|
);
|
|
3423
3423
|
if (R) return r(1);
|
|
3424
|
-
const s = JSON.stringify([n, Y, ie, et, Ne]), l =
|
|
3424
|
+
const s = JSON.stringify([n, Y, ie, et, Ne]), l = Et.current, o = Bu(l, s, e, ie);
|
|
3425
3425
|
if (o.after === void 0 && o.sort === ie) return r(e);
|
|
3426
3426
|
try {
|
|
3427
3427
|
const u = await f.request(
|
|
@@ -3431,10 +3431,10 @@ function Jg({
|
|
|
3431
3431
|
...o.sort ? { sort: o.sort } : {}
|
|
3432
3432
|
})
|
|
3433
3433
|
);
|
|
3434
|
-
return o.after !== void 0 &&
|
|
3434
|
+
return o.after !== void 0 && Uu(l, s, e, u.next_cursor), u;
|
|
3435
3435
|
} catch (u) {
|
|
3436
|
-
if (!
|
|
3437
|
-
return
|
|
3436
|
+
if (!Qu(u)) throw u;
|
|
3437
|
+
return Wu(l, s), r(e);
|
|
3438
3438
|
}
|
|
3439
3439
|
}, {
|
|
3440
3440
|
data: fe,
|
|
@@ -3456,7 +3456,7 @@ function Jg({
|
|
|
3456
3456
|
// #2490 — a collection whose live record events are off polls instead (visible tabs only).
|
|
3457
3457
|
refetchInterval: Ae.live_events === "off" ? 3e4 : !1,
|
|
3458
3458
|
retry: !1
|
|
3459
|
-
}),
|
|
3459
|
+
}), Md = qf(
|
|
3460
3460
|
(Ee == null ? void 0 : Ee.status) === 403 && !tl(Ee),
|
|
3461
3461
|
!!fe && !Ee,
|
|
3462
3462
|
n
|
|
@@ -3474,13 +3474,13 @@ function Jg({
|
|
|
3474
3474
|
}, [Zl]);
|
|
3475
3475
|
const eo = Z(() => {
|
|
3476
3476
|
});
|
|
3477
|
-
|
|
3477
|
+
Qp({
|
|
3478
3478
|
qc: L,
|
|
3479
3479
|
enabled: !!n && lt && !R && !Y && !gt && !!fe && I * et < (fe.total ?? 0),
|
|
3480
3480
|
queryKey: Gl(I + 1),
|
|
3481
3481
|
queryFn: () => Yl(I + 1).then((e) => (eo.current(e.data ?? []), e))
|
|
3482
3482
|
}), se(() => {
|
|
3483
|
-
const e =
|
|
3483
|
+
const e = ap({
|
|
3484
3484
|
pending: ct.current,
|
|
3485
3485
|
gateOpen: lt,
|
|
3486
3486
|
fetching: gt,
|
|
@@ -3495,7 +3495,7 @@ function Jg({
|
|
|
3495
3495
|
e && (ct.current = null, e.page != null && K(e.page));
|
|
3496
3496
|
}, [lt, fe, gt, cn, I, et, Ee]);
|
|
3497
3497
|
const ke = xe ? xe.rows : (fe == null ? void 0 : fe.data) ?? [];
|
|
3498
|
-
|
|
3498
|
+
Dp(
|
|
3499
3499
|
() => !xe && n && !cn && Zn > 0 ? ke.slice(0, 200).filter((e) => e && e.id != null).map((e) => ({
|
|
3500
3500
|
collection: n,
|
|
3501
3501
|
id: e.id,
|
|
@@ -3503,19 +3503,19 @@ function Jg({
|
|
|
3503
3503
|
loadedAt: Zn
|
|
3504
3504
|
})) : null
|
|
3505
3505
|
);
|
|
3506
|
-
const $e = xe ? xe.total : (fe == null ? void 0 : fe.total) ?? 0, Kt = !xe && !!fe && (fe.total_timed_out === !0 || fe.total == null),
|
|
3507
|
-
if (!
|
|
3506
|
+
const $e = xe ? xe.total : (fe == null ? void 0 : fe.total) ?? 0, Kt = !xe && !!fe && (fe.total_timed_out === !0 || fe.total == null), Dn = !xe && (fe == null ? void 0 : fe.total_approx) === !0, to = _r(Ne, 400), no = _r(Y, 400), ta = (e) => {
|
|
3507
|
+
if (!c0(e)) return null;
|
|
3508
3508
|
const t = nt.get(e);
|
|
3509
|
-
return t ?
|
|
3509
|
+
return t ? u0(t, (r) => nt.get(r)) : null;
|
|
3510
3510
|
}, ao = (e) => e.map(
|
|
3511
3511
|
(t, r) => `${r === 0 ? t.sign < 0 ? "− " : "" : t.sign < 0 ? " − " : " + "}${at(t.field)}`
|
|
3512
|
-
).join(""),
|
|
3512
|
+
).join(""), Ad = (e) => `Sum only: worked out as ${ao(e)}.`, qa = le.filter((e) => {
|
|
3513
3513
|
const t = Ke[e];
|
|
3514
3514
|
if (!t) return !1;
|
|
3515
3515
|
const r = ta(e);
|
|
3516
3516
|
return (r == null ? void 0 : r.kind) === "server" || (r == null ? void 0 : r.kind) === "derived" && t === "sum";
|
|
3517
3517
|
}), Sn = [];
|
|
3518
|
-
for (const e of
|
|
3518
|
+
for (const e of qa) {
|
|
3519
3519
|
const t = ta(e), r = (t == null ? void 0 : t.kind) === "derived" ? t.terms.map((s) => ({ key: s.field, fn: "sum" })) : [{ key: e, fn: Ke[e] }];
|
|
3520
3520
|
for (const s of r)
|
|
3521
3521
|
Sn.some((l) => l.key === s.key && l.fn === s.fn) || Sn.push(s);
|
|
@@ -3531,23 +3531,23 @@ function Jg({
|
|
|
3531
3531
|
queryFn: () => f.request(
|
|
3532
3532
|
X(
|
|
3533
3533
|
`/items/${n}/aggregate`,
|
|
3534
|
-
|
|
3534
|
+
l0(Sn, { search: no, conditions: to })
|
|
3535
3535
|
)
|
|
3536
3536
|
),
|
|
3537
3537
|
enabled: !!n && Sn.length > 0 && lt && !xe && !R && !!fe && !cn && !Ee,
|
|
3538
3538
|
staleTime: 3e4,
|
|
3539
3539
|
retry: !1
|
|
3540
|
-
}),
|
|
3541
|
-
data: ar.data ?
|
|
3540
|
+
}), Id = Sn.map(({ key: e, fn: t }) => ({
|
|
3541
|
+
data: ar.data ? o0(ar.data, e, t) : void 0,
|
|
3542
3542
|
isLoading: ar.isLoading,
|
|
3543
3543
|
isError: ar.isError
|
|
3544
|
-
})), ts = {}, ns = (e, t) =>
|
|
3545
|
-
for (const e of
|
|
3544
|
+
})), ts = {}, ns = (e, t) => Id[Sn.findIndex((r) => r.key === e && r.fn === t)];
|
|
3545
|
+
for (const e of qa) {
|
|
3546
3546
|
const t = ta(e);
|
|
3547
3547
|
if ((t == null ? void 0 : t.kind) === "derived") {
|
|
3548
3548
|
const s = t.terms.map((o) => ns(o.field, "sum")), l = s.map((o) => o == null ? void 0 : o.data);
|
|
3549
3549
|
ts[e] = {
|
|
3550
|
-
value: l.some((o) => o === void 0) || l.every((o) => o == null) ? null :
|
|
3550
|
+
value: l.some((o) => o === void 0) || l.every((o) => o == null) ? null : i0(t.terms, (o) => {
|
|
3551
3551
|
var u;
|
|
3552
3552
|
return ((u = ns(o, "sum")) == null ? void 0 : u.data) ?? 0;
|
|
3553
3553
|
}),
|
|
@@ -3563,9 +3563,9 @@ function Jg({
|
|
|
3563
3563
|
failed: !!(r != null && r.isError)
|
|
3564
3564
|
};
|
|
3565
3565
|
}
|
|
3566
|
-
const
|
|
3567
|
-
if (!
|
|
3568
|
-
K(
|
|
3566
|
+
const Kd = qa.length > 0 && !R && !xe, Ta = Kt ? I + (ke.length >= et ? 1 : 0) : Math.max(1, Math.ceil($e / et)), [as, ro] = w(!1), so = async () => {
|
|
3567
|
+
if (!Dn && !Kt) {
|
|
3568
|
+
K(Ta);
|
|
3569
3569
|
return;
|
|
3570
3570
|
}
|
|
3571
3571
|
ro(!0);
|
|
@@ -3573,9 +3573,9 @@ function Jg({
|
|
|
3573
3573
|
const e = await f.request(
|
|
3574
3574
|
X(
|
|
3575
3575
|
`/items/${n}`,
|
|
3576
|
-
|
|
3576
|
+
E0({ search: Y, conditions: Ne })
|
|
3577
3577
|
)
|
|
3578
|
-
), t =
|
|
3578
|
+
), t = O0(e, et);
|
|
3579
3579
|
if (t == null) {
|
|
3580
3580
|
Fe("This list is too big to count right now", {
|
|
3581
3581
|
description: "Use Next to keep going, or narrow the list with a filter."
|
|
@@ -3588,15 +3588,15 @@ function Jg({
|
|
|
3588
3588
|
} finally {
|
|
3589
3589
|
ro(!1);
|
|
3590
3590
|
}
|
|
3591
|
-
},
|
|
3591
|
+
}, La = Tt.filter(
|
|
3592
3592
|
(e) => {
|
|
3593
3593
|
var t;
|
|
3594
|
-
return
|
|
3594
|
+
return qn.has(e.key) && (((t = ht[e.key]) == null ? void 0 : t.length) ?? 0) > 0 && !Rl(e);
|
|
3595
3595
|
}
|
|
3596
|
-
), lo =
|
|
3596
|
+
), lo = La.map((e) => e.key).join(","), rs = oe(() => {
|
|
3597
3597
|
if (!lo || !Ne) return Ne;
|
|
3598
3598
|
const e = new Set(
|
|
3599
|
-
|
|
3599
|
+
La.map((r) => {
|
|
3600
3600
|
var l;
|
|
3601
3601
|
const s = ht[r.key] ?? [];
|
|
3602
3602
|
return JSON.stringify(
|
|
@@ -3607,9 +3607,9 @@ function Jg({
|
|
|
3607
3607
|
(r) => !e.has(JSON.stringify(r))
|
|
3608
3608
|
);
|
|
3609
3609
|
return t.length > 0 ? JSON.stringify(t) : void 0;
|
|
3610
|
-
}, [lo, Ne, ht]), { data:
|
|
3610
|
+
}, [lo, Ne, ht]), { data: Ra } = te({
|
|
3611
3611
|
queryKey: ["cbv-default-hidden", n, Y, rs],
|
|
3612
|
-
enabled: !!n && !xe && !!fe && !gt && $e === 0 &&
|
|
3612
|
+
enabled: !!n && !xe && !!fe && !gt && $e === 0 && La.length > 0,
|
|
3613
3613
|
staleTime: 3e4,
|
|
3614
3614
|
retry: !1,
|
|
3615
3615
|
queryFn: () => f.request(
|
|
@@ -3621,13 +3621,13 @@ function Jg({
|
|
|
3621
3621
|
...rs ? { conditions: rs } : {}
|
|
3622
3622
|
})
|
|
3623
3623
|
).then((e) => Number(e.total ?? 0))
|
|
3624
|
-
}),
|
|
3625
|
-
const e =
|
|
3624
|
+
}), jd = () => {
|
|
3625
|
+
const e = La.map((r) => r.key), t = (r) => {
|
|
3626
3626
|
const s = { ...r };
|
|
3627
3627
|
for (const l of e) s[l] = [];
|
|
3628
3628
|
return s;
|
|
3629
3629
|
};
|
|
3630
|
-
|
|
3630
|
+
Ot(t), $t(t), K(1);
|
|
3631
3631
|
}, oo = Z(Date.now()), rr = Z(null);
|
|
3632
3632
|
se(() => {
|
|
3633
3633
|
oo.current = Date.now();
|
|
@@ -3637,7 +3637,7 @@ function Jg({
|
|
|
3637
3637
|
const e = `${n}\0${Y}`;
|
|
3638
3638
|
((t = rr.current) == null ? void 0 : t.key) !== e && (rr.current = {
|
|
3639
3639
|
key: e,
|
|
3640
|
-
id:
|
|
3640
|
+
id: lm(f, {
|
|
3641
3641
|
surface: "collection",
|
|
3642
3642
|
collection: n,
|
|
3643
3643
|
query: Y,
|
|
@@ -3645,7 +3645,7 @@ function Jg({
|
|
|
3645
3645
|
duration_ms: Date.now() - oo.current
|
|
3646
3646
|
})
|
|
3647
3647
|
});
|
|
3648
|
-
}, [f, n, Y, fe, gt, xe]),
|
|
3648
|
+
}, [f, n, Y, fe, gt, xe]), Em(
|
|
3649
3649
|
n ? {
|
|
3650
3650
|
list: {
|
|
3651
3651
|
collection: n,
|
|
@@ -3662,18 +3662,18 @@ function Jg({
|
|
|
3662
3662
|
}
|
|
3663
3663
|
} : null
|
|
3664
3664
|
);
|
|
3665
|
-
const
|
|
3665
|
+
const Bd = Om(), io = ru(gt), ss = su({
|
|
3666
3666
|
pending: gt,
|
|
3667
3667
|
request: n ? { method: "GET", url: `/items/${n}` } : null,
|
|
3668
3668
|
noun: ((T == null ? void 0 : T.display_name) ?? n ?? "").replace(/_/g, " ").toLowerCase() || null,
|
|
3669
3669
|
// Only a total this person has already been shown (never a raw table count).
|
|
3670
|
-
knownRows: gt ?
|
|
3671
|
-
}), na =
|
|
3670
|
+
knownRows: gt ? bm(L.getQueriesData({ queryKey: ["cbv-items", n] })) : null
|
|
3671
|
+
}), na = Jp(), { userId: Mn } = Or(), co = (e) => qt || !!Mn && String(e.user ?? "").toUpperCase() === String(Mn).toUpperCase(), yt = kp(), ls = Z(/* @__PURE__ */ new Set());
|
|
3672
3672
|
ls.current = new Set(ke.map((e) => String(e.id)));
|
|
3673
|
-
const
|
|
3673
|
+
const Ud = oe(() => {
|
|
3674
3674
|
const e = ke.slice(0, 100).map((s) => String(s.id)), t = new Set(e), r = ze ? tt.map(String).filter((s) => !t.has(s)).slice(0, 100) : [];
|
|
3675
3675
|
return [...e, ...r].map((s) => ({ collection: n, item: s }));
|
|
3676
|
-
}, [ke, n, ze, tt]), os =
|
|
3676
|
+
}, [ke, n, ze, tt]), os = Vp(Ud), sr = Z([]);
|
|
3677
3677
|
sr.current = [
|
|
3678
3678
|
"cbv-items",
|
|
3679
3679
|
n,
|
|
@@ -3699,28 +3699,28 @@ function Jg({
|
|
|
3699
3699
|
allLoaded: !!R && !xe && $e <= 500
|
|
3700
3700
|
};
|
|
3701
3701
|
const ds = Z({}).current;
|
|
3702
|
-
|
|
3702
|
+
hp(
|
|
3703
3703
|
"owners:changed",
|
|
3704
3704
|
(e) => {
|
|
3705
3705
|
!n || e != null && e.queues || Array.isArray(e == null ? void 0 : e.collections) && !e.collections.includes(n) || L.invalidateQueries({ queryKey: ["cbv-owners", n] });
|
|
3706
3706
|
},
|
|
3707
3707
|
{ debounceMs: 600 }
|
|
3708
3708
|
);
|
|
3709
|
-
const [uo,
|
|
3709
|
+
const [uo, Qd] = w(0), [cs, us] = w(0), aa = Cp(), lr = Z(aa);
|
|
3710
3710
|
lr.current = aa;
|
|
3711
3711
|
const or = Z(null), po = Z(/* @__PURE__ */ new Set());
|
|
3712
3712
|
po.current = new Set(Sn.map((e) => e.key));
|
|
3713
3713
|
const mo = Z({
|
|
3714
3714
|
resolved: /* @__PURE__ */ new Set(),
|
|
3715
3715
|
risk: /* @__PURE__ */ new Set()
|
|
3716
|
-
}), fo = () => void L.invalidateQueries({ queryKey: ["cbv-col-total", n] }),
|
|
3716
|
+
}), fo = () => void L.invalidateQueries({ queryKey: ["cbv-col-total", n] }), An = $p(
|
|
3717
3717
|
n ? `cbv:${n}` : null,
|
|
3718
3718
|
(e) => {
|
|
3719
|
-
if (!
|
|
3719
|
+
if (!Rp(e) && or.current) return or.current(e);
|
|
3720
3720
|
lr.current.clear(), us(0), ea(), fo();
|
|
3721
3721
|
}
|
|
3722
|
-
), ps =
|
|
3723
|
-
aa.clear(),
|
|
3722
|
+
), ps = An.gate, ms = () => {
|
|
3723
|
+
aa.clear(), An.dropHeld(), us(0), ea(), fo();
|
|
3724
3724
|
}, ra = Z(null);
|
|
3725
3725
|
se(() => {
|
|
3726
3726
|
if (!na || !n) return;
|
|
@@ -3731,7 +3731,7 @@ function Jg({
|
|
|
3731
3731
|
let s = null;
|
|
3732
3732
|
const l = (ye) => {
|
|
3733
3733
|
const pe = (Ce) => r.set(JSON.stringify(Ce), Ce);
|
|
3734
|
-
ye.includes(
|
|
3734
|
+
ye.includes(Wn.tasks) && pe(["cbv-task-counts", n]), ye.includes(Wn.addendums) && pe(["cbv-addendum-summary", n]), ye.includes(Wn.integrations) && (pe(["cbv-integrations-summary", n]), pe(["cbv-send-status", n])), ye.includes(Wn.comments) && pe(["row-comment-counts", n]), ye.includes(Wn.state) && (pe(["cbv-pipeline-instances", n]), pe(["cbv-owners", n]), x.poke()), ye.includes(Wn.lock) && Qd((Ce) => Ce + 1), ye.includes(Wn.owners) && pe(["cbv-owners", n]), !s && (s = setTimeout(() => {
|
|
3735
3735
|
s = null;
|
|
3736
3736
|
for (const Ce of r.values()) L.invalidateQueries({ queryKey: Ce });
|
|
3737
3737
|
r.clear();
|
|
@@ -3748,9 +3748,9 @@ function Jg({
|
|
|
3748
3748
|
() => {
|
|
3749
3749
|
const ye = { ...A };
|
|
3750
3750
|
A.resolved = !1, A.risk = !1, ye.resolved && L.invalidateQueries({
|
|
3751
|
-
predicate: (pe) =>
|
|
3751
|
+
predicate: (pe) => ed(n, pe.queryKey, "cbv-resolved")
|
|
3752
3752
|
}), ye.risk && L.invalidateQueries({
|
|
3753
|
-
predicate: (pe) =>
|
|
3753
|
+
predicate: (pe) => ed(n, pe.queryKey, "cbv-risk")
|
|
3754
3754
|
});
|
|
3755
3755
|
},
|
|
3756
3756
|
{ quietMs: 1500, maxWaitMs: 8e3 }
|
|
@@ -3767,13 +3767,13 @@ function Jg({
|
|
|
3767
3767
|
pe.publish();
|
|
3768
3768
|
const D = ((p = pe.tracker.current()) == null ? void 0 : p.sample) ?? [];
|
|
3769
3769
|
D.length > 0 && pe.claimWriterRead() && _i(f, n, D, void 0).then((V) => {
|
|
3770
|
-
const re =
|
|
3770
|
+
const re = Fp(V.values()), Ye = !!re && !!Mn && re.toUpperCase() === Mn.toUpperCase();
|
|
3771
3771
|
!be && re && !Ye && lr.current.setWriter(re);
|
|
3772
3772
|
}).catch(() => {
|
|
3773
3773
|
});
|
|
3774
3774
|
return;
|
|
3775
3775
|
}
|
|
3776
|
-
|
|
3776
|
+
Ep(
|
|
3777
3777
|
ye,
|
|
3778
3778
|
po.current,
|
|
3779
3779
|
Ni(is.current.conditions)
|
|
@@ -3786,17 +3786,17 @@ function Jg({
|
|
|
3786
3786
|
Re = !0;
|
|
3787
3787
|
continue;
|
|
3788
3788
|
}
|
|
3789
|
-
const re = Ce.get(V), Ye = (re == null ? void 0 : re.action) === "delete" || D.action === "delete" ? "delete" : (re == null ? void 0 : re.action) === "create" ? "create" : D.action,
|
|
3789
|
+
const re = Ce.get(V), Ye = (re == null ? void 0 : re.action) === "delete" || D.action === "delete" ? "delete" : (re == null ? void 0 : re.action) === "create" ? "create" : D.action, Rt = /* @__PURE__ */ new Set([...(re == null ? void 0 : re.changed_fields) ?? [], ...D.changed_fields ?? []]);
|
|
3790
3790
|
Ce.set(V, {
|
|
3791
3791
|
...D,
|
|
3792
3792
|
action: Ye,
|
|
3793
|
-
changed_fields: D.changed_fields || re != null && re.changed_fields ? [...
|
|
3793
|
+
changed_fields: D.changed_fields || re != null && re.changed_fields ? [...Rt] : void 0
|
|
3794
3794
|
});
|
|
3795
3795
|
}
|
|
3796
3796
|
Re && e();
|
|
3797
|
-
const k = ls.current, Yt = (D) => D.own === !0 ||
|
|
3798
|
-
const V =
|
|
3799
|
-
return V &&
|
|
3797
|
+
const k = ls.current, Yt = (D) => D.own === !0 || Up(n, D.item), ft = (D) => {
|
|
3798
|
+
const V = Sp(D);
|
|
3799
|
+
return V && Mn && V.toUpperCase() === Mn.toUpperCase() ? "self" : V;
|
|
3800
3800
|
}, sn = [];
|
|
3801
3801
|
for (const [D, V] of Ce)
|
|
3802
3802
|
V.action === "delete" && (k.has(D) ? sn.push(D) : e(), Ce.delete(D));
|
|
@@ -3826,26 +3826,26 @@ function Jg({
|
|
|
3826
3826
|
}
|
|
3827
3827
|
f.request(X(`/items/${n}/${D}`)).then((re) => {
|
|
3828
3828
|
const Ye = re == null ? void 0 : re.data;
|
|
3829
|
-
Ye && (o((
|
|
3830
|
-
...
|
|
3831
|
-
data:
|
|
3829
|
+
Ye && (o((Rt) => ({
|
|
3830
|
+
...Rt,
|
|
3831
|
+
data: Rt.data.map((Xt) => String(Xt.id) === D ? { ...Xt, ...Ye } : Xt)
|
|
3832
3832
|
})), Yt(V) || yt.note([D], ft(Ye)));
|
|
3833
3833
|
}).catch(() => e());
|
|
3834
3834
|
}
|
|
3835
3835
|
return;
|
|
3836
3836
|
}
|
|
3837
3837
|
if (be) return;
|
|
3838
|
-
const ma = Ni(Ut.conditions),
|
|
3838
|
+
const ma = Ni(Ut.conditions), Un = Ut.page === 1 && !Ut.grouped || Ut.allLoaded, Nt = /* @__PURE__ */ new Map(), Qt = [], ln = [];
|
|
3839
3839
|
for (const [D, V] of Ce) {
|
|
3840
3840
|
const re = Jt.get(D);
|
|
3841
|
-
k.has(D) ? re ? Nt.set(D, re) : Qt.push(D) : re && ((V.action === "create" || !!Ut.conditions &&
|
|
3841
|
+
k.has(D) ? re ? Nt.set(D, re) : Qt.push(D) : re && ((V.action === "create" || !!Ut.conditions && Np(V, ma)) && Un ? ln.push({ row: re, ev: V }) : e());
|
|
3842
3842
|
}
|
|
3843
3843
|
if (Nt.size > 0 || Qt.length > 0 || ln.length > 0) {
|
|
3844
3844
|
const D = new Set(Qt);
|
|
3845
3845
|
o((V) => {
|
|
3846
3846
|
const re = V.data.filter((Ye) => !D.has(String(Ye.id))).map((Ye) => {
|
|
3847
|
-
const
|
|
3848
|
-
return
|
|
3847
|
+
const Rt = Nt.get(String(Ye.id));
|
|
3848
|
+
return Rt ? { ...Ye, ...Rt } : Ye;
|
|
3849
3849
|
});
|
|
3850
3850
|
return {
|
|
3851
3851
|
data: [...ln.map((Ye) => Ye.row), ...re],
|
|
@@ -3867,7 +3867,7 @@ function Jg({
|
|
|
3867
3867
|
ft(D) !== "self" && yt.note([re], ft(D), "create");
|
|
3868
3868
|
}
|
|
3869
3869
|
}, ve = (ye) => {
|
|
3870
|
-
for (const pe of ye.flatMap((Ce) =>
|
|
3870
|
+
for (const pe of ye.flatMap((Ce) => bp(Ce))) {
|
|
3871
3871
|
const Ce = pe.changed_fields;
|
|
3872
3872
|
if (!pe.action && (Ce != null && Ce.length) && Ce.every((Re) => Re.startsWith("$"))) {
|
|
3873
3873
|
(String(pe.item) === "*" || ls.current.has(String(pe.item))) && l(Ce);
|
|
@@ -3876,63 +3876,63 @@ function Jg({
|
|
|
3876
3876
|
u.push(pe);
|
|
3877
3877
|
}
|
|
3878
3878
|
u.length > 0 && !m && (m = setTimeout(() => void z(), 300));
|
|
3879
|
-
}, ue = (ye) =>
|
|
3879
|
+
}, ue = (ye) => Du(ds, ye, ve);
|
|
3880
3880
|
or.current = ue;
|
|
3881
3881
|
const G = na.subscribeCollections([n], (ye) => ps([ye], ue)), wt = (ye) => ps(ye, ve);
|
|
3882
3882
|
return ra.current = wt, () => {
|
|
3883
|
-
be = !0, ra.current === wt && (ra.current = null), G(), or.current = null,
|
|
3883
|
+
be = !0, ra.current === wt && (ra.current = null), G(), or.current = null, Pu(ds), t.cancel(), s && clearTimeout(s), m && clearTimeout(m), x.cancel(), j.cancel();
|
|
3884
3884
|
};
|
|
3885
|
-
}, [na, n, L, f,
|
|
3885
|
+
}, [na, n, L, f, Mn, yt, ds, ps]);
|
|
3886
3886
|
const fs = Z(null);
|
|
3887
3887
|
se(() => {
|
|
3888
3888
|
if (!n) return;
|
|
3889
|
-
const e =
|
|
3890
|
-
return e && !fs.current && (fs.current = e),
|
|
3889
|
+
const e = ip(`cbv:${n}`);
|
|
3890
|
+
return e && !fs.current && (fs.current = e), dp(na, `cbv:${n}`, [n]);
|
|
3891
3891
|
}, [na, n]);
|
|
3892
|
-
const
|
|
3892
|
+
const Wd = Z({ phase: "wait" });
|
|
3893
3893
|
se(() => {
|
|
3894
|
-
const e =
|
|
3894
|
+
const e = Wd.current;
|
|
3895
3895
|
if (e.phase === "done" || !lt || !fe || cn) return;
|
|
3896
3896
|
if (e.phase === "refetching") {
|
|
3897
3897
|
if (gt) return;
|
|
3898
|
-
e.phase = "done",
|
|
3898
|
+
e.phase = "done", wp(yt.rootRef.current, cp(e.before, fe.data));
|
|
3899
3899
|
return;
|
|
3900
3900
|
}
|
|
3901
3901
|
const t = fs.current, s = !!t && Zn > 0 && Zn <= t.leftAt ? ki(t) : "fresh";
|
|
3902
3902
|
if (s === "replay" && t && ra.current)
|
|
3903
3903
|
ra.current(t.events);
|
|
3904
3904
|
else if (s === "refetch" || s === "replay" && !ra.current) {
|
|
3905
|
-
e.phase = "refetching", e.before = fe.data, gt || ea(),
|
|
3905
|
+
e.phase = "refetching", e.before = fe.data, gt || ea(), Ft(!1);
|
|
3906
3906
|
return;
|
|
3907
3907
|
}
|
|
3908
|
-
e.phase = "done",
|
|
3908
|
+
e.phase = "done", Ft(!1);
|
|
3909
3909
|
}, [lt, fe, cn, gt, Zn]);
|
|
3910
3910
|
const ho = Z(!1);
|
|
3911
3911
|
se(() => {
|
|
3912
3912
|
var l;
|
|
3913
3913
|
if (ho.current || !lt || !fe || cn) return;
|
|
3914
3914
|
ho.current = !0;
|
|
3915
|
-
const e =
|
|
3915
|
+
const e = up();
|
|
3916
3916
|
if (!e || e.list !== `cbv:${n}`) return;
|
|
3917
|
-
const t =
|
|
3918
|
-
if (!(e.entry && t && e.entry === t ||
|
|
3917
|
+
const t = rp();
|
|
3918
|
+
if (!(e.entry && t && e.entry === t || sp())) return;
|
|
3919
3919
|
const r = String(e.current.id), s = String(((l = e.opened) == null ? void 0 : l.id) ?? r) !== r;
|
|
3920
3920
|
setTimeout(() => {
|
|
3921
3921
|
var x;
|
|
3922
3922
|
const o = yt.rootRef.current;
|
|
3923
|
-
if (!
|
|
3923
|
+
if (!pp(o, r) || !s) return;
|
|
3924
3924
|
const u = typeof CSS < "u" && CSS.escape ? CSS.escape(r) : r, m = o == null ? void 0 : o.querySelector(`[data-row-key="${u}"]`);
|
|
3925
|
-
m && !
|
|
3925
|
+
m && !mp(m) && ((x = m.scrollIntoView) == null || x.call(m, { block: "nearest" }));
|
|
3926
3926
|
}, 260);
|
|
3927
3927
|
}, [lt, fe, cn, n]);
|
|
3928
|
-
const
|
|
3928
|
+
const zd = wi(
|
|
3929
3929
|
n,
|
|
3930
3930
|
ke.map((e) => String(e.id)),
|
|
3931
3931
|
uo
|
|
3932
|
-
), bo =
|
|
3932
|
+
), bo = qp(ke, (e) => String(e.id), yt.rootRef, {
|
|
3933
3933
|
enabled: !R && !xe,
|
|
3934
3934
|
resetKey: JSON.stringify(sr.current)
|
|
3935
|
-
}), { data:
|
|
3935
|
+
}), { data: Fa = [] } = te({
|
|
3936
3936
|
queryKey: ["cbv-risk-rules", n],
|
|
3937
3937
|
queryFn: () => f.request(
|
|
3938
3938
|
X("/at-risk/rules/active", { collection: n })
|
|
@@ -3940,25 +3940,25 @@ function Jg({
|
|
|
3940
3940
|
enabled: !!n,
|
|
3941
3941
|
staleTime: 6e4,
|
|
3942
3942
|
retry: !1
|
|
3943
|
-
}),
|
|
3944
|
-
data:
|
|
3943
|
+
}), Vd = ke.map((e) => String(e.id)).join(","), {
|
|
3944
|
+
data: Hd = {}
|
|
3945
3945
|
} = te({
|
|
3946
|
-
queryKey: ["cbv-risk", n,
|
|
3946
|
+
queryKey: ["cbv-risk", n, Vd],
|
|
3947
3947
|
queryFn: () => f.request(
|
|
3948
3948
|
qe("/at-risk/evaluate", {
|
|
3949
3949
|
collection: n,
|
|
3950
3950
|
ids: ke.map((e) => String(e.id))
|
|
3951
3951
|
})
|
|
3952
3952
|
).then((e) => e.data ?? {}).catch(() => ({})),
|
|
3953
|
-
enabled: !!n &&
|
|
3953
|
+
enabled: !!n && Fa.length > 0 && ke.length > 0,
|
|
3954
3954
|
staleTime: 3e4,
|
|
3955
3955
|
retry: !1
|
|
3956
|
-
}), De = ke.map((e) => String(e.id)).join(","),
|
|
3956
|
+
}), De = ke.map((e) => String(e.id)).join(","), Gd = oe(
|
|
3957
3957
|
() => ke.map((e) => ({ collection: n, id: e.id })),
|
|
3958
3958
|
[ke, n]
|
|
3959
|
-
),
|
|
3960
|
-
() => !!
|
|
3961
|
-
|
|
3959
|
+
), Yd = pf(Gd, qt), hs = !!(T != null && T.addendums_enabled), Jd = oe(
|
|
3960
|
+
() => !!xm(
|
|
3961
|
+
vm(
|
|
3962
3962
|
T == null ? void 0 : T.summary_mode_rules
|
|
3963
3963
|
)
|
|
3964
3964
|
),
|
|
@@ -3996,21 +3996,21 @@ function Jg({
|
|
|
3996
3996
|
placeholderData: (e) => e,
|
|
3997
3997
|
staleTime: 3e4,
|
|
3998
3998
|
retry: !1
|
|
3999
|
-
}), { data:
|
|
3999
|
+
}), { data: Xd = [] } = te({
|
|
4000
4000
|
queryKey: ["cbv-integrations-collections"],
|
|
4001
4001
|
queryFn: () => f.request(X("/integration-obligations/collections")).then((e) => e.data ?? []).catch(() => []),
|
|
4002
4002
|
staleTime: 6e4,
|
|
4003
4003
|
retry: !1
|
|
4004
|
-
}),
|
|
4004
|
+
}), Ea = Xd.includes(n), { data: vs } = te({
|
|
4005
4005
|
queryKey: ["cbv-integrations-summary", n, De],
|
|
4006
4006
|
queryFn: () => f.request(
|
|
4007
4007
|
qe("/integration-obligations/summary", { collection: n, ids: De.split(",") })
|
|
4008
4008
|
).then((e) => e.data ?? {}).catch(() => ({})),
|
|
4009
|
-
enabled: !!n &&
|
|
4009
|
+
enabled: !!n && Ea && De.length > 0,
|
|
4010
4010
|
placeholderData: (e) => e,
|
|
4011
4011
|
staleTime: 3e4,
|
|
4012
4012
|
retry: !1
|
|
4013
|
-
}), { data:
|
|
4013
|
+
}), { data: In } = te({
|
|
4014
4014
|
queryKey: ["cbv-pipeline-instances", n, De],
|
|
4015
4015
|
queryFn: () => f.request(
|
|
4016
4016
|
X(`/pipelines/instances/${n}`, De ? { ids: De } : void 0)
|
|
@@ -4019,9 +4019,9 @@ function Jg({
|
|
|
4019
4019
|
placeholderData: (e) => e,
|
|
4020
4020
|
staleTime: 3e4,
|
|
4021
4021
|
retry: !1
|
|
4022
|
-
}), xo = Xs(
|
|
4023
|
-
() =>
|
|
4024
|
-
[
|
|
4022
|
+
}), xo = Xs(In == null ? void 0 : In.instances), Se = oe(
|
|
4023
|
+
() => In && { ...In, instances: xo ?? null },
|
|
4024
|
+
[In, xo]
|
|
4025
4025
|
), ir = (ni = Se == null ? void 0 : Se.binding) == null ? void 0 : ni.template, { data: jt } = te({
|
|
4026
4026
|
queryKey: ["cbv-pipeline-template", ir, qt ? "full" : "outline"],
|
|
4027
4027
|
queryFn: () => f.request(X(qt ? `/pipelines/${ir}` : `/pipelines/${ir}/outline`)).then((e) => e.data),
|
|
@@ -4033,11 +4033,11 @@ function Jg({
|
|
|
4033
4033
|
X("/erp-submissions/send-status", { collection: n, ids: De })
|
|
4034
4034
|
).then((e) => e.data ?? {}).catch(() => ({})),
|
|
4035
4035
|
enabled: !!n && // Lists with partner sends: the integrations column, or a pipeline (moves send).
|
|
4036
|
-
(
|
|
4036
|
+
(Ea || vo) && De.length > 0 && De.split(",").length <= 100,
|
|
4037
4037
|
placeholderData: (e) => e,
|
|
4038
4038
|
staleTime: 3e4,
|
|
4039
4039
|
retry: !1
|
|
4040
|
-
}), { data:
|
|
4040
|
+
}), { data: Zd } = te({
|
|
4041
4041
|
queryKey: ["cbv-owners", n, De],
|
|
4042
4042
|
queryFn: () => f.request(
|
|
4043
4043
|
qe(`/pipelines/instance/${n}/owners/batch`, {
|
|
@@ -4049,11 +4049,11 @@ function Jg({
|
|
|
4049
4049
|
placeholderData: (e) => e,
|
|
4050
4050
|
staleTime: 6e4,
|
|
4051
4051
|
retry: !1
|
|
4052
|
-
}), ys = Xs(
|
|
4052
|
+
}), ys = Xs(Zd), yo = oe(
|
|
4053
4053
|
() => le.filter((e) => e.includes(".")),
|
|
4054
4054
|
[le]
|
|
4055
4055
|
), ko = oe(
|
|
4056
|
-
() => le.filter((e) => e.startsWith("__f:")).flatMap((e) =>
|
|
4056
|
+
() => le.filter((e) => e.startsWith("__f:")).flatMap((e) => Fu(Xe[e] ?? "")).filter((e) => e.includes(".")),
|
|
4057
4057
|
[le, Xe]
|
|
4058
4058
|
), sa = oe(
|
|
4059
4059
|
() => [.../* @__PURE__ */ new Set([...yo, ...Object.values(dt), ...ko])].slice(
|
|
@@ -4064,14 +4064,14 @@ function Jg({
|
|
|
4064
4064
|
), wo = ke.map((e) => String(e.id)).join(",");
|
|
4065
4065
|
mo.current = {
|
|
4066
4066
|
resolved: new Set(sa.map((e) => e.split(".")[0])),
|
|
4067
|
-
risk: sh(
|
|
4067
|
+
risk: sh(Fa)
|
|
4068
4068
|
};
|
|
4069
4069
|
const _o = (e) => f.request(
|
|
4070
4070
|
X(`/items/${n}/resolve-paths`, {
|
|
4071
4071
|
ids: e,
|
|
4072
4072
|
paths: sa.join(",")
|
|
4073
4073
|
})
|
|
4074
|
-
).then((t) => t.data ?? { rows: {}, targets: {} }), { data:
|
|
4074
|
+
).then((t) => t.data ?? { rows: {}, targets: {} }), { data: Kn } = te({
|
|
4075
4075
|
queryKey: ["cbv-resolved", n, wo, sa.join(",")],
|
|
4076
4076
|
queryFn: () => _o(wo),
|
|
4077
4077
|
enabled: ke.length > 0 && sa.length > 0,
|
|
@@ -4079,11 +4079,11 @@ function Jg({
|
|
|
4079
4079
|
placeholderData: (e) => e,
|
|
4080
4080
|
staleTime: 3e4,
|
|
4081
4081
|
retry: !1
|
|
4082
|
-
}), No = Xs(
|
|
4083
|
-
() =>
|
|
4084
|
-
[
|
|
4082
|
+
}), No = Xs(Kn == null ? void 0 : Kn.rows), Oe = oe(
|
|
4083
|
+
() => Kn && { ...Kn, rows: No ?? {} },
|
|
4084
|
+
[Kn, No]
|
|
4085
4085
|
);
|
|
4086
|
-
|
|
4086
|
+
yp();
|
|
4087
4087
|
const Bt = (e, t) => {
|
|
4088
4088
|
var l, o, u;
|
|
4089
4089
|
const r = t.includes(".") ? t : dt[t];
|
|
@@ -4094,14 +4094,14 @@ function Jg({
|
|
|
4094
4094
|
var r;
|
|
4095
4095
|
const t = e.includes(".") ? e : dt[e];
|
|
4096
4096
|
return t ? ((r = Oe == null ? void 0 : Oe.targets) == null ? void 0 : r[t]) ?? null : null;
|
|
4097
|
-
},
|
|
4097
|
+
}, ec = (e, t) => {
|
|
4098
4098
|
var o, u, m, x;
|
|
4099
4099
|
const r = t.includes(".") ? t : dt[t];
|
|
4100
4100
|
if (!r) return null;
|
|
4101
4101
|
const s = (o = Oe == null ? void 0 : Oe.targets) == null ? void 0 : o[r], l = ((x = (m = (u = Oe == null ? void 0 : Oe.rows) == null ? void 0 : u[String(e)]) == null ? void 0 : m[r]) == null ? void 0 : x.ids) ?? [];
|
|
4102
4102
|
return !s || zt(s) || l.length === 0 ? null : { target: s, id: String(l[0]) };
|
|
4103
4103
|
}, pn = (e) => e.includes(".") || e in dt;
|
|
4104
|
-
eo.current = (e) =>
|
|
4104
|
+
eo.current = (e) => gu({
|
|
4105
4105
|
qc: L,
|
|
4106
4106
|
collection: n,
|
|
4107
4107
|
rows: e,
|
|
@@ -4110,8 +4110,8 @@ function Jg({
|
|
|
4110
4110
|
resolveList: sa,
|
|
4111
4111
|
isResolvedCol: pn,
|
|
4112
4112
|
fetchResolved: _o,
|
|
4113
|
-
fetchRelation: (t, r) =>
|
|
4114
|
-
userCardQuery: (t) =>
|
|
4113
|
+
fetchRelation: (t, r) => id(f, t, r),
|
|
4114
|
+
userCardQuery: (t) => Lm(f, t)
|
|
4115
4115
|
});
|
|
4116
4116
|
const la = (e) => {
|
|
4117
4117
|
if (e.includes(".")) return { kind: "text", path: e.split(".") };
|
|
@@ -4129,7 +4129,7 @@ function Jg({
|
|
|
4129
4129
|
}, rt = (e, t) => vn((r) => {
|
|
4130
4130
|
const s = { ...r };
|
|
4131
4131
|
return t ? s[e] = t : delete s[e], s;
|
|
4132
|
-
}),
|
|
4132
|
+
}), tc = (e) => {
|
|
4133
4133
|
var u, m, x, A;
|
|
4134
4134
|
const { key: t, row: r, cellText: s } = e, l = r.id;
|
|
4135
4135
|
if (t === "__state__") {
|
|
@@ -4174,11 +4174,11 @@ function Jg({
|
|
|
4174
4174
|
j && rt(t, { kind: "date", value: `r:${j}..${j}` });
|
|
4175
4175
|
}
|
|
4176
4176
|
}
|
|
4177
|
-
},
|
|
4177
|
+
}, nc = (e, t) => {
|
|
4178
4178
|
if (e === "__state__") return !1;
|
|
4179
4179
|
const r = la(e);
|
|
4180
4180
|
return r ? r.kind === "in" ? !!xt(it, n, e) && t[e] != null : r.kind === "enum" || r.kind === "num" ? t[e] != null && t[e] !== "" : r.kind === "text" : !1;
|
|
4181
|
-
},
|
|
4181
|
+
}, ac = (e) => {
|
|
4182
4182
|
const { key: t, row: r, cellText: s } = e, l = r.id, o = la(t);
|
|
4183
4183
|
if (!o) return;
|
|
4184
4184
|
let u = null;
|
|
@@ -4192,7 +4192,7 @@ function Jg({
|
|
|
4192
4192
|
x && x !== "—" && (u = { id: m, path: o.path, op: "_ncontains", value: x, label: x, field: t });
|
|
4193
4193
|
}
|
|
4194
4194
|
u && bl((x) => [...x, u]);
|
|
4195
|
-
},
|
|
4195
|
+
}, rc = (e) => {
|
|
4196
4196
|
var s, l, o;
|
|
4197
4197
|
const t = la(e);
|
|
4198
4198
|
if (!t) return null;
|
|
@@ -4246,7 +4246,7 @@ function Jg({
|
|
|
4246
4246
|
{
|
|
4247
4247
|
value: u,
|
|
4248
4248
|
onChange: (x) => rt(e, { kind: "num", op: x, value: m }),
|
|
4249
|
-
options:
|
|
4249
|
+
options: cd.map((x) => ({ value: x.value, label: x.label })),
|
|
4250
4250
|
ariaLabel: `Filter operator ${e}`
|
|
4251
4251
|
}
|
|
4252
4252
|
),
|
|
@@ -4282,13 +4282,13 @@ function Jg({
|
|
|
4282
4282
|
onChange: (u) => rt(e, u ? { kind: "date", value: u } : null)
|
|
4283
4283
|
}
|
|
4284
4284
|
) : null;
|
|
4285
|
-
},
|
|
4285
|
+
}, sc = le.some((e) => la(e) != null), oa = (e) => {
|
|
4286
4286
|
var r, s;
|
|
4287
4287
|
if (((r = de[e]) == null ? void 0 : r.type) === "number") return !0;
|
|
4288
4288
|
if (e.includes(".") || e in dt || xt(it, n, e)) return !1;
|
|
4289
4289
|
const t = (s = nt.get(e)) == null ? void 0 : s.type;
|
|
4290
4290
|
return t === "integer" || t === "decimal" || t === "float";
|
|
4291
|
-
},
|
|
4291
|
+
}, lc = (e) => {
|
|
4292
4292
|
var r;
|
|
4293
4293
|
if (e.includes(".") || e in dt) return !1;
|
|
4294
4294
|
const t = String(((r = nt.get(e)) == null ? void 0 : r.type) ?? "").toLowerCase();
|
|
@@ -4297,7 +4297,7 @@ function Jg({
|
|
|
4297
4297
|
var l, o, u;
|
|
4298
4298
|
const s = de[t];
|
|
4299
4299
|
if ((s == null ? void 0 : s.type) === "count") {
|
|
4300
|
-
const m = t.includes(".") ? t : dt[t], x = r != null && m ? (u = (o = (l = Oe == null ? void 0 : Oe.rows) == null ? void 0 : l[String(r)]) == null ? void 0 : o[m]) == null ? void 0 : u.ids : void 0, A =
|
|
4300
|
+
const m = t.includes(".") ? t : dt[t], x = r != null && m ? (u = (o = (l = Oe == null ? void 0 : Oe.rows) == null ? void 0 : l[String(r)]) == null ? void 0 : o[m]) == null ? void 0 : u.ids : void 0, A = Mu(e === "—" ? "" : e, x);
|
|
4301
4301
|
return Ct(A);
|
|
4302
4302
|
}
|
|
4303
4303
|
return s && e && e !== "—" ? vi(e, s) : e;
|
|
@@ -4308,7 +4308,7 @@ function Jg({
|
|
|
4308
4308
|
queryKey: ["cbv-views", n],
|
|
4309
4309
|
queryFn: () => f.request(X("/saved-views", { collection: n })).then((e) => e.data ?? []),
|
|
4310
4310
|
staleTime: 3e4
|
|
4311
|
-
}), da = () => L.invalidateQueries({ queryKey: ["cbv-views", n] }),
|
|
4311
|
+
}), da = () => L.invalidateQueries({ queryKey: ["cbv-views", n] }), oc = Ka({
|
|
4312
4312
|
queries: Ve.slice(0, 12).map((e) => {
|
|
4313
4313
|
const t = sl(e.filters ?? []);
|
|
4314
4314
|
return {
|
|
@@ -4328,7 +4328,7 @@ function Jg({
|
|
|
4328
4328
|
}), ws = /* @__PURE__ */ new Map();
|
|
4329
4329
|
Ve.slice(0, 12).forEach((e, t) => {
|
|
4330
4330
|
var r;
|
|
4331
|
-
ws.set(e.id, ((r =
|
|
4331
|
+
ws.set(e.id, ((r = oc[t]) == null ? void 0 : r.data) ?? null);
|
|
4332
4332
|
});
|
|
4333
4333
|
const { data: ca } = te({
|
|
4334
4334
|
queryKey: ["cbv-view-opened", n],
|
|
@@ -4336,7 +4336,7 @@ function Jg({
|
|
|
4336
4336
|
enabled: !!n && Ve.length > 0,
|
|
4337
4337
|
staleTime: 6e4,
|
|
4338
4338
|
retry: !1
|
|
4339
|
-
}),
|
|
4339
|
+
}), ic = Ka({
|
|
4340
4340
|
queries: Ve.slice(0, 12).map((e) => {
|
|
4341
4341
|
const t = (ca == null ? void 0 : ca[String(e.id)]) ?? "", r = Li(sl(e.filters ?? []), t);
|
|
4342
4342
|
return {
|
|
@@ -4350,11 +4350,11 @@ function Jg({
|
|
|
4350
4350
|
placeholderData: (s) => s
|
|
4351
4351
|
};
|
|
4352
4352
|
})
|
|
4353
|
-
}),
|
|
4353
|
+
}), Oa = /* @__PURE__ */ new Map();
|
|
4354
4354
|
Ve.slice(0, 12).forEach((e, t) => {
|
|
4355
4355
|
var s;
|
|
4356
|
-
const r = (s =
|
|
4357
|
-
e.id !== Pe && (ca != null && ca[String(e.id)]) && typeof r == "number" && r > 0 &&
|
|
4356
|
+
const r = (s = ic[t]) == null ? void 0 : s.data;
|
|
4357
|
+
e.id !== Pe && (ca != null && ca[String(e.id)]) && typeof r == "number" && r > 0 && Oa.set(e.id, r);
|
|
4358
4358
|
});
|
|
4359
4359
|
const _s = Z(!1), $o = Z(null), [Ns, Ss] = w(null), qo = Pe != null && Ve.some((e) => e.id === Pe);
|
|
4360
4360
|
se(() => {
|
|
@@ -4380,7 +4380,7 @@ function Jg({
|
|
|
4380
4380
|
l = !0;
|
|
4381
4381
|
};
|
|
4382
4382
|
}, [Pe, qo, n, f, L]);
|
|
4383
|
-
const dr = Ns && Ns.viewId === Pe ? Ns.since : null, { data:
|
|
4383
|
+
const dr = Ns && Ns.viewId === Pe ? Ns.since : null, { data: dc } = te({
|
|
4384
4384
|
queryKey: ["cbv-view-changed-rows", n, dr, De],
|
|
4385
4385
|
queryFn: () => {
|
|
4386
4386
|
const e = De.split(",");
|
|
@@ -4398,28 +4398,28 @@ function Jg({
|
|
|
4398
4398
|
placeholderData: (e) => e,
|
|
4399
4399
|
staleTime: Number.POSITIVE_INFINITY,
|
|
4400
4400
|
retry: !1
|
|
4401
|
-
}), Cs = dr ?
|
|
4401
|
+
}), Cs = dr ? dc : void 0, [To, cc] = w(() => /* @__PURE__ */ new Set()), cr = (e) => {
|
|
4402
4402
|
var r, s;
|
|
4403
|
-
|
|
4403
|
+
Yn(e.id);
|
|
4404
4404
|
const t = Pi(e.filters ?? []);
|
|
4405
4405
|
if (We(t.filters), tr(t.riskIds), ut(e.sort ?? ""), (r = e.columns) != null && r.length) {
|
|
4406
4406
|
const l = new Set(
|
|
4407
|
-
e.columns.filter((G) => typeof G != "string" && G.admin_only).map(
|
|
4407
|
+
e.columns.filter((G) => typeof G != "string" && G.admin_only).map(Hi)
|
|
4408
4408
|
);
|
|
4409
|
-
|
|
4410
|
-
const o = e.columns.map(
|
|
4409
|
+
cc(l);
|
|
4410
|
+
const o = e.columns.map(Hi).filter((G) => qt || !l.has(G)), u = {};
|
|
4411
4411
|
for (const G of e.columns)
|
|
4412
4412
|
typeof G != "string" && G.formula && G.key.startsWith("__f:") && (u[G.key] = G.formula);
|
|
4413
4413
|
Vt(u);
|
|
4414
4414
|
const m = o.filter(
|
|
4415
|
-
(G) => G.includes(".") || nt.has(G) || G ===
|
|
4415
|
+
(G) => G.includes(".") || nt.has(G) || G === Qn || !!u[G]
|
|
4416
4416
|
);
|
|
4417
4417
|
m.length > 0 && ae(m);
|
|
4418
4418
|
const x = {}, A = {}, j = {};
|
|
4419
4419
|
let be = !1;
|
|
4420
4420
|
const z = {}, ve = {}, ue = {};
|
|
4421
4421
|
for (const G of e.columns)
|
|
4422
|
-
typeof G != "string" && G.label && (x[G.key] = G.label), typeof G != "string" && G.format && (A[G.key] = G.format), typeof G != "string" && G.pin && (be = !0, G.pin !== "none" && (j[G.key] = G.pin)), typeof G != "string" && ((s = G.tint) != null && s.length) && (z[G.key] = G.tint), typeof G != "string" && G.width && (ve[G.key] = G.width), typeof G != "string" &&
|
|
4422
|
+
typeof G != "string" && G.label && (x[G.key] = G.label), typeof G != "string" && G.format && (A[G.key] = G.format), typeof G != "string" && G.pin && (be = !0, G.pin !== "none" && (j[G.key] = G.pin)), typeof G != "string" && ((s = G.tint) != null && s.length) && (z[G.key] = G.tint), typeof G != "string" && G.width && (ve[G.key] = G.width), typeof G != "string" && p0(G.agg) && (ue[G.key] = G.agg);
|
|
4423
4423
|
pt(ue), Ge(x), W(A), ge(z), ee(ve), er(be ? j : null);
|
|
4424
4424
|
} else
|
|
4425
4425
|
pt({}), er(null);
|
|
@@ -4430,14 +4430,14 @@ function Jg({
|
|
|
4430
4430
|
cr(e);
|
|
4431
4431
|
return;
|
|
4432
4432
|
}
|
|
4433
|
-
|
|
4434
|
-
},
|
|
4433
|
+
Yn(null), We([]), tr([]), ut(c ?? ""), ae(h ?? null), Ge({}), Vt({}), W({}), pt({}), er(null), K(1);
|
|
4434
|
+
}, Pa = () => ({
|
|
4435
4435
|
// The pressed highlight pills ride along as one `$at_risk` filter entry.
|
|
4436
|
-
filters: [..._e, ...[
|
|
4436
|
+
filters: [..._e, ...[T0(It, Fa)].filter((e) => e !== null)],
|
|
4437
4437
|
sort: ie,
|
|
4438
4438
|
columns: [
|
|
4439
4439
|
...le.map((e, t) => {
|
|
4440
|
-
const r = me[e], s = de[e], l =
|
|
4440
|
+
const r = me[e], s = de[e], l = En[e] ?? (t === 0 && Za !== null ? "none" : void 0), o = he[e], u = _[e], m = qa.includes(e) ? Ke[e] : void 0, x = Xe[e];
|
|
4441
4441
|
return !r && !s && !l && !(o != null && o.length) && !u && !m && !x && !To.has(e) ? e : {
|
|
4442
4442
|
key: e,
|
|
4443
4443
|
...x ? { formula: x } : {},
|
|
@@ -4462,15 +4462,15 @@ function Jg({
|
|
|
4462
4462
|
"__integrations__",
|
|
4463
4463
|
"__tasks__",
|
|
4464
4464
|
"__actions__"
|
|
4465
|
-
].filter((e) =>
|
|
4465
|
+
].filter((e) => En[e]).map((e) => ({ key: e, pin: En[e] }))
|
|
4466
4466
|
]
|
|
4467
4467
|
});
|
|
4468
4468
|
se(() => {
|
|
4469
|
-
if (
|
|
4470
|
-
|
|
4469
|
+
if (Ga.current || Ve.length === 0 || Mt.length === 0) return;
|
|
4470
|
+
Ga.current = !0;
|
|
4471
4471
|
const e = Ve.find((t) => t.role_default) ?? Ve.find((t) => t.is_default);
|
|
4472
4472
|
e && Pe == null && (cr(e), H && K(H));
|
|
4473
|
-
}, [Ve,
|
|
4473
|
+
}, [Ve, Mt]);
|
|
4474
4474
|
const { data: Ro = [] } = te({
|
|
4475
4475
|
queryKey: ["cbv-export-presets", n],
|
|
4476
4476
|
queryFn: () => f.request(
|
|
@@ -4499,14 +4499,14 @@ function Jg({
|
|
|
4499
4499
|
})
|
|
4500
4500
|
).then((s) => {
|
|
4501
4501
|
const l = s.data;
|
|
4502
|
-
if (
|
|
4503
|
-
|
|
4502
|
+
if (qu(l)) {
|
|
4503
|
+
Tu(l, {
|
|
4504
4504
|
read: () => f.request(X(`/export-runs/${l.run_id}`)).then((u) => u.data)
|
|
4505
4505
|
});
|
|
4506
4506
|
return;
|
|
4507
4507
|
}
|
|
4508
4508
|
const o = new URLSearchParams();
|
|
4509
|
-
Y && o.set("search", Y), Ne && o.set("conditions", Ne), ie && o.set("sort", ie),
|
|
4509
|
+
Y && o.set("search", Y), Ne && o.set("conditions", Ne), ie && o.set("sort", ie), Lu(`/api/export-presets/${e}/run?${o.toString()}`);
|
|
4510
4510
|
}).catch(
|
|
4511
4511
|
(s) => Gs(s, `Could not start the “${t}” export`, {
|
|
4512
4512
|
retry: () => $s(e, t, r)
|
|
@@ -4515,19 +4515,19 @@ function Jg({
|
|
|
4515
4515
|
}, qs = Z(!1);
|
|
4516
4516
|
se(() => {
|
|
4517
4517
|
var e;
|
|
4518
|
-
qs.current || !g ||
|
|
4518
|
+
qs.current || !g || Mt.length === 0 || (qs.current = !0, (e = g.c) != null && e.length && (cr({
|
|
4519
4519
|
id: -1,
|
|
4520
4520
|
filters: g.f ?? [],
|
|
4521
4521
|
sort: g.s ?? null,
|
|
4522
4522
|
columns: g.c
|
|
4523
|
-
}),
|
|
4524
|
-
}, [
|
|
4523
|
+
}), Yn(null), K(g.p ?? 1)));
|
|
4524
|
+
}, [Mt]);
|
|
4525
4525
|
const Oo = Z(!1);
|
|
4526
4526
|
se(() => {
|
|
4527
|
-
Oo.current || !(g != null && g.v) || !ks || qs.current && (Oo.current = !0, Ve.some((e) => e.id === g.v) &&
|
|
4528
|
-
}, [Ve, ks,
|
|
4527
|
+
Oo.current || !(g != null && g.v) || !ks || qs.current && (Oo.current = !0, Ve.some((e) => e.id === g.v) && Yn(g.v));
|
|
4528
|
+
}, [Ve, ks, Mt]);
|
|
4529
4529
|
const Ts = () => {
|
|
4530
|
-
const e =
|
|
4530
|
+
const e = Pa();
|
|
4531
4531
|
return {
|
|
4532
4532
|
...Pe != null && Pe > 0 ? { v: Pe } : {},
|
|
4533
4533
|
q: Y,
|
|
@@ -4537,7 +4537,7 @@ function Jg({
|
|
|
4537
4537
|
qf: ht,
|
|
4538
4538
|
cf: Ze,
|
|
4539
4539
|
lc: Gt,
|
|
4540
|
-
ex:
|
|
4540
|
+
ex: Ln,
|
|
4541
4541
|
...R ? { g: R } : {},
|
|
4542
4542
|
ps: et,
|
|
4543
4543
|
...I > 1 ? { p: I } : {},
|
|
@@ -4548,15 +4548,15 @@ function Jg({
|
|
|
4548
4548
|
const e = [], t = (r = Ve.find((s) => s.id === Pe)) == null ? void 0 : r.name;
|
|
4549
4549
|
t && e.push(t);
|
|
4550
4550
|
for (const s of _e) {
|
|
4551
|
-
const l =
|
|
4551
|
+
const l = md(s);
|
|
4552
4552
|
e.push(l.value ? `${l.field}: ${l.value}` : l.field);
|
|
4553
4553
|
}
|
|
4554
4554
|
return Y && e.push(`“${Y}”`), e.length ? e.join(", ").slice(0, 160) : null;
|
|
4555
|
-
}, pr = lt &&
|
|
4555
|
+
}, pr = lt && Mt.length > 0 && ks && (Ga.current || Ve.length === 0), Ls = Z(null);
|
|
4556
4556
|
se(() => {
|
|
4557
4557
|
if (!pr || !n) return;
|
|
4558
|
-
const e = `cbv:${n}`, t = Ts(), r =
|
|
4559
|
-
Ls.current == null && (Ls.current = g ? "" : r, !g) ||
|
|
4558
|
+
const e = `cbv:${n}`, t = Ts(), r = Zu(e, t);
|
|
4559
|
+
Ls.current == null && (Ls.current = g ? "" : r, !g) || ep(e, r === Ls.current ? null : t);
|
|
4560
4560
|
}, [
|
|
4561
4561
|
pr,
|
|
4562
4562
|
n,
|
|
@@ -4578,7 +4578,7 @@ function Jg({
|
|
|
4578
4578
|
ht,
|
|
4579
4579
|
Ze,
|
|
4580
4580
|
Gt,
|
|
4581
|
-
|
|
4581
|
+
Ln,
|
|
4582
4582
|
R,
|
|
4583
4583
|
et,
|
|
4584
4584
|
I,
|
|
@@ -4586,31 +4586,31 @@ function Jg({
|
|
|
4586
4586
|
Pe,
|
|
4587
4587
|
bt
|
|
4588
4588
|
]);
|
|
4589
|
-
const Do =
|
|
4589
|
+
const Do = Mp({
|
|
4590
4590
|
view: ((ai = Ve.find((e) => e.id === Pe)) == null ? void 0 : ai.name) ?? null,
|
|
4591
4591
|
search: Y,
|
|
4592
|
-
filters: _e.length + It.length + Object.entries(ht).filter(([e, t]) => t.length > 0 &&
|
|
4592
|
+
filters: _e.length + It.length + Object.entries(ht).filter(([e, t]) => t.length > 0 && !qn.has(e)).length + Object.keys(Ze).length + Ln.length + Gt.length + (an ? 1 : 0),
|
|
4593
4593
|
page: I
|
|
4594
4594
|
});
|
|
4595
4595
|
se(() => {
|
|
4596
|
-
pr &&
|
|
4596
|
+
pr && Ap(Do);
|
|
4597
4597
|
}, [pr, Do]);
|
|
4598
|
-
const Rs = () => Object.fromEntries(
|
|
4599
|
-
pt(e), gn((t) =>
|
|
4598
|
+
const Rs = () => Object.fromEntries(qa.map((e) => [e, Ke[e]])), Fs = (e) => {
|
|
4599
|
+
pt(e), gn((t) => h0(t, e));
|
|
4600
4600
|
}, mr = Wt({
|
|
4601
4601
|
mutationFn: async () => {
|
|
4602
4602
|
const e = Rs();
|
|
4603
4603
|
return { r: await f.request(
|
|
4604
|
-
qe("/saved-views", { collection: n, name:
|
|
4604
|
+
qe("/saved-views", { collection: n, name: Rn.trim(), ...Pa() })
|
|
4605
4605
|
), aggs: e };
|
|
4606
4606
|
},
|
|
4607
4607
|
onSuccess: ({ r: e, aggs: t }) => {
|
|
4608
|
-
Ur(!1), Qr(""),
|
|
4608
|
+
Ur(!1), Qr(""), Yn(e.data.id), Fs(t), da();
|
|
4609
4609
|
}
|
|
4610
4610
|
}), [Es, Mo] = w(null), mn = Wt({
|
|
4611
4611
|
mutationFn: async (e) => {
|
|
4612
4612
|
const t = Rs();
|
|
4613
|
-
return await f.request(Nr(`/saved-views/${e}`,
|
|
4613
|
+
return await f.request(Nr(`/saved-views/${e}`, Pa())), { aggs: t };
|
|
4614
4614
|
},
|
|
4615
4615
|
onSuccess: ({ aggs: e }, t) => {
|
|
4616
4616
|
var s;
|
|
@@ -4619,22 +4619,22 @@ function Jg({
|
|
|
4619
4619
|
Fe.success(r ? `Saved "${r}" with the current columns and filters` : "View saved");
|
|
4620
4620
|
},
|
|
4621
4621
|
onError: (e) => Fe.error(`Could not save the view: ${e.message}`)
|
|
4622
|
-
}),
|
|
4622
|
+
}), uc = Wt({
|
|
4623
4623
|
mutationFn: ({ id: e, on: t }) => f.request(Nr(`/saved-views/${e}`, { is_default: t })),
|
|
4624
4624
|
onSuccess: da
|
|
4625
|
-
}),
|
|
4625
|
+
}), pc = Wt({
|
|
4626
4626
|
mutationFn: ({ id: e, role: t }) => f.request(Nr(`/saved-views/${e}`, { default_for_role: t })),
|
|
4627
4627
|
onSuccess: da,
|
|
4628
4628
|
onError: (e) => Fe.error(`Could not set the role default: ${e.message}`)
|
|
4629
4629
|
}), Ao = Wt({
|
|
4630
4630
|
mutationFn: async () => {
|
|
4631
4631
|
const e = Ve.find((r) => r.is_default), t = Rs();
|
|
4632
|
-
return e ? await f.request(Nr(`/saved-views/${e.id}`, { ...
|
|
4633
|
-
qe("/saved-views", { collection: n, name: "Default", is_default: !0, ...
|
|
4632
|
+
return e ? await f.request(Nr(`/saved-views/${e.id}`, { ...Pa(), is_default: !0 })) : await f.request(
|
|
4633
|
+
qe("/saved-views", { collection: n, name: "Default", is_default: !0, ...Pa() })
|
|
4634
4634
|
), { aggs: t, id: (e == null ? void 0 : e.id) ?? null };
|
|
4635
4635
|
},
|
|
4636
4636
|
onSuccess: ({ aggs: e, id: t }) => {
|
|
4637
|
-
t != null && t === Pe && Fs(e),
|
|
4637
|
+
t != null && t === Pe && Fs(e), Hn(!1), da();
|
|
4638
4638
|
}
|
|
4639
4639
|
}), Io = Wt({
|
|
4640
4640
|
mutationFn: (e) => f.request(Rr(`/items/${n}/${e}`)),
|
|
@@ -4643,43 +4643,43 @@ function Jg({
|
|
|
4643
4643
|
},
|
|
4644
4644
|
// The server's own sentence (a submitted record is cancelled, not deleted — army 11 N12).
|
|
4645
4645
|
onError: (e) => Fe.error(
|
|
4646
|
-
|
|
4646
|
+
ja(e, "Could not delete this record"),
|
|
4647
4647
|
Fr(e, { action: "Delete" })
|
|
4648
4648
|
)
|
|
4649
|
-
}),
|
|
4649
|
+
}), mc = Wt({
|
|
4650
4650
|
mutationFn: (e) => f.request(Rr(`/saved-views/${e}`)),
|
|
4651
4651
|
onSuccess: (e, t) => {
|
|
4652
4652
|
Pe === t && Lo(), da();
|
|
4653
4653
|
}
|
|
4654
|
-
}), { data:
|
|
4654
|
+
}), { data: fc = [] } = te({
|
|
4655
4655
|
queryKey: ["cbv-view-subs"],
|
|
4656
4656
|
queryFn: () => f.request(X("/view-subscriptions")).then((e) => e.data ?? []).catch(() => []),
|
|
4657
4657
|
staleTime: 6e4
|
|
4658
|
-
}), fr = (e) =>
|
|
4658
|
+
}), fr = (e) => fc.find((t) => t.view_id === e), hc = Wt({
|
|
4659
4659
|
mutationFn: async (e) => {
|
|
4660
4660
|
const t = fr(e);
|
|
4661
4661
|
return t ? f.request(Rr(`/view-subscriptions/${t.id}`)) : f.request(qe("/view-subscriptions", { view_id: e, digest: "daily" }));
|
|
4662
4662
|
},
|
|
4663
4663
|
onSuccess: () => L.invalidateQueries({ queryKey: ["cbv-view-subs"] })
|
|
4664
|
-
}),
|
|
4664
|
+
}), bc = async () => {
|
|
4665
4665
|
var s, l;
|
|
4666
|
-
if (
|
|
4666
|
+
if (Va) return;
|
|
4667
4667
|
gl(!0);
|
|
4668
4668
|
const e = await f.request(X("/export-limits")).then((o) => {
|
|
4669
4669
|
var m;
|
|
4670
4670
|
const u = (m = o == null ? void 0 : o.data) == null ? void 0 : m.browser_rows;
|
|
4671
4671
|
return u === null ? Number.POSITIVE_INFINITY : Number(u) > 0 ? Number(u) : Oi;
|
|
4672
|
-
}).catch(() => Oi), t =
|
|
4672
|
+
}).catch(() => Oi), t = Cu(
|
|
4673
4673
|
(T == null ? void 0 : T.display_name) || Qe(n),
|
|
4674
4674
|
$e > 0 ? Math.min($e, e) : null
|
|
4675
|
-
), r = () =>
|
|
4675
|
+
), r = () => Ru(t.signal);
|
|
4676
4676
|
try {
|
|
4677
|
-
const { rows: o, truncated: u } = await
|
|
4677
|
+
const { rows: o, truncated: u } = await b0((p, B) => (r(), f.request(
|
|
4678
4678
|
X(`/items/${n}`, {
|
|
4679
4679
|
limit: B,
|
|
4680
4680
|
offset: p,
|
|
4681
4681
|
...Y ? { search: Y } : {},
|
|
4682
|
-
sort:
|
|
4682
|
+
sort: g0(ie),
|
|
4683
4683
|
...Ne ? { conditions: Ne } : {}
|
|
4684
4684
|
})
|
|
4685
4685
|
).then((D) => {
|
|
@@ -4692,7 +4692,7 @@ function Jg({
|
|
|
4692
4692
|
if (p.includes(".") || p.startsWith("__") || p in dt) continue;
|
|
4693
4693
|
const B = (s = xt(it, n, p)) == null ? void 0 : s.one_collection;
|
|
4694
4694
|
if (!B) continue;
|
|
4695
|
-
if (
|
|
4695
|
+
if (od.has(B)) {
|
|
4696
4696
|
A.push(p);
|
|
4697
4697
|
continue;
|
|
4698
4698
|
}
|
|
@@ -4706,10 +4706,10 @@ function Jg({
|
|
|
4706
4706
|
x.push({
|
|
4707
4707
|
column: p,
|
|
4708
4708
|
template: (D == null ? void 0 : D.display_template) ?? null,
|
|
4709
|
-
labelField:
|
|
4709
|
+
labelField: Ba(D)
|
|
4710
4710
|
});
|
|
4711
4711
|
}
|
|
4712
|
-
const j = [.../* @__PURE__ */ new Set([...sa, ...x.flatMap(
|
|
4712
|
+
const j = [.../* @__PURE__ */ new Set([...sa, ...x.flatMap(x0)])], be = await v0(
|
|
4713
4713
|
o.map((p) => String(p.id)),
|
|
4714
4714
|
j,
|
|
4715
4715
|
(p, B) => (
|
|
@@ -4731,18 +4731,18 @@ function Jg({
|
|
|
4731
4731
|
].map(String), ve = /* @__PURE__ */ new Map();
|
|
4732
4732
|
await Promise.all(
|
|
4733
4733
|
z.map(
|
|
4734
|
-
(p) =>
|
|
4734
|
+
(p) => Tm(f, p).then((B) => ve.set(p.toUpperCase(), y0(B, p))).catch(() => ve.set(p.toUpperCase(), p))
|
|
4735
4735
|
)
|
|
4736
4736
|
);
|
|
4737
4737
|
const ue = new Map(x.map((p) => [p.column, p])), G = new Set(A), wt = (p) => {
|
|
4738
4738
|
const B = p == null ? "" : String(typeof p == "object" ? JSON.stringify(p) : p);
|
|
4739
4739
|
return /[",\n]/.test(B) ? `"${B.replace(/"/g, '""')}"` : B;
|
|
4740
4740
|
}, ye = (p, B) => {
|
|
4741
|
-
var Ye,
|
|
4741
|
+
var Ye, Rt, Xt;
|
|
4742
4742
|
const D = de[B];
|
|
4743
|
-
if (B ===
|
|
4743
|
+
if (B === Qn) {
|
|
4744
4744
|
const Zt = (Ye = Se == null ? void 0 : Se.instances) == null ? void 0 : Ye[String(p.id)];
|
|
4745
|
-
return Zt && !Zt.completed_at ?
|
|
4745
|
+
return Zt && !Zt.completed_at ? Au(Zt.state_label, Zt.entered_at, Date.now()) ?? "" : "";
|
|
4746
4746
|
}
|
|
4747
4747
|
if (B.startsWith("__f:")) {
|
|
4748
4748
|
const Zt = Xe[B], fa = Zt ? xi(Zt, (Qs) => {
|
|
@@ -4753,16 +4753,16 @@ function Jg({
|
|
|
4753
4753
|
return fa == null ? "" : Math.round(fa * 100) / 100;
|
|
4754
4754
|
}
|
|
4755
4755
|
if (B.includes(".") || B in dt) {
|
|
4756
|
-
const Zt = B.includes(".") ? B : dt[B], fa = ((Xt = (
|
|
4756
|
+
const Zt = B.includes(".") ? B : dt[B], fa = ((Xt = (Rt = be[String(p.id)]) == null ? void 0 : Rt[Zt]) == null ? void 0 : Xt.value) ?? "";
|
|
4757
4757
|
return D && fa ? vi(fa, D) : fa;
|
|
4758
4758
|
}
|
|
4759
4759
|
const V = p[B], re = ue.get(B);
|
|
4760
|
-
return re && V != null && V !== "" ?
|
|
4760
|
+
return re && V != null && V !== "" ? k0(re, be[String(p.id)]) || V : G.has(B) && V != null && V !== "" ? ve.get(String(V).toUpperCase()) ?? V : V != null && V !== "" && ((D == null ? void 0 : D.type) === "number" || oa(B)) ? pu(V) : V != null && V !== "" && ((D == null ? void 0 : D.type) === "datetime" || lc(B)) ? mu(V) : B === "id" ? el(T, p) ?? V : D && V != null ? Sr(String(V), D) : V;
|
|
4761
4761
|
}, pe = rn.filter((p) => p.kind !== "actions"), Ce = new Set(
|
|
4762
4762
|
pe.filter((p) => p.kind !== "data" && p.kind !== "formula").map((p) => p.kind)
|
|
4763
4763
|
), Re = o.map((p) => String(p.id));
|
|
4764
4764
|
r();
|
|
4765
|
-
const k = await
|
|
4765
|
+
const k = await fu(Re, Ce, {
|
|
4766
4766
|
instances: (p) => f.request(
|
|
4767
4767
|
X(`/pipelines/instances/${n}`, { ids: p.join(",") })
|
|
4768
4768
|
).then((B) => {
|
|
@@ -4781,13 +4781,13 @@ function Jg({
|
|
|
4781
4781
|
tasks: (p) => f.request(
|
|
4782
4782
|
qe("/tasks/counts", { collection: n, ids: p })
|
|
4783
4783
|
).then((B) => B.data ?? {})
|
|
4784
|
-
}), Yt =
|
|
4784
|
+
}), Yt = tm(T), ft = Yt ? m.includes(Yt) || m.includes("id") ? [] : [{ header: at(Yt), cell: (p) => p[Yt] }] : m.includes("id") ? [] : [{ header: "ID", cell: (p) => p.id }], sn = (p) => p.kind === "data" || p.kind === "formula" ? at(p.key) : p.kind === "fulfilment" && (Be != null && Be.label) ? `${Be.label} shipped` : hu[p.kind], Ut = Date.now(), Jt = [
|
|
4785
4785
|
[...ft.map((p) => p.header), ...pe.map(sn)].map(wt).join(","),
|
|
4786
4786
|
...o.map(
|
|
4787
4787
|
(p) => [
|
|
4788
4788
|
...ft.map((B) => B.cell(p)),
|
|
4789
4789
|
...pe.map(
|
|
4790
|
-
(B) => B.kind === "data" || B.kind === "formula" ? ye(p, B.key) :
|
|
4790
|
+
(B) => B.kind === "data" || B.kind === "formula" ? ye(p, B.key) : bu(B.kind, String(p.id), k, p, {
|
|
4791
4791
|
now: Ut,
|
|
4792
4792
|
fulfilment: Be
|
|
4793
4793
|
})
|
|
@@ -4811,37 +4811,37 @@ function Jg({
|
|
|
4811
4811
|
).catch(() => {
|
|
4812
4812
|
}), r();
|
|
4813
4813
|
const ma = new Blob([Jt.join(`
|
|
4814
|
-
`)], { type: "text/csv;charset=utf-8" }),
|
|
4815
|
-
Nt.href =
|
|
4814
|
+
`)], { type: "text/csv;charset=utf-8" }), Un = URL.createObjectURL(ma), Nt = document.createElement("a");
|
|
4815
|
+
Nt.href = Un;
|
|
4816
4816
|
const Qt = Ae.export_filename, ln = ((l = Ve.find((p) => p.id === Pe)) == null ? void 0 : l.name) ?? "all";
|
|
4817
|
-
Nt.download = Qt ? `${Qt.replace(/\{\{\s*collection\s*\}\}/g, n).replace(/\{\{\s*view\s*\}\}/g, ln).replace(/\{\{\s*date\s*\}\}/g,
|
|
4817
|
+
Nt.download = Qt ? `${Qt.replace(/\{\{\s*collection\s*\}\}/g, n).replace(/\{\{\s*view\s*\}\}/g, ln).replace(/\{\{\s*date\s*\}\}/g, w0()).replace(/[^A-Za-z0-9 ._-]/g, "")}.csv` : `${n}.csv`, Nt.click(), setTimeout(() => URL.revokeObjectURL(Un), 1e4), t.finish(
|
|
4818
4818
|
`${u ? "First " : ""}${o.length.toLocaleString()} ${o.length === 1 ? "row" : "rows"} · ${Nt.download}`
|
|
4819
4819
|
), u && Fe.warning(`Exported the first ${o.length.toLocaleString()} rows`, {
|
|
4820
4820
|
description: `${$e.toLocaleString()} match — narrow the filter to export the rest.`
|
|
4821
4821
|
});
|
|
4822
4822
|
} catch (o) {
|
|
4823
|
-
o instanceof
|
|
4823
|
+
o instanceof $u || t.signal.aborted ? t.cancelled() : t.fail(o);
|
|
4824
4824
|
} finally {
|
|
4825
4825
|
gl(!1);
|
|
4826
4826
|
}
|
|
4827
|
-
}, bc = (e) => {
|
|
4828
|
-
const t = `record:${n}:${String(e)}`;
|
|
4829
|
-
return Qp(t, () => Wp(L, f, n, String(e), { group: t }));
|
|
4830
4827
|
}, gc = (e) => {
|
|
4831
|
-
const t =
|
|
4828
|
+
const t = `record:${n}:${String(e)}`;
|
|
4829
|
+
return Wp(t, () => zp(L, f, n, String(e), { group: t }));
|
|
4830
|
+
}, xc = (e) => {
|
|
4831
|
+
const t = gc(e);
|
|
4832
4832
|
return {
|
|
4833
4833
|
...t,
|
|
4834
|
-
tabIndex: String(e) ===
|
|
4834
|
+
tabIndex: String(e) === Pc ? 0 : -1,
|
|
4835
4835
|
"data-row-open": "",
|
|
4836
4836
|
onFocus: (r) => {
|
|
4837
|
-
t.onFocus(), r.target === r.currentTarget &&
|
|
4837
|
+
t.onFocus(), r.target === r.currentTarget && Oc(String(e));
|
|
4838
4838
|
},
|
|
4839
4839
|
onClick: (r) => {
|
|
4840
4840
|
if (r.metaKey || r.ctrlKey) {
|
|
4841
4841
|
r.preventDefault(), window.open(M({ collection: n, itemId: String(e) }), "_blank", "noopener");
|
|
4842
4842
|
return;
|
|
4843
4843
|
}
|
|
4844
|
-
|
|
4844
|
+
Cn(e);
|
|
4845
4845
|
},
|
|
4846
4846
|
onAuxClick: (r) => {
|
|
4847
4847
|
r.button === 1 && (r.preventDefault(), window.open(M({ collection: n, itemId: String(e) }), "_blank", "noopener"));
|
|
@@ -4850,7 +4850,7 @@ function Jg({
|
|
|
4850
4850
|
var u, m;
|
|
4851
4851
|
if (r.target !== r.currentTarget) return;
|
|
4852
4852
|
if (r.key === "Enter") {
|
|
4853
|
-
r.preventDefault(),
|
|
4853
|
+
r.preventDefault(), Cn(e);
|
|
4854
4854
|
return;
|
|
4855
4855
|
}
|
|
4856
4856
|
if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(r.key)) return;
|
|
@@ -4859,35 +4859,35 @@ function Jg({
|
|
|
4859
4859
|
...((u = r.currentTarget.parentElement) == null ? void 0 : u.querySelectorAll(
|
|
4860
4860
|
":scope > [data-row-open]"
|
|
4861
4861
|
)) ?? []
|
|
4862
|
-
], l =
|
|
4862
|
+
], l = q0(s.length, s.indexOf(r.currentTarget), r.key), o = l === null ? null : s[l];
|
|
4863
4863
|
o && (o.focus(), (m = o.scrollIntoView) == null || m.call(o, { block: "nearest" }));
|
|
4864
4864
|
}
|
|
4865
4865
|
};
|
|
4866
|
-
},
|
|
4866
|
+
}, Cn = (e) => {
|
|
4867
4867
|
var t;
|
|
4868
|
-
((t = rr.current) == null ? void 0 : t.key) === `${n}\0${Y}` &&
|
|
4868
|
+
((t = rr.current) == null ? void 0 : t.key) === `${n}\0${Y}` && om(f, rr.current.id, {
|
|
4869
4869
|
type: "record",
|
|
4870
4870
|
collection: n,
|
|
4871
4871
|
item: e === "new" ? null : e
|
|
4872
|
-
}), e !== "new" &&
|
|
4872
|
+
}), e !== "new" && fp({
|
|
4873
4873
|
list: `cbv:${n}`,
|
|
4874
4874
|
label: (T == null ? void 0 : T.display_name) ?? Qe(n),
|
|
4875
4875
|
rows: ke.map((r) => ({ collection: n, id: String(r.id) })),
|
|
4876
4876
|
opened: { collection: n, id: String(e) },
|
|
4877
|
-
entry:
|
|
4877
|
+
entry: lp(),
|
|
4878
4878
|
// The whole list's count and where this page starts, so the record says "3 of 49",
|
|
4879
4879
|
// never the page size (rt-nav review). A grouped list holds every row it shows.
|
|
4880
|
-
...Kt ? {} : { total: $e, totalApprox:
|
|
4880
|
+
...Kt ? {} : { total: $e, totalApprox: Dn },
|
|
4881
4881
|
offset: R || xe ? 0 : (I - 1) * et
|
|
4882
4882
|
}), $ ? $(e) : N({ collection: n, itemId: String(e) });
|
|
4883
4883
|
}, hr = (e) => {
|
|
4884
4884
|
const t = xt(it, n, e), r = (s) => {
|
|
4885
|
-
ut(
|
|
4885
|
+
ut(gm(ie, s, Ae.default_sort ?? "")), K(1);
|
|
4886
4886
|
};
|
|
4887
4887
|
if (t != null && t.one_collection && !zt(t.one_collection)) {
|
|
4888
4888
|
const s = t.one_collection;
|
|
4889
4889
|
L.fetchQuery({
|
|
4890
|
-
queryKey:
|
|
4890
|
+
queryKey: Hp.collectionMeta(s),
|
|
4891
4891
|
queryFn: () => f.request(X(`/collections/${s}`)).then((l) => l.data),
|
|
4892
4892
|
staleTime: 6e4
|
|
4893
4893
|
}).then((l) => {
|
|
@@ -4900,31 +4900,31 @@ function Jg({
|
|
|
4900
4900
|
return;
|
|
4901
4901
|
}
|
|
4902
4902
|
r(e);
|
|
4903
|
-
}, Os = ke.length > 0 && ke.every((e) => tt.includes(e.id)),
|
|
4903
|
+
}, Os = ke.length > 0 && ke.every((e) => tt.includes(e.id)), vc = () => _n(
|
|
4904
4904
|
Os ? tt.filter((e) => !ke.some((t) => t.id === e)) : [.../* @__PURE__ */ new Set([...tt, ...ke.map((e) => e.id)])]
|
|
4905
|
-
),
|
|
4906
|
-
() => ze && n ? tt.map((e) =>
|
|
4905
|
+
), yc = (e) => _n((t) => t.includes(e) ? t.filter((r) => r !== e) : [...t, e]), Da = oe(
|
|
4906
|
+
() => ze && n ? tt.map((e) => im(n, String(e))) : [],
|
|
4907
4907
|
[ze, n, tt]
|
|
4908
|
-
), br =
|
|
4909
|
-
() => Ko ?
|
|
4910
|
-
[Ko,
|
|
4911
|
-
),
|
|
4908
|
+
), br = dm(Da), Ps = cm(n ? [n] : [], br.picks), [Ko, kc] = w(!1), wc = oe(
|
|
4909
|
+
() => Ko ? Da : Da.filter((e) => Ps.marked.has(e)),
|
|
4910
|
+
[Ko, Da, Ps.marked]
|
|
4911
|
+
), _c = um(wc, br.picks).rows.filter((e) => br.picks.has(e.key)), Nc = wi(
|
|
4912
4912
|
ze ? n : null,
|
|
4913
4913
|
ze ? tt.map(String) : [],
|
|
4914
4914
|
uo
|
|
4915
|
-
),
|
|
4916
|
-
const t = e.slice(n.length + 1), r = os[Zs(n, t)], s =
|
|
4915
|
+
), Sc = Da.map((e) => {
|
|
4916
|
+
const t = e.slice(n.length + 1), r = os[Zs(n, t)], s = Nc.get(t);
|
|
4917
4917
|
return {
|
|
4918
4918
|
key: e,
|
|
4919
4919
|
viewerIds: (r == null ? void 0 : r.ids) ?? [],
|
|
4920
4920
|
viewerCount: (r == null ? void 0 : r.count) ?? 0,
|
|
4921
4921
|
lockName: s && !s.is_mine ? s.locked_by_name ?? "someone" : null
|
|
4922
4922
|
};
|
|
4923
|
-
}).filter((e) => e.viewerCount > 0 || !!e.lockName),
|
|
4923
|
+
}).filter((e) => e.viewerCount > 0 || !!e.lockName), Cc = pm(
|
|
4924
4924
|
ke,
|
|
4925
4925
|
(e) => String(e.id),
|
|
4926
4926
|
ze ? tt.map(String) : []
|
|
4927
|
-
),
|
|
4927
|
+
), $c = (() => {
|
|
4928
4928
|
const e = le.filter(
|
|
4929
4929
|
(t) => Ke[t] === "sum" && (oa(t) || t.startsWith("__f:")) && !t.includes(".")
|
|
4930
4930
|
);
|
|
@@ -4935,11 +4935,11 @@ function Jg({
|
|
|
4935
4935
|
const r = (o = nt.get(t)) == null ? void 0 : o.type;
|
|
4936
4936
|
return (r === "decimal" || r === "float") && !xt(it, n, t);
|
|
4937
4937
|
}).slice(0, 2);
|
|
4938
|
-
})(), jo =
|
|
4939
|
-
Sc,
|
|
4938
|
+
})(), jo = mm(
|
|
4940
4939
|
Cc,
|
|
4940
|
+
$c,
|
|
4941
4941
|
(e, t) => t.startsWith("__f:") ? Il(e, t) : e[t]
|
|
4942
|
-
), gr = 2e3, [Bo, Uo] = w(!1),
|
|
4942
|
+
), gr = 2e3, [Bo, Uo] = w(!1), qc = async () => {
|
|
4943
4943
|
Uo(!0);
|
|
4944
4944
|
try {
|
|
4945
4945
|
const e = await f.request(
|
|
@@ -4954,9 +4954,9 @@ function Jg({
|
|
|
4954
4954
|
} finally {
|
|
4955
4955
|
Uo(!1);
|
|
4956
4956
|
}
|
|
4957
|
-
}, Qo = $e === 0 && !Kt ? 0 : (I - 1) * et + 1, Wo = Kt ? (I - 1) * et + ke.length : Math.min(I * et, $e), ua = !!(Se != null && Se.instances), zo = (
|
|
4957
|
+
}, Qo = $e === 0 && !Kt ? 0 : (I - 1) * et + 1, Wo = Kt ? (I - 1) * et + ke.length : Math.min(I * et, $e), ua = !!(Se != null && Se.instances), zo = (At ? 1 : 0) + (ua ? 2 : 0) + (kl ? 1 : 0), Ma = [
|
|
4958
4958
|
...le.map(
|
|
4959
|
-
(e) => e.startsWith("__f:") ? { key: e, kind: "formula" } : e ===
|
|
4959
|
+
(e) => e.startsWith("__f:") ? { key: e, kind: "formula" } : e === Qn ? { key: e, kind: "in_step" } : { key: e, kind: "data" }
|
|
4960
4960
|
),
|
|
4961
4961
|
...ua ? [
|
|
4962
4962
|
{ key: "__state__", kind: "state" },
|
|
@@ -4968,18 +4968,18 @@ function Jg({
|
|
|
4968
4968
|
] : [],
|
|
4969
4969
|
...hs ? [{ key: "__addendums__", kind: "addendums" }] : [],
|
|
4970
4970
|
...Be ? [{ key: "__fulfilment__", kind: "fulfilment" }] : [],
|
|
4971
|
-
...
|
|
4971
|
+
...Ea ? [{ key: "__integrations__", kind: "integrations" }] : [],
|
|
4972
4972
|
...go ? [{ key: "__tasks__", kind: "tasks" }] : [],
|
|
4973
4973
|
...kl ? [{ key: "__actions__", kind: "actions" }] : []
|
|
4974
|
-
], Ds = Z(/* @__PURE__ */ new Map()), [
|
|
4974
|
+
], Ds = Z(/* @__PURE__ */ new Map()), [jn, Tc] = w({});
|
|
4975
4975
|
gi(() => {
|
|
4976
4976
|
const e = {};
|
|
4977
4977
|
for (const [r, s] of Ds.current)
|
|
4978
4978
|
s != null && s.isConnected && (e[r] = s.getBoundingClientRect().width);
|
|
4979
|
-
const t = /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(
|
|
4979
|
+
const t = /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(jn)]);
|
|
4980
4980
|
for (const r of t)
|
|
4981
|
-
if (Math.abs((e[r] ?? -1) - (
|
|
4982
|
-
|
|
4981
|
+
if (Math.abs((e[r] ?? -1) - (jn[r] ?? -1)) > 0.5) {
|
|
4982
|
+
Tc(e);
|
|
4983
4983
|
return;
|
|
4984
4984
|
}
|
|
4985
4985
|
});
|
|
@@ -4989,7 +4989,7 @@ function Jg({
|
|
|
4989
4989
|
});
|
|
4990
4990
|
if (gi(() => {
|
|
4991
4991
|
var s;
|
|
4992
|
-
const e =
|
|
4992
|
+
const e = Ha.current, t = (e == null ? void 0 : e.clientWidth) ?? 0;
|
|
4993
4993
|
if (Math.abs(t - Ms) > 1 && Vo(t), xr.current.el === e || typeof ResizeObserver > "u") return;
|
|
4994
4994
|
(s = xr.current.ro) == null || s.disconnect();
|
|
4995
4995
|
const r = e ? new ResizeObserver(() => Vo(e.clientWidth)) : null;
|
|
@@ -4998,13 +4998,13 @@ function Jg({
|
|
|
4998
4998
|
var e;
|
|
4999
4999
|
return (e = xr.current.ro) == null ? void 0 : e.disconnect();
|
|
5000
5000
|
}, []), !Jr && Ms > 0) {
|
|
5001
|
-
const e =
|
|
5002
|
-
|
|
5001
|
+
const e = wm(
|
|
5002
|
+
Ma.filter((t) => Jn[t.key] === "left").map((t) => t.key),
|
|
5003
5003
|
// Kept from the end of this list inward: Actions, then State (what a row is waiting
|
|
5004
5004
|
// on), then data columns; Owners gives way first (often "—" on a whole page).
|
|
5005
|
-
|
|
5006
|
-
(t) =>
|
|
5007
|
-
|
|
5005
|
+
Ma.filter((t) => Jn[t.key] === "right").map((t) => t.key).sort((t, r) => Ml(t) - Ml(r)),
|
|
5006
|
+
(t) => jn[t] ?? 120,
|
|
5007
|
+
At ? jn.__checkbox__ ?? 52 : 0,
|
|
5008
5008
|
Ms,
|
|
5009
5009
|
{ rightShare: 0.45 }
|
|
5010
5010
|
);
|
|
@@ -5014,19 +5014,19 @@ function Jg({
|
|
|
5014
5014
|
]);
|
|
5015
5015
|
}
|
|
5016
5016
|
const rn = [
|
|
5017
|
-
...
|
|
5018
|
-
...
|
|
5019
|
-
...
|
|
5020
|
-
],
|
|
5017
|
+
...Ma.filter((e) => nn(e.key) === "left"),
|
|
5018
|
+
...Ma.filter((e) => !nn(e.key)),
|
|
5019
|
+
...Ma.filter((e) => nn(e.key) === "right")
|
|
5020
|
+
], Lc = rn.map((e) => {
|
|
5021
5021
|
if (e.kind === "data") {
|
|
5022
5022
|
const t = nt.get(e.key.split(".")[0]);
|
|
5023
|
-
return { key: e.key, shape:
|
|
5023
|
+
return { key: e.key, shape: hm(t == null ? void 0 : t.type, t == null ? void 0 : t.interface) };
|
|
5024
5024
|
}
|
|
5025
5025
|
return { key: e.key, shape: th[e.kind] ?? "short" };
|
|
5026
5026
|
}), Ho = [
|
|
5027
5027
|
...ua ? [{ key: "__state__", label: "State" }] : [],
|
|
5028
5028
|
...le.filter((e) => pn(e) || !xt(it, n, e)).map((e) => ({ key: e, label: at(e) }))
|
|
5029
|
-
],
|
|
5029
|
+
], Rc = (e) => {
|
|
5030
5030
|
var s;
|
|
5031
5031
|
if (!R) return "";
|
|
5032
5032
|
const t = e.id;
|
|
@@ -5037,48 +5037,48 @@ function Jg({
|
|
|
5037
5037
|
if (pn(R)) return Bt(t, R) || "(empty)";
|
|
5038
5038
|
const r = e[R];
|
|
5039
5039
|
return r == null || r === "" ? "(empty)" : typeof r == "boolean" ? r ? "Yes" : "No" : ia(String(r), R) || String(r);
|
|
5040
|
-
},
|
|
5040
|
+
}, Fc = (() => {
|
|
5041
5041
|
if (!R) return [];
|
|
5042
5042
|
const e = /* @__PURE__ */ new Map();
|
|
5043
5043
|
for (const r of ke) {
|
|
5044
|
-
const s =
|
|
5044
|
+
const s = Rc(r), l = e.get(s) ?? [];
|
|
5045
5045
|
l.push(r), e.set(s, l);
|
|
5046
5046
|
}
|
|
5047
5047
|
return [...e.keys()].sort((r, s) => r === "(empty)" ? 1 : s === "(empty)" ? -1 : r.localeCompare(s, void 0, { numeric: !0 })).map((r) => {
|
|
5048
5048
|
const s = e.get(r) ?? [];
|
|
5049
5049
|
return { key: r, count: s.length, rows: kn.has(r) ? [] : s };
|
|
5050
5050
|
});
|
|
5051
|
-
})(), Go = `${JSON.stringify(sr.current)}|${R}|${[...kn].join("")}`,
|
|
5051
|
+
})(), Go = `${JSON.stringify(sr.current)}|${R}|${[...kn].join("")}`, Bn = gp(Fc, (e) => String(e.id), yt.rootRef, {
|
|
5052
5052
|
enabled: !!R && !xe,
|
|
5053
5053
|
resetKey: Go
|
|
5054
|
-
}),
|
|
5054
|
+
}), Aa = (e) => bo.isGone(e) || Bn.isGone(e), As = (() => {
|
|
5055
5055
|
var t;
|
|
5056
5056
|
if (!R) return bo.rows.map((r) => ({ kind: "row", row: r }));
|
|
5057
5057
|
const e = [];
|
|
5058
|
-
for (const r of
|
|
5058
|
+
for (const r of Bn.groups) {
|
|
5059
5059
|
e.push({ kind: "header", gkey: r.key, label: r.key, count: ((t = r.group) == null ? void 0 : t.count) ?? 0 });
|
|
5060
5060
|
for (const s of r.rows) e.push({ kind: "row", row: s });
|
|
5061
5061
|
}
|
|
5062
5062
|
return e;
|
|
5063
5063
|
})();
|
|
5064
|
-
|
|
5064
|
+
xp(
|
|
5065
5065
|
yt.rootRef,
|
|
5066
5066
|
As.map((e) => e.kind === "header" ? `§${e.gkey}` : String(e.row.id)).join(""),
|
|
5067
5067
|
{ enabled: !!R && !xe, resetKey: Go }
|
|
5068
5068
|
);
|
|
5069
|
-
const [
|
|
5069
|
+
const [Ec, Oc] = w(null), Pc = $0(As, Ec), Is = rn.filter((e) => nn(e.key) === "left").map((e) => e.key), Yo = rn.filter((e) => nn(e.key) === "right").map((e) => e.key), Dc = 52, Jo = (e) => {
|
|
5070
5070
|
if (nn(e) === "left") {
|
|
5071
|
-
let s =
|
|
5071
|
+
let s = At ? jn.__checkbox__ ?? Dc : 0;
|
|
5072
5072
|
for (const l of Is) {
|
|
5073
5073
|
if (l === e) break;
|
|
5074
|
-
s +=
|
|
5074
|
+
s += jn[l] ?? 0;
|
|
5075
5075
|
}
|
|
5076
5076
|
return Math.floor(s);
|
|
5077
5077
|
}
|
|
5078
5078
|
let r = 0;
|
|
5079
5079
|
for (const s of [...Yo].reverse()) {
|
|
5080
5080
|
if (s === e) break;
|
|
5081
|
-
r +=
|
|
5081
|
+
r += jn[s] ?? 0;
|
|
5082
5082
|
}
|
|
5083
5083
|
return Math.floor(r);
|
|
5084
5084
|
}, kt = (e, t, r) => {
|
|
@@ -5110,40 +5110,40 @@ function Jg({
|
|
|
5110
5110
|
window.removeEventListener("pointermove", e), window.removeEventListener("pointerup", t);
|
|
5111
5111
|
};
|
|
5112
5112
|
}, []);
|
|
5113
|
-
const
|
|
5113
|
+
const Mc = (e) => {
|
|
5114
5114
|
let t = at(e).length;
|
|
5115
5115
|
for (const r of ke) {
|
|
5116
5116
|
const s = pn(e) ? Bt(r.id, e) ?? "" : ia(String(r[e] ?? ""), e, r.id);
|
|
5117
5117
|
s.length > t && (t = Math.min(s.length, 90));
|
|
5118
5118
|
}
|
|
5119
5119
|
ee((r) => ({ ...r, [e]: Math.max(60, Math.round(t * 6.6) + 28) }));
|
|
5120
|
-
},
|
|
5120
|
+
}, Ac = (e) => /* @__PURE__ */ a(
|
|
5121
5121
|
"span",
|
|
5122
5122
|
{
|
|
5123
5123
|
onPointerDown: (t) => {
|
|
5124
5124
|
t.preventDefault(), t.stopPropagation(), Ks.current = { key: e, startX: t.clientX, startW: _[e] ?? 140 }, document.body.style.cursor = "col-resize";
|
|
5125
5125
|
},
|
|
5126
5126
|
onDoubleClick: (t) => {
|
|
5127
|
-
t.stopPropagation(),
|
|
5127
|
+
t.stopPropagation(), Mc(e);
|
|
5128
5128
|
},
|
|
5129
5129
|
onClick: (t) => t.stopPropagation(),
|
|
5130
5130
|
title: "Drag to resize · double-click to fit content",
|
|
5131
5131
|
className: "absolute right-0 top-0 h-full w-1.5 cursor-col-resize opacity-0 transition-opacity hover:bg-nvr-cyan/40 hover:opacity-100 group-hover/hcell:opacity-60"
|
|
5132
5132
|
}
|
|
5133
5133
|
), yr = (e) => _[e] ? { width: _[e], minWidth: _[e], maxWidth: _[e] } : void 0, js = (e) => {
|
|
5134
|
-
const t =
|
|
5134
|
+
const t = En[e];
|
|
5135
5135
|
return /* @__PURE__ */ a(
|
|
5136
5136
|
"button",
|
|
5137
5137
|
{
|
|
5138
5138
|
type: "button",
|
|
5139
5139
|
onClick: (r) => {
|
|
5140
|
-
r.stopPropagation(),
|
|
5140
|
+
r.stopPropagation(), Fd(e);
|
|
5141
5141
|
},
|
|
5142
5142
|
title: Xo[t ?? "none"],
|
|
5143
5143
|
"aria-label": Xo[t ?? "none"],
|
|
5144
5144
|
className: `ml-1 inline-flex align-middle transition-opacity ${t ? "text-[#00a5cc] opacity-100" : "text-slate-300 opacity-0 group-hover/hcell:opacity-100 dark:text-slate-600"}`,
|
|
5145
5145
|
children: /* @__PURE__ */ a(
|
|
5146
|
-
|
|
5146
|
+
eu,
|
|
5147
5147
|
{
|
|
5148
5148
|
className: "h-3 w-3",
|
|
5149
5149
|
style: t === "right" ? { transform: "scaleX(-1)" } : void 0
|
|
@@ -5151,22 +5151,22 @@ function Jg({
|
|
|
5151
5151
|
)
|
|
5152
5152
|
}
|
|
5153
5153
|
);
|
|
5154
|
-
},
|
|
5154
|
+
}, Ic = !!(Y || Ne || Pe != null), { data: pa } = te({
|
|
5155
5155
|
queryKey: ["cbv-grand-total", n, "with-approx"],
|
|
5156
5156
|
queryFn: () => f.request(
|
|
5157
5157
|
X(`/items/${n}`, { limit: 1, fields: "id", count: "approx" })
|
|
5158
5158
|
).then(
|
|
5159
5159
|
(e) => typeof e.total == "number" ? { n: e.total, approx: e.total_approx === !0 } : null
|
|
5160
5160
|
),
|
|
5161
|
-
enabled: !!n && lt && !xe &&
|
|
5161
|
+
enabled: !!n && lt && !xe && Ic,
|
|
5162
5162
|
staleTime: 5 * 6e4,
|
|
5163
5163
|
retry: !1
|
|
5164
|
-
}), Zo = Z(!1), [,
|
|
5164
|
+
}), Zo = Z(!1), [, Kc] = w(0);
|
|
5165
5165
|
se(
|
|
5166
5166
|
() => L.getQueryCache().subscribe((e) => {
|
|
5167
5167
|
if (!Zo.current || e.type !== "updated" || e.action.type !== "success") return;
|
|
5168
5168
|
const t = String(e.query.queryKey[0] ?? "");
|
|
5169
|
-
(t === "cbv-quick-options" || t === "cbv-filter-options" || t === "cbv-filter-selected-labels") &&
|
|
5169
|
+
(t === "cbv-quick-options" || t === "cbv-filter-options" || t === "cbv-filter-selected-labels") && Kc((r) => r + 1);
|
|
5170
5170
|
}),
|
|
5171
5171
|
[L]
|
|
5172
5172
|
);
|
|
@@ -5188,12 +5188,12 @@ function Jg({
|
|
|
5188
5188
|
}, r = [];
|
|
5189
5189
|
for (const m of _e) {
|
|
5190
5190
|
const x = m.pathLabels.join(" › ") || m.path.join(".");
|
|
5191
|
-
if ((s = m.path[0]) != null && s.startsWith("$has_") || m.path[0] === "$missing_required" || m.path[0] === "$unseen" ||
|
|
5191
|
+
if ((s = m.path[0]) != null && s.startsWith("$has_") || m.path[0] === "$missing_required" || m.path[0] === "$unseen" || $n(m)) {
|
|
5192
5192
|
r.push({ kind: "phrase", text: `${m.not ? "not " : ""}${x.toLowerCase()}` });
|
|
5193
5193
|
continue;
|
|
5194
5194
|
}
|
|
5195
|
-
if (
|
|
5196
|
-
r.push({ kind: "phrase", text:
|
|
5195
|
+
if (zn(m)) {
|
|
5196
|
+
r.push({ kind: "phrase", text: n0(m) });
|
|
5197
5197
|
continue;
|
|
5198
5198
|
}
|
|
5199
5199
|
const A = m.fieldType ?? "", j = Ys({
|
|
@@ -5206,7 +5206,7 @@ function Jg({
|
|
|
5206
5206
|
});
|
|
5207
5207
|
j && r.push(j);
|
|
5208
5208
|
}
|
|
5209
|
-
for (const m of
|
|
5209
|
+
for (const m of Tt) {
|
|
5210
5210
|
const x = ht[m.key] ?? [];
|
|
5211
5211
|
if (x.length === 0) continue;
|
|
5212
5212
|
const A = ["cbv-quick-options", m.collection, m.value_field ?? "id", m.label_field];
|
|
@@ -5247,7 +5247,7 @@ function Jg({
|
|
|
5247
5247
|
text: x.value === "none" ? "with no open tasks" : x.value === "overdue" ? "with overdue tasks" : "with open tasks"
|
|
5248
5248
|
});
|
|
5249
5249
|
else if (x.kind === "aging") {
|
|
5250
|
-
const z =
|
|
5250
|
+
const z = Eu({ field: A, type: "range", value: x.value, rangeUnit: "h" });
|
|
5251
5251
|
z && r.push(z);
|
|
5252
5252
|
} else if (x.kind === "text" && x.value.trim())
|
|
5253
5253
|
r.push({ kind: "text", field: A, text: x.value });
|
|
@@ -5276,16 +5276,16 @@ function Jg({
|
|
|
5276
5276
|
const x = m.label;
|
|
5277
5277
|
x && r.push({ kind: "phrase", text: x });
|
|
5278
5278
|
}
|
|
5279
|
-
for (const m of
|
|
5279
|
+
for (const m of Ln)
|
|
5280
5280
|
r.push({ kind: "is", field: at(m.field), values: [m.label], not: !0 });
|
|
5281
5281
|
if (an && r.push({ kind: "phrase", text: "being amended" }), It.length > 0) {
|
|
5282
5282
|
const m = It.map((x) => {
|
|
5283
5283
|
var A;
|
|
5284
|
-
return (A =
|
|
5284
|
+
return (A = Fa.find((j) => j.id === x)) == null ? void 0 : A.name;
|
|
5285
5285
|
}).filter((x) => !!x);
|
|
5286
5286
|
m.length > 0 && r.push({ kind: "phrase", text: `flagged ${m.join(" or ")}` });
|
|
5287
5287
|
}
|
|
5288
|
-
return Zo.current = e,
|
|
5288
|
+
return Zo.current = e, Ou({
|
|
5289
5289
|
noun: (T == null ? void 0 : T.display_name) || Qe(n),
|
|
5290
5290
|
viewName: ((u = Ve.find((m) => m.id === Pe)) == null ? void 0 : u.name) ?? null,
|
|
5291
5291
|
search: Y,
|
|
@@ -5293,7 +5293,7 @@ function Jg({
|
|
|
5293
5293
|
shown: Kt ? null : $e,
|
|
5294
5294
|
of: (pa == null ? void 0 : pa.n) ?? null,
|
|
5295
5295
|
ofApprox: (pa == null ? void 0 : pa.approx) === !0,
|
|
5296
|
-
approx:
|
|
5296
|
+
approx: Dn
|
|
5297
5297
|
});
|
|
5298
5298
|
})();
|
|
5299
5299
|
return !fe && (Ee == null ? void 0 : Ee.status) === 403 && !tl(Ee) ? /* @__PURE__ */ a(
|
|
@@ -5376,9 +5376,9 @@ function Jg({
|
|
|
5376
5376
|
}
|
|
5377
5377
|
` }),
|
|
5378
5378
|
/* @__PURE__ */ a(Cf, {}),
|
|
5379
|
-
/* @__PURE__ */ a(
|
|
5380
|
-
/* @__PURE__ */ a(
|
|
5381
|
-
ce &&
|
|
5379
|
+
/* @__PURE__ */ a(Gm, {}),
|
|
5380
|
+
/* @__PURE__ */ a(Ym, { collection: n, className: "mx-4 mt-3 shrink-0" }),
|
|
5381
|
+
ce && nd(
|
|
5382
5382
|
/* @__PURE__ */ d(
|
|
5383
5383
|
"div",
|
|
5384
5384
|
{
|
|
@@ -5396,7 +5396,7 @@ function Jg({
|
|
|
5396
5396
|
{
|
|
5397
5397
|
type: "button",
|
|
5398
5398
|
onClick: () => {
|
|
5399
|
-
|
|
5399
|
+
tc(ce), wn(null);
|
|
5400
5400
|
},
|
|
5401
5401
|
className: "block w-full truncate px-3 py-1.5 text-left text-[12px] text-slate-700 hover:bg-slate-50 dark:text-slate-200 dark:hover:bg-slate-800",
|
|
5402
5402
|
children: [
|
|
@@ -5405,12 +5405,12 @@ function Jg({
|
|
|
5405
5405
|
]
|
|
5406
5406
|
}
|
|
5407
5407
|
),
|
|
5408
|
-
|
|
5408
|
+
nc(ce.key, ce.row) && ce.cellText && ce.cellText !== "—" && /* @__PURE__ */ d(
|
|
5409
5409
|
"button",
|
|
5410
5410
|
{
|
|
5411
5411
|
type: "button",
|
|
5412
5412
|
onClick: () => {
|
|
5413
|
-
|
|
5413
|
+
ac(ce), wn(null);
|
|
5414
5414
|
},
|
|
5415
5415
|
className: "block w-full truncate px-3 py-1.5 text-left text-[12px] text-slate-700 hover:bg-slate-50 dark:text-slate-200 dark:hover:bg-slate-800",
|
|
5416
5416
|
children: [
|
|
@@ -5438,7 +5438,7 @@ function Jg({
|
|
|
5438
5438
|
[
|
|
5439
5439
|
{
|
|
5440
5440
|
label: "Open",
|
|
5441
|
-
run: () =>
|
|
5441
|
+
run: () => Cn(ce.row.id)
|
|
5442
5442
|
},
|
|
5443
5443
|
{
|
|
5444
5444
|
label: "Open in new tab",
|
|
@@ -5446,7 +5446,7 @@ function Jg({
|
|
|
5446
5446
|
},
|
|
5447
5447
|
{
|
|
5448
5448
|
label: "Peek",
|
|
5449
|
-
run: () =>
|
|
5449
|
+
run: () => Dt.push([{ collection: n, itemId: String(ce.row.id) }])
|
|
5450
5450
|
},
|
|
5451
5451
|
// rt5: follow the record from the watch list dock.
|
|
5452
5452
|
...ne.isPinned(n, ce.row.id) ? [
|
|
@@ -5485,7 +5485,7 @@ function Jg({
|
|
|
5485
5485
|
{
|
|
5486
5486
|
label: "Copy link",
|
|
5487
5487
|
run: () => {
|
|
5488
|
-
|
|
5488
|
+
dd(
|
|
5489
5489
|
f,
|
|
5490
5490
|
L,
|
|
5491
5491
|
n,
|
|
@@ -5541,7 +5541,7 @@ function Jg({
|
|
|
5541
5541
|
}
|
|
5542
5542
|
}
|
|
5543
5543
|
),
|
|
5544
|
-
|
|
5544
|
+
za && /* @__PURE__ */ d("div", { className: "order-last flex w-full items-center gap-2", children: [
|
|
5545
5545
|
/* @__PURE__ */ a(Ws, { className: "h-4 w-4 shrink-0 text-[#00a5cc]" }),
|
|
5546
5546
|
/* @__PURE__ */ a(
|
|
5547
5547
|
"input",
|
|
@@ -5550,7 +5550,7 @@ function Jg({
|
|
|
5550
5550
|
value: ka,
|
|
5551
5551
|
onChange: (e) => Br(e.target.value),
|
|
5552
5552
|
onKeyDown: (e) => {
|
|
5553
|
-
e.key === "Enter" && ka.trim() && !
|
|
5553
|
+
e.key === "Enter" && ka.trim() && !Gn.isPending && Gn.mutate(ka.trim()), e.key === "Escape" && jr(!1);
|
|
5554
5554
|
},
|
|
5555
5555
|
placeholder: 'Ask in plain language — "over 50k in Zone 1 still waiting on approval"',
|
|
5556
5556
|
className: "h-8 flex-1 rounded-md border border-slate-200 bg-white px-3 text-[12.5px] outline-none focus:border-nvr-cyan/50 focus:ring-2 focus:ring-nvr-cyan/30 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-100"
|
|
@@ -5560,14 +5560,14 @@ function Jg({
|
|
|
5560
5560
|
"button",
|
|
5561
5561
|
{
|
|
5562
5562
|
type: "button",
|
|
5563
|
-
disabled: !ka.trim() ||
|
|
5564
|
-
onClick: () =>
|
|
5563
|
+
disabled: !ka.trim() || Gn.isPending,
|
|
5564
|
+
onClick: () => Gn.mutate(ka.trim()),
|
|
5565
5565
|
className: "flex h-8 items-center gap-1.5 rounded-md bg-nvr-cyan px-3 text-[12px] font-semibold text-white hover:brightness-110 disabled:opacity-40",
|
|
5566
|
-
children:
|
|
5566
|
+
children: Gn.isPending ? /* @__PURE__ */ a(wr, { className: "h-3.5 w-3.5 animate-spin" }) : "Ask"
|
|
5567
5567
|
}
|
|
5568
5568
|
)
|
|
5569
5569
|
] }),
|
|
5570
|
-
|
|
5570
|
+
Ln.map((e) => /* @__PURE__ */ d(
|
|
5571
5571
|
"span",
|
|
5572
5572
|
{
|
|
5573
5573
|
className: "order-last inline-flex max-w-full items-center gap-1.5 rounded-full border border-red-200 bg-red-50 py-1 pl-2.5 pr-1.5 text-[12px] text-red-700 dark:border-red-500/40 dark:bg-red-500/10 dark:text-red-300",
|
|
@@ -5605,7 +5605,7 @@ function Jg({
|
|
|
5605
5605
|
"button",
|
|
5606
5606
|
{
|
|
5607
5607
|
type: "button",
|
|
5608
|
-
onClick:
|
|
5608
|
+
onClick: fd,
|
|
5609
5609
|
"aria-label": "Clear AI result",
|
|
5610
5610
|
className: "rounded-full p-0.5 hover:bg-nvr-cyan/[0.16]",
|
|
5611
5611
|
children: /* @__PURE__ */ a(zs, { className: "h-3 w-3" })
|
|
@@ -5616,40 +5616,40 @@ function Jg({
|
|
|
5616
5616
|
uf,
|
|
5617
5617
|
{
|
|
5618
5618
|
moreLabel: "More list actions",
|
|
5619
|
-
lead: O ? void 0 : /* @__PURE__ */ a(
|
|
5619
|
+
lead: O || Tt.length > 0 && !(Sa && Fn.editing) ? void 0 : /* @__PURE__ */ a(Qi, { kind: "list", id: n }),
|
|
5620
5620
|
items: [
|
|
5621
5621
|
{
|
|
5622
5622
|
key: "changed",
|
|
5623
5623
|
kind: "filter",
|
|
5624
|
-
priority: _e.some(
|
|
5625
|
-
active: _e.some(
|
|
5624
|
+
priority: _e.some(zn) ? 90 : 48,
|
|
5625
|
+
active: _e.some(zn),
|
|
5626
5626
|
node: /* @__PURE__ */ a(Je, { children: /* @__PURE__ */ a(
|
|
5627
|
-
|
|
5627
|
+
a0,
|
|
5628
5628
|
{
|
|
5629
|
-
filter: _e.find(
|
|
5629
|
+
filter: _e.find(zn),
|
|
5630
5630
|
onChange: (e) => {
|
|
5631
|
-
const t = _e.filter((r) => !
|
|
5631
|
+
const t = _e.filter((r) => !zn(r));
|
|
5632
5632
|
We(e ? [...t, e] : t), K(1);
|
|
5633
5633
|
}
|
|
5634
5634
|
}
|
|
5635
5635
|
) })
|
|
5636
5636
|
},
|
|
5637
|
-
...
|
|
5637
|
+
...Jd ? [
|
|
5638
5638
|
{
|
|
5639
5639
|
key: "approval",
|
|
5640
5640
|
kind: "filter",
|
|
5641
|
-
priority: _e.some(
|
|
5642
|
-
active: _e.some(
|
|
5641
|
+
priority: _e.some($n) ? 90 : 40,
|
|
5642
|
+
active: _e.some($n),
|
|
5643
5643
|
node: (() => {
|
|
5644
|
-
const e = _e.find(
|
|
5644
|
+
const e = _e.find($n);
|
|
5645
5645
|
return /* @__PURE__ */ d(
|
|
5646
5646
|
"button",
|
|
5647
5647
|
{
|
|
5648
5648
|
type: "button",
|
|
5649
5649
|
"data-approval-changed-filter": !0,
|
|
5650
5650
|
onClick: () => {
|
|
5651
|
-
const t = _e.filter((r) =>
|
|
5652
|
-
We(e ? t : [...t,
|
|
5651
|
+
const t = _e.filter((r) => !$n(r));
|
|
5652
|
+
We(e ? t : [...t, Xm()]), K(1);
|
|
5653
5653
|
},
|
|
5654
5654
|
"aria-pressed": !!e,
|
|
5655
5655
|
"data-tip": e ? "Showing records changed in the app after they were approved. Click to show all." : "Only records changed in the app after they were approved",
|
|
@@ -5673,7 +5673,7 @@ function Jg({
|
|
|
5673
5673
|
"button",
|
|
5674
5674
|
{
|
|
5675
5675
|
type: "button",
|
|
5676
|
-
onClick: () =>
|
|
5676
|
+
onClick: () => Od((e) => !e),
|
|
5677
5677
|
"aria-pressed": an,
|
|
5678
5678
|
title: "Only records with an addendum still in review",
|
|
5679
5679
|
className: `flex h-8 items-center gap-1.5 rounded-full border px-2.5 text-[12px] font-medium transition-colors ${an ? "border-amber-400 bg-amber-50 text-amber-800 dark:border-amber-500/60 dark:bg-amber-500/10 dark:text-amber-300" : "border-slate-200 bg-white text-slate-600 hover:border-slate-300 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-300"}`,
|
|
@@ -5685,7 +5685,7 @@ function Jg({
|
|
|
5685
5685
|
)
|
|
5686
5686
|
}
|
|
5687
5687
|
] : [],
|
|
5688
|
-
...
|
|
5688
|
+
...Fa.map((e) => {
|
|
5689
5689
|
const t = It.includes(e.id);
|
|
5690
5690
|
return {
|
|
5691
5691
|
key: `risk-${e.id}`,
|
|
@@ -5709,7 +5709,7 @@ function Jg({
|
|
|
5709
5709
|
/* @__PURE__ */ a(
|
|
5710
5710
|
"span",
|
|
5711
5711
|
{
|
|
5712
|
-
className: `h-2 w-2 rounded-full ${
|
|
5712
|
+
className: `h-2 w-2 rounded-full ${nm(e.highlight_color ?? "red")}`
|
|
5713
5713
|
}
|
|
5714
5714
|
),
|
|
5715
5715
|
e.name
|
|
@@ -5728,19 +5728,19 @@ function Jg({
|
|
|
5728
5728
|
key: "focus",
|
|
5729
5729
|
priority: 30,
|
|
5730
5730
|
label: "Focus mode",
|
|
5731
|
-
node: /* @__PURE__ */ a(
|
|
5731
|
+
node: /* @__PURE__ */ a(j0, {})
|
|
5732
5732
|
},
|
|
5733
5733
|
...na && n ? [
|
|
5734
5734
|
{
|
|
5735
5735
|
key: "live-pause",
|
|
5736
|
-
priority:
|
|
5737
|
-
active:
|
|
5736
|
+
priority: An.paused ? 90 : 45,
|
|
5737
|
+
active: An.paused,
|
|
5738
5738
|
node: /* @__PURE__ */ a(
|
|
5739
|
-
|
|
5739
|
+
Z0,
|
|
5740
5740
|
{
|
|
5741
|
-
paused:
|
|
5742
|
-
held:
|
|
5743
|
-
onToggle:
|
|
5741
|
+
paused: An.paused,
|
|
5742
|
+
held: An.held,
|
|
5743
|
+
onToggle: An.toggle
|
|
5744
5744
|
}
|
|
5745
5745
|
)
|
|
5746
5746
|
}
|
|
@@ -5785,7 +5785,7 @@ function Jg({
|
|
|
5785
5785
|
key: "copy-link",
|
|
5786
5786
|
priority: 25,
|
|
5787
5787
|
label: "Copy link",
|
|
5788
|
-
node: /* @__PURE__ */ a(
|
|
5788
|
+
node: /* @__PURE__ */ a(af, { listKey: `cbv:${n}`, getState: Ts })
|
|
5789
5789
|
},
|
|
5790
5790
|
{
|
|
5791
5791
|
key: "send-view",
|
|
@@ -5794,7 +5794,7 @@ function Jg({
|
|
|
5794
5794
|
node: /* @__PURE__ */ a(
|
|
5795
5795
|
Sf,
|
|
5796
5796
|
{
|
|
5797
|
-
getView: () =>
|
|
5797
|
+
getView: () => fm(
|
|
5798
5798
|
"list",
|
|
5799
5799
|
n,
|
|
5800
5800
|
`cbv:${n}`,
|
|
@@ -5814,7 +5814,7 @@ function Jg({
|
|
|
5814
5814
|
priority: 15,
|
|
5815
5815
|
label: "Copy as code",
|
|
5816
5816
|
node: /* @__PURE__ */ a(
|
|
5817
|
-
|
|
5817
|
+
Jm,
|
|
5818
5818
|
{
|
|
5819
5819
|
collection: n,
|
|
5820
5820
|
list: {
|
|
@@ -5829,30 +5829,30 @@ function Jg({
|
|
|
5829
5829
|
)
|
|
5830
5830
|
}
|
|
5831
5831
|
] : [],
|
|
5832
|
-
...
|
|
5832
|
+
...Ca.parent ? [
|
|
5833
5833
|
{
|
|
5834
5834
|
key: "hierarchy",
|
|
5835
5835
|
kind: "filter",
|
|
5836
5836
|
priority: 75,
|
|
5837
5837
|
node: /* @__PURE__ */ a(
|
|
5838
|
-
|
|
5838
|
+
C0,
|
|
5839
5839
|
{
|
|
5840
|
-
parent:
|
|
5840
|
+
parent: Ca.parent,
|
|
5841
5841
|
value: Ql,
|
|
5842
5842
|
onChange: (e) => {
|
|
5843
|
-
|
|
5843
|
+
Pd(e), K(1);
|
|
5844
5844
|
}
|
|
5845
5845
|
}
|
|
5846
5846
|
)
|
|
5847
5847
|
}
|
|
5848
5848
|
] : [],
|
|
5849
5849
|
...[
|
|
5850
|
-
|
|
5850
|
+
...$a ? [{ key: "tree", label: "Tree", icon: /* @__PURE__ */ a(jc, { className: "h-3.5 w-3.5" }) }] : [],
|
|
5851
5851
|
...(Q ?? []).map((e) => ({ key: e.key, label: e.label, icon: e.icon }))
|
|
5852
5852
|
].map((e) => ({
|
|
5853
5853
|
key: `view-${e.key}`,
|
|
5854
|
-
priority:
|
|
5855
|
-
active:
|
|
5854
|
+
priority: Lt === e.key ? 85 : 55,
|
|
5855
|
+
active: Lt === e.key,
|
|
5856
5856
|
node: /* @__PURE__ */ d(
|
|
5857
5857
|
"button",
|
|
5858
5858
|
{
|
|
@@ -5860,10 +5860,10 @@ function Jg({
|
|
|
5860
5860
|
onClick: () => {
|
|
5861
5861
|
zl(!1), Wl((t) => t === e.key ? null : e.key);
|
|
5862
5862
|
},
|
|
5863
|
-
"aria-pressed":
|
|
5863
|
+
"aria-pressed": Lt === e.key,
|
|
5864
5864
|
"data-cbv-view-toggle": e.key,
|
|
5865
|
-
title:
|
|
5866
|
-
className: `flex h-8 items-center gap-1.5 rounded-md border px-2.5 text-[12px] font-medium ${
|
|
5865
|
+
title: Lt === e.key ? "Back to the table" : `Show as ${e.label.toLowerCase()}`,
|
|
5866
|
+
className: `flex h-8 items-center gap-1.5 rounded-md border px-2.5 text-[12px] font-medium ${Lt === e.key ? "border-nvr-cyan/40 bg-nvr-cyan/[0.08] text-[#007a99] dark:text-nvr-cyan" : "border-slate-200 text-slate-500 hover:text-slate-700 dark:border-slate-700 dark:text-slate-400"}`,
|
|
5867
5867
|
children: [
|
|
5868
5868
|
e.icon,
|
|
5869
5869
|
e.label
|
|
@@ -5875,8 +5875,8 @@ function Jg({
|
|
|
5875
5875
|
...Xn ? [
|
|
5876
5876
|
{
|
|
5877
5877
|
key: "map",
|
|
5878
|
-
priority:
|
|
5879
|
-
active:
|
|
5878
|
+
priority: Pn ? 85 : 55,
|
|
5879
|
+
active: Pn,
|
|
5880
5880
|
node: /* @__PURE__ */ d(
|
|
5881
5881
|
"button",
|
|
5882
5882
|
{
|
|
@@ -5884,12 +5884,12 @@ function Jg({
|
|
|
5884
5884
|
onClick: () => {
|
|
5885
5885
|
Wl(null), zl((e) => !e);
|
|
5886
5886
|
},
|
|
5887
|
-
"aria-pressed":
|
|
5888
|
-
title:
|
|
5889
|
-
className: `flex h-8 items-center gap-1.5 rounded-md border px-2.5 text-[12px] font-medium ${
|
|
5887
|
+
"aria-pressed": Pn,
|
|
5888
|
+
title: Pn ? "Back to the table" : "Show these records on a map",
|
|
5889
|
+
className: `flex h-8 items-center gap-1.5 rounded-md border px-2.5 text-[12px] font-medium ${Pn ? "border-nvr-cyan/40 bg-nvr-cyan/[0.08] text-[#007a99] dark:text-nvr-cyan" : "border-slate-200 text-slate-500 hover:text-slate-700 dark:border-slate-700 dark:text-slate-400"}`,
|
|
5890
5890
|
"data-cbv-map-toggle": !0,
|
|
5891
5891
|
children: [
|
|
5892
|
-
/* @__PURE__ */ a(
|
|
5892
|
+
/* @__PURE__ */ a(Bc, { className: "h-3.5 w-3.5" }),
|
|
5893
5893
|
"Map"
|
|
5894
5894
|
]
|
|
5895
5895
|
}
|
|
@@ -5898,15 +5898,15 @@ function Jg({
|
|
|
5898
5898
|
] : [],
|
|
5899
5899
|
{
|
|
5900
5900
|
key: "ask",
|
|
5901
|
-
priority:
|
|
5902
|
-
active: !!(
|
|
5901
|
+
priority: za || xe ? 85 : 50,
|
|
5902
|
+
active: !!(za || xe),
|
|
5903
5903
|
node: /* @__PURE__ */ d(
|
|
5904
5904
|
"button",
|
|
5905
5905
|
{
|
|
5906
5906
|
type: "button",
|
|
5907
5907
|
onClick: () => jr((e) => !e),
|
|
5908
5908
|
title: "Ask the table a question",
|
|
5909
|
-
className: `flex h-8 items-center gap-1.5 rounded-md border px-2.5 text-[12px] font-medium ${
|
|
5909
|
+
className: `flex h-8 items-center gap-1.5 rounded-md border px-2.5 text-[12px] font-medium ${za || xe ? "border-nvr-cyan/40 bg-nvr-cyan/[0.08] text-[#007a99] dark:text-nvr-cyan" : "border-slate-200 text-slate-500 hover:text-slate-700 dark:border-slate-700 dark:text-slate-400"}`,
|
|
5910
5910
|
children: [
|
|
5911
5911
|
/* @__PURE__ */ a(Ws, { className: "h-3.5 w-3.5" }),
|
|
5912
5912
|
"Ask"
|
|
@@ -5925,7 +5925,7 @@ function Jg({
|
|
|
5925
5925
|
type: "button",
|
|
5926
5926
|
className: `flex h-8 items-center gap-1 rounded-md border px-2.5 text-[12px] font-medium ${R ? "border-nvr-cyan/40 bg-nvr-cyan/[0.08] text-[#007a99] dark:text-nvr-cyan" : "border-slate-200 text-slate-500 hover:text-slate-700 dark:border-slate-700 dark:text-slate-400"}`,
|
|
5927
5927
|
children: [
|
|
5928
|
-
/* @__PURE__ */ a(
|
|
5928
|
+
/* @__PURE__ */ a(Uc, { className: "h-3.5 w-3.5" }),
|
|
5929
5929
|
R ? `Group: ${R === "__state__" ? "State" : at(R)}` : "Group"
|
|
5930
5930
|
]
|
|
5931
5931
|
}
|
|
@@ -5988,7 +5988,7 @@ function Jg({
|
|
|
5988
5988
|
)
|
|
5989
5989
|
] })
|
|
5990
5990
|
},
|
|
5991
|
-
...
|
|
5991
|
+
...At ? [
|
|
5992
5992
|
{
|
|
5993
5993
|
key: "bulk",
|
|
5994
5994
|
priority: ze ? 95 : 58,
|
|
@@ -5997,13 +5997,13 @@ function Jg({
|
|
|
5997
5997
|
"button",
|
|
5998
5998
|
{
|
|
5999
5999
|
type: "button",
|
|
6000
|
-
onClick:
|
|
6000
|
+
onClick: vd,
|
|
6001
6001
|
"aria-pressed": ze,
|
|
6002
6002
|
"data-cbv-bulk-mode": ze ? "on" : "off",
|
|
6003
6003
|
"data-tip": ze ? "Leave bulk mode — clears the selection and turns row actions back on" : "Select rows to act on several at once",
|
|
6004
6004
|
className: `flex h-8 items-center gap-1.5 rounded-md border px-2.5 text-[12px] font-medium ${ze ? "border-nvr-cyan bg-nvr-cyan/10 text-slate-800 dark:text-slate-100" : "border-slate-200 text-slate-500 hover:bg-slate-100 hover:text-slate-700 dark:border-slate-700 dark:text-slate-400 dark:hover:bg-slate-800"}`,
|
|
6005
6005
|
children: [
|
|
6006
|
-
/* @__PURE__ */ a(
|
|
6006
|
+
/* @__PURE__ */ a(Qc, { className: "h-3.5 w-3.5" }),
|
|
6007
6007
|
ze ? "Done" : "Bulk select"
|
|
6008
6008
|
]
|
|
6009
6009
|
}
|
|
@@ -6022,21 +6022,21 @@ function Jg({
|
|
|
6022
6022
|
"aria-label": "Row density",
|
|
6023
6023
|
title: yn === "compact" ? "Switch to comfortable rows" : "Switch to compact rows",
|
|
6024
6024
|
className: "flex h-8 w-8 items-center justify-center rounded-md border border-slate-200 text-slate-500 hover:bg-slate-100 hover:text-slate-700 dark:border-slate-700 dark:text-slate-400 dark:hover:bg-slate-800",
|
|
6025
|
-
children: yn === "compact" ? /* @__PURE__ */ a(
|
|
6025
|
+
children: yn === "compact" ? /* @__PURE__ */ a(Wc, { className: "h-4 w-4" }) : /* @__PURE__ */ a(zc, { className: "h-4 w-4" })
|
|
6026
6026
|
}
|
|
6027
6027
|
)
|
|
6028
6028
|
},
|
|
6029
6029
|
{
|
|
6030
6030
|
key: "columns",
|
|
6031
6031
|
priority: 62,
|
|
6032
|
-
node: /* @__PURE__ */ d(Cr, { open:
|
|
6032
|
+
node: /* @__PURE__ */ d(Cr, { open: Qa, onOpenChange: Hn, children: [
|
|
6033
6033
|
/* @__PURE__ */ a($r, { asChild: !0, children: /* @__PURE__ */ d(
|
|
6034
6034
|
"button",
|
|
6035
6035
|
{
|
|
6036
6036
|
type: "button",
|
|
6037
6037
|
className: "flex h-8 items-center gap-1 rounded-md border border-slate-200 px-2.5 text-[12px] font-medium text-slate-500 hover:text-slate-700 dark:border-slate-700 dark:text-slate-400",
|
|
6038
6038
|
children: [
|
|
6039
|
-
/* @__PURE__ */ a(
|
|
6039
|
+
/* @__PURE__ */ a(Vc, { className: "h-3.5 w-3.5" }),
|
|
6040
6040
|
"Columns"
|
|
6041
6041
|
]
|
|
6042
6042
|
}
|
|
@@ -6282,12 +6282,12 @@ function Jg({
|
|
|
6282
6282
|
] }, e);
|
|
6283
6283
|
}),
|
|
6284
6284
|
/* @__PURE__ */ a("p", { className: "mt-2 border-t border-slate-100 px-1.5 pb-1 pt-2 text-[10.5px] font-semibold uppercase tracking-wide text-slate-400 dark:border-slate-800", children: "Add column" }),
|
|
6285
|
-
ua && !le.includes(
|
|
6285
|
+
ua && !le.includes(Qn) && /* @__PURE__ */ d(
|
|
6286
6286
|
"button",
|
|
6287
6287
|
{
|
|
6288
6288
|
type: "button",
|
|
6289
6289
|
"data-cbv-add-in-step": "",
|
|
6290
|
-
onClick: () => ae([...le,
|
|
6290
|
+
onClick: () => ae([...le, Qn]),
|
|
6291
6291
|
className: "flex w-full items-center gap-1.5 rounded px-1.5 py-1 text-left text-[12px] text-slate-600 hover:bg-slate-50 dark:text-slate-300 dark:hover:bg-slate-800",
|
|
6292
6292
|
children: [
|
|
6293
6293
|
/* @__PURE__ */ a("span", { "aria-hidden": !0, className: "text-slate-400", children: "+" }),
|
|
@@ -6296,7 +6296,7 @@ function Jg({
|
|
|
6296
6296
|
]
|
|
6297
6297
|
}
|
|
6298
6298
|
),
|
|
6299
|
-
|
|
6299
|
+
Mt.filter((e) => !le.includes(e.field)).map((e) => /* @__PURE__ */ d(
|
|
6300
6300
|
"button",
|
|
6301
6301
|
{
|
|
6302
6302
|
type: "button",
|
|
@@ -6318,7 +6318,7 @@ function Jg({
|
|
|
6318
6318
|
meta: T,
|
|
6319
6319
|
onPick: (e) => {
|
|
6320
6320
|
const t = e.join(".");
|
|
6321
|
-
le.includes(t) || ae([...le, t]),
|
|
6321
|
+
le.includes(t) || ae([...le, t]), Hn(!1);
|
|
6322
6322
|
}
|
|
6323
6323
|
}
|
|
6324
6324
|
)
|
|
@@ -6326,9 +6326,9 @@ function Jg({
|
|
|
6326
6326
|
/* @__PURE__ */ d("div", { className: "mt-1 border-t border-slate-100 pt-1.5 dark:border-slate-800", children: [
|
|
6327
6327
|
/* @__PURE__ */ a("p", { className: "px-1.5 pb-1 text-[10.5px] font-semibold uppercase tracking-wide text-slate-400", children: "+ Formula column" }),
|
|
6328
6328
|
/* @__PURE__ */ a(
|
|
6329
|
-
|
|
6329
|
+
_0,
|
|
6330
6330
|
{
|
|
6331
|
-
fields:
|
|
6331
|
+
fields: Mt.map((e) => e.field),
|
|
6332
6332
|
onAdd: (e, t) => {
|
|
6333
6333
|
let r = 1;
|
|
6334
6334
|
for (; Xe[`__f:${r}`]; ) r++;
|
|
@@ -6346,11 +6346,11 @@ function Jg({
|
|
|
6346
6346
|
"input",
|
|
6347
6347
|
{
|
|
6348
6348
|
autoFocus: !0,
|
|
6349
|
-
value:
|
|
6349
|
+
value: Rn,
|
|
6350
6350
|
placeholder: "Preset name…",
|
|
6351
6351
|
onChange: (e) => Qr(e.target.value),
|
|
6352
6352
|
onKeyDown: (e) => {
|
|
6353
|
-
e.key === "Enter" &&
|
|
6353
|
+
e.key === "Enter" && Rn.trim() && (mr.mutate(), tn(!1)), e.key === "Escape" && tn(!1);
|
|
6354
6354
|
},
|
|
6355
6355
|
className: "h-6 w-full min-w-0 flex-1 rounded border border-slate-200 bg-slate-50 px-1.5 text-[11.5px] outline-none focus:border-nvr-cyan/50 dark:border-slate-700 dark:bg-slate-800 dark:text-slate-100"
|
|
6356
6356
|
}
|
|
@@ -6359,7 +6359,7 @@ function Jg({
|
|
|
6359
6359
|
"button",
|
|
6360
6360
|
{
|
|
6361
6361
|
type: "button",
|
|
6362
|
-
disabled: !
|
|
6362
|
+
disabled: !Rn.trim() || mr.isPending,
|
|
6363
6363
|
onClick: () => {
|
|
6364
6364
|
mr.mutate(), tn(!1);
|
|
6365
6365
|
},
|
|
@@ -6404,16 +6404,16 @@ function Jg({
|
|
|
6404
6404
|
{
|
|
6405
6405
|
key: "export",
|
|
6406
6406
|
priority: 65,
|
|
6407
|
-
active:
|
|
6408
|
-
node: /* @__PURE__ */ d(Cr, { open:
|
|
6407
|
+
active: Va,
|
|
6408
|
+
node: /* @__PURE__ */ d(Cr, { open: gd, onOpenChange: wa, children: [
|
|
6409
6409
|
/* @__PURE__ */ a($r, { asChild: !0, children: /* @__PURE__ */ d(
|
|
6410
6410
|
"button",
|
|
6411
6411
|
{
|
|
6412
6412
|
type: "button",
|
|
6413
|
-
disabled:
|
|
6413
|
+
disabled: Va,
|
|
6414
6414
|
className: "flex h-8 items-center gap-1 rounded-md border border-slate-200 px-2.5 text-[12px] font-medium text-slate-500 hover:text-slate-700 disabled:opacity-50 dark:border-slate-700 dark:text-slate-400",
|
|
6415
6415
|
children: [
|
|
6416
|
-
|
|
6416
|
+
Va ? /* @__PURE__ */ a(Hs, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ a(Hc, { className: "h-3.5 w-3.5" }),
|
|
6417
6417
|
"Export"
|
|
6418
6418
|
]
|
|
6419
6419
|
}
|
|
@@ -6431,7 +6431,7 @@ function Jg({
|
|
|
6431
6431
|
{
|
|
6432
6432
|
type: "button",
|
|
6433
6433
|
onClick: () => {
|
|
6434
|
-
wa(!1),
|
|
6434
|
+
wa(!1), bc();
|
|
6435
6435
|
},
|
|
6436
6436
|
className: "block w-full rounded-md px-2.5 py-1.5 text-left text-[12.5px] text-slate-700 hover:bg-muted dark:text-slate-200",
|
|
6437
6437
|
children: "CSV — visible columns"
|
|
@@ -6457,7 +6457,7 @@ ${r}`).then(() => {
|
|
|
6457
6457
|
});
|
|
6458
6458
|
},
|
|
6459
6459
|
className: "block w-full rounded-md px-2.5 py-1.5 text-left text-[12.5px] text-slate-700 hover:bg-muted dark:text-slate-200",
|
|
6460
|
-
children:
|
|
6460
|
+
children: bd ? "Copied ✓" : "Copy table to clipboard"
|
|
6461
6461
|
}
|
|
6462
6462
|
),
|
|
6463
6463
|
Ro.length > 0 && /* @__PURE__ */ a("p", { className: "border-t border-slate-100 px-2.5 pb-0.5 pt-1.5 text-[10px] font-semibold uppercase tracking-wide text-slate-400 dark:border-border/60", children: "Presets (server, current filters apply)" }),
|
|
@@ -6523,7 +6523,7 @@ ${r}`).then(() => {
|
|
|
6523
6523
|
] })
|
|
6524
6524
|
}
|
|
6525
6525
|
],
|
|
6526
|
-
trail:
|
|
6526
|
+
trail: Ya && !(T != null && T.singleton) && (Ja ? /* @__PURE__ */ d("div", { className: "relative", "data-cbv-newitem-menu": !0, ref: Gr, children: [
|
|
6527
6527
|
/* @__PURE__ */ d(
|
|
6528
6528
|
"button",
|
|
6529
6529
|
{
|
|
@@ -6533,7 +6533,7 @@ ${r}`).then(() => {
|
|
|
6533
6533
|
children: [
|
|
6534
6534
|
"+ ",
|
|
6535
6535
|
_l,
|
|
6536
|
-
/* @__PURE__ */ a(
|
|
6536
|
+
/* @__PURE__ */ a(Ua, { className: "h-3.5 w-3.5" })
|
|
6537
6537
|
]
|
|
6538
6538
|
}
|
|
6539
6539
|
),
|
|
@@ -6542,16 +6542,16 @@ ${r}`).then(() => {
|
|
|
6542
6542
|
{
|
|
6543
6543
|
key: "default",
|
|
6544
6544
|
slug: null,
|
|
6545
|
-
label: ((ri =
|
|
6545
|
+
label: ((ri = Ja.active) == null ? void 0 : ri.create_label) ?? ((si = Ja.active) == null ? void 0 : si.name) ?? "Default layout",
|
|
6546
6546
|
isDefault: !0,
|
|
6547
6547
|
steps: Hr
|
|
6548
6548
|
},
|
|
6549
|
-
...
|
|
6549
|
+
...Ja.options.map((e) => ({
|
|
6550
6550
|
key: String(e.id),
|
|
6551
6551
|
slug: e.slug,
|
|
6552
6552
|
label: e.create_label ?? e.name,
|
|
6553
6553
|
isDefault: !1,
|
|
6554
|
-
steps:
|
|
6554
|
+
steps: $d(e)
|
|
6555
6555
|
}))
|
|
6556
6556
|
].map((e) => /* @__PURE__ */ d(
|
|
6557
6557
|
"div",
|
|
@@ -6579,7 +6579,7 @@ ${r}`).then(() => {
|
|
|
6579
6579
|
"data-cbv-quick-pick": e.slug ?? "default",
|
|
6580
6580
|
title: "Quick pick — choose the related fields step by step, then open the form prefilled",
|
|
6581
6581
|
onClick: () => {
|
|
6582
|
-
_a(!1),
|
|
6582
|
+
_a(!1), Xa({ slug: e.slug });
|
|
6583
6583
|
},
|
|
6584
6584
|
className: "mr-1 flex h-6 shrink-0 items-center gap-1 rounded px-1.5 text-[11px] font-medium text-slate-400 hover:bg-nvr-cyan/10 hover:text-nvr-navy dark:hover:text-nvr-cyan",
|
|
6585
6585
|
children: [
|
|
@@ -6637,7 +6637,7 @@ ${r}`).then(() => {
|
|
|
6637
6637
|
"data-cbv-quick-pick": "default",
|
|
6638
6638
|
title: "Quick pick — choose the related fields step by step, then open the form prefilled",
|
|
6639
6639
|
"aria-label": "Quick pick",
|
|
6640
|
-
onClick: () =>
|
|
6640
|
+
onClick: () => Xa({ slug: null }),
|
|
6641
6641
|
className: fn(
|
|
6642
6642
|
"flex h-8 items-center border-l border-white/30 bg-nvr-cyan px-2 text-white hover:brightness-105",
|
|
6643
6643
|
!((ii = Na.data) != null && ii.enabled) && "rounded-r-md"
|
|
@@ -6669,24 +6669,24 @@ ${r}`).then(() => {
|
|
|
6669
6669
|
accept: (((ci = Na.data) == null ? void 0 : ci.accept) ?? []).join(","),
|
|
6670
6670
|
multiple: !0,
|
|
6671
6671
|
className: "hidden",
|
|
6672
|
-
onChange:
|
|
6672
|
+
onChange: Cd,
|
|
6673
6673
|
"data-cbv-autofill-input": !0
|
|
6674
6674
|
}
|
|
6675
6675
|
)
|
|
6676
6676
|
] }),
|
|
6677
6677
|
Vr && /* @__PURE__ */ a(
|
|
6678
|
-
|
|
6678
|
+
Y0,
|
|
6679
6679
|
{
|
|
6680
6680
|
collection: n,
|
|
6681
6681
|
layoutSlug: Vr.slug,
|
|
6682
6682
|
open: !0,
|
|
6683
6683
|
onOpenChange: (e) => {
|
|
6684
|
-
e ||
|
|
6684
|
+
e || Xa(null);
|
|
6685
6685
|
},
|
|
6686
6686
|
noun: (T == null ? void 0 : T.singular) ?? "record",
|
|
6687
6687
|
anchorEl: Gr.current ?? Tl.current,
|
|
6688
6688
|
onDone: (e) => {
|
|
6689
|
-
|
|
6689
|
+
Xa(null), N({ collection: n, itemId: "new", layoutSlug: Vr.slug, prefill: e });
|
|
6690
6690
|
}
|
|
6691
6691
|
}
|
|
6692
6692
|
),
|
|
@@ -6710,15 +6710,15 @@ ${r}`).then(() => {
|
|
|
6710
6710
|
}
|
|
6711
6711
|
)
|
|
6712
6712
|
] }),
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6713
|
+
Sa && Fn.editing && /* @__PURE__ */ a(hf, { ctl: Fn, collection: n }),
|
|
6714
|
+
Tt.length > 0 && !(Sa && Fn.editing) && /* @__PURE__ */ d("div", { className: "flex shrink-0 flex-wrap items-center gap-1.5 border-b border-slate-100 bg-white px-4 py-1.5 dark:border-slate-800 dark:bg-slate-900", children: [
|
|
6715
|
+
Tt.map((e) => /* @__PURE__ */ a(
|
|
6716
6716
|
zf,
|
|
6717
6717
|
{
|
|
6718
6718
|
def: e,
|
|
6719
6719
|
allowedIds: Rl(e),
|
|
6720
|
-
scopeDefault:
|
|
6721
|
-
narrowBy:
|
|
6720
|
+
scopeDefault: qn.has(e.key),
|
|
6721
|
+
narrowBy: Tt.filter((t) => t.key !== e.key && t.collection).map((t) => ({
|
|
6722
6722
|
collection: t.collection,
|
|
6723
6723
|
field: t.value_field ?? "id",
|
|
6724
6724
|
values: Ht[t.key] ?? []
|
|
@@ -6726,7 +6726,7 @@ ${r}`).then(() => {
|
|
|
6726
6726
|
selected: Ht[e.key] ?? [],
|
|
6727
6727
|
onChange: (t) => {
|
|
6728
6728
|
var r;
|
|
6729
|
-
|
|
6729
|
+
Ot((s) => ({ ...s, [e.key]: t })), t.length === 0 && (((r = ht[e.key]) == null ? void 0 : r.length) ?? 0) > 0 && ($t((s) => ({ ...s, [e.key]: [] })), K(1));
|
|
6730
6730
|
}
|
|
6731
6731
|
},
|
|
6732
6732
|
e.key
|
|
@@ -6747,26 +6747,29 @@ ${r}`).then(() => {
|
|
|
6747
6747
|
{
|
|
6748
6748
|
type: "button",
|
|
6749
6749
|
onClick: () => {
|
|
6750
|
-
|
|
6750
|
+
Ot({}), $t({}), vn({}), K(1);
|
|
6751
6751
|
},
|
|
6752
6752
|
className: "h-6 rounded border border-slate-200 px-2 text-[11px] text-slate-500 hover:text-slate-700 dark:border-slate-700 dark:text-slate-400",
|
|
6753
6753
|
children: "Clear"
|
|
6754
6754
|
}
|
|
6755
6755
|
),
|
|
6756
|
-
|
|
6757
|
-
|
|
6756
|
+
Sa && /* @__PURE__ */ a(
|
|
6757
|
+
Wi,
|
|
6758
6758
|
{
|
|
6759
6759
|
ref: Yr,
|
|
6760
|
-
ctl:
|
|
6760
|
+
ctl: Fn,
|
|
6761
6761
|
className: "ml-0.5 border-l border-slate-200 pl-2 dark:border-slate-700"
|
|
6762
6762
|
}
|
|
6763
6763
|
),
|
|
6764
|
-
/* @__PURE__ */
|
|
6765
|
-
|
|
6766
|
-
|
|
6767
|
-
|
|
6768
|
-
|
|
6769
|
-
|
|
6764
|
+
/* @__PURE__ */ d("span", { className: "ml-auto flex items-center gap-2", children: [
|
|
6765
|
+
!O && /* @__PURE__ */ a(Qi, { kind: "list", id: n, className: "h-6" }),
|
|
6766
|
+
/* @__PURE__ */ a("span", { className: "hidden text-[11px] text-slate-400 md:inline", children: Kt ? "count unavailable" : /* @__PURE__ */ d(Je, { children: [
|
|
6767
|
+
Dn ? "about " : "",
|
|
6768
|
+
St($e),
|
|
6769
|
+
" item",
|
|
6770
|
+
$e === 1 ? "" : "s"
|
|
6771
|
+
] }) })
|
|
6772
|
+
] })
|
|
6770
6773
|
] }),
|
|
6771
6774
|
/* @__PURE__ */ d("div", { className: "flex shrink-0 flex-wrap items-center gap-1.5 border-b border-slate-100 bg-white px-4 py-1.5 dark:border-slate-800 dark:bg-slate-900", children: [
|
|
6772
6775
|
!Ve.some((e) => e.is_default || e.role_default) && /* @__PURE__ */ a(
|
|
@@ -6804,12 +6807,12 @@ ${r}`).then(() => {
|
|
|
6804
6807
|
children: e.name
|
|
6805
6808
|
}
|
|
6806
6809
|
),
|
|
6807
|
-
|
|
6810
|
+
Oa.has(e.id) && /* @__PURE__ */ d(
|
|
6808
6811
|
"span",
|
|
6809
6812
|
{
|
|
6810
6813
|
"data-view-changed": e.id,
|
|
6811
|
-
"data-tip": Ri(
|
|
6812
|
-
"aria-label": Ri(
|
|
6814
|
+
"data-tip": Ri(Oa.get(e.id)),
|
|
6815
|
+
"aria-label": Ri(Oa.get(e.id)),
|
|
6813
6816
|
role: "img",
|
|
6814
6817
|
className: "inline-flex items-center gap-1 rounded-full bg-nvr-cyan/15 px-1.5 text-[10.5px] font-semibold tabular-nums text-[#04516b] dark:bg-nvr-cyan/20 dark:text-nvr-cyan",
|
|
6815
6818
|
children: [
|
|
@@ -6817,7 +6820,7 @@ ${r}`).then(() => {
|
|
|
6817
6820
|
/* @__PURE__ */ a(
|
|
6818
6821
|
Ui,
|
|
6819
6822
|
{
|
|
6820
|
-
value:
|
|
6823
|
+
value: Oa.get(e.id),
|
|
6821
6824
|
format: (t) => Number(t).toLocaleString()
|
|
6822
6825
|
}
|
|
6823
6826
|
)
|
|
@@ -6867,7 +6870,7 @@ ${r}`).then(() => {
|
|
|
6867
6870
|
className: "h-3 w-3 text-emerald-600 dark:text-emerald-400",
|
|
6868
6871
|
strokeWidth: 3
|
|
6869
6872
|
}
|
|
6870
|
-
) : /* @__PURE__ */ a(
|
|
6873
|
+
) : /* @__PURE__ */ a(Gc, { className: "h-3.5 w-3.5" })
|
|
6871
6874
|
}
|
|
6872
6875
|
) }),
|
|
6873
6876
|
/* @__PURE__ */ d(qr, { align: "start", className: "w-72 p-1", children: [
|
|
@@ -6875,17 +6878,17 @@ ${r}`).then(() => {
|
|
|
6875
6878
|
"button",
|
|
6876
6879
|
{
|
|
6877
6880
|
type: "button",
|
|
6878
|
-
onClick: () =>
|
|
6881
|
+
onClick: () => hc.mutate(e.id),
|
|
6879
6882
|
"aria-label": `Toggle digest subscription for ${e.name}`,
|
|
6880
6883
|
className: "flex w-full items-start gap-2 rounded px-2 py-1.5 text-left text-[12.5px] hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan",
|
|
6881
6884
|
children: [
|
|
6882
6885
|
fr(e.id) ? /* @__PURE__ */ a(
|
|
6883
|
-
|
|
6886
|
+
Yc,
|
|
6884
6887
|
{
|
|
6885
6888
|
className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-[#00a5cc]",
|
|
6886
6889
|
fill: "currentColor"
|
|
6887
6890
|
}
|
|
6888
|
-
) : /* @__PURE__ */ a(
|
|
6891
|
+
) : /* @__PURE__ */ a(Jc, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-slate-500" }),
|
|
6889
6892
|
/* @__PURE__ */ d("span", { className: "min-w-0", children: [
|
|
6890
6893
|
fr(e.id) ? "Stop the daily digest" : "Get a daily digest",
|
|
6891
6894
|
/* @__PURE__ */ a("span", { className: "block text-[11.5px] text-muted-foreground", children: fr(e.id) ? "You hear once a day about records that entered this view." : "Once a day, hear about records that entered this view." })
|
|
@@ -6912,13 +6915,13 @@ ${r}`).then(() => {
|
|
|
6912
6915
|
] })
|
|
6913
6916
|
] }),
|
|
6914
6917
|
qt && /* @__PURE__ */ a(
|
|
6915
|
-
|
|
6918
|
+
R0,
|
|
6916
6919
|
{
|
|
6917
6920
|
name: e.name,
|
|
6918
6921
|
isDefault: !!e.is_default,
|
|
6919
6922
|
roleId: e.default_for_role ?? null,
|
|
6920
|
-
onCollectionDefault: (t) =>
|
|
6921
|
-
onRoleDefault: (t) =>
|
|
6923
|
+
onCollectionDefault: (t) => uc.mutate({ id: e.id, on: t }),
|
|
6924
|
+
onRoleDefault: (t) => pc.mutate({ id: e.id, role: t })
|
|
6922
6925
|
}
|
|
6923
6926
|
),
|
|
6924
6927
|
co(e) && (qt || !(e.is_default || e.default_for_role)) && /* @__PURE__ */ a(
|
|
@@ -6927,7 +6930,7 @@ ${r}`).then(() => {
|
|
|
6927
6930
|
title: `Delete view ${e.name}`,
|
|
6928
6931
|
confirmLabel: "Delete?",
|
|
6929
6932
|
confirmTitle: e.is_default || e.default_for_role ? `Delete "${e.name}"? Everyone who uses it as their default loses it` : `Delete the view "${e.name}"?`,
|
|
6930
|
-
onConfirm: () =>
|
|
6933
|
+
onConfirm: () => mc.mutate(e.id),
|
|
6931
6934
|
className: "hover:text-red-500",
|
|
6932
6935
|
armedClassName: "rounded bg-red-50 px-1.5 text-[11px] font-semibold text-red-700 ring-1 ring-inset ring-red-200 hover:bg-red-100 hover:text-red-800 dark:bg-red-500/15 dark:text-red-300 dark:ring-red-500/30 dark:hover:bg-red-500/25 dark:hover:text-red-200",
|
|
6933
6936
|
children: "✕"
|
|
@@ -6938,19 +6941,19 @@ ${r}`).then(() => {
|
|
|
6938
6941
|
},
|
|
6939
6942
|
e.id
|
|
6940
6943
|
)),
|
|
6941
|
-
|
|
6944
|
+
hd ? /* @__PURE__ */ d(
|
|
6942
6945
|
"form",
|
|
6943
6946
|
{
|
|
6944
6947
|
className: "flex items-center gap-1",
|
|
6945
6948
|
onSubmit: (e) => {
|
|
6946
|
-
e.preventDefault(),
|
|
6949
|
+
e.preventDefault(), Rn.trim() && mr.mutate();
|
|
6947
6950
|
},
|
|
6948
6951
|
children: [
|
|
6949
6952
|
/* @__PURE__ */ a(
|
|
6950
6953
|
"input",
|
|
6951
6954
|
{
|
|
6952
6955
|
autoFocus: !0,
|
|
6953
|
-
value:
|
|
6956
|
+
value: Rn,
|
|
6954
6957
|
onChange: (e) => Qr(e.target.value),
|
|
6955
6958
|
placeholder: "View name…",
|
|
6956
6959
|
className: "h-6 w-32 rounded border border-slate-200 bg-slate-50 px-1.5 text-[11.5px] outline-none focus:border-nvr-cyan/50 dark:border-slate-700 dark:bg-slate-800 dark:text-slate-100"
|
|
@@ -6960,7 +6963,7 @@ ${r}`).then(() => {
|
|
|
6960
6963
|
"button",
|
|
6961
6964
|
{
|
|
6962
6965
|
type: "submit",
|
|
6963
|
-
disabled: !
|
|
6966
|
+
disabled: !Rn.trim(),
|
|
6964
6967
|
className: "rounded bg-nvr-cyan px-2 py-0.5 text-[11px] font-semibold text-white disabled:opacity-40",
|
|
6965
6968
|
children: "Save"
|
|
6966
6969
|
}
|
|
@@ -6986,25 +6989,25 @@ ${r}`).then(() => {
|
|
|
6986
6989
|
children: "☆ Save view"
|
|
6987
6990
|
}
|
|
6988
6991
|
),
|
|
6989
|
-
|
|
6990
|
-
|
|
6992
|
+
Sa && Tt.length === 0 && !Fn.editing && /* @__PURE__ */ a(
|
|
6993
|
+
Wi,
|
|
6991
6994
|
{
|
|
6992
6995
|
ref: Yr,
|
|
6993
|
-
ctl:
|
|
6996
|
+
ctl: Fn,
|
|
6994
6997
|
label: "Add quick filters",
|
|
6995
6998
|
className: "ml-auto"
|
|
6996
6999
|
}
|
|
6997
7000
|
)
|
|
6998
7001
|
] }),
|
|
6999
|
-
|
|
7002
|
+
Md && !Ee && /* @__PURE__ */ a(Tf, { collection: n, className: "mx-4 mt-3" }),
|
|
7000
7003
|
Ee != null && /* @__PURE__ */ d("div", { className: "mx-4 mt-3 flex flex-wrap items-center gap-3 rounded-md border border-red-200 bg-red-50 px-4 py-2.5 text-[13px] text-red-700 dark:border-red-900/40 dark:bg-red-900/10 dark:text-red-400", children: [
|
|
7001
|
-
/* @__PURE__ */ a("span", { className: "min-w-0 flex-1", children:
|
|
7004
|
+
/* @__PURE__ */ a("span", { className: "min-w-0 flex-1", children: Op(Ee) === 503 ? Pp(Ee) : ja(Ee, "Failed to load records") }),
|
|
7002
7005
|
(Ee == null ? void 0 : Ee.status) === 403 && !tl(Ee) && /* @__PURE__ */ a(
|
|
7003
7006
|
"button",
|
|
7004
7007
|
{
|
|
7005
7008
|
type: "button",
|
|
7006
7009
|
disabled: Vl,
|
|
7007
|
-
onClick: () => void f.request(qe("/access-requests", { collection: n })).then(() =>
|
|
7010
|
+
onClick: () => void f.request(qe("/access-requests", { collection: n })).then(() => Dd(!0)).catch(() => {
|
|
7008
7011
|
}),
|
|
7009
7012
|
className: "h-7 shrink-0 rounded-md border border-red-300 px-2.5 text-[12px] font-medium hover:bg-red-100 disabled:opacity-60 dark:border-red-500/40 dark:hover:bg-red-900/20",
|
|
7010
7013
|
"data-request-access": !0,
|
|
@@ -7016,7 +7019,7 @@ ${r}`).then(() => {
|
|
|
7016
7019
|
{
|
|
7017
7020
|
type: "button",
|
|
7018
7021
|
onClick: () => {
|
|
7019
|
-
const t =
|
|
7022
|
+
const t = L0(e, { filters: _e, sort: ie, colFilters: Ze });
|
|
7020
7023
|
We(t.filters), ut(t.sort), vn(t.colFilters), K(1);
|
|
7021
7024
|
},
|
|
7022
7025
|
title: `Remove the filter or sort on "${e}" — this list cannot filter on it`,
|
|
@@ -7040,20 +7043,20 @@ ${r}`).then(() => {
|
|
|
7040
7043
|
}
|
|
7041
7044
|
)
|
|
7042
7045
|
] }),
|
|
7043
|
-
|
|
7044
|
-
|
|
7046
|
+
Lt === "tree" && $a ? /* @__PURE__ */ a("div", { className: "flex min-h-0 flex-1 flex-col p-4 pt-3", children: /* @__PURE__ */ a("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden rounded-lg border border-slate-200 bg-white dark:border-slate-700 dark:bg-slate-900", children: /* @__PURE__ */ a(
|
|
7047
|
+
e0,
|
|
7045
7048
|
{
|
|
7046
7049
|
collection: n,
|
|
7047
|
-
config:
|
|
7048
|
-
onOpen: (e) =>
|
|
7050
|
+
config: $a,
|
|
7051
|
+
onOpen: (e) => Cn(e),
|
|
7049
7052
|
onAddChild: U && Ae.allow_create !== !1 ? (e) => N({
|
|
7050
7053
|
collection: n,
|
|
7051
7054
|
itemId: "new",
|
|
7052
|
-
prefill: { [
|
|
7055
|
+
prefill: { [$a.parent_field]: e }
|
|
7053
7056
|
}) : void 0
|
|
7054
7057
|
}
|
|
7055
|
-
) }) }) :
|
|
7056
|
-
|
|
7058
|
+
) }) }) : Lt && (Q != null && Q.some((e) => e.key === Lt)) ? /* @__PURE__ */ a("div", { className: "flex min-h-0 flex-1 flex-col p-4 pt-3", "data-cbv-extra-view": Lt, children: (ui = Q.find((e) => e.key === Lt)) == null ? void 0 : ui.render() }) : null,
|
|
7059
|
+
Pn && Xn ? /* @__PURE__ */ a("div", { className: "flex min-h-0 flex-1 flex-col p-4 pt-3", children: /* @__PURE__ */ a(
|
|
7057
7060
|
of,
|
|
7058
7061
|
{
|
|
7059
7062
|
collection: n,
|
|
@@ -7062,13 +7065,13 @@ ${r}`).then(() => {
|
|
|
7062
7065
|
labelField: Xn.labelField,
|
|
7063
7066
|
conditions: Ne ?? null,
|
|
7064
7067
|
search: Y,
|
|
7065
|
-
onOpen: (e) =>
|
|
7068
|
+
onOpen: (e) => Cn(e)
|
|
7066
7069
|
}
|
|
7067
7070
|
) }) : null,
|
|
7068
7071
|
/* @__PURE__ */ d(
|
|
7069
7072
|
"div",
|
|
7070
7073
|
{
|
|
7071
|
-
className:
|
|
7074
|
+
className: Pn && Xn || Lt === "tree" && $a || Lt && (Q != null && Q.some((e) => e.key === Lt)) ? "hidden" : "flex min-h-0 flex-1 flex-col p-4 pt-3",
|
|
7072
7075
|
children: [
|
|
7073
7076
|
Us && /* @__PURE__ */ a(
|
|
7074
7077
|
"p",
|
|
@@ -7086,7 +7089,7 @@ ${r}`).then(() => {
|
|
|
7086
7089
|
ref: yt.rootRef,
|
|
7087
7090
|
className: "nvr-fade-in relative flex min-h-0 flex-1 flex-col overflow-hidden rounded-lg border border-slate-200 bg-white dark:border-slate-700 dark:bg-slate-900",
|
|
7088
7091
|
children: [
|
|
7089
|
-
aa.label && /* @__PURE__ */ a(
|
|
7092
|
+
aa.label && /* @__PURE__ */ a(ef, { label: aa.label, onShow: ms, className: "bottom-28" }),
|
|
7090
7093
|
gt && !nr && /* @__PURE__ */ a("div", { className: "cbv-progress pointer-events-none absolute inset-x-0 top-0 z-[6] h-[3px] overflow-hidden" }),
|
|
7091
7094
|
gt && !nr && cn && /* @__PURE__ */ a(Je, { children: /* @__PURE__ */ a("div", { className: "cbv-overlay nvr-fade-in pointer-events-none absolute inset-0 z-[5] flex items-start justify-center bg-white/40 pt-24 dark:bg-slate-950/35", children: /* @__PURE__ */ d("span", { className: "nvr-pop-in flex items-center gap-2 rounded-full border border-slate-200 bg-white px-3 py-1.5 text-[12px] font-medium text-slate-600 shadow-lg dark:border-slate-700 dark:bg-slate-900 dark:text-slate-300", children: [
|
|
7092
7095
|
/* @__PURE__ */ a(wr, { "aria-hidden": !0, className: "h-3.5 w-3.5 animate-spin text-[#00a5cc]" }),
|
|
@@ -7096,7 +7099,7 @@ ${r}`).then(() => {
|
|
|
7096
7099
|
/* @__PURE__ */ a(
|
|
7097
7100
|
"div",
|
|
7098
7101
|
{
|
|
7099
|
-
ref:
|
|
7102
|
+
ref: Ha,
|
|
7100
7103
|
"data-cbv-scroll": !0,
|
|
7101
7104
|
className: "min-h-0 flex-1 overflow-y-auto overflow-x-hidden",
|
|
7102
7105
|
children: le.length === 0 ? /* @__PURE__ */ d("div", { className: "p-0", children: [
|
|
@@ -7125,19 +7128,19 @@ ${r}`).then(() => {
|
|
|
7125
7128
|
children: [
|
|
7126
7129
|
/* @__PURE__ */ d("thead", { children: [
|
|
7127
7130
|
/* @__PURE__ */ d("tr", { className: "border-b border-slate-200 dark:border-slate-700", children: [
|
|
7128
|
-
|
|
7131
|
+
At && /* @__PURE__ */ a(
|
|
7129
7132
|
"th",
|
|
7130
7133
|
{
|
|
7131
7134
|
ref: vr("__checkbox__"),
|
|
7132
7135
|
className: "sticky left-0 top-0 z-[4] h-8 w-11 bg-slate-50 py-0 pl-1.5 pr-3 dark:bg-slate-800",
|
|
7133
7136
|
children: /* @__PURE__ */ d("span", { className: "flex items-center gap-1", children: [
|
|
7134
|
-
/* @__PURE__ */ a(
|
|
7137
|
+
/* @__PURE__ */ a(zi, { change: null }),
|
|
7135
7138
|
ze && /* @__PURE__ */ a(
|
|
7136
7139
|
"input",
|
|
7137
7140
|
{
|
|
7138
7141
|
type: "checkbox",
|
|
7139
7142
|
checked: Os,
|
|
7140
|
-
onChange:
|
|
7143
|
+
onChange: vc,
|
|
7141
7144
|
"aria-label": "Select all"
|
|
7142
7145
|
}
|
|
7143
7146
|
)
|
|
@@ -7147,17 +7150,17 @@ ${r}`).then(() => {
|
|
|
7147
7150
|
rn.map((e) => {
|
|
7148
7151
|
const t = e.key, r = !!nn(t), s = `group/hcell sticky top-0 h-8 select-none whitespace-nowrap bg-slate-50 px-3 py-0 text-[10px] font-bold uppercase tracking-wider text-slate-500 dark:bg-slate-800 dark:text-slate-400 ${r ? "z-[4]" : "z-[2]"}`, l = kt(t, "", "");
|
|
7149
7152
|
if (e.kind === "in_step") {
|
|
7150
|
-
const z = ie ===
|
|
7153
|
+
const z = ie === Ia || ie === `-${Ia}`, ve = ie === `-${Ia}`;
|
|
7151
7154
|
return /* @__PURE__ */ d(
|
|
7152
7155
|
"th",
|
|
7153
7156
|
{
|
|
7154
7157
|
ref: r || Jn[t] ? vr(t) : void 0,
|
|
7155
7158
|
style: { ...yr(t), ...Ue(t) },
|
|
7156
|
-
onClick: () => hr(
|
|
7159
|
+
onClick: () => hr(Ia),
|
|
7157
7160
|
"aria-sort": z ? ve ? "descending" : "ascending" : "none",
|
|
7158
7161
|
tabIndex: 0,
|
|
7159
7162
|
onKeyDown: (ue) => {
|
|
7160
|
-
ue.target === ue.currentTarget && (ue.key === "Enter" || ue.key === " ") && (ue.preventDefault(), hr(
|
|
7163
|
+
ue.target === ue.currentTarget && (ue.key === "Enter" || ue.key === " ") && (ue.preventDefault(), hr(Ia));
|
|
7161
7164
|
},
|
|
7162
7165
|
"data-tip": "How long each record has been in its current step. Sort: shortest first, then longest.",
|
|
7163
7166
|
className: `${s} relative cursor-pointer text-left hover:text-slate-600 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-nvr-cyan ${l}`,
|
|
@@ -7230,11 +7233,11 @@ ${r}`).then(() => {
|
|
|
7230
7233
|
),
|
|
7231
7234
|
js(t),
|
|
7232
7235
|
/* @__PURE__ */ a(
|
|
7233
|
-
|
|
7236
|
+
t0,
|
|
7234
7237
|
{
|
|
7235
7238
|
label: be,
|
|
7236
7239
|
selectedCount: ze ? tt.length : 0,
|
|
7237
|
-
setUnavailable:
|
|
7240
|
+
setUnavailable: wd,
|
|
7238
7241
|
onSetSelected: (
|
|
7239
7242
|
// A to-many column (an alias the list resolves) is offered too: the
|
|
7240
7243
|
// panel adds / replaces / removes its links.
|
|
@@ -7248,20 +7251,20 @@ ${r}`).then(() => {
|
|
|
7248
7251
|
fn: Ke[t] === "sum" ? "sum" : null,
|
|
7249
7252
|
onChange: ve,
|
|
7250
7253
|
only: ["sum"],
|
|
7251
|
-
note:
|
|
7254
|
+
note: Ad(z.terms)
|
|
7252
7255
|
} : { fn: Ke[t] ?? null, onChange: ve };
|
|
7253
7256
|
})()
|
|
7254
7257
|
}
|
|
7255
7258
|
),
|
|
7256
|
-
|
|
7259
|
+
Ac(t)
|
|
7257
7260
|
]
|
|
7258
7261
|
},
|
|
7259
7262
|
t
|
|
7260
7263
|
);
|
|
7261
7264
|
})
|
|
7262
7265
|
] }),
|
|
7263
|
-
(
|
|
7264
|
-
|
|
7266
|
+
(sc || ua) && /* @__PURE__ */ d("tr", { className: "border-b border-slate-200 dark:border-slate-700", children: [
|
|
7267
|
+
At && /* @__PURE__ */ a("th", { className: "sticky left-0 top-8 z-[4] w-11 bg-slate-50 py-1 pl-1.5 pr-3 dark:bg-slate-800", children: /* @__PURE__ */ a("span", { className: "sr-only", children: "Filters" }) }),
|
|
7265
7268
|
rn.map((e) => {
|
|
7266
7269
|
var l;
|
|
7267
7270
|
const t = e.key, s = `sticky top-8 bg-slate-50 px-2 py-1 text-left font-normal dark:bg-slate-800 ${!!nn(t) ? "z-[4]" : "z-[2]"} ${kt(t, "", "")}`;
|
|
@@ -7314,7 +7317,7 @@ ${r}`).then(() => {
|
|
|
7314
7317
|
className: s,
|
|
7315
7318
|
"data-aging-filter": !0,
|
|
7316
7319
|
children: /* @__PURE__ */ a(
|
|
7317
|
-
|
|
7320
|
+
K0,
|
|
7318
7321
|
{
|
|
7319
7322
|
layout: "cell",
|
|
7320
7323
|
def: {
|
|
@@ -7404,7 +7407,7 @@ ${r}`).then(() => {
|
|
|
7404
7407
|
children: /* @__PURE__ */ a("span", { className: "sr-only", children: "No filter" })
|
|
7405
7408
|
},
|
|
7406
7409
|
t
|
|
7407
|
-
) : /* @__PURE__ */ a("th", { style: Ue(t), className: s, children:
|
|
7410
|
+
) : /* @__PURE__ */ a("th", { style: Ue(t), className: s, children: rc(t) }, t);
|
|
7408
7411
|
})
|
|
7409
7412
|
] })
|
|
7410
7413
|
] }),
|
|
@@ -7414,11 +7417,11 @@ ${r}`).then(() => {
|
|
|
7414
7417
|
/* @__PURE__ */ a(
|
|
7415
7418
|
_f,
|
|
7416
7419
|
{
|
|
7417
|
-
columns:
|
|
7420
|
+
columns: Lc,
|
|
7418
7421
|
rows: Math.min(et, 20),
|
|
7419
7422
|
rowClassName: "h-8",
|
|
7420
7423
|
cellClassName: "px-3 py-1.5",
|
|
7421
|
-
leadingCells:
|
|
7424
|
+
leadingCells: At ? 1 : 0,
|
|
7422
7425
|
cellStyle: (e) => ({ ...yr(e), ...Ue(e) }),
|
|
7423
7426
|
barClassName: "cbv-shimmer"
|
|
7424
7427
|
}
|
|
@@ -7451,33 +7454,33 @@ ${r}`).then(() => {
|
|
|
7451
7454
|
const r = $e === 0 && !xe && !!Y;
|
|
7452
7455
|
return /* @__PURE__ */ d("div", { className: "flex flex-col items-center gap-2 text-center", children: [
|
|
7453
7456
|
/* @__PURE__ */ a("span", { className: "flex h-10 w-10 items-center justify-center rounded-full bg-slate-100 dark:bg-slate-800", children: /* @__PURE__ */ a(
|
|
7454
|
-
|
|
7457
|
+
td,
|
|
7455
7458
|
{
|
|
7456
7459
|
"aria-hidden": !0,
|
|
7457
7460
|
className: "h-4.5 w-4.5 h-5 w-5 text-slate-400"
|
|
7458
7461
|
}
|
|
7459
7462
|
) }),
|
|
7460
7463
|
/* @__PURE__ */ a("p", { className: "text-[13.5px] font-medium text-slate-600 dark:text-slate-300", children: "No records match" }),
|
|
7461
|
-
$e === 0 && (
|
|
7464
|
+
$e === 0 && (Ra ?? 0) > 0 && /* @__PURE__ */ d(
|
|
7462
7465
|
"p",
|
|
7463
7466
|
{
|
|
7464
7467
|
className: "max-w-[52ch] text-[12px] text-slate-600 dark:text-slate-300",
|
|
7465
|
-
"data-cbv-default-hiding":
|
|
7468
|
+
"data-cbv-default-hiding": Ra,
|
|
7466
7469
|
children: [
|
|
7467
7470
|
"Your default",
|
|
7468
7471
|
" ",
|
|
7469
|
-
|
|
7472
|
+
La.map((s) => s.label).join(" and "),
|
|
7470
7473
|
" filter is hiding ",
|
|
7471
|
-
St(
|
|
7474
|
+
St(Ra ?? 0),
|
|
7472
7475
|
" record",
|
|
7473
|
-
|
|
7476
|
+
Ra === 1 ? "" : "s",
|
|
7474
7477
|
" ·",
|
|
7475
7478
|
" ",
|
|
7476
7479
|
/* @__PURE__ */ a(
|
|
7477
7480
|
"button",
|
|
7478
7481
|
{
|
|
7479
7482
|
type: "button",
|
|
7480
|
-
onClick:
|
|
7483
|
+
onClick: jd,
|
|
7481
7484
|
className: "font-medium text-[#0284a8] underline-offset-2 hover:underline dark:text-nvr-cyan",
|
|
7482
7485
|
children: "Show all"
|
|
7483
7486
|
}
|
|
@@ -7486,13 +7489,13 @@ ${r}`).then(() => {
|
|
|
7486
7489
|
}
|
|
7487
7490
|
),
|
|
7488
7491
|
/* @__PURE__ */ a(
|
|
7489
|
-
|
|
7492
|
+
N0,
|
|
7490
7493
|
{
|
|
7491
7494
|
term: Y,
|
|
7492
7495
|
collection: n,
|
|
7493
7496
|
show: r,
|
|
7494
7497
|
ask: r && !gt,
|
|
7495
|
-
fallback: $e === 0 && (
|
|
7498
|
+
fallback: $e === 0 && (Ra ?? 0) > 0 ? null : /* @__PURE__ */ a("p", { className: "text-[12px] text-slate-400", children: "Try adjusting your search or filters." })
|
|
7496
7499
|
}
|
|
7497
7500
|
),
|
|
7498
7501
|
(_e.length > 0 || Object.keys(Ze).length > 0 || Object.values(ht).some((s) => s.length > 0) || Y) && /* @__PURE__ */ a(
|
|
@@ -7500,7 +7503,7 @@ ${r}`).then(() => {
|
|
|
7500
7503
|
{
|
|
7501
7504
|
type: "button",
|
|
7502
7505
|
onClick: () => {
|
|
7503
|
-
We([]), vn({}),
|
|
7506
|
+
We([]), vn({}), Ot({}), $t({}), we(""), K(1);
|
|
7504
7507
|
},
|
|
7505
7508
|
className: "mt-1 h-7 rounded-md border border-slate-200 px-3 text-[12px] font-medium text-slate-600 hover:border-nvr-cyan/40 hover:text-[#00a5cc] dark:border-slate-700 dark:text-slate-300",
|
|
7506
7509
|
children: "Clear all filters"
|
|
@@ -7517,7 +7520,7 @@ ${r}`).then(() => {
|
|
|
7517
7520
|
"tr",
|
|
7518
7521
|
{
|
|
7519
7522
|
"data-group-key": e.gkey,
|
|
7520
|
-
onClick: () =>
|
|
7523
|
+
onClick: () => Wa((Re) => {
|
|
7521
7524
|
const k = new Set(Re);
|
|
7522
7525
|
return k.has(e.gkey) ? k.delete(e.gkey) : k.add(e.gkey), k;
|
|
7523
7526
|
}),
|
|
@@ -7530,7 +7533,7 @@ ${r}`).then(() => {
|
|
|
7530
7533
|
colSpan: le.length + zo,
|
|
7531
7534
|
children: /* @__PURE__ */ d("span", { className: "flex items-center gap-1.5 text-[12px] font-medium text-slate-600 dark:text-slate-200", children: [
|
|
7532
7535
|
/* @__PURE__ */ a(
|
|
7533
|
-
|
|
7536
|
+
Ua,
|
|
7534
7537
|
{
|
|
7535
7538
|
className: `h-3.5 w-3.5 text-slate-400 transition-transform duration-200 ${kn.has(e.gkey) ? "-rotate-90" : ""}`
|
|
7536
7539
|
}
|
|
@@ -7543,32 +7546,32 @@ ${r}`).then(() => {
|
|
|
7543
7546
|
},
|
|
7544
7547
|
`__group__${e.gkey}`
|
|
7545
7548
|
);
|
|
7546
|
-
const s = e.row, l = s.id, o = tt.includes(l), u = (ye = Se == null ? void 0 : Se.instances) == null ? void 0 : ye[String(l)], m =
|
|
7549
|
+
const s = e.row, l = s.id, o = tt.includes(l), u = (ye = Se == null ? void 0 : Se.instances) == null ? void 0 : ye[String(l)], m = Hd[String(l)], x = xs == null ? void 0 : xs[String(l)], A = zd.get(String(l)) ?? null, j = Yd(n, l), be = !!(Cs != null && Cs.has(String(l))), z = !o && m ? am(m.color) : !o && be ? Zi : void 0, ve = o ? rm : m ? z ?? Ci : be ? `${Zi} ${$i}` : `${Ci} ${$i}`, ue = sm, G = Bn.movingTo(String(l)), wt = G ? ((pe = rn.map((Re) => ({ k: Re.key, n: String(s[Re.key] ?? "").length })).sort((Re, k) => k.n - Re.n)[0]) == null ? void 0 : pe.k) ?? ((Ce = rn[0]) == null ? void 0 : Ce.key) : null;
|
|
7547
7550
|
return /* @__PURE__ */ d(
|
|
7548
7551
|
"tr",
|
|
7549
7552
|
{
|
|
7550
|
-
...
|
|
7551
|
-
...
|
|
7553
|
+
...Bd({ collection: n, id: String(l) }),
|
|
7554
|
+
...xc(l),
|
|
7552
7555
|
"data-row-key": String(l),
|
|
7553
|
-
title: (
|
|
7556
|
+
title: (Aa(String(l)) ? Lp : void 0) ?? (Bn.movingTo(String(l)) != null ? vp(Bn.movingTo(String(l))) : void 0) ?? yt.titleFor(String(l)) ?? (A && !A.is_mine ? _p(A) : void 0) ?? (m ? `At risk — ${m.rule}` : void 0) ?? (j ? ff : void 0),
|
|
7554
7557
|
"data-picker-excluded": j ? "" : void 0,
|
|
7555
|
-
"data-row-gone":
|
|
7558
|
+
"data-row-gone": Aa(String(l)) ? "" : void 0,
|
|
7556
7559
|
style: r,
|
|
7557
|
-
className: `nvr-row-enter group h-8 cursor-pointer border-b border-slate-100 transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-nvr-cyan dark:border-slate-800 ${ve} ${j ? mf : ""} ${
|
|
7560
|
+
className: `nvr-row-enter group h-8 cursor-pointer border-b border-slate-100 transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-nvr-cyan dark:border-slate-800 ${ve} ${j ? mf : ""} ${Aa(String(l)) ? Tp : ""}`,
|
|
7558
7561
|
children: [
|
|
7559
|
-
|
|
7562
|
+
At && /* @__PURE__ */ a(
|
|
7560
7563
|
"td",
|
|
7561
7564
|
{
|
|
7562
7565
|
className: `sticky left-0 z-[1] w-11 py-1.5 pl-1.5 pr-3 ${ue}`,
|
|
7563
7566
|
onClick: (Re) => Re.stopPropagation(),
|
|
7564
7567
|
children: /* @__PURE__ */ d("span", { className: "flex items-center gap-1", children: [
|
|
7565
|
-
A || yt.isNew(String(l)) ||
|
|
7566
|
-
|
|
7568
|
+
A || yt.isNew(String(l)) || Aa(String(l)) || Bn.movingTo(String(l)) != null ? /* @__PURE__ */ a(
|
|
7569
|
+
tf,
|
|
7567
7570
|
{
|
|
7568
7571
|
lock: A,
|
|
7569
7572
|
isNew: yt.isNew(String(l)),
|
|
7570
|
-
gone:
|
|
7571
|
-
movingTo:
|
|
7573
|
+
gone: Aa(String(l)),
|
|
7574
|
+
movingTo: Bn.movingTo(String(l)),
|
|
7572
7575
|
dataAttr: "data-cbv-live-mark"
|
|
7573
7576
|
}
|
|
7574
7577
|
) : os[Zs(n, String(l))] ? /* @__PURE__ */ a(
|
|
@@ -7577,22 +7580,31 @@ ${r}`).then(() => {
|
|
|
7577
7580
|
viewers: os[Zs(n, String(l))],
|
|
7578
7581
|
dataAttr: "data-cbv-presence"
|
|
7579
7582
|
}
|
|
7580
|
-
) : !x && be ? /* @__PURE__ */ a(nh, {}) : /* @__PURE__ */ a(
|
|
7581
|
-
|
|
7583
|
+
) : !x && be ? /* @__PURE__ */ a(nh, {}) : /* @__PURE__ */ a(
|
|
7584
|
+
zi,
|
|
7585
|
+
{
|
|
7586
|
+
change: x,
|
|
7587
|
+
dataAttr: "data-cbv-unseen",
|
|
7588
|
+
collection: n,
|
|
7589
|
+
itemId: String(l),
|
|
7590
|
+
onOpen: () => Cn(l)
|
|
7591
|
+
}
|
|
7592
|
+
),
|
|
7593
|
+
/* @__PURE__ */ a(Bm, { rowId: l }),
|
|
7582
7594
|
ze && /* @__PURE__ */ a(
|
|
7583
7595
|
"input",
|
|
7584
7596
|
{
|
|
7585
7597
|
type: "checkbox",
|
|
7586
7598
|
checked: o,
|
|
7587
|
-
onChange: () =>
|
|
7588
|
-
"aria-label": `Select ${
|
|
7599
|
+
onChange: () => yc(l),
|
|
7600
|
+
"aria-label": `Select ${Xp(T, s, l, n) || "this record"}`
|
|
7589
7601
|
}
|
|
7590
7602
|
)
|
|
7591
7603
|
] })
|
|
7592
7604
|
}
|
|
7593
7605
|
),
|
|
7594
7606
|
rn.map((Re) => {
|
|
7595
|
-
var sn, Ut, Jt, ma,
|
|
7607
|
+
var sn, Ut, Jt, ma, Un, Nt, Qt, ln;
|
|
7596
7608
|
const k = Re.key;
|
|
7597
7609
|
if (Re.kind === "state")
|
|
7598
7610
|
return /* @__PURE__ */ a(
|
|
@@ -7639,8 +7651,8 @@ ${r}`).then(() => {
|
|
|
7639
7651
|
)
|
|
7640
7652
|
]
|
|
7641
7653
|
}
|
|
7642
|
-
) :
|
|
7643
|
-
!
|
|
7654
|
+
) : Ea || !(((sn = un == null ? void 0 : un[String(l)]) == null ? void 0 : sn.length) ?? 0) ? /* @__PURE__ */ a("span", { className: "text-[12px] text-slate-300", children: "—" }) : null,
|
|
7655
|
+
!Ea && /* @__PURE__ */ a(
|
|
7644
7656
|
Ii,
|
|
7645
7657
|
{
|
|
7646
7658
|
facts: un == null ? void 0 : un[String(l)],
|
|
@@ -7659,7 +7671,7 @@ ${r}`).then(() => {
|
|
|
7659
7671
|
style: { ...yr(k), ...Ue(k) },
|
|
7660
7672
|
className: `whitespace-nowrap px-3 py-1.5 text-[12px] ${kt(k, "z-[1]", ue)}`,
|
|
7661
7673
|
children: /* @__PURE__ */ a(
|
|
7662
|
-
|
|
7674
|
+
W0,
|
|
7663
7675
|
{
|
|
7664
7676
|
stepLabel: p == null ? void 0 : p.state_label,
|
|
7665
7677
|
enteredAt: p == null ? void 0 : p.entered_at,
|
|
@@ -7691,9 +7703,9 @@ ${r}`).then(() => {
|
|
|
7691
7703
|
"td",
|
|
7692
7704
|
{
|
|
7693
7705
|
style: Ue(k),
|
|
7694
|
-
"data-tip": D != null && (p != null && p.entered_at) ? `In ${p.state_label ?? "this state"} since ${
|
|
7706
|
+
"data-tip": D != null && (p != null && p.entered_at) ? `In ${p.state_label ?? "this state"} since ${Fm(p.entered_at)}` : void 0,
|
|
7695
7707
|
className: `whitespace-nowrap px-3 py-1.5 text-[12px] tabular-nums text-slate-600 dark:text-slate-300 ${kt(k, "z-[1]", ue)}`,
|
|
7696
|
-
children: D == null ? /* @__PURE__ */ a("span", { className: "text-slate-300 dark:text-slate-600", children: "—" }) :
|
|
7708
|
+
children: D == null ? /* @__PURE__ */ a("span", { className: "text-slate-300 dark:text-slate-600", children: "—" }) : Rm(D)
|
|
7697
7709
|
},
|
|
7698
7710
|
k
|
|
7699
7711
|
);
|
|
@@ -7735,11 +7747,11 @@ ${r}`).then(() => {
|
|
|
7735
7747
|
className: `whitespace-nowrap px-3 py-1.5 ${kt(k, "z-[1]", ue)}`,
|
|
7736
7748
|
onClick: (p) => p.stopPropagation(),
|
|
7737
7749
|
children: /* @__PURE__ */ a(
|
|
7738
|
-
|
|
7750
|
+
B0,
|
|
7739
7751
|
{
|
|
7740
7752
|
collection: n,
|
|
7741
7753
|
itemId: String(l),
|
|
7742
|
-
figures:
|
|
7754
|
+
figures: U0(
|
|
7743
7755
|
s[Be.shipped_field],
|
|
7744
7756
|
s[Be.requested_field]
|
|
7745
7757
|
),
|
|
@@ -7750,14 +7762,14 @@ ${r}`).then(() => {
|
|
|
7750
7762
|
k
|
|
7751
7763
|
);
|
|
7752
7764
|
if (Re.kind === "integrations") {
|
|
7753
|
-
const p = un == null ? void 0 : un[String(l)], B = vs == null ? void 0 : vs[String(l)], D =
|
|
7765
|
+
const p = un == null ? void 0 : un[String(l)], B = vs == null ? void 0 : vs[String(l)], D = Iu(B ?? []).length > 0 || !Array.isArray(p) || p.length === 0;
|
|
7754
7766
|
return /* @__PURE__ */ a(
|
|
7755
7767
|
"td",
|
|
7756
7768
|
{
|
|
7757
7769
|
style: Ue(k),
|
|
7758
7770
|
className: `whitespace-nowrap px-3 py-1.5 ${kt(k, "z-[1]", ue)}`,
|
|
7759
7771
|
children: /* @__PURE__ */ d("span", { className: "inline-flex items-center gap-2", children: [
|
|
7760
|
-
D && /* @__PURE__ */ a(
|
|
7772
|
+
D && /* @__PURE__ */ a(H0, { rows: B }),
|
|
7761
7773
|
/* @__PURE__ */ a(Ii, { facts: p })
|
|
7762
7774
|
] })
|
|
7763
7775
|
},
|
|
@@ -7794,7 +7806,7 @@ ${r}`).then(() => {
|
|
|
7794
7806
|
{
|
|
7795
7807
|
style: Ue(k),
|
|
7796
7808
|
"data-cbv-formula-cell": k,
|
|
7797
|
-
"data-tip":
|
|
7809
|
+
"data-tip": Ed(s, k),
|
|
7798
7810
|
className: `whitespace-nowrap px-3 py-1.5 text-right tabular-nums text-slate-700 dark:text-slate-200 ${kt(k, "z-[1]", ue)}`,
|
|
7799
7811
|
children: p == null ? /* @__PURE__ */ a("span", { className: "text-slate-300 dark:text-slate-600", children: "—" }) : de[k] ? Sr(String(p), de[k]) : St(Math.round(p * 100) / 100)
|
|
7800
7812
|
},
|
|
@@ -7814,9 +7826,9 @@ ${r}`).then(() => {
|
|
|
7814
7826
|
collection: n,
|
|
7815
7827
|
id: l,
|
|
7816
7828
|
hasPipeline: ua,
|
|
7817
|
-
onOpen: () =>
|
|
7818
|
-
onPeek: () =>
|
|
7819
|
-
onAudit: () =>
|
|
7829
|
+
onOpen: () => Cn(l),
|
|
7830
|
+
onPeek: () => Dt.push([{ collection: n, itemId: String(l) }]),
|
|
7831
|
+
onAudit: () => Vn(String(l)),
|
|
7820
7832
|
urlFor: M,
|
|
7821
7833
|
onDeleted: () => Io.mutate(l),
|
|
7822
7834
|
row: s,
|
|
@@ -7827,7 +7839,7 @@ ${r}`).then(() => {
|
|
|
7827
7839
|
},
|
|
7828
7840
|
k
|
|
7829
7841
|
);
|
|
7830
|
-
const Yt = pn(k) ?
|
|
7842
|
+
const Yt = pn(k) ? ec(l, k) : null, ft = pn(k) ? null : xt(it, n, k);
|
|
7831
7843
|
return /* @__PURE__ */ d(
|
|
7832
7844
|
"td",
|
|
7833
7845
|
{
|
|
@@ -7844,19 +7856,19 @@ ${r}`).then(() => {
|
|
|
7844
7856
|
className: `whitespace-nowrap px-3 py-1.5 ${oa(k) ? "text-right" : ""} ${kt(k, "z-[1]", ue)}${G && k === wt ? " relative" : ""}`,
|
|
7845
7857
|
children: [
|
|
7846
7858
|
G && k === wt && /* @__PURE__ */ a(
|
|
7847
|
-
|
|
7859
|
+
nf,
|
|
7848
7860
|
{
|
|
7849
7861
|
to: G,
|
|
7850
7862
|
className: "absolute right-2 top-1/2 z-[2] -translate-y-1/2 shadow-sm"
|
|
7851
7863
|
}
|
|
7852
7864
|
),
|
|
7853
|
-
|
|
7865
|
+
Rd(
|
|
7854
7866
|
s,
|
|
7855
7867
|
k,
|
|
7856
7868
|
!!A && !A.is_mine,
|
|
7857
7869
|
pn(k) ? So(k) === "nivaro_users" ? (() => {
|
|
7858
|
-
var re, Ye,
|
|
7859
|
-
const p = k.includes(".") ? k : dt[k], B = ((
|
|
7870
|
+
var re, Ye, Rt;
|
|
7871
|
+
const p = k.includes(".") ? k : dt[k], B = ((Rt = (Ye = (re = Oe == null ? void 0 : Oe.rows) == null ? void 0 : re[String(l)]) == null ? void 0 : Ye[p]) == null ? void 0 : Rt.ids) ?? [], D = Bt(l, k) ?? "";
|
|
7860
7872
|
if (B.length === 0 || !D || D === "—")
|
|
7861
7873
|
return /* @__PURE__ */ a("span", { className: "text-[12px] text-slate-300", children: "—" });
|
|
7862
7874
|
if (B.length === 1)
|
|
@@ -7877,14 +7889,14 @@ ${r}`).then(() => {
|
|
|
7877
7889
|
{
|
|
7878
7890
|
type: "button",
|
|
7879
7891
|
onClick: (p) => {
|
|
7880
|
-
p.stopPropagation(),
|
|
7892
|
+
p.stopPropagation(), Dt.push([
|
|
7881
7893
|
{ collection: Yt.target, itemId: Yt.id }
|
|
7882
7894
|
]);
|
|
7883
7895
|
},
|
|
7884
7896
|
"data-tip": Bt(l, k) ?? void 0,
|
|
7885
7897
|
className: "block max-w-[260px] truncate text-left text-[12px] font-medium text-slate-700 underline decoration-slate-300 underline-offset-2 transition-colors hover:text-[#0284c7] hover:decoration-[#0284c7] dark:text-slate-200 dark:decoration-slate-600 dark:hover:text-[#38bdf8]",
|
|
7886
7898
|
children: [
|
|
7887
|
-
((
|
|
7899
|
+
((Un = de[k]) == null ? void 0 : Un.type) === "count" && Co(k) ? "📎 " : "",
|
|
7888
7900
|
ia(Bt(l, k) ?? "", k, l)
|
|
7889
7901
|
]
|
|
7890
7902
|
}
|
|
@@ -7900,7 +7912,7 @@ ${r}`).then(() => {
|
|
|
7900
7912
|
{
|
|
7901
7913
|
type: "button",
|
|
7902
7914
|
onClick: (p) => {
|
|
7903
|
-
p.stopPropagation(),
|
|
7915
|
+
p.stopPropagation(), Dt.push([
|
|
7904
7916
|
{
|
|
7905
7917
|
collection: ft.one_collection,
|
|
7906
7918
|
itemId: String(s[k])
|
|
@@ -7932,7 +7944,7 @@ ${r}`).then(() => {
|
|
|
7932
7944
|
{
|
|
7933
7945
|
className: fn(
|
|
7934
7946
|
"text-[12px] tabular-nums text-slate-700 dark:text-slate-200",
|
|
7935
|
-
Lr(s[k], he[k]) &&
|
|
7947
|
+
Lr(s[k], he[k]) && Gi[Lr(s[k], he[k])]
|
|
7936
7948
|
),
|
|
7937
7949
|
children: Sr(String(s[k]), de[k])
|
|
7938
7950
|
}
|
|
@@ -7941,10 +7953,10 @@ ${r}`).then(() => {
|
|
|
7941
7953
|
{
|
|
7942
7954
|
className: fn(
|
|
7943
7955
|
"text-[12px]",
|
|
7944
|
-
|
|
7956
|
+
Gi[Lr(s[k], he[k])]
|
|
7945
7957
|
),
|
|
7946
7958
|
children: /* @__PURE__ */ a(
|
|
7947
|
-
|
|
7959
|
+
Yi,
|
|
7948
7960
|
{
|
|
7949
7961
|
collection: n,
|
|
7950
7962
|
field: k,
|
|
@@ -7956,7 +7968,7 @@ ${r}`).then(() => {
|
|
|
7956
7968
|
)
|
|
7957
7969
|
}
|
|
7958
7970
|
) : /* @__PURE__ */ a(
|
|
7959
|
-
|
|
7971
|
+
Yi,
|
|
7960
7972
|
{
|
|
7961
7973
|
collection: n,
|
|
7962
7974
|
field: k,
|
|
@@ -7977,8 +7989,8 @@ ${r}`).then(() => {
|
|
|
7977
7989
|
String(l)
|
|
7978
7990
|
);
|
|
7979
7991
|
}) }, Zn),
|
|
7980
|
-
|
|
7981
|
-
|
|
7992
|
+
Kd && /* @__PURE__ */ a("tfoot", { className: "text-[12px] tabular-nums", "data-cbv-totals": !0, children: /* @__PURE__ */ d("tr", { className: "sticky bottom-0 z-[2] border-t-2 border-slate-200 bg-slate-50 font-medium dark:border-slate-700 dark:bg-slate-800", children: [
|
|
7993
|
+
At && /* @__PURE__ */ a("td", { className: "sticky left-0 z-[3] w-11 bg-slate-50 py-1.5 pl-1.5 pr-3 dark:bg-slate-800" }),
|
|
7982
7994
|
rn.map((e, t) => {
|
|
7983
7995
|
const r = e.key, s = Ke[r], l = s ? ts[r] : void 0, o = s ? { sum: "Sum", avg: "Avg", min: "Min", max: "Max", count: "Count" }[s] : "";
|
|
7984
7996
|
return /* @__PURE__ */ a(
|
|
@@ -7988,7 +8000,7 @@ ${r}`).then(() => {
|
|
|
7988
8000
|
className: `whitespace-nowrap px-3 py-1.5 ${l ? "text-right" : ""} ${kt(r, "z-[3]", "bg-slate-50 dark:bg-slate-800")}`,
|
|
7989
8001
|
style: Ue(r),
|
|
7990
8002
|
"data-tip": l && s ? l.failed ? `This ${o.toLowerCase()} could not be worked out` : (() => {
|
|
7991
|
-
const u =
|
|
8003
|
+
const u = d0(
|
|
7992
8004
|
s,
|
|
7993
8005
|
at(r),
|
|
7994
8006
|
Kt ? null : $e
|
|
@@ -8014,7 +8026,7 @@ ${r}`).then(() => {
|
|
|
8014
8026
|
)
|
|
8015
8027
|
}
|
|
8016
8028
|
),
|
|
8017
|
-
/* @__PURE__ */ a(
|
|
8029
|
+
/* @__PURE__ */ a(Q0, { scrollerRef: Ha }),
|
|
8018
8030
|
/* @__PURE__ */ a(
|
|
8019
8031
|
kf,
|
|
8020
8032
|
{
|
|
@@ -8053,11 +8065,11 @@ ${r}`).then(() => {
|
|
|
8053
8065
|
] }),
|
|
8054
8066
|
" ",
|
|
8055
8067
|
"of ",
|
|
8056
|
-
|
|
8068
|
+
Dn ? "about " : "",
|
|
8057
8069
|
Kt ? "many" : St($e)
|
|
8058
8070
|
] }),
|
|
8059
8071
|
prevDisabled: I <= 1,
|
|
8060
|
-
nextDisabled: I >=
|
|
8072
|
+
nextDisabled: I >= Ta,
|
|
8061
8073
|
onPrev: () => K((e) => Math.max(1, e - 1)),
|
|
8062
8074
|
onNext: () => K((e) => e + 1)
|
|
8063
8075
|
}
|
|
@@ -8071,7 +8083,7 @@ ${r}`).then(() => {
|
|
|
8071
8083
|
" ",
|
|
8072
8084
|
"of",
|
|
8073
8085
|
" ",
|
|
8074
|
-
|
|
8086
|
+
Dn && /* @__PURE__ */ d(Je, { children: [
|
|
8075
8087
|
/* @__PURE__ */ a(
|
|
8076
8088
|
"span",
|
|
8077
8089
|
{
|
|
@@ -8097,7 +8109,7 @@ ${r}`).then(() => {
|
|
|
8097
8109
|
"data-tip": "First page",
|
|
8098
8110
|
className: "inline-flex h-7 items-center gap-1 rounded px-2 text-[12px] text-slate-600 hover:bg-slate-100 disabled:opacity-30 dark:text-slate-300 dark:hover:bg-slate-800",
|
|
8099
8111
|
children: [
|
|
8100
|
-
/* @__PURE__ */ a(
|
|
8112
|
+
/* @__PURE__ */ a(Xc, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
|
|
8101
8113
|
/* @__PURE__ */ a("span", { className: "hidden sm:inline", children: "First" })
|
|
8102
8114
|
]
|
|
8103
8115
|
}
|
|
@@ -8115,13 +8127,13 @@ ${r}`).then(() => {
|
|
|
8115
8127
|
/* @__PURE__ */ d("span", { className: "min-w-[64px] text-center text-[12px] tabular-nums text-slate-500", children: [
|
|
8116
8128
|
St(I),
|
|
8117
8129
|
" / ",
|
|
8118
|
-
St(
|
|
8130
|
+
St(Ta)
|
|
8119
8131
|
] }),
|
|
8120
8132
|
/* @__PURE__ */ a(
|
|
8121
8133
|
"button",
|
|
8122
8134
|
{
|
|
8123
8135
|
type: "button",
|
|
8124
|
-
disabled: I >=
|
|
8136
|
+
disabled: I >= Ta,
|
|
8125
8137
|
onClick: () => K((e) => e + 1),
|
|
8126
8138
|
className: "h-7 rounded px-2.5 text-[12px] text-slate-600 hover:bg-slate-100 disabled:opacity-30 dark:text-slate-300 dark:hover:bg-slate-800",
|
|
8127
8139
|
children: "Next →"
|
|
@@ -8131,15 +8143,15 @@ ${r}`).then(() => {
|
|
|
8131
8143
|
"button",
|
|
8132
8144
|
{
|
|
8133
8145
|
type: "button",
|
|
8134
|
-
disabled: I >=
|
|
8146
|
+
disabled: I >= Ta || as,
|
|
8135
8147
|
onClick: () => void so(),
|
|
8136
8148
|
"aria-label": "Last page",
|
|
8137
8149
|
"aria-busy": as || void 0,
|
|
8138
|
-
"data-tip":
|
|
8150
|
+
"data-tip": Dn || Kt ? "Last page (counts first)" : "Last page",
|
|
8139
8151
|
className: "inline-flex h-7 items-center gap-1 rounded px-2 text-[12px] text-slate-600 hover:bg-slate-100 disabled:opacity-30 dark:text-slate-300 dark:hover:bg-slate-800",
|
|
8140
8152
|
children: [
|
|
8141
8153
|
/* @__PURE__ */ a("span", { className: "hidden sm:inline", children: "Last" }),
|
|
8142
|
-
as ? /* @__PURE__ */ a(Hs, { className: "h-3.5 w-3.5 animate-spin", "aria-hidden": !0 }) : /* @__PURE__ */ a(
|
|
8154
|
+
as ? /* @__PURE__ */ a(Hs, { className: "h-3.5 w-3.5 animate-spin", "aria-hidden": !0 }) : /* @__PURE__ */ a(Zc, { className: "h-3.5 w-3.5", "aria-hidden": !0 })
|
|
8143
8155
|
]
|
|
8144
8156
|
}
|
|
8145
8157
|
)
|
|
@@ -8160,9 +8172,9 @@ ${r}`).then(() => {
|
|
|
8160
8172
|
itemId: bt[0].itemId,
|
|
8161
8173
|
width: "85%",
|
|
8162
8174
|
stack: bt,
|
|
8163
|
-
onPush: (e) =>
|
|
8164
|
-
onPop: () =>
|
|
8165
|
-
onClose: () =>
|
|
8175
|
+
onPush: (e) => Dt.push([...bt, e]),
|
|
8176
|
+
onPop: () => Dt.back(),
|
|
8177
|
+
onClose: () => Dt.back(bt.length)
|
|
8166
8178
|
}
|
|
8167
8179
|
) : null,
|
|
8168
8180
|
ya && /* @__PURE__ */ a(
|
|
@@ -8172,11 +8184,11 @@ ${r}`).then(() => {
|
|
|
8172
8184
|
item: ya,
|
|
8173
8185
|
open: !0,
|
|
8174
8186
|
onOpenChange: (e) => {
|
|
8175
|
-
e ||
|
|
8187
|
+
e || Vn(null);
|
|
8176
8188
|
}
|
|
8177
8189
|
}
|
|
8178
8190
|
),
|
|
8179
|
-
|
|
8191
|
+
At && ze && Os && !R && $e > ke.length && tt.length < Math.min($e, gr) && /* @__PURE__ */ d("div", { className: "nvr-slide-up-centered fixed bottom-16 left-1/2 z-40 -translate-x-1/2 rounded-full border border-slate-200 bg-white px-4 py-2 text-[12.5px] shadow-lg dark:border-border dark:bg-card", children: [
|
|
8180
8192
|
/* @__PURE__ */ d("span", { className: "text-slate-600 dark:text-muted-foreground", children: [
|
|
8181
8193
|
"All ",
|
|
8182
8194
|
ke.length,
|
|
@@ -8188,13 +8200,13 @@ ${r}`).then(() => {
|
|
|
8188
8200
|
{
|
|
8189
8201
|
type: "button",
|
|
8190
8202
|
disabled: Bo,
|
|
8191
|
-
onClick: () => void
|
|
8203
|
+
onClick: () => void qc(),
|
|
8192
8204
|
className: "font-semibold text-nvr-navy underline decoration-dotted hover:text-nvr-cyan dark:text-nvr-cyan",
|
|
8193
8205
|
children: Bo ? "Selecting…" : $e > gr ? `Select the first ${gr.toLocaleString()} of ${$e.toLocaleString()} matching` : `Select all ${$e.toLocaleString()} matching rows`
|
|
8194
8206
|
}
|
|
8195
8207
|
)
|
|
8196
8208
|
] }),
|
|
8197
|
-
|
|
8209
|
+
At && ze && tt.length > 0 && /* @__PURE__ */ a(
|
|
8198
8210
|
eh,
|
|
8199
8211
|
{
|
|
8200
8212
|
collection: n,
|
|
@@ -8204,10 +8216,10 @@ ${r}`).then(() => {
|
|
|
8204
8216
|
fields: (T == null ? void 0 : T.fields) ?? [],
|
|
8205
8217
|
relations: (T == null ? void 0 : T.relations) ?? [],
|
|
8206
8218
|
registryKeys: Ae.bulk_actions ?? null,
|
|
8207
|
-
pointField:
|
|
8208
|
-
onFormOpen:
|
|
8219
|
+
pointField: yd,
|
|
8220
|
+
onFormOpen: kc,
|
|
8209
8221
|
figures: /* @__PURE__ */ a(
|
|
8210
|
-
|
|
8222
|
+
Qm,
|
|
8211
8223
|
{
|
|
8212
8224
|
tone: "dark",
|
|
8213
8225
|
total: tt.length,
|
|
@@ -8218,12 +8230,12 @@ ${r}`).then(() => {
|
|
|
8218
8230
|
}
|
|
8219
8231
|
),
|
|
8220
8232
|
notices: /* @__PURE__ */ a(
|
|
8221
|
-
|
|
8233
|
+
Um,
|
|
8222
8234
|
{
|
|
8223
8235
|
tone: "dark",
|
|
8224
8236
|
total: tt.length,
|
|
8225
|
-
open:
|
|
8226
|
-
changed:
|
|
8237
|
+
open: Sc,
|
|
8238
|
+
changed: _c,
|
|
8227
8239
|
onSkip: (e) => {
|
|
8228
8240
|
const t = new Set(e.map((r) => r.slice(n.length + 1)));
|
|
8229
8241
|
_n((r) => r.filter((s) => !t.has(String(s))));
|
|
@@ -8244,21 +8256,21 @@ ${r}`).then(() => {
|
|
|
8244
8256
|
}
|
|
8245
8257
|
function oh(n, i, h, c, y) {
|
|
8246
8258
|
const C = ul(i, n, h);
|
|
8247
|
-
return C != null && C.one_collection ? /* @__PURE__ */ a(pl, { relatedCollection: C.one_collection, id: c }) :
|
|
8259
|
+
return C != null && C.one_collection ? /* @__PURE__ */ a(pl, { relatedCollection: C.one_collection, id: c }) : xu(c, y);
|
|
8248
8260
|
}
|
|
8249
8261
|
export {
|
|
8250
8262
|
Jg as CollectionBrowserView,
|
|
8251
8263
|
Ir as MultiPick,
|
|
8252
8264
|
Bf as RowActionsMenu,
|
|
8253
|
-
|
|
8265
|
+
Gi as TINT_TEXT,
|
|
8254
8266
|
lh as cbvDerivedTouched,
|
|
8255
8267
|
rh as cbvQuietNow,
|
|
8256
8268
|
sh as cbvRiskInputs,
|
|
8257
8269
|
oh as compareCell,
|
|
8258
8270
|
Er as invalidateCbvRowQueries,
|
|
8259
|
-
|
|
8271
|
+
ed as isCbvDerivedQuery,
|
|
8260
8272
|
jf as roleMayDelete,
|
|
8261
8273
|
Kf as roleMayUpdate,
|
|
8262
|
-
|
|
8274
|
+
_m as templateRelationPaths,
|
|
8263
8275
|
Lr as tintFor
|
|
8264
8276
|
};
|