@nivaro/react 0.3.113 → 0.3.115
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ScreenShareHost.js +24 -0
- package/dist/full.css +50 -2
- package/dist/hooks/useSessionRecorder.js +61 -60
- package/dist/index.d.ts +1727 -19
- package/dist/index.js +1091 -950
- package/dist/shared/components/ActivityEntry.js +209 -97
- package/dist/shared/components/AgentPresenceChip.js +51 -0
- package/dist/shared/components/AnnouncementBanner.js +56 -41
- package/dist/shared/components/AutolinkedText.js +98 -85
- package/dist/shared/components/BroadcastView.js +149 -141
- package/dist/shared/components/CacheStamp.js +78 -30
- package/dist/shared/components/CollectionBrowserView.js +4088 -3592
- package/dist/shared/components/ConfigChangeStrip.js +63 -0
- package/dist/shared/components/ConfigReachNote.js +107 -0
- package/dist/shared/components/ConformanceView.js +389 -319
- package/dist/shared/components/DataTable.js +544 -504
- package/dist/shared/components/DelegateCoverLine.js +164 -0
- package/dist/shared/components/EnvironmentNotice.js +56 -65
- package/dist/shared/components/FilePreviewLightbox.js +89 -43
- package/dist/shared/components/FindingFixedMark.js +23 -0
- package/dist/shared/components/GridPresenceLine.js +100 -0
- package/dist/shared/components/IdleReloadWatcher.js +82 -43
- package/dist/shared/components/InStep.js +46 -0
- package/dist/shared/components/ItemEditForm.js +5504 -4889
- package/dist/shared/components/LiveAnnouncer.js +62 -0
- package/dist/shared/components/LiveCount.js +54 -0
- package/dist/shared/components/LiveFigure.js +28 -0
- package/dist/shared/components/LiveListControls.js +114 -0
- package/dist/shared/components/LiveNewMatchesPill.js +25 -0
- package/dist/shared/components/LiveOffNote.js +44 -0
- package/dist/shared/components/LivePreferenceHost.js +42 -0
- package/dist/shared/components/LiveRowMark.js +25 -20
- package/dist/shared/components/LiveTraceView.js +257 -0
- package/dist/shared/components/MapView.js +30 -29
- package/dist/shared/components/MatrixEditor.js +497 -462
- package/dist/shared/components/MyWorkView.js +346 -272
- package/dist/shared/components/NotificationBell.js +215 -201
- package/dist/shared/components/PageRenderer.js +636 -599
- package/dist/shared/components/PresenceDot.js +21 -0
- package/dist/shared/components/ProfileView.js +656 -536
- package/dist/shared/components/RealtimeStatusBanner.js +25 -25
- package/dist/shared/components/RecentRecordsRail.js +51 -48
- package/dist/shared/components/RecordCompare.js +241 -150
- package/dist/shared/components/RecordDrilldownSheet.js +66 -64
- package/dist/shared/components/RecordGridEditor.js +350 -311
- package/dist/shared/components/RecordHoverCard.js +147 -0
- package/dist/shared/components/RecordPeekHost.js +111 -0
- package/dist/shared/components/RecordReadView.js +414 -412
- package/dist/shared/components/RelativeTime.js +16 -0
- package/dist/shared/components/ReportView.js +1396 -1304
- package/dist/shared/components/ScreenRefreshButton.js +77 -0
- package/dist/shared/components/TabCountHost.js +10 -0
- package/dist/shared/components/TickerNumber.js +19 -18
- package/dist/shared/components/TipLayer.js +70 -58
- package/dist/shared/components/WidgetImageMenu.js +59 -0
- package/dist/shared/components/WidgetSlot.js +571 -524
- package/dist/shared/components/activity/RecordActivityStream.js +317 -0
- package/dist/shared/components/bulk/BulkSelectionNotices.js +220 -0
- package/dist/shared/components/cbv/approval-changed.js +20 -0
- package/dist/shared/components/cbv/changed-by-others.js +251 -0
- package/dist/shared/components/cbv/column-totals.js +75 -67
- package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +320 -0
- package/dist/shared/components/change-proposals/ProposalValue.js +28 -0
- package/dist/shared/components/change-proposals/ProposeChangeButton.js +44 -0
- package/dist/shared/components/change-proposals/ProposeChangeDialog.js +359 -0
- package/dist/shared/components/change-proposals/types.js +4 -0
- package/dist/shared/components/chat/ChatPanel.js +1571 -1528
- package/dist/shared/components/chat/Composer.js +276 -298
- package/dist/shared/components/chat/room-due.js +13 -0
- package/dist/shared/components/collections-directory/CollectionRow.js +76 -75
- package/dist/shared/components/collections-directory/CollectionsDirectory.js +415 -395
- package/dist/shared/components/collections-directory/directory-data.js +75 -63
- package/dist/shared/components/imports/ImportConsole.js +159 -155
- package/dist/shared/components/imports/ImportDuplicatesNotice.js +46 -31
- package/dist/shared/components/integrations/SendStatus.js +202 -0
- package/dist/shared/components/integrations/console/IntegrationsConsole.js +45 -36
- package/dist/shared/components/integrations/console/ReadyToSendView.js +453 -0
- package/dist/shared/components/integrations/console/api.js +161 -117
- package/dist/shared/components/integrations/console/tone.js +15 -12
- package/dist/shared/components/item-edit/CatalogPickerField.js +1353 -1245
- package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +162 -0
- package/dist/shared/components/item-edit/CloneDialog.js +208 -206
- package/dist/shared/components/item-edit/DerivedCauseNote.js +57 -0
- package/dist/shared/components/item-edit/DraftRecoveryBanner.js +81 -70
- package/dist/shared/components/item-edit/DuplicateNotice.js +169 -101
- package/dist/shared/components/item-edit/FieldAffordances.js +294 -385
- package/dist/shared/components/item-edit/FieldComments.js +159 -116
- package/dist/shared/components/item-edit/FieldPointer.js +132 -0
- package/dist/shared/components/item-edit/FieldRenderer.js +277 -273
- package/dist/shared/components/item-edit/FieldRow.js +519 -439
- package/dist/shared/components/item-edit/FieldSourceBadge.js +88 -0
- package/dist/shared/components/item-edit/FilePickerField.js +454 -369
- package/dist/shared/components/item-edit/GroupSection.js +618 -567
- package/dist/shared/components/item-edit/HeldEditsChip.js +113 -0
- package/dist/shared/components/item-edit/InlineTableField.js +2891 -2723
- package/dist/shared/components/item-edit/ListNeighborNav.js +79 -0
- package/dist/shared/components/item-edit/LiveTraceSheet.js +26 -0
- package/dist/shared/components/item-edit/M2MCombobox.js +284 -273
- package/dist/shared/components/item-edit/OutboxReviewTray.js +313 -0
- package/dist/shared/components/item-edit/PickerBadges.js +52 -0
- package/dist/shared/components/item-edit/PlanGrid.js +434 -439
- package/dist/shared/components/item-edit/RecalcValue.js +55 -0
- package/dist/shared/components/item-edit/RecordChatActions.js +76 -64
- package/dist/shared/components/item-edit/RecordChatMentionsChip.js +103 -0
- package/dist/shared/components/item-edit/RecordGrantTools.js +87 -86
- package/dist/shared/components/item-edit/RecordHelpChip.js +70 -0
- package/dist/shared/components/item-edit/RecordLiveSync.js +230 -217
- package/dist/shared/components/item-edit/RecordOutbox.js +53 -52
- package/dist/shared/components/item-edit/RecordRecapStrip.js +109 -36
- package/dist/shared/components/item-edit/RelationCombobox.js +229 -217
- package/dist/shared/components/item-edit/RelationGroupedCombobox.js +105 -100
- package/dist/shared/components/item-edit/RemoteChangeUi.js +454 -0
- package/dist/shared/components/item-edit/RemoteUploads.js +55 -0
- package/dist/shared/components/item-edit/RemovedLineNote.js +92 -0
- package/dist/shared/components/item-edit/RichTextEditorImpl.js +298 -223
- package/dist/shared/components/item-edit/ScheduledChangeChip.js +244 -0
- package/dist/shared/components/item-edit/SectionPresence.js +78 -0
- package/dist/shared/components/item-edit/SplitLinesButton.js +166 -0
- package/dist/shared/components/item-edit/catalog-line-watch.js +94 -0
- package/dist/shared/components/item-edit/coedit/collab.js +84 -0
- package/dist/shared/components/item-edit/coedit/context.js +24 -0
- package/dist/shared/components/item-edit/coedit/cursors.js +103 -0
- package/dist/shared/components/item-edit/coedit/safe-link.js +15 -0
- package/dist/shared/components/item-edit/coedit/session.js +382 -0
- package/dist/shared/components/item-edit/coedit/useCoedit.js +49 -0
- package/dist/shared/components/item-edit/file-live.js +77 -0
- package/dist/shared/components/item-edit/file-processing.js +87 -0
- package/dist/shared/components/item-edit/layout-switch.js +148 -0
- package/dist/shared/components/item-edit/live-related.js +23 -0
- package/dist/shared/components/item-edit/live-title.js +66 -0
- package/dist/shared/components/item-edit/partner-needs.js +142 -0
- package/dist/shared/components/item-edit/removed-line.js +58 -0
- package/dist/shared/components/item-edit/render-stability.js +70 -59
- package/dist/shared/components/layout-editor/ChangeNote.js +36 -34
- package/dist/shared/components/layout-editor/CollabParts.js +72 -70
- package/dist/shared/components/layout-editor/LayoutEditor.js +306 -303
- package/dist/shared/components/list/InlineEdit.js +504 -208
- package/dist/shared/components/list/ListViewers.js +81 -0
- package/dist/shared/components/merge/MergeRecordsDialog.js +1227 -0
- package/dist/shared/components/merge/MergeWithFlow.js +290 -0
- package/dist/shared/components/merge/merge-values.js +110 -0
- package/dist/shared/components/monitoring/InactiveUserLinksView.js +285 -258
- package/dist/shared/components/notifications/NotificationCenterView.js +388 -321
- package/dist/shared/components/notifications/NotificationDetailBits.js +205 -130
- package/dist/shared/components/notifications/NotificationRulesEditor.js +72 -52
- package/dist/shared/components/notifications/bundles.js +21 -19
- package/dist/shared/components/notifications/resolved-line.js +25 -0
- package/dist/shared/components/ops/OpsTasksView.js +45 -44
- package/dist/shared/components/panels/AccessGrantedNote.js +85 -0
- package/dist/shared/components/panels/AlertBanners.js +132 -0
- package/dist/shared/components/panels/AsyncUserPicker.js +54 -45
- package/dist/shared/components/panels/BranchLanes.js +82 -54
- package/dist/shared/components/panels/CommentAwareness.js +332 -0
- package/dist/shared/components/panels/CommentImages.js +219 -0
- package/dist/shared/components/panels/CommentPanel.js +649 -530
- package/dist/shared/components/panels/ExternalRequestsChip.js +98 -80
- package/dist/shared/components/panels/NewSinceChip.js +16 -0
- package/dist/shared/components/panels/OwnerOpenedLine.js +85 -0
- package/dist/shared/components/panels/PipelinePanel.js +1644 -1494
- package/dist/shared/components/panels/ResubmissionDiff.js +293 -0
- package/dist/shared/components/panels/SlaBreachBanner.js +30 -29
- package/dist/shared/components/panels/SlaClock.js +130 -99
- package/dist/shared/components/panels/TaskPanel.js +308 -287
- package/dist/shared/components/panels/unseen-move-check.js +101 -0
- package/dist/shared/components/pipeline/OwnerMatrix.js +80 -71
- package/dist/shared/components/pipeline/OwnerMatrixSheet.js +495 -0
- package/dist/shared/components/pipeline/PipelineEditorView.js +1855 -1771
- package/dist/shared/components/profile/AgentNameField.js +141 -0
- package/dist/shared/components/profile/AgentsPanel.js +55 -46
- package/dist/shared/components/profile/PersonAccess.js +398 -330
- package/dist/shared/components/profile/PersonAdminTools.js +127 -113
- package/dist/shared/components/profile/PersonProfile.js +81 -73
- package/dist/shared/components/profile/SignInTroubleshooter.js +361 -0
- package/dist/shared/components/queue/QueueBulkBar.js +101 -84
- package/dist/shared/components/queue/QueueItemSheet.js +66 -66
- package/dist/shared/components/queue/QueueTeamStrip.js +279 -0
- package/dist/shared/components/queue/QueueWorklist.js +2076 -1686
- package/dist/shared/components/queue/queue-totals.js +92 -0
- package/dist/shared/components/queue/worklist-helpers.js +18 -14
- package/dist/shared/components/send-view/SendViewButton.js +136 -0
- package/dist/shared/components/send-view/SentViewCards.js +147 -0
- package/dist/shared/components/support/ReportProblem.js +1 -0
- package/dist/shared/components/support/ScreenShare.js +554 -0
- package/dist/shared/components/support/SupportView.js +160 -129
- package/dist/shared/components/support/TicketDetailSheet.js +101 -89
- package/dist/shared/components/watch-list/WatchDock.js +1044 -0
- package/dist/shared/components/watch-list/WatchExtras.js +723 -0
- package/dist/shared/components/watch-list/WatchListButton.js +46 -0
- package/dist/shared/components/watch-list/WatchPinButton.js +67 -0
- package/dist/shared/components/watch-list/WatchRows.js +348 -0
- package/dist/shared/lib/activity-sentence.js +87 -75
- package/dist/shared/lib/agent-presence.js +46 -0
- package/dist/shared/lib/approval-progress.js +49 -0
- package/dist/shared/lib/attention-prefs.js +27 -0
- package/dist/shared/lib/cell-locks.js +56 -0
- package/dist/shared/lib/co-edit.js +166 -0
- package/dist/shared/lib/coedit-registry.js +44 -0
- package/dist/shared/lib/comment-awareness.js +124 -0
- package/dist/shared/lib/comment-images.js +45 -0
- package/dist/shared/lib/config-watch.js +94 -0
- package/dist/shared/lib/copy-rules.js +65 -0
- package/dist/shared/lib/count-step.js +30 -0
- package/dist/shared/lib/deadline-ticker.js +68 -0
- package/dist/shared/lib/derived-causes.js +115 -0
- package/dist/shared/lib/draft-store.js +114 -85
- package/dist/shared/lib/error-hints.js +1 -0
- package/dist/shared/lib/field-merge.js +126 -0
- package/dist/shared/lib/filter-sentence.js +10 -10
- package/dist/shared/lib/focus-mode.js +16 -12
- package/dist/shared/lib/grid-cursors.js +77 -0
- package/dist/shared/lib/grid-presence.js +182 -0
- package/dist/shared/lib/idle-reload.js +100 -73
- package/dist/shared/lib/in-step.js +45 -0
- package/dist/shared/lib/integration-chip.js +19 -18
- package/dist/shared/lib/line-locks.js +141 -0
- package/dist/shared/lib/line-split.js +41 -0
- package/dist/shared/lib/linked-changes.js +150 -0
- package/dist/shared/lib/list-link.js +56 -50
- package/dist/shared/lib/list-return.js +231 -0
- package/dist/shared/lib/list-viewers.js +52 -0
- package/dist/shared/lib/live-announcer.js +86 -0
- package/dist/shared/lib/live-counts.js +85 -0
- package/dist/shared/lib/live-data-changed.js +108 -0
- package/dist/shared/lib/live-deltas.js +81 -0
- package/dist/shared/lib/live-findings.js +113 -0
- package/dist/shared/lib/live-groups.js +122 -0
- package/dist/shared/lib/live-link-labels.js +162 -0
- package/dist/shared/lib/live-list-flow.js +334 -0
- package/dist/shared/lib/live-list.js +143 -129
- package/dist/shared/lib/live-moves.js +51 -0
- package/dist/shared/lib/live-ops.js +26 -26
- package/dist/shared/lib/live-pickers.js +7 -0
- package/dist/shared/lib/live-preference.js +184 -0
- package/dist/shared/lib/live-queries.js +226 -181
- package/dist/shared/lib/live-screen.js +333 -0
- package/dist/shared/lib/live-search.js +108 -0
- package/dist/shared/lib/live-seen.js +35 -0
- package/dist/shared/lib/live-views.js +100 -0
- package/dist/shared/lib/live.js +159 -133
- package/dist/shared/lib/missed-updates.js +198 -0
- package/dist/shared/lib/newer-file.js +56 -0
- package/dist/shared/lib/notification-sound.js +42 -20
- package/dist/shared/lib/own-writes.js +59 -41
- package/dist/shared/lib/picker-badges.js +94 -0
- package/dist/shared/lib/presence-signals.js +131 -84
- package/dist/shared/lib/realtime.js +49 -24
- package/dist/shared/lib/record-gaps.js +85 -0
- package/dist/shared/lib/record-outbox.js +369 -222
- package/dist/shared/lib/record-peek.js +75 -0
- package/dist/shared/lib/record-tabs.js +92 -72
- package/dist/shared/lib/relative-ticker.js +42 -0
- package/dist/shared/lib/request-gate.js +119 -119
- package/dist/shared/lib/rollup-recalc.js +107 -0
- package/dist/shared/lib/room-gaps.js +40 -36
- package/dist/shared/lib/rum.js +137 -87
- package/dist/shared/lib/save-progress.js +20 -0
- package/dist/shared/lib/scheduled-countdown.js +67 -0
- package/dist/shared/lib/screen-refresh.js +160 -0
- package/dist/shared/lib/screen-share.js +234 -0
- package/dist/shared/lib/seen-since.js +74 -0
- package/dist/shared/lib/selection-watch.js +205 -0
- package/dist/shared/lib/send-status.js +132 -0
- package/dist/shared/lib/send-view.js +23 -0
- package/dist/shared/lib/socket-liveness.js +155 -0
- package/dist/shared/lib/socket-realtime.js +168 -140
- package/dist/shared/lib/state-census.js +53 -0
- package/dist/shared/lib/summary-mode.js +61 -39
- package/dist/shared/lib/tab-attention.js +143 -32
- package/dist/shared/lib/table-density.js +64 -0
- package/dist/shared/lib/track-travel.js +40 -0
- package/dist/shared/lib/unseen-changes.js +68 -0
- package/dist/shared/lib/upload-file.js +33 -0
- package/dist/shared/lib/upload-presence.js +127 -0
- package/dist/shared/lib/urgent-chime.js +65 -0
- package/dist/shared/lib/use-online-users.js +32 -11
- package/dist/shared/lib/user-sync.js +155 -39
- package/dist/shared/lib/waiting-count.js +44 -0
- package/dist/shared/lib/watch-desktop.js +83 -0
- package/dist/shared/lib/watch-list.js +447 -0
- package/dist/shared/lib/widget-image-render.js +64 -0
- package/dist/shared/lib/widget-image.js +111 -0
- package/dist/shared/lib/worker-socket.js +130 -104
- package/dist/shared/lib/write-to-screen.js +133 -0
- package/package.json +1 -1
- package/styles.css +49 -1
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { createContext as K, useState as E, useMemo as x, useEffect as S, useRef as g, useCallback as v } from "react";
|
|
2
|
+
import { useNivaroClient as A } from "../context.js";
|
|
3
|
+
import { post as w } from "./commands.js";
|
|
4
|
+
import { useLiveCollection as q, LIVE_ASPECTS as z } from "./live.js";
|
|
5
|
+
import { useRowLocks as B } from "./live-list.js";
|
|
6
|
+
const C = 1e4, H = 1500, P = 2e4;
|
|
7
|
+
function V(o, t, l) {
|
|
8
|
+
if (!t) return { readOnly: !1, by: null };
|
|
9
|
+
const r = o.get(String(t));
|
|
10
|
+
return r && !r.is_mine ? { readOnly: !0, by: r.locked_by_name ?? "Someone" } : l != null && l.has(String(t)) ? { readOnly: !0, by: l.get(String(t)) ?? "Someone" } : { readOnly: !1, by: null };
|
|
11
|
+
}
|
|
12
|
+
function Q(o, t) {
|
|
13
|
+
const r = ((c) => !!c && c !== "new" && !c.startsWith("pending:"))(t) ? t : null;
|
|
14
|
+
return o === r ? { release: null, claim: null } : { release: o, claim: r };
|
|
15
|
+
}
|
|
16
|
+
const p = (o, t) => `/item-locks/${encodeURIComponent(String(o))}/${encodeURIComponent(t)}`, D = {
|
|
17
|
+
enabled: !1,
|
|
18
|
+
view: () => ({ readOnly: !1, by: null }),
|
|
19
|
+
claim: async () => !0,
|
|
20
|
+
release: () => {
|
|
21
|
+
},
|
|
22
|
+
held: null
|
|
23
|
+
};
|
|
24
|
+
function U(o) {
|
|
25
|
+
const t = o == null ? void 0 : o.response, l = (t == null ? void 0 : t.data) ?? t;
|
|
26
|
+
if ((l == null ? void 0 : l.code) === "RECORD_LOCKED")
|
|
27
|
+
return typeof l.locked_by_name == "string" ? l.locked_by_name : null;
|
|
28
|
+
}
|
|
29
|
+
function X(o) {
|
|
30
|
+
const { collection: t, enabled: l } = o, r = A(), c = l && !!t && !String(t).startsWith("nivaro_"), [M, b] = E(0);
|
|
31
|
+
q(
|
|
32
|
+
c ? t : null,
|
|
33
|
+
(e) => {
|
|
34
|
+
e.events.some((n) => (n.changed_fields ?? []).includes(z.lock)) && b((n) => n + 1);
|
|
35
|
+
},
|
|
36
|
+
{ enabled: c, includeOwn: !0, debounceMs: 150 }
|
|
37
|
+
);
|
|
38
|
+
const m = B(c ? t : null, c ? o.rowIds : [], M), [h, k] = E(() => /* @__PURE__ */ new Map()), O = x(() => [...m.values()].some((e) => !e.is_mine), [m]);
|
|
39
|
+
S(() => {
|
|
40
|
+
if (!c || !O && h.size === 0) return;
|
|
41
|
+
const e = setInterval(() => {
|
|
42
|
+
k(/* @__PURE__ */ new Map()), b((n) => n + 1);
|
|
43
|
+
}, P);
|
|
44
|
+
return () => clearInterval(e);
|
|
45
|
+
}, [c, O, h.size]);
|
|
46
|
+
const [T, R] = E(null), u = g(null), y = g(null), s = g(null), _ = v(() => {
|
|
47
|
+
y.current && clearInterval(y.current), y.current = null;
|
|
48
|
+
}, []), i = v(
|
|
49
|
+
(e, n = !1) => {
|
|
50
|
+
var d;
|
|
51
|
+
if (_(), u.current === e && (u.current = null, R(null)), n && typeof fetch == "function") {
|
|
52
|
+
try {
|
|
53
|
+
const a = (d = r.getToken) == null ? void 0 : d.call(r), f = r.url ?? "";
|
|
54
|
+
fetch(`${f}/api${p(t, e)}/lock/release`, {
|
|
55
|
+
method: "POST",
|
|
56
|
+
keepalive: !0,
|
|
57
|
+
credentials: a ? "omit" : "include",
|
|
58
|
+
headers: a ? { Authorization: `Bearer ${a}` } : {}
|
|
59
|
+
}).catch(() => {
|
|
60
|
+
});
|
|
61
|
+
} catch {
|
|
62
|
+
}
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
r.request(w(`${p(t, e)}/lock/release`, {})).catch(() => {
|
|
66
|
+
});
|
|
67
|
+
},
|
|
68
|
+
[r, t, _]
|
|
69
|
+
), I = v(
|
|
70
|
+
async (e) => {
|
|
71
|
+
if (!c || (s.current && (clearTimeout(s.current), s.current = null), u.current === e)) return !0;
|
|
72
|
+
const n = u.current;
|
|
73
|
+
n && i(n);
|
|
74
|
+
const d = m.get(e);
|
|
75
|
+
if (d && !d.is_mine) return !1;
|
|
76
|
+
try {
|
|
77
|
+
await r.request(
|
|
78
|
+
w(`${p(t, e)}/lock`, { beat_ms: C })
|
|
79
|
+
);
|
|
80
|
+
} catch (a) {
|
|
81
|
+
const f = U(a);
|
|
82
|
+
return f !== void 0 ? (k((L) => new Map(L).set(e, f)), b((L) => L + 1), !1) : !0;
|
|
83
|
+
}
|
|
84
|
+
return u.current = e, R(e), k((a) => {
|
|
85
|
+
if (!a.has(e)) return a;
|
|
86
|
+
const f = new Map(a);
|
|
87
|
+
return f.delete(e), f;
|
|
88
|
+
}), _(), y.current = setInterval(() => {
|
|
89
|
+
r.request(w(`${p(t, e)}/heartbeat`, { beat_ms: C })).catch(() => {
|
|
90
|
+
});
|
|
91
|
+
}, C), !0;
|
|
92
|
+
},
|
|
93
|
+
[c, r, t, m, i, _]
|
|
94
|
+
), $ = v(
|
|
95
|
+
(e = {}) => {
|
|
96
|
+
const n = u.current;
|
|
97
|
+
if (n) {
|
|
98
|
+
if (s.current && clearTimeout(s.current), e.now) {
|
|
99
|
+
s.current = null, i(n);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
s.current = setTimeout(() => {
|
|
103
|
+
s.current = null, u.current === n && i(n);
|
|
104
|
+
}, H);
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
[i]
|
|
108
|
+
);
|
|
109
|
+
S(() => {
|
|
110
|
+
if (!c || typeof document > "u") return;
|
|
111
|
+
const e = () => {
|
|
112
|
+
document.visibilityState === "hidden" && u.current && i(u.current, !0);
|
|
113
|
+
}, n = () => {
|
|
114
|
+
u.current && i(u.current, !0);
|
|
115
|
+
};
|
|
116
|
+
return document.addEventListener("visibilitychange", e), window.addEventListener("pagehide", n), () => {
|
|
117
|
+
document.removeEventListener("visibilitychange", e), window.removeEventListener("pagehide", n);
|
|
118
|
+
};
|
|
119
|
+
}, [c, i]), S(
|
|
120
|
+
() => () => {
|
|
121
|
+
s.current && clearTimeout(s.current), u.current && i(u.current);
|
|
122
|
+
},
|
|
123
|
+
[i]
|
|
124
|
+
);
|
|
125
|
+
const N = v(
|
|
126
|
+
(e) => V(m, e, h),
|
|
127
|
+
[m, h]
|
|
128
|
+
);
|
|
129
|
+
return c ? { enabled: !0, view: N, claim: I, release: $, held: T } : D;
|
|
130
|
+
}
|
|
131
|
+
const Y = K(!1);
|
|
132
|
+
export {
|
|
133
|
+
C as LINE_LOCK_BEAT_MS,
|
|
134
|
+
H as LINE_LOCK_LEAVE_MS,
|
|
135
|
+
P as LINE_LOCK_RECHECK_MS,
|
|
136
|
+
Y as LineLockContext,
|
|
137
|
+
Q as lineLockMoves,
|
|
138
|
+
V as lineLockView,
|
|
139
|
+
U as lockRefusalHolder,
|
|
140
|
+
X as useLineLocks
|
|
141
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const s = /^[A-Za-z_][A-Za-z0-9_]*\.[A-Za-z_][A-Za-z0-9_]*$/;
|
|
2
|
+
function l(e) {
|
|
3
|
+
if (e && typeof e == "object" && !Array.isArray(e)) return e;
|
|
4
|
+
if (typeof e != "string" || e.trim() === "") return null;
|
|
5
|
+
try {
|
|
6
|
+
const t = JSON.parse(e);
|
|
7
|
+
return t && typeof t == "object" && !Array.isArray(t) ? t : null;
|
|
8
|
+
} catch {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
function c(e, t) {
|
|
13
|
+
return `${e}.${t}`;
|
|
14
|
+
}
|
|
15
|
+
function u(e) {
|
|
16
|
+
var i;
|
|
17
|
+
const t = l((i = l(e)) == null ? void 0 : i.line_split);
|
|
18
|
+
if ((t == null ? void 0 : t.enabled) !== !0 || !Array.isArray(t.relations)) return [];
|
|
19
|
+
const n = [];
|
|
20
|
+
for (const o of t.relations) {
|
|
21
|
+
const r = typeof o == "string" ? o.trim() : "";
|
|
22
|
+
s.test(r) && !n.includes(r) && n.push(r);
|
|
23
|
+
}
|
|
24
|
+
return n.slice(0, 10);
|
|
25
|
+
}
|
|
26
|
+
function a(e, t, n) {
|
|
27
|
+
return u(e).includes(c(t, n));
|
|
28
|
+
}
|
|
29
|
+
function f(e) {
|
|
30
|
+
return e.selectedUnsaved > 0 ? "Save the new lines first — only saved lines can move." : e.unsavedEdits ? "Save your line changes first." : e.selectedSaved === 0 ? "Tick the lines to move." : e.selectedSaved >= e.totalSaved ? "Leave at least one line here. To move every line, duplicate the record instead." : null;
|
|
31
|
+
}
|
|
32
|
+
function d(e, t) {
|
|
33
|
+
return `/record-split/${encodeURIComponent(e)}/${encodeURIComponent(String(t))}`;
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
a as canOfferLineSplit,
|
|
37
|
+
f as lineSplitBlocker,
|
|
38
|
+
c as lineSplitKey,
|
|
39
|
+
d as lineSplitPath,
|
|
40
|
+
u as lineSplitRelations
|
|
41
|
+
};
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { useQueryClient as k } from "@tanstack/react-query";
|
|
2
|
+
import { useRef as g, useState as w, useMemo as C, useCallback as E, useEffect as _ } from "react";
|
|
3
|
+
import { useNivaroClient as R } from "../context.js";
|
|
4
|
+
import { get as M } from "./commands.js";
|
|
5
|
+
import { useLiveCollection as T } from "./live.js";
|
|
6
|
+
function j(e, t = Date.now()) {
|
|
7
|
+
const l = t - new Date(e).getTime();
|
|
8
|
+
if (!Number.isFinite(l) || l < 6e4) return "just now";
|
|
9
|
+
const i = Math.floor(l / 6e4);
|
|
10
|
+
if (i < 60) return `${i} min ago`;
|
|
11
|
+
const r = Math.floor(i / 60);
|
|
12
|
+
return r < 48 ? `${r} hour${r === 1 ? "" : "s"} ago` : `${Math.floor(r / 24)} days ago`;
|
|
13
|
+
}
|
|
14
|
+
const D = /^(is_)?(active|enabled|available|open)$/i, W = [
|
|
15
|
+
[/^(is_)?(inactive|disabled|deactivated)$/i, "deactivated"],
|
|
16
|
+
[/^(is_)?archived$/i, "archived"],
|
|
17
|
+
[/^(is_)?retired$/i, "retired"],
|
|
18
|
+
[/^(is_)?closed$/i, "closed"],
|
|
19
|
+
[/^(is_)?(hidden|hide_from_pickers|picker_hidden)$/i, "hidden from pickers"]
|
|
20
|
+
];
|
|
21
|
+
function P(e, t, l = Date.now(), i) {
|
|
22
|
+
var $;
|
|
23
|
+
const r = (($ = t == null ? void 0 : t.label) == null ? void 0 : $.trim()) || "", o = (r && !/^#\S+$/.test(r) ? r : "") || (i == null ? void 0 : i.trim()) || r || e.trim() || "The linked record";
|
|
24
|
+
if (!t) return `${o} is no longer offered here`;
|
|
25
|
+
const m = `${j(t.at, l)}${t.by ? ` by ${t.by}` : ""}`;
|
|
26
|
+
if (t.kind === "hidden") return `${o} was hidden from pickers ${m}`;
|
|
27
|
+
for (const s of t.fields) {
|
|
28
|
+
if (s.value === !1 && D.test(s.field)) return `${o} was deactivated ${m}`;
|
|
29
|
+
if (s.value === !0) {
|
|
30
|
+
for (const [h, v] of W)
|
|
31
|
+
if (h.test(s.field)) return `${o} was ${v} ${m}`;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
const p = t.fields.find(
|
|
35
|
+
(s) => typeof s.value == "string" && s.value.trim() && /(^|_)(status|state)$/i.test(s.field)
|
|
36
|
+
);
|
|
37
|
+
if (p) return `${o} was set to ${String(p.value).trim()} ${m}`;
|
|
38
|
+
const b = t.fields.map((s) => s.label).filter(Boolean);
|
|
39
|
+
return `${o} was changed ${m}${b.length ? ` (${b.slice(0, 3).join(", ")})` : ""}`;
|
|
40
|
+
}
|
|
41
|
+
function H(e) {
|
|
42
|
+
return [
|
|
43
|
+
["relation-single", e.collection, e.id],
|
|
44
|
+
["relation-avail", e.collection, e.id]
|
|
45
|
+
];
|
|
46
|
+
}
|
|
47
|
+
function K(e, t, l, i) {
|
|
48
|
+
const r = new Set([...l].map((o) => o.toUpperCase()));
|
|
49
|
+
return e.filter(
|
|
50
|
+
(o) => o.collection === t && (i || r.has(o.id.toUpperCase()))
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
const O = /* @__PURE__ */ new Set(["$picker", "$state"]);
|
|
54
|
+
function q(e) {
|
|
55
|
+
return !e || e.length === 0 ? !0 : e.some((t) => !t.startsWith("$") || O.has(t));
|
|
56
|
+
}
|
|
57
|
+
const A = 1e3;
|
|
58
|
+
function L(e) {
|
|
59
|
+
for (const [, t] of e) {
|
|
60
|
+
if (!t || typeof t != "object") continue;
|
|
61
|
+
const l = Object.entries(t).filter(([i, r]) => i !== "id" && (typeof r == "string" || typeof r == "number")).map(([, i]) => String(i).trim()).filter((i) => i && !/^\d{4}-\d{2}-\d{2}T/.test(i) && !/^-?\d+(\.\d+)?$/.test(i));
|
|
62
|
+
if (l.length > 0) return l[0];
|
|
63
|
+
}
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
function z(e) {
|
|
67
|
+
const t = R(), l = k(), i = g((/* @__PURE__ */ new Date()).toISOString()), r = g(e.targets);
|
|
68
|
+
r.current = e.targets;
|
|
69
|
+
const o = g(e.onRecheck);
|
|
70
|
+
o.current = e.onRecheck;
|
|
71
|
+
const m = g(e.labels);
|
|
72
|
+
m.current = e.labels;
|
|
73
|
+
const [p, b] = w({}), $ = g(/* @__PURE__ */ new Map()), s = g(null), h = C(
|
|
74
|
+
() => [...new Set(e.targets.map((c) => c.collection))].sort(),
|
|
75
|
+
[e.targets]
|
|
76
|
+
), v = E(() => {
|
|
77
|
+
var f;
|
|
78
|
+
s.current = null;
|
|
79
|
+
const c = [...$.current.values()];
|
|
80
|
+
if ($.current.clear(), c.length !== 0) {
|
|
81
|
+
for (const n of c)
|
|
82
|
+
for (const a of H(n)) l.invalidateQueries({ queryKey: a });
|
|
83
|
+
(f = o.current) == null || f.call(o, c.map((n) => n.field));
|
|
84
|
+
for (const n of c)
|
|
85
|
+
t.request(
|
|
86
|
+
M("/picker-exclusions/linked-change", {
|
|
87
|
+
collection: n.collection,
|
|
88
|
+
item_id: n.id,
|
|
89
|
+
since: i.current
|
|
90
|
+
})
|
|
91
|
+
).then((a) => a.data ?? null).catch(() => null).then((a) => {
|
|
92
|
+
const d = r.current.find((u) => u.field === n.field);
|
|
93
|
+
!d || d.id !== n.id || d.collection !== n.collection || b((u) => ({
|
|
94
|
+
...u,
|
|
95
|
+
[n.field]: {
|
|
96
|
+
change: a,
|
|
97
|
+
label: m.current(n.field),
|
|
98
|
+
shown: L(
|
|
99
|
+
l.getQueriesData({ queryKey: ["relation-single", n.collection, n.id] })
|
|
100
|
+
),
|
|
101
|
+
target: n.id
|
|
102
|
+
}
|
|
103
|
+
}));
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
}, [t, l]);
|
|
107
|
+
T(
|
|
108
|
+
e.enabled ? h : null,
|
|
109
|
+
(c) => {
|
|
110
|
+
const f = /* @__PURE__ */ new Map();
|
|
111
|
+
for (const n of c.events) {
|
|
112
|
+
if (!q(n.changed_fields)) continue;
|
|
113
|
+
const a = String(n.collection), d = f.get(a) ?? /* @__PURE__ */ new Set();
|
|
114
|
+
d.add(String(n.item)), f.set(a, d);
|
|
115
|
+
}
|
|
116
|
+
for (const [n, a] of f) {
|
|
117
|
+
const d = K(r.current, n, a, a.has("*"));
|
|
118
|
+
for (const u of d) $.current.set(u.field, u);
|
|
119
|
+
}
|
|
120
|
+
$.current.size > 0 && !s.current && (s.current = setTimeout(v, A));
|
|
121
|
+
},
|
|
122
|
+
{ enabled: e.enabled, debounceMs: 400 }
|
|
123
|
+
), _(
|
|
124
|
+
() => () => {
|
|
125
|
+
s.current && clearTimeout(s.current);
|
|
126
|
+
},
|
|
127
|
+
[]
|
|
128
|
+
);
|
|
129
|
+
const y = e.targets.map((c) => `${c.field}=${c.collection}:${c.id}`).join("|");
|
|
130
|
+
return _(() => {
|
|
131
|
+
b((c) => {
|
|
132
|
+
let f = !1;
|
|
133
|
+
const n = { ...c };
|
|
134
|
+
for (const [a, d] of Object.entries(c)) {
|
|
135
|
+
const u = r.current.find((S) => S.field === a);
|
|
136
|
+
(!u || u.id !== d.target) && (delete n[a], f = !0);
|
|
137
|
+
}
|
|
138
|
+
return f ? n : c;
|
|
139
|
+
});
|
|
140
|
+
}, [y]), p;
|
|
141
|
+
}
|
|
142
|
+
export {
|
|
143
|
+
j as agoWords,
|
|
144
|
+
q as eventMatters,
|
|
145
|
+
P as linkedChangeSentence,
|
|
146
|
+
H as linkedReadKeys,
|
|
147
|
+
L as shownLabel,
|
|
148
|
+
K as targetsHit,
|
|
149
|
+
z as useLinkedRecordWatch
|
|
150
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { noteTrailAddress as
|
|
2
|
-
const u = "lv",
|
|
1
|
+
import { noteTrailAddress as m } from "./nav-trail.js";
|
|
2
|
+
const u = "lv", L = "nvr:list-address", A = 1, v = 7e3;
|
|
3
3
|
function k(t) {
|
|
4
4
|
const e = new TextEncoder().encode(t);
|
|
5
5
|
let o = "";
|
|
@@ -8,7 +8,7 @@ function k(t) {
|
|
|
8
8
|
}
|
|
9
9
|
function S(t) {
|
|
10
10
|
try {
|
|
11
|
-
const e = t.replace(/-/g, "+").replace(/_/g, "/"), o = atob(e + "=".repeat((4 - e.length % 4) % 4)), i = Uint8Array.from(o, (
|
|
11
|
+
const e = t.replace(/-/g, "+").replace(/_/g, "/"), o = atob(e + "=".repeat((4 - e.length % 4) % 4)), i = Uint8Array.from(o, (c) => c.charCodeAt(0));
|
|
12
12
|
return new TextDecoder().decode(i);
|
|
13
13
|
} catch {
|
|
14
14
|
return null;
|
|
@@ -38,10 +38,10 @@ function $(t, e, o) {
|
|
|
38
38
|
const i = new URL(t);
|
|
39
39
|
return i.searchParams.set(u, b(e, o)), i.toString();
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function O(t) {
|
|
42
42
|
return typeof window > "u" ? null : _(new URLSearchParams(window.location.search).get(u), t);
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function T() {
|
|
45
45
|
if (typeof window > "u") return;
|
|
46
46
|
const t = new URLSearchParams(window.location.search);
|
|
47
47
|
if (!t.has(u)) return;
|
|
@@ -53,24 +53,24 @@ function j() {
|
|
|
53
53
|
`${window.location.pathname}${e ? `?${e}` : ""}${window.location.hash}`
|
|
54
54
|
);
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function N(t, e) {
|
|
57
57
|
if (typeof window > "u" || !window.history) return;
|
|
58
58
|
const o = new URLSearchParams(window.location.search), i = e ? b(t, e) : null;
|
|
59
59
|
if ((o.get(u) ?? null) === i) return;
|
|
60
60
|
i ? o.set(u, i) : o.delete(u);
|
|
61
|
-
const
|
|
61
|
+
const c = o.toString(), a = `${window.location.pathname}${c ? `?${c}` : ""}${window.location.hash}`;
|
|
62
62
|
try {
|
|
63
|
-
window.history.replaceState(window.history.state, "",
|
|
63
|
+
window.history.replaceState(window.history.state, "", a);
|
|
64
64
|
} catch {
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
|
-
|
|
67
|
+
m(a);
|
|
68
68
|
try {
|
|
69
|
-
window.dispatchEvent(new CustomEvent(
|
|
69
|
+
window.dispatchEvent(new CustomEvent(L, { detail: { path: a } }));
|
|
70
70
|
} catch {
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
async function
|
|
73
|
+
async function I(t, e) {
|
|
74
74
|
if (typeof window > "u") return "failed";
|
|
75
75
|
const o = $(window.location.href, t, e);
|
|
76
76
|
if (o.length > v) return "too-long";
|
|
@@ -80,7 +80,7 @@ async function O(t, e) {
|
|
|
80
80
|
return "failed";
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
const
|
|
83
|
+
const l = (t) => !!t && typeof t == "object" && !Array.isArray(t), y = (t) => typeof t == "string" ? t : void 0, g = (t) => Array.isArray(t) ? t.filter((e) => typeof e == "string") : void 0, j = (t) => Array.isArray(t) ? t.filter((e) => typeof e == "string" || typeof e == "number") : [], d = (t, e) => {
|
|
84
84
|
const o = Number(t);
|
|
85
85
|
return Number.isInteger(o) && o > 0 ? Math.min(o, e) : void 0;
|
|
86
86
|
};
|
|
@@ -88,83 +88,89 @@ function R(t) {
|
|
|
88
88
|
if (!t) return null;
|
|
89
89
|
const e = {}, o = y(t.q);
|
|
90
90
|
o && (e.q = o.slice(0, 500)), Array.isArray(t.f) && (e.f = t.f.filter(
|
|
91
|
-
(n) =>
|
|
92
|
-
).slice(0, 50).map((n,
|
|
91
|
+
(n) => l(n) && Array.isArray(n.path) && typeof n.op == "string"
|
|
92
|
+
).slice(0, 50).map((n, r) => ({
|
|
93
93
|
...n,
|
|
94
|
-
id: typeof n.id == "string" && n.id ? n.id : `lv-${
|
|
94
|
+
id: typeof n.id == "string" && n.id ? n.id : `lv-${r}`,
|
|
95
95
|
pathLabels: Array.isArray(n.pathLabels) ? n.pathLabels : n.path,
|
|
96
96
|
fieldType: typeof n.fieldType == "string" ? n.fieldType : "string",
|
|
97
97
|
value: n.value ?? ""
|
|
98
98
|
})));
|
|
99
99
|
const i = y(t.s);
|
|
100
100
|
if (i && /^-?[\w.$]+$/.test(i) && (e.s = i), Array.isArray(t.c) && (e.c = t.c.filter(
|
|
101
|
-
(n) => typeof n == "string" ||
|
|
102
|
-
).slice(0, 100)),
|
|
101
|
+
(n) => typeof n == "string" || l(n) && typeof n.key == "string"
|
|
102
|
+
).slice(0, 100)), l(t.qf)) {
|
|
103
103
|
const n = {};
|
|
104
|
-
for (const [
|
|
105
|
-
const h =
|
|
106
|
-
h.length && (n[
|
|
104
|
+
for (const [r, f] of Object.entries(t.qf)) {
|
|
105
|
+
const h = j(f);
|
|
106
|
+
h.length && (n[r] = h.slice(0, 500));
|
|
107
107
|
}
|
|
108
108
|
e.qf = n;
|
|
109
109
|
}
|
|
110
|
-
if (
|
|
110
|
+
if (l(t.cf)) {
|
|
111
111
|
const n = {};
|
|
112
|
-
for (const [
|
|
113
|
-
|
|
112
|
+
for (const [r, f] of Object.entries(t.cf))
|
|
113
|
+
l(f) && typeof f.kind == "string" && (n[r] = f);
|
|
114
114
|
e.cf = n;
|
|
115
115
|
}
|
|
116
116
|
Array.isArray(t.lc) && (e.lc = t.lc.filter(
|
|
117
|
-
(n) =>
|
|
118
|
-
).slice(0, 50)), Array.isArray(t.ex) && (e.ex = t.ex.filter((n) =>
|
|
119
|
-
const
|
|
120
|
-
|
|
121
|
-
const
|
|
122
|
-
|
|
117
|
+
(n) => l(n) && Array.isArray(n.path) && typeof n.op == "string"
|
|
118
|
+
).slice(0, 50)), Array.isArray(t.ex) && (e.ex = t.ex.filter((n) => l(n) && Array.isArray(n.path)).slice(0, 50));
|
|
119
|
+
const c = y(t.g);
|
|
120
|
+
c && /^[\w.$]+$/.test(c) && (e.g = c);
|
|
121
|
+
const a = d(t.ps, 200);
|
|
122
|
+
a && (e.ps = a);
|
|
123
123
|
const p = d(t.p, 1e5);
|
|
124
124
|
p && (e.p = p), t.a === !0 && (e.a = !0);
|
|
125
|
-
const
|
|
126
|
-
return
|
|
125
|
+
const s = d(t.v, Number.MAX_SAFE_INTEGER);
|
|
126
|
+
return s && (e.v = s), e;
|
|
127
127
|
}
|
|
128
128
|
function q(t) {
|
|
129
129
|
if (!t) return null;
|
|
130
130
|
const e = {};
|
|
131
|
-
if ((t.scope === "mine" || t.scope === "unowned" || t.scope === "all" || t.scope === "claimed") && (e.scope = t.scope),
|
|
132
|
-
const
|
|
133
|
-
for (const [n,
|
|
134
|
-
if (typeof
|
|
131
|
+
if ((t.scope === "mine" || t.scope === "unowned" || t.scope === "all" || t.scope === "claimed") && (e.scope = t.scope), l(t.filters)) {
|
|
132
|
+
const s = {};
|
|
133
|
+
for (const [n, r] of Object.entries(t.filters))
|
|
134
|
+
if (typeof r == "string") s[n] = r.slice(0, 500);
|
|
135
135
|
else {
|
|
136
|
-
const f = g(
|
|
137
|
-
f != null && f.length && (
|
|
136
|
+
const f = g(r);
|
|
137
|
+
f != null && f.length && (s[n] = f.slice(0, 500));
|
|
138
138
|
}
|
|
139
|
-
e.filters =
|
|
139
|
+
e.filters = s;
|
|
140
140
|
}
|
|
141
141
|
const o = y(t.sort);
|
|
142
142
|
o && /^-?[\w.$]+$/.test(o) && (e.sort = o);
|
|
143
143
|
const i = y(t.group_by);
|
|
144
144
|
i && (e.group_by = i), (t.view === "table" || t.view === "kanban" || t.view === "workload") && (e.view = t.view);
|
|
145
|
-
const
|
|
146
|
-
if (
|
|
147
|
-
const
|
|
148
|
-
for (const [n,
|
|
149
|
-
Object.keys(
|
|
145
|
+
const c = g(t.columns);
|
|
146
|
+
if (c != null && c.length && (e.columns = c.slice(0, 100)), l(t.pins)) {
|
|
147
|
+
const s = {};
|
|
148
|
+
for (const [n, r] of Object.entries(t.pins)) (r === "left" || r === "right") && (s[n] = r);
|
|
149
|
+
Object.keys(s).length && (e.pins = s);
|
|
150
150
|
}
|
|
151
|
-
|
|
152
|
-
|
|
151
|
+
if (l(t.totals)) {
|
|
152
|
+
const s = {};
|
|
153
|
+
for (const [n, r] of Object.entries(t.totals))
|
|
154
|
+
/^(extra|formula)\.[A-Za-z_][\w.]*$/.test(n) && (r === "sum" || r === "avg" || r === "min" || r === "max" || r === "count") && (s[n] = r);
|
|
155
|
+
Object.keys(s).length && (e.totals = s);
|
|
156
|
+
}
|
|
157
|
+
const a = d(t.page, 1e5);
|
|
158
|
+
a && (e.page = a);
|
|
153
159
|
const p = d(t.view_id, Number.MAX_SAFE_INTEGER);
|
|
154
160
|
return p && (e.view_id = p), e;
|
|
155
161
|
}
|
|
156
162
|
export {
|
|
157
|
-
|
|
163
|
+
L as LIST_ADDRESS_EVENT,
|
|
158
164
|
v as LIST_LINK_MAX_CHARS,
|
|
159
165
|
u as LIST_LINK_PARAM,
|
|
160
|
-
|
|
166
|
+
I as copyListLink,
|
|
161
167
|
_ as decodeListLink,
|
|
162
|
-
|
|
168
|
+
T as dropListLinkParam,
|
|
163
169
|
b as encodeListLink,
|
|
164
170
|
$ as listLinkUrl,
|
|
165
171
|
w as pruneListLinkState,
|
|
166
|
-
|
|
167
|
-
|
|
172
|
+
O as readListLinkFromLocation,
|
|
173
|
+
N as replaceListLinkParam,
|
|
168
174
|
R as sanitizeCbvLinkState,
|
|
169
175
|
q as sanitizeQueueLinkState
|
|
170
176
|
};
|