@octostar/map-component 0.9.1 → 0.10.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/README.md +37 -43
- package/dist/de-CiibAOpt.js +584 -0
- package/dist/de-CiibAOpt.js.map +1 -0
- package/dist/es-D8jViCNt.js +584 -0
- package/dist/es-D8jViCNt.js.map +1 -0
- package/dist/fr-ftr3hxY2.js +584 -0
- package/dist/fr-ftr3hxY2.js.map +1 -0
- package/dist/index.mjs +996 -638
- package/dist/index.mjs.map +1 -1
- package/dist/it-JiSfNdMa.js +584 -0
- package/dist/it-JiSfNdMa.js.map +1 -0
- package/dist/pt-BR-DfnZxiOD.js +584 -0
- package/dist/pt-BR-DfnZxiOD.js.map +1 -0
- package/dist/pt-PT-Cvl_rDbf.js +584 -0
- package/dist/pt-PT-Cvl_rDbf.js.map +1 -0
- package/dist/types/components/cluster-pie-chart.d.ts.map +1 -1
- package/dist/types/components/layers-panel.d.ts.map +1 -1
- package/dist/types/components/map-editor-canvas.d.ts.map +1 -1
- package/dist/types/components/properties-panel.d.ts.map +1 -1
- package/dist/types/components/timebar.d.ts +1 -2
- package/dist/types/components/timebar.d.ts.map +1 -1
- package/dist/types/i18n/icuContext.d.ts +10 -0
- package/dist/types/i18n/icuContext.d.ts.map +1 -0
- package/dist/types/i18n/index.d.ts +17 -0
- package/dist/types/i18n/index.d.ts.map +1 -0
- package/dist/types/i18n/locale.d.ts +12 -0
- package/dist/types/i18n/locale.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/lib/feature-cap.d.ts +3 -24
- package/dist/types/lib/feature-cap.d.ts.map +1 -1
- package/dist/types/lib/ingest-pipeline.d.ts.map +1 -1
- package/dist/types/lib/labels/icon-labels.d.ts +33 -0
- package/dist/types/lib/labels/icon-labels.d.ts.map +1 -0
- package/dist/types/lib/labels/message-labels.d.ts +112 -0
- package/dist/types/lib/labels/message-labels.d.ts.map +1 -0
- package/dist/types/lib/labels/panel-labels.d.ts +328 -0
- package/dist/types/lib/labels/panel-labels.d.ts.map +1 -0
- package/dist/types/lib/map-editor-api.d.ts +6 -8
- package/dist/types/lib/map-editor-api.d.ts.map +1 -1
- package/dist/types/lib/map-labels.d.ts +602 -609
- package/dist/types/lib/map-labels.d.ts.map +1 -1
- package/package.json +15 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useContext, createContext, useRef, useLayoutEffect, useState,
|
|
2
|
+
import { useSyncExternalStore, useEffect, useContext, createContext, useRef, useLayoutEffect, useState, useCallback, useMemo, forwardRef, useImperativeHandle } from "react";
|
|
3
3
|
import * as maplibregl from "maplibre-gl";
|
|
4
4
|
import { getWorkerUrl, getVersion, setWorkerUrl } from "maplibre-gl";
|
|
5
5
|
import MapboxDraw from "@mapbox/mapbox-gl-draw";
|
|
@@ -7,6 +7,8 @@ import * as turf from "@turf/turf";
|
|
|
7
7
|
import { distance as distance$1, point } from "@turf/turf";
|
|
8
8
|
import * as THREE from "three";
|
|
9
9
|
import proj4 from "proj4";
|
|
10
|
+
import i18next from "i18next";
|
|
11
|
+
import ICU from "i18next-icu";
|
|
10
12
|
import { Button, Modal, Input, App, message, ConfigProvider, Tooltip, Dropdown, Divider, Popover, Slider, Switch, Segmented, Select, Tag, DatePicker, Collapse, ColorPicker, Tabs, Card, Table } from "antd";
|
|
11
13
|
import { clsx } from "clsx";
|
|
12
14
|
import { twMerge } from "tailwind-merge";
|
|
@@ -144,7 +146,7 @@ async function featureCollectionBlobPartsAsync(collection, options) {
|
|
|
144
146
|
(_c = options == null ? void 0 : options.onProgress) == null ? void 0 : _c.call(options, total, total);
|
|
145
147
|
return coalescer.finish();
|
|
146
148
|
}
|
|
147
|
-
const ingestWorkerSource = '"use strict";(()=>{function b(e,t){let n=e.length,r=Math.max(0,t.max-(t.existing??0));return n<=r?{features:e,dropped:0,sourceCount:n}:{features:e.slice(0,r),dropped:n-r,sourceCount:n}}function S(e){let t=e.crs?.properties?.name,n=null;if(t){let r=t.match(/EPSG::?(\\d+)/i);r&&(n=`EPSG:${r[1]}`)}if(!n&&e.features.length>0){let r=E(e.features[0].geometry);if(r){let[s,a]=r;if(Math.abs(s)<=180&&Math.abs(a)<=90)return{sourceCRS:"EPSG:4326",needsReprojection:!1}}return{sourceCRS:null,needsReprojection:!1}}return{sourceCRS:n,needsReprojection:n!==null&&n!=="EPSG:4326"}}function E(e){if(!e)return null;switch(e.type){case"Point":return e.coordinates;case"MultiPoint":case"LineString":return e.coordinates[0];case"MultiLineString":case"Polygon":return e.coordinates[0]?.[0];case"MultiPolygon":return e.coordinates[0]?.[0]?.[0];default:return null}}function I(e){return e.geometry?.type==="LineString"?e.geometry.coordinates.some(n=>n.length>=3&&n[2]!==0):e.geometry?.type==="MultiLineString"?e.geometry.coordinates.some(n=>n.some(r=>r.length>=3&&r[2]!==0)):!1}function d(e){if(!e)return null;if(e instanceof Date)return e;if(typeof e=="string"||typeof e=="number"){let t=new Date(e);return isNaN(t.getTime())?null:t}return null}function h(e){return!!(e.startDate||e.startdate||e.start_date||e.start_time||e.date||e.timestamp||e.flightDate||e.time||e.datetime||e.endDate||e.enddate||e.end_date||e.end_time)}function
|
|
149
|
+
const ingestWorkerSource = '"use strict";(()=>{function b(e,t){let n=e.length,r=Math.max(0,t.max-(t.existing??0));return n<=r?{features:e,dropped:0,sourceCount:n}:{features:e.slice(0,r),dropped:n-r,sourceCount:n}}function S(e){let t=e.crs?.properties?.name,n=null;if(t){let r=t.match(/EPSG::?(\\d+)/i);r&&(n=`EPSG:${r[1]}`)}if(!n&&e.features.length>0){let r=E(e.features[0].geometry);if(r){let[s,a]=r;if(Math.abs(s)<=180&&Math.abs(a)<=90)return{sourceCRS:"EPSG:4326",needsReprojection:!1}}return{sourceCRS:null,needsReprojection:!1}}return{sourceCRS:n,needsReprojection:n!==null&&n!=="EPSG:4326"}}function E(e){if(!e)return null;switch(e.type){case"Point":return e.coordinates;case"MultiPoint":case"LineString":return e.coordinates[0];case"MultiLineString":case"Polygon":return e.coordinates[0]?.[0];case"MultiPolygon":return e.coordinates[0]?.[0]?.[0];default:return null}}function I(e){return e.geometry?.type==="LineString"?e.geometry.coordinates.some(n=>n.length>=3&&n[2]!==0):e.geometry?.type==="MultiLineString"?e.geometry.coordinates.some(n=>n.some(r=>r.length>=3&&r[2]!==0)):!1}function d(e){if(!e)return null;if(e instanceof Date)return e;if(typeof e=="string"||typeof e=="number"){let t=new Date(e);return isNaN(t.getTime())?null:t}return null}function h(e){return!!(e.startDate||e.startdate||e.start_date||e.start_time||e.date||e.timestamp||e.flightDate||e.time||e.datetime||e.endDate||e.enddate||e.end_date||e.end_time)}function x(e){let t=d(e.startDate)||d(e.startdate)||d(e.start_date)||d(e.start_time)||d(e.date)||d(e.timestamp)||d(e.flightDate)||d(e.time)||d(e.datetime),n=d(e.endDate)||d(e.enddate)||d(e.end_date)||d(e.end_time);return t&&n&&n<t&&([t,n]=[n,t]),{startDate:t,endDate:n}}function F(e){return"kind"in e&&e.kind==="ack"}function w(){let e=globalThis.crypto?.randomUUID?.bind(globalThis.crypto);return e?e():`f-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}function G(e,t,n){switch(n.idStrategy){case"preserve":return e.id;case"layer-index":return e.id!==void 0&&e.id!==null?String(e.id):`${n.layerId}-f${t}`;case"uuid-fallback":return e.id?String(e.id):w()}}function C(e,t){if(Array.isArray(e)){if(typeof e[0]=="number"){let n=e[0],r=e[1];t[0]=Math.min(t[0],n),t[1]=Math.min(t[1],r),t[2]=Math.max(t[2],n),t[3]=Math.max(t[3],r);return}for(let n of e)C(n,t)}}function R(e,t){if(e){if(e.type==="GeometryCollection"){for(let n of e.geometries)R(n,t);return}C(e.coordinates,t)}}function M(e){let t=[1/0,1/0,-1/0,-1/0];for(let n of e)R(n.geometry,t);return t.every(n=>isFinite(n))?t:null}function N(e,t){let n;if(e.type==="text")try{n=JSON.parse(e.text)}catch(c){return{kind:"error",code:"parse-error",message:c instanceof Error?c.message:"Invalid file"}}else n=e.data;if(n&&n.type==="Feature"&&(n={type:"FeatureCollection",features:[n]}),!n||n.type!=="FeatureCollection"||!Array.isArray(n.features))return{kind:"error",code:"invalid-format",message:"Invalid GeoJSON format"};if(t.emptyIsError&&n.features.length===0)return{kind:"error",code:"empty",message:"The file contains no features"};if(n["octostar:map"])return{kind:"enriched",data:n};let{sourceCRS:r,needsReprojection:s}=S(n),a=b(n.features,{max:t.maxFeatures??1/0}),o=!1,u=!1,i=[];a.features.forEach((c,A)=>{let p=G(c,A,t);!u&&I(c)&&(u=!0);let g=c.properties||{};if(!h(g)){i.push(t.idStrategy==="preserve"?c:{...c,id:p});return}let{startDate:y,endDate:k}=x(g);(y||k)&&(o=!0),i.push({...c,...p!==void 0&&{id:p},properties:{...g,startDate:y?.toISOString()||null,endDate:k?.toISOString()||null}})});let m=n.properties?.layerMetadata;return{kind:"features",features:i,featureCount:i.length,bbox:M(i),hasTemporal:o,hasAltitude:u,reprojected:!1,sourceCRS:r,...s&&{needsReprojection:s},...m&&{layerMetadata:m},...a.dropped>0&&{truncated:{droppedCount:a.dropped,sourceFeatureCount:a.sourceCount,maxFeatures:t.maxFeatures}}}}var O=5e3;function _(e,t){let n=Number.isNaN(t)?O:Math.max(1,Math.floor(t)),r=[];for(let s=0;s<e.length;s+=n)r.push(e.slice(s,s+n));return r}function f(e){if(e===void 0)return!1;if(typeof e=="number")return Number.isFinite(e)&&!Object.is(e,-0);if(e===null||typeof e!="object")return!0;if(Array.isArray(e)){for(let t=0;t<e.length;t++)if(!f(e[t]))return!1;return!0}for(let t in e)if(!f(e[t]))return!1;return!0}function J(e){for(let t=0;t<e.length;t++)if(!f(e[t]))return e;try{return JSON.stringify(e)}catch{return e}}function P(e){let{kind:t,features:n,...r}=e;return r}async function T(e,t,n,r){let s;try{s=N(t,n)}catch(a){r.post({kind:"result",id:e,ok:!1,error:a instanceof Error?a.message:String(a)});return}if(s.kind!=="features"){r.post({kind:"result",id:e,ok:!0,result:s});return}try{let a=r.encode??J,o=_(s.features,r.chunkSize??O);r.post({kind:"head",id:e,summary:P(s)});let u=o.length>0?a(o[0]):null;for(let i=0;i<o.length;i++){let m=r.waitAck(i);r.post({kind:"chunk",id:e,seq:i,payload:u}),u=i+1<o.length?a(o[i+1]):null,await m}r.post({kind:"done",id:e,chunkCount:o.length})}catch(a){r.post({kind:"error",id:e,message:a instanceof Error?a.message:String(a)})}}var D=e=>self.postMessage(e),l=new Map;self.onmessage=async e=>{let t=e.data;if(F(t)){let o=`${t.id}:${t.seq}`,u=l.get(o);l.delete(o),u?.();return}let{id:n,source:r,options:s,tuning:a}=t;try{let o=r.type==="blob"?{type:"text",text:await r.blob.text()}:r;await T(n,o,s,{post:D,waitAck:u=>new Promise(i=>{l.set(`${n}:${u}`,i)}),...a?.chunkSize!==void 0&&{chunkSize:a.chunkSize},...a?.featureArrayChunks&&{encode:u=>u}})}catch(o){D({kind:"result",id:n,ok:!1,error:o instanceof Error?o.message:String(o)})}finally{l.forEach((o,u)=>{u.startsWith(`${n}:`)&&l.delete(u)})}};})();\n';
|
|
148
150
|
proj4.defs("EPSG:27700", "+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +towgs84=446.448,-125.157,542.06,0.15,0.247,0.842,-20.489 +units=m +no_defs");
|
|
149
151
|
proj4.defs("EPSG:3857", "+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs");
|
|
150
152
|
proj4.defs("EPSG:32630", "+proj=utm +zone=30 +datum=WGS84 +units=m +no_defs");
|
|
@@ -217,17 +219,7 @@ function truncationToCapInfo(truncation, rest) {
|
|
|
217
219
|
max: truncation.maxFeatures
|
|
218
220
|
};
|
|
219
221
|
}
|
|
220
|
-
function
|
|
221
|
-
return value.toLocaleString("en-US");
|
|
222
|
-
}
|
|
223
|
-
const DEFAULT_FEATURE_CAP_LABELS = {
|
|
224
|
-
title: "Feature limit reached",
|
|
225
|
-
layersOverLimit: ({ layerCount, max, dropped }) => `${formatCount(layerCount)} layers were larger than the ${formatCount(max)}-feature limit; ${formatCount(dropped)} features in total were not loaded.`,
|
|
226
|
-
layerAlreadyHeld: ({ layerName, existing, max, kept, dropped }) => `"${layerName}" already held ${formatCount(existing)} of its ${formatCount(max)}-feature limit, so only ${formatCount(kept)} more were added; ${formatCount(dropped)} were skipped.`,
|
|
227
|
-
firstFeaturesAdded: ({ kept, sourceCount, layerName, dropped }) => `Only the first ${formatCount(kept)} of ${formatCount(sourceCount)} features were added to "${layerName}"; ${formatCount(dropped)} were skipped (per-layer limit).`,
|
|
228
|
-
restoreNote: "Re-saving this map will persist only the loaded features."
|
|
229
|
-
};
|
|
230
|
-
function formatFeatureCapToast(info, labels = DEFAULT_FEATURE_CAP_LABELS) {
|
|
222
|
+
function formatFeatureCapToast(info, labels) {
|
|
231
223
|
const isRestore = info.source === "restore";
|
|
232
224
|
const variant = isRestore ? "destructive" : "default";
|
|
233
225
|
const withNote = (text) => isRestore ? `${text} ${labels.restoreNote}` : text;
|
|
@@ -352,6 +344,7 @@ function runIngestPipeline(source, options) {
|
|
|
352
344
|
return {
|
|
353
345
|
kind: "error",
|
|
354
346
|
code: "parse-error",
|
|
347
|
+
// eslint-disable-next-line i18next/no-literal-string -- the code picks the user's text (labels.ingest); this is for logs
|
|
355
348
|
message: err instanceof Error ? err.message : "Invalid file"
|
|
356
349
|
};
|
|
357
350
|
}
|
|
@@ -743,13 +736,13 @@ function getSharedIngestClient() {
|
|
|
743
736
|
}
|
|
744
737
|
function createIngestProgressStore() {
|
|
745
738
|
const entries = /* @__PURE__ */ new Map();
|
|
746
|
-
const
|
|
739
|
+
const listeners2 = /* @__PURE__ */ new Set();
|
|
747
740
|
let nextId = 0;
|
|
748
741
|
let snapshot = [];
|
|
749
742
|
let dirty = false;
|
|
750
743
|
const notify = () => {
|
|
751
744
|
dirty = true;
|
|
752
|
-
|
|
745
|
+
listeners2.forEach((listener) => listener());
|
|
753
746
|
};
|
|
754
747
|
return {
|
|
755
748
|
begin(label, options) {
|
|
@@ -775,8 +768,8 @@ function createIngestProgressStore() {
|
|
|
775
768
|
};
|
|
776
769
|
},
|
|
777
770
|
subscribe(listener) {
|
|
778
|
-
|
|
779
|
-
return () =>
|
|
771
|
+
listeners2.add(listener);
|
|
772
|
+
return () => listeners2.delete(listener);
|
|
780
773
|
},
|
|
781
774
|
getSnapshot() {
|
|
782
775
|
if (dirty) {
|
|
@@ -800,6 +793,794 @@ function installInlinedMaplibreWorker() {
|
|
|
800
793
|
}
|
|
801
794
|
setWorkerUrl(URL.createObjectURL(new Blob([maplibreWorkerSource], { type: "text/javascript" })));
|
|
802
795
|
}
|
|
796
|
+
const CONTEXT_SEPARATOR = "_";
|
|
797
|
+
const parentParse = ICU.prototype.parse;
|
|
798
|
+
const contextSuffix = (options) => typeof (options == null ? void 0 : options.context) === "string" && options.context !== "" ? `${CONTEXT_SEPARATOR}${options.context}` : "";
|
|
799
|
+
class ICUWithContext extends ICU {
|
|
800
|
+
// Upstream returns finalKeys untouched, so there is nothing to delegate to.
|
|
801
|
+
// i18next pops finalKeys, so the appended (more specific) key wins and the
|
|
802
|
+
// base key remains the fallback.
|
|
803
|
+
addLookupKeys(finalKeys, key, _code, _ns, options) {
|
|
804
|
+
const suffix = contextSuffix(options);
|
|
805
|
+
if (suffix) finalKeys.push(`${key}${suffix}`);
|
|
806
|
+
return finalKeys;
|
|
807
|
+
}
|
|
808
|
+
// `key` only feeds the memo key upstream, so qualifying it keeps the
|
|
809
|
+
// contextual and plain messages in separate cache slots.
|
|
810
|
+
parse(res, options, lng, ns, key, info) {
|
|
811
|
+
return parentParse.call(this, res, options, lng, ns, `${key}${contextSuffix(options)}`, info);
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
const SUPPORTED_LANGUAGES = ["en", "it", "fr", "de", "es", "pt-BR", "pt-PT"];
|
|
815
|
+
const DEFAULT_LANGUAGE = "en";
|
|
816
|
+
const DEFAULT_VARIANTS = /* @__PURE__ */ new Map([["pt", "pt-BR"]]);
|
|
817
|
+
function languageOf(locale) {
|
|
818
|
+
var _a;
|
|
819
|
+
let parsed;
|
|
820
|
+
try {
|
|
821
|
+
parsed = new Intl.Locale(locale.trim().replace(/_/g, "-"));
|
|
822
|
+
} catch {
|
|
823
|
+
return null;
|
|
824
|
+
}
|
|
825
|
+
const base = parsed.language.toLowerCase();
|
|
826
|
+
const region = (_a = parsed.region) == null ? void 0 : _a.toLowerCase();
|
|
827
|
+
const shipped = (code) => SUPPORTED_LANGUAGES.find((language) => language.toLowerCase() === code);
|
|
828
|
+
return (region ? shipped(`${base}-${region}`) : void 0) ?? DEFAULT_VARIANTS.get(base) ?? shipped(base) ?? null;
|
|
829
|
+
}
|
|
830
|
+
function canonicalTag(tag) {
|
|
831
|
+
try {
|
|
832
|
+
return Intl.getCanonicalLocales(tag.trim().replace(/_/g, "-"))[0] ?? null;
|
|
833
|
+
} catch {
|
|
834
|
+
return null;
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
function resolveMapLocale(language) {
|
|
838
|
+
const pageTag = typeof document === "undefined" ? "" : document.documentElement.lang;
|
|
839
|
+
for (const tag of [language, pageTag]) {
|
|
840
|
+
const canonical = tag ? canonicalTag(tag) : null;
|
|
841
|
+
if (canonical && languageOf(canonical)) return canonical;
|
|
842
|
+
}
|
|
843
|
+
return DEFAULT_LANGUAGE;
|
|
844
|
+
}
|
|
845
|
+
const instance = i18next.createInstance();
|
|
846
|
+
void instance.use(ICUWithContext).init({
|
|
847
|
+
lng: DEFAULT_LANGUAGE,
|
|
848
|
+
fallbackLng: (code) => [languageOf(code) ?? DEFAULT_LANGUAGE, DEFAULT_LANGUAGE],
|
|
849
|
+
resources: { en: { translation: {} } },
|
|
850
|
+
partialBundledLanguages: true,
|
|
851
|
+
nsSeparator: false,
|
|
852
|
+
keySeparator: false,
|
|
853
|
+
returnNull: false,
|
|
854
|
+
initAsync: false,
|
|
855
|
+
// English is a missing-key fallthrough: without this ICU re-parses the
|
|
856
|
+
// message on every call of a plural label (counts in the status bar).
|
|
857
|
+
i18nFormat: { memoizeFallback: true },
|
|
858
|
+
interpolation: { escapeValue: false }
|
|
859
|
+
});
|
|
860
|
+
const CATALOGS = {
|
|
861
|
+
it: () => import("./it-JiSfNdMa.js"),
|
|
862
|
+
fr: () => import("./fr-ftr3hxY2.js"),
|
|
863
|
+
de: () => import("./de-CiibAOpt.js"),
|
|
864
|
+
es: () => import("./es-D8jViCNt.js"),
|
|
865
|
+
"pt-BR": () => import("./pt-BR-DfnZxiOD.js"),
|
|
866
|
+
"pt-PT": () => import("./pt-PT-Cvl_rDbf.js")
|
|
867
|
+
};
|
|
868
|
+
const loaded = /* @__PURE__ */ new Set([DEFAULT_LANGUAGE]);
|
|
869
|
+
const loading = /* @__PURE__ */ new Map();
|
|
870
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
871
|
+
const isMapLocaleReady = (locale) => loaded.has(languageOf(locale) ?? DEFAULT_LANGUAGE);
|
|
872
|
+
function loadMapLanguage(language) {
|
|
873
|
+
if (language === "en" || loaded.has(language)) return Promise.resolve();
|
|
874
|
+
const inFlight = loading.get(language);
|
|
875
|
+
if (inFlight) return inFlight;
|
|
876
|
+
const load = CATALOGS[language]().then((catalog) => {
|
|
877
|
+
instance.addResourceBundle(language, "translation", catalog.default, true, true);
|
|
878
|
+
loaded.add(language);
|
|
879
|
+
listeners.forEach((notify) => notify());
|
|
880
|
+
}).catch((error) => {
|
|
881
|
+
console.warn(`[map] the ${language} catalog did not load; showing English`, error);
|
|
882
|
+
}).finally(() => loading.delete(language));
|
|
883
|
+
loading.set(language, load);
|
|
884
|
+
return load;
|
|
885
|
+
}
|
|
886
|
+
const subscribe = (notify) => {
|
|
887
|
+
listeners.add(notify);
|
|
888
|
+
return () => listeners.delete(notify);
|
|
889
|
+
};
|
|
890
|
+
function useMapLocale(language) {
|
|
891
|
+
const wanted = resolveMapLocale(language);
|
|
892
|
+
const ready = useSyncExternalStore(subscribe, () => isMapLocaleReady(wanted), () => languageOf(wanted) === "en");
|
|
893
|
+
useEffect(() => {
|
|
894
|
+
if (!ready) void loadMapLanguage(languageOf(wanted) ?? DEFAULT_LANGUAGE);
|
|
895
|
+
}, [wanted, ready]);
|
|
896
|
+
return ready ? wanted : DEFAULT_LANGUAGE;
|
|
897
|
+
}
|
|
898
|
+
const translators = /* @__PURE__ */ new Map();
|
|
899
|
+
function translatorFor(locale) {
|
|
900
|
+
let translate = translators.get(locale);
|
|
901
|
+
if (!translate) {
|
|
902
|
+
const fixed = instance.getFixedT(locale);
|
|
903
|
+
translate = (key, options) => String(fixed(key, options));
|
|
904
|
+
translators.set(locale, translate);
|
|
905
|
+
}
|
|
906
|
+
return translate;
|
|
907
|
+
}
|
|
908
|
+
if (typeof document !== "undefined") void loadMapLanguage(languageOf(resolveMapLocale()) ?? DEFAULT_LANGUAGE);
|
|
909
|
+
const iconPickerLabels = (t) => ({
|
|
910
|
+
title: t("Select Icon"),
|
|
911
|
+
searchPlaceholder: t("Search icons..."),
|
|
912
|
+
allCategories: (count) => t("All ({count})", { count }),
|
|
913
|
+
categoryWithCount: ({ category, count }) => `${category} (${count})`,
|
|
914
|
+
noIconsFound: (query) => t('No icons found for "{query}"', { query }),
|
|
915
|
+
noIconSelected: t("No icon selected"),
|
|
916
|
+
clearIcon: t("Clear", { context: "remove the selected icon" }),
|
|
917
|
+
cancel: t("Cancel"),
|
|
918
|
+
emptyTrigger: t("icon", { context: "empty icon picker button" }),
|
|
919
|
+
anyEmojiHint: t("Any other emoji works too: type or paste it in the search"),
|
|
920
|
+
useEmoji: (emoji) => t("Use {emoji}", { emoji }),
|
|
921
|
+
emojiNotEverywhere: t("This emoji may not show on every computer: pick another"),
|
|
922
|
+
customEmoji: t("Emoji", { context: "icon picker, an icon outside the catalog" }),
|
|
923
|
+
emojiGroups: {
|
|
924
|
+
smileys: t("Smileys", { context: "emoji tab" }),
|
|
925
|
+
people: t("People", { context: "emoji tab" }),
|
|
926
|
+
nature: t("Animals & nature", { context: "emoji tab" }),
|
|
927
|
+
food: t("Food & drink", { context: "emoji tab" }),
|
|
928
|
+
travel: t("Travel & places", { context: "emoji tab" }),
|
|
929
|
+
activities: t("Activities", { context: "emoji tab" }),
|
|
930
|
+
objects: t("Objects", { context: "emoji tab" }),
|
|
931
|
+
symbols: t("Symbols", { context: "emoji tab" })
|
|
932
|
+
}
|
|
933
|
+
});
|
|
934
|
+
const iconCategoryLabels = (t) => ({
|
|
935
|
+
places: t("Places", { context: "icon type" }),
|
|
936
|
+
transport: t("Transport", { context: "icon type" }),
|
|
937
|
+
food: t("Food", { context: "icon type" }),
|
|
938
|
+
nature: t("Nature", { context: "icon type" }),
|
|
939
|
+
symbols: t("Symbols", { context: "icon type" }),
|
|
940
|
+
activities: t("Activities", { context: "icon type" }),
|
|
941
|
+
work: t("Work", { context: "icon type" }),
|
|
942
|
+
shopping: t("Shopping", { context: "icon type" }),
|
|
943
|
+
communication: t("Communication", { context: "icon type" }),
|
|
944
|
+
people: t("People", { context: "icon type" }),
|
|
945
|
+
maritime: t("Maritime", { context: "icon type" }),
|
|
946
|
+
security: t("Security", { context: "icon type" }),
|
|
947
|
+
time: t("Time", { context: "icon type" }),
|
|
948
|
+
shapes: t("Shapes", { context: "icon type" }),
|
|
949
|
+
arrows: t("Arrows", { context: "icon type" })
|
|
950
|
+
});
|
|
951
|
+
const placeIconNames = (t) => ({
|
|
952
|
+
"map-pin": t("Map Pin", { context: "map icon" }),
|
|
953
|
+
home: t("Home", { context: "map icon" }),
|
|
954
|
+
building: t("Building", { context: "map icon" }),
|
|
955
|
+
store: t("Store", { context: "map icon" }),
|
|
956
|
+
factory: t("Factory", { context: "map icon" }),
|
|
957
|
+
construction: t("Construction", { context: "map icon" }),
|
|
958
|
+
church: t("Church", { context: "map icon" }),
|
|
959
|
+
hospital: t("Hospital", { context: "map icon" }),
|
|
960
|
+
school: t("School", { context: "map icon" }),
|
|
961
|
+
graduation: t("University", { context: "map icon" }),
|
|
962
|
+
library: t("Library", { context: "map icon" }),
|
|
963
|
+
landmark: t("Landmark", { context: "map icon" }),
|
|
964
|
+
castle: t("Castle", { context: "map icon" }),
|
|
965
|
+
mosque: t("Mosque", { context: "map icon" }),
|
|
966
|
+
stadium: t("Stadium", { context: "map icon" }),
|
|
967
|
+
tent: t("Camping", { context: "map icon" }),
|
|
968
|
+
car: t("Car", { context: "map icon" }),
|
|
969
|
+
bus: t("Bus", { context: "map icon" }),
|
|
970
|
+
train: t("Train", { context: "map icon" }),
|
|
971
|
+
plane: t("Plane", { context: "map icon" }),
|
|
972
|
+
ship: t("Ship", { context: "map icon" }),
|
|
973
|
+
bike: t("Bike", { context: "map icon" }),
|
|
974
|
+
fuel: t("Gas Station", { context: "map icon" }),
|
|
975
|
+
helicopter: t("Helicopter", { context: "map icon" }),
|
|
976
|
+
rocket: t("Rocket", { context: "map icon" }),
|
|
977
|
+
motorcycle: t("Motorcycle", { context: "map icon" }),
|
|
978
|
+
taxi: t("Taxi", { context: "map icon" }),
|
|
979
|
+
truck: t("Truck", { context: "map icon" }),
|
|
980
|
+
utensils: t("Restaurant", { context: "map icon" }),
|
|
981
|
+
coffee: t("Coffee", { context: "map icon" }),
|
|
982
|
+
beer: t("Bar", { context: "map icon" }),
|
|
983
|
+
wine: t("Wine", { context: "map icon" }),
|
|
984
|
+
pizza: t("Pizza", { context: "map icon" }),
|
|
985
|
+
"ice-cream": t("Ice Cream", { context: "map icon" }),
|
|
986
|
+
apple: t("Apple", { context: "map icon" }),
|
|
987
|
+
cake: t("Cake", { context: "map icon" }),
|
|
988
|
+
hamburger: t("Burger", { context: "map icon" })
|
|
989
|
+
});
|
|
990
|
+
const natureIconNames = (t) => ({
|
|
991
|
+
trees: t("Forest", { context: "map icon" }),
|
|
992
|
+
mountain: t("Mountain", { context: "map icon" }),
|
|
993
|
+
waves: t("Water", { context: "map icon" }),
|
|
994
|
+
sun: t("Sun", { context: "map icon" }),
|
|
995
|
+
cloud: t("Cloud", { context: "map icon" }),
|
|
996
|
+
umbrella: t("Umbrella", { context: "map icon" }),
|
|
997
|
+
flower: t("Flower", { context: "map icon" }),
|
|
998
|
+
leaf: t("Leaf", { context: "map icon" }),
|
|
999
|
+
rainbow: t("Rainbow", { context: "map icon" }),
|
|
1000
|
+
snowflake: t("Snow", { context: "map icon" }),
|
|
1001
|
+
fire: t("Fire", { context: "map icon" }),
|
|
1002
|
+
volcano: t("Volcano", { context: "map icon" }),
|
|
1003
|
+
heart: t("Heart", { context: "map icon" }),
|
|
1004
|
+
star: t("Star", { context: "map icon" }),
|
|
1005
|
+
flag: t("Flag", { context: "map icon" }),
|
|
1006
|
+
alert: t("Warning", { context: "map icon" }),
|
|
1007
|
+
info: t("Info", { context: "map icon" }),
|
|
1008
|
+
check: t("Check", { context: "map icon" }),
|
|
1009
|
+
"x-mark": t("X", { context: "map icon" }),
|
|
1010
|
+
zap: t("Zap", { context: "map icon" }),
|
|
1011
|
+
bell: t("Bell", { context: "map icon" }),
|
|
1012
|
+
peace: t("Peace", { context: "map icon" }),
|
|
1013
|
+
recycle: t("Recycle", { context: "map icon" }),
|
|
1014
|
+
radioactive: t("Radioactive", { context: "map icon" }),
|
|
1015
|
+
biohazard: t("Biohazard", { context: "map icon" }),
|
|
1016
|
+
camera: t("Camera", { context: "map icon" }),
|
|
1017
|
+
music: t("Music", { context: "map icon" }),
|
|
1018
|
+
film: t("Cinema", { context: "map icon" }),
|
|
1019
|
+
gamepad: t("Gaming", { context: "map icon" }),
|
|
1020
|
+
trophy: t("Trophy", { context: "map icon" }),
|
|
1021
|
+
medal: t("Medal", { context: "map icon" }),
|
|
1022
|
+
sports: t("Sports", { context: "map icon" }),
|
|
1023
|
+
basketball: t("Basketball", { context: "map icon" }),
|
|
1024
|
+
fishing: t("Fishing", { context: "map icon" }),
|
|
1025
|
+
art: t("Art", { context: "map icon" })
|
|
1026
|
+
});
|
|
1027
|
+
const everydayIconNames = (t) => ({
|
|
1028
|
+
briefcase: t("Office", { context: "map icon" }),
|
|
1029
|
+
wrench: t("Repair", { context: "map icon" }),
|
|
1030
|
+
hammer: t("Construction", { context: "map icon" }),
|
|
1031
|
+
gear: t("Settings", { context: "map icon" }),
|
|
1032
|
+
microscope: t("Science", { context: "map icon" }),
|
|
1033
|
+
"test-tube": t("Lab", { context: "map icon" }),
|
|
1034
|
+
computer: t("Computer", { context: "map icon" }),
|
|
1035
|
+
cart: t("Shopping", { context: "map icon" }),
|
|
1036
|
+
gift: t("Gift", { context: "map icon" }),
|
|
1037
|
+
package: t("Package", { context: "map icon" }),
|
|
1038
|
+
money: t("Money", { context: "map icon" }),
|
|
1039
|
+
"credit-card": t("Payment", { context: "map icon" }),
|
|
1040
|
+
phone: t("Phone", { context: "map icon" }),
|
|
1041
|
+
mail: t("Mail", { context: "map icon" }),
|
|
1042
|
+
globe: t("Web", { context: "map icon" }),
|
|
1043
|
+
satellite: t("Satellite", { context: "map icon" }),
|
|
1044
|
+
radio: t("Radio", { context: "map icon" }),
|
|
1045
|
+
tv: t("TV", { context: "map icon" }),
|
|
1046
|
+
user: t("Person", { context: "map icon" }),
|
|
1047
|
+
users: t("Group", { context: "map icon" }),
|
|
1048
|
+
baby: t("Baby", { context: "map icon" }),
|
|
1049
|
+
dog: t("Dog", { context: "map icon" }),
|
|
1050
|
+
cat: t("Cat", { context: "map icon" }),
|
|
1051
|
+
bird: t("Bird", { context: "map icon" }),
|
|
1052
|
+
horse: t("Horse", { context: "map icon" }),
|
|
1053
|
+
fish: t("Fish", { context: "map icon" }),
|
|
1054
|
+
anchor: t("Anchor", { context: "map icon" }),
|
|
1055
|
+
compass: t("Compass", { context: "map icon" }),
|
|
1056
|
+
lighthouse: t("Lighthouse", { context: "map icon" }),
|
|
1057
|
+
sailboat: t("Sailboat", { context: "map icon" }),
|
|
1058
|
+
lock: t("Lock", { context: "map icon" }),
|
|
1059
|
+
key: t("Key", { context: "map icon" }),
|
|
1060
|
+
shield: t("Shield", { context: "map icon" }),
|
|
1061
|
+
eye: t("Eye", { context: "map icon" }),
|
|
1062
|
+
search: t("Search", { context: "map icon" }),
|
|
1063
|
+
police: t("Police", { context: "map icon" }),
|
|
1064
|
+
siren: t("Siren", { context: "map icon" })
|
|
1065
|
+
});
|
|
1066
|
+
const markerIconNames = (t) => ({
|
|
1067
|
+
clock: t("Clock", { context: "map icon" }),
|
|
1068
|
+
calendar: t("Calendar", { context: "map icon" }),
|
|
1069
|
+
bookmark: t("Bookmark", { context: "map icon" }),
|
|
1070
|
+
tag: t("Tag", { context: "map icon" }),
|
|
1071
|
+
pushpin: t("Pin", { context: "map icon" }),
|
|
1072
|
+
"red-circle": t("Red Circle", { context: "map icon" }),
|
|
1073
|
+
"blue-circle": t("Blue Circle", { context: "map icon" }),
|
|
1074
|
+
"green-circle": t("Green Circle", { context: "map icon" }),
|
|
1075
|
+
"yellow-circle": t("Yellow Circle", { context: "map icon" }),
|
|
1076
|
+
"orange-circle": t("Orange Circle", { context: "map icon" }),
|
|
1077
|
+
"purple-circle": t("Purple Circle", { context: "map icon" }),
|
|
1078
|
+
"white-circle": t("White Circle", { context: "map icon" }),
|
|
1079
|
+
"black-circle": t("Black Circle", { context: "map icon" }),
|
|
1080
|
+
"red-square": t("Red Square", { context: "map icon" }),
|
|
1081
|
+
"blue-square": t("Blue Square", { context: "map icon" }),
|
|
1082
|
+
diamond: t("Diamond", { context: "map icon" }),
|
|
1083
|
+
"arrow-up": t("Arrow Up", { context: "map icon" }),
|
|
1084
|
+
"arrow-down": t("Arrow Down", { context: "map icon" }),
|
|
1085
|
+
"arrow-left": t("Arrow Left", { context: "map icon" }),
|
|
1086
|
+
"arrow-right": t("Arrow Right", { context: "map icon" }),
|
|
1087
|
+
target: t("Target", { context: "map icon" })
|
|
1088
|
+
});
|
|
1089
|
+
const iconNameLabels = (t) => ({
|
|
1090
|
+
...placeIconNames(t),
|
|
1091
|
+
...natureIconNames(t),
|
|
1092
|
+
...everydayIconNames(t),
|
|
1093
|
+
...markerIconNames(t)
|
|
1094
|
+
});
|
|
1095
|
+
const noticeToastLabels = (t) => ({
|
|
1096
|
+
screenshotFailed: t("Screenshot failed"),
|
|
1097
|
+
screenshotMapNotReady: t("Map is not ready yet."),
|
|
1098
|
+
screenshotNotRendered: t("The map did not render in time. Please try again."),
|
|
1099
|
+
noVisibleLayers: t("No visible layers"),
|
|
1100
|
+
noVisibleLayersDescription: t("Show at least one layer to draw features"),
|
|
1101
|
+
noLayerSelected: t("No layer selected"),
|
|
1102
|
+
noLayerSelectedDescription: t("Select an editable layer to clear features"),
|
|
1103
|
+
cannotClearHpLayer: t("Cannot clear high-performance layer"),
|
|
1104
|
+
cannotClearHpLayerDescription: t("Clear is not supported for HP layers. Delete individual features instead."),
|
|
1105
|
+
layerEmpty: t("Layer is empty"),
|
|
1106
|
+
layerEmptyDescription: t("No features to clear"),
|
|
1107
|
+
layerCleared: t("Layer cleared"),
|
|
1108
|
+
layerClearedDescription: (layerName) => t('Removed all features from "{layerName}"', { layerName }),
|
|
1109
|
+
terrainUnavailable: t("3D Terrain Unavailable"),
|
|
1110
|
+
terrainUnavailableDescription: t("Terrain features are disabled for this configuration."),
|
|
1111
|
+
terrainEnabled: t("3D Terrain Enabled"),
|
|
1112
|
+
terrainEnabledDescription: t("Tilt the map (right-click + drag or Ctrl + drag) to see the 3D effect."),
|
|
1113
|
+
exportFailed: t("Export failed"),
|
|
1114
|
+
exportFailedDescription: t("Could not prepare the download"),
|
|
1115
|
+
featuresAdded: t("Features added"),
|
|
1116
|
+
featuresAddedDescription: ({ count, layerName }) => t('{count, plural, one {Added # feature to "{layerName}"} other {Added # features to "{layerName}"}}', {
|
|
1117
|
+
count,
|
|
1118
|
+
layerName
|
|
1119
|
+
}),
|
|
1120
|
+
layerCreated: t("Layer created"),
|
|
1121
|
+
searchFailed: t("Search failed"),
|
|
1122
|
+
searchFailedDescription: t("Failed to search data source")
|
|
1123
|
+
});
|
|
1124
|
+
const fileToastLabels = (t) => ({
|
|
1125
|
+
mapRestored: t("Map restored"),
|
|
1126
|
+
mapRestoredDescription: ({ layerCount, featureCount }) => t(
|
|
1127
|
+
"{layerCount, plural, one {Restored # layer with {featureCount, plural, one {# feature} other {# features}}} other {Restored # layers with {featureCount, plural, one {# feature} other {# features}}}}",
|
|
1128
|
+
{ layerCount, featureCount }
|
|
1129
|
+
),
|
|
1130
|
+
featuresLoaded: t("Features loaded"),
|
|
1131
|
+
featuresLoadedDescription: (count) => t("{count, plural, one {Created layer with # feature} other {Created layer with # features}}", { count }),
|
|
1132
|
+
loadFailed: t("Load failed"),
|
|
1133
|
+
loadFailedDescription: t("Failed to load from workspace"),
|
|
1134
|
+
saved: t("Saved"),
|
|
1135
|
+
savedDescription: t("Saved entire map to workspace"),
|
|
1136
|
+
saveFailed: t("Save failed"),
|
|
1137
|
+
saveFailedDescription: t("Failed to save to workspace"),
|
|
1138
|
+
noFeatures: t("No features"),
|
|
1139
|
+
noFeaturesDescription: t("There are no features to fit to"),
|
|
1140
|
+
geojsonLoadFailed: t("Failed to load GeoJSON"),
|
|
1141
|
+
invalidFile: t("Invalid file"),
|
|
1142
|
+
emptyGeojson: t("Empty GeoJSON"),
|
|
1143
|
+
hpLayerCreatedDescription: ({ layerName, count, reprojectedFrom }) => reprojectedFrom === null ? t(
|
|
1144
|
+
'{count, plural, one {Created "{layerName}" with # feature (high-performance mode)} other {Created "{layerName}" with # features (high-performance mode)}}',
|
|
1145
|
+
{ layerName, count }
|
|
1146
|
+
) : t(
|
|
1147
|
+
'{count, plural, one {Created "{layerName}" with # feature (reprojected from {crs}) (high-performance mode)} other {Created "{layerName}" with # features (reprojected from {crs}) (high-performance mode)}}',
|
|
1148
|
+
{ layerName, count, crs: reprojectedFrom }
|
|
1149
|
+
),
|
|
1150
|
+
dataViewingLayer: t("Can't load into a data-viewing layer"),
|
|
1151
|
+
dataViewingLayerDescription: t(
|
|
1152
|
+
"Its features are fetched from data and aren't saved with the map. Load the file into another layer."
|
|
1153
|
+
),
|
|
1154
|
+
hostOwnedLayer: t("Can't load into this layer"),
|
|
1155
|
+
hostOwnedLayerDescription: t("Another view owns its features. Load the file into another layer."),
|
|
1156
|
+
noLayerToLoadInto: t("No layer to load into"),
|
|
1157
|
+
noLayerToLoadIntoDescription: t("Create a layer first, then load the file again."),
|
|
1158
|
+
geojsonLoaded: t("GeoJSON loaded"),
|
|
1159
|
+
geojsonLoadedDescription: ({ count, reprojectedFrom, layerHidden }) => geojsonLoadedSentence(t, count, reprojectedFrom, layerHidden),
|
|
1160
|
+
layerAdded: t("Layer added"),
|
|
1161
|
+
layerAddedDescription: ({ layerName, count, reprojectedFrom }) => reprojectedFrom === null ? t(
|
|
1162
|
+
'{count, plural, one {Created "{layerName}" with # feature (high-performance)} other {Created "{layerName}" with # features (high-performance)}}',
|
|
1163
|
+
{ layerName, count }
|
|
1164
|
+
) : t(
|
|
1165
|
+
'{count, plural, one {Created "{layerName}" with # feature (reprojected from {crs}) (high-performance)} other {Created "{layerName}" with # features (reprojected from {crs}) (high-performance)}}',
|
|
1166
|
+
{ layerName, count, crs: reprojectedFrom }
|
|
1167
|
+
)
|
|
1168
|
+
});
|
|
1169
|
+
function geojsonLoadedSentence(t, count, reprojectedFrom, layerHidden) {
|
|
1170
|
+
if (reprojectedFrom === null) {
|
|
1171
|
+
return layerHidden ? t("{count, plural, one {Added # feature (layer hidden)} other {Added # features (layer hidden)}}", { count }) : t("{count, plural, one {Added # feature} other {Added # features}}", { count });
|
|
1172
|
+
}
|
|
1173
|
+
return layerHidden ? t(
|
|
1174
|
+
"{count, plural, one {Added # feature (reprojected from {crs}) (layer hidden)} other {Added # features (reprojected from {crs}) (layer hidden)}}",
|
|
1175
|
+
{ count, crs: reprojectedFrom }
|
|
1176
|
+
) : t(
|
|
1177
|
+
"{count, plural, one {Added # feature (reprojected from {crs})} other {Added # features (reprojected from {crs})}}",
|
|
1178
|
+
{ count, crs: reprojectedFrom }
|
|
1179
|
+
);
|
|
1180
|
+
}
|
|
1181
|
+
const toastLabels = (t) => ({ ...noticeToastLabels(t), ...fileToastLabels(t) });
|
|
1182
|
+
const featureCapLabels = (t) => ({
|
|
1183
|
+
title: t("Feature limit reached"),
|
|
1184
|
+
layersOverLimit: ({ layerCount, max, dropped }) => t(
|
|
1185
|
+
"{layerCount, plural, one {# layer was larger than the {max, number}-feature limit; {dropped, plural, one {# feature in total was not loaded.} other {# features in total were not loaded.}}} other {# layers were larger than the {max, number}-feature limit; {dropped, plural, one {# feature in total was not loaded.} other {# features in total were not loaded.}}}}",
|
|
1186
|
+
{ layerCount, max, dropped }
|
|
1187
|
+
),
|
|
1188
|
+
layerAlreadyHeld: ({ layerName, existing, max, kept, dropped }) => t(
|
|
1189
|
+
'"{layerName}" already held {existing, number} of its {max, number}-feature limit, so only {kept, number} more were added; {dropped, number} were skipped.',
|
|
1190
|
+
{ layerName, existing, max, kept, dropped }
|
|
1191
|
+
),
|
|
1192
|
+
firstFeaturesAdded: ({ kept, sourceCount, layerName, dropped }) => t(
|
|
1193
|
+
'Only the first {kept, number} of {sourceCount, number} features were added to "{layerName}"; {dropped, number} were skipped (per-layer limit).',
|
|
1194
|
+
{ kept, sourceCount, layerName, dropped }
|
|
1195
|
+
),
|
|
1196
|
+
restoreNote: t("Re-saving this map will persist only the loaded features.")
|
|
1197
|
+
});
|
|
1198
|
+
const ingestAndDropLabels = (t) => ({
|
|
1199
|
+
ingest: {
|
|
1200
|
+
importing: (name) => t("Importing {name}…", { name }),
|
|
1201
|
+
rendering: (name) => t("Rendering {name}…", { name }),
|
|
1202
|
+
preparingDownload: (name) => t("Preparing download {name}…", { name }),
|
|
1203
|
+
progress: ({ received, total }) => t("{received, number} / {total, plural, one {# feature} other {# features}}", { received, total }),
|
|
1204
|
+
invalidFormat: t("Invalid GeoJSON format"),
|
|
1205
|
+
noFeatures: t("The file contains no features"),
|
|
1206
|
+
workerUnresponsive: t("Ingest worker unresponsive — the file could not be parsed"),
|
|
1207
|
+
workerCrashed: t("Ingest worker crashed")
|
|
1208
|
+
},
|
|
1209
|
+
dropZone: {
|
|
1210
|
+
title: t("Drop GeoJSON here"),
|
|
1211
|
+
subtitle: t("Add as new layer")
|
|
1212
|
+
}
|
|
1213
|
+
});
|
|
1214
|
+
const canvasLabels = (t) => ({
|
|
1215
|
+
defaultLayerName: t("Default Layer"),
|
|
1216
|
+
newTextLabel: t("New Label"),
|
|
1217
|
+
clusterOther: t("Other"),
|
|
1218
|
+
mapInitFailedTitle: t("Map Initialization Failed"),
|
|
1219
|
+
mapInitFailedSubtitle: t("Unable to load the interactive map"),
|
|
1220
|
+
mapInitFailedFallback: t("Failed to initialize map"),
|
|
1221
|
+
refreshPage: t("Refresh Page"),
|
|
1222
|
+
measureDistance: t("Distance:"),
|
|
1223
|
+
measureArea: t("Area:"),
|
|
1224
|
+
measureDistanceHint: t("Click points to measure"),
|
|
1225
|
+
measureAreaHint: t("Click 3+ points"),
|
|
1226
|
+
measureClearHint: t("(double-click to clear)"),
|
|
1227
|
+
timelineToggle: t("Timeline", { context: "map timebar toggle" }),
|
|
1228
|
+
layersToggle: t("Layers"),
|
|
1229
|
+
layersToggleAriaLabel: t("Toggle layers panel"),
|
|
1230
|
+
unsavedCount: (count) => t("{count, plural, one {# unsaved} other {# unsaved}}", { count }),
|
|
1231
|
+
createPointFeature: t("Create new point feature"),
|
|
1232
|
+
noEditableLayer: t("No editable layer"),
|
|
1233
|
+
tooltipId: t("ID:"),
|
|
1234
|
+
morePointsHint: t("More points overlap here: zoom in to reach them"),
|
|
1235
|
+
traceDuration: t("Duration:"),
|
|
1236
|
+
traceDistance: t("Distance:"),
|
|
1237
|
+
traceAvgSpeed: t("Avg Speed:"),
|
|
1238
|
+
traceGroup: (group) => t("Group: {group}", { group }),
|
|
1239
|
+
statusFeatureCount: (count) => t("{count, plural, one {# feature} other {# features}}", { count }),
|
|
1240
|
+
statusSelectedCount: (count) => t("{count, plural, one {# selected} other {# selected}}", { count })
|
|
1241
|
+
});
|
|
1242
|
+
const mapOptionLabels = (t) => ({
|
|
1243
|
+
title: t("Map Options"),
|
|
1244
|
+
load: t("Load"),
|
|
1245
|
+
uploadMap: t("Upload Map"),
|
|
1246
|
+
loadFromWorkspace: t("Load Map from workspace"),
|
|
1247
|
+
save: t("Save"),
|
|
1248
|
+
downloadMap: t("Download Map"),
|
|
1249
|
+
saveToWorkspace: t("Save Map to workspace"),
|
|
1250
|
+
autoShowLabels: t("Auto-show labels"),
|
|
1251
|
+
autoLabelThreshold: t("When features on screen"),
|
|
1252
|
+
visibleFeatures: t("Visible:", { context: "features on screen" }),
|
|
1253
|
+
labelsShown: t("(shown)", { context: "map labels" }),
|
|
1254
|
+
labelsHidden: t("(hidden)", { context: "map labels" }),
|
|
1255
|
+
fitToAllFeatures: t("Fit Map to All Features"),
|
|
1256
|
+
terrain3d: t("3D", { context: "terrain toggle" }),
|
|
1257
|
+
basemapStreets: t("Streets"),
|
|
1258
|
+
basemapSatellite: t("Satellite", { context: "basemap" }),
|
|
1259
|
+
basemapDark: t("Dark")
|
|
1260
|
+
});
|
|
1261
|
+
const layersPanelLabels = (t) => ({
|
|
1262
|
+
title: t("Layers"),
|
|
1263
|
+
createLayer: t("Create new layer"),
|
|
1264
|
+
loadAsNewLayer: t("Load GeoJSON from desktop as new layer"),
|
|
1265
|
+
searchAndAdd: t("Search and add..."),
|
|
1266
|
+
groupLayerCount: (count) => t("{count, plural, one {# layer} other {# layers}}", { count }),
|
|
1267
|
+
unsavedCount: (count) => t("{count, plural, one {# unsaved} other {# unsaved}}", { count }),
|
|
1268
|
+
hpLayerTitle: t("High-Performance Layer"),
|
|
1269
|
+
hpLayerDescription: t("Optimized for large datasets. Geometry cannot be moved or reshaped."),
|
|
1270
|
+
editingThisLayer: t("This is the layer being edited"),
|
|
1271
|
+
clickToEditLayer: t("Click to edit this layer"),
|
|
1272
|
+
loadGeojson: t("Load GeoJSON from desktop"),
|
|
1273
|
+
saveGeojson: t("Save GeoJSON to desktop"),
|
|
1274
|
+
neverHideLabels: t("Never hide labels"),
|
|
1275
|
+
labelsOffForLayer: t("Labels are turned off for this layer"),
|
|
1276
|
+
neverHideLabelsHint: t("Show every label even when the map is crowded"),
|
|
1277
|
+
fitMapToLayer: t("Fit Map to Layer"),
|
|
1278
|
+
deleteLayer: t("Delete Layer"),
|
|
1279
|
+
deleteLayerConfirmTitle: (layerName) => t('Delete layer "{layerName}"?', { layerName }),
|
|
1280
|
+
deleteLayerConfirmContent: t("This will delete the layer and all its features."),
|
|
1281
|
+
deleteLayerConfirmOk: t("Delete"),
|
|
1282
|
+
deleteLayerConfirmCancel: t("Cancel"),
|
|
1283
|
+
moveSelectedHere: (count) => t("{count, plural, one {Move # selected here} other {Move # selected here}}", { count })
|
|
1284
|
+
});
|
|
1285
|
+
const pointLayerSettingLabels = (t) => ({
|
|
1286
|
+
pointFeatures: t("Point Features"),
|
|
1287
|
+
traceLines: t("Trace Lines"),
|
|
1288
|
+
connectAllPoints: t("Connect all points"),
|
|
1289
|
+
groupBy: (field) => t("Group by {field}", { field }),
|
|
1290
|
+
heatmap: t("Heatmap"),
|
|
1291
|
+
intensity: t("Intensity"),
|
|
1292
|
+
radius: t("Radius"),
|
|
1293
|
+
clustering: t("Clustering"),
|
|
1294
|
+
simpleCount: t("Simple count"),
|
|
1295
|
+
pieBy: (field) => t("Pie by {field}", { field }),
|
|
1296
|
+
showPointDots: t("Show point dots"),
|
|
1297
|
+
countByField: t("Count by field"),
|
|
1298
|
+
selectNumericField: t("Select numeric field..."),
|
|
1299
|
+
colorBubblesByValue: t("Color bubbles by value"),
|
|
1300
|
+
altitudeDisplay: t("Altitude Display"),
|
|
1301
|
+
altitude3d: t("3D (show altitude)"),
|
|
1302
|
+
altitudeFlat: t("Flat (ignore altitude)"),
|
|
1303
|
+
altitudeBoth: t("Both (3D + flat shadow)"),
|
|
1304
|
+
pointIcon: t("Point Icon")
|
|
1305
|
+
});
|
|
1306
|
+
const visualLayerSettingLabels = (t) => ({
|
|
1307
|
+
visualSettings: t("Visual Settings"),
|
|
1308
|
+
labels: t("Labels", { context: "map labels" }),
|
|
1309
|
+
labelFromName: t("Use name property"),
|
|
1310
|
+
labelFromField: t("Use field..."),
|
|
1311
|
+
labelFixedText: t("Fixed text..."),
|
|
1312
|
+
selectField: t("Select field..."),
|
|
1313
|
+
enterLabelText: t("Enter label text..."),
|
|
1314
|
+
size: t("Size", { context: "map symbol size" }),
|
|
1315
|
+
defaultSize: t("Default size"),
|
|
1316
|
+
sizeByField: t("Size by field..."),
|
|
1317
|
+
overrideSize: t("Override size..."),
|
|
1318
|
+
color: t("Color", { context: "map symbol color" }),
|
|
1319
|
+
useFeatureColor: t("Use feature color"),
|
|
1320
|
+
colorByField: t("Color by field..."),
|
|
1321
|
+
fixedColor: t("Fixed color..."),
|
|
1322
|
+
categories: t("Categories"),
|
|
1323
|
+
gradient: t("Gradient"),
|
|
1324
|
+
legend: t("Legend"),
|
|
1325
|
+
legendTop: (count) => t("Legend (top {count})", { count }),
|
|
1326
|
+
legendSampled: t("Legend (sampled)"),
|
|
1327
|
+
filterValues: t("Filter values…"),
|
|
1328
|
+
noMatches: t("No matches"),
|
|
1329
|
+
showLess: t("Show less"),
|
|
1330
|
+
showAll: (count) => t("Show all ({count})", { count })
|
|
1331
|
+
});
|
|
1332
|
+
const pointIconLabels = (t) => ({
|
|
1333
|
+
iconSameForAll: t("Same for all", { context: "map point icon" }),
|
|
1334
|
+
iconByFieldValue: t("By field value", { context: "map point icon" }),
|
|
1335
|
+
icons: t("Icons"),
|
|
1336
|
+
iconsAssigning: t("Assigning icons…"),
|
|
1337
|
+
iconsAssignedByAi: t("Icons assigned by AI"),
|
|
1338
|
+
iconsAssignedByKeywords: t("Icons assigned by keyword match"),
|
|
1339
|
+
reassignIcons: t("Reassign", { context: "map point icons" }),
|
|
1340
|
+
reassignIconsWithAi: t("Let the AI assign every icon again"),
|
|
1341
|
+
reassignIconsByKeywords: t("Assign every icon again by keyword match (no AI connected)"),
|
|
1342
|
+
iconAiUnavailable: (error) => t("AI unavailable, used keyword match ({error})", { error }),
|
|
1343
|
+
iconAiNoUsableIcon: t("The AI suggested no icon the map can draw, used keyword match"),
|
|
1344
|
+
assignNewIcons: (count) => t("{count, plural, one {Assign # new value} other {Assign # new values}}", { count }),
|
|
1345
|
+
iconOtherValues: t("All other values", { context: "map point icon" }),
|
|
1346
|
+
iconEmptyOrUnassigned: t("Empty or unassigned", { context: "map point icon" })
|
|
1347
|
+
});
|
|
1348
|
+
const layerSettingLabels = (t) => ({
|
|
1349
|
+
...pointLayerSettingLabels(t),
|
|
1350
|
+
...visualLayerSettingLabels(t),
|
|
1351
|
+
...pointIconLabels(t)
|
|
1352
|
+
});
|
|
1353
|
+
const drawingToolbarLabels = (t) => ({
|
|
1354
|
+
drawingTools: t("Drawing tools"),
|
|
1355
|
+
clickSelect: t("Click Select"),
|
|
1356
|
+
rectangleSelect: t("Rectangle Select"),
|
|
1357
|
+
polygonSelect: t("Polygon Select"),
|
|
1358
|
+
circleSelect: t("Circle Select"),
|
|
1359
|
+
selectTool: t("Select Tool"),
|
|
1360
|
+
switchSelectionMode: t("Switch selection mode"),
|
|
1361
|
+
filterArea: t("Filter Area"),
|
|
1362
|
+
clearFilter: t("Clear Filter"),
|
|
1363
|
+
measureDistance: t("Measure Distance"),
|
|
1364
|
+
measureArea: t("Measure Area"),
|
|
1365
|
+
switchMeasureMode: t("Switch measure mode"),
|
|
1366
|
+
searchAndNavigate: t("Search & Navigate"),
|
|
1367
|
+
fitToData: t("Fit to Data"),
|
|
1368
|
+
noEditableLayer: t("No editable layer"),
|
|
1369
|
+
noEditableLayerHint: t("Select an editable layer with the pencil icon to enable editing"),
|
|
1370
|
+
editMode: t("Edit Mode"),
|
|
1371
|
+
searchAndAdd: t("Search and Add"),
|
|
1372
|
+
dropPoint: t("Drop Point"),
|
|
1373
|
+
drawLine: t("Draw Line"),
|
|
1374
|
+
drawPolygon: t("Draw Polygon"),
|
|
1375
|
+
drawRectangle: t("Draw Rectangle"),
|
|
1376
|
+
drawPolygonOrRectangle: t("Draw Polygon/Rectangle"),
|
|
1377
|
+
drawPolygonOrRectangleAriaLabel: t("Draw Polygon or Rectangle"),
|
|
1378
|
+
addText: t("Add Text"),
|
|
1379
|
+
drawArrow: t("Draw Arrow"),
|
|
1380
|
+
drawCircle: t("Draw Circle"),
|
|
1381
|
+
undo: t("Undo"),
|
|
1382
|
+
redo: t("Redo"),
|
|
1383
|
+
deleteSelected: (count) => t("Delete selected ({count})", { count }),
|
|
1384
|
+
deleteSelectedAriaLabel: t("Delete selected features"),
|
|
1385
|
+
deleteKey: t("Del", { context: "keyboard key" }),
|
|
1386
|
+
undoShortcut: t("Ctrl+Z", { context: "keyboard shortcut" }),
|
|
1387
|
+
redoShortcut: t("Ctrl+Y", { context: "keyboard shortcut" }),
|
|
1388
|
+
clearAll: (count) => t("Clear all ({count})", { count }),
|
|
1389
|
+
moreTools: t("More tools"),
|
|
1390
|
+
clearAllConfirmTitle: t("Clear all features?"),
|
|
1391
|
+
clearAllConfirmContent: (count) => t(
|
|
1392
|
+
"{count, plural, one {This will remove all # feature from the map. This action cannot be undone.} other {This will remove all # features from the map. This action cannot be undone.}}",
|
|
1393
|
+
{ count }
|
|
1394
|
+
),
|
|
1395
|
+
clearAllConfirmOk: t("Clear all", { context: "remove every map feature" }),
|
|
1396
|
+
clearAllConfirmCancel: t("Cancel")
|
|
1397
|
+
});
|
|
1398
|
+
const navigationLabels = (t) => ({
|
|
1399
|
+
navigate: {
|
|
1400
|
+
title: t("Navigate To"),
|
|
1401
|
+
addressPlaceholder: t("Search address..."),
|
|
1402
|
+
searchAddress: t("Go", { context: "search the address" }),
|
|
1403
|
+
orCoordinates: t("or coordinates"),
|
|
1404
|
+
latitude: t("Lat"),
|
|
1405
|
+
longitude: t("Lng"),
|
|
1406
|
+
latitudePlaceholder: t("-90 to 90"),
|
|
1407
|
+
longitudePlaceholder: t("-180 to 180"),
|
|
1408
|
+
dropPoint: t("Drop", { context: "place a point on the map" }),
|
|
1409
|
+
goToCoordinates: t("Go", { context: "fly to the coordinates" }),
|
|
1410
|
+
locationNotFound: t("Location not found"),
|
|
1411
|
+
locationNotFoundDescription: t("Try a different search term"),
|
|
1412
|
+
searchError: t("Search error"),
|
|
1413
|
+
searchErrorDescription: t("Could not search for location. Check your connection.")
|
|
1414
|
+
},
|
|
1415
|
+
coordinates: {
|
|
1416
|
+
invalidCoordinates: t("Invalid coordinates"),
|
|
1417
|
+
invalidCoordinatesDescription: t("Please enter valid latitude and longitude values"),
|
|
1418
|
+
invalidLatitude: t("Invalid latitude"),
|
|
1419
|
+
invalidLongitude: t("Invalid longitude"),
|
|
1420
|
+
latitudeOutOfRange: t("Latitude must be between -90 and 90"),
|
|
1421
|
+
longitudeOutOfRange: t("Longitude must be between -180 and 180"),
|
|
1422
|
+
notANumber: t("Please enter a valid number")
|
|
1423
|
+
},
|
|
1424
|
+
featureSearch: {
|
|
1425
|
+
title: t("Search Features"),
|
|
1426
|
+
placeholder: t("Search features..."),
|
|
1427
|
+
titlesMode: t("Titles", { context: "search feature names" }),
|
|
1428
|
+
fullJsonMode: t("Full JSON"),
|
|
1429
|
+
/** `more` is true when the result list stopped at its cap. */
|
|
1430
|
+
resultCount: ({ count, more }) => more ? t("{count, number}+ found", { count }) : t("{count, number} found", { count }),
|
|
1431
|
+
totalCount: (count) => t("{count, number} total", { count }),
|
|
1432
|
+
noResults: t("No features found"),
|
|
1433
|
+
typeToSearch: (count) => t("{count, plural, one {Type to search across # feature} other {Type to search across # features}}", {
|
|
1434
|
+
count
|
|
1435
|
+
}),
|
|
1436
|
+
untitledFeature: t("Feature", { context: "untitled map feature" }),
|
|
1437
|
+
unknownGeometry: t("Unknown")
|
|
1438
|
+
}
|
|
1439
|
+
});
|
|
1440
|
+
const propertiesPanelLabels = (t) => ({
|
|
1441
|
+
showingFirstSelected: ({ shown, total }) => t("Showing the first {shown, number} of {total, number} selected features", { shown, total }),
|
|
1442
|
+
previousOverlappingPoint: t("Previous overlapping point"),
|
|
1443
|
+
nextOverlappingPoint: t("Next overlapping point"),
|
|
1444
|
+
selectedFeatures: (count) => t("{count, plural, one {# selected feature} other {# selected features}}", { count }),
|
|
1445
|
+
untitledFeature: t("Feature", { context: "untitled map feature" }),
|
|
1446
|
+
hpLayerHint: t("High Performance Layer — does not allow moving / geometrical editing of features"),
|
|
1447
|
+
hpBadge: t("HP", { context: "high-performance layer" }),
|
|
1448
|
+
viewBadge: t("View", { context: "read-only mode" }),
|
|
1449
|
+
openInNewTab: t("Open in new tab"),
|
|
1450
|
+
actions: t("Actions"),
|
|
1451
|
+
copyToLayer: t("Copy to layer"),
|
|
1452
|
+
moveToLayer: t("Move to layer"),
|
|
1453
|
+
untitledLayer: t("Untitled", { context: "map layer" }),
|
|
1454
|
+
newLayer: t("New layer…"),
|
|
1455
|
+
newLayerPrompt: t("New layer name"),
|
|
1456
|
+
changeIcon: t("Change icon"),
|
|
1457
|
+
setIcon: t("Set icon"),
|
|
1458
|
+
deleteFeatures: (count) => t("{count, plural, one {Delete # feature} other {Delete # features}}", { count }),
|
|
1459
|
+
deleteFeature: t("Delete feature"),
|
|
1460
|
+
entityCards: t("Entity Cards"),
|
|
1461
|
+
entityCardsCount: (count) => t("Entity Cards ({count})", { count }),
|
|
1462
|
+
properties: t("Properties"),
|
|
1463
|
+
noEntityCardProvider: t("No entity card provider registered"),
|
|
1464
|
+
selectSingleToSeeProperties: t("Select a single feature to see/set properties"),
|
|
1465
|
+
selectSingleToEdit: t("Select a single feature to edit properties."),
|
|
1466
|
+
pointDetail: t("Point Detail"),
|
|
1467
|
+
layer: t("Layer:"),
|
|
1468
|
+
octostarRecord: t("Octostar record"),
|
|
1469
|
+
localMapFeature: t("Local map feature"),
|
|
1470
|
+
unsaved: t("Unsaved", { context: "map feature" }),
|
|
1471
|
+
createEntity: t("Create entity"),
|
|
1472
|
+
untitledRecord: t("Untitled", { context: "record" }),
|
|
1473
|
+
refreshFromRecord: t("Refresh from record"),
|
|
1474
|
+
recordFields: t("Record Fields"),
|
|
1475
|
+
id: t("ID:"),
|
|
1476
|
+
featureSaved: t("Feature saved"),
|
|
1477
|
+
savedTo: (workspace) => t("Saved to {workspace}", { workspace }),
|
|
1478
|
+
saveFailed: t("Save failed"),
|
|
1479
|
+
saveFeatureFailed: t("Failed to save feature"),
|
|
1480
|
+
refreshed: t("Refreshed", { context: "record" }),
|
|
1481
|
+
refreshedDescription: t("Properties updated from record"),
|
|
1482
|
+
refreshFailed: t("Refresh failed")
|
|
1483
|
+
});
|
|
1484
|
+
const featureFieldLabels = (t) => ({
|
|
1485
|
+
label: t("Label", { context: "map text" }),
|
|
1486
|
+
name: t("Name", { context: "map feature" }),
|
|
1487
|
+
enterLabel: t("Enter label..."),
|
|
1488
|
+
featureName: t("Feature name"),
|
|
1489
|
+
noName: t("No name"),
|
|
1490
|
+
icon: t("Icon", { context: "map point" }),
|
|
1491
|
+
type: t("Type", { context: "entity type" }),
|
|
1492
|
+
noType: t("No type"),
|
|
1493
|
+
latLng: t("Lat / Lng"),
|
|
1494
|
+
centroidHint: t("Lat and Lng refer to the centroid of this feature"),
|
|
1495
|
+
latitude: t("Latitude"),
|
|
1496
|
+
longitude: t("Longitude"),
|
|
1497
|
+
temporal: t("Temporal", { context: "feature dates" }),
|
|
1498
|
+
dateCount: (count) => t("{count, plural, one {# date} other {# dates}}", { count }),
|
|
1499
|
+
start: t("Start", { context: "feature start date" }),
|
|
1500
|
+
end: t("End", { context: "feature end date" }),
|
|
1501
|
+
style: t("Style"),
|
|
1502
|
+
fontSize: t("Font Size"),
|
|
1503
|
+
fontColor: t("Font Color"),
|
|
1504
|
+
fontWeight: t("Font Weight"),
|
|
1505
|
+
fontWeightNormal: t("Normal", { context: "font weight" }),
|
|
1506
|
+
fontWeightBold: t("Bold", { context: "font weight" }),
|
|
1507
|
+
arrowSize: t("Arrow Size"),
|
|
1508
|
+
stroke: t("Stroke", { context: "map outline" }),
|
|
1509
|
+
strokeColor: t("Stroke Color"),
|
|
1510
|
+
strokeWidth: t("Stroke Width"),
|
|
1511
|
+
strokeOpacity: t("Stroke Opacity"),
|
|
1512
|
+
fill: t("Fill", { context: "map area" }),
|
|
1513
|
+
fillColor: t("Fill Color"),
|
|
1514
|
+
fillOpacity: t("Fill Opacity"),
|
|
1515
|
+
resetFillToStroke: t("Reset fill to the stroke colour"),
|
|
1516
|
+
iconSize: t("Size", { context: "map symbol size" }),
|
|
1517
|
+
propertyKey: t("Key"),
|
|
1518
|
+
propertyValue: t("Value"),
|
|
1519
|
+
newProperty: t("New property…")
|
|
1520
|
+
});
|
|
1521
|
+
const timebarLabels = (t) => ({
|
|
1522
|
+
play: t("Play"),
|
|
1523
|
+
pause: t("Pause"),
|
|
1524
|
+
reset: t("Reset timeline"),
|
|
1525
|
+
cumulative: t("Cumulative: what has appeared stays"),
|
|
1526
|
+
toggle: t("Toggle timeline"),
|
|
1527
|
+
featureCount: (count) => t("{count, plural, one {# feature} other {# features}}", { count }),
|
|
1528
|
+
selectedCount: ({ selected, total }) => t("{selected, number} of {total, number} selected", { selected, total }),
|
|
1529
|
+
binEvents: (count) => t("{count, plural, one {# event} other {# events}}", { count }),
|
|
1530
|
+
binEventsWithSelection: ({ count, selected }) => t("{count, plural, one {# event ({selected, number} selected)} other {# events ({selected, number} selected)}}", {
|
|
1531
|
+
count,
|
|
1532
|
+
selected
|
|
1533
|
+
})
|
|
1534
|
+
});
|
|
1535
|
+
const actionPanelLabels = (t) => ({
|
|
1536
|
+
groupLabel: t("File actions"),
|
|
1537
|
+
saveTooltip: t("Download features as GeoJSON"),
|
|
1538
|
+
saveAriaLabel: t("Save as GeoJSON"),
|
|
1539
|
+
save: t("Save GeoJSON"),
|
|
1540
|
+
loadTooltip: t("Import features from GeoJSON file"),
|
|
1541
|
+
loadAriaLabel: t("Load GeoJSON file"),
|
|
1542
|
+
load: t("Load GeoJSON")
|
|
1543
|
+
});
|
|
1544
|
+
const DEFAULT_LAYER_ID = "default";
|
|
1545
|
+
const DEFAULT_LAYER_NAME = "Default Layer";
|
|
1546
|
+
const buildMapLabels = (t) => ({
|
|
1547
|
+
canvas: canvasLabels(t),
|
|
1548
|
+
toasts: toastLabels(t),
|
|
1549
|
+
featureCap: featureCapLabels(t),
|
|
1550
|
+
...ingestAndDropLabels(t),
|
|
1551
|
+
mapOptions: mapOptionLabels(t),
|
|
1552
|
+
layersPanel: layersPanelLabels(t),
|
|
1553
|
+
layerSettings: layerSettingLabels(t),
|
|
1554
|
+
drawingToolbar: drawingToolbarLabels(t),
|
|
1555
|
+
...navigationLabels(t),
|
|
1556
|
+
propertiesPanel: propertiesPanelLabels(t),
|
|
1557
|
+
featureFields: featureFieldLabels(t),
|
|
1558
|
+
iconPicker: iconPickerLabels(t),
|
|
1559
|
+
iconCategories: iconCategoryLabels(t),
|
|
1560
|
+
iconNames: iconNameLabels(t),
|
|
1561
|
+
timebar: timebarLabels(t),
|
|
1562
|
+
actionPanel: actionPanelLabels(t)
|
|
1563
|
+
});
|
|
1564
|
+
const labelsByLocale = /* @__PURE__ */ new Map();
|
|
1565
|
+
function mapLabelsFor(locale) {
|
|
1566
|
+
const shown = isMapLocaleReady(locale) ? locale : "en";
|
|
1567
|
+
let labels = labelsByLocale.get(shown);
|
|
1568
|
+
if (!labels) {
|
|
1569
|
+
labels = buildMapLabels(translatorFor(shown));
|
|
1570
|
+
labelsByLocale.set(shown, labels);
|
|
1571
|
+
}
|
|
1572
|
+
return labels;
|
|
1573
|
+
}
|
|
1574
|
+
const DEFAULT_MAP_LABELS = mapLabelsFor("en");
|
|
1575
|
+
const MapLabelsContext = createContext(null);
|
|
1576
|
+
function shownLayerName(layer, labels) {
|
|
1577
|
+
return layer.name === DEFAULT_LAYER_NAME ? labels.defaultLayerName : layer.name;
|
|
1578
|
+
}
|
|
1579
|
+
function useMapLabels() {
|
|
1580
|
+
const provided = useContext(MapLabelsContext);
|
|
1581
|
+
const locale = useMapLocale();
|
|
1582
|
+
return provided ?? mapLabelsFor(locale);
|
|
1583
|
+
}
|
|
803
1584
|
const HOST_ICON_FULL_ZOOM_PROP = "iconFullZoom";
|
|
804
1585
|
const HOST_ICON_MIN_ZOOM_PROP = "iconMinZoom";
|
|
805
1586
|
const HOST_ICON_MIN_SCALE_PROP = "iconMinScale";
|
|
@@ -821,588 +1602,6 @@ function hostIconSizeMultiplier(size, fieldPosition) {
|
|
|
821
1602
|
if ((size == null ? void 0 : size.mode) === "field" && fieldPosition !== null) return 0.6 + fieldPosition * 0.9;
|
|
822
1603
|
return 1;
|
|
823
1604
|
}
|
|
824
|
-
const ICON_LIST = [
|
|
825
|
-
// Location & Places
|
|
826
|
-
{ id: "map-pin", emoji: "📍", name: "Map Pin", category: "places" },
|
|
827
|
-
{ id: "home", emoji: "🏠", name: "Home", category: "places" },
|
|
828
|
-
{ id: "building", emoji: "🏢", name: "Building", category: "places" },
|
|
829
|
-
{ id: "store", emoji: "🏪", name: "Store", category: "places" },
|
|
830
|
-
{ id: "factory", emoji: "🏭", name: "Factory", category: "places" },
|
|
831
|
-
{ id: "construction", emoji: "🏗️", name: "Construction", category: "places" },
|
|
832
|
-
{ id: "church", emoji: "⛪", name: "Church", category: "places" },
|
|
833
|
-
{ id: "hospital", emoji: "🏥", name: "Hospital", category: "places" },
|
|
834
|
-
{ id: "school", emoji: "🏫", name: "School", category: "places" },
|
|
835
|
-
{ id: "graduation", emoji: "🎓", name: "University", category: "places" },
|
|
836
|
-
{ id: "library", emoji: "📚", name: "Library", category: "places" },
|
|
837
|
-
{ id: "landmark", emoji: "🏛️", name: "Landmark", category: "places" },
|
|
838
|
-
{ id: "castle", emoji: "🏰", name: "Castle", category: "places" },
|
|
839
|
-
{ id: "mosque", emoji: "🕌", name: "Mosque", category: "places" },
|
|
840
|
-
{ id: "stadium", emoji: "🏟️", name: "Stadium", category: "places" },
|
|
841
|
-
{ id: "tent", emoji: "⛺", name: "Camping", category: "places" },
|
|
842
|
-
// Transport
|
|
843
|
-
{ id: "car", emoji: "🚗", name: "Car", category: "transport" },
|
|
844
|
-
{ id: "bus", emoji: "🚌", name: "Bus", category: "transport" },
|
|
845
|
-
{ id: "train", emoji: "🚂", name: "Train", category: "transport" },
|
|
846
|
-
{ id: "plane", emoji: "✈️", name: "Plane", category: "transport" },
|
|
847
|
-
{ id: "ship", emoji: "🚢", name: "Ship", category: "transport" },
|
|
848
|
-
{ id: "bike", emoji: "🚲", name: "Bike", category: "transport" },
|
|
849
|
-
{ id: "fuel", emoji: "⛽", name: "Gas Station", category: "transport" },
|
|
850
|
-
{ id: "helicopter", emoji: "🚁", name: "Helicopter", category: "transport" },
|
|
851
|
-
{ id: "rocket", emoji: "🚀", name: "Rocket", category: "transport" },
|
|
852
|
-
{ id: "motorcycle", emoji: "🏍️", name: "Motorcycle", category: "transport" },
|
|
853
|
-
{ id: "taxi", emoji: "🚕", name: "Taxi", category: "transport" },
|
|
854
|
-
{ id: "truck", emoji: "🚛", name: "Truck", category: "transport" },
|
|
855
|
-
// Food & Drink
|
|
856
|
-
{ id: "utensils", emoji: "🍴", name: "Restaurant", category: "food" },
|
|
857
|
-
{ id: "coffee", emoji: "☕", name: "Coffee", category: "food" },
|
|
858
|
-
{ id: "beer", emoji: "🍺", name: "Bar", category: "food" },
|
|
859
|
-
{ id: "wine", emoji: "🍷", name: "Wine", category: "food" },
|
|
860
|
-
{ id: "pizza", emoji: "🍕", name: "Pizza", category: "food" },
|
|
861
|
-
{ id: "ice-cream", emoji: "🍦", name: "Ice Cream", category: "food" },
|
|
862
|
-
{ id: "apple", emoji: "🍎", name: "Apple", category: "food" },
|
|
863
|
-
{ id: "cake", emoji: "🎂", name: "Cake", category: "food" },
|
|
864
|
-
{ id: "hamburger", emoji: "🍔", name: "Burger", category: "food" },
|
|
865
|
-
// Nature
|
|
866
|
-
{ id: "trees", emoji: "🌲", name: "Forest", category: "nature" },
|
|
867
|
-
{ id: "mountain", emoji: "⛰️", name: "Mountain", category: "nature" },
|
|
868
|
-
{ id: "waves", emoji: "🌊", name: "Water", category: "nature" },
|
|
869
|
-
{ id: "sun", emoji: "☀️", name: "Sun", category: "nature" },
|
|
870
|
-
{ id: "cloud", emoji: "☁️", name: "Cloud", category: "nature" },
|
|
871
|
-
{ id: "umbrella", emoji: "🌂", name: "Umbrella", category: "nature" },
|
|
872
|
-
{ id: "flower", emoji: "🌸", name: "Flower", category: "nature" },
|
|
873
|
-
{ id: "leaf", emoji: "🍃", name: "Leaf", category: "nature" },
|
|
874
|
-
{ id: "rainbow", emoji: "🌈", name: "Rainbow", category: "nature" },
|
|
875
|
-
{ id: "snowflake", emoji: "❄️", name: "Snow", category: "nature" },
|
|
876
|
-
{ id: "fire", emoji: "🔥", name: "Fire", category: "nature" },
|
|
877
|
-
{ id: "volcano", emoji: "🌋", name: "Volcano", category: "nature" },
|
|
878
|
-
// Symbols & Markers
|
|
879
|
-
{ id: "heart", emoji: "❤️", name: "Heart", category: "symbols" },
|
|
880
|
-
{ id: "star", emoji: "⭐", name: "Star", category: "symbols" },
|
|
881
|
-
{ id: "flag", emoji: "🚩", name: "Flag", category: "symbols" },
|
|
882
|
-
{ id: "alert", emoji: "⚠️", name: "Warning", category: "symbols" },
|
|
883
|
-
{ id: "info", emoji: "ℹ️", name: "Info", category: "symbols" },
|
|
884
|
-
{ id: "check", emoji: "✅", name: "Check", category: "symbols" },
|
|
885
|
-
{ id: "x-mark", emoji: "❌", name: "X", category: "symbols" },
|
|
886
|
-
{ id: "zap", emoji: "⚡", name: "Zap", category: "symbols" },
|
|
887
|
-
{ id: "bell", emoji: "🔔", name: "Bell", category: "symbols" },
|
|
888
|
-
{ id: "peace", emoji: "☮️", name: "Peace", category: "symbols" },
|
|
889
|
-
{ id: "recycle", emoji: "♻️", name: "Recycle", category: "symbols" },
|
|
890
|
-
{ id: "radioactive", emoji: "☢️", name: "Radioactive", category: "symbols" },
|
|
891
|
-
{ id: "biohazard", emoji: "☣️", name: "Biohazard", category: "symbols" },
|
|
892
|
-
// Activities
|
|
893
|
-
{ id: "camera", emoji: "📷", name: "Camera", category: "activities" },
|
|
894
|
-
{ id: "music", emoji: "🎵", name: "Music", category: "activities" },
|
|
895
|
-
{ id: "film", emoji: "🎬", name: "Cinema", category: "activities" },
|
|
896
|
-
{ id: "gamepad", emoji: "🎮", name: "Gaming", category: "activities" },
|
|
897
|
-
{ id: "trophy", emoji: "🏆", name: "Trophy", category: "activities" },
|
|
898
|
-
{ id: "medal", emoji: "🎖️", name: "Medal", category: "activities" },
|
|
899
|
-
{ id: "sports", emoji: "⚽", name: "Sports", category: "activities" },
|
|
900
|
-
{ id: "basketball", emoji: "🏀", name: "Basketball", category: "activities" },
|
|
901
|
-
{ id: "fishing", emoji: "🎣", name: "Fishing", category: "activities" },
|
|
902
|
-
{ id: "art", emoji: "🎨", name: "Art", category: "activities" },
|
|
903
|
-
// Work & Tools
|
|
904
|
-
{ id: "briefcase", emoji: "💼", name: "Office", category: "work" },
|
|
905
|
-
{ id: "wrench", emoji: "🔧", name: "Repair", category: "work" },
|
|
906
|
-
{ id: "hammer", emoji: "🔨", name: "Construction", category: "work" },
|
|
907
|
-
{ id: "gear", emoji: "⚙️", name: "Settings", category: "work" },
|
|
908
|
-
{ id: "microscope", emoji: "🔬", name: "Science", category: "work" },
|
|
909
|
-
{ id: "test-tube", emoji: "🧪", name: "Lab", category: "work" },
|
|
910
|
-
{ id: "computer", emoji: "💻", name: "Computer", category: "work" },
|
|
911
|
-
// Shopping
|
|
912
|
-
{ id: "cart", emoji: "🛒", name: "Shopping", category: "shopping" },
|
|
913
|
-
{ id: "gift", emoji: "🎁", name: "Gift", category: "shopping" },
|
|
914
|
-
{ id: "package", emoji: "📦", name: "Package", category: "shopping" },
|
|
915
|
-
{ id: "money", emoji: "💰", name: "Money", category: "shopping" },
|
|
916
|
-
{ id: "credit-card", emoji: "💳", name: "Payment", category: "shopping" },
|
|
917
|
-
// Communication
|
|
918
|
-
{ id: "phone", emoji: "📱", name: "Phone", category: "communication" },
|
|
919
|
-
{ id: "mail", emoji: "📧", name: "Mail", category: "communication" },
|
|
920
|
-
{ id: "globe", emoji: "🌐", name: "Web", category: "communication" },
|
|
921
|
-
{ id: "satellite", emoji: "📡", name: "Satellite", category: "communication" },
|
|
922
|
-
{ id: "radio", emoji: "📻", name: "Radio", category: "communication" },
|
|
923
|
-
{ id: "tv", emoji: "📺", name: "TV", category: "communication" },
|
|
924
|
-
// People & Animals
|
|
925
|
-
{ id: "user", emoji: "👤", name: "Person", category: "people" },
|
|
926
|
-
{ id: "users", emoji: "👥", name: "Group", category: "people" },
|
|
927
|
-
{ id: "baby", emoji: "👶", name: "Baby", category: "people" },
|
|
928
|
-
{ id: "dog", emoji: "🐕", name: "Dog", category: "people" },
|
|
929
|
-
{ id: "cat", emoji: "🐈", name: "Cat", category: "people" },
|
|
930
|
-
{ id: "bird", emoji: "🐦", name: "Bird", category: "people" },
|
|
931
|
-
{ id: "horse", emoji: "🐴", name: "Horse", category: "people" },
|
|
932
|
-
{ id: "fish", emoji: "🐟", name: "Fish", category: "people" },
|
|
933
|
-
// Maritime & Navigation
|
|
934
|
-
{ id: "anchor", emoji: "⚓", name: "Anchor", category: "maritime" },
|
|
935
|
-
{ id: "compass", emoji: "🧭", name: "Compass", category: "maritime" },
|
|
936
|
-
{ id: "lighthouse", emoji: "🗼", name: "Lighthouse", category: "maritime" },
|
|
937
|
-
{ id: "sailboat", emoji: "⛵", name: "Sailboat", category: "maritime" },
|
|
938
|
-
// Security
|
|
939
|
-
{ id: "lock", emoji: "🔒", name: "Lock", category: "security" },
|
|
940
|
-
{ id: "key", emoji: "🔑", name: "Key", category: "security" },
|
|
941
|
-
{ id: "shield", emoji: "🛡️", name: "Shield", category: "security" },
|
|
942
|
-
{ id: "eye", emoji: "👁️", name: "Eye", category: "security" },
|
|
943
|
-
{ id: "search", emoji: "🔍", name: "Search", category: "security" },
|
|
944
|
-
{ id: "police", emoji: "🚔", name: "Police", category: "security" },
|
|
945
|
-
{ id: "siren", emoji: "🚨", name: "Siren", category: "security" },
|
|
946
|
-
// Time & Organization
|
|
947
|
-
{ id: "clock", emoji: "🕐", name: "Clock", category: "time" },
|
|
948
|
-
{ id: "calendar", emoji: "📅", name: "Calendar", category: "time" },
|
|
949
|
-
{ id: "bookmark", emoji: "🔖", name: "Bookmark", category: "time" },
|
|
950
|
-
{ id: "tag", emoji: "🏷️", name: "Tag", category: "time" },
|
|
951
|
-
{ id: "pushpin", emoji: "📌", name: "Pin", category: "time" },
|
|
952
|
-
// Shapes & Geometric
|
|
953
|
-
{ id: "red-circle", emoji: "🔴", name: "Red Circle", category: "shapes" },
|
|
954
|
-
{ id: "blue-circle", emoji: "🔵", name: "Blue Circle", category: "shapes" },
|
|
955
|
-
{ id: "green-circle", emoji: "🟢", name: "Green Circle", category: "shapes" },
|
|
956
|
-
{ id: "yellow-circle", emoji: "🟡", name: "Yellow Circle", category: "shapes" },
|
|
957
|
-
{ id: "orange-circle", emoji: "🟠", name: "Orange Circle", category: "shapes" },
|
|
958
|
-
{ id: "purple-circle", emoji: "🟣", name: "Purple Circle", category: "shapes" },
|
|
959
|
-
{ id: "white-circle", emoji: "⚪", name: "White Circle", category: "shapes" },
|
|
960
|
-
{ id: "black-circle", emoji: "⚫", name: "Black Circle", category: "shapes" },
|
|
961
|
-
{ id: "red-square", emoji: "🟥", name: "Red Square", category: "shapes" },
|
|
962
|
-
{ id: "blue-square", emoji: "🟦", name: "Blue Square", category: "shapes" },
|
|
963
|
-
{ id: "diamond", emoji: "💎", name: "Diamond", category: "shapes" },
|
|
964
|
-
// Arrows
|
|
965
|
-
{ id: "arrow-up", emoji: "⬆️", name: "Arrow Up", category: "arrows" },
|
|
966
|
-
{ id: "arrow-down", emoji: "⬇️", name: "Arrow Down", category: "arrows" },
|
|
967
|
-
{ id: "arrow-left", emoji: "⬅️", name: "Arrow Left", category: "arrows" },
|
|
968
|
-
{ id: "arrow-right", emoji: "➡️", name: "Arrow Right", category: "arrows" },
|
|
969
|
-
{ id: "target", emoji: "🎯", name: "Target", category: "arrows" }
|
|
970
|
-
];
|
|
971
|
-
const ICONS = [...ICON_LIST];
|
|
972
|
-
const EMOJI_BY_ID = new Map(ICONS.map((i) => [i.id, i.emoji]));
|
|
973
|
-
const plural = (count, word) => `${word}${count !== 1 ? "s" : ""}`;
|
|
974
|
-
const DEFAULT_LAYER_ID = "default";
|
|
975
|
-
const DEFAULT_LAYER_NAME = "Default Layer";
|
|
976
|
-
const iconNames = Object.fromEntries(ICONS.map((icon) => [icon.id, icon.name]));
|
|
977
|
-
const iconCategories = {
|
|
978
|
-
places: "Places",
|
|
979
|
-
transport: "Transport",
|
|
980
|
-
food: "Food",
|
|
981
|
-
nature: "Nature",
|
|
982
|
-
symbols: "Symbols",
|
|
983
|
-
activities: "Activities",
|
|
984
|
-
work: "Work",
|
|
985
|
-
shopping: "Shopping",
|
|
986
|
-
communication: "Communication",
|
|
987
|
-
people: "People",
|
|
988
|
-
maritime: "Maritime",
|
|
989
|
-
security: "Security",
|
|
990
|
-
time: "Time",
|
|
991
|
-
shapes: "Shapes",
|
|
992
|
-
arrows: "Arrows"
|
|
993
|
-
};
|
|
994
|
-
const DEFAULT_MAP_LABELS = {
|
|
995
|
-
canvas: {
|
|
996
|
-
defaultLayerName: DEFAULT_LAYER_NAME,
|
|
997
|
-
newTextLabel: "New Label",
|
|
998
|
-
clusterOther: "Other",
|
|
999
|
-
mapInitFailedTitle: "Map Initialization Failed",
|
|
1000
|
-
mapInitFailedSubtitle: "Unable to load the interactive map",
|
|
1001
|
-
mapInitFailedFallback: "Failed to initialize map",
|
|
1002
|
-
refreshPage: "Refresh Page",
|
|
1003
|
-
measureDistance: "Distance:",
|
|
1004
|
-
measureArea: "Area:",
|
|
1005
|
-
measureDistanceHint: "Click points to measure",
|
|
1006
|
-
measureAreaHint: "Click 3+ points",
|
|
1007
|
-
measureClearHint: "(double-click to clear)",
|
|
1008
|
-
timelineToggle: "Timeline",
|
|
1009
|
-
layersToggle: "Layers",
|
|
1010
|
-
layersToggleAriaLabel: "Toggle layers panel",
|
|
1011
|
-
unsavedCount: (count) => `${count} unsaved`,
|
|
1012
|
-
createPointFeature: "Create new point feature",
|
|
1013
|
-
noEditableLayer: "No editable layer",
|
|
1014
|
-
tooltipId: "ID:",
|
|
1015
|
-
morePointsHint: "More points overlap here: zoom in to reach them",
|
|
1016
|
-
traceDuration: "Duration:",
|
|
1017
|
-
traceDistance: "Distance:",
|
|
1018
|
-
traceAvgSpeed: "Avg Speed:",
|
|
1019
|
-
traceGroup: (group) => `Group: ${group}`,
|
|
1020
|
-
statusFeatureCount: (count) => `${count} ${plural(count, "feature")}`,
|
|
1021
|
-
statusSelectedCount: (count) => `${count} selected`
|
|
1022
|
-
},
|
|
1023
|
-
toasts: {
|
|
1024
|
-
screenshotFailed: "Screenshot failed",
|
|
1025
|
-
screenshotMapNotReady: "Map is not ready yet.",
|
|
1026
|
-
screenshotNotRendered: "The map did not render in time. Please try again.",
|
|
1027
|
-
noVisibleLayers: "No visible layers",
|
|
1028
|
-
noVisibleLayersDescription: "Show at least one layer to draw features",
|
|
1029
|
-
noLayerSelected: "No layer selected",
|
|
1030
|
-
noLayerSelectedDescription: "Select an editable layer to clear features",
|
|
1031
|
-
cannotClearHpLayer: "Cannot clear high-performance layer",
|
|
1032
|
-
cannotClearHpLayerDescription: "Clear is not supported for HP layers. Delete individual features instead.",
|
|
1033
|
-
layerEmpty: "Layer is empty",
|
|
1034
|
-
layerEmptyDescription: "No features to clear",
|
|
1035
|
-
layerCleared: "Layer cleared",
|
|
1036
|
-
layerClearedDescription: (layerName) => `Removed all features from "${layerName}"`,
|
|
1037
|
-
terrainUnavailable: "3D Terrain Unavailable",
|
|
1038
|
-
terrainUnavailableDescription: "Terrain features are disabled for this configuration.",
|
|
1039
|
-
terrainEnabled: "3D Terrain Enabled",
|
|
1040
|
-
terrainEnabledDescription: "Tilt the map (right-click + drag or Ctrl + drag) to see the 3D effect.",
|
|
1041
|
-
exportFailed: "Export failed",
|
|
1042
|
-
exportFailedDescription: "Could not prepare the download",
|
|
1043
|
-
featuresAdded: "Features added",
|
|
1044
|
-
featuresAddedDescription: ({ count, layerName }) => `Added ${count} features to "${layerName}"`,
|
|
1045
|
-
layerCreated: "Layer created",
|
|
1046
|
-
searchFailed: "Search failed",
|
|
1047
|
-
searchFailedDescription: "Failed to search data source",
|
|
1048
|
-
mapRestored: "Map restored",
|
|
1049
|
-
mapRestoredDescription: ({ layerCount, featureCount }) => `Restored ${layerCount} layers with ${featureCount} features`,
|
|
1050
|
-
featuresLoaded: "Features loaded",
|
|
1051
|
-
featuresLoadedDescription: (count) => `Created layer with ${count} features`,
|
|
1052
|
-
loadFailed: "Load failed",
|
|
1053
|
-
loadFailedDescription: "Failed to load from workspace",
|
|
1054
|
-
saved: "Saved",
|
|
1055
|
-
savedDescription: "Saved entire map to workspace",
|
|
1056
|
-
saveFailed: "Save failed",
|
|
1057
|
-
saveFailedDescription: "Failed to save to workspace",
|
|
1058
|
-
noFeatures: "No features",
|
|
1059
|
-
noFeaturesDescription: "There are no features to fit to",
|
|
1060
|
-
geojsonLoadFailed: "Failed to load GeoJSON",
|
|
1061
|
-
invalidFile: "Invalid file",
|
|
1062
|
-
emptyGeojson: "Empty GeoJSON",
|
|
1063
|
-
/** `reprojectedFrom` is the source CRS when the file was reprojected, otherwise null. */
|
|
1064
|
-
hpLayerCreatedDescription: ({ layerName, count, reprojectedFrom }) => `Created "${layerName}" with ${count} features${reprojectedFrom !== null ? ` (reprojected from ${reprojectedFrom})` : ""} (high-performance mode)`,
|
|
1065
|
-
dataViewingLayer: "Can't load into a data-viewing layer",
|
|
1066
|
-
dataViewingLayerDescription: "Its features are fetched from data and aren't saved with the map. Load the file into another layer.",
|
|
1067
|
-
hostOwnedLayer: "Can't load into this layer",
|
|
1068
|
-
hostOwnedLayerDescription: "Another view owns its features. Load the file into another layer.",
|
|
1069
|
-
noLayerToLoadInto: "No layer to load into",
|
|
1070
|
-
noLayerToLoadIntoDescription: "Create a layer first, then load the file again.",
|
|
1071
|
-
geojsonLoaded: "GeoJSON loaded",
|
|
1072
|
-
geojsonLoadedDescription: ({ count, reprojectedFrom, layerHidden }) => `Added ${count} features${reprojectedFrom !== null ? ` (reprojected from ${reprojectedFrom})` : ""}${layerHidden ? " (layer hidden)" : ""}`,
|
|
1073
|
-
layerAdded: "Layer added",
|
|
1074
|
-
layerAddedDescription: ({ layerName, count, reprojectedFrom }) => `Created "${layerName}" with ${count} features${reprojectedFrom !== null ? ` (reprojected from ${reprojectedFrom})` : ""} (high-performance)`
|
|
1075
|
-
},
|
|
1076
|
-
featureCap: DEFAULT_FEATURE_CAP_LABELS,
|
|
1077
|
-
ingest: {
|
|
1078
|
-
importing: (name) => `Importing ${name}…`,
|
|
1079
|
-
rendering: (name) => `Rendering ${name}…`,
|
|
1080
|
-
preparingDownload: (name) => `Preparing download ${name}…`,
|
|
1081
|
-
progress: ({ received, total }) => `${received.toLocaleString()} / ${total.toLocaleString()} features`,
|
|
1082
|
-
invalidFormat: "Invalid GeoJSON format",
|
|
1083
|
-
noFeatures: "The file contains no features",
|
|
1084
|
-
workerUnresponsive: "Ingest worker unresponsive — the file could not be parsed",
|
|
1085
|
-
workerCrashed: "Ingest worker crashed"
|
|
1086
|
-
},
|
|
1087
|
-
dropZone: {
|
|
1088
|
-
title: "Drop GeoJSON here",
|
|
1089
|
-
subtitle: "Add as new layer"
|
|
1090
|
-
},
|
|
1091
|
-
mapOptions: {
|
|
1092
|
-
title: "Map Options",
|
|
1093
|
-
load: "Load",
|
|
1094
|
-
uploadMap: "Upload Map",
|
|
1095
|
-
loadFromWorkspace: "Load Map from workspace",
|
|
1096
|
-
save: "Save",
|
|
1097
|
-
downloadMap: "Download Map",
|
|
1098
|
-
saveToWorkspace: "Save Map to workspace",
|
|
1099
|
-
autoShowLabels: "Auto-show labels",
|
|
1100
|
-
autoLabelThreshold: "When features on screen",
|
|
1101
|
-
visibleFeatures: "Visible:",
|
|
1102
|
-
labelsShown: "(shown)",
|
|
1103
|
-
labelsHidden: "(hidden)",
|
|
1104
|
-
fitToAllFeatures: "Fit Map to All Features",
|
|
1105
|
-
terrain3d: "3D",
|
|
1106
|
-
basemapStreets: "Streets",
|
|
1107
|
-
basemapSatellite: "Satellite",
|
|
1108
|
-
basemapDark: "Dark"
|
|
1109
|
-
},
|
|
1110
|
-
layersPanel: {
|
|
1111
|
-
title: "Layers",
|
|
1112
|
-
createLayer: "Create new layer",
|
|
1113
|
-
loadAsNewLayer: "Load GeoJSON from desktop as new layer",
|
|
1114
|
-
searchAndAdd: "Search and add...",
|
|
1115
|
-
groupLayerCount: (count) => `${count} layers`,
|
|
1116
|
-
unsavedCount: (count) => `${count} unsaved`,
|
|
1117
|
-
hpLayerTitle: "High-Performance Layer",
|
|
1118
|
-
hpLayerDescription: "Optimized for large datasets. Geometry cannot be moved or reshaped.",
|
|
1119
|
-
editingThisLayer: "This is the layer being edited",
|
|
1120
|
-
clickToEditLayer: "Click to edit this layer",
|
|
1121
|
-
loadGeojson: "Load GeoJSON from desktop",
|
|
1122
|
-
saveGeojson: "Save GeoJSON to desktop",
|
|
1123
|
-
neverHideLabels: "Never hide labels",
|
|
1124
|
-
labelsOffForLayer: "Labels are turned off for this layer",
|
|
1125
|
-
neverHideLabelsHint: "Show every label even when the map is crowded",
|
|
1126
|
-
fitMapToLayer: "Fit Map to Layer",
|
|
1127
|
-
deleteLayer: "Delete Layer",
|
|
1128
|
-
deleteLayerConfirmTitle: (layerName) => `Delete layer "${layerName}"?`,
|
|
1129
|
-
deleteLayerConfirmContent: "This will delete the layer and all its features.",
|
|
1130
|
-
deleteLayerConfirmOk: "Delete",
|
|
1131
|
-
deleteLayerConfirmCancel: "Cancel",
|
|
1132
|
-
moveSelectedHere: (count) => `Move ${count} selected here`
|
|
1133
|
-
},
|
|
1134
|
-
layerSettings: {
|
|
1135
|
-
pointFeatures: "Point Features",
|
|
1136
|
-
traceLines: "Trace Lines",
|
|
1137
|
-
connectAllPoints: "Connect all points",
|
|
1138
|
-
groupBy: (field) => `Group by ${field}`,
|
|
1139
|
-
heatmap: "Heatmap",
|
|
1140
|
-
intensity: "Intensity",
|
|
1141
|
-
radius: "Radius",
|
|
1142
|
-
clustering: "Clustering",
|
|
1143
|
-
simpleCount: "Simple count",
|
|
1144
|
-
pieBy: (field) => `Pie by ${field}`,
|
|
1145
|
-
showPointDots: "Show point dots",
|
|
1146
|
-
countByField: "Count by field",
|
|
1147
|
-
selectNumericField: "Select numeric field...",
|
|
1148
|
-
colorBubblesByValue: "Color bubbles by value",
|
|
1149
|
-
altitudeDisplay: "Altitude Display",
|
|
1150
|
-
altitude3d: "3D (show altitude)",
|
|
1151
|
-
altitudeFlat: "Flat (ignore altitude)",
|
|
1152
|
-
altitudeBoth: "Both (3D + flat shadow)",
|
|
1153
|
-
visualSettings: "Visual Settings",
|
|
1154
|
-
labels: "Labels",
|
|
1155
|
-
labelFromName: "Use name property",
|
|
1156
|
-
labelFromField: "Use field...",
|
|
1157
|
-
labelFixedText: "Fixed text...",
|
|
1158
|
-
selectField: "Select field...",
|
|
1159
|
-
enterLabelText: "Enter label text...",
|
|
1160
|
-
size: "Size",
|
|
1161
|
-
defaultSize: "Default size",
|
|
1162
|
-
sizeByField: "Size by field...",
|
|
1163
|
-
overrideSize: "Override size...",
|
|
1164
|
-
color: "Color",
|
|
1165
|
-
useFeatureColor: "Use feature color",
|
|
1166
|
-
colorByField: "Color by field...",
|
|
1167
|
-
fixedColor: "Fixed color...",
|
|
1168
|
-
categories: "Categories",
|
|
1169
|
-
gradient: "Gradient",
|
|
1170
|
-
pointIcon: "Point Icon",
|
|
1171
|
-
iconSameForAll: "Same for all",
|
|
1172
|
-
iconByFieldValue: "By field value",
|
|
1173
|
-
icons: "Icons",
|
|
1174
|
-
iconsAssigning: "Assigning icons…",
|
|
1175
|
-
iconsAssignedByAi: "Icons assigned by AI",
|
|
1176
|
-
iconsAssignedByKeywords: "Icons assigned by keyword match",
|
|
1177
|
-
reassignIcons: "Reassign",
|
|
1178
|
-
reassignIconsWithAi: "Let the AI assign every icon again",
|
|
1179
|
-
reassignIconsByKeywords: "Assign every icon again by keyword match (no AI connected)",
|
|
1180
|
-
iconAiUnavailable: (error) => `AI unavailable, used keyword match (${error})`,
|
|
1181
|
-
iconAiNoUsableIcon: "The AI suggested no icon the map can draw, used keyword match",
|
|
1182
|
-
assignNewIcons: (count) => `Assign ${count} new ${plural(count, "value")}`,
|
|
1183
|
-
iconOtherValues: "All other values",
|
|
1184
|
-
iconEmptyOrUnassigned: "Empty or unassigned",
|
|
1185
|
-
legend: "Legend",
|
|
1186
|
-
legendTop: (count) => `Legend (top ${count})`,
|
|
1187
|
-
legendSampled: "Legend (sampled)",
|
|
1188
|
-
filterValues: "Filter values…",
|
|
1189
|
-
noMatches: "No matches",
|
|
1190
|
-
showLess: "Show less",
|
|
1191
|
-
showAll: (count) => `Show all (${count})`
|
|
1192
|
-
},
|
|
1193
|
-
drawingToolbar: {
|
|
1194
|
-
drawingTools: "Drawing tools",
|
|
1195
|
-
clickSelect: "Click Select",
|
|
1196
|
-
rectangleSelect: "Rectangle Select",
|
|
1197
|
-
polygonSelect: "Polygon Select",
|
|
1198
|
-
circleSelect: "Circle Select",
|
|
1199
|
-
selectTool: "Select Tool",
|
|
1200
|
-
switchSelectionMode: "Switch selection mode",
|
|
1201
|
-
filterArea: "Filter Area",
|
|
1202
|
-
clearFilter: "Clear Filter",
|
|
1203
|
-
measureDistance: "Measure Distance",
|
|
1204
|
-
measureArea: "Measure Area",
|
|
1205
|
-
switchMeasureMode: "Switch measure mode",
|
|
1206
|
-
searchAndNavigate: "Search & Navigate",
|
|
1207
|
-
fitToData: "Fit to Data",
|
|
1208
|
-
noEditableLayer: "No editable layer",
|
|
1209
|
-
noEditableLayerHint: "Select an editable layer with the pencil icon to enable editing",
|
|
1210
|
-
editMode: "Edit Mode",
|
|
1211
|
-
searchAndAdd: "Search and Add",
|
|
1212
|
-
dropPoint: "Drop Point",
|
|
1213
|
-
drawLine: "Draw Line",
|
|
1214
|
-
drawPolygon: "Draw Polygon",
|
|
1215
|
-
drawRectangle: "Draw Rectangle",
|
|
1216
|
-
drawPolygonOrRectangle: "Draw Polygon/Rectangle",
|
|
1217
|
-
drawPolygonOrRectangleAriaLabel: "Draw Polygon or Rectangle",
|
|
1218
|
-
addText: "Add Text",
|
|
1219
|
-
drawArrow: "Draw Arrow",
|
|
1220
|
-
drawCircle: "Draw Circle",
|
|
1221
|
-
undo: "Undo",
|
|
1222
|
-
redo: "Redo",
|
|
1223
|
-
deleteSelected: (count) => `Delete selected (${count})`,
|
|
1224
|
-
deleteSelectedAriaLabel: "Delete selected features",
|
|
1225
|
-
clearAll: (count) => `Clear all (${count})`,
|
|
1226
|
-
moreTools: "More tools",
|
|
1227
|
-
clearAllConfirmTitle: "Clear all features?",
|
|
1228
|
-
clearAllConfirmContent: (count) => `This will remove all ${count} ${plural(count, "feature")} from the map. This action cannot be undone.`,
|
|
1229
|
-
clearAllConfirmOk: "Clear all",
|
|
1230
|
-
clearAllConfirmCancel: "Cancel"
|
|
1231
|
-
},
|
|
1232
|
-
navigate: {
|
|
1233
|
-
title: "Navigate To",
|
|
1234
|
-
addressPlaceholder: "Search address...",
|
|
1235
|
-
searchAddress: "Go",
|
|
1236
|
-
orCoordinates: "or coordinates",
|
|
1237
|
-
latitude: "Lat",
|
|
1238
|
-
longitude: "Lng",
|
|
1239
|
-
latitudePlaceholder: "-90 to 90",
|
|
1240
|
-
longitudePlaceholder: "-180 to 180",
|
|
1241
|
-
dropPoint: "Drop",
|
|
1242
|
-
goToCoordinates: "Go",
|
|
1243
|
-
locationNotFound: "Location not found",
|
|
1244
|
-
locationNotFoundDescription: "Try a different search term",
|
|
1245
|
-
searchError: "Search error",
|
|
1246
|
-
searchErrorDescription: "Could not search for location. Check your connection."
|
|
1247
|
-
},
|
|
1248
|
-
coordinates: {
|
|
1249
|
-
invalidCoordinates: "Invalid coordinates",
|
|
1250
|
-
invalidCoordinatesDescription: "Please enter valid latitude and longitude values",
|
|
1251
|
-
invalidLatitude: "Invalid latitude",
|
|
1252
|
-
invalidLongitude: "Invalid longitude",
|
|
1253
|
-
latitudeOutOfRange: "Latitude must be between -90 and 90",
|
|
1254
|
-
longitudeOutOfRange: "Longitude must be between -180 and 180",
|
|
1255
|
-
notANumber: "Please enter a valid number"
|
|
1256
|
-
},
|
|
1257
|
-
featureSearch: {
|
|
1258
|
-
title: "Search Features",
|
|
1259
|
-
placeholder: "Search features...",
|
|
1260
|
-
titlesMode: "Titles",
|
|
1261
|
-
fullJsonMode: "Full JSON",
|
|
1262
|
-
/** `more` is true when the result list stopped at its cap. */
|
|
1263
|
-
resultCount: ({ count, more }) => `${count}${more ? "+" : ""} found`,
|
|
1264
|
-
totalCount: (count) => `${count} total`,
|
|
1265
|
-
noResults: "No features found",
|
|
1266
|
-
typeToSearch: (count) => `Type to search across ${count} features`,
|
|
1267
|
-
untitledFeature: "Feature",
|
|
1268
|
-
unknownGeometry: "Unknown"
|
|
1269
|
-
},
|
|
1270
|
-
propertiesPanel: {
|
|
1271
|
-
showingFirstSelected: ({ shown, total }) => `Showing the first ${shown} of ${total.toLocaleString()} selected features`,
|
|
1272
|
-
previousOverlappingPoint: "Previous overlapping point",
|
|
1273
|
-
nextOverlappingPoint: "Next overlapping point",
|
|
1274
|
-
selectedFeatures: (count) => `${count} selected ${count === 1 ? "feature" : "features"}`,
|
|
1275
|
-
untitledFeature: "Feature",
|
|
1276
|
-
hpLayerHint: "High Performance Layer — does not allow moving / geometrical editing of features",
|
|
1277
|
-
hpBadge: "HP",
|
|
1278
|
-
viewBadge: "View",
|
|
1279
|
-
openInNewTab: "Open in new tab",
|
|
1280
|
-
actions: "Actions",
|
|
1281
|
-
copyToLayer: "Copy to layer",
|
|
1282
|
-
moveToLayer: "Move to layer",
|
|
1283
|
-
untitledLayer: "Untitled",
|
|
1284
|
-
newLayer: "New layer…",
|
|
1285
|
-
newLayerPrompt: "New layer name",
|
|
1286
|
-
changeIcon: "Change icon",
|
|
1287
|
-
setIcon: "Set icon",
|
|
1288
|
-
deleteFeatures: (count) => `Delete ${count} feature${count > 1 ? "s" : ""}`,
|
|
1289
|
-
deleteFeature: "Delete feature",
|
|
1290
|
-
entityCards: "Entity Cards",
|
|
1291
|
-
entityCardsCount: (count) => `Entity Cards (${count})`,
|
|
1292
|
-
properties: "Properties",
|
|
1293
|
-
noEntityCardProvider: "No entity card provider registered",
|
|
1294
|
-
selectSingleToSeeProperties: "Select a single feature to see/set properties",
|
|
1295
|
-
selectSingleToEdit: "Select a single feature to edit properties.",
|
|
1296
|
-
pointDetail: "Point Detail",
|
|
1297
|
-
layer: "Layer:",
|
|
1298
|
-
octostarRecord: "Octostar record",
|
|
1299
|
-
localMapFeature: "Local map feature",
|
|
1300
|
-
unsaved: "Unsaved",
|
|
1301
|
-
createEntity: "Create entity",
|
|
1302
|
-
untitledRecord: "Untitled",
|
|
1303
|
-
refreshFromRecord: "Refresh from record",
|
|
1304
|
-
recordFields: "Record Fields",
|
|
1305
|
-
id: "ID:",
|
|
1306
|
-
featureSaved: "Feature saved",
|
|
1307
|
-
savedTo: (workspace) => `Saved to ${workspace}`,
|
|
1308
|
-
saveFailed: "Save failed",
|
|
1309
|
-
saveFeatureFailed: "Failed to save feature",
|
|
1310
|
-
refreshed: "Refreshed",
|
|
1311
|
-
refreshedDescription: "Properties updated from record",
|
|
1312
|
-
refreshFailed: "Refresh failed"
|
|
1313
|
-
},
|
|
1314
|
-
featureFields: {
|
|
1315
|
-
label: "Label",
|
|
1316
|
-
name: "Name",
|
|
1317
|
-
enterLabel: "Enter label...",
|
|
1318
|
-
featureName: "Feature name",
|
|
1319
|
-
noName: "No name",
|
|
1320
|
-
icon: "Icon",
|
|
1321
|
-
type: "Type",
|
|
1322
|
-
noType: "No type",
|
|
1323
|
-
latLng: "Lat / Lng",
|
|
1324
|
-
centroidHint: "Lat and Lng refer to the centroid of this feature",
|
|
1325
|
-
latitude: "Latitude",
|
|
1326
|
-
longitude: "Longitude",
|
|
1327
|
-
temporal: "Temporal",
|
|
1328
|
-
dateCount: (count) => `${count} ${plural(count, "date")}`,
|
|
1329
|
-
start: "Start",
|
|
1330
|
-
end: "End",
|
|
1331
|
-
style: "Style",
|
|
1332
|
-
fontSize: "Font Size",
|
|
1333
|
-
fontColor: "Font Color",
|
|
1334
|
-
fontWeight: "Font Weight",
|
|
1335
|
-
fontWeightNormal: "Normal",
|
|
1336
|
-
fontWeightBold: "Bold",
|
|
1337
|
-
arrowSize: "Arrow Size",
|
|
1338
|
-
stroke: "Stroke",
|
|
1339
|
-
strokeColor: "Stroke Color",
|
|
1340
|
-
strokeWidth: "Stroke Width",
|
|
1341
|
-
strokeOpacity: "Stroke Opacity",
|
|
1342
|
-
fill: "Fill",
|
|
1343
|
-
fillColor: "Fill Color",
|
|
1344
|
-
fillOpacity: "Fill Opacity",
|
|
1345
|
-
resetFillToStroke: "Reset fill to the stroke colour",
|
|
1346
|
-
iconSize: "Size",
|
|
1347
|
-
propertyKey: "Key",
|
|
1348
|
-
propertyValue: "Value",
|
|
1349
|
-
newProperty: "New property…"
|
|
1350
|
-
},
|
|
1351
|
-
iconPicker: {
|
|
1352
|
-
title: "Select Icon",
|
|
1353
|
-
searchPlaceholder: "Search icons...",
|
|
1354
|
-
allCategories: (count) => `All (${count})`,
|
|
1355
|
-
categoryWithCount: ({ category, count }) => `${category} (${count})`,
|
|
1356
|
-
noIconsFound: (query) => `No icons found for "${query}"`,
|
|
1357
|
-
noIconSelected: "No icon selected",
|
|
1358
|
-
clearIcon: "Clear",
|
|
1359
|
-
cancel: "Cancel",
|
|
1360
|
-
emptyTrigger: "icon",
|
|
1361
|
-
anyEmojiHint: "Any other emoji works too: type or paste it in the search",
|
|
1362
|
-
useEmoji: (emoji) => `Use ${emoji}`,
|
|
1363
|
-
emojiNotEverywhere: "This emoji may not show on every computer: pick another",
|
|
1364
|
-
customEmoji: "Emoji",
|
|
1365
|
-
emojiGroups: {
|
|
1366
|
-
smileys: "Smileys",
|
|
1367
|
-
people: "People",
|
|
1368
|
-
nature: "Animals & nature",
|
|
1369
|
-
food: "Food & drink",
|
|
1370
|
-
travel: "Travel & places",
|
|
1371
|
-
activities: "Activities",
|
|
1372
|
-
objects: "Objects",
|
|
1373
|
-
symbols: "Symbols"
|
|
1374
|
-
}
|
|
1375
|
-
},
|
|
1376
|
-
iconCategories,
|
|
1377
|
-
iconNames,
|
|
1378
|
-
timebar: {
|
|
1379
|
-
play: "Play",
|
|
1380
|
-
pause: "Pause",
|
|
1381
|
-
reset: "Reset timeline",
|
|
1382
|
-
cumulative: "Cumulative: keep what has appeared",
|
|
1383
|
-
toggle: "Toggle timeline",
|
|
1384
|
-
featureCount: (count) => `${count} ${plural(count, "feature")}`,
|
|
1385
|
-
selectedCount: ({ selected, total }) => `${selected} of ${total} selected`,
|
|
1386
|
-
binEvents: (count) => `${count} ${plural(count, "event")}`,
|
|
1387
|
-
binEventsWithSelection: ({ count, selected }) => `${count} ${plural(count, "event")} (${selected} selected)`
|
|
1388
|
-
},
|
|
1389
|
-
actionPanel: {
|
|
1390
|
-
groupLabel: "File actions",
|
|
1391
|
-
saveTooltip: "Download features as GeoJSON",
|
|
1392
|
-
saveAriaLabel: "Save as GeoJSON",
|
|
1393
|
-
save: "Save GeoJSON",
|
|
1394
|
-
loadTooltip: "Import features from GeoJSON file",
|
|
1395
|
-
loadAriaLabel: "Load GeoJSON file",
|
|
1396
|
-
load: "Load GeoJSON"
|
|
1397
|
-
}
|
|
1398
|
-
};
|
|
1399
|
-
const MapLabelsContext = createContext(DEFAULT_MAP_LABELS);
|
|
1400
|
-
function shownLayerName(layer, labels) {
|
|
1401
|
-
return layer.name === DEFAULT_LAYER_NAME ? labels.defaultLayerName : layer.name;
|
|
1402
|
-
}
|
|
1403
|
-
function useMapLabels() {
|
|
1404
|
-
return useContext(MapLabelsContext);
|
|
1405
|
-
}
|
|
1406
1605
|
const SELECTED_STATE_KEY = "selected";
|
|
1407
1606
|
const SELECTED = ["boolean", ["feature-state", SELECTED_STATE_KEY], false];
|
|
1408
1607
|
const SELECTED_STATE = Object.freeze({ [SELECTED_STATE_KEY]: true });
|
|
@@ -2428,6 +2627,155 @@ function resolveMissingImage(id, provider) {
|
|
|
2428
2627
|
if (image == null ? void 0 : image.data) return { kind: "host", image };
|
|
2429
2628
|
return id.startsWith(HOST_IMAGE_PREFIX) ? { kind: "none" } : { kind: "emoji" };
|
|
2430
2629
|
}
|
|
2630
|
+
const ICON_LIST = [
|
|
2631
|
+
// Location & Places
|
|
2632
|
+
{ id: "map-pin", emoji: "📍", name: "Map Pin", category: "places" },
|
|
2633
|
+
{ id: "home", emoji: "🏠", name: "Home", category: "places" },
|
|
2634
|
+
{ id: "building", emoji: "🏢", name: "Building", category: "places" },
|
|
2635
|
+
{ id: "store", emoji: "🏪", name: "Store", category: "places" },
|
|
2636
|
+
{ id: "factory", emoji: "🏭", name: "Factory", category: "places" },
|
|
2637
|
+
{ id: "construction", emoji: "🏗️", name: "Construction", category: "places" },
|
|
2638
|
+
{ id: "church", emoji: "⛪", name: "Church", category: "places" },
|
|
2639
|
+
{ id: "hospital", emoji: "🏥", name: "Hospital", category: "places" },
|
|
2640
|
+
{ id: "school", emoji: "🏫", name: "School", category: "places" },
|
|
2641
|
+
{ id: "graduation", emoji: "🎓", name: "University", category: "places" },
|
|
2642
|
+
{ id: "library", emoji: "📚", name: "Library", category: "places" },
|
|
2643
|
+
{ id: "landmark", emoji: "🏛️", name: "Landmark", category: "places" },
|
|
2644
|
+
{ id: "castle", emoji: "🏰", name: "Castle", category: "places" },
|
|
2645
|
+
{ id: "mosque", emoji: "🕌", name: "Mosque", category: "places" },
|
|
2646
|
+
{ id: "stadium", emoji: "🏟️", name: "Stadium", category: "places" },
|
|
2647
|
+
{ id: "tent", emoji: "⛺", name: "Camping", category: "places" },
|
|
2648
|
+
// Transport
|
|
2649
|
+
{ id: "car", emoji: "🚗", name: "Car", category: "transport" },
|
|
2650
|
+
{ id: "bus", emoji: "🚌", name: "Bus", category: "transport" },
|
|
2651
|
+
{ id: "train", emoji: "🚂", name: "Train", category: "transport" },
|
|
2652
|
+
{ id: "plane", emoji: "✈️", name: "Plane", category: "transport" },
|
|
2653
|
+
{ id: "ship", emoji: "🚢", name: "Ship", category: "transport" },
|
|
2654
|
+
{ id: "bike", emoji: "🚲", name: "Bike", category: "transport" },
|
|
2655
|
+
{ id: "fuel", emoji: "⛽", name: "Gas Station", category: "transport" },
|
|
2656
|
+
{ id: "helicopter", emoji: "🚁", name: "Helicopter", category: "transport" },
|
|
2657
|
+
{ id: "rocket", emoji: "🚀", name: "Rocket", category: "transport" },
|
|
2658
|
+
{ id: "motorcycle", emoji: "🏍️", name: "Motorcycle", category: "transport" },
|
|
2659
|
+
{ id: "taxi", emoji: "🚕", name: "Taxi", category: "transport" },
|
|
2660
|
+
{ id: "truck", emoji: "🚛", name: "Truck", category: "transport" },
|
|
2661
|
+
// Food & Drink
|
|
2662
|
+
{ id: "utensils", emoji: "🍴", name: "Restaurant", category: "food" },
|
|
2663
|
+
{ id: "coffee", emoji: "☕", name: "Coffee", category: "food" },
|
|
2664
|
+
{ id: "beer", emoji: "🍺", name: "Bar", category: "food" },
|
|
2665
|
+
{ id: "wine", emoji: "🍷", name: "Wine", category: "food" },
|
|
2666
|
+
{ id: "pizza", emoji: "🍕", name: "Pizza", category: "food" },
|
|
2667
|
+
{ id: "ice-cream", emoji: "🍦", name: "Ice Cream", category: "food" },
|
|
2668
|
+
{ id: "apple", emoji: "🍎", name: "Apple", category: "food" },
|
|
2669
|
+
{ id: "cake", emoji: "🎂", name: "Cake", category: "food" },
|
|
2670
|
+
{ id: "hamburger", emoji: "🍔", name: "Burger", category: "food" },
|
|
2671
|
+
// Nature
|
|
2672
|
+
{ id: "trees", emoji: "🌲", name: "Forest", category: "nature" },
|
|
2673
|
+
{ id: "mountain", emoji: "⛰️", name: "Mountain", category: "nature" },
|
|
2674
|
+
{ id: "waves", emoji: "🌊", name: "Water", category: "nature" },
|
|
2675
|
+
{ id: "sun", emoji: "☀️", name: "Sun", category: "nature" },
|
|
2676
|
+
{ id: "cloud", emoji: "☁️", name: "Cloud", category: "nature" },
|
|
2677
|
+
{ id: "umbrella", emoji: "🌂", name: "Umbrella", category: "nature" },
|
|
2678
|
+
{ id: "flower", emoji: "🌸", name: "Flower", category: "nature" },
|
|
2679
|
+
{ id: "leaf", emoji: "🍃", name: "Leaf", category: "nature" },
|
|
2680
|
+
{ id: "rainbow", emoji: "🌈", name: "Rainbow", category: "nature" },
|
|
2681
|
+
{ id: "snowflake", emoji: "❄️", name: "Snow", category: "nature" },
|
|
2682
|
+
{ id: "fire", emoji: "🔥", name: "Fire", category: "nature" },
|
|
2683
|
+
{ id: "volcano", emoji: "🌋", name: "Volcano", category: "nature" },
|
|
2684
|
+
// Symbols & Markers
|
|
2685
|
+
{ id: "heart", emoji: "❤️", name: "Heart", category: "symbols" },
|
|
2686
|
+
{ id: "star", emoji: "⭐", name: "Star", category: "symbols" },
|
|
2687
|
+
{ id: "flag", emoji: "🚩", name: "Flag", category: "symbols" },
|
|
2688
|
+
{ id: "alert", emoji: "⚠️", name: "Warning", category: "symbols" },
|
|
2689
|
+
{ id: "info", emoji: "ℹ️", name: "Info", category: "symbols" },
|
|
2690
|
+
{ id: "check", emoji: "✅", name: "Check", category: "symbols" },
|
|
2691
|
+
{ id: "x-mark", emoji: "❌", name: "X", category: "symbols" },
|
|
2692
|
+
{ id: "zap", emoji: "⚡", name: "Zap", category: "symbols" },
|
|
2693
|
+
{ id: "bell", emoji: "🔔", name: "Bell", category: "symbols" },
|
|
2694
|
+
{ id: "peace", emoji: "☮️", name: "Peace", category: "symbols" },
|
|
2695
|
+
{ id: "recycle", emoji: "♻️", name: "Recycle", category: "symbols" },
|
|
2696
|
+
{ id: "radioactive", emoji: "☢️", name: "Radioactive", category: "symbols" },
|
|
2697
|
+
{ id: "biohazard", emoji: "☣️", name: "Biohazard", category: "symbols" },
|
|
2698
|
+
// Activities
|
|
2699
|
+
{ id: "camera", emoji: "📷", name: "Camera", category: "activities" },
|
|
2700
|
+
{ id: "music", emoji: "🎵", name: "Music", category: "activities" },
|
|
2701
|
+
{ id: "film", emoji: "🎬", name: "Cinema", category: "activities" },
|
|
2702
|
+
{ id: "gamepad", emoji: "🎮", name: "Gaming", category: "activities" },
|
|
2703
|
+
{ id: "trophy", emoji: "🏆", name: "Trophy", category: "activities" },
|
|
2704
|
+
{ id: "medal", emoji: "🎖️", name: "Medal", category: "activities" },
|
|
2705
|
+
{ id: "sports", emoji: "⚽", name: "Sports", category: "activities" },
|
|
2706
|
+
{ id: "basketball", emoji: "🏀", name: "Basketball", category: "activities" },
|
|
2707
|
+
{ id: "fishing", emoji: "🎣", name: "Fishing", category: "activities" },
|
|
2708
|
+
{ id: "art", emoji: "🎨", name: "Art", category: "activities" },
|
|
2709
|
+
// Work & Tools
|
|
2710
|
+
{ id: "briefcase", emoji: "💼", name: "Office", category: "work" },
|
|
2711
|
+
{ id: "wrench", emoji: "🔧", name: "Repair", category: "work" },
|
|
2712
|
+
{ id: "hammer", emoji: "🔨", name: "Construction", category: "work" },
|
|
2713
|
+
{ id: "gear", emoji: "⚙️", name: "Settings", category: "work" },
|
|
2714
|
+
{ id: "microscope", emoji: "🔬", name: "Science", category: "work" },
|
|
2715
|
+
{ id: "test-tube", emoji: "🧪", name: "Lab", category: "work" },
|
|
2716
|
+
{ id: "computer", emoji: "💻", name: "Computer", category: "work" },
|
|
2717
|
+
// Shopping
|
|
2718
|
+
{ id: "cart", emoji: "🛒", name: "Shopping", category: "shopping" },
|
|
2719
|
+
{ id: "gift", emoji: "🎁", name: "Gift", category: "shopping" },
|
|
2720
|
+
{ id: "package", emoji: "📦", name: "Package", category: "shopping" },
|
|
2721
|
+
{ id: "money", emoji: "💰", name: "Money", category: "shopping" },
|
|
2722
|
+
{ id: "credit-card", emoji: "💳", name: "Payment", category: "shopping" },
|
|
2723
|
+
// Communication
|
|
2724
|
+
{ id: "phone", emoji: "📱", name: "Phone", category: "communication" },
|
|
2725
|
+
{ id: "mail", emoji: "📧", name: "Mail", category: "communication" },
|
|
2726
|
+
{ id: "globe", emoji: "🌐", name: "Web", category: "communication" },
|
|
2727
|
+
{ id: "satellite", emoji: "📡", name: "Satellite", category: "communication" },
|
|
2728
|
+
{ id: "radio", emoji: "📻", name: "Radio", category: "communication" },
|
|
2729
|
+
{ id: "tv", emoji: "📺", name: "TV", category: "communication" },
|
|
2730
|
+
// People & Animals
|
|
2731
|
+
{ id: "user", emoji: "👤", name: "Person", category: "people" },
|
|
2732
|
+
{ id: "users", emoji: "👥", name: "Group", category: "people" },
|
|
2733
|
+
{ id: "baby", emoji: "👶", name: "Baby", category: "people" },
|
|
2734
|
+
{ id: "dog", emoji: "🐕", name: "Dog", category: "people" },
|
|
2735
|
+
{ id: "cat", emoji: "🐈", name: "Cat", category: "people" },
|
|
2736
|
+
{ id: "bird", emoji: "🐦", name: "Bird", category: "people" },
|
|
2737
|
+
{ id: "horse", emoji: "🐴", name: "Horse", category: "people" },
|
|
2738
|
+
{ id: "fish", emoji: "🐟", name: "Fish", category: "people" },
|
|
2739
|
+
// Maritime & Navigation
|
|
2740
|
+
{ id: "anchor", emoji: "⚓", name: "Anchor", category: "maritime" },
|
|
2741
|
+
{ id: "compass", emoji: "🧭", name: "Compass", category: "maritime" },
|
|
2742
|
+
{ id: "lighthouse", emoji: "🗼", name: "Lighthouse", category: "maritime" },
|
|
2743
|
+
{ id: "sailboat", emoji: "⛵", name: "Sailboat", category: "maritime" },
|
|
2744
|
+
// Security
|
|
2745
|
+
{ id: "lock", emoji: "🔒", name: "Lock", category: "security" },
|
|
2746
|
+
{ id: "key", emoji: "🔑", name: "Key", category: "security" },
|
|
2747
|
+
{ id: "shield", emoji: "🛡️", name: "Shield", category: "security" },
|
|
2748
|
+
{ id: "eye", emoji: "👁️", name: "Eye", category: "security" },
|
|
2749
|
+
{ id: "search", emoji: "🔍", name: "Search", category: "security" },
|
|
2750
|
+
{ id: "police", emoji: "🚔", name: "Police", category: "security" },
|
|
2751
|
+
{ id: "siren", emoji: "🚨", name: "Siren", category: "security" },
|
|
2752
|
+
// Time & Organization
|
|
2753
|
+
{ id: "clock", emoji: "🕐", name: "Clock", category: "time" },
|
|
2754
|
+
{ id: "calendar", emoji: "📅", name: "Calendar", category: "time" },
|
|
2755
|
+
{ id: "bookmark", emoji: "🔖", name: "Bookmark", category: "time" },
|
|
2756
|
+
{ id: "tag", emoji: "🏷️", name: "Tag", category: "time" },
|
|
2757
|
+
{ id: "pushpin", emoji: "📌", name: "Pin", category: "time" },
|
|
2758
|
+
// Shapes & Geometric
|
|
2759
|
+
{ id: "red-circle", emoji: "🔴", name: "Red Circle", category: "shapes" },
|
|
2760
|
+
{ id: "blue-circle", emoji: "🔵", name: "Blue Circle", category: "shapes" },
|
|
2761
|
+
{ id: "green-circle", emoji: "🟢", name: "Green Circle", category: "shapes" },
|
|
2762
|
+
{ id: "yellow-circle", emoji: "🟡", name: "Yellow Circle", category: "shapes" },
|
|
2763
|
+
{ id: "orange-circle", emoji: "🟠", name: "Orange Circle", category: "shapes" },
|
|
2764
|
+
{ id: "purple-circle", emoji: "🟣", name: "Purple Circle", category: "shapes" },
|
|
2765
|
+
{ id: "white-circle", emoji: "⚪", name: "White Circle", category: "shapes" },
|
|
2766
|
+
{ id: "black-circle", emoji: "⚫", name: "Black Circle", category: "shapes" },
|
|
2767
|
+
{ id: "red-square", emoji: "🟥", name: "Red Square", category: "shapes" },
|
|
2768
|
+
{ id: "blue-square", emoji: "🟦", name: "Blue Square", category: "shapes" },
|
|
2769
|
+
{ id: "diamond", emoji: "💎", name: "Diamond", category: "shapes" },
|
|
2770
|
+
// Arrows
|
|
2771
|
+
{ id: "arrow-up", emoji: "⬆️", name: "Arrow Up", category: "arrows" },
|
|
2772
|
+
{ id: "arrow-down", emoji: "⬇️", name: "Arrow Down", category: "arrows" },
|
|
2773
|
+
{ id: "arrow-left", emoji: "⬅️", name: "Arrow Left", category: "arrows" },
|
|
2774
|
+
{ id: "arrow-right", emoji: "➡️", name: "Arrow Right", category: "arrows" },
|
|
2775
|
+
{ id: "target", emoji: "🎯", name: "Target", category: "arrows" }
|
|
2776
|
+
];
|
|
2777
|
+
const ICONS = [...ICON_LIST];
|
|
2778
|
+
const EMOJI_BY_ID = new Map(ICONS.map((i) => [i.id, i.emoji]));
|
|
2431
2779
|
function windowFromRange(start, end) {
|
|
2432
2780
|
if (!start || !end) return null;
|
|
2433
2781
|
const t0 = start.getTime();
|
|
@@ -4909,8 +5257,8 @@ const CATEGORIES = [
|
|
|
4909
5257
|
"arrows"
|
|
4910
5258
|
];
|
|
4911
5259
|
function IconPicker({ value, onChange, disabled = false, renderTrigger, open: controlledOpen, onOpenChange }) {
|
|
4912
|
-
const { iconPicker: labels, iconNames
|
|
4913
|
-
const iconName = useCallback((icon) =>
|
|
5260
|
+
const { iconPicker: labels, iconNames, iconCategories } = useMapLabels();
|
|
5261
|
+
const iconName = useCallback((icon) => iconNames[icon.id] ?? icon.name, [iconNames]);
|
|
4914
5262
|
const [internalOpen, setInternalOpen] = useState(false);
|
|
4915
5263
|
const open = controlledOpen ?? internalOpen;
|
|
4916
5264
|
const setOpen = useCallback((v) => {
|
|
@@ -4929,11 +5277,11 @@ function IconPicker({ value, onChange, disabled = false, renderTrigger, open: co
|
|
|
4929
5277
|
if (search.trim()) {
|
|
4930
5278
|
const searchLower = search.toLowerCase().trim();
|
|
4931
5279
|
result = result.filter(
|
|
4932
|
-
(i) => iconName(i).toLowerCase().includes(searchLower) || i.name.toLowerCase().includes(searchLower) || i.id.toLowerCase().includes(searchLower) || i.category.toLowerCase().includes(searchLower) || (
|
|
5280
|
+
(i) => iconName(i).toLowerCase().includes(searchLower) || i.name.toLowerCase().includes(searchLower) || i.id.toLowerCase().includes(searchLower) || i.category.toLowerCase().includes(searchLower) || (iconCategories[i.category] ?? "").toLowerCase().includes(searchLower)
|
|
4933
5281
|
);
|
|
4934
5282
|
}
|
|
4935
5283
|
return result;
|
|
4936
|
-
}, [activeCategory, activeEmojiGroup, search, iconName,
|
|
5284
|
+
}, [activeCategory, activeEmojiGroup, search, iconName, iconCategories]);
|
|
4937
5285
|
const emojiShown = useMemo(() => {
|
|
4938
5286
|
if (activeEmojiGroup) return EMOJI_LIST[activeEmojiGroup];
|
|
4939
5287
|
const query = search.toLowerCase().trim();
|
|
@@ -5020,7 +5368,7 @@ function IconPicker({ value, onChange, disabled = false, renderTrigger, open: co
|
|
|
5020
5368
|
setSearch("");
|
|
5021
5369
|
},
|
|
5022
5370
|
"data-testid": `button-category-${cat}`,
|
|
5023
|
-
children: labels.categoryWithCount({ category:
|
|
5371
|
+
children: labels.categoryWithCount({ category: iconCategories[cat], count })
|
|
5024
5372
|
},
|
|
5025
5373
|
cat
|
|
5026
5374
|
);
|
|
@@ -5738,7 +6086,7 @@ function DrawingToolbar({
|
|
|
5738
6086
|
/* @__PURE__ */ jsx(Undo2, { className: "w-4 h-4" }),
|
|
5739
6087
|
labels.undo
|
|
5740
6088
|
] }),
|
|
5741
|
-
showShortcutHints && /* @__PURE__ */ jsx("kbd", { className: "px-1.5 py-0.5 text-xs font-mono bg-black/10 dark:bg-white/10 rounded", children:
|
|
6089
|
+
showShortcutHints && /* @__PURE__ */ jsx("kbd", { className: "px-1.5 py-0.5 text-xs font-mono bg-black/10 dark:bg-white/10 rounded", children: labels.undoShortcut })
|
|
5742
6090
|
] }),
|
|
5743
6091
|
disabled: disabled || !canUndo,
|
|
5744
6092
|
onClick: onUndo
|
|
@@ -5750,7 +6098,7 @@ function DrawingToolbar({
|
|
|
5750
6098
|
/* @__PURE__ */ jsx(Redo2, { className: "w-4 h-4" }),
|
|
5751
6099
|
labels.redo
|
|
5752
6100
|
] }),
|
|
5753
|
-
showShortcutHints && /* @__PURE__ */ jsx("kbd", { className: "px-1.5 py-0.5 text-xs font-mono bg-black/10 dark:bg-white/10 rounded", children:
|
|
6101
|
+
showShortcutHints && /* @__PURE__ */ jsx("kbd", { className: "px-1.5 py-0.5 text-xs font-mono bg-black/10 dark:bg-white/10 rounded", children: labels.redoShortcut })
|
|
5754
6102
|
] }),
|
|
5755
6103
|
disabled: disabled || !canRedo,
|
|
5756
6104
|
onClick: onRedo
|
|
@@ -5764,7 +6112,7 @@ function DrawingToolbar({
|
|
|
5764
6112
|
/* @__PURE__ */ jsx(X, { className: "w-4 h-4" }),
|
|
5765
6113
|
labels.deleteSelected(selectedCount)
|
|
5766
6114
|
] }),
|
|
5767
|
-
showShortcutHints && /* @__PURE__ */ jsx("kbd", { className: "px-1.5 py-0.5 text-xs font-mono bg-black/10 dark:bg-white/10 rounded", children:
|
|
6115
|
+
showShortcutHints && /* @__PURE__ */ jsx("kbd", { className: "px-1.5 py-0.5 text-xs font-mono bg-black/10 dark:bg-white/10 rounded", children: labels.deleteKey })
|
|
5768
6116
|
] }),
|
|
5769
6117
|
disabled: disabled || selectedCount === 0,
|
|
5770
6118
|
onClick: onDeleteSelected
|
|
@@ -6200,7 +6548,7 @@ function DrawingToolbar({
|
|
|
6200
6548
|
{
|
|
6201
6549
|
title: showShortcutHints ? /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
|
|
6202
6550
|
labels.undo,
|
|
6203
|
-
/* @__PURE__ */ jsx("kbd", { className: "px-1.5 py-0.5 text-xs font-mono bg-black/20 rounded", children:
|
|
6551
|
+
/* @__PURE__ */ jsx("kbd", { className: "px-1.5 py-0.5 text-xs font-mono bg-black/20 rounded", children: labels.undoShortcut })
|
|
6204
6552
|
] }) : labels.undo,
|
|
6205
6553
|
placement: "right",
|
|
6206
6554
|
children: /* @__PURE__ */ jsx(
|
|
@@ -6222,7 +6570,7 @@ function DrawingToolbar({
|
|
|
6222
6570
|
{
|
|
6223
6571
|
title: showShortcutHints ? /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
|
|
6224
6572
|
labels.redo,
|
|
6225
|
-
/* @__PURE__ */ jsx("kbd", { className: "px-1.5 py-0.5 text-xs font-mono bg-black/20 rounded", children:
|
|
6573
|
+
/* @__PURE__ */ jsx("kbd", { className: "px-1.5 py-0.5 text-xs font-mono bg-black/20 rounded", children: labels.redoShortcut })
|
|
6226
6574
|
] }) : labels.redo,
|
|
6227
6575
|
placement: "right",
|
|
6228
6576
|
children: /* @__PURE__ */ jsx(
|
|
@@ -6248,7 +6596,7 @@ function DrawingToolbar({
|
|
|
6248
6596
|
{
|
|
6249
6597
|
title: showShortcutHints ? /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
|
|
6250
6598
|
labels.deleteSelected(selectedCount),
|
|
6251
|
-
/* @__PURE__ */ jsx("kbd", { className: "px-1.5 py-0.5 text-xs font-mono bg-black/20 rounded", children:
|
|
6599
|
+
/* @__PURE__ */ jsx("kbd", { className: "px-1.5 py-0.5 text-xs font-mono bg-black/20 rounded", children: labels.deleteKey })
|
|
6252
6600
|
] }) : labels.deleteSelected(selectedCount),
|
|
6253
6601
|
placement: "right",
|
|
6254
6602
|
children: /* @__PURE__ */ jsx(
|
|
@@ -7404,12 +7752,12 @@ function LayersPanel({
|
|
|
7404
7752
|
iconSuggestionProvider
|
|
7405
7753
|
}) {
|
|
7406
7754
|
const {
|
|
7407
|
-
canvas:
|
|
7755
|
+
canvas: canvasLabels2,
|
|
7408
7756
|
layersPanel: labels,
|
|
7409
7757
|
layerSettings: settingsLabels,
|
|
7410
7758
|
mapOptions: optionsLabels
|
|
7411
7759
|
} = useMapLabels();
|
|
7412
|
-
const shownName = useCallback((layer) => shownLayerName(layer,
|
|
7760
|
+
const shownName = useCallback((layer) => shownLayerName(layer, canvasLabels2), [canvasLabels2]);
|
|
7413
7761
|
const confirm = useConfirm();
|
|
7414
7762
|
const [editingLayerId, setEditingLayerId] = useState(null);
|
|
7415
7763
|
const [editingName, setEditingName] = useState("");
|
|
@@ -8659,7 +9007,7 @@ function EntityCardsList({
|
|
|
8659
9007
|
] });
|
|
8660
9008
|
}
|
|
8661
9009
|
function StackPager({ stack }) {
|
|
8662
|
-
const { propertiesPanel: labels, canvas:
|
|
9010
|
+
const { propertiesPanel: labels, canvas: canvasLabels2 } = useMapLabels();
|
|
8663
9011
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-3 py-1 border-b border-border shrink-0 text-xs text-muted-foreground", children: [
|
|
8664
9012
|
/* @__PURE__ */ jsx(Tooltip, { title: labels.previousOverlappingPoint, children: /* @__PURE__ */ jsx(
|
|
8665
9013
|
Button,
|
|
@@ -8673,7 +9021,7 @@ function StackPager({ stack }) {
|
|
|
8673
9021
|
"data-testid": "button-stack-prev"
|
|
8674
9022
|
}
|
|
8675
9023
|
) }),
|
|
8676
|
-
/* @__PURE__ */ jsx(Tooltip, { title: stack.more ?
|
|
9024
|
+
/* @__PURE__ */ jsx(Tooltip, { title: stack.more ? canvasLabels2.morePointsHint : void 0, children: /* @__PURE__ */ jsxs("span", { "data-testid": "panel-stack-position", children: [
|
|
8677
9025
|
stack.position + 1,
|
|
8678
9026
|
" / ",
|
|
8679
9027
|
stack.count,
|
|
@@ -8923,10 +9271,10 @@ function PropertiesPanel({ selectedFeatures, onUpdateProperties, onUpdateGeometr
|
|
|
8923
9271
|
propertiesPanel: labels,
|
|
8924
9272
|
featureFields: fieldLabels,
|
|
8925
9273
|
coordinates: coordinateLabels,
|
|
8926
|
-
canvas:
|
|
9274
|
+
canvas: canvasLabels2
|
|
8927
9275
|
} = useMapLabels();
|
|
8928
9276
|
const inlineEntityCardLabel = inlineEntityCardLabelProp ?? labels.pointDetail;
|
|
8929
|
-
const shownName = layerName !== void 0 && layerId !== void 0 ? shownLayerName({ name: layerName },
|
|
9277
|
+
const shownName = layerName !== void 0 && layerId !== void 0 ? shownLayerName({ name: layerName }, canvasLabels2) : layerName;
|
|
8930
9278
|
const { toast } = useToast();
|
|
8931
9279
|
const hasMultipleSelection = selectedFeatures.length > 1;
|
|
8932
9280
|
const [isSaving, setIsSaving] = useState(false);
|
|
@@ -8990,7 +9338,7 @@ function PropertiesPanel({ selectedFeatures, onUpdateProperties, onUpdateGeometr
|
|
|
8990
9338
|
targetLayers.forEach((l) => {
|
|
8991
9339
|
items.push({
|
|
8992
9340
|
key: l.id,
|
|
8993
|
-
label: shownLayerName(l,
|
|
9341
|
+
label: shownLayerName(l, canvasLabels2) || labels.untitledLayer,
|
|
8994
9342
|
onClick: () => {
|
|
8995
9343
|
if (action === "copy") {
|
|
8996
9344
|
onCopyFeaturesToLayer == null ? void 0 : onCopyFeaturesToLayer(featureIds, l.id);
|
|
@@ -9014,7 +9362,7 @@ function PropertiesPanel({ selectedFeatures, onUpdateProperties, onUpdateGeometr
|
|
|
9014
9362
|
});
|
|
9015
9363
|
}
|
|
9016
9364
|
return items;
|
|
9017
|
-
}, [targetLayers, featureIds, onCopyFeaturesToLayer, onMoveFeaturesToLayer, onCreateLayerAndCopyFeatures, onCreateLayerAndMoveFeatures, labels,
|
|
9365
|
+
}, [targetLayers, featureIds, onCopyFeaturesToLayer, onMoveFeaturesToLayer, onCreateLayerAndCopyFeatures, onCreateLayerAndMoveFeatures, labels, canvasLabels2]);
|
|
9018
9366
|
const [name, setName] = useState("");
|
|
9019
9367
|
const [description, setDescription] = useState("");
|
|
9020
9368
|
const [startDate, setStartDate] = useState("");
|
|
@@ -9027,7 +9375,7 @@ function PropertiesPanel({ selectedFeatures, onUpdateProperties, onUpdateGeometr
|
|
|
9027
9375
|
const [strokeOpacity, setStrokeOpacity] = useState(1);
|
|
9028
9376
|
const [fillColor, setFillColor] = useState("#3b82f6");
|
|
9029
9377
|
const [fillOpacity, setFillOpacity] = useState(0.2);
|
|
9030
|
-
const [labelText, setLabelText] = useState(
|
|
9378
|
+
const [labelText, setLabelText] = useState(canvasLabels2.newTextLabel);
|
|
9031
9379
|
const [fontSize, setFontSize] = useState(14);
|
|
9032
9380
|
const [fontColor, setFontColor] = useState("#000000");
|
|
9033
9381
|
const [fontWeight, setFontWeight] = useState("normal");
|
|
@@ -9043,7 +9391,7 @@ function PropertiesPanel({ selectedFeatures, onUpdateProperties, onUpdateGeometr
|
|
|
9043
9391
|
useEffect(() => {
|
|
9044
9392
|
if (feature) {
|
|
9045
9393
|
if (feature.properties.kind === "text") {
|
|
9046
|
-
const textLabel = feature.properties.label || feature.properties.text ||
|
|
9394
|
+
const textLabel = feature.properties.label || feature.properties.text || canvasLabels2.newTextLabel;
|
|
9047
9395
|
setName(textLabel);
|
|
9048
9396
|
setLabelText(textLabel);
|
|
9049
9397
|
} else {
|
|
@@ -10761,10 +11109,9 @@ function Timebar({
|
|
|
10761
11109
|
className,
|
|
10762
11110
|
timebarExtra,
|
|
10763
11111
|
keepExtraWhenEmpty = false,
|
|
10764
|
-
formatCount
|
|
10765
|
-
labels: labelOverrides
|
|
11112
|
+
formatCount
|
|
10766
11113
|
}) {
|
|
10767
|
-
const labels =
|
|
11114
|
+
const labels = useMapLabels().timebar;
|
|
10768
11115
|
const {
|
|
10769
11116
|
isEnabled,
|
|
10770
11117
|
hasTemporalData,
|
|
@@ -11034,7 +11381,7 @@ function Timebar({
|
|
|
11034
11381
|
{
|
|
11035
11382
|
className: "text-xs text-muted-foreground ml-1",
|
|
11036
11383
|
"data-testid": "text-timeline-feature-count",
|
|
11037
|
-
children:
|
|
11384
|
+
children: formatCount ? formatCount({
|
|
11038
11385
|
total: temporalFeatures.length,
|
|
11039
11386
|
selected: hasSelection ? selectedTemporalFeatures.length : null
|
|
11040
11387
|
}) : hasSelection ? labels.selectedCount({ selected: selectedTemporalFeatures.length, total: temporalFeatures.length }) : labels.featureCount(temporalFeatures.length)
|
|
@@ -12946,9 +13293,10 @@ const MapEditorCanvas = forwardRef(function MapEditorCanvas2({
|
|
|
12946
13293
|
keepTimebarExtra = false,
|
|
12947
13294
|
onOpenInNewTab,
|
|
12948
13295
|
onEntityContextMenu,
|
|
12949
|
-
|
|
13296
|
+
language
|
|
12950
13297
|
}, ref) {
|
|
12951
|
-
const
|
|
13298
|
+
const shownLocale = useMapLocale(language);
|
|
13299
|
+
const labels = mapLabelsFor(shownLocale);
|
|
12952
13300
|
const labelsRef = useRef(labels);
|
|
12953
13301
|
labelsRef.current = labels;
|
|
12954
13302
|
const mapContainer = useRef(null);
|
|
@@ -14389,6 +14737,7 @@ const MapEditorCanvas = forwardRef(function MapEditorCanvas2({
|
|
|
14389
14737
|
preDragRef.current = null;
|
|
14390
14738
|
if (!pre || isApiAddingRef.current || pendingCaptureRef.current) return;
|
|
14391
14739
|
pendingCaptureRef.current = {
|
|
14740
|
+
// eslint-disable-next-line i18next/no-literal-string -- undo labels only reach debug logs
|
|
14392
14741
|
label: "move feature",
|
|
14393
14742
|
before: pre.features,
|
|
14394
14743
|
beforeLayers: pre.layers,
|
|
@@ -16404,27 +16753,27 @@ const MapEditorCanvas = forwardRef(function MapEditorCanvas2({
|
|
|
16404
16753
|
const handleClear = useCallback(() => {
|
|
16405
16754
|
if (!draw.current) return;
|
|
16406
16755
|
const activeLayer = layersRef.current.find((l) => l.id === activeEditingLayerId);
|
|
16407
|
-
const
|
|
16756
|
+
const toastLabels2 = labelsRef.current.toasts;
|
|
16408
16757
|
if (!activeLayer) {
|
|
16409
16758
|
toast({
|
|
16410
|
-
title:
|
|
16411
|
-
description:
|
|
16759
|
+
title: toastLabels2.noLayerSelected,
|
|
16760
|
+
description: toastLabels2.noLayerSelectedDescription,
|
|
16412
16761
|
variant: "destructive"
|
|
16413
16762
|
});
|
|
16414
16763
|
return;
|
|
16415
16764
|
}
|
|
16416
16765
|
if (activeLayer.readOnly) {
|
|
16417
16766
|
toast({
|
|
16418
|
-
title:
|
|
16419
|
-
description:
|
|
16767
|
+
title: toastLabels2.cannotClearHpLayer,
|
|
16768
|
+
description: toastLabels2.cannotClearHpLayerDescription,
|
|
16420
16769
|
variant: "destructive"
|
|
16421
16770
|
});
|
|
16422
16771
|
return;
|
|
16423
16772
|
}
|
|
16424
16773
|
if (activeLayer.featureIds.length === 0) {
|
|
16425
16774
|
toast({
|
|
16426
|
-
title:
|
|
16427
|
-
description:
|
|
16775
|
+
title: toastLabels2.layerEmpty,
|
|
16776
|
+
description: toastLabels2.layerEmptyDescription
|
|
16428
16777
|
});
|
|
16429
16778
|
return;
|
|
16430
16779
|
}
|
|
@@ -16445,8 +16794,8 @@ const MapEditorCanvas = forwardRef(function MapEditorCanvas2({
|
|
|
16445
16794
|
scheduleTimelineUpdate();
|
|
16446
16795
|
scheduleSync();
|
|
16447
16796
|
toast({
|
|
16448
|
-
title:
|
|
16449
|
-
description:
|
|
16797
|
+
title: toastLabels2.layerCleared,
|
|
16798
|
+
description: toastLabels2.layerClearedDescription(shownLayerName(activeLayer, labelsRef.current.canvas))
|
|
16450
16799
|
});
|
|
16451
16800
|
}, [activeEditingLayerId, saveStateForUndo, updateFeatureCount, scheduleTimelineUpdate, scheduleSync, toast]);
|
|
16452
16801
|
const handleDeleteSelected = useCallback(() => {
|
|
@@ -19644,6 +19993,16 @@ const MapEditorCanvas = forwardRef(function MapEditorCanvas2({
|
|
|
19644
19993
|
}
|
|
19645
19994
|
};
|
|
19646
19995
|
}, [isMapLoaded, layers, currentMapStyle]);
|
|
19996
|
+
const newTextLabel = labels.canvas.newTextLabel;
|
|
19997
|
+
useEffect(() => {
|
|
19998
|
+
var _a;
|
|
19999
|
+
const m = map.current;
|
|
20000
|
+
if (!m || !isMapLoaded) return;
|
|
20001
|
+
const hostLabels = customLayerId("host-labels", SHARED_SOURCE_ID);
|
|
20002
|
+
const textField = buildCustomLabelLayout(newTextLabel)["text-field"];
|
|
20003
|
+
[...((_a = shardRegistryRef.current) == null ? void 0 : _a.labelLayerIds("all")) ?? [], SELECTION_OVERLAY_LAYER_IDS.label].filter((id) => id !== hostLabels && m.getLayer(id)).forEach((id) => m.setLayoutProperty(id, "text-field", textField));
|
|
20004
|
+
}, [isMapLoaded, newTextLabel]);
|
|
20005
|
+
const clusterOtherLabel = labels.canvas.clusterOther;
|
|
19647
20006
|
useEffect(() => {
|
|
19648
20007
|
if (!map.current || !draw.current || !isMapLoaded) return;
|
|
19649
20008
|
const mapInstance = map.current;
|
|
@@ -19796,7 +20155,7 @@ const MapEditorCanvas = forwardRef(function MapEditorCanvas2({
|
|
|
19796
20155
|
sourceId,
|
|
19797
20156
|
categoryValues,
|
|
19798
20157
|
categoryColorMap,
|
|
19799
|
-
|
|
20158
|
+
clusterOtherLabel
|
|
19800
20159
|
);
|
|
19801
20160
|
clusterPieManagers.current.set(layer.id, pieManager);
|
|
19802
20161
|
} else {
|
|
@@ -19966,7 +20325,7 @@ const MapEditorCanvas = forwardRef(function MapEditorCanvas2({
|
|
|
19966
20325
|
} catch {
|
|
19967
20326
|
}
|
|
19968
20327
|
};
|
|
19969
|
-
}, [isMapLoaded, layers, currentMapStyle, hashStringToColor$1, clusterDataVersion]);
|
|
20328
|
+
}, [isMapLoaded, layers, currentMapStyle, hashStringToColor$1, clusterDataVersion, clusterOtherLabel]);
|
|
19970
20329
|
if (mapError) {
|
|
19971
20330
|
return /* @__PURE__ */ jsx("div", { className: `flex items-center justify-center h-full bg-muted/30 ${className || ""}`, "data-testid": "map-error", children: /* @__PURE__ */ jsxs(Card, { className: "max-w-md", children: [
|
|
19972
20331
|
/* @__PURE__ */ jsx("div", { className: "p-4 border-b border-border", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
@@ -21490,7 +21849,6 @@ export {
|
|
|
21490
21849
|
ActionPanel,
|
|
21491
21850
|
ClusterPieManager,
|
|
21492
21851
|
ColorPickerPopover,
|
|
21493
|
-
DEFAULT_MAP_LABELS,
|
|
21494
21852
|
DEFAULT_MAX_FEATURES_PER_LAYER,
|
|
21495
21853
|
DebugSidebar,
|
|
21496
21854
|
DrawingToolbar,
|