pdap-design-system 2.0.5 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +41 -15
- package/bin/pdap-design-system-cli.js +1 -1
- package/dist/config/index.d.ts +2 -0
- package/dist/index.cjs +3 -3
- package/dist/index.js +429 -347
- package/dist/{index.d.ts → src/index.d.ts} +1 -0
- package/dist/tailwind.config.d.ts +2 -0
- package/docs/CONTRIBUTING.md +64 -0
- package/docs/components.md +555 -0
- package/package.json +42 -14
- package/CONTRIBUTING.md +0 -34
- package/dist/tools/testing/serializer.d.ts +0 -7
- package/dist/tools/testing/setup.d.ts +0 -1
- /package/dist/{components → src/components}/Button/PdapButton.vue.d.ts +0 -0
- /package/dist/{components → src/components}/Button/index.d.ts +0 -0
- /package/dist/{components → src/components}/Button/types.d.ts +0 -0
- /package/dist/{components → src/components}/FlexContainer/FlexContainer.vue.d.ts +0 -0
- /package/dist/{components → src/components}/FlexContainer/index.d.ts +0 -0
- /package/dist/{components → src/components}/FlexContainer/types.d.ts +0 -0
- /package/dist/{components → src/components}/Footer/PdapFooter.vue.d.ts +0 -0
- /package/dist/{components → src/components}/Footer/index.d.ts +0 -0
- /package/dist/{components → src/components}/Footer/types.d.ts +0 -0
- /package/dist/{components → src/components}/Form/PdapForm.vue.d.ts +0 -0
- /package/dist/{components → src/components}/Form/index.d.ts +0 -0
- /package/dist/{components → src/components}/Form/types.d.ts +0 -0
- /package/dist/{components → src/components}/GridContainer/GridContainer.vue.d.ts +0 -0
- /package/dist/{components → src/components}/GridContainer/index.d.ts +0 -0
- /package/dist/{components → src/components}/GridContainer/types.d.ts +0 -0
- /package/dist/{components → src/components}/GridItem/GridItem.vue.d.ts +0 -0
- /package/dist/{components → src/components}/GridItem/index.d.ts +0 -0
- /package/dist/{components → src/components}/GridItem/types.d.ts +0 -0
- /package/dist/{components → src/components}/Header/PdapHeader.vue.d.ts +0 -0
- /package/dist/{components → src/components}/Header/index.d.ts +0 -0
- /package/dist/{components → src/components}/Header/types.d.ts +0 -0
- /package/dist/{components → src/components}/Input/PdapInput.vue.d.ts +0 -0
- /package/dist/{components → src/components}/Input/index.d.ts +0 -0
- /package/dist/{components → src/components}/Input/types.d.ts +0 -0
- /package/dist/{components → src/components}/Input/utils.d.ts +0 -0
- /package/dist/{components → src/components}/Nav/PdapNav.vue.d.ts +0 -0
- /package/dist/{components → src/components}/Nav/index.d.ts +0 -0
- /package/dist/{components → src/components}/Nav/types.d.ts +0 -0
- /package/dist/{components → src/components}/QuickSearchForm/QuickSearchForm.vue.d.ts +0 -0
- /package/dist/{components → src/components}/QuickSearchForm/index.d.ts +0 -0
- /package/dist/{components → src/components}/TileIcon/TileIcon.vue.d.ts +0 -0
- /package/dist/{components → src/components}/TileIcon/index.d.ts +0 -0
- /package/dist/{components → src/components}/TileIcon/types.d.ts +0 -0
- /package/dist/{components → src/components}/index.d.ts +0 -0
- /package/dist/{utils → src/utils}/vuelidate.d.ts +0 -0
- /package/dist/{utils → src/utils}/vuelidate.test.d.ts +0 -0
package/dist/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { defineComponent as j, reactive as C, openBlock as v, createElementBlock as
|
2
|
-
import { RouterLink as
|
1
|
+
import { defineComponent as j, reactive as C, openBlock as v, createElementBlock as w, normalizeClass as G, renderSlot as K, createBlock as A, resolveDynamicComponent as me, withCtx as E, inject as J, resolveComponent as Qe, createVNode as Y, createElementVNode as x, Fragment as ee, renderList as fe, unref as d, toDisplayString as D, createCommentVNode as F, createTextVNode as B, getCurrentInstance as Ze, ref as P, onBeforeMount as Le, watch as X, isRef as ce, onBeforeUnmount as ge, computed as _, isReactive as Je, isReadonly as Ye, provide as we, nextTick as te, mergeProps as de, watchEffect as xe, withModifiers as et, normalizeStyle as $e, onMounted as tt } from "vue";
|
2
|
+
import { RouterLink as Ve, useRouter as rt } from "vue-router";
|
3
3
|
const nt = /* @__PURE__ */ j({
|
4
4
|
__name: "PdapButton",
|
5
5
|
props: {
|
@@ -12,7 +12,7 @@ const nt = /* @__PURE__ */ j({
|
|
12
12
|
[`pdap-button-${t.intent}`]: !!t.intent,
|
13
13
|
"pdap-button-loading": t.isLoading
|
14
14
|
});
|
15
|
-
return (n, a) => (v(),
|
15
|
+
return (n, a) => (v(), w("button", {
|
16
16
|
class: G(r)
|
17
17
|
}, [
|
18
18
|
K(n.$slots, "default")
|
@@ -40,23 +40,23 @@ const ke = /* @__PURE__ */ j({
|
|
40
40
|
}, 8, ["class"]));
|
41
41
|
}
|
42
42
|
});
|
43
|
-
const at = { class: "pdap-footer" }, st = { class: "pdap-footer-social-links" }, ot = ["href"], it = /* @__PURE__ */
|
43
|
+
const at = { class: "pdap-footer" }, st = { class: "pdap-footer-social-links" }, ot = ["href"], it = /* @__PURE__ */ x("p", { class: "pdap-footer-copyright" }, [
|
44
44
|
/* @__PURE__ */ B(" © 2023 Police Data Accessibility Project"),
|
45
|
-
/* @__PURE__ */
|
46
|
-
], -1),
|
45
|
+
/* @__PURE__ */ x("br")
|
46
|
+
], -1), lt = /* @__PURE__ */ x("p", { class: "pdap-footer-copyright" }, [
|
47
47
|
/* @__PURE__ */ B(" PDAP is a non-profit. EIN: 85-4207132. "),
|
48
|
-
/* @__PURE__ */
|
48
|
+
/* @__PURE__ */ x("a", {
|
49
49
|
href: "https://docs.pdap.io/meta/policy/pdap-privacy-policy",
|
50
50
|
alt: "Privacy Policy"
|
51
51
|
}, " Privacy Policy"),
|
52
52
|
/* @__PURE__ */ B(". "),
|
53
|
-
/* @__PURE__ */
|
54
|
-
], -1),
|
53
|
+
/* @__PURE__ */ x("a", { href: "mailto:contact@pdap.io" }, "contact@pdap.io")
|
54
|
+
], -1), ut = { class: "pdap-footer-widget-links" }, ct = /* @__PURE__ */ x("a", {
|
55
55
|
href: "https://www.guidestar.org/profile/85-4207132",
|
56
56
|
target: "_blank"
|
57
57
|
}, [
|
58
|
-
/* @__PURE__ */
|
59
|
-
], -1), dt = ["href"], pt = ["src"], mt = ["src"],
|
58
|
+
/* @__PURE__ */ x("img", { src: "https://widgets.guidestar.org/gximage2?o=9973356&l=v4" })
|
59
|
+
], -1), dt = ["href"], pt = ["src"], mt = ["src"], Jr = /* @__PURE__ */ j({
|
60
60
|
__name: "PdapFooter",
|
61
61
|
props: {
|
62
62
|
logoImageSrc: { default: "node_modules/pdap-design-system/dist/images/acronym.svg" },
|
@@ -82,23 +82,23 @@ const at = { class: "pdap-footer" }, st = { class: "pdap-footer-social-links" },
|
|
82
82
|
}
|
83
83
|
]), n = t.logoImageAnchorPath.startsWith("/");
|
84
84
|
return (a, s) => {
|
85
|
-
const
|
86
|
-
return v(),
|
85
|
+
const l = Qe("router-link");
|
86
|
+
return v(), w("footer", at, [
|
87
87
|
Y(ke, { alignment: "center" }, {
|
88
88
|
default: E(() => [
|
89
|
-
|
90
|
-
(v(!0),
|
89
|
+
x("ul", st, [
|
90
|
+
(v(!0), w(ee, null, fe(d(r), (i) => (v(), w("li", {
|
91
91
|
key: i.text,
|
92
92
|
class: "pdap-footer-link-container"
|
93
93
|
}, [
|
94
|
-
i.href ? (v(),
|
94
|
+
i.href ? (v(), w("a", {
|
95
95
|
key: 0,
|
96
96
|
class: "pdap-footer-social-link",
|
97
97
|
href: i.href,
|
98
98
|
target: "_blank",
|
99
99
|
referrerpolicy: "no-referrer"
|
100
|
-
}, D(i.text), 9, ot)) :
|
101
|
-
i.path ? (v(), A(
|
100
|
+
}, D(i.text), 9, ot)) : F("", !0),
|
101
|
+
i.path ? (v(), A(l, {
|
102
102
|
key: 1,
|
103
103
|
"active-class": "pdap-footer-social-link-current",
|
104
104
|
"exact-active-class": "pdap-footer-social-link-current-exact",
|
@@ -109,20 +109,20 @@ const at = { class: "pdap-footer" }, st = { class: "pdap-footer-social-links" },
|
|
109
109
|
B(D(i.text), 1)
|
110
110
|
]),
|
111
111
|
_: 2
|
112
|
-
}, 1032, ["to"])) :
|
112
|
+
}, 1032, ["to"])) : F("", !0)
|
113
113
|
]))), 128))
|
114
114
|
]),
|
115
115
|
it,
|
116
|
-
|
117
|
-
|
116
|
+
lt,
|
117
|
+
x("div", ut, [
|
118
118
|
ct,
|
119
|
-
d(n) ? (v(), A(
|
119
|
+
d(n) ? (v(), A(l, {
|
120
120
|
key: 1,
|
121
121
|
to: a.logoImageAnchorPath,
|
122
122
|
class: "pdap-footer-logo"
|
123
123
|
}, {
|
124
124
|
default: E(() => [
|
125
|
-
|
125
|
+
x("img", {
|
126
126
|
src: a.logoImageSrc,
|
127
127
|
loading: "lazy",
|
128
128
|
width: "250",
|
@@ -130,12 +130,12 @@ const at = { class: "pdap-footer" }, st = { class: "pdap-footer-social-links" },
|
|
130
130
|
}, null, 8, mt)
|
131
131
|
]),
|
132
132
|
_: 1
|
133
|
-
}, 8, ["to"])) : (v(),
|
133
|
+
}, 8, ["to"])) : (v(), w("a", {
|
134
134
|
key: 0,
|
135
135
|
href: a.logoImageAnchorPath,
|
136
136
|
class: "pdap-footer-logo"
|
137
137
|
}, [
|
138
|
-
|
138
|
+
x("img", {
|
139
139
|
src: a.logoImageSrc,
|
140
140
|
loading: "lazy",
|
141
141
|
width: "250",
|
@@ -150,7 +150,7 @@ const at = { class: "pdap-footer" }, st = { class: "pdap-footer-social-links" },
|
|
150
150
|
};
|
151
151
|
}
|
152
152
|
});
|
153
|
-
function
|
153
|
+
function Pe(e, t) {
|
154
154
|
var r = Object.keys(e);
|
155
155
|
if (Object.getOwnPropertySymbols) {
|
156
156
|
var n = Object.getOwnPropertySymbols(e);
|
@@ -160,12 +160,12 @@ function xe(e, t) {
|
|
160
160
|
}
|
161
161
|
return r;
|
162
162
|
}
|
163
|
-
function
|
163
|
+
function L(e) {
|
164
164
|
for (var t = 1; t < arguments.length; t++) {
|
165
165
|
var r = arguments[t] != null ? arguments[t] : {};
|
166
|
-
t % 2 ?
|
166
|
+
t % 2 ? Pe(Object(r), !0).forEach(function(n) {
|
167
167
|
ft(e, n, r[n]);
|
168
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) :
|
168
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Pe(Object(r)).forEach(function(n) {
|
169
169
|
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
170
170
|
});
|
171
171
|
}
|
@@ -186,7 +186,7 @@ function Re(e) {
|
|
186
186
|
function re(e) {
|
187
187
|
return typeof e == "function";
|
188
188
|
}
|
189
|
-
function
|
189
|
+
function gt(e) {
|
190
190
|
return Je(e) || Ye(e);
|
191
191
|
}
|
192
192
|
function ze(e, t, r) {
|
@@ -199,7 +199,7 @@ function ze(e, t, r) {
|
|
199
199
|
}
|
200
200
|
return n;
|
201
201
|
}
|
202
|
-
function
|
202
|
+
function ue(e, t, r) {
|
203
203
|
return _(() => e.some((n) => ze(t, n, {
|
204
204
|
[r]: !1
|
205
205
|
})[r]));
|
@@ -218,23 +218,23 @@ function Me(e, t, r, n) {
|
|
218
218
|
function De(e) {
|
219
219
|
return e.$valid !== void 0 ? !e.$valid : !e;
|
220
220
|
}
|
221
|
-
function
|
221
|
+
function $t(e, t, r, n, a, s, l) {
|
222
222
|
let {
|
223
223
|
$lazy: i,
|
224
|
-
$rewardEarly:
|
225
|
-
} = a, c = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : [], p = arguments.length > 8 ? arguments[8] : void 0, f = arguments.length > 9 ? arguments[9] : void 0,
|
226
|
-
const h =
|
224
|
+
$rewardEarly: u
|
225
|
+
} = a, c = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : [], p = arguments.length > 8 ? arguments[8] : void 0, f = arguments.length > 9 ? arguments[9] : void 0, $ = arguments.length > 10 ? arguments[10] : void 0;
|
226
|
+
const h = P(!!n.value), o = P(0);
|
227
227
|
r.value = !1;
|
228
|
-
const m = X([t, n].concat(c,
|
229
|
-
if (i && !n.value ||
|
228
|
+
const m = X([t, n].concat(c, $), () => {
|
229
|
+
if (i && !n.value || u && !f.value && !r.value)
|
230
230
|
return;
|
231
|
-
let
|
231
|
+
let g;
|
232
232
|
try {
|
233
|
-
|
233
|
+
g = Me(e, t, p, l);
|
234
234
|
} catch (y) {
|
235
|
-
|
235
|
+
g = Promise.reject(y);
|
236
236
|
}
|
237
|
-
o.value++, r.value = !!o.value, h.value = !1, Promise.resolve(
|
237
|
+
o.value++, r.value = !!o.value, h.value = !1, Promise.resolve(g).then((y) => {
|
238
238
|
o.value--, r.value = !!o.value, s.value = y, h.value = De(y);
|
239
239
|
}).catch((y) => {
|
240
240
|
o.value--, r.value = !!o.value, s.value = y, h.value = !0;
|
@@ -248,51 +248,51 @@ function gt(e, t, r, n, a, s, u) {
|
|
248
248
|
$unwatch: m
|
249
249
|
};
|
250
250
|
}
|
251
|
-
function ht(e, t, r, n, a, s,
|
251
|
+
function ht(e, t, r, n, a, s, l, i) {
|
252
252
|
let {
|
253
|
-
$lazy:
|
253
|
+
$lazy: u,
|
254
254
|
$rewardEarly: c
|
255
255
|
} = n;
|
256
256
|
const p = () => ({}), f = _(() => {
|
257
|
-
if (
|
257
|
+
if (u && !r.value || c && !i.value)
|
258
258
|
return !1;
|
259
|
-
let
|
259
|
+
let $ = !0;
|
260
260
|
try {
|
261
|
-
const h = Me(e, t,
|
262
|
-
a.value = h,
|
261
|
+
const h = Me(e, t, l, s);
|
262
|
+
a.value = h, $ = De(h);
|
263
263
|
} catch (h) {
|
264
264
|
a.value = h;
|
265
265
|
}
|
266
|
-
return
|
266
|
+
return $;
|
267
267
|
});
|
268
268
|
return {
|
269
269
|
$unwatch: p,
|
270
270
|
$invalid: f
|
271
271
|
};
|
272
272
|
}
|
273
|
-
function vt(e, t, r, n, a, s,
|
274
|
-
const f =
|
273
|
+
function vt(e, t, r, n, a, s, l, i, u, c, p) {
|
274
|
+
const f = P(!1), $ = e.$params || {}, h = P(null);
|
275
275
|
let o, m;
|
276
276
|
e.$async ? {
|
277
277
|
$invalid: o,
|
278
278
|
$unwatch: m
|
279
|
-
} =
|
279
|
+
} = $t(e.$validator, t, f, r, n, h, a, e.$watchTargets, u, c, p) : {
|
280
280
|
$invalid: o,
|
281
281
|
$unwatch: m
|
282
|
-
} = ht(e.$validator, t, r, n, h, a,
|
283
|
-
const
|
282
|
+
} = ht(e.$validator, t, r, n, h, a, u, c);
|
283
|
+
const g = e.$message;
|
284
284
|
return {
|
285
|
-
$message: re(
|
285
|
+
$message: re(g) ? _(() => g(Re({
|
286
286
|
$pending: f,
|
287
287
|
$invalid: o,
|
288
|
-
$params: Re(
|
288
|
+
$params: Re($),
|
289
289
|
$model: t,
|
290
290
|
$response: h,
|
291
291
|
$validator: s,
|
292
292
|
$propertyPath: i,
|
293
|
-
$property:
|
294
|
-
}))) :
|
295
|
-
$params:
|
293
|
+
$property: l
|
294
|
+
}))) : g || "",
|
295
|
+
$params: $,
|
296
296
|
$pending: f,
|
297
297
|
$invalid: o,
|
298
298
|
$response: h,
|
@@ -302,37 +302,37 @@ function vt(e, t, r, n, a, s, u, i, l, c, p) {
|
|
302
302
|
function yt() {
|
303
303
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
304
304
|
const t = d(e), r = Object.keys(t), n = {}, a = {}, s = {};
|
305
|
-
let
|
305
|
+
let l = null;
|
306
306
|
return r.forEach((i) => {
|
307
|
-
const
|
307
|
+
const u = t[i];
|
308
308
|
switch (!0) {
|
309
|
-
case re(
|
310
|
-
n[i] =
|
309
|
+
case re(u.$validator):
|
310
|
+
n[i] = u;
|
311
311
|
break;
|
312
|
-
case re(
|
312
|
+
case re(u):
|
313
313
|
n[i] = {
|
314
|
-
$validator:
|
314
|
+
$validator: u
|
315
315
|
};
|
316
316
|
break;
|
317
317
|
case i === "$validationGroups":
|
318
|
-
|
318
|
+
l = u;
|
319
319
|
break;
|
320
320
|
case i.startsWith("$"):
|
321
|
-
s[i] =
|
321
|
+
s[i] = u;
|
322
322
|
break;
|
323
323
|
default:
|
324
|
-
a[i] =
|
324
|
+
a[i] = u;
|
325
325
|
}
|
326
326
|
}), {
|
327
327
|
rules: n,
|
328
328
|
nestedValidators: a,
|
329
329
|
config: s,
|
330
|
-
validationGroups:
|
330
|
+
validationGroups: l
|
331
331
|
};
|
332
332
|
}
|
333
333
|
const _t = "__root";
|
334
|
-
function
|
335
|
-
const c = Object.keys(e), p = n.get(a, e), f =
|
334
|
+
function bt(e, t, r, n, a, s, l, i, u) {
|
335
|
+
const c = Object.keys(e), p = n.get(a, e), f = P(!1), $ = P(!1), h = P(0);
|
336
336
|
if (p) {
|
337
337
|
if (!p.$partial)
|
338
338
|
return p;
|
@@ -351,40 +351,40 @@ function wt(e, t, r, n, a, s, u, i, l) {
|
|
351
351
|
}
|
352
352
|
};
|
353
353
|
return c.length ? (c.forEach((m) => {
|
354
|
-
o[m] = vt(e[m], t, o.$dirty, s,
|
355
|
-
}), o.$externalResults = _(() => i.value ? [].concat(i.value).map((m,
|
354
|
+
o[m] = vt(e[m], t, o.$dirty, s, l, m, r, a, u, $, h);
|
355
|
+
}), o.$externalResults = _(() => i.value ? [].concat(i.value).map((m, g) => ({
|
356
356
|
$propertyPath: a,
|
357
357
|
$property: r,
|
358
358
|
$validator: "$externalResults",
|
359
|
-
$uid: `${a}-externalResult-${
|
359
|
+
$uid: `${a}-externalResult-${g}`,
|
360
360
|
$message: m,
|
361
361
|
$params: {},
|
362
362
|
$response: null,
|
363
363
|
$pending: !1
|
364
364
|
})) : []), o.$invalid = _(() => {
|
365
|
-
const m = c.some((
|
366
|
-
return
|
365
|
+
const m = c.some((g) => d(o[g].$invalid));
|
366
|
+
return $.value = m, !!o.$externalResults.value.length || m;
|
367
367
|
}), o.$pending = _(() => c.some((m) => d(o[m].$pending))), o.$error = _(() => o.$dirty.value ? o.$pending.value || o.$invalid.value : !1), o.$silentErrors = _(() => c.filter((m) => d(o[m].$invalid)).map((m) => {
|
368
|
-
const
|
368
|
+
const g = o[m];
|
369
369
|
return C({
|
370
370
|
$propertyPath: a,
|
371
371
|
$property: r,
|
372
372
|
$validator: m,
|
373
373
|
$uid: `${a}-${m}`,
|
374
|
-
$message:
|
375
|
-
$params:
|
376
|
-
$response:
|
377
|
-
$pending:
|
374
|
+
$message: g.$message,
|
375
|
+
$params: g.$params,
|
376
|
+
$response: g.$response,
|
377
|
+
$pending: g.$pending
|
378
378
|
});
|
379
379
|
}).concat(o.$externalResults.value)), o.$errors = _(() => o.$dirty.value ? o.$silentErrors.value : []), o.$unwatch = () => c.forEach((m) => {
|
380
380
|
o[m].$unwatch();
|
381
381
|
}), o.$commit = () => {
|
382
|
-
|
382
|
+
$.value = !0, h.value = Date.now();
|
383
383
|
}, n.set(a, e, o), o) : (p && n.set(a, e, o), o);
|
384
384
|
}
|
385
|
-
function
|
385
|
+
function wt(e, t, r, n, a, s, l) {
|
386
386
|
const i = Object.keys(e);
|
387
|
-
return i.length ? i.reduce((
|
387
|
+
return i.length ? i.reduce((u, c) => (u[c] = pe({
|
388
388
|
validations: e[c],
|
389
389
|
state: t,
|
390
390
|
key: c,
|
@@ -392,10 +392,10 @@ function bt(e, t, r, n, a, s, u) {
|
|
392
392
|
resultsCache: n,
|
393
393
|
globalConfig: a,
|
394
394
|
instance: s,
|
395
|
-
externalResults:
|
396
|
-
}),
|
395
|
+
externalResults: l
|
396
|
+
}), u), {}) : {};
|
397
397
|
}
|
398
|
-
function
|
398
|
+
function xt(e, t, r) {
|
399
399
|
const n = _(() => [t, r].filter((o) => o).reduce((o, m) => o.concat(Object.values(d(m))), [])), a = _({
|
400
400
|
get() {
|
401
401
|
return e.$dirty.value || (n.value.length ? n.value.every((o) => o.$dirty) : !1);
|
@@ -404,16 +404,16 @@ function Pt(e, t, r) {
|
|
404
404
|
e.$dirty.value = o;
|
405
405
|
}
|
406
406
|
}), s = _(() => {
|
407
|
-
const o = d(e.$silentErrors) || [], m = n.value.filter((
|
407
|
+
const o = d(e.$silentErrors) || [], m = n.value.filter((g) => (d(g).$silentErrors || []).length).reduce((g, y) => g.concat(...y.$silentErrors), []);
|
408
408
|
return o.concat(m);
|
409
|
-
}),
|
410
|
-
const o = d(e.$errors) || [], m = n.value.filter((
|
409
|
+
}), l = _(() => {
|
410
|
+
const o = d(e.$errors) || [], m = n.value.filter((g) => (d(g).$errors || []).length).reduce((g, y) => g.concat(...y.$errors), []);
|
411
411
|
return o.concat(m);
|
412
|
-
}), i = _(() => n.value.some((o) => o.$invalid) || d(e.$invalid) || !1),
|
412
|
+
}), i = _(() => n.value.some((o) => o.$invalid) || d(e.$invalid) || !1), u = _(() => n.value.some((o) => d(o.$pending)) || d(e.$pending) || !1), c = _(() => n.value.some((o) => o.$dirty) || n.value.some((o) => o.$anyDirty) || a.value), p = _(() => a.value ? u.value || i.value : !1), f = () => {
|
413
413
|
e.$touch(), n.value.forEach((o) => {
|
414
414
|
o.$touch();
|
415
415
|
});
|
416
|
-
},
|
416
|
+
}, $ = () => {
|
417
417
|
e.$commit(), n.value.forEach((o) => {
|
418
418
|
o.$commit();
|
419
419
|
});
|
@@ -424,15 +424,15 @@ function Pt(e, t, r) {
|
|
424
424
|
};
|
425
425
|
return n.value.length && n.value.every((o) => o.$dirty) && f(), {
|
426
426
|
$dirty: a,
|
427
|
-
$errors:
|
427
|
+
$errors: l,
|
428
428
|
$invalid: i,
|
429
429
|
$anyDirty: c,
|
430
430
|
$error: p,
|
431
|
-
$pending:
|
431
|
+
$pending: u,
|
432
432
|
$touch: f,
|
433
433
|
$reset: h,
|
434
434
|
$silentErrors: s,
|
435
|
-
$commit:
|
435
|
+
$commit: $
|
436
436
|
};
|
437
437
|
}
|
438
438
|
function pe(e) {
|
@@ -442,97 +442,97 @@ function pe(e) {
|
|
442
442
|
key: n,
|
443
443
|
parentKey: a,
|
444
444
|
childResults: s,
|
445
|
-
resultsCache:
|
445
|
+
resultsCache: l,
|
446
446
|
globalConfig: i = {},
|
447
|
-
instance:
|
447
|
+
instance: u,
|
448
448
|
externalResults: c
|
449
449
|
} = e;
|
450
450
|
const p = a ? `${a}.${n}` : n, {
|
451
451
|
rules: f,
|
452
|
-
nestedValidators:
|
452
|
+
nestedValidators: $,
|
453
453
|
config: h,
|
454
454
|
validationGroups: o
|
455
|
-
} = yt(t), m =
|
456
|
-
const
|
457
|
-
return
|
458
|
-
}) : r, y =
|
459
|
-
const
|
460
|
-
return n ?
|
461
|
-
}), se =
|
462
|
-
o && Object.entries(o).forEach((
|
463
|
-
let [M,
|
455
|
+
} = yt(t), m = L(L({}, i), h), g = n ? _(() => {
|
456
|
+
const b = d(r);
|
457
|
+
return b ? d(b[n]) : void 0;
|
458
|
+
}) : r, y = L({}, d(c) || {}), N = _(() => {
|
459
|
+
const b = d(c);
|
460
|
+
return n ? b ? d(b[n]) : void 0 : b;
|
461
|
+
}), se = bt(f, g, n, l, p, m, u, N, r), O = wt($, g, p, l, m, u, N), z = {};
|
462
|
+
o && Object.entries(o).forEach((b) => {
|
463
|
+
let [M, I] = b;
|
464
464
|
z[M] = {
|
465
|
-
$invalid:
|
466
|
-
$error:
|
467
|
-
$pending:
|
468
|
-
$errors: Oe(
|
469
|
-
$silentErrors: Oe(
|
465
|
+
$invalid: ue(I, O, "$invalid"),
|
466
|
+
$error: ue(I, O, "$error"),
|
467
|
+
$pending: ue(I, O, "$pending"),
|
468
|
+
$errors: Oe(I, O, "$errors"),
|
469
|
+
$silentErrors: Oe(I, O, "$silentErrors")
|
470
470
|
};
|
471
471
|
});
|
472
472
|
const {
|
473
|
-
$dirty:
|
473
|
+
$dirty: S,
|
474
474
|
$errors: Q,
|
475
475
|
$invalid: oe,
|
476
|
-
$anyDirty:
|
476
|
+
$anyDirty: Ne,
|
477
477
|
$error: Be,
|
478
478
|
$pending: ie,
|
479
|
-
$touch:
|
479
|
+
$touch: le,
|
480
480
|
$reset: He,
|
481
481
|
$silentErrors: Ge,
|
482
|
-
$commit:
|
483
|
-
} =
|
484
|
-
get: () => d(
|
485
|
-
set: (
|
486
|
-
|
487
|
-
const M = d(r),
|
488
|
-
|
482
|
+
$commit: be
|
483
|
+
} = xt(se, O, s), Xe = n ? _({
|
484
|
+
get: () => d(g),
|
485
|
+
set: (b) => {
|
486
|
+
S.value = !0;
|
487
|
+
const M = d(r), I = d(c);
|
488
|
+
I && (I[n] = y[n]), ce(M[n]) ? M[n].value = b : M[n] = b;
|
489
489
|
}
|
490
490
|
}) : null;
|
491
|
-
n && m.$autoDirty && X(
|
492
|
-
|
493
|
-
const
|
494
|
-
|
491
|
+
n && m.$autoDirty && X(g, () => {
|
492
|
+
S.value || le();
|
493
|
+
const b = d(c);
|
494
|
+
b && (b[n] = y[n]);
|
495
495
|
}, {
|
496
496
|
flush: "sync"
|
497
497
|
});
|
498
498
|
async function We() {
|
499
|
-
return
|
499
|
+
return le(), m.$rewardEarly && (be(), await te()), await te(), new Promise((b) => {
|
500
500
|
if (!ie.value)
|
501
|
-
return
|
501
|
+
return b(!oe.value);
|
502
502
|
const M = X(ie, () => {
|
503
|
-
|
503
|
+
b(!oe.value), M();
|
504
504
|
});
|
505
505
|
});
|
506
506
|
}
|
507
|
-
function Ue(
|
508
|
-
return (s.value || {})[
|
507
|
+
function Ue(b) {
|
508
|
+
return (s.value || {})[b];
|
509
509
|
}
|
510
510
|
function Ke() {
|
511
|
-
ce(c) ? c.value = y : Object.keys(y).length === 0 ? Object.keys(c).forEach((
|
512
|
-
delete c[
|
511
|
+
ce(c) ? c.value = y : Object.keys(y).length === 0 ? Object.keys(c).forEach((b) => {
|
512
|
+
delete c[b];
|
513
513
|
}) : Object.assign(c, y);
|
514
514
|
}
|
515
|
-
return C(
|
515
|
+
return C(L(L(L({}, se), {}, {
|
516
516
|
$model: Xe,
|
517
|
-
$dirty:
|
517
|
+
$dirty: S,
|
518
518
|
$error: Be,
|
519
519
|
$errors: Q,
|
520
520
|
$invalid: oe,
|
521
|
-
$anyDirty:
|
521
|
+
$anyDirty: Ne,
|
522
522
|
$pending: ie,
|
523
|
-
$touch:
|
523
|
+
$touch: le,
|
524
524
|
$reset: He,
|
525
525
|
$path: p || _t,
|
526
526
|
$silentErrors: Ge,
|
527
527
|
$validate: We,
|
528
|
-
$commit:
|
528
|
+
$commit: be
|
529
529
|
}, s && {
|
530
530
|
$getResultsForChild: Ue,
|
531
531
|
$clearExternalResults: Ke,
|
532
532
|
$validationGroups: z
|
533
533
|
}), O));
|
534
534
|
}
|
535
|
-
class
|
535
|
+
class Pt {
|
536
536
|
constructor() {
|
537
537
|
this.storage = /* @__PURE__ */ new Map();
|
538
538
|
}
|
@@ -544,7 +544,7 @@ class xt {
|
|
544
544
|
}
|
545
545
|
checkRulesValidity(t, r, n) {
|
546
546
|
const a = Object.keys(n), s = Object.keys(r);
|
547
|
-
return s.length !== a.length || !s.every((i) => a.includes(i)) ? !1 : s.every((i) => r[i].$params ? Object.keys(r[i].$params).every((
|
547
|
+
return s.length !== a.length || !s.every((i) => a.includes(i)) ? !1 : s.every((i) => r[i].$params ? Object.keys(r[i].$params).every((u) => d(n[i].$params[u]) === d(r[i].$params[u])) : !0);
|
548
548
|
}
|
549
549
|
get(t, r) {
|
550
550
|
const n = this.storage.get(t);
|
@@ -553,8 +553,8 @@ class xt {
|
|
553
553
|
const {
|
554
554
|
rules: a,
|
555
555
|
result: s
|
556
|
-
} = n,
|
557
|
-
return
|
556
|
+
} = n, l = this.checkRulesValidity(t, r, a), i = s.$unwatch ? s.$unwatch : () => ({});
|
557
|
+
return l ? s : {
|
558
558
|
$dirty: s.$dirty,
|
559
559
|
$partial: !0,
|
560
560
|
$unwatch: i
|
@@ -570,33 +570,33 @@ function Rt(e) {
|
|
570
570
|
$scope: t,
|
571
571
|
instance: r
|
572
572
|
} = e;
|
573
|
-
const n = {}, a =
|
574
|
-
function
|
573
|
+
const n = {}, a = P([]), s = _(() => a.value.reduce((p, f) => (p[f] = d(n[f]), p), {}));
|
574
|
+
function l(p, f) {
|
575
575
|
let {
|
576
|
-
$registerAs:
|
576
|
+
$registerAs: $,
|
577
577
|
$scope: h,
|
578
578
|
$stopPropagation: o
|
579
579
|
} = f;
|
580
|
-
o || t === Z.COLLECT_NONE || h === Z.COLLECT_NONE || t !== Z.COLLECT_ALL && t !== h || (n[
|
580
|
+
o || t === Z.COLLECT_NONE || h === Z.COLLECT_NONE || t !== Z.COLLECT_ALL && t !== h || (n[$] = p, a.value.push($));
|
581
581
|
}
|
582
|
-
r.__vuelidateInjectInstances = [].concat(r.__vuelidateInjectInstances || [],
|
582
|
+
r.__vuelidateInjectInstances = [].concat(r.__vuelidateInjectInstances || [], l);
|
583
583
|
function i(p) {
|
584
584
|
a.value = a.value.filter((f) => f !== p), delete n[p];
|
585
585
|
}
|
586
586
|
r.__vuelidateRemoveInstances = [].concat(r.__vuelidateRemoveInstances || [], i);
|
587
|
-
const
|
588
|
-
|
587
|
+
const u = J(Ee, []);
|
588
|
+
we(Ee, r.__vuelidateInjectInstances);
|
589
589
|
const c = J(Ce, []);
|
590
|
-
return
|
590
|
+
return we(Ce, r.__vuelidateRemoveInstances), {
|
591
591
|
childResults: s,
|
592
|
-
sendValidationResultsToParent:
|
592
|
+
sendValidationResultsToParent: u,
|
593
593
|
removeValidationResultsFromParent: c
|
594
594
|
};
|
595
595
|
}
|
596
|
-
function
|
596
|
+
function Fe(e) {
|
597
597
|
return new Proxy(e, {
|
598
598
|
get(t, r) {
|
599
|
-
return typeof t[r] == "object" ?
|
599
|
+
return typeof t[r] == "object" ? Fe(t[r]) : _(() => t[r]);
|
600
600
|
}
|
601
601
|
});
|
602
602
|
}
|
@@ -608,13 +608,13 @@ function Ot(e, t) {
|
|
608
608
|
let {
|
609
609
|
$registerAs: a,
|
610
610
|
$scope: s = Z.COLLECT_ALL,
|
611
|
-
$stopPropagation:
|
611
|
+
$stopPropagation: l,
|
612
612
|
$externalResults: i,
|
613
|
-
currentVueInstance:
|
613
|
+
currentVueInstance: u
|
614
614
|
} = n;
|
615
|
-
const c =
|
615
|
+
const c = u || ((r = Ze()) === null || r === void 0 ? void 0 : r.proxy), p = c ? c.$options : {};
|
616
616
|
a || (je += 1, a = `_vuelidate_${je}`);
|
617
|
-
const f =
|
617
|
+
const f = P({}), $ = new Pt(), {
|
618
618
|
childResults: h,
|
619
619
|
sendValidationResultsToParent: o,
|
620
620
|
removeValidationResultsFromParent: m
|
@@ -622,17 +622,17 @@ function Ot(e, t) {
|
|
622
622
|
$scope: s,
|
623
623
|
instance: c
|
624
624
|
}) : {
|
625
|
-
childResults:
|
625
|
+
childResults: P({})
|
626
626
|
};
|
627
627
|
if (!e && p.validations) {
|
628
|
-
const
|
629
|
-
t =
|
630
|
-
t.value = c, X(() => re(
|
628
|
+
const g = p.validations;
|
629
|
+
t = P({}), Le(() => {
|
630
|
+
t.value = c, X(() => re(g) ? g.call(t.value, new Fe(t.value)) : g, (y) => {
|
631
631
|
f.value = pe({
|
632
632
|
validations: y,
|
633
633
|
state: t,
|
634
634
|
childResults: h,
|
635
|
-
resultsCache:
|
635
|
+
resultsCache: $,
|
636
636
|
globalConfig: n,
|
637
637
|
instance: c,
|
638
638
|
externalResults: i || c.vuelidateExternalResults
|
@@ -642,13 +642,13 @@ function Ot(e, t) {
|
|
642
642
|
});
|
643
643
|
}), n = p.validationsConfig || n;
|
644
644
|
} else {
|
645
|
-
const
|
646
|
-
X(
|
645
|
+
const g = ce(e) || gt(e) ? e : C(e || {});
|
646
|
+
X(g, (y) => {
|
647
647
|
f.value = pe({
|
648
648
|
validations: y,
|
649
649
|
state: t,
|
650
650
|
childResults: h,
|
651
|
-
resultsCache:
|
651
|
+
resultsCache: $,
|
652
652
|
globalConfig: n,
|
653
653
|
instance: c ?? {},
|
654
654
|
externalResults: i
|
@@ -657,11 +657,11 @@ function Ot(e, t) {
|
|
657
657
|
immediate: !0
|
658
658
|
});
|
659
659
|
}
|
660
|
-
return c && (o.forEach((
|
660
|
+
return c && (o.forEach((g) => g(f, {
|
661
661
|
$registerAs: a,
|
662
662
|
$scope: s,
|
663
|
-
$stopPropagation:
|
664
|
-
})),
|
663
|
+
$stopPropagation: l
|
664
|
+
})), ge(() => m.forEach((g) => g(a)))), _(() => L(L({}, d(f.value)), h.value));
|
665
665
|
}
|
666
666
|
var T = /* @__PURE__ */ ((e) => (e.CHECKBOX = "checkbox", e.TEXT = "text", e))(T || {});
|
667
667
|
const Et = ["id", "name", "placeholder", "value"], Ct = ["id", "name", "checked", "value"], jt = ["id"], At = ["for"], Tt = /* @__PURE__ */ j({
|
@@ -679,44 +679,44 @@ const Et = ["id", "name", "placeholder", "value"], Ct = ["id", "name", "checked"
|
|
679
679
|
emits: ["change", "input"],
|
680
680
|
setup(e, { emit: t }) {
|
681
681
|
const r = e, n = t, a = () => {
|
682
|
-
|
683
|
-
}, s = (
|
684
|
-
n("input",
|
685
|
-
},
|
686
|
-
return (
|
682
|
+
l.value = !l.value, n("change", l.value.toString());
|
683
|
+
}, s = (u) => {
|
684
|
+
n("input", u.target.value);
|
685
|
+
}, l = P(r.defaultChecked), i = _(() => `pdap-${r.name}-input-error`);
|
686
|
+
return (u, c) => {
|
687
687
|
var p;
|
688
688
|
return v(), A(d(Dr), {
|
689
689
|
class: G({
|
690
690
|
"pdap-input": !0,
|
691
|
-
"pdap-input-error": Number((p =
|
691
|
+
"pdap-input-error": Number((p = u.error) == null ? void 0 : p.length) >= 1
|
692
692
|
})
|
693
693
|
}, {
|
694
694
|
default: E(() => [
|
695
|
-
|
695
|
+
u.type === d(T).TEXT ? (v(), w("input", de({
|
696
696
|
key: 0,
|
697
|
-
id:
|
697
|
+
id: u.id,
|
698
698
|
type: "text",
|
699
|
-
name:
|
700
|
-
placeholder:
|
701
|
-
value:
|
702
|
-
},
|
699
|
+
name: u.name,
|
700
|
+
placeholder: u.placeholder,
|
701
|
+
value: u.value
|
702
|
+
}, u.$attrs, { onInput: s }), null, 16, Et)) : u.type === d(T).CHECKBOX ? (v(), w("input", de({
|
703
703
|
key: 1,
|
704
|
-
id:
|
704
|
+
id: u.id,
|
705
705
|
class: "pdap-input-checkbox",
|
706
|
-
name:
|
707
|
-
checked:
|
706
|
+
name: u.name,
|
707
|
+
checked: l.value,
|
708
708
|
type: "checkbox",
|
709
|
-
value:
|
710
|
-
},
|
711
|
-
|
709
|
+
value: u.value
|
710
|
+
}, u.$attrs, { onChange: a }), null, 16, Ct)) : F("", !0),
|
711
|
+
u.error ? (v(), w("div", {
|
712
712
|
key: 2,
|
713
713
|
id: i.value,
|
714
714
|
class: "pdap-input-error-message"
|
715
|
-
}, D(
|
716
|
-
|
715
|
+
}, D(u.error), 9, jt)) : F("", !0),
|
716
|
+
x("label", {
|
717
717
|
class: "pdap-input-label",
|
718
|
-
for:
|
719
|
-
}, D(
|
718
|
+
for: u.id
|
719
|
+
}, D(u.label), 9, At)
|
720
720
|
]),
|
721
721
|
_: 1
|
722
722
|
}, 8, ["class"]);
|
@@ -737,14 +737,14 @@ function H(e) {
|
|
737
737
|
for (var t = 1; t < arguments.length; t++) {
|
738
738
|
var r = arguments[t] != null ? arguments[t] : {};
|
739
739
|
t % 2 ? Ae(Object(r), !0).forEach(function(n) {
|
740
|
-
|
740
|
+
St(e, n, r[n]);
|
741
741
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Ae(Object(r)).forEach(function(n) {
|
742
742
|
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
743
743
|
});
|
744
744
|
}
|
745
745
|
return e;
|
746
746
|
}
|
747
|
-
function
|
747
|
+
function St(e, t, r) {
|
748
748
|
return t in e ? Object.defineProperty(e, t, {
|
749
749
|
value: r,
|
750
750
|
enumerable: !0,
|
@@ -763,13 +763,13 @@ function ae(e) {
|
|
763
763
|
$validator: e
|
764
764
|
};
|
765
765
|
}
|
766
|
-
function
|
766
|
+
function It(e) {
|
767
767
|
return ne(e) && W(e.then);
|
768
768
|
}
|
769
|
-
function
|
769
|
+
function V(e) {
|
770
770
|
return typeof e == "object" ? e.$valid : e;
|
771
771
|
}
|
772
|
-
function
|
772
|
+
function q(e) {
|
773
773
|
return e.$validator || e;
|
774
774
|
}
|
775
775
|
function he(e, t) {
|
@@ -788,7 +788,7 @@ function U(e, t) {
|
|
788
788
|
const r = ae(t);
|
789
789
|
return r.$message = e, r;
|
790
790
|
}
|
791
|
-
function
|
791
|
+
function Lt(e) {
|
792
792
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
793
793
|
const r = ae(e);
|
794
794
|
return H(H({}, r), {}, {
|
@@ -796,32 +796,32 @@ function Vt(e) {
|
|
796
796
|
$watchTargets: t
|
797
797
|
});
|
798
798
|
}
|
799
|
-
function
|
799
|
+
function Vt(e) {
|
800
800
|
return {
|
801
801
|
$validator(t) {
|
802
802
|
for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++)
|
803
803
|
n[a - 1] = arguments[a];
|
804
|
-
return d(t).reduce((s,
|
805
|
-
const
|
806
|
-
let [f,
|
807
|
-
const h = e[f] || {}, o = Object.entries(h).reduce((m,
|
808
|
-
let [y,
|
809
|
-
const O = N
|
804
|
+
return d(t).reduce((s, l, i) => {
|
805
|
+
const u = Object.entries(l).reduce((c, p) => {
|
806
|
+
let [f, $] = p;
|
807
|
+
const h = e[f] || {}, o = Object.entries(h).reduce((m, g) => {
|
808
|
+
let [y, N] = g;
|
809
|
+
const O = q(N).call(this, $, l, i, ...n), z = V(O);
|
810
810
|
if (m.$data[y] = O, m.$data.$invalid = !z || !!m.$data.$invalid, m.$data.$error = m.$data.$invalid, !z) {
|
811
|
-
let
|
812
|
-
const Q =
|
813
|
-
typeof
|
811
|
+
let S = N.$message || "";
|
812
|
+
const Q = N.$params || {};
|
813
|
+
typeof S == "function" && (S = S({
|
814
814
|
$pending: !1,
|
815
815
|
$invalid: !z,
|
816
816
|
$params: Q,
|
817
|
-
$model:
|
817
|
+
$model: $,
|
818
818
|
$response: O
|
819
819
|
})), m.$errors.push({
|
820
820
|
$property: f,
|
821
|
-
$message:
|
821
|
+
$message: S,
|
822
822
|
$params: Q,
|
823
823
|
$response: O,
|
824
|
-
$model:
|
824
|
+
$model: $,
|
825
825
|
$pending: !1,
|
826
826
|
$validator: y
|
827
827
|
});
|
@@ -847,9 +847,9 @@ function St(e) {
|
|
847
847
|
$errors: {}
|
848
848
|
});
|
849
849
|
return {
|
850
|
-
$valid: s.$valid &&
|
851
|
-
$data: s.$data.concat(
|
852
|
-
$errors: s.$errors.concat(
|
850
|
+
$valid: s.$valid && u.$valid,
|
851
|
+
$data: s.$data.concat(u.$data),
|
852
|
+
$errors: s.$errors.concat(u.$errors)
|
853
853
|
};
|
854
854
|
}, {
|
855
855
|
$valid: !0,
|
@@ -888,15 +888,15 @@ function k() {
|
|
888
888
|
}
|
889
889
|
var ye = /* @__PURE__ */ Object.freeze({
|
890
890
|
__proto__: null,
|
891
|
-
forEach:
|
891
|
+
forEach: Vt,
|
892
892
|
len: ve,
|
893
893
|
normalizeValidatorObject: ae,
|
894
894
|
regex: k,
|
895
895
|
req: R,
|
896
896
|
unwrap: d,
|
897
|
-
unwrapNormalizedValidator:
|
898
|
-
unwrapValidatorResponse:
|
899
|
-
withAsync:
|
897
|
+
unwrapNormalizedValidator: q,
|
898
|
+
unwrapValidatorResponse: V,
|
899
|
+
withAsync: Lt,
|
900
900
|
withMessage: U,
|
901
901
|
withParams: he
|
902
902
|
}), kt = k(/^[a-zA-Z]*$/), zt = {
|
@@ -911,19 +911,19 @@ var ye = /* @__PURE__ */ Object.freeze({
|
|
911
911
|
$params: {
|
912
912
|
type: "alphaNum"
|
913
913
|
}
|
914
|
-
},
|
915
|
-
$validator:
|
914
|
+
}, Ft = k(/^\d*(\.\d+)?$/), qt = {
|
915
|
+
$validator: Ft,
|
916
916
|
$message: "Value must be numeric",
|
917
917
|
$params: {
|
918
918
|
type: "numeric"
|
919
919
|
}
|
920
920
|
};
|
921
|
-
function
|
921
|
+
function Nt(e, t) {
|
922
922
|
return (r) => !R(r) || (!/\s/.test(r) || r instanceof Date) && +d(e) <= +r && +d(t) >= +r;
|
923
923
|
}
|
924
924
|
function Bt(e, t) {
|
925
925
|
return {
|
926
|
-
$validator:
|
926
|
+
$validator: Nt(e, t),
|
927
927
|
$message: (r) => {
|
928
928
|
let {
|
929
929
|
$params: n
|
@@ -1052,13 +1052,13 @@ function sr(e) {
|
|
1052
1052
|
}
|
1053
1053
|
};
|
1054
1054
|
}
|
1055
|
-
const
|
1055
|
+
const Se = (e, t) => e ? !0 : R(typeof t == "string" ? t.trim() : t);
|
1056
1056
|
function or(e) {
|
1057
1057
|
return function(t, r) {
|
1058
1058
|
if (typeof e != "function")
|
1059
|
-
return
|
1059
|
+
return Se(d(e), t);
|
1060
1060
|
const n = e.call(this, t, r);
|
1061
|
-
return
|
1061
|
+
return Se(n, t);
|
1062
1062
|
};
|
1063
1063
|
}
|
1064
1064
|
function ir(e) {
|
@@ -1071,13 +1071,13 @@ function ir(e) {
|
|
1071
1071
|
}
|
1072
1072
|
};
|
1073
1073
|
}
|
1074
|
-
function
|
1074
|
+
function lr(e) {
|
1075
1075
|
return (t) => d(t) === d(e);
|
1076
1076
|
}
|
1077
|
-
function
|
1077
|
+
function ur(e) {
|
1078
1078
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "other";
|
1079
1079
|
return {
|
1080
|
-
$validator:
|
1080
|
+
$validator: lr(e),
|
1081
1081
|
$message: (r) => `The value must be equal to the ${t} value`,
|
1082
1082
|
$params: {
|
1083
1083
|
equalTo: e,
|
@@ -1098,7 +1098,7 @@ function mr(e) {
|
|
1098
1098
|
return function() {
|
1099
1099
|
for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++)
|
1100
1100
|
r[n] = arguments[n];
|
1101
|
-
return e.reduce((a, s) =>
|
1101
|
+
return e.reduce((a, s) => V(a) ? a : q(s).apply(this, r), !1);
|
1102
1102
|
};
|
1103
1103
|
}
|
1104
1104
|
function fr(e) {
|
@@ -1106,15 +1106,15 @@ function fr(e) {
|
|
1106
1106
|
for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++)
|
1107
1107
|
r[n] = arguments[n];
|
1108
1108
|
return e.reduce(async (a, s) => {
|
1109
|
-
const
|
1110
|
-
return
|
1109
|
+
const l = await a;
|
1110
|
+
return V(l) ? l : q(s).apply(this, r);
|
1111
1111
|
}, Promise.resolve(!1));
|
1112
1112
|
};
|
1113
1113
|
}
|
1114
|
-
function
|
1114
|
+
function gr() {
|
1115
1115
|
for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
|
1116
1116
|
t[r] = arguments[r];
|
1117
|
-
const n = t.some((
|
1117
|
+
const n = t.some((l) => l.$async), a = t.reduce((l, i) => i.$watchTargets ? l.concat(i.$watchTargets) : l, []);
|
1118
1118
|
let s = () => !1;
|
1119
1119
|
return t.length && (s = n ? fr(t) : mr(t)), {
|
1120
1120
|
$async: n,
|
@@ -1122,16 +1122,16 @@ function $r() {
|
|
1122
1122
|
$watchTargets: a
|
1123
1123
|
};
|
1124
1124
|
}
|
1125
|
-
function
|
1125
|
+
function $r() {
|
1126
1126
|
return he({
|
1127
1127
|
type: "or"
|
1128
|
-
}, U("The value does not match any of the provided validators",
|
1128
|
+
}, U("The value does not match any of the provided validators", gr(...arguments)));
|
1129
1129
|
}
|
1130
1130
|
function hr(e) {
|
1131
1131
|
return function() {
|
1132
1132
|
for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++)
|
1133
1133
|
r[n] = arguments[n];
|
1134
|
-
return e.reduce((a, s) =>
|
1134
|
+
return e.reduce((a, s) => V(a) ? q(s).apply(this, r) : a, !0);
|
1135
1135
|
};
|
1136
1136
|
}
|
1137
1137
|
function vr(e) {
|
@@ -1139,15 +1139,15 @@ function vr(e) {
|
|
1139
1139
|
for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++)
|
1140
1140
|
r[n] = arguments[n];
|
1141
1141
|
return e.reduce(async (a, s) => {
|
1142
|
-
const
|
1143
|
-
return
|
1142
|
+
const l = await a;
|
1143
|
+
return V(l) ? q(s).apply(this, r) : l;
|
1144
1144
|
}, Promise.resolve(!0));
|
1145
1145
|
};
|
1146
1146
|
}
|
1147
1147
|
function yr() {
|
1148
1148
|
for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
|
1149
1149
|
t[r] = arguments[r];
|
1150
|
-
const n = t.some((
|
1150
|
+
const n = t.some((l) => l.$async), a = t.reduce((l, i) => i.$watchTargets ? l.concat(i.$watchTargets) : l, []);
|
1151
1151
|
let s = () => !1;
|
1152
1152
|
return t.length && (s = n ? vr(t) : hr(t)), {
|
1153
1153
|
$async: n,
|
@@ -1160,29 +1160,29 @@ function _r() {
|
|
1160
1160
|
type: "and"
|
1161
1161
|
}, U("The value does not match all of the provided validators", yr(...arguments)));
|
1162
1162
|
}
|
1163
|
-
function
|
1163
|
+
function br(e) {
|
1164
1164
|
return function(t, r) {
|
1165
1165
|
if (!R(t))
|
1166
1166
|
return !0;
|
1167
|
-
const n =
|
1168
|
-
return
|
1167
|
+
const n = q(e).call(this, t, r);
|
1168
|
+
return It(n) ? n.then((a) => !V(a)) : !V(n);
|
1169
1169
|
};
|
1170
1170
|
}
|
1171
|
-
function
|
1171
|
+
function wr(e) {
|
1172
1172
|
return {
|
1173
|
-
$validator:
|
1173
|
+
$validator: br(e),
|
1174
1174
|
$message: "The value does not match the provided validator",
|
1175
1175
|
$params: {
|
1176
1176
|
type: "not"
|
1177
1177
|
}
|
1178
1178
|
};
|
1179
1179
|
}
|
1180
|
-
function
|
1180
|
+
function xr(e) {
|
1181
1181
|
return (t) => !R(t) || (!/\s/.test(t) || t instanceof Date) && +t >= +d(e);
|
1182
1182
|
}
|
1183
|
-
function
|
1183
|
+
function Pr(e) {
|
1184
1184
|
return {
|
1185
|
-
$validator:
|
1185
|
+
$validator: xr(e),
|
1186
1186
|
$message: (t) => {
|
1187
1187
|
let {
|
1188
1188
|
$params: r
|
@@ -1236,12 +1236,12 @@ function Tr(e) {
|
|
1236
1236
|
} = e;
|
1237
1237
|
return function(s) {
|
1238
1238
|
let {
|
1239
|
-
withArguments:
|
1239
|
+
withArguments: l = !1,
|
1240
1240
|
messagePath: i = r,
|
1241
|
-
messageParams:
|
1241
|
+
messageParams: u = n
|
1242
1242
|
} = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
1243
1243
|
function c(p) {
|
1244
|
-
return t(i(p),
|
1244
|
+
return t(i(p), u(H({
|
1245
1245
|
model: p.$model,
|
1246
1246
|
property: p.$property,
|
1247
1247
|
pending: p.$pending,
|
@@ -1251,12 +1251,12 @@ function Tr(e) {
|
|
1251
1251
|
propertyPath: p.$propertyPath
|
1252
1252
|
}, p.$params)));
|
1253
1253
|
}
|
1254
|
-
return
|
1254
|
+
return l && typeof s == "function" ? function() {
|
1255
1255
|
return U(c, s(...arguments));
|
1256
1256
|
} : U(c, s);
|
1257
1257
|
};
|
1258
1258
|
}
|
1259
|
-
const
|
1259
|
+
const qe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
1260
1260
|
__proto__: null,
|
1261
1261
|
alpha: zt,
|
1262
1262
|
alphaNum: Dt,
|
@@ -1272,50 +1272,50 @@ const Ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1272
1272
|
maxLength: er,
|
1273
1273
|
maxValue: Or,
|
1274
1274
|
minLength: rr,
|
1275
|
-
minValue:
|
1276
|
-
not:
|
1277
|
-
numeric:
|
1278
|
-
or:
|
1275
|
+
minValue: Pr,
|
1276
|
+
not: wr,
|
1277
|
+
numeric: qt,
|
1278
|
+
or: $r,
|
1279
1279
|
required: _e,
|
1280
1280
|
requiredIf: sr,
|
1281
1281
|
requiredUnless: ir,
|
1282
|
-
sameAs:
|
1282
|
+
sameAs: ur,
|
1283
1283
|
url: pr
|
1284
1284
|
}, Symbol.toStringTag, { value: "Module" }));
|
1285
|
-
function
|
1285
|
+
function Ie(e) {
|
1286
1286
|
return ["maxLength", "minLength"].includes(e);
|
1287
1287
|
}
|
1288
|
-
function
|
1288
|
+
function Sr(e, t) {
|
1289
1289
|
return {
|
1290
|
-
[e]:
|
1290
|
+
[e]: qe[e](t)
|
1291
1291
|
};
|
1292
1292
|
}
|
1293
|
-
function
|
1293
|
+
function Ir(e, t, r) {
|
1294
1294
|
return {
|
1295
|
-
[e]: ye.withMessage(r,
|
1295
|
+
[e]: ye.withMessage(r, qe[e](t))
|
1296
1296
|
};
|
1297
1297
|
}
|
1298
|
-
function
|
1298
|
+
function Lr() {
|
1299
1299
|
return { required: _e };
|
1300
1300
|
}
|
1301
|
-
function
|
1301
|
+
function Vr(e) {
|
1302
1302
|
return {
|
1303
1303
|
required: ye.withMessage(e, _e)
|
1304
1304
|
};
|
1305
1305
|
}
|
1306
1306
|
function kr(e, t) {
|
1307
|
-
if (
|
1308
|
-
return
|
1307
|
+
if (Ie(e) && typeof t.message == "string" && typeof t.value == "number")
|
1308
|
+
return Ir(
|
1309
1309
|
e,
|
1310
1310
|
t.value,
|
1311
1311
|
t.message
|
1312
1312
|
);
|
1313
|
-
if (
|
1314
|
-
return
|
1313
|
+
if (Ie(e) && typeof t.message > "u" && typeof t.value == "number")
|
1314
|
+
return Sr(e, t.value);
|
1315
1315
|
if (e === "required" && typeof t.message == "string")
|
1316
|
-
return
|
1316
|
+
return Vr(t.message);
|
1317
1317
|
if (e === "required" && typeof t.message > "u")
|
1318
|
-
return
|
1318
|
+
return Lr();
|
1319
1319
|
throw new Error("No valid rule detected");
|
1320
1320
|
}
|
1321
1321
|
const zr = {
|
@@ -1331,7 +1331,7 @@ const zr = {
|
|
1331
1331
|
},
|
1332
1332
|
emits: ["submit"],
|
1333
1333
|
setup(e, { emit: t }) {
|
1334
|
-
const r = e, n = t, a =
|
1334
|
+
const r = e, n = t, a = P(
|
1335
1335
|
r.schema.reduce((p, f) => {
|
1336
1336
|
switch (f.type) {
|
1337
1337
|
case T.CHECKBOX:
|
@@ -1342,7 +1342,7 @@ const zr = {
|
|
1342
1342
|
}
|
1343
1343
|
}, {})
|
1344
1344
|
), s = r.schema.reduce((p, f) => {
|
1345
|
-
const
|
1345
|
+
const $ = Object.entries(f.validators ?? {}).reduce(
|
1346
1346
|
(h, [o, m]) => ({
|
1347
1347
|
...h,
|
1348
1348
|
...kr(o, m)
|
@@ -1352,16 +1352,16 @@ const zr = {
|
|
1352
1352
|
return {
|
1353
1353
|
...p,
|
1354
1354
|
[f.name]: {
|
1355
|
-
|
1355
|
+
...$
|
1356
1356
|
}
|
1357
1357
|
};
|
1358
|
-
}, {}),
|
1359
|
-
function
|
1358
|
+
}, {}), l = Ot(s, a, { $autoDirty: !1, $lazy: !0 }), i = P(r.error);
|
1359
|
+
function u(p, f) {
|
1360
1360
|
a.value[p] = f;
|
1361
1361
|
}
|
1362
|
-
|
1363
|
-
r.error ? i.value = r.error : i.value &&
|
1364
|
-
}),
|
1362
|
+
xe(() => {
|
1363
|
+
r.error ? i.value = r.error : i.value && l.value.$errors.length === 0 ? i.value = null : !i.value && l.value.$errors.length > 0 && (i.value = "Please update this form to correct the errors");
|
1364
|
+
}), xe(() => {
|
1365
1365
|
console.debug(`PdapForm ${r.name}
|
1366
1366
|
`, {
|
1367
1367
|
errorMessage: i.value,
|
@@ -1369,29 +1369,29 @@ const zr = {
|
|
1369
1369
|
values: a,
|
1370
1370
|
vuelidate: {
|
1371
1371
|
rules: s,
|
1372
|
-
v$:
|
1372
|
+
v$: l
|
1373
1373
|
}
|
1374
1374
|
});
|
1375
1375
|
});
|
1376
1376
|
async function c(p) {
|
1377
|
-
if (await
|
1378
|
-
n("submit", { ...a.value }),
|
1377
|
+
if (await l.value.$validate()) {
|
1378
|
+
n("submit", { ...a.value }), l.value.$reset(), p.target.reset(), a.value = Object.entries(a.value).reduce((h, [o, m]) => ({ ...h, [o]: ["true", "false"].includes(m) ? m : "" }), {});
|
1379
1379
|
return;
|
1380
1380
|
}
|
1381
1381
|
}
|
1382
|
-
return (p, f) => (v(),
|
1382
|
+
return (p, f) => (v(), w("form", {
|
1383
1383
|
class: "pdap-form",
|
1384
|
-
onSubmit: f[0] || (f[0] = et((
|
1384
|
+
onSubmit: f[0] || (f[0] = et(($) => c($), ["prevent"]))
|
1385
1385
|
}, [
|
1386
|
-
typeof i.value == "string" ? (v(),
|
1387
|
-
(v(!0),
|
1388
|
-
var h, o, m,
|
1389
|
-
return v(), A(Tt, de((delete
|
1390
|
-
key:
|
1391
|
-
error: (h = d(
|
1392
|
-
value: a.value[
|
1393
|
-
onChange: (y) =>
|
1394
|
-
onInput: (y) =>
|
1386
|
+
typeof i.value == "string" ? (v(), w("div", zr, D(i.value), 1)) : F("", !0),
|
1387
|
+
(v(!0), w(ee, null, fe(p.schema, ($) => {
|
1388
|
+
var h, o, m, g;
|
1389
|
+
return v(), A(Tt, de((delete $.validators, $), {
|
1390
|
+
key: $.name,
|
1391
|
+
error: (h = d(l)[$.name]) != null && h.$error ? (g = (m = (o = d(l)[$.name]) == null ? void 0 : o.$errors) == null ? void 0 : m[0]) == null ? void 0 : g.$message : "",
|
1392
|
+
value: a.value[$.name],
|
1393
|
+
onChange: (y) => $.type !== d(T).TEXT ? u($.name, y) : void 0,
|
1394
|
+
onInput: (y) => $.type === d(T).TEXT ? u($.name, y) : void 0
|
1395
1395
|
}), null, 16, ["error", "value", "onChange", "onInput"]);
|
1396
1396
|
}), 128)),
|
1397
1397
|
K(p.$slots, "default")
|
@@ -1417,18 +1417,18 @@ const Dr = /* @__PURE__ */ j({
|
|
1417
1417
|
},
|
1418
1418
|
...t.templateColumns && { gridTemplateColumns: t.templateColumns }
|
1419
1419
|
});
|
1420
|
-
return (
|
1420
|
+
return (l, i) => (v(), A(me(l.component), {
|
1421
1421
|
class: G(r),
|
1422
|
-
style:
|
1422
|
+
style: $e(s)
|
1423
1423
|
}, {
|
1424
1424
|
default: E(() => [
|
1425
|
-
K(
|
1425
|
+
K(l.$slots, "default")
|
1426
1426
|
]),
|
1427
1427
|
_: 3
|
1428
1428
|
}, 8, ["class", "style"]));
|
1429
1429
|
}
|
1430
1430
|
});
|
1431
|
-
const
|
1431
|
+
const Yr = /* @__PURE__ */ j({
|
1432
1432
|
__name: "GridItem",
|
1433
1433
|
props: {
|
1434
1434
|
component: { default: "div" },
|
@@ -1447,7 +1447,7 @@ const Jr = /* @__PURE__ */ j({
|
|
1447
1447
|
});
|
1448
1448
|
return (a, s) => (v(), A(me(a.component), {
|
1449
1449
|
class: G(r),
|
1450
|
-
style:
|
1450
|
+
style: $e(n)
|
1451
1451
|
}, {
|
1452
1452
|
default: E(() => [
|
1453
1453
|
K(a.$slots, "default")
|
@@ -1456,14 +1456,14 @@ const Jr = /* @__PURE__ */ j({
|
|
1456
1456
|
}, 8, ["class", "style"]));
|
1457
1457
|
}
|
1458
1458
|
});
|
1459
|
-
const
|
1459
|
+
const Fr = /* @__PURE__ */ x("svg", {
|
1460
1460
|
xmlns: "http://www.w3.org/2000/svg",
|
1461
1461
|
viewBox: "0 0 448 512"
|
1462
1462
|
}, [
|
1463
|
-
/* @__PURE__ */
|
1464
|
-
], -1),
|
1465
|
-
|
1466
|
-
],
|
1463
|
+
/* @__PURE__ */ x("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" })
|
1464
|
+
], -1), qr = [
|
1465
|
+
Fr
|
1466
|
+
], Nr = ["aria-expanded"], Br = ["href"], Hr = /* @__PURE__ */ j({
|
1467
1467
|
__name: "PdapNav",
|
1468
1468
|
props: {
|
1469
1469
|
topPosition: {}
|
@@ -1481,104 +1481,104 @@ const qr = /* @__PURE__ */ P("svg", {
|
|
1481
1481
|
}), n = C({
|
1482
1482
|
"pdap-nav": !0
|
1483
1483
|
});
|
1484
|
-
|
1484
|
+
Le(() => {
|
1485
1485
|
a(), window.addEventListener("resize", a);
|
1486
|
-
}),
|
1486
|
+
}), ge(() => {
|
1487
1487
|
window.removeEventListener("resize", a);
|
1488
1488
|
});
|
1489
1489
|
async function a() {
|
1490
1490
|
window.innerWidth <= 1024 ? r.isMobile = !0 : r.isMobile = !1, await te();
|
1491
1491
|
}
|
1492
1492
|
async function s() {
|
1493
|
-
var i,
|
1494
|
-
const
|
1495
|
-
!r.isExpanded && r.isMobile ? (r.isExpanded = !0,
|
1493
|
+
var i, u;
|
1494
|
+
const l = document.querySelector("body");
|
1495
|
+
!r.isExpanded && r.isMobile ? (r.isExpanded = !0, l != null && l.classList.contains("lock-scroll") || (i = document.querySelector("body")) == null || i.classList.add("lock-scroll")) : r.isExpanded && r.isMobile && (r.isExpanded = !1, (u = document.querySelector("body")) == null || u.classList.remove("lock-scroll")), await te();
|
1496
1496
|
}
|
1497
|
-
return (
|
1498
|
-
|
1497
|
+
return (l, i) => (v(), w(ee, null, [
|
1498
|
+
x("div", {
|
1499
1499
|
"aria-controls": "nav",
|
1500
1500
|
class: "pdap-nav-open-button",
|
1501
1501
|
role: "button",
|
1502
1502
|
onClick: s
|
1503
|
-
},
|
1504
|
-
|
1503
|
+
}, qr),
|
1504
|
+
x("nav", {
|
1505
1505
|
id: "nav",
|
1506
1506
|
"aria-expanded": r.isMobile && r.isExpanded || !r.isMobile,
|
1507
1507
|
class: G(n),
|
1508
|
-
style:
|
1508
|
+
style: $e(r.isMobile ? { top: `${l.topPosition}px` } : {})
|
1509
1509
|
}, [
|
1510
|
-
(v(!0),
|
1511
|
-
key:
|
1510
|
+
(v(!0), w(ee, null, fe(d(t), (u) => (v(), w("li", {
|
1511
|
+
key: u.text,
|
1512
1512
|
class: "pdap-nav-link-container"
|
1513
1513
|
}, [
|
1514
|
-
|
1514
|
+
u.href ? (v(), w("a", {
|
1515
1515
|
key: 0,
|
1516
1516
|
class: "pdap-nav-link",
|
1517
|
-
href:
|
1517
|
+
href: u.href,
|
1518
1518
|
target: "_blank",
|
1519
1519
|
referrerpolicy: "no-referrer",
|
1520
1520
|
onClick: s
|
1521
|
-
}, D(
|
1522
|
-
|
1521
|
+
}, D(u.text), 9, Br)) : F("", !0),
|
1522
|
+
u.path ? (v(), A(d(Ve), {
|
1523
1523
|
key: 1,
|
1524
1524
|
"active-class": "pdap-nav-link-current",
|
1525
1525
|
"exact-active-class": "pdap-nav-link-current-exact",
|
1526
1526
|
class: "pdap-nav-link",
|
1527
|
-
to:
|
1527
|
+
to: u.path,
|
1528
1528
|
onClick: s
|
1529
1529
|
}, {
|
1530
1530
|
default: E(() => [
|
1531
|
-
B(D(
|
1531
|
+
B(D(u.text), 1)
|
1532
1532
|
]),
|
1533
1533
|
_: 2
|
1534
|
-
}, 1032, ["to"])) :
|
1534
|
+
}, 1032, ["to"])) : F("", !0)
|
1535
1535
|
]))), 128))
|
1536
|
-
], 14,
|
1536
|
+
], 14, Nr)
|
1537
1537
|
], 64));
|
1538
1538
|
}
|
1539
1539
|
});
|
1540
|
-
const Gr = ["href"], Xr = ["src"], Wr = ["src"],
|
1540
|
+
const Gr = ["href"], Xr = ["src"], Wr = ["src"], en = /* @__PURE__ */ j({
|
1541
1541
|
__name: "PdapHeader",
|
1542
1542
|
props: {
|
1543
1543
|
logoImageSrc: { default: "node_modules/pdap-design-system/dist/images/lockup.svg" },
|
1544
1544
|
logoImageAnchorPath: { default: "/" }
|
1545
1545
|
},
|
1546
1546
|
setup(e) {
|
1547
|
-
const t = e, r =
|
1547
|
+
const t = e, r = P(), n = P(null), a = t.logoImageAnchorPath.startsWith("/");
|
1548
1548
|
tt(() => {
|
1549
1549
|
s(), window.addEventListener("resize", s);
|
1550
|
-
}),
|
1550
|
+
}), ge(() => {
|
1551
1551
|
window.removeEventListener("resize", s);
|
1552
1552
|
});
|
1553
1553
|
function s() {
|
1554
1554
|
n.value && (r.value = n.value.offsetHeight);
|
1555
1555
|
}
|
1556
|
-
return (
|
1556
|
+
return (l, i) => (v(), w("header", {
|
1557
1557
|
ref_key: "el",
|
1558
1558
|
ref: n,
|
1559
1559
|
class: "pdap-header"
|
1560
1560
|
}, [
|
1561
|
-
d(a) ? (v(), A(d(
|
1561
|
+
d(a) ? (v(), A(d(Ve), {
|
1562
1562
|
key: 1,
|
1563
|
-
to:
|
1563
|
+
to: l.logoImageAnchorPath,
|
1564
1564
|
class: "logo"
|
1565
1565
|
}, {
|
1566
1566
|
default: E(() => [
|
1567
|
-
|
1568
|
-
src:
|
1567
|
+
x("img", {
|
1568
|
+
src: l.logoImageSrc,
|
1569
1569
|
loading: "lazy",
|
1570
1570
|
width: "250",
|
1571
1571
|
alt: "Police Data Accessibility Project Logo"
|
1572
1572
|
}, null, 8, Wr)
|
1573
1573
|
]),
|
1574
1574
|
_: 1
|
1575
|
-
}, 8, ["to"])) : (v(),
|
1575
|
+
}, 8, ["to"])) : (v(), w("a", {
|
1576
1576
|
key: 0,
|
1577
|
-
href:
|
1577
|
+
href: l.logoImageAnchorPath,
|
1578
1578
|
class: "logo"
|
1579
1579
|
}, [
|
1580
|
-
|
1581
|
-
src:
|
1580
|
+
x("img", {
|
1581
|
+
src: l.logoImageSrc,
|
1582
1582
|
loading: "lazy",
|
1583
1583
|
width: "250",
|
1584
1584
|
alt: "Police Data Accessibility Project Logo"
|
@@ -1588,7 +1588,7 @@ const Gr = ["href"], Xr = ["src"], Wr = ["src"], Yr = /* @__PURE__ */ j({
|
|
1588
1588
|
], 512));
|
1589
1589
|
}
|
1590
1590
|
});
|
1591
|
-
const
|
1591
|
+
const tn = /* @__PURE__ */ j({
|
1592
1592
|
__name: "QuickSearchForm",
|
1593
1593
|
props: {
|
1594
1594
|
mode: { default: "prod" }
|
@@ -1611,21 +1611,21 @@ const en = /* @__PURE__ */ j({
|
|
1611
1611
|
placeholder: "Enter a state, county, municipality, or 'all'",
|
1612
1612
|
value: ""
|
1613
1613
|
}
|
1614
|
-
], a =
|
1615
|
-
function s(
|
1616
|
-
if (Object.values(
|
1614
|
+
], a = P(void 0);
|
1615
|
+
function s(l) {
|
1616
|
+
if (Object.values(l).every((c) => !c)) {
|
1617
1617
|
a.value = "Either a search term or a location is required.";
|
1618
1618
|
return;
|
1619
1619
|
}
|
1620
|
-
let { location: i, searchTerm:
|
1621
|
-
if (i = i && i.length > 0 ? i : "all",
|
1622
|
-
t.push(`/search/${
|
1620
|
+
let { location: i, searchTerm: u } = l;
|
1621
|
+
if (i = i && i.length > 0 ? i : "all", u = u && u.length > 0 ? u : "all", t.getRoutes().some((c) => c.path.includes("/search/")))
|
1622
|
+
t.push(`/search/${u}/${i}`);
|
1623
1623
|
else {
|
1624
1624
|
const c = r.mode === "prod" ? "https://data-sources.pdap.io" : "https://data-sources.pdap.dev";
|
1625
|
-
window.location.assign(`${c}/search/${
|
1625
|
+
window.location.assign(`${c}/search/${u}/${i}`);
|
1626
1626
|
}
|
1627
1627
|
}
|
1628
|
-
return (
|
1628
|
+
return (l, i) => (v(), A(ke, {
|
1629
1629
|
alignment: "center",
|
1630
1630
|
component: "div",
|
1631
1631
|
class: "pdap-quick-search-form"
|
@@ -1654,31 +1654,113 @@ const en = /* @__PURE__ */ j({
|
|
1654
1654
|
}));
|
1655
1655
|
}
|
1656
1656
|
});
|
1657
|
-
const Ur = ["alt", "src"],
|
1657
|
+
const Ur = ["alt", "src"], rn = /* @__PURE__ */ j({
|
1658
1658
|
__name: "TileIcon",
|
1659
1659
|
props: {
|
1660
1660
|
imgAltText: {},
|
1661
1661
|
imgSrc: {}
|
1662
1662
|
},
|
1663
1663
|
setup(e) {
|
1664
|
-
return (t, r) => (v(),
|
1664
|
+
return (t, r) => (v(), w("img", {
|
1665
1665
|
class: "pdap-tile-icon",
|
1666
1666
|
alt: t.imgAltText,
|
1667
1667
|
src: t.imgSrc
|
1668
1668
|
}, null, 8, Ur));
|
1669
1669
|
}
|
1670
1670
|
});
|
1671
|
+
const Kr = {
|
1672
|
+
content: ["./src/**/*.vue", "./src/**/*.css"],
|
1673
|
+
theme: {
|
1674
|
+
// Nested within "extend" - extends tailwind theme defaults, only overrides properties named here
|
1675
|
+
extend: {
|
1676
|
+
colors: {
|
1677
|
+
brand: {
|
1678
|
+
blue: {
|
1679
|
+
light: "rgba(var(--color-brand-blue-light)/<alpha-value>)",
|
1680
|
+
medium: "rgba(var(--color-brand-blue-medium)/<alpha-value>)"
|
1681
|
+
},
|
1682
|
+
gold: "rgba(var(--color-brand-gold)/<alpha-value>)",
|
1683
|
+
wine: "rgba(var(--color-brand-wine)/<alpha-value>)"
|
1684
|
+
},
|
1685
|
+
neutral: {
|
1686
|
+
50: "rgba(var(--color-neutral-50)/<alpha-value>)",
|
1687
|
+
100: "rgba(var(--color-neutral-100)/<alpha-value>)",
|
1688
|
+
200: "rgba(var(--color-neutral-200)/<alpha-value>)",
|
1689
|
+
300: "rgba(var(--color-neutral-300)/<alpha-value>)",
|
1690
|
+
400: "rgba(var(--color-neutral-400)/<alpha-value>)",
|
1691
|
+
500: "rgba(var(--color-neutral-500)/<alpha-value>)",
|
1692
|
+
600: "rgba(var(--color-neutral-600)/<alpha-value>)",
|
1693
|
+
700: "rgba(var(--color-neutral-700)/<alpha-value>)",
|
1694
|
+
800: "rgba(var(--color-neutral-800)/<alpha-value>)",
|
1695
|
+
900: "rgba(var(--color-neutral-900)/<alpha-value>)",
|
1696
|
+
950: "rgba(var(--color-neutral-950)/<alpha-value>)"
|
1697
|
+
}
|
1698
|
+
},
|
1699
|
+
brightness: {
|
1700
|
+
85: ".85"
|
1701
|
+
},
|
1702
|
+
maxWidth: {
|
1703
|
+
"4xl": "59rem"
|
1704
|
+
},
|
1705
|
+
screens: {
|
1706
|
+
xs: "500px"
|
1707
|
+
}
|
1708
|
+
},
|
1709
|
+
// Using properties directly - overrides tailwind theme defaults for entire section
|
1710
|
+
fontFamily: {
|
1711
|
+
sans: [
|
1712
|
+
'"Libre Franklin"',
|
1713
|
+
"ui-sans-serif",
|
1714
|
+
"system-ui",
|
1715
|
+
"-apple-system",
|
1716
|
+
"BlinkMacSystemFont",
|
1717
|
+
'"Segoe UI"',
|
1718
|
+
"Roboto",
|
1719
|
+
"Oxygen",
|
1720
|
+
"Ubuntu",
|
1721
|
+
"Cantarell",
|
1722
|
+
'"Fira Sans"',
|
1723
|
+
'"Droid Sans"',
|
1724
|
+
'"Helvetica Neue"',
|
1725
|
+
"sans-serif"
|
1726
|
+
],
|
1727
|
+
serif: ["ui-serif", "Georgia"],
|
1728
|
+
mono: [
|
1729
|
+
'"Source Code Pro"',
|
1730
|
+
"monospace",
|
1731
|
+
"ui-monospace",
|
1732
|
+
"SFMono-Regular"
|
1733
|
+
]
|
1734
|
+
},
|
1735
|
+
fontSize: {
|
1736
|
+
xs: "0.75rem",
|
1737
|
+
sm: "0.875rem",
|
1738
|
+
med: "1rem",
|
1739
|
+
lg: "1.125rem",
|
1740
|
+
xl: "1.25rem",
|
1741
|
+
"2xl": "1.5rem",
|
1742
|
+
"3xl": "1.75rem",
|
1743
|
+
"4xl": "2rem",
|
1744
|
+
"5xl": "2.625rem",
|
1745
|
+
"6xl": "3rem"
|
1746
|
+
}
|
1747
|
+
}
|
1748
|
+
}, nn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
1749
|
+
__proto__: null,
|
1750
|
+
default: Kr
|
1751
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
1671
1752
|
export {
|
1672
1753
|
nt as Button,
|
1673
1754
|
ke as FlexContainer,
|
1674
|
-
|
1755
|
+
Jr as Footer,
|
1675
1756
|
Mr as Form,
|
1676
1757
|
Dr as GridContainer,
|
1677
|
-
|
1678
|
-
|
1758
|
+
Yr as GridItem,
|
1759
|
+
en as Header,
|
1679
1760
|
Tt as Input,
|
1680
1761
|
Hr as Nav,
|
1681
1762
|
T as PdapInputTypes,
|
1682
|
-
|
1683
|
-
|
1763
|
+
tn as QuickSearchForm,
|
1764
|
+
rn as TileIcon,
|
1765
|
+
nn as tailwindConfig
|
1684
1766
|
};
|