@burojs/ui-shadcn 0.6.0 → 0.7.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/README.md +9 -0
- package/dist/bulk-summary-BWSAS7k2.js +143 -0
- package/dist/bulk-summary-BWSAS7k2.js.map +1 -0
- package/dist/bulk-summary-CrEij5vq.cjs +143 -0
- package/dist/bulk-summary-CrEij5vq.cjs.map +1 -0
- package/dist/{candidates-relation-picker-B116Bmqi.js → candidates-relation-picker-CS_JZ4Fd.js} +3 -3
- package/dist/{candidates-relation-picker-B116Bmqi.js.map → candidates-relation-picker-CS_JZ4Fd.js.map} +1 -1
- package/dist/{candidates-relation-picker-Cy0rTxvI.cjs → candidates-relation-picker-y5M6_oe4.cjs} +4 -4
- package/dist/{candidates-relation-picker-Cy0rTxvI.cjs.map → candidates-relation-picker-y5M6_oe4.cjs.map} +1 -1
- package/dist/{check-confirm-dialog-bRT8lt0d.js → check-confirm-dialog-2j0gOd7x.js} +384 -108
- package/dist/check-confirm-dialog-2j0gOd7x.js.map +1 -0
- package/dist/{check-confirm-dialog--gPFnEeg.cjs → check-confirm-dialog-C-NHgMST.cjs} +468 -107
- package/dist/check-confirm-dialog-C-NHgMST.cjs.map +1 -0
- package/dist/{dialog-B_rt9S1c.js → dialog-C123sVQ8.js} +4 -4
- package/dist/dialog-C123sVQ8.js.map +1 -0
- package/dist/{dialog-DRNUq9EA.cjs → dialog-vmMdfUWs.cjs} +3 -3
- package/dist/dialog-vmMdfUWs.cjs.map +1 -0
- package/dist/{filter-builder-nXqtM_h4.cjs → filter-builder-DFu0JP-1.cjs} +923 -120
- package/dist/filter-builder-DFu0JP-1.cjs.map +1 -0
- package/dist/{filter-builder-Bhn-dhZV.js → filter-builder-DaWHUZuV.js} +839 -108
- package/dist/filter-builder-DaWHUZuV.js.map +1 -0
- package/dist/{flow-runtime-D3avVH0I.cjs → flow-runtime-BpmrIUb6.cjs} +61 -29
- package/dist/flow-runtime-BpmrIUb6.cjs.map +1 -0
- package/dist/{flow-runtime-s6lkRPKF.js → flow-runtime-DyqTmK3H.js} +62 -30
- package/dist/flow-runtime-DyqTmK3H.js.map +1 -0
- package/dist/{flow-screen-Ci_Sik4Y.cjs → flow-screen-Bcz9NF2V.cjs} +128 -87
- package/dist/flow-screen-Bcz9NF2V.cjs.map +1 -0
- package/dist/{flow-screen-CCvgDI9G.js → flow-screen-DCdli6Ha.js} +128 -87
- package/dist/flow-screen-DCdli6Ha.js.map +1 -0
- package/dist/index.cjs +731 -906
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +455 -247
- package/dist/index.d.ts +455 -247
- package/dist/index.js +647 -828
- package/dist/index.js.map +1 -1
- package/dist/{inline-flow-host-DV1et3c6.cjs → inline-flow-host-3vw7LzzD.cjs} +5 -5
- package/dist/inline-flow-host-3vw7LzzD.cjs.map +1 -0
- package/dist/{inline-flow-host-B6FI0ctQ.js → inline-flow-host-C0rI9B7f.js} +5 -5
- package/dist/inline-flow-host-C0rI9B7f.js.map +1 -0
- package/dist/{candidates-gate-D33jXLHO.cjs → lazy-relation-picker-dialog-Bt8lrEIu.cjs} +10 -10
- package/dist/lazy-relation-picker-dialog-Bt8lrEIu.cjs.map +1 -0
- package/dist/{candidates-gate-Bb70LPAy.js → lazy-relation-picker-dialog-CAScLPb2.js} +11 -11
- package/dist/lazy-relation-picker-dialog-CAScLPb2.js.map +1 -0
- package/dist/{page-flow-route-i3ZfJ1sd.js → page-flow-route-BHUEpn0I.js} +36 -23
- package/dist/page-flow-route-BHUEpn0I.js.map +1 -0
- package/dist/{page-flow-route-hdnULWqd.cjs → page-flow-route-DS8IVTVH.cjs} +41 -28
- package/dist/page-flow-route-DS8IVTVH.cjs.map +1 -0
- package/dist/{place-node-C5SmIAYU.cjs → place-node-CNb3w-c7.cjs} +1869 -947
- package/dist/place-node-CNb3w-c7.cjs.map +1 -0
- package/dist/{place-node-NraNYKPx.js → place-node-CfzQvh4Y.js} +1824 -926
- package/dist/place-node-CfzQvh4Y.js.map +1 -0
- package/dist/{related-list-cards-BWZ9GfOG.js → related-list-cards-BIqqY69Y.js} +9 -4
- package/dist/{related-list-cards-BWZ9GfOG.js.map → related-list-cards-BIqqY69Y.js.map} +1 -1
- package/dist/{related-list-cards-CFq3meUn.cjs → related-list-cards-CelMxl4q.cjs} +9 -4
- package/dist/{related-list-cards-CFq3meUn.cjs.map → related-list-cards-CelMxl4q.cjs.map} +1 -1
- package/dist/{related-list-timeline-yrPsjA3F.js → related-list-timeline-CRh7xwLD.js} +6 -7
- package/dist/related-list-timeline-CRh7xwLD.js.map +1 -0
- package/dist/{related-list-timeline-CCzl71aA.cjs → related-list-timeline-DsLdi8sv.cjs} +5 -6
- package/dist/related-list-timeline-DsLdi8sv.cjs.map +1 -0
- package/dist/{related-rows-o0_t-Yce.js → related-rows--uP2iKQC.js} +25 -14
- package/dist/related-rows--uP2iKQC.js.map +1 -0
- package/dist/{related-rows-ea43qhhy.cjs → related-rows-MPnLCmPF.cjs} +27 -16
- package/dist/related-rows-MPnLCmPF.cjs.map +1 -0
- package/dist/{search-access-CPPmfuvy.js → relation-create-C43cdPQt.js} +595 -13
- package/dist/relation-create-C43cdPQt.js.map +1 -0
- package/dist/{search-access-Dugvttlg.cjs → relation-create-DDEYcKfw.cjs} +633 -14
- package/dist/relation-create-DDEYcKfw.cjs.map +1 -0
- package/dist/{relation-many-picker-bvkjkv-k.js → relation-many-picker-BJhaEqxz.js} +203 -102
- package/dist/relation-many-picker-BJhaEqxz.js.map +1 -0
- package/dist/{relation-many-picker-C8zFEjwd.cjs → relation-many-picker-DzuGJpEl.cjs} +211 -110
- package/dist/relation-many-picker-DzuGJpEl.cjs.map +1 -0
- package/dist/{relation-picker-Z0ZJJ5uS.js → relation-picker-D-tBBZW_.js} +23 -59
- package/dist/relation-picker-D-tBBZW_.js.map +1 -0
- package/dist/{relation-picker-gag0qSR5.cjs → relation-picker-DaIMzf2H.cjs} +29 -71
- package/dist/relation-picker-DaIMzf2H.cjs.map +1 -0
- package/dist/{relation-picker-dialog-0IzkjmiA.cjs → relation-picker-dialog-9Vg5vvR1.cjs} +133 -35
- package/dist/relation-picker-dialog-9Vg5vvR1.cjs.map +1 -0
- package/dist/{relation-picker-dialog-B6nIiJBf.js → relation-picker-dialog-DoEY8EkH.js} +134 -36
- package/dist/relation-picker-dialog-DoEY8EkH.js.map +1 -0
- package/dist/relation-select-B8Fq4o-t.js +48 -0
- package/dist/relation-select-B8Fq4o-t.js.map +1 -0
- package/dist/relation-select-Cr3CfNLy.cjs +55 -0
- package/dist/relation-select-Cr3CfNLy.cjs.map +1 -0
- package/dist/{resource-page-router-PXfMW9nh.cjs → resource-page-router-C_kGW2o_.cjs} +543 -300
- package/dist/resource-page-router-C_kGW2o_.cjs.map +1 -0
- package/dist/{resource-page-router-3RUf9d1j.js → resource-page-router-Diw6S6TK.js} +498 -255
- package/dist/resource-page-router-Diw6S6TK.js.map +1 -0
- package/dist/{rich-text-vTyVjDoa.cjs → rich-text-C_7JCvRo.cjs} +2 -2
- package/dist/{rich-text-vTyVjDoa.cjs.map → rich-text-C_7JCvRo.cjs.map} +1 -1
- package/dist/{rich-text-DFerywgz.js → rich-text-RcPBf6hr.js} +2 -2
- package/dist/{rich-text-DFerywgz.js.map → rich-text-RcPBf6hr.js.map} +1 -1
- package/dist/success-notices-Dl3M1fZP.cjs +46 -0
- package/dist/success-notices-Dl3M1fZP.cjs.map +1 -0
- package/dist/success-notices-LDEgEkc4.js +41 -0
- package/dist/success-notices-LDEgEkc4.js.map +1 -0
- package/dist/{toaster-Cr51X7bz.cjs → toaster-BbByOytP.cjs} +60 -15
- package/dist/toaster-BbByOytP.cjs.map +1 -0
- package/dist/{toaster-C02XbB9r.js → toaster-Ct_YHGs6.js} +43 -16
- package/dist/toaster-Ct_YHGs6.js.map +1 -0
- package/dist/{use-dialog-filter-state-C--oMAZG.js → use-dialog-filter-state-B_MqzHaT.js} +5 -4
- package/dist/use-dialog-filter-state-B_MqzHaT.js.map +1 -0
- package/dist/{use-dialog-filter-state-Dhe8PcB5.cjs → use-dialog-filter-state-tNvqAAjh.cjs} +6 -5
- package/dist/use-dialog-filter-state-tNvqAAjh.cjs.map +1 -0
- package/package.json +11 -11
- package/dist/bulk-summary-CwSd6Yjb.cjs +0 -108
- package/dist/bulk-summary-CwSd6Yjb.cjs.map +0 -1
- package/dist/bulk-summary-GxMDP4bw.js +0 -108
- package/dist/bulk-summary-GxMDP4bw.js.map +0 -1
- package/dist/candidates-gate-Bb70LPAy.js.map +0 -1
- package/dist/candidates-gate-D33jXLHO.cjs.map +0 -1
- package/dist/check-confirm-dialog--gPFnEeg.cjs.map +0 -1
- package/dist/check-confirm-dialog-bRT8lt0d.js.map +0 -1
- package/dist/dialog-B_rt9S1c.js.map +0 -1
- package/dist/dialog-DRNUq9EA.cjs.map +0 -1
- package/dist/filter-builder-Bhn-dhZV.js.map +0 -1
- package/dist/filter-builder-nXqtM_h4.cjs.map +0 -1
- package/dist/flow-runtime-D3avVH0I.cjs.map +0 -1
- package/dist/flow-runtime-s6lkRPKF.js.map +0 -1
- package/dist/flow-screen-CCvgDI9G.js.map +0 -1
- package/dist/flow-screen-Ci_Sik4Y.cjs.map +0 -1
- package/dist/inline-flow-host-B6FI0ctQ.js.map +0 -1
- package/dist/inline-flow-host-DV1et3c6.cjs.map +0 -1
- package/dist/page-flow-route-hdnULWqd.cjs.map +0 -1
- package/dist/page-flow-route-i3ZfJ1sd.js.map +0 -1
- package/dist/place-node-C5SmIAYU.cjs.map +0 -1
- package/dist/place-node-NraNYKPx.js.map +0 -1
- package/dist/related-list-timeline-CCzl71aA.cjs.map +0 -1
- package/dist/related-list-timeline-yrPsjA3F.js.map +0 -1
- package/dist/related-rows-ea43qhhy.cjs.map +0 -1
- package/dist/related-rows-o0_t-Yce.js.map +0 -1
- package/dist/relation-create-IA40t1hi.cjs +0 -364
- package/dist/relation-create-IA40t1hi.cjs.map +0 -1
- package/dist/relation-create-h6F9B4C4.js +0 -339
- package/dist/relation-create-h6F9B4C4.js.map +0 -1
- package/dist/relation-many-picker-C8zFEjwd.cjs.map +0 -1
- package/dist/relation-many-picker-bvkjkv-k.js.map +0 -1
- package/dist/relation-picker-Z0ZJJ5uS.js.map +0 -1
- package/dist/relation-picker-dialog-0IzkjmiA.cjs.map +0 -1
- package/dist/relation-picker-dialog-B6nIiJBf.js.map +0 -1
- package/dist/relation-picker-gag0qSR5.cjs.map +0 -1
- package/dist/resource-page-router-3RUf9d1j.js.map +0 -1
- package/dist/resource-page-router-PXfMW9nh.cjs.map +0 -1
- package/dist/search-access-CPPmfuvy.js.map +0 -1
- package/dist/search-access-Dugvttlg.cjs.map +0 -1
- package/dist/shell-BPlk8hEa.js +0 -205
- package/dist/shell-BPlk8hEa.js.map +0 -1
- package/dist/shell-DxhlsPwm.cjs +0 -271
- package/dist/shell-DxhlsPwm.cjs.map +0 -1
- package/dist/toaster-C02XbB9r.js.map +0 -1
- package/dist/toaster-Cr51X7bz.cjs.map +0 -1
- package/dist/use-dialog-filter-state-C--oMAZG.js.map +0 -1
- package/dist/use-dialog-filter-state-Dhe8PcB5.cjs.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { t as THEME_STORAGE_KEY } from "./theme-storage-key-pYlp4aDS.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { webPlatform } from "@burojs/react/web";
|
|
3
|
+
import { ActionDensity, AnyFrameHandle, AppRuntime, AuthResult, Check, CheckSurface, CustomPageDef, DraftOption, EntityRef, EnumControl, EnumNameOrRef, ErasedResourceHandle, ExportArtifact, ExportTarget, FieldDeclaration, FilterExpression, FilterGroup, FilterOperator, FixedFilterInput, FormBody, FrameHandle, HrefOpts, I18nCaps, NavGroupDef, NavNode, PortableValue, RecordId, RelationCandidate, RelationOpen, ResolvedColumnUi, ResolvedFixedFilter, ResourceDef, ResourceFieldMap, ResourceHandle, ResourceHandleOf, ResourceNameArg, ResourceNameOrRef, ResourceRefArg, RouteMatch, SavedViewDef, ScopeSource, ScreenMode, ScreenSources, SearchDecl, SectionDef, SortExpression, StandardSchemaV1, TaskRunReport, UiSettingsIssue, UiSurface, ValidationIssues, i18nPrefixToRef } from "@burojs/core";
|
|
4
|
+
import { BlockImplementationCatalog, CheckGateState, CollectionDisplayProps, CollectionInputProps, DEFAULT_LANGUAGE_STORAGE_KEY, FieldBinding, FieldImplementation, FieldImplementationLayout, FieldLinkState, FieldPresentation, FilterFieldSpec, FilterKind, FormSubmitContext, FormValues, ListOptionFilter, QuickSettledRow, RowRecord, SavedViewEntry, ScalarDisplayProps, ScalarInputProps, UIPresentationHostProps, UIPresentationHosts, UseFormControllerFormOptions, modeForSurface, useApp, useTestIds } from "@burojs/react";
|
|
4
5
|
import * as React$1 from "react";
|
|
5
|
-
import { AnchorHTMLAttributes,
|
|
6
|
+
import { AnchorHTMLAttributes, ComponentType, JSX, ReactElement, ReactNode, SVGProps } from "react";
|
|
6
7
|
import { ClassValue } from "clsx";
|
|
7
8
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
8
9
|
import { Slot as Slot$1 } from "@radix-ui/react-slot";
|
|
@@ -353,7 +354,10 @@ declare function useLayout(key: string): NavLayout | undefined;
|
|
|
353
354
|
/**
|
|
354
355
|
* Non-hook-in-loop layout lookup: read the Components registry once, return a
|
|
355
356
|
* resolver `(key) => NavLayout | undefined`. Lets `NavChrome` resolve a
|
|
356
|
-
* variable-length group chain without violating Rules of Hooks.
|
|
357
|
+
* variable-length group chain without violating Rules of Hooks. The registry
|
|
358
|
+
* (`layout.<key>`) wins; the built-ins (`secondary-sidebar`, `tabs`) are the
|
|
359
|
+
* fallback, so they work without registration. `flat` and `collapsible` resolve
|
|
360
|
+
* to nothing: they are main-sidebar-only groupings.
|
|
357
361
|
*/
|
|
358
362
|
declare function useLayoutResolver(): (key: string) => NavLayout | undefined;
|
|
359
363
|
//#endregion
|
|
@@ -417,44 +421,19 @@ interface NavChromeProps {
|
|
|
417
421
|
/**
|
|
418
422
|
* Wrap the active page in its group-chain chrome. Walks `match.groupChain`
|
|
419
423
|
* innermost→outermost, wrapping the accumulating content in each group's
|
|
420
|
-
*
|
|
421
|
-
*
|
|
422
|
-
*
|
|
424
|
+
* content layout (secondary-sidebar / tabs). Groups whose layout has no
|
|
425
|
+
* content renderer (flat / collapsible — main-sidebar only) contribute no
|
|
426
|
+
* wrapping. No match → children bare (`/login`, a host's own routes).
|
|
427
|
+
*
|
|
428
|
+
* Mount it ONCE in the persistent layout, around whatever the router renders —
|
|
429
|
+
* `AppShell` does this by default. Moving within an area keeps the outer layout
|
|
430
|
+
* element at the same type and position, so React reconciles it in place: the
|
|
431
|
+
* secondary sidebar stays the same DOM node and only its active item changes.
|
|
432
|
+
* Output depends only on the registry, the adapter's pathname and i18n — no
|
|
433
|
+
* effect decides it, so it renders on the server as on the client.
|
|
423
434
|
*/
|
|
424
435
|
declare function NavChrome({ children, entryFilter, icons }: NavChromeProps): ReactElement;
|
|
425
436
|
//#endregion
|
|
426
|
-
//#region src/layout/nav-chrome-boundary.d.ts
|
|
427
|
-
declare function useNavChromeBoundary(): ReadonlySet<string>;
|
|
428
|
-
/**
|
|
429
|
-
* Merge `claim` into the ancestor boundary set and provide it downward. Nested
|
|
430
|
-
* NavAreaLayouts compose: each adds its own group (+ ancestors) to the set.
|
|
431
|
-
*/
|
|
432
|
-
declare function NavChromeBoundaryProvider({ claim, children }: {
|
|
433
|
-
claim: readonly string[];
|
|
434
|
-
children: ReactNode;
|
|
435
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
436
|
-
//#endregion
|
|
437
|
-
//#region src/layout/nav-area-layout.d.ts
|
|
438
|
-
interface NavAreaLayoutProps {
|
|
439
|
-
groupName: string;
|
|
440
|
-
children: ReactNode;
|
|
441
|
-
entryFilter?: (node: {
|
|
442
|
-
name: string;
|
|
443
|
-
}) => boolean;
|
|
444
|
-
icons?: BuildNavItemsArgs['icons'];
|
|
445
|
-
}
|
|
446
|
-
/**
|
|
447
|
-
* Persistent chrome for ONE group, meant to be rendered from a Next
|
|
448
|
-
* `layout.tsx` (so it reconciles across navigations within the area instead of
|
|
449
|
-
* remounting like the page does). Renders the group's registered content layout
|
|
450
|
-
* (active-state from the current match — the layout re-renders on navigation
|
|
451
|
-
* but does not remount, so internal state is preserved), and CLAIMS the group
|
|
452
|
-
* (+ its ancestors) in `NavChromeBoundary` so the descendant page `NavChrome`
|
|
453
|
-
* skips it (no double render). `chromeOn:'list'` groups still collapse on a
|
|
454
|
-
* resource detail action; the boundary claim holds regardless.
|
|
455
|
-
*/
|
|
456
|
-
declare function NavAreaLayout({ groupName, children, entryFilter, icons }: NavAreaLayoutProps): ReactElement;
|
|
457
|
-
//#endregion
|
|
458
437
|
//#region src/layout/resource-page-router.d.ts
|
|
459
438
|
interface ResourcePageRouterProps {
|
|
460
439
|
match: RouteMatch;
|
|
@@ -483,9 +462,11 @@ interface ResourcePageRouterProps {
|
|
|
483
462
|
*/
|
|
484
463
|
declare function ResourcePageRouter({ match }: ResourcePageRouterProps): ReactElement;
|
|
485
464
|
/**
|
|
486
|
-
*
|
|
487
|
-
*
|
|
488
|
-
*
|
|
465
|
+
* The page a host mounts: resolves the active route (`useMatch`, from the
|
|
466
|
+
* router adapter) and dispatches to the right framework component via
|
|
467
|
+
* `ResourcePageRouter`. Content only — the group-chain chrome (`NavChrome`)
|
|
468
|
+
* lives in the persistent layout around it (`AppShell` mounts it), so it
|
|
469
|
+
* survives navigation while this page remounts. No match → a not-found panel;
|
|
489
470
|
* no router adapter at all → the same panel, and in development one
|
|
490
471
|
* `console.error` naming `RouterAdapterProvider` (once per app), because
|
|
491
472
|
* then EVERY route is not-found. Wrapped in a `Suspense` boundary so a
|
|
@@ -502,12 +483,13 @@ declare function NavAreaPage(): ReactElement;
|
|
|
502
483
|
* `defaults` exists on `create` only: show and edit render the record as it
|
|
503
484
|
* is, so the type refuses it there rather than ignoring it.
|
|
504
485
|
*/
|
|
505
|
-
type RecordPageProps = {
|
|
506
|
-
|
|
486
|
+
type RecordPageProps<N extends string = string> = {
|
|
487
|
+
/** A name checked against the registered resources, or the entity ref. */
|
|
488
|
+
readonly resource?: ResourceNameOrRef<N>;
|
|
507
489
|
readonly action: Exclude<ScreenMode, 'create'>;
|
|
508
490
|
readonly defaults?: never;
|
|
509
491
|
} | {
|
|
510
|
-
readonly resource?:
|
|
492
|
+
readonly resource?: ResourceNameOrRef<N>;
|
|
511
493
|
readonly action?: Extract<ScreenMode, 'create'>;
|
|
512
494
|
/**
|
|
513
495
|
* The caller's tier of starting values, above each field's declared
|
|
@@ -528,7 +510,7 @@ type RecordPageProps = {
|
|
|
528
510
|
* `<ResourcePageRouter>` renders the record route itself; a different layout is a frame on the
|
|
529
511
|
* screen (`views.<mode>.frame`), never a replaced route (P6-56).
|
|
530
512
|
*/
|
|
531
|
-
declare function RecordPage(props: RecordPageProps): ReactElement;
|
|
513
|
+
declare function RecordPage<const N extends string = string>(props: RecordPageProps<N>): ReactElement;
|
|
532
514
|
//#endregion
|
|
533
515
|
//#region src/layout/record-breadcrumbs.d.ts
|
|
534
516
|
/**
|
|
@@ -553,12 +535,18 @@ declare function RecordBreadcrumbs(): ReactElement | null;
|
|
|
553
535
|
//#endregion
|
|
554
536
|
//#region src/record/record-screen.d.ts
|
|
555
537
|
type AnyResourceHandle$1 = ResourceHandle<any, any, any, any>;
|
|
556
|
-
interface RecordScreenProps {
|
|
557
|
-
/**
|
|
558
|
-
|
|
538
|
+
interface RecordScreenProps<N extends string = string> {
|
|
539
|
+
/**
|
|
540
|
+
* The resource: its name (checked against the registered resources), its handle or its entity
|
|
541
|
+
* ref `{ namespace, id }`.
|
|
542
|
+
*/
|
|
543
|
+
readonly resource: ResourceNameArg<N> | AnyResourceHandle$1 | EntityRef;
|
|
559
544
|
readonly mode: 'show' | 'edit' | 'create';
|
|
560
|
-
/**
|
|
561
|
-
|
|
545
|
+
/**
|
|
546
|
+
* The record to read and write (show, edit), as its id field types it: a number for a numeric id
|
|
547
|
+
* field. Not needed when `record` is given.
|
|
548
|
+
*/
|
|
549
|
+
readonly recordId?: RecordId;
|
|
562
550
|
/**
|
|
563
551
|
* The accepted type of a typed create. Without a router, changing it remounts the form for the
|
|
564
552
|
* new type and discards unsaved input without asking for confirmation.
|
|
@@ -574,8 +562,12 @@ interface RecordScreenProps {
|
|
|
574
562
|
* (the form is dirty); any other key is dropped. Not a default, never trusted.
|
|
575
563
|
*/
|
|
576
564
|
readonly input?: Readonly<Record<string, unknown>>;
|
|
577
|
-
/**
|
|
578
|
-
|
|
565
|
+
/**
|
|
566
|
+
* Replaces the built-in update or create; receives the payload (the record's columns) and, as
|
|
567
|
+
* `context.links`, each inline link field's keys to add and remove; `context.idempotencyKey` and
|
|
568
|
+
* `context.resend` name the attempt (a resend of an unknown write keeps its key).
|
|
569
|
+
*/
|
|
570
|
+
readonly onSubmit?: (payload: Record<string, unknown>, context: FormSubmitContext) => Promise<unknown>;
|
|
579
571
|
/** Called after a successful submit with what the write returned. */
|
|
580
572
|
readonly onSuccess?: (result: unknown) => void;
|
|
581
573
|
/** Replaces Cancel's default back navigation. */
|
|
@@ -597,7 +589,7 @@ interface RecordScreenProps {
|
|
|
597
589
|
* `record` is given; writes with the resource's update or create unless
|
|
598
590
|
* `onSubmit` is given. A resource the app does not know renders not-found.
|
|
599
591
|
*/
|
|
600
|
-
declare function RecordScreen(props: RecordScreenProps): ReactElement;
|
|
592
|
+
declare function RecordScreen<const N extends string = string>(props: RecordScreenProps<N>): ReactElement;
|
|
601
593
|
//#endregion
|
|
602
594
|
//#region src/record/frame-pieces.d.ts
|
|
603
595
|
/**
|
|
@@ -622,11 +614,16 @@ declare const CopyId: () => ReactElement | null;
|
|
|
622
614
|
declare const FormActions: () => ReactElement | null;
|
|
623
615
|
//#endregion
|
|
624
616
|
//#region src/layout/default-nav-layouts.d.ts
|
|
625
|
-
/**
|
|
617
|
+
/**
|
|
618
|
+
* The built-in content-wrapping layouts as a Components-registry table.
|
|
619
|
+
*
|
|
620
|
+
* Optional: `secondary-sidebar` and `tabs` resolve without it. Spread it into
|
|
621
|
+
* `BuroProvider`'s `components` only to wrap or re-register the built-ins.
|
|
622
|
+
*/
|
|
626
623
|
declare const defaultNavLayouts: Record<string, NavLayout>;
|
|
627
624
|
//#endregion
|
|
628
625
|
//#region src/layout/context-picker.d.ts
|
|
629
|
-
interface
|
|
626
|
+
interface ContextPickerBase {
|
|
630
627
|
/**
|
|
631
628
|
* Slice name (also used in testid). Free-form — playground uses 'company',
|
|
632
629
|
* 'productGroup', 'location' etc.
|
|
@@ -638,8 +635,6 @@ interface ContextPickerProps {
|
|
|
638
635
|
value: string;
|
|
639
636
|
label: string;
|
|
640
637
|
}>;
|
|
641
|
-
value: string | null;
|
|
642
|
-
onChange: (value: string) => void;
|
|
643
638
|
placeholder?: string;
|
|
644
639
|
disabled?: boolean;
|
|
645
640
|
className?: string;
|
|
@@ -654,6 +649,19 @@ interface ContextPickerProps {
|
|
|
654
649
|
*/
|
|
655
650
|
hideLabel?: boolean;
|
|
656
651
|
}
|
|
652
|
+
type ContextPickerProps = (ContextPickerBase & {
|
|
653
|
+
allOption?: undefined;
|
|
654
|
+
value: string | null;
|
|
655
|
+
onChange: (value: string) => void;
|
|
656
|
+
}) | (ContextPickerBase & {
|
|
657
|
+
/**
|
|
658
|
+
* Adds an "All" item first: `true` labels it with the `scope.all` chrome string, a string
|
|
659
|
+
* is the label. `value: null` selects it and `onChange` receives `null` for it.
|
|
660
|
+
*/
|
|
661
|
+
allOption: true | string;
|
|
662
|
+
value: string | null;
|
|
663
|
+
onChange: (value: string | null) => void;
|
|
664
|
+
});
|
|
657
665
|
/**
|
|
658
666
|
* Generic context picker — a labeled dropdown that drives a slice value.
|
|
659
667
|
* Used in the sidebar / header to switch company, product group, location, etc.
|
|
@@ -661,7 +669,24 @@ interface ContextPickerProps {
|
|
|
661
669
|
* The component is presentational. Consumers wire it to whatever store they
|
|
662
670
|
* use (auth context, buro context engine, or local state).
|
|
663
671
|
*/
|
|
664
|
-
declare function ContextPicker({ sliceName, label, options, value, onChange, placeholder, disabled, className, hideLabel }: ContextPickerProps): React.ReactElement;
|
|
672
|
+
declare function ContextPicker({ sliceName, label, options, value, onChange, placeholder, disabled, className, hideLabel, allOption }: ContextPickerProps): React.ReactElement;
|
|
673
|
+
//#endregion
|
|
674
|
+
//#region src/layout/scope-dimension-picker.d.ts
|
|
675
|
+
interface ScopeDimensionPickerProps {
|
|
676
|
+
/** A key of `defineScope(...)`. */
|
|
677
|
+
dimension: string;
|
|
678
|
+
/** Falls back to `humanizeKey(dimension)`. */
|
|
679
|
+
label?: string;
|
|
680
|
+
hideLabel?: boolean;
|
|
681
|
+
className?: string;
|
|
682
|
+
}
|
|
683
|
+
/**
|
|
684
|
+
* The control for one scope dimension (read-scope spec 7c.3): the dimension's values as options,
|
|
685
|
+
* "All" first (nothing selected means everything allowed), writing `useScope().select`. A
|
|
686
|
+
* selection change, never a transition: no cache is cleared and nothing in flight is cancelled.
|
|
687
|
+
* Renders nothing for `select: 'none'`.
|
|
688
|
+
*/
|
|
689
|
+
declare function ScopeDimensionPicker(props: ScopeDimensionPickerProps): React.ReactElement | null;
|
|
665
690
|
//#endregion
|
|
666
691
|
//#region src/layout/use-theme.d.ts
|
|
667
692
|
/** What the user picked. `'system'` means "no explicit choice" — nothing is
|
|
@@ -769,9 +794,9 @@ interface BreadcrumbsBaseProps {
|
|
|
769
794
|
'data-testid'?: string;
|
|
770
795
|
}
|
|
771
796
|
/** A trail that ends at, or passes through, a resource: its list link, then the record. */
|
|
772
|
-
interface ResourceBreadcrumbsProps extends BreadcrumbsBaseProps {
|
|
773
|
-
/** Resource name (the registry key). */
|
|
774
|
-
resource:
|
|
797
|
+
interface ResourceBreadcrumbsProps<N extends string = string> extends BreadcrumbsBaseProps {
|
|
798
|
+
/** Resource name (the registry key), checked against the registered resources; or its entity ref. */
|
|
799
|
+
resource: ResourceNameOrRef<N>;
|
|
775
800
|
name?: never;
|
|
776
801
|
/** Identifier for the current page (testid only); a record id on show/edit pages. */
|
|
777
802
|
recordId?: string;
|
|
@@ -797,7 +822,7 @@ interface PageBreadcrumbsProps extends BreadcrumbsBaseProps {
|
|
|
797
822
|
recordId?: never;
|
|
798
823
|
middleSegments?: never;
|
|
799
824
|
}
|
|
800
|
-
type BreadcrumbsProps = ResourceBreadcrumbsProps | PageBreadcrumbsProps;
|
|
825
|
+
type BreadcrumbsProps<N extends string = string> = ResourceBreadcrumbsProps<N> | PageBreadcrumbsProps;
|
|
801
826
|
/**
|
|
802
827
|
* The navigation breadcrumb, in two shapes. With `resource`: the leading
|
|
803
828
|
* segments, the resource (a link to its canonical, nesting-aware list href,
|
|
@@ -807,7 +832,7 @@ type BreadcrumbsProps = ResourceBreadcrumbsProps | PageBreadcrumbsProps;
|
|
|
807
832
|
* emphasised, non-linked span with `aria-current="page"`. Every crumb carries
|
|
808
833
|
* its label as a `title` tooltip, so a truncated one can still be read.
|
|
809
834
|
*/
|
|
810
|
-
declare function Breadcrumbs(
|
|
835
|
+
declare function Breadcrumbs<const N extends string = string>(input: BreadcrumbsProps<N>): ReactElement | null;
|
|
811
836
|
//#endregion
|
|
812
837
|
//#region src/layout/header-breadcrumbs.d.ts
|
|
813
838
|
/**
|
|
@@ -1033,7 +1058,7 @@ interface CommandPaletteRecentGroupProps {
|
|
|
1033
1058
|
heading?: string;
|
|
1034
1059
|
/**
|
|
1035
1060
|
* Re-read trigger. When this prop changes the component re-reads
|
|
1036
|
-
*
|
|
1061
|
+
* the platform's local store (e.g. flip from `false` → `true` on palette open).
|
|
1037
1062
|
* Optional — when omitted the component reads only on mount and when
|
|
1038
1063
|
* the user changes, which is sufficient for the typical "palette
|
|
1039
1064
|
* dialog re-mounts on each open" use case.
|
|
@@ -1207,6 +1232,7 @@ interface CommandPaletteRecordsGroupProps {
|
|
|
1207
1232
|
* ```tsx
|
|
1208
1233
|
* 'use client';
|
|
1209
1234
|
* import { useCommandPalette } from '@burojs/react';
|
|
1235
|
+
* import { useGlobalShortcut } from '@burojs/react/web';
|
|
1210
1236
|
* import {
|
|
1211
1237
|
* CommandPalette,
|
|
1212
1238
|
* CommandPaletteRecordsGroup,
|
|
@@ -1214,7 +1240,8 @@ interface CommandPaletteRecordsGroupProps {
|
|
|
1214
1240
|
* } from '@burojs/ui-shadcn';
|
|
1215
1241
|
*
|
|
1216
1242
|
* function Shell() {
|
|
1217
|
-
* const { open, setOpen } = useCommandPalette();
|
|
1243
|
+
* const { open, setOpen, toggle } = useCommandPalette();
|
|
1244
|
+
* useGlobalShortcut({ key: 'k', mod: true }, toggle);
|
|
1218
1245
|
* return (
|
|
1219
1246
|
* <CommandPalette open={open} onOpenChange={setOpen}>
|
|
1220
1247
|
* <CommandPaletteRecordsGroup
|
|
@@ -1470,7 +1497,7 @@ interface CommandPaletteCreateGroupProps {
|
|
|
1470
1497
|
*
|
|
1471
1498
|
* 1. Resources with no list page (`views.list.page: false`) are
|
|
1472
1499
|
* excluded — they are reached through a parent's placement.
|
|
1473
|
-
* 2. `
|
|
1500
|
+
* 2. `useResourceVisible()` (the sidebar's predicate: its `visible(ctx)`) must return true.
|
|
1474
1501
|
* Same predicate the sidebar + navigation group use, fail-closed
|
|
1475
1502
|
* on throwing predicates. Hidden in sidebar → hidden here.
|
|
1476
1503
|
* 3. Caller-supplied `resourceFilter` (if any). Returning `false`
|
|
@@ -1753,6 +1780,7 @@ declare const shadcnFieldImplementations: Readonly<{
|
|
|
1753
1780
|
CollectionDisplay?: import("react").ComponentType<CollectionDisplayProps<unknown, Readonly<Record<string, unknown>>>> | undefined;
|
|
1754
1781
|
layout?: FieldImplementationLayout;
|
|
1755
1782
|
meta: import("@burojs/core").StandardSchemaV1<unknown, Readonly<Record<string, unknown>>>;
|
|
1783
|
+
texts?: Readonly<Record<string, string>>;
|
|
1756
1784
|
}>;
|
|
1757
1785
|
richText: FieldImplementation<unknown, Readonly<Record<string, unknown>>>;
|
|
1758
1786
|
'rich-text': FieldImplementation<unknown, Readonly<Record<string, unknown>>>;
|
|
@@ -1771,13 +1799,18 @@ declare const shadcnBlockImplementations: BlockImplementationCatalog;
|
|
|
1771
1799
|
//#region src/fields/registry.d.ts
|
|
1772
1800
|
interface FieldRendererProps {
|
|
1773
1801
|
value: unknown;
|
|
1802
|
+
/**
|
|
1803
|
+
* The value's formatted display text (REF-117 §4.6), when the surface declares a transform and
|
|
1804
|
+
* the value is not empty. A built-in display renders it instead of its own formatting; a custom
|
|
1805
|
+
* renderer may ignore it.
|
|
1806
|
+
*/
|
|
1807
|
+
text?: string;
|
|
1774
1808
|
/** True when this renderer is reached through a collection implementation. */
|
|
1775
1809
|
multiple?: boolean;
|
|
1776
1810
|
field?: {
|
|
1777
1811
|
name: string;
|
|
1778
1812
|
meta?: Record<string, unknown>;
|
|
1779
1813
|
ui?: Record<string, unknown>;
|
|
1780
|
-
codec?: ValueCodec<unknown, unknown, unknown>;
|
|
1781
1814
|
/** The field's declared `texts`; an option's label is read from it (`fieldOptionText`). */
|
|
1782
1815
|
texts?: unknown;
|
|
1783
1816
|
};
|
|
@@ -1826,6 +1859,11 @@ interface FieldInputProps {
|
|
|
1826
1859
|
* `candidates` refs are read from (P7 3.4).
|
|
1827
1860
|
*/
|
|
1828
1861
|
metaSources?: ScreenSources;
|
|
1862
|
+
/**
|
|
1863
|
+
* An inline link field of a record form: what the user may do with it, the keys they cannot
|
|
1864
|
+
* see, and whether the form holds its keys. Only the to-many select reads it.
|
|
1865
|
+
*/
|
|
1866
|
+
link?: FieldLinkState;
|
|
1829
1867
|
id?: string;
|
|
1830
1868
|
value: unknown;
|
|
1831
1869
|
/** True when this renderer is reached through a collection implementation. */
|
|
@@ -1870,6 +1908,12 @@ interface FieldInputProps {
|
|
|
1870
1908
|
* be honored — `<RecordScreen>` already wires both together.
|
|
1871
1909
|
*/
|
|
1872
1910
|
ariaErrorMessage?: string;
|
|
1911
|
+
/**
|
|
1912
|
+
* Id of the field's label element, when the surface renders one with an id.
|
|
1913
|
+
* A control whose root is not labelable (a radio group) passes it to
|
|
1914
|
+
* `aria-labelledby`; a labelable one is already named by the label's `for`.
|
|
1915
|
+
*/
|
|
1916
|
+
ariaLabelledBy?: string;
|
|
1873
1917
|
/**
|
|
1874
1918
|
* Field metadata, mirroring `FieldRendererProps.field`. Forwarded by
|
|
1875
1919
|
* `<RecordScreen>` so renderers that depend on per-field meta (e.g.
|
|
@@ -1888,7 +1932,6 @@ interface FieldInputProps {
|
|
|
1888
1932
|
name: string;
|
|
1889
1933
|
meta?: Record<string, unknown>;
|
|
1890
1934
|
ui?: Record<string, unknown>;
|
|
1891
|
-
codec?: ValueCodec<unknown, unknown, unknown>;
|
|
1892
1935
|
};
|
|
1893
1936
|
/**
|
|
1894
1937
|
* Registry name of the resource this field belongs to.
|
|
@@ -1907,27 +1950,36 @@ interface FieldInputProps {
|
|
|
1907
1950
|
}
|
|
1908
1951
|
//#endregion
|
|
1909
1952
|
//#region src/fields/text.d.ts
|
|
1910
|
-
declare function TextDisplay({ value }: FieldRendererProps): React$1.ReactElement;
|
|
1953
|
+
declare function TextDisplay({ value, text: formatted }: FieldRendererProps): React$1.ReactElement;
|
|
1911
1954
|
declare function TextInput({ name, id, value, onChange, testid, placeholder, disabled, required, ariaInvalid, ariaDescribedBy, ariaErrorMessage, minLength, maxLength, pattern }: FieldInputProps): React$1.ReactElement;
|
|
1912
1955
|
//#endregion
|
|
1913
1956
|
//#region src/fields/number.d.ts
|
|
1914
|
-
declare function NumberDisplay({ value, field }: FieldRendererProps): React$1.ReactElement;
|
|
1957
|
+
declare function NumberDisplay({ value, field, text }: FieldRendererProps): React$1.ReactElement;
|
|
1915
1958
|
declare function NumberInput({ name, id, value, onChange, testid, placeholder, disabled, required, ariaInvalid, ariaDescribedBy, ariaErrorMessage, min, max }: FieldInputProps): React$1.ReactElement;
|
|
1916
1959
|
//#endregion
|
|
1917
1960
|
//#region src/fields/boolean.d.ts
|
|
1918
|
-
declare function BooleanDisplay({ value }: FieldRendererProps): React$1.ReactElement;
|
|
1961
|
+
declare function BooleanDisplay({ value, text }: FieldRendererProps): React$1.ReactElement;
|
|
1919
1962
|
declare function BooleanInput({ name, id, value, onChange, testid, disabled, required, ariaInvalid, ariaDescribedBy, ariaErrorMessage }: FieldInputProps): React$1.ReactElement;
|
|
1920
1963
|
//#endregion
|
|
1921
1964
|
//#region src/fields/date.d.ts
|
|
1922
|
-
declare function DateDisplay({ value }: FieldRendererProps): React$1.ReactElement;
|
|
1923
|
-
declare function DateInput(
|
|
1965
|
+
declare function DateDisplay({ value, text }: FieldRendererProps): React$1.ReactElement;
|
|
1966
|
+
declare function DateInput(props: FieldInputProps): React$1.ReactElement;
|
|
1924
1967
|
//#endregion
|
|
1925
1968
|
//#region src/fields/enum.d.ts
|
|
1926
1969
|
declare function EnumDisplay({ value, options, field, resource }: FieldRendererProps): React$1.ReactElement;
|
|
1927
|
-
|
|
1970
|
+
/**
|
|
1971
|
+
* The options-driven enum input: a field with inline options, or one bound to
|
|
1972
|
+
* an enum only through `meta.enumNamespace`. Renders the control the field
|
|
1973
|
+
* asks for (`ui.control`), else the bound enum's `control`, else a select; the
|
|
1974
|
+
* non-select controls are the shared `EnumChoiceGroup`. When the field is bound
|
|
1975
|
+
* to an enum namespace, each value's summary is read the way `EnumPicker` reads
|
|
1976
|
+
* it (`enum/<ns>/<value>`), so one enum looks the same however its field is
|
|
1977
|
+
* bound; a truly inline enum has no value docs and shows labels only.
|
|
1978
|
+
*/
|
|
1979
|
+
declare function EnumInput({ name, id, value, onChange, testid, options, field, placeholder, disabled, required, ariaInvalid, ariaDescribedBy, ariaErrorMessage, ariaLabelledBy, resource }: FieldInputProps): React$1.ReactElement;
|
|
1928
1980
|
//#endregion
|
|
1929
1981
|
//#region src/fields/textarea.d.ts
|
|
1930
|
-
declare function TextareaDisplay({ value }: FieldRendererProps): React$1.ReactElement;
|
|
1982
|
+
declare function TextareaDisplay({ value, text: formatted }: FieldRendererProps): React$1.ReactElement;
|
|
1931
1983
|
declare function TextareaInput({ name, id, value, onChange, testid, placeholder, disabled, required, ariaInvalid, ariaDescribedBy, ariaErrorMessage, className, onKeyDown, minLength, maxLength }: FieldInputProps & {
|
|
1932
1984
|
className?: string;
|
|
1933
1985
|
onKeyDown?: React$1.KeyboardEventHandler<HTMLTextAreaElement>;
|
|
@@ -1984,9 +2036,9 @@ declare function RelationDisplay({ value, field }: FieldRendererProps): React$1.
|
|
|
1984
2036
|
* `RelationDisplay` above), so this wrapper just shapes that `meta` object;
|
|
1985
2037
|
* `field.name` is set to `''` since standalone usage has no owning field.
|
|
1986
2038
|
*/
|
|
1987
|
-
declare function RelationField({ to, value }: {
|
|
2039
|
+
declare function RelationField<const N extends string = string>({ to: toInput, value }: {
|
|
1988
2040
|
/** Target resource name (matches `f.relation({ to: '...' })`). */
|
|
1989
|
-
to:
|
|
2041
|
+
to: ResourceNameOrRef<N>;
|
|
1990
2042
|
/** FK value to resolve, or null/undefined/'' when empty. */
|
|
1991
2043
|
value: unknown;
|
|
1992
2044
|
}): React$1.ReactElement;
|
|
@@ -2049,9 +2101,9 @@ type CandidatesGate = {
|
|
|
2049
2101
|
* - target row for `value` not found → trigger shows the raw id
|
|
2050
2102
|
* (so the operator can at least see what was stored).
|
|
2051
2103
|
*/
|
|
2052
|
-
interface RelationPickerProps {
|
|
2104
|
+
interface RelationPickerProps<N extends string = string> {
|
|
2053
2105
|
/** Target resource name (matches `f.relation({ to: '...' })`). */
|
|
2054
|
-
to:
|
|
2106
|
+
to: ResourceNameOrRef<N>;
|
|
2055
2107
|
/** Currently-selected FK value, or null/undefined when empty. */
|
|
2056
2108
|
value: string | number | null | undefined;
|
|
2057
2109
|
/** Called with the new selected id (or `by` value), or null when cleared. */
|
|
@@ -2129,7 +2181,7 @@ interface RelationPickerProps {
|
|
|
2129
2181
|
/** Forwarded to the trigger button as `aria-errormessage` (WAI-ARIA 1.2). */
|
|
2130
2182
|
ariaErrorMessage?: string;
|
|
2131
2183
|
}
|
|
2132
|
-
declare function RelationPicker({ to, value, onChange, by, searchField, pageSize, clearable, placeholder, name, id, testid, fixedFilters, createSeeds, candidatesGate, rowFits, fieldName, open: openMode, scope, disabled, required, className, ariaInvalid, ariaDescribedBy, ariaErrorMessage }: RelationPickerProps): React$1.ReactElement;
|
|
2184
|
+
declare function RelationPicker<const N extends string = string>({ to: toInput, value, onChange, by, searchField, pageSize, clearable, placeholder, name, id, testid, fixedFilters, createSeeds, candidatesGate, rowFits, fieldName, open: openMode, scope, disabled, required, className, ariaInvalid, ariaDescribedBy, ariaErrorMessage }: RelationPickerProps<N>): React$1.ReactElement;
|
|
2133
2185
|
/**
|
|
2134
2186
|
* Form-field adapter wrapping `<RelationPicker>` for use as a default
|
|
2135
2187
|
* Input renderer in the field registry. Reads `field.meta.to` for the
|
|
@@ -2164,8 +2216,8 @@ interface SelectCreate {
|
|
|
2164
2216
|
* #9 — compact, and the table area is a FIXED height so paging never resizes /
|
|
2165
2217
|
* jumps the dialog; responsive down to mobile.
|
|
2166
2218
|
*/
|
|
2167
|
-
interface RelationPickerDialogProps {
|
|
2168
|
-
to:
|
|
2219
|
+
interface RelationPickerDialogProps<N extends string = string> {
|
|
2220
|
+
to: ResourceNameOrRef<N>;
|
|
2169
2221
|
open: boolean;
|
|
2170
2222
|
onOpenChange: (open: boolean) => void;
|
|
2171
2223
|
onSelect: (value: string | number) => void;
|
|
@@ -2188,8 +2240,8 @@ interface RelationPickerDialogProps {
|
|
|
2188
2240
|
*/
|
|
2189
2241
|
searchField?: string;
|
|
2190
2242
|
/**
|
|
2191
|
-
* Which field of the chosen row `onSelect` returns. Defaults to
|
|
2192
|
-
* FK relation). Set to another column (e.g. `gtin`) for "relate by a non-id
|
|
2243
|
+
* Which field of the chosen row `onSelect` returns. Defaults to the target's id
|
|
2244
|
+
* field (`data.idField`, else `id`: a normal FK relation). Set to another column (e.g. `gtin`) for "relate by a non-id
|
|
2193
2245
|
* value" pickers — the core mechanic behind the playground GTIN field.
|
|
2194
2246
|
*/
|
|
2195
2247
|
valueField?: string;
|
|
@@ -2241,18 +2293,34 @@ interface RelationPickerDialogProps {
|
|
|
2241
2293
|
* dialog with `onOpenChange(false)`, so a confirm and a dismissal can be told apart.
|
|
2242
2294
|
*/
|
|
2243
2295
|
onDone?: () => void;
|
|
2296
|
+
/**
|
|
2297
|
+
* Asked once per shown page with the keys of its rows: rows whose key is in the resolved set
|
|
2298
|
+
* are drawn checked and disabled (a link panel's already-linked targets). Until it answers the
|
|
2299
|
+
* page's rows cannot be picked and the footer says the rows are being checked; when it fails
|
|
2300
|
+
* none of them can, and the footer says so with a Retry.
|
|
2301
|
+
*/
|
|
2302
|
+
disabledKeys?: (keys: readonly (string | number)[], signal: AbortSignal) => Promise<ReadonlySet<string>>;
|
|
2303
|
+
/**
|
|
2304
|
+
* With `disabledKeys`: the footer's note for the page's disabled rows, given how many there
|
|
2305
|
+
* are (the caller says what they are, "3 already linked"). Absent: no note.
|
|
2306
|
+
*/
|
|
2307
|
+
disabledLabel?: (count: number) => React$1.ReactNode;
|
|
2244
2308
|
}
|
|
2245
|
-
declare function RelationPickerDialog({ to, open, onOpenChange, onSelect, onSelectRow, searchField, valueField, fixedFilters, scope, scopeField, create, createSeeds, fieldName, onBeforeCreate, pageSize, multiple, selected, onToggle, onDone }: RelationPickerDialogProps): React$1.ReactElement;
|
|
2246
2309
|
//#endregion
|
|
2247
2310
|
//#region src/fields/lazy-relation-picker-dialog.d.ts
|
|
2248
2311
|
/** The "Advanced search" dialog, loaded on the first open: nothing is drawn until it arrives. */
|
|
2249
|
-
declare function LazyRelationPickerDialog(props:
|
|
2312
|
+
declare function LazyRelationPickerDialog<const N extends string = string>(props: RelationPickerDialogProps<N>): ReactElement;
|
|
2250
2313
|
//#endregion
|
|
2251
2314
|
//#region src/fields/use-relation-picker.d.ts
|
|
2252
2315
|
type AnyResourceHandle = ResourceHandle<any, any, any, any>;
|
|
2253
|
-
type FieldNamesOf<R> = R extends ResourceHandle<any, infer F, any, any> ? keyof F & string : string;
|
|
2254
|
-
type UseRelationPickerOptions<R extends AnyResourceHandle | string, TSelect extends FieldNamesOf<R>> =
|
|
2255
|
-
|
|
2316
|
+
type FieldNamesOf<R> = R extends ResourceHandle<any, infer F, any, any> ? keyof F & string : R extends string ? FieldNamesOf<ResourceHandleOf<R>> : string;
|
|
2317
|
+
type UseRelationPickerOptions<R extends AnyResourceHandle | string | EntityRef, TSelect extends FieldNamesOf<R>> =
|
|
2318
|
+
/**
|
|
2319
|
+
* The target: its handle, its name (checked against the registered resources, and typing
|
|
2320
|
+
* `select` by the registered fields) or its entity ref.
|
|
2321
|
+
*/
|
|
2322
|
+
({
|
|
2323
|
+
readonly to: ResourceRefArg<R>;
|
|
2256
2324
|
readonly field?: never;
|
|
2257
2325
|
} |
|
|
2258
2326
|
/** A relation field of the surrounding record (`useOptionalRecordFrame()`): `to`, `by` and `candidates` come from its declaration. */
|
|
@@ -2274,6 +2342,10 @@ type UseRelationPickerOptions<R extends AnyResourceHandle | string, TSelect exte
|
|
|
2274
2342
|
};
|
|
2275
2343
|
/** Default 'context'. */
|
|
2276
2344
|
readonly scope?: ScopeSource;
|
|
2345
|
+
/** Rows of each shown page whose key is in the resolved set are drawn checked and disabled. */
|
|
2346
|
+
readonly disabledKeys?: (keys: readonly (string | number)[], signal: AbortSignal) => Promise<ReadonlySet<string>>;
|
|
2347
|
+
/** With `disabledKeys`: the dialog footer's note for a page's disabled rows, given their count. */
|
|
2348
|
+
readonly disabledLabel?: (count: number) => React$1.ReactNode;
|
|
2277
2349
|
};
|
|
2278
2350
|
type RelationPickerRow<TSelect extends string> = { readonly [K in TSelect]?: unknown; } & {
|
|
2279
2351
|
readonly id?: unknown;
|
|
@@ -2325,7 +2397,7 @@ interface RelationPickerHandle<TRow> {
|
|
|
2325
2397
|
* `element` once, anywhere in the caller's tree; an `open()` while it is not rendered settles
|
|
2326
2398
|
* `not-mounted`.
|
|
2327
2399
|
*/
|
|
2328
|
-
declare function useRelationPicker<R extends AnyResourceHandle | string, TSelect extends FieldNamesOf<R> = FieldNamesOf<R>>(options: UseRelationPickerOptions<R, TSelect>): RelationPickerHandle<RelationPickerRow<TSelect>>;
|
|
2400
|
+
declare function useRelationPicker<R extends AnyResourceHandle | string | EntityRef, TSelect extends FieldNamesOf<R> = FieldNamesOf<R>>(options: UseRelationPickerOptions<R, TSelect>): RelationPickerHandle<RelationPickerRow<TSelect>>;
|
|
2329
2401
|
//#endregion
|
|
2330
2402
|
//#region src/fields/use-dialog-filter-state.d.ts
|
|
2331
2403
|
/** The portable erased AST — the only shape this module deals in. */
|
|
@@ -2391,7 +2463,7 @@ interface DialogFilterState {
|
|
|
2391
2463
|
* screen real estate for a couple of always-visible facets); a modal has no
|
|
2392
2464
|
* spare real estate to spend on them.
|
|
2393
2465
|
*/
|
|
2394
|
-
declare function useDialogFilterState(
|
|
2466
|
+
declare function useDialogFilterState<const N extends string = string>(resourceInput: ResourceNameOrRef<N>, options: UseDialogFilterStateOptions): DialogFilterState;
|
|
2395
2467
|
//#endregion
|
|
2396
2468
|
//#region src/fields/file-display.d.ts
|
|
2397
2469
|
interface FileFieldProps extends FieldRendererProps {
|
|
@@ -2460,7 +2532,6 @@ type FieldLike = LegacyFieldLike & {
|
|
|
2460
2532
|
readonly ui?: object;
|
|
2461
2533
|
readonly options?: FieldDeclaration['options'];
|
|
2462
2534
|
readonly required?: boolean;
|
|
2463
|
-
readonly codec?: unknown;
|
|
2464
2535
|
};
|
|
2465
2536
|
interface ResolvedFieldDisplayProps {
|
|
2466
2537
|
readonly resource: EntityRef;
|
|
@@ -2477,8 +2548,18 @@ interface ResolvedFieldDisplayProps {
|
|
|
2477
2548
|
* `form`, so a field P5 withholds stays pending in a `meta` ref as it does everywhere else.
|
|
2478
2549
|
*/
|
|
2479
2550
|
readonly metaSources?: ScreenSources;
|
|
2551
|
+
/**
|
|
2552
|
+
* The surface the display is drawn on (REF-117 §4.13): `'display'` (the default) for record
|
|
2553
|
+
* screens, `'column'` for a table cell, `'card'` for the default card item. Its layers select
|
|
2554
|
+
* the implementation, its params and its transform.
|
|
2555
|
+
*/
|
|
2556
|
+
readonly uiSurface?: Exclude<UiSurface, 'input'>;
|
|
2557
|
+
/** A table cell's list entry, the last layer of the `column` surface. */
|
|
2558
|
+
readonly columnEntry?: {
|
|
2559
|
+
readonly display?: unknown;
|
|
2560
|
+
};
|
|
2480
2561
|
}
|
|
2481
|
-
interface ResolvedFieldInputProps extends Omit<ResolvedFieldDisplayProps, 'fallback'> {
|
|
2562
|
+
interface ResolvedFieldInputProps extends Omit<ResolvedFieldDisplayProps, 'fallback' | 'uiSurface' | 'columnEntry'> {
|
|
2482
2563
|
readonly inputId?: string;
|
|
2483
2564
|
readonly onChange: (value: unknown) => void;
|
|
2484
2565
|
/** Live form values, distinct from the edit record baseline. */
|
|
@@ -2488,6 +2569,12 @@ interface ResolvedFieldInputProps extends Omit<ResolvedFieldDisplayProps, 'fallb
|
|
|
2488
2569
|
readonly required?: boolean;
|
|
2489
2570
|
readonly placeholder?: string;
|
|
2490
2571
|
readonly descriptionId?: string;
|
|
2572
|
+
/**
|
|
2573
|
+
* Id of the label the surface renders for this field. A control that a
|
|
2574
|
+
* `<label for>` cannot name (an enum's radio group) uses it as its
|
|
2575
|
+
* `aria-labelledby`.
|
|
2576
|
+
*/
|
|
2577
|
+
readonly labelId?: string;
|
|
2491
2578
|
readonly errorId?: string;
|
|
2492
2579
|
readonly errorMessage?: string | null;
|
|
2493
2580
|
/** Current lifecycle state from the enclosing form. */
|
|
@@ -2507,6 +2594,8 @@ interface ResolvedFieldInputProps extends Omit<ResolvedFieldDisplayProps, 'fallb
|
|
|
2507
2594
|
* Never read from `field.meta`, which a layer can write.
|
|
2508
2595
|
*/
|
|
2509
2596
|
readonly fixedFilters?: readonly FixedFilterInput[];
|
|
2597
|
+
/** An inline link field's rights, hidden keys and load state, from the form controller. */
|
|
2598
|
+
readonly link?: FieldLinkState;
|
|
2510
2599
|
readonly fallback: ReactNode;
|
|
2511
2600
|
}
|
|
2512
2601
|
//#endregion
|
|
@@ -2549,7 +2638,7 @@ type FieldProps = Omit<ResolvedFieldInputProps, 'resource' | 'fallback'> & {
|
|
|
2549
2638
|
* wired to the field's value/onChange/disabled state.
|
|
2550
2639
|
*/
|
|
2551
2640
|
declare function Field({ resource, i18nPrefix, fallback, fixedFilters, field, doc, ...rest }: FieldProps): ReactElement;
|
|
2552
|
-
type FieldDisplayProps = Omit<ResolvedFieldDisplayProps, 'resource' | 'fallback'> & {
|
|
2641
|
+
type FieldDisplayProps = Omit<ResolvedFieldDisplayProps, 'resource' | 'fallback' | 'uiSurface' | 'columnEntry'> & {
|
|
2553
2642
|
readonly resource?: EntityRef;
|
|
2554
2643
|
readonly i18nPrefix?: string;
|
|
2555
2644
|
readonly fallback?: ReactNode;
|
|
@@ -2558,7 +2647,8 @@ type FieldDisplayProps = Omit<ResolvedFieldDisplayProps, 'resource' | 'fallback'
|
|
|
2558
2647
|
* Public, resource-independent single-field display brick over
|
|
2559
2648
|
* `ResolvedFieldDisplay`. See {@link Field} for the `resource`/`i18nPrefix`
|
|
2560
2649
|
* resolution rule. `fallback` defaults to a `<span>` rendering the value, or
|
|
2561
|
-
* an em dash when the value is empty.
|
|
2650
|
+
* an em dash when the value is empty. It draws the record screens' `display`
|
|
2651
|
+
* surface, with the field's copy action and overflow around it (REF-117 P8).
|
|
2562
2652
|
*/
|
|
2563
2653
|
declare function FieldDisplay({ resource, i18nPrefix, fallback, value, ...rest }: FieldDisplayProps): ReactElement;
|
|
2564
2654
|
//#endregion
|
|
@@ -2701,10 +2791,10 @@ interface DeclarativeDisplayProps<F extends ResourceFieldMap = ResourceFieldMap>
|
|
|
2701
2791
|
declare function DeclarativeDisplay<F extends ResourceFieldMap = ResourceFieldMap>(props: DeclarativeDisplayProps<F>): ReactElement;
|
|
2702
2792
|
//#endregion
|
|
2703
2793
|
//#region src/export/export-dialog.d.ts
|
|
2704
|
-
interface ExportDialogProps {
|
|
2794
|
+
interface ExportDialogProps<N extends string = string> {
|
|
2705
2795
|
readonly open: boolean;
|
|
2706
2796
|
readonly onOpenChange: (open: boolean) => void;
|
|
2707
|
-
readonly resource:
|
|
2797
|
+
readonly resource: ResourceNameOrRef<N>;
|
|
2708
2798
|
readonly target: ExportTarget;
|
|
2709
2799
|
/**
|
|
2710
2800
|
* The list's currently visible columns — what "as in table" (the default) sends as `request.columns`.
|
|
@@ -2733,7 +2823,7 @@ interface ExportDialogProps {
|
|
|
2733
2823
|
* menu-held dialog, deleted in P4) — this dialog
|
|
2734
2824
|
* never repeats that shape.
|
|
2735
2825
|
*/
|
|
2736
|
-
declare function ExportDialog({ open, onOpenChange, resource, target, visibleColumns, estimatedCount, scope }: ExportDialogProps): React$1.ReactElement;
|
|
2826
|
+
declare function ExportDialog<const N extends string = string>({ open, onOpenChange, resource: resourceInput, target, visibleColumns, estimatedCount, scope }: ExportDialogProps<N>): React$1.ReactElement;
|
|
2737
2827
|
//#endregion
|
|
2738
2828
|
//#region src/export/download.d.ts
|
|
2739
2829
|
/**
|
|
@@ -2756,8 +2846,8 @@ declare function ExportDialog({ open, onOpenChange, resource, target, visibleCol
|
|
|
2756
2846
|
declare function downloadArtifact(artifact: ExportArtifact): void;
|
|
2757
2847
|
//#endregion
|
|
2758
2848
|
//#region src/export/export-button.d.ts
|
|
2759
|
-
interface ExportButtonProps {
|
|
2760
|
-
resource:
|
|
2849
|
+
interface ExportButtonProps<N extends string = string> {
|
|
2850
|
+
resource: ResourceNameOrRef<N>;
|
|
2761
2851
|
className?: string;
|
|
2762
2852
|
}
|
|
2763
2853
|
/**
|
|
@@ -2787,7 +2877,7 @@ interface ExportButtonProps {
|
|
|
2787
2877
|
* of any rule. `useResourceExport` already answers the existence
|
|
2788
2878
|
* question; `useCapability` is asked ONLY about permission.
|
|
2789
2879
|
*/
|
|
2790
|
-
declare function ExportButton({ resource, className }: ExportButtonProps): React$1.ReactElement | null;
|
|
2880
|
+
declare function ExportButton<const N extends string = string>({ resource: resourceInput, className }: ExportButtonProps<N>): React$1.ReactElement | null;
|
|
2791
2881
|
//#endregion
|
|
2792
2882
|
//#region src/export/run-watcher.d.ts
|
|
2793
2883
|
/**
|
|
@@ -2816,9 +2906,12 @@ declare function ExportButton({ resource, className }: ExportButtonProps): React
|
|
|
2816
2906
|
declare function useExportRunWatcher(): void;
|
|
2817
2907
|
//#endregion
|
|
2818
2908
|
//#region src/enum/enum-badge.d.ts
|
|
2819
|
-
interface EnumBadgeProps {
|
|
2820
|
-
/**
|
|
2821
|
-
|
|
2909
|
+
interface EnumBadgeProps<N extends string = string> {
|
|
2910
|
+
/**
|
|
2911
|
+
* Name of the enum registered via `defineEnum` + `app.use(...)`, checked against the
|
|
2912
|
+
* registered enums, or its entity ref `{ namespace, id }` (untyped).
|
|
2913
|
+
*/
|
|
2914
|
+
enumName: EnumNameOrRef<N>;
|
|
2822
2915
|
/** Raw value as stored on the record. */
|
|
2823
2916
|
value: string | null | undefined;
|
|
2824
2917
|
/** Test-id override. Defaults to `enum-badge:<enumName>:<value>`. */
|
|
@@ -2847,12 +2940,13 @@ interface EnumBadgeProps {
|
|
|
2847
2940
|
* - Value is unknown AND no `fallback` declared → render the raw value
|
|
2848
2941
|
* as a plain badge (variant `outline`).
|
|
2849
2942
|
*/
|
|
2850
|
-
declare function EnumBadge({ enumName, value, testid, className, presentation }: EnumBadgeProps): React$1.ReactElement;
|
|
2943
|
+
declare function EnumBadge<const N extends string = string>({ enumName: enumInput, value, testid, className, presentation }: EnumBadgeProps<N>): React$1.ReactElement;
|
|
2851
2944
|
//#endregion
|
|
2852
2945
|
//#region src/enum/enum-display.d.ts
|
|
2853
2946
|
type EnumDisplayVariant = 'badge' | 'plain' | 'icon-label';
|
|
2854
|
-
interface EnumDisplayProps {
|
|
2855
|
-
|
|
2947
|
+
interface EnumDisplayProps<N extends string = string> {
|
|
2948
|
+
/** The enum's name, checked against the registered enums, or its entity ref `{ namespace, id }`. */
|
|
2949
|
+
enumName: EnumNameOrRef<N>;
|
|
2856
2950
|
value: string | null | undefined;
|
|
2857
2951
|
/** Display variant. Defaults to 'badge'. */
|
|
2858
2952
|
variant?: EnumDisplayVariant;
|
|
@@ -2873,10 +2967,9 @@ interface EnumDisplayProps {
|
|
|
2873
2967
|
* every variant. Unregistered enums fall back to raw value text (logged
|
|
2874
2968
|
* once via console.warn, dev-only).
|
|
2875
2969
|
*/
|
|
2876
|
-
declare function EnumDisplay$1({ enumName, value, variant, testid, className }: EnumDisplayProps): React$1.ReactElement;
|
|
2970
|
+
declare function EnumDisplay$1<const N extends string = string>({ enumName: enumInput, value, variant, testid, className }: EnumDisplayProps<N>): React$1.ReactElement;
|
|
2877
2971
|
//#endregion
|
|
2878
2972
|
//#region src/enum/enum-picker.d.ts
|
|
2879
|
-
type EnumPickerRenderAs = 'select' | 'radio' | 'segmented';
|
|
2880
2973
|
/**
|
|
2881
2974
|
* Internal sentinel used as the `value` for the "All" / clear item when
|
|
2882
2975
|
* `clearable` is set. Radix `<SelectItem value="">` is forbidden, so we use
|
|
@@ -2884,18 +2977,23 @@ type EnumPickerRenderAs = 'select' | 'radio' | 'segmented';
|
|
|
2884
2977
|
* it back to `undefined` before calling the consumer's `onChange`.
|
|
2885
2978
|
*/
|
|
2886
2979
|
declare const ENUM_PICKER_CLEAR_SENTINEL = "__buro_clear__";
|
|
2887
|
-
interface EnumPickerProps {
|
|
2888
|
-
|
|
2980
|
+
interface EnumPickerProps<N extends string = string> {
|
|
2981
|
+
/** The enum's name, checked against the registered enums, or its entity ref `{ namespace, id }`. */
|
|
2982
|
+
enumName: EnumNameOrRef<N>;
|
|
2889
2983
|
value: string | null | undefined;
|
|
2890
2984
|
/**
|
|
2891
|
-
* Called whenever the user picks an option.
|
|
2892
|
-
* the user picks the "All" item
|
|
2893
|
-
*
|
|
2894
|
-
*
|
|
2985
|
+
* Called whenever the user picks an option. `value` is `undefined` when
|
|
2986
|
+
* the user picks the select's "All" item (`clearable`) or the "None"
|
|
2987
|
+
* option of a non-required `cards` / `radio` / `segmented` control —
|
|
2988
|
+
* consumers use that to clear their state. Otherwise it is one of the
|
|
2989
|
+
* enum's declared values.
|
|
2895
2990
|
*/
|
|
2896
2991
|
onChange: (value: string | undefined) => void;
|
|
2897
|
-
/**
|
|
2898
|
-
|
|
2992
|
+
/**
|
|
2993
|
+
* The control that renders the values. Defaults to `'select'`. `cards`,
|
|
2994
|
+
* `radio` and `segmented` offer a "None" option first unless `required`.
|
|
2995
|
+
*/
|
|
2996
|
+
control?: EnumControl;
|
|
2899
2997
|
/** HTML name attribute (form integration). */
|
|
2900
2998
|
name?: string;
|
|
2901
2999
|
/** HTML id attribute. */
|
|
@@ -2912,6 +3010,12 @@ interface EnumPickerProps {
|
|
|
2912
3010
|
ariaDescribedBy?: string;
|
|
2913
3011
|
/** Current field-error element id, valid only while ariaInvalid is true. */
|
|
2914
3012
|
ariaErrorMessage?: string;
|
|
3013
|
+
/**
|
|
3014
|
+
* Id of the field's label. Names the `cards` / `radio` / `segmented` group
|
|
3015
|
+
* (`aria-labelledby`), which a `<label for>` cannot. The select trigger is a
|
|
3016
|
+
* labelable button and keeps its name from the label's `for`.
|
|
3017
|
+
*/
|
|
3018
|
+
ariaLabelledBy?: string;
|
|
2915
3019
|
className?: string;
|
|
2916
3020
|
/**
|
|
2917
3021
|
* When `true`, prepend an "All" item (label customizable via
|
|
@@ -2920,33 +3024,26 @@ interface EnumPickerProps {
|
|
|
2920
3024
|
* valid state. Defaults to `false` so existing form-input call sites
|
|
2921
3025
|
* (where the value is required) keep their old behavior.
|
|
2922
3026
|
*
|
|
2923
|
-
*
|
|
2924
|
-
*
|
|
3027
|
+
* Only honored by the `select` control. The other controls clear through
|
|
3028
|
+
* their "None" option, shown whenever `required` is not set.
|
|
2925
3029
|
*/
|
|
2926
3030
|
clearable?: boolean;
|
|
2927
3031
|
/** Label for the clear item. Defaults to "All". */
|
|
2928
3032
|
clearLabel?: string;
|
|
2929
3033
|
}
|
|
2930
3034
|
/**
|
|
2931
|
-
* Single picker primitive that renders enum values
|
|
2932
|
-
*
|
|
3035
|
+
* Single picker primitive that renders enum values with one of the
|
|
3036
|
+
* `EnumControl`s: a Select (default), bordered cards (`control='cards'`), a
|
|
3037
|
+
* compact radio list (`control='radio'`), or a segmented control
|
|
3038
|
+
* (`control='segmented'`). The three non-select controls are the shared
|
|
3039
|
+
* `EnumChoiceGroup`; this component only resolves the options (label, icon,
|
|
3040
|
+
* value summary) from the registered enum.
|
|
2933
3041
|
*
|
|
2934
3042
|
* Falls back to a disabled placeholder when the enum is not registered —
|
|
2935
3043
|
* matches the EnumBadge fallback policy: a half-shipped enum should not
|
|
2936
3044
|
* crash the form.
|
|
2937
|
-
*
|
|
2938
|
-
* The radio mode uses native HTML `<input type="radio">` rather than
|
|
2939
|
-
* pulling `@radix-ui/react-radio-group` into the bundle: the playground
|
|
2940
|
-
* doesn't need keyboard-focus arrow-key navigation in v1, and the dep
|
|
2941
|
-
* footprint is real (~6kB gzipped). If a future fire needs the richer
|
|
2942
|
-
* keyboard semantics, swap the `<input>` markup for the radix primitive
|
|
2943
|
-
* — the props API stays the same.
|
|
2944
|
-
*
|
|
2945
|
-
* Segmented mode renders a row of buttons styled like the Tabs primitive
|
|
2946
|
-
* but acts as a single-select control (one button is `aria-pressed=true`
|
|
2947
|
-
* at a time).
|
|
2948
3045
|
*/
|
|
2949
|
-
declare function EnumPicker({ enumName, value, onChange,
|
|
3046
|
+
declare function EnumPicker<const N extends string = string>({ enumName: enumInput, value, onChange, control, name, id, testid, placeholder, disabled, required, ariaInvalid, ariaDescribedBy, ariaErrorMessage, ariaLabelledBy, className, clearable, clearLabel }: EnumPickerProps<N>): React$1.ReactElement;
|
|
2950
3047
|
//#endregion
|
|
2951
3048
|
//#region src/primitives/button.d.ts
|
|
2952
3049
|
declare const buttonVariants: (props?: ({
|
|
@@ -2959,8 +3056,9 @@ interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, V
|
|
|
2959
3056
|
declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
2960
3057
|
//#endregion
|
|
2961
3058
|
//#region src/actions/action-button.d.ts
|
|
2962
|
-
interface ActionButtonProps {
|
|
2963
|
-
|
|
3059
|
+
interface ActionButtonProps<N extends string = string> {
|
|
3060
|
+
/** A name checked against the registered resources, or the entity ref. */
|
|
3061
|
+
resource: ResourceNameOrRef<N>;
|
|
2964
3062
|
actionName: string;
|
|
2965
3063
|
record?: {
|
|
2966
3064
|
id: string;
|
|
@@ -3009,6 +3107,16 @@ interface ActionButtonProps {
|
|
|
3009
3107
|
* Destructive actions get destructive item styling.
|
|
3010
3108
|
*/
|
|
3011
3109
|
asMenuItem?: boolean;
|
|
3110
|
+
/**
|
|
3111
|
+
* The sources of the screen the button is drawn on (a record screen's header or frame:
|
|
3112
|
+
* `FormController.sources`), which the action's `when` reads before its own `record`, `scope`,
|
|
3113
|
+
* `user` and `route` (T4 D9 part 4: the screen's win where both have one, except `record`,
|
|
3114
|
+
* which stays the action's own unprojected row; the action's fill the rest). The screen loads
|
|
3115
|
+
* what its item actions' `when`s read (its show and edit demand them), never waiting on it. Absent in
|
|
3116
|
+
* a record's menu: a `when` there reads the action's own four only, and a ref to any other
|
|
3117
|
+
* source leaves it undecided, which hides the action.
|
|
3118
|
+
*/
|
|
3119
|
+
sources?: ScreenSources;
|
|
3012
3120
|
}
|
|
3013
3121
|
/**
|
|
3014
3122
|
* A denial the rule asked to SHOW.
|
|
@@ -3031,7 +3139,7 @@ interface ActionButtonProps {
|
|
|
3031
3139
|
* toast-on-click behaviour, and copying it into app code would fork the one
|
|
3032
3140
|
* place accessibility for a denied action is decided.
|
|
3033
3141
|
*/
|
|
3034
|
-
interface DisabledActionProps {
|
|
3142
|
+
interface DisabledActionProps<N extends string = string> {
|
|
3035
3143
|
reason?: string;
|
|
3036
3144
|
label: React.ReactNode;
|
|
3037
3145
|
icon?: string;
|
|
@@ -3046,7 +3154,7 @@ interface DisabledActionProps {
|
|
|
3046
3154
|
* same way the record form's field-lock reason is scoped, so a resource can
|
|
3047
3155
|
* override the generic wording via `resources.<res>.<key>`.
|
|
3048
3156
|
*/
|
|
3049
|
-
resource?:
|
|
3157
|
+
resource?: ResourceNameOrRef<N>;
|
|
3050
3158
|
/**
|
|
3051
3159
|
* Density for the STANDALONE control (ignored for `asMenuItem`, which is
|
|
3052
3160
|
* always icon + label). Defaults to `'regular'`, so every caller that
|
|
@@ -3065,12 +3173,12 @@ interface DisabledActionProps {
|
|
|
3065
3173
|
/** Surface name, for the same no-icon warning key `resolveControlChrome` keys on. */
|
|
3066
3174
|
surface?: string;
|
|
3067
3175
|
}
|
|
3068
|
-
declare function DisabledAction({ reason, label, icon, testid, size, variant, className, asMenuItem, resource, density, actionName, surface }: DisabledActionProps): React.ReactElement;
|
|
3069
|
-
declare function ActionButton(
|
|
3176
|
+
declare function DisabledAction<const N extends string = string>({ reason, label, icon, testid, size, variant, className, asMenuItem, resource: resourceInput, density, actionName, surface }: DisabledActionProps<N>): React.ReactElement;
|
|
3177
|
+
declare function ActionButton<const N extends string = string>(input: ActionButtonProps<N>): React.ReactElement | null;
|
|
3070
3178
|
//#endregion
|
|
3071
3179
|
//#region src/actions/action-overflow.d.ts
|
|
3072
|
-
interface ActionOverflowProps {
|
|
3073
|
-
resource:
|
|
3180
|
+
interface ActionOverflowProps<N extends string = string> {
|
|
3181
|
+
resource: ResourceNameOrRef<N>;
|
|
3074
3182
|
record: {
|
|
3075
3183
|
id: string;
|
|
3076
3184
|
} & Record<string, unknown>;
|
|
@@ -3091,6 +3199,14 @@ interface ActionOverflowProps {
|
|
|
3091
3199
|
* control wide. Default: {@link RowActionsCollapseContext}.
|
|
3092
3200
|
*/
|
|
3093
3201
|
collapse?: boolean;
|
|
3202
|
+
/**
|
|
3203
|
+
* The sources of the screen the actions are drawn on (a record screen's header or frame:
|
|
3204
|
+
* `FormController.sources`): an action's `when` reads them besides `record` (T4 D9 part 4). The
|
|
3205
|
+
* screen loads what its item actions' `when`s read (its show and edit demand them), so a `with`
|
|
3206
|
+
* source no node reads still decides here. Absent in a record's menu (a row, an overlay's item
|
|
3207
|
+
* menu): a `when` there reads `record` only, and a ref to any other source hides the action.
|
|
3208
|
+
*/
|
|
3209
|
+
sources?: ScreenSources;
|
|
3094
3210
|
}
|
|
3095
3211
|
/**
|
|
3096
3212
|
* Collapses an entity's actions into an overflow menu so tables and detail
|
|
@@ -3109,7 +3225,7 @@ interface ActionOverflowProps {
|
|
|
3109
3225
|
* `ghost` used to strip a destructive standalone action of its destructive
|
|
3110
3226
|
* look.
|
|
3111
3227
|
*/
|
|
3112
|
-
declare function ActionOverflow({ resource, record, surface, className, hideFlows, collapse }: ActionOverflowProps): React.ReactElement | null;
|
|
3228
|
+
declare function ActionOverflow<const N extends string = string>({ resource: resourceInput, record, surface, className, hideFlows, collapse, sources }: ActionOverflowProps<N>): React.ReactElement | null;
|
|
3113
3229
|
//#endregion
|
|
3114
3230
|
//#region src/actions/action-surface.d.ts
|
|
3115
3231
|
/**
|
|
@@ -3126,8 +3242,8 @@ type ActionSurface = 'row' | 'show' | 'edit' | 'list';
|
|
|
3126
3242
|
type BulkRecord = {
|
|
3127
3243
|
id: string;
|
|
3128
3244
|
} & Record<string, unknown>;
|
|
3129
|
-
interface BulkActionToolbarProps<TRecord extends BulkRecord = BulkRecord> {
|
|
3130
|
-
resource:
|
|
3245
|
+
interface BulkActionToolbarProps<TRecord extends BulkRecord = BulkRecord, N extends string = string> {
|
|
3246
|
+
resource: ResourceNameOrRef<N>;
|
|
3131
3247
|
/**
|
|
3132
3248
|
* TanStack table instance from the surrounding `<ResourceList>`. Used only
|
|
3133
3249
|
* as a FALLBACK, for standalone call sites that have no accumulated set of
|
|
@@ -3171,12 +3287,18 @@ interface BulkActionToolbarProps<TRecord extends BulkRecord = BulkRecord> {
|
|
|
3171
3287
|
visibleColumns?: readonly string[];
|
|
3172
3288
|
/** How the built-in bulk Export reads the resource: the scope of the list the ids came from. */
|
|
3173
3289
|
scope?: ScopeSource;
|
|
3290
|
+
/**
|
|
3291
|
+
* The bar's controls in place of the resource's bulk actions and the built-in Export (a link
|
|
3292
|
+
* panel's Detach). The count and Clear stay.
|
|
3293
|
+
*/
|
|
3294
|
+
actions?: React.ReactNode;
|
|
3174
3295
|
}
|
|
3175
|
-
declare function BulkActionToolbar<TRecord extends BulkRecord = BulkRecord>({ resource, table, selectedRecords, selectedIds, onClearSelection, onSelectionChange, className, visibleColumns, scope }: BulkActionToolbarProps<TRecord>): React.ReactElement | null;
|
|
3296
|
+
declare function BulkActionToolbar<TRecord extends BulkRecord = BulkRecord, const N extends string = string>({ resource: resourceInput, table, selectedRecords, selectedIds, onClearSelection, onSelectionChange, className, visibleColumns, scope, actions }: BulkActionToolbarProps<TRecord, N>): React.ReactElement | null;
|
|
3176
3297
|
//#endregion
|
|
3177
3298
|
//#region src/flows/flow-action-button.d.ts
|
|
3178
|
-
interface FlowActionButtonProps {
|
|
3179
|
-
|
|
3299
|
+
interface FlowActionButtonProps<N extends string = string> {
|
|
3300
|
+
/** A name checked against the registered resources, or the entity ref. */
|
|
3301
|
+
readonly resource: ResourceNameOrRef<N>;
|
|
3180
3302
|
/** The flow's name in the resource's `actions`. */
|
|
3181
3303
|
readonly actionName: string;
|
|
3182
3304
|
readonly record?: {
|
|
@@ -3199,7 +3321,7 @@ interface FlowActionButtonProps {
|
|
|
3199
3321
|
* sources load then: until it has decided, the control is busy and a second click does nothing,
|
|
3200
3322
|
* so one click sends at most once.
|
|
3201
3323
|
*/
|
|
3202
|
-
declare function FlowActionButton(
|
|
3324
|
+
declare function FlowActionButton<const N extends string = string>(input: FlowActionButtonProps<N>): ReactElement | null;
|
|
3203
3325
|
//#endregion
|
|
3204
3326
|
//#region src/flows/app-flow-button.d.ts
|
|
3205
3327
|
interface AppFlowButtonProps {
|
|
@@ -3251,6 +3373,11 @@ interface CheckConfirmDialogProps {
|
|
|
3251
3373
|
* the old dialog's `confirmLabel` did.
|
|
3252
3374
|
*/
|
|
3253
3375
|
readonly proceedLabel?: ReactNode;
|
|
3376
|
+
/**
|
|
3377
|
+
* Overrides the neutral `checks.back` label on the cancelling button: a flow's own `dismiss`
|
|
3378
|
+
* ("Keep the order"), the word every cancel button of that flow says.
|
|
3379
|
+
*/
|
|
3380
|
+
readonly cancelLabel?: ReactNode;
|
|
3254
3381
|
/**
|
|
3255
3382
|
* `'destructive'` styles the confirming button destructively — restoring
|
|
3256
3383
|
* what `action.variant === 'destructive'` used to produce. Default
|
|
@@ -3271,7 +3398,7 @@ interface CheckConfirmDialogProps {
|
|
|
3271
3398
|
* is removed here too so a blocked user is never offered a button that does
|
|
3272
3399
|
* nothing.
|
|
3273
3400
|
*/
|
|
3274
|
-
declare function CheckConfirmDialog({ state, testid, onAnchorFocus, title, proceedLabel, tone }: CheckConfirmDialogProps): ReactElement;
|
|
3401
|
+
declare function CheckConfirmDialog({ state, testid, onAnchorFocus, title, proceedLabel, cancelLabel, tone }: CheckConfirmDialogProps): ReactElement;
|
|
3275
3402
|
//#endregion
|
|
3276
3403
|
//#region src/data-table/use-buro-data-table.d.ts
|
|
3277
3404
|
/**
|
|
@@ -3508,9 +3635,26 @@ interface FacetedFilterOption {
|
|
|
3508
3635
|
icon?: React.ComponentType<{
|
|
3509
3636
|
className?: string;
|
|
3510
3637
|
}>;
|
|
3638
|
+
/** Optional secondary line drawn under the label (an option filter's `doc.summary`). */
|
|
3639
|
+
summary?: string;
|
|
3511
3640
|
}
|
|
3512
|
-
|
|
3513
|
-
|
|
3641
|
+
/**
|
|
3642
|
+
* The column-free multi-select under {@link DataTableFacetedFilter}: the selection is a plain
|
|
3643
|
+
* list of option values the caller owns. Anything that is not a table column mounts it directly:
|
|
3644
|
+
* an option filter of a list (T4 D3) drives it from `filters.presets`, a scope dimension picker
|
|
3645
|
+
* from the dimension's selection.
|
|
3646
|
+
*/
|
|
3647
|
+
interface FacetedFilterPickerProps {
|
|
3648
|
+
/** The selected option values. */
|
|
3649
|
+
selected: readonly string[];
|
|
3650
|
+
/** Called with the whole next selection (empty for Clear or the last deselect). */
|
|
3651
|
+
onChange: (next: string[]) => void;
|
|
3652
|
+
/** A hint for the control: the trigger's tooltip and a line at the top of the popover. */
|
|
3653
|
+
hint?: string;
|
|
3654
|
+
/** Shown beside the title while nothing is selected, e.g. "All". */
|
|
3655
|
+
emptyLabel?: string;
|
|
3656
|
+
/** Whether the footer offers to clear the selection. Default `true`. */
|
|
3657
|
+
clearable?: boolean;
|
|
3514
3658
|
title: string;
|
|
3515
3659
|
options?: FacetedFilterOption[];
|
|
3516
3660
|
/**
|
|
@@ -3538,11 +3682,20 @@ interface DataTableFacetedFilterProps<TData, TValue> {
|
|
|
3538
3682
|
* 'search' → the cmdk search input
|
|
3539
3683
|
* 'option' → option item (value passed as second arg)
|
|
3540
3684
|
* 'clear' → the Clear-filters footer item
|
|
3685
|
+
* 'hint' → the hint line at the top of the popover
|
|
3541
3686
|
*/
|
|
3542
|
-
getTestId?: (role: 'trigger' | 'option' | 'clear' | 'search', value?: string) => string | undefined;
|
|
3687
|
+
getTestId?: (role: 'trigger' | 'option' | 'clear' | 'search' | 'hint', value?: string) => string | undefined;
|
|
3543
3688
|
className?: string;
|
|
3544
3689
|
}
|
|
3545
|
-
|
|
3690
|
+
interface DataTableFacetedFilterProps<TData, TValue> extends Omit<FacetedFilterPickerProps, 'selected' | 'onChange' | 'hint' | 'getTestId'> {
|
|
3691
|
+
column: Column<TData, TValue>;
|
|
3692
|
+
/** As `FacetedFilterPickerProps.getTestId`, without `'hint'`: a column filter has no hint. */
|
|
3693
|
+
getTestId?: (role: 'trigger' | 'option' | 'clear' | 'search', value?: string) => string | undefined;
|
|
3694
|
+
}
|
|
3695
|
+
/** A faceted filter bound to a TanStack column: the column's filter value is the selection. */
|
|
3696
|
+
declare function DataTableFacetedFilter<TData, TValue>({ column, getTestId, ...rest }: DataTableFacetedFilterProps<TData, TValue>): React.ReactElement;
|
|
3697
|
+
/** The picker behind `DataTableFacetedFilter`, controlled by a plain selection. */
|
|
3698
|
+
declare function FacetedFilterPicker({ title, options, loadOptions, selectedLabelFor, searchPlaceholder, emptyText, getTestId, className, selected: selectedList, onChange, hint, emptyLabel, clearable }: FacetedFilterPickerProps): React.ReactElement;
|
|
3546
3699
|
//#endregion
|
|
3547
3700
|
//#region src/data-table/data-table-text-filter.d.ts
|
|
3548
3701
|
/**
|
|
@@ -3694,7 +3847,7 @@ interface DataTableOperatorFilterProps<TData, TValue> {
|
|
|
3694
3847
|
* an adopter can override per-locale via composition rather than
|
|
3695
3848
|
* patching this file.
|
|
3696
3849
|
*/
|
|
3697
|
-
declare function formatOperatorLabel(op: FilterOperator,
|
|
3850
|
+
declare function formatOperatorLabel(op: FilterOperator, chromeT?: (key: string, opts?: {
|
|
3698
3851
|
defaultValue?: string;
|
|
3699
3852
|
}) => string): string;
|
|
3700
3853
|
declare function DataTableOperatorFilter<TData, TValue>({ column, operators, defaultOperator, valueKind, getTestId, className }: DataTableOperatorFilterProps<TData, TValue>): React.ReactElement;
|
|
@@ -3906,20 +4059,14 @@ declare function DataTableToolbar<TData>({ table, searchColumnId, searchPlacehol
|
|
|
3906
4059
|
* once per character. Re-syncs from the external `value` when it changes
|
|
3907
4060
|
* (deep-link / saved view / clear-all).
|
|
3908
4061
|
*/
|
|
3909
|
-
declare function ListSearchInput({ resource
|
|
3910
|
-
resource:
|
|
3911
|
-
label: string;
|
|
4062
|
+
declare function ListSearchInput<const N extends string = string>({ resource: resourceInput, value, onCommit, placeholder }: {
|
|
4063
|
+
resource: ResourceNameOrRef<N>;
|
|
3912
4064
|
value: string;
|
|
3913
4065
|
onCommit: (next: string) => void;
|
|
3914
4066
|
/**
|
|
3915
|
-
* Override the placeholder. The default
|
|
3916
|
-
*
|
|
3917
|
-
*
|
|
3918
|
-
* repo passes an explicit `placeholder` instead of relying on this
|
|
3919
|
-
* default: `<ResourceListPage>` distinguishes a declarative
|
|
3920
|
-
* `views.list.search` (names its first field) from a resolver (generic
|
|
3921
|
-
* `list.search` label, since the framework cannot know what a resolver
|
|
3922
|
-
* matches), and a `related-list` placement names its own search field.
|
|
4067
|
+
* Override the placeholder. The default is the kit's `list.search` ("Search"):
|
|
4068
|
+
* a plain word that promises nothing about HOW the query is matched and
|
|
4069
|
+
* names no field, because the framework cannot know what the search matches.
|
|
3923
4070
|
*/
|
|
3924
4071
|
placeholder?: string;
|
|
3925
4072
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3954,8 +4101,8 @@ declare function ListSearchInput({ resource, label, value, onCommit, placeholder
|
|
|
3954
4101
|
* label "Columns" with no icon, popover `align="start" w-64 p-2`
|
|
3955
4102
|
* with no header.
|
|
3956
4103
|
*/
|
|
3957
|
-
declare function ColumnsToggle({ resource, def, allAvailable, required, visibleColumns, defaultVisible, onChange, onResetSizes, onRestoreDefaults }: {
|
|
3958
|
-
resource:
|
|
4104
|
+
declare function ColumnsToggle<const N extends string = string>({ resource: resourceInput, def, allAvailable, required, visibleColumns, defaultVisible, onChange, onResetSizes, onRestoreDefaults }: {
|
|
4105
|
+
resource: ResourceNameOrRef<N>;
|
|
3959
4106
|
def: ResourceDef;
|
|
3960
4107
|
allAvailable: string[];
|
|
3961
4108
|
required: string[];
|
|
@@ -4004,8 +4151,8 @@ declare const ListSavedViews: () => ReactElement | null;
|
|
|
4004
4151
|
type RowRecord$1 = {
|
|
4005
4152
|
id: string;
|
|
4006
4153
|
} & Record<string, unknown>;
|
|
4007
|
-
interface ResourceListProps {
|
|
4008
|
-
resource:
|
|
4154
|
+
interface ResourceListProps<N extends string = string> {
|
|
4155
|
+
resource: ResourceNameOrRef<N>;
|
|
4009
4156
|
data?: RowRecord$1[];
|
|
4010
4157
|
total?: number;
|
|
4011
4158
|
page?: number;
|
|
@@ -4059,9 +4206,11 @@ interface ResourceListProps {
|
|
|
4059
4206
|
selectable?: boolean;
|
|
4060
4207
|
/**
|
|
4061
4208
|
* The row-actions column (each row's item actions). `false` draws none: a read-only list
|
|
4062
|
-
* offers nothing to do with a row but open it.
|
|
4209
|
+
* offers nothing to do with a row but open it. A function draws its own controls in the column
|
|
4210
|
+
* instead of the item actions (a link panel's Detach); keep its identity stable, the columns
|
|
4211
|
+
* are rebuilt when it changes.
|
|
4063
4212
|
*/
|
|
4064
|
-
rowActions?: boolean;
|
|
4213
|
+
rowActions?: boolean | ((row: RowRecord$1) => React.ReactNode);
|
|
4065
4214
|
/**
|
|
4066
4215
|
* Accumulating selection owned by the caller. When provided the component
|
|
4067
4216
|
* is CONTROLLED: this is the WHOLE selected set (ids that are not on the
|
|
@@ -4099,7 +4248,12 @@ interface ResourceListProps {
|
|
|
4099
4248
|
createHref?: string;
|
|
4100
4249
|
/** Whether the list is currently filtered (changes empty-state copy). */
|
|
4101
4250
|
isFiltered?: boolean;
|
|
4102
|
-
/**
|
|
4251
|
+
/**
|
|
4252
|
+
* Called when the user clicks the "Clear filter" button in the empty state. The button is drawn
|
|
4253
|
+
* exactly when this is given: the caller decides whether there is anything to reset (a list
|
|
4254
|
+
* that starts filtered has rows narrowed and nothing to reset). `isFiltered` only picks the
|
|
4255
|
+
* wording.
|
|
4256
|
+
*/
|
|
4103
4257
|
onClearFilter?: () => void;
|
|
4104
4258
|
/**
|
|
4105
4259
|
* Replacement for the "no rows" rendering, forwarded to
|
|
@@ -4178,6 +4332,13 @@ interface ResourceListProps {
|
|
|
4178
4332
|
* honour an explicit direction and fall back to toggling when it's undefined.
|
|
4179
4333
|
*/
|
|
4180
4334
|
onSort?: (field: string, direction?: 'asc' | 'desc' | null) => void;
|
|
4335
|
+
/**
|
|
4336
|
+
* Whether a column offers sort (T4 D7). The list kit passes the controller's
|
|
4337
|
+
* `sorting.sortable`; when omitted, core's `isColumnSortable` decides — nothing sorts by
|
|
4338
|
+
* default, a field's `sort` or the app's `lists.sortable` turns a column on, and a link never
|
|
4339
|
+
* sorts. A column offers sort only when this says yes AND `onSort` is supplied.
|
|
4340
|
+
*/
|
|
4341
|
+
sortable?: (column: string) => boolean;
|
|
4181
4342
|
/**
|
|
4182
4343
|
* Hide a column from a column-header menu. Receives the column name; the
|
|
4183
4344
|
* parent removes it from the visible-columns list. When omitted, the header
|
|
@@ -4207,6 +4368,24 @@ interface ResourceListProps {
|
|
|
4207
4368
|
* `views.list.optionalColumns` / `requiredColumns`).
|
|
4208
4369
|
*/
|
|
4209
4370
|
columns?: string[];
|
|
4371
|
+
/**
|
|
4372
|
+
* Each data column's resolved presentation by name (REF-117 §4.9, P10): its width (`default`,
|
|
4373
|
+
* `min`, `max`), whether it resizes, its alignment, and its cell display (implementation,
|
|
4374
|
+
* params, transform, overflow). The list controller's `columns.ui`, which `ListBody` passes.
|
|
4375
|
+
* A column it does not cover, or every column when it is omitted (a standalone mount),
|
|
4376
|
+
* resolves here with core's `resolveColumnUi` over its field and its `views.list` entry, so
|
|
4377
|
+
* a field's `ui.column` holds either way. A width is a default, not a floor: the floor is
|
|
4378
|
+
* `min` (C13).
|
|
4379
|
+
*/
|
|
4380
|
+
columnUi?: Readonly<Record<string, ResolvedColumnUi>>;
|
|
4381
|
+
/**
|
|
4382
|
+
* Where the user's column layout (widths, order, pinning) is stored: the list id of the
|
|
4383
|
+
* `buro/table-layout` UI setting, beside the resource (REF-117 §4.10, C18). The route list passes
|
|
4384
|
+
* `'route'`, a placement `<owner resource>/<placement key path>`. A list rendered by hand passes
|
|
4385
|
+
* its own stable id to keep the layout across mounts; without one, the layout lasts for the mount.
|
|
4386
|
+
* Nothing is stored without a `UiSettingsProvider` either.
|
|
4387
|
+
*/
|
|
4388
|
+
layoutId?: string;
|
|
4210
4389
|
/**
|
|
4211
4390
|
* Optional callback that hands the parent the underlying TanStack
|
|
4212
4391
|
* `Table` instance. Fires once after the table is mounted (and
|
|
@@ -4220,7 +4399,7 @@ interface ResourceListProps {
|
|
|
4220
4399
|
*/
|
|
4221
4400
|
tableRef?: (table: Table$1<RowRecord$1> | null) => void;
|
|
4222
4401
|
}
|
|
4223
|
-
declare function ResourceList({ resource, data, total, page, pageSize, onPageSize, onRequestCount, isCountingRows, pageSizeOptions, onPage, loadMore, selectable, rowActions, selectedIds, onSelectionChange, className, isLoading, error, onRetry, createHref, isFiltered, onClearFilter, emptyState, rowsView, rowHref, rowQuick, rowLinkKey, renderCell, sort, onSort, onHideColumn, requiredColumns, resetLayout, columns: columnsOverride, tableRef }: ResourceListProps): React.ReactElement;
|
|
4402
|
+
declare function ResourceList<const N extends string = string>({ resource: resourceInput, data, total, page, pageSize, onPageSize, onRequestCount, isCountingRows, pageSizeOptions, onPage, loadMore, selectable, rowActions, selectedIds, onSelectionChange, className, isLoading, error, onRetry, createHref, isFiltered, onClearFilter, emptyState, rowsView, rowHref, rowQuick, rowLinkKey, renderCell, sort, onSort, sortable, onHideColumn, requiredColumns, resetLayout, columns: columnsOverride, columnUi, layoutId, tableRef }: ResourceListProps<N>): React.ReactElement;
|
|
4224
4403
|
//#endregion
|
|
4225
4404
|
//#region src/list-kit/cursor-load-more.d.ts
|
|
4226
4405
|
/**
|
|
@@ -4279,7 +4458,7 @@ declare function CursorLoadMore({ hasMore, loading, onMore }: CursorLoadMoreProp
|
|
|
4279
4458
|
/**
|
|
4280
4459
|
* Props of {@link ResourceListPage}.
|
|
4281
4460
|
*/
|
|
4282
|
-
interface ResourceListPageProps {
|
|
4461
|
+
interface ResourceListPageProps<N extends string = string> {
|
|
4283
4462
|
/**
|
|
4284
4463
|
* Registry name of the resource to list.
|
|
4285
4464
|
*
|
|
@@ -4289,7 +4468,7 @@ interface ResourceListPageProps {
|
|
|
4289
4468
|
* should 404 before mounting this component (the playground's
|
|
4290
4469
|
* `app/(admin)/[resource]/page.tsx` does exactly that).
|
|
4291
4470
|
*/
|
|
4292
|
-
resource:
|
|
4471
|
+
resource: ResourceNameOrRef<N>;
|
|
4293
4472
|
/**
|
|
4294
4473
|
* Extra `meta` merged into the underlying `useList` call — and therefore
|
|
4295
4474
|
* into the react-query cache key. This is the seam for app-level query
|
|
@@ -4314,10 +4493,10 @@ interface ResourceListPageProps {
|
|
|
4314
4493
|
*/
|
|
4315
4494
|
meta?: Record<string, unknown>;
|
|
4316
4495
|
/**
|
|
4317
|
-
* App-level per-cell renderer, consulted AFTER
|
|
4318
|
-
*
|
|
4319
|
-
*
|
|
4320
|
-
*
|
|
4496
|
+
* App-level per-cell renderer, consulted AFTER a typed resource's
|
|
4497
|
+
* discriminator badge and BEFORE the declared-`enum` badge and
|
|
4498
|
+
* `<ResourceList>`'s default field-type display. Return `undefined` to
|
|
4499
|
+
* fall through, exactly like `<ResourceList renderCell>`.
|
|
4321
4500
|
*
|
|
4322
4501
|
* The built-ins cover what the registry can describe on its own; this
|
|
4323
4502
|
* prop is for the rest — the playground uses it for a legacy hardcoded
|
|
@@ -4391,9 +4570,10 @@ interface ResourceListPageProps {
|
|
|
4391
4570
|
* covers:
|
|
4392
4571
|
*
|
|
4393
4572
|
* - **`list.cell.<resource>`** (level 1) is consulted for every cell, AFTER
|
|
4394
|
-
*
|
|
4395
|
-
*
|
|
4396
|
-
* display
|
|
4573
|
+
* a typed resource's discriminator badge and BEFORE the declared-`enum`
|
|
4574
|
+
* badge and `<ResourceList>`'s default field-type display (a field with
|
|
4575
|
+
* its own `ui.display` skips the enum badge) — the same position the
|
|
4576
|
+
* `renderCell` prop occupies, and the
|
|
4397
4577
|
* explicit prop wins when both are present. Everything else — filters,
|
|
4398
4578
|
* saved views, the columns menu, the table, pagination — stays standard.
|
|
4399
4579
|
* - **`list.filters.<resource>`** (level 2) replaces the filter region —
|
|
@@ -4414,13 +4594,14 @@ interface ResourceListPageProps {
|
|
|
4414
4594
|
*
|
|
4415
4595
|
* @see docs/superpowers/plans/2026-07-26-cfb3-assembled-page-slots.md — Tasks B3.1, B3.2
|
|
4416
4596
|
*/
|
|
4417
|
-
declare function ResourceListPage({ resource, meta, renderCell, emptyState }: ResourceListPageProps): import("react/jsx-runtime").JSX.Element;
|
|
4597
|
+
declare function ResourceListPage<const N extends string = string>({ resource: resourceInput, meta, renderCell, emptyState }: ResourceListPageProps<N>): import("react/jsx-runtime").JSX.Element;
|
|
4418
4598
|
//#endregion
|
|
4419
4599
|
//#region src/list-kit/filter-builder/filter-region.d.ts
|
|
4420
4600
|
/**
|
|
4421
|
-
* The default `list.filters.<resource>` content — search box,
|
|
4422
|
-
* controls, the builder popover trigger, applied-filter badges and a
|
|
4423
|
-
* "Clear
|
|
4601
|
+
* The default `list.filters.<resource>` content — search box, option
|
|
4602
|
+
* pickers, pinned controls, the builder popover trigger, applied-filter badges and a
|
|
4603
|
+
* "Clear filters" action (shown while `filters.canReset`, which returns the list to its initial
|
|
4604
|
+
* state), left to right. Props-free: like every list slot, it
|
|
4424
4605
|
* reads the live controller from `useResourceListContext()` rather than a
|
|
4425
4606
|
* prop chain, which is the SAME contract a registered
|
|
4426
4607
|
* `list.filters.<resource>` slot fulfils — an adopter that wants a
|
|
@@ -4429,7 +4610,7 @@ declare function ResourceListPage({ resource, meta, renderCell, emptyState }: Re
|
|
|
4429
4610
|
* exported) into its own region instead of forking this file.
|
|
4430
4611
|
*
|
|
4431
4612
|
* A THIN wrapper: everything that needs the list controller (the search
|
|
4432
|
-
* box, its placeholder, "Clear
|
|
4613
|
+
* box, its placeholder, "Clear filters") stays here — that's the page's
|
|
4433
4614
|
* concern, not the builder's — and everything else (the pinned controls,
|
|
4434
4615
|
* the panel, the badges, and the `open`/`focusPath`/`externalRemoval`
|
|
4435
4616
|
* wiring between them) is `<FilterBuilder>`'s job, which has no controller
|
|
@@ -4458,6 +4639,13 @@ interface FilterBuilderProps {
|
|
|
4458
4639
|
readonly pinnedFields?: readonly FilterFieldSpec[];
|
|
4459
4640
|
readonly pinnedValue?: readonly Expression$2[];
|
|
4460
4641
|
readonly setPinnedValue?: (next: readonly Expression$2[]) => void;
|
|
4642
|
+
/**
|
|
4643
|
+
* The list's option filters (`filters.presets`), drawn as faceted pickers before the pinned
|
|
4644
|
+
* controls. Absent where there are none (the relation picker's dialog).
|
|
4645
|
+
*/
|
|
4646
|
+
readonly presets?: readonly ListOptionFilter[];
|
|
4647
|
+
/** `filters.setPreset`: it resets the page itself, so no `setPage(1)` is composed here. */
|
|
4648
|
+
readonly setPreset?: (id: string, optionIds: readonly string[]) => void;
|
|
4461
4649
|
/** Apply / a pinned write / a badge × all reset to page 1, same as every other filter mutation. */
|
|
4462
4650
|
readonly setPage: (page: number) => void;
|
|
4463
4651
|
readonly testIdBase: string;
|
|
@@ -4632,33 +4820,6 @@ interface FilterBadgesProps {
|
|
|
4632
4820
|
readonly pinnedValue?: readonly Expression$1[];
|
|
4633
4821
|
readonly setPinnedValue?: (next: readonly Expression$1[]) => void;
|
|
4634
4822
|
}
|
|
4635
|
-
/**
|
|
4636
|
-
* One badge per top-level row of the APPLIED filter group, plus one per
|
|
4637
|
-
* `filters.fixed` entry that carries a `label`, plus one per PINNED-slot
|
|
4638
|
-
* expression no `pinnedFields` control claims (finding 3, see `pinnedValue`
|
|
4639
|
-
* above).
|
|
4640
|
-
*
|
|
4641
|
-
* Group-row badges have two very different click targets:
|
|
4642
|
-
* - the × removes that row and calls `setGroup` IMMEDIATELY, bypassing the
|
|
4643
|
-
* panel's draft entirely — this is a deletion, not an edit, and making
|
|
4644
|
-
* the user re-open the panel and press "Apply" to confirm a removal they
|
|
4645
|
-
* already committed to would be a broken expectation;
|
|
4646
|
-
* - the body opens the panel with `focusPath` pointing at this row, for a
|
|
4647
|
-
* user who wants to ADJUST rather than remove it. It is a real
|
|
4648
|
-
* `<button>` (finding 6 of the SP2 final review — it used to be a plain
|
|
4649
|
-
* `<div onClick>`, reachable and activatable only by mouse), so it picks
|
|
4650
|
-
* up keyboard focus, Enter/Space activation, and a browser-native
|
|
4651
|
-
* accessible name (its own text — the `describeRow` summary — same as
|
|
4652
|
-
* any other button whose label IS its content) for free. It sits beside
|
|
4653
|
-
* the × as a SIBLING, not a nested/overlapping hit target, so activating
|
|
4654
|
-
* one never also triggers the other.
|
|
4655
|
-
*
|
|
4656
|
-
* Fixed-filter badges (labelled call-site narrowing) and orphan pinned-slot
|
|
4657
|
-
* badges both render with NO body affordance: fixed badges because the
|
|
4658
|
-
* user did not add them and cannot remove them; pinned-slot badges because
|
|
4659
|
-
* there is no builder row behind them to focus — only a working × to
|
|
4660
|
-
* remove that one expression from the pinned slot.
|
|
4661
|
-
*/
|
|
4662
4823
|
declare function FilterBadges(props: FilterBadgesProps): React.ReactElement;
|
|
4663
4824
|
//#endregion
|
|
4664
4825
|
//#region src/list-kit/filter-builder/pinned-filter-controls.d.ts
|
|
@@ -4704,6 +4865,28 @@ interface PinnedFilterControlsProps {
|
|
|
4704
4865
|
*/
|
|
4705
4866
|
declare function PinnedFilterControls(props: PinnedFilterControlsProps): React.ReactElement;
|
|
4706
4867
|
//#endregion
|
|
4868
|
+
//#region src/list-kit/filter-builder/preset-filter-controls.d.ts
|
|
4869
|
+
interface PresetFilterControlsProps {
|
|
4870
|
+
/** The list's option filters (`filters.presets`). */
|
|
4871
|
+
readonly presets: readonly ListOptionFilter[];
|
|
4872
|
+
/**
|
|
4873
|
+
* `filters.setPreset`: it writes the whole selection of one filter and resets the page to 1
|
|
4874
|
+
* itself, so this component does not.
|
|
4875
|
+
*/
|
|
4876
|
+
readonly setPreset: (id: string, optionIds: readonly string[]) => void;
|
|
4877
|
+
readonly testIdBase: string;
|
|
4878
|
+
}
|
|
4879
|
+
/**
|
|
4880
|
+
* One faceted multi-select per option filter (T4 D3, D4): the filter's label is the trigger, its
|
|
4881
|
+
* `doc.summary` the hint, each option shows its label with its `doc.summary` under it. The
|
|
4882
|
+
* trigger doubles as the chip: it lists the selected options, and deselecting the last one (or
|
|
4883
|
+
* the picker's own Clear) writes an empty selection, which the URL keeps as `?<ns>.<id>=` so a
|
|
4884
|
+
* reload keeps the initial option removed.
|
|
4885
|
+
*
|
|
4886
|
+
* Test ids: `<base>:preset:<id>:trigger | :option:<optionId> | :clear | :search | :hint`.
|
|
4887
|
+
*/
|
|
4888
|
+
declare function PresetFilterControls(props: PresetFilterControlsProps): React.ReactElement;
|
|
4889
|
+
//#endregion
|
|
4707
4890
|
//#region src/list-kit/filter-builder/values/filter-value-control.d.ts
|
|
4708
4891
|
interface FilterValueControlProps {
|
|
4709
4892
|
readonly kind: FilterKind;
|
|
@@ -4723,7 +4906,9 @@ interface FilterValueControlProps {
|
|
|
4723
4906
|
*/
|
|
4724
4907
|
readonly fieldLabel?: string;
|
|
4725
4908
|
/**
|
|
4726
|
-
* Visible hint inside a text/number box (`ScalarValueInput`)
|
|
4909
|
+
* Visible hint inside a text/number box (`ScalarValueInput`), and the empty
|
|
4910
|
+
* text of a select-like trigger (enum, options, relation, boolean), whose
|
|
4911
|
+
* accessible name stays "Value for <field>". Only a caller
|
|
4727
4912
|
* that shows the control with nothing naming its field beside it passes one:
|
|
4728
4913
|
* the pinned toolbar (`PinnedFilterControls`) gives the field's label, so a
|
|
4729
4914
|
* pinned text filter is not an unlabelled empty box (REF-44). A builder row
|
|
@@ -4917,8 +5102,8 @@ declare function listSlot(region: ListSlotRegion, resource: string): string;
|
|
|
4917
5102
|
* `'filters'` overload's contract is byte-identical to before this
|
|
4918
5103
|
* region existed.
|
|
4919
5104
|
*/
|
|
4920
|
-
declare function useListSlot(region: 'cell', resource:
|
|
4921
|
-
declare function useListSlot(region: 'filters', resource:
|
|
5105
|
+
declare function useListSlot<const N extends string = string>(region: 'cell', resource: ResourceNameOrRef<N>): ListCellRenderer | undefined;
|
|
5106
|
+
declare function useListSlot<const N extends string = string>(region: 'filters', resource: ResourceNameOrRef<N>): ListSlot | undefined;
|
|
4922
5107
|
//#endregion
|
|
4923
5108
|
//#region src/saved-views/saved-views-dropdown.d.ts
|
|
4924
5109
|
/**
|
|
@@ -4965,14 +5150,14 @@ declare function useListSlot(region: 'filters', resource: string): ListSlot | un
|
|
|
4965
5150
|
* dialogs, and `onDeleteEntry`/`onManage` to the delete flow / manage
|
|
4966
5151
|
* dialog.
|
|
4967
5152
|
*/
|
|
4968
|
-
interface SavedViewsDropdownProps {
|
|
5153
|
+
interface SavedViewsDropdownProps<N extends string = string> {
|
|
4969
5154
|
/**
|
|
4970
5155
|
* The resource the views belong to. Declared views (`adopterViews`) read their label from
|
|
4971
5156
|
* `resources.<resource>.savedViews.<id>` in the bundle (that resource's own entry only, never
|
|
4972
5157
|
* `resources._` or `common`); without it they render as declared.
|
|
4973
5158
|
* User-saved `entries` are user data and always render as written.
|
|
4974
5159
|
*/
|
|
4975
|
-
resource?:
|
|
5160
|
+
resource?: ResourceNameOrRef<N>;
|
|
4976
5161
|
/** Adopter-defined views from `def.views.list.savedViews`. Always read-only. */
|
|
4977
5162
|
adopterViews: SavedViewDef[];
|
|
4978
5163
|
/** Adapter-backed entries, WITH scope/permission metadata (Task 9). */
|
|
@@ -5032,14 +5217,12 @@ interface SavedViewsDropdownProps {
|
|
|
5032
5217
|
/** Popover content alignment. Default: 'start'. */
|
|
5033
5218
|
popoverAlign?: 'start' | 'center' | 'end';
|
|
5034
5219
|
}
|
|
5035
|
-
declare function SavedViewsDropdown({ resource, adopterViews, entries, issues, onApply, onSaveCurrent, canSaveCurrent, onManage, onRenameEntry, onDeleteEntry, onForkEntry, canFork, getTestId, triggerLabel, iconOnly, triggerClassName, popoverContentClassName, popoverAlign }: SavedViewsDropdownProps): React.ReactElement;
|
|
5220
|
+
declare function SavedViewsDropdown<const N extends string = string>({ resource: resourceInput, adopterViews, entries, issues, onApply, onSaveCurrent, canSaveCurrent, onManage, onRenameEntry, onDeleteEntry, onForkEntry, canFork, getTestId, triggerLabel, iconOnly, triggerClassName, popoverContentClassName, popoverAlign }: SavedViewsDropdownProps<N>): React.ReactElement;
|
|
5036
5221
|
//#endregion
|
|
5037
5222
|
//#region src/resource/list-error-state.d.ts
|
|
5038
5223
|
interface ListErrorStateProps {
|
|
5039
5224
|
/** Whatever the query threw. */
|
|
5040
|
-
error:
|
|
5041
|
-
message?: string;
|
|
5042
|
-
} | Error;
|
|
5225
|
+
error: unknown;
|
|
5043
5226
|
/** When provided, a Retry button is rendered and calls this. */
|
|
5044
5227
|
onRetry?: () => void;
|
|
5045
5228
|
/** Resource name, used to build the retry button's test id. */
|
|
@@ -5064,12 +5247,14 @@ interface ListErrorStateProps {
|
|
|
5064
5247
|
* When Temporal was briefly down, the only recovery was reloading the page.
|
|
5065
5248
|
*
|
|
5066
5249
|
* A slot author should not have to re-derive an error state the framework
|
|
5067
|
-
* already knows how to render, so this is now shared by both. `
|
|
5068
|
-
*
|
|
5069
|
-
*
|
|
5070
|
-
*
|
|
5250
|
+
* already knows how to render, so this is now shared by both. It is the `list`
|
|
5251
|
+
* surface of `<LoadError>`: the sentence is the error's own text (its code's, its
|
|
5252
|
+
* message reference's), a plain-language sentence for a dead network or an
|
|
5253
|
+
* unavailable service, or `list.errorBody`; an HTTP trace or a thrown message is
|
|
5254
|
+
* never the sentence. The raw text stays reachable under «Details», in
|
|
5255
|
+
* development, for whoever has to file the bug.
|
|
5071
5256
|
*/
|
|
5072
|
-
declare function ListErrorState(
|
|
5257
|
+
declare function ListErrorState(props: ListErrorStateProps): React.ReactElement;
|
|
5073
5258
|
//#endregion
|
|
5074
5259
|
//#region src/resource/record-display-name.d.ts
|
|
5075
5260
|
/**
|
|
@@ -5079,9 +5264,9 @@ declare function ListErrorState({ error, onRetry, resource, title, className }:
|
|
|
5079
5264
|
declare function recordDisplayName(record: Record<string, unknown>, displayField?: string): string;
|
|
5080
5265
|
//#endregion
|
|
5081
5266
|
//#region src/resource/page-header.d.ts
|
|
5082
|
-
interface PageHeaderProps {
|
|
5267
|
+
interface PageHeaderProps<N extends string = string> {
|
|
5083
5268
|
/** Resource name (matches the registry key). Used for back-link target + label resolution. */
|
|
5084
|
-
resource:
|
|
5269
|
+
resource: ResourceNameOrRef<N>;
|
|
5085
5270
|
/**
|
|
5086
5271
|
* Page mode. Drives default title:
|
|
5087
5272
|
* - 'list' → labelPlural
|
|
@@ -5146,13 +5331,13 @@ interface PageHeaderProps {
|
|
|
5146
5331
|
labelOverride?: string;
|
|
5147
5332
|
className?: string;
|
|
5148
5333
|
}
|
|
5149
|
-
declare function PageHeader({ resource, mode, recordName, backHref, backLabel, actions, title, breadcrumbs, backLink, visibleTitle, labelOverride, className }: PageHeaderProps): React.ReactElement | null;
|
|
5334
|
+
declare function PageHeader<const N extends string = string>({ resource: resourceInput, mode, recordName, backHref, backLabel, actions, title, breadcrumbs, backLink, visibleTitle, labelOverride, className }: PageHeaderProps<N>): React.ReactElement | null;
|
|
5150
5335
|
/**
|
|
5151
5336
|
* The show-page `<PageHeader>`: the breadcrumb, the record's title and the resolved
|
|
5152
5337
|
* `<ActionOverflow surface="show">` item-action list, then any `extraActions`.
|
|
5153
5338
|
*/
|
|
5154
|
-
declare function ShowPageHeader({ resource, record, extraActions, breadcrumbs }: {
|
|
5155
|
-
resource:
|
|
5339
|
+
declare function ShowPageHeader<const N extends string = string>({ resource: resourceInput, record, extraActions, breadcrumbs }: {
|
|
5340
|
+
resource: ResourceNameOrRef<N>;
|
|
5156
5341
|
record: {
|
|
5157
5342
|
id: string;
|
|
5158
5343
|
} & Record<string, unknown>;
|
|
@@ -5163,8 +5348,8 @@ declare function ShowPageHeader({ resource, record, extraActions, breadcrumbs }:
|
|
|
5163
5348
|
* The edit-page `<PageHeader>`: the back-link, the record's title and the resolved
|
|
5164
5349
|
* `<ActionOverflow surface="edit">` item-action list.
|
|
5165
5350
|
*/
|
|
5166
|
-
declare function EditPageHeader({ resource, record, backHref, breadcrumbs }: {
|
|
5167
|
-
resource:
|
|
5351
|
+
declare function EditPageHeader<const N extends string = string>({ resource: resourceInput, record, backHref, breadcrumbs }: {
|
|
5352
|
+
resource: ResourceNameOrRef<N>;
|
|
5168
5353
|
record: {
|
|
5169
5354
|
id: string;
|
|
5170
5355
|
} & Record<string, unknown>;
|
|
@@ -5173,9 +5358,9 @@ declare function EditPageHeader({ resource, record, backHref, breadcrumbs }: {
|
|
|
5173
5358
|
}): React.ReactElement;
|
|
5174
5359
|
//#endregion
|
|
5175
5360
|
//#region src/resource/create-button.d.ts
|
|
5176
|
-
interface CreateButtonProps {
|
|
5361
|
+
interface CreateButtonProps<N extends string = string> {
|
|
5177
5362
|
/** Resource this creates. Required — the button gates itself. */
|
|
5178
|
-
resource:
|
|
5363
|
+
resource: ResourceNameOrRef<N>;
|
|
5179
5364
|
/** Target create route, e.g. `resourceCreateHref(def, resource)`. Ignored with `onOpen`. */
|
|
5180
5365
|
href: string;
|
|
5181
5366
|
/**
|
|
@@ -5204,14 +5389,15 @@ interface CreateButtonProps {
|
|
|
5204
5389
|
* nothing for `absent`/`hidden`, a focusable `aria-disabled` control with a
|
|
5205
5390
|
* toast reason for `disabled`, and the normal link for `available`.
|
|
5206
5391
|
*/
|
|
5207
|
-
declare function CreateButton({ resource, href, testid, size, variant, label, className, onOpen }: CreateButtonProps): React.ReactElement | null;
|
|
5392
|
+
declare function CreateButton<const N extends string = string>({ resource: resourceInput, href, testid, size, variant, label, className, onOpen }: CreateButtonProps<N>): React.ReactElement | null;
|
|
5208
5393
|
//#endregion
|
|
5209
5394
|
//#region src/resource/form-context.d.ts
|
|
5210
5395
|
/**
|
|
5211
5396
|
* Minimal form-control handle exposed to field renderers so a field can update
|
|
5212
5397
|
* SIBLING fields (a field renderer otherwise only sees its own value). Used for
|
|
5213
5398
|
* reactive prefills — e.g. picking a product on a GTIN field also fills the
|
|
5214
|
-
* «Product name» / «Code type» fields (#2).
|
|
5399
|
+
* «Product name» / «Code type» fields (#2). Every form host provides it:
|
|
5400
|
+
* `<RecordScreen>`, a flow's form and `<DeclarativeForm>`.
|
|
5215
5401
|
*/
|
|
5216
5402
|
interface FormControl {
|
|
5217
5403
|
/** Merge a patch of `{ fieldName: value }` into the form's live values. */
|
|
@@ -5655,8 +5841,22 @@ type SelectContentProps = React$1.ComponentPropsWithoutRef<typeof SelectPrimitiv
|
|
|
5655
5841
|
declare const SelectContent: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
5656
5842
|
type SelectLabelProps = React$1.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>;
|
|
5657
5843
|
declare const SelectLabel: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
5658
|
-
type SelectItemProps = React$1.ComponentPropsWithoutRef<typeof SelectPrimitive.Item
|
|
5659
|
-
|
|
5844
|
+
type SelectItemProps = React$1.ComponentPropsWithoutRef<typeof SelectPrimitive.Item> & {
|
|
5845
|
+
/**
|
|
5846
|
+
* Secondary text rendered under the label. It sits outside `ItemText` on
|
|
5847
|
+
* purpose: Radix clones everything inside `ItemText` into the closed trigger,
|
|
5848
|
+
* so a description placed there would be glued onto the selected value.
|
|
5849
|
+
*/
|
|
5850
|
+
description?: React$1.ReactNode;
|
|
5851
|
+
};
|
|
5852
|
+
declare const SelectItem: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
5853
|
+
/**
|
|
5854
|
+
* Secondary text rendered under the label. It sits outside `ItemText` on
|
|
5855
|
+
* purpose: Radix clones everything inside `ItemText` into the closed trigger,
|
|
5856
|
+
* so a description placed there would be glued onto the selected value.
|
|
5857
|
+
*/
|
|
5858
|
+
description?: React$1.ReactNode;
|
|
5859
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
5660
5860
|
type SelectSeparatorProps = React$1.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>;
|
|
5661
5861
|
declare const SelectSeparator: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
5662
5862
|
//#endregion
|
|
@@ -6160,14 +6360,22 @@ interface AppShellProps {
|
|
|
6160
6360
|
palette?: Slot;
|
|
6161
6361
|
/** Passed to `AppLayout`, typically `<DocPanel />`. */
|
|
6162
6362
|
docPanel?: ReactNode;
|
|
6363
|
+
/**
|
|
6364
|
+
* Default `true`: `children` render inside `<NavChrome>`, the secondary sidebar and tabs of
|
|
6365
|
+
* the active navigation group chain, mounted once here so it keeps its DOM node while the
|
|
6366
|
+
* user moves within an area. `false` renders `children` bare, for an app that places
|
|
6367
|
+
* `<NavChrome>` itself (also the way to pass it `entryFilter` or `icons`).
|
|
6368
|
+
*/
|
|
6369
|
+
navChrome?: boolean;
|
|
6163
6370
|
children: ReactNode;
|
|
6164
6371
|
}
|
|
6165
6372
|
/**
|
|
6166
|
-
* `AppLayout` with the default sidebar, header and command palette,
|
|
6167
|
-
* context they read. Renders inside
|
|
6168
|
-
* `LinkComponentProvider`; it does not boot the runtime,
|
|
6373
|
+
* `AppLayout` with the default sidebar, header and command palette, the area chrome
|
|
6374
|
+
* (`<NavChrome>`) around its children, and the brand and user context they read. Renders inside
|
|
6375
|
+
* `BuroProvider`, a `RouterAdapter` and a `LinkComponentProvider`; it does not boot the runtime,
|
|
6376
|
+
* own routes or guard auth.
|
|
6169
6377
|
*/
|
|
6170
|
-
declare function AppShell({ brand, user, loginPath, sidebar, header, palette, docPanel, children }: AppShellProps): ReactElement;
|
|
6378
|
+
declare function AppShell({ brand, user, loginPath, sidebar, header, palette, docPanel, navChrome, children }: AppShellProps): ReactElement;
|
|
6171
6379
|
//#endregion
|
|
6172
6380
|
//#region src/shell/default-command-palette.d.ts
|
|
6173
6381
|
interface DefaultCommandPaletteProps {
|
|
@@ -6298,5 +6506,5 @@ declare function useLanguagePaletteActions(): ActionItem[];
|
|
|
6298
6506
|
declare const PACKAGE_NAME: "@burojs/ui-shadcn";
|
|
6299
6507
|
declare const PACKAGE_VERSION: "0.0.0";
|
|
6300
6508
|
//#endregion
|
|
6301
|
-
export { ActionButton, type ActionButtonProps, type ActionItem, ActionOverflow, type ActionOverflowProps, type ActionSurface, AlertDialog, AlertDialogAction, AlertDialogActionProps, AlertDialogCancel, AlertDialogCancelProps, AlertDialogContent, AlertDialogContentProps, AlertDialogDescription, AlertDialogDescriptionProps, AlertDialogFooter, AlertDialogFooterProps, AlertDialogHeader, AlertDialogHeaderProps, AlertDialogOverlay, AlertDialogOverlayProps, AlertDialogPortal, AlertDialogTitle, AlertDialogTitleProps, AlertDialogTrigger, AppActions, AppFlowButton, type AppFlowButtonProps, AppHeader, type AppHeaderProps, AppLayout, type AppLayoutProps, AppShell, type AppShellProps, AppSidebar, type AppSidebarProps, AuthPage, type AuthPageProps, Avatar, AvatarFallback, AvatarImage, Badge, BadgeProps, BooleanDisplay, BooleanInput, BrandMark, Breadcrumbs, type BreadcrumbsProps, type BuildNavItemsArgs, BulkActionToolbar, type BulkActionToolbarProps, Button, ButtonProps, Card, CardContent, CardContentProps, CardDescription, CardDescriptionProps, CardFooter, CardFooterProps, CardHeader, CardHeaderProps, CardProps, CardTitle, CardTitleProps, CheckConfirmDialog, type CheckConfirmDialogProps, Checkbox, CheckboxProps, Collapsible, CollapsibleContent, CollapsibleTrigger, ColumnsToggle, Command, CommandDialog, CommandDialogProps, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandLoading, CommandLoadingProps, CommandPalette, CommandPaletteActionsGroup, type CommandPaletteActionsGroupProps, type CommandPaletteActionsTestIdRole, CommandPaletteCreateGroup, type CommandPaletteCreateGroupProps, type CommandPaletteCreateTestIdRole, CommandPaletteDocsGroup, type CommandPaletteDocsGroupProps, CommandPaletteNavigationGroups, type CommandPaletteNavigationGroupsProps, type CommandPaletteNavigationTestIdRole, type CommandPaletteProps, CommandPaletteRecentGroup, type CommandPaletteRecentGroupProps, type CommandPaletteRecentTestIdRole, CommandPaletteRecordsGroup, type CommandPaletteRecordsGroupProps, type CommandPaletteRecordsTestIdRole, type CommandPaletteTestIdRole, CommandPaletteTrigger, type CommandPaletteTriggerProps, CommandSeparator, ContextPicker, type ContextPickerProps, CopyId, CreateButton, type CreateButtonProps, CursorLoadMore, type CursorLoadMoreProps, DEFAULT_LANGUAGE_STORAGE_KEY, DataTable, DataTableDateRangeFilter, type DataTableDateRangeFilterProps, DataTableEnumFilter, type DataTableEnumFilterProps, DataTableFacetedFilter, type DataTableFacetedFilterProps, DataTableNumRangeFilter, type DataTableNumRangeFilterProps, DataTableOperatorFilter, type DataTableOperatorFilterProps, type DataTableProps, DataTableRowActions, type DataTableRowActionsProps, DataTableTextFilter, type DataTableTextFilterProps, DataTableToolbar, type DataTableToolbarProps, DataTableViewOptions, type DataTableViewOptionsProps, DateDisplay, DateInput, DeclarativeDisplay, type DeclarativeDisplayProps, DeclarativeForm, type DeclarativeFormProps, type DeclarativeFormSlots, DefaultCommandPalette, type DefaultCommandPaletteProps, Dialog, DialogClose, DialogContent, DialogContentProps, DialogDescription, DialogDescriptionProps, type DialogFilterState, DialogFooter, DialogFooterProps, DialogHeader, DialogHeaderProps, DialogOverlayProps, DialogPresentationHost, DialogPresentationShell, DialogTitle, DialogTitleProps, DialogTrigger, DisabledAction, type DisabledActionProps, DocBrowser, type DocBrowserProps, DocInfo, type DocInfoProps, DocPanel, type DocPanelProps, DocTrailHelp, type DocTrailHelpProps, DocumentTitleProvider, type DraftRemovalSignal, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ENUM_PICKER_CLEAR_SENTINEL, EditPageHeader, EnumBadge, type EnumBadgeProps, EnumDisplay, EnumInput, EnumPicker, type EnumPickerProps,
|
|
6509
|
+
export { ActionButton, type ActionButtonProps, type ActionItem, ActionOverflow, type ActionOverflowProps, type ActionSurface, AlertDialog, AlertDialogAction, AlertDialogActionProps, AlertDialogCancel, AlertDialogCancelProps, AlertDialogContent, AlertDialogContentProps, AlertDialogDescription, AlertDialogDescriptionProps, AlertDialogFooter, AlertDialogFooterProps, AlertDialogHeader, AlertDialogHeaderProps, AlertDialogOverlay, AlertDialogOverlayProps, AlertDialogPortal, AlertDialogTitle, AlertDialogTitleProps, AlertDialogTrigger, AppActions, AppFlowButton, type AppFlowButtonProps, AppHeader, type AppHeaderProps, AppLayout, type AppLayoutProps, AppShell, type AppShellProps, AppSidebar, type AppSidebarProps, AuthPage, type AuthPageProps, Avatar, AvatarFallback, AvatarImage, Badge, BadgeProps, BooleanDisplay, BooleanInput, BrandMark, Breadcrumbs, type BreadcrumbsProps, type BuildNavItemsArgs, BulkActionToolbar, type BulkActionToolbarProps, Button, ButtonProps, Card, CardContent, CardContentProps, CardDescription, CardDescriptionProps, CardFooter, CardFooterProps, CardHeader, CardHeaderProps, CardProps, CardTitle, CardTitleProps, CheckConfirmDialog, type CheckConfirmDialogProps, Checkbox, CheckboxProps, Collapsible, CollapsibleContent, CollapsibleTrigger, ColumnsToggle, Command, CommandDialog, CommandDialogProps, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandLoading, CommandLoadingProps, CommandPalette, CommandPaletteActionsGroup, type CommandPaletteActionsGroupProps, type CommandPaletteActionsTestIdRole, CommandPaletteCreateGroup, type CommandPaletteCreateGroupProps, type CommandPaletteCreateTestIdRole, CommandPaletteDocsGroup, type CommandPaletteDocsGroupProps, CommandPaletteNavigationGroups, type CommandPaletteNavigationGroupsProps, type CommandPaletteNavigationTestIdRole, type CommandPaletteProps, CommandPaletteRecentGroup, type CommandPaletteRecentGroupProps, type CommandPaletteRecentTestIdRole, CommandPaletteRecordsGroup, type CommandPaletteRecordsGroupProps, type CommandPaletteRecordsTestIdRole, type CommandPaletteTestIdRole, CommandPaletteTrigger, type CommandPaletteTriggerProps, CommandSeparator, ContextPicker, type ContextPickerProps, CopyId, CreateButton, type CreateButtonProps, CursorLoadMore, type CursorLoadMoreProps, DEFAULT_LANGUAGE_STORAGE_KEY, DataTable, DataTableDateRangeFilter, type DataTableDateRangeFilterProps, DataTableEnumFilter, type DataTableEnumFilterProps, DataTableFacetedFilter, type DataTableFacetedFilterProps, DataTableNumRangeFilter, type DataTableNumRangeFilterProps, DataTableOperatorFilter, type DataTableOperatorFilterProps, type DataTableProps, DataTableRowActions, type DataTableRowActionsProps, DataTableTextFilter, type DataTableTextFilterProps, DataTableToolbar, type DataTableToolbarProps, DataTableViewOptions, type DataTableViewOptionsProps, DateDisplay, DateInput, DeclarativeDisplay, type DeclarativeDisplayProps, DeclarativeForm, type DeclarativeFormProps, type DeclarativeFormSlots, DefaultCommandPalette, type DefaultCommandPaletteProps, Dialog, DialogClose, DialogContent, DialogContentProps, DialogDescription, DialogDescriptionProps, type DialogFilterState, DialogFooter, DialogFooterProps, DialogHeader, DialogHeaderProps, DialogOverlayProps, DialogPresentationHost, DialogPresentationShell, DialogTitle, DialogTitleProps, DialogTrigger, DisabledAction, type DisabledActionProps, DocBrowser, type DocBrowserProps, DocInfo, type DocInfoProps, DocPanel, type DocPanelProps, DocTrailHelp, type DocTrailHelpProps, DocumentTitleProvider, type DraftRemovalSignal, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ENUM_PICKER_CLEAR_SENTINEL, EditPageHeader, EnumBadge, type EnumBadgeProps, EnumDisplay, EnumInput, EnumPicker, type EnumPickerProps, EnumDisplay$1 as EnumValueDisplay, type EnumDisplayProps as EnumValueDisplayProps, type EnumDisplayVariant as EnumValueDisplayVariant, ExportButton, type ExportButtonProps, ExportDialog, type ExportDialogProps, type FacetedFilterOption, FacetedFilterPicker, type FacetedFilterPickerProps, Field, FieldDisplay, type FieldDisplayProps, type FieldProps, FileDisplay, FileField, type FileFieldProps, FileInput, type FileInputProps, FilterBadges, type FilterBadgesProps, FilterBuilder, type FilterBuilderProps, type FilterOperator, FilterPanel, type FilterPanelProps, FilterRegion, FilterValueControl, type FilterValueControlProps, FlowActionButton, type FlowActionButtonProps, Form, FormActions, FormControl, FormControlProps, FormDescription, FormDescriptionProps, FormField, FormItem, FormItemProps, FormLabel, FormLabelProps, FormMessage, FormMessageProps, HeaderBreadcrumbs, HelpButton, type HelpButtonProps, Icon, IconComponent, IconProps, Input, InputProps, Label, LabelProps, LanguageSubmenu, LanguageSwitch, type LanguageSwitchApi, type LanguageSwitchProps, type LinkComponent, type LinkComponentProps, LinkComponentProvider, type LinkComponentProviderProps, LinkKeysDisplay, ListBody, ListBulkBar, type ListCellRenderer, ListColumns, ListControls, ListCreate, ListErrorState, type ListErrorStateProps, ListExport, ListFilters, ListFlows, ListLive, ListSavedViews, ListSearchInput, type ListSlot, type ListSlotRegion, type LoginCredentials, LoginForm, type LoginFormProps, NavAreaPage, NavChrome, type NavChromeProps, type NavItem, type NavLayout, type NavLayoutProps, NavMain, type NavMainProps, type NavTreeEntry, type NavTreeLayout, type NavTreeSection, NavigationGuardDialog, NumberDisplay, NumberInput, PACKAGE_NAME, PACKAGE_VERSION, type PageBreadcrumbsProps, PageHeader, type PageHeaderProps, type PaletteState, PinnedFilterControls, type PinnedFilterControlsProps, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverContentProps, PopoverPresentationHost, PopoverTrigger, type PresentationCopy, PresetFilterControls, type PresetFilterControlsProps, Progress, ProgressProps, RecordActions, RecordBreadcrumbs, RecordPage, type RecordPageProps, RecordScreen, type RecordScreenProps, RecordTitle, RefreshButton, type RefreshButtonProps, RelationDisplay, RelationField, RelationManyDisplay, RelationPicker, type RelationPickerCancelReason, LazyRelationPickerDialog as RelationPickerDialog, type RelationPickerDialogProps, type RelationPickerHandle, RelationPickerInput, type RelationPickerOpenOptions, type RelationPickerProps, type RelationPickerResult, type RelationPickerRow, type ResolvedTheme, type ResourceBreadcrumbsProps, ResourceList, ResourceListPage, type ResourceListPageProps, type ResourceListProps, ResourcePageRouter, type ResourcePageRouterProps, type RowActionDescriptor, SavedViewsDropdown, type SavedViewsDropdownProps, ScopeDimensionPicker, type ScopeDimensionPickerProps, type ScopeOption, ScopeSwitcher, type ScopeSwitcherProps, SecondarySidebarLayout, Select, SelectContent, SelectContentProps, SelectGroup, SelectItem, SelectItemProps, SelectLabel, SelectLabelProps, SelectScrollDownButton, SelectScrollDownButtonProps, SelectScrollUpButton, SelectScrollUpButtonProps, SelectSeparator, SelectSeparatorProps, SelectTrigger, SelectTriggerProps, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetContentProps, SheetDescription, SheetDescriptionProps, SheetFooter, SheetFooterProps, SheetHeader, SheetHeaderProps, SheetOverlayProps, SheetPresentationHost, SheetPresentationShell, SheetTitle, SheetTitleProps, SheetTrigger, type ShellBrand, type ShellContextValue, ShellProvider, type ShellProviderProps, type ShellUser, type ShellUserMapper, ShowPageHeader, Sidebar, SidebarBrand, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuButtonProps, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubButtonProps, SidebarMenuSubItem, SidebarProps, SidebarProvider, SidebarProviderProps, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, type Slot, type SpacingKey, THEME_CHOICES, THEME_STORAGE_KEY, Table, TableBody, TableBodyProps, TableCaption, TableCaptionProps, TableCell, TableCellProps, TableHead, TableHeadProps, TableHeader, TableHeaderProps, TableProps, TableRow, TableRowProps, Tabs, TabsContent, TabsContentProps, TabsLayout, TabsList, TabsListProps, TabsTrigger, TabsTriggerProps, TaskRunPanel, TaskRunPanelProps, TextDisplay, TextInput, Textarea, TextareaDisplay, TextareaInput, TextareaProps, type ThemeChoice, ThemeSubmenu, ThemeToggle, Toaster, type ToasterProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TypographyKey, type UseBuroDataTableOptions, type UseDialogFilterStateOptions, type UseNavTreeOptions, type UseRelationPickerOptions, type UseThemeResult, UserMenu, type UserMenuProps, badgeVariants, buildNavItems, buroSortingToTanStack, buttonVariants, cn, defaultNavLayouts, defaultUserMapper, downloadArtifact, formatOperatorLabel, hasIcon, i18nPrefixToRef, isImage, layoutSlot, listSlot, loadLocale, localeLabel, modeForSurface, recordDisplayName, registerIcons, relationLinkClassName, resolveNavIcon, resolveUpdater, saveLocale, shadcnBlockImplementations, shadcnFieldImplementations, shadcnPresentationHosts, spacing, tanStackSortingToBuro, toast, typography, useBuroDataTable, useCurrentUser, useDialogFilterState, useDocumentTitle, useExportRunWatcher, useFormControl, useFormField, useHref, useIsMobile, useLanguagePaletteActions, useLanguageSwitch, useLayout, useLayoutResolver, useLinkComponent, useListSlot, useMatch, useNavIcon, useNavTree, useNavVisible, useOptionalSidebar, usePaletteState, usePresentationCopy, useRelationPicker, useShell, useSidebar, useTheme, useThemePaletteActions, webPlatform, wrapperEnabled };
|
|
6302
6510
|
//# sourceMappingURL=index.d.ts.map
|