@opengov/form-renderer 0.0.39 → 0.0.40
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/fields/FormFieldLabel.d.ts +2 -1
- package/dist/lib.js +11 -11
- package/dist/lib.umd.cjs +3 -3
- package/package.json +1 -1
|
@@ -7,6 +7,7 @@ interface FormFieldLabelProps {
|
|
|
7
7
|
readonly?: boolean;
|
|
8
8
|
deleted?: boolean;
|
|
9
9
|
formula?: string;
|
|
10
|
+
isSection?: boolean;
|
|
10
11
|
}
|
|
11
|
-
export default function FormFieldLabel({ children, internal, required, helpText, isCalculated, readonly, deleted, formula, }: FormFieldLabelProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default function FormFieldLabel({ children, internal, required, helpText, isCalculated, readonly, deleted, formula, isSection, }: FormFieldLabelProps): import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
export {};
|
package/dist/lib.js
CHANGED
|
@@ -3806,7 +3806,10 @@ function Xl({ name: e, rules: n = {}, sx: t = {}, constraints: r = {}, ...u }) {
|
|
|
3806
3806
|
);
|
|
3807
3807
|
}
|
|
3808
3808
|
function zs({ error: e }) {
|
|
3809
|
-
return /* @__PURE__ */ F.
|
|
3809
|
+
return /* @__PURE__ */ F.jsxs(As, { error: !0, children: [
|
|
3810
|
+
bc("error"),
|
|
3811
|
+
e
|
|
3812
|
+
] });
|
|
3810
3813
|
}
|
|
3811
3814
|
function Ql({ name: e, label: n, sx: t = {}, disabled: r, rules: u = {}, ...i }) {
|
|
3812
3815
|
const {
|
|
@@ -8602,10 +8605,11 @@ function It({
|
|
|
8602
8605
|
isCalculated: u,
|
|
8603
8606
|
readonly: i,
|
|
8604
8607
|
deleted: s,
|
|
8605
|
-
formula: c
|
|
8608
|
+
formula: c,
|
|
8609
|
+
isSection: h
|
|
8606
8610
|
}) {
|
|
8607
|
-
const
|
|
8608
|
-
return /* @__PURE__ */ F.jsxs(qt, { sx:
|
|
8611
|
+
const l = { display: "flex", alignItems: "center" }, f = i ? { ...l, gap: 1 } : { ...l, justifyContent: "space-between" };
|
|
8612
|
+
return /* @__PURE__ */ F.jsxs(qt, { sx: f, children: [
|
|
8609
8613
|
/* @__PURE__ */ F.jsxs(qt, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
|
|
8610
8614
|
/* @__PURE__ */ F.jsxs(pr, { variant: "h4", color: "black", sx: { whiteSpace: "normal", wordBreak: "break-word" }, children: [
|
|
8611
8615
|
e,
|
|
@@ -8661,7 +8665,7 @@ function It({
|
|
|
8661
8665
|
Pr,
|
|
8662
8666
|
{
|
|
8663
8667
|
placement: "top",
|
|
8664
|
-
title: "This field is hidden from the applicant and visible to employees only.",
|
|
8668
|
+
title: h ? "This section is hidden from the applicant and visible to employees only." : "This field is hidden from the applicant and visible to employees only.",
|
|
8665
8669
|
sx: { cursor: "default" },
|
|
8666
8670
|
children: /* @__PURE__ */ F.jsx(
|
|
8667
8671
|
Wn,
|
|
@@ -14528,12 +14532,8 @@ function gp({
|
|
|
14528
14532
|
) }) });
|
|
14529
14533
|
}
|
|
14530
14534
|
function yp({ fieldId: e, readonly: n }) {
|
|
14531
|
-
const { readonly: t } = sn(), { template: r, render: u, renderReadOnly: i, formattedFormula: s } = Ys(e), { fields: c } = $o(), h = {
|
|
14532
|
-
|
|
14533
|
-
gridColumn: r.fullWidth ? "1 / -1" : "",
|
|
14534
|
-
backgroundColor: r.internal ? St.foundations.colors.yellow50 : ""
|
|
14535
|
-
};
|
|
14536
|
-
if (!r || !1) return null;
|
|
14535
|
+
const { readonly: t } = sn(), { template: r, render: u, renderReadOnly: i, formattedFormula: s } = Ys(e), { fields: c } = $o(), h = { ...c };
|
|
14536
|
+
if (r.internal && (h.backgroundColor = St.foundations.colors.yellow50), r.fullWidth && (h.gridColumn = "1 / -1"), !r || !1) return null;
|
|
14537
14537
|
const f = t || n || r.readonly, p = i ? i(r) : /* @__PURE__ */ F.jsx(
|
|
14538
14538
|
fp,
|
|
14539
14539
|
{
|