pdap-design-system 2.4.1 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.cjs +2 -3
- package/dist/index.js +404 -383
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -1,36 +1,36 @@
|
|
1
|
-
import { defineComponent as
|
2
|
-
import { RouterLink as
|
3
|
-
const lt = /* @__PURE__ */
|
1
|
+
import { defineComponent as S, reactive as j, openBlock as v, createElementBlock as w, normalizeClass as U, renderSlot as Y, createBlock as A, resolveDynamicComponent as he, withCtx as R, inject as ne, resolveComponent as tt, createVNode as G, createElementVNode as b, Fragment as K, renderList as $e, unref as d, toDisplayString as z, createCommentVNode as M, createTextVNode as E, getCurrentInstance as rt, ref as P, onBeforeMount as Fe, watch as Z, isRef as me, onBeforeUnmount as ve, computed as _, isReactive as nt, isReadonly as at, provide as Re, nextTick as ae, mergeProps as te, watchEffect as Oe, withModifiers as st, normalizeStyle as ye, onMounted as ot } from "vue";
|
2
|
+
import { RouterLink as se, useRouter as it } from "vue-router";
|
3
|
+
const lt = /* @__PURE__ */ S({
|
4
4
|
__name: "PdapButton",
|
5
5
|
props: {
|
6
6
|
intent: { default: "primary" },
|
7
7
|
isLoading: { type: Boolean, default: !1 }
|
8
8
|
},
|
9
9
|
setup(e) {
|
10
|
-
const t = e, r =
|
10
|
+
const t = e, r = j({
|
11
11
|
"pdap-button": !0,
|
12
12
|
[`pdap-button-${t.intent}`]: !!t.intent,
|
13
13
|
"pdap-button-loading": t.isLoading
|
14
14
|
});
|
15
|
-
return (n, a) => (
|
15
|
+
return (n, a) => (v(), w("button", {
|
16
16
|
class: U(r)
|
17
17
|
}, [
|
18
18
|
Y(n.$slots, "default")
|
19
19
|
], 2));
|
20
20
|
}
|
21
21
|
});
|
22
|
-
const
|
22
|
+
const fe = /* @__PURE__ */ S({
|
23
23
|
__name: "FlexContainer",
|
24
24
|
props: {
|
25
25
|
alignment: { default: "start" },
|
26
26
|
component: { default: "div" }
|
27
27
|
},
|
28
28
|
setup(e) {
|
29
|
-
const r =
|
29
|
+
const r = j({
|
30
30
|
"pdap-flex-container": !0,
|
31
31
|
[`pdap-flex-container-${e.alignment}`]: !0
|
32
32
|
});
|
33
|
-
return (n, a) => (
|
33
|
+
return (n, a) => (v(), A(he(n.component), {
|
34
34
|
class: U(r)
|
35
35
|
}, {
|
36
36
|
default: R(() => [
|
@@ -41,14 +41,14 @@ const me = /* @__PURE__ */ j({
|
|
41
41
|
}
|
42
42
|
});
|
43
43
|
const ut = { class: "pdap-footer" }, ct = { class: "pdap-footer-social-links" }, dt = ["href"], pt = { class: "pdap-footer-copyright" }, mt = /* @__PURE__ */ b("br", null, null, -1), ft = /* @__PURE__ */ b("p", { class: "pdap-footer-copyright" }, [
|
44
|
-
/* @__PURE__ */
|
44
|
+
/* @__PURE__ */ E(" PDAP is a non-profit. EIN: 85-4207132. "),
|
45
45
|
/* @__PURE__ */ b("a", {
|
46
46
|
href: "https://docs.pdap.io/meta/policy/pdap-privacy-policy",
|
47
47
|
alt: "Privacy Policy",
|
48
48
|
target: "_blank"
|
49
49
|
}, [
|
50
50
|
/* @__PURE__ */ b("br"),
|
51
|
-
/* @__PURE__ */
|
51
|
+
/* @__PURE__ */ E(" Privacy Policy "),
|
52
52
|
/* @__PURE__ */ b("i", { class: "fa fa-external-link" })
|
53
53
|
]),
|
54
54
|
/* @__PURE__ */ b("br"),
|
@@ -58,7 +58,7 @@ const ut = { class: "pdap-footer" }, ct = { class: "pdap-footer-social-links" },
|
|
58
58
|
target: "_blank"
|
59
59
|
}, [
|
60
60
|
/* @__PURE__ */ b("img", { src: "https://widgets.guidestar.org/gximage2?o=9973356&l=v4" })
|
61
|
-
], -1), $t = ["href"], vt = ["src"], yt = ["src"],
|
61
|
+
], -1), $t = ["href"], vt = ["src"], yt = ["src"], fn = /* @__PURE__ */ S({
|
62
62
|
__name: "PdapFooter",
|
63
63
|
props: {
|
64
64
|
logoImageSrc: { default: "node_modules/pdap-design-system/dist/images/acronym.svg" },
|
@@ -85,22 +85,22 @@ const ut = { class: "pdap-footer" }, ct = { class: "pdap-footer-social-links" },
|
|
85
85
|
]), n = t.logoImageAnchorPath.startsWith("/");
|
86
86
|
return (a, s) => {
|
87
87
|
const u = tt("router-link");
|
88
|
-
return
|
89
|
-
G(
|
88
|
+
return v(), w("footer", ut, [
|
89
|
+
G(fe, { alignment: "center" }, {
|
90
90
|
default: R(() => [
|
91
91
|
b("ul", ct, [
|
92
|
-
(
|
92
|
+
(v(!0), w(K, null, $e(d(r), (l) => (v(), w("li", {
|
93
93
|
key: l.text,
|
94
94
|
class: "pdap-footer-link-container"
|
95
95
|
}, [
|
96
|
-
l.href ? (
|
96
|
+
l.href ? (v(), w("a", {
|
97
97
|
key: 0,
|
98
98
|
class: "pdap-footer-social-link",
|
99
99
|
href: l.href,
|
100
100
|
target: "_blank",
|
101
101
|
referrerpolicy: "no-referrer"
|
102
|
-
},
|
103
|
-
l.path ? (
|
102
|
+
}, z(l.text), 9, dt)) : M("", !0),
|
103
|
+
l.path ? (v(), A(u, {
|
104
104
|
key: 1,
|
105
105
|
"active-class": "pdap-footer-social-link-current",
|
106
106
|
"exact-active-class": "pdap-footer-social-link-current-exact",
|
@@ -108,20 +108,20 @@ const ut = { class: "pdap-footer" }, ct = { class: "pdap-footer-social-links" },
|
|
108
108
|
to: l.path
|
109
109
|
}, {
|
110
110
|
default: R(() => [
|
111
|
-
|
111
|
+
E(z(l.text), 1)
|
112
112
|
]),
|
113
113
|
_: 2
|
114
|
-
}, 1032, ["to"])) :
|
114
|
+
}, 1032, ["to"])) : M("", !0)
|
115
115
|
]))), 128))
|
116
116
|
]),
|
117
117
|
b("p", pt, [
|
118
|
-
|
118
|
+
E(" © " + z((/* @__PURE__ */ new Date()).getFullYear()) + " Police Data Accessibility Project", 1),
|
119
119
|
mt
|
120
120
|
]),
|
121
121
|
ft,
|
122
122
|
b("div", gt, [
|
123
123
|
ht,
|
124
|
-
d(n) ? (
|
124
|
+
d(n) ? (v(), A(u, {
|
125
125
|
key: 1,
|
126
126
|
to: a.logoImageAnchorPath,
|
127
127
|
class: "pdap-footer-logo"
|
@@ -135,7 +135,7 @@ const ut = { class: "pdap-footer" }, ct = { class: "pdap-footer-social-links" },
|
|
135
135
|
}, null, 8, yt)
|
136
136
|
]),
|
137
137
|
_: 1
|
138
|
-
}, 8, ["to"])) : (
|
138
|
+
}, 8, ["to"])) : (v(), w("a", {
|
139
139
|
key: 0,
|
140
140
|
href: a.logoImageAnchorPath,
|
141
141
|
class: "pdap-footer-logo"
|
@@ -155,7 +155,7 @@ const ut = { class: "pdap-footer" }, ct = { class: "pdap-footer-social-links" },
|
|
155
155
|
};
|
156
156
|
}
|
157
157
|
});
|
158
|
-
function
|
158
|
+
function Ce(e, t) {
|
159
159
|
var r = Object.keys(e);
|
160
160
|
if (Object.getOwnPropertySymbols) {
|
161
161
|
var n = Object.getOwnPropertySymbols(e);
|
@@ -165,12 +165,12 @@ function Oe(e, t) {
|
|
165
165
|
}
|
166
166
|
return r;
|
167
167
|
}
|
168
|
-
function
|
168
|
+
function V(e) {
|
169
169
|
for (var t = 1; t < arguments.length; t++) {
|
170
170
|
var r = arguments[t] != null ? arguments[t] : {};
|
171
|
-
t % 2 ?
|
171
|
+
t % 2 ? Ce(Object(r), !0).forEach(function(n) {
|
172
172
|
_t(e, n, r[n]);
|
173
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) :
|
173
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Ce(Object(r)).forEach(function(n) {
|
174
174
|
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
175
175
|
});
|
176
176
|
}
|
@@ -184,11 +184,11 @@ function _t(e, t, r) {
|
|
184
184
|
writable: !0
|
185
185
|
}) : e[t] = r, e;
|
186
186
|
}
|
187
|
-
function
|
187
|
+
function Ee(e) {
|
188
188
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
189
189
|
return Object.keys(e).reduce((r, n) => (t.includes(n) || (r[n] = d(e[n])), r), {});
|
190
190
|
}
|
191
|
-
function
|
191
|
+
function oe(e) {
|
192
192
|
return typeof e == "function";
|
193
193
|
}
|
194
194
|
function bt(e) {
|
@@ -204,12 +204,12 @@ function qe(e, t, r) {
|
|
204
204
|
}
|
205
205
|
return n;
|
206
206
|
}
|
207
|
-
function
|
207
|
+
function pe(e, t, r) {
|
208
208
|
return _(() => e.some((n) => qe(t, n, {
|
209
209
|
[r]: !1
|
210
210
|
})[r]));
|
211
211
|
}
|
212
|
-
function
|
212
|
+
function je(e, t, r) {
|
213
213
|
return _(() => e.reduce((n, a) => {
|
214
214
|
const s = qe(t, a, {
|
215
215
|
[r]: !1
|
@@ -227,22 +227,22 @@ function wt(e, t, r, n, a, s, u) {
|
|
227
227
|
let {
|
228
228
|
$lazy: l,
|
229
229
|
$rewardEarly: o
|
230
|
-
} = a, c = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : [],
|
230
|
+
} = a, c = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : [], p = arguments.length > 8 ? arguments[8] : void 0, h = arguments.length > 9 ? arguments[9] : void 0, $ = arguments.length > 10 ? arguments[10] : void 0;
|
231
231
|
const f = P(!!n.value), i = P(0);
|
232
232
|
r.value = !1;
|
233
|
-
const
|
234
|
-
if (l && !n.value || o &&
|
233
|
+
const m = Z([t, n].concat(c, $), () => {
|
234
|
+
if (l && !n.value || o && !h.value && !r.value)
|
235
235
|
return;
|
236
236
|
let g;
|
237
237
|
try {
|
238
|
-
g = Ne(e, t,
|
239
|
-
} catch (
|
240
|
-
g = Promise.reject(
|
238
|
+
g = Ne(e, t, p, u);
|
239
|
+
} catch (y) {
|
240
|
+
g = Promise.reject(y);
|
241
241
|
}
|
242
|
-
i.value++, r.value = !!i.value, f.value = !1, Promise.resolve(g).then((
|
243
|
-
i.value--, r.value = !!i.value, s.value =
|
244
|
-
}).catch((
|
245
|
-
i.value--, r.value = !!i.value, s.value =
|
242
|
+
i.value++, r.value = !!i.value, f.value = !1, Promise.resolve(g).then((y) => {
|
243
|
+
i.value--, r.value = !!i.value, s.value = y, f.value = Be(y);
|
244
|
+
}).catch((y) => {
|
245
|
+
i.value--, r.value = !!i.value, s.value = y, f.value = !0;
|
246
246
|
});
|
247
247
|
}, {
|
248
248
|
immediate: !0,
|
@@ -250,7 +250,7 @@ function wt(e, t, r, n, a, s, u) {
|
|
250
250
|
});
|
251
251
|
return {
|
252
252
|
$invalid: f,
|
253
|
-
$unwatch:
|
253
|
+
$unwatch: m
|
254
254
|
};
|
255
255
|
}
|
256
256
|
function xt(e, t, r, n, a, s, u, l) {
|
@@ -258,50 +258,50 @@ function xt(e, t, r, n, a, s, u, l) {
|
|
258
258
|
$lazy: o,
|
259
259
|
$rewardEarly: c
|
260
260
|
} = n;
|
261
|
-
const
|
261
|
+
const p = () => ({}), h = _(() => {
|
262
262
|
if (o && !r.value || c && !l.value)
|
263
263
|
return !1;
|
264
|
-
let
|
264
|
+
let $ = !0;
|
265
265
|
try {
|
266
266
|
const f = Ne(e, t, u, s);
|
267
|
-
a.value = f,
|
267
|
+
a.value = f, $ = Be(f);
|
268
268
|
} catch (f) {
|
269
269
|
a.value = f;
|
270
270
|
}
|
271
|
-
return
|
271
|
+
return $;
|
272
272
|
});
|
273
273
|
return {
|
274
|
-
$unwatch:
|
275
|
-
$invalid:
|
274
|
+
$unwatch: p,
|
275
|
+
$invalid: h
|
276
276
|
};
|
277
277
|
}
|
278
|
-
function Pt(e, t, r, n, a, s, u, l, o, c,
|
279
|
-
const
|
280
|
-
let i,
|
278
|
+
function Pt(e, t, r, n, a, s, u, l, o, c, p) {
|
279
|
+
const h = P(!1), $ = e.$params || {}, f = P(null);
|
280
|
+
let i, m;
|
281
281
|
e.$async ? {
|
282
282
|
$invalid: i,
|
283
|
-
$unwatch:
|
284
|
-
} = wt(e.$validator, t,
|
283
|
+
$unwatch: m
|
284
|
+
} = wt(e.$validator, t, h, r, n, f, a, e.$watchTargets, o, c, p) : {
|
285
285
|
$invalid: i,
|
286
|
-
$unwatch:
|
286
|
+
$unwatch: m
|
287
287
|
} = xt(e.$validator, t, r, n, f, a, o, c);
|
288
288
|
const g = e.$message;
|
289
289
|
return {
|
290
|
-
$message:
|
291
|
-
$pending:
|
290
|
+
$message: oe(g) ? _(() => g(Ee({
|
291
|
+
$pending: h,
|
292
292
|
$invalid: i,
|
293
|
-
$params:
|
293
|
+
$params: Ee($),
|
294
294
|
$model: t,
|
295
295
|
$response: f,
|
296
296
|
$validator: s,
|
297
297
|
$propertyPath: l,
|
298
298
|
$property: u
|
299
299
|
}))) : g || "",
|
300
|
-
$params:
|
301
|
-
$pending:
|
300
|
+
$params: $,
|
301
|
+
$pending: h,
|
302
302
|
$invalid: i,
|
303
303
|
$response: f,
|
304
|
-
$unwatch:
|
304
|
+
$unwatch: m
|
305
305
|
};
|
306
306
|
}
|
307
307
|
function Rt() {
|
@@ -311,10 +311,10 @@ function Rt() {
|
|
311
311
|
return r.forEach((l) => {
|
312
312
|
const o = t[l];
|
313
313
|
switch (!0) {
|
314
|
-
case
|
314
|
+
case oe(o.$validator):
|
315
315
|
n[l] = o;
|
316
316
|
break;
|
317
|
-
case
|
317
|
+
case oe(o):
|
318
318
|
n[l] = {
|
319
319
|
$validator: o
|
320
320
|
};
|
@@ -337,59 +337,59 @@ function Rt() {
|
|
337
337
|
}
|
338
338
|
const Ot = "__root";
|
339
339
|
function Ct(e, t, r, n, a, s, u, l, o) {
|
340
|
-
const c = Object.keys(e),
|
341
|
-
if (
|
342
|
-
if (!
|
343
|
-
return
|
344
|
-
|
340
|
+
const c = Object.keys(e), p = n.get(a, e), h = P(!1), $ = P(!1), f = P(0);
|
341
|
+
if (p) {
|
342
|
+
if (!p.$partial)
|
343
|
+
return p;
|
344
|
+
p.$unwatch(), h.value = p.$dirty.value;
|
345
345
|
}
|
346
346
|
const i = {
|
347
|
-
$dirty:
|
347
|
+
$dirty: h,
|
348
348
|
$path: a,
|
349
349
|
$touch: () => {
|
350
|
-
|
350
|
+
h.value || (h.value = !0);
|
351
351
|
},
|
352
352
|
$reset: () => {
|
353
|
-
|
353
|
+
h.value && (h.value = !1);
|
354
354
|
},
|
355
355
|
$commit: () => {
|
356
356
|
}
|
357
357
|
};
|
358
|
-
return c.length ? (c.forEach((
|
359
|
-
i[
|
360
|
-
}), i.$externalResults = _(() => l.value ? [].concat(l.value).map((
|
358
|
+
return c.length ? (c.forEach((m) => {
|
359
|
+
i[m] = Pt(e[m], t, i.$dirty, s, u, m, r, a, o, $, f);
|
360
|
+
}), i.$externalResults = _(() => l.value ? [].concat(l.value).map((m, g) => ({
|
361
361
|
$propertyPath: a,
|
362
362
|
$property: r,
|
363
363
|
$validator: "$externalResults",
|
364
364
|
$uid: `${a}-externalResult-${g}`,
|
365
|
-
$message:
|
365
|
+
$message: m,
|
366
366
|
$params: {},
|
367
367
|
$response: null,
|
368
368
|
$pending: !1
|
369
369
|
})) : []), i.$invalid = _(() => {
|
370
|
-
const
|
371
|
-
return
|
372
|
-
}), i.$pending = _(() => c.some((
|
373
|
-
const g = i[
|
374
|
-
return
|
370
|
+
const m = c.some((g) => d(i[g].$invalid));
|
371
|
+
return $.value = m, !!i.$externalResults.value.length || m;
|
372
|
+
}), i.$pending = _(() => c.some((m) => d(i[m].$pending))), i.$error = _(() => i.$dirty.value ? i.$pending.value || i.$invalid.value : !1), i.$silentErrors = _(() => c.filter((m) => d(i[m].$invalid)).map((m) => {
|
373
|
+
const g = i[m];
|
374
|
+
return j({
|
375
375
|
$propertyPath: a,
|
376
376
|
$property: r,
|
377
|
-
$validator:
|
378
|
-
$uid: `${a}-${
|
377
|
+
$validator: m,
|
378
|
+
$uid: `${a}-${m}`,
|
379
379
|
$message: g.$message,
|
380
380
|
$params: g.$params,
|
381
381
|
$response: g.$response,
|
382
382
|
$pending: g.$pending
|
383
383
|
});
|
384
|
-
}).concat(i.$externalResults.value)), i.$errors = _(() => i.$dirty.value ? i.$silentErrors.value : []), i.$unwatch = () => c.forEach((
|
385
|
-
i[
|
384
|
+
}).concat(i.$externalResults.value)), i.$errors = _(() => i.$dirty.value ? i.$silentErrors.value : []), i.$unwatch = () => c.forEach((m) => {
|
385
|
+
i[m].$unwatch();
|
386
386
|
}), i.$commit = () => {
|
387
|
-
|
388
|
-
}, n.set(a, e, i), i) : (
|
387
|
+
$.value = !0, f.value = Date.now();
|
388
|
+
}, n.set(a, e, i), i) : (p && n.set(a, e, i), i);
|
389
389
|
}
|
390
390
|
function Et(e, t, r, n, a, s, u) {
|
391
391
|
const l = Object.keys(e);
|
392
|
-
return l.length ? l.reduce((o, c) => (o[c] =
|
392
|
+
return l.length ? l.reduce((o, c) => (o[c] = ge({
|
393
393
|
validations: e[c],
|
394
394
|
state: t,
|
395
395
|
key: c,
|
@@ -401,7 +401,7 @@ function Et(e, t, r, n, a, s, u) {
|
|
401
401
|
}), o), {}) : {};
|
402
402
|
}
|
403
403
|
function jt(e, t, r) {
|
404
|
-
const n = _(() => [t, r].filter((i) => i).reduce((i,
|
404
|
+
const n = _(() => [t, r].filter((i) => i).reduce((i, m) => i.concat(Object.values(d(m))), [])), a = _({
|
405
405
|
get() {
|
406
406
|
return e.$dirty.value || (n.value.length ? n.value.every((i) => i.$dirty) : !1);
|
407
407
|
},
|
@@ -409,16 +409,16 @@ function jt(e, t, r) {
|
|
409
409
|
e.$dirty.value = i;
|
410
410
|
}
|
411
411
|
}), s = _(() => {
|
412
|
-
const i = d(e.$silentErrors) || [],
|
413
|
-
return i.concat(
|
412
|
+
const i = d(e.$silentErrors) || [], m = n.value.filter((g) => (d(g).$silentErrors || []).length).reduce((g, y) => g.concat(...y.$silentErrors), []);
|
413
|
+
return i.concat(m);
|
414
414
|
}), u = _(() => {
|
415
|
-
const i = d(e.$errors) || [],
|
416
|
-
return i.concat(
|
417
|
-
}), l = _(() => n.value.some((i) => i.$invalid) || d(e.$invalid) || !1), o = _(() => n.value.some((i) => d(i.$pending)) || d(e.$pending) || !1), c = _(() => n.value.some((i) => i.$dirty) || n.value.some((i) => i.$anyDirty) || a.value),
|
415
|
+
const i = d(e.$errors) || [], m = n.value.filter((g) => (d(g).$errors || []).length).reduce((g, y) => g.concat(...y.$errors), []);
|
416
|
+
return i.concat(m);
|
417
|
+
}), l = _(() => n.value.some((i) => i.$invalid) || d(e.$invalid) || !1), o = _(() => n.value.some((i) => d(i.$pending)) || d(e.$pending) || !1), c = _(() => n.value.some((i) => i.$dirty) || n.value.some((i) => i.$anyDirty) || a.value), p = _(() => a.value ? o.value || l.value : !1), h = () => {
|
418
418
|
e.$touch(), n.value.forEach((i) => {
|
419
419
|
i.$touch();
|
420
420
|
});
|
421
|
-
},
|
421
|
+
}, $ = () => {
|
422
422
|
e.$commit(), n.value.forEach((i) => {
|
423
423
|
i.$commit();
|
424
424
|
});
|
@@ -427,20 +427,20 @@ function jt(e, t, r) {
|
|
427
427
|
i.$reset();
|
428
428
|
});
|
429
429
|
};
|
430
|
-
return n.value.length && n.value.every((i) => i.$dirty) &&
|
430
|
+
return n.value.length && n.value.every((i) => i.$dirty) && h(), {
|
431
431
|
$dirty: a,
|
432
432
|
$errors: u,
|
433
433
|
$invalid: l,
|
434
434
|
$anyDirty: c,
|
435
|
-
$error:
|
435
|
+
$error: p,
|
436
436
|
$pending: o,
|
437
|
-
$touch:
|
437
|
+
$touch: h,
|
438
438
|
$reset: f,
|
439
439
|
$silentErrors: s,
|
440
|
-
$commit:
|
440
|
+
$commit: $
|
441
441
|
};
|
442
442
|
}
|
443
|
-
function
|
443
|
+
function ge(e) {
|
444
444
|
let {
|
445
445
|
validations: t,
|
446
446
|
state: r,
|
@@ -452,89 +452,89 @@ function fe(e) {
|
|
452
452
|
instance: o,
|
453
453
|
externalResults: c
|
454
454
|
} = e;
|
455
|
-
const
|
456
|
-
rules:
|
457
|
-
nestedValidators:
|
455
|
+
const p = a ? `${a}.${n}` : n, {
|
456
|
+
rules: h,
|
457
|
+
nestedValidators: $,
|
458
458
|
config: f,
|
459
459
|
validationGroups: i
|
460
|
-
} = Rt(t),
|
461
|
-
const
|
462
|
-
return
|
463
|
-
}) : r,
|
464
|
-
const
|
465
|
-
return n ?
|
466
|
-
}),
|
467
|
-
i && Object.entries(i).forEach((
|
468
|
-
let [
|
469
|
-
|
470
|
-
$invalid:
|
471
|
-
$error:
|
472
|
-
$pending:
|
473
|
-
$errors:
|
474
|
-
$silentErrors:
|
460
|
+
} = Rt(t), m = V(V({}, l), f), g = n ? _(() => {
|
461
|
+
const x = d(r);
|
462
|
+
return x ? d(x[n]) : void 0;
|
463
|
+
}) : r, y = V({}, d(c) || {}), k = _(() => {
|
464
|
+
const x = d(c);
|
465
|
+
return n ? x ? d(x[n]) : void 0 : x;
|
466
|
+
}), q = Ct(h, g, n, u, p, m, o, k, r), C = Et($, g, p, u, m, o, k), N = {};
|
467
|
+
i && Object.entries(i).forEach((x) => {
|
468
|
+
let [B, L] = x;
|
469
|
+
N[B] = {
|
470
|
+
$invalid: pe(L, C, "$invalid"),
|
471
|
+
$error: pe(L, C, "$error"),
|
472
|
+
$pending: pe(L, C, "$pending"),
|
473
|
+
$errors: je(L, C, "$errors"),
|
474
|
+
$silentErrors: je(L, C, "$silentErrors")
|
475
475
|
};
|
476
476
|
});
|
477
477
|
const {
|
478
478
|
$dirty: T,
|
479
479
|
$errors: ee,
|
480
|
-
$invalid:
|
480
|
+
$invalid: ue,
|
481
481
|
$anyDirty: Ue,
|
482
482
|
$error: Xe,
|
483
|
-
$pending:
|
484
|
-
$touch:
|
483
|
+
$pending: ce,
|
484
|
+
$touch: de,
|
485
485
|
$reset: Ke,
|
486
486
|
$silentErrors: Ze,
|
487
|
-
$commit:
|
488
|
-
} = jt(
|
487
|
+
$commit: Pe
|
488
|
+
} = jt(q, C, s), Qe = n ? _({
|
489
489
|
get: () => d(g),
|
490
|
-
set: (
|
490
|
+
set: (x) => {
|
491
491
|
T.value = !0;
|
492
|
-
const
|
493
|
-
L && (L[n] =
|
492
|
+
const B = d(r), L = d(c);
|
493
|
+
L && (L[n] = y[n]), me(B[n]) ? B[n].value = x : B[n] = x;
|
494
494
|
}
|
495
495
|
}) : null;
|
496
|
-
n &&
|
497
|
-
T.value ||
|
498
|
-
const
|
499
|
-
|
496
|
+
n && m.$autoDirty && Z(g, () => {
|
497
|
+
T.value || de();
|
498
|
+
const x = d(c);
|
499
|
+
x && (x[n] = y[n]);
|
500
500
|
}, {
|
501
501
|
flush: "sync"
|
502
502
|
});
|
503
503
|
async function Je() {
|
504
|
-
return
|
505
|
-
if (!
|
506
|
-
return
|
507
|
-
const
|
508
|
-
|
504
|
+
return de(), m.$rewardEarly && (Pe(), await ae()), await ae(), new Promise((x) => {
|
505
|
+
if (!ce.value)
|
506
|
+
return x(!ue.value);
|
507
|
+
const B = Z(ce, () => {
|
508
|
+
x(!ue.value), B();
|
509
509
|
});
|
510
510
|
});
|
511
511
|
}
|
512
|
-
function Ye(
|
513
|
-
return (s.value || {})[
|
512
|
+
function Ye(x) {
|
513
|
+
return (s.value || {})[x];
|
514
514
|
}
|
515
515
|
function et() {
|
516
|
-
|
517
|
-
delete c[
|
518
|
-
}) : Object.assign(c,
|
516
|
+
me(c) ? c.value = y : Object.keys(y).length === 0 ? Object.keys(c).forEach((x) => {
|
517
|
+
delete c[x];
|
518
|
+
}) : Object.assign(c, y);
|
519
519
|
}
|
520
|
-
return
|
520
|
+
return j(V(V(V({}, q), {}, {
|
521
521
|
$model: Qe,
|
522
522
|
$dirty: T,
|
523
523
|
$error: Xe,
|
524
524
|
$errors: ee,
|
525
|
-
$invalid:
|
525
|
+
$invalid: ue,
|
526
526
|
$anyDirty: Ue,
|
527
|
-
$pending:
|
528
|
-
$touch:
|
527
|
+
$pending: ce,
|
528
|
+
$touch: de,
|
529
529
|
$reset: Ke,
|
530
|
-
$path:
|
530
|
+
$path: p || Ot,
|
531
531
|
$silentErrors: Ze,
|
532
532
|
$validate: Je,
|
533
|
-
$commit:
|
533
|
+
$commit: Pe
|
534
534
|
}, s && {
|
535
535
|
$getResultsForChild: Ye,
|
536
536
|
$clearExternalResults: et,
|
537
|
-
$validationGroups:
|
537
|
+
$validationGroups: N
|
538
538
|
}), C));
|
539
539
|
}
|
540
540
|
class At {
|
@@ -569,30 +569,30 @@ class At {
|
|
569
569
|
const re = {
|
570
570
|
COLLECT_ALL: !0,
|
571
571
|
COLLECT_NONE: !1
|
572
|
-
},
|
572
|
+
}, Ae = Symbol("vuelidate#injectChildResults"), Se = Symbol("vuelidate#removeChildResults");
|
573
573
|
function St(e) {
|
574
574
|
let {
|
575
575
|
$scope: t,
|
576
576
|
instance: r
|
577
577
|
} = e;
|
578
|
-
const n = {}, a = P([]), s = _(() => a.value.reduce((
|
579
|
-
function u(
|
578
|
+
const n = {}, a = P([]), s = _(() => a.value.reduce((p, h) => (p[h] = d(n[h]), p), {}));
|
579
|
+
function u(p, h) {
|
580
580
|
let {
|
581
|
-
$registerAs:
|
581
|
+
$registerAs: $,
|
582
582
|
$scope: f,
|
583
583
|
$stopPropagation: i
|
584
|
-
} =
|
585
|
-
i || t === re.COLLECT_NONE || f === re.COLLECT_NONE || t !== re.COLLECT_ALL && t !== f || (n[
|
584
|
+
} = h;
|
585
|
+
i || t === re.COLLECT_NONE || f === re.COLLECT_NONE || t !== re.COLLECT_ALL && t !== f || (n[$] = p, a.value.push($));
|
586
586
|
}
|
587
587
|
r.__vuelidateInjectInstances = [].concat(r.__vuelidateInjectInstances || [], u);
|
588
|
-
function l(
|
589
|
-
a.value = a.value.filter((
|
588
|
+
function l(p) {
|
589
|
+
a.value = a.value.filter((h) => h !== p), delete n[p];
|
590
590
|
}
|
591
591
|
r.__vuelidateRemoveInstances = [].concat(r.__vuelidateRemoveInstances || [], l);
|
592
|
-
const o = ne(
|
593
|
-
|
594
|
-
const c = ne(
|
595
|
-
return
|
592
|
+
const o = ne(Ae, []);
|
593
|
+
Re(Ae, r.__vuelidateInjectInstances);
|
594
|
+
const c = ne(Se, []);
|
595
|
+
return Re(Se, r.__vuelidateRemoveInstances), {
|
596
596
|
childResults: s,
|
597
597
|
sendValidationResultsToParent: o,
|
598
598
|
removeValidationResultsFromParent: c
|
@@ -605,8 +605,8 @@ function He(e) {
|
|
605
605
|
}
|
606
606
|
});
|
607
607
|
}
|
608
|
-
let
|
609
|
-
function
|
608
|
+
let ke = 0;
|
609
|
+
function kt(e, t) {
|
610
610
|
var r;
|
611
611
|
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
612
612
|
arguments.length === 1 && (n = e, e = void 0, t = void 0);
|
@@ -617,27 +617,27 @@ function It(e, t) {
|
|
617
617
|
$externalResults: l,
|
618
618
|
currentVueInstance: o
|
619
619
|
} = n;
|
620
|
-
const c = o || ((r = rt()) === null || r === void 0 ? void 0 : r.proxy),
|
621
|
-
a || (
|
622
|
-
const
|
620
|
+
const c = o || ((r = rt()) === null || r === void 0 ? void 0 : r.proxy), p = c ? c.$options : {};
|
621
|
+
a || (ke += 1, a = `_vuelidate_${ke}`);
|
622
|
+
const h = P({}), $ = new At(), {
|
623
623
|
childResults: f,
|
624
624
|
sendValidationResultsToParent: i,
|
625
|
-
removeValidationResultsFromParent:
|
625
|
+
removeValidationResultsFromParent: m
|
626
626
|
} = c ? St({
|
627
627
|
$scope: s,
|
628
628
|
instance: c
|
629
629
|
}) : {
|
630
630
|
childResults: P({})
|
631
631
|
};
|
632
|
-
if (!e &&
|
633
|
-
const g =
|
634
|
-
t = P({}),
|
635
|
-
t.value = c, Z(() =>
|
636
|
-
|
637
|
-
validations:
|
632
|
+
if (!e && p.validations) {
|
633
|
+
const g = p.validations;
|
634
|
+
t = P({}), Fe(() => {
|
635
|
+
t.value = c, Z(() => oe(g) ? g.call(t.value, new He(t.value)) : g, (y) => {
|
636
|
+
h.value = ge({
|
637
|
+
validations: y,
|
638
638
|
state: t,
|
639
639
|
childResults: f,
|
640
|
-
resultsCache:
|
640
|
+
resultsCache: $,
|
641
641
|
globalConfig: n,
|
642
642
|
instance: c,
|
643
643
|
externalResults: l || c.vuelidateExternalResults
|
@@ -645,15 +645,15 @@ function It(e, t) {
|
|
645
645
|
}, {
|
646
646
|
immediate: !0
|
647
647
|
});
|
648
|
-
}), n =
|
648
|
+
}), n = p.validationsConfig || n;
|
649
649
|
} else {
|
650
|
-
const g =
|
651
|
-
Z(g, (
|
652
|
-
|
653
|
-
validations:
|
650
|
+
const g = me(e) || bt(e) ? e : j(e || {});
|
651
|
+
Z(g, (y) => {
|
652
|
+
h.value = ge({
|
653
|
+
validations: y,
|
654
654
|
state: t,
|
655
655
|
childResults: f,
|
656
|
-
resultsCache:
|
656
|
+
resultsCache: $,
|
657
657
|
globalConfig: n,
|
658
658
|
instance: c ?? {},
|
659
659
|
externalResults: l
|
@@ -662,14 +662,14 @@ function It(e, t) {
|
|
662
662
|
immediate: !0
|
663
663
|
});
|
664
664
|
}
|
665
|
-
return c && (i.forEach((g) => g(
|
665
|
+
return c && (i.forEach((g) => g(h, {
|
666
666
|
$registerAs: a,
|
667
667
|
$scope: s,
|
668
668
|
$stopPropagation: u
|
669
|
-
})),
|
669
|
+
})), ve(() => m.forEach((g) => g(a)))), _(() => V(V({}, d(h.value)), f.value));
|
670
670
|
}
|
671
|
-
var
|
672
|
-
const
|
671
|
+
var I = /* @__PURE__ */ ((e) => (e.CHECKBOX = "checkbox", e.TEXT = "text", e.PASSWORD = "password", e))(I || {});
|
672
|
+
const It = ["id", "name", "placeholder", "value"], Tt = ["id", "name", "placeholder", "value"], Lt = ["id", "name", "checked", "value"], Vt = ["id"], zt = ["for"], Mt = /* @__PURE__ */ S({
|
673
673
|
__name: "PdapInput",
|
674
674
|
props: {
|
675
675
|
error: {},
|
@@ -689,30 +689,30 @@ const Tt = ["id", "name", "placeholder", "value"], Lt = ["id", "name", "placehol
|
|
689
689
|
n("input", o.target.value);
|
690
690
|
}, u = P(r.defaultChecked), l = _(() => `pdap-${r.name}-input-error`);
|
691
691
|
return (o, c) => {
|
692
|
-
var
|
693
|
-
return
|
692
|
+
var p;
|
693
|
+
return v(), A(d(Zr), {
|
694
694
|
class: U({
|
695
695
|
"pdap-input": !0,
|
696
|
-
"pdap-input-error": Number((
|
696
|
+
"pdap-input-error": Number((p = o.error) == null ? void 0 : p.length) >= 1
|
697
697
|
})
|
698
698
|
}, {
|
699
699
|
default: R(() => [
|
700
|
-
o.type === d(
|
700
|
+
o.type === d(I).TEXT ? (v(), w("input", te({
|
701
701
|
key: 0,
|
702
702
|
id: o.id,
|
703
703
|
type: "text",
|
704
704
|
name: o.name,
|
705
705
|
placeholder: o.placeholder,
|
706
706
|
value: o.value
|
707
|
-
}, o.$attrs, { onInput: s }), null, 16,
|
708
|
-
o.type === d(
|
707
|
+
}, o.$attrs, { onInput: s }), null, 16, It)) : M("", !0),
|
708
|
+
o.type === d(I).PASSWORD ? (v(), w("input", te({
|
709
709
|
key: 1,
|
710
710
|
id: o.id,
|
711
711
|
type: "password",
|
712
712
|
name: o.name,
|
713
713
|
placeholder: o.placeholder,
|
714
714
|
value: o.value
|
715
|
-
}, o.$attrs, { onInput: s }), null, 16,
|
715
|
+
}, o.$attrs, { onInput: s }), null, 16, Tt)) : o.type === d(I).CHECKBOX ? (v(), w("input", te({
|
716
716
|
key: 2,
|
717
717
|
id: o.id,
|
718
718
|
class: "pdap-input-checkbox",
|
@@ -720,16 +720,16 @@ const Tt = ["id", "name", "placeholder", "value"], Lt = ["id", "name", "placehol
|
|
720
720
|
checked: u.value,
|
721
721
|
type: "checkbox",
|
722
722
|
value: o.value
|
723
|
-
}, o.$attrs, { onChange: a }), null, 16,
|
724
|
-
o.error ? (
|
723
|
+
}, o.$attrs, { onChange: a }), null, 16, Lt)) : M("", !0),
|
724
|
+
o.error ? (v(), w("div", {
|
725
725
|
key: 3,
|
726
726
|
id: l.value,
|
727
727
|
class: "pdap-input-error-message"
|
728
|
-
},
|
728
|
+
}, z(o.error), 9, Vt)) : M("", !0),
|
729
729
|
b("label", {
|
730
730
|
class: "pdap-input-label",
|
731
731
|
for: o.id
|
732
|
-
},
|
732
|
+
}, z(o.label), 9, zt)
|
733
733
|
]),
|
734
734
|
_: 1
|
735
735
|
}, 8, ["class"]);
|
@@ -768,42 +768,42 @@ function Dt(e, t, r) {
|
|
768
768
|
function Q(e) {
|
769
769
|
return typeof e == "function";
|
770
770
|
}
|
771
|
-
function
|
771
|
+
function ie(e) {
|
772
772
|
return e !== null && typeof e == "object" && !Array.isArray(e);
|
773
773
|
}
|
774
|
-
function
|
774
|
+
function le(e) {
|
775
775
|
return Q(e.$validator) ? W({}, e) : {
|
776
776
|
$validator: e
|
777
777
|
};
|
778
778
|
}
|
779
779
|
function Ft(e) {
|
780
|
-
return
|
780
|
+
return ie(e) && Q(e.then);
|
781
781
|
}
|
782
|
-
function
|
782
|
+
function D(e) {
|
783
783
|
return typeof e == "object" ? e.$valid : e;
|
784
784
|
}
|
785
785
|
function H(e) {
|
786
786
|
return e.$validator || e;
|
787
787
|
}
|
788
|
-
function
|
789
|
-
if (!
|
788
|
+
function _e(e, t) {
|
789
|
+
if (!ie(e))
|
790
790
|
throw new Error(`[@vuelidate/validators]: First parameter to "withParams" should be an object, provided ${typeof e}`);
|
791
|
-
if (!
|
791
|
+
if (!ie(t) && !Q(t))
|
792
792
|
throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");
|
793
|
-
const r =
|
793
|
+
const r = le(t);
|
794
794
|
return r.$params = W(W({}, r.$params || {}), e), r;
|
795
795
|
}
|
796
796
|
function J(e, t) {
|
797
797
|
if (!Q(e) && typeof d(e) != "string")
|
798
798
|
throw new Error(`[@vuelidate/validators]: First parameter to "withMessage" should be string or a function returning a string, provided ${typeof e}`);
|
799
|
-
if (!
|
799
|
+
if (!ie(t) && !Q(t))
|
800
800
|
throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");
|
801
|
-
const r =
|
801
|
+
const r = le(t);
|
802
802
|
return r.$message = e, r;
|
803
803
|
}
|
804
804
|
function qt(e) {
|
805
805
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
806
|
-
const r =
|
806
|
+
const r = le(e);
|
807
807
|
return W(W({}, r), {}, {
|
808
808
|
$async: !0,
|
809
809
|
$watchTargets: t
|
@@ -815,41 +815,41 @@ function Nt(e) {
|
|
815
815
|
for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++)
|
816
816
|
n[a - 1] = arguments[a];
|
817
817
|
return d(t).reduce((s, u, l) => {
|
818
|
-
const o = Object.entries(u).reduce((c,
|
819
|
-
let [
|
820
|
-
const f = e[
|
821
|
-
let [
|
822
|
-
const C = H(
|
823
|
-
if (
|
824
|
-
let T =
|
825
|
-
const ee =
|
818
|
+
const o = Object.entries(u).reduce((c, p) => {
|
819
|
+
let [h, $] = p;
|
820
|
+
const f = e[h] || {}, i = Object.entries(f).reduce((m, g) => {
|
821
|
+
let [y, k] = g;
|
822
|
+
const C = H(k).call(this, $, u, l, ...n), N = D(C);
|
823
|
+
if (m.$data[y] = C, m.$data.$invalid = !N || !!m.$data.$invalid, m.$data.$error = m.$data.$invalid, !N) {
|
824
|
+
let T = k.$message || "";
|
825
|
+
const ee = k.$params || {};
|
826
826
|
typeof T == "function" && (T = T({
|
827
827
|
$pending: !1,
|
828
|
-
$invalid: !
|
828
|
+
$invalid: !N,
|
829
829
|
$params: ee,
|
830
|
-
$model:
|
830
|
+
$model: $,
|
831
831
|
$response: C
|
832
|
-
})),
|
833
|
-
$property:
|
832
|
+
})), m.$errors.push({
|
833
|
+
$property: h,
|
834
834
|
$message: T,
|
835
835
|
$params: ee,
|
836
836
|
$response: C,
|
837
|
-
$model:
|
837
|
+
$model: $,
|
838
838
|
$pending: !1,
|
839
|
-
$validator:
|
839
|
+
$validator: y
|
840
840
|
});
|
841
841
|
}
|
842
842
|
return {
|
843
|
-
$valid:
|
844
|
-
$data:
|
845
|
-
$errors:
|
843
|
+
$valid: m.$valid && N,
|
844
|
+
$data: m.$data,
|
845
|
+
$errors: m.$errors
|
846
846
|
};
|
847
847
|
}, {
|
848
848
|
$valid: !0,
|
849
849
|
$data: {},
|
850
850
|
$errors: []
|
851
851
|
});
|
852
|
-
return c.$data[
|
852
|
+
return c.$data[h] = i.$data, c.$errors[h] = i.$errors, {
|
853
853
|
$valid: c.$valid && i.$valid,
|
854
854
|
$data: c.$data,
|
855
855
|
$errors: c.$errors
|
@@ -893,8 +893,8 @@ const O = (e) => {
|
|
893
893
|
return !1;
|
894
894
|
}
|
895
895
|
return !!String(e).length;
|
896
|
-
},
|
897
|
-
function
|
896
|
+
}, be = (e) => (e = d(e), Array.isArray(e) ? e.length : typeof e == "object" ? Object.keys(e).length : String(e).length);
|
897
|
+
function F() {
|
898
898
|
for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
|
899
899
|
t[r] = arguments[r];
|
900
900
|
return (n) => (n = d(n), !O(n) || t.every((a) => (a.lastIndex = 0, a.test(n))));
|
@@ -902,29 +902,29 @@ function D() {
|
|
902
902
|
var X = /* @__PURE__ */ Object.freeze({
|
903
903
|
__proto__: null,
|
904
904
|
forEach: Nt,
|
905
|
-
len:
|
906
|
-
normalizeValidatorObject:
|
907
|
-
regex:
|
905
|
+
len: be,
|
906
|
+
normalizeValidatorObject: le,
|
907
|
+
regex: F,
|
908
908
|
req: O,
|
909
909
|
unwrap: d,
|
910
910
|
unwrapNormalizedValidator: H,
|
911
|
-
unwrapValidatorResponse:
|
911
|
+
unwrapValidatorResponse: D,
|
912
912
|
withAsync: qt,
|
913
913
|
withMessage: J,
|
914
|
-
withParams:
|
915
|
-
}), Bt =
|
914
|
+
withParams: _e
|
915
|
+
}), Bt = F(/^[a-zA-Z]*$/), Ht = {
|
916
916
|
$validator: Bt,
|
917
917
|
$message: "The value is not alphabetical",
|
918
918
|
$params: {
|
919
919
|
type: "alpha"
|
920
920
|
}
|
921
|
-
}, Gt =
|
921
|
+
}, Gt = F(/^[a-zA-Z0-9]*$/), Wt = {
|
922
922
|
$validator: Gt,
|
923
923
|
$message: "The value must be alpha-numeric",
|
924
924
|
$params: {
|
925
925
|
type: "alphaNum"
|
926
926
|
}
|
927
|
-
}, Ut =
|
927
|
+
}, Ut = F(/^\d*(\.\d+)?$/), Xt = {
|
928
928
|
$validator: Ut,
|
929
929
|
$message: "Value must be numeric",
|
930
930
|
$params: {
|
@@ -951,7 +951,7 @@ function Zt(e, t) {
|
|
951
951
|
};
|
952
952
|
}
|
953
953
|
const Qt = /^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i;
|
954
|
-
var Jt =
|
954
|
+
var Jt = F(Qt), we = {
|
955
955
|
$validator: Jt,
|
956
956
|
$message: "Value is not a valid email address",
|
957
957
|
$params: {
|
@@ -1001,7 +1001,7 @@ function ar(e) {
|
|
1001
1001
|
};
|
1002
1002
|
}
|
1003
1003
|
function sr(e) {
|
1004
|
-
return (t) => !O(t) ||
|
1004
|
+
return (t) => !O(t) || be(t) <= d(e);
|
1005
1005
|
}
|
1006
1006
|
function or(e) {
|
1007
1007
|
return {
|
@@ -1019,7 +1019,7 @@ function or(e) {
|
|
1019
1019
|
};
|
1020
1020
|
}
|
1021
1021
|
function ir(e) {
|
1022
|
-
return (t) => !O(t) ||
|
1022
|
+
return (t) => !O(t) || be(t) >= d(e);
|
1023
1023
|
}
|
1024
1024
|
function lr(e) {
|
1025
1025
|
return {
|
@@ -1039,7 +1039,7 @@ function lr(e) {
|
|
1039
1039
|
function ur(e) {
|
1040
1040
|
return typeof e == "string" && (e = e.trim()), O(e);
|
1041
1041
|
}
|
1042
|
-
var
|
1042
|
+
var xe = {
|
1043
1043
|
$validator: ur,
|
1044
1044
|
$message: "Value is required",
|
1045
1045
|
$params: {
|
@@ -1100,7 +1100,7 @@ function gr(e) {
|
|
1100
1100
|
};
|
1101
1101
|
}
|
1102
1102
|
const hr = /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i;
|
1103
|
-
var $r =
|
1103
|
+
var $r = F(hr), vr = {
|
1104
1104
|
$validator: $r,
|
1105
1105
|
$message: "The value is not a valid URL address",
|
1106
1106
|
$params: {
|
@@ -1111,7 +1111,7 @@ function yr(e) {
|
|
1111
1111
|
return function() {
|
1112
1112
|
for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++)
|
1113
1113
|
r[n] = arguments[n];
|
1114
|
-
return e.reduce((a, s) =>
|
1114
|
+
return e.reduce((a, s) => D(a) ? a : H(s).apply(this, r), !1);
|
1115
1115
|
};
|
1116
1116
|
}
|
1117
1117
|
function _r(e) {
|
@@ -1120,7 +1120,7 @@ function _r(e) {
|
|
1120
1120
|
r[n] = arguments[n];
|
1121
1121
|
return e.reduce(async (a, s) => {
|
1122
1122
|
const u = await a;
|
1123
|
-
return
|
1123
|
+
return D(u) ? u : H(s).apply(this, r);
|
1124
1124
|
}, Promise.resolve(!1));
|
1125
1125
|
};
|
1126
1126
|
}
|
@@ -1136,7 +1136,7 @@ function br() {
|
|
1136
1136
|
};
|
1137
1137
|
}
|
1138
1138
|
function wr() {
|
1139
|
-
return
|
1139
|
+
return _e({
|
1140
1140
|
type: "or"
|
1141
1141
|
}, J("The value does not match any of the provided validators", br(...arguments)));
|
1142
1142
|
}
|
@@ -1144,7 +1144,7 @@ function xr(e) {
|
|
1144
1144
|
return function() {
|
1145
1145
|
for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++)
|
1146
1146
|
r[n] = arguments[n];
|
1147
|
-
return e.reduce((a, s) =>
|
1147
|
+
return e.reduce((a, s) => D(a) ? H(s).apply(this, r) : a, !0);
|
1148
1148
|
};
|
1149
1149
|
}
|
1150
1150
|
function Pr(e) {
|
@@ -1153,7 +1153,7 @@ function Pr(e) {
|
|
1153
1153
|
r[n] = arguments[n];
|
1154
1154
|
return e.reduce(async (a, s) => {
|
1155
1155
|
const u = await a;
|
1156
|
-
return
|
1156
|
+
return D(u) ? H(s).apply(this, r) : u;
|
1157
1157
|
}, Promise.resolve(!0));
|
1158
1158
|
};
|
1159
1159
|
}
|
@@ -1169,7 +1169,7 @@ function Rr() {
|
|
1169
1169
|
};
|
1170
1170
|
}
|
1171
1171
|
function Or() {
|
1172
|
-
return
|
1172
|
+
return _e({
|
1173
1173
|
type: "and"
|
1174
1174
|
}, J("The value does not match all of the provided validators", Rr(...arguments)));
|
1175
1175
|
}
|
@@ -1178,7 +1178,7 @@ function Cr(e) {
|
|
1178
1178
|
if (!O(t))
|
1179
1179
|
return !0;
|
1180
1180
|
const n = H(e).call(this, t, r);
|
1181
|
-
return Ft(n) ? n.then((a) => !
|
1181
|
+
return Ft(n) ? n.then((a) => !D(a)) : !D(n);
|
1182
1182
|
};
|
1183
1183
|
}
|
1184
1184
|
function Er(e) {
|
@@ -1211,7 +1211,7 @@ function Ar(e) {
|
|
1211
1211
|
function Sr(e) {
|
1212
1212
|
return (t) => !O(t) || (!/\s/.test(t) || t instanceof Date) && +t <= +d(e);
|
1213
1213
|
}
|
1214
|
-
var
|
1214
|
+
var kr = (e) => ({
|
1215
1215
|
$validator: Sr(e),
|
1216
1216
|
$message: (t) => {
|
1217
1217
|
let {
|
@@ -1223,14 +1223,14 @@ var Ir = (e) => ({
|
|
1223
1223
|
max: e,
|
1224
1224
|
type: "maxValue"
|
1225
1225
|
}
|
1226
|
-
}),
|
1227
|
-
$validator:
|
1226
|
+
}), Ir = F(/(^[0-9]*$)|(^-[0-9]+$)/), Tr = {
|
1227
|
+
$validator: Ir,
|
1228
1228
|
$message: "Value is not an integer",
|
1229
1229
|
$params: {
|
1230
1230
|
type: "integer"
|
1231
1231
|
}
|
1232
|
-
},
|
1233
|
-
$validator:
|
1232
|
+
}, Lr = F(/^[-]?\d*(\.\d+)?$/), Vr = {
|
1233
|
+
$validator: Lr,
|
1234
1234
|
$message: "Value must be decimal",
|
1235
1235
|
$params: {
|
1236
1236
|
type: "decimal"
|
@@ -1253,16 +1253,16 @@ function zr(e) {
|
|
1253
1253
|
messagePath: l = r,
|
1254
1254
|
messageParams: o = n
|
1255
1255
|
} = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
1256
|
-
function c(
|
1257
|
-
return t(l(
|
1258
|
-
model:
|
1259
|
-
property:
|
1260
|
-
pending:
|
1261
|
-
invalid:
|
1262
|
-
response:
|
1263
|
-
validator:
|
1264
|
-
propertyPath:
|
1265
|
-
},
|
1256
|
+
function c(p) {
|
1257
|
+
return t(l(p), o(W({
|
1258
|
+
model: p.$model,
|
1259
|
+
property: p.$property,
|
1260
|
+
pending: p.$pending,
|
1261
|
+
invalid: p.$invalid,
|
1262
|
+
response: p.$response,
|
1263
|
+
validator: p.$validator,
|
1264
|
+
propertyPath: p.$propertyPath
|
1265
|
+
}, p.$params)));
|
1266
1266
|
}
|
1267
1267
|
return u && typeof s == "function" ? function() {
|
1268
1268
|
return J(c, s(...arguments));
|
@@ -1277,19 +1277,19 @@ const Ge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1277
1277
|
between: Zt,
|
1278
1278
|
createI18nMessage: zr,
|
1279
1279
|
decimal: Vr,
|
1280
|
-
email:
|
1280
|
+
email: we,
|
1281
1281
|
helpers: X,
|
1282
|
-
integer:
|
1282
|
+
integer: Tr,
|
1283
1283
|
ipAddress: tr,
|
1284
1284
|
macAddress: ar,
|
1285
1285
|
maxLength: or,
|
1286
|
-
maxValue:
|
1286
|
+
maxValue: kr,
|
1287
1287
|
minLength: lr,
|
1288
1288
|
minValue: Ar,
|
1289
1289
|
not: Er,
|
1290
1290
|
numeric: Xt,
|
1291
1291
|
or: wr,
|
1292
|
-
required:
|
1292
|
+
required: xe,
|
1293
1293
|
requiredIf: dr,
|
1294
1294
|
requiredUnless: mr,
|
1295
1295
|
sameAs: gr,
|
@@ -1297,16 +1297,16 @@ const Ge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1297
1297
|
}, Symbol.toStringTag, { value: "Module" })), We = X.regex(
|
1298
1298
|
/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$ %^&*-]).{8,}$/
|
1299
1299
|
);
|
1300
|
-
function
|
1300
|
+
function Ve(e) {
|
1301
1301
|
return ["maxLength", "minLength"].includes(e);
|
1302
1302
|
}
|
1303
|
-
function
|
1303
|
+
function ze(e) {
|
1304
1304
|
return e === "required";
|
1305
1305
|
}
|
1306
|
-
function
|
1306
|
+
function Me(e) {
|
1307
1307
|
return e === "email";
|
1308
1308
|
}
|
1309
|
-
function
|
1309
|
+
function De(e) {
|
1310
1310
|
return e === "password";
|
1311
1311
|
}
|
1312
1312
|
function Mr(e, t) {
|
@@ -1320,19 +1320,19 @@ function Dr(e, t, r) {
|
|
1320
1320
|
};
|
1321
1321
|
}
|
1322
1322
|
function Fr() {
|
1323
|
-
return { required:
|
1323
|
+
return { required: xe };
|
1324
1324
|
}
|
1325
1325
|
function qr(e) {
|
1326
1326
|
return {
|
1327
|
-
required: X.withMessage(e,
|
1327
|
+
required: X.withMessage(e, xe)
|
1328
1328
|
};
|
1329
1329
|
}
|
1330
1330
|
function Nr() {
|
1331
|
-
return { email:
|
1331
|
+
return { email: we };
|
1332
1332
|
}
|
1333
1333
|
function Br(e) {
|
1334
1334
|
return {
|
1335
|
-
email: X.withMessage(e,
|
1335
|
+
email: X.withMessage(e, we)
|
1336
1336
|
};
|
1337
1337
|
}
|
1338
1338
|
function Hr() {
|
@@ -1344,32 +1344,32 @@ function Gr(e) {
|
|
1344
1344
|
};
|
1345
1345
|
}
|
1346
1346
|
function Wr(e, t) {
|
1347
|
-
if (
|
1347
|
+
if (Ve(e) && typeof t.message == "string" && typeof t.value == "number")
|
1348
1348
|
return Dr(
|
1349
1349
|
e,
|
1350
1350
|
t.value,
|
1351
1351
|
t.message
|
1352
1352
|
);
|
1353
|
-
if (
|
1353
|
+
if (Ve(e) && typeof t.message > "u" && typeof t.value == "number")
|
1354
1354
|
return Mr(e, t.value);
|
1355
|
-
if (
|
1355
|
+
if (Me(e) && typeof t.message == "string")
|
1356
1356
|
return Br(t.message);
|
1357
|
-
if (
|
1357
|
+
if (Me(e) && typeof t.message > "u")
|
1358
1358
|
return Nr();
|
1359
|
-
if (
|
1359
|
+
if (De(e) && typeof t.message == "string")
|
1360
1360
|
return Gr(t.message);
|
1361
|
-
if (
|
1361
|
+
if (De(e) && typeof t.message > "u")
|
1362
1362
|
return Hr();
|
1363
|
-
if (
|
1363
|
+
if (ze(e) && typeof t.message == "string")
|
1364
1364
|
return qr(t.message);
|
1365
|
-
if (
|
1365
|
+
if (ze(e) && typeof t.message > "u")
|
1366
1366
|
return Fr();
|
1367
1367
|
throw new Error("No valid rule detected");
|
1368
1368
|
}
|
1369
1369
|
const Ur = ["id", "name"], Xr = {
|
1370
1370
|
key: 0,
|
1371
1371
|
class: "pdap-form-error-message"
|
1372
|
-
}, Kr = /* @__PURE__ */
|
1372
|
+
}, Kr = /* @__PURE__ */ S({
|
1373
1373
|
__name: "PdapForm",
|
1374
1374
|
props: {
|
1375
1375
|
error: { default: null },
|
@@ -1380,89 +1380,77 @@ const Ur = ["id", "name"], Xr = {
|
|
1380
1380
|
emits: ["submit", "change"],
|
1381
1381
|
setup(e, { emit: t }) {
|
1382
1382
|
const r = e, n = t, a = _(
|
1383
|
-
() => r.schema.map((
|
1384
|
-
const f = {
|
1383
|
+
() => r.schema.map(($) => {
|
1384
|
+
const f = { ...$ };
|
1385
1385
|
return delete f.validators, f;
|
1386
1386
|
})
|
1387
1387
|
);
|
1388
|
-
let s =
|
1389
|
-
a.value.reduce((
|
1388
|
+
let s = j(
|
1389
|
+
a.value.reduce(($, f) => {
|
1390
1390
|
switch (f.type) {
|
1391
|
-
case
|
1392
|
-
return {
|
1393
|
-
case
|
1394
|
-
case
|
1391
|
+
case I.CHECKBOX:
|
1392
|
+
return { ...$, [f.name]: String(f.defaultChecked) };
|
1393
|
+
case I.TEXT:
|
1394
|
+
case I.PASSWORD:
|
1395
1395
|
default:
|
1396
|
-
return {
|
1396
|
+
return { ...$, [f.name]: f.value };
|
1397
1397
|
}
|
1398
1398
|
}, {})
|
1399
1399
|
);
|
1400
|
-
const u = r.schema.reduce((
|
1400
|
+
const u = r.schema.reduce(($, f) => {
|
1401
1401
|
const i = Object.entries(f.validators ?? {}).reduce(
|
1402
|
-
(
|
1403
|
-
...
|
1404
|
-
...Wr(g,
|
1402
|
+
(m, [g, y]) => ({
|
1403
|
+
...m,
|
1404
|
+
...Wr(g, y)
|
1405
1405
|
}),
|
1406
1406
|
{}
|
1407
1407
|
);
|
1408
1408
|
return {
|
1409
|
-
|
1409
|
+
...$,
|
1410
1410
|
[f.name]: {
|
1411
1411
|
...i
|
1412
1412
|
}
|
1413
1413
|
};
|
1414
|
-
}, {}), l =
|
1415
|
-
function c(
|
1416
|
-
s[
|
1414
|
+
}, {}), l = kt(u, s, { $autoDirty: !1, $lazy: !0 }), o = P(r.error);
|
1415
|
+
function c($, f) {
|
1416
|
+
s[$] = f, p();
|
1417
1417
|
}
|
1418
|
-
|
1418
|
+
Oe(() => {
|
1419
1419
|
r.error ? o.value = r.error : o.value && l.value.$errors.length === 0 ? o.value = null : !o.value && l.value.$errors.length > 0 && (o.value = "Please update this form to correct the errors");
|
1420
|
-
}),
|
1421
|
-
console.debug(`PdapForm ${r.name}
|
1422
|
-
`, {
|
1423
|
-
errorMessage: o.value,
|
1424
|
-
props: r,
|
1425
|
-
schema: r.schema,
|
1426
|
-
data: a,
|
1427
|
-
values: s,
|
1428
|
-
vuelidate: {
|
1429
|
-
rules: u,
|
1430
|
-
v$: l
|
1431
|
-
}
|
1432
|
-
});
|
1420
|
+
}), Oe(() => {
|
1433
1421
|
});
|
1434
|
-
function
|
1422
|
+
function p() {
|
1435
1423
|
n("change", { ...s });
|
1436
1424
|
}
|
1437
|
-
async function $
|
1425
|
+
async function h($) {
|
1438
1426
|
if (await l.value.$validate()) {
|
1439
|
-
n("submit", { ...s }), l.value.$reset(),
|
1427
|
+
n("submit", { ...s }), l.value.$reset(), $.target.reset(), s = Object.entries(s).reduce((m, [g, y]) => ({ ...m, [g]: ["true", "false"].includes(y) ? y : "" }), {});
|
1440
1428
|
return;
|
1441
1429
|
}
|
1442
1430
|
}
|
1443
|
-
return (
|
1444
|
-
id:
|
1445
|
-
name:
|
1431
|
+
return ($, f) => (v(), w("form", {
|
1432
|
+
id: $.id,
|
1433
|
+
name: $.name,
|
1446
1434
|
class: "pdap-form",
|
1447
|
-
onChange:
|
1448
|
-
onSubmit: f[0] || (f[0] = st((i) =>
|
1435
|
+
onChange: p,
|
1436
|
+
onSubmit: f[0] || (f[0] = st((i) => h(i), ["prevent"]))
|
1449
1437
|
}, [
|
1450
|
-
typeof o.value == "string" ? (
|
1451
|
-
(
|
1452
|
-
var
|
1453
|
-
return
|
1438
|
+
typeof o.value == "string" ? (v(), w("div", Xr, z(o.value), 1)) : M("", !0),
|
1439
|
+
(v(!0), w(K, null, $e(a.value, (i) => {
|
1440
|
+
var m, g, y, k;
|
1441
|
+
return v(), A(Mt, te(i, {
|
1454
1442
|
key: i.name,
|
1455
|
-
error: (
|
1443
|
+
error: (m = d(l)[i.name]) != null && m.$error ? (k = (y = (g = d(l)[i.name]) == null ? void 0 : g.$errors) == null ? void 0 : y[0]) == null ? void 0 : k.$message : "",
|
1456
1444
|
value: d(s)[i.name],
|
1457
|
-
onChange: (
|
1458
|
-
onInput: (
|
1445
|
+
onChange: (q) => c(i.name, q),
|
1446
|
+
onInput: (q) => c(i.name, q)
|
1459
1447
|
}), null, 16, ["error", "value", "onChange", "onInput"]);
|
1460
1448
|
}), 128)),
|
1461
|
-
Y(
|
1449
|
+
Y($.$slots, "default")
|
1462
1450
|
], 40, Ur));
|
1463
1451
|
}
|
1464
1452
|
});
|
1465
|
-
const Zr = /* @__PURE__ */
|
1453
|
+
const Zr = /* @__PURE__ */ S({
|
1466
1454
|
__name: "GridContainer",
|
1467
1455
|
props: {
|
1468
1456
|
columns: { default: "auto" },
|
@@ -1472,18 +1460,18 @@ const Zr = /* @__PURE__ */ j({
|
|
1472
1460
|
templateRows: {}
|
1473
1461
|
},
|
1474
1462
|
setup(e) {
|
1475
|
-
const t = e, r =
|
1463
|
+
const t = e, r = j({
|
1476
1464
|
"pdap-grid-container": !0,
|
1477
1465
|
[`pdap-grid-container-column-${t.columns}`]: t.columns !== "auto"
|
1478
|
-
}), n = t.templateRows || typeof t.rows == "number", a = t.templateRows ?? `repeat(${t.rows}, minmax(0, 1fr))`, s =
|
1466
|
+
}), n = t.templateRows || typeof t.rows == "number", a = t.templateRows ?? `repeat(${t.rows}, minmax(0, 1fr))`, s = j({
|
1479
1467
|
...n && {
|
1480
1468
|
gridTemplateRows: a
|
1481
1469
|
},
|
1482
1470
|
...t.templateColumns && { gridTemplateColumns: t.templateColumns }
|
1483
1471
|
});
|
1484
|
-
return (u, l) => (
|
1472
|
+
return (u, l) => (v(), A(he(u.component), {
|
1485
1473
|
class: U(r),
|
1486
|
-
style:
|
1474
|
+
style: ye(s)
|
1487
1475
|
}, {
|
1488
1476
|
default: R(() => [
|
1489
1477
|
Y(u.$slots, "default")
|
@@ -1492,7 +1480,7 @@ const Zr = /* @__PURE__ */ j({
|
|
1492
1480
|
}, 8, ["class", "style"]));
|
1493
1481
|
}
|
1494
1482
|
});
|
1495
|
-
const
|
1483
|
+
const gn = /* @__PURE__ */ S({
|
1496
1484
|
__name: "GridItem",
|
1497
1485
|
props: {
|
1498
1486
|
component: { default: "div" },
|
@@ -1500,18 +1488,18 @@ const pn = /* @__PURE__ */ j({
|
|
1500
1488
|
spanRow: { default: 1 }
|
1501
1489
|
},
|
1502
1490
|
setup(e) {
|
1503
|
-
const t = e, r =
|
1491
|
+
const t = e, r = j({
|
1504
1492
|
"pdap-grid-item": !0,
|
1505
1493
|
[`pdap-grid-item-span-column-${t.spanColumn}`]: t.spanColumn > 1
|
1506
|
-
}), n =
|
1494
|
+
}), n = j({
|
1507
1495
|
// Only add inline property if it is passed and exceeds the default
|
1508
1496
|
...t.spanRow > 1 && {
|
1509
1497
|
gridRow: `span ${t.spanRow} / span ${t.spanRow}`
|
1510
1498
|
}
|
1511
1499
|
});
|
1512
|
-
return (a, s) => (
|
1500
|
+
return (a, s) => (v(), A(he(a.component), {
|
1513
1501
|
class: U(r),
|
1514
|
-
style:
|
1502
|
+
style: ye(n)
|
1515
1503
|
}, {
|
1516
1504
|
default: R(() => [
|
1517
1505
|
Y(a.$slots, "default")
|
@@ -1527,7 +1515,7 @@ const Qr = /* @__PURE__ */ b("svg", {
|
|
1527
1515
|
/* @__PURE__ */ b("path", { d: "M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z" })
|
1528
1516
|
], -1), Jr = [
|
1529
1517
|
Qr
|
1530
|
-
], Yr = ["aria-expanded"], en = ["href"], tn = /* @__PURE__ */
|
1518
|
+
], Yr = ["aria-expanded"], en = ["href"], tn = /* @__PURE__ */ S({
|
1531
1519
|
__name: "PdapNav",
|
1532
1520
|
props: {
|
1533
1521
|
topPosition: {}
|
@@ -1539,15 +1527,15 @@ const Qr = /* @__PURE__ */ b("svg", {
|
|
1539
1527
|
`,
|
1540
1528
|
"Did you forget to inject some linkData for the Nav component?"
|
1541
1529
|
));
|
1542
|
-
const r =
|
1530
|
+
const r = j({
|
1543
1531
|
isExpanded: !1,
|
1544
1532
|
isMobile: !0
|
1545
|
-
}), n =
|
1533
|
+
}), n = j({
|
1546
1534
|
"pdap-nav": !0
|
1547
1535
|
});
|
1548
|
-
|
1536
|
+
Fe(() => {
|
1549
1537
|
a(), window.addEventListener("resize", a);
|
1550
|
-
}),
|
1538
|
+
}), ve(() => {
|
1551
1539
|
window.removeEventListener("resize", a);
|
1552
1540
|
});
|
1553
1541
|
async function a() {
|
@@ -1558,7 +1546,7 @@ const Qr = /* @__PURE__ */ b("svg", {
|
|
1558
1546
|
const u = document.querySelector("body");
|
1559
1547
|
!r.isExpanded && r.isMobile ? (r.isExpanded = !0, u != null && u.classList.contains("lock-scroll") || (l = document.querySelector("body")) == null || l.classList.add("lock-scroll")) : r.isExpanded && r.isMobile && (r.isExpanded = !1, (o = document.querySelector("body")) == null || o.classList.remove("lock-scroll")), await ae();
|
1560
1548
|
}
|
1561
|
-
return (u, l) => (
|
1549
|
+
return (u, l) => (v(), w(K, null, [
|
1562
1550
|
b("div", {
|
1563
1551
|
"aria-controls": "nav",
|
1564
1552
|
class: "pdap-nav-open-button",
|
@@ -1569,21 +1557,21 @@ const Qr = /* @__PURE__ */ b("svg", {
|
|
1569
1557
|
id: "nav",
|
1570
1558
|
"aria-expanded": r.isMobile && r.isExpanded || !r.isMobile,
|
1571
1559
|
class: U(n),
|
1572
|
-
style:
|
1560
|
+
style: ye(r.isMobile ? { top: `${u.topPosition}px` } : {})
|
1573
1561
|
}, [
|
1574
|
-
(
|
1562
|
+
(v(!0), w(K, null, $e(d(t), (o) => (v(), w("li", {
|
1575
1563
|
key: o.text,
|
1576
1564
|
class: "pdap-nav-link-container"
|
1577
1565
|
}, [
|
1578
|
-
o.href ? (
|
1566
|
+
o.href ? (v(), w("a", {
|
1579
1567
|
key: 0,
|
1580
1568
|
class: "pdap-nav-link",
|
1581
1569
|
href: o.href,
|
1582
1570
|
target: "_blank",
|
1583
1571
|
referrerpolicy: "no-referrer",
|
1584
1572
|
onClick: s
|
1585
|
-
},
|
1586
|
-
o.path ? (
|
1573
|
+
}, z(o.text), 9, en)) : M("", !0),
|
1574
|
+
o.path ? (v(), A(d(se), {
|
1587
1575
|
key: 1,
|
1588
1576
|
"active-class": "pdap-nav-link-current",
|
1589
1577
|
"exact-active-class": "pdap-nav-link-current-exact",
|
@@ -1592,16 +1580,16 @@ const Qr = /* @__PURE__ */ b("svg", {
|
|
1592
1580
|
onClick: s
|
1593
1581
|
}, {
|
1594
1582
|
default: R(() => [
|
1595
|
-
|
1583
|
+
E(z(o.text), 1)
|
1596
1584
|
]),
|
1597
1585
|
_: 2
|
1598
|
-
}, 1032, ["to"])) :
|
1586
|
+
}, 1032, ["to"])) : M("", !0)
|
1599
1587
|
]))), 128))
|
1600
1588
|
], 14, Yr)
|
1601
1589
|
], 64));
|
1602
1590
|
}
|
1603
1591
|
});
|
1604
|
-
const rn = ["href"], nn = ["src"], an = ["src"],
|
1592
|
+
const rn = ["href"], nn = ["src"], an = ["src"], hn = /* @__PURE__ */ S({
|
1605
1593
|
__name: "PdapHeader",
|
1606
1594
|
props: {
|
1607
1595
|
logoImageSrc: { default: "node_modules/pdap-design-system/dist/images/lockup.svg" },
|
@@ -1611,18 +1599,18 @@ const rn = ["href"], nn = ["src"], an = ["src"], mn = /* @__PURE__ */ j({
|
|
1611
1599
|
const t = e, r = P(), n = P(null), a = t.logoImageAnchorPath.startsWith("/");
|
1612
1600
|
ot(() => {
|
1613
1601
|
s(), window.addEventListener("resize", s);
|
1614
|
-
}),
|
1602
|
+
}), ve(() => {
|
1615
1603
|
window.removeEventListener("resize", s);
|
1616
1604
|
});
|
1617
1605
|
function s() {
|
1618
1606
|
n.value && (r.value = n.value.offsetHeight);
|
1619
1607
|
}
|
1620
|
-
return (u, l) => (
|
1608
|
+
return (u, l) => (v(), w("header", {
|
1621
1609
|
ref_key: "el",
|
1622
1610
|
ref: n,
|
1623
1611
|
class: "pdap-header"
|
1624
1612
|
}, [
|
1625
|
-
d(a) ? (
|
1613
|
+
d(a) ? (v(), A(d(se), {
|
1626
1614
|
key: 1,
|
1627
1615
|
to: u.logoImageAnchorPath,
|
1628
1616
|
class: "logo"
|
@@ -1636,7 +1624,7 @@ const rn = ["href"], nn = ["src"], an = ["src"], mn = /* @__PURE__ */ j({
|
|
1636
1624
|
}, null, 8, an)
|
1637
1625
|
]),
|
1638
1626
|
_: 1
|
1639
|
-
}, 8, ["to"])) : (
|
1627
|
+
}, 8, ["to"])) : (v(), w("a", {
|
1640
1628
|
key: 0,
|
1641
1629
|
href: u.logoImageAnchorPath,
|
1642
1630
|
class: "logo"
|
@@ -1653,9 +1641,9 @@ const rn = ["href"], nn = ["src"], an = ["src"], mn = /* @__PURE__ */ j({
|
|
1653
1641
|
}
|
1654
1642
|
});
|
1655
1643
|
const sn = /* @__PURE__ */ b("h2", { class: "mt-0" }, "Search our database", -1), on = /* @__PURE__ */ b("p", { class: "pb-4 md:pb-8" }, [
|
1656
|
-
/* @__PURE__ */
|
1644
|
+
/* @__PURE__ */ E(" If you are looking for something specific, we may already be tracking it. "),
|
1657
1645
|
/* @__PURE__ */ b("a", { href: "https://pdap.io/data" }, "Learn more about the data here.")
|
1658
|
-
], -1),
|
1646
|
+
], -1), ln = { class: "max-w-[unset] text-med" }, un = ["href"], cn = ["href"], $n = /* @__PURE__ */ S({
|
1659
1647
|
__name: "QuickSearchForm",
|
1660
1648
|
props: {
|
1661
1649
|
baseUrlForRedirect: { default: "https://data-sources.pdap.io" }
|
@@ -1666,7 +1654,7 @@ const sn = /* @__PURE__ */ b("h2", { class: "mt-0" }, "Search our database", -1)
|
|
1666
1654
|
id: "search-term",
|
1667
1655
|
name: "searchTerm",
|
1668
1656
|
label: "What are you looking for?",
|
1669
|
-
type:
|
1657
|
+
type: I.TEXT,
|
1670
1658
|
placeholder: "Enter a keyword, or 'all'",
|
1671
1659
|
value: ""
|
1672
1660
|
},
|
@@ -1674,33 +1662,33 @@ const sn = /* @__PURE__ */ b("h2", { class: "mt-0" }, "Search our database", -1)
|
|
1674
1662
|
id: "location",
|
1675
1663
|
name: "location",
|
1676
1664
|
label: "From where?",
|
1677
|
-
type:
|
1665
|
+
type: I.TEXT,
|
1678
1666
|
placeholder: "Enter a place, or 'all'",
|
1679
1667
|
value: ""
|
1680
1668
|
}
|
1681
|
-
], a = P(void 0);
|
1682
|
-
function
|
1683
|
-
a.value && Object.values(
|
1669
|
+
], a = P(void 0), s = t.getRoutes().some((o) => o.path.includes("/search/"));
|
1670
|
+
function u(o) {
|
1671
|
+
a.value && Object.values(o).some(Boolean) && (a.value = void 0);
|
1684
1672
|
}
|
1685
|
-
function
|
1686
|
-
if (Object.values(
|
1673
|
+
function l(o) {
|
1674
|
+
if (Object.values(o).every((h) => !h)) {
|
1687
1675
|
a.value = "Either a search term or a location is required.";
|
1688
1676
|
return;
|
1689
1677
|
}
|
1690
|
-
let { location:
|
1691
|
-
|
1692
|
-
`${r.baseUrlForRedirect}/search/${
|
1678
|
+
let { location: c, searchTerm: p } = o;
|
1679
|
+
c = c && c.length > 0 ? c : "all", p = p && p.length > 0 ? p : "all", s ? t.push(`/search/${p}/${c}`) : window.location.assign(
|
1680
|
+
`${r.baseUrlForRedirect}/search/${p}/${c}`
|
1693
1681
|
);
|
1694
1682
|
}
|
1695
|
-
return (
|
1696
|
-
G(
|
1683
|
+
return (o, c) => (v(), w(K, null, [
|
1684
|
+
G(fe, { class: "p-0" }, {
|
1697
1685
|
default: R(() => [
|
1698
1686
|
sn,
|
1699
1687
|
on
|
1700
1688
|
]),
|
1701
1689
|
_: 1
|
1702
1690
|
}),
|
1703
|
-
G(
|
1691
|
+
G(fe, {
|
1704
1692
|
alignment: "center",
|
1705
1693
|
class: "pdap-quick-search-form h-full max-h-[75-vh] justify-start p-0"
|
1706
1694
|
}, {
|
@@ -1711,8 +1699,8 @@ const sn = /* @__PURE__ */ b("h2", { class: "mt-0" }, "Search our database", -1)
|
|
1711
1699
|
error: a.value,
|
1712
1700
|
schema: n,
|
1713
1701
|
name: "quickSearchForm",
|
1714
|
-
onChange:
|
1715
|
-
onSubmit:
|
1702
|
+
onChange: u,
|
1703
|
+
onSubmit: l
|
1716
1704
|
}, {
|
1717
1705
|
default: R(() => [
|
1718
1706
|
G(lt, {
|
@@ -1720,34 +1708,67 @@ const sn = /* @__PURE__ */ b("h2", { class: "mt-0" }, "Search our database", -1)
|
|
1720
1708
|
class: "flex-grow-0 flex-shrink-0 basis-full max-w-[unset] mt-4"
|
1721
1709
|
}, {
|
1722
1710
|
default: R(() => [
|
1723
|
-
|
1711
|
+
E("Search Data Sources")
|
1724
1712
|
]),
|
1725
1713
|
_: 1
|
1726
1714
|
})
|
1727
1715
|
]),
|
1728
1716
|
_: 1
|
1729
|
-
}, 8, ["error"])
|
1717
|
+
}, 8, ["error"]),
|
1718
|
+
b("p", ln, [
|
1719
|
+
E(" For example, you could search for "),
|
1720
|
+
d(s) ? (v(), A(d(se), {
|
1721
|
+
key: 0,
|
1722
|
+
to: "/search/stops/pittsburgh"
|
1723
|
+
}, {
|
1724
|
+
default: R(() => [
|
1725
|
+
E(" stops in Pittsburgh ")
|
1726
|
+
]),
|
1727
|
+
_: 1
|
1728
|
+
})) : (v(), w("a", {
|
1729
|
+
key: 1,
|
1730
|
+
target: "_blank",
|
1731
|
+
rel: "noreferrer",
|
1732
|
+
href: `${r.baseUrlForRedirect}/search/stops/pittsburgh`
|
1733
|
+
}, " stops in Pittsburgh ", 8, un)),
|
1734
|
+
E(" or "),
|
1735
|
+
d(s) ? (v(), A(d(se), {
|
1736
|
+
key: 2,
|
1737
|
+
to: "/search/complaints/all"
|
1738
|
+
}, {
|
1739
|
+
default: R(() => [
|
1740
|
+
E(" complaints everywhere ")
|
1741
|
+
]),
|
1742
|
+
_: 1
|
1743
|
+
})) : (v(), w("a", {
|
1744
|
+
key: 3,
|
1745
|
+
target: "_blank",
|
1746
|
+
rel: "noreferrer",
|
1747
|
+
href: `${r.baseUrlForRedirect}/search/complaints/all`
|
1748
|
+
}, " complaints everywhere ", 8, cn)),
|
1749
|
+
E(" . ")
|
1750
|
+
])
|
1730
1751
|
]),
|
1731
1752
|
_: 1
|
1732
1753
|
})
|
1733
1754
|
], 64));
|
1734
1755
|
}
|
1735
1756
|
});
|
1736
|
-
const
|
1757
|
+
const dn = ["alt", "src"], vn = /* @__PURE__ */ S({
|
1737
1758
|
__name: "TileIcon",
|
1738
1759
|
props: {
|
1739
1760
|
imgAltText: {},
|
1740
1761
|
imgSrc: {}
|
1741
1762
|
},
|
1742
1763
|
setup(e) {
|
1743
|
-
return (t, r) => (
|
1764
|
+
return (t, r) => (v(), w("img", {
|
1744
1765
|
class: "pdap-tile-icon",
|
1745
1766
|
alt: t.imgAltText,
|
1746
1767
|
src: t.imgSrc
|
1747
|
-
}, null, 8,
|
1768
|
+
}, null, 8, dn));
|
1748
1769
|
}
|
1749
1770
|
});
|
1750
|
-
const
|
1771
|
+
const yn = {
|
1751
1772
|
content: ["./src/**/*.vue", "./src/**/*.css"],
|
1752
1773
|
theme: {
|
1753
1774
|
// Nested within "extend" - extends tailwind theme defaults, only overrides properties named here
|
@@ -1827,16 +1848,16 @@ const hn = {
|
|
1827
1848
|
};
|
1828
1849
|
export {
|
1829
1850
|
lt as Button,
|
1830
|
-
|
1831
|
-
|
1851
|
+
fe as FlexContainer,
|
1852
|
+
fn as Footer,
|
1832
1853
|
Kr as Form,
|
1833
1854
|
Zr as GridContainer,
|
1834
|
-
|
1835
|
-
|
1855
|
+
gn as GridItem,
|
1856
|
+
hn as Header,
|
1836
1857
|
Mt as Input,
|
1837
1858
|
tn as Nav,
|
1838
|
-
|
1839
|
-
|
1840
|
-
|
1841
|
-
|
1859
|
+
I as PdapInputTypes,
|
1860
|
+
$n as QuickSearchForm,
|
1861
|
+
vn as TileIcon,
|
1862
|
+
yn as tailwindConfig
|
1842
1863
|
};
|