From af1517e0397274bf9b22889ac2a9508e2e2b0d62 Mon Sep 17 00:00:00 2001 From: robinvandermolen Date: Tue, 3 Dec 2024 18:05:15 +0100 Subject: [PATCH 01/10] :sparkles: [open-formulieren/open-forms#2177] added interaction configuration --- src/registry/map/edit.tsx | 10 ++- .../map/interaction-configuration.tsx | 80 +++++++++++++++++++ 2 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 src/registry/map/interaction-configuration.tsx diff --git a/src/registry/map/edit.tsx b/src/registry/map/edit.tsx index 4ce73b10..b3c1d1cb 100644 --- a/src/registry/map/edit.tsx +++ b/src/registry/map/edit.tsx @@ -23,6 +23,7 @@ import { import {LABELS} from '@/components/builder/messages'; import {Checkbox, Select, TabList, TabPanel, Tabs} from '@/components/formio'; import {BuilderContext} from '@/context'; +import InteractionConfiguration from '@/registry/map/interaction-configuration'; import {useErrorChecker} from '@/utils/errors'; import {EditFormDefinition} from '../types'; @@ -65,7 +66,8 @@ const EditForm: EditFormDefinition = () => { 'useConfigDefaultMapSettings', 'defaultZoom', 'initialCenter', - 'tileLayerIdentifier' + 'tileLayerIdentifier', + 'interactions' )} /> @@ -87,6 +89,7 @@ const EditForm: EditFormDefinition = () => { {!values.useConfigDefaultMapSettings && } + {/* Advanced tab */} @@ -139,6 +142,11 @@ EditForm.defaultValues = { lng: undefined, }, tileLayerIdentifier: undefined, + interactions: { + polygon: false, + polyline: false, + marker: true, + }, defaultValue: null, // Advanced tab conditional: { diff --git a/src/registry/map/interaction-configuration.tsx b/src/registry/map/interaction-configuration.tsx new file mode 100644 index 00000000..437b3b18 --- /dev/null +++ b/src/registry/map/interaction-configuration.tsx @@ -0,0 +1,80 @@ +import {FormattedMessage, useIntl} from 'react-intl'; + +import {Checkbox, Panel} from '@/components/formio'; + +const PolygonInteraction: React.FC = () => { + const intl = useIntl(); + const tooltip = intl.formatMessage({ + description: "Tooltip for 'interactions.polygon' builder field", + defaultMessage: 'Allowing users to draw a polygon when using the map component', + }); + return ( + + } + tooltip={tooltip} + /> + ); +}; + +const PolylineInteraction: React.FC = () => { + const intl = useIntl(); + const tooltip = intl.formatMessage({ + description: "Tooltip for 'interactions.polyline' builder field", + defaultMessage: 'Allowing users to draw a line when using the map component', + }); + return ( + + } + tooltip={tooltip} + /> + ); +}; + +const MarkerInteraction: React.FC = () => { + const intl = useIntl(); + const tooltip = intl.formatMessage({ + description: "Tooltip for 'interactions.marker' builder field", + defaultMessage: 'Allowing users to set a marker when using the map component', + }); + return ( + + } + tooltip={tooltip} + /> + ); +}; + +const InteractionConfiguration: React.FC = () => ( + + } + > + + + + +); + +export default InteractionConfiguration; From 09258d6a959bed677ea5ebad158b9c299977674c Mon Sep 17 00:00:00 2001 From: robinvandermolen Date: Thu, 12 Dec 2024 15:18:15 +0100 Subject: [PATCH 02/10] :arrow_up: [open-formulieren/open-forms#2177] Upgraded open-forms types --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9990a426..288fbe5a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -39,7 +39,7 @@ "@formatjs/cli": "^6.1.1", "@formatjs/ts-transformer": "^3.12.0", "@fortawesome/fontawesome-free": "^6.4.0", - "@open-formulieren/types": "^0.37.0", + "@open-formulieren/types": "^0.39.0", "@storybook/addon-actions": "^8.3.5", "@storybook/addon-essentials": "^8.3.5", "@storybook/addon-interactions": "^8.3.5", @@ -5087,9 +5087,9 @@ } }, "node_modules/@open-formulieren/types": { - "version": "0.37.0", - "resolved": "https://registry.npmjs.org/@open-formulieren/types/-/types-0.37.0.tgz", - "integrity": "sha512-8lgFytKGV9AeoUQ1oaYZcsoZoyWe/KoFJKkp66V8QQ9pd/IUt6i92VzTZSOqRr0D3kuMGf7aChXEJOhnaEcWSA==", + "version": "0.39.0", + "resolved": "https://registry.npmjs.org/@open-formulieren/types/-/types-0.39.0.tgz", + "integrity": "sha512-hqe4ZSY2Zrp9vupnttyjTsxu5PUi8jlZkhRpObc+hX1GYy30gOtFfifxU6xodeZJ6hzKSCPiUs97bRsxyedisg==", "dev": true, "license": "EUPL-1.2" }, @@ -24613,9 +24613,9 @@ } }, "@open-formulieren/types": { - "version": "0.37.0", - "resolved": "https://registry.npmjs.org/@open-formulieren/types/-/types-0.37.0.tgz", - "integrity": "sha512-8lgFytKGV9AeoUQ1oaYZcsoZoyWe/KoFJKkp66V8QQ9pd/IUt6i92VzTZSOqRr0D3kuMGf7aChXEJOhnaEcWSA==", + "version": "0.39.0", + "resolved": "https://registry.npmjs.org/@open-formulieren/types/-/types-0.39.0.tgz", + "integrity": "sha512-hqe4ZSY2Zrp9vupnttyjTsxu5PUi8jlZkhRpObc+hX1GYy30gOtFfifxU6xodeZJ6hzKSCPiUs97bRsxyedisg==", "dev": true }, "@pkgjs/parseargs": { diff --git a/package.json b/package.json index 34b7ed41..75e25d41 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "@formatjs/cli": "^6.1.1", "@formatjs/ts-transformer": "^3.12.0", "@fortawesome/fontawesome-free": "^6.4.0", - "@open-formulieren/types": "^0.37.0", + "@open-formulieren/types": "^0.39.0", "@storybook/addon-actions": "^8.3.5", "@storybook/addon-essentials": "^8.3.5", "@storybook/addon-interactions": "^8.3.5", From 0ba853a7771abc291d945d0ca7ae2102c46c48c0 Mon Sep 17 00:00:00 2001 From: robinvandermolen Date: Wed, 18 Dec 2024 14:31:55 +0100 Subject: [PATCH 03/10] :heavy_plus_sign: [open-formulieren/open-forms#2177] Add leaflet-draw dependencies --- package-lock.json | 39 +++++++++++++++++++++++++++++++++++++++ package.json | 2 ++ 2 files changed, 41 insertions(+) diff --git a/package-lock.json b/package-lock.json index 288fbe5a..2a9eac5b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,9 +18,11 @@ "clsx": "^1.2.1", "formik": "^2.4.5", "leaflet": "^1.9.4", + "leaflet-draw": "^1.0.4", "lodash": "^4.17.21", "react-intl": "^6.3.2", "react-leaflet": "^4.2.1", + "react-leaflet-draw": "^0.20.4", "react-modal": "^3.16.1", "react-select": "^5.8.0", "react-signature-canvas": "^1.0.6", @@ -15850,6 +15852,12 @@ "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz", "integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==" }, + "node_modules/leaflet-draw": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/leaflet-draw/-/leaflet-draw-1.0.4.tgz", + "integrity": "sha512-rsQ6saQO5ST5Aj6XRFylr5zvarWgzWnrg46zQ1MEOEIHsppdC/8hnN8qMoFvACsPvTioAuysya/TVtog15tyAQ==", + "license": "MIT" + }, "node_modules/leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -17774,6 +17782,23 @@ "react-dom": "^18.0.0" } }, + "node_modules/react-leaflet-draw": { + "version": "0.20.4", + "resolved": "https://registry.npmjs.org/react-leaflet-draw/-/react-leaflet-draw-0.20.4.tgz", + "integrity": "sha512-u5JHdow2Z9G2AveyUEOTWHXhdhzXdEVQifkNfSaVbEn0gvD+2xW03TQN444zVqovDBvIrBcVWo1VajL4zgl6yg==", + "license": "ISC", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "lodash-es": "^4.17.15" + }, + "peerDependencies": { + "leaflet": "^1.8.0", + "leaflet-draw": "^1.0.4", + "prop-types": "^15.5.2", + "react": "^18.0.0", + "react-leaflet": "^4.0.0" + } + }, "node_modules/react-lifecycles-compat": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", @@ -32679,6 +32704,11 @@ "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz", "integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==" }, + "leaflet-draw": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/leaflet-draw/-/leaflet-draw-1.0.4.tgz", + "integrity": "sha512-rsQ6saQO5ST5Aj6XRFylr5zvarWgzWnrg46zQ1MEOEIHsppdC/8hnN8qMoFvACsPvTioAuysya/TVtog15tyAQ==" + }, "leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -34108,6 +34138,15 @@ "@react-leaflet/core": "^2.1.0" } }, + "react-leaflet-draw": { + "version": "0.20.4", + "resolved": "https://registry.npmjs.org/react-leaflet-draw/-/react-leaflet-draw-0.20.4.tgz", + "integrity": "sha512-u5JHdow2Z9G2AveyUEOTWHXhdhzXdEVQifkNfSaVbEn0gvD+2xW03TQN444zVqovDBvIrBcVWo1VajL4zgl6yg==", + "requires": { + "fast-deep-equal": "^3.1.3", + "lodash-es": "^4.17.15" + } + }, "react-lifecycles-compat": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", diff --git a/package.json b/package.json index 75e25d41..ba2400b5 100644 --- a/package.json +++ b/package.json @@ -124,9 +124,11 @@ "clsx": "^1.2.1", "formik": "^2.4.5", "leaflet": "^1.9.4", + "leaflet-draw": "^1.0.4", "lodash": "^4.17.21", "react-intl": "^6.3.2", "react-leaflet": "^4.2.1", + "react-leaflet-draw": "^0.20.4", "react-modal": "^3.16.1", "react-select": "^5.8.0", "react-signature-canvas": "^1.0.6", From d8bd500df94d7032a83733321fe156249d3e442b Mon Sep 17 00:00:00 2001 From: robinvandermolen Date: Wed, 18 Dec 2024 14:32:33 +0100 Subject: [PATCH 04/10] :sparkles: [open-formulieren/open-forms#2177] Add map component interaction to preview --- src/registry/map/preview.tsx | 35 +++++++++++++++++++++++++++++++--- src/registry/map/previews.scss | 2 ++ 2 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 src/registry/map/previews.scss diff --git a/src/registry/map/preview.tsx b/src/registry/map/preview.tsx index b52dbe9a..c843e123 100644 --- a/src/registry/map/preview.tsx +++ b/src/registry/map/preview.tsx @@ -1,14 +1,17 @@ import {CRS_RD, TILE_LAYER_RD} from '@open-formulieren/leaflet-tools'; import {MapComponentSchema} from '@open-formulieren/types'; -import {useContext, useLayoutEffect} from 'react'; -import {MapContainer, TileLayer, useMap} from 'react-leaflet'; +import type {FeatureGroup as LeafletFeatureGroup} from 'leaflet'; +import {useContext, useLayoutEffect, useRef} from 'react'; +import {FeatureGroup, MapContainer, TileLayer, useMap} from 'react-leaflet'; +import {EditControl} from 'react-leaflet-draw'; import useAsync from 'react-use/esm/useAsync'; import Loader from '@/components/builder/loader'; import {Component, Description} from '@/components/formio'; import {BuilderContext} from '@/context'; +import {ComponentPreviewProps} from '@/registry/types'; -import {ComponentPreviewProps} from '../types'; +import './previews.scss'; interface MapViewProps { lat: number; @@ -41,8 +44,10 @@ const Preview: React.FC> = ({component defaultZoom, initialCenter = {}, tileLayerIdentifier, + interactions, } = component; const {getMapTileLayers} = useContext(BuilderContext); + const featureGroupRef = useRef(null); const {value: tileLayers, loading, error} = useAsync(async () => await getMapTileLayers(), []); if (error) { throw error; @@ -63,6 +68,12 @@ const Preview: React.FC> = ({component TILE_LAYER_RD.url ); }; + + const onFeatureCreate = (event: any) => { + featureGroupRef.current?.clearLayers(); + featureGroupRef.current?.addLayer(event.layer); + }; + return ( > = ({component }} > + + + {description && } diff --git a/src/registry/map/previews.scss b/src/registry/map/previews.scss new file mode 100644 index 00000000..926ff6ce --- /dev/null +++ b/src/registry/map/previews.scss @@ -0,0 +1,2 @@ +@import 'leaflet-draw/dist/leaflet.draw.css'; +@import 'leaflet/dist/leaflet.css'; From c5ea84ccc341805bac731cee98db132641db3eff Mon Sep 17 00:00:00 2001 From: robinvandermolen Date: Wed, 18 Dec 2024 15:21:36 +0100 Subject: [PATCH 05/10] :construction_worker: [open-formulieren/open-forms#2177] Update build scripts Both changes are needed for the leaflet-draw and react-leaflet-draw dependencies. leaflet-draw uses images for the different markers, which are included in the css. For this to work with the scss build, .png and .svg files use the dataurl loader https://esbuild.github.io/content-types/#data-url Typescript errors in the react-leaflet-draw dependency caused a typescript validation/error, which shouldn't happen. Using `skipLibCheck` in the tsconfig.json type issues in the node_modules folder are ignored --- bundle-scss.mjs | 4 ++++ tsconfig.json | 1 + 2 files changed, 5 insertions(+) diff --git a/bundle-scss.mjs b/bundle-scss.mjs index ac68b6bc..a0a90f59 100644 --- a/bundle-scss.mjs +++ b/bundle-scss.mjs @@ -5,6 +5,10 @@ await esbuild.build({ entryPoints: ['src/index.ts'], outdir: 'lib/css', bundle: true, + loader: { + ".png": "dataurl", + ".svg": "dataurl", + }, minify: false, sourcemap: true, plugins: [sassPlugin()], diff --git a/tsconfig.json b/tsconfig.json index 589fe44a..cc81f0c5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -18,6 +18,7 @@ "strictNullChecks": true, "allowSyntheticDefaultImports": true, "noErrorTruncation": true, + "skipLibCheck": true, "paths": { "@/*": ["./*"], "@/sb-decorators": ["../.storybook/decorators.tsx"] From 60f860ffb13a26242ccb780b8fe37ef4b5c34a08 Mon Sep 17 00:00:00 2001 From: robinvandermolen Date: Wed, 8 Jan 2025 16:14:02 +0100 Subject: [PATCH 06/10] :truck: [open-formulieren/open-forms#2177] Moving map settings to separate tab --- src/registry/map/edit.tsx | 31 +++++++++++++------ src/registry/map/map-configuration.stories.ts | 2 ++ 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/src/registry/map/edit.tsx b/src/registry/map/edit.tsx index b3c1d1cb..4068af7f 100644 --- a/src/registry/map/edit.tsx +++ b/src/registry/map/edit.tsx @@ -21,7 +21,7 @@ import { useDeriveComponentKey, } from '@/components/builder'; import {LABELS} from '@/components/builder/messages'; -import {Checkbox, Select, TabList, TabPanel, Tabs} from '@/components/formio'; +import {Checkbox, Select, Tab, TabList, TabPanel, Tabs} from '@/components/formio'; import {BuilderContext} from '@/context'; import InteractionConfiguration from '@/registry/map/interaction-configuration'; import {useErrorChecker} from '@/utils/errors'; @@ -62,16 +62,25 @@ const EditForm: EditFormDefinition = () => { 'showInPDF', 'hidden', 'clearOnHide', - 'isSensitiveData', + 'isSensitiveData' + )} + /> + + + - - + > + + @@ -86,10 +95,6 @@ const EditForm: EditFormDefinition = () => { - - {!values.useConfigDefaultMapSettings && } - - {/* Advanced tab */} @@ -104,6 +109,14 @@ const EditForm: EditFormDefinition = () => { + {/* Map settings tab */} + + + + + {!values.useConfigDefaultMapSettings && } + + {/* Registration tab */} diff --git a/src/registry/map/map-configuration.stories.ts b/src/registry/map/map-configuration.stories.ts index addc53fd..666e7b01 100644 --- a/src/registry/map/map-configuration.stories.ts +++ b/src/registry/map/map-configuration.stories.ts @@ -45,6 +45,7 @@ export const NotUsingGlobalConfig: Story = { const canvas = within(canvasElement); await step('Initial state', async () => { + await userEvent.click(canvas.getByRole('link', {name: 'Map settings'})); expect( canvas.getByLabelText('Use globally configured map component settings') ).not.toBeChecked(); @@ -81,6 +82,7 @@ export const UsingGlobalConfig: Story = { const canvas = within(canvasElement); await step('Initial state', async () => { + await userEvent.click(canvas.getByRole('link', {name: 'Map settings'})); expect( canvas.getByLabelText('Use globally configured map component settings') ).not.toBeChecked(); From ba12ad77d982f223604d915e1cc419f1fd4c6794 Mon Sep 17 00:00:00 2001 From: robinvandermolen Date: Wed, 8 Jan 2025 18:04:04 +0100 Subject: [PATCH 07/10] :globe_with_meridians: [open-formulieren/open-forms#2177] Translations --- i18n/messages/en.json | 50 +++++++++++++++++-- i18n/messages/nl.json | 50 +++++++++++++++++-- .../map/interaction-configuration.tsx | 16 +++--- src/registry/map/map-configuration.stories.ts | 4 +- src/registry/map/map-configuration.tsx | 4 +- 5 files changed, 102 insertions(+), 22 deletions(-) diff --git a/i18n/messages/en.json b/i18n/messages/en.json index 0c878b23..5bdc1d20 100644 --- a/i18n/messages/en.json +++ b/i18n/messages/en.json @@ -284,6 +284,11 @@ "description": "Operator 'subtract' option label", "originalDefault": "Subtract" }, + "9oJuUL": { + "defaultMessage": "Marker", + "description": "Label for 'interactions.marker' builder field", + "originalDefault": "Marker" + }, "AClYLf": { "defaultMessage": "If checked, the current day is an allowed value.", "description": "Tooltip for 'date constraint includeToday' builder validation field", @@ -469,6 +474,11 @@ "description": "Label for the 'columns' builder field", "originalDefault": "Column sizes" }, + "Gjhh/5": { + "defaultMessage": "Available drawing shapes", + "description": "Map interaction configuration panel title", + "originalDefault": "Available drawing shapes" + }, "GjumK9": { "defaultMessage": "Specify the size of each column. The sum of all the widths should be 100%.", "description": "Tooltip for 'columns' builder field", @@ -679,6 +689,11 @@ "description": "Double column label", "originalDefault": "Double column" }, + "T64zDz": { + "defaultMessage": "Polygon", + "description": "Label for 'interactions.polygon' builder field", + "originalDefault": "Polygon" + }, "TCNvqa": { "defaultMessage": "Minimum date", "description": "Date field 'minDate' fixed value label", @@ -794,6 +809,11 @@ "description": "Tooltip for 'Multiple values' builder field", "originalDefault": "Are there multiple values possible for this field?" }, + "WXpj4j": { + "defaultMessage": "Users can set a marker on the map", + "description": "Tooltip for 'interactions.marker' builder field", + "originalDefault": "Users can set a marker on the map" + }, "WZJG0y": { "defaultMessage": "In the past", "description": "Date constraint mode 'past' label", @@ -914,6 +934,11 @@ "description": "Label for address houseletter", "originalDefault": "House letter addition" }, + "b64egT": { + "defaultMessage": "Users can draw shapes (polygons) on the map", + "description": "Tooltip for 'interactions.polygon' builder field", + "originalDefault": "Users can draw shapes (polygons) on the map" + }, "bYBFBc": { "defaultMessage": "Whether to show this value in the submission summary", "description": "Tooltip for 'showInSummary' builder field", @@ -999,11 +1024,6 @@ "description": "Date field 'minDate' validation panel title", "originalDefault": "Minimum date {configured, select, false {(not set)} other {}}" }, - "e6SsfR": { - "defaultMessage": "Map configuration", - "description": "Map configuration panel title", - "originalDefault": "Map configuration" - }, "eAmrdi": { "defaultMessage": "Loading...", "description": "Loading content text", @@ -1244,6 +1264,11 @@ "description": "Tooltip for 'operator' in relative delta date constraint validation", "originalDefault": "Specify whether to add or subtract a time delta to/from the variable." }, + "mRmbnJ": { + "defaultMessage": "Line", + "description": "Label for 'interactions.polyline' builder field", + "originalDefault": "Line" + }, "mWuCXv": { "defaultMessage": "Optionally provide additional information to explain the meaning of the option.", "description": "Tooltip for option/choice description", @@ -1339,6 +1364,11 @@ "description": "Label for 'NumberOfRows' builder field", "originalDefault": "Number of rows" }, + "pM92DZ": { + "defaultMessage": "Users can draw straight lines on the map", + "description": "Tooltip for 'interactions.polyline' builder field", + "originalDefault": "Users can draw straight lines on the map" + }, "pT5jx/": { "defaultMessage": "Column size on mobile, value between 1 and 4.", "description": "Accessible label for column mobile size", @@ -1349,6 +1379,11 @@ "description": "Selectboxes dummy option for itemsExpression", "originalDefault": "Options from expression: {expression}" }, + "pdmkVe": { + "defaultMessage": "Initial focus", + "description": "Map initial focus panel title", + "originalDefault": "Initial focus" + }, "pfdsz9": { "defaultMessage": "House number addition", "description": "Label for address housenumberaddition", @@ -1464,6 +1499,11 @@ "description": "Tooltip for 'prefill.attribute' builder field", "originalDefault": "Specify the attribute holding the pre-fill data." }, + "wJ7Yha": { + "defaultMessage": "Map settings", + "description": "Component edit form tab title for 'Map settings' tab", + "originalDefault": "Map settings" + }, "wOq8Pb": { "defaultMessage": "Translation for option with value \"{value}\"", "description": "Accessible label for option label translation field", diff --git a/i18n/messages/nl.json b/i18n/messages/nl.json index 692b6b38..409d4722 100644 --- a/i18n/messages/nl.json +++ b/i18n/messages/nl.json @@ -287,6 +287,11 @@ "description": "Operator 'subtract' option label", "originalDefault": "Subtract" }, + "9oJuUL": { + "defaultMessage": "Pin/punt", + "description": "Label for 'interactions.marker' builder field", + "originalDefault": "Marker" + }, "AClYLf": { "defaultMessage": "Indien aangevinkt, dan is de dag op het moment van evaluatie een geldige datum.", "description": "Tooltip for 'date constraint includeToday' builder validation field", @@ -475,6 +480,11 @@ "description": "Label for the 'columns' builder field", "originalDefault": "Column sizes" }, + "Gjhh/5": { + "defaultMessage": "Beschikbare vormen", + "description": "Map interaction configuration panel title", + "originalDefault": "Available drawing shapes" + }, "GjumK9": { "defaultMessage": "Geef de grootte van elke kolom op. De som van alle breedtes moet 100% zijn.", "description": "Tooltip for 'columns' builder field", @@ -688,6 +698,11 @@ "description": "Double column label", "originalDefault": "Double column" }, + "T64zDz": { + "defaultMessage": "Veelhoek (Polygoon)", + "description": "Label for 'interactions.polygon' builder field", + "originalDefault": "Polygon" + }, "TCNvqa": { "defaultMessage": "Minimale datum", "description": "Date field 'minDate' fixed value label", @@ -804,6 +819,11 @@ "description": "Tooltip for 'Multiple values' builder field", "originalDefault": "Are there multiple values possible for this field?" }, + "WXpj4j": { + "defaultMessage": "Gebruikers kunnen een punt aanduiden op de kaart.", + "description": "Tooltip for 'interactions.marker' builder field", + "originalDefault": "Users can set a marker on the map" + }, "WZJG0y": { "defaultMessage": "In het verleden", "description": "Date constraint mode 'past' label", @@ -925,6 +945,11 @@ "description": "Label for address houseletter", "originalDefault": "House letter addition" }, + "b64egT": { + "defaultMessage": "Gebruikers kunnen een veelhoek (gesloten vorm die uit rechte lijnen bestaat) tekenen.", + "description": "Tooltip for 'interactions.polygon' builder field", + "originalDefault": "Users can draw shapes (polygons) on the map" + }, "bYBFBc": { "defaultMessage": "Geef aan of deze waarde in het bevestigscherm moet getoond worden.", "description": "Tooltip for 'showInSummary' builder field", @@ -1011,11 +1036,6 @@ "description": "Date field 'minDate' validation panel title", "originalDefault": "Minimum date {configured, select, false {(not set)} other {}}" }, - "e6SsfR": { - "defaultMessage": "Kaartinstellingen", - "description": "Map configuration panel title", - "originalDefault": "Map configuration" - }, "eAmrdi": { "defaultMessage": "Aan het laden...", "description": "Loading content text", @@ -1260,6 +1280,11 @@ "description": "Tooltip for 'operator' in relative delta date constraint validation", "originalDefault": "Specify whether to add or subtract a time delta to/from the variable." }, + "mRmbnJ": { + "defaultMessage": "Lijn", + "description": "Label for 'interactions.polyline' builder field", + "originalDefault": "Line" + }, "mWuCXv": { "defaultMessage": "Je kan een extra omschrijving opnemen om een keuzeoptie te verduidelijken.", "description": "Tooltip for option/choice description", @@ -1357,6 +1382,11 @@ "description": "Label for 'NumberOfRows' builder field", "originalDefault": "Number of rows" }, + "pM92DZ": { + "defaultMessage": "Gebruikers kunnen rechte lijnen tekenen op de kaart.", + "description": "Tooltip for 'interactions.polyline' builder field", + "originalDefault": "Users can draw straight lines on the map" + }, "pT5jx/": { "defaultMessage": "Kolombreedte op mobiel, de waarde moet tussen 1 en 4 liggen.", "description": "Accessible label for column mobile size", @@ -1367,6 +1397,11 @@ "description": "Selectboxes dummy option for itemsExpression", "originalDefault": "Options from expression: {expression}" }, + "pdmkVe": { + "defaultMessage": "Begin focuspunt", + "description": "Map initial focus panel title", + "originalDefault": "Initial focus" + }, "pfdsz9": { "defaultMessage": "Huisnummertoevoeging", "description": "Label for address housenumberaddition", @@ -1484,6 +1519,11 @@ "description": "Tooltip for 'prefill.attribute' builder field", "originalDefault": "Specify the attribute holding the pre-fill data." }, + "wJ7Yha": { + "defaultMessage": "Kaartinstellingen", + "description": "Component edit form tab title for 'Map settings' tab", + "originalDefault": "Map settings" + }, "wOq8Pb": { "defaultMessage": "Vertaling voor het label van de optie met waarde \"{value}\"", "description": "Accessible label for option label translation field", diff --git a/src/registry/map/interaction-configuration.tsx b/src/registry/map/interaction-configuration.tsx index 437b3b18..780a1f24 100644 --- a/src/registry/map/interaction-configuration.tsx +++ b/src/registry/map/interaction-configuration.tsx @@ -6,7 +6,7 @@ const PolygonInteraction: React.FC = () => { const intl = useIntl(); const tooltip = intl.formatMessage({ description: "Tooltip for 'interactions.polygon' builder field", - defaultMessage: 'Allowing users to draw a polygon when using the map component', + defaultMessage: 'Users can draw shapes (polygons) on the map', }); return ( { label={ } tooltip={tooltip} @@ -26,7 +26,7 @@ const PolylineInteraction: React.FC = () => { const intl = useIntl(); const tooltip = intl.formatMessage({ description: "Tooltip for 'interactions.polyline' builder field", - defaultMessage: 'Allowing users to draw a line when using the map component', + defaultMessage: 'Users can draw straight lines on the map', }); return ( { label={ } tooltip={tooltip} @@ -46,7 +46,7 @@ const MarkerInteraction: React.FC = () => { const intl = useIntl(); const tooltip = intl.formatMessage({ description: "Tooltip for 'interactions.marker' builder field", - defaultMessage: 'Allowing users to set a marker when using the map component', + defaultMessage: 'Users can set a marker on the map', }); return ( { label={ } tooltip={tooltip} @@ -66,8 +66,8 @@ const InteractionConfiguration: React.FC = () => ( } > diff --git a/src/registry/map/map-configuration.stories.ts b/src/registry/map/map-configuration.stories.ts index 666e7b01..d1eac19a 100644 --- a/src/registry/map/map-configuration.stories.ts +++ b/src/registry/map/map-configuration.stories.ts @@ -52,7 +52,7 @@ export const NotUsingGlobalConfig: Story = { }); await step('Open configuration panel', async () => { - const panelTitle = await canvas.findByText('Map configuration'); + const panelTitle = await canvas.findByText('Initial focus'); await waitFor(async () => { expect(panelTitle).toBeVisible(); }); @@ -89,7 +89,7 @@ export const UsingGlobalConfig: Story = { }); await step('Toggle checkbox to enable global configuration', async () => { - const panelTitle = await canvas.findByText('Map configuration'); + const panelTitle = await canvas.findByText('Initial focus'); await waitFor(async () => { expect(panelTitle).toBeVisible(); }); diff --git a/src/registry/map/map-configuration.tsx b/src/registry/map/map-configuration.tsx index 9db9f2c8..e409e088 100644 --- a/src/registry/map/map-configuration.tsx +++ b/src/registry/map/map-configuration.tsx @@ -84,8 +84,8 @@ const MapConfiguration: React.FC = () => ( } collapsible From 01e610c56f6b6a1052bc8360e7b2c28fbabc22b9 Mon Sep 17 00:00:00 2001 From: robinvandermolen Date: Thu, 9 Jan 2025 09:37:19 +0100 Subject: [PATCH 08/10] :sparkles: [open-formulieren/open-forms#2177] Added delete button --- src/registry/map/preview.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/registry/map/preview.tsx b/src/registry/map/preview.tsx index c843e123..57084f8d 100644 --- a/src/registry/map/preview.tsx +++ b/src/registry/map/preview.tsx @@ -101,7 +101,6 @@ const Preview: React.FC> = ({component onCreated={onFeatureCreate} edit={{ edit: false, - remove: false, }} draw={{ rectangle: false, From fe989d76a9d1728ea84d384092b4c5c8e248edc4 Mon Sep 17 00:00:00 2001 From: robinvandermolen Date: Tue, 14 Jan 2025 14:27:46 +0100 Subject: [PATCH 09/10] :rotating_light: [open-formulieren/open-forms#2177] Patching react-leaflet-draw The React-leaflet-draw package seems abandoned. As such, a fix for the typescript issue (https://github.com/alex3165/react-leaflet-draw/issues/188) probably won't happen anytime soon The .patch file, in `/patches`, contains the fix needed for the react-leaflet-draw index.d.ts file. The problem with this solution, is that this only solves it for this project. If we introduce typescript to the SDK (or any other project using `react-leaflet-draw`), this problem will need to be solved again --- package-lock.json | 589 +++++++++++++++++++++--- package.json | 5 +- patches/react-leaflet-draw+0.20.4.patch | 22 + tsconfig.json | 1 - 4 files changed, 543 insertions(+), 74 deletions(-) create mode 100644 patches/react-leaflet-draw+0.20.4.patch diff --git a/package-lock.json b/package-lock.json index 2a9eac5b..f1dcaab6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,6 +7,7 @@ "": { "name": "@open-formulieren/formio-builder", "version": "0.34.0", + "hasInstallScript": true, "license": "EUPL-1.2", "dependencies": { "@ckeditor/ckeditor5-react": "^6.2.0", @@ -20,6 +21,7 @@ "leaflet": "^1.9.4", "leaflet-draw": "^1.0.4", "lodash": "^4.17.21", + "patch-package": "^8.0.0", "react-intl": "^6.3.2", "react-leaflet": "^4.2.1", "react-leaflet-draw": "^0.20.4", @@ -56,6 +58,7 @@ "@trivago/prettier-plugin-sort-imports": "^4.1.1", "@types/jest": "^29.5.12", "@types/leaflet": "^1.9.8", + "@types/leaflet-draw": "^1.0.11", "@types/lodash": "^4.17.0", "@types/proj4leaflet": "^1.0.10", "@types/react": "^18.2.45", @@ -7475,6 +7478,16 @@ "@types/geojson": "*" } }, + "node_modules/@types/leaflet-draw": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@types/leaflet-draw/-/leaflet-draw-1.0.11.tgz", + "integrity": "sha512-dyedtNm3aSmnpi6FM6VSl28cQuvP+MD7pgpXyO3Q1ZOCvrJKmzaDq0P3YZTnnBs61fQCKSnNYmbvCkDgFT9FHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/leaflet": "*" + } + }, "node_modules/@types/lodash": { "version": "4.17.7", "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.7.tgz", @@ -8054,6 +8067,12 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, + "node_modules/@yarnpkg/lockfile": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", + "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", + "license": "BSD-2-Clause" + }, "node_modules/abab": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", @@ -8393,6 +8412,15 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "dev": true }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "license": "ISC", + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/atoa": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/atoa/-/atoa-1.0.0.tgz", @@ -8705,8 +8733,7 @@ "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "node_modules/better-opn": { "version": "3.0.2", @@ -8813,7 +8840,6 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -8823,7 +8849,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, "dependencies": { "fill-range": "^7.1.1" }, @@ -9082,7 +9107,6 @@ "version": "3.8.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", - "dev": true, "funding": [ { "type": "github", @@ -9265,8 +9289,7 @@ "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, "node_modules/constants-browserify": { "version": "1.0.0", @@ -11040,7 +11063,6 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, "dependencies": { "to-regex-range": "^5.0.1" }, @@ -11301,6 +11323,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/find-yarn-workspace-root": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz", + "integrity": "sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==", + "license": "Apache-2.0", + "dependencies": { + "micromatch": "^4.0.2" + } + }, "node_modules/flat-cache": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", @@ -11708,8 +11739,7 @@ "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, "node_modules/fsevents": { "version": "2.3.2", @@ -11851,7 +11881,6 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -11970,8 +11999,7 @@ "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, "node_modules/handlebars": { "version": "4.7.7", @@ -12547,7 +12575,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -12729,7 +12756,6 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "dev": true, "bin": { "is-docker": "cli.js" }, @@ -12817,7 +12843,6 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, "engines": { "node": ">=0.12.0" } @@ -13011,7 +13036,6 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dev": true, "dependencies": { "is-docker": "^2.0.0" }, @@ -13027,8 +13051,7 @@ "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" }, "node_modules/ismobilejs": { "version": "1.1.1", @@ -15756,7 +15779,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.2.tgz", "integrity": "sha512-eunSSaEnxV12z+Z73y/j5N37/In40GK4GmsSy+tEHJMxknvqnA7/djeYtAgW0GsWHUfg+847WJjKaEylk2y09g==", - "dev": true, "dependencies": { "jsonify": "^0.0.1" }, @@ -15786,7 +15808,6 @@ "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, "dependencies": { "universalify": "^2.0.0" }, @@ -15798,7 +15819,6 @@ "version": "0.0.1", "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz", "integrity": "sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==", - "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -15824,6 +15844,15 @@ "json-buffer": "3.0.1" } }, + "node_modules/klaw-sync": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz", + "integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==", + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.11" + } + }, "node_modules/kleur": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", @@ -16146,7 +16175,6 @@ "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" @@ -16209,7 +16237,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -16221,7 +16248,6 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -16803,7 +16829,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, "dependencies": { "wrappy": "1" } @@ -16849,6 +16874,15 @@ "node": ">=0.10.0" } }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -17012,6 +17046,242 @@ "tslib": "^2.0.3" } }, + "node_modules/patch-package": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-8.0.0.tgz", + "integrity": "sha512-da8BVIhzjtgScwDJ2TtKsfT5JFWz1hYoBl9rUQ1f38MC2HwnEIkK8VN3dKMKcP7P7bvvgzNDbfNHtx3MsQb5vA==", + "license": "MIT", + "dependencies": { + "@yarnpkg/lockfile": "^1.1.0", + "chalk": "^4.1.2", + "ci-info": "^3.7.0", + "cross-spawn": "^7.0.3", + "find-yarn-workspace-root": "^2.0.0", + "fs-extra": "^9.0.0", + "json-stable-stringify": "^1.0.2", + "klaw-sync": "^6.0.0", + "minimist": "^1.2.6", + "open": "^7.4.2", + "rimraf": "^2.6.3", + "semver": "^7.5.3", + "slash": "^2.0.0", + "tmp": "^0.0.33", + "yaml": "^2.2.2" + }, + "bin": { + "patch-package": "index.js" + }, + "engines": { + "node": ">=14", + "npm": ">5" + } + }, + "node_modules/patch-package/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/patch-package/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/patch-package/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/patch-package/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" + }, + "node_modules/patch-package/node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/patch-package/node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "license": "MIT", + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/patch-package/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/patch-package/node_modules/open": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", + "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", + "license": "MIT", + "dependencies": { + "is-docker": "^2.0.0", + "is-wsl": "^2.1.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/patch-package/node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/patch-package/node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/patch-package/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/patch-package/node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/patch-package/node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/patch-package/node_modules/slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/patch-package/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/patch-package/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/patch-package/node_modules/yaml": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz", + "integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==", + "license": "ISC", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/path-browserify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", @@ -17031,7 +17301,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -17110,7 +17379,6 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, "engines": { "node": ">=8.6" }, @@ -19516,6 +19784,18 @@ "node": ">=14.0.0" } }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "license": "MIT", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -19534,7 +19814,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, "dependencies": { "is-number": "^7.0.0" }, @@ -20035,7 +20314,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true, "engines": { "node": ">= 10.0.0" } @@ -20767,8 +21045,7 @@ "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, "node_modules/write-file-atomic": { "version": "4.0.2", @@ -26331,6 +26608,15 @@ "@types/geojson": "*" } }, + "@types/leaflet-draw": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@types/leaflet-draw/-/leaflet-draw-1.0.11.tgz", + "integrity": "sha512-dyedtNm3aSmnpi6FM6VSl28cQuvP+MD7pgpXyO3Q1ZOCvrJKmzaDq0P3YZTnnBs61fQCKSnNYmbvCkDgFT9FHQ==", + "dev": true, + "requires": { + "@types/leaflet": "*" + } + }, "@types/lodash": { "version": "4.17.7", "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.7.tgz", @@ -26869,6 +27155,11 @@ } } }, + "@yarnpkg/lockfile": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", + "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==" + }, "abab": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", @@ -27122,6 +27413,11 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "dev": true }, + "at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==" + }, "atoa": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/atoa/-/atoa-1.0.0.tgz", @@ -27366,8 +27662,7 @@ "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "better-opn": { "version": "3.0.2", @@ -27449,7 +27744,6 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -27459,7 +27753,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, "requires": { "fill-range": "^7.1.1" } @@ -27638,8 +27931,7 @@ "ci-info": { "version": "3.8.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", - "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", - "dev": true + "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==" }, "cjs-module-lexer": { "version": "1.2.3", @@ -27787,8 +28079,7 @@ "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, "constants-browserify": { "version": "1.0.0", @@ -29193,7 +29484,6 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, "requires": { "to-regex-range": "^5.0.1" } @@ -29391,6 +29681,14 @@ "path-exists": "^4.0.0" } }, + "find-yarn-workspace-root": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz", + "integrity": "sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==", + "requires": { + "micromatch": "^4.0.2" + } + }, "flat-cache": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", @@ -29683,8 +29981,7 @@ "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, "fsevents": { "version": "2.3.2", @@ -29777,7 +30074,6 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -29863,8 +30159,7 @@ "graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, "handlebars": { "version": "4.7.7", @@ -30264,7 +30559,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, "requires": { "once": "^1.3.0", "wrappy": "1" @@ -30397,8 +30691,7 @@ "is-docker": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "dev": true + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==" }, "is-extglob": { "version": "2.1.1", @@ -30449,8 +30742,7 @@ "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" }, "is-number-object": { "version": "1.0.7", @@ -30578,7 +30870,6 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dev": true, "requires": { "is-docker": "^2.0.0" } @@ -30591,8 +30882,7 @@ "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" }, "ismobilejs": { "version": "1.1.1", @@ -32628,7 +32918,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.2.tgz", "integrity": "sha512-eunSSaEnxV12z+Z73y/j5N37/In40GK4GmsSy+tEHJMxknvqnA7/djeYtAgW0GsWHUfg+847WJjKaEylk2y09g==", - "dev": true, "requires": { "jsonify": "^0.0.1" } @@ -32649,7 +32938,6 @@ "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, "requires": { "graceful-fs": "^4.1.6", "universalify": "^2.0.0" @@ -32658,8 +32946,7 @@ "jsonify": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz", - "integrity": "sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==", - "dev": true + "integrity": "sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==" }, "jstimezonedetect": { "version": "1.0.7", @@ -32682,6 +32969,14 @@ "json-buffer": "3.0.1" } }, + "klaw-sync": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz", + "integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==", + "requires": { + "graceful-fs": "^4.1.11" + } + }, "kleur": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", @@ -32942,7 +33237,6 @@ "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, "requires": { "braces": "^3.0.3", "picomatch": "^2.3.1" @@ -32984,7 +33278,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, "requires": { "brace-expansion": "^1.1.7" } @@ -32992,8 +33285,7 @@ "minimist": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==" }, "minipass": { "version": "5.0.0", @@ -33429,7 +33721,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, "requires": { "wrappy": "1" } @@ -33460,6 +33751,11 @@ "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==", "dev": true }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==" + }, "p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -33583,6 +33879,152 @@ "tslib": "^2.0.3" } }, + "patch-package": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-8.0.0.tgz", + "integrity": "sha512-da8BVIhzjtgScwDJ2TtKsfT5JFWz1hYoBl9rUQ1f38MC2HwnEIkK8VN3dKMKcP7P7bvvgzNDbfNHtx3MsQb5vA==", + "requires": { + "@yarnpkg/lockfile": "^1.1.0", + "chalk": "^4.1.2", + "ci-info": "^3.7.0", + "cross-spawn": "^7.0.3", + "find-yarn-workspace-root": "^2.0.0", + "fs-extra": "^9.0.0", + "json-stable-stringify": "^1.0.2", + "klaw-sync": "^6.0.0", + "minimist": "^1.2.6", + "open": "^7.4.2", + "rimraf": "^2.6.3", + "semver": "^7.5.3", + "slash": "^2.0.0", + "tmp": "^0.0.33", + "yaml": "^2.2.2" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "requires": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "open": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", + "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", + "requires": { + "is-docker": "^2.0.0", + "is-wsl": "^2.1.1" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "requires": { + "glob": "^7.1.3" + } + }, + "semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==" + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" + }, + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "requires": { + "isexe": "^2.0.0" + } + }, + "yaml": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz", + "integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==" + } + } + }, "path-browserify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", @@ -33598,8 +34040,7 @@ "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" }, "path-key": { "version": "2.0.1", @@ -33658,8 +34099,7 @@ "picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" }, "pidtree": { "version": "0.3.1", @@ -35414,6 +35854,14 @@ "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-3.0.2.tgz", "integrity": "sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==" }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "requires": { + "os-tmpdir": "~1.0.2" + } + }, "tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -35429,7 +35877,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, "requires": { "is-number": "^7.0.0" } @@ -35788,8 +36235,7 @@ "universalify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" }, "unpipe": { "version": "1.0.0", @@ -36340,8 +36786,7 @@ "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, "write-file-atomic": { "version": "4.0.2", diff --git a/package.json b/package.json index ba2400b5..15b064ff 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,8 @@ "build-storybook": "storybook build --webpack-stats-json", "makemessages": "formatjs extract", "compilemessages": "formatjs compile-folder --ast i18n/messages i18n/compiled", - "watch": "ttsc -p tsconfig.prod.json --watch" + "watch": "ttsc -p tsconfig.prod.json --watch", + "postinstall": "patch-package" }, "files": [ "lib/", @@ -81,6 +82,7 @@ "@trivago/prettier-plugin-sort-imports": "^4.1.1", "@types/jest": "^29.5.12", "@types/leaflet": "^1.9.8", + "@types/leaflet-draw": "^1.0.11", "@types/lodash": "^4.17.0", "@types/proj4leaflet": "^1.0.10", "@types/react": "^18.2.45", @@ -126,6 +128,7 @@ "leaflet": "^1.9.4", "leaflet-draw": "^1.0.4", "lodash": "^4.17.21", + "patch-package": "^8.0.0", "react-intl": "^6.3.2", "react-leaflet": "^4.2.1", "react-leaflet-draw": "^0.20.4", diff --git a/patches/react-leaflet-draw+0.20.4.patch b/patches/react-leaflet-draw+0.20.4.patch new file mode 100644 index 00000000..08b1a937 --- /dev/null +++ b/patches/react-leaflet-draw+0.20.4.patch @@ -0,0 +1,22 @@ +diff --git a/node_modules/react-leaflet-draw/src/index.d.ts b/node_modules/react-leaflet-draw/src/index.d.ts +index 0ebca75..5bc3da9 100644 +--- a/node_modules/react-leaflet-draw/src/index.d.ts ++++ b/node_modules/react-leaflet-draw/src/index.d.ts +@@ -1,7 +1,7 @@ + import * as React from 'react'; + import type { + DrawOptions, +- EditOptions, ++ Control, + ControlPosition, + DrawEvents, + } from 'leaflet'; +@@ -22,7 +22,7 @@ interface EditControlProps { + + onCreated?: (v: DrawEvents.Created) => void; + onMounted?: Function; +- edit?: EditOptions; ++ edit?: Omit; + draw: { + polyline?: DrawOptions.PolylineOptions | boolean; + polygon?: DrawOptions.PolygonOptions | boolean; diff --git a/tsconfig.json b/tsconfig.json index cc81f0c5..589fe44a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -18,7 +18,6 @@ "strictNullChecks": true, "allowSyntheticDefaultImports": true, "noErrorTruncation": true, - "skipLibCheck": true, "paths": { "@/*": ["./*"], "@/sb-decorators": ["../.storybook/decorators.tsx"] From f570ae10f0af0211f2c70cb7244d362e6a1f7301 Mon Sep 17 00:00:00 2001 From: robinvandermolen Date: Wed, 15 Jan 2025 08:30:04 +0100 Subject: [PATCH 10/10] :lipstick: [open-formulieren/open-forms#2177] Hide map edit controls if all interactions are disabled --- src/registry/map/preview.tsx | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/src/registry/map/preview.tsx b/src/registry/map/preview.tsx index 57084f8d..52d2e5c7 100644 --- a/src/registry/map/preview.tsx +++ b/src/registry/map/preview.tsx @@ -74,6 +74,7 @@ const Preview: React.FC> = ({component featureGroupRef.current?.addLayer(event.layer); }; + const editable = Object.values(interactions || {}).find(interaction => interaction); return ( > = ({component > - + {editable && ( + + )}