@declarion/react 0.1.80 → 0.1.81
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-CcXR8Vm6.js → DraggableChildrenTable-XKJWMb1S.js} +2 -2
- package/dist-lib/{DraggableChildrenTable-CcXR8Vm6.js.map → DraggableChildrenTable-XKJWMb1S.js.map} +1 -1
- package/dist-lib/{Grid-CseTLMLv.js → Grid-By_Ere-W.js} +2 -2
- package/dist-lib/{Grid-CseTLMLv.js.map → Grid-By_Ere-W.js.map} +1 -1
- package/dist-lib/{JsonEditor-Tew1oNqZ.js → JsonEditor-CexL5HXN.js} +17 -15
- package/dist-lib/JsonEditor-CexL5HXN.js.map +1 -0
- package/dist-lib/api/events.d.ts +5 -0
- package/dist-lib/components/fields/BoolField.d.ts +1 -1
- package/dist-lib/components/fields/EmailField.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/JsonEditor.d.ts +2 -1
- package/dist-lib/components/fields/JsonField.d.ts +1 -1
- 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/PhoneField.d.ts +1 -1
- package/dist-lib/components/fields/RefField.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/StringField.d.ts +1 -1
- package/dist-lib/components/fields/TextField.d.ts +1 -1
- package/dist-lib/components/fields/TimestampField.d.ts +1 -1
- package/dist-lib/components/fields/UrlField.d.ts +1 -1
- package/dist-lib/components/fields/index.d.ts +2 -0
- package/dist-lib/components/file-widgets/host.d.ts +2 -0
- package/dist-lib/components/file-widgets/types.d.ts +1 -0
- package/dist-lib/components/pages/list/DataCell.d.ts +7 -0
- package/dist-lib/components/pages/list/ListBulkBar.d.ts +27 -0
- package/dist-lib/components/pages/list/ListHeader.d.ts +23 -0
- package/dist-lib/components/pages/list/RowActionsCell.d.ts +38 -0
- package/dist-lib/components/pages/list/SaveViewDialog.d.ts +6 -0
- package/dist-lib/components/pages/list/columns.d.ts +42 -0
- package/dist-lib/components/pages/list/filter-meta.d.ts +9 -0
- package/dist-lib/components/primitives/BoolToggle.d.ts +3 -1
- package/dist-lib/components/primitives/Fields.d.ts +12 -3
- package/dist-lib/index.js +4189 -4066
- package/dist-lib/index.js.map +1 -1
- package/dist-lib/lib/action-dispatch.d.ts +7 -0
- package/dist-lib/stores/realtime.d.ts +9 -0
- package/dist-lib/types/schema.d.ts +11 -1
- package/dist-lib/{useUserLocale-D9wc5kzQ.js → useUserLocale-CSS6fwi8.js} +1110 -1003
- package/dist-lib/useUserLocale-CSS6fwi8.js.map +1 -0
- package/dist-lib/{value-FIp50R1-.js → value-DgzPSFZM.js} +149 -196
- package/dist-lib/value-DgzPSFZM.js.map +1 -0
- package/package.json +1 -1
- package/dist-lib/JsonEditor-Tew1oNqZ.js.map +0 -1
- package/dist-lib/components/shared/RowActionItem.d.ts +0 -11
- package/dist-lib/useUserLocale-D9wc5kzQ.js.map +0 -1
- package/dist-lib/value-FIp50R1-.js.map +0 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { Action, Entity, Screen } from "../../../types/schema";
|
|
2
|
+
export interface RowActionsCellProps {
|
|
3
|
+
row: Record<string, unknown>;
|
|
4
|
+
rowId: string;
|
|
5
|
+
/** detail_screen for row-click navigation. The component reads
|
|
6
|
+
* screen.action_layout via cast to ResolvedActionLayoutNode[] (server emits
|
|
7
|
+
* the resolved wire shape per plan §8 even though the raw Screen TS type
|
|
8
|
+
* declares ActionLayoutNode[] for authoring). */
|
|
9
|
+
screen: {
|
|
10
|
+
detail_screen?: string;
|
|
11
|
+
};
|
|
12
|
+
/** Full Screen object used to build the row-scoped WidgetContext that the
|
|
13
|
+
* ResponsiveActionBar dispatcher passes to href/widget action modes. */
|
|
14
|
+
fullScreen: Screen;
|
|
15
|
+
entity: Entity;
|
|
16
|
+
entityCode?: string;
|
|
17
|
+
/** Gate flags that determine whether the kebab column renders at all.
|
|
18
|
+
* After the unified-toolbar Phase 1 cleanup the kebab's Edit/Delete
|
|
19
|
+
* affordances come from the __edit / __delete platform-default actions
|
|
20
|
+
* (injected server-side at load), so these flags now only control
|
|
21
|
+
* column visibility - the legacy trailing-item content they once
|
|
22
|
+
* feed has been removed. */
|
|
23
|
+
hasDefaultEditAction: boolean;
|
|
24
|
+
hasDefaultDeleteAction: boolean;
|
|
25
|
+
rowActions: {
|
|
26
|
+
code: string;
|
|
27
|
+
action: Action;
|
|
28
|
+
}[];
|
|
29
|
+
tabNavigate: (href: string, opts?: {
|
|
30
|
+
title?: string;
|
|
31
|
+
icon?: string;
|
|
32
|
+
search?: string;
|
|
33
|
+
}) => void;
|
|
34
|
+
onPeek?: () => void;
|
|
35
|
+
/** Active UI locale, forwarded into the row-scoped WidgetContext. */
|
|
36
|
+
locale: string;
|
|
37
|
+
}
|
|
38
|
+
export declare function RowActionsCell({ row, rowId, screen, fullScreen, entity, entityCode, hasDefaultEditAction, hasDefaultDeleteAction, rowActions, tabNavigate, onPeek, locale, }: RowActionsCellProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type RefObject } from "react";
|
|
2
|
+
import type { ColumnDef } from "@tanstack/react-table";
|
|
3
|
+
import { type RefsMap } from "../../../components/fields/cells/registry";
|
|
4
|
+
import type { Action, Entity, Screen } from "../../../types/schema";
|
|
5
|
+
type RowData = Record<string, unknown>;
|
|
6
|
+
type SchemaMaps = {
|
|
7
|
+
entities?: Record<string, Entity>;
|
|
8
|
+
screens?: Record<string, Screen>;
|
|
9
|
+
};
|
|
10
|
+
export interface BuildListColumnsArgs {
|
|
11
|
+
/** Visible column keys from URL state (not the full screen.columns pool). */
|
|
12
|
+
visibleCols: string[];
|
|
13
|
+
entity: Entity | undefined;
|
|
14
|
+
screen: Screen | undefined;
|
|
15
|
+
schema: SchemaMaps | undefined;
|
|
16
|
+
entityCode: string | undefined;
|
|
17
|
+
/** list_row-slot actions resolved by getScreenActions. */
|
|
18
|
+
rowActions: {
|
|
19
|
+
code: string;
|
|
20
|
+
action: Action;
|
|
21
|
+
}[];
|
|
22
|
+
hasBatchActions: boolean;
|
|
23
|
+
/** True when the screen explicitly binds row_actions (controls full menu). */
|
|
24
|
+
hasExplicitRowActions: boolean;
|
|
25
|
+
canUpdate: boolean;
|
|
26
|
+
canDelete: boolean;
|
|
27
|
+
peekEnabled: boolean;
|
|
28
|
+
userLocale: string;
|
|
29
|
+
tabNavigate: (href: string, opts?: {
|
|
30
|
+
title?: string;
|
|
31
|
+
icon?: string;
|
|
32
|
+
search?: string;
|
|
33
|
+
}) => void;
|
|
34
|
+
/** Latest $refs payload, read through a ref so column identity is stable
|
|
35
|
+
* across data fetches (see SmartListPageInner refsRef comment). */
|
|
36
|
+
refsRef: RefObject<RefsMap | undefined>;
|
|
37
|
+
/** Row-selection key, used as the stable rowId for per-row action dispatch. */
|
|
38
|
+
rowSelectionKey: (entity: Entity, row: RowData) => string;
|
|
39
|
+
setPeekRow: (row: RowData) => void;
|
|
40
|
+
}
|
|
41
|
+
export declare function buildListColumns(args: BuildListColumnsArgs): ColumnDef<RowData>[];
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Entity } from "../../../types/schema";
|
|
2
|
+
import type { FilterFieldMeta } from "../../../components/filters/FilterDrawer";
|
|
3
|
+
import type { FilterOp } from "../../../lib/filters";
|
|
4
|
+
/** Build FilterFieldMeta array from screen + entity for the FilterDrawer. */
|
|
5
|
+
export declare function buildFilterFieldMeta(screen: {
|
|
6
|
+
filters?: string[];
|
|
7
|
+
} | undefined, entity: Pick<Entity, "fields" | "status_groups" | "properties"> | undefined, entities?: Record<string, Entity>): FilterFieldMeta[];
|
|
8
|
+
/** Map field type to available filter operators. */
|
|
9
|
+
export declare function fieldTypeToOperators(type: string): FilterOp[];
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export type BoolToggleProps = {
|
|
2
2
|
value?: boolean;
|
|
3
3
|
onChange?: (v: boolean) => void;
|
|
4
|
+
id?: string;
|
|
5
|
+
ariaLabelledby?: string;
|
|
4
6
|
};
|
|
5
|
-
export declare function BoolToggle({ value, onChange }: BoolToggleProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function BoolToggle({ value, onChange, id, ariaLabelledby }: BoolToggleProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -19,8 +19,11 @@ export type TextAreaProps = {
|
|
|
19
19
|
placeholder?: string;
|
|
20
20
|
rows?: number;
|
|
21
21
|
fill?: boolean;
|
|
22
|
+
id?: string;
|
|
23
|
+
name?: string;
|
|
24
|
+
ariaRequired?: boolean;
|
|
22
25
|
};
|
|
23
|
-
export declare function TextArea({ value, onChange, placeholder, rows, fill }: TextAreaProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare function TextArea({ value, onChange, placeholder, rows, fill, id, name, ariaRequired }: TextAreaProps): import("react/jsx-runtime").JSX.Element;
|
|
24
27
|
export type SelectOption = {
|
|
25
28
|
value: string;
|
|
26
29
|
label: ReactNode;
|
|
@@ -42,8 +45,11 @@ export type PasswordInputProps = {
|
|
|
42
45
|
onChange?: (v: string) => void;
|
|
43
46
|
placeholder?: string;
|
|
44
47
|
showStrength?: boolean;
|
|
48
|
+
id?: string;
|
|
49
|
+
name?: string;
|
|
50
|
+
ariaRequired?: boolean;
|
|
45
51
|
};
|
|
46
|
-
export declare function PasswordInput({ value, onChange, placeholder, showStrength, }: PasswordInputProps): import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
export declare function PasswordInput({ value, onChange, placeholder, showStrength, id, name, ariaRequired, }: PasswordInputProps): import("react/jsx-runtime").JSX.Element;
|
|
47
53
|
export type TagsInputProps = {
|
|
48
54
|
value?: string[];
|
|
49
55
|
onChange: (v: string[]) => void;
|
|
@@ -63,8 +69,11 @@ export type RefFieldProps = {
|
|
|
63
69
|
entity?: string;
|
|
64
70
|
onChange?: (v: string) => void;
|
|
65
71
|
items?: RefFieldItem[];
|
|
72
|
+
id?: string;
|
|
73
|
+
ariaLabelledby?: string;
|
|
74
|
+
ariaRequired?: boolean;
|
|
66
75
|
};
|
|
67
|
-
export declare function RefField({ value, entity, onChange, items }: RefFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
76
|
+
export declare function RefField({ value, entity, onChange, items, id, ariaLabelledby, ariaRequired }: RefFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
68
77
|
export type ViewFieldProps = {
|
|
69
78
|
label: ReactNode;
|
|
70
79
|
children?: ReactNode;
|