@ogc-maps/storybook-components 0.5.1 → 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/README.md +2 -2
- 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/SearchFieldEditor/SearchFieldEditor.d.ts.map +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 +1140 -952
- 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,37 +1,37 @@
|
|
|
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,
|
|
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
|
),
|
|
@@ -41,9 +41,9 @@ function A({ value: a, onChange: i, label: p }) {
|
|
|
41
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 H({
|
|
|
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 H({
|
|
|
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 H({
|
|
|
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 H({
|
|
|
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
206
|
}, s = () => {
|
|
181
|
-
|
|
182
|
-
},
|
|
183
|
-
i([...a,
|
|
184
|
-
},
|
|
185
|
-
i(a.filter((
|
|
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
249
|
onClick: s,
|
|
224
|
-
disabled: !(
|
|
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 Be({ 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 Be({ 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 Be({ 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 Be({ 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
|
}
|
|
@@ -313,28 +339,28 @@ function Be({ sources: a, onChange: i }) {
|
|
|
313
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: () => b &&
|
|
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 xe({ 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 xe({ 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(
|
|
468
|
-
] }),
|
|
469
|
-
a.type === "fill" && /* @__PURE__ */ t(E, { children: [
|
|
470
|
-
/* @__PURE__ */ e(x, { label: "Fill Color", children: /* @__PURE__ */ e(
|
|
471
|
-
A,
|
|
472
|
-
{
|
|
473
|
-
value: a.paint["fill-color"],
|
|
474
|
-
onChange: (u) => i({ ...a, paint: { ...a.paint, "fill-color": u } }),
|
|
475
|
-
label: "Fill color"
|
|
476
|
-
}
|
|
477
|
-
) }),
|
|
478
|
-
/* @__PURE__ */ e(x, { label: "Fill Opacity", children: /* @__PURE__ */ t("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
479
|
-
/* @__PURE__ */ e(
|
|
480
|
-
"input",
|
|
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
|
-
] }) })
|
|
835
|
+
/* @__PURE__ */ e(De, { style: a })
|
|
524
836
|
] }),
|
|
525
|
-
|
|
526
|
-
/* @__PURE__ */ e(
|
|
527
|
-
|
|
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: q
|
|
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",
|
|
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,
|
|
568
841
|
{
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
},
|
|
578
|
-
placeholder: "e.g. 2, 4",
|
|
579
|
-
className: q
|
|
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
|
-
|
|
586
|
-
|
|
587
|
-
value: a.paint["circle-color"],
|
|
588
|
-
onChange: (u) => i({ ...a, paint: { ...a.paint, "circle-color": u } }),
|
|
589
|
-
label: "Circle color"
|
|
590
|
-
}
|
|
591
|
-
) }),
|
|
592
|
-
/* @__PURE__ */ e(x, { label: "Circle Radius", children: /* @__PURE__ */ e(
|
|
593
|
-
"input",
|
|
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: q
|
|
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",
|
|
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,
|
|
661
855
|
{
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
"circle-stroke-width": parseFloat(u.target.value) || 0
|
|
671
|
-
}
|
|
672
|
-
}),
|
|
673
|
-
className: q
|
|
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 ye({ 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,24 +971,47 @@ function Ne({ value: a, onChange: i }) {
|
|
|
783
971
|
] })
|
|
784
972
|
] });
|
|
785
973
|
}
|
|
786
|
-
|
|
974
|
+
function ue({
|
|
975
|
+
options: a,
|
|
976
|
+
onChange: i,
|
|
977
|
+
placeholder: t,
|
|
978
|
+
className: l
|
|
979
|
+
}) {
|
|
980
|
+
const [n, u] = w(() => (a == null ? void 0 : a.join(", ")) ?? "");
|
|
981
|
+
return J(() => {
|
|
982
|
+
u((a == null ? void 0 : a.join(", ")) ?? "");
|
|
983
|
+
}, [a == null ? void 0 : a.join(",")]), /* @__PURE__ */ e(
|
|
984
|
+
"input",
|
|
985
|
+
{
|
|
986
|
+
type: "text",
|
|
987
|
+
value: n,
|
|
988
|
+
onChange: (o) => u(o.target.value),
|
|
989
|
+
onBlur: () => {
|
|
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(", ")) ?? "");
|
|
992
|
+
},
|
|
993
|
+
placeholder: t,
|
|
994
|
+
className: l
|
|
995
|
+
}
|
|
996
|
+
);
|
|
997
|
+
}
|
|
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 = {
|
|
787
999
|
text: { type: "text", property: "", label: "", autocomplete: !1 },
|
|
788
1000
|
number: { type: "number", property: "", label: "", inputMode: "input", operator: "eq" },
|
|
789
1001
|
datetime: { type: "datetime", property: "", label: "", range: !1 },
|
|
790
1002
|
select: { type: "select", property: "", label: "" }
|
|
791
1003
|
};
|
|
792
|
-
function
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
/* @__PURE__ */ e(x, { label: "Field Type", children: /* @__PURE__ */ t(
|
|
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(
|
|
799
1010
|
"select",
|
|
800
1011
|
{
|
|
801
1012
|
value: a.type,
|
|
802
|
-
onChange: (
|
|
803
|
-
className:
|
|
1013
|
+
onChange: (p) => l(p.target.value),
|
|
1014
|
+
className: I,
|
|
804
1015
|
children: [
|
|
805
1016
|
/* @__PURE__ */ e("option", { value: "text", children: "Text" }),
|
|
806
1017
|
/* @__PURE__ */ e("option", { value: "number", children: "Number" }),
|
|
@@ -809,15 +1020,15 @@ function we({ value: a, onChange: i, availableProperties: p }) {
|
|
|
809
1020
|
]
|
|
810
1021
|
}
|
|
811
1022
|
) }),
|
|
812
|
-
/* @__PURE__ */ e(
|
|
1023
|
+
/* @__PURE__ */ e(N, { label: "Property", required: !0, children: u ? /* @__PURE__ */ r(
|
|
813
1024
|
"select",
|
|
814
1025
|
{
|
|
815
1026
|
value: a.property,
|
|
816
|
-
onChange: (
|
|
817
|
-
className:
|
|
1027
|
+
onChange: (p) => n({ property: p.target.value }),
|
|
1028
|
+
className: I,
|
|
818
1029
|
children: [
|
|
819
1030
|
/* @__PURE__ */ e("option", { value: "", children: "Select a property…" }),
|
|
820
|
-
|
|
1031
|
+
t.map((p) => /* @__PURE__ */ e("option", { value: p.name, children: p.title ?? p.name }, p.name))
|
|
821
1032
|
]
|
|
822
1033
|
}
|
|
823
1034
|
) : /* @__PURE__ */ e(
|
|
@@ -825,97 +1036,93 @@ function we({ value: a, onChange: i, availableProperties: p }) {
|
|
|
825
1036
|
{
|
|
826
1037
|
type: "text",
|
|
827
1038
|
value: a.property,
|
|
828
|
-
onChange: (
|
|
1039
|
+
onChange: (p) => n({ property: p.target.value }),
|
|
829
1040
|
placeholder: "e.g. name",
|
|
830
|
-
className:
|
|
1041
|
+
className: I
|
|
831
1042
|
}
|
|
832
1043
|
) }),
|
|
833
|
-
/* @__PURE__ */ e(
|
|
1044
|
+
/* @__PURE__ */ e(N, { label: "Label", children: /* @__PURE__ */ e(
|
|
834
1045
|
"input",
|
|
835
1046
|
{
|
|
836
1047
|
type: "text",
|
|
837
1048
|
value: a.label,
|
|
838
|
-
onChange: (
|
|
1049
|
+
onChange: (p) => n({ label: p.target.value }),
|
|
839
1050
|
placeholder: "Display label",
|
|
840
|
-
className:
|
|
1051
|
+
className: I
|
|
841
1052
|
}
|
|
842
1053
|
) }),
|
|
843
|
-
/* @__PURE__ */ e(
|
|
1054
|
+
/* @__PURE__ */ e(N, { label: "Placeholder", children: /* @__PURE__ */ e(
|
|
844
1055
|
"input",
|
|
845
1056
|
{
|
|
846
1057
|
type: "text",
|
|
847
1058
|
value: a.placeholder ?? "",
|
|
848
|
-
onChange: (
|
|
1059
|
+
onChange: (p) => n({ placeholder: p.target.value || void 0 }),
|
|
849
1060
|
placeholder: "Input placeholder text",
|
|
850
|
-
className:
|
|
1061
|
+
className: I
|
|
851
1062
|
}
|
|
852
1063
|
) }),
|
|
853
|
-
a.type === "text" && /* @__PURE__ */
|
|
854
|
-
/* @__PURE__ */
|
|
1064
|
+
a.type === "text" && /* @__PURE__ */ r(O, { children: [
|
|
1065
|
+
/* @__PURE__ */ r("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
855
1066
|
/* @__PURE__ */ e(
|
|
856
1067
|
"input",
|
|
857
1068
|
{
|
|
858
1069
|
type: "checkbox",
|
|
859
1070
|
id: "text-autocomplete",
|
|
860
1071
|
checked: a.autocomplete ?? !1,
|
|
861
|
-
onChange: (
|
|
1072
|
+
onChange: (p) => i({ ...a, autocomplete: p.target.checked }),
|
|
862
1073
|
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
863
1074
|
}
|
|
864
1075
|
),
|
|
865
1076
|
/* @__PURE__ */ e("label", { htmlFor: "text-autocomplete", className: "mapui:text-sm mapui:text-gray-700", children: "Enable Autocomplete" })
|
|
866
1077
|
] }),
|
|
867
|
-
/* @__PURE__ */
|
|
1078
|
+
/* @__PURE__ */ r("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
868
1079
|
/* @__PURE__ */ e(
|
|
869
1080
|
"input",
|
|
870
1081
|
{
|
|
871
1082
|
type: "checkbox",
|
|
872
1083
|
id: "text-prefetch",
|
|
873
1084
|
checked: a.prefetch ?? !1,
|
|
874
|
-
onChange: (
|
|
1085
|
+
onChange: (p) => i({ ...a, prefetch: p.target.checked }),
|
|
875
1086
|
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
876
1087
|
}
|
|
877
1088
|
),
|
|
878
1089
|
/* @__PURE__ */ e("label", { htmlFor: "text-prefetch", className: "mapui:text-sm mapui:text-gray-700", children: "Prefetch Options" })
|
|
879
1090
|
] }),
|
|
880
|
-
/* @__PURE__ */ e(
|
|
881
|
-
|
|
1091
|
+
/* @__PURE__ */ e(N, { label: "Static Options (comma-separated)", children: /* @__PURE__ */ e(
|
|
1092
|
+
ue,
|
|
882
1093
|
{
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
onChange: (l) => {
|
|
886
|
-
const N = l.target.value.trim(), h = N ? N.split(",").map((c) => c.trim()).filter(Boolean) : void 0;
|
|
887
|
-
i({ ...a, options: h });
|
|
888
|
-
},
|
|
1094
|
+
options: a.options,
|
|
1095
|
+
onChange: (p) => i({ ...a, options: p }),
|
|
889
1096
|
placeholder: "option1, option2",
|
|
890
|
-
className:
|
|
1097
|
+
className: I
|
|
891
1098
|
}
|
|
892
1099
|
) })
|
|
893
1100
|
] }),
|
|
894
|
-
a.type === "number" && /* @__PURE__ */
|
|
895
|
-
/* @__PURE__ */ e(
|
|
1101
|
+
a.type === "number" && /* @__PURE__ */ r(O, { children: [
|
|
1102
|
+
/* @__PURE__ */ e(N, { label: "Input Mode", children: /* @__PURE__ */ r(
|
|
896
1103
|
"select",
|
|
897
1104
|
{
|
|
898
1105
|
value: a.inputMode ?? "input",
|
|
899
|
-
onChange: (
|
|
1106
|
+
onChange: (p) => i({
|
|
900
1107
|
...a,
|
|
901
|
-
inputMode:
|
|
1108
|
+
inputMode: p.target.value
|
|
902
1109
|
}),
|
|
903
|
-
className:
|
|
1110
|
+
className: I,
|
|
904
1111
|
children: [
|
|
905
1112
|
/* @__PURE__ */ e("option", { value: "input", children: "Input" }),
|
|
906
1113
|
/* @__PURE__ */ e("option", { value: "slider", children: "Slider" })
|
|
907
1114
|
]
|
|
908
1115
|
}
|
|
909
1116
|
) }),
|
|
910
|
-
/* @__PURE__ */ e(
|
|
1117
|
+
/* @__PURE__ */ e(N, { label: "Operator", children: /* @__PURE__ */ r(
|
|
911
1118
|
"select",
|
|
912
1119
|
{
|
|
913
1120
|
value: a.operator ?? "eq",
|
|
914
|
-
onChange: (
|
|
1121
|
+
onChange: (p) => i({
|
|
915
1122
|
...a,
|
|
916
|
-
operator:
|
|
1123
|
+
operator: p.target.value
|
|
917
1124
|
}),
|
|
918
|
-
className:
|
|
1125
|
+
className: I,
|
|
919
1126
|
children: [
|
|
920
1127
|
/* @__PURE__ */ e("option", { value: "eq", children: "Equal (=)" }),
|
|
921
1128
|
/* @__PURE__ */ e("option", { value: "gt", children: "Greater Than (>)" }),
|
|
@@ -926,122 +1133,118 @@ function we({ value: a, onChange: i, availableProperties: p }) {
|
|
|
926
1133
|
]
|
|
927
1134
|
}
|
|
928
1135
|
) }),
|
|
929
|
-
/* @__PURE__ */
|
|
930
|
-
/* @__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(
|
|
931
1138
|
"input",
|
|
932
1139
|
{
|
|
933
1140
|
type: "number",
|
|
934
1141
|
value: a.min ?? "",
|
|
935
|
-
onChange: (
|
|
1142
|
+
onChange: (p) => i({
|
|
936
1143
|
...a,
|
|
937
|
-
min:
|
|
1144
|
+
min: p.target.value ? parseFloat(p.target.value) : void 0
|
|
938
1145
|
}),
|
|
939
|
-
className:
|
|
1146
|
+
className: I
|
|
940
1147
|
}
|
|
941
1148
|
) }),
|
|
942
|
-
/* @__PURE__ */ e(
|
|
1149
|
+
/* @__PURE__ */ e(N, { label: "Max", children: /* @__PURE__ */ e(
|
|
943
1150
|
"input",
|
|
944
1151
|
{
|
|
945
1152
|
type: "number",
|
|
946
1153
|
value: a.max ?? "",
|
|
947
|
-
onChange: (
|
|
1154
|
+
onChange: (p) => i({
|
|
948
1155
|
...a,
|
|
949
|
-
max:
|
|
1156
|
+
max: p.target.value ? parseFloat(p.target.value) : void 0
|
|
950
1157
|
}),
|
|
951
|
-
className:
|
|
1158
|
+
className: I
|
|
952
1159
|
}
|
|
953
1160
|
) }),
|
|
954
|
-
/* @__PURE__ */ e(
|
|
1161
|
+
/* @__PURE__ */ e(N, { label: "Step", children: /* @__PURE__ */ e(
|
|
955
1162
|
"input",
|
|
956
1163
|
{
|
|
957
1164
|
type: "number",
|
|
958
1165
|
value: a.step ?? "",
|
|
959
|
-
onChange: (
|
|
1166
|
+
onChange: (p) => i({
|
|
960
1167
|
...a,
|
|
961
|
-
step:
|
|
1168
|
+
step: p.target.value ? parseFloat(p.target.value) : void 0
|
|
962
1169
|
}),
|
|
963
|
-
className:
|
|
1170
|
+
className: I
|
|
964
1171
|
}
|
|
965
1172
|
) })
|
|
966
1173
|
] })
|
|
967
1174
|
] }),
|
|
968
|
-
a.type === "datetime" && /* @__PURE__ */
|
|
1175
|
+
a.type === "datetime" && /* @__PURE__ */ r("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
969
1176
|
/* @__PURE__ */ e(
|
|
970
1177
|
"input",
|
|
971
1178
|
{
|
|
972
1179
|
type: "checkbox",
|
|
973
1180
|
id: "datetime-range",
|
|
974
1181
|
checked: a.range ?? !1,
|
|
975
|
-
onChange: (
|
|
1182
|
+
onChange: (p) => i({ ...a, range: p.target.checked }),
|
|
976
1183
|
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
977
1184
|
}
|
|
978
1185
|
),
|
|
979
1186
|
/* @__PURE__ */ e("label", { htmlFor: "datetime-range", className: "mapui:text-sm mapui:text-gray-700", children: "Date Range" })
|
|
980
1187
|
] }),
|
|
981
|
-
a.type === "select" && /* @__PURE__ */
|
|
982
|
-
/* @__PURE__ */
|
|
1188
|
+
a.type === "select" && /* @__PURE__ */ r(O, { children: [
|
|
1189
|
+
/* @__PURE__ */ r("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
983
1190
|
/* @__PURE__ */ e(
|
|
984
1191
|
"input",
|
|
985
1192
|
{
|
|
986
1193
|
type: "checkbox",
|
|
987
1194
|
id: "select-prefetch",
|
|
988
1195
|
checked: a.prefetch ?? !1,
|
|
989
|
-
onChange: (
|
|
1196
|
+
onChange: (p) => i({ ...a, prefetch: p.target.checked }),
|
|
990
1197
|
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
991
1198
|
}
|
|
992
1199
|
),
|
|
993
1200
|
/* @__PURE__ */ e("label", { htmlFor: "select-prefetch", className: "mapui:text-sm mapui:text-gray-700", children: "Prefetch Options" })
|
|
994
1201
|
] }),
|
|
995
|
-
/* @__PURE__ */ e(
|
|
996
|
-
|
|
1202
|
+
/* @__PURE__ */ e(N, { label: "Static Options (comma-separated)", children: /* @__PURE__ */ e(
|
|
1203
|
+
ue,
|
|
997
1204
|
{
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
onChange: (l) => {
|
|
1001
|
-
const N = l.target.value.trim(), h = N ? N.split(",").map((c) => c.trim()).filter(Boolean) : void 0;
|
|
1002
|
-
i({ ...a, options: h });
|
|
1003
|
-
},
|
|
1205
|
+
options: a.options,
|
|
1206
|
+
onChange: (p) => i({ ...a, options: p }),
|
|
1004
1207
|
placeholder: "option1, option2",
|
|
1005
|
-
className:
|
|
1208
|
+
className: I
|
|
1006
1209
|
}
|
|
1007
1210
|
) })
|
|
1008
1211
|
] })
|
|
1009
1212
|
] });
|
|
1010
1213
|
}
|
|
1011
|
-
const
|
|
1214
|
+
const $e = () => ({
|
|
1012
1215
|
type: "text",
|
|
1013
1216
|
property: "",
|
|
1014
1217
|
label: "",
|
|
1015
1218
|
autocomplete: !1
|
|
1016
1219
|
});
|
|
1017
|
-
function
|
|
1018
|
-
const [
|
|
1019
|
-
const
|
|
1020
|
-
i(
|
|
1021
|
-
},
|
|
1022
|
-
i(a.map((
|
|
1023
|
-
},
|
|
1024
|
-
i(a.filter((
|
|
1025
|
-
},
|
|
1026
|
-
if (
|
|
1027
|
-
const
|
|
1028
|
-
[
|
|
1029
|
-
},
|
|
1030
|
-
if (
|
|
1031
|
-
const
|
|
1032
|
-
[
|
|
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);
|
|
1033
1236
|
};
|
|
1034
|
-
return /* @__PURE__ */
|
|
1237
|
+
return /* @__PURE__ */ r("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
|
|
1035
1238
|
a.length === 0 && /* @__PURE__ */ e("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No search fields configured." }),
|
|
1036
|
-
/* @__PURE__ */ e("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: a.map((
|
|
1037
|
-
/* @__PURE__ */
|
|
1038
|
-
/* @__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: [
|
|
1039
1242
|
/* @__PURE__ */ e(
|
|
1040
1243
|
"button",
|
|
1041
1244
|
{
|
|
1042
1245
|
type: "button",
|
|
1043
|
-
onClick: () =>
|
|
1044
|
-
disabled:
|
|
1246
|
+
onClick: () => g(y),
|
|
1247
|
+
disabled: y === 0,
|
|
1045
1248
|
"aria-label": "Move up",
|
|
1046
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",
|
|
1047
1250
|
children: "▲"
|
|
@@ -1051,23 +1254,23 @@ function ke({ fields: a, onChange: i, availableProperties: p }) {
|
|
|
1051
1254
|
"button",
|
|
1052
1255
|
{
|
|
1053
1256
|
type: "button",
|
|
1054
|
-
onClick: () =>
|
|
1055
|
-
disabled:
|
|
1257
|
+
onClick: () => x(y),
|
|
1258
|
+
disabled: y === a.length - 1,
|
|
1056
1259
|
"aria-label": "Move down",
|
|
1057
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",
|
|
1058
1261
|
children: "▼"
|
|
1059
1262
|
}
|
|
1060
1263
|
)
|
|
1061
1264
|
] }),
|
|
1062
|
-
/* @__PURE__ */
|
|
1265
|
+
/* @__PURE__ */ r(
|
|
1063
1266
|
"button",
|
|
1064
1267
|
{
|
|
1065
1268
|
type: "button",
|
|
1066
|
-
onClick: () =>
|
|
1269
|
+
onClick: () => n(l === y ? null : y),
|
|
1067
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",
|
|
1068
1271
|
children: [
|
|
1069
|
-
/* @__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:
|
|
1070
|
-
|
|
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"
|
|
1071
1274
|
]
|
|
1072
1275
|
}
|
|
1073
1276
|
),
|
|
@@ -1075,22 +1278,22 @@ function ke({ fields: a, onChange: i, availableProperties: p }) {
|
|
|
1075
1278
|
"button",
|
|
1076
1279
|
{
|
|
1077
1280
|
type: "button",
|
|
1078
|
-
onClick: () =>
|
|
1281
|
+
onClick: () => o(y),
|
|
1079
1282
|
"aria-label": "Remove field",
|
|
1080
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",
|
|
1081
1284
|
children: "Remove"
|
|
1082
1285
|
}
|
|
1083
1286
|
)
|
|
1084
1287
|
] }),
|
|
1085
|
-
|
|
1086
|
-
|
|
1288
|
+
l === y && /* @__PURE__ */ e("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ e(
|
|
1289
|
+
Re,
|
|
1087
1290
|
{
|
|
1088
|
-
value:
|
|
1089
|
-
onChange: (
|
|
1090
|
-
availableProperties:
|
|
1291
|
+
value: d,
|
|
1292
|
+
onChange: (k) => p(y, k),
|
|
1293
|
+
availableProperties: t
|
|
1091
1294
|
}
|
|
1092
1295
|
) })
|
|
1093
|
-
] },
|
|
1296
|
+
] }, y)) }),
|
|
1094
1297
|
/* @__PURE__ */ e(
|
|
1095
1298
|
"button",
|
|
1096
1299
|
{
|
|
@@ -1102,75 +1305,75 @@ function ke({ fields: a, onChange: i, availableProperties: p }) {
|
|
|
1102
1305
|
)
|
|
1103
1306
|
] });
|
|
1104
1307
|
}
|
|
1105
|
-
function
|
|
1106
|
-
return Object.entries(a).map(([i,
|
|
1308
|
+
function Ue(a) {
|
|
1309
|
+
return Object.entries(a).map(([i, t]) => ({
|
|
1107
1310
|
key: i,
|
|
1108
|
-
label:
|
|
1109
|
-
visible:
|
|
1311
|
+
label: t.label ?? "",
|
|
1312
|
+
visible: t.visible ?? !0
|
|
1110
1313
|
}));
|
|
1111
1314
|
}
|
|
1112
|
-
function
|
|
1315
|
+
function Ve(a) {
|
|
1113
1316
|
const i = {};
|
|
1114
|
-
for (const
|
|
1115
|
-
i[
|
|
1116
|
-
visible:
|
|
1117
|
-
...
|
|
1317
|
+
for (const t of a)
|
|
1318
|
+
i[t.key] = {
|
|
1319
|
+
visible: t.visible,
|
|
1320
|
+
...t.label ? { label: t.label } : {}
|
|
1118
1321
|
};
|
|
1119
1322
|
return i;
|
|
1120
1323
|
}
|
|
1121
|
-
const
|
|
1122
|
-
function
|
|
1123
|
-
const
|
|
1124
|
-
u([...
|
|
1125
|
-
},
|
|
1126
|
-
u(
|
|
1127
|
-
},
|
|
1128
|
-
u(
|
|
1129
|
-
},
|
|
1130
|
-
const
|
|
1131
|
-
u(
|
|
1132
|
-
},
|
|
1133
|
-
if (
|
|
1134
|
-
const b = [...
|
|
1135
|
-
[b[
|
|
1136
|
-
},
|
|
1137
|
-
if (
|
|
1138
|
-
const b = [...
|
|
1139
|
-
[b[
|
|
1140
|
-
},
|
|
1141
|
-
if (!
|
|
1142
|
-
const
|
|
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) => ({
|
|
1143
1346
|
key: b.name,
|
|
1144
1347
|
label: b.title ?? "",
|
|
1145
1348
|
visible: !0
|
|
1146
1349
|
}));
|
|
1147
|
-
u(
|
|
1350
|
+
u(c);
|
|
1148
1351
|
};
|
|
1149
|
-
return /* @__PURE__ */
|
|
1150
|
-
|
|
1352
|
+
return /* @__PURE__ */ r("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
|
|
1353
|
+
l.length === 0 ? /* @__PURE__ */ r(O, { children: [
|
|
1151
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." }),
|
|
1152
|
-
|
|
1355
|
+
n && /* @__PURE__ */ e(
|
|
1153
1356
|
"button",
|
|
1154
1357
|
{
|
|
1155
1358
|
type: "button",
|
|
1156
|
-
onClick:
|
|
1359
|
+
onClick: k,
|
|
1157
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",
|
|
1158
1361
|
children: "Populate from API metadata"
|
|
1159
1362
|
}
|
|
1160
1363
|
)
|
|
1161
|
-
] }) : /* @__PURE__ */
|
|
1162
|
-
/* @__PURE__ */
|
|
1163
|
-
/* @__PURE__ */ e(
|
|
1164
|
-
/* @__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", {}) }),
|
|
1165
1368
|
/* @__PURE__ */ e("span", { className: "mapui:text-xs mapui:font-medium mapui:text-gray-600", children: "Visible" })
|
|
1166
1369
|
] }),
|
|
1167
|
-
/* @__PURE__ */ e("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-1.5 mapui:p-0", children:
|
|
1168
|
-
/* @__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: [
|
|
1169
1372
|
/* @__PURE__ */ e(
|
|
1170
1373
|
"button",
|
|
1171
1374
|
{
|
|
1172
1375
|
type: "button",
|
|
1173
|
-
onClick: () =>
|
|
1376
|
+
onClick: () => d(b),
|
|
1174
1377
|
disabled: b === 0,
|
|
1175
1378
|
"aria-label": "Move up",
|
|
1176
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",
|
|
@@ -1181,55 +1384,55 @@ function Fe({ value: a, onChange: i, availableProperties: p }) {
|
|
|
1181
1384
|
"button",
|
|
1182
1385
|
{
|
|
1183
1386
|
type: "button",
|
|
1184
|
-
onClick: () =>
|
|
1185
|
-
disabled: b ===
|
|
1387
|
+
onClick: () => y(b),
|
|
1388
|
+
disabled: b === l.length - 1,
|
|
1186
1389
|
"aria-label": "Move down",
|
|
1187
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",
|
|
1188
1391
|
children: "▼"
|
|
1189
1392
|
}
|
|
1190
1393
|
)
|
|
1191
1394
|
] }),
|
|
1192
|
-
/* @__PURE__ */
|
|
1193
|
-
|
|
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(
|
|
1194
1397
|
"select",
|
|
1195
1398
|
{
|
|
1196
|
-
value:
|
|
1197
|
-
onChange: (
|
|
1399
|
+
value: c.key,
|
|
1400
|
+
onChange: (m) => x(b, m.target.value),
|
|
1198
1401
|
"aria-label": "Property key",
|
|
1199
|
-
className:
|
|
1402
|
+
className: z,
|
|
1200
1403
|
children: [
|
|
1201
1404
|
/* @__PURE__ */ e("option", { value: "", children: "Select a property…" }),
|
|
1202
|
-
|
|
1405
|
+
t.map((m) => /* @__PURE__ */ e("option", { value: m.name, children: m.title ?? m.name }, m.name))
|
|
1203
1406
|
]
|
|
1204
1407
|
}
|
|
1205
1408
|
) : /* @__PURE__ */ e(
|
|
1206
1409
|
"input",
|
|
1207
1410
|
{
|
|
1208
1411
|
type: "text",
|
|
1209
|
-
value:
|
|
1210
|
-
onChange: (
|
|
1412
|
+
value: c.key,
|
|
1413
|
+
onChange: (m) => g(b, { key: m.target.value }),
|
|
1211
1414
|
placeholder: "property_name",
|
|
1212
1415
|
"aria-label": "Property key",
|
|
1213
|
-
className:
|
|
1416
|
+
className: z
|
|
1214
1417
|
}
|
|
1215
1418
|
),
|
|
1216
1419
|
/* @__PURE__ */ e(
|
|
1217
1420
|
"input",
|
|
1218
1421
|
{
|
|
1219
1422
|
type: "text",
|
|
1220
|
-
value:
|
|
1221
|
-
onChange: (
|
|
1423
|
+
value: c.label,
|
|
1424
|
+
onChange: (m) => g(b, { label: m.target.value }),
|
|
1222
1425
|
placeholder: "Friendly name",
|
|
1223
1426
|
"aria-label": "Display label",
|
|
1224
|
-
className:
|
|
1427
|
+
className: z
|
|
1225
1428
|
}
|
|
1226
1429
|
),
|
|
1227
1430
|
/* @__PURE__ */ e(
|
|
1228
1431
|
"input",
|
|
1229
1432
|
{
|
|
1230
1433
|
type: "checkbox",
|
|
1231
|
-
checked:
|
|
1232
|
-
onChange: (
|
|
1434
|
+
checked: c.visible,
|
|
1435
|
+
onChange: (m) => g(b, { visible: m.target.checked }),
|
|
1233
1436
|
"aria-label": "Visible",
|
|
1234
1437
|
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
1235
1438
|
}
|
|
@@ -1238,7 +1441,7 @@ function Fe({ value: a, onChange: i, availableProperties: p }) {
|
|
|
1238
1441
|
"button",
|
|
1239
1442
|
{
|
|
1240
1443
|
type: "button",
|
|
1241
|
-
onClick: () =>
|
|
1444
|
+
onClick: () => o(b),
|
|
1242
1445
|
"aria-label": "Remove property",
|
|
1243
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",
|
|
1244
1447
|
children: "Remove"
|
|
@@ -1251,169 +1454,148 @@ function Fe({ value: a, onChange: i, availableProperties: p }) {
|
|
|
1251
1454
|
"button",
|
|
1252
1455
|
{
|
|
1253
1456
|
type: "button",
|
|
1254
|
-
onClick:
|
|
1457
|
+
onClick: p,
|
|
1255
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",
|
|
1256
1459
|
children: "+ Add Property"
|
|
1257
1460
|
}
|
|
1258
1461
|
)
|
|
1259
1462
|
] });
|
|
1260
1463
|
}
|
|
1261
|
-
const
|
|
1262
|
-
function
|
|
1263
|
-
return !!a.$ref &&
|
|
1464
|
+
const he = /geojson\.org\/schema\/(\w+)\.json/;
|
|
1465
|
+
function ze(a) {
|
|
1466
|
+
return !!a.$ref && he.test(a.$ref);
|
|
1264
1467
|
}
|
|
1265
|
-
function
|
|
1266
|
-
const i =
|
|
1468
|
+
function We(a) {
|
|
1469
|
+
const i = he.exec(a);
|
|
1267
1470
|
return i ? i[1] : null;
|
|
1268
1471
|
}
|
|
1269
|
-
function
|
|
1472
|
+
function X(a) {
|
|
1270
1473
|
const i = a.toLowerCase();
|
|
1271
1474
|
return i.includes("polygon") ? "fill" : i.includes("linestring") ? "line" : i.includes("point") ? "circle" : null;
|
|
1272
1475
|
}
|
|
1273
|
-
function
|
|
1476
|
+
function ye(a) {
|
|
1274
1477
|
for (const i of Object.values(a.properties))
|
|
1275
1478
|
if (i.$ref) {
|
|
1276
|
-
const
|
|
1277
|
-
if (
|
|
1479
|
+
const t = We(i.$ref);
|
|
1480
|
+
if (t) return X(t);
|
|
1278
1481
|
}
|
|
1279
1482
|
return null;
|
|
1280
1483
|
}
|
|
1281
|
-
function
|
|
1282
|
-
return Object.entries(a.properties).filter(([, i]) => !
|
|
1484
|
+
function Ye(a) {
|
|
1485
|
+
return Object.entries(a.properties).filter(([, i]) => !ze(i)).map(([i, t]) => ({
|
|
1283
1486
|
name: i,
|
|
1284
|
-
title:
|
|
1285
|
-
type:
|
|
1286
|
-
format:
|
|
1287
|
-
enum:
|
|
1288
|
-
minimum:
|
|
1289
|
-
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
|
|
1290
1493
|
}));
|
|
1291
1494
|
}
|
|
1292
|
-
async function
|
|
1293
|
-
var
|
|
1495
|
+
async function ia(a, i) {
|
|
1496
|
+
var t, l;
|
|
1294
1497
|
try {
|
|
1295
|
-
const
|
|
1498
|
+
const n = await Ne(a, i), u = ye(n);
|
|
1296
1499
|
if (u) return u;
|
|
1297
1500
|
} catch {
|
|
1298
1501
|
}
|
|
1299
1502
|
try {
|
|
1300
|
-
const u = (
|
|
1301
|
-
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);
|
|
1302
1505
|
} catch {
|
|
1303
1506
|
}
|
|
1304
1507
|
return null;
|
|
1305
1508
|
}
|
|
1306
|
-
function
|
|
1509
|
+
function ta(a) {
|
|
1307
1510
|
return a.replace(/_/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (i) => i.toUpperCase());
|
|
1308
1511
|
}
|
|
1309
|
-
const
|
|
1310
|
-
function
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
const
|
|
1315
|
-
return /* @__PURE__ */ t("div", { className: "mapui:rounded mapui:border mapui:border-gray-200", children: [
|
|
1316
|
-
/* @__PURE__ */ t(
|
|
1317
|
-
"button",
|
|
1318
|
-
{
|
|
1319
|
-
type: "button",
|
|
1320
|
-
onClick: () => r((m) => !m),
|
|
1321
|
-
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",
|
|
1322
|
-
children: [
|
|
1323
|
-
/* @__PURE__ */ e("span", { children: a }),
|
|
1324
|
-
/* @__PURE__ */ e("span", { "aria-hidden": "true", children: p ? "▲" : "▼" })
|
|
1325
|
-
]
|
|
1326
|
-
}
|
|
1327
|
-
),
|
|
1328
|
-
p && /* @__PURE__ */ e("div", { className: "mapui:p-3", children: i })
|
|
1329
|
-
] });
|
|
1330
|
-
}
|
|
1331
|
-
function pe({ value: a, onChange: i, availableSources: p }) {
|
|
1332
|
-
var D;
|
|
1333
|
-
const r = (s) => i({ ...a, ...s }), m = X(a);
|
|
1334
|
-
m.current = a;
|
|
1335
|
-
const u = X(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);
|
|
1336
1518
|
u.current = i;
|
|
1337
|
-
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(
|
|
1338
1520
|
null
|
|
1339
1521
|
);
|
|
1340
|
-
return
|
|
1341
|
-
if (!
|
|
1342
|
-
|
|
1522
|
+
return J(() => {
|
|
1523
|
+
if (!y) {
|
|
1524
|
+
m(null);
|
|
1343
1525
|
return;
|
|
1344
1526
|
}
|
|
1345
1527
|
const s = (f) => {
|
|
1346
|
-
if (
|
|
1347
|
-
const
|
|
1348
|
-
u.current({ ...
|
|
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 });
|
|
1349
1531
|
}
|
|
1350
|
-
},
|
|
1351
|
-
if (
|
|
1352
|
-
s(
|
|
1532
|
+
}, S = ye(y);
|
|
1533
|
+
if (S) {
|
|
1534
|
+
s(S);
|
|
1353
1535
|
return;
|
|
1354
1536
|
}
|
|
1355
|
-
if (!
|
|
1356
|
-
|
|
1537
|
+
if (!o || !g) {
|
|
1538
|
+
m(null);
|
|
1357
1539
|
return;
|
|
1358
1540
|
}
|
|
1359
|
-
let
|
|
1360
|
-
return
|
|
1361
|
-
var L,
|
|
1362
|
-
if (
|
|
1363
|
-
const
|
|
1364
|
-
s(typeof
|
|
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);
|
|
1365
1547
|
}).catch(() => {
|
|
1366
|
-
|
|
1548
|
+
A || m(null);
|
|
1367
1549
|
}), () => {
|
|
1368
|
-
|
|
1550
|
+
A = !0;
|
|
1369
1551
|
};
|
|
1370
|
-
}, [
|
|
1371
|
-
|
|
1372
|
-
}, [
|
|
1373
|
-
/* @__PURE__ */
|
|
1374
|
-
/* @__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(
|
|
1375
1557
|
"input",
|
|
1376
1558
|
{
|
|
1377
1559
|
type: "text",
|
|
1378
1560
|
value: a.id,
|
|
1379
|
-
onChange: (s) =>
|
|
1561
|
+
onChange: (s) => l({ id: s.target.value }),
|
|
1380
1562
|
placeholder: "my-layer",
|
|
1381
|
-
className:
|
|
1563
|
+
className: $
|
|
1382
1564
|
}
|
|
1383
1565
|
) }),
|
|
1384
|
-
/* @__PURE__ */ e(
|
|
1566
|
+
/* @__PURE__ */ e(N, { label: "Label", children: /* @__PURE__ */ e(
|
|
1385
1567
|
"input",
|
|
1386
1568
|
{
|
|
1387
1569
|
type: "text",
|
|
1388
1570
|
value: a.label,
|
|
1389
|
-
onChange: (s) =>
|
|
1571
|
+
onChange: (s) => l({ label: s.target.value }),
|
|
1390
1572
|
placeholder: "My Layer",
|
|
1391
|
-
className:
|
|
1573
|
+
className: $
|
|
1392
1574
|
}
|
|
1393
1575
|
) })
|
|
1394
1576
|
] }),
|
|
1395
|
-
/* @__PURE__ */ e(
|
|
1577
|
+
/* @__PURE__ */ e(N, { label: "Source", required: !0, children: /* @__PURE__ */ r(
|
|
1396
1578
|
"select",
|
|
1397
1579
|
{
|
|
1398
1580
|
value: a.sourceId,
|
|
1399
|
-
onChange: (s) =>
|
|
1400
|
-
className:
|
|
1581
|
+
onChange: (s) => l({ sourceId: s.target.value }),
|
|
1582
|
+
className: $,
|
|
1401
1583
|
children: [
|
|
1402
1584
|
/* @__PURE__ */ e("option", { value: "", children: "Select a source…" }),
|
|
1403
|
-
|
|
1585
|
+
t.map((s) => /* @__PURE__ */ e("option", { value: s.id, children: s.label ?? s.id }, s.id))
|
|
1404
1586
|
]
|
|
1405
1587
|
}
|
|
1406
1588
|
) }),
|
|
1407
|
-
/* @__PURE__ */
|
|
1408
|
-
|
|
1589
|
+
/* @__PURE__ */ r(N, { label: "Collection", required: !0, children: [
|
|
1590
|
+
x.length > 0 ? /* @__PURE__ */ r(
|
|
1409
1591
|
"select",
|
|
1410
1592
|
{
|
|
1411
1593
|
value: a.collection,
|
|
1412
|
-
onChange: (s) =>
|
|
1413
|
-
className:
|
|
1594
|
+
onChange: (s) => l({ collection: s.target.value }),
|
|
1595
|
+
className: $,
|
|
1414
1596
|
children: [
|
|
1415
1597
|
/* @__PURE__ */ e("option", { value: "", children: "Select a collection…" }),
|
|
1416
|
-
|
|
1598
|
+
x.map((s) => /* @__PURE__ */ e("option", { value: s.id, children: s.title ?? s.id }, s.id))
|
|
1417
1599
|
]
|
|
1418
1600
|
}
|
|
1419
1601
|
) : /* @__PURE__ */ e(
|
|
@@ -1421,14 +1603,14 @@ function pe({ value: a, onChange: i, availableSources: p }) {
|
|
|
1421
1603
|
{
|
|
1422
1604
|
type: "text",
|
|
1423
1605
|
value: a.collection,
|
|
1424
|
-
onChange: (s) =>
|
|
1425
|
-
placeholder:
|
|
1426
|
-
className:
|
|
1606
|
+
onChange: (s) => l({ collection: s.target.value }),
|
|
1607
|
+
placeholder: d ? "Loading collections…" : "collection-id",
|
|
1608
|
+
className: $
|
|
1427
1609
|
}
|
|
1428
1610
|
),
|
|
1429
|
-
|
|
1611
|
+
k && /* @__PURE__ */ e("span", { className: "mapui:mt-0.5 mapui:block mapui:text-xs mapui:text-gray-400", children: "Loading properties…" })
|
|
1430
1612
|
] }),
|
|
1431
|
-
/* @__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: [
|
|
1432
1614
|
/* @__PURE__ */ e(
|
|
1433
1615
|
"input",
|
|
1434
1616
|
{
|
|
@@ -1436,59 +1618,59 @@ function pe({ value: a, onChange: i, availableSources: p }) {
|
|
|
1436
1618
|
name: `data-mode-${a.id}`,
|
|
1437
1619
|
value: s,
|
|
1438
1620
|
checked: a.dataMode === s,
|
|
1439
|
-
onChange: () =>
|
|
1621
|
+
onChange: () => l({ dataMode: s }),
|
|
1440
1622
|
className: "mapui:accent-blue-600"
|
|
1441
1623
|
}
|
|
1442
1624
|
),
|
|
1443
1625
|
/* @__PURE__ */ e("span", { className: "mapui:text-sm mapui:text-gray-700", children: s })
|
|
1444
1626
|
] }, s)) }) }),
|
|
1445
|
-
/* @__PURE__ */
|
|
1627
|
+
/* @__PURE__ */ r("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
1446
1628
|
/* @__PURE__ */ e(
|
|
1447
1629
|
"input",
|
|
1448
1630
|
{
|
|
1449
1631
|
type: "checkbox",
|
|
1450
1632
|
id: "layer-visible",
|
|
1451
1633
|
checked: a.visible,
|
|
1452
|
-
onChange: (s) =>
|
|
1634
|
+
onChange: (s) => l({ visible: s.target.checked }),
|
|
1453
1635
|
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
1454
1636
|
}
|
|
1455
1637
|
),
|
|
1456
1638
|
/* @__PURE__ */ e("label", { htmlFor: "layer-visible", className: "mapui:text-sm mapui:text-gray-700", children: "Visible by default" })
|
|
1457
1639
|
] }),
|
|
1458
|
-
/* @__PURE__ */ e(
|
|
1459
|
-
|
|
1640
|
+
/* @__PURE__ */ e(q, { title: "Style", children: /* @__PURE__ */ e(
|
|
1641
|
+
Oe,
|
|
1460
1642
|
{
|
|
1461
|
-
value: a.style ??
|
|
1462
|
-
onChange: (s) =>
|
|
1643
|
+
value: a.style ?? _,
|
|
1644
|
+
onChange: (s) => l({ style: s }),
|
|
1463
1645
|
suggestedType: b
|
|
1464
1646
|
}
|
|
1465
1647
|
) }),
|
|
1466
|
-
/* @__PURE__ */ e(
|
|
1467
|
-
|
|
1648
|
+
/* @__PURE__ */ e(q, { title: "Legend", children: /* @__PURE__ */ e(
|
|
1649
|
+
je,
|
|
1468
1650
|
{
|
|
1469
1651
|
value: a.legend,
|
|
1470
|
-
onChange: (s) =>
|
|
1652
|
+
onChange: (s) => l({ legend: s })
|
|
1471
1653
|
}
|
|
1472
1654
|
) }),
|
|
1473
|
-
/* @__PURE__ */ e(
|
|
1474
|
-
|
|
1655
|
+
/* @__PURE__ */ e(q, { title: "Search Fields", children: /* @__PURE__ */ e(
|
|
1656
|
+
qe,
|
|
1475
1657
|
{
|
|
1476
|
-
fields: ((
|
|
1477
|
-
onChange: (s) =>
|
|
1478
|
-
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
|
|
1479
1661
|
}
|
|
1480
1662
|
) }),
|
|
1481
|
-
/* @__PURE__ */ e(
|
|
1482
|
-
|
|
1663
|
+
/* @__PURE__ */ e(q, { title: "Property Display", children: /* @__PURE__ */ e(
|
|
1664
|
+
Ge,
|
|
1483
1665
|
{
|
|
1484
1666
|
value: a.propertyDisplay ?? {},
|
|
1485
|
-
onChange: (s) =>
|
|
1486
|
-
availableProperties:
|
|
1667
|
+
onChange: (s) => l({ propertyDisplay: Object.keys(s).length > 0 ? s : void 0 }),
|
|
1668
|
+
availableProperties: c
|
|
1487
1669
|
}
|
|
1488
1670
|
) })
|
|
1489
1671
|
] });
|
|
1490
1672
|
}
|
|
1491
|
-
const
|
|
1673
|
+
const W = () => ({
|
|
1492
1674
|
id: "",
|
|
1493
1675
|
sourceId: "",
|
|
1494
1676
|
collection: "",
|
|
@@ -1496,47 +1678,47 @@ const z = () => ({
|
|
|
1496
1678
|
visible: !0,
|
|
1497
1679
|
dataMode: "vector-tiles"
|
|
1498
1680
|
});
|
|
1499
|
-
function
|
|
1500
|
-
const [
|
|
1501
|
-
i([...a,
|
|
1502
|
-
},
|
|
1503
|
-
i(a.map((v) => v.id ===
|
|
1504
|
-
}, s = (
|
|
1505
|
-
i(a.filter((v) => v.id !==
|
|
1506
|
-
},
|
|
1507
|
-
if (
|
|
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;
|
|
1508
1690
|
const v = [...a];
|
|
1509
|
-
[v[
|
|
1510
|
-
},
|
|
1511
|
-
if (
|
|
1691
|
+
[v[h - 1], v[h]] = [v[h], v[h - 1]], i(v);
|
|
1692
|
+
}, A = (h) => {
|
|
1693
|
+
if (h === a.length - 1) return;
|
|
1512
1694
|
const v = [...a];
|
|
1513
|
-
[v[
|
|
1514
|
-
}, f = (
|
|
1515
|
-
|
|
1516
|
-
},
|
|
1517
|
-
|
|
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);
|
|
1518
1700
|
}, L = () => {
|
|
1519
1701
|
b(null);
|
|
1520
|
-
},
|
|
1521
|
-
|
|
1522
|
-
const
|
|
1523
|
-
if (
|
|
1524
|
-
const
|
|
1525
|
-
if (
|
|
1526
|
-
const
|
|
1527
|
-
|
|
1528
|
-
},
|
|
1529
|
-
|
|
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);
|
|
1530
1712
|
};
|
|
1531
|
-
return /* @__PURE__ */
|
|
1532
|
-
/* @__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: [
|
|
1533
1715
|
/* @__PURE__ */ e("h3", { className: "mapui:m-0 mapui:text-sm mapui:font-semibold mapui:text-gray-700", children: "Layers" }),
|
|
1534
1716
|
/* @__PURE__ */ e(
|
|
1535
1717
|
"button",
|
|
1536
1718
|
{
|
|
1537
1719
|
type: "button",
|
|
1538
1720
|
onClick: () => {
|
|
1539
|
-
|
|
1721
|
+
p(!0), g(W());
|
|
1540
1722
|
},
|
|
1541
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",
|
|
1542
1724
|
children: "+ Add Layer"
|
|
@@ -1544,32 +1726,32 @@ function Ve({ layers: a, onChange: i, availableSources: p }) {
|
|
|
1544
1726
|
)
|
|
1545
1727
|
] }),
|
|
1546
1728
|
a.length === 0 && !u && /* @__PURE__ */ e("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No layers configured." }),
|
|
1547
|
-
/* @__PURE__ */ e("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: a.map((
|
|
1548
|
-
var
|
|
1549
|
-
const
|
|
1550
|
-
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(
|
|
1551
1733
|
"li",
|
|
1552
1734
|
{
|
|
1553
|
-
draggable:
|
|
1554
|
-
onDragStart:
|
|
1555
|
-
onDragOver: (
|
|
1735
|
+
draggable: !B,
|
|
1736
|
+
onDragStart: B ? void 0 : (R) => f(R, h.id),
|
|
1737
|
+
onDragOver: (R) => T(R, h.id),
|
|
1556
1738
|
onDragLeave: L,
|
|
1557
|
-
onDrop: (
|
|
1558
|
-
onDragEnd:
|
|
1739
|
+
onDrop: (R) => D(R, h.id),
|
|
1740
|
+
onDragEnd: xe,
|
|
1559
1741
|
className: [
|
|
1560
1742
|
"mapui:rounded-lg mapui:border mapui:bg-white mapui:transition-colors",
|
|
1561
|
-
|
|
1562
|
-
|
|
1743
|
+
j ? "mapui:border-blue-400 mapui:bg-blue-50" : "mapui:border-gray-200",
|
|
1744
|
+
M ? "mapui:opacity-50" : "mapui:opacity-100"
|
|
1563
1745
|
].join(" "),
|
|
1564
1746
|
children: [
|
|
1565
|
-
/* @__PURE__ */
|
|
1566
|
-
/* @__PURE__ */
|
|
1567
|
-
/* @__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: [
|
|
1568
1750
|
/* @__PURE__ */ e(
|
|
1569
1751
|
"button",
|
|
1570
1752
|
{
|
|
1571
1753
|
type: "button",
|
|
1572
|
-
onClick: () =>
|
|
1754
|
+
onClick: () => S(v),
|
|
1573
1755
|
disabled: v === 0,
|
|
1574
1756
|
"aria-label": "Move layer up",
|
|
1575
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",
|
|
@@ -1580,7 +1762,7 @@ function Ve({ layers: a, onChange: i, availableSources: p }) {
|
|
|
1580
1762
|
"button",
|
|
1581
1763
|
{
|
|
1582
1764
|
type: "button",
|
|
1583
|
-
onClick: () =>
|
|
1765
|
+
onClick: () => A(v),
|
|
1584
1766
|
disabled: v === a.length - 1,
|
|
1585
1767
|
"aria-label": "Move layer down",
|
|
1586
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",
|
|
@@ -1596,75 +1778,75 @@ function Ve({ layers: a, onChange: i, availableSources: p }) {
|
|
|
1596
1778
|
children: "⠿"
|
|
1597
1779
|
}
|
|
1598
1780
|
),
|
|
1599
|
-
/* @__PURE__ */
|
|
1600
|
-
/* @__PURE__ */ e("span", { className: "mapui:text-sm mapui:font-medium mapui:text-gray-800", children:
|
|
1601
|
-
/* @__PURE__ */ e("span", { className: "mapui:font-mono mapui:text-xs mapui:text-gray-500", children:
|
|
1602
|
-
/* @__PURE__ */
|
|
1603
|
-
/* @__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:
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
(((
|
|
1607
|
-
|
|
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,
|
|
1608
1790
|
" search fields"
|
|
1609
1791
|
] }),
|
|
1610
|
-
(((
|
|
1611
|
-
|
|
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,
|
|
1612
1794
|
" legend entries"
|
|
1613
1795
|
] })
|
|
1614
1796
|
] })
|
|
1615
1797
|
] })
|
|
1616
1798
|
] }),
|
|
1617
|
-
/* @__PURE__ */
|
|
1799
|
+
/* @__PURE__ */ r("div", { className: "mapui:flex mapui:shrink-0 mapui:gap-1", children: [
|
|
1618
1800
|
/* @__PURE__ */ e(
|
|
1619
1801
|
"button",
|
|
1620
1802
|
{
|
|
1621
1803
|
type: "button",
|
|
1622
|
-
onClick: () =>
|
|
1804
|
+
onClick: () => n(l === h.id ? null : h.id),
|
|
1623
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",
|
|
1624
|
-
children:
|
|
1806
|
+
children: l === h.id ? "Close" : "Edit"
|
|
1625
1807
|
}
|
|
1626
1808
|
),
|
|
1627
1809
|
/* @__PURE__ */ e(
|
|
1628
1810
|
"button",
|
|
1629
1811
|
{
|
|
1630
1812
|
type: "button",
|
|
1631
|
-
onClick: () => h
|
|
1813
|
+
onClick: () => d(h.id),
|
|
1632
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",
|
|
1633
1815
|
children: "Remove"
|
|
1634
1816
|
}
|
|
1635
1817
|
)
|
|
1636
1818
|
] })
|
|
1637
1819
|
] }),
|
|
1638
|
-
|
|
1639
|
-
|
|
1820
|
+
l === h.id && /* @__PURE__ */ e("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ e(
|
|
1821
|
+
ne,
|
|
1640
1822
|
{
|
|
1641
|
-
value:
|
|
1642
|
-
onChange:
|
|
1643
|
-
availableSources:
|
|
1823
|
+
value: h,
|
|
1824
|
+
onChange: C,
|
|
1825
|
+
availableSources: t
|
|
1644
1826
|
}
|
|
1645
1827
|
) })
|
|
1646
1828
|
]
|
|
1647
1829
|
},
|
|
1648
|
-
|
|
1830
|
+
h.id
|
|
1649
1831
|
);
|
|
1650
1832
|
}) }),
|
|
1651
|
-
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: [
|
|
1652
1834
|
/* @__PURE__ */ e("p", { className: "mapui:m-0 mapui:mb-3 mapui:text-xs mapui:font-semibold mapui:text-blue-700", children: "New Layer" }),
|
|
1653
1835
|
/* @__PURE__ */ e(
|
|
1654
|
-
|
|
1836
|
+
ne,
|
|
1655
1837
|
{
|
|
1656
|
-
value:
|
|
1657
|
-
onChange:
|
|
1658
|
-
availableSources:
|
|
1838
|
+
value: o,
|
|
1839
|
+
onChange: g,
|
|
1840
|
+
availableSources: t
|
|
1659
1841
|
}
|
|
1660
1842
|
),
|
|
1661
|
-
/* @__PURE__ */
|
|
1843
|
+
/* @__PURE__ */ r("div", { className: "mapui:mt-3 mapui:flex mapui:gap-2", children: [
|
|
1662
1844
|
/* @__PURE__ */ e(
|
|
1663
1845
|
"button",
|
|
1664
1846
|
{
|
|
1665
1847
|
type: "button",
|
|
1666
|
-
onClick:
|
|
1667
|
-
disabled: !
|
|
1848
|
+
onClick: m,
|
|
1849
|
+
disabled: !o.id || !o.sourceId || !o.collection,
|
|
1668
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",
|
|
1669
1851
|
children: "Save"
|
|
1670
1852
|
}
|
|
@@ -1673,7 +1855,7 @@ function Ve({ layers: a, onChange: i, availableSources: p }) {
|
|
|
1673
1855
|
"button",
|
|
1674
1856
|
{
|
|
1675
1857
|
type: "button",
|
|
1676
|
-
onClick: () =>
|
|
1858
|
+
onClick: () => p(!1),
|
|
1677
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",
|
|
1678
1860
|
children: "Cancel"
|
|
1679
1861
|
}
|
|
@@ -1683,58 +1865,58 @@ function Ve({ layers: a, onChange: i, availableSources: p }) {
|
|
|
1683
1865
|
/* @__PURE__ */ e(
|
|
1684
1866
|
H,
|
|
1685
1867
|
{
|
|
1686
|
-
open:
|
|
1868
|
+
open: x !== null,
|
|
1687
1869
|
title: "Remove Layer",
|
|
1688
1870
|
description: "Are you sure you want to remove this layer from the configuration?",
|
|
1689
|
-
onConfirm: () =>
|
|
1690
|
-
onCancel: () =>
|
|
1871
|
+
onConfirm: () => x && s(x),
|
|
1872
|
+
onCancel: () => d(null)
|
|
1691
1873
|
}
|
|
1692
1874
|
)
|
|
1693
1875
|
] });
|
|
1694
1876
|
}
|
|
1695
|
-
const
|
|
1696
|
-
function
|
|
1697
|
-
const
|
|
1698
|
-
return /* @__PURE__ */
|
|
1699
|
-
/* @__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(
|
|
1700
1882
|
"input",
|
|
1701
1883
|
{
|
|
1702
1884
|
type: "text",
|
|
1703
1885
|
value: a.id,
|
|
1704
|
-
onChange: (
|
|
1886
|
+
onChange: (l) => t({ id: l.target.value }),
|
|
1705
1887
|
placeholder: "osm",
|
|
1706
|
-
className:
|
|
1888
|
+
className: V
|
|
1707
1889
|
}
|
|
1708
1890
|
) }),
|
|
1709
|
-
/* @__PURE__ */ e(
|
|
1891
|
+
/* @__PURE__ */ e(N, { label: "Label", children: /* @__PURE__ */ e(
|
|
1710
1892
|
"input",
|
|
1711
1893
|
{
|
|
1712
1894
|
type: "text",
|
|
1713
1895
|
value: a.label,
|
|
1714
|
-
onChange: (
|
|
1896
|
+
onChange: (l) => t({ label: l.target.value }),
|
|
1715
1897
|
placeholder: "OpenStreetMap",
|
|
1716
|
-
className:
|
|
1898
|
+
className: V
|
|
1717
1899
|
}
|
|
1718
1900
|
) }),
|
|
1719
|
-
/* @__PURE__ */ e(
|
|
1901
|
+
/* @__PURE__ */ e(N, { label: "Style URL", required: !0, children: /* @__PURE__ */ e(
|
|
1720
1902
|
"input",
|
|
1721
1903
|
{
|
|
1722
1904
|
type: "url",
|
|
1723
1905
|
value: a.url,
|
|
1724
|
-
onChange: (
|
|
1906
|
+
onChange: (l) => t({ url: l.target.value }),
|
|
1725
1907
|
placeholder: "https://example.com/style.json",
|
|
1726
|
-
className:
|
|
1908
|
+
className: V
|
|
1727
1909
|
}
|
|
1728
1910
|
) }),
|
|
1729
|
-
/* @__PURE__ */
|
|
1911
|
+
/* @__PURE__ */ r(N, { label: "Thumbnail URL (optional)", children: [
|
|
1730
1912
|
/* @__PURE__ */ e(
|
|
1731
1913
|
"input",
|
|
1732
1914
|
{
|
|
1733
1915
|
type: "url",
|
|
1734
1916
|
value: a.thumbnail ?? "",
|
|
1735
|
-
onChange: (
|
|
1917
|
+
onChange: (l) => t({ thumbnail: l.target.value || void 0 }),
|
|
1736
1918
|
placeholder: "https://example.com/thumbnail.png",
|
|
1737
|
-
className:
|
|
1919
|
+
className: V
|
|
1738
1920
|
}
|
|
1739
1921
|
),
|
|
1740
1922
|
a.thumbnail && /* @__PURE__ */ e(
|
|
@@ -1748,85 +1930,85 @@ function re({ value: a, onChange: i }) {
|
|
|
1748
1930
|
] })
|
|
1749
1931
|
] });
|
|
1750
1932
|
}
|
|
1751
|
-
const
|
|
1752
|
-
function
|
|
1753
|
-
const [
|
|
1754
|
-
i(a.map((b) => b.id ===
|
|
1755
|
-
},
|
|
1756
|
-
i([...a,
|
|
1757
|
-
},
|
|
1758
|
-
i(a.filter((b) => b.id !==
|
|
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);
|
|
1759
1941
|
};
|
|
1760
|
-
return /* @__PURE__ */
|
|
1761
|
-
/* @__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: [
|
|
1762
1944
|
/* @__PURE__ */ e("h3", { className: "mapui:m-0 mapui:text-sm mapui:font-semibold mapui:text-gray-700", children: "Basemaps" }),
|
|
1763
1945
|
/* @__PURE__ */ e(
|
|
1764
1946
|
"button",
|
|
1765
1947
|
{
|
|
1766
1948
|
type: "button",
|
|
1767
1949
|
onClick: () => {
|
|
1768
|
-
u(!0),
|
|
1950
|
+
u(!0), o(Y());
|
|
1769
1951
|
},
|
|
1770
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",
|
|
1771
1953
|
children: "+ Add Basemap"
|
|
1772
1954
|
}
|
|
1773
1955
|
)
|
|
1774
1956
|
] }),
|
|
1775
|
-
a.length === 0 && !
|
|
1776
|
-
/* @__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(
|
|
1777
1959
|
"li",
|
|
1778
1960
|
{
|
|
1779
1961
|
className: "mapui:rounded-lg mapui:border mapui:border-gray-200 mapui:bg-white",
|
|
1780
1962
|
children: [
|
|
1781
|
-
/* @__PURE__ */
|
|
1782
|
-
|
|
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(
|
|
1783
1965
|
"img",
|
|
1784
1966
|
{
|
|
1785
|
-
src:
|
|
1967
|
+
src: c.thumbnail,
|
|
1786
1968
|
alt: "",
|
|
1787
1969
|
className: "mapui:h-10 mapui:w-14 mapui:shrink-0 mapui:rounded mapui:object-cover"
|
|
1788
1970
|
}
|
|
1789
1971
|
),
|
|
1790
|
-
/* @__PURE__ */
|
|
1791
|
-
/* @__PURE__ */ e("span", { className: "mapui:block mapui:text-sm mapui:font-medium mapui:text-gray-800", children:
|
|
1792
|
-
/* @__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 })
|
|
1793
1975
|
] }),
|
|
1794
|
-
/* @__PURE__ */
|
|
1976
|
+
/* @__PURE__ */ r("div", { className: "mapui:flex mapui:shrink-0 mapui:gap-1", children: [
|
|
1795
1977
|
/* @__PURE__ */ e(
|
|
1796
1978
|
"button",
|
|
1797
1979
|
{
|
|
1798
1980
|
type: "button",
|
|
1799
|
-
onClick: () =>
|
|
1981
|
+
onClick: () => l(t === c.id ? null : c.id),
|
|
1800
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",
|
|
1801
|
-
children:
|
|
1983
|
+
children: t === c.id ? "Close" : "Edit"
|
|
1802
1984
|
}
|
|
1803
1985
|
),
|
|
1804
1986
|
/* @__PURE__ */ e(
|
|
1805
1987
|
"button",
|
|
1806
1988
|
{
|
|
1807
1989
|
type: "button",
|
|
1808
|
-
onClick: () =>
|
|
1990
|
+
onClick: () => x(c.id),
|
|
1809
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",
|
|
1810
1992
|
children: "Remove"
|
|
1811
1993
|
}
|
|
1812
1994
|
)
|
|
1813
1995
|
] })
|
|
1814
1996
|
] }),
|
|
1815
|
-
|
|
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 }) })
|
|
1816
1998
|
]
|
|
1817
1999
|
},
|
|
1818
|
-
|
|
2000
|
+
c.id
|
|
1819
2001
|
)) }),
|
|
1820
|
-
|
|
2002
|
+
n && /* @__PURE__ */ r("div", { className: "mapui:rounded-lg mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
|
|
1821
2003
|
/* @__PURE__ */ e("p", { className: "mapui:m-0 mapui:mb-3 mapui:text-xs mapui:font-semibold mapui:text-blue-700", children: "New Basemap" }),
|
|
1822
|
-
/* @__PURE__ */ e(
|
|
1823
|
-
/* @__PURE__ */
|
|
2004
|
+
/* @__PURE__ */ e(oe, { value: p, onChange: o }),
|
|
2005
|
+
/* @__PURE__ */ r("div", { className: "mapui:mt-3 mapui:flex mapui:gap-2", children: [
|
|
1824
2006
|
/* @__PURE__ */ e(
|
|
1825
2007
|
"button",
|
|
1826
2008
|
{
|
|
1827
2009
|
type: "button",
|
|
1828
|
-
onClick:
|
|
1829
|
-
disabled: !
|
|
2010
|
+
onClick: y,
|
|
2011
|
+
disabled: !p.id || !p.url,
|
|
1830
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",
|
|
1831
2013
|
children: "Save"
|
|
1832
2014
|
}
|
|
@@ -1845,16 +2027,16 @@ function Ge({ basemaps: a, onChange: i }) {
|
|
|
1845
2027
|
/* @__PURE__ */ e(
|
|
1846
2028
|
H,
|
|
1847
2029
|
{
|
|
1848
|
-
open:
|
|
2030
|
+
open: g !== null,
|
|
1849
2031
|
title: "Remove Basemap",
|
|
1850
2032
|
description: "Are you sure you want to remove this basemap from the configuration?",
|
|
1851
|
-
onConfirm: () =>
|
|
1852
|
-
onCancel: () =>
|
|
2033
|
+
onConfirm: () => g && k(g),
|
|
2034
|
+
onCancel: () => x(null)
|
|
1853
2035
|
}
|
|
1854
2036
|
)
|
|
1855
2037
|
] });
|
|
1856
2038
|
}
|
|
1857
|
-
const
|
|
2039
|
+
const Je = [
|
|
1858
2040
|
{ key: "showLayerPanel", label: "Layer Panel", description: "Toggle layer visibility" },
|
|
1859
2041
|
{ key: "showLegend", label: "Legend", description: "Map legend" },
|
|
1860
2042
|
{ key: "showBasemapSwitcher", label: "Basemap Switcher", description: "Switch basemap styles" },
|
|
@@ -1864,32 +2046,32 @@ const Me = [
|
|
|
1864
2046
|
{ key: "showFeatureTooltip", label: "Feature Tooltip", description: "Hover tooltip on features" },
|
|
1865
2047
|
{ key: "showExportButton", label: "Export Button", description: "Export data as CSV" }
|
|
1866
2048
|
];
|
|
1867
|
-
function
|
|
1868
|
-
const
|
|
1869
|
-
i({ ...a, [
|
|
2049
|
+
function pa({ value: a, onChange: i }) {
|
|
2050
|
+
const t = (l, n) => {
|
|
2051
|
+
i({ ...a, [l]: n });
|
|
1870
2052
|
};
|
|
1871
|
-
return /* @__PURE__ */
|
|
2053
|
+
return /* @__PURE__ */ r("div", { className: "mapui:flex mapui:flex-col mapui:gap-1", children: [
|
|
1872
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." }),
|
|
1873
|
-
/* @__PURE__ */ e("div", { className: "mapui:grid mapui:grid-cols-1 mapui:gap-2 sm:mapui:grid-cols-2", children:
|
|
1874
|
-
const
|
|
1875
|
-
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(
|
|
1876
2058
|
"label",
|
|
1877
2059
|
{
|
|
1878
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",
|
|
1879
2061
|
children: [
|
|
1880
|
-
/* @__PURE__ */
|
|
1881
|
-
/* @__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 }),
|
|
1882
2064
|
/* @__PURE__ */ e("span", { className: "mapui:text-xs mapui:text-gray-500", children: u })
|
|
1883
2065
|
] }),
|
|
1884
|
-
/* @__PURE__ */
|
|
2066
|
+
/* @__PURE__ */ r("div", { className: "mapui:relative mapui:flex mapui:shrink-0 mapui:items-center", children: [
|
|
1885
2067
|
/* @__PURE__ */ e(
|
|
1886
2068
|
"input",
|
|
1887
2069
|
{
|
|
1888
2070
|
type: "checkbox",
|
|
1889
|
-
checked:
|
|
1890
|
-
onChange: (
|
|
2071
|
+
checked: p,
|
|
2072
|
+
onChange: (o) => t(l, o.target.checked),
|
|
1891
2073
|
className: "mapui:sr-only",
|
|
1892
|
-
"aria-label":
|
|
2074
|
+
"aria-label": n
|
|
1893
2075
|
}
|
|
1894
2076
|
),
|
|
1895
2077
|
/* @__PURE__ */ e(
|
|
@@ -1897,14 +2079,14 @@ function _e({ value: a, onChange: i }) {
|
|
|
1897
2079
|
{
|
|
1898
2080
|
className: [
|
|
1899
2081
|
"mapui:relative mapui:h-5 mapui:w-9 mapui:rounded-full mapui:transition-colors",
|
|
1900
|
-
|
|
2082
|
+
p ? "mapui:bg-blue-600" : "mapui:bg-gray-300"
|
|
1901
2083
|
].join(" "),
|
|
1902
2084
|
children: /* @__PURE__ */ e(
|
|
1903
2085
|
"div",
|
|
1904
2086
|
{
|
|
1905
2087
|
className: [
|
|
1906
2088
|
"mapui:absolute mapui:top-0.5 mapui:h-4 mapui:w-4 mapui:rounded-full mapui:bg-white mapui:shadow mapui:transition-transform",
|
|
1907
|
-
|
|
2089
|
+
p ? "mapui:translate-x-4" : "mapui:translate-x-0.5"
|
|
1908
2090
|
].join(" ")
|
|
1909
2091
|
}
|
|
1910
2092
|
)
|
|
@@ -1913,53 +2095,53 @@ function _e({ value: a, onChange: i }) {
|
|
|
1913
2095
|
] })
|
|
1914
2096
|
]
|
|
1915
2097
|
},
|
|
1916
|
-
|
|
2098
|
+
l
|
|
1917
2099
|
);
|
|
1918
2100
|
}) })
|
|
1919
2101
|
] });
|
|
1920
2102
|
}
|
|
1921
|
-
const
|
|
2103
|
+
const fe = [
|
|
1922
2104
|
{ key: "latitude", label: "Latitude", min: -90, max: 90, step: 1e-6, placeholder: "0" },
|
|
1923
2105
|
{ key: "longitude", label: "Longitude", min: -180, max: 180, step: 1e-6, placeholder: "0" },
|
|
1924
2106
|
{ key: "zoom", label: "Zoom", min: 0, max: 24, step: 0.1, placeholder: "2" },
|
|
1925
2107
|
{ key: "pitch", label: "Pitch (°)", min: 0, max: 85, step: 1, placeholder: "0" },
|
|
1926
2108
|
{ key: "bearing", label: "Bearing (°)", min: -180, max: 180, step: 1, placeholder: "0" }
|
|
1927
2109
|
];
|
|
1928
|
-
function
|
|
1929
|
-
const
|
|
1930
|
-
if (
|
|
2110
|
+
function _e(a, i) {
|
|
2111
|
+
const t = fe.find((l) => l.key === a);
|
|
2112
|
+
if (t) {
|
|
1931
2113
|
if (isNaN(i)) return "Must be a number";
|
|
1932
|
-
if (i <
|
|
1933
|
-
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}`;
|
|
1934
2116
|
}
|
|
1935
2117
|
}
|
|
1936
|
-
const
|
|
1937
|
-
function
|
|
1938
|
-
const
|
|
1939
|
-
const u = parseFloat(
|
|
1940
|
-
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 });
|
|
1941
2123
|
};
|
|
1942
|
-
return /* @__PURE__ */ e("div", { className: "mapui:grid mapui:grid-cols-2 mapui:gap-3", children:
|
|
1943
|
-
const
|
|
1944
|
-
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(
|
|
1945
2127
|
"input",
|
|
1946
2128
|
{
|
|
1947
2129
|
type: "number",
|
|
1948
2130
|
min: u,
|
|
1949
|
-
max:
|
|
1950
|
-
step:
|
|
1951
|
-
value: a[
|
|
1952
|
-
placeholder:
|
|
1953
|
-
onChange: (
|
|
1954
|
-
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" : ""}`
|
|
1955
2137
|
}
|
|
1956
|
-
) },
|
|
2138
|
+
) }, l);
|
|
1957
2139
|
}) });
|
|
1958
2140
|
}
|
|
1959
|
-
function
|
|
1960
|
-
const i =
|
|
1961
|
-
return /* @__PURE__ */
|
|
1962
|
-
/* @__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: [
|
|
1963
2145
|
/* @__PURE__ */ e(
|
|
1964
2146
|
"span",
|
|
1965
2147
|
{
|
|
@@ -1972,120 +2154,126 @@ function ze({ config: a }) {
|
|
|
1972
2154
|
),
|
|
1973
2155
|
/* @__PURE__ */ e("span", { className: "mapui:text-xs mapui:text-gray-500", children: "MapConfig validation" })
|
|
1974
2156
|
] }),
|
|
1975
|
-
!i.success && /* @__PURE__ */
|
|
2157
|
+
!i.success && /* @__PURE__ */ r("div", { className: "mapui:rounded mapui:bg-red-50 mapui:p-3", children: [
|
|
1976
2158
|
/* @__PURE__ */ e("p", { className: "mapui:m-0 mapui:mb-1 mapui:text-xs mapui:font-semibold mapui:text-red-700", children: "Validation Errors" }),
|
|
1977
|
-
/* @__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((
|
|
1978
|
-
/* @__PURE__ */ e("span", { className: "mapui:font-mono mapui:text-xs mapui:text-red-600", children:
|
|
1979
|
-
/* @__PURE__ */ e("span", { className: "mapui:text-xs mapui:text-red-800", children:
|
|
1980
|
-
] },
|
|
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)) })
|
|
1981
2163
|
] }),
|
|
1982
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) }) })
|
|
1983
2165
|
] });
|
|
1984
2166
|
}
|
|
1985
2167
|
export {
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
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,
|
|
1996
2179
|
H as ConfirmDialog,
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
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
|
-
|
|
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
|
|
2091
2279
|
};
|