@ogc-maps/storybook-components 0.5.3 → 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 +2 -1
- package/dist/components/LayerEditor/LayerEditor.d.ts.map +1 -1
- package/dist/components/LayerEditor/LayerList.d.ts +2 -1
- package/dist/components/LayerEditor/LayerList.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/SpriteEditor/SpriteSourceEditor.d.ts +7 -0
- package/dist/components/SpriteEditor/SpriteSourceEditor.d.ts.map +1 -0
- package/dist/components/SpriteEditor/SpriteSourceList.d.ts +7 -0
- package/dist/components/SpriteEditor/SpriteSourceList.d.ts.map +1 -0
- package/dist/components/SpriteEditor/index.d.ts +5 -0
- package/dist/components/SpriteEditor/index.d.ts.map +1 -0
- package/dist/components/StyleEditor/DataDrivenColorEditor.d.ts +9 -0
- package/dist/components/StyleEditor/DataDrivenColorEditor.d.ts.map +1 -0
- package/dist/components/StyleEditor/IconImagePicker.d.ts +8 -0
- package/dist/components/StyleEditor/IconImagePicker.d.ts.map +1 -0
- package/dist/components/StyleEditor/PropertyField.d.ts +5 -1
- package/dist/components/StyleEditor/PropertyField.d.ts.map +1 -1
- package/dist/components/StyleEditor/PropertyGroup.d.ts +5 -1
- package/dist/components/StyleEditor/PropertyGroup.d.ts.map +1 -1
- package/dist/components/StyleEditor/StyleEditor.d.ts +6 -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/StyleEditor/propertyMetadata.d.ts +1 -1
- package/dist/components/StyleEditor/propertyMetadata.d.ts.map +1 -1
- package/dist/components/UIConfigEditor/UIConfigEditor.d.ts.map +1 -1
- package/dist/components/admin/FormField.d.ts +2 -1
- package/dist/components/admin/FormField.d.ts.map +1 -1
- package/dist/components/admin/InfoTip.d.ts +6 -0
- package/dist/components/admin/InfoTip.d.ts.map +1 -0
- package/dist/components/admin/index.d.ts +2 -0
- package/dist/components/admin/index.d.ts.map +1 -1
- package/dist/components/index.d.ts +3 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/cql2-onoyCbps.js +413 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +18 -17
- package/dist/{index-DoToolWp.js → index-B4i0zJXf.js} +336 -327
- package/dist/main.js +2062 -1177
- package/dist/schemas/config.d.ts +393 -288
- package/dist/schemas/config.d.ts.map +1 -1
- package/dist/schemas/index.js +3 -3
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +3 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +16 -15
- 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 +3 -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/dist/utils/spriteUtils.d.ts +32 -0
- package/dist/utils/spriteUtils.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/Legend-TTWWpWDT.js +0 -97
- package/dist/cql2-Dhe6Ny6v.js +0 -352
package/dist/main.js
CHANGED
|
@@ -1,51 +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
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { s as
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
+
return /* @__PURE__ */ l("span", { className: "mapui:relative mapui:inline-flex mapui:group", children: [
|
|
20
|
+
/* @__PURE__ */ a(
|
|
21
|
+
"span",
|
|
22
|
+
{
|
|
23
|
+
tabIndex: 0,
|
|
24
|
+
"aria-label": "Info",
|
|
25
|
+
"aria-describedby": r,
|
|
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__ */ a(Ve, { className: "mapui:h-3.5 mapui:w-3.5" })
|
|
28
|
+
}
|
|
29
|
+
),
|
|
30
|
+
/* @__PURE__ */ l(
|
|
31
|
+
"span",
|
|
32
|
+
{
|
|
33
|
+
id: r,
|
|
34
|
+
role: "tooltip",
|
|
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
|
+
children: [
|
|
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
|
+
]
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
] });
|
|
43
|
+
}
|
|
44
|
+
function S({ label: e, error: t, required: i, description: r, htmlFor: n, children: o }) {
|
|
45
|
+
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-1", children: [
|
|
46
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-1", children: [
|
|
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
|
+
] }),
|
|
51
|
+
r && /* @__PURE__ */ a(He, { text: r })
|
|
21
52
|
] }),
|
|
22
|
-
|
|
23
|
-
|
|
53
|
+
o,
|
|
54
|
+
t && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-xs mapui:text-red-600", role: "alert", children: t })
|
|
24
55
|
] });
|
|
25
56
|
}
|
|
26
|
-
function
|
|
27
|
-
return /* @__PURE__ */
|
|
28
|
-
/* @__PURE__ */
|
|
57
|
+
function Y({ value: e, onChange: t, label: i }) {
|
|
58
|
+
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
59
|
+
/* @__PURE__ */ a(
|
|
29
60
|
"input",
|
|
30
61
|
{
|
|
31
62
|
type: "color",
|
|
32
|
-
value:
|
|
33
|
-
onChange: (
|
|
34
|
-
"aria-label":
|
|
63
|
+
value: e,
|
|
64
|
+
onChange: (r) => t(r.target.value),
|
|
65
|
+
"aria-label": i ?? "Color",
|
|
35
66
|
className: "mapui:h-8 mapui:w-10 mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-300 mapui:p-0.5"
|
|
36
67
|
}
|
|
37
68
|
),
|
|
38
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ a("span", { className: "mapui:font-mono mapui:text-xs mapui:text-gray-600", children: e })
|
|
39
70
|
] });
|
|
40
71
|
}
|
|
41
|
-
function
|
|
42
|
-
open:
|
|
43
|
-
title:
|
|
44
|
-
description:
|
|
45
|
-
onConfirm:
|
|
72
|
+
function Z({
|
|
73
|
+
open: e,
|
|
74
|
+
title: t,
|
|
75
|
+
description: i,
|
|
76
|
+
onConfirm: r,
|
|
46
77
|
onCancel: n
|
|
47
78
|
}) {
|
|
48
|
-
return
|
|
79
|
+
return e ? /* @__PURE__ */ a(
|
|
49
80
|
"div",
|
|
50
81
|
{
|
|
51
82
|
className: "mapui:fixed mapui:inset-0 mapui:z-50 mapui:flex mapui:items-center mapui:justify-center mapui:bg-black/50",
|
|
@@ -53,25 +84,25 @@ function H({
|
|
|
53
84
|
"aria-modal": "true",
|
|
54
85
|
"aria-labelledby": "confirm-dialog-title",
|
|
55
86
|
"aria-describedby": "confirm-dialog-description",
|
|
56
|
-
children: /* @__PURE__ */
|
|
57
|
-
/* @__PURE__ */
|
|
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__ */ a(
|
|
58
89
|
"h2",
|
|
59
90
|
{
|
|
60
91
|
id: "confirm-dialog-title",
|
|
61
92
|
className: "mapui:m-0 mapui:mb-2 mapui:text-base mapui:font-semibold mapui:text-gray-900",
|
|
62
|
-
children:
|
|
93
|
+
children: t
|
|
63
94
|
}
|
|
64
95
|
),
|
|
65
|
-
/* @__PURE__ */
|
|
96
|
+
/* @__PURE__ */ a(
|
|
66
97
|
"p",
|
|
67
98
|
{
|
|
68
99
|
id: "confirm-dialog-description",
|
|
69
100
|
className: "mapui:m-0 mapui:mb-6 mapui:text-sm mapui:text-gray-600",
|
|
70
|
-
children:
|
|
101
|
+
children: i
|
|
71
102
|
}
|
|
72
103
|
),
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
/* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:justify-end mapui:gap-2", children: [
|
|
105
|
+
/* @__PURE__ */ a(
|
|
75
106
|
"button",
|
|
76
107
|
{
|
|
77
108
|
type: "button",
|
|
@@ -80,11 +111,11 @@ function H({
|
|
|
80
111
|
children: "Cancel"
|
|
81
112
|
}
|
|
82
113
|
),
|
|
83
|
-
/* @__PURE__ */
|
|
114
|
+
/* @__PURE__ */ a(
|
|
84
115
|
"button",
|
|
85
116
|
{
|
|
86
117
|
type: "button",
|
|
87
|
-
onClick:
|
|
118
|
+
onClick: r,
|
|
88
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",
|
|
89
120
|
children: "Confirm"
|
|
90
121
|
}
|
|
@@ -94,202 +125,202 @@ function H({
|
|
|
94
125
|
}
|
|
95
126
|
) : null;
|
|
96
127
|
}
|
|
97
|
-
function
|
|
98
|
-
title:
|
|
99
|
-
children:
|
|
100
|
-
defaultOpen:
|
|
101
|
-
badge:
|
|
128
|
+
function _({
|
|
129
|
+
title: e,
|
|
130
|
+
children: t,
|
|
131
|
+
defaultOpen: i = !1,
|
|
132
|
+
badge: r
|
|
102
133
|
}) {
|
|
103
|
-
const [n,
|
|
104
|
-
return /* @__PURE__ */
|
|
105
|
-
/* @__PURE__ */
|
|
134
|
+
const [n, o] = L(i);
|
|
135
|
+
return /* @__PURE__ */ l("div", { className: "mapui:rounded mapui:border mapui:border-gray-200", children: [
|
|
136
|
+
/* @__PURE__ */ l(
|
|
106
137
|
"button",
|
|
107
138
|
{
|
|
108
139
|
type: "button",
|
|
109
|
-
onClick: () =>
|
|
140
|
+
onClick: () => o((p) => !p),
|
|
110
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",
|
|
111
142
|
children: [
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
-
|
|
114
|
-
|
|
143
|
+
/* @__PURE__ */ l("span", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
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 })
|
|
115
146
|
] }),
|
|
116
|
-
/* @__PURE__ */
|
|
147
|
+
/* @__PURE__ */ a("span", { "aria-hidden": "true", children: n ? "▲" : "▼" })
|
|
117
148
|
]
|
|
118
149
|
}
|
|
119
150
|
),
|
|
120
|
-
n && /* @__PURE__ */
|
|
151
|
+
n && /* @__PURE__ */ a("div", { className: "mapui:p-3", children: t })
|
|
121
152
|
] });
|
|
122
153
|
}
|
|
123
|
-
const
|
|
124
|
-
function
|
|
125
|
-
value:
|
|
126
|
-
onChange:
|
|
127
|
-
onTestConnection:
|
|
128
|
-
testStatus:
|
|
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",
|
|
129
160
|
testError: n
|
|
130
161
|
}) {
|
|
131
|
-
const
|
|
132
|
-
return /* @__PURE__ */
|
|
133
|
-
/* @__PURE__ */
|
|
162
|
+
const o = (p) => t({ ...e, ...p });
|
|
163
|
+
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
164
|
+
/* @__PURE__ */ a(S, { label: "ID", required: !0, children: /* @__PURE__ */ a(
|
|
134
165
|
"input",
|
|
135
166
|
{
|
|
136
167
|
type: "text",
|
|
137
|
-
value:
|
|
138
|
-
onChange: (p) =>
|
|
168
|
+
value: e.id,
|
|
169
|
+
onChange: (p) => o({ id: p.target.value }),
|
|
139
170
|
placeholder: "my-source",
|
|
140
|
-
className:
|
|
171
|
+
className: H
|
|
141
172
|
}
|
|
142
173
|
) }),
|
|
143
|
-
/* @__PURE__ */
|
|
144
|
-
/* @__PURE__ */
|
|
145
|
-
/* @__PURE__ */
|
|
174
|
+
/* @__PURE__ */ l(S, { label: "URL", required: !0, children: [
|
|
175
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:gap-2", children: [
|
|
176
|
+
/* @__PURE__ */ a(
|
|
146
177
|
"input",
|
|
147
178
|
{
|
|
148
179
|
type: "url",
|
|
149
|
-
value:
|
|
150
|
-
onChange: (p) =>
|
|
180
|
+
value: e.url,
|
|
181
|
+
onChange: (p) => o({ url: p.target.value }),
|
|
151
182
|
placeholder: "https://example.com/ogcapi",
|
|
152
|
-
className: `${
|
|
183
|
+
className: `${H} mapui:flex-1`
|
|
153
184
|
}
|
|
154
185
|
),
|
|
155
|
-
|
|
186
|
+
i && /* @__PURE__ */ a(
|
|
156
187
|
"button",
|
|
157
188
|
{
|
|
158
189
|
type: "button",
|
|
159
|
-
onClick: () =>
|
|
160
|
-
disabled:
|
|
190
|
+
onClick: () => i(e.url),
|
|
191
|
+
disabled: r === "loading" || !e.url,
|
|
161
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",
|
|
162
|
-
children:
|
|
193
|
+
children: r === "loading" ? "Testing…" : "Test Connection"
|
|
163
194
|
}
|
|
164
195
|
)
|
|
165
196
|
] }),
|
|
166
|
-
|
|
167
|
-
|
|
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" })
|
|
168
199
|
] }),
|
|
169
|
-
/* @__PURE__ */
|
|
200
|
+
/* @__PURE__ */ a(S, { label: "Label", children: /* @__PURE__ */ a(
|
|
170
201
|
"input",
|
|
171
202
|
{
|
|
172
203
|
type: "text",
|
|
173
|
-
value:
|
|
174
|
-
onChange: (p) =>
|
|
204
|
+
value: e.label ?? "",
|
|
205
|
+
onChange: (p) => o({ label: p.target.value || void 0 }),
|
|
175
206
|
placeholder: "My OGC API Source",
|
|
176
|
-
className:
|
|
207
|
+
className: H
|
|
177
208
|
}
|
|
178
209
|
) }),
|
|
179
|
-
/* @__PURE__ */
|
|
210
|
+
/* @__PURE__ */ a(S, { label: "Tile Matrix Set ID", children: /* @__PURE__ */ a(
|
|
180
211
|
"input",
|
|
181
212
|
{
|
|
182
213
|
type: "text",
|
|
183
|
-
value:
|
|
184
|
-
onChange: (p) =>
|
|
214
|
+
value: e.tileMatrixSetId ?? "WebMercatorQuad",
|
|
215
|
+
onChange: (p) => o({ tileMatrixSetId: p.target.value || void 0 }),
|
|
185
216
|
placeholder: "WebMercatorQuad",
|
|
186
|
-
className:
|
|
217
|
+
className: H
|
|
187
218
|
}
|
|
188
219
|
) })
|
|
189
220
|
] });
|
|
190
221
|
}
|
|
191
|
-
const
|
|
222
|
+
const ee = () => ({
|
|
192
223
|
id: "",
|
|
193
224
|
url: "",
|
|
194
225
|
label: void 0,
|
|
195
226
|
tileMatrixSetId: "WebMercatorQuad"
|
|
196
227
|
});
|
|
197
|
-
function
|
|
198
|
-
const [
|
|
199
|
-
|
|
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" }));
|
|
200
231
|
try {
|
|
201
|
-
const
|
|
202
|
-
|
|
203
|
-
} catch (
|
|
204
|
-
|
|
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" }));
|
|
205
236
|
}
|
|
206
|
-
},
|
|
207
|
-
n && (
|
|
208
|
-
},
|
|
209
|
-
|
|
210
|
-
},
|
|
211
|
-
|
|
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);
|
|
212
243
|
};
|
|
213
|
-
return /* @__PURE__ */
|
|
214
|
-
/* @__PURE__ */
|
|
215
|
-
/* @__PURE__ */
|
|
216
|
-
/* @__PURE__ */
|
|
244
|
+
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
245
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between", children: [
|
|
246
|
+
/* @__PURE__ */ a("h3", { className: "mapui:m-0 mapui:text-sm mapui:font-semibold mapui:text-gray-700", children: "Sources" }),
|
|
247
|
+
/* @__PURE__ */ a(
|
|
217
248
|
"button",
|
|
218
249
|
{
|
|
219
250
|
type: "button",
|
|
220
251
|
onClick: () => {
|
|
221
|
-
|
|
252
|
+
b(!0), w(ee());
|
|
222
253
|
},
|
|
223
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",
|
|
224
255
|
children: "+ Add Source"
|
|
225
256
|
}
|
|
226
257
|
)
|
|
227
258
|
] }),
|
|
228
|
-
|
|
229
|
-
/* @__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(
|
|
230
261
|
"li",
|
|
231
262
|
{
|
|
232
263
|
className: "mapui:rounded-lg mapui:border mapui:border-gray-200 mapui:bg-white mapui:p-3",
|
|
233
|
-
children:
|
|
234
|
-
/* @__PURE__ */
|
|
235
|
-
|
|
264
|
+
children: i === C.id ? /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
265
|
+
/* @__PURE__ */ a(
|
|
266
|
+
de,
|
|
236
267
|
{
|
|
237
|
-
value: n ??
|
|
238
|
-
onChange:
|
|
239
|
-
onTestConnection: (
|
|
240
|
-
testStatus: d[`edit-${
|
|
241
|
-
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}`]
|
|
242
273
|
}
|
|
243
274
|
),
|
|
244
|
-
/* @__PURE__ */
|
|
245
|
-
/* @__PURE__ */
|
|
275
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:gap-2", children: [
|
|
276
|
+
/* @__PURE__ */ a(
|
|
246
277
|
"button",
|
|
247
278
|
{
|
|
248
279
|
type: "button",
|
|
249
|
-
onClick:
|
|
280
|
+
onClick: D,
|
|
250
281
|
disabled: !(n != null && n.id) || !(n != null && n.url),
|
|
251
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",
|
|
252
283
|
children: "Save"
|
|
253
284
|
}
|
|
254
285
|
),
|
|
255
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ a(
|
|
256
287
|
"button",
|
|
257
288
|
{
|
|
258
289
|
type: "button",
|
|
259
290
|
onClick: () => {
|
|
260
|
-
|
|
291
|
+
r(null), o(null);
|
|
261
292
|
},
|
|
262
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",
|
|
263
294
|
children: "Cancel"
|
|
264
295
|
}
|
|
265
296
|
)
|
|
266
297
|
] })
|
|
267
|
-
] }) : /* @__PURE__ */
|
|
268
|
-
/* @__PURE__ */
|
|
269
|
-
/* @__PURE__ */
|
|
270
|
-
/* @__PURE__ */
|
|
271
|
-
|
|
298
|
+
] }) : /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-start mapui:justify-between mapui:gap-2", children: [
|
|
299
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-0.5", children: [
|
|
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: [
|
|
272
303
|
"TMS: ",
|
|
273
|
-
|
|
304
|
+
C.tileMatrixSetId
|
|
274
305
|
] })
|
|
275
306
|
] }),
|
|
276
|
-
/* @__PURE__ */
|
|
277
|
-
/* @__PURE__ */
|
|
307
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:shrink-0 mapui:gap-1", children: [
|
|
308
|
+
/* @__PURE__ */ a(
|
|
278
309
|
"button",
|
|
279
310
|
{
|
|
280
311
|
type: "button",
|
|
281
312
|
onClick: () => {
|
|
282
|
-
|
|
313
|
+
r(C.id), o(C);
|
|
283
314
|
},
|
|
284
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",
|
|
285
316
|
children: "Edit"
|
|
286
317
|
}
|
|
287
318
|
),
|
|
288
|
-
/* @__PURE__ */
|
|
319
|
+
/* @__PURE__ */ a(
|
|
289
320
|
"button",
|
|
290
321
|
{
|
|
291
322
|
type: "button",
|
|
292
|
-
onClick: () =>
|
|
323
|
+
onClick: () => v(C.id),
|
|
293
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",
|
|
294
325
|
children: "Remove"
|
|
295
326
|
}
|
|
@@ -297,356 +328,836 @@ function ea({ sources: a, onChange: i }) {
|
|
|
297
328
|
] })
|
|
298
329
|
] })
|
|
299
330
|
},
|
|
300
|
-
|
|
331
|
+
C.id
|
|
301
332
|
)) }),
|
|
302
|
-
p && /* @__PURE__ */
|
|
303
|
-
/* @__PURE__ */
|
|
304
|
-
/* @__PURE__ */
|
|
305
|
-
|
|
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,
|
|
306
337
|
{
|
|
307
|
-
value:
|
|
308
|
-
onChange:
|
|
309
|
-
onTestConnection: (
|
|
338
|
+
value: m,
|
|
339
|
+
onChange: w,
|
|
340
|
+
onTestConnection: (C) => k("new", C),
|
|
310
341
|
testStatus: d.new,
|
|
311
|
-
testError:
|
|
342
|
+
testError: c.new
|
|
312
343
|
}
|
|
313
344
|
),
|
|
314
|
-
/* @__PURE__ */
|
|
315
|
-
/* @__PURE__ */
|
|
345
|
+
/* @__PURE__ */ l("div", { className: "mapui:mt-3 mapui:flex mapui:gap-2", children: [
|
|
346
|
+
/* @__PURE__ */ a(
|
|
316
347
|
"button",
|
|
317
348
|
{
|
|
318
349
|
type: "button",
|
|
319
|
-
onClick:
|
|
320
|
-
disabled: !
|
|
350
|
+
onClick: x,
|
|
351
|
+
disabled: !m.id || !m.url,
|
|
321
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",
|
|
322
353
|
children: "Save"
|
|
323
354
|
}
|
|
324
355
|
),
|
|
325
|
-
/* @__PURE__ */
|
|
356
|
+
/* @__PURE__ */ a(
|
|
326
357
|
"button",
|
|
327
358
|
{
|
|
328
359
|
type: "button",
|
|
329
|
-
onClick: () =>
|
|
360
|
+
onClick: () => b(!1),
|
|
330
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",
|
|
331
362
|
children: "Cancel"
|
|
332
363
|
}
|
|
333
364
|
)
|
|
334
365
|
] })
|
|
335
366
|
] }),
|
|
336
|
-
/* @__PURE__ */
|
|
337
|
-
|
|
367
|
+
/* @__PURE__ */ a(
|
|
368
|
+
Z,
|
|
338
369
|
{
|
|
339
|
-
open:
|
|
370
|
+
open: s !== null,
|
|
340
371
|
title: "Remove Source",
|
|
341
372
|
description: "Are you sure you want to remove this source? Any layers using it will be affected.",
|
|
342
|
-
onConfirm: () =>
|
|
343
|
-
onCancel: () =>
|
|
373
|
+
onConfirm: () => s && $(s),
|
|
374
|
+
onCancel: () => v(null)
|
|
344
375
|
}
|
|
345
376
|
)
|
|
346
377
|
] });
|
|
347
378
|
}
|
|
348
|
-
function
|
|
349
|
-
sourceUrl:
|
|
350
|
-
selectedCollectionIds:
|
|
351
|
-
onSelect:
|
|
352
|
-
onDeselect:
|
|
379
|
+
function Wa({
|
|
380
|
+
sourceUrl: e,
|
|
381
|
+
selectedCollectionIds: t,
|
|
382
|
+
onSelect: i,
|
|
383
|
+
onDeselect: r
|
|
353
384
|
}) {
|
|
354
|
-
const { collections: n, loading:
|
|
355
|
-
return
|
|
356
|
-
/* @__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" }),
|
|
357
388
|
"Loading collections…"
|
|
358
|
-
] }) : p ? /* @__PURE__ */
|
|
389
|
+
] }) : p ? /* @__PURE__ */ l("div", { className: "mapui:rounded mapui:bg-red-50 mapui:p-3 mapui:text-sm mapui:text-red-700", children: [
|
|
359
390
|
"Failed to load collections: ",
|
|
360
391
|
p.message
|
|
361
|
-
] }) : n.length === 0 ? /* @__PURE__ */
|
|
362
|
-
const
|
|
363
|
-
return /* @__PURE__ */
|
|
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
|
+
return /* @__PURE__ */ l(
|
|
364
395
|
"li",
|
|
365
396
|
{
|
|
366
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",
|
|
367
398
|
children: [
|
|
368
|
-
/* @__PURE__ */
|
|
399
|
+
/* @__PURE__ */ a(
|
|
369
400
|
"input",
|
|
370
401
|
{
|
|
371
402
|
type: "checkbox",
|
|
372
|
-
id: `collection-${
|
|
373
|
-
checked:
|
|
374
|
-
onChange: () =>
|
|
403
|
+
id: `collection-${b.id}`,
|
|
404
|
+
checked: m,
|
|
405
|
+
onChange: () => m ? r(b.id) : i(b.id),
|
|
375
406
|
className: "mapui:mt-0.5 mapui:h-4 mapui:w-4 mapui:cursor-pointer mapui:accent-blue-600"
|
|
376
407
|
}
|
|
377
408
|
),
|
|
378
|
-
/* @__PURE__ */
|
|
409
|
+
/* @__PURE__ */ l(
|
|
379
410
|
"label",
|
|
380
411
|
{
|
|
381
|
-
htmlFor: `collection-${
|
|
412
|
+
htmlFor: `collection-${b.id}`,
|
|
382
413
|
className: "mapui:flex mapui:cursor-pointer mapui:flex-col mapui:gap-0.5",
|
|
383
414
|
children: [
|
|
384
|
-
/* @__PURE__ */
|
|
385
|
-
/* @__PURE__ */
|
|
386
|
-
|
|
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 })
|
|
387
418
|
]
|
|
388
419
|
}
|
|
389
420
|
)
|
|
390
421
|
]
|
|
391
422
|
},
|
|
392
|
-
|
|
423
|
+
b.id
|
|
393
424
|
);
|
|
394
425
|
}) });
|
|
395
426
|
}
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
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
|
+
},
|
|
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
|
+
};
|
|
443
|
+
X(() => {
|
|
444
|
+
const k = (D) => {
|
|
445
|
+
b.current && !b.current.contains(D.target) && (n(!1), p(-1));
|
|
446
|
+
};
|
|
447
|
+
return document.addEventListener("mousedown", k), () => document.removeEventListener("mousedown", k);
|
|
448
|
+
}, []);
|
|
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
|
+
"input",
|
|
452
|
+
{
|
|
453
|
+
type: "text",
|
|
454
|
+
value: e,
|
|
455
|
+
onChange: (k) => t(k.target.value || ""),
|
|
456
|
+
placeholder: "icon-name",
|
|
457
|
+
className: v
|
|
458
|
+
}
|
|
459
|
+
) : /* @__PURE__ */ l("div", { ref: b, className: "mapui:relative", children: [
|
|
460
|
+
/* @__PURE__ */ a(
|
|
461
|
+
"input",
|
|
462
|
+
{
|
|
463
|
+
type: "text",
|
|
464
|
+
value: e,
|
|
465
|
+
placeholder: "Search icons…",
|
|
466
|
+
role: "combobox",
|
|
467
|
+
"aria-expanded": f,
|
|
468
|
+
"aria-autocomplete": "list",
|
|
469
|
+
"aria-controls": m,
|
|
470
|
+
"aria-activedescendant": w,
|
|
471
|
+
onChange: u,
|
|
472
|
+
onFocus: () => n(!0),
|
|
473
|
+
onKeyDown: s,
|
|
474
|
+
className: v
|
|
475
|
+
}
|
|
476
|
+
),
|
|
477
|
+
f && /* @__PURE__ */ a(
|
|
478
|
+
"ul",
|
|
479
|
+
{
|
|
480
|
+
id: m,
|
|
481
|
+
role: "listbox",
|
|
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: d.map((k, D) => /* @__PURE__ */ a(
|
|
484
|
+
"li",
|
|
485
|
+
{
|
|
486
|
+
id: `${m}-option-${D}`,
|
|
487
|
+
role: "option",
|
|
488
|
+
"aria-selected": D === o,
|
|
489
|
+
onMouseDown: (x) => {
|
|
490
|
+
x.preventDefault(), c(k);
|
|
491
|
+
},
|
|
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
|
+
},
|
|
495
|
+
`${D}-${k}`
|
|
496
|
+
))
|
|
497
|
+
}
|
|
498
|
+
)
|
|
499
|
+
] });
|
|
500
|
+
}
|
|
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
|
|
549
|
+
}) {
|
|
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
|
|
400
714
|
}) {
|
|
401
|
-
const
|
|
402
|
-
return /* @__PURE__ */
|
|
403
|
-
/* @__PURE__ */
|
|
715
|
+
const i = (e == null ? void 0 : e[0]) ?? 0, r = (e == null ? void 0 : e[1]) ?? 0;
|
|
716
|
+
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
717
|
+
/* @__PURE__ */ a(
|
|
404
718
|
"input",
|
|
405
719
|
{
|
|
406
720
|
type: "number",
|
|
407
721
|
step: 0.5,
|
|
408
|
-
value:
|
|
409
|
-
onChange: (n) =>
|
|
410
|
-
className: `${
|
|
722
|
+
value: i,
|
|
723
|
+
onChange: (n) => t([parseFloat(n.target.value) || 0, r]),
|
|
724
|
+
className: `${z} mapui:w-20`,
|
|
411
725
|
"aria-label": "X",
|
|
412
726
|
placeholder: "X"
|
|
413
727
|
}
|
|
414
728
|
),
|
|
415
|
-
/* @__PURE__ */
|
|
729
|
+
/* @__PURE__ */ a(
|
|
416
730
|
"input",
|
|
417
731
|
{
|
|
418
732
|
type: "number",
|
|
419
733
|
step: 0.5,
|
|
420
|
-
value:
|
|
421
|
-
onChange: (n) =>
|
|
422
|
-
className: `${
|
|
734
|
+
value: r,
|
|
735
|
+
onChange: (n) => t([i, parseFloat(n.target.value) || 0]),
|
|
736
|
+
className: `${z} mapui:w-20`,
|
|
423
737
|
"aria-label": "Y",
|
|
424
738
|
placeholder: "Y"
|
|
425
739
|
}
|
|
426
740
|
)
|
|
427
741
|
] });
|
|
428
742
|
}
|
|
429
|
-
function
|
|
430
|
-
value:
|
|
431
|
-
onChange:
|
|
743
|
+
function ta({
|
|
744
|
+
value: e,
|
|
745
|
+
onChange: t
|
|
432
746
|
}) {
|
|
433
|
-
const
|
|
434
|
-
return /* @__PURE__ */
|
|
435
|
-
/* @__PURE__ */
|
|
747
|
+
const i = e ?? 1;
|
|
748
|
+
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
749
|
+
/* @__PURE__ */ a(
|
|
436
750
|
"input",
|
|
437
751
|
{
|
|
438
752
|
type: "range",
|
|
439
753
|
min: 0,
|
|
440
754
|
max: 1,
|
|
441
755
|
step: 0.01,
|
|
442
|
-
value:
|
|
443
|
-
onChange: (
|
|
756
|
+
value: i,
|
|
757
|
+
onChange: (r) => t(parseFloat(r.target.value)),
|
|
444
758
|
className: "mapui:flex-1"
|
|
445
759
|
}
|
|
446
760
|
),
|
|
447
|
-
/* @__PURE__ */
|
|
761
|
+
/* @__PURE__ */ a("span", { className: "mapui:w-8 mapui:text-right mapui:text-xs mapui:text-gray-600", children: i.toFixed(2) })
|
|
448
762
|
] });
|
|
449
763
|
}
|
|
450
|
-
function
|
|
451
|
-
def:
|
|
452
|
-
value:
|
|
453
|
-
onChange:
|
|
764
|
+
function fe({
|
|
765
|
+
def: e,
|
|
766
|
+
value: t,
|
|
767
|
+
onChange: i,
|
|
768
|
+
availableIcons: r,
|
|
769
|
+
availableProperties: n,
|
|
770
|
+
onFetchDistinctValues: o
|
|
454
771
|
}) {
|
|
455
|
-
var
|
|
456
|
-
switch (
|
|
457
|
-
case "color":
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
{
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
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
|
+
}
|
|
466
811
|
case "opacity":
|
|
467
|
-
return /* @__PURE__ */
|
|
468
|
-
|
|
812
|
+
return /* @__PURE__ */ a(
|
|
813
|
+
ta,
|
|
469
814
|
{
|
|
470
|
-
value:
|
|
471
|
-
onChange:
|
|
815
|
+
value: t,
|
|
816
|
+
onChange: i
|
|
472
817
|
}
|
|
473
818
|
);
|
|
474
819
|
case "number":
|
|
475
|
-
return /* @__PURE__ */
|
|
820
|
+
return /* @__PURE__ */ a(
|
|
476
821
|
"input",
|
|
477
822
|
{
|
|
478
823
|
type: "number",
|
|
479
|
-
min:
|
|
480
|
-
max:
|
|
481
|
-
step:
|
|
482
|
-
value:
|
|
483
|
-
onChange: (
|
|
484
|
-
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
|
|
485
830
|
}
|
|
486
831
|
);
|
|
487
832
|
case "boolean":
|
|
488
|
-
return /* @__PURE__ */
|
|
833
|
+
return /* @__PURE__ */ a(
|
|
489
834
|
"input",
|
|
490
835
|
{
|
|
491
836
|
type: "checkbox",
|
|
492
|
-
checked:
|
|
493
|
-
onChange: (
|
|
837
|
+
checked: t ?? !1,
|
|
838
|
+
onChange: (m) => i(m.target.checked),
|
|
494
839
|
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
495
840
|
}
|
|
496
841
|
);
|
|
497
842
|
case "enum":
|
|
498
|
-
return /* @__PURE__ */
|
|
843
|
+
return /* @__PURE__ */ a(
|
|
499
844
|
"select",
|
|
500
845
|
{
|
|
501
|
-
value:
|
|
502
|
-
onChange: (
|
|
503
|
-
className:
|
|
504
|
-
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))
|
|
505
850
|
}
|
|
506
851
|
);
|
|
507
852
|
case "translate":
|
|
508
|
-
return /* @__PURE__ */
|
|
509
|
-
|
|
853
|
+
return /* @__PURE__ */ a(
|
|
854
|
+
aa,
|
|
510
855
|
{
|
|
511
|
-
value:
|
|
512
|
-
onChange:
|
|
856
|
+
value: t,
|
|
857
|
+
onChange: i
|
|
513
858
|
}
|
|
514
859
|
);
|
|
515
860
|
case "dasharray":
|
|
516
861
|
case "stringArray": {
|
|
517
|
-
const
|
|
518
|
-
return /* @__PURE__ */
|
|
862
|
+
const m = t, w = m ? m.join(", ") : "";
|
|
863
|
+
return /* @__PURE__ */ a(
|
|
519
864
|
"input",
|
|
520
865
|
{
|
|
521
866
|
type: "text",
|
|
522
|
-
value:
|
|
523
|
-
onChange: (
|
|
524
|
-
const
|
|
525
|
-
if (!
|
|
526
|
-
|
|
867
|
+
value: w,
|
|
868
|
+
onChange: (d) => {
|
|
869
|
+
const f = d.target.value.trim();
|
|
870
|
+
if (!f) {
|
|
871
|
+
i(void 0);
|
|
527
872
|
return;
|
|
528
873
|
}
|
|
529
|
-
if (
|
|
530
|
-
const
|
|
531
|
-
|
|
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);
|
|
532
877
|
} else {
|
|
533
|
-
const
|
|
534
|
-
|
|
878
|
+
const c = f.split(",").map((u) => u.trim()).filter(Boolean);
|
|
879
|
+
i(c.length > 0 ? c : void 0);
|
|
535
880
|
}
|
|
536
881
|
},
|
|
537
|
-
placeholder:
|
|
538
|
-
className:
|
|
882
|
+
placeholder: e.widget === "dasharray" ? "e.g. 2, 4" : "comma-separated",
|
|
883
|
+
className: z
|
|
539
884
|
}
|
|
540
885
|
);
|
|
541
886
|
}
|
|
542
887
|
case "text":
|
|
543
|
-
return /* @__PURE__ */
|
|
888
|
+
return /* @__PURE__ */ a(
|
|
544
889
|
"input",
|
|
545
890
|
{
|
|
546
891
|
type: "text",
|
|
547
|
-
value:
|
|
548
|
-
onChange: (
|
|
549
|
-
className:
|
|
892
|
+
value: t ?? "",
|
|
893
|
+
onChange: (m) => i(m.target.value || void 0),
|
|
894
|
+
className: z
|
|
895
|
+
}
|
|
896
|
+
);
|
|
897
|
+
case "icon-image":
|
|
898
|
+
return /* @__PURE__ */ a(
|
|
899
|
+
Je,
|
|
900
|
+
{
|
|
901
|
+
value: t ?? "",
|
|
902
|
+
onChange: (m) => i(m ?? void 0),
|
|
903
|
+
availableIcons: r
|
|
550
904
|
}
|
|
551
905
|
);
|
|
552
906
|
default:
|
|
553
907
|
return null;
|
|
554
908
|
}
|
|
555
909
|
}
|
|
556
|
-
function
|
|
557
|
-
const
|
|
558
|
-
|
|
559
|
-
|
|
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(
|
|
915
|
+
"input",
|
|
916
|
+
{
|
|
917
|
+
type: "checkbox",
|
|
918
|
+
checked: t === m,
|
|
919
|
+
onChange: (w) => {
|
|
920
|
+
i(e.key, w.target.checked ? m : void 0);
|
|
921
|
+
},
|
|
922
|
+
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
923
|
+
}
|
|
924
|
+
) });
|
|
925
|
+
}
|
|
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(
|
|
560
928
|
"input",
|
|
561
929
|
{
|
|
562
930
|
type: "checkbox",
|
|
563
|
-
checked:
|
|
564
|
-
onChange: (
|
|
565
|
-
|
|
931
|
+
checked: b,
|
|
932
|
+
onChange: (m) => {
|
|
933
|
+
i(e.key, m.target.checked ? e.enableDefault : void 0);
|
|
566
934
|
},
|
|
567
935
|
className: "mapui:h-4 mapui:w-4 mapui:shrink-0 mapui:accent-blue-600"
|
|
568
936
|
}
|
|
569
937
|
),
|
|
570
|
-
|
|
571
|
-
|
|
938
|
+
b && /* @__PURE__ */ a(
|
|
939
|
+
fe,
|
|
572
940
|
{
|
|
573
|
-
def:
|
|
574
|
-
value:
|
|
575
|
-
onChange: (
|
|
941
|
+
def: e,
|
|
942
|
+
value: t,
|
|
943
|
+
onChange: (m) => i(e.key, m),
|
|
944
|
+
availableIcons: r,
|
|
945
|
+
availableProperties: n,
|
|
946
|
+
onFetchDistinctValues: o
|
|
576
947
|
}
|
|
577
948
|
)
|
|
578
|
-
] }) }) : /* @__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
|
+
) });
|
|
579
960
|
}
|
|
580
|
-
function
|
|
581
|
-
title:
|
|
582
|
-
properties:
|
|
583
|
-
values:
|
|
584
|
-
onChange:
|
|
585
|
-
defaultOpen: n = !1
|
|
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
|
|
586
970
|
}) {
|
|
587
|
-
const
|
|
588
|
-
(
|
|
971
|
+
const m = t.filter(
|
|
972
|
+
(w) => w.enableDefault !== void 0 && i[w.key] !== void 0
|
|
589
973
|
).length;
|
|
590
|
-
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);
|
|
591
989
|
}
|
|
592
|
-
function
|
|
593
|
-
return
|
|
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
|
+
}
|
|
1044
|
+
}
|
|
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(
|
|
594
1068
|
"div",
|
|
595
1069
|
{
|
|
596
|
-
className: "mapui:h-8 mapui:w-full mapui:rounded mapui:border mapui:border-gray-200",
|
|
597
1070
|
style: {
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
1071
|
+
width: "100%",
|
|
1072
|
+
height: t ?? 32,
|
|
1073
|
+
background: r ? n : `linear-gradient(to right, ${n})`,
|
|
1074
|
+
borderRadius: 4
|
|
601
1075
|
},
|
|
602
|
-
|
|
1076
|
+
title: "Data-driven color expression"
|
|
603
1077
|
}
|
|
604
|
-
)
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
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
|
+
}
|
|
617
1101
|
}
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
"
|
|
626
|
-
|
|
627
|
-
"
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
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
|
+
}
|
|
636
1122
|
}
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
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(
|
|
641
1152
|
"div",
|
|
642
1153
|
{
|
|
643
1154
|
className: "mapui:flex mapui:h-8 mapui:w-full mapui:items-center mapui:justify-center mapui:rounded mapui:border mapui:border-gray-200",
|
|
644
1155
|
"aria-label": "Style preview",
|
|
645
|
-
children: /* @__PURE__ */
|
|
1156
|
+
children: /* @__PURE__ */ a(
|
|
646
1157
|
"span",
|
|
647
1158
|
{
|
|
648
1159
|
style: {
|
|
649
|
-
color:
|
|
1160
|
+
color: t ?? i ?? "#333333",
|
|
650
1161
|
fontSize: "1.1rem",
|
|
651
1162
|
fontWeight: 600
|
|
652
1163
|
},
|
|
@@ -656,40 +1167,40 @@ function De({ style: a }) {
|
|
|
656
1167
|
}
|
|
657
1168
|
);
|
|
658
1169
|
}
|
|
659
|
-
const
|
|
1170
|
+
const ma = [
|
|
660
1171
|
// Appearance (paint)
|
|
661
1172
|
{ key: "fill-color", label: "Fill Color", widget: "color", group: "Appearance", category: "paint" },
|
|
662
1173
|
{ key: "fill-opacity", label: "Fill Opacity", widget: "opacity", group: "Appearance", category: "paint" },
|
|
663
1174
|
{ key: "fill-outline-color", label: "Outline Color", widget: "color", group: "Appearance", category: "paint", enableDefault: "#000000" },
|
|
664
|
-
{ key: "fill-antialias", label: "Antialias", widget: "boolean", group: "Appearance", category: "paint",
|
|
665
|
-
{ key: "fill-pattern", label: "Pattern", widget: "
|
|
1175
|
+
{ key: "fill-antialias", label: "Antialias", widget: "boolean", group: "Appearance", category: "paint", description: "Smooths polygon edges using anti-aliasing. Disable for crisp pixel-aligned fills or when stacking transparent layers." },
|
|
1176
|
+
{ key: "fill-pattern", label: "Pattern", widget: "icon-image", group: "Appearance", category: "paint", enableDefault: "", description: "Name of an image in the style sprite to use as a repeating fill pattern." },
|
|
666
1177
|
// Transform (paint)
|
|
667
|
-
{ key: "fill-translate", label: "Translate (X, Y)", widget: "translate", group: "Transform", category: "paint", enableDefault: [0, 0] },
|
|
668
|
-
{ key: "fill-translate-anchor", label: "Translate Anchor", widget: "enum", group: "Transform", category: "paint", options: ["map", "viewport"], enableDefault: "map" },
|
|
1178
|
+
{ key: "fill-translate", label: "Translate (X, Y)", widget: "translate", group: "Transform", category: "paint", enableDefault: [0, 0], description: "Offset the fill in pixels along X (right) and Y (down) axes." },
|
|
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.' },
|
|
669
1180
|
// Sorting (layout)
|
|
670
|
-
{ key: "fill-sort-key", label: "Sort Key", widget: "number", group: "Sorting", category: "layout", step: 1, enableDefault: 0 }
|
|
671
|
-
],
|
|
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." }
|
|
1182
|
+
], sa = [
|
|
672
1183
|
// Appearance (paint)
|
|
673
1184
|
{ key: "line-color", label: "Line Color", widget: "color", group: "Appearance", category: "paint" },
|
|
674
1185
|
{ key: "line-width", label: "Line Width", widget: "number", group: "Appearance", category: "paint", min: 0, step: 0.5 },
|
|
675
1186
|
{ key: "line-opacity", label: "Line Opacity", widget: "opacity", group: "Appearance", category: "paint" },
|
|
676
1187
|
{ key: "line-blur", label: "Blur", widget: "number", group: "Appearance", category: "paint", min: 0, step: 0.5, enableDefault: 0 },
|
|
677
|
-
{ key: "line-dasharray", label: "Dash Array", widget: "dasharray", group: "Appearance", category: "paint", enableDefault: [2, 4] },
|
|
678
|
-
{ key: "line-pattern", label: "Pattern", widget: "
|
|
1188
|
+
{ key: "line-dasharray", label: "Dash Array", widget: "dasharray", group: "Appearance", category: "paint", enableDefault: [2, 4], description: 'Lengths of alternating dashes and gaps in pixels (e.g. "2, 4" gives 2px dash, 4px gap).' },
|
|
1189
|
+
{ key: "line-pattern", label: "Pattern", widget: "icon-image", group: "Appearance", category: "paint", enableDefault: "", description: "Name of an image in the style sprite to use as a repeating line pattern." },
|
|
679
1190
|
// Stroke (paint)
|
|
680
|
-
{ key: "line-gap-width", label: "Gap Width", widget: "number", group: "Stroke", category: "paint", min: 0, step: 0.5, enableDefault: 0 },
|
|
681
|
-
{ key: "line-offset", label: "Offset", widget: "number", group: "Stroke", category: "paint", step: 0.5, enableDefault: 0 },
|
|
1191
|
+
{ key: "line-gap-width", label: "Gap Width", widget: "number", group: "Stroke", category: "paint", min: 0, step: 0.5, enableDefault: 0, description: "Renders two parallel lines with a gap between them. Set to the desired inner gap width; the outer stroke uses line-width." },
|
|
1192
|
+
{ key: "line-offset", label: "Offset", widget: "number", group: "Stroke", category: "paint", step: 0.5, enableDefault: 0, description: "Offset the line from its original position in pixels. Positive values shift left (relative to direction of travel), negative shift right." },
|
|
682
1193
|
// Transform (paint)
|
|
683
|
-
{ key: "line-translate", label: "Translate (X, Y)", widget: "translate", group: "Transform", category: "paint", enableDefault: [0, 0] },
|
|
684
|
-
{ key: "line-translate-anchor", label: "Translate Anchor", widget: "enum", group: "Transform", category: "paint", options: ["map", "viewport"], enableDefault: "map" },
|
|
1194
|
+
{ key: "line-translate", label: "Translate (X, Y)", widget: "translate", group: "Transform", category: "paint", enableDefault: [0, 0], description: "Offset the line in pixels along X (right) and Y (down) axes." },
|
|
1195
|
+
{ key: "line-translate-anchor", label: "Translate Anchor", widget: "enum", group: "Transform", category: "paint", options: ["map", "viewport"], enableDefault: "map", description: '"map" moves the line with the map when panning; "viewport" keeps the offset fixed on screen.' },
|
|
685
1196
|
// Cap & Join (layout)
|
|
686
1197
|
{ key: "line-cap", label: "Line Cap", widget: "enum", group: "Cap & Join", category: "layout", options: ["butt", "round", "square"], enableDefault: "butt" },
|
|
687
1198
|
{ key: "line-join", label: "Line Join", widget: "enum", group: "Cap & Join", category: "layout", options: ["bevel", "round", "miter"], enableDefault: "miter" },
|
|
688
|
-
{ key: "line-miter-limit", label: "Miter Limit", widget: "number", group: "Cap & Join", category: "layout", step: 0.5, enableDefault: 2 },
|
|
689
|
-
{ key: "line-round-limit", label: "Round Limit", widget: "number", group: "Cap & Join", category: "layout", step: 0.1, enableDefault: 1.05 },
|
|
1199
|
+
{ key: "line-miter-limit", label: "Miter Limit", widget: "number", group: "Cap & Join", category: "layout", step: 0.5, enableDefault: 2, description: 'When line-join is "miter", sharp corners are clipped to a bevel once the miter length exceeds this multiple of line-width.' },
|
|
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.' },
|
|
690
1201
|
// Sorting (layout)
|
|
691
|
-
{ key: "line-sort-key", label: "Sort Key", widget: "number", group: "Sorting", category: "layout", step: 1, enableDefault: 0 }
|
|
692
|
-
],
|
|
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." }
|
|
1203
|
+
], ca = [
|
|
693
1204
|
// Appearance (paint)
|
|
694
1205
|
{ key: "circle-color", label: "Circle Color", widget: "color", group: "Appearance", category: "paint" },
|
|
695
1206
|
{ key: "circle-radius", label: "Radius", widget: "number", group: "Appearance", category: "paint", min: 0, step: 1 },
|
|
@@ -700,14 +1211,14 @@ const Te = [
|
|
|
700
1211
|
{ key: "circle-stroke-width", label: "Stroke Width", widget: "number", group: "Stroke", category: "paint", min: 0, step: 1, enableDefault: 1 },
|
|
701
1212
|
{ key: "circle-stroke-opacity", label: "Stroke Opacity", widget: "opacity", group: "Stroke", category: "paint", enableDefault: 1 },
|
|
702
1213
|
// Transform (paint)
|
|
703
|
-
{ key: "circle-translate", label: "Translate (X, Y)", widget: "translate", group: "Transform", category: "paint", enableDefault: [0, 0] },
|
|
704
|
-
{ key: "circle-translate-anchor", label: "Translate Anchor", widget: "enum", group: "Transform", category: "paint", options: ["map", "viewport"], enableDefault: "map" },
|
|
1214
|
+
{ key: "circle-translate", label: "Translate (X, Y)", widget: "translate", group: "Transform", category: "paint", enableDefault: [0, 0], description: "Offset the circle in pixels along X (right) and Y (down) axes." },
|
|
1215
|
+
{ key: "circle-translate-anchor", label: "Translate Anchor", widget: "enum", group: "Transform", category: "paint", options: ["map", "viewport"], enableDefault: "map", description: '"map" moves the circle with the map when panning; "viewport" keeps the offset fixed on screen.' },
|
|
705
1216
|
// Alignment (paint)
|
|
706
|
-
{ key: "circle-pitch-scale", label: "Pitch Scale", widget: "enum", group: "Alignment", category: "paint", options: ["map", "viewport"], enableDefault: "map" },
|
|
707
|
-
{ key: "circle-pitch-alignment", label: "Pitch Alignment", widget: "enum", group: "Alignment", category: "paint", options: ["map", "viewport"], enableDefault: "viewport" },
|
|
1217
|
+
{ key: "circle-pitch-scale", label: "Pitch Scale", widget: "enum", group: "Alignment", category: "paint", options: ["map", "viewport"], enableDefault: "map", description: '"map" scales circles with map perspective (smaller when far away); "viewport" keeps circles the same size regardless of pitch.' },
|
|
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).' },
|
|
708
1219
|
// Sorting (layout)
|
|
709
|
-
{ key: "circle-sort-key", label: "Sort Key", widget: "number", group: "Sorting", category: "layout", step: 1, enableDefault: 0 }
|
|
710
|
-
],
|
|
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." }
|
|
1221
|
+
], da = [
|
|
711
1222
|
// Icon Appearance (paint)
|
|
712
1223
|
{ key: "icon-color", label: "Icon Color", widget: "color", group: "Icon Appearance", category: "paint", enableDefault: "#000000" },
|
|
713
1224
|
{ key: "icon-opacity", label: "Icon Opacity", widget: "opacity", group: "Icon Appearance", category: "paint", enableDefault: 1 },
|
|
@@ -718,7 +1229,7 @@ const Te = [
|
|
|
718
1229
|
{ key: "icon-translate", label: "Icon Translate (X, Y)", widget: "translate", group: "Icon Transform", category: "paint", enableDefault: [0, 0] },
|
|
719
1230
|
{ key: "icon-translate-anchor", label: "Icon Translate Anchor", widget: "enum", group: "Icon Transform", category: "paint", options: ["map", "viewport"], enableDefault: "map" },
|
|
720
1231
|
// Text Appearance (paint)
|
|
721
|
-
{ key: "text-color", label: "Text Color", widget: "color", group: "Text Appearance", category: "paint", enableDefault: "#
|
|
1232
|
+
{ key: "text-color", label: "Text Color", widget: "color", group: "Text Appearance", category: "paint", enableDefault: "#333333" },
|
|
722
1233
|
{ key: "text-opacity", label: "Text Opacity", widget: "opacity", group: "Text Appearance", category: "paint", enableDefault: 1 },
|
|
723
1234
|
{ key: "text-halo-color", label: "Text Halo Color", widget: "color", group: "Text Appearance", category: "paint", enableDefault: "transparent" },
|
|
724
1235
|
{ key: "text-halo-width", label: "Text Halo Width", widget: "number", group: "Text Appearance", category: "paint", min: 0, step: 0.5, enableDefault: 0 },
|
|
@@ -727,730 +1238,912 @@ const Te = [
|
|
|
727
1238
|
{ key: "text-translate", label: "Text Translate (X, Y)", widget: "translate", group: "Text Transform", category: "paint", enableDefault: [0, 0] },
|
|
728
1239
|
{ key: "text-translate-anchor", label: "Text Translate Anchor", widget: "enum", group: "Text Transform", category: "paint", options: ["map", "viewport"], enableDefault: "map" },
|
|
729
1240
|
// Icon Layout (layout)
|
|
730
|
-
{ key: "icon-image", label: "Icon Image", widget: "
|
|
1241
|
+
{ key: "icon-image", label: "Icon Image", widget: "icon-image", group: "Icon Layout", category: "layout", enableDefault: "", description: 'Name of an image in the style sprite to use as an icon. Use {property} tokens to reference feature data (e.g. "{icon}").' },
|
|
731
1242
|
{ key: "icon-size", label: "Icon Size", widget: "number", group: "Icon Layout", category: "layout", min: 0, step: 0.1, enableDefault: 1 },
|
|
732
1243
|
{ key: "icon-rotate", label: "Icon Rotate", widget: "number", group: "Icon Layout", category: "layout", step: 1, enableDefault: 0 },
|
|
733
1244
|
{ key: "icon-padding", label: "Icon Padding", widget: "number", group: "Icon Layout", category: "layout", min: 0, step: 1, enableDefault: 2 },
|
|
734
|
-
{ key: "icon-anchor", label: "Icon Anchor", widget: "enum", group: "Icon Layout", category: "layout", options: ["center", "left", "right", "top", "bottom", "top-left", "top-right", "bottom-left", "bottom-right"], enableDefault: "center" },
|
|
735
|
-
{ key: "icon-allow-overlap", label: "Icon Allow Overlap", widget: "boolean", group: "Icon Layout", category: "layout", enableDefault: !1 },
|
|
736
|
-
{ key: "icon-optional", label: "Icon Optional", widget: "boolean", group: "Icon Layout", category: "layout", enableDefault: !1 },
|
|
737
|
-
{ key: "icon-rotation-alignment", label: "Icon Rotation Alignment", widget: "enum", group: "Icon Layout", category: "layout", options: ["map", "viewport", "auto"], enableDefault: "auto" },
|
|
738
|
-
{ key: "icon-text-fit", label: "Icon Text Fit", widget: "enum", group: "Icon Layout", category: "layout", options: ["none", "width", "height", "both"], enableDefault: "none" },
|
|
739
|
-
{ key: "icon-offset", label: "Icon Offset (X, Y)", widget: "translate", group: "Icon Layout", category: "layout", enableDefault: [0, 0] },
|
|
1245
|
+
{ key: "icon-anchor", label: "Icon Anchor", widget: "enum", group: "Icon Layout", category: "layout", options: ["center", "left", "right", "top", "bottom", "top-left", "top-right", "bottom-left", "bottom-right"], enableDefault: "center", description: 'The part of the icon that is placed at the feature geometry. E.g. "bottom" is used for map pins so the point touches the location.' },
|
|
1246
|
+
{ key: "icon-allow-overlap", label: "Icon Allow Overlap", widget: "boolean", group: "Icon Layout", category: "layout", enableDefault: !1, description: "When enabled, the icon is visible even if it overlaps other symbols. Useful for always-visible markers." },
|
|
1247
|
+
{ key: "icon-optional", label: "Icon Optional", widget: "boolean", group: "Icon Layout", category: "layout", enableDefault: !1, description: "When enabled, the icon is hidden (but text still shows) if the icon would cause a collision." },
|
|
1248
|
+
{ key: "icon-rotation-alignment", label: "Icon Rotation Alignment", widget: "enum", group: "Icon Layout", category: "layout", options: ["map", "viewport", "auto"], enableDefault: "auto", description: '"map" rotates with the map bearing; "viewport" stays upright on screen; "auto" follows symbol-placement.' },
|
|
1249
|
+
{ key: "icon-text-fit", label: "Icon Text Fit", widget: "enum", group: "Icon Layout", category: "layout", options: ["none", "width", "height", "both"], enableDefault: "none", description: "Scales the icon to fit the text bounding box. Useful for background label boxes." },
|
|
1250
|
+
{ key: "icon-offset", label: "Icon Offset (X, Y)", widget: "translate", group: "Icon Layout", category: "layout", enableDefault: [0, 0], description: "Offset the icon from the symbol anchor in pixels." },
|
|
740
1251
|
// Text Layout (layout)
|
|
741
|
-
{ key: "text-field", label: "Text Field", widget: "text", group: "Text Layout", category: "layout", enableDefault: "{name}" },
|
|
1252
|
+
{ key: "text-field", label: "Text Field", widget: "text", group: "Text Layout", category: "layout", enableDefault: "{name}", description: 'The text to display. Use {property} tokens to reference feature properties (e.g. "{name}" shows the name attribute).' },
|
|
742
1253
|
{ key: "text-size", label: "Text Size", widget: "number", group: "Text Layout", category: "layout", min: 0, step: 1, enableDefault: 16 },
|
|
743
|
-
{ key: "text-font", label: "Text Font (comma-separated)", widget: "stringArray", group: "Text Layout", category: "layout", enableDefault: ["Open Sans Regular"] },
|
|
744
|
-
{ key: "text-max-width", label: "Text Max Width", widget: "number", group: "Text Layout", category: "layout", min: 0, step: 1, enableDefault: 10 },
|
|
745
|
-
{ key: "text-letter-spacing", label: "Letter Spacing", widget: "number", group: "Text Layout", category: "layout", step: 0.05, enableDefault: 0 },
|
|
1254
|
+
{ key: "text-font", label: "Text Font (comma-separated)", widget: "stringArray", group: "Text Layout", category: "layout", enableDefault: ["Open Sans Regular"], description: "Ordered list of font stack names. The first font found in the style glyphs is used." },
|
|
1255
|
+
{ key: "text-max-width", label: "Text Max Width", widget: "number", group: "Text Layout", category: "layout", min: 0, step: 1, enableDefault: 10, description: "Maximum width of a text label in ems before it wraps to a new line." },
|
|
1256
|
+
{ key: "text-letter-spacing", label: "Letter Spacing", widget: "number", group: "Text Layout", category: "layout", step: 0.05, enableDefault: 0, description: "Additional spacing between characters in ems. Positive values spread text out; negative values tighten it." },
|
|
746
1257
|
{ key: "text-justify", label: "Text Justify", widget: "enum", group: "Text Layout", category: "layout", options: ["auto", "left", "center", "right"], enableDefault: "center" },
|
|
747
|
-
{ key: "text-anchor", label: "Text Anchor", widget: "enum", group: "Text Layout", category: "layout", options: ["center", "left", "right", "top", "bottom", "top-left", "top-right", "bottom-left", "bottom-right"], enableDefault: "center" },
|
|
1258
|
+
{ key: "text-anchor", label: "Text Anchor", widget: "enum", group: "Text Layout", category: "layout", options: ["center", "left", "right", "top", "bottom", "top-left", "top-right", "bottom-left", "bottom-right"], enableDefault: "center", description: "The part of the text bounding box that is placed at the symbol anchor point." },
|
|
748
1259
|
{ key: "text-transform", label: "Text Transform", widget: "enum", group: "Text Layout", category: "layout", options: ["none", "uppercase", "lowercase"], enableDefault: "none" },
|
|
749
|
-
{ key: "text-offset", label: "Text Offset (X, Y)", widget: "translate", group: "Text Layout", category: "layout", enableDefault: [0, 0] },
|
|
750
|
-
{ key: "text-allow-overlap", label: "Text Allow Overlap", widget: "boolean", group: "Text Layout", category: "layout", enableDefault: !1 },
|
|
751
|
-
{ key: "text-optional", label: "Text Optional", widget: "boolean", group: "Text Layout", category: "layout", enableDefault: !1 },
|
|
752
|
-
{ key: "text-rotation-alignment", label: "Text Rotation Alignment", widget: "enum", group: "Text Layout", category: "layout", options: ["map", "viewport", "viewport-glyph", "auto"], enableDefault: "auto" },
|
|
1260
|
+
{ key: "text-offset", label: "Text Offset (X, Y)", widget: "translate", group: "Text Layout", category: "layout", enableDefault: [0, 0], description: "Offset the text from the symbol anchor in ems." },
|
|
1261
|
+
{ key: "text-allow-overlap", label: "Text Allow Overlap", widget: "boolean", group: "Text Layout", category: "layout", enableDefault: !1, description: "When enabled, text is visible even if it overlaps other symbols." },
|
|
1262
|
+
{ key: "text-optional", label: "Text Optional", widget: "boolean", group: "Text Layout", category: "layout", enableDefault: !1, description: "When enabled, text is hidden (but icon still shows) if the text would cause a collision." },
|
|
1263
|
+
{ key: "text-rotation-alignment", label: "Text Rotation Alignment", widget: "enum", group: "Text Layout", category: "layout", options: ["map", "viewport", "viewport-glyph", "auto"], enableDefault: "auto", description: '"map" rotates text with the map; "viewport" keeps text upright; "viewport-glyph" keeps each glyph upright individually.' },
|
|
753
1264
|
// Placement (layout)
|
|
754
|
-
{ key: "symbol-placement", label: "Symbol Placement", widget: "enum", group: "Placement", category: "layout", options: ["point", "line", "line-center"], enableDefault: "point" },
|
|
755
|
-
{ key: "symbol-spacing", label: "Symbol Spacing", widget: "number", group: "Placement", category: "layout", min: 1, step: 1, enableDefault: 250 },
|
|
756
|
-
{ key: "symbol-avoid-edges", label: "Avoid Edges", widget: "boolean", group: "Placement", category: "layout", enableDefault: !1 },
|
|
757
|
-
{ key: "symbol-sort-key", label: "Sort Key", widget: "number", group: "Placement", category: "layout", step: 1, enableDefault: 0 },
|
|
758
|
-
{ key: "symbol-z-order", label: "Z-Order", widget: "enum", group: "Placement", category: "layout", options: ["auto", "viewport-y", "source"], enableDefault: "auto" }
|
|
759
|
-
],
|
|
760
|
-
fill:
|
|
761
|
-
line:
|
|
762
|
-
circle:
|
|
763
|
-
symbol:
|
|
1265
|
+
{ key: "symbol-placement", label: "Symbol Placement", widget: "enum", group: "Placement", category: "layout", options: ["point", "line", "line-center"], enableDefault: "point", description: '"point" places one symbol per feature; "line" places symbols along the full line; "line-center" places one at the midpoint.' },
|
|
1266
|
+
{ key: "symbol-spacing", label: "Symbol Spacing", widget: "number", group: "Placement", category: "layout", min: 1, step: 1, enableDefault: 250, description: 'Minimum distance in pixels between symbols along a line (used when symbol-placement is "line").' },
|
|
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." },
|
|
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." },
|
|
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.' }
|
|
1270
|
+
], ha = {
|
|
1271
|
+
fill: ma,
|
|
1272
|
+
line: sa,
|
|
1273
|
+
circle: ca,
|
|
1274
|
+
symbol: da
|
|
764
1275
|
};
|
|
765
|
-
function
|
|
766
|
-
return
|
|
1276
|
+
function ga(e) {
|
|
1277
|
+
return ha[e] ?? [];
|
|
767
1278
|
}
|
|
768
|
-
function
|
|
769
|
-
const
|
|
770
|
-
for (const
|
|
771
|
-
i
|
|
772
|
-
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;
|
|
773
1284
|
}
|
|
774
|
-
const
|
|
1285
|
+
const me = {
|
|
775
1286
|
type: "fill",
|
|
776
|
-
paint: { "fill-color": "#4a90d9", "fill-opacity": 0.6, "fill-outline-color": "transparent" }
|
|
777
|
-
},
|
|
1287
|
+
paint: { "fill-color": "#4a90d9", "fill-opacity": 0.6, "fill-outline-color": "transparent", "fill-antialias": !0 }
|
|
1288
|
+
}, je = {
|
|
778
1289
|
type: "line",
|
|
779
1290
|
paint: { "line-color": "#2980b9", "line-width": 2, "line-opacity": 1 }
|
|
780
|
-
},
|
|
1291
|
+
}, $e = {
|
|
781
1292
|
type: "circle",
|
|
782
1293
|
paint: { "circle-color": "#e74c3c", "circle-radius": 5, "circle-opacity": 0.9 }
|
|
783
|
-
},
|
|
1294
|
+
}, Re = {
|
|
784
1295
|
type: "symbol",
|
|
785
1296
|
paint: { "text-color": "#333333" },
|
|
786
1297
|
layout: { "text-field": "{name}", "text-size": 14 }
|
|
787
|
-
},
|
|
1298
|
+
}, ba = {
|
|
1299
|
+
layout: { "icon-image": "" }
|
|
1300
|
+
};
|
|
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";
|
|
1305
|
+
}
|
|
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 = {
|
|
788
1307
|
fill: "Fill",
|
|
789
1308
|
line: "Line",
|
|
790
1309
|
circle: "Circle",
|
|
791
1310
|
symbol: "Symbol"
|
|
792
|
-
};
|
|
793
|
-
function
|
|
794
|
-
const
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
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
|
|
1327
|
+
});
|
|
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
|
|
805
1340
|
});
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
1341
|
+
};
|
|
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);
|
|
1345
|
+
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
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: [
|
|
1347
|
+
/* @__PURE__ */ l("span", { children: [
|
|
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."
|
|
813
1356
|
] }),
|
|
814
|
-
/* @__PURE__ */
|
|
1357
|
+
/* @__PURE__ */ a("div", { className: "mapui:flex mapui:gap-1", children: b.map((y) => /* @__PURE__ */ a(
|
|
815
1358
|
"button",
|
|
816
1359
|
{
|
|
817
1360
|
type: "button",
|
|
818
|
-
onClick: () =>
|
|
1361
|
+
onClick: () => d(y),
|
|
819
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",
|
|
820
|
-
children:
|
|
821
|
-
}
|
|
822
|
-
|
|
1363
|
+
children: K[y]
|
|
1364
|
+
},
|
|
1365
|
+
y
|
|
1366
|
+
)) })
|
|
823
1367
|
] }),
|
|
824
|
-
/* @__PURE__ */
|
|
1368
|
+
/* @__PURE__ */ a(S, { label: "Style Type", children: /* @__PURE__ */ a(
|
|
825
1369
|
"select",
|
|
826
1370
|
{
|
|
827
|
-
value:
|
|
828
|
-
onChange: (
|
|
829
|
-
className:
|
|
830
|
-
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))
|
|
831
1375
|
}
|
|
832
1376
|
) }),
|
|
833
|
-
/* @__PURE__ */
|
|
834
|
-
|
|
835
|
-
|
|
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(
|
|
1378
|
+
"button",
|
|
1379
|
+
{
|
|
1380
|
+
type: "button",
|
|
1381
|
+
onClick: () => f(y),
|
|
1382
|
+
className: [
|
|
1383
|
+
"mapui:flex-1 mapui:cursor-pointer mapui:border-0 mapui:px-3 mapui:py-1 mapui:text-sm mapui:capitalize mapui:outline-none",
|
|
1384
|
+
"focus:mapui:ring-1 focus:mapui:ring-inset focus:mapui:ring-blue-400",
|
|
1385
|
+
m === y ? "mapui:bg-blue-500 mapui:text-white" : "mapui:bg-white mapui:text-gray-700 hover:mapui:bg-gray-50"
|
|
1386
|
+
].join(" "),
|
|
1387
|
+
children: y === "both" ? "Both" : y.charAt(0).toUpperCase() + y.slice(1)
|
|
1388
|
+
},
|
|
1389
|
+
y
|
|
1390
|
+
)) }) }),
|
|
1391
|
+
/* @__PURE__ */ l("div", { className: "mapui:rounded mapui:border mapui:border-gray-100 mapui:p-2", children: [
|
|
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 })
|
|
836
1394
|
] }),
|
|
837
|
-
|
|
838
|
-
/* @__PURE__ */
|
|
839
|
-
|
|
840
|
-
|
|
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,
|
|
841
1399
|
{
|
|
842
|
-
title:
|
|
843
|
-
properties: x[
|
|
844
|
-
values:
|
|
845
|
-
onChange:
|
|
846
|
-
defaultOpen:
|
|
1400
|
+
title: y,
|
|
1401
|
+
properties: x[y],
|
|
1402
|
+
values: C,
|
|
1403
|
+
onChange: u,
|
|
1404
|
+
defaultOpen: F === 0,
|
|
1405
|
+
availableIcons: n,
|
|
1406
|
+
availableProperties: o,
|
|
1407
|
+
onFetchDistinctValues: p
|
|
847
1408
|
},
|
|
848
|
-
|
|
1409
|
+
y
|
|
849
1410
|
))
|
|
850
1411
|
] }),
|
|
851
|
-
|
|
852
|
-
/* @__PURE__ */
|
|
853
|
-
|
|
854
|
-
|
|
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,
|
|
855
1416
|
{
|
|
856
|
-
title:
|
|
857
|
-
properties:
|
|
858
|
-
values:
|
|
859
|
-
onChange:
|
|
860
|
-
defaultOpen: !1
|
|
1417
|
+
title: y,
|
|
1418
|
+
properties: D[y],
|
|
1419
|
+
values: $,
|
|
1420
|
+
onChange: c,
|
|
1421
|
+
defaultOpen: !1,
|
|
1422
|
+
availableIcons: n,
|
|
1423
|
+
availableProperties: o,
|
|
1424
|
+
onFetchDistinctValues: p
|
|
861
1425
|
},
|
|
862
|
-
|
|
1426
|
+
y
|
|
863
1427
|
))
|
|
864
1428
|
] })
|
|
865
1429
|
] });
|
|
866
1430
|
}
|
|
867
|
-
const
|
|
868
|
-
function
|
|
869
|
-
return /* @__PURE__ */
|
|
870
|
-
/* @__PURE__ */
|
|
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 }) {
|
|
1433
|
+
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
|
|
1434
|
+
/* @__PURE__ */ a(S, { label: "Label", children: /* @__PURE__ */ a(
|
|
871
1435
|
"input",
|
|
872
1436
|
{
|
|
873
1437
|
type: "text",
|
|
874
|
-
value:
|
|
875
|
-
onChange: (
|
|
1438
|
+
value: e.label,
|
|
1439
|
+
onChange: (i) => t({ ...e, label: i.target.value }),
|
|
876
1440
|
placeholder: "Legend entry label",
|
|
877
|
-
className:
|
|
1441
|
+
className: ke
|
|
878
1442
|
}
|
|
879
1443
|
) }),
|
|
880
|
-
/* @__PURE__ */
|
|
881
|
-
|
|
1444
|
+
/* @__PURE__ */ a(S, { label: "Color", children: /* @__PURE__ */ a(
|
|
1445
|
+
Y,
|
|
882
1446
|
{
|
|
883
|
-
value:
|
|
884
|
-
onChange: (
|
|
1447
|
+
value: e.color,
|
|
1448
|
+
onChange: (i) => t({ ...e, color: i }),
|
|
885
1449
|
label: "Entry color"
|
|
886
1450
|
}
|
|
887
1451
|
) }),
|
|
888
|
-
/* @__PURE__ */
|
|
1452
|
+
/* @__PURE__ */ a(S, { label: "Shape", children: /* @__PURE__ */ l(
|
|
889
1453
|
"select",
|
|
890
1454
|
{
|
|
891
|
-
value:
|
|
892
|
-
onChange: (
|
|
893
|
-
className:
|
|
1455
|
+
value: e.shape ?? "square",
|
|
1456
|
+
onChange: (i) => t({ ...e, shape: i.target.value }),
|
|
1457
|
+
className: ke,
|
|
894
1458
|
children: [
|
|
895
|
-
/* @__PURE__ */
|
|
896
|
-
/* @__PURE__ */
|
|
897
|
-
/* @__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" })
|
|
898
1462
|
]
|
|
899
1463
|
}
|
|
900
1464
|
) })
|
|
901
1465
|
] });
|
|
902
1466
|
}
|
|
903
|
-
const
|
|
904
|
-
function
|
|
905
|
-
const
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
const
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
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);
|
|
915
1506
|
};
|
|
916
|
-
return /* @__PURE__ */
|
|
917
|
-
/* @__PURE__ */
|
|
918
|
-
/* @__PURE__ */
|
|
1507
|
+
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
1508
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
1509
|
+
/* @__PURE__ */ a(
|
|
919
1510
|
"input",
|
|
920
1511
|
{
|
|
921
1512
|
type: "checkbox",
|
|
922
1513
|
id: "legend-enabled",
|
|
923
|
-
checked:
|
|
924
|
-
onChange: (
|
|
1514
|
+
checked: e !== void 0,
|
|
1515
|
+
onChange: (c) => w(c.target.checked),
|
|
925
1516
|
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
926
1517
|
}
|
|
927
1518
|
),
|
|
928
|
-
/* @__PURE__ */
|
|
1519
|
+
/* @__PURE__ */ a("label", { htmlFor: "legend-enabled", className: "mapui:text-sm mapui:font-medium mapui:text-gray-700", children: "Enable Legend" })
|
|
929
1520
|
] }),
|
|
930
|
-
|
|
931
|
-
/* @__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(
|
|
932
1610
|
"li",
|
|
933
1611
|
{
|
|
934
1612
|
className: "mapui:rounded mapui:border mapui:border-gray-200 mapui:p-3",
|
|
935
1613
|
children: [
|
|
936
|
-
/* @__PURE__ */
|
|
937
|
-
/* @__PURE__ */
|
|
1614
|
+
/* @__PURE__ */ l("div", { className: "mapui:mb-2 mapui:flex mapui:items-center mapui:justify-between", children: [
|
|
1615
|
+
/* @__PURE__ */ l("span", { className: "mapui:text-xs mapui:font-medium mapui:text-gray-600", children: [
|
|
938
1616
|
"Entry ",
|
|
939
|
-
|
|
1617
|
+
u + 1
|
|
940
1618
|
] }),
|
|
941
|
-
/* @__PURE__ */
|
|
1619
|
+
/* @__PURE__ */ a(
|
|
942
1620
|
"button",
|
|
943
1621
|
{
|
|
944
1622
|
type: "button",
|
|
945
|
-
onClick: () => u
|
|
1623
|
+
onClick: () => m(u),
|
|
946
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",
|
|
947
1625
|
children: "Remove"
|
|
948
1626
|
}
|
|
949
1627
|
)
|
|
950
1628
|
] }),
|
|
951
|
-
/* @__PURE__ */
|
|
952
|
-
|
|
1629
|
+
/* @__PURE__ */ a(
|
|
1630
|
+
wa,
|
|
953
1631
|
{
|
|
954
|
-
value:
|
|
955
|
-
onChange: (
|
|
1632
|
+
value: c,
|
|
1633
|
+
onChange: (s) => b(u, s)
|
|
956
1634
|
}
|
|
957
1635
|
)
|
|
958
1636
|
]
|
|
959
1637
|
},
|
|
960
|
-
|
|
1638
|
+
u
|
|
961
1639
|
)) }),
|
|
962
|
-
/* @__PURE__ */
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
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
|
+
] })
|
|
971
1664
|
] })
|
|
972
1665
|
] });
|
|
973
1666
|
}
|
|
974
|
-
function
|
|
975
|
-
options:
|
|
976
|
-
onChange:
|
|
977
|
-
placeholder:
|
|
978
|
-
className:
|
|
1667
|
+
function De({
|
|
1668
|
+
options: e,
|
|
1669
|
+
onChange: t,
|
|
1670
|
+
placeholder: i,
|
|
1671
|
+
className: r
|
|
979
1672
|
}) {
|
|
980
|
-
const [n,
|
|
981
|
-
return
|
|
982
|
-
|
|
983
|
-
}, [
|
|
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(
|
|
984
1677
|
"input",
|
|
985
1678
|
{
|
|
986
1679
|
type: "text",
|
|
987
1680
|
value: n,
|
|
988
|
-
onChange: (
|
|
1681
|
+
onChange: (b) => o(b.target.value),
|
|
989
1682
|
onBlur: () => {
|
|
990
|
-
const
|
|
991
|
-
|
|
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(", ")) ?? "");
|
|
992
1685
|
},
|
|
993
|
-
placeholder:
|
|
994
|
-
className:
|
|
1686
|
+
placeholder: i,
|
|
1687
|
+
className: r
|
|
995
1688
|
}
|
|
996
1689
|
);
|
|
997
1690
|
}
|
|
998
|
-
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 = {
|
|
999
1692
|
text: { type: "text", property: "", label: "", autocomplete: !1 },
|
|
1000
1693
|
number: { type: "number", property: "", label: "", inputMode: "input", operator: "eq" },
|
|
1001
1694
|
datetime: { type: "datetime", property: "", label: "", range: !1 },
|
|
1002
1695
|
select: { type: "select", property: "", label: "" }
|
|
1003
1696
|
};
|
|
1004
|
-
function
|
|
1005
|
-
const
|
|
1006
|
-
|
|
1007
|
-
}, n = (p) =>
|
|
1008
|
-
return /* @__PURE__ */
|
|
1009
|
-
/* @__PURE__ */
|
|
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;
|
|
1701
|
+
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
1702
|
+
/* @__PURE__ */ a(S, { label: "Field Type", children: /* @__PURE__ */ l(
|
|
1010
1703
|
"select",
|
|
1011
1704
|
{
|
|
1012
|
-
value:
|
|
1013
|
-
onChange: (p) =>
|
|
1014
|
-
className:
|
|
1705
|
+
value: e.type,
|
|
1706
|
+
onChange: (p) => r(p.target.value),
|
|
1707
|
+
className: j,
|
|
1015
1708
|
children: [
|
|
1016
|
-
/* @__PURE__ */
|
|
1017
|
-
/* @__PURE__ */
|
|
1018
|
-
/* @__PURE__ */
|
|
1019
|
-
/* @__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" })
|
|
1020
1713
|
]
|
|
1021
1714
|
}
|
|
1022
1715
|
) }),
|
|
1023
|
-
/* @__PURE__ */
|
|
1716
|
+
/* @__PURE__ */ a(S, { label: "Property", required: !0, children: o ? /* @__PURE__ */ l(
|
|
1024
1717
|
"select",
|
|
1025
1718
|
{
|
|
1026
|
-
value:
|
|
1719
|
+
value: e.property,
|
|
1027
1720
|
onChange: (p) => n({ property: p.target.value }),
|
|
1028
|
-
className:
|
|
1721
|
+
className: j,
|
|
1029
1722
|
children: [
|
|
1030
|
-
/* @__PURE__ */
|
|
1031
|
-
|
|
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))
|
|
1032
1725
|
]
|
|
1033
1726
|
}
|
|
1034
|
-
) : /* @__PURE__ */
|
|
1727
|
+
) : /* @__PURE__ */ a(
|
|
1035
1728
|
"input",
|
|
1036
1729
|
{
|
|
1037
1730
|
type: "text",
|
|
1038
|
-
value:
|
|
1731
|
+
value: e.property,
|
|
1039
1732
|
onChange: (p) => n({ property: p.target.value }),
|
|
1040
1733
|
placeholder: "e.g. name",
|
|
1041
|
-
className:
|
|
1734
|
+
className: j
|
|
1042
1735
|
}
|
|
1043
1736
|
) }),
|
|
1044
|
-
/* @__PURE__ */
|
|
1737
|
+
/* @__PURE__ */ a(S, { label: "Label", children: /* @__PURE__ */ a(
|
|
1045
1738
|
"input",
|
|
1046
1739
|
{
|
|
1047
1740
|
type: "text",
|
|
1048
|
-
value:
|
|
1741
|
+
value: e.label,
|
|
1049
1742
|
onChange: (p) => n({ label: p.target.value }),
|
|
1050
1743
|
placeholder: "Display label",
|
|
1051
|
-
className:
|
|
1744
|
+
className: j
|
|
1052
1745
|
}
|
|
1053
1746
|
) }),
|
|
1054
|
-
/* @__PURE__ */
|
|
1747
|
+
/* @__PURE__ */ a(S, { label: "Placeholder", children: /* @__PURE__ */ a(
|
|
1055
1748
|
"input",
|
|
1056
1749
|
{
|
|
1057
1750
|
type: "text",
|
|
1058
|
-
value:
|
|
1751
|
+
value: e.placeholder ?? "",
|
|
1059
1752
|
onChange: (p) => n({ placeholder: p.target.value || void 0 }),
|
|
1060
1753
|
placeholder: "Input placeholder text",
|
|
1061
|
-
className:
|
|
1754
|
+
className: j
|
|
1062
1755
|
}
|
|
1063
1756
|
) }),
|
|
1064
|
-
|
|
1065
|
-
/* @__PURE__ */
|
|
1066
|
-
/* @__PURE__ */
|
|
1757
|
+
e.type === "text" && /* @__PURE__ */ l(B, { children: [
|
|
1758
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
1759
|
+
/* @__PURE__ */ a(
|
|
1067
1760
|
"input",
|
|
1068
1761
|
{
|
|
1069
1762
|
type: "checkbox",
|
|
1070
1763
|
id: "text-autocomplete",
|
|
1071
|
-
checked:
|
|
1072
|
-
onChange: (p) =>
|
|
1764
|
+
checked: e.autocomplete ?? !1,
|
|
1765
|
+
onChange: (p) => t({ ...e, autocomplete: p.target.checked }),
|
|
1073
1766
|
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
1074
1767
|
}
|
|
1075
1768
|
),
|
|
1076
|
-
/* @__PURE__ */
|
|
1769
|
+
/* @__PURE__ */ a("label", { htmlFor: "text-autocomplete", className: "mapui:text-sm mapui:text-gray-700", children: "Enable Autocomplete" })
|
|
1077
1770
|
] }),
|
|
1078
|
-
/* @__PURE__ */
|
|
1079
|
-
/* @__PURE__ */
|
|
1771
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
1772
|
+
/* @__PURE__ */ a(
|
|
1080
1773
|
"input",
|
|
1081
1774
|
{
|
|
1082
1775
|
type: "checkbox",
|
|
1083
1776
|
id: "text-prefetch",
|
|
1084
|
-
checked:
|
|
1085
|
-
onChange: (p) =>
|
|
1777
|
+
checked: e.prefetch ?? !1,
|
|
1778
|
+
onChange: (p) => t({ ...e, prefetch: p.target.checked }),
|
|
1086
1779
|
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
1087
1780
|
}
|
|
1088
1781
|
),
|
|
1089
|
-
/* @__PURE__ */
|
|
1782
|
+
/* @__PURE__ */ a("label", { htmlFor: "text-prefetch", className: "mapui:text-sm mapui:text-gray-700", children: "Prefetch Options" })
|
|
1090
1783
|
] }),
|
|
1091
|
-
/* @__PURE__ */
|
|
1092
|
-
|
|
1784
|
+
/* @__PURE__ */ a(S, { label: "Static Options (comma-separated)", children: /* @__PURE__ */ a(
|
|
1785
|
+
De,
|
|
1093
1786
|
{
|
|
1094
|
-
options:
|
|
1095
|
-
onChange: (p) =>
|
|
1787
|
+
options: e.options,
|
|
1788
|
+
onChange: (p) => t({ ...e, options: p }),
|
|
1096
1789
|
placeholder: "option1, option2",
|
|
1097
|
-
className:
|
|
1790
|
+
className: j
|
|
1098
1791
|
}
|
|
1099
1792
|
) })
|
|
1100
1793
|
] }),
|
|
1101
|
-
|
|
1102
|
-
/* @__PURE__ */
|
|
1794
|
+
e.type === "number" && /* @__PURE__ */ l(B, { children: [
|
|
1795
|
+
/* @__PURE__ */ a(S, { label: "Input Mode", children: /* @__PURE__ */ l(
|
|
1103
1796
|
"select",
|
|
1104
1797
|
{
|
|
1105
|
-
value:
|
|
1106
|
-
onChange: (p) =>
|
|
1107
|
-
...
|
|
1798
|
+
value: e.inputMode ?? "input",
|
|
1799
|
+
onChange: (p) => t({
|
|
1800
|
+
...e,
|
|
1108
1801
|
inputMode: p.target.value
|
|
1109
1802
|
}),
|
|
1110
|
-
className:
|
|
1803
|
+
className: j,
|
|
1111
1804
|
children: [
|
|
1112
|
-
/* @__PURE__ */
|
|
1113
|
-
/* @__PURE__ */
|
|
1805
|
+
/* @__PURE__ */ a("option", { value: "input", children: "Input" }),
|
|
1806
|
+
/* @__PURE__ */ a("option", { value: "slider", children: "Slider" })
|
|
1114
1807
|
]
|
|
1115
1808
|
}
|
|
1116
1809
|
) }),
|
|
1117
|
-
/* @__PURE__ */
|
|
1810
|
+
/* @__PURE__ */ a(S, { label: "Operator", children: /* @__PURE__ */ l(
|
|
1118
1811
|
"select",
|
|
1119
1812
|
{
|
|
1120
|
-
value:
|
|
1121
|
-
onChange: (p) =>
|
|
1122
|
-
...
|
|
1813
|
+
value: e.operator ?? "eq",
|
|
1814
|
+
onChange: (p) => t({
|
|
1815
|
+
...e,
|
|
1123
1816
|
operator: p.target.value
|
|
1124
1817
|
}),
|
|
1125
|
-
className:
|
|
1818
|
+
className: j,
|
|
1126
1819
|
children: [
|
|
1127
|
-
/* @__PURE__ */
|
|
1128
|
-
/* @__PURE__ */
|
|
1129
|
-
/* @__PURE__ */
|
|
1130
|
-
/* @__PURE__ */
|
|
1131
|
-
/* @__PURE__ */
|
|
1132
|
-
/* @__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" })
|
|
1133
1826
|
]
|
|
1134
1827
|
}
|
|
1135
1828
|
) }),
|
|
1136
|
-
/* @__PURE__ */
|
|
1137
|
-
/* @__PURE__ */
|
|
1829
|
+
/* @__PURE__ */ l("div", { className: "mapui:grid mapui:grid-cols-3 mapui:gap-2", children: [
|
|
1830
|
+
/* @__PURE__ */ a(S, { label: "Min", children: /* @__PURE__ */ a(
|
|
1138
1831
|
"input",
|
|
1139
1832
|
{
|
|
1140
1833
|
type: "number",
|
|
1141
|
-
value:
|
|
1142
|
-
onChange: (p) =>
|
|
1143
|
-
...
|
|
1834
|
+
value: e.min ?? "",
|
|
1835
|
+
onChange: (p) => t({
|
|
1836
|
+
...e,
|
|
1144
1837
|
min: p.target.value ? parseFloat(p.target.value) : void 0
|
|
1145
1838
|
}),
|
|
1146
|
-
className:
|
|
1839
|
+
className: j
|
|
1147
1840
|
}
|
|
1148
1841
|
) }),
|
|
1149
|
-
/* @__PURE__ */
|
|
1842
|
+
/* @__PURE__ */ a(S, { label: "Max", children: /* @__PURE__ */ a(
|
|
1150
1843
|
"input",
|
|
1151
1844
|
{
|
|
1152
1845
|
type: "number",
|
|
1153
|
-
value:
|
|
1154
|
-
onChange: (p) =>
|
|
1155
|
-
...
|
|
1846
|
+
value: e.max ?? "",
|
|
1847
|
+
onChange: (p) => t({
|
|
1848
|
+
...e,
|
|
1156
1849
|
max: p.target.value ? parseFloat(p.target.value) : void 0
|
|
1157
1850
|
}),
|
|
1158
|
-
className:
|
|
1851
|
+
className: j
|
|
1159
1852
|
}
|
|
1160
1853
|
) }),
|
|
1161
|
-
/* @__PURE__ */
|
|
1854
|
+
/* @__PURE__ */ a(S, { label: "Step", children: /* @__PURE__ */ a(
|
|
1162
1855
|
"input",
|
|
1163
1856
|
{
|
|
1164
1857
|
type: "number",
|
|
1165
|
-
value:
|
|
1166
|
-
onChange: (p) =>
|
|
1167
|
-
...
|
|
1858
|
+
value: e.step ?? "",
|
|
1859
|
+
onChange: (p) => t({
|
|
1860
|
+
...e,
|
|
1168
1861
|
step: p.target.value ? parseFloat(p.target.value) : void 0
|
|
1169
1862
|
}),
|
|
1170
|
-
className:
|
|
1863
|
+
className: j
|
|
1171
1864
|
}
|
|
1172
1865
|
) })
|
|
1173
1866
|
] })
|
|
1174
1867
|
] }),
|
|
1175
|
-
|
|
1176
|
-
/* @__PURE__ */
|
|
1868
|
+
e.type === "datetime" && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
1869
|
+
/* @__PURE__ */ a(
|
|
1177
1870
|
"input",
|
|
1178
1871
|
{
|
|
1179
1872
|
type: "checkbox",
|
|
1180
1873
|
id: "datetime-range",
|
|
1181
|
-
checked:
|
|
1182
|
-
onChange: (p) =>
|
|
1874
|
+
checked: e.range ?? !1,
|
|
1875
|
+
onChange: (p) => t({ ...e, range: p.target.checked }),
|
|
1183
1876
|
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
1184
1877
|
}
|
|
1185
1878
|
),
|
|
1186
|
-
/* @__PURE__ */
|
|
1879
|
+
/* @__PURE__ */ a("label", { htmlFor: "datetime-range", className: "mapui:text-sm mapui:text-gray-700", children: "Date Range" })
|
|
1187
1880
|
] }),
|
|
1188
|
-
|
|
1189
|
-
/* @__PURE__ */
|
|
1190
|
-
/* @__PURE__ */
|
|
1881
|
+
e.type === "select" && /* @__PURE__ */ l(B, { children: [
|
|
1882
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
1883
|
+
/* @__PURE__ */ a(
|
|
1191
1884
|
"input",
|
|
1192
1885
|
{
|
|
1193
1886
|
type: "checkbox",
|
|
1194
1887
|
id: "select-prefetch",
|
|
1195
|
-
checked:
|
|
1196
|
-
onChange: (p) =>
|
|
1888
|
+
checked: e.prefetch ?? !1,
|
|
1889
|
+
onChange: (p) => t({ ...e, prefetch: p.target.checked }),
|
|
1197
1890
|
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
1198
1891
|
}
|
|
1199
1892
|
),
|
|
1200
|
-
/* @__PURE__ */
|
|
1893
|
+
/* @__PURE__ */ a("label", { htmlFor: "select-prefetch", className: "mapui:text-sm mapui:text-gray-700", children: "Prefetch Options" })
|
|
1201
1894
|
] }),
|
|
1202
|
-
/* @__PURE__ */
|
|
1203
|
-
|
|
1895
|
+
/* @__PURE__ */ a(S, { label: "Static Options (comma-separated)", children: /* @__PURE__ */ a(
|
|
1896
|
+
De,
|
|
1204
1897
|
{
|
|
1205
|
-
options:
|
|
1206
|
-
onChange: (p) =>
|
|
1898
|
+
options: e.options,
|
|
1899
|
+
onChange: (p) => t({ ...e, options: p }),
|
|
1207
1900
|
placeholder: "option1, option2",
|
|
1208
|
-
className:
|
|
1901
|
+
className: j
|
|
1209
1902
|
}
|
|
1210
1903
|
) })
|
|
1211
1904
|
] })
|
|
1212
1905
|
] });
|
|
1213
1906
|
}
|
|
1214
|
-
const
|
|
1907
|
+
const Ca = () => ({
|
|
1215
1908
|
type: "text",
|
|
1216
1909
|
property: "",
|
|
1217
1910
|
label: "",
|
|
1218
1911
|
autocomplete: !1
|
|
1219
1912
|
});
|
|
1220
|
-
function
|
|
1221
|
-
const [
|
|
1222
|
-
const d = [...
|
|
1223
|
-
|
|
1224
|
-
}, p = (d,
|
|
1225
|
-
|
|
1226
|
-
},
|
|
1227
|
-
|
|
1228
|
-
},
|
|
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) => {
|
|
1229
1922
|
if (d === 0) return;
|
|
1230
|
-
const
|
|
1231
|
-
[
|
|
1232
|
-
},
|
|
1233
|
-
if (d ===
|
|
1234
|
-
const
|
|
1235
|
-
[
|
|
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);
|
|
1236
1929
|
};
|
|
1237
|
-
return /* @__PURE__ */
|
|
1238
|
-
|
|
1239
|
-
/* @__PURE__ */
|
|
1240
|
-
/* @__PURE__ */
|
|
1241
|
-
/* @__PURE__ */
|
|
1242
|
-
/* @__PURE__ */
|
|
1930
|
+
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
|
|
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: [
|
|
1933
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-1 mapui:px-3 mapui:py-2", children: [
|
|
1934
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-0.5", children: [
|
|
1935
|
+
/* @__PURE__ */ a(
|
|
1243
1936
|
"button",
|
|
1244
1937
|
{
|
|
1245
1938
|
type: "button",
|
|
1246
|
-
onClick: () =>
|
|
1247
|
-
disabled:
|
|
1939
|
+
onClick: () => m(f),
|
|
1940
|
+
disabled: f === 0,
|
|
1248
1941
|
"aria-label": "Move up",
|
|
1249
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",
|
|
1250
1943
|
children: "▲"
|
|
1251
1944
|
}
|
|
1252
1945
|
),
|
|
1253
|
-
/* @__PURE__ */
|
|
1946
|
+
/* @__PURE__ */ a(
|
|
1254
1947
|
"button",
|
|
1255
1948
|
{
|
|
1256
1949
|
type: "button",
|
|
1257
|
-
onClick: () =>
|
|
1258
|
-
disabled:
|
|
1950
|
+
onClick: () => w(f),
|
|
1951
|
+
disabled: f === e.length - 1,
|
|
1259
1952
|
"aria-label": "Move down",
|
|
1260
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",
|
|
1261
1954
|
children: "▼"
|
|
1262
1955
|
}
|
|
1263
1956
|
)
|
|
1264
1957
|
] }),
|
|
1265
|
-
/* @__PURE__ */
|
|
1958
|
+
/* @__PURE__ */ l(
|
|
1266
1959
|
"button",
|
|
1267
1960
|
{
|
|
1268
1961
|
type: "button",
|
|
1269
|
-
onClick: () => n(
|
|
1962
|
+
onClick: () => n(r === f ? null : f),
|
|
1270
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",
|
|
1271
1964
|
children: [
|
|
1272
|
-
/* @__PURE__ */
|
|
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 }),
|
|
1273
1966
|
d.label || d.property || "Untitled field"
|
|
1274
1967
|
]
|
|
1275
1968
|
}
|
|
1276
1969
|
),
|
|
1277
|
-
/* @__PURE__ */
|
|
1970
|
+
/* @__PURE__ */ a(
|
|
1278
1971
|
"button",
|
|
1279
1972
|
{
|
|
1280
1973
|
type: "button",
|
|
1281
|
-
onClick: () =>
|
|
1974
|
+
onClick: () => b(f),
|
|
1282
1975
|
"aria-label": "Remove field",
|
|
1283
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",
|
|
1284
1977
|
children: "Remove"
|
|
1285
1978
|
}
|
|
1286
1979
|
)
|
|
1287
1980
|
] }),
|
|
1288
|
-
|
|
1289
|
-
|
|
1981
|
+
r === f && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(
|
|
1982
|
+
ka,
|
|
1290
1983
|
{
|
|
1291
1984
|
value: d,
|
|
1292
|
-
onChange: (
|
|
1293
|
-
availableProperties:
|
|
1985
|
+
onChange: (c) => p(f, c),
|
|
1986
|
+
availableProperties: i
|
|
1294
1987
|
}
|
|
1295
1988
|
) })
|
|
1296
|
-
] },
|
|
1297
|
-
/* @__PURE__ */
|
|
1989
|
+
] }, f)) }),
|
|
1990
|
+
/* @__PURE__ */ a(
|
|
1298
1991
|
"button",
|
|
1299
1992
|
{
|
|
1300
1993
|
type: "button",
|
|
1301
|
-
onClick:
|
|
1994
|
+
onClick: o,
|
|
1302
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",
|
|
1303
1996
|
children: "+ Add Search Field"
|
|
1304
1997
|
}
|
|
1305
1998
|
)
|
|
1306
1999
|
] });
|
|
1307
2000
|
}
|
|
1308
|
-
function
|
|
1309
|
-
return Object.entries(
|
|
1310
|
-
key:
|
|
1311
|
-
label:
|
|
1312
|
-
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
|
|
1313
2006
|
}));
|
|
1314
2007
|
}
|
|
1315
|
-
function
|
|
1316
|
-
const
|
|
1317
|
-
for (const
|
|
1318
|
-
i
|
|
1319
|
-
visible:
|
|
1320
|
-
...
|
|
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 } : {}
|
|
1321
2014
|
};
|
|
1322
|
-
return
|
|
2015
|
+
return t;
|
|
1323
2016
|
}
|
|
1324
|
-
const
|
|
1325
|
-
function
|
|
1326
|
-
const
|
|
1327
|
-
|
|
1328
|
-
},
|
|
1329
|
-
|
|
1330
|
-
},
|
|
1331
|
-
|
|
1332
|
-
},
|
|
1333
|
-
const
|
|
1334
|
-
|
|
1335
|
-
}, d = (
|
|
1336
|
-
if (
|
|
1337
|
-
const
|
|
1338
|
-
[
|
|
1339
|
-
},
|
|
1340
|
-
if (
|
|
1341
|
-
const
|
|
1342
|
-
[
|
|
1343
|
-
},
|
|
1344
|
-
if (!
|
|
1345
|
-
const
|
|
1346
|
-
key:
|
|
1347
|
-
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 ?? "",
|
|
1348
2041
|
visible: !0
|
|
1349
2042
|
}));
|
|
1350
|
-
u
|
|
2043
|
+
o(u);
|
|
1351
2044
|
};
|
|
1352
|
-
return /* @__PURE__ */
|
|
1353
|
-
|
|
1354
|
-
/* @__PURE__ */
|
|
1355
|
-
n && /* @__PURE__ */
|
|
2045
|
+
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
|
|
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(
|
|
1356
2049
|
"button",
|
|
1357
2050
|
{
|
|
1358
2051
|
type: "button",
|
|
1359
|
-
onClick:
|
|
2052
|
+
onClick: c,
|
|
1360
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",
|
|
1361
2054
|
children: "Populate from API metadata"
|
|
1362
2055
|
}
|
|
1363
2056
|
)
|
|
1364
|
-
] }) : /* @__PURE__ */
|
|
1365
|
-
/* @__PURE__ */
|
|
1366
|
-
/* @__PURE__ */
|
|
1367
|
-
/* @__PURE__ */
|
|
1368
|
-
/* @__PURE__ */
|
|
2057
|
+
] }) : /* @__PURE__ */ l(B, { children: [
|
|
2058
|
+
/* @__PURE__ */ l("div", { className: "mapui:grid mapui:items-center mapui:gap-2 mapui:px-8", style: { gridTemplateColumns: "1fr 1fr auto" }, children: [
|
|
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" })
|
|
1369
2062
|
] }),
|
|
1370
|
-
/* @__PURE__ */
|
|
1371
|
-
/* @__PURE__ */
|
|
1372
|
-
/* @__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: [
|
|
2064
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-0.5", children: [
|
|
2065
|
+
/* @__PURE__ */ a(
|
|
1373
2066
|
"button",
|
|
1374
2067
|
{
|
|
1375
2068
|
type: "button",
|
|
1376
|
-
onClick: () => d(
|
|
1377
|
-
disabled:
|
|
2069
|
+
onClick: () => d(s),
|
|
2070
|
+
disabled: s === 0,
|
|
1378
2071
|
"aria-label": "Move up",
|
|
1379
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",
|
|
1380
2073
|
children: "▲"
|
|
1381
2074
|
}
|
|
1382
2075
|
),
|
|
1383
|
-
/* @__PURE__ */
|
|
2076
|
+
/* @__PURE__ */ a(
|
|
1384
2077
|
"button",
|
|
1385
2078
|
{
|
|
1386
2079
|
type: "button",
|
|
1387
|
-
onClick: () =>
|
|
1388
|
-
disabled:
|
|
2080
|
+
onClick: () => f(s),
|
|
2081
|
+
disabled: s === r.length - 1,
|
|
1389
2082
|
"aria-label": "Move down",
|
|
1390
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",
|
|
1391
2084
|
children: "▼"
|
|
1392
2085
|
}
|
|
1393
2086
|
)
|
|
1394
2087
|
] }),
|
|
1395
|
-
/* @__PURE__ */
|
|
1396
|
-
n ? /* @__PURE__ */
|
|
2088
|
+
/* @__PURE__ */ l("div", { className: "mapui:grid mapui:flex-1 mapui:items-center mapui:gap-2", style: { gridTemplateColumns: "1fr 1fr auto auto" }, children: [
|
|
2089
|
+
n ? /* @__PURE__ */ l(
|
|
1397
2090
|
"select",
|
|
1398
2091
|
{
|
|
1399
|
-
value:
|
|
1400
|
-
onChange: (
|
|
2092
|
+
value: u.key,
|
|
2093
|
+
onChange: (v) => w(s, v.target.value),
|
|
1401
2094
|
"aria-label": "Property key",
|
|
1402
|
-
className:
|
|
2095
|
+
className: le,
|
|
1403
2096
|
children: [
|
|
1404
|
-
/* @__PURE__ */
|
|
1405
|
-
|
|
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))
|
|
1406
2099
|
]
|
|
1407
2100
|
}
|
|
1408
|
-
) : /* @__PURE__ */
|
|
2101
|
+
) : /* @__PURE__ */ a(
|
|
1409
2102
|
"input",
|
|
1410
2103
|
{
|
|
1411
2104
|
type: "text",
|
|
1412
|
-
value:
|
|
1413
|
-
onChange: (
|
|
2105
|
+
value: u.key,
|
|
2106
|
+
onChange: (v) => m(s, { key: v.target.value }),
|
|
1414
2107
|
placeholder: "property_name",
|
|
1415
2108
|
"aria-label": "Property key",
|
|
1416
|
-
className:
|
|
2109
|
+
className: le
|
|
1417
2110
|
}
|
|
1418
2111
|
),
|
|
1419
|
-
/* @__PURE__ */
|
|
2112
|
+
/* @__PURE__ */ a(
|
|
1420
2113
|
"input",
|
|
1421
2114
|
{
|
|
1422
2115
|
type: "text",
|
|
1423
|
-
value:
|
|
1424
|
-
onChange: (
|
|
2116
|
+
value: u.label,
|
|
2117
|
+
onChange: (v) => m(s, { label: v.target.value }),
|
|
1425
2118
|
placeholder: "Friendly name",
|
|
1426
2119
|
"aria-label": "Display label",
|
|
1427
|
-
className:
|
|
2120
|
+
className: le
|
|
1428
2121
|
}
|
|
1429
2122
|
),
|
|
1430
|
-
/* @__PURE__ */
|
|
2123
|
+
/* @__PURE__ */ a(
|
|
1431
2124
|
"input",
|
|
1432
2125
|
{
|
|
1433
2126
|
type: "checkbox",
|
|
1434
|
-
checked:
|
|
1435
|
-
onChange: (
|
|
2127
|
+
checked: u.visible,
|
|
2128
|
+
onChange: (v) => m(s, { visible: v.target.checked }),
|
|
1436
2129
|
"aria-label": "Visible",
|
|
1437
2130
|
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
1438
2131
|
}
|
|
1439
2132
|
),
|
|
1440
|
-
/* @__PURE__ */
|
|
2133
|
+
/* @__PURE__ */ a(
|
|
1441
2134
|
"button",
|
|
1442
2135
|
{
|
|
1443
2136
|
type: "button",
|
|
1444
|
-
onClick: () =>
|
|
2137
|
+
onClick: () => b(s),
|
|
1445
2138
|
"aria-label": "Remove property",
|
|
1446
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",
|
|
1447
2140
|
children: "Remove"
|
|
1448
2141
|
}
|
|
1449
2142
|
)
|
|
1450
2143
|
] })
|
|
1451
|
-
] },
|
|
2144
|
+
] }, s)) })
|
|
1452
2145
|
] }),
|
|
1453
|
-
/* @__PURE__ */
|
|
2146
|
+
/* @__PURE__ */ a(
|
|
1454
2147
|
"button",
|
|
1455
2148
|
{
|
|
1456
2149
|
type: "button",
|
|
@@ -1461,216 +2154,246 @@ function Ge({ value: a, onChange: i, availableProperties: t }) {
|
|
|
1461
2154
|
)
|
|
1462
2155
|
] });
|
|
1463
2156
|
}
|
|
1464
|
-
const
|
|
1465
|
-
function
|
|
1466
|
-
return !!
|
|
2157
|
+
const Be = /geojson\.org\/schema\/(\w+)\.json/;
|
|
2158
|
+
function Ia(e) {
|
|
2159
|
+
return !!e.$ref && Be.test(e.$ref);
|
|
2160
|
+
}
|
|
2161
|
+
function qe(e) {
|
|
2162
|
+
const t = Be.exec(e);
|
|
2163
|
+
return t ? t[1] : null;
|
|
1467
2164
|
}
|
|
1468
|
-
function
|
|
1469
|
-
const
|
|
1470
|
-
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;
|
|
1471
2168
|
}
|
|
1472
|
-
function
|
|
1473
|
-
const
|
|
1474
|
-
return
|
|
2169
|
+
function ce(e) {
|
|
2170
|
+
const t = e.toLowerCase();
|
|
2171
|
+
return t.includes("polygon") ? ["fill"] : t.includes("linestring") ? ["line"] : t.includes("point") ? ["circle", "symbol"] : [];
|
|
1475
2172
|
}
|
|
1476
|
-
function
|
|
1477
|
-
for (const
|
|
1478
|
-
if (
|
|
1479
|
-
const
|
|
1480
|
-
if (
|
|
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);
|
|
1481
2178
|
}
|
|
1482
2179
|
return null;
|
|
1483
2180
|
}
|
|
1484
|
-
function
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
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
|
|
1493
2198
|
}));
|
|
1494
2199
|
}
|
|
1495
|
-
async function
|
|
1496
|
-
var
|
|
2200
|
+
async function Ga(e, t) {
|
|
2201
|
+
var i, r;
|
|
1497
2202
|
try {
|
|
1498
|
-
const n = await
|
|
1499
|
-
if (
|
|
2203
|
+
const n = await Me(e, t), o = Aa(n);
|
|
2204
|
+
if (o) return o;
|
|
1500
2205
|
} catch {
|
|
1501
2206
|
}
|
|
1502
2207
|
try {
|
|
1503
|
-
const
|
|
1504
|
-
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);
|
|
1505
2210
|
} catch {
|
|
1506
2211
|
}
|
|
1507
2212
|
return null;
|
|
1508
2213
|
}
|
|
1509
|
-
function
|
|
1510
|
-
|
|
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());
|
|
1511
2230
|
}
|
|
1512
|
-
const
|
|
1513
|
-
function
|
|
1514
|
-
var
|
|
1515
|
-
const
|
|
1516
|
-
|
|
1517
|
-
const
|
|
1518
|
-
|
|
1519
|
-
const
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
if (!y) {
|
|
1524
|
-
m(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([]);
|
|
1525
2242
|
return;
|
|
1526
2243
|
}
|
|
1527
|
-
const
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
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 });
|
|
1531
2250
|
}
|
|
1532
|
-
},
|
|
1533
|
-
if (
|
|
1534
|
-
|
|
2251
|
+
}, $ = We(c);
|
|
2252
|
+
if ($.length > 0) {
|
|
2253
|
+
x($);
|
|
1535
2254
|
return;
|
|
1536
2255
|
}
|
|
1537
|
-
if (!
|
|
1538
|
-
|
|
2256
|
+
if (!m || !w) {
|
|
2257
|
+
k([]);
|
|
1539
2258
|
return;
|
|
1540
2259
|
}
|
|
1541
|
-
let
|
|
1542
|
-
return
|
|
1543
|
-
var
|
|
1544
|
-
if (
|
|
1545
|
-
const
|
|
1546
|
-
|
|
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) : []);
|
|
1547
2266
|
}).catch(() => {
|
|
1548
|
-
|
|
2267
|
+
C || k([]);
|
|
1549
2268
|
}), () => {
|
|
1550
|
-
|
|
2269
|
+
C = !0;
|
|
1551
2270
|
};
|
|
1552
|
-
}, [
|
|
1553
|
-
|
|
1554
|
-
}, [
|
|
1555
|
-
/* @__PURE__ */
|
|
1556
|
-
/* @__PURE__ */
|
|
2271
|
+
}, [c, m, w]), X(() => {
|
|
2272
|
+
k([]);
|
|
2273
|
+
}, [m, w]), /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
2274
|
+
/* @__PURE__ */ l("div", { className: "mapui:grid mapui:grid-cols-2 mapui:gap-3", children: [
|
|
2275
|
+
/* @__PURE__ */ a(S, { label: "Layer ID", required: !0, children: /* @__PURE__ */ a(
|
|
1557
2276
|
"input",
|
|
1558
2277
|
{
|
|
1559
2278
|
type: "text",
|
|
1560
|
-
value:
|
|
1561
|
-
onChange: (
|
|
2279
|
+
value: e.id,
|
|
2280
|
+
onChange: (x) => n({ id: x.target.value }),
|
|
1562
2281
|
placeholder: "my-layer",
|
|
1563
|
-
className:
|
|
2282
|
+
className: V
|
|
1564
2283
|
}
|
|
1565
2284
|
) }),
|
|
1566
|
-
/* @__PURE__ */
|
|
2285
|
+
/* @__PURE__ */ a(S, { label: "Label", children: /* @__PURE__ */ a(
|
|
1567
2286
|
"input",
|
|
1568
2287
|
{
|
|
1569
2288
|
type: "text",
|
|
1570
|
-
value:
|
|
1571
|
-
onChange: (
|
|
2289
|
+
value: e.label,
|
|
2290
|
+
onChange: (x) => n({ label: x.target.value }),
|
|
1572
2291
|
placeholder: "My Layer",
|
|
1573
|
-
className:
|
|
2292
|
+
className: V
|
|
1574
2293
|
}
|
|
1575
2294
|
) })
|
|
1576
2295
|
] }),
|
|
1577
|
-
/* @__PURE__ */
|
|
2296
|
+
/* @__PURE__ */ a(S, { label: "Source", required: !0, children: /* @__PURE__ */ l(
|
|
1578
2297
|
"select",
|
|
1579
2298
|
{
|
|
1580
|
-
value:
|
|
1581
|
-
onChange: (
|
|
1582
|
-
className:
|
|
2299
|
+
value: e.sourceId,
|
|
2300
|
+
onChange: (x) => n({ sourceId: x.target.value }),
|
|
2301
|
+
className: V,
|
|
1583
2302
|
children: [
|
|
1584
|
-
/* @__PURE__ */
|
|
1585
|
-
|
|
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))
|
|
1586
2305
|
]
|
|
1587
2306
|
}
|
|
1588
2307
|
) }),
|
|
1589
|
-
/* @__PURE__ */
|
|
1590
|
-
|
|
2308
|
+
/* @__PURE__ */ l(S, { label: "Collection", required: !0, children: [
|
|
2309
|
+
d.length > 0 ? /* @__PURE__ */ l(
|
|
1591
2310
|
"select",
|
|
1592
2311
|
{
|
|
1593
|
-
value:
|
|
1594
|
-
onChange: (
|
|
1595
|
-
className:
|
|
2312
|
+
value: e.collection,
|
|
2313
|
+
onChange: (x) => n({ collection: x.target.value }),
|
|
2314
|
+
className: V,
|
|
1596
2315
|
children: [
|
|
1597
|
-
/* @__PURE__ */
|
|
1598
|
-
|
|
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))
|
|
1599
2318
|
]
|
|
1600
2319
|
}
|
|
1601
|
-
) : /* @__PURE__ */
|
|
2320
|
+
) : /* @__PURE__ */ a(
|
|
1602
2321
|
"input",
|
|
1603
2322
|
{
|
|
1604
2323
|
type: "text",
|
|
1605
|
-
value:
|
|
1606
|
-
onChange: (
|
|
1607
|
-
placeholder:
|
|
1608
|
-
className:
|
|
2324
|
+
value: e.collection,
|
|
2325
|
+
onChange: (x) => n({ collection: x.target.value }),
|
|
2326
|
+
placeholder: f ? "Loading collections…" : "collection-id",
|
|
2327
|
+
className: V
|
|
1609
2328
|
}
|
|
1610
2329
|
),
|
|
1611
|
-
|
|
2330
|
+
u && /* @__PURE__ */ a("span", { className: "mapui:mt-0.5 mapui:block mapui:text-xs mapui:text-gray-400", children: "Loading properties…" })
|
|
1612
2331
|
] }),
|
|
1613
|
-
/* @__PURE__ */
|
|
1614
|
-
/* @__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(
|
|
1615
2334
|
"input",
|
|
1616
2335
|
{
|
|
1617
2336
|
type: "radio",
|
|
1618
|
-
name: `data-mode-${
|
|
1619
|
-
value:
|
|
1620
|
-
checked:
|
|
1621
|
-
onChange: () =>
|
|
2337
|
+
name: `data-mode-${e.id}`,
|
|
2338
|
+
value: x,
|
|
2339
|
+
checked: e.dataMode === x,
|
|
2340
|
+
onChange: () => n({ dataMode: x }),
|
|
1622
2341
|
className: "mapui:accent-blue-600"
|
|
1623
2342
|
}
|
|
1624
2343
|
),
|
|
1625
|
-
/* @__PURE__ */
|
|
1626
|
-
] },
|
|
1627
|
-
/* @__PURE__ */
|
|
1628
|
-
/* @__PURE__ */
|
|
2344
|
+
/* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:text-gray-700", children: x })
|
|
2345
|
+
] }, x)) }) }),
|
|
2346
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
2347
|
+
/* @__PURE__ */ a(
|
|
1629
2348
|
"input",
|
|
1630
2349
|
{
|
|
1631
2350
|
type: "checkbox",
|
|
1632
2351
|
id: "layer-visible",
|
|
1633
|
-
checked:
|
|
1634
|
-
onChange: (
|
|
2352
|
+
checked: e.visible,
|
|
2353
|
+
onChange: (x) => n({ visible: x.target.checked }),
|
|
1635
2354
|
className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
|
|
1636
2355
|
}
|
|
1637
2356
|
),
|
|
1638
|
-
/* @__PURE__ */
|
|
2357
|
+
/* @__PURE__ */ a("label", { htmlFor: "layer-visible", className: "mapui:text-sm mapui:text-gray-700", children: "Visible by default" })
|
|
1639
2358
|
] }),
|
|
1640
|
-
/* @__PURE__ */
|
|
1641
|
-
|
|
2359
|
+
/* @__PURE__ */ a(_, { title: "Style", children: /* @__PURE__ */ a(
|
|
2360
|
+
xa,
|
|
1642
2361
|
{
|
|
1643
|
-
value:
|
|
1644
|
-
onChange: (
|
|
1645
|
-
|
|
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
|
|
1646
2368
|
}
|
|
1647
2369
|
) }),
|
|
1648
|
-
/* @__PURE__ */
|
|
1649
|
-
|
|
2370
|
+
/* @__PURE__ */ a(_, { title: "Legend", children: /* @__PURE__ */ a(
|
|
2371
|
+
va,
|
|
1650
2372
|
{
|
|
1651
|
-
value:
|
|
1652
|
-
onChange: (
|
|
2373
|
+
value: e.legend,
|
|
2374
|
+
onChange: (x) => n({ legend: x }),
|
|
2375
|
+
style: e.style
|
|
1653
2376
|
}
|
|
1654
2377
|
) }),
|
|
1655
|
-
/* @__PURE__ */
|
|
1656
|
-
|
|
2378
|
+
/* @__PURE__ */ a(_, { title: "Search Fields", children: /* @__PURE__ */ a(
|
|
2379
|
+
Sa,
|
|
1657
2380
|
{
|
|
1658
|
-
fields: ((
|
|
1659
|
-
onChange: (
|
|
1660
|
-
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
|
|
1661
2384
|
}
|
|
1662
2385
|
) }),
|
|
1663
|
-
/* @__PURE__ */
|
|
1664
|
-
|
|
2386
|
+
/* @__PURE__ */ a(_, { title: "Property Display", children: /* @__PURE__ */ a(
|
|
2387
|
+
La,
|
|
1665
2388
|
{
|
|
1666
|
-
value:
|
|
1667
|
-
onChange: (
|
|
1668
|
-
availableProperties:
|
|
2389
|
+
value: e.propertyDisplay ?? {},
|
|
2390
|
+
onChange: (x) => n({ propertyDisplay: Object.keys(x).length > 0 ? x : void 0 }),
|
|
2391
|
+
availableProperties: s
|
|
1669
2392
|
}
|
|
1670
2393
|
) })
|
|
1671
2394
|
] });
|
|
1672
2395
|
}
|
|
1673
|
-
const
|
|
2396
|
+
const ne = () => ({
|
|
1674
2397
|
id: "",
|
|
1675
2398
|
sourceId: "",
|
|
1676
2399
|
collection: "",
|
|
@@ -1678,99 +2401,99 @@ const W = () => ({
|
|
|
1678
2401
|
visible: !0,
|
|
1679
2402
|
dataMode: "vector-tiles"
|
|
1680
2403
|
});
|
|
1681
|
-
function
|
|
1682
|
-
const [
|
|
1683
|
-
|
|
1684
|
-
},
|
|
1685
|
-
|
|
1686
|
-
},
|
|
1687
|
-
|
|
1688
|
-
},
|
|
1689
|
-
if (
|
|
1690
|
-
const
|
|
1691
|
-
[
|
|
1692
|
-
},
|
|
1693
|
-
if (
|
|
1694
|
-
const
|
|
1695
|
-
[
|
|
1696
|
-
},
|
|
1697
|
-
|
|
1698
|
-
},
|
|
1699
|
-
|
|
1700
|
-
},
|
|
1701
|
-
|
|
1702
|
-
},
|
|
1703
|
-
|
|
1704
|
-
const
|
|
1705
|
-
if (
|
|
1706
|
-
const
|
|
1707
|
-
if (
|
|
1708
|
-
const
|
|
1709
|
-
|
|
1710
|
-
},
|
|
1711
|
-
|
|
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);
|
|
1712
2435
|
};
|
|
1713
|
-
return /* @__PURE__ */
|
|
1714
|
-
/* @__PURE__ */
|
|
1715
|
-
/* @__PURE__ */
|
|
1716
|
-
/* @__PURE__ */
|
|
2436
|
+
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
2437
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between", children: [
|
|
2438
|
+
/* @__PURE__ */ a("h3", { className: "mapui:m-0 mapui:text-sm mapui:font-semibold mapui:text-gray-700", children: "Layers" }),
|
|
2439
|
+
/* @__PURE__ */ a(
|
|
1717
2440
|
"button",
|
|
1718
2441
|
{
|
|
1719
2442
|
type: "button",
|
|
1720
2443
|
onClick: () => {
|
|
1721
|
-
|
|
2444
|
+
b(!0), w(ne());
|
|
1722
2445
|
},
|
|
1723
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",
|
|
1724
2447
|
children: "+ Add Layer"
|
|
1725
2448
|
}
|
|
1726
2449
|
)
|
|
1727
2450
|
] }),
|
|
1728
|
-
|
|
1729
|
-
/* @__PURE__ */
|
|
1730
|
-
var
|
|
1731
|
-
const
|
|
1732
|
-
return /* @__PURE__ */
|
|
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;
|
|
2455
|
+
return /* @__PURE__ */ l(
|
|
1733
2456
|
"li",
|
|
1734
2457
|
{
|
|
1735
|
-
draggable: !
|
|
1736
|
-
onDragStart:
|
|
1737
|
-
onDragOver: (
|
|
1738
|
-
onDragLeave:
|
|
1739
|
-
onDrop: (
|
|
1740
|
-
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,
|
|
1741
2464
|
className: [
|
|
1742
2465
|
"mapui:rounded-lg mapui:border mapui:bg-white mapui:transition-colors",
|
|
1743
|
-
|
|
1744
|
-
|
|
2466
|
+
q ? "mapui:border-blue-400 mapui:bg-blue-50" : "mapui:border-gray-200",
|
|
2467
|
+
O ? "mapui:opacity-50" : "mapui:opacity-100"
|
|
1745
2468
|
].join(" "),
|
|
1746
2469
|
children: [
|
|
1747
|
-
/* @__PURE__ */
|
|
1748
|
-
/* @__PURE__ */
|
|
1749
|
-
/* @__PURE__ */
|
|
1750
|
-
/* @__PURE__ */
|
|
2470
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between mapui:gap-2 mapui:px-3 mapui:py-2", children: [
|
|
2471
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:min-w-0 mapui:items-center mapui:gap-2", children: [
|
|
2472
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:shrink-0 mapui:flex-col mapui:gap-0.5", children: [
|
|
2473
|
+
/* @__PURE__ */ a(
|
|
1751
2474
|
"button",
|
|
1752
2475
|
{
|
|
1753
2476
|
type: "button",
|
|
1754
|
-
onClick: () =>
|
|
1755
|
-
disabled:
|
|
2477
|
+
onClick: () => $(N),
|
|
2478
|
+
disabled: N === 0,
|
|
1756
2479
|
"aria-label": "Move layer up",
|
|
1757
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",
|
|
1758
2481
|
children: "▲"
|
|
1759
2482
|
}
|
|
1760
2483
|
),
|
|
1761
|
-
/* @__PURE__ */
|
|
2484
|
+
/* @__PURE__ */ a(
|
|
1762
2485
|
"button",
|
|
1763
2486
|
{
|
|
1764
2487
|
type: "button",
|
|
1765
|
-
onClick: () =>
|
|
1766
|
-
disabled:
|
|
2488
|
+
onClick: () => C(N),
|
|
2489
|
+
disabled: N === e.length - 1,
|
|
1767
2490
|
"aria-label": "Move layer down",
|
|
1768
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",
|
|
1769
2492
|
children: "▼"
|
|
1770
2493
|
}
|
|
1771
2494
|
)
|
|
1772
2495
|
] }),
|
|
1773
|
-
/* @__PURE__ */
|
|
2496
|
+
/* @__PURE__ */ a(
|
|
1774
2497
|
"span",
|
|
1775
2498
|
{
|
|
1776
2499
|
className: "mapui:shrink-0 mapui:cursor-grab mapui:text-gray-400 active:mapui:cursor-grabbing",
|
|
@@ -1778,151 +2501,153 @@ function la({ layers: a, onChange: i, availableSources: t }) {
|
|
|
1778
2501
|
children: "⠿"
|
|
1779
2502
|
}
|
|
1780
2503
|
),
|
|
1781
|
-
/* @__PURE__ */
|
|
1782
|
-
/* @__PURE__ */
|
|
1783
|
-
/* @__PURE__ */
|
|
1784
|
-
/* @__PURE__ */
|
|
1785
|
-
/* @__PURE__ */
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
(((
|
|
1789
|
-
|
|
2504
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:min-w-0 mapui:flex-col mapui:gap-0.5", children: [
|
|
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 }),
|
|
2507
|
+
/* @__PURE__ */ l("div", { className: "mapui:mt-1 mapui:flex mapui:flex-wrap mapui:gap-1", children: [
|
|
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,
|
|
1790
2513
|
" search fields"
|
|
1791
2514
|
] }),
|
|
1792
|
-
(((
|
|
1793
|
-
|
|
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,
|
|
1794
2517
|
" legend entries"
|
|
1795
2518
|
] })
|
|
1796
2519
|
] })
|
|
1797
2520
|
] })
|
|
1798
2521
|
] }),
|
|
1799
|
-
/* @__PURE__ */
|
|
1800
|
-
/* @__PURE__ */
|
|
2522
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:shrink-0 mapui:gap-1", children: [
|
|
2523
|
+
/* @__PURE__ */ a(
|
|
1801
2524
|
"button",
|
|
1802
2525
|
{
|
|
1803
2526
|
type: "button",
|
|
1804
|
-
onClick: () => n
|
|
2527
|
+
onClick: () => o(n === g.id ? null : g.id),
|
|
1805
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",
|
|
1806
|
-
children:
|
|
2529
|
+
children: n === g.id ? "Close" : "Edit"
|
|
1807
2530
|
}
|
|
1808
2531
|
),
|
|
1809
|
-
/* @__PURE__ */
|
|
2532
|
+
/* @__PURE__ */ a(
|
|
1810
2533
|
"button",
|
|
1811
2534
|
{
|
|
1812
2535
|
type: "button",
|
|
1813
|
-
onClick: () =>
|
|
2536
|
+
onClick: () => f(g.id),
|
|
1814
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",
|
|
1815
2538
|
children: "Remove"
|
|
1816
2539
|
}
|
|
1817
2540
|
)
|
|
1818
2541
|
] })
|
|
1819
2542
|
] }),
|
|
1820
|
-
|
|
1821
|
-
|
|
2543
|
+
n === g.id && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(
|
|
2544
|
+
Te,
|
|
1822
2545
|
{
|
|
1823
|
-
value:
|
|
1824
|
-
onChange:
|
|
1825
|
-
availableSources:
|
|
2546
|
+
value: g,
|
|
2547
|
+
onChange: D,
|
|
2548
|
+
availableSources: i,
|
|
2549
|
+
availableIcons: r
|
|
1826
2550
|
}
|
|
1827
2551
|
) })
|
|
1828
2552
|
]
|
|
1829
2553
|
},
|
|
1830
|
-
|
|
2554
|
+
g.id
|
|
1831
2555
|
);
|
|
1832
2556
|
}) }),
|
|
1833
|
-
|
|
1834
|
-
/* @__PURE__ */
|
|
1835
|
-
/* @__PURE__ */
|
|
1836
|
-
|
|
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,
|
|
1837
2561
|
{
|
|
1838
|
-
value:
|
|
1839
|
-
onChange:
|
|
1840
|
-
availableSources:
|
|
2562
|
+
value: m,
|
|
2563
|
+
onChange: w,
|
|
2564
|
+
availableSources: i,
|
|
2565
|
+
availableIcons: r
|
|
1841
2566
|
}
|
|
1842
2567
|
),
|
|
1843
|
-
/* @__PURE__ */
|
|
1844
|
-
/* @__PURE__ */
|
|
2568
|
+
/* @__PURE__ */ l("div", { className: "mapui:mt-3 mapui:flex mapui:gap-2", children: [
|
|
2569
|
+
/* @__PURE__ */ a(
|
|
1845
2570
|
"button",
|
|
1846
2571
|
{
|
|
1847
2572
|
type: "button",
|
|
1848
|
-
onClick:
|
|
1849
|
-
disabled: !
|
|
2573
|
+
onClick: k,
|
|
2574
|
+
disabled: !m.id || !m.sourceId || !m.collection,
|
|
1850
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",
|
|
1851
2576
|
children: "Save"
|
|
1852
2577
|
}
|
|
1853
2578
|
),
|
|
1854
|
-
/* @__PURE__ */
|
|
2579
|
+
/* @__PURE__ */ a(
|
|
1855
2580
|
"button",
|
|
1856
2581
|
{
|
|
1857
2582
|
type: "button",
|
|
1858
|
-
onClick: () =>
|
|
2583
|
+
onClick: () => b(!1),
|
|
1859
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",
|
|
1860
2585
|
children: "Cancel"
|
|
1861
2586
|
}
|
|
1862
2587
|
)
|
|
1863
2588
|
] })
|
|
1864
2589
|
] }),
|
|
1865
|
-
/* @__PURE__ */
|
|
1866
|
-
|
|
2590
|
+
/* @__PURE__ */ a(
|
|
2591
|
+
Z,
|
|
1867
2592
|
{
|
|
1868
|
-
open:
|
|
2593
|
+
open: d !== null,
|
|
1869
2594
|
title: "Remove Layer",
|
|
1870
2595
|
description: "Are you sure you want to remove this layer from the configuration?",
|
|
1871
|
-
onConfirm: () =>
|
|
1872
|
-
onCancel: () =>
|
|
2596
|
+
onConfirm: () => d && x(d),
|
|
2597
|
+
onCancel: () => f(null)
|
|
1873
2598
|
}
|
|
1874
2599
|
)
|
|
1875
2600
|
] });
|
|
1876
2601
|
}
|
|
1877
|
-
const
|
|
1878
|
-
function
|
|
1879
|
-
const
|
|
1880
|
-
return /* @__PURE__ */
|
|
1881
|
-
/* @__PURE__ */
|
|
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 });
|
|
2605
|
+
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
2606
|
+
/* @__PURE__ */ a(S, { label: "ID", required: !0, children: /* @__PURE__ */ a(
|
|
1882
2607
|
"input",
|
|
1883
2608
|
{
|
|
1884
2609
|
type: "text",
|
|
1885
|
-
value:
|
|
1886
|
-
onChange: (
|
|
2610
|
+
value: e.id,
|
|
2611
|
+
onChange: (r) => i({ id: r.target.value }),
|
|
1887
2612
|
placeholder: "osm",
|
|
1888
|
-
className:
|
|
2613
|
+
className: Q
|
|
1889
2614
|
}
|
|
1890
2615
|
) }),
|
|
1891
|
-
/* @__PURE__ */
|
|
2616
|
+
/* @__PURE__ */ a(S, { label: "Label", children: /* @__PURE__ */ a(
|
|
1892
2617
|
"input",
|
|
1893
2618
|
{
|
|
1894
2619
|
type: "text",
|
|
1895
|
-
value:
|
|
1896
|
-
onChange: (
|
|
2620
|
+
value: e.label,
|
|
2621
|
+
onChange: (r) => i({ label: r.target.value }),
|
|
1897
2622
|
placeholder: "OpenStreetMap",
|
|
1898
|
-
className:
|
|
2623
|
+
className: Q
|
|
1899
2624
|
}
|
|
1900
2625
|
) }),
|
|
1901
|
-
/* @__PURE__ */
|
|
2626
|
+
/* @__PURE__ */ a(S, { label: "Style URL", required: !0, children: /* @__PURE__ */ a(
|
|
1902
2627
|
"input",
|
|
1903
2628
|
{
|
|
1904
2629
|
type: "url",
|
|
1905
|
-
value:
|
|
1906
|
-
onChange: (
|
|
2630
|
+
value: e.url,
|
|
2631
|
+
onChange: (r) => i({ url: r.target.value }),
|
|
1907
2632
|
placeholder: "https://example.com/style.json",
|
|
1908
|
-
className:
|
|
2633
|
+
className: Q
|
|
1909
2634
|
}
|
|
1910
2635
|
) }),
|
|
1911
|
-
/* @__PURE__ */
|
|
1912
|
-
/* @__PURE__ */
|
|
2636
|
+
/* @__PURE__ */ l(S, { label: "Thumbnail URL (optional)", children: [
|
|
2637
|
+
/* @__PURE__ */ a(
|
|
1913
2638
|
"input",
|
|
1914
2639
|
{
|
|
1915
2640
|
type: "url",
|
|
1916
|
-
value:
|
|
1917
|
-
onChange: (
|
|
2641
|
+
value: e.thumbnail ?? "",
|
|
2642
|
+
onChange: (r) => i({ thumbnail: r.target.value || void 0 }),
|
|
1918
2643
|
placeholder: "https://example.com/thumbnail.png",
|
|
1919
|
-
className:
|
|
2644
|
+
className: Q
|
|
1920
2645
|
}
|
|
1921
2646
|
),
|
|
1922
|
-
|
|
2647
|
+
e.thumbnail && /* @__PURE__ */ a(
|
|
1923
2648
|
"img",
|
|
1924
2649
|
{
|
|
1925
|
-
src:
|
|
2650
|
+
src: e.thumbnail,
|
|
1926
2651
|
alt: "Thumbnail preview",
|
|
1927
2652
|
className: "mapui:mt-1 mapui:h-16 mapui:w-24 mapui:rounded mapui:border mapui:border-gray-200 mapui:object-cover"
|
|
1928
2653
|
}
|
|
@@ -1930,113 +2655,253 @@ function oe({ value: a, onChange: i }) {
|
|
|
1930
2655
|
] })
|
|
1931
2656
|
] });
|
|
1932
2657
|
}
|
|
1933
|
-
const
|
|
1934
|
-
function
|
|
1935
|
-
const [
|
|
1936
|
-
|
|
1937
|
-
},
|
|
1938
|
-
|
|
1939
|
-
},
|
|
1940
|
-
|
|
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);
|
|
1941
2666
|
};
|
|
1942
|
-
return /* @__PURE__ */
|
|
1943
|
-
/* @__PURE__ */
|
|
1944
|
-
/* @__PURE__ */
|
|
1945
|
-
/* @__PURE__ */
|
|
2667
|
+
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
2668
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between", children: [
|
|
2669
|
+
/* @__PURE__ */ a("h3", { className: "mapui:m-0 mapui:text-sm mapui:font-semibold mapui:text-gray-700", children: "Basemaps" }),
|
|
2670
|
+
/* @__PURE__ */ a(
|
|
1946
2671
|
"button",
|
|
1947
2672
|
{
|
|
1948
2673
|
type: "button",
|
|
1949
2674
|
onClick: () => {
|
|
1950
|
-
|
|
2675
|
+
o(!0), b(pe());
|
|
1951
2676
|
},
|
|
1952
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",
|
|
1953
2678
|
children: "+ Add Basemap"
|
|
1954
2679
|
}
|
|
1955
2680
|
)
|
|
1956
2681
|
] }),
|
|
1957
|
-
|
|
1958
|
-
/* @__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(
|
|
1959
2684
|
"li",
|
|
1960
2685
|
{
|
|
1961
2686
|
className: "mapui:rounded-lg mapui:border mapui:border-gray-200 mapui:bg-white",
|
|
1962
2687
|
children: [
|
|
1963
|
-
/* @__PURE__ */
|
|
1964
|
-
|
|
2688
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-3 mapui:px-3 mapui:py-2", children: [
|
|
2689
|
+
u.thumbnail && /* @__PURE__ */ a(
|
|
1965
2690
|
"img",
|
|
1966
2691
|
{
|
|
1967
|
-
src:
|
|
2692
|
+
src: u.thumbnail,
|
|
1968
2693
|
alt: "",
|
|
1969
2694
|
className: "mapui:h-10 mapui:w-14 mapui:shrink-0 mapui:rounded mapui:object-cover"
|
|
1970
2695
|
}
|
|
1971
2696
|
),
|
|
1972
|
-
/* @__PURE__ */
|
|
1973
|
-
/* @__PURE__ */
|
|
1974
|
-
/* @__PURE__ */
|
|
2697
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex-1 mapui:overflow-hidden", children: [
|
|
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 })
|
|
1975
2700
|
] }),
|
|
1976
|
-
/* @__PURE__ */
|
|
1977
|
-
/* @__PURE__ */
|
|
2701
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:shrink-0 mapui:gap-1", children: [
|
|
2702
|
+
/* @__PURE__ */ a(
|
|
1978
2703
|
"button",
|
|
1979
2704
|
{
|
|
1980
2705
|
type: "button",
|
|
1981
|
-
onClick: () =>
|
|
2706
|
+
onClick: () => r(i === u.id ? null : u.id),
|
|
1982
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",
|
|
1983
|
-
children:
|
|
2708
|
+
children: i === u.id ? "Close" : "Edit"
|
|
1984
2709
|
}
|
|
1985
2710
|
),
|
|
1986
|
-
/* @__PURE__ */
|
|
2711
|
+
/* @__PURE__ */ a(
|
|
1987
2712
|
"button",
|
|
1988
2713
|
{
|
|
1989
2714
|
type: "button",
|
|
1990
|
-
onClick: () =>
|
|
2715
|
+
onClick: () => w(u.id),
|
|
1991
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",
|
|
1992
2717
|
children: "Remove"
|
|
1993
2718
|
}
|
|
1994
2719
|
)
|
|
1995
2720
|
] })
|
|
1996
2721
|
] }),
|
|
1997
|
-
|
|
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 }) })
|
|
1998
2723
|
]
|
|
1999
2724
|
},
|
|
2000
|
-
|
|
2725
|
+
u.id
|
|
2001
2726
|
)) }),
|
|
2002
|
-
n && /* @__PURE__ */
|
|
2003
|
-
/* @__PURE__ */
|
|
2004
|
-
/* @__PURE__ */
|
|
2005
|
-
/* @__PURE__ */
|
|
2006
|
-
/* @__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 }),
|
|
2730
|
+
/* @__PURE__ */ l("div", { className: "mapui:mt-3 mapui:flex mapui:gap-2", children: [
|
|
2731
|
+
/* @__PURE__ */ a(
|
|
2007
2732
|
"button",
|
|
2008
2733
|
{
|
|
2009
2734
|
type: "button",
|
|
2010
|
-
onClick:
|
|
2735
|
+
onClick: f,
|
|
2011
2736
|
disabled: !p.id || !p.url,
|
|
2012
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",
|
|
2013
2738
|
children: "Save"
|
|
2014
2739
|
}
|
|
2015
2740
|
),
|
|
2016
|
-
/* @__PURE__ */
|
|
2741
|
+
/* @__PURE__ */ a(
|
|
2017
2742
|
"button",
|
|
2018
2743
|
{
|
|
2019
2744
|
type: "button",
|
|
2020
|
-
onClick: () =>
|
|
2745
|
+
onClick: () => o(!1),
|
|
2021
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",
|
|
2022
2747
|
children: "Cancel"
|
|
2023
2748
|
}
|
|
2024
2749
|
)
|
|
2025
2750
|
] })
|
|
2026
2751
|
] }),
|
|
2027
|
-
/* @__PURE__ */
|
|
2028
|
-
|
|
2752
|
+
/* @__PURE__ */ a(
|
|
2753
|
+
Z,
|
|
2029
2754
|
{
|
|
2030
|
-
open:
|
|
2755
|
+
open: m !== null,
|
|
2031
2756
|
title: "Remove Basemap",
|
|
2032
2757
|
description: "Are you sure you want to remove this basemap from the configuration?",
|
|
2033
|
-
onConfirm: () =>
|
|
2034
|
-
onCancel: () =>
|
|
2758
|
+
onConfirm: () => m && c(m),
|
|
2759
|
+
onCancel: () => w(null)
|
|
2760
|
+
}
|
|
2761
|
+
)
|
|
2762
|
+
] });
|
|
2763
|
+
}
|
|
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 });
|
|
2767
|
+
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
2768
|
+
/* @__PURE__ */ a(S, { label: "ID", required: !0, children: /* @__PURE__ */ a(
|
|
2769
|
+
"input",
|
|
2770
|
+
{
|
|
2771
|
+
type: "text",
|
|
2772
|
+
value: e.id,
|
|
2773
|
+
onChange: (r) => i({ id: r.target.value }),
|
|
2774
|
+
placeholder: "my-sprites",
|
|
2775
|
+
className: Ie
|
|
2776
|
+
}
|
|
2777
|
+
) }),
|
|
2778
|
+
/* @__PURE__ */ l(S, { label: "Sprite URL", required: !0, children: [
|
|
2779
|
+
/* @__PURE__ */ a(
|
|
2780
|
+
"input",
|
|
2781
|
+
{
|
|
2782
|
+
type: "url",
|
|
2783
|
+
value: e.url,
|
|
2784
|
+
onChange: (r) => i({ url: r.target.value }),
|
|
2785
|
+
placeholder: "https://example.com/sprites/sprite",
|
|
2786
|
+
className: Ie
|
|
2787
|
+
}
|
|
2788
|
+
),
|
|
2789
|
+
/* @__PURE__ */ l("p", { className: "mapui:mt-1 mapui:text-xs mapui:text-gray-400", children: [
|
|
2790
|
+
"Base URL without extension. MapLibre will append ",
|
|
2791
|
+
/* @__PURE__ */ a("code", { children: ".json" }),
|
|
2792
|
+
" and ",
|
|
2793
|
+
/* @__PURE__ */ a("code", { children: ".png" }),
|
|
2794
|
+
"."
|
|
2795
|
+
] })
|
|
2796
|
+
] })
|
|
2797
|
+
] });
|
|
2798
|
+
}
|
|
2799
|
+
const oe = () => ({ id: "", url: "" }), Pa = (e) => {
|
|
2800
|
+
try {
|
|
2801
|
+
return new URL(e), !0;
|
|
2802
|
+
} catch {
|
|
2803
|
+
return !1;
|
|
2804
|
+
}
|
|
2805
|
+
};
|
|
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);
|
|
2814
|
+
};
|
|
2815
|
+
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
2816
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between", children: [
|
|
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(
|
|
2819
|
+
"button",
|
|
2820
|
+
{
|
|
2821
|
+
type: "button",
|
|
2822
|
+
onClick: () => {
|
|
2823
|
+
o(!0), b(oe());
|
|
2824
|
+
},
|
|
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",
|
|
2826
|
+
children: "+ Add Sprite Sheet"
|
|
2827
|
+
}
|
|
2828
|
+
)
|
|
2829
|
+
] }),
|
|
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(
|
|
2832
|
+
"li",
|
|
2833
|
+
{
|
|
2834
|
+
className: "mapui:rounded-lg mapui:border mapui:border-gray-200 mapui:bg-white",
|
|
2835
|
+
children: [
|
|
2836
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-3 mapui:px-3 mapui:py-2", children: [
|
|
2837
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex-1 mapui:overflow-hidden", children: [
|
|
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 })
|
|
2840
|
+
] }),
|
|
2841
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:shrink-0 mapui:gap-1", children: [
|
|
2842
|
+
/* @__PURE__ */ a(
|
|
2843
|
+
"button",
|
|
2844
|
+
{
|
|
2845
|
+
type: "button",
|
|
2846
|
+
onClick: () => r(i === s ? null : s),
|
|
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",
|
|
2848
|
+
children: i === s ? "Close" : "Edit"
|
|
2849
|
+
}
|
|
2850
|
+
),
|
|
2851
|
+
/* @__PURE__ */ a(
|
|
2852
|
+
"button",
|
|
2853
|
+
{
|
|
2854
|
+
type: "button",
|
|
2855
|
+
onClick: () => w(u.id),
|
|
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",
|
|
2857
|
+
children: "Remove"
|
|
2858
|
+
}
|
|
2859
|
+
)
|
|
2860
|
+
] })
|
|
2861
|
+
] }),
|
|
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 }) })
|
|
2863
|
+
]
|
|
2864
|
+
},
|
|
2865
|
+
s
|
|
2866
|
+
)) }),
|
|
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 }),
|
|
2870
|
+
/* @__PURE__ */ l("div", { className: "mapui:mt-3 mapui:flex mapui:gap-2", children: [
|
|
2871
|
+
/* @__PURE__ */ a(
|
|
2872
|
+
"button",
|
|
2873
|
+
{
|
|
2874
|
+
type: "button",
|
|
2875
|
+
onClick: f,
|
|
2876
|
+
disabled: !p.id || !p.url || !Pa(p.url) || e.some((u) => u.id === p.id),
|
|
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",
|
|
2878
|
+
children: "Save"
|
|
2879
|
+
}
|
|
2880
|
+
),
|
|
2881
|
+
/* @__PURE__ */ a(
|
|
2882
|
+
"button",
|
|
2883
|
+
{
|
|
2884
|
+
type: "button",
|
|
2885
|
+
onClick: () => o(!1),
|
|
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",
|
|
2887
|
+
children: "Cancel"
|
|
2888
|
+
}
|
|
2889
|
+
)
|
|
2890
|
+
] })
|
|
2891
|
+
] }),
|
|
2892
|
+
/* @__PURE__ */ a(
|
|
2893
|
+
Z,
|
|
2894
|
+
{
|
|
2895
|
+
open: m !== null,
|
|
2896
|
+
title: "Remove Sprite Sheet",
|
|
2897
|
+
description: "Are you sure you want to remove this sprite sheet from the configuration?",
|
|
2898
|
+
onConfirm: () => m && c(m),
|
|
2899
|
+
onCancel: () => w(null)
|
|
2035
2900
|
}
|
|
2036
2901
|
)
|
|
2037
2902
|
] });
|
|
2038
2903
|
}
|
|
2039
|
-
const
|
|
2904
|
+
const Fa = [
|
|
2040
2905
|
{ key: "showLayerPanel", label: "Layer Panel", description: "Toggle layer visibility" },
|
|
2041
2906
|
{ key: "showLegend", label: "Legend", description: "Map legend" },
|
|
2042
2907
|
{ key: "showBasemapSwitcher", label: "Basemap Switcher", description: "Switch basemap styles" },
|
|
@@ -2044,44 +2909,45 @@ const Je = [
|
|
|
2044
2909
|
{ key: "showCoordinateDisplay", label: "Coordinate Display", description: "Show cursor coordinates" },
|
|
2045
2910
|
{ key: "showFeatureDetail", label: "Feature Detail Panel", description: "Inspect feature properties" },
|
|
2046
2911
|
{ key: "showFeatureTooltip", label: "Feature Tooltip", description: "Hover tooltip on features" },
|
|
2047
|
-
{ 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" }
|
|
2048
2914
|
];
|
|
2049
|
-
function
|
|
2050
|
-
const
|
|
2051
|
-
|
|
2915
|
+
function Ha({ value: e, onChange: t }) {
|
|
2916
|
+
const i = (r, n) => {
|
|
2917
|
+
t({ ...e, [r]: n });
|
|
2052
2918
|
};
|
|
2053
|
-
return /* @__PURE__ */
|
|
2054
|
-
/* @__PURE__ */
|
|
2055
|
-
/* @__PURE__ */
|
|
2056
|
-
const p =
|
|
2057
|
-
return /* @__PURE__ */
|
|
2919
|
+
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-1", children: [
|
|
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];
|
|
2923
|
+
return /* @__PURE__ */ l(
|
|
2058
2924
|
"label",
|
|
2059
2925
|
{
|
|
2060
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",
|
|
2061
2927
|
children: [
|
|
2062
|
-
/* @__PURE__ */
|
|
2063
|
-
/* @__PURE__ */
|
|
2064
|
-
/* @__PURE__ */
|
|
2928
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-0.5", children: [
|
|
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 })
|
|
2065
2931
|
] }),
|
|
2066
|
-
/* @__PURE__ */
|
|
2067
|
-
/* @__PURE__ */
|
|
2932
|
+
/* @__PURE__ */ l("div", { className: "mapui:relative mapui:flex mapui:shrink-0 mapui:items-center", children: [
|
|
2933
|
+
/* @__PURE__ */ a(
|
|
2068
2934
|
"input",
|
|
2069
2935
|
{
|
|
2070
2936
|
type: "checkbox",
|
|
2071
2937
|
checked: p,
|
|
2072
|
-
onChange: (
|
|
2938
|
+
onChange: (b) => i(r, b.target.checked),
|
|
2073
2939
|
className: "mapui:sr-only",
|
|
2074
2940
|
"aria-label": n
|
|
2075
2941
|
}
|
|
2076
2942
|
),
|
|
2077
|
-
/* @__PURE__ */
|
|
2943
|
+
/* @__PURE__ */ a(
|
|
2078
2944
|
"div",
|
|
2079
2945
|
{
|
|
2080
2946
|
className: [
|
|
2081
2947
|
"mapui:relative mapui:h-5 mapui:w-9 mapui:rounded-full mapui:transition-colors",
|
|
2082
2948
|
p ? "mapui:bg-blue-600" : "mapui:bg-gray-300"
|
|
2083
2949
|
].join(" "),
|
|
2084
|
-
children: /* @__PURE__ */
|
|
2950
|
+
children: /* @__PURE__ */ a(
|
|
2085
2951
|
"div",
|
|
2086
2952
|
{
|
|
2087
2953
|
className: [
|
|
@@ -2095,185 +2961,204 @@ function pa({ value: a, onChange: i }) {
|
|
|
2095
2961
|
] })
|
|
2096
2962
|
]
|
|
2097
2963
|
},
|
|
2098
|
-
|
|
2964
|
+
r
|
|
2099
2965
|
);
|
|
2100
2966
|
}) })
|
|
2101
2967
|
] });
|
|
2102
2968
|
}
|
|
2103
|
-
const
|
|
2969
|
+
const Ge = [
|
|
2104
2970
|
{ key: "latitude", label: "Latitude", min: -90, max: 90, step: 1e-6, placeholder: "0" },
|
|
2105
2971
|
{ key: "longitude", label: "Longitude", min: -180, max: 180, step: 1e-6, placeholder: "0" },
|
|
2106
2972
|
{ key: "zoom", label: "Zoom", min: 0, max: 24, step: 0.1, placeholder: "2" },
|
|
2107
2973
|
{ key: "pitch", label: "Pitch (°)", min: 0, max: 85, step: 1, placeholder: "0" },
|
|
2108
2974
|
{ key: "bearing", label: "Bearing (°)", min: -180, max: 180, step: 1, placeholder: "0" }
|
|
2109
2975
|
];
|
|
2110
|
-
function
|
|
2111
|
-
const
|
|
2112
|
-
if (
|
|
2113
|
-
if (isNaN(
|
|
2114
|
-
if (
|
|
2115
|
-
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}`;
|
|
2116
2982
|
}
|
|
2117
2983
|
}
|
|
2118
|
-
const
|
|
2119
|
-
function
|
|
2120
|
-
const
|
|
2121
|
-
const
|
|
2122
|
-
|
|
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 });
|
|
2123
2989
|
};
|
|
2124
|
-
return /* @__PURE__ */
|
|
2125
|
-
const
|
|
2126
|
-
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(
|
|
2127
2993
|
"input",
|
|
2128
2994
|
{
|
|
2129
2995
|
type: "number",
|
|
2130
|
-
min:
|
|
2996
|
+
min: o,
|
|
2131
2997
|
max: p,
|
|
2132
|
-
step:
|
|
2133
|
-
value:
|
|
2134
|
-
placeholder:
|
|
2135
|
-
onChange: (d) =>
|
|
2136
|
-
className: `${
|
|
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" : ""}`
|
|
2137
3003
|
}
|
|
2138
|
-
) },
|
|
3004
|
+
) }, r);
|
|
2139
3005
|
}) });
|
|
2140
3006
|
}
|
|
2141
|
-
function
|
|
2142
|
-
const
|
|
2143
|
-
return /* @__PURE__ */
|
|
2144
|
-
/* @__PURE__ */
|
|
2145
|
-
/* @__PURE__ */
|
|
3007
|
+
function Ka({ config: e }) {
|
|
3008
|
+
const t = Xe(e);
|
|
3009
|
+
return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
|
|
3010
|
+
/* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
3011
|
+
/* @__PURE__ */ a(
|
|
2146
3012
|
"span",
|
|
2147
3013
|
{
|
|
2148
3014
|
className: [
|
|
2149
3015
|
"mapui:inline-flex mapui:items-center mapui:rounded-full mapui:px-2.5 mapui:py-0.5 mapui:text-xs mapui:font-semibold",
|
|
2150
|
-
|
|
3016
|
+
t.success ? "mapui:bg-green-100 mapui:text-green-800" : "mapui:bg-red-100 mapui:text-red-800"
|
|
2151
3017
|
].join(" "),
|
|
2152
|
-
children:
|
|
3018
|
+
children: t.success ? "Valid" : "Invalid"
|
|
2153
3019
|
}
|
|
2154
3020
|
),
|
|
2155
|
-
/* @__PURE__ */
|
|
3021
|
+
/* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-gray-500", children: "MapConfig validation" })
|
|
2156
3022
|
] }),
|
|
2157
|
-
!
|
|
2158
|
-
/* @__PURE__ */
|
|
2159
|
-
/* @__PURE__ */
|
|
2160
|
-
/* @__PURE__ */
|
|
2161
|
-
/* @__PURE__ */
|
|
2162
|
-
] },
|
|
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)) })
|
|
2163
3029
|
] }),
|
|
2164
|
-
/* @__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) }) })
|
|
2165
3031
|
] });
|
|
2166
3032
|
}
|
|
2167
3033
|
export {
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
We as
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
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
|
|
2279
3164
|
};
|