@burojs/ui-shadcn 0.7.0 → 0.9.0
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/{bulk-summary-CrEij5vq.cjs → bulk-summary-2HLgz7Il.cjs} +31 -5
- package/dist/bulk-summary-2HLgz7Il.cjs.map +1 -0
- package/dist/{bulk-summary-BWSAS7k2.js → bulk-summary-D6A0ua21.js} +32 -6
- package/dist/bulk-summary-D6A0ua21.js.map +1 -0
- package/dist/{candidates-relation-picker-CS_JZ4Fd.js → candidates-relation-picker-QvoY2bOQ.js} +3 -3
- package/dist/{candidates-relation-picker-CS_JZ4Fd.js.map → candidates-relation-picker-QvoY2bOQ.js.map} +1 -1
- package/dist/{candidates-relation-picker-y5M6_oe4.cjs → candidates-relation-picker-pEAWKQEY.cjs} +3 -3
- package/dist/{candidates-relation-picker-y5M6_oe4.cjs.map → candidates-relation-picker-pEAWKQEY.cjs.map} +1 -1
- package/dist/{check-confirm-dialog-2j0gOd7x.js → check-confirm-dialog-B-CbJTln.js} +68 -8
- package/dist/{check-confirm-dialog-2j0gOd7x.js.map → check-confirm-dialog-B-CbJTln.js.map} +1 -1
- package/dist/{check-confirm-dialog-C-NHgMST.cjs → check-confirm-dialog-W-8WOmGh.cjs} +72 -6
- package/dist/check-confirm-dialog-W-8WOmGh.cjs.map +1 -0
- package/dist/{filter-builder-DaWHUZuV.js → filter-builder-04nas3eq.js} +127 -61
- package/dist/filter-builder-04nas3eq.js.map +1 -0
- package/dist/{filter-builder-DFu0JP-1.cjs → filter-builder-DQX-TMFh.cjs} +140 -68
- package/dist/filter-builder-DQX-TMFh.cjs.map +1 -0
- package/dist/{flow-runtime-DyqTmK3H.js → flow-runtime-BEIyym7d.js} +7 -4
- package/dist/{flow-runtime-DyqTmK3H.js.map → flow-runtime-BEIyym7d.js.map} +1 -1
- package/dist/{flow-runtime-BpmrIUb6.cjs → flow-runtime-DyNIYfUP.cjs} +7 -4
- package/dist/{flow-runtime-BpmrIUb6.cjs.map → flow-runtime-DyNIYfUP.cjs.map} +1 -1
- package/dist/{flow-screen-DCdli6Ha.js → flow-screen-DY1Z9PbG.js} +56 -15
- package/dist/flow-screen-DY1Z9PbG.js.map +1 -0
- package/dist/{flow-screen-Bcz9NF2V.cjs → flow-screen-FE5Xhb3t.cjs} +54 -13
- package/dist/flow-screen-FE5Xhb3t.cjs.map +1 -0
- package/dist/index.cjs +564 -170
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +235 -95
- package/dist/index.d.ts +235 -95
- package/dist/index.js +562 -169
- package/dist/index.js.map +1 -1
- package/dist/{inline-flow-host-C0rI9B7f.js → inline-flow-host-D6u-RlsV.js} +3 -3
- package/dist/{inline-flow-host-C0rI9B7f.js.map → inline-flow-host-D6u-RlsV.js.map} +1 -1
- package/dist/{inline-flow-host-3vw7LzzD.cjs → inline-flow-host-yVLo6-sM.cjs} +3 -3
- package/dist/{inline-flow-host-3vw7LzzD.cjs.map → inline-flow-host-yVLo6-sM.cjs.map} +1 -1
- package/dist/{lazy-relation-picker-dialog-CAScLPb2.js → lazy-relation-picker-dialog-BaORufxQ.js} +2 -2
- package/dist/{lazy-relation-picker-dialog-CAScLPb2.js.map → lazy-relation-picker-dialog-BaORufxQ.js.map} +1 -1
- package/dist/{lazy-relation-picker-dialog-Bt8lrEIu.cjs → lazy-relation-picker-dialog-C_VlGlDz.cjs} +2 -2
- package/dist/{lazy-relation-picker-dialog-Bt8lrEIu.cjs.map → lazy-relation-picker-dialog-C_VlGlDz.cjs.map} +1 -1
- package/dist/{page-flow-route-BHUEpn0I.js → page-flow-route-CyMzUidK.js} +8 -9
- package/dist/page-flow-route-CyMzUidK.js.map +1 -0
- package/dist/{page-flow-route-DS8IVTVH.cjs → page-flow-route-OFx7h7Ja.cjs} +8 -9
- package/dist/page-flow-route-OFx7h7Ja.cjs.map +1 -0
- package/dist/{place-node-CNb3w-c7.cjs → place-node-BZF5Af6x.cjs} +224 -151
- package/dist/place-node-BZF5Af6x.cjs.map +1 -0
- package/dist/{place-node-CfzQvh4Y.js → place-node-DRjmJGQ_.js} +210 -125
- package/dist/place-node-DRjmJGQ_.js.map +1 -0
- package/dist/{related-list-cards-BIqqY69Y.js → related-list-cards-2hLitVkg.js} +3 -3
- package/dist/{related-list-cards-BIqqY69Y.js.map → related-list-cards-2hLitVkg.js.map} +1 -1
- package/dist/{related-list-cards-CelMxl4q.cjs → related-list-cards-xVvgSlu-.cjs} +3 -3
- package/dist/{related-list-cards-CelMxl4q.cjs.map → related-list-cards-xVvgSlu-.cjs.map} +1 -1
- package/dist/related-list-timeline-CxJqe6eK.js +167 -0
- package/dist/related-list-timeline-CxJqe6eK.js.map +1 -0
- package/dist/related-list-timeline-Dsf5WewG.cjs +167 -0
- package/dist/related-list-timeline-Dsf5WewG.cjs.map +1 -0
- package/dist/{related-rows-MPnLCmPF.cjs → related-rows-DDhp9axl.cjs} +4 -4
- package/dist/{related-rows-MPnLCmPF.cjs.map → related-rows-DDhp9axl.cjs.map} +1 -1
- package/dist/{related-rows--uP2iKQC.js → related-rows-DL6CWsrj.js} +4 -4
- package/dist/{related-rows--uP2iKQC.js.map → related-rows-DL6CWsrj.js.map} +1 -1
- package/dist/{relation-create-C43cdPQt.js → relation-create-6WicROWA.js} +33 -5
- package/dist/relation-create-6WicROWA.js.map +1 -0
- package/dist/{relation-create-DDEYcKfw.cjs → relation-create-_SFuPQGM.cjs} +37 -3
- package/dist/relation-create-_SFuPQGM.cjs.map +1 -0
- package/dist/{relation-many-picker-DzuGJpEl.cjs → relation-many-picker-BBNsmkaX.cjs} +18 -11
- package/dist/relation-many-picker-BBNsmkaX.cjs.map +1 -0
- package/dist/{relation-many-picker-BJhaEqxz.js → relation-many-picker-mGEQDWo2.js} +18 -11
- package/dist/relation-many-picker-mGEQDWo2.js.map +1 -0
- package/dist/{relation-picker-D-tBBZW_.js → relation-picker-BbO41cFV.js} +19 -11
- package/dist/relation-picker-BbO41cFV.js.map +1 -0
- package/dist/{relation-picker-dialog-DoEY8EkH.js → relation-picker-dialog-BgSG_8bU.js} +5 -5
- package/dist/relation-picker-dialog-BgSG_8bU.js.map +1 -0
- package/dist/{relation-picker-dialog-9Vg5vvR1.cjs → relation-picker-dialog-Duqy2r0n.cjs} +5 -5
- package/dist/relation-picker-dialog-Duqy2r0n.cjs.map +1 -0
- package/dist/{relation-picker-DaIMzf2H.cjs → relation-picker-jk9D_uwn.cjs} +19 -11
- package/dist/relation-picker-jk9D_uwn.cjs.map +1 -0
- package/dist/{relation-select-Cr3CfNLy.cjs → relation-select-C3aV18kT.cjs} +2 -2
- package/dist/{relation-select-Cr3CfNLy.cjs.map → relation-select-C3aV18kT.cjs.map} +1 -1
- package/dist/{relation-select-B8Fq4o-t.js → relation-select-CjQT9LpS.js} +2 -2
- package/dist/{relation-select-B8Fq4o-t.js.map → relation-select-CjQT9LpS.js.map} +1 -1
- package/dist/{resource-page-router-Diw6S6TK.js → resource-page-router-CzaNATSp.js} +209 -30
- package/dist/resource-page-router-CzaNATSp.js.map +1 -0
- package/dist/{resource-page-router-C_kGW2o_.cjs → resource-page-router-dmVIeu5s.cjs} +235 -32
- package/dist/resource-page-router-dmVIeu5s.cjs.map +1 -0
- package/dist/{success-notices-Dl3M1fZP.cjs → success-notices-Cl4b6MLQ.cjs} +3 -2
- package/dist/success-notices-Cl4b6MLQ.cjs.map +1 -0
- package/dist/{success-notices-LDEgEkc4.js → success-notices-CrcWOGSo.js} +3 -2
- package/dist/success-notices-CrcWOGSo.js.map +1 -0
- package/dist/{use-dialog-filter-state-B_MqzHaT.js → use-dialog-filter-state-CJoeY-1j.js} +2 -2
- package/dist/{use-dialog-filter-state-B_MqzHaT.js.map → use-dialog-filter-state-CJoeY-1j.js.map} +1 -1
- package/dist/{use-dialog-filter-state-tNvqAAjh.cjs → use-dialog-filter-state-lsTJxrB4.cjs} +2 -2
- package/dist/{use-dialog-filter-state-tNvqAAjh.cjs.map → use-dialog-filter-state-lsTJxrB4.cjs.map} +1 -1
- package/dist/use-record-subtitle-BJ9rnj6F.cjs +67 -0
- package/dist/use-record-subtitle-BJ9rnj6F.cjs.map +1 -0
- package/dist/use-record-subtitle-w3ZhXNlf.js +50 -0
- package/dist/use-record-subtitle-w3ZhXNlf.js.map +1 -0
- package/package.json +9 -9
- package/dist/bulk-summary-BWSAS7k2.js.map +0 -1
- package/dist/bulk-summary-CrEij5vq.cjs.map +0 -1
- package/dist/check-confirm-dialog-C-NHgMST.cjs.map +0 -1
- package/dist/filter-builder-DFu0JP-1.cjs.map +0 -1
- package/dist/filter-builder-DaWHUZuV.js.map +0 -1
- package/dist/flow-screen-Bcz9NF2V.cjs.map +0 -1
- package/dist/flow-screen-DCdli6Ha.js.map +0 -1
- package/dist/page-flow-route-BHUEpn0I.js.map +0 -1
- package/dist/page-flow-route-DS8IVTVH.cjs.map +0 -1
- package/dist/place-node-CNb3w-c7.cjs.map +0 -1
- package/dist/place-node-CfzQvh4Y.js.map +0 -1
- package/dist/related-list-timeline-CRh7xwLD.js +0 -141
- package/dist/related-list-timeline-CRh7xwLD.js.map +0 -1
- package/dist/related-list-timeline-DsLdi8sv.cjs +0 -141
- package/dist/related-list-timeline-DsLdi8sv.cjs.map +0 -1
- package/dist/relation-create-C43cdPQt.js.map +0 -1
- package/dist/relation-create-DDEYcKfw.cjs.map +0 -1
- package/dist/relation-many-picker-BJhaEqxz.js.map +0 -1
- package/dist/relation-many-picker-DzuGJpEl.cjs.map +0 -1
- package/dist/relation-picker-D-tBBZW_.js.map +0 -1
- package/dist/relation-picker-DaIMzf2H.cjs.map +0 -1
- package/dist/relation-picker-dialog-9Vg5vvR1.cjs.map +0 -1
- package/dist/relation-picker-dialog-DoEY8EkH.js.map +0 -1
- package/dist/resource-page-router-C_kGW2o_.cjs.map +0 -1
- package/dist/resource-page-router-Diw6S6TK.js.map +0 -1
- package/dist/success-notices-Dl3M1fZP.cjs.map +0 -1
- package/dist/success-notices-LDEgEkc4.js.map +0 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { l as cn } from "./use-theme-dnE3Od3I.js";
|
|
2
2
|
import { i as isNetworkFailure, l as useLinkComponent, m as PopoverTrigger, n as toast, o as technicalTexts, p as PopoverContent, r as friendlyStringsFrom, s as toFriendlyError, u as Popover } from "./toaster-Ct_YHGs6.js";
|
|
3
|
-
import {
|
|
3
|
+
import { $ as DropdownMenuTrigger, A as useLoaded, C as RuntimeFlowRunner, D as loadInlineFlowHost, H as DropdownMenuGroup, I as Icon, J as DropdownMenuSeparator, S as RuntimeBulkFlowRunner, T as loadFailedText, U as DropdownMenuItem, V as DropdownMenuContent, W as DropdownMenuLabel, _ as ActionInner, f as useToBrowserHref, ft as DocInfo, h as useFlowChrome, i as UndecidedAction, k as preloadFlowRuntime, l as useListSlot, m as FlowMenuItem, n as ActionButton, p as FlowActionButton, r as DisabledAction, s as canonicalResourceName, t as CheckConfirmDialog, v as reasonText, w as loadBulkSummary, x as RuntimeAppFlowRunner, y as FlowBoundary, z as DropdownMenu } from "./check-confirm-dialog-B-CbJTln.js";
|
|
4
4
|
import { t as Button } from "./button-MWVeZaqj.js";
|
|
5
5
|
import { t as Input } from "./input-CUPStzZO.js";
|
|
6
6
|
import { a as DialogFooter, i as DialogDescription, o as DialogHeader, r as DialogContent, s as DialogTitle, t as Dialog } from "./dialog-C123sVQ8.js";
|
|
7
|
-
import {
|
|
7
|
+
import { _ as ClaimedQuickLink, b as LoadError, l as relationLinkClassName } from "./relation-create-6WicROWA.js";
|
|
8
8
|
import { t as Skeleton } from "./skeleton-U2noefj5.js";
|
|
9
|
-
import { A as
|
|
9
|
+
import { A as TableHeader, C as SelectTrigger, E as TableBody, F as ResolvedFieldDisplay, I as ResolvedFieldInput, L as useFieldMetaDiagnostic, M as Badge, O as TableCell, P as MetaPlaceholder, R as fieldDescription, T as Table$1, g as SelectContent, h as Select, j as TableRow, k as TableHead, t as FilterBuilder, v as SelectItem, w as SelectValue, z as lowerLegacyField } from "./filter-builder-04nas3eq.js";
|
|
10
10
|
import { t as Label } from "./label-66W1qbke.js";
|
|
11
|
-
import { n as useCandidateSelection, t as LazyRelationPickerDialog } from "./lazy-relation-picker-dialog-
|
|
12
|
-
import { t as useRelationSelect } from "./relation-select-
|
|
13
|
-
import { BULK_EACH_LIMIT, FORM_SLOT, LAYOUT_SIZES, builtinFrames, canonicalEntityNodeKey, columnName, compileFlow, compiledScreenFor, declaredField, declaredText, displayClassOf, dtoFields, enumFallbackKey, enumFallbackText, enumNamespaceOf, enumValueText, exportFormatFieldKey, exportFormatLabelKey, exportFormatOptionKey, facts, fieldOptionText, fieldSensitivity, flowRecordOf, formatEntityRef, grantedPlacementKeys, hasRecordPage, humanizeKey, i18nPrefixToRef, i18nPrefixToRef as i18nPrefixToRef$1, inlineFlow, isBuiltinItemAction, isColumnSortable, isRelationField, isScreenFailure, linkOf, normalizeDataError, normalizeEntityRef, planItemActions, projectDto, recordEntries, relatedList, relatedRecord, resolveActionDensity, resolveActionSurfaceMode, resolveColumnUi, resolveContentSlot, resolveEnumLabel, resolveFieldLabel, resolveFieldOptionLabel, resolveFieldSlot, resolveNavLabel, resolveResourceLabel,
|
|
14
|
-
import { ActionRouteContext, DismissGuardScope, FlowRowBatchContext, LOCAL_USER_SCOPE_ID, QUICK_ANCHOR_ATTRIBUTE, RECORD_KIND_KEYS, RecordScopeChain, ResourceListProvider, RouteSourceContext, ScreenStateProvider, columnTypeWidth, implementFrame, kindErrorText, linkCapabilitiesOf, policyRecordOf, policyRowsOf, recordKeyOf, resolveColumnField, resolveErrorText,
|
|
11
|
+
import { n as useCandidateSelection, t as LazyRelationPickerDialog } from "./lazy-relation-picker-dialog-BaORufxQ.js";
|
|
12
|
+
import { t as useRelationSelect } from "./relation-select-CjQT9LpS.js";
|
|
13
|
+
import { BULK_EACH_LIMIT, FORM_SLOT, LAYOUT_SIZES, addressesCapability, builtinFrames, canonicalEntityNodeKey, columnName, compileFlow, compiledScreenFor, declaredField, declaredText, displayClassOf, dtoFields, enumFallbackKey, enumFallbackText, enumNamespaceOf, enumValueText, exportFormatFieldKey, exportFormatLabelKey, exportFormatOptionKey, facts, fieldOptionText, fieldSensitivity, flowRecordOf, formatEntityRef, grantedPlacementKeys, hasRecordPage, humanizeKey, i18nPrefixToRef, i18nPrefixToRef as i18nPrefixToRef$1, inlineFlow, isBuiltinItemAction, isColumnSortable, isRelationField, isScreenFailure, linkOf, normalizeDataError, normalizeEntityRef, permissionsUndecided, planItemActions, projectDto, propertyTextKey, recordEntries, relatedList, relatedRecord, resolveActionDensity, resolveActionSurfaceMode, resolveColumnUi, resolveContentSlot, resolveEnumLabel, resolveFieldLabel, resolveFieldOptionLabel, resolveFieldSlot, resolveNavLabel, resolveResourceLabel, resolveSurfaceUi, resolveTextSlot, resourceKey, resourceShowHref, reverseLinkOf, routeResourceKey, routeServerIssues, savedViewKey, validatePlacementProps, whereEntryToFilter } from "@burojs/core";
|
|
14
|
+
import { ActionRouteContext, DismissGuardScope, FlowRowBatchContext, LOCAL_USER_SCOPE_ID, QUICK_ANCHOR_ATTRIBUTE, RECORD_KIND_KEYS, RecordScopeChain, ResourceListProvider, RouteSourceContext, ScreenStateProvider, columnTypeWidth, deriveRecord, implementFrame, isObjectColumn, kindErrorText, linkCapabilitiesOf, policyRecordOf, policyRowsOf, readColumnValue, recordKeyOf, resolveColumnField, resolveErrorText, resolveObjectColumn, resolveValidationMessage, resourceFlowsOn, specificErrorText, tableLayoutSetting, useApp, useApplicationSnapshot, useAvailability, useAvailabilityResolver, useCapability, useCapabilityResolver, useChromeT, useClipboard, useComponent, useCtx, useCurrentUserId, useCustomQuery, useDataRuntime, useDismissGuard, useEntryGate, useEnumValues, useExportRuns, useFieldAccess, useFieldImplementation, useFieldMeta, useFieldMetaSources, useFlowRowBatch, useFlowRowResolver, useFormController, useFrameImplementations, useFramePiece, useFrameT, useI18nCaps, useItemActions, useLinkRights, useLinkWriter, useLinkedKeys, useListAccess, useLocale, useNavigationBlocker, useOne, useOptionalDataRuntime, useOptionalRecordFrame, useOptionalRouterAdapter, useOptionalT, useOptionalUiSettings, usePageFlowGate, usePageScreen, usePathAccess, usePermissionsUndecided, usePlacement, useProjectedRecord, useProjectedTitle, usePublishDocVariant, useQuick, useQuickEntry, useQuickOpener, useRecordFrame, useRecordScopeFrames, useRecordTitle, useResource, useResourceExport, useResourceList, useResourceListContext, useReturnTarget, useRouteNavigate, useScreenState, useSearchParamsWriter, useT, useTestIds, useViewRow, withRecordKeys } from "@burojs/react";
|
|
15
15
|
import { IconAlertCircle, IconAlertTriangle, IconArrowDown, IconArrowLeft, IconArrowRight, IconArrowUp, IconBookmark, IconCheck, IconChevronLeft, IconChevronRight, IconChevronsLeft, IconChevronsRight, IconColumns3, IconCopy, IconDots, IconDownload, IconEyeOff, IconFilterX, IconInbox, IconLink, IconLoader2, IconLock, IconMinus, IconPencil, IconPinned, IconPinnedOff, IconPlus, IconRefresh, IconSelector, IconSettings2, IconTrash, IconUnlink, IconX } from "@tabler/icons-react";
|
|
16
16
|
import * as React from "react";
|
|
17
17
|
import { Component, Fragment, Suspense, createContext, createElement, lazy, memo, useCallback, useContext, useEffect, useId, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
18
18
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
-
import { actionWhenHolds, enumBindingKey, hasNullRef, isFlowAction, whereToFilter } from "@burojs/core/internal";
|
|
19
|
+
import { actionWhenHolds, deepestPlacedPath, enumBindingKey, hasNullRef, isFlowAction, pathHead, whereToFilter } from "@burojs/core/internal";
|
|
20
20
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
21
21
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
22
22
|
import { flexRender, getCoreRowModel, getFacetedRowModel, getFacetedUniqueValues, useReactTable } from "@tanstack/react-table";
|
|
@@ -143,10 +143,10 @@ function copyText(value) {
|
|
|
143
143
|
function FieldValueFrame({ field, value, surface, entry, children }) {
|
|
144
144
|
const t = useOptionalT();
|
|
145
145
|
const clipboard = useClipboard();
|
|
146
|
-
const [copied, setCopied] = useState(
|
|
146
|
+
const [copied, setCopied] = useState(null);
|
|
147
147
|
useEffect(() => {
|
|
148
|
-
if (
|
|
149
|
-
const timer = setTimeout(() => setCopied(
|
|
148
|
+
if (copied === null) return;
|
|
149
|
+
const timer = setTimeout(() => setCopied(null), COPIED_MS);
|
|
150
150
|
return () => clearTimeout(timer);
|
|
151
151
|
}, [copied]);
|
|
152
152
|
const ui = isRecord$1(field.ui) ? field.ui : void 0;
|
|
@@ -177,7 +177,7 @@ function FieldValueFrame({ field, value, surface, entry, children }) {
|
|
|
177
177
|
const copy = (event) => {
|
|
178
178
|
event.preventDefault();
|
|
179
179
|
event.stopPropagation();
|
|
180
|
-
clipboard(copyText(value)).then(() => setCopied(
|
|
180
|
+
clipboard(copyText(value)).then(() => setCopied("copied"), () => setCopied("failed"));
|
|
181
181
|
};
|
|
182
182
|
return jsxs("span", {
|
|
183
183
|
className: "inline-flex min-w-0 max-w-full items-center gap-1 align-bottom",
|
|
@@ -190,7 +190,7 @@ function FieldValueFrame({ field, value, surface, entry, children }) {
|
|
|
190
190
|
title: label,
|
|
191
191
|
onClick: copy,
|
|
192
192
|
className: "inline-flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
193
|
-
children: copied ? jsx(IconCheck, {
|
|
193
|
+
children: copied === "copied" ? jsx(IconCheck, {
|
|
194
194
|
"aria-hidden": "true",
|
|
195
195
|
className: "size-3.5"
|
|
196
196
|
}) : jsx(IconCopy, {
|
|
@@ -201,7 +201,7 @@ function FieldValueFrame({ field, value, surface, entry, children }) {
|
|
|
201
201
|
jsx("span", {
|
|
202
202
|
"aria-live": "polite",
|
|
203
203
|
className: "sr-only",
|
|
204
|
-
children: copied ? t("field.copied", { defaultValue: "Copied" }) : ""
|
|
204
|
+
children: copied === "copied" ? t("field.copied", { defaultValue: "Copied" }) : copied === "failed" ? t("field.copyFailed", { defaultValue: "Could not copy" }) : ""
|
|
205
205
|
})
|
|
206
206
|
]
|
|
207
207
|
});
|
|
@@ -281,6 +281,10 @@ function leafAttributes(size, weight) {
|
|
|
281
281
|
...weight === void 0 ? {} : { "data-buro-weight": String(weight) }
|
|
282
282
|
};
|
|
283
283
|
}
|
|
284
|
+
function labelHiddenOf(compiled, node) {
|
|
285
|
+
return compiled.nodes[node.index]?.options.label === "hidden";
|
|
286
|
+
}
|
|
287
|
+
const labelRegion = (hidden, visible) => hidden ? "sr-only" : visible;
|
|
284
288
|
function FieldLeaf({ node }) {
|
|
285
289
|
const { leafIds } = useScreenTree();
|
|
286
290
|
if (node.state === "failed" && node.failedOn.length > 0 && node.failedOn.every((name) => name.startsWith("meta:"))) return jsx(MisconfiguredLeaf, { node });
|
|
@@ -292,7 +296,8 @@ function FieldLeaf({ node }) {
|
|
|
292
296
|
return jsx(RecordLeaf, { node });
|
|
293
297
|
}
|
|
294
298
|
function MisconfiguredLeaf({ node }) {
|
|
295
|
-
const { leafIds, resource, mode, controller } = useScreenTree();
|
|
299
|
+
const { leafIds, resource, mode, compiled, controller } = useScreenTree();
|
|
300
|
+
const hidden = labelHiddenOf(compiled, node);
|
|
296
301
|
const name = node.field;
|
|
297
302
|
const binding = controller.field(name);
|
|
298
303
|
const caps = useI18nCaps(resource);
|
|
@@ -319,7 +324,7 @@ function MisconfiguredLeaf({ node }) {
|
|
|
319
324
|
"data-buro-field-meta": "failed",
|
|
320
325
|
children: [jsx("div", {
|
|
321
326
|
"data-buro-region": "field-label",
|
|
322
|
-
className: "text-sm font-medium leading-none",
|
|
327
|
+
className: labelRegion(hidden, "text-sm font-medium leading-none"),
|
|
323
328
|
children: label
|
|
324
329
|
}), jsx("div", {
|
|
325
330
|
"data-buro-region": "field-control",
|
|
@@ -327,12 +332,22 @@ function MisconfiguredLeaf({ node }) {
|
|
|
327
332
|
})]
|
|
328
333
|
});
|
|
329
334
|
}
|
|
335
|
+
function valueAt(record, path) {
|
|
336
|
+
let at = record;
|
|
337
|
+
for (const segment of path.split(".")) {
|
|
338
|
+
if (at === null || typeof at !== "object") return void 0;
|
|
339
|
+
at = at[segment];
|
|
340
|
+
}
|
|
341
|
+
return at;
|
|
342
|
+
}
|
|
330
343
|
function RecordLeaf({ node }) {
|
|
331
344
|
const { resource, mode, compiled, controller } = useScreenTree();
|
|
332
|
-
const
|
|
345
|
+
const head = node.field;
|
|
346
|
+
const name = node.fieldPath ?? head;
|
|
333
347
|
const binding = controller.field(name);
|
|
334
348
|
const size = useLeafSize(binding.field);
|
|
335
349
|
const weight = compiled.nodes[node.index]?.options.weight;
|
|
350
|
+
const hidden = labelHiddenOf(compiled, node);
|
|
336
351
|
const caps = useI18nCaps(resource);
|
|
337
352
|
const tid = useTestIds();
|
|
338
353
|
const label = resolveFieldLabel(caps, name, declaredText("field", binding.field, "label"));
|
|
@@ -349,7 +364,7 @@ function RecordLeaf({ node }) {
|
|
|
349
364
|
"data-buro-restricted": "true",
|
|
350
365
|
children: [jsx("div", {
|
|
351
366
|
"data-buro-region": "field-label",
|
|
352
|
-
className: "text-sm font-medium leading-none",
|
|
367
|
+
className: labelRegion(hidden, "text-sm font-medium leading-none"),
|
|
353
368
|
children: label
|
|
354
369
|
}), jsx("div", {
|
|
355
370
|
"data-buro-region": "field-control",
|
|
@@ -369,7 +384,7 @@ function RecordLeaf({ node }) {
|
|
|
369
384
|
});
|
|
370
385
|
}
|
|
371
386
|
const record = controller.record;
|
|
372
|
-
const value = mode === "show" ? record
|
|
387
|
+
const value = mode === "show" ? valueAt(record, name) ?? binding.value : mode === "edit" && controller.plan?.fields[head] !== "active" ? valueAt(record, name) ?? binding.value : binding.value;
|
|
373
388
|
const display = jsx(FieldDisplay, {
|
|
374
389
|
resource: binding.resource,
|
|
375
390
|
name,
|
|
@@ -377,6 +392,8 @@ function RecordLeaf({ node }) {
|
|
|
377
392
|
value,
|
|
378
393
|
metaSources: controller.sources,
|
|
379
394
|
...record === void 0 ? {} : { record },
|
|
395
|
+
...binding.absentPaths === void 0 ? {} : { absentPaths: binding.absentPaths },
|
|
396
|
+
...binding.pathStatus === void 0 ? {} : { pathStatus: binding.pathStatus },
|
|
380
397
|
fallback: value == null || value === "" ? jsx("span", {
|
|
381
398
|
className: "text-muted-foreground",
|
|
382
399
|
children: "—"
|
|
@@ -387,11 +404,11 @@ function RecordLeaf({ node }) {
|
|
|
387
404
|
"data-testid": `show-field:${resource}:${name}`,
|
|
388
405
|
children: [jsxs("dt", {
|
|
389
406
|
"data-buro-region": "field-label",
|
|
390
|
-
className: cn("flex items-center gap-0.5", FIELD_LABEL_SHOW),
|
|
407
|
+
className: labelRegion(hidden, cn("flex items-center gap-0.5", FIELD_LABEL_SHOW)),
|
|
391
408
|
children: [jsx("span", {
|
|
392
409
|
className: "min-w-0",
|
|
393
410
|
children: label
|
|
394
|
-
}), jsx(DocInfo, {
|
|
411
|
+
}), hidden ? null : jsx(DocInfo, {
|
|
395
412
|
address: `${resource}/fields/${name}`,
|
|
396
413
|
name: label
|
|
397
414
|
})]
|
|
@@ -411,8 +428,8 @@ function RecordLeaf({ node }) {
|
|
|
411
428
|
"data-testid": tid.formField(resource, mode, name),
|
|
412
429
|
children: [jsxs("div", {
|
|
413
430
|
"data-buro-region": "field-label",
|
|
414
|
-
className: "flex items-center gap-2",
|
|
415
|
-
children: [jsx(Label, { children: label }), jsx(DocInfo, {
|
|
431
|
+
className: labelRegion(hidden, "flex items-center gap-2"),
|
|
432
|
+
children: [jsx(Label, { children: label }), hidden ? null : jsx(DocInfo, {
|
|
416
433
|
address: `${resource}/fields/${name}`,
|
|
417
434
|
name: label,
|
|
418
435
|
testId: `${tid.formField(resource, mode, name)}:info`
|
|
@@ -448,11 +465,12 @@ function RecordLeaf({ node }) {
|
|
|
448
465
|
node,
|
|
449
466
|
binding,
|
|
450
467
|
label,
|
|
468
|
+
labelHidden: hidden,
|
|
451
469
|
attributes,
|
|
452
470
|
inputId
|
|
453
471
|
});
|
|
454
472
|
}
|
|
455
|
-
function ActiveLeaf({ node, binding, label, attributes, inputId }) {
|
|
473
|
+
function ActiveLeaf({ node, binding, label, labelHidden, attributes, inputId }) {
|
|
456
474
|
const { resource, mode, controller, disabled: locked } = useScreenTree();
|
|
457
475
|
const caps = useI18nCaps(resource);
|
|
458
476
|
const tid = useTestIds();
|
|
@@ -496,13 +514,13 @@ function ActiveLeaf({ node, binding, label, attributes, inputId }) {
|
|
|
496
514
|
onBlur: binding.onBlur,
|
|
497
515
|
children: [jsxs("div", {
|
|
498
516
|
"data-buro-region": "field-label",
|
|
499
|
-
className: "flex items-center gap-2",
|
|
517
|
+
className: labelRegion(labelHidden, "flex items-center gap-2"),
|
|
500
518
|
children: [jsx(Label, {
|
|
501
519
|
id: `${inputId}-label`,
|
|
502
520
|
htmlFor: inputId,
|
|
503
521
|
required: binding.required,
|
|
504
522
|
children: label
|
|
505
|
-
}), jsx(DocInfo, {
|
|
523
|
+
}), labelHidden ? null : jsx(DocInfo, {
|
|
506
524
|
address: `${resource}/fields/${name}`,
|
|
507
525
|
name: label,
|
|
508
526
|
testId: `${tid.formField(resource, mode, name)}:info`
|
|
@@ -525,13 +543,17 @@ function ActiveLeaf({ node, binding, label, attributes, inputId }) {
|
|
|
525
543
|
...mode === "create" || record === void 0 ? {} : { record },
|
|
526
544
|
form: controller.values,
|
|
527
545
|
metaSources: controller.sources,
|
|
546
|
+
...controller.baseline === void 0 ? {} : { baseline: controller.baseline },
|
|
528
547
|
...describedBy === void 0 ? {} : { descriptionId: describedBy },
|
|
529
548
|
...errorMessageId === void 0 ? {} : { errorId: errorMessageId },
|
|
530
549
|
errorMessage: errorText,
|
|
531
550
|
issues: binding.issues,
|
|
532
551
|
...binding.fixedFilters === void 0 ? {} : { fixedFilters: binding.fixedFilters },
|
|
552
|
+
...binding.optionSubtitle === void 0 ? {} : { optionSubtitle: binding.optionSubtitle },
|
|
533
553
|
...binding.relationSeeds === void 0 ? {} : { relationSeeds: binding.relationSeeds },
|
|
534
554
|
...binding.link === void 0 ? {} : { link: binding.link },
|
|
555
|
+
...binding.absentPaths === void 0 ? {} : { absentPaths: binding.absentPaths },
|
|
556
|
+
...binding.pathStatus === void 0 ? {} : { pathStatus: binding.pathStatus },
|
|
535
557
|
fallback: jsx(Input, {
|
|
536
558
|
id: inputId,
|
|
537
559
|
name: inputId,
|
|
@@ -578,6 +600,7 @@ function DeclarativeLeaf({ node, prefix, inputIds }) {
|
|
|
578
600
|
const binding = controller.field(name);
|
|
579
601
|
const size = useLeafSize(binding.field);
|
|
580
602
|
const weight = compiled.nodes[node.index]?.options.weight;
|
|
603
|
+
const hidden = labelHiddenOf(compiled, node);
|
|
581
604
|
const attributes = leafAttributes(size, weight);
|
|
582
605
|
const docRef = i18nPrefixToRef(prefix);
|
|
583
606
|
const docScope = docRef.namespace === "default" ? docRef.id : formatEntityRef(docRef);
|
|
@@ -596,7 +619,7 @@ function DeclarativeLeaf({ node, prefix, inputIds }) {
|
|
|
596
619
|
});
|
|
597
620
|
const label = resolveFieldLabel(caps, name, declaredText("field", binding.field, "label"));
|
|
598
621
|
const hint = resolveFieldSlot(caps, name, "description", fieldDescription(binding.field));
|
|
599
|
-
const info = jsx(DocInfo, {
|
|
622
|
+
const info = hidden ? null : jsx(DocInfo, {
|
|
600
623
|
address: `${docScope}/fields/${name}`,
|
|
601
624
|
name: label,
|
|
602
625
|
testId: `${prefix}:field:${name}:info`
|
|
@@ -613,7 +636,7 @@ function DeclarativeLeaf({ node, prefix, inputIds }) {
|
|
|
613
636
|
children: [
|
|
614
637
|
jsxs("div", {
|
|
615
638
|
"data-buro-region": "field-label",
|
|
616
|
-
className: "flex items-center gap-2",
|
|
639
|
+
className: labelRegion(hidden, "flex items-center gap-2"),
|
|
617
640
|
children: [jsx("span", {
|
|
618
641
|
className: FIELD_LABEL_SHOW,
|
|
619
642
|
children: label
|
|
@@ -646,6 +669,7 @@ function DeclarativeLeaf({ node, prefix, inputIds }) {
|
|
|
646
669
|
...binding,
|
|
647
670
|
field: binding.field,
|
|
648
671
|
metaSources: controller.sources,
|
|
672
|
+
...controller.baseline === void 0 ? {} : { baseline: controller.baseline },
|
|
649
673
|
inputId,
|
|
650
674
|
labelId: `${inputId}-label`,
|
|
651
675
|
i18nPrefix: prefix,
|
|
@@ -661,7 +685,7 @@ function DeclarativeLeaf({ node, prefix, inputIds }) {
|
|
|
661
685
|
children: [
|
|
662
686
|
jsxs("div", {
|
|
663
687
|
"data-buro-region": "field-label",
|
|
664
|
-
className: "flex items-center gap-2",
|
|
688
|
+
className: labelRegion(hidden, "flex items-center gap-2"),
|
|
665
689
|
children: [jsx(Label, {
|
|
666
690
|
id: `${inputId}-label`,
|
|
667
691
|
htmlFor: inputId,
|
|
@@ -855,6 +879,20 @@ function AppFlowButton({ action, variant = "ghost", size = "sm", className }) {
|
|
|
855
879
|
actionName: action.name,
|
|
856
880
|
surface: "app"
|
|
857
881
|
});
|
|
882
|
+
if (action.undecided === true) return jsx(Button, {
|
|
883
|
+
type: "button",
|
|
884
|
+
variant,
|
|
885
|
+
size,
|
|
886
|
+
className,
|
|
887
|
+
"data-testid": testid,
|
|
888
|
+
"data-buro-flow-state": "undecided",
|
|
889
|
+
disabled: true,
|
|
890
|
+
"aria-busy": "true",
|
|
891
|
+
children: jsx(ActionInner, {
|
|
892
|
+
icon: action.icon,
|
|
893
|
+
label
|
|
894
|
+
})
|
|
895
|
+
});
|
|
858
896
|
if (action.hostHref !== void 0) return jsx(Button, {
|
|
859
897
|
asChild: true,
|
|
860
898
|
variant,
|
|
@@ -923,10 +961,7 @@ function RecordInlineFlow({ name }) {
|
|
|
923
961
|
const id = frame?.recordId;
|
|
924
962
|
const asRead = frame === null ? void 0 : policyRecordOf(frame.controller, frame.record);
|
|
925
963
|
const key = placement?.key ?? flowName;
|
|
926
|
-
const state = frame === null || id === void 0 || asRead === void 0 ? null : resolve(flowName, {
|
|
927
|
-
...asRead,
|
|
928
|
-
id
|
|
929
|
-
});
|
|
964
|
+
const state = frame === null || id === void 0 || asRead === void 0 ? null : resolve(flowName, withRecordKeys(asRead, { id }));
|
|
930
965
|
const kept = holder?.get(key);
|
|
931
966
|
const stale = state?.state === "absent" && state.cause === "when" && kept !== void 0 && kept.dirty;
|
|
932
967
|
const gone = state?.state === "absent" && !stale;
|
|
@@ -938,10 +973,7 @@ function RecordInlineFlow({ name }) {
|
|
|
938
973
|
key
|
|
939
974
|
]);
|
|
940
975
|
if (frame === null || asRead === void 0 || id === void 0 || compiled === null) return null;
|
|
941
|
-
const row = {
|
|
942
|
-
...asRead,
|
|
943
|
-
id
|
|
944
|
-
};
|
|
976
|
+
const row = withRecordKeys(asRead, { id });
|
|
945
977
|
const control = resolve(flowName, row);
|
|
946
978
|
switch (control.state) {
|
|
947
979
|
case "undecided":
|
|
@@ -1212,6 +1244,28 @@ function placementSeeds(where, resolved, closure) {
|
|
|
1212
1244
|
return Object.freeze(seeds);
|
|
1213
1245
|
}
|
|
1214
1246
|
//#endregion
|
|
1247
|
+
//#region src/enum/enum-settling.tsx
|
|
1248
|
+
function unknownEnumValueLabel(caps, def, ns, value) {
|
|
1249
|
+
const declared = enumFallbackText(def);
|
|
1250
|
+
if (def.fallback === void 0 && declared === void 0) return {
|
|
1251
|
+
label: value,
|
|
1252
|
+
fallback: false
|
|
1253
|
+
};
|
|
1254
|
+
return {
|
|
1255
|
+
label: resolveContentSlot(caps, [enumFallbackKey(ns)], { default: declared }) ?? value,
|
|
1256
|
+
fallback: true
|
|
1257
|
+
};
|
|
1258
|
+
}
|
|
1259
|
+
function EnumSettlingRow({ status, testid }) {
|
|
1260
|
+
const t = useOptionalT();
|
|
1261
|
+
return jsx("div", {
|
|
1262
|
+
role: "status",
|
|
1263
|
+
"data-testid": testid === void 0 ? void 0 : `${testid}:${status}`,
|
|
1264
|
+
className: "px-2 py-1.5 text-sm text-muted-foreground",
|
|
1265
|
+
children: status === "pending" ? t("field.loading", { defaultValue: "Loading…" }) : t("relation.failed", { defaultValue: "Failed to load options." })
|
|
1266
|
+
});
|
|
1267
|
+
}
|
|
1268
|
+
//#endregion
|
|
1215
1269
|
//#region src/enum/enum-badge.tsx
|
|
1216
1270
|
function BadgeBody({ icon, label }) {
|
|
1217
1271
|
return jsxs("span", {
|
|
@@ -1282,9 +1336,9 @@ function EnumBadge({ enumName: enumInput, value, testid, className, presentation
|
|
|
1282
1336
|
children: body
|
|
1283
1337
|
});
|
|
1284
1338
|
}
|
|
1285
|
-
const
|
|
1286
|
-
if (
|
|
1287
|
-
const fallbackLabel =
|
|
1339
|
+
const unknown = unknownEnumValueLabel(caps, def, ns, value);
|
|
1340
|
+
if (unknown.fallback) {
|
|
1341
|
+
const fallbackLabel = unknown.label;
|
|
1288
1342
|
if (presentation === "plain") return jsx("span", {
|
|
1289
1343
|
"data-testid": `${id}:fallback`,
|
|
1290
1344
|
className,
|
|
@@ -1512,35 +1566,6 @@ function useShownItemActions(resource, record, surface, hideFlows, sources) {
|
|
|
1512
1566
|
return hideFlows === void 0 ? shown : shown.filter((a) => a.flow === void 0 || !hideFlows(a.name));
|
|
1513
1567
|
}
|
|
1514
1568
|
//#endregion
|
|
1515
|
-
//#region src/layout/record-targets.ts
|
|
1516
|
-
function recordRouteAvailable(registry, resource, action) {
|
|
1517
|
-
if (resolveStaticAvailability(registry, resource, action).state !== "available") return false;
|
|
1518
|
-
const def = registry.get(resource);
|
|
1519
|
-
return def !== void 0 && hasRecordPage(def, action);
|
|
1520
|
-
}
|
|
1521
|
-
function isShowAvailable(registry, resource) {
|
|
1522
|
-
return recordRouteAvailable(registry, resource, "show");
|
|
1523
|
-
}
|
|
1524
|
-
function showTarget(resource, id) {
|
|
1525
|
-
return {
|
|
1526
|
-
resource,
|
|
1527
|
-
action: "show",
|
|
1528
|
-
params: { id }
|
|
1529
|
-
};
|
|
1530
|
-
}
|
|
1531
|
-
function listTarget(resource) {
|
|
1532
|
-
return {
|
|
1533
|
-
resource,
|
|
1534
|
-
action: "list"
|
|
1535
|
-
};
|
|
1536
|
-
}
|
|
1537
|
-
function recordReturnTarget(registry, resource, id) {
|
|
1538
|
-
return isShowAvailable(registry, resource) ? showTarget(resource, id) : listTarget(resource);
|
|
1539
|
-
}
|
|
1540
|
-
function editBackHref(registry, resource, id, backHref) {
|
|
1541
|
-
return backHref ?? resolveRoute(recordReturnTarget(registry, resource, id), registry);
|
|
1542
|
-
}
|
|
1543
|
-
//#endregion
|
|
1544
1569
|
//#region src/lib/typography.ts
|
|
1545
1570
|
const typography = {
|
|
1546
1571
|
h1: "text-2xl font-semibold tracking-tight",
|
|
@@ -1668,16 +1693,16 @@ function ShowPageHeader({ resource: resourceInput, record, extraActions, breadcr
|
|
|
1668
1693
|
}
|
|
1669
1694
|
function EditPageHeader({ resource: resourceInput, record, backHref, breadcrumbs }) {
|
|
1670
1695
|
const resource = routeResourceKey(resourceInput);
|
|
1671
|
-
const
|
|
1672
|
-
const def = app.registry.get(resource);
|
|
1696
|
+
const def = useApp().registry.get(resource);
|
|
1673
1697
|
const caps = useI18nCaps(resource);
|
|
1674
1698
|
const recordKey = recordKeyOf(def, record);
|
|
1675
1699
|
const recordName = useProjectedTitle(resource, recordKey, record);
|
|
1700
|
+
const back = useReturnTarget(resource, "edit", String(recordKey ?? ""));
|
|
1676
1701
|
return jsx(PageHeader, {
|
|
1677
1702
|
resource,
|
|
1678
1703
|
mode: "edit",
|
|
1679
1704
|
recordName,
|
|
1680
|
-
backHref:
|
|
1705
|
+
backHref: backHref ?? back,
|
|
1681
1706
|
breadcrumbs,
|
|
1682
1707
|
backLabel: recordName ? `${resolveResourceLabel(caps, resource, "single", def)}: ${recordName}` : void 0,
|
|
1683
1708
|
actions: jsx(ActionOverflow, {
|
|
@@ -1966,19 +1991,26 @@ function BuroPanelFrame({ body, title, description, collapsible, open, onToggle,
|
|
|
1966
1991
|
"data-buro-region": "panel-title",
|
|
1967
1992
|
className: "flex items-center gap-1",
|
|
1968
1993
|
children: [
|
|
1969
|
-
collapsible ? jsx("
|
|
1994
|
+
collapsible && title !== void 0 ? jsx("h3", {
|
|
1995
|
+
id: titleId,
|
|
1996
|
+
className: "min-w-0 flex-1 text-sm font-semibold",
|
|
1997
|
+
children: jsxs("button", {
|
|
1998
|
+
type: "button",
|
|
1999
|
+
"aria-expanded": open,
|
|
2000
|
+
"aria-controls": bodyId,
|
|
2001
|
+
onClick: () => onToggle(!open),
|
|
2002
|
+
className: "-mx-1 flex w-full items-center gap-1 rounded px-1 text-left hover:bg-muted focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring",
|
|
2003
|
+
children: [jsx(Chevron, { open }), title]
|
|
2004
|
+
})
|
|
2005
|
+
}) : collapsible ? jsx("button", {
|
|
1970
2006
|
type: "button",
|
|
1971
2007
|
"aria-expanded": open,
|
|
1972
2008
|
"aria-controls": bodyId,
|
|
1973
2009
|
"aria-label": open ? t("screen.collapse", { defaultValue: "Collapse" }) : t("screen.expand", { defaultValue: "Expand" }),
|
|
1974
2010
|
onClick: () => onToggle(!open),
|
|
1975
2011
|
className: "inline-flex size-6 items-center justify-center rounded text-muted-foreground hover:bg-muted",
|
|
1976
|
-
children: jsx(
|
|
1977
|
-
|
|
1978
|
-
"aria-hidden": "true"
|
|
1979
|
-
})
|
|
1980
|
-
}) : null,
|
|
1981
|
-
title === void 0 ? null : jsx("h3", {
|
|
2012
|
+
children: jsx(Chevron, { open })
|
|
2013
|
+
}) : title === void 0 ? null : jsx("h3", {
|
|
1982
2014
|
id: titleId,
|
|
1983
2015
|
className: "text-sm font-semibold",
|
|
1984
2016
|
children: title
|
|
@@ -1996,6 +2028,12 @@ function BuroPanelFrame({ body, title, description, collapsible, open, onToggle,
|
|
|
1996
2028
|
]
|
|
1997
2029
|
});
|
|
1998
2030
|
}
|
|
2031
|
+
function Chevron({ open }) {
|
|
2032
|
+
return jsx(IconChevronRight, {
|
|
2033
|
+
className: open ? "h-4 w-4 shrink-0 rotate-90 text-muted-foreground transition-transform" : "h-4 w-4 shrink-0 text-muted-foreground transition-transform",
|
|
2034
|
+
"aria-hidden": "true"
|
|
2035
|
+
});
|
|
2036
|
+
}
|
|
1999
2037
|
function BuroTabsFrame({ tabs, active, onSelect, info, nodeAttributes }) {
|
|
2000
2038
|
if (tabs.length === 1) return jsx("div", {
|
|
2001
2039
|
...nodeAttributes,
|
|
@@ -2613,7 +2651,8 @@ function ColumnHeaderMenu({ label, sortDirection, sortable, onSort, pinned, onPi
|
|
|
2613
2651
|
}
|
|
2614
2652
|
//#endregion
|
|
2615
2653
|
//#region src/resource/column-accessor.ts
|
|
2616
|
-
function columnAccessor(column) {
|
|
2654
|
+
function columnAccessor(column, objectPath = false) {
|
|
2655
|
+
if (objectPath) return { accessorFn: (row) => readColumnValue(row, column, true) };
|
|
2617
2656
|
return column.includes(".") ? { accessorFn: (row) => row[column] } : { accessorKey: column };
|
|
2618
2657
|
}
|
|
2619
2658
|
//#endregion
|
|
@@ -3222,7 +3261,8 @@ function ResourceList({ resource: resourceInput, data, total, page = 1, pageSize
|
|
|
3222
3261
|
});
|
|
3223
3262
|
for (const col of visibleColumnKeys) {
|
|
3224
3263
|
const target = columnTarget(app.registry, resource, col);
|
|
3225
|
-
const
|
|
3264
|
+
const objectPath = isObjectColumn(app.registry, resource, col);
|
|
3265
|
+
const field = target !== void 0 ? target.field : objectPath ? resolveObjectColumn(app.registry, resource, col)?.field : def === void 0 ? void 0 : declaredField(def, col);
|
|
3226
3266
|
const declaredLabel = declaredText("field", field, "label");
|
|
3227
3267
|
const headerLabel = target === void 0 ? resolveFieldLabel(volatileRef.current.i18nCaps, col, declaredLabel) : resolveFieldLabel(capsOf(volatileRef.current.i18nCaps, target.resource), target.name, declaredLabel);
|
|
3228
3268
|
const ui = columnUiOf(col);
|
|
@@ -3230,12 +3270,15 @@ function ResourceList({ resource: resourceInput, data, total, page = 1, pageSize
|
|
|
3230
3270
|
...field ?? { type: "unknown" },
|
|
3231
3271
|
name: target === void 0 ? col : target.name
|
|
3232
3272
|
};
|
|
3233
|
-
const cellEntry = { display:
|
|
3273
|
+
const cellEntry = { display: {
|
|
3274
|
+
...ui.display,
|
|
3275
|
+
...ui.display.dateDisplay
|
|
3276
|
+
} };
|
|
3234
3277
|
const wraps = ui.display.overflow === "wrap";
|
|
3235
3278
|
const columnSortable = volatileRef.current.sortable?.(col) ?? (def !== void 0 && isColumnSortable(def, col, app, app.registry));
|
|
3236
3279
|
cols.push({
|
|
3237
3280
|
id: col,
|
|
3238
|
-
...columnAccessor(col),
|
|
3281
|
+
...columnAccessor(col, objectPath),
|
|
3239
3282
|
size: ui.default,
|
|
3240
3283
|
minSize: ui.min,
|
|
3241
3284
|
maxSize: ui.max ?? Number.MAX_SAFE_INTEGER,
|
|
@@ -3294,7 +3337,7 @@ function ResourceList({ resource: resourceInput, data, total, page = 1, pageSize
|
|
|
3294
3337
|
cell: ({ row }) => {
|
|
3295
3338
|
const raw = row.original;
|
|
3296
3339
|
const record = volatileRef.current.viewRow(raw);
|
|
3297
|
-
const value = record
|
|
3340
|
+
const value = readColumnValue(record, col, objectPath);
|
|
3298
3341
|
const customCell = volatileRef.current.renderCell?.(col, value, record);
|
|
3299
3342
|
const cellInner = customCell !== void 0 ? customCell : jsx(ResolvedFieldDisplay, {
|
|
3300
3343
|
resource: target === void 0 ? resourceRef : target.ref,
|
|
@@ -4444,7 +4487,7 @@ function issueText(issue, caps, i18nPrefix) {
|
|
|
4444
4487
|
}, {
|
|
4445
4488
|
has: caps.has,
|
|
4446
4489
|
t: caps.t,
|
|
4447
|
-
...issue.field === "_form" ? {} : { fieldKey: `resources.${i18nPrefix}
|
|
4490
|
+
...issue.field === "_form" ? {} : { fieldKey: `resources.${i18nPrefix}.${propertyTextKey([...issue.field.split("."), ...issue.path])}` }
|
|
4448
4491
|
});
|
|
4449
4492
|
}
|
|
4450
4493
|
const EMPTY_ISSUES = Object.freeze([]);
|
|
@@ -4493,9 +4536,10 @@ function DeclarativeForm(props) {
|
|
|
4493
4536
|
function DeclarativeFormBody(props) {
|
|
4494
4537
|
const gate = useDeclarativeCheckGate();
|
|
4495
4538
|
const prefix = props.i18nPrefix ?? "form";
|
|
4539
|
+
const mode = props.mode ?? "create";
|
|
4496
4540
|
const form = useFormController({
|
|
4497
4541
|
fields: props.fields,
|
|
4498
|
-
mode
|
|
4542
|
+
mode,
|
|
4499
4543
|
onConfirmChecks: gate.confirmChecks,
|
|
4500
4544
|
...props.body === void 0 ? {} : { body: props.body },
|
|
4501
4545
|
...props.formId === void 0 ? {} : { formId: props.formId },
|
|
@@ -4560,7 +4604,7 @@ function DeclarativeFormBody(props) {
|
|
|
4560
4604
|
children: jsx(ScreenTree, {
|
|
4561
4605
|
region: "form-body",
|
|
4562
4606
|
resource: prefix,
|
|
4563
|
-
mode
|
|
4607
|
+
mode,
|
|
4564
4608
|
compiled: form.screen,
|
|
4565
4609
|
controller: form,
|
|
4566
4610
|
leafIds,
|
|
@@ -4941,6 +4985,7 @@ function BulkFlowButton({ resource, actionName, ids, onSelectionChange }) {
|
|
|
4941
4985
|
const each = compiled?.each ?? false;
|
|
4942
4986
|
const [running, setRunning] = useState(false);
|
|
4943
4987
|
const [summary, setSummary] = useState(null);
|
|
4988
|
+
const afterSummary = useRef(null);
|
|
4944
4989
|
const testid = tid.bulkAction(resource, actionName);
|
|
4945
4990
|
if (control.state === "absent") return null;
|
|
4946
4991
|
const variant = chrome.destructive ? "destructive" : "outline";
|
|
@@ -4963,11 +5008,20 @@ function BulkFlowButton({ resource, actionName, ids, onSelectionChange }) {
|
|
|
4963
5008
|
const finish = (result, progress) => {
|
|
4964
5009
|
setRunning(false);
|
|
4965
5010
|
if (progress === void 0) return;
|
|
4966
|
-
|
|
5011
|
+
const summarize = result.outcome !== "success" || progress.rereadSkipped.some((entry) => entry.policy === "warn");
|
|
5012
|
+
if (summarize) setSummary({
|
|
4967
5013
|
progress,
|
|
4968
5014
|
total: ids.length
|
|
4969
5015
|
});
|
|
4970
|
-
|
|
5016
|
+
const remaining = ids.filter((id) => !progress.success.includes(id));
|
|
5017
|
+
if (summarize && remaining.length === 0) afterSummary.current = () => onSelectionChange?.([]);
|
|
5018
|
+
else onSelectionChange?.(remaining);
|
|
5019
|
+
};
|
|
5020
|
+
const closeSummary = () => {
|
|
5021
|
+
setSummary(null);
|
|
5022
|
+
const pending = afterSummary.current;
|
|
5023
|
+
afterSummary.current = null;
|
|
5024
|
+
pending?.();
|
|
4971
5025
|
};
|
|
4972
5026
|
return jsxs(Fragment$1, { children: [
|
|
4973
5027
|
jsx(Button, {
|
|
@@ -4997,7 +5051,7 @@ function BulkFlowButton({ resource, actionName, ids, onSelectionChange }) {
|
|
|
4997
5051
|
jsx(Dialog, {
|
|
4998
5052
|
open: summary !== null,
|
|
4999
5053
|
onOpenChange: (open) => {
|
|
5000
|
-
if (!open)
|
|
5054
|
+
if (!open) closeSummary();
|
|
5001
5055
|
},
|
|
5002
5056
|
children: jsxs(DialogContent, {
|
|
5003
5057
|
"data-testid": `${tid.bulkSummary(resource, actionName)}:dialog`,
|
|
@@ -5018,7 +5072,7 @@ function BulkFlowButton({ resource, actionName, ids, onSelectionChange }) {
|
|
|
5018
5072
|
type: "button",
|
|
5019
5073
|
variant: "outline",
|
|
5020
5074
|
"data-testid": `${tid.bulkSummary(resource, actionName)}:close`,
|
|
5021
|
-
onClick:
|
|
5075
|
+
onClick: closeSummary,
|
|
5022
5076
|
children: t("flow.close", { defaultValue: "Close" })
|
|
5023
5077
|
}) })
|
|
5024
5078
|
]
|
|
@@ -5396,6 +5450,14 @@ function CreateButton({ resource: resourceInput, href, testid, size = "sm", vari
|
|
|
5396
5450
|
resource,
|
|
5397
5451
|
defaultValue: "Create"
|
|
5398
5452
|
});
|
|
5453
|
+
const undecided = jsx(UndecidedAction, {
|
|
5454
|
+
label: text,
|
|
5455
|
+
icon: "Plus",
|
|
5456
|
+
testid,
|
|
5457
|
+
size,
|
|
5458
|
+
variant,
|
|
5459
|
+
className
|
|
5460
|
+
});
|
|
5399
5461
|
if (onOpen !== void 0) {
|
|
5400
5462
|
const answer = gate(resource, "create");
|
|
5401
5463
|
if (answer.state === "disabled") return jsx(DisabledAction, {
|
|
@@ -5408,6 +5470,7 @@ function CreateButton({ resource: resourceInput, href, testid, size = "sm", vari
|
|
|
5408
5470
|
className,
|
|
5409
5471
|
resource
|
|
5410
5472
|
});
|
|
5473
|
+
if (answer.state === "undecided") return undecided;
|
|
5411
5474
|
if (answer.state !== "open") return null;
|
|
5412
5475
|
return jsxs(Button, {
|
|
5413
5476
|
type: "button",
|
|
@@ -5423,6 +5486,7 @@ function CreateButton({ resource: resourceInput, href, testid, size = "sm", vari
|
|
|
5423
5486
|
});
|
|
5424
5487
|
}
|
|
5425
5488
|
if (availability.state === "absent" || availability.state === "hidden") return null;
|
|
5489
|
+
if (availability.state === "undecided") return undecided;
|
|
5426
5490
|
if (availability.state === "disabled") return jsx(DisabledAction, {
|
|
5427
5491
|
reason: availability.reason,
|
|
5428
5492
|
label: text,
|
|
@@ -5466,6 +5530,10 @@ const ListCreate = listPiece("ListCreate", ListCreateView);
|
|
|
5466
5530
|
//#endregion
|
|
5467
5531
|
//#region src/export/export-button.tsx
|
|
5468
5532
|
const warnedProviderQueryResources = new Set();
|
|
5533
|
+
const EXPORT_TARGET = {
|
|
5534
|
+
kind: "action",
|
|
5535
|
+
name: "export"
|
|
5536
|
+
};
|
|
5469
5537
|
function ExportButton({ resource: resourceInput, className }) {
|
|
5470
5538
|
const resource = routeResourceKey(resourceInput);
|
|
5471
5539
|
if (!(useOptionalDataRuntime() !== null)) return null;
|
|
@@ -5479,12 +5547,11 @@ function ExportButtonActive({ resource, className }) {
|
|
|
5479
5547
|
const { available, prefetch } = useResourceExport(resource);
|
|
5480
5548
|
const capability = useCapability("run", {
|
|
5481
5549
|
resource,
|
|
5482
|
-
target:
|
|
5483
|
-
kind: "action",
|
|
5484
|
-
name: "export"
|
|
5485
|
-
},
|
|
5550
|
+
target: EXPORT_TARGET,
|
|
5486
5551
|
mode: "list"
|
|
5487
5552
|
});
|
|
5553
|
+
const app = useApp();
|
|
5554
|
+
const undecided = usePermissionsUndecided() && addressesCapability(app.ruleSource.rules(resource), "run", EXPORT_TARGET);
|
|
5488
5555
|
const tid = useTestIds();
|
|
5489
5556
|
const t = useOptionalT();
|
|
5490
5557
|
const [open, setOpen] = React.useState(false);
|
|
@@ -5502,18 +5569,35 @@ function ExportButtonActive({ resource, className }) {
|
|
|
5502
5569
|
if (target !== null) lastTarget.current = target;
|
|
5503
5570
|
const dialogTarget = target ?? lastTarget.current;
|
|
5504
5571
|
React.useEffect(() => {
|
|
5505
|
-
if (!available || !capability.allowed) return;
|
|
5572
|
+
if (!available || undecided || !capability.allowed) return;
|
|
5506
5573
|
if (list.providerQuery.value === void 0) return;
|
|
5507
5574
|
if (warnedProviderQueryResources.has(resource)) return;
|
|
5508
5575
|
warnedProviderQueryResources.add(resource);
|
|
5509
5576
|
console.warn(`[buro] ExportButton('${resource}'): this list is narrowed by \`providerQuery\` (a raw provider blob), which an export target cannot carry — the exported file will NOT be narrowed by it. See docs/adopters/data-export.md.`);
|
|
5510
5577
|
}, [
|
|
5511
5578
|
available,
|
|
5579
|
+
undecided,
|
|
5512
5580
|
capability.allowed,
|
|
5513
5581
|
list.providerQuery.value,
|
|
5514
5582
|
resource
|
|
5515
5583
|
]);
|
|
5516
|
-
if (!available ||
|
|
5584
|
+
if (!available || list.isForbidden) return null;
|
|
5585
|
+
if (undecided) return jsx(Button, {
|
|
5586
|
+
type: "button",
|
|
5587
|
+
variant: "outline",
|
|
5588
|
+
size: "icon",
|
|
5589
|
+
"aria-label": t("export.button.label"),
|
|
5590
|
+
title: t("export.button.label"),
|
|
5591
|
+
className: cn("h-8 w-8", className),
|
|
5592
|
+
"data-testid": tid.exportButton(resource),
|
|
5593
|
+
disabled: true,
|
|
5594
|
+
"aria-busy": "true",
|
|
5595
|
+
children: jsx(IconDownload, {
|
|
5596
|
+
className: "size-4",
|
|
5597
|
+
"aria-hidden": "true"
|
|
5598
|
+
})
|
|
5599
|
+
});
|
|
5600
|
+
if (!capability.allowed) return null;
|
|
5517
5601
|
if (target === null && !open) return null;
|
|
5518
5602
|
if (dialogTarget === null) return null;
|
|
5519
5603
|
return jsxs(Fragment$1, { children: [target === null ? null : jsx(Button, {
|
|
@@ -6084,10 +6168,7 @@ function RecordActionsView() {
|
|
|
6084
6168
|
const id = useFrameId();
|
|
6085
6169
|
const holder = useScreenState()?.inline;
|
|
6086
6170
|
if (mode === "create" || record === void 0 || id === void 0) return null;
|
|
6087
|
-
const row = {
|
|
6088
|
-
...policyRecordOf(controller, record),
|
|
6089
|
-
id
|
|
6090
|
-
};
|
|
6171
|
+
const row = withRecordKeys(policyRecordOf(controller) ?? record, { id });
|
|
6091
6172
|
holder?.declare(inlineFlowNames(controller.screen, controller.plan));
|
|
6092
6173
|
return jsxs("div", {
|
|
6093
6174
|
className: "flex flex-wrap items-center gap-2",
|
|
@@ -6130,26 +6211,33 @@ function FormActionsView() {
|
|
|
6130
6211
|
const labelCaps = useI18nCaps(resource);
|
|
6131
6212
|
const tid = useTestIds();
|
|
6132
6213
|
const id = useFrameId();
|
|
6214
|
+
const back = useReturnTarget(resource, mode === "create" ? "create" : "edit", mode === "edit" ? id : void 0);
|
|
6133
6215
|
const failedIssues = chrome.serverIssues;
|
|
6134
6216
|
const livePlan = controller.plan;
|
|
6135
|
-
const
|
|
6217
|
+
const placed = useMemo(() => new Set(livePlan?.placedPaths ?? []), [livePlan]);
|
|
6218
|
+
const alertIssues = useMemo(() => failedIssues === void 0 || failedIssues.length === 0 ? NO_ALERT_ISSUES : routeServerIssues({ issues: failedIssues }, (segment) => segment, (field, path) => field !== "_form" && (livePlan === null || livePlan.fields[field] === "active" && deepestPlacedPath(path, placed) !== void 0)).form, [
|
|
6219
|
+
failedIssues,
|
|
6220
|
+
livePlan,
|
|
6221
|
+
placed
|
|
6222
|
+
]);
|
|
6136
6223
|
const fieldDefs = app.registry.get(resource)?.fields;
|
|
6137
6224
|
if (mode === "show") return null;
|
|
6138
|
-
const busy = controller.isSubmitting;
|
|
6225
|
+
const busy = controller.isSubmitting || chrome.created === true;
|
|
6139
6226
|
const cancel = () => {
|
|
6140
6227
|
if (chrome.onCancel !== void 0) chrome.onCancel();
|
|
6141
|
-
else navigate(
|
|
6228
|
+
else navigate(back, { origin: "inherit" });
|
|
6142
6229
|
};
|
|
6143
6230
|
const plan = controller.plan;
|
|
6144
6231
|
const undrawn = (field) => plan === null || plan.fields[field] === void 0 || plan.fields[field] === "inactive";
|
|
6145
|
-
const recordLevel = (issue) => issue.field === "_form" || undrawn(issue.field);
|
|
6232
|
+
const recordLevel = (issue) => issue.field === "_form" || undrawn(pathHead(issue.field)) || !placed.has(issue.field);
|
|
6146
6233
|
const undrawnBlockers = (controller.checkOutcome?.blockers ?? []).flatMap((issue) => {
|
|
6147
6234
|
const field = typeof issue.path?.[0] === "string" ? issue.path[0] : "_form";
|
|
6148
|
-
if (field !== "_form" && !undrawn(field)) return [];
|
|
6235
|
+
if (field !== "_form" && !undrawn(field) && deepestPlacedPath(issue.path, placed) !== void 0) return [];
|
|
6149
6236
|
if (controller.errors.some((own) => own.code === issue.code && own.field === field)) return [];
|
|
6150
6237
|
return [{
|
|
6151
6238
|
...issue,
|
|
6152
|
-
field
|
|
6239
|
+
field,
|
|
6240
|
+
path: field === "_form" ? [] : issue.path.slice(1)
|
|
6153
6241
|
}];
|
|
6154
6242
|
});
|
|
6155
6243
|
const formErrors = firstPreferred([...controller.errors.filter(recordLevel), ...undrawnBlockers]);
|
|
@@ -6169,7 +6257,7 @@ function FormActionsView() {
|
|
|
6169
6257
|
if (!retryable.includes(checkId)) retryable.push(checkId);
|
|
6170
6258
|
}
|
|
6171
6259
|
const failure = chrome.submitError === void 0 ? void 0 : failureText(chrome.submitError, chrome.submitApplied, t, caps);
|
|
6172
|
-
const serverIssues = bySeverity(alertIssues).
|
|
6260
|
+
const serverIssues = bySeverity(alertIssues).flatMap((issue) => {
|
|
6173
6261
|
const head = issue.path[0];
|
|
6174
6262
|
const name = typeof head === "string" ? head : void 0;
|
|
6175
6263
|
const declared = name === void 0 ? void 0 : fieldDefs?.[name];
|
|
@@ -6180,13 +6268,14 @@ function FormActionsView() {
|
|
|
6180
6268
|
}, {
|
|
6181
6269
|
has: caps.has,
|
|
6182
6270
|
t: caps.t,
|
|
6183
|
-
...declared === void 0 ? {} : { fieldKey: `resources.${resource}
|
|
6271
|
+
...declared === void 0 ? {} : { fieldKey: `resources.${resource}.${propertyTextKey(issue.path)}` }
|
|
6184
6272
|
});
|
|
6185
|
-
return
|
|
6273
|
+
if (issue.path.length === 0 && message === failure) return [];
|
|
6274
|
+
return [{
|
|
6186
6275
|
label: declared === void 0 || name === void 0 ? void 0 : resolveFieldLabel(labelCaps, name, declaredText("field", declared, "label")),
|
|
6187
6276
|
message,
|
|
6188
6277
|
severity: issue.severity
|
|
6189
|
-
};
|
|
6278
|
+
}];
|
|
6190
6279
|
});
|
|
6191
6280
|
const steps = controller.steps;
|
|
6192
6281
|
const midSteps = steps !== null && steps.ids.length > 1 && steps.current !== void 0 && steps.current !== steps.ids[steps.ids.length - 1];
|
|
@@ -6678,8 +6767,8 @@ function declaresDisplay(field) {
|
|
|
6678
6767
|
return field !== void 0 && resolveSurfaceUi(field, "column").use !== void 0;
|
|
6679
6768
|
}
|
|
6680
6769
|
const NO_INITIAL_FILTERS = Object.freeze({});
|
|
6681
|
-
const RelatedCards = lazy(async () => ({ default: (await import("./related-list-cards-
|
|
6682
|
-
const RelatedTimeline = lazy(async () => ({ default: (await import("./related-list-timeline-
|
|
6770
|
+
const RelatedCards = lazy(async () => ({ default: (await import("./related-list-cards-2hLitVkg.js")).RelatedCards }));
|
|
6771
|
+
const RelatedTimeline = lazy(async () => ({ default: (await import("./related-list-timeline-CxJqe6eK.js")).RelatedTimeline }));
|
|
6683
6772
|
function discriminatorOptionLabel(field, value) {
|
|
6684
6773
|
const text = fieldOptionText(field, value);
|
|
6685
6774
|
if (text !== void 0) return text;
|
|
@@ -7866,16 +7955,15 @@ function byOf(field) {
|
|
|
7866
7955
|
}
|
|
7867
7956
|
const MAX_TARGET_HOPS = 2;
|
|
7868
7957
|
function targetColumns(registry, target, def) {
|
|
7869
|
-
if (
|
|
7870
|
-
const source = def;
|
|
7958
|
+
if (def === void 0) return [];
|
|
7871
7959
|
const views = isRecord(def.views) ? def.views : void 0;
|
|
7872
7960
|
const list = views !== void 0 && isRecord(views.list) ? views.list : void 0;
|
|
7873
7961
|
return (list !== void 0 && Array.isArray(list.columns) ? list.columns.flatMap((entry) => {
|
|
7874
7962
|
const name = isRecord(entry) ? entry.field : entry;
|
|
7875
7963
|
return typeof name === "string" ? [name] : [];
|
|
7876
|
-
}) : dtoFields(
|
|
7964
|
+
}) : dtoFields(def, "list")).filter((name) => {
|
|
7877
7965
|
if (name.includes(".")) return name.split(".").length - 1 <= MAX_TARGET_HOPS && resolveColumnField(registry, target, name) !== void 0;
|
|
7878
|
-
const field = peekFieldDefinition(
|
|
7966
|
+
const field = peekFieldDefinition(def, name);
|
|
7879
7967
|
return isRecord(field) && !isRelationField(field) && fieldSensitivity(field) === void 0;
|
|
7880
7968
|
});
|
|
7881
7969
|
}
|
|
@@ -8070,7 +8158,7 @@ function RelatedListView({ props, empty }) {
|
|
|
8070
8158
|
...route.renderCell === void 0 ? {} : { renderCell: route.renderCell },
|
|
8071
8159
|
...route.emptyState === void 0 ? {} : { emptyState: route.emptyState }
|
|
8072
8160
|
});
|
|
8073
|
-
if (own.view !== void 0 && own.view !== "table" && permissions
|
|
8161
|
+
if (own.view !== void 0 && own.view !== "table" && permissionsUndecided(permissions)) return jsx("div", {
|
|
8074
8162
|
role: "status",
|
|
8075
8163
|
"aria-busy": "true",
|
|
8076
8164
|
"data-testid": `list-undecided:${resource}`,
|
|
@@ -8150,7 +8238,7 @@ function RelatedRecordView({ props, empty }) {
|
|
|
8150
8238
|
});
|
|
8151
8239
|
const result = query.data;
|
|
8152
8240
|
const raw = result?.data;
|
|
8153
|
-
const dtoRow = useMemo(() => raw !== null && typeof raw === "object" && projection !== void 0 ?
|
|
8241
|
+
const dtoRow = useMemo(() => raw !== null && typeof raw === "object" && projection !== void 0 ? deriveRecord(raw, (record) => projectDto(record, projection)) : void 0, [raw, projection]);
|
|
8154
8242
|
const access = useFieldAccess(resource, "record", dtoRow);
|
|
8155
8243
|
const projected = useProjectedRecord(resource, dtoRow, { placeholder: query.isPlaceholderData === true });
|
|
8156
8244
|
const fieldsKey = JSON.stringify(own.fields ?? null);
|
|
@@ -8191,10 +8279,7 @@ function RelatedRecordView({ props, empty }) {
|
|
|
8191
8279
|
children: own.title
|
|
8192
8280
|
}), own.toolbar === "item" ? jsx(ActionOverflow, {
|
|
8193
8281
|
resource,
|
|
8194
|
-
record: {
|
|
8195
|
-
...dtoRow,
|
|
8196
|
-
id
|
|
8197
|
-
},
|
|
8282
|
+
record: withRecordKeys(dtoRow, { id }),
|
|
8198
8283
|
surface: "show"
|
|
8199
8284
|
}) : null]
|
|
8200
8285
|
}), jsx("dl", {
|
|
@@ -8490,6 +8575,6 @@ function PlaceNode({ node }) {
|
|
|
8490
8575
|
});
|
|
8491
8576
|
}
|
|
8492
8577
|
//#endregion
|
|
8493
|
-
export { CursorLoadMore as $, ListSearchInput as A,
|
|
8578
|
+
export { CursorLoadMore as $, ListSearchInput as A, AppFlowButton as At, ExportDialog as B, ListControls as C, useShownItemActions as Ct, ListFlows as D, EnumSettlingRow as Dt, ListLive as E, EnumBadge as Et, ListColumns as F, toDisplayText as Ft, RouteScreenClaimContext as G, ScreenTree as H, ColumnsToggle as I, ShellProvider as It, FormControlProvider as J, RouteScreenContext as K, DataTableViewOptions as L, defaultUserMapper as Lt, ExportButton as M, FieldDisplay as Mt, ListCreate as N, i18nPrefixToRef$1 as Nt, ListFilters as O, unknownEnumValueLabel as Ot, CreateButton as P, FieldValueFrame as Pt, ResourceList as Q, ListBulkBar as R, usePaletteState as Rt, useFrameChrome as S, ActionOverflow as St, SavedViewsDropdown as T, downloadArtifact as Tt, useTabsUrlState as U, DeclarativeForm as V, QuickScreenClaimContext as W, useFormControlOf as X, useFormControl as Y, ListBody as Z, CopyId as _, ShowPageHeader as _t, peekFieldDefinition as a, DataTable as at, RecordTitle as b, useDocumentTitle as bt, peekRow as c, TabsContent as ct, resolveFrameView as d, RelatedItem as dt, ListErrorState as et, shadcnFrameViews as f, useItemDrawn as ft, UndeclaredTypeNotice as g, PageHeader as gt, TypeChromeDrawnContext as h, EditPageHeader as ht, RouteListContext as i, useBuroDataTable as it, ListExport as j, Field as jt, FilterRegion as k, DeepLinkScope as kt, useRelationPicker as l, TabsList as lt, HeaderTypeNotice as m, RelatedTimelineSkeleton as mt, viewOf as n, resolveUpdater as nt, peekLeafAllowed as o, Checkbox as ot, ChangeTypeButton as p, RELATED_GRID_CLASS as pt, useIsRouteScreen as q, shadcnBlockImplementations as r, tanStackSortingToBuro as rt, peekRecord as s, Tabs as st, selectImplementation as t, buroSortingToTanStack as tt, isBuiltinRecordView as u, TabsTrigger as ut, FormActions as v, resolveResourceTitle as vt, ListSavedViews as w, useExportRunWatcher as wt, FrameChromeContext as x, typography as xt, RecordActions as y, DocumentTitleProvider as yt, BulkActionToolbar as z, useShell as zt };
|
|
8494
8579
|
|
|
8495
|
-
//# sourceMappingURL=place-node-
|
|
8580
|
+
//# sourceMappingURL=place-node-DRjmJGQ_.js.map
|