qmap-forms 1.0.5 → 1.0.7
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/index.es.js +819 -705
- package/package.json +1 -1
- package/qmap.browser.js +1 -1
- package/qmap.umd.js +1 -1
- package/src/lib.d.ts +8 -0
- package/FieldControl-D0e9k9sx.mjs +0 -112
- package/SimpleGeomEditor-G898Fulb.mjs +0 -8
package/index.es.js
CHANGED
|
@@ -1,27 +1,111 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { Fragment as e, Teleport as t, computed as n, createApp as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createSlots as c, createTextVNode as l, createVNode as u, defineAsyncComponent as d, defineComponent as f, h as p, inject as m, nextTick as h, normalizeClass as g, normalizeStyle as _, onBeforeMount as v, onBeforeUnmount as y, onMounted as b, onUnmounted as x, openBlock as S, provide as C, ref as w, renderList as T, renderSlot as E, resolveComponent as D, resolveDynamicComponent as O, toDisplayString as k, unref as A, vModelCheckbox as j, vModelRadio as M, vModelSelect as N, vModelText as P, vShow as F, watch as I, withCtx as L, withDirectives as R, withKeys as z, withModifiers as B } from "vue";
|
|
2
|
+
import { DateTime as V } from "luxon";
|
|
3
|
+
import { BehaviorSubject as H, Subject as U } from "rxjs";
|
|
4
|
+
import "leaflet-editable";
|
|
5
|
+
import "leaflet-path-drag";
|
|
6
|
+
import "leaflet";
|
|
7
|
+
//#region \0rolldown/runtime.js
|
|
8
|
+
var ee = /* @__PURE__ */ f({
|
|
9
|
+
__name: "BtnTooltip",
|
|
10
|
+
props: { label: {} },
|
|
11
|
+
setup(n) {
|
|
12
|
+
let r = w(!1), c = w({
|
|
13
|
+
top: "50px",
|
|
14
|
+
left: "50px",
|
|
15
|
+
position: "absolute",
|
|
16
|
+
zIndex: "999"
|
|
17
|
+
});
|
|
18
|
+
w(null);
|
|
19
|
+
let l = w(null), u = w(null), d = `info-btn-tooltip-${Math.random().toString(36).slice(2)}`;
|
|
20
|
+
function f() {
|
|
21
|
+
r.value || (r.value = !0, h(() => {
|
|
22
|
+
g();
|
|
23
|
+
}), document.addEventListener("mousedown", m));
|
|
24
|
+
}
|
|
25
|
+
function p() {
|
|
26
|
+
r.value = !1, document.removeEventListener("mousedown", m);
|
|
27
|
+
}
|
|
28
|
+
function m(e) {
|
|
29
|
+
u.value && l.value && !u.value.contains(e.target) && !l.value.contains(e.target) && p();
|
|
30
|
+
}
|
|
31
|
+
function g() {
|
|
32
|
+
if (l.value && u.value) {
|
|
33
|
+
let e = l.value.getBoundingClientRect(), t = u.value.getBoundingClientRect(), n = e.bottom + window.scrollY + 8, r = Math.max(e.left + window.scrollX + e.width / 2 - t.width / 2, 0);
|
|
34
|
+
c.value = {
|
|
35
|
+
top: `${n}px`,
|
|
36
|
+
left: `${r}px`,
|
|
37
|
+
position: "absolute",
|
|
38
|
+
zIndex: "999"
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return y(() => {
|
|
43
|
+
document.removeEventListener("mousedown", m);
|
|
44
|
+
}), (m, h) => (S(), o(e, null, [s("button", {
|
|
45
|
+
ref_key: "button",
|
|
46
|
+
ref: l,
|
|
47
|
+
onClick: f,
|
|
48
|
+
onBlur: p,
|
|
49
|
+
onMouseover: f,
|
|
50
|
+
class: "qmap-button",
|
|
51
|
+
onMouseleave: p,
|
|
52
|
+
onKeydown: z(p, ["esc"]),
|
|
53
|
+
style: {
|
|
54
|
+
border: "none",
|
|
55
|
+
background: "none"
|
|
56
|
+
},
|
|
57
|
+
"aria-describedby": d
|
|
58
|
+
}, [E(m.$slots, "default")], 544), (S(), i(t, { to: "body" }, [r.value ? (S(), o("div", {
|
|
59
|
+
key: 0,
|
|
60
|
+
id: d,
|
|
61
|
+
class: "tooltip",
|
|
62
|
+
style: _(c.value),
|
|
63
|
+
ref_key: "tooltip",
|
|
64
|
+
ref: u,
|
|
65
|
+
tabindex: "-1"
|
|
66
|
+
}, k(n.label), 5)) : a("", !0)]))], 64));
|
|
67
|
+
}
|
|
68
|
+
}), W = /* @__PURE__ */ f({
|
|
69
|
+
__name: "subtitle-button",
|
|
70
|
+
props: { qMap: {} },
|
|
71
|
+
setup(e) {
|
|
72
|
+
return (t, n) => e.qMap.subtitle ? (S(), i(ee, {
|
|
73
|
+
key: 0,
|
|
74
|
+
label: e.qMap.subtitle
|
|
75
|
+
}, {
|
|
76
|
+
default: L(() => [...n[0] ||= [s("i", { class: "fa fa-question-circle" }, null, -1)]]),
|
|
77
|
+
_: 1
|
|
78
|
+
}, 8, ["label"])) : a("", !0);
|
|
79
|
+
}
|
|
80
|
+
}), G = { class: "block" }, K = /* @__PURE__ */ f({
|
|
81
|
+
__name: "title-block",
|
|
82
|
+
props: { qMap: {} },
|
|
83
|
+
setup(e) {
|
|
84
|
+
return (t, n) => (S(), o("span", G, [
|
|
85
|
+
l(k(e.qMap.title || (e.qMap.id !== "#" && e.qMap.type !== "col" && e.qMap.type !== "group" ? e.qMap.id : "")) + " ", 1),
|
|
86
|
+
E(t.$slots, "default"),
|
|
87
|
+
u(W, { "q-map": e.qMap }, null, 8, ["q-map"])
|
|
88
|
+
]));
|
|
89
|
+
}
|
|
90
|
+
}), q = { class: "my-2 flex flex-row items-center justify-between" }, te = {
|
|
7
91
|
key: 0,
|
|
8
92
|
class: "qmap_array--unset"
|
|
9
|
-
},
|
|
93
|
+
}, J = {
|
|
10
94
|
key: 1,
|
|
11
95
|
class: "qmap_array--set"
|
|
12
|
-
},
|
|
96
|
+
}, ne = {
|
|
13
97
|
key: 0,
|
|
14
98
|
class: "qmap-card min-w-0 p-6 text-center qmap-empty"
|
|
15
|
-
},
|
|
99
|
+
}, re = {
|
|
16
100
|
key: 1,
|
|
17
101
|
class: ""
|
|
18
|
-
},
|
|
102
|
+
}, ie = {
|
|
19
103
|
key: 0,
|
|
20
104
|
class: "qmap-card min-w-0 p-3"
|
|
21
|
-
}, Y = { class: "flex flex-col" },
|
|
105
|
+
}, Y = { class: "flex flex-col" }, ae = { class: "flex items-center gap-3 py-2 qmap-list-row" }, oe = { class: "flex-1 min-w-0" }, se = ["onClick"], ce = {
|
|
22
106
|
key: 1,
|
|
23
107
|
class: "mt-2 flex flex-col gap-2"
|
|
24
|
-
},
|
|
108
|
+
}, le = { class: "qmap-card min-w-0 p-3 flex flex-row items-center gap-2" }, ue = { class: "flex-1 min-w-0 flex flex-col gap-2 qmap_sub_group mt-2" }, de = ["onClick"], fe = /* @__PURE__ */ f({
|
|
25
109
|
__name: "qArray",
|
|
26
110
|
props: {
|
|
27
111
|
qMap: {},
|
|
@@ -35,46 +119,46 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
35
119
|
},
|
|
36
120
|
emits: ["qmap_change", "qmap_subquestions"],
|
|
37
121
|
setup(t, { emit: n }) {
|
|
38
|
-
let
|
|
39
|
-
|
|
40
|
-
let e =
|
|
41
|
-
e &&
|
|
42
|
-
}),
|
|
43
|
-
|
|
122
|
+
let r = t, c = n, l = w();
|
|
123
|
+
v(() => {
|
|
124
|
+
let e = r.model[r.qMap.id];
|
|
125
|
+
e && r.qMap.item ? l.value = e.slice().map((e) => ({ "#": e })) : e ? l.value = e : !e && r.qMap.required && (l.value = []);
|
|
126
|
+
}), I(l, (e) => {
|
|
127
|
+
p(e);
|
|
44
128
|
});
|
|
45
129
|
function d() {
|
|
46
|
-
var e =
|
|
47
|
-
|
|
130
|
+
var e = l.value.slice();
|
|
131
|
+
r.qMap.item ? e.push({ "#": "" }) : e.push({}), l.value = e, p(l.value);
|
|
48
132
|
}
|
|
49
133
|
function f(e, t) {
|
|
50
|
-
|
|
134
|
+
p(l.value);
|
|
51
135
|
}
|
|
52
|
-
function
|
|
53
|
-
|
|
54
|
-
qMap:
|
|
55
|
-
value:
|
|
136
|
+
function p(e) {
|
|
137
|
+
r.qMap.item ? r.model[r.qMap.id] = e.map((e) => e["#"]) : r.model[r.qMap.id] = e.slice(), c("qmap_change", {
|
|
138
|
+
qMap: r.qMap,
|
|
139
|
+
value: r.model[r.qMap.id]
|
|
56
140
|
});
|
|
57
141
|
}
|
|
58
|
-
function
|
|
59
|
-
var t =
|
|
60
|
-
t.splice(e, 1),
|
|
142
|
+
function m(e) {
|
|
143
|
+
var t = l.value.slice();
|
|
144
|
+
t.splice(e, 1), l.value = t;
|
|
61
145
|
}
|
|
62
|
-
return (n,
|
|
146
|
+
return (n, r) => (S(), o("div", null, [s("div", q, [u(K, { "q-map": t.qMap }, null, 8, ["q-map"]), l.value ? (S(), o("div", J, [s("button", {
|
|
63
147
|
type: "button",
|
|
64
148
|
class: "inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button",
|
|
65
149
|
"aria-label": "Add item",
|
|
66
|
-
onClick:
|
|
67
|
-
}, "+")])) : (
|
|
150
|
+
onClick: r[1] ||= (e) => d()
|
|
151
|
+
}, "+")])) : (S(), o("div", te, [s("button", {
|
|
68
152
|
type: "button",
|
|
69
153
|
class: "inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button",
|
|
70
154
|
"aria-label": "Add item",
|
|
71
|
-
onClick:
|
|
72
|
-
|
|
155
|
+
onClick: r[0] ||= (e) => {
|
|
156
|
+
l.value = [], d();
|
|
73
157
|
}
|
|
74
|
-
}, "+")]))]), !
|
|
158
|
+
}, "+")]))]), !l.value || !l.value.length ? (S(), o("div", ne, [...r[2] ||= [s("i", null, "Not set", -1)]])) : (S(), o("div", re, [t.qMap.item ? (S(), o("div", ie, [s("div", Y, [(S(!0), o(e, null, T(l.value, (e, n) => (S(), o("div", ae, [s("div", oe, [u(Q, {
|
|
75
159
|
qMap: t.qMap.item,
|
|
76
|
-
modelValue:
|
|
77
|
-
"onUpdate:modelValue": [(e) =>
|
|
160
|
+
modelValue: l.value[n],
|
|
161
|
+
"onUpdate:modelValue": [(e) => l.value[n] = e, (e) => f(n, e)],
|
|
78
162
|
extras: t.extras,
|
|
79
163
|
provider: t.provider,
|
|
80
164
|
readOnly: t.readOnly || t.qMap.readOnly
|
|
@@ -85,15 +169,15 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
85
169
|
"extras",
|
|
86
170
|
"provider",
|
|
87
171
|
"readOnly"
|
|
88
|
-
])]),
|
|
172
|
+
])]), s("button", {
|
|
89
173
|
type: "button",
|
|
90
174
|
class: "inline-flex items-center justify-center min-w-8 min-h-8 p-1 qmap-icon-button qmap-danger",
|
|
91
175
|
"aria-label": "Remove item",
|
|
92
|
-
onClick: (e) =>
|
|
93
|
-
}, [...
|
|
176
|
+
onClick: (e) => m(n)
|
|
177
|
+
}, [...r[3] ||= [s("i", { class: "fa fa-trash" }, null, -1)]], 8, se)]))), 256))])])) : t.qMap.items ? (S(), o("div", ce, [(S(!0), o(e, null, T(l.value, (n, a) => (S(), o("div", le, [s("div", ue, [(S(!0), o(e, null, T(t.qMap.items, (e) => (S(), i(Q, {
|
|
94
178
|
qMap: e,
|
|
95
|
-
modelValue:
|
|
96
|
-
"onUpdate:modelValue": [(e) =>
|
|
179
|
+
modelValue: l.value[a],
|
|
180
|
+
"onUpdate:modelValue": [(e) => l.value[a] = e, (e) => f(a, e)],
|
|
97
181
|
extras: t.extras,
|
|
98
182
|
provider: t.provider,
|
|
99
183
|
lite: t.lite,
|
|
@@ -106,18 +190,18 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
106
190
|
"provider",
|
|
107
191
|
"lite",
|
|
108
192
|
"readOnly"
|
|
109
|
-
]))), 256))]),
|
|
193
|
+
]))), 256))]), s("button", {
|
|
110
194
|
type: "button",
|
|
111
195
|
class: "inline-flex items-center justify-center min-w-8 min-h-8 p-1 qmap-icon-button qmap-danger",
|
|
112
196
|
"aria-label": "Remove item",
|
|
113
|
-
onClick: (e) =>
|
|
114
|
-
}, [...
|
|
197
|
+
onClick: (e) => m(a)
|
|
198
|
+
}, [...r[4] ||= [s("i", { class: "fa fa-times" }, null, -1)]], 8, de)]))), 256))])) : a("", !0)]))]));
|
|
115
199
|
}
|
|
116
|
-
}),
|
|
200
|
+
}), pe = { class: "flex items-center gap-1" }, me = [
|
|
117
201
|
"aria-checked",
|
|
118
202
|
"aria-label",
|
|
119
203
|
"disabled"
|
|
120
|
-
],
|
|
204
|
+
], he = /*@__PURE__*/ f({
|
|
121
205
|
__name: "ToggleSwitch",
|
|
122
206
|
props: {
|
|
123
207
|
modelValue: { type: Boolean },
|
|
@@ -127,58 +211,58 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
127
211
|
},
|
|
128
212
|
emits: ["update:modelValue"],
|
|
129
213
|
setup(e, { emit: t }) {
|
|
130
|
-
let
|
|
131
|
-
function
|
|
132
|
-
|
|
214
|
+
let r = e, i = t, a = n(() => r.modelValue);
|
|
215
|
+
function c() {
|
|
216
|
+
r.allowUndefined ? a.value === void 0 ? i("update:modelValue", !1) : a.value === !1 ? i("update:modelValue", !0) : i("update:modelValue", void 0) : i("update:modelValue", a.value !== !0);
|
|
133
217
|
}
|
|
134
|
-
let
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
].filter(Boolean).join(" ")),
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
218
|
+
let l = n(() => [
|
|
219
|
+
a.value === !0 && "toggle-checked",
|
|
220
|
+
a.value === !1 && "toggle-unchecked",
|
|
221
|
+
a.value === void 0 && "toggle-indeterminate",
|
|
222
|
+
r.disabled === !0 && "toggle-disabled"
|
|
223
|
+
].filter(Boolean).join(" ")), u = n(() => [
|
|
224
|
+
a.value === !0 && "slider-checked",
|
|
225
|
+
a.value === !1 && "slider-unchecked",
|
|
226
|
+
a.value === void 0 && "slider-indeterminate"
|
|
143
227
|
].filter(Boolean).join(" "));
|
|
144
|
-
return (t, n) => (
|
|
228
|
+
return (t, n) => (S(), o("span", pe, [s("button", {
|
|
145
229
|
type: "button",
|
|
146
|
-
class:
|
|
147
|
-
onClick:
|
|
148
|
-
"aria-checked": String(
|
|
230
|
+
class: g(["toggle-root", l.value]),
|
|
231
|
+
onClick: c,
|
|
232
|
+
"aria-checked": String(a.value),
|
|
149
233
|
"aria-label": e.ariaLabel,
|
|
150
234
|
disabled: e.disabled
|
|
151
|
-
}, [
|
|
235
|
+
}, [s("span", { class: g(["toggle-slider", u.value]) }, null, 2)], 10, me), E(t.$slots, "default", {}, void 0, !0)]));
|
|
152
236
|
}
|
|
153
|
-
}),
|
|
237
|
+
}), ge = (e, t) => {
|
|
154
238
|
let n = e.__vccOpts || e;
|
|
155
239
|
for (let [e, r] of t) n[e] = r;
|
|
156
240
|
return n;
|
|
157
|
-
},
|
|
241
|
+
}, _e = /*#__PURE__*/ ge(he, [["__scopeId", "data-v-edf9fc7d"]]), ve = {
|
|
158
242
|
key: 0,
|
|
159
243
|
class: "inline-flex items-center gap-2"
|
|
160
|
-
},
|
|
244
|
+
}, ye = ["for"], be = {
|
|
161
245
|
key: 0,
|
|
162
246
|
class: "qmap-required"
|
|
163
|
-
},
|
|
247
|
+
}, xe = {
|
|
164
248
|
key: 1,
|
|
165
249
|
class: "qmap-required"
|
|
166
|
-
},
|
|
250
|
+
}, Se = {
|
|
167
251
|
key: 2,
|
|
168
252
|
class: "qmap-button-field sm:flex items-center"
|
|
169
|
-
},
|
|
253
|
+
}, Ce = { class: "sm:w-1/2 md:w-1/4 lg:w-1/5" }, we = {
|
|
170
254
|
key: 0,
|
|
171
255
|
class: "qmap-required"
|
|
172
|
-
},
|
|
256
|
+
}, Te = {
|
|
173
257
|
class: "btn-group sm:w-1/2 md:w-2/4 lg:w-1/4 flex",
|
|
174
258
|
role: "group"
|
|
175
|
-
},
|
|
259
|
+
}, Ee = ["aria-pressed", "disabled"], De = ["aria-pressed", "disabled"], Oe = ["for"], ke = ["id", "disabled"], Ae = {
|
|
176
260
|
key: 0,
|
|
177
261
|
class: "qmap-required"
|
|
178
|
-
},
|
|
262
|
+
}, je = {
|
|
179
263
|
key: 1,
|
|
180
264
|
class: "qmap-required"
|
|
181
|
-
},
|
|
265
|
+
}, Me = /* @__PURE__ */ f({
|
|
182
266
|
__name: "qBool",
|
|
183
267
|
props: {
|
|
184
268
|
qMap: {},
|
|
@@ -191,94 +275,118 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
191
275
|
style: {}
|
|
192
276
|
},
|
|
193
277
|
emits: ["qmap_change", "qmap_subquestions"],
|
|
194
|
-
setup(
|
|
195
|
-
let
|
|
196
|
-
|
|
197
|
-
function
|
|
198
|
-
|
|
199
|
-
qMap:
|
|
278
|
+
setup(e, { emit: t }) {
|
|
279
|
+
let n = e, r = t, c = w(n.model[n.qMap.id]);
|
|
280
|
+
I(c, (e) => r("qmap_subquestions", e === !0 ? n.qMap.onPos : e === !1 ? n.qMap.onNeg : void 0)), I(() => n.model, (e) => c.value = e[n.qMap.id]), v(() => r("qmap_subquestions", c.value === !0 ? n.qMap.onPos : c.value === !1 ? n.qMap.onNeg : void 0));
|
|
281
|
+
function l(e) {
|
|
282
|
+
n.model[n.qMap.id] = e, r("qmap_change", {
|
|
283
|
+
qMap: n.qMap,
|
|
200
284
|
value: e
|
|
201
285
|
});
|
|
202
286
|
}
|
|
203
287
|
function d(e) {
|
|
204
|
-
|
|
288
|
+
c.value = e, l(e);
|
|
205
289
|
}
|
|
206
|
-
return (
|
|
290
|
+
return (t, n) => e.lite && e.readOnly ? (S(), o("span", ve, k(c.value ? "✓" : "□"), 1)) : e.qMap.style === "switch" ? (S(), o("label", {
|
|
207
291
|
key: 1,
|
|
208
292
|
class: "inline-flex items-center gap-2 min-h-8 qmap-check-row",
|
|
209
|
-
for:
|
|
210
|
-
}, [
|
|
211
|
-
modelValue:
|
|
212
|
-
"onUpdate:modelValue": [
|
|
213
|
-
disabled:
|
|
214
|
-
}, null, 8, ["modelValue", "disabled"]),
|
|
293
|
+
for: e.qMap.id
|
|
294
|
+
}, [u(_e, {
|
|
295
|
+
modelValue: c.value,
|
|
296
|
+
"onUpdate:modelValue": [n[0] ||= (e) => c.value = e, d],
|
|
297
|
+
disabled: e.readOnly
|
|
298
|
+
}, null, 8, ["modelValue", "disabled"]), e.lite ? e.qMap.required ? (S(), o("span", xe, [...n[6] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0) : (S(), i(K, {
|
|
215
299
|
key: 0,
|
|
216
|
-
"q-map":
|
|
300
|
+
"q-map": e.qMap
|
|
217
301
|
}, {
|
|
218
|
-
default:
|
|
302
|
+
default: L(() => [e.qMap.required ? (S(), o("span", be, [...n[5] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0)]),
|
|
219
303
|
_: 1
|
|
220
|
-
}, 8, ["q-map"]))], 8,
|
|
221
|
-
default:
|
|
304
|
+
}, 8, ["q-map"]))], 8, ye)) : e.qMap.style === "button" ? (S(), o("div", Se, [s("div", Ce, [u(K, { "q-map": e.qMap }, {
|
|
305
|
+
default: L(() => [e.qMap.required ? (S(), o("span", we, [...n[7] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0)]),
|
|
222
306
|
_: 1
|
|
223
|
-
}, 8, ["q-map"])]),
|
|
307
|
+
}, 8, ["q-map"])]), s("div", Te, [s("button", {
|
|
224
308
|
type: "button",
|
|
225
|
-
"aria-pressed":
|
|
226
|
-
class:
|
|
227
|
-
disabled:
|
|
228
|
-
onClick:
|
|
229
|
-
},
|
|
309
|
+
"aria-pressed": c.value === !0,
|
|
310
|
+
class: g(["gap-2 flex-1 min-h-9 px-3.5 py-2 qmap-button", { "qmap-button-selected": c.value === !0 }]),
|
|
311
|
+
disabled: e.readOnly,
|
|
312
|
+
onClick: n[1] ||= (e) => d(!0)
|
|
313
|
+
}, k(e.qMap.pos || "Yes"), 11, Ee), s("button", {
|
|
230
314
|
type: "button",
|
|
231
|
-
"aria-pressed":
|
|
232
|
-
class:
|
|
233
|
-
disabled:
|
|
234
|
-
onClick:
|
|
235
|
-
},
|
|
315
|
+
"aria-pressed": c.value === !1,
|
|
316
|
+
class: g(["gap-2 flex-1 min-h-9 px-3.5 py-2 qmap-button", { "qmap-button-selected": c.value === !1 }]),
|
|
317
|
+
disabled: e.readOnly,
|
|
318
|
+
onClick: n[2] ||= (e) => d(!1)
|
|
319
|
+
}, k(e.qMap.neg || "No"), 11, De)])])) : (S(), o("label", {
|
|
236
320
|
key: 3,
|
|
237
321
|
class: "inline-flex items-center gap-2 min-h-8 my-2 qmap-check-row",
|
|
238
|
-
for:
|
|
239
|
-
}, [
|
|
240
|
-
id:
|
|
241
|
-
"onUpdate:modelValue":
|
|
322
|
+
for: e.qMap.id
|
|
323
|
+
}, [R(s("input", {
|
|
324
|
+
id: e.qMap.id,
|
|
325
|
+
"onUpdate:modelValue": n[3] ||= (e) => c.value = e,
|
|
242
326
|
type: "checkbox",
|
|
243
327
|
class: "qmap-checkbox",
|
|
244
|
-
disabled:
|
|
245
|
-
onChange:
|
|
246
|
-
}, null, 40,
|
|
328
|
+
disabled: e.readOnly,
|
|
329
|
+
onChange: n[4] ||= (e) => l(c.value)
|
|
330
|
+
}, null, 40, ke), [[j, c.value]]), e.lite ? e.qMap.required && !c.value ? (S(), o("span", je, [...n[9] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0) : (S(), i(K, {
|
|
247
331
|
key: 0,
|
|
248
|
-
"q-map":
|
|
332
|
+
"q-map": e.qMap
|
|
249
333
|
}, {
|
|
250
|
-
default:
|
|
334
|
+
default: L(() => [e.qMap.required && !c.value ? (S(), o("span", Ae, [...n[8] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0)]),
|
|
251
335
|
_: 1
|
|
252
|
-
}, 8, ["q-map"]))], 8,
|
|
336
|
+
}, 8, ["q-map"]))], 8, Oe));
|
|
337
|
+
}
|
|
338
|
+
}), Ne = {
|
|
339
|
+
key: 0,
|
|
340
|
+
class: "inline-flex shrink-0 items-center gap-1 qmap-control-prepend"
|
|
341
|
+
}, Pe = {
|
|
342
|
+
key: 1,
|
|
343
|
+
class: "inline-flex shrink-0 items-center gap-1 qmap-control-append"
|
|
344
|
+
}, X = /* @__PURE__ */ f({
|
|
345
|
+
__name: "FieldControl",
|
|
346
|
+
props: {
|
|
347
|
+
invalid: { type: Boolean },
|
|
348
|
+
disabled: { type: Boolean },
|
|
349
|
+
multiline: { type: Boolean }
|
|
350
|
+
},
|
|
351
|
+
setup(e) {
|
|
352
|
+
return (t, n) => (S(), o("div", { class: g(["flex items-center gap-2 min-w-0 min-h-10 px-3 qmap-control", {
|
|
353
|
+
"items-start": e.multiline,
|
|
354
|
+
"qmap-control-invalid": e.invalid,
|
|
355
|
+
"qmap-control-disabled": e.disabled
|
|
356
|
+
}]) }, [
|
|
357
|
+
t.$slots.prepend ? (S(), o("div", Ne, [E(t.$slots, "prepend")])) : a("", !0),
|
|
358
|
+
E(t.$slots, "default"),
|
|
359
|
+
t.$slots.append ? (S(), o("div", Pe, [E(t.$slots, "append")])) : a("", !0)
|
|
360
|
+
], 2));
|
|
253
361
|
}
|
|
254
|
-
}),
|
|
362
|
+
}), Fe = {
|
|
255
363
|
key: 0,
|
|
256
364
|
class: "inline-flex items-center gap-2"
|
|
257
|
-
},
|
|
365
|
+
}, Ie = { class: "qmap-field flex flex-col gap-1.5 min-w-0 text-sm" }, Le = [
|
|
258
366
|
"aria-expanded",
|
|
259
367
|
"aria-label",
|
|
260
368
|
"disabled",
|
|
261
369
|
"onKeydown"
|
|
262
|
-
],
|
|
370
|
+
], Re = {
|
|
263
371
|
key: 0,
|
|
264
372
|
class: "qmap-required",
|
|
265
373
|
"aria-hidden": "true"
|
|
266
|
-
},
|
|
374
|
+
}, ze = {
|
|
267
375
|
key: 1,
|
|
268
376
|
class: "absolute z-50 top-full left-0 mt-1 w-9/10 overflow-hidden qmap-select-dropdown"
|
|
269
|
-
},
|
|
377
|
+
}, Be = { class: "flex items-center gap-2 px-3 py-2 qmap-select-search-wrap" }, Ve = ["aria-multiselectable"], He = [
|
|
270
378
|
"aria-selected",
|
|
271
379
|
"onMouseenter",
|
|
272
380
|
"onKeydown",
|
|
273
381
|
"onClick"
|
|
274
|
-
],
|
|
382
|
+
], Ue = {
|
|
275
383
|
key: 0,
|
|
276
384
|
class: "inline-flex w-4 justify-center",
|
|
277
385
|
"aria-hidden": "true"
|
|
278
|
-
},
|
|
386
|
+
}, We = { class: "flex-1 min-w-0" }, Ge = {
|
|
279
387
|
key: 0,
|
|
280
388
|
class: "m-0 p-3 text-center qmap-select-empty"
|
|
281
|
-
},
|
|
389
|
+
}, Ke = /* @__PURE__ */ f({
|
|
282
390
|
__name: "SimpleChoice",
|
|
283
391
|
props: {
|
|
284
392
|
modelValue: {},
|
|
@@ -289,214 +397,214 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
289
397
|
required: { type: Boolean }
|
|
290
398
|
},
|
|
291
399
|
emits: ["update:model-value"],
|
|
292
|
-
setup(t, { emit:
|
|
293
|
-
let
|
|
400
|
+
setup(t, { emit: r }) {
|
|
401
|
+
let d = t, f = r, p = w(), m = w(), v = [], x = w(!1), C = w(""), D = w(0), O = w([]), A = w(d.multi ? [] : void 0), j = `qmap-select-${Math.random().toString(36).slice(2)}`, M = {
|
|
294
402
|
title: "Not set",
|
|
295
403
|
value: null,
|
|
296
404
|
icon: "fa fa-ban",
|
|
297
405
|
colour: "#71717a"
|
|
298
|
-
},
|
|
299
|
-
let e =
|
|
300
|
-
return e ?
|
|
301
|
-
}),
|
|
302
|
-
|
|
406
|
+
}, N = n(() => {
|
|
407
|
+
let e = C.value.trim().toLocaleLowerCase();
|
|
408
|
+
return e ? O.value.filter((t) => U(t).toLocaleLowerCase().includes(e)) : O.value;
|
|
409
|
+
}), F = n(() => d.multi ? N.value : [M, ...N.value]), V = n(() => d.multi ? d.qMap.icon : A.value?.icon), H = n(() => d.multi ? (A.value || []).map((e) => U(e)).join(", ") || "Select…" : A.value?.value == null ? "Not set" : U(A.value));
|
|
410
|
+
I(() => d.qMap.values, ee, {
|
|
303
411
|
immediate: !0,
|
|
304
412
|
deep: !0
|
|
305
|
-
}),
|
|
306
|
-
|
|
307
|
-
}, { immediate: !0 }),
|
|
308
|
-
|
|
309
|
-
}),
|
|
310
|
-
|
|
311
|
-
}),
|
|
312
|
-
|
|
413
|
+
}), I(() => d.modelValue, (e) => {
|
|
414
|
+
A.value = W(e);
|
|
415
|
+
}, { immediate: !0 }), I(() => d.multi, () => {
|
|
416
|
+
A.value = W(d.modelValue), q();
|
|
417
|
+
}), I(N, (e) => {
|
|
418
|
+
D.value = Math.min(D.value, Math.max(0, F.value.length - 1));
|
|
419
|
+
}), I(C, () => {
|
|
420
|
+
D.value = 0;
|
|
313
421
|
});
|
|
314
|
-
function
|
|
422
|
+
function U(e) {
|
|
315
423
|
return String(e.title ?? e.value ?? "Not set");
|
|
316
424
|
}
|
|
317
425
|
function ee() {
|
|
318
|
-
|
|
426
|
+
O.value = (d.qMap.values || []).map((e) => ({
|
|
319
427
|
...e,
|
|
320
428
|
title: e.title || String(e.value ?? "Not set")
|
|
321
|
-
})),
|
|
429
|
+
})), A.value = W(d.modelValue);
|
|
322
430
|
}
|
|
323
|
-
function
|
|
324
|
-
return
|
|
431
|
+
function W(e) {
|
|
432
|
+
return d.multi ? Array.isArray(e) ? O.value.filter((t) => e.some((e) => Object.is(e, t.value))) : [] : O.value.find((t) => Object.is(t.value, e)) || M;
|
|
325
433
|
}
|
|
326
|
-
function
|
|
327
|
-
return
|
|
434
|
+
function G(e) {
|
|
435
|
+
return d.multi ? (A.value || []).some((t) => Object.is(t.value, e.value)) : e.value == null ? A.value?.value == null : Object.is(A.value?.value, e.value);
|
|
328
436
|
}
|
|
329
|
-
function
|
|
330
|
-
|
|
437
|
+
function q() {
|
|
438
|
+
f("update:model-value", d.multi ? (A.value || []).map((e) => e.value) : A.value?.value);
|
|
331
439
|
}
|
|
332
440
|
function te() {
|
|
333
|
-
|
|
441
|
+
d.readOnly || x.value || (x.value = !0, C.value = "", D.value = 0, h(() => m.value?.focus()));
|
|
334
442
|
}
|
|
335
|
-
function
|
|
336
|
-
|
|
443
|
+
function J() {
|
|
444
|
+
x.value = !1, C.value = "";
|
|
337
445
|
}
|
|
338
446
|
function ne(e) {
|
|
339
|
-
if (
|
|
340
|
-
let t =
|
|
341
|
-
|
|
447
|
+
if (d.multi) {
|
|
448
|
+
let t = A.value || [];
|
|
449
|
+
A.value = G(e) ? t.filter((t) => !Object.is(t.value, e.value)) : [...t, e], q();
|
|
342
450
|
return;
|
|
343
451
|
}
|
|
344
|
-
|
|
452
|
+
A.value = e, q(), J();
|
|
345
453
|
}
|
|
346
454
|
function re() {
|
|
347
|
-
|
|
455
|
+
A.value = d.multi ? [] : {
|
|
348
456
|
title: "Not set",
|
|
349
457
|
value: null
|
|
350
|
-
},
|
|
458
|
+
}, q(), d.multi || J();
|
|
351
459
|
}
|
|
352
460
|
function ie(e, t) {
|
|
353
|
-
t instanceof HTMLButtonElement && (
|
|
461
|
+
t instanceof HTMLButtonElement && (v[e] = t);
|
|
354
462
|
}
|
|
355
|
-
function
|
|
356
|
-
|
|
463
|
+
function Y(e) {
|
|
464
|
+
F.value.length && (D.value = (e + F.value.length) % F.value.length, h(() => v[D.value]?.focus()));
|
|
357
465
|
}
|
|
358
466
|
function ae(e) {
|
|
359
|
-
e.key === "ArrowDown" ? (e.preventDefault(),
|
|
467
|
+
e.key === "ArrowDown" ? (e.preventDefault(), Y(D.value)) : e.key === "Escape" ? (e.preventDefault(), J()) : e.key === "Enter" && F.value[D.value] && (e.preventDefault(), ne(F.value[D.value]));
|
|
360
468
|
}
|
|
361
469
|
function oe(e, t) {
|
|
362
|
-
e.key === "ArrowDown" ? (e.preventDefault(),
|
|
470
|
+
e.key === "ArrowDown" ? (e.preventDefault(), Y(t + 1)) : e.key === "ArrowUp" ? (e.preventDefault(), Y(t - 1)) : e.key === "Escape" ? (e.preventDefault(), J()) : e.key === "Tab" && !e.shiftKey && t === F.value.length - 1 && J();
|
|
363
471
|
}
|
|
364
472
|
function se(e) {
|
|
365
|
-
|
|
473
|
+
p.value && !p.value.contains(e.target) && J();
|
|
366
474
|
}
|
|
367
|
-
return
|
|
475
|
+
return b(() => document.addEventListener("pointerdown", se)), y(() => document.removeEventListener("pointerdown", se)), (n, r) => t.lite && t.readOnly ? (S(), o("div", Fe, [A.value?.icon ? (S(), o("i", {
|
|
368
476
|
key: 0,
|
|
369
|
-
class:
|
|
370
|
-
style:
|
|
477
|
+
class: g(A.value.icon),
|
|
478
|
+
style: _({ color: A.value.colour }),
|
|
371
479
|
"aria-hidden": "true"
|
|
372
|
-
}, null, 6)) :
|
|
480
|
+
}, null, 6)) : a("", !0), l(" " + k(H.value), 1)])) : (S(), o("div", {
|
|
373
481
|
key: 1,
|
|
374
482
|
ref_key: "root",
|
|
375
|
-
ref:
|
|
483
|
+
ref: p,
|
|
376
484
|
class: "flex flex-col relative w-full gap-1 min-w-0 min-h-10"
|
|
377
485
|
}, [
|
|
378
|
-
t.lite ?
|
|
486
|
+
t.lite ? a("", !0) : (S(), i(K, {
|
|
379
487
|
key: 0,
|
|
380
488
|
"q-map": t.qMap
|
|
381
489
|
}, null, 8, ["q-map"])),
|
|
382
|
-
|
|
383
|
-
append:
|
|
384
|
-
t.required && (!
|
|
385
|
-
(t.multi ?
|
|
490
|
+
s("label", Ie, [u(X, { disabled: t.readOnly }, c({
|
|
491
|
+
append: L(() => [
|
|
492
|
+
t.required && (!A.value || A.value?.value == null) ? (S(), o("span", Re, [...r[2] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0),
|
|
493
|
+
(t.multi ? A.value?.length : A.value?.value != null) && !t.readOnly ? (S(), o("button", {
|
|
386
494
|
key: 1,
|
|
387
495
|
type: "button",
|
|
388
496
|
class: "inline-flex items-center justify-center min-w-8 min-h-8 p-1 qmap-icon-button qmap-select-clear",
|
|
389
497
|
"aria-label": "Clear selection",
|
|
390
|
-
onClick:
|
|
391
|
-
}, [...
|
|
392
|
-
|
|
393
|
-
class:
|
|
498
|
+
onClick: B(re, ["stop"])
|
|
499
|
+
}, [...r[3] ||= [s("i", { class: "fa fa-times" }, null, -1)]])) : a("", !0),
|
|
500
|
+
s("i", {
|
|
501
|
+
class: g(["fa fa-chevron-down qmap-select-chevron", { "qmap-select-chevron-open": x.value }]),
|
|
394
502
|
"aria-hidden": "true"
|
|
395
503
|
}, null, 2)
|
|
396
504
|
]),
|
|
397
|
-
default:
|
|
505
|
+
default: L(() => [s("button", {
|
|
398
506
|
type: "button",
|
|
399
507
|
class: "qmap-input qmap-select-trigger flex flex-1 min-w-0 min-h-0 items-center justify-start px-0 py-2 text-left",
|
|
400
508
|
role: "combobox",
|
|
401
|
-
"aria-expanded":
|
|
402
|
-
"aria-controls":
|
|
509
|
+
"aria-expanded": x.value,
|
|
510
|
+
"aria-controls": j,
|
|
403
511
|
"aria-label": t.qMap.title || t.qMap.id,
|
|
404
512
|
disabled: t.readOnly,
|
|
405
|
-
onClick:
|
|
406
|
-
onKeydown: [B(
|
|
407
|
-
}, [
|
|
513
|
+
onClick: r[0] ||= (e) => x.value ? J() : te(),
|
|
514
|
+
onKeydown: [z(B(te, ["prevent"]), ["down"]), z(B(J, ["prevent"]), ["esc"])]
|
|
515
|
+
}, [s("span", { class: g(["flex flex-1 min-w-0 items-center flex-wrap gap-1 overflow-hidden", { "qmap-select-placeholder": !d.multi && A.value?.value == null }]) }, [t.multi && A.value?.length ? (S(!0), o(e, { key: 0 }, T(A.value, (e) => (S(), o("span", {
|
|
408
516
|
key: String(e.value),
|
|
409
517
|
class: "inline-flex max-w-full items-center qmap-select-chip"
|
|
410
|
-
},
|
|
518
|
+
}, k(U(e)), 1))), 128)) : (S(), o(e, { key: 1 }, [l(k(H.value), 1)], 64))], 2)], 40, Le)]),
|
|
411
519
|
_: 2
|
|
412
|
-
}, [
|
|
520
|
+
}, [V.value || t.qMap.icon ? {
|
|
413
521
|
name: "prepend",
|
|
414
|
-
fn:
|
|
415
|
-
class:
|
|
416
|
-
style:
|
|
522
|
+
fn: L(() => [E(n.$slots, "default"), s("i", {
|
|
523
|
+
class: g(V.value),
|
|
524
|
+
style: _({ color: A.value?.colour }),
|
|
417
525
|
"aria-hidden": "true"
|
|
418
526
|
}, null, 6)]),
|
|
419
527
|
key: "0"
|
|
420
528
|
} : void 0]), 1032, ["disabled"])]),
|
|
421
|
-
|
|
529
|
+
x.value ? (S(), o("div", ze, [s("div", Be, [r[4] ||= s("i", {
|
|
422
530
|
class: "fa fa-search qmap-select-search-icon",
|
|
423
531
|
"aria-hidden": "true"
|
|
424
|
-
}, null, -1),
|
|
532
|
+
}, null, -1), R(s("input", {
|
|
425
533
|
ref_key: "searchInput",
|
|
426
|
-
ref:
|
|
427
|
-
"onUpdate:modelValue":
|
|
534
|
+
ref: m,
|
|
535
|
+
"onUpdate:modelValue": r[1] ||= (e) => C.value = e,
|
|
428
536
|
type: "search",
|
|
429
537
|
class: "flex-1 min-w-0 qmap-select-search",
|
|
430
538
|
placeholder: "Search…",
|
|
431
539
|
autocomplete: "off",
|
|
432
540
|
"aria-label": "Search options",
|
|
433
541
|
onKeydown: ae
|
|
434
|
-
}, null, 544), [[
|
|
435
|
-
id:
|
|
542
|
+
}, null, 544), [[P, C.value]])]), s("div", {
|
|
543
|
+
id: j,
|
|
436
544
|
class: "max-h-64 overflow-auto p-1",
|
|
437
545
|
role: "listbox",
|
|
438
546
|
"aria-multiselectable": t.multi || void 0
|
|
439
|
-
}, [(
|
|
440
|
-
key: `${
|
|
547
|
+
}, [(S(!0), o(e, null, T(F.value, (e, r) => (S(), o("button", {
|
|
548
|
+
key: `${r}-${String(e.value)}`,
|
|
441
549
|
ref_for: !0,
|
|
442
|
-
ref: (e) => ie(
|
|
550
|
+
ref: (e) => ie(r, e),
|
|
443
551
|
type: "button",
|
|
444
552
|
role: "option",
|
|
445
|
-
class:
|
|
446
|
-
"qmap-select-option-active":
|
|
447
|
-
"qmap-select-option-selected":
|
|
553
|
+
class: g(["flex w-full min-h-9 items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm qmap-select-option", {
|
|
554
|
+
"qmap-select-option-active": D.value === r,
|
|
555
|
+
"qmap-select-option-selected": G(e)
|
|
448
556
|
}]),
|
|
449
|
-
"aria-selected":
|
|
450
|
-
onMouseenter: (e) =>
|
|
451
|
-
onKeydown: (e) => oe(e,
|
|
557
|
+
"aria-selected": G(e),
|
|
558
|
+
onMouseenter: (e) => D.value = r,
|
|
559
|
+
onKeydown: (e) => oe(e, r),
|
|
452
560
|
onClick: (t) => ne(e)
|
|
453
|
-
}, [
|
|
561
|
+
}, [E(n.$slots, "option", {
|
|
454
562
|
option: e,
|
|
455
|
-
selected:
|
|
456
|
-
active:
|
|
563
|
+
selected: G(e),
|
|
564
|
+
active: D.value === r
|
|
457
565
|
}, () => [
|
|
458
|
-
t.multi ? (
|
|
459
|
-
e.icon ? (
|
|
566
|
+
t.multi ? (S(), o("span", Ue, k(G(e) ? "✓" : ""), 1)) : a("", !0),
|
|
567
|
+
e.icon ? (S(), o("i", {
|
|
460
568
|
key: 1,
|
|
461
|
-
class:
|
|
462
|
-
style:
|
|
569
|
+
class: g([e.icon, "w-4 text-center"]),
|
|
570
|
+
style: _({ color: e.colour }),
|
|
463
571
|
"aria-hidden": "true"
|
|
464
|
-
}, null, 6)) :
|
|
465
|
-
|
|
466
|
-
])], 42,
|
|
572
|
+
}, null, 6)) : a("", !0),
|
|
573
|
+
s("span", We, k(U(e)), 1)
|
|
574
|
+
])], 42, He))), 128)), F.value.length ? a("", !0) : (S(), o("p", Ge, "No options found."))], 8, Ve)])) : a("", !0)
|
|
467
575
|
], 512));
|
|
468
576
|
}
|
|
469
|
-
}),
|
|
577
|
+
}), qe = {
|
|
470
578
|
key: 0,
|
|
471
579
|
class: "block"
|
|
472
|
-
},
|
|
580
|
+
}, Je = /* @__PURE__ */ f({
|
|
473
581
|
__name: "icon-block",
|
|
474
582
|
props: { qMap: {} },
|
|
475
583
|
setup(e) {
|
|
476
|
-
let t = e,
|
|
477
|
-
return (t,
|
|
584
|
+
let t = e, r = n(() => [t.qMap.icon || "", t.qMap.colour || ""].reduce((e, t) => e + " " + t));
|
|
585
|
+
return (t, n) => e.qMap.icon ? (S(), o("span", qe, [s("i", { class: g(r.value) }, null, 2)])) : a("", !0);
|
|
478
586
|
}
|
|
479
|
-
}),
|
|
587
|
+
}), Ye = { key: 0 }, Xe = { class: "inline-flex items-center gap-2" }, Ze = [
|
|
480
588
|
"name",
|
|
481
589
|
"value",
|
|
482
590
|
"disabled",
|
|
483
591
|
"onChange"
|
|
484
|
-
],
|
|
592
|
+
], Qe = { class: "mt-1 inline-flex items-center gap-1" }, $e = { key: 1 }, et = { class: "inline-flex items-center gap-2 min-h-8 qmap-check-row" }, tt = [
|
|
485
593
|
"name",
|
|
486
594
|
"value",
|
|
487
595
|
"disabled",
|
|
488
596
|
"onChange"
|
|
489
|
-
],
|
|
597
|
+
], nt = { class: "mt-1" }, rt = {
|
|
490
598
|
key: 2,
|
|
491
599
|
class: "sm:flex items-center"
|
|
492
|
-
},
|
|
600
|
+
}, it = { class: "sm:w-1/2 md:w-1/4" }, at = {
|
|
493
601
|
class: "btn-group sm:w-1/2 md:w-3/4 flex",
|
|
494
602
|
role: "group"
|
|
495
|
-
},
|
|
603
|
+
}, ot = [
|
|
496
604
|
"aria-pressed",
|
|
497
605
|
"disabled",
|
|
498
606
|
"onClick"
|
|
499
|
-
],
|
|
607
|
+
], st = /* @__PURE__ */ f({
|
|
500
608
|
__name: "qChoice",
|
|
501
609
|
props: {
|
|
502
610
|
qMap: {},
|
|
@@ -510,68 +618,68 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
510
618
|
},
|
|
511
619
|
emits: ["qmap_change", "qmap_subquestions"],
|
|
512
620
|
setup(t, { emit: n }) {
|
|
513
|
-
let
|
|
514
|
-
|
|
515
|
-
|
|
621
|
+
let r = t, c = n, d = w();
|
|
622
|
+
I(() => r.model, (e) => d.value = r.model[r.qMap.id]), v(() => {
|
|
623
|
+
d.value = r.model[r.qMap.id], f(d.value);
|
|
516
624
|
});
|
|
517
|
-
function
|
|
518
|
-
let t =
|
|
519
|
-
|
|
625
|
+
function f(e) {
|
|
626
|
+
let t = r.qMap.values?.find((t) => t.value == e);
|
|
627
|
+
c("qmap_subquestions", t?.onSelect);
|
|
520
628
|
}
|
|
521
|
-
function
|
|
522
|
-
|
|
523
|
-
qMap:
|
|
629
|
+
function p(e) {
|
|
630
|
+
c("qmap_change", {
|
|
631
|
+
qMap: r.qMap,
|
|
524
632
|
value: e
|
|
525
|
-
}),
|
|
633
|
+
}), f(e);
|
|
526
634
|
}
|
|
527
|
-
return (n,
|
|
635
|
+
return (n, r) => t.qMap.style == "radio" ? (S(), o("div", Ye, [u(K, { "q-map": t.qMap }, null, 8, ["q-map"]), s("div", Xe, [(S(!0), o(e, null, T(t.qMap.values, (e) => (S(), o("div", {
|
|
528
636
|
key: String(e.value),
|
|
529
637
|
class: "inline-flex items-center gap-0 min-h-8 qmap-check-row"
|
|
530
|
-
}, [
|
|
531
|
-
"onUpdate:modelValue":
|
|
638
|
+
}, [R(s("input", {
|
|
639
|
+
"onUpdate:modelValue": r[0] ||= (e) => d.value = e,
|
|
532
640
|
type: "radio",
|
|
533
641
|
name: t.qMap.id,
|
|
534
642
|
value: e.value,
|
|
535
643
|
disabled: t.readOnly,
|
|
536
|
-
onChange: (t) =>
|
|
537
|
-
}, null, 40,
|
|
644
|
+
onChange: (t) => p(e.value)
|
|
645
|
+
}, null, 40, Ze), [[M, d.value]]), s("div", Qe, [e.icon ? (S(), o("i", {
|
|
538
646
|
key: 0,
|
|
539
|
-
class:
|
|
647
|
+
class: g(e.icon),
|
|
540
648
|
"aria-hidden": "true"
|
|
541
|
-
}, null, 2)) :
|
|
542
|
-
"onUpdate:modelValue":
|
|
649
|
+
}, null, 2)) : a("", !0), l(k(e.title || e.value), 1)])]))), 128))])])) : t.qMap.style == "v-radio" ? (S(), o("div", $e, [u(K, { "q-map": t.qMap }, null, 8, ["q-map"]), (S(!0), o(e, null, T(t.qMap.values, (e) => (S(), o("div", null, [s("label", et, [R(s("input", {
|
|
650
|
+
"onUpdate:modelValue": r[1] ||= (e) => d.value = e,
|
|
543
651
|
type: "radio",
|
|
544
652
|
name: t.qMap.id,
|
|
545
653
|
value: e.value,
|
|
546
654
|
disabled: t.readOnly,
|
|
547
|
-
onChange: (t) =>
|
|
548
|
-
}, null, 40,
|
|
655
|
+
onChange: (t) => p(e.value)
|
|
656
|
+
}, null, 40, tt), [[M, d.value]]), s("div", nt, [e.icon ? (S(), o("i", {
|
|
549
657
|
key: 0,
|
|
550
|
-
class:
|
|
658
|
+
class: g(e.icon),
|
|
551
659
|
"aria-hidden": "true"
|
|
552
|
-
}, null, 2)) :
|
|
660
|
+
}, null, 2)) : a("", !0), l(k(e.title || e.value), 1)])])]))), 256))])) : t.qMap.style == "buttons" ? (S(), o("div", rt, [s("div", it, [u(K, { "q-map": t.qMap }, null, 8, ["q-map"])]), s("div", at, [(S(!0), o(e, null, T(t.qMap.values, (e) => (S(), o("button", {
|
|
553
661
|
key: String(e.value),
|
|
554
662
|
type: "button",
|
|
555
|
-
class:
|
|
556
|
-
"aria-pressed":
|
|
663
|
+
class: g(["flex-1 inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button", { "qmap-button-selected": d.value === e.value }]),
|
|
664
|
+
"aria-pressed": d.value === e.value,
|
|
557
665
|
disabled: t.readOnly,
|
|
558
666
|
onClick: (t) => {
|
|
559
|
-
|
|
667
|
+
d.value = e.value, p(e.value);
|
|
560
668
|
}
|
|
561
|
-
}, [e.icon ? (
|
|
669
|
+
}, [e.icon ? (S(), o("i", {
|
|
562
670
|
key: 0,
|
|
563
|
-
class:
|
|
671
|
+
class: g(e.icon),
|
|
564
672
|
"aria-hidden": "true"
|
|
565
|
-
}, null, 2)) :
|
|
673
|
+
}, null, 2)) : a("", !0), l(k(e.title || e.value), 1)], 10, ot))), 128))])])) : (S(), i(Ke, {
|
|
566
674
|
key: 3,
|
|
567
|
-
modelValue:
|
|
568
|
-
"onUpdate:modelValue": [
|
|
675
|
+
modelValue: d.value,
|
|
676
|
+
"onUpdate:modelValue": [r[2] ||= (e) => d.value = e, p],
|
|
569
677
|
"q-map": t.qMap,
|
|
570
678
|
readOnly: t.readOnly,
|
|
571
679
|
lite: t.lite,
|
|
572
680
|
required: t.qMap.required
|
|
573
681
|
}, {
|
|
574
|
-
default:
|
|
682
|
+
default: L(() => [u(Je, { qMap: t.qMap }, null, 8, ["qMap"])]),
|
|
575
683
|
_: 1
|
|
576
684
|
}, 8, [
|
|
577
685
|
"modelValue",
|
|
@@ -581,14 +689,14 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
581
689
|
"required"
|
|
582
690
|
]));
|
|
583
691
|
}
|
|
584
|
-
}),
|
|
692
|
+
}), ct = {
|
|
585
693
|
key: 0,
|
|
586
694
|
class: "inline-flex items-center gap-2"
|
|
587
|
-
},
|
|
695
|
+
}, lt = ["for"], ut = ["value", "disabled"], dt = [
|
|
588
696
|
"id",
|
|
589
697
|
"value",
|
|
590
698
|
"readonly"
|
|
591
|
-
],
|
|
699
|
+
], ft = /* @__PURE__ */ f({
|
|
592
700
|
__name: "qColour",
|
|
593
701
|
props: {
|
|
594
702
|
qMap: {},
|
|
@@ -601,65 +709,65 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
601
709
|
style: {}
|
|
602
710
|
},
|
|
603
711
|
emits: ["qmap_change", "qmap_subquestions"],
|
|
604
|
-
setup(
|
|
605
|
-
let
|
|
606
|
-
function
|
|
607
|
-
|
|
608
|
-
qMap:
|
|
712
|
+
setup(e, { emit: t }) {
|
|
713
|
+
let r = e, i = t, a = n(() => r.model[r.qMap.id]);
|
|
714
|
+
function d(e) {
|
|
715
|
+
i("qmap_change", {
|
|
716
|
+
qMap: r.qMap,
|
|
609
717
|
value: e
|
|
610
718
|
});
|
|
611
719
|
}
|
|
612
|
-
return (
|
|
720
|
+
return (t, n) => e.lite && e.readOnly ? (S(), o("div", ct, [s("span", {
|
|
613
721
|
class: "inline-block w-4 h-4 rounded-full qmap-colour-swatch",
|
|
614
|
-
style:
|
|
615
|
-
}, null, 4),
|
|
722
|
+
style: _({ backgroundColor: a.value })
|
|
723
|
+
}, null, 4), l(k(a.value), 1)])) : (S(), o("label", {
|
|
616
724
|
key: 1,
|
|
617
725
|
class: "qmap-field flex flex-col gap-1.5 text-sm",
|
|
618
|
-
for:
|
|
619
|
-
}, [
|
|
620
|
-
disabled:
|
|
726
|
+
for: e.qMap.id
|
|
727
|
+
}, [u(K, { "q-map": e.qMap }, null, 8, ["q-map"]), u(X, {
|
|
728
|
+
disabled: e.readOnly,
|
|
621
729
|
class: ""
|
|
622
|
-
},
|
|
623
|
-
append:
|
|
624
|
-
value:
|
|
730
|
+
}, c({
|
|
731
|
+
append: L(() => [s("input", {
|
|
732
|
+
value: a.value || "#000000",
|
|
625
733
|
type: "color",
|
|
626
734
|
class: "shrink-0 w-7 h-7 p-0.5 qmap-color-picker border-none",
|
|
627
735
|
"aria-label": "Choose color",
|
|
628
|
-
disabled:
|
|
629
|
-
onInput:
|
|
630
|
-
}, null, 40,
|
|
631
|
-
default:
|
|
632
|
-
id:
|
|
633
|
-
value:
|
|
736
|
+
disabled: e.readOnly,
|
|
737
|
+
onInput: n[0] ||= (e) => d(e.target.value)
|
|
738
|
+
}, null, 40, ut)]),
|
|
739
|
+
default: L(() => [s("input", {
|
|
740
|
+
id: e.qMap.id,
|
|
741
|
+
value: a.value,
|
|
634
742
|
type: "text",
|
|
635
743
|
class: "qmap-input flex-1 px-0 py-2",
|
|
636
|
-
readonly:
|
|
637
|
-
onChange:
|
|
638
|
-
}, null, 40,
|
|
744
|
+
readonly: e.readOnly,
|
|
745
|
+
onChange: n[1] ||= (e) => d(e.target.value)
|
|
746
|
+
}, null, 40, dt)]),
|
|
639
747
|
_: 2
|
|
640
|
-
}, [
|
|
748
|
+
}, [e.qMap.icon ? {
|
|
641
749
|
name: "prepend",
|
|
642
|
-
fn:
|
|
750
|
+
fn: L(() => [u(Je, { qMap: e.qMap }, null, 8, ["qMap"])]),
|
|
643
751
|
key: "0"
|
|
644
|
-
} : void 0]), 1032, ["disabled"])], 8,
|
|
752
|
+
} : void 0]), 1032, ["disabled"])], 8, lt));
|
|
645
753
|
}
|
|
646
|
-
}),
|
|
754
|
+
}), pt = {
|
|
647
755
|
key: 0,
|
|
648
756
|
class: "calendar-modal"
|
|
649
|
-
},
|
|
757
|
+
}, mt = { class: "calendar-dialog flex flex-col gap-2" }, ht = { class: "flex justify-between mb-2" }, gt = { class: "flex" }, _t = { class: "grid grid-cols-7" }, vt = ["onClick"], yt = {
|
|
650
758
|
key: 0,
|
|
651
759
|
class: "calendar-time"
|
|
652
|
-
},
|
|
760
|
+
}, bt = ["value"], xt = ["value"], St = /* @__PURE__ */ f({
|
|
653
761
|
__name: "CalendarPicker",
|
|
654
762
|
props: {
|
|
655
763
|
modelValue: {},
|
|
656
764
|
withTime: { type: Boolean }
|
|
657
765
|
},
|
|
658
766
|
emits: ["update:modelValue"],
|
|
659
|
-
setup(
|
|
660
|
-
let
|
|
767
|
+
setup(r, { emit: c }) {
|
|
768
|
+
let l = Array.from({ length: 24 }, (e, t) => t), u = Array.from({ length: 60 }, (e, t) => t), d = r, f = c, p = w(!1);
|
|
661
769
|
var m = d.modelValue ? new Date(d.modelValue) : /* @__PURE__ */ new Date();
|
|
662
|
-
let h =
|
|
770
|
+
let h = w(m.getFullYear()), _ = w(m.getMonth()), v = w(m.getDate()), y = w(m.getHours()), b = w(m.getMinutes()), x = [
|
|
663
771
|
"Sun",
|
|
664
772
|
"Mon",
|
|
665
773
|
"Tue",
|
|
@@ -667,112 +775,112 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
667
775
|
"Thu",
|
|
668
776
|
"Fri",
|
|
669
777
|
"Sat"
|
|
670
|
-
],
|
|
671
|
-
function
|
|
672
|
-
return console.log(
|
|
778
|
+
], C = n(() => h.value), D = n(() => _.value), O = n(() => new Date(C.value, D.value).toLocaleString("default", { month: "long" })), j = n(() => new Date(C.value, D.value + 1, 0).getDate()), M = n(() => Array(new Date(C.value, D.value, 1).getDay()).fill(0));
|
|
779
|
+
function P(e) {
|
|
780
|
+
return console.log(D.value + " " + m.getMonth()), e === v.value && D.value === m.getMonth() && C.value === m.getFullYear();
|
|
673
781
|
}
|
|
674
782
|
function F(e) {
|
|
675
|
-
|
|
783
|
+
v.value = e, m = new Date(h.value, _.value, v.value, d.withTime ? y.value : 0, d.withTime ? b.value : 0, 0, 0);
|
|
676
784
|
}
|
|
677
|
-
function
|
|
678
|
-
|
|
785
|
+
function L() {
|
|
786
|
+
_.value === 0 ? (_.value = 11, --h.value) : --_.value;
|
|
679
787
|
}
|
|
680
|
-
function
|
|
681
|
-
|
|
788
|
+
function z() {
|
|
789
|
+
_.value === 11 ? (_.value = 0, h.value += 1) : _.value += 1;
|
|
682
790
|
}
|
|
683
791
|
function B() {
|
|
684
|
-
let e = new Date(h.value,
|
|
792
|
+
let e = new Date(h.value, _.value, v.value, d.withTime ? y.value : 0, d.withTime ? b.value : 0, 0, 0);
|
|
685
793
|
f("update:modelValue", e.getTime()), p.value = !1;
|
|
686
794
|
}
|
|
687
795
|
function V() {
|
|
688
796
|
p.value = !1;
|
|
689
797
|
}
|
|
690
|
-
return
|
|
798
|
+
return I(() => d.modelValue, (e) => {
|
|
691
799
|
if (e) {
|
|
692
800
|
let t = new Date(e);
|
|
693
|
-
h.value = t.getFullYear(),
|
|
801
|
+
h.value = t.getFullYear(), _.value = t.getMonth(), v.value = t.getDate(), y.value = t.getHours(), b.value = t.getMinutes();
|
|
694
802
|
}
|
|
695
|
-
}),
|
|
803
|
+
}), n(() => {
|
|
696
804
|
if (!d.modelValue) return "";
|
|
697
805
|
let e = new Date(d.modelValue), t = e.toLocaleDateString();
|
|
698
806
|
return d.withTime ? `${t} ${e.getHours().toString().padStart(2, "0") + ":" + e.getMinutes().toString().padStart(2, "0")}` : t;
|
|
699
|
-
}), (
|
|
700
|
-
onClick:
|
|
807
|
+
}), (n, c) => (S(), o(e, null, [s("button", {
|
|
808
|
+
onClick: c[0] ||= (e) => p.value = !0,
|
|
701
809
|
style: {
|
|
702
810
|
border: "none",
|
|
703
811
|
background: "none"
|
|
704
812
|
},
|
|
705
813
|
class: "qmap-button"
|
|
706
|
-
}, [
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
onClick:
|
|
814
|
+
}, [E(n.$slots, "default")]), (S(), i(t, { to: "body" }, [p.value ? (S(), o("div", pt, [s("div", mt, [
|
|
815
|
+
s("div", ht, [
|
|
816
|
+
s("button", {
|
|
817
|
+
onClick: L,
|
|
710
818
|
class: "border-none bg-inherit qmap-button"
|
|
711
|
-
}, [...
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
onClick:
|
|
819
|
+
}, [...c[3] ||= [s("i", { class: "fa fa-arrow-left" }, null, -1)]]),
|
|
820
|
+
s("span", null, k(O.value) + " " + k(C.value), 1),
|
|
821
|
+
s("button", {
|
|
822
|
+
onClick: z,
|
|
715
823
|
class: "border-none bg-inherit qmap-button"
|
|
716
|
-
}, [...
|
|
824
|
+
}, [...c[4] ||= [s("i", { class: "fa fa-arrow-right" }, null, -1)]])
|
|
717
825
|
]),
|
|
718
|
-
|
|
826
|
+
s("div", gt, [(S(), o(e, null, T(x, (e) => s("div", {
|
|
719
827
|
key: e,
|
|
720
828
|
class: "w-1/7 text-center"
|
|
721
|
-
},
|
|
722
|
-
|
|
829
|
+
}, k(e), 1)), 64))]),
|
|
830
|
+
s("div", _t, [(S(!0), o(e, null, T(M.value, (e) => (S(), o("span", {
|
|
723
831
|
key: "blank-" + e,
|
|
724
832
|
class: ""
|
|
725
|
-
}, "\xA0"))), 128)), (
|
|
833
|
+
}, "\xA0"))), 128)), (S(!0), o(e, null, T(j.value, (e) => (S(), o("button", {
|
|
726
834
|
key: "day-" + e,
|
|
727
|
-
class:
|
|
728
|
-
"bg-zinc-900 text-zinc-100 dark:bg-zinc-100 dark:text-zinc-900":
|
|
729
|
-
"bg-zinc-100 text-zinc-900 dark:bg-zinc-900 dark:text-zinc-100": !
|
|
835
|
+
class: g(["p-2 border-none", {
|
|
836
|
+
"bg-zinc-900 text-zinc-100 dark:bg-zinc-100 dark:text-zinc-900": P(e),
|
|
837
|
+
"bg-zinc-100 text-zinc-900 dark:bg-zinc-900 dark:text-zinc-100": !P(e)
|
|
730
838
|
}]),
|
|
731
839
|
onClick: (t) => F(e)
|
|
732
|
-
},
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
"onUpdate:modelValue":
|
|
840
|
+
}, k(e), 11, vt))), 128))]),
|
|
841
|
+
r.withTime ? (S(), o("div", yt, [
|
|
842
|
+
R(s("select", {
|
|
843
|
+
"onUpdate:modelValue": c[1] ||= (e) => y.value = e,
|
|
736
844
|
class: "qmap-input px-2 py-1"
|
|
737
|
-
}, [(
|
|
845
|
+
}, [(S(!0), o(e, null, T(A(l), (e) => (S(), o("option", {
|
|
738
846
|
key: e,
|
|
739
847
|
value: e
|
|
740
|
-
},
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
"onUpdate:modelValue":
|
|
848
|
+
}, k(String(e).padStart(2, "0")), 9, bt))), 128))], 512), [[N, y.value]]),
|
|
849
|
+
c[5] ||= s("span", null, ":", -1),
|
|
850
|
+
R(s("select", {
|
|
851
|
+
"onUpdate:modelValue": c[2] ||= (e) => b.value = e,
|
|
744
852
|
class: "qmap-input px-2 py-1"
|
|
745
|
-
}, [(
|
|
853
|
+
}, [(S(!0), o(e, null, T(A(u), (e) => (S(), o("option", {
|
|
746
854
|
key: e,
|
|
747
855
|
value: e
|
|
748
|
-
},
|
|
749
|
-
])) :
|
|
750
|
-
|
|
856
|
+
}, k(String(e).padStart(2, "0")), 9, xt))), 128))], 512), [[N, b.value]])
|
|
857
|
+
])) : a("", !0),
|
|
858
|
+
s("div", { class: "flex justify-between" }, [s("button", {
|
|
751
859
|
onClick: B,
|
|
752
860
|
class: "qmap-button p-2"
|
|
753
|
-
}, "Ok"),
|
|
861
|
+
}, "Ok"), s("button", {
|
|
754
862
|
onClick: V,
|
|
755
863
|
class: "qmap-button"
|
|
756
864
|
}, "Cancel")])
|
|
757
|
-
]),
|
|
865
|
+
]), s("div", {
|
|
758
866
|
class: "calendar-backdrop",
|
|
759
867
|
onClick: V
|
|
760
|
-
})])) :
|
|
868
|
+
})])) : a("", !0)]))], 64));
|
|
761
869
|
}
|
|
762
|
-
}),
|
|
870
|
+
}), Ct = [
|
|
763
871
|
"placeholder",
|
|
764
872
|
"readonly",
|
|
765
873
|
"aria-invalid",
|
|
766
874
|
"onKeydown"
|
|
767
|
-
],
|
|
875
|
+
], wt = {
|
|
768
876
|
key: 0,
|
|
769
877
|
class: "date-error",
|
|
770
878
|
role: "status"
|
|
771
|
-
},
|
|
879
|
+
}, Tt = {
|
|
772
880
|
key: 3,
|
|
773
881
|
class: "date-required",
|
|
774
882
|
"aria-hidden": "true"
|
|
775
|
-
},
|
|
883
|
+
}, Et = /*#__PURE__*/ ge(/* @__PURE__ */ f({
|
|
776
884
|
__name: "SimpleDate",
|
|
777
885
|
props: {
|
|
778
886
|
title: {},
|
|
@@ -792,74 +900,74 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
792
900
|
},
|
|
793
901
|
emits: ["update:model-value", "change"],
|
|
794
902
|
setup(e, { emit: t }) {
|
|
795
|
-
let r = e,
|
|
796
|
-
function
|
|
903
|
+
let r = e, l = t, d = `date-${Math.random().toString(36).slice(2)}`, f = r.dateFormat || "d-MMM-yy", p = r.timeFormat || "HH:mm", m = r.dateOnly ? f : `${p} ${f}`, h = n(() => r.dateOnly ? "Date" : "Time and date"), _ = w(""), v = w(!1), y = w();
|
|
904
|
+
function b(e) {
|
|
797
905
|
if (e == null) {
|
|
798
|
-
_.value = "",
|
|
906
|
+
_.value = "", v.value = !1;
|
|
799
907
|
return;
|
|
800
908
|
}
|
|
801
|
-
let t = e instanceof Date ?
|
|
802
|
-
_.value = t.setZone(r.timezone || "local").toFormat(
|
|
909
|
+
let t = e instanceof Date ? V.fromJSDate(e) : V.fromMillis(e);
|
|
910
|
+
_.value = t.setZone(r.timezone || "local").toFormat(m), v.value = !1, y.value = t.toMillis(), l("update:model-value", t.toMillis());
|
|
803
911
|
}
|
|
804
|
-
|
|
805
|
-
function
|
|
912
|
+
I(() => r.modelValue, b, { immediate: !0 });
|
|
913
|
+
function x() {
|
|
806
914
|
if (!_.value) {
|
|
807
|
-
|
|
915
|
+
v.value = !1;
|
|
808
916
|
return;
|
|
809
917
|
}
|
|
810
|
-
let e =
|
|
811
|
-
|
|
918
|
+
let e = V.fromFormat(_.value, m, { zone: r.timezone || "local" });
|
|
919
|
+
v.value = !e.isValid, e.isValid && (b(e.toMillis()), l("update:model-value", e.toMillis()));
|
|
812
920
|
}
|
|
813
921
|
function C() {
|
|
814
|
-
_.value = "",
|
|
922
|
+
_.value = "", v.value = !1, l("update:model-value", void 0);
|
|
815
923
|
}
|
|
816
|
-
return (t,
|
|
924
|
+
return (t, n) => (S(), o("div", { class: g(["relative grid gap-1.5 text-sm date-field", r.class]) }, [u(X, {
|
|
817
925
|
class: "date-control",
|
|
818
|
-
invalid:
|
|
926
|
+
invalid: v.value,
|
|
819
927
|
disabled: e.readOnly
|
|
820
|
-
},
|
|
821
|
-
append:
|
|
822
|
-
|
|
823
|
-
!e.readOnly && !e.lite ? (
|
|
928
|
+
}, c({
|
|
929
|
+
append: L(() => [
|
|
930
|
+
v.value ? (S(), o("span", wt, "Invalid date")) : a("", !0),
|
|
931
|
+
!e.readOnly && !e.lite ? (S(), i(St, {
|
|
824
932
|
key: 1,
|
|
825
933
|
withTime: !e.dateOnly,
|
|
826
|
-
modelValue:
|
|
827
|
-
"onUpdate:modelValue": [
|
|
934
|
+
modelValue: y.value,
|
|
935
|
+
"onUpdate:modelValue": [n[1] ||= (e) => y.value = e, b]
|
|
828
936
|
}, {
|
|
829
|
-
default:
|
|
937
|
+
default: L(() => [...n[2] ||= [s("i", { class: "fa fa-calendar" }, null, -1)]]),
|
|
830
938
|
_: 1
|
|
831
|
-
}, 8, ["withTime", "modelValue"])) :
|
|
832
|
-
e.clearable && _.value && !e.readOnly ? (
|
|
939
|
+
}, 8, ["withTime", "modelValue"])) : a("", !0),
|
|
940
|
+
e.clearable && _.value && !e.readOnly ? (S(), o("button", {
|
|
833
941
|
key: 2,
|
|
834
942
|
type: "button",
|
|
835
943
|
class: "date-trigger",
|
|
836
944
|
"aria-label": "Clear date",
|
|
837
945
|
onClick: C
|
|
838
|
-
}, [...
|
|
839
|
-
e.required ? (
|
|
946
|
+
}, [...n[3] ||= [s("i", { class: "fa fa-times" }, null, -1)]])) : a("", !0),
|
|
947
|
+
e.required ? (S(), o("span", Tt, [...n[4] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0)
|
|
840
948
|
]),
|
|
841
|
-
default:
|
|
842
|
-
id:
|
|
843
|
-
"onUpdate:modelValue":
|
|
949
|
+
default: L(() => [R(s("input", {
|
|
950
|
+
id: d,
|
|
951
|
+
"onUpdate:modelValue": n[0] ||= (e) => _.value = e,
|
|
844
952
|
type: "text",
|
|
845
|
-
placeholder:
|
|
953
|
+
placeholder: h.value,
|
|
846
954
|
readonly: e.readOnly,
|
|
847
|
-
"aria-invalid":
|
|
955
|
+
"aria-invalid": v.value,
|
|
848
956
|
class: "min-w-0 flex-1 border-0 bg-transparent outline-none qmap-input",
|
|
849
|
-
onBlur:
|
|
850
|
-
onKeydown: B(
|
|
851
|
-
}, null, 40,
|
|
957
|
+
onBlur: x,
|
|
958
|
+
onKeydown: z(B(x, ["prevent"]), ["enter"])
|
|
959
|
+
}, null, 40, Ct), [[P, _.value]])]),
|
|
852
960
|
_: 2
|
|
853
961
|
}, [e.icon ? {
|
|
854
962
|
name: "prepend",
|
|
855
|
-
fn:
|
|
856
|
-
class:
|
|
963
|
+
fn: L(() => [s("i", {
|
|
964
|
+
class: g(e.icon),
|
|
857
965
|
"aria-hidden": "true"
|
|
858
966
|
}, null, 2)]),
|
|
859
967
|
key: "0"
|
|
860
|
-
} : void 0]), 1032, ["invalid", "disabled"]),
|
|
968
|
+
} : void 0]), 1032, ["invalid", "disabled"]), E(t.$slots, "default", {}, void 0, !0)], 2));
|
|
861
969
|
}
|
|
862
|
-
}), [["__scopeId", "data-v-c327521a"]]),
|
|
970
|
+
}), [["__scopeId", "data-v-c327521a"]]), Dt = /* @__PURE__ */ f({
|
|
863
971
|
__name: "qDate",
|
|
864
972
|
props: {
|
|
865
973
|
qMap: {},
|
|
@@ -872,30 +980,30 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
872
980
|
style: {}
|
|
873
981
|
},
|
|
874
982
|
emits: ["qmap_change", "qmap_subquestions"],
|
|
875
|
-
setup(
|
|
876
|
-
let
|
|
877
|
-
function
|
|
878
|
-
|
|
879
|
-
qMap:
|
|
983
|
+
setup(t, { emit: r }) {
|
|
984
|
+
let s = t, c = r, l = n(() => s.model[s.qMap.id]);
|
|
985
|
+
function d(e) {
|
|
986
|
+
c("qmap_change", {
|
|
987
|
+
qMap: s.qMap,
|
|
880
988
|
value: e
|
|
881
989
|
});
|
|
882
990
|
}
|
|
883
|
-
return (
|
|
991
|
+
return (n, r) => (S(), o(e, null, [t.lite ? a("", !0) : (S(), i(K, {
|
|
884
992
|
key: 0,
|
|
885
|
-
"q-map":
|
|
886
|
-
}, null, 8, ["q-map"])),
|
|
887
|
-
modelValue:
|
|
888
|
-
"onUpdate:modelValue": [
|
|
889
|
-
icon:
|
|
890
|
-
id:
|
|
891
|
-
dateFormat:
|
|
892
|
-
lite:
|
|
993
|
+
"q-map": t.qMap
|
|
994
|
+
}, null, 8, ["q-map"])), u(Et, {
|
|
995
|
+
modelValue: l.value,
|
|
996
|
+
"onUpdate:modelValue": [r[0] ||= (e) => l.value = e, d],
|
|
997
|
+
icon: t.qMap.icon,
|
|
998
|
+
id: t.qMap.id,
|
|
999
|
+
dateFormat: t.qMap.style,
|
|
1000
|
+
lite: t.lite,
|
|
893
1001
|
dense: "",
|
|
894
|
-
"read-only":
|
|
895
|
-
dateOnly:
|
|
896
|
-
required:
|
|
1002
|
+
"read-only": t.readOnly,
|
|
1003
|
+
dateOnly: t.qMap.type == "date",
|
|
1004
|
+
required: t.qMap.required && !l.value
|
|
897
1005
|
}, {
|
|
898
|
-
default:
|
|
1006
|
+
default: L(() => [u(W, { "q-map": t.qMap }, null, 8, ["q-map"])]),
|
|
899
1007
|
_: 1
|
|
900
1008
|
}, 8, [
|
|
901
1009
|
"modelValue",
|
|
@@ -908,13 +1016,13 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
908
1016
|
"required"
|
|
909
1017
|
])], 64));
|
|
910
1018
|
}
|
|
911
|
-
}),
|
|
1019
|
+
}), Ot = ["aria-orientation"], kt = ["aria-selected", "onClick"], At = ["name"], jt = {
|
|
912
1020
|
key: 0,
|
|
913
1021
|
class: "flex flex-1 flex-col min-w-0 relative"
|
|
914
|
-
},
|
|
1022
|
+
}, Mt = {
|
|
915
1023
|
key: 1,
|
|
916
1024
|
class: "flex flex-1 flex-col min-w-0 relative"
|
|
917
|
-
},
|
|
1025
|
+
}, Nt = { class: "group-scroll flex-1 min-h-0 overflow-auto" }, Pt = { class: "flex flex-col gap-2" }, Ft = /* @__PURE__ */ f({
|
|
918
1026
|
__name: "qGroup",
|
|
919
1027
|
props: {
|
|
920
1028
|
qMap: {},
|
|
@@ -927,47 +1035,47 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
927
1035
|
style: {}
|
|
928
1036
|
},
|
|
929
1037
|
emits: ["qmap_change", "qmap_subquestions"],
|
|
930
|
-
setup(t, { emit:
|
|
931
|
-
let
|
|
932
|
-
return (n,
|
|
933
|
-
class:
|
|
934
|
-
"flex flex-row":
|
|
935
|
-
"flex flex-col": !
|
|
1038
|
+
setup(t, { emit: r }) {
|
|
1039
|
+
let c = t, d = w(c.qMap.groups ? c.qMap.groups[0]?.name : "?"), f = r, p = n(() => c.qMap.style == "vertical"), m = w(c.model);
|
|
1040
|
+
return (n, r) => (S(), o("div", {
|
|
1041
|
+
class: g({
|
|
1042
|
+
"flex flex-row": p.value,
|
|
1043
|
+
"flex flex-col": !p.value,
|
|
936
1044
|
"flex-1 inset-0": t.qMap.ui?.flex
|
|
937
1045
|
}),
|
|
938
|
-
style:
|
|
1046
|
+
style: _(t.qMap.ui?.flex ? void 0 : { height: (t.qMap.ui?.height || 400) + "px" })
|
|
939
1047
|
}, [
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
class:
|
|
1048
|
+
u(K, { "q-map": t.qMap }, null, 8, ["q-map"]),
|
|
1049
|
+
s("div", {
|
|
1050
|
+
class: g(["flex flex-wrap gap-1 p-1 group-tabs", { "flex-col group-tabs-vertical pr-2": p.value }]),
|
|
943
1051
|
role: "tablist",
|
|
944
|
-
"aria-orientation":
|
|
945
|
-
}, [(
|
|
1052
|
+
"aria-orientation": p.value ? "vertical" : "horizontal"
|
|
1053
|
+
}, [(S(!0), o(e, null, T(t.qMap.groups, (e) => (S(), o("button", {
|
|
946
1054
|
key: e.name,
|
|
947
1055
|
type: "button",
|
|
948
1056
|
role: "tab",
|
|
949
|
-
"aria-selected":
|
|
950
|
-
class:
|
|
951
|
-
onClick: (t) =>
|
|
952
|
-
}, [e.icon ? (
|
|
1057
|
+
"aria-selected": d.value === e.name,
|
|
1058
|
+
class: g(["inline-flex items-center gap-2 rounded-md px-3 py-2", { "group-tab-active": d.value === e.name }]),
|
|
1059
|
+
onClick: (t) => d.value = e.name
|
|
1060
|
+
}, [e.icon ? (S(), o("i", {
|
|
953
1061
|
key: 0,
|
|
954
|
-
class:
|
|
1062
|
+
class: g(e.icon),
|
|
955
1063
|
"aria-hidden": "true"
|
|
956
|
-
}, null, 2)) :
|
|
957
|
-
|
|
958
|
-
"ml-2":
|
|
959
|
-
"mt-2": !
|
|
960
|
-
}]) }, [(
|
|
961
|
-
name:
|
|
962
|
-
key:
|
|
1064
|
+
}, null, 2)) : a("", !0), l(k(e.name), 1)], 10, kt))), 128))], 10, Ot),
|
|
1065
|
+
s("div", { class: g(["group-panels flex flex-1 flex-col min-w-0 min-h-0", {
|
|
1066
|
+
"ml-2": p.value,
|
|
1067
|
+
"mt-2": !p.value
|
|
1068
|
+
}]) }, [(S(!0), o(e, null, T(t.qMap.groups, (n) => R((S(), o("section", {
|
|
1069
|
+
name: n.name,
|
|
1070
|
+
key: n.name,
|
|
963
1071
|
class: "flex flex-1 flex-col min-w-0 min-h-0",
|
|
964
1072
|
role: "tabpanel"
|
|
965
|
-
}, [
|
|
1073
|
+
}, [n.items?.length == 1 && n.items[0]?.type == "geo_map" ? (S(), o("div", jt, [(S(!0), o(e, null, T(n.items, (e) => (S(), i(Q, {
|
|
966
1074
|
key: e.id,
|
|
967
1075
|
qMap: e,
|
|
968
|
-
modelValue:
|
|
969
|
-
"onUpdate:modelValue":
|
|
970
|
-
onChange:
|
|
1076
|
+
modelValue: m.value,
|
|
1077
|
+
"onUpdate:modelValue": r[0] ||= (e) => m.value = e,
|
|
1078
|
+
onChange: r[1] ||= (e, t) => f("qmap_change", e),
|
|
971
1079
|
extras: t.extras,
|
|
972
1080
|
lite: t.lite,
|
|
973
1081
|
validator: t.validator,
|
|
@@ -981,12 +1089,12 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
981
1089
|
"validator",
|
|
982
1090
|
"provider",
|
|
983
1091
|
"readOnly"
|
|
984
|
-
]))), 128))])) : (
|
|
1092
|
+
]))), 128))])) : (S(), o("div", Mt, [s("div", Nt, [s("div", Pt, [(S(!0), o(e, null, T(n.items, (e) => (S(), i(Q, {
|
|
985
1093
|
key: e.id,
|
|
986
1094
|
qMap: e,
|
|
987
|
-
modelValue:
|
|
988
|
-
"onUpdate:modelValue":
|
|
989
|
-
onChange:
|
|
1095
|
+
modelValue: m.value,
|
|
1096
|
+
"onUpdate:modelValue": r[2] ||= (e) => m.value = e,
|
|
1097
|
+
onChange: r[3] ||= (e, t) => f("qmap_change", e),
|
|
990
1098
|
extras: t.extras,
|
|
991
1099
|
lite: t.lite,
|
|
992
1100
|
validator: t.validator,
|
|
@@ -1000,29 +1108,29 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1000
1108
|
"validator",
|
|
1001
1109
|
"provider",
|
|
1002
1110
|
"readOnly"
|
|
1003
|
-
]))), 128))])])]))], 8,
|
|
1111
|
+
]))), 128))])])]))], 8, At)), [[F, d.value === n.name]])), 128))], 2)
|
|
1004
1112
|
], 6));
|
|
1005
1113
|
}
|
|
1006
|
-
}),
|
|
1114
|
+
}), It = {
|
|
1007
1115
|
key: 0,
|
|
1008
1116
|
class: "inline-flex items-center gap-2"
|
|
1009
|
-
},
|
|
1117
|
+
}, Lt = {
|
|
1010
1118
|
key: 1,
|
|
1011
1119
|
class: "flex flex-col gap-1"
|
|
1012
|
-
},
|
|
1120
|
+
}, Rt = [
|
|
1013
1121
|
"id",
|
|
1014
1122
|
"value",
|
|
1015
1123
|
"readonly"
|
|
1016
|
-
],
|
|
1124
|
+
], zt = [
|
|
1017
1125
|
"id",
|
|
1018
1126
|
"value",
|
|
1019
1127
|
"readonly",
|
|
1020
1128
|
"type"
|
|
1021
|
-
],
|
|
1129
|
+
], Bt = {
|
|
1022
1130
|
key: 0,
|
|
1023
1131
|
class: "qmap-required",
|
|
1024
1132
|
"aria-hidden": "true"
|
|
1025
|
-
}, Z = /* @__PURE__ */
|
|
1133
|
+
}, Z = /* @__PURE__ */ f({
|
|
1026
1134
|
__name: "qString",
|
|
1027
1135
|
props: {
|
|
1028
1136
|
qMap: {},
|
|
@@ -1035,70 +1143,70 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1035
1143
|
style: {}
|
|
1036
1144
|
},
|
|
1037
1145
|
emits: ["qmap_change", "qmap_subquestions"],
|
|
1038
|
-
setup(
|
|
1039
|
-
let
|
|
1040
|
-
function
|
|
1041
|
-
|
|
1146
|
+
setup(e, { emit: t }) {
|
|
1147
|
+
let r = e, l = t, d = n(() => r.model[r.qMap.id]);
|
|
1148
|
+
function f(e) {
|
|
1149
|
+
p(e.target.value);
|
|
1042
1150
|
}
|
|
1043
|
-
function
|
|
1044
|
-
|
|
1045
|
-
qMap:
|
|
1151
|
+
function p(e) {
|
|
1152
|
+
r.qMap.type === "number" && typeof e == "string" && (e = parseFloat(e), e = Number.isNaN(e) ? void 0 : e), l("qmap_change", {
|
|
1153
|
+
qMap: r.qMap,
|
|
1046
1154
|
value: e
|
|
1047
1155
|
});
|
|
1048
1156
|
}
|
|
1049
|
-
return (
|
|
1157
|
+
return (t, n) => e.lite && e.readOnly ? (S(), o("div", It, k(d.value), 1)) : (S(), o("div", Lt, [!e.lite && e.qMap.id !== "#" ? (S(), i(K, {
|
|
1050
1158
|
key: 0,
|
|
1051
|
-
"q-map":
|
|
1052
|
-
}, null, 8, ["q-map"])) :
|
|
1053
|
-
append:
|
|
1159
|
+
"q-map": e.qMap
|
|
1160
|
+
}, null, 8, ["q-map"])) : a("", !0), u(X, { multiline: e.qMap.style === "longtext" || e.lite && e.qMap.style === "textarea" }, c({
|
|
1161
|
+
append: L(() => [e.qMap.required && !d.value ? (S(), o("span", Bt, [...n[3] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0), !e.qMap.required && d.value && !e.readOnly ? (S(), o("button", {
|
|
1054
1162
|
key: 1,
|
|
1055
1163
|
type: "button",
|
|
1056
1164
|
class: "inline-flex items-center justify-center min-w-8 min-h-8 p-1 qmap-icon-button",
|
|
1057
1165
|
"aria-label": "Clear",
|
|
1058
|
-
onClick:
|
|
1059
|
-
}, [...
|
|
1060
|
-
default:
|
|
1166
|
+
onClick: n[2] ||= (e) => p(void 0)
|
|
1167
|
+
}, [...n[4] ||= [s("i", { class: "fa fa-times" }, null, -1)]])) : a("", !0)]),
|
|
1168
|
+
default: L(() => [e.qMap.type !== "number" && (e.qMap.style === "longtext" || e.lite && e.qMap.style === "textarea") ? (S(), o("textarea", {
|
|
1061
1169
|
key: 0,
|
|
1062
|
-
id:
|
|
1063
|
-
value:
|
|
1064
|
-
readonly:
|
|
1170
|
+
id: e.qMap.id,
|
|
1171
|
+
value: d.value,
|
|
1172
|
+
readonly: e.readOnly,
|
|
1065
1173
|
rows: "4",
|
|
1066
1174
|
class: "qmap-input min-w-0 flex-1 px-0 py-2 min-h-24 resize-y",
|
|
1067
|
-
onInput:
|
|
1068
|
-
onChange:
|
|
1069
|
-
}, null, 40,
|
|
1175
|
+
onInput: f,
|
|
1176
|
+
onChange: n[0] ||= (e) => p(e.target.value)
|
|
1177
|
+
}, null, 40, Rt)) : (S(), o("input", {
|
|
1070
1178
|
key: 1,
|
|
1071
|
-
id:
|
|
1072
|
-
value:
|
|
1073
|
-
readonly:
|
|
1074
|
-
type:
|
|
1179
|
+
id: e.qMap.id,
|
|
1180
|
+
value: d.value,
|
|
1181
|
+
readonly: e.readOnly,
|
|
1182
|
+
type: e.qMap.type === "number" ? e.qMap.style || "number" : e.qMap.style || "text",
|
|
1075
1183
|
class: "qmap-input min-w-0 flex-1 px-0 py-2",
|
|
1076
|
-
onInput:
|
|
1077
|
-
onChange:
|
|
1078
|
-
}, null, 40,
|
|
1184
|
+
onInput: f,
|
|
1185
|
+
onChange: n[1] ||= (e) => p(e.target.value)
|
|
1186
|
+
}, null, 40, zt))]),
|
|
1079
1187
|
_: 2
|
|
1080
|
-
}, [
|
|
1188
|
+
}, [e.qMap.icon ? {
|
|
1081
1189
|
name: "prepend",
|
|
1082
|
-
fn:
|
|
1190
|
+
fn: L(() => [u(Je, { qMap: e.qMap }, null, 8, ["qMap"])]),
|
|
1083
1191
|
key: "0"
|
|
1084
1192
|
} : void 0]), 1032, ["multiline"])]));
|
|
1085
1193
|
}
|
|
1086
|
-
}),
|
|
1194
|
+
}), Vt = { key: 0 }, Ht = {
|
|
1087
1195
|
key: 0,
|
|
1088
1196
|
class: "flex flex-row items-center"
|
|
1089
|
-
},
|
|
1197
|
+
}, Ut = ["for"], Wt = ["id", "readonly"], Gt = {
|
|
1090
1198
|
key: 0,
|
|
1091
1199
|
class: "qmap-required"
|
|
1092
|
-
},
|
|
1200
|
+
}, Kt = {
|
|
1093
1201
|
key: 1,
|
|
1094
1202
|
class: "text-right text-negative"
|
|
1095
|
-
},
|
|
1203
|
+
}, qt = { key: 1 }, Jt = { class: "qmap-card flex min-w-0 gap-3 p-3 bg-zinc-50 dark:bg-zinc-900" }, Yt = { class: "flex-1 min-w-0" }, Xt = { key: 0 }, Zt = {
|
|
1096
1204
|
key: 1,
|
|
1097
1205
|
class: "flex flex-col gap-2"
|
|
1098
|
-
},
|
|
1206
|
+
}, Qt = {
|
|
1099
1207
|
key: 0,
|
|
1100
1208
|
class: "flex flex-col justify-center"
|
|
1101
|
-
},
|
|
1209
|
+
}, $t = /* @__PURE__ */ f({
|
|
1102
1210
|
__name: "qObject",
|
|
1103
1211
|
props: {
|
|
1104
1212
|
qMap: {},
|
|
@@ -1111,42 +1219,42 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1111
1219
|
style: {}
|
|
1112
1220
|
},
|
|
1113
1221
|
emits: ["qmap_change", "qmap_subquestions"],
|
|
1114
|
-
setup(
|
|
1115
|
-
let
|
|
1116
|
-
function
|
|
1117
|
-
if (!e)
|
|
1118
|
-
qMap:
|
|
1222
|
+
setup(t, { emit: n }) {
|
|
1223
|
+
let r = t, l = n, d = w(r.model[r.qMap.id] ? JSON.stringify(r.model[r.qMap.id], null, 2) : void 0), f = w(r.model[r.qMap.id] || void 0), p = w();
|
|
1224
|
+
function m(e) {
|
|
1225
|
+
if (!e) l("qmap_change", {
|
|
1226
|
+
qMap: r.qMap,
|
|
1119
1227
|
value: void 0
|
|
1120
1228
|
});
|
|
1121
1229
|
else try {
|
|
1122
|
-
|
|
1123
|
-
qMap:
|
|
1230
|
+
l("qmap_change", {
|
|
1231
|
+
qMap: r.qMap,
|
|
1124
1232
|
value: JSON.parse(e)
|
|
1125
|
-
}),
|
|
1233
|
+
}), d.value = JSON.stringify(JSON.parse(e), null, 2), p.value = void 0;
|
|
1126
1234
|
} catch (e) {
|
|
1127
|
-
|
|
1235
|
+
p.value = e.message;
|
|
1128
1236
|
}
|
|
1129
1237
|
}
|
|
1130
|
-
function
|
|
1131
|
-
|
|
1132
|
-
qMap:
|
|
1238
|
+
function h(e) {
|
|
1239
|
+
r.model[r.qMap.id] = e, e ? l("qmap_change", {
|
|
1240
|
+
qMap: r.qMap,
|
|
1133
1241
|
value: e
|
|
1134
|
-
}) :
|
|
1135
|
-
qMap:
|
|
1242
|
+
}) : l("qmap_change", {
|
|
1243
|
+
qMap: r.qMap,
|
|
1136
1244
|
value: void 0
|
|
1137
1245
|
});
|
|
1138
1246
|
}
|
|
1139
|
-
return (
|
|
1247
|
+
return (n, r) => t.qMap.items ? (S(), o("div", qt, [!t.lite && t.qMap.id !== "#" ? (S(), i(K, {
|
|
1140
1248
|
key: 0,
|
|
1141
|
-
"q-map":
|
|
1142
|
-
}, null, 8, ["q-map"])) :
|
|
1249
|
+
"q-map": t.qMap
|
|
1250
|
+
}, null, 8, ["q-map"])) : a("", !0), s("div", Jt, [s("div", Yt, [f.value ? (S(), o("div", Zt, [(S(!0), o(e, null, T(t.qMap.items, (e) => (S(), i(Q, {
|
|
1143
1251
|
qMap: e,
|
|
1144
|
-
modelValue:
|
|
1145
|
-
"onUpdate:modelValue": [
|
|
1146
|
-
extras:
|
|
1147
|
-
provider:
|
|
1148
|
-
lite:
|
|
1149
|
-
readOnly:
|
|
1252
|
+
modelValue: f.value,
|
|
1253
|
+
"onUpdate:modelValue": [r[4] ||= (e) => f.value = e, h],
|
|
1254
|
+
extras: t.extras,
|
|
1255
|
+
provider: t.provider,
|
|
1256
|
+
lite: t.lite,
|
|
1257
|
+
readOnly: t.readOnly || t.qMap.readOnly
|
|
1150
1258
|
}, null, 8, [
|
|
1151
1259
|
"qMap",
|
|
1152
1260
|
"modelValue",
|
|
@@ -1154,61 +1262,61 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1154
1262
|
"provider",
|
|
1155
1263
|
"lite",
|
|
1156
1264
|
"readOnly"
|
|
1157
|
-
]))), 256))])) : (
|
|
1265
|
+
]))), 256))])) : (S(), o("div", Xt, [s("button", {
|
|
1158
1266
|
type: "button",
|
|
1159
1267
|
class: "inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button",
|
|
1160
|
-
onClick:
|
|
1161
|
-
}, "Not set")]))]), !
|
|
1268
|
+
onClick: r[3] ||= (e) => f.value = {}
|
|
1269
|
+
}, "Not set")]))]), !t.qMap.required && f.value != null ? (S(), o("div", Qt, [s("button", {
|
|
1162
1270
|
type: "button",
|
|
1163
1271
|
class: "inline-flex items-center justify-center min-w-8 min-h-8 p-1 qmap-icon-button qmap-danger",
|
|
1164
1272
|
"aria-label": "Remove object",
|
|
1165
|
-
onClick:
|
|
1166
|
-
|
|
1273
|
+
onClick: r[5] ||= (e) => {
|
|
1274
|
+
m(null), f.value = void 0;
|
|
1167
1275
|
}
|
|
1168
|
-
}, [...
|
|
1276
|
+
}, [...r[7] ||= [s("i", {
|
|
1169
1277
|
class: "fa fa-trash",
|
|
1170
1278
|
"aria-hidden": "true"
|
|
1171
|
-
}, null, -1)]])])) :
|
|
1172
|
-
|
|
1173
|
-
|
|
1279
|
+
}, null, -1)]])])) : a("", !0)])])) : (S(), o("div", Vt, [
|
|
1280
|
+
t.lite && t.readOnly ? (S(), o("div", Ht, k(d.value), 1)) : a("", !0),
|
|
1281
|
+
s("label", {
|
|
1174
1282
|
class: "qmap-field flex flex-col gap-1.5 min-w-0 text-sm",
|
|
1175
|
-
for:
|
|
1176
|
-
}, [!
|
|
1283
|
+
for: t.qMap.id
|
|
1284
|
+
}, [!t.lite && t.qMap.id !== "#" ? (S(), i(K, {
|
|
1177
1285
|
key: 0,
|
|
1178
|
-
"q-map":
|
|
1179
|
-
}, null, 8, ["q-map"])) :
|
|
1180
|
-
disabled:
|
|
1286
|
+
"q-map": t.qMap
|
|
1287
|
+
}, null, 8, ["q-map"])) : a("", !0), u(X, {
|
|
1288
|
+
disabled: t.readOnly,
|
|
1181
1289
|
multiline: ""
|
|
1182
|
-
},
|
|
1183
|
-
append:
|
|
1290
|
+
}, c({
|
|
1291
|
+
append: L(() => [t.qMap.required && (!t.lite || !d.value) ? (S(), o("span", Gt, [...r[6] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0), t.qMap.subtitle ? (S(), i(W, {
|
|
1184
1292
|
key: 1,
|
|
1185
|
-
"q-map":
|
|
1186
|
-
}, null, 8, ["q-map"])) :
|
|
1187
|
-
default:
|
|
1188
|
-
id:
|
|
1189
|
-
"onUpdate:modelValue":
|
|
1293
|
+
"q-map": t.qMap
|
|
1294
|
+
}, null, 8, ["q-map"])) : a("", !0)]),
|
|
1295
|
+
default: L(() => [R(s("textarea", {
|
|
1296
|
+
id: t.qMap.id,
|
|
1297
|
+
"onUpdate:modelValue": r[0] ||= (e) => d.value = e,
|
|
1190
1298
|
class: "qmap-input min-w-0 flex-1 px-0 py-2 min-h-24 resize-y",
|
|
1191
|
-
readonly:
|
|
1299
|
+
readonly: t.readOnly,
|
|
1192
1300
|
rows: "5",
|
|
1193
|
-
onBlur:
|
|
1194
|
-
onInput:
|
|
1195
|
-
}, null, 40,
|
|
1301
|
+
onBlur: r[1] ||= (e) => m(d.value),
|
|
1302
|
+
onInput: r[2] ||= (e) => m(d.value)
|
|
1303
|
+
}, null, 40, Wt), [[P, d.value]])]),
|
|
1196
1304
|
_: 2
|
|
1197
|
-
}, [
|
|
1305
|
+
}, [t.qMap.icon ? {
|
|
1198
1306
|
name: "prepend",
|
|
1199
|
-
fn:
|
|
1200
|
-
class:
|
|
1307
|
+
fn: L(() => [s("i", {
|
|
1308
|
+
class: g(t.qMap.icon),
|
|
1201
1309
|
"aria-hidden": "true"
|
|
1202
1310
|
}, null, 2)]),
|
|
1203
1311
|
key: "0"
|
|
1204
|
-
} : void 0]), 1032, ["disabled"])], 8,
|
|
1205
|
-
|
|
1312
|
+
} : void 0]), 1032, ["disabled"])], 8, Ut),
|
|
1313
|
+
p.value ? (S(), o("div", Kt, k(p.value), 1)) : a("", !0)
|
|
1206
1314
|
]));
|
|
1207
1315
|
}
|
|
1208
|
-
}),
|
|
1316
|
+
}), en = { class: "text-lg" }, tn = {
|
|
1209
1317
|
key: 0,
|
|
1210
1318
|
class: "text-md"
|
|
1211
|
-
},
|
|
1319
|
+
}, nn = /* @__PURE__ */ f({
|
|
1212
1320
|
__name: "qCaption",
|
|
1213
1321
|
props: {
|
|
1214
1322
|
qMap: {},
|
|
@@ -1221,10 +1329,10 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1221
1329
|
style: {}
|
|
1222
1330
|
},
|
|
1223
1331
|
emits: ["qmap_change", "qmap_subquestions"],
|
|
1224
|
-
setup(
|
|
1225
|
-
return (
|
|
1332
|
+
setup(t, { emit: n }) {
|
|
1333
|
+
return (n, r) => (S(), o(e, null, [s("div", en, k(t.qMap.title), 1), t.qMap.subtitle ? (S(), o("div", tn, k(t.qMap.subtitle), 1)) : a("", !0)], 64));
|
|
1226
1334
|
}
|
|
1227
|
-
}),
|
|
1335
|
+
}), rn = /* @__PURE__ */ f({
|
|
1228
1336
|
__name: "qGeoMap",
|
|
1229
1337
|
props: {
|
|
1230
1338
|
qMap: {},
|
|
@@ -1238,32 +1346,32 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1238
1346
|
},
|
|
1239
1347
|
emits: ["qmap_change", "qmap_subquestions"],
|
|
1240
1348
|
setup(e, { emit: t }) {
|
|
1241
|
-
let
|
|
1242
|
-
|
|
1243
|
-
|
|
1349
|
+
let r = d(() => Promise.resolve().then(() => jn)), i = e, a = t, s = w(), c = n(() => i.qMap.style == "full-screen");
|
|
1350
|
+
I(() => i.model, (e) => s.value = i.model[i.qMap.id]), v(() => {
|
|
1351
|
+
s.value = i.model[i.qMap.id] ? JSON.parse(i.model[i.qMap.id]) : void 0, l(s.value);
|
|
1244
1352
|
});
|
|
1245
|
-
function
|
|
1246
|
-
let t =
|
|
1247
|
-
|
|
1353
|
+
function l(e) {
|
|
1354
|
+
let t = i.qMap.values?.find((t) => t.value == e);
|
|
1355
|
+
a("qmap_subquestions", t?.onSelect);
|
|
1248
1356
|
}
|
|
1249
|
-
function
|
|
1250
|
-
|
|
1251
|
-
qMap:
|
|
1357
|
+
function f(e) {
|
|
1358
|
+
a("qmap_change", {
|
|
1359
|
+
qMap: i.qMap,
|
|
1252
1360
|
value: JSON.stringify(e)
|
|
1253
|
-
}),
|
|
1361
|
+
}), l(e);
|
|
1254
1362
|
}
|
|
1255
|
-
return (t,
|
|
1256
|
-
class:
|
|
1257
|
-
"relative flex-1 min-w-0":
|
|
1258
|
-
"relative flex flex-col": !
|
|
1363
|
+
return (t, n) => (S(), o("div", {
|
|
1364
|
+
class: g({
|
|
1365
|
+
"relative flex-1 min-w-0": c.value,
|
|
1366
|
+
"relative flex flex-col": !c.value
|
|
1259
1367
|
}),
|
|
1260
|
-
style:
|
|
1261
|
-
}, [
|
|
1262
|
-
modelValue:
|
|
1263
|
-
"onUpdate:modelValue": [
|
|
1368
|
+
style: _({ height: c.value ? "100%" : "400px" })
|
|
1369
|
+
}, [u(A(r), {
|
|
1370
|
+
modelValue: s.value,
|
|
1371
|
+
"onUpdate:modelValue": [n[0] ||= (e) => s.value = e, f],
|
|
1264
1372
|
readOnly: e.readOnly,
|
|
1265
1373
|
lite: e.lite,
|
|
1266
|
-
class:
|
|
1374
|
+
class: g(c.value ? "absolute inset-0" : "flex-1 min-w-0"),
|
|
1267
1375
|
"q-map": e.qMap,
|
|
1268
1376
|
keys: e.provider?.keyPairs || e.extras || {},
|
|
1269
1377
|
toolbar: e.qMap.ui
|
|
@@ -1277,10 +1385,10 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1277
1385
|
"toolbar"
|
|
1278
1386
|
])], 6));
|
|
1279
1387
|
}
|
|
1280
|
-
}),
|
|
1388
|
+
}), an = { class: "mb-4" }, on = { class: "my-2 flex flex-row items-center justify-between" }, sn = { class: "qmap-table" }, cn = ["onUpdate:modelValue"], ln = ["onUpdate:modelValue"], un = ["onClick"], dn = { key: 0 }, fn = {
|
|
1281
1389
|
colspan: "2",
|
|
1282
1390
|
class: "text-center"
|
|
1283
|
-
},
|
|
1391
|
+
}, pn = /* @__PURE__ */ f({
|
|
1284
1392
|
__name: "qSimpleMap",
|
|
1285
1393
|
props: {
|
|
1286
1394
|
qMap: {},
|
|
@@ -1293,71 +1401,71 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1293
1401
|
style: {}
|
|
1294
1402
|
},
|
|
1295
1403
|
emits: ["qmap_change", "qmap_subquestions"],
|
|
1296
|
-
setup(t, { emit:
|
|
1297
|
-
let
|
|
1298
|
-
|
|
1299
|
-
|
|
1404
|
+
setup(t, { emit: n }) {
|
|
1405
|
+
let r = t, i = n, c = w([]);
|
|
1406
|
+
I(() => r.model, (e) => l(r.model[r.qMap.id])), v(() => {
|
|
1407
|
+
l(r.model[r.qMap.id] || void 0);
|
|
1300
1408
|
});
|
|
1301
|
-
function
|
|
1302
|
-
e ?
|
|
1409
|
+
function l(e) {
|
|
1410
|
+
e ? c.value = Object.keys(e).map((t) => ({
|
|
1303
1411
|
key: t,
|
|
1304
1412
|
val: e[t]
|
|
1305
|
-
})) :
|
|
1413
|
+
})) : c.value = [];
|
|
1306
1414
|
}
|
|
1307
|
-
function
|
|
1308
|
-
let e =
|
|
1309
|
-
|
|
1310
|
-
qMap:
|
|
1415
|
+
function d() {
|
|
1416
|
+
let e = c.value.length ? c.value.reduce((e, t) => (e[t.key] = t.val, e), {}) : {};
|
|
1417
|
+
i("qmap_change", {
|
|
1418
|
+
qMap: r.qMap,
|
|
1311
1419
|
value: e
|
|
1312
1420
|
});
|
|
1313
1421
|
}
|
|
1314
|
-
function
|
|
1315
|
-
|
|
1422
|
+
function f() {
|
|
1423
|
+
c.value = c.value.concat([{
|
|
1316
1424
|
key: "",
|
|
1317
1425
|
val: ""
|
|
1318
|
-
}]),
|
|
1426
|
+
}]), d();
|
|
1319
1427
|
}
|
|
1320
|
-
function
|
|
1321
|
-
|
|
1428
|
+
function p(e) {
|
|
1429
|
+
c.value = c.value.filter((t) => t != e), d();
|
|
1322
1430
|
}
|
|
1323
|
-
return (
|
|
1431
|
+
return (n, r) => (S(), o("div", an, [s("div", on, [u(K, { "q-map": t.qMap }, null, 8, ["q-map"]), s("div", null, [s("button", {
|
|
1324
1432
|
type: "button",
|
|
1325
1433
|
class: "inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button",
|
|
1326
1434
|
"aria-label": "Add row",
|
|
1327
|
-
onClick:
|
|
1328
|
-
}, "+")])]),
|
|
1329
|
-
default:
|
|
1330
|
-
"onUpdate:modelValue": (e) =>
|
|
1435
|
+
onClick: r[0] ||= (e) => f()
|
|
1436
|
+
}, "+")])]), s("table", sn, [r[4] ||= s("thead", null, [s("tr", null, [s("th", null, "Name"), s("th", null, "Value")])], -1), s("tbody", null, [(S(!0), o(e, null, T(c.value, (e, t) => (S(), o("tr", null, [s("td", null, [u(X, null, {
|
|
1437
|
+
default: L(() => [R(s("input", {
|
|
1438
|
+
"onUpdate:modelValue": (e) => c.value[t].key = e,
|
|
1331
1439
|
class: "qmap-input min-w-0 flex-1 px-0 py-2",
|
|
1332
|
-
onInput:
|
|
1333
|
-
}, null, 40,
|
|
1440
|
+
onInput: d
|
|
1441
|
+
}, null, 40, cn), [[P, c.value[t].key]])]),
|
|
1334
1442
|
_: 2
|
|
1335
|
-
}, 1024)]),
|
|
1336
|
-
append:
|
|
1443
|
+
}, 1024)]), s("td", null, [u(X, null, {
|
|
1444
|
+
append: L(() => [s("button", {
|
|
1337
1445
|
type: "button",
|
|
1338
1446
|
class: "inline-flex items-center justify-center min-w-8 min-h-8 p-1 qmap-icon-button qmap-danger",
|
|
1339
1447
|
"aria-label": "Remove row",
|
|
1340
|
-
onClick: (t) =>
|
|
1341
|
-
}, [...
|
|
1342
|
-
default:
|
|
1343
|
-
"onUpdate:modelValue": (e) =>
|
|
1448
|
+
onClick: (t) => p(e)
|
|
1449
|
+
}, [...r[2] ||= [s("i", { class: "fa fa-trash" }, null, -1)]], 8, un)]),
|
|
1450
|
+
default: L(() => [R(s("input", {
|
|
1451
|
+
"onUpdate:modelValue": (e) => c.value[t].val = e,
|
|
1344
1452
|
class: "qmap-input min-w-0 flex-1 px-0 py-2",
|
|
1345
|
-
onInput:
|
|
1346
|
-
}, null, 40,
|
|
1453
|
+
onInput: d
|
|
1454
|
+
}, null, 40, ln), [[P, c.value[t].val]])]),
|
|
1347
1455
|
_: 2
|
|
1348
|
-
}, 1024)])]))), 256)),
|
|
1456
|
+
}, 1024)])]))), 256)), c.value.length ? a("", !0) : (S(), o("tr", dn, [s("td", fn, [r[3] ||= s("div", null, "No values ", -1), s("button", {
|
|
1349
1457
|
type: "button",
|
|
1350
1458
|
class: "inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button",
|
|
1351
|
-
onClick:
|
|
1459
|
+
onClick: r[1] ||= (e) => f()
|
|
1352
1460
|
}, "Add Row")])]))])])]));
|
|
1353
1461
|
}
|
|
1354
|
-
}),
|
|
1462
|
+
}), mn = { class: "flex flex-col flex-1 min-w-0" }, hn = { key: 16 }, gn = { key: 17 }, _n = { key: 18 }, vn = {
|
|
1355
1463
|
key: 0,
|
|
1356
1464
|
class: "qmap-separator my-4"
|
|
1357
|
-
},
|
|
1465
|
+
}, yn = {
|
|
1358
1466
|
key: 1,
|
|
1359
1467
|
class: "qmap_nested flex flex-col gap-2"
|
|
1360
|
-
}, Q = /* @__PURE__ */
|
|
1468
|
+
}, Q = /* @__PURE__ */ f({
|
|
1361
1469
|
__name: "Question",
|
|
1362
1470
|
props: {
|
|
1363
1471
|
qMap: {},
|
|
@@ -1369,21 +1477,21 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1369
1477
|
lite: { type: Boolean }
|
|
1370
1478
|
},
|
|
1371
1479
|
emits: ["update:model-value", "change"],
|
|
1372
|
-
setup(t, { emit:
|
|
1373
|
-
let
|
|
1374
|
-
|
|
1375
|
-
|
|
1480
|
+
setup(t, { emit: r }) {
|
|
1481
|
+
let c = t, l = r, d = n(() => c.modelValue[c.qMap.id] != null), f = n(() => (c.qMap.type || "string").toLowerCase()), p = n(() => c.provider?.questionTypes[f.value]), m = w(!1), h = n(() => m.value && c.qMap.onValue || []), _ = w([]), y = n(() => h.value.concat(_.value));
|
|
1482
|
+
v(() => {
|
|
1483
|
+
m.value = c.modelValue[c.qMap.id] != null && c.modelValue[c.qMap.id] != "", !d.value && c.qMap.default && !p.value && (c.modelValue[c.qMap.id] = c.qMap.default);
|
|
1376
1484
|
});
|
|
1377
|
-
function
|
|
1378
|
-
|
|
1485
|
+
function b(e) {
|
|
1486
|
+
c.modelValue[c.qMap.id] = e.value, m.value = c.modelValue[c.qMap.id] != null && c.modelValue[c.qMap.id] != "", c.validator && c.validator.updateEvent(e), l("update:model-value", c.modelValue), l("change", e, c.modelValue);
|
|
1379
1487
|
}
|
|
1380
|
-
function
|
|
1381
|
-
|
|
1488
|
+
function x(e, t) {
|
|
1489
|
+
b(e), m.value = e.value && e.qMap.onValue;
|
|
1382
1490
|
}
|
|
1383
|
-
return (n,
|
|
1384
|
-
let
|
|
1385
|
-
return
|
|
1386
|
-
|
|
1491
|
+
return (n, r) => {
|
|
1492
|
+
let c = D("Question", !0);
|
|
1493
|
+
return S(), o(e, null, [
|
|
1494
|
+
s("div", mn, [p.value ? (S(), i(O(t.provider?.questionTypes[f.value]), {
|
|
1387
1495
|
key: 0,
|
|
1388
1496
|
qMap: t.qMap,
|
|
1389
1497
|
modelValue: t.modelValue,
|
|
@@ -1392,8 +1500,8 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1392
1500
|
validator: t.validator,
|
|
1393
1501
|
lite: t.lite,
|
|
1394
1502
|
readOnly: t.readOnly,
|
|
1395
|
-
onChange:
|
|
1396
|
-
"onUpdate:modelValue":
|
|
1503
|
+
onChange: x,
|
|
1504
|
+
"onUpdate:modelValue": r[0] ||= (e) => l("update:model-value", e)
|
|
1397
1505
|
}, null, 40, [
|
|
1398
1506
|
"qMap",
|
|
1399
1507
|
"modelValue",
|
|
@@ -1402,7 +1510,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1402
1510
|
"validator",
|
|
1403
1511
|
"lite",
|
|
1404
1512
|
"readOnly"
|
|
1405
|
-
])) : f.value == "text" || f.value == "string" ? (
|
|
1513
|
+
])) : f.value == "text" || f.value == "string" ? (S(), i(Z, {
|
|
1406
1514
|
key: 1,
|
|
1407
1515
|
qMap: t.qMap,
|
|
1408
1516
|
model: t.modelValue,
|
|
@@ -1410,7 +1518,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1410
1518
|
validator: t.validator,
|
|
1411
1519
|
lite: t.lite,
|
|
1412
1520
|
readOnly: t.readOnly || t.qMap.readOnly,
|
|
1413
|
-
onQmap_change:
|
|
1521
|
+
onQmap_change: b
|
|
1414
1522
|
}, null, 8, [
|
|
1415
1523
|
"qMap",
|
|
1416
1524
|
"model",
|
|
@@ -1418,7 +1526,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1418
1526
|
"validator",
|
|
1419
1527
|
"lite",
|
|
1420
1528
|
"readOnly"
|
|
1421
|
-
])) : f.value == "object" ? (
|
|
1529
|
+
])) : f.value == "object" ? (S(), i($t, {
|
|
1422
1530
|
key: 2,
|
|
1423
1531
|
qMap: t.qMap,
|
|
1424
1532
|
model: t.modelValue,
|
|
@@ -1427,7 +1535,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1427
1535
|
lite: t.lite,
|
|
1428
1536
|
readOnly: t.readOnly || t.qMap.readOnly,
|
|
1429
1537
|
provider: t.provider,
|
|
1430
|
-
onQmap_change:
|
|
1538
|
+
onQmap_change: b
|
|
1431
1539
|
}, null, 8, [
|
|
1432
1540
|
"qMap",
|
|
1433
1541
|
"model",
|
|
@@ -1436,7 +1544,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1436
1544
|
"lite",
|
|
1437
1545
|
"readOnly",
|
|
1438
1546
|
"provider"
|
|
1439
|
-
])) : f.value == "number" ? (
|
|
1547
|
+
])) : f.value == "number" ? (S(), i(Z, {
|
|
1440
1548
|
key: 3,
|
|
1441
1549
|
qMap: t.qMap,
|
|
1442
1550
|
model: t.modelValue,
|
|
@@ -1445,7 +1553,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1445
1553
|
validator: t.validator,
|
|
1446
1554
|
lite: t.lite,
|
|
1447
1555
|
readOnly: t.readOnly || t.qMap.readOnly,
|
|
1448
|
-
onQmap_change:
|
|
1556
|
+
onQmap_change: b
|
|
1449
1557
|
}, null, 8, [
|
|
1450
1558
|
"qMap",
|
|
1451
1559
|
"model",
|
|
@@ -1453,7 +1561,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1453
1561
|
"validator",
|
|
1454
1562
|
"lite",
|
|
1455
1563
|
"readOnly"
|
|
1456
|
-
])) : f.value == "colour" ? (
|
|
1564
|
+
])) : f.value == "colour" ? (S(), i(ft, {
|
|
1457
1565
|
key: 4,
|
|
1458
1566
|
qMap: t.qMap,
|
|
1459
1567
|
model: t.modelValue,
|
|
@@ -1461,7 +1569,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1461
1569
|
validator: t.validator,
|
|
1462
1570
|
lite: t.lite,
|
|
1463
1571
|
readOnly: t.readOnly || t.qMap.readOnly,
|
|
1464
|
-
onQmap_change:
|
|
1572
|
+
onQmap_change: b
|
|
1465
1573
|
}, null, 8, [
|
|
1466
1574
|
"qMap",
|
|
1467
1575
|
"model",
|
|
@@ -1469,7 +1577,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1469
1577
|
"validator",
|
|
1470
1578
|
"lite",
|
|
1471
1579
|
"readOnly"
|
|
1472
|
-
])) : f.value == "date" ? (
|
|
1580
|
+
])) : f.value == "date" ? (S(), i(Dt, {
|
|
1473
1581
|
key: 5,
|
|
1474
1582
|
qMap: t.qMap,
|
|
1475
1583
|
model: t.modelValue,
|
|
@@ -1478,7 +1586,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1478
1586
|
validator: t.validator,
|
|
1479
1587
|
lite: t.lite,
|
|
1480
1588
|
readOnly: t.readOnly || t.qMap.readOnly,
|
|
1481
|
-
onQmap_change:
|
|
1589
|
+
onQmap_change: b
|
|
1482
1590
|
}, null, 8, [
|
|
1483
1591
|
"qMap",
|
|
1484
1592
|
"model",
|
|
@@ -1486,7 +1594,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1486
1594
|
"validator",
|
|
1487
1595
|
"lite",
|
|
1488
1596
|
"readOnly"
|
|
1489
|
-
])) : f.value == "datetime" ? (
|
|
1597
|
+
])) : f.value == "datetime" ? (S(), i(Dt, {
|
|
1490
1598
|
key: 6,
|
|
1491
1599
|
qMap: t.qMap,
|
|
1492
1600
|
model: t.modelValue,
|
|
@@ -1495,7 +1603,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1495
1603
|
validator: t.validator,
|
|
1496
1604
|
lite: t.lite,
|
|
1497
1605
|
readOnly: t.readOnly || t.qMap.readOnly,
|
|
1498
|
-
onQmap_change:
|
|
1606
|
+
onQmap_change: b
|
|
1499
1607
|
}, null, 8, [
|
|
1500
1608
|
"qMap",
|
|
1501
1609
|
"model",
|
|
@@ -1503,7 +1611,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1503
1611
|
"validator",
|
|
1504
1612
|
"lite",
|
|
1505
1613
|
"readOnly"
|
|
1506
|
-
])) : f.value == "time" ? (
|
|
1614
|
+
])) : f.value == "time" ? (S(), i(Z, {
|
|
1507
1615
|
key: 7,
|
|
1508
1616
|
qMap: t.qMap,
|
|
1509
1617
|
model: t.modelValue,
|
|
@@ -1512,7 +1620,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1512
1620
|
validator: t.validator,
|
|
1513
1621
|
lite: t.lite,
|
|
1514
1622
|
readOnly: t.readOnly || t.qMap.readOnly,
|
|
1515
|
-
onQmap_change:
|
|
1623
|
+
onQmap_change: b
|
|
1516
1624
|
}, null, 8, [
|
|
1517
1625
|
"qMap",
|
|
1518
1626
|
"model",
|
|
@@ -1520,7 +1628,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1520
1628
|
"validator",
|
|
1521
1629
|
"lite",
|
|
1522
1630
|
"readOnly"
|
|
1523
|
-
])) : f.value == "colour" || f.value == "color" ? (
|
|
1631
|
+
])) : f.value == "colour" || f.value == "color" ? (S(), i(Z, {
|
|
1524
1632
|
key: 8,
|
|
1525
1633
|
qMap: t.qMap,
|
|
1526
1634
|
model: t.modelValue,
|
|
@@ -1529,7 +1637,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1529
1637
|
readOnly: t.readOnly || t.qMap.readOnly,
|
|
1530
1638
|
style: "color",
|
|
1531
1639
|
extras: t.extras,
|
|
1532
|
-
onQmap_change:
|
|
1640
|
+
onQmap_change: b
|
|
1533
1641
|
}, null, 8, [
|
|
1534
1642
|
"qMap",
|
|
1535
1643
|
"model",
|
|
@@ -1537,13 +1645,13 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1537
1645
|
"lite",
|
|
1538
1646
|
"readOnly",
|
|
1539
1647
|
"extras"
|
|
1540
|
-
])) : f.value == "boolean" ? (
|
|
1648
|
+
])) : f.value == "boolean" ? (S(), i(Me, {
|
|
1541
1649
|
key: 9,
|
|
1542
1650
|
qMap: t.qMap,
|
|
1543
1651
|
model: t.modelValue,
|
|
1544
|
-
onQmap_subquestions:
|
|
1652
|
+
onQmap_subquestions: r[1] ||= (e) => _.value = e || [],
|
|
1545
1653
|
extras: t.extras,
|
|
1546
|
-
onQmap_change:
|
|
1654
|
+
onQmap_change: b,
|
|
1547
1655
|
validator: t.validator,
|
|
1548
1656
|
lite: t.lite,
|
|
1549
1657
|
readOnly: t.readOnly || t.qMap.readOnly
|
|
@@ -1554,7 +1662,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1554
1662
|
"validator",
|
|
1555
1663
|
"lite",
|
|
1556
1664
|
"readOnly"
|
|
1557
|
-
])) : f.value == "caption" ? (
|
|
1665
|
+
])) : f.value == "caption" ? (S(), i(nn, {
|
|
1558
1666
|
key: 10,
|
|
1559
1667
|
qMap: t.qMap,
|
|
1560
1668
|
model: t.modelValue,
|
|
@@ -1563,7 +1671,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1563
1671
|
"qMap",
|
|
1564
1672
|
"model",
|
|
1565
1673
|
"lite"
|
|
1566
|
-
])) : f.value == "choice" ? (
|
|
1674
|
+
])) : f.value == "choice" ? (S(), i(st, {
|
|
1567
1675
|
key: 11,
|
|
1568
1676
|
qMap: t.qMap,
|
|
1569
1677
|
model: t.modelValue,
|
|
@@ -1572,8 +1680,8 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1572
1680
|
lite: t.lite,
|
|
1573
1681
|
readOnly: t.readOnly || t.qMap.readOnly,
|
|
1574
1682
|
provider: t.provider,
|
|
1575
|
-
onQmap_change:
|
|
1576
|
-
onQmap_subquestions:
|
|
1683
|
+
onQmap_change: b,
|
|
1684
|
+
onQmap_subquestions: r[2] ||= (e) => _.value = e || []
|
|
1577
1685
|
}, null, 8, [
|
|
1578
1686
|
"qMap",
|
|
1579
1687
|
"model",
|
|
@@ -1582,7 +1690,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1582
1690
|
"lite",
|
|
1583
1691
|
"readOnly",
|
|
1584
1692
|
"provider"
|
|
1585
|
-
])) : f.value == "map" ? (
|
|
1693
|
+
])) : f.value == "map" ? (S(), i(pn, {
|
|
1586
1694
|
key: 12,
|
|
1587
1695
|
qMap: t.qMap,
|
|
1588
1696
|
model: t.modelValue,
|
|
@@ -1591,8 +1699,8 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1591
1699
|
lite: t.lite,
|
|
1592
1700
|
readOnly: t.readOnly,
|
|
1593
1701
|
provider: t.provider,
|
|
1594
|
-
onQmap_change:
|
|
1595
|
-
onQmap_subquestions:
|
|
1702
|
+
onQmap_change: b,
|
|
1703
|
+
onQmap_subquestions: r[3] ||= (e) => _.value = e || []
|
|
1596
1704
|
}, null, 8, [
|
|
1597
1705
|
"qMap",
|
|
1598
1706
|
"model",
|
|
@@ -1601,7 +1709,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1601
1709
|
"lite",
|
|
1602
1710
|
"readOnly",
|
|
1603
1711
|
"provider"
|
|
1604
|
-
])) : f.value == "geo_map" ? (
|
|
1712
|
+
])) : f.value == "geo_map" ? (S(), i(rn, {
|
|
1605
1713
|
key: 13,
|
|
1606
1714
|
qMap: t.qMap,
|
|
1607
1715
|
model: t.modelValue,
|
|
@@ -1610,8 +1718,8 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1610
1718
|
lite: t.lite,
|
|
1611
1719
|
readOnly: t.readOnly,
|
|
1612
1720
|
provider: t.provider,
|
|
1613
|
-
onQmap_change:
|
|
1614
|
-
onQmap_subquestions:
|
|
1721
|
+
onQmap_change: b,
|
|
1722
|
+
onQmap_subquestions: r[4] ||= (e) => _.value = e || []
|
|
1615
1723
|
}, null, 8, [
|
|
1616
1724
|
"qMap",
|
|
1617
1725
|
"model",
|
|
@@ -1620,7 +1728,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1620
1728
|
"lite",
|
|
1621
1729
|
"readOnly",
|
|
1622
1730
|
"provider"
|
|
1623
|
-
])) : f.value == "array" ? (
|
|
1731
|
+
])) : f.value == "array" ? (S(), i(fe, {
|
|
1624
1732
|
key: 14,
|
|
1625
1733
|
qMap: t.qMap,
|
|
1626
1734
|
model: t.modelValue,
|
|
@@ -1629,7 +1737,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1629
1737
|
lite: t.lite,
|
|
1630
1738
|
provider: t.provider,
|
|
1631
1739
|
readOnly: t.readOnly || t.qMap.readOnly,
|
|
1632
|
-
onQmap_change:
|
|
1740
|
+
onQmap_change: b
|
|
1633
1741
|
}, null, 8, [
|
|
1634
1742
|
"qMap",
|
|
1635
1743
|
"model",
|
|
@@ -1638,7 +1746,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1638
1746
|
"lite",
|
|
1639
1747
|
"provider",
|
|
1640
1748
|
"readOnly"
|
|
1641
|
-
])) : f.value == "group" ? (
|
|
1749
|
+
])) : f.value == "group" ? (S(), i(Ft, {
|
|
1642
1750
|
key: 15,
|
|
1643
1751
|
qMap: t.qMap,
|
|
1644
1752
|
model: t.modelValue,
|
|
@@ -1647,7 +1755,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1647
1755
|
lite: t.lite,
|
|
1648
1756
|
provider: t.provider,
|
|
1649
1757
|
readOnly: t.readOnly || t.qMap.readOnly,
|
|
1650
|
-
onQmap_change:
|
|
1758
|
+
onQmap_change: r[5] ||= (e) => l("change", e, e.value)
|
|
1651
1759
|
}, null, 8, [
|
|
1652
1760
|
"qMap",
|
|
1653
1761
|
"model",
|
|
@@ -1656,15 +1764,15 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1656
1764
|
"lite",
|
|
1657
1765
|
"provider",
|
|
1658
1766
|
"readOnly"
|
|
1659
|
-
])) : f.value == "col" ? (
|
|
1767
|
+
])) : f.value == "col" ? (S(), o("div", hn, [u(K, { "q-map": t.qMap }, null, 8, ["q-map"]), s("div", { class: g(["flex gap-2", {
|
|
1660
1768
|
"flex-row": t.qMap.style != "column",
|
|
1661
1769
|
"flex-col": t.qMap.style == "column"
|
|
1662
|
-
}]) }, [(
|
|
1770
|
+
}]) }, [(S(!0), o(e, null, T(t.qMap.items, (e) => (S(), o("div", { class: g(["flex flex-1 flex-col min-w-0", { "gap-2": t.qMap.style != "column" }]) }, [u(c, {
|
|
1663
1771
|
qMap: e,
|
|
1664
1772
|
modelValue: t.modelValue,
|
|
1665
1773
|
extras: t.extras,
|
|
1666
|
-
onChange:
|
|
1667
|
-
"onUpdate:modelValue":
|
|
1774
|
+
onChange: r[6] ||= (e, t) => l("change", e, t),
|
|
1775
|
+
"onUpdate:modelValue": r[7] ||= (e) => l("update:model-value", e),
|
|
1668
1776
|
provider: t.provider,
|
|
1669
1777
|
validator: t.validator,
|
|
1670
1778
|
lite: t.lite,
|
|
@@ -1677,14 +1785,14 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1677
1785
|
"validator",
|
|
1678
1786
|
"lite",
|
|
1679
1787
|
"readOnly"
|
|
1680
|
-
])], 2))), 256))], 2)])) : f.value == "hidden" ? (
|
|
1681
|
-
y.value.length && t.qMap.ui?.separator ? (
|
|
1682
|
-
y.value.length ? (
|
|
1788
|
+
])], 2))), 256))], 2)])) : f.value == "hidden" ? (S(), o("div", gn)) : (S(), o("div", _n, "Unsupported " + k(t.qMap?.id) + " : " + k(f.value), 1))]),
|
|
1789
|
+
y.value.length && t.qMap.ui?.separator ? (S(), o("hr", vn)) : a("", !0),
|
|
1790
|
+
y.value.length ? (S(), o("div", yn, [(S(!0), o(e, null, T(y.value, (e) => (S(), i(c, {
|
|
1683
1791
|
qMap: e,
|
|
1684
1792
|
modelValue: t.modelValue,
|
|
1685
1793
|
extras: t.extras,
|
|
1686
|
-
onChange:
|
|
1687
|
-
"onUpdate:modelValue":
|
|
1794
|
+
onChange: r[8] ||= (e, t) => l("change", e, t),
|
|
1795
|
+
"onUpdate:modelValue": r[9] ||= (e) => l("update:model-value", e),
|
|
1688
1796
|
provider: t.provider,
|
|
1689
1797
|
validator: t.validator,
|
|
1690
1798
|
lite: t.lite,
|
|
@@ -1697,14 +1805,14 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
|
|
|
1697
1805
|
"validator",
|
|
1698
1806
|
"lite",
|
|
1699
1807
|
"readOnly"
|
|
1700
|
-
]))), 256))])) :
|
|
1808
|
+
]))), 256))])) : a("", !0)
|
|
1701
1809
|
], 64);
|
|
1702
1810
|
};
|
|
1703
1811
|
}
|
|
1704
|
-
}),
|
|
1705
|
-
function
|
|
1812
|
+
}), bn = ["col", "group"];
|
|
1813
|
+
function xn(e, t) {
|
|
1706
1814
|
var n = [];
|
|
1707
|
-
if (
|
|
1815
|
+
if (bn.indexOf(e.type) != -1 && (e.items || e.groups) ? e.items ? n = n.concat(e.items) : e.groups && (n = n.concat(e.groups.map((e) => e.items).reduce((e, t) => e.concat(t)).map((e) => xn(e, t)).reduce((e, t) => e.concat(t)))) : n.push(e), e.onValue && (!t || t[e.id] != null && t[e.id] != "") && (n = n.concat($(e.onValue, t))), e.type == "boolean" && (!t || t[e.id] == 1) && e.onPos && (n = n.concat($(e.onPos, t))), e.type == "boolean" && (!t || t[e.id] == 0) && e.onNeg && (n = n.concat($(e.onNeg, t))), e.values) {
|
|
1708
1816
|
let r = e.values.find((n) => n.value == (!t || t[e.id]));
|
|
1709
1817
|
r?.onSelect && (n = n.concat($(r.onSelect, t)));
|
|
1710
1818
|
}
|
|
@@ -1714,21 +1822,21 @@ function $(e, t) {
|
|
|
1714
1822
|
var n = [];
|
|
1715
1823
|
return e.forEach((e) => {
|
|
1716
1824
|
if (e.type != "caption") {
|
|
1717
|
-
let r =
|
|
1825
|
+
let r = xn(e, t);
|
|
1718
1826
|
n = n.concat(r);
|
|
1719
1827
|
}
|
|
1720
1828
|
}), n;
|
|
1721
1829
|
}
|
|
1722
1830
|
//#endregion
|
|
1723
1831
|
//#region src/services/question-validator.ts
|
|
1724
|
-
var
|
|
1725
|
-
invalidFields = new
|
|
1726
|
-
isValid = new
|
|
1832
|
+
var Sn = class {
|
|
1833
|
+
invalidFields = new H([]);
|
|
1834
|
+
isValid = new H(!0);
|
|
1727
1835
|
qMaps = [];
|
|
1728
1836
|
requiredQMaps = [];
|
|
1729
1837
|
children = [];
|
|
1730
1838
|
baseQMaps;
|
|
1731
|
-
changeEvents = new
|
|
1839
|
+
changeEvents = new U();
|
|
1732
1840
|
model;
|
|
1733
1841
|
activeQMAPS = /* @__PURE__ */ new Map();
|
|
1734
1842
|
constructor(e, t) {
|
|
@@ -1758,10 +1866,10 @@ var gn = class {
|
|
|
1758
1866
|
get currentQMaps() {
|
|
1759
1867
|
return this.qMaps;
|
|
1760
1868
|
}
|
|
1761
|
-
},
|
|
1869
|
+
}, Cn = {
|
|
1762
1870
|
key: 0,
|
|
1763
1871
|
class: "flex-1 min-w-0 overflow-auto"
|
|
1764
|
-
},
|
|
1872
|
+
}, wn = { class: "flex flex-col gap-2 p-2" }, Tn = { class: "flex justify-end gap-2" }, En = ["disabled"], Dn = /* @__PURE__ */ f({
|
|
1765
1873
|
__name: "Form",
|
|
1766
1874
|
props: {
|
|
1767
1875
|
questions: {},
|
|
@@ -1780,99 +1888,110 @@ var gn = class {
|
|
|
1780
1888
|
"qmap-change",
|
|
1781
1889
|
"update:model-value"
|
|
1782
1890
|
],
|
|
1783
|
-
setup(
|
|
1784
|
-
let
|
|
1785
|
-
get: () =>
|
|
1786
|
-
set: (e) =>
|
|
1891
|
+
setup(t, { emit: r }) {
|
|
1892
|
+
let c = t, l = r, u = { ...c.modelValue }, d = c.validator || new Sn(c.questions, c.modelValue), f = w(!0), p = n(() => !(c.showSubmit || c.showCancel || c.showReset)), m = n({
|
|
1893
|
+
get: () => c.modelValue,
|
|
1894
|
+
set: (e) => l("update:model-value", e)
|
|
1787
1895
|
});
|
|
1788
1896
|
function h(e, t) {
|
|
1789
|
-
|
|
1897
|
+
l("qmap-change", e, t);
|
|
1790
1898
|
}
|
|
1791
|
-
let
|
|
1792
|
-
return
|
|
1793
|
-
|
|
1794
|
-
}),
|
|
1795
|
-
key:
|
|
1796
|
-
qMap:
|
|
1797
|
-
validator:
|
|
1798
|
-
extras:
|
|
1899
|
+
let _;
|
|
1900
|
+
return v(() => {
|
|
1901
|
+
_ = d.isValid.subscribe((e) => f.value = e);
|
|
1902
|
+
}), x(() => _?.unsubscribe()), (n, r) => p.value ? (S(!0), o(e, { key: 0 }, T(t.questions, (e, n) => (S(), i(Q, {
|
|
1903
|
+
key: n,
|
|
1904
|
+
qMap: e,
|
|
1905
|
+
validator: A(d),
|
|
1906
|
+
extras: t.extras,
|
|
1799
1907
|
onChange: h,
|
|
1800
1908
|
modelValue: m.value,
|
|
1801
|
-
"onUpdate:modelValue":
|
|
1909
|
+
"onUpdate:modelValue": r[0] ||= (e) => m.value = e
|
|
1802
1910
|
}, null, 8, [
|
|
1803
1911
|
"qMap",
|
|
1804
1912
|
"validator",
|
|
1805
1913
|
"extras",
|
|
1806
1914
|
"modelValue"
|
|
1807
|
-
]))), 128)) : (
|
|
1915
|
+
]))), 128)) : (S(), o("div", {
|
|
1808
1916
|
key: 1,
|
|
1809
|
-
class:
|
|
1810
|
-
"flex flex-col flex-1 min-w-0":
|
|
1811
|
-
"flex flex-col gap-2 p-2": !
|
|
1917
|
+
class: g({
|
|
1918
|
+
"flex flex-col flex-1 min-w-0": t.scrollPane,
|
|
1919
|
+
"flex flex-col gap-2 p-2": !t.scrollPane
|
|
1812
1920
|
})
|
|
1813
1921
|
}, [
|
|
1814
|
-
|
|
1815
|
-
key:
|
|
1816
|
-
qMap:
|
|
1817
|
-
validator:
|
|
1818
|
-
extras:
|
|
1922
|
+
t.scrollPane ? (S(), o("div", Cn, [s("div", wn, [(S(!0), o(e, null, T(t.questions, (e, n) => (S(), i(Q, {
|
|
1923
|
+
key: n,
|
|
1924
|
+
qMap: e,
|
|
1925
|
+
validator: A(d),
|
|
1926
|
+
extras: t.extras,
|
|
1819
1927
|
onChange: h,
|
|
1820
1928
|
modelValue: m.value,
|
|
1821
|
-
"onUpdate:modelValue":
|
|
1929
|
+
"onUpdate:modelValue": r[1] ||= (e) => m.value = e
|
|
1822
1930
|
}, null, 8, [
|
|
1823
1931
|
"qMap",
|
|
1824
1932
|
"validator",
|
|
1825
1933
|
"extras",
|
|
1826
1934
|
"modelValue"
|
|
1827
|
-
]))), 128))])])) : (
|
|
1828
|
-
key:
|
|
1829
|
-
qMap:
|
|
1830
|
-
validator:
|
|
1831
|
-
extras:
|
|
1935
|
+
]))), 128))])])) : (S(!0), o(e, { key: 1 }, T(t.questions, (e, n) => (S(), i(Q, {
|
|
1936
|
+
key: n,
|
|
1937
|
+
qMap: e,
|
|
1938
|
+
validator: A(d),
|
|
1939
|
+
extras: t.extras,
|
|
1832
1940
|
onChange: h,
|
|
1833
1941
|
modelValue: m.value,
|
|
1834
|
-
"onUpdate:modelValue":
|
|
1942
|
+
"onUpdate:modelValue": r[2] ||= (e) => m.value = e
|
|
1835
1943
|
}, null, 8, [
|
|
1836
1944
|
"qMap",
|
|
1837
1945
|
"validator",
|
|
1838
1946
|
"extras",
|
|
1839
1947
|
"modelValue"
|
|
1840
1948
|
]))), 128)),
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1949
|
+
r[6] ||= s("hr", { class: "qmap-separator my-2" }, null, -1),
|
|
1950
|
+
s("div", Tn, [
|
|
1951
|
+
t.showSubmit ? (S(), o("button", {
|
|
1844
1952
|
key: 0,
|
|
1845
1953
|
type: "button",
|
|
1846
1954
|
class: "inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button",
|
|
1847
|
-
onClick:
|
|
1955
|
+
onClick: r[3] ||= (e) => l("submit", m.value),
|
|
1848
1956
|
disabled: !f.value
|
|
1849
|
-
}, "Submit", 8,
|
|
1850
|
-
|
|
1957
|
+
}, "Submit", 8, En)) : a("", !0),
|
|
1958
|
+
t.showReset ? (S(), o("button", {
|
|
1851
1959
|
key: 1,
|
|
1852
1960
|
type: "button",
|
|
1853
1961
|
class: "inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button qmap-button-secondary",
|
|
1854
|
-
onClick:
|
|
1855
|
-
m.value =
|
|
1962
|
+
onClick: r[4] ||= (e) => {
|
|
1963
|
+
m.value = u, l("reset");
|
|
1856
1964
|
}
|
|
1857
|
-
}, "Reset")) :
|
|
1858
|
-
|
|
1965
|
+
}, "Reset")) : a("", !0),
|
|
1966
|
+
t.showCancel ? (S(), o("button", {
|
|
1859
1967
|
key: 2,
|
|
1860
1968
|
type: "button",
|
|
1861
1969
|
class: "inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button qmap-button-ghost",
|
|
1862
|
-
onClick:
|
|
1863
|
-
}, "Cancel")) :
|
|
1970
|
+
onClick: r[5] ||= (e) => l("cancel")
|
|
1971
|
+
}, "Cancel")) : a("", !0)
|
|
1864
1972
|
])
|
|
1865
1973
|
], 2));
|
|
1866
1974
|
}
|
|
1867
1975
|
});
|
|
1868
1976
|
//#endregion
|
|
1977
|
+
//#region __vite-optional-peer-dep:leaflet/dist/leaflet.css:qmap-forms
|
|
1978
|
+
throw Error("Could not resolve \"leaflet/dist/leaflet.css\" imported by \"qmap-forms\". Is it installed?");
|
|
1979
|
+
function On(e) {
|
|
1980
|
+
C(Nn, e);
|
|
1981
|
+
}
|
|
1982
|
+
function kn() {
|
|
1983
|
+
let e = m(Nn, null);
|
|
1984
|
+
if (!e) throw Error("useMyService must be called under a provider (comp1)");
|
|
1985
|
+
return e;
|
|
1986
|
+
}
|
|
1987
|
+
//#endregion
|
|
1869
1988
|
//#region src/lib.ts
|
|
1870
|
-
function
|
|
1871
|
-
let
|
|
1989
|
+
function An(e, t, n, i) {
|
|
1990
|
+
let a = w(n), o = new H(a.value), s = new U(), c = p(Dn, {
|
|
1872
1991
|
questions: t,
|
|
1873
|
-
modelValue:
|
|
1992
|
+
modelValue: a.value,
|
|
1874
1993
|
"onUpdate:model-value": (e) => {
|
|
1875
|
-
|
|
1994
|
+
a.value = e, o.next(e);
|
|
1876
1995
|
},
|
|
1877
1996
|
onQmapChange: (e, t) => {
|
|
1878
1997
|
s.next({
|
|
@@ -1880,20 +1999,15 @@ function Sn(e, t, n, r) {
|
|
|
1880
1999
|
v: t
|
|
1881
2000
|
});
|
|
1882
2001
|
},
|
|
1883
|
-
...
|
|
2002
|
+
...i
|
|
1884
2003
|
});
|
|
1885
|
-
return
|
|
2004
|
+
return r(c).mount(e), {
|
|
1886
2005
|
form: c,
|
|
1887
|
-
model:
|
|
1888
|
-
state:
|
|
2006
|
+
model: a,
|
|
2007
|
+
state: o.asObservable(),
|
|
1889
2008
|
events: s
|
|
1890
2009
|
};
|
|
1891
2010
|
}
|
|
1892
|
-
var Cn = {
|
|
1893
|
-
Question: Q,
|
|
1894
|
-
Form: xn,
|
|
1895
|
-
QuestionValidator: gn,
|
|
1896
|
-
mount: Sn
|
|
1897
|
-
};
|
|
1898
2011
|
//#endregion
|
|
1899
|
-
export {
|
|
2012
|
+
export { St as CalendarPicker, Dn as Form, Nn as MyScopeKey, Q as Question, Sn as QuestionValidator, Ke as SimpleChoice, Et as SimpleDate, Mn as SimpleGeomEditor, K as TitleBlock, _e as ToggleSwitch, Pn as default, xn as flattenNode, $ as flattenQMAPs, An as mount, On as provideBadQMAPS, kn as useBadQMAPS };
|
|
2013
|
+
var jn, Mn, Nn, Pn;
|