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