@open-formulieren/formio-builder
Version:
An opinionated Formio webform builder for Open Forms
58 lines (57 loc) • 1.54 kB
JavaScript
import { jsxs as n, jsx as i } from "react/jsx-runtime";
import { defineMessages as f, FormattedMessage 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 "../../context.js";
import "lodash";
/* empty css */
import "react-select";
import "dompurify";
import "../../components/formio/datagrid.js";
import x from "../../components/formio/fieldset.js";
const M = f({
email: {
id: "xPFvic",
defaultMessage: [{
type: 0,
value: "Email"
}]
},
phoneNumber: {
id: "tZwyML",
defaultMessage: [{
type: 0,
value: "Phone number"
}]
}
}), g = {
email: "email",
phoneNumber: "tel"
}, z = ({
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(u, { ...M[e] }), required: d, type: g[e] }, e)),
r && /* @__PURE__ */ i(c, { text: r })
] });
};
export {
z as default
};