@nivaro/react 0.3.46 → 0.3.47
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 +248 -16
- package/dist/index.js +679 -659
- package/dist/shared/components/CollectionBrowserView.js +813 -826
- package/dist/shared/components/ErrorNotice.js +169 -0
- package/dist/shared/components/ErrorSurface.js +23 -17
- package/dist/shared/components/ListLoadError.js +8 -29
- package/dist/shared/components/LoadErrorNote.js +38 -21
- package/dist/shared/components/QueryErrorState.js +8 -11
- package/dist/shared/components/ReportView.js +1320 -1291
- package/dist/shared/components/chat/ChannelArchive.js +60 -60
- package/dist/shared/components/chat/ChannelExtras.js +74 -74
- package/dist/shared/components/chat/ChatPanel.js +368 -367
- package/dist/shared/components/command-center/PeekPanel.js +33 -32
- package/dist/shared/components/command-center/panels/BoardSettings.js +41 -40
- package/dist/shared/components/command-center/panels/PeoplePanel.js +32 -31
- package/dist/shared/components/help-videos/editor/ClipsPanel.js +49 -48
- package/dist/shared/components/help-videos/editor/PublishButton.js +37 -36
- package/dist/shared/components/help-videos/editor/StatsTab.js +45 -44
- package/dist/shared/components/help-videos/editor/VersionsTab.js +29 -28
- package/dist/shared/components/help-videos/library/AuthorRolesButton.js +19 -18
- package/dist/shared/components/help-videos/library/HelpVideoLibrary.js +132 -129
- package/dist/shared/components/help-videos/library/LearningPathsPanel.js +42 -41
- package/dist/shared/components/help-videos/settings/HouseStyleButton.js +21 -20
- package/dist/shared/components/help-videos/settings/RenderSettingsButton.js +22 -21
- package/dist/shared/components/import/DocumentAutofillButton.js +24 -20
- package/dist/shared/components/import/ImportFromFileButton.js +61 -60
- package/dist/shared/components/imports/ImportStalenessControl.js +20 -21
- package/dist/shared/components/imports/NewImportDialog.js +29 -28
- package/dist/shared/components/imports/RunDetailSheet.js +63 -63
- package/dist/shared/components/item-edit/FieldRow.js +329 -329
- package/dist/shared/components/item-edit/InlineTableField.js +898 -898
- package/dist/shared/components/item-edit/PersonalDefaultControl.js +57 -56
- package/dist/shared/components/item-edit/PlanGrid.js +220 -221
- package/dist/shared/components/item-edit/RecordGrantTools.js +49 -48
- package/dist/shared/components/item-edit/placement-behaviour.js +68 -67
- package/dist/shared/components/layout-editor/inspector/ColumnFit.js +24 -23
- package/dist/shared/components/layout-editor/inspector/PickerPreview.js +17 -16
- package/dist/shared/components/layout-editor/matrix/FieldStateMatrix.js +41 -41
- package/dist/shared/components/layout-editor/outputs/output-api.js +33 -31
- package/dist/shared/components/layout-editor/overview/overview-api.js +84 -83
- package/dist/shared/components/layout-editor/useLayoutDraft.js +47 -42
- package/dist/shared/components/monitoring/InactiveUserLinksView.js +10 -9
- package/dist/shared/components/panels/SlaClock.js +35 -36
- package/dist/shared/components/pipeline/PipelineEditorView.js +311 -312
- package/dist/shared/components/pipeline/TeamSuggestions.js +31 -30
- package/dist/shared/components/profile/AgentsPanel.js +73 -72
- package/dist/shared/components/profile/MailSuppressedPill.js +22 -21
- package/dist/shared/components/support/SupportRequestDialog.js +85 -81
- package/dist/shared/components/support/SupportView.js +94 -87
- package/dist/shared/lib/autofill-poll.js +21 -18
- package/dist/shared/lib/error-actions.js +85 -0
- package/dist/shared/lib/error-message.js +223 -82
- package/dist/shared/lib/error-toast.js +71 -13
- package/dist/shared/lib/safe-error.js +136 -38
- package/package.json +1 -1
|
@@ -1,86 +1,86 @@
|
|
|
1
1
|
import { jsxs as c, jsx as n, Fragment as Be } from "react/jsx-runtime";
|
|
2
2
|
import { useQueryClient as xa, useMutation as vt, useQuery as re, useQueries as ua } from "@tanstack/react-query";
|
|
3
|
-
import { FileDiff as
|
|
4
|
-
import
|
|
5
|
-
import { createPortal as
|
|
6
|
-
import { toast as
|
|
7
|
-
import { useNivaroClient as pt, useItemNavigation as
|
|
8
|
-
import { useDebounced as
|
|
9
|
-
import { useElapsedLoading as
|
|
10
|
-
import { useSlowReason as
|
|
11
|
-
import { useBulkProgressFeed as
|
|
3
|
+
import { FileDiff as Ko, RotateCw as dr, Network as Bo, Map as zo, Sparkles as cr, X as ur, Rows3 as Yl, ListChecks as Qo, Rows2 as Uo, ChevronDown as In, Wand2 as Jl, FileText as Gl, Bell as Wo, BellOff as Vo, Loader2 as Ho, Check as Yo, Search as vs, Pin as Jo } from "lucide-react";
|
|
4
|
+
import Go, { useState as y, useRef as fe, useEffect as pe, useMemo as ue, useLayoutEffect as Xo } from "react";
|
|
5
|
+
import { createPortal as ks } from "react-dom";
|
|
6
|
+
import { toast as xe } from "sonner";
|
|
7
|
+
import { useNivaroClient as pt, useItemNavigation as ys, useOverlayState as Zo, useItemEditAuth as fa, useApiFetchConfig as ei } from "../context.js";
|
|
8
|
+
import { useDebounced as Xl } from "../hooks/useDebounced.js";
|
|
9
|
+
import { useElapsedLoading as ti } from "../hooks/useElapsedLoading.js";
|
|
10
|
+
import { useSlowReason as ni } from "../hooks/useSlowReason.js";
|
|
11
|
+
import { useBulkProgressFeed as ai, newBulkProgressId as ri, startBulkProgress as li, endBulkProgress as si } from "../lib/bulk-progress.js";
|
|
12
12
|
import { post as ve, get as ee, patch as da, del as pa } from "../lib/commands.js";
|
|
13
|
-
import { parseDateFilter as ba, dateFilterBounds as
|
|
14
|
-
import { errorSentence as
|
|
15
|
-
import { errorToastOptions as pr } from "../lib/error-toast.js";
|
|
16
|
-
import { extractExpressionTokens as
|
|
17
|
-
import { clauseFromCondition as mr, clauseFromControlValue as
|
|
18
|
-
import { deliverLive as
|
|
19
|
-
import { formatValue as hn, formatMultiValue as
|
|
20
|
-
import { createCursorBook as
|
|
21
|
-
import { normalizeInlineEdit as
|
|
22
|
-
import { sanitizeCbvLinkState as
|
|
23
|
-
import { expandCoalesced as
|
|
24
|
-
import { useRowChanges as
|
|
25
|
-
import { loadErrorStatus as
|
|
26
|
-
import { OPEN_IN_TABS_CAP as
|
|
27
|
-
import { isOwnWrite as
|
|
28
|
-
import { useIdleNextPage as
|
|
29
|
-
import { useRowPresence as
|
|
30
|
-
import { cascadeFilter as
|
|
31
|
-
import { useOptionalRealtime as
|
|
32
|
-
import { friendlyIdOf as
|
|
33
|
-
import { rowHighlightDotClass as
|
|
13
|
+
import { parseDateFilter as ba, dateFilterBounds as oi, describeDateFilter as ii, DATE_FILTER_OPS as di, formatDateFilter as ci } from "../lib/date-filter.js";
|
|
14
|
+
import { errorSentence as ui } from "../lib/error-message.js";
|
|
15
|
+
import { toastError as pi, errorToastOptions as pr } from "../lib/error-toast.js";
|
|
16
|
+
import { extractExpressionTokens as mi, evaluateNumeric as Zl } from "../lib/expression.js";
|
|
17
|
+
import { clauseFromCondition as mr, clauseFromControlValue as fi, filterSentence as bi } from "../lib/filter-sentence.js";
|
|
18
|
+
import { deliverLive as hi, releaseLiveOwner as gi } from "../lib/focus-mode.js";
|
|
19
|
+
import { formatValue as hn, formatMultiValue as es, countFromResolved as xi } from "../lib/format-value.js";
|
|
20
|
+
import { createCursorBook as vi, pageRequest as ki, noteNextCursor as yi, isCursorRefusal as wi, stopCursors as _i } from "../lib/keyset-pager.js";
|
|
21
|
+
import { normalizeInlineEdit as Ni, inlineM2oTarget as Si, inlineChoices as Ci, inlineEditFor as $i, nextInlineKey as qi } from "../lib/list-inline-edit.js";
|
|
22
|
+
import { sanitizeCbvLinkState as Ti, readListLinkFromLocation as Li, dropListLinkParam as Fi } from "../lib/list-link.js";
|
|
23
|
+
import { expandCoalesced as Ri, LIVE_ASPECTS as gn } from "../lib/live.js";
|
|
24
|
+
import { useRowChanges as Ei, useRowLocks as Pi, lockLabel as Di, viewerMatches as Mi, conditionFields as Oi, mayAffectMatch as Ai, writerOf as Ii } from "../lib/live-list.js";
|
|
25
|
+
import { loadErrorStatus as ji, listLoadErrorText as Ki } from "../lib/load-error.js";
|
|
26
|
+
import { OPEN_IN_TABS_CAP as Bi, openInTabs as zi, openInTabsMessage as ts } from "../lib/open-in-tabs.js";
|
|
27
|
+
import { isOwnWrite as Qi } from "../lib/own-writes.js";
|
|
28
|
+
import { useIdleNextPage as Ui, intentProps as Wi, prefetchRecord as Vi } from "../lib/prefetch.js";
|
|
29
|
+
import { useRowPresence as Hi, rowPresenceKey as ns } from "../lib/presence-hooks.js";
|
|
30
|
+
import { cascadeFilter as Yi, fetchCascadeRelations as Ji } from "../lib/quick-filter-cascade.js";
|
|
31
|
+
import { useOptionalRealtime as Gi } from "../lib/realtime.js";
|
|
32
|
+
import { friendlyIdOf as as, copyWhenReady as Xi, shareableRecordId as Zi } from "../lib/record-ref.js";
|
|
33
|
+
import { rowHighlightDotClass as ed, rowHighlightClass as td } from "../lib/row-highlight.js";
|
|
34
34
|
import { userErrorMessage as Wt } from "../lib/safe-error.js";
|
|
35
|
-
import { logSearch as
|
|
36
|
-
import { shapeForField as
|
|
37
|
-
import { knownTotalFrom as
|
|
38
|
-
import { useMyScopes as
|
|
39
|
-
import { useNewItemLayouts as
|
|
40
|
-
import { loadUserCard as
|
|
41
|
-
import { cn as Ut, humanHours as
|
|
42
|
-
import { usePublishAskContext as
|
|
43
|
-
import { useAvailableBulkActions as
|
|
44
|
-
import { BulkFieldUpdate as
|
|
45
|
-
import { BulkRowMark as
|
|
46
|
-
import { useRowPushActions as
|
|
47
|
-
import { CellCopyLayer as
|
|
48
|
-
import { CopyAsButton as
|
|
49
|
-
import { useTreeConfig as
|
|
50
|
-
import { readExportRows as
|
|
51
|
-
import { FormulaColumnAdder as
|
|
52
|
-
import { useHierarchyScope as
|
|
53
|
-
import { splitRiskFilter as
|
|
54
|
-
import { isFilterRefusal as
|
|
55
|
-
import { ViewDefaultMenu as
|
|
56
|
-
import { useRecordRoomTypes as
|
|
57
|
-
import { FilterControl as
|
|
58
|
-
import { FocusModeToggle as
|
|
59
|
-
import { FULFILMENT_FILTER_OPTIONS as
|
|
60
|
-
import { HScrollProxy as
|
|
61
|
-
import { useDocumentAutofillConfig as
|
|
62
|
-
import { INTEGRATIONS_FILTER_OPTIONS as
|
|
63
|
-
import { useQuickPickerSteps as
|
|
64
|
-
import { usePickerExclusion as
|
|
65
|
-
import { invalidateRecordQueries as
|
|
66
|
-
import { UserRosterCluster as
|
|
67
|
-
import { LiveRowMark as
|
|
68
|
-
import { CopyListLinkButton as
|
|
69
|
-
import { useInlineEdit as
|
|
70
|
-
import { MapView as
|
|
71
|
-
import { usePickerExcludedRows as
|
|
72
|
-
import { RealtimeStaleMark as
|
|
73
|
-
import { RecordCompareDialog as
|
|
74
|
-
import { RecordDrilldownSheet as
|
|
75
|
-
import { RowHighlightLegend as
|
|
76
|
-
import { RowPresence as
|
|
77
|
-
import { TableSkeletonRows as
|
|
78
|
-
import { SlowNoticeView as
|
|
79
|
-
import { TipLayer as
|
|
80
|
-
import { UnseenDot as
|
|
81
|
-
import { SimpleSelectXs as xn, SimpleSelect as
|
|
82
|
-
import { RevisionsPanel as
|
|
83
|
-
import { itemActionChoiceStep as
|
|
35
|
+
import { logSearch as nd, logSearchOpen as ad } from "../lib/search-log.js";
|
|
36
|
+
import { shapeForField as rd } from "../lib/skeleton-shapes.js";
|
|
37
|
+
import { knownTotalFrom as ld } from "../lib/slow-reason.js";
|
|
38
|
+
import { useMyScopes as sd, matchScopeDimension as rs, effectiveScopeSeedIds as od, translateScopeValues as id } from "../lib/use-my-scopes.js";
|
|
39
|
+
import { useNewItemLayouts as dd } from "../lib/use-new-item-layouts.js";
|
|
40
|
+
import { loadUserCard as cd } from "../lib/user-cards.js";
|
|
41
|
+
import { cn as Ut, humanHours as ud } from "../lib/utils.js";
|
|
42
|
+
import { usePublishAskContext as pd, useAskRecordDrag as md } from "./ai/ask-context.js";
|
|
43
|
+
import { useAvailableBulkActions as fd, mergeBulkActions as bd, guardMatches as hd, useBuiltinGate as gd, BulkActionButtons as xd } from "./bulk/BulkActionButtons.js";
|
|
44
|
+
import { BulkFieldUpdate as vd } from "./bulk/BulkFieldUpdate.js";
|
|
45
|
+
import { BulkRowMark as kd } from "./bulk/BulkRowMark.js";
|
|
46
|
+
import { useRowPushActions as yd, runRowPush as wd } from "./bulk/RowPushActions.js";
|
|
47
|
+
import { CellCopyLayer as _d } from "./CellCopyLayer.js";
|
|
48
|
+
import { CopyAsButton as Nd } from "./CopyAsButton.js";
|
|
49
|
+
import { useTreeConfig as Sd, CollectionTree as Cd } from "./cbv/CollectionTree.js";
|
|
50
|
+
import { readExportRows as $d, stableSort as qd, m2oLabelPaths as Td, resolveAllPaths as Ld, userLabel as Fd, m2oLabel as Rd, localYmd as Ed } from "./cbv/export-rows.js";
|
|
51
|
+
import { FormulaColumnAdder as Pd } from "./cbv/FormulaColumnAdder.js";
|
|
52
|
+
import { useHierarchyScope as Dd, HierarchyScopePicker as Md } from "./cbv/HierarchyScope.js";
|
|
53
|
+
import { splitRiskFilter as ls, riskFilterEntry as Od } from "./cbv/saved-view-risk.js";
|
|
54
|
+
import { isFilterRefusal as Ad, unknownFieldsOf as ss, dropUnknownField as Id } from "./cbv/unknown-fields.js";
|
|
55
|
+
import { ViewDefaultMenu as jd } from "./cbv/ViewDefaultMenu.js";
|
|
56
|
+
import { useRecordRoomTypes as Kd, canOpenChatRoom as Bd, discussRecord as zd } from "./chat/chat-core.js";
|
|
57
|
+
import { FilterControl as Qd } from "./DataTable.js";
|
|
58
|
+
import { FocusModeToggle as Ud } from "./FocusModeToggle.js";
|
|
59
|
+
import { FULFILMENT_FILTER_OPTIONS as os, FulfilmentPill as Wd, fulfilmentFigures as Vd } from "./FulfilmentPill.js";
|
|
60
|
+
import { HScrollProxy as Hd } from "./HScrollProxy.js";
|
|
61
|
+
import { useDocumentAutofillConfig as Yd, startDocumentExtraction as Jd } from "./import/DocumentAutofillButton.js";
|
|
62
|
+
import { INTEGRATIONS_FILTER_OPTIONS as is, IntegrationDots as Gd } from "./integrations/IntegrationDots.js";
|
|
63
|
+
import { useQuickPickerSteps as Xd, QuickPickerDialog as Zd } from "./item-edit/QuickPickerDialog.js";
|
|
64
|
+
import { usePickerExclusion as ec } from "./item-edit/RecordGrantTools.js";
|
|
65
|
+
import { invalidateRecordQueries as ds } from "./item-edit/RecordLiveSync.js";
|
|
66
|
+
import { UserRosterCluster as cs, UserChip as us } from "./item-edit/UserChip.js";
|
|
67
|
+
import { LiveRowMark as tc } from "./LiveRowMark.js";
|
|
68
|
+
import { CopyListLinkButton as nc } from "./list/CopyListLinkButton.js";
|
|
69
|
+
import { useInlineEdit as ac, InlineEditCell as rc } from "./list/InlineEdit.js";
|
|
70
|
+
import { MapView as lc } from "./MapView.js";
|
|
71
|
+
import { usePickerExcludedRows as sc, PICKER_EXCLUDED_ROW_CLASS as oc, PICKER_EXCLUDED_TITLE as ic } from "./PickerExcludedRows.js";
|
|
72
|
+
import { RealtimeStaleMark as dc } from "./RealtimeStatusBanner.js";
|
|
73
|
+
import { RecordCompareDialog as cc } from "./RecordCompare.js";
|
|
74
|
+
import { RecordDrilldownSheet as uc } from "./RecordDrilldownSheet.js";
|
|
75
|
+
import { RowHighlightLegend as pc } from "./RowHighlightLegend.js";
|
|
76
|
+
import { RowPresence as mc } from "./RowPresence.js";
|
|
77
|
+
import { TableSkeletonRows as fc } from "./Skeletons.js";
|
|
78
|
+
import { SlowNoticeView as bc } from "./SlowNotice.js";
|
|
79
|
+
import { TipLayer as hc } from "./TipLayer.js";
|
|
80
|
+
import { UnseenDot as ps } from "./UnseenDot.js";
|
|
81
|
+
import { SimpleSelectXs as xn, SimpleSelect as gc } from "./ui/SimpleSelect.js";
|
|
82
|
+
import { RevisionsPanel as xc } from "./panels/RevisionsPanel.js";
|
|
83
|
+
import { itemActionChoiceStep as vc, ItemActionChoiceList as kc } from "./panels/ItemActionChoices.js";
|
|
84
84
|
function jn(a, o, b) {
|
|
85
85
|
const i = a.find((v) => v.one_collection === o && v.one_field === b);
|
|
86
86
|
if (i != null && i.many_collection)
|
|
@@ -93,7 +93,7 @@ function An(a) {
|
|
|
93
93
|
for (const i of vr) if (o.has(i)) return i;
|
|
94
94
|
return "id";
|
|
95
95
|
}
|
|
96
|
-
const
|
|
96
|
+
const ms = (a) => typeof a == "string" ? a : a.key, fs = {
|
|
97
97
|
red: "text-red-600 dark:text-red-400 font-semibold",
|
|
98
98
|
amber: "text-amber-600 dark:text-amber-400 font-semibold",
|
|
99
99
|
green: "text-emerald-600 dark:text-emerald-400 font-semibold",
|
|
@@ -130,7 +130,7 @@ function ca(a, o) {
|
|
|
130
130
|
}
|
|
131
131
|
return null;
|
|
132
132
|
}
|
|
133
|
-
const
|
|
133
|
+
const yc = [
|
|
134
134
|
{ label: "None", cfg: null },
|
|
135
135
|
{ label: "Currency", cfg: { type: "number", decimals: 2, thousands: !0, prefix: "$" } },
|
|
136
136
|
{ label: "Number", cfg: { type: "number", thousands: !0 } },
|
|
@@ -164,7 +164,7 @@ function kr(a, o, b) {
|
|
|
164
164
|
(i) => i.many_collection === o && i.many_field === b && i.junction_field === null && i.one_collection !== null
|
|
165
165
|
);
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function wc(a) {
|
|
168
168
|
const o = new Date(String(a));
|
|
169
169
|
if (Number.isNaN(o.getTime())) return String(a);
|
|
170
170
|
const b = Date.now() - o.getTime(), i = Math.floor(b / 6e4);
|
|
@@ -175,8 +175,8 @@ function kc(a) {
|
|
|
175
175
|
const w = Math.floor(v / 24);
|
|
176
176
|
return w < 7 ? `${w}d ago` : o.toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" });
|
|
177
177
|
}
|
|
178
|
-
const ut = (a) => a.toLocaleString("en-US"),
|
|
179
|
-
function
|
|
178
|
+
const ut = (a) => a.toLocaleString("en-US"), ws = /* @__PURE__ */ new Set(["nivaro_users", "directus_users"]), Nt = (a) => a.startsWith("directus_") || a.startsWith("nivaro_"), fr = /* @__PURE__ */ new Map();
|
|
179
|
+
function _c(a, o, b) {
|
|
180
180
|
let i = fr.get(o);
|
|
181
181
|
i || (i = { ids: /* @__PURE__ */ new Set(), waiters: [], promise: null }, fr.set(o, i));
|
|
182
182
|
const v = i;
|
|
@@ -206,16 +206,16 @@ function yc(a, o, b) {
|
|
|
206
206
|
}, 0);
|
|
207
207
|
})), v.promise.then((w) => w.get(b) ?? null);
|
|
208
208
|
}
|
|
209
|
-
const
|
|
209
|
+
const Nc = {
|
|
210
210
|
draft: "draft",
|
|
211
211
|
submitted: "submitted",
|
|
212
212
|
review: "in review",
|
|
213
213
|
approved: "approved",
|
|
214
214
|
rejected: "rejected"
|
|
215
215
|
};
|
|
216
|
-
function
|
|
216
|
+
function Sc({ summary: a }) {
|
|
217
217
|
if (!a || a.total === 0) return /* @__PURE__ */ n("span", { className: "text-[12px] text-slate-300", children: "—" });
|
|
218
|
-
const o = a.latest, b = a.active > 0, i = o ?
|
|
218
|
+
const o = a.latest, b = a.active > 0, i = o ? Nc[o.status] ?? o.status : "", v = o == null ? void 0 : o.cost_impact, w = v != null && v !== 0 ? `${v > 0 ? "+" : "−"}$${Math.abs(v).toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : null, C = o ? `${o.title ?? "Addendum"} — ${i}${a.total > 1 ? ` (${a.total} total)` : ""}` : void 0;
|
|
219
219
|
return /* @__PURE__ */ c(
|
|
220
220
|
"span",
|
|
221
221
|
{
|
|
@@ -239,7 +239,7 @@ function _c({ summary: a }) {
|
|
|
239
239
|
);
|
|
240
240
|
}
|
|
241
241
|
function yr({ relatedCollection: a, id: o }) {
|
|
242
|
-
const b = pt(), i =
|
|
242
|
+
const b = pt(), i = ws.has(a), v = o != null && o !== "", { data: w } = re({
|
|
243
243
|
queryKey: ["cbv-collection-meta", a],
|
|
244
244
|
queryFn: () => b.request(ee(`/collections/${a}`)).then((S) => S.data),
|
|
245
245
|
staleTime: 10 * 6e4,
|
|
@@ -247,7 +247,7 @@ function yr({ relatedCollection: a, id: o }) {
|
|
|
247
247
|
retry: !1
|
|
248
248
|
}), { data: C, isLoading: L } = re({
|
|
249
249
|
queryKey: ["cbv-relation-item", a, String(o)],
|
|
250
|
-
queryFn: () => i ? b.request(ee(`/users/${o}`)).then((S) => S.data) :
|
|
250
|
+
queryFn: () => i ? b.request(ee(`/users/${o}`)).then((S) => S.data) : _c(b, a, String(o)),
|
|
251
251
|
enabled: v && (i || !Nt(a)),
|
|
252
252
|
staleTime: 30 * 6e4,
|
|
253
253
|
retry: !1
|
|
@@ -261,10 +261,10 @@ function yr({ relatedCollection: a, id: o }) {
|
|
|
261
261
|
) : ha((w == null ? void 0 : w.display_template) ?? null, C);
|
|
262
262
|
return /* @__PURE__ */ n("span", { className: "text-[12px] text-slate-700 dark:text-slate-200", children: N });
|
|
263
263
|
}
|
|
264
|
-
function
|
|
264
|
+
function _s(a, o, b, i, v, w) {
|
|
265
265
|
const C = o.getQueryData(["cbv-collection-meta", b]);
|
|
266
|
-
return
|
|
267
|
-
|
|
266
|
+
return Xi(
|
|
267
|
+
Zi(a, b, C, i, v).then(
|
|
268
268
|
(L) => window.location.origin + w({ collection: b, itemId: L })
|
|
269
269
|
)
|
|
270
270
|
).catch(() => {
|
|
@@ -282,17 +282,17 @@ function ma(a, o) {
|
|
|
282
282
|
])
|
|
283
283
|
a.invalidateQueries({ queryKey: [b, o] });
|
|
284
284
|
}
|
|
285
|
-
function
|
|
285
|
+
function Cc(a, o) {
|
|
286
286
|
return a ? a.is_admin ? !0 : (a.collections ?? []).some(
|
|
287
287
|
(b) => (b.collection === o || b.collection === "*") && (b.actions.includes("update") || b.actions.includes("*"))
|
|
288
288
|
) : !1;
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function $c(a, o) {
|
|
291
291
|
return a ? a.is_admin ? !0 : (a.collections ?? []).some(
|
|
292
292
|
(b) => (b.collection === o || b.collection === "*") && (b.actions.includes("delete") || b.actions.includes("*"))
|
|
293
293
|
) : !1;
|
|
294
294
|
}
|
|
295
|
-
function
|
|
295
|
+
function qc({
|
|
296
296
|
collection: a,
|
|
297
297
|
id: o,
|
|
298
298
|
hasPipeline: b,
|
|
@@ -316,10 +316,10 @@ function Cc({
|
|
|
316
316
|
queryFn: () => F.request(ee("/security/my/permissions")).then((h) => h.data),
|
|
317
317
|
enabled: B && !_,
|
|
318
318
|
staleTime: 5 * 6e4
|
|
319
|
-
}), le = _ ||
|
|
319
|
+
}), le = _ || $c(z, a), Z = ec(a, String(o), {
|
|
320
320
|
enabled: B && _,
|
|
321
321
|
onDone: () => q(!1)
|
|
322
|
-
}), [K, H] = y(!1),
|
|
322
|
+
}), [K, H] = y(!1), De = Kd(B), ie = Bd() && !!(De != null && De.some((h) => h.collection === a));
|
|
323
323
|
pe(() => {
|
|
324
324
|
if (!B) return;
|
|
325
325
|
const h = (te) => {
|
|
@@ -338,16 +338,16 @@ function Cc({
|
|
|
338
338
|
queryFn: () => F.request(ee(`/pipelines/instance/${a}/${o}`)).then((h) => h.data).catch(() => null),
|
|
339
339
|
enabled: B && b,
|
|
340
340
|
staleTime: 15e3
|
|
341
|
-
}),
|
|
341
|
+
}), Ee = ue(
|
|
342
342
|
() => ((we == null ? void 0 : we.available_transitions) ?? []).filter((h) => h.in_row_menu !== !1),
|
|
343
343
|
[we]
|
|
344
|
-
), { data:
|
|
345
|
-
() => B ?
|
|
344
|
+
), { data: be } = fd(B ? [a] : []), st = ue(
|
|
345
|
+
() => B ? bd(be, [a], j).filter(
|
|
346
346
|
// Transition-kind registry actions (Cancel / Uncancel) are the pipeline
|
|
347
347
|
// transitions already listed above — never the same move twice.
|
|
348
348
|
(h) => h.kind !== "builtin" && h.kind !== "transition"
|
|
349
349
|
) : [],
|
|
350
|
-
[B,
|
|
350
|
+
[B, be, a, j]
|
|
351
351
|
), R = ue(() => {
|
|
352
352
|
const h = /* @__PURE__ */ new Set();
|
|
353
353
|
for (const E of st)
|
|
@@ -369,12 +369,12 @@ function Cc({
|
|
|
369
369
|
return !((te = E.guard) != null && te.length);
|
|
370
370
|
});
|
|
371
371
|
const h = { ...X ?? {}, ...S ?? {} };
|
|
372
|
-
return st.filter((E) =>
|
|
373
|
-
}, [st, R, X, S]), { pushActions: Ce, failedPartners: k } =
|
|
372
|
+
return st.filter((E) => hd(E.guard, h) !== !1);
|
|
373
|
+
}, [st, R, X, S]), { pushActions: Ce, failedPartners: k } = yd({
|
|
374
374
|
collection: a,
|
|
375
375
|
id: o,
|
|
376
376
|
open: B,
|
|
377
|
-
bulkData:
|
|
377
|
+
bulkData: be,
|
|
378
378
|
bulkEnabledKeys: j
|
|
379
379
|
}), I = ue(
|
|
380
380
|
() => new Map(((we == null ? void 0 : we.states) ?? []).map((h) => [h.id, h])),
|
|
@@ -385,7 +385,7 @@ function Cc({
|
|
|
385
385
|
}, [we]), ot = ue(() => {
|
|
386
386
|
var te;
|
|
387
387
|
const h = /* @__PURE__ */ new Map(), E = [];
|
|
388
|
-
for (const ke of
|
|
388
|
+
for (const ke of Ee) {
|
|
389
389
|
const Ue = (((te = ke.group_label) == null ? void 0 : te.trim()) || ke.label).trim();
|
|
390
390
|
if (h.has(Ue))
|
|
391
391
|
h.get(Ue).push(ke);
|
|
@@ -399,7 +399,7 @@ function Cc({
|
|
|
399
399
|
(Ue, Ge) => (se.get(Ue.to_state ?? "") ?? 999) - (se.get(Ge.to_state ?? "") ?? 999)
|
|
400
400
|
);
|
|
401
401
|
return E;
|
|
402
|
-
}, [
|
|
402
|
+
}, [Ee, se]), Rt = (h) => {
|
|
403
403
|
const E = h.to_state ? I.get(h.to_state) : null;
|
|
404
404
|
return (E == null ? void 0 : E.label) ?? h.label;
|
|
405
405
|
}, At = (h) => {
|
|
@@ -418,8 +418,8 @@ function Cc({
|
|
|
418
418
|
staleTime: 0
|
|
419
419
|
}), [It, an] = y(null), kn = (je == null ? void 0 : je.id) ?? null;
|
|
420
420
|
pe(() => an(null), [kn]);
|
|
421
|
-
const Ye = Vt.data ?
|
|
422
|
-
|
|
421
|
+
const Ye = Vt.data ? vc(Vt.data) : null, mt = Ye && !Ye.ask ? Ye.value : It, Et = !!je && (!Ye || Ye.ask && It == null);
|
|
422
|
+
Go.useLayoutEffect(() => {
|
|
423
423
|
var Ue;
|
|
424
424
|
if (!B) return;
|
|
425
425
|
const h = O.current;
|
|
@@ -431,7 +431,7 @@ function Cc({
|
|
|
431
431
|
ke = Nn >= 8 ? Nn : Math.max(8, window.innerHeight - E.height - 8);
|
|
432
432
|
}
|
|
433
433
|
(te !== m.x || ke !== m.y) && M({ x: te, y: ke });
|
|
434
|
-
}, [B, m, V,
|
|
434
|
+
}, [B, m, V, Ee.length]);
|
|
435
435
|
const St = vt({
|
|
436
436
|
mutationFn: ({ transitionId: h, comment: E }) => F.request(
|
|
437
437
|
ve(`/pipelines/instance/${a}/${o}/transition`, {
|
|
@@ -440,9 +440,9 @@ function Cc({
|
|
|
440
440
|
})
|
|
441
441
|
),
|
|
442
442
|
onSuccess: () => {
|
|
443
|
-
q(!1),
|
|
443
|
+
q(!1), xe.success("Transitioned"), ma(p, a), ds(p, a, [o]), N == null || N();
|
|
444
444
|
},
|
|
445
|
-
onError: (h) =>
|
|
445
|
+
onError: (h) => xe.error(
|
|
446
446
|
Wt(h, "Transition failed"),
|
|
447
447
|
pr(h, { action: "Transition" })
|
|
448
448
|
)
|
|
@@ -454,25 +454,25 @@ function Cc({
|
|
|
454
454
|
onSuccess: ({ action: h, result: E }) => {
|
|
455
455
|
var te, ke;
|
|
456
456
|
if (q(!1), E.failed) {
|
|
457
|
-
|
|
457
|
+
xe.error(`${h.label} failed`, { description: (ke = (te = E.errors) == null ? void 0 : te[0]) == null ? void 0 : ke.error });
|
|
458
458
|
return;
|
|
459
459
|
}
|
|
460
460
|
if (!E.succeeded && E.skipped) {
|
|
461
|
-
|
|
461
|
+
xe.info(`${h.label}: nothing to change`);
|
|
462
462
|
return;
|
|
463
463
|
}
|
|
464
|
-
|
|
464
|
+
xe.success(h.label), ma(p, a), ds(p, a, [o]), N == null || N();
|
|
465
465
|
},
|
|
466
466
|
onError: (h) => {
|
|
467
467
|
const E = h.response;
|
|
468
|
-
|
|
468
|
+
xe.error((E == null ? void 0 : E.error) ?? Wt(h, "Action failed"), pr(h));
|
|
469
469
|
}
|
|
470
470
|
}), Ct = vt({
|
|
471
|
-
mutationFn: ({ op: h, note: E, pick: te }) =>
|
|
471
|
+
mutationFn: ({ op: h, note: E, pick: te }) => wd(F, a, o, h, E, te).then((ke) => ({ op: h, outcome: ke })),
|
|
472
472
|
onSuccess: ({ op: h, outcome: E }) => {
|
|
473
473
|
q(!1);
|
|
474
474
|
const te = h.kind === "push" ? h.action.label : "Retry";
|
|
475
|
-
E ? E.outcome === "fail" ?
|
|
475
|
+
E ? E.outcome === "fail" ? xe.error(`${te} failed`, { description: E.reason, duration: 1e4 }) : E.outcome === "skip" ? xe.info(`${te}: ${E.reason ?? "skipped"}`) : xe.success(E.reason ?? te) : xe.info(`${te}: nothing ran`);
|
|
476
476
|
for (const ke of [
|
|
477
477
|
"row-push-state",
|
|
478
478
|
"erp-submissions",
|
|
@@ -486,7 +486,7 @@ function Cc({
|
|
|
486
486
|
},
|
|
487
487
|
onError: (h) => {
|
|
488
488
|
const E = h.response;
|
|
489
|
-
|
|
489
|
+
xe.error((E == null ? void 0 : E.error) ?? Wt(h, "Push failed"), pr(h));
|
|
490
490
|
}
|
|
491
491
|
}), kt = (h, E, te = !1) => /* @__PURE__ */ n(
|
|
492
492
|
"button",
|
|
@@ -518,7 +518,7 @@ function Cc({
|
|
|
518
518
|
]
|
|
519
519
|
}
|
|
520
520
|
),
|
|
521
|
-
B &&
|
|
521
|
+
B && ks(
|
|
522
522
|
/* @__PURE__ */ n(
|
|
523
523
|
"div",
|
|
524
524
|
{
|
|
@@ -548,7 +548,7 @@ function Cc({
|
|
|
548
548
|
}
|
|
549
549
|
),
|
|
550
550
|
(je == null ? void 0 : je.choose) && (Vt.isError ? /* @__PURE__ */ n("p", { className: "mb-1.5 px-1 text-[11.5px] text-red-600 dark:text-red-400", children: "Could not load the options." }) : Vt.isLoading ? /* @__PURE__ */ n("p", { className: "mb-1.5 px-1 text-[11.5px] text-slate-500 dark:text-slate-400", children: "Loading…" }) : Ye != null && Ye.ask ? /* @__PURE__ */ n("div", { className: "mb-1.5 -mt-3 px-1", children: /* @__PURE__ */ n(
|
|
551
|
-
|
|
551
|
+
kc,
|
|
552
552
|
{
|
|
553
553
|
choose: je.choose,
|
|
554
554
|
options: Vt.data ?? [],
|
|
@@ -581,7 +581,7 @@ function Cc({
|
|
|
581
581
|
{
|
|
582
582
|
value: tt,
|
|
583
583
|
onChange: (h) => vn(h.target.value),
|
|
584
|
-
placeholder: ((Ke = V.push) == null ? void 0 : Ke.kind) === "push" ? ((ft = (jt = V.push.action.confirm) == null ? void 0 : jt.input) == null ? void 0 : ft.placeholder) ?? ((_n = (Je = V.push.action.confirm) == null ? void 0 : Je.input) == null ? void 0 : _n.label) ?? "" : (ln = V.action) != null && ln.require_reason || ((sn =
|
|
584
|
+
placeholder: ((Ke = V.push) == null ? void 0 : Ke.kind) === "push" ? ((ft = (jt = V.push.action.confirm) == null ? void 0 : jt.input) == null ? void 0 : ft.placeholder) ?? ((_n = (Je = V.push.action.confirm) == null ? void 0 : Je.input) == null ? void 0 : _n.label) ?? "" : (ln = V.action) != null && ln.require_reason || ((sn = Ee.find((h) => h.id === V.picked)) == null ? void 0 : sn.comment_mode) === "required" ? "Reason (required — recorded on the record’s history)…" : "Reason (optional)…",
|
|
585
585
|
rows: 2,
|
|
586
586
|
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"
|
|
587
587
|
}
|
|
@@ -591,7 +591,7 @@ function Cc({
|
|
|
591
591
|
"button",
|
|
592
592
|
{
|
|
593
593
|
type: "button",
|
|
594
|
-
disabled: V.push ? Ct.isPending || Et || V.push.kind === "push" && !!((Yt = (Ht = V.push.action.confirm) == null ? void 0 : Ht.input) != null && Yt.required) && tt.trim().length === 0 : V.action ? rn.isPending || V.action.require_reason && tt.trim().length === 0 : !V.picked || St.isPending || ((Bn =
|
|
594
|
+
disabled: V.push ? Ct.isPending || Et || V.push.kind === "push" && !!((Yt = (Ht = V.push.action.confirm) == null ? void 0 : Ht.input) != null && Yt.required) && tt.trim().length === 0 : V.action ? rn.isPending || V.action.require_reason && tt.trim().length === 0 : !V.picked || St.isPending || ((Bn = Ee.find((h) => h.id === V.picked)) == null ? void 0 : Bn.comment_mode) === "required" && tt.trim().length === 0,
|
|
595
595
|
onClick: () => {
|
|
596
596
|
V.push ? Ct.mutate({ op: V.push, note: tt, pick: mt }) : V.action ? rn.mutate({ action: V.action, comment: tt }) : V.picked && St.mutate({ transitionId: V.picked, comment: tt });
|
|
597
597
|
},
|
|
@@ -621,9 +621,9 @@ function Cc({
|
|
|
621
621
|
q(!1), v();
|
|
622
622
|
}),
|
|
623
623
|
ie && kt("Discuss in chat", () => {
|
|
624
|
-
q(!1),
|
|
625
|
-
h ||
|
|
626
|
-
}).catch(() =>
|
|
624
|
+
q(!1), zd(F, a, String(o)).then((h) => {
|
|
625
|
+
h || xe.error("This record has no chat room you can open");
|
|
626
|
+
}).catch(() => xe.error("Could not open the chat room"));
|
|
627
627
|
}),
|
|
628
628
|
w && kt("Audit log", () => {
|
|
629
629
|
q(!1), w();
|
|
@@ -729,10 +729,10 @@ function Cc({
|
|
|
729
729
|
it,
|
|
730
730
|
kt("Copy ID", () => {
|
|
731
731
|
var h;
|
|
732
|
-
q(!1), (h = navigator.clipboard) == null || h.writeText(String(o)),
|
|
732
|
+
q(!1), (h = navigator.clipboard) == null || h.writeText(String(o)), xe.success("ID copied");
|
|
733
733
|
}),
|
|
734
734
|
kt("Copy link", () => {
|
|
735
|
-
q(!1),
|
|
735
|
+
q(!1), _s(F, p, a, S, o, C), xe.success("Link copied");
|
|
736
736
|
}),
|
|
737
737
|
_ && /* @__PURE__ */ c(Be, { children: [
|
|
738
738
|
it,
|
|
@@ -800,7 +800,7 @@ function Cc({
|
|
|
800
800
|
function br(a) {
|
|
801
801
|
return a === "id" || /(^|_)id$/i.test(a) || /(^|_)uuid$/i.test(a);
|
|
802
802
|
}
|
|
803
|
-
function
|
|
803
|
+
function bs({
|
|
804
804
|
collection: a,
|
|
805
805
|
field: o,
|
|
806
806
|
fieldType: b,
|
|
@@ -828,7 +828,7 @@ function fs({
|
|
|
828
828
|
);
|
|
829
829
|
return /* @__PURE__ */ n("span", { className: "text-[12px] tabular-nums text-slate-400", children: L });
|
|
830
830
|
}
|
|
831
|
-
return /* @__PURE__ */ n("span", { className: "text-[12px] tabular-nums text-slate-400", children:
|
|
831
|
+
return /* @__PURE__ */ n("span", { className: "text-[12px] tabular-nums text-slate-400", children: wc(i) });
|
|
832
832
|
}
|
|
833
833
|
return typeof i == "string" ? /* @__PURE__ */ n(
|
|
834
834
|
"span",
|
|
@@ -958,7 +958,7 @@ function va({
|
|
|
958
958
|
] })
|
|
959
959
|
] });
|
|
960
960
|
}
|
|
961
|
-
function
|
|
961
|
+
function Tc({
|
|
962
962
|
target: a,
|
|
963
963
|
label: o,
|
|
964
964
|
selected: b,
|
|
@@ -1029,7 +1029,7 @@ function $c({
|
|
|
1029
1029
|
}
|
|
1030
1030
|
);
|
|
1031
1031
|
}
|
|
1032
|
-
function
|
|
1032
|
+
function Lc({
|
|
1033
1033
|
collection: a,
|
|
1034
1034
|
field: o,
|
|
1035
1035
|
selected: b,
|
|
@@ -1057,7 +1057,7 @@ function qc({
|
|
|
1057
1057
|
}
|
|
1058
1058
|
);
|
|
1059
1059
|
}
|
|
1060
|
-
function
|
|
1060
|
+
function Fc({
|
|
1061
1061
|
value: a,
|
|
1062
1062
|
onChange: o
|
|
1063
1063
|
}) {
|
|
@@ -1079,7 +1079,7 @@ function Tc({
|
|
|
1079
1079
|
var _;
|
|
1080
1080
|
if (!a) return "All";
|
|
1081
1081
|
const p = ba(a);
|
|
1082
|
-
return p ?
|
|
1082
|
+
return p ? ii(p) : ((_ = ga.find((B) => B.value === a)) == null ? void 0 : _.label) ?? a;
|
|
1083
1083
|
})(), [j, W] = y("between");
|
|
1084
1084
|
pe(() => {
|
|
1085
1085
|
var p;
|
|
@@ -1087,7 +1087,7 @@ function Tc({
|
|
|
1087
1087
|
}, [b, a]);
|
|
1088
1088
|
const F = () => {
|
|
1089
1089
|
const p = v || C;
|
|
1090
|
-
p && (o(
|
|
1090
|
+
p && (o(ci({ op: j, from: p, to: C || v || p })), i(!1));
|
|
1091
1091
|
};
|
|
1092
1092
|
return /* @__PURE__ */ c("div", { ref: N, className: "relative w-full", children: [
|
|
1093
1093
|
/* @__PURE__ */ c(
|
|
@@ -1132,7 +1132,7 @@ function Tc({
|
|
|
1132
1132
|
)) }),
|
|
1133
1133
|
/* @__PURE__ */ c("div", { className: "border-t border-slate-100 p-2 dark:border-slate-800", children: [
|
|
1134
1134
|
/* @__PURE__ */ n("p", { className: "pb-1 text-[10px] font-semibold uppercase tracking-wide text-slate-400", children: "Date or range" }),
|
|
1135
|
-
/* @__PURE__ */ n("div", { className: "grid grid-cols-3 gap-1 pb-1.5", children:
|
|
1135
|
+
/* @__PURE__ */ n("div", { className: "grid grid-cols-3 gap-1 pb-1.5", children: di.map((p) => /* @__PURE__ */ n(
|
|
1136
1136
|
"button",
|
|
1137
1137
|
{
|
|
1138
1138
|
type: "button",
|
|
@@ -1182,7 +1182,7 @@ function Tc({
|
|
|
1182
1182
|
] })
|
|
1183
1183
|
] });
|
|
1184
1184
|
}
|
|
1185
|
-
function
|
|
1185
|
+
function Rc({
|
|
1186
1186
|
def: a,
|
|
1187
1187
|
selected: o,
|
|
1188
1188
|
onChange: b,
|
|
@@ -1203,9 +1203,9 @@ function Lc({
|
|
|
1203
1203
|
o.map(String).sort().join(",")
|
|
1204
1204
|
],
|
|
1205
1205
|
queryFn: async () => {
|
|
1206
|
-
const q = W !== "[]" ?
|
|
1206
|
+
const q = W !== "[]" ? Yi(
|
|
1207
1207
|
a.collection,
|
|
1208
|
-
await
|
|
1208
|
+
await Ji(C, L, a.collection),
|
|
1209
1209
|
w
|
|
1210
1210
|
) : null, m = (z, le) => C.request(
|
|
1211
1211
|
ee(`/items/${a.collection}`, {
|
|
@@ -1252,7 +1252,7 @@ function Lc({
|
|
|
1252
1252
|
}
|
|
1253
1253
|
);
|
|
1254
1254
|
}
|
|
1255
|
-
const
|
|
1255
|
+
const Ns = [
|
|
1256
1256
|
{ value: "_eq", label: "=" },
|
|
1257
1257
|
{ value: "_neq", label: "≠" },
|
|
1258
1258
|
{ value: "_gt", label: ">" },
|
|
@@ -1266,7 +1266,7 @@ const _s = [
|
|
|
1266
1266
|
{ value: "30d", label: "30 days" },
|
|
1267
1267
|
{ value: "90d", label: "90 days" },
|
|
1268
1268
|
{ value: "year", label: "This year" }
|
|
1269
|
-
],
|
|
1269
|
+
], Ec = {
|
|
1270
1270
|
_eq: "_neq",
|
|
1271
1271
|
_neq: "_eq",
|
|
1272
1272
|
_in: "_nin",
|
|
@@ -1280,7 +1280,7 @@ const _s = [
|
|
|
1280
1280
|
_lt: "_gte",
|
|
1281
1281
|
_lte: "_gt"
|
|
1282
1282
|
};
|
|
1283
|
-
function
|
|
1283
|
+
function Ss(a) {
|
|
1284
1284
|
const o = /* @__PURE__ */ new Date(), b = (v) => v.toISOString().slice(0, 10), i = b(o);
|
|
1285
1285
|
if (a === "today") return { from: i, to: i };
|
|
1286
1286
|
if (a === "7d" || a === "30d" || a === "90d") {
|
|
@@ -1289,7 +1289,7 @@ function Ns(a) {
|
|
|
1289
1289
|
}
|
|
1290
1290
|
return a === "year" ? { from: `${o.getFullYear()}-01-01`, to: i } : null;
|
|
1291
1291
|
}
|
|
1292
|
-
function
|
|
1292
|
+
function hs(a) {
|
|
1293
1293
|
var b;
|
|
1294
1294
|
const o = [];
|
|
1295
1295
|
for (const i of a) {
|
|
@@ -1309,7 +1309,7 @@ function bs(a) {
|
|
|
1309
1309
|
continue;
|
|
1310
1310
|
}
|
|
1311
1311
|
if (i.op === "_preset") {
|
|
1312
|
-
const L =
|
|
1312
|
+
const L = Ss(String(i.value));
|
|
1313
1313
|
L && (i.not ? o.push({
|
|
1314
1314
|
or: [
|
|
1315
1315
|
{ path: i.path, op: "_lt", value: L.from },
|
|
@@ -1319,11 +1319,11 @@ function bs(a) {
|
|
|
1319
1319
|
continue;
|
|
1320
1320
|
}
|
|
1321
1321
|
let w = i.op.includes(":") ? i.op.split(":")[0] : i.op, C = i.op.includes(":") ? i.op.split(":")[1] : i.value || null;
|
|
1322
|
-
i.fieldType === "boolean" && (C === "true" || C === "false") && (C = C === "true"), i.not && (w =
|
|
1322
|
+
i.fieldType === "boolean" && (C === "true" || C === "false") && (C = C === "true"), i.not && (w = Ec[w] ?? w), o.push({ path: i.path, op: w, value: C });
|
|
1323
1323
|
}
|
|
1324
1324
|
return o;
|
|
1325
1325
|
}
|
|
1326
|
-
const
|
|
1326
|
+
const gs = [
|
|
1327
1327
|
{ label: "Contains", value: "_contains" },
|
|
1328
1328
|
{ label: "Doesn't contain", value: "_ncontains" },
|
|
1329
1329
|
{ label: "Equals", value: "_eq" },
|
|
@@ -1347,9 +1347,9 @@ const hs = [
|
|
|
1347
1347
|
{ label: "After", value: "_gt" },
|
|
1348
1348
|
{ label: "Is empty", value: "_null" },
|
|
1349
1349
|
{ label: "Is not empty", value: "_nnull" }
|
|
1350
|
-
],
|
|
1351
|
-
string:
|
|
1352
|
-
text:
|
|
1350
|
+
], Pc = {
|
|
1351
|
+
string: gs,
|
|
1352
|
+
text: gs,
|
|
1353
1353
|
integer: hr,
|
|
1354
1354
|
decimal: hr,
|
|
1355
1355
|
float: hr,
|
|
@@ -1368,8 +1368,8 @@ const hs = [
|
|
|
1368
1368
|
{ label: "Is not empty", value: "_nnull" }
|
|
1369
1369
|
]
|
|
1370
1370
|
};
|
|
1371
|
-
function
|
|
1372
|
-
for (const o of Object.values(
|
|
1371
|
+
function Dc(a) {
|
|
1372
|
+
for (const o of Object.values(Pc)) {
|
|
1373
1373
|
const b = o.find((i) => i.value === a);
|
|
1374
1374
|
if (b) return b.label;
|
|
1375
1375
|
}
|
|
@@ -1437,7 +1437,7 @@ function wr({
|
|
|
1437
1437
|
}
|
|
1438
1438
|
),
|
|
1439
1439
|
_ && q && /* @__PURE__ */ n(
|
|
1440
|
-
|
|
1440
|
+
Cs,
|
|
1441
1441
|
{
|
|
1442
1442
|
aliasInfo: _,
|
|
1443
1443
|
depth: o + 1,
|
|
@@ -1450,7 +1450,7 @@ function wr({
|
|
|
1450
1450
|
] }, F.field);
|
|
1451
1451
|
}) });
|
|
1452
1452
|
}
|
|
1453
|
-
function
|
|
1453
|
+
function Cs({
|
|
1454
1454
|
aliasInfo: a,
|
|
1455
1455
|
depth: o,
|
|
1456
1456
|
path: b,
|
|
@@ -1486,12 +1486,12 @@ function Ss({
|
|
|
1486
1486
|
}
|
|
1487
1487
|
) : /* @__PURE__ */ n("div", { className: "px-3 py-1.5", style: { paddingLeft: `${0.5 + o}rem` }, children: /* @__PURE__ */ n("span", { className: "inline-block h-3 w-20 animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" }) });
|
|
1488
1488
|
}
|
|
1489
|
-
function
|
|
1489
|
+
function xs(a, o, b) {
|
|
1490
1490
|
if (o) return "relation";
|
|
1491
1491
|
const i = a.type ?? "string";
|
|
1492
1492
|
return i === "integer" || i === "decimal" || i === "float" ? "number" : i === "datetime" || i === "timestamp" ? "date" : i;
|
|
1493
1493
|
}
|
|
1494
|
-
function
|
|
1494
|
+
function Mc({
|
|
1495
1495
|
collection: a,
|
|
1496
1496
|
path: o,
|
|
1497
1497
|
pathLabels: b,
|
|
@@ -1565,7 +1565,7 @@ function Pc({
|
|
|
1565
1565
|
} else p(M) && _.push({
|
|
1566
1566
|
key: m.field,
|
|
1567
1567
|
label: M,
|
|
1568
|
-
hint:
|
|
1568
|
+
hint: xs(m, void 0),
|
|
1569
1569
|
leaf: { path: z, pathLabels: le, fieldType: m.type ?? "string" }
|
|
1570
1570
|
});
|
|
1571
1571
|
}
|
|
@@ -1587,7 +1587,7 @@ function Pc({
|
|
|
1587
1587
|
key: `${m.field}.${z.field}`,
|
|
1588
1588
|
label: le,
|
|
1589
1589
|
breadcrumb: O,
|
|
1590
|
-
hint:
|
|
1590
|
+
hint: xs(z, Z ?? void 0),
|
|
1591
1591
|
leaf: {
|
|
1592
1592
|
path: [...o, m.field, z.field],
|
|
1593
1593
|
pathLabels: [...b, O, le],
|
|
@@ -1636,7 +1636,7 @@ function Pc({
|
|
|
1636
1636
|
m.key
|
|
1637
1637
|
)) });
|
|
1638
1638
|
}
|
|
1639
|
-
function
|
|
1639
|
+
function Oc({
|
|
1640
1640
|
target: a,
|
|
1641
1641
|
selected: o,
|
|
1642
1642
|
labels: b,
|
|
@@ -1707,7 +1707,7 @@ function Dc({
|
|
|
1707
1707
|
] })
|
|
1708
1708
|
] });
|
|
1709
1709
|
}
|
|
1710
|
-
function
|
|
1710
|
+
function Ac(a) {
|
|
1711
1711
|
var b, i;
|
|
1712
1712
|
const o = a.pathLabels.join(" › ");
|
|
1713
1713
|
if (Array.isArray(a.value)) {
|
|
@@ -1726,9 +1726,9 @@ function Mc(a) {
|
|
|
1726
1726
|
const v = ((b = ga.find((w) => w.value === a.value)) == null ? void 0 : b.label) ?? String(a.value);
|
|
1727
1727
|
return { field: o, op: "in the", value: `${v} (rolling)` };
|
|
1728
1728
|
}
|
|
1729
|
-
return (i = a.path[0]) != null && i.startsWith("$has_") || a.path[0] === "$missing_required" ? { field: o, op: "", value: "" } : { field: o, op:
|
|
1729
|
+
return (i = a.path[0]) != null && i.startsWith("$has_") || a.path[0] === "$missing_required" ? { field: o, op: "", value: "" } : { field: o, op: Dc(a.op).toLowerCase(), value: String(a.value ?? "") };
|
|
1730
1730
|
}
|
|
1731
|
-
function
|
|
1731
|
+
function Ic({
|
|
1732
1732
|
collection: a,
|
|
1733
1733
|
meta: o,
|
|
1734
1734
|
search: b,
|
|
@@ -1740,12 +1740,12 @@ function Oc({
|
|
|
1740
1740
|
collection: a,
|
|
1741
1741
|
path: [],
|
|
1742
1742
|
pathLabels: []
|
|
1743
|
-
}), [F, p] = y(null), [_, B] = y("_contains"), [q, m] = y(""), [M, $] = y(""), [O, z] = y([]), [le, Z] = y({}), [K, H] = y(null),
|
|
1743
|
+
}), [F, p] = y(null), [_, B] = y("_contains"), [q, m] = y(""), [M, $] = y(""), [O, z] = y([]), [le, Z] = y({}), [K, H] = y(null), De = fe(null);
|
|
1744
1744
|
pe(() => {
|
|
1745
1745
|
if (!C) return;
|
|
1746
1746
|
const k = (se) => {
|
|
1747
1747
|
var ot;
|
|
1748
|
-
(ot =
|
|
1748
|
+
(ot = De.current) != null && ot.contains(se.target) || L(!1);
|
|
1749
1749
|
}, I = (se) => {
|
|
1750
1750
|
se.key === "Escape" && L(!1);
|
|
1751
1751
|
};
|
|
@@ -1757,10 +1757,10 @@ function Oc({
|
|
|
1757
1757
|
S(""), W({ collection: a, path: [], pathLabels: [] }), p(null), B("_contains"), m(""), $(""), z([]), Z({}), H(null);
|
|
1758
1758
|
}, we = () => {
|
|
1759
1759
|
ie(), L(!0);
|
|
1760
|
-
},
|
|
1760
|
+
}, Ee = (k) => {
|
|
1761
1761
|
w(K ? v.map((I) => I.id === K ? { ...k, id: K } : I) : [...v, { ...k, id: crypto.randomUUID() }]), L(!1), ie();
|
|
1762
|
-
},
|
|
1763
|
-
F &&
|
|
1762
|
+
}, be = (k, I) => {
|
|
1763
|
+
F && Ee({
|
|
1764
1764
|
path: F.path,
|
|
1765
1765
|
pathLabels: F.pathLabels,
|
|
1766
1766
|
fieldType: F.fieldType,
|
|
@@ -1768,7 +1768,7 @@ function Oc({
|
|
|
1768
1768
|
value: I
|
|
1769
1769
|
});
|
|
1770
1770
|
}, st = () => {
|
|
1771
|
-
!F || O.length === 0 ||
|
|
1771
|
+
!F || O.length === 0 || Ee({
|
|
1772
1772
|
path: F.path,
|
|
1773
1773
|
pathLabels: F.pathLabels,
|
|
1774
1774
|
fieldType: "relation",
|
|
@@ -1800,7 +1800,7 @@ function Oc({
|
|
|
1800
1800
|
if (F.relTarget !== void 0) return "relation";
|
|
1801
1801
|
const k = F.fieldType;
|
|
1802
1802
|
return k === "integer" || k === "decimal" || k === "float" ? "number" : k === "date" || k === "datetime" || k === "timestamp" ? "date" : k === "boolean" ? "boolean" : "string";
|
|
1803
|
-
})(), _e =
|
|
1803
|
+
})(), _e = Ns, Ce = [
|
|
1804
1804
|
{ value: "_contains", label: "Contains" },
|
|
1805
1805
|
{ value: "_ncontains", label: "Doesn't contain" },
|
|
1806
1806
|
{ value: "_eq", label: "Equals" },
|
|
@@ -1811,7 +1811,7 @@ function Oc({
|
|
|
1811
1811
|
return /* @__PURE__ */ c("div", { className: "flex min-w-0 flex-1 flex-wrap items-center gap-2", children: [
|
|
1812
1812
|
/* @__PURE__ */ c("div", { className: "relative", children: [
|
|
1813
1813
|
/* @__PURE__ */ n(
|
|
1814
|
-
|
|
1814
|
+
vs,
|
|
1815
1815
|
{
|
|
1816
1816
|
"aria-hidden": !0,
|
|
1817
1817
|
className: "pointer-events-none absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400"
|
|
@@ -1829,7 +1829,7 @@ function Oc({
|
|
|
1829
1829
|
)
|
|
1830
1830
|
] }),
|
|
1831
1831
|
v.map((k) => {
|
|
1832
|
-
const I =
|
|
1832
|
+
const I = Ac(k);
|
|
1833
1833
|
return /* @__PURE__ */ c(
|
|
1834
1834
|
"span",
|
|
1835
1835
|
{
|
|
@@ -1873,7 +1873,7 @@ function Oc({
|
|
|
1873
1873
|
k.id
|
|
1874
1874
|
);
|
|
1875
1875
|
}),
|
|
1876
|
-
/* @__PURE__ */ c("div", { className: "relative", ref:
|
|
1876
|
+
/* @__PURE__ */ c("div", { className: "relative", ref: De, children: [
|
|
1877
1877
|
/* @__PURE__ */ n(
|
|
1878
1878
|
"button",
|
|
1879
1879
|
{
|
|
@@ -1940,7 +1940,7 @@ function Oc({
|
|
|
1940
1940
|
k
|
|
1941
1941
|
)) }),
|
|
1942
1942
|
/* @__PURE__ */ n(
|
|
1943
|
-
|
|
1943
|
+
Mc,
|
|
1944
1944
|
{
|
|
1945
1945
|
collection: j.collection,
|
|
1946
1946
|
path: j.path,
|
|
@@ -1975,7 +1975,7 @@ function Oc({
|
|
|
1975
1975
|
),
|
|
1976
1976
|
X === "relation" && F.relTarget ? /* @__PURE__ */ c("div", { className: "pt-2", children: [
|
|
1977
1977
|
/* @__PURE__ */ n(
|
|
1978
|
-
|
|
1978
|
+
Oc,
|
|
1979
1979
|
{
|
|
1980
1980
|
target: F.relTarget,
|
|
1981
1981
|
selected: O,
|
|
@@ -2008,7 +2008,7 @@ function Oc({
|
|
|
2008
2008
|
"button",
|
|
2009
2009
|
{
|
|
2010
2010
|
type: "button",
|
|
2011
|
-
onClick: () =>
|
|
2011
|
+
onClick: () => be(
|
|
2012
2012
|
k.op.includes(":") ? k.op.split(":")[0] : k.op,
|
|
2013
2013
|
k.op.includes(":") ? k.op.split(":")[1] : ""
|
|
2014
2014
|
),
|
|
@@ -2022,7 +2022,7 @@ function Oc({
|
|
|
2022
2022
|
{
|
|
2023
2023
|
type: "button",
|
|
2024
2024
|
onClick: () => {
|
|
2025
|
-
|
|
2025
|
+
be("_preset", k.value);
|
|
2026
2026
|
},
|
|
2027
2027
|
className: "rounded-md border border-slate-200 px-2 py-1 text-[11.5px] text-slate-600 hover:border-nvr-cyan/40 hover:bg-nvr-cyan/5 dark:border-slate-700 dark:text-slate-300",
|
|
2028
2028
|
children: k.label
|
|
@@ -2058,7 +2058,7 @@ function Oc({
|
|
|
2058
2058
|
type: "button",
|
|
2059
2059
|
disabled: !q && !M,
|
|
2060
2060
|
onClick: () => {
|
|
2061
|
-
q && M ?
|
|
2061
|
+
q && M ? be("_between", `${q}..${M}`) : q ? be("_gte", q) : M && be("_lte", M);
|
|
2062
2062
|
},
|
|
2063
2063
|
className: "h-8 w-full rounded-md bg-nvr-cyan text-[13px] font-medium text-white disabled:opacity-40",
|
|
2064
2064
|
children: "Apply"
|
|
@@ -2069,7 +2069,7 @@ function Oc({
|
|
|
2069
2069
|
{
|
|
2070
2070
|
className: "space-y-2 p-3",
|
|
2071
2071
|
onSubmit: (k) => {
|
|
2072
|
-
k.preventDefault(), X === "number" && _ === "_between" ? q !== "" && M !== "" &&
|
|
2072
|
+
k.preventDefault(), X === "number" && _ === "_between" ? q !== "" && M !== "" && be("_between", `${q}..${M}`) : q.trim() && be(_, q.trim());
|
|
2073
2073
|
},
|
|
2074
2074
|
children: [
|
|
2075
2075
|
/* @__PURE__ */ c("div", { className: "flex flex-wrap gap-1", children: [
|
|
@@ -2087,7 +2087,7 @@ function Oc({
|
|
|
2087
2087
|
"button",
|
|
2088
2088
|
{
|
|
2089
2089
|
type: "button",
|
|
2090
|
-
onClick: () =>
|
|
2090
|
+
onClick: () => be("_null", ""),
|
|
2091
2091
|
className: "rounded-md border border-slate-200 px-2 py-1 text-[11.5px] text-slate-500 hover:text-slate-700 dark:border-slate-700 dark:text-slate-400",
|
|
2092
2092
|
children: "Empty"
|
|
2093
2093
|
}
|
|
@@ -2096,7 +2096,7 @@ function Oc({
|
|
|
2096
2096
|
"button",
|
|
2097
2097
|
{
|
|
2098
2098
|
type: "button",
|
|
2099
|
-
onClick: () =>
|
|
2099
|
+
onClick: () => be("_nnull", ""),
|
|
2100
2100
|
className: "rounded-md border border-slate-200 px-2 py-1 text-[11.5px] text-slate-500 hover:text-slate-700 dark:border-slate-700 dark:text-slate-400",
|
|
2101
2101
|
children: "Not empty"
|
|
2102
2102
|
}
|
|
@@ -2144,7 +2144,7 @@ function Oc({
|
|
|
2144
2144
|
] })
|
|
2145
2145
|
] });
|
|
2146
2146
|
}
|
|
2147
|
-
function
|
|
2147
|
+
function jc({
|
|
2148
2148
|
collection: a,
|
|
2149
2149
|
meta: o,
|
|
2150
2150
|
onPick: b
|
|
@@ -2185,7 +2185,7 @@ function Ac({
|
|
|
2185
2185
|
}
|
|
2186
2186
|
),
|
|
2187
2187
|
S && N && /* @__PURE__ */ n(
|
|
2188
|
-
|
|
2188
|
+
Cs,
|
|
2189
2189
|
{
|
|
2190
2190
|
aliasInfo: N,
|
|
2191
2191
|
depth: 1,
|
|
@@ -2198,7 +2198,7 @@ function Ac({
|
|
|
2198
2198
|
] }, C.field);
|
|
2199
2199
|
}) });
|
|
2200
2200
|
}
|
|
2201
|
-
function
|
|
2201
|
+
function Kc({
|
|
2202
2202
|
collection: a,
|
|
2203
2203
|
ids: o,
|
|
2204
2204
|
onDone: b,
|
|
@@ -2278,7 +2278,7 @@ function Ic({
|
|
|
2278
2278
|
)
|
|
2279
2279
|
] });
|
|
2280
2280
|
}
|
|
2281
|
-
function
|
|
2281
|
+
function Bc({
|
|
2282
2282
|
collection: a,
|
|
2283
2283
|
selectedIds: o,
|
|
2284
2284
|
onDone: b,
|
|
@@ -2430,7 +2430,7 @@ function jc({
|
|
|
2430
2430
|
}
|
|
2431
2431
|
);
|
|
2432
2432
|
}
|
|
2433
|
-
function
|
|
2433
|
+
function zc({
|
|
2434
2434
|
collection: a,
|
|
2435
2435
|
selectedIds: o,
|
|
2436
2436
|
transitions: b,
|
|
@@ -2440,7 +2440,7 @@ function Kc({
|
|
|
2440
2440
|
onClear: C,
|
|
2441
2441
|
onSuccess: L
|
|
2442
2442
|
}) {
|
|
2443
|
-
const N = fa(), S = pt(), j = xa(), W =
|
|
2443
|
+
const N = fa(), S = pt(), j = xa(), W = ys(), [F, p] = y("actions"), _ = gd([a], w), { data: B = [] } = re({
|
|
2444
2444
|
queryKey: ["bulk-recipes", a],
|
|
2445
2445
|
queryFn: () => S.request(ee("/bulk-recipes", { collection: a })).then((R) => R.data ?? []).catch(() => []),
|
|
2446
2446
|
staleTime: 6e4
|
|
@@ -2454,15 +2454,15 @@ function Kc({
|
|
|
2454
2454
|
action_type: q.action_type,
|
|
2455
2455
|
config: q.config
|
|
2456
2456
|
})
|
|
2457
|
-
), j.invalidateQueries({ queryKey: ["bulk-recipes", a] }),
|
|
2457
|
+
), j.invalidateQueries({ queryKey: ["bulk-recipes", a] }), Ee(`Recipe "${M.trim()}" saved`), m(null), $(""), p("actions");
|
|
2458
2458
|
} catch {
|
|
2459
|
-
|
|
2459
|
+
Ee("Failed to save recipe");
|
|
2460
2460
|
}
|
|
2461
2461
|
}, z = (R) => {
|
|
2462
2462
|
var X, _e;
|
|
2463
2463
|
if (R.action_type === "update" && ((X = R.config) != null && X.field)) {
|
|
2464
2464
|
const Ce = R.config;
|
|
2465
|
-
|
|
2465
|
+
be(async (k) => {
|
|
2466
2466
|
const I = await S.request(
|
|
2467
2467
|
ve(`/items/${a}/bulk-update?progress=${k}`, {
|
|
2468
2468
|
ids: o,
|
|
@@ -2477,10 +2477,10 @@ function Kc({
|
|
|
2477
2477
|
return k.label === ((I = R.config) == null ? void 0 : I.transition_label);
|
|
2478
2478
|
});
|
|
2479
2479
|
if (!Ce) {
|
|
2480
|
-
|
|
2480
|
+
Ee(`"${R.config.transition_label}" is not an available transition here`);
|
|
2481
2481
|
return;
|
|
2482
2482
|
}
|
|
2483
|
-
|
|
2483
|
+
be(async (k) => {
|
|
2484
2484
|
const I = await S.request(
|
|
2485
2485
|
ve(`/items/${a}/bulk-transition?progress=${k}`, {
|
|
2486
2486
|
ids: o,
|
|
@@ -2490,19 +2490,19 @@ function Kc({
|
|
|
2490
2490
|
return I.failed > 0 ? `${R.name}: ${I.succeeded} done, ${I.failed} failed` : `${R.name}: transitioned ${I.succeeded} items`;
|
|
2491
2491
|
});
|
|
2492
2492
|
}
|
|
2493
|
-
}, [le, Z] = y(!1), [K, H] = y(""), [
|
|
2494
|
-
ie(!0),
|
|
2495
|
-
const X =
|
|
2496
|
-
|
|
2493
|
+
}, [le, Z] = y(!1), [K, H] = y(""), [De, ie] = y(!1), [we, Ee] = y(null), be = async (R) => {
|
|
2494
|
+
ie(!0), Ee(null);
|
|
2495
|
+
const X = ri();
|
|
2496
|
+
li(X, o);
|
|
2497
2497
|
try {
|
|
2498
2498
|
const _e = await R(X);
|
|
2499
|
-
|
|
2499
|
+
Ee(_e), L(), C(), p("actions");
|
|
2500
2500
|
} catch (_e) {
|
|
2501
|
-
|
|
2501
|
+
Ee(ui(_e, "Bulk action failed"));
|
|
2502
2502
|
} finally {
|
|
2503
|
-
|
|
2503
|
+
si(X), ie(!1);
|
|
2504
2504
|
}
|
|
2505
|
-
}, st = (R, X) => void
|
|
2505
|
+
}, st = (R, X) => void be(async (_e) => {
|
|
2506
2506
|
const Ce = await S.request(
|
|
2507
2507
|
ve(`/items/${a}/bulk-update?progress=${_e}`, {
|
|
2508
2508
|
ids: o,
|
|
@@ -2539,12 +2539,12 @@ function Kc({
|
|
|
2539
2539
|
" selected"
|
|
2540
2540
|
] }),
|
|
2541
2541
|
le && /* @__PURE__ */ n(
|
|
2542
|
-
|
|
2542
|
+
cc,
|
|
2543
2543
|
{
|
|
2544
2544
|
collection: a,
|
|
2545
2545
|
ids: o.slice(0, 3),
|
|
2546
2546
|
fields: i,
|
|
2547
|
-
renderValue: (R, X) =>
|
|
2547
|
+
renderValue: (R, X) => Uc(a, v, R, X),
|
|
2548
2548
|
onClose: () => Z(!1)
|
|
2549
2549
|
}
|
|
2550
2550
|
),
|
|
@@ -2558,7 +2558,7 @@ function Kc({
|
|
|
2558
2558
|
"button",
|
|
2559
2559
|
{
|
|
2560
2560
|
type: "button",
|
|
2561
|
-
disabled:
|
|
2561
|
+
disabled: De || R.action_type === "transition" && !b.some((k) => {
|
|
2562
2562
|
var I;
|
|
2563
2563
|
return k.label === ((I = R.config) == null ? void 0 : I.transition_label);
|
|
2564
2564
|
}),
|
|
@@ -2589,13 +2589,13 @@ function Kc({
|
|
|
2589
2589
|
{
|
|
2590
2590
|
type: "button",
|
|
2591
2591
|
onClick: () => {
|
|
2592
|
-
const R =
|
|
2592
|
+
const R = zi(
|
|
2593
2593
|
o.map((X) => W.urlFor({ collection: a, itemId: String(X) }))
|
|
2594
2594
|
);
|
|
2595
|
-
R.blocked > 0 || R.capped > 0 ?
|
|
2595
|
+
R.blocked > 0 || R.capped > 0 ? xe.warning(ts(R)) : xe.success(ts(R));
|
|
2596
2596
|
},
|
|
2597
2597
|
"data-bulk-open-tabs": !0,
|
|
2598
|
-
title: `Open the selected records in new tabs (up to ${
|
|
2598
|
+
title: `Open the selected records in new tabs (up to ${Bi})`,
|
|
2599
2599
|
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",
|
|
2600
2600
|
children: "Open in tabs"
|
|
2601
2601
|
}
|
|
@@ -2620,23 +2620,23 @@ function Kc({
|
|
|
2620
2620
|
}
|
|
2621
2621
|
),
|
|
2622
2622
|
/* @__PURE__ */ n(
|
|
2623
|
-
|
|
2623
|
+
xd,
|
|
2624
2624
|
{
|
|
2625
2625
|
targets: o.map((R) => ({ collection: a, id: R })),
|
|
2626
2626
|
enabledKeys: w,
|
|
2627
2627
|
tone: "dark",
|
|
2628
|
-
disabled:
|
|
2628
|
+
disabled: De,
|
|
2629
2629
|
onDone: (R) => {
|
|
2630
|
-
|
|
2630
|
+
Ee(null), L(), R.failed === 0 && C();
|
|
2631
2631
|
}
|
|
2632
2632
|
}
|
|
2633
2633
|
),
|
|
2634
2634
|
_("update-field") && /* @__PURE__ */ n(
|
|
2635
|
-
|
|
2635
|
+
vd,
|
|
2636
2636
|
{
|
|
2637
2637
|
collection: a,
|
|
2638
2638
|
selectedIds: o,
|
|
2639
|
-
disabled:
|
|
2639
|
+
disabled: De,
|
|
2640
2640
|
onApply: st,
|
|
2641
2641
|
onSaveRecipe: (R, X) => {
|
|
2642
2642
|
$(""), m({ action_type: "update", config: { field: R, value: X } });
|
|
@@ -2673,23 +2673,23 @@ function Kc({
|
|
|
2673
2673
|
)
|
|
2674
2674
|
] }),
|
|
2675
2675
|
F === "merge" && /* @__PURE__ */ n(
|
|
2676
|
-
|
|
2676
|
+
Kc,
|
|
2677
2677
|
{
|
|
2678
2678
|
collection: a,
|
|
2679
2679
|
ids: o.slice(0, 2),
|
|
2680
2680
|
onDone: (R) => {
|
|
2681
|
-
|
|
2681
|
+
Ee(R), L(), C(), p("actions");
|
|
2682
2682
|
},
|
|
2683
2683
|
onCancel: () => p("actions")
|
|
2684
2684
|
}
|
|
2685
2685
|
),
|
|
2686
2686
|
F === "message" && /* @__PURE__ */ n(
|
|
2687
|
-
|
|
2687
|
+
Bc,
|
|
2688
2688
|
{
|
|
2689
2689
|
collection: a,
|
|
2690
2690
|
selectedIds: o,
|
|
2691
2691
|
onDone: (R) => {
|
|
2692
|
-
|
|
2692
|
+
Ee(R), p("actions");
|
|
2693
2693
|
},
|
|
2694
2694
|
onCancel: () => p("actions")
|
|
2695
2695
|
}
|
|
@@ -2699,7 +2699,7 @@ function Kc({
|
|
|
2699
2699
|
{
|
|
2700
2700
|
className: "flex items-center gap-1.5",
|
|
2701
2701
|
onSubmit: (R) => {
|
|
2702
|
-
R.preventDefault(), K &&
|
|
2702
|
+
R.preventDefault(), K && be(async (X) => {
|
|
2703
2703
|
const _e = await S.request(
|
|
2704
2704
|
ve(`/items/${a}/bulk-transition?progress=${X}`, {
|
|
2705
2705
|
ids: o,
|
|
@@ -2711,7 +2711,7 @@ function Kc({
|
|
|
2711
2711
|
},
|
|
2712
2712
|
children: [
|
|
2713
2713
|
/* @__PURE__ */ n(
|
|
2714
|
-
|
|
2714
|
+
gc,
|
|
2715
2715
|
{
|
|
2716
2716
|
value: K,
|
|
2717
2717
|
onChange: H,
|
|
@@ -2727,7 +2727,7 @@ function Kc({
|
|
|
2727
2727
|
"button",
|
|
2728
2728
|
{
|
|
2729
2729
|
type: "submit",
|
|
2730
|
-
disabled:
|
|
2730
|
+
disabled: De || !K,
|
|
2731
2731
|
className: "h-8 rounded-md bg-nvr-cyan px-3 text-[12.5px] font-semibold text-[#0f1e2d] disabled:opacity-50",
|
|
2732
2732
|
children: "Run"
|
|
2733
2733
|
}
|
|
@@ -2810,12 +2810,12 @@ function Kc({
|
|
|
2810
2810
|
"button",
|
|
2811
2811
|
{
|
|
2812
2812
|
type: "button",
|
|
2813
|
-
disabled:
|
|
2814
|
-
onClick: () => void
|
|
2813
|
+
disabled: De,
|
|
2814
|
+
onClick: () => void be(async (R) => `Deleted ${(await S.request(
|
|
2815
2815
|
ve(`/items/${a}/bulk-delete?progress=${R}`, { ids: o })
|
|
2816
2816
|
)).deleted} items`),
|
|
2817
2817
|
className: "h-8 rounded-md bg-red-600 px-3 text-[12.5px] font-medium hover:bg-red-700 disabled:opacity-50",
|
|
2818
|
-
children:
|
|
2818
|
+
children: De ? "Deleting…" : "Delete"
|
|
2819
2819
|
}
|
|
2820
2820
|
),
|
|
2821
2821
|
/* @__PURE__ */ n(
|
|
@@ -2832,7 +2832,7 @@ function Kc({
|
|
|
2832
2832
|
}
|
|
2833
2833
|
);
|
|
2834
2834
|
}
|
|
2835
|
-
const
|
|
2835
|
+
const Qc = {
|
|
2836
2836
|
state: "badge",
|
|
2837
2837
|
entered: "date",
|
|
2838
2838
|
aging: "short",
|
|
@@ -2844,7 +2844,7 @@ const Bc = {
|
|
|
2844
2844
|
tasks: "short",
|
|
2845
2845
|
addendums: "short"
|
|
2846
2846
|
};
|
|
2847
|
-
function
|
|
2847
|
+
function yp({
|
|
2848
2848
|
collection: a,
|
|
2849
2849
|
quickFilters: o = [],
|
|
2850
2850
|
initialColumns: b,
|
|
@@ -2859,22 +2859,22 @@ function vp({
|
|
|
2859
2859
|
showCreate: W = !0,
|
|
2860
2860
|
className: F
|
|
2861
2861
|
}) {
|
|
2862
|
-
var
|
|
2863
|
-
const p = pt(), _ = xa(), { open: B, urlFor: q } =
|
|
2864
|
-
() =>
|
|
2862
|
+
var Ol, Al, Il, jl, Kl, Bl, zl, Ql, Ul, Wl, Vl;
|
|
2863
|
+
const p = pt(), _ = xa(), { open: B, urlFor: q } = ys(), [m] = y(
|
|
2864
|
+
() => Ti(Li(`cbv:${a}`))
|
|
2865
2865
|
), [M] = y(
|
|
2866
|
-
() => m ?
|
|
2867
|
-
), [$, O] = y((m == null ? void 0 : m.p) ?? 1), z = fe(
|
|
2866
|
+
() => m ? ls(m.f ?? []) : null
|
|
2867
|
+
), [$, O] = y((m == null ? void 0 : m.p) ?? 1), z = fe(vi()), [le, Z] = y(m ? m.q ?? "" : w), K = Xl(le.trim(), 350), [H, De] = y(
|
|
2868
2868
|
M ? M.filters : C ?? []
|
|
2869
|
-
), [ie, we] = y(m ? m.s ?? "" : i ?? ""), [
|
|
2869
|
+
), [ie, we] = y(m ? m.s ?? "" : i ?? ""), [Ee, be] = y(b ?? null), [st, R] = y({}), [X, _e] = y({}), [Ce, k] = y(null), [I, se] = y({}), [ot, Rt] = y({}), [At, V] = y({}), [He, tt] = y({}), [vn, je] = y(null), [Vt, It] = y(!1), an = fe(null), [kn, Ye] = y(
|
|
2870
2870
|
() => (m == null ? void 0 : m.qf) ?? {}
|
|
2871
2871
|
), [mt, Et] = y(
|
|
2872
2872
|
() => (m == null ? void 0 : m.qf) ?? {}
|
|
2873
2873
|
), [St, rn] = y(
|
|
2874
2874
|
m ? m.lc ?? [] : L ?? []
|
|
2875
|
-
), { scopes: Ct, ready: kt } =
|
|
2875
|
+
), { scopes: Ct, ready: kt } = sd(), [it, yn] = y(!1), [wn, Kn] = y(/* @__PURE__ */ new Set()), [Ke, jt] = y(
|
|
2876
2876
|
() => (m == null ? void 0 : m.cf) ?? {}
|
|
2877
|
-
), ft =
|
|
2877
|
+
), ft = Zo("drill.browser"), Je = ft.value, [_n, ln] = y(null), [sn, Ht] = y(!1), [Yt, Bn] = y(() => {
|
|
2878
2878
|
try {
|
|
2879
2879
|
return localStorage.getItem("nvr_table_density") === "comfortable" ? "comfortable" : "compact";
|
|
2880
2880
|
} catch {
|
|
@@ -2900,7 +2900,7 @@ function vp({
|
|
|
2900
2900
|
e ? localStorage.setItem(`nvr_cbv_group_${a}`, e) : localStorage.removeItem(`nvr_cbv_group_${a}`);
|
|
2901
2901
|
} catch {
|
|
2902
2902
|
}
|
|
2903
|
-
}, [Nn, ka] = y(!1), [Sn, ya] = y(""), [
|
|
2903
|
+
}, [Nn, ka] = y(!1), [Sn, ya] = y(""), [Pe, _r] = y(null), on = vt({
|
|
2904
2904
|
mutationFn: (e) => p.request(ve("/ai/query", { collection: a, prompt: e, limit: 200 })),
|
|
2905
2905
|
onSuccess: (e) => {
|
|
2906
2906
|
var t;
|
|
@@ -2913,9 +2913,9 @@ function vp({
|
|
|
2913
2913
|
onError: (e) => {
|
|
2914
2914
|
var l;
|
|
2915
2915
|
const t = e.status, r = (l = e.response) == null ? void 0 : l.error;
|
|
2916
|
-
t === 503 ?
|
|
2916
|
+
t === 503 ? xe.error("AI is not configured — add an Anthropic API key in Settings.") : xe.error(r ?? "Could not answer that question");
|
|
2917
2917
|
}
|
|
2918
|
-
}),
|
|
2918
|
+
}), $s = () => {
|
|
2919
2919
|
_r(null), ya("");
|
|
2920
2920
|
}, Nr = fe(!1);
|
|
2921
2921
|
pe(() => {
|
|
@@ -2930,8 +2930,8 @@ function vp({
|
|
|
2930
2930
|
};
|
|
2931
2931
|
}, [de]);
|
|
2932
2932
|
const [Jt, Gt] = y([]);
|
|
2933
|
-
|
|
2934
|
-
const [Bt, $n] = y(null), [
|
|
2933
|
+
ai();
|
|
2934
|
+
const [Bt, $n] = y(null), [qs, wa] = y(!1), [Xt, _a] = y(""), [Na, Cr] = y(!1), [Ts, $r] = y(!1), [Sa, dn] = y(!1), qr = fe(null);
|
|
2935
2935
|
pe(() => {
|
|
2936
2936
|
if (!Sa) return;
|
|
2937
2937
|
const e = (t) => {
|
|
@@ -2942,7 +2942,7 @@ function vp({
|
|
|
2942
2942
|
}, [Sa]);
|
|
2943
2943
|
const Tr = fe(null), Lr = fe(null), Ca = fe(!!m), { isAdmin: Pt } = fa(), Fr = fe(a);
|
|
2944
2944
|
pe(() => {
|
|
2945
|
-
Fr.current !== a && (Fr.current = a, O(1), Z(w),
|
|
2945
|
+
Fr.current !== a && (Fr.current = a, O(1), Z(w), De([]), we(i ?? ""), be(b ?? null), R({}), _e({}), se({}), Rt({}), Gt([]), $n(null), Ye({}), Et({}), jt({}), rn([]), Je != null && Je.length && ft.back(Je.length), ln(null), Ca.current = !1);
|
|
2946
2946
|
}, [a]), pe(() => {
|
|
2947
2947
|
if (!sn) return;
|
|
2948
2948
|
const e = (t) => {
|
|
@@ -2958,39 +2958,39 @@ function vp({
|
|
|
2958
2958
|
};
|
|
2959
2959
|
return window.addEventListener("mousedown", e), () => window.removeEventListener("mousedown", e);
|
|
2960
2960
|
}, [h]);
|
|
2961
|
-
const { data:
|
|
2961
|
+
const { data: D } = re({
|
|
2962
2962
|
queryKey: ["cbv-collection-meta", a],
|
|
2963
2963
|
queryFn: () => p.request(ee(`/collections/${a}`)).then((e) => e.data),
|
|
2964
2964
|
staleTime: 10 * 6e4,
|
|
2965
2965
|
retry: !1
|
|
2966
|
-
}), $t = ue(() => ((
|
|
2966
|
+
}), $t = ue(() => ((D == null ? void 0 : D.fields) ?? []).filter((e) => !e.hidden), [D]), qe = (D == null ? void 0 : D.browser_config) ?? {}, Oe = (Ol = qe.fulfilment) != null && Ol.shipped_field && ((Al = qe.fulfilment) != null && Al.requested_field) ? qe.fulfilment : null, Rr = fe(!!m);
|
|
2967
2967
|
pe(() => {
|
|
2968
|
-
Rr.current || !
|
|
2969
|
-
}, [
|
|
2970
|
-
const qt =
|
|
2971
|
-
bt && Gt([]),
|
|
2972
|
-
}, Un = W &&
|
|
2973
|
-
Un && !(
|
|
2968
|
+
Rr.current || !D || (Rr.current = !0, !i && !ie && qe.default_sort && we(qe.default_sort));
|
|
2969
|
+
}, [D]);
|
|
2970
|
+
const qt = qe.checkbox_selection !== !1, Er = qe.show_actions !== !1, [bt, Ls] = y(!1), Fs = () => {
|
|
2971
|
+
bt && Gt([]), Ls(!bt);
|
|
2972
|
+
}, Un = W && qe.allow_create !== !1, Pr = typeof qe.create_label == "string" && qe.create_label.trim().slice(0, 40) || "New item", Wn = dd(Un && !(D != null && D.singleton) ? a : null), [$a, qn] = y(!1), [qa, Vn] = y(null), { steps: Ta } = Xd(
|
|
2973
|
+
Un && !(D != null && D.singleton) ? a : null,
|
|
2974
2974
|
null
|
|
2975
|
-
),
|
|
2975
|
+
), Dr = (e) => {
|
|
2976
2976
|
e ? B({ collection: a, itemId: "new", layoutSlug: e }) : bn("new");
|
|
2977
|
-
}, Tn =
|
|
2977
|
+
}, Tn = Yd(Un && !(D != null && D.singleton) ? a : null), Rs = ei(), Mr = fe(null), [Es, Ps] = y(null), [Or, Ar] = y(!1), Ir = (e) => {
|
|
2978
2978
|
var t;
|
|
2979
|
-
|
|
2980
|
-
},
|
|
2979
|
+
Ps(e), (t = Mr.current) == null || t.click();
|
|
2980
|
+
}, Ds = async (e) => {
|
|
2981
2981
|
const t = Array.from(e.target.files ?? []);
|
|
2982
2982
|
if (e.target.value = "", !!t.length) {
|
|
2983
|
-
|
|
2983
|
+
Ar(!0);
|
|
2984
2984
|
try {
|
|
2985
|
-
const r = await
|
|
2986
|
-
B({ collection: a, itemId: "new", layoutSlug:
|
|
2985
|
+
const r = await Jd(Rs, t, a);
|
|
2986
|
+
B({ collection: a, itemId: "new", layoutSlug: Es, query: { autofill: r } });
|
|
2987
2987
|
} catch (r) {
|
|
2988
|
-
|
|
2988
|
+
pi(r, "The document could not be read", { action: "New from document" });
|
|
2989
2989
|
} finally {
|
|
2990
|
-
|
|
2990
|
+
Ar(!1);
|
|
2991
2991
|
}
|
|
2992
2992
|
}
|
|
2993
|
-
},
|
|
2993
|
+
}, Ms = (e) => Array.isArray(e == null ? void 0 : e.quick_picker) ? e.quick_picker.filter((t) => typeof t == "string") : [], La = fe(null), jr = fe(null);
|
|
2994
2994
|
pe(() => {
|
|
2995
2995
|
if (!$a) return;
|
|
2996
2996
|
const e = (t) => {
|
|
@@ -2999,9 +2999,9 @@ function vp({
|
|
|
2999
2999
|
};
|
|
3000
3000
|
return window.addEventListener("mousedown", e), () => window.removeEventListener("mousedown", e);
|
|
3001
3001
|
}, [$a]);
|
|
3002
|
-
const Xe = m != null && m.ps ? m.ps :
|
|
3002
|
+
const Xe = m != null && m.ps ? m.ps : qe.page_size && qe.page_size > 0 ? Math.min(qe.page_size, 200) : v, Tt = o.length > 0 ? o : qe.quick_filters ?? [];
|
|
3003
3003
|
pe(() => {
|
|
3004
|
-
if (it || !kt || o.length === 0 && !
|
|
3004
|
+
if (it || !kt || o.length === 0 && !D) return;
|
|
3005
3005
|
const e = Ct, 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);
|
|
3006
3006
|
if (!e || Tt.length === 0 || !t || m) {
|
|
3007
3007
|
yn(!0);
|
|
@@ -3010,11 +3010,11 @@ function vp({
|
|
|
3010
3010
|
(async () => {
|
|
3011
3011
|
const r = {};
|
|
3012
3012
|
for (const l of Tt) {
|
|
3013
|
-
const s =
|
|
3013
|
+
const s = rs(e, { key: l.key, collection: l.collection });
|
|
3014
3014
|
if (!s) continue;
|
|
3015
|
-
const d =
|
|
3015
|
+
const d = od(e, s.name);
|
|
3016
3016
|
if (d.length === 0) continue;
|
|
3017
|
-
const f = await
|
|
3017
|
+
const f = await id(p, s, d, l.value_field).catch(
|
|
3018
3018
|
() => []
|
|
3019
3019
|
);
|
|
3020
3020
|
f.length > 0 && (r[l.key] = f);
|
|
@@ -3031,35 +3031,35 @@ function vp({
|
|
|
3031
3031
|
}
|
|
3032
3032
|
yn(!0);
|
|
3033
3033
|
})();
|
|
3034
|
-
}, [it, kt, Ct,
|
|
3035
|
-
const
|
|
3036
|
-
const t =
|
|
3034
|
+
}, [it, kt, Ct, D, Tt]);
|
|
3035
|
+
const Kr = (e) => {
|
|
3036
|
+
const t = rs(Ct, { key: e.key, collection: e.collection }), r = t ? (Ct == null ? void 0 : Ct.restricted[t.name]) ?? [] : [];
|
|
3037
3037
|
return r.length > 0 ? r : void 0;
|
|
3038
|
-
}, yt = ue(() => new Map($t.map((e) => [e.field, e])), [$t]), We = (
|
|
3038
|
+
}, yt = ue(() => new Map($t.map((e) => [e.field, e])), [$t]), We = (D == null ? void 0 : D.relations) ?? [], Br = ue(() => Ni(qe.inline_edit), [qe.inline_edit]), { data: Os } = re({
|
|
3039
3039
|
queryKey: ["my-permissions"],
|
|
3040
3040
|
queryFn: () => p.request(ee("/security/my/permissions")).then((e) => e.data),
|
|
3041
|
-
enabled:
|
|
3041
|
+
enabled: Br.enabled && !Pt,
|
|
3042
3042
|
staleTime: 5 * 6e4
|
|
3043
|
-
}),
|
|
3044
|
-
() => new Map(((
|
|
3045
|
-
[
|
|
3046
|
-
),
|
|
3043
|
+
}), As = Pt || Cc(Os, a), zr = ue(
|
|
3044
|
+
() => new Map(((D == null ? void 0 : D.fields) ?? []).map((e) => [e.field, e])),
|
|
3045
|
+
[D]
|
|
3046
|
+
), Qr = ac(), Ur = (e) => (
|
|
3047
3047
|
// Ask-the-table answers are a one-off overlay, not the list's own rows.
|
|
3048
|
-
|
|
3049
|
-
config:
|
|
3048
|
+
Pe ? null : $i({
|
|
3049
|
+
config: Br,
|
|
3050
3050
|
key: e,
|
|
3051
|
-
field:
|
|
3051
|
+
field: zr.get(e),
|
|
3052
3052
|
collection: a,
|
|
3053
3053
|
relations: We,
|
|
3054
|
-
mayUpdate:
|
|
3054
|
+
mayUpdate: As
|
|
3055
3055
|
})
|
|
3056
|
-
),
|
|
3057
|
-
const d = e.id, f = s === 0 ? null :
|
|
3058
|
-
me.filter((x) => !!
|
|
3056
|
+
), Is = (e, t, r, l, s) => {
|
|
3057
|
+
const d = e.id, f = s === 0 ? null : qi(
|
|
3058
|
+
me.filter((x) => !!Ur(x)),
|
|
3059
3059
|
t,
|
|
3060
3060
|
s
|
|
3061
3061
|
);
|
|
3062
|
-
|
|
3062
|
+
Qr.commit({
|
|
3063
3063
|
cellKey: `${String(d)}|${t}`,
|
|
3064
3064
|
collection: a,
|
|
3065
3065
|
id: d,
|
|
@@ -3083,44 +3083,44 @@ function vp({
|
|
|
3083
3083
|
// Rollups, computed columns and the row's position may follow the change.
|
|
3084
3084
|
onSaved: () => void _.invalidateQueries({ queryKey: ["cbv-items", a] })
|
|
3085
3085
|
});
|
|
3086
|
-
},
|
|
3087
|
-
const s = r ? null :
|
|
3086
|
+
}, js = (e, t, r, l) => {
|
|
3087
|
+
const s = r ? null : Ur(t);
|
|
3088
3088
|
if (!s) return l;
|
|
3089
|
-
const d =
|
|
3089
|
+
const d = zr.get(t);
|
|
3090
3090
|
return /* @__PURE__ */ n(
|
|
3091
|
-
|
|
3091
|
+
rc,
|
|
3092
3092
|
{
|
|
3093
|
-
controller:
|
|
3093
|
+
controller: Qr,
|
|
3094
3094
|
cellKey: `${String(e.id)}|${t}`,
|
|
3095
3095
|
kind: s,
|
|
3096
3096
|
value: e[t],
|
|
3097
3097
|
label: Ze(t),
|
|
3098
|
-
choices: d ?
|
|
3099
|
-
target: s === "m2o" ?
|
|
3100
|
-
onCommit: (f, x) =>
|
|
3098
|
+
choices: d ? Ci(d) : void 0,
|
|
3099
|
+
target: s === "m2o" ? Si(We, a, t) : null,
|
|
3100
|
+
onCommit: (f, x) => Is(e, t, s, f, x),
|
|
3101
3101
|
children: l
|
|
3102
3102
|
}
|
|
3103
3103
|
);
|
|
3104
|
-
}, me = ue(() => (
|
|
3104
|
+
}, me = ue(() => (Ee ?? $t.slice(0, 7).map((t) => t.field)).filter(
|
|
3105
3105
|
(t) => t.includes(".") || yt.has(t) || t.startsWith("__f:") && !!X[t]
|
|
3106
|
-
), [
|
|
3106
|
+
), [Ee, $t, yt, X]), [Fa, Hn] = y(null), Ln = ue(
|
|
3107
3107
|
() => Fa ?? (me[0] ? { [me[0]]: "left" } : {}),
|
|
3108
3108
|
[Fa, me]
|
|
3109
|
-
), wt = (e) => Ln[e],
|
|
3109
|
+
), wt = (e) => Ln[e], Ks = (e) => {
|
|
3110
3110
|
const t = { ...Ln }, r = t[e];
|
|
3111
3111
|
r ? r === "left" ? t[e] = "right" : delete t[e] : t[e] = "left", Hn(t);
|
|
3112
|
-
}, Ze = (e) => st[e] ?? (e.startsWith("__f:") ? X[e] ?? "Formula" : e.includes(".") ? e.split(".").map(Me).join(" › ") : e === "id" ? "ID" : Me(e)),
|
|
3112
|
+
}, Ze = (e) => st[e] ?? (e.startsWith("__f:") ? X[e] ?? "Formula" : e.includes(".") ? e.split(".").map(Me).join(" › ") : e === "id" ? "ID" : Me(e)), Wr = (e, t) => {
|
|
3113
3113
|
var l, s, d;
|
|
3114
3114
|
const r = t.includes(".") ? (d = (s = (l = ye == null ? void 0 : ye.rows) == null ? void 0 : l[String(e.id)]) == null ? void 0 : s[t]) == null ? void 0 : d.value : e[t];
|
|
3115
3115
|
return typeof r == "string" && /^-?\d+(\.\d+)?$/.test(r.trim()) ? Number(r) : r;
|
|
3116
|
-
}, Ks = (e, t) => {
|
|
3117
|
-
const r = X[t];
|
|
3118
|
-
return r ? Xl(r, (l) => Ur(e, l)) : null;
|
|
3119
3116
|
}, Bs = (e, t) => {
|
|
3117
|
+
const r = X[t];
|
|
3118
|
+
return r ? Zl(r, (l) => Wr(e, l)) : null;
|
|
3119
|
+
}, zs = (e, t) => {
|
|
3120
3120
|
const r = X[t];
|
|
3121
3121
|
if (r)
|
|
3122
3122
|
return r.replace(/\{\{\s*([^}]+?)\s*\}\}/g, (l, s) => {
|
|
3123
|
-
const d =
|
|
3123
|
+
const d = Wr(e, s);
|
|
3124
3124
|
return d == null || d === "" ? "—" : String(d);
|
|
3125
3125
|
});
|
|
3126
3126
|
}, zt = ue(
|
|
@@ -3133,7 +3133,7 @@ function vp({
|
|
|
3133
3133
|
...new Set(zt.map((e) => e.info.relation.many_collection ?? "").filter(Boolean))
|
|
3134
3134
|
],
|
|
3135
3135
|
[zt]
|
|
3136
|
-
),
|
|
3136
|
+
), Vr = ua({
|
|
3137
3137
|
queries: Ra.map((e) => ({
|
|
3138
3138
|
queryKey: ["cbv-collection-meta", e],
|
|
3139
3139
|
queryFn: () => p.request(ee(`/collections/${e}`)).then((t) => t.data),
|
|
@@ -3144,9 +3144,9 @@ function vp({
|
|
|
3144
3144
|
const e = /* @__PURE__ */ new Map();
|
|
3145
3145
|
return Ra.forEach((t, r) => {
|
|
3146
3146
|
var l;
|
|
3147
|
-
return e.set(t, (l =
|
|
3147
|
+
return e.set(t, (l = Vr[r]) == null ? void 0 : l.data);
|
|
3148
3148
|
}), e;
|
|
3149
|
-
}, [Ra,
|
|
3149
|
+
}, [Ra, Vr]), Ea = ue(
|
|
3150
3150
|
() => [
|
|
3151
3151
|
...new Set(
|
|
3152
3152
|
zt.filter((e) => e.info.kind === "m2m").map((e) => {
|
|
@@ -3158,20 +3158,20 @@ function vp({
|
|
|
3158
3158
|
)
|
|
3159
3159
|
],
|
|
3160
3160
|
[zt, Zt]
|
|
3161
|
-
),
|
|
3161
|
+
), Hr = ua({
|
|
3162
3162
|
queries: Ea.map((e) => ({
|
|
3163
3163
|
queryKey: ["cbv-collection-meta", e],
|
|
3164
3164
|
queryFn: () => p.request(ee(`/collections/${e}`)).then((t) => t.data),
|
|
3165
3165
|
staleTime: 10 * 6e4,
|
|
3166
3166
|
retry: !1
|
|
3167
3167
|
}))
|
|
3168
|
-
}),
|
|
3168
|
+
}), Yr = ue(() => {
|
|
3169
3169
|
const e = /* @__PURE__ */ new Map();
|
|
3170
3170
|
return Ea.forEach((t, r) => {
|
|
3171
3171
|
var l;
|
|
3172
|
-
return e.set(t, (l =
|
|
3172
|
+
return e.set(t, (l = Hr[r]) == null ? void 0 : l.data);
|
|
3173
3173
|
}), e;
|
|
3174
|
-
}, [Ea,
|
|
3174
|
+
}, [Ea, Hr]), ze = ue(() => {
|
|
3175
3175
|
const e = {};
|
|
3176
3176
|
for (const t of zt) {
|
|
3177
3177
|
const r = t.info.relation.many_collection ?? "";
|
|
@@ -3181,11 +3181,11 @@ function vp({
|
|
|
3181
3181
|
const l = Zt.get(r), s = l == null ? void 0 : l.relations.find(
|
|
3182
3182
|
(f) => f.many_collection === r && f.many_field === t.info.relation.junction_field
|
|
3183
3183
|
), d = (s == null ? void 0 : s.one_collection) ?? "";
|
|
3184
|
-
e[t.field] = `${t.field}.${An(d ?
|
|
3184
|
+
e[t.field] = `${t.field}.${An(d ? Yr.get(d) : void 0)}`;
|
|
3185
3185
|
}
|
|
3186
3186
|
}
|
|
3187
3187
|
return e;
|
|
3188
|
-
}, [zt, Zt,
|
|
3188
|
+
}, [zt, Zt, Yr]), Jr = ue(() => {
|
|
3189
3189
|
const e = {};
|
|
3190
3190
|
for (const t of zt)
|
|
3191
3191
|
if (t.info.kind === "o2m")
|
|
@@ -3197,9 +3197,9 @@ function vp({
|
|
|
3197
3197
|
s != null && s.one_collection && (e[t.field] = { kind: "m2m", target: s.one_collection });
|
|
3198
3198
|
}
|
|
3199
3199
|
return e;
|
|
3200
|
-
}, [zt, Zt]), Pa =
|
|
3200
|
+
}, [zt, Zt]), Pa = Xl(Ke, 350), [cn, Qs] = y((m == null ? void 0 : m.a) === !0), [Gr, Us] = y(null), Fn = Dd(a, Gr), [_t, Xr] = y(null), { data: Rn } = Sd(a), [Lt, Yn] = y(() => (M == null ? void 0 : M.riskIds) ?? []), he = ue(() => {
|
|
3201
3201
|
var t;
|
|
3202
|
-
const e =
|
|
3202
|
+
const e = hs(H);
|
|
3203
3203
|
for (const r of Tt) {
|
|
3204
3204
|
const l = mt[r.key] ?? [];
|
|
3205
3205
|
l.length !== 0 && ((t = r.or_paths) != null && t.length ? e.push({
|
|
@@ -3236,7 +3236,7 @@ function vp({
|
|
|
3236
3236
|
e.push({ path: [r], op: l.op, value: Number(l.value) });
|
|
3237
3237
|
else if (l.kind === "bool") e.push({ path: [r], op: "_eq", value: l.value === "true" });
|
|
3238
3238
|
else if (l.kind === "date" && l.value) {
|
|
3239
|
-
const s = ba(l.value), f = (s ?
|
|
3239
|
+
const s = ba(l.value), f = (s ? oi(s) : null) ?? Ss(l.value);
|
|
3240
3240
|
f && (f.from && e.push({ path: [r], op: "_gte", value: f.from }), f.to && e.push({ path: [r], op: "_lte", value: `${f.to}T23:59:59` }));
|
|
3241
3241
|
}
|
|
3242
3242
|
}
|
|
@@ -3262,28 +3262,28 @@ function vp({
|
|
|
3262
3262
|
Fn.condition,
|
|
3263
3263
|
Lt
|
|
3264
3264
|
]), un = ue(() => {
|
|
3265
|
-
const e = ((
|
|
3265
|
+
const e = ((D == null ? void 0 : D.fields) ?? []).map((s) => s.field), t = e.find((s) => /^(latitude|lat)$/i.test(s)) ?? null, r = e.find((s) => /^(longitude|lng|long|lon)$/i.test(s)) ?? null;
|
|
3266
3266
|
if (!t || !r) return null;
|
|
3267
3267
|
const l = e.find((s) => ["name", "title", "label", "short_name"].includes(s.toLowerCase())) ?? null;
|
|
3268
3268
|
return { latField: t, lngField: r, labelField: l };
|
|
3269
|
-
}, [
|
|
3269
|
+
}, [D]), [Jn, Zr] = y(!1), [el, Ws] = y(!1), tl = fe(he);
|
|
3270
3270
|
pe(() => {
|
|
3271
|
-
|
|
3272
|
-
}, [
|
|
3273
|
-
const En = Object.keys(ot).filter((e) => !e.includes(".") && !e.startsWith("__")).sort().join(","),
|
|
3271
|
+
tl.current !== he && (tl.current = he, O(1));
|
|
3272
|
+
}, [he]);
|
|
3273
|
+
const En = Object.keys(ot).filter((e) => !e.includes(".") && !e.startsWith("__")).sort().join(","), nl = (e) => [
|
|
3274
3274
|
"cbv-items",
|
|
3275
3275
|
a,
|
|
3276
3276
|
K,
|
|
3277
3277
|
ie,
|
|
3278
3278
|
oe ? "grouped" : e,
|
|
3279
3279
|
oe ? 500 : Xe,
|
|
3280
|
-
|
|
3280
|
+
he,
|
|
3281
3281
|
En
|
|
3282
|
-
],
|
|
3282
|
+
], al = async (e) => {
|
|
3283
3283
|
const t = {
|
|
3284
3284
|
limit: oe ? 500 : Xe,
|
|
3285
3285
|
...K ? { search: K } : {},
|
|
3286
|
-
...
|
|
3286
|
+
...he ? { conditions: he } : {},
|
|
3287
3287
|
...En ? { agg: En } : {},
|
|
3288
3288
|
// #2443 — the total may be a few seconds old (shown as "about"); rows are always fresh.
|
|
3289
3289
|
count: "approx"
|
|
@@ -3296,9 +3296,9 @@ function vp({
|
|
|
3296
3296
|
K,
|
|
3297
3297
|
ie,
|
|
3298
3298
|
Xe,
|
|
3299
|
-
|
|
3299
|
+
he,
|
|
3300
3300
|
En
|
|
3301
|
-
]), s = z.current, d =
|
|
3301
|
+
]), s = z.current, d = ki(s, l, e, ie);
|
|
3302
3302
|
if (d.after === void 0 && d.sort === ie) return r(e);
|
|
3303
3303
|
try {
|
|
3304
3304
|
const f = await p.request(
|
|
@@ -3308,40 +3308,40 @@ function vp({
|
|
|
3308
3308
|
...d.sort ? { sort: d.sort } : {}
|
|
3309
3309
|
})
|
|
3310
3310
|
);
|
|
3311
|
-
return d.after !== void 0 &&
|
|
3311
|
+
return d.after !== void 0 && yi(s, l, e, f.next_cursor), f;
|
|
3312
3312
|
} catch (f) {
|
|
3313
|
-
if (!
|
|
3314
|
-
return
|
|
3313
|
+
if (!wi(f)) throw f;
|
|
3314
|
+
return _i(s, l), r(e);
|
|
3315
3315
|
}
|
|
3316
3316
|
}, {
|
|
3317
|
-
data:
|
|
3317
|
+
data: Te,
|
|
3318
3318
|
isLoading: Da,
|
|
3319
3319
|
isFetching: Dt,
|
|
3320
|
-
dataUpdatedAt:
|
|
3320
|
+
dataUpdatedAt: Vs,
|
|
3321
3321
|
refetch: Ma,
|
|
3322
3322
|
error: nt
|
|
3323
3323
|
} = re({
|
|
3324
|
-
queryKey:
|
|
3325
|
-
queryFn: () =>
|
|
3324
|
+
queryKey: nl($),
|
|
3325
|
+
queryFn: () => al($),
|
|
3326
3326
|
enabled: !!a && it,
|
|
3327
3327
|
placeholderData: (e) => e,
|
|
3328
3328
|
// #2490 — a collection whose live record events are off polls instead (visible tabs only).
|
|
3329
|
-
refetchInterval:
|
|
3329
|
+
refetchInterval: qe.live_events === "off" ? 3e4 : !1,
|
|
3330
3330
|
retry: !1
|
|
3331
3331
|
});
|
|
3332
|
-
|
|
3332
|
+
Ui({
|
|
3333
3333
|
qc: _,
|
|
3334
|
-
enabled: !!a && it && !oe && !K && !Dt && !!
|
|
3335
|
-
queryKey:
|
|
3336
|
-
queryFn: () =>
|
|
3334
|
+
enabled: !!a && it && !oe && !K && !Dt && !!Te && $ * Xe < (Te.total ?? 0),
|
|
3335
|
+
queryKey: nl($ + 1),
|
|
3336
|
+
queryFn: () => al($ + 1)
|
|
3337
3337
|
});
|
|
3338
|
-
const
|
|
3338
|
+
const ge = Pe ? Pe.rows : (Te == null ? void 0 : Te.data) ?? [], Le = Pe ? Pe.total : (Te == null ? void 0 : Te.total) ?? 0, en = !Pe && !!Te && (Te.total_timed_out === !0 || Te.total == null), Oa = !Pe && (Te == null ? void 0 : Te.total_approx) === !0, Aa = Te == null ? void 0 : Te.aggregates, Gn = en ? $ + (ge.length >= Xe ? 1 : 0) : Math.max(1, Math.ceil(Le / Xe)), Pn = Tt.filter(
|
|
3339
3339
|
(e) => {
|
|
3340
3340
|
var t;
|
|
3341
|
-
return wn.has(e.key) && (((t = mt[e.key]) == null ? void 0 : t.length) ?? 0) > 0 && !
|
|
3341
|
+
return wn.has(e.key) && (((t = mt[e.key]) == null ? void 0 : t.length) ?? 0) > 0 && !Kr(e);
|
|
3342
3342
|
}
|
|
3343
|
-
),
|
|
3344
|
-
if (!
|
|
3343
|
+
), rl = Pn.map((e) => e.key).join(","), Ia = ue(() => {
|
|
3344
|
+
if (!rl || !he) return he;
|
|
3345
3345
|
const e = new Set(
|
|
3346
3346
|
Pn.map((r) => {
|
|
3347
3347
|
var s;
|
|
@@ -3350,13 +3350,13 @@ function vp({
|
|
|
3350
3350
|
(s = r.or_paths) != null && s.length ? { or: r.or_paths.map((d) => ({ path: d, op: "_in", value: l })) } : { path: r.path, op: "_in", value: l }
|
|
3351
3351
|
);
|
|
3352
3352
|
})
|
|
3353
|
-
), t = JSON.parse(
|
|
3353
|
+
), t = JSON.parse(he).filter(
|
|
3354
3354
|
(r) => !e.has(JSON.stringify(r))
|
|
3355
3355
|
);
|
|
3356
3356
|
return t.length > 0 ? JSON.stringify(t) : void 0;
|
|
3357
|
-
}, [
|
|
3357
|
+
}, [rl, he, mt]), { data: Xn } = re({
|
|
3358
3358
|
queryKey: ["cbv-default-hidden", a, K, Ia],
|
|
3359
|
-
enabled: !!a && !
|
|
3359
|
+
enabled: !!a && !Pe && !!Te && !Dt && Le === 0 && Pn.length > 0,
|
|
3360
3360
|
staleTime: 3e4,
|
|
3361
3361
|
retry: !1,
|
|
3362
3362
|
queryFn: () => p.request(
|
|
@@ -3368,36 +3368,36 @@ function vp({
|
|
|
3368
3368
|
...Ia ? { conditions: Ia } : {}
|
|
3369
3369
|
})
|
|
3370
3370
|
).then((e) => Number(e.total ?? 0))
|
|
3371
|
-
}),
|
|
3371
|
+
}), Hs = () => {
|
|
3372
3372
|
const e = Pn.map((r) => r.key), t = (r) => {
|
|
3373
3373
|
const l = { ...r };
|
|
3374
3374
|
for (const s of e) l[s] = [];
|
|
3375
3375
|
return l;
|
|
3376
3376
|
};
|
|
3377
3377
|
Ye(t), Et(t), O(1);
|
|
3378
|
-
},
|
|
3378
|
+
}, ll = fe(Date.now()), Zn = fe(null);
|
|
3379
3379
|
pe(() => {
|
|
3380
|
-
|
|
3380
|
+
ll.current = Date.now();
|
|
3381
3381
|
}, [a, K]), pe(() => {
|
|
3382
3382
|
var t, r;
|
|
3383
|
-
if (!a || K.length < 2 || !
|
|
3383
|
+
if (!a || K.length < 2 || !Te || Dt || Pe) return;
|
|
3384
3384
|
const e = `${a}\0${K}`;
|
|
3385
3385
|
((t = Zn.current) == null ? void 0 : t.key) !== e && (Zn.current = {
|
|
3386
3386
|
key: e,
|
|
3387
|
-
id:
|
|
3387
|
+
id: nd(p, {
|
|
3388
3388
|
surface: "collection",
|
|
3389
3389
|
collection: a,
|
|
3390
3390
|
query: K,
|
|
3391
|
-
result_count:
|
|
3392
|
-
duration_ms: Date.now() -
|
|
3391
|
+
result_count: Te.total ?? ((r = Te.data) == null ? void 0 : r.length) ?? 0,
|
|
3392
|
+
duration_ms: Date.now() - ll.current
|
|
3393
3393
|
})
|
|
3394
3394
|
});
|
|
3395
|
-
}, [p, a, K,
|
|
3395
|
+
}, [p, a, K, Te, Dt, Pe]), pd(
|
|
3396
3396
|
a ? {
|
|
3397
3397
|
list: {
|
|
3398
3398
|
collection: a,
|
|
3399
|
-
label: (
|
|
3400
|
-
ids:
|
|
3399
|
+
label: (D == null ? void 0 : D.display_name) || a,
|
|
3400
|
+
ids: ge.slice(0, 100).map((e) => String(e.id)),
|
|
3401
3401
|
filters: H.map((e) => ({
|
|
3402
3402
|
path: e.path.join("."),
|
|
3403
3403
|
op: e.op,
|
|
@@ -3405,71 +3405,71 @@ function vp({
|
|
|
3405
3405
|
...e.not ? { not: !0 } : {}
|
|
3406
3406
|
})),
|
|
3407
3407
|
search: K || null,
|
|
3408
|
-
total:
|
|
3408
|
+
total: Le
|
|
3409
3409
|
}
|
|
3410
3410
|
} : null
|
|
3411
3411
|
);
|
|
3412
|
-
const
|
|
3412
|
+
const Ys = md(), sl = ti(Dt), ja = ni({
|
|
3413
3413
|
pending: Dt,
|
|
3414
3414
|
request: a ? { method: "GET", url: `/items/${a}` } : null,
|
|
3415
|
-
noun: ((
|
|
3415
|
+
noun: ((D == null ? void 0 : D.display_name) ?? a ?? "").replace(/_/g, " ").toLowerCase() || null,
|
|
3416
3416
|
// Only a total this person has already been shown (never a raw table count).
|
|
3417
|
-
knownRows: Dt ?
|
|
3418
|
-
}), Ka =
|
|
3419
|
-
za.current = new Set(
|
|
3420
|
-
const
|
|
3421
|
-
() =>
|
|
3422
|
-
[
|
|
3423
|
-
),
|
|
3424
|
-
|
|
3417
|
+
knownRows: Dt ? ld(_.getQueriesData({ queryKey: ["cbv-items", a] })) : null
|
|
3418
|
+
}), Ka = Gi(), { userId: Ba } = fa(), Ft = Ei(), za = fe(/* @__PURE__ */ new Set());
|
|
3419
|
+
za.current = new Set(ge.map((e) => String(e.id)));
|
|
3420
|
+
const Js = ue(
|
|
3421
|
+
() => ge.slice(0, 100).map((e) => ({ collection: a, item: String(e.id) })),
|
|
3422
|
+
[ge, a]
|
|
3423
|
+
), ol = Hi(Js), il = fe([]);
|
|
3424
|
+
il.current = [
|
|
3425
3425
|
"cbv-items",
|
|
3426
3426
|
a,
|
|
3427
3427
|
K,
|
|
3428
3428
|
ie,
|
|
3429
3429
|
oe ? "grouped" : $,
|
|
3430
3430
|
oe ? 500 : Xe,
|
|
3431
|
-
|
|
3431
|
+
he,
|
|
3432
3432
|
En
|
|
3433
3433
|
];
|
|
3434
|
-
const
|
|
3435
|
-
conditions:
|
|
3434
|
+
const dl = fe({
|
|
3435
|
+
conditions: he,
|
|
3436
3436
|
search: K,
|
|
3437
3437
|
page: $,
|
|
3438
3438
|
grouped: !!oe
|
|
3439
3439
|
});
|
|
3440
|
-
|
|
3441
|
-
conditions:
|
|
3440
|
+
dl.current = {
|
|
3441
|
+
conditions: he,
|
|
3442
3442
|
search: K,
|
|
3443
3443
|
page: $,
|
|
3444
3444
|
grouped: !!oe
|
|
3445
3445
|
};
|
|
3446
|
-
const Qa = fe({}).current, [
|
|
3446
|
+
const Qa = fe({}).current, [Gs, Xs] = y(0), [Ua, Wa] = y(0);
|
|
3447
3447
|
pe(() => {
|
|
3448
3448
|
if (!Ka || !a) return;
|
|
3449
|
-
const e = (
|
|
3449
|
+
const e = (P = 1) => Wa((U) => U + P), t = /* @__PURE__ */ new Map();
|
|
3450
3450
|
let r = null;
|
|
3451
|
-
const l = (
|
|
3451
|
+
const l = (P) => {
|
|
3452
3452
|
const U = (J) => t.set(JSON.stringify(J), J);
|
|
3453
|
-
|
|
3453
|
+
P.includes(gn.tasks) && U(["cbv-task-counts", a]), P.includes(gn.addendums) && U(["cbv-addendum-summary", a]), P.includes(gn.integrations) && U(["cbv-integrations-summary", a]), P.includes(gn.comments) && U(["row-comment-counts", a]), P.includes(gn.state) && (U(["cbv-pipeline-instances", a]), U(["cbv-owners", a]), U(["cbv-view-count", a])), P.includes(gn.lock) && Xs((J) => J + 1), !r && (r = setTimeout(() => {
|
|
3454
3454
|
r = null;
|
|
3455
3455
|
for (const J of t.values()) _.invalidateQueries({ queryKey: J });
|
|
3456
3456
|
t.clear();
|
|
3457
3457
|
}, 300));
|
|
3458
|
-
}, s = (
|
|
3459
|
-
|
|
3460
|
-
(U) => U && { ...U, ...
|
|
3458
|
+
}, s = (P) => _.setQueryData(
|
|
3459
|
+
il.current,
|
|
3460
|
+
(U) => U && { ...U, ...P(U) }
|
|
3461
3461
|
);
|
|
3462
3462
|
let d = [], f = null, x = null, g = !1;
|
|
3463
3463
|
const Q = async () => {
|
|
3464
3464
|
f = null;
|
|
3465
|
-
const
|
|
3466
|
-
if (d = [],
|
|
3465
|
+
const P = d;
|
|
3466
|
+
if (d = [], P.length === 0 || g) return;
|
|
3467
3467
|
x || (x = setTimeout(() => {
|
|
3468
3468
|
x = null, _.invalidateQueries({ queryKey: ["cbv-view-count", a] });
|
|
3469
3469
|
}, 1500));
|
|
3470
3470
|
const U = /* @__PURE__ */ new Map();
|
|
3471
3471
|
let J = !1;
|
|
3472
|
-
for (const Y of
|
|
3472
|
+
for (const Y of P) {
|
|
3473
3473
|
const ce = String(Y.item);
|
|
3474
3474
|
if (ce === "*") {
|
|
3475
3475
|
J = !0;
|
|
@@ -3483,8 +3483,8 @@ function vp({
|
|
|
3483
3483
|
});
|
|
3484
3484
|
}
|
|
3485
3485
|
J && e();
|
|
3486
|
-
const u = za.current, dt = (Y) =>
|
|
3487
|
-
const ce =
|
|
3486
|
+
const u = za.current, dt = (Y) => Qi(a, Y.item), Qe = (Y) => {
|
|
3487
|
+
const ce = Ii(Y);
|
|
3488
3488
|
return ce && Ba && ce.toUpperCase() === Ba.toUpperCase() ? "self" : ce;
|
|
3489
3489
|
}, gt = [];
|
|
3490
3490
|
for (const [Y, ce] of U)
|
|
@@ -3497,10 +3497,10 @@ function vp({
|
|
|
3497
3497
|
})), Ft.forget(gt);
|
|
3498
3498
|
}
|
|
3499
3499
|
if (U.size === 0) return;
|
|
3500
|
-
const xt =
|
|
3500
|
+
const xt = dl.current;
|
|
3501
3501
|
let nn;
|
|
3502
3502
|
try {
|
|
3503
|
-
nn = await
|
|
3503
|
+
nn = await Mi(
|
|
3504
3504
|
p,
|
|
3505
3505
|
a,
|
|
3506
3506
|
[...U.keys()],
|
|
@@ -3524,16 +3524,16 @@ function vp({
|
|
|
3524
3524
|
return;
|
|
3525
3525
|
}
|
|
3526
3526
|
if (g) return;
|
|
3527
|
-
const G =
|
|
3527
|
+
const G = Oi(xt.conditions), ne = xt.page === 1 && !xt.grouped, Re = /* @__PURE__ */ new Map(), T = [], Ve = [];
|
|
3528
3528
|
for (const [Y, ce] of U) {
|
|
3529
3529
|
const ae = nn.get(Y);
|
|
3530
|
-
u.has(Y) ? ae ?
|
|
3530
|
+
u.has(Y) ? ae ? Re.set(Y, ae) : T.push(Y) : ae && ((ce.action === "create" || !!xt.conditions && Ai(ce, G)) && ne ? Ve.push({ row: ae, ev: ce }) : e());
|
|
3531
3531
|
}
|
|
3532
|
-
if (
|
|
3532
|
+
if (Re.size > 0 || T.length > 0 || Ve.length > 0) {
|
|
3533
3533
|
const Y = new Set(T);
|
|
3534
3534
|
s((ce) => {
|
|
3535
3535
|
const ae = ce.data.filter((Se) => !Y.has(String(Se.id))).map((Se) => {
|
|
3536
|
-
const lt =
|
|
3536
|
+
const lt = Re.get(String(Se.id));
|
|
3537
3537
|
return lt ? { ...Se, ...lt } : Se;
|
|
3538
3538
|
});
|
|
3539
3539
|
return {
|
|
@@ -3543,16 +3543,16 @@ function vp({
|
|
|
3543
3543
|
});
|
|
3544
3544
|
}
|
|
3545
3545
|
T.length > 0 && Ft.forget(T);
|
|
3546
|
-
for (const [Y] of
|
|
3547
|
-
const ce = U.get(Y), ae = Qe(
|
|
3546
|
+
for (const [Y] of Re) {
|
|
3547
|
+
const ce = U.get(Y), ae = Qe(Re.get(Y));
|
|
3548
3548
|
ce && !dt(ce) && ae !== "self" && Ft.note([Y], ae);
|
|
3549
3549
|
}
|
|
3550
3550
|
for (const { row: Y, ev: ce } of Ve) {
|
|
3551
3551
|
const ae = String(Y.id);
|
|
3552
3552
|
Qe(Y) !== "self" && Ft.note([ae], Qe(Y), "create");
|
|
3553
3553
|
}
|
|
3554
|
-
}, A = (
|
|
3555
|
-
for (const U of
|
|
3554
|
+
}, A = (P) => {
|
|
3555
|
+
for (const U of P.flatMap((J) => Ri(J))) {
|
|
3556
3556
|
const J = U.changed_fields;
|
|
3557
3557
|
if (!U.action && (J != null && J.length) && J.every((u) => u.startsWith("$"))) {
|
|
3558
3558
|
(String(U.item) === "*" || za.current.has(String(U.item))) && l(J);
|
|
@@ -3563,16 +3563,16 @@ function vp({
|
|
|
3563
3563
|
d.length > 0 && !f && (f = setTimeout(() => void Q(), 300));
|
|
3564
3564
|
}, Ne = Ka.subscribeCollections(
|
|
3565
3565
|
[a],
|
|
3566
|
-
(
|
|
3566
|
+
(P) => hi(Qa, [P], A)
|
|
3567
3567
|
);
|
|
3568
3568
|
return () => {
|
|
3569
|
-
g = !0, Ne(),
|
|
3569
|
+
g = !0, Ne(), gi(Qa), r && clearTimeout(r), f && clearTimeout(f), x && clearTimeout(x);
|
|
3570
3570
|
};
|
|
3571
3571
|
}, [Ka, a, _, p, Ba, Ft, Qa]);
|
|
3572
|
-
const
|
|
3572
|
+
const Zs = Pi(
|
|
3573
3573
|
a,
|
|
3574
|
-
|
|
3575
|
-
|
|
3574
|
+
ge.map((e) => String(e.id)),
|
|
3575
|
+
Gs
|
|
3576
3576
|
), { data: ea = [] } = re({
|
|
3577
3577
|
queryKey: ["cbv-risk-rules", a],
|
|
3578
3578
|
queryFn: () => p.request(
|
|
@@ -3581,23 +3581,23 @@ function vp({
|
|
|
3581
3581
|
enabled: !!a,
|
|
3582
3582
|
staleTime: 6e4,
|
|
3583
3583
|
retry: !1
|
|
3584
|
-
}),
|
|
3585
|
-
data:
|
|
3584
|
+
}), eo = ge.map((e) => String(e.id)).join(","), {
|
|
3585
|
+
data: to = {}
|
|
3586
3586
|
} = re({
|
|
3587
|
-
queryKey: ["cbv-risk", a,
|
|
3587
|
+
queryKey: ["cbv-risk", a, eo],
|
|
3588
3588
|
queryFn: () => p.request(
|
|
3589
3589
|
ve("/at-risk/evaluate", {
|
|
3590
3590
|
collection: a,
|
|
3591
|
-
ids:
|
|
3591
|
+
ids: ge.map((e) => String(e.id))
|
|
3592
3592
|
})
|
|
3593
3593
|
).then((e) => e.data ?? {}).catch(() => ({})),
|
|
3594
|
-
enabled: !!a && ea.length > 0 &&
|
|
3594
|
+
enabled: !!a && ea.length > 0 && ge.length > 0,
|
|
3595
3595
|
staleTime: 3e4,
|
|
3596
3596
|
retry: !1
|
|
3597
|
-
}), Ae =
|
|
3598
|
-
() =>
|
|
3599
|
-
[
|
|
3600
|
-
),
|
|
3597
|
+
}), Ae = ge.map((e) => String(e.id)).join(","), no = ue(
|
|
3598
|
+
() => ge.map((e) => ({ collection: a, id: e.id })),
|
|
3599
|
+
[ge, a]
|
|
3600
|
+
), ao = sc(no, Pt), Va = !!(D != null && D.addendums_enabled), { data: Ha } = re({
|
|
3601
3601
|
queryKey: ["cbv-addendum-summary", a, Ae],
|
|
3602
3602
|
queryFn: () => p.request(
|
|
3603
3603
|
ve("/addendums/summary", { collection: a, ids: Ae.split(",") })
|
|
@@ -3606,7 +3606,7 @@ function vp({
|
|
|
3606
3606
|
placeholderData: (e) => e,
|
|
3607
3607
|
staleTime: 3e4,
|
|
3608
3608
|
retry: !1
|
|
3609
|
-
}), { data:
|
|
3609
|
+
}), { data: cl = !1 } = re({
|
|
3610
3610
|
queryKey: ["cbv-tasks-used", a],
|
|
3611
3611
|
queryFn: () => p.request(ee("/tasks", { collection: a, limit: 1 })).then((e) => (e.data ?? []).length > 0).catch(() => !1),
|
|
3612
3612
|
enabled: !!a && !a.startsWith("nivaro_"),
|
|
@@ -3617,7 +3617,7 @@ function vp({
|
|
|
3617
3617
|
queryFn: () => p.request(
|
|
3618
3618
|
ve("/tasks/counts", { collection: a, ids: Ae.split(",") })
|
|
3619
3619
|
).then((e) => e.data ?? {}),
|
|
3620
|
-
enabled: !!a &&
|
|
3620
|
+
enabled: !!a && cl && Ae.length > 0,
|
|
3621
3621
|
placeholderData: (e) => e,
|
|
3622
3622
|
staleTime: 3e4,
|
|
3623
3623
|
retry: !1
|
|
@@ -3630,17 +3630,17 @@ function vp({
|
|
|
3630
3630
|
placeholderData: (e) => e,
|
|
3631
3631
|
staleTime: 3e4,
|
|
3632
3632
|
retry: !1
|
|
3633
|
-
}), { data:
|
|
3633
|
+
}), { data: ro = [] } = re({
|
|
3634
3634
|
queryKey: ["cbv-integrations-collections"],
|
|
3635
3635
|
queryFn: () => p.request(ee("/integration-obligations/collections")).then((e) => e.data ?? []).catch(() => []),
|
|
3636
3636
|
staleTime: 6e4,
|
|
3637
3637
|
retry: !1
|
|
3638
|
-
}),
|
|
3638
|
+
}), ul = ro.includes(a), { data: Ga } = re({
|
|
3639
3639
|
queryKey: ["cbv-integrations-summary", a, Ae],
|
|
3640
3640
|
queryFn: () => p.request(
|
|
3641
3641
|
ve("/integration-obligations/summary", { collection: a, ids: Ae.split(",") })
|
|
3642
3642
|
).then((e) => e.data ?? {}).catch(() => ({})),
|
|
3643
|
-
enabled: !!a &&
|
|
3643
|
+
enabled: !!a && ul && Ae.length > 0,
|
|
3644
3644
|
placeholderData: (e) => e,
|
|
3645
3645
|
staleTime: 3e4,
|
|
3646
3646
|
retry: !1
|
|
@@ -3653,42 +3653,42 @@ function vp({
|
|
|
3653
3653
|
placeholderData: (e) => e,
|
|
3654
3654
|
staleTime: 3e4,
|
|
3655
3655
|
retry: !1
|
|
3656
|
-
}), ta = (
|
|
3656
|
+
}), ta = (Il = $e == null ? void 0 : $e.binding) == null ? void 0 : Il.template, { data: Mt } = re({
|
|
3657
3657
|
queryKey: ["cbv-pipeline-template", ta, Pt ? "full" : "outline"],
|
|
3658
3658
|
queryFn: () => p.request(ee(Pt ? `/pipelines/${ta}` : `/pipelines/${ta}/outline`)).then((e) => e.data),
|
|
3659
3659
|
enabled: !!ta,
|
|
3660
3660
|
retry: !1
|
|
3661
|
-
}),
|
|
3661
|
+
}), lo = !!($e != null && $e.binding), { data: Xa } = re({
|
|
3662
3662
|
queryKey: ["cbv-owners", a, Ae],
|
|
3663
3663
|
queryFn: () => p.request(
|
|
3664
3664
|
ve(`/pipelines/instance/${a}/owners/batch`, {
|
|
3665
3665
|
ids: Ae.split(",").filter(Boolean)
|
|
3666
3666
|
})
|
|
3667
3667
|
).then((e) => e.data ?? {}),
|
|
3668
|
-
enabled:
|
|
3668
|
+
enabled: lo && Ae.length > 0,
|
|
3669
3669
|
staleTime: 6e4,
|
|
3670
3670
|
retry: !1
|
|
3671
|
-
}),
|
|
3671
|
+
}), pl = ue(
|
|
3672
3672
|
() => me.filter((e) => e.includes(".")),
|
|
3673
3673
|
[me]
|
|
3674
|
-
),
|
|
3675
|
-
() => me.filter((e) => e.startsWith("__f:")).flatMap((e) =>
|
|
3674
|
+
), ml = ue(
|
|
3675
|
+
() => me.filter((e) => e.startsWith("__f:")).flatMap((e) => mi(X[e] ?? "")).filter((e) => e.includes(".")),
|
|
3676
3676
|
[me, X]
|
|
3677
3677
|
), na = ue(
|
|
3678
|
-
() => [.../* @__PURE__ */ new Set([...
|
|
3678
|
+
() => [.../* @__PURE__ */ new Set([...pl, ...Object.values(ze), ...ml])].slice(
|
|
3679
3679
|
0,
|
|
3680
3680
|
20
|
|
3681
3681
|
),
|
|
3682
|
-
[
|
|
3683
|
-
),
|
|
3684
|
-
queryKey: ["cbv-resolved", a,
|
|
3682
|
+
[pl, ze, ml]
|
|
3683
|
+
), fl = ge.map((e) => String(e.id)).join(","), { data: ye } = re({
|
|
3684
|
+
queryKey: ["cbv-resolved", a, fl, na.join(",")],
|
|
3685
3685
|
queryFn: () => p.request(
|
|
3686
3686
|
ee(`/items/${a}/resolve-paths`, {
|
|
3687
|
-
ids:
|
|
3687
|
+
ids: fl,
|
|
3688
3688
|
paths: na.join(",")
|
|
3689
3689
|
})
|
|
3690
3690
|
).then((e) => e.data ?? { rows: {}, targets: {} }),
|
|
3691
|
-
enabled:
|
|
3691
|
+
enabled: ge.length > 0 && na.length > 0,
|
|
3692
3692
|
staleTime: 3e4,
|
|
3693
3693
|
retry: !1
|
|
3694
3694
|
}), ht = (e, t) => {
|
|
@@ -3697,11 +3697,11 @@ function vp({
|
|
|
3697
3697
|
if (!r) return null;
|
|
3698
3698
|
const l = (f = (d = (s = ye == null ? void 0 : ye.rows) == null ? void 0 : s[String(e)]) == null ? void 0 : d[r]) == null ? void 0 : f.value;
|
|
3699
3699
|
return l == null || l === "" ? "—" : l;
|
|
3700
|
-
},
|
|
3700
|
+
}, bl = (e) => {
|
|
3701
3701
|
var r;
|
|
3702
3702
|
const t = e.includes(".") ? e : ze[e];
|
|
3703
3703
|
return t ? ((r = ye == null ? void 0 : ye.targets) == null ? void 0 : r[t]) ?? null : null;
|
|
3704
|
-
},
|
|
3704
|
+
}, so = (e, t) => {
|
|
3705
3705
|
var d, f, x, g;
|
|
3706
3706
|
const r = t.includes(".") ? t : ze[t];
|
|
3707
3707
|
if (!r) return null;
|
|
@@ -3712,7 +3712,7 @@ function vp({
|
|
|
3712
3712
|
const t = et(We, a, e);
|
|
3713
3713
|
if (t != null && t.one_collection)
|
|
3714
3714
|
return Nt(t.one_collection) && t.one_collection !== "nivaro_users" ? null : { kind: "in", target: t.one_collection };
|
|
3715
|
-
const r =
|
|
3715
|
+
const r = Jr[e];
|
|
3716
3716
|
if (r) {
|
|
3717
3717
|
if (r.kind === "m2m") return { kind: "in", target: r.target };
|
|
3718
3718
|
const s = ze[e];
|
|
@@ -3723,14 +3723,14 @@ function vp({
|
|
|
3723
3723
|
}, Ie = (e, t) => jt((r) => {
|
|
3724
3724
|
const l = { ...r };
|
|
3725
3725
|
return t ? l[e] = t : delete l[e], l;
|
|
3726
|
-
}),
|
|
3726
|
+
}), oo = (e) => {
|
|
3727
3727
|
var f, x, g, Q;
|
|
3728
3728
|
const { key: t, row: r, cellText: l } = e, s = r.id;
|
|
3729
3729
|
if (t === "__state__") {
|
|
3730
3730
|
const A = (f = $e == null ? void 0 : $e.instances) == null ? void 0 : f[String(s)];
|
|
3731
3731
|
if (!(A != null && A.state_key)) return;
|
|
3732
|
-
const Ne = Ke.__state__,
|
|
3733
|
-
Ie("__state__", { kind: "state", value: [.../* @__PURE__ */ new Set([...
|
|
3732
|
+
const Ne = Ke.__state__, P = (Ne == null ? void 0 : Ne.kind) === "state" ? Ne.value : [];
|
|
3733
|
+
Ie("__state__", { kind: "state", value: [.../* @__PURE__ */ new Set([...P, A.state_key])] });
|
|
3734
3734
|
return;
|
|
3735
3735
|
}
|
|
3736
3736
|
const d = pn(t);
|
|
@@ -3738,7 +3738,7 @@ function vp({
|
|
|
3738
3738
|
if (d.kind === "in") {
|
|
3739
3739
|
const Ne = et(We, a, t) ? r[t] != null ? [r[t]] : [] : ((Q = (g = (x = ye == null ? void 0 : ye.rows) == null ? void 0 : x[String(s)]) == null ? void 0 : g[ze[t]]) == null ? void 0 : Q.ids) ?? [];
|
|
3740
3740
|
if (Ne.length === 0) return;
|
|
3741
|
-
const
|
|
3741
|
+
const P = Ke[t], U = (P == null ? void 0 : P.kind) === "in" ? P.value : [];
|
|
3742
3742
|
Ie(t, { kind: "in", value: [.../* @__PURE__ */ new Set([...U, ...Ne])] });
|
|
3743
3743
|
return;
|
|
3744
3744
|
}
|
|
@@ -3768,11 +3768,11 @@ function vp({
|
|
|
3768
3768
|
A && Ie(t, { kind: "date", value: `r:${A}..${A}` });
|
|
3769
3769
|
}
|
|
3770
3770
|
}
|
|
3771
|
-
},
|
|
3771
|
+
}, io = (e, t) => {
|
|
3772
3772
|
if (e === "__state__") return !1;
|
|
3773
3773
|
const r = pn(e);
|
|
3774
3774
|
return r ? r.kind === "in" ? !!et(We, a, e) && t[e] != null : r.kind === "enum" || r.kind === "num" ? t[e] != null && t[e] !== "" : r.kind === "text" : !1;
|
|
3775
|
-
},
|
|
3775
|
+
}, co = (e) => {
|
|
3776
3776
|
const { key: t, row: r, cellText: l } = e, s = r.id, d = pn(t);
|
|
3777
3777
|
if (!d) return;
|
|
3778
3778
|
let f = null;
|
|
@@ -3786,20 +3786,20 @@ function vp({
|
|
|
3786
3786
|
g && g !== "—" && (f = { id: x, path: d.path, op: "_ncontains", value: g, label: g, field: t });
|
|
3787
3787
|
}
|
|
3788
3788
|
f && Sr((g) => [...g, f]);
|
|
3789
|
-
},
|
|
3789
|
+
}, uo = (e) => {
|
|
3790
3790
|
var l, s, d;
|
|
3791
3791
|
const t = pn(e);
|
|
3792
3792
|
if (!t) return null;
|
|
3793
3793
|
const r = Ke[e];
|
|
3794
3794
|
if (t.kind === "in") {
|
|
3795
3795
|
const f = /* @__PURE__ */ new Set(), x = ze[e];
|
|
3796
|
-
for (const g of
|
|
3796
|
+
for (const g of ge)
|
|
3797
3797
|
if (x)
|
|
3798
3798
|
for (const Q of ((d = (s = (l = ye == null ? void 0 : ye.rows) == null ? void 0 : l[String(g.id)]) == null ? void 0 : s[x]) == null ? void 0 : d.ids) ?? [])
|
|
3799
3799
|
f.add(Q);
|
|
3800
3800
|
else g[e] != null && g[e] !== "" && typeof g[e] != "object" && f.add(g[e]);
|
|
3801
3801
|
return /* @__PURE__ */ n(
|
|
3802
|
-
|
|
3802
|
+
Tc,
|
|
3803
3803
|
{
|
|
3804
3804
|
target: t.target,
|
|
3805
3805
|
selected: (r == null ? void 0 : r.kind) === "in" ? r.value : [],
|
|
@@ -3810,7 +3810,7 @@ function vp({
|
|
|
3810
3810
|
}
|
|
3811
3811
|
if (t.kind === "enum")
|
|
3812
3812
|
return /* @__PURE__ */ n(
|
|
3813
|
-
|
|
3813
|
+
Lc,
|
|
3814
3814
|
{
|
|
3815
3815
|
collection: a,
|
|
3816
3816
|
field: e,
|
|
@@ -3840,7 +3840,7 @@ function vp({
|
|
|
3840
3840
|
{
|
|
3841
3841
|
value: f,
|
|
3842
3842
|
onChange: (g) => Ie(e, { kind: "num", op: g, value: x }),
|
|
3843
|
-
options:
|
|
3843
|
+
options: Ns.map((g) => ({ value: g.value, label: g.label })),
|
|
3844
3844
|
ariaLabel: `Filter operator ${e}`
|
|
3845
3845
|
}
|
|
3846
3846
|
),
|
|
@@ -3870,13 +3870,13 @@ function vp({
|
|
|
3870
3870
|
className: "w-full"
|
|
3871
3871
|
}
|
|
3872
3872
|
) : t.kind === "date" ? /* @__PURE__ */ n(
|
|
3873
|
-
|
|
3873
|
+
Fc,
|
|
3874
3874
|
{
|
|
3875
3875
|
value: (r == null ? void 0 : r.kind) === "date" ? r.value : "",
|
|
3876
3876
|
onChange: (f) => Ie(e, f ? { kind: "date", value: f } : null)
|
|
3877
3877
|
}
|
|
3878
3878
|
) : null;
|
|
3879
|
-
},
|
|
3879
|
+
}, po = me.some((e) => pn(e) != null), hl = (e) => {
|
|
3880
3880
|
var r, l;
|
|
3881
3881
|
if (((r = I[e]) == null ? void 0 : r.type) === "number") return !0;
|
|
3882
3882
|
if (e.includes(".") || e in ze || et(We, a, e)) return !1;
|
|
@@ -3886,20 +3886,20 @@ function vp({
|
|
|
3886
3886
|
var s, d, f;
|
|
3887
3887
|
const l = I[t];
|
|
3888
3888
|
if ((l == null ? void 0 : l.type) === "count") {
|
|
3889
|
-
const x = t.includes(".") ? t : ze[t], g = r != null && x ? (f = (d = (s = ye == null ? void 0 : ye.rows) == null ? void 0 : s[String(r)]) == null ? void 0 : d[x]) == null ? void 0 : f.ids : void 0, Q =
|
|
3889
|
+
const x = t.includes(".") ? t : ze[t], g = r != null && x ? (f = (d = (s = ye == null ? void 0 : ye.rows) == null ? void 0 : s[String(r)]) == null ? void 0 : d[x]) == null ? void 0 : f.ids : void 0, Q = xi(e === "—" ? "" : e, g);
|
|
3890
3890
|
return String(Q);
|
|
3891
3891
|
}
|
|
3892
|
-
return l && e && e !== "—" ?
|
|
3893
|
-
},
|
|
3894
|
-
const t =
|
|
3892
|
+
return l && e && e !== "—" ? es(e, l) : e;
|
|
3893
|
+
}, gl = (e) => {
|
|
3894
|
+
const t = bl(e);
|
|
3895
3895
|
return !!t && (t === "nivaro_files" || /_files$/.test(t));
|
|
3896
3896
|
}, { data: at = [] } = re({
|
|
3897
3897
|
queryKey: ["cbv-views", a],
|
|
3898
3898
|
queryFn: () => p.request(ee("/saved-views", { collection: a })).then((e) => e.data ?? []),
|
|
3899
3899
|
staleTime: 3e4
|
|
3900
|
-
}), fn = () => _.invalidateQueries({ queryKey: ["cbv-views", a] }),
|
|
3900
|
+
}), fn = () => _.invalidateQueries({ queryKey: ["cbv-views", a] }), mo = ua({
|
|
3901
3901
|
queries: at.slice(0, 12).map((e) => {
|
|
3902
|
-
const t =
|
|
3902
|
+
const t = hs(e.filters ?? []);
|
|
3903
3903
|
return {
|
|
3904
3904
|
queryKey: ["cbv-view-count", a, e.id, JSON.stringify(t)],
|
|
3905
3905
|
queryFn: () => p.request(
|
|
@@ -3917,47 +3917,47 @@ function vp({
|
|
|
3917
3917
|
}), Za = /* @__PURE__ */ new Map();
|
|
3918
3918
|
at.slice(0, 12).forEach((e, t) => {
|
|
3919
3919
|
var r;
|
|
3920
|
-
Za.set(e.id, ((r =
|
|
3920
|
+
Za.set(e.id, ((r = mo[t]) == null ? void 0 : r.data) ?? null);
|
|
3921
3921
|
});
|
|
3922
|
-
const [
|
|
3922
|
+
const [xl, fo] = y(() => /* @__PURE__ */ new Set()), aa = (e) => {
|
|
3923
3923
|
var r, l;
|
|
3924
3924
|
$n(e.id);
|
|
3925
|
-
const t =
|
|
3926
|
-
if (
|
|
3925
|
+
const t = ls(e.filters ?? []);
|
|
3926
|
+
if (De(t.filters), Yn(t.riskIds), we(e.sort ?? ""), (r = e.columns) != null && r.length) {
|
|
3927
3927
|
const s = new Set(
|
|
3928
|
-
e.columns.filter((u) => typeof u != "string" && u.admin_only).map(
|
|
3928
|
+
e.columns.filter((u) => typeof u != "string" && u.admin_only).map(ms)
|
|
3929
3929
|
);
|
|
3930
|
-
|
|
3931
|
-
const d = e.columns.map(
|
|
3930
|
+
fo(s);
|
|
3931
|
+
const d = e.columns.map(ms).filter((u) => Pt || !s.has(u)), f = {};
|
|
3932
3932
|
for (const u of e.columns)
|
|
3933
3933
|
typeof u != "string" && u.formula && u.key.startsWith("__f:") && (f[u.key] = u.formula);
|
|
3934
3934
|
_e(f);
|
|
3935
3935
|
const x = d.filter((u) => u.includes(".") || yt.has(u) || !!f[u]);
|
|
3936
|
-
x.length > 0 &&
|
|
3936
|
+
x.length > 0 && be(x);
|
|
3937
3937
|
const g = {}, Q = {}, A = {};
|
|
3938
3938
|
let Ne = !1;
|
|
3939
|
-
const
|
|
3939
|
+
const P = {}, U = {}, J = {};
|
|
3940
3940
|
for (const u of e.columns)
|
|
3941
|
-
typeof u != "string" && u.label && (g[u.key] = u.label), typeof u != "string" && u.format && (Q[u.key] = u.format), typeof u != "string" && u.pin && (Ne = !0, u.pin !== "none" && (A[u.key] = u.pin)), typeof u != "string" && ((l = u.tint) != null && l.length) && (
|
|
3942
|
-
Rt(J), R(g), se(Q), tt(
|
|
3941
|
+
typeof u != "string" && u.label && (g[u.key] = u.label), typeof u != "string" && u.format && (Q[u.key] = u.format), typeof u != "string" && u.pin && (Ne = !0, u.pin !== "none" && (A[u.key] = u.pin)), typeof u != "string" && ((l = u.tint) != null && l.length) && (P[u.key] = u.tint), typeof u != "string" && u.width && (U[u.key] = u.width), typeof u != "string" && u.agg && (J[u.key] = u.agg);
|
|
3942
|
+
Rt(J), R(g), se(Q), tt(P), V(U), Hn(Ne ? A : null);
|
|
3943
3943
|
} else
|
|
3944
3944
|
Hn(null);
|
|
3945
3945
|
O(1);
|
|
3946
|
-
},
|
|
3946
|
+
}, vl = () => {
|
|
3947
3947
|
const e = at.find((t) => t.role_default) ?? at.find((t) => t.is_default);
|
|
3948
3948
|
if (e) {
|
|
3949
3949
|
aa(e);
|
|
3950
3950
|
return;
|
|
3951
3951
|
}
|
|
3952
|
-
$n(null),
|
|
3952
|
+
$n(null), De([]), Yn([]), we(i ?? ""), be(b ?? null), R({}), _e({}), se({}), Rt({}), Hn(null), O(1);
|
|
3953
3953
|
}, Dn = () => ({
|
|
3954
3954
|
// The pressed highlight pills ride along as one `$at_risk` filter entry.
|
|
3955
|
-
filters: [...H, ...[
|
|
3955
|
+
filters: [...H, ...[Od(Lt, ea)].filter((e) => e !== null)],
|
|
3956
3956
|
sort: ie,
|
|
3957
3957
|
columns: [
|
|
3958
3958
|
...me.map((e, t) => {
|
|
3959
3959
|
const r = st[e], l = I[e], s = Ln[e] ?? (t === 0 && Fa !== null ? "none" : void 0), d = He[e], f = At[e], x = ot[e], g = X[e];
|
|
3960
|
-
return !r && !l && !s && !(d != null && d.length) && !f && !x && !g && !
|
|
3960
|
+
return !r && !l && !s && !(d != null && d.length) && !f && !x && !g && !xl.has(e) ? e : {
|
|
3961
3961
|
key: e,
|
|
3962
3962
|
...g ? { formula: g } : {},
|
|
3963
3963
|
...r ? { label: r } : {},
|
|
@@ -3966,7 +3966,7 @@ function vp({
|
|
|
3966
3966
|
...d != null && d.length ? { tint: d } : {},
|
|
3967
3967
|
...f ? { width: f } : {},
|
|
3968
3968
|
...x ? { agg: x } : {},
|
|
3969
|
-
...
|
|
3969
|
+
...xl.has(e) ? { admin_only: !0 } : {}
|
|
3970
3970
|
};
|
|
3971
3971
|
}),
|
|
3972
3972
|
// Synthetic columns (State/Owners/Actions) persist pins as pin-only
|
|
@@ -3990,13 +3990,13 @@ function vp({
|
|
|
3990
3990
|
const e = at.find((t) => t.role_default) ?? at.find((t) => t.is_default);
|
|
3991
3991
|
e && Bt == null && aa(e);
|
|
3992
3992
|
}, [at, $t]);
|
|
3993
|
-
const { data:
|
|
3993
|
+
const { data: kl = [] } = re({
|
|
3994
3994
|
queryKey: ["cbv-export-presets", a],
|
|
3995
3995
|
queryFn: () => p.request(
|
|
3996
3996
|
ee("/export-presets", { collection: a })
|
|
3997
3997
|
).then((e) => e.data ?? []),
|
|
3998
3998
|
staleTime: 6e4
|
|
3999
|
-
}), [ra,
|
|
3999
|
+
}), [ra, yl] = y(""), wl = async () => {
|
|
4000
4000
|
ra.trim() && (await p.request(
|
|
4001
4001
|
ve("/export-presets", {
|
|
4002
4002
|
collection: a,
|
|
@@ -4007,31 +4007,31 @@ function vp({
|
|
|
4007
4007
|
},
|
|
4008
4008
|
is_shared: !0
|
|
4009
4009
|
})
|
|
4010
|
-
),
|
|
4011
|
-
},
|
|
4010
|
+
), yl(""), _.invalidateQueries({ queryKey: ["cbv-export-presets", a] }));
|
|
4011
|
+
}, bo = (e) => {
|
|
4012
4012
|
const t = new URLSearchParams();
|
|
4013
|
-
K && t.set("search", K),
|
|
4014
|
-
},
|
|
4013
|
+
K && t.set("search", K), he && t.set("conditions", he), ie && t.set("sort", ie), window.open(`/api/export-presets/${e}/run?${t.toString()}`, "_blank");
|
|
4014
|
+
}, ho = (e, t) => {
|
|
4015
4015
|
p.request(
|
|
4016
4016
|
ve(`/export-presets/${e}/run-async`, {
|
|
4017
4017
|
...K ? { search: K } : {},
|
|
4018
|
-
...
|
|
4018
|
+
...he ? { conditions: he } : {},
|
|
4019
4019
|
...ie ? { sort: ie } : {}
|
|
4020
4020
|
})
|
|
4021
|
-
).then(() =>
|
|
4022
|
-
},
|
|
4021
|
+
).then(() => xe.info(`Exporting “${t}” in the background — follow it in the Jobs tray`)).catch((r) => xe.error(Wt(r, "Could not start the export")));
|
|
4022
|
+
}, _l = fe(!1);
|
|
4023
4023
|
pe(() => {
|
|
4024
4024
|
var e;
|
|
4025
|
-
|
|
4025
|
+
_l.current || !m || $t.length === 0 || (_l.current = !0, (e = m.c) != null && e.length && (aa({
|
|
4026
4026
|
id: -1,
|
|
4027
4027
|
filters: m.f ?? [],
|
|
4028
4028
|
sort: m.s ?? null,
|
|
4029
4029
|
columns: m.c
|
|
4030
4030
|
}), $n(null), O(m.p ?? 1)));
|
|
4031
4031
|
}, [$t]), pe(() => {
|
|
4032
|
-
m &&
|
|
4032
|
+
m && Fi();
|
|
4033
4033
|
}, []);
|
|
4034
|
-
const
|
|
4034
|
+
const go = () => {
|
|
4035
4035
|
const e = Dn();
|
|
4036
4036
|
return {
|
|
4037
4037
|
q: K,
|
|
@@ -4054,23 +4054,23 @@ function vp({
|
|
|
4054
4054
|
onSuccess: (e) => {
|
|
4055
4055
|
wa(!1), _a(""), $n(e.data.id), fn();
|
|
4056
4056
|
}
|
|
4057
|
-
}), [er,
|
|
4057
|
+
}), [er, Nl] = y(null), Ot = vt({
|
|
4058
4058
|
mutationFn: (e) => p.request(da(`/saved-views/${e}`, Dn())),
|
|
4059
4059
|
onSuccess: (e, t) => {
|
|
4060
4060
|
var l;
|
|
4061
|
-
fn(),
|
|
4061
|
+
fn(), Nl(t), setTimeout(() => Nl((s) => s === t ? null : s), 2e3);
|
|
4062
4062
|
const r = (l = at.find((s) => s.id === t)) == null ? void 0 : l.name;
|
|
4063
|
-
|
|
4063
|
+
xe.success(r ? `Saved "${r}" with the current columns and filters` : "View saved");
|
|
4064
4064
|
},
|
|
4065
|
-
onError: (e) =>
|
|
4066
|
-
}),
|
|
4065
|
+
onError: (e) => xe.error(`Could not save the view: ${e.message}`)
|
|
4066
|
+
}), xo = vt({
|
|
4067
4067
|
mutationFn: ({ id: e, on: t }) => p.request(da(`/saved-views/${e}`, { is_default: t })),
|
|
4068
4068
|
onSuccess: fn
|
|
4069
|
-
}),
|
|
4069
|
+
}), vo = vt({
|
|
4070
4070
|
mutationFn: ({ id: e, role: t }) => p.request(da(`/saved-views/${e}`, { default_for_role: t })),
|
|
4071
4071
|
onSuccess: fn,
|
|
4072
|
-
onError: (e) =>
|
|
4073
|
-
}),
|
|
4072
|
+
onError: (e) => xe.error(`Could not set the role default: ${e.message}`)
|
|
4073
|
+
}), Sl = vt({
|
|
4074
4074
|
mutationFn: () => {
|
|
4075
4075
|
const e = at.find((t) => t.is_default);
|
|
4076
4076
|
return e ? p.request(da(`/saved-views/${e.id}`, { ...Dn(), is_default: !0 })) : p.request(
|
|
@@ -4080,37 +4080,37 @@ function vp({
|
|
|
4080
4080
|
onSuccess: () => {
|
|
4081
4081
|
Ht(!1), fn();
|
|
4082
4082
|
}
|
|
4083
|
-
}),
|
|
4083
|
+
}), Cl = vt({
|
|
4084
4084
|
mutationFn: (e) => p.request(pa(`/items/${a}/${e}`)),
|
|
4085
4085
|
onSuccess: () => void _.invalidateQueries({ queryKey: ["cbv-items", a] })
|
|
4086
|
-
}),
|
|
4086
|
+
}), ko = vt({
|
|
4087
4087
|
mutationFn: (e) => p.request(pa(`/saved-views/${e}`)),
|
|
4088
4088
|
onSuccess: (e, t) => {
|
|
4089
|
-
Bt === t &&
|
|
4089
|
+
Bt === t && vl(), fn();
|
|
4090
4090
|
}
|
|
4091
|
-
}), { data:
|
|
4091
|
+
}), { data: yo = [] } = re({
|
|
4092
4092
|
queryKey: ["cbv-view-subs"],
|
|
4093
4093
|
queryFn: () => p.request(ee("/view-subscriptions")).then((e) => e.data ?? []).catch(() => []),
|
|
4094
4094
|
staleTime: 6e4
|
|
4095
|
-
}), sa = (e) =>
|
|
4095
|
+
}), sa = (e) => yo.find((t) => t.view_id === e), wo = vt({
|
|
4096
4096
|
mutationFn: async (e) => {
|
|
4097
4097
|
const t = sa(e);
|
|
4098
4098
|
return t ? p.request(pa(`/view-subscriptions/${t.id}`)) : p.request(ve("/view-subscriptions", { view_id: e, digest: "daily" }));
|
|
4099
4099
|
},
|
|
4100
4100
|
onSuccess: () => _.invalidateQueries({ queryKey: ["cbv-view-subs"] })
|
|
4101
|
-
}),
|
|
4101
|
+
}), _o = async () => {
|
|
4102
4102
|
var e, t;
|
|
4103
4103
|
if (!Na) {
|
|
4104
4104
|
Cr(!0);
|
|
4105
4105
|
try {
|
|
4106
|
-
const { rows: r, truncated: l } = await
|
|
4106
|
+
const { rows: r, truncated: l } = await $d(
|
|
4107
4107
|
(G, ne) => p.request(
|
|
4108
4108
|
ee(`/items/${a}`, {
|
|
4109
4109
|
limit: ne,
|
|
4110
4110
|
offset: G,
|
|
4111
4111
|
...K ? { search: K } : {},
|
|
4112
|
-
sort:
|
|
4113
|
-
...
|
|
4112
|
+
sort: qd(ie),
|
|
4113
|
+
...he ? { conditions: he } : {}
|
|
4114
4114
|
})
|
|
4115
4115
|
)
|
|
4116
4116
|
), s = me, d = [], f = [];
|
|
@@ -4118,12 +4118,12 @@ function vp({
|
|
|
4118
4118
|
if (G.includes(".") || G.startsWith("__") || G in ze) continue;
|
|
4119
4119
|
const ne = (e = et(We, a, G)) == null ? void 0 : e.one_collection;
|
|
4120
4120
|
if (!ne) continue;
|
|
4121
|
-
if (
|
|
4121
|
+
if (ws.has(ne)) {
|
|
4122
4122
|
f.push(G);
|
|
4123
4123
|
continue;
|
|
4124
4124
|
}
|
|
4125
4125
|
if (Nt(ne)) continue;
|
|
4126
|
-
const
|
|
4126
|
+
const Re = await _.fetchQuery({
|
|
4127
4127
|
queryKey: ["cbv-collection-meta", ne],
|
|
4128
4128
|
queryFn: () => p.request(ee(`/collections/${ne}`)).then((T) => T.data),
|
|
4129
4129
|
staleTime: 10 * 6e4
|
|
@@ -4131,11 +4131,11 @@ function vp({
|
|
|
4131
4131
|
});
|
|
4132
4132
|
d.push({
|
|
4133
4133
|
column: G,
|
|
4134
|
-
template: (
|
|
4135
|
-
labelField: An(
|
|
4134
|
+
template: (Re == null ? void 0 : Re.display_template) ?? null,
|
|
4135
|
+
labelField: An(Re)
|
|
4136
4136
|
});
|
|
4137
4137
|
}
|
|
4138
|
-
const x = [.../* @__PURE__ */ new Set([...na, ...d.flatMap(
|
|
4138
|
+
const x = [.../* @__PURE__ */ new Set([...na, ...d.flatMap(Td)])], g = await Ld(
|
|
4139
4139
|
r.map((G) => String(G.id)),
|
|
4140
4140
|
x,
|
|
4141
4141
|
(G, ne) => p.request(
|
|
@@ -4143,9 +4143,9 @@ function vp({
|
|
|
4143
4143
|
ids: G.join(","),
|
|
4144
4144
|
paths: ne.join(",")
|
|
4145
4145
|
})
|
|
4146
|
-
).then((
|
|
4146
|
+
).then((Re) => {
|
|
4147
4147
|
var T;
|
|
4148
|
-
return ((T =
|
|
4148
|
+
return ((T = Re.data) == null ? void 0 : T.rows) ?? {};
|
|
4149
4149
|
})
|
|
4150
4150
|
), Q = [
|
|
4151
4151
|
...new Set(
|
|
@@ -4154,72 +4154,72 @@ function vp({
|
|
|
4154
4154
|
].map(String), A = /* @__PURE__ */ new Map();
|
|
4155
4155
|
await Promise.all(
|
|
4156
4156
|
Q.map(
|
|
4157
|
-
(G) =>
|
|
4157
|
+
(G) => cd(p, G).then((ne) => A.set(G.toUpperCase(), Fd(ne, G))).catch(() => A.set(G.toUpperCase(), G))
|
|
4158
4158
|
)
|
|
4159
4159
|
);
|
|
4160
|
-
const Ne = new Map(d.map((G) => [G.column, G])),
|
|
4160
|
+
const Ne = new Map(d.map((G) => [G.column, G])), P = new Set(f), U = (G) => {
|
|
4161
4161
|
const ne = G == null ? "" : String(typeof G == "object" ? JSON.stringify(G) : G);
|
|
4162
4162
|
return /[",\n]/.test(ne) ? `"${ne.replace(/"/g, '""')}"` : ne;
|
|
4163
4163
|
}, J = (G, ne) => {
|
|
4164
4164
|
var Y, ce;
|
|
4165
|
-
const
|
|
4165
|
+
const Re = I[ne];
|
|
4166
4166
|
if (ne.startsWith("__f:")) {
|
|
4167
|
-
const ae = X[ne], Se = ae ?
|
|
4168
|
-
var ia,
|
|
4169
|
-
const ct = lt.includes(".") ? (
|
|
4167
|
+
const ae = X[ne], Se = ae ? Zl(ae, (lt) => {
|
|
4168
|
+
var ia, Hl;
|
|
4169
|
+
const ct = lt.includes(".") ? (Hl = (ia = g[String(G.id)]) == null ? void 0 : ia[lt]) == null ? void 0 : Hl.value : G[lt];
|
|
4170
4170
|
return typeof ct == "string" && /^-?\d+(\.\d+)?$/.test(ct.trim()) ? Number(ct) : ct;
|
|
4171
4171
|
}) : null;
|
|
4172
|
-
return Se == null ? "" :
|
|
4172
|
+
return Se == null ? "" : Re ? hn(String(Se), Re) : Math.round(Se * 100) / 100;
|
|
4173
4173
|
}
|
|
4174
4174
|
if (ne.includes(".") || ne in ze) {
|
|
4175
4175
|
const ae = ne.includes(".") ? ne : ze[ne], Se = ((ce = (Y = g[String(G.id)]) == null ? void 0 : Y[ae]) == null ? void 0 : ce.value) ?? "";
|
|
4176
|
-
return
|
|
4176
|
+
return Re && Se ? es(Se, Re) : Se;
|
|
4177
4177
|
}
|
|
4178
4178
|
const T = G[ne], Ve = Ne.get(ne);
|
|
4179
|
-
return Ve && T != null && T !== "" ?
|
|
4179
|
+
return Ve && T != null && T !== "" ? Rd(Ve, g[String(G.id)]) || T : P.has(ne) && T != null && T !== "" ? A.get(String(T).toUpperCase()) ?? T : Re && T != null ? hn(String(T), Re) : T;
|
|
4180
4180
|
}, u = [
|
|
4181
4181
|
["id", ...s.map((G) => Ze(G))].map(U).join(","),
|
|
4182
4182
|
...r.map((G) => [G.id, ...s.map((ne) => J(G, ne))].map(U).join(","))
|
|
4183
4183
|
];
|
|
4184
4184
|
l && (u.push(""), u.push(
|
|
4185
4185
|
U(
|
|
4186
|
-
`First ${r.length.toLocaleString()} of ${
|
|
4186
|
+
`First ${r.length.toLocaleString()} of ${Le.toLocaleString()} rows — narrow the filter to export the rest`
|
|
4187
4187
|
)
|
|
4188
|
-
)),
|
|
4188
|
+
)), D != null && D.export_watermark && (u.push(""), u.push(
|
|
4189
4189
|
U(`Exported ${(/* @__PURE__ */ new Date()).toISOString()} · ${r.length} rows · ${a} · Nivaro`)
|
|
4190
4190
|
)), p.request(
|
|
4191
4191
|
ve("/activity/export-log", {
|
|
4192
4192
|
collection: a,
|
|
4193
4193
|
row_count: r.length,
|
|
4194
4194
|
format: "csv",
|
|
4195
|
-
filters:
|
|
4195
|
+
filters: he ? JSON.parse(he) : void 0
|
|
4196
4196
|
})
|
|
4197
4197
|
).catch(() => {
|
|
4198
4198
|
});
|
|
4199
4199
|
const dt = new Blob([u.join(`
|
|
4200
4200
|
`)], { type: "text/csv;charset=utf-8" }), Qe = URL.createObjectURL(dt), gt = document.createElement("a");
|
|
4201
4201
|
gt.href = Qe;
|
|
4202
|
-
const xt =
|
|
4203
|
-
gt.download = xt ? `${xt.replace(/\{\{\s*collection\s*\}\}/g, a).replace(/\{\{\s*view\s*\}\}/g, nn).replace(/\{\{\s*date\s*\}\}/g,
|
|
4204
|
-
description: `${
|
|
4202
|
+
const xt = qe.export_filename, nn = ((t = at.find((G) => G.id === Bt)) == null ? void 0 : t.name) ?? "all";
|
|
4203
|
+
gt.download = xt ? `${xt.replace(/\{\{\s*collection\s*\}\}/g, a).replace(/\{\{\s*view\s*\}\}/g, nn).replace(/\{\{\s*date\s*\}\}/g, Ed()).replace(/[^A-Za-z0-9 ._-]/g, "")}.csv` : `${a}.csv`, gt.click(), setTimeout(() => URL.revokeObjectURL(Qe), 1e4), l && xe.warning(`Exported the first ${r.length.toLocaleString()} rows`, {
|
|
4204
|
+
description: `${Le.toLocaleString()} match — narrow the filter to export the rest.`
|
|
4205
4205
|
});
|
|
4206
4206
|
} catch (r) {
|
|
4207
|
-
|
|
4207
|
+
xe.error(Wt(r, "Export failed"));
|
|
4208
4208
|
} finally {
|
|
4209
4209
|
Cr(!1);
|
|
4210
4210
|
}
|
|
4211
4211
|
}
|
|
4212
|
-
},
|
|
4212
|
+
}, No = (e) => {
|
|
4213
4213
|
const t = `record:${a}:${String(e)}`;
|
|
4214
|
-
return
|
|
4214
|
+
return Wi(t, () => Vi(_, p, a, String(e), { group: t }));
|
|
4215
4215
|
}, bn = (e) => {
|
|
4216
4216
|
var t;
|
|
4217
|
-
((t = Zn.current) == null ? void 0 : t.key) === `${a}\0${K}` &&
|
|
4217
|
+
((t = Zn.current) == null ? void 0 : t.key) === `${a}\0${K}` && ad(p, Zn.current.id, {
|
|
4218
4218
|
type: "record",
|
|
4219
4219
|
collection: a,
|
|
4220
4220
|
item: e === "new" ? null : e
|
|
4221
4221
|
}), N ? N(e) : B({ collection: a, itemId: String(e) });
|
|
4222
|
-
},
|
|
4222
|
+
}, So = (e) => {
|
|
4223
4223
|
const t = et(We, a, e), r = (l) => {
|
|
4224
4224
|
ie === l ? we(`-${l}`) : ie === `-${l}` ? we("") : we(l), O(1);
|
|
4225
4225
|
};
|
|
@@ -4239,24 +4239,24 @@ function vp({
|
|
|
4239
4239
|
return;
|
|
4240
4240
|
}
|
|
4241
4241
|
r(e);
|
|
4242
|
-
}, tr =
|
|
4243
|
-
tr ? Jt.filter((e) => !
|
|
4244
|
-
),
|
|
4245
|
-
|
|
4242
|
+
}, tr = ge.length > 0 && ge.every((e) => Jt.includes(e.id)), Co = () => Gt(
|
|
4243
|
+
tr ? Jt.filter((e) => !ge.some((t) => t.id === e)) : [.../* @__PURE__ */ new Set([...Jt, ...ge.map((e) => e.id)])]
|
|
4244
|
+
), $o = (e) => Gt((t) => t.includes(e) ? t.filter((r) => r !== e) : [...t, e]), oa = 2e3, [$l, ql] = y(!1), qo = async () => {
|
|
4245
|
+
ql(!0);
|
|
4246
4246
|
try {
|
|
4247
4247
|
const e = await p.request(
|
|
4248
4248
|
ee(`/items/${a}`, {
|
|
4249
4249
|
limit: oa,
|
|
4250
4250
|
fields: "id",
|
|
4251
4251
|
...K ? { search: K } : {},
|
|
4252
|
-
...
|
|
4252
|
+
...he ? { conditions: he } : {}
|
|
4253
4253
|
})
|
|
4254
4254
|
);
|
|
4255
4255
|
Gt(e.data.map((t) => t.id));
|
|
4256
4256
|
} finally {
|
|
4257
|
-
|
|
4257
|
+
ql(!1);
|
|
4258
4258
|
}
|
|
4259
|
-
},
|
|
4259
|
+
}, To = Le === 0 && !en ? 0 : ($ - 1) * Xe + 1, Lo = en ? ($ - 1) * Xe + ge.length : Math.min($ * Xe, Le), Mn = !!($e != null && $e.instances), Tl = (qt ? 1 : 0) + (Mn ? 2 : 0) + (Er ? 1 : 0), nr = [
|
|
4260
4260
|
...me.map(
|
|
4261
4261
|
(e) => e.startsWith("__f:") ? { key: e, kind: "formula" } : { key: e, kind: "data" }
|
|
4262
4262
|
),
|
|
@@ -4270,23 +4270,23 @@ function vp({
|
|
|
4270
4270
|
] : [],
|
|
4271
4271
|
...Va ? [{ key: "__addendums__", kind: "addendums" }] : [],
|
|
4272
4272
|
...Oe ? [{ key: "__fulfilment__", kind: "fulfilment" }] : [],
|
|
4273
|
-
...
|
|
4274
|
-
...
|
|
4273
|
+
...ul ? [{ key: "__integrations__", kind: "integrations" }] : [],
|
|
4274
|
+
...cl ? [{ key: "__tasks__", kind: "tasks" }] : [],
|
|
4275
4275
|
...Er ? [{ key: "__actions__", kind: "actions" }] : []
|
|
4276
4276
|
], tn = [
|
|
4277
4277
|
...nr.filter((e) => wt(e.key) === "left"),
|
|
4278
4278
|
...nr.filter((e) => !wt(e.key)),
|
|
4279
4279
|
...nr.filter((e) => wt(e.key) === "right")
|
|
4280
|
-
],
|
|
4280
|
+
], Fo = tn.map((e) => {
|
|
4281
4281
|
if (e.kind === "data") {
|
|
4282
4282
|
const t = yt.get(e.key.split(".")[0]);
|
|
4283
|
-
return { key: e.key, shape:
|
|
4283
|
+
return { key: e.key, shape: rd(t == null ? void 0 : t.type, t == null ? void 0 : t.interface) };
|
|
4284
4284
|
}
|
|
4285
|
-
return { key: e.key, shape:
|
|
4286
|
-
}),
|
|
4285
|
+
return { key: e.key, shape: Qc[e.kind] ?? "short" };
|
|
4286
|
+
}), Ll = [
|
|
4287
4287
|
...Mn ? [{ key: "__state__", label: "State" }] : [],
|
|
4288
4288
|
...me.filter((e) => Qt(e) || !et(We, a, e)).map((e) => ({ key: e, label: Ze(e) }))
|
|
4289
|
-
],
|
|
4289
|
+
], Ro = (e) => {
|
|
4290
4290
|
var l;
|
|
4291
4291
|
if (!oe) return "";
|
|
4292
4292
|
const t = e.id;
|
|
@@ -4297,11 +4297,11 @@ function vp({
|
|
|
4297
4297
|
if (Qt(oe)) return ht(t, oe) || "(empty)";
|
|
4298
4298
|
const r = e[oe];
|
|
4299
4299
|
return r == null || r === "" ? "(empty)" : typeof r == "boolean" ? r ? "Yes" : "No" : mn(String(r), oe) || String(r);
|
|
4300
|
-
},
|
|
4301
|
-
if (!oe) return
|
|
4300
|
+
}, Eo = (() => {
|
|
4301
|
+
if (!oe) return ge.map((l) => ({ kind: "row", row: l }));
|
|
4302
4302
|
const e = /* @__PURE__ */ new Map();
|
|
4303
|
-
for (const l of
|
|
4304
|
-
const s =
|
|
4303
|
+
for (const l of ge) {
|
|
4304
|
+
const s = Ro(l), d = e.get(s) ?? [];
|
|
4305
4305
|
d.push(l), e.set(s, d);
|
|
4306
4306
|
}
|
|
4307
4307
|
const t = [...e.keys()].sort((l, s) => l === "(empty)" ? 1 : s === "(empty)" ? -1 : l.localeCompare(s, void 0, { numeric: !0 })), r = [];
|
|
@@ -4310,21 +4310,21 @@ function vp({
|
|
|
4310
4310
|
if (r.push({ kind: "header", gkey: l, label: l, count: s.length }), !ke.has(l)) for (const d of s) r.push({ kind: "row", row: d });
|
|
4311
4311
|
}
|
|
4312
4312
|
return r;
|
|
4313
|
-
})(), ar = tn.filter((e) => wt(e.key) === "left").map((e) => e.key),
|
|
4314
|
-
|
|
4313
|
+
})(), ar = tn.filter((e) => wt(e.key) === "left").map((e) => e.key), Fl = tn.filter((e) => wt(e.key) === "right").map((e) => e.key), rr = fe(/* @__PURE__ */ new Map()), [On, Po] = y({});
|
|
4314
|
+
Xo(() => {
|
|
4315
4315
|
const e = {};
|
|
4316
4316
|
for (const [r, l] of rr.current)
|
|
4317
4317
|
l != null && l.isConnected && (e[r] = l.getBoundingClientRect().width);
|
|
4318
4318
|
const t = /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(On)]);
|
|
4319
4319
|
for (const r of t)
|
|
4320
4320
|
if (Math.abs((e[r] ?? -1) - (On[r] ?? -1)) > 0.5) {
|
|
4321
|
-
|
|
4321
|
+
Po(e);
|
|
4322
4322
|
return;
|
|
4323
4323
|
}
|
|
4324
4324
|
});
|
|
4325
|
-
const
|
|
4325
|
+
const Do = 52, Rl = (e) => {
|
|
4326
4326
|
if (wt(e) === "left") {
|
|
4327
|
-
let l = qt ? On.__checkbox__ ??
|
|
4327
|
+
let l = qt ? On.__checkbox__ ?? Do : 0;
|
|
4328
4328
|
for (const s of ar) {
|
|
4329
4329
|
if (s === e) break;
|
|
4330
4330
|
l += On[s] ?? 0;
|
|
@@ -4332,7 +4332,7 @@ function vp({
|
|
|
4332
4332
|
return Math.floor(l);
|
|
4333
4333
|
}
|
|
4334
4334
|
let r = 0;
|
|
4335
|
-
for (const l of [...
|
|
4335
|
+
for (const l of [...Fl].reverse()) {
|
|
4336
4336
|
if (l === e) break;
|
|
4337
4337
|
r += On[l] ?? 0;
|
|
4338
4338
|
}
|
|
@@ -4340,15 +4340,15 @@ function vp({
|
|
|
4340
4340
|
}, rt = (e, t, r) => {
|
|
4341
4341
|
const l = wt(e);
|
|
4342
4342
|
if (!l) return "";
|
|
4343
|
-
const s = l === "left" && ar[ar.length - 1] === e ? "border-r border-slate-200 dark:border-slate-700" : l === "right" &&
|
|
4343
|
+
const s = l === "left" && ar[ar.length - 1] === e ? "border-r border-slate-200 dark:border-slate-700" : l === "right" && Fl[0] === e ? "border-l border-slate-200 dark:border-slate-700" : "";
|
|
4344
4344
|
return `sticky ${t} ${r} ${s}`;
|
|
4345
|
-
},
|
|
4345
|
+
}, Fe = (e) => {
|
|
4346
4346
|
const t = wt(e);
|
|
4347
4347
|
if (t)
|
|
4348
|
-
return t === "left" ? { left:
|
|
4348
|
+
return t === "left" ? { left: Rl(e) } : { right: Rl(e) };
|
|
4349
4349
|
}, lr = (e) => (t) => {
|
|
4350
4350
|
t ? rr.current.set(e, t) : rr.current.delete(e);
|
|
4351
|
-
},
|
|
4351
|
+
}, El = {
|
|
4352
4352
|
left: "Pinned left — click to pin right",
|
|
4353
4353
|
right: "Pinned right — click to unpin",
|
|
4354
4354
|
none: "Pin column left"
|
|
@@ -4366,40 +4366,40 @@ function vp({
|
|
|
4366
4366
|
window.removeEventListener("pointermove", e), window.removeEventListener("pointerup", t);
|
|
4367
4367
|
};
|
|
4368
4368
|
}, []);
|
|
4369
|
-
const
|
|
4369
|
+
const Mo = (e) => {
|
|
4370
4370
|
let t = Ze(e).length;
|
|
4371
|
-
for (const r of
|
|
4371
|
+
for (const r of ge) {
|
|
4372
4372
|
const l = Qt(e) ? ht(r.id, e) ?? "" : mn(String(r[e] ?? ""), e, r.id);
|
|
4373
4373
|
l.length > t && (t = Math.min(l.length, 90));
|
|
4374
4374
|
}
|
|
4375
4375
|
V((r) => ({ ...r, [e]: Math.max(60, Math.round(t * 6.6) + 28) }));
|
|
4376
|
-
},
|
|
4376
|
+
}, Oo = (e) => /* @__PURE__ */ n(
|
|
4377
4377
|
"span",
|
|
4378
4378
|
{
|
|
4379
4379
|
onPointerDown: (t) => {
|
|
4380
4380
|
t.preventDefault(), t.stopPropagation(), sr.current = { key: e, startX: t.clientX, startW: At[e] ?? 140 }, document.body.style.cursor = "col-resize";
|
|
4381
4381
|
},
|
|
4382
4382
|
onDoubleClick: (t) => {
|
|
4383
|
-
t.stopPropagation(),
|
|
4383
|
+
t.stopPropagation(), Mo(e);
|
|
4384
4384
|
},
|
|
4385
4385
|
onClick: (t) => t.stopPropagation(),
|
|
4386
4386
|
title: "Drag to resize · double-click to fit content",
|
|
4387
4387
|
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"
|
|
4388
4388
|
}
|
|
4389
|
-
),
|
|
4389
|
+
), Pl = (e) => At[e] ? { width: At[e], minWidth: At[e], maxWidth: At[e] } : void 0, Dl = (e) => {
|
|
4390
4390
|
const t = wt(e);
|
|
4391
4391
|
return /* @__PURE__ */ n(
|
|
4392
4392
|
"button",
|
|
4393
4393
|
{
|
|
4394
4394
|
type: "button",
|
|
4395
4395
|
onClick: (r) => {
|
|
4396
|
-
r.stopPropagation(),
|
|
4396
|
+
r.stopPropagation(), Ks(e);
|
|
4397
4397
|
},
|
|
4398
|
-
title:
|
|
4399
|
-
"aria-label":
|
|
4398
|
+
title: El[t ?? "none"],
|
|
4399
|
+
"aria-label": El[t ?? "none"],
|
|
4400
4400
|
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"}`,
|
|
4401
4401
|
children: /* @__PURE__ */ n(
|
|
4402
|
-
|
|
4402
|
+
Jo,
|
|
4403
4403
|
{
|
|
4404
4404
|
className: "h-3 w-3",
|
|
4405
4405
|
style: t === "right" ? { transform: "scaleX(-1)" } : void 0
|
|
@@ -4407,20 +4407,20 @@ function vp({
|
|
|
4407
4407
|
)
|
|
4408
4408
|
}
|
|
4409
4409
|
);
|
|
4410
|
-
},
|
|
4410
|
+
}, Ao = !!(K || he || Bt != null), { data: Io } = re({
|
|
4411
4411
|
queryKey: ["cbv-grand-total", a],
|
|
4412
4412
|
queryFn: () => p.request(
|
|
4413
4413
|
ee(`/items/${a}`, { limit: 1, fields: "id", count: "approx" })
|
|
4414
4414
|
).then((e) => typeof e.total == "number" ? e.total : null),
|
|
4415
|
-
enabled: !!a && it && !
|
|
4415
|
+
enabled: !!a && it && !Pe && Ao,
|
|
4416
4416
|
staleTime: 5 * 6e4,
|
|
4417
4417
|
retry: !1
|
|
4418
|
-
}),
|
|
4418
|
+
}), Ml = fe(!1), [, jo] = y(0);
|
|
4419
4419
|
pe(
|
|
4420
4420
|
() => _.getQueryCache().subscribe((e) => {
|
|
4421
|
-
if (!
|
|
4421
|
+
if (!Ml.current || e.type !== "updated" || e.action.type !== "success") return;
|
|
4422
4422
|
const t = String(e.query.queryKey[0] ?? "");
|
|
4423
|
-
(t === "cbv-quick-options" || t === "cbv-filter-options" || t === "cbv-filter-selected-labels") &&
|
|
4423
|
+
(t === "cbv-quick-options" || t === "cbv-filter-options" || t === "cbv-filter-selected-labels") && jo((r) => r + 1);
|
|
4424
4424
|
}),
|
|
4425
4425
|
[_]
|
|
4426
4426
|
);
|
|
@@ -4434,11 +4434,11 @@ function vp({
|
|
|
4434
4434
|
}
|
|
4435
4435
|
}, ir = (() => {
|
|
4436
4436
|
var l, s, d, f;
|
|
4437
|
-
if (
|
|
4437
|
+
if (Pe) return null;
|
|
4438
4438
|
let e = !1;
|
|
4439
4439
|
const t = (x, g, Q, A = !1) => {
|
|
4440
4440
|
const Ne = g.map(Q);
|
|
4441
|
-
return Ne.every((
|
|
4441
|
+
return Ne.every((P) => !!P) ? { kind: "is", field: x, values: Ne, not: A } : (e = !0, { kind: "is", field: x, values: [], count: g.length, not: A });
|
|
4442
4442
|
}, r = [];
|
|
4443
4443
|
for (const x of H) {
|
|
4444
4444
|
const g = x.pathLabels.join(" › ") || x.path.join(".");
|
|
@@ -4466,7 +4466,7 @@ function vp({
|
|
|
4466
4466
|
if (!g) continue;
|
|
4467
4467
|
const Q = x === "__state__" ? "State" : x === "__fulfilment__" ? (Oe == null ? void 0 : Oe.label) ?? "Shipped" : x === "__integrations__" ? "Integrations" : x === "__aging__" ? "Time in state" : Ze(x), A = I[x], Ne = (A == null ? void 0 : A.type) === "number" && A.prefix === "$";
|
|
4468
4468
|
if (g.kind === "in" && g.value.length) {
|
|
4469
|
-
const
|
|
4469
|
+
const P = kr(We, a, x), U = (P == null ? void 0 : P.one_collection) ?? null, J = Jr[x], u = U ?? ((J == null ? void 0 : J.kind) === "m2m" ? J.target : null);
|
|
4470
4470
|
r.push(
|
|
4471
4471
|
u ? t(
|
|
4472
4472
|
Q,
|
|
@@ -4479,36 +4479,36 @@ function vp({
|
|
|
4479
4479
|
kind: "is",
|
|
4480
4480
|
field: Q,
|
|
4481
4481
|
values: g.value.map(
|
|
4482
|
-
(
|
|
4482
|
+
(P) => {
|
|
4483
4483
|
var U, J;
|
|
4484
|
-
return ((J = (U = Mt == null ? void 0 : Mt.states) == null ? void 0 : U.find((u) => u.key ===
|
|
4484
|
+
return ((J = (U = Mt == null ? void 0 : Mt.states) == null ? void 0 : U.find((u) => u.key === P)) == null ? void 0 : J.label) ?? Me(P);
|
|
4485
4485
|
}
|
|
4486
4486
|
)
|
|
4487
4487
|
});
|
|
4488
4488
|
else if (g.kind === "fulfilment" && Oe) {
|
|
4489
|
-
const
|
|
4490
|
-
|
|
4489
|
+
const P = (s = os.find((U) => U.value === g.value)) == null ? void 0 : s.label;
|
|
4490
|
+
P && r.push({ kind: "phrase", text: P.toLowerCase() });
|
|
4491
4491
|
} else if (g.kind === "integrations") {
|
|
4492
|
-
const
|
|
4493
|
-
|
|
4492
|
+
const P = (d = is.find((U) => U.value === g.value)) == null ? void 0 : d.label;
|
|
4493
|
+
P && r.push({ kind: "is", field: Q, values: [P.toLowerCase()] });
|
|
4494
4494
|
} else if (g.kind === "tasks")
|
|
4495
4495
|
r.push({
|
|
4496
4496
|
kind: "phrase",
|
|
4497
4497
|
text: g.value === "none" ? "with no open tasks" : g.value === "overdue" ? "with overdue tasks" : "with open tasks"
|
|
4498
4498
|
});
|
|
4499
4499
|
else if (g.kind === "aging") {
|
|
4500
|
-
const
|
|
4501
|
-
|
|
4500
|
+
const P = fi({ field: Q, type: "range", value: g.value, rangeUnit: "h" });
|
|
4501
|
+
P && r.push(P);
|
|
4502
4502
|
} else if (g.kind === "text" && g.value.trim())
|
|
4503
4503
|
r.push({ kind: "text", field: Q, text: g.value });
|
|
4504
4504
|
else if (g.kind === "num" && g.value !== "") {
|
|
4505
|
-
const
|
|
4505
|
+
const P = mr({
|
|
4506
4506
|
field: Q,
|
|
4507
4507
|
op: g.op,
|
|
4508
4508
|
value: g.value,
|
|
4509
4509
|
kind: Ne ? "currency" : "number"
|
|
4510
4510
|
});
|
|
4511
|
-
|
|
4511
|
+
P && r.push(P);
|
|
4512
4512
|
} else if (g.kind === "bool")
|
|
4513
4513
|
r.push({
|
|
4514
4514
|
kind: "is",
|
|
@@ -4518,7 +4518,7 @@ function vp({
|
|
|
4518
4518
|
]
|
|
4519
4519
|
});
|
|
4520
4520
|
else if (g.kind === "date" && g.value) {
|
|
4521
|
-
const
|
|
4521
|
+
const P = ba(g.value), U = P ? { kind: "date", field: Q, op: P.op, from: P.from, to: P.to } : mr({ field: Q, op: "_preset", value: g.value, kind: "date" });
|
|
4522
4522
|
U && r.push(U);
|
|
4523
4523
|
}
|
|
4524
4524
|
}
|
|
@@ -4535,13 +4535,13 @@ function vp({
|
|
|
4535
4535
|
}).filter((g) => !!g);
|
|
4536
4536
|
x.length > 0 && r.push({ kind: "phrase", text: `flagged ${x.join(" or ")}` });
|
|
4537
4537
|
}
|
|
4538
|
-
return
|
|
4539
|
-
noun: (
|
|
4538
|
+
return Ml.current = e, bi({
|
|
4539
|
+
noun: (D == null ? void 0 : D.display_name) || Me(a),
|
|
4540
4540
|
viewName: ((f = at.find((x) => x.id === Bt)) == null ? void 0 : f.name) ?? null,
|
|
4541
4541
|
search: K,
|
|
4542
4542
|
clauses: r,
|
|
4543
|
-
shown: en ? null :
|
|
4544
|
-
of:
|
|
4543
|
+
shown: en ? null : Le,
|
|
4544
|
+
of: Io ?? null,
|
|
4545
4545
|
approx: Oa
|
|
4546
4546
|
});
|
|
4547
4547
|
})();
|
|
@@ -4610,9 +4610,9 @@ function vp({
|
|
|
4610
4610
|
[data-cbv] .cbv-overlay { animation: none; opacity: 1; }
|
|
4611
4611
|
}
|
|
4612
4612
|
` }),
|
|
4613
|
-
/* @__PURE__ */ n(
|
|
4614
|
-
/* @__PURE__ */ n(
|
|
4615
|
-
de &&
|
|
4613
|
+
/* @__PURE__ */ n(hc, {}),
|
|
4614
|
+
/* @__PURE__ */ n(_d, {}),
|
|
4615
|
+
de && ks(
|
|
4616
4616
|
/* @__PURE__ */ c(
|
|
4617
4617
|
"div",
|
|
4618
4618
|
{
|
|
@@ -4630,7 +4630,7 @@ function vp({
|
|
|
4630
4630
|
{
|
|
4631
4631
|
type: "button",
|
|
4632
4632
|
onClick: () => {
|
|
4633
|
-
|
|
4633
|
+
oo(de), Kt(null);
|
|
4634
4634
|
},
|
|
4635
4635
|
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",
|
|
4636
4636
|
children: [
|
|
@@ -4639,12 +4639,12 @@ function vp({
|
|
|
4639
4639
|
]
|
|
4640
4640
|
}
|
|
4641
4641
|
),
|
|
4642
|
-
|
|
4642
|
+
io(de.key, de.row) && de.cellText && de.cellText !== "—" && /* @__PURE__ */ c(
|
|
4643
4643
|
"button",
|
|
4644
4644
|
{
|
|
4645
4645
|
type: "button",
|
|
4646
4646
|
onClick: () => {
|
|
4647
|
-
|
|
4647
|
+
co(de), Kt(null);
|
|
4648
4648
|
},
|
|
4649
4649
|
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",
|
|
4650
4650
|
children: [
|
|
@@ -4653,7 +4653,7 @@ function vp({
|
|
|
4653
4653
|
]
|
|
4654
4654
|
}
|
|
4655
4655
|
),
|
|
4656
|
-
(de.key === "__state__" ||
|
|
4656
|
+
(de.key === "__state__" || Ll.some((e) => e.key === de.key)) && oe !== de.key && /* @__PURE__ */ c(
|
|
4657
4657
|
"button",
|
|
4658
4658
|
{
|
|
4659
4659
|
type: "button",
|
|
@@ -4686,20 +4686,20 @@ function vp({
|
|
|
4686
4686
|
label: "Copy ID",
|
|
4687
4687
|
run: () => {
|
|
4688
4688
|
var e;
|
|
4689
|
-
(e = navigator.clipboard) == null || e.writeText(String(de.row.id)),
|
|
4689
|
+
(e = navigator.clipboard) == null || e.writeText(String(de.row.id)), xe.success("ID copied");
|
|
4690
4690
|
}
|
|
4691
4691
|
},
|
|
4692
4692
|
{
|
|
4693
4693
|
label: "Copy link",
|
|
4694
4694
|
run: () => {
|
|
4695
|
-
|
|
4695
|
+
_s(
|
|
4696
4696
|
p,
|
|
4697
4697
|
_,
|
|
4698
4698
|
a,
|
|
4699
4699
|
de.row,
|
|
4700
4700
|
String(de.row.id),
|
|
4701
4701
|
q
|
|
4702
|
-
),
|
|
4702
|
+
), xe.success("Link copied");
|
|
4703
4703
|
}
|
|
4704
4704
|
}
|
|
4705
4705
|
].map((e) => /* @__PURE__ */ n(
|
|
@@ -4719,7 +4719,7 @@ function vp({
|
|
|
4719
4719
|
{
|
|
4720
4720
|
type: "button",
|
|
4721
4721
|
onClick: () => {
|
|
4722
|
-
window.confirm("Delete this record? It moves to Trash for 30 days.") &&
|
|
4722
|
+
window.confirm("Delete this record? It moves to Trash for 30 days.") && Cl.mutate(de.row.id), Kt(null);
|
|
4723
4723
|
},
|
|
4724
4724
|
className: "block w-full truncate px-3 py-1.5 text-left text-[12px] text-red-600 hover:bg-red-50 dark:text-red-400 dark:hover:bg-red-900/20",
|
|
4725
4725
|
children: "Delete"
|
|
@@ -4732,35 +4732,18 @@ function vp({
|
|
|
4732
4732
|
document.body
|
|
4733
4733
|
),
|
|
4734
4734
|
/* @__PURE__ */ c("div", { className: "flex shrink-0 flex-wrap items-center gap-2 border-b border-slate-200 bg-white px-4 py-2.5 dark:border-slate-700 dark:bg-slate-900", children: [
|
|
4735
|
-
(P == null ? void 0 : P.color) && /^#[0-9a-fA-F]{3,8}$/.test(P.color) && // Collection accent (#195): the collection's configured color as an
|
|
4736
|
-
// identity chip, so multi-tab work reads at a glance.
|
|
4737
|
-
/* @__PURE__ */ c(
|
|
4738
|
-
"span",
|
|
4739
|
-
{
|
|
4740
|
-
className: "inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-[12px] font-semibold",
|
|
4741
|
-
style: {
|
|
4742
|
-
borderColor: `${P.color}55`,
|
|
4743
|
-
backgroundColor: `${P.color}14`,
|
|
4744
|
-
color: P.color
|
|
4745
|
-
},
|
|
4746
|
-
children: [
|
|
4747
|
-
/* @__PURE__ */ n("span", { className: "h-2 w-2 rounded-full", style: { backgroundColor: P.color } }),
|
|
4748
|
-
P.display_name || a
|
|
4749
|
-
]
|
|
4750
|
-
}
|
|
4751
|
-
),
|
|
4752
4735
|
/* @__PURE__ */ n(
|
|
4753
|
-
|
|
4736
|
+
Ic,
|
|
4754
4737
|
{
|
|
4755
4738
|
collection: a,
|
|
4756
|
-
meta:
|
|
4739
|
+
meta: D,
|
|
4757
4740
|
search: le,
|
|
4758
4741
|
onSearch: (e) => {
|
|
4759
4742
|
Z(e), O(1);
|
|
4760
4743
|
},
|
|
4761
4744
|
filters: H,
|
|
4762
4745
|
onFiltersChange: (e) => {
|
|
4763
|
-
|
|
4746
|
+
De(e), O(1);
|
|
4764
4747
|
}
|
|
4765
4748
|
}
|
|
4766
4749
|
),
|
|
@@ -4768,12 +4751,12 @@ function vp({
|
|
|
4768
4751
|
"button",
|
|
4769
4752
|
{
|
|
4770
4753
|
type: "button",
|
|
4771
|
-
onClick: () =>
|
|
4754
|
+
onClick: () => Qs((e) => !e),
|
|
4772
4755
|
"aria-pressed": cn,
|
|
4773
4756
|
title: "Only records with an addendum still in review",
|
|
4774
4757
|
className: `flex h-8 items-center gap-1.5 rounded-full border px-2.5 text-[12px] font-medium transition-colors ${cn ? "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"}`,
|
|
4775
4758
|
children: [
|
|
4776
|
-
/* @__PURE__ */ n(
|
|
4759
|
+
/* @__PURE__ */ n(Ko, { className: "h-3.5 w-3.5" }),
|
|
4777
4760
|
"Active addendums"
|
|
4778
4761
|
]
|
|
4779
4762
|
}
|
|
@@ -4795,7 +4778,7 @@ function vp({
|
|
|
4795
4778
|
/* @__PURE__ */ n(
|
|
4796
4779
|
"span",
|
|
4797
4780
|
{
|
|
4798
|
-
className: `h-2 w-2 rounded-full ${
|
|
4781
|
+
className: `h-2 w-2 rounded-full ${ed(e.highlight_color ?? "red")}`
|
|
4799
4782
|
}
|
|
4800
4783
|
),
|
|
4801
4784
|
e.name
|
|
@@ -4804,8 +4787,8 @@ function vp({
|
|
|
4804
4787
|
e.id
|
|
4805
4788
|
);
|
|
4806
4789
|
}),
|
|
4807
|
-
/* @__PURE__ */ n(
|
|
4808
|
-
/* @__PURE__ */ n(
|
|
4790
|
+
/* @__PURE__ */ n(dc, { className: "h-8" }),
|
|
4791
|
+
/* @__PURE__ */ n(Ud, {}),
|
|
4809
4792
|
Ua > 0 && /* @__PURE__ */ c(
|
|
4810
4793
|
"button",
|
|
4811
4794
|
{
|
|
@@ -4835,13 +4818,13 @@ function vp({
|
|
|
4835
4818
|
children: /* @__PURE__ */ n(dr, { className: `h-4 w-4 ${Dt ? "animate-spin" : ""}` })
|
|
4836
4819
|
}
|
|
4837
4820
|
),
|
|
4838
|
-
/* @__PURE__ */ n(
|
|
4839
|
-
Pt &&
|
|
4840
|
-
|
|
4821
|
+
/* @__PURE__ */ n(nc, { listKey: `cbv:${a}`, getState: go }),
|
|
4822
|
+
Pt && qe.copy_as !== !1 && /* @__PURE__ */ n(
|
|
4823
|
+
Nd,
|
|
4841
4824
|
{
|
|
4842
4825
|
collection: a,
|
|
4843
4826
|
list: {
|
|
4844
|
-
conditions:
|
|
4827
|
+
conditions: he,
|
|
4845
4828
|
search: K || void 0,
|
|
4846
4829
|
sort: ie || void 0,
|
|
4847
4830
|
limit: Xe,
|
|
@@ -4851,24 +4834,24 @@ function vp({
|
|
|
4851
4834
|
}
|
|
4852
4835
|
),
|
|
4853
4836
|
Fn.parent && /* @__PURE__ */ n(
|
|
4854
|
-
|
|
4837
|
+
Md,
|
|
4855
4838
|
{
|
|
4856
4839
|
parent: Fn.parent,
|
|
4857
|
-
value:
|
|
4840
|
+
value: Gr,
|
|
4858
4841
|
onChange: (e) => {
|
|
4859
|
-
|
|
4842
|
+
Us(e), O(1);
|
|
4860
4843
|
}
|
|
4861
4844
|
}
|
|
4862
4845
|
),
|
|
4863
4846
|
[
|
|
4864
|
-
...Rn ? [{ key: "tree", label: "Tree", icon: /* @__PURE__ */ n(
|
|
4847
|
+
...Rn ? [{ key: "tree", label: "Tree", icon: /* @__PURE__ */ n(Bo, { className: "h-3.5 w-3.5" }) }] : [],
|
|
4865
4848
|
...(j ?? []).map((e) => ({ key: e.key, label: e.label, icon: e.icon }))
|
|
4866
4849
|
].map((e) => /* @__PURE__ */ c(
|
|
4867
4850
|
"button",
|
|
4868
4851
|
{
|
|
4869
4852
|
type: "button",
|
|
4870
4853
|
onClick: () => {
|
|
4871
|
-
|
|
4854
|
+
Zr(!1), Xr((t) => t === e.key ? null : e.key);
|
|
4872
4855
|
},
|
|
4873
4856
|
"aria-pressed": _t === e.key,
|
|
4874
4857
|
"data-cbv-view-toggle": e.key,
|
|
@@ -4886,13 +4869,13 @@ function vp({
|
|
|
4886
4869
|
{
|
|
4887
4870
|
type: "button",
|
|
4888
4871
|
onClick: () => {
|
|
4889
|
-
|
|
4872
|
+
Xr(null), Zr((e) => !e);
|
|
4890
4873
|
},
|
|
4891
4874
|
title: Jn ? "Back to the table" : "Show these records on a map",
|
|
4892
4875
|
className: `flex h-8 items-center gap-1.5 rounded-md border px-2.5 text-[12px] font-medium ${Jn ? "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"}`,
|
|
4893
4876
|
"data-cbv-map-toggle": !0,
|
|
4894
4877
|
children: [
|
|
4895
|
-
/* @__PURE__ */ n(
|
|
4878
|
+
/* @__PURE__ */ n(zo, { className: "h-3.5 w-3.5" }),
|
|
4896
4879
|
"Map"
|
|
4897
4880
|
]
|
|
4898
4881
|
}
|
|
@@ -4903,7 +4886,7 @@ function vp({
|
|
|
4903
4886
|
type: "button",
|
|
4904
4887
|
onClick: () => ka((e) => !e),
|
|
4905
4888
|
title: "Ask the table a question",
|
|
4906
|
-
className: `flex h-8 items-center gap-1.5 rounded-md border px-2.5 text-[12px] font-medium ${Nn ||
|
|
4889
|
+
className: `flex h-8 items-center gap-1.5 rounded-md border px-2.5 text-[12px] font-medium ${Nn || Pe ? "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"}`,
|
|
4907
4890
|
children: [
|
|
4908
4891
|
/* @__PURE__ */ n(cr, { className: "h-3.5 w-3.5" }),
|
|
4909
4892
|
"Ask"
|
|
@@ -4960,21 +4943,21 @@ function vp({
|
|
|
4960
4943
|
},
|
|
4961
4944
|
e.id
|
|
4962
4945
|
)),
|
|
4963
|
-
|
|
4946
|
+
Pe && /* @__PURE__ */ c("span", { className: "order-last inline-flex max-w-full items-center gap-1.5 rounded-full border border-nvr-cyan/40 bg-nvr-cyan/[0.08] py-1 pl-2.5 pr-1.5 text-[12px] text-[#007a99] dark:text-nvr-cyan", children: [
|
|
4964
4947
|
/* @__PURE__ */ n(cr, { className: "h-3 w-3 shrink-0" }),
|
|
4965
4948
|
/* @__PURE__ */ c("span", { className: "min-w-0 truncate", children: [
|
|
4966
|
-
|
|
4949
|
+
Pe.interpreted || "AI result",
|
|
4967
4950
|
" · ",
|
|
4968
|
-
ut(
|
|
4951
|
+
ut(Pe.total),
|
|
4969
4952
|
" match",
|
|
4970
|
-
|
|
4971
|
-
|
|
4953
|
+
Pe.total === 1 ? "" : "es",
|
|
4954
|
+
Pe.total > Pe.rows.length ? ` (showing first ${Pe.rows.length})` : ""
|
|
4972
4955
|
] }),
|
|
4973
4956
|
/* @__PURE__ */ n(
|
|
4974
4957
|
"button",
|
|
4975
4958
|
{
|
|
4976
4959
|
type: "button",
|
|
4977
|
-
onClick:
|
|
4960
|
+
onClick: $s,
|
|
4978
4961
|
"aria-label": "Clear AI result",
|
|
4979
4962
|
className: "rounded-full p-0.5 hover:bg-nvr-cyan/[0.16]",
|
|
4980
4963
|
children: /* @__PURE__ */ n(ur, { className: "h-3 w-3" })
|
|
@@ -4989,7 +4972,7 @@ function vp({
|
|
|
4989
4972
|
onClick: () => E((e) => !e),
|
|
4990
4973
|
className: `flex h-8 items-center gap-1 rounded-md border px-2.5 text-[12px] font-medium ${oe ? "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"}`,
|
|
4991
4974
|
children: [
|
|
4992
|
-
/* @__PURE__ */ n(
|
|
4975
|
+
/* @__PURE__ */ n(Yl, { className: "h-3.5 w-3.5" }),
|
|
4993
4976
|
oe ? `Group: ${oe === "__state__" ? "State" : Ze(oe)}` : "Group"
|
|
4994
4977
|
]
|
|
4995
4978
|
}
|
|
@@ -5004,7 +4987,7 @@ function vp({
|
|
|
5004
4987
|
children: "No grouping"
|
|
5005
4988
|
}
|
|
5006
4989
|
),
|
|
5007
|
-
|
|
4990
|
+
Ll.map((e) => /* @__PURE__ */ n(
|
|
5008
4991
|
"button",
|
|
5009
4992
|
{
|
|
5010
4993
|
type: "button",
|
|
@@ -5020,13 +5003,13 @@ function vp({
|
|
|
5020
5003
|
"button",
|
|
5021
5004
|
{
|
|
5022
5005
|
type: "button",
|
|
5023
|
-
onClick:
|
|
5006
|
+
onClick: Fs,
|
|
5024
5007
|
"aria-pressed": bt,
|
|
5025
5008
|
"data-cbv-bulk-mode": bt ? "on" : "off",
|
|
5026
5009
|
"data-tip": bt ? "Leave bulk mode — clears the selection and turns row actions back on" : "Select rows to act on several at once",
|
|
5027
5010
|
className: `flex h-8 items-center gap-1.5 rounded-md border px-2.5 text-[12px] font-medium ${bt ? "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"}`,
|
|
5028
5011
|
children: [
|
|
5029
|
-
/* @__PURE__ */ n(
|
|
5012
|
+
/* @__PURE__ */ n(Qo, { className: "h-3.5 w-3.5" }),
|
|
5030
5013
|
bt ? "Done" : "Bulk select"
|
|
5031
5014
|
]
|
|
5032
5015
|
}
|
|
@@ -5039,7 +5022,7 @@ function vp({
|
|
|
5039
5022
|
"aria-label": "Row density",
|
|
5040
5023
|
title: Yt === "compact" ? "Switch to comfortable rows" : "Switch to compact rows",
|
|
5041
5024
|
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",
|
|
5042
|
-
children: Yt === "compact" ? /* @__PURE__ */ n(
|
|
5025
|
+
children: Yt === "compact" ? /* @__PURE__ */ n(Yl, { className: "h-4 w-4" }) : /* @__PURE__ */ n(Uo, { className: "h-4 w-4" })
|
|
5043
5026
|
}
|
|
5044
5027
|
),
|
|
5045
5028
|
/* @__PURE__ */ c("div", { className: "relative", ref: Tr, children: [
|
|
@@ -5071,7 +5054,7 @@ function vp({
|
|
|
5071
5054
|
const s = an.current;
|
|
5072
5055
|
if (an.current = null, s == null || s === t) return;
|
|
5073
5056
|
const d = [...me], [f] = d.splice(s, 1);
|
|
5074
|
-
d.splice(t, 0, f),
|
|
5057
|
+
d.splice(t, 0, f), be(d);
|
|
5075
5058
|
},
|
|
5076
5059
|
className: "group flex items-center gap-1.5 rounded px-1.5 py-1 hover:bg-slate-50 dark:hover:bg-slate-800",
|
|
5077
5060
|
children: [
|
|
@@ -5140,7 +5123,7 @@ function vp({
|
|
|
5140
5123
|
"button",
|
|
5141
5124
|
{
|
|
5142
5125
|
type: "button",
|
|
5143
|
-
onClick: () =>
|
|
5126
|
+
onClick: () => be(me.filter((l) => l !== e)),
|
|
5144
5127
|
title: "Remove column",
|
|
5145
5128
|
"aria-label": `Remove ${e}`,
|
|
5146
5129
|
className: "text-slate-300 hover:text-slate-500",
|
|
@@ -5151,7 +5134,7 @@ function vp({
|
|
|
5151
5134
|
}
|
|
5152
5135
|
),
|
|
5153
5136
|
vn === e && /* @__PURE__ */ c("div", { className: "mb-1 ml-5 mr-1 rounded-md border border-slate-100 bg-slate-50 p-1.5 dark:border-slate-800 dark:bg-slate-800/60", children: [
|
|
5154
|
-
/* @__PURE__ */ n("div", { className: "flex flex-wrap gap-1", children:
|
|
5137
|
+
/* @__PURE__ */ n("div", { className: "flex flex-wrap gap-1", children: yc.map((l) => {
|
|
5155
5138
|
const s = JSON.stringify(I[e] ?? null) === JSON.stringify(l.cfg);
|
|
5156
5139
|
return /* @__PURE__ */ n(
|
|
5157
5140
|
"button",
|
|
@@ -5290,7 +5273,7 @@ function vp({
|
|
|
5290
5273
|
"button",
|
|
5291
5274
|
{
|
|
5292
5275
|
type: "button",
|
|
5293
|
-
onClick: () =>
|
|
5276
|
+
onClick: () => be([...me, e.field]),
|
|
5294
5277
|
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",
|
|
5295
5278
|
children: [
|
|
5296
5279
|
/* @__PURE__ */ n("span", { "aria-hidden": !0, className: "text-slate-400", children: "+" }),
|
|
@@ -5299,16 +5282,16 @@ function vp({
|
|
|
5299
5282
|
},
|
|
5300
5283
|
e.field
|
|
5301
5284
|
)),
|
|
5302
|
-
|
|
5285
|
+
D && /* @__PURE__ */ c("div", { className: "mt-1 border-t border-slate-100 pt-1.5 dark:border-slate-800", children: [
|
|
5303
5286
|
/* @__PURE__ */ n("p", { className: "px-1.5 pb-1 text-[10.5px] font-semibold uppercase tracking-wide text-slate-400", children: "+ Related column" }),
|
|
5304
5287
|
/* @__PURE__ */ n(
|
|
5305
|
-
|
|
5288
|
+
jc,
|
|
5306
5289
|
{
|
|
5307
5290
|
collection: a,
|
|
5308
|
-
meta:
|
|
5291
|
+
meta: D,
|
|
5309
5292
|
onPick: (e) => {
|
|
5310
5293
|
const t = e.join(".");
|
|
5311
|
-
me.includes(t) ||
|
|
5294
|
+
me.includes(t) || be([...me, t]), Ht(!1);
|
|
5312
5295
|
}
|
|
5313
5296
|
}
|
|
5314
5297
|
)
|
|
@@ -5316,14 +5299,14 @@ function vp({
|
|
|
5316
5299
|
/* @__PURE__ */ c("div", { className: "mt-1 border-t border-slate-100 pt-1.5 dark:border-slate-800", children: [
|
|
5317
5300
|
/* @__PURE__ */ n("p", { className: "px-1.5 pb-1 text-[10.5px] font-semibold uppercase tracking-wide text-slate-400", children: "+ Formula column" }),
|
|
5318
5301
|
/* @__PURE__ */ n(
|
|
5319
|
-
|
|
5302
|
+
Pd,
|
|
5320
5303
|
{
|
|
5321
5304
|
fields: $t.map((e) => e.field),
|
|
5322
5305
|
onAdd: (e, t) => {
|
|
5323
5306
|
let r = 1;
|
|
5324
5307
|
for (; X[`__f:${r}`]; ) r++;
|
|
5325
5308
|
const l = `__f:${r}`;
|
|
5326
|
-
_e((s) => ({ ...s, [l]: t })), R((s) => ({ ...s, [l]: e })),
|
|
5309
|
+
_e((s) => ({ ...s, [l]: t })), R((s) => ({ ...s, [l]: e })), be([...me, l]);
|
|
5327
5310
|
}
|
|
5328
5311
|
}
|
|
5329
5312
|
)
|
|
@@ -5374,8 +5357,8 @@ function vp({
|
|
|
5374
5357
|
"button",
|
|
5375
5358
|
{
|
|
5376
5359
|
type: "button",
|
|
5377
|
-
onClick: () =>
|
|
5378
|
-
disabled:
|
|
5360
|
+
onClick: () => Sl.mutate(),
|
|
5361
|
+
disabled: Sl.isPending,
|
|
5379
5362
|
title: "Save the current columns/filters/sort as the collection default view",
|
|
5380
5363
|
className: "inline-flex items-center gap-1 text-[11.5px] text-slate-500 hover:text-[#00a5cc] disabled:opacity-40 dark:text-slate-400",
|
|
5381
5364
|
children: [
|
|
@@ -5405,7 +5388,7 @@ function vp({
|
|
|
5405
5388
|
{
|
|
5406
5389
|
type: "button",
|
|
5407
5390
|
onClick: () => {
|
|
5408
|
-
dn(!1),
|
|
5391
|
+
dn(!1), _o();
|
|
5409
5392
|
},
|
|
5410
5393
|
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",
|
|
5411
5394
|
children: "CSV — visible columns"
|
|
@@ -5418,7 +5401,7 @@ function vp({
|
|
|
5418
5401
|
onClick: () => {
|
|
5419
5402
|
var l;
|
|
5420
5403
|
dn(!1);
|
|
5421
|
-
const e = me, t = e.map((s) => Ze(s)).join(" "), r =
|
|
5404
|
+
const e = me, t = e.map((s) => Ze(s)).join(" "), r = ge.map(
|
|
5422
5405
|
(s) => e.map((d) => {
|
|
5423
5406
|
const f = Qt(d) ? mn(ht(s.id, d) ?? "", d, s.id) : mn(String(s[d] ?? ""), d, s.id);
|
|
5424
5407
|
return String(f ?? "").replace(/[\t\n]/g, " ");
|
|
@@ -5431,11 +5414,11 @@ ${r}`).then(() => {
|
|
|
5431
5414
|
});
|
|
5432
5415
|
},
|
|
5433
5416
|
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",
|
|
5434
|
-
children:
|
|
5417
|
+
children: Ts ? "Copied ✓" : "Copy table to clipboard"
|
|
5435
5418
|
}
|
|
5436
5419
|
),
|
|
5437
|
-
|
|
5438
|
-
|
|
5420
|
+
kl.length > 0 && /* @__PURE__ */ n("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)" }),
|
|
5421
|
+
kl.map((e) => {
|
|
5439
5422
|
var t;
|
|
5440
5423
|
return /* @__PURE__ */ c("div", { className: "flex items-center", children: [
|
|
5441
5424
|
/* @__PURE__ */ c(
|
|
@@ -5443,7 +5426,7 @@ ${r}`).then(() => {
|
|
|
5443
5426
|
{
|
|
5444
5427
|
type: "button",
|
|
5445
5428
|
onClick: () => {
|
|
5446
|
-
dn(!1),
|
|
5429
|
+
dn(!1), bo(e.id);
|
|
5447
5430
|
},
|
|
5448
5431
|
className: "block min-w-0 flex-1 rounded-md px-2.5 py-1.5 text-left text-[12.5px] text-slate-700 hover:bg-muted dark:text-slate-200",
|
|
5449
5432
|
children: [
|
|
@@ -5459,7 +5442,7 @@ ${r}`).then(() => {
|
|
|
5459
5442
|
"data-export-background": e.id,
|
|
5460
5443
|
"data-tip": "Run in the background — a download appears in the Jobs tray",
|
|
5461
5444
|
onClick: () => {
|
|
5462
|
-
dn(!1),
|
|
5445
|
+
dn(!1), ho(e.id, e.name);
|
|
5463
5446
|
},
|
|
5464
5447
|
className: "mr-1 shrink-0 rounded px-1.5 py-1 text-[10.5px] font-medium text-slate-500 hover:bg-muted hover:text-slate-800 dark:text-slate-400 dark:hover:text-slate-100",
|
|
5465
5448
|
children: "Background"
|
|
@@ -5472,9 +5455,9 @@ ${r}`).then(() => {
|
|
|
5472
5455
|
"input",
|
|
5473
5456
|
{
|
|
5474
5457
|
value: ra,
|
|
5475
|
-
onChange: (e) =>
|
|
5458
|
+
onChange: (e) => yl(e.target.value),
|
|
5476
5459
|
onKeyDown: (e) => {
|
|
5477
|
-
e.key === "Enter" &&
|
|
5460
|
+
e.key === "Enter" && wl();
|
|
5478
5461
|
},
|
|
5479
5462
|
placeholder: "Save columns as preset…",
|
|
5480
5463
|
className: "h-6 min-w-0 flex-1 rounded border border-slate-200 bg-background px-1.5 text-[11.5px] dark:border-border"
|
|
@@ -5485,7 +5468,7 @@ ${r}`).then(() => {
|
|
|
5485
5468
|
{
|
|
5486
5469
|
type: "button",
|
|
5487
5470
|
disabled: !ra.trim(),
|
|
5488
|
-
onClick: () => void
|
|
5471
|
+
onClick: () => void wl(),
|
|
5489
5472
|
className: "h-6 shrink-0 rounded bg-nvr-cyan px-2 text-[11px] font-semibold text-white disabled:opacity-40",
|
|
5490
5473
|
children: "Save"
|
|
5491
5474
|
}
|
|
@@ -5493,7 +5476,7 @@ ${r}`).then(() => {
|
|
|
5493
5476
|
] })
|
|
5494
5477
|
] })
|
|
5495
5478
|
] }),
|
|
5496
|
-
Un && !(
|
|
5479
|
+
Un && !(D != null && D.singleton) && (Wn ? /* @__PURE__ */ c("div", { className: "relative", "data-cbv-newitem-menu": !0, ref: La, children: [
|
|
5497
5480
|
/* @__PURE__ */ c(
|
|
5498
5481
|
"button",
|
|
5499
5482
|
{
|
|
@@ -5501,7 +5484,8 @@ ${r}`).then(() => {
|
|
|
5501
5484
|
onClick: () => qn((e) => !e),
|
|
5502
5485
|
className: "flex h-8 items-center gap-1 rounded-md bg-nvr-cyan px-3 text-[12.5px] font-semibold text-white hover:brightness-105",
|
|
5503
5486
|
children: [
|
|
5504
|
-
"+
|
|
5487
|
+
"+ ",
|
|
5488
|
+
Pr,
|
|
5505
5489
|
/* @__PURE__ */ n(In, { className: "h-3.5 w-3.5" })
|
|
5506
5490
|
]
|
|
5507
5491
|
}
|
|
@@ -5511,7 +5495,7 @@ ${r}`).then(() => {
|
|
|
5511
5495
|
{
|
|
5512
5496
|
key: "default",
|
|
5513
5497
|
slug: null,
|
|
5514
|
-
label: ((
|
|
5498
|
+
label: ((jl = Wn.active) == null ? void 0 : jl.create_label) ?? ((Kl = Wn.active) == null ? void 0 : Kl.name) ?? "Default layout",
|
|
5515
5499
|
isDefault: !0,
|
|
5516
5500
|
steps: Ta
|
|
5517
5501
|
},
|
|
@@ -5520,7 +5504,7 @@ ${r}`).then(() => {
|
|
|
5520
5504
|
slug: e.slug,
|
|
5521
5505
|
label: e.create_label ?? e.name,
|
|
5522
5506
|
isDefault: !1,
|
|
5523
|
-
steps:
|
|
5507
|
+
steps: Ms(e)
|
|
5524
5508
|
}))
|
|
5525
5509
|
].map((e) => /* @__PURE__ */ c(
|
|
5526
5510
|
"div",
|
|
@@ -5532,7 +5516,7 @@ ${r}`).then(() => {
|
|
|
5532
5516
|
{
|
|
5533
5517
|
type: "button",
|
|
5534
5518
|
onClick: () => {
|
|
5535
|
-
qn(!1),
|
|
5519
|
+
qn(!1), Dr(e.slug);
|
|
5536
5520
|
},
|
|
5537
5521
|
className: "flex min-w-0 flex-1 items-center px-2 py-1.5 text-left text-[12px] text-slate-700 dark:text-slate-200",
|
|
5538
5522
|
children: [
|
|
@@ -5552,7 +5536,7 @@ ${r}`).then(() => {
|
|
|
5552
5536
|
},
|
|
5553
5537
|
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",
|
|
5554
5538
|
children: [
|
|
5555
|
-
/* @__PURE__ */ n(
|
|
5539
|
+
/* @__PURE__ */ n(Jl, { className: "h-3 w-3" }),
|
|
5556
5540
|
"Quick pick"
|
|
5557
5541
|
]
|
|
5558
5542
|
}
|
|
@@ -5561,21 +5545,21 @@ ${r}`).then(() => {
|
|
|
5561
5545
|
},
|
|
5562
5546
|
e.key
|
|
5563
5547
|
)),
|
|
5564
|
-
((
|
|
5548
|
+
((Bl = Tn.data) == null ? void 0 : Bl.enabled) && /* @__PURE__ */ c(Be, { children: [
|
|
5565
5549
|
/* @__PURE__ */ n("div", { className: "my-1 border-t border-slate-100 dark:border-border" }),
|
|
5566
5550
|
/* @__PURE__ */ c(
|
|
5567
5551
|
"button",
|
|
5568
5552
|
{
|
|
5569
5553
|
type: "button",
|
|
5570
5554
|
"data-cbv-new-from-document": !0,
|
|
5571
|
-
disabled:
|
|
5555
|
+
disabled: Or,
|
|
5572
5556
|
onClick: () => {
|
|
5573
|
-
qn(!1),
|
|
5557
|
+
qn(!1), Ir(null);
|
|
5574
5558
|
},
|
|
5575
5559
|
className: "flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-[12px] text-slate-700 hover:bg-slate-100 disabled:opacity-60 dark:text-slate-200 dark:hover:bg-muted",
|
|
5576
5560
|
title: "Upload a SOW, quote or spreadsheet — the new record opens with what it says proposed",
|
|
5577
5561
|
children: [
|
|
5578
|
-
/* @__PURE__ */ n(
|
|
5562
|
+
/* @__PURE__ */ n(Gl, { className: "h-3.5 w-3.5 text-slate-400" }),
|
|
5579
5563
|
"New from document…"
|
|
5580
5564
|
]
|
|
5581
5565
|
}
|
|
@@ -5583,17 +5567,20 @@ ${r}`).then(() => {
|
|
|
5583
5567
|
] })
|
|
5584
5568
|
] })
|
|
5585
5569
|
] }) : /* @__PURE__ */ c("div", { className: "flex items-stretch", "data-cbv-newitem-split": !0, children: [
|
|
5586
|
-
/* @__PURE__ */
|
|
5570
|
+
/* @__PURE__ */ c(
|
|
5587
5571
|
"button",
|
|
5588
5572
|
{
|
|
5589
5573
|
type: "button",
|
|
5590
|
-
ref:
|
|
5591
|
-
onClick: () =>
|
|
5574
|
+
ref: jr,
|
|
5575
|
+
onClick: () => Dr(null),
|
|
5592
5576
|
className: Ut(
|
|
5593
5577
|
"h-8 bg-nvr-cyan px-3 text-[12.5px] font-semibold text-white hover:brightness-105",
|
|
5594
|
-
Ta.length > 0 || (
|
|
5578
|
+
Ta.length > 0 || (zl = Tn.data) != null && zl.enabled ? "rounded-l-md" : "rounded-md"
|
|
5595
5579
|
),
|
|
5596
|
-
children:
|
|
5580
|
+
children: [
|
|
5581
|
+
"+ ",
|
|
5582
|
+
Pr
|
|
5583
|
+
]
|
|
5597
5584
|
}
|
|
5598
5585
|
),
|
|
5599
5586
|
Ta.length > 0 && /* @__PURE__ */ n(
|
|
@@ -5606,40 +5593,40 @@ ${r}`).then(() => {
|
|
|
5606
5593
|
onClick: () => Vn({ slug: null }),
|
|
5607
5594
|
className: Ut(
|
|
5608
5595
|
"flex h-8 items-center border-l border-white/30 bg-nvr-cyan px-2 text-white hover:brightness-105",
|
|
5609
|
-
!((
|
|
5596
|
+
!((Ql = Tn.data) != null && Ql.enabled) && "rounded-r-md"
|
|
5610
5597
|
),
|
|
5611
|
-
children: /* @__PURE__ */ n(
|
|
5598
|
+
children: /* @__PURE__ */ n(Jl, { className: "h-3.5 w-3.5" })
|
|
5612
5599
|
}
|
|
5613
5600
|
),
|
|
5614
|
-
((
|
|
5601
|
+
((Ul = Tn.data) == null ? void 0 : Ul.enabled) && /* @__PURE__ */ n(
|
|
5615
5602
|
"button",
|
|
5616
5603
|
{
|
|
5617
5604
|
type: "button",
|
|
5618
5605
|
"data-cbv-new-from-document": !0,
|
|
5619
|
-
disabled:
|
|
5606
|
+
disabled: Or,
|
|
5620
5607
|
title: "New from document — upload a SOW, quote or spreadsheet and review what it proposes",
|
|
5621
5608
|
"aria-label": "New from document",
|
|
5622
|
-
onClick: () =>
|
|
5609
|
+
onClick: () => Ir(null),
|
|
5623
5610
|
className: "flex h-8 items-center rounded-r-md border-l border-white/30 bg-nvr-cyan px-2 text-white hover:brightness-105 disabled:opacity-60",
|
|
5624
|
-
children: /* @__PURE__ */ n(
|
|
5611
|
+
children: /* @__PURE__ */ n(Gl, { className: "h-3.5 w-3.5" })
|
|
5625
5612
|
}
|
|
5626
5613
|
)
|
|
5627
5614
|
] })),
|
|
5628
5615
|
/* @__PURE__ */ n(
|
|
5629
5616
|
"input",
|
|
5630
5617
|
{
|
|
5631
|
-
ref:
|
|
5618
|
+
ref: Mr,
|
|
5632
5619
|
type: "file",
|
|
5633
|
-
accept: (((
|
|
5620
|
+
accept: (((Wl = Tn.data) == null ? void 0 : Wl.accept) ?? []).join(","),
|
|
5634
5621
|
multiple: !0,
|
|
5635
5622
|
className: "hidden",
|
|
5636
|
-
onChange:
|
|
5623
|
+
onChange: Ds,
|
|
5637
5624
|
"data-cbv-autofill-input": !0
|
|
5638
5625
|
}
|
|
5639
5626
|
)
|
|
5640
5627
|
] }),
|
|
5641
5628
|
qa && /* @__PURE__ */ n(
|
|
5642
|
-
|
|
5629
|
+
Zd,
|
|
5643
5630
|
{
|
|
5644
5631
|
collection: a,
|
|
5645
5632
|
layoutSlug: qa.slug,
|
|
@@ -5647,8 +5634,8 @@ ${r}`).then(() => {
|
|
|
5647
5634
|
onOpenChange: (e) => {
|
|
5648
5635
|
e || Vn(null);
|
|
5649
5636
|
},
|
|
5650
|
-
noun: (
|
|
5651
|
-
anchorEl: La.current ??
|
|
5637
|
+
noun: (D == null ? void 0 : D.singular) ?? "record",
|
|
5638
|
+
anchorEl: La.current ?? jr.current,
|
|
5652
5639
|
onDone: (e) => {
|
|
5653
5640
|
Vn(null), B({ collection: a, itemId: "new", layoutSlug: qa.slug, prefill: e });
|
|
5654
5641
|
}
|
|
@@ -5676,10 +5663,10 @@ ${r}`).then(() => {
|
|
|
5676
5663
|
] }),
|
|
5677
5664
|
Tt.length > 0 && /* @__PURE__ */ c("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: [
|
|
5678
5665
|
Tt.map((e) => /* @__PURE__ */ n(
|
|
5679
|
-
|
|
5666
|
+
Rc,
|
|
5680
5667
|
{
|
|
5681
5668
|
def: e,
|
|
5682
|
-
allowedIds:
|
|
5669
|
+
allowedIds: Kr(e),
|
|
5683
5670
|
scopeDefault: wn.has(e.key),
|
|
5684
5671
|
narrowBy: Tt.filter((t) => t.key !== e.key && t.collection).map((t) => ({
|
|
5685
5672
|
collection: t.collection,
|
|
@@ -5718,9 +5705,9 @@ ${r}`).then(() => {
|
|
|
5718
5705
|
),
|
|
5719
5706
|
/* @__PURE__ */ n("span", { className: "ml-auto text-[11px] text-slate-400", children: en ? "count unavailable" : /* @__PURE__ */ c(Be, { children: [
|
|
5720
5707
|
Oa ? "about " : "",
|
|
5721
|
-
ut(
|
|
5708
|
+
ut(Le),
|
|
5722
5709
|
" item",
|
|
5723
|
-
|
|
5710
|
+
Le === 1 ? "" : "s"
|
|
5724
5711
|
] }) })
|
|
5725
5712
|
] }),
|
|
5726
5713
|
/* @__PURE__ */ c("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: [
|
|
@@ -5728,7 +5715,7 @@ ${r}`).then(() => {
|
|
|
5728
5715
|
"button",
|
|
5729
5716
|
{
|
|
5730
5717
|
type: "button",
|
|
5731
|
-
onClick:
|
|
5718
|
+
onClick: vl,
|
|
5732
5719
|
className: `inline-flex h-6 items-center rounded-full border px-2.5 text-[12px] transition-colors ${Bt == null ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-slate-900 dark:text-white" : "border-slate-200 bg-white text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-300"}`,
|
|
5733
5720
|
children: "Default"
|
|
5734
5721
|
}
|
|
@@ -5784,11 +5771,11 @@ ${r}`).then(() => {
|
|
|
5784
5771
|
"button",
|
|
5785
5772
|
{
|
|
5786
5773
|
type: "button",
|
|
5787
|
-
onClick: () =>
|
|
5774
|
+
onClick: () => wo.mutate(e.id),
|
|
5788
5775
|
title: sa(e.id) ? "Subscribed — a daily digest reports records that enter this view. Click to unsubscribe." : "Subscribe — get a daily digest of records that enter this view",
|
|
5789
5776
|
"aria-label": `Toggle digest subscription for ${e.name}`,
|
|
5790
5777
|
className: sa(e.id) ? "text-[#00a5cc]" : "text-slate-400 hover:text-[#00a5cc]",
|
|
5791
|
-
children: sa(e.id) ? /* @__PURE__ */ n(
|
|
5778
|
+
children: sa(e.id) ? /* @__PURE__ */ n(Wo, { className: "h-3 w-3", fill: "currentColor" }) : /* @__PURE__ */ n(Vo, { className: "h-3 w-3" })
|
|
5792
5779
|
}
|
|
5793
5780
|
),
|
|
5794
5781
|
/* @__PURE__ */ n(
|
|
@@ -5802,8 +5789,8 @@ ${r}`).then(() => {
|
|
|
5802
5789
|
"data-view-update": e.id,
|
|
5803
5790
|
"data-view-update-state": Ot.isPending && Ot.variables === e.id ? "saving" : er === e.id ? "saved" : "idle",
|
|
5804
5791
|
className: "inline-flex h-3.5 w-3.5 items-center justify-center",
|
|
5805
|
-
children: Ot.isPending && Ot.variables === e.id ? /* @__PURE__ */ n(
|
|
5806
|
-
|
|
5792
|
+
children: Ot.isPending && Ot.variables === e.id ? /* @__PURE__ */ n(Ho, { className: "h-3 w-3 animate-spin" }) : er === e.id ? /* @__PURE__ */ n(
|
|
5793
|
+
Yo,
|
|
5807
5794
|
{
|
|
5808
5795
|
className: "h-3 w-3 text-emerald-600 dark:text-emerald-400",
|
|
5809
5796
|
strokeWidth: 3
|
|
@@ -5812,20 +5799,20 @@ ${r}`).then(() => {
|
|
|
5812
5799
|
}
|
|
5813
5800
|
),
|
|
5814
5801
|
Pt && /* @__PURE__ */ n(
|
|
5815
|
-
|
|
5802
|
+
jd,
|
|
5816
5803
|
{
|
|
5817
5804
|
name: e.name,
|
|
5818
5805
|
isDefault: !!e.is_default,
|
|
5819
5806
|
roleId: e.default_for_role ?? null,
|
|
5820
|
-
onCollectionDefault: (t) =>
|
|
5821
|
-
onRoleDefault: (t) =>
|
|
5807
|
+
onCollectionDefault: (t) => xo.mutate({ id: e.id, on: t }),
|
|
5808
|
+
onRoleDefault: (t) => vo.mutate({ id: e.id, role: t })
|
|
5822
5809
|
}
|
|
5823
5810
|
),
|
|
5824
5811
|
/* @__PURE__ */ n(
|
|
5825
5812
|
"button",
|
|
5826
5813
|
{
|
|
5827
5814
|
type: "button",
|
|
5828
|
-
onClick: () =>
|
|
5815
|
+
onClick: () => ko.mutate(e.id),
|
|
5829
5816
|
title: "Delete view",
|
|
5830
5817
|
"aria-label": `Delete ${e.name}`,
|
|
5831
5818
|
className: "hover:text-red-500",
|
|
@@ -5837,7 +5824,7 @@ ${r}`).then(() => {
|
|
|
5837
5824
|
},
|
|
5838
5825
|
e.id
|
|
5839
5826
|
)),
|
|
5840
|
-
|
|
5827
|
+
qs ? /* @__PURE__ */ c(
|
|
5841
5828
|
"form",
|
|
5842
5829
|
{
|
|
5843
5830
|
className: "flex items-center gap-1",
|
|
@@ -5887,26 +5874,26 @@ ${r}`).then(() => {
|
|
|
5887
5874
|
)
|
|
5888
5875
|
] }),
|
|
5889
5876
|
nt != null && /* @__PURE__ */ c("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: [
|
|
5890
|
-
/* @__PURE__ */ n("span", { className: "min-w-0 flex-1", children:
|
|
5891
|
-
(nt == null ? void 0 : nt.status) === 403 && !
|
|
5877
|
+
/* @__PURE__ */ n("span", { className: "min-w-0 flex-1", children: ji(nt) === 503 ? Ki(nt) : Wt(nt, "Failed to load records") }),
|
|
5878
|
+
(nt == null ? void 0 : nt.status) === 403 && !Ad(nt) && /* @__PURE__ */ n(
|
|
5892
5879
|
"button",
|
|
5893
5880
|
{
|
|
5894
5881
|
type: "button",
|
|
5895
|
-
disabled:
|
|
5896
|
-
onClick: () => void p.request(ve("/access-requests", { collection: a })).then(() =>
|
|
5882
|
+
disabled: el,
|
|
5883
|
+
onClick: () => void p.request(ve("/access-requests", { collection: a })).then(() => Ws(!0)).catch(() => {
|
|
5897
5884
|
}),
|
|
5898
5885
|
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",
|
|
5899
5886
|
"data-request-access": !0,
|
|
5900
|
-
children:
|
|
5887
|
+
children: el ? "Requested — an admin was notified" : "Request access"
|
|
5901
5888
|
}
|
|
5902
5889
|
),
|
|
5903
|
-
|
|
5890
|
+
ss(nt).map((e) => /* @__PURE__ */ c(
|
|
5904
5891
|
"button",
|
|
5905
5892
|
{
|
|
5906
5893
|
type: "button",
|
|
5907
5894
|
onClick: () => {
|
|
5908
|
-
const t =
|
|
5909
|
-
|
|
5895
|
+
const t = Id(e, { filters: H, sort: ie, colFilters: Ke });
|
|
5896
|
+
De(t.filters), we(t.sort), jt(t.colFilters), O(1);
|
|
5910
5897
|
},
|
|
5911
5898
|
title: `Remove the filter or sort on "${e}" — this list cannot filter on it`,
|
|
5912
5899
|
className: "inline-flex h-7 shrink-0 items-center gap-1 rounded-md border border-red-300 bg-white px-2 text-[12px] font-medium line-through decoration-red-400 hover:bg-red-100 dark:border-red-500/40 dark:bg-transparent dark:hover:bg-red-900/20",
|
|
@@ -5918,7 +5905,7 @@ ${r}`).then(() => {
|
|
|
5918
5905
|
},
|
|
5919
5906
|
e
|
|
5920
5907
|
)),
|
|
5921
|
-
(nt == null ? void 0 : nt.status) !== 403 &&
|
|
5908
|
+
(nt == null ? void 0 : nt.status) !== 403 && ss(nt).length === 0 && /* @__PURE__ */ n(
|
|
5922
5909
|
"button",
|
|
5923
5910
|
{
|
|
5924
5911
|
type: "button",
|
|
@@ -5930,26 +5917,26 @@ ${r}`).then(() => {
|
|
|
5930
5917
|
)
|
|
5931
5918
|
] }),
|
|
5932
5919
|
_t === "tree" && Rn ? /* @__PURE__ */ n("div", { className: "flex min-h-0 flex-1 flex-col p-4 pt-3", children: /* @__PURE__ */ n("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__ */ n(
|
|
5933
|
-
|
|
5920
|
+
Cd,
|
|
5934
5921
|
{
|
|
5935
5922
|
collection: a,
|
|
5936
5923
|
config: Rn,
|
|
5937
5924
|
onOpen: (e) => bn(e),
|
|
5938
|
-
onAddChild: W &&
|
|
5925
|
+
onAddChild: W && qe.allow_create !== !1 ? (e) => B({
|
|
5939
5926
|
collection: a,
|
|
5940
5927
|
itemId: "new",
|
|
5941
5928
|
prefill: { [Rn.parent_field]: e }
|
|
5942
5929
|
}) : void 0
|
|
5943
5930
|
}
|
|
5944
|
-
) }) }) : _t && (j != null && j.some((e) => e.key === _t)) ? /* @__PURE__ */ n("div", { className: "flex min-h-0 flex-1 flex-col p-4 pt-3", "data-cbv-extra-view": _t, children: (
|
|
5931
|
+
) }) }) : _t && (j != null && j.some((e) => e.key === _t)) ? /* @__PURE__ */ n("div", { className: "flex min-h-0 flex-1 flex-col p-4 pt-3", "data-cbv-extra-view": _t, children: (Vl = j.find((e) => e.key === _t)) == null ? void 0 : Vl.render() }) : null,
|
|
5945
5932
|
Jn && un ? /* @__PURE__ */ n("div", { className: "flex min-h-0 flex-1 flex-col p-4 pt-3", children: /* @__PURE__ */ n(
|
|
5946
|
-
|
|
5933
|
+
lc,
|
|
5947
5934
|
{
|
|
5948
5935
|
collection: a,
|
|
5949
5936
|
latField: un.latField,
|
|
5950
5937
|
lngField: un.lngField,
|
|
5951
5938
|
labelField: un.labelField,
|
|
5952
|
-
conditions:
|
|
5939
|
+
conditions: he ?? null,
|
|
5953
5940
|
search: K,
|
|
5954
5941
|
onOpen: (e) => bn(e)
|
|
5955
5942
|
}
|
|
@@ -5979,10 +5966,10 @@ ${r}`).then(() => {
|
|
|
5979
5966
|
/* @__PURE__ */ n("div", { className: "cbv-progress pointer-events-none absolute inset-x-0 top-0 z-[6] h-[3px] overflow-hidden" }),
|
|
5980
5967
|
/* @__PURE__ */ n("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__ */ c("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: [
|
|
5981
5968
|
/* @__PURE__ */ n(dr, { "aria-hidden": !0, className: "h-3.5 w-3.5 animate-spin text-[#00a5cc]" }),
|
|
5982
|
-
|
|
5969
|
+
sl != null ? `${ja.text ?? "Still working"} — ${sl}s` : "Loading…"
|
|
5983
5970
|
] }) })
|
|
5984
5971
|
] }),
|
|
5985
|
-
Da && ja.slow && /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-x-0 top-12 z-[6] flex justify-center px-4", children: /* @__PURE__ */ n(
|
|
5972
|
+
Da && ja.slow && /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-x-0 top-12 z-[6] flex justify-center px-4", children: /* @__PURE__ */ n(bc, { reason: ja, variant: "pill" }) }),
|
|
5986
5973
|
/* @__PURE__ */ n(
|
|
5987
5974
|
"div",
|
|
5988
5975
|
{
|
|
@@ -6021,13 +6008,13 @@ ${r}`).then(() => {
|
|
|
6021
6008
|
ref: lr("__checkbox__"),
|
|
6022
6009
|
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",
|
|
6023
6010
|
children: /* @__PURE__ */ c("span", { className: "flex items-center gap-1", children: [
|
|
6024
|
-
/* @__PURE__ */ n(
|
|
6011
|
+
/* @__PURE__ */ n(ps, { change: null }),
|
|
6025
6012
|
bt && /* @__PURE__ */ n(
|
|
6026
6013
|
"input",
|
|
6027
6014
|
{
|
|
6028
6015
|
type: "checkbox",
|
|
6029
6016
|
checked: tr,
|
|
6030
|
-
onChange:
|
|
6017
|
+
onChange: Co,
|
|
6031
6018
|
"aria-label": "Select all"
|
|
6032
6019
|
}
|
|
6033
6020
|
)
|
|
@@ -6037,16 +6024,16 @@ ${r}`).then(() => {
|
|
|
6037
6024
|
tn.map((e) => {
|
|
6038
6025
|
const t = e.key, r = !!wt(t), l = `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]"}`, s = rt(t, "", "");
|
|
6039
6026
|
if (e.kind !== "data") {
|
|
6040
|
-
const
|
|
6027
|
+
const P = e.kind === "state" ? "State" : e.kind === "entered" ? "Last State Change" : e.kind === "aging" ? "Aging" : e.kind === "owners" ? "Owners" : e.kind === "addendums" ? "Addendums" : e.kind === "fulfilment" ? Oe != null && Oe.label ? `${Oe.label} shipped` : "Shipped" : e.kind === "integrations" ? "Integrations" : e.kind === "tasks" ? "Tasks" : e.kind === "formula" ? Ze(t) : "";
|
|
6041
6028
|
return /* @__PURE__ */ c(
|
|
6042
6029
|
"th",
|
|
6043
6030
|
{
|
|
6044
6031
|
ref: r ? lr(t) : void 0,
|
|
6045
|
-
style:
|
|
6032
|
+
style: Fe(t),
|
|
6046
6033
|
className: `${l} text-left ${e.kind === "actions" ? "w-20 px-2" : ""} ${s}`,
|
|
6047
6034
|
children: [
|
|
6048
|
-
|
|
6049
|
-
|
|
6035
|
+
P,
|
|
6036
|
+
Dl(t)
|
|
6050
6037
|
]
|
|
6051
6038
|
},
|
|
6052
6039
|
t
|
|
@@ -6057,11 +6044,11 @@ ${r}`).then(() => {
|
|
|
6057
6044
|
"th",
|
|
6058
6045
|
{
|
|
6059
6046
|
ref: r ? lr(t) : void 0,
|
|
6060
|
-
style: { ...
|
|
6047
|
+
style: { ...Pl(t), ...Fe(t) },
|
|
6061
6048
|
onClick: () => {
|
|
6062
|
-
x ||
|
|
6049
|
+
x || So(t);
|
|
6063
6050
|
},
|
|
6064
|
-
className: `${l} relative ${
|
|
6051
|
+
className: `${l} relative ${hl(t) ? "text-right" : "text-left"} ${x ? "" : "cursor-pointer hover:text-slate-600"} ${s}`,
|
|
6065
6052
|
children: [
|
|
6066
6053
|
Ne,
|
|
6067
6054
|
(A == null ? void 0 : A.computed_formula) && /* @__PURE__ */ n(
|
|
@@ -6080,21 +6067,21 @@ ${r}`).then(() => {
|
|
|
6080
6067
|
children: g ? "▲" : "⇅"
|
|
6081
6068
|
}
|
|
6082
6069
|
),
|
|
6083
|
-
|
|
6084
|
-
|
|
6070
|
+
Dl(t),
|
|
6071
|
+
Oo(t)
|
|
6085
6072
|
]
|
|
6086
6073
|
},
|
|
6087
6074
|
t
|
|
6088
6075
|
);
|
|
6089
6076
|
})
|
|
6090
6077
|
] }),
|
|
6091
|
-
(
|
|
6078
|
+
(po || Mn) && /* @__PURE__ */ c("tr", { className: "border-b border-slate-200 dark:border-slate-700", children: [
|
|
6092
6079
|
qt && /* @__PURE__ */ n("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" }),
|
|
6093
6080
|
tn.map((e) => {
|
|
6094
6081
|
var s;
|
|
6095
6082
|
const t = e.key, l = `sticky top-8 bg-slate-50 px-2 py-1 text-left font-normal dark:bg-slate-800 ${!!wt(t) ? "z-[4]" : "z-[2]"} ${rt(t, "", "")}`;
|
|
6096
6083
|
if (e.kind === "state")
|
|
6097
|
-
return /* @__PURE__ */ n("th", { style:
|
|
6084
|
+
return /* @__PURE__ */ n("th", { style: Fe(t), className: l, children: /* @__PURE__ */ n(
|
|
6098
6085
|
va,
|
|
6099
6086
|
{
|
|
6100
6087
|
block: !0,
|
|
@@ -6112,14 +6099,14 @@ ${r}`).then(() => {
|
|
|
6112
6099
|
) }, t);
|
|
6113
6100
|
if (e.kind === "fulfilment") {
|
|
6114
6101
|
const d = Ke.__fulfilment__;
|
|
6115
|
-
return /* @__PURE__ */ n("th", { style:
|
|
6102
|
+
return /* @__PURE__ */ n("th", { style: Fe(t), className: l, children: /* @__PURE__ */ n(
|
|
6116
6103
|
xn,
|
|
6117
6104
|
{
|
|
6118
6105
|
ariaLabel: "Shipped filter",
|
|
6119
6106
|
value: (d == null ? void 0 : d.kind) === "fulfilment" ? d.value : "",
|
|
6120
6107
|
options: [
|
|
6121
6108
|
{ value: "", label: "All" },
|
|
6122
|
-
...
|
|
6109
|
+
...os.filter(
|
|
6123
6110
|
(f) => f.value !== "complete" || !!(Oe != null && Oe.remaining_field)
|
|
6124
6111
|
)
|
|
6125
6112
|
],
|
|
@@ -6138,11 +6125,11 @@ ${r}`).then(() => {
|
|
|
6138
6125
|
return /* @__PURE__ */ n(
|
|
6139
6126
|
"th",
|
|
6140
6127
|
{
|
|
6141
|
-
style:
|
|
6128
|
+
style: Fe(t),
|
|
6142
6129
|
className: l,
|
|
6143
6130
|
"data-aging-filter": !0,
|
|
6144
6131
|
children: /* @__PURE__ */ n(
|
|
6145
|
-
|
|
6132
|
+
Qd,
|
|
6146
6133
|
{
|
|
6147
6134
|
layout: "cell",
|
|
6148
6135
|
def: {
|
|
@@ -6170,7 +6157,7 @@ ${r}`).then(() => {
|
|
|
6170
6157
|
return /* @__PURE__ */ n(
|
|
6171
6158
|
"th",
|
|
6172
6159
|
{
|
|
6173
|
-
style:
|
|
6160
|
+
style: Fe(t),
|
|
6174
6161
|
className: l,
|
|
6175
6162
|
"data-integration-filter": f,
|
|
6176
6163
|
children: /* @__PURE__ */ n(
|
|
@@ -6180,7 +6167,7 @@ ${r}`).then(() => {
|
|
|
6180
6167
|
value: f,
|
|
6181
6168
|
options: [
|
|
6182
6169
|
{ value: "", label: "All" },
|
|
6183
|
-
...
|
|
6170
|
+
...is
|
|
6184
6171
|
],
|
|
6185
6172
|
onChange: (x) => Ie(
|
|
6186
6173
|
"__integrations__",
|
|
@@ -6200,7 +6187,7 @@ ${r}`).then(() => {
|
|
|
6200
6187
|
return /* @__PURE__ */ n(
|
|
6201
6188
|
"th",
|
|
6202
6189
|
{
|
|
6203
|
-
style:
|
|
6190
|
+
style: Fe(t),
|
|
6204
6191
|
className: l,
|
|
6205
6192
|
"data-cbv-tasks-filter": f,
|
|
6206
6193
|
children: /* @__PURE__ */ n(
|
|
@@ -6227,11 +6214,11 @@ ${r}`).then(() => {
|
|
|
6227
6214
|
return e.kind !== "data" ? /* @__PURE__ */ n(
|
|
6228
6215
|
"th",
|
|
6229
6216
|
{
|
|
6230
|
-
style:
|
|
6217
|
+
style: Fe(t),
|
|
6231
6218
|
className: `${l} ${e.kind === "actions" ? "w-20" : ""}`
|
|
6232
6219
|
},
|
|
6233
6220
|
t
|
|
6234
|
-
) : /* @__PURE__ */ n("th", { style:
|
|
6221
|
+
) : /* @__PURE__ */ n("th", { style: Fe(t), className: l, children: uo(t) }, t);
|
|
6235
6222
|
})
|
|
6236
6223
|
] })
|
|
6237
6224
|
] }),
|
|
@@ -6239,24 +6226,24 @@ ${r}`).then(() => {
|
|
|
6239
6226
|
// #3229 — one placeholder per real column, real row height (h-8, or the
|
|
6240
6227
|
// table's comfortable h-11), real pins/widths: nothing moves on arrival.
|
|
6241
6228
|
/* @__PURE__ */ n(
|
|
6242
|
-
|
|
6229
|
+
fc,
|
|
6243
6230
|
{
|
|
6244
|
-
columns:
|
|
6231
|
+
columns: Fo,
|
|
6245
6232
|
rows: Math.min(Xe, 20),
|
|
6246
6233
|
rowClassName: "h-8",
|
|
6247
6234
|
cellClassName: "px-3 py-1.5",
|
|
6248
6235
|
leadingCells: qt ? 1 : 0,
|
|
6249
|
-
cellStyle: (e) => ({ ...
|
|
6236
|
+
cellStyle: (e) => ({ ...Pl(e), ...Fe(e) }),
|
|
6250
6237
|
barClassName: "cbv-shimmer"
|
|
6251
6238
|
}
|
|
6252
6239
|
)
|
|
6253
|
-
) :
|
|
6240
|
+
) : ge.length === 0 ? /* @__PURE__ */ n("tr", { children: /* @__PURE__ */ n(
|
|
6254
6241
|
"td",
|
|
6255
6242
|
{
|
|
6256
|
-
colSpan: me.length +
|
|
6243
|
+
colSpan: me.length + Tl,
|
|
6257
6244
|
className: "nvr-fade-in py-16",
|
|
6258
6245
|
children: (() => {
|
|
6259
|
-
const e = H.length === 0 && Object.keys(Ke).length === 0 && !Object.values(mt).some((r) => r.length > 0) && !K, t =
|
|
6246
|
+
const e = H.length === 0 && Object.keys(Ke).length === 0 && !Object.values(mt).some((r) => r.length > 0) && !K, t = D == null ? void 0 : D.empty_state;
|
|
6260
6247
|
if (e && t && (t.title || t.message)) {
|
|
6261
6248
|
const r = t.cta_url ?? "", l = r.startsWith("/"), s = /^https?:\/\//.test(r);
|
|
6262
6249
|
return /* @__PURE__ */ c("div", { className: "flex flex-col items-center gap-2 text-center", children: [
|
|
@@ -6276,14 +6263,14 @@ ${r}`).then(() => {
|
|
|
6276
6263
|
}
|
|
6277
6264
|
return nt != null ? null : /* @__PURE__ */ c("div", { className: "flex flex-col items-center gap-2 text-center", children: [
|
|
6278
6265
|
/* @__PURE__ */ n("span", { className: "flex h-10 w-10 items-center justify-center rounded-full bg-slate-100 dark:bg-slate-800", children: /* @__PURE__ */ n(
|
|
6279
|
-
|
|
6266
|
+
vs,
|
|
6280
6267
|
{
|
|
6281
6268
|
"aria-hidden": !0,
|
|
6282
6269
|
className: "h-4.5 w-4.5 h-5 w-5 text-slate-400"
|
|
6283
6270
|
}
|
|
6284
6271
|
) }),
|
|
6285
6272
|
/* @__PURE__ */ n("p", { className: "text-[13.5px] font-medium text-slate-600 dark:text-slate-300", children: "No records match" }),
|
|
6286
|
-
|
|
6273
|
+
Le === 0 && (Xn ?? 0) > 0 ? /* @__PURE__ */ c(
|
|
6287
6274
|
"p",
|
|
6288
6275
|
{
|
|
6289
6276
|
className: "max-w-[52ch] text-[12px] text-slate-600 dark:text-slate-300",
|
|
@@ -6302,7 +6289,7 @@ ${r}`).then(() => {
|
|
|
6302
6289
|
"button",
|
|
6303
6290
|
{
|
|
6304
6291
|
type: "button",
|
|
6305
|
-
onClick:
|
|
6292
|
+
onClick: Hs,
|
|
6306
6293
|
className: "font-medium text-[#0284a8] underline-offset-2 hover:underline dark:text-nvr-cyan",
|
|
6307
6294
|
children: "Show all"
|
|
6308
6295
|
}
|
|
@@ -6315,7 +6302,7 @@ ${r}`).then(() => {
|
|
|
6315
6302
|
{
|
|
6316
6303
|
type: "button",
|
|
6317
6304
|
onClick: () => {
|
|
6318
|
-
|
|
6305
|
+
De([]), jt({}), Ye({}), Et({}), Z(""), O(1);
|
|
6319
6306
|
},
|
|
6320
6307
|
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",
|
|
6321
6308
|
children: "Clear all filters"
|
|
@@ -6324,7 +6311,7 @@ ${r}`).then(() => {
|
|
|
6324
6311
|
] });
|
|
6325
6312
|
})()
|
|
6326
6313
|
}
|
|
6327
|
-
) }) :
|
|
6314
|
+
) }) : Eo.map((e, t) => {
|
|
6328
6315
|
var U;
|
|
6329
6316
|
const r = { animationDelay: `${Math.min(t, 14) * 16}ms` };
|
|
6330
6317
|
if (e.kind === "header")
|
|
@@ -6341,7 +6328,7 @@ ${r}`).then(() => {
|
|
|
6341
6328
|
"td",
|
|
6342
6329
|
{
|
|
6343
6330
|
className: "px-3 py-1.5",
|
|
6344
|
-
colSpan: me.length +
|
|
6331
|
+
colSpan: me.length + Tl,
|
|
6345
6332
|
children: /* @__PURE__ */ c("span", { className: "flex items-center gap-1.5 text-[12px] font-medium text-slate-600 dark:text-slate-200", children: [
|
|
6346
6333
|
/* @__PURE__ */ n(
|
|
6347
6334
|
In,
|
|
@@ -6357,46 +6344,46 @@ ${r}`).then(() => {
|
|
|
6357
6344
|
},
|
|
6358
6345
|
`__group__${e.gkey}`
|
|
6359
6346
|
);
|
|
6360
|
-
const l = e.row, s = l.id, d = Jt.includes(s), f = (U = $e == null ? void 0 : $e.instances) == null ? void 0 : U[String(s)], x =
|
|
6347
|
+
const l = e.row, s = l.id, d = Jt.includes(s), f = (U = $e == null ? void 0 : $e.instances) == null ? void 0 : U[String(s)], x = to[String(s)], g = Ja == null ? void 0 : Ja[String(s)], Q = Zs.get(String(s)) ?? null, A = ao(a, s), Ne = !d && x ? td(x.color) : void 0, P = d ? "bg-[#e6fafe] dark:bg-[#0c2a33]" : Ne ?? "bg-white group-hover:bg-[#f2fcff] dark:bg-slate-900 dark:group-hover:bg-[#0e2d3a]";
|
|
6361
6348
|
return /* @__PURE__ */ c(
|
|
6362
6349
|
"tr",
|
|
6363
6350
|
{
|
|
6364
|
-
...
|
|
6351
|
+
...Ys({ collection: a, id: String(s) }),
|
|
6365
6352
|
onClick: () => bn(s),
|
|
6366
|
-
...
|
|
6353
|
+
...No(s),
|
|
6367
6354
|
"data-row-key": String(s),
|
|
6368
|
-
title: Ft.titleFor(String(s)) ?? (Q && !Q.is_mine ?
|
|
6355
|
+
title: Ft.titleFor(String(s)) ?? (Q && !Q.is_mine ? Di(Q) : void 0) ?? (x ? `At risk — ${x.rule}` : void 0) ?? (A ? ic : void 0),
|
|
6369
6356
|
"data-picker-excluded": A ? "" : void 0,
|
|
6370
6357
|
style: r,
|
|
6371
|
-
className: `nvr-row-enter group h-8 cursor-pointer border-b border-slate-100 transition-colors duration-150 hover:bg-nvr-cyan/[0.04] dark:border-slate-800 dark:hover:bg-nvr-cyan/[0.08] ${d ? "bg-nvr-cyan/[0.08]" : Ne ?? ""} ${A ?
|
|
6358
|
+
className: `nvr-row-enter group h-8 cursor-pointer border-b border-slate-100 transition-colors duration-150 hover:bg-nvr-cyan/[0.04] dark:border-slate-800 dark:hover:bg-nvr-cyan/[0.08] ${d ? "bg-nvr-cyan/[0.08]" : Ne ?? ""} ${A ? oc : ""}`,
|
|
6372
6359
|
children: [
|
|
6373
6360
|
qt && /* @__PURE__ */ n(
|
|
6374
6361
|
"td",
|
|
6375
6362
|
{
|
|
6376
|
-
className: `sticky left-0 z-[1] w-11 py-1.5 pl-1.5 pr-3 ${
|
|
6363
|
+
className: `sticky left-0 z-[1] w-11 py-1.5 pl-1.5 pr-3 ${P}`,
|
|
6377
6364
|
onClick: (J) => J.stopPropagation(),
|
|
6378
6365
|
children: /* @__PURE__ */ c("span", { className: "flex items-center gap-1", children: [
|
|
6379
6366
|
Q || Ft.isNew(String(s)) ? /* @__PURE__ */ n(
|
|
6380
|
-
|
|
6367
|
+
tc,
|
|
6381
6368
|
{
|
|
6382
6369
|
lock: Q,
|
|
6383
6370
|
isNew: Ft.isNew(String(s)),
|
|
6384
6371
|
dataAttr: "data-cbv-live-mark"
|
|
6385
6372
|
}
|
|
6386
|
-
) :
|
|
6387
|
-
|
|
6373
|
+
) : ol[ns(a, String(s))] ? /* @__PURE__ */ n(
|
|
6374
|
+
mc,
|
|
6388
6375
|
{
|
|
6389
|
-
viewers:
|
|
6376
|
+
viewers: ol[ns(a, String(s))],
|
|
6390
6377
|
dataAttr: "data-cbv-presence"
|
|
6391
6378
|
}
|
|
6392
|
-
) : /* @__PURE__ */ n(
|
|
6393
|
-
/* @__PURE__ */ n(
|
|
6379
|
+
) : /* @__PURE__ */ n(ps, { change: g, dataAttr: "data-cbv-unseen" }),
|
|
6380
|
+
/* @__PURE__ */ n(kd, { rowId: s }),
|
|
6394
6381
|
bt && /* @__PURE__ */ n(
|
|
6395
6382
|
"input",
|
|
6396
6383
|
{
|
|
6397
6384
|
type: "checkbox",
|
|
6398
6385
|
checked: d,
|
|
6399
|
-
onChange: () =>
|
|
6386
|
+
onChange: () => $o(s),
|
|
6400
6387
|
"aria-label": `Select ${s}`
|
|
6401
6388
|
}
|
|
6402
6389
|
)
|
|
@@ -6404,13 +6391,13 @@ ${r}`).then(() => {
|
|
|
6404
6391
|
}
|
|
6405
6392
|
),
|
|
6406
6393
|
tn.map((J) => {
|
|
6407
|
-
var gt, xt, nn, G, ne,
|
|
6394
|
+
var gt, xt, nn, G, ne, Re;
|
|
6408
6395
|
const u = J.key;
|
|
6409
6396
|
if (J.kind === "state")
|
|
6410
6397
|
return /* @__PURE__ */ n(
|
|
6411
6398
|
"td",
|
|
6412
6399
|
{
|
|
6413
|
-
style:
|
|
6400
|
+
style: Fe(u),
|
|
6414
6401
|
onContextMenu: (T) => {
|
|
6415
6402
|
T.preventDefault(), Kt({
|
|
6416
6403
|
x: T.clientX,
|
|
@@ -6420,7 +6407,7 @@ ${r}`).then(() => {
|
|
|
6420
6407
|
cellText: T.currentTarget.innerText.trim()
|
|
6421
6408
|
});
|
|
6422
6409
|
},
|
|
6423
|
-
className: `whitespace-nowrap px-3 py-1.5 ${rt(u, "z-[1]",
|
|
6410
|
+
className: `whitespace-nowrap px-3 py-1.5 ${rt(u, "z-[1]", P)}`,
|
|
6424
6411
|
children: f ? /* @__PURE__ */ c(
|
|
6425
6412
|
"span",
|
|
6426
6413
|
{
|
|
@@ -6457,8 +6444,8 @@ ${r}`).then(() => {
|
|
|
6457
6444
|
return /* @__PURE__ */ n(
|
|
6458
6445
|
"td",
|
|
6459
6446
|
{
|
|
6460
|
-
style:
|
|
6461
|
-
className: `whitespace-nowrap px-3 py-1.5 text-[12px] tabular-nums text-slate-600 dark:text-slate-300 ${rt(u, "z-[1]",
|
|
6447
|
+
style: Fe(u),
|
|
6448
|
+
className: `whitespace-nowrap px-3 py-1.5 text-[12px] tabular-nums text-slate-600 dark:text-slate-300 ${rt(u, "z-[1]", P)}`,
|
|
6462
6449
|
children: T != null && T.entered_at ? hn(T.entered_at, {
|
|
6463
6450
|
type: "datetime",
|
|
6464
6451
|
template: "MM/DD/YYYY - h:mmA"
|
|
@@ -6472,10 +6459,10 @@ ${r}`).then(() => {
|
|
|
6472
6459
|
return /* @__PURE__ */ n(
|
|
6473
6460
|
"td",
|
|
6474
6461
|
{
|
|
6475
|
-
style:
|
|
6462
|
+
style: Fe(u),
|
|
6476
6463
|
"data-tip": Y != null && (T != null && T.entered_at) ? `In ${T.state_label ?? "this state"} since ${new Date(T.entered_at).toLocaleString()}` : void 0,
|
|
6477
|
-
className: `whitespace-nowrap px-3 py-1.5 text-[12px] tabular-nums text-slate-600 dark:text-slate-300 ${rt(u, "z-[1]",
|
|
6478
|
-
children: Y == null ? /* @__PURE__ */ n("span", { className: "text-slate-300 dark:text-slate-600", children: "—" }) :
|
|
6464
|
+
className: `whitespace-nowrap px-3 py-1.5 text-[12px] tabular-nums text-slate-600 dark:text-slate-300 ${rt(u, "z-[1]", P)}`,
|
|
6465
|
+
children: Y == null ? /* @__PURE__ */ n("span", { className: "text-slate-300 dark:text-slate-600", children: "—" }) : ud(Y)
|
|
6479
6466
|
},
|
|
6480
6467
|
u
|
|
6481
6468
|
);
|
|
@@ -6484,11 +6471,11 @@ ${r}`).then(() => {
|
|
|
6484
6471
|
return /* @__PURE__ */ n(
|
|
6485
6472
|
"td",
|
|
6486
6473
|
{
|
|
6487
|
-
style:
|
|
6488
|
-
className: `whitespace-nowrap px-3 py-1 ${rt(u, "z-[1]",
|
|
6474
|
+
style: Fe(u),
|
|
6475
|
+
className: `whitespace-nowrap px-3 py-1 ${rt(u, "z-[1]", P)}`,
|
|
6489
6476
|
onClick: (T) => T.stopPropagation(),
|
|
6490
6477
|
children: /* @__PURE__ */ n(
|
|
6491
|
-
|
|
6478
|
+
cs,
|
|
6492
6479
|
{
|
|
6493
6480
|
users: (Xa == null ? void 0 : Xa[String(s)]) ?? [],
|
|
6494
6481
|
showSingleName: !1
|
|
@@ -6502,9 +6489,9 @@ ${r}`).then(() => {
|
|
|
6502
6489
|
return /* @__PURE__ */ n(
|
|
6503
6490
|
"td",
|
|
6504
6491
|
{
|
|
6505
|
-
style:
|
|
6506
|
-
className: `whitespace-nowrap px-3 py-1.5 ${rt(u, "z-[1]",
|
|
6507
|
-
children: /* @__PURE__ */ n(
|
|
6492
|
+
style: Fe(u),
|
|
6493
|
+
className: `whitespace-nowrap px-3 py-1.5 ${rt(u, "z-[1]", P)}`,
|
|
6494
|
+
children: /* @__PURE__ */ n(Sc, { summary: T })
|
|
6508
6495
|
},
|
|
6509
6496
|
u
|
|
6510
6497
|
);
|
|
@@ -6513,15 +6500,15 @@ ${r}`).then(() => {
|
|
|
6513
6500
|
return /* @__PURE__ */ n(
|
|
6514
6501
|
"td",
|
|
6515
6502
|
{
|
|
6516
|
-
style:
|
|
6517
|
-
className: `whitespace-nowrap px-3 py-1.5 ${rt(u, "z-[1]",
|
|
6503
|
+
style: Fe(u),
|
|
6504
|
+
className: `whitespace-nowrap px-3 py-1.5 ${rt(u, "z-[1]", P)}`,
|
|
6518
6505
|
onClick: (T) => T.stopPropagation(),
|
|
6519
6506
|
children: /* @__PURE__ */ n(
|
|
6520
|
-
|
|
6507
|
+
Wd,
|
|
6521
6508
|
{
|
|
6522
6509
|
collection: a,
|
|
6523
6510
|
itemId: String(s),
|
|
6524
|
-
figures:
|
|
6511
|
+
figures: Vd(
|
|
6525
6512
|
l[Oe.shipped_field],
|
|
6526
6513
|
l[Oe.requested_field]
|
|
6527
6514
|
),
|
|
@@ -6535,9 +6522,9 @@ ${r}`).then(() => {
|
|
|
6535
6522
|
return /* @__PURE__ */ n(
|
|
6536
6523
|
"td",
|
|
6537
6524
|
{
|
|
6538
|
-
style:
|
|
6539
|
-
className: `whitespace-nowrap px-3 py-1.5 ${rt(u, "z-[1]",
|
|
6540
|
-
children: /* @__PURE__ */ n(
|
|
6525
|
+
style: Fe(u),
|
|
6526
|
+
className: `whitespace-nowrap px-3 py-1.5 ${rt(u, "z-[1]", P)}`,
|
|
6527
|
+
children: /* @__PURE__ */ n(Gd, { rows: Ga == null ? void 0 : Ga[String(s)] })
|
|
6541
6528
|
},
|
|
6542
6529
|
u
|
|
6543
6530
|
);
|
|
@@ -6546,8 +6533,8 @@ ${r}`).then(() => {
|
|
|
6546
6533
|
return /* @__PURE__ */ n(
|
|
6547
6534
|
"td",
|
|
6548
6535
|
{
|
|
6549
|
-
style:
|
|
6550
|
-
className: `whitespace-nowrap px-3 py-1.5 ${rt(u, "z-[1]",
|
|
6536
|
+
style: Fe(u),
|
|
6537
|
+
className: `whitespace-nowrap px-3 py-1.5 ${rt(u, "z-[1]", P)}`,
|
|
6551
6538
|
"data-cbv-task-count": (T == null ? void 0 : T.open) ?? 0,
|
|
6552
6539
|
children: T && T.open > 0 ? /* @__PURE__ */ c(
|
|
6553
6540
|
"span",
|
|
@@ -6565,14 +6552,14 @@ ${r}`).then(() => {
|
|
|
6565
6552
|
);
|
|
6566
6553
|
}
|
|
6567
6554
|
if (J.kind === "formula") {
|
|
6568
|
-
const T =
|
|
6555
|
+
const T = Bs(l, u);
|
|
6569
6556
|
return /* @__PURE__ */ n(
|
|
6570
6557
|
"td",
|
|
6571
6558
|
{
|
|
6572
|
-
style:
|
|
6559
|
+
style: Fe(u),
|
|
6573
6560
|
"data-cbv-formula-cell": u,
|
|
6574
|
-
"data-tip":
|
|
6575
|
-
className: `whitespace-nowrap px-3 py-1.5 text-right tabular-nums text-slate-700 dark:text-slate-200 ${rt(u, "z-[1]",
|
|
6561
|
+
"data-tip": zs(l, u),
|
|
6562
|
+
className: `whitespace-nowrap px-3 py-1.5 text-right tabular-nums text-slate-700 dark:text-slate-200 ${rt(u, "z-[1]", P)}`,
|
|
6576
6563
|
children: T == null ? /* @__PURE__ */ n("span", { className: "text-slate-300 dark:text-slate-600", children: "—" }) : I[u] ? hn(String(T), I[u]) : ut(Math.round(T * 100) / 100)
|
|
6577
6564
|
},
|
|
6578
6565
|
u
|
|
@@ -6582,11 +6569,11 @@ ${r}`).then(() => {
|
|
|
6582
6569
|
return /* @__PURE__ */ n(
|
|
6583
6570
|
"td",
|
|
6584
6571
|
{
|
|
6585
|
-
style:
|
|
6586
|
-
className: `w-20 whitespace-nowrap px-2 py-1 text-right ${rt(u, "z-[1]",
|
|
6572
|
+
style: Fe(u),
|
|
6573
|
+
className: `w-20 whitespace-nowrap px-2 py-1 text-right ${rt(u, "z-[1]", P)}`,
|
|
6587
6574
|
onClick: (T) => T.stopPropagation(),
|
|
6588
6575
|
children: /* @__PURE__ */ n(
|
|
6589
|
-
|
|
6576
|
+
qc,
|
|
6590
6577
|
{
|
|
6591
6578
|
collection: a,
|
|
6592
6579
|
id: s,
|
|
@@ -6595,20 +6582,20 @@ ${r}`).then(() => {
|
|
|
6595
6582
|
onPeek: () => ft.push([{ collection: a, itemId: String(s) }]),
|
|
6596
6583
|
onAudit: () => ln(String(s)),
|
|
6597
6584
|
urlFor: q,
|
|
6598
|
-
onDeleted: () =>
|
|
6585
|
+
onDeleted: () => Cl.mutate(s),
|
|
6599
6586
|
row: l,
|
|
6600
|
-
bulkEnabledKeys:
|
|
6587
|
+
bulkEnabledKeys: qe.bulk_actions ?? null,
|
|
6601
6588
|
disabled: bt
|
|
6602
6589
|
}
|
|
6603
6590
|
)
|
|
6604
6591
|
},
|
|
6605
6592
|
u
|
|
6606
6593
|
);
|
|
6607
|
-
const dt = Qt(u) ?
|
|
6594
|
+
const dt = Qt(u) ? so(s, u) : null, Qe = Qt(u) ? null : et(We, a, u);
|
|
6608
6595
|
return /* @__PURE__ */ n(
|
|
6609
6596
|
"td",
|
|
6610
6597
|
{
|
|
6611
|
-
style:
|
|
6598
|
+
style: Fe(u),
|
|
6612
6599
|
onContextMenu: (T) => {
|
|
6613
6600
|
T.preventDefault(), Kt({
|
|
6614
6601
|
x: T.clientX,
|
|
@@ -6618,21 +6605,21 @@ ${r}`).then(() => {
|
|
|
6618
6605
|
cellText: T.currentTarget.innerText.trim()
|
|
6619
6606
|
});
|
|
6620
6607
|
},
|
|
6621
|
-
className: `whitespace-nowrap px-3 py-1.5 ${
|
|
6622
|
-
children:
|
|
6608
|
+
className: `whitespace-nowrap px-3 py-1.5 ${hl(u) ? "text-right" : ""} ${rt(u, "z-[1]", P)}`,
|
|
6609
|
+
children: js(
|
|
6623
6610
|
l,
|
|
6624
6611
|
u,
|
|
6625
6612
|
!!Q && !Q.is_mine,
|
|
6626
|
-
Qt(u) ?
|
|
6613
|
+
Qt(u) ? bl(u) === "nivaro_users" ? (() => {
|
|
6627
6614
|
var ae, Se, lt;
|
|
6628
6615
|
const T = u.includes(".") ? u : ze[u], Ve = ((lt = (Se = (ae = ye == null ? void 0 : ye.rows) == null ? void 0 : ae[String(s)]) == null ? void 0 : Se[T]) == null ? void 0 : lt.ids) ?? [], Y = ht(s, u) ?? "";
|
|
6629
6616
|
if (Ve.length === 0 || !Y || Y === "—")
|
|
6630
6617
|
return /* @__PURE__ */ n("span", { className: "text-[12px] text-slate-300", children: "—" });
|
|
6631
6618
|
if (Ve.length === 1)
|
|
6632
|
-
return /* @__PURE__ */ n("span", { onClick: (ct) => ct.stopPropagation(), children: /* @__PURE__ */ n(
|
|
6619
|
+
return /* @__PURE__ */ n("span", { onClick: (ct) => ct.stopPropagation(), children: /* @__PURE__ */ n(us, { userId: String(Ve[0]), size: "compact" }) });
|
|
6633
6620
|
const ce = Y.split(", ");
|
|
6634
6621
|
return /* @__PURE__ */ n(
|
|
6635
|
-
|
|
6622
|
+
cs,
|
|
6636
6623
|
{
|
|
6637
6624
|
users: Ve.map((ct, ia) => ({
|
|
6638
6625
|
id: String(ct),
|
|
@@ -6653,7 +6640,7 @@ ${r}`).then(() => {
|
|
|
6653
6640
|
"data-tip": ht(s, u) ?? void 0,
|
|
6654
6641
|
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]",
|
|
6655
6642
|
children: [
|
|
6656
|
-
((nn = I[u]) == null ? void 0 : nn.type) === "count" &&
|
|
6643
|
+
((nn = I[u]) == null ? void 0 : nn.type) === "count" && gl(u) ? "📎 " : "",
|
|
6657
6644
|
mn(ht(s, u) ?? "", u, s)
|
|
6658
6645
|
]
|
|
6659
6646
|
}
|
|
@@ -6662,9 +6649,9 @@ ${r}`).then(() => {
|
|
|
6662
6649
|
{
|
|
6663
6650
|
className: "block max-w-[260px] truncate text-[12px] text-slate-700 dark:text-slate-200",
|
|
6664
6651
|
"data-tip": ht(s, u) ?? void 0,
|
|
6665
|
-
children: ht(s, u) != null ? `${((G = I[u]) == null ? void 0 : G.type) === "count" &&
|
|
6652
|
+
children: ht(s, u) != null ? `${((G = I[u]) == null ? void 0 : G.type) === "count" && gl(u) ? "📎 " : ""}${mn(ht(s, u) ?? "", u, s)}` : /* @__PURE__ */ n("span", { className: "inline-block h-3.5 w-16 animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" })
|
|
6666
6653
|
}
|
|
6667
|
-
) : (Qe == null ? void 0 : Qe.one_collection) === "nivaro_users" && l[u] != null ? /* @__PURE__ */ n("span", { onClick: (T) => T.stopPropagation(), children: /* @__PURE__ */ n(
|
|
6654
|
+
) : (Qe == null ? void 0 : Qe.one_collection) === "nivaro_users" && l[u] != null ? /* @__PURE__ */ n("span", { onClick: (T) => T.stopPropagation(), children: /* @__PURE__ */ n(us, { userId: String(l[u]), size: "compact" }) }) : Qe != null && Qe.one_collection && l[u] != null && !Nt(Qe.one_collection) ? /* @__PURE__ */ n(
|
|
6668
6655
|
"button",
|
|
6669
6656
|
{
|
|
6670
6657
|
type: "button",
|
|
@@ -6685,7 +6672,7 @@ ${r}`).then(() => {
|
|
|
6685
6672
|
}
|
|
6686
6673
|
)
|
|
6687
6674
|
}
|
|
6688
|
-
) : u === "id" &&
|
|
6675
|
+
) : u === "id" && as(D, l) ? (
|
|
6689
6676
|
// #776 — the readable id; the internal one on hover.
|
|
6690
6677
|
/* @__PURE__ */ n(
|
|
6691
6678
|
"span",
|
|
@@ -6693,7 +6680,7 @@ ${r}`).then(() => {
|
|
|
6693
6680
|
"data-record-ref": !0,
|
|
6694
6681
|
"data-tip": `#${String(l.id)}`,
|
|
6695
6682
|
className: "font-mono text-[12px] text-slate-700 dark:text-slate-200",
|
|
6696
|
-
children:
|
|
6683
|
+
children: as(D, l)
|
|
6697
6684
|
}
|
|
6698
6685
|
)
|
|
6699
6686
|
) : I[u] && l[u] != null ? /* @__PURE__ */ n(
|
|
@@ -6701,7 +6688,7 @@ ${r}`).then(() => {
|
|
|
6701
6688
|
{
|
|
6702
6689
|
className: Ut(
|
|
6703
6690
|
"text-[12px] tabular-nums text-slate-700 dark:text-slate-200",
|
|
6704
|
-
ca(l[u], He[u]) &&
|
|
6691
|
+
ca(l[u], He[u]) && fs[ca(l[u], He[u])]
|
|
6705
6692
|
),
|
|
6706
6693
|
children: hn(String(l[u]), I[u])
|
|
6707
6694
|
}
|
|
@@ -6710,10 +6697,10 @@ ${r}`).then(() => {
|
|
|
6710
6697
|
{
|
|
6711
6698
|
className: Ut(
|
|
6712
6699
|
"text-[12px]",
|
|
6713
|
-
|
|
6700
|
+
fs[ca(l[u], He[u])]
|
|
6714
6701
|
),
|
|
6715
6702
|
children: /* @__PURE__ */ n(
|
|
6716
|
-
|
|
6703
|
+
bs,
|
|
6717
6704
|
{
|
|
6718
6705
|
collection: a,
|
|
6719
6706
|
field: u,
|
|
@@ -6724,11 +6711,11 @@ ${r}`).then(() => {
|
|
|
6724
6711
|
)
|
|
6725
6712
|
}
|
|
6726
6713
|
) : /* @__PURE__ */ n(
|
|
6727
|
-
|
|
6714
|
+
bs,
|
|
6728
6715
|
{
|
|
6729
6716
|
collection: a,
|
|
6730
6717
|
field: u,
|
|
6731
|
-
fieldType: ((
|
|
6718
|
+
fieldType: ((Re = yt.get(u)) == null ? void 0 : Re.type) ?? null,
|
|
6732
6719
|
value: l[u],
|
|
6733
6720
|
relations: We
|
|
6734
6721
|
}
|
|
@@ -6742,7 +6729,7 @@ ${r}`).then(() => {
|
|
|
6742
6729
|
},
|
|
6743
6730
|
String(s)
|
|
6744
6731
|
);
|
|
6745
|
-
}) },
|
|
6732
|
+
}) }, Vs),
|
|
6746
6733
|
Aa && Object.keys(Aa).length > 0 && !oe && /* @__PURE__ */ n("tfoot", { className: "text-[12px] tabular-nums", children: /* @__PURE__ */ c("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: [
|
|
6747
6734
|
qt && /* @__PURE__ */ n("td", { className: "sticky left-0 z-[3] w-11 bg-slate-50 py-1.5 pl-1.5 pr-3 dark:bg-slate-800" }),
|
|
6748
6735
|
tn.map((e, t) => {
|
|
@@ -6751,8 +6738,8 @@ ${r}`).then(() => {
|
|
|
6751
6738
|
"td",
|
|
6752
6739
|
{
|
|
6753
6740
|
className: `whitespace-nowrap px-3 py-1.5 ${rt(r, "z-[3]", "bg-slate-50 dark:bg-slate-800")}`,
|
|
6754
|
-
style:
|
|
6755
|
-
"data-tip": l != null ? `Sum of ${Ze(r)} across all ${ut(
|
|
6741
|
+
style: Fe(r),
|
|
6742
|
+
"data-tip": l != null ? `Sum of ${Ze(r)} across all ${ut(Le)} matching records` : void 0,
|
|
6756
6743
|
children: l != null ? /* @__PURE__ */ n("span", { className: "text-slate-700 dark:text-slate-200", children: I[r] ? hn(String(l), I[r]) : ut(Math.round(l * 100) / 100) }) : t === 0 ? /* @__PURE__ */ n("span", { className: "text-[10.5px] font-semibold uppercase tracking-wide text-slate-400", children: "Σ totals" }) : null
|
|
6757
6744
|
},
|
|
6758
6745
|
r
|
|
@@ -6764,9 +6751,9 @@ ${r}`).then(() => {
|
|
|
6764
6751
|
)
|
|
6765
6752
|
}
|
|
6766
6753
|
),
|
|
6767
|
-
/* @__PURE__ */ n(
|
|
6754
|
+
/* @__PURE__ */ n(Hd, { scrollerRef: Lr }),
|
|
6768
6755
|
/* @__PURE__ */ n(
|
|
6769
|
-
|
|
6756
|
+
pc,
|
|
6770
6757
|
{
|
|
6771
6758
|
collections: a ? [a] : [],
|
|
6772
6759
|
selectedIds: Lt,
|
|
@@ -6778,19 +6765,19 @@ ${r}`).then(() => {
|
|
|
6778
6765
|
className: "shrink-0 border-t border-slate-100 bg-white px-3 py-1.5 dark:border-slate-800 dark:bg-slate-900"
|
|
6779
6766
|
}
|
|
6780
6767
|
),
|
|
6781
|
-
oe &&
|
|
6768
|
+
oe && Le > 500 && /* @__PURE__ */ c("p", { className: "shrink-0 border-t border-slate-100 bg-white px-3 py-2 text-[12px] text-slate-500 dark:border-slate-800 dark:bg-slate-900", children: [
|
|
6782
6769
|
"Grouping the first ",
|
|
6783
6770
|
ut(500),
|
|
6784
6771
|
" of ",
|
|
6785
|
-
ut(
|
|
6772
|
+
ut(Le),
|
|
6786
6773
|
" records — narrow the filters to group everything."
|
|
6787
6774
|
] }),
|
|
6788
|
-
!oe && !
|
|
6775
|
+
!oe && !Pe && (en ? $ > 1 || ge.length >= Xe : Le > Xe) && /* @__PURE__ */ c("div", { className: "flex shrink-0 items-center justify-between border-t border-slate-100 bg-white px-3 py-2 dark:border-slate-800 dark:bg-slate-900", children: [
|
|
6789
6776
|
/* @__PURE__ */ c("p", { className: "text-[12px] tabular-nums text-slate-500 dark:text-slate-400", children: [
|
|
6790
6777
|
/* @__PURE__ */ c("span", { className: "font-semibold text-slate-700 dark:text-slate-200", children: [
|
|
6791
|
-
ut(
|
|
6778
|
+
ut(To),
|
|
6792
6779
|
"–",
|
|
6793
|
-
ut(
|
|
6780
|
+
ut(Lo)
|
|
6794
6781
|
] }),
|
|
6795
6782
|
" ",
|
|
6796
6783
|
"of",
|
|
@@ -6806,7 +6793,7 @@ ${r}`).then(() => {
|
|
|
6806
6793
|
),
|
|
6807
6794
|
" "
|
|
6808
6795
|
] }),
|
|
6809
|
-
en ? /* @__PURE__ */ n("span", { "data-tip": "The count took too long. The rows on screen are complete.", children: "many" }) : /* @__PURE__ */ n("span", { className: "nvr-value-pulse-bg rounded-sm", children: ut(
|
|
6796
|
+
en ? /* @__PURE__ */ n("span", { "data-tip": "The count took too long. The rows on screen are complete.", children: "many" }) : /* @__PURE__ */ n("span", { className: "nvr-value-pulse-bg rounded-sm", children: ut(Le) }, Le),
|
|
6810
6797
|
" ",
|
|
6811
6798
|
"records"
|
|
6812
6799
|
] }),
|
|
@@ -6867,7 +6854,7 @@ ${r}`).then(() => {
|
|
|
6867
6854
|
}
|
|
6868
6855
|
),
|
|
6869
6856
|
Je != null && Je.length ? /* @__PURE__ */ n(
|
|
6870
|
-
|
|
6857
|
+
uc,
|
|
6871
6858
|
{
|
|
6872
6859
|
collection: Je[0].collection,
|
|
6873
6860
|
itemId: Je[0].itemId,
|
|
@@ -6879,7 +6866,7 @@ ${r}`).then(() => {
|
|
|
6879
6866
|
}
|
|
6880
6867
|
) : null,
|
|
6881
6868
|
_n && /* @__PURE__ */ n(
|
|
6882
|
-
|
|
6869
|
+
xc,
|
|
6883
6870
|
{
|
|
6884
6871
|
collection: a,
|
|
6885
6872
|
item: _n,
|
|
@@ -6889,10 +6876,10 @@ ${r}`).then(() => {
|
|
|
6889
6876
|
}
|
|
6890
6877
|
}
|
|
6891
6878
|
),
|
|
6892
|
-
qt && bt && tr && !oe &&
|
|
6879
|
+
qt && bt && tr && !oe && Le > ge.length && Jt.length < Math.min(Le, oa) && /* @__PURE__ */ c("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: [
|
|
6893
6880
|
/* @__PURE__ */ c("span", { className: "text-slate-600 dark:text-muted-foreground", children: [
|
|
6894
6881
|
"All ",
|
|
6895
|
-
|
|
6882
|
+
ge.length,
|
|
6896
6883
|
" rows on this page are selected."
|
|
6897
6884
|
] }),
|
|
6898
6885
|
" ",
|
|
@@ -6900,22 +6887,22 @@ ${r}`).then(() => {
|
|
|
6900
6887
|
"button",
|
|
6901
6888
|
{
|
|
6902
6889
|
type: "button",
|
|
6903
|
-
disabled:
|
|
6904
|
-
onClick: () => void
|
|
6890
|
+
disabled: $l,
|
|
6891
|
+
onClick: () => void qo(),
|
|
6905
6892
|
className: "font-semibold text-nvr-navy underline decoration-dotted hover:text-nvr-cyan dark:text-nvr-cyan",
|
|
6906
|
-
children:
|
|
6893
|
+
children: $l ? "Selecting…" : Le > oa ? `Select the first ${oa.toLocaleString()} of ${Le.toLocaleString()} matching` : `Select all ${Le.toLocaleString()} matching rows`
|
|
6907
6894
|
}
|
|
6908
6895
|
)
|
|
6909
6896
|
] }),
|
|
6910
6897
|
qt && bt && Jt.length > 0 && /* @__PURE__ */ n(
|
|
6911
|
-
|
|
6898
|
+
zc,
|
|
6912
6899
|
{
|
|
6913
6900
|
collection: a,
|
|
6914
6901
|
selectedIds: Jt,
|
|
6915
6902
|
transitions: (Mt == null ? void 0 : Mt.transitions) ?? [],
|
|
6916
|
-
fields: (
|
|
6917
|
-
relations: (
|
|
6918
|
-
registryKeys:
|
|
6903
|
+
fields: (D == null ? void 0 : D.fields) ?? [],
|
|
6904
|
+
relations: (D == null ? void 0 : D.relations) ?? [],
|
|
6905
|
+
registryKeys: qe.bulk_actions ?? null,
|
|
6919
6906
|
onClear: () => Gt([]),
|
|
6920
6907
|
onSuccess: () => ma(_, a)
|
|
6921
6908
|
}
|
|
@@ -6924,7 +6911,7 @@ ${r}`).then(() => {
|
|
|
6924
6911
|
}
|
|
6925
6912
|
);
|
|
6926
6913
|
}
|
|
6927
|
-
function
|
|
6914
|
+
function Uc(a, o, b, i) {
|
|
6928
6915
|
const v = kr(o, a, b);
|
|
6929
6916
|
if (v != null && v.one_collection) return /* @__PURE__ */ n(yr, { relatedCollection: v.one_collection, id: i });
|
|
6930
6917
|
if (typeof i == "boolean") return i ? "Yes" : "No";
|
|
@@ -6933,12 +6920,12 @@ function zc(a, o, b, i) {
|
|
|
6933
6920
|
return /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/.test(w) ? new Date(w).toLocaleString() : w.length > 160 ? `${w.slice(0, 160)}…` : w;
|
|
6934
6921
|
}
|
|
6935
6922
|
export {
|
|
6936
|
-
|
|
6923
|
+
yp as CollectionBrowserView,
|
|
6937
6924
|
va as MultiPick,
|
|
6938
|
-
|
|
6939
|
-
|
|
6925
|
+
qc as RowActionsMenu,
|
|
6926
|
+
fs as TINT_TEXT,
|
|
6940
6927
|
ma as invalidateCbvRowQueries,
|
|
6941
|
-
|
|
6942
|
-
|
|
6928
|
+
$c as roleMayDelete,
|
|
6929
|
+
Cc as roleMayUpdate,
|
|
6943
6930
|
ca as tintFor
|
|
6944
6931
|
};
|