UNPKG

@open-formulieren/formio-builder

Version:

An opinionated Formio webform builder for Open Forms

23 lines (22 loc) 2.05 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const jsx_runtime_1 = require("react/jsx-runtime"); const react_intl_1 = require("react-intl"); const formio_1 = require("../../components/formio"); const PolygonInteraction = () => { const intl = (0, react_intl_1.useIntl)(); const tooltip = intl.formatMessage({ id: "b64egT", defaultMessage: [{ type: 0, value: "Users can draw shapes (polygons) on the map" }] }); return ((0, jsx_runtime_1.jsx)(formio_1.Checkbox, { name: "interactions.polygon", label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: 'T64zDz', defaultMessage: [{ type: 0, value: "Polygon" }] }), tooltip: tooltip })); }; const PolylineInteraction = () => { const intl = (0, react_intl_1.useIntl)(); const tooltip = intl.formatMessage({ id: "pM92DZ", defaultMessage: [{ type: 0, value: "Users can draw straight lines on the map" }] }); return ((0, jsx_runtime_1.jsx)(formio_1.Checkbox, { name: "interactions.polyline", label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: 'mRmbnJ', defaultMessage: [{ type: 0, value: "Line" }] }), tooltip: tooltip })); }; const MarkerInteraction = () => { const intl = (0, react_intl_1.useIntl)(); const tooltip = intl.formatMessage({ id: "WXpj4j", defaultMessage: [{ type: 0, value: "Users can set a marker on the map" }] }); return ((0, jsx_runtime_1.jsx)(formio_1.Checkbox, { name: "interactions.marker", label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: '9oJuUL', defaultMessage: [{ type: 0, value: "Marker" }] }), tooltip: tooltip })); }; const InteractionConfiguration = () => ((0, jsx_runtime_1.jsxs)(formio_1.Panel, Object.assign({ title: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: 'Gjhh/5', defaultMessage: [{ type: 0, value: "Available drawing shapes" }] }) }, { children: [(0, jsx_runtime_1.jsx)(PolygonInteraction, {}), (0, jsx_runtime_1.jsx)(PolylineInteraction, {}), (0, jsx_runtime_1.jsx)(MarkerInteraction, {})] }))); exports.default = InteractionConfiguration;