@ogc-maps/storybook-components 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Legend-B6uIqOSw.js +239 -0
- package/dist/components/LayerEditor/LayerEditor.d.ts.map +1 -1
- package/dist/components/Legend/Legend.d.ts +2 -1
- package/dist/components/Legend/Legend.d.ts.map +1 -1
- package/dist/components/Legend/index.js +1 -1
- package/dist/components/LegendEditor/LegendEditor.d.ts +3 -2
- package/dist/components/LegendEditor/LegendEditor.d.ts.map +1 -1
- package/dist/components/StyleEditor/DataDrivenColorEditor.d.ts +9 -0
- package/dist/components/StyleEditor/DataDrivenColorEditor.d.ts.map +1 -0
- package/dist/components/StyleEditor/PropertyField.d.ts +4 -1
- package/dist/components/StyleEditor/PropertyField.d.ts.map +1 -1
- package/dist/components/StyleEditor/PropertyGroup.d.ts +4 -1
- package/dist/components/StyleEditor/PropertyGroup.d.ts.map +1 -1
- package/dist/components/StyleEditor/StyleEditor.d.ts +5 -2
- package/dist/components/StyleEditor/StyleEditor.d.ts.map +1 -1
- package/dist/components/StyleEditor/StylePreview.d.ts.map +1 -1
- package/dist/components/StyleEditor/index.d.ts +2 -0
- package/dist/components/StyleEditor/index.d.ts.map +1 -1
- package/dist/components/UIConfigEditor/UIConfigEditor.d.ts.map +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/{index-B2DIcC-4.js → index-B4i0zJXf.js} +330 -326
- package/dist/main.js +1803 -1242
- package/dist/schemas/config.d.ts +353 -288
- package/dist/schemas/config.d.ts.map +1 -1
- package/dist/schemas/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/index.js +1 -1
- package/dist/utils/__tests__/expressionColors.test.d.ts +2 -0
- package/dist/utils/__tests__/expressionColors.test.d.ts.map +1 -0
- package/dist/utils/colorPalettes.d.ts +5 -0
- package/dist/utils/colorPalettes.d.ts.map +1 -0
- package/dist/utils/expressionColors.d.ts +20 -0
- package/dist/utils/expressionColors.d.ts.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/queryableHelpers.d.ts +17 -0
- package/dist/utils/queryableHelpers.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/Legend-TTWWpWDT.js +0 -97
package/dist/main.js
CHANGED
|
@@ -1,82 +1,82 @@
|
|
|
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 l, jsx as
|
|
11
|
-
import { useId as
|
|
12
|
-
import { LuInfo as
|
|
13
|
-
import { J as
|
|
14
|
-
import { a as
|
|
15
|
-
import { s as
|
|
16
|
-
import { B as
|
|
17
|
-
import './style.css';function
|
|
18
|
-
const
|
|
1
|
+
import { B as et } from "./BasemapSwitcher-BW7lyZ2Y.js";
|
|
2
|
+
import { C as tt } from "./CollapsibleControl-VFUTWb_5.js";
|
|
3
|
+
import { C as rt, f as lt, a as nt } from "./CoordinateDisplay-PxPmVjpm.js";
|
|
4
|
+
import { E as ot } from "./ExportButton-CLsWoW4m.js";
|
|
5
|
+
import { F as mt } from "./FeatureDetailPanel-CkFpdEKW.js";
|
|
6
|
+
import { F as ct } from "./FeatureTooltip-Db1LgLQV.js";
|
|
7
|
+
import { L as ht } from "./LayerPanel-SCdJ8948.js";
|
|
8
|
+
import { L as bt } from "./Legend-B6uIqOSw.js";
|
|
9
|
+
import { S as ft } from "./SearchPanel-DCY01Wa-.js";
|
|
10
|
+
import { jsxs as l, jsx as a, Fragment as B } from "react/jsx-runtime";
|
|
11
|
+
import { useId as Ee, useState as L, useRef as ue, useMemo as Pe, useCallback as ze, useEffect as X } from "react";
|
|
12
|
+
import { LuInfo as Ve } from "react-icons/lu";
|
|
13
|
+
import { J as Fe, j as Me, i as se, L as _e, g as Ye } from "./cql2-onoyCbps.js";
|
|
14
|
+
import { a as wt, b as vt, M as Nt, e as kt, N as Ct, f as St, c as Dt, d as Tt, h as Lt, O as It, P as At, k as Et, l as Pt, m as Ft, n as Mt, o as Ot, p as jt, q as $t, r as Rt, s as Bt, t as qt, u as Ut, v as Wt, w as Gt, x as zt, y as Vt, z as _t, A as Yt, Q as Xt, B as Ht, C as Jt, D as Kt, E as Qt, F as Zt, G as ei, H as ai, I as ti, K as ii } from "./cql2-onoyCbps.js";
|
|
15
|
+
import { s as Xe } from "./index-B4i0zJXf.js";
|
|
16
|
+
import { B as li, C as ni, a as pi, b as oi, D as ui, F as mi, c as si, d as ci, e as di, L as hi, f as gi, g as bi, h as yi, i as fi, j as xi, M as wi, N as vi, O as Ni, P as ki, k as Ci, S as Si, l as Di, m as Ti, n as Li, o as Ii, p as Ai, q as Ei, r as Pi, T as Fi, U as Mi, V as Oi, v as ji } from "./index-B4i0zJXf.js";
|
|
17
|
+
import './style.css';function He({ text: e, id: t }) {
|
|
18
|
+
const i = Ee(), r = t ?? i;
|
|
19
19
|
return /* @__PURE__ */ l("span", { className: "mapui:relative mapui:inline-flex mapui:group", children: [
|
|
20
|
-
/* @__PURE__ */
|
|
20
|
+
/* @__PURE__ */ a(
|
|
21
21
|
"span",
|
|
22
22
|
{
|
|
23
23
|
tabIndex: 0,
|
|
24
24
|
"aria-label": "Info",
|
|
25
|
-
"aria-describedby":
|
|
25
|
+
"aria-describedby": r,
|
|
26
26
|
className: "mapui:inline-flex mapui:items-center mapui:text-gray-400 mapui:cursor-default hover:mapui:text-gray-600 focus:mapui:text-gray-600 focus:mapui:outline-none",
|
|
27
|
-
children: /* @__PURE__ */
|
|
27
|
+
children: /* @__PURE__ */ a(Ve, { className: "mapui:h-3.5 mapui:w-3.5" })
|
|
28
28
|
}
|
|
29
29
|
),
|
|
30
30
|
/* @__PURE__ */ l(
|
|
31
31
|
"span",
|
|
32
32
|
{
|
|
33
|
-
id:
|
|
33
|
+
id: r,
|
|
34
34
|
role: "tooltip",
|
|
35
35
|
className: "mapui:pointer-events-none mapui:absolute mapui:bottom-full mapui:left-1/2 mapui:-translate-x-1/2 mapui:mb-1.5 mapui:w-48 mapui:rounded mapui:bg-gray-900 mapui:px-2 mapui:py-1.5 mapui:text-xs mapui:text-white mapui:shadow-lg mapui:opacity-0 mapui:group-hover:opacity-100 mapui:group-focus-within:opacity-100 mapui:transition-opacity mapui:z-50",
|
|
36
36
|
children: [
|
|
37
|
-
|
|
38
|
-
/* @__PURE__ */
|
|
37
|
+
e,
|
|
38
|
+
/* @__PURE__ */ a("span", { className: "mapui:absolute mapui:top-full mapui:left-1/2 mapui:-translate-x-1/2 mapui:border-4 mapui:border-transparent mapui:border-t-gray-900" })
|
|
39
39
|
]
|
|
40
40
|
}
|
|
41
41
|
)
|
|
42
42
|
] });
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function S({ label: e, error: t, required: i, description: r, htmlFor: n, children: o }) {
|
|
45
45
|
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-1", children: [
|
|
46
46
|
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-1", children: [
|
|
47
|
-
/* @__PURE__ */ l("label", { htmlFor:
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
/* @__PURE__ */ l("label", { htmlFor: n, className: "mapui:flex mapui:items-center mapui:gap-1 mapui:text-xs mapui:font-medium mapui:text-gray-700", children: [
|
|
48
|
+
e,
|
|
49
|
+
i && /* @__PURE__ */ a("span", { className: "mapui:ml-0.5 mapui:text-red-500", "aria-hidden": "true", children: "*" })
|
|
50
50
|
] }),
|
|
51
|
-
|
|
51
|
+
r && /* @__PURE__ */ a(He, { text: r })
|
|
52
52
|
] }),
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
o,
|
|
54
|
+
t && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-xs mapui:text-red-600", role: "alert", children: t })
|
|
55
55
|
] });
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function Y({ value: e, onChange: t, label: i }) {
|
|
58
58
|
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
59
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ a(
|
|
60
60
|
"input",
|
|
61
61
|
{
|
|
62
62
|
type: "color",
|
|
63
|
-
value:
|
|
64
|
-
onChange: (
|
|
65
|
-
"aria-label":
|
|
63
|
+
value: e,
|
|
64
|
+
onChange: (r) => t(r.target.value),
|
|
65
|
+
"aria-label": i ?? "Color",
|
|
66
66
|
className: "mapui:h-8 mapui:w-10 mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-300 mapui:p-0.5"
|
|
67
67
|
}
|
|
68
68
|
),
|
|
69
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ a("span", { className: "mapui:font-mono mapui:text-xs mapui:text-gray-600", children: e })
|
|
70
70
|
] });
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
open:
|
|
74
|
-
title:
|
|
75
|
-
description:
|
|
76
|
-
onConfirm:
|
|
77
|
-
onCancel:
|
|
72
|
+
function Z({
|
|
73
|
+
open: e,
|
|
74
|
+
title: t,
|
|
75
|
+
description: i,
|
|
76
|
+
onConfirm: r,
|
|
77
|
+
onCancel: n
|
|
78
78
|
}) {
|
|
79
|
-
return
|
|
79
|
+
return e ? /* @__PURE__ */ a(
|
|
80
80
|
"div",
|
|
81
81
|
{
|
|
82
82
|
className: "mapui:fixed mapui:inset-0 mapui:z-50 mapui:flex mapui:items-center mapui:justify-center mapui:bg-black/50",
|
|
@@ -85,37 +85,37 @@ function G({
|
|
|
85
85
|
"aria-labelledby": "confirm-dialog-title",
|
|
86
86
|
"aria-describedby": "confirm-dialog-description",
|
|
87
87
|
children: /* @__PURE__ */ l("div", { className: "mapui:w-full mapui:max-w-sm mapui:rounded-lg mapui:bg-white mapui:p-6 mapui:shadow-xl", children: [
|
|
88
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ a(
|
|
89
89
|
"h2",
|
|
90
90
|
{
|
|
91
91
|
id: "confirm-dialog-title",
|
|
92
92
|
className: "mapui:m-0 mapui:mb-2 mapui:text-base mapui:font-semibold mapui:text-gray-900",
|
|
93
|
-
children:
|
|
93
|
+
children: t
|
|
94
94
|
}
|
|
95
95
|
),
|
|
96
|
-
/* @__PURE__ */
|
|
96
|
+
/* @__PURE__ */ a(
|
|
97
97
|
"p",
|
|
98
98
|
{
|
|
99
99
|
id: "confirm-dialog-description",
|
|
100
100
|
className: "mapui:m-0 mapui:mb-6 mapui:text-sm mapui:text-gray-600",
|
|
101
|
-
children:
|
|
101
|
+
children: i
|
|
102
102
|
}
|
|
103
103
|
),
|
|
104
104
|
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:justify-end mapui:gap-2", children: [
|
|
105
|
-
/* @__PURE__ */
|
|
105
|
+
/* @__PURE__ */ a(
|
|
106
106
|
"button",
|
|
107
107
|
{
|
|
108
108
|
type: "button",
|
|
109
|
-
onClick:
|
|
109
|
+
onClick: n,
|
|
110
110
|
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",
|
|
111
111
|
children: "Cancel"
|
|
112
112
|
}
|
|
113
113
|
),
|
|
114
|
-
/* @__PURE__ */
|
|
114
|
+
/* @__PURE__ */ a(
|
|
115
115
|
"button",
|
|
116
116
|
{
|
|
117
117
|
type: "button",
|
|
118
|
-
onClick:
|
|
118
|
+
onClick: r,
|
|
119
119
|
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",
|
|
120
120
|
children: "Confirm"
|
|
121
121
|
}
|
|
@@ -125,170 +125,170 @@ function G({
|
|
|
125
125
|
}
|
|
126
126
|
) : null;
|
|
127
127
|
}
|
|
128
|
-
function
|
|
129
|
-
title:
|
|
130
|
-
children:
|
|
131
|
-
defaultOpen:
|
|
132
|
-
badge:
|
|
128
|
+
function _({
|
|
129
|
+
title: e,
|
|
130
|
+
children: t,
|
|
131
|
+
defaultOpen: i = !1,
|
|
132
|
+
badge: r
|
|
133
133
|
}) {
|
|
134
|
-
const [
|
|
134
|
+
const [n, o] = L(i);
|
|
135
135
|
return /* @__PURE__ */ l("div", { className: "mapui:rounded mapui:border mapui:border-gray-200", children: [
|
|
136
136
|
/* @__PURE__ */ l(
|
|
137
137
|
"button",
|
|
138
138
|
{
|
|
139
139
|
type: "button",
|
|
140
|
-
onClick: () =>
|
|
140
|
+
onClick: () => o((p) => !p),
|
|
141
141
|
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",
|
|
142
142
|
children: [
|
|
143
143
|
/* @__PURE__ */ l("span", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
e,
|
|
145
|
+
r !== void 0 && r > 0 && /* @__PURE__ */ a("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: r })
|
|
146
146
|
] }),
|
|
147
|
-
/* @__PURE__ */
|
|
147
|
+
/* @__PURE__ */ a("span", { "aria-hidden": "true", children: n ? "▲" : "▼" })
|
|
148
148
|
]
|
|
149
149
|
}
|
|
150
150
|
),
|
|
151
|
-
|
|
151
|
+
n && /* @__PURE__ */ a("div", { className: "mapui:p-3", children: t })
|
|
152
152
|
] });
|
|
153
153
|
}
|
|
154
|
-
const
|
|
155
|
-
function
|
|
156
|
-
value:
|
|
157
|
-
onChange:
|
|
158
|
-
onTestConnection:
|
|
159
|
-
testStatus:
|
|
160
|
-
testError:
|
|
154
|
+
const H = "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";
|
|
155
|
+
function de({
|
|
156
|
+
value: e,
|
|
157
|
+
onChange: t,
|
|
158
|
+
onTestConnection: i,
|
|
159
|
+
testStatus: r = "idle",
|
|
160
|
+
testError: n
|
|
161
161
|
}) {
|
|
162
|
-
const
|
|
162
|
+
const o = (p) => t({ ...e, ...p });
|
|
163
163
|
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
164
|
-
/* @__PURE__ */
|
|
164
|
+
/* @__PURE__ */ a(S, { label: "ID", required: !0, children: /* @__PURE__ */ a(
|
|
165
165
|
"input",
|
|
166
166
|
{
|
|
167
167
|
type: "text",
|
|
168
|
-
value:
|
|
169
|
-
onChange: (
|
|
168
|
+
value: e.id,
|
|
169
|
+
onChange: (p) => o({ id: p.target.value }),
|
|
170
170
|
placeholder: "my-source",
|
|
171
|
-
className:
|
|
171
|
+
className: H
|
|
172
172
|
}
|
|
173
173
|
) }),
|
|
174
|
-
/* @__PURE__ */ l(
|
|
174
|
+
/* @__PURE__ */ l(S, { label: "URL", required: !0, children: [
|
|
175
175
|
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:gap-2", children: [
|
|
176
|
-
/* @__PURE__ */
|
|
176
|
+
/* @__PURE__ */ a(
|
|
177
177
|
"input",
|
|
178
178
|
{
|
|
179
179
|
type: "url",
|
|
180
|
-
value:
|
|
181
|
-
onChange: (
|
|
180
|
+
value: e.url,
|
|
181
|
+
onChange: (p) => o({ url: p.target.value }),
|
|
182
182
|
placeholder: "https://example.com/ogcapi",
|
|
183
|
-
className: `${
|
|
183
|
+
className: `${H} mapui:flex-1`
|
|
184
184
|
}
|
|
185
185
|
),
|
|
186
|
-
|
|
186
|
+
i && /* @__PURE__ */ a(
|
|
187
187
|
"button",
|
|
188
188
|
{
|
|
189
189
|
type: "button",
|
|
190
|
-
onClick: () =>
|
|
191
|
-
disabled:
|
|
190
|
+
onClick: () => i(e.url),
|
|
191
|
+
disabled: r === "loading" || !e.url,
|
|
192
192
|
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",
|
|
193
|
-
children:
|
|
193
|
+
children: r === "loading" ? "Testing…" : "Test Connection"
|
|
194
194
|
}
|
|
195
195
|
)
|
|
196
196
|
] }),
|
|
197
|
-
|
|
198
|
-
|
|
197
|
+
r === "success" && /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-green-600", children: "Connection successful" }),
|
|
198
|
+
r === "error" && /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-red-600", children: n ?? "Connection failed" })
|
|
199
199
|
] }),
|
|
200
|
-
/* @__PURE__ */
|
|
200
|
+
/* @__PURE__ */ a(S, { label: "Label", children: /* @__PURE__ */ a(
|
|
201
201
|
"input",
|
|
202
202
|
{
|
|
203
203
|
type: "text",
|
|
204
|
-
value:
|
|
205
|
-
onChange: (
|
|
204
|
+
value: e.label ?? "",
|
|
205
|
+
onChange: (p) => o({ label: p.target.value || void 0 }),
|
|
206
206
|
placeholder: "My OGC API Source",
|
|
207
|
-
className:
|
|
207
|
+
className: H
|
|
208
208
|
}
|
|
209
209
|
) }),
|
|
210
|
-
/* @__PURE__ */
|
|
210
|
+
/* @__PURE__ */ a(S, { label: "Tile Matrix Set ID", children: /* @__PURE__ */ a(
|
|
211
211
|
"input",
|
|
212
212
|
{
|
|
213
213
|
type: "text",
|
|
214
|
-
value:
|
|
215
|
-
onChange: (
|
|
214
|
+
value: e.tileMatrixSetId ?? "WebMercatorQuad",
|
|
215
|
+
onChange: (p) => o({ tileMatrixSetId: p.target.value || void 0 }),
|
|
216
216
|
placeholder: "WebMercatorQuad",
|
|
217
|
-
className:
|
|
217
|
+
className: H
|
|
218
218
|
}
|
|
219
219
|
) })
|
|
220
220
|
] });
|
|
221
221
|
}
|
|
222
|
-
const
|
|
222
|
+
const ee = () => ({
|
|
223
223
|
id: "",
|
|
224
224
|
url: "",
|
|
225
225
|
label: void 0,
|
|
226
226
|
tileMatrixSetId: "WebMercatorQuad"
|
|
227
227
|
});
|
|
228
|
-
function
|
|
229
|
-
const [
|
|
230
|
-
|
|
228
|
+
function Ua({ sources: e, onChange: t }) {
|
|
229
|
+
const [i, r] = L(null), [n, o] = L(null), [p, b] = L(!1), [m, w] = L(ee()), [d, f] = L({}), [c, u] = L({}), [s, v] = L(null), k = async (C, P) => {
|
|
230
|
+
f((E) => ({ ...E, [C]: "loading" }));
|
|
231
231
|
try {
|
|
232
|
-
const
|
|
233
|
-
|
|
234
|
-
} catch (
|
|
235
|
-
|
|
232
|
+
const E = await fetch(`${P}/conformance`);
|
|
233
|
+
E.ok ? f((y) => ({ ...y, [C]: "success" })) : (f((y) => ({ ...y, [C]: "error" })), u((y) => ({ ...y, [C]: `HTTP ${E.status}` })));
|
|
234
|
+
} catch (E) {
|
|
235
|
+
f((y) => ({ ...y, [C]: "error" })), u((y) => ({ ...y, [C]: E instanceof Error ? E.message : "Network error" }));
|
|
236
236
|
}
|
|
237
|
-
},
|
|
238
|
-
|
|
239
|
-
},
|
|
240
|
-
|
|
241
|
-
},
|
|
242
|
-
|
|
237
|
+
}, D = () => {
|
|
238
|
+
n && (t(e.map((C) => C.id === i ? n : C)), r(null), o(null));
|
|
239
|
+
}, x = () => {
|
|
240
|
+
t([...e, m]), b(!1), w(ee());
|
|
241
|
+
}, $ = (C) => {
|
|
242
|
+
t(e.filter((P) => P.id !== C)), v(null);
|
|
243
243
|
};
|
|
244
244
|
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
245
245
|
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between", children: [
|
|
246
|
-
/* @__PURE__ */
|
|
247
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ a("h3", { className: "mapui:m-0 mapui:text-sm mapui:font-semibold mapui:text-gray-700", children: "Sources" }),
|
|
247
|
+
/* @__PURE__ */ a(
|
|
248
248
|
"button",
|
|
249
249
|
{
|
|
250
250
|
type: "button",
|
|
251
251
|
onClick: () => {
|
|
252
|
-
|
|
252
|
+
b(!0), w(ee());
|
|
253
253
|
},
|
|
254
254
|
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",
|
|
255
255
|
children: "+ Add Source"
|
|
256
256
|
}
|
|
257
257
|
)
|
|
258
258
|
] }),
|
|
259
|
-
|
|
260
|
-
/* @__PURE__ */
|
|
259
|
+
e.length === 0 && !p && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No sources configured." }),
|
|
260
|
+
/* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: e.map((C) => /* @__PURE__ */ a(
|
|
261
261
|
"li",
|
|
262
262
|
{
|
|
263
263
|
className: "mapui:rounded-lg mapui:border mapui:border-gray-200 mapui:bg-white mapui:p-3",
|
|
264
|
-
children:
|
|
265
|
-
/* @__PURE__ */
|
|
266
|
-
|
|
264
|
+
children: i === C.id ? /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
265
|
+
/* @__PURE__ */ a(
|
|
266
|
+
de,
|
|
267
267
|
{
|
|
268
|
-
value:
|
|
269
|
-
onChange:
|
|
270
|
-
onTestConnection: (
|
|
271
|
-
testStatus:
|
|
272
|
-
testError:
|
|
268
|
+
value: n ?? C,
|
|
269
|
+
onChange: o,
|
|
270
|
+
onTestConnection: (P) => k(`edit-${C.id}`, P),
|
|
271
|
+
testStatus: d[`edit-${C.id}`],
|
|
272
|
+
testError: c[`edit-${C.id}`]
|
|
273
273
|
}
|
|
274
274
|
),
|
|
275
275
|
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:gap-2", children: [
|
|
276
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ a(
|
|
277
277
|
"button",
|
|
278
278
|
{
|
|
279
279
|
type: "button",
|
|
280
|
-
onClick:
|
|
281
|
-
disabled: !(
|
|
280
|
+
onClick: D,
|
|
281
|
+
disabled: !(n != null && n.id) || !(n != null && n.url),
|
|
282
282
|
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",
|
|
283
283
|
children: "Save"
|
|
284
284
|
}
|
|
285
285
|
),
|
|
286
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ a(
|
|
287
287
|
"button",
|
|
288
288
|
{
|
|
289
289
|
type: "button",
|
|
290
290
|
onClick: () => {
|
|
291
|
-
|
|
291
|
+
r(null), o(null);
|
|
292
292
|
},
|
|
293
293
|
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",
|
|
294
294
|
children: "Cancel"
|
|
@@ -297,30 +297,30 @@ function ba({ sources: a, onChange: i }) {
|
|
|
297
297
|
] })
|
|
298
298
|
] }) : /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-start mapui:justify-between mapui:gap-2", children: [
|
|
299
299
|
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-0.5", children: [
|
|
300
|
-
/* @__PURE__ */
|
|
301
|
-
/* @__PURE__ */
|
|
302
|
-
|
|
300
|
+
/* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:font-medium mapui:text-gray-800", children: C.label ?? C.id }),
|
|
301
|
+
/* @__PURE__ */ a("span", { className: "mapui:font-mono mapui:text-xs mapui:text-gray-500", children: C.url }),
|
|
302
|
+
C.tileMatrixSetId && /* @__PURE__ */ l("span", { className: "mapui:text-xs mapui:text-gray-400", children: [
|
|
303
303
|
"TMS: ",
|
|
304
|
-
|
|
304
|
+
C.tileMatrixSetId
|
|
305
305
|
] })
|
|
306
306
|
] }),
|
|
307
307
|
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:shrink-0 mapui:gap-1", children: [
|
|
308
|
-
/* @__PURE__ */
|
|
308
|
+
/* @__PURE__ */ a(
|
|
309
309
|
"button",
|
|
310
310
|
{
|
|
311
311
|
type: "button",
|
|
312
312
|
onClick: () => {
|
|
313
|
-
|
|
313
|
+
r(C.id), o(C);
|
|
314
314
|
},
|
|
315
315
|
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",
|
|
316
316
|
children: "Edit"
|
|
317
317
|
}
|
|
318
318
|
),
|
|
319
|
-
/* @__PURE__ */
|
|
319
|
+
/* @__PURE__ */ a(
|
|
320
320
|
"button",
|
|
321
321
|
{
|
|
322
322
|
type: "button",
|
|
323
|
-
onClick: () =>
|
|
323
|
+
onClick: () => v(C.id),
|
|
324
324
|
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",
|
|
325
325
|
children: "Remove"
|
|
326
326
|
}
|
|
@@ -328,456 +328,836 @@ function ba({ sources: a, onChange: i }) {
|
|
|
328
328
|
] })
|
|
329
329
|
] })
|
|
330
330
|
},
|
|
331
|
-
|
|
331
|
+
C.id
|
|
332
332
|
)) }),
|
|
333
|
-
|
|
334
|
-
/* @__PURE__ */
|
|
335
|
-
/* @__PURE__ */
|
|
336
|
-
|
|
333
|
+
p && /* @__PURE__ */ l("div", { className: "mapui:rounded-lg mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
|
|
334
|
+
/* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-3 mapui:text-xs mapui:font-semibold mapui:text-blue-700", children: "New Source" }),
|
|
335
|
+
/* @__PURE__ */ a(
|
|
336
|
+
de,
|
|
337
337
|
{
|
|
338
|
-
value:
|
|
339
|
-
onChange:
|
|
340
|
-
onTestConnection: (
|
|
341
|
-
testStatus:
|
|
342
|
-
testError:
|
|
338
|
+
value: m,
|
|
339
|
+
onChange: w,
|
|
340
|
+
onTestConnection: (C) => k("new", C),
|
|
341
|
+
testStatus: d.new,
|
|
342
|
+
testError: c.new
|
|
343
343
|
}
|
|
344
344
|
),
|
|
345
345
|
/* @__PURE__ */ l("div", { className: "mapui:mt-3 mapui:flex mapui:gap-2", children: [
|
|
346
|
-
/* @__PURE__ */
|
|
346
|
+
/* @__PURE__ */ a(
|
|
347
347
|
"button",
|
|
348
348
|
{
|
|
349
349
|
type: "button",
|
|
350
|
-
onClick:
|
|
351
|
-
disabled: !
|
|
350
|
+
onClick: x,
|
|
351
|
+
disabled: !m.id || !m.url,
|
|
352
352
|
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",
|
|
353
353
|
children: "Save"
|
|
354
354
|
}
|
|
355
355
|
),
|
|
356
|
-
/* @__PURE__ */
|
|
356
|
+
/* @__PURE__ */ a(
|
|
357
357
|
"button",
|
|
358
358
|
{
|
|
359
359
|
type: "button",
|
|
360
|
-
onClick: () =>
|
|
360
|
+
onClick: () => b(!1),
|
|
361
361
|
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",
|
|
362
362
|
children: "Cancel"
|
|
363
363
|
}
|
|
364
364
|
)
|
|
365
365
|
] })
|
|
366
366
|
] }),
|
|
367
|
-
/* @__PURE__ */
|
|
368
|
-
|
|
367
|
+
/* @__PURE__ */ a(
|
|
368
|
+
Z,
|
|
369
369
|
{
|
|
370
|
-
open:
|
|
370
|
+
open: s !== null,
|
|
371
371
|
title: "Remove Source",
|
|
372
372
|
description: "Are you sure you want to remove this source? Any layers using it will be affected.",
|
|
373
|
-
onConfirm: () =>
|
|
374
|
-
onCancel: () =>
|
|
373
|
+
onConfirm: () => s && $(s),
|
|
374
|
+
onCancel: () => v(null)
|
|
375
375
|
}
|
|
376
376
|
)
|
|
377
377
|
] });
|
|
378
378
|
}
|
|
379
|
-
function
|
|
380
|
-
sourceUrl:
|
|
381
|
-
selectedCollectionIds:
|
|
382
|
-
onSelect:
|
|
383
|
-
onDeselect:
|
|
379
|
+
function Wa({
|
|
380
|
+
sourceUrl: e,
|
|
381
|
+
selectedCollectionIds: t,
|
|
382
|
+
onSelect: i,
|
|
383
|
+
onDeselect: r
|
|
384
384
|
}) {
|
|
385
|
-
const { collections:
|
|
386
|
-
return
|
|
387
|
-
/* @__PURE__ */
|
|
385
|
+
const { collections: n, loading: o, error: p } = Fe(e || null);
|
|
386
|
+
return o ? /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2 mapui:py-4 mapui:text-sm mapui:text-gray-500", children: [
|
|
387
|
+
/* @__PURE__ */ a("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" }),
|
|
388
388
|
"Loading collections…"
|
|
389
|
-
] }) :
|
|
389
|
+
] }) : p ? /* @__PURE__ */ l("div", { className: "mapui:rounded mapui:bg-red-50 mapui:p-3 mapui:text-sm mapui:text-red-700", children: [
|
|
390
390
|
"Failed to load collections: ",
|
|
391
|
-
|
|
392
|
-
] }) :
|
|
393
|
-
const
|
|
391
|
+
p.message
|
|
392
|
+
] }) : n.length === 0 ? /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No collections found at this source." }) : /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-1 mapui:p-0", children: n.map((b) => {
|
|
393
|
+
const m = t.includes(b.id);
|
|
394
394
|
return /* @__PURE__ */ l(
|
|
395
395
|
"li",
|
|
396
396
|
{
|
|
397
397
|
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",
|
|
398
398
|
children: [
|
|
399
|
-
/* @__PURE__ */
|
|
399
|
+
/* @__PURE__ */ a(
|
|
400
400
|
"input",
|
|
401
401
|
{
|
|
402
402
|
type: "checkbox",
|
|
403
|
-
id: `collection-${
|
|
404
|
-
checked:
|
|
405
|
-
onChange: () =>
|
|
403
|
+
id: `collection-${b.id}`,
|
|
404
|
+
checked: m,
|
|
405
|
+
onChange: () => m ? r(b.id) : i(b.id),
|
|
406
406
|
className: "mapui:mt-0.5 mapui:h-4 mapui:w-4 mapui:cursor-pointer mapui:accent-blue-600"
|
|
407
407
|
}
|
|
408
408
|
),
|
|
409
409
|
/* @__PURE__ */ l(
|
|
410
410
|
"label",
|
|
411
411
|
{
|
|
412
|
-
htmlFor: `collection-${
|
|
412
|
+
htmlFor: `collection-${b.id}`,
|
|
413
413
|
className: "mapui:flex mapui:cursor-pointer mapui:flex-col mapui:gap-0.5",
|
|
414
414
|
children: [
|
|
415
|
-
/* @__PURE__ */
|
|
416
|
-
/* @__PURE__ */
|
|
417
|
-
|
|
415
|
+
/* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:font-medium mapui:text-gray-800", children: b.title ?? b.id }),
|
|
416
|
+
/* @__PURE__ */ a("span", { className: "mapui:font-mono mapui:text-xs mapui:text-gray-500", children: b.id }),
|
|
417
|
+
b.description && /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-gray-400 mapui:line-clamp-2", children: b.description })
|
|
418
418
|
]
|
|
419
419
|
}
|
|
420
420
|
)
|
|
421
421
|
]
|
|
422
422
|
},
|
|
423
|
-
|
|
423
|
+
b.id
|
|
424
424
|
);
|
|
425
425
|
}) });
|
|
426
426
|
}
|
|
427
|
-
function
|
|
428
|
-
const [
|
|
429
|
-
if (!
|
|
430
|
-
if (!
|
|
431
|
-
const
|
|
432
|
-
return
|
|
433
|
-
}, [
|
|
434
|
-
(
|
|
435
|
-
|
|
427
|
+
function Je({ value: e, onChange: t, availableIcons: i }) {
|
|
428
|
+
const [r, n] = L(!1), [o, p] = L(-1), b = ue(null), m = Ee(), w = o >= 0 ? `${m}-option-${o}` : void 0, d = Pe(() => {
|
|
429
|
+
if (!i || i.length === 0) return [];
|
|
430
|
+
if (!e) return i;
|
|
431
|
+
const k = e.toLowerCase();
|
|
432
|
+
return i.filter((D) => D.toLowerCase().includes(k));
|
|
433
|
+
}, [i, e]), f = r && d.length > 0, c = ze(
|
|
434
|
+
(k) => {
|
|
435
|
+
t(k), n(!1), p(-1);
|
|
436
436
|
},
|
|
437
|
-
[
|
|
438
|
-
),
|
|
439
|
-
|
|
440
|
-
},
|
|
441
|
-
|
|
437
|
+
[t]
|
|
438
|
+
), u = (k) => {
|
|
439
|
+
t(k.target.value), n(!0), p(-1);
|
|
440
|
+
}, s = (k) => {
|
|
441
|
+
f && (k.key === "ArrowDown" ? (k.preventDefault(), p((D) => Math.min(D + 1, d.length - 1))) : k.key === "ArrowUp" ? (k.preventDefault(), p((D) => Math.max(D - 1, 0))) : k.key === "Enter" && o >= 0 ? (k.preventDefault(), c(d[o])) : k.key === "Escape" && (n(!1), p(-1)));
|
|
442
442
|
};
|
|
443
|
-
|
|
444
|
-
const
|
|
445
|
-
|
|
443
|
+
X(() => {
|
|
444
|
+
const k = (D) => {
|
|
445
|
+
b.current && !b.current.contains(D.target) && (n(!1), p(-1));
|
|
446
446
|
};
|
|
447
|
-
return document.addEventListener("mousedown",
|
|
447
|
+
return document.addEventListener("mousedown", k), () => document.removeEventListener("mousedown", k);
|
|
448
448
|
}, []);
|
|
449
|
-
const
|
|
450
|
-
return !
|
|
449
|
+
const v = "mapui:w-full 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";
|
|
450
|
+
return !i || i.length === 0 ? /* @__PURE__ */ a(
|
|
451
451
|
"input",
|
|
452
452
|
{
|
|
453
453
|
type: "text",
|
|
454
|
-
value:
|
|
455
|
-
onChange: (
|
|
454
|
+
value: e,
|
|
455
|
+
onChange: (k) => t(k.target.value || ""),
|
|
456
456
|
placeholder: "icon-name",
|
|
457
|
-
className:
|
|
457
|
+
className: v
|
|
458
458
|
}
|
|
459
|
-
) : /* @__PURE__ */ l("div", { ref:
|
|
460
|
-
/* @__PURE__ */
|
|
459
|
+
) : /* @__PURE__ */ l("div", { ref: b, className: "mapui:relative", children: [
|
|
460
|
+
/* @__PURE__ */ a(
|
|
461
461
|
"input",
|
|
462
462
|
{
|
|
463
463
|
type: "text",
|
|
464
|
-
value:
|
|
464
|
+
value: e,
|
|
465
465
|
placeholder: "Search icons…",
|
|
466
466
|
role: "combobox",
|
|
467
|
-
"aria-expanded":
|
|
467
|
+
"aria-expanded": f,
|
|
468
468
|
"aria-autocomplete": "list",
|
|
469
|
-
"aria-controls":
|
|
470
|
-
"aria-activedescendant":
|
|
471
|
-
onChange:
|
|
472
|
-
onFocus: () =>
|
|
473
|
-
onKeyDown:
|
|
474
|
-
className:
|
|
469
|
+
"aria-controls": m,
|
|
470
|
+
"aria-activedescendant": w,
|
|
471
|
+
onChange: u,
|
|
472
|
+
onFocus: () => n(!0),
|
|
473
|
+
onKeyDown: s,
|
|
474
|
+
className: v
|
|
475
475
|
}
|
|
476
476
|
),
|
|
477
|
-
|
|
477
|
+
f && /* @__PURE__ */ a(
|
|
478
478
|
"ul",
|
|
479
479
|
{
|
|
480
|
-
id:
|
|
480
|
+
id: m,
|
|
481
481
|
role: "listbox",
|
|
482
482
|
className: "mapui:absolute mapui:z-10 mapui:mt-1 mapui:w-full mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-white mapui:shadow-lg mapui:max-h-48 mapui:overflow-y-auto mapui:p-0 mapui:m-0 mapui:list-none",
|
|
483
|
-
children:
|
|
483
|
+
children: d.map((k, D) => /* @__PURE__ */ a(
|
|
484
484
|
"li",
|
|
485
485
|
{
|
|
486
|
-
id: `${
|
|
486
|
+
id: `${m}-option-${D}`,
|
|
487
487
|
role: "option",
|
|
488
|
-
"aria-selected":
|
|
489
|
-
onMouseDown: (
|
|
490
|
-
|
|
488
|
+
"aria-selected": D === o,
|
|
489
|
+
onMouseDown: (x) => {
|
|
490
|
+
x.preventDefault(), c(k);
|
|
491
491
|
},
|
|
492
|
-
className: `mapui:cursor-pointer mapui:px-2 mapui:py-1 mapui:text-sm mapui:font-mono ${
|
|
493
|
-
children:
|
|
492
|
+
className: `mapui:cursor-pointer mapui:px-2 mapui:py-1 mapui:text-sm mapui:font-mono ${D === o ? "mapui:bg-blue-100" : "hover:mapui:bg-gray-50"}`,
|
|
493
|
+
children: k
|
|
494
494
|
},
|
|
495
|
-
`${
|
|
495
|
+
`${D}-${k}`
|
|
496
496
|
))
|
|
497
497
|
}
|
|
498
498
|
)
|
|
499
499
|
] });
|
|
500
500
|
}
|
|
501
|
-
const
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
501
|
+
const he = [
|
|
502
|
+
"#4e79a7",
|
|
503
|
+
"#f28e2b",
|
|
504
|
+
"#e15759",
|
|
505
|
+
"#76b7b2",
|
|
506
|
+
"#59a14f",
|
|
507
|
+
"#edc948",
|
|
508
|
+
"#b07aa1",
|
|
509
|
+
"#ff9da7",
|
|
510
|
+
"#9c755f",
|
|
511
|
+
"#bab0ac"
|
|
512
|
+
];
|
|
513
|
+
function ae(e) {
|
|
514
|
+
return he[e % he.length];
|
|
515
|
+
}
|
|
516
|
+
function Ke(e) {
|
|
517
|
+
return e[0] === "interpolate" ? "interpolate" : "match";
|
|
518
|
+
}
|
|
519
|
+
function Qe(e) {
|
|
520
|
+
const t = Array.isArray(e[1]) ? e[1][1] ?? "" : "", i = e[e.length - 1] ?? "#000000", r = [];
|
|
521
|
+
for (let n = 2; n < e.length - 1; n += 2)
|
|
522
|
+
r.push({ value: String(e[n] ?? ""), color: e[n + 1] ?? "#000000" });
|
|
523
|
+
return { property: t, pairs: r, fallback: i };
|
|
524
|
+
}
|
|
525
|
+
function ge(e, t, i) {
|
|
526
|
+
const r = ["match", ["get", e]];
|
|
527
|
+
for (const n of t)
|
|
528
|
+
r.push(n.value, n.color);
|
|
529
|
+
return r.push(i), r;
|
|
530
|
+
}
|
|
531
|
+
function Ze(e) {
|
|
532
|
+
const t = Array.isArray(e[2]) ? e[2][1] ?? "" : "", i = [];
|
|
533
|
+
for (let r = 3; r < e.length; r += 2)
|
|
534
|
+
i.push({ stop: Number(e[r] ?? 0), color: e[r + 1] ?? "#000000" });
|
|
535
|
+
return { property: t, stops: i };
|
|
536
|
+
}
|
|
537
|
+
function be(e, t) {
|
|
538
|
+
const i = ["interpolate", ["linear"], ["get", e]];
|
|
539
|
+
for (const r of t)
|
|
540
|
+
i.push(r.stop, r.color);
|
|
541
|
+
return i;
|
|
542
|
+
}
|
|
543
|
+
const J = "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", te = "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-300 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-gray-700 hover:mapui:bg-gray-50", ye = "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";
|
|
544
|
+
function ea({
|
|
545
|
+
value: e,
|
|
546
|
+
onChange: t,
|
|
547
|
+
availableProperties: i = [],
|
|
548
|
+
onFetchDistinctValues: r
|
|
505
549
|
}) {
|
|
506
|
-
const
|
|
550
|
+
const [n, o] = L(() => Ke(e)), [p, b] = L(!1), m = Qe(e), w = Ze(e), d = n === "match" ? m.property : "", f = n === "match" ? m.pairs : [], c = n === "match" ? m.fallback : "#000000", u = n === "interpolate" ? w.property : "", s = n === "interpolate" ? w.stops : [], v = i.filter(
|
|
551
|
+
(h) => !h.type || h.type === "string"
|
|
552
|
+
), k = i.filter(
|
|
553
|
+
(h) => h.type === "number" || h.type === "integer"
|
|
554
|
+
), D = (h, T, I) => {
|
|
555
|
+
t(ge(h, T, I));
|
|
556
|
+
}, x = (h) => {
|
|
557
|
+
D(h, f, c);
|
|
558
|
+
}, $ = (h) => {
|
|
559
|
+
D(d, f, h);
|
|
560
|
+
}, C = (h, T) => {
|
|
561
|
+
const I = f.map((A, W) => W === h ? { ...A, value: T } : A);
|
|
562
|
+
D(d, I, c);
|
|
563
|
+
}, P = (h, T) => {
|
|
564
|
+
const I = f.map((A, W) => W === h ? { ...A, color: T } : A);
|
|
565
|
+
D(d, I, c);
|
|
566
|
+
}, E = (h) => {
|
|
567
|
+
const T = f.filter((I, A) => A !== h);
|
|
568
|
+
D(d, T, c);
|
|
569
|
+
}, y = () => {
|
|
570
|
+
const h = [...f, { value: "", color: ae(f.length) }];
|
|
571
|
+
D(d, h, c);
|
|
572
|
+
}, F = async () => {
|
|
573
|
+
if (!(!r || !d)) {
|
|
574
|
+
b(!0);
|
|
575
|
+
try {
|
|
576
|
+
const T = (await r(d)).map((I, A) => ({
|
|
577
|
+
value: I,
|
|
578
|
+
color: ae(A)
|
|
579
|
+
}));
|
|
580
|
+
D(d, T, c);
|
|
581
|
+
} finally {
|
|
582
|
+
b(!1);
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
}, M = (h, T) => {
|
|
586
|
+
t(be(h, T));
|
|
587
|
+
}, g = (h) => {
|
|
588
|
+
M(h, s);
|
|
589
|
+
}, N = (h, T) => {
|
|
590
|
+
const I = s.map((A, W) => W === h ? { ...A, stop: T } : A);
|
|
591
|
+
M(u, I);
|
|
592
|
+
}, O = (h, T) => {
|
|
593
|
+
const I = s.map((A, W) => W === h ? { ...A, color: T } : A);
|
|
594
|
+
M(u, I);
|
|
595
|
+
}, q = (h) => {
|
|
596
|
+
const T = s.filter((I, A) => A !== h);
|
|
597
|
+
M(u, T);
|
|
598
|
+
}, U = () => {
|
|
599
|
+
var I;
|
|
600
|
+
const h = ((I = s[s.length - 1]) == null ? void 0 : I.stop) ?? 0, T = [...s, { stop: h + 10, color: ae(s.length) }];
|
|
601
|
+
M(u, T);
|
|
602
|
+
}, R = (h) => {
|
|
603
|
+
o(h), t(h === "match" ? ge("", [], "#000000") : be("", []));
|
|
604
|
+
};
|
|
605
|
+
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
|
|
606
|
+
/* @__PURE__ */ a("div", { className: "mapui:flex mapui:overflow-hidden mapui:rounded mapui:border mapui:border-gray-300", children: ["match", "interpolate"].map((h) => /* @__PURE__ */ a(
|
|
607
|
+
"button",
|
|
608
|
+
{
|
|
609
|
+
type: "button",
|
|
610
|
+
onClick: () => R(h),
|
|
611
|
+
className: [
|
|
612
|
+
"mapui:flex-1 mapui:cursor-pointer mapui:border-0 mapui:px-3 mapui:py-1 mapui:text-xs mapui:capitalize mapui:outline-none",
|
|
613
|
+
"focus:mapui:ring-1 focus:mapui:ring-inset focus:mapui:ring-blue-400",
|
|
614
|
+
n === h ? "mapui:bg-blue-500 mapui:text-white" : "mapui:bg-white mapui:text-gray-700 hover:mapui:bg-gray-50"
|
|
615
|
+
].join(" "),
|
|
616
|
+
children: h === "match" ? "Categorical" : "Gradient"
|
|
617
|
+
},
|
|
618
|
+
h
|
|
619
|
+
)) }),
|
|
620
|
+
n === "match" && /* @__PURE__ */ l(B, { children: [
|
|
621
|
+
/* @__PURE__ */ l(
|
|
622
|
+
"select",
|
|
623
|
+
{
|
|
624
|
+
value: d,
|
|
625
|
+
onChange: (h) => x(h.target.value),
|
|
626
|
+
className: J,
|
|
627
|
+
children: [
|
|
628
|
+
/* @__PURE__ */ a("option", { value: "", children: "Select a property…" }),
|
|
629
|
+
v.map((h) => /* @__PURE__ */ a("option", { value: h.name, children: h.title ?? h.name }, h.name))
|
|
630
|
+
]
|
|
631
|
+
}
|
|
632
|
+
),
|
|
633
|
+
f.length > 0 && /* @__PURE__ */ a("div", { className: "mapui:flex mapui:flex-col mapui:gap-1", children: f.map((h, T) => /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
634
|
+
/* @__PURE__ */ a(
|
|
635
|
+
"input",
|
|
636
|
+
{
|
|
637
|
+
type: "text",
|
|
638
|
+
value: h.value,
|
|
639
|
+
onChange: (I) => C(T, I.target.value),
|
|
640
|
+
placeholder: "value",
|
|
641
|
+
className: `${J} mapui:flex-1`
|
|
642
|
+
}
|
|
643
|
+
),
|
|
644
|
+
/* @__PURE__ */ a(
|
|
645
|
+
Y,
|
|
646
|
+
{
|
|
647
|
+
value: h.color,
|
|
648
|
+
onChange: (I) => P(T, I),
|
|
649
|
+
label: `Color for "${h.value}"`
|
|
650
|
+
}
|
|
651
|
+
),
|
|
652
|
+
/* @__PURE__ */ a("button", { type: "button", onClick: () => E(T), className: ye, children: "×" })
|
|
653
|
+
] }, T)) }),
|
|
654
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
655
|
+
/* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-gray-500 mapui:shrink-0", children: "Fallback:" }),
|
|
656
|
+
/* @__PURE__ */ a(Y, { value: c, onChange: $, label: "Fallback color" })
|
|
657
|
+
] }),
|
|
658
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:gap-2", children: [
|
|
659
|
+
/* @__PURE__ */ a("button", { type: "button", onClick: y, className: te, children: "+ Add value" }),
|
|
660
|
+
r && d && /* @__PURE__ */ a(
|
|
661
|
+
"button",
|
|
662
|
+
{
|
|
663
|
+
type: "button",
|
|
664
|
+
onClick: F,
|
|
665
|
+
disabled: p,
|
|
666
|
+
className: te,
|
|
667
|
+
children: p ? "Loading…" : "Auto-populate"
|
|
668
|
+
}
|
|
669
|
+
)
|
|
670
|
+
] })
|
|
671
|
+
] }),
|
|
672
|
+
n === "interpolate" && /* @__PURE__ */ l(B, { children: [
|
|
673
|
+
/* @__PURE__ */ l(
|
|
674
|
+
"select",
|
|
675
|
+
{
|
|
676
|
+
value: u,
|
|
677
|
+
onChange: (h) => g(h.target.value),
|
|
678
|
+
className: J,
|
|
679
|
+
children: [
|
|
680
|
+
/* @__PURE__ */ a("option", { value: "", children: "Select a numeric property…" }),
|
|
681
|
+
k.map((h) => /* @__PURE__ */ a("option", { value: h.name, children: h.title ?? h.name }, h.name))
|
|
682
|
+
]
|
|
683
|
+
}
|
|
684
|
+
),
|
|
685
|
+
s.length > 0 && /* @__PURE__ */ a("div", { className: "mapui:flex mapui:flex-col mapui:gap-1", children: s.map((h, T) => /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
686
|
+
/* @__PURE__ */ a(
|
|
687
|
+
"input",
|
|
688
|
+
{
|
|
689
|
+
type: "number",
|
|
690
|
+
value: h.stop,
|
|
691
|
+
onChange: (I) => N(T, parseFloat(I.target.value) || 0),
|
|
692
|
+
placeholder: "stop",
|
|
693
|
+
className: `${J} mapui:w-24`
|
|
694
|
+
}
|
|
695
|
+
),
|
|
696
|
+
/* @__PURE__ */ a(
|
|
697
|
+
Y,
|
|
698
|
+
{
|
|
699
|
+
value: h.color,
|
|
700
|
+
onChange: (I) => O(T, I),
|
|
701
|
+
label: `Color at stop ${h.stop}`
|
|
702
|
+
}
|
|
703
|
+
),
|
|
704
|
+
/* @__PURE__ */ a("button", { type: "button", onClick: () => q(T), className: ye, children: "×" })
|
|
705
|
+
] }, T)) }),
|
|
706
|
+
/* @__PURE__ */ a("button", { type: "button", onClick: U, className: te, children: "+ Add stop" })
|
|
707
|
+
] })
|
|
708
|
+
] });
|
|
709
|
+
}
|
|
710
|
+
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";
|
|
711
|
+
function aa({
|
|
712
|
+
value: e,
|
|
713
|
+
onChange: t
|
|
714
|
+
}) {
|
|
715
|
+
const i = (e == null ? void 0 : e[0]) ?? 0, r = (e == null ? void 0 : e[1]) ?? 0;
|
|
507
716
|
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
508
|
-
/* @__PURE__ */
|
|
717
|
+
/* @__PURE__ */ a(
|
|
509
718
|
"input",
|
|
510
719
|
{
|
|
511
720
|
type: "number",
|
|
512
721
|
step: 0.5,
|
|
513
|
-
value:
|
|
514
|
-
onChange: (
|
|
515
|
-
className: `${
|
|
722
|
+
value: i,
|
|
723
|
+
onChange: (n) => t([parseFloat(n.target.value) || 0, r]),
|
|
724
|
+
className: `${z} mapui:w-20`,
|
|
516
725
|
"aria-label": "X",
|
|
517
726
|
placeholder: "X"
|
|
518
727
|
}
|
|
519
728
|
),
|
|
520
|
-
/* @__PURE__ */
|
|
729
|
+
/* @__PURE__ */ a(
|
|
521
730
|
"input",
|
|
522
731
|
{
|
|
523
732
|
type: "number",
|
|
524
733
|
step: 0.5,
|
|
525
|
-
value:
|
|
526
|
-
onChange: (
|
|
527
|
-
className: `${
|
|
734
|
+
value: r,
|
|
735
|
+
onChange: (n) => t([i, parseFloat(n.target.value) || 0]),
|
|
736
|
+
className: `${z} mapui:w-20`,
|
|
528
737
|
"aria-label": "Y",
|
|
529
738
|
placeholder: "Y"
|
|
530
739
|
}
|
|
531
740
|
)
|
|
532
741
|
] });
|
|
533
742
|
}
|
|
534
|
-
function
|
|
535
|
-
value:
|
|
536
|
-
onChange:
|
|
743
|
+
function ta({
|
|
744
|
+
value: e,
|
|
745
|
+
onChange: t
|
|
537
746
|
}) {
|
|
538
|
-
const
|
|
747
|
+
const i = e ?? 1;
|
|
539
748
|
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
540
|
-
/* @__PURE__ */
|
|
749
|
+
/* @__PURE__ */ a(
|
|
541
750
|
"input",
|
|
542
751
|
{
|
|
543
752
|
type: "range",
|
|
544
753
|
min: 0,
|
|
545
754
|
max: 1,
|
|
546
755
|
step: 0.01,
|
|
547
|
-
value:
|
|
548
|
-
onChange: (
|
|
756
|
+
value: i,
|
|
757
|
+
onChange: (r) => t(parseFloat(r.target.value)),
|
|
549
758
|
className: "mapui:flex-1"
|
|
550
759
|
}
|
|
551
760
|
),
|
|
552
|
-
/* @__PURE__ */
|
|
761
|
+
/* @__PURE__ */ a("span", { className: "mapui:w-8 mapui:text-right mapui:text-xs mapui:text-gray-600", children: i.toFixed(2) })
|
|
553
762
|
] });
|
|
554
763
|
}
|
|
555
|
-
function
|
|
556
|
-
def:
|
|
557
|
-
value:
|
|
558
|
-
onChange:
|
|
559
|
-
availableIcons:
|
|
764
|
+
function fe({
|
|
765
|
+
def: e,
|
|
766
|
+
value: t,
|
|
767
|
+
onChange: i,
|
|
768
|
+
availableIcons: r,
|
|
769
|
+
availableProperties: n,
|
|
770
|
+
onFetchDistinctValues: o
|
|
560
771
|
}) {
|
|
561
|
-
var
|
|
562
|
-
switch (
|
|
563
|
-
case "color":
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
{
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
772
|
+
var p, b;
|
|
773
|
+
switch (e.widget) {
|
|
774
|
+
case "color": {
|
|
775
|
+
const m = Array.isArray(t), w = m ? t[t.length - 1] ?? "#000000" : "#000000";
|
|
776
|
+
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-1 mapui:w-full", children: [
|
|
777
|
+
/* @__PURE__ */ a("div", { className: "mapui:flex mapui:items-center mapui:justify-end", children: /* @__PURE__ */ a(
|
|
778
|
+
"button",
|
|
779
|
+
{
|
|
780
|
+
type: "button",
|
|
781
|
+
title: m ? "Switch to static color" : "Switch to data-driven color",
|
|
782
|
+
onClick: () => {
|
|
783
|
+
i(m ? w : ["match", ["get", ""], w]);
|
|
784
|
+
},
|
|
785
|
+
className: [
|
|
786
|
+
"mapui:cursor-pointer mapui:rounded mapui:border mapui:px-1.5 mapui:py-0.5 mapui:font-mono mapui:text-xs mapui:outline-none",
|
|
787
|
+
"focus:mapui:ring-1 focus:mapui:ring-blue-400",
|
|
788
|
+
m ? "mapui:border-blue-400 mapui:bg-blue-50 mapui:text-blue-700" : "mapui:border-gray-300 mapui:bg-white mapui:text-gray-500 hover:mapui:border-blue-400 hover:mapui:text-blue-600"
|
|
789
|
+
].join(" "),
|
|
790
|
+
children: "fx"
|
|
791
|
+
}
|
|
792
|
+
) }),
|
|
793
|
+
m ? /* @__PURE__ */ a(
|
|
794
|
+
ea,
|
|
795
|
+
{
|
|
796
|
+
value: t,
|
|
797
|
+
onChange: (d) => i(d),
|
|
798
|
+
availableProperties: n,
|
|
799
|
+
onFetchDistinctValues: o
|
|
800
|
+
}
|
|
801
|
+
) : /* @__PURE__ */ a(
|
|
802
|
+
Y,
|
|
803
|
+
{
|
|
804
|
+
value: t ?? "#000000",
|
|
805
|
+
onChange: i,
|
|
806
|
+
label: e.label
|
|
807
|
+
}
|
|
808
|
+
)
|
|
809
|
+
] });
|
|
810
|
+
}
|
|
572
811
|
case "opacity":
|
|
573
|
-
return /* @__PURE__ */
|
|
574
|
-
|
|
812
|
+
return /* @__PURE__ */ a(
|
|
813
|
+
ta,
|
|
575
814
|
{
|
|
576
|
-
value:
|
|
577
|
-
onChange:
|
|
815
|
+
value: t,
|
|
816
|
+
onChange: i
|
|
578
817
|
}
|
|
579
818
|
);
|
|
580
819
|
case "number":
|
|
581
|
-
return /* @__PURE__ */
|
|
820
|
+
return /* @__PURE__ */ a(
|
|
582
821
|
"input",
|
|
583
822
|
{
|
|
584
823
|
type: "number",
|
|
585
|
-
min:
|
|
586
|
-
max:
|
|
587
|
-
step:
|
|
588
|
-
value:
|
|
589
|
-
onChange: (
|
|
590
|
-
className:
|
|
824
|
+
min: e.min,
|
|
825
|
+
max: e.max,
|
|
826
|
+
step: e.step ?? 1,
|
|
827
|
+
value: t ?? e.min ?? 0,
|
|
828
|
+
onChange: (m) => i(parseFloat(m.target.value) || 0),
|
|
829
|
+
className: z
|
|
591
830
|
}
|
|
592
831
|
);
|
|
593
832
|
case "boolean":
|
|
594
|
-
return /* @__PURE__ */
|
|
833
|
+
return /* @__PURE__ */ a(
|
|
595
834
|
"input",
|
|
596
835
|
{
|
|
597
836
|
type: "checkbox",
|
|
598
|
-
checked:
|
|
599
|
-
onChange: (
|
|
837
|
+
checked: t ?? !1,
|
|
838
|
+
onChange: (m) => i(m.target.checked),
|
|
600
839
|
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
601
840
|
}
|
|
602
841
|
);
|
|
603
842
|
case "enum":
|
|
604
|
-
return /* @__PURE__ */
|
|
843
|
+
return /* @__PURE__ */ a(
|
|
605
844
|
"select",
|
|
606
845
|
{
|
|
607
|
-
value:
|
|
608
|
-
onChange: (
|
|
609
|
-
className:
|
|
610
|
-
children: (
|
|
846
|
+
value: t ?? ((p = e.options) == null ? void 0 : p[0]) ?? "",
|
|
847
|
+
onChange: (m) => i(m.target.value),
|
|
848
|
+
className: z,
|
|
849
|
+
children: (b = e.options) == null ? void 0 : b.map((m) => /* @__PURE__ */ a("option", { value: m, children: m }, m))
|
|
611
850
|
}
|
|
612
851
|
);
|
|
613
852
|
case "translate":
|
|
614
|
-
return /* @__PURE__ */
|
|
615
|
-
|
|
853
|
+
return /* @__PURE__ */ a(
|
|
854
|
+
aa,
|
|
616
855
|
{
|
|
617
|
-
value:
|
|
618
|
-
onChange:
|
|
856
|
+
value: t,
|
|
857
|
+
onChange: i
|
|
619
858
|
}
|
|
620
859
|
);
|
|
621
860
|
case "dasharray":
|
|
622
861
|
case "stringArray": {
|
|
623
|
-
const
|
|
624
|
-
return /* @__PURE__ */
|
|
862
|
+
const m = t, w = m ? m.join(", ") : "";
|
|
863
|
+
return /* @__PURE__ */ a(
|
|
625
864
|
"input",
|
|
626
865
|
{
|
|
627
866
|
type: "text",
|
|
628
|
-
value:
|
|
867
|
+
value: w,
|
|
629
868
|
onChange: (d) => {
|
|
630
869
|
const f = d.target.value.trim();
|
|
631
870
|
if (!f) {
|
|
632
|
-
|
|
871
|
+
i(void 0);
|
|
633
872
|
return;
|
|
634
873
|
}
|
|
635
|
-
if (
|
|
636
|
-
const
|
|
637
|
-
|
|
874
|
+
if (e.widget === "dasharray") {
|
|
875
|
+
const c = f.split(",").map((u) => parseFloat(u.trim())).filter((u) => !isNaN(u));
|
|
876
|
+
i(c.length > 0 ? c : void 0);
|
|
638
877
|
} else {
|
|
639
|
-
const
|
|
640
|
-
|
|
878
|
+
const c = f.split(",").map((u) => u.trim()).filter(Boolean);
|
|
879
|
+
i(c.length > 0 ? c : void 0);
|
|
641
880
|
}
|
|
642
881
|
},
|
|
643
|
-
placeholder:
|
|
644
|
-
className:
|
|
882
|
+
placeholder: e.widget === "dasharray" ? "e.g. 2, 4" : "comma-separated",
|
|
883
|
+
className: z
|
|
645
884
|
}
|
|
646
885
|
);
|
|
647
886
|
}
|
|
648
887
|
case "text":
|
|
649
|
-
return /* @__PURE__ */
|
|
888
|
+
return /* @__PURE__ */ a(
|
|
650
889
|
"input",
|
|
651
890
|
{
|
|
652
891
|
type: "text",
|
|
653
|
-
value:
|
|
654
|
-
onChange: (
|
|
655
|
-
className:
|
|
892
|
+
value: t ?? "",
|
|
893
|
+
onChange: (m) => i(m.target.value || void 0),
|
|
894
|
+
className: z
|
|
656
895
|
}
|
|
657
896
|
);
|
|
658
897
|
case "icon-image":
|
|
659
|
-
return /* @__PURE__ */
|
|
660
|
-
|
|
898
|
+
return /* @__PURE__ */ a(
|
|
899
|
+
Je,
|
|
661
900
|
{
|
|
662
|
-
value:
|
|
663
|
-
onChange: (
|
|
664
|
-
availableIcons:
|
|
901
|
+
value: t ?? "",
|
|
902
|
+
onChange: (m) => i(m ?? void 0),
|
|
903
|
+
availableIcons: r
|
|
665
904
|
}
|
|
666
905
|
);
|
|
667
906
|
default:
|
|
668
907
|
return null;
|
|
669
908
|
}
|
|
670
909
|
}
|
|
671
|
-
function
|
|
672
|
-
const
|
|
673
|
-
if (
|
|
674
|
-
const
|
|
675
|
-
return /* @__PURE__ */
|
|
910
|
+
function ia({ def: e, value: t, onChange: i, availableIcons: r, availableProperties: n, onFetchDistinctValues: o }) {
|
|
911
|
+
const p = e.enableDefault !== void 0, b = t !== void 0;
|
|
912
|
+
if (p && e.widget === "boolean") {
|
|
913
|
+
const m = !e.enableDefault;
|
|
914
|
+
return /* @__PURE__ */ a(S, { label: e.label, description: e.description, children: /* @__PURE__ */ a(
|
|
676
915
|
"input",
|
|
677
916
|
{
|
|
678
917
|
type: "checkbox",
|
|
679
|
-
checked:
|
|
680
|
-
onChange: (
|
|
681
|
-
|
|
918
|
+
checked: t === m,
|
|
919
|
+
onChange: (w) => {
|
|
920
|
+
i(e.key, w.target.checked ? m : void 0);
|
|
682
921
|
},
|
|
683
922
|
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
684
923
|
}
|
|
685
924
|
) });
|
|
686
925
|
}
|
|
687
|
-
return
|
|
688
|
-
/* @__PURE__ */
|
|
926
|
+
return p ? /* @__PURE__ */ a(S, { label: e.label, description: e.description, children: /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
927
|
+
/* @__PURE__ */ a(
|
|
689
928
|
"input",
|
|
690
929
|
{
|
|
691
930
|
type: "checkbox",
|
|
692
|
-
checked:
|
|
693
|
-
onChange: (
|
|
694
|
-
|
|
931
|
+
checked: b,
|
|
932
|
+
onChange: (m) => {
|
|
933
|
+
i(e.key, m.target.checked ? e.enableDefault : void 0);
|
|
695
934
|
},
|
|
696
935
|
className: "mapui:h-4 mapui:w-4 mapui:shrink-0 mapui:accent-blue-600"
|
|
697
936
|
}
|
|
698
937
|
),
|
|
699
|
-
|
|
700
|
-
|
|
938
|
+
b && /* @__PURE__ */ a(
|
|
939
|
+
fe,
|
|
701
940
|
{
|
|
702
|
-
def:
|
|
703
|
-
value:
|
|
704
|
-
onChange: (
|
|
705
|
-
availableIcons:
|
|
941
|
+
def: e,
|
|
942
|
+
value: t,
|
|
943
|
+
onChange: (m) => i(e.key, m),
|
|
944
|
+
availableIcons: r,
|
|
945
|
+
availableProperties: n,
|
|
946
|
+
onFetchDistinctValues: o
|
|
706
947
|
}
|
|
707
948
|
)
|
|
708
|
-
] }) }) : /* @__PURE__ */
|
|
949
|
+
] }) }) : /* @__PURE__ */ a(S, { label: e.label, description: e.description, children: /* @__PURE__ */ a(
|
|
950
|
+
fe,
|
|
951
|
+
{
|
|
952
|
+
def: e,
|
|
953
|
+
value: t,
|
|
954
|
+
onChange: (m) => i(e.key, m),
|
|
955
|
+
availableIcons: r,
|
|
956
|
+
availableProperties: n,
|
|
957
|
+
onFetchDistinctValues: o
|
|
958
|
+
}
|
|
959
|
+
) });
|
|
709
960
|
}
|
|
710
|
-
function
|
|
711
|
-
title:
|
|
712
|
-
properties:
|
|
713
|
-
values:
|
|
714
|
-
onChange:
|
|
715
|
-
defaultOpen:
|
|
716
|
-
availableIcons:
|
|
961
|
+
function xe({
|
|
962
|
+
title: e,
|
|
963
|
+
properties: t,
|
|
964
|
+
values: i,
|
|
965
|
+
onChange: r,
|
|
966
|
+
defaultOpen: n = !1,
|
|
967
|
+
availableIcons: o,
|
|
968
|
+
availableProperties: p,
|
|
969
|
+
onFetchDistinctValues: b
|
|
717
970
|
}) {
|
|
718
|
-
const
|
|
719
|
-
(
|
|
971
|
+
const m = t.filter(
|
|
972
|
+
(w) => w.enableDefault !== void 0 && i[w.key] !== void 0
|
|
720
973
|
).length;
|
|
721
|
-
return /* @__PURE__ */
|
|
974
|
+
return /* @__PURE__ */ a(_, { title: e, defaultOpen: n, badge: m || void 0, children: /* @__PURE__ */ a("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: t.map((w) => /* @__PURE__ */ a(
|
|
975
|
+
ia,
|
|
976
|
+
{
|
|
977
|
+
def: w,
|
|
978
|
+
value: i[w.key],
|
|
979
|
+
onChange: r,
|
|
980
|
+
availableIcons: o,
|
|
981
|
+
availableProperties: p,
|
|
982
|
+
onFetchDistinctValues: b
|
|
983
|
+
},
|
|
984
|
+
w.key
|
|
985
|
+
)) }) });
|
|
986
|
+
}
|
|
987
|
+
function G(e) {
|
|
988
|
+
return Array.isArray(e);
|
|
989
|
+
}
|
|
990
|
+
function ra(e) {
|
|
991
|
+
return e[0] === "match" ? "match" : e[0] === "interpolate" ? "interpolate" : null;
|
|
992
|
+
}
|
|
993
|
+
function Oe(e) {
|
|
994
|
+
if (e[0] === "match") {
|
|
995
|
+
const t = [];
|
|
996
|
+
for (let r = 3; r < e.length; r += 2)
|
|
997
|
+
typeof e[r] == "string" && t.push(e[r]);
|
|
998
|
+
const i = e[e.length - 1];
|
|
999
|
+
return typeof i == "string" && t.push(i), t;
|
|
1000
|
+
}
|
|
1001
|
+
if (e[0] === "interpolate") {
|
|
1002
|
+
const t = [];
|
|
1003
|
+
for (let i = 4; i < e.length; i += 2)
|
|
1004
|
+
typeof e[i] == "string" && t.push(e[i]);
|
|
1005
|
+
return t;
|
|
1006
|
+
}
|
|
1007
|
+
return [];
|
|
1008
|
+
}
|
|
1009
|
+
function la(e) {
|
|
1010
|
+
if (e[0] === "match") {
|
|
1011
|
+
const t = [];
|
|
1012
|
+
for (let r = 2; r < e.length - 1; r += 2) {
|
|
1013
|
+
const n = String(e[r]), o = e[r + 1];
|
|
1014
|
+
typeof o == "string" && t.push({ label: n, color: o });
|
|
1015
|
+
}
|
|
1016
|
+
const i = e[e.length - 1];
|
|
1017
|
+
return typeof i == "string" && t.push({ label: "Other", color: i }), t;
|
|
1018
|
+
}
|
|
1019
|
+
if (e[0] === "interpolate") {
|
|
1020
|
+
const t = [];
|
|
1021
|
+
for (let i = 3; i < e.length; i += 2) {
|
|
1022
|
+
const r = String(e[i]), n = e[i + 1];
|
|
1023
|
+
typeof n == "string" && t.push({ label: r, color: n });
|
|
1024
|
+
}
|
|
1025
|
+
return t;
|
|
1026
|
+
}
|
|
1027
|
+
return [];
|
|
1028
|
+
}
|
|
1029
|
+
function na(e) {
|
|
1030
|
+
const t = e[0] === "match" ? e[1] : e[0] === "interpolate" ? e[2] : null;
|
|
1031
|
+
return Array.isArray(t) && t[0] === "get" && typeof t[1] == "string" ? t[1] : null;
|
|
1032
|
+
}
|
|
1033
|
+
function pa(e) {
|
|
1034
|
+
switch (e.type) {
|
|
1035
|
+
case "fill":
|
|
1036
|
+
return e.paint["fill-color"] ?? "#000000";
|
|
1037
|
+
case "line":
|
|
1038
|
+
return e.paint["line-color"] ?? "#000000";
|
|
1039
|
+
case "circle":
|
|
1040
|
+
return e.paint["circle-color"] ?? "#000000";
|
|
1041
|
+
case "symbol":
|
|
1042
|
+
return e.paint["text-color"] ?? e.paint["icon-color"] ?? "#000000";
|
|
1043
|
+
}
|
|
722
1044
|
}
|
|
723
|
-
function
|
|
724
|
-
|
|
1045
|
+
function oa(e) {
|
|
1046
|
+
switch (e.type) {
|
|
1047
|
+
case "fill":
|
|
1048
|
+
return "square";
|
|
1049
|
+
case "line":
|
|
1050
|
+
return "line";
|
|
1051
|
+
case "circle":
|
|
1052
|
+
case "symbol":
|
|
1053
|
+
return "circle";
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
function ie({ expr: e, height: t }) {
|
|
1057
|
+
const i = Oe(e);
|
|
1058
|
+
if (i.length === 0)
|
|
1059
|
+
return /* @__PURE__ */ a(
|
|
1060
|
+
"div",
|
|
1061
|
+
{
|
|
1062
|
+
style: { width: "100%", height: t ?? 32, background: "#e5e7eb", borderRadius: 4 },
|
|
1063
|
+
title: "Expression (no preview)"
|
|
1064
|
+
}
|
|
1065
|
+
);
|
|
1066
|
+
const r = e[0] === "interpolate", n = r ? `linear-gradient(to right, ${i.join(", ")})` : i.map((o, p) => `${o} ${p / i.length * 100}% ${(p + 1) / i.length * 100}%`).join(", ");
|
|
1067
|
+
return /* @__PURE__ */ a(
|
|
725
1068
|
"div",
|
|
726
1069
|
{
|
|
727
|
-
className: "mapui:h-8 mapui:w-full mapui:rounded mapui:border mapui:border-gray-200",
|
|
728
1070
|
style: {
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
1071
|
+
width: "100%",
|
|
1072
|
+
height: t ?? 32,
|
|
1073
|
+
background: r ? n : `linear-gradient(to right, ${n})`,
|
|
1074
|
+
borderRadius: 4
|
|
732
1075
|
},
|
|
733
|
-
|
|
1076
|
+
title: "Data-driven color expression"
|
|
734
1077
|
}
|
|
735
|
-
)
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
1078
|
+
);
|
|
1079
|
+
}
|
|
1080
|
+
function we(e, t) {
|
|
1081
|
+
return typeof e == "string" ? e : G(e) ? Oe(e)[0] ?? t : t;
|
|
1082
|
+
}
|
|
1083
|
+
function ua({ style: e }) {
|
|
1084
|
+
if (e.type === "fill") {
|
|
1085
|
+
const r = e.paint["fill-color"];
|
|
1086
|
+
return /* @__PURE__ */ a(
|
|
1087
|
+
"div",
|
|
1088
|
+
{
|
|
1089
|
+
className: "mapui:h-8 mapui:w-full mapui:rounded mapui:border mapui:border-gray-200 mapui:overflow-hidden",
|
|
1090
|
+
"aria-label": "Style preview",
|
|
1091
|
+
children: G(r) ? /* @__PURE__ */ a(ie, { expr: r, height: 32 }) : /* @__PURE__ */ a(
|
|
1092
|
+
"div",
|
|
1093
|
+
{
|
|
1094
|
+
style: {
|
|
1095
|
+
width: "100%",
|
|
1096
|
+
height: "100%",
|
|
1097
|
+
backgroundColor: r,
|
|
1098
|
+
opacity: e.paint["fill-opacity"],
|
|
1099
|
+
outline: e.paint["fill-outline-color"] && !G(e.paint["fill-outline-color"]) ? `2px solid ${e.paint["fill-outline-color"]}` : void 0
|
|
1100
|
+
}
|
|
748
1101
|
}
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
"
|
|
757
|
-
|
|
758
|
-
"
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
1102
|
+
)
|
|
1103
|
+
}
|
|
1104
|
+
);
|
|
1105
|
+
}
|
|
1106
|
+
if (e.type === "line") {
|
|
1107
|
+
const r = e.paint["line-color"];
|
|
1108
|
+
return /* @__PURE__ */ a(
|
|
1109
|
+
"div",
|
|
1110
|
+
{
|
|
1111
|
+
className: "mapui:flex mapui:h-8 mapui:w-full mapui:items-center mapui:rounded mapui:border mapui:border-gray-200 mapui:px-2",
|
|
1112
|
+
"aria-label": "Style preview",
|
|
1113
|
+
children: G(r) ? /* @__PURE__ */ a(ie, { expr: r, height: e.paint["line-width"] }) : /* @__PURE__ */ a(
|
|
1114
|
+
"div",
|
|
1115
|
+
{
|
|
1116
|
+
style: {
|
|
1117
|
+
width: "100%",
|
|
1118
|
+
height: e.paint["line-width"],
|
|
1119
|
+
backgroundColor: r,
|
|
1120
|
+
opacity: e.paint["line-opacity"]
|
|
1121
|
+
}
|
|
767
1122
|
}
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
1123
|
+
)
|
|
1124
|
+
}
|
|
1125
|
+
);
|
|
1126
|
+
}
|
|
1127
|
+
if (e.type === "circle") {
|
|
1128
|
+
const r = e.paint["circle-color"], n = e.paint["circle-radius"] * 2;
|
|
1129
|
+
return /* @__PURE__ */ a(
|
|
1130
|
+
"div",
|
|
1131
|
+
{
|
|
1132
|
+
className: "mapui:flex mapui:h-8 mapui:w-full mapui:items-center mapui:justify-center mapui:rounded mapui:border mapui:border-gray-200",
|
|
1133
|
+
"aria-label": "Style preview",
|
|
1134
|
+
children: G(r) ? /* @__PURE__ */ a("div", { style: { width: n, height: n, borderRadius: "50%", overflow: "hidden" }, children: /* @__PURE__ */ a(ie, { expr: r, height: n }) }) : /* @__PURE__ */ a(
|
|
1135
|
+
"div",
|
|
1136
|
+
{
|
|
1137
|
+
style: {
|
|
1138
|
+
width: n,
|
|
1139
|
+
height: n,
|
|
1140
|
+
backgroundColor: r,
|
|
1141
|
+
opacity: e.paint["circle-opacity"],
|
|
1142
|
+
borderRadius: "50%",
|
|
1143
|
+
border: e.paint["circle-stroke-color"] && !G(e.paint["circle-stroke-color"]) ? `${e.paint["circle-stroke-width"] ?? 1}px solid ${e.paint["circle-stroke-color"]}` : void 0
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
)
|
|
1147
|
+
}
|
|
1148
|
+
);
|
|
1149
|
+
}
|
|
1150
|
+
const t = we(e.paint["text-color"], "#333333"), i = we(e.paint["icon-color"], "#333333");
|
|
1151
|
+
return /* @__PURE__ */ a(
|
|
772
1152
|
"div",
|
|
773
1153
|
{
|
|
774
1154
|
className: "mapui:flex mapui:h-8 mapui:w-full mapui:items-center mapui:justify-center mapui:rounded mapui:border mapui:border-gray-200",
|
|
775
1155
|
"aria-label": "Style preview",
|
|
776
|
-
children: /* @__PURE__ */
|
|
1156
|
+
children: /* @__PURE__ */ a(
|
|
777
1157
|
"span",
|
|
778
1158
|
{
|
|
779
1159
|
style: {
|
|
780
|
-
color:
|
|
1160
|
+
color: t ?? i ?? "#333333",
|
|
781
1161
|
fontSize: "1.1rem",
|
|
782
1162
|
fontWeight: 600
|
|
783
1163
|
},
|
|
@@ -787,7 +1167,7 @@ function Re({ style: a }) {
|
|
|
787
1167
|
}
|
|
788
1168
|
);
|
|
789
1169
|
}
|
|
790
|
-
const
|
|
1170
|
+
const ma = [
|
|
791
1171
|
// Appearance (paint)
|
|
792
1172
|
{ key: "fill-color", label: "Fill Color", widget: "color", group: "Appearance", category: "paint" },
|
|
793
1173
|
{ key: "fill-opacity", label: "Fill Opacity", widget: "opacity", group: "Appearance", category: "paint" },
|
|
@@ -799,7 +1179,7 @@ const $e = [
|
|
|
799
1179
|
{ key: "fill-translate-anchor", label: "Translate Anchor", widget: "enum", group: "Transform", category: "paint", options: ["map", "viewport"], enableDefault: "map", description: '"map" moves the fill with the map when panning; "viewport" keeps the offset fixed on screen.' },
|
|
800
1180
|
// Sorting (layout)
|
|
801
1181
|
{ key: "fill-sort-key", label: "Sort Key", widget: "number", group: "Sorting", category: "layout", step: 1, enableDefault: 0, description: "Features with a higher sort key are drawn on top of features with a lower sort key within this layer." }
|
|
802
|
-
],
|
|
1182
|
+
], sa = [
|
|
803
1183
|
// Appearance (paint)
|
|
804
1184
|
{ key: "line-color", label: "Line Color", widget: "color", group: "Appearance", category: "paint" },
|
|
805
1185
|
{ key: "line-width", label: "Line Width", widget: "number", group: "Appearance", category: "paint", min: 0, step: 0.5 },
|
|
@@ -820,7 +1200,7 @@ const $e = [
|
|
|
820
1200
|
{ key: "line-round-limit", label: "Round Limit", widget: "number", group: "Cap & Join", category: "layout", step: 0.1, enableDefault: 1.05, description: 'When line-join is "round", angles sharper than this threshold (in radians) are bevelled instead of rounded.' },
|
|
821
1201
|
// Sorting (layout)
|
|
822
1202
|
{ key: "line-sort-key", label: "Sort Key", widget: "number", group: "Sorting", category: "layout", step: 1, enableDefault: 0, description: "Features with a higher sort key are drawn on top of features with a lower sort key within this layer." }
|
|
823
|
-
],
|
|
1203
|
+
], ca = [
|
|
824
1204
|
// Appearance (paint)
|
|
825
1205
|
{ key: "circle-color", label: "Circle Color", widget: "color", group: "Appearance", category: "paint" },
|
|
826
1206
|
{ key: "circle-radius", label: "Radius", widget: "number", group: "Appearance", category: "paint", min: 0, step: 1 },
|
|
@@ -838,7 +1218,7 @@ const $e = [
|
|
|
838
1218
|
{ key: "circle-pitch-alignment", label: "Pitch Alignment", widget: "enum", group: "Alignment", category: "paint", options: ["map", "viewport"], enableDefault: "viewport", description: '"map" orients circles flat on the map surface; "viewport" keeps circles facing the screen (default).' },
|
|
839
1219
|
// Sorting (layout)
|
|
840
1220
|
{ key: "circle-sort-key", label: "Sort Key", widget: "number", group: "Sorting", category: "layout", step: 1, enableDefault: 0, description: "Features with a higher sort key are drawn on top of features with a lower sort key within this layer." }
|
|
841
|
-
],
|
|
1221
|
+
], da = [
|
|
842
1222
|
// Icon Appearance (paint)
|
|
843
1223
|
{ key: "icon-color", label: "Icon Color", widget: "color", group: "Icon Appearance", category: "paint", enableDefault: "#000000" },
|
|
844
1224
|
{ key: "icon-opacity", label: "Icon Opacity", widget: "opacity", group: "Icon Appearance", category: "paint", enableDefault: 1 },
|
|
@@ -887,222 +1267,346 @@ const $e = [
|
|
|
887
1267
|
{ key: "symbol-avoid-edges", label: "Avoid Edges", widget: "boolean", group: "Placement", category: "layout", enableDefault: !1, description: "When enabled, symbols near tile edges are hidden to avoid being clipped or doubled at tile boundaries." },
|
|
888
1268
|
{ key: "symbol-sort-key", label: "Sort Key", widget: "number", group: "Placement", category: "layout", step: 1, enableDefault: 0, description: "Features with a higher sort key are prioritised in collision detection and drawn on top within this layer." },
|
|
889
1269
|
{ key: "symbol-z-order", label: "Z-Order", widget: "enum", group: "Placement", category: "layout", options: ["auto", "viewport-y", "source"], enableDefault: "auto", description: '"viewport-y" renders symbols in top-to-bottom screen order (closer = higher); "source" preserves data source order; "auto" uses "viewport-y" when sort-key is unset.' }
|
|
890
|
-
],
|
|
891
|
-
fill:
|
|
892
|
-
line:
|
|
893
|
-
circle:
|
|
894
|
-
symbol:
|
|
1270
|
+
], ha = {
|
|
1271
|
+
fill: ma,
|
|
1272
|
+
line: sa,
|
|
1273
|
+
circle: ca,
|
|
1274
|
+
symbol: da
|
|
895
1275
|
};
|
|
896
|
-
function
|
|
897
|
-
return
|
|
1276
|
+
function ga(e) {
|
|
1277
|
+
return ha[e] ?? [];
|
|
898
1278
|
}
|
|
899
|
-
function
|
|
900
|
-
const
|
|
901
|
-
for (const
|
|
902
|
-
i
|
|
903
|
-
return
|
|
1279
|
+
function ve(e) {
|
|
1280
|
+
const t = {};
|
|
1281
|
+
for (const i of e)
|
|
1282
|
+
t[i.group] || (t[i.group] = []), t[i.group].push(i);
|
|
1283
|
+
return t;
|
|
904
1284
|
}
|
|
905
|
-
const
|
|
1285
|
+
const me = {
|
|
906
1286
|
type: "fill",
|
|
907
1287
|
paint: { "fill-color": "#4a90d9", "fill-opacity": 0.6, "fill-outline-color": "transparent", "fill-antialias": !0 }
|
|
908
|
-
},
|
|
1288
|
+
}, je = {
|
|
909
1289
|
type: "line",
|
|
910
1290
|
paint: { "line-color": "#2980b9", "line-width": 2, "line-opacity": 1 }
|
|
911
|
-
},
|
|
1291
|
+
}, $e = {
|
|
912
1292
|
type: "circle",
|
|
913
1293
|
paint: { "circle-color": "#e74c3c", "circle-radius": 5, "circle-opacity": 0.9 }
|
|
914
|
-
},
|
|
1294
|
+
}, Re = {
|
|
915
1295
|
type: "symbol",
|
|
916
1296
|
paint: { "text-color": "#333333" },
|
|
917
1297
|
layout: { "text-field": "{name}", "text-size": 14 }
|
|
918
|
-
},
|
|
1298
|
+
}, ba = {
|
|
919
1299
|
layout: { "icon-image": "" }
|
|
920
1300
|
};
|
|
921
|
-
function
|
|
922
|
-
if (
|
|
923
|
-
const
|
|
924
|
-
return
|
|
1301
|
+
function Ne(e) {
|
|
1302
|
+
if (e.type !== "symbol") return "text";
|
|
1303
|
+
const t = e.layout ?? {}, i = "icon-image" in t, r = "text-field" in t;
|
|
1304
|
+
return i && r ? "both" : i ? "icon" : "text";
|
|
925
1305
|
}
|
|
926
|
-
const
|
|
1306
|
+
const ya = "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", K = {
|
|
927
1307
|
fill: "Fill",
|
|
928
1308
|
line: "Line",
|
|
929
1309
|
circle: "Circle",
|
|
930
1310
|
symbol: "Symbol"
|
|
931
|
-
},
|
|
932
|
-
function
|
|
933
|
-
const [
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
}, [
|
|
937
|
-
const
|
|
938
|
-
|
|
939
|
-
},
|
|
940
|
-
if (y ===
|
|
941
|
-
const
|
|
942
|
-
let
|
|
943
|
-
y === "icon" ? (
|
|
944
|
-
...
|
|
945
|
-
paint:
|
|
946
|
-
layout: Object.keys(
|
|
1311
|
+
}, fa = ["text", "icon", "both"];
|
|
1312
|
+
function xa({ value: e, onChange: t, suggestedType: i, suggestedTypes: r, availableIcons: n, availableProperties: o, onFetchDistinctValues: p }) {
|
|
1313
|
+
const b = r ?? (i ? [i] : []), [m, w] = L(() => Ne(e));
|
|
1314
|
+
X(() => {
|
|
1315
|
+
w(Ne(e));
|
|
1316
|
+
}, [e.type]);
|
|
1317
|
+
const d = (y) => {
|
|
1318
|
+
t(y === "fill" ? me : y === "line" ? je : y === "circle" ? $e : Re);
|
|
1319
|
+
}, f = (y) => {
|
|
1320
|
+
if (y === m) return;
|
|
1321
|
+
const F = e.paint ?? {}, M = e.layout ?? {};
|
|
1322
|
+
let g = { ...F }, N = { ...M };
|
|
1323
|
+
y === "icon" ? (g = Object.fromEntries(Object.entries(g).filter(([O]) => !O.startsWith("text-"))), N = Object.fromEntries(Object.entries(N).filter(([O]) => !O.startsWith("text-"))), "icon-image" in N || (N["icon-image"] = ba.layout["icon-image"])) : y === "text" && (g = Object.fromEntries(Object.entries(g).filter(([O]) => !O.startsWith("icon-"))), N = Object.fromEntries(Object.entries(N).filter(([O]) => !O.startsWith("icon-"))), "text-field" in N || (N["text-field"] = "{name}"), "text-size" in N || (N["text-size"] = 14), "text-color" in g || (g["text-color"] = "#333333")), w(y), t({
|
|
1324
|
+
...e,
|
|
1325
|
+
paint: g,
|
|
1326
|
+
layout: Object.keys(N).length > 0 ? N : void 0
|
|
947
1327
|
});
|
|
948
|
-
},
|
|
949
|
-
const
|
|
950
|
-
for (const
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
},
|
|
954
|
-
const
|
|
955
|
-
for (const
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
...
|
|
959
|
-
layout: Object.keys(
|
|
1328
|
+
}, c = (y, F) => {
|
|
1329
|
+
const M = { ...e.paint, [y]: F };
|
|
1330
|
+
for (const g of Object.keys(M))
|
|
1331
|
+
M[g] === void 0 && delete M[g];
|
|
1332
|
+
t({ ...e, paint: M });
|
|
1333
|
+
}, u = (y, F) => {
|
|
1334
|
+
const g = { ...e.layout ?? {}, [y]: F };
|
|
1335
|
+
for (const N of Object.keys(g))
|
|
1336
|
+
g[N] === void 0 && delete g[N];
|
|
1337
|
+
t({
|
|
1338
|
+
...e,
|
|
1339
|
+
layout: Object.keys(g).length > 0 ? g : void 0
|
|
960
1340
|
});
|
|
961
1341
|
};
|
|
962
|
-
let s =
|
|
963
|
-
|
|
964
|
-
const
|
|
1342
|
+
let s = ga(e.type);
|
|
1343
|
+
e.type === "symbol" && (m === "text" ? s = s.filter((y) => !y.key.startsWith("icon-")) : m === "icon" && (s = s.filter((y) => !y.key.startsWith("text-"))));
|
|
1344
|
+
const v = s.filter((y) => y.category === "paint"), k = s.filter((y) => y.category === "layout"), D = ve(v), x = ve(k), $ = e.paint, C = e.layout ?? {}, P = Object.keys(D), E = Object.keys(x);
|
|
965
1345
|
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
966
|
-
|
|
1346
|
+
b.length > 0 && !b.includes(e.type) && /* @__PURE__ */ l("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: [
|
|
967
1347
|
/* @__PURE__ */ l("span", { children: [
|
|
968
|
-
"Detected geometry
|
|
969
|
-
|
|
970
|
-
"
|
|
1348
|
+
"Detected geometry is suitable for",
|
|
1349
|
+
" ",
|
|
1350
|
+
b.map((y, F) => /* @__PURE__ */ l("span", { children: [
|
|
1351
|
+
F > 0 && (F === b.length - 1 ? " or " : ", "),
|
|
1352
|
+
/* @__PURE__ */ a("strong", { children: K[y] })
|
|
1353
|
+
] }, y)),
|
|
1354
|
+
" ",
|
|
1355
|
+
"style."
|
|
971
1356
|
] }),
|
|
972
|
-
/* @__PURE__ */
|
|
1357
|
+
/* @__PURE__ */ a("div", { className: "mapui:flex mapui:gap-1", children: b.map((y) => /* @__PURE__ */ a(
|
|
973
1358
|
"button",
|
|
974
1359
|
{
|
|
975
1360
|
type: "button",
|
|
976
|
-
onClick: () =>
|
|
1361
|
+
onClick: () => d(y),
|
|
977
1362
|
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",
|
|
978
|
-
children:
|
|
979
|
-
}
|
|
980
|
-
|
|
1363
|
+
children: K[y]
|
|
1364
|
+
},
|
|
1365
|
+
y
|
|
1366
|
+
)) })
|
|
981
1367
|
] }),
|
|
982
|
-
/* @__PURE__ */
|
|
1368
|
+
/* @__PURE__ */ a(S, { label: "Style Type", children: /* @__PURE__ */ a(
|
|
983
1369
|
"select",
|
|
984
1370
|
{
|
|
985
|
-
value:
|
|
986
|
-
onChange: (y) =>
|
|
987
|
-
className:
|
|
988
|
-
children: Object.keys(
|
|
1371
|
+
value: e.type,
|
|
1372
|
+
onChange: (y) => d(y.target.value),
|
|
1373
|
+
className: ya,
|
|
1374
|
+
children: Object.keys(K).map((y) => /* @__PURE__ */ a("option", { value: y, children: K[y] }, y))
|
|
989
1375
|
}
|
|
990
1376
|
) }),
|
|
991
|
-
|
|
1377
|
+
e.type === "symbol" && /* @__PURE__ */ a(S, { label: "Symbol Mode", children: /* @__PURE__ */ a("div", { className: "mapui:flex mapui:overflow-hidden mapui:rounded mapui:border mapui:border-gray-300", children: fa.map((y) => /* @__PURE__ */ a(
|
|
992
1378
|
"button",
|
|
993
1379
|
{
|
|
994
1380
|
type: "button",
|
|
995
|
-
onClick: () =>
|
|
1381
|
+
onClick: () => f(y),
|
|
996
1382
|
className: [
|
|
997
1383
|
"mapui:flex-1 mapui:cursor-pointer mapui:border-0 mapui:px-3 mapui:py-1 mapui:text-sm mapui:capitalize mapui:outline-none",
|
|
998
1384
|
"focus:mapui:ring-1 focus:mapui:ring-inset focus:mapui:ring-blue-400",
|
|
999
|
-
|
|
1385
|
+
m === y ? "mapui:bg-blue-500 mapui:text-white" : "mapui:bg-white mapui:text-gray-700 hover:mapui:bg-gray-50"
|
|
1000
1386
|
].join(" "),
|
|
1001
1387
|
children: y === "both" ? "Both" : y.charAt(0).toUpperCase() + y.slice(1)
|
|
1002
1388
|
},
|
|
1003
1389
|
y
|
|
1004
1390
|
)) }) }),
|
|
1005
1391
|
/* @__PURE__ */ l("div", { className: "mapui:rounded mapui:border mapui:border-gray-100 mapui:p-2", children: [
|
|
1006
|
-
/* @__PURE__ */
|
|
1007
|
-
/* @__PURE__ */
|
|
1392
|
+
/* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-1 mapui:text-xs mapui:text-gray-500", children: "Preview" }),
|
|
1393
|
+
/* @__PURE__ */ a(ua, { style: e })
|
|
1008
1394
|
] }),
|
|
1009
|
-
|
|
1010
|
-
/* @__PURE__ */
|
|
1011
|
-
|
|
1012
|
-
|
|
1395
|
+
E.length > 0 && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
|
|
1396
|
+
/* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-xs mapui:font-medium mapui:uppercase mapui:tracking-wide mapui:text-gray-500", children: "Layout" }),
|
|
1397
|
+
E.map((y, F) => /* @__PURE__ */ a(
|
|
1398
|
+
xe,
|
|
1013
1399
|
{
|
|
1014
1400
|
title: y,
|
|
1015
|
-
properties:
|
|
1016
|
-
values:
|
|
1017
|
-
onChange:
|
|
1018
|
-
defaultOpen:
|
|
1019
|
-
availableIcons:
|
|
1401
|
+
properties: x[y],
|
|
1402
|
+
values: C,
|
|
1403
|
+
onChange: u,
|
|
1404
|
+
defaultOpen: F === 0,
|
|
1405
|
+
availableIcons: n,
|
|
1406
|
+
availableProperties: o,
|
|
1407
|
+
onFetchDistinctValues: p
|
|
1020
1408
|
},
|
|
1021
1409
|
y
|
|
1022
1410
|
))
|
|
1023
1411
|
] }),
|
|
1024
|
-
|
|
1025
|
-
/* @__PURE__ */
|
|
1026
|
-
|
|
1027
|
-
|
|
1412
|
+
P.length > 0 && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
|
|
1413
|
+
/* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-xs mapui:font-medium mapui:uppercase mapui:tracking-wide mapui:text-gray-500", children: "Paint" }),
|
|
1414
|
+
P.map((y) => /* @__PURE__ */ a(
|
|
1415
|
+
xe,
|
|
1028
1416
|
{
|
|
1029
1417
|
title: y,
|
|
1030
|
-
properties:
|
|
1031
|
-
values:
|
|
1032
|
-
onChange:
|
|
1418
|
+
properties: D[y],
|
|
1419
|
+
values: $,
|
|
1420
|
+
onChange: c,
|
|
1033
1421
|
defaultOpen: !1,
|
|
1034
|
-
availableIcons:
|
|
1422
|
+
availableIcons: n,
|
|
1423
|
+
availableProperties: o,
|
|
1424
|
+
onFetchDistinctValues: p
|
|
1035
1425
|
},
|
|
1036
1426
|
y
|
|
1037
1427
|
))
|
|
1038
1428
|
] })
|
|
1039
1429
|
] });
|
|
1040
1430
|
}
|
|
1041
|
-
const
|
|
1042
|
-
function
|
|
1431
|
+
const ke = "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";
|
|
1432
|
+
function wa({ value: e, onChange: t }) {
|
|
1043
1433
|
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
|
|
1044
|
-
/* @__PURE__ */
|
|
1434
|
+
/* @__PURE__ */ a(S, { label: "Label", children: /* @__PURE__ */ a(
|
|
1045
1435
|
"input",
|
|
1046
1436
|
{
|
|
1047
1437
|
type: "text",
|
|
1048
|
-
value:
|
|
1049
|
-
onChange: (
|
|
1438
|
+
value: e.label,
|
|
1439
|
+
onChange: (i) => t({ ...e, label: i.target.value }),
|
|
1050
1440
|
placeholder: "Legend entry label",
|
|
1051
|
-
className:
|
|
1441
|
+
className: ke
|
|
1052
1442
|
}
|
|
1053
1443
|
) }),
|
|
1054
|
-
/* @__PURE__ */
|
|
1055
|
-
|
|
1444
|
+
/* @__PURE__ */ a(S, { label: "Color", children: /* @__PURE__ */ a(
|
|
1445
|
+
Y,
|
|
1056
1446
|
{
|
|
1057
|
-
value:
|
|
1058
|
-
onChange: (
|
|
1447
|
+
value: e.color,
|
|
1448
|
+
onChange: (i) => t({ ...e, color: i }),
|
|
1059
1449
|
label: "Entry color"
|
|
1060
1450
|
}
|
|
1061
1451
|
) }),
|
|
1062
|
-
/* @__PURE__ */
|
|
1452
|
+
/* @__PURE__ */ a(S, { label: "Shape", children: /* @__PURE__ */ l(
|
|
1063
1453
|
"select",
|
|
1064
1454
|
{
|
|
1065
|
-
value:
|
|
1066
|
-
onChange: (
|
|
1067
|
-
className:
|
|
1455
|
+
value: e.shape ?? "square",
|
|
1456
|
+
onChange: (i) => t({ ...e, shape: i.target.value }),
|
|
1457
|
+
className: ke,
|
|
1068
1458
|
children: [
|
|
1069
|
-
/* @__PURE__ */
|
|
1070
|
-
/* @__PURE__ */
|
|
1071
|
-
/* @__PURE__ */
|
|
1459
|
+
/* @__PURE__ */ a("option", { value: "square", children: "Square" }),
|
|
1460
|
+
/* @__PURE__ */ a("option", { value: "circle", children: "Circle" }),
|
|
1461
|
+
/* @__PURE__ */ a("option", { value: "line", children: "Line" })
|
|
1072
1462
|
]
|
|
1073
1463
|
}
|
|
1074
1464
|
) })
|
|
1075
1465
|
] });
|
|
1076
1466
|
}
|
|
1077
|
-
const
|
|
1078
|
-
function
|
|
1079
|
-
const
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
const
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1467
|
+
const Ce = () => ({ label: "", color: "#4a90d9", shape: "square" }), re = 8, Se = "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";
|
|
1468
|
+
function va({ value: e, onChange: t, style: i }) {
|
|
1469
|
+
const r = (e == null ? void 0 : e.entries) ?? [], n = (e == null ? void 0 : e.displayMode) ?? "simple", o = Pe(() => {
|
|
1470
|
+
if (!i) return null;
|
|
1471
|
+
const c = pa(i);
|
|
1472
|
+
if (!G(c)) return null;
|
|
1473
|
+
const u = ra(c);
|
|
1474
|
+
if (!u) return null;
|
|
1475
|
+
const s = oa(i);
|
|
1476
|
+
return {
|
|
1477
|
+
entries: la(c).map((k) => ({
|
|
1478
|
+
label: k.label,
|
|
1479
|
+
color: k.color,
|
|
1480
|
+
shape: s
|
|
1481
|
+
})),
|
|
1482
|
+
mode: u === "interpolate" ? "gradient" : "categorical",
|
|
1483
|
+
property: na(c)
|
|
1484
|
+
};
|
|
1485
|
+
}, [i]), p = () => {
|
|
1486
|
+
t({ ...e, entries: [...r, Ce()] });
|
|
1487
|
+
}, b = (c, u) => {
|
|
1488
|
+
const s = r.map((v, k) => k === c ? u : v);
|
|
1489
|
+
t({ ...e, entries: s });
|
|
1490
|
+
}, m = (c) => {
|
|
1491
|
+
const u = r.filter((s, v) => v !== c);
|
|
1492
|
+
t(u.length > 0 ? { ...e, entries: u } : void 0);
|
|
1493
|
+
}, w = (c) => {
|
|
1494
|
+
t(c ? { entries: [Ce()] } : void 0);
|
|
1495
|
+
}, d = () => {
|
|
1496
|
+
o && t({
|
|
1497
|
+
entries: o.entries,
|
|
1498
|
+
displayMode: o.mode,
|
|
1499
|
+
...o.mode === "gradient" && o.property ? { gradientProperty: o.property } : {},
|
|
1500
|
+
...o.mode === "categorical" ? { showLabelsCollapsed: !1 } : {}
|
|
1501
|
+
});
|
|
1502
|
+
}, f = (c) => {
|
|
1503
|
+
if (!e) return;
|
|
1504
|
+
const u = { ...e, displayMode: c };
|
|
1505
|
+
c !== "categorical" && delete u.showLabelsCollapsed, c !== "gradient" && delete u.gradientProperty, t(u);
|
|
1089
1506
|
};
|
|
1090
1507
|
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
1091
1508
|
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
1092
|
-
/* @__PURE__ */
|
|
1509
|
+
/* @__PURE__ */ a(
|
|
1093
1510
|
"input",
|
|
1094
1511
|
{
|
|
1095
1512
|
type: "checkbox",
|
|
1096
1513
|
id: "legend-enabled",
|
|
1097
|
-
checked:
|
|
1098
|
-
onChange: (
|
|
1514
|
+
checked: e !== void 0,
|
|
1515
|
+
onChange: (c) => w(c.target.checked),
|
|
1099
1516
|
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
1100
1517
|
}
|
|
1101
1518
|
),
|
|
1102
|
-
/* @__PURE__ */
|
|
1519
|
+
/* @__PURE__ */ a("label", { htmlFor: "legend-enabled", className: "mapui:text-sm mapui:font-medium mapui:text-gray-700", children: "Enable Legend" })
|
|
1103
1520
|
] }),
|
|
1104
|
-
|
|
1105
|
-
/* @__PURE__ */
|
|
1521
|
+
e === void 0 && o && o.entries.length > 0 && /* @__PURE__ */ l("div", { className: "mapui:rounded mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
|
|
1522
|
+
/* @__PURE__ */ l("p", { className: "mapui:m-0 mapui:text-sm mapui:text-blue-800", children: [
|
|
1523
|
+
"This layer uses data-driven colors (",
|
|
1524
|
+
o.entries.length,
|
|
1525
|
+
" ",
|
|
1526
|
+
o.entries.length === 1 ? "category" : "categories",
|
|
1527
|
+
")"
|
|
1528
|
+
] }),
|
|
1529
|
+
/* @__PURE__ */ l("div", { className: "mapui:mt-2 mapui:flex mapui:flex-wrap mapui:items-center mapui:gap-1.5", children: [
|
|
1530
|
+
o.entries.slice(0, re).map((c, u) => /* @__PURE__ */ l(
|
|
1531
|
+
"div",
|
|
1532
|
+
{
|
|
1533
|
+
className: "mapui:flex mapui:items-center mapui:gap-1",
|
|
1534
|
+
title: c.label,
|
|
1535
|
+
children: [
|
|
1536
|
+
/* @__PURE__ */ a(
|
|
1537
|
+
"span",
|
|
1538
|
+
{
|
|
1539
|
+
className: "mapui:inline-block mapui:h-3 mapui:w-3 mapui:rounded-sm mapui:shrink-0",
|
|
1540
|
+
style: { backgroundColor: c.color }
|
|
1541
|
+
}
|
|
1542
|
+
),
|
|
1543
|
+
/* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-blue-700 mapui:truncate mapui:max-w-16", children: c.label })
|
|
1544
|
+
]
|
|
1545
|
+
},
|
|
1546
|
+
`${c.label}-${u}`
|
|
1547
|
+
)),
|
|
1548
|
+
o.entries.length > re && /* @__PURE__ */ l("span", { className: "mapui:text-xs mapui:text-blue-600", children: [
|
|
1549
|
+
"+",
|
|
1550
|
+
o.entries.length - re,
|
|
1551
|
+
" more"
|
|
1552
|
+
] })
|
|
1553
|
+
] }),
|
|
1554
|
+
/* @__PURE__ */ a(
|
|
1555
|
+
"button",
|
|
1556
|
+
{
|
|
1557
|
+
type: "button",
|
|
1558
|
+
onClick: d,
|
|
1559
|
+
className: "mapui:mt-2 mapui:cursor-pointer mapui:rounded mapui:border mapui:border-blue-300 mapui:bg-white mapui:px-3 mapui:py-1.5 mapui:text-sm mapui:font-medium mapui:text-blue-700 hover:mapui:bg-blue-100",
|
|
1560
|
+
children: "Generate from Style"
|
|
1561
|
+
}
|
|
1562
|
+
)
|
|
1563
|
+
] }),
|
|
1564
|
+
e !== void 0 && /* @__PURE__ */ l(B, { children: [
|
|
1565
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
1566
|
+
/* @__PURE__ */ a("label", { htmlFor: "legend-display-mode", className: "mapui:text-sm mapui:text-gray-700", children: "Display Mode" }),
|
|
1567
|
+
/* @__PURE__ */ l(
|
|
1568
|
+
"select",
|
|
1569
|
+
{
|
|
1570
|
+
id: "legend-display-mode",
|
|
1571
|
+
value: n,
|
|
1572
|
+
onChange: (c) => f(c.target.value),
|
|
1573
|
+
className: Se,
|
|
1574
|
+
children: [
|
|
1575
|
+
/* @__PURE__ */ a("option", { value: "simple", children: "Simple" }),
|
|
1576
|
+
/* @__PURE__ */ a("option", { value: "categorical", children: "Categorical" }),
|
|
1577
|
+
/* @__PURE__ */ a("option", { value: "gradient", children: "Gradient" })
|
|
1578
|
+
]
|
|
1579
|
+
}
|
|
1580
|
+
)
|
|
1581
|
+
] }),
|
|
1582
|
+
n === "categorical" && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
1583
|
+
/* @__PURE__ */ a(
|
|
1584
|
+
"input",
|
|
1585
|
+
{
|
|
1586
|
+
type: "checkbox",
|
|
1587
|
+
id: "legend-show-labels-collapsed",
|
|
1588
|
+
checked: e.showLabelsCollapsed ?? !1,
|
|
1589
|
+
onChange: (c) => t({ ...e, showLabelsCollapsed: c.target.checked }),
|
|
1590
|
+
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
1591
|
+
}
|
|
1592
|
+
),
|
|
1593
|
+
/* @__PURE__ */ a("label", { htmlFor: "legend-show-labels-collapsed", className: "mapui:text-sm mapui:text-gray-700", children: "Show labels in collapsed view" })
|
|
1594
|
+
] }),
|
|
1595
|
+
n === "gradient" && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
1596
|
+
/* @__PURE__ */ a("label", { htmlFor: "legend-gradient-property", className: "mapui:text-sm mapui:text-gray-700", children: "Gradient Property" }),
|
|
1597
|
+
/* @__PURE__ */ a(
|
|
1598
|
+
"input",
|
|
1599
|
+
{
|
|
1600
|
+
type: "text",
|
|
1601
|
+
id: "legend-gradient-property",
|
|
1602
|
+
value: e.gradientProperty ?? "",
|
|
1603
|
+
onChange: (c) => t({ ...e, gradientProperty: c.target.value || void 0 }),
|
|
1604
|
+
placeholder: "e.g. POP_EST",
|
|
1605
|
+
className: Se
|
|
1606
|
+
}
|
|
1607
|
+
)
|
|
1608
|
+
] }),
|
|
1609
|
+
/* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: r.map((c, u) => /* @__PURE__ */ l(
|
|
1106
1610
|
"li",
|
|
1107
1611
|
{
|
|
1108
1612
|
className: "mapui:rounded mapui:border mapui:border-gray-200 mapui:p-3",
|
|
@@ -1110,326 +1614,341 @@ function He({ value: a, onChange: i }) {
|
|
|
1110
1614
|
/* @__PURE__ */ l("div", { className: "mapui:mb-2 mapui:flex mapui:items-center mapui:justify-between", children: [
|
|
1111
1615
|
/* @__PURE__ */ l("span", { className: "mapui:text-xs mapui:font-medium mapui:text-gray-600", children: [
|
|
1112
1616
|
"Entry ",
|
|
1113
|
-
|
|
1617
|
+
u + 1
|
|
1114
1618
|
] }),
|
|
1115
|
-
/* @__PURE__ */
|
|
1619
|
+
/* @__PURE__ */ a(
|
|
1116
1620
|
"button",
|
|
1117
1621
|
{
|
|
1118
1622
|
type: "button",
|
|
1119
|
-
onClick: () =>
|
|
1623
|
+
onClick: () => m(u),
|
|
1120
1624
|
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",
|
|
1121
1625
|
children: "Remove"
|
|
1122
1626
|
}
|
|
1123
1627
|
)
|
|
1124
1628
|
] }),
|
|
1125
|
-
/* @__PURE__ */
|
|
1126
|
-
|
|
1629
|
+
/* @__PURE__ */ a(
|
|
1630
|
+
wa,
|
|
1127
1631
|
{
|
|
1128
|
-
value:
|
|
1129
|
-
onChange: (
|
|
1632
|
+
value: c,
|
|
1633
|
+
onChange: (s) => b(u, s)
|
|
1130
1634
|
}
|
|
1131
1635
|
)
|
|
1132
1636
|
]
|
|
1133
1637
|
},
|
|
1134
|
-
|
|
1638
|
+
u
|
|
1135
1639
|
)) }),
|
|
1136
|
-
/* @__PURE__ */
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1640
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:gap-2", children: [
|
|
1641
|
+
/* @__PURE__ */ a(
|
|
1642
|
+
"button",
|
|
1643
|
+
{
|
|
1644
|
+
type: "button",
|
|
1645
|
+
onClick: p,
|
|
1646
|
+
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",
|
|
1647
|
+
children: "+ Add Entry"
|
|
1648
|
+
}
|
|
1649
|
+
),
|
|
1650
|
+
o && o.entries.length > 0 && /* @__PURE__ */ l(
|
|
1651
|
+
"button",
|
|
1652
|
+
{
|
|
1653
|
+
type: "button",
|
|
1654
|
+
onClick: d,
|
|
1655
|
+
className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-blue-300 mapui:bg-white mapui:px-3 mapui:py-2 mapui:text-sm mapui:font-medium mapui:text-blue-700 hover:mapui:bg-blue-50",
|
|
1656
|
+
children: [
|
|
1657
|
+
"Populate from Style (",
|
|
1658
|
+
o.entries.length,
|
|
1659
|
+
" entries)"
|
|
1660
|
+
]
|
|
1661
|
+
}
|
|
1662
|
+
)
|
|
1663
|
+
] })
|
|
1145
1664
|
] })
|
|
1146
1665
|
] });
|
|
1147
1666
|
}
|
|
1148
|
-
function
|
|
1149
|
-
options:
|
|
1150
|
-
onChange:
|
|
1151
|
-
placeholder:
|
|
1152
|
-
className:
|
|
1667
|
+
function De({
|
|
1668
|
+
options: e,
|
|
1669
|
+
onChange: t,
|
|
1670
|
+
placeholder: i,
|
|
1671
|
+
className: r
|
|
1153
1672
|
}) {
|
|
1154
|
-
const [
|
|
1155
|
-
return
|
|
1156
|
-
|
|
1157
|
-
}, [
|
|
1673
|
+
const [n, o] = L(() => (e == null ? void 0 : e.join(", ")) ?? "");
|
|
1674
|
+
return X(() => {
|
|
1675
|
+
o((e == null ? void 0 : e.join(", ")) ?? "");
|
|
1676
|
+
}, [e == null ? void 0 : e.join(",")]), /* @__PURE__ */ a(
|
|
1158
1677
|
"input",
|
|
1159
1678
|
{
|
|
1160
1679
|
type: "text",
|
|
1161
|
-
value:
|
|
1162
|
-
onChange: (
|
|
1680
|
+
value: n,
|
|
1681
|
+
onChange: (b) => o(b.target.value),
|
|
1163
1682
|
onBlur: () => {
|
|
1164
|
-
const
|
|
1165
|
-
|
|
1683
|
+
const b = n.trim(), m = b ? b.split(",").map((w) => w.trim()).filter(Boolean) : void 0;
|
|
1684
|
+
t(m), o((m == null ? void 0 : m.join(", ")) ?? "");
|
|
1166
1685
|
},
|
|
1167
|
-
placeholder:
|
|
1168
|
-
className:
|
|
1686
|
+
placeholder: i,
|
|
1687
|
+
className: r
|
|
1169
1688
|
}
|
|
1170
1689
|
);
|
|
1171
1690
|
}
|
|
1172
|
-
const
|
|
1691
|
+
const j = "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", Na = {
|
|
1173
1692
|
text: { type: "text", property: "", label: "", autocomplete: !1 },
|
|
1174
1693
|
number: { type: "number", property: "", label: "", inputMode: "input", operator: "eq" },
|
|
1175
1694
|
datetime: { type: "datetime", property: "", label: "", range: !1 },
|
|
1176
1695
|
select: { type: "select", property: "", label: "" }
|
|
1177
1696
|
};
|
|
1178
|
-
function
|
|
1179
|
-
const
|
|
1180
|
-
|
|
1181
|
-
},
|
|
1697
|
+
function ka({ value: e, onChange: t, availableProperties: i }) {
|
|
1698
|
+
const r = (p) => {
|
|
1699
|
+
t({ ...Na[p], property: e.property, label: e.label });
|
|
1700
|
+
}, n = (p) => t({ ...e, ...p }), o = i && i.length > 0;
|
|
1182
1701
|
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
1183
|
-
/* @__PURE__ */
|
|
1702
|
+
/* @__PURE__ */ a(S, { label: "Field Type", children: /* @__PURE__ */ l(
|
|
1184
1703
|
"select",
|
|
1185
1704
|
{
|
|
1186
|
-
value:
|
|
1187
|
-
onChange: (
|
|
1188
|
-
className:
|
|
1705
|
+
value: e.type,
|
|
1706
|
+
onChange: (p) => r(p.target.value),
|
|
1707
|
+
className: j,
|
|
1189
1708
|
children: [
|
|
1190
|
-
/* @__PURE__ */
|
|
1191
|
-
/* @__PURE__ */
|
|
1192
|
-
/* @__PURE__ */
|
|
1193
|
-
/* @__PURE__ */
|
|
1709
|
+
/* @__PURE__ */ a("option", { value: "text", children: "Text" }),
|
|
1710
|
+
/* @__PURE__ */ a("option", { value: "number", children: "Number" }),
|
|
1711
|
+
/* @__PURE__ */ a("option", { value: "datetime", children: "Date/Time" }),
|
|
1712
|
+
/* @__PURE__ */ a("option", { value: "select", children: "Select" })
|
|
1194
1713
|
]
|
|
1195
1714
|
}
|
|
1196
1715
|
) }),
|
|
1197
|
-
/* @__PURE__ */
|
|
1716
|
+
/* @__PURE__ */ a(S, { label: "Property", required: !0, children: o ? /* @__PURE__ */ l(
|
|
1198
1717
|
"select",
|
|
1199
1718
|
{
|
|
1200
|
-
value:
|
|
1201
|
-
onChange: (
|
|
1202
|
-
className:
|
|
1719
|
+
value: e.property,
|
|
1720
|
+
onChange: (p) => n({ property: p.target.value }),
|
|
1721
|
+
className: j,
|
|
1203
1722
|
children: [
|
|
1204
|
-
/* @__PURE__ */
|
|
1205
|
-
|
|
1723
|
+
/* @__PURE__ */ a("option", { value: "", children: "Select a property…" }),
|
|
1724
|
+
i.map((p) => /* @__PURE__ */ a("option", { value: p.name, children: p.title ?? p.name }, p.name))
|
|
1206
1725
|
]
|
|
1207
1726
|
}
|
|
1208
|
-
) : /* @__PURE__ */
|
|
1727
|
+
) : /* @__PURE__ */ a(
|
|
1209
1728
|
"input",
|
|
1210
1729
|
{
|
|
1211
1730
|
type: "text",
|
|
1212
|
-
value:
|
|
1213
|
-
onChange: (
|
|
1731
|
+
value: e.property,
|
|
1732
|
+
onChange: (p) => n({ property: p.target.value }),
|
|
1214
1733
|
placeholder: "e.g. name",
|
|
1215
|
-
className:
|
|
1734
|
+
className: j
|
|
1216
1735
|
}
|
|
1217
1736
|
) }),
|
|
1218
|
-
/* @__PURE__ */
|
|
1737
|
+
/* @__PURE__ */ a(S, { label: "Label", children: /* @__PURE__ */ a(
|
|
1219
1738
|
"input",
|
|
1220
1739
|
{
|
|
1221
1740
|
type: "text",
|
|
1222
|
-
value:
|
|
1223
|
-
onChange: (
|
|
1741
|
+
value: e.label,
|
|
1742
|
+
onChange: (p) => n({ label: p.target.value }),
|
|
1224
1743
|
placeholder: "Display label",
|
|
1225
|
-
className:
|
|
1744
|
+
className: j
|
|
1226
1745
|
}
|
|
1227
1746
|
) }),
|
|
1228
|
-
/* @__PURE__ */
|
|
1747
|
+
/* @__PURE__ */ a(S, { label: "Placeholder", children: /* @__PURE__ */ a(
|
|
1229
1748
|
"input",
|
|
1230
1749
|
{
|
|
1231
1750
|
type: "text",
|
|
1232
|
-
value:
|
|
1233
|
-
onChange: (
|
|
1751
|
+
value: e.placeholder ?? "",
|
|
1752
|
+
onChange: (p) => n({ placeholder: p.target.value || void 0 }),
|
|
1234
1753
|
placeholder: "Input placeholder text",
|
|
1235
|
-
className:
|
|
1754
|
+
className: j
|
|
1236
1755
|
}
|
|
1237
1756
|
) }),
|
|
1238
|
-
|
|
1757
|
+
e.type === "text" && /* @__PURE__ */ l(B, { children: [
|
|
1239
1758
|
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
1240
|
-
/* @__PURE__ */
|
|
1759
|
+
/* @__PURE__ */ a(
|
|
1241
1760
|
"input",
|
|
1242
1761
|
{
|
|
1243
1762
|
type: "checkbox",
|
|
1244
1763
|
id: "text-autocomplete",
|
|
1245
|
-
checked:
|
|
1246
|
-
onChange: (
|
|
1764
|
+
checked: e.autocomplete ?? !1,
|
|
1765
|
+
onChange: (p) => t({ ...e, autocomplete: p.target.checked }),
|
|
1247
1766
|
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
1248
1767
|
}
|
|
1249
1768
|
),
|
|
1250
|
-
/* @__PURE__ */
|
|
1769
|
+
/* @__PURE__ */ a("label", { htmlFor: "text-autocomplete", className: "mapui:text-sm mapui:text-gray-700", children: "Enable Autocomplete" })
|
|
1251
1770
|
] }),
|
|
1252
1771
|
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
1253
|
-
/* @__PURE__ */
|
|
1772
|
+
/* @__PURE__ */ a(
|
|
1254
1773
|
"input",
|
|
1255
1774
|
{
|
|
1256
1775
|
type: "checkbox",
|
|
1257
1776
|
id: "text-prefetch",
|
|
1258
|
-
checked:
|
|
1259
|
-
onChange: (
|
|
1777
|
+
checked: e.prefetch ?? !1,
|
|
1778
|
+
onChange: (p) => t({ ...e, prefetch: p.target.checked }),
|
|
1260
1779
|
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
1261
1780
|
}
|
|
1262
1781
|
),
|
|
1263
|
-
/* @__PURE__ */
|
|
1782
|
+
/* @__PURE__ */ a("label", { htmlFor: "text-prefetch", className: "mapui:text-sm mapui:text-gray-700", children: "Prefetch Options" })
|
|
1264
1783
|
] }),
|
|
1265
|
-
/* @__PURE__ */
|
|
1266
|
-
|
|
1784
|
+
/* @__PURE__ */ a(S, { label: "Static Options (comma-separated)", children: /* @__PURE__ */ a(
|
|
1785
|
+
De,
|
|
1267
1786
|
{
|
|
1268
|
-
options:
|
|
1269
|
-
onChange: (
|
|
1787
|
+
options: e.options,
|
|
1788
|
+
onChange: (p) => t({ ...e, options: p }),
|
|
1270
1789
|
placeholder: "option1, option2",
|
|
1271
|
-
className:
|
|
1790
|
+
className: j
|
|
1272
1791
|
}
|
|
1273
1792
|
) })
|
|
1274
1793
|
] }),
|
|
1275
|
-
|
|
1276
|
-
/* @__PURE__ */
|
|
1794
|
+
e.type === "number" && /* @__PURE__ */ l(B, { children: [
|
|
1795
|
+
/* @__PURE__ */ a(S, { label: "Input Mode", children: /* @__PURE__ */ l(
|
|
1277
1796
|
"select",
|
|
1278
1797
|
{
|
|
1279
|
-
value:
|
|
1280
|
-
onChange: (
|
|
1281
|
-
...
|
|
1282
|
-
inputMode:
|
|
1798
|
+
value: e.inputMode ?? "input",
|
|
1799
|
+
onChange: (p) => t({
|
|
1800
|
+
...e,
|
|
1801
|
+
inputMode: p.target.value
|
|
1283
1802
|
}),
|
|
1284
|
-
className:
|
|
1803
|
+
className: j,
|
|
1285
1804
|
children: [
|
|
1286
|
-
/* @__PURE__ */
|
|
1287
|
-
/* @__PURE__ */
|
|
1805
|
+
/* @__PURE__ */ a("option", { value: "input", children: "Input" }),
|
|
1806
|
+
/* @__PURE__ */ a("option", { value: "slider", children: "Slider" })
|
|
1288
1807
|
]
|
|
1289
1808
|
}
|
|
1290
1809
|
) }),
|
|
1291
|
-
/* @__PURE__ */
|
|
1810
|
+
/* @__PURE__ */ a(S, { label: "Operator", children: /* @__PURE__ */ l(
|
|
1292
1811
|
"select",
|
|
1293
1812
|
{
|
|
1294
|
-
value:
|
|
1295
|
-
onChange: (
|
|
1296
|
-
...
|
|
1297
|
-
operator:
|
|
1813
|
+
value: e.operator ?? "eq",
|
|
1814
|
+
onChange: (p) => t({
|
|
1815
|
+
...e,
|
|
1816
|
+
operator: p.target.value
|
|
1298
1817
|
}),
|
|
1299
|
-
className:
|
|
1818
|
+
className: j,
|
|
1300
1819
|
children: [
|
|
1301
|
-
/* @__PURE__ */
|
|
1302
|
-
/* @__PURE__ */
|
|
1303
|
-
/* @__PURE__ */
|
|
1304
|
-
/* @__PURE__ */
|
|
1305
|
-
/* @__PURE__ */
|
|
1306
|
-
/* @__PURE__ */
|
|
1820
|
+
/* @__PURE__ */ a("option", { value: "eq", children: "Equal (=)" }),
|
|
1821
|
+
/* @__PURE__ */ a("option", { value: "gt", children: "Greater Than (>)" }),
|
|
1822
|
+
/* @__PURE__ */ a("option", { value: "gte", children: "Greater or Equal (>=)" }),
|
|
1823
|
+
/* @__PURE__ */ a("option", { value: "lt", children: "Less Than (<)" }),
|
|
1824
|
+
/* @__PURE__ */ a("option", { value: "lte", children: "Less or Equal (<=)" }),
|
|
1825
|
+
/* @__PURE__ */ a("option", { value: "between", children: "Between" })
|
|
1307
1826
|
]
|
|
1308
1827
|
}
|
|
1309
1828
|
) }),
|
|
1310
1829
|
/* @__PURE__ */ l("div", { className: "mapui:grid mapui:grid-cols-3 mapui:gap-2", children: [
|
|
1311
|
-
/* @__PURE__ */
|
|
1830
|
+
/* @__PURE__ */ a(S, { label: "Min", children: /* @__PURE__ */ a(
|
|
1312
1831
|
"input",
|
|
1313
1832
|
{
|
|
1314
1833
|
type: "number",
|
|
1315
|
-
value:
|
|
1316
|
-
onChange: (
|
|
1317
|
-
...
|
|
1318
|
-
min:
|
|
1834
|
+
value: e.min ?? "",
|
|
1835
|
+
onChange: (p) => t({
|
|
1836
|
+
...e,
|
|
1837
|
+
min: p.target.value ? parseFloat(p.target.value) : void 0
|
|
1319
1838
|
}),
|
|
1320
|
-
className:
|
|
1839
|
+
className: j
|
|
1321
1840
|
}
|
|
1322
1841
|
) }),
|
|
1323
|
-
/* @__PURE__ */
|
|
1842
|
+
/* @__PURE__ */ a(S, { label: "Max", children: /* @__PURE__ */ a(
|
|
1324
1843
|
"input",
|
|
1325
1844
|
{
|
|
1326
1845
|
type: "number",
|
|
1327
|
-
value:
|
|
1328
|
-
onChange: (
|
|
1329
|
-
...
|
|
1330
|
-
max:
|
|
1846
|
+
value: e.max ?? "",
|
|
1847
|
+
onChange: (p) => t({
|
|
1848
|
+
...e,
|
|
1849
|
+
max: p.target.value ? parseFloat(p.target.value) : void 0
|
|
1331
1850
|
}),
|
|
1332
|
-
className:
|
|
1851
|
+
className: j
|
|
1333
1852
|
}
|
|
1334
1853
|
) }),
|
|
1335
|
-
/* @__PURE__ */
|
|
1854
|
+
/* @__PURE__ */ a(S, { label: "Step", children: /* @__PURE__ */ a(
|
|
1336
1855
|
"input",
|
|
1337
1856
|
{
|
|
1338
1857
|
type: "number",
|
|
1339
|
-
value:
|
|
1340
|
-
onChange: (
|
|
1341
|
-
...
|
|
1342
|
-
step:
|
|
1858
|
+
value: e.step ?? "",
|
|
1859
|
+
onChange: (p) => t({
|
|
1860
|
+
...e,
|
|
1861
|
+
step: p.target.value ? parseFloat(p.target.value) : void 0
|
|
1343
1862
|
}),
|
|
1344
|
-
className:
|
|
1863
|
+
className: j
|
|
1345
1864
|
}
|
|
1346
1865
|
) })
|
|
1347
1866
|
] })
|
|
1348
1867
|
] }),
|
|
1349
|
-
|
|
1350
|
-
/* @__PURE__ */
|
|
1868
|
+
e.type === "datetime" && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
1869
|
+
/* @__PURE__ */ a(
|
|
1351
1870
|
"input",
|
|
1352
1871
|
{
|
|
1353
1872
|
type: "checkbox",
|
|
1354
1873
|
id: "datetime-range",
|
|
1355
|
-
checked:
|
|
1356
|
-
onChange: (
|
|
1874
|
+
checked: e.range ?? !1,
|
|
1875
|
+
onChange: (p) => t({ ...e, range: p.target.checked }),
|
|
1357
1876
|
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
1358
1877
|
}
|
|
1359
1878
|
),
|
|
1360
|
-
/* @__PURE__ */
|
|
1879
|
+
/* @__PURE__ */ a("label", { htmlFor: "datetime-range", className: "mapui:text-sm mapui:text-gray-700", children: "Date Range" })
|
|
1361
1880
|
] }),
|
|
1362
|
-
|
|
1881
|
+
e.type === "select" && /* @__PURE__ */ l(B, { children: [
|
|
1363
1882
|
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
1364
|
-
/* @__PURE__ */
|
|
1883
|
+
/* @__PURE__ */ a(
|
|
1365
1884
|
"input",
|
|
1366
1885
|
{
|
|
1367
1886
|
type: "checkbox",
|
|
1368
1887
|
id: "select-prefetch",
|
|
1369
|
-
checked:
|
|
1370
|
-
onChange: (
|
|
1888
|
+
checked: e.prefetch ?? !1,
|
|
1889
|
+
onChange: (p) => t({ ...e, prefetch: p.target.checked }),
|
|
1371
1890
|
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
1372
1891
|
}
|
|
1373
1892
|
),
|
|
1374
|
-
/* @__PURE__ */
|
|
1893
|
+
/* @__PURE__ */ a("label", { htmlFor: "select-prefetch", className: "mapui:text-sm mapui:text-gray-700", children: "Prefetch Options" })
|
|
1375
1894
|
] }),
|
|
1376
|
-
/* @__PURE__ */
|
|
1377
|
-
|
|
1895
|
+
/* @__PURE__ */ a(S, { label: "Static Options (comma-separated)", children: /* @__PURE__ */ a(
|
|
1896
|
+
De,
|
|
1378
1897
|
{
|
|
1379
|
-
options:
|
|
1380
|
-
onChange: (
|
|
1898
|
+
options: e.options,
|
|
1899
|
+
onChange: (p) => t({ ...e, options: p }),
|
|
1381
1900
|
placeholder: "option1, option2",
|
|
1382
|
-
className:
|
|
1901
|
+
className: j
|
|
1383
1902
|
}
|
|
1384
1903
|
) })
|
|
1385
1904
|
] })
|
|
1386
1905
|
] });
|
|
1387
1906
|
}
|
|
1388
|
-
const
|
|
1907
|
+
const Ca = () => ({
|
|
1389
1908
|
type: "text",
|
|
1390
1909
|
property: "",
|
|
1391
1910
|
label: "",
|
|
1392
1911
|
autocomplete: !1
|
|
1393
1912
|
});
|
|
1394
|
-
function
|
|
1395
|
-
const [
|
|
1396
|
-
const
|
|
1397
|
-
|
|
1398
|
-
},
|
|
1399
|
-
|
|
1400
|
-
},
|
|
1401
|
-
|
|
1402
|
-
},
|
|
1403
|
-
if (
|
|
1404
|
-
const
|
|
1405
|
-
[
|
|
1406
|
-
},
|
|
1407
|
-
if (
|
|
1408
|
-
const
|
|
1409
|
-
[
|
|
1913
|
+
function Sa({ fields: e, onChange: t, availableProperties: i }) {
|
|
1914
|
+
const [r, n] = L(null), o = () => {
|
|
1915
|
+
const d = [...e, Ca()];
|
|
1916
|
+
t(d), n(d.length - 1);
|
|
1917
|
+
}, p = (d, f) => {
|
|
1918
|
+
t(e.map((c, u) => u === d ? f : c));
|
|
1919
|
+
}, b = (d) => {
|
|
1920
|
+
t(e.filter((f, c) => c !== d)), n(null);
|
|
1921
|
+
}, m = (d) => {
|
|
1922
|
+
if (d === 0) return;
|
|
1923
|
+
const f = [...e];
|
|
1924
|
+
[f[d - 1], f[d]] = [f[d], f[d - 1]], t(f), n(d - 1);
|
|
1925
|
+
}, w = (d) => {
|
|
1926
|
+
if (d === e.length - 1) return;
|
|
1927
|
+
const f = [...e];
|
|
1928
|
+
[f[d], f[d + 1]] = [f[d + 1], f[d]], t(f), n(d + 1);
|
|
1410
1929
|
};
|
|
1411
1930
|
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
|
|
1412
|
-
|
|
1413
|
-
/* @__PURE__ */
|
|
1931
|
+
e.length === 0 && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No search fields configured." }),
|
|
1932
|
+
/* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: e.map((d, f) => /* @__PURE__ */ l("li", { className: "mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-white", children: [
|
|
1414
1933
|
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-1 mapui:px-3 mapui:py-2", children: [
|
|
1415
1934
|
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-0.5", children: [
|
|
1416
|
-
/* @__PURE__ */
|
|
1935
|
+
/* @__PURE__ */ a(
|
|
1417
1936
|
"button",
|
|
1418
1937
|
{
|
|
1419
1938
|
type: "button",
|
|
1420
|
-
onClick: () =>
|
|
1421
|
-
disabled:
|
|
1939
|
+
onClick: () => m(f),
|
|
1940
|
+
disabled: f === 0,
|
|
1422
1941
|
"aria-label": "Move up",
|
|
1423
1942
|
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",
|
|
1424
1943
|
children: "▲"
|
|
1425
1944
|
}
|
|
1426
1945
|
),
|
|
1427
|
-
/* @__PURE__ */
|
|
1946
|
+
/* @__PURE__ */ a(
|
|
1428
1947
|
"button",
|
|
1429
1948
|
{
|
|
1430
1949
|
type: "button",
|
|
1431
|
-
onClick: () => f
|
|
1432
|
-
disabled:
|
|
1950
|
+
onClick: () => w(f),
|
|
1951
|
+
disabled: f === e.length - 1,
|
|
1433
1952
|
"aria-label": "Move down",
|
|
1434
1953
|
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",
|
|
1435
1954
|
children: "▼"
|
|
@@ -1440,126 +1959,126 @@ function Ze({ fields: a, onChange: i, availableProperties: t }) {
|
|
|
1440
1959
|
"button",
|
|
1441
1960
|
{
|
|
1442
1961
|
type: "button",
|
|
1443
|
-
onClick: () =>
|
|
1962
|
+
onClick: () => n(r === f ? null : f),
|
|
1444
1963
|
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",
|
|
1445
1964
|
children: [
|
|
1446
|
-
/* @__PURE__ */
|
|
1447
|
-
|
|
1965
|
+
/* @__PURE__ */ a("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 }),
|
|
1966
|
+
d.label || d.property || "Untitled field"
|
|
1448
1967
|
]
|
|
1449
1968
|
}
|
|
1450
1969
|
),
|
|
1451
|
-
/* @__PURE__ */
|
|
1970
|
+
/* @__PURE__ */ a(
|
|
1452
1971
|
"button",
|
|
1453
1972
|
{
|
|
1454
1973
|
type: "button",
|
|
1455
|
-
onClick: () =>
|
|
1974
|
+
onClick: () => b(f),
|
|
1456
1975
|
"aria-label": "Remove field",
|
|
1457
1976
|
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",
|
|
1458
1977
|
children: "Remove"
|
|
1459
1978
|
}
|
|
1460
1979
|
)
|
|
1461
1980
|
] }),
|
|
1462
|
-
|
|
1463
|
-
|
|
1981
|
+
r === f && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(
|
|
1982
|
+
ka,
|
|
1464
1983
|
{
|
|
1465
|
-
value:
|
|
1466
|
-
onChange: (
|
|
1467
|
-
availableProperties:
|
|
1984
|
+
value: d,
|
|
1985
|
+
onChange: (c) => p(f, c),
|
|
1986
|
+
availableProperties: i
|
|
1468
1987
|
}
|
|
1469
1988
|
) })
|
|
1470
|
-
] },
|
|
1471
|
-
/* @__PURE__ */
|
|
1989
|
+
] }, f)) }),
|
|
1990
|
+
/* @__PURE__ */ a(
|
|
1472
1991
|
"button",
|
|
1473
1992
|
{
|
|
1474
1993
|
type: "button",
|
|
1475
|
-
onClick:
|
|
1994
|
+
onClick: o,
|
|
1476
1995
|
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",
|
|
1477
1996
|
children: "+ Add Search Field"
|
|
1478
1997
|
}
|
|
1479
1998
|
)
|
|
1480
1999
|
] });
|
|
1481
2000
|
}
|
|
1482
|
-
function
|
|
1483
|
-
return Object.entries(
|
|
1484
|
-
key:
|
|
1485
|
-
label:
|
|
1486
|
-
visible:
|
|
2001
|
+
function Da(e) {
|
|
2002
|
+
return Object.entries(e).map(([t, i]) => ({
|
|
2003
|
+
key: t,
|
|
2004
|
+
label: i.label ?? "",
|
|
2005
|
+
visible: i.visible ?? !0
|
|
1487
2006
|
}));
|
|
1488
2007
|
}
|
|
1489
|
-
function
|
|
1490
|
-
const
|
|
1491
|
-
for (const
|
|
1492
|
-
i
|
|
1493
|
-
visible:
|
|
1494
|
-
...
|
|
2008
|
+
function Ta(e) {
|
|
2009
|
+
const t = {};
|
|
2010
|
+
for (const i of e)
|
|
2011
|
+
t[i.key] = {
|
|
2012
|
+
visible: i.visible,
|
|
2013
|
+
...i.label ? { label: i.label } : {}
|
|
1495
2014
|
};
|
|
1496
|
-
return
|
|
2015
|
+
return t;
|
|
1497
2016
|
}
|
|
1498
|
-
const
|
|
1499
|
-
function
|
|
1500
|
-
const
|
|
1501
|
-
|
|
1502
|
-
},
|
|
1503
|
-
|
|
1504
|
-
},
|
|
1505
|
-
|
|
1506
|
-
},
|
|
1507
|
-
const
|
|
1508
|
-
|
|
1509
|
-
},
|
|
1510
|
-
if (
|
|
1511
|
-
const
|
|
1512
|
-
[
|
|
1513
|
-
},
|
|
1514
|
-
if (
|
|
1515
|
-
const
|
|
1516
|
-
[
|
|
1517
|
-
},
|
|
1518
|
-
if (!
|
|
1519
|
-
const
|
|
1520
|
-
key:
|
|
1521
|
-
label:
|
|
2017
|
+
const le = "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";
|
|
2018
|
+
function La({ value: e, onChange: t, availableProperties: i }) {
|
|
2019
|
+
const r = Da(e), n = i && i.length > 0, o = (u) => t(Ta(u)), p = () => {
|
|
2020
|
+
o([...r, { key: "", label: "", visible: !0 }]);
|
|
2021
|
+
}, b = (u) => {
|
|
2022
|
+
o(r.filter((s, v) => v !== u));
|
|
2023
|
+
}, m = (u, s) => {
|
|
2024
|
+
o(r.map((v, k) => k === u ? { ...v, ...s } : v));
|
|
2025
|
+
}, w = (u, s) => {
|
|
2026
|
+
const v = i == null ? void 0 : i.find((D) => D.name === s), k = (v == null ? void 0 : v.title) ?? r[u].label;
|
|
2027
|
+
o(r.map((D, x) => x === u ? { ...D, key: s, label: k } : D));
|
|
2028
|
+
}, d = (u) => {
|
|
2029
|
+
if (u === 0) return;
|
|
2030
|
+
const s = [...r];
|
|
2031
|
+
[s[u - 1], s[u]] = [s[u], s[u - 1]], o(s);
|
|
2032
|
+
}, f = (u) => {
|
|
2033
|
+
if (u === r.length - 1) return;
|
|
2034
|
+
const s = [...r];
|
|
2035
|
+
[s[u], s[u + 1]] = [s[u + 1], s[u]], o(s);
|
|
2036
|
+
}, c = () => {
|
|
2037
|
+
if (!i) return;
|
|
2038
|
+
const u = i.map((s) => ({
|
|
2039
|
+
key: s.name,
|
|
2040
|
+
label: s.title ?? "",
|
|
1522
2041
|
visible: !0
|
|
1523
2042
|
}));
|
|
1524
|
-
|
|
2043
|
+
o(u);
|
|
1525
2044
|
};
|
|
1526
2045
|
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
|
|
1527
|
-
|
|
1528
|
-
/* @__PURE__ */
|
|
1529
|
-
|
|
2046
|
+
r.length === 0 ? /* @__PURE__ */ l(B, { children: [
|
|
2047
|
+
/* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No property display rules configured. All properties will be shown." }),
|
|
2048
|
+
n && /* @__PURE__ */ a(
|
|
1530
2049
|
"button",
|
|
1531
2050
|
{
|
|
1532
2051
|
type: "button",
|
|
1533
|
-
onClick:
|
|
2052
|
+
onClick: c,
|
|
1534
2053
|
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",
|
|
1535
2054
|
children: "Populate from API metadata"
|
|
1536
2055
|
}
|
|
1537
2056
|
)
|
|
1538
|
-
] }) : /* @__PURE__ */ l(
|
|
2057
|
+
] }) : /* @__PURE__ */ l(B, { children: [
|
|
1539
2058
|
/* @__PURE__ */ l("div", { className: "mapui:grid mapui:items-center mapui:gap-2 mapui:px-8", style: { gridTemplateColumns: "1fr 1fr auto" }, children: [
|
|
1540
|
-
/* @__PURE__ */
|
|
1541
|
-
/* @__PURE__ */
|
|
1542
|
-
/* @__PURE__ */
|
|
2059
|
+
/* @__PURE__ */ a(S, { label: "Property Key", children: /* @__PURE__ */ a("span", {}) }),
|
|
2060
|
+
/* @__PURE__ */ a(S, { label: "Display Label", children: /* @__PURE__ */ a("span", {}) }),
|
|
2061
|
+
/* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:font-medium mapui:text-gray-600", children: "Visible" })
|
|
1543
2062
|
] }),
|
|
1544
|
-
/* @__PURE__ */
|
|
2063
|
+
/* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-1.5 mapui:p-0", children: r.map((u, s) => /* @__PURE__ */ l("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: [
|
|
1545
2064
|
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-0.5", children: [
|
|
1546
|
-
/* @__PURE__ */
|
|
2065
|
+
/* @__PURE__ */ a(
|
|
1547
2066
|
"button",
|
|
1548
2067
|
{
|
|
1549
2068
|
type: "button",
|
|
1550
|
-
onClick: () => s
|
|
1551
|
-
disabled:
|
|
2069
|
+
onClick: () => d(s),
|
|
2070
|
+
disabled: s === 0,
|
|
1552
2071
|
"aria-label": "Move up",
|
|
1553
2072
|
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",
|
|
1554
2073
|
children: "▲"
|
|
1555
2074
|
}
|
|
1556
2075
|
),
|
|
1557
|
-
/* @__PURE__ */
|
|
2076
|
+
/* @__PURE__ */ a(
|
|
1558
2077
|
"button",
|
|
1559
2078
|
{
|
|
1560
2079
|
type: "button",
|
|
1561
|
-
onClick: () =>
|
|
1562
|
-
disabled:
|
|
2080
|
+
onClick: () => f(s),
|
|
2081
|
+
disabled: s === r.length - 1,
|
|
1563
2082
|
"aria-label": "Move down",
|
|
1564
2083
|
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",
|
|
1565
2084
|
children: "▼"
|
|
@@ -1567,285 +2086,314 @@ function ia({ value: a, onChange: i, availableProperties: t }) {
|
|
|
1567
2086
|
)
|
|
1568
2087
|
] }),
|
|
1569
2088
|
/* @__PURE__ */ l("div", { className: "mapui:grid mapui:flex-1 mapui:items-center mapui:gap-2", style: { gridTemplateColumns: "1fr 1fr auto auto" }, children: [
|
|
1570
|
-
|
|
2089
|
+
n ? /* @__PURE__ */ l(
|
|
1571
2090
|
"select",
|
|
1572
2091
|
{
|
|
1573
|
-
value:
|
|
1574
|
-
onChange: (
|
|
2092
|
+
value: u.key,
|
|
2093
|
+
onChange: (v) => w(s, v.target.value),
|
|
1575
2094
|
"aria-label": "Property key",
|
|
1576
|
-
className:
|
|
2095
|
+
className: le,
|
|
1577
2096
|
children: [
|
|
1578
|
-
/* @__PURE__ */
|
|
1579
|
-
|
|
2097
|
+
/* @__PURE__ */ a("option", { value: "", children: "Select a property…" }),
|
|
2098
|
+
i.map((v) => /* @__PURE__ */ a("option", { value: v.name, children: v.title ?? v.name }, v.name))
|
|
1580
2099
|
]
|
|
1581
2100
|
}
|
|
1582
|
-
) : /* @__PURE__ */
|
|
2101
|
+
) : /* @__PURE__ */ a(
|
|
1583
2102
|
"input",
|
|
1584
2103
|
{
|
|
1585
2104
|
type: "text",
|
|
1586
|
-
value:
|
|
1587
|
-
onChange: (
|
|
2105
|
+
value: u.key,
|
|
2106
|
+
onChange: (v) => m(s, { key: v.target.value }),
|
|
1588
2107
|
placeholder: "property_name",
|
|
1589
2108
|
"aria-label": "Property key",
|
|
1590
|
-
className:
|
|
2109
|
+
className: le
|
|
1591
2110
|
}
|
|
1592
2111
|
),
|
|
1593
|
-
/* @__PURE__ */
|
|
2112
|
+
/* @__PURE__ */ a(
|
|
1594
2113
|
"input",
|
|
1595
2114
|
{
|
|
1596
2115
|
type: "text",
|
|
1597
|
-
value:
|
|
1598
|
-
onChange: (
|
|
2116
|
+
value: u.label,
|
|
2117
|
+
onChange: (v) => m(s, { label: v.target.value }),
|
|
1599
2118
|
placeholder: "Friendly name",
|
|
1600
2119
|
"aria-label": "Display label",
|
|
1601
|
-
className:
|
|
2120
|
+
className: le
|
|
1602
2121
|
}
|
|
1603
2122
|
),
|
|
1604
|
-
/* @__PURE__ */
|
|
2123
|
+
/* @__PURE__ */ a(
|
|
1605
2124
|
"input",
|
|
1606
2125
|
{
|
|
1607
2126
|
type: "checkbox",
|
|
1608
|
-
checked:
|
|
1609
|
-
onChange: (
|
|
2127
|
+
checked: u.visible,
|
|
2128
|
+
onChange: (v) => m(s, { visible: v.target.checked }),
|
|
1610
2129
|
"aria-label": "Visible",
|
|
1611
2130
|
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
1612
2131
|
}
|
|
1613
2132
|
),
|
|
1614
|
-
/* @__PURE__ */
|
|
2133
|
+
/* @__PURE__ */ a(
|
|
1615
2134
|
"button",
|
|
1616
2135
|
{
|
|
1617
2136
|
type: "button",
|
|
1618
|
-
onClick: () =>
|
|
2137
|
+
onClick: () => b(s),
|
|
1619
2138
|
"aria-label": "Remove property",
|
|
1620
2139
|
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",
|
|
1621
2140
|
children: "Remove"
|
|
1622
2141
|
}
|
|
1623
2142
|
)
|
|
1624
2143
|
] })
|
|
1625
|
-
] },
|
|
2144
|
+
] }, s)) })
|
|
1626
2145
|
] }),
|
|
1627
|
-
/* @__PURE__ */
|
|
2146
|
+
/* @__PURE__ */ a(
|
|
1628
2147
|
"button",
|
|
1629
2148
|
{
|
|
1630
2149
|
type: "button",
|
|
1631
|
-
onClick:
|
|
2150
|
+
onClick: p,
|
|
1632
2151
|
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",
|
|
1633
2152
|
children: "+ Add Property"
|
|
1634
2153
|
}
|
|
1635
2154
|
)
|
|
1636
2155
|
] });
|
|
1637
2156
|
}
|
|
1638
|
-
const
|
|
1639
|
-
function
|
|
1640
|
-
return !!
|
|
2157
|
+
const Be = /geojson\.org\/schema\/(\w+)\.json/;
|
|
2158
|
+
function Ia(e) {
|
|
2159
|
+
return !!e.$ref && Be.test(e.$ref);
|
|
1641
2160
|
}
|
|
1642
|
-
function
|
|
1643
|
-
const
|
|
1644
|
-
return
|
|
2161
|
+
function qe(e) {
|
|
2162
|
+
const t = Be.exec(e);
|
|
2163
|
+
return t ? t[1] : null;
|
|
1645
2164
|
}
|
|
1646
|
-
function
|
|
1647
|
-
const
|
|
1648
|
-
return
|
|
2165
|
+
function Ue(e) {
|
|
2166
|
+
const t = e.toLowerCase();
|
|
2167
|
+
return t.includes("polygon") ? "fill" : t.includes("linestring") ? "line" : t.includes("point") ? "circle" : null;
|
|
1649
2168
|
}
|
|
1650
|
-
function
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
2169
|
+
function ce(e) {
|
|
2170
|
+
const t = e.toLowerCase();
|
|
2171
|
+
return t.includes("polygon") ? ["fill"] : t.includes("linestring") ? ["line"] : t.includes("point") ? ["circle", "symbol"] : [];
|
|
2172
|
+
}
|
|
2173
|
+
function Aa(e) {
|
|
2174
|
+
for (const t of Object.values(e.properties))
|
|
2175
|
+
if (t.$ref) {
|
|
2176
|
+
const i = qe(t.$ref);
|
|
2177
|
+
if (i) return Ue(i);
|
|
1655
2178
|
}
|
|
1656
2179
|
return null;
|
|
1657
2180
|
}
|
|
1658
|
-
function
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
2181
|
+
function We(e) {
|
|
2182
|
+
for (const t of Object.values(e.properties))
|
|
2183
|
+
if (t.$ref) {
|
|
2184
|
+
const i = qe(t.$ref);
|
|
2185
|
+
if (i) return ce(i);
|
|
2186
|
+
}
|
|
2187
|
+
return [];
|
|
2188
|
+
}
|
|
2189
|
+
function Ea(e) {
|
|
2190
|
+
return Object.entries(e.properties).filter(([, t]) => !Ia(t)).map(([t, i]) => ({
|
|
2191
|
+
name: t,
|
|
2192
|
+
title: i.title,
|
|
2193
|
+
type: i.type,
|
|
2194
|
+
format: i.format,
|
|
2195
|
+
enum: i.enum,
|
|
2196
|
+
minimum: i.minimum,
|
|
2197
|
+
maximum: i.maximum
|
|
1667
2198
|
}));
|
|
1668
2199
|
}
|
|
1669
|
-
async function
|
|
1670
|
-
var
|
|
2200
|
+
async function Ga(e, t) {
|
|
2201
|
+
var i, r;
|
|
1671
2202
|
try {
|
|
1672
|
-
const
|
|
1673
|
-
if (
|
|
2203
|
+
const n = await Me(e, t), o = Aa(n);
|
|
2204
|
+
if (o) return o;
|
|
1674
2205
|
} catch {
|
|
1675
2206
|
}
|
|
1676
2207
|
try {
|
|
1677
|
-
const
|
|
1678
|
-
if (typeof
|
|
2208
|
+
const o = (r = (i = (await se(e, t, { limit: 1 })).features[0]) == null ? void 0 : i.geometry) == null ? void 0 : r.type;
|
|
2209
|
+
if (typeof o == "string") return Ue(o);
|
|
1679
2210
|
} catch {
|
|
1680
2211
|
}
|
|
1681
2212
|
return null;
|
|
1682
2213
|
}
|
|
1683
|
-
function
|
|
1684
|
-
|
|
2214
|
+
async function za(e, t) {
|
|
2215
|
+
var i, r;
|
|
2216
|
+
try {
|
|
2217
|
+
const n = await Me(e, t), o = We(n);
|
|
2218
|
+
if (o.length > 0) return o;
|
|
2219
|
+
} catch {
|
|
2220
|
+
}
|
|
2221
|
+
try {
|
|
2222
|
+
const o = (r = (i = (await se(e, t, { limit: 1 })).features[0]) == null ? void 0 : i.geometry) == null ? void 0 : r.type;
|
|
2223
|
+
if (typeof o == "string") return ce(o);
|
|
2224
|
+
} catch {
|
|
2225
|
+
}
|
|
2226
|
+
return [];
|
|
2227
|
+
}
|
|
2228
|
+
function Va(e) {
|
|
2229
|
+
return e.replace(/_/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (t) => t.toUpperCase());
|
|
1685
2230
|
}
|
|
1686
|
-
const
|
|
1687
|
-
function
|
|
1688
|
-
var
|
|
1689
|
-
const
|
|
1690
|
-
|
|
1691
|
-
const
|
|
1692
|
-
|
|
1693
|
-
const
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
if (!D) {
|
|
1698
|
-
v(null);
|
|
2231
|
+
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";
|
|
2232
|
+
function Te({ value: e, onChange: t, availableSources: i, availableIcons: r }) {
|
|
2233
|
+
var D;
|
|
2234
|
+
const n = (x) => t({ ...e, ...x }), o = ue(e);
|
|
2235
|
+
o.current = e;
|
|
2236
|
+
const p = ue(t);
|
|
2237
|
+
p.current = t;
|
|
2238
|
+
const b = i.find((x) => x.id === e.sourceId), m = (b == null ? void 0 : b.url) ?? null, w = e.collection || null, { collections: d, loading: f } = Fe(m), { queryables: c, loading: u } = _e(m, w), s = c ? Ea(c) : [], [v, k] = L([]);
|
|
2239
|
+
return X(() => {
|
|
2240
|
+
if (!c) {
|
|
2241
|
+
k([]);
|
|
1699
2242
|
return;
|
|
1700
2243
|
}
|
|
1701
|
-
const
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
2244
|
+
const x = (P) => {
|
|
2245
|
+
k(P);
|
|
2246
|
+
const E = P[0];
|
|
2247
|
+
if (E && !o.current.style) {
|
|
2248
|
+
const y = E === "fill" ? me : E === "line" ? je : E === "symbol" ? Re : $e;
|
|
2249
|
+
p.current({ ...o.current, style: y });
|
|
1705
2250
|
}
|
|
1706
|
-
},
|
|
1707
|
-
if (
|
|
1708
|
-
|
|
2251
|
+
}, $ = We(c);
|
|
2252
|
+
if ($.length > 0) {
|
|
2253
|
+
x($);
|
|
1709
2254
|
return;
|
|
1710
2255
|
}
|
|
1711
|
-
if (!
|
|
1712
|
-
|
|
2256
|
+
if (!m || !w) {
|
|
2257
|
+
k([]);
|
|
1713
2258
|
return;
|
|
1714
2259
|
}
|
|
1715
|
-
let
|
|
1716
|
-
return
|
|
1717
|
-
var
|
|
1718
|
-
if (
|
|
1719
|
-
const
|
|
1720
|
-
|
|
2260
|
+
let C = !1;
|
|
2261
|
+
return se(m, w, { limit: 1 }).then((P) => {
|
|
2262
|
+
var y, F;
|
|
2263
|
+
if (C) return;
|
|
2264
|
+
const E = (F = (y = P.features[0]) == null ? void 0 : y.geometry) == null ? void 0 : F.type;
|
|
2265
|
+
x(typeof E == "string" ? ce(E) : []);
|
|
1721
2266
|
}).catch(() => {
|
|
1722
|
-
|
|
2267
|
+
C || k([]);
|
|
1723
2268
|
}), () => {
|
|
1724
|
-
|
|
2269
|
+
C = !0;
|
|
1725
2270
|
};
|
|
1726
|
-
}, [
|
|
1727
|
-
|
|
1728
|
-
}, [
|
|
2271
|
+
}, [c, m, w]), X(() => {
|
|
2272
|
+
k([]);
|
|
2273
|
+
}, [m, w]), /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
1729
2274
|
/* @__PURE__ */ l("div", { className: "mapui:grid mapui:grid-cols-2 mapui:gap-3", children: [
|
|
1730
|
-
/* @__PURE__ */
|
|
2275
|
+
/* @__PURE__ */ a(S, { label: "Layer ID", required: !0, children: /* @__PURE__ */ a(
|
|
1731
2276
|
"input",
|
|
1732
2277
|
{
|
|
1733
2278
|
type: "text",
|
|
1734
|
-
value:
|
|
1735
|
-
onChange: (
|
|
2279
|
+
value: e.id,
|
|
2280
|
+
onChange: (x) => n({ id: x.target.value }),
|
|
1736
2281
|
placeholder: "my-layer",
|
|
1737
|
-
className:
|
|
2282
|
+
className: V
|
|
1738
2283
|
}
|
|
1739
2284
|
) }),
|
|
1740
|
-
/* @__PURE__ */
|
|
2285
|
+
/* @__PURE__ */ a(S, { label: "Label", children: /* @__PURE__ */ a(
|
|
1741
2286
|
"input",
|
|
1742
2287
|
{
|
|
1743
2288
|
type: "text",
|
|
1744
|
-
value:
|
|
1745
|
-
onChange: (
|
|
2289
|
+
value: e.label,
|
|
2290
|
+
onChange: (x) => n({ label: x.target.value }),
|
|
1746
2291
|
placeholder: "My Layer",
|
|
1747
|
-
className:
|
|
2292
|
+
className: V
|
|
1748
2293
|
}
|
|
1749
2294
|
) })
|
|
1750
2295
|
] }),
|
|
1751
|
-
/* @__PURE__ */
|
|
2296
|
+
/* @__PURE__ */ a(S, { label: "Source", required: !0, children: /* @__PURE__ */ l(
|
|
1752
2297
|
"select",
|
|
1753
2298
|
{
|
|
1754
|
-
value:
|
|
1755
|
-
onChange: (
|
|
1756
|
-
className:
|
|
2299
|
+
value: e.sourceId,
|
|
2300
|
+
onChange: (x) => n({ sourceId: x.target.value }),
|
|
2301
|
+
className: V,
|
|
1757
2302
|
children: [
|
|
1758
|
-
/* @__PURE__ */
|
|
1759
|
-
|
|
2303
|
+
/* @__PURE__ */ a("option", { value: "", children: "Select a source…" }),
|
|
2304
|
+
i.map((x) => /* @__PURE__ */ a("option", { value: x.id, children: x.label ?? x.id }, x.id))
|
|
1760
2305
|
]
|
|
1761
2306
|
}
|
|
1762
2307
|
) }),
|
|
1763
|
-
/* @__PURE__ */ l(
|
|
1764
|
-
|
|
2308
|
+
/* @__PURE__ */ l(S, { label: "Collection", required: !0, children: [
|
|
2309
|
+
d.length > 0 ? /* @__PURE__ */ l(
|
|
1765
2310
|
"select",
|
|
1766
2311
|
{
|
|
1767
|
-
value:
|
|
1768
|
-
onChange: (
|
|
1769
|
-
className:
|
|
2312
|
+
value: e.collection,
|
|
2313
|
+
onChange: (x) => n({ collection: x.target.value }),
|
|
2314
|
+
className: V,
|
|
1770
2315
|
children: [
|
|
1771
|
-
/* @__PURE__ */
|
|
1772
|
-
|
|
2316
|
+
/* @__PURE__ */ a("option", { value: "", children: "Select a collection…" }),
|
|
2317
|
+
d.map((x) => /* @__PURE__ */ a("option", { value: x.id, children: x.title ?? x.id }, x.id))
|
|
1773
2318
|
]
|
|
1774
2319
|
}
|
|
1775
|
-
) : /* @__PURE__ */
|
|
2320
|
+
) : /* @__PURE__ */ a(
|
|
1776
2321
|
"input",
|
|
1777
2322
|
{
|
|
1778
2323
|
type: "text",
|
|
1779
|
-
value:
|
|
1780
|
-
onChange: (
|
|
1781
|
-
placeholder:
|
|
1782
|
-
className:
|
|
2324
|
+
value: e.collection,
|
|
2325
|
+
onChange: (x) => n({ collection: x.target.value }),
|
|
2326
|
+
placeholder: f ? "Loading collections…" : "collection-id",
|
|
2327
|
+
className: V
|
|
1783
2328
|
}
|
|
1784
2329
|
),
|
|
1785
|
-
|
|
2330
|
+
u && /* @__PURE__ */ a("span", { className: "mapui:mt-0.5 mapui:block mapui:text-xs mapui:text-gray-400", children: "Loading properties…" })
|
|
1786
2331
|
] }),
|
|
1787
|
-
/* @__PURE__ */
|
|
1788
|
-
/* @__PURE__ */
|
|
2332
|
+
/* @__PURE__ */ a(S, { label: "Data Mode", children: /* @__PURE__ */ a("div", { className: "mapui:flex mapui:gap-4", children: ["vector-tiles", "geojson"].map((x) => /* @__PURE__ */ l("label", { className: "mapui:flex mapui:cursor-pointer mapui:items-center mapui:gap-1.5", children: [
|
|
2333
|
+
/* @__PURE__ */ a(
|
|
1789
2334
|
"input",
|
|
1790
2335
|
{
|
|
1791
2336
|
type: "radio",
|
|
1792
|
-
name: `data-mode-${
|
|
1793
|
-
value:
|
|
1794
|
-
checked:
|
|
1795
|
-
onChange: () =>
|
|
2337
|
+
name: `data-mode-${e.id}`,
|
|
2338
|
+
value: x,
|
|
2339
|
+
checked: e.dataMode === x,
|
|
2340
|
+
onChange: () => n({ dataMode: x }),
|
|
1796
2341
|
className: "mapui:accent-blue-600"
|
|
1797
2342
|
}
|
|
1798
2343
|
),
|
|
1799
|
-
/* @__PURE__ */
|
|
1800
|
-
] },
|
|
2344
|
+
/* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:text-gray-700", children: x })
|
|
2345
|
+
] }, x)) }) }),
|
|
1801
2346
|
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
1802
|
-
/* @__PURE__ */
|
|
2347
|
+
/* @__PURE__ */ a(
|
|
1803
2348
|
"input",
|
|
1804
2349
|
{
|
|
1805
2350
|
type: "checkbox",
|
|
1806
2351
|
id: "layer-visible",
|
|
1807
|
-
checked:
|
|
1808
|
-
onChange: (
|
|
2352
|
+
checked: e.visible,
|
|
2353
|
+
onChange: (x) => n({ visible: x.target.checked }),
|
|
1809
2354
|
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
1810
2355
|
}
|
|
1811
2356
|
),
|
|
1812
|
-
/* @__PURE__ */
|
|
2357
|
+
/* @__PURE__ */ a("label", { htmlFor: "layer-visible", className: "mapui:text-sm mapui:text-gray-700", children: "Visible by default" })
|
|
1813
2358
|
] }),
|
|
1814
|
-
/* @__PURE__ */
|
|
1815
|
-
|
|
2359
|
+
/* @__PURE__ */ a(_, { title: "Style", children: /* @__PURE__ */ a(
|
|
2360
|
+
xa,
|
|
1816
2361
|
{
|
|
1817
|
-
value:
|
|
1818
|
-
onChange: (
|
|
1819
|
-
|
|
1820
|
-
availableIcons:
|
|
2362
|
+
value: e.style ?? me,
|
|
2363
|
+
onChange: (x) => n({ style: x }),
|
|
2364
|
+
suggestedTypes: v,
|
|
2365
|
+
availableIcons: r,
|
|
2366
|
+
availableProperties: s,
|
|
2367
|
+
onFetchDistinctValues: m && w ? (x) => Ye(m, w, x, { limit: 1e3 }) : void 0
|
|
1821
2368
|
}
|
|
1822
2369
|
) }),
|
|
1823
|
-
/* @__PURE__ */
|
|
1824
|
-
|
|
2370
|
+
/* @__PURE__ */ a(_, { title: "Legend", children: /* @__PURE__ */ a(
|
|
2371
|
+
va,
|
|
1825
2372
|
{
|
|
1826
|
-
value:
|
|
1827
|
-
onChange: (
|
|
2373
|
+
value: e.legend,
|
|
2374
|
+
onChange: (x) => n({ legend: x }),
|
|
2375
|
+
style: e.style
|
|
1828
2376
|
}
|
|
1829
2377
|
) }),
|
|
1830
|
-
/* @__PURE__ */
|
|
1831
|
-
|
|
2378
|
+
/* @__PURE__ */ a(_, { title: "Search Fields", children: /* @__PURE__ */ a(
|
|
2379
|
+
Sa,
|
|
1832
2380
|
{
|
|
1833
|
-
fields: ((
|
|
1834
|
-
onChange: (
|
|
1835
|
-
availableProperties:
|
|
2381
|
+
fields: ((D = e.search) == null ? void 0 : D.fields) ?? [],
|
|
2382
|
+
onChange: (x) => n({ search: x.length > 0 ? { fields: x } : void 0 }),
|
|
2383
|
+
availableProperties: s
|
|
1836
2384
|
}
|
|
1837
2385
|
) }),
|
|
1838
|
-
/* @__PURE__ */
|
|
1839
|
-
|
|
2386
|
+
/* @__PURE__ */ a(_, { title: "Property Display", children: /* @__PURE__ */ a(
|
|
2387
|
+
La,
|
|
1840
2388
|
{
|
|
1841
|
-
value:
|
|
1842
|
-
onChange: (
|
|
1843
|
-
availableProperties:
|
|
2389
|
+
value: e.propertyDisplay ?? {},
|
|
2390
|
+
onChange: (x) => n({ propertyDisplay: Object.keys(x).length > 0 ? x : void 0 }),
|
|
2391
|
+
availableProperties: s
|
|
1844
2392
|
}
|
|
1845
2393
|
) })
|
|
1846
2394
|
] });
|
|
1847
2395
|
}
|
|
1848
|
-
const
|
|
2396
|
+
const ne = () => ({
|
|
1849
2397
|
id: "",
|
|
1850
2398
|
sourceId: "",
|
|
1851
2399
|
collection: "",
|
|
@@ -1853,99 +2401,99 @@ const _ = () => ({
|
|
|
1853
2401
|
visible: !0,
|
|
1854
2402
|
dataMode: "vector-tiles"
|
|
1855
2403
|
});
|
|
1856
|
-
function
|
|
1857
|
-
const [
|
|
1858
|
-
|
|
1859
|
-
},
|
|
1860
|
-
|
|
1861
|
-
},
|
|
1862
|
-
|
|
1863
|
-
},
|
|
1864
|
-
if (
|
|
1865
|
-
const
|
|
1866
|
-
[
|
|
1867
|
-
},
|
|
1868
|
-
if (
|
|
1869
|
-
const
|
|
1870
|
-
[
|
|
1871
|
-
},
|
|
1872
|
-
|
|
1873
|
-
},
|
|
1874
|
-
|
|
1875
|
-
},
|
|
1876
|
-
|
|
1877
|
-
},
|
|
1878
|
-
|
|
1879
|
-
const
|
|
1880
|
-
if (
|
|
1881
|
-
const
|
|
1882
|
-
if (
|
|
1883
|
-
const
|
|
1884
|
-
|
|
1885
|
-
},
|
|
1886
|
-
|
|
2404
|
+
function _a({ layers: e, onChange: t, availableSources: i, availableIcons: r }) {
|
|
2405
|
+
const [n, o] = L(null), [p, b] = L(!1), [m, w] = L(ne()), [d, f] = L(null), [c, u] = L(null), [s, v] = L(null), k = () => {
|
|
2406
|
+
t([...e, m]), b(!1), w(ne());
|
|
2407
|
+
}, D = (g) => {
|
|
2408
|
+
t(e.map((N) => N.id === n ? g : N));
|
|
2409
|
+
}, x = (g) => {
|
|
2410
|
+
t(e.filter((N) => N.id !== g)), f(null), n === g && o(null);
|
|
2411
|
+
}, $ = (g) => {
|
|
2412
|
+
if (g === 0) return;
|
|
2413
|
+
const N = [...e];
|
|
2414
|
+
[N[g - 1], N[g]] = [N[g], N[g - 1]], t(N);
|
|
2415
|
+
}, C = (g) => {
|
|
2416
|
+
if (g === e.length - 1) return;
|
|
2417
|
+
const N = [...e];
|
|
2418
|
+
[N[g], N[g + 1]] = [N[g + 1], N[g]], t(N);
|
|
2419
|
+
}, P = (g, N) => {
|
|
2420
|
+
u(N), g.dataTransfer.effectAllowed = "move", g.dataTransfer.setData("text/plain", N);
|
|
2421
|
+
}, E = (g, N) => {
|
|
2422
|
+
g.preventDefault(), g.dataTransfer.dropEffect = "move", v(N);
|
|
2423
|
+
}, y = () => {
|
|
2424
|
+
v(null);
|
|
2425
|
+
}, F = (g, N) => {
|
|
2426
|
+
g.preventDefault(), v(null);
|
|
2427
|
+
const O = c;
|
|
2428
|
+
if (u(null), !O || O === N) return;
|
|
2429
|
+
const q = e.findIndex((h) => h.id === O), U = e.findIndex((h) => h.id === N);
|
|
2430
|
+
if (q === -1 || U === -1) return;
|
|
2431
|
+
const R = [...e];
|
|
2432
|
+
R.splice(q, 1), R.splice(U, 0, e[q]), t(R);
|
|
2433
|
+
}, M = () => {
|
|
2434
|
+
u(null), v(null);
|
|
1887
2435
|
};
|
|
1888
2436
|
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
1889
2437
|
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between", children: [
|
|
1890
|
-
/* @__PURE__ */
|
|
1891
|
-
/* @__PURE__ */
|
|
2438
|
+
/* @__PURE__ */ a("h3", { className: "mapui:m-0 mapui:text-sm mapui:font-semibold mapui:text-gray-700", children: "Layers" }),
|
|
2439
|
+
/* @__PURE__ */ a(
|
|
1892
2440
|
"button",
|
|
1893
2441
|
{
|
|
1894
2442
|
type: "button",
|
|
1895
2443
|
onClick: () => {
|
|
1896
|
-
|
|
2444
|
+
b(!0), w(ne());
|
|
1897
2445
|
},
|
|
1898
2446
|
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",
|
|
1899
2447
|
children: "+ Add Layer"
|
|
1900
2448
|
}
|
|
1901
2449
|
)
|
|
1902
2450
|
] }),
|
|
1903
|
-
|
|
1904
|
-
/* @__PURE__ */
|
|
1905
|
-
var
|
|
1906
|
-
const
|
|
2451
|
+
e.length === 0 && !p && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No layers configured." }),
|
|
2452
|
+
/* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: e.map((g, N) => {
|
|
2453
|
+
var R, h, T, I;
|
|
2454
|
+
const O = c === g.id, q = s === g.id, U = n === g.id;
|
|
1907
2455
|
return /* @__PURE__ */ l(
|
|
1908
2456
|
"li",
|
|
1909
2457
|
{
|
|
1910
|
-
draggable:
|
|
1911
|
-
onDragStart:
|
|
1912
|
-
onDragOver: (
|
|
1913
|
-
onDragLeave:
|
|
1914
|
-
onDrop: (
|
|
1915
|
-
onDragEnd:
|
|
2458
|
+
draggable: !U,
|
|
2459
|
+
onDragStart: U ? void 0 : (A) => P(A, g.id),
|
|
2460
|
+
onDragOver: (A) => E(A, g.id),
|
|
2461
|
+
onDragLeave: y,
|
|
2462
|
+
onDrop: (A) => F(A, g.id),
|
|
2463
|
+
onDragEnd: M,
|
|
1916
2464
|
className: [
|
|
1917
2465
|
"mapui:rounded-lg mapui:border mapui:bg-white mapui:transition-colors",
|
|
1918
|
-
|
|
1919
|
-
|
|
2466
|
+
q ? "mapui:border-blue-400 mapui:bg-blue-50" : "mapui:border-gray-200",
|
|
2467
|
+
O ? "mapui:opacity-50" : "mapui:opacity-100"
|
|
1920
2468
|
].join(" "),
|
|
1921
2469
|
children: [
|
|
1922
2470
|
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between mapui:gap-2 mapui:px-3 mapui:py-2", children: [
|
|
1923
2471
|
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:min-w-0 mapui:items-center mapui:gap-2", children: [
|
|
1924
2472
|
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:shrink-0 mapui:flex-col mapui:gap-0.5", children: [
|
|
1925
|
-
/* @__PURE__ */
|
|
2473
|
+
/* @__PURE__ */ a(
|
|
1926
2474
|
"button",
|
|
1927
2475
|
{
|
|
1928
2476
|
type: "button",
|
|
1929
|
-
onClick: () =>
|
|
1930
|
-
disabled:
|
|
2477
|
+
onClick: () => $(N),
|
|
2478
|
+
disabled: N === 0,
|
|
1931
2479
|
"aria-label": "Move layer up",
|
|
1932
2480
|
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",
|
|
1933
2481
|
children: "▲"
|
|
1934
2482
|
}
|
|
1935
2483
|
),
|
|
1936
|
-
/* @__PURE__ */
|
|
2484
|
+
/* @__PURE__ */ a(
|
|
1937
2485
|
"button",
|
|
1938
2486
|
{
|
|
1939
2487
|
type: "button",
|
|
1940
|
-
onClick: () =>
|
|
1941
|
-
disabled:
|
|
2488
|
+
onClick: () => C(N),
|
|
2489
|
+
disabled: N === e.length - 1,
|
|
1942
2490
|
"aria-label": "Move layer down",
|
|
1943
2491
|
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",
|
|
1944
2492
|
children: "▼"
|
|
1945
2493
|
}
|
|
1946
2494
|
)
|
|
1947
2495
|
] }),
|
|
1948
|
-
/* @__PURE__ */
|
|
2496
|
+
/* @__PURE__ */ a(
|
|
1949
2497
|
"span",
|
|
1950
2498
|
{
|
|
1951
2499
|
className: "mapui:shrink-0 mapui:cursor-grab mapui:text-gray-400 active:mapui:cursor-grabbing",
|
|
@@ -1954,152 +2502,152 @@ function xa({ layers: a, onChange: i, availableSources: t, availableIcons: p })
|
|
|
1954
2502
|
}
|
|
1955
2503
|
),
|
|
1956
2504
|
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:min-w-0 mapui:flex-col mapui:gap-0.5", children: [
|
|
1957
|
-
/* @__PURE__ */
|
|
1958
|
-
/* @__PURE__ */
|
|
2505
|
+
/* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:font-medium mapui:text-gray-800", children: g.label || g.id }),
|
|
2506
|
+
/* @__PURE__ */ a("span", { className: "mapui:font-mono mapui:text-xs mapui:text-gray-500", children: g.collection }),
|
|
1959
2507
|
/* @__PURE__ */ l("div", { className: "mapui:mt-1 mapui:flex mapui:flex-wrap mapui:gap-1", children: [
|
|
1960
|
-
/* @__PURE__ */
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
(((
|
|
1964
|
-
|
|
2508
|
+
/* @__PURE__ */ a("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: g.dataMode }),
|
|
2509
|
+
g.style && /* @__PURE__ */ a("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: g.style.type }),
|
|
2510
|
+
g.visible === !1 && /* @__PURE__ */ a("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" }),
|
|
2511
|
+
(((h = (R = g.search) == null ? void 0 : R.fields) == null ? void 0 : h.length) ?? 0) > 0 && /* @__PURE__ */ l("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: [
|
|
2512
|
+
g.search.fields.length,
|
|
1965
2513
|
" search fields"
|
|
1966
2514
|
] }),
|
|
1967
|
-
(((
|
|
1968
|
-
|
|
2515
|
+
(((I = (T = g.legend) == null ? void 0 : T.entries) == null ? void 0 : I.length) ?? 0) > 0 && /* @__PURE__ */ l("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: [
|
|
2516
|
+
g.legend.entries.length,
|
|
1969
2517
|
" legend entries"
|
|
1970
2518
|
] })
|
|
1971
2519
|
] })
|
|
1972
2520
|
] })
|
|
1973
2521
|
] }),
|
|
1974
2522
|
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:shrink-0 mapui:gap-1", children: [
|
|
1975
|
-
/* @__PURE__ */
|
|
2523
|
+
/* @__PURE__ */ a(
|
|
1976
2524
|
"button",
|
|
1977
2525
|
{
|
|
1978
2526
|
type: "button",
|
|
1979
|
-
onClick: () => n
|
|
2527
|
+
onClick: () => o(n === g.id ? null : g.id),
|
|
1980
2528
|
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",
|
|
1981
|
-
children:
|
|
2529
|
+
children: n === g.id ? "Close" : "Edit"
|
|
1982
2530
|
}
|
|
1983
2531
|
),
|
|
1984
|
-
/* @__PURE__ */
|
|
2532
|
+
/* @__PURE__ */ a(
|
|
1985
2533
|
"button",
|
|
1986
2534
|
{
|
|
1987
2535
|
type: "button",
|
|
1988
|
-
onClick: () => g
|
|
2536
|
+
onClick: () => f(g.id),
|
|
1989
2537
|
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",
|
|
1990
2538
|
children: "Remove"
|
|
1991
2539
|
}
|
|
1992
2540
|
)
|
|
1993
2541
|
] })
|
|
1994
2542
|
] }),
|
|
1995
|
-
|
|
1996
|
-
|
|
2543
|
+
n === g.id && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(
|
|
2544
|
+
Te,
|
|
1997
2545
|
{
|
|
1998
|
-
value:
|
|
1999
|
-
onChange:
|
|
2000
|
-
availableSources:
|
|
2001
|
-
availableIcons:
|
|
2546
|
+
value: g,
|
|
2547
|
+
onChange: D,
|
|
2548
|
+
availableSources: i,
|
|
2549
|
+
availableIcons: r
|
|
2002
2550
|
}
|
|
2003
2551
|
) })
|
|
2004
2552
|
]
|
|
2005
2553
|
},
|
|
2006
|
-
|
|
2554
|
+
g.id
|
|
2007
2555
|
);
|
|
2008
2556
|
}) }),
|
|
2009
|
-
|
|
2010
|
-
/* @__PURE__ */
|
|
2011
|
-
/* @__PURE__ */
|
|
2012
|
-
|
|
2557
|
+
p && /* @__PURE__ */ l("div", { className: "mapui:rounded-lg mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
|
|
2558
|
+
/* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-3 mapui:text-xs mapui:font-semibold mapui:text-blue-700", children: "New Layer" }),
|
|
2559
|
+
/* @__PURE__ */ a(
|
|
2560
|
+
Te,
|
|
2013
2561
|
{
|
|
2014
|
-
value:
|
|
2015
|
-
onChange:
|
|
2016
|
-
availableSources:
|
|
2017
|
-
availableIcons:
|
|
2562
|
+
value: m,
|
|
2563
|
+
onChange: w,
|
|
2564
|
+
availableSources: i,
|
|
2565
|
+
availableIcons: r
|
|
2018
2566
|
}
|
|
2019
2567
|
),
|
|
2020
2568
|
/* @__PURE__ */ l("div", { className: "mapui:mt-3 mapui:flex mapui:gap-2", children: [
|
|
2021
|
-
/* @__PURE__ */
|
|
2569
|
+
/* @__PURE__ */ a(
|
|
2022
2570
|
"button",
|
|
2023
2571
|
{
|
|
2024
2572
|
type: "button",
|
|
2025
|
-
onClick:
|
|
2026
|
-
disabled: !
|
|
2573
|
+
onClick: k,
|
|
2574
|
+
disabled: !m.id || !m.sourceId || !m.collection,
|
|
2027
2575
|
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",
|
|
2028
2576
|
children: "Save"
|
|
2029
2577
|
}
|
|
2030
2578
|
),
|
|
2031
|
-
/* @__PURE__ */
|
|
2579
|
+
/* @__PURE__ */ a(
|
|
2032
2580
|
"button",
|
|
2033
2581
|
{
|
|
2034
2582
|
type: "button",
|
|
2035
|
-
onClick: () =>
|
|
2583
|
+
onClick: () => b(!1),
|
|
2036
2584
|
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",
|
|
2037
2585
|
children: "Cancel"
|
|
2038
2586
|
}
|
|
2039
2587
|
)
|
|
2040
2588
|
] })
|
|
2041
2589
|
] }),
|
|
2042
|
-
/* @__PURE__ */
|
|
2043
|
-
|
|
2590
|
+
/* @__PURE__ */ a(
|
|
2591
|
+
Z,
|
|
2044
2592
|
{
|
|
2045
|
-
open:
|
|
2593
|
+
open: d !== null,
|
|
2046
2594
|
title: "Remove Layer",
|
|
2047
2595
|
description: "Are you sure you want to remove this layer from the configuration?",
|
|
2048
|
-
onConfirm: () =>
|
|
2049
|
-
onCancel: () =>
|
|
2596
|
+
onConfirm: () => d && x(d),
|
|
2597
|
+
onCancel: () => f(null)
|
|
2050
2598
|
}
|
|
2051
2599
|
)
|
|
2052
2600
|
] });
|
|
2053
2601
|
}
|
|
2054
|
-
const
|
|
2055
|
-
function
|
|
2056
|
-
const
|
|
2602
|
+
const Q = "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";
|
|
2603
|
+
function Le({ value: e, onChange: t }) {
|
|
2604
|
+
const i = (r) => t({ ...e, ...r });
|
|
2057
2605
|
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
2058
|
-
/* @__PURE__ */
|
|
2606
|
+
/* @__PURE__ */ a(S, { label: "ID", required: !0, children: /* @__PURE__ */ a(
|
|
2059
2607
|
"input",
|
|
2060
2608
|
{
|
|
2061
2609
|
type: "text",
|
|
2062
|
-
value:
|
|
2063
|
-
onChange: (
|
|
2610
|
+
value: e.id,
|
|
2611
|
+
onChange: (r) => i({ id: r.target.value }),
|
|
2064
2612
|
placeholder: "osm",
|
|
2065
|
-
className:
|
|
2613
|
+
className: Q
|
|
2066
2614
|
}
|
|
2067
2615
|
) }),
|
|
2068
|
-
/* @__PURE__ */
|
|
2616
|
+
/* @__PURE__ */ a(S, { label: "Label", children: /* @__PURE__ */ a(
|
|
2069
2617
|
"input",
|
|
2070
2618
|
{
|
|
2071
2619
|
type: "text",
|
|
2072
|
-
value:
|
|
2073
|
-
onChange: (
|
|
2620
|
+
value: e.label,
|
|
2621
|
+
onChange: (r) => i({ label: r.target.value }),
|
|
2074
2622
|
placeholder: "OpenStreetMap",
|
|
2075
|
-
className:
|
|
2623
|
+
className: Q
|
|
2076
2624
|
}
|
|
2077
2625
|
) }),
|
|
2078
|
-
/* @__PURE__ */
|
|
2626
|
+
/* @__PURE__ */ a(S, { label: "Style URL", required: !0, children: /* @__PURE__ */ a(
|
|
2079
2627
|
"input",
|
|
2080
2628
|
{
|
|
2081
2629
|
type: "url",
|
|
2082
|
-
value:
|
|
2083
|
-
onChange: (
|
|
2630
|
+
value: e.url,
|
|
2631
|
+
onChange: (r) => i({ url: r.target.value }),
|
|
2084
2632
|
placeholder: "https://example.com/style.json",
|
|
2085
|
-
className:
|
|
2633
|
+
className: Q
|
|
2086
2634
|
}
|
|
2087
2635
|
) }),
|
|
2088
|
-
/* @__PURE__ */ l(
|
|
2089
|
-
/* @__PURE__ */
|
|
2636
|
+
/* @__PURE__ */ l(S, { label: "Thumbnail URL (optional)", children: [
|
|
2637
|
+
/* @__PURE__ */ a(
|
|
2090
2638
|
"input",
|
|
2091
2639
|
{
|
|
2092
2640
|
type: "url",
|
|
2093
|
-
value:
|
|
2094
|
-
onChange: (
|
|
2641
|
+
value: e.thumbnail ?? "",
|
|
2642
|
+
onChange: (r) => i({ thumbnail: r.target.value || void 0 }),
|
|
2095
2643
|
placeholder: "https://example.com/thumbnail.png",
|
|
2096
|
-
className:
|
|
2644
|
+
className: Q
|
|
2097
2645
|
}
|
|
2098
2646
|
),
|
|
2099
|
-
|
|
2647
|
+
e.thumbnail && /* @__PURE__ */ a(
|
|
2100
2648
|
"img",
|
|
2101
2649
|
{
|
|
2102
|
-
src:
|
|
2650
|
+
src: e.thumbnail,
|
|
2103
2651
|
alt: "Thumbnail preview",
|
|
2104
2652
|
className: "mapui:mt-1 mapui:h-16 mapui:w-24 mapui:rounded mapui:border mapui:border-gray-200 mapui:object-cover"
|
|
2105
2653
|
}
|
|
@@ -2107,253 +2655,253 @@ function ce({ value: a, onChange: i }) {
|
|
|
2107
2655
|
] })
|
|
2108
2656
|
] });
|
|
2109
2657
|
}
|
|
2110
|
-
const
|
|
2111
|
-
function
|
|
2112
|
-
const [
|
|
2113
|
-
|
|
2114
|
-
},
|
|
2115
|
-
|
|
2116
|
-
},
|
|
2117
|
-
|
|
2658
|
+
const pe = () => ({ id: "", label: "", url: "" });
|
|
2659
|
+
function Ya({ basemaps: e, onChange: t }) {
|
|
2660
|
+
const [i, r] = L(null), [n, o] = L(!1), [p, b] = L(pe()), [m, w] = L(null), d = (u) => {
|
|
2661
|
+
t(e.map((s) => s.id === i ? u : s));
|
|
2662
|
+
}, f = () => {
|
|
2663
|
+
t([...e, p]), o(!1), b(pe());
|
|
2664
|
+
}, c = (u) => {
|
|
2665
|
+
t(e.filter((s) => s.id !== u)), w(null);
|
|
2118
2666
|
};
|
|
2119
2667
|
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
2120
2668
|
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between", children: [
|
|
2121
|
-
/* @__PURE__ */
|
|
2122
|
-
/* @__PURE__ */
|
|
2669
|
+
/* @__PURE__ */ a("h3", { className: "mapui:m-0 mapui:text-sm mapui:font-semibold mapui:text-gray-700", children: "Basemaps" }),
|
|
2670
|
+
/* @__PURE__ */ a(
|
|
2123
2671
|
"button",
|
|
2124
2672
|
{
|
|
2125
2673
|
type: "button",
|
|
2126
2674
|
onClick: () => {
|
|
2127
|
-
|
|
2675
|
+
o(!0), b(pe());
|
|
2128
2676
|
},
|
|
2129
2677
|
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",
|
|
2130
2678
|
children: "+ Add Basemap"
|
|
2131
2679
|
}
|
|
2132
2680
|
)
|
|
2133
2681
|
] }),
|
|
2134
|
-
|
|
2135
|
-
/* @__PURE__ */
|
|
2682
|
+
e.length === 0 && !n && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No basemaps configured." }),
|
|
2683
|
+
/* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: e.map((u) => /* @__PURE__ */ l(
|
|
2136
2684
|
"li",
|
|
2137
2685
|
{
|
|
2138
2686
|
className: "mapui:rounded-lg mapui:border mapui:border-gray-200 mapui:bg-white",
|
|
2139
2687
|
children: [
|
|
2140
2688
|
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-3 mapui:px-3 mapui:py-2", children: [
|
|
2141
|
-
|
|
2689
|
+
u.thumbnail && /* @__PURE__ */ a(
|
|
2142
2690
|
"img",
|
|
2143
2691
|
{
|
|
2144
|
-
src:
|
|
2692
|
+
src: u.thumbnail,
|
|
2145
2693
|
alt: "",
|
|
2146
2694
|
className: "mapui:h-10 mapui:w-14 mapui:shrink-0 mapui:rounded mapui:object-cover"
|
|
2147
2695
|
}
|
|
2148
2696
|
),
|
|
2149
2697
|
/* @__PURE__ */ l("div", { className: "mapui:flex-1 mapui:overflow-hidden", children: [
|
|
2150
|
-
/* @__PURE__ */
|
|
2151
|
-
/* @__PURE__ */
|
|
2698
|
+
/* @__PURE__ */ a("span", { className: "mapui:block mapui:text-sm mapui:font-medium mapui:text-gray-800", children: u.label || u.id }),
|
|
2699
|
+
/* @__PURE__ */ a("span", { className: "mapui:block mapui:truncate mapui:font-mono mapui:text-xs mapui:text-gray-500", children: u.url })
|
|
2152
2700
|
] }),
|
|
2153
2701
|
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:shrink-0 mapui:gap-1", children: [
|
|
2154
|
-
/* @__PURE__ */
|
|
2702
|
+
/* @__PURE__ */ a(
|
|
2155
2703
|
"button",
|
|
2156
2704
|
{
|
|
2157
2705
|
type: "button",
|
|
2158
|
-
onClick: () =>
|
|
2706
|
+
onClick: () => r(i === u.id ? null : u.id),
|
|
2159
2707
|
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",
|
|
2160
|
-
children:
|
|
2708
|
+
children: i === u.id ? "Close" : "Edit"
|
|
2161
2709
|
}
|
|
2162
2710
|
),
|
|
2163
|
-
/* @__PURE__ */
|
|
2711
|
+
/* @__PURE__ */ a(
|
|
2164
2712
|
"button",
|
|
2165
2713
|
{
|
|
2166
2714
|
type: "button",
|
|
2167
|
-
onClick: () =>
|
|
2715
|
+
onClick: () => w(u.id),
|
|
2168
2716
|
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",
|
|
2169
2717
|
children: "Remove"
|
|
2170
2718
|
}
|
|
2171
2719
|
)
|
|
2172
2720
|
] })
|
|
2173
2721
|
] }),
|
|
2174
|
-
|
|
2722
|
+
i === u.id && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(Le, { value: u, onChange: d }) })
|
|
2175
2723
|
]
|
|
2176
2724
|
},
|
|
2177
|
-
|
|
2725
|
+
u.id
|
|
2178
2726
|
)) }),
|
|
2179
|
-
|
|
2180
|
-
/* @__PURE__ */
|
|
2181
|
-
/* @__PURE__ */
|
|
2727
|
+
n && /* @__PURE__ */ l("div", { className: "mapui:rounded-lg mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
|
|
2728
|
+
/* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-3 mapui:text-xs mapui:font-semibold mapui:text-blue-700", children: "New Basemap" }),
|
|
2729
|
+
/* @__PURE__ */ a(Le, { value: p, onChange: b }),
|
|
2182
2730
|
/* @__PURE__ */ l("div", { className: "mapui:mt-3 mapui:flex mapui:gap-2", children: [
|
|
2183
|
-
/* @__PURE__ */
|
|
2731
|
+
/* @__PURE__ */ a(
|
|
2184
2732
|
"button",
|
|
2185
2733
|
{
|
|
2186
2734
|
type: "button",
|
|
2187
|
-
onClick:
|
|
2188
|
-
disabled: !
|
|
2735
|
+
onClick: f,
|
|
2736
|
+
disabled: !p.id || !p.url,
|
|
2189
2737
|
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",
|
|
2190
2738
|
children: "Save"
|
|
2191
2739
|
}
|
|
2192
2740
|
),
|
|
2193
|
-
/* @__PURE__ */
|
|
2741
|
+
/* @__PURE__ */ a(
|
|
2194
2742
|
"button",
|
|
2195
2743
|
{
|
|
2196
2744
|
type: "button",
|
|
2197
|
-
onClick: () =>
|
|
2745
|
+
onClick: () => o(!1),
|
|
2198
2746
|
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",
|
|
2199
2747
|
children: "Cancel"
|
|
2200
2748
|
}
|
|
2201
2749
|
)
|
|
2202
2750
|
] })
|
|
2203
2751
|
] }),
|
|
2204
|
-
/* @__PURE__ */
|
|
2205
|
-
|
|
2752
|
+
/* @__PURE__ */ a(
|
|
2753
|
+
Z,
|
|
2206
2754
|
{
|
|
2207
|
-
open:
|
|
2755
|
+
open: m !== null,
|
|
2208
2756
|
title: "Remove Basemap",
|
|
2209
2757
|
description: "Are you sure you want to remove this basemap from the configuration?",
|
|
2210
|
-
onConfirm: () =>
|
|
2211
|
-
onCancel: () =>
|
|
2758
|
+
onConfirm: () => m && c(m),
|
|
2759
|
+
onCancel: () => w(null)
|
|
2212
2760
|
}
|
|
2213
2761
|
)
|
|
2214
2762
|
] });
|
|
2215
2763
|
}
|
|
2216
|
-
const
|
|
2217
|
-
function
|
|
2218
|
-
const
|
|
2764
|
+
const Ie = "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";
|
|
2765
|
+
function Ae({ value: e, onChange: t }) {
|
|
2766
|
+
const i = (r) => t({ ...e, ...r });
|
|
2219
2767
|
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
2220
|
-
/* @__PURE__ */
|
|
2768
|
+
/* @__PURE__ */ a(S, { label: "ID", required: !0, children: /* @__PURE__ */ a(
|
|
2221
2769
|
"input",
|
|
2222
2770
|
{
|
|
2223
2771
|
type: "text",
|
|
2224
|
-
value:
|
|
2225
|
-
onChange: (
|
|
2772
|
+
value: e.id,
|
|
2773
|
+
onChange: (r) => i({ id: r.target.value }),
|
|
2226
2774
|
placeholder: "my-sprites",
|
|
2227
|
-
className:
|
|
2775
|
+
className: Ie
|
|
2228
2776
|
}
|
|
2229
2777
|
) }),
|
|
2230
|
-
/* @__PURE__ */ l(
|
|
2231
|
-
/* @__PURE__ */
|
|
2778
|
+
/* @__PURE__ */ l(S, { label: "Sprite URL", required: !0, children: [
|
|
2779
|
+
/* @__PURE__ */ a(
|
|
2232
2780
|
"input",
|
|
2233
2781
|
{
|
|
2234
2782
|
type: "url",
|
|
2235
|
-
value:
|
|
2236
|
-
onChange: (
|
|
2783
|
+
value: e.url,
|
|
2784
|
+
onChange: (r) => i({ url: r.target.value }),
|
|
2237
2785
|
placeholder: "https://example.com/sprites/sprite",
|
|
2238
|
-
className:
|
|
2786
|
+
className: Ie
|
|
2239
2787
|
}
|
|
2240
2788
|
),
|
|
2241
2789
|
/* @__PURE__ */ l("p", { className: "mapui:mt-1 mapui:text-xs mapui:text-gray-400", children: [
|
|
2242
2790
|
"Base URL without extension. MapLibre will append ",
|
|
2243
|
-
/* @__PURE__ */
|
|
2791
|
+
/* @__PURE__ */ a("code", { children: ".json" }),
|
|
2244
2792
|
" and ",
|
|
2245
|
-
/* @__PURE__ */
|
|
2793
|
+
/* @__PURE__ */ a("code", { children: ".png" }),
|
|
2246
2794
|
"."
|
|
2247
2795
|
] })
|
|
2248
2796
|
] })
|
|
2249
2797
|
] });
|
|
2250
2798
|
}
|
|
2251
|
-
const
|
|
2799
|
+
const oe = () => ({ id: "", url: "" }), Pa = (e) => {
|
|
2252
2800
|
try {
|
|
2253
|
-
return new URL(
|
|
2801
|
+
return new URL(e), !0;
|
|
2254
2802
|
} catch {
|
|
2255
2803
|
return !1;
|
|
2256
2804
|
}
|
|
2257
2805
|
};
|
|
2258
|
-
function
|
|
2259
|
-
const [
|
|
2260
|
-
|
|
2261
|
-
},
|
|
2262
|
-
|
|
2263
|
-
},
|
|
2264
|
-
const
|
|
2265
|
-
|
|
2806
|
+
function Xa({ sprites: e, onChange: t }) {
|
|
2807
|
+
const [i, r] = L(null), [n, o] = L(!1), [p, b] = L(oe()), [m, w] = L(null), d = (u) => {
|
|
2808
|
+
t(e.map((s, v) => v === i ? u : s));
|
|
2809
|
+
}, f = () => {
|
|
2810
|
+
t([...e, p]), o(!1), b(oe());
|
|
2811
|
+
}, c = (u) => {
|
|
2812
|
+
const s = e.findIndex((v) => v.id === u);
|
|
2813
|
+
t(e.filter((v) => v.id !== u)), i !== null && (s === i ? r(null) : s < i && r(i - 1)), w(null);
|
|
2266
2814
|
};
|
|
2267
2815
|
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
2268
2816
|
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between", children: [
|
|
2269
|
-
/* @__PURE__ */
|
|
2270
|
-
/* @__PURE__ */
|
|
2817
|
+
/* @__PURE__ */ a("h3", { className: "mapui:m-0 mapui:text-sm mapui:font-semibold mapui:text-gray-700", children: "Custom Sprite Sheets" }),
|
|
2818
|
+
/* @__PURE__ */ a(
|
|
2271
2819
|
"button",
|
|
2272
2820
|
{
|
|
2273
2821
|
type: "button",
|
|
2274
2822
|
onClick: () => {
|
|
2275
|
-
|
|
2823
|
+
o(!0), b(oe());
|
|
2276
2824
|
},
|
|
2277
2825
|
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",
|
|
2278
2826
|
children: "+ Add Sprite Sheet"
|
|
2279
2827
|
}
|
|
2280
2828
|
)
|
|
2281
2829
|
] }),
|
|
2282
|
-
|
|
2283
|
-
/* @__PURE__ */
|
|
2830
|
+
e.length === 0 && !n && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No custom sprite sheets. Basemap icons are available automatically." }),
|
|
2831
|
+
/* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: e.map((u, s) => /* @__PURE__ */ l(
|
|
2284
2832
|
"li",
|
|
2285
2833
|
{
|
|
2286
2834
|
className: "mapui:rounded-lg mapui:border mapui:border-gray-200 mapui:bg-white",
|
|
2287
2835
|
children: [
|
|
2288
2836
|
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-3 mapui:px-3 mapui:py-2", children: [
|
|
2289
2837
|
/* @__PURE__ */ l("div", { className: "mapui:flex-1 mapui:overflow-hidden", children: [
|
|
2290
|
-
/* @__PURE__ */
|
|
2291
|
-
/* @__PURE__ */
|
|
2838
|
+
/* @__PURE__ */ a("span", { className: "mapui:block mapui:text-sm mapui:font-medium mapui:text-gray-800", children: u.id }),
|
|
2839
|
+
/* @__PURE__ */ a("span", { className: "mapui:block mapui:truncate mapui:font-mono mapui:text-xs mapui:text-gray-500", children: u.url })
|
|
2292
2840
|
] }),
|
|
2293
2841
|
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:shrink-0 mapui:gap-1", children: [
|
|
2294
|
-
/* @__PURE__ */
|
|
2842
|
+
/* @__PURE__ */ a(
|
|
2295
2843
|
"button",
|
|
2296
2844
|
{
|
|
2297
2845
|
type: "button",
|
|
2298
|
-
onClick: () =>
|
|
2846
|
+
onClick: () => r(i === s ? null : s),
|
|
2299
2847
|
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",
|
|
2300
|
-
children:
|
|
2848
|
+
children: i === s ? "Close" : "Edit"
|
|
2301
2849
|
}
|
|
2302
2850
|
),
|
|
2303
|
-
/* @__PURE__ */
|
|
2851
|
+
/* @__PURE__ */ a(
|
|
2304
2852
|
"button",
|
|
2305
2853
|
{
|
|
2306
2854
|
type: "button",
|
|
2307
|
-
onClick: () =>
|
|
2855
|
+
onClick: () => w(u.id),
|
|
2308
2856
|
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",
|
|
2309
2857
|
children: "Remove"
|
|
2310
2858
|
}
|
|
2311
2859
|
)
|
|
2312
2860
|
] })
|
|
2313
2861
|
] }),
|
|
2314
|
-
|
|
2862
|
+
i === s && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(Ae, { value: u, onChange: d }) })
|
|
2315
2863
|
]
|
|
2316
2864
|
},
|
|
2317
|
-
|
|
2865
|
+
s
|
|
2318
2866
|
)) }),
|
|
2319
|
-
|
|
2320
|
-
/* @__PURE__ */
|
|
2321
|
-
/* @__PURE__ */
|
|
2867
|
+
n && /* @__PURE__ */ l("div", { className: "mapui:rounded-lg mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
|
|
2868
|
+
/* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-3 mapui:text-xs mapui:font-semibold mapui:text-blue-700", children: "New Sprite Sheet" }),
|
|
2869
|
+
/* @__PURE__ */ a(Ae, { value: p, onChange: b }),
|
|
2322
2870
|
/* @__PURE__ */ l("div", { className: "mapui:mt-3 mapui:flex mapui:gap-2", children: [
|
|
2323
|
-
/* @__PURE__ */
|
|
2871
|
+
/* @__PURE__ */ a(
|
|
2324
2872
|
"button",
|
|
2325
2873
|
{
|
|
2326
2874
|
type: "button",
|
|
2327
|
-
onClick:
|
|
2328
|
-
disabled: !
|
|
2875
|
+
onClick: f,
|
|
2876
|
+
disabled: !p.id || !p.url || !Pa(p.url) || e.some((u) => u.id === p.id),
|
|
2329
2877
|
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",
|
|
2330
2878
|
children: "Save"
|
|
2331
2879
|
}
|
|
2332
2880
|
),
|
|
2333
|
-
/* @__PURE__ */
|
|
2881
|
+
/* @__PURE__ */ a(
|
|
2334
2882
|
"button",
|
|
2335
2883
|
{
|
|
2336
2884
|
type: "button",
|
|
2337
|
-
onClick: () =>
|
|
2885
|
+
onClick: () => o(!1),
|
|
2338
2886
|
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",
|
|
2339
2887
|
children: "Cancel"
|
|
2340
2888
|
}
|
|
2341
2889
|
)
|
|
2342
2890
|
] })
|
|
2343
2891
|
] }),
|
|
2344
|
-
/* @__PURE__ */
|
|
2345
|
-
|
|
2892
|
+
/* @__PURE__ */ a(
|
|
2893
|
+
Z,
|
|
2346
2894
|
{
|
|
2347
|
-
open:
|
|
2895
|
+
open: m !== null,
|
|
2348
2896
|
title: "Remove Sprite Sheet",
|
|
2349
2897
|
description: "Are you sure you want to remove this sprite sheet from the configuration?",
|
|
2350
|
-
onConfirm: () =>
|
|
2351
|
-
onCancel: () =>
|
|
2898
|
+
onConfirm: () => m && c(m),
|
|
2899
|
+
onCancel: () => w(null)
|
|
2352
2900
|
}
|
|
2353
2901
|
)
|
|
2354
2902
|
] });
|
|
2355
2903
|
}
|
|
2356
|
-
const
|
|
2904
|
+
const Fa = [
|
|
2357
2905
|
{ key: "showLayerPanel", label: "Layer Panel", description: "Toggle layer visibility" },
|
|
2358
2906
|
{ key: "showLegend", label: "Legend", description: "Map legend" },
|
|
2359
2907
|
{ key: "showBasemapSwitcher", label: "Basemap Switcher", description: "Switch basemap styles" },
|
|
@@ -2361,49 +2909,50 @@ const ua = [
|
|
|
2361
2909
|
{ key: "showCoordinateDisplay", label: "Coordinate Display", description: "Show cursor coordinates" },
|
|
2362
2910
|
{ key: "showFeatureDetail", label: "Feature Detail Panel", description: "Inspect feature properties" },
|
|
2363
2911
|
{ key: "showFeatureTooltip", label: "Feature Tooltip", description: "Hover tooltip on features" },
|
|
2364
|
-
{ key: "showExportButton", label: "Export Button", description: "Export data as CSV" }
|
|
2912
|
+
{ key: "showExportButton", label: "Export Button", description: "Export data as CSV" },
|
|
2913
|
+
{ key: "showLegendOpacity", label: "Legend Opacity", description: "Expand legend with opacity sliders" }
|
|
2365
2914
|
];
|
|
2366
|
-
function
|
|
2367
|
-
const
|
|
2368
|
-
|
|
2915
|
+
function Ha({ value: e, onChange: t }) {
|
|
2916
|
+
const i = (r, n) => {
|
|
2917
|
+
t({ ...e, [r]: n });
|
|
2369
2918
|
};
|
|
2370
2919
|
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-1", children: [
|
|
2371
|
-
/* @__PURE__ */
|
|
2372
|
-
/* @__PURE__ */
|
|
2373
|
-
const
|
|
2920
|
+
/* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-2 mapui:text-xs mapui:text-gray-500", children: "Enable or disable UI panels and controls." }),
|
|
2921
|
+
/* @__PURE__ */ a("div", { className: "mapui:grid mapui:grid-cols-1 mapui:gap-2 sm:mapui:grid-cols-2", children: Fa.map(({ key: r, label: n, description: o }) => {
|
|
2922
|
+
const p = e[r];
|
|
2374
2923
|
return /* @__PURE__ */ l(
|
|
2375
2924
|
"label",
|
|
2376
2925
|
{
|
|
2377
2926
|
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",
|
|
2378
2927
|
children: [
|
|
2379
2928
|
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-0.5", children: [
|
|
2380
|
-
/* @__PURE__ */
|
|
2381
|
-
/* @__PURE__ */
|
|
2929
|
+
/* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:font-medium mapui:text-gray-800", children: n }),
|
|
2930
|
+
/* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-gray-500", children: o })
|
|
2382
2931
|
] }),
|
|
2383
2932
|
/* @__PURE__ */ l("div", { className: "mapui:relative mapui:flex mapui:shrink-0 mapui:items-center", children: [
|
|
2384
|
-
/* @__PURE__ */
|
|
2933
|
+
/* @__PURE__ */ a(
|
|
2385
2934
|
"input",
|
|
2386
2935
|
{
|
|
2387
2936
|
type: "checkbox",
|
|
2388
|
-
checked:
|
|
2389
|
-
onChange: (
|
|
2937
|
+
checked: p,
|
|
2938
|
+
onChange: (b) => i(r, b.target.checked),
|
|
2390
2939
|
className: "mapui:sr-only",
|
|
2391
|
-
"aria-label":
|
|
2940
|
+
"aria-label": n
|
|
2392
2941
|
}
|
|
2393
2942
|
),
|
|
2394
|
-
/* @__PURE__ */
|
|
2943
|
+
/* @__PURE__ */ a(
|
|
2395
2944
|
"div",
|
|
2396
2945
|
{
|
|
2397
2946
|
className: [
|
|
2398
2947
|
"mapui:relative mapui:h-5 mapui:w-9 mapui:rounded-full mapui:transition-colors",
|
|
2399
|
-
|
|
2948
|
+
p ? "mapui:bg-blue-600" : "mapui:bg-gray-300"
|
|
2400
2949
|
].join(" "),
|
|
2401
|
-
children: /* @__PURE__ */
|
|
2950
|
+
children: /* @__PURE__ */ a(
|
|
2402
2951
|
"div",
|
|
2403
2952
|
{
|
|
2404
2953
|
className: [
|
|
2405
2954
|
"mapui:absolute mapui:top-0.5 mapui:h-4 mapui:w-4 mapui:rounded-full mapui:bg-white mapui:shadow mapui:transition-transform",
|
|
2406
|
-
|
|
2955
|
+
p ? "mapui:translate-x-4" : "mapui:translate-x-0.5"
|
|
2407
2956
|
].join(" ")
|
|
2408
2957
|
}
|
|
2409
2958
|
)
|
|
@@ -2412,192 +2961,204 @@ function Na({ value: a, onChange: i }) {
|
|
|
2412
2961
|
] })
|
|
2413
2962
|
]
|
|
2414
2963
|
},
|
|
2415
|
-
|
|
2964
|
+
r
|
|
2416
2965
|
);
|
|
2417
2966
|
}) })
|
|
2418
2967
|
] });
|
|
2419
2968
|
}
|
|
2420
|
-
const
|
|
2969
|
+
const Ge = [
|
|
2421
2970
|
{ key: "latitude", label: "Latitude", min: -90, max: 90, step: 1e-6, placeholder: "0" },
|
|
2422
2971
|
{ key: "longitude", label: "Longitude", min: -180, max: 180, step: 1e-6, placeholder: "0" },
|
|
2423
2972
|
{ key: "zoom", label: "Zoom", min: 0, max: 24, step: 0.1, placeholder: "2" },
|
|
2424
2973
|
{ key: "pitch", label: "Pitch (°)", min: 0, max: 85, step: 1, placeholder: "0" },
|
|
2425
2974
|
{ key: "bearing", label: "Bearing (°)", min: -180, max: 180, step: 1, placeholder: "0" }
|
|
2426
2975
|
];
|
|
2427
|
-
function
|
|
2428
|
-
const
|
|
2429
|
-
if (
|
|
2430
|
-
if (isNaN(
|
|
2431
|
-
if (
|
|
2432
|
-
if (
|
|
2976
|
+
function Ma(e, t) {
|
|
2977
|
+
const i = Ge.find((r) => r.key === e);
|
|
2978
|
+
if (i) {
|
|
2979
|
+
if (isNaN(t)) return "Must be a number";
|
|
2980
|
+
if (t < i.min) return `Must be at least ${i.min}`;
|
|
2981
|
+
if (t > i.max) return `Must be at most ${i.max}`;
|
|
2433
2982
|
}
|
|
2434
2983
|
}
|
|
2435
|
-
const
|
|
2436
|
-
function
|
|
2437
|
-
const
|
|
2438
|
-
const
|
|
2439
|
-
|
|
2984
|
+
const Oa = "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";
|
|
2985
|
+
function Ja({ value: e, onChange: t }) {
|
|
2986
|
+
const i = (r, n) => {
|
|
2987
|
+
const o = parseFloat(n);
|
|
2988
|
+
t({ ...e, [r]: isNaN(o) ? 0 : o });
|
|
2440
2989
|
};
|
|
2441
|
-
return /* @__PURE__ */
|
|
2442
|
-
const
|
|
2443
|
-
return /* @__PURE__ */
|
|
2990
|
+
return /* @__PURE__ */ a("div", { className: "mapui:grid mapui:grid-cols-2 mapui:gap-3", children: Ge.map(({ key: r, label: n, min: o, max: p, step: b, placeholder: m }) => {
|
|
2991
|
+
const w = Ma(r, e[r]);
|
|
2992
|
+
return /* @__PURE__ */ a(S, { label: n, error: w, children: /* @__PURE__ */ a(
|
|
2444
2993
|
"input",
|
|
2445
2994
|
{
|
|
2446
2995
|
type: "number",
|
|
2447
|
-
min:
|
|
2448
|
-
max:
|
|
2449
|
-
step:
|
|
2450
|
-
value:
|
|
2451
|
-
placeholder:
|
|
2452
|
-
onChange: (
|
|
2453
|
-
className: `${
|
|
2996
|
+
min: o,
|
|
2997
|
+
max: p,
|
|
2998
|
+
step: b,
|
|
2999
|
+
value: e[r],
|
|
3000
|
+
placeholder: m,
|
|
3001
|
+
onChange: (d) => i(r, d.target.value),
|
|
3002
|
+
className: `${Oa} ${w ? "mapui:border-red-400" : ""}`
|
|
2454
3003
|
}
|
|
2455
|
-
) },
|
|
3004
|
+
) }, r);
|
|
2456
3005
|
}) });
|
|
2457
3006
|
}
|
|
2458
|
-
function
|
|
2459
|
-
const
|
|
3007
|
+
function Ka({ config: e }) {
|
|
3008
|
+
const t = Xe(e);
|
|
2460
3009
|
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
2461
3010
|
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
2462
|
-
/* @__PURE__ */
|
|
3011
|
+
/* @__PURE__ */ a(
|
|
2463
3012
|
"span",
|
|
2464
3013
|
{
|
|
2465
3014
|
className: [
|
|
2466
3015
|
"mapui:inline-flex mapui:items-center mapui:rounded-full mapui:px-2.5 mapui:py-0.5 mapui:text-xs mapui:font-semibold",
|
|
2467
|
-
|
|
3016
|
+
t.success ? "mapui:bg-green-100 mapui:text-green-800" : "mapui:bg-red-100 mapui:text-red-800"
|
|
2468
3017
|
].join(" "),
|
|
2469
|
-
children:
|
|
3018
|
+
children: t.success ? "Valid" : "Invalid"
|
|
2470
3019
|
}
|
|
2471
3020
|
),
|
|
2472
|
-
/* @__PURE__ */
|
|
3021
|
+
/* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-gray-500", children: "MapConfig validation" })
|
|
2473
3022
|
] }),
|
|
2474
|
-
!
|
|
2475
|
-
/* @__PURE__ */
|
|
2476
|
-
/* @__PURE__ */
|
|
2477
|
-
/* @__PURE__ */
|
|
2478
|
-
/* @__PURE__ */
|
|
2479
|
-
] },
|
|
3023
|
+
!t.success && /* @__PURE__ */ l("div", { className: "mapui:rounded mapui:bg-red-50 mapui:p-3", children: [
|
|
3024
|
+
/* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-1 mapui:text-xs mapui:font-semibold mapui:text-red-700", children: "Validation Errors" }),
|
|
3025
|
+
/* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-1 mapui:p-0", children: t.error.errors.map((i, r) => /* @__PURE__ */ l("li", { className: "mapui:flex mapui:flex-col mapui:gap-0.5", children: [
|
|
3026
|
+
/* @__PURE__ */ a("span", { className: "mapui:font-mono mapui:text-xs mapui:text-red-600", children: i.path.join(" > ") || "root" }),
|
|
3027
|
+
/* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-red-800", children: i.message })
|
|
3028
|
+
] }, r)) })
|
|
2480
3029
|
] }),
|
|
2481
|
-
/* @__PURE__ */
|
|
3030
|
+
/* @__PURE__ */ a("div", { className: "mapui:overflow-auto mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-gray-50", children: /* @__PURE__ */ a("pre", { className: "mapui:m-0 mapui:p-3 mapui:text-xs mapui:text-gray-800 mapui:whitespace-pre", children: JSON.stringify(e, null, 2) }) })
|
|
2482
3031
|
] });
|
|
2483
3032
|
}
|
|
2484
3033
|
export {
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
3034
|
+
li as BasemapConfigSchema,
|
|
3035
|
+
Le as BasemapEditor,
|
|
3036
|
+
Ya as BasemapList,
|
|
3037
|
+
et as BasemapSwitcher,
|
|
3038
|
+
ni as CircleLayoutSchema,
|
|
3039
|
+
pi as CirclePaintSchema,
|
|
3040
|
+
oi as CircleStyleSchema,
|
|
3041
|
+
tt as CollapsibleControl,
|
|
3042
|
+
Wa as CollectionBrowser,
|
|
3043
|
+
Y as ColorPicker,
|
|
3044
|
+
Ka as ConfigPreview,
|
|
3045
|
+
Z as ConfirmDialog,
|
|
3046
|
+
rt as CoordinateDisplay,
|
|
3047
|
+
ui as DatetimeSearchFieldSchema,
|
|
3048
|
+
ot as ExportButton,
|
|
3049
|
+
mt as FeatureDetailPanel,
|
|
3050
|
+
ct as FeatureTooltip,
|
|
3051
|
+
mi as FillLayoutSchema,
|
|
3052
|
+
si as FillPaintSchema,
|
|
3053
|
+
ci as FillStyleSchema,
|
|
3054
|
+
di as FilterConfigSchema,
|
|
3055
|
+
S as FormField,
|
|
3056
|
+
hi as LayerConfigSchema,
|
|
3057
|
+
Te as LayerEditor,
|
|
3058
|
+
_a as LayerList,
|
|
3059
|
+
ht as LayerPanel,
|
|
3060
|
+
bt as Legend,
|
|
3061
|
+
gi as LegendConfigSchema,
|
|
3062
|
+
va as LegendEditor,
|
|
3063
|
+
wa as LegendEntryEditor,
|
|
3064
|
+
bi as LegendEntrySchema,
|
|
3065
|
+
yi as LineLayoutSchema,
|
|
3066
|
+
fi as LinePaintSchema,
|
|
3067
|
+
xi as LineStyleSchema,
|
|
3068
|
+
wi as MapConfigSchema,
|
|
3069
|
+
vi as NumberSearchFieldSchema,
|
|
3070
|
+
Ni as OgcApiSourceSchema,
|
|
3071
|
+
ki as PropertyDisplayConfigSchema,
|
|
3072
|
+
La as PropertyDisplayEditor,
|
|
3073
|
+
Ci as PropertyDisplaySchema,
|
|
3074
|
+
Si as SearchConfigSchema,
|
|
3075
|
+
ka as SearchFieldEditor,
|
|
3076
|
+
Sa as SearchFieldList,
|
|
3077
|
+
Di as SearchFieldSchema,
|
|
3078
|
+
ft as SearchPanel,
|
|
3079
|
+
Ti as SelectSearchFieldSchema,
|
|
3080
|
+
de as SourceEditor,
|
|
3081
|
+
Ua as SourceList,
|
|
3082
|
+
Ae as SpriteSourceEditor,
|
|
3083
|
+
Xa as SpriteSourceList,
|
|
3084
|
+
Li as SpriteSourceSchema,
|
|
3085
|
+
Ii as StyleConfigSchema,
|
|
3086
|
+
xa as StyleEditor,
|
|
3087
|
+
Ai as SymbolLayoutSchema,
|
|
3088
|
+
Ei as SymbolPaintSchema,
|
|
3089
|
+
Pi as SymbolStyleSchema,
|
|
3090
|
+
Fi as TextSearchFieldSchema,
|
|
3091
|
+
Ha as UIConfigEditor,
|
|
3092
|
+
Mi as UIConfigSchema,
|
|
3093
|
+
Oi as ViewConfigSchema,
|
|
3094
|
+
Ja as ViewEditor,
|
|
3095
|
+
wt as and,
|
|
3096
|
+
vt as between,
|
|
3097
|
+
$e as defaultCircle,
|
|
3098
|
+
me as defaultFill,
|
|
3099
|
+
je as defaultLine,
|
|
3100
|
+
Re as defaultSymbol,
|
|
3101
|
+
We as detectGeometryStyleTypesFromQueryables,
|
|
3102
|
+
Aa as detectGeometryTypeFromQueryables,
|
|
3103
|
+
Ga as detectStyleTypeForCollection,
|
|
3104
|
+
za as detectStyleTypesForCollection,
|
|
3105
|
+
Nt as downloadCsv,
|
|
3106
|
+
kt as eq,
|
|
3107
|
+
Oe as expressionColors,
|
|
3108
|
+
la as expressionEntries,
|
|
3109
|
+
na as expressionPropertyName,
|
|
3110
|
+
ra as expressionType,
|
|
3111
|
+
qe as extractGeometryType,
|
|
3112
|
+
Ct as featuresToCsv,
|
|
3113
|
+
St as fetchCollectionDetail,
|
|
3114
|
+
Dt as fetchCollections,
|
|
3115
|
+
Tt as fetchConformance,
|
|
3116
|
+
Ye as fetchDistinctValues,
|
|
3117
|
+
Lt as fetchFeatureCount,
|
|
3118
|
+
se as fetchFeatures,
|
|
3119
|
+
Me as fetchQueryables,
|
|
3120
|
+
It as fetchSpriteNames,
|
|
3121
|
+
At as fetchSpriteUrlFromStyle,
|
|
3122
|
+
Et as fetchTileJson,
|
|
3123
|
+
lt as formatDMS,
|
|
3124
|
+
nt as formatDecimal,
|
|
3125
|
+
Pt as fromSimpleFilters,
|
|
3126
|
+
Ft as fromStructuredFilters,
|
|
3127
|
+
Ue as geometryTypeToStyleType,
|
|
3128
|
+
ce as geometryTypeToStyleTypes,
|
|
3129
|
+
ae as getColorFromPalette,
|
|
3130
|
+
Mt as getCql2FilteredVectorTileUrl,
|
|
3131
|
+
Ot as getFilteredVectorTileUrl,
|
|
3132
|
+
pa as getPrimaryColor,
|
|
3133
|
+
oa as getShapeForStyleType,
|
|
3134
|
+
jt as getTileJsonUrl,
|
|
3135
|
+
$t as getVectorTileUrl,
|
|
3136
|
+
Rt as gt,
|
|
3137
|
+
Bt as gte,
|
|
3138
|
+
Va as humanizePropertyName,
|
|
3139
|
+
qt as inList,
|
|
3140
|
+
G as isExpression,
|
|
3141
|
+
Ia as isGeometryProperty,
|
|
3142
|
+
Ut as isNull,
|
|
3143
|
+
Wt as like,
|
|
3144
|
+
Gt as lt,
|
|
3145
|
+
zt as lte,
|
|
3146
|
+
Vt as neq,
|
|
3147
|
+
_t as not,
|
|
3148
|
+
Yt as or,
|
|
3149
|
+
Xt as resolveAvailableIcons,
|
|
3150
|
+
Ht as resolvePropertyDisplay,
|
|
3151
|
+
Jt as resolveStyleWithSprites,
|
|
3152
|
+
Xe as safeValidateMapConfig,
|
|
3153
|
+
Kt as serializeCql2,
|
|
3154
|
+
Qt as tAfter,
|
|
3155
|
+
Zt as tBefore,
|
|
3156
|
+
ei as tDuring,
|
|
3157
|
+
Ea as toAvailableProperties,
|
|
3158
|
+
ai as useCsvExport,
|
|
3159
|
+
ti as useOgcCollectionDetail,
|
|
3160
|
+
Fe as useOgcCollections,
|
|
3161
|
+
ii as useOgcFeatures,
|
|
3162
|
+
_e as useOgcQueryables,
|
|
3163
|
+
ji as validateMapConfig
|
|
2603
3164
|
};
|