@burojs/ui-shadcn 0.9.0 → 0.10.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-2HLgz7Il.cjs → bulk-summary-Chc61Pyw.cjs} +9 -7
- package/dist/bulk-summary-Chc61Pyw.cjs.map +1 -0
- package/dist/{bulk-summary-D6A0ua21.js → bulk-summary-DpSQD2Fq.js} +9 -7
- package/dist/bulk-summary-DpSQD2Fq.js.map +1 -0
- package/dist/{candidates-relation-picker-QvoY2bOQ.js → candidates-relation-picker-DRsHKe6N.js} +3 -3
- package/dist/{candidates-relation-picker-QvoY2bOQ.js.map → candidates-relation-picker-DRsHKe6N.js.map} +1 -1
- package/dist/{candidates-relation-picker-pEAWKQEY.cjs → candidates-relation-picker-GIxsp7D_.cjs} +3 -3
- package/dist/{candidates-relation-picker-pEAWKQEY.cjs.map → candidates-relation-picker-GIxsp7D_.cjs.map} +1 -1
- package/dist/{check-confirm-dialog-W-8WOmGh.cjs → check-confirm-dialog-BMSb7wFv.cjs} +17 -9
- package/dist/check-confirm-dialog-BMSb7wFv.cjs.map +1 -0
- package/dist/{check-confirm-dialog-B-CbJTln.js → check-confirm-dialog-B_u3YVHS.js} +18 -10
- package/dist/{check-confirm-dialog-B-CbJTln.js.map → check-confirm-dialog-B_u3YVHS.js.map} +1 -1
- package/dist/{filter-builder-04nas3eq.js → filter-builder-DX-xC3Yd.js} +2 -2
- package/dist/{filter-builder-04nas3eq.js.map → filter-builder-DX-xC3Yd.js.map} +1 -1
- package/dist/{filter-builder-DQX-TMFh.cjs → filter-builder-Dt5E8PSX.cjs} +2 -2
- package/dist/{filter-builder-DQX-TMFh.cjs.map → filter-builder-Dt5E8PSX.cjs.map} +1 -1
- package/dist/{flow-runtime-DyNIYfUP.cjs → flow-runtime-CQ4wf8co.cjs} +2 -2
- package/dist/{flow-runtime-DyNIYfUP.cjs.map → flow-runtime-CQ4wf8co.cjs.map} +1 -1
- package/dist/{flow-runtime-BEIyym7d.js → flow-runtime-Q2vD7R3c.js} +2 -2
- package/dist/{flow-runtime-BEIyym7d.js.map → flow-runtime-Q2vD7R3c.js.map} +1 -1
- package/dist/{flow-screen-DY1Z9PbG.js → flow-screen-B1y2yizP.js} +18 -18
- package/dist/flow-screen-B1y2yizP.js.map +1 -0
- package/dist/{flow-screen-FE5Xhb3t.cjs → flow-screen-sw2cP70t.cjs} +18 -18
- package/dist/flow-screen-sw2cP70t.cjs.map +1 -0
- package/dist/index.cjs +2183 -109
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +76 -8
- package/dist/index.d.ts +76 -8
- package/dist/index.js +2095 -24
- package/dist/index.js.map +1 -1
- package/dist/{inline-flow-host-yVLo6-sM.cjs → inline-flow-host-CkhoA69R.cjs} +3 -3
- package/dist/{inline-flow-host-yVLo6-sM.cjs.map → inline-flow-host-CkhoA69R.cjs.map} +1 -1
- package/dist/{inline-flow-host-D6u-RlsV.js → inline-flow-host-DqbXqcPS.js} +3 -3
- package/dist/{inline-flow-host-D6u-RlsV.js.map → inline-flow-host-DqbXqcPS.js.map} +1 -1
- package/dist/{lazy-relation-picker-dialog-BaORufxQ.js → lazy-relation-picker-dialog-BaIEWLbF.js} +3 -52
- package/dist/lazy-relation-picker-dialog-BaIEWLbF.js.map +1 -0
- package/dist/{lazy-relation-picker-dialog-C_VlGlDz.cjs → lazy-relation-picker-dialog-CeRzOAi0.cjs} +3 -52
- package/dist/lazy-relation-picker-dialog-CeRzOAi0.cjs.map +1 -0
- package/dist/{page-flow-route-CyMzUidK.js → page-flow-route-CP7cS7FY.js} +5 -5
- package/dist/page-flow-route-CP7cS7FY.js.map +1 -0
- package/dist/{page-flow-route-OFx7h7Ja.cjs → page-flow-route-UDx8qvdM.cjs} +9 -9
- package/dist/page-flow-route-UDx8qvdM.cjs.map +1 -0
- package/dist/{place-node-BZF5Af6x.cjs → place-node-C5ZmuHaN.cjs} +149 -40
- package/dist/place-node-C5ZmuHaN.cjs.map +1 -0
- package/dist/{place-node-DRjmJGQ_.js → place-node-DwWAigv0.js} +146 -43
- package/dist/place-node-DwWAigv0.js.map +1 -0
- package/dist/record-trail-store-Cjo9vtod.cjs +126 -0
- package/dist/record-trail-store-Cjo9vtod.cjs.map +1 -0
- package/dist/record-trail-store-Dn6bVry4.js +91 -0
- package/dist/record-trail-store-Dn6bVry4.js.map +1 -0
- package/dist/{related-list-cards-xVvgSlu-.cjs → related-list-cards-BypKfm9t.cjs} +3 -3
- package/dist/{related-list-cards-xVvgSlu-.cjs.map → related-list-cards-BypKfm9t.cjs.map} +1 -1
- package/dist/{related-list-cards-2hLitVkg.js → related-list-cards-Dcmruy09.js} +3 -3
- package/dist/{related-list-cards-2hLitVkg.js.map → related-list-cards-Dcmruy09.js.map} +1 -1
- package/dist/{related-list-timeline-Dsf5WewG.cjs → related-list-timeline-D-KClgKb.cjs} +4 -4
- package/dist/{related-list-timeline-Dsf5WewG.cjs.map → related-list-timeline-D-KClgKb.cjs.map} +1 -1
- package/dist/{related-list-timeline-CxJqe6eK.js → related-list-timeline-DZON_qSc.js} +4 -4
- package/dist/{related-list-timeline-CxJqe6eK.js.map → related-list-timeline-DZON_qSc.js.map} +1 -1
- package/dist/{related-rows-DDhp9axl.cjs → related-rows-DgF05ssi.cjs} +4 -4
- package/dist/{related-rows-DDhp9axl.cjs.map → related-rows-DgF05ssi.cjs.map} +1 -1
- package/dist/{related-rows-DL6CWsrj.js → related-rows-ETZl5CB9.js} +4 -4
- package/dist/{related-rows-DL6CWsrj.js.map → related-rows-ETZl5CB9.js.map} +1 -1
- package/dist/{relation-create-_SFuPQGM.cjs → relation-create-B8zngAcA.cjs} +46 -11
- package/dist/relation-create-B8zngAcA.cjs.map +1 -0
- package/dist/{relation-create-6WicROWA.js → relation-create-CeCWyxIb.js} +47 -12
- package/dist/relation-create-CeCWyxIb.js.map +1 -0
- package/dist/{relation-many-picker-mGEQDWo2.js → relation-many-picker-CT7nKfE2.js} +4 -4
- package/dist/{relation-many-picker-mGEQDWo2.js.map → relation-many-picker-CT7nKfE2.js.map} +1 -1
- package/dist/{relation-many-picker-BBNsmkaX.cjs → relation-many-picker-Cq0EHY5I.cjs} +4 -4
- package/dist/{relation-many-picker-BBNsmkaX.cjs.map → relation-many-picker-Cq0EHY5I.cjs.map} +1 -1
- package/dist/{relation-picker-BbO41cFV.js → relation-picker-CCyuMeGq.js} +6 -6
- package/dist/{relation-picker-BbO41cFV.js.map → relation-picker-CCyuMeGq.js.map} +1 -1
- package/dist/{relation-picker-jk9D_uwn.cjs → relation-picker-DmwTzgsd.cjs} +6 -6
- package/dist/{relation-picker-jk9D_uwn.cjs.map → relation-picker-DmwTzgsd.cjs.map} +1 -1
- package/dist/{relation-picker-dialog-BgSG_8bU.js → relation-picker-dialog-CoWKjNv8.js} +4 -4
- package/dist/{relation-picker-dialog-BgSG_8bU.js.map → relation-picker-dialog-CoWKjNv8.js.map} +1 -1
- package/dist/{relation-picker-dialog-Duqy2r0n.cjs → relation-picker-dialog-mbwyNK43.cjs} +4 -4
- package/dist/{relation-picker-dialog-Duqy2r0n.cjs.map → relation-picker-dialog-mbwyNK43.cjs.map} +1 -1
- package/dist/{relation-select-C3aV18kT.cjs → relation-select-CguIo2M5.cjs} +2 -2
- package/dist/{relation-select-C3aV18kT.cjs.map → relation-select-CguIo2M5.cjs.map} +1 -1
- package/dist/{relation-select-CjQT9LpS.js → relation-select-nAYxhopN.js} +2 -2
- package/dist/{relation-select-CjQT9LpS.js.map → relation-select-nAYxhopN.js.map} +1 -1
- package/dist/{use-dialog-filter-state-lsTJxrB4.cjs → use-dialog-filter-state-CpWblz3C.cjs} +2 -2
- package/dist/{use-dialog-filter-state-lsTJxrB4.cjs.map → use-dialog-filter-state-CpWblz3C.cjs.map} +1 -1
- package/dist/{use-dialog-filter-state-CJoeY-1j.js → use-dialog-filter-state-ZYxOp5WO.js} +2 -2
- package/dist/{use-dialog-filter-state-CJoeY-1j.js.map → use-dialog-filter-state-ZYxOp5WO.js.map} +1 -1
- package/dist/{use-record-subtitle-BJ9rnj6F.cjs → use-record-subtitle-B4lTR7pf.cjs} +2 -2
- package/dist/{use-record-subtitle-BJ9rnj6F.cjs.map → use-record-subtitle-B4lTR7pf.cjs.map} +1 -1
- package/dist/{use-record-subtitle-w3ZhXNlf.js → use-record-subtitle-pWMBqQx9.js} +2 -2
- package/dist/{use-record-subtitle-w3ZhXNlf.js.map → use-record-subtitle-pWMBqQx9.js.map} +1 -1
- package/package.json +9 -9
- package/dist/bulk-summary-2HLgz7Il.cjs.map +0 -1
- package/dist/bulk-summary-D6A0ua21.js.map +0 -1
- package/dist/check-confirm-dialog-W-8WOmGh.cjs.map +0 -1
- package/dist/flow-screen-DY1Z9PbG.js.map +0 -1
- package/dist/flow-screen-FE5Xhb3t.cjs.map +0 -1
- package/dist/lazy-relation-picker-dialog-BaORufxQ.js.map +0 -1
- package/dist/lazy-relation-picker-dialog-C_VlGlDz.cjs.map +0 -1
- package/dist/page-flow-route-CyMzUidK.js.map +0 -1
- package/dist/page-flow-route-OFx7h7Ja.cjs.map +0 -1
- package/dist/place-node-BZF5Af6x.cjs.map +0 -1
- package/dist/place-node-DRjmJGQ_.js.map +0 -1
- package/dist/relation-create-6WicROWA.js.map +0 -1
- package/dist/relation-create-_SFuPQGM.cjs.map +0 -1
- package/dist/resource-page-router-CzaNATSp.js +0 -2010
- package/dist/resource-page-router-CzaNATSp.js.map +0 -1
- package/dist/resource-page-router-dmVIeu5s.cjs +0 -2231
- package/dist/resource-page-router-dmVIeu5s.cjs.map +0 -1
|
@@ -1,17 +1,17 @@
|
|
|
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 { $ 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-
|
|
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_u3YVHS.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 { _ as ClaimedQuickLink, b as LoadError, l as relationLinkClassName } from "./relation-create-
|
|
7
|
+
import { _ as ClaimedQuickLink, b as LoadError, l as relationLinkClassName } from "./relation-create-CeCWyxIb.js";
|
|
8
8
|
import { t as Skeleton } from "./skeleton-U2noefj5.js";
|
|
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-
|
|
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-DX-xC3Yd.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, 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,
|
|
11
|
+
import { n as useCandidateSelection, t as LazyRelationPickerDialog } from "./lazy-relation-picker-dialog-BaIEWLbF.js";
|
|
12
|
+
import { t as useRelationSelect } from "./relation-select-nAYxhopN.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, memberFactOf, 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, collectionBulkState, columnTypeWidth, deriveRecord, implementFrame, isObjectColumn, kindErrorText, linkCapabilitiesOf, policyRecordOf, policyRowsOf, readColumnValue, recordKeyOf, resolveColumnField, resolveErrorText, resolveObjectColumn, resolveValidationMessage, resourceFlowsOn, specificErrorText, tableLayoutSetting, useApp, useApplicationSnapshot, useAvailability, useAvailabilityGate, useAvailabilityResolver, useCapability, useCapabilityResolver, useChromeT, useClipboard, useCollectionRows, useComponent, useCtx, useCurrentUserId, useCustomQuery, useDataRuntime, useDismissGuard, useEntryGate, useEnumValues, useExportRuns, useFieldAccess, useFieldImplementation, useFieldMeta, useFieldMetaSources, useFlowRowBatches, 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";
|
|
@@ -1460,14 +1460,15 @@ function useExportRunWatcher() {
|
|
|
1460
1460
|
//#endregion
|
|
1461
1461
|
//#region src/actions/action-overflow.tsx
|
|
1462
1462
|
const RowActionsCollapseContext = createContext(false);
|
|
1463
|
-
function ActionOverflow({ resource: resourceInput, record, surface, className, hideFlows, collapse, sources }) {
|
|
1463
|
+
function ActionOverflow({ resource: resourceInput, record, surface, className, hideFlows, hideActions, collapse, sources }) {
|
|
1464
1464
|
const resource = routeResourceKey(resourceInput);
|
|
1465
1465
|
const chromeT = useChromeT();
|
|
1466
1466
|
const tid = useTestIds();
|
|
1467
1467
|
const recordKey = String(recordKeyOf(useApp().registry.get(resource), record) ?? "");
|
|
1468
1468
|
const collapsedRows = useContext(RowActionsCollapseContext);
|
|
1469
1469
|
const [flowFor, setFlowFor] = useState(null);
|
|
1470
|
-
const
|
|
1470
|
+
const shown = useShownItemActions(resource, record, surface, hideFlows, sources);
|
|
1471
|
+
const actions = hideActions === void 0 ? shown : shown.filter((a) => !hideActions(a.name));
|
|
1471
1472
|
if (actions.length === 0) return null;
|
|
1472
1473
|
const isRow = surface === "row";
|
|
1473
1474
|
const folded = isRow && (collapse ?? collapsedRows);
|
|
@@ -3056,6 +3057,22 @@ function actionsColumnSize(items) {
|
|
|
3056
3057
|
const strip = controls * ROW_ACTION_CONTROL_PX + (controls - 1) * ROW_ACTION_GAP_PX + ACTIONS_CELL_PADDING_PX;
|
|
3057
3058
|
return Math.max(ACTIONS_COL_MIN_PX, strip);
|
|
3058
3059
|
}
|
|
3060
|
+
const isNamedEntry = (value) => typeof value === "object" && value !== null;
|
|
3061
|
+
function offered(items, offers) {
|
|
3062
|
+
return offers === void 0 || items === void 0 ? items : items.filter((action) => offers(action.name));
|
|
3063
|
+
}
|
|
3064
|
+
function rowFlowsOf(def, offers) {
|
|
3065
|
+
if (!def) return [];
|
|
3066
|
+
const items = offered(def.actions?.item, offers) ?? [];
|
|
3067
|
+
const out = [];
|
|
3068
|
+
for (const placement of planItemActions(items, "row")) {
|
|
3069
|
+
if (items.find((entry) => entry.name === placement.name)?.kind !== "flow") continue;
|
|
3070
|
+
try {
|
|
3071
|
+
out.push(compileFlow(def, placement.name));
|
|
3072
|
+
} catch {}
|
|
3073
|
+
}
|
|
3074
|
+
return out;
|
|
3075
|
+
}
|
|
3059
3076
|
const ALIGN_CLASS = {
|
|
3060
3077
|
start: "text-start",
|
|
3061
3078
|
center: "text-center",
|
|
@@ -3122,25 +3139,72 @@ function ResourceList({ resource: resourceInput, data, total, page = 1, pageSize
|
|
|
3122
3139
|
]);
|
|
3123
3140
|
const skeletonColumnKeys = accessPending ? declaredColumnKeys : visibleColumnKeys;
|
|
3124
3141
|
const rows = useMemo(() => data ?? [], [data]);
|
|
3125
|
-
const
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
const
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3142
|
+
const collectionRows = useCollectionRows(resource);
|
|
3143
|
+
const rowKinds = useMemo(() => collectionRows === void 0 ? void 0 : rows.map((row) => collectionRows(row)), [collectionRows, rows]);
|
|
3144
|
+
const rowOffers = useMemo(() => {
|
|
3145
|
+
const fact = memberFactOf(def);
|
|
3146
|
+
if (fact?.collection === void 0 || def?.rowActions !== "base") return void 0;
|
|
3147
|
+
const declared = app.registry.bases.get(fact.ref)?.actions?.item;
|
|
3148
|
+
const names = new Set(["edit", "delete"]);
|
|
3149
|
+
if (Array.isArray(declared)) {
|
|
3150
|
+
for (const entry of declared) if (isNamedEntry(entry) && typeof entry.name === "string") names.add(entry.name);
|
|
3134
3151
|
}
|
|
3135
|
-
return
|
|
3136
|
-
}, [def]);
|
|
3137
|
-
const
|
|
3138
|
-
const
|
|
3139
|
-
|
|
3140
|
-
|
|
3152
|
+
return (name) => names.has(name);
|
|
3153
|
+
}, [def, app]);
|
|
3154
|
+
const hideRowAction = useMemo(() => rowOffers === void 0 ? void 0 : (name) => !rowOffers(name), [rowOffers]);
|
|
3155
|
+
const flowsByDef = useMemo(() => {
|
|
3156
|
+
const cache = new WeakMap();
|
|
3157
|
+
return (target) => {
|
|
3158
|
+
if (target === void 0) return [];
|
|
3159
|
+
let flows = cache.get(target);
|
|
3160
|
+
if (flows === void 0) {
|
|
3161
|
+
flows = rowFlowsOf(target, rowOffers);
|
|
3162
|
+
cache.set(target, flows);
|
|
3163
|
+
}
|
|
3164
|
+
return flows;
|
|
3165
|
+
};
|
|
3166
|
+
}, [rowOffers]);
|
|
3167
|
+
const batchGroups = useMemo(() => {
|
|
3168
|
+
if (rowKinds === void 0) return [{
|
|
3169
|
+
resource,
|
|
3170
|
+
ids: rows.map((row) => String(row.id)),
|
|
3171
|
+
flows: flowsByDef(def)
|
|
3172
|
+
}];
|
|
3173
|
+
const idsByMember = new Map();
|
|
3174
|
+
rowKinds.forEach((kind, index) => {
|
|
3175
|
+
if (!("member" in kind)) return;
|
|
3176
|
+
const ids = idsByMember.get(kind.member) ?? [];
|
|
3177
|
+
ids.push(String(rows[index]?.id));
|
|
3178
|
+
idsByMember.set(kind.member, ids);
|
|
3179
|
+
});
|
|
3180
|
+
return [...idsByMember].map(([member, ids]) => ({
|
|
3181
|
+
resource: member,
|
|
3182
|
+
ids,
|
|
3183
|
+
flows: flowsByDef(app.registry.get(member)),
|
|
3184
|
+
list: resource
|
|
3185
|
+
}));
|
|
3186
|
+
}, [
|
|
3187
|
+
rowKinds,
|
|
3188
|
+
rows,
|
|
3141
3189
|
resource,
|
|
3142
|
-
|
|
3143
|
-
|
|
3190
|
+
def,
|
|
3191
|
+
flowsByDef,
|
|
3192
|
+
app
|
|
3193
|
+
]);
|
|
3194
|
+
const rowBatch = useFlowRowBatches(batchGroups);
|
|
3195
|
+
const rowBatchState = rowBatch.state;
|
|
3196
|
+
const flowRowBatch = useMemo(() => ({ state: rowBatchState }), [rowBatchState]);
|
|
3197
|
+
const actionsWidth = useMemo(() => {
|
|
3198
|
+
if (rowKinds === void 0) return actionsColumnSize(def?.actions?.item);
|
|
3199
|
+
let widest = ACTIONS_COL_MIN_PX;
|
|
3200
|
+
for (const member of new Set(rowKinds.flatMap((kind) => "member" in kind ? [kind.member] : []))) widest = Math.max(widest, actionsColumnSize(offered(app.registry.get(member)?.actions?.item, rowOffers)));
|
|
3201
|
+
return widest;
|
|
3202
|
+
}, [
|
|
3203
|
+
rowKinds,
|
|
3204
|
+
def,
|
|
3205
|
+
app,
|
|
3206
|
+
rowOffers
|
|
3207
|
+
]);
|
|
3144
3208
|
const knownTotal = typeof total === "number";
|
|
3145
3209
|
const totalPages = knownTotal ? Math.max(1, Math.ceil(total / pageSize)) : void 0;
|
|
3146
3210
|
const pageIsFull = rows.length >= pageSize;
|
|
@@ -3388,7 +3452,7 @@ function ResourceList({ resource: resourceInput, data, total, page = 1, pageSize
|
|
|
3388
3452
|
id: ACTIONS_COL_ID,
|
|
3389
3453
|
enableSorting: false,
|
|
3390
3454
|
enableResizing: false,
|
|
3391
|
-
size: narrow || typeof rowActions === "function" ? 44 :
|
|
3455
|
+
size: narrow || typeof rowActions === "function" ? 44 : actionsWidth,
|
|
3392
3456
|
enableHiding: false,
|
|
3393
3457
|
header: () => jsx("span", {
|
|
3394
3458
|
className: "sr-only",
|
|
@@ -3399,11 +3463,22 @@ function ResourceList({ resource: resourceInput, data, total, page = 1, pageSize
|
|
|
3399
3463
|
noRowNav: true,
|
|
3400
3464
|
noClip: true
|
|
3401
3465
|
},
|
|
3402
|
-
cell: ({ row }) =>
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3466
|
+
cell: ({ row }) => {
|
|
3467
|
+
if (typeof rowActions === "function") return rowActions(row.original);
|
|
3468
|
+
if (collectionRows === void 0) return jsx(ActionOverflow, {
|
|
3469
|
+
resource,
|
|
3470
|
+
record: row.original,
|
|
3471
|
+
surface: "row"
|
|
3472
|
+
});
|
|
3473
|
+
const kind = collectionRows(row.original);
|
|
3474
|
+
if (!("member" in kind)) return null;
|
|
3475
|
+
return jsx(ActionOverflow, {
|
|
3476
|
+
resource: kind.member,
|
|
3477
|
+
record: row.original,
|
|
3478
|
+
surface: "row",
|
|
3479
|
+
...hideRowAction === void 0 ? {} : { hideActions: hideRowAction }
|
|
3480
|
+
});
|
|
3481
|
+
}
|
|
3407
3482
|
});
|
|
3408
3483
|
return cols;
|
|
3409
3484
|
}, [
|
|
@@ -3420,6 +3495,9 @@ function ResourceList({ resource: resourceInput, data, total, page = 1, pageSize
|
|
|
3420
3495
|
i18nCaps,
|
|
3421
3496
|
rowLinkKey,
|
|
3422
3497
|
narrow,
|
|
3498
|
+
actionsWidth,
|
|
3499
|
+
collectionRows,
|
|
3500
|
+
hideRowAction,
|
|
3423
3501
|
columnUiOf
|
|
3424
3502
|
]);
|
|
3425
3503
|
const handleSelectionChange = (updater) => {
|
|
@@ -3608,7 +3686,7 @@ function ResourceList({ resource: resourceInput, data, total, page = 1, pageSize
|
|
|
3608
3686
|
value: flowRowBatch,
|
|
3609
3687
|
children: jsxs(RowActionsCollapseContext.Provider, {
|
|
3610
3688
|
value: narrow,
|
|
3611
|
-
children: [rowBatch.
|
|
3689
|
+
children: [rowBatch.readers, jsxs("div", {
|
|
3612
3690
|
ref: listRoot,
|
|
3613
3691
|
className: cn("space-y-4", className),
|
|
3614
3692
|
children: [
|
|
@@ -4968,10 +5046,12 @@ function BulkSummary(props) {
|
|
|
4968
5046
|
children: jsx(Summary, { ...props })
|
|
4969
5047
|
});
|
|
4970
5048
|
}
|
|
4971
|
-
function BulkFlowButton({ resource, actionName, ids, onSelectionChange }) {
|
|
5049
|
+
function BulkFlowButton({ resource, actionName, ids, records, onSelectionChange }) {
|
|
4972
5050
|
const app = useApp();
|
|
4973
5051
|
const tid = useTestIds();
|
|
4974
5052
|
const t = useOptionalT();
|
|
5053
|
+
const caps = useI18nCaps();
|
|
5054
|
+
const gate = useAvailabilityGate();
|
|
4975
5055
|
const control = useFlowRowResolver(resource)(actionName, void 0);
|
|
4976
5056
|
const chrome = useFlowChrome(resource, actionName);
|
|
4977
5057
|
const def = app.registry.get(resource);
|
|
@@ -4990,11 +5070,31 @@ function BulkFlowButton({ resource, actionName, ids, onSelectionChange }) {
|
|
|
4990
5070
|
if (control.state === "absent") return null;
|
|
4991
5071
|
const variant = chrome.destructive ? "destructive" : "outline";
|
|
4992
5072
|
const overLimit = each && ids.length > BULK_EACH_LIMIT;
|
|
4993
|
-
|
|
5073
|
+
let membersUndecided = false;
|
|
5074
|
+
const selection = def === void 0 ? void 0 : collectionBulkState({
|
|
5075
|
+
registry: app.registry,
|
|
5076
|
+
collection: def,
|
|
5077
|
+
action: actionName,
|
|
5078
|
+
ids,
|
|
5079
|
+
records: records ?? [],
|
|
5080
|
+
available: (member, action) => {
|
|
5081
|
+
const state = gate(member, action).state;
|
|
5082
|
+
if (state === "undecided") membersUndecided = true;
|
|
5083
|
+
return state === "available";
|
|
5084
|
+
}
|
|
5085
|
+
});
|
|
5086
|
+
const refused = membersUndecided || selection?.state !== "disabled" ? void 0 : selection.members.length > 0 ? t("collection.bulkUnavailable", {
|
|
5087
|
+
defaultValue: "Not available for {{types}}.",
|
|
5088
|
+
params: { types: selection.members.map((member) => resolveResourceLabel(caps, member, "single", app.registry.get(member))).join(", ") }
|
|
5089
|
+
}) : t("collection.bulkUnknownRows", {
|
|
5090
|
+
defaultValue: "{{count}} selected records are not loaded.",
|
|
5091
|
+
count: selection.missing
|
|
5092
|
+
});
|
|
5093
|
+
if (overLimit || control.state === "disabled" || refused !== void 0) return jsx(DisabledAction, {
|
|
4994
5094
|
reason: overLimit ? t("flow.bulkLimit", {
|
|
4995
5095
|
defaultValue: `Select at most ${BULK_EACH_LIMIT}.`,
|
|
4996
5096
|
count: BULK_EACH_LIMIT
|
|
4997
|
-
}) : control.reason,
|
|
5097
|
+
}) : control.state === "disabled" ? control.reason : refused,
|
|
4998
5098
|
label: chrome.label,
|
|
4999
5099
|
icon: chrome.icon,
|
|
5000
5100
|
testid,
|
|
@@ -5004,7 +5104,7 @@ function BulkFlowButton({ resource, actionName, ids, onSelectionChange }) {
|
|
|
5004
5104
|
actionName,
|
|
5005
5105
|
surface: "bulk"
|
|
5006
5106
|
});
|
|
5007
|
-
const busy = control.state === "undecided" || control.state === "pending" || running;
|
|
5107
|
+
const busy = control.state === "undecided" || control.state === "pending" || membersUndecided || running;
|
|
5008
5108
|
const finish = (result, progress) => {
|
|
5009
5109
|
setRunning(false);
|
|
5010
5110
|
if (progress === void 0) return;
|
|
@@ -5066,7 +5166,8 @@ function BulkFlowButton({ resource, actionName, ids, onSelectionChange }) {
|
|
|
5066
5166
|
label: chrome.labelText,
|
|
5067
5167
|
total: summary.total,
|
|
5068
5168
|
progress: summary.progress,
|
|
5069
|
-
texts: compiled?.flow.texts
|
|
5169
|
+
texts: compiled?.flow.texts,
|
|
5170
|
+
...compiled === void 0 ? {} : { prefixes: compiled.textKeys.prefixes }
|
|
5070
5171
|
}),
|
|
5071
5172
|
jsx(DialogFooter, { children: jsx(Button, {
|
|
5072
5173
|
type: "button",
|
|
@@ -5132,6 +5233,7 @@ function BulkActionToolbar({ resource: resourceInput, table, selectedRecords, se
|
|
|
5132
5233
|
resource,
|
|
5133
5234
|
actionName: action.name,
|
|
5134
5235
|
ids,
|
|
5236
|
+
records,
|
|
5135
5237
|
onSelectionChange: (next) => {
|
|
5136
5238
|
if (onSelectionChange !== void 0) onSelectionChange(next);
|
|
5137
5239
|
else if (next.length === 0) handleClear();
|
|
@@ -6130,6 +6232,7 @@ function BuroPeekFrame({ slots }) {
|
|
|
6130
6232
|
//#endregion
|
|
6131
6233
|
//#region src/record/frame-context.ts
|
|
6132
6234
|
const FrameChromeContext = createContext(null);
|
|
6235
|
+
const ItemActionsOffContext = createContext(false);
|
|
6133
6236
|
function useFrameChrome() {
|
|
6134
6237
|
const chrome = useContext(FrameChromeContext);
|
|
6135
6238
|
if (chrome === null) throw new Error("[burojs] useRecordFrame() must be called inside <RecordScreen>");
|
|
@@ -6167,7 +6270,7 @@ function RecordActionsView() {
|
|
|
6167
6270
|
const { extraActions } = useFrameChrome();
|
|
6168
6271
|
const id = useFrameId();
|
|
6169
6272
|
const holder = useScreenState()?.inline;
|
|
6170
|
-
if (mode === "create" || record === void 0 || id === void 0) return null;
|
|
6273
|
+
if (useContext(ItemActionsOffContext) || mode === "create" || record === void 0 || id === void 0) return null;
|
|
6171
6274
|
const row = withRecordKeys(policyRecordOf(controller) ?? record, { id });
|
|
6172
6275
|
holder?.declare(inlineFlowNames(controller.screen, controller.plan));
|
|
6173
6276
|
return jsxs("div", {
|
|
@@ -6767,8 +6870,8 @@ function declaresDisplay(field) {
|
|
|
6767
6870
|
return field !== void 0 && resolveSurfaceUi(field, "column").use !== void 0;
|
|
6768
6871
|
}
|
|
6769
6872
|
const NO_INITIAL_FILTERS = Object.freeze({});
|
|
6770
|
-
const RelatedCards = lazy(async () => ({ default: (await import("./related-list-cards-
|
|
6771
|
-
const RelatedTimeline = lazy(async () => ({ default: (await import("./related-list-timeline-
|
|
6873
|
+
const RelatedCards = lazy(async () => ({ default: (await import("./related-list-cards-Dcmruy09.js")).RelatedCards }));
|
|
6874
|
+
const RelatedTimeline = lazy(async () => ({ default: (await import("./related-list-timeline-DZON_qSc.js")).RelatedTimeline }));
|
|
6772
6875
|
function discriminatorOptionLabel(field, value) {
|
|
6773
6876
|
const text = fieldOptionText(field, value);
|
|
6774
6877
|
if (text !== void 0) return text;
|
|
@@ -8575,6 +8678,6 @@ function PlaceNode({ node }) {
|
|
|
8575
8678
|
});
|
|
8576
8679
|
}
|
|
8577
8680
|
//#endregion
|
|
8578
|
-
export {
|
|
8681
|
+
export { ResourceList as $, FilterRegion as A, DeepLinkScope as At, BulkActionToolbar as B, useShell as Bt, useFrameChrome as C, ActionOverflow as Ct, ListLive as D, EnumBadge as Dt, SavedViewsDropdown as E, downloadArtifact as Et, CreateButton as F, FieldValueFrame as Ft, QuickScreenClaimContext as G, DeclarativeForm as H, ListColumns as I, toDisplayText as It, useIsRouteScreen as J, RouteScreenClaimContext as K, ColumnsToggle as L, ShellProvider as Lt, ListExport as M, Field as Mt, ExportButton as N, FieldDisplay as Nt, ListFlows as O, EnumSettlingRow as Ot, ListCreate as P, i18nPrefixToRef$1 as Pt, ListBody as Q, DataTableViewOptions as R, defaultUserMapper as Rt, ItemActionsOffContext as S, typography as St, ListSavedViews as T, useExportRunWatcher as Tt, ScreenTree as U, ExportDialog as V, useTabsUrlState as W, useFormControl as X, FormControlProvider as Y, useFormControlOf as Z, CopyId as _, PageHeader as _t, peekFieldDefinition as a, useBuroDataTable as at, RecordTitle as b, DocumentTitleProvider as bt, peekRow as c, Tabs as ct, resolveFrameView as d, TabsTrigger as dt, CursorLoadMore as et, shadcnFrameViews as f, RelatedItem as ft, UndeclaredTypeNotice as g, EditPageHeader as gt, TypeChromeDrawnContext as h, RelatedTimelineSkeleton as ht, RouteListContext as i, tanStackSortingToBuro as it, ListSearchInput as j, AppFlowButton as jt, ListFilters as k, unknownEnumValueLabel as kt, useRelationPicker as l, TabsContent as lt, HeaderTypeNotice as m, RELATED_GRID_CLASS as mt, viewOf as n, buroSortingToTanStack as nt, peekLeafAllowed as o, DataTable as ot, ChangeTypeButton as p, useItemDrawn as pt, RouteScreenContext as q, shadcnBlockImplementations as r, resolveUpdater as rt, peekRecord as s, Checkbox as st, selectImplementation as t, ListErrorState as tt, isBuiltinRecordView as u, TabsList as ut, FormActions as v, ShowPageHeader as vt, ListControls as w, useShownItemActions as wt, FrameChromeContext as x, useDocumentTitle as xt, RecordActions as y, resolveResourceTitle as yt, ListBulkBar as z, usePaletteState as zt };
|
|
8579
8682
|
|
|
8580
|
-
//# sourceMappingURL=place-node-
|
|
8683
|
+
//# sourceMappingURL=place-node-DwWAigv0.js.map
|