@m3ui-vue/m3ui-vue 1.2.2 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/API.md +2776 -351
- package/dist/MButton-CuNzpoxm.js +172 -0
- package/dist/MButton-CuNzpoxm.js.map +1 -0
- package/dist/MDialog-HxEL-m58.js +173 -0
- package/dist/MDialog-HxEL-m58.js.map +1 -0
- package/dist/MIconButton-DoNotQ9v.js +282 -0
- package/dist/MIconButton-DoNotQ9v.js.map +1 -0
- package/dist/MListItem-DnPtv-hY.js +824 -0
- package/dist/MListItem-DnPtv-hY.js.map +1 -0
- package/dist/MLoadingIndicator-BQMNX6Dx.js +115 -0
- package/dist/MLoadingIndicator-BQMNX6Dx.js.map +1 -0
- package/dist/MMenuItem-Bih0h4-n.js +604 -0
- package/dist/MMenuItem-Bih0h4-n.js.map +1 -0
- package/dist/MProgressBar-BCoruxA-.js +184 -0
- package/dist/MProgressBar-BCoruxA-.js.map +1 -0
- package/dist/MSeekBar-LURE1Ah7.js +435 -0
- package/dist/MSeekBar-LURE1Ah7.js.map +1 -0
- package/dist/MSegmentedButton-DL9JtJFX.js +65 -0
- package/dist/MSegmentedButton-DL9JtJFX.js.map +1 -0
- package/dist/MSlider-_J4IS2_z.js +691 -0
- package/dist/MSlider-_J4IS2_z.js.map +1 -0
- package/dist/MSpinner-BhkMYKOM.js +65 -0
- package/dist/MSpinner-BhkMYKOM.js.map +1 -0
- package/dist/MTextField-CkzwNBWS.js +296 -0
- package/dist/MTextField-CkzwNBWS.js.map +1 -0
- package/dist/MTooltip-B67ZDSGp.js +756 -0
- package/dist/MTooltip-B67ZDSGp.js.map +1 -0
- package/dist/_storageKeys-CYXsUBwK.js +18 -0
- package/dist/_storageKeys-CYXsUBwK.js.map +1 -0
- package/dist/_useEscapeStack-CjndQhqg.js +19 -0
- package/dist/_useEscapeStack-CjndQhqg.js.map +1 -0
- package/dist/api.json +1 -1
- package/dist/chart.js +1 -1
- package/dist/code-editor.js +1 -1
- package/dist/components/MAudioPlayer.vue.d.ts +115 -0
- package/dist/components/MBadge.vue.d.ts +1 -1
- package/dist/components/MBottomSheetScaffold.vue.d.ts +1 -1
- package/dist/components/MBox.vue.d.ts +1 -1
- package/dist/components/MButton.vue.d.ts +1 -1
- package/dist/components/MConfirmDialog.vue.d.ts +1 -1
- package/dist/components/MCopyButton.vue.d.ts +2 -2
- package/dist/components/MDataTable.vue.d.ts +2 -2
- package/dist/components/MDialog.vue.d.ts +2 -2
- package/dist/components/MDivider.vue.d.ts +1 -1
- package/dist/components/MDragHandle.vue.d.ts +1 -1
- package/dist/components/MDrawCanvas.vue.d.ts +148 -0
- package/dist/components/MDrawLayers.vue.d.ts +3 -0
- package/dist/components/MDrawToolbar.vue.d.ts +34 -0
- package/dist/components/MExportButton.vue.d.ts +1 -1
- package/dist/components/MFab.vue.d.ts +2 -2
- package/dist/components/MFabMenu.vue.d.ts +2 -2
- package/dist/components/MFixed.vue.d.ts +1 -1
- package/dist/components/MFlex.vue.d.ts +2 -2
- package/dist/components/MFloorPlan.vue.d.ts +160 -0
- package/dist/components/MFlow.vue.d.ts +305 -0
- package/dist/components/MFlowControls.vue.d.ts +33 -0
- package/dist/components/MFlowHandle.vue.d.ts +16 -0
- package/dist/components/MFlowMinimap.vue.d.ts +22 -0
- package/dist/components/MFlowNode.vue.d.ts +35 -0
- package/dist/components/MGantt.vue.d.ts +141 -0
- package/dist/components/MGanttControls.vue.d.ts +32 -0
- package/dist/components/MIconButton.vue.d.ts +3 -1
- package/dist/components/MImageCropper.vue.d.ts +110 -0
- package/dist/components/MInfiniteScroll.vue.d.ts +1 -1
- package/dist/components/MLightbox.vue.d.ts +2 -2
- package/dist/components/MList.vue.d.ts +1 -1
- package/dist/components/MLoadingOverlay.vue.d.ts +1 -1
- package/dist/components/MMapControl.vue.d.ts +1 -1
- package/dist/components/MMapSearch.vue.d.ts +1 -1
- package/dist/components/MMaskField.vue.d.ts +12 -1
- package/dist/components/MMenu.vue.d.ts +1 -1
- package/dist/components/MNavigationDrawer.vue.d.ts +1 -1
- package/dist/components/MNumberField.vue.d.ts +11 -2
- package/dist/components/MPdfViewer.vue.d.ts +174 -0
- package/dist/components/MPullToRefresh.vue.d.ts +1 -1
- package/dist/components/MResourceTimeline.vue.d.ts +149 -0
- package/dist/components/MScheduler.vue.d.ts +3 -3
- package/dist/components/MScheme.vue.d.ts +1 -1
- package/dist/components/MSearchField.vue.d.ts +1 -1
- package/dist/components/MSeekBar.vue.d.ts +1 -1
- package/dist/components/MSimpleCarousel.vue.d.ts +1 -1
- package/dist/components/MSkeleton.vue.d.ts +1 -1
- package/dist/components/MSlider.vue.d.ts +2 -2
- package/dist/components/MSparkline.vue.d.ts +1 -1
- package/dist/components/MSplitter.vue.d.ts +1 -1
- package/dist/components/MStack.vue.d.ts +2 -2
- package/dist/components/MSwipeToDismiss.vue.d.ts +1 -1
- package/dist/components/MSwitch.vue.d.ts +1 -1
- package/dist/components/MTable.vue.d.ts +1 -1
- package/dist/components/MTagInput.vue.d.ts +12 -1
- package/dist/components/MTextField.vue.d.ts +13 -2
- package/dist/components/MToolbar.vue.d.ts +1 -1
- package/dist/components/MTree.vue.d.ts +2 -2
- package/dist/components/MVideoPlayer.vue.d.ts +253 -0
- package/dist/components/MVirtualTable.vue.d.ts +1 -1
- package/dist/components/MWindow.vue.d.ts +3 -3
- package/dist/components/_MFlowEdge.vue.d.ts +9 -0
- package/dist/components/_MFlowEdgeLabel.vue.d.ts +9 -0
- package/dist/components/_MFlowNodeShell.vue.d.ts +9 -0
- package/dist/components/_MPdfPage.vue.d.ts +76 -0
- package/dist/components/_MTimeBackground.vue.d.ts +14 -0
- package/dist/components/_MTimeHeader.vue.d.ts +20 -0
- package/dist/composables/_flowPanel.d.ts +2 -0
- package/dist/composables/_flowSlot.d.ts +5 -0
- package/dist/composables/_ganttTime.d.ts +41 -0
- package/dist/composables/_useTimeAxis.d.ts +90 -0
- package/dist/composables/drawGeometry.d.ts +119 -0
- package/dist/composables/flowFormats.d.ts +79 -0
- package/dist/composables/flowLayout.d.ts +45 -0
- package/dist/composables/flowPaths.d.ts +53 -0
- package/dist/composables/ganttFormats.d.ts +52 -0
- package/dist/composables/ganttSchedule.d.ts +99 -0
- package/dist/composables/useDrawing.d.ts +44 -0
- package/dist/composables/useFlow.d.ts +266 -0
- package/dist/composables/useGantt.d.ts +87 -0
- package/dist/composables/useLocale.d.ts +163 -0
- package/dist/composables/useMediaPlayer.d.ts +101 -0
- package/dist/composables/usePdf.d.ts +119 -0
- package/dist/composables/useResourceTimeline.d.ts +70 -0
- package/dist/draw.d.ts +7 -0
- package/dist/draw.js +1700 -0
- package/dist/draw.js.map +1 -0
- package/dist/flow.d.ts +14 -0
- package/dist/flow.js +3542 -0
- package/dist/flow.js.map +1 -0
- package/dist/flowPaths-CUc6X373.js +161 -0
- package/dist/flowPaths-CUc6X373.js.map +1 -0
- package/dist/gantt.d.ts +12 -0
- package/dist/gantt.js +3575 -0
- package/dist/gantt.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/locales/index.js +1148 -7
- package/dist/locales/index.js.map +1 -1
- package/dist/m3ui-vue.css +1 -1
- package/dist/m3ui.js +7286 -7654
- package/dist/m3ui.js.map +1 -1
- package/dist/map.js +113 -108
- package/dist/map.js.map +1 -1
- package/dist/media.d.ts +5 -0
- package/dist/media.js +1311 -0
- package/dist/media.js.map +1 -0
- package/dist/pdf.d.ts +4 -0
- package/dist/pdf.js +1871 -0
- package/dist/pdf.js.map +1 -0
- package/dist/rich-text-editor.js +28 -26
- package/dist/rich-text-editor.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/{useLocale-JYxDDeXC.js → useLocale-BpGxplLV.js} +165 -2
- package/dist/useLocale-BpGxplLV.js.map +1 -0
- package/dist/{useThemeTokens-y0HZpyhL.js → useThemeTokens-DQQcaWbE.js} +40 -54
- package/dist/useThemeTokens-DQQcaWbE.js.map +1 -0
- package/package.json +29 -5
- package/src/__tests__/MAudioPlayer.test.ts +75 -0
- package/src/__tests__/MDrawCanvas.test.ts +110 -0
- package/src/__tests__/MFloorPlan.test.ts +97 -0
- package/src/__tests__/MFlow.test.ts +575 -0
- package/src/__tests__/MGantt.test.ts +130 -0
- package/src/__tests__/MImageCropper.test.ts +89 -0
- package/src/__tests__/MPdfViewer.test.ts +235 -0
- package/src/__tests__/MResourceTimeline.test.ts +102 -0
- package/src/__tests__/MVideoPlayer.test.ts +201 -0
- package/src/__tests__/drawGeometry.test.ts +58 -0
- package/src/__tests__/fieldExpose.test.ts +30 -0
- package/src/__tests__/flowFormats.test.ts +185 -0
- package/src/__tests__/flowLayout.test.ts +113 -0
- package/src/__tests__/ganttFormats.test.ts +76 -0
- package/src/__tests__/ganttSchedule.test.ts +136 -0
- package/src/__tests__/pdfMock.ts +83 -0
- package/src/__tests__/useMediaPlayer.test.ts +182 -0
- package/src/__tests__/usePdf.test.ts +102 -0
- package/src/components/MAudioPlayer.vue +319 -0
- package/src/components/MDrawCanvas.vue +813 -0
- package/src/components/MDrawLayers.vue +114 -0
- package/src/components/MDrawToolbar.vue +171 -0
- package/src/components/MFloorPlan.vue +581 -0
- package/src/components/MFlow.vue +2049 -0
- package/src/components/MFlowControls.vue +110 -0
- package/src/components/MFlowHandle.vue +60 -0
- package/src/components/MFlowMinimap.vue +134 -0
- package/src/components/MFlowNode.vue +98 -0
- package/src/components/MGantt.vue +1609 -0
- package/src/components/MGanttControls.vue +77 -0
- package/src/components/MIconButton.vue +3 -1
- package/src/components/MImageCropper.vue +507 -0
- package/src/components/MMaskField.vue +13 -0
- package/src/components/MNumberField.vue +13 -0
- package/src/components/MPdfViewer.vue +1269 -0
- package/src/components/MResourceTimeline.vue +1020 -0
- package/src/components/MTagInput.vue +13 -0
- package/src/components/MTextField.vue +16 -0
- package/src/components/MVideoPlayer.vue +839 -0
- package/src/components/_MFlowEdge.vue +100 -0
- package/src/components/_MFlowEdgeLabel.vue +56 -0
- package/src/components/_MFlowNodeShell.vue +111 -0
- package/src/components/_MPdfPage.vue +456 -0
- package/src/components/_MTimeBackground.vue +16 -0
- package/src/components/_MTimeHeader.vue +31 -0
- package/src/composables/_flowPanel.ts +13 -0
- package/src/composables/_flowSlot.ts +6 -0
- package/src/composables/_ganttTime.ts +200 -0
- package/src/composables/_useTimeAxis.ts +224 -0
- package/src/composables/drawGeometry.ts +405 -0
- package/src/composables/flowFormats.ts +916 -0
- package/src/composables/flowLayout.ts +297 -0
- package/src/composables/flowPaths.ts +239 -0
- package/src/composables/ganttFormats.ts +366 -0
- package/src/composables/ganttSchedule.ts +403 -0
- package/src/composables/useDrawing.ts +53 -0
- package/src/composables/useFlow.ts +250 -0
- package/src/composables/useGantt.ts +92 -0
- package/src/composables/useLocale.ts +328 -0
- package/src/composables/useMediaPlayer.ts +406 -0
- package/src/composables/usePdf.ts +456 -0
- package/src/composables/useResourceTimeline.ts +76 -0
- package/src/draw.ts +25 -0
- package/src/flow.ts +26 -0
- package/src/gantt.ts +12 -0
- package/src/index.ts +4 -0
- package/src/locales/de.ts +163 -0
- package/src/locales/es.ts +163 -0
- package/src/locales/fr.ts +163 -0
- package/src/locales/ja.ts +163 -0
- package/src/locales/ko.ts +163 -0
- package/src/locales/pt.ts +163 -0
- package/src/locales/zh.ts +163 -0
- package/src/media.ts +5 -0
- package/src/pdf.ts +15 -0
- package/dist/MMenuItem-D4Gx_l3F.js +0 -929
- package/dist/MMenuItem-D4Gx_l3F.js.map +0 -1
- package/dist/MSlider-Dx_S3vJ9.js +0 -1506
- package/dist/MSlider-Dx_S3vJ9.js.map +0 -1
- package/dist/MTextField-Bz8JIsnl.js +0 -633
- package/dist/MTextField-Bz8JIsnl.js.map +0 -1
- package/dist/useLocale-JYxDDeXC.js.map +0 -1
- package/dist/useThemeTokens-y0HZpyhL.js.map +0 -1
package/dist/map.js
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { i as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { t as e } from "./useThemeTokens-DQQcaWbE.js";
|
|
2
|
+
import { o as t } from "./_storageKeys-CYXsUBwK.js";
|
|
3
|
+
import { i as n } from "./useLocale-BpGxplLV.js";
|
|
4
|
+
import { d as r, f as i, l as a, t as o, u as s } from "./MIconButton-DoNotQ9v.js";
|
|
5
|
+
import { i as c } from "./motion-DZiXG09o.js";
|
|
6
|
+
import { t as l } from "./MIcon-Bxh9j135.js";
|
|
7
|
+
import { t as u } from "./MSpinner-BhkMYKOM.js";
|
|
8
|
+
import { t as d } from "./MTextField-CkzwNBWS.js";
|
|
9
|
+
import { t as f } from "./_useEscapeStack-CjndQhqg.js";
|
|
10
|
+
import { a as p, r as m, s as h, t as g } from "./MListItem-DnPtv-hY.js";
|
|
11
|
+
import { t as _ } from "./MSlider-_J4IS2_z.js";
|
|
7
12
|
import { Fragment as v, Transition as y, computed as b, createBlock as x, createCommentVNode as S, createElementBlock as C, createElementVNode as w, createSlots as T, createTextVNode as E, createVNode as D, defineComponent as O, getCurrentInstance as k, inject as A, markRaw as j, mergeProps as M, normalizeClass as N, normalizeStyle as P, onBeforeUnmount as F, onMounted as ee, onUnmounted as I, openBlock as L, provide as te, reactive as R, ref as z, renderList as B, renderSlot as V, shallowRef as H, toDisplayString as U, toValue as ne, unref as W, useId as re, useSlots as G, watch as K, withCtx as q, withModifiers as J } from "vue";
|
|
8
13
|
//#region src/composables/useMap.ts
|
|
9
14
|
var ie = Symbol("m3-map");
|
|
@@ -91,17 +96,17 @@ var oe = { class: "hidden" }, X = {
|
|
|
91
96
|
},
|
|
92
97
|
emits: ["update:expanded"],
|
|
93
98
|
setup(e, { emit: t }) {
|
|
94
|
-
let n = e, o = t,
|
|
99
|
+
let n = e, o = t, l = G(), u = z(), { onReady: d } = Y(), f = z(n.expanded);
|
|
95
100
|
K(() => n.expanded, (e) => {
|
|
96
101
|
f.value = e;
|
|
97
102
|
});
|
|
98
|
-
let p = b(() => f.value && !!
|
|
103
|
+
let p = b(() => f.value && !!l.panel);
|
|
99
104
|
function m(e) {
|
|
100
105
|
e !== f.value && (f.value = e, o("update:expanded", e));
|
|
101
106
|
}
|
|
102
107
|
let h = () => m(!f.value), g = () => m(!1);
|
|
103
108
|
function _(e) {
|
|
104
|
-
p.value && !
|
|
109
|
+
p.value && !u.value?.contains(e.target) && g();
|
|
105
110
|
}
|
|
106
111
|
function v(e) {
|
|
107
112
|
e.key === "Escape" && p.value && (g(), e.stopPropagation());
|
|
@@ -115,18 +120,18 @@ var oe = { class: "hidden" }, X = {
|
|
|
115
120
|
}, D = null;
|
|
116
121
|
function O() {
|
|
117
122
|
return {
|
|
118
|
-
w:
|
|
119
|
-
h:
|
|
123
|
+
w: u.value.offsetWidth,
|
|
124
|
+
h: u.value.offsetHeight
|
|
120
125
|
};
|
|
121
126
|
}
|
|
122
127
|
function k() {
|
|
123
|
-
let e =
|
|
128
|
+
let e = u.value;
|
|
124
129
|
if (!e || x) return;
|
|
125
130
|
let t = O();
|
|
126
|
-
y && (t.w !== y.w || t.h !== y.h) && n.animate && !
|
|
131
|
+
y && (t.w !== y.w || t.h !== y.h) && n.animate && !s() && A(e, y, t), y = t;
|
|
127
132
|
}
|
|
128
133
|
function A(e, t, n) {
|
|
129
|
-
if (T = t, E = n, S =
|
|
134
|
+
if (T = t, E = n, S = i(0, 1, 0, c.standard.defaultSpatial, .002), e.style.overflow = "hidden", x = a(e, S, (e) => ({
|
|
130
135
|
width: `${t.w + (n.w - t.w) * e}px`,
|
|
131
136
|
height: `${t.h + (n.h - t.h) * e}px`
|
|
132
137
|
})), !x) return j(e);
|
|
@@ -138,7 +143,7 @@ var oe = { class: "hidden" }, X = {
|
|
|
138
143
|
t.w !== E.w || t.h !== E.h ? (y = E, k()) : y = t;
|
|
139
144
|
}
|
|
140
145
|
function N() {
|
|
141
|
-
if (!
|
|
146
|
+
if (!u.value || !x) return;
|
|
142
147
|
let e = r(S, x.currentTime), t = {
|
|
143
148
|
w: T.w + (E.w - T.w) * e,
|
|
144
149
|
h: T.h + (E.h - T.h) * e
|
|
@@ -147,20 +152,20 @@ var oe = { class: "hidden" }, X = {
|
|
|
147
152
|
}
|
|
148
153
|
K(p, N, { flush: "post" });
|
|
149
154
|
let P, I = {
|
|
150
|
-
onAdd: () =>
|
|
151
|
-
onRemove: () =>
|
|
155
|
+
onAdd: () => u.value,
|
|
156
|
+
onRemove: () => u.value?.remove()
|
|
152
157
|
};
|
|
153
|
-
return
|
|
154
|
-
P = e,
|
|
158
|
+
return d((e) => {
|
|
159
|
+
P = e, u.value && e.addControl(I, n.position);
|
|
155
160
|
}), K(() => n.position, (e) => {
|
|
156
|
-
P &&
|
|
161
|
+
P && u.value && (P.removeControl(I), P.addControl(I, e));
|
|
157
162
|
}), ee(() => {
|
|
158
|
-
document.addEventListener("pointerdown", _, !0), !(typeof ResizeObserver > "u" || !
|
|
163
|
+
document.addEventListener("pointerdown", _, !0), !(typeof ResizeObserver > "u" || !u.value) && (D = new ResizeObserver(k), D.observe(u.value));
|
|
159
164
|
}), F(() => {
|
|
160
165
|
document.removeEventListener("pointerdown", _, !0), D?.disconnect(), x?.cancel(), P?.hasControl(I) && P.removeControl(I);
|
|
161
166
|
}), (t, n) => (L(), C("div", oe, [w("div", M({
|
|
162
167
|
ref_key: "el",
|
|
163
|
-
ref:
|
|
168
|
+
ref: u,
|
|
164
169
|
class: ["maplibregl-ctrl m3-map-control", p.value ? "m3-map-control-panel" : e.group ? "maplibregl-ctrl-group" : ""]
|
|
165
170
|
}, t.$attrs, { onKeydown: v }), [p.value ? (L(), C("div", X, [V(t.$slots, "panel", { close: g })])) : V(t.$slots, "default", {
|
|
166
171
|
expanded: f.value,
|
|
@@ -175,27 +180,27 @@ var oe = { class: "hidden" }, X = {
|
|
|
175
180
|
__name: "_MMapAttribution",
|
|
176
181
|
props: { position: {} },
|
|
177
182
|
setup(e) {
|
|
178
|
-
let t = e, r = n(), { on: i, onReady: a } = Y(), o = z([]), s = z(!0), c = z(0),
|
|
179
|
-
function
|
|
180
|
-
if (!
|
|
181
|
-
let e =
|
|
183
|
+
let t = e, r = n(), { on: i, onReady: a } = Y(), o = z([]), s = z(!0), c = z(0), u;
|
|
184
|
+
function d() {
|
|
185
|
+
if (!u) return;
|
|
186
|
+
let e = u.getStyle?.();
|
|
182
187
|
if (!e?.sources) return;
|
|
183
188
|
let t = new Set(e.layers?.map((e) => e.source).filter(Boolean)), n = [];
|
|
184
189
|
for (let [r, i] of Object.entries(e.sources)) {
|
|
185
190
|
if (t.size && !t.has(r)) continue;
|
|
186
|
-
let e =
|
|
191
|
+
let e = u.getSource(r)?.attribution ?? i.attribution;
|
|
187
192
|
e && !n.includes(e) && n.push(e);
|
|
188
193
|
}
|
|
189
194
|
let r = n.filter((e) => !n.some((t) => t !== e && t.includes(e)));
|
|
190
|
-
r.join("\n") !== o.value.join("\n") && (o.value = r), c.value = Math.max(0,
|
|
195
|
+
r.join("\n") !== o.value.join("\n") && (o.value = r), c.value = Math.max(0, u.getContainer().clientWidth - 20);
|
|
191
196
|
}
|
|
192
197
|
a((e) => {
|
|
193
|
-
|
|
194
|
-
}), i("styledata",
|
|
198
|
+
u = e, d();
|
|
199
|
+
}), i("styledata", d), i("sourcedata", d), i("resize", d), i("dragstart", () => {
|
|
195
200
|
s.value = !1;
|
|
196
201
|
});
|
|
197
|
-
let
|
|
198
|
-
return (t, n) =>
|
|
202
|
+
let f = b(() => o.value.join(" ")), p = b(() => t.position.endsWith("right"));
|
|
203
|
+
return (t, n) => f.value ? (L(), x(se, {
|
|
199
204
|
key: 0,
|
|
200
205
|
position: e.position,
|
|
201
206
|
group: !1,
|
|
@@ -211,13 +216,13 @@ var oe = { class: "hidden" }, X = {
|
|
|
211
216
|
"aria-label": W(r).mapToggleAttribution,
|
|
212
217
|
"aria-expanded": s.value,
|
|
213
218
|
onClick: n[0] ||= (e) => s.value = !s.value
|
|
214
|
-
}, [D(
|
|
219
|
+
}, [D(l, {
|
|
215
220
|
name: "info",
|
|
216
221
|
size: 20
|
|
217
222
|
})], 8, ce), s.value ? (L(), C("div", {
|
|
218
223
|
key: 0,
|
|
219
224
|
class: N(["m3-map-attrib-text", p.value ? "pl-3.5" : "pr-3.5"]),
|
|
220
|
-
innerHTML:
|
|
225
|
+
innerHTML: f.value
|
|
221
226
|
}, null, 10, le)) : S("", !0)], 6)]),
|
|
222
227
|
_: 1
|
|
223
228
|
}, 8, ["position", "class"])) : S("", !0);
|
|
@@ -370,8 +375,8 @@ var ge = 600, _e = /* @__PURE__ */ O({
|
|
|
370
375
|
"update:bearing",
|
|
371
376
|
"update:pitch"
|
|
372
377
|
],
|
|
373
|
-
setup(
|
|
374
|
-
let a =
|
|
378
|
+
setup(e, { expose: r, emit: i }) {
|
|
379
|
+
let a = e, o = i, s = z(), c = z(), l = H(), u = H(), d = z(0), f, p = H(), m = fe(), h = {
|
|
375
380
|
map: l,
|
|
376
381
|
maplibre: u,
|
|
377
382
|
styleVersion: d,
|
|
@@ -383,7 +388,7 @@ var ge = 600, _e = /* @__PURE__ */ O({
|
|
|
383
388
|
function g(e) {
|
|
384
389
|
p.value = a.adapter ? a.adapter(e.getStyle(), { styleUrl: typeof a.mapStyle == "string" ? a.mapStyle : void 0 }) : void 0, pe(m, e, p.value);
|
|
385
390
|
}
|
|
386
|
-
let _ = n(), v = () => typeof a.persist == "string" ? a.persist : a.persist ?
|
|
391
|
+
let _ = n(), v = () => typeof a.persist == "string" ? a.persist : a.persist ? t("m3-map-view") : null;
|
|
387
392
|
function b() {
|
|
388
393
|
let e = v();
|
|
389
394
|
if (!e) return {};
|
|
@@ -563,7 +568,7 @@ var ge = 600, _e = /* @__PURE__ */ O({
|
|
|
563
568
|
})), r({
|
|
564
569
|
map: l,
|
|
565
570
|
context: h
|
|
566
|
-
}), (
|
|
571
|
+
}), (t, n) => (L(), C("div", {
|
|
567
572
|
ref_key: "root",
|
|
568
573
|
ref: s,
|
|
569
574
|
class: "m3-map relative overflow-hidden",
|
|
@@ -578,11 +583,11 @@ var ge = 600, _e = /* @__PURE__ */ O({
|
|
|
578
583
|
ref: c,
|
|
579
584
|
class: "h-full w-full"
|
|
580
585
|
}, null, 512),
|
|
581
|
-
l.value &&
|
|
586
|
+
l.value && e.attribution ? (L(), x(ue, {
|
|
582
587
|
key: 0,
|
|
583
|
-
position:
|
|
588
|
+
position: e.attribution === !0 ? "bottom-right" : e.attribution
|
|
584
589
|
}, null, 8, ["position"])) : S("", !0),
|
|
585
|
-
l.value ? V(
|
|
590
|
+
l.value ? V(t.$slots, "default", {}, void 0, void 0, 1) : S("", !0),
|
|
586
591
|
D(y, {
|
|
587
592
|
"enter-active-class": "transition-opacity duration-150",
|
|
588
593
|
"enter-from-class": "opacity-0",
|
|
@@ -723,8 +728,8 @@ var ge = 600, _e = /* @__PURE__ */ O({
|
|
|
723
728
|
sourceOptions: {}
|
|
724
729
|
},
|
|
725
730
|
emits: ["click"],
|
|
726
|
-
setup(
|
|
727
|
-
let i =
|
|
731
|
+
setup(t, { expose: n, emit: r }) {
|
|
732
|
+
let i = t, a = r, o = i.id ?? `m3-geojson-${re()}`, { onReady: s, styleVersion: c } = Y(), l = e(["primary", "surface"]), u = (...e) => [
|
|
728
733
|
"match",
|
|
729
734
|
["geometry-type"],
|
|
730
735
|
e,
|
|
@@ -831,13 +836,13 @@ var ge = 600, _e = /* @__PURE__ */ O({
|
|
|
831
836
|
"aria-label": W(a)(e.layer.id) ? W(i).mapHideLayer : W(i).mapShowLayer,
|
|
832
837
|
"aria-pressed": W(a)(e.layer.id),
|
|
833
838
|
onClick: n[0] ||= J((t) => W(o)(e.layer.id), ["stop"])
|
|
834
|
-
}, [D(
|
|
839
|
+
}, [D(l, {
|
|
835
840
|
name: W(a)(e.layer.id) ? "visibility" : "visibility_off",
|
|
836
841
|
size: 18
|
|
837
842
|
}, null, 8, ["name"])], 10, De),
|
|
838
843
|
w("div", Oe, [w("span", { class: N(["truncate text-body-medium", W(a)(e.layer.id) ? "text-on-surface" : "text-on-surface-variant"]) }, U(e.layer.title), 3), e.layer.description && !e.expanded ? (L(), C("span", ke, U(e.layer.description), 1)) : S("", !0)]),
|
|
839
844
|
W(a)(e.layer.id) && W(s)(e.layer.id) < 1 ? (L(), C("span", Ae, U(Math.round(W(s)(e.layer.id) * 100)) + "% ", 1)) : S("", !0),
|
|
840
|
-
D(
|
|
845
|
+
D(l, {
|
|
841
846
|
name: "expand_more",
|
|
842
847
|
size: 18,
|
|
843
848
|
class: N(["shrink-0 text-on-surface-variant transition-transform duration-300", e.expanded ? "rotate-180" : ""])
|
|
@@ -847,7 +852,7 @@ var ge = 600, _e = /* @__PURE__ */ O({
|
|
|
847
852
|
style: P({ gridTemplateRows: e.expanded ? "1fr" : "0fr" })
|
|
848
853
|
}, [w("div", je, [w("div", Me, [
|
|
849
854
|
e.layer.description ? (L(), C("p", Ne, U(e.layer.description), 1)) : S("", !0),
|
|
850
|
-
w("div", Pe, [D(
|
|
855
|
+
w("div", Pe, [D(l, {
|
|
851
856
|
name: "opacity",
|
|
852
857
|
size: 16,
|
|
853
858
|
class: "shrink-0 text-on-surface-variant"
|
|
@@ -874,7 +879,7 @@ var ge = 600, _e = /* @__PURE__ */ O({
|
|
|
874
879
|
rel: "noopener",
|
|
875
880
|
download: "",
|
|
876
881
|
class: "inline-flex items-center gap-1 rounded-full px-3 py-1.5 text-label-large text-primary hover:bg-primary/8"
|
|
877
|
-
}, [D(
|
|
882
|
+
}, [D(l, {
|
|
878
883
|
name: "download",
|
|
879
884
|
size: 18
|
|
880
885
|
}), E(" " + U(W(i).mapDownload), 1)], 8, Le)) : S("", !0), V(t.$slots, "actions", {
|
|
@@ -907,11 +912,11 @@ var ge = 600, _e = /* @__PURE__ */ O({
|
|
|
907
912
|
map: {}
|
|
908
913
|
},
|
|
909
914
|
setup(e) {
|
|
910
|
-
let t = e, r = n(), { model: i, layersOf: a, isVisible: o, groupState: s, setGroupVisible: c } = Z(() => t.map), u = z(""),
|
|
915
|
+
let t = e, r = n(), { model: i, layersOf: a, isVisible: o, groupState: s, setGroupVisible: c } = Z(() => t.map), u = z(""), f = (e) => !u.value || e.title.toLowerCase().includes(u.value.toLowerCase()), p = b(() => (i.value?.groups ?? []).map((e) => ({
|
|
911
916
|
...e,
|
|
912
917
|
all: a(e.name),
|
|
913
|
-
layers: a(e.name).filter(
|
|
914
|
-
})).filter((e) => e.layers.length)), m = b(() => a(null).filter(
|
|
918
|
+
layers: a(e.name).filter(f)
|
|
919
|
+
})).filter((e) => e.layers.length)), m = b(() => a(null).filter(f)), h = z(/* @__PURE__ */ new Set()), g = (e) => h.value.has(e) === t.collapsed;
|
|
915
920
|
function _(e) {
|
|
916
921
|
let t = new Set(h.value);
|
|
917
922
|
t.delete(e) || t.add(e), h.value = t;
|
|
@@ -923,7 +928,7 @@ var ge = 600, _e = /* @__PURE__ */ O({
|
|
|
923
928
|
}
|
|
924
929
|
let O = (e) => e.filter((e) => o(e.id)).length;
|
|
925
930
|
return (t, n) => (L(), C("div", ze, [
|
|
926
|
-
e.search ? (L(), x(
|
|
931
|
+
e.search ? (L(), x(d, {
|
|
927
932
|
key: 0,
|
|
928
933
|
modelValue: u.value,
|
|
929
934
|
"onUpdate:modelValue": n[0] ||= (e) => u.value = e,
|
|
@@ -945,13 +950,13 @@ var ge = 600, _e = /* @__PURE__ */ O({
|
|
|
945
950
|
"aria-label": W(s)(e.name) === "hidden" ? W(r).mapShowLayer : W(r).mapHideLayer,
|
|
946
951
|
"aria-pressed": W(s)(e.name) !== "hidden",
|
|
947
952
|
onClick: J((t) => W(c)(e.name, W(s)(e.name) !== "visible"), ["stop"])
|
|
948
|
-
}, [D(
|
|
953
|
+
}, [D(l, {
|
|
949
954
|
name: W(s)(e.name) === "hidden" ? "visibility_off" : "visibility",
|
|
950
955
|
size: 18
|
|
951
956
|
}, null, 8, ["name"])], 10, Ve),
|
|
952
957
|
w("span", He, U(e.title), 1),
|
|
953
958
|
w("span", Ue, U(O(e.all)) + "/" + U(e.all.length), 1),
|
|
954
|
-
D(
|
|
959
|
+
D(l, {
|
|
955
960
|
name: "expand_more",
|
|
956
961
|
size: 18,
|
|
957
962
|
class: N(["text-on-surface-variant transition-transform duration-300", g(e.name) ? "rotate-180" : ""])
|
|
@@ -987,7 +992,7 @@ var ge = 600, _e = /* @__PURE__ */ O({
|
|
|
987
992
|
"expanded",
|
|
988
993
|
"onToggleExpanded"
|
|
989
994
|
]))), 128))])) : S("", !0),
|
|
990
|
-
!p.value.length && !m.value.length ? (L(), C("div", Ge, [w("div", Ke, [D(
|
|
995
|
+
!p.value.length && !m.value.length ? (L(), C("div", Ge, [w("div", Ke, [D(l, {
|
|
991
996
|
name: "layers_clear",
|
|
992
997
|
size: 28,
|
|
993
998
|
class: "text-on-surface-variant"
|
|
@@ -1036,7 +1041,7 @@ var ge = 600, _e = /* @__PURE__ */ O({
|
|
|
1036
1041
|
src: s(t.base.image, e.imageBase),
|
|
1037
1042
|
alt: "",
|
|
1038
1043
|
class: "size-full object-cover"
|
|
1039
|
-
}, null, 8, Xe)) : (L(), x(
|
|
1044
|
+
}, null, 8, Xe)) : (L(), x(l, {
|
|
1040
1045
|
key: 1,
|
|
1041
1046
|
name: "map",
|
|
1042
1047
|
size: 22,
|
|
@@ -1050,7 +1055,7 @@ var ge = 600, _e = /* @__PURE__ */ O({
|
|
|
1050
1055
|
"aria-label": W(r).mapNoBaseLayer,
|
|
1051
1056
|
"aria-checked": W(a) === null,
|
|
1052
1057
|
onClick: n[0] ||= (e) => W(o)(null)
|
|
1053
|
-
}, [D(
|
|
1058
|
+
}, [D(l, {
|
|
1054
1059
|
name: "layers_clear",
|
|
1055
1060
|
size: 22,
|
|
1056
1061
|
class: "text-on-surface-variant"
|
|
@@ -1070,7 +1075,7 @@ var ge = 600, _e = /* @__PURE__ */ O({
|
|
|
1070
1075
|
return (n, r) => (L(), C("div", $e, [(L(!0), C(v, null, B(e.results, (e, r) => (L(), C("div", {
|
|
1071
1076
|
key: r,
|
|
1072
1077
|
class: "overflow-hidden rounded-2xl bg-surface-container"
|
|
1073
|
-
}, [w("div", et, [D(
|
|
1078
|
+
}, [w("div", et, [D(l, {
|
|
1074
1079
|
name: "layers",
|
|
1075
1080
|
size: 16,
|
|
1076
1081
|
class: "text-on-primary-container"
|
|
@@ -1293,29 +1298,29 @@ var gt = { class: "hidden" }, _t = /* @__PURE__ */ O({
|
|
|
1293
1298
|
},
|
|
1294
1299
|
emits: ["update:modelValue"],
|
|
1295
1300
|
setup(e, { emit: t }) {
|
|
1296
|
-
let r = e, i = t, a = n(), { onReady: o } = Y(), { model: s } = Z(), c = b(() => (s.value?.layers ?? []).filter((e) => e.hover && e.hover.fields.length)),
|
|
1301
|
+
let r = e, i = t, a = n(), { onReady: o } = Y(), { model: s } = Z(), c = b(() => (s.value?.layers ?? []).filter((e) => e.hover && e.hover.fields.length)), u = H(null), d = z([0, 0]), f = z(!1), p, m = [];
|
|
1297
1302
|
function h(e) {
|
|
1298
1303
|
let t = e.features?.[0], n = c.value.find((e) => e.id === t?.layer.id);
|
|
1299
1304
|
if (!t || !n || !n.hover) return;
|
|
1300
1305
|
let r = t.properties ?? {};
|
|
1301
|
-
|
|
1306
|
+
u.value = {
|
|
1302
1307
|
layer: n,
|
|
1303
1308
|
fields: n.hover.fields.map((e) => ({
|
|
1304
1309
|
key: e.key,
|
|
1305
1310
|
label: ft(e.key, e),
|
|
1306
1311
|
value: pt(r[e.key], e)
|
|
1307
1312
|
})).filter((e) => e.value)
|
|
1308
|
-
},
|
|
1313
|
+
}, d.value = [e.lngLat.lng, e.lngLat.lat], f.value = !0;
|
|
1309
1314
|
}
|
|
1310
1315
|
function g() {
|
|
1311
|
-
|
|
1316
|
+
f.value = !1;
|
|
1312
1317
|
}
|
|
1313
1318
|
function _() {
|
|
1314
1319
|
if (p) {
|
|
1315
1320
|
for (let e of m) p.off("mousemove", e, h), p.off("mouseleave", e, g);
|
|
1316
1321
|
m = r.modelValue ? c.value.map((e) => e.id) : [];
|
|
1317
1322
|
for (let e of m) p.on("mousemove", e, h), p.on("mouseleave", e, g);
|
|
1318
|
-
r.modelValue || (
|
|
1323
|
+
r.modelValue || (f.value = !1);
|
|
1319
1324
|
}
|
|
1320
1325
|
}
|
|
1321
1326
|
o((e) => {
|
|
@@ -1335,23 +1340,23 @@ var gt = { class: "hidden" }, _t = /* @__PURE__ */ O({
|
|
|
1335
1340
|
"aria-label": W(a).mapHoverInfo,
|
|
1336
1341
|
"aria-pressed": e.modelValue,
|
|
1337
1342
|
onClick: n[0] ||= (t) => i("update:modelValue", !e.modelValue)
|
|
1338
|
-
}, [D(
|
|
1343
|
+
}, [D(l, {
|
|
1339
1344
|
name: "ads_click",
|
|
1340
1345
|
size: 20
|
|
1341
1346
|
})], 8, yt)]),
|
|
1342
1347
|
_: 1
|
|
1343
|
-
}, 8, ["position"])) : S("", !0),
|
|
1348
|
+
}, 8, ["position"])) : S("", !0), u.value ? (L(), x(we, {
|
|
1344
1349
|
key: 1,
|
|
1345
|
-
open:
|
|
1346
|
-
"onUpdate:open": n[1] ||= (e) =>
|
|
1347
|
-
"lng-lat":
|
|
1350
|
+
open: f.value,
|
|
1351
|
+
"onUpdate:open": n[1] ||= (e) => f.value = e,
|
|
1352
|
+
"lng-lat": d.value,
|
|
1348
1353
|
"close-button": !1,
|
|
1349
1354
|
"close-on-click": !1,
|
|
1350
1355
|
offset: 12,
|
|
1351
1356
|
"max-width": "280px",
|
|
1352
1357
|
class: "m3-map-hover"
|
|
1353
1358
|
}, {
|
|
1354
|
-
default: q(() => [w("p", bt, U(
|
|
1359
|
+
default: q(() => [w("p", bt, U(u.value.layer.title), 1), w("dl", xt, [(L(!0), C(v, null, B(u.value.fields, (e) => (L(), C("div", {
|
|
1355
1360
|
key: e.key,
|
|
1356
1361
|
class: "border-b border-outline-variant py-1 last:border-b-0"
|
|
1357
1362
|
}, [w("dt", St, U(e.label), 1), w("dd", Ct, U(e.value), 1)]))), 128))])]),
|
|
@@ -1419,8 +1424,8 @@ var Mt = { class: "hidden" }, Nt = ["title", "aria-pressed"], Pt = ["title", "ar
|
|
|
1419
1424
|
}
|
|
1420
1425
|
},
|
|
1421
1426
|
emits: ["update:modelValue", "change"],
|
|
1422
|
-
setup(
|
|
1423
|
-
let a =
|
|
1427
|
+
setup(t, { expose: r, emit: i }) {
|
|
1428
|
+
let a = t, o = i, s = n(), { onReady: c, styleVersion: u, activeTool: d } = Y(), p = e(["primary", "surface"]), m = `m3-measure-${re()}`, h = {
|
|
1424
1429
|
done: `${m}-done`,
|
|
1425
1430
|
draft: `${m}-draft`,
|
|
1426
1431
|
handles: `${m}-handles`
|
|
@@ -1463,7 +1468,7 @@ var Mt = { class: "hidden" }, Nt = ["title", "aria-pressed"], Pt = ["title", "ar
|
|
|
1463
1468
|
if (t === "distance") o(e), a.push({
|
|
1464
1469
|
key: `${n}-t`,
|
|
1465
1470
|
at: e[e.length - 1],
|
|
1466
|
-
text: `${
|
|
1471
|
+
text: `${s.mapTotal}: ${V(Dt(e))}`,
|
|
1467
1472
|
kind: "total",
|
|
1468
1473
|
m: r
|
|
1469
1474
|
});
|
|
@@ -1521,7 +1526,7 @@ var Mt = { class: "hidden" }, Nt = ["title", "aria-pressed"], Pt = ["title", "ar
|
|
|
1521
1526
|
}), oe(h.handles, n), I.value = [...e.flatMap((e) => e.labels), ...t.labels];
|
|
1522
1527
|
}
|
|
1523
1528
|
function ce() {
|
|
1524
|
-
ee.value = y.length,
|
|
1529
|
+
ee.value = y.length, o("change", y.map((e) => ({
|
|
1525
1530
|
mode: e.mode,
|
|
1526
1531
|
points: e.points.map((e) => [...e]),
|
|
1527
1532
|
closed: e.closed,
|
|
@@ -1651,7 +1656,7 @@ var Mt = { class: "hidden" }, Nt = ["title", "aria-pressed"], Pt = ["title", "ar
|
|
|
1651
1656
|
function he(e) {
|
|
1652
1657
|
e.key === "Enter" && Q();
|
|
1653
1658
|
}
|
|
1654
|
-
|
|
1659
|
+
f(() => !!P.value, () => Q(!0));
|
|
1655
1660
|
let ge = () => typeof navigator < "u" ? navigator.keyboard : void 0, _e = !1;
|
|
1656
1661
|
function ve() {
|
|
1657
1662
|
P.value && document.fullscreenElement && ge()?.lock && ge().lock(["Escape"]).then(() => {
|
|
@@ -1672,7 +1677,7 @@ var Mt = { class: "hidden" }, Nt = ["title", "aria-pressed"], Pt = ["title", "ar
|
|
|
1672
1677
|
function xe(e) {
|
|
1673
1678
|
if (M) {
|
|
1674
1679
|
if (P.value === e) return Q();
|
|
1675
|
-
P.value && Q(), P.value = e, d.value = "measure", T = [], O = null, M.getCanvas().style.cursor = "crosshair", M.doubleClickZoom.disable(), M.on("click", pe), M.on("mousemove", Z), M.on("dblclick", me), document.addEventListener("keydown", he), document.addEventListener("fullscreenchange", ve), ve(), X(), a.modelValue !== e &&
|
|
1680
|
+
P.value && Q(), P.value = e, d.value = "measure", T = [], O = null, M.getCanvas().style.cursor = "crosshair", M.doubleClickZoom.disable(), M.on("click", pe), M.on("mousemove", Z), M.on("dblclick", me), document.addEventListener("keydown", he), document.addEventListener("fullscreenchange", ve), ve(), X(), a.modelValue !== e && o("update:modelValue", e);
|
|
1676
1681
|
}
|
|
1677
1682
|
}
|
|
1678
1683
|
function Q(e = !1) {
|
|
@@ -1683,7 +1688,7 @@ var Mt = { class: "hidden" }, Nt = ["title", "aria-pressed"], Pt = ["title", "ar
|
|
|
1683
1688
|
mode: P.value,
|
|
1684
1689
|
points: t ? [...T, [...T[0]]] : T,
|
|
1685
1690
|
closed: t
|
|
1686
|
-
}), T = [], O = null, k = !1, P.value = null, d.value === "measure" && (d.value = null), M.getCanvas().style.cursor = "", M.doubleClickZoom.enable(), M.off("click", pe), M.off("mousemove", Z), M.off("dblclick", me), document.removeEventListener("keydown", he), document.removeEventListener("fullscreenchange", ve), e && _e ? be() : ye(), X(), ce(), a.modelValue !== null &&
|
|
1691
|
+
}), T = [], O = null, k = !1, P.value = null, d.value === "measure" && (d.value = null), M.getCanvas().style.cursor = "", M.doubleClickZoom.enable(), M.off("click", pe), M.off("mousemove", Z), M.off("dblclick", me), document.removeEventListener("keydown", he), document.removeEventListener("fullscreenchange", ve), e && _e ? be() : ye(), X(), ce(), a.modelValue !== null && o("update:modelValue", null);
|
|
1687
1692
|
}
|
|
1688
1693
|
function Ce(e) {
|
|
1689
1694
|
y[e] && (y.splice(e, 1), X(), ce());
|
|
@@ -1722,7 +1727,7 @@ var Mt = { class: "hidden" }, Nt = ["title", "aria-pressed"], Pt = ["title", "ar
|
|
|
1722
1727
|
}, ke = () => {
|
|
1723
1728
|
M && !A && !P.value && (M.getCanvas().style.cursor = "");
|
|
1724
1729
|
};
|
|
1725
|
-
|
|
1730
|
+
c((e) => {
|
|
1726
1731
|
M = e, de();
|
|
1727
1732
|
for (let t of [g, _]) e.on("mousedown", t, Te), e.on("touchstart", t, Te), e.on("mouseenter", t, Oe), e.on("mouseleave", t, ke);
|
|
1728
1733
|
a.modelValue && xe(a.modelValue);
|
|
@@ -1752,7 +1757,7 @@ var Mt = { class: "hidden" }, Nt = ["title", "aria-pressed"], Pt = ["title", "ar
|
|
|
1752
1757
|
finish: Q,
|
|
1753
1758
|
clear: we,
|
|
1754
1759
|
remove: Ce
|
|
1755
|
-
}), (
|
|
1760
|
+
}), (e, n) => (L(), C("div", Mt, [t.control ? (L(), x(se, {
|
|
1756
1761
|
key: 0,
|
|
1757
1762
|
position: Ae.value
|
|
1758
1763
|
}, {
|
|
@@ -1760,30 +1765,30 @@ var Mt = { class: "hidden" }, Nt = ["title", "aria-pressed"], Pt = ["title", "ar
|
|
|
1760
1765
|
w("button", {
|
|
1761
1766
|
type: "button",
|
|
1762
1767
|
class: "grid place-items-center",
|
|
1763
|
-
title: W(
|
|
1768
|
+
title: W(s).mapMeasureDistance,
|
|
1764
1769
|
"aria-pressed": P.value === "distance",
|
|
1765
1770
|
onClick: n[0] ||= (e) => xe("distance")
|
|
1766
|
-
}, [D(
|
|
1771
|
+
}, [D(l, {
|
|
1767
1772
|
name: "straighten",
|
|
1768
1773
|
size: 20
|
|
1769
1774
|
})], 8, Nt),
|
|
1770
1775
|
w("button", {
|
|
1771
1776
|
type: "button",
|
|
1772
1777
|
class: "grid place-items-center",
|
|
1773
|
-
title: W(
|
|
1778
|
+
title: W(s).mapMeasureArea,
|
|
1774
1779
|
"aria-pressed": P.value === "area",
|
|
1775
1780
|
onClick: n[1] ||= (e) => xe("area")
|
|
1776
|
-
}, [D(
|
|
1781
|
+
}, [D(l, {
|
|
1777
1782
|
name: "pentagon",
|
|
1778
1783
|
size: 20
|
|
1779
1784
|
})], 8, Pt),
|
|
1780
1785
|
w("button", {
|
|
1781
1786
|
type: "button",
|
|
1782
1787
|
class: "grid place-items-center",
|
|
1783
|
-
title: W(
|
|
1788
|
+
title: W(s).mapClearMeasurements,
|
|
1784
1789
|
disabled: !ee.value && !P.value,
|
|
1785
1790
|
onClick: we
|
|
1786
|
-
}, [D(
|
|
1791
|
+
}, [D(l, {
|
|
1787
1792
|
name: "delete",
|
|
1788
1793
|
size: 20
|
|
1789
1794
|
})], 8, Ft)
|
|
@@ -1800,14 +1805,14 @@ var Mt = { class: "hidden" }, Nt = ["title", "aria-pressed"], Pt = ["title", "ar
|
|
|
1800
1805
|
key: 0,
|
|
1801
1806
|
type: "button",
|
|
1802
1807
|
class: "pointer-events-auto grid size-5 cursor-pointer place-items-center rounded-full hover:bg-on-primary/12 focus-visible:outline-2 focus-visible:outline-on-primary",
|
|
1803
|
-
"aria-label": W(
|
|
1804
|
-
title: W(
|
|
1808
|
+
"aria-label": W(s).mapDeleteMeasurement,
|
|
1809
|
+
title: W(s).mapDeleteMeasurement,
|
|
1805
1810
|
onClick: J((t) => Ce(e.m), ["stop"]),
|
|
1806
1811
|
onPointerdown: n[2] ||= J(() => {}, ["stop"]),
|
|
1807
1812
|
onMousedown: n[3] ||= J(() => {}, ["stop"]),
|
|
1808
1813
|
onTouchstart: n[4] ||= J(() => {}, ["stop"]),
|
|
1809
1814
|
onDblclick: n[5] ||= J(() => {}, ["stop"])
|
|
1810
|
-
}, [D(
|
|
1815
|
+
}, [D(l, {
|
|
1811
1816
|
name: "close",
|
|
1812
1817
|
size: 14
|
|
1813
1818
|
})], 40, It))], 2)]),
|
|
@@ -1872,26 +1877,26 @@ var Bt = { class: "flex flex-wrap gap-2" }, Vt = /* @__PURE__ */ O({
|
|
|
1872
1877
|
["literal", e]
|
|
1873
1878
|
] : null);
|
|
1874
1879
|
}
|
|
1875
|
-
function
|
|
1880
|
+
function m(e) {
|
|
1876
1881
|
let t = d.value.includes(e) ? d.value.filter((t) => t !== e) : [...d.value, e];
|
|
1877
1882
|
u.value = t, r("update:modelValue", t);
|
|
1878
1883
|
}
|
|
1879
|
-
function
|
|
1884
|
+
function h(e) {
|
|
1880
1885
|
let t = () => {
|
|
1881
1886
|
n.values || (c.value = s(n.layer, n.property));
|
|
1882
1887
|
};
|
|
1883
1888
|
t(), e.once("idle", t);
|
|
1884
1889
|
}
|
|
1885
1890
|
return i((e) => {
|
|
1886
|
-
|
|
1891
|
+
h(e), f();
|
|
1887
1892
|
}), K(d, f, { deep: !0 }), K(a, () => f()), K(() => [n.layer, n.property], ([e], [t]) => {
|
|
1888
1893
|
e !== t && o(t, null), f();
|
|
1889
|
-
}), F(() => o(n.layer, null)), (t, n) => (L(), C("div", Bt, [(L(!0), C(v, null, B(l.value, (t) => (L(), x(
|
|
1894
|
+
}), F(() => o(n.layer, null)), (t, n) => (L(), C("div", Bt, [(L(!0), C(v, null, B(l.value, (t) => (L(), x(p, {
|
|
1890
1895
|
key: t,
|
|
1891
1896
|
type: "filter",
|
|
1892
1897
|
clickable: "",
|
|
1893
1898
|
selected: d.value.includes(t),
|
|
1894
|
-
onClick: (e) =>
|
|
1899
|
+
onClick: (e) => m(t)
|
|
1895
1900
|
}, {
|
|
1896
1901
|
default: q(() => [E(U(e.labels?.[String(t)] ?? t), 1)]),
|
|
1897
1902
|
_: 2
|
|
@@ -1956,29 +1961,29 @@ var Ut = { class: "hidden" }, Wt = [
|
|
|
1956
1961
|
},
|
|
1957
1962
|
emits: ["select"],
|
|
1958
1963
|
setup(e, { emit: t }) {
|
|
1959
|
-
let r = e, i = t, a = n(), { map:
|
|
1964
|
+
let r = e, i = t, a = n(), { map: s } = Y(), c = b(() => r.provider ?? Ht()), d = z(""), f = H([]), p = z(!1), _ = z(!1), y = z(!1), T = H(null), E, O;
|
|
1960
1965
|
async function k() {
|
|
1961
|
-
let e =
|
|
1966
|
+
let e = d.value.trim();
|
|
1962
1967
|
if (!e) return;
|
|
1963
1968
|
E?.abort(), E = new AbortController();
|
|
1964
1969
|
let t = E;
|
|
1965
|
-
|
|
1970
|
+
p.value = !0, y.value = !0;
|
|
1966
1971
|
try {
|
|
1967
|
-
|
|
1972
|
+
f.value = await c.value(e, t.signal);
|
|
1968
1973
|
} catch {
|
|
1969
1974
|
if (t.signal.aborted) return;
|
|
1970
|
-
|
|
1975
|
+
f.value = [];
|
|
1971
1976
|
} finally {
|
|
1972
|
-
E === t && (
|
|
1977
|
+
E === t && (p.value = !1, _.value = !0);
|
|
1973
1978
|
}
|
|
1974
1979
|
}
|
|
1975
1980
|
function A(e) {
|
|
1976
|
-
if (
|
|
1981
|
+
if (d.value = e, !e) return M();
|
|
1977
1982
|
r.instant && (clearTimeout(O), O = setTimeout(k, 350));
|
|
1978
1983
|
}
|
|
1979
1984
|
function j(e) {
|
|
1980
1985
|
T.value = e, y.value = !1;
|
|
1981
|
-
let t =
|
|
1986
|
+
let t = s.value;
|
|
1982
1987
|
e.bbox && e.bbox[0] !== e.bbox[2] ? t?.fitBounds([[e.bbox[0], e.bbox[1]], [e.bbox[2], e.bbox[3]]], {
|
|
1983
1988
|
padding: 48,
|
|
1984
1989
|
maxZoom: r.zoom
|
|
@@ -1988,7 +1993,7 @@ var Ut = { class: "hidden" }, Wt = [
|
|
|
1988
1993
|
}), i("select", e);
|
|
1989
1994
|
}
|
|
1990
1995
|
function M() {
|
|
1991
|
-
E?.abort(), clearTimeout(O),
|
|
1996
|
+
E?.abort(), clearTimeout(O), d.value = "", f.value = [], _.value = !1, p.value = !1, y.value = !1, T.value = null;
|
|
1992
1997
|
}
|
|
1993
1998
|
F(() => {
|
|
1994
1999
|
E?.abort(), clearTimeout(O);
|
|
@@ -2025,7 +2030,7 @@ var Ut = { class: "hidden" }, Wt = [
|
|
|
2025
2030
|
position: e.position,
|
|
2026
2031
|
group: !1
|
|
2027
2032
|
}, {
|
|
2028
|
-
default: q(() => [D(
|
|
2033
|
+
default: q(() => [D(h, {
|
|
2029
2034
|
variant: "elevated",
|
|
2030
2035
|
class: "w-80 max-w-[calc(100vw-5rem)] overflow-hidden"
|
|
2031
2036
|
}, {
|
|
@@ -2034,13 +2039,13 @@ var Ut = { class: "hidden" }, Wt = [
|
|
|
2034
2039
|
role: "search",
|
|
2035
2040
|
onSubmit: J(k, ["prevent"])
|
|
2036
2041
|
}, [
|
|
2037
|
-
D(
|
|
2042
|
+
D(l, {
|
|
2038
2043
|
name: "search",
|
|
2039
2044
|
size: 20,
|
|
2040
2045
|
class: "shrink-0 text-on-surface-variant"
|
|
2041
2046
|
}),
|
|
2042
2047
|
w("input", {
|
|
2043
|
-
value:
|
|
2048
|
+
value: d.value,
|
|
2044
2049
|
type: "search",
|
|
2045
2050
|
enterkeyhint: "search",
|
|
2046
2051
|
placeholder: e.placeholder ?? W(a).mapSearchPlaces,
|
|
@@ -2049,22 +2054,22 @@ var Ut = { class: "hidden" }, Wt = [
|
|
|
2049
2054
|
onInput: n[0] ||= (e) => A(e.target.value),
|
|
2050
2055
|
onFocus: n[1] ||= (e) => y.value = _.value && !T.value
|
|
2051
2056
|
}, null, 40, Wt),
|
|
2052
|
-
|
|
2057
|
+
p.value ? (L(), x(u, {
|
|
2053
2058
|
key: 0,
|
|
2054
2059
|
size: 20,
|
|
2055
2060
|
class: "mr-2 shrink-0"
|
|
2056
|
-
})) :
|
|
2061
|
+
})) : d.value ? (L(), x(o, {
|
|
2057
2062
|
key: 1,
|
|
2058
2063
|
icon: "close",
|
|
2059
2064
|
label: W(a).clearSearch,
|
|
2060
2065
|
size: "sm",
|
|
2061
2066
|
onClick: M
|
|
2062
2067
|
}, null, 8, ["label"])) : S("", !0)
|
|
2063
|
-
], 32), y.value && _.value && !
|
|
2068
|
+
], 32), y.value && _.value && !p.value ? (L(), C("div", Gt, [f.value.length ? (L(), x(m, {
|
|
2064
2069
|
key: 0,
|
|
2065
2070
|
class: "max-h-72 overflow-y-auto"
|
|
2066
2071
|
}, {
|
|
2067
|
-
default: q(() => [(L(!0), C(v, null, B(
|
|
2072
|
+
default: q(() => [(L(!0), C(v, null, B(f.value, (e, t) => (L(), x(g, {
|
|
2068
2073
|
key: t,
|
|
2069
2074
|
title: e.label,
|
|
2070
2075
|
icon: P(e.type),
|
|
@@ -2077,7 +2082,7 @@ var Ut = { class: "hidden" }, Wt = [
|
|
|
2077
2082
|
"onClick"
|
|
2078
2083
|
]))), 128))]),
|
|
2079
2084
|
_: 1
|
|
2080
|
-
})) : (L(), C("div", Kt, [D(
|
|
2085
|
+
})) : (L(), C("div", Kt, [D(l, {
|
|
2081
2086
|
name: "search_off",
|
|
2082
2087
|
size: 28,
|
|
2083
2088
|
class: "text-on-surface-variant"
|