@nivaro/react 0.3.137 → 0.3.139
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 +95 -4
- package/dist/index.js +748 -743
- package/dist/shared/components/CollectionBrowserView.js +392 -389
- package/dist/shared/components/DelegateCoverLine.js +80 -87
- package/dist/shared/components/ItemEditForm.js +589 -588
- package/dist/shared/components/MyWorkView.js +284 -286
- package/dist/shared/components/NotificationBell.js +251 -205
- package/dist/shared/components/ai/AiAnalyticsView.js +878 -417
- package/dist/shared/components/ai/AiPlanCard.js +164 -122
- package/dist/shared/components/ai/AiPlanUndo.js +291 -0
- package/dist/shared/components/ai/call-log/CallDrawer.js +357 -0
- package/dist/shared/components/ai/call-log/RawJson.js +126 -0
- package/dist/shared/components/ai/call-log/ThreadView.js +223 -0
- package/dist/shared/components/ai/call-log/TranscriptView.js +227 -0
- package/dist/shared/components/ai/call-log/controls.js +364 -0
- package/dist/shared/components/ai/call-log/format.js +46 -0
- package/dist/shared/components/ai/call-log/url.js +105 -0
- package/dist/shared/components/chat/chat-core.js +422 -346
- package/dist/shared/components/integrations/IntegrationObligationsView.js +98 -98
- package/dist/shared/components/integrations/RecordIntegrationPreview.js +102 -93
- package/dist/shared/components/integrations/console/api.js +11 -1
- package/dist/shared/components/item-edit/HeaderRollupExplainer.js +5 -1
- package/dist/shared/components/item-edit/RecordLiveSync.js +241 -229
- package/dist/shared/components/item-edit/RecordRecapChanges.js +166 -0
- package/dist/shared/components/item-edit/RecordRecapStrip.js +254 -84
- package/dist/shared/components/item-edit/live-related.js +34 -18
- package/dist/shared/components/panels/RevisionsPanel.js +735 -683
- package/dist/shared/components/queue/QueueWorklist.js +323 -316
- package/dist/shared/components/support/SupportRequestDialog.js +198 -181
- package/dist/shared/components/trackers/use-tracker-link.js +74 -65
- package/dist/shared/lib/activity-sentence.js +167 -151
- package/dist/shared/lib/config-update-refresh.js +34 -0
- package/dist/shared/lib/config-watch.js +17 -17
- package/dist/shared/lib/gap-refresh.js +49 -0
- package/dist/shared/lib/integration-dots.js +8 -8
- package/dist/shared/lib/live-ops.js +26 -23
- package/dist/shared/lib/live-pickers.js +1 -1
- package/dist/shared/lib/live-queries.js +223 -195
- package/dist/shared/lib/live.js +56 -51
- package/dist/shared/lib/obligation-banner.js +11 -10
- package/dist/shared/lib/obligation-filters.js +22 -18
- package/dist/shared/lib/obligation-reason-text.js +18 -8
- package/dist/shared/lib/presence-hooks.js +133 -132
- package/dist/shared/lib/reconnect-resync.js +90 -0
- package/dist/shared/lib/record-room-holds.js +43 -0
- package/dist/shared/lib/socket-realtime.js +116 -105
- package/dist/shared/lib/user-sync.js +1 -6
- package/package.json +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as a, jsxs as _, Fragment as It } from "react/jsx-runtime";
|
|
2
|
-
import { useQueryClient as u_, useQuery as vt, useQueries as Ci, useMutation as
|
|
3
|
-
import { Loader2 as Ps, ArrowLeft as f_, Check as vr, Copy as Es, Wand2 as m_, BookOpen as p_, Lock as
|
|
2
|
+
import { useQueryClient as u_, useQuery as vt, useQueries as Ci, useMutation as Vm } from "@tanstack/react-query";
|
|
3
|
+
import { Loader2 as Ps, ArrowLeft as f_, Check as vr, Copy as Es, Wand2 as m_, BookOpen as p_, Lock as Hm, PencilLine as h_, Clipboard as g_, Waypoints as Gm, PictureInPicture2 as y_, FileDown as Jm, MessageSquarePlus as __, Wrench as b_, Eye as v_, MoveRight as w_, Trash2 as k_, LifeBuoy as x_, Save as Ym, ChevronDown as $i, LayoutTemplate as S_, AlertTriangle as N_, ChevronLeft as Zm, ChevronRight as Xm, AlertCircle as Hp, X as C_ } from "lucide-react";
|
|
4
4
|
import { useContext as $_, useState as I, useRef as N, useEffect as B, useMemo as A, useCallback as de, useId as R_, Fragment as ud } from "react";
|
|
5
5
|
import { createPortal as O_ } from "react-dom";
|
|
6
6
|
import { toast as _e } from "sonner";
|
|
7
|
-
import { useNivaroClient as F_, useApiFetchConfig as j_, ItemEditAuthContext as A_, useItemNavigation as T_, useRecordSurface as
|
|
7
|
+
import { useNivaroClient as F_, useApiFetchConfig as j_, ItemEditAuthContext as A_, useItemNavigation as T_, useRecordSurface as ep, useNavigation as q_, ReimportHandlerContext as I_, RelationPathDataContext as P_, ParentDraftContext as E_, GridFlushContext as L_, StaleFieldReportContext as M_ } from "../context.js";
|
|
8
8
|
import { useSlowReason as K_ } from "../hooks/useSlowReason.js";
|
|
9
9
|
import { formatApiPayload as D_ } from "../lib/api-payload.js";
|
|
10
|
-
import { openSectionOf as
|
|
10
|
+
import { openSectionOf as tp } from "../lib/co-edit.js";
|
|
11
11
|
import { coeditCovers as B_ } from "../lib/coedit-registry.js";
|
|
12
12
|
import { getActiveLayout as W_, get as ie, post as mn, del as br, patch as Ri, put as z_ } from "../lib/commands.js";
|
|
13
|
-
import { headerCopySkip as
|
|
13
|
+
import { headerCopySkip as np, fetchCopySkip as fd, childCopySkip as Q_ } from "../lib/copy-rules.js";
|
|
14
14
|
import { useDerivedCausesLive as U_ } from "../lib/derived-causes.js";
|
|
15
15
|
import { prefillSignature as V_, loadDraft as H_, draftHasContent as md, draftMatchesPrefill as G_, deleteDraft as qs, draftCreatedAs as J_, draftFilledBack as Y_, markDraftCreated as Z_, draftKey as X_, keepDraftSavedAt as e0, thisDraftDevice as t0, lineBasesForDraft as n0, saveDraft as r0, draftPersistDecision as s0 } from "../lib/draft-store.js";
|
|
16
16
|
import { editLockLockedFields as i0 } from "../lib/edit-lock-fields.js";
|
|
@@ -22,11 +22,11 @@ import { parseFieldDeepLink as u0 } from "../lib/field-comments.js";
|
|
|
22
22
|
import { setFiscalStartMonth as f0 } from "../lib/fiscal.js";
|
|
23
23
|
import { formReadyToSave as m0, FORM_NOT_READY_MESSAGE as p0 } from "../lib/form-ready.js";
|
|
24
24
|
import { isEmptyValue as pd, stickyGroupKey as h0, planFieldGrid as g0, isFolded as y0, readGroupStructure as _0 } from "../lib/form-structure.js";
|
|
25
|
-
import { HEADER_BAND as b0, HEADER_ROW as v0, HEADER_TILES as w0, HEADER_TILE as hd, HEADER_LABEL as
|
|
25
|
+
import { HEADER_BAND as b0, HEADER_ROW as v0, HEADER_TILES as w0, HEADER_TILE as hd, HEADER_LABEL as rp, HEADER_VALUE_LINE as sp, HEADER_VALUE_HERO as k0, HEADER_VALUE as x0, HEADER_VALUE_AFTER_MARK as S0, HEADER_MARK as N0, HEADER_COPY_BESIDE_MARK as ip, HEADER_DOCK_INLINE as C0, HEADER_DOCK as $0, HEADER_DOCK_CELL as R0 } from "../lib/header-strip.js";
|
|
26
26
|
import { layoutGrantedTools as O0 } from "../lib/layout-grants.js";
|
|
27
|
-
import { translateGroup as F0, formLocale as
|
|
27
|
+
import { translateGroup as F0, formLocale as Gp, translateFieldRow as j0 } from "../lib/layout-i18n.js";
|
|
28
28
|
import { currentViewport as A0, quietHiddenSectionsOf as T0 } from "../lib/layout-resolve.js";
|
|
29
|
-
import { extSlotKey as
|
|
29
|
+
import { extSlotKey as op } from "../lib/layout-slots.js";
|
|
30
30
|
import { useLeaveLinkGuard as q0 } from "../lib/leave-guard.js";
|
|
31
31
|
import { LineLockContext as I0 } from "../lib/line-locks.js";
|
|
32
32
|
import { useLinkedRecordWatch as P0, linkedChangeSentence as E0 } from "../lib/linked-changes.js";
|
|
@@ -36,27 +36,27 @@ import { useLiveRefetchInterval as B0 } from "../lib/live-queries.js";
|
|
|
36
36
|
import { useShownRecords as W0 } from "../lib/missed-updates.js";
|
|
37
37
|
import { requestMoveState as z0 } from "../lib/move-state.js";
|
|
38
38
|
import { namedMovedNoticeRecent as Q0, lockedAfterMoveText as U0, movedNoticeId as V0 } from "../lib/moved-notice.js";
|
|
39
|
-
import { ownersHeaderTile as
|
|
39
|
+
import { ownersHeaderTile as ap } from "../lib/owners-header-tile.js";
|
|
40
40
|
import { queryKeys as gd } from "../lib/query-keys.js";
|
|
41
41
|
import { useOptionalRealtime as H0 } from "../lib/realtime.js";
|
|
42
42
|
import { useRecordReader as G0 } from "../lib/record-loader.js";
|
|
43
|
-
import { bindRecordOutbox as J0, nudgeOutboxReview as
|
|
43
|
+
import { bindRecordOutbox as J0, nudgeOutboxReview as lp, settleRecordOutbox as Y0, midairCollisionOf as yd, isOfflineSaveError as Z0, enqueueRecordSave as X0, claimRecordOutbox as dp, checkUnknownBase as eb, onRecordOutboxRetry as tb, onRecordOutboxEvent as nb, discardRecordOutbox as rb, retryRecordOutbox as sb } from "../lib/record-outbox.js";
|
|
44
44
|
import { isRecordPopout as ib, openRecordPopout as ob } from "../lib/record-popout.js";
|
|
45
45
|
import { announceRecordTabs as ab } from "../lib/record-tabs.js";
|
|
46
46
|
import { invalidateRecordTasks as lb } from "../lib/record-tasks.js";
|
|
47
47
|
import { reimportAllowed as db } from "../lib/reimport-visibility.js";
|
|
48
48
|
import { useRollupRecalc as cb, recalcFeeds as ub } from "../lib/rollup-recalc.js";
|
|
49
49
|
import { userErrorMessage as _d, reportCodeError as fb } from "../lib/safe-error.js";
|
|
50
|
-
import { SAVE_PROGRESS_MIN_ROWS as mb, newSaveId as pb, saveProgressText as
|
|
50
|
+
import { SAVE_PROGRESS_MIN_ROWS as mb, newSaveId as pb, saveProgressText as cp, withSaveId as hb } from "../lib/save-progress.js";
|
|
51
51
|
import { currentRecordTab as gb } from "../lib/send-view.js";
|
|
52
52
|
import { formSkeletonFromLayout as yb } from "../lib/skeleton-shapes.js";
|
|
53
53
|
import { stagedRowLabel as Oi } from "../lib/staged-row-labels.js";
|
|
54
54
|
import { normalizeSummaryModeRules as Fi, approvalBadgeStates as _b, summaryRulesNeedRole as bb, summaryRulesNeedState as vb, summaryRulesNeedRecord as wb, summaryResolveSignature as kb, sameSummaryRecord as xb, holdSummaryReresolve as Sb, resolveSummaryMode as Nb } from "../lib/summary-mode.js";
|
|
55
|
-
import { mayHavePipeline as
|
|
55
|
+
import { mayHavePipeline as up, hasRecordExtras as Cb } from "../lib/system-collections.js";
|
|
56
56
|
import { templateRelationPaths as $b, withLinkedFields as Rb } from "../lib/template-paths.js";
|
|
57
57
|
import { useUnsavedWork as Ob, isReloadingForUpdate as Fb } from "../lib/unsaved-work.js";
|
|
58
|
-
import { titleCase as ge, choiceLabel as Td, cn as Oe, formatDateTime as Di, formatDate as jb, toLocalDateString as
|
|
59
|
-
import { applyValidationRule as
|
|
58
|
+
import { titleCase as ge, choiceLabel as Td, cn as Oe, formatDateTime as Di, formatDate as jb, toLocalDateString as Jp } from "../lib/utils.js";
|
|
59
|
+
import { applyValidationRule as Yp } from "../lib/validation-rules.js";
|
|
60
60
|
import { matchesVisibleWhen as Ab } from "../lib/visible-when.js";
|
|
61
61
|
import { FieldSourcesContext as Tb } from "./ConfigReadBack.js";
|
|
62
62
|
import { CopyAsButton as qb } from "./CopyAsButton.js";
|
|
@@ -67,9 +67,9 @@ import { HelpVideoButton as Lb } from "./help-videos/viewer/HelpVideoButton.js";
|
|
|
67
67
|
import { DocumentAutofillButton as Mb } from "./import/DocumentAutofillButton.js";
|
|
68
68
|
import { evaluateImportLineRules as bd, RULE_SET_KEY as Kb } from "./import/evaluateLineRules.js";
|
|
69
69
|
import { ImportColumnChips as Db } from "./import/ImportColumnChips.js";
|
|
70
|
-
import { ImportFromFileButton as
|
|
71
|
-
import { ImportIssuesPanel as
|
|
72
|
-
import { diffReimportLines as Bb, reimportRestoredDeletes as Wb, reimportPendingNotice as zb, reimportMatchKey as
|
|
70
|
+
import { ImportFromFileButton as fp } from "./import/ImportFromFileButton.js";
|
|
71
|
+
import { ImportIssuesPanel as mp } from "./import/ImportIssuesPanel.js";
|
|
72
|
+
import { diffReimportLines as Bb, reimportRestoredDeletes as Wb, reimportPendingNotice as zb, reimportMatchKey as pp } from "./import/reimportDiff.js";
|
|
73
73
|
import { AddendumO2MContext as Qb, AddendumViewContext as Ub, AddendumFieldContext as Vb } from "./item-edit/AddendumFieldContext.js";
|
|
74
74
|
import { useAutoIdPreview as Hb } from "./item-edit/AutoIdPreviewField.js";
|
|
75
75
|
import { addendumViewGone as Gb } from "./item-edit/addendum-view.js";
|
|
@@ -77,8 +77,8 @@ import { ChangedAfterApprovalBadge as Jb } from "./item-edit/ChangedAfterApprova
|
|
|
77
77
|
import { changeReasonChallenge as vd, ChangeReasonDialog as Yb } from "./item-edit/ChangeReasonDialog.js";
|
|
78
78
|
import { ChangesTray as Zb } from "./item-edit/ChangesTray.js";
|
|
79
79
|
import { CloneDialog as Xb } from "./item-edit/CloneDialog.js";
|
|
80
|
-
import { isCascadePickMessage as qi, settleTouchedAfterSave as ev, useCascadeClearNotices as tv, cascadePickMessage as
|
|
81
|
-
import { isCoeditInterface as sv, sharedTextUnderLock as
|
|
80
|
+
import { isCascadePickMessage as qi, settleTouchedAfterSave as ev, useCascadeClearNotices as tv, cascadePickMessage as hp, CascadeClearNoticeContext as nv, notePersonLinkEdit as rv } from "./item-edit/cascade-clear-notice.js";
|
|
81
|
+
import { isCoeditInterface as sv, sharedTextUnderLock as gp, saveValidationScope as iv, CoeditFormContext as ov } from "./item-edit/coedit/context.js";
|
|
82
82
|
import { columnLengthError as av } from "./item-edit/column-length.js";
|
|
83
83
|
import { configUpdateReaction as lv } from "./item-edit/config-update.js";
|
|
84
84
|
import { DraftRecoveryBanner as dv } from "./item-edit/DraftRecoveryBanner.js";
|
|
@@ -101,26 +101,26 @@ import { HeaderSummaryChip as Pv } from "./item-edit/HeaderSummaryChip.js";
|
|
|
101
101
|
import { HeaderTools as Ev, HeaderToolGroup as Lv, HeaderMenu as Mv } from "./item-edit/HeaderTools.js";
|
|
102
102
|
import { HeldEditsChip as Kv } from "./item-edit/HeldEditsChip.js";
|
|
103
103
|
import { HighlightedCode as Dv } from "./item-edit/HighlightedCode.js";
|
|
104
|
-
import { staleDraftConflicts as Bv, restoredDraftCollisions as Wv, clientMidairError as zv, conflictsNeedingPerson as
|
|
104
|
+
import { staleDraftConflicts as Bv, restoredDraftCollisions as Wv, clientMidairError as zv, conflictsNeedingPerson as yp, saveIsEcho as Qv, resolveHeaderCollision as Uv } from "./item-edit/header-midair.js";
|
|
105
105
|
import { keepResolvedPaths as Vv, useHeaderPathPreview as Hv } from "./item-edit/header-path-preview.js";
|
|
106
|
-
import { parseJson as er, getCascadeFilters as
|
|
106
|
+
import { parseJson as er, getCascadeFilters as _p, SYSTEM_FIELDS as rn, isSentinelKey as zr, applyDisplayTemplate as kd, useContainerWidth as Gv, resolveColSpan as xd } from "./item-edit/helpers.js";
|
|
107
107
|
import { evalClientFormula as Jv } from "./item-edit/InlineTableField.js";
|
|
108
108
|
import { LayoutContentBlock as Yv, SectionIntro as Zv } from "./item-edit/LayoutContentBlock.js";
|
|
109
109
|
import { LiveTraceSheet as Xv } from "./item-edit/LiveTraceSheet.js";
|
|
110
|
-
import { useSmoothLayout as ew, layoutMayChange as tw, formUpdatedText as nw, placedFields as Sd, splitUnsaved as rw, splitStagedLinks as sw, linkChangeText as iw, fieldStatus as
|
|
110
|
+
import { useSmoothLayout as ew, layoutMayChange as tw, formUpdatedText as nw, placedFields as Sd, splitUnsaved as rw, splitStagedLinks as sw, linkChangeText as iw, fieldStatus as bp } from "./item-edit/layout-switch.js";
|
|
111
111
|
import { deferredSections as ow } from "./item-edit/lazy-sections.js";
|
|
112
112
|
import { restoredLineConflicts as aw, mergeEditOf as Nd } from "./item-edit/line-merge.js";
|
|
113
|
-
import { rowBaseBookFor as Cd, fetchLatestRevisions as ca, noteLineReads as lw, lineLabelOf as ua, withRowBaseRevision as
|
|
114
|
-
import { ruleValueFor as
|
|
113
|
+
import { rowBaseBookFor as Cd, fetchLatestRevisions as ca, noteLineReads as lw, lineLabelOf as ua, withRowBaseRevision as vp, lineConflictKey as dw, resolveLineCollision as cw } from "./item-edit/line-midair.js";
|
|
114
|
+
import { ruleValueFor as Zp, NUMBER_FIELD_TYPES as uw, checkNumberEntry as fw } from "./item-edit/line-qty.js";
|
|
115
115
|
import { liveRecordWrite as mw } from "./item-edit/live-record-marks.js";
|
|
116
|
-
import { parseRollupSources as
|
|
116
|
+
import { parseRollupSources as wp, parseRollupParentFilter as pw, matchesRollupFilter as hw, computeLiveRollup as gw, isDerivedForRecord as $d } from "./item-edit/live-rollups.js";
|
|
117
117
|
import { headingLinksKey as yw, useLiveHeadingFill as _w, LiveTitleText as bw } from "./item-edit/live-title.js";
|
|
118
118
|
import { useLockWhy as vw, refineLockReasons as ww, HiddenByRulesNote as kw } from "./item-edit/lock-why.js";
|
|
119
|
-
import { m2aWriteMeta as xw, parseM2aToken as Sw, resolveM2MRelatedCollection as
|
|
119
|
+
import { m2aWriteMeta as xw, parseM2aToken as Sw, resolveM2MRelatedCollection as Xp } from "./item-edit/M2MCombobox.js";
|
|
120
120
|
import { M2MStagingContext as Nw } from "./item-edit/M2MStagingContext.js";
|
|
121
121
|
import { useM2MStaging as O$ } from "./item-edit/M2MStagingContext.js";
|
|
122
122
|
import { MidairCollisionDialog as Cw, LineCollisionDialog as $w } from "./item-edit/MidairCollisionDialog.js";
|
|
123
|
-
import { invalidateM2MFor as
|
|
123
|
+
import { invalidateM2MFor as kp, editedRowIds as Rw } from "./item-edit/m2m-invalidate.js";
|
|
124
124
|
import { newFieldError as Ow, unsavedBeforeMove as Fw, moveBlockedAfterSave as jw } from "./item-edit/move-guard.js";
|
|
125
125
|
import { O2MStagingContext as Aw, LiveRowsContext as Tw, StagedRelationsContext as qw } from "./item-edit/O2MStagingContext.js";
|
|
126
126
|
import { usePartnerNeedsForm as Iw, PartnerNeedsContext as Pw } from "./item-edit/partner-needs.js";
|
|
@@ -143,17 +143,17 @@ import { RecordSubscribeButton as uk } from "./item-edit/RecordSubscribeButton.j
|
|
|
143
143
|
import { RemoteChangesButton as fk } from "./item-edit/RemoteChangeUi.js";
|
|
144
144
|
import { RuleHiddenNotes as mk } from "./item-edit/RuleHiddenNotes.js";
|
|
145
145
|
import { isNarrowRecordWidth as pk } from "./item-edit/rail-width.js";
|
|
146
|
-
import { rememberRecordLookups as hk, recordLookupsFor as
|
|
146
|
+
import { rememberRecordLookups as hk, recordLookupsFor as xp } from "./item-edit/record-lookups.js";
|
|
147
147
|
import { useStableFieldAffordances as gk } from "./item-edit/render-stability.js";
|
|
148
148
|
import { ruleHiddenGroups as yk, groupHasReadableField as _k } from "./item-edit/rule-hidden.js";
|
|
149
149
|
import { ScheduledChangeChip as bk } from "./item-edit/ScheduledChangeChip.js";
|
|
150
150
|
import { saveLeftWorkStaged as vk, saveClosingMessage as wk, SAVE_OUTCOME_TOAST_ID as kk } from "./item-edit/save-outcome.js";
|
|
151
151
|
import { refusedFieldOf as xk } from "./item-edit/save-refusal.js";
|
|
152
|
-
import { isHalfSection as
|
|
153
|
-
import { foldStagedLinks as
|
|
152
|
+
import { isHalfSection as Sp, useFormPairs as Sk, sectionRows as Nk } from "./item-edit/section-rows.js";
|
|
153
|
+
import { foldStagedLinks as Np, foldStagedRows as Ck } from "./item-edit/staged-links.js";
|
|
154
154
|
import { staleBannerMode as $k, touchedEditsDiffer as Rk } from "./item-edit/stale-banner.js";
|
|
155
155
|
import { useFormUsageBeacon as Ok } from "./item-edit/useFormUsageBeacon.js";
|
|
156
|
-
import { linksBeyond as
|
|
156
|
+
import { linksBeyond as Cp, usePersonalDefaults as Fk, sameDefaultValue as jk, PersonalDefaultsContext as Ak } from "./item-edit/usePersonalDefaults.js";
|
|
157
157
|
import { ValidationSummary as Tk } from "./item-edit/ValidationSummary.js";
|
|
158
158
|
import { useViewAsRole as qk, ViewAsRoleBar as Ik } from "./item-edit/ViewAsRole.js";
|
|
159
159
|
import { choiceLabelsFrom as Pk } from "./layout-editor/overview/describe-conditions.js";
|
|
@@ -178,36 +178,36 @@ import { EntryStrip as sx } from "./item-edit/entry/EntryStrip.js";
|
|
|
178
178
|
import { useEntryKeyboard as ix } from "./item-edit/entry/useEntryKeyboard.js";
|
|
179
179
|
import { useEntryMode as ox } from "./item-edit/entry/useEntryMode.js";
|
|
180
180
|
import { FieldPointerHost as ax } from "./item-edit/FieldPointer.js";
|
|
181
|
-
import { FindInRecordButton as
|
|
181
|
+
import { FindInRecordButton as $p } from "./item-edit/FindInRecord.js";
|
|
182
182
|
import { RecordViewersChip as lx } from "./item-edit/RecordViewersChip.js";
|
|
183
183
|
import { planReimportM2m as dx } from "./item-edit/reimport-m2m.js";
|
|
184
|
-
import { StepsBar as
|
|
185
|
-
import { SummaryPanel as cx, M2OSummaryValue as
|
|
186
|
-
import { designWrap as ux, DesignDropBody as
|
|
184
|
+
import { StepsBar as Rp } from "./item-edit/StepsBar.js";
|
|
185
|
+
import { SummaryPanel as cx, M2OSummaryValue as eh } from "./item-edit/SummaryPanel.js";
|
|
186
|
+
import { designWrap as ux, DesignDropBody as Op, DesignDropZone as Fp } from "./layout-editor/DesignNode.js";
|
|
187
187
|
import { DesignCanvas as fx } from "./layout-editor/design-canvas.js";
|
|
188
188
|
import { revealGroupKey as mx, useLayoutDesign as px } from "./layout-editor/design-context.js";
|
|
189
189
|
import { GridGuides as hx } from "./layout-editor/grid-guides.js";
|
|
190
|
-
import { readDesignSummaryCollapsed as
|
|
190
|
+
import { readDesignSummaryCollapsed as jp, DESIGN_SUMMARY_MIN_CANVAS as gx, writeDesignSummaryCollapsed as yx } from "./layout-editor/summary-pref.js";
|
|
191
191
|
import { RecordEventPathSheet as _x } from "./panels/IntegrationActivitySection.js";
|
|
192
192
|
import { MoveToStatePanel as bx } from "./panels/MoveToStatePanel.js";
|
|
193
193
|
import { FormSkeleton as vx } from "./Skeletons.js";
|
|
194
|
-
import { SlowNoticeView as
|
|
194
|
+
import { SlowNoticeView as Ap } from "./SlowNotice.js";
|
|
195
195
|
import { TipLayer as wx } from "./TipLayer.js";
|
|
196
196
|
import { Button as Ht } from "./ui/button.js";
|
|
197
197
|
import { Dialog as Ii, DialogContent as Pi, DialogHeader as Ei, DialogTitle as Li, DialogBody as Mi, DialogFooter as ya } from "./ui/dialog.js";
|
|
198
|
-
import { Popover as
|
|
198
|
+
import { Popover as th, PopoverTrigger as nh, PopoverContent as rh } from "./ui/popover.js";
|
|
199
199
|
import { Skeleton as Ai } from "./ui/skeleton.js";
|
|
200
200
|
import { WidgetSlot as fa } from "./WidgetSlot.js";
|
|
201
201
|
import { useAccessRegained as kx, AccessGrantedNote as xx } from "./panels/AccessGrantedNote.js";
|
|
202
202
|
import { useItemLock as Sx, LockHolderButton as Nx, ItemLockBanner as Cx } from "./panels/ItemLockBanner.js";
|
|
203
|
-
import { useExternalRequestsShown as $x, ExternalRequestsChip as
|
|
204
|
-
import { isAccessRefusal as
|
|
203
|
+
import { useExternalRequestsShown as $x, ExternalRequestsChip as Tp } from "./panels/ExternalRequestsChip.js";
|
|
204
|
+
import { isAccessRefusal as qp, deniedToastAction as Rx, WhyDeniedButton as Ox } from "./panels/AccessInsights.js";
|
|
205
205
|
import { AccessDeniedPanel as Fx } from "./panels/AccessDeniedPanel.js";
|
|
206
206
|
import { RevisionsPanel as jx } from "./panels/RevisionsPanel.js";
|
|
207
207
|
import { ProposeChangeButton as Ax } from "./change-proposals/ProposeChangeButton.js";
|
|
208
208
|
import { ItemActionButtons as Tx } from "./panels/ItemActionButtons.js";
|
|
209
209
|
import { CustomActionButtons as qx } from "./panels/CustomActionButtons.js";
|
|
210
|
-
import { PipelineTransitionButtons as
|
|
210
|
+
import { PipelineTransitionButtons as Ip, PipelinePanel as ma } from "./panels/PipelinePanel.js";
|
|
211
211
|
import { OwnersInlineCompact as Ix, OwnersInline as Px } from "./item-edit/UserChip.js";
|
|
212
212
|
import { ChangeProposalsPanel as Ex } from "./change-proposals/ChangeProposalsPanel.js";
|
|
213
213
|
import { CommentPanel as pa } from "./panels/CommentPanel.js";
|
|
@@ -219,7 +219,7 @@ import { WorkflowPanel as Fd } from "./panels/WorkflowPanel.js";
|
|
|
219
219
|
import { OwnersSlot as Lx } from "./panels/OwnersSlot.js";
|
|
220
220
|
let jd = !1;
|
|
221
221
|
const Mx = "border-r flex w-6 shrink-0 items-start justify-center pt-3 bg-slate-100 text-slate-500 hover:bg-slate-200/70 hover:text-slate-700 transition-colors dark:bg-white/[0.04] dark:hover:bg-white/[0.08] dark:hover:text-slate-300";
|
|
222
|
-
function
|
|
222
|
+
function Pp(i, w, $) {
|
|
223
223
|
if (/[\p{L}\p{N}]/u.test(i)) return i.trim();
|
|
224
224
|
for (const P of ["name", "title", "label"]) {
|
|
225
225
|
const T = w == null ? void 0 : w[P];
|
|
@@ -227,7 +227,7 @@ function Ip(i, w, $) {
|
|
|
227
227
|
}
|
|
228
228
|
return `${$} (no number)`;
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function Ep(i) {
|
|
231
231
|
if (i) {
|
|
232
232
|
if (Array.isArray(i)) return i;
|
|
233
233
|
try {
|
|
@@ -238,7 +238,7 @@ function Pp(i) {
|
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
|
-
function
|
|
241
|
+
function Lp(i) {
|
|
242
242
|
return i.lines.map((w) => ({
|
|
243
243
|
...w.values,
|
|
244
244
|
...w.nested ? {
|
|
@@ -257,9 +257,9 @@ function Ti({ children: i }) {
|
|
|
257
257
|
i($)
|
|
258
258
|
] });
|
|
259
259
|
}
|
|
260
|
-
const
|
|
260
|
+
const Mp = "nvr-form-validation";
|
|
261
261
|
function Dx({ status: i }) {
|
|
262
|
-
return i === "running" ? /* @__PURE__ */ a(Ps, { className: "h-4 w-4 animate-spin text-nvr-cyan shrink-0" }) : i === "done" ? /* @__PURE__ */ a(vr, { className: "h-4 w-4 text-green-500 shrink-0" }) : i === "error" ? /* @__PURE__ */ a(
|
|
262
|
+
return i === "running" ? /* @__PURE__ */ a(Ps, { className: "h-4 w-4 animate-spin text-nvr-cyan shrink-0" }) : i === "done" ? /* @__PURE__ */ a(vr, { className: "h-4 w-4 text-green-500 shrink-0" }) : i === "error" ? /* @__PURE__ */ a(Hp, { className: "h-4 w-4 text-red-500 shrink-0" }) : /* @__PURE__ */ a("div", { className: "h-4 w-4 rounded-full border-2 border-slate-200 dark:border-slate-600 shrink-0" });
|
|
263
263
|
}
|
|
264
264
|
function Bx({
|
|
265
265
|
open: i,
|
|
@@ -286,7 +286,7 @@ function Bx({
|
|
|
286
286
|
children: [
|
|
287
287
|
/* @__PURE__ */ _(Ei, { children: [
|
|
288
288
|
/* @__PURE__ */ _(Li, { className: "flex items-center gap-2 text-[15px]", children: [
|
|
289
|
-
T && E && /* @__PURE__ */ a(
|
|
289
|
+
T && E && /* @__PURE__ */ a(Hp, { className: "h-4 w-4 text-red-500" }),
|
|
290
290
|
T && !E && /* @__PURE__ */ a(vr, { className: "h-4 w-4 text-green-500" }),
|
|
291
291
|
E ? se === 0 ? "Nothing was saved" : "Saved with errors" : T ? "All changes saved" : "Saving changes…"
|
|
292
292
|
] }),
|
|
@@ -445,7 +445,7 @@ function Wx(i, w) {
|
|
|
445
445
|
);
|
|
446
446
|
if (w === "date")
|
|
447
447
|
try {
|
|
448
|
-
return jb(i) ||
|
|
448
|
+
return jb(i) || Jp(i);
|
|
449
449
|
} catch {
|
|
450
450
|
return String(i);
|
|
451
451
|
}
|
|
@@ -466,7 +466,7 @@ function Ki({
|
|
|
466
466
|
if (i == null || i === "") return /* @__PURE__ */ a(It, { children: "empty" });
|
|
467
467
|
if (typeof i == "boolean") return /* @__PURE__ */ a(It, { children: i ? "Yes" : "No" });
|
|
468
468
|
if ($ && (typeof i == "string" || typeof i == "number"))
|
|
469
|
-
return /* @__PURE__ */ a(
|
|
469
|
+
return /* @__PURE__ */ a(eh, { collection: $, id: i });
|
|
470
470
|
const P = (E = er(
|
|
471
471
|
w == null ? void 0 : w.options
|
|
472
472
|
)) == null ? void 0 : E.choices;
|
|
@@ -557,7 +557,7 @@ function zx({
|
|
|
557
557
|
" ",
|
|
558
558
|
J.ids.slice(0, Gr).map((Pe, sn) => /* @__PURE__ */ _("span", { children: [
|
|
559
559
|
sn > 0 && ", ",
|
|
560
|
-
/* @__PURE__ */ a(
|
|
560
|
+
/* @__PURE__ */ a(eh, { collection: J.target, id: Pe })
|
|
561
561
|
] }, String(Pe))),
|
|
562
562
|
J.ids.length > Gr && /* @__PURE__ */ _("span", { className: "text-slate-500 dark:text-slate-400", children: [
|
|
563
563
|
" ",
|
|
@@ -597,12 +597,12 @@ function Qx(i, w) {
|
|
|
597
597
|
($[P] === void 0 || $[P] === null) && ($[P] = T);
|
|
598
598
|
return $;
|
|
599
599
|
}
|
|
600
|
-
function
|
|
600
|
+
function Kp(i, w) {
|
|
601
601
|
return i ? i.filter(
|
|
602
602
|
($) => $.trigger_field === w && ($.is_active === !0 || $.is_active === 1)
|
|
603
603
|
) : [];
|
|
604
604
|
}
|
|
605
|
-
function
|
|
605
|
+
function Dp(i, w) {
|
|
606
606
|
let $ = null;
|
|
607
607
|
for (const [P, T] of Object.entries(i)) {
|
|
608
608
|
if (T !== "This field is required" && !qi(T)) continue;
|
|
@@ -621,7 +621,7 @@ function Vx(i, w, $) {
|
|
|
621
621
|
return { merged: T, kept: P };
|
|
622
622
|
}
|
|
623
623
|
function Hx(i, w, $, P, T) {
|
|
624
|
-
const E = (V) => !!T && Object.hasOwn(T, V) && Ke($[V], T[V]) || Object.hasOwn(P, V) &&
|
|
624
|
+
const E = (V) => !!T && Object.hasOwn(T, V) && Ke($[V], T[V]) || Object.hasOwn(P, V) && sh($[V], P[V]);
|
|
625
625
|
return i.filter(
|
|
626
626
|
(V) => Object.hasOwn(w, V) && !Ke($[V], w[V]) && !E(V)
|
|
627
627
|
);
|
|
@@ -659,14 +659,14 @@ function Yx(i, w, $, P) {
|
|
|
659
659
|
Jx.has(V) || V === w || T.has(V) || se === null || typeof se == "object" || (E[V] = se);
|
|
660
660
|
return E;
|
|
661
661
|
}
|
|
662
|
-
function
|
|
662
|
+
function sh(i, w) {
|
|
663
663
|
const $ = i === "" ? null : i, P = w === "" ? null : w;
|
|
664
664
|
if (Ke($, P)) return !0;
|
|
665
665
|
const T = (se) => typeof se == "number" ? se : typeof se == "string" && /^\s*-?\d+(\.\d+)?\s*$/.test(se) ? Number(se) : Number.NaN, E = T($), V = T(P);
|
|
666
666
|
return Number.isFinite(E) && Number.isFinite(V) && E === V;
|
|
667
667
|
}
|
|
668
|
-
function
|
|
669
|
-
return Object.keys(i).some(($) => !$.startsWith("__") && !
|
|
668
|
+
function Bp(i, w) {
|
|
669
|
+
return Object.keys(i).some(($) => !$.startsWith("__") && !sh(i[$], w[$]));
|
|
670
670
|
}
|
|
671
671
|
function Zx(i, w, $, P) {
|
|
672
672
|
return i.some((T) => w.has(T) && !Ke($[T], P[T]));
|
|
@@ -688,9 +688,9 @@ function eS(i, w, $) {
|
|
|
688
688
|
if (Array.isArray(V))
|
|
689
689
|
for (const se of V) {
|
|
690
690
|
if (!se || se.soft || se.type !== "gte_field" && se.type !== "lte_field" || T.field !== $ && se.field !== $) continue;
|
|
691
|
-
const je =
|
|
691
|
+
const je = Yp(
|
|
692
692
|
se,
|
|
693
|
-
|
|
693
|
+
Zp(T.type, w[T.field]),
|
|
694
694
|
T.label ?? ge(T.field),
|
|
695
695
|
w
|
|
696
696
|
);
|
|
@@ -703,7 +703,7 @@ function eS(i, w, $) {
|
|
|
703
703
|
}
|
|
704
704
|
return P;
|
|
705
705
|
}
|
|
706
|
-
const
|
|
706
|
+
const Wp = "Add at least one line";
|
|
707
707
|
function tS(i, w, $) {
|
|
708
708
|
if (i) return !1;
|
|
709
709
|
const P = w.filter(
|
|
@@ -730,14 +730,14 @@ function iS(i, w) {
|
|
|
730
730
|
($) => !$.startsWith("__") && Object.hasOwn(i, $) && i[$] !== void 0 && !Ke(i[$], w[$])
|
|
731
731
|
);
|
|
732
732
|
}
|
|
733
|
-
function
|
|
733
|
+
function zp(i, w) {
|
|
734
734
|
return i != null && i.user_id ? !!w && String(i.user_id).toUpperCase() === String(w).toUpperCase() ? "You, in another tab" : i.user_name ?? null : null;
|
|
735
735
|
}
|
|
736
736
|
const Ad = "Not an available option — pick another or clear it";
|
|
737
737
|
function oS(i, w) {
|
|
738
738
|
return !w || Object.keys(w).length === 0 ? i : { ...i, ...w };
|
|
739
739
|
}
|
|
740
|
-
class
|
|
740
|
+
class Qp extends Error {
|
|
741
741
|
constructor() {
|
|
742
742
|
super("created out of view");
|
|
743
743
|
}
|
|
@@ -782,17 +782,17 @@ function lS(i, w, $, P) {
|
|
|
782
782
|
const je = (P ?? []).find(
|
|
783
783
|
(Re) => Re.many_collection === V.manyCollection && Re.many_field === V.junctionField
|
|
784
784
|
);
|
|
785
|
-
if (
|
|
785
|
+
if (Xp(je) === "nivaro_files") continue;
|
|
786
786
|
const $e = $[E];
|
|
787
787
|
!($e != null && $e.known) || $e.ids.length === 0 || (T[V.stagingKey] = [...$e.ids]);
|
|
788
788
|
}
|
|
789
789
|
return Object.keys(T).length > 0 ? T : null;
|
|
790
790
|
}
|
|
791
|
-
function
|
|
791
|
+
function ih(i, w, $, P) {
|
|
792
792
|
const T = P ?? /* @__PURE__ */ new Set(), E = (i ?? []).filter((se) => !T.has(se.id)).map((se) => String(se[w])), V = ($ ?? []).map(String);
|
|
793
793
|
return [.../* @__PURE__ */ new Set([...E, ...V])];
|
|
794
794
|
}
|
|
795
|
-
function
|
|
795
|
+
function Up(i, w) {
|
|
796
796
|
if (!(i != null && i.length)) return [];
|
|
797
797
|
const $ = new Set(w.map(String));
|
|
798
798
|
return i.filter((P) => $.has(String(P)));
|
|
@@ -801,12 +801,12 @@ function dS(i, w) {
|
|
|
801
801
|
if (!(i == null || i === ""))
|
|
802
802
|
return w.find(($) => String($) === String(i));
|
|
803
803
|
}
|
|
804
|
-
function
|
|
804
|
+
function oh(i) {
|
|
805
805
|
return i == null ? "" : String(i);
|
|
806
806
|
}
|
|
807
807
|
function cS(i, w, $, P) {
|
|
808
808
|
const T = i.get(w);
|
|
809
|
-
return !T || T.trigger !== $ || P == null || P === "" ? !1 : T.value ===
|
|
809
|
+
return !T || T.trigger !== $ || P == null || P === "" ? !1 : T.value === oh(P);
|
|
810
810
|
}
|
|
811
811
|
function uS(i, w) {
|
|
812
812
|
const $ = String(w).toLowerCase();
|
|
@@ -819,7 +819,7 @@ function fS(i, w) {
|
|
|
819
819
|
function mS(i, w, $, P, T, E) {
|
|
820
820
|
return i && !w ? { known: !1, ids: [] } : {
|
|
821
821
|
known: !0,
|
|
822
|
-
ids:
|
|
822
|
+
ids: ih($, P, T, E)
|
|
823
823
|
};
|
|
824
824
|
}
|
|
825
825
|
function pS(i, w) {
|
|
@@ -847,8 +847,8 @@ function gS({
|
|
|
847
847
|
}) {
|
|
848
848
|
const [V, se] = I(!1), je = A(() => D_(E.body), [E.body]), $e = E.api_key_name ? `API key "${E.api_key_name}"` : P ? `${P}'s token` : "a token";
|
|
849
849
|
return /* @__PURE__ */ _(It, { children: [
|
|
850
|
-
/* @__PURE__ */ _(
|
|
851
|
-
/* @__PURE__ */ a(
|
|
850
|
+
/* @__PURE__ */ _(th, { children: [
|
|
851
|
+
/* @__PURE__ */ a(nh, { asChild: !0, children: /* @__PURE__ */ a(
|
|
852
852
|
"button",
|
|
853
853
|
{
|
|
854
854
|
type: "button",
|
|
@@ -859,7 +859,7 @@ function gS({
|
|
|
859
859
|
children: $
|
|
860
860
|
}
|
|
861
861
|
) }),
|
|
862
|
-
/* @__PURE__ */ _(
|
|
862
|
+
/* @__PURE__ */ _(rh, { align: "start", className: "w-[560px] max-w-[94vw] p-3 text-[12px]", children: [
|
|
863
863
|
/* @__PURE__ */ a("p", { className: "text-[11px] font-semibold uppercase tracking-wide text-slate-500", children: "Created through the API" }),
|
|
864
864
|
/* @__PURE__ */ _("dl", { className: "mt-2 grid grid-cols-[auto_1fr] gap-x-3 gap-y-1", children: [
|
|
865
865
|
/* @__PURE__ */ a("dt", { className: "text-slate-400", children: "Request" }),
|
|
@@ -928,7 +928,7 @@ function gS({
|
|
|
928
928
|
] });
|
|
929
929
|
}
|
|
930
930
|
function yS(i) {
|
|
931
|
-
const w =
|
|
931
|
+
const w = Gp();
|
|
932
932
|
return i.map(($) => j0($, w));
|
|
933
933
|
}
|
|
934
934
|
function _S({
|
|
@@ -946,9 +946,9 @@ function _S({
|
|
|
946
946
|
}
|
|
947
947
|
const N$ = !0;
|
|
948
948
|
function C$(i) {
|
|
949
|
-
return i.design ? /* @__PURE__ */ a(fx, { design: i.design.context, onRefusedWrite: i.design.onRefusedWrite, children: /* @__PURE__ */ a(
|
|
949
|
+
return i.design ? /* @__PURE__ */ a(fx, { design: i.design.context, onRefusedWrite: i.design.onRefusedWrite, children: /* @__PURE__ */ a(Vp, { ...i }) }) : /* @__PURE__ */ a(Vp, { ...i });
|
|
950
950
|
}
|
|
951
|
-
function
|
|
951
|
+
function Vp({
|
|
952
952
|
collection: i,
|
|
953
953
|
itemId: w,
|
|
954
954
|
layoutSlug: $,
|
|
@@ -978,24 +978,24 @@ function Up({
|
|
|
978
978
|
showTasks: Ed = !0,
|
|
979
979
|
showLockBanner: Ld = !0,
|
|
980
980
|
className: Ls,
|
|
981
|
-
headerClassName:
|
|
981
|
+
headerClassName: ah,
|
|
982
982
|
renderField: kr,
|
|
983
|
-
extraTopContent:
|
|
984
|
-
hideHelpVideoButton:
|
|
985
|
-
extraBottomContent:
|
|
983
|
+
extraTopContent: lh,
|
|
984
|
+
hideHelpVideoButton: dh = !1,
|
|
985
|
+
extraBottomContent: ch,
|
|
986
986
|
onHeaderWidgets: ba,
|
|
987
|
-
autofillProposalId:
|
|
988
|
-
onAutofillConsumed:
|
|
987
|
+
autofillProposalId: uh,
|
|
988
|
+
onAutofillConsumed: fh,
|
|
989
989
|
initialImportResult: Gt,
|
|
990
990
|
initialValues: Jt,
|
|
991
991
|
initialLinks: Gn,
|
|
992
992
|
initialRows: nr,
|
|
993
|
-
rehearseCopiedLines:
|
|
993
|
+
rehearseCopiedLines: mh = !1,
|
|
994
994
|
design: Yt,
|
|
995
995
|
layoutEditing: Md = !1
|
|
996
996
|
}) {
|
|
997
|
-
var
|
|
998
|
-
const Tn = Cb(i), Ms =
|
|
997
|
+
var um, fm, mm, pm, hm, gm, ym, _m, bm, vm, wm, km, xm, Sm, Nm, Cm, $m, Rm, Om, Fm, jm, Am, Tm, qm, Im, Pm, Em, Lm, Mm, Km, Dm;
|
|
998
|
+
const Tn = Cb(i), Ms = up(i), pt = sn && Ms, va = wr && Ms, S = Yt != null, Ve = (Yt == null ? void 0 : Yt.context) ?? null, xr = Ve != null, qn = !!(Ve != null && Ve.showHidden), j = F_(), Wi = G0(), Jn = j_(), { isAdmin: wt, userId: De } = $_(A_), xe = qk(i, wt), Kd = T_(), [ph, Dd] = I(!1), kn = ((fm = (um = xe.preview) == null ? void 0 : um.layout) == null ? void 0 : fm.slug) ?? $, H = u_(), hh = ((mm = Yt == null ? void 0 : Yt.record) == null ? void 0 : mm.id) != null ? String(Yt.record.id) : void 0, wa = w ?? (S ? hh : void 0), f = wa ?? "new", u = !wa || wa === "new", [rr] = I(A0), ka = [
|
|
999
999
|
"active-layout",
|
|
1000
1000
|
i,
|
|
1001
1001
|
kn ?? null,
|
|
@@ -1013,7 +1013,7 @@ function Up({
|
|
|
1013
1013
|
staleTime: 6e4,
|
|
1014
1014
|
enabled: !S
|
|
1015
1015
|
}), Bd = N(() => {
|
|
1016
|
-
}), { shown:
|
|
1016
|
+
}), { shown: gh } = ew(zi, {
|
|
1017
1017
|
enabled: !S && !u && !kn,
|
|
1018
1018
|
prepare: (e) => H.fetchQuery({
|
|
1019
1019
|
queryKey: ["field-config", i, e],
|
|
@@ -1023,12 +1023,12 @@ function Up({
|
|
|
1023
1023
|
staleTime: 6e4
|
|
1024
1024
|
}),
|
|
1025
1025
|
onSwitch: (e, t) => Bd.current(e, t)
|
|
1026
|
-
}), x = S ? Yt.layout :
|
|
1026
|
+
}), x = S ? Yt.layout : gh, Zt = ((pm = x == null ? void 0 : x.layout) == null ? void 0 : pm.id) ?? null, [Wd, zd] = I(() => /* @__PURE__ */ new Set());
|
|
1027
1027
|
B(() => zd(/* @__PURE__ */ new Set()), [i, f, Zt]);
|
|
1028
1028
|
const Ks = A(
|
|
1029
1029
|
() => ow(x, Wd, { design: S }),
|
|
1030
1030
|
[x, Wd, S]
|
|
1031
|
-
),
|
|
1031
|
+
), yh = de((e) => {
|
|
1032
1032
|
zd((t) => t.has(e) ? t : /* @__PURE__ */ new Set([...t, e]));
|
|
1033
1033
|
}, []), { data: Ds } = vt({
|
|
1034
1034
|
queryKey: ["summary-layout", i, ...rr ? [rr] : []],
|
|
@@ -1071,7 +1071,7 @@ function Up({
|
|
|
1071
1071
|
queryKey: ["relations", i],
|
|
1072
1072
|
queryFn: () => j.request(ie(`/data-model/relations/for/${i}`)).then((e) => e.data ?? []),
|
|
1073
1073
|
staleTime: 6e4
|
|
1074
|
-
}),
|
|
1074
|
+
}), _h = A(
|
|
1075
1075
|
() => Sv(O ?? [], D, i),
|
|
1076
1076
|
[O, D, i]
|
|
1077
1077
|
), { data: Zr = [], isFetched: Ud } = vt({
|
|
@@ -1083,17 +1083,17 @@ function Up({
|
|
|
1083
1083
|
queryKey: ["col-meta", i],
|
|
1084
1084
|
queryFn: () => j.request(ie(`/collections/${i}`)).then((e) => e.data),
|
|
1085
1085
|
staleTime: 6e4
|
|
1086
|
-
}), { data:
|
|
1086
|
+
}), { data: bh = [] } = vt({
|
|
1087
1087
|
queryKey: ["file-layouts", i],
|
|
1088
1088
|
queryFn: () => j.request(ie("/collection-layouts", { collection: i })).then((e) => (e.data ?? []).filter((t) => t.layout_type === "file" && !!t.is_active)),
|
|
1089
1089
|
enabled: !!i && !u,
|
|
1090
1090
|
staleTime: 6e4
|
|
1091
|
-
}), [
|
|
1091
|
+
}), [vh, wh] = I({}), [Vd, Hd] = I(null), [Gd, Jd] = I(!1), [Nr, Yd] = I(!1), [Vi, Hi] = I(0), [Be, Gi] = I(P || "original"), Ji = N(T);
|
|
1092
1092
|
Ji.current = T, B(() => {
|
|
1093
1093
|
var e;
|
|
1094
1094
|
(e = Ji.current) == null || e.call(Ji, Be === "original" ? null : Be);
|
|
1095
1095
|
}, [Be]);
|
|
1096
|
-
const [
|
|
1096
|
+
const [kh, Sa] = I(!1), xh = de(
|
|
1097
1097
|
async (e) => {
|
|
1098
1098
|
if (!(!f || !i)) {
|
|
1099
1099
|
Hd(e), Jd(!1);
|
|
@@ -1130,11 +1130,11 @@ function Up({
|
|
|
1130
1130
|
}
|
|
1131
1131
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
1132
1132
|
}, [Gd]);
|
|
1133
|
-
const [pn, Zd] = I(null), Ee = N({ hidden: null, linkProblems: [] }), Bs = N(null), Na = N(0), Yi = N(!1), Xr = N(/* @__PURE__ */ new Map()), Ws = N(!1), Ca = N(null), Cr = N(/* @__PURE__ */ new Map()),
|
|
1133
|
+
const [pn, Zd] = I(null), Ee = N({ hidden: null, linkProblems: [] }), Bs = N(null), Na = N(0), Yi = N(!1), Xr = N(/* @__PURE__ */ new Map()), Ws = N(!1), Ca = N(null), Cr = N(/* @__PURE__ */ new Map()), Sh = (e, t) => {
|
|
1134
1134
|
Xr.current.delete(e) && Cr.current.set(e, t);
|
|
1135
1135
|
}, $a = (e, t) => {
|
|
1136
1136
|
Xr.current.delete(e), Cr.current.set(e, t);
|
|
1137
|
-
}, [Ra,
|
|
1137
|
+
}, [Ra, Nh] = I(null);
|
|
1138
1138
|
B(() => {
|
|
1139
1139
|
Zd(null), Yi.current = !1;
|
|
1140
1140
|
}, [i, f]);
|
|
@@ -1214,11 +1214,11 @@ function Up({
|
|
|
1214
1214
|
if (u || !In) return !1;
|
|
1215
1215
|
const e = (In == null ? void 0 : In.status) ?? ((t = In == null ? void 0 : In.response) == null ? void 0 : t.status);
|
|
1216
1216
|
return e === 403 || e === 404;
|
|
1217
|
-
})(),
|
|
1217
|
+
})(), Ch = kx(
|
|
1218
1218
|
to && !$r,
|
|
1219
1219
|
!!$r && !In,
|
|
1220
1220
|
`${i}:${String(f ?? "")}`
|
|
1221
|
-
), nc = to && !we, Pt = we != null, [M, lt] = I({}), U = N({}), Fa = N(!1), no = N(!1), Ae = N(/* @__PURE__ */ new Set()), es = N(0), sr = N(/* @__PURE__ */ new Map()), ja = N(/* @__PURE__ */ new Map()),
|
|
1221
|
+
), nc = to && !we, Pt = we != null, [M, lt] = I({}), U = N({}), Fa = N(!1), no = N(!1), Ae = N(/* @__PURE__ */ new Set()), es = N(0), sr = N(/* @__PURE__ */ new Map()), ja = N(/* @__PURE__ */ new Map()), $h = A(
|
|
1222
1222
|
() => ({
|
|
1223
1223
|
register: (e, t) => {
|
|
1224
1224
|
ja.current.set(e, t);
|
|
@@ -1228,16 +1228,16 @@ function Up({
|
|
|
1228
1228
|
}
|
|
1229
1229
|
}),
|
|
1230
1230
|
[]
|
|
1231
|
-
), [Ze, hn] = I({}), ro = N(/* @__PURE__ */ new Map()), [rc, sc] = I(!1), [
|
|
1231
|
+
), [Ze, hn] = I({}), ro = N(/* @__PURE__ */ new Map()), [rc, sc] = I(!1), [Rh, Oh] = I(!1), [Fh, jh] = I(""), ic = N({});
|
|
1232
1232
|
B(() => {
|
|
1233
1233
|
const e = ic.current;
|
|
1234
1234
|
if (ic.current = Ze, rc) return;
|
|
1235
1235
|
const t = Ow(e, Ze);
|
|
1236
1236
|
if (!t) return;
|
|
1237
1237
|
const n = (O ?? []).find((r) => r.field === t.field);
|
|
1238
|
-
|
|
1238
|
+
jh(`${(n == null ? void 0 : n.label) || ge(t.field)}: ${t.message}`);
|
|
1239
1239
|
}, [Ze]);
|
|
1240
|
-
const [oc, ts] = I(null), [
|
|
1240
|
+
const [oc, ts] = I(null), [Ah, ac] = I(!1), [Th, lc] = I(!1), [qh, so] = I(!1), [Ih, dc] = I(!1), Ct = N(null), [ze, ns] = I(null);
|
|
1241
1241
|
B(() => {
|
|
1242
1242
|
if (!ze || ze.current !== void 0 || u || f == null) return;
|
|
1243
1243
|
let e = !0;
|
|
@@ -1297,15 +1297,15 @@ function Up({
|
|
|
1297
1297
|
De && J0(j, De, H);
|
|
1298
1298
|
}, [j, De, H]), B(
|
|
1299
1299
|
() => () => {
|
|
1300
|
-
co(),
|
|
1300
|
+
co(), lp();
|
|
1301
1301
|
},
|
|
1302
1302
|
[i, f]
|
|
1303
1303
|
);
|
|
1304
|
-
const [Xe, on] = I(!1), [
|
|
1304
|
+
const [Xe, on] = I(!1), [Ph, pc] = I(!1), [Rr, ir] = I({}), [hc, Ea] = I([]);
|
|
1305
1305
|
B(() => Ea([]), [i, f]);
|
|
1306
1306
|
const La = N(0), Qs = N(null), [xt, Ma] = I(!1), uo = (e) => Ma(e), fo = N(Bi);
|
|
1307
1307
|
fo.current = Bi;
|
|
1308
|
-
const gc = ((
|
|
1308
|
+
const gc = ((hm = Ds == null ? void 0 : Ds.layout) == null ? void 0 : hm.id) != null ? Number(Ds.layout.id) : null;
|
|
1309
1309
|
B(() => {
|
|
1310
1310
|
var e;
|
|
1311
1311
|
(e = fo.current) == null || e.call(fo, {
|
|
@@ -1316,7 +1316,7 @@ function Up({
|
|
|
1316
1316
|
const Or = A(
|
|
1317
1317
|
() => v != null && v.read_mode_toggle ? Fi(v.summary_mode_rules) : null,
|
|
1318
1318
|
[v == null ? void 0 : v.read_mode_toggle, v == null ? void 0 : v.summary_mode_rules]
|
|
1319
|
-
), [
|
|
1319
|
+
), [Eh, Lh] = I(null), Ka = `${i}|${String(f)}`, ss = S || u || v !== void 0 && (!Or || Eh === Ka), $t = X_(i, f, De), yc = A(
|
|
1320
1320
|
() => u && (Jt || Gn || nr) ? V_({
|
|
1321
1321
|
v: Jt ?? null,
|
|
1322
1322
|
l: Gn ?? null,
|
|
@@ -1325,7 +1325,7 @@ function Up({
|
|
|
1325
1325
|
[u, Jt, Gn, nr]
|
|
1326
1326
|
), [an, is] = I({ state: S ? "none" : "checking" }), _c = N(an);
|
|
1327
1327
|
_c.current = an;
|
|
1328
|
-
const [
|
|
1328
|
+
const [Mh, Kh] = I(!1), [Us, Dh] = I(null), Fr = N(!1), [Da, bc] = I(!1);
|
|
1329
1329
|
B(() => {
|
|
1330
1330
|
const e = (t) => {
|
|
1331
1331
|
const n = t.detail;
|
|
@@ -1333,16 +1333,16 @@ function Up({
|
|
|
1333
1333
|
};
|
|
1334
1334
|
return window.addEventListener("nvr:set-field", e), () => window.removeEventListener("nvr:set-field", e);
|
|
1335
1335
|
});
|
|
1336
|
-
const [
|
|
1336
|
+
const [Bh, Wh] = I(!1);
|
|
1337
1337
|
B(() => {
|
|
1338
1338
|
const e = (t) => {
|
|
1339
1339
|
var s;
|
|
1340
1340
|
const n = (s = t.detail) == null ? void 0 : s.collection, r = lv(n, i, xr, Md);
|
|
1341
|
-
r !== "ignore" && (H.invalidateQueries({ queryKey: ["field-config"] }), H.invalidateQueries({ queryKey: ["active-layout"] }), H.invalidateQueries({ queryKey: ["collection-meta"] }), r === "banner" &&
|
|
1341
|
+
r !== "ignore" && (H.invalidateQueries({ queryKey: ["field-config"] }), H.invalidateQueries({ queryKey: ["active-layout"] }), H.invalidateQueries({ queryKey: ["collection-meta"] }), r === "banner" && Wh(!0));
|
|
1342
1342
|
};
|
|
1343
1343
|
return window.addEventListener("nvr:config-update", e), () => window.removeEventListener("nvr:config-update", e);
|
|
1344
1344
|
}, [H, i, xr, Md]);
|
|
1345
|
-
const [mo,
|
|
1345
|
+
const [mo, zh] = I(!1), [Qh, vc] = I(!1);
|
|
1346
1346
|
B(() => {
|
|
1347
1347
|
if (!Xe) {
|
|
1348
1348
|
vc(!1);
|
|
@@ -1351,22 +1351,22 @@ function Up({
|
|
|
1351
1351
|
const e = window.setTimeout(() => vc(!0), 3 * 6e4);
|
|
1352
1352
|
return () => window.clearTimeout(e);
|
|
1353
1353
|
}, [Xe]);
|
|
1354
|
-
const [Vs,
|
|
1354
|
+
const [Vs, Uh] = I({}), Ba = N(/* @__PURE__ */ new Set()), Wt = N(/* @__PURE__ */ new Set()), po = N(
|
|
1355
1355
|
() => /* @__PURE__ */ new Map()
|
|
1356
1356
|
), os = N(/* @__PURE__ */ new Map()), wc = N(() => {
|
|
1357
1357
|
}), ho = N(() => {
|
|
1358
1358
|
}), Et = N(0), Hs = de((e) => {
|
|
1359
1359
|
if (e.length !== 0) {
|
|
1360
1360
|
for (const t of e) Ba.current.add(t);
|
|
1361
|
-
|
|
1361
|
+
Uh((t) => {
|
|
1362
1362
|
const n = { ...t };
|
|
1363
1363
|
for (const r of e) n[r] = (n[r] ?? 0) + 1;
|
|
1364
1364
|
return n;
|
|
1365
1365
|
});
|
|
1366
1366
|
}
|
|
1367
|
-
}, []), kc = N(null), { headerDense: Wa, headerFolded:
|
|
1367
|
+
}, []), kc = N(null), { headerDense: Wa, headerFolded: Vh, headerRows: Hh, headerTilesRef: Gh } = Av(), xc = de((e) => {
|
|
1368
1368
|
const t = e.target, n = t.scrollTop;
|
|
1369
|
-
|
|
1369
|
+
zh((r) => {
|
|
1370
1370
|
var l;
|
|
1371
1371
|
if (r) return n > 40;
|
|
1372
1372
|
if (n <= 110) return !1;
|
|
@@ -1394,7 +1394,7 @@ function Up({
|
|
|
1394
1394
|
refetchOnReconnect: !1
|
|
1395
1395
|
}), za = N(null);
|
|
1396
1396
|
za.current = (as == null ? void 0 : as.latest) ?? null;
|
|
1397
|
-
const [
|
|
1397
|
+
const [Jh, or] = I(!1), [Yh, go] = I([]);
|
|
1398
1398
|
B(() => {
|
|
1399
1399
|
(ze || rs) && or(!1);
|
|
1400
1400
|
}, [ze, rs]);
|
|
@@ -1407,7 +1407,7 @@ function Up({
|
|
|
1407
1407
|
})
|
|
1408
1408
|
);
|
|
1409
1409
|
}
|
|
1410
|
-
const pe = N({}), Gs = N(/* @__PURE__ */ new Set()), Sc = H0(),
|
|
1410
|
+
const pe = N({}), Gs = N(/* @__PURE__ */ new Set()), Sc = H0(), Zh = A(
|
|
1411
1411
|
() => u || S ? null : { collection: i, item: String(f), saved: (e) => pe.current[e] },
|
|
1412
1412
|
[i, f, u, S]
|
|
1413
1413
|
), [Js, ar] = I(null), [ls, Nc] = I([]), Qa = N(""), yo = de((e) => {
|
|
@@ -1421,10 +1421,10 @@ function Up({
|
|
|
1421
1421
|
}, []), [Te, lr] = I(
|
|
1422
1422
|
/* @__PURE__ */ new Map()
|
|
1423
1423
|
), wo = N(/* @__PURE__ */ new Map()), [He, jr] = I(/* @__PURE__ */ new Map()), [Ge, ko] = I(/* @__PURE__ */ new Map()), Cc = N(() => {
|
|
1424
|
-
}), [ds,
|
|
1424
|
+
}), [ds, Xh] = I(() => /* @__PURE__ */ new Set()), Va = N(/* @__PURE__ */ new Map()), gn = A(
|
|
1425
1425
|
() => ({
|
|
1426
1426
|
noteEditIntent: () => Cc.current(),
|
|
1427
|
-
noteLineDraft: (e, t) =>
|
|
1427
|
+
noteLineDraft: (e, t) => Xh((n) => {
|
|
1428
1428
|
if (n.has(e) === t) return n;
|
|
1429
1429
|
const r = new Set(n);
|
|
1430
1430
|
return t ? r.add(e) : r.delete(e), r;
|
|
@@ -1613,12 +1613,12 @@ function Up({
|
|
|
1613
1613
|
cs(t);
|
|
1614
1614
|
},
|
|
1615
1615
|
[i, D, gn, Se, O, j]
|
|
1616
|
-
), Zs = N(null), [
|
|
1616
|
+
), Zs = N(null), [eg, tg] = I(!1), ng = de(
|
|
1617
1617
|
async (e) => {
|
|
1618
1618
|
Zs.current = {
|
|
1619
1619
|
id: e.proposal_id,
|
|
1620
1620
|
fields: [...Object.keys(e.values), ...Object.keys(e.m2m ?? {})]
|
|
1621
|
-
},
|
|
1621
|
+
}, tg(!0);
|
|
1622
1622
|
for (const r of Object.keys(e.m2m ?? {})) wc.current(r);
|
|
1623
1623
|
const t = {};
|
|
1624
1624
|
for (const [r, s] of Object.entries(e.values)) {
|
|
@@ -1659,7 +1659,7 @@ function Up({
|
|
|
1659
1659
|
if (!n) return;
|
|
1660
1660
|
const r = e.line_target_field ? D.find(
|
|
1661
1661
|
(m) => m.one_collection === i && m.one_field === e.line_target_field
|
|
1662
|
-
) : null, s =
|
|
1662
|
+
) : null, s = Lp(e);
|
|
1663
1663
|
let o = [];
|
|
1664
1664
|
if (e.lines.length > 0 && (r != null && r.many_collection) && r.many_field) {
|
|
1665
1665
|
const m = /* @__PURE__ */ new Set(["id", ...n.match_by]);
|
|
@@ -1754,7 +1754,7 @@ function Up({
|
|
|
1754
1754
|
f,
|
|
1755
1755
|
O
|
|
1756
1756
|
]
|
|
1757
|
-
),
|
|
1757
|
+
), rg = de(
|
|
1758
1758
|
async (e, t, n, r, s = []) => {
|
|
1759
1759
|
const o = n.reimport;
|
|
1760
1760
|
if (!o) return;
|
|
@@ -1820,12 +1820,12 @@ function Up({
|
|
|
1820
1820
|
for (const y of e.deletes)
|
|
1821
1821
|
gn.queueDelete(p, m, y);
|
|
1822
1822
|
if (o.lines === "upsert" || o.lines === "upsert_delete") {
|
|
1823
|
-
const y =
|
|
1823
|
+
const y = Lp(t), R = /* @__PURE__ */ new Map();
|
|
1824
1824
|
for (const Q of r)
|
|
1825
|
-
R.set(
|
|
1825
|
+
R.set(pp(Q, o.match_by), String(Q.id));
|
|
1826
1826
|
const K = /* @__PURE__ */ new Map();
|
|
1827
1827
|
for (const Q of y) {
|
|
1828
|
-
const oe = R.get(
|
|
1828
|
+
const oe = R.get(pp(Q, o.match_by));
|
|
1829
1829
|
if (oe)
|
|
1830
1830
|
for (const [q, X] of Object.entries(Q)) {
|
|
1831
1831
|
if (!q.startsWith("__o2m_")) continue;
|
|
@@ -2015,7 +2015,7 @@ function Up({
|
|
|
2015
2015
|
return (g = h.fields) == null ? void 0 : g.includes(m);
|
|
2016
2016
|
}) : s : [];
|
|
2017
2017
|
if (s.length > 0) {
|
|
2018
|
-
const m = Qs.current, g =
|
|
2018
|
+
const m = Qs.current, g = zp(m, De), k = (/* @__PURE__ */ new Date()).toISOString();
|
|
2019
2019
|
ir((R) => {
|
|
2020
2020
|
const K = { ...R };
|
|
2021
2021
|
for (const Q of s) {
|
|
@@ -2056,7 +2056,7 @@ function Up({
|
|
|
2056
2056
|
Pa.current
|
|
2057
2057
|
);
|
|
2058
2058
|
if (l.length > 0) {
|
|
2059
|
-
const c =
|
|
2059
|
+
const c = zp(Qs.current, De), d = (/* @__PURE__ */ new Date()).toISOString(), h = pe.current;
|
|
2060
2060
|
ir((p) => {
|
|
2061
2061
|
const m = { ...p };
|
|
2062
2062
|
for (const g of l)
|
|
@@ -2079,7 +2079,7 @@ function Up({
|
|
|
2079
2079
|
const e = pe.current, t = [];
|
|
2080
2080
|
for (const m of Object.keys(M))
|
|
2081
2081
|
m.startsWith("__") || Ae.current.has(m) && (Ke(M[m], e[m]) || t.push(m));
|
|
2082
|
-
const n = (m, g) => [...m.values()].reduce((k, C) => k + g(C), 0), r = n(Te, (m) => m.length), s = n(He, (m) => m.size), o = n(Ge, (m) => m.size), l =
|
|
2082
|
+
const n = (m, g) => [...m.values()].reduce((k, C) => k + g(C), 0), r = n(Te, (m) => m.length), s = n(He, (m) => m.size), o = n(Ge, (m) => m.size), l = Cp(et, po.current(et)), c = n(dt, (m) => m.size), d = t.length + r + s + o + l + c, h = [];
|
|
2083
2083
|
t.length && h.push(`${t.length} field${t.length === 1 ? "" : "s"}`);
|
|
2084
2084
|
const p = r + s + o;
|
|
2085
2085
|
return p && h.push(`${p} line${p === 1 ? "" : "s"}`), l + c && h.push(`${l + c} link${l + c === 1 ? "" : "s"}`), { fields: t, rows: r, edits: s, deletes: o, links: l, unlinks: c, total: d, text: h.join(", ") };
|
|
@@ -2113,7 +2113,7 @@ function Up({
|
|
|
2113
2113
|
).catch(() => null) : Promise.resolve(null);
|
|
2114
2114
|
return Promise.all([H_($t), n]).then(([r, s]) => {
|
|
2115
2115
|
if (s && (Fr.current = !0), e) return;
|
|
2116
|
-
|
|
2116
|
+
Dh($t);
|
|
2117
2117
|
const o = r && s ? String(s.saved_at) > String(r.saved_at) ? s : r : r ?? s;
|
|
2118
2118
|
if (!o || !md(o) || u && !G_(o, yc) || // A new form seeded by a file import (Import BID Template, BOM Upload)
|
|
2119
2119
|
// IS the person's starting point: an older draft offered over it
|
|
@@ -2149,7 +2149,7 @@ function Up({
|
|
|
2149
2149
|
if (Xs.current = null, Xa.current = async () => !1, an.state !== "none" || Us !== $t) return;
|
|
2150
2150
|
const e = async (n = !1) => {
|
|
2151
2151
|
if (Xs.current = null, ps.current) return !n;
|
|
2152
|
-
const r = po.current(et), s = Te.size + He.size + Ge.size + (r.size ?
|
|
2152
|
+
const r = po.current(et), s = Te.size + He.size + Ge.size + (r.size ? Cp(et, r) : et.size) + dt.size, o = Te.size + He.size + Ge.size, l = s0({ isDirty: Xe, forReload: n, staged: s, stagedLines: o });
|
|
2153
2153
|
if (l === "hold") return !1;
|
|
2154
2154
|
if (l === "drop")
|
|
2155
2155
|
return qs($t), De && Fr.current && (Fr.current = !1, j.request(br(`/drafts/${i}/${u ? "new" : String(f)}`)).catch(() => {
|
|
@@ -2226,7 +2226,7 @@ function Up({
|
|
|
2226
2226
|
De
|
|
2227
2227
|
]);
|
|
2228
2228
|
const ei = N(() => {
|
|
2229
|
-
}),
|
|
2229
|
+
}), sg = de(() => {
|
|
2230
2230
|
const e = _c.current;
|
|
2231
2231
|
if (e.state !== "offer") return;
|
|
2232
2232
|
const t = e.draft;
|
|
@@ -2275,10 +2275,10 @@ function Up({
|
|
|
2275
2275
|
}
|
|
2276
2276
|
Object.keys(t.pending_deletes ?? {}).length && ko(
|
|
2277
2277
|
new Map(Object.entries(t.pending_deletes).map(([o, l]) => [o, new Set(l)]))
|
|
2278
|
-
), Object.keys(t.m2m_links ?? {}).length && dr(new Map(Object.entries(t.m2m_links))), Object.keys(t.m2m_unlinks ?? {}).length && Ar(new Map(Object.entries(t.m2m_unlinks).map(([o, l]) => [o, new Set(l)]))), on(!0),
|
|
2278
|
+
), Object.keys(t.m2m_links ?? {}).length && dr(new Map(Object.entries(t.m2m_links))), Object.keys(t.m2m_unlinks ?? {}).length && Ar(new Map(Object.entries(t.m2m_unlinks).map(([o, l]) => [o, new Set(l)]))), on(!0), Kh(!0), is({ state: "none" });
|
|
2279
2279
|
for (const [o, l] of Object.entries(t.fields))
|
|
2280
2280
|
l == null || l === "" || ei.current(o, l);
|
|
2281
|
-
}, []),
|
|
2281
|
+
}, []), ig = de(() => {
|
|
2282
2282
|
qs($t), De && j.request(br(`/drafts/${i}/${u ? "new" : String(f)}`)).catch(() => {
|
|
2283
2283
|
}), is({ state: "none" });
|
|
2284
2284
|
}, [$t, De, j, i, u, f]);
|
|
@@ -2348,7 +2348,7 @@ function Up({
|
|
|
2348
2348
|
).then((e) => e.data ?? {}),
|
|
2349
2349
|
enabled: !u && Pt && el.length > 0,
|
|
2350
2350
|
staleTime: 3e4
|
|
2351
|
-
}),
|
|
2351
|
+
}), og = A(() => {
|
|
2352
2352
|
if (!hs) return null;
|
|
2353
2353
|
const e = {};
|
|
2354
2354
|
for (const [t, n] of Object.entries(hs))
|
|
@@ -2373,8 +2373,8 @@ function Up({
|
|
|
2373
2373
|
s && n.set(r, s);
|
|
2374
2374
|
}
|
|
2375
2375
|
return n;
|
|
2376
|
-
}, [Zr, D, i]),
|
|
2377
|
-
queries:
|
|
2376
|
+
}, [Zr, D, i]), ag = [...ae.values()], Ic = Ci({
|
|
2377
|
+
queries: ag.map((e) => ({
|
|
2378
2378
|
queryKey: ["m2m-items", e.manyCollection, e.manyField, f],
|
|
2379
2379
|
queryFn: () => j.request(
|
|
2380
2380
|
ie(`/items/${e.manyCollection}`, {
|
|
@@ -2437,7 +2437,7 @@ function Up({
|
|
|
2437
2437
|
var t;
|
|
2438
2438
|
const e = (t = x == null ? void 0 : x.layout) == null ? void 0 : t.quick_picker;
|
|
2439
2439
|
return Array.isArray(e) ? e.filter((n) => typeof n == "string") : [];
|
|
2440
|
-
}, [x]), [Dc, Bc] = I(!1),
|
|
2440
|
+
}, [x]), [Dc, Bc] = I(!1), lg = de(
|
|
2441
2441
|
(e, t) => {
|
|
2442
2442
|
const n = Id(D, i, e);
|
|
2443
2443
|
if (!n) return;
|
|
@@ -2602,7 +2602,7 @@ function Up({
|
|
|
2602
2602
|
(z == null ? void 0 : z.options) ?? null
|
|
2603
2603
|
)) == null ? void 0 : C.max_values;
|
|
2604
2604
|
if (ne != null && Z.length > ne) {
|
|
2605
|
-
const Fe =
|
|
2605
|
+
const Fe = Up((y = Pc.current.get(o)) == null ? void 0 : y[W], Z);
|
|
2606
2606
|
if (Fe.length === 0 || Fe.length > ne) continue;
|
|
2607
2607
|
Z = Fe;
|
|
2608
2608
|
}
|
|
@@ -2699,7 +2699,7 @@ function Up({
|
|
|
2699
2699
|
(Fe == null ? void 0 : Fe.options) ?? null
|
|
2700
2700
|
)) == null ? void 0 : Wr.max_values;
|
|
2701
2701
|
if (bn != null && z.length > bn) {
|
|
2702
|
-
const Vt =
|
|
2702
|
+
const Vt = Up(h[L], z);
|
|
2703
2703
|
if (Vt.length === 0 || Vt.length > bn) return;
|
|
2704
2704
|
z = Vt;
|
|
2705
2705
|
}
|
|
@@ -2822,10 +2822,10 @@ function Up({
|
|
|
2822
2822
|
for (const t of Object.values(e)) clearTimeout(t);
|
|
2823
2823
|
};
|
|
2824
2824
|
}, []);
|
|
2825
|
-
const Vc = N(/* @__PURE__ */ new Map()),
|
|
2825
|
+
const Vc = N(/* @__PURE__ */ new Map()), dg = (e, t, n) => cS(Vc.current, e, t, n), ri = de(
|
|
2826
2826
|
(e, t, n) => {
|
|
2827
2827
|
if (S) return;
|
|
2828
|
-
const r =
|
|
2828
|
+
const r = Kp(Zr, e);
|
|
2829
2829
|
if (r.length === 0) return;
|
|
2830
2830
|
const s = Co.current[e];
|
|
2831
2831
|
s && clearTimeout(s), Co.current[e] = setTimeout(() => {
|
|
@@ -2833,7 +2833,7 @@ function Up({
|
|
|
2833
2833
|
const o = es.current, l = t !== void 0 ? t : U.current[e], c = {};
|
|
2834
2834
|
for (const d of r) {
|
|
2835
2835
|
const h = ti(d.target_field), p = h !== void 0 ? h : U.current[d.target_field];
|
|
2836
|
-
c[d.target_field] = !(n != null && n.fillEmptyOnly) && h === void 0 &&
|
|
2836
|
+
c[d.target_field] = !(n != null && n.fillEmptyOnly) && h === void 0 && dg(d.target_field, e, p) ? null : p;
|
|
2837
2837
|
}
|
|
2838
2838
|
j.request(
|
|
2839
2839
|
mn("/field-rules/evaluate", {
|
|
@@ -2854,7 +2854,7 @@ function Up({
|
|
|
2854
2854
|
}
|
|
2855
2855
|
Uc(h, o, Wt.current.has(e));
|
|
2856
2856
|
for (const [p, m] of Object.entries(h ?? {}))
|
|
2857
|
-
ae.has(p) || Vc.current.set(p, { trigger: e, value:
|
|
2857
|
+
ae.has(p) || Vc.current.set(p, { trigger: e, value: oh(m) });
|
|
2858
2858
|
}).catch(() => {
|
|
2859
2859
|
});
|
|
2860
2860
|
}, 300);
|
|
@@ -2874,7 +2874,7 @@ function Up({
|
|
|
2874
2874
|
};
|
|
2875
2875
|
const nl = N({}), Hc = N(!1), rl = A(
|
|
2876
2876
|
() => [...ae.entries()].filter(
|
|
2877
|
-
([e]) =>
|
|
2877
|
+
([e]) => Kp(Zr, e).length > 0
|
|
2878
2878
|
),
|
|
2879
2879
|
[ae, Zr]
|
|
2880
2880
|
);
|
|
@@ -2919,7 +2919,7 @@ function Up({
|
|
|
2919
2919
|
d.parent_field === e && d.clear_on_parent_change && (n[l.field] = null);
|
|
2920
2920
|
} catch {
|
|
2921
2921
|
}
|
|
2922
|
-
U.current = n, lt(n), Wt.current.delete(e), ho.current(e), on(u ? !0 :
|
|
2922
|
+
U.current = n, lt(n), Wt.current.delete(e), ho.current(e), on(u ? !0 : Bp(n, pe.current));
|
|
2923
2923
|
const r = t == null || t === "";
|
|
2924
2924
|
r || Gs.current.add(e), hn((l) => {
|
|
2925
2925
|
const c = { ...l }, d = (O ?? []).find((h) => h.field === e);
|
|
@@ -2950,7 +2950,7 @@ function Up({
|
|
|
2950
2950
|
for (const n of O ?? [])
|
|
2951
2951
|
n.readonly || n.hidden || ((t = n._overrides) == null ? void 0 : t.personal_default) === !0 && e.add(n.field);
|
|
2952
2952
|
return e;
|
|
2953
|
-
}, [O]),
|
|
2953
|
+
}, [O]), cg = A(() => {
|
|
2954
2954
|
const e = /* @__PURE__ */ new Set();
|
|
2955
2955
|
for (const t of O ?? []) {
|
|
2956
2956
|
const n = t._overrides;
|
|
@@ -2992,7 +2992,7 @@ function Up({
|
|
|
2992
2992
|
readValue: (e) => sl(e) ?? U.current[e]
|
|
2993
2993
|
}),
|
|
2994
2994
|
[j, i, O, D, sl]
|
|
2995
|
-
),
|
|
2995
|
+
), ug = de(
|
|
2996
2996
|
(e) => {
|
|
2997
2997
|
const t = new Set(e);
|
|
2998
2998
|
for (let s = !0; s; ) {
|
|
@@ -3012,7 +3012,7 @@ function Up({
|
|
|
3012
3012
|
Object.keys(r).length !== 0 && (U.current = { ...U.current, ...r }, lt((s) => ({ ...s, ...r })));
|
|
3013
3013
|
},
|
|
3014
3014
|
[gs]
|
|
3015
|
-
),
|
|
3015
|
+
), fg = de(
|
|
3016
3016
|
(e, t, n) => {
|
|
3017
3017
|
var h;
|
|
3018
3018
|
pd(t) ? Wt.current.delete(e) : Wt.current.add(e);
|
|
@@ -3039,13 +3039,13 @@ function Up({
|
|
|
3039
3039
|
collection: i,
|
|
3040
3040
|
isNew: u,
|
|
3041
3041
|
layoutAllows: (e) => Yc.has(e),
|
|
3042
|
-
layoutManage: (e) => !
|
|
3042
|
+
layoutManage: (e) => !cg.has(e),
|
|
3043
3043
|
draftRef: U,
|
|
3044
|
-
setFieldValue:
|
|
3045
|
-
onUndone:
|
|
3044
|
+
setFieldValue: fg,
|
|
3045
|
+
onUndone: ug,
|
|
3046
3046
|
markAutoFilled: Hs,
|
|
3047
3047
|
revalidate: Xc.revalidate,
|
|
3048
|
-
disabled: S ||
|
|
3048
|
+
disabled: S || Mh,
|
|
3049
3049
|
enabled: !S && Yc.size > 0,
|
|
3050
3050
|
ready: u && !S && x !== void 0 && Ui && Sr && an.state === "none" && Us === $t && // The draft check ran for the real person (the auth id can arrive a render late; the
|
|
3051
3051
|
// anonymous key's check never saw their server draft).
|
|
@@ -3053,7 +3053,7 @@ function Up({
|
|
|
3053
3053
|
resetKey: `${i}:${f}`,
|
|
3054
3054
|
rulesFor: (e) => {
|
|
3055
3055
|
var t;
|
|
3056
|
-
return
|
|
3056
|
+
return _p(
|
|
3057
3057
|
((t = (O ?? []).find((n) => n.field === e)) == null ? void 0 : t.dependency_config) ?? null
|
|
3058
3058
|
);
|
|
3059
3059
|
},
|
|
@@ -3102,7 +3102,7 @@ function Up({
|
|
|
3102
3102
|
}, B(() => {
|
|
3103
3103
|
Wt.current.clear(), os.current.clear();
|
|
3104
3104
|
}, [i, f, u]);
|
|
3105
|
-
const [ol,
|
|
3105
|
+
const [ol, mg] = I({}), Lt = A(
|
|
3106
3106
|
() => D.filter(
|
|
3107
3107
|
(e) => !e.junction_field && e.one_collection === i && e.one_field && e.many_field && e.many_collection
|
|
3108
3108
|
),
|
|
@@ -3171,11 +3171,11 @@ function Up({
|
|
|
3171
3171
|
return t ? n : e;
|
|
3172
3172
|
});
|
|
3173
3173
|
}, [Xt, Dn]), B(() => {
|
|
3174
|
-
|
|
3174
|
+
Dp(Ze, M) !== Ze && hn((e) => Dp(e, M));
|
|
3175
3175
|
}, [M]);
|
|
3176
3176
|
const qr = de(
|
|
3177
3177
|
(e, t) => {
|
|
3178
|
-
|
|
3178
|
+
mg((n) => n[e] === t ? n : { ...n, [e]: t }), t > 0 && Gs.current.add(e), hn((n) => {
|
|
3179
3179
|
const r = (O ?? []).find((o) => o.field === e);
|
|
3180
3180
|
if (!(r != null && r.required)) {
|
|
3181
3181
|
if (t === 0 || !qi(n[e])) return n;
|
|
@@ -3187,13 +3187,13 @@ function Up({
|
|
|
3187
3187
|
});
|
|
3188
3188
|
},
|
|
3189
3189
|
[O]
|
|
3190
|
-
),
|
|
3190
|
+
), pg = A(
|
|
3191
3191
|
() => !!Fi(v == null ? void 0 : v.summary_mode_rules).edit_lock,
|
|
3192
3192
|
[v == null ? void 0 : v.summary_mode_rules]
|
|
3193
3193
|
), eu = A(
|
|
3194
3194
|
() => Fi(v == null ? void 0 : v.summary_mode_rules).change_proposals === !0,
|
|
3195
3195
|
[v == null ? void 0 : v.summary_mode_rules]
|
|
3196
|
-
),
|
|
3196
|
+
), hg = A(
|
|
3197
3197
|
() => !!_b(Fi(v == null ? void 0 : v.summary_mode_rules)),
|
|
3198
3198
|
[v == null ? void 0 : v.summary_mode_rules]
|
|
3199
3199
|
), tu = (e) => {
|
|
@@ -3206,8 +3206,8 @@ function Up({
|
|
|
3206
3206
|
).catch(() => null),
|
|
3207
3207
|
staleTime: 3e4,
|
|
3208
3208
|
// After the record answered (army 10): a missing record's instance read only 404s.
|
|
3209
|
-
enabled:
|
|
3210
|
-
}), Nn = ll == null ? void 0 : ll.edit_lock, rt = !S && !u && (Nn == null ? void 0 : Nn.locked) === !0 && Nn.allowed === !1 ? ((
|
|
3209
|
+
enabled: pg && !u && !S && Pt && Ms
|
|
3210
|
+
}), Nn = ll == null ? void 0 : ll.edit_lock, rt = !S && !u && (Nn == null ? void 0 : Nn.locked) === !0 && Nn.allowed === !1 ? ((gm = Nn.message) == null ? void 0 : gm.trim()) || "This record is in approval — you can view it but not change it." : null, dl = A(
|
|
3211
3211
|
() => new Set((Nn == null ? void 0 : Nn.open_fields) ?? []),
|
|
3212
3212
|
[Nn == null ? void 0 : Nn.open_fields]
|
|
3213
3213
|
), Bn = !!rt && dl.size > 0, nu = N(rt);
|
|
@@ -3220,7 +3220,7 @@ function Up({
|
|
|
3220
3220
|
duration: 3e4
|
|
3221
3221
|
});
|
|
3222
3222
|
}, [rt, yn, ds.size, u, S, i, f]);
|
|
3223
|
-
const si = !S && Ld && !u && !nc && !!(v != null && v.item_locking_enabled) && ss && !xt && (!rt || Bn),
|
|
3223
|
+
const si = !S && Ld && !u && !nc && !!(v != null && v.item_locking_enabled) && ss && !xt && (!rt || Bn), gg = ep().active, cl = !u && !S && !!Fi(v == null ? void 0 : v.summary_mode_rules).line_locks, ul = A(
|
|
3224
3224
|
() => new Set(
|
|
3225
3225
|
Sc && !u && !S ? (O ?? []).filter((e) => sv(e)).map((e) => e.field) : []
|
|
3226
3226
|
),
|
|
@@ -3230,7 +3230,7 @@ function Up({
|
|
|
3230
3230
|
unsavedFields: ot.fields,
|
|
3231
3231
|
otherChanges: ot.rows + ot.links + ot.unlinks + ds.size,
|
|
3232
3232
|
recordGone: !!pn
|
|
3233
|
-
}, fl =
|
|
3233
|
+
}, fl = gp({
|
|
3234
3234
|
...ru,
|
|
3235
3235
|
heldByOther: !1,
|
|
3236
3236
|
stepLocked: !1
|
|
@@ -3238,25 +3238,25 @@ function Up({
|
|
|
3238
3238
|
lockHolder: Wn,
|
|
3239
3239
|
acquired: ml,
|
|
3240
3240
|
isReadOnly: Fo,
|
|
3241
|
-
takeOver:
|
|
3242
|
-
takingOver:
|
|
3243
|
-
requestLock:
|
|
3244
|
-
requesting:
|
|
3241
|
+
takeOver: yg,
|
|
3242
|
+
takingOver: _g,
|
|
3243
|
+
requestLock: bg,
|
|
3244
|
+
requesting: vg,
|
|
3245
3245
|
queue: su,
|
|
3246
|
-
myPosition:
|
|
3247
|
-
joinQueue:
|
|
3248
|
-
leaveQueue:
|
|
3249
|
-
joining:
|
|
3250
|
-
myNote:
|
|
3251
|
-
saveNote:
|
|
3252
|
-
release:
|
|
3253
|
-
releasing:
|
|
3246
|
+
myPosition: wg,
|
|
3247
|
+
joinQueue: kg,
|
|
3248
|
+
leaveQueue: xg,
|
|
3249
|
+
joining: Sg,
|
|
3250
|
+
myNote: Ng,
|
|
3251
|
+
saveNote: Cg,
|
|
3252
|
+
release: $g,
|
|
3253
|
+
releasing: Rg,
|
|
3254
3254
|
released: pl,
|
|
3255
3255
|
relock: iu,
|
|
3256
|
-
claim:
|
|
3256
|
+
claim: Og
|
|
3257
3257
|
} = Sx(i, u ? void 0 : f, si, {
|
|
3258
3258
|
lazy: !0,
|
|
3259
|
-
active: _a &&
|
|
3259
|
+
active: _a && gg,
|
|
3260
3260
|
// a10-4: a clean form (saved, or edits undone) lets the lock go. A line
|
|
3261
3261
|
// editor still holding a typed change is not clean (army 11 f4 L1) — unless
|
|
3262
3262
|
// lines lock on their own (line locks).
|
|
@@ -3264,18 +3264,18 @@ function Up({
|
|
|
3264
3264
|
}), zn = Fo || !!pn || !!rt && !Bn, hl = nx(
|
|
3265
3265
|
!u && f && !S ? { kind: "record", id: `${i}:${f}` } : null,
|
|
3266
3266
|
{ mayCreate: wt || !(rt && !Bn) }
|
|
3267
|
-
), [
|
|
3267
|
+
), [Fg, ou] = I(null), [jg, Ag] = I(null);
|
|
3268
3268
|
Fa.current = zn && !u;
|
|
3269
|
-
const au = cl && Fo && !pn && !(rt && !Bn),
|
|
3269
|
+
const au = cl && Fo && !pn && !(rt && !Bn), Tg = A(
|
|
3270
3270
|
() => new Set(
|
|
3271
3271
|
(O ?? []).filter((e) => Gx.has(String(e.interface ?? ""))).map((e) => e.field)
|
|
3272
3272
|
),
|
|
3273
3273
|
[O]
|
|
3274
|
-
), lu =
|
|
3274
|
+
), lu = gp({
|
|
3275
3275
|
...ru,
|
|
3276
3276
|
heldByOther: Fo,
|
|
3277
3277
|
stepLocked: !!rt && !Bn
|
|
3278
|
-
}), du = lu.open, ii = (e) => zn && !(au &&
|
|
3278
|
+
}), du = lu.open, ii = (e) => zn && !(au && Tg.has(e)) && !(du && ul.has(e)), gl = lu.saveOk;
|
|
3279
3279
|
Gc.current = du ? ul : /* @__PURE__ */ new Set();
|
|
3280
3280
|
const yl = zn && !au && !gl;
|
|
3281
3281
|
B(
|
|
@@ -3345,7 +3345,7 @@ function Up({
|
|
|
3345
3345
|
value: c[d.field],
|
|
3346
3346
|
status: d.status
|
|
3347
3347
|
}), c[d.field] = pe.current[d.field] ?? null;
|
|
3348
|
-
U.current = c, lt(c), on(
|
|
3348
|
+
U.current = c, lt(c), on(Bp(c, pe.current));
|
|
3349
3349
|
}
|
|
3350
3350
|
if (s.length > 0) {
|
|
3351
3351
|
const c = new Set(s.map((d) => d.stagingKey));
|
|
@@ -3372,9 +3372,9 @@ function Up({
|
|
|
3372
3372
|
}, [ys]), B(() => {
|
|
3373
3373
|
To([]), vl(null);
|
|
3374
3374
|
}, [i, f]);
|
|
3375
|
-
const
|
|
3375
|
+
const qg = (e) => {
|
|
3376
3376
|
const t = bl.find((n) => n.field === e);
|
|
3377
|
-
if (!(!t ||
|
|
3377
|
+
if (!(!t || bp(Sd(O, x), e) !== "editable")) {
|
|
3378
3378
|
if (t.links) {
|
|
3379
3379
|
const { stagingKey: n, add: r, remove: s } = t.links;
|
|
3380
3380
|
r.length > 0 && dr((o) => {
|
|
@@ -3388,7 +3388,7 @@ function Up({
|
|
|
3388
3388
|
To((n) => n.filter((r) => r.field !== e));
|
|
3389
3389
|
}
|
|
3390
3390
|
};
|
|
3391
|
-
Kn.current = si && !ml && !Wn ? () => void (pl ? iu() :
|
|
3391
|
+
Kn.current = si && !ml && !Wn ? () => void (pl ? iu() : Og()) : null, B(() => {
|
|
3392
3392
|
var e;
|
|
3393
3393
|
fl && ((e = Kn.current) == null || e.call(Kn));
|
|
3394
3394
|
}, [fl, si]);
|
|
@@ -3413,7 +3413,7 @@ function Up({
|
|
|
3413
3413
|
!yu || Ve || hk(i, { role: kl, state: xl });
|
|
3414
3414
|
}, [yu, Ve, i, kl, xl]), B(() => {
|
|
3415
3415
|
if (u || Ve) return;
|
|
3416
|
-
const e =
|
|
3416
|
+
const e = xp(i);
|
|
3417
3417
|
e && e.role && H.prefetchQuery({
|
|
3418
3418
|
queryKey: ["current-user-me"],
|
|
3419
3419
|
queryFn: fu,
|
|
@@ -3421,7 +3421,7 @@ function Up({
|
|
|
3421
3421
|
});
|
|
3422
3422
|
}, [i, f]), B(() => {
|
|
3423
3423
|
if (u || Ve || !Pt || !Ms) return;
|
|
3424
|
-
const e =
|
|
3424
|
+
const e = xp(i);
|
|
3425
3425
|
e != null && e.state && H.prefetchQuery({
|
|
3426
3426
|
queryKey: ["pipeline-instance-lock", i, f],
|
|
3427
3427
|
queryFn: pu,
|
|
@@ -3487,7 +3487,7 @@ function Up({
|
|
|
3487
3487
|
B(() => {
|
|
3488
3488
|
Gb(Be, Mt, _u && !bu) && Gi("original");
|
|
3489
3489
|
}, [Be, Mt, _u, bu]);
|
|
3490
|
-
const
|
|
3490
|
+
const Ig = A(() => {
|
|
3491
3491
|
const e = {};
|
|
3492
3492
|
for (const t of Mt)
|
|
3493
3493
|
if (!["approved", "rejected"].includes(t.status))
|
|
@@ -3510,7 +3510,7 @@ function Up({
|
|
|
3510
3510
|
const e = /* @__PURE__ */ new Map();
|
|
3511
3511
|
for (const t of O ?? [])
|
|
3512
3512
|
if (!(t.computed_type !== "rollup" || !t.computed_formula))
|
|
3513
|
-
for (const n of
|
|
3513
|
+
for (const n of wp(t.computed_formula)) {
|
|
3514
3514
|
const r = `${n.related_collection}.${n.fk_field}`, s = new Set(e.get(r) ?? ["id"]);
|
|
3515
3515
|
n.value_field && s.add(n.value_field);
|
|
3516
3516
|
for (const o of Object.keys(n.filter ?? {})) s.add(o);
|
|
@@ -3536,7 +3536,7 @@ function Up({
|
|
|
3536
3536
|
if (!s) return;
|
|
3537
3537
|
const o = n.map((l) => s.map((c) => String(l[c] ?? "")).join("")).join("");
|
|
3538
3538
|
Ko.current.get(r) !== o && (Ko.current.set(r, o), wu((l) => new Map(l).set(r, n)));
|
|
3539
|
-
}, []),
|
|
3539
|
+
}, []), Pg = A(
|
|
3540
3540
|
() => ({ rows: ws, report: xu }),
|
|
3541
3541
|
[ws, xu]
|
|
3542
3542
|
), [Su, Nl] = I(/* @__PURE__ */ new Map()), ks = N(/* @__PURE__ */ new Map()), Nu = de((e, t) => {
|
|
@@ -3551,7 +3551,7 @@ function Up({
|
|
|
3551
3551
|
}
|
|
3552
3552
|
const n = JSON.stringify(t);
|
|
3553
3553
|
ks.current.get(e) !== n && (ks.current.set(e, n), Nl((r) => new Map(r).set(e, t)));
|
|
3554
|
-
}, []),
|
|
3554
|
+
}, []), Eg = A(
|
|
3555
3555
|
() => ({ report: Nu, byGrid: Su }),
|
|
3556
3556
|
[Nu, Su]
|
|
3557
3557
|
), xs = A(() => {
|
|
@@ -3598,7 +3598,7 @@ function Up({
|
|
|
3598
3598
|
queryFn: () => j.request(ie(`/field-config/${e.collection}`)).then((t) => t.data ?? []),
|
|
3599
3599
|
staleTime: 6e4
|
|
3600
3600
|
}))
|
|
3601
|
-
}),
|
|
3601
|
+
}), Lg = xs.some(
|
|
3602
3602
|
(e, t) => {
|
|
3603
3603
|
var n;
|
|
3604
3604
|
return e.addendum && !((n = Cl[t]) != null && n.data);
|
|
@@ -3622,8 +3622,8 @@ function Up({
|
|
|
3622
3622
|
})
|
|
3623
3623
|
);
|
|
3624
3624
|
}), e;
|
|
3625
|
-
}, [xs, Cl]), [$l,
|
|
3626
|
-
if (
|
|
3625
|
+
}, [xs, Cl]), [$l, Mg] = I(() => /* @__PURE__ */ new Set()), Ru = N(() => !1), Kg = de((e, t) => {
|
|
3626
|
+
if (Mg((n) => {
|
|
3627
3627
|
if (n.has(e) === t) return n;
|
|
3628
3628
|
const r = new Set(n);
|
|
3629
3629
|
return t ? r.add(e) : r.delete(e), r;
|
|
@@ -3643,7 +3643,7 @@ function Up({
|
|
|
3643
3643
|
function Ou(e) {
|
|
3644
3644
|
if (u || !Ke(U.current[e], pe.current[e])) return !0;
|
|
3645
3645
|
const t = (O ?? []).find((n) => n.field === e);
|
|
3646
|
-
return
|
|
3646
|
+
return _p((t == null ? void 0 : t.dependency_config) ?? null).some(
|
|
3647
3647
|
(n) => !!n.parent_field && Ae.current.has(n.parent_field) && !Ke(U.current[n.parent_field], pe.current[n.parent_field])
|
|
3648
3648
|
);
|
|
3649
3649
|
}
|
|
@@ -3656,7 +3656,7 @@ function Up({
|
|
|
3656
3656
|
const r = new Map(ws);
|
|
3657
3657
|
for (const [o, l] of $u)
|
|
3658
3658
|
(!r.has(o) || Cu.has(o)) && r.set(o, l);
|
|
3659
|
-
const s = gw(
|
|
3659
|
+
const s = gw(wp(t.computed_formula), r);
|
|
3660
3660
|
s !== null && e.set(t.field, s);
|
|
3661
3661
|
}
|
|
3662
3662
|
return e;
|
|
@@ -3667,27 +3667,27 @@ function Up({
|
|
|
3667
3667
|
dataUpdatedAt: Oa,
|
|
3668
3668
|
queryKey: ["item", i, f],
|
|
3669
3669
|
enabled: !u && !S && Be === "original"
|
|
3670
|
-
}), ju = (e) => Do.pending.has(e) ? "pending" : Do.landed.has(e) ? "landed" : null,
|
|
3670
|
+
}), ju = (e) => Do.pending.has(e) ? "pending" : Do.landed.has(e) ? "landed" : null, Dg = A(() => ub(O), [O]), Bg = (e) => {
|
|
3671
3671
|
if (Do.pending.size === 0) return !1;
|
|
3672
|
-
const t =
|
|
3672
|
+
const t = Dg.get(e);
|
|
3673
3673
|
return !!t && [...t].some((n) => Do.pending.has(n));
|
|
3674
3674
|
}, Yn = A(
|
|
3675
3675
|
() => vs ? { ...M, ...vs } : M,
|
|
3676
3676
|
[M, vs]
|
|
3677
|
-
), tt = Be !== "original", St = tt ? "nivaro_addendums" : i, Ot = tt ? Be : f,
|
|
3677
|
+
), tt = Be !== "original", St = tt ? "nivaro_addendums" : i, Ot = tt ? Be : f, Wg = A(
|
|
3678
3678
|
() => tt ? we ?? null : we ? { ...we, ...M } : M,
|
|
3679
3679
|
[tt, we, M]
|
|
3680
|
-
),
|
|
3680
|
+
), zg = Xw(
|
|
3681
3681
|
i,
|
|
3682
3682
|
u || S ? null : String(f),
|
|
3683
|
-
|
|
3683
|
+
Wg,
|
|
3684
3684
|
{ fieldsLocked: !!rt && !Bn, valuesPending: !we }
|
|
3685
|
-
), [
|
|
3685
|
+
), [Qg, Au] = I(null), ur = Mt.find((e) => e.id === Be), Rl = !!ur && (["approved", "reverted"].includes(ur.status) || !Object.values(ur.data ?? {}).some((e) => Array.isArray(e) && e.length > 0)), { data: Ol } = vt({
|
|
3686
3686
|
queryKey: ["addendum-lines", Be],
|
|
3687
3687
|
queryFn: () => j.request(ie(`/addendums/${Be}/lines`)).then((e) => e.data ?? {}),
|
|
3688
3688
|
enabled: Rl,
|
|
3689
3689
|
staleTime: 6e4
|
|
3690
|
-
}),
|
|
3690
|
+
}), Ug = A(() => {
|
|
3691
3691
|
const e = {};
|
|
3692
3692
|
if (Rl && ur && Ol)
|
|
3693
3693
|
for (const [t, n] of Object.entries(Ol))
|
|
@@ -3710,7 +3710,7 @@ function Up({
|
|
|
3710
3710
|
rows: r
|
|
3711
3711
|
}));
|
|
3712
3712
|
return e;
|
|
3713
|
-
}, [Mt, Rl, ur, Ol]), Fl = A(() => !kn || !x ? null : new Set(ht.map((e) => e.field)), [kn, x, ht]),
|
|
3713
|
+
}, [Mt, Rl, ur, Ol]), Fl = A(() => !kn || !x ? null : new Set(ht.map((e) => e.field)), [kn, x, ht]), Vg = A(
|
|
3714
3714
|
() => (O ?? []).filter(
|
|
3715
3715
|
(e) => !e.hidden && !e.field.startsWith("__") && !e.field.includes(".") && !D.some((t) => t.one_collection === i && t.one_field === e.field)
|
|
3716
3716
|
).map((e) => e.field).slice(0, 40),
|
|
@@ -3724,11 +3724,11 @@ function Up({
|
|
|
3724
3724
|
) : r;
|
|
3725
3725
|
}, [O, Fl, kn, x, xe.active, xe.hidden]), Ce = A(() => {
|
|
3726
3726
|
const e = (x == null ? void 0 : x.groups) ?? [];
|
|
3727
|
-
return (S ? e : e.map((n) => F0(n,
|
|
3727
|
+
return (S ? e : e.map((n) => F0(n, Gp()))).sort((n, r) => n.sort - r.sort);
|
|
3728
3728
|
}, [x, S]), Ir = A(() => {
|
|
3729
3729
|
const e = {};
|
|
3730
3730
|
for (const t of Ce) {
|
|
3731
|
-
const n =
|
|
3731
|
+
const n = Ep(t.summary_fields);
|
|
3732
3732
|
if (n)
|
|
3733
3733
|
for (const r of n)
|
|
3734
3734
|
typeof r != "string" && r.field && "agg" in r && r.agg && r.agg_field && (e[r.field] = r);
|
|
@@ -3770,7 +3770,7 @@ function Up({
|
|
|
3770
3770
|
enabled: !!f && !u && Pt,
|
|
3771
3771
|
staleTime: 3e4
|
|
3772
3772
|
}))
|
|
3773
|
-
}),
|
|
3773
|
+
}), Hg = A(() => {
|
|
3774
3774
|
const e = {};
|
|
3775
3775
|
return fr.forEach((t, n) => {
|
|
3776
3776
|
var m;
|
|
@@ -3801,7 +3801,7 @@ function Up({
|
|
|
3801
3801
|
Te,
|
|
3802
3802
|
He,
|
|
3803
3803
|
Ge
|
|
3804
|
-
]),
|
|
3804
|
+
]), Gg = A(() => {
|
|
3805
3805
|
const e = /* @__PURE__ */ new Set();
|
|
3806
3806
|
return Lt.forEach((t, n) => {
|
|
3807
3807
|
var r;
|
|
@@ -3843,7 +3843,7 @@ function Up({
|
|
|
3843
3843
|
() => ye.filter((e) => rn.has(e.field) || e.readonly),
|
|
3844
3844
|
[ye]
|
|
3845
3845
|
);
|
|
3846
|
-
const
|
|
3846
|
+
const Jg = A(() => {
|
|
3847
3847
|
const e = [], t = /* @__PURE__ */ new Set(), n = (r) => {
|
|
3848
3848
|
t.has(r.field) || (t.add(r.field), e.push(r));
|
|
3849
3849
|
};
|
|
@@ -3922,13 +3922,13 @@ function Up({
|
|
|
3922
3922
|
config: mr,
|
|
3923
3923
|
hasTabs: Ft || Lu,
|
|
3924
3924
|
enabled: !S
|
|
3925
|
-
}), Al = (e) => Zn.mode && (e.tab_mode === "steps" || e.tab_mode === "tabs") ? Zn.mode === "beginner" : e.tab_mode === "steps", _n = Ft && (Zn.mode ? Zn.mode === "beginner" : (ee == null ? void 0 : ee.tab_mode) === "steps"),
|
|
3926
|
-
() => S ?
|
|
3927
|
-
), [Qn, ty] = I(null),
|
|
3925
|
+
}), Al = (e) => Zn.mode && (e.tab_mode === "steps" || e.tab_mode === "tabs") ? Zn.mode === "beginner" : e.tab_mode === "steps", _n = Ft && (Zn.mode ? Zn.mode === "beginner" : (ee == null ? void 0 : ee.tab_mode) === "steps"), Yg = !!(ee != null && ee.validate_before_next), Cn = !!(ee != null && ee.summary_enabled), Zg = !!(ee != null && ee.summary_hide_empty), Du = ee ? !ee.disable_revisions && J : J, pr = ee ? !ee.disable_comments && Pd : Pd, Mr = ee ? !ee.disable_tasks && Ed : Ed, Xg = ee ? !ee.disable_clone && Pe : Pe, ey = ee ? !ee.disable_delete : !0, zo = !!(ee != null && ee.accordion_mode), [$n, Ss] = I(
|
|
3926
|
+
() => S ? jp(De) ?? !1 : !1
|
|
3927
|
+
), [Qn, ty] = I(null), Bu = N(!1);
|
|
3928
3928
|
B(() => {
|
|
3929
|
-
if (!S || !Cn || !Qn ||
|
|
3929
|
+
if (!S || !Cn || !Qn || Bu.current) return;
|
|
3930
3930
|
const e = Qn.clientWidth;
|
|
3931
|
-
e && (
|
|
3931
|
+
e && (Bu.current = !0, jp(De) === null && e - 256 < gx && Ss(!0));
|
|
3932
3932
|
}, [S, Cn, Qn, De]);
|
|
3933
3933
|
const [ci, ny] = I(!1), ui = N(null);
|
|
3934
3934
|
B(() => {
|
|
@@ -3943,22 +3943,22 @@ function Up({
|
|
|
3943
3943
|
}, [S, Cn, Qn]), B(() => {
|
|
3944
3944
|
ci ? (ui.current === null && (ui.current = $n), Ss(!0)) : ui.current !== null && (Ss(ui.current), ui.current = null);
|
|
3945
3945
|
}, [ci]);
|
|
3946
|
-
const [Tl,
|
|
3946
|
+
const [Tl, Wu] = I(null);
|
|
3947
3947
|
B(() => {
|
|
3948
3948
|
if (!S || !Cn || !Qn) {
|
|
3949
|
-
|
|
3949
|
+
Wu(null);
|
|
3950
3950
|
return;
|
|
3951
3951
|
}
|
|
3952
3952
|
let e = Qn.parentElement;
|
|
3953
3953
|
for (; e && !/(auto|scroll)/.test(getComputedStyle(e).overflowY); )
|
|
3954
3954
|
e = e.parentElement;
|
|
3955
3955
|
if (!e) return;
|
|
3956
|
-
const t = e, n = () =>
|
|
3956
|
+
const t = e, n = () => Wu(t.clientHeight || null);
|
|
3957
3957
|
n();
|
|
3958
3958
|
const r = new ResizeObserver(n);
|
|
3959
3959
|
return r.observe(t), () => r.disconnect();
|
|
3960
3960
|
}, [S, Cn, Qn]);
|
|
3961
|
-
const [ry,
|
|
3961
|
+
const [ry, zu] = I(null), [Qu, Uu] = I(/* @__PURE__ */ new Set()), [sy, iy] = I(() => /* @__PURE__ */ new Set()), ql = N(!1);
|
|
3962
3962
|
B(() => {
|
|
3963
3963
|
if (!zo) {
|
|
3964
3964
|
ql.current = !1;
|
|
@@ -3967,10 +3967,10 @@ function Up({
|
|
|
3967
3967
|
if (zo && !ql.current) {
|
|
3968
3968
|
ql.current = !0;
|
|
3969
3969
|
const e = en.find((t) => !t.is_collapsed) ?? en[0];
|
|
3970
|
-
e &&
|
|
3970
|
+
e && zu(e.id);
|
|
3971
3971
|
}
|
|
3972
3972
|
}, [zo, en]);
|
|
3973
|
-
const
|
|
3973
|
+
const Vu = N(null), Qo = (e) => {
|
|
3974
3974
|
const t = document.querySelector(`[data-field="${e}"]`);
|
|
3975
3975
|
if (!t) return;
|
|
3976
3976
|
t.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
@@ -3980,13 +3980,13 @@ function Up({
|
|
|
3980
3980
|
t.style.transition = "", t.style.borderRadius = n.radius;
|
|
3981
3981
|
}, 650);
|
|
3982
3982
|
}, 2e3);
|
|
3983
|
-
},
|
|
3983
|
+
}, Hu = A(() => {
|
|
3984
3984
|
const e = O0(x == null ? void 0 : x.layout, wt);
|
|
3985
3985
|
return Nt && !S ? e : { schedule: !1, disablePickers: !1 };
|
|
3986
3986
|
}, [x == null ? void 0 : x.layout, wt, Nt, S]), oy = A(
|
|
3987
3987
|
() => ye.filter((e) => !e.hidden && e.type !== "alias").map((e) => ({ field: e.field, label: e.label })),
|
|
3988
3988
|
[ye]
|
|
3989
|
-
),
|
|
3989
|
+
), Gu = A(() => {
|
|
3990
3990
|
const e = new Map(
|
|
3991
3991
|
D.filter((n) => n.many_collection === i && !n.junction_field && n.many_field).map((n) => [n.many_field, n.one_collection])
|
|
3992
3992
|
), t = /* @__PURE__ */ new Map();
|
|
@@ -4054,7 +4054,7 @@ function Up({
|
|
|
4054
4054
|
Je,
|
|
4055
4055
|
f,
|
|
4056
4056
|
u
|
|
4057
|
-
]),
|
|
4057
|
+
]), Ju = (e) => {
|
|
4058
4058
|
if (!Rn(e)) return;
|
|
4059
4059
|
const n = (r) => {
|
|
4060
4060
|
const s = document.querySelector(
|
|
@@ -4082,22 +4082,22 @@ function Up({
|
|
|
4082
4082
|
const c = Ce.find((d) => d.id === r.container_id);
|
|
4083
4083
|
c && (Dr(c, n), s = !0);
|
|
4084
4084
|
} else r.type === "tab" && ke.some((c) => c.key === n) ? (Bt(n), s = !0) : (r.type === "section" || r.type === "metadata") && Ft && ke.some((c) => c.key === "__general__") && (Bt("__general__"), s = !0);
|
|
4085
|
-
if (
|
|
4085
|
+
if (tp(e), !s && r.type !== "section" && r.type !== "metadata") return !1;
|
|
4086
4086
|
const o = (c) => {
|
|
4087
4087
|
if (document.querySelector(`[data-field="${e}"]`)) {
|
|
4088
4088
|
Qo(e);
|
|
4089
4089
|
return;
|
|
4090
4090
|
}
|
|
4091
|
-
|
|
4091
|
+
tp(e), c < 12 && setTimeout(() => o(c + 1), 150);
|
|
4092
4092
|
};
|
|
4093
4093
|
return setTimeout(() => o(0), 150), !0;
|
|
4094
|
-
}, [Il,
|
|
4094
|
+
}, [Il, Yu] = I(!1), ay = async () => {
|
|
4095
4095
|
if (!Il) {
|
|
4096
|
-
|
|
4096
|
+
Yu(!0);
|
|
4097
4097
|
try {
|
|
4098
4098
|
await ly();
|
|
4099
4099
|
} finally {
|
|
4100
|
-
|
|
4100
|
+
Yu(!1);
|
|
4101
4101
|
}
|
|
4102
4102
|
}
|
|
4103
4103
|
}, ly = async () => {
|
|
@@ -4162,7 +4162,7 @@ function Up({
|
|
|
4162
4162
|
}
|
|
4163
4163
|
const C = String(p);
|
|
4164
4164
|
if (/^\d{4}-\d{2}-\d{2}/.test(C) && !Number.isNaN(new Date(C).getTime())) {
|
|
4165
|
-
r.push(`${d}: ${
|
|
4165
|
+
r.push(`${d}: ${Jp(C)}`);
|
|
4166
4166
|
continue;
|
|
4167
4167
|
}
|
|
4168
4168
|
r.push(
|
|
@@ -4178,13 +4178,13 @@ ${r.join(`
|
|
|
4178
4178
|
() => _e.success("Summary copied"),
|
|
4179
4179
|
() => _e.error("Could not copy")
|
|
4180
4180
|
);
|
|
4181
|
-
},
|
|
4181
|
+
}, Zu = N(!1);
|
|
4182
4182
|
B(() => {
|
|
4183
|
-
!Re ||
|
|
4183
|
+
!Re || Zu.current || (Zu.current = !0, setTimeout(() => Qo(Re), 600));
|
|
4184
4184
|
}, [Re]);
|
|
4185
|
-
const
|
|
4185
|
+
const Xu = N(!1), Kr = N(() => !1);
|
|
4186
4186
|
Kr.current = Rn;
|
|
4187
|
-
const
|
|
4187
|
+
const ef = de(
|
|
4188
4188
|
(e) => ni[e] || ge(e),
|
|
4189
4189
|
[ni]
|
|
4190
4190
|
), dy = de((e) => {
|
|
@@ -4197,10 +4197,10 @@ ${r.join(`
|
|
|
4197
4197
|
itemId: f,
|
|
4198
4198
|
// After the record answered (army 10: the comments read 404'd for a missing record).
|
|
4199
4199
|
enabled: !u && !S && pr && Pt,
|
|
4200
|
-
labelOf:
|
|
4200
|
+
labelOf: ef,
|
|
4201
4201
|
jump: dy
|
|
4202
|
-
}),
|
|
4203
|
-
|
|
4202
|
+
}), tf = N(Pl);
|
|
4203
|
+
tf.current = Pl;
|
|
4204
4204
|
const Uo = N({ done: !1, timer: null });
|
|
4205
4205
|
B(() => {
|
|
4206
4206
|
Uo.current.done = !1;
|
|
@@ -4228,7 +4228,7 @@ ${r.join(`
|
|
|
4228
4228
|
if (s) {
|
|
4229
4229
|
e.timer != null && window.clearInterval(e.timer), e.timer = null, window.setTimeout(() => {
|
|
4230
4230
|
var o;
|
|
4231
|
-
return (o =
|
|
4231
|
+
return (o = tf.current) == null ? void 0 : o.setOpenField(t);
|
|
4232
4232
|
}, 700);
|
|
4233
4233
|
return;
|
|
4234
4234
|
}
|
|
@@ -4275,11 +4275,11 @@ ${r.join(`
|
|
|
4275
4275
|
}, 600);
|
|
4276
4276
|
return !0;
|
|
4277
4277
|
}, B(() => {
|
|
4278
|
-
if (
|
|
4278
|
+
if (Xu.current || u || typeof window > "u") return;
|
|
4279
4279
|
const e = new URLSearchParams(window.location.search).get("row");
|
|
4280
4280
|
if (!e) return;
|
|
4281
4281
|
const t = e.indexOf(":");
|
|
4282
|
-
t < 1 || El.current(e.slice(0, t), e.slice(t + 1)) && (
|
|
4282
|
+
t < 1 || El.current(e.slice(0, t), e.slice(t + 1)) && (Xu.current = !0);
|
|
4283
4283
|
}, [Lt, u]), B(() => {
|
|
4284
4284
|
if (u || typeof window > "u") return;
|
|
4285
4285
|
const e = (t) => {
|
|
@@ -4298,7 +4298,7 @@ ${r.join(`
|
|
|
4298
4298
|
};
|
|
4299
4299
|
return window.addEventListener("nvr:record-focus", e), () => window.removeEventListener("nvr:record-focus", e);
|
|
4300
4300
|
}, [i, f, u]);
|
|
4301
|
-
const [Ll,
|
|
4301
|
+
const [Ll, nf] = I(() => /* @__PURE__ */ new Map()), [cy, uy] = I(
|
|
4302
4302
|
() => /* @__PURE__ */ new Map()
|
|
4303
4303
|
), fy = (e, t) => {
|
|
4304
4304
|
var n;
|
|
@@ -4307,18 +4307,18 @@ ${r.join(`
|
|
|
4307
4307
|
var n;
|
|
4308
4308
|
return ((n = cy.get(e.id)) == null ? void 0 : n.has(t)) ?? !1;
|
|
4309
4309
|
}, Dr = (e, t) => {
|
|
4310
|
-
|
|
4310
|
+
nf((n) => new Map(n).set(e.id, t)), uy((n) => {
|
|
4311
4311
|
const r = n.get(e.id) ?? /* @__PURE__ */ new Set();
|
|
4312
4312
|
return r.has(t) ? n : new Map(n).set(e.id, /* @__PURE__ */ new Set([...r, t]));
|
|
4313
4313
|
});
|
|
4314
|
-
}, [st,
|
|
4314
|
+
}, [st, rf] = I(() => {
|
|
4315
4315
|
var e;
|
|
4316
4316
|
try {
|
|
4317
4317
|
return localStorage.getItem(`nvr_tab_${i}`) ?? ((e = Dt[0]) == null ? void 0 : e.key) ?? "__general__";
|
|
4318
4318
|
} catch {
|
|
4319
4319
|
return "__general__";
|
|
4320
4320
|
}
|
|
4321
|
-
}), [
|
|
4321
|
+
}), [sf, of] = I(() => {
|
|
4322
4322
|
const e = (() => {
|
|
4323
4323
|
var t, n;
|
|
4324
4324
|
try {
|
|
@@ -4328,21 +4328,21 @@ ${r.join(`
|
|
|
4328
4328
|
}
|
|
4329
4329
|
})();
|
|
4330
4330
|
return /* @__PURE__ */ new Set([e]);
|
|
4331
|
-
}),
|
|
4331
|
+
}), af = N(null), [Ml, lf] = I(null);
|
|
4332
4332
|
B(() => {
|
|
4333
|
-
const e =
|
|
4333
|
+
const e = af.current;
|
|
4334
4334
|
if (!e) return;
|
|
4335
4335
|
const t = () => {
|
|
4336
4336
|
const r = e.querySelector(`[data-tab-key="${CSS.escape(st)}"]`);
|
|
4337
|
-
if (!r) return
|
|
4338
|
-
|
|
4337
|
+
if (!r) return lf(null);
|
|
4338
|
+
lf({ left: r.offsetLeft, width: r.offsetWidth });
|
|
4339
4339
|
};
|
|
4340
4340
|
t();
|
|
4341
4341
|
const n = typeof ResizeObserver < "u" ? new ResizeObserver(t) : null;
|
|
4342
4342
|
return n == null || n.observe(e), () => n == null ? void 0 : n.disconnect();
|
|
4343
4343
|
}, [st]);
|
|
4344
4344
|
const Bt = (e) => {
|
|
4345
|
-
if (
|
|
4345
|
+
if (rf(e), of((t) => {
|
|
4346
4346
|
if (t.has(e)) return t;
|
|
4347
4347
|
const n = new Set(t);
|
|
4348
4348
|
return n.add(e), n;
|
|
@@ -4375,7 +4375,7 @@ ${r.join(`
|
|
|
4375
4375
|
step: Ft ? st : "__form__"
|
|
4376
4376
|
});
|
|
4377
4377
|
function Kl() {
|
|
4378
|
-
const e =
|
|
4378
|
+
const e = Vu.current;
|
|
4379
4379
|
typeof (e == null ? void 0 : e.scrollTo) == "function" && e.scrollTo({ top: 0 });
|
|
4380
4380
|
}
|
|
4381
4381
|
const ke = A(() => {
|
|
@@ -4384,7 +4384,7 @@ ${r.join(`
|
|
|
4384
4384
|
(_n ? Kt.length > 0 : en.length > 0) && e.push({ key: "__general__", label: "General" });
|
|
4385
4385
|
for (const t of Dt) e.push({ key: t.key, label: t.label });
|
|
4386
4386
|
return e;
|
|
4387
|
-
}, [Ft, en, Dt, _n, Kt]),
|
|
4387
|
+
}, [Ft, en, Dt, _n, Kt]), df = (e) => {
|
|
4388
4388
|
if (e === null || e === "__ungrouped__") {
|
|
4389
4389
|
_n && ke.some((n) => n.key === "__general__") && Bt("__general__");
|
|
4390
4390
|
return;
|
|
@@ -4395,13 +4395,13 @@ ${r.join(`
|
|
|
4395
4395
|
const n = Ce.find((r) => r.id === t.container_id);
|
|
4396
4396
|
n && Dr(n, e);
|
|
4397
4397
|
} else t.type === "tab" && ke.some((n) => n.key === e) ? st !== e && Bt(e) : (t.type === "section" || t.type === "metadata") && !_n && ke.some((n) => n.key === "__general__") && st !== "__general__" && Bt("__general__");
|
|
4398
|
-
},
|
|
4399
|
-
|
|
4398
|
+
}, cf = N(df);
|
|
4399
|
+
cf.current = df;
|
|
4400
4400
|
const fi = (Ve == null ? void 0 : Ve.reveal) ?? null;
|
|
4401
4401
|
B(() => {
|
|
4402
|
-
fi &&
|
|
4402
|
+
fi && cf.current(mx(fi.target));
|
|
4403
4403
|
}, [fi == null ? void 0 : fi.seq]);
|
|
4404
|
-
const Dl = S && !!((
|
|
4404
|
+
const Dl = S && !!((ym = Ve == null ? void 0 : Ve.fold) != null && ym.open), mi = A(() => {
|
|
4405
4405
|
const e = /* @__PURE__ */ new Map();
|
|
4406
4406
|
let t = 0;
|
|
4407
4407
|
const n = Ft ? ke.map((s) => s.key) : [], r = [
|
|
@@ -4412,7 +4412,7 @@ ${r.join(`
|
|
|
4412
4412
|
for (const o of Ie[s] ?? []) e.has(o.field) || e.set(o.field, t++);
|
|
4413
4413
|
for (const s of ye) e.has(s.field) || e.set(s.field, t++);
|
|
4414
4414
|
return e;
|
|
4415
|
-
}, [ye, Ie, Ft, ke]), py = (e, t) => (mi.get(e) ?? 1e9) - (mi.get(t) ?? 1e9),
|
|
4415
|
+
}, [ye, Ie, Ft, ke]), py = (e, t) => (mi.get(e) ?? 1e9) - (mi.get(t) ?? 1e9), uf = A(() => {
|
|
4416
4416
|
const e = Object.keys(Ze);
|
|
4417
4417
|
if (e.length === 0) return [];
|
|
4418
4418
|
const t = (n) => {
|
|
@@ -4428,26 +4428,26 @@ ${r.join(`
|
|
|
4428
4428
|
const r = ye.find((c) => c.field === n), s = Ze[n], o = t(n);
|
|
4429
4429
|
return {
|
|
4430
4430
|
field: n,
|
|
4431
|
-
label: (s ===
|
|
4431
|
+
label: (s === Wp && o && o !== "General" ? o : null) ?? ((r == null ? void 0 : r.label) || ge(n)),
|
|
4432
4432
|
message: s === "This field is required" ? "Required" : s,
|
|
4433
4433
|
location: o
|
|
4434
4434
|
};
|
|
4435
4435
|
});
|
|
4436
|
-
}, [Ze, ye, Ie, Ce, Ft, ke, mi]),
|
|
4436
|
+
}, [Ze, ye, Ie, Ce, Ft, ke, mi]), ff = N(!1);
|
|
4437
4437
|
B(() => {
|
|
4438
|
-
if (!(
|
|
4438
|
+
if (!(ff.current || !Ft))
|
|
4439
4439
|
try {
|
|
4440
4440
|
const e = new URL(window.location.href).searchParams.get("step");
|
|
4441
|
-
e && ke.some((t) => t.key === e) && (
|
|
4441
|
+
e && ke.some((t) => t.key === e) && (ff.current = !0, rf(e), of((t) => /* @__PURE__ */ new Set([...t, e])));
|
|
4442
4442
|
} catch {
|
|
4443
4443
|
}
|
|
4444
4444
|
}, [Ft, ke]), B(() => {
|
|
4445
4445
|
!Ft || ke.length === 0 || ke.some((e) => e.key === st) || Bt(ke[0].key);
|
|
4446
4446
|
}, [Ft, ke, st]);
|
|
4447
|
-
const
|
|
4447
|
+
const mf = N(!1);
|
|
4448
4448
|
B(() => {
|
|
4449
4449
|
var n;
|
|
4450
|
-
if (
|
|
4450
|
+
if (mf.current || u || !we || Ce.length === 0) return;
|
|
4451
4451
|
const e = (r) => {
|
|
4452
4452
|
if (Array.isArray(r)) return r.map(String);
|
|
4453
4453
|
if (typeof r == "string" && r.trim())
|
|
@@ -4465,7 +4465,7 @@ ${r.join(`
|
|
|
4465
4465
|
return l != null && l !== "" && l !== !1;
|
|
4466
4466
|
});
|
|
4467
4467
|
};
|
|
4468
|
-
if (
|
|
4468
|
+
if (mf.current = !0, _n && ke.length > 0 && t(Dt.find((r) => r.key === st))) {
|
|
4469
4469
|
const r = ke.find((s) => !t(Dt.find((o) => o.key === s.key)));
|
|
4470
4470
|
r && r.key !== st && Bt(r.key);
|
|
4471
4471
|
}
|
|
@@ -4475,7 +4475,7 @@ ${r.join(`
|
|
|
4475
4475
|
const o = Ll.get(r.id) ?? ((n = s[0]) == null ? void 0 : n.key), l = s.find((d) => d.key === o);
|
|
4476
4476
|
if (!t(l)) continue;
|
|
4477
4477
|
const c = s.find((d) => !t(d));
|
|
4478
|
-
c && c.key !== o &&
|
|
4478
|
+
c && c.key !== o && nf((d) => new Map(d).set(r.id, c.key));
|
|
4479
4479
|
}
|
|
4480
4480
|
}, [u, _n, we, ke, Dt, st, Ce, Ll]);
|
|
4481
4481
|
const hy = A(() => {
|
|
@@ -4487,7 +4487,7 @@ ${r.join(`
|
|
|
4487
4487
|
}, [Xe, ke, Ie, M]), gy = A(() => {
|
|
4488
4488
|
const e = /* @__PURE__ */ new Set();
|
|
4489
4489
|
for (const t of ke) {
|
|
4490
|
-
if (u && !
|
|
4490
|
+
if (u && !sf.has(t.key)) continue;
|
|
4491
4491
|
(t.key === "__general__" ? _n ? Kt : [...Kt, ...en.flatMap((s) => Ie[s.key] ?? [])] : Ie[t.key] ?? []).filter((s) => s.required && !s.hidden).every((s) => {
|
|
4492
4492
|
if (ae.has(s.field)) {
|
|
4493
4493
|
const l = Je[s.field];
|
|
@@ -4509,7 +4509,7 @@ ${r.join(`
|
|
|
4509
4509
|
Ie,
|
|
4510
4510
|
M,
|
|
4511
4511
|
u,
|
|
4512
|
-
|
|
4512
|
+
sf,
|
|
4513
4513
|
_n,
|
|
4514
4514
|
ae,
|
|
4515
4515
|
Je,
|
|
@@ -4517,7 +4517,7 @@ ${r.join(`
|
|
|
4517
4517
|
Xt
|
|
4518
4518
|
]);
|
|
4519
4519
|
function yy() {
|
|
4520
|
-
if (
|
|
4520
|
+
if (Yg) {
|
|
4521
4521
|
const t = st === "__general__" ? _n ? Kt : [...Kt, ...en.flatMap((r) => Ie[r.key] ?? [])] : Ie[st] ?? [], n = {};
|
|
4522
4522
|
for (const r of t)
|
|
4523
4523
|
if (r.required && !r.hidden) {
|
|
@@ -4532,7 +4532,7 @@ ${r.join(`
|
|
|
4532
4532
|
const e = ke.findIndex((t) => t.key === st);
|
|
4533
4533
|
e < ke.length - 1 && Bt(ke[e + 1].key);
|
|
4534
4534
|
}
|
|
4535
|
-
const We = ht.find((e) => e.field === "__pipeline__"),
|
|
4535
|
+
const We = ht.find((e) => e.field === "__pipeline__"), pf = A(() => {
|
|
4536
4536
|
try {
|
|
4537
4537
|
const e = We == null ? void 0 : We.overrides, t = typeof e == "string" ? JSON.parse(e) : e;
|
|
4538
4538
|
return t && typeof t == "object" ? t : {};
|
|
@@ -4549,7 +4549,7 @@ ${r.join(`
|
|
|
4549
4549
|
} catch {
|
|
4550
4550
|
return {};
|
|
4551
4551
|
}
|
|
4552
|
-
})() : null, Un = (zt == null ? void 0 : zt.attach_to_field) ?? null,
|
|
4552
|
+
})() : null, Un = (zt == null ? void 0 : zt.attach_to_field) ?? null, hf = (zt == null ? void 0 : zt.filename_template) ?? null, Ns = (Ye == null ? void 0 : Ye.group_key) ?? null, hi = !!(Ns && Ce.some((e) => e.key === Ns)), _y = (zt == null ? void 0 : zt.source_layout_id) ?? null, Ho = !!(zt != null && zt.auto_generate_on_save), by = (zt == null ? void 0 : zt.overwrite_generated) !== !1, hr = async (e) => {
|
|
4553
4553
|
const t = (e == null ? void 0 : e.itemId) ?? f, n = (e == null ? void 0 : e.attachField) ?? Un, r = (e == null ? void 0 : e.sourceLayoutId) ?? _y ?? Zt;
|
|
4554
4554
|
if (!(Nr || !n || !r || !t)) {
|
|
4555
4555
|
Yd(!0);
|
|
@@ -4568,14 +4568,14 @@ ${r.join(`
|
|
|
4568
4568
|
collection: i,
|
|
4569
4569
|
item_id: t,
|
|
4570
4570
|
attach_field: n,
|
|
4571
|
-
filename_template: (e == null ? void 0 : e.filenameTemplate) ??
|
|
4571
|
+
filename_template: (e == null ? void 0 : e.filenameTemplate) ?? hf,
|
|
4572
4572
|
replace_generated: (e == null ? void 0 : e.replaceGenerated) ?? by,
|
|
4573
4573
|
addendum_id: (e == null ? void 0 : e.addendumId) ?? void 0
|
|
4574
4574
|
})
|
|
4575
4575
|
}
|
|
4576
4576
|
);
|
|
4577
4577
|
if (!o.ok) throw new Error(await o.text());
|
|
4578
|
-
e != null && e.silent || _e.success("PDF generated and attached"), e != null && e.addendumId ? H.invalidateQueries({ queryKey: ["m2m-items"] }) :
|
|
4578
|
+
e != null && e.silent || _e.success("PDF generated and attached"), e != null && e.addendumId ? H.invalidateQueries({ queryKey: ["m2m-items"] }) : kp(H, [t]), H.invalidateQueries({ queryKey: ["item", i, f] }), e != null && e.addendumId && H.invalidateQueries({ queryKey: ["addendums", i, f] });
|
|
4579
4579
|
} catch {
|
|
4580
4580
|
e != null && e.silent ? console.warn("[pdf] automatic regeneration failed") : _e.error("Failed to generate and attach PDF");
|
|
4581
4581
|
} finally {
|
|
@@ -4678,13 +4678,13 @@ ${r.join(`
|
|
|
4678
4678
|
// The stale-record banner rides this read — one indexed row a minute without a live
|
|
4679
4679
|
// socket, paused while the tab is hidden (react-query default).
|
|
4680
4680
|
refetchInterval: wy
|
|
4681
|
-
}), [ky, _i] = I(!1), [xy,
|
|
4681
|
+
}), [ky, _i] = I(!1), [xy, gf] = I(!1), [yf, _f] = I(!1), [Sy, bf] = I(!1), [Ny, Cy] = I(null), [bi, vf] = I(""), [wf, kf] = I(!1), [xf, Sf] = I(!1), Nf = Wk(
|
|
4682
4682
|
i,
|
|
4683
4683
|
String(f ?? ""),
|
|
4684
4684
|
// Waits for the record itself: the check of a record that turns out not
|
|
4685
4685
|
// to exist (or not to be readable) only ever answered the same 404.
|
|
4686
|
-
!u && !!f && !S && Tn && !!we && !((
|
|
4687
|
-
), zl = ((
|
|
4686
|
+
!u && !!f && !S && Tn && !!we && !((_m = x == null ? void 0 : x.layout) != null && _m.hide_integrity_banner)
|
|
4687
|
+
), zl = ((bm = Nf.data) == null ? void 0 : bm.enabled) === !1 ? 0 : ((wm = (vm = Nf.data) == null ? void 0 : vm.findings) == null ? void 0 : wm.length) ?? 0, he = A(() => {
|
|
4688
4688
|
var h;
|
|
4689
4689
|
const e = (((h = x == null ? void 0 : x.assignments) == null ? void 0 : h.length) ?? 0) > 0 ? new Set(
|
|
4690
4690
|
((x == null ? void 0 : x.assignments) ?? []).filter((p) => !(p.is_visible === 0 || p.is_visible === !1)).map((p) => p.field)
|
|
@@ -4743,9 +4743,9 @@ ${r.join(`
|
|
|
4743
4743
|
}
|
|
4744
4744
|
}
|
|
4745
4745
|
}, [ut, u, De]);
|
|
4746
|
-
const
|
|
4746
|
+
const Cf = de(() => {
|
|
4747
4747
|
ut && ($s.current = ut.timestamp), Zo(null), H.invalidateQueries({ queryKey: ["item", i, f] }), H.invalidateQueries({ queryKey: ["o2m-rows"] }), H.invalidateQueries({ queryKey: ["pipeline", i, String(f)] });
|
|
4748
|
-
}, [ut, H, i, f]),
|
|
4748
|
+
}, [ut, H, i, f]), $f = de(() => {
|
|
4749
4749
|
var t;
|
|
4750
4750
|
const e = (t = Qs.current) == null ? void 0 : t.timestamp;
|
|
4751
4751
|
e && ($s.current = e), Zo(null);
|
|
@@ -4754,13 +4754,13 @@ ${r.join(`
|
|
|
4754
4754
|
editsDiffer: Rk(Ae.current, M, we, Ke)
|
|
4755
4755
|
}) : null;
|
|
4756
4756
|
B(() => {
|
|
4757
|
-
vi === "auto-refresh" &&
|
|
4757
|
+
vi === "auto-refresh" && Cf();
|
|
4758
4758
|
}, [vi]);
|
|
4759
|
-
const
|
|
4759
|
+
const Rf = A(() => {
|
|
4760
4760
|
if (!ut) return null;
|
|
4761
4761
|
const e = Date.now() - new Date(ut.timestamp).getTime(), t = Math.floor(e / 6e4), n = t < 1 ? "just now" : t < 60 ? `${t}m ago` : t < 2880 ? `${Math.floor(t / 60)}h ago` : `${Math.floor(t / 1440)}d ago`;
|
|
4762
4762
|
return `${ut.action === "create" ? "Created" : "Edited"} ${n}${ut.user_name ? ` by ${ut.user_name}` : ""}`;
|
|
4763
|
-
}, [ut]),
|
|
4763
|
+
}, [ut]), Of = A(
|
|
4764
4764
|
() => Yo.map((e) => e.value).join((jt == null ? void 0 : jt.separator) ?? " | "),
|
|
4765
4765
|
[Yo, jt]
|
|
4766
4766
|
), $y = A(() => {
|
|
@@ -4782,7 +4782,7 @@ ${r.join(`
|
|
|
4782
4782
|
(e) => !e.field.startsWith("__") && !e.field.includes(".") && (e.group_key ?? null) === "__header__"
|
|
4783
4783
|
).map((e) => e.field),
|
|
4784
4784
|
[x]
|
|
4785
|
-
), Oy = pt && !u && !S &&
|
|
4785
|
+
), Oy = pt && !u && !S && ap({
|
|
4786
4786
|
assignments: (x == null ? void 0 : x.assignments) ?? [],
|
|
4787
4787
|
showPipeline: pt,
|
|
4788
4788
|
isNew: u,
|
|
@@ -4793,12 +4793,12 @@ ${r.join(`
|
|
|
4793
4793
|
queryFn: () => j.request(ie(`/pipelines/instance/${St}/${Ot}`)).then((e) => e.data ?? null),
|
|
4794
4794
|
staleTime: 1e4,
|
|
4795
4795
|
enabled: Oy && !!Ot && Pt
|
|
4796
|
-
}),
|
|
4797
|
-
const e =
|
|
4796
|
+
}), Ff = S ? !0 : Rs === void 0 ? null : Rs ? typeof Rs.owners_configured == "boolean" ? Rs.owners_configured : !!(Rs.binding || Rs.instance) : !1, Ul = A(() => {
|
|
4797
|
+
const e = ap({
|
|
4798
4798
|
assignments: (x == null ? void 0 : x.assignments) ?? [],
|
|
4799
4799
|
showPipeline: pt,
|
|
4800
4800
|
isNew: u,
|
|
4801
|
-
ownersConfigured:
|
|
4801
|
+
ownersConfigured: Ff,
|
|
4802
4802
|
design: S
|
|
4803
4803
|
}), t = ((x == null ? void 0 : x.assignments) ?? []).filter(
|
|
4804
4804
|
(r) => (r.field === "__owners__" ? e.show : !r.field.startsWith("__")) && (r.group_key ?? null) === "__header__"
|
|
@@ -4846,7 +4846,7 @@ ${r.join(`
|
|
|
4846
4846
|
},
|
|
4847
4847
|
...t
|
|
4848
4848
|
] : t;
|
|
4849
|
-
}, [x, O, pt, u,
|
|
4849
|
+
}, [x, O, pt, u, Ff, S]), jf = Hv({
|
|
4850
4850
|
collection: i,
|
|
4851
4851
|
relations: D,
|
|
4852
4852
|
paths: Ul.filter((e) => e.field.includes(".")).map((e) => e.field),
|
|
@@ -4883,7 +4883,7 @@ ${r.join(`
|
|
|
4883
4883
|
];
|
|
4884
4884
|
pt && We && e(We) && t.push({ item: "__pipeline__", sort: We.sort, tie: 2 }), Mr && yt && e(yt) && t.push({ item: "__tasks__", sort: yt.sort, tie: 3 }), pr && gt && e(gt) && t.push({ item: "__comments__", sort: gt.sort, tie: 4 }), v != null && v.addendums_enabled && !u && cn && e(cn) && t.push({ item: "__addendums__", sort: cn.sort, tie: 7 }), !u && On && e(On) && t.push({ item: "__referenced_by__", sort: On.sort, tie: 8 }), !u && Fn && e(Fn) && t.push({ item: "__related_records__", sort: Fn.sort, tie: 9 }), pt && _t && e(_t) && !gi && Cs !== "__header__" && t.push({ item: "__owners__", sort: _t.sort, tie: 5 }), Ye && e(Ye) && !u && !hi && t.push({ item: "__pdf__", sort: Ye.sort, tie: 6 });
|
|
4885
4885
|
for (const n of ht)
|
|
4886
|
-
|
|
4886
|
+
op(n.field) && e(n) && t.push({ item: n.field, sort: n.sort, tie: 8 });
|
|
4887
4887
|
return t.sort((n, r) => n.sort - r.sort || n.tie - r.tie).map((n) => n.item);
|
|
4888
4888
|
}, [
|
|
4889
4889
|
en,
|
|
@@ -4906,8 +4906,8 @@ ${r.join(`
|
|
|
4906
4906
|
Kt,
|
|
4907
4907
|
Cs,
|
|
4908
4908
|
ht
|
|
4909
|
-
]), [Fy, jy] = I(null),
|
|
4910
|
-
function
|
|
4909
|
+
]), [Fy, jy] = I(null), Af = A(() => Ce.some(Sp), [Ce]), Tf = Sk(Fy, Af);
|
|
4910
|
+
function qf() {
|
|
4911
4911
|
if (!m0(ye))
|
|
4912
4912
|
return _e.info(p0), !1;
|
|
4913
4913
|
const e = {}, t = (r) => !Ke(M[r], pe.current[r]), n = iv(gl, ot.fields);
|
|
@@ -4924,7 +4924,7 @@ ${r.join(`
|
|
|
4924
4924
|
const o = Xt[r.field], l = Lt.find((p) => p.one_field === r.field), c = l ? `${l.many_collection}.${l.many_field}` : "", d = Ge.get(c), h = l ? ao(String(l.many_collection), String(l.many_field)).filter(
|
|
4925
4925
|
(p) => !(d != null && d.has(String(p.id)))
|
|
4926
4926
|
).length : 0;
|
|
4927
|
-
o !== void 0 && o === 0 && h === 0 && (e[r.field] =
|
|
4927
|
+
o !== void 0 && o === 0 && h === 0 && (e[r.field] = Wp);
|
|
4928
4928
|
} else if (!D.some((o) => o.one_collection === i && o.one_field === r.field)) {
|
|
4929
4929
|
const o = M[r.field];
|
|
4930
4930
|
(o == null || o === "") && (e[r.field] = "This field is required");
|
|
@@ -4941,9 +4941,9 @@ ${r.join(`
|
|
|
4941
4941
|
if (Array.isArray(s))
|
|
4942
4942
|
for (const o of s) {
|
|
4943
4943
|
if (!o || o.soft || !rS(o, r.field, u, t)) continue;
|
|
4944
|
-
const l =
|
|
4944
|
+
const l = Yp(
|
|
4945
4945
|
o,
|
|
4946
|
-
|
|
4946
|
+
Zp(r.type, M[r.field]),
|
|
4947
4947
|
r.label ?? ge(r.field),
|
|
4948
4948
|
M
|
|
4949
4949
|
);
|
|
@@ -4980,12 +4980,12 @@ ${r.join(`
|
|
|
4980
4980
|
const l = ye.find((d) => d.field === r[0]), c = (l == null ? void 0 : l.label) || ge(r[0]);
|
|
4981
4981
|
_e.error(
|
|
4982
4982
|
e[r[0]] === "This field is required" ? `${c} is required` : e[r[0]],
|
|
4983
|
-
{ id:
|
|
4983
|
+
{ id: Mp }
|
|
4984
4984
|
);
|
|
4985
4985
|
} else
|
|
4986
|
-
_e.error(`Can’t save yet — ${s} fields need attention`, { id:
|
|
4986
|
+
_e.error(`Can’t save yet — ${s} fields need attention`, { id: Mp });
|
|
4987
4987
|
const o = r[0];
|
|
4988
|
-
return o && setTimeout(() =>
|
|
4988
|
+
return o && setTimeout(() => Ju(o), 150), !1;
|
|
4989
4989
|
}
|
|
4990
4990
|
return !0;
|
|
4991
4991
|
}
|
|
@@ -5109,7 +5109,7 @@ ${r.join(`
|
|
|
5109
5109
|
if (Hr)
|
|
5110
5110
|
return Hr(() => Vl.current()), () => Hr(null);
|
|
5111
5111
|
}, [Hr]);
|
|
5112
|
-
function
|
|
5112
|
+
function If() {
|
|
5113
5113
|
if (u || Ct.current) return null;
|
|
5114
5114
|
const e = new Set(
|
|
5115
5115
|
ye.filter(
|
|
@@ -5135,14 +5135,14 @@ ${r.join(`
|
|
|
5135
5135
|
);
|
|
5136
5136
|
}
|
|
5137
5137
|
function Xo() {
|
|
5138
|
-
if (
|
|
5138
|
+
if (lp(), !pn) {
|
|
5139
5139
|
if (zn && !u && (yl || ot.fields.length > 0 && !gl)) {
|
|
5140
5140
|
_e.info(
|
|
5141
5141
|
rt ?? `${(Wn == null ? void 0 : Wn.locked_by_name) ?? "Someone else"} is editing this record — nothing was saved`
|
|
5142
5142
|
);
|
|
5143
5143
|
return;
|
|
5144
5144
|
}
|
|
5145
|
-
io.current || At.isPending ||
|
|
5145
|
+
io.current || At.isPending || qf() && (io.current = !0, (async () => {
|
|
5146
5146
|
let e = !1;
|
|
5147
5147
|
try {
|
|
5148
5148
|
e = await Ey();
|
|
@@ -5152,7 +5152,7 @@ ${r.join(`
|
|
|
5152
5152
|
})());
|
|
5153
5153
|
}
|
|
5154
5154
|
}
|
|
5155
|
-
async function
|
|
5155
|
+
async function Pf(e, t, n, r) {
|
|
5156
5156
|
e.edit = { ...r };
|
|
5157
5157
|
const [s, o] = await Promise.all([
|
|
5158
5158
|
j.request(
|
|
@@ -5202,7 +5202,7 @@ ${r.join(`
|
|
|
5202
5202
|
latest: g.latest,
|
|
5203
5203
|
mine: C
|
|
5204
5204
|
};
|
|
5205
|
-
await
|
|
5205
|
+
await Pf(y, l, d, h), y.current || (y.current = g.current), n.push(y);
|
|
5206
5206
|
}
|
|
5207
5207
|
}
|
|
5208
5208
|
n.length !== 0 && (_e.warning(
|
|
@@ -5214,7 +5214,7 @@ ${r.join(`
|
|
|
5214
5214
|
const Iy = (e, t) => {
|
|
5215
5215
|
const n = (e.key ?? "").split(".")[0];
|
|
5216
5216
|
return D.some((r) => r.many_collection === n && r.many_field === t);
|
|
5217
|
-
}, [
|
|
5217
|
+
}, [Ef, ea] = I(null), Gl = N(!1);
|
|
5218
5218
|
async function Py() {
|
|
5219
5219
|
const e = Object.fromEntries(Te);
|
|
5220
5220
|
if (Object.keys(e).length === 0) return [];
|
|
@@ -5233,7 +5233,7 @@ ${r.join(`
|
|
|
5233
5233
|
}
|
|
5234
5234
|
}
|
|
5235
5235
|
async function Ey() {
|
|
5236
|
-
if (u &&
|
|
5236
|
+
if (u && mh && nr && !Gl.current) {
|
|
5237
5237
|
go([{ id: "rehearse", label: "Checking the copied lines", status: "running" }]), or(!0);
|
|
5238
5238
|
let r = [];
|
|
5239
5239
|
try {
|
|
@@ -5245,7 +5245,7 @@ ${r.join(`
|
|
|
5245
5245
|
return ea(r), !1;
|
|
5246
5246
|
Gl.current = !0;
|
|
5247
5247
|
}
|
|
5248
|
-
const e = await Ty(), t =
|
|
5248
|
+
const e = await Ty(), t = If(), n = e && t ? {
|
|
5249
5249
|
...e,
|
|
5250
5250
|
fields_changed: [
|
|
5251
5251
|
.../* @__PURE__ */ new Set([...e.fields_changed, ...t.fields_changed])
|
|
@@ -5265,14 +5265,14 @@ ${r.join(`
|
|
|
5265
5265
|
const n = typeof e.total == "number" && e.total > 0 ? e.total : t.total, r = Math.min(n, Math.max(0, Number(e.done) || 0));
|
|
5266
5266
|
me(
|
|
5267
5267
|
"main",
|
|
5268
|
-
(s) => s.status !== "running" ? {} : { progress: { done: r, total: n }, detail:
|
|
5268
|
+
(s) => s.status !== "running" ? {} : { progress: { done: r, total: n }, detail: cp(e, t.total) }
|
|
5269
5269
|
);
|
|
5270
5270
|
},
|
|
5271
5271
|
{ includeOwn: !0 }
|
|
5272
5272
|
);
|
|
5273
|
-
const At =
|
|
5273
|
+
const At = Vm({
|
|
5274
5274
|
mutationFn: async () => {
|
|
5275
|
-
var
|
|
5275
|
+
var Wm, zm, Qm, Um;
|
|
5276
5276
|
u && (ps.current = !0);
|
|
5277
5277
|
function e(b) {
|
|
5278
5278
|
return fb(j, b), _d(b);
|
|
@@ -5302,7 +5302,7 @@ ${r.join(`
|
|
|
5302
5302
|
F.manyField,
|
|
5303
5303
|
f
|
|
5304
5304
|
]);
|
|
5305
|
-
}, l =
|
|
5305
|
+
}, l = Np({
|
|
5306
5306
|
collection: i,
|
|
5307
5307
|
relations: D,
|
|
5308
5308
|
links: et,
|
|
@@ -5418,14 +5418,14 @@ ${r.join(`
|
|
|
5418
5418
|
(u || !Ke(F, Y)) && (W[b.field] = F);
|
|
5419
5419
|
}
|
|
5420
5420
|
if (u) {
|
|
5421
|
-
const b = (
|
|
5421
|
+
const b = (Wm = x == null ? void 0 : x.layout) == null ? void 0 : Wm.default_values;
|
|
5422
5422
|
for (const F of Object.keys(b ?? {})) {
|
|
5423
5423
|
if (F in W || !(F in G) || F.startsWith("__") || F.includes(".") || rn.has(F)) continue;
|
|
5424
5424
|
const Y = G[F];
|
|
5425
5425
|
Y === void 0 || Array.isArray(Y) || (O ?? []).some((ue) => ue.field === F) && (W[F] = Y);
|
|
5426
5426
|
}
|
|
5427
5427
|
}
|
|
5428
|
-
if (Object.assign(W, p),
|
|
5428
|
+
if (Object.assign(W, p), Np({
|
|
5429
5429
|
collection: i,
|
|
5430
5430
|
relations: D,
|
|
5431
5431
|
links: et,
|
|
@@ -5434,31 +5434,31 @@ ${r.join(`
|
|
|
5434
5434
|
isNew: u,
|
|
5435
5435
|
committed: o
|
|
5436
5436
|
}), Ct.current && (W._change_reason = Ct.current), !u) {
|
|
5437
|
-
const b = Pn.current ?? (as == null ? void 0 : as.latest) ?? ((
|
|
5437
|
+
const b = Pn.current ?? (as == null ? void 0 : as.latest) ?? ((zm = await H.fetchQuery({
|
|
5438
5438
|
queryKey: ["collision-base", i, f],
|
|
5439
5439
|
queryFn: () => j.request(
|
|
5440
5440
|
ie("/revisions", { collection: i, item: f, latest_only: "1" })
|
|
5441
5441
|
).then((F) => F.data).catch(() => ({ latest: null })),
|
|
5442
5442
|
staleTime: Number.POSITIVE_INFINITY
|
|
5443
|
-
}).catch(() => null)) == null ? void 0 :
|
|
5443
|
+
}).catch(() => null)) == null ? void 0 : zm.latest) ?? null;
|
|
5444
5444
|
b != null && (W._base_revision = b);
|
|
5445
5445
|
}
|
|
5446
5446
|
zs.current = W, mc.current = es.current, Pa.current = null;
|
|
5447
5447
|
let z;
|
|
5448
5448
|
const ne = u ? Object.values(p).reduce((b, F) => b + (Array.isArray(F) ? F.length : 0), 0) : 0, ce = ne >= mb ? pb() : null;
|
|
5449
5449
|
ce && (Jl.current = { id: ce, total: ne }, me("main", {
|
|
5450
|
-
detail:
|
|
5450
|
+
detail: cp(null, ne),
|
|
5451
5451
|
progress: { done: 0, total: ne }
|
|
5452
5452
|
}));
|
|
5453
5453
|
try {
|
|
5454
5454
|
if (u) {
|
|
5455
5455
|
const b = await j.request(mn(hb(`/items/${i}`, ce), W)).finally(() => {
|
|
5456
5456
|
Jl.current = null;
|
|
5457
|
-
}), F = ((
|
|
5457
|
+
}), F = ((Qm = b == null ? void 0 : b.data) == null ? void 0 : Qm.id) ?? ((Um = b == null ? void 0 : b.meta) == null ? void 0 : Um.id);
|
|
5458
5458
|
if (t(b), ce && me("main", {
|
|
5459
5459
|
detail: `${K} · ${ne.toLocaleString()} lines saved`,
|
|
5460
5460
|
progress: { done: ne, total: ne }
|
|
5461
|
-
}), F == null) throw new
|
|
5461
|
+
}), F == null) throw new Qp();
|
|
5462
5462
|
z = String(F);
|
|
5463
5463
|
} else if (Object.keys(W).some((b) => !b.startsWith("_"))) {
|
|
5464
5464
|
const b = Wv({
|
|
@@ -5476,7 +5476,7 @@ ${r.join(`
|
|
|
5476
5476
|
F = await j.request(Ri(`/items/${i}/${f}`, W));
|
|
5477
5477
|
} catch (Y) {
|
|
5478
5478
|
const ue = yd(Y);
|
|
5479
|
-
if (!ue || ue.latest <= 0 ||
|
|
5479
|
+
if (!ue || ue.latest <= 0 || yp({
|
|
5480
5480
|
conflicts: ue.conflicts,
|
|
5481
5481
|
payload: W,
|
|
5482
5482
|
decided: Cr.current
|
|
@@ -5494,7 +5494,7 @@ ${r.join(`
|
|
|
5494
5494
|
Ee.current.noFieldWrite = !0, z = f;
|
|
5495
5495
|
me("main", { status: "done" });
|
|
5496
5496
|
} catch (b) {
|
|
5497
|
-
if (b instanceof
|
|
5497
|
+
if (b instanceof Qp)
|
|
5498
5498
|
return me("main", { status: "done" }), "";
|
|
5499
5499
|
const F = vd(b);
|
|
5500
5500
|
if (F)
|
|
@@ -5502,7 +5502,7 @@ ${r.join(`
|
|
|
5502
5502
|
const Y = yd(b);
|
|
5503
5503
|
if (Y) {
|
|
5504
5504
|
me("main", { status: "error", error: "Someone else changed this record" });
|
|
5505
|
-
const le =
|
|
5505
|
+
const le = yp({
|
|
5506
5506
|
conflicts: Y.conflicts,
|
|
5507
5507
|
payload: W,
|
|
5508
5508
|
decided: Cr.current
|
|
@@ -5529,7 +5529,7 @@ ${r.join(`
|
|
|
5529
5529
|
});
|
|
5530
5530
|
if (Qe) {
|
|
5531
5531
|
const fe = !En.current;
|
|
5532
|
-
fe && (En.current =
|
|
5532
|
+
fe && (En.current = dp(i, f));
|
|
5533
5533
|
for (const Le of Object.keys(Qe.payload)) lo.current.add(Le);
|
|
5534
5534
|
throw me("main", {
|
|
5535
5535
|
status: "error",
|
|
@@ -5545,7 +5545,7 @@ ${r.join(`
|
|
|
5545
5545
|
error: ve && /[A-Za-z0-9_]+\[[^\]]*\]:/.test(ue) ? nS(ve, ye) : ue,
|
|
5546
5546
|
hint: re.hint,
|
|
5547
5547
|
details: re,
|
|
5548
|
-
denied:
|
|
5548
|
+
denied: qp(b)
|
|
5549
5549
|
}), ve)
|
|
5550
5550
|
Vo.markRefused({ [ve.field]: ve.message }), hn({ [ve.field]: ve.message }), setTimeout(() => Rn(ve.field), 150);
|
|
5551
5551
|
else {
|
|
@@ -5652,7 +5652,7 @@ ${r.join(`
|
|
|
5652
5652
|
if (Object.keys(re).length === 0) continue;
|
|
5653
5653
|
Ct.current && !re._change_reason && (re._change_reason = Ct.current);
|
|
5654
5654
|
const be = await fc(F, Y);
|
|
5655
|
-
await j.request(Ri(`/items/${F}/${Y}${s}`,
|
|
5655
|
+
await j.request(Ri(`/items/${F}/${Y}${s}`, vp(re, be))).then(() => !0).catch(() => !1) && (Wr.add(`${b}:${Y}`), kt.current.delete(`${F}:${Y}`), Cd(j, F).forget(Y));
|
|
5656
5656
|
}
|
|
5657
5657
|
}
|
|
5658
5658
|
for (const b of g) {
|
|
@@ -5773,7 +5773,7 @@ ${r.join(`
|
|
|
5773
5773
|
Ct.current && !Ue._change_reason && (Ue._change_reason = Ct.current);
|
|
5774
5774
|
const bt = await fc(Y, fe);
|
|
5775
5775
|
await j.request(
|
|
5776
|
-
Ri(`/items/${Y}/${fe}${s}`,
|
|
5776
|
+
Ri(`/items/${Y}/${fe}${s}`, vp(Ue, bt))
|
|
5777
5777
|
).then(() => {
|
|
5778
5778
|
kt.current.delete(`${Y}:${fe}`), Cd(j, Y).forget(fe);
|
|
5779
5779
|
}).catch(async (nn) => {
|
|
@@ -5797,7 +5797,7 @@ ${r.join(`
|
|
|
5797
5797
|
latest: it.latest,
|
|
5798
5798
|
mine: jn
|
|
5799
5799
|
};
|
|
5800
|
-
await
|
|
5800
|
+
await Pf(un, Y, fe, Ue), da.push(un), me(F, {
|
|
5801
5801
|
status: "error",
|
|
5802
5802
|
error: `${Me} was changed by someone else — pick which value wins`
|
|
5803
5803
|
});
|
|
@@ -5872,7 +5872,7 @@ ${r.join(`
|
|
|
5872
5872
|
}));
|
|
5873
5873
|
}
|
|
5874
5874
|
jr(Vt), n && (ts(n), Ee.current.reasonWaiting = !0), da.length > 0 && (Ee.current.lineConflicts = da.length, oo(da));
|
|
5875
|
-
const
|
|
5875
|
+
const Bm = new Map(Ge);
|
|
5876
5876
|
for (const b of C) {
|
|
5877
5877
|
const F = `o2m:del:${b}`, [Y] = b.split("."), ue = Ge.get(b) ?? /* @__PURE__ */ new Set();
|
|
5878
5878
|
me(F, { status: "running", progress: { done: 0, total: ue.size } });
|
|
@@ -5893,9 +5893,9 @@ ${r.join(`
|
|
|
5893
5893
|
};
|
|
5894
5894
|
});
|
|
5895
5895
|
})
|
|
5896
|
-
), re || (me(F, { status: "done" }),
|
|
5896
|
+
), re || (me(F, { status: "done" }), Bm.delete(b));
|
|
5897
5897
|
}
|
|
5898
|
-
if (ko(
|
|
5898
|
+
if (ko(Bm), u && Sn.length > 0) {
|
|
5899
5899
|
me("tasks", { status: "running" });
|
|
5900
5900
|
const b = [];
|
|
5901
5901
|
for (const F of Sn)
|
|
@@ -5929,7 +5929,7 @@ ${r.join(`
|
|
|
5929
5929
|
onSuccess: (e) => {
|
|
5930
5930
|
var c;
|
|
5931
5931
|
if (u && (Z_($t, e ? String(e) : ""), Ly()), u && !e) {
|
|
5932
|
-
on(!1), dr(/* @__PURE__ */ new Map()), Ar(/* @__PURE__ */ new Map()), lr(/* @__PURE__ */ new Map()), or(!1),
|
|
5932
|
+
on(!1), dr(/* @__PURE__ */ new Map()), Ar(/* @__PURE__ */ new Map()), lr(/* @__PURE__ */ new Map()), or(!1), Nh({ reason: ((c = Ee.current.hidden) == null ? void 0 : c.reason) ?? null });
|
|
5933
5933
|
return;
|
|
5934
5934
|
}
|
|
5935
5935
|
Vo.markSaved(), bc(!0), setTimeout(() => bc(!1), 1600), La.current = Date.now(), ir({}), (async () => {
|
|
@@ -6006,7 +6006,7 @@ ${r.join(`
|
|
|
6006
6006
|
}
|
|
6007
6007
|
lr(new Map(wo.current));
|
|
6008
6008
|
const r = ks.current.size > 0;
|
|
6009
|
-
if (ks.current.clear(), Nl(/* @__PURE__ */ new Map()), H.invalidateQueries({ queryKey: ["item", i] }), r ? H.invalidateQueries({ queryKey: ["m2m-items"] }) :
|
|
6009
|
+
if (ks.current.clear(), Nl(/* @__PURE__ */ new Map()), H.invalidateQueries({ queryKey: ["item", i] }), r ? H.invalidateQueries({ queryKey: ["m2m-items"] }) : kp(H, [e, ...Rw(He)]), rk(H, i, String(e)), H.invalidateQueries({ queryKey: ["last-touch", i, String(e)] }), H.invalidateQueries({ queryKey: ["field-lineage", i, String(e)] }), H.invalidateQueries({ queryKey: ["child-summary", i, String(e)] }), sk(H, i, String(e)), Ho && Un && hr({ itemId: String(e), silent: !0 }), u && Zs.current) {
|
|
6010
6010
|
const d = Zs.current;
|
|
6011
6011
|
Zs.current = null;
|
|
6012
6012
|
const h = {};
|
|
@@ -6043,23 +6043,23 @@ ${r.join(`
|
|
|
6043
6043
|
layoutId: Xn ? Fs : null,
|
|
6044
6044
|
userId: De,
|
|
6045
6045
|
enabled: Xn
|
|
6046
|
-
}), [My, Yl] = I(!1),
|
|
6046
|
+
}), [My, Yl] = I(!1), Lf = N(null);
|
|
6047
6047
|
B(() => {
|
|
6048
|
-
if (!Xn || js.seen || !js.known ||
|
|
6048
|
+
if (!Xn || js.seen || !js.known || Lf.current === Fs) return;
|
|
6049
6049
|
const e = window.setTimeout(() => {
|
|
6050
|
-
document.querySelector('[role="dialog"][data-state="open"]') || vv(ta.current).some((t) => wi.has(t)) && (
|
|
6050
|
+
document.querySelector('[role="dialog"][data-state="open"]') || vv(ta.current).some((t) => wi.has(t)) && (Lf.current = Fs, Yl(!0));
|
|
6051
6051
|
}, 800);
|
|
6052
6052
|
return () => window.clearTimeout(e);
|
|
6053
6053
|
}, [Xn, js.seen, js.known, Fs, wi]);
|
|
6054
6054
|
const Ky = de(() => {
|
|
6055
6055
|
Yl(!1), js.markSeen();
|
|
6056
|
-
}, [js.markSeen]), [
|
|
6056
|
+
}, [js.markSeen]), [Mf, Dy] = I(0);
|
|
6057
6057
|
B(() => {
|
|
6058
|
-
|
|
6059
|
-
}, [
|
|
6058
|
+
Mf > 0 && !At.isPending && At.mutate();
|
|
6059
|
+
}, [Mf]);
|
|
6060
6060
|
const By = (e) => {
|
|
6061
6061
|
const t = rs ?? [];
|
|
6062
|
-
oo(null),
|
|
6062
|
+
oo(null), $f();
|
|
6063
6063
|
const n = new Map(He);
|
|
6064
6064
|
let r = 0;
|
|
6065
6065
|
for (const s of t) {
|
|
@@ -6077,13 +6077,13 @@ ${r.join(`
|
|
|
6077
6077
|
return;
|
|
6078
6078
|
}
|
|
6079
6079
|
r > 0 ? Dy((s) => s + 1) : _e.success("Kept the newer values");
|
|
6080
|
-
}, Wy =
|
|
6081
|
-
q0(
|
|
6082
|
-
const
|
|
6083
|
-
|
|
6084
|
-
} : void 0,
|
|
6080
|
+
}, Wy = ep(), [na, ki] = I(null), Kf = yn && Wy.active && !S && !At.isPending, zy = q_().navigate;
|
|
6081
|
+
q0(Kf, (e) => ki({ go: e }), ta, zy);
|
|
6082
|
+
const Df = E ? () => {
|
|
6083
|
+
Kf ? ki({ go: E }) : E();
|
|
6084
|
+
} : void 0, Bf = N(() => {
|
|
6085
6085
|
});
|
|
6086
|
-
|
|
6086
|
+
Bf.current = () => {
|
|
6087
6087
|
if (!En.current || !Xe || At.isPending || ze || oc)
|
|
6088
6088
|
return;
|
|
6089
6089
|
const e = xn;
|
|
@@ -6106,7 +6106,7 @@ ${r.join(`
|
|
|
6106
6106
|
t.latest != null && (Pn.current = t.latest), At.mutate();
|
|
6107
6107
|
}).catch(() => {
|
|
6108
6108
|
});
|
|
6109
|
-
}, B(() => tb(() =>
|
|
6109
|
+
}, B(() => tb(() => Bf.current()), []), B(
|
|
6110
6110
|
() => nb((e) => {
|
|
6111
6111
|
e.type === "replayed" && e.entry.collection === i && e.entry.item === String(f) && (La.current = Date.now());
|
|
6112
6112
|
}),
|
|
@@ -6116,7 +6116,7 @@ ${r.join(`
|
|
|
6116
6116
|
var n;
|
|
6117
6117
|
const e = xn;
|
|
6118
6118
|
if (!e) return;
|
|
6119
|
-
En.current || (En.current =
|
|
6119
|
+
En.current || (En.current = dp(i, f));
|
|
6120
6120
|
for (const r of Object.keys(e.payload)) lo.current.add(r);
|
|
6121
6121
|
const t = { ...U.current, ...e.payload };
|
|
6122
6122
|
U.current = t, lt(t);
|
|
@@ -6132,11 +6132,11 @@ ${r.join(`
|
|
|
6132
6132
|
edit: Nd(e.payload)
|
|
6133
6133
|
});
|
|
6134
6134
|
} else e.base_revision != null && (Pn.current = e.base_revision);
|
|
6135
|
-
}, [xn, i, f]),
|
|
6135
|
+
}, [xn, i, f]), Wf = N(null);
|
|
6136
6136
|
B(() => {
|
|
6137
6137
|
if ((xn == null ? void 0 : xn.status) !== "conflict" || !we || En.current || ze) return;
|
|
6138
6138
|
const e = `${xn.id}@${xn.updated_at}`;
|
|
6139
|
-
|
|
6139
|
+
Wf.current !== e && (Wf.current = e, Zl());
|
|
6140
6140
|
}, [xn, we, ze, Zl]);
|
|
6141
6141
|
const Qy = A(() => ib(), []), Uy = () => {
|
|
6142
6142
|
const e = Kd.urlFor({ collection: i, itemId: String(f), layoutSlug: $ });
|
|
@@ -6151,16 +6151,16 @@ ${r.join(`
|
|
|
6151
6151
|
), t = e.find((n) => !n.ok);
|
|
6152
6152
|
return t ? (_e.error(`${t.label ?? "A line"} has a problem — nothing was moved`, {
|
|
6153
6153
|
description: "Fix the line (the reason is under the field) or cancel its edit, then try again."
|
|
6154
|
-
}), !1) : (e.some((n) => n.committed) && await Hy(),
|
|
6155
|
-
},
|
|
6156
|
-
|
|
6154
|
+
}), !1) : (e.some((n) => n.committed) && await Hy(), zf.current());
|
|
6155
|
+
}, zf = N(async () => !1);
|
|
6156
|
+
zf.current = async () => {
|
|
6157
6157
|
if (rs || ze)
|
|
6158
6158
|
return _e.warning("Choose Theirs or Mine first — nothing was moved", {
|
|
6159
6159
|
description: "Someone else saved this record after you opened it."
|
|
6160
6160
|
}), !1;
|
|
6161
|
-
if (!
|
|
6161
|
+
if (!qf()) return !1;
|
|
6162
6162
|
if (!Fw({ isDirty: Xe, staged: ot })) return !0;
|
|
6163
|
-
const e =
|
|
6163
|
+
const e = If();
|
|
6164
6164
|
if (e)
|
|
6165
6165
|
return ts(e), !1;
|
|
6166
6166
|
Hl();
|
|
@@ -6186,14 +6186,14 @@ ${r.join(`
|
|
|
6186
6186
|
});
|
|
6187
6187
|
const Hy = () => new Promise((e) => {
|
|
6188
6188
|
ra.current.push(e), setTimeout(e, 400);
|
|
6189
|
-
}), Xl =
|
|
6189
|
+
}), Xl = Vm({
|
|
6190
6190
|
mutationFn: () => j.request(br(`/items/${i}/${f}`)),
|
|
6191
6191
|
onSuccess: () => {
|
|
6192
6192
|
_e.success("Record deleted"), H.invalidateQueries({ queryKey: ["item", i] }), se == null || se();
|
|
6193
6193
|
},
|
|
6194
6194
|
onError: (e) => _e.error(_d(e, "Failed to delete"), {
|
|
6195
6195
|
...d0(e, { action: "Delete record" }),
|
|
6196
|
-
...
|
|
6196
|
+
...qp(e) && f ? {
|
|
6197
6197
|
action: Rx(j, {
|
|
6198
6198
|
collection: i,
|
|
6199
6199
|
itemId: String(f),
|
|
@@ -6201,7 +6201,7 @@ ${r.join(`
|
|
|
6201
6201
|
})
|
|
6202
6202
|
} : {}
|
|
6203
6203
|
})
|
|
6204
|
-
}), [Gy,
|
|
6204
|
+
}), [Gy, Qf] = I(!1), Tt = /* @__PURE__ */ new Set(), Qt = /* @__PURE__ */ new Set();
|
|
6205
6205
|
if (zn)
|
|
6206
6206
|
for (const e of O ?? []) ii(e.field) && Qt.add(e.field);
|
|
6207
6207
|
if (Bn)
|
|
@@ -6211,7 +6211,7 @@ ${r.join(`
|
|
|
6211
6211
|
))
|
|
6212
6212
|
Qt.add(e);
|
|
6213
6213
|
if (wl) {
|
|
6214
|
-
const e = (qe == null ? void 0 : qe.role) ?? null, t = ((
|
|
6214
|
+
const e = (qe == null ? void 0 : qe.role) ?? null, t = ((km = Ne == null ? void 0 : Ne.instance) == null ? void 0 : km.current_state) ?? null, n = t ? ((xm = ((Ne == null ? void 0 : Ne.states) ?? []).find((r) => r.id === t)) == null ? void 0 : xm.key) ?? null : null;
|
|
6215
6215
|
for (const r of ht) {
|
|
6216
6216
|
if (!r.lock_conditions) continue;
|
|
6217
6217
|
let s = [];
|
|
@@ -6227,11 +6227,11 @@ ${r.join(`
|
|
|
6227
6227
|
}
|
|
6228
6228
|
}
|
|
6229
6229
|
if (xe.active) for (const e of xe.readonly) Qt.add(e);
|
|
6230
|
-
const
|
|
6230
|
+
const Uf = /* @__PURE__ */ new Set();
|
|
6231
6231
|
if (!wt)
|
|
6232
6232
|
for (const e of O ?? [])
|
|
6233
|
-
((
|
|
6234
|
-
const
|
|
6233
|
+
((Sm = er(e.options)) == null ? void 0 : Sm.admin_only_edit) === !0 && (Uf.add(e.field), Qt.add(e.field));
|
|
6234
|
+
const Vf = /* @__PURE__ */ new Map();
|
|
6235
6235
|
{
|
|
6236
6236
|
const e = qe != null && qe.role ? String(qe.role).toUpperCase() : null, t = !!(qe != null && qe.role_admin_access);
|
|
6237
6237
|
if (e && !t)
|
|
@@ -6246,7 +6246,7 @@ ${r.join(`
|
|
|
6246
6246
|
continue;
|
|
6247
6247
|
}
|
|
6248
6248
|
for (const s of ht)
|
|
6249
|
-
s.group_key === n.key && !s.field.startsWith("__") && (Qt.add(s.field),
|
|
6249
|
+
s.group_key === n.key && !s.field.startsWith("__") && (Qt.add(s.field), Vf.set(s.field, n.label || n.key));
|
|
6250
6250
|
}
|
|
6251
6251
|
}
|
|
6252
6252
|
}
|
|
@@ -6256,11 +6256,11 @@ ${r.join(`
|
|
|
6256
6256
|
for (const t of Ie[e.key] ?? [])
|
|
6257
6257
|
Qt.add(t.field), ed.has(t.field) || ed.set(t.field, `Hidden by a rule: ${e.label} shows when ${e.when}`);
|
|
6258
6258
|
const ft = {};
|
|
6259
|
-
for (const [e, t] of
|
|
6259
|
+
for (const [e, t] of Vf)
|
|
6260
6260
|
ft[e] = `The "${t}" section is locked for your role`;
|
|
6261
6261
|
for (const [e, t] of ed) ft[e] || (ft[e] = t);
|
|
6262
6262
|
{
|
|
6263
|
-
const e = ((
|
|
6263
|
+
const e = ((Nm = Ne == null ? void 0 : Ne.instance) == null ? void 0 : Nm.current_state) ?? null, t = e ? ((Ne == null ? void 0 : Ne.states) ?? []).find((r) => r.id === e) ?? null : null, n = t ? ((Cm = t.label) == null ? void 0 : Cm.trim()) || ge(t.key.replace(/_/g, " ")) : null;
|
|
6264
6264
|
for (const r of ht)
|
|
6265
6265
|
if (!(!r.lock_conditions || !Qt.has(r.field)))
|
|
6266
6266
|
try {
|
|
@@ -6275,7 +6275,7 @@ ${r.join(`
|
|
|
6275
6275
|
const s = r.field;
|
|
6276
6276
|
if (ft[s]) continue;
|
|
6277
6277
|
if (xe.active && xe.readonly.has(s)) {
|
|
6278
|
-
ft[s] = `${((
|
|
6278
|
+
ft[s] = `${(($m = xe.preview) == null ? void 0 : $m.role.name) ?? "This role"} cannot edit this field`;
|
|
6279
6279
|
continue;
|
|
6280
6280
|
}
|
|
6281
6281
|
if (rt && !dl.has(s)) {
|
|
@@ -6290,7 +6290,7 @@ ${r.join(`
|
|
|
6290
6290
|
ft[s] = "Viewing an addendum — switch to the current record to edit";
|
|
6291
6291
|
continue;
|
|
6292
6292
|
}
|
|
6293
|
-
if (
|
|
6293
|
+
if (Uf.has(s)) {
|
|
6294
6294
|
ft[s] = "Only administrators can change this field";
|
|
6295
6295
|
continue;
|
|
6296
6296
|
}
|
|
@@ -6303,12 +6303,12 @@ ${r.join(`
|
|
|
6303
6303
|
u,
|
|
6304
6304
|
ye,
|
|
6305
6305
|
(e) => !!ft[e] || Qt.has(e)
|
|
6306
|
-
),
|
|
6306
|
+
), Hf = {};
|
|
6307
6307
|
for (const e of ht) {
|
|
6308
6308
|
const t = typeof e.overrides == "string" ? er(e.overrides) : e.overrides, n = t == null ? void 0 : t.apply_to_lines;
|
|
6309
6309
|
if (!(n != null && n.grid) || !(n != null && n.target)) continue;
|
|
6310
6310
|
const r = n.grid, s = n.target;
|
|
6311
|
-
|
|
6311
|
+
Hf[e.field] = {
|
|
6312
6312
|
label: n.label,
|
|
6313
6313
|
count: r in Xt ? Xt[r] : null,
|
|
6314
6314
|
onApply: (o) => {
|
|
@@ -6337,14 +6337,14 @@ ${r.join(`
|
|
|
6337
6337
|
const r = D.find(
|
|
6338
6338
|
(s) => s.many_collection === n.many_collection && s.many_field === n.junction_field && s.one_collection !== i
|
|
6339
6339
|
);
|
|
6340
|
-
return
|
|
6340
|
+
return Xp(r);
|
|
6341
6341
|
}, xi = {};
|
|
6342
6342
|
for (const e of ot.fields) xi[e] = { from: pe.current[e] };
|
|
6343
6343
|
for (const [e, t] of et)
|
|
6344
6344
|
t.length && (xi[e] = { from: null, detail: `${t.length} linked` });
|
|
6345
6345
|
for (const [e, t] of dt)
|
|
6346
6346
|
if (t.size) {
|
|
6347
|
-
const n = (
|
|
6347
|
+
const n = (Rm = xi[e]) == null ? void 0 : Rm.detail;
|
|
6348
6348
|
xi[e] = {
|
|
6349
6349
|
from: null,
|
|
6350
6350
|
detail: n ? `${n}, ${t.size} unlinked` : `${t.size} unlinked`
|
|
@@ -6433,7 +6433,7 @@ ${r.join(`
|
|
|
6433
6433
|
detail: `− junction #${String(n)}`,
|
|
6434
6434
|
onRevert: () => Se.unstageUnlink(e, n)
|
|
6435
6435
|
});
|
|
6436
|
-
const
|
|
6436
|
+
const Gf = N(null);
|
|
6437
6437
|
B(() => {
|
|
6438
6438
|
var d, h, p;
|
|
6439
6439
|
const e = Ka;
|
|
@@ -6442,18 +6442,18 @@ ${r.join(`
|
|
|
6442
6442
|
e,
|
|
6443
6443
|
Io ? n : null,
|
|
6444
6444
|
qo ? r : null
|
|
6445
|
-
), o =
|
|
6445
|
+
), o = Gf.current;
|
|
6446
6446
|
if (o === s) return;
|
|
6447
6447
|
const l = !xb(o, e);
|
|
6448
6448
|
if (Sb({ first: l, unsaved: yn, lineDrafts: ds.size })) return;
|
|
6449
|
-
|
|
6449
|
+
Gf.current = s;
|
|
6450
6450
|
const c = Nb(Or, {
|
|
6451
6451
|
role: r,
|
|
6452
6452
|
stateKey: n,
|
|
6453
6453
|
isNew: u,
|
|
6454
6454
|
record: we ?? null
|
|
6455
6455
|
});
|
|
6456
|
-
l ? c === "summary" && Ma(!0) : Ma(c === "summary"),
|
|
6456
|
+
l ? c === "summary" && Ma(!0) : Ma(c === "summary"), Lh(e);
|
|
6457
6457
|
}, [
|
|
6458
6458
|
yn,
|
|
6459
6459
|
ds.size,
|
|
@@ -6483,25 +6483,25 @@ ${r.join(`
|
|
|
6483
6483
|
n(), e.onRevert();
|
|
6484
6484
|
} : e.onRevert;
|
|
6485
6485
|
}
|
|
6486
|
-
const
|
|
6486
|
+
const Jf = cv({
|
|
6487
6487
|
collection: i,
|
|
6488
6488
|
enabled: u && !S,
|
|
6489
6489
|
draft: M,
|
|
6490
6490
|
stagedLines: Te
|
|
6491
|
-
}), [
|
|
6491
|
+
}), [Yf, Zf] = I(null), Zy = Object.keys(Jf).length > 0, Xf = Lk(
|
|
6492
6492
|
i,
|
|
6493
6493
|
null,
|
|
6494
6494
|
u && !S && Zy
|
|
6495
6495
|
), Xy = A(
|
|
6496
6496
|
() => {
|
|
6497
6497
|
var e;
|
|
6498
|
-
return (e =
|
|
6498
|
+
return (e = Xf.data) != null && e.allowed ? { open: (t) => Zf(t) } : null;
|
|
6499
6499
|
},
|
|
6500
|
-
[(
|
|
6500
|
+
[(Om = Xf.data) == null ? void 0 : Om.allowed]
|
|
6501
6501
|
), e_ = Iw({
|
|
6502
6502
|
collection: i,
|
|
6503
6503
|
itemId: u ? null : f,
|
|
6504
|
-
enabled: ((
|
|
6504
|
+
enabled: ((Fm = v == null ? void 0 : v.browser_config) == null ? void 0 : Fm.partner_badges) === !0 && !S,
|
|
6505
6505
|
draft: M
|
|
6506
6506
|
}), sd = [];
|
|
6507
6507
|
{
|
|
@@ -6513,9 +6513,9 @@ ${r.join(`
|
|
|
6513
6513
|
n && r != null && r !== "" && typeof r != "object" && sd.push({ field: t.field, collection: n, id: String(r) });
|
|
6514
6514
|
}
|
|
6515
6515
|
}
|
|
6516
|
-
const t_ = sd.map((e) => `${e.field}=${e.collection}:${e.id}`).join("|"),
|
|
6517
|
-
targets:
|
|
6518
|
-
enabled: !S &&
|
|
6516
|
+
const t_ = sd.map((e) => `${e.field}=${e.collection}:${e.id}`).join("|"), em = A(() => sd, [t_]), n_ = P0({
|
|
6517
|
+
targets: em,
|
|
6518
|
+
enabled: !S && em.length > 0,
|
|
6519
6519
|
labels: (e) => {
|
|
6520
6520
|
const t = (O ?? []).find((n) => n.field === e);
|
|
6521
6521
|
return t && ji(t, bs).label || (t == null ? void 0 : t.label) || ge(e);
|
|
@@ -6523,11 +6523,11 @@ ${r.join(`
|
|
|
6523
6523
|
onRecheck: (e) => {
|
|
6524
6524
|
for (const t of e) ei.current(t, U.current[t]);
|
|
6525
6525
|
}
|
|
6526
|
-
}),
|
|
6526
|
+
}), tm = {};
|
|
6527
6527
|
for (const [e, t] of Object.entries(n_))
|
|
6528
|
-
$l.has(e) && (
|
|
6528
|
+
$l.has(e) && (tm[e] = E0(t.label, t.change, Date.now(), t.shown));
|
|
6529
6529
|
const r_ = {
|
|
6530
|
-
linkedChanges:
|
|
6530
|
+
linkedChanges: tm,
|
|
6531
6531
|
remoteChanges: Rr,
|
|
6532
6532
|
dismissRemoteChange: (e) => {
|
|
6533
6533
|
var t, n;
|
|
@@ -6539,7 +6539,7 @@ ${r.join(`
|
|
|
6539
6539
|
},
|
|
6540
6540
|
takeRemoteChange: (e) => {
|
|
6541
6541
|
const t = Rr[e];
|
|
6542
|
-
t != null && t.conflict && (
|
|
6542
|
+
t != null && t.conflict && (Sh(e, t.theirs), Jc(e, t.theirs ?? null), ir((n) => {
|
|
6543
6543
|
const r = { ...n };
|
|
6544
6544
|
return delete r[e], r;
|
|
6545
6545
|
}), Object.entries(Rr).some(([n, r]) => n !== e && r.conflict) || H.invalidateQueries({ queryKey: ["collision-base", i, f] }));
|
|
@@ -6553,32 +6553,32 @@ ${r.join(`
|
|
|
6553
6553
|
},
|
|
6554
6554
|
lockReasons: Jy,
|
|
6555
6555
|
onLockHover: Po.want,
|
|
6556
|
-
applyToLines:
|
|
6556
|
+
applyToLines: Hf,
|
|
6557
6557
|
openRelated: (e, t) => Kd.open({ collection: e, itemId: t }),
|
|
6558
6558
|
layoutId: (ee == null ? void 0 : ee.id) ?? null,
|
|
6559
6559
|
// #2726: designers trying pickers on the canvas are not people searching.
|
|
6560
6560
|
pickerMisses: !S,
|
|
6561
|
-
fromAutofill:
|
|
6561
|
+
fromAutofill: eg,
|
|
6562
6562
|
glossaryHelp: mr.glossary !== !1,
|
|
6563
6563
|
placementText: bs,
|
|
6564
|
-
duplicates:
|
|
6565
|
-
}, Ni = gk(r_),
|
|
6564
|
+
duplicates: Jf
|
|
6565
|
+
}, Ni = gk(r_), nm = tv({
|
|
6566
6566
|
labelOf: (e) => {
|
|
6567
6567
|
const t = (O ?? []).find((n) => n.field === e);
|
|
6568
6568
|
return t && ji(t, bs).label || (t == null ? void 0 : t.label) || ge(e);
|
|
6569
6569
|
},
|
|
6570
6570
|
editSeq: (e) => sr.current.get(e) ?? (Ae.current.has(e) ? 0 : -1)
|
|
6571
|
-
}),
|
|
6572
|
-
|
|
6571
|
+
}), rm = N(ye);
|
|
6572
|
+
rm.current = ye;
|
|
6573
6573
|
const s_ = de(
|
|
6574
6574
|
(e) => {
|
|
6575
|
-
|
|
6576
|
-
const t =
|
|
6575
|
+
nm(e);
|
|
6576
|
+
const t = rm.current.find((n) => n.field === e.field);
|
|
6577
6577
|
t != null && t.required && (Gs.current.add(e.field), hn(
|
|
6578
|
-
(n) => n[e.field] ===
|
|
6578
|
+
(n) => n[e.field] === hp(e.label) ? n : { ...n, [e.field]: hp(e.label) }
|
|
6579
6579
|
));
|
|
6580
6580
|
},
|
|
6581
|
-
[
|
|
6581
|
+
[nm]
|
|
6582
6582
|
), sa = R_();
|
|
6583
6583
|
B(() => () => Qw(sa), [sa]);
|
|
6584
6584
|
const i_ = A(
|
|
@@ -6639,8 +6639,8 @@ ${r.join(`
|
|
|
6639
6639
|
title: (We == null ? void 0 : We.label_override) ?? void 0,
|
|
6640
6640
|
defaultExpanded: (We == null ? void 0 : We.default_expanded) ?? !1,
|
|
6641
6641
|
showApprovalChain: !!(We != null && We.show_approval_chain),
|
|
6642
|
-
hideActionsCollapsed: !!
|
|
6643
|
-
hideActionsExpanded: !!
|
|
6642
|
+
hideActionsCollapsed: !!pf.hide_actions_collapsed,
|
|
6643
|
+
hideActionsExpanded: !!pf.hide_actions_expanded,
|
|
6644
6644
|
onBeforeTransition: As,
|
|
6645
6645
|
asRole: xe.roleId,
|
|
6646
6646
|
asUser: xe.personId,
|
|
@@ -6738,7 +6738,7 @@ ${r.join(`
|
|
|
6738
6738
|
);
|
|
6739
6739
|
}
|
|
6740
6740
|
{
|
|
6741
|
-
const s =
|
|
6741
|
+
const s = op(e);
|
|
6742
6742
|
if (s)
|
|
6743
6743
|
return /* @__PURE__ */ a(
|
|
6744
6744
|
hv,
|
|
@@ -6789,7 +6789,7 @@ ${r.join(`
|
|
|
6789
6789
|
}
|
|
6790
6790
|
return null;
|
|
6791
6791
|
}
|
|
6792
|
-
function
|
|
6792
|
+
function sm() {
|
|
6793
6793
|
const e = qn ? ye.filter(
|
|
6794
6794
|
(t) => !t.group_key && !rn.has(t.field) && !zr(t.field) && (Zt === null || t.layout_assigned !== !1)
|
|
6795
6795
|
) : Kt.filter((t) => !t.hidden);
|
|
@@ -6863,12 +6863,12 @@ ${r.join(`
|
|
|
6863
6863
|
}
|
|
6864
6864
|
);
|
|
6865
6865
|
}
|
|
6866
|
-
function
|
|
6866
|
+
function im(e, t) {
|
|
6867
6867
|
var k, C;
|
|
6868
6868
|
const n = Ce.filter((y) => y.type === "tab" && y.container_id === e.id).sort((y, R) => y.sort - R.sort);
|
|
6869
6869
|
if (n.length === 0) return null;
|
|
6870
6870
|
if (Dl && t === void 0)
|
|
6871
|
-
return /* @__PURE__ */ a("div", { className: "space-y-3", children: n.map((y) => /* @__PURE__ */ a(ud, { children:
|
|
6871
|
+
return /* @__PURE__ */ a("div", { className: "space-y-3", children: n.map((y) => /* @__PURE__ */ a(ud, { children: im(e, y.key) }, y.key)) }, e.key);
|
|
6872
6872
|
const r = Al(e), s = t ?? fy(e, n), o = n.find((y) => y.key === s) ?? n[0], l = (() => {
|
|
6873
6873
|
try {
|
|
6874
6874
|
return o != null && o.swap_config ? JSON.parse(o.swap_config) : null;
|
|
@@ -6877,7 +6877,7 @@ ${r.join(`
|
|
|
6877
6877
|
}
|
|
6878
6878
|
})(), c = ((l == null ? void 0 : l.alternate_fields) ?? []).map(
|
|
6879
6879
|
(y) => typeof y == "string" ? { field: y, width: 2 } : y
|
|
6880
|
-
), d = l != null && l.enabled ?
|
|
6880
|
+
), d = l != null && l.enabled ? Qu.has((o == null ? void 0 : o.id) ?? -1) : !1, h = (Ie[(o == null ? void 0 : o.key) ?? ""] ?? []).filter(
|
|
6881
6881
|
(y) => qn || !y.hidden
|
|
6882
6882
|
), p = !u && !!Zt && !!Ye && (Ns === (o == null ? void 0 : o.key) || Ns === e.key), m = /* @__PURE__ */ new Set(), g = /* @__PURE__ */ new Set();
|
|
6883
6883
|
for (const y of n) {
|
|
@@ -6900,7 +6900,7 @@ ${r.join(`
|
|
|
6900
6900
|
}
|
|
6901
6901
|
return /* @__PURE__ */ _("div", { className: "nvr-section-enter rounded-xl border border-slate-200 bg-white", children: [
|
|
6902
6902
|
t !== void 0 && t !== ((k = n[0]) == null ? void 0 : k.key) ? /* @__PURE__ */ a("div", { className: "border-b border-slate-100 px-4 pt-3 pb-2", children: ld(t, (o == null ? void 0 : o.label) ?? t) }) : r ? /* @__PURE__ */ a(
|
|
6903
|
-
|
|
6903
|
+
Rp,
|
|
6904
6904
|
{
|
|
6905
6905
|
steps: n.map((y) => ({ key: y.key, label: y.label })),
|
|
6906
6906
|
active: s,
|
|
@@ -6935,7 +6935,7 @@ ${r.join(`
|
|
|
6935
6935
|
) }),
|
|
6936
6936
|
/* @__PURE__ */ _("div", { className: "px-5 py-5", children: [
|
|
6937
6937
|
o && /* @__PURE__ */ a(Zv, { group: o, className: "mb-4" }),
|
|
6938
|
-
S && o && /* @__PURE__ */ a(
|
|
6938
|
+
S && o && /* @__PURE__ */ a(Op, { groupKey: o.key }),
|
|
6939
6939
|
(() => {
|
|
6940
6940
|
const y = (K, Q) => {
|
|
6941
6941
|
var bn;
|
|
@@ -6952,7 +6952,7 @@ ${r.join(`
|
|
|
6952
6952
|
"button",
|
|
6953
6953
|
{
|
|
6954
6954
|
type: "button",
|
|
6955
|
-
onClick: () =>
|
|
6955
|
+
onClick: () => Uu((mt) => {
|
|
6956
6956
|
const at = new Set(mt);
|
|
6957
6957
|
return at.has(o.id) ? at.delete(o.id) : at.add(o.id), at;
|
|
6958
6958
|
}),
|
|
@@ -7063,15 +7063,15 @@ ${r.join(`
|
|
|
7063
7063
|
] }, K.field),
|
|
7064
7064
|
{ asChild: !0 }
|
|
7065
7065
|
);
|
|
7066
|
-
}, R =
|
|
7066
|
+
}, R = om(o, h);
|
|
7067
7067
|
return /* @__PURE__ */ _(It, { children: [
|
|
7068
7068
|
/* @__PURE__ */ a(Ti, { children: (K) => R.units.map(
|
|
7069
|
-
(Q) => Q.kind === "row" ?
|
|
7069
|
+
(Q) => Q.kind === "row" ? am(Q.row, Q.members, K, (o == null ? void 0 : o.key) ?? null) : y(Q.field, K)
|
|
7070
7070
|
) }),
|
|
7071
|
-
|
|
7071
|
+
lm((o == null ? void 0 : o.key) ?? e.key, R, () => /* @__PURE__ */ a(Ti, { children: (K) => R.folded.map((Q) => y(Q, K)) }))
|
|
7072
7072
|
] });
|
|
7073
7073
|
})(),
|
|
7074
|
-
S && h.length === 0 && !p && !pi.some((y) => (y.group_key ?? null) === o.key) && /* @__PURE__ */ a(
|
|
7074
|
+
S && h.length === 0 && !p && !pi.some((y) => (y.group_key ?? null) === o.key) && /* @__PURE__ */ a(Fp, {}),
|
|
7075
7075
|
pi.filter((y) => (y.group_key ?? null) === o.key).map((y) => {
|
|
7076
7076
|
let R = [];
|
|
7077
7077
|
try {
|
|
@@ -7172,10 +7172,10 @@ ${r.join(`
|
|
|
7172
7172
|
}
|
|
7173
7173
|
function o_(e) {
|
|
7174
7174
|
var m;
|
|
7175
|
-
if (e === "__ungrouped__") return
|
|
7175
|
+
if (e === "__ungrouped__") return sm();
|
|
7176
7176
|
if (typeof e == "string" && e !== "__ungrouped__") return ad(e);
|
|
7177
7177
|
const t = e;
|
|
7178
|
-
if (t.type === "container") return
|
|
7178
|
+
if (t.type === "container") return im(t);
|
|
7179
7179
|
if (t.type === "content") return /* @__PURE__ */ a(Yv, { group: t }, t.key);
|
|
7180
7180
|
if (t.type === "metadata" && u) return null;
|
|
7181
7181
|
const n = (() => {
|
|
@@ -7186,7 +7186,7 @@ ${r.join(`
|
|
|
7186
7186
|
}
|
|
7187
7187
|
})(), r = ((n == null ? void 0 : n.alternate_fields) ?? []).map(
|
|
7188
7188
|
(g) => typeof g == "string" ? { field: g, width: 2 } : g
|
|
7189
|
-
), s = n != null && n.enabled ?
|
|
7189
|
+
), s = n != null && n.enabled ? Qu.has(t.id) : !1, l = (Ie[t.key] ?? []).map((g) => {
|
|
7190
7190
|
const k = ju(g.field), C = k ? {
|
|
7191
7191
|
...g,
|
|
7192
7192
|
options: {
|
|
@@ -7224,7 +7224,7 @@ ${r.join(`
|
|
|
7224
7224
|
ownersItemId: Ot,
|
|
7225
7225
|
pdfAssignment: d ? Ye : void 0,
|
|
7226
7226
|
pdfAttachField: d ? Un : void 0,
|
|
7227
|
-
pdfFilenameTemplate: d ?
|
|
7227
|
+
pdfFilenameTemplate: d ? hf : void 0,
|
|
7228
7228
|
widgetAssignments: h.length > 0 ? h : void 0,
|
|
7229
7229
|
layoutId: ((m = x == null ? void 0 : x.layout) == null ? void 0 : m.id) ?? null,
|
|
7230
7230
|
draft: M,
|
|
@@ -7242,20 +7242,20 @@ ${r.join(`
|
|
|
7242
7242
|
isNew: u,
|
|
7243
7243
|
fieldValues: l.map((g) => M[g.field]),
|
|
7244
7244
|
isOpen: p ? ry === t.id : void 0,
|
|
7245
|
-
onToggle: p ? () =>
|
|
7246
|
-
summaryFields:
|
|
7245
|
+
onToggle: p ? () => zu((g) => g === t.id ? null : t.id) : void 0,
|
|
7246
|
+
summaryFields: Ep(t.summary_fields),
|
|
7247
7247
|
deferred: Ks.groups.has(t.key),
|
|
7248
|
-
onFirstOpen: Ks.groups.has(t.key) ?
|
|
7248
|
+
onFirstOpen: Ks.groups.has(t.key) ? yh : void 0,
|
|
7249
7249
|
m2mCounts: ol,
|
|
7250
7250
|
o2mCounts: al,
|
|
7251
|
-
o2mAggValues:
|
|
7251
|
+
o2mAggValues: Hg,
|
|
7252
7252
|
summaryAggConfigs: qu,
|
|
7253
|
-
o2mLoading:
|
|
7254
|
-
hideEmptySummary:
|
|
7253
|
+
o2mLoading: Gg,
|
|
7254
|
+
hideEmptySummary: Zg,
|
|
7255
7255
|
fieldInlineDisplay: Vn,
|
|
7256
7256
|
swapConfig: n,
|
|
7257
7257
|
swapped: s,
|
|
7258
|
-
onSwapToggle: n != null && n.enabled ? () =>
|
|
7258
|
+
onSwapToggle: n != null && n.enabled ? () => Uu((g) => {
|
|
7259
7259
|
const k = new Set(g);
|
|
7260
7260
|
return k.has(t.id) ? k.delete(t.id) : k.add(t.id), k;
|
|
7261
7261
|
}) : void 0,
|
|
@@ -7269,9 +7269,9 @@ ${r.join(`
|
|
|
7269
7269
|
var r;
|
|
7270
7270
|
const e = h0(
|
|
7271
7271
|
Os.filter((s) => typeof s != "string" && !s.container_id)
|
|
7272
|
-
), t = (s, o) => (typeof s == "string" ? s : s.key) ?? o, n =
|
|
7272
|
+
), t = (s, o) => (typeof s == "string" ? s : s.key) ?? o, n = Af ? Nk(
|
|
7273
7273
|
Os,
|
|
7274
|
-
(s) =>
|
|
7274
|
+
(s) => Sp(s) && s.key !== e
|
|
7275
7275
|
) : Os.map((s) => ({ kind: "full", item: s }));
|
|
7276
7276
|
return /* @__PURE__ */ _("div", { ref: jy, "data-section-stack": "", className: "nvr-stagger space-y-4", children: [
|
|
7277
7277
|
n.map(
|
|
@@ -7279,10 +7279,10 @@ ${r.join(`
|
|
|
7279
7279
|
"div",
|
|
7280
7280
|
{
|
|
7281
7281
|
"data-form-row": "",
|
|
7282
|
-
"data-form-row-cols":
|
|
7282
|
+
"data-form-row-cols": Tf ? 2 : 1,
|
|
7283
7283
|
className: Oe(
|
|
7284
7284
|
"grid gap-4 [&>:empty]:hidden",
|
|
7285
|
-
|
|
7285
|
+
Tf ? "grid-cols-2 items-stretch" : "grid-cols-1 items-start"
|
|
7286
7286
|
),
|
|
7287
7287
|
children: s.items.map((l, c) => oa(l, t(l, c), e, !0))
|
|
7288
7288
|
},
|
|
@@ -7342,7 +7342,7 @@ ${r.join(`
|
|
|
7342
7342
|
)
|
|
7343
7343
|
] });
|
|
7344
7344
|
}
|
|
7345
|
-
function
|
|
7345
|
+
function om(e, t) {
|
|
7346
7346
|
return g0(t, {
|
|
7347
7347
|
rows: e ? _0(e.swap_config).rows : [],
|
|
7348
7348
|
folded: (n) => !!e && y0(n._overrides),
|
|
@@ -7350,7 +7350,7 @@ ${r.join(`
|
|
|
7350
7350
|
filled: (n) => !pd(Yn[n.field]) || !!Ze[n.field]
|
|
7351
7351
|
});
|
|
7352
7352
|
}
|
|
7353
|
-
function
|
|
7353
|
+
function am(e, t, n, r) {
|
|
7354
7354
|
return /* @__PURE__ */ a(
|
|
7355
7355
|
Rv,
|
|
7356
7356
|
{
|
|
@@ -7388,7 +7388,7 @@ ${r.join(`
|
|
|
7388
7388
|
`row:${e.key}`
|
|
7389
7389
|
);
|
|
7390
7390
|
}
|
|
7391
|
-
function
|
|
7391
|
+
function lm(e, t, n) {
|
|
7392
7392
|
return t.folded.length === 0 ? null : /* @__PURE__ */ a(
|
|
7393
7393
|
$v,
|
|
7394
7394
|
{
|
|
@@ -7405,7 +7405,7 @@ ${r.join(`
|
|
|
7405
7405
|
);
|
|
7406
7406
|
}
|
|
7407
7407
|
function aa(e, t = !1) {
|
|
7408
|
-
const n = (e === "__general__" ? t ? Kt : [...Kt, ...en.flatMap((d) => Ie[d.key] ?? [])] : Ie[e] ?? []).filter((d) => qn || !d.hidden), r = gi && Cs === e && pt, s = hi && Ns === e && !u, o = pi.filter((d) => (d.group_key ?? null) === e), l =
|
|
7408
|
+
const n = (e === "__general__" ? t ? Kt : [...Kt, ...en.flatMap((d) => Ie[d.key] ?? [])] : Ie[e] ?? []).filter((d) => qn || !d.hidden), r = gi && Cs === e && pt, s = hi && Ns === e && !u, o = pi.filter((d) => (d.group_key ?? null) === e), l = om(
|
|
7409
7409
|
e === "__general__" ? void 0 : Ce.find((d) => d.key === e),
|
|
7410
7410
|
n
|
|
7411
7411
|
), c = l.units.map(
|
|
@@ -7430,12 +7430,12 @@ ${r.join(`
|
|
|
7430
7430
|
{
|
|
7431
7431
|
className: "nvr-tab-enter rounded-xl border border-slate-200 bg-white px-5 py-5",
|
|
7432
7432
|
children: [
|
|
7433
|
-
S && (e !== "__general__" || t) && /* @__PURE__ */ a(
|
|
7433
|
+
S && (e !== "__general__" || t) && /* @__PURE__ */ a(Op, { groupKey: e === "__general__" ? "__ungrouped__" : e }),
|
|
7434
7434
|
(() => {
|
|
7435
7435
|
const d = (h, p) => {
|
|
7436
7436
|
var Q, oe;
|
|
7437
7437
|
if (h._t === "row")
|
|
7438
|
-
return
|
|
7438
|
+
return am(
|
|
7439
7439
|
h.row,
|
|
7440
7440
|
h.members,
|
|
7441
7441
|
p,
|
|
@@ -7555,12 +7555,12 @@ ${r.join(`
|
|
|
7555
7555
|
};
|
|
7556
7556
|
return /* @__PURE__ */ _(It, { children: [
|
|
7557
7557
|
/* @__PURE__ */ a(Ti, { children: (h) => c.map((p) => d(p, h)) }),
|
|
7558
|
-
|
|
7558
|
+
lm(e, l, () => /* @__PURE__ */ a(Ti, { children: (h) => l.folded.map(
|
|
7559
7559
|
(p) => d({ _k: p.field, sort: p.sort ?? 0, _t: "field", f: p }, h)
|
|
7560
7560
|
) }))
|
|
7561
7561
|
] });
|
|
7562
7562
|
})(),
|
|
7563
|
-
S && c.length === 0 && (e !== "__general__" || t) && /* @__PURE__ */ a(
|
|
7563
|
+
S && c.length === 0 && (e !== "__general__" || t) && /* @__PURE__ */ a(Fp, {})
|
|
7564
7564
|
]
|
|
7565
7565
|
},
|
|
7566
7566
|
st
|
|
@@ -7576,7 +7576,7 @@ ${r.join(`
|
|
|
7576
7576
|
const n = ke.find((r) => r.key !== e);
|
|
7577
7577
|
n && Bt(n.key);
|
|
7578
7578
|
}
|
|
7579
|
-
},
|
|
7579
|
+
}, dm = (e) => jl.length > 0 ? /* @__PURE__ */ a(
|
|
7580
7580
|
mk,
|
|
7581
7581
|
{
|
|
7582
7582
|
items: jl,
|
|
@@ -7592,11 +7592,11 @@ ${r.join(`
|
|
|
7592
7592
|
...Dt.map((n) => ({ key: n.key, label: n.label }))
|
|
7593
7593
|
];
|
|
7594
7594
|
return /* @__PURE__ */ _("div", { "data-section-stack": "", className: "space-y-4", children: [
|
|
7595
|
-
Kt.length > 0 &&
|
|
7595
|
+
Kt.length > 0 && sm(),
|
|
7596
7596
|
/* @__PURE__ */ _(
|
|
7597
7597
|
"div",
|
|
7598
7598
|
{
|
|
7599
|
-
ref:
|
|
7599
|
+
ref: af,
|
|
7600
7600
|
className: "relative flex border-b border-slate-200 overflow-x-auto gap-1 px-1",
|
|
7601
7601
|
children: [
|
|
7602
7602
|
e.map((n) => {
|
|
@@ -7637,7 +7637,7 @@ ${r.join(`
|
|
|
7637
7637
|
]
|
|
7638
7638
|
}
|
|
7639
7639
|
),
|
|
7640
|
-
|
|
7640
|
+
dm("tab"),
|
|
7641
7641
|
Dl ? e.map((n) => /* @__PURE__ */ _(ud, { children: [
|
|
7642
7642
|
ld(n.key, n.label),
|
|
7643
7643
|
aa(n.key)
|
|
@@ -7730,7 +7730,7 @@ ${r.join(`
|
|
|
7730
7730
|
disabled: At.isPending || yl || xe.active,
|
|
7731
7731
|
className: "inline-flex h-9 items-center gap-1.5 rounded-md bg-nvr-cyan px-3 text-[12px] font-medium text-white transition-colors hover:bg-nvr-cyan-dark disabled:opacity-50",
|
|
7732
7732
|
children: [
|
|
7733
|
-
/* @__PURE__ */ a(
|
|
7733
|
+
/* @__PURE__ */ a(Ym, { className: "h-3.5 w-3.5" }),
|
|
7734
7734
|
At.isPending ? "Saving…" : "Save Progress"
|
|
7735
7735
|
]
|
|
7736
7736
|
}
|
|
@@ -7747,7 +7747,7 @@ ${r.join(`
|
|
|
7747
7747
|
}
|
|
7748
7748
|
),
|
|
7749
7749
|
t && !u && pt && /* @__PURE__ */ a(
|
|
7750
|
-
|
|
7750
|
+
Ip,
|
|
7751
7751
|
{
|
|
7752
7752
|
wrap: !1,
|
|
7753
7753
|
collection: St,
|
|
@@ -7766,7 +7766,7 @@ ${r.join(`
|
|
|
7766
7766
|
return oa(d, p ?? h);
|
|
7767
7767
|
}),
|
|
7768
7768
|
/* @__PURE__ */ a(
|
|
7769
|
-
|
|
7769
|
+
Rp,
|
|
7770
7770
|
{
|
|
7771
7771
|
steps: ke,
|
|
7772
7772
|
hiddenSteps: Er,
|
|
@@ -7779,7 +7779,7 @@ ${r.join(`
|
|
|
7779
7779
|
onStepClick: Bt
|
|
7780
7780
|
}
|
|
7781
7781
|
),
|
|
7782
|
-
|
|
7782
|
+
dm("step"),
|
|
7783
7783
|
Dl ? ke.map((d) => /* @__PURE__ */ _(ud, { children: [
|
|
7784
7784
|
ld(d.key, d.label),
|
|
7785
7785
|
aa(d.key, !0)
|
|
@@ -7860,7 +7860,7 @@ ${r.join(`
|
|
|
7860
7860
|
}));
|
|
7861
7861
|
}, [j]), B(() => {
|
|
7862
7862
|
if (u || !Vr || S) return;
|
|
7863
|
-
const e = we && (v != null && v.display_template) ?
|
|
7863
|
+
const e = we && (v != null && v.display_template) ? Pp(
|
|
7864
7864
|
kd(v.display_template, ec),
|
|
7865
7865
|
we,
|
|
7866
7866
|
(v == null ? void 0 : v.singular) || (v == null ? void 0 : v.display_name) || ge(i ?? "")
|
|
@@ -7919,36 +7919,36 @@ ${r.join(`
|
|
|
7919
7919
|
tc ? /* @__PURE__ */ _("div", { className: "relative flex-1 min-h-0 overflow-hidden p-6", children: [
|
|
7920
7920
|
/* @__PURE__ */ a("p", { className: "sr-only", role: "status", children: "Loading record…" }),
|
|
7921
7921
|
/* @__PURE__ */ a(vx, { plan: tc }),
|
|
7922
|
-
eo.slow && /* @__PURE__ */ a("div", { className: "pointer-events-none absolute inset-x-0 top-3 flex justify-center px-4", children: /* @__PURE__ */ a(
|
|
7922
|
+
eo.slow && /* @__PURE__ */ a("div", { className: "pointer-events-none absolute inset-x-0 top-3 flex justify-center px-4", children: /* @__PURE__ */ a(Ap, { reason: eo, variant: "pill" }) })
|
|
7923
7923
|
] }) : /* @__PURE__ */ _("div", { className: "flex flex-1 flex-col items-center justify-center gap-3 p-6", children: [
|
|
7924
7924
|
/* @__PURE__ */ a("span", { className: "relative flex h-10 w-10 items-center justify-center", children: /* @__PURE__ */ a("span", { className: "absolute inset-0 animate-spin rounded-full border-2 border-slate-200 border-t-nvr-cyan motion-reduce:animate-none dark:border-border dark:border-t-nvr-cyan" }) }),
|
|
7925
7925
|
/* @__PURE__ */ a("p", { className: "text-[13px] font-medium text-slate-500 dark:text-muted-foreground", children: "Loading record…" }),
|
|
7926
|
-
eo.slow && /* @__PURE__ */ a(
|
|
7926
|
+
eo.slow && /* @__PURE__ */ a(Ap, { reason: eo })
|
|
7927
7927
|
] })
|
|
7928
7928
|
] });
|
|
7929
|
-
const la = (v == null ? void 0 : v.display_name) ?? ge(i ?? ""), dd = (v == null ? void 0 : v.singular) || la, qt = !u && we && (v != null && v.display_template) ?
|
|
7929
|
+
const la = (v == null ? void 0 : v.display_name) ?? ge(i ?? ""), dd = (v == null ? void 0 : v.singular) || la, qt = !u && we && (v != null && v.display_template) ? Pp(
|
|
7930
7930
|
kd(v.display_template, ec),
|
|
7931
7931
|
we,
|
|
7932
7932
|
dd
|
|
7933
|
-
) : la,
|
|
7933
|
+
) : la, cm = !u && wt && ey;
|
|
7934
7934
|
return /* @__PURE__ */ a(
|
|
7935
7935
|
I_.Provider,
|
|
7936
7936
|
{
|
|
7937
7937
|
value: u || zn ? null : Fc,
|
|
7938
|
-
children: /* @__PURE__ */ a(P_.Provider, { value:
|
|
7938
|
+
children: /* @__PURE__ */ a(P_.Provider, { value: og, children: /* @__PURE__ */ a(Qb.Provider, { value: Ug, children: /* @__PURE__ */ a(Ub.Provider, { value: Be, children: /* @__PURE__ */ a(Vb.Provider, { value: Ig, children: /* @__PURE__ */ a(E_.Provider, { value: i_, children: /* @__PURE__ */ a(L_.Provider, { value: u ? null : $h, children: /* @__PURE__ */ a(M_.Provider, { value: Kg, children: /* @__PURE__ */ a(nv.Provider, { value: s_, children: /* @__PURE__ */ a(Aw.Provider, { value: gn, children: /* @__PURE__ */ a(Tw.Provider, { value: Pg, children: /* @__PURE__ */ a(qw.Provider, { value: Eg, children: /* @__PURE__ */ a(Nw.Provider, { value: Se, children: /* @__PURE__ */ _(
|
|
7939
7939
|
_S,
|
|
7940
7940
|
{
|
|
7941
7941
|
affordances: Ni,
|
|
7942
7942
|
personalDefaults: Ro.context,
|
|
7943
|
-
sources:
|
|
7943
|
+
sources: _h,
|
|
7944
7944
|
fieldComments: Pl,
|
|
7945
7945
|
partnerNeeds: e_,
|
|
7946
7946
|
lineLocks: cl,
|
|
7947
|
-
coedit:
|
|
7947
|
+
coedit: Zh,
|
|
7948
7948
|
duplicateMerge: Xy,
|
|
7949
7949
|
children: [
|
|
7950
7950
|
/* @__PURE__ */ a(wx, {}),
|
|
7951
|
-
/* @__PURE__ */ a("p", { className: "sr-only", "aria-live": "polite", "data-live-field-error": !0, children:
|
|
7951
|
+
/* @__PURE__ */ a("p", { className: "sr-only", "aria-live": "polite", "data-live-field-error": !0, children: Fh }),
|
|
7952
7952
|
/* @__PURE__ */ a(
|
|
7953
7953
|
Ii,
|
|
7954
7954
|
{
|
|
@@ -7996,13 +7996,13 @@ ${r.join(`
|
|
|
7996
7996
|
/* @__PURE__ */ a(
|
|
7997
7997
|
Bx,
|
|
7998
7998
|
{
|
|
7999
|
-
open:
|
|
8000
|
-
steps:
|
|
7999
|
+
open: Jh,
|
|
8000
|
+
steps: Yh,
|
|
8001
8001
|
onClose: () => or(!1),
|
|
8002
8002
|
record: !u && f != null ? { collection: i, itemId: String(f) } : null
|
|
8003
8003
|
}
|
|
8004
8004
|
),
|
|
8005
|
-
|
|
8005
|
+
Ef && /* @__PURE__ */ a(
|
|
8006
8006
|
Ii,
|
|
8007
8007
|
{
|
|
8008
8008
|
open: !0,
|
|
@@ -8013,7 +8013,7 @@ ${r.join(`
|
|
|
8013
8013
|
/* @__PURE__ */ a(Ei, { children: /* @__PURE__ */ a(Li, { className: "text-[15px]", children: "Some copied line values will change" }) }),
|
|
8014
8014
|
/* @__PURE__ */ _(Mi, { children: [
|
|
8015
8015
|
/* @__PURE__ */ a("p", { className: "text-[13px] text-slate-600 dark:text-slate-300", children: "These values were copied from the original record, but the new record will store them differently — a rule or your access sets them." }),
|
|
8016
|
-
/* @__PURE__ */ a("ul", { className: "mt-3 space-y-1.5 text-[12.5px]", children: (
|
|
8016
|
+
/* @__PURE__ */ a("ul", { className: "mt-3 space-y-1.5 text-[12.5px]", children: (Ef ?? []).map((e) => {
|
|
8017
8017
|
var r;
|
|
8018
8018
|
const t = ((r = Te.get(e.key)) == null ? void 0 : r[e.index]) ?? {}, n = fv(t, e.index);
|
|
8019
8019
|
return /* @__PURE__ */ _(
|
|
@@ -8114,7 +8114,7 @@ ${r.join(`
|
|
|
8114
8114
|
fields: O ?? []
|
|
8115
8115
|
}
|
|
8116
8116
|
),
|
|
8117
|
-
ct && /* @__PURE__ */ a(
|
|
8117
|
+
ct && /* @__PURE__ */ a(mp, { issues: ct.result.issues })
|
|
8118
8118
|
] }),
|
|
8119
8119
|
/* @__PURE__ */ _(ya, { children: [
|
|
8120
8120
|
/* @__PURE__ */ a(
|
|
@@ -8130,7 +8130,7 @@ ${r.join(`
|
|
|
8130
8130
|
Ht,
|
|
8131
8131
|
{
|
|
8132
8132
|
onClick: async () => {
|
|
8133
|
-
ct && (Oc(!0), await
|
|
8133
|
+
ct && (Oc(!0), await rg(
|
|
8134
8134
|
ct.diff,
|
|
8135
8135
|
ct.result,
|
|
8136
8136
|
ct.template,
|
|
@@ -8159,16 +8159,16 @@ ${r.join(`
|
|
|
8159
8159
|
className: Oe(
|
|
8160
8160
|
"shrink-0 border-b border-slate-200 dark:border-border bg-white dark:bg-card px-8 flex items-center gap-x-3 gap-y-2 max-md:[&[data-nvr-header-row]]:flex-wrap [&[data-nvr-header-wrap]]:flex-wrap max-md:[&[data-nvr-header-row]]:px-4 transition-[padding] duration-200",
|
|
8161
8161
|
mo ? "py-1.5" : "py-3.5",
|
|
8162
|
-
|
|
8162
|
+
ah
|
|
8163
8163
|
),
|
|
8164
8164
|
"data-nvr-header-row": !0,
|
|
8165
8165
|
"data-nvr-condensed": mo || void 0,
|
|
8166
8166
|
children: [
|
|
8167
|
-
|
|
8167
|
+
Df && /* @__PURE__ */ a(
|
|
8168
8168
|
"button",
|
|
8169
8169
|
{
|
|
8170
8170
|
type: "button",
|
|
8171
|
-
onClick:
|
|
8171
|
+
onClick: Df,
|
|
8172
8172
|
"aria-label": "Back",
|
|
8173
8173
|
"data-nvr-header-back": !0,
|
|
8174
8174
|
className: "group/back -mt-1.5 shrink-0 self-start flex h-8 w-8 items-center justify-center rounded-lg text-slate-500 transition-colors hover:bg-slate-100 hover:text-slate-900 dark:text-slate-400 dark:hover:bg-white/[0.06] dark:hover:text-slate-100",
|
|
@@ -8244,7 +8244,7 @@ ${r.join(`
|
|
|
8244
8244
|
className: qt ? "-ml-1.5" : ""
|
|
8245
8245
|
}
|
|
8246
8246
|
),
|
|
8247
|
-
!u && f && !xr &&
|
|
8247
|
+
!u && f && !xr && hg && /* @__PURE__ */ a(
|
|
8248
8248
|
Jb,
|
|
8249
8249
|
{
|
|
8250
8250
|
collection: i,
|
|
@@ -8261,14 +8261,14 @@ ${r.join(`
|
|
|
8261
8261
|
),
|
|
8262
8262
|
!u && !xr && /* @__PURE__ */ a(tx, { tracker: hl })
|
|
8263
8263
|
] }),
|
|
8264
|
-
|
|
8264
|
+
Rf && /* @__PURE__ */ _(
|
|
8265
8265
|
"p",
|
|
8266
8266
|
{
|
|
8267
8267
|
className: "mt-0.5 flex flex-wrap items-center gap-1 text-[10.5px] text-slate-400 dark:text-slate-500",
|
|
8268
8268
|
"data-tip": ut ? Di(ut.timestamp) : void 0,
|
|
8269
8269
|
"data-last-touch": !0,
|
|
8270
8270
|
children: [
|
|
8271
|
-
|
|
8271
|
+
Rf,
|
|
8272
8272
|
(he == null ? void 0 : he.hasRequired) && /* @__PURE__ */ a(
|
|
8273
8273
|
"span",
|
|
8274
8274
|
{
|
|
@@ -8352,7 +8352,7 @@ ${r.join(`
|
|
|
8352
8352
|
/* @__PURE__ */ a(
|
|
8353
8353
|
"div",
|
|
8354
8354
|
{
|
|
8355
|
-
"data-tip":
|
|
8355
|
+
"data-tip": Of,
|
|
8356
8356
|
className: "max-w-[350px] overflow-hidden text-ellipsis whitespace-nowrap",
|
|
8357
8357
|
children: Yo.map((e, t) => {
|
|
8358
8358
|
const n = e.weight === "bold" ? "font-bold" : e.weight === "semibold" ? "font-semibold" : e.weight === "medium" ? "font-medium" : "font-normal", r = e.color === "cyan" ? "text-nvr-cyan" : e.color === "blue" ? "text-blue-600 dark:text-blue-400" : e.color === "green" ? "text-emerald-600 dark:text-emerald-400" : e.color === "amber" ? "text-amber-600 dark:text-amber-400" : e.color === "red" ? "text-red-600 dark:text-red-400" : e.color === "purple" ? "text-purple-600 dark:text-purple-400" : "text-slate-500 dark:text-slate-400", s = e.display_as === "pill", o = e.display_as === "tag", l = (jt == null ? void 0 : jt.separator) ?? " | ";
|
|
@@ -8386,7 +8386,7 @@ ${r.join(`
|
|
|
8386
8386
|
"aria-label": "Copy subtitle",
|
|
8387
8387
|
className: "cursor-pointer opacity-0 transition-opacity group-hover/subtitle:opacity-100",
|
|
8388
8388
|
onClick: () => {
|
|
8389
|
-
navigator.clipboard.writeText(
|
|
8389
|
+
navigator.clipboard.writeText(Of).catch(() => {
|
|
8390
8390
|
}), ar("__subtitle__"), setTimeout(
|
|
8391
8391
|
() => ar(
|
|
8392
8392
|
(e) => e === "__subtitle__" ? null : e
|
|
@@ -8406,7 +8406,7 @@ ${r.join(`
|
|
|
8406
8406
|
$e,
|
|
8407
8407
|
/* @__PURE__ */ _(Ev, { children: [
|
|
8408
8408
|
u && /* @__PURE__ */ a(
|
|
8409
|
-
|
|
8409
|
+
fp,
|
|
8410
8410
|
{
|
|
8411
8411
|
collection: i,
|
|
8412
8412
|
onParsed: ms
|
|
@@ -8416,18 +8416,18 @@ ${r.join(`
|
|
|
8416
8416
|
Mb,
|
|
8417
8417
|
{
|
|
8418
8418
|
collection: i,
|
|
8419
|
-
onApply:
|
|
8420
|
-
initialProposalId:
|
|
8421
|
-
onProposalConsumed:
|
|
8419
|
+
onApply: ng,
|
|
8420
|
+
initialProposalId: uh ?? null,
|
|
8421
|
+
onProposalConsumed: fh
|
|
8422
8422
|
}
|
|
8423
8423
|
),
|
|
8424
8424
|
u && Kc.length > 0 && !zn && /* @__PURE__ */ _(
|
|
8425
|
-
|
|
8425
|
+
th,
|
|
8426
8426
|
{
|
|
8427
8427
|
open: Dc,
|
|
8428
8428
|
onOpenChange: Bc,
|
|
8429
8429
|
children: [
|
|
8430
|
-
/* @__PURE__ */ a(
|
|
8430
|
+
/* @__PURE__ */ a(nh, { asChild: !0, children: /* @__PURE__ */ _(
|
|
8431
8431
|
"button",
|
|
8432
8432
|
{
|
|
8433
8433
|
type: "button",
|
|
@@ -8444,7 +8444,7 @@ ${r.join(`
|
|
|
8444
8444
|
}
|
|
8445
8445
|
) }),
|
|
8446
8446
|
/* @__PURE__ */ a(
|
|
8447
|
-
|
|
8447
|
+
rh,
|
|
8448
8448
|
{
|
|
8449
8449
|
align: "end",
|
|
8450
8450
|
sideOffset: 6,
|
|
@@ -8461,7 +8461,7 @@ ${r.join(`
|
|
|
8461
8461
|
draft: M,
|
|
8462
8462
|
getM2M: ti,
|
|
8463
8463
|
onChange: dn,
|
|
8464
|
-
onM2MChange:
|
|
8464
|
+
onM2MChange: lg,
|
|
8465
8465
|
fieldLabels: ni,
|
|
8466
8466
|
fieldOptionFilters: tl,
|
|
8467
8467
|
onFinish: () => Bc(!1),
|
|
@@ -8516,7 +8516,7 @@ ${r.join(`
|
|
|
8516
8516
|
xt ? "text-slate-600 hover:bg-muted dark:text-slate-300" : "bg-nvr-cyan text-white shadow-sm"
|
|
8517
8517
|
),
|
|
8518
8518
|
children: rt && !Bn ? /* @__PURE__ */ _(It, { children: [
|
|
8519
|
-
/* @__PURE__ */ a(
|
|
8519
|
+
/* @__PURE__ */ a(Hm, { className: "h-3.5 w-3.5", strokeWidth: 2 }),
|
|
8520
8520
|
"Form"
|
|
8521
8521
|
] }) : /* @__PURE__ */ _(It, { children: [
|
|
8522
8522
|
/* @__PURE__ */ a(
|
|
@@ -8537,26 +8537,26 @@ ${r.join(`
|
|
|
8537
8537
|
si && !Wn && (ml || pl) && /* @__PURE__ */ a(
|
|
8538
8538
|
Nx,
|
|
8539
8539
|
{
|
|
8540
|
-
note:
|
|
8541
|
-
onSave:
|
|
8540
|
+
note: Ng,
|
|
8541
|
+
onSave: Cg,
|
|
8542
8542
|
waiting: su,
|
|
8543
|
-
onRelease:
|
|
8544
|
-
releasing:
|
|
8543
|
+
onRelease: $g,
|
|
8544
|
+
releasing: Rg,
|
|
8545
8545
|
released: pl && !ml,
|
|
8546
8546
|
onRelock: iu
|
|
8547
8547
|
}
|
|
8548
8548
|
),
|
|
8549
8549
|
/* @__PURE__ */ a(
|
|
8550
|
-
|
|
8550
|
+
$p,
|
|
8551
8551
|
{
|
|
8552
8552
|
compact: !0,
|
|
8553
|
-
fields:
|
|
8553
|
+
fields: Gu,
|
|
8554
8554
|
onJump: Rn
|
|
8555
8555
|
}
|
|
8556
8556
|
),
|
|
8557
8557
|
Eb(
|
|
8558
8558
|
f,
|
|
8559
|
-
|
|
8559
|
+
dh
|
|
8560
8560
|
) && /* @__PURE__ */ a(
|
|
8561
8561
|
Lb,
|
|
8562
8562
|
{
|
|
@@ -8586,7 +8586,7 @@ ${r.join(`
|
|
|
8586
8586
|
"aria-label": "Relationships",
|
|
8587
8587
|
"data-record-graph-open": !0,
|
|
8588
8588
|
className: "inline-flex h-8 w-8 items-center justify-center transition-colors hover:bg-accent hover:text-accent-foreground",
|
|
8589
|
-
children: /* @__PURE__ */ a(
|
|
8589
|
+
children: /* @__PURE__ */ a(Gm, { className: "h-4 w-4" })
|
|
8590
8590
|
}
|
|
8591
8591
|
),
|
|
8592
8592
|
!Qy && /* @__PURE__ */ a(
|
|
@@ -8601,13 +8601,13 @@ ${r.join(`
|
|
|
8601
8601
|
children: /* @__PURE__ */ a(y_, { className: "h-4 w-4" })
|
|
8602
8602
|
}
|
|
8603
8603
|
),
|
|
8604
|
-
wt && ((
|
|
8604
|
+
wt && ((jm = v == null ? void 0 : v.browser_config) == null ? void 0 : jm.copy_as) !== !1 && /* @__PURE__ */ a(
|
|
8605
8605
|
qb,
|
|
8606
8606
|
{
|
|
8607
8607
|
compact: !0,
|
|
8608
8608
|
collection: i,
|
|
8609
8609
|
itemId: String(f),
|
|
8610
|
-
fields:
|
|
8610
|
+
fields: Vg
|
|
8611
8611
|
}
|
|
8612
8612
|
),
|
|
8613
8613
|
/* @__PURE__ */ a(
|
|
@@ -8647,7 +8647,7 @@ ${r.join(`
|
|
|
8647
8647
|
itemDraft: M
|
|
8648
8648
|
}
|
|
8649
8649
|
),
|
|
8650
|
-
|
|
8650
|
+
Du && /* @__PURE__ */ a(
|
|
8651
8651
|
jx,
|
|
8652
8652
|
{
|
|
8653
8653
|
compact: !0,
|
|
@@ -8659,15 +8659,15 @@ ${r.join(`
|
|
|
8659
8659
|
}
|
|
8660
8660
|
)
|
|
8661
8661
|
] }) : /* @__PURE__ */ a(
|
|
8662
|
-
|
|
8662
|
+
$p,
|
|
8663
8663
|
{
|
|
8664
|
-
fields:
|
|
8664
|
+
fields: Gu,
|
|
8665
8665
|
onJump: Rn
|
|
8666
8666
|
}
|
|
8667
8667
|
),
|
|
8668
8668
|
!u && f && /* @__PURE__ */ _(Mv, { children: [
|
|
8669
8669
|
/* @__PURE__ */ a(
|
|
8670
|
-
|
|
8670
|
+
fp,
|
|
8671
8671
|
{
|
|
8672
8672
|
collection: i,
|
|
8673
8673
|
templateFilter: (e) => db(e, Lo, wt),
|
|
@@ -8678,24 +8678,24 @@ ${r.join(`
|
|
|
8678
8678
|
onParsed: Fc
|
|
8679
8679
|
}
|
|
8680
8680
|
),
|
|
8681
|
-
|
|
8681
|
+
bh.map((e) => /* @__PURE__ */ _(
|
|
8682
8682
|
Ht,
|
|
8683
8683
|
{
|
|
8684
8684
|
type: "button",
|
|
8685
8685
|
variant: "outline",
|
|
8686
8686
|
size: "sm",
|
|
8687
8687
|
disabled: Vd === e.id,
|
|
8688
|
-
onClick: () => void
|
|
8688
|
+
onClick: () => void xh(e.id),
|
|
8689
8689
|
className: "gap-1.5",
|
|
8690
8690
|
children: [
|
|
8691
|
-
Vd === e.id ? /* @__PURE__ */ a(Ps, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ a(
|
|
8691
|
+
Vd === e.id ? /* @__PURE__ */ a(Ps, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ a(Jm, { className: "h-3.5 w-3.5" }),
|
|
8692
8692
|
e.pdf_button_label || "Export PDF"
|
|
8693
8693
|
]
|
|
8694
8694
|
},
|
|
8695
8695
|
e.id
|
|
8696
8696
|
)),
|
|
8697
8697
|
Qr,
|
|
8698
|
-
!!((
|
|
8698
|
+
!!((Am = x == null ? void 0 : x.layout) != null && Am.dossier_enabled) && /* @__PURE__ */ _(
|
|
8699
8699
|
"button",
|
|
8700
8700
|
{
|
|
8701
8701
|
type: "button",
|
|
@@ -8722,12 +8722,12 @@ ${r.join(`
|
|
|
8722
8722
|
},
|
|
8723
8723
|
className: "inline-flex h-9 items-center gap-1.5 rounded-md border border-input bg-background px-3 text-sm font-medium shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground",
|
|
8724
8724
|
children: [
|
|
8725
|
-
/* @__PURE__ */ a(
|
|
8726
|
-
((
|
|
8725
|
+
/* @__PURE__ */ a(Jm, { className: "h-3.5 w-3.5" }),
|
|
8726
|
+
((Tm = x == null ? void 0 : x.layout) == null ? void 0 : Tm.dossier_label) || "Dossier"
|
|
8727
8727
|
]
|
|
8728
8728
|
}
|
|
8729
8729
|
),
|
|
8730
|
-
|
|
8730
|
+
Hu.disablePickers && /* @__PURE__ */ a(
|
|
8731
8731
|
Yw,
|
|
8732
8732
|
{
|
|
8733
8733
|
collection: i,
|
|
@@ -8735,7 +8735,7 @@ ${r.join(`
|
|
|
8735
8735
|
layoutSlug: kn ?? null
|
|
8736
8736
|
}
|
|
8737
8737
|
),
|
|
8738
|
-
|
|
8738
|
+
Hu.schedule && /* @__PURE__ */ a(
|
|
8739
8739
|
Zw,
|
|
8740
8740
|
{
|
|
8741
8741
|
collection: i,
|
|
@@ -8766,7 +8766,7 @@ ${r.join(`
|
|
|
8766
8766
|
"last_state_change"
|
|
8767
8767
|
]), t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set([
|
|
8768
8768
|
...e,
|
|
8769
|
-
...
|
|
8769
|
+
...np(
|
|
8770
8770
|
await fd(j, H, i)
|
|
8771
8771
|
)
|
|
8772
8772
|
]);
|
|
@@ -8815,7 +8815,7 @@ ${r.join(`
|
|
|
8815
8815
|
}).then(
|
|
8816
8816
|
(g) => [
|
|
8817
8817
|
m.stagingKey,
|
|
8818
|
-
|
|
8818
|
+
ih(
|
|
8819
8819
|
g,
|
|
8820
8820
|
m.junctionField,
|
|
8821
8821
|
et.get(m.stagingKey),
|
|
@@ -8950,7 +8950,7 @@ ${r.join(`
|
|
|
8950
8950
|
title: "Save this record as a reusable pre-fill template — plain field values only (same exclusions as Duplicate)",
|
|
8951
8951
|
"data-save-as-template": !0,
|
|
8952
8952
|
onClick: () => {
|
|
8953
|
-
|
|
8953
|
+
vf(""), kf(!1), _i(!0);
|
|
8954
8954
|
},
|
|
8955
8955
|
className: "inline-flex h-9 items-center gap-1.5 rounded-md border border-input bg-background px-3 text-sm font-medium shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground",
|
|
8956
8956
|
children: [
|
|
@@ -8982,7 +8982,7 @@ ${r.join(`
|
|
|
8982
8982
|
{
|
|
8983
8983
|
tracker: hl,
|
|
8984
8984
|
onOpen: (e, t) => {
|
|
8985
|
-
|
|
8985
|
+
Ag(t), ou(e);
|
|
8986
8986
|
}
|
|
8987
8987
|
}
|
|
8988
8988
|
),
|
|
@@ -9000,7 +9000,7 @@ ${r.join(`
|
|
|
9000
9000
|
) ?? document.querySelector(
|
|
9001
9001
|
'[data-nvr-header-menu-btn][aria-expanded="true"]'
|
|
9002
9002
|
) ?? e.currentTarget
|
|
9003
|
-
),
|
|
9003
|
+
), bf(!0);
|
|
9004
9004
|
},
|
|
9005
9005
|
className: "inline-flex h-9 items-center gap-1.5 rounded-md border border-input bg-background px-3 text-sm font-medium shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground",
|
|
9006
9006
|
children: [
|
|
@@ -9039,7 +9039,7 @@ ${r.join(`
|
|
|
9039
9039
|
className: "gap-1.5",
|
|
9040
9040
|
"data-live-trace-open": !0,
|
|
9041
9041
|
children: [
|
|
9042
|
-
/* @__PURE__ */ a(
|
|
9042
|
+
/* @__PURE__ */ a(Gm, { className: "h-3.5 w-3.5" }),
|
|
9043
9043
|
"Why didn't this update?"
|
|
9044
9044
|
]
|
|
9045
9045
|
}
|
|
@@ -9090,7 +9090,7 @@ ${r.join(`
|
|
|
9090
9090
|
{
|
|
9091
9091
|
collection: i,
|
|
9092
9092
|
itemId: f,
|
|
9093
|
-
fields:
|
|
9093
|
+
fields: Jg,
|
|
9094
9094
|
relations: D,
|
|
9095
9095
|
currentValues: we ?? {},
|
|
9096
9096
|
recordLabel: qt,
|
|
@@ -9103,15 +9103,15 @@ ${r.join(`
|
|
|
9103
9103
|
{
|
|
9104
9104
|
collection: i,
|
|
9105
9105
|
itemId: String(f),
|
|
9106
|
-
onMergeWith: () =>
|
|
9106
|
+
onMergeWith: () => _f(!0),
|
|
9107
9107
|
onUndone: () => void H.invalidateQueries({
|
|
9108
9108
|
queryKey: ["item", i]
|
|
9109
9109
|
})
|
|
9110
9110
|
}
|
|
9111
9111
|
),
|
|
9112
9112
|
tr,
|
|
9113
|
-
|
|
9114
|
-
|
|
9113
|
+
cm && /* @__PURE__ */ a("div", { "data-nvr-menu-divider": !0 }),
|
|
9114
|
+
cm && (Gy ? /* @__PURE__ */ _(It, { children: [
|
|
9115
9115
|
/* @__PURE__ */ a("span", { className: "text-sm text-muted-foreground", children: "Delete?" }),
|
|
9116
9116
|
/* @__PURE__ */ a(
|
|
9117
9117
|
Ht,
|
|
@@ -9131,7 +9131,7 @@ ${r.join(`
|
|
|
9131
9131
|
type: "button",
|
|
9132
9132
|
size: "sm",
|
|
9133
9133
|
variant: "outline",
|
|
9134
|
-
onClick: () =>
|
|
9134
|
+
onClick: () => Qf(!1),
|
|
9135
9135
|
children: "Cancel"
|
|
9136
9136
|
}
|
|
9137
9137
|
)
|
|
@@ -9144,7 +9144,7 @@ ${r.join(`
|
|
|
9144
9144
|
className: "gap-1.5 text-destructive hover:text-destructive",
|
|
9145
9145
|
"aria-label": "Delete this record",
|
|
9146
9146
|
"data-tip": "Delete this record (asks to confirm)",
|
|
9147
|
-
onClick: () =>
|
|
9147
|
+
onClick: () => Qf(!0),
|
|
9148
9148
|
children: [
|
|
9149
9149
|
/* @__PURE__ */ a(k_, { className: "h-3.5 w-3.5" }),
|
|
9150
9150
|
"Delete"
|
|
@@ -9178,7 +9178,7 @@ ${r.join(`
|
|
|
9178
9178
|
{
|
|
9179
9179
|
autoFocus: !0,
|
|
9180
9180
|
value: bi,
|
|
9181
|
-
onChange: (e) =>
|
|
9181
|
+
onChange: (e) => vf(e.target.value),
|
|
9182
9182
|
onKeyDown: (e) => {
|
|
9183
9183
|
var t;
|
|
9184
9184
|
e.key === "Enter" && bi.trim() && ((t = document.querySelector(
|
|
@@ -9194,8 +9194,8 @@ ${r.join(`
|
|
|
9194
9194
|
"input",
|
|
9195
9195
|
{
|
|
9196
9196
|
type: "checkbox",
|
|
9197
|
-
checked:
|
|
9198
|
-
onChange: (e) =>
|
|
9197
|
+
checked: wf,
|
|
9198
|
+
onChange: (e) => kf(e.target.checked),
|
|
9199
9199
|
className: "h-3.5 w-3.5"
|
|
9200
9200
|
}
|
|
9201
9201
|
),
|
|
@@ -9216,7 +9216,7 @@ ${r.join(`
|
|
|
9216
9216
|
{
|
|
9217
9217
|
type: "button",
|
|
9218
9218
|
"data-template-save-btn": !0,
|
|
9219
|
-
disabled: !bi.trim() ||
|
|
9219
|
+
disabled: !bi.trim() || xf,
|
|
9220
9220
|
onClick: async () => {
|
|
9221
9221
|
const e = /* @__PURE__ */ new Set([
|
|
9222
9222
|
"id",
|
|
@@ -9230,7 +9230,7 @@ ${r.join(`
|
|
|
9230
9230
|
"changed",
|
|
9231
9231
|
"creator",
|
|
9232
9232
|
"last_state_change"
|
|
9233
|
-
]), t =
|
|
9233
|
+
]), t = np(
|
|
9234
9234
|
await fd(
|
|
9235
9235
|
j,
|
|
9236
9236
|
H,
|
|
@@ -9259,14 +9259,14 @@ ${r.join(`
|
|
|
9259
9259
|
);
|
|
9260
9260
|
return;
|
|
9261
9261
|
}
|
|
9262
|
-
|
|
9262
|
+
Sf(!0);
|
|
9263
9263
|
try {
|
|
9264
9264
|
await j.request(
|
|
9265
9265
|
mn("/record-templates", {
|
|
9266
9266
|
collection: i,
|
|
9267
9267
|
name: bi.trim(),
|
|
9268
9268
|
data: n,
|
|
9269
|
-
is_shared:
|
|
9269
|
+
is_shared: wf
|
|
9270
9270
|
})
|
|
9271
9271
|
), _e.success(
|
|
9272
9272
|
`Template "${bi.trim()}" saved`
|
|
@@ -9274,11 +9274,11 @@ ${r.join(`
|
|
|
9274
9274
|
} catch {
|
|
9275
9275
|
_e.error("Failed to save template");
|
|
9276
9276
|
} finally {
|
|
9277
|
-
|
|
9277
|
+
Sf(!1);
|
|
9278
9278
|
}
|
|
9279
9279
|
},
|
|
9280
9280
|
className: "h-8 rounded-md bg-nvr-cyan px-4 text-[12.5px] font-semibold text-white disabled:opacity-50",
|
|
9281
|
-
children:
|
|
9281
|
+
children: xf ? "Saving…" : "Save template"
|
|
9282
9282
|
}
|
|
9283
9283
|
)
|
|
9284
9284
|
] })
|
|
@@ -9292,7 +9292,7 @@ ${r.join(`
|
|
|
9292
9292
|
!u && /* @__PURE__ */ a(
|
|
9293
9293
|
ek,
|
|
9294
9294
|
{
|
|
9295
|
-
actions:
|
|
9295
|
+
actions: zg,
|
|
9296
9296
|
onPick: Au
|
|
9297
9297
|
}
|
|
9298
9298
|
),
|
|
@@ -9302,7 +9302,7 @@ ${r.join(`
|
|
|
9302
9302
|
type: "button",
|
|
9303
9303
|
"data-tip": "Ask the administrators to change something on this record",
|
|
9304
9304
|
"data-request-change": !0,
|
|
9305
|
-
onClick: () =>
|
|
9305
|
+
onClick: () => gf(!0),
|
|
9306
9306
|
className: "inline-flex h-9 shrink-0 items-center gap-1.5 rounded-md border border-input bg-background px-3 text-sm font-medium shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground",
|
|
9307
9307
|
children: [
|
|
9308
9308
|
/* @__PURE__ */ a(x_, { className: "h-3.5 w-3.5" }),
|
|
@@ -9360,7 +9360,7 @@ ${r.join(`
|
|
|
9360
9360
|
onJump: (e) => void Rn(e)
|
|
9361
9361
|
}
|
|
9362
9362
|
),
|
|
9363
|
-
!!((
|
|
9363
|
+
!!((qm = x == null ? void 0 : x.layout) != null && qm.changes_tray) && !xt && /* @__PURE__ */ a(
|
|
9364
9364
|
Zb,
|
|
9365
9365
|
{
|
|
9366
9366
|
items: Hn,
|
|
@@ -9384,7 +9384,7 @@ ${r.join(`
|
|
|
9384
9384
|
{
|
|
9385
9385
|
className: Oe(
|
|
9386
9386
|
"nvr-pop absolute inset-0.5 rounded-full bg-amber-400 ring-2 ring-white dark:ring-card",
|
|
9387
|
-
|
|
9387
|
+
Qh && "nvr-idle-breathe"
|
|
9388
9388
|
)
|
|
9389
9389
|
}
|
|
9390
9390
|
)
|
|
@@ -9393,7 +9393,7 @@ ${r.join(`
|
|
|
9393
9393
|
/* @__PURE__ */ a(
|
|
9394
9394
|
zx,
|
|
9395
9395
|
{
|
|
9396
|
-
open:
|
|
9396
|
+
open: Ph && Xe,
|
|
9397
9397
|
onClose: () => pc(!1),
|
|
9398
9398
|
collection: i,
|
|
9399
9399
|
relations: D,
|
|
@@ -9431,7 +9431,7 @@ ${r.join(`
|
|
|
9431
9431
|
Da && "bg-emerald-500 hover:bg-emerald-500 text-white"
|
|
9432
9432
|
),
|
|
9433
9433
|
children: [
|
|
9434
|
-
At.isPending ? /* @__PURE__ */ a(Ps, { className: "h-3.5 w-3.5 animate-spin" }) : Da ? /* @__PURE__ */ a(vr, { className: "nvr-pop h-3.5 w-3.5" }) : /* @__PURE__ */ a(
|
|
9434
|
+
At.isPending ? /* @__PURE__ */ a(Ps, { className: "h-3.5 w-3.5 animate-spin" }) : Da ? /* @__PURE__ */ a(vr, { className: "nvr-pop h-3.5 w-3.5" }) : /* @__PURE__ */ a(Ym, { className: "h-3.5 w-3.5" }),
|
|
9435
9435
|
Da ? "Saved" : u ? "Create" : "Save"
|
|
9436
9436
|
]
|
|
9437
9437
|
}
|
|
@@ -9458,14 +9458,14 @@ ${r.join(`
|
|
|
9458
9458
|
)
|
|
9459
9459
|
}
|
|
9460
9460
|
),
|
|
9461
|
-
/* @__PURE__ */ a("span", { className: "max-w-[160px] truncate", children: tt ? ((
|
|
9461
|
+
/* @__PURE__ */ a("span", { className: "max-w-[160px] truncate", children: tt ? ((Im = Mt.find(
|
|
9462
9462
|
(e) => e.id === Be
|
|
9463
|
-
)) == null ? void 0 :
|
|
9463
|
+
)) == null ? void 0 : Im.title) ?? "Addendum" : "Viewing: Current record" }),
|
|
9464
9464
|
/* @__PURE__ */ a($i, { className: "h-3 w-3 opacity-60" })
|
|
9465
9465
|
]
|
|
9466
9466
|
}
|
|
9467
9467
|
),
|
|
9468
|
-
|
|
9468
|
+
kh && /* @__PURE__ */ _("div", { className: "absolute right-0 top-full z-30 mt-1 max-h-[320px] min-w-[240px] overflow-y-auto rounded-md border border-slate-200 bg-white py-0.5 shadow-lg dark:border-border dark:bg-card", children: [
|
|
9469
9469
|
/* @__PURE__ */ _(
|
|
9470
9470
|
"button",
|
|
9471
9471
|
{
|
|
@@ -9528,7 +9528,7 @@ ${r.join(`
|
|
|
9528
9528
|
] })
|
|
9529
9529
|
] }),
|
|
9530
9530
|
!u && pt && (!_n || tt) && /* @__PURE__ */ a(
|
|
9531
|
-
|
|
9531
|
+
Ip,
|
|
9532
9532
|
{
|
|
9533
9533
|
wrap: !1,
|
|
9534
9534
|
collection: St,
|
|
@@ -9546,7 +9546,7 @@ ${r.join(`
|
|
|
9546
9546
|
!u && f && /* @__PURE__ */ a(
|
|
9547
9547
|
tk,
|
|
9548
9548
|
{
|
|
9549
|
-
action:
|
|
9549
|
+
action: Qg,
|
|
9550
9550
|
collection: i,
|
|
9551
9551
|
itemId: String(f),
|
|
9552
9552
|
onClose: () => Au(null)
|
|
@@ -9594,7 +9594,7 @@ ${r.join(`
|
|
|
9594
9594
|
}), Na.current = t.theirs.length;
|
|
9595
9595
|
for (const n of ze.conflicts)
|
|
9596
9596
|
Xr.current.delete(n.field), Cr.current.set(n.field, n.current_value);
|
|
9597
|
-
ze.clientFound && Ws.current || (Pn.current = ze.latest > 0 ? ze.latest : null, Ws.current = !1), ns(null),
|
|
9597
|
+
ze.clientFound && Ws.current || (Pn.current = ze.latest > 0 ? ze.latest : null, Ws.current = !1), ns(null), $f(), setTimeout(() => At.mutate(), 0);
|
|
9598
9598
|
}
|
|
9599
9599
|
}
|
|
9600
9600
|
),
|
|
@@ -9625,25 +9625,25 @@ ${r.join(`
|
|
|
9625
9625
|
}
|
|
9626
9626
|
}
|
|
9627
9627
|
),
|
|
9628
|
-
u &&
|
|
9628
|
+
u && Yf && /* @__PURE__ */ a(
|
|
9629
9629
|
Ek,
|
|
9630
9630
|
{
|
|
9631
9631
|
collection: i,
|
|
9632
|
-
ids:
|
|
9632
|
+
ids: Yf.matches.slice(0, 4).map((e) => e.id),
|
|
9633
9633
|
draft: { values: M },
|
|
9634
9634
|
open: !0,
|
|
9635
9635
|
onOpenChange: (e) => {
|
|
9636
|
-
e ||
|
|
9636
|
+
e || Zf(null);
|
|
9637
9637
|
}
|
|
9638
9638
|
}
|
|
9639
9639
|
),
|
|
9640
|
-
!u && f &&
|
|
9640
|
+
!u && f && yf && /* @__PURE__ */ a(
|
|
9641
9641
|
Kk,
|
|
9642
9642
|
{
|
|
9643
9643
|
collection: i,
|
|
9644
9644
|
itemId: String(f),
|
|
9645
|
-
open:
|
|
9646
|
-
onOpenChange:
|
|
9645
|
+
open: yf,
|
|
9646
|
+
onOpenChange: _f,
|
|
9647
9647
|
onMerged: () => void H.invalidateQueries({
|
|
9648
9648
|
queryKey: ["item", i]
|
|
9649
9649
|
})
|
|
@@ -9653,7 +9653,7 @@ ${r.join(`
|
|
|
9653
9653
|
Zk,
|
|
9654
9654
|
{
|
|
9655
9655
|
open: xy,
|
|
9656
|
-
onOpenChange:
|
|
9656
|
+
onOpenChange: gf,
|
|
9657
9657
|
collection: i,
|
|
9658
9658
|
item: String(f),
|
|
9659
9659
|
recordLabel: qt ? String(qt) : null,
|
|
@@ -9666,8 +9666,8 @@ ${r.join(`
|
|
|
9666
9666
|
tracker: hl,
|
|
9667
9667
|
recordId: `${i}:${f}`,
|
|
9668
9668
|
recordLabel: qt ? String(qt) : null,
|
|
9669
|
-
mode:
|
|
9670
|
-
anchor:
|
|
9669
|
+
mode: Fg,
|
|
9670
|
+
anchor: jg,
|
|
9671
9671
|
onOpenChange: (e) => {
|
|
9672
9672
|
e || ou(null);
|
|
9673
9673
|
}
|
|
@@ -9677,7 +9677,7 @@ ${r.join(`
|
|
|
9677
9677
|
Yk,
|
|
9678
9678
|
{
|
|
9679
9679
|
open: Sy,
|
|
9680
|
-
onOpenChange:
|
|
9680
|
+
onOpenChange: bf,
|
|
9681
9681
|
anchor: Ny,
|
|
9682
9682
|
collection: i,
|
|
9683
9683
|
item: String(f),
|
|
@@ -9699,7 +9699,7 @@ ${r.join(`
|
|
|
9699
9699
|
{
|
|
9700
9700
|
collection: i,
|
|
9701
9701
|
itemId: String(f),
|
|
9702
|
-
open:
|
|
9702
|
+
open: Ih,
|
|
9703
9703
|
onOpenChange: dc
|
|
9704
9704
|
}
|
|
9705
9705
|
),
|
|
@@ -9708,7 +9708,7 @@ ${r.join(`
|
|
|
9708
9708
|
{
|
|
9709
9709
|
collection: i,
|
|
9710
9710
|
itemId: String(f),
|
|
9711
|
-
open:
|
|
9711
|
+
open: Ah,
|
|
9712
9712
|
onClose: () => ac(!1),
|
|
9713
9713
|
onSaved: () => {
|
|
9714
9714
|
H.invalidateQueries({
|
|
@@ -9722,11 +9722,11 @@ ${r.join(`
|
|
|
9722
9722
|
{
|
|
9723
9723
|
collection: i,
|
|
9724
9724
|
itemId: String(f),
|
|
9725
|
-
open:
|
|
9725
|
+
open: Th,
|
|
9726
9726
|
onClose: () => lc(!1)
|
|
9727
9727
|
}
|
|
9728
9728
|
),
|
|
9729
|
-
wt && !u && f &&
|
|
9729
|
+
wt && !u && f && qh && /* @__PURE__ */ a(
|
|
9730
9730
|
Ii,
|
|
9731
9731
|
{
|
|
9732
9732
|
open: !0,
|
|
@@ -9783,7 +9783,7 @@ ${r.join(`
|
|
|
9783
9783
|
className: `${b0} ${mo ? "hidden" : "block"}`,
|
|
9784
9784
|
"data-header-dense": Wa ? "" : void 0,
|
|
9785
9785
|
children: /* @__PURE__ */ _("div", { className: v0, children: [
|
|
9786
|
-
/* @__PURE__ */ a("div", { className: w0, ref:
|
|
9786
|
+
/* @__PURE__ */ a("div", { className: w0, ref: Gh, children: (() => {
|
|
9787
9787
|
const e = [
|
|
9788
9788
|
...Jo.map((n) => ({
|
|
9789
9789
|
type: "widget",
|
|
@@ -9828,7 +9828,7 @@ ${r.join(`
|
|
|
9828
9828
|
itemId: f,
|
|
9829
9829
|
field: q.field,
|
|
9830
9830
|
config: q.config,
|
|
9831
|
-
recalculating:
|
|
9831
|
+
recalculating: Bg,
|
|
9832
9832
|
onOpen: (X) => {
|
|
9833
9833
|
Rn(q.field);
|
|
9834
9834
|
const Z = {
|
|
@@ -9854,7 +9854,7 @@ ${r.join(`
|
|
|
9854
9854
|
);
|
|
9855
9855
|
}
|
|
9856
9856
|
if (n.type === "widget") {
|
|
9857
|
-
const q = n.data, X =
|
|
9857
|
+
const q = n.data, X = vh[q.field] === "button-group";
|
|
9858
9858
|
return id(
|
|
9859
9859
|
{ kind: "header", field: q.field },
|
|
9860
9860
|
/* @__PURE__ */ _(
|
|
@@ -9873,7 +9873,7 @@ ${r.join(`
|
|
|
9873
9873
|
label: q.label ?? void 0,
|
|
9874
9874
|
compact: !0,
|
|
9875
9875
|
strip: !0,
|
|
9876
|
-
onWidgetType: (Z) =>
|
|
9876
|
+
onWidgetType: (Z) => wh((W) => ({
|
|
9877
9877
|
...W,
|
|
9878
9878
|
[q.field]: Z
|
|
9879
9879
|
}))
|
|
@@ -9914,7 +9914,7 @@ ${r.join(`
|
|
|
9914
9914
|
/* @__PURE__ */ a(
|
|
9915
9915
|
"span",
|
|
9916
9916
|
{
|
|
9917
|
-
className:
|
|
9917
|
+
className: rp,
|
|
9918
9918
|
"data-header-label": !0,
|
|
9919
9919
|
children: s.label
|
|
9920
9920
|
}
|
|
@@ -9922,7 +9922,7 @@ ${r.join(`
|
|
|
9922
9922
|
/* @__PURE__ */ a(
|
|
9923
9923
|
"div",
|
|
9924
9924
|
{
|
|
9925
|
-
className:
|
|
9925
|
+
className: sp,
|
|
9926
9926
|
"data-header-value": !0,
|
|
9927
9927
|
children: /* @__PURE__ */ a(
|
|
9928
9928
|
Ix,
|
|
@@ -9954,7 +9954,7 @@ ${r.join(`
|
|
|
9954
9954
|
),
|
|
9955
9955
|
{ asChild: !0 }
|
|
9956
9956
|
);
|
|
9957
|
-
const o = Je[s.field], l = Fu.get(s.field), c = o ? o.ids : l ?? (s.field in
|
|
9957
|
+
const o = Je[s.field], l = Fu.get(s.field), c = o ? o.ids : l ?? (s.field in jf ? jf[s.field] : Yn[s.field]), d = tt && !o && (vs != null && s.field in vs && String(M[s.field] ?? "") !== String(vs[s.field] ?? "") || l !== void 0 && Math.round(
|
|
9958
9958
|
Number(M[s.field] ?? 0) * 100
|
|
9959
9959
|
) !== Math.round(l * 100)), p = (() => {
|
|
9960
9960
|
const q = s.thresholds;
|
|
@@ -9987,7 +9987,7 @@ ${r.join(`
|
|
|
9987
9987
|
"span",
|
|
9988
9988
|
{
|
|
9989
9989
|
className: Oe(
|
|
9990
|
-
|
|
9990
|
+
rp,
|
|
9991
9991
|
"[[data-header-field]:has(>[data-header-freshness]>*)>&]:pr-6 [[data-header-dense]_[data-header-field]:has(>[data-header-freshness]>*)>&]:pr-0 [[data-header-list]_[data-header-field]:has(>[data-header-freshness]>*)>&]:pr-0"
|
|
9992
9992
|
),
|
|
9993
9993
|
"data-header-label": !0,
|
|
@@ -9999,14 +9999,14 @@ ${r.join(`
|
|
|
9999
9999
|
{
|
|
10000
10000
|
"data-header-value": !0,
|
|
10001
10001
|
className: [
|
|
10002
|
-
|
|
10002
|
+
sp,
|
|
10003
10003
|
S0,
|
|
10004
10004
|
K || Q ? "max-w-[232px] truncate leading-tight" : "max-w-[232px] items-baseline truncate leading-tight",
|
|
10005
10005
|
K ? `rounded-full px-2 py-0.5 text-[11px] inline-block ${m} bg-current/10` : Q ? `rounded px-1.5 py-0.5 border border-current/30 text-[11px] inline-block ${m}` : ""
|
|
10006
10006
|
].filter(Boolean).join(" "),
|
|
10007
10007
|
children: (() => {
|
|
10008
10008
|
var L;
|
|
10009
|
-
if (
|
|
10009
|
+
if (Lg && ((L = s.cmsField) == null ? void 0 : L.computed_type) === "rollup" && !o)
|
|
10010
10010
|
return /* @__PURE__ */ a(
|
|
10011
10011
|
"span",
|
|
10012
10012
|
{
|
|
@@ -10096,7 +10096,7 @@ ${r.join(`
|
|
|
10096
10096
|
vr,
|
|
10097
10097
|
{
|
|
10098
10098
|
className: Oe(
|
|
10099
|
-
|
|
10099
|
+
ip,
|
|
10100
10100
|
"h-3 w-3 text-green-500"
|
|
10101
10101
|
)
|
|
10102
10102
|
}
|
|
@@ -10106,7 +10106,7 @@ ${r.join(`
|
|
|
10106
10106
|
type: "button",
|
|
10107
10107
|
"aria-label": "Copy value",
|
|
10108
10108
|
className: Oe(
|
|
10109
|
-
|
|
10109
|
+
ip,
|
|
10110
10110
|
"flex h-3 w-3 cursor-pointer items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity"
|
|
10111
10111
|
),
|
|
10112
10112
|
onClick: (q) => {
|
|
@@ -10148,8 +10148,8 @@ ${r.join(`
|
|
|
10148
10148
|
Tv,
|
|
10149
10149
|
{
|
|
10150
10150
|
tiles: e,
|
|
10151
|
-
folded: Wa ?
|
|
10152
|
-
rows: Wa ?
|
|
10151
|
+
folded: Wa ? Vh : [],
|
|
10152
|
+
rows: Wa ? Hh : null
|
|
10153
10153
|
}
|
|
10154
10154
|
),
|
|
10155
10155
|
!u && f && Mu && // Below lg the Integrations chip ends the last row
|
|
@@ -10163,7 +10163,7 @@ ${r.join(`
|
|
|
10163
10163
|
"data-header-tail": !0,
|
|
10164
10164
|
style: { order: 99 },
|
|
10165
10165
|
children: /* @__PURE__ */ a(
|
|
10166
|
-
|
|
10166
|
+
Tp,
|
|
10167
10167
|
{
|
|
10168
10168
|
collection: i,
|
|
10169
10169
|
itemId: String(f)
|
|
@@ -10174,7 +10174,7 @@ ${r.join(`
|
|
|
10174
10174
|
] });
|
|
10175
10175
|
})() }),
|
|
10176
10176
|
!u && f && Mu && /* @__PURE__ */ a("div", { className: $0, "data-header-dock": !0, children: /* @__PURE__ */ a("div", { className: R0, children: /* @__PURE__ */ a(
|
|
10177
|
-
|
|
10177
|
+
Tp,
|
|
10178
10178
|
{
|
|
10179
10179
|
collection: i,
|
|
10180
10180
|
itemId: String(f)
|
|
@@ -10196,7 +10196,7 @@ ${r.join(`
|
|
|
10196
10196
|
/* @__PURE__ */ _(
|
|
10197
10197
|
"div",
|
|
10198
10198
|
{
|
|
10199
|
-
ref:
|
|
10199
|
+
ref: Vu,
|
|
10200
10200
|
"data-form-body": "",
|
|
10201
10201
|
className: Oe(
|
|
10202
10202
|
"p-6 space-y-4",
|
|
@@ -10204,16 +10204,16 @@ ${r.join(`
|
|
|
10204
10204
|
),
|
|
10205
10205
|
onScroll: Cn ? xc : void 0,
|
|
10206
10206
|
children: [
|
|
10207
|
-
|
|
10208
|
-
rc &&
|
|
10207
|
+
lh,
|
|
10208
|
+
rc && uf.length > 0 && /* @__PURE__ */ a(
|
|
10209
10209
|
Tk,
|
|
10210
10210
|
{
|
|
10211
|
-
items:
|
|
10212
|
-
onJump:
|
|
10211
|
+
items: uf,
|
|
10212
|
+
onJump: Ju,
|
|
10213
10213
|
onDismiss: () => sc(!1)
|
|
10214
10214
|
}
|
|
10215
10215
|
),
|
|
10216
|
-
|
|
10216
|
+
Bh && /* @__PURE__ */ _(
|
|
10217
10217
|
"div",
|
|
10218
10218
|
{
|
|
10219
10219
|
"data-form-config-changed": !0,
|
|
@@ -10241,7 +10241,7 @@ ${r.join(`
|
|
|
10241
10241
|
}
|
|
10242
10242
|
),
|
|
10243
10243
|
!S && Zt != null && /* @__PURE__ */ a(Pb, { layoutId: Zt }),
|
|
10244
|
-
|
|
10244
|
+
ph && /* @__PURE__ */ a(
|
|
10245
10245
|
Ik,
|
|
10246
10246
|
{
|
|
10247
10247
|
roles: xe.roles,
|
|
@@ -10269,7 +10269,7 @@ ${r.join(`
|
|
|
10269
10269
|
onDiscard: Vy
|
|
10270
10270
|
}
|
|
10271
10271
|
) }),
|
|
10272
|
-
(x == null ? void 0 : x.requested_form_unavailable) &&
|
|
10272
|
+
(x == null ? void 0 : x.requested_form_unavailable) && !Rh && /* @__PURE__ */ _(
|
|
10273
10273
|
"div",
|
|
10274
10274
|
{
|
|
10275
10275
|
role: "status",
|
|
@@ -10279,7 +10279,7 @@ ${r.join(`
|
|
|
10279
10279
|
/* @__PURE__ */ _("span", { className: "min-w-0 flex-1", children: [
|
|
10280
10280
|
"The form in this link isn’t available to you — opened",
|
|
10281
10281
|
" ",
|
|
10282
|
-
(
|
|
10282
|
+
(Pm = x.layout) != null && Pm.name ? `“${x.layout.name}”` : "the usual form",
|
|
10283
10283
|
" ",
|
|
10284
10284
|
"instead."
|
|
10285
10285
|
] }),
|
|
@@ -10287,7 +10287,7 @@ ${r.join(`
|
|
|
10287
10287
|
"button",
|
|
10288
10288
|
{
|
|
10289
10289
|
type: "button",
|
|
10290
|
-
onClick: () =>
|
|
10290
|
+
onClick: () => Oh(!0),
|
|
10291
10291
|
className: "shrink-0 rounded px-1.5 text-[12px] font-medium underline-offset-2 hover:underline",
|
|
10292
10292
|
children: "Dismiss"
|
|
10293
10293
|
}
|
|
@@ -10307,8 +10307,8 @@ ${r.join(`
|
|
|
10307
10307
|
recordChanged: !!an.draft.base_updated_at && !!(pe.current.date_updated ?? pe.current.updated_at) && String(
|
|
10308
10308
|
pe.current.date_updated ?? pe.current.updated_at
|
|
10309
10309
|
) !== an.draft.base_updated_at,
|
|
10310
|
-
onRestore:
|
|
10311
|
-
onDiscard:
|
|
10310
|
+
onRestore: sg,
|
|
10311
|
+
onDiscard: ig,
|
|
10312
10312
|
createdId: an.createdId,
|
|
10313
10313
|
collection: i,
|
|
10314
10314
|
renderValue: (e, t) => {
|
|
@@ -10330,7 +10330,8 @@ ${r.join(`
|
|
|
10330
10330
|
ck,
|
|
10331
10331
|
{
|
|
10332
10332
|
collection: i,
|
|
10333
|
-
itemId: String(f)
|
|
10333
|
+
itemId: String(f),
|
|
10334
|
+
historyAvailable: !!Du
|
|
10334
10335
|
}
|
|
10335
10336
|
),
|
|
10336
10337
|
(ys || bl.length > 0) && !S && /* @__PURE__ */ _(
|
|
@@ -10362,11 +10363,11 @@ ${r.join(`
|
|
|
10362
10363
|
Kv,
|
|
10363
10364
|
{
|
|
10364
10365
|
edits: bl,
|
|
10365
|
-
canPutBack: (e) =>
|
|
10366
|
+
canPutBack: (e) => bp(
|
|
10366
10367
|
Sd(O, x),
|
|
10367
10368
|
e
|
|
10368
10369
|
) === "editable" && !ft[e],
|
|
10369
|
-
onPutBack:
|
|
10370
|
+
onPutBack: qg,
|
|
10370
10371
|
onDiscard: (e) => To(
|
|
10371
10372
|
(t) => e ? t.filter((n) => n.field !== e) : []
|
|
10372
10373
|
)
|
|
@@ -10383,7 +10384,7 @@ ${r.join(`
|
|
|
10383
10384
|
}
|
|
10384
10385
|
),
|
|
10385
10386
|
!u && f && Tn && // Design mode: the live check stores its result.
|
|
10386
|
-
!S && !((
|
|
10387
|
+
!S && !((Em = x == null ? void 0 : x.layout) != null && Em.hide_integrity_banner) && // Summary mode marks the affected fields instead —
|
|
10387
10388
|
// the banner would only push the record down.
|
|
10388
10389
|
!(xt && ss) && /* @__PURE__ */ a(
|
|
10389
10390
|
zk,
|
|
@@ -10393,7 +10394,7 @@ ${r.join(`
|
|
|
10393
10394
|
onJumpToField: Qo
|
|
10394
10395
|
}
|
|
10395
10396
|
),
|
|
10396
|
-
wt && !S && !!((
|
|
10397
|
+
wt && !S && !!((Mm = (Lm = Po.data) == null ? void 0 : Lm.hidden) != null && Mm.length) && /* @__PURE__ */ a(
|
|
10397
10398
|
kw,
|
|
10398
10399
|
{
|
|
10399
10400
|
why: Po.data,
|
|
@@ -10402,7 +10403,7 @@ ${r.join(`
|
|
|
10402
10403
|
}
|
|
10403
10404
|
),
|
|
10404
10405
|
!u && f && // The deadline clock follows the pipeline: none on a system table.
|
|
10405
|
-
|
|
10406
|
+
up(St) && !((Km = x == null ? void 0 : x.layout) != null && Km.hide_sla_banner) && // No wrapper div — an EMPTY sibling in this space-y stack
|
|
10406
10407
|
// still costs a 16px gap (the banner is null unless breached).
|
|
10407
10408
|
/* @__PURE__ */ a(
|
|
10408
10409
|
Uk,
|
|
@@ -10426,7 +10427,7 @@ ${r.join(`
|
|
|
10426
10427
|
}
|
|
10427
10428
|
),
|
|
10428
10429
|
$c.length > 0 && /* @__PURE__ */ a(
|
|
10429
|
-
|
|
10430
|
+
mp,
|
|
10430
10431
|
{
|
|
10431
10432
|
issues: $c,
|
|
10432
10433
|
onDismiss: () => cs([])
|
|
@@ -10439,7 +10440,7 @@ ${r.join(`
|
|
|
10439
10440
|
"data-edit-lock-banner": !0,
|
|
10440
10441
|
role: "status",
|
|
10441
10442
|
children: [
|
|
10442
|
-
/* @__PURE__ */ a(
|
|
10443
|
+
/* @__PURE__ */ a(Hm, { className: "mt-0.5 h-4 w-4 shrink-0 text-amber-500" }),
|
|
10443
10444
|
/* @__PURE__ */ a("span", { children: rt })
|
|
10444
10445
|
]
|
|
10445
10446
|
}
|
|
@@ -10456,16 +10457,16 @@ ${r.join(`
|
|
|
10456
10457
|
Cx,
|
|
10457
10458
|
{
|
|
10458
10459
|
lockHolder: Wn,
|
|
10459
|
-
onTakeOver:
|
|
10460
|
-
takingOver:
|
|
10460
|
+
onTakeOver: yg,
|
|
10461
|
+
takingOver: _g,
|
|
10461
10462
|
isAdmin: wt,
|
|
10462
|
-
onRequestLock:
|
|
10463
|
-
requesting:
|
|
10463
|
+
onRequestLock: bg,
|
|
10464
|
+
requesting: vg,
|
|
10464
10465
|
queue: su,
|
|
10465
|
-
myPosition:
|
|
10466
|
-
onJoinQueue:
|
|
10467
|
-
onLeaveQueue:
|
|
10468
|
-
joining:
|
|
10466
|
+
myPosition: wg,
|
|
10467
|
+
onJoinQueue: kg,
|
|
10468
|
+
onLeaveQueue: xg,
|
|
10469
|
+
joining: Sg
|
|
10469
10470
|
}
|
|
10470
10471
|
) }),
|
|
10471
10472
|
!u && !S && /* @__PURE__ */ a(
|
|
@@ -10483,11 +10484,11 @@ ${r.join(`
|
|
|
10483
10484
|
{
|
|
10484
10485
|
collection: i,
|
|
10485
10486
|
itemId: String(f),
|
|
10486
|
-
fieldLabel:
|
|
10487
|
+
fieldLabel: ef,
|
|
10487
10488
|
onGo: (e) => Kr.current(e)
|
|
10488
10489
|
}
|
|
10489
10490
|
),
|
|
10490
|
-
|
|
10491
|
+
Ch && !u && f != null && /* @__PURE__ */ a(
|
|
10491
10492
|
xx,
|
|
10492
10493
|
{
|
|
10493
10494
|
collection: i,
|
|
@@ -10510,7 +10511,7 @@ ${r.join(`
|
|
|
10510
10511
|
"button",
|
|
10511
10512
|
{
|
|
10512
10513
|
type: "button",
|
|
10513
|
-
onClick:
|
|
10514
|
+
onClick: Cf,
|
|
10514
10515
|
className: "shrink-0 rounded-md border border-amber-400 bg-white px-2.5 py-1 text-[11.5px] font-medium text-amber-800 hover:bg-amber-100 dark:border-amber-500/50 dark:bg-transparent dark:text-amber-300 dark:hover:bg-amber-500/15",
|
|
10515
10516
|
children: vi === "review" ? "Dismiss" : "Refresh"
|
|
10516
10517
|
}
|
|
@@ -10570,7 +10571,7 @@ ${r.join(`
|
|
|
10570
10571
|
]
|
|
10571
10572
|
}
|
|
10572
10573
|
),
|
|
10573
|
-
|
|
10574
|
+
ch
|
|
10574
10575
|
]
|
|
10575
10576
|
}
|
|
10576
10577
|
),
|
|
@@ -10604,10 +10605,10 @@ ${r.join(`
|
|
|
10604
10605
|
children: S ? (
|
|
10605
10606
|
// Rides with the canvas scroll; folded, it says what comes back.
|
|
10606
10607
|
/* @__PURE__ */ _("span", { className: "sticky top-3 flex flex-col items-center gap-2", children: [
|
|
10607
|
-
$n ? /* @__PURE__ */ a(
|
|
10608
|
+
$n ? /* @__PURE__ */ a(Zm, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ a(Xm, { className: "h-3.5 w-3.5" }),
|
|
10608
10609
|
$n && /* @__PURE__ */ a("span", { className: "text-[11px] font-medium text-slate-600 dark:text-slate-300 [writing-mode:vertical-rl]", children: "Summary" })
|
|
10609
10610
|
] })
|
|
10610
|
-
) : $n ? /* @__PURE__ */ a(
|
|
10611
|
+
) : $n ? /* @__PURE__ */ a(Zm, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ a(Xm, { className: "h-3.5 w-3.5" })
|
|
10611
10612
|
}
|
|
10612
10613
|
),
|
|
10613
10614
|
/* @__PURE__ */ a(
|
|
@@ -10622,7 +10623,7 @@ ${r.join(`
|
|
|
10622
10623
|
var t;
|
|
10623
10624
|
return (t = Ts[e]) == null ? void 0 : t.call(Ts);
|
|
10624
10625
|
},
|
|
10625
|
-
layoutFields: (((
|
|
10626
|
+
layoutFields: (((Dm = x == null ? void 0 : x.assignments) == null ? void 0 : Dm.length) ?? 0) > 0 ? new Set(
|
|
10626
10627
|
((x == null ? void 0 : x.assignments) ?? []).map(
|
|
10627
10628
|
(e) => e.field
|
|
10628
10629
|
)
|
|
@@ -10734,16 +10735,16 @@ export {
|
|
|
10734
10735
|
N$ as ITEM_EDIT_EXPORT_MENU_SLOT,
|
|
10735
10736
|
C$ as ItemEditForm,
|
|
10736
10737
|
Nw as M2MStagingContext,
|
|
10737
|
-
|
|
10738
|
+
Wp as REQUIRED_LINES_MESSAGE,
|
|
10738
10739
|
Bx as SaveProgressDialog,
|
|
10739
10740
|
Ad as UNAVAILABLE_OPTION_ERROR,
|
|
10740
10741
|
zx as UnsavedInspector,
|
|
10741
10742
|
Vx as adoptOwnSaveRefetch,
|
|
10742
10743
|
uS as appendUniqueM2MId,
|
|
10743
10744
|
Qx as applyLayoutDefaults,
|
|
10744
|
-
|
|
10745
|
-
|
|
10746
|
-
|
|
10745
|
+
ih as computeM2MEffectiveIds,
|
|
10746
|
+
Bp as draftDiffers,
|
|
10747
|
+
Dp as dropSatisfiedRequired,
|
|
10747
10748
|
pS as dropUnsettledAliasResults,
|
|
10748
10749
|
Yx as duplicateChildRow,
|
|
10749
10750
|
tS as everyShownFieldLocked,
|
|
@@ -10753,7 +10754,7 @@ export {
|
|
|
10753
10754
|
cS as isRuleFill,
|
|
10754
10755
|
Zx as keepCollisionBase,
|
|
10755
10756
|
dS as keptAmong,
|
|
10756
|
-
|
|
10757
|
+
Up as keptLinksAmong,
|
|
10757
10758
|
dw as lineConflictKey,
|
|
10758
10759
|
ua as lineLabelOf,
|
|
10759
10760
|
eS as liveCrossFieldErrors,
|
|
@@ -10763,18 +10764,18 @@ export {
|
|
|
10763
10764
|
Hx as ownWindowConflicts,
|
|
10764
10765
|
hS as partitionRuleResults,
|
|
10765
10766
|
aS as prefillAliasLinks,
|
|
10766
|
-
|
|
10767
|
+
Pp as recordHeadingText,
|
|
10767
10768
|
nS as refusalStepText,
|
|
10768
|
-
|
|
10769
|
+
zp as remoteChangeAuthor,
|
|
10769
10770
|
iS as remoteChangedFields,
|
|
10770
10771
|
cw as resolveLineCollision,
|
|
10771
10772
|
Id as resolveM2MAlias,
|
|
10772
10773
|
mS as resolveM2MFieldState,
|
|
10773
|
-
|
|
10774
|
+
oh as ruleFillKey,
|
|
10774
10775
|
rS as ruleJudgedOnSave,
|
|
10775
|
-
|
|
10776
|
+
Kp as rulesForTriggerField,
|
|
10776
10777
|
sS as serverErrorCode,
|
|
10777
10778
|
lS as templateLinks,
|
|
10778
10779
|
O$ as useM2MStaging,
|
|
10779
|
-
|
|
10780
|
+
vp as withRowBaseRevision
|
|
10780
10781
|
};
|