@open-formulieren/formio-builder
Version:
An opinionated Formio webform builder for Open Forms
21 lines (20 loc) • 1.66 kB
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { FormattedMessage, useIntl } from 'react-intl';
import { Checkbox, Panel } from '../../components/formio';
const PolygonInteraction = () => {
const intl = useIntl();
const tooltip = intl.formatMessage({ id: "b64egT", defaultMessage: [{ type: 0, value: "Users can draw shapes (polygons) on the map" }] });
return (_jsx(Checkbox, { name: "interactions.polygon", label: _jsx(FormattedMessage, { id: 'T64zDz', defaultMessage: [{ type: 0, value: "Polygon" }] }), tooltip: tooltip }));
};
const PolylineInteraction = () => {
const intl = useIntl();
const tooltip = intl.formatMessage({ id: "pM92DZ", defaultMessage: [{ type: 0, value: "Users can draw straight lines on the map" }] });
return (_jsx(Checkbox, { name: "interactions.polyline", label: _jsx(FormattedMessage, { id: 'mRmbnJ', defaultMessage: [{ type: 0, value: "Line" }] }), tooltip: tooltip }));
};
const MarkerInteraction = () => {
const intl = useIntl();
const tooltip = intl.formatMessage({ id: "WXpj4j", defaultMessage: [{ type: 0, value: "Users can set a marker on the map" }] });
return (_jsx(Checkbox, { name: "interactions.marker", label: _jsx(FormattedMessage, { id: '9oJuUL', defaultMessage: [{ type: 0, value: "Marker" }] }), tooltip: tooltip }));
};
const InteractionConfiguration = () => (_jsxs(Panel, Object.assign({ title: _jsx(FormattedMessage, { id: 'Gjhh/5', defaultMessage: [{ type: 0, value: "Available drawing shapes" }] }) }, { children: [_jsx(PolygonInteraction, {}), _jsx(PolylineInteraction, {}), _jsx(MarkerInteraction, {})] })));
export default InteractionConfiguration;