@open-formulieren/formio-builder
Version:
An opinionated Formio webform builder for Open Forms
127 lines (126 loc) • 4.41 kB
JavaScript
import { jsxs as i, jsx as t } from "react/jsx-runtime";
import { useContext as l } from "react";
import { useIntl as u, FormattedMessage as p } from "react-intl";
import { useAsync as d } from "react-use";
import h from "../../components/builder/label.js";
import c from "../../components/builder/description.js";
import { Tabs as f, TabList as b, TabPanel as e } from "../../components/formio/tabs.js";
import "clsx";
import { useErrorChecker as g } from "../../utils/errors.js";
/* empty css */
import "@floating-ui/react";
/* empty css */
import "../../components/formio/textfield.js";
import "formik";
import "../../components/formio/datefield.js";
import "../../components/formio/datetimefield.js";
import "../../components/formio/timefield.js";
/* empty css */
import y from "../../components/formio/select.js";
import "dompurify";
import "../../components/formio/textarea.js";
import "../../components/formio/datagrid.js";
/* empty css */
import { LABELS as s } from "../../components/builder/messages.js";
import { BuilderContext as P } from "../../context.js";
import { useDeriveComponentKey as C } from "../../components/builder/key.js";
import T from "../../components/builder/hidden.js";
import "../addressNL/index.js";
import "../bsn/index.js";
import "../checkbox/index.js";
import "../children/index.js";
import "../columns/index.js";
import "../content/index.js";
import "./index.js";
import "../cosignV2/index.js";
import "../currency/index.js";
import "../customerProfile/index.js";
import "../date/index.js";
import "../datetime/index.js";
import "../editgrid/index.js";
import "../email/index.js";
import "../fieldset/index.js";
import "../file/index.js";
import "../iban/index.js";
import "../licenseplate/index.js";
import "../map/index.js";
import "../npFamilyMembers/index.js";
import "../number/index.js";
import "../partners/index.js";
import "../phonenumber/index.js";
import "../postcode/index.js";
import "../radio/index.js";
import "../select/index.js";
import "../selectboxes/index.js";
import "../signature/index.js";
import "../softRequiredErrors/index.js";
import "../textarea/index.js";
import "../textfield/index.js";
import "../time/index.js";
import "@ckeditor/ckeditor5-react";
import "../../components/CKEditor.js";
/* empty css */
import "lodash";
import "../../components/builder/prefill/identifierRole.js";
import { ComponentTranslations as v } from "../../components/builder/i18n.js";
import { Basic as A, Translations as L } from "../../components/builder/tabs.js";
import "@open-formulieren/monaco-json-editor";
import "../../components/builder/values/values-src.js";
/* empty css */
const E = () => {
const o = u();
C();
const {
hasAnyError: r
} = g();
return /* @__PURE__ */ i(f, { children: [
/* @__PURE__ */ i(b, { children: [
/* @__PURE__ */ t(A, { hasErrors: r("label", "description", "authPlugin", "hidden") }),
/* @__PURE__ */ t(L, { hasErrors: r("openForms.translations") })
] }),
/* @__PURE__ */ i(e, { children: [
/* @__PURE__ */ t(h, {}),
/* @__PURE__ */ t(c, {}),
/* @__PURE__ */ t(M, {}),
/* @__PURE__ */ t(T, {})
] }),
/* @__PURE__ */ t(e, { children: /* @__PURE__ */ t(v, { propertyLabels: {
label: o.formatMessage(s.label),
description: o.formatMessage(s.description)
} }) })
] });
};
E.defaultValues = {
// basic tab
label: "",
key: "",
description: "",
hidden: !1,
authPlugin: ""
};
function x(o) {
return o !== void 0;
}
const M = () => {
const {
getAuthPlugins: o
} = l(P), {
value: r,
loading: n,
error: m
} = d(async () => await o(), []);
if (m)
throw m;
const a = x(r) ? r : [];
return /* @__PURE__ */ t(y, { name: "authPlugin", label: /* @__PURE__ */ t(p, { id: "lOSmt+", defaultMessage: [{
type: 0,
value: "Authentication method"
}] }), description: /* @__PURE__ */ t(p, { id: "Su4nqf", defaultMessage: [{
type: 0,
value: "Which authentication method the co-signer must use. Note that this must be an authentication method available on the form."
}] }), isLoading: n, options: a, valueProperty: "id" });
};
export {
M as AuthPlugin,
E as default
};