@declarion/react 0.59.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/dist-lib/{DetailAuditStrip-GNRA_eP5.js → DetailAuditStrip-9eJM2Fml.js} +15 -16
- package/dist-lib/{SmartDetailPage.impl-Ds2RGg6K.js → SmartDetailPage.impl-DFjz29Ff.js} +13 -13
- package/dist-lib/components/chrome/headerActionZone.d.ts +27 -0
- package/dist-lib/index.js +571 -579
- package/package.json +1 -1
|
@@ -41,6 +41,7 @@ function g({ header: e, children: t, scrollRef: n }) {
|
|
|
41
41
|
background: "var(--background)"
|
|
42
42
|
},
|
|
43
43
|
children: [/* @__PURE__ */ d("div", {
|
|
44
|
+
"data-testid": "page-shell-header",
|
|
44
45
|
style: {
|
|
45
46
|
flexShrink: 0,
|
|
46
47
|
paddingTop: i.isPhone ? 14 : 24,
|
|
@@ -67,9 +68,18 @@ function g({ header: e, children: t, scrollRef: n }) {
|
|
|
67
68
|
})]
|
|
68
69
|
});
|
|
69
70
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
var _ = {
|
|
72
|
+
display: "flex",
|
|
73
|
+
alignItems: "center",
|
|
74
|
+
gap: 6,
|
|
75
|
+
flexGrow: 1,
|
|
76
|
+
flexShrink: 1,
|
|
77
|
+
flexBasis: "auto",
|
|
78
|
+
marginLeft: "auto",
|
|
79
|
+
minWidth: 180,
|
|
80
|
+
flexWrap: "wrap",
|
|
81
|
+
justifyContent: "flex-end"
|
|
82
|
+
}, v = 160;
|
|
73
83
|
function y({ icon: r, title: o, recordId: s, description: c, highlights: l, mode: p, dirty: m = !1, showBack: g = !1, onBack: y, right: b, identityControls: x, showTitle: S = !0 }) {
|
|
74
84
|
let C = a();
|
|
75
85
|
return /* @__PURE__ */ f("div", {
|
|
@@ -164,18 +174,7 @@ function y({ icon: r, title: o, recordId: s, description: c, highlights: l, mode
|
|
|
164
174
|
b && /* @__PURE__ */ d("div", {
|
|
165
175
|
role: "toolbar",
|
|
166
176
|
"aria-label": C("shell.record.page_actions", "Page actions"),
|
|
167
|
-
style:
|
|
168
|
-
display: "flex",
|
|
169
|
-
alignItems: "center",
|
|
170
|
-
gap: 6,
|
|
171
|
-
flexGrow: 1,
|
|
172
|
-
flexShrink: 1,
|
|
173
|
-
flexBasis: "auto",
|
|
174
|
-
marginLeft: "auto",
|
|
175
|
-
minWidth: _,
|
|
176
|
-
flexWrap: "wrap",
|
|
177
|
-
justifyContent: "flex-end"
|
|
178
|
-
},
|
|
177
|
+
style: _,
|
|
179
178
|
children: b
|
|
180
179
|
}),
|
|
181
180
|
l && p === "display" && /* @__PURE__ */ d("div", {
|
|
@@ -286,4 +285,4 @@ function C({ screen: e, entity: t, entityCode: n, record: r, refs: i, schema: o
|
|
|
286
285
|
return /* @__PURE__ */ d(x, { lines: f });
|
|
287
286
|
}
|
|
288
287
|
//#endregion
|
|
289
|
-
export { h as i, y as n,
|
|
288
|
+
export { h as a, g as i, y as n, _ as r, C as t };
|
|
@@ -3,7 +3,7 @@ import { An as n, At as r, Cn as i, In as a, Ln as o, Lt as s, Rn as c, W as l,
|
|
|
3
3
|
import { r as oe, s as w, t as T } from "./RefreshControl-Bhoib0ZA.js";
|
|
4
4
|
import { $ as se, D as ce, f as le, p as ue, t as E, u as de } from "./useText-BFDCTUSo.js";
|
|
5
5
|
import { c as D, h as O, s as fe } from "./registry-Cb3W-czW.js";
|
|
6
|
-
import {
|
|
6
|
+
import { i as pe, n as me, t as he } from "./DetailAuditStrip-9eJM2Fml.js";
|
|
7
7
|
import { a as ge, m as k, n as A, p as j, r as M, t as N, u as P } from "./failure-v-uGSpbX.js";
|
|
8
8
|
import { C as _e, L as ve, M as ye, N as be, O as xe, f as Se, g as Ce, h as we, k as Te, l as Ee, m as De, y as Oe } from "./field-classification-C28XE-_P.js";
|
|
9
9
|
import { c as ke, f as Ae, h as je, m as Me, o as Ne, p as Pe, r as Fe, t as Ie, u as Le } from "./action-dispatch-DY0c8U81.js";
|
|
@@ -679,7 +679,7 @@ function q({ screenCode: e }) {
|
|
|
679
679
|
return /* @__PURE__ */ B(x, { children: /* @__PURE__ */ B(yt, { screenCode: e }) });
|
|
680
680
|
}
|
|
681
681
|
function yt({ screenCode: t }) {
|
|
682
|
-
let a = E(), c = E("errors"), { id: l } = Qe(), u = r(), [ee, g] = $e(), { data: _ } = le(), te = ue((e) => e.user), x = p(), S = b(), C = _?.screens[t], w = C?.entity ? _?.entities[C.entity] : void 0, T = C?.entity, de = h(w, "create"), O = h(w, "update"),
|
|
682
|
+
let a = E(), c = E("errors"), { id: l } = Qe(), u = r(), [ee, g] = $e(), { data: _ } = le(), te = ue((e) => e.user), x = p(), S = b(), C = _?.screens[t], w = C?.entity ? _?.entities[C.entity] : void 0, T = C?.entity, de = h(w, "create"), O = h(w, "update"), me = h(w, "restore"), ge = (() => {
|
|
683
683
|
if (!w || !w.singleton || !w.prefilter) return;
|
|
684
684
|
let e = ae(w);
|
|
685
685
|
if (e.length !== 1) return;
|
|
@@ -980,11 +980,11 @@ function yt({ screenCode: t }) {
|
|
|
980
980
|
[e]: t
|
|
981
981
|
}));
|
|
982
982
|
}, []), Qt = F(() => {
|
|
983
|
-
M && !j &&
|
|
983
|
+
M && !j && me && ze.mutate(M);
|
|
984
984
|
}, [
|
|
985
985
|
M,
|
|
986
986
|
j,
|
|
987
|
-
|
|
987
|
+
me,
|
|
988
988
|
ze
|
|
989
989
|
]), $t = L(() => ht(G, _), [G, _]), en = Object.keys($t).length > 0;
|
|
990
990
|
if (!X || !w) return null;
|
|
@@ -1123,7 +1123,7 @@ function yt({ screenCode: t }) {
|
|
|
1123
1123
|
isSaving: on,
|
|
1124
1124
|
hasChildErrors: en,
|
|
1125
1125
|
hasFieldErrors: yt && Yt,
|
|
1126
|
-
canRestore:
|
|
1126
|
+
canRestore: me,
|
|
1127
1127
|
entity: w,
|
|
1128
1128
|
screen: X,
|
|
1129
1129
|
globalActions: _?.actions,
|
|
@@ -1259,7 +1259,7 @@ function yt({ screenCode: t }) {
|
|
|
1259
1259
|
minWidth: 0,
|
|
1260
1260
|
height: "100%"
|
|
1261
1261
|
},
|
|
1262
|
-
children: /* @__PURE__ */ B(
|
|
1262
|
+
children: /* @__PURE__ */ B(pe, {
|
|
1263
1263
|
scrollRef: Pt,
|
|
1264
1264
|
header: Sn,
|
|
1265
1265
|
children: xn
|
|
@@ -1292,7 +1292,7 @@ function yt({ screenCode: t }) {
|
|
|
1292
1292
|
})
|
|
1293
1293
|
})
|
|
1294
1294
|
]
|
|
1295
|
-
}) : /* @__PURE__ */ V(
|
|
1295
|
+
}) : /* @__PURE__ */ V(pe, {
|
|
1296
1296
|
scrollRef: Pt,
|
|
1297
1297
|
header: Sn,
|
|
1298
1298
|
children: [xn, fn && (Y || j) && _ && /* @__PURE__ */ B("div", {
|
|
@@ -1445,7 +1445,7 @@ function St(e, t, n) {
|
|
|
1445
1445
|
return r ? d(e, r, n) : n;
|
|
1446
1446
|
}
|
|
1447
1447
|
function Ct({ title: n, recordId: i, editing: a, isNew: o, isRecordDeleted: s, dirty: u, isSaving: d, hasChildErrors: f, hasFieldErrors: p, canRestore: m, entity: h, screen: _, globalActions: v, entityCode: y, record: b, id: x, listRoute: S, listRouteExists: ne, highlights: re, showBack: ie, onBack: C, onCancelEdit: ae, onSave: oe, onRestore: se, isRestoring: ce, refreshControl: le, isRealtimeEntity: ue, canManageTemplates: de }) {
|
|
1448
|
-
let D = E(), O = E("errors"), { run: fe } = g(),
|
|
1448
|
+
let D = E(), O = E("errors"), { run: fe } = g(), pe = w("detail"), he = be(), k = r(), A = ee(_?.action_layout, h?.action_layout, h?.actions, v, "detail_toolbar"), j = ee(_?.action_layout, h?.action_layout, h?.actions, v, "detail"), M = l(D, j, h?.actions, v, b ?? {}, [], Ne(h, b ?? {})), N = l(D, A, h?.actions, v, b ?? {}, [], Ne(h, b ?? {})), ve = L(() => {
|
|
1449
1449
|
if (!h) return;
|
|
1450
1450
|
let e = x ? [x] : [];
|
|
1451
1451
|
return {
|
|
@@ -1484,7 +1484,7 @@ function Ct({ title: n, recordId: i, editing: a, isNew: o, isRecordDeleted: s, d
|
|
|
1484
1484
|
ye.getState().kill(_e(location)), k(i, { replace: !0 });
|
|
1485
1485
|
} : void 0
|
|
1486
1486
|
});
|
|
1487
|
-
}, Se =
|
|
1487
|
+
}, Se = pe.isVisible("show_actions") && !o && x && M.length > 0 ? /* @__PURE__ */ B(ke, {
|
|
1488
1488
|
layout: M,
|
|
1489
1489
|
row: b,
|
|
1490
1490
|
onRun: xe,
|
|
@@ -1496,7 +1496,7 @@ function Ct({ title: n, recordId: i, editing: a, isNew: o, isRecordDeleted: s, d
|
|
|
1496
1496
|
}) : null, Ce = !o && x ? /* @__PURE__ */ B(T, {
|
|
1497
1497
|
liveObject: le,
|
|
1498
1498
|
realtime: ue
|
|
1499
|
-
}) : null, we =
|
|
1499
|
+
}) : null, we = pe.isVisible("show_actions") && !o && x && N.length > 0 ? /* @__PURE__ */ V("div", {
|
|
1500
1500
|
style: {
|
|
1501
1501
|
display: "flex",
|
|
1502
1502
|
justifyContent: "flex-end",
|
|
@@ -1515,7 +1515,7 @@ function Ct({ title: n, recordId: i, editing: a, isNew: o, isRecordDeleted: s, d
|
|
|
1515
1515
|
widgetContext: ve,
|
|
1516
1516
|
ariaLabel: Se ? D("record.toolbar_actions", "Detail toolbar actions") : D("record.page_actions", "Page actions")
|
|
1517
1517
|
})]
|
|
1518
|
-
}) : null, Te =
|
|
1518
|
+
}) : null, Te = pe.isVisible("show_actions") && !o && x && y ? /* @__PURE__ */ B(Ge, {
|
|
1519
1519
|
entityCode: y,
|
|
1520
1520
|
scope: "detail",
|
|
1521
1521
|
objectIds: [x],
|
|
@@ -1543,7 +1543,7 @@ function Ct({ title: n, recordId: i, editing: a, isNew: o, isRecordDeleted: s, d
|
|
|
1543
1543
|
style: { display: "contents" },
|
|
1544
1544
|
children: [Te, Se]
|
|
1545
1545
|
}) : Te : null;
|
|
1546
|
-
return /* @__PURE__ */ V(tt, { children: [/* @__PURE__ */ B(
|
|
1546
|
+
return /* @__PURE__ */ V(tt, { children: [/* @__PURE__ */ B(me, {
|
|
1547
1547
|
icon: h?.display.icon ? /* @__PURE__ */ B(t, {
|
|
1548
1548
|
name: h.display.icon,
|
|
1549
1549
|
size: 16
|
|
@@ -1558,7 +1558,7 @@ function Ct({ title: n, recordId: i, editing: a, isNew: o, isRecordDeleted: s, d
|
|
|
1558
1558
|
showBack: ie,
|
|
1559
1559
|
onBack: C,
|
|
1560
1560
|
right: Ee,
|
|
1561
|
-
showTitle:
|
|
1561
|
+
showTitle: pe.isVisible("show_title")
|
|
1562
1562
|
}), we] });
|
|
1563
1563
|
}
|
|
1564
1564
|
//#endregion
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { CSSProperties } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* The room the action zone demands before it will share a line with whatever
|
|
4
|
+
* came before it. One call to action plus its menu - below that the bar shows a
|
|
5
|
+
* lone menu trigger, which is not worth a line of its own.
|
|
6
|
+
*
|
|
7
|
+
* Measured, not chosen: at 402px the meta items that wrap past the title leave
|
|
8
|
+
* ~190px on their line. A 240px demand refused it and took a THIRD line, so a
|
|
9
|
+
* phone spent one row on a record-id prefix and an info icon with a gap beside
|
|
10
|
+
* them. At 180 the actions finish that row instead - which is what a reader
|
|
11
|
+
* expects when they can see the space.
|
|
12
|
+
*/
|
|
13
|
+
export declare const ACTION_ZONE_MIN_WIDTH = 180;
|
|
14
|
+
/**
|
|
15
|
+
* The action zone of every header row, per the UI SDK guide's "Header
|
|
16
|
+
* composition". It is one item of a WRAPPING row that asks for a minimum and
|
|
17
|
+
* pushes itself to the trailing edge: room left after the identity items means
|
|
18
|
+
* it finishes that line, no room means it takes the next one, and
|
|
19
|
+
* `margin-left: auto` keeps it right on either. Being one item, it can never
|
|
20
|
+
* split half-left and half-right.
|
|
21
|
+
*
|
|
22
|
+
* It grows into whatever the line has left. Content-sized, the zone handed the
|
|
23
|
+
* action bar its own minimum as the width to measure - so a line with 1600px
|
|
24
|
+
* free still showed two buttons. The buttons stay flush to the trailing edge
|
|
25
|
+
* inside a zone that is as wide as the space actually is.
|
|
26
|
+
*/
|
|
27
|
+
export declare const headerActionZoneStyle: CSSProperties;
|