@declarion/react 0.446.0 → 0.517.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/components/agents/AgentChatPanel.impl.js +349 -332
- package/dist-lib/components/detail-layout/DetailAuditStrip.js +1 -1
- package/dist-lib/components/detail-layout/EvidenceBlock.js +36 -24
- package/dist-lib/components/detail-layout/FieldRow.js +56 -60
- package/dist-lib/components/detail-layout/FieldsBlock.js +48 -47
- package/dist-lib/components/detail-layout/PropertiesBlock.js +42 -41
- package/dist-lib/components/detail-layout/labelLayout.js +35 -0
- package/dist-lib/components/fields/JsonField.js +128 -125
- package/dist-lib/components/fields/StringField.js +10 -25
- package/dist-lib/components/fields/StructureField.js +125 -167
- package/dist-lib/components/fields/ValueRows.js +114 -0
- package/dist-lib/components/fields/cells/factories/id.js +10 -0
- package/dist-lib/components/fields/cells/factories/nextRun.js +18 -27
- package/dist-lib/components/fields/cells/factories/refLink.js +15 -41
- package/dist-lib/components/fields/cells/registry.js +25 -23
- package/dist-lib/components/file-widgets/DocumentCard.js +142 -142
- package/dist-lib/components/file-widgets/helpers.js +32 -19
- package/dist-lib/components/file-widgets/host.js +4 -1
- package/dist-lib/components/list/PeekFieldCell.js +57 -55
- package/dist-lib/components/list/QuickPeek.js +109 -121
- package/dist-lib/components/pages/SmartDetailPage.impl.js +403 -400
- package/dist-lib/components/pages/SmartListPage.impl.js +260 -260
- package/dist-lib/components/pages/list/ListCardRow.js +101 -100
- package/dist-lib/components/pages/list/cardProjection.js +117 -112
- package/dist-lib/components/pages/list/useListQuery.js +1 -1
- package/dist-lib/components/pages/list/useListRowInteraction.js +68 -65
- package/dist-lib/components/primitives/IdBadge.js +27 -0
- package/dist-lib/components/primitives/RowField.js +11 -43
- package/dist-lib/components/shared/CopyButton.js +13 -18
- package/dist-lib/components/shared/RefChip.js +33 -0
- package/dist-lib/declarion-react.css +1 -1
- package/dist-lib/hooks/useAgentConversation.js +134 -110
- package/dist-lib/hooks/useCopy.js +18 -0
- package/dist-lib/index.d.ts +55 -20
- package/dist-lib/index.js +116 -111
- package/dist-lib/lib/realtime-reconcile.js +70 -59
- package/dist-lib/lib/reference.js +52 -34
- package/dist-lib/lib/short-id.js +12 -0
- package/dist-lib/testing.d.ts +1 -1
- package/dist-lib/types/schema.js +84 -80
- package/dist-lib/{useResponsiveMode-3hOLBkey.d.ts → useResponsiveMode-BObVfNyN.d.ts} +7 -2
- package/package.json +6 -1
- package/dist-lib/components/primitives/RecordIdBadge.js +0 -25
|
@@ -14,63 +14,65 @@ function d(e) {
|
|
|
14
14
|
let t = e.display?.widget;
|
|
15
15
|
return t && u.has(t) ? !0 : u.has(e.type);
|
|
16
16
|
}
|
|
17
|
-
function f({ field: u, fieldName: f,
|
|
18
|
-
let
|
|
17
|
+
function f({ field: u, fieldName: f, entityCode: p, label: m, value: h, record: g, refs: _, entities: v, screens: y, readOnly: b, onCommit: x }) {
|
|
18
|
+
let S = r(), C = b || !!u.ref?.entity_field, [w, T] = o(!1), [E, D] = o(h), O = d(u);
|
|
19
19
|
a(() => {
|
|
20
|
-
|
|
21
|
-
}, [
|
|
22
|
-
let
|
|
23
|
-
|
|
24
|
-
}, [
|
|
25
|
-
|
|
26
|
-
}, [
|
|
27
|
-
|
|
28
|
-
}, [
|
|
29
|
-
if (
|
|
20
|
+
w || D(h);
|
|
21
|
+
}, [h, w]);
|
|
22
|
+
let k = i(() => {
|
|
23
|
+
C || (D(h), T(!0));
|
|
24
|
+
}, [C, h]), A = i((e) => {
|
|
25
|
+
x(e === void 0 ? E : e), T(!1);
|
|
26
|
+
}, [x, E]), j = i(() => {
|
|
27
|
+
D(h), T(!1);
|
|
28
|
+
}, [h]), M = i((e) => {
|
|
29
|
+
if (C || w) return;
|
|
30
30
|
let t = e.target;
|
|
31
|
-
t.closest("a") || t.closest("[data-peek-pencil=\"true\"]") ||
|
|
31
|
+
t.closest("a") || t.closest("[data-peek-pencil=\"true\"]") || k();
|
|
32
32
|
}, [
|
|
33
|
-
S,
|
|
34
33
|
C,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
w,
|
|
35
|
+
k
|
|
36
|
+
]), N = i((e) => {
|
|
37
|
+
w ? O || (e.key === "Enter" ? (e.preventDefault(), e.stopPropagation(), A()) : e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), j())) : C || e.target !== e.currentTarget || e.key !== "Enter" && e.key !== " " || (e.preventDefault(), k());
|
|
38
38
|
}, [
|
|
39
|
-
|
|
40
|
-
D,
|
|
41
|
-
S,
|
|
39
|
+
w,
|
|
42
40
|
O,
|
|
41
|
+
C,
|
|
43
42
|
k,
|
|
44
|
-
A
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
A,
|
|
44
|
+
j
|
|
45
|
+
]), P = i((e) => {
|
|
46
|
+
O ? (D(e), A(e)) : D(e);
|
|
47
|
+
}, [O, A]), F = n({
|
|
48
48
|
field: u,
|
|
49
49
|
fieldName: f,
|
|
50
|
-
|
|
50
|
+
entityCode: p,
|
|
51
|
+
value: h,
|
|
51
52
|
mode: "display",
|
|
52
|
-
record:
|
|
53
|
-
refs:
|
|
54
|
-
entities:
|
|
55
|
-
screens:
|
|
56
|
-
t:
|
|
57
|
-
}),
|
|
53
|
+
record: g,
|
|
54
|
+
refs: _,
|
|
55
|
+
entities: v,
|
|
56
|
+
screens: y,
|
|
57
|
+
t: S
|
|
58
|
+
}), I = w ? n({
|
|
58
59
|
field: u,
|
|
59
60
|
fieldName: f,
|
|
60
|
-
|
|
61
|
+
entityCode: p,
|
|
62
|
+
value: E,
|
|
61
63
|
mode: "edit",
|
|
62
|
-
onChange:
|
|
63
|
-
record:
|
|
64
|
-
refs:
|
|
65
|
-
t:
|
|
64
|
+
onChange: P,
|
|
65
|
+
record: g,
|
|
66
|
+
refs: _,
|
|
67
|
+
t: S
|
|
66
68
|
}) : null;
|
|
67
69
|
return /* @__PURE__ */ c("div", {
|
|
68
70
|
className: "peek-field-cell",
|
|
69
|
-
"data-editing":
|
|
70
|
-
onClick:
|
|
71
|
-
onKeyDown:
|
|
71
|
+
"data-editing": w ? "true" : "false",
|
|
72
|
+
onClick: M,
|
|
73
|
+
onKeyDown: N,
|
|
72
74
|
onMouseEnter: (e) => {
|
|
73
|
-
|
|
75
|
+
C || w || (e.currentTarget.style.borderColor = "var(--border)");
|
|
74
76
|
},
|
|
75
77
|
onMouseLeave: (e) => {
|
|
76
78
|
e.currentTarget.style.borderColor = "transparent";
|
|
@@ -84,13 +86,13 @@ function f({ field: u, fieldName: f, label: p, value: m, record: h, refs: g, ent
|
|
|
84
86
|
margin: "-4px -6px",
|
|
85
87
|
borderRadius: "var(--radius-sm)",
|
|
86
88
|
minHeight: 28,
|
|
87
|
-
cursor:
|
|
89
|
+
cursor: C || w ? "default" : "text",
|
|
88
90
|
border: "1px dashed transparent"
|
|
89
91
|
},
|
|
90
|
-
tabIndex:
|
|
91
|
-
role:
|
|
92
|
-
"aria-label":
|
|
93
|
-
children:
|
|
92
|
+
tabIndex: C || w ? -1 : 0,
|
|
93
|
+
role: C || w ? void 0 : "button",
|
|
94
|
+
"aria-label": C || w ? void 0 : S("list.peek.edit_field", "Edit {field}", { field: m }),
|
|
95
|
+
children: w ? /* @__PURE__ */ l("div", {
|
|
94
96
|
style: {
|
|
95
97
|
display: "flex",
|
|
96
98
|
alignItems: "center",
|
|
@@ -103,25 +105,25 @@ function f({ field: u, fieldName: f, label: p, value: m, record: h, refs: g, ent
|
|
|
103
105
|
flex: 1,
|
|
104
106
|
minWidth: 0
|
|
105
107
|
},
|
|
106
|
-
children:
|
|
107
|
-
}), !
|
|
108
|
+
children: I
|
|
109
|
+
}), !O && /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(t, {
|
|
108
110
|
size: 24,
|
|
109
111
|
icon: /* @__PURE__ */ c(e.check, { size: 13 }),
|
|
110
|
-
onClick: () =>
|
|
111
|
-
title:
|
|
112
|
+
onClick: () => A(),
|
|
113
|
+
title: S("dialog.save", "Save")
|
|
112
114
|
}), /* @__PURE__ */ c(t, {
|
|
113
115
|
size: 24,
|
|
114
116
|
icon: /* @__PURE__ */ c(e.x, { size: 13 }),
|
|
115
|
-
onClick:
|
|
116
|
-
title:
|
|
117
|
+
onClick: j,
|
|
118
|
+
title: S("dialog.cancel", "Cancel")
|
|
117
119
|
})] })]
|
|
118
120
|
}) : /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c("div", {
|
|
119
121
|
style: {
|
|
120
122
|
flex: 1,
|
|
121
123
|
minWidth: 0
|
|
122
124
|
},
|
|
123
|
-
children:
|
|
124
|
-
}), !
|
|
125
|
+
children: F
|
|
126
|
+
}), !C && /* @__PURE__ */ c("span", {
|
|
125
127
|
"data-peek-pencil": "true",
|
|
126
128
|
style: {
|
|
127
129
|
position: "absolute",
|
|
@@ -134,9 +136,9 @@ function f({ field: u, fieldName: f, label: p, value: m, record: h, refs: g, ent
|
|
|
134
136
|
size: 20,
|
|
135
137
|
icon: /* @__PURE__ */ c(e.edit, { size: 12 }),
|
|
136
138
|
onClick: (e) => {
|
|
137
|
-
e.stopPropagation(),
|
|
139
|
+
e.stopPropagation(), k();
|
|
138
140
|
},
|
|
139
|
-
title:
|
|
141
|
+
title: S("list.record.edit", "Edit")
|
|
140
142
|
})
|
|
141
143
|
})] })
|
|
142
144
|
});
|
|
@@ -4,80 +4,81 @@ import { Icon as n } from "../primitives/Icons.js";
|
|
|
4
4
|
import { IconBtn as r } from "../primitives/IconBtn.js";
|
|
5
5
|
import { Kbd as i } from "../primitives/Kbd.js";
|
|
6
6
|
import { renderSchemaField as a } from "../file-widgets/host.js";
|
|
7
|
-
import { useActionRunner as
|
|
8
|
-
import { PeekFieldCell as
|
|
9
|
-
import { applyRowState as
|
|
10
|
-
import { ResponsiveActionBar as
|
|
7
|
+
import { useActionRunner as o } from "../actions/ActionRunner.js";
|
|
8
|
+
import { PeekFieldCell as s } from "./PeekFieldCell.js";
|
|
9
|
+
import { applyRowState as c, defaultFlatForSlot as l, filterLayoutForSlot as u } from "../../lib/actions.js";
|
|
10
|
+
import { ResponsiveActionBar as ee } from "../actions/ResponsiveActionBar.js";
|
|
11
11
|
import { effectiveScreenForRecord as d, variantActionCodesForRecord as f } from "../../lib/variants.js";
|
|
12
|
-
import { useText as
|
|
13
|
-
import { useRowTenant as
|
|
12
|
+
import { useText as p } from "../../hooks/useText.js";
|
|
13
|
+
import { useRowTenant as te } from "../../hooks/useRowTenant.js";
|
|
14
14
|
import { useUnsavedInput as m } from "../../hooks/useUnsavedInput.js";
|
|
15
15
|
import { textWithNodes as ne } from "../../lib/language.js";
|
|
16
16
|
import { inheritRowReferences as h } from "../../lib/reference.js";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
17
|
+
import { FieldRow as g, FieldsGrid as _, NESTED_FIELD_TYPES as v, SPAN_FIELD_TYPES as re } from "../detail-layout/FieldRow.js";
|
|
18
|
+
import { useEffect as y, useMemo as ie, useRef as b, useState as x } from "react";
|
|
19
|
+
import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
19
20
|
// src/components/list/QuickPeek.tsx
|
|
20
|
-
var
|
|
21
|
+
var T = {
|
|
21
22
|
tab: "Tab",
|
|
22
23
|
esc: "Esc"
|
|
23
24
|
};
|
|
24
|
-
function
|
|
25
|
-
let
|
|
26
|
-
m(
|
|
27
|
-
let
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}, [
|
|
31
|
-
|
|
25
|
+
function E({ entity: E, entityCode: D, record: O, title: k, recordId: A, avatarName: ae, fields: j, refs: M, entities: N, screens: P, screen: F, actions: I, screenActionLayout: L, entityActionLayout: R, executeAction: z, onClose: B, onOpen: V, onSave: H }) {
|
|
26
|
+
let U = p(), W = te(E), [G, K] = x(() => h(O, { ...O })), [q, J] = x(!1);
|
|
27
|
+
m(q);
|
|
28
|
+
let Y = b(null), { run: oe } = o(), X = d(E, F, G);
|
|
29
|
+
y(() => {
|
|
30
|
+
K(h(O, { ...O })), J(!1);
|
|
31
|
+
}, [O]), y(() => {
|
|
32
|
+
Y.current?.focus();
|
|
32
33
|
}, []);
|
|
33
|
-
let Z =
|
|
34
|
-
let e = X?.action_layout ??
|
|
35
|
-
return
|
|
34
|
+
let Z = ie(() => {
|
|
35
|
+
let e = X?.action_layout ?? L ?? R ?? l(I, "quick_peek"), t = u(e, I, void 0, "quick_peek");
|
|
36
|
+
return c(U, t, I, void 0, G, [], W, f(E, G));
|
|
36
37
|
}, [
|
|
37
|
-
|
|
38
|
+
U,
|
|
38
39
|
X?.action_layout,
|
|
39
|
-
I,
|
|
40
40
|
L,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
R,
|
|
42
|
+
I,
|
|
43
|
+
G,
|
|
44
|
+
E,
|
|
45
|
+
W
|
|
46
|
+
]), se = ({ code: e, action: t }) => {
|
|
47
|
+
oe({
|
|
47
48
|
action: t,
|
|
48
|
-
title:
|
|
49
|
-
row:
|
|
50
|
-
execute: (n) =>
|
|
49
|
+
title: U(t.display?.name) || e,
|
|
50
|
+
row: G,
|
|
51
|
+
execute: (n) => z(e, t, n)
|
|
51
52
|
});
|
|
52
53
|
}, Q = (e, t) => {
|
|
53
|
-
let n = h(
|
|
54
|
-
...
|
|
54
|
+
let n = h(O, {
|
|
55
|
+
...G,
|
|
55
56
|
[e]: t
|
|
56
57
|
});
|
|
57
|
-
|
|
58
|
-
},
|
|
59
|
-
return /* @__PURE__ */ S
|
|
60
|
-
onClick:
|
|
58
|
+
K(n), J(!0), H?.(n);
|
|
59
|
+
}, ce = X?.quick_peek?.width ?? 480, $ = j.some((e) => !e.readOnly && (e.kind !== "field" || !e.field.ref?.entity_field));
|
|
60
|
+
return /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C("div", {
|
|
61
|
+
onClick: B,
|
|
61
62
|
style: {
|
|
62
63
|
position: "fixed",
|
|
63
64
|
inset: 0,
|
|
64
65
|
background: "var(--scrim-lite)",
|
|
65
66
|
zIndex: 40
|
|
66
67
|
}
|
|
67
|
-
}), /* @__PURE__ */
|
|
68
|
-
ref:
|
|
68
|
+
}), /* @__PURE__ */ w("aside", {
|
|
69
|
+
ref: Y,
|
|
69
70
|
role: "dialog",
|
|
70
|
-
"aria-label":
|
|
71
|
+
"aria-label": U("list.peek.dialog", "Quick peek"),
|
|
71
72
|
tabIndex: -1,
|
|
72
73
|
onKeyDown: (e) => {
|
|
73
|
-
e.key === "Escape" &&
|
|
74
|
+
e.key === "Escape" && B();
|
|
74
75
|
},
|
|
75
76
|
style: {
|
|
76
77
|
position: "fixed",
|
|
77
78
|
top: "var(--topbar-h)",
|
|
78
79
|
right: 0,
|
|
79
80
|
bottom: "var(--tabbar-h)",
|
|
80
|
-
width:
|
|
81
|
+
width: ce,
|
|
81
82
|
background: "var(--surface)",
|
|
82
83
|
borderLeft: "1px solid var(--border)",
|
|
83
84
|
zIndex: 41,
|
|
@@ -86,7 +87,7 @@ function w({ entity: w, entityCode: E, record: D, title: O, recordId: k, avatarN
|
|
|
86
87
|
boxShadow: "var(--shadow-lg)"
|
|
87
88
|
},
|
|
88
89
|
children: [
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ w("div", {
|
|
90
91
|
style: {
|
|
91
92
|
display: "flex",
|
|
92
93
|
alignItems: "center",
|
|
@@ -95,16 +96,16 @@ function w({ entity: w, entityCode: E, record: D, title: O, recordId: k, avatarN
|
|
|
95
96
|
gap: 10
|
|
96
97
|
},
|
|
97
98
|
children: [
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
-
name:
|
|
99
|
+
/* @__PURE__ */ C(e, {
|
|
100
|
+
name: ae || k,
|
|
100
101
|
size: 28
|
|
101
102
|
}),
|
|
102
|
-
/* @__PURE__ */
|
|
103
|
+
/* @__PURE__ */ w("div", {
|
|
103
104
|
style: {
|
|
104
105
|
flex: 1,
|
|
105
106
|
minWidth: 0
|
|
106
107
|
},
|
|
107
|
-
children: [/* @__PURE__ */
|
|
108
|
+
children: [/* @__PURE__ */ C("div", {
|
|
108
109
|
style: {
|
|
109
110
|
fontSize: 14,
|
|
110
111
|
fontWeight: 600,
|
|
@@ -113,29 +114,29 @@ function w({ entity: w, entityCode: E, record: D, title: O, recordId: k, avatarN
|
|
|
113
114
|
textOverflow: "ellipsis",
|
|
114
115
|
whiteSpace: "nowrap"
|
|
115
116
|
},
|
|
116
|
-
children:
|
|
117
|
-
}),
|
|
117
|
+
children: k
|
|
118
|
+
}), A && /* @__PURE__ */ C("div", {
|
|
118
119
|
className: "mono",
|
|
119
120
|
style: {
|
|
120
121
|
fontSize: 11,
|
|
121
122
|
color: "var(--text-4)"
|
|
122
123
|
},
|
|
123
|
-
children:
|
|
124
|
+
children: A
|
|
124
125
|
})]
|
|
125
126
|
}),
|
|
126
|
-
/* @__PURE__ */
|
|
127
|
-
icon: /* @__PURE__ */
|
|
128
|
-
title:
|
|
129
|
-
onClick: () =>
|
|
127
|
+
/* @__PURE__ */ C(r, {
|
|
128
|
+
icon: /* @__PURE__ */ C(n.external, { size: 13 }),
|
|
129
|
+
title: q ? U("list.peek.open_in_tab_dirty", "Open in tab (keeps unsaved changes)") : U("list.peek.open_in_tab", "Open in tab"),
|
|
130
|
+
onClick: () => V(q ? G : null)
|
|
130
131
|
}),
|
|
131
|
-
/* @__PURE__ */
|
|
132
|
-
icon: /* @__PURE__ */
|
|
133
|
-
title:
|
|
134
|
-
onClick:
|
|
132
|
+
/* @__PURE__ */ C(r, {
|
|
133
|
+
icon: /* @__PURE__ */ C(n.x, { size: 14 }),
|
|
134
|
+
title: U("list.peek.close", "Close"),
|
|
135
|
+
onClick: B
|
|
135
136
|
})
|
|
136
137
|
]
|
|
137
138
|
}),
|
|
138
|
-
/* @__PURE__ */
|
|
139
|
+
/* @__PURE__ */ w("div", {
|
|
139
140
|
style: {
|
|
140
141
|
flex: 1,
|
|
141
142
|
overflowY: "auto",
|
|
@@ -144,7 +145,7 @@ function w({ entity: w, entityCode: E, record: D, title: O, recordId: k, avatarN
|
|
|
144
145
|
flexDirection: "column",
|
|
145
146
|
gap: 10
|
|
146
147
|
},
|
|
147
|
-
children: [/* @__PURE__ */
|
|
148
|
+
children: [/* @__PURE__ */ w("div", {
|
|
148
149
|
style: {
|
|
149
150
|
padding: "8px 10px",
|
|
150
151
|
background: "var(--accent-soft)",
|
|
@@ -155,37 +156,43 @@ function w({ entity: w, entityCode: E, record: D, title: O, recordId: k, avatarN
|
|
|
155
156
|
alignItems: "center",
|
|
156
157
|
gap: 6
|
|
157
158
|
},
|
|
158
|
-
children: [$ && /* @__PURE__ */
|
|
159
|
-
tab: /* @__PURE__ */
|
|
160
|
-
esc: /* @__PURE__ */
|
|
159
|
+
children: [$ && /* @__PURE__ */ C(n.sparkle, { size: 12 }), /* @__PURE__ */ w("span", { children: [$ && /* @__PURE__ */ w(S, { children: [U("list.peek.hint", "Inline quick-edit — click any field to change."), " "] }), ne(U("list.peek.keys_hint", "{tab} to move, {esc} to close."), {
|
|
160
|
+
tab: /* @__PURE__ */ C(i, { children: T.tab }),
|
|
161
|
+
esc: /* @__PURE__ */ C(i, { children: T.esc })
|
|
161
162
|
})] })]
|
|
162
|
-
}),
|
|
163
|
-
|
|
164
|
-
children: e
|
|
165
|
-
entity: w,
|
|
166
|
-
entityCode: E,
|
|
167
|
-
fieldName: e.key,
|
|
168
|
-
record: W,
|
|
169
|
-
mode: e.readOnly ? "display" : "edit",
|
|
170
|
-
onChange: (t) => Q(e.key, t),
|
|
171
|
-
refs: M,
|
|
172
|
-
disabled: e.readOnly,
|
|
173
|
-
t: H
|
|
174
|
-
}) : /* @__PURE__ */ x(o, {
|
|
175
|
-
field: e.field,
|
|
176
|
-
fieldName: e.key,
|
|
163
|
+
}), /* @__PURE__ */ C(_, {
|
|
164
|
+
columns: 1,
|
|
165
|
+
children: j.map((e) => /* @__PURE__ */ C(g, {
|
|
177
166
|
label: e.label,
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
167
|
+
span: e.kind !== "file" && re.has(e.field.type),
|
|
168
|
+
nested: e.kind !== "file" && (v.has(e.field.type) || !!e.field.structure),
|
|
169
|
+
children: e.kind === "file" ? a({
|
|
170
|
+
entity: E,
|
|
171
|
+
entityCode: D,
|
|
172
|
+
fieldName: e.key,
|
|
173
|
+
record: G,
|
|
174
|
+
mode: e.readOnly ? "display" : "edit",
|
|
175
|
+
onChange: (t) => Q(e.key, t),
|
|
176
|
+
refs: M,
|
|
177
|
+
disabled: e.readOnly,
|
|
178
|
+
t: U
|
|
179
|
+
}) : /* @__PURE__ */ C(s, {
|
|
180
|
+
field: e.field,
|
|
181
|
+
fieldName: e.key,
|
|
182
|
+
entityCode: D,
|
|
183
|
+
label: e.label,
|
|
184
|
+
value: G[e.key],
|
|
185
|
+
record: G,
|
|
186
|
+
refs: M,
|
|
187
|
+
entities: N,
|
|
188
|
+
screens: P,
|
|
189
|
+
readOnly: e.readOnly,
|
|
190
|
+
onCommit: (t) => Q(e.key, t)
|
|
191
|
+
})
|
|
192
|
+
}, e.key))
|
|
193
|
+
})]
|
|
187
194
|
}),
|
|
188
|
-
/* @__PURE__ */
|
|
195
|
+
/* @__PURE__ */ w("div", {
|
|
189
196
|
style: {
|
|
190
197
|
display: "flex",
|
|
191
198
|
padding: "10px 14px",
|
|
@@ -194,7 +201,7 @@ function w({ entity: w, entityCode: E, record: D, title: O, recordId: k, avatarN
|
|
|
194
201
|
alignItems: "center"
|
|
195
202
|
},
|
|
196
203
|
children: [
|
|
197
|
-
|
|
204
|
+
q && /* @__PURE__ */ w("span", {
|
|
198
205
|
style: {
|
|
199
206
|
fontSize: 11,
|
|
200
207
|
color: "var(--warn)",
|
|
@@ -202,61 +209,42 @@ function w({ entity: w, entityCode: E, record: D, title: O, recordId: k, avatarN
|
|
|
202
209
|
alignItems: "center",
|
|
203
210
|
gap: 4
|
|
204
211
|
},
|
|
205
|
-
children: [/* @__PURE__ */
|
|
212
|
+
children: [/* @__PURE__ */ C("span", { style: {
|
|
206
213
|
width: 6,
|
|
207
214
|
height: 6,
|
|
208
215
|
borderRadius: 999,
|
|
209
216
|
background: "var(--warn)"
|
|
210
|
-
} }),
|
|
217
|
+
} }), U("list.peek.unsaved", "Unsaved")]
|
|
211
218
|
}),
|
|
212
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ C("div", {
|
|
213
220
|
style: {
|
|
214
221
|
flex: 1,
|
|
215
222
|
minWidth: 0,
|
|
216
223
|
display: "flex",
|
|
217
224
|
justifyContent: "flex-end"
|
|
218
225
|
},
|
|
219
|
-
children: Z.length > 0 && /* @__PURE__ */
|
|
226
|
+
children: Z.length > 0 && /* @__PURE__ */ C(ee, {
|
|
220
227
|
layout: Z,
|
|
221
|
-
row:
|
|
222
|
-
onRun: (e, t) =>
|
|
228
|
+
row: G,
|
|
229
|
+
onRun: (e, t) => se({
|
|
223
230
|
code: e,
|
|
224
231
|
action: t
|
|
225
232
|
}),
|
|
226
233
|
kind: "toolbar",
|
|
227
|
-
entityActions:
|
|
234
|
+
entityActions: I,
|
|
228
235
|
align: "trailing",
|
|
229
|
-
ariaLabel:
|
|
236
|
+
ariaLabel: U("list.peek.actions", "Quick peek actions")
|
|
230
237
|
})
|
|
231
238
|
}),
|
|
232
|
-
/* @__PURE__ */
|
|
239
|
+
/* @__PURE__ */ C(t, {
|
|
233
240
|
kind: "primary",
|
|
234
|
-
icon: /* @__PURE__ */
|
|
235
|
-
onClick: () =>
|
|
236
|
-
children:
|
|
241
|
+
icon: /* @__PURE__ */ C(n.edit, { size: 13 }),
|
|
242
|
+
onClick: () => V(q ? G : null),
|
|
243
|
+
children: U("list.peek.open_full", "Open full")
|
|
237
244
|
})
|
|
238
245
|
]
|
|
239
246
|
})
|
|
240
247
|
]
|
|
241
248
|
})] });
|
|
242
249
|
}
|
|
243
|
-
|
|
244
|
-
return /* @__PURE__ */ S("div", {
|
|
245
|
-
style: {
|
|
246
|
-
display: "grid",
|
|
247
|
-
gridTemplateColumns: "120px 1fr",
|
|
248
|
-
alignItems: "center",
|
|
249
|
-
padding: "4px 0",
|
|
250
|
-
borderBottom: "1px solid var(--divider)"
|
|
251
|
-
},
|
|
252
|
-
children: [/* @__PURE__ */ x("div", {
|
|
253
|
-
style: {
|
|
254
|
-
fontSize: 11.5,
|
|
255
|
-
color: "var(--text-3)",
|
|
256
|
-
fontWeight: 500
|
|
257
|
-
},
|
|
258
|
-
children: e
|
|
259
|
-
}), /* @__PURE__ */ x("div", { children: t })]
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
export { T as QEField, w as QuickPeek };
|
|
250
|
+
export { E as QuickPeek };
|