@declarion/react 0.57.0 → 0.59.2
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 +0 -2
- package/dist-lib/AgentChatPanel.impl-DBH1Ff4G.js +1200 -0
- package/dist-lib/DetailAuditStrip-9eJM2Fml.js +288 -0
- package/dist-lib/{DraggableChildrenTable-BV5sb8Uo.js → DraggableChildrenTable-4RZC351U.js} +87 -86
- package/dist-lib/Grid-CQabaBLx.js +405 -0
- package/dist-lib/{LayoutRenderer-C9AH9cXf.js → LayoutRenderer-DGKWZKpW.js} +1000 -1114
- package/dist-lib/{ListCardsBody-DXcDg536.js → ListCardsBody-DfGmyNIu.js} +84 -84
- package/dist-lib/MarkdownRenderer-BDbzDv_y.js +87 -0
- package/dist-lib/{RefreshControl-CNtN8zSl.js → RefreshControl-Bhoib0ZA.js} +126 -155
- package/dist-lib/SmartDetailPage.impl-DFjz29Ff.js +1565 -0
- package/dist-lib/SmartListPage.impl-BrZLE_Gb.js +3046 -0
- package/dist-lib/{SmartRecordListPage.impl-Bkl9aZJ8.js → SmartRecordListPage.impl-C1FJLr80.js} +281 -280
- package/dist-lib/SortHeaderMenu-Cijxk4cX.js +107 -0
- package/dist-lib/action-dispatch-DY0c8U81.js +1967 -0
- package/dist-lib/api/client.d.ts +5 -0
- package/dist-lib/api/data.d.ts +2 -4
- package/dist-lib/api/entities.d.ts +8 -15
- package/dist-lib/api/events.d.ts +3 -3
- package/dist-lib/cardProjection-Bkl2SSYz.js +499 -0
- package/dist-lib/components/actions/ResponsiveActionBar.d.ts +17 -16
- package/dist-lib/components/agents/AgentChatPanel.d.ts +3 -13
- package/dist-lib/components/agents/AgentChatPanel.impl.d.ts +14 -0
- package/dist-lib/components/agents/AgentPicker.d.ts +1 -2
- package/dist-lib/components/chrome/PageShell.d.ts +7 -0
- package/dist-lib/components/chrome/RecordHeader.d.ts +1 -2
- package/dist-lib/components/chrome/headerActionZone.d.ts +27 -0
- package/dist-lib/components/detail-layout/DetailAuditStrip.d.ts +1 -2
- package/dist-lib/components/detail-layout/DetailHighlights.d.ts +1 -2
- package/dist-lib/components/detail-layout/blockMeta.d.ts +2 -1
- package/dist-lib/components/fields/BoolField.d.ts +1 -1
- package/dist-lib/components/fields/EnumField.d.ts +1 -1
- package/dist-lib/components/fields/IntArrayField.d.ts +1 -1
- package/dist-lib/components/fields/MultilangArrayField.d.ts +2 -0
- package/dist-lib/components/fields/MultilangField.d.ts +1 -1
- package/dist-lib/components/fields/MultilangTextField.d.ts +1 -1
- package/dist-lib/components/fields/NumberField.d.ts +1 -1
- package/dist-lib/components/fields/PasswordField.d.ts +1 -1
- package/dist-lib/components/fields/RefCombobox.d.ts +1 -1
- package/dist-lib/components/fields/SecretField.d.ts +1 -1
- package/dist-lib/components/fields/StringArrayField.d.ts +1 -1
- package/dist-lib/components/fields/TimestampField.d.ts +1 -1
- package/dist-lib/components/fields/cells/registry.d.ts +2 -1
- package/dist-lib/components/fields/index.d.ts +2 -1
- package/dist-lib/components/fields/langMap.d.ts +2 -0
- package/dist-lib/components/fields/secretValue.d.ts +2 -0
- package/dist-lib/components/file-widgets/UnknownFileWidget.d.ts +3 -0
- package/dist-lib/components/file-widgets/UploadFailureText.d.ts +4 -0
- package/dist-lib/components/file-widgets/helpers.d.ts +1 -1
- package/dist-lib/components/file-widgets/host.d.ts +4 -3
- package/dist-lib/components/file-widgets/types.d.ts +1 -0
- package/dist-lib/components/file-widgets/upload.d.ts +18 -3
- package/dist-lib/components/filters/filter-op-label.d.ts +3 -0
- package/dist-lib/components/layout/ImpersonationBanner.d.ts +1 -1
- package/dist-lib/components/layout/ImpersonationFrame.d.ts +1 -1
- package/dist-lib/components/layout/Layout.d.ts +2 -1
- package/dist-lib/components/layout/Sidebar.d.ts +2 -1
- package/dist-lib/components/layout/TenantChip.d.ts +1 -1
- package/dist-lib/components/list/ViewSwitcher.d.ts +4 -2
- package/dist-lib/components/pages/DocumentsMenu.d.ts +1 -2
- package/dist-lib/components/pages/ExportMenu.d.ts +3 -5
- package/dist-lib/components/pages/RecordDocumentsPanel.d.ts +1 -2
- package/dist-lib/components/pages/auth/AuthShell.d.ts +4 -31
- package/dist-lib/components/pages/exportRequest.d.ts +4 -6
- package/dist-lib/components/pages/list/DeleteViewDialog.d.ts +8 -0
- package/dist-lib/components/pages/list/ListCardRow.d.ts +1 -2
- package/dist-lib/components/pages/list/ListCardsBody.d.ts +0 -1
- package/dist-lib/components/pages/list/ListFloatbar.d.ts +2 -2
- package/dist-lib/components/pages/list/ListHeader.d.ts +2 -2
- package/dist-lib/components/pages/list/ListNoRows.d.ts +4 -5
- package/dist-lib/components/pages/list/ListToolbar.d.ts +3 -2
- package/dist-lib/components/pages/list/ListUrlBanner.d.ts +10 -0
- package/dist-lib/components/pages/list/RowActionsCell.d.ts +2 -4
- package/dist-lib/components/pages/list/RowContextMenu.d.ts +1 -2
- package/dist-lib/components/pages/list/columns.d.ts +2 -1
- package/dist-lib/components/pages/list/filter-meta.d.ts +2 -1
- package/dist-lib/components/pages/list/useActiveView.d.ts +38 -0
- package/dist-lib/components/pages/list/useListColumnLayout.d.ts +6 -5
- package/dist-lib/components/pages/list/useListQuery.d.ts +4 -4
- package/dist-lib/components/pages/list/useListSort.d.ts +5 -4
- package/dist-lib/components/pages/list/useListViews.d.ts +18 -8
- package/dist-lib/components/pages/list/useRowMenu.d.ts +2 -3
- package/dist-lib/components/pages/profile/Profile.d.ts +3 -0
- package/dist-lib/components/params/ParamsBlock.d.ts +1 -13
- package/dist-lib/components/params/param-editors.d.ts +3 -11
- package/dist-lib/components/primitives/ClassifiedFieldLocked.d.ts +1 -2
- package/dist-lib/components/shared/DynamicIcon.d.ts +2 -2
- package/dist-lib/components/shared/LoadingSkeleton.d.ts +1 -0
- package/dist-lib/components/shared/LucideIcon.d.ts +1 -1
- package/dist-lib/components/shared/useOwnRefresh.d.ts +1 -1
- package/dist-lib/declarion-react.css +1 -1
- package/dist-lib/embed/theme.d.ts +1 -1
- package/dist-lib/embed/useEmbedNavigate.d.ts +1 -1
- package/dist-lib/failure-v-uGSpbX.js +158 -0
- package/dist-lib/{field-classification-D6xQYn-h.js → field-classification-C28XE-_P.js} +514 -307
- package/dist-lib/format-count-DA4wmmWR.js +1771 -0
- package/dist-lib/hooks/useEntityData.d.ts +1 -1
- package/dist-lib/hooks/useFilters.d.ts +7 -5
- package/dist-lib/hooks/useLanguage.d.ts +4 -0
- package/dist-lib/hooks/useParams.d.ts +4 -51
- package/dist-lib/hooks/useRegisterScreenTab.d.ts +1 -1
- package/dist-lib/hooks/useSSE.d.ts +3 -3
- package/dist-lib/hooks/useTabTitle.d.ts +2 -0
- package/dist-lib/hooks/useText.d.ts +3 -3
- package/dist-lib/hooks/useVersionWatcher.d.ts +1 -1
- package/dist-lib/hooks/useViews.d.ts +20 -0
- package/dist-lib/index.d.ts +8 -7
- package/dist-lib/index.js +2716 -5803
- package/dist-lib/lib/action-dispatch.d.ts +2 -1
- package/dist-lib/lib/actions.d.ts +30 -42
- package/dist-lib/lib/anchor.d.ts +3 -4
- package/dist-lib/lib/decimal-text.d.ts +1 -0
- package/dist-lib/lib/document-templates.d.ts +1 -2
- package/dist-lib/lib/download.d.ts +2 -1
- package/dist-lib/lib/evidence-verdict.d.ts +2 -1
- package/dist-lib/lib/failure.d.ts +2 -0
- package/dist-lib/lib/field-classification.d.ts +3 -3
- package/dist-lib/lib/filters.d.ts +18 -2
- package/dist-lib/lib/format-count.d.ts +8 -7
- package/dist-lib/lib/language.d.ts +19 -0
- package/dist-lib/lib/mass-edit.d.ts +2 -1
- package/dist-lib/lib/realtime-query-keys.d.ts +1 -1
- package/dist-lib/lib/realtime-reconcile.d.ts +3 -4
- package/dist-lib/lib/screen-back.d.ts +4 -6
- package/dist-lib/lib/sort.d.ts +9 -9
- package/dist-lib/lib/timestamp.d.ts +5 -7
- package/dist-lib/lib/ui-actions.d.ts +2 -1
- package/dist-lib/peekDraftStore-D-cTbiIr.js +199 -0
- package/dist-lib/registry-Cb3W-czW.js +1950 -0
- package/dist-lib/safe-url-oSJw5pzO.js +34 -0
- package/dist-lib/stores/icon-registry.d.ts +2 -2
- package/dist-lib/stores/list-layout.d.ts +3 -4
- package/dist-lib/stores/realtime.d.ts +1 -1
- package/dist-lib/stores/tabs.d.ts +3 -2
- package/dist-lib/testing.d.ts +6 -0
- package/dist-lib/testing.js +98 -76
- package/dist-lib/types/api.d.ts +7 -8
- package/dist-lib/types/fieldType.d.ts +1 -1
- package/dist-lib/types/files.d.ts +4 -4
- package/dist-lib/types/schema.d.ts +44 -50
- package/dist-lib/useAgentConversation-D97IqE-J.js +623 -0
- package/dist-lib/{useCurrentScreen-CzwzQpoW.js → useCurrentScreen-BL5NZFCw.js} +2777 -3768
- package/dist-lib/useListQuery-BG1GyKtJ.js +103 -0
- package/dist-lib/useProperties-4Lg3odrt.js +83 -0
- package/dist-lib/{useTabSearchMirror-C39U85cg.js → useTabSearchMirror-ZVLlINBX.js} +49 -51
- package/dist-lib/useText-BFDCTUSo.js +952 -0
- package/dist-lib/{value-Bo8C8WMU.js → value-By1-WJ8J.js} +74 -76
- package/dist-lib/vite/fingerprint-plugin.d.ts +2 -3
- package/package.json +9 -9
- package/dist-lib/Grid-DWgUPuZ3.js +0 -404
- package/dist-lib/MarkdownRenderer-CcSFc2N3.js +0 -85
- package/dist-lib/RecordIdBadge-CGxPR-8q.js +0 -24
- package/dist-lib/SmartDetailPage.impl-lskCd-WG.js +0 -1846
- package/dist-lib/SmartListPage.impl-CrGbdzyK.js +0 -2854
- package/dist-lib/SortHeaderMenu-SYSAaqQJ.js +0 -106
- package/dist-lib/action-dispatch-CR4ajBtT.js +0 -1985
- package/dist-lib/cardProjection-CW5RIMko.js +0 -699
- package/dist-lib/components/pages/home/HomeStub.d.ts +0 -6
- package/dist-lib/components/pages/jobs/Jobs.d.ts +0 -1
- package/dist-lib/components/pages/pipeline/Pipeline.d.ts +0 -1
- package/dist-lib/format-count-Dobmi-Ji.js +0 -1551
- package/dist-lib/hooks/useUserLocale.d.ts +0 -1
- package/dist-lib/lib/messages.d.ts +0 -12
- package/dist-lib/peekDraftStore-5wQ7lq_V.js +0 -194
- package/dist-lib/registry-CjgUaF7C.js +0 -1768
- package/dist-lib/useListQuery-D7Hr5WM1.js +0 -96
- package/dist-lib/useProperties-CqtCzFCr.js +0 -81
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FilterNode } from "../../lib/filters.d.ts";
|
|
2
|
-
/** ExportQuery
|
|
3
|
-
*
|
|
2
|
+
/** ExportQuery is the list-query body the export endpoint accepts. Its
|
|
3
|
+
* semantics match the server's list URL parameters 1:1. */
|
|
4
4
|
export interface ExportQuery {
|
|
5
5
|
screen?: string;
|
|
6
6
|
filters?: FilterNode[];
|
|
@@ -20,7 +20,7 @@ export interface ExportRequest {
|
|
|
20
20
|
query: ExportQuery;
|
|
21
21
|
columns: string[];
|
|
22
22
|
selection?: Array<Record<string, string>>;
|
|
23
|
-
|
|
23
|
+
language?: string;
|
|
24
24
|
/** v1 wire defaults: `header_style="label"`, `ref_mode="display"`. v2 will
|
|
25
25
|
* add `code` / `stable_key`. Omitted = server defaults. */
|
|
26
26
|
header_style?: "label";
|
|
@@ -45,8 +45,6 @@ export interface ListViewState {
|
|
|
45
45
|
page?: number;
|
|
46
46
|
perPage?: number;
|
|
47
47
|
}
|
|
48
|
-
/** Locale resolver hook input — typically a string from the SDK ctx
|
|
49
|
-
* (e.g. `useLocale()`); empty/undefined defers to the server default. */
|
|
50
48
|
export interface ExportIntent {
|
|
51
49
|
scope: ExportScope;
|
|
52
50
|
/** All visible columns in display order. _select / _actions are stripped
|
|
@@ -55,7 +53,7 @@ export interface ExportIntent {
|
|
|
55
53
|
/** PK objects of the currently-selected rows. Non-empty only for
|
|
56
54
|
* `selected_rows` scope. */
|
|
57
55
|
selectedRowPKs?: Array<Record<string, string>>;
|
|
58
|
-
|
|
56
|
+
language?: string;
|
|
59
57
|
filename?: string;
|
|
60
58
|
}
|
|
61
59
|
/** buildListQuery returns the canonical list-query JSON shape from the
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ViewItem } from "../../list/ViewSwitcher.d.ts";
|
|
2
|
+
interface DeleteViewDialogProps {
|
|
3
|
+
view: ViewItem | null;
|
|
4
|
+
onCancel: () => void;
|
|
5
|
+
onConfirm: (view: ViewItem) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function DeleteViewDialog({ view, onCancel, onConfirm }: DeleteViewDialogProps): import("react").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -16,7 +16,6 @@ interface ListCardRowProps {
|
|
|
16
16
|
/** The active saved view's columns, which the card projection may follow. */
|
|
17
17
|
savedViewColumns: string[] | undefined;
|
|
18
18
|
refs: ListResponse<RowData>["$refs"];
|
|
19
|
-
locale: string;
|
|
20
19
|
renderers: Map<string, CellRenderer>;
|
|
21
20
|
rowActions: {
|
|
22
21
|
code: string;
|
|
@@ -36,5 +35,5 @@ interface ListCardRowProps {
|
|
|
36
35
|
/** TanStack Virtual's measure ref, so a card sizes itself. */
|
|
37
36
|
measureElement: (node: Element | null) => void;
|
|
38
37
|
}
|
|
39
|
-
export declare function ListCardRow({ row, rowIndex, entity, screen, entityCode, entities, savedViewColumns, refs,
|
|
38
|
+
export declare function ListCardRow({ row, rowIndex, entity, screen, entityCode, entities, savedViewColumns, refs, renderers, rowActions, tabNavigate, interaction, hasSoftDelete, zebra, hasBatchActions, hasDetailTarget, rowKey, measureElement, }: ListCardRowProps): import("react").JSX.Element;
|
|
40
39
|
export {};
|
|
@@ -13,7 +13,6 @@ interface ListCardsBodyProps {
|
|
|
13
13
|
entities: Record<string, Entity> | undefined;
|
|
14
14
|
savedViewColumns: string[] | undefined;
|
|
15
15
|
refs: ListResponse<RowData>["$refs"];
|
|
16
|
-
locale: string;
|
|
17
16
|
renderers: Map<string, ReturnType<typeof resolveCellRenderer>>;
|
|
18
17
|
rowActions: {
|
|
19
18
|
code: string;
|
|
@@ -12,7 +12,7 @@ export interface ListFloatbarProps {
|
|
|
12
12
|
code: string;
|
|
13
13
|
action: Action;
|
|
14
14
|
}[];
|
|
15
|
-
/** Server-emitted action_layout from screen (highest precedence
|
|
15
|
+
/** Server-emitted action_layout from screen (highest precedence). */
|
|
16
16
|
screenActionLayout?: ResolvedActionLayoutNode[];
|
|
17
17
|
/** Server-emitted action_layout from entity. Used when screen has none. */
|
|
18
18
|
entityActionLayout?: ResolvedActionLayoutNode[];
|
|
@@ -23,7 +23,7 @@ export interface ListFloatbarProps {
|
|
|
23
23
|
screen?: Screen;
|
|
24
24
|
onClear: () => void;
|
|
25
25
|
onActionSuccess: () => void;
|
|
26
|
-
/** Dispatch surface threaded into ResponsiveActionBar
|
|
26
|
+
/** Dispatch surface threaded into ResponsiveActionBar. */
|
|
27
27
|
widgetContext: WidgetContext;
|
|
28
28
|
}
|
|
29
29
|
export declare function ListFloatbar({ selectedIds, floatbarActions, screenActionLayout, entityActionLayout, data, rowKey, entityCode, entity, screen, onClear, onActionSuccess, widgetContext, }: ListFloatbarProps): import("react").JSX.Element | null;
|
|
@@ -12,7 +12,7 @@ export interface ListHeaderProps {
|
|
|
12
12
|
code: string;
|
|
13
13
|
action: Action;
|
|
14
14
|
}[];
|
|
15
|
-
/** Server-emitted action_layout from screen (highest precedence
|
|
15
|
+
/** Server-emitted action_layout from screen (highest precedence). */
|
|
16
16
|
screenActionLayout?: ResolvedActionLayoutNode[];
|
|
17
17
|
/** Server-emitted action_layout from entity. Used when screen has none. */
|
|
18
18
|
entityActionLayout?: ResolvedActionLayoutNode[];
|
|
@@ -20,7 +20,7 @@ export interface ListHeaderProps {
|
|
|
20
20
|
data: Record<string, unknown>[];
|
|
21
21
|
rowKey: (row: Record<string, unknown>) => string;
|
|
22
22
|
onActionSuccess: () => void;
|
|
23
|
-
/** Dispatch surface threaded into ResponsiveActionBar
|
|
23
|
+
/** Dispatch surface threaded into ResponsiveActionBar. */
|
|
24
24
|
widgetContext: WidgetContext;
|
|
25
25
|
}
|
|
26
26
|
export declare function ListHeader({ title, description, toolbarActions, screenActionLayout, entityActionLayout, selectedIds, data, rowKey, onActionSuccess, widgetContext, }: ListHeaderProps): import("react").JSX.Element | null;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
import { type Action, type Entity, type Screen } from "../../../types/schema.d.ts";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
export declare function listLoadErrorDescription(error: unknown): string;
|
|
3
|
+
import { type TextFn } from "../../../hooks/useText.d.ts";
|
|
4
|
+
/** The failure's title, then the field and the value it is about, so the reader
|
|
5
|
+
* knows what to change. The field reads by its declared label, never its code. */
|
|
6
|
+
export declare function listLoadErrorDescription(t: TextFn, errorTitle: TextFn, entity: Entity, error: unknown): string;
|
|
8
7
|
interface ListNoRowsProps {
|
|
9
8
|
isLoading: boolean;
|
|
10
9
|
/** The load has been running long enough to be worth saying so. */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ViewItem } from "../../list/ViewSwitcher.d.ts";
|
|
1
2
|
import type { FilterNode } from "../../../lib/filters.d.ts";
|
|
2
3
|
import { type Entity, type Schema, type Screen } from "../../../types/schema.d.ts";
|
|
3
4
|
import type { ListColumnLayout } from "./useListColumnLayout";
|
|
@@ -12,7 +13,6 @@ interface ListToolbarProps {
|
|
|
12
13
|
schema: Schema | undefined;
|
|
13
14
|
screenCode: string;
|
|
14
15
|
screenName: string;
|
|
15
|
-
locale: string;
|
|
16
16
|
isPhone: boolean;
|
|
17
17
|
/** Cards mode has no column headers, so sorting moves into a menu here. */
|
|
18
18
|
isCardsPresentation: boolean;
|
|
@@ -30,6 +30,7 @@ interface ListToolbarProps {
|
|
|
30
30
|
searchValue: string;
|
|
31
31
|
onSearchChange: (value: string) => void;
|
|
32
32
|
onSaveView: () => void;
|
|
33
|
+
onDeleteView: (view: ViewItem) => void;
|
|
33
34
|
page: number;
|
|
34
35
|
perPage: number;
|
|
35
36
|
includeDeleted: boolean;
|
|
@@ -41,5 +42,5 @@ interface ListToolbarProps {
|
|
|
41
42
|
/** The screen is current - useScreenIsLive. */
|
|
42
43
|
isLive: boolean;
|
|
43
44
|
}
|
|
44
|
-
export declare function ListToolbar({ screen, entity, entityCode, schema, screenCode, screenName,
|
|
45
|
+
export declare function ListToolbar({ screen, entity, entityCode, schema, screenCode, screenName, isPhone, isCardsPresentation, sort, columns, views, query, selection, filters, searchValue, onSearchChange, onSaveView, onDeleteView, page, perPage, includeDeleted, canViewDeleted, onToggleDeleted, realtime, isLive, }: ListToolbarProps): import("react").JSX.Element;
|
|
45
46
|
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface ListUrlBannerProps {
|
|
2
|
+
filterError: string | null;
|
|
3
|
+
unresolvedViewId: string | null;
|
|
4
|
+
onClearFilters: () => void;
|
|
5
|
+
onClearView: () => void;
|
|
6
|
+
}
|
|
7
|
+
/** A URL the list could not honour. The malformed filter is reported first: it
|
|
8
|
+
* is the one the caller can act on without knowing anything about views. */
|
|
9
|
+
export declare function ListUrlBanner({ filterError, unresolvedViewId, onClearFilters, onClearView, }: ListUrlBannerProps): import("react").JSX.Element | null;
|
|
10
|
+
export {};
|
|
@@ -4,7 +4,7 @@ export interface RowActionsCellProps {
|
|
|
4
4
|
rowId: string;
|
|
5
5
|
/** detail_screen for row-click navigation. The component reads
|
|
6
6
|
* screen.action_layout via cast to ResolvedActionLayoutNode[] (server emits
|
|
7
|
-
* the resolved wire shape
|
|
7
|
+
* the resolved wire shape even though the raw Screen TS type
|
|
8
8
|
* declares ActionLayoutNode[] for authoring). */
|
|
9
9
|
screen: {
|
|
10
10
|
detail_screen?: string;
|
|
@@ -30,7 +30,5 @@ export interface RowActionsCellProps {
|
|
|
30
30
|
/** Opens the Quick peek drawer for the row (used by both the __peek menu
|
|
31
31
|
* item and the hover eye button). */
|
|
32
32
|
onPeek: (row: Record<string, unknown>) => void;
|
|
33
|
-
/** Active UI locale, forwarded into the row-scoped WidgetContext. */
|
|
34
|
-
locale: string;
|
|
35
33
|
}
|
|
36
|
-
export declare function RowActionsCell({ row, rowId, screen, fullScreen, entity, entityCode, rowActions, tabNavigate, peekAllowed, hasDetailTarget, onPeek,
|
|
34
|
+
export declare function RowActionsCell({ row, rowId, screen, fullScreen, entity, entityCode, rowActions, tabNavigate, peekAllowed, hasDetailTarget, onPeek, }: RowActionsCellProps): import("react").JSX.Element;
|
|
@@ -20,10 +20,9 @@ export interface RowContextMenuProps {
|
|
|
20
20
|
icon?: string;
|
|
21
21
|
search?: string;
|
|
22
22
|
}) => void;
|
|
23
|
-
locale: string;
|
|
24
23
|
peekAllowed: boolean;
|
|
25
24
|
hasDetailTarget: boolean;
|
|
26
25
|
onPeek: (row: Record<string, unknown>) => void;
|
|
27
26
|
onClose: () => void;
|
|
28
27
|
}
|
|
29
|
-
export declare function RowContextMenu({ x, y, row, rowId, screen, fullScreen, entity, entityCode, rowActions, tabNavigate,
|
|
28
|
+
export declare function RowContextMenu({ x, y, row, rowId, screen, fullScreen, entity, entityCode, rowActions, tabNavigate, peekAllowed, hasDetailTarget, onPeek, onClose, }: RowContextMenuProps): import("react").JSX.Element | null;
|
|
@@ -3,6 +3,7 @@ import type { ListColumnDef } from "./table-features";
|
|
|
3
3
|
import { type Refs } from "../../fields/cells/registry.d.ts";
|
|
4
4
|
import type { Action, Entity, Screen } from "../../../types/schema.d.ts";
|
|
5
5
|
import type { RowData } from "../../../types/api.d.ts";
|
|
6
|
+
import type { TextFn } from "../../../lib/language.d.ts";
|
|
6
7
|
type SchemaMaps = {
|
|
7
8
|
entities?: Record<string, Entity>;
|
|
8
9
|
screens?: Record<string, Screen>;
|
|
@@ -28,7 +29,7 @@ export interface BuildListColumnsArgs {
|
|
|
28
29
|
/** True when the entity has a detail route; drives __open availability in the
|
|
29
30
|
* row menu (composite-PK entities have no detail page). */
|
|
30
31
|
hasDetailTarget: boolean;
|
|
31
|
-
|
|
32
|
+
t: TextFn;
|
|
32
33
|
tabNavigate: (href: string, opts?: {
|
|
33
34
|
title?: string;
|
|
34
35
|
icon?: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Entity, Screen, ScreenFilterSpecialValues } from "../../../types/schema.d.ts";
|
|
2
2
|
import type { FilterFieldMeta } from "../../filters/FilterDrawer.d.ts";
|
|
3
|
+
import type { TextFn } from "../../../lib/language.d.ts";
|
|
3
4
|
/**
|
|
4
5
|
* Build FilterFieldMeta array from screen + entity for the FilterDrawer.
|
|
5
6
|
*
|
|
@@ -18,7 +19,7 @@ import type { FilterFieldMeta } from "../../filters/FilterDrawer.d.ts";
|
|
|
18
19
|
* every entity field otherwise. That is a UI affordance, not an access control:
|
|
19
20
|
* the server applies no screen scoping to caller filters.
|
|
20
21
|
*/
|
|
21
|
-
export declare function buildFilterFieldMeta(screen: (Pick<Screen, "filters"> & {
|
|
22
|
+
export declare function buildFilterFieldMeta(t: TextFn, screen: (Pick<Screen, "filters"> & {
|
|
22
23
|
filter_special_values?: Record<string, ScreenFilterSpecialValues>;
|
|
23
24
|
filter_operators?: Record<string, string[]>;
|
|
24
25
|
}) | undefined, entity: Pick<Entity, "fields" | "status_groups" | "properties"> | undefined, entities?: Record<string, Entity>): FilterFieldMeta[];
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { FilterNode } from "../../../lib/filters.d.ts";
|
|
2
|
+
import type { Screen } from "../../../types/schema.d.ts";
|
|
3
|
+
import type { ViewItem } from "../../list/ViewSwitcher.d.ts";
|
|
4
|
+
export declare function baseViewSearchParams(current: URLSearchParams): URLSearchParams;
|
|
5
|
+
/** Scoped to who is asking as well as to the screen: a tenant switch or a
|
|
6
|
+
* different sign-in is a different caller with a different default. */
|
|
7
|
+
export declare function defaultViewClearedKey(screenCode: string, tenantId?: string, userId?: string): string;
|
|
8
|
+
interface ActiveViewInput {
|
|
9
|
+
screenCode: string;
|
|
10
|
+
screen: Screen | undefined;
|
|
11
|
+
searchParams: URLSearchParams;
|
|
12
|
+
setSearchParams: (next: URLSearchParams, options?: {
|
|
13
|
+
replace?: boolean;
|
|
14
|
+
}) => void;
|
|
15
|
+
userId: string | undefined;
|
|
16
|
+
tenantId: string | undefined;
|
|
17
|
+
filterError: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface ViewDefaults {
|
|
20
|
+
filters: FilterNode[];
|
|
21
|
+
columns: string[];
|
|
22
|
+
sort: string | undefined;
|
|
23
|
+
}
|
|
24
|
+
export interface ActiveView {
|
|
25
|
+
all: ViewItem[];
|
|
26
|
+
activeId: string | null;
|
|
27
|
+
active: ViewItem | undefined;
|
|
28
|
+
defaults: ViewDefaults;
|
|
29
|
+
clearedKey: string;
|
|
30
|
+
clearActiveView: () => void;
|
|
31
|
+
retryViews: () => void;
|
|
32
|
+
isUnresolved: boolean;
|
|
33
|
+
isHeld: boolean;
|
|
34
|
+
}
|
|
35
|
+
/** Resolves the list's active view from the `view` URL parameter. It runs above
|
|
36
|
+
* the filter, column and sort hooks because each of them falls back to it. */
|
|
37
|
+
export declare function useActiveView({ screenCode, screen, searchParams, setSearchParams, userId, tenantId, filterError, }: ActiveViewInput): ActiveView;
|
|
38
|
+
export {};
|
|
@@ -5,18 +5,19 @@ interface ListColumnLayoutInput {
|
|
|
5
5
|
screen: Screen | undefined;
|
|
6
6
|
searchParams: URLSearchParams;
|
|
7
7
|
setSearchParams: (next: URLSearchParams) => void;
|
|
8
|
+
defaultColumns: string[];
|
|
8
9
|
}
|
|
9
10
|
/** Which columns a list shows, in what order, and how wide. */
|
|
10
11
|
export interface ListColumnLayout {
|
|
11
|
-
/** The ordered visible set, from `?columns` or the
|
|
12
|
+
/** The ordered visible set, from `?columns` or the active view / screen. */
|
|
12
13
|
visible: string[];
|
|
13
14
|
/** Live widths during a drag; the device store is the durable backing. */
|
|
14
15
|
sizing: ColumnSizingState;
|
|
15
16
|
setSizing: (updater: ColumnSizingState | ((prev: ColumnSizingState) => ColumnSizingState)) => void;
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
17
|
+
/** The one path for toggle, reorder and show-all. Choosing exactly the
|
|
18
|
+
* default set writes no parameter, so it IS returning to the view. */
|
|
18
19
|
apply: (next: string[]) => void;
|
|
19
|
-
/** Back to the
|
|
20
|
+
/** Back to the view's columns, else the screen's. Widths untouched. */
|
|
20
21
|
clear: () => void;
|
|
21
22
|
/** Drag-free reorder: swap one column a slot up or down. */
|
|
22
23
|
move: (col: string, dir: "up" | "down") => void;
|
|
@@ -33,5 +34,5 @@ export interface ListColumnLayout {
|
|
|
33
34
|
* the server and never part of a saved view - which is why the two live in
|
|
34
35
|
* different places and why a resize says so the first time.
|
|
35
36
|
*/
|
|
36
|
-
export declare function useListColumnLayout({ screenCode, screen, searchParams, setSearchParams, }: ListColumnLayoutInput): ListColumnLayout;
|
|
37
|
+
export declare function useListColumnLayout({ screenCode, screen, searchParams, setSearchParams, defaultColumns, }: ListColumnLayoutInput): ListColumnLayout;
|
|
37
38
|
export {};
|
|
@@ -14,9 +14,10 @@ interface ListQueryInput {
|
|
|
14
14
|
sortForRequest: string | undefined;
|
|
15
15
|
debouncedSearch: string;
|
|
16
16
|
filters: FilterNode[];
|
|
17
|
-
/**
|
|
18
|
-
*
|
|
19
|
-
|
|
17
|
+
/** The effective query depends on a view not known yet: nothing is sent,
|
|
18
|
+
* and nothing is reported as loaded. */
|
|
19
|
+
isHeld: boolean;
|
|
20
|
+
retryHeld: () => void;
|
|
20
21
|
includeDeleted: boolean;
|
|
21
22
|
expand: string[] | undefined;
|
|
22
23
|
select: string[] | undefined;
|
|
@@ -24,7 +25,6 @@ interface ListQueryInput {
|
|
|
24
25
|
* to size its pager; a screen that loads one window and shows what it loaded
|
|
25
26
|
* would pay a request per load for a number nothing renders. */
|
|
26
27
|
runCountQuery: boolean;
|
|
27
|
-
/** The canonical form of the URL, so a change resets the stale-loading clock. */
|
|
28
28
|
urlKey: string;
|
|
29
29
|
}
|
|
30
30
|
/** One view over the rows a list screen shows, whichever source produced them. */
|
|
@@ -3,14 +3,14 @@ import { type SortCol, type SortNulls } from "../../../lib/sort.d.ts";
|
|
|
3
3
|
interface ListSortInput {
|
|
4
4
|
searchParams: URLSearchParams;
|
|
5
5
|
setSearchParams: (next: URLSearchParams) => void;
|
|
6
|
-
|
|
7
|
-
screenSortDefault: string | undefined;
|
|
6
|
+
defaultSort: string | undefined;
|
|
8
7
|
/** Commits the URL to the tab store in the same interaction, before React
|
|
9
8
|
* Router schedules the navigation. */
|
|
10
9
|
commitScreenTabSearch: (search: string) => void;
|
|
11
10
|
}
|
|
12
11
|
/** How a list is ordered, and every gesture that changes it. */
|
|
13
12
|
export interface ListSortState {
|
|
13
|
+
value: string;
|
|
14
14
|
/** The parser-filtered columns, which the header and the saved-view path read. */
|
|
15
15
|
cols: SortCol[];
|
|
16
16
|
/** Per-column NULLs placement, which TanStack's `{id, desc}` cannot model. */
|
|
@@ -21,7 +21,8 @@ export interface ListSortState {
|
|
|
21
21
|
forRequest: string | undefined;
|
|
22
22
|
/** The same order in TanStack's own shape. */
|
|
23
23
|
tableSorting: SortingState;
|
|
24
|
-
/** The one writer of the URL `sort` param.
|
|
24
|
+
/** The one writer of the URL `sort` param. An order equal to the default
|
|
25
|
+
* writes nothing; a cleared one writes `sort=`, which is no order. */
|
|
25
26
|
write: (cols: SortCol[]) => void;
|
|
26
27
|
/** Replace the whole sort with one column, as a plain header click does. */
|
|
27
28
|
applyColumn: (field: string, dir: "asc" | "desc", nulls: SortNulls | undefined) => void;
|
|
@@ -41,5 +42,5 @@ export interface ListSortState {
|
|
|
41
42
|
* Router schedules the navigation - that is what closes the mount-effect race
|
|
42
43
|
* for the header, the menu and the mobile sort sheet alike.
|
|
43
44
|
*/
|
|
44
|
-
export declare function useListSort({ searchParams, setSearchParams,
|
|
45
|
+
export declare function useListSort({ searchParams, setSearchParams, defaultSort, commitScreenTabSearch, }: ListSortInput): ListSortState;
|
|
45
46
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type FilterNode } from "../../../lib/filters.d.ts";
|
|
2
2
|
import { type Screen } from "../../../types/schema.d.ts";
|
|
3
3
|
import type { ViewItem } from "../../list/ViewSwitcher.d.ts";
|
|
4
|
+
import type { TextFn } from "../../../lib/language.d.ts";
|
|
4
5
|
interface ListViewsInput {
|
|
5
6
|
screenCode: string;
|
|
6
7
|
screen: Screen | undefined;
|
|
@@ -10,28 +11,37 @@ interface ListViewsInput {
|
|
|
10
11
|
}) => void;
|
|
11
12
|
userId: string | undefined;
|
|
12
13
|
tenantId: string | undefined;
|
|
13
|
-
/**
|
|
14
|
-
*
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
/** The screen's views and which one is active, resolved above the hooks that
|
|
15
|
+
* derive the layout from it. */
|
|
16
|
+
all: ViewItem[];
|
|
17
|
+
activeId: string | null;
|
|
18
|
+
active: ViewItem | undefined;
|
|
19
|
+
clearedKey: string;
|
|
20
|
+
/** The EFFECTIVE layout - the view's own values unless the URL overrides
|
|
21
|
+
* them. Compared against the saved one for the unsaved-change marker, and
|
|
17
22
|
* written into a save. */
|
|
18
23
|
filters: FilterNode[];
|
|
19
24
|
visibleColumns: string[];
|
|
20
|
-
sort: string
|
|
25
|
+
sort: string;
|
|
21
26
|
}
|
|
22
27
|
/** Which saved view a list screen is showing, and every way that changes. */
|
|
23
28
|
export interface ListViews {
|
|
24
29
|
all: ViewItem[];
|
|
25
30
|
activeId: string | null;
|
|
26
31
|
active: ViewItem | undefined;
|
|
32
|
+
clearedKey: string;
|
|
27
33
|
/** True when the live layout differs from what the active view saved. */
|
|
28
34
|
isDirty: boolean;
|
|
29
35
|
/** Open a view, or clear to no view. Also the reset gesture: open the same
|
|
30
36
|
* view again. */
|
|
31
37
|
apply: (view: ViewItem) => void;
|
|
38
|
+
/** Drop every override and go back to what the active view holds. */
|
|
39
|
+
discard: () => void;
|
|
32
40
|
saveAsNew: (name: string) => Promise<void>;
|
|
33
41
|
overwriteActive: () => Promise<void>;
|
|
42
|
+
deleteView: (view: ViewItem) => Promise<void>;
|
|
34
43
|
isSaving: boolean;
|
|
44
|
+
isDeleting: boolean;
|
|
35
45
|
}
|
|
36
46
|
/**
|
|
37
47
|
* The saved views a list screen offers.
|
|
@@ -39,8 +49,8 @@ export interface ListViews {
|
|
|
39
49
|
* A view owns the LOGICAL layout - filters, columns, sort - and nothing else.
|
|
40
50
|
* Column widths are per device and never travel in one.
|
|
41
51
|
*/
|
|
42
|
-
export declare function useListViews({ screenCode, screen, searchParams, setSearchParams, userId, tenantId,
|
|
52
|
+
export declare function useListViews({ screenCode, screen, searchParams, setSearchParams, userId, tenantId, all, activeId, active, clearedKey, filters, visibleColumns, sort, }: ListViewsInput): ListViews;
|
|
43
53
|
/** The name a save dialog offers to overwrite, or null when the active view is
|
|
44
54
|
* not the caller's to overwrite. */
|
|
45
|
-
export declare function overwritableViewName(active: ViewItem | undefined): string | null;
|
|
55
|
+
export declare function overwritableViewName(t: TextFn, active: ViewItem | undefined): string | null;
|
|
46
56
|
export {};
|
|
@@ -24,7 +24,6 @@ export interface UseRowMenuArgs {
|
|
|
24
24
|
icon?: string;
|
|
25
25
|
search?: string;
|
|
26
26
|
}) => void;
|
|
27
|
-
locale: string;
|
|
28
27
|
/** Peek availability for THIS surface (screen quick_peek enabled + not phone).
|
|
29
28
|
* Drives __peek suppression and the openPeek client verb. */
|
|
30
29
|
peekAllowed: boolean;
|
|
@@ -41,7 +40,7 @@ export interface RowMenu {
|
|
|
41
40
|
runRowAction: ActionRunHandler;
|
|
42
41
|
widgetContext: WidgetContext;
|
|
43
42
|
/** True when a __peek leaf survives resolution + suppression - the single
|
|
44
|
-
* source of truth for whether the hover eye button renders
|
|
43
|
+
* source of truth for whether the hover eye button renders. */
|
|
45
44
|
hasPeek: boolean;
|
|
46
45
|
}
|
|
47
|
-
export declare function useRowMenu({ row, rowId, screen, fullScreen, entity, entityCode, rowActions, tabNavigate,
|
|
46
|
+
export declare function useRowMenu({ row, rowId, screen, fullScreen, entity, entityCode, rowActions, tabNavigate, peekAllowed, hasDetailTarget, onPeek, }: UseRowMenuArgs): RowMenu;
|
|
@@ -2,3 +2,6 @@ export declare function Profile(): import("react").JSX.Element;
|
|
|
2
2
|
export declare function ProfileParamsBlock({ userId }: {
|
|
3
3
|
userId: string;
|
|
4
4
|
}): import("react").JSX.Element;
|
|
5
|
+
export declare function ProfileLanguageRow({ userId }: {
|
|
6
|
+
userId: string;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* ParamsBlock is the GENERIC, reusable parameter-editing block attached to a
|
|
4
|
-
* carrier row (a user's Profile, a tenant, or a business entity row). It is
|
|
5
|
-
* declaration-driven: it renders exactly the parameters whose `scopes:` include
|
|
6
|
-
* the carrier's scope, and nothing when that attachable set is empty (so an
|
|
7
|
-
* unrelated entity gets no block - the platform's anti-pollution rule).
|
|
8
|
-
*
|
|
9
|
-
* The single dangerous trap it defends: `$params` is a FULL-SET write. The
|
|
10
|
-
* current override set is ALWAYS sourced from the carrier's PK-detail response
|
|
11
|
-
* (`$params`); a missing `$params` key is a HARD ERROR here, never treated as an
|
|
12
|
-
* empty set (which would delete every override). Every save/reset composes the
|
|
13
|
-
* complete new set client-side and writes it through `<carrier>.__update`.
|
|
14
|
-
*/
|
|
2
|
+
/** Renders the parameters whose `scopes:` include the carrier's scope, and nothing when none do. */
|
|
15
3
|
export interface ParamsBlockProps {
|
|
16
4
|
/** Carrier entity code (the write target, e.g. "profile", "my_tenant"). */
|
|
17
5
|
carrierEntityCode: string;
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
import type { ResolvedParam } from "../../types/api.d.ts";
|
|
2
|
+
import { type TextFn } from "../../lib/language.d.ts";
|
|
3
|
+
export declare function paramSourceName(t: TextFn, source: ResolvedParam["source"]): string;
|
|
2
4
|
export declare function ErrorLine({ text }: {
|
|
3
5
|
text: string;
|
|
4
6
|
}): import("react").JSX.Element;
|
|
5
|
-
/** Compact one-line preview: scalars inline; json/structure as a summary chip. */
|
|
6
7
|
export declare function ValuePreview({ type, value, structure }: {
|
|
7
8
|
type: string;
|
|
8
9
|
value: unknown;
|
|
9
10
|
structure?: string;
|
|
10
11
|
}): import("react").JSX.Element;
|
|
11
|
-
/**
|
|
12
|
-
* EditParamDialog renders the typed editor for one parameter and calls onSave
|
|
13
|
-
* with the parsed, typed value (throwing invalid input inline before onSave).
|
|
14
|
-
* The caller composes the full `$params` set and performs the write.
|
|
15
|
-
*/
|
|
16
12
|
export declare function EditParamDialog({ param, current, error, onCancel, onSave }: {
|
|
17
13
|
param: ResolvedParam;
|
|
18
14
|
current: unknown;
|
|
@@ -20,9 +16,5 @@ export declare function EditParamDialog({ param, current, error, onCancel, onSav
|
|
|
20
16
|
onCancel: () => void;
|
|
21
17
|
onSave: (value: unknown) => Promise<void> | void;
|
|
22
18
|
}): import("react").JSX.Element;
|
|
23
|
-
/**
|
|
24
|
-
* paramTenantEditable reports whether a param is editable at TENANT scope:
|
|
25
|
-
* empty scopes AND non-server category, OR scopes explicitly admits `tenant`
|
|
26
|
-
* (the server-category waiver case, e.g. mailer_backend). Others are read-only.
|
|
27
|
-
*/
|
|
19
|
+
/** No `scopes:` admits tenant for a non-server category; a server category needs `tenant` listed. */
|
|
28
20
|
export declare function paramTenantEditable(param: ResolvedParam): boolean;
|
|
@@ -3,8 +3,7 @@ interface ClassifiedFieldLockedProps {
|
|
|
3
3
|
tier: string;
|
|
4
4
|
tierDef?: ClassificationTierDef;
|
|
5
5
|
requiredPermission?: string;
|
|
6
|
-
locale?: string;
|
|
7
6
|
variant?: "value" | "input";
|
|
8
7
|
}
|
|
9
|
-
export declare function ClassifiedFieldLocked({ tier, tierDef, requiredPermission,
|
|
8
|
+
export declare function ClassifiedFieldLocked({ tier, tierDef, requiredPermission, variant, }: ClassifiedFieldLockedProps): import("react").JSX.Element;
|
|
10
9
|
export {};
|
|
@@ -8,9 +8,9 @@ interface DynamicIconProps {
|
|
|
8
8
|
/**
|
|
9
9
|
* Resolve and render a DSL `icon:` name. Subscribes to the icon registry via
|
|
10
10
|
* useSyncExternalStore so a late or replaced registry (identity switch
|
|
11
|
-
* re-fetch) re-renders every mounted icon
|
|
11
|
+
* re-fetch) re-renders every mounted icon.
|
|
12
12
|
*
|
|
13
|
-
* Precedence
|
|
13
|
+
* Precedence:
|
|
14
14
|
* 1. registry entry for `name` (svg | url | lucide) - consumer-declared DATA
|
|
15
15
|
* 2. built-in glyph `Icon[name]` (the bundled ~119)
|
|
16
16
|
* 3. literal `lucide:<name>` prefix - lazy Lucide
|
|
@@ -10,7 +10,7 @@ interface LucideIconProps {
|
|
|
10
10
|
* Render a Lucide glyph by name, loading both the import map and the icon's
|
|
11
11
|
* chunk lazily on first use (lucide-react stays out of the eager bundle). An
|
|
12
12
|
* unknown Lucide name falls back to the built-in `folder` glyph - the same miss
|
|
13
|
-
* behaviour as the rest of the resolver
|
|
13
|
+
* behaviour as the rest of the resolver.
|
|
14
14
|
*/
|
|
15
15
|
export declare function LucideIcon({ name, size, className, style }: LucideIconProps): import("react").JSX.Element | null;
|
|
16
16
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Whether the refresh THIS control started is still running. A control driven
|
|
3
3
|
* by its query's flag reports somebody else's work and sits disabled exactly
|
|
4
|
-
* when a person reaches for it.
|
|
4
|
+
* when a person reaches for it.
|
|
5
5
|
*/
|
|
6
6
|
export declare function useOwnRefresh(refetch: () => unknown): {
|
|
7
7
|
refreshing: boolean;
|