@open-formulieren/formio-builder
Version:
An opinionated Formio webform builder for Open Forms
72 lines (71 loc) • 2.72 kB
JavaScript
import { jsxs as l, jsx as e, Fragment as b } from "react/jsx-runtime";
import { clsx as c } from "clsx";
import { FormattedMessage as r } from "react-intl";
import "../../components/formio/tabs.js";
import "formik";
/* empty css */
import "@floating-ui/react";
import "react";
/* empty css */
import v from "../../components/formio/description.js";
import { TextFieldMultiple as i } from "../../components/formio/textfield.js";
import "../../components/formio/datefield.js";
import "../../components/formio/datetimefield.js";
import "../../components/formio/timefield.js";
/* empty css */
import "react-select";
import "dompurify";
import "../../components/formio/textarea.js";
import "../../components/formio/datagrid.js";
import y from "../../components/formio/fieldset.js";
/* empty css */
const I = ({
component: d
}) => {
const {
key: t,
label: s,
description: a,
tooltip: m,
validate: p = {},
deriveAddress: u,
layout: n,
hideLabel: f
} = d, {
required: o = !1
} = p;
return /* @__PURE__ */ l(y, { field: t, label: f ? void 0 : s, tooltip: m, children: [
a && /* @__PURE__ */ e(v, { text: a }),
/* @__PURE__ */ l("div", { className: c("offb-addressnl-preview", `offb-addressnl-preview--${n}`), children: [
/* @__PURE__ */ e(i, { name: `${t}.postcode`, label: /* @__PURE__ */ e(r, { id: "guySt0", defaultMessage: [{
type: 0,
value: "Postcode"
}] }), required: o, placeholder: "1234 AB" }),
/* @__PURE__ */ e(i, { name: `${t}.houseNumber`, label: /* @__PURE__ */ e(r, { id: "mf9eF+", defaultMessage: [{
type: 0,
value: "House number"
}] }), required: o, placeholder: "123" }),
/* @__PURE__ */ e(i, { name: `${t}.houseLetter`, label: /* @__PURE__ */ e(r, { id: "b5Bxb/", defaultMessage: [{
type: 0,
value: "House letter addition"
}] }) }),
/* @__PURE__ */ e(i, { name: `${t}.houseNumberAddition`, label: /* @__PURE__ */ e(r, { id: "pfdsz9", defaultMessage: [{
type: 0,
value: "House number addition"
}] }) }),
u && /* @__PURE__ */ l(b, { children: [
/* @__PURE__ */ e(i, { name: `${t}.city`, label: /* @__PURE__ */ e(r, { id: "osSl3z", defaultMessage: [{
type: 0,
value: "City"
}] }), disabled: !0, required: o }),
/* @__PURE__ */ e(i, { name: `${t}.streetNumber`, label: /* @__PURE__ */ e(r, { id: "DEetjI", defaultMessage: [{
type: 0,
value: "Street name"
}] }), disabled: !0, required: o })
] })
] })
] });
};
export {
I as default
};