@premiate/strapi-plugin-maplibre-field 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +43 -0
- package/dist/_chunks/{index-Dzpog-Qf.mjs → index-B0Nr95wz.mjs} +2 -2
- package/dist/_chunks/{index-Bp7DLorc.mjs → index-CBxydRKp.mjs} +1 -1
- package/dist/_chunks/{index-zNvHsRuo.js → index-CDY4Awnh.js} +1 -1
- package/dist/_chunks/{index-DjK7O741.js → index-ysvid6md.js} +2 -2
- package/dist/admin/de-B0QBc7M2.js +27 -0
- package/dist/admin/de-BMK0skCB.mjs +27 -0
- package/dist/admin/en-C8iInpNv.mjs +27 -0
- package/dist/admin/en-CA0XtbN7.js +27 -0
- package/dist/admin/es-BU6JgkbZ.js +25 -0
- package/dist/admin/es-DZO4NHjt.mjs +25 -0
- package/dist/admin/fr-B8NDboqe.mjs +27 -0
- package/dist/admin/fr-DIBfzRbg.js +27 -0
- package/dist/admin/index-B-3vqPUe.mjs +1836 -0
- package/dist/admin/index-B0LVK-NK.js +170 -0
- package/dist/admin/index-BaGweGhM.js +1856 -0
- package/dist/admin/index-DjL4deZ6.mjs +171 -0
- package/dist/admin/index.js +3 -2
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/it-B-lr3jhh.js +27 -0
- package/dist/admin/it-DFH6n6E1.mjs +27 -0
- package/dist/server/index.js +8 -3
- package/dist/server/index.mjs +6 -2
- package/dist/server/src/index.d.ts +9 -4
- package/package.json +11 -8
- package/dist/admin/src/components/Initializer.d.ts +0 -6
- package/dist/admin/src/components/MapInput/SearchBox.d.ts +0 -22
- package/dist/admin/src/components/MapInput/basemap-control.d.ts +0 -8
- package/dist/admin/src/components/MapInput/index.d.ts +0 -19
- package/dist/admin/src/components/MapInput/layer-control.d.ts +0 -18
- package/dist/admin/src/components/PluginIcon.d.ts +0 -2
- package/dist/admin/src/hooks/usePluginConfig.d.ts +0 -2
- package/dist/admin/src/mutations/mutateEditViewHook.d.ts +0 -30
- package/dist/admin/src/services/geocoder-service.d.ts +0 -31
- package/dist/admin/src/services/poi-service.d.ts +0 -160
- package/dist/admin/src/utils/getTrad.d.ts +0 -2
- package/dist/admin/src/utils/pluginId.d.ts +0 -2
- package/dist/admin/src/utils/prefixPluginTranslations.d.ts +0 -3
- package/dist/server/src/bootstrap.d.ts +0 -2
- package/dist/server/src/config/index.d.ts +0 -62
- package/dist/server/src/config/schema.d.ts +0 -53
- package/dist/server/src/controllers/config.d.ts +0 -9
- package/dist/server/src/controllers/index.d.ts +0 -10
- package/dist/server/src/destroy.d.ts +0 -2
- package/dist/server/src/register.d.ts +0 -5
- package/dist/server/src/routes/admin.d.ts +0 -12
- package/dist/server/src/routes/index.d.ts +0 -14
- package/dist/server/src/types/config.d.ts +0 -26
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,49 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.2.1] - 2026-02-22
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **Full-width map field** - Map field now spans all 12 columns in the edit view layout for better usability
|
|
13
|
+
- **Rebalanced info grid** - Place name (6 cols), longitude (3 cols), latitude (3 cols) instead of 8-2-2
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- **Admin route security** - Protected `/config` endpoint with `policies: ['admin::isAuthenticatedAdmin']` to allow access to every Strapi authenticated role and prevent unauthorized access
|
|
18
|
+
- **Vite/esbuild class field transpilation** - Removed ES2022 class field declarations from `BasemapControl` and `LayerControlImpl` to prevent `__publicField is not defined` runtime error when Strapi's Vite pre-bundles the plugin with esbuild targeting below ES2022
|
|
19
|
+
- **MapLibre GL pinned to v5.16.0** - Pinned exact version to avoid `__publicField` runtime error with newer releases that use ES2022 class fields
|
|
20
|
+
- **Prettier formatting** - Fixed line length violation in config schema
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
- **Node.js support** - Extended compatibility to Node.js 24.x (>=20.0.0 <=24.x.x)
|
|
25
|
+
- **TypeScript** - Updated from ^5.0.0 to ^5.5.0
|
|
26
|
+
- **ESLint** - Updated from ^8.0.0 to ^8.57.0
|
|
27
|
+
- **PMTiles** - Updated from v4.3.2 to v4.4.0
|
|
28
|
+
|
|
29
|
+
### Known issue: `__publicField is not defined` in Strapi dev mode
|
|
30
|
+
|
|
31
|
+
`maplibre-gl` v5 uses ES2022 class field declarations internally (e.g., in the MLT codec). Strapi's Vite dev server does not set `optimizeDeps.esbuildOptions.target` to match its modern `build.target`, so esbuild may transpile these fields into `__publicField()` helper calls that fail at runtime. For this reason `maplibre-gl` is pinned to `5.16.0`.
|
|
32
|
+
|
|
33
|
+
This is an upstream issue at the intersection of Strapi, Vite 5, and maplibre-gl v5. It may be resolved by a future release of any of these projects.
|
|
34
|
+
|
|
35
|
+
**Workaround:** create `src/admin/vite.config.ts` in the Strapi host app:
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
import { mergeConfig, type UserConfig } from 'vite';
|
|
39
|
+
|
|
40
|
+
export default (config: UserConfig) => {
|
|
41
|
+
return mergeConfig(config, {
|
|
42
|
+
optimizeDeps: {
|
|
43
|
+
esbuildOptions: {
|
|
44
|
+
target: 'es2022',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
```
|
|
50
|
+
|
|
8
51
|
## [1.2.0] - 2026-01-29
|
|
9
52
|
|
|
10
53
|
### Added
|
|
@@ -3,8 +3,8 @@ import * as React from "react";
|
|
|
3
3
|
import { useState, useRef, useEffect } from "react";
|
|
4
4
|
import { useFetchClient, useNotification } from "@strapi/strapi/admin";
|
|
5
5
|
import { Box, TextInput, Flex, Typography, Grid, Field } from "@strapi/design-system";
|
|
6
|
-
import { g as getTrad } from "./index-
|
|
7
|
-
import Map, { useControl, FullscreenControl, NavigationControl, GeolocateControl, Source, Layer, Marker } from "react-
|
|
6
|
+
import { g as getTrad } from "./index-CBxydRKp.mjs";
|
|
7
|
+
import Map, { useControl, FullscreenControl, NavigationControl, GeolocateControl, Source, Layer, Marker } from "@vis.gl/react-maplibre";
|
|
8
8
|
import { Protocol } from "pmtiles";
|
|
9
9
|
import maplibregl from "maplibre-gl";
|
|
10
10
|
import "maplibre-gl/dist/maplibre-gl.css";
|
|
@@ -4,8 +4,8 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
|
4
4
|
const React = require("react");
|
|
5
5
|
const admin = require("@strapi/strapi/admin");
|
|
6
6
|
const designSystem = require("@strapi/design-system");
|
|
7
|
-
const index = require("./index-
|
|
8
|
-
const Map = require("react-
|
|
7
|
+
const index = require("./index-CDY4Awnh.js");
|
|
8
|
+
const Map = require("@vis.gl/react-maplibre");
|
|
9
9
|
const pmtiles = require("pmtiles");
|
|
10
10
|
const maplibregl = require("maplibre-gl");
|
|
11
11
|
require("maplibre-gl/dist/maplibre-gl.css");
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const label = "Karte";
|
|
4
|
+
const description = "Eine Kartenkomponente, basierend auf MapLibre";
|
|
5
|
+
const search = "Suchen Sie nach einem Ort oder einer Adresse";
|
|
6
|
+
const de = {
|
|
7
|
+
label,
|
|
8
|
+
description,
|
|
9
|
+
search,
|
|
10
|
+
"search.placeholder": "Suchen Sie nach einem Ort...",
|
|
11
|
+
"search.button": "Suchen",
|
|
12
|
+
"fields.address": "Adresse",
|
|
13
|
+
"fields.longitude": "Längengrad",
|
|
14
|
+
"fields.latitude": "Breitengrad",
|
|
15
|
+
"fields.poi-name": "POI-Name",
|
|
16
|
+
"fields.poi-address": "Vollständige Adresse",
|
|
17
|
+
"coordinates-saved": "Koordinaten gespeichert",
|
|
18
|
+
"geocoding.success": "Adresse erfolgreich aktualisiert",
|
|
19
|
+
"geocoding.error": "Fehler beim Abrufen der Adresse. Bitte versuchen Sie es erneut.",
|
|
20
|
+
"geocoding.no-results": "Keine Adresse für diesen Standort gefunden",
|
|
21
|
+
"i18n.localized.label": "Lokalisierung für dieses Feld aktivieren",
|
|
22
|
+
"i18n.localized.description": "Das Feld kann in jeder Sprache unterschiedliche Werte haben"
|
|
23
|
+
};
|
|
24
|
+
exports.default = de;
|
|
25
|
+
exports.description = description;
|
|
26
|
+
exports.label = label;
|
|
27
|
+
exports.search = search;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const label = "Karte";
|
|
2
|
+
const description = "Eine Kartenkomponente, basierend auf MapLibre";
|
|
3
|
+
const search = "Suchen Sie nach einem Ort oder einer Adresse";
|
|
4
|
+
const de = {
|
|
5
|
+
label,
|
|
6
|
+
description,
|
|
7
|
+
search,
|
|
8
|
+
"search.placeholder": "Suchen Sie nach einem Ort...",
|
|
9
|
+
"search.button": "Suchen",
|
|
10
|
+
"fields.address": "Adresse",
|
|
11
|
+
"fields.longitude": "Längengrad",
|
|
12
|
+
"fields.latitude": "Breitengrad",
|
|
13
|
+
"fields.poi-name": "POI-Name",
|
|
14
|
+
"fields.poi-address": "Vollständige Adresse",
|
|
15
|
+
"coordinates-saved": "Koordinaten gespeichert",
|
|
16
|
+
"geocoding.success": "Adresse erfolgreich aktualisiert",
|
|
17
|
+
"geocoding.error": "Fehler beim Abrufen der Adresse. Bitte versuchen Sie es erneut.",
|
|
18
|
+
"geocoding.no-results": "Keine Adresse für diesen Standort gefunden",
|
|
19
|
+
"i18n.localized.label": "Lokalisierung für dieses Feld aktivieren",
|
|
20
|
+
"i18n.localized.description": "Das Feld kann in jeder Sprache unterschiedliche Werte haben"
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
de as default,
|
|
24
|
+
description,
|
|
25
|
+
label,
|
|
26
|
+
search
|
|
27
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const label = "Map";
|
|
2
|
+
const description = "A map custom field using MapLibre";
|
|
3
|
+
const search = "Search for a place or address on OpenStreetMap";
|
|
4
|
+
const en = {
|
|
5
|
+
label,
|
|
6
|
+
description,
|
|
7
|
+
search,
|
|
8
|
+
"search.placeholder": "Search for a location...",
|
|
9
|
+
"search.button": "Search",
|
|
10
|
+
"fields.address": "Address",
|
|
11
|
+
"fields.longitude": "Longitude",
|
|
12
|
+
"fields.latitude": "Latitude",
|
|
13
|
+
"fields.poi-name": "POI Name",
|
|
14
|
+
"fields.poi-address": "Full Address",
|
|
15
|
+
"coordinates-saved": "Coordinates set",
|
|
16
|
+
"geocoding.success": "Address updated successfully",
|
|
17
|
+
"geocoding.error": "Failed to fetch address. Please try again.",
|
|
18
|
+
"geocoding.no-results": "No address found for this location",
|
|
19
|
+
"i18n.localized.label": "Enable localization for this field",
|
|
20
|
+
"i18n.localized.description": "The field can have different values in each language"
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
en as default,
|
|
24
|
+
description,
|
|
25
|
+
label,
|
|
26
|
+
search
|
|
27
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const label = "Map";
|
|
4
|
+
const description = "A map custom field using MapLibre";
|
|
5
|
+
const search = "Search for a place or address on OpenStreetMap";
|
|
6
|
+
const en = {
|
|
7
|
+
label,
|
|
8
|
+
description,
|
|
9
|
+
search,
|
|
10
|
+
"search.placeholder": "Search for a location...",
|
|
11
|
+
"search.button": "Search",
|
|
12
|
+
"fields.address": "Address",
|
|
13
|
+
"fields.longitude": "Longitude",
|
|
14
|
+
"fields.latitude": "Latitude",
|
|
15
|
+
"fields.poi-name": "POI Name",
|
|
16
|
+
"fields.poi-address": "Full Address",
|
|
17
|
+
"coordinates-saved": "Coordinates set",
|
|
18
|
+
"geocoding.success": "Address updated successfully",
|
|
19
|
+
"geocoding.error": "Failed to fetch address. Please try again.",
|
|
20
|
+
"geocoding.no-results": "No address found for this location",
|
|
21
|
+
"i18n.localized.label": "Enable localization for this field",
|
|
22
|
+
"i18n.localized.description": "The field can have different values in each language"
|
|
23
|
+
};
|
|
24
|
+
exports.default = en;
|
|
25
|
+
exports.description = description;
|
|
26
|
+
exports.label = label;
|
|
27
|
+
exports.search = search;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const label = "Mapa";
|
|
4
|
+
const description = "Un campo personalizado de mapa usando MapLibre";
|
|
5
|
+
const search = "Buscar un lugar o dirección en OpenStreetMap";
|
|
6
|
+
const es = {
|
|
7
|
+
label,
|
|
8
|
+
description,
|
|
9
|
+
search,
|
|
10
|
+
"fields.address": "Dirección",
|
|
11
|
+
"fields.longitude": "Longitud",
|
|
12
|
+
"fields.latitude": "Latitud",
|
|
13
|
+
"fields.poi-name": "Nombre del POI",
|
|
14
|
+
"fields.poi-address": "Dirección completa",
|
|
15
|
+
"coordinates-saved": "Coordenadas guardadas",
|
|
16
|
+
"geocoding.success": "Dirección actualizada con éxito",
|
|
17
|
+
"geocoding.error": "Error al obtener la dirección. Por favor, inténtelo de nuevo.",
|
|
18
|
+
"geocoding.no-results": "No se encontró dirección para esta ubicación",
|
|
19
|
+
"i18n.localized.label": "Activar localización para este campo",
|
|
20
|
+
"i18n.localized.description": "El campo puede tener valores diferentes en cada idioma"
|
|
21
|
+
};
|
|
22
|
+
exports.default = es;
|
|
23
|
+
exports.description = description;
|
|
24
|
+
exports.label = label;
|
|
25
|
+
exports.search = search;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const label = "Mapa";
|
|
2
|
+
const description = "Un campo personalizado de mapa usando MapLibre";
|
|
3
|
+
const search = "Buscar un lugar o dirección en OpenStreetMap";
|
|
4
|
+
const es = {
|
|
5
|
+
label,
|
|
6
|
+
description,
|
|
7
|
+
search,
|
|
8
|
+
"fields.address": "Dirección",
|
|
9
|
+
"fields.longitude": "Longitud",
|
|
10
|
+
"fields.latitude": "Latitud",
|
|
11
|
+
"fields.poi-name": "Nombre del POI",
|
|
12
|
+
"fields.poi-address": "Dirección completa",
|
|
13
|
+
"coordinates-saved": "Coordenadas guardadas",
|
|
14
|
+
"geocoding.success": "Dirección actualizada con éxito",
|
|
15
|
+
"geocoding.error": "Error al obtener la dirección. Por favor, inténtelo de nuevo.",
|
|
16
|
+
"geocoding.no-results": "No se encontró dirección para esta ubicación",
|
|
17
|
+
"i18n.localized.label": "Activar localización para este campo",
|
|
18
|
+
"i18n.localized.description": "El campo puede tener valores diferentes en cada idioma"
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
es as default,
|
|
22
|
+
description,
|
|
23
|
+
label,
|
|
24
|
+
search
|
|
25
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const label = "Carte";
|
|
2
|
+
const description = "Un champ carte utilisant MapLibre";
|
|
3
|
+
const search = "Recherche d'un lieu ou d'une adresse";
|
|
4
|
+
const fr = {
|
|
5
|
+
label,
|
|
6
|
+
description,
|
|
7
|
+
search,
|
|
8
|
+
"search.placeholder": "Rechercher un lieu...",
|
|
9
|
+
"search.button": "Rechercher",
|
|
10
|
+
"fields.address": "Adresse",
|
|
11
|
+
"fields.longitude": "Longitude",
|
|
12
|
+
"fields.latitude": "Latitude",
|
|
13
|
+
"fields.poi-name": "Nom du POI",
|
|
14
|
+
"fields.poi-address": "Adresse complète",
|
|
15
|
+
"coordinates-saved": "Coordonnées enregistrées",
|
|
16
|
+
"geocoding.success": "Adresse mise à jour avec succès",
|
|
17
|
+
"geocoding.error": "Impossible de récupérer l'adresse. Veuillez réessayer.",
|
|
18
|
+
"geocoding.no-results": "Aucune adresse trouvée pour cet emplacement",
|
|
19
|
+
"i18n.localized.label": "Activer la localisation pour ce champ",
|
|
20
|
+
"i18n.localized.description": "Le champ peut avoir des valeurs différentes dans chaque langue"
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
fr as default,
|
|
24
|
+
description,
|
|
25
|
+
label,
|
|
26
|
+
search
|
|
27
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const label = "Carte";
|
|
4
|
+
const description = "Un champ carte utilisant MapLibre";
|
|
5
|
+
const search = "Recherche d'un lieu ou d'une adresse";
|
|
6
|
+
const fr = {
|
|
7
|
+
label,
|
|
8
|
+
description,
|
|
9
|
+
search,
|
|
10
|
+
"search.placeholder": "Rechercher un lieu...",
|
|
11
|
+
"search.button": "Rechercher",
|
|
12
|
+
"fields.address": "Adresse",
|
|
13
|
+
"fields.longitude": "Longitude",
|
|
14
|
+
"fields.latitude": "Latitude",
|
|
15
|
+
"fields.poi-name": "Nom du POI",
|
|
16
|
+
"fields.poi-address": "Adresse complète",
|
|
17
|
+
"coordinates-saved": "Coordonnées enregistrées",
|
|
18
|
+
"geocoding.success": "Adresse mise à jour avec succès",
|
|
19
|
+
"geocoding.error": "Impossible de récupérer l'adresse. Veuillez réessayer.",
|
|
20
|
+
"geocoding.no-results": "Aucune adresse trouvée pour cet emplacement",
|
|
21
|
+
"i18n.localized.label": "Activer la localisation pour ce champ",
|
|
22
|
+
"i18n.localized.description": "Le champ peut avoir des valeurs différentes dans chaque langue"
|
|
23
|
+
};
|
|
24
|
+
exports.default = fr;
|
|
25
|
+
exports.description = description;
|
|
26
|
+
exports.label = label;
|
|
27
|
+
exports.search = search;
|