UNPKG

@open-formulieren/formio-builder

Version:

An opinionated Formio webform builder for Open Forms

96 lines (95 loc) 3.09 kB
import { jsxs as p, jsx as e } from "react/jsx-runtime"; import { TILE_LAYER_RD as i } from "@open-formulieren/leaflet-tools"; import { useFormikContext as r } from "formik"; import { FormattedMessage as t, useIntl as n } from "react-intl"; import "../../components/formio/tabs.js"; import "clsx"; /* empty css */ import "@floating-ui/react"; import "react"; /* empty css */ import "../../context.js"; import "@formio/vanilla-text-mask"; import "formiojs"; import d from "../../components/formio/panel.js"; import "react-select"; import { NumberField as m } from "../../components/formio/number.js"; import "../../components/formio/datagrid.js"; const u = () => { const a = n().formatMessage({ id: "UJTIZU", defaultMessage: [{ type: 0, value: "Zoom level for the map when it initially loads." }] }); return /* @__PURE__ */ e(m, { name: "defaultZoom", label: /* @__PURE__ */ e(t, { id: "xxVNeU", defaultMessage: [{ type: 0, value: "Zoom level" }] }), description: /* @__PURE__ */ e(t, { id: "GDWp6v", defaultMessage: [{ type: 0, value: "Value in whole numbers, between " }, { type: 1, value: "minZoom" }, { type: 0, value: " and " }, { type: 1, value: "maxZoom" }, { type: 0, value: "." }], values: { minZoom: i.minZoom, maxZoom: i.maxZoom } }), tooltip: a, step: 1, min: i.minZoom, max: i.maxZoom }); }, s = () => { const { getFieldMeta: o } = r(), { value: a } = o("defaultZoom"); return Math.pow(2, -(a ?? 8)); }, f = () => { const o = s(), l = n().formatMessage({ id: "ADTla/", defaultMessage: [{ type: 0, value: "Latitude coordinate of the initial center point of the map." }] }); return /* @__PURE__ */ e(m, { name: "initialCenter.lat", label: /* @__PURE__ */ e(t, { id: "jnHPfU", defaultMessage: [{ type: 0, value: "Latitude" }] }), description: /* @__PURE__ */ e(t, { id: "DbpUVv", defaultMessage: [{ type: 0, value: "Value in decimal degrees, between 50.5 and 54." }] }), tooltip: l, placeholder: "52.1326332", min: 50.5, max: 54, step: o }); }, c = () => { const o = s(), l = n().formatMessage({ id: "Kdgpxf", defaultMessage: [{ type: 0, value: "Longitude coordinate of the initial center point of the map." }] }); return /* @__PURE__ */ e(m, { name: "initialCenter.lng", label: /* @__PURE__ */ e(t, { id: "LZc4TN", defaultMessage: [{ type: 0, value: "Longitude" }] }), description: /* @__PURE__ */ e(t, { id: "Tpg442", defaultMessage: [{ type: 0, value: "Value in decimal degrees, between 3 and 7.5." }] }), tooltip: l, placeholder: "5.291266", min: 3, max: 7.5, step: o }); }, j = () => /* @__PURE__ */ p(d, { title: /* @__PURE__ */ e(t, { id: "pdmkVe", defaultMessage: [{ type: 0, value: "Initial focus" }] }), collapsible: !0, initialCollapsed: !0, children: [ /* @__PURE__ */ e(u, {}), /* @__PURE__ */ e(f, {}), /* @__PURE__ */ e(c, {}) ] }); export { j as default };