@declarion/react 0.52.0 → 0.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/{DraggableChildrenTable-CJCjc_cd.js → DraggableChildrenTable-CPoUY99R.js} +35 -35
- package/dist-lib/{Grid-DUjbQg3r.js → Grid--QAEby8k.js} +28 -28
- package/dist-lib/{LayoutRenderer-DbdxC-Bq.js → LayoutRenderer-BxZ7Nd9b.js} +920 -922
- package/dist-lib/{ListCardsBody-C8ofksQb.js → ListCardsBody-BPV4GPrv.js} +14 -14
- package/dist-lib/{MarkdownRenderer-B9_5fwuE.js → MarkdownRenderer-CIKuh_0i.js} +10 -10
- package/dist-lib/{record-documents-key-8fdm7C10.js → RecordIdBadge-CGxPR-8q.js} +1 -4
- package/dist-lib/{RefreshControl-C-8UCyau.js → RefreshControl-DMLkZP3R.js} +120 -122
- package/dist-lib/{SmartDetailPage.impl-DWjNQ052.js → SmartDetailPage.impl-SnNu6Ug-.js} +376 -377
- package/dist-lib/{SmartListPage.impl-yKBK7a8b.js → SmartListPage.impl-C73pR7Iw.js} +1098 -1099
- package/dist-lib/{SmartRecordListPage.impl-DRpU_DOC.js → SmartRecordListPage.impl-rJjQZe1V.js} +183 -183
- package/dist-lib/{SortHeaderMenu-CbihbEGd.js → SortHeaderMenu-DQ_KrkWk.js} +1 -1
- package/dist-lib/{action-dispatch-C28UhXXA.js → action-dispatch-DsuUS7ae.js} +382 -382
- package/dist-lib/api/agents.d.ts +0 -1
- package/dist-lib/api/events.d.ts +27 -5
- package/dist-lib/{cardProjection-Bp_ZPLUE.js → cardProjection-BadzqyeQ.js} +146 -204
- package/dist-lib/components/actions/ObjectActionBar.d.ts +1 -1
- package/dist-lib/components/chrome/Breadcrumbs.d.ts +1 -1
- package/dist-lib/components/detail-layout/DetailAuditStrip.d.ts +1 -1
- package/dist-lib/components/detail-layout/DetailHighlights.d.ts +1 -1
- package/dist-lib/components/detail-layout/DraggableChildrenTable.d.ts +1 -1
- package/dist-lib/components/detail-layout/EditableChildrenTable.d.ts +1 -1
- package/dist-lib/components/detail-layout/LayoutRenderer.d.ts +1 -1
- package/dist-lib/components/file-widgets/host.d.ts +1 -1
- package/dist-lib/components/layout/Layout.d.ts +1 -1
- package/dist-lib/components/layout/TopBar.d.ts +1 -1
- package/dist-lib/components/list/InlineEditCell.d.ts +1 -1
- package/dist-lib/components/list/PeekFieldCell.d.ts +1 -1
- package/dist-lib/components/list/QuickPeek.d.ts +1 -1
- package/dist-lib/components/pages/DocumentsMenu.d.ts +1 -1
- package/dist-lib/components/pages/RecordDocumentsPanel.d.ts +2 -2
- package/dist-lib/components/pages/auth/AuthShell.d.ts +1 -1
- package/dist-lib/components/pages/list/ListCardRow.d.ts +1 -1
- package/dist-lib/components/pages/list/ListCardsBody.d.ts +1 -1
- package/dist-lib/components/pages/list/ListFloatbar.d.ts +1 -1
- package/dist-lib/components/pages/list/ListHeader.d.ts +1 -1
- package/dist-lib/components/pages/list/columns.d.ts +1 -1
- package/dist-lib/components/pages/list/filter-meta.d.ts +1 -1
- package/dist-lib/components/pages/list/use-filter-value-labels.d.ts +1 -1
- package/dist-lib/components/pages/list/useListQuery.d.ts +6 -1
- package/dist-lib/components/pages/list/useListRowInteraction.d.ts +1 -1
- package/dist-lib/components/pages/list/useListViews.d.ts +1 -1
- package/dist-lib/components/pages/list/useRowMenu.d.ts +1 -1
- package/dist-lib/components/shared/RefreshControl.d.ts +7 -1
- package/dist-lib/components/shared/useOwnRefresh.d.ts +9 -0
- package/dist-lib/{field-classification-CeYJlsNq.js → field-classification-sMkkAEg9.js} +301 -320
- package/dist-lib/{format-count-C3N-WxEy.js → format-count-B5SLlNOb.js} +245 -245
- package/dist-lib/hooks/useMutations.d.ts +1 -1
- package/dist-lib/hooks/useSSE.d.ts +24 -4
- package/dist-lib/index.js +1586 -1858
- package/dist-lib/lib/action-dispatch.d.ts +1 -1
- package/dist-lib/lib/document-templates.d.ts +1 -1
- package/dist-lib/lib/realtime-reconcile.d.ts +43 -0
- package/dist-lib/{peekDraftStore-D3sowXga.js → peekDraftStore-CbHFwz_F.js} +36 -36
- package/dist-lib/{registry-p6CejATt.js → registry-D0RhCnEL.js} +507 -507
- package/dist-lib/stores/realtime.d.ts +20 -0
- package/dist-lib/testing.js +35 -35
- package/dist-lib/types/api.d.ts +8 -4
- package/dist-lib/types/schema.d.ts +6 -0
- package/dist-lib/{useCurrentScreen-74x5yJNb.js → useCurrentScreen-DVTXCj_K.js} +2508 -1557
- package/dist-lib/{useListQuery-D75bgLLz.js → useListQuery-C2nq58YV.js} +13 -10
- package/dist-lib/{useProperties-C5fZp12D.js → useProperties-BcIz-MyO.js} +25 -25
- package/dist-lib/useTabSearchMirror-UYCsopxP.js +177 -0
- package/dist-lib/{value-DKekzcjz.js → value-CQzGOI0F.js} +25 -25
- package/package.json +14 -14
- package/dist-lib/useTabSearchMirror-D_wzoYRz.js +0 -406
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import { type ResolvedActionLayoutNode } from "../../lib/actions";
|
|
3
3
|
import { type Action } from "../../types/schema";
|
|
4
|
-
import { type WidgetContext } from "
|
|
4
|
+
import { type WidgetContext } from "./ResponsiveActionBar";
|
|
5
5
|
export type ObjectActionBarSlot = "detail" | "detail_toolbar" | "list_row" | "quick_peek";
|
|
6
6
|
export type ObjectActionSelection = {
|
|
7
7
|
include: string[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Entity, Schema, Screen } from "../../types/schema";
|
|
2
2
|
import type { StatusInfo } from "../../types/api";
|
|
3
|
-
import type { Refs } from "
|
|
3
|
+
import type { Refs } from "../fields";
|
|
4
4
|
interface DetailHighlightsProps {
|
|
5
5
|
screen: Screen;
|
|
6
6
|
entity: Entity;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Entity, Schema } from "../../types/schema";
|
|
2
|
-
import type { Refs } from "
|
|
2
|
+
import type { Refs } from "../fields";
|
|
3
3
|
import type { PendingChildRow } from "./LayoutRenderer";
|
|
4
4
|
import type { ResolvedChildConfig } from "../../lib/child-config";
|
|
5
5
|
interface DraggableChildrenTableProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Entity, Schema } from "../../types/schema";
|
|
2
|
-
import type { Refs } from "
|
|
2
|
+
import type { Refs } from "../fields";
|
|
3
3
|
import type { PendingChildRow } from "./LayoutRenderer";
|
|
4
4
|
import type { ResolvedChildConfig } from "../../lib/child-config";
|
|
5
5
|
interface EditableChildrenTableProps {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Entity, LayoutNode, Schema } from "../../types/schema";
|
|
2
2
|
import type { StatusInfo, PropertyValue } from "../../types/api";
|
|
3
|
-
import type { Refs } from "
|
|
3
|
+
import type { Refs } from "../fields";
|
|
4
4
|
export interface PendingChildRow {
|
|
5
5
|
_key: string;
|
|
6
6
|
_deleted?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
import type { Entity, Screen } from "../../types/schema";
|
|
3
3
|
import type { FileFieldDef, FileFieldValue } from "../../types/files";
|
|
4
|
-
import type { Refs } from "
|
|
4
|
+
import type { Refs } from "../fields";
|
|
5
5
|
export declare function getEntityFileField(entity: Pick<Entity, "files">, fieldName: string): FileFieldDef | undefined;
|
|
6
6
|
export declare function getFileFieldValue(record: Record<string, unknown>, fieldName: string): FileFieldValue;
|
|
7
7
|
export declare function getSchemaFieldValue(entity: Pick<Entity, "fields" | "files">, record: Record<string, unknown>, fieldName: string): unknown;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useTabStore } from "../../stores/tabs";
|
|
2
2
|
import { type NavNode, type Screen } from "../../types/schema";
|
|
3
|
-
import type { Crumb } from "
|
|
3
|
+
import type { Crumb } from "../chrome/Breadcrumbs";
|
|
4
4
|
export declare function Layout(): import("react").JSX.Element | null;
|
|
5
5
|
export declare function buildCrumbs(nodes: NavNode[], screens: Record<string, Screen>, pathname: string, tabs: ReturnType<typeof useTabStore.getState>["tabs"], activeTabId: string | null, topLevelNavigate: (to: string) => void): Crumb[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type SelectOption } from "
|
|
1
|
+
import { type SelectOption } from "../primitives";
|
|
2
2
|
export type InlineEditTrigger = "dblclick" | "enter" | "always";
|
|
3
3
|
export type InlineEditKind = "text" | "select" | "bool";
|
|
4
4
|
export interface InlineEditCellProps {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import { type Action, type Entity, type EntityField, type Screen } from "../../types/schema";
|
|
3
|
-
import type { Refs } from "
|
|
3
|
+
import type { Refs } from "../fields";
|
|
4
4
|
import { type ResolvedActionLayoutNode } from "../../lib/actions";
|
|
5
5
|
export interface QuickPeekRegularFieldSpec {
|
|
6
6
|
key: string;
|
|
@@ -15,7 +15,7 @@ export interface DocumentsMenuProps {
|
|
|
15
15
|
/** True when the caller can manage tenant document templates (heuristic:
|
|
16
16
|
* `document_template` is present & readable in `schema.entities`). Gates
|
|
17
17
|
* the lazy `document.templates.available` visibility probe so a
|
|
18
|
-
* template-less, non-manager caller
|
|
18
|
+
* template-less, non-manager caller - the default - makes ZERO extra
|
|
19
19
|
* network calls - Business Case 6. */
|
|
20
20
|
canManageTemplates?: boolean;
|
|
21
21
|
}
|
|
@@ -9,11 +9,11 @@ interface RecordDocumentsPanelProps {
|
|
|
9
9
|
* false/absent the shelf mounts ONLY if the record already has >=1
|
|
10
10
|
* attached document - it never orphans visible history, but it also
|
|
11
11
|
* never shows an empty "no documents" shelf on an entity with nothing to
|
|
12
|
-
* generate and nothing generated
|
|
12
|
+
* generate and nothing generated. */
|
|
13
13
|
canGenerateOne?: boolean;
|
|
14
14
|
/** True when the caller can manage tenant document templates. Together with
|
|
15
15
|
* canGenerateOne this gates whether the attachment fetch runs at all: a
|
|
16
|
-
* template-less, non-manager caller
|
|
16
|
+
* template-less, non-manager caller - the default - makes ZERO
|
|
17
17
|
* document.object_links calls per record view. The rare orphaned-attachment
|
|
18
18
|
* case (a template was removed but its current-attached docs remain) then
|
|
19
19
|
* surfaces only to managers on the record and to everyone via My Documents,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ListRow } from "./table-features";
|
|
2
2
|
import type { ListResponse, RowData } from "../../../types/api";
|
|
3
3
|
import { type Action, type Entity, type Screen } from "../../../types/schema";
|
|
4
|
-
import type { resolveCellRenderer } from "
|
|
4
|
+
import type { resolveCellRenderer } from "../../fields/cells/registry";
|
|
5
5
|
import type { RowInteraction } from "./useListRowInteraction";
|
|
6
6
|
type CellRenderer = ReturnType<typeof resolveCellRenderer>;
|
|
7
7
|
interface ListCardRowProps {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ListRow } from "./table-features";
|
|
2
2
|
import type { Virtualizer } from "@tanstack/react-virtual";
|
|
3
3
|
import type { ListResponse, RowData } from "../../../types/api";
|
|
4
|
-
import type { resolveCellRenderer } from "
|
|
4
|
+
import type { resolveCellRenderer } from "../../fields/cells/registry";
|
|
5
5
|
import type { Action, Entity, Screen } from "../../../types/schema";
|
|
6
6
|
import type { RowInteraction } from "./useListRowInteraction";
|
|
7
7
|
interface ListCardsBodyProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ResolvedActionLayoutNode } from "../../../lib/actions";
|
|
2
|
-
import { type WidgetContext } from "
|
|
2
|
+
import { type WidgetContext } from "../../actions/ResponsiveActionBar";
|
|
3
3
|
import type { Action, Entity, Screen } from "../../../types/schema";
|
|
4
4
|
export interface ListFloatbarProps {
|
|
5
5
|
selectedIds: string[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ResolvedActionLayoutNode } from "../../../lib/actions";
|
|
2
|
-
import { type WidgetContext } from "
|
|
2
|
+
import { type WidgetContext } from "../../actions/ResponsiveActionBar";
|
|
3
3
|
import type { Action } from "../../../types/schema";
|
|
4
4
|
export interface ListHeaderProps {
|
|
5
5
|
title: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type RefObject } from "react";
|
|
2
2
|
import type { ListColumnDef } from "./table-features";
|
|
3
|
-
import { type Refs } from "
|
|
3
|
+
import { type Refs } from "../../fields/cells/registry";
|
|
4
4
|
import type { Action, Entity, Screen } from "../../../types/schema";
|
|
5
5
|
import type { RowData } from "../../../types/api";
|
|
6
6
|
type SchemaMaps = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Entity, Screen, ScreenFilterSpecialValues } from "../../../types/schema";
|
|
2
|
-
import type { FilterFieldMeta } from "
|
|
2
|
+
import type { FilterFieldMeta } from "../../filters/FilterDrawer";
|
|
3
3
|
/**
|
|
4
4
|
* Build FilterFieldMeta array from screen + entity for the FilterDrawer.
|
|
5
5
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type FilterNode, type FilterValueResolver } from "../../../lib/filters";
|
|
2
2
|
import type { Entity } from "../../../types/schema";
|
|
3
|
-
import type { FilterFieldMeta } from "
|
|
3
|
+
import type { FilterFieldMeta } from "../../filters/FilterDrawer";
|
|
4
4
|
import type { Refs } from "../../../types/api";
|
|
5
5
|
/**
|
|
6
6
|
* useFilterValueLabels - the single source of human labels for stored filter
|
|
@@ -39,7 +39,12 @@ export interface ListQueryResult {
|
|
|
39
39
|
error: unknown;
|
|
40
40
|
/** True while a load has been running long enough to be worth saying so. */
|
|
41
41
|
isLoadingStale: boolean;
|
|
42
|
-
|
|
42
|
+
/**
|
|
43
|
+
* Cancels this query's in-flight fetch and refetches it, resolving when both
|
|
44
|
+
* have settled - in that order. Returning nothing made every completion-based
|
|
45
|
+
* state silently instant, so a control that waited on it never waited.
|
|
46
|
+
*/
|
|
47
|
+
retry: () => Promise<void>;
|
|
43
48
|
/** The total, and how it was produced. Undefined while the count is in flight
|
|
44
49
|
* or after it failed - a caller degrades to the loaded row count. */
|
|
45
50
|
countTotal: number | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { MouseEvent as ReactMouseEvent } from "react";
|
|
2
|
-
import type { QuickPeekFieldSpec } from "
|
|
2
|
+
import type { QuickPeekFieldSpec } from "../../list/QuickPeek";
|
|
3
3
|
import { useLongPress } from "../../../hooks/useLongPress";
|
|
4
4
|
import type { RowData } from "../../../types/api";
|
|
5
5
|
import { type Action, type Entity, type Screen } from "../../../types/schema";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FilterNode } from "../../../lib/filters";
|
|
2
2
|
import { type Screen } from "../../../types/schema";
|
|
3
|
-
import type { ViewItem } from "
|
|
3
|
+
import type { ViewItem } from "../../list/ViewSwitcher";
|
|
4
4
|
interface ListViewsInput {
|
|
5
5
|
screenCode: string;
|
|
6
6
|
screen: Screen | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ResolvedActionLayoutNode } from "../../../lib/actions";
|
|
2
|
-
import type { ActionRunHandler, WidgetContext } from "
|
|
2
|
+
import type { ActionRunHandler, WidgetContext } from "../../actions/ResponsiveActionBar";
|
|
3
3
|
import type { Action, Entity, Screen } from "../../../types/schema";
|
|
4
4
|
export interface UseRowMenuArgs {
|
|
5
5
|
row: Record<string, unknown>;
|
|
@@ -9,10 +9,16 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export interface RefreshControlProps {
|
|
11
11
|
liveObject: {
|
|
12
|
+
/** Resolves when the refresh it starts has settled. See useOwnRefresh. */
|
|
12
13
|
refetch: () => unknown;
|
|
13
|
-
isFetching: boolean;
|
|
14
14
|
isLoading: boolean;
|
|
15
15
|
isLive: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated Ignored; the control reports only the refresh a person
|
|
18
|
+
* started. Passing it changes nothing. Declared so a consumer that builds
|
|
19
|
+
* this object literally still compiles.
|
|
20
|
+
*/
|
|
21
|
+
isFetching?: boolean;
|
|
16
22
|
};
|
|
17
23
|
realtime?: boolean;
|
|
18
24
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether the refresh THIS control started is still running. A control driven
|
|
3
|
+
* by its query's flag reports somebody else's work and sits disabled exactly
|
|
4
|
+
* when a person reaches for it. docs/architecture.md.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useOwnRefresh(refetch: () => unknown): {
|
|
7
|
+
refreshing: boolean;
|
|
8
|
+
refresh: () => void;
|
|
9
|
+
};
|