@open-formulieren/formio-builder
Version:
An opinionated Formio webform builder for Open Forms
60 lines (59 loc) • 1.69 kB
JavaScript
import { jsxs as n, jsx as i } from "react/jsx-runtime";
import { FormattedMessage as f, defineMessages as u } from "react-intl";
import "../../components/formio/tabs.js";
import "clsx";
import "formik";
/* empty css */
import "@floating-ui/react";
import "react";
/* empty css */
import c from "../../components/formio/description.js";
import { TextFieldMultiple as b } 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 x from "../../components/formio/fieldset.js";
const M = u({
email: {
id: "xPFvic",
defaultMessage: [{
type: 0,
value: "Email"
}]
},
phoneNumber: {
id: "tZwyML",
defaultMessage: [{
type: 0,
value: "Phone number"
}]
}
}), g = {
email: "email",
phoneNumber: "tel"
}, G = ({
component: m
}) => {
const {
key: o,
label: p,
description: r,
tooltip: l,
validate: s = {},
digitalAddressTypes: a = []
} = m, {
required: d = !1
} = s;
return /* @__PURE__ */ n(x, { field: o, label: p, tooltip: l, children: [
a.sort((e, t) => e.localeCompare(t)).map((e, t) => /* @__PURE__ */ i(b, { name: `${o}.${t}.address`, label: /* @__PURE__ */ i(f, { ...M[e] }), required: d, type: g[e] }, e)),
r && /* @__PURE__ */ i(c, { text: r })
] });
};
export {
G as default
};