@nivaro/react 0.3.114 → 0.3.116
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 +1728 -22
- 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 +4909 -4182
- 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 +612 -551
- 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/OverflowRail.js +326 -0
- package/dist/shared/components/PageRenderer.js +636 -599
- package/dist/shared/components/PresenceDot.js +21 -0
- package/dist/shared/components/ProfileView.js +656 -536
- package/dist/shared/components/RealtimeStatusBanner.js +25 -25
- package/dist/shared/components/RecentRecordsRail.js +51 -48
- package/dist/shared/components/RecordCompare.js +241 -150
- package/dist/shared/components/RecordDrilldownSheet.js +66 -64
- package/dist/shared/components/RecordGridEditor.js +350 -311
- package/dist/shared/components/RecordHoverCard.js +147 -0
- package/dist/shared/components/RecordPeekHost.js +111 -0
- package/dist/shared/components/RecordReadView.js +414 -412
- package/dist/shared/components/RelativeTime.js +16 -0
- package/dist/shared/components/ReportView.js +1396 -1304
- package/dist/shared/components/ScreenRefreshButton.js +77 -0
- package/dist/shared/components/TabCountHost.js +10 -0
- package/dist/shared/components/TickerNumber.js +19 -18
- package/dist/shared/components/TipLayer.js +70 -58
- package/dist/shared/components/WidgetImageMenu.js +59 -0
- package/dist/shared/components/WidgetSlot.js +571 -524
- package/dist/shared/components/activity/RecordActivityStream.js +317 -0
- package/dist/shared/components/bulk/BulkSelectionNotices.js +220 -0
- package/dist/shared/components/cbv/approval-changed.js +20 -0
- package/dist/shared/components/cbv/changed-by-others.js +251 -0
- package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +320 -0
- package/dist/shared/components/change-proposals/ProposalValue.js +28 -0
- package/dist/shared/components/change-proposals/ProposeChangeButton.js +44 -0
- package/dist/shared/components/change-proposals/ProposeChangeDialog.js +359 -0
- package/dist/shared/components/change-proposals/types.js +4 -0
- package/dist/shared/components/chat/ChatPanel.js +1571 -1528
- package/dist/shared/components/chat/Composer.js +276 -298
- package/dist/shared/components/chat/room-due.js +13 -0
- package/dist/shared/components/collections-directory/CollectionRow.js +76 -75
- package/dist/shared/components/collections-directory/CollectionsDirectory.js +415 -395
- package/dist/shared/components/collections-directory/directory-data.js +75 -63
- package/dist/shared/components/imports/ImportConsole.js +159 -155
- package/dist/shared/components/imports/ImportDuplicatesNotice.js +46 -31
- package/dist/shared/components/integrations/SendStatus.js +202 -0
- package/dist/shared/components/integrations/console/IntegrationsConsole.js +45 -36
- package/dist/shared/components/integrations/console/ReadyToSendView.js +453 -0
- package/dist/shared/components/integrations/console/SignalCard.js +84 -77
- 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/list/PhonePager.js +50 -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 +389 -323
- 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 +2050 -1942
- 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/OwnerAvatars.js +9 -9
- 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 +2407 -1950
- package/dist/shared/components/queue/worklist-helpers.js +10 -6
- 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/ui/popover.js +53 -29
- 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/keep-row-focus.js +43 -0
- package/dist/shared/lib/line-locks.js +141 -0
- package/dist/shared/lib/line-split.js +41 -0
- package/dist/shared/lib/linked-changes.js +150 -0
- package/dist/shared/lib/list-return.js +231 -0
- package/dist/shared/lib/list-viewers.js +52 -0
- package/dist/shared/lib/live-announcer.js +86 -0
- package/dist/shared/lib/live-counts.js +85 -0
- package/dist/shared/lib/live-data-changed.js +108 -0
- package/dist/shared/lib/live-deltas.js +81 -0
- package/dist/shared/lib/live-findings.js +113 -0
- package/dist/shared/lib/live-groups.js +122 -0
- package/dist/shared/lib/live-link-labels.js +162 -0
- package/dist/shared/lib/live-list-flow.js +334 -0
- package/dist/shared/lib/live-list.js +143 -129
- package/dist/shared/lib/live-moves.js +51 -0
- package/dist/shared/lib/live-ops.js +26 -26
- package/dist/shared/lib/live-pickers.js +7 -0
- package/dist/shared/lib/live-preference.js +184 -0
- package/dist/shared/lib/live-queries.js +226 -181
- package/dist/shared/lib/live-screen.js +333 -0
- package/dist/shared/lib/live-search.js +108 -0
- package/dist/shared/lib/live-seen.js +35 -0
- package/dist/shared/lib/live-views.js +100 -0
- package/dist/shared/lib/live.js +159 -133
- package/dist/shared/lib/missed-updates.js +198 -0
- package/dist/shared/lib/newer-file.js +56 -0
- package/dist/shared/lib/notification-sound.js +42 -20
- package/dist/shared/lib/obligation-banner.js +17 -17
- 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/rail-menu-context.js +9 -0
- 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/row-surface.js +7 -0
- 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/table-pins.js +20 -18
- 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 +62 -0
- package/dist/shared/lib/upload-presence.js +127 -0
- package/dist/shared/lib/urgent-chime.js +65 -0
- package/dist/shared/lib/use-below-md.js +29 -0
- package/dist/shared/lib/use-online-users.js +32 -11
- package/dist/shared/lib/user-sync.js +155 -39
- package/dist/shared/lib/waiting-count.js +44 -0
- package/dist/shared/lib/watch-desktop.js +83 -0
- package/dist/shared/lib/watch-list.js +447 -0
- package/dist/shared/lib/widget-image-render.js +64 -0
- package/dist/shared/lib/widget-image.js +111 -0
- package/dist/shared/lib/worker-socket.js +130 -104
- package/dist/shared/lib/write-to-screen.js +133 -0
- package/package.json +1 -1
- package/styles.css +49 -1
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { jsx as t, jsxs as u, Fragment as It } from "react/jsx-runtime";
|
|
2
|
-
import { useQueryClient as
|
|
3
|
-
import { ChevronDown as
|
|
4
|
-
import {
|
|
2
|
+
import { useQueryClient as ra, useQuery as me } from "@tanstack/react-query";
|
|
3
|
+
import { ChevronDown as Mt, ChevronRight as Rt, Lock as sa, MoreHorizontal as oa, Split as Et, Undo2 as ia, History as da, Trash2 as ca, Plus as ua } from "lucide-react";
|
|
4
|
+
import { useMemo as G, useEffect as ue, useRef as he, useCallback as ee, useState as W } from "react";
|
|
5
5
|
import { toast as ie } from "sonner";
|
|
6
|
-
import { useNivaroClient as
|
|
6
|
+
import { useNivaroClient as pa, useParentDraft as ma, useItemEditAuth as ha } from "../../context.js";
|
|
7
7
|
import { get as fe, post as ot } from "../../lib/commands.js";
|
|
8
|
-
import { useAfterIdle as
|
|
8
|
+
import { useAfterIdle as fa } from "../../lib/defer.js";
|
|
9
9
|
import { evaluateNumeric as nt } from "../../lib/expression.js";
|
|
10
|
+
import { createCellAnnouncer as xa } from "../../lib/grid-cursors.js";
|
|
10
11
|
import { parseMoneyInput as ct } from "../../lib/money-input.js";
|
|
11
12
|
import { userErrorMessage as ga } from "../../lib/safe-error.js";
|
|
12
13
|
import { registerStagedRowLabel as ya } from "../../lib/staged-row-labels.js";
|
|
13
14
|
import { cn as B, formatRelative as ba } from "../../lib/utils.js";
|
|
14
15
|
import { NumberDraftInput as ka } from "../ui/number-draft-input.js";
|
|
15
16
|
import { Popover as ut, PopoverTrigger as pt, PopoverContent as mt } from "../ui/popover.js";
|
|
16
|
-
import { resolveCompareEndpoint as va, useCompareSeries as Na, compareColumnClosed as wa, planLabel as Dt, closedThroughLabel as $a, CompareProposalBanner as Ca, CompareStripChips as Sa, GridStatChip as Tt, monthLabel as it, extraSeriesValue as
|
|
17
|
+
import { resolveCompareEndpoint as va, useCompareSeries as Na, compareColumnClosed as wa, planLabel as Dt, closedThroughLabel as $a, CompareProposalBanner as Ca, CompareStripChips as Sa, GridStatChip as Tt, monthLabel as it, extraSeriesValue as $e, SeriesFigurePopover as At, monthLabelLong as Ae, unitWord as _a } from "./CompareSeries.js";
|
|
17
18
|
import { useO2MStaging as Oa, useLiveRows as La } from "./O2MStagingContext.js";
|
|
18
|
-
import { usePlanGridHost as
|
|
19
|
-
import { RowHistorySheet as
|
|
19
|
+
import { usePlanGridHost as Ma } from "./PlanGridHost.js";
|
|
20
|
+
import { RowHistorySheet as Ra } from "./RowHistorySheet.js";
|
|
20
21
|
import { RowWatchButton as Ea } from "./RowWatchButton.js";
|
|
21
22
|
const Ue = "unclassified", D = (k) => Number(k) || 0, K = (k) => Math.round(k * 100) / 100;
|
|
22
23
|
function U(k) {
|
|
@@ -37,72 +38,72 @@ function Ut(k) {
|
|
|
37
38
|
return n.ok ? "Enter an amount of zero or more" : n.error;
|
|
38
39
|
}
|
|
39
40
|
function Ta(k, n, h, f = {}) {
|
|
40
|
-
const i = k ? Object.keys(h).filter((
|
|
41
|
+
const i = k ? Object.keys(h).filter((A) => Math.abs(D(h[A]) - D(k[A])) < 5e-3) : [];
|
|
41
42
|
if (i.length === 0) return { merge: { ...h, ...f }, replace: null };
|
|
42
43
|
const b = Object.fromEntries(
|
|
43
|
-
Object.entries({ ...n ?? {}, ...h, ...f }).filter(([
|
|
44
|
+
Object.entries({ ...n ?? {}, ...h, ...f }).filter(([A]) => !i.includes(A))
|
|
44
45
|
);
|
|
45
46
|
return {
|
|
46
47
|
merge: null,
|
|
47
|
-
replace: Object.keys(b).some((
|
|
48
|
+
replace: Object.keys(b).some((A) => !A.startsWith("_")) ? b : null
|
|
48
49
|
};
|
|
49
50
|
}
|
|
50
|
-
function
|
|
51
|
+
function Aa(k, n) {
|
|
51
52
|
return k[0] === "item" && k.length >= 3 && String(k[2]) === String(n);
|
|
52
53
|
}
|
|
53
|
-
function
|
|
54
|
-
const { column: n, actual: h, openColumns: f, mode: i } = k, b = k.targetRow != null,
|
|
55
|
-
if (i === "none" || Math.abs(
|
|
56
|
-
return { patch:
|
|
54
|
+
function Pa(k) {
|
|
55
|
+
const { column: n, actual: h, openColumns: f, mode: i } = k, b = k.targetRow != null, A = K(D(k.row[n]) - h), P = { [n]: K(h) }, I = k.targetRow ?? k.row, T = b ? {} : P;
|
|
56
|
+
if (i === "none" || Math.abs(A) < 5e-3 || f.length === 0)
|
|
57
|
+
return { patch: P, moved: 0, unabsorbed: i === "none" ? 0 : A, targets: [] };
|
|
57
58
|
let x, N;
|
|
58
|
-
if (i === "next" ? (x = [f[0]], N = [1]) : i === "weighted" ? (x = f.filter((y) => D(I[y]) > 5e-3), N = x.map((y) => D(I[y])), x.length === 0 && b &&
|
|
59
|
-
const
|
|
60
|
-
let w =
|
|
61
|
-
if (x.forEach((y,
|
|
62
|
-
const v =
|
|
63
|
-
T[y] =
|
|
59
|
+
if (i === "next" ? (x = [f[0]], N = [1]) : i === "weighted" ? (x = f.filter((y) => D(I[y]) > 5e-3), N = x.map((y) => D(I[y])), x.length === 0 && b && A > 0 && (x = f, N = x.map(() => 1))) : (x = f, N = x.map(() => 1)), x.length === 0) return { patch: P, moved: 0, unabsorbed: A, targets: [] };
|
|
60
|
+
const R = N.reduce((y, S) => y + S, 0) || 1;
|
|
61
|
+
let w = A;
|
|
62
|
+
if (x.forEach((y, S) => {
|
|
63
|
+
const v = S === x.length - 1 ? w : K(A * N[S] / R), L = Math.max(0, K(D(I[y]) + v)), s = K(L - D(I[y]));
|
|
64
|
+
T[y] = L, w = K(w - s);
|
|
64
65
|
}), Math.abs(w) >= 5e-3 && w < 0)
|
|
65
66
|
for (const y of x) {
|
|
66
67
|
if (Math.abs(w) < 5e-3) break;
|
|
67
|
-
const
|
|
68
|
-
T[y] = K(T[y] -
|
|
68
|
+
const S = Math.min(T[y], -w);
|
|
69
|
+
T[y] = K(T[y] - S), w = K(w + S);
|
|
69
70
|
}
|
|
70
71
|
return b ? {
|
|
71
|
-
patch:
|
|
72
|
+
patch: P,
|
|
72
73
|
targetPatch: T,
|
|
73
|
-
moved: K(
|
|
74
|
+
moved: K(A - w),
|
|
74
75
|
unabsorbed: w,
|
|
75
76
|
targets: x
|
|
76
|
-
} : { patch: T, moved: K(
|
|
77
|
+
} : { patch: T, moved: K(A - w), unabsorbed: w, targets: x };
|
|
77
78
|
}
|
|
78
|
-
const
|
|
79
|
-
function
|
|
79
|
+
const Pt = 176, jt = 112, qt = 128, ve = "sticky left-0 z-[2] bg-white dark:bg-[hsl(var(--card))] border-r border-slate-200 dark:border-border", Ne = "sticky right-0 z-[2] bg-white dark:bg-[hsl(var(--card))] border-l border-slate-200 dark:border-border", Ce = "bg-slate-50 dark:bg-white/[0.035]";
|
|
80
|
+
function cl(k) {
|
|
80
81
|
const {
|
|
81
82
|
relatedCollection: n,
|
|
82
83
|
manyField: h,
|
|
83
84
|
parentId: f,
|
|
84
85
|
config: i,
|
|
85
86
|
compareSeries: b,
|
|
86
|
-
stats:
|
|
87
|
-
sumCap:
|
|
87
|
+
stats: A,
|
|
88
|
+
sumCap: P,
|
|
88
89
|
remaining: I,
|
|
89
90
|
readOnly: T = !1,
|
|
90
91
|
showHistory: x = !0,
|
|
91
92
|
emptyLabel: N
|
|
92
|
-
} = k,
|
|
93
|
-
data:
|
|
93
|
+
} = k, R = pa(), w = ra(), y = Oa(), S = La(), _ = ma(), v = _ == null ? void 0 : _.draft, { isAdmin: L } = ha(), s = !f || f === "new", c = !T && !!y, d = i.value_fields, E = i.total_field ?? null, {
|
|
94
|
+
data: j = [],
|
|
94
95
|
isLoading: de,
|
|
95
96
|
dataUpdatedAt: re
|
|
96
|
-
} =
|
|
97
|
+
} = me({
|
|
97
98
|
queryKey: ["o2m-rows", n, h, f, ""],
|
|
98
|
-
queryFn: () =>
|
|
99
|
+
queryFn: () => R.request(
|
|
99
100
|
fe(`/items/${n}`, { filter: JSON.stringify({ [h]: { _eq: f } }), limit: 200 })
|
|
100
101
|
).then((e) => e.data ?? []),
|
|
101
102
|
enabled: !s,
|
|
102
103
|
staleTime: 3e4
|
|
103
|
-
}), F =
|
|
104
|
+
}), F = fa(2e3), { data: le = {} } = me({
|
|
104
105
|
queryKey: ["o2m-cell-provenance", n, h, f, re],
|
|
105
|
-
queryFn: () =>
|
|
106
|
+
queryFn: () => R.request(
|
|
106
107
|
fe("/revisions/o2m-cell-provenance", {
|
|
107
108
|
collection: n,
|
|
108
109
|
many_field: h,
|
|
@@ -110,36 +111,30 @@ function dl(k) {
|
|
|
110
111
|
})
|
|
111
112
|
).then((e) => ({ data: e.data ?? {}, created: e.created ?? {} })),
|
|
112
113
|
select: (e) => (e == null ? void 0 : e.data) ?? {},
|
|
113
|
-
enabled: F && x && !s &&
|
|
114
|
+
enabled: F && x && !s && j.length > 0,
|
|
114
115
|
staleTime: 6e4,
|
|
115
116
|
placeholderData: (e) => e
|
|
116
117
|
}), V = (e, a) => e.id ? `${n}:${e.id}:${a}` : void 0, ce = (e, a) => {
|
|
117
118
|
var l;
|
|
118
119
|
return e.id && !e.edited ? (l = le[e.id]) == null ? void 0 : l[a] : void 0;
|
|
119
|
-
},
|
|
120
|
-
|
|
120
|
+
}, M = G(() => xa(), []), Pe = (e) => {
|
|
121
|
+
var a, l, r;
|
|
122
|
+
M.focus(
|
|
123
|
+
((r = (l = (a = e.target) == null ? void 0 : a.closest) == null ? void 0 : l.call(a, "[data-grid-cell]")) == null ? void 0 : r.getAttribute("data-grid-cell")) ?? null
|
|
124
|
+
);
|
|
121
125
|
}, zt = (e) => {
|
|
122
|
-
var l, r, o;
|
|
123
|
-
const a = ((o = (r = (l = e.target) == null ? void 0 : l.closest) == null ? void 0 : r.call(l, "[data-grid-cell]")) == null ? void 0 : o.getAttribute("data-grid-cell")) ?? null;
|
|
124
|
-
a !== $.current && ($.current && xe($.current, "end"), $.current = a, a && xe(a, "start"));
|
|
125
|
-
}, Wt = (e) => {
|
|
126
126
|
var a, l;
|
|
127
|
-
(l = (a = e.relatedTarget) == null ? void 0 : a.closest) != null && l.call(a, "[data-grid-cell]") || (
|
|
127
|
+
(l = (a = e.relatedTarget) == null ? void 0 : a.closest) != null && l.call(a, "[data-grid-cell]") || M.blur();
|
|
128
128
|
};
|
|
129
|
-
ue(
|
|
130
|
-
|
|
131
|
-
$.current && xe($.current, "end");
|
|
132
|
-
},
|
|
133
|
-
[]
|
|
134
|
-
);
|
|
135
|
-
const qe = Z(
|
|
129
|
+
ue(() => () => M.flush(), [M]);
|
|
130
|
+
const je = G(
|
|
136
131
|
() => b != null && b.endpoint ? va(b.endpoint, v) : null,
|
|
137
132
|
[b == null ? void 0 : b.endpoint, v]
|
|
138
|
-
),
|
|
139
|
-
client:
|
|
140
|
-
endpoint:
|
|
133
|
+
), qe = Na({
|
|
134
|
+
client: R,
|
|
135
|
+
endpoint: je,
|
|
141
136
|
enabled: !!b && !s
|
|
142
|
-
}), m = b && !s ?
|
|
137
|
+
}), m = b && !s ? qe.data ?? null : null, ht = qe.refetch, Fe = he(0);
|
|
143
138
|
ue(() => {
|
|
144
139
|
if (!(!re || !b || s)) {
|
|
145
140
|
if (Fe.current === 0) {
|
|
@@ -149,48 +144,48 @@ function dl(k) {
|
|
|
149
144
|
re !== Fe.current && (Fe.current = re, ht());
|
|
150
145
|
}
|
|
151
146
|
}, [re, ht, b, s]);
|
|
152
|
-
const
|
|
147
|
+
const xe = G(() => !i.split_endpoint || s ? null : i.split_endpoint.replace(
|
|
153
148
|
/\$parent\.([A-Za-z_][A-Za-z0-9_]*)/g,
|
|
154
149
|
(e, a) => String(a === "id" ? f : (v == null ? void 0 : v[a]) ?? "")
|
|
155
|
-
), [i.split_endpoint, s, f, v]), ze =
|
|
150
|
+
), [i.split_endpoint, s, f, v]), ze = G(() => ["plan-grid-split-info", xe], [xe]), { data: pe = null } = me({
|
|
156
151
|
queryKey: ze,
|
|
157
|
-
queryFn: () =>
|
|
158
|
-
enabled: !!
|
|
152
|
+
queryFn: () => R.request(fe(xe)).then((e) => e.data ?? null).catch(() => null),
|
|
153
|
+
enabled: !!xe,
|
|
159
154
|
staleTime: 3e4
|
|
160
|
-
}), { data: ft = {} } =
|
|
155
|
+
}), { data: ft = {} } = me({
|
|
161
156
|
queryKey: ["plan-grid-categories", i.category_collection, i.category_label_field],
|
|
162
157
|
queryFn: async () => {
|
|
163
|
-
const e = i.category_label_field ?? "name", a = await
|
|
158
|
+
const e = i.category_label_field ?? "name", a = await R.request(
|
|
164
159
|
fe(`/items/${i.category_collection}`, { fields: `id,${e}`, limit: 100 })
|
|
165
160
|
);
|
|
166
161
|
return Object.fromEntries((a.data ?? []).map((l) => [String(l.id), String(l[e] ?? l.id)]));
|
|
167
162
|
},
|
|
168
163
|
enabled: !!i.category_collection,
|
|
169
164
|
staleTime: 10 * 6e4
|
|
170
|
-
}),
|
|
165
|
+
}), ge = ee(
|
|
171
166
|
(e) => e === Ue ? i.unclassified_label ?? "Unclassified" : ft[e] ?? `#${e}`,
|
|
172
167
|
[ft, i.unclassified_label]
|
|
173
|
-
), We =
|
|
168
|
+
), We = G(() => (i.categories ?? []).map(String), [i.categories]), He = (y == null ? void 0 : y.getPendingRows(n, h)) ?? [], se = y == null ? void 0 : y.getPendingEdits(n, h), ye = y == null ? void 0 : y.getPendingDeletes(n, h), Ke = He.length + ((se == null ? void 0 : se.size) ?? 0) + ((ye == null ? void 0 : ye.size) ?? 0), xt = he(Ke);
|
|
174
169
|
ue(() => {
|
|
175
170
|
const e = xt.current;
|
|
176
171
|
if (xt.current = Ke, s || !(e > 0 && Ke === 0)) return;
|
|
177
|
-
const a = () => void w.invalidateQueries({ predicate: (r) =>
|
|
172
|
+
const a = () => void w.invalidateQueries({ predicate: (r) => Aa(r.queryKey, f) });
|
|
178
173
|
a();
|
|
179
174
|
const l = setTimeout(a, 2e3);
|
|
180
175
|
return () => clearTimeout(l);
|
|
181
176
|
}, [Ke, s, f, w]);
|
|
182
|
-
const J =
|
|
177
|
+
const J = G(() => {
|
|
183
178
|
const e = [], a = (l) => l && typeof l == "object" && "id" in l ? l.id : l;
|
|
184
|
-
for (const l of
|
|
179
|
+
for (const l of j) {
|
|
185
180
|
const r = String(l.id);
|
|
186
|
-
if (
|
|
187
|
-
const o = se == null ? void 0 : se.get(r), g = o ? { ...l, ...o } : l,
|
|
181
|
+
if (ye != null && ye.has(r)) continue;
|
|
182
|
+
const o = se == null ? void 0 : se.get(r), g = o ? { ...l, ...o } : l, O = a(g[i.category_field]);
|
|
188
183
|
e.push({
|
|
189
184
|
uid: `s:${r}`,
|
|
190
185
|
id: r,
|
|
191
186
|
pendingIndex: null,
|
|
192
187
|
key: String(a(g[i.key_field]) ?? ""),
|
|
193
|
-
cat:
|
|
188
|
+
cat: O == null || O === "" ? null : String(O),
|
|
194
189
|
values: g,
|
|
195
190
|
edited: !!o && Object.keys(o).some((z) => !z.startsWith("_")),
|
|
196
191
|
isNew: !1
|
|
@@ -209,9 +204,9 @@ function dl(k) {
|
|
|
209
204
|
isNew: !0
|
|
210
205
|
});
|
|
211
206
|
}), e;
|
|
212
|
-
}, [
|
|
207
|
+
}, [j, He, se, ye, i.key_field, i.category_field]), gt = he(J);
|
|
213
208
|
gt.current = J;
|
|
214
|
-
const yt =
|
|
209
|
+
const yt = he(() => "");
|
|
215
210
|
ue(
|
|
216
211
|
() => ya(n, (e) => {
|
|
217
212
|
const a = gt.current.find((l) => l.id === e);
|
|
@@ -222,7 +217,7 @@ function dl(k) {
|
|
|
222
217
|
const Y = ee(
|
|
223
218
|
(e) => K(d.reduce((a, l) => a + D(e[l]), 0)),
|
|
224
219
|
[d]
|
|
225
|
-
), oe =
|
|
220
|
+
), oe = G(() => {
|
|
226
221
|
const e = /* @__PURE__ */ new Map();
|
|
227
222
|
for (const a of J) {
|
|
228
223
|
if (!a.key) continue;
|
|
@@ -241,39 +236,39 @@ function dl(k) {
|
|
|
241
236
|
return [...e.values()].sort(
|
|
242
237
|
(a, l) => Number(a.key) - Number(l.key) || a.key.localeCompare(l.key)
|
|
243
238
|
);
|
|
244
|
-
}, [J, m, d, We]),
|
|
239
|
+
}, [J, m, d, We]), Se = G(
|
|
245
240
|
() => J.map((e) => E ? { ...e.values, [E]: Y(e.values) } : e.values),
|
|
246
241
|
[J, E, Y]
|
|
247
|
-
),
|
|
242
|
+
), be = S == null ? void 0 : S.report;
|
|
248
243
|
ue(() => {
|
|
249
|
-
if (
|
|
244
|
+
if (be) {
|
|
250
245
|
if (de) {
|
|
251
|
-
|
|
246
|
+
be(n, h, null);
|
|
252
247
|
return;
|
|
253
248
|
}
|
|
254
|
-
|
|
249
|
+
be(n, h, Se);
|
|
255
250
|
}
|
|
256
|
-
}, [
|
|
257
|
-
const bt =
|
|
251
|
+
}, [be, n, h, Se, de]);
|
|
252
|
+
const bt = he(() => {
|
|
258
253
|
});
|
|
259
|
-
bt.current = () =>
|
|
260
|
-
const
|
|
254
|
+
bt.current = () => be == null ? void 0 : be(n, h, null), ue(() => () => bt.current(), []);
|
|
255
|
+
const _e = ee(
|
|
261
256
|
(e) => {
|
|
262
257
|
if (e.startsWith("$parent.")) return (v == null ? void 0 : v[e.slice(8)]) ?? 0;
|
|
263
258
|
if (e.startsWith("$sum.")) {
|
|
264
259
|
const a = e.slice(5);
|
|
265
|
-
return
|
|
260
|
+
return Se.reduce((l, r) => l + D(r[a]), 0);
|
|
266
261
|
}
|
|
267
|
-
return e === "$count" ?
|
|
262
|
+
return e === "$count" ? Se.length : v == null ? void 0 : v[e];
|
|
268
263
|
},
|
|
269
|
-
[v,
|
|
270
|
-
), kt =
|
|
271
|
-
() => (
|
|
272
|
-
[
|
|
273
|
-
), Qe =
|
|
264
|
+
[v, Se]
|
|
265
|
+
), kt = G(
|
|
266
|
+
() => (A ?? []).map((e) => ({ ...e, result: nt(e.value, _e) })),
|
|
267
|
+
[A, _e]
|
|
268
|
+
), Qe = G(
|
|
274
269
|
() => K(J.reduce((e, a) => e + Y(a.values), 0)),
|
|
275
270
|
[J, Y]
|
|
276
|
-
),
|
|
271
|
+
), Oe = G(() => pe ? pe.categories.filter((e) => e.cap > 5e-3 || J.some((a) => a.cat === String(e.id))).map((e) => {
|
|
277
272
|
const a = K(
|
|
278
273
|
J.filter((l) => l.cat === String(e.id)).reduce((l, r) => l + Y(r.values), 0)
|
|
279
274
|
);
|
|
@@ -284,56 +279,56 @@ function dl(k) {
|
|
|
284
279
|
planned: a,
|
|
285
280
|
left: K(e.cap - a)
|
|
286
281
|
};
|
|
287
|
-
}) : [], [pe, J, Y]),
|
|
282
|
+
}) : [], [pe, J, Y]), Z = ee(
|
|
288
283
|
(e, a) => wa(m, e, a),
|
|
289
284
|
[m]
|
|
290
285
|
), Ie = ee(
|
|
291
|
-
(e, a) => !c ||
|
|
292
|
-
[c,
|
|
293
|
-
),
|
|
286
|
+
(e, a) => !c || Z(e, a) && !!(m != null && m.closed_locked) && !L,
|
|
287
|
+
[c, Z, m == null ? void 0 : m.closed_locked, L]
|
|
288
|
+
), Le = ee(
|
|
294
289
|
(e, a, l) => {
|
|
295
|
-
var g,
|
|
296
|
-
const r = m == null ? void 0 : m.rows.find((
|
|
290
|
+
var g, O, z;
|
|
291
|
+
const r = m == null ? void 0 : m.rows.find((q) => String(q.key) === e);
|
|
297
292
|
if (!r) return { value: 0, details: [] };
|
|
298
293
|
if (a == null) return { value: D(r.values[l]), details: ((g = r.details) == null ? void 0 : g[l]) ?? [] };
|
|
299
|
-
const o = (
|
|
294
|
+
const o = (O = r.by_category) == null ? void 0 : O[a];
|
|
300
295
|
return { value: D(o == null ? void 0 : o.values[l]), details: ((z = o == null ? void 0 : o.details) == null ? void 0 : z[l]) ?? [] };
|
|
301
296
|
},
|
|
302
297
|
[m]
|
|
303
298
|
), [vt, Ve] = W(null), X = ee(
|
|
304
299
|
(e, a, l, r) => {
|
|
305
300
|
if (!y) return !1;
|
|
306
|
-
const o = (r == null ? void 0 : r.credit) ?? 0, g = { ...e.values, ...a },
|
|
307
|
-
if (z - o >
|
|
308
|
-
if (
|
|
309
|
-
const
|
|
310
|
-
if (
|
|
301
|
+
const o = (r == null ? void 0 : r.credit) ?? 0, g = { ...e.values, ...a }, O = Y(e.values), z = Y(g);
|
|
302
|
+
if (z - o > O + 5e-3) {
|
|
303
|
+
if (P) {
|
|
304
|
+
const q = nt(P.cap, _e), $ = K(Qe - O + z - o);
|
|
305
|
+
if (q != null && $ > q + 5e-3)
|
|
311
306
|
return Ve(
|
|
312
|
-
`${
|
|
307
|
+
`${P.message ?? `${P.label ?? "The total"} cannot exceed ${U(q)}`} — this would reach ${U($)}, ${U(K($ - q))} over.`
|
|
313
308
|
), !1;
|
|
314
309
|
}
|
|
315
310
|
if (e.cat != null) {
|
|
316
|
-
const
|
|
317
|
-
if (
|
|
318
|
-
const
|
|
319
|
-
if (
|
|
311
|
+
const q = Oe.find(($) => $.id === e.cat);
|
|
312
|
+
if (q) {
|
|
313
|
+
const $ = K(q.planned - O + z - o);
|
|
314
|
+
if ($ > q.cap + 5e-3)
|
|
320
315
|
return Ve(
|
|
321
|
-
`${
|
|
316
|
+
`${q.label} would reach ${U($)} — ${U(K($ - q.cap))} over its ${U(q.cap)}.`
|
|
322
317
|
), !1;
|
|
323
318
|
}
|
|
324
319
|
}
|
|
325
320
|
}
|
|
326
321
|
if (Ve(null), e.id) {
|
|
327
|
-
const
|
|
322
|
+
const q = {
|
|
328
323
|
...l ? { _change_reason: l } : {},
|
|
329
324
|
...r != null && r.early ? { __flush_early: !0 } : {}
|
|
330
|
-
},
|
|
331
|
-
|
|
325
|
+
}, $ = Ta(
|
|
326
|
+
j.find((H) => String(H.id) === e.id),
|
|
332
327
|
se == null ? void 0 : se.get(e.id),
|
|
333
328
|
a,
|
|
334
|
-
|
|
329
|
+
q
|
|
335
330
|
);
|
|
336
|
-
|
|
331
|
+
$.merge ? y.queueEdit(n, h, e.id, $.merge) : (y.cancelPendingEdit(n, h, e.id), $.replace && y.queueEdit(n, h, e.id, $.replace));
|
|
337
332
|
} else e.pendingIndex != null && y.updateRow(n, h, e.pendingIndex, {
|
|
338
333
|
...e.values,
|
|
339
334
|
...a,
|
|
@@ -344,13 +339,13 @@ function dl(k) {
|
|
|
344
339
|
[
|
|
345
340
|
y,
|
|
346
341
|
Y,
|
|
347
|
-
|
|
348
|
-
|
|
342
|
+
P,
|
|
343
|
+
_e,
|
|
349
344
|
Qe,
|
|
350
|
-
|
|
345
|
+
Oe,
|
|
351
346
|
n,
|
|
352
347
|
h,
|
|
353
|
-
|
|
348
|
+
j,
|
|
354
349
|
se
|
|
355
350
|
]
|
|
356
351
|
), Me = ee(
|
|
@@ -363,9 +358,9 @@ function dl(k) {
|
|
|
363
358
|
});
|
|
364
359
|
},
|
|
365
360
|
[y, n, h, i.key_field, i.category_field, d]
|
|
366
|
-
), { data: Je } =
|
|
361
|
+
), { data: Je } = me({
|
|
367
362
|
queryKey: ["plan-grid-keys", i.key_collection],
|
|
368
|
-
queryFn: () =>
|
|
363
|
+
queryFn: () => R.request(
|
|
369
364
|
fe(`/items/${i.key_collection}`, { fields: "id", sort: "-id", limit: 200 })
|
|
370
365
|
).then((e) => (e.data ?? []).map((a) => a.id)),
|
|
371
366
|
enabled: !!i.key_collection && !!(m != null && m.closed_through),
|
|
@@ -374,21 +369,21 @@ function dl(k) {
|
|
|
374
369
|
(e, a) => {
|
|
375
370
|
const l = Number(e);
|
|
376
371
|
if (!Number.isInteger(l)) return null;
|
|
377
|
-
const r = String(l + 1), o = d.filter((
|
|
378
|
-
let
|
|
379
|
-
return i.key_collection && Je && !Je.some((
|
|
372
|
+
const r = String(l + 1), o = d.filter((q) => !Z(r, q)), g = oe.find((q) => q.key === r);
|
|
373
|
+
let O = null, z = null;
|
|
374
|
+
return i.key_collection && Je && !Je.some((q) => String(q) === r) ? z = `${r} is not set up yet` : o.length === 0 ? z = `${r} has no open period either` : (g == null ? void 0 : g.mode) === "split" ? a == null ? z = `${r} is planned by category and this line is not` : O = g.cats.find((q) => q.cat === a) ?? null : (g == null ? void 0 : g.mode) === "top" && (a != null ? z = `${r} is planned as one line and this one is by category` : O = g.top), { key: r, cat: a, openColumns: o, row: O, blocked: z };
|
|
380
375
|
},
|
|
381
|
-
[d,
|
|
376
|
+
[d, Z, oe, i.key_collection, Je]
|
|
382
377
|
), Ze = ee(
|
|
383
378
|
(e, a, l, r) => {
|
|
384
379
|
if (!r || Object.keys(r.patch).length === 0) return X(e, a, l);
|
|
385
|
-
const o = K(Y({ ...e.values, ...a }) - Y(e.values)), g = r.target.row,
|
|
380
|
+
const o = K(Y({ ...e.values, ...a }) - Y(e.values)), g = r.target.row, O = K(
|
|
386
381
|
Y({ ...(g == null ? void 0 : g.values) ?? {}, ...r.patch }) - Y((g == null ? void 0 : g.values) ?? {})
|
|
387
382
|
);
|
|
388
|
-
return o <= 0 ? g ? X(g, r.patch, l, { credit: -o }) ? X(e, a, l, { early: !0 }) : !1 :
|
|
383
|
+
return o <= 0 ? g ? X(g, r.patch, l, { credit: -o }) ? X(e, a, l, { early: !0 }) : !1 : O > -o + 5e-3 || !X(e, a, l, { early: !0 }) ? !1 : (Me(Number(r.target.key), r.patch, l, r.target.cat), !0) : g ? X(e, a, l, { credit: -O }) ? X(g, r.patch, l, { early: !0 }) : !1 : X(e, a, l);
|
|
389
384
|
},
|
|
390
385
|
[X, Y, Me]
|
|
391
|
-
),
|
|
386
|
+
), Wt = ee(
|
|
392
387
|
(e) => {
|
|
393
388
|
if (!y) return;
|
|
394
389
|
const a = [...e.top ? [e.top] : [], ...e.cats];
|
|
@@ -397,9 +392,9 @@ function dl(k) {
|
|
|
397
392
|
for (const l of a) l.id && y.queueDelete(n, h, l.id);
|
|
398
393
|
},
|
|
399
394
|
[y, n, h]
|
|
400
|
-
),
|
|
401
|
-
w.invalidateQueries({ queryKey: ["o2m-rows", n, h, f] }), w.invalidateQueries({ queryKey: ze }),
|
|
402
|
-
}, [w, n, h, f, ze,
|
|
395
|
+
), Ht = ee(() => {
|
|
396
|
+
w.invalidateQueries({ queryKey: ["o2m-rows", n, h, f] }), w.invalidateQueries({ queryKey: ze }), je && w.invalidateQueries({ queryKey: ["o2m-compare", je] });
|
|
397
|
+
}, [w, n, h, f, ze, je]), Ye = he(null), ke = G(() => {
|
|
403
398
|
const e = [];
|
|
404
399
|
for (const a of oe)
|
|
405
400
|
if (a.mode === "top" && a.top && e.push(a.top.uid), a.mode === "split") for (const l of a.cats) e.push(l.uid);
|
|
@@ -410,37 +405,37 @@ function dl(k) {
|
|
|
410
405
|
return l ? (l.focus(), l.select(), !0) : !1;
|
|
411
406
|
}, []), wt = ee(
|
|
412
407
|
(e, a, l, r) => {
|
|
413
|
-
let o =
|
|
414
|
-
for (let
|
|
415
|
-
if (o += l, g += r, o < 0 || o >=
|
|
408
|
+
let o = ke.indexOf(e), g = d.indexOf(a);
|
|
409
|
+
for (let O = 0; O < 40; O++)
|
|
410
|
+
if (o += l, g += r, o < 0 || o >= ke.length || g < 0 || g >= d.length || Nt(ke[o], d[g])) return;
|
|
416
411
|
},
|
|
417
|
-
[
|
|
412
|
+
[ke, d, Nt]
|
|
418
413
|
), $t = ee(
|
|
419
414
|
(e, a, l) => {
|
|
420
415
|
const r = l.replace(/\r/g, "").split(`
|
|
421
|
-
`).filter((
|
|
422
|
-
let
|
|
416
|
+
`).filter((q) => q.trim() !== ""), o = ke.indexOf(e.uid), g = d.indexOf(a);
|
|
417
|
+
let O = 0;
|
|
423
418
|
const z = [];
|
|
424
|
-
r.forEach((
|
|
425
|
-
const H = J.find((p) => p.uid ===
|
|
419
|
+
r.forEach((q, $) => {
|
|
420
|
+
const H = J.find((p) => p.uid === ke[o + $]);
|
|
426
421
|
if (!H) return;
|
|
427
422
|
const te = {};
|
|
428
|
-
|
|
429
|
-
const ae = d[g +
|
|
423
|
+
q.split(" ").forEach((p, C) => {
|
|
424
|
+
const ae = d[g + C];
|
|
430
425
|
if (!ae || Ie(H.key, ae)) return;
|
|
431
|
-
const
|
|
432
|
-
if (
|
|
426
|
+
const Te = Bt(p);
|
|
427
|
+
if (Te == null || Te < 0) {
|
|
433
428
|
z.push(p.trim());
|
|
434
429
|
return;
|
|
435
430
|
}
|
|
436
|
-
te[ae] =
|
|
437
|
-
}), Object.keys(te).length && X(H, te) && (
|
|
431
|
+
te[ae] = Te;
|
|
432
|
+
}), Object.keys(te).length && X(H, te) && (O += Object.keys(te).length);
|
|
438
433
|
}), z.length && ie.error(
|
|
439
434
|
`${z.length} pasted ${z.length === 1 ? "cell was" : "cells were"} left out — ${Ut(z[0])}`
|
|
440
|
-
),
|
|
435
|
+
), O && ie.success(`Pasted ${O} ${O === 1 ? "figure" : "figures"}`);
|
|
441
436
|
},
|
|
442
|
-
[
|
|
443
|
-
), [
|
|
437
|
+
[ke, d, J, Ie, X]
|
|
438
|
+
), [Qt, Ct] = W(/* @__PURE__ */ new Set()), Xe = he(null);
|
|
444
439
|
ue(() => {
|
|
445
440
|
const e = (a) => {
|
|
446
441
|
const l = a.detail;
|
|
@@ -460,7 +455,7 @@ function dl(k) {
|
|
|
460
455
|
};
|
|
461
456
|
return window.addEventListener("nvr:grid-open-row", e), () => window.removeEventListener("nvr:grid-open-row", e);
|
|
462
457
|
}, [n, J]);
|
|
463
|
-
const [
|
|
458
|
+
const [Vt, Jt] = W(() => {
|
|
464
459
|
try {
|
|
465
460
|
return new Set(
|
|
466
461
|
JSON.parse(localStorage.getItem(`nvr_pg_dismissed:${n}:${f}`) ?? "[]")
|
|
@@ -468,8 +463,8 @@ function dl(k) {
|
|
|
468
463
|
} catch {
|
|
469
464
|
return /* @__PURE__ */ new Set();
|
|
470
465
|
}
|
|
471
|
-
}), St = ((m == null ? void 0 : m.proposals) ?? []).filter((e) => !
|
|
472
|
-
|
|
466
|
+
}), St = ((m == null ? void 0 : m.proposals) ?? []).filter((e) => !Vt.has(e.id)), _t = (e, a) => {
|
|
467
|
+
Jt((l) => {
|
|
473
468
|
const r = new Set(l).add(e.id);
|
|
474
469
|
if (a)
|
|
475
470
|
try {
|
|
@@ -478,71 +473,71 @@ function dl(k) {
|
|
|
478
473
|
}
|
|
479
474
|
return r;
|
|
480
475
|
});
|
|
481
|
-
},
|
|
476
|
+
}, Gt = (e) => {
|
|
482
477
|
let a = 0;
|
|
483
478
|
for (const l of e.rows) {
|
|
484
|
-
const r = String(l.key), o = oe.find((
|
|
479
|
+
const r = String(l.key), o = oe.find(($) => $.key === r);
|
|
485
480
|
if ((o == null ? void 0 : o.mode) === "split" != (l.category != null)) continue;
|
|
486
|
-
const g = e.mode === "add",
|
|
481
|
+
const g = e.mode === "add", O = Object.fromEntries(
|
|
487
482
|
Object.entries(l.values).filter(
|
|
488
|
-
([
|
|
483
|
+
([$, H]) => d.includes($) && !Z(r, $) && (g ? D(H) !== 0 : D(H) > 0)
|
|
489
484
|
)
|
|
490
|
-
), z = (
|
|
491
|
-
Object.entries(
|
|
492
|
-
),
|
|
485
|
+
), z = ($) => Object.fromEntries(
|
|
486
|
+
Object.entries(O).map(([H, te]) => [H, Math.max(0, K(D($ == null ? void 0 : $[H]) + D(te)))]).filter(([H, te]) => Math.abs(te - D($ == null ? void 0 : $[H])) >= 5e-3)
|
|
487
|
+
), q = l.category != null ? o == null ? void 0 : o.cats.find(($) => String($.cat) === String(l.category)) : null;
|
|
493
488
|
if (l.category != null) {
|
|
494
|
-
if (!
|
|
495
|
-
const
|
|
496
|
-
Object.keys(
|
|
489
|
+
if (!q) continue;
|
|
490
|
+
const $ = g ? z(q.values) : Object.fromEntries(Object.entries(O).filter(([H]) => D(q.values[H]) === 0));
|
|
491
|
+
Object.keys($).length && X(q, $, e.change_reason) && (a += Object.keys($).length);
|
|
497
492
|
} else if (o != null && o.top) {
|
|
498
|
-
const
|
|
493
|
+
const $ = g ? z(o.top.values) : Object.fromEntries(Object.entries(O).filter(([H]) => {
|
|
499
494
|
var te;
|
|
500
495
|
return D((te = o.top) == null ? void 0 : te.values[H]) === 0;
|
|
501
496
|
}));
|
|
502
|
-
Object.keys(
|
|
503
|
-
} else Object.keys(
|
|
497
|
+
Object.keys($).length && X(o.top, $, e.change_reason) && (a += Object.keys($).length);
|
|
498
|
+
} else Object.keys(O).length && !(g && Object.values(O).every(($) => D($) < 0)) && (Me(l.key, g ? z(void 0) : O, e.change_reason), a += Object.keys(O).length);
|
|
504
499
|
}
|
|
505
500
|
a ? ie.success(
|
|
506
501
|
`${e.label}: ${a} ${a === 1 ? "figure" : "figures"} staged — Save to keep them`
|
|
507
502
|
) : ie.message(
|
|
508
503
|
e.mode === "add" ? "Nothing to move — no open period could take it" : "Nothing to fill — those periods already hold a figure"
|
|
509
504
|
), _t(e, !1);
|
|
510
|
-
}, [Q, et] = W(null), De =
|
|
505
|
+
}, [Q, et] = W(null), De = Ma(), tt = Q && (De != null && De.renderRowHistory) ? De.renderRowHistory({
|
|
511
506
|
collection: n,
|
|
512
507
|
parentId: f,
|
|
513
508
|
rowId: Q.id,
|
|
514
509
|
key: Q.key,
|
|
515
510
|
category: Q.cat,
|
|
516
|
-
categoryLabel: (e) =>
|
|
511
|
+
categoryLabel: (e) => ge(String(e)),
|
|
517
512
|
onClose: () => et(null)
|
|
518
|
-
}) : null, { data:
|
|
513
|
+
}) : null, { data: Zt = [], isLoading: Yt } = me({
|
|
519
514
|
queryKey: ["o2m-row-revisions", n, Q == null ? void 0 : Q.id],
|
|
520
|
-
queryFn: () =>
|
|
515
|
+
queryFn: () => R.request(
|
|
521
516
|
fe("/revisions", { collection: n, item: String(Q == null ? void 0 : Q.id) })
|
|
522
517
|
).then((e) => e.data ?? []),
|
|
523
518
|
enabled: !!(Q != null && Q.id) && tt == null,
|
|
524
519
|
staleTime: 15e3
|
|
525
|
-
}), { data: Ot = [] } =
|
|
520
|
+
}), { data: Ot = [] } = me({
|
|
526
521
|
queryKey: ["plan-grid-fields", n],
|
|
527
|
-
queryFn: () =>
|
|
522
|
+
queryFn: () => R.request(fe(`/field-config/${n}`)).then((e) => e.data ?? []),
|
|
528
523
|
enabled: !!Q,
|
|
529
524
|
staleTime: 5 * 6e4
|
|
530
|
-
}), [at,
|
|
531
|
-
yt.current = (e) => `${e.key} ${
|
|
532
|
-
const
|
|
533
|
-
if (
|
|
534
|
-
const e = d.filter((a) =>
|
|
525
|
+
}), [at, Xt] = W(!1), Lt = oe.some((e) => e.mode === "split"), Re = Dt(m);
|
|
526
|
+
yt.current = (e) => `${e.key} ${Re.toLowerCase()}${e.cat != null ? ` · ${ge(e.cat)}` : ""}`;
|
|
527
|
+
const we = (m == null ? void 0 : m.label) ?? (b == null ? void 0 : b.label) ?? "Actual", Be = $a(m == null ? void 0 : m.closed_through), Ee = m != null && m.closed_through ? Number(m.closed_through.split("-")[0]) : null, ea = G(() => {
|
|
528
|
+
if (Ee == null) return null;
|
|
529
|
+
const e = d.filter((a) => Z(String(Ee), a));
|
|
535
530
|
return e[e.length - 1] ?? null;
|
|
536
|
-
}, [
|
|
531
|
+
}, [Ee, d, Z]), ta = G(
|
|
537
532
|
() => new Set(oe.filter((e) => e.mode !== "ghost").map((e) => e.key)),
|
|
538
533
|
[oe]
|
|
539
|
-
),
|
|
540
|
-
let a =
|
|
534
|
+
), aa = I ? nt(I, _e) : null, la = (e) => {
|
|
535
|
+
let a = aa ?? 0;
|
|
541
536
|
if (e.cat != null) {
|
|
542
|
-
const g =
|
|
537
|
+
const g = Oe.find((O) => O.id === e.cat);
|
|
543
538
|
g && (a = Math.min(a, g.left));
|
|
544
539
|
}
|
|
545
|
-
const l = d.filter((g) => !
|
|
540
|
+
const l = d.filter((g) => !Z(e.key, g) && D(e.values[g]) === 0);
|
|
546
541
|
if (a < 5e-3 || l.length === 0) {
|
|
547
542
|
ie.message(
|
|
548
543
|
a < 5e-3 ? "Nothing is left to spread" : "No empty open periods on this line"
|
|
@@ -550,15 +545,15 @@ function dl(k) {
|
|
|
550
545
|
return;
|
|
551
546
|
}
|
|
552
547
|
const r = Math.floor(a / l.length * 100) / 100, o = {};
|
|
553
|
-
l.forEach((g,
|
|
554
|
-
o[g] =
|
|
548
|
+
l.forEach((g, O) => {
|
|
549
|
+
o[g] = O === l.length - 1 ? K(a - r * (l.length - 1)) : r;
|
|
555
550
|
}), X(e, o) && ie.success(`${U(a)} spread over ${l.length} open periods`);
|
|
556
|
-
}, lt =
|
|
551
|
+
}, lt = G(() => {
|
|
557
552
|
const e = {}, a = {};
|
|
558
553
|
for (const l of d)
|
|
559
554
|
e[l] = K(J.reduce((r, o) => r + D(o.values[l]), 0)), a[l] = K(((m == null ? void 0 : m.rows) ?? []).reduce((r, o) => r + D(o.values[l]), 0));
|
|
560
555
|
return { planBy: e, actualBy: a };
|
|
561
|
-
}, [d, J, m]),
|
|
556
|
+
}, [d, J, m]), na = Pt + d.length * jt + qt;
|
|
562
557
|
return !s && de ? /* @__PURE__ */ t("div", { className: "space-y-1.5", "data-plan-grid-loading": !0, children: [0, 1, 2].map((e) => /* @__PURE__ */ t(
|
|
563
558
|
"div",
|
|
564
559
|
{
|
|
@@ -571,7 +566,7 @@ function dl(k) {
|
|
|
571
566
|
Ca,
|
|
572
567
|
{
|
|
573
568
|
proposals: St,
|
|
574
|
-
onApply:
|
|
569
|
+
onApply: Gt,
|
|
575
570
|
onDismiss: (e) => _t(e, !0)
|
|
576
571
|
}
|
|
577
572
|
),
|
|
@@ -580,8 +575,8 @@ function dl(k) {
|
|
|
580
575
|
Sa,
|
|
581
576
|
{
|
|
582
577
|
data: m,
|
|
583
|
-
loading: !!b && !s &&
|
|
584
|
-
error: !!b && !s &&
|
|
578
|
+
loading: !!b && !s && qe.isLoading,
|
|
579
|
+
error: !!b && !s && qe.isError
|
|
585
580
|
}
|
|
586
581
|
),
|
|
587
582
|
kt.map((e) => /* @__PURE__ */ t(
|
|
@@ -594,22 +589,22 @@ function dl(k) {
|
|
|
594
589
|
},
|
|
595
590
|
e.label
|
|
596
591
|
)),
|
|
597
|
-
|
|
592
|
+
Oe.length > 1 && Lt && /* @__PURE__ */ u(
|
|
598
593
|
"button",
|
|
599
594
|
{
|
|
600
595
|
type: "button",
|
|
601
596
|
"data-plan-grid-categories-toggle": !0,
|
|
602
597
|
"aria-expanded": at,
|
|
603
|
-
onClick: () =>
|
|
598
|
+
onClick: () => Xt((e) => !e),
|
|
604
599
|
className: "inline-flex h-[28px] items-center gap-1 rounded-md px-2 text-[11.5px] font-medium text-slate-600 hover:bg-muted dark:text-slate-300",
|
|
605
600
|
children: [
|
|
606
|
-
at ? /* @__PURE__ */ t(
|
|
601
|
+
at ? /* @__PURE__ */ t(Mt, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ t(Rt, { className: "h-3.5 w-3.5" }),
|
|
607
602
|
"By category"
|
|
608
603
|
]
|
|
609
604
|
}
|
|
610
605
|
)
|
|
611
606
|
] }),
|
|
612
|
-
at && Lt && /* @__PURE__ */ t("div", { className: "mb-2 flex flex-wrap gap-1.5", "data-plan-grid-categories": !0, children:
|
|
607
|
+
at && Lt && /* @__PURE__ */ t("div", { className: "mb-2 flex flex-wrap gap-1.5", "data-plan-grid-categories": !0, children: Oe.map((e) => /* @__PURE__ */ t(
|
|
613
608
|
Tt,
|
|
614
609
|
{
|
|
615
610
|
dataKey: `category:${e.id}`,
|
|
@@ -625,48 +620,48 @@ function dl(k) {
|
|
|
625
620
|
{
|
|
626
621
|
className: "overflow-x-auto rounded-lg border border-slate-200 dark:border-border",
|
|
627
622
|
"data-plan-grid-scroll": !0,
|
|
628
|
-
onFocusCapture:
|
|
629
|
-
onBlurCapture:
|
|
623
|
+
onFocusCapture: Pe,
|
|
624
|
+
onBlurCapture: zt,
|
|
630
625
|
children: /* @__PURE__ */ u(
|
|
631
626
|
"table",
|
|
632
627
|
{
|
|
633
628
|
className: "border-separate border-spacing-0 text-[12px] tabular-nums",
|
|
634
|
-
style: { width: "100%", minWidth:
|
|
629
|
+
style: { width: "100%", minWidth: na, tableLayout: "fixed" },
|
|
635
630
|
children: [
|
|
636
631
|
/* @__PURE__ */ u("colgroup", { children: [
|
|
637
|
-
/* @__PURE__ */ t("col", { style: { width:
|
|
638
|
-
d.map((e) => /* @__PURE__ */ t("col", { style: { width:
|
|
639
|
-
/* @__PURE__ */ t("col", { style: { width:
|
|
632
|
+
/* @__PURE__ */ t("col", { style: { width: Pt } }),
|
|
633
|
+
d.map((e) => /* @__PURE__ */ t("col", { style: { width: jt } }, e)),
|
|
634
|
+
/* @__PURE__ */ t("col", { style: { width: qt } })
|
|
640
635
|
] }),
|
|
641
636
|
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ u("tr", { children: [
|
|
642
637
|
/* @__PURE__ */ t(
|
|
643
638
|
"th",
|
|
644
639
|
{
|
|
645
640
|
className: B(
|
|
646
|
-
|
|
641
|
+
ve,
|
|
647
642
|
"z-[3] border-b px-3 py-1.5 text-left text-[10.5px] font-semibold uppercase tracking-wide text-slate-500 dark:text-slate-400"
|
|
648
643
|
),
|
|
649
644
|
children: rt(i.key_field)
|
|
650
645
|
}
|
|
651
646
|
),
|
|
652
647
|
d.map((e) => {
|
|
653
|
-
const a =
|
|
648
|
+
const a = Ee != null && Z(String(Ee), e);
|
|
654
649
|
return /* @__PURE__ */ t(
|
|
655
650
|
"th",
|
|
656
651
|
{
|
|
657
652
|
className: B(
|
|
658
653
|
"border-b border-slate-200 px-2.5 py-1.5 text-right text-[10.5px] font-semibold uppercase tracking-wide text-slate-500 dark:border-border dark:text-slate-400",
|
|
659
|
-
a &&
|
|
654
|
+
a && Ce
|
|
660
655
|
),
|
|
661
656
|
children: /* @__PURE__ */ u("span", { className: "inline-flex items-center justify-end gap-1", children: [
|
|
662
|
-
e ===
|
|
657
|
+
e === ea && /* @__PURE__ */ t(
|
|
663
658
|
"span",
|
|
664
659
|
{
|
|
665
660
|
"data-plan-grid-lock": !0,
|
|
666
661
|
"data-tip": `Closed through ${Be ?? ""}${m != null && m.closed_rule ? ` — ${m.closed_rule}` : ""}`,
|
|
667
662
|
className: "inline-flex",
|
|
668
663
|
children: /* @__PURE__ */ t(
|
|
669
|
-
|
|
664
|
+
sa,
|
|
670
665
|
{
|
|
671
666
|
className: "h-3 w-3",
|
|
672
667
|
"aria-label": `Closed through ${Be ?? ""}`
|
|
@@ -684,7 +679,7 @@ function dl(k) {
|
|
|
684
679
|
"th",
|
|
685
680
|
{
|
|
686
681
|
className: B(
|
|
687
|
-
|
|
682
|
+
Ne,
|
|
688
683
|
"z-[3] border-b px-3 py-1.5 text-right text-[10.5px] font-semibold uppercase tracking-wide text-slate-500 dark:text-slate-400"
|
|
689
684
|
),
|
|
690
685
|
children: i.total_label ?? "Total"
|
|
@@ -703,15 +698,15 @@ function dl(k) {
|
|
|
703
698
|
}
|
|
704
699
|
) }) }),
|
|
705
700
|
oe.map((e, a) => {
|
|
706
|
-
var
|
|
707
|
-
const l = !
|
|
708
|
-
var
|
|
709
|
-
return e.mode === "split" ? K(e.cats.reduce((ae,
|
|
710
|
-
}, o = K(d.reduce((p,
|
|
711
|
-
(p) => Math.abs(
|
|
712
|
-
),
|
|
713
|
-
(p) => d.some((
|
|
714
|
-
), z = d.some((p) => Math.abs(
|
|
701
|
+
var $, H, te;
|
|
702
|
+
const l = !Qt.has(e.key), r = (p) => {
|
|
703
|
+
var C;
|
|
704
|
+
return e.mode === "split" ? K(e.cats.reduce((ae, Te) => ae + D(Te.values[p]), 0)) : D((C = e.top) == null ? void 0 : C.values[p]);
|
|
705
|
+
}, o = K(d.reduce((p, C) => p + r(C), 0)), g = d.some(
|
|
706
|
+
(p) => Math.abs(Le(e.key, Ue, p).value) >= 5e-3
|
|
707
|
+
), O = ((m == null ? void 0 : m.series) ?? []).filter(
|
|
708
|
+
(p) => d.some((C) => Math.abs($e(p, e.key, C) ?? 0) >= 5e-3)
|
|
709
|
+
), z = d.some((p) => Math.abs(Le(e.key, null, p).value) >= 5e-3), q = ((($ = e.top) == null ? void 0 : $.edited) || ((H = e.top) == null ? void 0 : H.isNew) || e.cats.some((p) => p.edited || p.isNew)) ?? !1;
|
|
715
710
|
return /* @__PURE__ */ u(
|
|
716
711
|
"tbody",
|
|
717
712
|
{
|
|
@@ -727,7 +722,7 @@ function dl(k) {
|
|
|
727
722
|
a > 0 && "[&>td]:border-t [&>td]:border-slate-200 dark:[&>td]:border-border"
|
|
728
723
|
),
|
|
729
724
|
children: [
|
|
730
|
-
/* @__PURE__ */ t("td", { className: B(
|
|
725
|
+
/* @__PURE__ */ t("td", { className: B(ve, "px-2 py-1"), children: /* @__PURE__ */ u("div", { className: "flex items-center gap-1", children: [
|
|
731
726
|
e.mode === "split" ? /* @__PURE__ */ t(
|
|
732
727
|
"button",
|
|
733
728
|
{
|
|
@@ -735,15 +730,15 @@ function dl(k) {
|
|
|
735
730
|
"aria-expanded": l,
|
|
736
731
|
"aria-label": `${l ? "Collapse" : "Expand"} ${e.key}`,
|
|
737
732
|
onClick: () => Ct((p) => {
|
|
738
|
-
const
|
|
739
|
-
return
|
|
733
|
+
const C = new Set(p);
|
|
734
|
+
return C.has(e.key) ? C.delete(e.key) : C.add(e.key), C;
|
|
740
735
|
}),
|
|
741
736
|
className: "rounded p-0.5 text-slate-500 hover:bg-muted",
|
|
742
|
-
children: l ? /* @__PURE__ */ t(
|
|
737
|
+
children: l ? /* @__PURE__ */ t(Mt, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ t(Rt, { className: "h-3.5 w-3.5" })
|
|
743
738
|
}
|
|
744
739
|
) : /* @__PURE__ */ t("span", { className: "w-[18px]" }),
|
|
745
740
|
/* @__PURE__ */ t("span", { className: "text-[13px] font-semibold text-slate-900 dark:text-slate-100", children: e.key }),
|
|
746
|
-
|
|
741
|
+
q && /* @__PURE__ */ t(
|
|
747
742
|
"span",
|
|
748
743
|
{
|
|
749
744
|
"data-plan-edited": !0,
|
|
@@ -751,26 +746,26 @@ function dl(k) {
|
|
|
751
746
|
className: "h-1.5 w-1.5 rounded-full bg-amber-500"
|
|
752
747
|
}
|
|
753
748
|
),
|
|
754
|
-
/* @__PURE__ */ t("span", { className: "ml-auto text-[10.5px] font-medium text-slate-500 dark:text-slate-400", children: e.mode === "ghost" ? "" :
|
|
749
|
+
/* @__PURE__ */ t("span", { className: "ml-auto text-[10.5px] font-medium text-slate-500 dark:text-slate-400", children: e.mode === "ghost" ? "" : Re }),
|
|
755
750
|
c && e.mode !== "ghost" && /* @__PURE__ */ t(
|
|
756
751
|
Fa,
|
|
757
752
|
{
|
|
758
753
|
block: e,
|
|
759
754
|
config: i,
|
|
760
|
-
canSplit: !!
|
|
761
|
-
splitUnavailable:
|
|
762
|
-
const p = pe.categories.filter((
|
|
755
|
+
canSplit: !!xe && !!(pe != null && pe.can_split) && !s,
|
|
756
|
+
splitUnavailable: xe && pe && !pe.can_split && !s ? (() => {
|
|
757
|
+
const p = pe.categories.filter((C) => C.cap > 5e-3);
|
|
763
758
|
return p.length === 1 ? `Every line on this record is ${p[0].label} — there is nothing to split between.` : "This record has no categorised lines yet — add lines first.";
|
|
764
759
|
})() : null,
|
|
765
|
-
splitBase:
|
|
766
|
-
client:
|
|
760
|
+
splitBase: xe,
|
|
761
|
+
client: R,
|
|
767
762
|
cols: d,
|
|
768
|
-
catLabel:
|
|
763
|
+
catLabel: ge,
|
|
769
764
|
showHistory: x,
|
|
770
765
|
onHistory: et,
|
|
771
|
-
onSpread: I ?
|
|
772
|
-
onRemove: () =>
|
|
773
|
-
onDone:
|
|
766
|
+
onSpread: I ? la : null,
|
|
767
|
+
onRemove: () => Wt(e),
|
|
768
|
+
onDone: Ht,
|
|
774
769
|
rc: n
|
|
775
770
|
}
|
|
776
771
|
)
|
|
@@ -781,7 +776,7 @@ function dl(k) {
|
|
|
781
776
|
colSpan: d.length,
|
|
782
777
|
className: "px-3 py-1 text-[12px] text-slate-500 dark:text-slate-400",
|
|
783
778
|
children: [
|
|
784
|
-
`No ${
|
|
779
|
+
`No ${Re.toLowerCase()} for ${e.key}`,
|
|
785
780
|
c && /* @__PURE__ */ t(
|
|
786
781
|
"button",
|
|
787
782
|
{
|
|
@@ -795,13 +790,13 @@ function dl(k) {
|
|
|
795
790
|
]
|
|
796
791
|
}
|
|
797
792
|
) : d.map((p) => {
|
|
798
|
-
const
|
|
793
|
+
const C = Z(e.key, p);
|
|
799
794
|
return e.mode === "split" ? /* @__PURE__ */ t(
|
|
800
795
|
"td",
|
|
801
796
|
{
|
|
802
797
|
className: B(
|
|
803
798
|
"px-2.5 py-1 text-right font-semibold text-slate-900 dark:text-slate-100",
|
|
804
|
-
|
|
799
|
+
C && Ce
|
|
805
800
|
),
|
|
806
801
|
children: /* @__PURE__ */ t(ne, { n: r(p) })
|
|
807
802
|
},
|
|
@@ -811,11 +806,11 @@ function dl(k) {
|
|
|
811
806
|
{
|
|
812
807
|
row: e.top,
|
|
813
808
|
col: p,
|
|
814
|
-
closed:
|
|
809
|
+
closed: C,
|
|
815
810
|
prov: ce(e.top, p),
|
|
816
811
|
cellKey: V(e.top, p),
|
|
817
812
|
locked: Ie(e.key, p),
|
|
818
|
-
lockedTip:
|
|
813
|
+
lockedTip: C ? (m == null ? void 0 : m.closed_locked_message) ?? "This period is closed" : void 0,
|
|
819
814
|
onCommit: (ae) => X(e.top, { [p]: ae }),
|
|
820
815
|
onMove: wt,
|
|
821
816
|
onPaste: $t
|
|
@@ -827,7 +822,7 @@ function dl(k) {
|
|
|
827
822
|
"td",
|
|
828
823
|
{
|
|
829
824
|
className: B(
|
|
830
|
-
|
|
825
|
+
Ne,
|
|
831
826
|
"px-3 py-1 text-right font-semibold text-slate-900 dark:text-slate-100"
|
|
832
827
|
),
|
|
833
828
|
children: e.mode === "ghost" ? "" : /* @__PURE__ */ t(ne, { n: o })
|
|
@@ -839,22 +834,22 @@ function dl(k) {
|
|
|
839
834
|
m && /* @__PURE__ */ t(
|
|
840
835
|
st,
|
|
841
836
|
{
|
|
842
|
-
label:
|
|
837
|
+
label: we,
|
|
843
838
|
blockKey: e.key,
|
|
844
839
|
cat: null,
|
|
845
840
|
cols: d,
|
|
846
841
|
compare: m,
|
|
847
842
|
planOf: r,
|
|
848
|
-
actualFor:
|
|
849
|
-
isClosed:
|
|
843
|
+
actualFor: Le,
|
|
844
|
+
isClosed: Z,
|
|
850
845
|
row: e.mode === "top" ? e.top : null,
|
|
851
846
|
canReconcile: c && e.mode === "top",
|
|
852
847
|
onReconcile: Ze,
|
|
853
848
|
carryFor: Ge
|
|
854
849
|
}
|
|
855
850
|
),
|
|
856
|
-
e.mode !== "split" &&
|
|
857
|
-
/* @__PURE__ */ t("td", { className: B(
|
|
851
|
+
e.mode !== "split" && O.map((p) => /* @__PURE__ */ u("tr", { "data-compare-series": p.key, children: [
|
|
852
|
+
/* @__PURE__ */ t("td", { className: B(ve, "px-2 py-0.5"), children: /* @__PURE__ */ t(
|
|
858
853
|
"span",
|
|
859
854
|
{
|
|
860
855
|
"data-tip": p.hint ?? "",
|
|
@@ -862,38 +857,38 @@ function dl(k) {
|
|
|
862
857
|
children: p.label
|
|
863
858
|
}
|
|
864
859
|
) }),
|
|
865
|
-
d.map((
|
|
860
|
+
d.map((C) => /* @__PURE__ */ t(
|
|
866
861
|
"td",
|
|
867
862
|
{
|
|
868
863
|
className: B(
|
|
869
864
|
"px-2.5 py-0.5 text-right text-[11.5px] text-slate-500 dark:text-slate-400",
|
|
870
|
-
|
|
865
|
+
Z(e.key, C) && Ce
|
|
871
866
|
),
|
|
872
|
-
children: Math.abs(
|
|
873
|
-
|
|
867
|
+
children: Math.abs($e(p, e.key, C) ?? 0) >= 5e-3 ? /* @__PURE__ */ t(
|
|
868
|
+
At,
|
|
874
869
|
{
|
|
875
870
|
series: p,
|
|
876
|
-
value:
|
|
877
|
-
periodLabel: `${
|
|
878
|
-
children: /* @__PURE__ */ t(ne, { n:
|
|
871
|
+
value: $e(p, e.key, C) ?? 0,
|
|
872
|
+
periodLabel: `${Ae(C)} ${e.key}`,
|
|
873
|
+
children: /* @__PURE__ */ t(ne, { n: $e(p, e.key, C) ?? 0, muted: !0 })
|
|
879
874
|
}
|
|
880
875
|
) : /* @__PURE__ */ t(ne, { n: 0, muted: !0 })
|
|
881
876
|
},
|
|
882
|
-
|
|
877
|
+
C
|
|
883
878
|
)),
|
|
884
879
|
/* @__PURE__ */ t(
|
|
885
880
|
"td",
|
|
886
881
|
{
|
|
887
882
|
className: B(
|
|
888
|
-
|
|
883
|
+
Ne,
|
|
889
884
|
"px-3 py-0.5 text-right text-[11.5px] text-slate-500 dark:text-slate-400"
|
|
890
885
|
),
|
|
891
886
|
children: /* @__PURE__ */ t(
|
|
892
|
-
|
|
887
|
+
At,
|
|
893
888
|
{
|
|
894
889
|
series: p,
|
|
895
890
|
value: K(
|
|
896
|
-
d.reduce((
|
|
891
|
+
d.reduce((C, ae) => C + ($e(p, e.key, ae) ?? 0), 0)
|
|
897
892
|
),
|
|
898
893
|
periodLabel: String(e.key),
|
|
899
894
|
whole: !0,
|
|
@@ -901,7 +896,7 @@ function dl(k) {
|
|
|
901
896
|
ne,
|
|
902
897
|
{
|
|
903
898
|
n: K(
|
|
904
|
-
d.reduce((
|
|
899
|
+
d.reduce((C, ae) => C + ($e(p, e.key, ae) ?? 0), 0)
|
|
905
900
|
),
|
|
906
901
|
muted: !0
|
|
907
902
|
}
|
|
@@ -911,40 +906,40 @@ function dl(k) {
|
|
|
911
906
|
}
|
|
912
907
|
)
|
|
913
908
|
] }, p.key)),
|
|
914
|
-
e.mode === "split" && l && e.cats.map((p) => /* @__PURE__ */ u(
|
|
909
|
+
e.mode === "split" && l && e.cats.map((p) => /* @__PURE__ */ u(ja, { children: [
|
|
915
910
|
/* @__PURE__ */ u(
|
|
916
911
|
"tr",
|
|
917
912
|
{
|
|
918
913
|
"data-o2m-row": p.id ? `${n}:${p.id}` : void 0,
|
|
919
914
|
"data-plan-category": p.cat ?? "",
|
|
920
915
|
children: [
|
|
921
|
-
/* @__PURE__ */ t("td", { className: B(
|
|
922
|
-
/* @__PURE__ */ t("span", { className: "truncate text-[12.5px] font-medium text-slate-800 dark:text-slate-100", children:
|
|
916
|
+
/* @__PURE__ */ t("td", { className: B(ve, "px-2 py-1"), children: /* @__PURE__ */ u("div", { className: "flex items-center gap-1 pl-[22px]", children: [
|
|
917
|
+
/* @__PURE__ */ t("span", { className: "truncate text-[12.5px] font-medium text-slate-800 dark:text-slate-100", children: ge(p.cat) }),
|
|
923
918
|
(p.edited || p.isNew) && /* @__PURE__ */ t("span", { className: "h-1.5 w-1.5 rounded-full bg-amber-500" }),
|
|
924
|
-
/* @__PURE__ */ t("span", { className: "ml-auto text-[10.5px] font-medium text-slate-500 dark:text-slate-400", children:
|
|
919
|
+
/* @__PURE__ */ t("span", { className: "ml-auto text-[10.5px] font-medium text-slate-500 dark:text-slate-400", children: Re })
|
|
925
920
|
] }) }),
|
|
926
|
-
d.map((
|
|
921
|
+
d.map((C) => /* @__PURE__ */ t(
|
|
927
922
|
Ft,
|
|
928
923
|
{
|
|
929
924
|
row: p,
|
|
930
|
-
rowLabel: p.cat != null ?
|
|
931
|
-
col:
|
|
932
|
-
closed:
|
|
933
|
-
prov: ce(p,
|
|
934
|
-
cellKey: V(p,
|
|
935
|
-
locked: Ie(e.key,
|
|
936
|
-
lockedTip:
|
|
937
|
-
onCommit: (ae) => X(p, { [
|
|
925
|
+
rowLabel: p.cat != null ? ge(String(p.cat)) : void 0,
|
|
926
|
+
col: C,
|
|
927
|
+
closed: Z(e.key, C),
|
|
928
|
+
prov: ce(p, C),
|
|
929
|
+
cellKey: V(p, C),
|
|
930
|
+
locked: Ie(e.key, C),
|
|
931
|
+
lockedTip: Z(e.key, C) ? (m == null ? void 0 : m.closed_locked_message) ?? "This period is closed" : void 0,
|
|
932
|
+
onCommit: (ae) => X(p, { [C]: ae }),
|
|
938
933
|
onMove: wt,
|
|
939
934
|
onPaste: $t
|
|
940
935
|
},
|
|
941
|
-
|
|
936
|
+
C
|
|
942
937
|
)),
|
|
943
938
|
/* @__PURE__ */ t(
|
|
944
939
|
"td",
|
|
945
940
|
{
|
|
946
941
|
className: B(
|
|
947
|
-
|
|
942
|
+
Ne,
|
|
948
943
|
"px-3 py-1 text-right font-medium text-slate-800 dark:text-slate-100"
|
|
949
944
|
),
|
|
950
945
|
children: /* @__PURE__ */ t(ne, { n: Y(p.values) })
|
|
@@ -956,14 +951,14 @@ function dl(k) {
|
|
|
956
951
|
m && z && /* @__PURE__ */ t(
|
|
957
952
|
st,
|
|
958
953
|
{
|
|
959
|
-
label:
|
|
954
|
+
label: we,
|
|
960
955
|
blockKey: e.key,
|
|
961
956
|
cat: p.cat,
|
|
962
957
|
cols: d,
|
|
963
958
|
compare: m,
|
|
964
|
-
planOf: (
|
|
965
|
-
actualFor:
|
|
966
|
-
isClosed:
|
|
959
|
+
planOf: (C) => D(p.values[C]),
|
|
960
|
+
actualFor: Le,
|
|
961
|
+
isClosed: Z,
|
|
967
962
|
row: p,
|
|
968
963
|
canReconcile: c,
|
|
969
964
|
onReconcile: Ze,
|
|
@@ -975,15 +970,15 @@ function dl(k) {
|
|
|
975
970
|
e.mode === "split" && l && m && g && /* @__PURE__ */ t(
|
|
976
971
|
st,
|
|
977
972
|
{
|
|
978
|
-
label: `${
|
|
979
|
-
tip: `${
|
|
973
|
+
label: `${ge(Ue)} · ${we.toLowerCase()}`,
|
|
974
|
+
tip: `${we} the source could not place in a category — it counts in the ${e.key} total only.`,
|
|
980
975
|
blockKey: e.key,
|
|
981
976
|
cat: Ue,
|
|
982
977
|
cols: d,
|
|
983
978
|
compare: m,
|
|
984
979
|
planOf: () => 0,
|
|
985
|
-
actualFor:
|
|
986
|
-
isClosed:
|
|
980
|
+
actualFor: Le,
|
|
981
|
+
isClosed: Z,
|
|
987
982
|
row: null,
|
|
988
983
|
canReconcile: !1,
|
|
989
984
|
onReconcile: Ze,
|
|
@@ -999,9 +994,9 @@ function dl(k) {
|
|
|
999
994
|
}),
|
|
1000
995
|
oe.length > 1 && /* @__PURE__ */ u("tfoot", { children: [
|
|
1001
996
|
/* @__PURE__ */ u("tr", { className: "[&>td]:border-t [&>td]:border-slate-300 dark:[&>td]:border-border", children: [
|
|
1002
|
-
/* @__PURE__ */ t("td", { className: B(
|
|
997
|
+
/* @__PURE__ */ t("td", { className: B(ve, "px-2 py-1.5"), children: /* @__PURE__ */ u("div", { className: "flex items-center pl-[22px]", children: [
|
|
1003
998
|
/* @__PURE__ */ t("span", { className: "text-[12px] font-semibold text-slate-900 dark:text-slate-100", children: "All" }),
|
|
1004
|
-
/* @__PURE__ */ t("span", { className: "ml-auto text-[10.5px] font-medium text-slate-500 dark:text-slate-400", children:
|
|
999
|
+
/* @__PURE__ */ t("span", { className: "ml-auto text-[10.5px] font-medium text-slate-500 dark:text-slate-400", children: Re })
|
|
1005
1000
|
] }) }),
|
|
1006
1001
|
d.map((e) => /* @__PURE__ */ t(
|
|
1007
1002
|
"td",
|
|
@@ -1015,7 +1010,7 @@ function dl(k) {
|
|
|
1015
1010
|
"td",
|
|
1016
1011
|
{
|
|
1017
1012
|
className: B(
|
|
1018
|
-
|
|
1013
|
+
Ne,
|
|
1019
1014
|
"px-3 py-1.5 text-right font-semibold text-slate-900 dark:text-slate-100"
|
|
1020
1015
|
),
|
|
1021
1016
|
children: /* @__PURE__ */ t(ne, { n: Qe })
|
|
@@ -1023,7 +1018,7 @@ function dl(k) {
|
|
|
1023
1018
|
)
|
|
1024
1019
|
] }),
|
|
1025
1020
|
m && /* @__PURE__ */ u("tr", { children: [
|
|
1026
|
-
/* @__PURE__ */ t("td", { className: B(
|
|
1021
|
+
/* @__PURE__ */ t("td", { className: B(ve, "px-2 pb-1.5 pt-0"), children: /* @__PURE__ */ t("span", { className: "block text-right text-[10.5px] font-medium text-slate-500 dark:text-slate-400", children: we }) }),
|
|
1027
1022
|
d.map((e) => /* @__PURE__ */ t(
|
|
1028
1023
|
"td",
|
|
1029
1024
|
{
|
|
@@ -1036,7 +1031,7 @@ function dl(k) {
|
|
|
1036
1031
|
"td",
|
|
1037
1032
|
{
|
|
1038
1033
|
className: B(
|
|
1039
|
-
|
|
1034
|
+
Ne,
|
|
1040
1035
|
"px-3 pb-1.5 pt-0 text-right text-[11.5px] text-slate-600 dark:text-slate-300"
|
|
1041
1036
|
),
|
|
1042
1037
|
children: /* @__PURE__ */ t(ne, { n: K(d.reduce((e, a) => e + lt.actualBy[a], 0)), muted: !0 })
|
|
@@ -1063,25 +1058,25 @@ function dl(k) {
|
|
|
1063
1058
|
Da,
|
|
1064
1059
|
{
|
|
1065
1060
|
config: i,
|
|
1066
|
-
client:
|
|
1067
|
-
used:
|
|
1061
|
+
client: R,
|
|
1062
|
+
used: ta,
|
|
1068
1063
|
onAdd: (e) => Me(e),
|
|
1069
1064
|
label: `Add ${rt(i.key_field).toLowerCase()}`
|
|
1070
1065
|
}
|
|
1071
1066
|
),
|
|
1072
|
-
(m == null ? void 0 : m.closed_locked) && !
|
|
1067
|
+
(m == null ? void 0 : m.closed_locked) && !L && Be && /* @__PURE__ */ t("span", { className: "text-[11.5px] text-slate-500 dark:text-slate-400", children: `Periods through ${Be} are closed — open a highlighted ${we.toLowerCase()} figure to reconcile one.` })
|
|
1073
1068
|
] }),
|
|
1074
1069
|
tt,
|
|
1075
1070
|
Q && tt == null && /* @__PURE__ */ t(
|
|
1076
|
-
|
|
1071
|
+
Ra,
|
|
1077
1072
|
{
|
|
1078
1073
|
open: !0,
|
|
1079
1074
|
onOpenChange: (e) => {
|
|
1080
1075
|
e || et(null);
|
|
1081
1076
|
},
|
|
1082
|
-
rowTitle: `${Q.key}${Q.cat ? ` · ${
|
|
1083
|
-
revisions:
|
|
1084
|
-
loading:
|
|
1077
|
+
rowTitle: `${Q.key}${Q.cat ? ` · ${ge(Q.cat)}` : ""}`,
|
|
1078
|
+
revisions: Zt,
|
|
1079
|
+
loading: Yt,
|
|
1085
1080
|
fields: Ot,
|
|
1086
1081
|
displayCols: Ot.filter(
|
|
1087
1082
|
(e) => d.includes(e.field) || e.field === i.category_field
|
|
@@ -1091,7 +1086,7 @@ function dl(k) {
|
|
|
1091
1086
|
relations: [],
|
|
1092
1087
|
collection: n,
|
|
1093
1088
|
m2oDisplays: {},
|
|
1094
|
-
client:
|
|
1089
|
+
client: R,
|
|
1095
1090
|
allowRestore: !1,
|
|
1096
1091
|
onRestore: () => {
|
|
1097
1092
|
}
|
|
@@ -1102,7 +1097,7 @@ function dl(k) {
|
|
|
1102
1097
|
function rt(k) {
|
|
1103
1098
|
return k.replace(/_/g, " ").replace(/^\w/, (n) => n.toUpperCase());
|
|
1104
1099
|
}
|
|
1105
|
-
function
|
|
1100
|
+
function ja(k) {
|
|
1106
1101
|
return /* @__PURE__ */ t(It, { children: k.children });
|
|
1107
1102
|
}
|
|
1108
1103
|
function ne(k) {
|
|
@@ -1115,57 +1110,57 @@ function Ft(k) {
|
|
|
1115
1110
|
col: f,
|
|
1116
1111
|
closed: i,
|
|
1117
1112
|
locked: b,
|
|
1118
|
-
lockedTip:
|
|
1119
|
-
prov:
|
|
1113
|
+
lockedTip: A,
|
|
1114
|
+
prov: P,
|
|
1120
1115
|
cellKey: I,
|
|
1121
1116
|
onCommit: T,
|
|
1122
1117
|
onMove: x,
|
|
1123
1118
|
onPaste: N
|
|
1124
|
-
} = k,
|
|
1125
|
-
Reason: “${
|
|
1119
|
+
} = k, R = D(n.values[f]), w = P ? `${Ae(f)} · changed ${ba(P.at)} by ${P.who}${P.reason ? `
|
|
1120
|
+
Reason: “${P.reason}”` : ""}` : void 0, y = P != null && P.reason ? /* @__PURE__ */ t(
|
|
1126
1121
|
"span",
|
|
1127
1122
|
{
|
|
1128
1123
|
"aria-hidden": "true",
|
|
1129
1124
|
"data-cell-reason": !0,
|
|
1130
1125
|
className: "pointer-events-none absolute left-0 top-0 h-0 w-0 border-r-[6px] border-t-[6px] border-r-transparent border-t-nvr-cyan"
|
|
1131
1126
|
}
|
|
1132
|
-
) : null, [
|
|
1127
|
+
) : null, [S, _] = W(null), v = he(!1);
|
|
1133
1128
|
if (b)
|
|
1134
1129
|
return /* @__PURE__ */ u(
|
|
1135
1130
|
"td",
|
|
1136
1131
|
{
|
|
1137
1132
|
"data-plan-locked": i ? "closed" : "readonly",
|
|
1138
|
-
"data-tip": [
|
|
1133
|
+
"data-tip": [A, w].filter(Boolean).join(`
|
|
1139
1134
|
`) || void 0,
|
|
1140
1135
|
"data-grid-cell": I,
|
|
1141
1136
|
className: B(
|
|
1142
1137
|
"relative px-2.5 py-1 text-right text-slate-700 dark:text-slate-200",
|
|
1143
|
-
i &&
|
|
1138
|
+
i && Ce
|
|
1144
1139
|
),
|
|
1145
1140
|
children: [
|
|
1146
1141
|
y,
|
|
1147
|
-
/* @__PURE__ */ t(ne, { n:
|
|
1142
|
+
/* @__PURE__ */ t(ne, { n: R })
|
|
1148
1143
|
]
|
|
1149
1144
|
}
|
|
1150
1145
|
);
|
|
1151
|
-
const
|
|
1152
|
-
if (
|
|
1153
|
-
const s = Bt(
|
|
1154
|
-
if (
|
|
1146
|
+
const L = () => {
|
|
1147
|
+
if (S == null) return;
|
|
1148
|
+
const s = Bt(S);
|
|
1149
|
+
if (_(null), v.current) {
|
|
1155
1150
|
v.current = !1;
|
|
1156
1151
|
return;
|
|
1157
1152
|
}
|
|
1158
1153
|
if (s == null || s < 0) {
|
|
1159
|
-
ie.error(Ut(
|
|
1154
|
+
ie.error(Ut(S));
|
|
1160
1155
|
return;
|
|
1161
1156
|
}
|
|
1162
|
-
const c = ct(
|
|
1163
|
-
c.ok && c.rounded && ie.message(`Rounded to ${U(s)} — amounts are kept to the cent`), !(Math.abs(s -
|
|
1157
|
+
const c = ct(S);
|
|
1158
|
+
c.ok && c.rounded && ie.message(`Rounded to ${U(s)} — amounts are kept to the cent`), !(Math.abs(s - R) < 5e-3) && T(s);
|
|
1164
1159
|
};
|
|
1165
1160
|
return /* @__PURE__ */ u(
|
|
1166
1161
|
"td",
|
|
1167
1162
|
{
|
|
1168
|
-
className: B("relative p-0", i &&
|
|
1163
|
+
className: B("relative p-0", i && Ce),
|
|
1169
1164
|
"data-grid-cell": I,
|
|
1170
1165
|
"data-tip": w,
|
|
1171
1166
|
children: [
|
|
@@ -1174,22 +1169,22 @@ Reason: “${j.reason}”` : ""}` : void 0, y = j != null && j.reason ? /* @__PU
|
|
|
1174
1169
|
"input",
|
|
1175
1170
|
{
|
|
1176
1171
|
"data-pg-cell": `${n.uid}:${f}`,
|
|
1177
|
-
"aria-label": `${
|
|
1172
|
+
"aria-label": `${Ae(f)} ${n.key}${h ? ` · ${h}` : ""}`,
|
|
1178
1173
|
inputMode: "decimal",
|
|
1179
|
-
value:
|
|
1174
|
+
value: S ?? (R === 0 ? "" : U(R)),
|
|
1180
1175
|
placeholder: "—",
|
|
1181
1176
|
onFocus: (s) => {
|
|
1182
|
-
|
|
1177
|
+
_(R === 0 ? "" : String(R)), requestAnimationFrame(() => s.target.select());
|
|
1183
1178
|
},
|
|
1184
|
-
onChange: (s) =>
|
|
1185
|
-
onBlur:
|
|
1179
|
+
onChange: (s) => _(s.target.value),
|
|
1180
|
+
onBlur: L,
|
|
1186
1181
|
onPaste: (s) => {
|
|
1187
1182
|
const c = s.clipboardData.getData("text");
|
|
1188
1183
|
/[\t\n]/.test(c.trim()) && (s.preventDefault(), v.current = !0, s.target.blur(), N(n, f, c));
|
|
1189
1184
|
},
|
|
1190
1185
|
onKeyDown: (s) => {
|
|
1191
1186
|
const c = s.currentTarget, d = c.selectionStart === 0 && c.selectionEnd === 0, E = c.selectionStart === c.value.length && c.selectionEnd === c.value.length;
|
|
1192
|
-
s.key === "Enter" || s.key === "ArrowDown" ? (s.preventDefault(),
|
|
1187
|
+
s.key === "Enter" || s.key === "ArrowDown" ? (s.preventDefault(), L(), x(n.uid, f, 1, 0)) : s.key === "ArrowUp" ? (s.preventDefault(), L(), x(n.uid, f, -1, 0)) : s.key === "ArrowLeft" && d ? (s.preventDefault(), L(), x(n.uid, f, 0, -1)) : s.key === "ArrowRight" && E ? (s.preventDefault(), L(), x(n.uid, f, 0, 1)) : s.key === "Escape" && (v.current = !0, c.blur());
|
|
1193
1188
|
},
|
|
1194
1189
|
className: "h-[30px] w-full bg-transparent px-2.5 text-right text-[12px] tabular-nums text-slate-900 outline-none placeholder:text-slate-400 hover:bg-muted/60 focus:bg-white focus:shadow-[inset_0_0_0_2px_rgb(var(--nvr-cyan-rgb))] dark:text-slate-100 dark:placeholder:text-slate-500 dark:focus:bg-[hsl(var(--background))]"
|
|
1195
1190
|
}
|
|
@@ -1205,18 +1200,18 @@ function st(k) {
|
|
|
1205
1200
|
blockKey: f,
|
|
1206
1201
|
cat: i,
|
|
1207
1202
|
cols: b,
|
|
1208
|
-
compare:
|
|
1209
|
-
planOf:
|
|
1203
|
+
compare: A,
|
|
1204
|
+
planOf: P,
|
|
1210
1205
|
actualFor: I,
|
|
1211
1206
|
isClosed: T,
|
|
1212
1207
|
row: x,
|
|
1213
1208
|
canReconcile: N,
|
|
1214
|
-
onReconcile:
|
|
1209
|
+
onReconcile: R,
|
|
1215
1210
|
carryFor: w,
|
|
1216
1211
|
plain: y
|
|
1217
|
-
} = k,
|
|
1212
|
+
} = k, S = K(b.reduce((_, v) => _ + I(f, i, v).value, 0));
|
|
1218
1213
|
return /* @__PURE__ */ u("tr", { "data-plan-actual": i ?? "all", children: [
|
|
1219
|
-
/* @__PURE__ */ t("td", { className: B(
|
|
1214
|
+
/* @__PURE__ */ t("td", { className: B(ve, "px-2 pb-1 pt-0"), children: /* @__PURE__ */ t(
|
|
1220
1215
|
"span",
|
|
1221
1216
|
{
|
|
1222
1217
|
"data-tip": h,
|
|
@@ -1224,46 +1219,46 @@ function st(k) {
|
|
|
1224
1219
|
children: n
|
|
1225
1220
|
}
|
|
1226
1221
|
) }),
|
|
1227
|
-
b.map((
|
|
1228
|
-
const v = T(f,
|
|
1222
|
+
b.map((_) => {
|
|
1223
|
+
const v = T(f, _), L = I(f, i, _), s = P(_), c = !y && v && Math.abs(L.value - s) >= 5e-3, d = !y && !v && L.value > s + 5e-3;
|
|
1229
1224
|
return /* @__PURE__ */ t(
|
|
1230
1225
|
"td",
|
|
1231
1226
|
{
|
|
1232
|
-
"data-compare-cell":
|
|
1233
|
-
className: B("px-2.5 pb-1 pt-0 text-right text-[11.5px]", v &&
|
|
1234
|
-
children: Math.abs(
|
|
1235
|
-
|
|
1227
|
+
"data-compare-cell": _,
|
|
1228
|
+
className: B("px-2.5 pb-1 pt-0 text-right text-[11.5px]", v && Ce),
|
|
1229
|
+
children: Math.abs(L.value) < 5e-3 && !c ? /* @__PURE__ */ t("span", { className: "text-slate-400 dark:text-slate-500", children: "—" }) : /* @__PURE__ */ t(
|
|
1230
|
+
qa,
|
|
1236
1231
|
{
|
|
1237
|
-
title: `${
|
|
1238
|
-
compare:
|
|
1232
|
+
title: `${Ae(_)} ${f}`,
|
|
1233
|
+
compare: A,
|
|
1239
1234
|
actualName: n,
|
|
1240
|
-
actual:
|
|
1235
|
+
actual: L.value,
|
|
1241
1236
|
planned: s,
|
|
1242
1237
|
closed: v,
|
|
1243
1238
|
plain: !!y,
|
|
1244
|
-
details:
|
|
1239
|
+
details: L.details,
|
|
1245
1240
|
tone: c ? "warn" : d ? "danger" : "neutral",
|
|
1246
1241
|
reconcile: c && N && x ? {
|
|
1247
1242
|
row: x,
|
|
1248
|
-
column:
|
|
1243
|
+
column: _,
|
|
1249
1244
|
openColumns: b.filter((E) => !T(f, E)),
|
|
1250
1245
|
carry: (w == null ? void 0 : w(f, i)) ?? null,
|
|
1251
|
-
onApply: (E,
|
|
1246
|
+
onApply: (E, j, de) => R(x, E, j, de)
|
|
1252
1247
|
} : null
|
|
1253
1248
|
}
|
|
1254
1249
|
)
|
|
1255
1250
|
},
|
|
1256
|
-
|
|
1251
|
+
_
|
|
1257
1252
|
);
|
|
1258
1253
|
}),
|
|
1259
1254
|
/* @__PURE__ */ t(
|
|
1260
1255
|
"td",
|
|
1261
1256
|
{
|
|
1262
1257
|
className: B(
|
|
1263
|
-
|
|
1258
|
+
Ne,
|
|
1264
1259
|
"px-3 pb-1 pt-0 text-right text-[11.5px] text-slate-600 dark:text-slate-300"
|
|
1265
1260
|
),
|
|
1266
|
-
children: /* @__PURE__ */ t(ne, { n:
|
|
1261
|
+
children: /* @__PURE__ */ t(ne, { n: S, muted: !0 })
|
|
1267
1262
|
}
|
|
1268
1263
|
)
|
|
1269
1264
|
] });
|
|
@@ -1273,29 +1268,29 @@ const Kt = {
|
|
|
1273
1268
|
danger: "text-red-700 dark:text-red-300 font-medium",
|
|
1274
1269
|
neutral: "text-slate-600 dark:text-slate-300"
|
|
1275
1270
|
};
|
|
1276
|
-
function
|
|
1271
|
+
function qa(k) {
|
|
1277
1272
|
var V, ce;
|
|
1278
|
-
const { title: n, compare: h, actualName: f, actual: i, planned: b, closed:
|
|
1273
|
+
const { title: n, compare: h, actualName: f, actual: i, planned: b, closed: A, plain: P, details: I, tone: T, reconcile: x } = k, [N, R] = W(!1), [w, y] = W("next"), [S, _] = W(""), v = Dt(h), L = K(b - i), s = x && x.openColumns.length === 0 && x.carry && !x.carry.blocked ? x.carry : null, c = x && x.openColumns.length === 0 ? ((V = x.carry) == null ? void 0 : V.blocked) ?? null : null, d = s ? ((ce = s.row) == null ? void 0 : ce.values) ?? {} : (x == null ? void 0 : x.row.values) ?? {}, E = s ? s.openColumns : (x == null ? void 0 : x.openColumns) ?? [], j = G(
|
|
1279
1274
|
() => {
|
|
1280
|
-
var
|
|
1281
|
-
return x ?
|
|
1275
|
+
var M;
|
|
1276
|
+
return x ? Pa({
|
|
1282
1277
|
row: x.row.values,
|
|
1283
1278
|
column: x.column,
|
|
1284
1279
|
actual: i,
|
|
1285
1280
|
openColumns: s ? s.openColumns : x.openColumns,
|
|
1286
1281
|
mode: w,
|
|
1287
|
-
...s ? { targetRow: ((
|
|
1282
|
+
...s ? { targetRow: ((M = s.row) == null ? void 0 : M.values) ?? {} } : {}
|
|
1288
1283
|
}) : null;
|
|
1289
1284
|
},
|
|
1290
1285
|
[x, s, i, w]
|
|
1291
|
-
), de =
|
|
1292
|
-
const
|
|
1293
|
-
if (!
|
|
1294
|
-
const
|
|
1295
|
-
return
|
|
1296
|
-
}, [n, f, i,
|
|
1286
|
+
), de = j ? j.targetPatch ?? j.patch : {}, re = E.some((M) => D(d[M]) > 5e-3), F = G(() => {
|
|
1287
|
+
const M = `Reconciled ${n} to ${f.toLowerCase()} (${U(i)})`;
|
|
1288
|
+
if (!j || Math.abs(j.moved) < 5e-3) return M;
|
|
1289
|
+
const Pe = `${j.targets.length === 1 ? Ae(j.targets[0]) : `${j.targets.length} open periods`}${s ? ` ${s.key}` : ""}`;
|
|
1290
|
+
return j.moved > 0 ? `${M} — moved ${U(j.moved)} to ${Pe}` : `${M} — took ${U(-j.moved)} from ${Pe}`;
|
|
1291
|
+
}, [n, f, i, j, s]);
|
|
1297
1292
|
ue(() => {
|
|
1298
|
-
N &&
|
|
1293
|
+
N && _(F);
|
|
1299
1294
|
}, [N, F]);
|
|
1300
1295
|
const le = x ? [
|
|
1301
1296
|
{
|
|
@@ -1315,7 +1310,7 @@ function Aa(k) {
|
|
|
1315
1310
|
},
|
|
1316
1311
|
{ key: "none", label: "Nowhere — drop it from the plan" }
|
|
1317
1312
|
] : [];
|
|
1318
|
-
return /* @__PURE__ */ u(ut, { open: N, onOpenChange:
|
|
1313
|
+
return /* @__PURE__ */ u(ut, { open: N, onOpenChange: R, children: [
|
|
1319
1314
|
/* @__PURE__ */ t(pt, { asChild: !0, children: /* @__PURE__ */ t(
|
|
1320
1315
|
"button",
|
|
1321
1316
|
{
|
|
@@ -1334,7 +1329,7 @@ function Aa(k) {
|
|
|
1334
1329
|
/* @__PURE__ */ u("div", { className: "border-b border-slate-200 px-3 py-2 dark:border-border", children: [
|
|
1335
1330
|
/* @__PURE__ */ t("p", { className: "text-[12.5px] font-semibold text-slate-900 dark:text-slate-100", children: n }),
|
|
1336
1331
|
/* @__PURE__ */ u("dl", { className: "mt-1 grid grid-cols-3 gap-2 tabular-nums", children: [
|
|
1337
|
-
!
|
|
1332
|
+
!P && /* @__PURE__ */ u("div", { children: [
|
|
1338
1333
|
/* @__PURE__ */ t("dt", { className: "text-[10.5px] text-slate-500 dark:text-slate-400", children: v }),
|
|
1339
1334
|
/* @__PURE__ */ t("dd", { className: "font-medium text-slate-800 dark:text-slate-100", children: U(b) })
|
|
1340
1335
|
] }),
|
|
@@ -1342,48 +1337,48 @@ function Aa(k) {
|
|
|
1342
1337
|
/* @__PURE__ */ t("dt", { className: "text-[10.5px] text-slate-500 dark:text-slate-400", children: f }),
|
|
1343
1338
|
/* @__PURE__ */ t("dd", { className: "font-medium text-slate-800 dark:text-slate-100", children: U(i) })
|
|
1344
1339
|
] }),
|
|
1345
|
-
!
|
|
1346
|
-
/* @__PURE__ */ t("dt", { className: "text-[10.5px] text-slate-500 dark:text-slate-400", children:
|
|
1340
|
+
!P && /* @__PURE__ */ u("div", { children: [
|
|
1341
|
+
/* @__PURE__ */ t("dt", { className: "text-[10.5px] text-slate-500 dark:text-slate-400", children: A ? "Difference" : "Still to come" }),
|
|
1347
1342
|
/* @__PURE__ */ t(
|
|
1348
1343
|
"dd",
|
|
1349
1344
|
{
|
|
1350
1345
|
className: B(
|
|
1351
1346
|
"font-medium",
|
|
1352
|
-
Math.abs(
|
|
1347
|
+
Math.abs(L) < 5e-3 ? "text-slate-800 dark:text-slate-100" : Kt[T === "neutral" ? "neutral" : T]
|
|
1353
1348
|
),
|
|
1354
|
-
children: U(
|
|
1349
|
+
children: U(L)
|
|
1355
1350
|
}
|
|
1356
1351
|
)
|
|
1357
1352
|
] })
|
|
1358
1353
|
] })
|
|
1359
1354
|
] }),
|
|
1360
|
-
I.length > 0 && /* @__PURE__ */ t("ul", { className: "max-h-[168px] overflow-y-auto px-3 py-1.5", children: I.map((
|
|
1355
|
+
I.length > 0 && /* @__PURE__ */ t("ul", { className: "max-h-[168px] overflow-y-auto px-3 py-1.5", children: I.map((M) => /* @__PURE__ */ u("li", { className: "flex items-baseline gap-2 py-0.5", children: [
|
|
1361
1356
|
/* @__PURE__ */ u("span", { className: "min-w-0 flex-1 truncate text-slate-700 dark:text-slate-200", children: [
|
|
1362
|
-
|
|
1363
|
-
|
|
1357
|
+
M.label,
|
|
1358
|
+
M.sub ? /* @__PURE__ */ t("span", { className: "text-slate-500 dark:text-slate-400", children: ` · ${M.sub}` }) : null
|
|
1364
1359
|
] }),
|
|
1365
|
-
/* @__PURE__ */ t("span", { className: "tabular-nums text-slate-800 dark:text-slate-100", children: U(
|
|
1366
|
-
] }, String(
|
|
1360
|
+
/* @__PURE__ */ t("span", { className: "tabular-nums text-slate-800 dark:text-slate-100", children: U(M.amount) })
|
|
1361
|
+
] }, String(M.id))) }),
|
|
1367
1362
|
I.length === 0 && /* @__PURE__ */ t("p", { className: "px-3 py-2 text-slate-500 dark:text-slate-400", children: `No ${_a(h, 2)} behind this figure.` }),
|
|
1368
|
-
x &&
|
|
1363
|
+
x && j && /* @__PURE__ */ u(
|
|
1369
1364
|
"div",
|
|
1370
1365
|
{
|
|
1371
1366
|
className: "border-t border-slate-200 px-3 py-2 dark:border-border",
|
|
1372
1367
|
"data-plan-reconcile": !0,
|
|
1373
1368
|
children: [
|
|
1374
|
-
/* @__PURE__ */ t("p", { className: "font-medium text-slate-900 dark:text-slate-100", children: `Set the ${v.toLowerCase()} to ${U(i)} and put the ${U(Math.abs(
|
|
1369
|
+
/* @__PURE__ */ t("p", { className: "font-medium text-slate-900 dark:text-slate-100", children: `Set the ${v.toLowerCase()} to ${U(i)} and put the ${U(Math.abs(L))} ${L > 0 ? "left over" : "shortfall"}…` }),
|
|
1375
1370
|
/* @__PURE__ */ t(
|
|
1376
1371
|
"div",
|
|
1377
1372
|
{
|
|
1378
1373
|
className: "mt-1.5 space-y-1",
|
|
1379
1374
|
role: "radiogroup",
|
|
1380
1375
|
"aria-label": "Where the difference goes",
|
|
1381
|
-
children: le.map((
|
|
1376
|
+
children: le.map((M) => /* @__PURE__ */ u(
|
|
1382
1377
|
"label",
|
|
1383
1378
|
{
|
|
1384
1379
|
className: B(
|
|
1385
1380
|
"flex cursor-pointer items-center gap-2",
|
|
1386
|
-
|
|
1381
|
+
M.disabled && "cursor-not-allowed opacity-50"
|
|
1387
1382
|
),
|
|
1388
1383
|
children: [
|
|
1389
1384
|
/* @__PURE__ */ t(
|
|
@@ -1391,17 +1386,17 @@ function Aa(k) {
|
|
|
1391
1386
|
{
|
|
1392
1387
|
type: "radio",
|
|
1393
1388
|
name: "pg-reconcile",
|
|
1394
|
-
"data-plan-reconcile-mode":
|
|
1395
|
-
disabled:
|
|
1396
|
-
checked: w ===
|
|
1397
|
-
onChange: () => y(
|
|
1389
|
+
"data-plan-reconcile-mode": M.key,
|
|
1390
|
+
disabled: M.disabled,
|
|
1391
|
+
checked: w === M.key,
|
|
1392
|
+
onChange: () => y(M.key),
|
|
1398
1393
|
className: "accent-[rgb(var(--nvr-cyan-rgb))]"
|
|
1399
1394
|
}
|
|
1400
1395
|
),
|
|
1401
|
-
/* @__PURE__ */ t("span", { className: "text-slate-700 dark:text-slate-200", children:
|
|
1396
|
+
/* @__PURE__ */ t("span", { className: "text-slate-700 dark:text-slate-200", children: M.label })
|
|
1402
1397
|
]
|
|
1403
1398
|
},
|
|
1404
|
-
|
|
1399
|
+
M.key
|
|
1405
1400
|
))
|
|
1406
1401
|
}
|
|
1407
1402
|
),
|
|
@@ -1421,25 +1416,25 @@ function Aa(k) {
|
|
|
1421
1416
|
children: `Every period of this row is closed, and ${c} — the difference can only be dropped from here.`
|
|
1422
1417
|
}
|
|
1423
1418
|
),
|
|
1424
|
-
|
|
1419
|
+
j.targets.length > 0 && /* @__PURE__ */ u(
|
|
1425
1420
|
"p",
|
|
1426
1421
|
{
|
|
1427
1422
|
className: "mt-1.5 text-[11.5px] tabular-nums text-slate-600 dark:text-slate-300",
|
|
1428
1423
|
"data-plan-reconcile-preview": !0,
|
|
1429
1424
|
children: [
|
|
1430
|
-
|
|
1431
|
-
(
|
|
1425
|
+
j.targets.slice(0, 6).map(
|
|
1426
|
+
(M) => `${it(M)}${s ? ` ${s.key}` : ""} ${U(D(d[M]))} → ${U(de[M])}`
|
|
1432
1427
|
).join(" · "),
|
|
1433
|
-
|
|
1428
|
+
j.targets.length > 6 ? ` · +${j.targets.length - 6} more` : ""
|
|
1434
1429
|
]
|
|
1435
1430
|
}
|
|
1436
1431
|
),
|
|
1437
|
-
w !== "none" && Math.abs(
|
|
1432
|
+
w !== "none" && Math.abs(j.unabsorbed) >= 5e-3 && /* @__PURE__ */ t("p", { className: "mt-1 text-[11.5px] text-amber-700 dark:text-amber-300", children: `${U(Math.abs(j.unabsorbed))} has nowhere to go — it leaves the ${v.toLowerCase()}.` }),
|
|
1438
1433
|
/* @__PURE__ */ t(
|
|
1439
1434
|
"textarea",
|
|
1440
1435
|
{
|
|
1441
|
-
value:
|
|
1442
|
-
onChange: (
|
|
1436
|
+
value: S,
|
|
1437
|
+
onChange: (M) => _(M.target.value),
|
|
1443
1438
|
rows: 2,
|
|
1444
1439
|
"aria-label": "Reason",
|
|
1445
1440
|
className: "mt-2 w-full resize-none rounded-md border border-slate-200 bg-background px-2 py-1 text-[12px] text-slate-800 outline-none focus:border-slate-400 dark:border-border dark:text-slate-100"
|
|
@@ -1451,10 +1446,10 @@ function Aa(k) {
|
|
|
1451
1446
|
type: "button",
|
|
1452
1447
|
"data-plan-reconcile-apply": !0,
|
|
1453
1448
|
onClick: () => {
|
|
1454
|
-
const
|
|
1455
|
-
x.onApply(
|
|
1456
|
-
|
|
1457
|
-
),
|
|
1449
|
+
const M = s && j.targetPatch && Object.keys(j.targetPatch).length > 0 ? { target: s, patch: j.targetPatch } : void 0;
|
|
1450
|
+
x.onApply(j.patch, S.trim() || F, M) && (ie.success(
|
|
1451
|
+
M ? `Reconcile staged across ${n.split(" ").pop()} and ${s == null ? void 0 : s.key} — Save to keep it` : "Reconcile staged — Save to keep it"
|
|
1452
|
+
), R(!1));
|
|
1458
1453
|
},
|
|
1459
1454
|
className: "rounded-md bg-nvr-cyan px-3 py-1 text-[12px] font-medium text-white",
|
|
1460
1455
|
children: "Stage it"
|
|
@@ -1473,21 +1468,21 @@ function Fa(k) {
|
|
|
1473
1468
|
canSplit: f,
|
|
1474
1469
|
splitUnavailable: i,
|
|
1475
1470
|
splitBase: b,
|
|
1476
|
-
client:
|
|
1477
|
-
cols:
|
|
1471
|
+
client: A,
|
|
1472
|
+
cols: P,
|
|
1478
1473
|
catLabel: I,
|
|
1479
1474
|
showHistory: T,
|
|
1480
1475
|
onHistory: x,
|
|
1481
1476
|
onSpread: N,
|
|
1482
|
-
onRemove:
|
|
1477
|
+
onRemove: R,
|
|
1483
1478
|
onDone: w,
|
|
1484
1479
|
rc: y
|
|
1485
|
-
} = k, [
|
|
1480
|
+
} = k, [S, _] = W(!1), [v, L] = W("menu");
|
|
1486
1481
|
ue(() => {
|
|
1487
|
-
|
|
1488
|
-
}, [
|
|
1482
|
+
S && L("menu");
|
|
1483
|
+
}, [S]);
|
|
1489
1484
|
const s = [...n.top ? [n.top] : [], ...n.cats], c = s.some((E) => E.edited || E.isNew), d = "flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-[12.5px] text-slate-700 hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50 dark:text-slate-200";
|
|
1490
|
-
return /* @__PURE__ */ u(ut, { open:
|
|
1485
|
+
return /* @__PURE__ */ u(ut, { open: S, onOpenChange: _, children: [
|
|
1491
1486
|
/* @__PURE__ */ t(pt, { asChild: !0, children: /* @__PURE__ */ t(
|
|
1492
1487
|
"button",
|
|
1493
1488
|
{
|
|
@@ -1495,7 +1490,7 @@ function Fa(k) {
|
|
|
1495
1490
|
"data-plan-menu": n.key,
|
|
1496
1491
|
"aria-label": `Actions for ${n.key}`,
|
|
1497
1492
|
className: "rounded p-0.5 text-slate-500 hover:bg-muted hover:text-slate-800 dark:hover:text-slate-100",
|
|
1498
|
-
children: /* @__PURE__ */ t(
|
|
1493
|
+
children: /* @__PURE__ */ t(oa, { className: "h-3.5 w-3.5" })
|
|
1499
1494
|
}
|
|
1500
1495
|
) }),
|
|
1501
1496
|
/* @__PURE__ */ u(
|
|
@@ -1512,7 +1507,7 @@ function Fa(k) {
|
|
|
1512
1507
|
type: "button",
|
|
1513
1508
|
"data-plan-split": n.key,
|
|
1514
1509
|
disabled: c,
|
|
1515
|
-
onClick: () =>
|
|
1510
|
+
onClick: () => L("split"),
|
|
1516
1511
|
className: d,
|
|
1517
1512
|
children: [
|
|
1518
1513
|
/* @__PURE__ */ t(Et, { className: "h-3.5 w-3.5" }),
|
|
@@ -1533,10 +1528,10 @@ function Fa(k) {
|
|
|
1533
1528
|
type: "button",
|
|
1534
1529
|
"data-plan-merge": n.key,
|
|
1535
1530
|
disabled: c,
|
|
1536
|
-
onClick: () =>
|
|
1531
|
+
onClick: () => L("merge"),
|
|
1537
1532
|
className: d,
|
|
1538
1533
|
children: [
|
|
1539
|
-
/* @__PURE__ */ t(
|
|
1534
|
+
/* @__PURE__ */ t(ia, { className: "h-3.5 w-3.5" }),
|
|
1540
1535
|
h.merge_label ?? "Merge back to one line"
|
|
1541
1536
|
]
|
|
1542
1537
|
}
|
|
@@ -1548,7 +1543,7 @@ function Fa(k) {
|
|
|
1548
1543
|
type: "button",
|
|
1549
1544
|
"data-plan-spread": E.uid,
|
|
1550
1545
|
onClick: () => {
|
|
1551
|
-
N(E),
|
|
1546
|
+
N(E), _(!1);
|
|
1552
1547
|
},
|
|
1553
1548
|
className: d,
|
|
1554
1549
|
children: [
|
|
@@ -1564,11 +1559,11 @@ function Fa(k) {
|
|
|
1564
1559
|
{
|
|
1565
1560
|
type: "button",
|
|
1566
1561
|
onClick: () => {
|
|
1567
|
-
x(E),
|
|
1562
|
+
x(E), _(!1);
|
|
1568
1563
|
},
|
|
1569
1564
|
className: d,
|
|
1570
1565
|
children: [
|
|
1571
|
-
/* @__PURE__ */ t(
|
|
1566
|
+
/* @__PURE__ */ t(da, { className: "h-3.5 w-3.5" }),
|
|
1572
1567
|
`History${E.cat ? ` · ${I(E.cat)}` : ""}`
|
|
1573
1568
|
]
|
|
1574
1569
|
}
|
|
@@ -1587,10 +1582,10 @@ function Fa(k) {
|
|
|
1587
1582
|
{
|
|
1588
1583
|
type: "button",
|
|
1589
1584
|
"data-plan-remove": n.key,
|
|
1590
|
-
onClick: () =>
|
|
1585
|
+
onClick: () => L("remove"),
|
|
1591
1586
|
className: B(d, "text-red-700 dark:text-red-300"),
|
|
1592
1587
|
children: [
|
|
1593
|
-
/* @__PURE__ */ t(
|
|
1588
|
+
/* @__PURE__ */ t(ca, { className: "h-3.5 w-3.5" }),
|
|
1594
1589
|
`Remove ${n.key}`
|
|
1595
1590
|
]
|
|
1596
1591
|
}
|
|
@@ -1603,7 +1598,7 @@ function Fa(k) {
|
|
|
1603
1598
|
"button",
|
|
1604
1599
|
{
|
|
1605
1600
|
type: "button",
|
|
1606
|
-
onClick: () =>
|
|
1601
|
+
onClick: () => L("menu"),
|
|
1607
1602
|
className: "rounded-md px-2.5 py-1 text-[12px] text-slate-600 hover:bg-muted dark:text-slate-300",
|
|
1608
1603
|
children: "Keep it"
|
|
1609
1604
|
}
|
|
@@ -1614,7 +1609,7 @@ function Fa(k) {
|
|
|
1614
1609
|
type: "button",
|
|
1615
1610
|
"data-plan-remove-confirm": !0,
|
|
1616
1611
|
onClick: () => {
|
|
1617
|
-
|
|
1612
|
+
R(), _(!1);
|
|
1618
1613
|
},
|
|
1619
1614
|
className: "rounded-md bg-red-600 px-2.5 py-1 text-[12px] font-medium text-white",
|
|
1620
1615
|
children: "Remove"
|
|
@@ -1628,11 +1623,11 @@ function Fa(k) {
|
|
|
1628
1623
|
block: n,
|
|
1629
1624
|
config: h,
|
|
1630
1625
|
splitBase: b,
|
|
1631
|
-
client:
|
|
1632
|
-
cols:
|
|
1633
|
-
onCancel: () =>
|
|
1626
|
+
client: A,
|
|
1627
|
+
cols: P,
|
|
1628
|
+
onCancel: () => L("menu"),
|
|
1634
1629
|
onDone: () => {
|
|
1635
|
-
|
|
1630
|
+
_(!1), w();
|
|
1636
1631
|
}
|
|
1637
1632
|
}
|
|
1638
1633
|
),
|
|
@@ -1642,10 +1637,10 @@ function Fa(k) {
|
|
|
1642
1637
|
block: n,
|
|
1643
1638
|
config: h,
|
|
1644
1639
|
splitBase: b,
|
|
1645
|
-
client:
|
|
1646
|
-
onCancel: () =>
|
|
1640
|
+
client: A,
|
|
1641
|
+
onCancel: () => L("menu"),
|
|
1647
1642
|
onDone: () => {
|
|
1648
|
-
|
|
1643
|
+
_(!1), w();
|
|
1649
1644
|
}
|
|
1650
1645
|
}
|
|
1651
1646
|
)
|
|
@@ -1659,7 +1654,7 @@ function dt(k) {
|
|
|
1659
1654
|
}
|
|
1660
1655
|
function Ka(k) {
|
|
1661
1656
|
var de, re;
|
|
1662
|
-
const { block: n, config: h, splitBase: f, client: i, cols: b, onCancel:
|
|
1657
|
+
const { block: n, config: h, splitBase: f, client: i, cols: b, onCancel: A, onDone: P } = k, I = Number.isFinite(Number(n.key)) ? Number(n.key) : n.key, [T, x] = W(null), [N, R] = W(null), [w, y] = W(null), [S, _] = W(!1), [v, L] = W(""), s = JSON.stringify(T);
|
|
1663
1658
|
ue(() => {
|
|
1664
1659
|
let F = !0;
|
|
1665
1660
|
const le = window.setTimeout(
|
|
@@ -1671,7 +1666,7 @@ function Ka(k) {
|
|
|
1671
1666
|
...T ? { shares: T } : {}
|
|
1672
1667
|
})
|
|
1673
1668
|
).then((V) => {
|
|
1674
|
-
F && (
|
|
1669
|
+
F && (R(V.data), y(null), T || x(
|
|
1675
1670
|
Object.fromEntries(
|
|
1676
1671
|
V.data.categories.map((ce) => [String(ce.id), Math.round(ce.share * 1e3) / 10])
|
|
1677
1672
|
)
|
|
@@ -1685,7 +1680,7 @@ function Ka(k) {
|
|
|
1685
1680
|
};
|
|
1686
1681
|
}, [s, f]);
|
|
1687
1682
|
const c = (N == null ? void 0 : N.categories.map((F) => F.label).join(" / ")) ?? "", d = `Split the ${n.key} plan into ${c}`, E = async () => {
|
|
1688
|
-
|
|
1683
|
+
_(!0);
|
|
1689
1684
|
try {
|
|
1690
1685
|
await i.request(
|
|
1691
1686
|
ot(`${f}/split`, {
|
|
@@ -1693,13 +1688,13 @@ function Ka(k) {
|
|
|
1693
1688
|
shares: T ?? void 0,
|
|
1694
1689
|
reason: v.trim() || d
|
|
1695
1690
|
})
|
|
1696
|
-
), ie.success(`${n.key} is now planned by ${c}`),
|
|
1691
|
+
), ie.success(`${n.key} is now planned by ${c}`), P();
|
|
1697
1692
|
} catch (F) {
|
|
1698
1693
|
y(dt(F));
|
|
1699
1694
|
} finally {
|
|
1700
|
-
|
|
1695
|
+
_(!1);
|
|
1701
1696
|
}
|
|
1702
|
-
},
|
|
1697
|
+
}, j = (F) => K(b.reduce((le, V) => le + D(F[V]), 0));
|
|
1703
1698
|
return /* @__PURE__ */ u("div", { className: "p-1.5", "data-plan-split-pane": !0, children: [
|
|
1704
1699
|
/* @__PURE__ */ t("p", { className: "text-[12.5px] font-semibold text-slate-900 dark:text-slate-100", children: `${h.split_label ?? "Plan by category"} · ${n.key}` }),
|
|
1705
1700
|
/* @__PURE__ */ t("p", { className: "mt-0.5 text-[11.5px] text-slate-600 dark:text-slate-300", children: "Every period is divided by these shares. Closed periods keep their totals; open ones can be changed in the grid afterwards." }),
|
|
@@ -1714,7 +1709,7 @@ function Ka(k) {
|
|
|
1714
1709
|
/* @__PURE__ */ t("span", { className: "text-[11px] text-slate-500 dark:text-slate-400", children: "Shares from" }),
|
|
1715
1710
|
(re = N.share_sets) == null ? void 0 : re.map((F) => {
|
|
1716
1711
|
const le = Object.fromEntries(
|
|
1717
|
-
Object.entries(F.shares).map(([ce,
|
|
1712
|
+
Object.entries(F.shares).map(([ce, M]) => [ce, Math.round(M * 1e3) / 10])
|
|
1718
1713
|
), V = JSON.stringify(le) === s;
|
|
1719
1714
|
return /* @__PURE__ */ t(
|
|
1720
1715
|
"button",
|
|
@@ -1757,13 +1752,13 @@ function Ka(k) {
|
|
|
1757
1752
|
),
|
|
1758
1753
|
/* @__PURE__ */ t("span", { className: "ml-0.5 text-slate-500", children: "%" })
|
|
1759
1754
|
] }),
|
|
1760
|
-
/* @__PURE__ */ t("td", { className: "py-1 text-right text-slate-800 dark:text-slate-100", children: U(
|
|
1755
|
+
/* @__PURE__ */ t("td", { className: "py-1 text-right text-slate-800 dark:text-slate-100", children: U(j(F.values)) }),
|
|
1761
1756
|
/* @__PURE__ */ t("td", { className: "py-1 text-right text-slate-500 dark:text-slate-400", children: U(F.cap) })
|
|
1762
1757
|
] }, String(F.id))),
|
|
1763
1758
|
/* @__PURE__ */ u("tr", { className: "border-t border-slate-200 font-medium dark:border-border", children: [
|
|
1764
1759
|
/* @__PURE__ */ t("td", { className: "py-1 text-slate-800 dark:text-slate-100", children: h.total_label ?? "Total" }),
|
|
1765
1760
|
/* @__PURE__ */ t("td", {}),
|
|
1766
|
-
/* @__PURE__ */ t("td", { className: "py-1 text-right text-slate-800 dark:text-slate-100", children: U(
|
|
1761
|
+
/* @__PURE__ */ t("td", { className: "py-1 text-right text-slate-800 dark:text-slate-100", children: U(j(N.original)) }),
|
|
1767
1762
|
/* @__PURE__ */ t("td", {})
|
|
1768
1763
|
] })
|
|
1769
1764
|
] })
|
|
@@ -1781,7 +1776,7 @@ function Ka(k) {
|
|
|
1781
1776
|
"textarea",
|
|
1782
1777
|
{
|
|
1783
1778
|
value: v,
|
|
1784
|
-
onChange: (F) =>
|
|
1779
|
+
onChange: (F) => L(F.target.value),
|
|
1785
1780
|
placeholder: d,
|
|
1786
1781
|
rows: 2,
|
|
1787
1782
|
"aria-label": "Reason",
|
|
@@ -1793,7 +1788,7 @@ function Ka(k) {
|
|
|
1793
1788
|
"button",
|
|
1794
1789
|
{
|
|
1795
1790
|
type: "button",
|
|
1796
|
-
onClick:
|
|
1791
|
+
onClick: A,
|
|
1797
1792
|
className: "rounded-md px-2.5 py-1 text-[12px] text-slate-600 hover:bg-muted dark:text-slate-300",
|
|
1798
1793
|
children: "Back"
|
|
1799
1794
|
}
|
|
@@ -1803,26 +1798,26 @@ function Ka(k) {
|
|
|
1803
1798
|
{
|
|
1804
1799
|
type: "button",
|
|
1805
1800
|
"data-plan-split-apply": !0,
|
|
1806
|
-
disabled:
|
|
1801
|
+
disabled: S || !N || !!N.blocked,
|
|
1807
1802
|
onClick: E,
|
|
1808
1803
|
className: "rounded-md bg-nvr-cyan px-3 py-1 text-[12px] font-medium text-white disabled:opacity-50",
|
|
1809
|
-
children:
|
|
1804
|
+
children: S ? "Splitting…" : "Split it"
|
|
1810
1805
|
}
|
|
1811
1806
|
)
|
|
1812
1807
|
] })
|
|
1813
1808
|
] });
|
|
1814
1809
|
}
|
|
1815
1810
|
function Ia(k) {
|
|
1816
|
-
const { block: n, config: h, splitBase: f, client: i, onCancel: b, onDone:
|
|
1811
|
+
const { block: n, config: h, splitBase: f, client: i, onCancel: b, onDone: A } = k, P = Number.isFinite(Number(n.key)) ? Number(n.key) : n.key, [I, T] = W(""), [x, N] = W(!1), [R, w] = W(null), y = `Merged the ${n.key} plan back to one line`;
|
|
1817
1812
|
return /* @__PURE__ */ u("div", { className: "p-1.5", "data-plan-merge-pane": !0, children: [
|
|
1818
1813
|
/* @__PURE__ */ t("p", { className: "text-[12.5px] font-semibold text-slate-900 dark:text-slate-100", children: `${h.merge_label ?? "Merge back to one line"} · ${n.key}` }),
|
|
1819
1814
|
/* @__PURE__ */ t("p", { className: "mt-0.5 text-[11.5px] text-slate-600 dark:text-slate-300", children: "The category lines are added together, period by period. Their history stays on the record." }),
|
|
1820
|
-
|
|
1815
|
+
R && /* @__PURE__ */ t("p", { role: "alert", className: "mt-1.5 text-[11.5px] font-medium text-red-700 dark:text-red-300", children: R }),
|
|
1821
1816
|
/* @__PURE__ */ t(
|
|
1822
1817
|
"textarea",
|
|
1823
1818
|
{
|
|
1824
1819
|
value: I,
|
|
1825
|
-
onChange: (
|
|
1820
|
+
onChange: (S) => T(S.target.value),
|
|
1826
1821
|
placeholder: y,
|
|
1827
1822
|
rows: 2,
|
|
1828
1823
|
"aria-label": "Reason",
|
|
@@ -1850,12 +1845,12 @@ function Ia(k) {
|
|
|
1850
1845
|
try {
|
|
1851
1846
|
await i.request(
|
|
1852
1847
|
ot(`${f}/merge`, {
|
|
1853
|
-
[h.key_field]:
|
|
1848
|
+
[h.key_field]: P,
|
|
1854
1849
|
reason: I.trim() || y
|
|
1855
1850
|
})
|
|
1856
|
-
), ie.success(`${n.key} is one line again`),
|
|
1857
|
-
} catch (
|
|
1858
|
-
w(dt(
|
|
1851
|
+
), ie.success(`${n.key} is one line again`), A();
|
|
1852
|
+
} catch (S) {
|
|
1853
|
+
w(dt(S));
|
|
1859
1854
|
} finally {
|
|
1860
1855
|
N(!1);
|
|
1861
1856
|
}
|
|
@@ -1868,22 +1863,22 @@ function Ia(k) {
|
|
|
1868
1863
|
] });
|
|
1869
1864
|
}
|
|
1870
1865
|
function Da(k) {
|
|
1871
|
-
const { config: n, client: h, used: f, onAdd: i, label: b } = k, [
|
|
1866
|
+
const { config: n, client: h, used: f, onAdd: i, label: b } = k, [A, P] = W(!1), [I, T] = W(""), { data: x = [] } = me({
|
|
1872
1867
|
queryKey: ["plan-grid-keys", n.key_collection],
|
|
1873
1868
|
queryFn: () => h.request(
|
|
1874
1869
|
fe(`/items/${n.key_collection}`, { fields: "id", sort: "-id", limit: 200 })
|
|
1875
1870
|
).then((c) => (c.data ?? []).map((d) => d.id)),
|
|
1876
|
-
enabled:
|
|
1871
|
+
enabled: A && !!n.key_collection,
|
|
1877
1872
|
staleTime: 10 * 6e4
|
|
1878
|
-
}), N = x.filter((c) => !f.has(String(c))), [
|
|
1879
|
-
i(c),
|
|
1873
|
+
}), N = x.filter((c) => !f.has(String(c))), [R, w] = W(""), [y, S] = W(0), _ = Ba(N, R), v = Math.min(y, Math.max(0, _.length - 1)), L = `plan-add-${n.key_collection ?? "keys"}`, s = (c) => {
|
|
1874
|
+
i(c), P(!1);
|
|
1880
1875
|
};
|
|
1881
1876
|
return /* @__PURE__ */ u(
|
|
1882
1877
|
ut,
|
|
1883
1878
|
{
|
|
1884
|
-
open:
|
|
1879
|
+
open: A,
|
|
1885
1880
|
onOpenChange: (c) => {
|
|
1886
|
-
|
|
1881
|
+
P(c), c || (w(""), S(0));
|
|
1887
1882
|
},
|
|
1888
1883
|
children: [
|
|
1889
1884
|
/* @__PURE__ */ t(pt, { asChild: !0, children: /* @__PURE__ */ u(
|
|
@@ -1893,7 +1888,7 @@ function Da(k) {
|
|
|
1893
1888
|
"data-plan-add": !0,
|
|
1894
1889
|
className: "inline-flex h-7 items-center gap-1 rounded-md border border-slate-200 px-2 text-[12px] font-medium text-slate-700 hover:bg-muted dark:border-border dark:text-slate-200",
|
|
1895
1890
|
children: [
|
|
1896
|
-
/* @__PURE__ */ t(
|
|
1891
|
+
/* @__PURE__ */ t(ua, { className: "h-3.5 w-3.5" }),
|
|
1897
1892
|
b
|
|
1898
1893
|
]
|
|
1899
1894
|
}
|
|
@@ -1903,25 +1898,25 @@ function Da(k) {
|
|
|
1903
1898
|
"input",
|
|
1904
1899
|
{
|
|
1905
1900
|
autoFocus: !0,
|
|
1906
|
-
value:
|
|
1901
|
+
value: R,
|
|
1907
1902
|
onChange: (c) => {
|
|
1908
|
-
w(c.target.value),
|
|
1903
|
+
w(c.target.value), S(0);
|
|
1909
1904
|
},
|
|
1910
1905
|
onKeyDown: (c) => {
|
|
1911
1906
|
if (c.key === "ArrowDown")
|
|
1912
|
-
c.preventDefault(),
|
|
1907
|
+
c.preventDefault(), S(Math.min(v + 1, _.length - 1));
|
|
1913
1908
|
else if (c.key === "ArrowUp")
|
|
1914
|
-
c.preventDefault(),
|
|
1909
|
+
c.preventDefault(), S(Math.max(v - 1, 0));
|
|
1915
1910
|
else if (c.key === "Enter") {
|
|
1916
1911
|
c.preventDefault();
|
|
1917
|
-
const d =
|
|
1912
|
+
const d = _[v];
|
|
1918
1913
|
d !== void 0 && s(d);
|
|
1919
1914
|
}
|
|
1920
1915
|
},
|
|
1921
1916
|
role: "combobox",
|
|
1922
1917
|
"aria-expanded": "true",
|
|
1923
|
-
"aria-controls":
|
|
1924
|
-
"aria-activedescendant":
|
|
1918
|
+
"aria-controls": L,
|
|
1919
|
+
"aria-activedescendant": _.length ? `${L}-${String(_[v])}` : void 0,
|
|
1925
1920
|
"aria-label": `${b}: type to find`,
|
|
1926
1921
|
placeholder: "Type to find…",
|
|
1927
1922
|
"data-plan-add-filter": !0,
|
|
@@ -1929,22 +1924,22 @@ function Da(k) {
|
|
|
1929
1924
|
}
|
|
1930
1925
|
),
|
|
1931
1926
|
N.length === 0 && /* @__PURE__ */ t("p", { className: "px-2 py-1.5 text-[12px] text-slate-500", children: "Every one is already here." }),
|
|
1932
|
-
N.length > 0 &&
|
|
1927
|
+
N.length > 0 && _.length === 0 && /* @__PURE__ */ u("p", { className: "px-2 py-1.5 text-[12px] text-slate-500", children: [
|
|
1933
1928
|
"Nothing matches “",
|
|
1934
|
-
|
|
1929
|
+
R.trim(),
|
|
1935
1930
|
"”."
|
|
1936
1931
|
] }),
|
|
1937
|
-
/* @__PURE__ */ t("div", { id:
|
|
1932
|
+
/* @__PURE__ */ t("div", { id: L, role: "listbox", className: "max-h-[220px] overflow-y-auto", children: _.map((c, d) => /* @__PURE__ */ t(
|
|
1938
1933
|
"button",
|
|
1939
1934
|
{
|
|
1940
|
-
id: `${
|
|
1935
|
+
id: `${L}-${String(c)}`,
|
|
1941
1936
|
type: "button",
|
|
1942
1937
|
role: "option",
|
|
1943
1938
|
"aria-selected": d === v,
|
|
1944
1939
|
tabIndex: -1,
|
|
1945
1940
|
"data-plan-add-key": String(c),
|
|
1946
1941
|
onClick: () => s(c),
|
|
1947
|
-
onMouseEnter: () =>
|
|
1942
|
+
onMouseEnter: () => S(d),
|
|
1948
1943
|
className: B(
|
|
1949
1944
|
"block w-full rounded px-2 py-1.5 text-left text-[12.5px] text-slate-700 hover:bg-muted dark:text-slate-200",
|
|
1950
1945
|
d === v && "bg-accent"
|
|
@@ -1959,7 +1954,7 @@ function Da(k) {
|
|
|
1959
1954
|
onSubmit: (c) => {
|
|
1960
1955
|
c.preventDefault();
|
|
1961
1956
|
const d = I.trim();
|
|
1962
|
-
!d || f.has(d) || (i(Number.isFinite(Number(d)) ? Number(d) : d), T(""),
|
|
1957
|
+
!d || f.has(d) || (i(Number.isFinite(Number(d)) ? Number(d) : d), T(""), P(!1));
|
|
1963
1958
|
},
|
|
1964
1959
|
children: /* @__PURE__ */ t(
|
|
1965
1960
|
"input",
|
|
@@ -1983,12 +1978,12 @@ function Ba(k, n) {
|
|
|
1983
1978
|
return [...f.filter((b) => String(b).toLowerCase() === h), ...f.filter((b) => String(b).toLowerCase() !== h)];
|
|
1984
1979
|
}
|
|
1985
1980
|
export {
|
|
1986
|
-
|
|
1981
|
+
cl as PlanGridField,
|
|
1987
1982
|
Ut as figureError,
|
|
1988
1983
|
Ba as filterAddKeys,
|
|
1989
1984
|
U as fmtFigure,
|
|
1990
|
-
|
|
1985
|
+
Aa as isParentItemKey,
|
|
1991
1986
|
Ta as nextStagedEdit,
|
|
1992
1987
|
Bt as parseFigure,
|
|
1993
|
-
|
|
1988
|
+
Pa as reconcilePatch
|
|
1994
1989
|
};
|