@open-formulieren/formio-builder
Version:
An opinionated Formio webform builder for Open Forms
46 lines (45 loc) • 1.67 kB
JavaScript
import { jsxs as a, jsx as e } from "react/jsx-runtime";
import { JSONEditor as d } from "@open-formulieren/monaco-json-editor";
import { useFormikContext as l } from "formik";
import { useContext as f } from "react";
import { FormattedMessage as o } from "react-intl";
import "../../formio/tabs.js";
import u from "../../formio/component.js";
import c from "../../formio/description.js";
import "@floating-ui/react";
import "clsx";
import { BuilderContext as x } from "../../../context.js";
import "@formio/vanilla-text-mask";
import "formiojs";
/* empty css */
import "lodash";
/* empty css */
import "react-select";
import "dompurify";
import "../../formio/datagrid.js";
const t = "openForms.itemsExpression", q = () => {
const {
getFieldProps: r,
setFieldValue: i
} = l(), {
value: s = {
var: "var"
}
} = r(t), m = f(x), p = `editform-${t}`;
return /* @__PURE__ */ a(u, { type: "textarea", field: t, required: !0, htmlId: p, label: /* @__PURE__ */ e(o, { id: "C48xJT", defaultMessage: [{
type: 0,
value: "Items expression"
}] }), children: [
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(d, { wrapperProps: {
className: "json-editor json-editor--compact"
}, value: s, onChange: (n) => i(t, n), showLines: !1, theme: m.theme }) }),
/* @__PURE__ */ e(c, { text: /* @__PURE__ */ e(o, { id: "fe3wyn", defaultMessage: [{
type: 0,
value: "A JSON logic expression returning a variable (of array type) whose items should be used as the options for this component."
}] }) })
] });
};
export {
q as ItemsExpression,
q as default
};