@ogc-maps/storybook-components 0.5.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Legend-BMrkY-rw.js → Legend-TTWWpWDT.js} +21 -18
- package/dist/components/LayerEditor/LayerEditor.d.ts.map +1 -1
- package/dist/components/Legend/Legend.d.ts.map +1 -1
- package/dist/components/Legend/index.js +1 -1
- package/dist/components/StyleEditor/PropertyField.d.ts +9 -0
- package/dist/components/StyleEditor/PropertyField.d.ts.map +1 -0
- package/dist/components/StyleEditor/PropertyGroup.d.ts +11 -0
- package/dist/components/StyleEditor/PropertyGroup.d.ts.map +1 -0
- package/dist/components/StyleEditor/StyleEditor.d.ts +3 -2
- package/dist/components/StyleEditor/StyleEditor.d.ts.map +1 -1
- package/dist/components/StyleEditor/StylePreview.d.ts +5 -0
- package/dist/components/StyleEditor/StylePreview.d.ts.map +1 -0
- package/dist/components/StyleEditor/index.d.ts +1 -1
- package/dist/components/StyleEditor/index.d.ts.map +1 -1
- package/dist/components/StyleEditor/propertyMetadata.d.ts +16 -0
- package/dist/components/StyleEditor/propertyMetadata.d.ts.map +1 -0
- package/dist/components/StyleEditor/propertyRegistry.d.ts +4 -0
- package/dist/components/StyleEditor/propertyRegistry.d.ts.map +1 -0
- package/dist/components/admin/CollapsibleSection.d.ts +8 -0
- package/dist/components/admin/CollapsibleSection.d.ts.map +1 -0
- package/dist/components/admin/index.d.ts +2 -0
- package/dist/components/admin/index.d.ts.map +1 -1
- package/dist/index-DoToolWp.js +2959 -0
- package/dist/main.js +1146 -973
- package/dist/schemas/config.d.ts +2896 -23
- package/dist/schemas/config.d.ts.map +1 -1
- package/dist/schemas/index.js +3 -3
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +8 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +28 -22
- package/dist/utils/queryableHelpers.d.ts +4 -3
- package/dist/utils/queryableHelpers.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/index-Bw9lUiuL.js +0 -2860
package/dist/main.js
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { B as
|
|
2
|
-
import { C as
|
|
3
|
-
import { C as
|
|
4
|
-
import { E as
|
|
5
|
-
import { F as
|
|
6
|
-
import { F as
|
|
7
|
-
import { L as
|
|
8
|
-
import { L as
|
|
9
|
-
import { S as
|
|
10
|
-
import { jsxs as
|
|
11
|
-
import { useState as w, useEffect as J, useRef as
|
|
12
|
-
import { I as
|
|
13
|
-
import { a as
|
|
14
|
-
import { s as
|
|
15
|
-
import { B as
|
|
16
|
-
import './style.css';function
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
-
/* @__PURE__ */
|
|
1
|
+
import { B as ca } from "./BasemapSwitcher-BW7lyZ2Y.js";
|
|
2
|
+
import { C as da } from "./CollapsibleControl-VFUTWb_5.js";
|
|
3
|
+
import { C as ba, f as ha, a as ya } from "./CoordinateDisplay-PxPmVjpm.js";
|
|
4
|
+
import { E as xa } from "./ExportButton-CLsWoW4m.js";
|
|
5
|
+
import { F as va } from "./FeatureDetailPanel-CkFpdEKW.js";
|
|
6
|
+
import { F as ka } from "./FeatureTooltip-Db1LgLQV.js";
|
|
7
|
+
import { L as Sa } from "./LayerPanel-SCdJ8948.js";
|
|
8
|
+
import { L as Ta } from "./Legend-TTWWpWDT.js";
|
|
9
|
+
import { S as Ia } from "./SearchPanel-DCY01Wa-.js";
|
|
10
|
+
import { jsxs as r, jsx as e, Fragment as O } from "react/jsx-runtime";
|
|
11
|
+
import { useState as w, useEffect as J, useRef as Z } from "react";
|
|
12
|
+
import { I as me, j as Ne, i as ce, K as ve } from "./cql2-Dhe6Ny6v.js";
|
|
13
|
+
import { a as Ea, b as Fa, L as Pa, e as Oa, M as Ma, f as ja, c as Ba, d as Ra, g as $a, h as qa, k as Ua, l as Va, m as Ga, n as za, o as Wa, p as Ya, q as Ja, r as _a, s as Ha, t as Xa, u as Ka, v as Qa, w as Za, x as ei, y as ai, z as ii, A as ti, B as li, C as ri, D as pi, E as ui, F as ni, G as oi, H as mi, J as ci } from "./cql2-Dhe6Ny6v.js";
|
|
14
|
+
import { s as we } from "./index-DoToolWp.js";
|
|
15
|
+
import { B as di, C as gi, a as bi, b as hi, D as yi, F as fi, c as xi, d as Ni, e as vi, L as wi, f as ki, g as Ci, h as Si, i as Di, j as Ti, M as Li, N as Ii, O as Ai, P as Ei, k as Fi, S as Pi, l as Oi, m as Mi, n as ji, o as Bi, p as Ri, q as $i, T as qi, U as Ui, V as Vi, v as Gi } from "./index-DoToolWp.js";
|
|
16
|
+
import './style.css';function N({ label: a, error: i, required: t, htmlFor: l, children: n }) {
|
|
17
|
+
return /* @__PURE__ */ r("div", { className: "mapui:flex mapui:flex-col mapui:gap-1", children: [
|
|
18
|
+
/* @__PURE__ */ r("label", { htmlFor: l, className: "mapui:text-xs mapui:font-medium mapui:text-gray-700", children: [
|
|
19
19
|
a,
|
|
20
|
-
|
|
20
|
+
t && /* @__PURE__ */ e("span", { className: "mapui:ml-0.5 mapui:text-red-500", "aria-hidden": "true", children: "*" })
|
|
21
21
|
] }),
|
|
22
|
-
|
|
22
|
+
n,
|
|
23
23
|
i && /* @__PURE__ */ e("p", { className: "mapui:m-0 mapui:text-xs mapui:text-red-600", role: "alert", children: i })
|
|
24
24
|
] });
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
return /* @__PURE__ */
|
|
26
|
+
function se({ value: a, onChange: i, label: t }) {
|
|
27
|
+
return /* @__PURE__ */ r("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
28
28
|
/* @__PURE__ */ e(
|
|
29
29
|
"input",
|
|
30
30
|
{
|
|
31
31
|
type: "color",
|
|
32
32
|
value: a,
|
|
33
|
-
onChange: (
|
|
34
|
-
"aria-label":
|
|
33
|
+
onChange: (l) => i(l.target.value),
|
|
34
|
+
"aria-label": t ?? "Color",
|
|
35
35
|
className: "mapui:h-8 mapui:w-10 mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-300 mapui:p-0.5"
|
|
36
36
|
}
|
|
37
37
|
),
|
|
38
38
|
/* @__PURE__ */ e("span", { className: "mapui:font-mono mapui:text-xs mapui:text-gray-600", children: a })
|
|
39
39
|
] });
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function H({
|
|
42
42
|
open: a,
|
|
43
43
|
title: i,
|
|
44
|
-
description:
|
|
45
|
-
onConfirm:
|
|
46
|
-
onCancel:
|
|
44
|
+
description: t,
|
|
45
|
+
onConfirm: l,
|
|
46
|
+
onCancel: n
|
|
47
47
|
}) {
|
|
48
48
|
return a ? /* @__PURE__ */ e(
|
|
49
49
|
"div",
|
|
@@ -53,7 +53,7 @@ function K({
|
|
|
53
53
|
"aria-modal": "true",
|
|
54
54
|
"aria-labelledby": "confirm-dialog-title",
|
|
55
55
|
"aria-describedby": "confirm-dialog-description",
|
|
56
|
-
children: /* @__PURE__ */
|
|
56
|
+
children: /* @__PURE__ */ r("div", { className: "mapui:w-full mapui:max-w-sm mapui:rounded-lg mapui:bg-white mapui:p-6 mapui:shadow-xl", children: [
|
|
57
57
|
/* @__PURE__ */ e(
|
|
58
58
|
"h2",
|
|
59
59
|
{
|
|
@@ -67,15 +67,15 @@ function K({
|
|
|
67
67
|
{
|
|
68
68
|
id: "confirm-dialog-description",
|
|
69
69
|
className: "mapui:m-0 mapui:mb-6 mapui:text-sm mapui:text-gray-600",
|
|
70
|
-
children:
|
|
70
|
+
children: t
|
|
71
71
|
}
|
|
72
72
|
),
|
|
73
|
-
/* @__PURE__ */
|
|
73
|
+
/* @__PURE__ */ r("div", { className: "mapui:flex mapui:justify-end mapui:gap-2", children: [
|
|
74
74
|
/* @__PURE__ */ e(
|
|
75
75
|
"button",
|
|
76
76
|
{
|
|
77
77
|
type: "button",
|
|
78
|
-
onClick:
|
|
78
|
+
onClick: n,
|
|
79
79
|
className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-300 mapui:bg-white mapui:px-3 mapui:py-1.5 mapui:text-sm mapui:font-medium mapui:text-gray-700 hover:mapui:bg-gray-50",
|
|
80
80
|
children: "Cancel"
|
|
81
81
|
}
|
|
@@ -84,7 +84,7 @@ function K({
|
|
|
84
84
|
"button",
|
|
85
85
|
{
|
|
86
86
|
type: "button",
|
|
87
|
-
onClick:
|
|
87
|
+
onClick: l,
|
|
88
88
|
className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-transparent mapui:bg-red-600 mapui:px-3 mapui:py-1.5 mapui:text-sm mapui:font-medium mapui:text-white hover:mapui:bg-red-700",
|
|
89
89
|
children: "Confirm"
|
|
90
90
|
}
|
|
@@ -94,134 +94,160 @@ function K({
|
|
|
94
94
|
}
|
|
95
95
|
) : null;
|
|
96
96
|
}
|
|
97
|
+
function q({
|
|
98
|
+
title: a,
|
|
99
|
+
children: i,
|
|
100
|
+
defaultOpen: t = !1,
|
|
101
|
+
badge: l
|
|
102
|
+
}) {
|
|
103
|
+
const [n, u] = w(t);
|
|
104
|
+
return /* @__PURE__ */ r("div", { className: "mapui:rounded mapui:border mapui:border-gray-200", children: [
|
|
105
|
+
/* @__PURE__ */ r(
|
|
106
|
+
"button",
|
|
107
|
+
{
|
|
108
|
+
type: "button",
|
|
109
|
+
onClick: () => u((p) => !p),
|
|
110
|
+
className: "mapui:flex mapui:w-full mapui:cursor-pointer mapui:items-center mapui:justify-between mapui:rounded mapui:border-none mapui:bg-gray-50 mapui:px-3 mapui:py-2 mapui:text-sm mapui:font-medium mapui:text-gray-700 hover:mapui:bg-gray-100",
|
|
111
|
+
children: [
|
|
112
|
+
/* @__PURE__ */ r("span", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
113
|
+
a,
|
|
114
|
+
l !== void 0 && l > 0 && /* @__PURE__ */ e("span", { className: "mapui:rounded-full mapui:bg-blue-100 mapui:px-1.5 mapui:py-0.5 mapui:text-xs mapui:font-semibold mapui:text-blue-700", children: l })
|
|
115
|
+
] }),
|
|
116
|
+
/* @__PURE__ */ e("span", { "aria-hidden": "true", children: n ? "▲" : "▼" })
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
),
|
|
120
|
+
n && /* @__PURE__ */ e("div", { className: "mapui:p-3", children: i })
|
|
121
|
+
] });
|
|
122
|
+
}
|
|
97
123
|
const U = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
|
|
98
|
-
function
|
|
124
|
+
function ee({
|
|
99
125
|
value: a,
|
|
100
126
|
onChange: i,
|
|
101
|
-
onTestConnection:
|
|
102
|
-
testStatus:
|
|
103
|
-
testError:
|
|
127
|
+
onTestConnection: t,
|
|
128
|
+
testStatus: l = "idle",
|
|
129
|
+
testError: n
|
|
104
130
|
}) {
|
|
105
|
-
const u = (
|
|
106
|
-
return /* @__PURE__ */
|
|
107
|
-
/* @__PURE__ */ e(
|
|
131
|
+
const u = (p) => i({ ...a, ...p });
|
|
132
|
+
return /* @__PURE__ */ r("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
133
|
+
/* @__PURE__ */ e(N, { label: "ID", required: !0, children: /* @__PURE__ */ e(
|
|
108
134
|
"input",
|
|
109
135
|
{
|
|
110
136
|
type: "text",
|
|
111
137
|
value: a.id,
|
|
112
|
-
onChange: (
|
|
138
|
+
onChange: (p) => u({ id: p.target.value }),
|
|
113
139
|
placeholder: "my-source",
|
|
114
140
|
className: U
|
|
115
141
|
}
|
|
116
142
|
) }),
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
/* @__PURE__ */
|
|
143
|
+
/* @__PURE__ */ r(N, { label: "URL", required: !0, children: [
|
|
144
|
+
/* @__PURE__ */ r("div", { className: "mapui:flex mapui:gap-2", children: [
|
|
119
145
|
/* @__PURE__ */ e(
|
|
120
146
|
"input",
|
|
121
147
|
{
|
|
122
148
|
type: "url",
|
|
123
149
|
value: a.url,
|
|
124
|
-
onChange: (
|
|
150
|
+
onChange: (p) => u({ url: p.target.value }),
|
|
125
151
|
placeholder: "https://example.com/ogcapi",
|
|
126
152
|
className: `${U} mapui:flex-1`
|
|
127
153
|
}
|
|
128
154
|
),
|
|
129
|
-
|
|
155
|
+
t && /* @__PURE__ */ e(
|
|
130
156
|
"button",
|
|
131
157
|
{
|
|
132
158
|
type: "button",
|
|
133
|
-
onClick: () =>
|
|
134
|
-
disabled:
|
|
159
|
+
onClick: () => t(a.url),
|
|
160
|
+
disabled: l === "loading" || !a.url,
|
|
135
161
|
className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-blue-500 mapui:bg-white mapui:px-3 mapui:py-1 mapui:text-sm mapui:text-blue-600 hover:mapui:bg-blue-50 disabled:mapui:cursor-not-allowed disabled:mapui:opacity-50",
|
|
136
|
-
children:
|
|
162
|
+
children: l === "loading" ? "Testing…" : "Test Connection"
|
|
137
163
|
}
|
|
138
164
|
)
|
|
139
165
|
] }),
|
|
140
|
-
|
|
141
|
-
|
|
166
|
+
l === "success" && /* @__PURE__ */ e("span", { className: "mapui:text-xs mapui:text-green-600", children: "Connection successful" }),
|
|
167
|
+
l === "error" && /* @__PURE__ */ e("span", { className: "mapui:text-xs mapui:text-red-600", children: n ?? "Connection failed" })
|
|
142
168
|
] }),
|
|
143
|
-
/* @__PURE__ */ e(
|
|
169
|
+
/* @__PURE__ */ e(N, { label: "Label", children: /* @__PURE__ */ e(
|
|
144
170
|
"input",
|
|
145
171
|
{
|
|
146
172
|
type: "text",
|
|
147
173
|
value: a.label ?? "",
|
|
148
|
-
onChange: (
|
|
174
|
+
onChange: (p) => u({ label: p.target.value || void 0 }),
|
|
149
175
|
placeholder: "My OGC API Source",
|
|
150
176
|
className: U
|
|
151
177
|
}
|
|
152
178
|
) }),
|
|
153
|
-
/* @__PURE__ */ e(
|
|
179
|
+
/* @__PURE__ */ e(N, { label: "Tile Matrix Set ID", children: /* @__PURE__ */ e(
|
|
154
180
|
"input",
|
|
155
181
|
{
|
|
156
182
|
type: "text",
|
|
157
183
|
value: a.tileMatrixSetId ?? "WebMercatorQuad",
|
|
158
|
-
onChange: (
|
|
184
|
+
onChange: (p) => u({ tileMatrixSetId: p.target.value || void 0 }),
|
|
159
185
|
placeholder: "WebMercatorQuad",
|
|
160
186
|
className: U
|
|
161
187
|
}
|
|
162
188
|
) })
|
|
163
189
|
] });
|
|
164
190
|
}
|
|
165
|
-
const
|
|
191
|
+
const G = () => ({
|
|
166
192
|
id: "",
|
|
167
193
|
url: "",
|
|
168
194
|
label: void 0,
|
|
169
195
|
tileMatrixSetId: "WebMercatorQuad"
|
|
170
196
|
});
|
|
171
|
-
function
|
|
172
|
-
const [
|
|
173
|
-
|
|
197
|
+
function ea({ sources: a, onChange: i }) {
|
|
198
|
+
const [t, l] = w(null), [n, u] = w(null), [p, o] = w(!1), [g, x] = w(G()), [d, y] = w({}), [k, c] = w({}), [b, m] = w(null), C = async (f, T) => {
|
|
199
|
+
y((L) => ({ ...L, [f]: "loading" }));
|
|
174
200
|
try {
|
|
175
|
-
const L = await fetch(`${
|
|
176
|
-
L.ok ?
|
|
201
|
+
const L = await fetch(`${T}/conformance`);
|
|
202
|
+
L.ok ? y((D) => ({ ...D, [f]: "success" })) : (y((D) => ({ ...D, [f]: "error" })), c((D) => ({ ...D, [f]: `HTTP ${L.status}` })));
|
|
177
203
|
} catch (L) {
|
|
178
|
-
|
|
204
|
+
y((D) => ({ ...D, [f]: "error" })), c((D) => ({ ...D, [f]: L instanceof Error ? L.message : "Network error" }));
|
|
179
205
|
}
|
|
180
|
-
},
|
|
181
|
-
|
|
182
|
-
},
|
|
183
|
-
i([...a,
|
|
184
|
-
},
|
|
185
|
-
i(a.filter((
|
|
206
|
+
}, s = () => {
|
|
207
|
+
n && (i(a.map((f) => f.id === t ? n : f)), l(null), u(null));
|
|
208
|
+
}, S = () => {
|
|
209
|
+
i([...a, g]), o(!1), x(G());
|
|
210
|
+
}, A = (f) => {
|
|
211
|
+
i(a.filter((T) => T.id !== f)), m(null);
|
|
186
212
|
};
|
|
187
|
-
return /* @__PURE__ */
|
|
188
|
-
/* @__PURE__ */
|
|
213
|
+
return /* @__PURE__ */ r("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
214
|
+
/* @__PURE__ */ r("div", { className: "mapui:flex mapui:items-center mapui:justify-between", children: [
|
|
189
215
|
/* @__PURE__ */ e("h3", { className: "mapui:m-0 mapui:text-sm mapui:font-semibold mapui:text-gray-700", children: "Sources" }),
|
|
190
216
|
/* @__PURE__ */ e(
|
|
191
217
|
"button",
|
|
192
218
|
{
|
|
193
219
|
type: "button",
|
|
194
220
|
onClick: () => {
|
|
195
|
-
|
|
221
|
+
o(!0), x(G());
|
|
196
222
|
},
|
|
197
223
|
className: "mapui:cursor-pointer mapui:rounded mapui:bg-blue-600 mapui:px-3 mapui:py-1 mapui:text-xs mapui:font-medium mapui:text-white hover:mapui:bg-blue-700",
|
|
198
224
|
children: "+ Add Source"
|
|
199
225
|
}
|
|
200
226
|
)
|
|
201
227
|
] }),
|
|
202
|
-
a.length === 0 && !
|
|
228
|
+
a.length === 0 && !p && /* @__PURE__ */ e("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No sources configured." }),
|
|
203
229
|
/* @__PURE__ */ e("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: a.map((f) => /* @__PURE__ */ e(
|
|
204
230
|
"li",
|
|
205
231
|
{
|
|
206
232
|
className: "mapui:rounded-lg mapui:border mapui:border-gray-200 mapui:bg-white mapui:p-3",
|
|
207
|
-
children:
|
|
233
|
+
children: t === f.id ? /* @__PURE__ */ r("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
208
234
|
/* @__PURE__ */ e(
|
|
209
|
-
|
|
235
|
+
ee,
|
|
210
236
|
{
|
|
211
|
-
value:
|
|
237
|
+
value: n ?? f,
|
|
212
238
|
onChange: u,
|
|
213
|
-
onTestConnection: (
|
|
214
|
-
testStatus:
|
|
215
|
-
testError:
|
|
239
|
+
onTestConnection: (T) => C(`edit-${f.id}`, T),
|
|
240
|
+
testStatus: d[`edit-${f.id}`],
|
|
241
|
+
testError: k[`edit-${f.id}`]
|
|
216
242
|
}
|
|
217
243
|
),
|
|
218
|
-
/* @__PURE__ */
|
|
244
|
+
/* @__PURE__ */ r("div", { className: "mapui:flex mapui:gap-2", children: [
|
|
219
245
|
/* @__PURE__ */ e(
|
|
220
246
|
"button",
|
|
221
247
|
{
|
|
222
248
|
type: "button",
|
|
223
|
-
onClick:
|
|
224
|
-
disabled: !(
|
|
249
|
+
onClick: s,
|
|
250
|
+
disabled: !(n != null && n.id) || !(n != null && n.url),
|
|
225
251
|
className: "mapui:cursor-pointer mapui:rounded mapui:bg-blue-600 mapui:px-3 mapui:py-1 mapui:text-xs mapui:font-medium mapui:text-white hover:mapui:bg-blue-700 disabled:mapui:cursor-not-allowed disabled:mapui:opacity-50",
|
|
226
252
|
children: "Save"
|
|
227
253
|
}
|
|
@@ -231,29 +257,29 @@ function Re({ sources: a, onChange: i }) {
|
|
|
231
257
|
{
|
|
232
258
|
type: "button",
|
|
233
259
|
onClick: () => {
|
|
234
|
-
|
|
260
|
+
l(null), u(null);
|
|
235
261
|
},
|
|
236
262
|
className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-300 mapui:bg-white mapui:px-3 mapui:py-1 mapui:text-xs mapui:text-gray-700 hover:mapui:bg-gray-50",
|
|
237
263
|
children: "Cancel"
|
|
238
264
|
}
|
|
239
265
|
)
|
|
240
266
|
] })
|
|
241
|
-
] }) : /* @__PURE__ */
|
|
242
|
-
/* @__PURE__ */
|
|
267
|
+
] }) : /* @__PURE__ */ r("div", { className: "mapui:flex mapui:items-start mapui:justify-between mapui:gap-2", children: [
|
|
268
|
+
/* @__PURE__ */ r("div", { className: "mapui:flex mapui:flex-col mapui:gap-0.5", children: [
|
|
243
269
|
/* @__PURE__ */ e("span", { className: "mapui:text-sm mapui:font-medium mapui:text-gray-800", children: f.label ?? f.id }),
|
|
244
270
|
/* @__PURE__ */ e("span", { className: "mapui:font-mono mapui:text-xs mapui:text-gray-500", children: f.url }),
|
|
245
|
-
f.tileMatrixSetId && /* @__PURE__ */
|
|
271
|
+
f.tileMatrixSetId && /* @__PURE__ */ r("span", { className: "mapui:text-xs mapui:text-gray-400", children: [
|
|
246
272
|
"TMS: ",
|
|
247
273
|
f.tileMatrixSetId
|
|
248
274
|
] })
|
|
249
275
|
] }),
|
|
250
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ r("div", { className: "mapui:flex mapui:shrink-0 mapui:gap-1", children: [
|
|
251
277
|
/* @__PURE__ */ e(
|
|
252
278
|
"button",
|
|
253
279
|
{
|
|
254
280
|
type: "button",
|
|
255
281
|
onClick: () => {
|
|
256
|
-
|
|
282
|
+
l(f.id), u(f);
|
|
257
283
|
},
|
|
258
284
|
className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-gray-600 hover:mapui:bg-gray-50",
|
|
259
285
|
children: "Edit"
|
|
@@ -263,7 +289,7 @@ function Re({ sources: a, onChange: i }) {
|
|
|
263
289
|
"button",
|
|
264
290
|
{
|
|
265
291
|
type: "button",
|
|
266
|
-
onClick: () =>
|
|
292
|
+
onClick: () => m(f.id),
|
|
267
293
|
className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-red-200 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-red-600 hover:mapui:bg-red-50",
|
|
268
294
|
children: "Remove"
|
|
269
295
|
}
|
|
@@ -273,25 +299,25 @@ function Re({ sources: a, onChange: i }) {
|
|
|
273
299
|
},
|
|
274
300
|
f.id
|
|
275
301
|
)) }),
|
|
276
|
-
|
|
302
|
+
p && /* @__PURE__ */ r("div", { className: "mapui:rounded-lg mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
|
|
277
303
|
/* @__PURE__ */ e("p", { className: "mapui:m-0 mapui:mb-3 mapui:text-xs mapui:font-semibold mapui:text-blue-700", children: "New Source" }),
|
|
278
304
|
/* @__PURE__ */ e(
|
|
279
|
-
|
|
305
|
+
ee,
|
|
280
306
|
{
|
|
281
|
-
value:
|
|
282
|
-
onChange:
|
|
283
|
-
onTestConnection: (f) =>
|
|
284
|
-
testStatus:
|
|
285
|
-
testError:
|
|
307
|
+
value: g,
|
|
308
|
+
onChange: x,
|
|
309
|
+
onTestConnection: (f) => C("new", f),
|
|
310
|
+
testStatus: d.new,
|
|
311
|
+
testError: k.new
|
|
286
312
|
}
|
|
287
313
|
),
|
|
288
|
-
/* @__PURE__ */
|
|
314
|
+
/* @__PURE__ */ r("div", { className: "mapui:mt-3 mapui:flex mapui:gap-2", children: [
|
|
289
315
|
/* @__PURE__ */ e(
|
|
290
316
|
"button",
|
|
291
317
|
{
|
|
292
318
|
type: "button",
|
|
293
|
-
onClick:
|
|
294
|
-
disabled: !
|
|
319
|
+
onClick: S,
|
|
320
|
+
disabled: !g.id || !g.url,
|
|
295
321
|
className: "mapui:cursor-pointer mapui:rounded mapui:bg-blue-600 mapui:px-3 mapui:py-1 mapui:text-xs mapui:font-medium mapui:text-white hover:mapui:bg-blue-700 disabled:mapui:cursor-not-allowed disabled:mapui:opacity-50",
|
|
296
322
|
children: "Save"
|
|
297
323
|
}
|
|
@@ -300,7 +326,7 @@ function Re({ sources: a, onChange: i }) {
|
|
|
300
326
|
"button",
|
|
301
327
|
{
|
|
302
328
|
type: "button",
|
|
303
|
-
onClick: () =>
|
|
329
|
+
onClick: () => o(!1),
|
|
304
330
|
className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-300 mapui:bg-white mapui:px-3 mapui:py-1 mapui:text-xs mapui:text-gray-700 hover:mapui:bg-gray-50",
|
|
305
331
|
children: "Cancel"
|
|
306
332
|
}
|
|
@@ -308,33 +334,33 @@ function Re({ sources: a, onChange: i }) {
|
|
|
308
334
|
] })
|
|
309
335
|
] }),
|
|
310
336
|
/* @__PURE__ */ e(
|
|
311
|
-
|
|
337
|
+
H,
|
|
312
338
|
{
|
|
313
|
-
open:
|
|
339
|
+
open: b !== null,
|
|
314
340
|
title: "Remove Source",
|
|
315
341
|
description: "Are you sure you want to remove this source? Any layers using it will be affected.",
|
|
316
|
-
onConfirm: () =>
|
|
317
|
-
onCancel: () =>
|
|
342
|
+
onConfirm: () => b && A(b),
|
|
343
|
+
onCancel: () => m(null)
|
|
318
344
|
}
|
|
319
345
|
)
|
|
320
346
|
] });
|
|
321
347
|
}
|
|
322
|
-
function
|
|
348
|
+
function aa({
|
|
323
349
|
sourceUrl: a,
|
|
324
350
|
selectedCollectionIds: i,
|
|
325
|
-
onSelect:
|
|
326
|
-
onDeselect:
|
|
351
|
+
onSelect: t,
|
|
352
|
+
onDeselect: l
|
|
327
353
|
}) {
|
|
328
|
-
const { collections:
|
|
329
|
-
return u ? /* @__PURE__ */
|
|
354
|
+
const { collections: n, loading: u, error: p } = me(a || null);
|
|
355
|
+
return u ? /* @__PURE__ */ r("div", { className: "mapui:flex mapui:items-center mapui:gap-2 mapui:py-4 mapui:text-sm mapui:text-gray-500", children: [
|
|
330
356
|
/* @__PURE__ */ e("span", { className: "mapui:inline-block mapui:h-4 mapui:w-4 mapui:animate-spin mapui:rounded-full mapui:border-2 mapui:border-gray-300 mapui:border-t-blue-600" }),
|
|
331
357
|
"Loading collections…"
|
|
332
|
-
] }) :
|
|
358
|
+
] }) : p ? /* @__PURE__ */ r("div", { className: "mapui:rounded mapui:bg-red-50 mapui:p-3 mapui:text-sm mapui:text-red-700", children: [
|
|
333
359
|
"Failed to load collections: ",
|
|
334
|
-
|
|
335
|
-
] }) :
|
|
336
|
-
const
|
|
337
|
-
return /* @__PURE__ */
|
|
360
|
+
p.message
|
|
361
|
+
] }) : n.length === 0 ? /* @__PURE__ */ e("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No collections found at this source." }) : /* @__PURE__ */ e("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-1 mapui:p-0", children: n.map((o) => {
|
|
362
|
+
const g = i.includes(o.id);
|
|
363
|
+
return /* @__PURE__ */ r(
|
|
338
364
|
"li",
|
|
339
365
|
{
|
|
340
366
|
className: "mapui:flex mapui:items-start mapui:gap-3 mapui:rounded mapui:border mapui:border-gray-200 mapui:p-2 hover:mapui:bg-gray-50",
|
|
@@ -343,41 +369,227 @@ function qe({
|
|
|
343
369
|
"input",
|
|
344
370
|
{
|
|
345
371
|
type: "checkbox",
|
|
346
|
-
id: `collection-${
|
|
347
|
-
checked:
|
|
348
|
-
onChange: () =>
|
|
372
|
+
id: `collection-${o.id}`,
|
|
373
|
+
checked: g,
|
|
374
|
+
onChange: () => g ? l(o.id) : t(o.id),
|
|
349
375
|
className: "mapui:mt-0.5 mapui:h-4 mapui:w-4 mapui:cursor-pointer mapui:accent-blue-600"
|
|
350
376
|
}
|
|
351
377
|
),
|
|
352
|
-
/* @__PURE__ */
|
|
378
|
+
/* @__PURE__ */ r(
|
|
353
379
|
"label",
|
|
354
380
|
{
|
|
355
|
-
htmlFor: `collection-${
|
|
381
|
+
htmlFor: `collection-${o.id}`,
|
|
356
382
|
className: "mapui:flex mapui:cursor-pointer mapui:flex-col mapui:gap-0.5",
|
|
357
383
|
children: [
|
|
358
|
-
/* @__PURE__ */ e("span", { className: "mapui:text-sm mapui:font-medium mapui:text-gray-800", children:
|
|
359
|
-
/* @__PURE__ */ e("span", { className: "mapui:font-mono mapui:text-xs mapui:text-gray-500", children:
|
|
360
|
-
|
|
384
|
+
/* @__PURE__ */ e("span", { className: "mapui:text-sm mapui:font-medium mapui:text-gray-800", children: o.title ?? o.id }),
|
|
385
|
+
/* @__PURE__ */ e("span", { className: "mapui:font-mono mapui:text-xs mapui:text-gray-500", children: o.id }),
|
|
386
|
+
o.description && /* @__PURE__ */ e("span", { className: "mapui:text-xs mapui:text-gray-400 mapui:line-clamp-2", children: o.description })
|
|
361
387
|
]
|
|
362
388
|
}
|
|
363
389
|
)
|
|
364
390
|
]
|
|
365
391
|
},
|
|
366
|
-
|
|
392
|
+
o.id
|
|
367
393
|
);
|
|
368
394
|
}) });
|
|
369
395
|
}
|
|
370
|
-
const
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
396
|
+
const P = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
|
|
397
|
+
function ke({
|
|
398
|
+
value: a,
|
|
399
|
+
onChange: i
|
|
400
|
+
}) {
|
|
401
|
+
const t = (a == null ? void 0 : a[0]) ?? 0, l = (a == null ? void 0 : a[1]) ?? 0;
|
|
402
|
+
return /* @__PURE__ */ r("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
403
|
+
/* @__PURE__ */ e(
|
|
404
|
+
"input",
|
|
405
|
+
{
|
|
406
|
+
type: "number",
|
|
407
|
+
step: 0.5,
|
|
408
|
+
value: t,
|
|
409
|
+
onChange: (n) => i([parseFloat(n.target.value) || 0, l]),
|
|
410
|
+
className: `${P} mapui:w-20`,
|
|
411
|
+
"aria-label": "X",
|
|
412
|
+
placeholder: "X"
|
|
413
|
+
}
|
|
414
|
+
),
|
|
415
|
+
/* @__PURE__ */ e(
|
|
416
|
+
"input",
|
|
417
|
+
{
|
|
418
|
+
type: "number",
|
|
419
|
+
step: 0.5,
|
|
420
|
+
value: l,
|
|
421
|
+
onChange: (n) => i([t, parseFloat(n.target.value) || 0]),
|
|
422
|
+
className: `${P} mapui:w-20`,
|
|
423
|
+
"aria-label": "Y",
|
|
424
|
+
placeholder: "Y"
|
|
425
|
+
}
|
|
426
|
+
)
|
|
427
|
+
] });
|
|
428
|
+
}
|
|
429
|
+
function Ce({
|
|
430
|
+
value: a,
|
|
431
|
+
onChange: i
|
|
432
|
+
}) {
|
|
433
|
+
const t = a ?? 1;
|
|
434
|
+
return /* @__PURE__ */ r("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
435
|
+
/* @__PURE__ */ e(
|
|
436
|
+
"input",
|
|
437
|
+
{
|
|
438
|
+
type: "range",
|
|
439
|
+
min: 0,
|
|
440
|
+
max: 1,
|
|
441
|
+
step: 0.01,
|
|
442
|
+
value: t,
|
|
443
|
+
onChange: (l) => i(parseFloat(l.target.value)),
|
|
444
|
+
className: "mapui:flex-1"
|
|
445
|
+
}
|
|
446
|
+
),
|
|
447
|
+
/* @__PURE__ */ e("span", { className: "mapui:w-8 mapui:text-right mapui:text-xs mapui:text-gray-600", children: t.toFixed(2) })
|
|
448
|
+
] });
|
|
449
|
+
}
|
|
450
|
+
function ae({
|
|
451
|
+
def: a,
|
|
452
|
+
value: i,
|
|
453
|
+
onChange: t
|
|
454
|
+
}) {
|
|
455
|
+
var l, n;
|
|
456
|
+
switch (a.widget) {
|
|
457
|
+
case "color":
|
|
458
|
+
return /* @__PURE__ */ e(
|
|
459
|
+
se,
|
|
460
|
+
{
|
|
461
|
+
value: i ?? "#000000",
|
|
462
|
+
onChange: t,
|
|
463
|
+
label: a.label
|
|
464
|
+
}
|
|
465
|
+
);
|
|
466
|
+
case "opacity":
|
|
467
|
+
return /* @__PURE__ */ e(
|
|
468
|
+
Ce,
|
|
469
|
+
{
|
|
470
|
+
value: i,
|
|
471
|
+
onChange: t
|
|
472
|
+
}
|
|
473
|
+
);
|
|
474
|
+
case "number":
|
|
475
|
+
return /* @__PURE__ */ e(
|
|
476
|
+
"input",
|
|
477
|
+
{
|
|
478
|
+
type: "number",
|
|
479
|
+
min: a.min,
|
|
480
|
+
max: a.max,
|
|
481
|
+
step: a.step ?? 1,
|
|
482
|
+
value: i ?? a.min ?? 0,
|
|
483
|
+
onChange: (u) => t(parseFloat(u.target.value) || 0),
|
|
484
|
+
className: P
|
|
485
|
+
}
|
|
486
|
+
);
|
|
487
|
+
case "boolean":
|
|
488
|
+
return /* @__PURE__ */ e(
|
|
489
|
+
"input",
|
|
490
|
+
{
|
|
491
|
+
type: "checkbox",
|
|
492
|
+
checked: i ?? !1,
|
|
493
|
+
onChange: (u) => t(u.target.checked),
|
|
494
|
+
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
495
|
+
}
|
|
496
|
+
);
|
|
497
|
+
case "enum":
|
|
498
|
+
return /* @__PURE__ */ e(
|
|
499
|
+
"select",
|
|
500
|
+
{
|
|
501
|
+
value: i ?? ((l = a.options) == null ? void 0 : l[0]) ?? "",
|
|
502
|
+
onChange: (u) => t(u.target.value),
|
|
503
|
+
className: P,
|
|
504
|
+
children: (n = a.options) == null ? void 0 : n.map((u) => /* @__PURE__ */ e("option", { value: u, children: u }, u))
|
|
505
|
+
}
|
|
506
|
+
);
|
|
507
|
+
case "translate":
|
|
508
|
+
return /* @__PURE__ */ e(
|
|
509
|
+
ke,
|
|
510
|
+
{
|
|
511
|
+
value: i,
|
|
512
|
+
onChange: t
|
|
513
|
+
}
|
|
514
|
+
);
|
|
515
|
+
case "dasharray":
|
|
516
|
+
case "stringArray": {
|
|
517
|
+
const u = i, p = u ? u.join(", ") : "";
|
|
518
|
+
return /* @__PURE__ */ e(
|
|
519
|
+
"input",
|
|
520
|
+
{
|
|
521
|
+
type: "text",
|
|
522
|
+
value: p,
|
|
523
|
+
onChange: (o) => {
|
|
524
|
+
const g = o.target.value.trim();
|
|
525
|
+
if (!g) {
|
|
526
|
+
t(void 0);
|
|
527
|
+
return;
|
|
528
|
+
}
|
|
529
|
+
if (a.widget === "dasharray") {
|
|
530
|
+
const x = g.split(",").map((d) => parseFloat(d.trim())).filter((d) => !isNaN(d));
|
|
531
|
+
t(x.length > 0 ? x : void 0);
|
|
532
|
+
} else {
|
|
533
|
+
const x = g.split(",").map((d) => d.trim()).filter(Boolean);
|
|
534
|
+
t(x.length > 0 ? x : void 0);
|
|
535
|
+
}
|
|
536
|
+
},
|
|
537
|
+
placeholder: a.widget === "dasharray" ? "e.g. 2, 4" : "comma-separated",
|
|
538
|
+
className: P
|
|
539
|
+
}
|
|
540
|
+
);
|
|
541
|
+
}
|
|
542
|
+
case "text":
|
|
543
|
+
return /* @__PURE__ */ e(
|
|
544
|
+
"input",
|
|
545
|
+
{
|
|
546
|
+
type: "text",
|
|
547
|
+
value: i ?? "",
|
|
548
|
+
onChange: (u) => t(u.target.value || void 0),
|
|
549
|
+
className: P
|
|
550
|
+
}
|
|
551
|
+
);
|
|
552
|
+
default:
|
|
553
|
+
return null;
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
function Se({ def: a, value: i, onChange: t }) {
|
|
557
|
+
const l = a.enableDefault !== void 0, n = i !== void 0;
|
|
558
|
+
return l ? /* @__PURE__ */ e(N, { label: a.label, children: /* @__PURE__ */ r("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
559
|
+
/* @__PURE__ */ e(
|
|
560
|
+
"input",
|
|
561
|
+
{
|
|
562
|
+
type: "checkbox",
|
|
563
|
+
checked: n,
|
|
564
|
+
onChange: (u) => {
|
|
565
|
+
t(a.key, u.target.checked ? a.enableDefault : void 0);
|
|
566
|
+
},
|
|
567
|
+
className: "mapui:h-4 mapui:w-4 mapui:shrink-0 mapui:accent-blue-600"
|
|
568
|
+
}
|
|
569
|
+
),
|
|
570
|
+
n && /* @__PURE__ */ e(
|
|
571
|
+
ae,
|
|
572
|
+
{
|
|
573
|
+
def: a,
|
|
574
|
+
value: i,
|
|
575
|
+
onChange: (u) => t(a.key, u)
|
|
576
|
+
}
|
|
577
|
+
)
|
|
578
|
+
] }) }) : /* @__PURE__ */ e(N, { label: a.label, children: /* @__PURE__ */ e(ae, { def: a, value: i, onChange: (u) => t(a.key, u) }) });
|
|
579
|
+
}
|
|
580
|
+
function ie({
|
|
581
|
+
title: a,
|
|
582
|
+
properties: i,
|
|
583
|
+
values: t,
|
|
584
|
+
onChange: l,
|
|
585
|
+
defaultOpen: n = !1
|
|
586
|
+
}) {
|
|
587
|
+
const u = i.filter(
|
|
588
|
+
(p) => p.enableDefault !== void 0 && t[p.key] !== void 0
|
|
589
|
+
).length;
|
|
590
|
+
return /* @__PURE__ */ e(q, { title: a, defaultOpen: n, badge: u || void 0, children: /* @__PURE__ */ e("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: i.map((p) => /* @__PURE__ */ e(Se, { def: p, value: t[p.key], onChange: l }, p.key)) }) });
|
|
591
|
+
}
|
|
592
|
+
function De({ style: a }) {
|
|
381
593
|
return a.type === "fill" ? /* @__PURE__ */ e(
|
|
382
594
|
"div",
|
|
383
595
|
{
|
|
@@ -406,7 +618,7 @@ function fe({ style: a }) {
|
|
|
406
618
|
}
|
|
407
619
|
)
|
|
408
620
|
}
|
|
409
|
-
) : /* @__PURE__ */ e(
|
|
621
|
+
) : a.type === "circle" ? /* @__PURE__ */ e(
|
|
410
622
|
"div",
|
|
411
623
|
{
|
|
412
624
|
className: "mapui:flex mapui:h-8 mapui:w-full mapui:items-center mapui:justify-center mapui:rounded mapui:border mapui:border-gray-200",
|
|
@@ -425,284 +637,260 @@ function fe({ style: a }) {
|
|
|
425
637
|
}
|
|
426
638
|
)
|
|
427
639
|
}
|
|
640
|
+
) : /* @__PURE__ */ e(
|
|
641
|
+
"div",
|
|
642
|
+
{
|
|
643
|
+
className: "mapui:flex mapui:h-8 mapui:w-full mapui:items-center mapui:justify-center mapui:rounded mapui:border mapui:border-gray-200",
|
|
644
|
+
"aria-label": "Style preview",
|
|
645
|
+
children: /* @__PURE__ */ e(
|
|
646
|
+
"span",
|
|
647
|
+
{
|
|
648
|
+
style: {
|
|
649
|
+
color: a.paint["text-color"] ?? a.paint["icon-color"] ?? "#333333",
|
|
650
|
+
fontSize: "1.1rem",
|
|
651
|
+
fontWeight: 600
|
|
652
|
+
},
|
|
653
|
+
children: "A"
|
|
654
|
+
}
|
|
655
|
+
)
|
|
656
|
+
}
|
|
428
657
|
);
|
|
429
658
|
}
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
659
|
+
const Te = [
|
|
660
|
+
// Appearance (paint)
|
|
661
|
+
{ key: "fill-color", label: "Fill Color", widget: "color", group: "Appearance", category: "paint" },
|
|
662
|
+
{ key: "fill-opacity", label: "Fill Opacity", widget: "opacity", group: "Appearance", category: "paint" },
|
|
663
|
+
{ key: "fill-outline-color", label: "Outline Color", widget: "color", group: "Appearance", category: "paint", enableDefault: "#000000" },
|
|
664
|
+
{ key: "fill-antialias", label: "Antialias", widget: "boolean", group: "Appearance", category: "paint", enableDefault: !0 },
|
|
665
|
+
{ key: "fill-pattern", label: "Pattern", widget: "text", group: "Appearance", category: "paint", enableDefault: "" },
|
|
666
|
+
// Transform (paint)
|
|
667
|
+
{ key: "fill-translate", label: "Translate (X, Y)", widget: "translate", group: "Transform", category: "paint", enableDefault: [0, 0] },
|
|
668
|
+
{ key: "fill-translate-anchor", label: "Translate Anchor", widget: "enum", group: "Transform", category: "paint", options: ["map", "viewport"], enableDefault: "map" },
|
|
669
|
+
// Sorting (layout)
|
|
670
|
+
{ key: "fill-sort-key", label: "Sort Key", widget: "number", group: "Sorting", category: "layout", step: 1, enableDefault: 0 }
|
|
671
|
+
], Le = [
|
|
672
|
+
// Appearance (paint)
|
|
673
|
+
{ key: "line-color", label: "Line Color", widget: "color", group: "Appearance", category: "paint" },
|
|
674
|
+
{ key: "line-width", label: "Line Width", widget: "number", group: "Appearance", category: "paint", min: 0, step: 0.5 },
|
|
675
|
+
{ key: "line-opacity", label: "Line Opacity", widget: "opacity", group: "Appearance", category: "paint" },
|
|
676
|
+
{ key: "line-blur", label: "Blur", widget: "number", group: "Appearance", category: "paint", min: 0, step: 0.5, enableDefault: 0 },
|
|
677
|
+
{ key: "line-dasharray", label: "Dash Array", widget: "dasharray", group: "Appearance", category: "paint", enableDefault: [2, 4] },
|
|
678
|
+
{ key: "line-pattern", label: "Pattern", widget: "text", group: "Appearance", category: "paint", enableDefault: "" },
|
|
679
|
+
// Stroke (paint)
|
|
680
|
+
{ key: "line-gap-width", label: "Gap Width", widget: "number", group: "Stroke", category: "paint", min: 0, step: 0.5, enableDefault: 0 },
|
|
681
|
+
{ key: "line-offset", label: "Offset", widget: "number", group: "Stroke", category: "paint", step: 0.5, enableDefault: 0 },
|
|
682
|
+
// Transform (paint)
|
|
683
|
+
{ key: "line-translate", label: "Translate (X, Y)", widget: "translate", group: "Transform", category: "paint", enableDefault: [0, 0] },
|
|
684
|
+
{ key: "line-translate-anchor", label: "Translate Anchor", widget: "enum", group: "Transform", category: "paint", options: ["map", "viewport"], enableDefault: "map" },
|
|
685
|
+
// Cap & Join (layout)
|
|
686
|
+
{ key: "line-cap", label: "Line Cap", widget: "enum", group: "Cap & Join", category: "layout", options: ["butt", "round", "square"], enableDefault: "butt" },
|
|
687
|
+
{ key: "line-join", label: "Line Join", widget: "enum", group: "Cap & Join", category: "layout", options: ["bevel", "round", "miter"], enableDefault: "miter" },
|
|
688
|
+
{ key: "line-miter-limit", label: "Miter Limit", widget: "number", group: "Cap & Join", category: "layout", step: 0.5, enableDefault: 2 },
|
|
689
|
+
{ key: "line-round-limit", label: "Round Limit", widget: "number", group: "Cap & Join", category: "layout", step: 0.1, enableDefault: 1.05 },
|
|
690
|
+
// Sorting (layout)
|
|
691
|
+
{ key: "line-sort-key", label: "Sort Key", widget: "number", group: "Sorting", category: "layout", step: 1, enableDefault: 0 }
|
|
692
|
+
], Ie = [
|
|
693
|
+
// Appearance (paint)
|
|
694
|
+
{ key: "circle-color", label: "Circle Color", widget: "color", group: "Appearance", category: "paint" },
|
|
695
|
+
{ key: "circle-radius", label: "Radius", widget: "number", group: "Appearance", category: "paint", min: 0, step: 1 },
|
|
696
|
+
{ key: "circle-opacity", label: "Circle Opacity", widget: "opacity", group: "Appearance", category: "paint" },
|
|
697
|
+
{ key: "circle-blur", label: "Blur", widget: "number", group: "Appearance", category: "paint", min: 0, step: 0.1, enableDefault: 0 },
|
|
698
|
+
// Stroke (paint)
|
|
699
|
+
{ key: "circle-stroke-color", label: "Stroke Color", widget: "color", group: "Stroke", category: "paint", enableDefault: "#000000" },
|
|
700
|
+
{ key: "circle-stroke-width", label: "Stroke Width", widget: "number", group: "Stroke", category: "paint", min: 0, step: 1, enableDefault: 1 },
|
|
701
|
+
{ key: "circle-stroke-opacity", label: "Stroke Opacity", widget: "opacity", group: "Stroke", category: "paint", enableDefault: 1 },
|
|
702
|
+
// Transform (paint)
|
|
703
|
+
{ key: "circle-translate", label: "Translate (X, Y)", widget: "translate", group: "Transform", category: "paint", enableDefault: [0, 0] },
|
|
704
|
+
{ key: "circle-translate-anchor", label: "Translate Anchor", widget: "enum", group: "Transform", category: "paint", options: ["map", "viewport"], enableDefault: "map" },
|
|
705
|
+
// Alignment (paint)
|
|
706
|
+
{ key: "circle-pitch-scale", label: "Pitch Scale", widget: "enum", group: "Alignment", category: "paint", options: ["map", "viewport"], enableDefault: "map" },
|
|
707
|
+
{ key: "circle-pitch-alignment", label: "Pitch Alignment", widget: "enum", group: "Alignment", category: "paint", options: ["map", "viewport"], enableDefault: "viewport" },
|
|
708
|
+
// Sorting (layout)
|
|
709
|
+
{ key: "circle-sort-key", label: "Sort Key", widget: "number", group: "Sorting", category: "layout", step: 1, enableDefault: 0 }
|
|
710
|
+
], Ae = [
|
|
711
|
+
// Icon Appearance (paint)
|
|
712
|
+
{ key: "icon-color", label: "Icon Color", widget: "color", group: "Icon Appearance", category: "paint", enableDefault: "#000000" },
|
|
713
|
+
{ key: "icon-opacity", label: "Icon Opacity", widget: "opacity", group: "Icon Appearance", category: "paint", enableDefault: 1 },
|
|
714
|
+
{ key: "icon-halo-color", label: "Icon Halo Color", widget: "color", group: "Icon Appearance", category: "paint", enableDefault: "transparent" },
|
|
715
|
+
{ key: "icon-halo-width", label: "Icon Halo Width", widget: "number", group: "Icon Appearance", category: "paint", min: 0, step: 0.5, enableDefault: 0 },
|
|
716
|
+
{ key: "icon-halo-blur", label: "Icon Halo Blur", widget: "number", group: "Icon Appearance", category: "paint", min: 0, step: 0.5, enableDefault: 0 },
|
|
717
|
+
// Icon Transform (paint)
|
|
718
|
+
{ key: "icon-translate", label: "Icon Translate (X, Y)", widget: "translate", group: "Icon Transform", category: "paint", enableDefault: [0, 0] },
|
|
719
|
+
{ key: "icon-translate-anchor", label: "Icon Translate Anchor", widget: "enum", group: "Icon Transform", category: "paint", options: ["map", "viewport"], enableDefault: "map" },
|
|
720
|
+
// Text Appearance (paint)
|
|
721
|
+
{ key: "text-color", label: "Text Color", widget: "color", group: "Text Appearance", category: "paint", enableDefault: "#000000" },
|
|
722
|
+
{ key: "text-opacity", label: "Text Opacity", widget: "opacity", group: "Text Appearance", category: "paint", enableDefault: 1 },
|
|
723
|
+
{ key: "text-halo-color", label: "Text Halo Color", widget: "color", group: "Text Appearance", category: "paint", enableDefault: "transparent" },
|
|
724
|
+
{ key: "text-halo-width", label: "Text Halo Width", widget: "number", group: "Text Appearance", category: "paint", min: 0, step: 0.5, enableDefault: 0 },
|
|
725
|
+
{ key: "text-halo-blur", label: "Text Halo Blur", widget: "number", group: "Text Appearance", category: "paint", min: 0, step: 0.5, enableDefault: 0 },
|
|
726
|
+
// Text Transform (paint)
|
|
727
|
+
{ key: "text-translate", label: "Text Translate (X, Y)", widget: "translate", group: "Text Transform", category: "paint", enableDefault: [0, 0] },
|
|
728
|
+
{ key: "text-translate-anchor", label: "Text Translate Anchor", widget: "enum", group: "Text Transform", category: "paint", options: ["map", "viewport"], enableDefault: "map" },
|
|
729
|
+
// Icon Layout (layout)
|
|
730
|
+
{ key: "icon-image", label: "Icon Image", widget: "text", group: "Icon Layout", category: "layout", enableDefault: "" },
|
|
731
|
+
{ key: "icon-size", label: "Icon Size", widget: "number", group: "Icon Layout", category: "layout", min: 0, step: 0.1, enableDefault: 1 },
|
|
732
|
+
{ key: "icon-rotate", label: "Icon Rotate", widget: "number", group: "Icon Layout", category: "layout", step: 1, enableDefault: 0 },
|
|
733
|
+
{ key: "icon-padding", label: "Icon Padding", widget: "number", group: "Icon Layout", category: "layout", min: 0, step: 1, enableDefault: 2 },
|
|
734
|
+
{ key: "icon-anchor", label: "Icon Anchor", widget: "enum", group: "Icon Layout", category: "layout", options: ["center", "left", "right", "top", "bottom", "top-left", "top-right", "bottom-left", "bottom-right"], enableDefault: "center" },
|
|
735
|
+
{ key: "icon-allow-overlap", label: "Icon Allow Overlap", widget: "boolean", group: "Icon Layout", category: "layout", enableDefault: !1 },
|
|
736
|
+
{ key: "icon-optional", label: "Icon Optional", widget: "boolean", group: "Icon Layout", category: "layout", enableDefault: !1 },
|
|
737
|
+
{ key: "icon-rotation-alignment", label: "Icon Rotation Alignment", widget: "enum", group: "Icon Layout", category: "layout", options: ["map", "viewport", "auto"], enableDefault: "auto" },
|
|
738
|
+
{ key: "icon-text-fit", label: "Icon Text Fit", widget: "enum", group: "Icon Layout", category: "layout", options: ["none", "width", "height", "both"], enableDefault: "none" },
|
|
739
|
+
{ key: "icon-offset", label: "Icon Offset (X, Y)", widget: "translate", group: "Icon Layout", category: "layout", enableDefault: [0, 0] },
|
|
740
|
+
// Text Layout (layout)
|
|
741
|
+
{ key: "text-field", label: "Text Field", widget: "text", group: "Text Layout", category: "layout", enableDefault: "{name}" },
|
|
742
|
+
{ key: "text-size", label: "Text Size", widget: "number", group: "Text Layout", category: "layout", min: 0, step: 1, enableDefault: 16 },
|
|
743
|
+
{ key: "text-font", label: "Text Font (comma-separated)", widget: "stringArray", group: "Text Layout", category: "layout", enableDefault: ["Open Sans Regular"] },
|
|
744
|
+
{ key: "text-max-width", label: "Text Max Width", widget: "number", group: "Text Layout", category: "layout", min: 0, step: 1, enableDefault: 10 },
|
|
745
|
+
{ key: "text-letter-spacing", label: "Letter Spacing", widget: "number", group: "Text Layout", category: "layout", step: 0.05, enableDefault: 0 },
|
|
746
|
+
{ key: "text-justify", label: "Text Justify", widget: "enum", group: "Text Layout", category: "layout", options: ["auto", "left", "center", "right"], enableDefault: "center" },
|
|
747
|
+
{ key: "text-anchor", label: "Text Anchor", widget: "enum", group: "Text Layout", category: "layout", options: ["center", "left", "right", "top", "bottom", "top-left", "top-right", "bottom-left", "bottom-right"], enableDefault: "center" },
|
|
748
|
+
{ key: "text-transform", label: "Text Transform", widget: "enum", group: "Text Layout", category: "layout", options: ["none", "uppercase", "lowercase"], enableDefault: "none" },
|
|
749
|
+
{ key: "text-offset", label: "Text Offset (X, Y)", widget: "translate", group: "Text Layout", category: "layout", enableDefault: [0, 0] },
|
|
750
|
+
{ key: "text-allow-overlap", label: "Text Allow Overlap", widget: "boolean", group: "Text Layout", category: "layout", enableDefault: !1 },
|
|
751
|
+
{ key: "text-optional", label: "Text Optional", widget: "boolean", group: "Text Layout", category: "layout", enableDefault: !1 },
|
|
752
|
+
{ key: "text-rotation-alignment", label: "Text Rotation Alignment", widget: "enum", group: "Text Layout", category: "layout", options: ["map", "viewport", "viewport-glyph", "auto"], enableDefault: "auto" },
|
|
753
|
+
// Placement (layout)
|
|
754
|
+
{ key: "symbol-placement", label: "Symbol Placement", widget: "enum", group: "Placement", category: "layout", options: ["point", "line", "line-center"], enableDefault: "point" },
|
|
755
|
+
{ key: "symbol-spacing", label: "Symbol Spacing", widget: "number", group: "Placement", category: "layout", min: 1, step: 1, enableDefault: 250 },
|
|
756
|
+
{ key: "symbol-avoid-edges", label: "Avoid Edges", widget: "boolean", group: "Placement", category: "layout", enableDefault: !1 },
|
|
757
|
+
{ key: "symbol-sort-key", label: "Sort Key", widget: "number", group: "Placement", category: "layout", step: 1, enableDefault: 0 },
|
|
758
|
+
{ key: "symbol-z-order", label: "Z-Order", widget: "enum", group: "Placement", category: "layout", options: ["auto", "viewport-y", "source"], enableDefault: "auto" }
|
|
759
|
+
], Ee = {
|
|
760
|
+
fill: Te,
|
|
761
|
+
line: Le,
|
|
762
|
+
circle: Ie,
|
|
763
|
+
symbol: Ae
|
|
764
|
+
};
|
|
765
|
+
function Fe(a) {
|
|
766
|
+
return Ee[a] ?? [];
|
|
767
|
+
}
|
|
768
|
+
function te(a) {
|
|
769
|
+
const i = {};
|
|
770
|
+
for (const t of a)
|
|
771
|
+
i[t.group] || (i[t.group] = []), i[t.group].push(t);
|
|
772
|
+
return i;
|
|
773
|
+
}
|
|
774
|
+
const _ = {
|
|
775
|
+
type: "fill",
|
|
776
|
+
paint: { "fill-color": "#4a90d9", "fill-opacity": 0.6, "fill-outline-color": "transparent" }
|
|
777
|
+
}, de = {
|
|
778
|
+
type: "line",
|
|
779
|
+
paint: { "line-color": "#2980b9", "line-width": 2, "line-opacity": 1 }
|
|
780
|
+
}, ge = {
|
|
781
|
+
type: "circle",
|
|
782
|
+
paint: { "circle-color": "#e74c3c", "circle-radius": 5, "circle-opacity": 0.9 }
|
|
783
|
+
}, be = {
|
|
784
|
+
type: "symbol",
|
|
785
|
+
paint: { "text-color": "#333333" },
|
|
786
|
+
layout: { "text-field": "{name}", "text-size": 14 }
|
|
787
|
+
}, Pe = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500", le = {
|
|
788
|
+
fill: "Fill",
|
|
789
|
+
line: "Line",
|
|
790
|
+
circle: "Circle",
|
|
791
|
+
symbol: "Symbol"
|
|
792
|
+
};
|
|
793
|
+
function Oe({ value: a, onChange: i, suggestedType: t }) {
|
|
794
|
+
const l = (m) => {
|
|
795
|
+
i(m === "fill" ? _ : m === "line" ? de : m === "circle" ? ge : be);
|
|
796
|
+
}, n = (m, C) => {
|
|
797
|
+
i({ ...a, paint: { ...a.paint, [m]: C } });
|
|
798
|
+
}, u = (m, C) => {
|
|
799
|
+
const S = { ...a.layout ?? {}, [m]: C };
|
|
800
|
+
for (const A of Object.keys(S))
|
|
801
|
+
S[A] === void 0 && delete S[A];
|
|
802
|
+
i({
|
|
803
|
+
...a,
|
|
804
|
+
layout: Object.keys(S).length > 0 ? S : void 0
|
|
805
|
+
});
|
|
806
|
+
}, p = Fe(a.type), o = p.filter((m) => m.category === "paint"), g = p.filter((m) => m.category === "layout"), x = te(o), d = te(g), y = a.paint, k = a.layout ?? {}, c = Object.keys(x), b = Object.keys(d);
|
|
807
|
+
return /* @__PURE__ */ r("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
808
|
+
t && t !== a.type && /* @__PURE__ */ r("div", { className: "mapui:flex mapui:items-center mapui:justify-between mapui:rounded mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:px-3 mapui:py-2 mapui:text-sm mapui:text-blue-800", children: [
|
|
809
|
+
/* @__PURE__ */ r("span", { children: [
|
|
438
810
|
"Detected geometry suggests ",
|
|
439
|
-
/* @__PURE__ */ e("strong", { children:
|
|
811
|
+
/* @__PURE__ */ e("strong", { children: t }),
|
|
440
812
|
" style."
|
|
441
813
|
] }),
|
|
442
814
|
/* @__PURE__ */ e(
|
|
443
815
|
"button",
|
|
444
816
|
{
|
|
445
817
|
type: "button",
|
|
446
|
-
onClick: () =>
|
|
818
|
+
onClick: () => l(t),
|
|
447
819
|
className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-blue-400 mapui:bg-white mapui:px-2 mapui:py-0.5 mapui:text-xs mapui:text-blue-700 hover:mapui:bg-blue-100",
|
|
448
820
|
children: "Apply"
|
|
449
821
|
}
|
|
450
822
|
)
|
|
451
823
|
] }),
|
|
452
|
-
/* @__PURE__ */ e(
|
|
824
|
+
/* @__PURE__ */ e(N, { label: "Style Type", children: /* @__PURE__ */ e(
|
|
453
825
|
"select",
|
|
454
826
|
{
|
|
455
827
|
value: a.type,
|
|
456
|
-
onChange: (
|
|
457
|
-
className:
|
|
458
|
-
children: [
|
|
459
|
-
/* @__PURE__ */ e("option", { value: "fill", children: "Fill" }),
|
|
460
|
-
/* @__PURE__ */ e("option", { value: "line", children: "Line" }),
|
|
461
|
-
/* @__PURE__ */ e("option", { value: "circle", children: "Circle" })
|
|
462
|
-
]
|
|
828
|
+
onChange: (m) => l(m.target.value),
|
|
829
|
+
className: Pe,
|
|
830
|
+
children: Object.keys(le).map((m) => /* @__PURE__ */ e("option", { value: m, children: le[m] }, m))
|
|
463
831
|
}
|
|
464
832
|
) }),
|
|
465
|
-
/* @__PURE__ */
|
|
833
|
+
/* @__PURE__ */ r("div", { className: "mapui:rounded mapui:border mapui:border-gray-100 mapui:p-2", children: [
|
|
466
834
|
/* @__PURE__ */ e("p", { className: "mapui:m-0 mapui:mb-1 mapui:text-xs mapui:text-gray-500", children: "Preview" }),
|
|
467
|
-
/* @__PURE__ */ e(
|
|
835
|
+
/* @__PURE__ */ e(De, { style: a })
|
|
468
836
|
] }),
|
|
469
|
-
|
|
470
|
-
/* @__PURE__ */ e(
|
|
471
|
-
|
|
837
|
+
c.length > 0 && /* @__PURE__ */ r("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
|
|
838
|
+
/* @__PURE__ */ e("p", { className: "mapui:m-0 mapui:text-xs mapui:font-medium mapui:uppercase mapui:tracking-wide mapui:text-gray-500", children: "Paint" }),
|
|
839
|
+
c.map((m, C) => /* @__PURE__ */ e(
|
|
840
|
+
ie,
|
|
472
841
|
{
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
{
|
|
482
|
-
type: "range",
|
|
483
|
-
min: 0,
|
|
484
|
-
max: 1,
|
|
485
|
-
step: 0.01,
|
|
486
|
-
value: a.paint["fill-opacity"],
|
|
487
|
-
onChange: (u) => i({
|
|
488
|
-
...a,
|
|
489
|
-
paint: { ...a.paint, "fill-opacity": parseFloat(u.target.value) }
|
|
490
|
-
}),
|
|
491
|
-
className: "mapui:flex-1"
|
|
492
|
-
}
|
|
493
|
-
),
|
|
494
|
-
/* @__PURE__ */ e("span", { className: "mapui:w-8 mapui:text-right mapui:text-xs mapui:text-gray-600", children: a.paint["fill-opacity"].toFixed(2) })
|
|
495
|
-
] }) }),
|
|
496
|
-
/* @__PURE__ */ e(x, { label: "Fill Outline Color (optional)", children: /* @__PURE__ */ t("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
497
|
-
/* @__PURE__ */ e(
|
|
498
|
-
"input",
|
|
499
|
-
{
|
|
500
|
-
type: "checkbox",
|
|
501
|
-
checked: a.paint["fill-outline-color"] !== void 0,
|
|
502
|
-
onChange: (u) => i({
|
|
503
|
-
...a,
|
|
504
|
-
paint: {
|
|
505
|
-
...a.paint,
|
|
506
|
-
"fill-outline-color": u.target.checked ? "#000000" : void 0
|
|
507
|
-
}
|
|
508
|
-
}),
|
|
509
|
-
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
510
|
-
}
|
|
511
|
-
),
|
|
512
|
-
a.paint["fill-outline-color"] !== void 0 && /* @__PURE__ */ e(
|
|
513
|
-
A,
|
|
514
|
-
{
|
|
515
|
-
value: a.paint["fill-outline-color"],
|
|
516
|
-
onChange: (u) => i({
|
|
517
|
-
...a,
|
|
518
|
-
paint: { ...a.paint, "fill-outline-color": u }
|
|
519
|
-
}),
|
|
520
|
-
label: "Outline color"
|
|
521
|
-
}
|
|
522
|
-
)
|
|
523
|
-
] }) })
|
|
524
|
-
] }),
|
|
525
|
-
a.type === "line" && /* @__PURE__ */ t(E, { children: [
|
|
526
|
-
/* @__PURE__ */ e(x, { label: "Line Color", children: /* @__PURE__ */ e(
|
|
527
|
-
A,
|
|
528
|
-
{
|
|
529
|
-
value: a.paint["line-color"],
|
|
530
|
-
onChange: (u) => i({ ...a, paint: { ...a.paint, "line-color": u } }),
|
|
531
|
-
label: "Line color"
|
|
532
|
-
}
|
|
533
|
-
) }),
|
|
534
|
-
/* @__PURE__ */ e(x, { label: "Line Width", children: /* @__PURE__ */ e(
|
|
535
|
-
"input",
|
|
536
|
-
{
|
|
537
|
-
type: "number",
|
|
538
|
-
min: 0,
|
|
539
|
-
step: 0.5,
|
|
540
|
-
value: a.paint["line-width"],
|
|
541
|
-
onChange: (u) => i({
|
|
542
|
-
...a,
|
|
543
|
-
paint: { ...a.paint, "line-width": parseFloat(u.target.value) || 0 }
|
|
544
|
-
}),
|
|
545
|
-
className: R
|
|
546
|
-
}
|
|
547
|
-
) }),
|
|
548
|
-
/* @__PURE__ */ e(x, { label: "Line Opacity", children: /* @__PURE__ */ t("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
549
|
-
/* @__PURE__ */ e(
|
|
550
|
-
"input",
|
|
551
|
-
{
|
|
552
|
-
type: "range",
|
|
553
|
-
min: 0,
|
|
554
|
-
max: 1,
|
|
555
|
-
step: 0.01,
|
|
556
|
-
value: a.paint["line-opacity"],
|
|
557
|
-
onChange: (u) => i({
|
|
558
|
-
...a,
|
|
559
|
-
paint: { ...a.paint, "line-opacity": parseFloat(u.target.value) }
|
|
560
|
-
}),
|
|
561
|
-
className: "mapui:flex-1"
|
|
562
|
-
}
|
|
563
|
-
),
|
|
564
|
-
/* @__PURE__ */ e("span", { className: "mapui:w-8 mapui:text-right mapui:text-xs mapui:text-gray-600", children: a.paint["line-opacity"].toFixed(2) })
|
|
565
|
-
] }) }),
|
|
566
|
-
/* @__PURE__ */ e(x, { label: "Dash Array (optional, comma-separated)", children: /* @__PURE__ */ e(
|
|
567
|
-
"input",
|
|
568
|
-
{
|
|
569
|
-
type: "text",
|
|
570
|
-
value: ((m = a.paint["line-dasharray"]) == null ? void 0 : m.join(", ")) ?? "",
|
|
571
|
-
onChange: (u) => {
|
|
572
|
-
const l = u.target.value.trim(), n = l ? l.split(",").map((d) => parseFloat(d.trim())).filter((d) => !isNaN(d)) : void 0;
|
|
573
|
-
i({
|
|
574
|
-
...a,
|
|
575
|
-
paint: { ...a.paint, "line-dasharray": n }
|
|
576
|
-
});
|
|
577
|
-
},
|
|
578
|
-
placeholder: "e.g. 2, 4",
|
|
579
|
-
className: R
|
|
580
|
-
}
|
|
581
|
-
) })
|
|
842
|
+
title: m,
|
|
843
|
+
properties: x[m],
|
|
844
|
+
values: y,
|
|
845
|
+
onChange: n,
|
|
846
|
+
defaultOpen: C === 0
|
|
847
|
+
},
|
|
848
|
+
m
|
|
849
|
+
))
|
|
582
850
|
] }),
|
|
583
|
-
|
|
584
|
-
/* @__PURE__ */ e(
|
|
585
|
-
|
|
851
|
+
b.length > 0 && /* @__PURE__ */ r("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
|
|
852
|
+
/* @__PURE__ */ e("p", { className: "mapui:m-0 mapui:text-xs mapui:font-medium mapui:uppercase mapui:tracking-wide mapui:text-gray-500", children: "Layout" }),
|
|
853
|
+
b.map((m) => /* @__PURE__ */ e(
|
|
854
|
+
ie,
|
|
586
855
|
{
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
type: "number",
|
|
596
|
-
min: 0,
|
|
597
|
-
step: 1,
|
|
598
|
-
value: a.paint["circle-radius"],
|
|
599
|
-
onChange: (u) => i({
|
|
600
|
-
...a,
|
|
601
|
-
paint: {
|
|
602
|
-
...a.paint,
|
|
603
|
-
"circle-radius": parseFloat(u.target.value) || 0
|
|
604
|
-
}
|
|
605
|
-
}),
|
|
606
|
-
className: R
|
|
607
|
-
}
|
|
608
|
-
) }),
|
|
609
|
-
/* @__PURE__ */ e(x, { label: "Circle Opacity", children: /* @__PURE__ */ t("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
610
|
-
/* @__PURE__ */ e(
|
|
611
|
-
"input",
|
|
612
|
-
{
|
|
613
|
-
type: "range",
|
|
614
|
-
min: 0,
|
|
615
|
-
max: 1,
|
|
616
|
-
step: 0.01,
|
|
617
|
-
value: a.paint["circle-opacity"],
|
|
618
|
-
onChange: (u) => i({
|
|
619
|
-
...a,
|
|
620
|
-
paint: {
|
|
621
|
-
...a.paint,
|
|
622
|
-
"circle-opacity": parseFloat(u.target.value)
|
|
623
|
-
}
|
|
624
|
-
}),
|
|
625
|
-
className: "mapui:flex-1"
|
|
626
|
-
}
|
|
627
|
-
),
|
|
628
|
-
/* @__PURE__ */ e("span", { className: "mapui:w-8 mapui:text-right mapui:text-xs mapui:text-gray-600", children: a.paint["circle-opacity"].toFixed(2) })
|
|
629
|
-
] }) }),
|
|
630
|
-
/* @__PURE__ */ e(x, { label: "Stroke Color (optional)", children: /* @__PURE__ */ t("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
631
|
-
/* @__PURE__ */ e(
|
|
632
|
-
"input",
|
|
633
|
-
{
|
|
634
|
-
type: "checkbox",
|
|
635
|
-
checked: a.paint["circle-stroke-color"] !== void 0,
|
|
636
|
-
onChange: (u) => i({
|
|
637
|
-
...a,
|
|
638
|
-
paint: {
|
|
639
|
-
...a.paint,
|
|
640
|
-
"circle-stroke-color": u.target.checked ? "#000000" : void 0,
|
|
641
|
-
"circle-stroke-width": u.target.checked ? 1 : void 0
|
|
642
|
-
}
|
|
643
|
-
}),
|
|
644
|
-
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
645
|
-
}
|
|
646
|
-
),
|
|
647
|
-
a.paint["circle-stroke-color"] !== void 0 && /* @__PURE__ */ e(
|
|
648
|
-
A,
|
|
649
|
-
{
|
|
650
|
-
value: a.paint["circle-stroke-color"],
|
|
651
|
-
onChange: (u) => i({
|
|
652
|
-
...a,
|
|
653
|
-
paint: { ...a.paint, "circle-stroke-color": u }
|
|
654
|
-
}),
|
|
655
|
-
label: "Stroke color"
|
|
656
|
-
}
|
|
657
|
-
)
|
|
658
|
-
] }) }),
|
|
659
|
-
a.paint["circle-stroke-color"] !== void 0 && /* @__PURE__ */ e(x, { label: "Stroke Width", children: /* @__PURE__ */ e(
|
|
660
|
-
"input",
|
|
661
|
-
{
|
|
662
|
-
type: "number",
|
|
663
|
-
min: 0,
|
|
664
|
-
step: 1,
|
|
665
|
-
value: a.paint["circle-stroke-width"] ?? 1,
|
|
666
|
-
onChange: (u) => i({
|
|
667
|
-
...a,
|
|
668
|
-
paint: {
|
|
669
|
-
...a.paint,
|
|
670
|
-
"circle-stroke-width": parseFloat(u.target.value) || 0
|
|
671
|
-
}
|
|
672
|
-
}),
|
|
673
|
-
className: R
|
|
674
|
-
}
|
|
675
|
-
) })
|
|
856
|
+
title: m,
|
|
857
|
+
properties: d[m],
|
|
858
|
+
values: k,
|
|
859
|
+
onChange: u,
|
|
860
|
+
defaultOpen: !1
|
|
861
|
+
},
|
|
862
|
+
m
|
|
863
|
+
))
|
|
676
864
|
] })
|
|
677
865
|
] });
|
|
678
866
|
}
|
|
679
|
-
const
|
|
680
|
-
function
|
|
681
|
-
return /* @__PURE__ */
|
|
682
|
-
/* @__PURE__ */ e(
|
|
867
|
+
const re = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
|
|
868
|
+
function Me({ value: a, onChange: i }) {
|
|
869
|
+
return /* @__PURE__ */ r("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
|
|
870
|
+
/* @__PURE__ */ e(N, { label: "Label", children: /* @__PURE__ */ e(
|
|
683
871
|
"input",
|
|
684
872
|
{
|
|
685
873
|
type: "text",
|
|
686
874
|
value: a.label,
|
|
687
|
-
onChange: (
|
|
875
|
+
onChange: (t) => i({ ...a, label: t.target.value }),
|
|
688
876
|
placeholder: "Legend entry label",
|
|
689
|
-
className:
|
|
877
|
+
className: re
|
|
690
878
|
}
|
|
691
879
|
) }),
|
|
692
|
-
/* @__PURE__ */ e(
|
|
693
|
-
|
|
880
|
+
/* @__PURE__ */ e(N, { label: "Color", children: /* @__PURE__ */ e(
|
|
881
|
+
se,
|
|
694
882
|
{
|
|
695
883
|
value: a.color,
|
|
696
|
-
onChange: (
|
|
884
|
+
onChange: (t) => i({ ...a, color: t }),
|
|
697
885
|
label: "Entry color"
|
|
698
886
|
}
|
|
699
887
|
) }),
|
|
700
|
-
/* @__PURE__ */ e(
|
|
888
|
+
/* @__PURE__ */ e(N, { label: "Shape", children: /* @__PURE__ */ r(
|
|
701
889
|
"select",
|
|
702
890
|
{
|
|
703
891
|
value: a.shape ?? "square",
|
|
704
|
-
onChange: (
|
|
705
|
-
className:
|
|
892
|
+
onChange: (t) => i({ ...a, shape: t.target.value }),
|
|
893
|
+
className: re,
|
|
706
894
|
children: [
|
|
707
895
|
/* @__PURE__ */ e("option", { value: "square", children: "Square" }),
|
|
708
896
|
/* @__PURE__ */ e("option", { value: "circle", children: "Circle" }),
|
|
@@ -712,70 +900,70 @@ function Ne({ value: a, onChange: i }) {
|
|
|
712
900
|
) })
|
|
713
901
|
] });
|
|
714
902
|
}
|
|
715
|
-
const
|
|
716
|
-
function
|
|
717
|
-
const
|
|
718
|
-
i({ entries: [...
|
|
719
|
-
},
|
|
720
|
-
const
|
|
721
|
-
i({ entries:
|
|
722
|
-
}, u = (
|
|
723
|
-
const
|
|
724
|
-
i(
|
|
725
|
-
},
|
|
726
|
-
i(
|
|
903
|
+
const pe = () => ({ label: "", color: "#4a90d9", shape: "square" });
|
|
904
|
+
function je({ value: a, onChange: i }) {
|
|
905
|
+
const t = (a == null ? void 0 : a.entries) ?? [], l = () => {
|
|
906
|
+
i({ entries: [...t, pe()] });
|
|
907
|
+
}, n = (o, g) => {
|
|
908
|
+
const x = t.map((d, y) => y === o ? g : d);
|
|
909
|
+
i({ entries: x });
|
|
910
|
+
}, u = (o) => {
|
|
911
|
+
const g = t.filter((x, d) => d !== o);
|
|
912
|
+
i(g.length > 0 ? { entries: g } : void 0);
|
|
913
|
+
}, p = (o) => {
|
|
914
|
+
i(o ? { entries: [pe()] } : void 0);
|
|
727
915
|
};
|
|
728
|
-
return /* @__PURE__ */
|
|
729
|
-
/* @__PURE__ */
|
|
916
|
+
return /* @__PURE__ */ r("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
917
|
+
/* @__PURE__ */ r("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
730
918
|
/* @__PURE__ */ e(
|
|
731
919
|
"input",
|
|
732
920
|
{
|
|
733
921
|
type: "checkbox",
|
|
734
922
|
id: "legend-enabled",
|
|
735
923
|
checked: a !== void 0,
|
|
736
|
-
onChange: (
|
|
924
|
+
onChange: (o) => p(o.target.checked),
|
|
737
925
|
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
738
926
|
}
|
|
739
927
|
),
|
|
740
928
|
/* @__PURE__ */ e("label", { htmlFor: "legend-enabled", className: "mapui:text-sm mapui:font-medium mapui:text-gray-700", children: "Enable Legend" })
|
|
741
929
|
] }),
|
|
742
|
-
a !== void 0 && /* @__PURE__ */
|
|
743
|
-
/* @__PURE__ */ e("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children:
|
|
930
|
+
a !== void 0 && /* @__PURE__ */ r(O, { children: [
|
|
931
|
+
/* @__PURE__ */ e("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: t.map((o, g) => /* @__PURE__ */ r(
|
|
744
932
|
"li",
|
|
745
933
|
{
|
|
746
934
|
className: "mapui:rounded mapui:border mapui:border-gray-200 mapui:p-3",
|
|
747
935
|
children: [
|
|
748
|
-
/* @__PURE__ */
|
|
749
|
-
/* @__PURE__ */
|
|
936
|
+
/* @__PURE__ */ r("div", { className: "mapui:mb-2 mapui:flex mapui:items-center mapui:justify-between", children: [
|
|
937
|
+
/* @__PURE__ */ r("span", { className: "mapui:text-xs mapui:font-medium mapui:text-gray-600", children: [
|
|
750
938
|
"Entry ",
|
|
751
|
-
|
|
939
|
+
g + 1
|
|
752
940
|
] }),
|
|
753
941
|
/* @__PURE__ */ e(
|
|
754
942
|
"button",
|
|
755
943
|
{
|
|
756
944
|
type: "button",
|
|
757
|
-
onClick: () => u(
|
|
945
|
+
onClick: () => u(g),
|
|
758
946
|
className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-red-200 mapui:bg-white mapui:px-2 mapui:py-0.5 mapui:text-xs mapui:text-red-600 hover:mapui:bg-red-50",
|
|
759
947
|
children: "Remove"
|
|
760
948
|
}
|
|
761
949
|
)
|
|
762
950
|
] }),
|
|
763
951
|
/* @__PURE__ */ e(
|
|
764
|
-
|
|
952
|
+
Me,
|
|
765
953
|
{
|
|
766
|
-
value:
|
|
767
|
-
onChange: (
|
|
954
|
+
value: o,
|
|
955
|
+
onChange: (x) => n(g, x)
|
|
768
956
|
}
|
|
769
957
|
)
|
|
770
958
|
]
|
|
771
959
|
},
|
|
772
|
-
|
|
960
|
+
g
|
|
773
961
|
)) }),
|
|
774
962
|
/* @__PURE__ */ e(
|
|
775
963
|
"button",
|
|
776
964
|
{
|
|
777
965
|
type: "button",
|
|
778
|
-
onClick:
|
|
966
|
+
onClick: l,
|
|
779
967
|
className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-dashed mapui:border-gray-300 mapui:px-3 mapui:py-2 mapui:text-sm mapui:text-gray-600 hover:mapui:border-blue-400 hover:mapui:text-blue-600",
|
|
780
968
|
children: "+ Add Entry"
|
|
781
969
|
}
|
|
@@ -783,47 +971,47 @@ function ve({ value: a, onChange: i }) {
|
|
|
783
971
|
] })
|
|
784
972
|
] });
|
|
785
973
|
}
|
|
786
|
-
function
|
|
974
|
+
function ue({
|
|
787
975
|
options: a,
|
|
788
976
|
onChange: i,
|
|
789
|
-
placeholder:
|
|
790
|
-
className:
|
|
977
|
+
placeholder: t,
|
|
978
|
+
className: l
|
|
791
979
|
}) {
|
|
792
|
-
const [
|
|
980
|
+
const [n, u] = w(() => (a == null ? void 0 : a.join(", ")) ?? "");
|
|
793
981
|
return J(() => {
|
|
794
982
|
u((a == null ? void 0 : a.join(", ")) ?? "");
|
|
795
983
|
}, [a == null ? void 0 : a.join(",")]), /* @__PURE__ */ e(
|
|
796
984
|
"input",
|
|
797
985
|
{
|
|
798
986
|
type: "text",
|
|
799
|
-
value:
|
|
800
|
-
onChange: (
|
|
987
|
+
value: n,
|
|
988
|
+
onChange: (o) => u(o.target.value),
|
|
801
989
|
onBlur: () => {
|
|
802
|
-
const
|
|
803
|
-
i(
|
|
990
|
+
const o = n.trim(), g = o ? o.split(",").map((x) => x.trim()).filter(Boolean) : void 0;
|
|
991
|
+
i(g), u((g == null ? void 0 : g.join(", ")) ?? "");
|
|
804
992
|
},
|
|
805
|
-
placeholder:
|
|
806
|
-
className:
|
|
993
|
+
placeholder: t,
|
|
994
|
+
className: l
|
|
807
995
|
}
|
|
808
996
|
);
|
|
809
997
|
}
|
|
810
|
-
const
|
|
998
|
+
const I = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500", Be = {
|
|
811
999
|
text: { type: "text", property: "", label: "", autocomplete: !1 },
|
|
812
1000
|
number: { type: "number", property: "", label: "", inputMode: "input", operator: "eq" },
|
|
813
1001
|
datetime: { type: "datetime", property: "", label: "", range: !1 },
|
|
814
1002
|
select: { type: "select", property: "", label: "" }
|
|
815
1003
|
};
|
|
816
|
-
function
|
|
817
|
-
const
|
|
818
|
-
i({ ...
|
|
819
|
-
},
|
|
820
|
-
return /* @__PURE__ */
|
|
821
|
-
/* @__PURE__ */ e(
|
|
1004
|
+
function Re({ value: a, onChange: i, availableProperties: t }) {
|
|
1005
|
+
const l = (p) => {
|
|
1006
|
+
i({ ...Be[p], property: a.property, label: a.label });
|
|
1007
|
+
}, n = (p) => i({ ...a, ...p }), u = t && t.length > 0;
|
|
1008
|
+
return /* @__PURE__ */ r("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
1009
|
+
/* @__PURE__ */ e(N, { label: "Field Type", children: /* @__PURE__ */ r(
|
|
822
1010
|
"select",
|
|
823
1011
|
{
|
|
824
1012
|
value: a.type,
|
|
825
|
-
onChange: (
|
|
826
|
-
className:
|
|
1013
|
+
onChange: (p) => l(p.target.value),
|
|
1014
|
+
className: I,
|
|
827
1015
|
children: [
|
|
828
1016
|
/* @__PURE__ */ e("option", { value: "text", children: "Text" }),
|
|
829
1017
|
/* @__PURE__ */ e("option", { value: "number", children: "Number" }),
|
|
@@ -832,15 +1020,15 @@ function Ce({ value: a, onChange: i, availableProperties: p }) {
|
|
|
832
1020
|
]
|
|
833
1021
|
}
|
|
834
1022
|
) }),
|
|
835
|
-
/* @__PURE__ */ e(
|
|
1023
|
+
/* @__PURE__ */ e(N, { label: "Property", required: !0, children: u ? /* @__PURE__ */ r(
|
|
836
1024
|
"select",
|
|
837
1025
|
{
|
|
838
1026
|
value: a.property,
|
|
839
|
-
onChange: (
|
|
840
|
-
className:
|
|
1027
|
+
onChange: (p) => n({ property: p.target.value }),
|
|
1028
|
+
className: I,
|
|
841
1029
|
children: [
|
|
842
1030
|
/* @__PURE__ */ e("option", { value: "", children: "Select a property…" }),
|
|
843
|
-
|
|
1031
|
+
t.map((p) => /* @__PURE__ */ e("option", { value: p.name, children: p.title ?? p.name }, p.name))
|
|
844
1032
|
]
|
|
845
1033
|
}
|
|
846
1034
|
) : /* @__PURE__ */ e(
|
|
@@ -848,93 +1036,93 @@ function Ce({ value: a, onChange: i, availableProperties: p }) {
|
|
|
848
1036
|
{
|
|
849
1037
|
type: "text",
|
|
850
1038
|
value: a.property,
|
|
851
|
-
onChange: (
|
|
1039
|
+
onChange: (p) => n({ property: p.target.value }),
|
|
852
1040
|
placeholder: "e.g. name",
|
|
853
|
-
className:
|
|
1041
|
+
className: I
|
|
854
1042
|
}
|
|
855
1043
|
) }),
|
|
856
|
-
/* @__PURE__ */ e(
|
|
1044
|
+
/* @__PURE__ */ e(N, { label: "Label", children: /* @__PURE__ */ e(
|
|
857
1045
|
"input",
|
|
858
1046
|
{
|
|
859
1047
|
type: "text",
|
|
860
1048
|
value: a.label,
|
|
861
|
-
onChange: (
|
|
1049
|
+
onChange: (p) => n({ label: p.target.value }),
|
|
862
1050
|
placeholder: "Display label",
|
|
863
|
-
className:
|
|
1051
|
+
className: I
|
|
864
1052
|
}
|
|
865
1053
|
) }),
|
|
866
|
-
/* @__PURE__ */ e(
|
|
1054
|
+
/* @__PURE__ */ e(N, { label: "Placeholder", children: /* @__PURE__ */ e(
|
|
867
1055
|
"input",
|
|
868
1056
|
{
|
|
869
1057
|
type: "text",
|
|
870
1058
|
value: a.placeholder ?? "",
|
|
871
|
-
onChange: (
|
|
1059
|
+
onChange: (p) => n({ placeholder: p.target.value || void 0 }),
|
|
872
1060
|
placeholder: "Input placeholder text",
|
|
873
|
-
className:
|
|
1061
|
+
className: I
|
|
874
1062
|
}
|
|
875
1063
|
) }),
|
|
876
|
-
a.type === "text" && /* @__PURE__ */
|
|
877
|
-
/* @__PURE__ */
|
|
1064
|
+
a.type === "text" && /* @__PURE__ */ r(O, { children: [
|
|
1065
|
+
/* @__PURE__ */ r("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
878
1066
|
/* @__PURE__ */ e(
|
|
879
1067
|
"input",
|
|
880
1068
|
{
|
|
881
1069
|
type: "checkbox",
|
|
882
1070
|
id: "text-autocomplete",
|
|
883
1071
|
checked: a.autocomplete ?? !1,
|
|
884
|
-
onChange: (
|
|
1072
|
+
onChange: (p) => i({ ...a, autocomplete: p.target.checked }),
|
|
885
1073
|
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
886
1074
|
}
|
|
887
1075
|
),
|
|
888
1076
|
/* @__PURE__ */ e("label", { htmlFor: "text-autocomplete", className: "mapui:text-sm mapui:text-gray-700", children: "Enable Autocomplete" })
|
|
889
1077
|
] }),
|
|
890
|
-
/* @__PURE__ */
|
|
1078
|
+
/* @__PURE__ */ r("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
891
1079
|
/* @__PURE__ */ e(
|
|
892
1080
|
"input",
|
|
893
1081
|
{
|
|
894
1082
|
type: "checkbox",
|
|
895
1083
|
id: "text-prefetch",
|
|
896
1084
|
checked: a.prefetch ?? !1,
|
|
897
|
-
onChange: (
|
|
1085
|
+
onChange: (p) => i({ ...a, prefetch: p.target.checked }),
|
|
898
1086
|
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
899
1087
|
}
|
|
900
1088
|
),
|
|
901
1089
|
/* @__PURE__ */ e("label", { htmlFor: "text-prefetch", className: "mapui:text-sm mapui:text-gray-700", children: "Prefetch Options" })
|
|
902
1090
|
] }),
|
|
903
|
-
/* @__PURE__ */ e(
|
|
904
|
-
|
|
1091
|
+
/* @__PURE__ */ e(N, { label: "Static Options (comma-separated)", children: /* @__PURE__ */ e(
|
|
1092
|
+
ue,
|
|
905
1093
|
{
|
|
906
1094
|
options: a.options,
|
|
907
|
-
onChange: (
|
|
1095
|
+
onChange: (p) => i({ ...a, options: p }),
|
|
908
1096
|
placeholder: "option1, option2",
|
|
909
|
-
className:
|
|
1097
|
+
className: I
|
|
910
1098
|
}
|
|
911
1099
|
) })
|
|
912
1100
|
] }),
|
|
913
|
-
a.type === "number" && /* @__PURE__ */
|
|
914
|
-
/* @__PURE__ */ e(
|
|
1101
|
+
a.type === "number" && /* @__PURE__ */ r(O, { children: [
|
|
1102
|
+
/* @__PURE__ */ e(N, { label: "Input Mode", children: /* @__PURE__ */ r(
|
|
915
1103
|
"select",
|
|
916
1104
|
{
|
|
917
1105
|
value: a.inputMode ?? "input",
|
|
918
|
-
onChange: (
|
|
1106
|
+
onChange: (p) => i({
|
|
919
1107
|
...a,
|
|
920
|
-
inputMode:
|
|
1108
|
+
inputMode: p.target.value
|
|
921
1109
|
}),
|
|
922
|
-
className:
|
|
1110
|
+
className: I,
|
|
923
1111
|
children: [
|
|
924
1112
|
/* @__PURE__ */ e("option", { value: "input", children: "Input" }),
|
|
925
1113
|
/* @__PURE__ */ e("option", { value: "slider", children: "Slider" })
|
|
926
1114
|
]
|
|
927
1115
|
}
|
|
928
1116
|
) }),
|
|
929
|
-
/* @__PURE__ */ e(
|
|
1117
|
+
/* @__PURE__ */ e(N, { label: "Operator", children: /* @__PURE__ */ r(
|
|
930
1118
|
"select",
|
|
931
1119
|
{
|
|
932
1120
|
value: a.operator ?? "eq",
|
|
933
|
-
onChange: (
|
|
1121
|
+
onChange: (p) => i({
|
|
934
1122
|
...a,
|
|
935
|
-
operator:
|
|
1123
|
+
operator: p.target.value
|
|
936
1124
|
}),
|
|
937
|
-
className:
|
|
1125
|
+
className: I,
|
|
938
1126
|
children: [
|
|
939
1127
|
/* @__PURE__ */ e("option", { value: "eq", children: "Equal (=)" }),
|
|
940
1128
|
/* @__PURE__ */ e("option", { value: "gt", children: "Greater Than (>)" }),
|
|
@@ -945,118 +1133,118 @@ function Ce({ value: a, onChange: i, availableProperties: p }) {
|
|
|
945
1133
|
]
|
|
946
1134
|
}
|
|
947
1135
|
) }),
|
|
948
|
-
/* @__PURE__ */
|
|
949
|
-
/* @__PURE__ */ e(
|
|
1136
|
+
/* @__PURE__ */ r("div", { className: "mapui:grid mapui:grid-cols-3 mapui:gap-2", children: [
|
|
1137
|
+
/* @__PURE__ */ e(N, { label: "Min", children: /* @__PURE__ */ e(
|
|
950
1138
|
"input",
|
|
951
1139
|
{
|
|
952
1140
|
type: "number",
|
|
953
1141
|
value: a.min ?? "",
|
|
954
|
-
onChange: (
|
|
1142
|
+
onChange: (p) => i({
|
|
955
1143
|
...a,
|
|
956
|
-
min:
|
|
1144
|
+
min: p.target.value ? parseFloat(p.target.value) : void 0
|
|
957
1145
|
}),
|
|
958
|
-
className:
|
|
1146
|
+
className: I
|
|
959
1147
|
}
|
|
960
1148
|
) }),
|
|
961
|
-
/* @__PURE__ */ e(
|
|
1149
|
+
/* @__PURE__ */ e(N, { label: "Max", children: /* @__PURE__ */ e(
|
|
962
1150
|
"input",
|
|
963
1151
|
{
|
|
964
1152
|
type: "number",
|
|
965
1153
|
value: a.max ?? "",
|
|
966
|
-
onChange: (
|
|
1154
|
+
onChange: (p) => i({
|
|
967
1155
|
...a,
|
|
968
|
-
max:
|
|
1156
|
+
max: p.target.value ? parseFloat(p.target.value) : void 0
|
|
969
1157
|
}),
|
|
970
|
-
className:
|
|
1158
|
+
className: I
|
|
971
1159
|
}
|
|
972
1160
|
) }),
|
|
973
|
-
/* @__PURE__ */ e(
|
|
1161
|
+
/* @__PURE__ */ e(N, { label: "Step", children: /* @__PURE__ */ e(
|
|
974
1162
|
"input",
|
|
975
1163
|
{
|
|
976
1164
|
type: "number",
|
|
977
1165
|
value: a.step ?? "",
|
|
978
|
-
onChange: (
|
|
1166
|
+
onChange: (p) => i({
|
|
979
1167
|
...a,
|
|
980
|
-
step:
|
|
1168
|
+
step: p.target.value ? parseFloat(p.target.value) : void 0
|
|
981
1169
|
}),
|
|
982
|
-
className:
|
|
1170
|
+
className: I
|
|
983
1171
|
}
|
|
984
1172
|
) })
|
|
985
1173
|
] })
|
|
986
1174
|
] }),
|
|
987
|
-
a.type === "datetime" && /* @__PURE__ */
|
|
1175
|
+
a.type === "datetime" && /* @__PURE__ */ r("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
988
1176
|
/* @__PURE__ */ e(
|
|
989
1177
|
"input",
|
|
990
1178
|
{
|
|
991
1179
|
type: "checkbox",
|
|
992
1180
|
id: "datetime-range",
|
|
993
1181
|
checked: a.range ?? !1,
|
|
994
|
-
onChange: (
|
|
1182
|
+
onChange: (p) => i({ ...a, range: p.target.checked }),
|
|
995
1183
|
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
996
1184
|
}
|
|
997
1185
|
),
|
|
998
1186
|
/* @__PURE__ */ e("label", { htmlFor: "datetime-range", className: "mapui:text-sm mapui:text-gray-700", children: "Date Range" })
|
|
999
1187
|
] }),
|
|
1000
|
-
a.type === "select" && /* @__PURE__ */
|
|
1001
|
-
/* @__PURE__ */
|
|
1188
|
+
a.type === "select" && /* @__PURE__ */ r(O, { children: [
|
|
1189
|
+
/* @__PURE__ */ r("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
1002
1190
|
/* @__PURE__ */ e(
|
|
1003
1191
|
"input",
|
|
1004
1192
|
{
|
|
1005
1193
|
type: "checkbox",
|
|
1006
1194
|
id: "select-prefetch",
|
|
1007
1195
|
checked: a.prefetch ?? !1,
|
|
1008
|
-
onChange: (
|
|
1196
|
+
onChange: (p) => i({ ...a, prefetch: p.target.checked }),
|
|
1009
1197
|
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
1010
1198
|
}
|
|
1011
1199
|
),
|
|
1012
1200
|
/* @__PURE__ */ e("label", { htmlFor: "select-prefetch", className: "mapui:text-sm mapui:text-gray-700", children: "Prefetch Options" })
|
|
1013
1201
|
] }),
|
|
1014
|
-
/* @__PURE__ */ e(
|
|
1015
|
-
|
|
1202
|
+
/* @__PURE__ */ e(N, { label: "Static Options (comma-separated)", children: /* @__PURE__ */ e(
|
|
1203
|
+
ue,
|
|
1016
1204
|
{
|
|
1017
1205
|
options: a.options,
|
|
1018
|
-
onChange: (
|
|
1206
|
+
onChange: (p) => i({ ...a, options: p }),
|
|
1019
1207
|
placeholder: "option1, option2",
|
|
1020
|
-
className:
|
|
1208
|
+
className: I
|
|
1021
1209
|
}
|
|
1022
1210
|
) })
|
|
1023
1211
|
] })
|
|
1024
1212
|
] });
|
|
1025
1213
|
}
|
|
1026
|
-
const
|
|
1214
|
+
const $e = () => ({
|
|
1027
1215
|
type: "text",
|
|
1028
1216
|
property: "",
|
|
1029
1217
|
label: "",
|
|
1030
1218
|
autocomplete: !1
|
|
1031
1219
|
});
|
|
1032
|
-
function
|
|
1033
|
-
const [
|
|
1034
|
-
const
|
|
1035
|
-
i(
|
|
1036
|
-
},
|
|
1037
|
-
i(a.map((
|
|
1038
|
-
},
|
|
1039
|
-
i(a.filter((
|
|
1040
|
-
},
|
|
1041
|
-
if (
|
|
1042
|
-
const
|
|
1043
|
-
[
|
|
1044
|
-
},
|
|
1045
|
-
if (
|
|
1046
|
-
const
|
|
1047
|
-
[
|
|
1220
|
+
function qe({ fields: a, onChange: i, availableProperties: t }) {
|
|
1221
|
+
const [l, n] = w(null), u = () => {
|
|
1222
|
+
const d = [...a, $e()];
|
|
1223
|
+
i(d), n(d.length - 1);
|
|
1224
|
+
}, p = (d, y) => {
|
|
1225
|
+
i(a.map((k, c) => c === d ? y : k));
|
|
1226
|
+
}, o = (d) => {
|
|
1227
|
+
i(a.filter((y, k) => k !== d)), n(null);
|
|
1228
|
+
}, g = (d) => {
|
|
1229
|
+
if (d === 0) return;
|
|
1230
|
+
const y = [...a];
|
|
1231
|
+
[y[d - 1], y[d]] = [y[d], y[d - 1]], i(y), n(d - 1);
|
|
1232
|
+
}, x = (d) => {
|
|
1233
|
+
if (d === a.length - 1) return;
|
|
1234
|
+
const y = [...a];
|
|
1235
|
+
[y[d], y[d + 1]] = [y[d + 1], y[d]], i(y), n(d + 1);
|
|
1048
1236
|
};
|
|
1049
|
-
return /* @__PURE__ */
|
|
1237
|
+
return /* @__PURE__ */ r("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
|
|
1050
1238
|
a.length === 0 && /* @__PURE__ */ e("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No search fields configured." }),
|
|
1051
|
-
/* @__PURE__ */ e("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: a.map((
|
|
1052
|
-
/* @__PURE__ */
|
|
1053
|
-
/* @__PURE__ */
|
|
1239
|
+
/* @__PURE__ */ e("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: a.map((d, y) => /* @__PURE__ */ r("li", { className: "mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-white", children: [
|
|
1240
|
+
/* @__PURE__ */ r("div", { className: "mapui:flex mapui:items-center mapui:gap-1 mapui:px-3 mapui:py-2", children: [
|
|
1241
|
+
/* @__PURE__ */ r("div", { className: "mapui:flex mapui:flex-col mapui:gap-0.5", children: [
|
|
1054
1242
|
/* @__PURE__ */ e(
|
|
1055
1243
|
"button",
|
|
1056
1244
|
{
|
|
1057
1245
|
type: "button",
|
|
1058
|
-
onClick: () =>
|
|
1059
|
-
disabled:
|
|
1246
|
+
onClick: () => g(y),
|
|
1247
|
+
disabled: y === 0,
|
|
1060
1248
|
"aria-label": "Move up",
|
|
1061
1249
|
className: "mapui:cursor-pointer mapui:rounded mapui:border-none mapui:bg-transparent mapui:px-1 mapui:text-xs mapui:text-gray-400 hover:mapui:text-gray-600 disabled:mapui:opacity-30",
|
|
1062
1250
|
children: "▲"
|
|
@@ -1066,23 +1254,23 @@ function Se({ fields: a, onChange: i, availableProperties: p }) {
|
|
|
1066
1254
|
"button",
|
|
1067
1255
|
{
|
|
1068
1256
|
type: "button",
|
|
1069
|
-
onClick: () =>
|
|
1070
|
-
disabled:
|
|
1257
|
+
onClick: () => x(y),
|
|
1258
|
+
disabled: y === a.length - 1,
|
|
1071
1259
|
"aria-label": "Move down",
|
|
1072
1260
|
className: "mapui:cursor-pointer mapui:rounded mapui:border-none mapui:bg-transparent mapui:px-1 mapui:text-xs mapui:text-gray-400 hover:mapui:text-gray-600 disabled:mapui:opacity-30",
|
|
1073
1261
|
children: "▼"
|
|
1074
1262
|
}
|
|
1075
1263
|
)
|
|
1076
1264
|
] }),
|
|
1077
|
-
/* @__PURE__ */
|
|
1265
|
+
/* @__PURE__ */ r(
|
|
1078
1266
|
"button",
|
|
1079
1267
|
{
|
|
1080
1268
|
type: "button",
|
|
1081
|
-
onClick: () =>
|
|
1269
|
+
onClick: () => n(l === y ? null : y),
|
|
1082
1270
|
className: "mapui:flex-1 mapui:cursor-pointer mapui:border-none mapui:bg-transparent mapui:text-left mapui:text-sm mapui:font-medium mapui:text-gray-800",
|
|
1083
1271
|
children: [
|
|
1084
|
-
/* @__PURE__ */ e("span", { className: "mapui:mr-1 mapui:rounded mapui:bg-gray-100 mapui:px-1 mapui:py-0.5 mapui:text-xs mapui:font-mono mapui:text-gray-500", children:
|
|
1085
|
-
|
|
1272
|
+
/* @__PURE__ */ e("span", { className: "mapui:mr-1 mapui:rounded mapui:bg-gray-100 mapui:px-1 mapui:py-0.5 mapui:text-xs mapui:font-mono mapui:text-gray-500", children: d.type }),
|
|
1273
|
+
d.label || d.property || "Untitled field"
|
|
1086
1274
|
]
|
|
1087
1275
|
}
|
|
1088
1276
|
),
|
|
@@ -1090,22 +1278,22 @@ function Se({ fields: a, onChange: i, availableProperties: p }) {
|
|
|
1090
1278
|
"button",
|
|
1091
1279
|
{
|
|
1092
1280
|
type: "button",
|
|
1093
|
-
onClick: () =>
|
|
1281
|
+
onClick: () => o(y),
|
|
1094
1282
|
"aria-label": "Remove field",
|
|
1095
1283
|
className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-red-200 mapui:bg-white mapui:px-2 mapui:py-0.5 mapui:text-xs mapui:text-red-600 hover:mapui:bg-red-50",
|
|
1096
1284
|
children: "Remove"
|
|
1097
1285
|
}
|
|
1098
1286
|
)
|
|
1099
1287
|
] }),
|
|
1100
|
-
|
|
1101
|
-
|
|
1288
|
+
l === y && /* @__PURE__ */ e("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ e(
|
|
1289
|
+
Re,
|
|
1102
1290
|
{
|
|
1103
|
-
value:
|
|
1104
|
-
onChange: (
|
|
1105
|
-
availableProperties:
|
|
1291
|
+
value: d,
|
|
1292
|
+
onChange: (k) => p(y, k),
|
|
1293
|
+
availableProperties: t
|
|
1106
1294
|
}
|
|
1107
1295
|
) })
|
|
1108
|
-
] },
|
|
1296
|
+
] }, y)) }),
|
|
1109
1297
|
/* @__PURE__ */ e(
|
|
1110
1298
|
"button",
|
|
1111
1299
|
{
|
|
@@ -1117,76 +1305,76 @@ function Se({ fields: a, onChange: i, availableProperties: p }) {
|
|
|
1117
1305
|
)
|
|
1118
1306
|
] });
|
|
1119
1307
|
}
|
|
1120
|
-
function
|
|
1121
|
-
return Object.entries(a).map(([i,
|
|
1308
|
+
function Ue(a) {
|
|
1309
|
+
return Object.entries(a).map(([i, t]) => ({
|
|
1122
1310
|
key: i,
|
|
1123
|
-
label:
|
|
1124
|
-
visible:
|
|
1311
|
+
label: t.label ?? "",
|
|
1312
|
+
visible: t.visible ?? !0
|
|
1125
1313
|
}));
|
|
1126
1314
|
}
|
|
1127
|
-
function
|
|
1315
|
+
function Ve(a) {
|
|
1128
1316
|
const i = {};
|
|
1129
|
-
for (const
|
|
1130
|
-
i[
|
|
1131
|
-
visible:
|
|
1132
|
-
...
|
|
1317
|
+
for (const t of a)
|
|
1318
|
+
i[t.key] = {
|
|
1319
|
+
visible: t.visible,
|
|
1320
|
+
...t.label ? { label: t.label } : {}
|
|
1133
1321
|
};
|
|
1134
1322
|
return i;
|
|
1135
1323
|
}
|
|
1136
|
-
const
|
|
1137
|
-
function
|
|
1138
|
-
const
|
|
1139
|
-
u([...
|
|
1140
|
-
},
|
|
1141
|
-
u(
|
|
1142
|
-
},
|
|
1143
|
-
u(
|
|
1144
|
-
},
|
|
1145
|
-
const
|
|
1146
|
-
u(
|
|
1147
|
-
},
|
|
1148
|
-
if (
|
|
1149
|
-
const
|
|
1150
|
-
[
|
|
1151
|
-
},
|
|
1152
|
-
if (
|
|
1153
|
-
const
|
|
1154
|
-
[
|
|
1155
|
-
},
|
|
1156
|
-
if (!
|
|
1157
|
-
const
|
|
1158
|
-
key:
|
|
1159
|
-
label:
|
|
1324
|
+
const z = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
|
|
1325
|
+
function Ge({ value: a, onChange: i, availableProperties: t }) {
|
|
1326
|
+
const l = Ue(a), n = t && t.length > 0, u = (c) => i(Ve(c)), p = () => {
|
|
1327
|
+
u([...l, { key: "", label: "", visible: !0 }]);
|
|
1328
|
+
}, o = (c) => {
|
|
1329
|
+
u(l.filter((b, m) => m !== c));
|
|
1330
|
+
}, g = (c, b) => {
|
|
1331
|
+
u(l.map((m, C) => C === c ? { ...m, ...b } : m));
|
|
1332
|
+
}, x = (c, b) => {
|
|
1333
|
+
const m = t == null ? void 0 : t.find((s) => s.name === b), C = (m == null ? void 0 : m.title) ?? l[c].label;
|
|
1334
|
+
u(l.map((s, S) => S === c ? { ...s, key: b, label: C } : s));
|
|
1335
|
+
}, d = (c) => {
|
|
1336
|
+
if (c === 0) return;
|
|
1337
|
+
const b = [...l];
|
|
1338
|
+
[b[c - 1], b[c]] = [b[c], b[c - 1]], u(b);
|
|
1339
|
+
}, y = (c) => {
|
|
1340
|
+
if (c === l.length - 1) return;
|
|
1341
|
+
const b = [...l];
|
|
1342
|
+
[b[c], b[c + 1]] = [b[c + 1], b[c]], u(b);
|
|
1343
|
+
}, k = () => {
|
|
1344
|
+
if (!t) return;
|
|
1345
|
+
const c = t.map((b) => ({
|
|
1346
|
+
key: b.name,
|
|
1347
|
+
label: b.title ?? "",
|
|
1160
1348
|
visible: !0
|
|
1161
1349
|
}));
|
|
1162
|
-
u(
|
|
1350
|
+
u(c);
|
|
1163
1351
|
};
|
|
1164
|
-
return /* @__PURE__ */
|
|
1165
|
-
|
|
1352
|
+
return /* @__PURE__ */ r("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
|
|
1353
|
+
l.length === 0 ? /* @__PURE__ */ r(O, { children: [
|
|
1166
1354
|
/* @__PURE__ */ e("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No property display rules configured. All properties will be shown." }),
|
|
1167
|
-
|
|
1355
|
+
n && /* @__PURE__ */ e(
|
|
1168
1356
|
"button",
|
|
1169
1357
|
{
|
|
1170
1358
|
type: "button",
|
|
1171
|
-
onClick:
|
|
1359
|
+
onClick: k,
|
|
1172
1360
|
className: "mapui:cursor-pointer mapui:self-start mapui:rounded mapui:border mapui:border-blue-300 mapui:bg-blue-50 mapui:px-3 mapui:py-1.5 mapui:text-sm mapui:text-blue-700 hover:mapui:bg-blue-100",
|
|
1173
1361
|
children: "Populate from API metadata"
|
|
1174
1362
|
}
|
|
1175
1363
|
)
|
|
1176
|
-
] }) : /* @__PURE__ */
|
|
1177
|
-
/* @__PURE__ */
|
|
1178
|
-
/* @__PURE__ */ e(
|
|
1179
|
-
/* @__PURE__ */ e(
|
|
1364
|
+
] }) : /* @__PURE__ */ r(O, { children: [
|
|
1365
|
+
/* @__PURE__ */ r("div", { className: "mapui:grid mapui:items-center mapui:gap-2 mapui:px-8", style: { gridTemplateColumns: "1fr 1fr auto" }, children: [
|
|
1366
|
+
/* @__PURE__ */ e(N, { label: "Property Key", children: /* @__PURE__ */ e("span", {}) }),
|
|
1367
|
+
/* @__PURE__ */ e(N, { label: "Display Label", children: /* @__PURE__ */ e("span", {}) }),
|
|
1180
1368
|
/* @__PURE__ */ e("span", { className: "mapui:text-xs mapui:font-medium mapui:text-gray-600", children: "Visible" })
|
|
1181
1369
|
] }),
|
|
1182
|
-
/* @__PURE__ */ e("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-1.5 mapui:p-0", children:
|
|
1183
|
-
/* @__PURE__ */
|
|
1370
|
+
/* @__PURE__ */ e("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-1.5 mapui:p-0", children: l.map((c, b) => /* @__PURE__ */ r("li", { className: "mapui:flex mapui:items-center mapui:gap-1 mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-white mapui:px-2 mapui:py-1.5", children: [
|
|
1371
|
+
/* @__PURE__ */ r("div", { className: "mapui:flex mapui:flex-col mapui:gap-0.5", children: [
|
|
1184
1372
|
/* @__PURE__ */ e(
|
|
1185
1373
|
"button",
|
|
1186
1374
|
{
|
|
1187
1375
|
type: "button",
|
|
1188
|
-
onClick: () =>
|
|
1189
|
-
disabled:
|
|
1376
|
+
onClick: () => d(b),
|
|
1377
|
+
disabled: b === 0,
|
|
1190
1378
|
"aria-label": "Move up",
|
|
1191
1379
|
className: "mapui:cursor-pointer mapui:rounded mapui:border-none mapui:bg-transparent mapui:px-1 mapui:text-xs mapui:text-gray-400 hover:mapui:text-gray-600 disabled:mapui:opacity-30",
|
|
1192
1380
|
children: "▲"
|
|
@@ -1196,55 +1384,55 @@ function De({ value: a, onChange: i, availableProperties: p }) {
|
|
|
1196
1384
|
"button",
|
|
1197
1385
|
{
|
|
1198
1386
|
type: "button",
|
|
1199
|
-
onClick: () => b
|
|
1200
|
-
disabled:
|
|
1387
|
+
onClick: () => y(b),
|
|
1388
|
+
disabled: b === l.length - 1,
|
|
1201
1389
|
"aria-label": "Move down",
|
|
1202
1390
|
className: "mapui:cursor-pointer mapui:rounded mapui:border-none mapui:bg-transparent mapui:px-1 mapui:text-xs mapui:text-gray-400 hover:mapui:text-gray-600 disabled:mapui:opacity-30",
|
|
1203
1391
|
children: "▼"
|
|
1204
1392
|
}
|
|
1205
1393
|
)
|
|
1206
1394
|
] }),
|
|
1207
|
-
/* @__PURE__ */
|
|
1208
|
-
|
|
1395
|
+
/* @__PURE__ */ r("div", { className: "mapui:grid mapui:flex-1 mapui:items-center mapui:gap-2", style: { gridTemplateColumns: "1fr 1fr auto auto" }, children: [
|
|
1396
|
+
n ? /* @__PURE__ */ r(
|
|
1209
1397
|
"select",
|
|
1210
1398
|
{
|
|
1211
|
-
value:
|
|
1212
|
-
onChange: (
|
|
1399
|
+
value: c.key,
|
|
1400
|
+
onChange: (m) => x(b, m.target.value),
|
|
1213
1401
|
"aria-label": "Property key",
|
|
1214
|
-
className:
|
|
1402
|
+
className: z,
|
|
1215
1403
|
children: [
|
|
1216
1404
|
/* @__PURE__ */ e("option", { value: "", children: "Select a property…" }),
|
|
1217
|
-
|
|
1405
|
+
t.map((m) => /* @__PURE__ */ e("option", { value: m.name, children: m.title ?? m.name }, m.name))
|
|
1218
1406
|
]
|
|
1219
1407
|
}
|
|
1220
1408
|
) : /* @__PURE__ */ e(
|
|
1221
1409
|
"input",
|
|
1222
1410
|
{
|
|
1223
1411
|
type: "text",
|
|
1224
|
-
value:
|
|
1225
|
-
onChange: (
|
|
1412
|
+
value: c.key,
|
|
1413
|
+
onChange: (m) => g(b, { key: m.target.value }),
|
|
1226
1414
|
placeholder: "property_name",
|
|
1227
1415
|
"aria-label": "Property key",
|
|
1228
|
-
className:
|
|
1416
|
+
className: z
|
|
1229
1417
|
}
|
|
1230
1418
|
),
|
|
1231
1419
|
/* @__PURE__ */ e(
|
|
1232
1420
|
"input",
|
|
1233
1421
|
{
|
|
1234
1422
|
type: "text",
|
|
1235
|
-
value:
|
|
1236
|
-
onChange: (
|
|
1423
|
+
value: c.label,
|
|
1424
|
+
onChange: (m) => g(b, { label: m.target.value }),
|
|
1237
1425
|
placeholder: "Friendly name",
|
|
1238
1426
|
"aria-label": "Display label",
|
|
1239
|
-
className:
|
|
1427
|
+
className: z
|
|
1240
1428
|
}
|
|
1241
1429
|
),
|
|
1242
1430
|
/* @__PURE__ */ e(
|
|
1243
1431
|
"input",
|
|
1244
1432
|
{
|
|
1245
1433
|
type: "checkbox",
|
|
1246
|
-
checked:
|
|
1247
|
-
onChange: (
|
|
1434
|
+
checked: c.visible,
|
|
1435
|
+
onChange: (m) => g(b, { visible: m.target.checked }),
|
|
1248
1436
|
"aria-label": "Visible",
|
|
1249
1437
|
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
1250
1438
|
}
|
|
@@ -1253,182 +1441,161 @@ function De({ value: a, onChange: i, availableProperties: p }) {
|
|
|
1253
1441
|
"button",
|
|
1254
1442
|
{
|
|
1255
1443
|
type: "button",
|
|
1256
|
-
onClick: () =>
|
|
1444
|
+
onClick: () => o(b),
|
|
1257
1445
|
"aria-label": "Remove property",
|
|
1258
1446
|
className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-red-200 mapui:bg-white mapui:px-2 mapui:py-0.5 mapui:text-xs mapui:text-red-600 hover:mapui:bg-red-50",
|
|
1259
1447
|
children: "Remove"
|
|
1260
1448
|
}
|
|
1261
1449
|
)
|
|
1262
1450
|
] })
|
|
1263
|
-
] },
|
|
1451
|
+
] }, b)) })
|
|
1264
1452
|
] }),
|
|
1265
1453
|
/* @__PURE__ */ e(
|
|
1266
1454
|
"button",
|
|
1267
1455
|
{
|
|
1268
1456
|
type: "button",
|
|
1269
|
-
onClick:
|
|
1457
|
+
onClick: p,
|
|
1270
1458
|
className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-dashed mapui:border-gray-300 mapui:px-3 mapui:py-2 mapui:text-sm mapui:text-gray-600 hover:mapui:border-blue-400 hover:mapui:text-blue-600",
|
|
1271
1459
|
children: "+ Add Property"
|
|
1272
1460
|
}
|
|
1273
1461
|
)
|
|
1274
1462
|
] });
|
|
1275
1463
|
}
|
|
1276
|
-
const
|
|
1277
|
-
function
|
|
1278
|
-
return !!a.$ref &&
|
|
1464
|
+
const he = /geojson\.org\/schema\/(\w+)\.json/;
|
|
1465
|
+
function ze(a) {
|
|
1466
|
+
return !!a.$ref && he.test(a.$ref);
|
|
1279
1467
|
}
|
|
1280
|
-
function
|
|
1281
|
-
const i =
|
|
1468
|
+
function We(a) {
|
|
1469
|
+
const i = he.exec(a);
|
|
1282
1470
|
return i ? i[1] : null;
|
|
1283
1471
|
}
|
|
1284
|
-
function
|
|
1472
|
+
function X(a) {
|
|
1285
1473
|
const i = a.toLowerCase();
|
|
1286
1474
|
return i.includes("polygon") ? "fill" : i.includes("linestring") ? "line" : i.includes("point") ? "circle" : null;
|
|
1287
1475
|
}
|
|
1288
|
-
function
|
|
1476
|
+
function ye(a) {
|
|
1289
1477
|
for (const i of Object.values(a.properties))
|
|
1290
1478
|
if (i.$ref) {
|
|
1291
|
-
const
|
|
1292
|
-
if (
|
|
1479
|
+
const t = We(i.$ref);
|
|
1480
|
+
if (t) return X(t);
|
|
1293
1481
|
}
|
|
1294
1482
|
return null;
|
|
1295
1483
|
}
|
|
1296
|
-
function
|
|
1297
|
-
return Object.entries(a.properties).filter(([, i]) => !
|
|
1484
|
+
function Ye(a) {
|
|
1485
|
+
return Object.entries(a.properties).filter(([, i]) => !ze(i)).map(([i, t]) => ({
|
|
1298
1486
|
name: i,
|
|
1299
|
-
title:
|
|
1300
|
-
type:
|
|
1301
|
-
format:
|
|
1302
|
-
enum:
|
|
1303
|
-
minimum:
|
|
1304
|
-
maximum:
|
|
1487
|
+
title: t.title,
|
|
1488
|
+
type: t.type,
|
|
1489
|
+
format: t.format,
|
|
1490
|
+
enum: t.enum,
|
|
1491
|
+
minimum: t.minimum,
|
|
1492
|
+
maximum: t.maximum
|
|
1305
1493
|
}));
|
|
1306
1494
|
}
|
|
1307
|
-
async function
|
|
1308
|
-
var
|
|
1495
|
+
async function ia(a, i) {
|
|
1496
|
+
var t, l;
|
|
1309
1497
|
try {
|
|
1310
|
-
const
|
|
1498
|
+
const n = await Ne(a, i), u = ye(n);
|
|
1311
1499
|
if (u) return u;
|
|
1312
1500
|
} catch {
|
|
1313
1501
|
}
|
|
1314
1502
|
try {
|
|
1315
|
-
const u = (
|
|
1316
|
-
if (typeof u == "string") return
|
|
1503
|
+
const u = (l = (t = (await ce(a, i, { limit: 1 })).features[0]) == null ? void 0 : t.geometry) == null ? void 0 : l.type;
|
|
1504
|
+
if (typeof u == "string") return X(u);
|
|
1317
1505
|
} catch {
|
|
1318
1506
|
}
|
|
1319
1507
|
return null;
|
|
1320
1508
|
}
|
|
1321
|
-
function
|
|
1509
|
+
function ta(a) {
|
|
1322
1510
|
return a.replace(/_/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (i) => i.toUpperCase());
|
|
1323
1511
|
}
|
|
1324
|
-
const
|
|
1325
|
-
function
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
const
|
|
1330
|
-
return /* @__PURE__ */ t("div", { className: "mapui:rounded mapui:border mapui:border-gray-200", children: [
|
|
1331
|
-
/* @__PURE__ */ t(
|
|
1332
|
-
"button",
|
|
1333
|
-
{
|
|
1334
|
-
type: "button",
|
|
1335
|
-
onClick: () => r((m) => !m),
|
|
1336
|
-
className: "mapui:flex mapui:w-full mapui:cursor-pointer mapui:items-center mapui:justify-between mapui:rounded mapui:border-none mapui:bg-gray-50 mapui:px-3 mapui:py-2 mapui:text-sm mapui:font-medium mapui:text-gray-700 hover:mapui:bg-gray-100",
|
|
1337
|
-
children: [
|
|
1338
|
-
/* @__PURE__ */ e("span", { children: a }),
|
|
1339
|
-
/* @__PURE__ */ e("span", { "aria-hidden": "true", children: p ? "▲" : "▼" })
|
|
1340
|
-
]
|
|
1341
|
-
}
|
|
1342
|
-
),
|
|
1343
|
-
p && /* @__PURE__ */ e("div", { className: "mapui:p-3", children: i })
|
|
1344
|
-
] });
|
|
1345
|
-
}
|
|
1346
|
-
function re({ value: a, onChange: i, availableSources: p }) {
|
|
1347
|
-
var D;
|
|
1348
|
-
const r = (c) => i({ ...a, ...c }), m = ee(a);
|
|
1349
|
-
m.current = a;
|
|
1350
|
-
const u = ee(i);
|
|
1512
|
+
const $ = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
|
|
1513
|
+
function ne({ value: a, onChange: i, availableSources: t }) {
|
|
1514
|
+
var C;
|
|
1515
|
+
const l = (s) => i({ ...a, ...s }), n = Z(a);
|
|
1516
|
+
n.current = a;
|
|
1517
|
+
const u = Z(i);
|
|
1351
1518
|
u.current = i;
|
|
1352
|
-
const
|
|
1519
|
+
const p = t.find((s) => s.id === a.sourceId), o = (p == null ? void 0 : p.url) ?? null, g = a.collection || null, { collections: x, loading: d } = me(o), { queryables: y, loading: k } = ve(o, g), c = y ? Ye(y) : [], [b, m] = w(
|
|
1353
1520
|
null
|
|
1354
1521
|
);
|
|
1355
1522
|
return J(() => {
|
|
1356
|
-
if (!
|
|
1357
|
-
|
|
1523
|
+
if (!y) {
|
|
1524
|
+
m(null);
|
|
1358
1525
|
return;
|
|
1359
1526
|
}
|
|
1360
|
-
const
|
|
1361
|
-
if (
|
|
1362
|
-
const
|
|
1363
|
-
u.current({ ...
|
|
1527
|
+
const s = (f) => {
|
|
1528
|
+
if (m(f), f && !n.current.style) {
|
|
1529
|
+
const T = f === "fill" ? _ : f === "line" ? de : f === "symbol" ? be : ge;
|
|
1530
|
+
u.current({ ...n.current, style: T });
|
|
1364
1531
|
}
|
|
1365
|
-
},
|
|
1366
|
-
if (
|
|
1367
|
-
|
|
1532
|
+
}, S = ye(y);
|
|
1533
|
+
if (S) {
|
|
1534
|
+
s(S);
|
|
1368
1535
|
return;
|
|
1369
1536
|
}
|
|
1370
|
-
if (!
|
|
1371
|
-
|
|
1537
|
+
if (!o || !g) {
|
|
1538
|
+
m(null);
|
|
1372
1539
|
return;
|
|
1373
1540
|
}
|
|
1374
|
-
let
|
|
1375
|
-
return
|
|
1376
|
-
var L,
|
|
1377
|
-
if (
|
|
1378
|
-
const
|
|
1379
|
-
|
|
1541
|
+
let A = !1;
|
|
1542
|
+
return ce(o, g, { limit: 1 }).then((f) => {
|
|
1543
|
+
var L, D;
|
|
1544
|
+
if (A) return;
|
|
1545
|
+
const T = (D = (L = f.features[0]) == null ? void 0 : L.geometry) == null ? void 0 : D.type;
|
|
1546
|
+
s(typeof T == "string" ? X(T) : null);
|
|
1380
1547
|
}).catch(() => {
|
|
1381
|
-
|
|
1548
|
+
A || m(null);
|
|
1382
1549
|
}), () => {
|
|
1383
|
-
|
|
1550
|
+
A = !0;
|
|
1384
1551
|
};
|
|
1385
|
-
}, [
|
|
1386
|
-
|
|
1387
|
-
}, [
|
|
1388
|
-
/* @__PURE__ */
|
|
1389
|
-
/* @__PURE__ */ e(
|
|
1552
|
+
}, [y, o, g]), J(() => {
|
|
1553
|
+
m(null);
|
|
1554
|
+
}, [o, g]), /* @__PURE__ */ r("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
1555
|
+
/* @__PURE__ */ r("div", { className: "mapui:grid mapui:grid-cols-2 mapui:gap-3", children: [
|
|
1556
|
+
/* @__PURE__ */ e(N, { label: "Layer ID", required: !0, children: /* @__PURE__ */ e(
|
|
1390
1557
|
"input",
|
|
1391
1558
|
{
|
|
1392
1559
|
type: "text",
|
|
1393
1560
|
value: a.id,
|
|
1394
|
-
onChange: (
|
|
1561
|
+
onChange: (s) => l({ id: s.target.value }),
|
|
1395
1562
|
placeholder: "my-layer",
|
|
1396
|
-
className:
|
|
1563
|
+
className: $
|
|
1397
1564
|
}
|
|
1398
1565
|
) }),
|
|
1399
|
-
/* @__PURE__ */ e(
|
|
1566
|
+
/* @__PURE__ */ e(N, { label: "Label", children: /* @__PURE__ */ e(
|
|
1400
1567
|
"input",
|
|
1401
1568
|
{
|
|
1402
1569
|
type: "text",
|
|
1403
1570
|
value: a.label,
|
|
1404
|
-
onChange: (
|
|
1571
|
+
onChange: (s) => l({ label: s.target.value }),
|
|
1405
1572
|
placeholder: "My Layer",
|
|
1406
|
-
className:
|
|
1573
|
+
className: $
|
|
1407
1574
|
}
|
|
1408
1575
|
) })
|
|
1409
1576
|
] }),
|
|
1410
|
-
/* @__PURE__ */ e(
|
|
1577
|
+
/* @__PURE__ */ e(N, { label: "Source", required: !0, children: /* @__PURE__ */ r(
|
|
1411
1578
|
"select",
|
|
1412
1579
|
{
|
|
1413
1580
|
value: a.sourceId,
|
|
1414
|
-
onChange: (
|
|
1415
|
-
className:
|
|
1581
|
+
onChange: (s) => l({ sourceId: s.target.value }),
|
|
1582
|
+
className: $,
|
|
1416
1583
|
children: [
|
|
1417
1584
|
/* @__PURE__ */ e("option", { value: "", children: "Select a source…" }),
|
|
1418
|
-
|
|
1585
|
+
t.map((s) => /* @__PURE__ */ e("option", { value: s.id, children: s.label ?? s.id }, s.id))
|
|
1419
1586
|
]
|
|
1420
1587
|
}
|
|
1421
1588
|
) }),
|
|
1422
|
-
/* @__PURE__ */
|
|
1423
|
-
|
|
1589
|
+
/* @__PURE__ */ r(N, { label: "Collection", required: !0, children: [
|
|
1590
|
+
x.length > 0 ? /* @__PURE__ */ r(
|
|
1424
1591
|
"select",
|
|
1425
1592
|
{
|
|
1426
1593
|
value: a.collection,
|
|
1427
|
-
onChange: (
|
|
1428
|
-
className:
|
|
1594
|
+
onChange: (s) => l({ collection: s.target.value }),
|
|
1595
|
+
className: $,
|
|
1429
1596
|
children: [
|
|
1430
1597
|
/* @__PURE__ */ e("option", { value: "", children: "Select a collection…" }),
|
|
1431
|
-
|
|
1598
|
+
x.map((s) => /* @__PURE__ */ e("option", { value: s.id, children: s.title ?? s.id }, s.id))
|
|
1432
1599
|
]
|
|
1433
1600
|
}
|
|
1434
1601
|
) : /* @__PURE__ */ e(
|
|
@@ -1436,74 +1603,74 @@ function re({ value: a, onChange: i, availableSources: p }) {
|
|
|
1436
1603
|
{
|
|
1437
1604
|
type: "text",
|
|
1438
1605
|
value: a.collection,
|
|
1439
|
-
onChange: (
|
|
1440
|
-
placeholder:
|
|
1441
|
-
className:
|
|
1606
|
+
onChange: (s) => l({ collection: s.target.value }),
|
|
1607
|
+
placeholder: d ? "Loading collections…" : "collection-id",
|
|
1608
|
+
className: $
|
|
1442
1609
|
}
|
|
1443
1610
|
),
|
|
1444
|
-
|
|
1611
|
+
k && /* @__PURE__ */ e("span", { className: "mapui:mt-0.5 mapui:block mapui:text-xs mapui:text-gray-400", children: "Loading properties…" })
|
|
1445
1612
|
] }),
|
|
1446
|
-
/* @__PURE__ */ e(
|
|
1613
|
+
/* @__PURE__ */ e(N, { label: "Data Mode", children: /* @__PURE__ */ e("div", { className: "mapui:flex mapui:gap-4", children: ["vector-tiles", "geojson"].map((s) => /* @__PURE__ */ r("label", { className: "mapui:flex mapui:cursor-pointer mapui:items-center mapui:gap-1.5", children: [
|
|
1447
1614
|
/* @__PURE__ */ e(
|
|
1448
1615
|
"input",
|
|
1449
1616
|
{
|
|
1450
1617
|
type: "radio",
|
|
1451
1618
|
name: `data-mode-${a.id}`,
|
|
1452
|
-
value:
|
|
1453
|
-
checked: a.dataMode ===
|
|
1454
|
-
onChange: () =>
|
|
1619
|
+
value: s,
|
|
1620
|
+
checked: a.dataMode === s,
|
|
1621
|
+
onChange: () => l({ dataMode: s }),
|
|
1455
1622
|
className: "mapui:accent-blue-600"
|
|
1456
1623
|
}
|
|
1457
1624
|
),
|
|
1458
|
-
/* @__PURE__ */ e("span", { className: "mapui:text-sm mapui:text-gray-700", children:
|
|
1459
|
-
] },
|
|
1460
|
-
/* @__PURE__ */
|
|
1625
|
+
/* @__PURE__ */ e("span", { className: "mapui:text-sm mapui:text-gray-700", children: s })
|
|
1626
|
+
] }, s)) }) }),
|
|
1627
|
+
/* @__PURE__ */ r("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
1461
1628
|
/* @__PURE__ */ e(
|
|
1462
1629
|
"input",
|
|
1463
1630
|
{
|
|
1464
1631
|
type: "checkbox",
|
|
1465
1632
|
id: "layer-visible",
|
|
1466
1633
|
checked: a.visible,
|
|
1467
|
-
onChange: (
|
|
1634
|
+
onChange: (s) => l({ visible: s.target.checked }),
|
|
1468
1635
|
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
1469
1636
|
}
|
|
1470
1637
|
),
|
|
1471
1638
|
/* @__PURE__ */ e("label", { htmlFor: "layer-visible", className: "mapui:text-sm mapui:text-gray-700", children: "Visible by default" })
|
|
1472
1639
|
] }),
|
|
1473
|
-
/* @__PURE__ */ e(
|
|
1474
|
-
|
|
1640
|
+
/* @__PURE__ */ e(q, { title: "Style", children: /* @__PURE__ */ e(
|
|
1641
|
+
Oe,
|
|
1475
1642
|
{
|
|
1476
|
-
value: a.style ??
|
|
1477
|
-
onChange: (
|
|
1478
|
-
suggestedType:
|
|
1643
|
+
value: a.style ?? _,
|
|
1644
|
+
onChange: (s) => l({ style: s }),
|
|
1645
|
+
suggestedType: b
|
|
1479
1646
|
}
|
|
1480
1647
|
) }),
|
|
1481
|
-
/* @__PURE__ */ e(
|
|
1482
|
-
|
|
1648
|
+
/* @__PURE__ */ e(q, { title: "Legend", children: /* @__PURE__ */ e(
|
|
1649
|
+
je,
|
|
1483
1650
|
{
|
|
1484
1651
|
value: a.legend,
|
|
1485
|
-
onChange: (
|
|
1652
|
+
onChange: (s) => l({ legend: s })
|
|
1486
1653
|
}
|
|
1487
1654
|
) }),
|
|
1488
|
-
/* @__PURE__ */ e(
|
|
1489
|
-
|
|
1655
|
+
/* @__PURE__ */ e(q, { title: "Search Fields", children: /* @__PURE__ */ e(
|
|
1656
|
+
qe,
|
|
1490
1657
|
{
|
|
1491
|
-
fields: ((
|
|
1492
|
-
onChange: (
|
|
1493
|
-
availableProperties:
|
|
1658
|
+
fields: ((C = a.search) == null ? void 0 : C.fields) ?? [],
|
|
1659
|
+
onChange: (s) => l({ search: s.length > 0 ? { fields: s } : void 0 }),
|
|
1660
|
+
availableProperties: c
|
|
1494
1661
|
}
|
|
1495
1662
|
) }),
|
|
1496
|
-
/* @__PURE__ */ e(
|
|
1497
|
-
|
|
1663
|
+
/* @__PURE__ */ e(q, { title: "Property Display", children: /* @__PURE__ */ e(
|
|
1664
|
+
Ge,
|
|
1498
1665
|
{
|
|
1499
1666
|
value: a.propertyDisplay ?? {},
|
|
1500
|
-
onChange: (
|
|
1501
|
-
availableProperties:
|
|
1667
|
+
onChange: (s) => l({ propertyDisplay: Object.keys(s).length > 0 ? s : void 0 }),
|
|
1668
|
+
availableProperties: c
|
|
1502
1669
|
}
|
|
1503
1670
|
) })
|
|
1504
1671
|
] });
|
|
1505
1672
|
}
|
|
1506
|
-
const
|
|
1673
|
+
const W = () => ({
|
|
1507
1674
|
id: "",
|
|
1508
1675
|
sourceId: "",
|
|
1509
1676
|
collection: "",
|
|
@@ -1511,47 +1678,47 @@ const z = () => ({
|
|
|
1511
1678
|
visible: !0,
|
|
1512
1679
|
dataMode: "vector-tiles"
|
|
1513
1680
|
});
|
|
1514
|
-
function
|
|
1515
|
-
const [
|
|
1516
|
-
i([...a,
|
|
1517
|
-
},
|
|
1518
|
-
i(a.map((
|
|
1519
|
-
},
|
|
1520
|
-
i(a.filter((
|
|
1521
|
-
},
|
|
1522
|
-
if (
|
|
1523
|
-
const
|
|
1524
|
-
[
|
|
1525
|
-
},
|
|
1526
|
-
if (
|
|
1527
|
-
const
|
|
1528
|
-
[
|
|
1529
|
-
}, f = (
|
|
1530
|
-
|
|
1531
|
-
},
|
|
1532
|
-
|
|
1681
|
+
function la({ layers: a, onChange: i, availableSources: t }) {
|
|
1682
|
+
const [l, n] = w(null), [u, p] = w(!1), [o, g] = w(W()), [x, d] = w(null), [y, k] = w(null), [c, b] = w(null), m = () => {
|
|
1683
|
+
i([...a, o]), p(!1), g(W());
|
|
1684
|
+
}, C = (h) => {
|
|
1685
|
+
i(a.map((v) => v.id === l ? h : v));
|
|
1686
|
+
}, s = (h) => {
|
|
1687
|
+
i(a.filter((v) => v.id !== h)), d(null), l === h && n(null);
|
|
1688
|
+
}, S = (h) => {
|
|
1689
|
+
if (h === 0) return;
|
|
1690
|
+
const v = [...a];
|
|
1691
|
+
[v[h - 1], v[h]] = [v[h], v[h - 1]], i(v);
|
|
1692
|
+
}, A = (h) => {
|
|
1693
|
+
if (h === a.length - 1) return;
|
|
1694
|
+
const v = [...a];
|
|
1695
|
+
[v[h], v[h + 1]] = [v[h + 1], v[h]], i(v);
|
|
1696
|
+
}, f = (h, v) => {
|
|
1697
|
+
k(v), h.dataTransfer.effectAllowed = "move", h.dataTransfer.setData("text/plain", v);
|
|
1698
|
+
}, T = (h, v) => {
|
|
1699
|
+
h.preventDefault(), h.dataTransfer.dropEffect = "move", b(v);
|
|
1533
1700
|
}, L = () => {
|
|
1534
|
-
|
|
1535
|
-
},
|
|
1536
|
-
|
|
1537
|
-
const
|
|
1538
|
-
if (
|
|
1539
|
-
const
|
|
1540
|
-
if (
|
|
1541
|
-
const
|
|
1542
|
-
|
|
1543
|
-
},
|
|
1544
|
-
|
|
1701
|
+
b(null);
|
|
1702
|
+
}, D = (h, v) => {
|
|
1703
|
+
h.preventDefault(), b(null);
|
|
1704
|
+
const M = y;
|
|
1705
|
+
if (k(null), !M || M === v) return;
|
|
1706
|
+
const j = a.findIndex((F) => F.id === M), B = a.findIndex((F) => F.id === v);
|
|
1707
|
+
if (j === -1 || B === -1) return;
|
|
1708
|
+
const E = [...a];
|
|
1709
|
+
E.splice(j, 1), E.splice(B, 0, a[j]), i(E);
|
|
1710
|
+
}, xe = () => {
|
|
1711
|
+
k(null), b(null);
|
|
1545
1712
|
};
|
|
1546
|
-
return /* @__PURE__ */
|
|
1547
|
-
/* @__PURE__ */
|
|
1713
|
+
return /* @__PURE__ */ r("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
1714
|
+
/* @__PURE__ */ r("div", { className: "mapui:flex mapui:items-center mapui:justify-between", children: [
|
|
1548
1715
|
/* @__PURE__ */ e("h3", { className: "mapui:m-0 mapui:text-sm mapui:font-semibold mapui:text-gray-700", children: "Layers" }),
|
|
1549
1716
|
/* @__PURE__ */ e(
|
|
1550
1717
|
"button",
|
|
1551
1718
|
{
|
|
1552
1719
|
type: "button",
|
|
1553
1720
|
onClick: () => {
|
|
1554
|
-
|
|
1721
|
+
p(!0), g(W());
|
|
1555
1722
|
},
|
|
1556
1723
|
className: "mapui:cursor-pointer mapui:rounded mapui:bg-blue-600 mapui:px-3 mapui:py-1 mapui:text-xs mapui:font-medium mapui:text-white hover:mapui:bg-blue-700",
|
|
1557
1724
|
children: "+ Add Layer"
|
|
@@ -1559,33 +1726,33 @@ function Ge({ layers: a, onChange: i, availableSources: p }) {
|
|
|
1559
1726
|
)
|
|
1560
1727
|
] }),
|
|
1561
1728
|
a.length === 0 && !u && /* @__PURE__ */ e("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No layers configured." }),
|
|
1562
|
-
/* @__PURE__ */ e("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: a.map((
|
|
1563
|
-
var
|
|
1564
|
-
const
|
|
1565
|
-
return /* @__PURE__ */
|
|
1729
|
+
/* @__PURE__ */ e("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: a.map((h, v) => {
|
|
1730
|
+
var E, F, K, Q;
|
|
1731
|
+
const M = y === h.id, j = c === h.id, B = l === h.id;
|
|
1732
|
+
return /* @__PURE__ */ r(
|
|
1566
1733
|
"li",
|
|
1567
1734
|
{
|
|
1568
|
-
draggable:
|
|
1569
|
-
onDragStart:
|
|
1570
|
-
onDragOver: (
|
|
1735
|
+
draggable: !B,
|
|
1736
|
+
onDragStart: B ? void 0 : (R) => f(R, h.id),
|
|
1737
|
+
onDragOver: (R) => T(R, h.id),
|
|
1571
1738
|
onDragLeave: L,
|
|
1572
|
-
onDrop: (
|
|
1573
|
-
onDragEnd:
|
|
1739
|
+
onDrop: (R) => D(R, h.id),
|
|
1740
|
+
onDragEnd: xe,
|
|
1574
1741
|
className: [
|
|
1575
1742
|
"mapui:rounded-lg mapui:border mapui:bg-white mapui:transition-colors",
|
|
1576
|
-
|
|
1577
|
-
|
|
1743
|
+
j ? "mapui:border-blue-400 mapui:bg-blue-50" : "mapui:border-gray-200",
|
|
1744
|
+
M ? "mapui:opacity-50" : "mapui:opacity-100"
|
|
1578
1745
|
].join(" "),
|
|
1579
1746
|
children: [
|
|
1580
|
-
/* @__PURE__ */
|
|
1581
|
-
/* @__PURE__ */
|
|
1582
|
-
/* @__PURE__ */
|
|
1747
|
+
/* @__PURE__ */ r("div", { className: "mapui:flex mapui:items-center mapui:justify-between mapui:gap-2 mapui:px-3 mapui:py-2", children: [
|
|
1748
|
+
/* @__PURE__ */ r("div", { className: "mapui:flex mapui:min-w-0 mapui:items-center mapui:gap-2", children: [
|
|
1749
|
+
/* @__PURE__ */ r("div", { className: "mapui:flex mapui:shrink-0 mapui:flex-col mapui:gap-0.5", children: [
|
|
1583
1750
|
/* @__PURE__ */ e(
|
|
1584
1751
|
"button",
|
|
1585
1752
|
{
|
|
1586
1753
|
type: "button",
|
|
1587
|
-
onClick: () =>
|
|
1588
|
-
disabled:
|
|
1754
|
+
onClick: () => S(v),
|
|
1755
|
+
disabled: v === 0,
|
|
1589
1756
|
"aria-label": "Move layer up",
|
|
1590
1757
|
className: "mapui:cursor-pointer mapui:rounded mapui:border-none mapui:bg-transparent mapui:px-1 mapui:text-xs mapui:text-gray-400 hover:mapui:text-gray-600 disabled:mapui:opacity-30",
|
|
1591
1758
|
children: "▲"
|
|
@@ -1595,8 +1762,8 @@ function Ge({ layers: a, onChange: i, availableSources: p }) {
|
|
|
1595
1762
|
"button",
|
|
1596
1763
|
{
|
|
1597
1764
|
type: "button",
|
|
1598
|
-
onClick: () =>
|
|
1599
|
-
disabled:
|
|
1765
|
+
onClick: () => A(v),
|
|
1766
|
+
disabled: v === a.length - 1,
|
|
1600
1767
|
"aria-label": "Move layer down",
|
|
1601
1768
|
className: "mapui:cursor-pointer mapui:rounded mapui:border-none mapui:bg-transparent mapui:px-1 mapui:text-xs mapui:text-gray-400 hover:mapui:text-gray-600 disabled:mapui:opacity-30",
|
|
1602
1769
|
children: "▼"
|
|
@@ -1611,75 +1778,75 @@ function Ge({ layers: a, onChange: i, availableSources: p }) {
|
|
|
1611
1778
|
children: "⠿"
|
|
1612
1779
|
}
|
|
1613
1780
|
),
|
|
1614
|
-
/* @__PURE__ */
|
|
1615
|
-
/* @__PURE__ */ e("span", { className: "mapui:text-sm mapui:font-medium mapui:text-gray-800", children:
|
|
1616
|
-
/* @__PURE__ */ e("span", { className: "mapui:font-mono mapui:text-xs mapui:text-gray-500", children:
|
|
1617
|
-
/* @__PURE__ */
|
|
1618
|
-
/* @__PURE__ */ e("span", { className: "mapui:rounded mapui:bg-slate-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-slate-700", children:
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
(((
|
|
1622
|
-
|
|
1781
|
+
/* @__PURE__ */ r("div", { className: "mapui:flex mapui:min-w-0 mapui:flex-col mapui:gap-0.5", children: [
|
|
1782
|
+
/* @__PURE__ */ e("span", { className: "mapui:text-sm mapui:font-medium mapui:text-gray-800", children: h.label || h.id }),
|
|
1783
|
+
/* @__PURE__ */ e("span", { className: "mapui:font-mono mapui:text-xs mapui:text-gray-500", children: h.collection }),
|
|
1784
|
+
/* @__PURE__ */ r("div", { className: "mapui:mt-1 mapui:flex mapui:flex-wrap mapui:gap-1", children: [
|
|
1785
|
+
/* @__PURE__ */ e("span", { className: "mapui:rounded mapui:bg-slate-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-slate-700", children: h.dataMode }),
|
|
1786
|
+
h.style && /* @__PURE__ */ e("span", { className: "mapui:rounded mapui:bg-purple-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-purple-700", children: h.style.type }),
|
|
1787
|
+
h.visible === !1 && /* @__PURE__ */ e("span", { className: "mapui:rounded mapui:bg-amber-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-amber-700", children: "hidden" }),
|
|
1788
|
+
(((F = (E = h.search) == null ? void 0 : E.fields) == null ? void 0 : F.length) ?? 0) > 0 && /* @__PURE__ */ r("span", { className: "mapui:rounded mapui:bg-blue-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-blue-700", children: [
|
|
1789
|
+
h.search.fields.length,
|
|
1623
1790
|
" search fields"
|
|
1624
1791
|
] }),
|
|
1625
|
-
(((
|
|
1626
|
-
|
|
1792
|
+
(((Q = (K = h.legend) == null ? void 0 : K.entries) == null ? void 0 : Q.length) ?? 0) > 0 && /* @__PURE__ */ r("span", { className: "mapui:rounded mapui:bg-green-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-green-700", children: [
|
|
1793
|
+
h.legend.entries.length,
|
|
1627
1794
|
" legend entries"
|
|
1628
1795
|
] })
|
|
1629
1796
|
] })
|
|
1630
1797
|
] })
|
|
1631
1798
|
] }),
|
|
1632
|
-
/* @__PURE__ */
|
|
1799
|
+
/* @__PURE__ */ r("div", { className: "mapui:flex mapui:shrink-0 mapui:gap-1", children: [
|
|
1633
1800
|
/* @__PURE__ */ e(
|
|
1634
1801
|
"button",
|
|
1635
1802
|
{
|
|
1636
1803
|
type: "button",
|
|
1637
|
-
onClick: () =>
|
|
1804
|
+
onClick: () => n(l === h.id ? null : h.id),
|
|
1638
1805
|
className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-gray-600 hover:mapui:bg-gray-50",
|
|
1639
|
-
children:
|
|
1806
|
+
children: l === h.id ? "Close" : "Edit"
|
|
1640
1807
|
}
|
|
1641
1808
|
),
|
|
1642
1809
|
/* @__PURE__ */ e(
|
|
1643
1810
|
"button",
|
|
1644
1811
|
{
|
|
1645
1812
|
type: "button",
|
|
1646
|
-
onClick: () =>
|
|
1813
|
+
onClick: () => d(h.id),
|
|
1647
1814
|
className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-red-200 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-red-600 hover:mapui:bg-red-50",
|
|
1648
1815
|
children: "Remove"
|
|
1649
1816
|
}
|
|
1650
1817
|
)
|
|
1651
1818
|
] })
|
|
1652
1819
|
] }),
|
|
1653
|
-
|
|
1654
|
-
|
|
1820
|
+
l === h.id && /* @__PURE__ */ e("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ e(
|
|
1821
|
+
ne,
|
|
1655
1822
|
{
|
|
1656
|
-
value:
|
|
1657
|
-
onChange:
|
|
1658
|
-
availableSources:
|
|
1823
|
+
value: h,
|
|
1824
|
+
onChange: C,
|
|
1825
|
+
availableSources: t
|
|
1659
1826
|
}
|
|
1660
1827
|
) })
|
|
1661
1828
|
]
|
|
1662
1829
|
},
|
|
1663
|
-
|
|
1830
|
+
h.id
|
|
1664
1831
|
);
|
|
1665
1832
|
}) }),
|
|
1666
|
-
u && /* @__PURE__ */
|
|
1833
|
+
u && /* @__PURE__ */ r("div", { className: "mapui:rounded-lg mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
|
|
1667
1834
|
/* @__PURE__ */ e("p", { className: "mapui:m-0 mapui:mb-3 mapui:text-xs mapui:font-semibold mapui:text-blue-700", children: "New Layer" }),
|
|
1668
1835
|
/* @__PURE__ */ e(
|
|
1669
|
-
|
|
1836
|
+
ne,
|
|
1670
1837
|
{
|
|
1671
|
-
value:
|
|
1672
|
-
onChange:
|
|
1673
|
-
availableSources:
|
|
1838
|
+
value: o,
|
|
1839
|
+
onChange: g,
|
|
1840
|
+
availableSources: t
|
|
1674
1841
|
}
|
|
1675
1842
|
),
|
|
1676
|
-
/* @__PURE__ */
|
|
1843
|
+
/* @__PURE__ */ r("div", { className: "mapui:mt-3 mapui:flex mapui:gap-2", children: [
|
|
1677
1844
|
/* @__PURE__ */ e(
|
|
1678
1845
|
"button",
|
|
1679
1846
|
{
|
|
1680
1847
|
type: "button",
|
|
1681
|
-
onClick:
|
|
1682
|
-
disabled: !
|
|
1848
|
+
onClick: m,
|
|
1849
|
+
disabled: !o.id || !o.sourceId || !o.collection,
|
|
1683
1850
|
className: "mapui:cursor-pointer mapui:rounded mapui:bg-blue-600 mapui:px-3 mapui:py-1 mapui:text-xs mapui:font-medium mapui:text-white hover:mapui:bg-blue-700 disabled:mapui:cursor-not-allowed disabled:mapui:opacity-50",
|
|
1684
1851
|
children: "Save"
|
|
1685
1852
|
}
|
|
@@ -1688,7 +1855,7 @@ function Ge({ layers: a, onChange: i, availableSources: p }) {
|
|
|
1688
1855
|
"button",
|
|
1689
1856
|
{
|
|
1690
1857
|
type: "button",
|
|
1691
|
-
onClick: () =>
|
|
1858
|
+
onClick: () => p(!1),
|
|
1692
1859
|
className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-300 mapui:bg-white mapui:px-3 mapui:py-1 mapui:text-xs mapui:text-gray-700 hover:mapui:bg-gray-50",
|
|
1693
1860
|
children: "Cancel"
|
|
1694
1861
|
}
|
|
@@ -1696,60 +1863,60 @@ function Ge({ layers: a, onChange: i, availableSources: p }) {
|
|
|
1696
1863
|
] })
|
|
1697
1864
|
] }),
|
|
1698
1865
|
/* @__PURE__ */ e(
|
|
1699
|
-
|
|
1866
|
+
H,
|
|
1700
1867
|
{
|
|
1701
|
-
open:
|
|
1868
|
+
open: x !== null,
|
|
1702
1869
|
title: "Remove Layer",
|
|
1703
1870
|
description: "Are you sure you want to remove this layer from the configuration?",
|
|
1704
|
-
onConfirm: () =>
|
|
1705
|
-
onCancel: () =>
|
|
1871
|
+
onConfirm: () => x && s(x),
|
|
1872
|
+
onCancel: () => d(null)
|
|
1706
1873
|
}
|
|
1707
1874
|
)
|
|
1708
1875
|
] });
|
|
1709
1876
|
}
|
|
1710
|
-
const
|
|
1711
|
-
function
|
|
1712
|
-
const
|
|
1713
|
-
return /* @__PURE__ */
|
|
1714
|
-
/* @__PURE__ */ e(
|
|
1877
|
+
const V = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
|
|
1878
|
+
function oe({ value: a, onChange: i }) {
|
|
1879
|
+
const t = (l) => i({ ...a, ...l });
|
|
1880
|
+
return /* @__PURE__ */ r("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
1881
|
+
/* @__PURE__ */ e(N, { label: "ID", required: !0, children: /* @__PURE__ */ e(
|
|
1715
1882
|
"input",
|
|
1716
1883
|
{
|
|
1717
1884
|
type: "text",
|
|
1718
1885
|
value: a.id,
|
|
1719
|
-
onChange: (
|
|
1886
|
+
onChange: (l) => t({ id: l.target.value }),
|
|
1720
1887
|
placeholder: "osm",
|
|
1721
|
-
className:
|
|
1888
|
+
className: V
|
|
1722
1889
|
}
|
|
1723
1890
|
) }),
|
|
1724
|
-
/* @__PURE__ */ e(
|
|
1891
|
+
/* @__PURE__ */ e(N, { label: "Label", children: /* @__PURE__ */ e(
|
|
1725
1892
|
"input",
|
|
1726
1893
|
{
|
|
1727
1894
|
type: "text",
|
|
1728
1895
|
value: a.label,
|
|
1729
|
-
onChange: (
|
|
1896
|
+
onChange: (l) => t({ label: l.target.value }),
|
|
1730
1897
|
placeholder: "OpenStreetMap",
|
|
1731
|
-
className:
|
|
1898
|
+
className: V
|
|
1732
1899
|
}
|
|
1733
1900
|
) }),
|
|
1734
|
-
/* @__PURE__ */ e(
|
|
1901
|
+
/* @__PURE__ */ e(N, { label: "Style URL", required: !0, children: /* @__PURE__ */ e(
|
|
1735
1902
|
"input",
|
|
1736
1903
|
{
|
|
1737
1904
|
type: "url",
|
|
1738
1905
|
value: a.url,
|
|
1739
|
-
onChange: (
|
|
1906
|
+
onChange: (l) => t({ url: l.target.value }),
|
|
1740
1907
|
placeholder: "https://example.com/style.json",
|
|
1741
|
-
className:
|
|
1908
|
+
className: V
|
|
1742
1909
|
}
|
|
1743
1910
|
) }),
|
|
1744
|
-
/* @__PURE__ */
|
|
1911
|
+
/* @__PURE__ */ r(N, { label: "Thumbnail URL (optional)", children: [
|
|
1745
1912
|
/* @__PURE__ */ e(
|
|
1746
1913
|
"input",
|
|
1747
1914
|
{
|
|
1748
1915
|
type: "url",
|
|
1749
1916
|
value: a.thumbnail ?? "",
|
|
1750
|
-
onChange: (
|
|
1917
|
+
onChange: (l) => t({ thumbnail: l.target.value || void 0 }),
|
|
1751
1918
|
placeholder: "https://example.com/thumbnail.png",
|
|
1752
|
-
className:
|
|
1919
|
+
className: V
|
|
1753
1920
|
}
|
|
1754
1921
|
),
|
|
1755
1922
|
a.thumbnail && /* @__PURE__ */ e(
|
|
@@ -1763,85 +1930,85 @@ function le({ value: a, onChange: i }) {
|
|
|
1763
1930
|
] })
|
|
1764
1931
|
] });
|
|
1765
1932
|
}
|
|
1766
|
-
const
|
|
1767
|
-
function
|
|
1768
|
-
const [
|
|
1769
|
-
i(a.map((
|
|
1770
|
-
},
|
|
1771
|
-
i([...a,
|
|
1772
|
-
},
|
|
1773
|
-
i(a.filter((
|
|
1933
|
+
const Y = () => ({ id: "", label: "", url: "" });
|
|
1934
|
+
function ra({ basemaps: a, onChange: i }) {
|
|
1935
|
+
const [t, l] = w(null), [n, u] = w(!1), [p, o] = w(Y()), [g, x] = w(null), d = (c) => {
|
|
1936
|
+
i(a.map((b) => b.id === t ? c : b));
|
|
1937
|
+
}, y = () => {
|
|
1938
|
+
i([...a, p]), u(!1), o(Y());
|
|
1939
|
+
}, k = (c) => {
|
|
1940
|
+
i(a.filter((b) => b.id !== c)), x(null);
|
|
1774
1941
|
};
|
|
1775
|
-
return /* @__PURE__ */
|
|
1776
|
-
/* @__PURE__ */
|
|
1942
|
+
return /* @__PURE__ */ r("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
1943
|
+
/* @__PURE__ */ r("div", { className: "mapui:flex mapui:items-center mapui:justify-between", children: [
|
|
1777
1944
|
/* @__PURE__ */ e("h3", { className: "mapui:m-0 mapui:text-sm mapui:font-semibold mapui:text-gray-700", children: "Basemaps" }),
|
|
1778
1945
|
/* @__PURE__ */ e(
|
|
1779
1946
|
"button",
|
|
1780
1947
|
{
|
|
1781
1948
|
type: "button",
|
|
1782
1949
|
onClick: () => {
|
|
1783
|
-
u(!0),
|
|
1950
|
+
u(!0), o(Y());
|
|
1784
1951
|
},
|
|
1785
1952
|
className: "mapui:cursor-pointer mapui:rounded mapui:bg-blue-600 mapui:px-3 mapui:py-1 mapui:text-xs mapui:font-medium mapui:text-white hover:mapui:bg-blue-700",
|
|
1786
1953
|
children: "+ Add Basemap"
|
|
1787
1954
|
}
|
|
1788
1955
|
)
|
|
1789
1956
|
] }),
|
|
1790
|
-
a.length === 0 && !
|
|
1791
|
-
/* @__PURE__ */ e("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: a.map((
|
|
1957
|
+
a.length === 0 && !n && /* @__PURE__ */ e("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No basemaps configured." }),
|
|
1958
|
+
/* @__PURE__ */ e("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: a.map((c) => /* @__PURE__ */ r(
|
|
1792
1959
|
"li",
|
|
1793
1960
|
{
|
|
1794
1961
|
className: "mapui:rounded-lg mapui:border mapui:border-gray-200 mapui:bg-white",
|
|
1795
1962
|
children: [
|
|
1796
|
-
/* @__PURE__ */
|
|
1797
|
-
|
|
1963
|
+
/* @__PURE__ */ r("div", { className: "mapui:flex mapui:items-center mapui:gap-3 mapui:px-3 mapui:py-2", children: [
|
|
1964
|
+
c.thumbnail && /* @__PURE__ */ e(
|
|
1798
1965
|
"img",
|
|
1799
1966
|
{
|
|
1800
|
-
src:
|
|
1967
|
+
src: c.thumbnail,
|
|
1801
1968
|
alt: "",
|
|
1802
1969
|
className: "mapui:h-10 mapui:w-14 mapui:shrink-0 mapui:rounded mapui:object-cover"
|
|
1803
1970
|
}
|
|
1804
1971
|
),
|
|
1805
|
-
/* @__PURE__ */
|
|
1806
|
-
/* @__PURE__ */ e("span", { className: "mapui:block mapui:text-sm mapui:font-medium mapui:text-gray-800", children:
|
|
1807
|
-
/* @__PURE__ */ e("span", { className: "mapui:block mapui:truncate mapui:font-mono mapui:text-xs mapui:text-gray-500", children:
|
|
1972
|
+
/* @__PURE__ */ r("div", { className: "mapui:flex-1 mapui:overflow-hidden", children: [
|
|
1973
|
+
/* @__PURE__ */ e("span", { className: "mapui:block mapui:text-sm mapui:font-medium mapui:text-gray-800", children: c.label || c.id }),
|
|
1974
|
+
/* @__PURE__ */ e("span", { className: "mapui:block mapui:truncate mapui:font-mono mapui:text-xs mapui:text-gray-500", children: c.url })
|
|
1808
1975
|
] }),
|
|
1809
|
-
/* @__PURE__ */
|
|
1976
|
+
/* @__PURE__ */ r("div", { className: "mapui:flex mapui:shrink-0 mapui:gap-1", children: [
|
|
1810
1977
|
/* @__PURE__ */ e(
|
|
1811
1978
|
"button",
|
|
1812
1979
|
{
|
|
1813
1980
|
type: "button",
|
|
1814
|
-
onClick: () =>
|
|
1981
|
+
onClick: () => l(t === c.id ? null : c.id),
|
|
1815
1982
|
className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-gray-600 hover:mapui:bg-gray-50",
|
|
1816
|
-
children:
|
|
1983
|
+
children: t === c.id ? "Close" : "Edit"
|
|
1817
1984
|
}
|
|
1818
1985
|
),
|
|
1819
1986
|
/* @__PURE__ */ e(
|
|
1820
1987
|
"button",
|
|
1821
1988
|
{
|
|
1822
1989
|
type: "button",
|
|
1823
|
-
onClick: () =>
|
|
1990
|
+
onClick: () => x(c.id),
|
|
1824
1991
|
className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-red-200 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-red-600 hover:mapui:bg-red-50",
|
|
1825
1992
|
children: "Remove"
|
|
1826
1993
|
}
|
|
1827
1994
|
)
|
|
1828
1995
|
] })
|
|
1829
1996
|
] }),
|
|
1830
|
-
|
|
1997
|
+
t === c.id && /* @__PURE__ */ e("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ e(oe, { value: c, onChange: d }) })
|
|
1831
1998
|
]
|
|
1832
1999
|
},
|
|
1833
|
-
|
|
2000
|
+
c.id
|
|
1834
2001
|
)) }),
|
|
1835
|
-
|
|
2002
|
+
n && /* @__PURE__ */ r("div", { className: "mapui:rounded-lg mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
|
|
1836
2003
|
/* @__PURE__ */ e("p", { className: "mapui:m-0 mapui:mb-3 mapui:text-xs mapui:font-semibold mapui:text-blue-700", children: "New Basemap" }),
|
|
1837
|
-
/* @__PURE__ */ e(
|
|
1838
|
-
/* @__PURE__ */
|
|
2004
|
+
/* @__PURE__ */ e(oe, { value: p, onChange: o }),
|
|
2005
|
+
/* @__PURE__ */ r("div", { className: "mapui:mt-3 mapui:flex mapui:gap-2", children: [
|
|
1839
2006
|
/* @__PURE__ */ e(
|
|
1840
2007
|
"button",
|
|
1841
2008
|
{
|
|
1842
2009
|
type: "button",
|
|
1843
|
-
onClick:
|
|
1844
|
-
disabled: !
|
|
2010
|
+
onClick: y,
|
|
2011
|
+
disabled: !p.id || !p.url,
|
|
1845
2012
|
className: "mapui:cursor-pointer mapui:rounded mapui:bg-blue-600 mapui:px-3 mapui:py-1 mapui:text-xs mapui:font-medium mapui:text-white hover:mapui:bg-blue-700 disabled:mapui:cursor-not-allowed disabled:mapui:opacity-50",
|
|
1846
2013
|
children: "Save"
|
|
1847
2014
|
}
|
|
@@ -1858,18 +2025,18 @@ function _e({ basemaps: a, onChange: i }) {
|
|
|
1858
2025
|
] })
|
|
1859
2026
|
] }),
|
|
1860
2027
|
/* @__PURE__ */ e(
|
|
1861
|
-
|
|
2028
|
+
H,
|
|
1862
2029
|
{
|
|
1863
|
-
open:
|
|
2030
|
+
open: g !== null,
|
|
1864
2031
|
title: "Remove Basemap",
|
|
1865
2032
|
description: "Are you sure you want to remove this basemap from the configuration?",
|
|
1866
|
-
onConfirm: () =>
|
|
1867
|
-
onCancel: () =>
|
|
2033
|
+
onConfirm: () => g && k(g),
|
|
2034
|
+
onCancel: () => x(null)
|
|
1868
2035
|
}
|
|
1869
2036
|
)
|
|
1870
2037
|
] });
|
|
1871
2038
|
}
|
|
1872
|
-
const
|
|
2039
|
+
const Je = [
|
|
1873
2040
|
{ key: "showLayerPanel", label: "Layer Panel", description: "Toggle layer visibility" },
|
|
1874
2041
|
{ key: "showLegend", label: "Legend", description: "Map legend" },
|
|
1875
2042
|
{ key: "showBasemapSwitcher", label: "Basemap Switcher", description: "Switch basemap styles" },
|
|
@@ -1879,32 +2046,32 @@ const Ie = [
|
|
|
1879
2046
|
{ key: "showFeatureTooltip", label: "Feature Tooltip", description: "Hover tooltip on features" },
|
|
1880
2047
|
{ key: "showExportButton", label: "Export Button", description: "Export data as CSV" }
|
|
1881
2048
|
];
|
|
1882
|
-
function
|
|
1883
|
-
const
|
|
1884
|
-
i({ ...a, [
|
|
2049
|
+
function pa({ value: a, onChange: i }) {
|
|
2050
|
+
const t = (l, n) => {
|
|
2051
|
+
i({ ...a, [l]: n });
|
|
1885
2052
|
};
|
|
1886
|
-
return /* @__PURE__ */
|
|
2053
|
+
return /* @__PURE__ */ r("div", { className: "mapui:flex mapui:flex-col mapui:gap-1", children: [
|
|
1887
2054
|
/* @__PURE__ */ e("p", { className: "mapui:m-0 mapui:mb-2 mapui:text-xs mapui:text-gray-500", children: "Enable or disable UI panels and controls." }),
|
|
1888
|
-
/* @__PURE__ */ e("div", { className: "mapui:grid mapui:grid-cols-1 mapui:gap-2 sm:mapui:grid-cols-2", children:
|
|
1889
|
-
const
|
|
1890
|
-
return /* @__PURE__ */
|
|
2055
|
+
/* @__PURE__ */ e("div", { className: "mapui:grid mapui:grid-cols-1 mapui:gap-2 sm:mapui:grid-cols-2", children: Je.map(({ key: l, label: n, description: u }) => {
|
|
2056
|
+
const p = a[l];
|
|
2057
|
+
return /* @__PURE__ */ r(
|
|
1891
2058
|
"label",
|
|
1892
2059
|
{
|
|
1893
2060
|
className: "mapui:flex mapui:cursor-pointer mapui:items-center mapui:justify-between mapui:gap-3 mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-white mapui:px-3 mapui:py-2 hover:mapui:bg-gray-50",
|
|
1894
2061
|
children: [
|
|
1895
|
-
/* @__PURE__ */
|
|
1896
|
-
/* @__PURE__ */ e("span", { className: "mapui:text-sm mapui:font-medium mapui:text-gray-800", children:
|
|
2062
|
+
/* @__PURE__ */ r("div", { className: "mapui:flex mapui:flex-col mapui:gap-0.5", children: [
|
|
2063
|
+
/* @__PURE__ */ e("span", { className: "mapui:text-sm mapui:font-medium mapui:text-gray-800", children: n }),
|
|
1897
2064
|
/* @__PURE__ */ e("span", { className: "mapui:text-xs mapui:text-gray-500", children: u })
|
|
1898
2065
|
] }),
|
|
1899
|
-
/* @__PURE__ */
|
|
2066
|
+
/* @__PURE__ */ r("div", { className: "mapui:relative mapui:flex mapui:shrink-0 mapui:items-center", children: [
|
|
1900
2067
|
/* @__PURE__ */ e(
|
|
1901
2068
|
"input",
|
|
1902
2069
|
{
|
|
1903
2070
|
type: "checkbox",
|
|
1904
|
-
checked:
|
|
1905
|
-
onChange: (
|
|
2071
|
+
checked: p,
|
|
2072
|
+
onChange: (o) => t(l, o.target.checked),
|
|
1906
2073
|
className: "mapui:sr-only",
|
|
1907
|
-
"aria-label":
|
|
2074
|
+
"aria-label": n
|
|
1908
2075
|
}
|
|
1909
2076
|
),
|
|
1910
2077
|
/* @__PURE__ */ e(
|
|
@@ -1912,14 +2079,14 @@ function Qe({ value: a, onChange: i }) {
|
|
|
1912
2079
|
{
|
|
1913
2080
|
className: [
|
|
1914
2081
|
"mapui:relative mapui:h-5 mapui:w-9 mapui:rounded-full mapui:transition-colors",
|
|
1915
|
-
|
|
2082
|
+
p ? "mapui:bg-blue-600" : "mapui:bg-gray-300"
|
|
1916
2083
|
].join(" "),
|
|
1917
2084
|
children: /* @__PURE__ */ e(
|
|
1918
2085
|
"div",
|
|
1919
2086
|
{
|
|
1920
2087
|
className: [
|
|
1921
2088
|
"mapui:absolute mapui:top-0.5 mapui:h-4 mapui:w-4 mapui:rounded-full mapui:bg-white mapui:shadow mapui:transition-transform",
|
|
1922
|
-
|
|
2089
|
+
p ? "mapui:translate-x-4" : "mapui:translate-x-0.5"
|
|
1923
2090
|
].join(" ")
|
|
1924
2091
|
}
|
|
1925
2092
|
)
|
|
@@ -1928,53 +2095,53 @@ function Qe({ value: a, onChange: i }) {
|
|
|
1928
2095
|
] })
|
|
1929
2096
|
]
|
|
1930
2097
|
},
|
|
1931
|
-
|
|
2098
|
+
l
|
|
1932
2099
|
);
|
|
1933
2100
|
}) })
|
|
1934
2101
|
] });
|
|
1935
2102
|
}
|
|
1936
|
-
const
|
|
2103
|
+
const fe = [
|
|
1937
2104
|
{ key: "latitude", label: "Latitude", min: -90, max: 90, step: 1e-6, placeholder: "0" },
|
|
1938
2105
|
{ key: "longitude", label: "Longitude", min: -180, max: 180, step: 1e-6, placeholder: "0" },
|
|
1939
2106
|
{ key: "zoom", label: "Zoom", min: 0, max: 24, step: 0.1, placeholder: "2" },
|
|
1940
2107
|
{ key: "pitch", label: "Pitch (°)", min: 0, max: 85, step: 1, placeholder: "0" },
|
|
1941
2108
|
{ key: "bearing", label: "Bearing (°)", min: -180, max: 180, step: 1, placeholder: "0" }
|
|
1942
2109
|
];
|
|
1943
|
-
function
|
|
1944
|
-
const
|
|
1945
|
-
if (
|
|
2110
|
+
function _e(a, i) {
|
|
2111
|
+
const t = fe.find((l) => l.key === a);
|
|
2112
|
+
if (t) {
|
|
1946
2113
|
if (isNaN(i)) return "Must be a number";
|
|
1947
|
-
if (i <
|
|
1948
|
-
if (i >
|
|
2114
|
+
if (i < t.min) return `Must be at least ${t.min}`;
|
|
2115
|
+
if (i > t.max) return `Must be at most ${t.max}`;
|
|
1949
2116
|
}
|
|
1950
2117
|
}
|
|
1951
|
-
const
|
|
1952
|
-
function
|
|
1953
|
-
const
|
|
1954
|
-
const u = parseFloat(
|
|
1955
|
-
i({ ...a, [
|
|
2118
|
+
const He = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
|
|
2119
|
+
function ua({ value: a, onChange: i }) {
|
|
2120
|
+
const t = (l, n) => {
|
|
2121
|
+
const u = parseFloat(n);
|
|
2122
|
+
i({ ...a, [l]: isNaN(u) ? 0 : u });
|
|
1956
2123
|
};
|
|
1957
|
-
return /* @__PURE__ */ e("div", { className: "mapui:grid mapui:grid-cols-2 mapui:gap-3", children:
|
|
1958
|
-
const
|
|
1959
|
-
return /* @__PURE__ */ e(
|
|
2124
|
+
return /* @__PURE__ */ e("div", { className: "mapui:grid mapui:grid-cols-2 mapui:gap-3", children: fe.map(({ key: l, label: n, min: u, max: p, step: o, placeholder: g }) => {
|
|
2125
|
+
const x = _e(l, a[l]);
|
|
2126
|
+
return /* @__PURE__ */ e(N, { label: n, error: x, children: /* @__PURE__ */ e(
|
|
1960
2127
|
"input",
|
|
1961
2128
|
{
|
|
1962
2129
|
type: "number",
|
|
1963
2130
|
min: u,
|
|
1964
|
-
max:
|
|
1965
|
-
step:
|
|
1966
|
-
value: a[
|
|
1967
|
-
placeholder:
|
|
1968
|
-
onChange: (
|
|
1969
|
-
className: `${
|
|
2131
|
+
max: p,
|
|
2132
|
+
step: o,
|
|
2133
|
+
value: a[l],
|
|
2134
|
+
placeholder: g,
|
|
2135
|
+
onChange: (d) => t(l, d.target.value),
|
|
2136
|
+
className: `${He} ${x ? "mapui:border-red-400" : ""}`
|
|
1970
2137
|
}
|
|
1971
|
-
) },
|
|
2138
|
+
) }, l);
|
|
1972
2139
|
}) });
|
|
1973
2140
|
}
|
|
1974
|
-
function
|
|
1975
|
-
const i =
|
|
1976
|
-
return /* @__PURE__ */
|
|
1977
|
-
/* @__PURE__ */
|
|
2141
|
+
function na({ config: a }) {
|
|
2142
|
+
const i = we(a);
|
|
2143
|
+
return /* @__PURE__ */ r("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
2144
|
+
/* @__PURE__ */ r("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
1978
2145
|
/* @__PURE__ */ e(
|
|
1979
2146
|
"span",
|
|
1980
2147
|
{
|
|
@@ -1987,120 +2154,126 @@ function We({ config: a }) {
|
|
|
1987
2154
|
),
|
|
1988
2155
|
/* @__PURE__ */ e("span", { className: "mapui:text-xs mapui:text-gray-500", children: "MapConfig validation" })
|
|
1989
2156
|
] }),
|
|
1990
|
-
!i.success && /* @__PURE__ */
|
|
2157
|
+
!i.success && /* @__PURE__ */ r("div", { className: "mapui:rounded mapui:bg-red-50 mapui:p-3", children: [
|
|
1991
2158
|
/* @__PURE__ */ e("p", { className: "mapui:m-0 mapui:mb-1 mapui:text-xs mapui:font-semibold mapui:text-red-700", children: "Validation Errors" }),
|
|
1992
|
-
/* @__PURE__ */ e("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-1 mapui:p-0", children: i.error.errors.map((
|
|
1993
|
-
/* @__PURE__ */ e("span", { className: "mapui:font-mono mapui:text-xs mapui:text-red-600", children:
|
|
1994
|
-
/* @__PURE__ */ e("span", { className: "mapui:text-xs mapui:text-red-800", children:
|
|
1995
|
-
] },
|
|
2159
|
+
/* @__PURE__ */ e("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-1 mapui:p-0", children: i.error.errors.map((t, l) => /* @__PURE__ */ r("li", { className: "mapui:flex mapui:flex-col mapui:gap-0.5", children: [
|
|
2160
|
+
/* @__PURE__ */ e("span", { className: "mapui:font-mono mapui:text-xs mapui:text-red-600", children: t.path.join(" > ") || "root" }),
|
|
2161
|
+
/* @__PURE__ */ e("span", { className: "mapui:text-xs mapui:text-red-800", children: t.message })
|
|
2162
|
+
] }, l)) })
|
|
1996
2163
|
] }),
|
|
1997
2164
|
/* @__PURE__ */ e("div", { className: "mapui:overflow-auto mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-gray-50", children: /* @__PURE__ */ e("pre", { className: "mapui:m-0 mapui:p-3 mapui:text-xs mapui:text-gray-800 mapui:whitespace-pre", children: JSON.stringify(a, null, 2) }) })
|
|
1998
2165
|
] });
|
|
1999
2166
|
}
|
|
2000
2167
|
export {
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2168
|
+
di as BasemapConfigSchema,
|
|
2169
|
+
oe as BasemapEditor,
|
|
2170
|
+
ra as BasemapList,
|
|
2171
|
+
ca as BasemapSwitcher,
|
|
2172
|
+
gi as CircleLayoutSchema,
|
|
2173
|
+
bi as CirclePaintSchema,
|
|
2174
|
+
hi as CircleStyleSchema,
|
|
2175
|
+
da as CollapsibleControl,
|
|
2176
|
+
aa as CollectionBrowser,
|
|
2177
|
+
se as ColorPicker,
|
|
2178
|
+
na as ConfigPreview,
|
|
2179
|
+
H as ConfirmDialog,
|
|
2180
|
+
ba as CoordinateDisplay,
|
|
2181
|
+
yi as DatetimeSearchFieldSchema,
|
|
2182
|
+
xa as ExportButton,
|
|
2183
|
+
va as FeatureDetailPanel,
|
|
2184
|
+
ka as FeatureTooltip,
|
|
2185
|
+
fi as FillLayoutSchema,
|
|
2186
|
+
xi as FillPaintSchema,
|
|
2187
|
+
Ni as FillStyleSchema,
|
|
2188
|
+
vi as FilterConfigSchema,
|
|
2189
|
+
N as FormField,
|
|
2190
|
+
wi as LayerConfigSchema,
|
|
2191
|
+
ne as LayerEditor,
|
|
2192
|
+
la as LayerList,
|
|
2193
|
+
Sa as LayerPanel,
|
|
2194
|
+
Ta as Legend,
|
|
2195
|
+
ki as LegendConfigSchema,
|
|
2196
|
+
je as LegendEditor,
|
|
2197
|
+
Me as LegendEntryEditor,
|
|
2198
|
+
Ci as LegendEntrySchema,
|
|
2199
|
+
Si as LineLayoutSchema,
|
|
2200
|
+
Di as LinePaintSchema,
|
|
2201
|
+
Ti as LineStyleSchema,
|
|
2202
|
+
Li as MapConfigSchema,
|
|
2203
|
+
Ii as NumberSearchFieldSchema,
|
|
2204
|
+
Ai as OgcApiSourceSchema,
|
|
2205
|
+
Ei as PropertyDisplayConfigSchema,
|
|
2206
|
+
Ge as PropertyDisplayEditor,
|
|
2207
|
+
Fi as PropertyDisplaySchema,
|
|
2208
|
+
Pi as SearchConfigSchema,
|
|
2209
|
+
Re as SearchFieldEditor,
|
|
2210
|
+
qe as SearchFieldList,
|
|
2211
|
+
Oi as SearchFieldSchema,
|
|
2212
|
+
Ia as SearchPanel,
|
|
2213
|
+
Mi as SelectSearchFieldSchema,
|
|
2214
|
+
ee as SourceEditor,
|
|
2215
|
+
ea as SourceList,
|
|
2216
|
+
ji as StyleConfigSchema,
|
|
2217
|
+
Oe as StyleEditor,
|
|
2218
|
+
Bi as SymbolLayoutSchema,
|
|
2219
|
+
Ri as SymbolPaintSchema,
|
|
2220
|
+
$i as SymbolStyleSchema,
|
|
2221
|
+
qi as TextSearchFieldSchema,
|
|
2222
|
+
pa as UIConfigEditor,
|
|
2223
|
+
Ui as UIConfigSchema,
|
|
2224
|
+
Vi as ViewConfigSchema,
|
|
2225
|
+
ua as ViewEditor,
|
|
2226
|
+
Ea as and,
|
|
2227
|
+
Fa as between,
|
|
2228
|
+
ge as defaultCircle,
|
|
2229
|
+
_ as defaultFill,
|
|
2230
|
+
de as defaultLine,
|
|
2231
|
+
ye as detectGeometryTypeFromQueryables,
|
|
2232
|
+
ia as detectStyleTypeForCollection,
|
|
2233
|
+
Pa as downloadCsv,
|
|
2234
|
+
Oa as eq,
|
|
2235
|
+
We as extractGeometryType,
|
|
2236
|
+
Ma as featuresToCsv,
|
|
2237
|
+
ja as fetchCollectionDetail,
|
|
2238
|
+
Ba as fetchCollections,
|
|
2239
|
+
Ra as fetchConformance,
|
|
2240
|
+
$a as fetchDistinctValues,
|
|
2241
|
+
qa as fetchFeatureCount,
|
|
2242
|
+
ce as fetchFeatures,
|
|
2243
|
+
Ne as fetchQueryables,
|
|
2244
|
+
Ua as fetchTileJson,
|
|
2245
|
+
ha as formatDMS,
|
|
2246
|
+
ya as formatDecimal,
|
|
2247
|
+
Va as fromSimpleFilters,
|
|
2248
|
+
Ga as fromStructuredFilters,
|
|
2249
|
+
X as geometryTypeToStyleType,
|
|
2250
|
+
za as getCql2FilteredVectorTileUrl,
|
|
2251
|
+
Wa as getFilteredVectorTileUrl,
|
|
2252
|
+
Ya as getTileJsonUrl,
|
|
2253
|
+
Ja as getVectorTileUrl,
|
|
2254
|
+
_a as gt,
|
|
2255
|
+
Ha as gte,
|
|
2256
|
+
ta as humanizePropertyName,
|
|
2257
|
+
Xa as inList,
|
|
2258
|
+
ze as isGeometryProperty,
|
|
2259
|
+
Ka as isNull,
|
|
2260
|
+
Qa as like,
|
|
2261
|
+
Za as lt,
|
|
2262
|
+
ei as lte,
|
|
2263
|
+
ai as neq,
|
|
2264
|
+
ii as not,
|
|
2265
|
+
ti as or,
|
|
2266
|
+
li as resolvePropertyDisplay,
|
|
2267
|
+
we as safeValidateMapConfig,
|
|
2268
|
+
ri as serializeCql2,
|
|
2269
|
+
pi as tAfter,
|
|
2270
|
+
ui as tBefore,
|
|
2271
|
+
ni as tDuring,
|
|
2272
|
+
Ye as toAvailableProperties,
|
|
2273
|
+
oi as useCsvExport,
|
|
2274
|
+
mi as useOgcCollectionDetail,
|
|
2275
|
+
me as useOgcCollections,
|
|
2276
|
+
ci as useOgcFeatures,
|
|
2277
|
+
ve as useOgcQueryables,
|
|
2278
|
+
Gi as validateMapConfig
|
|
2106
2279
|
};
|