@conduction/nextcloud-vue 2.181.0 → 2.182.0
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/dist/esm/components/CnMapWidget/CnMapWidget.vue.js +1 -1
- package/dist/esm/components/CnMapWidget/CnMapWidget2.vue.js +7 -4
- package/dist/esm/components/CnMapWidget/CnMapWidget2.vue.js.map +1 -1
- package/dist/esm/components/CnMapWidget/CnMapWidget3.vue.js.map +1 -1
- package/dist/esm/components/CnMapWidget/basemapPresets.js +81 -0
- package/dist/esm/components/CnMapWidget/basemapPresets.js.map +1 -0
- package/dist/esm/components/CnMapWidgetForm/CnMapWidgetForm.vue.js +1 -1
- package/dist/esm/components/CnMapWidgetForm/CnMapWidgetForm2.vue.js +37 -12
- package/dist/esm/components/CnMapWidgetForm/CnMapWidgetForm2.vue.js.map +1 -1
- package/dist/esm/components/CnMapWidgetForm/CnMapWidgetForm3.vue.js +27 -9
- package/dist/esm/components/CnMapWidgetForm/CnMapWidgetForm3.vue.js.map +1 -1
- package/dist/esm/l10n/nl.json.js +5 -1
- package/dist/esm/l10n/nl.json.js.map +1 -1
- package/dist/esm/library-style.js +1 -1
- package/dist/esm/nextcloud-vue.css +23 -23
- package/dist/esm/utils/geo.js +49 -10
- package/dist/esm/utils/geo.js.map +1 -1
- package/dist/nextcloud-vue.cjs.js +203 -36
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +23 -23
- package/l10n/nl.json +5 -1
- package/package.json +2 -2
- package/src/components/CnMapWidget/CnMapWidget.vue +7 -4
- package/src/components/CnMapWidget/basemapPresets.js +78 -0
- package/src/components/CnMapWidgetForm/CnMapWidgetForm.vue +53 -13
- package/src/utils/geo.js +48 -9
|
@@ -7535,7 +7535,11 @@ var translations$c = {
|
|
|
7535
7535
|
"An EAN-13 code takes twelve or thirteen digits with a valid check digit.": "Een EAN-13-code neemt twaalf of dertien cijfers met een geldig controlecijfer.",
|
|
7536
7536
|
"A Code 128 code takes letters, digits and plain punctuation only.": "Een Code 128-code neemt alleen letters, cijfers en gewone leestekens.",
|
|
7537
7537
|
"Started. It finishes in the background.": "Gestart. Het wordt op de achtergrond afgerond.",
|
|
7538
|
-
"At most {max} rows.": "Hoogstens {max} rijen."
|
|
7538
|
+
"At most {max} rows.": "Hoogstens {max} rijen.",
|
|
7539
|
+
"Location field": "Locatieveld",
|
|
7540
|
+
"Objects are plotted from the location field: a point, line or area. Without one, from their location (@self.geo). Objects without a location are skipped.": "Objecten worden getekend vanuit het locatieveld: een punt, lijn of vlak. Zonder locatieveld vanuit hun locatie (@self.geo). Objecten zonder locatie worden overgeslagen.",
|
|
7541
|
+
"Custom base map": "Eigen achtergrondkaart",
|
|
7542
|
+
"Base map": "Achtergrondkaart"
|
|
7539
7543
|
};
|
|
7540
7544
|
var plurals = {
|
|
7541
7545
|
"{count} member": [
|
|
@@ -42479,16 +42483,44 @@ function parseGeoPoint(geo) {
|
|
|
42479
42483
|
)
|
|
42480
42484
|
}
|
|
42481
42485
|
|
|
42486
|
+
const GEOMETRY_TYPES = ['Point', 'MultiPoint', 'LineString', 'MultiLineString', 'Polygon', 'MultiPolygon'];
|
|
42487
|
+
|
|
42488
|
+
/**
|
|
42489
|
+
* The GeoJSON geometry a property value holds: a geometry, or a Feature's
|
|
42490
|
+
* geometry. Returns null for anything else, so a point-shaped value falls
|
|
42491
|
+
* through to parseGeoPoint().
|
|
42492
|
+
*
|
|
42493
|
+
* @param {unknown} value The property value.
|
|
42494
|
+
* @return {?object} The geometry, or null.
|
|
42495
|
+
*/
|
|
42496
|
+
function parseGeoGeometry(value) {
|
|
42497
|
+
if (!value || typeof value !== 'object') {
|
|
42498
|
+
return null
|
|
42499
|
+
}
|
|
42500
|
+
const geometry = value.type === 'Feature' ? value.geometry : value;
|
|
42501
|
+
if (!geometry || !GEOMETRY_TYPES.includes(geometry.type) || !Array.isArray(geometry.coordinates)) {
|
|
42502
|
+
return null
|
|
42503
|
+
}
|
|
42504
|
+
if (geometry.type === 'Point') {
|
|
42505
|
+
const point = parseGeoPoint(geometry);
|
|
42506
|
+
return point ? { type: 'Point', coordinates: [point.lng, point.lat] } : null
|
|
42507
|
+
}
|
|
42508
|
+
return geometry.coordinates.length > 0 ? geometry : null
|
|
42509
|
+
}
|
|
42510
|
+
|
|
42482
42511
|
/**
|
|
42483
|
-
* Turn an OpenRegister object into a GeoJSON
|
|
42512
|
+
* Turn an OpenRegister object into a GeoJSON Feature, or null when it has no
|
|
42484
42513
|
* usable location.
|
|
42485
42514
|
*
|
|
42486
|
-
*
|
|
42487
|
-
*
|
|
42488
|
-
*
|
|
42515
|
+
* With `geoProperty` set, that property is read first: a GeoJSON geometry of any
|
|
42516
|
+
* type (point, line, polygon or a multi-geometry), a Feature, or a lat/lng value.
|
|
42517
|
+
* Otherwise, or when it is empty, `@self.geo` is read (where the geo widget writes
|
|
42518
|
+
* it), and then plain lat/lng fields on the object itself, so a schema that models
|
|
42519
|
+
* coordinates as its own properties still plots.
|
|
42489
42520
|
*
|
|
42490
42521
|
* @param {object} obj The OpenRegister object.
|
|
42491
42522
|
* @param {object} [options] Options.
|
|
42523
|
+
* @param {string} [options.geoProperty] Property holding the object's geometry.
|
|
42492
42524
|
* @param {string} [options.latField] Property holding latitude, for the fallback.
|
|
42493
42525
|
* @param {string} [options.lngField] Property holding longitude, for the fallback.
|
|
42494
42526
|
* @return {?object} A GeoJSON Feature whose `properties` is the object, or null.
|
|
@@ -42498,14 +42530,25 @@ function objectToGeoFeature(obj, options = {}) {
|
|
|
42498
42530
|
return null
|
|
42499
42531
|
}
|
|
42500
42532
|
|
|
42533
|
+
const { geoProperty, latField, lngField } = options;
|
|
42534
|
+
if (geoProperty) {
|
|
42535
|
+
const value = obj[geoProperty];
|
|
42536
|
+
const geometry = parseGeoGeometry(value);
|
|
42537
|
+
const point = geometry ? null : parseGeoPoint(value);
|
|
42538
|
+
if (geometry || point) {
|
|
42539
|
+
return {
|
|
42540
|
+
type: 'Feature',
|
|
42541
|
+
geometry: geometry || { type: 'Point', coordinates: [point.lng, point.lat] },
|
|
42542
|
+
properties: { ...obj },
|
|
42543
|
+
}
|
|
42544
|
+
}
|
|
42545
|
+
}
|
|
42546
|
+
|
|
42501
42547
|
const self = obj['@self'] || {};
|
|
42502
42548
|
let point = parseGeoPoint(self.geo);
|
|
42503
42549
|
|
|
42504
|
-
if (!point) {
|
|
42505
|
-
|
|
42506
|
-
if (latField && lngField) {
|
|
42507
|
-
point = finitePoint(obj[latField], obj[lngField]);
|
|
42508
|
-
}
|
|
42550
|
+
if (!point && latField && lngField) {
|
|
42551
|
+
point = finitePoint(obj[latField], obj[lngField]);
|
|
42509
42552
|
}
|
|
42510
42553
|
if (!point) {
|
|
42511
42554
|
return null
|
|
@@ -42960,12 +43003,13 @@ var script$8S = {
|
|
|
42960
43003
|
},
|
|
42961
43004
|
|
|
42962
43005
|
/**
|
|
42963
|
-
* Marker config. `{ features?, dataSource?, latField?, lngField?, xField?, yField?,
|
|
43006
|
+
* Marker config. `{ features?, dataSource?, geoProperty?, latField?, lngField?, xField?, yField?,
|
|
42964
43007
|
* popupField?, clustering?, iconColor?, iconUrl?, centerMarker? }`. On an image map
|
|
42965
43008
|
* (a layer of type `image`) markers read `xField` / `yField` (default `x` / `y`,
|
|
42966
43009
|
* pixels from the picture's top left) instead of `latField` / `lngField`. `features[]` is inline;
|
|
42967
43010
|
* `dataSource.url` is HTTP-fetched on mount; `dataSource.{register, schema}`
|
|
42968
|
-
* plots the objects of an OpenRegister register/schema via
|
|
43011
|
+
* plots the objects of an OpenRegister register/schema via `geoProperty` (a property
|
|
43012
|
+
* holding a GeoJSON geometry of any type, or a point) when set, else `@self.geo`.
|
|
42969
43013
|
* `centerMarker: true` adds an extra pin at the map's `center`, alongside any
|
|
42970
43014
|
* source markers.
|
|
42971
43015
|
*
|
|
@@ -44440,11 +44484,13 @@ var script$8S = {
|
|
|
44440
44484
|
|
|
44441
44485
|
const latField = this.cfg.markers && this.cfg.markers.latField;
|
|
44442
44486
|
const lngField = this.cfg.markers && this.cfg.markers.lngField;
|
|
44487
|
+
const geoProperty = this.cfg.markers && this.cfg.markers.geoProperty;
|
|
44443
44488
|
|
|
44444
44489
|
// (0, 0) is where an unset pair of numbers lands, not a place.
|
|
44445
44490
|
return rows
|
|
44446
|
-
.map((row) => objectToGeoFeature(row, { latField, lngField }))
|
|
44447
|
-
.filter((feature) => feature && !(feature.geometry.
|
|
44491
|
+
.map((row) => objectToGeoFeature(row, { geoProperty, latField, lngField }))
|
|
44492
|
+
.filter((feature) => feature && !(feature.geometry.type === 'Point'
|
|
44493
|
+
&& feature.geometry.coordinates[0] === 0 && feature.geometry.coordinates[1] === 0))
|
|
44448
44494
|
} catch (err) {
|
|
44449
44495
|
this.markersFailed = true;
|
|
44450
44496
|
// eslint-disable-next-line no-console
|
|
@@ -44579,23 +44625,95 @@ function render$8Q(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
44579
44625
|
}
|
|
44580
44626
|
|
|
44581
44627
|
script$8S.render = render$8Q;
|
|
44582
|
-
script$8S.__scopeId = "data-v-
|
|
44628
|
+
script$8S.__scopeId = "data-v-356bff56";
|
|
44583
44629
|
const __sfc_main$8M = script$8S;
|
|
44584
44630
|
|
|
44631
|
+
/**
|
|
44632
|
+
* SPDX-FileCopyrightText: 2026 Conduction B.V. <info@conduction.nl>
|
|
44633
|
+
* SPDX-License-Identifier: EUPL-1.2
|
|
44634
|
+
*
|
|
44635
|
+
* The base maps the map widget form offers. Each entry has the same shape as a
|
|
44636
|
+
* `basemaps[]` item of CnMapWidget (`name`, `url`, `attribution`, `options`), so
|
|
44637
|
+
* a chosen preset is stored as an ordinary base map and renders on any version.
|
|
44638
|
+
*
|
|
44639
|
+
* The PDOK tiles are the Dutch government's open base maps, served in
|
|
44640
|
+
* EPSG:3857 so Leaflet's default projection draws them. A consuming app must
|
|
44641
|
+
* allow `service.pdok.nl` in its Content-Security-Policy `img-src`.
|
|
44642
|
+
*/
|
|
44643
|
+
|
|
44644
|
+
const PDOK_ATTRIBUTION = 'Kaartgegevens © <a href="https://www.kadaster.nl">Kadaster</a>';
|
|
44645
|
+
|
|
44646
|
+
const BASEMAP_PRESETS = Object.freeze([
|
|
44647
|
+
Object.freeze({
|
|
44648
|
+
id: 'osm',
|
|
44649
|
+
name: 'OpenStreetMap',
|
|
44650
|
+
url: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
|
44651
|
+
attribution: '© OpenStreetMap contributors',
|
|
44652
|
+
options: Object.freeze({ maxZoom: 19 }),
|
|
44653
|
+
}),
|
|
44654
|
+
Object.freeze({
|
|
44655
|
+
id: 'pdok-brt',
|
|
44656
|
+
name: 'PDOK BRT achtergrondkaart',
|
|
44657
|
+
url: 'https://service.pdok.nl/brt/achtergrondkaart/wmts/v2_0/standaard/EPSG:3857/{z}/{x}/{y}.png',
|
|
44658
|
+
attribution: PDOK_ATTRIBUTION,
|
|
44659
|
+
options: Object.freeze({ maxZoom: 19 }),
|
|
44660
|
+
}),
|
|
44661
|
+
Object.freeze({
|
|
44662
|
+
id: 'pdok-brt-grijs',
|
|
44663
|
+
name: 'PDOK BRT achtergrondkaart grijs',
|
|
44664
|
+
url: 'https://service.pdok.nl/brt/achtergrondkaart/wmts/v2_0/grijs/EPSG:3857/{z}/{x}/{y}.png',
|
|
44665
|
+
attribution: PDOK_ATTRIBUTION,
|
|
44666
|
+
options: Object.freeze({ maxZoom: 19 }),
|
|
44667
|
+
}),
|
|
44668
|
+
Object.freeze({
|
|
44669
|
+
id: 'pdok-brt-pastel',
|
|
44670
|
+
name: 'PDOK BRT achtergrondkaart pastel',
|
|
44671
|
+
url: 'https://service.pdok.nl/brt/achtergrondkaart/wmts/v2_0/pastel/EPSG:3857/{z}/{x}/{y}.png',
|
|
44672
|
+
attribution: PDOK_ATTRIBUTION,
|
|
44673
|
+
options: Object.freeze({ maxZoom: 19 }),
|
|
44674
|
+
}),
|
|
44675
|
+
Object.freeze({
|
|
44676
|
+
id: 'pdok-luchtfoto',
|
|
44677
|
+
name: 'PDOK luchtfoto',
|
|
44678
|
+
url: 'https://service.pdok.nl/hwh/luchtfotorgb/wmts/v1_0/Actueel_orthoHR/EPSG:3857/{z}/{x}/{y}.jpeg',
|
|
44679
|
+
attribution: PDOK_ATTRIBUTION,
|
|
44680
|
+
options: Object.freeze({ maxZoom: 19 }),
|
|
44681
|
+
}),
|
|
44682
|
+
]);
|
|
44683
|
+
|
|
44684
|
+
/**
|
|
44685
|
+
* The stored base map for a preset id, as a plain `basemaps[]` item.
|
|
44686
|
+
*
|
|
44687
|
+
* @param {string} id The preset id.
|
|
44688
|
+
* @return {{name: string, url: string, attribution: string, options: object}|null} The base map, or null.
|
|
44689
|
+
*/
|
|
44690
|
+
function basemapFromPreset(id) {
|
|
44691
|
+
const preset = BASEMAP_PRESETS.find((entry) => entry.id === id);
|
|
44692
|
+
if (!preset) {
|
|
44693
|
+
return null
|
|
44694
|
+
}
|
|
44695
|
+
return { name: preset.name, url: preset.url, attribution: preset.attribution, options: { ...preset.options } }
|
|
44696
|
+
}
|
|
44697
|
+
|
|
44698
|
+
/**
|
|
44699
|
+
* The preset a stored base map came from, matched on its tile URL.
|
|
44700
|
+
*
|
|
44701
|
+
* @param {object|undefined} basemap A `basemaps[]` item.
|
|
44702
|
+
* @return {string|null} The preset id, or null for a custom base map.
|
|
44703
|
+
*/
|
|
44704
|
+
function presetOf(basemap) {
|
|
44705
|
+
const url = basemap && basemap.url;
|
|
44706
|
+
const preset = BASEMAP_PRESETS.find((entry) => entry.url === url);
|
|
44707
|
+
return preset ? preset.id : null
|
|
44708
|
+
}
|
|
44709
|
+
|
|
44585
44710
|
// The Netherlands, roughly — a sane default centre for a Dutch-government library.
|
|
44586
44711
|
// autoFit is on by default, so this only shows before any object is plotted.
|
|
44587
44712
|
const DEFAULT_CENTRE = [52.13, 5.29];
|
|
44588
44713
|
|
|
44589
44714
|
// Without a basemap the widget renders a grey box: CnMapWidget's `basemaps` prop is
|
|
44590
44715
|
// opt-in and empty by default. The Nextcloud CSP already allows *.tile.openstreetmap.org.
|
|
44591
|
-
const DEFAULT_BASEMAPS = [
|
|
44592
|
-
{
|
|
44593
|
-
name: 'OpenStreetMap',
|
|
44594
|
-
url: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
|
44595
|
-
attribution: '© OpenStreetMap contributors',
|
|
44596
|
-
options: { maxZoom: 19 },
|
|
44597
|
-
},
|
|
44598
|
-
];
|
|
44716
|
+
const DEFAULT_BASEMAPS = [basemapFromPreset('osm')];
|
|
44599
44717
|
|
|
44600
44718
|
const DEFAULT_CONTENT$t = {
|
|
44601
44719
|
register: '',
|
|
@@ -44621,7 +44739,7 @@ const DEFAULT_CONTENT$t = {
|
|
|
44621
44739
|
var script$8R = {
|
|
44622
44740
|
name: 'CnMapWidgetForm',
|
|
44623
44741
|
|
|
44624
|
-
components: { NcTextField: vue.NcTextField, NcCheckboxRadioSwitch: vue.NcCheckboxRadioSwitch, CnRegisterSchemaSelect: __sfc_main$92, CnFieldPicker: __sfc_main$94 },
|
|
44742
|
+
components: { NcTextField: vue.NcTextField, NcCheckboxRadioSwitch: vue.NcCheckboxRadioSwitch, NcSelect: vue.NcSelect, CnRegisterSchemaSelect: __sfc_main$92, CnFieldPicker: __sfc_main$94 },
|
|
44625
44743
|
|
|
44626
44744
|
props: {
|
|
44627
44745
|
/**
|
|
@@ -44671,11 +44789,12 @@ var script$8R = {
|
|
|
44671
44789
|
zoom: Number.isFinite(initial.zoom) ? initial.zoom : 7,
|
|
44672
44790
|
height: initial.height || '400px',
|
|
44673
44791
|
popupField: initial.popupField ?? '',
|
|
44792
|
+
geoProperty: initial.markers?.geoProperty ?? '',
|
|
44674
44793
|
clustering: initial.clustering === true,
|
|
44675
44794
|
autoFit: initial.autoFit !== false,
|
|
44676
44795
|
centerMarker: initial.markers?.centerMarker === true,
|
|
44677
|
-
// Preserved verbatim
|
|
44678
|
-
//
|
|
44796
|
+
// Preserved verbatim unless a preset is chosen: dropping it on save would
|
|
44797
|
+
// turn the user's map into a grey box, and a custom base map has no preset.
|
|
44679
44798
|
basemaps: Array.isArray(initial.basemaps) && initial.basemaps.length
|
|
44680
44799
|
? initial.basemaps
|
|
44681
44800
|
: DEFAULT_BASEMAPS,
|
|
@@ -44683,6 +44802,21 @@ var script$8R = {
|
|
|
44683
44802
|
},
|
|
44684
44803
|
|
|
44685
44804
|
computed: {
|
|
44805
|
+
/** The base map choices: the presets, plus the stored one when it is custom. */
|
|
44806
|
+
basemapOptions() {
|
|
44807
|
+
const presets = BASEMAP_PRESETS.map((preset) => ({ id: preset.id, label: preset.name }));
|
|
44808
|
+
if (presetOf(this.basemaps[0]) === null) {
|
|
44809
|
+
return [{ id: 'custom', label: this.basemaps[0]?.name || l10n.translate('nextcloud-vue', 'Custom base map') }, ...presets]
|
|
44810
|
+
}
|
|
44811
|
+
return presets
|
|
44812
|
+
},
|
|
44813
|
+
|
|
44814
|
+
/** The option of the first stored base map. */
|
|
44815
|
+
basemapOption() {
|
|
44816
|
+
const id = presetOf(this.basemaps[0]) ?? 'custom';
|
|
44817
|
+
return this.basemapOptions.find((option) => option.id === id) ?? null
|
|
44818
|
+
},
|
|
44819
|
+
|
|
44686
44820
|
/** The assembled content blob from the current field values. */
|
|
44687
44821
|
assembledContent() {
|
|
44688
44822
|
return {
|
|
@@ -44700,6 +44834,7 @@ var script$8R = {
|
|
|
44700
44834
|
markers: {
|
|
44701
44835
|
dataSource: { register: this.source.register, schema: this.source.schema },
|
|
44702
44836
|
popupField: this.popupField,
|
|
44837
|
+
...(this.geoProperty ? { geoProperty: this.geoProperty } : {}),
|
|
44703
44838
|
clustering: this.clustering,
|
|
44704
44839
|
centerMarker: this.centerMarker,
|
|
44705
44840
|
},
|
|
@@ -44733,6 +44868,20 @@ var script$8R = {
|
|
|
44733
44868
|
if (key === 'register') {
|
|
44734
44869
|
this.source.schema = '';
|
|
44735
44870
|
this.popupField = '';
|
|
44871
|
+
this.geoProperty = '';
|
|
44872
|
+
}
|
|
44873
|
+
},
|
|
44874
|
+
|
|
44875
|
+
/**
|
|
44876
|
+
* Store the chosen preset as the base map. Choosing the custom entry keeps
|
|
44877
|
+
* the stored base maps as they are.
|
|
44878
|
+
*
|
|
44879
|
+
* @param {{id: string}|null} option The chosen option.
|
|
44880
|
+
*/
|
|
44881
|
+
onBasemap(option) {
|
|
44882
|
+
const basemap = option && basemapFromPreset(option.id);
|
|
44883
|
+
if (basemap) {
|
|
44884
|
+
this.basemaps = [basemap];
|
|
44736
44885
|
}
|
|
44737
44886
|
},
|
|
44738
44887
|
|
|
@@ -44779,7 +44928,7 @@ var script$8R = {
|
|
|
44779
44928
|
|
|
44780
44929
|
const _hoisted_1$8p = { class: "cn-map-widget-form" };
|
|
44781
44930
|
const _hoisted_2$85 = {
|
|
44782
|
-
key:
|
|
44931
|
+
key: 2,
|
|
44783
44932
|
class: "cn-map-widget-form__hint"
|
|
44784
44933
|
};
|
|
44785
44934
|
const _hoisted_3$7g = { class: "cn-map-widget-form__field" };
|
|
@@ -44790,6 +44939,7 @@ const _hoisted_6$5p = { class: "cn-map-widget-form__row" };
|
|
|
44790
44939
|
function render$8P(_ctx, _cache, $props, $setup, $data, $options) {
|
|
44791
44940
|
const _component_CnRegisterSchemaSelect = vue$1.resolveComponent("CnRegisterSchemaSelect");
|
|
44792
44941
|
const _component_CnFieldPicker = vue$1.resolveComponent("CnFieldPicker");
|
|
44942
|
+
const _component_NcSelect = vue$1.resolveComponent("NcSelect");
|
|
44793
44943
|
const _component_NcTextField = vue$1.resolveComponent("NcTextField");
|
|
44794
44944
|
const _component_NcCheckboxRadioSwitch = vue$1.resolveComponent("NcCheckboxRadioSwitch");
|
|
44795
44945
|
|
|
@@ -44811,8 +44961,25 @@ function render$8P(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
44811
44961
|
}, null, 8 /* PROPS */, ["value", "register", "schema", "label"]))
|
|
44812
44962
|
: vue$1.createCommentVNode("v-if", true),
|
|
44813
44963
|
($data.source.register && $data.source.schema)
|
|
44814
|
-
? (vue$1.openBlock(), vue$1.
|
|
44964
|
+
? (vue$1.openBlock(), vue$1.createBlock(_component_CnFieldPicker, {
|
|
44965
|
+
key: 1,
|
|
44966
|
+
value: $data.geoProperty,
|
|
44967
|
+
register: $data.source.register,
|
|
44968
|
+
schema: $data.source.schema,
|
|
44969
|
+
label: $options.t('nextcloud-vue', 'Location field'),
|
|
44970
|
+
onInput: _cache[3] || (_cache[3] = $event => ($data.geoProperty = $event))
|
|
44971
|
+
}, null, 8 /* PROPS */, ["value", "register", "schema", "label"]))
|
|
44972
|
+
: vue$1.createCommentVNode("v-if", true),
|
|
44973
|
+
($data.source.register && $data.source.schema)
|
|
44974
|
+
? (vue$1.openBlock(), vue$1.createElementBlock("p", _hoisted_2$85, vue$1.toDisplayString($options.t('nextcloud-vue', 'Objects are plotted from the location field: a point, line or area. Without one, from their location (@self.geo). Objects without a location are skipped.')), 1 /* TEXT */))
|
|
44815
44975
|
: vue$1.createCommentVNode("v-if", true),
|
|
44976
|
+
vue$1.createVNode(_component_NcSelect, {
|
|
44977
|
+
modelValue: $options.basemapOption,
|
|
44978
|
+
options: $options.basemapOptions,
|
|
44979
|
+
inputLabel: $options.t('nextcloud-vue', 'Base map'),
|
|
44980
|
+
clearable: false,
|
|
44981
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = $event => ($options.onBasemap($event)))
|
|
44982
|
+
}, null, 8 /* PROPS */, ["modelValue", "options", "inputLabel"]),
|
|
44816
44983
|
vue$1.createElementVNode("label", _hoisted_3$7g, [
|
|
44817
44984
|
vue$1.createElementVNode("span", _hoisted_4$6D, vue$1.toDisplayString($options.t('nextcloud-vue', 'Zoom')) + " (" + vue$1.toDisplayString($data.zoom) + ") ", 1 /* TEXT */),
|
|
44818
44985
|
vue$1.createElementVNode("input", {
|
|
@@ -44822,7 +44989,7 @@ function render$8P(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
44822
44989
|
step: "1",
|
|
44823
44990
|
value: $data.zoom,
|
|
44824
44991
|
class: "cn-map-widget-form__range",
|
|
44825
|
-
onInput: _cache[
|
|
44992
|
+
onInput: _cache[5] || (_cache[5] = $event => ($options.onZoom($event.target.value)))
|
|
44826
44993
|
}, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_5$5U)
|
|
44827
44994
|
]),
|
|
44828
44995
|
vue$1.createVNode(_component_NcTextField, {
|
|
@@ -44830,7 +44997,7 @@ function render$8P(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
44830
44997
|
label: $options.t('nextcloud-vue', 'Height'),
|
|
44831
44998
|
labelVisible: true,
|
|
44832
44999
|
placeholder: "400px",
|
|
44833
|
-
"onUpdate:modelValue": _cache[
|
|
45000
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = $event => ($data.height = $event))
|
|
44834
45001
|
}, null, 8 /* PROPS */, ["modelValue", "label"]),
|
|
44835
45002
|
vue$1.createElementVNode("div", _hoisted_6$5p, [
|
|
44836
45003
|
vue$1.createVNode(_component_NcTextField, {
|
|
@@ -44838,19 +45005,19 @@ function render$8P(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
44838
45005
|
type: "number",
|
|
44839
45006
|
label: $options.t('nextcloud-vue', 'Centre latitude'),
|
|
44840
45007
|
labelVisible: true,
|
|
44841
|
-
"onUpdate:modelValue": _cache[
|
|
45008
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = $event => ($options.onCentre(0, $event)))
|
|
44842
45009
|
}, null, 8 /* PROPS */, ["modelValue", "label"]),
|
|
44843
45010
|
vue$1.createVNode(_component_NcTextField, {
|
|
44844
45011
|
modelValue: String($data.center[1]),
|
|
44845
45012
|
type: "number",
|
|
44846
45013
|
label: $options.t('nextcloud-vue', 'Centre longitude'),
|
|
44847
45014
|
labelVisible: true,
|
|
44848
|
-
"onUpdate:modelValue": _cache[
|
|
45015
|
+
"onUpdate:modelValue": _cache[8] || (_cache[8] = $event => ($options.onCentre(1, $event)))
|
|
44849
45016
|
}, null, 8 /* PROPS */, ["modelValue", "label"])
|
|
44850
45017
|
]),
|
|
44851
45018
|
vue$1.createVNode(_component_NcCheckboxRadioSwitch, {
|
|
44852
45019
|
modelValue: $data.centerMarker,
|
|
44853
|
-
"onUpdate:modelValue": _cache[
|
|
45020
|
+
"onUpdate:modelValue": _cache[9] || (_cache[9] = $event => (($data.centerMarker) = $event)),
|
|
44854
45021
|
type: "switch"
|
|
44855
45022
|
}, {
|
|
44856
45023
|
default: vue$1.withCtx(() => [
|
|
@@ -44860,7 +45027,7 @@ function render$8P(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
44860
45027
|
}, 8 /* PROPS */, ["modelValue"]),
|
|
44861
45028
|
vue$1.createVNode(_component_NcCheckboxRadioSwitch, {
|
|
44862
45029
|
modelValue: $data.autoFit,
|
|
44863
|
-
"onUpdate:modelValue": _cache[
|
|
45030
|
+
"onUpdate:modelValue": _cache[10] || (_cache[10] = $event => (($data.autoFit) = $event)),
|
|
44864
45031
|
type: "switch"
|
|
44865
45032
|
}, {
|
|
44866
45033
|
default: vue$1.withCtx(() => [
|
|
@@ -44870,7 +45037,7 @@ function render$8P(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
44870
45037
|
}, 8 /* PROPS */, ["modelValue"]),
|
|
44871
45038
|
vue$1.createVNode(_component_NcCheckboxRadioSwitch, {
|
|
44872
45039
|
modelValue: $data.clustering,
|
|
44873
|
-
"onUpdate:modelValue": _cache[
|
|
45040
|
+
"onUpdate:modelValue": _cache[11] || (_cache[11] = $event => (($data.clustering) = $event)),
|
|
44874
45041
|
type: "switch"
|
|
44875
45042
|
}, {
|
|
44876
45043
|
default: vue$1.withCtx(() => [
|
|
@@ -44882,7 +45049,7 @@ function render$8P(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
44882
45049
|
}
|
|
44883
45050
|
|
|
44884
45051
|
script$8R.render = render$8P;
|
|
44885
|
-
script$8R.__scopeId = "data-v-
|
|
45052
|
+
script$8R.__scopeId = "data-v-5ee2234a";
|
|
44886
45053
|
const __sfc_main$8L = script$8R;
|
|
44887
45054
|
|
|
44888
45055
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[diffend] Oversized file quarantined before diffing.
|
|
2
2
|
name: package/dist/nextcloud-vue.cjs.js.map
|
|
3
|
-
size:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 53743152 bytes
|
|
4
|
+
sha256: 1d542dc533f09e1585e988401d043577fcd319f05237fa857a6ca90c1a2fb424
|
package/dist/nextcloud-vue.css
CHANGED
|
@@ -23945,12 +23945,12 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|
|
23945
23945
|
line-height: 30px;
|
|
23946
23946
|
}
|
|
23947
23947
|
|
|
23948
|
-
.cn-map-widget[data-v-
|
|
23948
|
+
.cn-map-widget[data-v-356bff56] {
|
|
23949
23949
|
position: relative;
|
|
23950
23950
|
width: 100%;
|
|
23951
23951
|
min-height: 200px;
|
|
23952
23952
|
}
|
|
23953
|
-
.cn-map-widget__leaflet[data-v-
|
|
23953
|
+
.cn-map-widget__leaflet[data-v-356bff56] {
|
|
23954
23954
|
width: 100%;
|
|
23955
23955
|
height: 100%;
|
|
23956
23956
|
/* Leaflet paints its container #ddd, which reads as a white flash before the
|
|
@@ -23959,16 +23959,16 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|
|
23959
23959
|
}
|
|
23960
23960
|
|
|
23961
23961
|
/* With a caption the map keeps its own height and the caption sits under it. */
|
|
23962
|
-
.cn-map-widget__leaflet--captioned[data-v-
|
|
23962
|
+
.cn-map-widget__leaflet--captioned[data-v-356bff56] {
|
|
23963
23963
|
min-height: 200px;
|
|
23964
23964
|
}
|
|
23965
|
-
.cn-map-widget__caption[data-v-
|
|
23965
|
+
.cn-map-widget__caption[data-v-356bff56] {
|
|
23966
23966
|
margin: 12px 0 0;
|
|
23967
23967
|
font-size: 15px;
|
|
23968
23968
|
line-height: 1.2;
|
|
23969
23969
|
color: var(--color-main-text);
|
|
23970
23970
|
}
|
|
23971
|
-
.cn-map-widget__toggles[data-v-
|
|
23971
|
+
.cn-map-widget__toggles[data-v-356bff56] {
|
|
23972
23972
|
display: flex;
|
|
23973
23973
|
flex-wrap: wrap;
|
|
23974
23974
|
gap: 6px 16px;
|
|
@@ -23977,31 +23977,31 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|
|
23977
23977
|
border: 0;
|
|
23978
23978
|
font-size: 14px;
|
|
23979
23979
|
}
|
|
23980
|
-
.cn-map-widget__toggles-title[data-v-
|
|
23980
|
+
.cn-map-widget__toggles-title[data-v-356bff56] {
|
|
23981
23981
|
width: 100%;
|
|
23982
23982
|
margin-bottom: 2px;
|
|
23983
23983
|
padding: 0;
|
|
23984
23984
|
font-weight: 600;
|
|
23985
23985
|
}
|
|
23986
|
-
.cn-map-widget__toggle[data-v-
|
|
23986
|
+
.cn-map-widget__toggle[data-v-356bff56] {
|
|
23987
23987
|
display: inline-flex;
|
|
23988
23988
|
align-items: center;
|
|
23989
23989
|
gap: 6px;
|
|
23990
23990
|
}
|
|
23991
|
-
.cn-map-widget__note[data-v-
|
|
23991
|
+
.cn-map-widget__note[data-v-356bff56] {
|
|
23992
23992
|
margin: 4px 0 0;
|
|
23993
23993
|
font-size: 13px;
|
|
23994
23994
|
color: var(--color-text-maxcontrast);
|
|
23995
23995
|
}
|
|
23996
23996
|
|
|
23997
23997
|
/* Why the map shows no markers: the card's own text size, on its inset. */
|
|
23998
|
-
.cn-map-widget__note--status[data-v-
|
|
23998
|
+
.cn-map-widget__note--status[data-v-356bff56] {
|
|
23999
23999
|
font-size: 14px;
|
|
24000
24000
|
}
|
|
24001
|
-
.cn-map-widget__note--error[data-v-
|
|
24001
|
+
.cn-map-widget__note--error[data-v-356bff56] {
|
|
24002
24002
|
color: var(--color-error-text, var(--color-error));
|
|
24003
24003
|
}
|
|
24004
|
-
.cn-map-widget__fallback[data-v-
|
|
24004
|
+
.cn-map-widget__fallback[data-v-356bff56] {
|
|
24005
24005
|
display: flex;
|
|
24006
24006
|
align-items: center;
|
|
24007
24007
|
justify-content: center;
|
|
@@ -24009,11 +24009,11 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|
|
24009
24009
|
min-height: 150px;
|
|
24010
24010
|
color: var(--color-text-maxcontrast);
|
|
24011
24011
|
}
|
|
24012
|
-
.cn-map-widget__error[data-v-
|
|
24012
|
+
.cn-map-widget__error[data-v-356bff56] {
|
|
24013
24013
|
font-size: 14px;
|
|
24014
24014
|
margin: 0;
|
|
24015
24015
|
}
|
|
24016
|
-
.cn-map-widget__legend[data-v-
|
|
24016
|
+
.cn-map-widget__legend[data-v-356bff56] {
|
|
24017
24017
|
position: absolute;
|
|
24018
24018
|
top: 12px;
|
|
24019
24019
|
right: 12px;
|
|
@@ -24026,7 +24026,7 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|
|
24026
24026
|
|
|
24027
24027
|
/* Fullscreen overlay. A CSS-fixed box rather than the Fullscreen API, so it needs
|
|
24028
24028
|
no permission prompt; the z-index clears the Nextcloud header. */
|
|
24029
|
-
.cn-map-widget--fullscreen[data-v-
|
|
24029
|
+
.cn-map-widget--fullscreen[data-v-356bff56] {
|
|
24030
24030
|
position: fixed;
|
|
24031
24031
|
top: 0;
|
|
24032
24032
|
left: 0;
|
|
@@ -24039,7 +24039,7 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|
|
24039
24039
|
Leaflet's default white-on-grey buttons.
|
|
24040
24040
|
::v-deep is required — Leaflet builds the control DOM via L.DomUtil.create, so
|
|
24041
24041
|
those nodes never receive this SFC's scoped data-v attribute. */
|
|
24042
|
-
.cn-map-widget[data-v-
|
|
24042
|
+
.cn-map-widget[data-v-356bff56] .cn-map-widget__control {
|
|
24043
24043
|
display: flex;
|
|
24044
24044
|
align-items: center;
|
|
24045
24045
|
justify-content: center;
|
|
@@ -24048,8 +24048,8 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|
|
24048
24048
|
color: var(--color-main-text);
|
|
24049
24049
|
background: var(--color-main-background);
|
|
24050
24050
|
}
|
|
24051
|
-
.cn-map-widget[data-v-
|
|
24052
|
-
.cn-map-widget[data-v-
|
|
24051
|
+
.cn-map-widget[data-v-356bff56] .cn-map-widget__control:hover,
|
|
24052
|
+
.cn-map-widget[data-v-356bff56] .cn-map-widget__control:focus-visible {
|
|
24053
24053
|
background: var(--color-background-hover);
|
|
24054
24054
|
}
|
|
24055
24055
|
|
|
@@ -24082,30 +24082,30 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|
|
24082
24082
|
}
|
|
24083
24083
|
|
|
24084
24084
|
|
|
24085
|
-
.cn-map-widget-form[data-v-
|
|
24085
|
+
.cn-map-widget-form[data-v-5ee2234a] {
|
|
24086
24086
|
display: flex;
|
|
24087
24087
|
flex-direction: column;
|
|
24088
24088
|
gap: 12px;
|
|
24089
24089
|
}
|
|
24090
|
-
.cn-map-widget-form__row[data-v-
|
|
24090
|
+
.cn-map-widget-form__row[data-v-5ee2234a] {
|
|
24091
24091
|
display: flex;
|
|
24092
24092
|
gap: 8px;
|
|
24093
24093
|
}
|
|
24094
|
-
.cn-map-widget-form__row[data-v-
|
|
24094
|
+
.cn-map-widget-form__row[data-v-5ee2234a] > * {
|
|
24095
24095
|
flex: 1;
|
|
24096
24096
|
min-width: 0;
|
|
24097
24097
|
}
|
|
24098
|
-
.cn-map-widget-form__hint[data-v-
|
|
24098
|
+
.cn-map-widget-form__hint[data-v-5ee2234a] {
|
|
24099
24099
|
color: var(--color-text-maxcontrast);
|
|
24100
24100
|
font-size: 90%;
|
|
24101
24101
|
margin: 0;
|
|
24102
24102
|
}
|
|
24103
|
-
.cn-map-widget-form__field[data-v-
|
|
24103
|
+
.cn-map-widget-form__field[data-v-5ee2234a] {
|
|
24104
24104
|
display: flex;
|
|
24105
24105
|
flex-direction: column;
|
|
24106
24106
|
gap: 4px;
|
|
24107
24107
|
}
|
|
24108
|
-
.cn-map-widget-form__range[data-v-
|
|
24108
|
+
.cn-map-widget-form__range[data-v-5ee2234a] {
|
|
24109
24109
|
width: 100%;
|
|
24110
24110
|
/* Native range inputs ship a default 2px margin on ALL sides. The left/right
|
|
24111
24111
|
2px pushes the width:100% track past the form and shows a phantom
|
package/l10n/nl.json
CHANGED
|
@@ -3072,7 +3072,11 @@
|
|
|
3072
3072
|
"An EAN-13 code takes twelve or thirteen digits with a valid check digit.": "Een EAN-13-code neemt twaalf of dertien cijfers met een geldig controlecijfer.",
|
|
3073
3073
|
"A Code 128 code takes letters, digits and plain punctuation only.": "Een Code 128-code neemt alleen letters, cijfers en gewone leestekens.",
|
|
3074
3074
|
"Started. It finishes in the background.": "Gestart. Het wordt op de achtergrond afgerond.",
|
|
3075
|
-
"At most {max} rows.": "Hoogstens {max} rijen."
|
|
3075
|
+
"At most {max} rows.": "Hoogstens {max} rijen.",
|
|
3076
|
+
"Location field": "Locatieveld",
|
|
3077
|
+
"Objects are plotted from the location field: a point, line or area. Without one, from their location (@self.geo). Objects without a location are skipped.": "Objecten worden getekend vanuit het locatieveld: een punt, lijn of vlak. Zonder locatieveld vanuit hun locatie (@self.geo). Objecten zonder locatie worden overgeslagen.",
|
|
3078
|
+
"Custom base map": "Eigen achtergrondkaart",
|
|
3079
|
+
"Base map": "Achtergrondkaart"
|
|
3076
3080
|
},
|
|
3077
3081
|
"plurals": {
|
|
3078
3082
|
"{count} member": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@conduction/nextcloud-vue",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.182.0",
|
|
4
4
|
"description": "Shared Vue component library for Conduction Nextcloud apps — complements @nextcloud/vue with higher-level components, OpenRegister integration, and NL Design System support",
|
|
5
5
|
"homepage": "https://github.com/ConductionNL/nextcloud-vue#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -243,7 +243,7 @@
|
|
|
243
243
|
"gridstack": "^12.0.0 || ^13.0.0",
|
|
244
244
|
"marked": ">=12 <19",
|
|
245
245
|
"pinia": "^2.0.0 || ^3.0.0 || ^4.0.0",
|
|
246
|
-
"stylelint": "^17.9.1",
|
|
246
|
+
"stylelint": "^17.9.1 || ^18",
|
|
247
247
|
"vue": "^3.5.0",
|
|
248
248
|
"vue-eslint-parser": "^9.4.0 || ^10.0.0",
|
|
249
249
|
"vue-material-design-icons": "^5.0.0"
|
|
@@ -313,12 +313,13 @@ export default {
|
|
|
313
313
|
},
|
|
314
314
|
|
|
315
315
|
/**
|
|
316
|
-
* Marker config. `{ features?, dataSource?, latField?, lngField?, xField?, yField?,
|
|
316
|
+
* Marker config. `{ features?, dataSource?, geoProperty?, latField?, lngField?, xField?, yField?,
|
|
317
317
|
* popupField?, clustering?, iconColor?, iconUrl?, centerMarker? }`. On an image map
|
|
318
318
|
* (a layer of type `image`) markers read `xField` / `yField` (default `x` / `y`,
|
|
319
319
|
* pixels from the picture's top left) instead of `latField` / `lngField`. `features[]` is inline;
|
|
320
320
|
* `dataSource.url` is HTTP-fetched on mount; `dataSource.{register, schema}`
|
|
321
|
-
* plots the objects of an OpenRegister register/schema via
|
|
321
|
+
* plots the objects of an OpenRegister register/schema via `geoProperty` (a property
|
|
322
|
+
* holding a GeoJSON geometry of any type, or a point) when set, else `@self.geo`.
|
|
322
323
|
* `centerMarker: true` adds an extra pin at the map's `center`, alongside any
|
|
323
324
|
* source markers.
|
|
324
325
|
*
|
|
@@ -1793,11 +1794,13 @@ export default {
|
|
|
1793
1794
|
|
|
1794
1795
|
const latField = this.cfg.markers && this.cfg.markers.latField
|
|
1795
1796
|
const lngField = this.cfg.markers && this.cfg.markers.lngField
|
|
1797
|
+
const geoProperty = this.cfg.markers && this.cfg.markers.geoProperty
|
|
1796
1798
|
|
|
1797
1799
|
// (0, 0) is where an unset pair of numbers lands, not a place.
|
|
1798
1800
|
return rows
|
|
1799
|
-
.map((row) => objectToGeoFeature(row, { latField, lngField }))
|
|
1800
|
-
.filter((feature) => feature && !(feature.geometry.
|
|
1801
|
+
.map((row) => objectToGeoFeature(row, { geoProperty, latField, lngField }))
|
|
1802
|
+
.filter((feature) => feature && !(feature.geometry.type === 'Point'
|
|
1803
|
+
&& feature.geometry.coordinates[0] === 0 && feature.geometry.coordinates[1] === 0))
|
|
1801
1804
|
} catch (err) {
|
|
1802
1805
|
this.markersFailed = true
|
|
1803
1806
|
// eslint-disable-next-line no-console
|