@middag-io/react 0.35.3 → 0.36.1
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/app/ContractPage.d.ts +1 -1
- package/dist-lib/app/ContractPage.d.ts.map +1 -1
- package/dist-lib/contracts/page-contract.d.ts +10 -0
- package/dist-lib/contracts/page-contract.d.ts.map +1 -1
- package/dist-lib/middag-react.css +1 -1
- package/dist-lib/middag-react.js +23 -15
- package/package.json +1 -1
package/dist-lib/middag-react.js
CHANGED
|
@@ -1590,8 +1590,8 @@ function Di({ children: e, onClose: t }) {
|
|
|
1590
1590
|
}
|
|
1591
1591
|
//#endregion
|
|
1592
1592
|
//#region src/app/ContractPage.tsx
|
|
1593
|
-
function Oi({ contract: e, overlay: t }) {
|
|
1594
|
-
let { t:
|
|
1593
|
+
function Oi({ contract: e, overlay: t, shellMode: n = "full" }) {
|
|
1594
|
+
let { t: r } = I(), i = Ar(() => Yr(e), [e]), a = Ar(() => ui(e?.shell) ?? ui("immersive"), [e?.shell]), o = Ar(() => di(e?.layout?.template) || di("stack"), [e?.layout?.template]), s = H((e) => {
|
|
1595
1595
|
let t = fi(e.type);
|
|
1596
1596
|
return t ? ri(e) ? /* @__PURE__ */ q(yi, { children: /* @__PURE__ */ q(ni, {
|
|
1597
1597
|
block: e,
|
|
@@ -1602,35 +1602,43 @@ function Oi({ contract: e, overlay: t }) {
|
|
|
1602
1602
|
}) }, e.key) : /* @__PURE__ */ J("div", {
|
|
1603
1603
|
role: "alert",
|
|
1604
1604
|
className: "border-muted-foreground/30 text-muted-foreground rounded border border-dashed p-2 text-xs",
|
|
1605
|
-
children: [
|
|
1605
|
+
children: [r("middag.ui.block.unknown_type"), null]
|
|
1606
1606
|
}, e.key);
|
|
1607
|
-
}, [
|
|
1608
|
-
if (
|
|
1607
|
+
}, [r]);
|
|
1608
|
+
if (i) return /* @__PURE__ */ J("div", {
|
|
1609
1609
|
role: "alert",
|
|
1610
1610
|
className: "border-destructive/20 bg-destructive/10 text-destructive m-4 rounded-md border p-4 text-sm",
|
|
1611
1611
|
children: [/* @__PURE__ */ q("p", {
|
|
1612
1612
|
className: "font-semibold",
|
|
1613
|
-
children:
|
|
1613
|
+
children: r("middag.ui.contract.invalid")
|
|
1614
1614
|
}), null]
|
|
1615
1615
|
});
|
|
1616
|
-
if (!
|
|
1616
|
+
if (!o) return /* @__PURE__ */ J("div", {
|
|
1617
1617
|
role: "alert",
|
|
1618
1618
|
className: "border-destructive/20 bg-destructive/10 text-destructive m-4 rounded-md border p-4 text-sm",
|
|
1619
|
-
children: [
|
|
1619
|
+
children: [r("middag.ui.layout.unknown_type"), null]
|
|
1620
|
+
});
|
|
1621
|
+
let c = /* @__PURE__ */ q(o, {
|
|
1622
|
+
layout: e.layout,
|
|
1623
|
+
renderBlock: s
|
|
1620
1624
|
});
|
|
1625
|
+
if (n === "content-only") {
|
|
1626
|
+
let n = /* @__PURE__ */ q(Zr, {
|
|
1627
|
+
entities: e.entities ?? {},
|
|
1628
|
+
children: c
|
|
1629
|
+
});
|
|
1630
|
+
return t ? /* @__PURE__ */ q(Di, { children: n }) : n;
|
|
1631
|
+
}
|
|
1621
1632
|
if (!a) return /* @__PURE__ */ J("div", {
|
|
1622
1633
|
role: "alert",
|
|
1623
1634
|
className: "border-destructive/20 bg-destructive/10 text-destructive m-4 rounded-md border p-4 text-sm",
|
|
1624
|
-
children: [
|
|
1635
|
+
children: [r("middag.ui.shell.unknown_type"), null]
|
|
1625
1636
|
});
|
|
1626
|
-
let
|
|
1637
|
+
let l = /* @__PURE__ */ q(Zr, {
|
|
1627
1638
|
entities: e.entities ?? {},
|
|
1628
|
-
children: /* @__PURE__ */ q(
|
|
1629
|
-
layout: e.layout,
|
|
1630
|
-
renderBlock: o
|
|
1631
|
-
}) })
|
|
1639
|
+
children: /* @__PURE__ */ q(a, { children: c })
|
|
1632
1640
|
});
|
|
1633
|
-
return t ? /* @__PURE__ */ q(Di, { children:
|
|
1641
|
+
return t ? /* @__PURE__ */ q(Di, { children: l }) : l;
|
|
1634
1642
|
}
|
|
1635
1643
|
//#endregion
|
|
1636
1644
|
//#region src/base/form/fields/field-registry.ts
|