@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.
@@ -1 +1 @@
1
- {"version":3,"file":"CnMapWidgetForm2.vue.js","sources":["../../../../src/components/CnMapWidgetForm/CnMapWidgetForm.vue"],"sourcesContent":["<!--\n CnMapWidgetForm — configuration form for the `map` dashboard widget.\n\n Picks an OpenRegister register/schema and plots its objects on a Leaflet map,\n reading each object's location from `@self.geo` (what CnObjectGeoWidget writes).\n Everything else — centre, zoom, height, popup field, clustering — is presentation.\n\n Used by both `CnAddWidgetModal` and the cog `CnWidgetStyleEditorModal`.\n-->\n<template>\n\t<div class=\"cn-map-widget-form\">\n\t\t<CnRegisterSchemaSelect\n\t\t\t:register=\"source.register\"\n\t\t\t:schema=\"source.schema\"\n\t\t\t@update:register=\"updateSource('register', $event)\"\n\t\t\t@update:schema=\"updateSource('schema', $event)\" />\n\n\t\t<CnFieldPicker\n\t\t\tv-if=\"source.register && source.schema\"\n\t\t\t:value=\"popupField\"\n\t\t\t:register=\"source.register\"\n\t\t\t:schema=\"source.schema\"\n\t\t\t:label=\"t('nextcloud-vue', 'Popup field')\"\n\t\t\t@input=\"popupField = $event\" />\n\n\t\t<p v-if=\"source.register && source.schema\" class=\"cn-map-widget-form__hint\">\n\t\t\t{{ t('nextcloud-vue', 'Objects are plotted from their location (@self.geo). Objects without one are skipped.') }}\n\t\t</p>\n\n\t\t<label class=\"cn-map-widget-form__field\">\n\t\t\t<span class=\"cn-map-widget-form__label\">\n\t\t\t\t{{ t('nextcloud-vue', 'Zoom') }} ({{ zoom }})\n\t\t\t</span>\n\t\t\t<input\n\t\t\t\ttype=\"range\"\n\t\t\t\tmin=\"1\"\n\t\t\t\tmax=\"19\"\n\t\t\t\tstep=\"1\"\n\t\t\t\t:value=\"zoom\"\n\t\t\t\tclass=\"cn-map-widget-form__range\"\n\t\t\t\t@input=\"onZoom($event.target.value)\">\n\t\t</label>\n\n\t\t<NcTextField\n\t\t\t:modelValue=\"height\"\n\t\t\t:label=\"t('nextcloud-vue', 'Height')\"\n\t\t\t:labelVisible=\"true\"\n\t\t\tplaceholder=\"400px\"\n\t\t\t@update:modelValue=\"height = $event\" />\n\n\t\t<div class=\"cn-map-widget-form__row\">\n\t\t\t<NcTextField\n\t\t\t\t:modelValue=\"String(center[0])\"\n\t\t\t\ttype=\"number\"\n\t\t\t\t:label=\"t('nextcloud-vue', 'Centre latitude')\"\n\t\t\t\t:labelVisible=\"true\"\n\t\t\t\t@update:modelValue=\"onCentre(0, $event)\" />\n\n\t\t\t<NcTextField\n\t\t\t\t:modelValue=\"String(center[1])\"\n\t\t\t\ttype=\"number\"\n\t\t\t\t:label=\"t('nextcloud-vue', 'Centre longitude')\"\n\t\t\t\t:labelVisible=\"true\"\n\t\t\t\t@update:modelValue=\"onCentre(1, $event)\" />\n\t\t</div>\n\n\t\t<NcCheckboxRadioSwitch v-model=\"centerMarker\" type=\"switch\">\n\t\t\t{{ t('nextcloud-vue', 'Show a marker at the centre') }}\n\t\t</NcCheckboxRadioSwitch>\n\n\t\t<NcCheckboxRadioSwitch v-model=\"autoFit\" type=\"switch\">\n\t\t\t{{ t('nextcloud-vue', 'Zoom to fit the plotted objects') }}\n\t\t</NcCheckboxRadioSwitch>\n\n\t\t<NcCheckboxRadioSwitch v-model=\"clustering\" type=\"switch\">\n\t\t\t{{ t('nextcloud-vue', 'Group nearby objects into clusters') }}\n\t\t</NcCheckboxRadioSwitch>\n\t</div>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcCheckboxRadioSwitch, NcTextField } from '@nextcloud/vue'\nimport CnFieldPicker from '../CnFieldPicker/CnFieldPicker.vue'\nimport CnRegisterSchemaSelect from '../CnRegisterSchemaSelect/CnRegisterSchemaSelect.vue'\n\n// The Netherlands, roughly — a sane default centre for a Dutch-government library.\n// autoFit is on by default, so this only shows before any object is plotted.\nconst DEFAULT_CENTRE = [52.13, 5.29]\n\n// Without a basemap the widget renders a grey box: CnMapWidget's `basemaps` prop is\n// opt-in and empty by default. The Nextcloud CSP already allows *.tile.openstreetmap.org.\nconst DEFAULT_BASEMAPS = [\n\t{\n\t\tname: 'OpenStreetMap',\n\t\turl: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',\n\t\tattribution: '© OpenStreetMap contributors',\n\t\toptions: { maxZoom: 19 },\n\t},\n]\n\nconst DEFAULT_CONTENT = {\n\tregister: '',\n\tschema: '',\n\tcenter: DEFAULT_CENTRE,\n\tzoom: 7,\n\theight: '400px',\n\tpopupField: '',\n\tclustering: false,\n\tautoFit: true,\n\tbasemaps: DEFAULT_BASEMAPS,\n}\n\n/**\n * CnMapWidgetForm — configures the `map` dashboard widget.\n *\n * Emits `update:content` with the assembled content blob on every change.\n * `validate()` requires a register + schema: a map with no data source would render\n * an empty basemap, which looks broken rather than empty.\n *\n * @slot default No slots — the form is fully declarative.\n */\nexport default {\n\tname: 'CnMapWidgetForm',\n\n\tcomponents: { NcTextField, NcCheckboxRadioSwitch, CnRegisterSchemaSelect, CnFieldPicker },\n\n\tprops: {\n\t\t/**\n\t\t * The placement being edited (pre-fills every control from\n\t\t * `editingWidget.content`), or `null` in create mode.\n\t\t *\n\t\t * @type {{content: object}|null}\n\t\t */\n\t\teditingWidget: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Initial content values when not editing (registry defaults).\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tvalue: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({ ...DEFAULT_CONTENT }),\n\t\t},\n\t},\n\n\temits: [\n\t\t/**\n\t\t * Emitted with the assembled content blob on every field change.\n\t\t *\n\t\t * @event update:content\n\t\t * @type {object}\n\t\t */\n\t\t'update:content',\n\t],\n\n\tdata() {\n\t\tconst initial = this.editingWidget?.content || this.value || {}\n\t\tconst centre = Array.isArray(initial.center) && initial.center.length === 2\n\t\t\t? initial.center\n\t\t\t: DEFAULT_CENTRE\n\t\treturn {\n\t\t\tsource: {\n\t\t\t\tregister: initial.register ?? '',\n\t\t\t\tschema: initial.schema ?? '',\n\t\t\t},\n\n\t\t\tcenter: [Number(centre[0]), Number(centre[1])],\n\t\t\tzoom: Number.isFinite(initial.zoom) ? initial.zoom : 7,\n\t\t\theight: initial.height || '400px',\n\t\t\tpopupField: initial.popupField ?? '',\n\t\t\tclustering: initial.clustering === true,\n\t\t\tautoFit: initial.autoFit !== false,\n\t\t\tcenterMarker: initial.markers?.centerMarker === true,\n\t\t\t// Preserved verbatim: the form does not expose a basemap picker, and dropping\n\t\t\t// it on save would turn the user's map into a grey box.\n\t\t\tbasemaps: Array.isArray(initial.basemaps) && initial.basemaps.length\n\t\t\t\t? initial.basemaps\n\t\t\t\t: DEFAULT_BASEMAPS,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** The assembled content blob from the current field values. */\n\t\tassembledContent() {\n\t\t\treturn {\n\t\t\t\tregister: this.source.register,\n\t\t\t\tschema: this.source.schema,\n\t\t\t\tcenter: this.center,\n\t\t\t\tzoom: this.zoom,\n\t\t\t\theight: this.height,\n\t\t\t\tpopupField: this.popupField,\n\t\t\t\tclustering: this.clustering,\n\t\t\t\tautoFit: this.autoFit,\n\t\t\t\tbasemaps: this.basemaps,\n\t\t\t\t// CnMapWidget reads its markers from here; `dataSource.{register, schema}`\n\t\t\t\t// is the shape its resolver understands.\n\t\t\t\tmarkers: {\n\t\t\t\t\tdataSource: { register: this.source.register, schema: this.source.schema },\n\t\t\t\t\tpopupField: this.popupField,\n\t\t\t\t\tclustering: this.clustering,\n\t\t\t\t\tcenterMarker: this.centerMarker,\n\t\t\t\t},\n\t\t\t}\n\t\t},\n\t},\n\n\twatch: {\n\t\tassembledContent: {\n\t\t\thandler(content) {\n\t\t\t\tthis.$emit('update:content', content)\n\t\t\t},\n\n\t\t\tdeep: true,\n\t\t\timmediate: true,\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * Update one half of the data source. Changing the register invalidates the\n\t\t * schema and the popup field, which belonged to the old schema.\n\t\t *\n\t\t * @param {'register'|'schema'} key Which half changed.\n\t\t * @param {string} value The new value.\n\t\t */\n\t\tupdateSource(key, value) {\n\t\t\tthis.source[key] = value\n\t\t\tif (key === 'register') {\n\t\t\t\tthis.source.schema = ''\n\t\t\t\tthis.popupField = ''\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Zoom is an integer clamped to the slider range; guards against a\n\t\t * non-numeric value or one outside the slider's `[1, 19]` range.\n\t\t *\n\t\t * @param {string} value The raw slider value.\n\t\t */\n\t\tonZoom(value) {\n\t\t\tconst n = Math.round(Number(value))\n\t\t\tif (!Number.isFinite(n)) {\n\t\t\t\tthis.zoom = 7\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.zoom = Math.min(19, Math.max(1, n))\n\t\t},\n\n\t\t/**\n\t\t * Update one coordinate of the centre, ignoring non-numeric input.\n\t\t *\n\t\t * @param {number} index 0 for latitude, 1 for longitude.\n\t\t * @param {string} value The raw input value.\n\t\t */\n\t\tonCentre(index, value) {\n\t\t\tconst n = Number(value)\n\t\t\tif (!Number.isFinite(n)) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.center[index] = n\n\t\t},\n\n\t\t/**\n\t\t * A map with no data source renders an empty basemap, which reads as broken\n\t\t * rather than empty — so require one.\n\t\t *\n\t\t * @return {boolean} Whether the form is valid.\n\t\t */\n\t\tvalidate() {\n\t\t\treturn Boolean(this.source.register && this.source.schema)\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-map-widget-form {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n}\n\n.cn-map-widget-form__row {\n\tdisplay: flex;\n\tgap: 8px;\n}\n\n.cn-map-widget-form__row > * {\n\tflex: 1;\n\tmin-width: 0;\n}\n\n.cn-map-widget-form__hint {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 90%;\n\tmargin: 0;\n}\n\n.cn-map-widget-form__field {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n}\n\n.cn-map-widget-form__range {\n\twidth: 100%;\n\t/* Native range inputs ship a default 2px margin on ALL sides. The left/right\n\t 2px pushes the width:100% track past the form and shows a phantom\n\t horizontal scrollbar; zeroing it also drops the top/bottom 2px, which was\n\t padding the form's height. */\n\tmargin: 0;\n}\n</style>\n"],"names":["CnRegisterSchemaSelect","CnFieldPicker","t"],"mappings":";;;;;AAsFA;AACA;AACA,MAAM,cAAa,GAAI,CAAC,KAAK,EAAE,IAAI;;AAEnC;AACA;AACA,MAAM,mBAAmB;AACxB,CAAA;AACC,EAAA,IAAI,EAAE,eAAe;EACrB,GAAG,EAAE,oDAAoD;AACzD,EAAA,WAAW,EAAE,8BAA8B;AAC3C,EAAA,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI;EACxB;AACF;;AAEA,MAAM,kBAAkB;CACvB,QAAQ,EAAE,EAAE;AACZ,CAAA,MAAM,EAAE,EAAE;AACV,CAAA,MAAM,EAAE,cAAc;AACtB,CAAA,IAAI,EAAE,CAAC;AACP,CAAA,MAAM,EAAE,OAAO;CACf,UAAU,EAAE,EAAE;AACd,CAAA,UAAU,EAAE,KAAK;CACjB,OAAO,EAAE,IAAI;CACb,QAAQ,EAAE,gBAAgB;AAC3B;;AAEA;;AAEC;AACA;AACA;;AAEA;;;AAGD,aAAe;CACd,IAAI,EAAE,iBAAiB;;AAEvB,CAAA,UAAU,EAAE,EAAE,WAAW,EAAE,qBAAqB,0BAAEA,YAAsB,iBAAEC,YAAe;;AAEzF,CAAA,KAAK,EAAE;AACN;;;AAGC;;;AAGD,EAAA,aAAa,EAAE;GACd,IAAI,EAAE,MAAM;GACZ,OAAO,EAAE,IAAI;GACb;;AAED;;AAEC;;;AAGD,EAAA,KAAK,EAAE;GACN,IAAI,EAAE,MAAM;AACZ,GAAA,OAAO,EAAE,OAAO,EAAE,GAAG,eAAc,E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;AAED;;;AAGC;AACA;;EAED,MAAM,CAAC,KAAK,EAAE;AACb,GAAA,MAAM,CAAA,GAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;GAClC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;IACxB,IAAI,CAAC,OAAO;IACZ;AACD,GAAA;AACA,GAAA,IAAI,CAAC,IAAG,GAAI,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;EACxC,CAAC;;AAED;;AAEC;;AAEA;;AAED,EAAA,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE;AACtB,GAAA,MAAM,CAAA,GAAI,MAAM,CAAC,KAAK;GACtB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;IACxB;AACD,GAAA;AACA,GAAA,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI;EACtB,CAAC;;AAED;;;AAGC;AACA;;EAED,QAAQ,GAAG;GACV,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,QAAO,IAAK,IAAI,CAAC,MAAM,CAAC,MAAM;EAC1D,CAAC;EACD;AACF;;"}
1
+ {"version":3,"file":"CnMapWidgetForm2.vue.js","sources":["../../../../src/components/CnMapWidgetForm/CnMapWidgetForm.vue"],"sourcesContent":["<!--\n CnMapWidgetForm — configuration form for the `map` dashboard widget.\n\n Picks an OpenRegister register/schema and plots its objects on a Leaflet map,\n reading each object's location from `@self.geo` (what CnObjectGeoWidget writes).\n Everything else — centre, zoom, height, popup field, clustering — is presentation.\n\n Used by both `CnAddWidgetModal` and the cog `CnWidgetStyleEditorModal`.\n-->\n<template>\n\t<div class=\"cn-map-widget-form\">\n\t\t<CnRegisterSchemaSelect\n\t\t\t:register=\"source.register\"\n\t\t\t:schema=\"source.schema\"\n\t\t\t@update:register=\"updateSource('register', $event)\"\n\t\t\t@update:schema=\"updateSource('schema', $event)\" />\n\n\t\t<CnFieldPicker\n\t\t\tv-if=\"source.register && source.schema\"\n\t\t\t:value=\"popupField\"\n\t\t\t:register=\"source.register\"\n\t\t\t:schema=\"source.schema\"\n\t\t\t:label=\"t('nextcloud-vue', 'Popup field')\"\n\t\t\t@input=\"popupField = $event\" />\n\n\t\t<CnFieldPicker\n\t\t\tv-if=\"source.register && source.schema\"\n\t\t\t:value=\"geoProperty\"\n\t\t\t:register=\"source.register\"\n\t\t\t:schema=\"source.schema\"\n\t\t\t:label=\"t('nextcloud-vue', 'Location field')\"\n\t\t\t@input=\"geoProperty = $event\" />\n\n\t\t<p v-if=\"source.register && source.schema\" class=\"cn-map-widget-form__hint\">\n\t\t\t{{ 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.') }}\n\t\t</p>\n\n\t\t<NcSelect\n\t\t\t:modelValue=\"basemapOption\"\n\t\t\t:options=\"basemapOptions\"\n\t\t\t:inputLabel=\"t('nextcloud-vue', 'Base map')\"\n\t\t\t:clearable=\"false\"\n\t\t\t@update:modelValue=\"onBasemap($event)\" />\n\n\t\t<label class=\"cn-map-widget-form__field\">\n\t\t\t<span class=\"cn-map-widget-form__label\">\n\t\t\t\t{{ t('nextcloud-vue', 'Zoom') }} ({{ zoom }})\n\t\t\t</span>\n\t\t\t<input\n\t\t\t\ttype=\"range\"\n\t\t\t\tmin=\"1\"\n\t\t\t\tmax=\"19\"\n\t\t\t\tstep=\"1\"\n\t\t\t\t:value=\"zoom\"\n\t\t\t\tclass=\"cn-map-widget-form__range\"\n\t\t\t\t@input=\"onZoom($event.target.value)\">\n\t\t</label>\n\n\t\t<NcTextField\n\t\t\t:modelValue=\"height\"\n\t\t\t:label=\"t('nextcloud-vue', 'Height')\"\n\t\t\t:labelVisible=\"true\"\n\t\t\tplaceholder=\"400px\"\n\t\t\t@update:modelValue=\"height = $event\" />\n\n\t\t<div class=\"cn-map-widget-form__row\">\n\t\t\t<NcTextField\n\t\t\t\t:modelValue=\"String(center[0])\"\n\t\t\t\ttype=\"number\"\n\t\t\t\t:label=\"t('nextcloud-vue', 'Centre latitude')\"\n\t\t\t\t:labelVisible=\"true\"\n\t\t\t\t@update:modelValue=\"onCentre(0, $event)\" />\n\n\t\t\t<NcTextField\n\t\t\t\t:modelValue=\"String(center[1])\"\n\t\t\t\ttype=\"number\"\n\t\t\t\t:label=\"t('nextcloud-vue', 'Centre longitude')\"\n\t\t\t\t:labelVisible=\"true\"\n\t\t\t\t@update:modelValue=\"onCentre(1, $event)\" />\n\t\t</div>\n\n\t\t<NcCheckboxRadioSwitch v-model=\"centerMarker\" type=\"switch\">\n\t\t\t{{ t('nextcloud-vue', 'Show a marker at the centre') }}\n\t\t</NcCheckboxRadioSwitch>\n\n\t\t<NcCheckboxRadioSwitch v-model=\"autoFit\" type=\"switch\">\n\t\t\t{{ t('nextcloud-vue', 'Zoom to fit the plotted objects') }}\n\t\t</NcCheckboxRadioSwitch>\n\n\t\t<NcCheckboxRadioSwitch v-model=\"clustering\" type=\"switch\">\n\t\t\t{{ t('nextcloud-vue', 'Group nearby objects into clusters') }}\n\t\t</NcCheckboxRadioSwitch>\n\t</div>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcCheckboxRadioSwitch, NcSelect, NcTextField } from '@nextcloud/vue'\nimport CnFieldPicker from '../CnFieldPicker/CnFieldPicker.vue'\nimport CnRegisterSchemaSelect from '../CnRegisterSchemaSelect/CnRegisterSchemaSelect.vue'\nimport { BASEMAP_PRESETS, basemapFromPreset, presetOf } from '../CnMapWidget/basemapPresets.js'\n\n// The Netherlands, roughly — a sane default centre for a Dutch-government library.\n// autoFit is on by default, so this only shows before any object is plotted.\nconst DEFAULT_CENTRE = [52.13, 5.29]\n\n// Without a basemap the widget renders a grey box: CnMapWidget's `basemaps` prop is\n// opt-in and empty by default. The Nextcloud CSP already allows *.tile.openstreetmap.org.\nconst DEFAULT_BASEMAPS = [basemapFromPreset('osm')]\n\nconst DEFAULT_CONTENT = {\n\tregister: '',\n\tschema: '',\n\tcenter: DEFAULT_CENTRE,\n\tzoom: 7,\n\theight: '400px',\n\tpopupField: '',\n\tclustering: false,\n\tautoFit: true,\n\tbasemaps: DEFAULT_BASEMAPS,\n}\n\n/**\n * CnMapWidgetForm — configures the `map` dashboard widget.\n *\n * Emits `update:content` with the assembled content blob on every change.\n * `validate()` requires a register + schema: a map with no data source would render\n * an empty basemap, which looks broken rather than empty.\n *\n * @slot default No slots — the form is fully declarative.\n */\nexport default {\n\tname: 'CnMapWidgetForm',\n\n\tcomponents: { NcTextField, NcCheckboxRadioSwitch, NcSelect, CnRegisterSchemaSelect, CnFieldPicker },\n\n\tprops: {\n\t\t/**\n\t\t * The placement being edited (pre-fills every control from\n\t\t * `editingWidget.content`), or `null` in create mode.\n\t\t *\n\t\t * @type {{content: object}|null}\n\t\t */\n\t\teditingWidget: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Initial content values when not editing (registry defaults).\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tvalue: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({ ...DEFAULT_CONTENT }),\n\t\t},\n\t},\n\n\temits: [\n\t\t/**\n\t\t * Emitted with the assembled content blob on every field change.\n\t\t *\n\t\t * @event update:content\n\t\t * @type {object}\n\t\t */\n\t\t'update:content',\n\t],\n\n\tdata() {\n\t\tconst initial = this.editingWidget?.content || this.value || {}\n\t\tconst centre = Array.isArray(initial.center) && initial.center.length === 2\n\t\t\t? initial.center\n\t\t\t: DEFAULT_CENTRE\n\t\treturn {\n\t\t\tsource: {\n\t\t\t\tregister: initial.register ?? '',\n\t\t\t\tschema: initial.schema ?? '',\n\t\t\t},\n\n\t\t\tcenter: [Number(centre[0]), Number(centre[1])],\n\t\t\tzoom: Number.isFinite(initial.zoom) ? initial.zoom : 7,\n\t\t\theight: initial.height || '400px',\n\t\t\tpopupField: initial.popupField ?? '',\n\t\t\tgeoProperty: initial.markers?.geoProperty ?? '',\n\t\t\tclustering: initial.clustering === true,\n\t\t\tautoFit: initial.autoFit !== false,\n\t\t\tcenterMarker: initial.markers?.centerMarker === true,\n\t\t\t// Preserved verbatim unless a preset is chosen: dropping it on save would\n\t\t\t// turn the user's map into a grey box, and a custom base map has no preset.\n\t\t\tbasemaps: Array.isArray(initial.basemaps) && initial.basemaps.length\n\t\t\t\t? initial.basemaps\n\t\t\t\t: DEFAULT_BASEMAPS,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** The base map choices: the presets, plus the stored one when it is custom. */\n\t\tbasemapOptions() {\n\t\t\tconst presets = BASEMAP_PRESETS.map((preset) => ({ id: preset.id, label: preset.name }))\n\t\t\tif (presetOf(this.basemaps[0]) === null) {\n\t\t\t\treturn [{ id: 'custom', label: this.basemaps[0]?.name || t('nextcloud-vue', 'Custom base map') }, ...presets]\n\t\t\t}\n\t\t\treturn presets\n\t\t},\n\n\t\t/** The option of the first stored base map. */\n\t\tbasemapOption() {\n\t\t\tconst id = presetOf(this.basemaps[0]) ?? 'custom'\n\t\t\treturn this.basemapOptions.find((option) => option.id === id) ?? null\n\t\t},\n\n\t\t/** The assembled content blob from the current field values. */\n\t\tassembledContent() {\n\t\t\treturn {\n\t\t\t\tregister: this.source.register,\n\t\t\t\tschema: this.source.schema,\n\t\t\t\tcenter: this.center,\n\t\t\t\tzoom: this.zoom,\n\t\t\t\theight: this.height,\n\t\t\t\tpopupField: this.popupField,\n\t\t\t\tclustering: this.clustering,\n\t\t\t\tautoFit: this.autoFit,\n\t\t\t\tbasemaps: this.basemaps,\n\t\t\t\t// CnMapWidget reads its markers from here; `dataSource.{register, schema}`\n\t\t\t\t// is the shape its resolver understands.\n\t\t\t\tmarkers: {\n\t\t\t\t\tdataSource: { register: this.source.register, schema: this.source.schema },\n\t\t\t\t\tpopupField: this.popupField,\n\t\t\t\t\t...(this.geoProperty ? { geoProperty: this.geoProperty } : {}),\n\t\t\t\t\tclustering: this.clustering,\n\t\t\t\t\tcenterMarker: this.centerMarker,\n\t\t\t\t},\n\t\t\t}\n\t\t},\n\t},\n\n\twatch: {\n\t\tassembledContent: {\n\t\t\thandler(content) {\n\t\t\t\tthis.$emit('update:content', content)\n\t\t\t},\n\n\t\t\tdeep: true,\n\t\t\timmediate: true,\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * Update one half of the data source. Changing the register invalidates the\n\t\t * schema and the popup field, which belonged to the old schema.\n\t\t *\n\t\t * @param {'register'|'schema'} key Which half changed.\n\t\t * @param {string} value The new value.\n\t\t */\n\t\tupdateSource(key, value) {\n\t\t\tthis.source[key] = value\n\t\t\tif (key === 'register') {\n\t\t\t\tthis.source.schema = ''\n\t\t\t\tthis.popupField = ''\n\t\t\t\tthis.geoProperty = ''\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Store the chosen preset as the base map. Choosing the custom entry keeps\n\t\t * the stored base maps as they are.\n\t\t *\n\t\t * @param {{id: string}|null} option The chosen option.\n\t\t */\n\t\tonBasemap(option) {\n\t\t\tconst basemap = option && basemapFromPreset(option.id)\n\t\t\tif (basemap) {\n\t\t\t\tthis.basemaps = [basemap]\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Zoom is an integer clamped to the slider range; guards against a\n\t\t * non-numeric value or one outside the slider's `[1, 19]` range.\n\t\t *\n\t\t * @param {string} value The raw slider value.\n\t\t */\n\t\tonZoom(value) {\n\t\t\tconst n = Math.round(Number(value))\n\t\t\tif (!Number.isFinite(n)) {\n\t\t\t\tthis.zoom = 7\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.zoom = Math.min(19, Math.max(1, n))\n\t\t},\n\n\t\t/**\n\t\t * Update one coordinate of the centre, ignoring non-numeric input.\n\t\t *\n\t\t * @param {number} index 0 for latitude, 1 for longitude.\n\t\t * @param {string} value The raw input value.\n\t\t */\n\t\tonCentre(index, value) {\n\t\t\tconst n = Number(value)\n\t\t\tif (!Number.isFinite(n)) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.center[index] = n\n\t\t},\n\n\t\t/**\n\t\t * A map with no data source renders an empty basemap, which reads as broken\n\t\t * rather than empty — so require one.\n\t\t *\n\t\t * @return {boolean} Whether the form is valid.\n\t\t */\n\t\tvalidate() {\n\t\t\treturn Boolean(this.source.register && this.source.schema)\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-map-widget-form {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n}\n\n.cn-map-widget-form__row {\n\tdisplay: flex;\n\tgap: 8px;\n}\n\n.cn-map-widget-form__row > * {\n\tflex: 1;\n\tmin-width: 0;\n}\n\n.cn-map-widget-form__hint {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 90%;\n\tmargin: 0;\n}\n\n.cn-map-widget-form__field {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n}\n\n.cn-map-widget-form__range {\n\twidth: 100%;\n\t/* Native range inputs ship a default 2px margin on ALL sides. The left/right\n\t 2px pushes the width:100% track past the form and shows a phantom\n\t horizontal scrollbar; zeroing it also drops the top/bottom 2px, which was\n\t padding the form's height. */\n\tmargin: 0;\n}\n</style>\n"],"names":["CnRegisterSchemaSelect","CnFieldPicker","t"],"mappings":";;;;;;AAsGA;AACA;AACA,MAAM,cAAa,GAAI,CAAC,KAAK,EAAE,IAAI;;AAEnC;AACA;AACA,MAAM,mBAAmB,CAAC,iBAAiB,CAAC,KAAK,CAAC;;AAElD,MAAM,kBAAkB;CACvB,QAAQ,EAAE,EAAE;AACZ,CAAA,MAAM,EAAE,EAAE;AACV,CAAA,MAAM,EAAE,cAAc;AACtB,CAAA,IAAI,EAAE,CAAC;AACP,CAAA,MAAM,EAAE,OAAO;CACf,UAAU,EAAE,EAAE;AACd,CAAA,UAAU,EAAE,KAAK;CACjB,OAAO,EAAE,IAAI;CACb,QAAQ,EAAE,gBAAgB;AAC3B;;AAEA;;AAEC;AACA;AAC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S,GAAI;AAClB,IAAA,IAAI,CAAC,WAAU,GAAI;AACpB,GAAA;EACD,CAAC;;AAED;;;AAGC;;;AAGD,EAAA,SAAS,CAAC,MAAM,EAAE;GACjB,MAAM,UAAU,MAAK,IAAK,iBAAiB,CAAC,MAAM,CAAC,EAAE;GACrD,IAAI,OAAO,EAAE;IACZ,IAAI,CAAC,QAAO,GAAI,CAAC,OAAO;AACzB,GAAA;EACD,CAAC;;AAED;;;AAGC;AACA;;EAED,MAAM,CAAC,KAAK,EAAE;AACb,GAAA,MAAM,CAAA,GAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;GAClC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;IACxB,IAAI,CAAC,OAAO;IACZ;AACD,GAAA;AACA,GAAA,IAAI,CAAC,IAAG,GAAI,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;EACxC,CAAC;;AAED;;AAEC;;AAEA;;AAED,EAAA,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE;AACtB,GAAA,MAAM,CAAA,GAAI,MAAM,CAAC,KAAK;GACtB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;IACxB;AACD,GAAA;AACA,GAAA,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI;EACtB,CAAC;;AAED;;;AAGC;AACA;;EAED,QAAQ,GAAG;GACV,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,QAAO,IAAK,IAAI,CAAC,MAAM,CAAC,MAAM;EAC1D,CAAC;EACD;AACF;;"}
@@ -2,7 +2,7 @@ import { resolveComponent, openBlock, createElementBlock, createVNode, createBlo
2
2
 
3
3
  const _hoisted_1 = { class: "cn-map-widget-form" };
4
4
  const _hoisted_2 = {
5
- key: 1,
5
+ key: 2,
6
6
  class: "cn-map-widget-form__hint"
7
7
  };
8
8
  const _hoisted_3 = { class: "cn-map-widget-form__field" };
@@ -13,6 +13,7 @@ const _hoisted_6 = { class: "cn-map-widget-form__row" };
13
13
  function render(_ctx, _cache, $props, $setup, $data, $options) {
14
14
  const _component_CnRegisterSchemaSelect = resolveComponent("CnRegisterSchemaSelect");
15
15
  const _component_CnFieldPicker = resolveComponent("CnFieldPicker");
16
+ const _component_NcSelect = resolveComponent("NcSelect");
16
17
  const _component_NcTextField = resolveComponent("NcTextField");
17
18
  const _component_NcCheckboxRadioSwitch = resolveComponent("NcCheckboxRadioSwitch");
18
19
 
@@ -34,8 +35,25 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
34
35
  }, null, 8 /* PROPS */, ["value", "register", "schema", "label"]))
35
36
  : createCommentVNode("v-if", true),
36
37
  ($data.source.register && $data.source.schema)
37
- ? (openBlock(), createElementBlock("p", _hoisted_2, toDisplayString($options.t('nextcloud-vue', 'Objects are plotted from their location (@self.geo). Objects without one are skipped.')), 1 /* TEXT */))
38
+ ? (openBlock(), createBlock(_component_CnFieldPicker, {
39
+ key: 1,
40
+ value: $data.geoProperty,
41
+ register: $data.source.register,
42
+ schema: $data.source.schema,
43
+ label: $options.t('nextcloud-vue', 'Location field'),
44
+ onInput: _cache[3] || (_cache[3] = $event => ($data.geoProperty = $event))
45
+ }, null, 8 /* PROPS */, ["value", "register", "schema", "label"]))
46
+ : createCommentVNode("v-if", true),
47
+ ($data.source.register && $data.source.schema)
48
+ ? (openBlock(), createElementBlock("p", _hoisted_2, 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 */))
38
49
  : createCommentVNode("v-if", true),
50
+ createVNode(_component_NcSelect, {
51
+ modelValue: $options.basemapOption,
52
+ options: $options.basemapOptions,
53
+ inputLabel: $options.t('nextcloud-vue', 'Base map'),
54
+ clearable: false,
55
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = $event => ($options.onBasemap($event)))
56
+ }, null, 8 /* PROPS */, ["modelValue", "options", "inputLabel"]),
39
57
  createElementVNode("label", _hoisted_3, [
40
58
  createElementVNode("span", _hoisted_4, toDisplayString($options.t('nextcloud-vue', 'Zoom')) + " (" + toDisplayString($data.zoom) + ") ", 1 /* TEXT */),
41
59
  createElementVNode("input", {
@@ -45,7 +63,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
45
63
  step: "1",
46
64
  value: $data.zoom,
47
65
  class: "cn-map-widget-form__range",
48
- onInput: _cache[3] || (_cache[3] = $event => ($options.onZoom($event.target.value)))
66
+ onInput: _cache[5] || (_cache[5] = $event => ($options.onZoom($event.target.value)))
49
67
  }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_5)
50
68
  ]),
51
69
  createVNode(_component_NcTextField, {
@@ -53,7 +71,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
53
71
  label: $options.t('nextcloud-vue', 'Height'),
54
72
  labelVisible: true,
55
73
  placeholder: "400px",
56
- "onUpdate:modelValue": _cache[4] || (_cache[4] = $event => ($data.height = $event))
74
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = $event => ($data.height = $event))
57
75
  }, null, 8 /* PROPS */, ["modelValue", "label"]),
58
76
  createElementVNode("div", _hoisted_6, [
59
77
  createVNode(_component_NcTextField, {
@@ -61,19 +79,19 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
61
79
  type: "number",
62
80
  label: $options.t('nextcloud-vue', 'Centre latitude'),
63
81
  labelVisible: true,
64
- "onUpdate:modelValue": _cache[5] || (_cache[5] = $event => ($options.onCentre(0, $event)))
82
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = $event => ($options.onCentre(0, $event)))
65
83
  }, null, 8 /* PROPS */, ["modelValue", "label"]),
66
84
  createVNode(_component_NcTextField, {
67
85
  modelValue: String($data.center[1]),
68
86
  type: "number",
69
87
  label: $options.t('nextcloud-vue', 'Centre longitude'),
70
88
  labelVisible: true,
71
- "onUpdate:modelValue": _cache[6] || (_cache[6] = $event => ($options.onCentre(1, $event)))
89
+ "onUpdate:modelValue": _cache[8] || (_cache[8] = $event => ($options.onCentre(1, $event)))
72
90
  }, null, 8 /* PROPS */, ["modelValue", "label"])
73
91
  ]),
74
92
  createVNode(_component_NcCheckboxRadioSwitch, {
75
93
  modelValue: $data.centerMarker,
76
- "onUpdate:modelValue": _cache[7] || (_cache[7] = $event => (($data.centerMarker) = $event)),
94
+ "onUpdate:modelValue": _cache[9] || (_cache[9] = $event => (($data.centerMarker) = $event)),
77
95
  type: "switch"
78
96
  }, {
79
97
  default: withCtx(() => [
@@ -83,7 +101,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
83
101
  }, 8 /* PROPS */, ["modelValue"]),
84
102
  createVNode(_component_NcCheckboxRadioSwitch, {
85
103
  modelValue: $data.autoFit,
86
- "onUpdate:modelValue": _cache[8] || (_cache[8] = $event => (($data.autoFit) = $event)),
104
+ "onUpdate:modelValue": _cache[10] || (_cache[10] = $event => (($data.autoFit) = $event)),
87
105
  type: "switch"
88
106
  }, {
89
107
  default: withCtx(() => [
@@ -93,7 +111,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
93
111
  }, 8 /* PROPS */, ["modelValue"]),
94
112
  createVNode(_component_NcCheckboxRadioSwitch, {
95
113
  modelValue: $data.clustering,
96
- "onUpdate:modelValue": _cache[9] || (_cache[9] = $event => (($data.clustering) = $event)),
114
+ "onUpdate:modelValue": _cache[11] || (_cache[11] = $event => (($data.clustering) = $event)),
97
115
  type: "switch"
98
116
  }, {
99
117
  default: withCtx(() => [
@@ -1 +1 @@
1
- {"version":3,"file":"CnMapWidgetForm3.vue.js","sources":["../../../../src/components/CnMapWidgetForm/CnMapWidgetForm.vue?vue&type=template&id=ab71a77e&lang.js"],"sourcesContent":["<!--\n CnMapWidgetForm — configuration form for the `map` dashboard widget.\n\n Picks an OpenRegister register/schema and plots its objects on a Leaflet map,\n reading each object's location from `@self.geo` (what CnObjectGeoWidget writes).\n Everything else — centre, zoom, height, popup field, clustering — is presentation.\n\n Used by both `CnAddWidgetModal` and the cog `CnWidgetStyleEditorModal`.\n-->\n<template>\n\t<div class=\"cn-map-widget-form\">\n\t\t<CnRegisterSchemaSelect\n\t\t\t:register=\"source.register\"\n\t\t\t:schema=\"source.schema\"\n\t\t\t@update:register=\"updateSource('register', $event)\"\n\t\t\t@update:schema=\"updateSource('schema', $event)\" />\n\n\t\t<CnFieldPicker\n\t\t\tv-if=\"source.register && source.schema\"\n\t\t\t:value=\"popupField\"\n\t\t\t:register=\"source.register\"\n\t\t\t:schema=\"source.schema\"\n\t\t\t:label=\"t('nextcloud-vue', 'Popup field')\"\n\t\t\t@input=\"popupField = $event\" />\n\n\t\t<p v-if=\"source.register && source.schema\" class=\"cn-map-widget-form__hint\">\n\t\t\t{{ t('nextcloud-vue', 'Objects are plotted from their location (@self.geo). Objects without one are skipped.') }}\n\t\t</p>\n\n\t\t<label class=\"cn-map-widget-form__field\">\n\t\t\t<span class=\"cn-map-widget-form__label\">\n\t\t\t\t{{ t('nextcloud-vue', 'Zoom') }} ({{ zoom }})\n\t\t\t</span>\n\t\t\t<input\n\t\t\t\ttype=\"range\"\n\t\t\t\tmin=\"1\"\n\t\t\t\tmax=\"19\"\n\t\t\t\tstep=\"1\"\n\t\t\t\t:value=\"zoom\"\n\t\t\t\tclass=\"cn-map-widget-form__range\"\n\t\t\t\t@input=\"onZoom($event.target.value)\">\n\t\t</label>\n\n\t\t<NcTextField\n\t\t\t:modelValue=\"height\"\n\t\t\t:label=\"t('nextcloud-vue', 'Height')\"\n\t\t\t:labelVisible=\"true\"\n\t\t\tplaceholder=\"400px\"\n\t\t\t@update:modelValue=\"height = $event\" />\n\n\t\t<div class=\"cn-map-widget-form__row\">\n\t\t\t<NcTextField\n\t\t\t\t:modelValue=\"String(center[0])\"\n\t\t\t\ttype=\"number\"\n\t\t\t\t:label=\"t('nextcloud-vue', 'Centre latitude')\"\n\t\t\t\t:labelVisible=\"true\"\n\t\t\t\t@update:modelValue=\"onCentre(0, $event)\" />\n\n\t\t\t<NcTextField\n\t\t\t\t:modelValue=\"String(center[1])\"\n\t\t\t\ttype=\"number\"\n\t\t\t\t:label=\"t('nextcloud-vue', 'Centre longitude')\"\n\t\t\t\t:labelVisible=\"true\"\n\t\t\t\t@update:modelValue=\"onCentre(1, $event)\" />\n\t\t</div>\n\n\t\t<NcCheckboxRadioSwitch v-model=\"centerMarker\" type=\"switch\">\n\t\t\t{{ t('nextcloud-vue', 'Show a marker at the centre') }}\n\t\t</NcCheckboxRadioSwitch>\n\n\t\t<NcCheckboxRadioSwitch v-model=\"autoFit\" type=\"switch\">\n\t\t\t{{ t('nextcloud-vue', 'Zoom to fit the plotted objects') }}\n\t\t</NcCheckboxRadioSwitch>\n\n\t\t<NcCheckboxRadioSwitch v-model=\"clustering\" type=\"switch\">\n\t\t\t{{ t('nextcloud-vue', 'Group nearby objects into clusters') }}\n\t\t</NcCheckboxRadioSwitch>\n\t</div>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcCheckboxRadioSwitch, NcTextField } from '@nextcloud/vue'\nimport CnFieldPicker from '../CnFieldPicker/CnFieldPicker.vue'\nimport CnRegisterSchemaSelect from '../CnRegisterSchemaSelect/CnRegisterSchemaSelect.vue'\n\n// The Netherlands, roughly — a sane default centre for a Dutch-government library.\n// autoFit is on by default, so this only shows before any object is plotted.\nconst DEFAULT_CENTRE = [52.13, 5.29]\n\n// Without a basemap the widget renders a grey box: CnMapWidget's `basemaps` prop is\n// opt-in and empty by default. The Nextcloud CSP already allows *.tile.openstreetmap.org.\nconst DEFAULT_BASEMAPS = [\n\t{\n\t\tname: 'OpenStreetMap',\n\t\turl: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',\n\t\tattribution: '© OpenStreetMap contributors',\n\t\toptions: { maxZoom: 19 },\n\t},\n]\n\nconst DEFAULT_CONTENT = {\n\tregister: '',\n\tschema: '',\n\tcenter: DEFAULT_CENTRE,\n\tzoom: 7,\n\theight: '400px',\n\tpopupField: '',\n\tclustering: false,\n\tautoFit: true,\n\tbasemaps: DEFAULT_BASEMAPS,\n}\n\n/**\n * CnMapWidgetForm — configures the `map` dashboard widget.\n *\n * Emits `update:content` with the assembled content blob on every change.\n * `validate()` requires a register + schema: a map with no data source would render\n * an empty basemap, which looks broken rather than empty.\n *\n * @slot default No slots — the form is fully declarative.\n */\nexport default {\n\tname: 'CnMapWidgetForm',\n\n\tcomponents: { NcTextField, NcCheckboxRadioSwitch, CnRegisterSchemaSelect, CnFieldPicker },\n\n\tprops: {\n\t\t/**\n\t\t * The placement being edited (pre-fills every control from\n\t\t * `editingWidget.content`), or `null` in create mode.\n\t\t *\n\t\t * @type {{content: object}|null}\n\t\t */\n\t\teditingWidget: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Initial content values when not editing (registry defaults).\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tvalue: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({ ...DEFAULT_CONTENT }),\n\t\t},\n\t},\n\n\temits: [\n\t\t/**\n\t\t * Emitted with the assembled content blob on every field change.\n\t\t *\n\t\t * @event update:content\n\t\t * @type {object}\n\t\t */\n\t\t'update:content',\n\t],\n\n\tdata() {\n\t\tconst initial = this.editingWidget?.content || this.value || {}\n\t\tconst centre = Array.isArray(initial.center) && initial.center.length === 2\n\t\t\t? initial.center\n\t\t\t: DEFAULT_CENTRE\n\t\treturn {\n\t\t\tsource: {\n\t\t\t\tregister: initial.register ?? '',\n\t\t\t\tschema: initial.schema ?? '',\n\t\t\t},\n\n\t\t\tcenter: [Number(centre[0]), Number(centre[1])],\n\t\t\tzoom: Number.isFinite(initial.zoom) ? initial.zoom : 7,\n\t\t\theight: initial.height || '400px',\n\t\t\tpopupField: initial.popupField ?? '',\n\t\t\tclustering: initial.clustering === true,\n\t\t\tautoFit: initial.autoFit !== false,\n\t\t\tcenterMarker: initial.markers?.centerMarker === true,\n\t\t\t// Preserved verbatim: the form does not expose a basemap picker, and dropping\n\t\t\t// it on save would turn the user's map into a grey box.\n\t\t\tbasemaps: Array.isArray(initial.basemaps) && initial.basemaps.length\n\t\t\t\t? initial.basemaps\n\t\t\t\t: DEFAULT_BASEMAPS,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** The assembled content blob from the current field values. */\n\t\tassembledContent() {\n\t\t\treturn {\n\t\t\t\tregister: this.source.register,\n\t\t\t\tschema: this.source.schema,\n\t\t\t\tcenter: this.center,\n\t\t\t\tzoom: this.zoom,\n\t\t\t\theight: this.height,\n\t\t\t\tpopupField: this.popupField,\n\t\t\t\tclustering: this.clustering,\n\t\t\t\tautoFit: this.autoFit,\n\t\t\t\tbasemaps: this.basemaps,\n\t\t\t\t// CnMapWidget reads its markers from here; `dataSource.{register, schema}`\n\t\t\t\t// is the shape its resolver understands.\n\t\t\t\tmarkers: {\n\t\t\t\t\tdataSource: { register: this.source.register, schema: this.source.schema },\n\t\t\t\t\tpopupField: this.popupField,\n\t\t\t\t\tclustering: this.clustering,\n\t\t\t\t\tcenterMarker: this.centerMarker,\n\t\t\t\t},\n\t\t\t}\n\t\t},\n\t},\n\n\twatch: {\n\t\tassembledContent: {\n\t\t\thandler(content) {\n\t\t\t\tthis.$emit('update:content', content)\n\t\t\t},\n\n\t\t\tdeep: true,\n\t\t\timmediate: true,\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * Update one half of the data source. Changing the register invalidates the\n\t\t * schema and the popup field, which belonged to the old schema.\n\t\t *\n\t\t * @param {'register'|'schema'} key Which half changed.\n\t\t * @param {string} value The new value.\n\t\t */\n\t\tupdateSource(key, value) {\n\t\t\tthis.source[key] = value\n\t\t\tif (key === 'register') {\n\t\t\t\tthis.source.schema = ''\n\t\t\t\tthis.popupField = ''\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Zoom is an integer clamped to the slider range; guards against a\n\t\t * non-numeric value or one outside the slider's `[1, 19]` range.\n\t\t *\n\t\t * @param {string} value The raw slider value.\n\t\t */\n\t\tonZoom(value) {\n\t\t\tconst n = Math.round(Number(value))\n\t\t\tif (!Number.isFinite(n)) {\n\t\t\t\tthis.zoom = 7\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.zoom = Math.min(19, Math.max(1, n))\n\t\t},\n\n\t\t/**\n\t\t * Update one coordinate of the centre, ignoring non-numeric input.\n\t\t *\n\t\t * @param {number} index 0 for latitude, 1 for longitude.\n\t\t * @param {string} value The raw input value.\n\t\t */\n\t\tonCentre(index, value) {\n\t\t\tconst n = Number(value)\n\t\t\tif (!Number.isFinite(n)) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.center[index] = n\n\t\t},\n\n\t\t/**\n\t\t * A map with no data source renders an empty basemap, which reads as broken\n\t\t * rather than empty — so require one.\n\t\t *\n\t\t * @return {boolean} Whether the form is valid.\n\t\t */\n\t\tvalidate() {\n\t\t\treturn Boolean(this.source.register && this.source.schema)\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-map-widget-form {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n}\n\n.cn-map-widget-form__row {\n\tdisplay: flex;\n\tgap: 8px;\n}\n\n.cn-map-widget-form__row > * {\n\tflex: 1;\n\tmin-width: 0;\n}\n\n.cn-map-widget-form__hint {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 90%;\n\tmargin: 0;\n}\n\n.cn-map-widget-form__field {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n}\n\n.cn-map-widget-form__range {\n\twidth: 100%;\n\t/* Native range inputs ship a default 2px margin on ALL sides. The left/right\n\t 2px pushes the width:100% track past the form and shows a phantom\n\t horizontal scrollbar; zeroing it also drops the top/bottom 2px, which was\n\t padding the form's height. */\n\tmargin: 0;\n}\n</style>\n"],"names":["_openBlock","_createElementBlock","_toDisplayString","_createElementVNode","_createVNode"],"mappings":";;AAmBM,MAAA,UAAA,GAAA,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AAA,6BAAA,CAAA,CAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"CnMapWidgetForm3.vue.js","sources":["../../../../src/components/CnMapWidgetForm/CnMapWidgetForm.vue?vue&type=template&id=5ee2234a&lang.js"],"sourcesContent":["<!--\n CnMapWidgetForm — configuration form for the `map` dashboard widget.\n\n Picks an OpenRegister register/schema and plots its objects on a Leaflet map,\n reading each object's location from `@self.geo` (what CnObjectGeoWidget writes).\n Everything else — centre, zoom, height, popup field, clustering — is presentation.\n\n Used by both `CnAddWidgetModal` and the cog `CnWidgetStyleEditorModal`.\n-->\n<template>\n\t<div class=\"cn-map-widget-form\">\n\t\t<CnRegisterSchemaSelect\n\t\t\t:register=\"source.register\"\n\t\t\t:schema=\"source.schema\"\n\t\t\t@update:register=\"updateSource('register', $event)\"\n\t\t\t@update:schema=\"updateSource('schema', $event)\" />\n\n\t\t<CnFieldPicker\n\t\t\tv-if=\"source.register && source.schema\"\n\t\t\t:value=\"popupField\"\n\t\t\t:register=\"source.register\"\n\t\t\t:schema=\"source.schema\"\n\t\t\t:label=\"t('nextcloud-vue', 'Popup field')\"\n\t\t\t@input=\"popupField = $event\" />\n\n\t\t<CnFieldPicker\n\t\t\tv-if=\"source.register && source.schema\"\n\t\t\t:value=\"geoProperty\"\n\t\t\t:register=\"source.register\"\n\t\t\t:schema=\"source.schema\"\n\t\t\t:label=\"t('nextcloud-vue', 'Location field')\"\n\t\t\t@input=\"geoProperty = $event\" />\n\n\t\t<p v-if=\"source.register && source.schema\" class=\"cn-map-widget-form__hint\">\n\t\t\t{{ 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.') }}\n\t\t</p>\n\n\t\t<NcSelect\n\t\t\t:modelValue=\"basemapOption\"\n\t\t\t:options=\"basemapOptions\"\n\t\t\t:inputLabel=\"t('nextcloud-vue', 'Base map')\"\n\t\t\t:clearable=\"false\"\n\t\t\t@update:modelValue=\"onBasemap($event)\" />\n\n\t\t<label class=\"cn-map-widget-form__field\">\n\t\t\t<span class=\"cn-map-widget-form__label\">\n\t\t\t\t{{ t('nextcloud-vue', 'Zoom') }} ({{ zoom }})\n\t\t\t</span>\n\t\t\t<input\n\t\t\t\ttype=\"range\"\n\t\t\t\tmin=\"1\"\n\t\t\t\tmax=\"19\"\n\t\t\t\tstep=\"1\"\n\t\t\t\t:value=\"zoom\"\n\t\t\t\tclass=\"cn-map-widget-form__range\"\n\t\t\t\t@input=\"onZoom($event.target.value)\">\n\t\t</label>\n\n\t\t<NcTextField\n\t\t\t:modelValue=\"height\"\n\t\t\t:label=\"t('nextcloud-vue', 'Height')\"\n\t\t\t:labelVisible=\"true\"\n\t\t\tplaceholder=\"400px\"\n\t\t\t@update:modelValue=\"height = $event\" />\n\n\t\t<div class=\"cn-map-widget-form__row\">\n\t\t\t<NcTextField\n\t\t\t\t:modelValue=\"String(center[0])\"\n\t\t\t\ttype=\"number\"\n\t\t\t\t:label=\"t('nextcloud-vue', 'Centre latitude')\"\n\t\t\t\t:labelVisible=\"true\"\n\t\t\t\t@update:modelValue=\"onCentre(0, $event)\" />\n\n\t\t\t<NcTextField\n\t\t\t\t:modelValue=\"String(center[1])\"\n\t\t\t\ttype=\"number\"\n\t\t\t\t:label=\"t('nextcloud-vue', 'Centre longitude')\"\n\t\t\t\t:labelVisible=\"true\"\n\t\t\t\t@update:modelValue=\"onCentre(1, $event)\" />\n\t\t</div>\n\n\t\t<NcCheckboxRadioSwitch v-model=\"centerMarker\" type=\"switch\">\n\t\t\t{{ t('nextcloud-vue', 'Show a marker at the centre') }}\n\t\t</NcCheckboxRadioSwitch>\n\n\t\t<NcCheckboxRadioSwitch v-model=\"autoFit\" type=\"switch\">\n\t\t\t{{ t('nextcloud-vue', 'Zoom to fit the plotted objects') }}\n\t\t</NcCheckboxRadioSwitch>\n\n\t\t<NcCheckboxRadioSwitch v-model=\"clustering\" type=\"switch\">\n\t\t\t{{ t('nextcloud-vue', 'Group nearby objects into clusters') }}\n\t\t</NcCheckboxRadioSwitch>\n\t</div>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcCheckboxRadioSwitch, NcSelect, NcTextField } from '@nextcloud/vue'\nimport CnFieldPicker from '../CnFieldPicker/CnFieldPicker.vue'\nimport CnRegisterSchemaSelect from '../CnRegisterSchemaSelect/CnRegisterSchemaSelect.vue'\nimport { BASEMAP_PRESETS, basemapFromPreset, presetOf } from '../CnMapWidget/basemapPresets.js'\n\n// The Netherlands, roughly — a sane default centre for a Dutch-government library.\n// autoFit is on by default, so this only shows before any object is plotted.\nconst DEFAULT_CENTRE = [52.13, 5.29]\n\n// Without a basemap the widget renders a grey box: CnMapWidget's `basemaps` prop is\n// opt-in and empty by default. The Nextcloud CSP already allows *.tile.openstreetmap.org.\nconst DEFAULT_BASEMAPS = [basemapFromPreset('osm')]\n\nconst DEFAULT_CONTENT = {\n\tregister: '',\n\tschema: '',\n\tcenter: DEFAULT_CENTRE,\n\tzoom: 7,\n\theight: '400px',\n\tpopupField: '',\n\tclustering: false,\n\tautoFit: true,\n\tbasemaps: DEFAULT_BASEMAPS,\n}\n\n/**\n * CnMapWidgetForm — configures the `map` dashboard widget.\n *\n * Emits `update:content` with the assembled content blob on every change.\n * `validate()` requires a register + schema: a map with no data source would render\n * an empty basemap, which looks broken rather than empty.\n *\n * @slot default No slots — the form is fully declarative.\n */\nexport default {\n\tname: 'CnMapWidgetForm',\n\n\tcomponents: { NcTextField, NcCheckboxRadioSwitch, NcSelect, CnRegisterSchemaSelect, CnFieldPicker },\n\n\tprops: {\n\t\t/**\n\t\t * The placement being edited (pre-fills every control from\n\t\t * `editingWidget.content`), or `null` in create mode.\n\t\t *\n\t\t * @type {{content: object}|null}\n\t\t */\n\t\teditingWidget: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Initial content values when not editing (registry defaults).\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tvalue: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({ ...DEFAULT_CONTENT }),\n\t\t},\n\t},\n\n\temits: [\n\t\t/**\n\t\t * Emitted with the assembled content blob on every field change.\n\t\t *\n\t\t * @event update:content\n\t\t * @type {object}\n\t\t */\n\t\t'update:content',\n\t],\n\n\tdata() {\n\t\tconst initial = this.editingWidget?.content || this.value || {}\n\t\tconst centre = Array.isArray(initial.center) && initial.center.length === 2\n\t\t\t? initial.center\n\t\t\t: DEFAULT_CENTRE\n\t\treturn {\n\t\t\tsource: {\n\t\t\t\tregister: initial.register ?? '',\n\t\t\t\tschema: initial.schema ?? '',\n\t\t\t},\n\n\t\t\tcenter: [Number(centre[0]), Number(centre[1])],\n\t\t\tzoom: Number.isFinite(initial.zoom) ? initial.zoom : 7,\n\t\t\theight: initial.height || '400px',\n\t\t\tpopupField: initial.popupField ?? '',\n\t\t\tgeoProperty: initial.markers?.geoProperty ?? '',\n\t\t\tclustering: initial.clustering === true,\n\t\t\tautoFit: initial.autoFit !== false,\n\t\t\tcenterMarker: initial.markers?.centerMarker === true,\n\t\t\t// Preserved verbatim unless a preset is chosen: dropping it on save would\n\t\t\t// turn the user's map into a grey box, and a custom base map has no preset.\n\t\t\tbasemaps: Array.isArray(initial.basemaps) && initial.basemaps.length\n\t\t\t\t? initial.basemaps\n\t\t\t\t: DEFAULT_BASEMAPS,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** The base map choices: the presets, plus the stored one when it is custom. */\n\t\tbasemapOptions() {\n\t\t\tconst presets = BASEMAP_PRESETS.map((preset) => ({ id: preset.id, label: preset.name }))\n\t\t\tif (presetOf(this.basemaps[0]) === null) {\n\t\t\t\treturn [{ id: 'custom', label: this.basemaps[0]?.name || t('nextcloud-vue', 'Custom base map') }, ...presets]\n\t\t\t}\n\t\t\treturn presets\n\t\t},\n\n\t\t/** The option of the first stored base map. */\n\t\tbasemapOption() {\n\t\t\tconst id = presetOf(this.basemaps[0]) ?? 'custom'\n\t\t\treturn this.basemapOptions.find((option) => option.id === id) ?? null\n\t\t},\n\n\t\t/** The assembled content blob from the current field values. */\n\t\tassembledContent() {\n\t\t\treturn {\n\t\t\t\tregister: this.source.register,\n\t\t\t\tschema: this.source.schema,\n\t\t\t\tcenter: this.center,\n\t\t\t\tzoom: this.zoom,\n\t\t\t\theight: this.height,\n\t\t\t\tpopupField: this.popupField,\n\t\t\t\tclustering: this.clustering,\n\t\t\t\tautoFit: this.autoFit,\n\t\t\t\tbasemaps: this.basemaps,\n\t\t\t\t// CnMapWidget reads its markers from here; `dataSource.{register, schema}`\n\t\t\t\t// is the shape its resolver understands.\n\t\t\t\tmarkers: {\n\t\t\t\t\tdataSource: { register: this.source.register, schema: this.source.schema },\n\t\t\t\t\tpopupField: this.popupField,\n\t\t\t\t\t...(this.geoProperty ? { geoProperty: this.geoProperty } : {}),\n\t\t\t\t\tclustering: this.clustering,\n\t\t\t\t\tcenterMarker: this.centerMarker,\n\t\t\t\t},\n\t\t\t}\n\t\t},\n\t},\n\n\twatch: {\n\t\tassembledContent: {\n\t\t\thandler(content) {\n\t\t\t\tthis.$emit('update:content', content)\n\t\t\t},\n\n\t\t\tdeep: true,\n\t\t\timmediate: true,\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * Update one half of the data source. Changing the register invalidates the\n\t\t * schema and the popup field, which belonged to the old schema.\n\t\t *\n\t\t * @param {'register'|'schema'} key Which half changed.\n\t\t * @param {string} value The new value.\n\t\t */\n\t\tupdateSource(key, value) {\n\t\t\tthis.source[key] = value\n\t\t\tif (key === 'register') {\n\t\t\t\tthis.source.schema = ''\n\t\t\t\tthis.popupField = ''\n\t\t\t\tthis.geoProperty = ''\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Store the chosen preset as the base map. Choosing the custom entry keeps\n\t\t * the stored base maps as they are.\n\t\t *\n\t\t * @param {{id: string}|null} option The chosen option.\n\t\t */\n\t\tonBasemap(option) {\n\t\t\tconst basemap = option && basemapFromPreset(option.id)\n\t\t\tif (basemap) {\n\t\t\t\tthis.basemaps = [basemap]\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Zoom is an integer clamped to the slider range; guards against a\n\t\t * non-numeric value or one outside the slider's `[1, 19]` range.\n\t\t *\n\t\t * @param {string} value The raw slider value.\n\t\t */\n\t\tonZoom(value) {\n\t\t\tconst n = Math.round(Number(value))\n\t\t\tif (!Number.isFinite(n)) {\n\t\t\t\tthis.zoom = 7\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.zoom = Math.min(19, Math.max(1, n))\n\t\t},\n\n\t\t/**\n\t\t * Update one coordinate of the centre, ignoring non-numeric input.\n\t\t *\n\t\t * @param {number} index 0 for latitude, 1 for longitude.\n\t\t * @param {string} value The raw input value.\n\t\t */\n\t\tonCentre(index, value) {\n\t\t\tconst n = Number(value)\n\t\t\tif (!Number.isFinite(n)) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.center[index] = n\n\t\t},\n\n\t\t/**\n\t\t * A map with no data source renders an empty basemap, which reads as broken\n\t\t * rather than empty — so require one.\n\t\t *\n\t\t * @return {boolean} Whether the form is valid.\n\t\t */\n\t\tvalidate() {\n\t\t\treturn Boolean(this.source.register && this.source.schema)\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-map-widget-form {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n}\n\n.cn-map-widget-form__row {\n\tdisplay: flex;\n\tgap: 8px;\n}\n\n.cn-map-widget-form__row > * {\n\tflex: 1;\n\tmin-width: 0;\n}\n\n.cn-map-widget-form__hint {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 90%;\n\tmargin: 0;\n}\n\n.cn-map-widget-form__field {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n}\n\n.cn-map-widget-form__range {\n\twidth: 100%;\n\t/* Native range inputs ship a default 2px margin on ALL sides. The left/right\n\t 2px pushes the width:100% track past the form and shows a phantom\n\t horizontal scrollbar; zeroing it also drops the top/bottom 2px, which was\n\t padding the form's height. */\n\tmargin: 0;\n}\n</style>\n"],"names":["_openBlock","_createElementBlock","_createBlock","_toDisplayString","_createVNode","_createElementVNode"],"mappings":";;AAmBM,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,oBAAS;;;AAuBsB,EAAA,KAAA,EAAA;;AAWlC,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,2BAAC;AACP,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,2BAAqB;;AAoB7B,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,yBAAqB;;;;;;;;;AAvD/B,EAAA,QAAAA,SAAA,EAAA,EAAAC,kBAAA,QAAA;;MAEC,QAAQ,EAAE,KAAA,CAAA,MAAM,CAAC,QAAI;MACrB,MAAM,EAAE,KAAA,CAAA,MAAM,CAAC,MAAM;MACrB,mBAAe,EAAA,MAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAA,MAAA,KAAC,QAAA,CAAA,YAAa,CAAA,UAAA,EAAA,MAAA,CAAA,CAAA,CAAA;;;AAIxB,IAAA,CAAA,KAAA,CAAA,MAAM,CAAC,QAAM,IAAA,KAAA,CAAA,MAAA,CAAA,MAAA;sBADnBC,WAAA;;AAEC,UAAA,KAAK,EAAE,KAAA,CAAA,UAAU;UACjB,QAAQ,EAAE,KAAA,CAAA,MAAM,CAAC,QAAI;UACrB,MAAM,EAAE,KAAA,CAAA,MAAM,CAAC,MAAM;AACrB,UAAA,KAAK,EAAE,QAAA,CAAA,CAAC,CAAA,eAAA,EAAA,aAAA,CAAA;;;;AAIP,IAAA,CAAA,KAAA,CAAA,MAAA,CAAA,QAAA,IAAA,KAAA,CAAA,MAAA,CAAA,MAAA;sBADFA,WAAA,CAMgC,wBAAA,EAAA;;;UAH/B,QAAM,EAAA,KAAA,CAAA,MAAA,CAAA,QAAA;UACN,MAAM,EAAE,KAAA,CAAA,MAAM,CAAC,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;AAClB,MAAA,WAAU,EAAC,OAAO;;;AAGlB,IAAAC,kBAAA,QAAA;;QAEC,UAAU,EAAE,MAAM,CAAC,KAAA,CAAA,MAAK,CAAA,CAAA,CAAA,CAAA;AACzB,QAAA,IAAI,EAAC,QAAQ;AACZ,QAAA,KAAK,EAAE,QAAA,CAAA,CAAC,CAAA,eAAA,EAAA,iBAAA,CAAA;AACR,QAAA,YAAE,EAAA,IAAA;;;MAGJD,WAAA,CAKsB,sBAAA,EAAA;QAJpB,UAAU,EAAE,MAAM,CAAC,KAAA,CAAA,MAAC,CAAA,CAAA,CAAA,CAAA;;AAEpB,QAAA,KAAK,EAAE,QAAA,CAAA,CAAC,CAAA,eAAA,EAAA,kBAAA,CAAA;AACT,QAAA,YAAa,EAAE,IAAI;QAClB,qBAAiB,EAAA,MAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAA,MAAA,KAAE,QAAA,CAAA,QAAC,CAAA,CAAA,EAAA,MAAA,CAAA,CAAA;;;gBAKnB,gCAAA,EAAA;kBAF4B,KAAA,CAAA,YAAW;mEAAX,KAAA,CAAA,YAAW,IAAA,MAAA,CAAA,CAAA;AAAG,MAAA,IAAI,EAAC;;uBAClD,MAAsB;wCAAnB,QAAA,CAAA,CAAC,CAAA,eAAA,EAAA,6BAAA,CAAA,CAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -3071,7 +3071,11 @@ var translations = {
3071
3071
  "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.",
3072
3072
  "A Code 128 code takes letters, digits and plain punctuation only.": "Een Code 128-code neemt alleen letters, cijfers en gewone leestekens.",
3073
3073
  "Started. It finishes in the background.": "Gestart. Het wordt op de achtergrond afgerond.",
3074
- "At most {max} rows.": "Hoogstens {max} rijen."
3074
+ "At most {max} rows.": "Hoogstens {max} rijen.",
3075
+ "Location field": "Locatieveld",
3076
+ "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.",
3077
+ "Custom base map": "Eigen achtergrondkaart",
3078
+ "Base map": "Achtergrondkaart"
3075
3079
  };
3076
3080
  var plurals = {
3077
3081
  "{count} member": [
@@ -1 +1 @@
1
- {"version":3,"file":"nl.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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