@kiva/kv-components 10.5.0 → 10.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +271 -271
- package/dist/vue/KvClassicLoanCard.js +295 -252
- package/dist/vue/KvClassicLoanCard2.js +252 -295
- package/dist/vue/KvCompactLoanCard.js +380 -416
- package/dist/vue/KvCompactLoanCard2.js +416 -380
- package/dist/vue/KvIntroductionLoanCard.js +220 -247
- package/dist/vue/KvIntroductionLoanCard2.js +247 -220
- package/dist/vue/KvLendCta.js +389 -355
- package/dist/vue/KvLendCta2.js +355 -389
- package/dist/vue/KvLightbox.js +17 -17
- package/dist/vue/KvLightbox.vue.d.ts +21 -0
- package/dist/vue/KvLightbox2.js +75 -45
- package/dist/vue/KvLoanActivities.js +149 -75
- package/dist/vue/KvLoanActivities.vue.d.ts +21 -0
- package/dist/vue/KvLoanActivities2.js +75 -149
- package/dist/vue/KvLoanBookmark.js +33 -22
- package/dist/vue/KvLoanBookmark2.js +22 -33
- package/dist/vue/KvLoanInfoCard.js +2 -2
- package/dist/vue/KvLoanTag.js +123 -44
- package/dist/vue/KvLoanTag2.js +44 -123
- package/dist/vue/KvLoanUse.js +111 -14
- package/dist/vue/KvLoanUse2.js +14 -111
- package/dist/vue/KvPieChartV2.vue.d.ts +21 -0
- package/dist/vue/KvVotingCardV2.vue.d.ts +21 -0
- package/dist/vue/KvWideLoanCard.js +232 -206
- package/dist/vue/KvWideLoanCard2.js +206 -232
- package/dist/vue/KvWwwHeader/KvHeaderLinkBar2.js +1 -1
- package/dist/vue/KvWwwHeaderBasic/LinkBar2.js +1 -1
- package/package.json +8 -4
package/dist/vue/KvLightbox.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import v from "./KvLightbox2.js";
|
|
2
|
-
import { resolveComponent as f, openBlock as n, createBlock as x, Transition as b, withCtx as u, withDirectives as h, createElementVNode as o, withModifiers as
|
|
2
|
+
import { resolveComponent as f, openBlock as n, createBlock as x, Transition as b, withCtx as u, withDirectives as h, createElementVNode as o, withModifiers as s, createElementBlock as w, createCommentVNode as r, normalizeClass as d, renderSlot as c, toDisplayString as k, createVNode as y, vShow as g } from "vue";
|
|
3
3
|
import C from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
const _ = ["aria-label", "aria-describedby", "role"], p = { class: "tw-flex tw-p-2.5 md:tw-px-4 md:tw-pt-4 md:tw-pb-3.5" }, B = { class: "tw-flex-grow" }, S = { class: "tw-flex-1" }, L = {
|
|
5
5
|
id: "kvLightboxBody",
|
|
@@ -23,16 +23,16 @@ function V(i, e, t, l, j, z) {
|
|
|
23
23
|
default: u(() => [
|
|
24
24
|
h(o("div", {
|
|
25
25
|
class: "tw-z-modal tw-fixed tw-inset-0 tw-bg-black tw-bg-opacity-[75%]",
|
|
26
|
-
onClick: e[3] || (e[3] =
|
|
26
|
+
onClick: e[3] || (e[3] = s((...a) => l.onScreenClick && l.onScreenClick(...a), ["stop", "prevent"]))
|
|
27
27
|
}, [
|
|
28
28
|
o("div", null, [
|
|
29
|
-
t.blurBackground ? (n(),
|
|
29
|
+
t.blurBackground ? (n(), w("div", {
|
|
30
30
|
key: 0,
|
|
31
31
|
class: "tw-fixed tw-inset-0 tw-w-full tw-h-full tw-backdrop-blur-sm",
|
|
32
|
-
onClick: e[0] || (e[0] =
|
|
33
|
-
})) :
|
|
32
|
+
onClick: e[0] || (e[0] = s((...a) => l.onScreenClick && l.onScreenClick(...a), ["stop", "prevent"]))
|
|
33
|
+
})) : r("", !0),
|
|
34
34
|
o("div", {
|
|
35
|
-
class:
|
|
35
|
+
class: d(["tw-flex tw-absolute tw-inset-0", {
|
|
36
36
|
"md:tw-px-2": t.variant === "lightbox",
|
|
37
37
|
"tw-px-2": t.variant === "alert"
|
|
38
38
|
}])
|
|
@@ -41,7 +41,7 @@ function V(i, e, t, l, j, z) {
|
|
|
41
41
|
ref: "kvLightbox",
|
|
42
42
|
tabindex: "-1",
|
|
43
43
|
"data-test": "kv-lightbox",
|
|
44
|
-
class:
|
|
44
|
+
class: d(["tw-bg-primary tw-flex tw-flex-col tw-mx-auto md:tw-my-auto", {
|
|
45
45
|
"tw-w-full md:tw-w-auto": t.variant === "lightbox",
|
|
46
46
|
"tw-mt-auto md:tw-my-auto": t.variant === "lightbox",
|
|
47
47
|
"tw-min-h-half-screen md:tw-min-h-0": t.variant === "lightbox",
|
|
@@ -53,33 +53,33 @@ function V(i, e, t, l, j, z) {
|
|
|
53
53
|
"aria-label": t.title ? t.title : null,
|
|
54
54
|
"aria-describedby": t.variant === "alert" ? "kvLightboxBody" : null,
|
|
55
55
|
role: l.role,
|
|
56
|
-
onClick: e[2] || (e[2] =
|
|
56
|
+
onClick: e[2] || (e[2] = s(() => {
|
|
57
57
|
}, ["stop"]))
|
|
58
58
|
}, [
|
|
59
59
|
o("div", p, [
|
|
60
60
|
o("div", B, [
|
|
61
|
-
|
|
61
|
+
c(i.$slots, "header", {}, () => [
|
|
62
62
|
o("h2", S, k(t.title), 1)
|
|
63
63
|
])
|
|
64
64
|
]),
|
|
65
|
-
t.preventClose ?
|
|
65
|
+
t.preventClose ? r("", !0) : (n(), w("button", {
|
|
66
66
|
key: 0,
|
|
67
|
-
class: "tw-grid tw-content-center tw-justify-center tw-ml-auto tw-w-6 tw-h-6 tw--m-2 hover:tw-text-action-highlight",
|
|
68
|
-
onClick: e[1] || (e[1] =
|
|
67
|
+
class: d(["tw-grid tw-content-center tw-justify-center tw-ml-auto tw-w-6 tw-h-6 tw--m-2 hover:tw-text-action-highlight", l.closeButtonClasses]),
|
|
68
|
+
onClick: e[1] || (e[1] = s((a) => l.hide("close-x"), ["stop"]))
|
|
69
69
|
}, [
|
|
70
70
|
y(m, {
|
|
71
71
|
class: "tw-w-3 tw-h-3",
|
|
72
72
|
icon: l.mdiClose
|
|
73
73
|
}, null, 8, ["icon"]),
|
|
74
74
|
e[4] || (e[4] = o("span", { class: "tw-sr-only" }, "Close", -1))
|
|
75
|
-
]))
|
|
75
|
+
], 2))
|
|
76
76
|
]),
|
|
77
77
|
o("div", L, [
|
|
78
|
-
|
|
78
|
+
c(i.$slots, "default")
|
|
79
79
|
], 512),
|
|
80
|
-
i.$slots.controls ? (n(),
|
|
81
|
-
|
|
82
|
-
], 512)) :
|
|
80
|
+
i.$slots.controls ? (n(), w("div", N, [
|
|
81
|
+
c(i.$slots, "controls")
|
|
82
|
+
], 512)) : r("", !0)
|
|
83
83
|
], 10, _)
|
|
84
84
|
], 2)
|
|
85
85
|
])
|
|
@@ -20,6 +20,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
20
20
|
type: BooleanConstructor;
|
|
21
21
|
default: boolean;
|
|
22
22
|
};
|
|
23
|
+
preventBackgroundClose: {
|
|
24
|
+
type: BooleanConstructor;
|
|
25
|
+
default: boolean;
|
|
26
|
+
};
|
|
27
|
+
closeButtonShowDelay: {
|
|
28
|
+
type: NumberConstructor;
|
|
29
|
+
default: number;
|
|
30
|
+
};
|
|
23
31
|
}>, {
|
|
24
32
|
mdiClose: string;
|
|
25
33
|
role: import('vue').ComputedRef<"alertdialog" | "dialog">;
|
|
@@ -30,6 +38,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
30
38
|
hide: (closedBy?: string) => void;
|
|
31
39
|
show: () => void;
|
|
32
40
|
controlsRef: import('vue').Ref<any, any>;
|
|
41
|
+
closeButtonClasses: import('vue').ComputedRef<(string | {
|
|
42
|
+
'tw-invisible tw-opacity-0': boolean;
|
|
43
|
+
})[]>;
|
|
33
44
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "lightbox-closed"[], "lightbox-closed", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
34
45
|
blurBackground: {
|
|
35
46
|
type: BooleanConstructor;
|
|
@@ -52,6 +63,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
52
63
|
type: BooleanConstructor;
|
|
53
64
|
default: boolean;
|
|
54
65
|
};
|
|
66
|
+
preventBackgroundClose: {
|
|
67
|
+
type: BooleanConstructor;
|
|
68
|
+
default: boolean;
|
|
69
|
+
};
|
|
70
|
+
closeButtonShowDelay: {
|
|
71
|
+
type: NumberConstructor;
|
|
72
|
+
default: number;
|
|
73
|
+
};
|
|
55
74
|
}>> & Readonly<{
|
|
56
75
|
"onLightbox-closed"?: (...args: any[]) => any;
|
|
57
76
|
}>, {
|
|
@@ -59,6 +78,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
59
78
|
visible: boolean;
|
|
60
79
|
preventClose: boolean;
|
|
61
80
|
blurBackground: boolean;
|
|
81
|
+
preventBackgroundClose: boolean;
|
|
82
|
+
closeButtonShowDelay: number;
|
|
62
83
|
}, {}, {
|
|
63
84
|
KvMaterialIcon: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
64
85
|
icon: {
|
package/dist/vue/KvLightbox2.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { toRefs as
|
|
2
|
-
import { mdiClose as
|
|
3
|
-
import { useFocusTrap as
|
|
4
|
-
import { hideOthers as
|
|
5
|
-
import { lockScroll as
|
|
6
|
-
import { lockPrintSingleEl as
|
|
7
|
-
import
|
|
8
|
-
const
|
|
1
|
+
import { toRefs as L, ref as o, nextTick as b, computed as p, watch as T, onMounted as P, onBeforeUnmount as q } from "vue";
|
|
2
|
+
import { mdiClose as I } from "@mdi/js";
|
|
3
|
+
import { useFocusTrap as K } from "@vueuse/integrations/useFocusTrap";
|
|
4
|
+
import { hideOthers as M } from "../vendor/aria-hidden/dist/es2015/index.js";
|
|
5
|
+
import { lockScroll as O, unlockScroll as R } from "../utils/scrollLock.js";
|
|
6
|
+
import { lockPrintSingleEl as U, unlockPrintSingleEl as _ } from "../utils/printing.js";
|
|
7
|
+
import N from "./KvMaterialIcon.js";
|
|
8
|
+
const Q = {
|
|
9
9
|
components: {
|
|
10
|
-
KvMaterialIcon:
|
|
10
|
+
KvMaterialIcon: N
|
|
11
11
|
},
|
|
12
12
|
props: {
|
|
13
13
|
/**
|
|
@@ -31,8 +31,8 @@ const A = {
|
|
|
31
31
|
variant: {
|
|
32
32
|
type: String,
|
|
33
33
|
default: "lightbox",
|
|
34
|
-
validator(
|
|
35
|
-
return ["lightbox", "alert"].includes(
|
|
34
|
+
validator(f) {
|
|
35
|
+
return ["lightbox", "alert"].includes(f);
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
/**
|
|
@@ -50,23 +50,41 @@ const A = {
|
|
|
50
50
|
preventClose: {
|
|
51
51
|
type: Boolean,
|
|
52
52
|
default: !1
|
|
53
|
+
},
|
|
54
|
+
/**
|
|
55
|
+
* Clicking the screen behind the dialog does not close it. The close X button and
|
|
56
|
+
* pressing ESC still close it.
|
|
57
|
+
* */
|
|
58
|
+
preventBackgroundClose: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: !1
|
|
61
|
+
},
|
|
62
|
+
/**
|
|
63
|
+
* Milliseconds to keep the close X button hidden each time the dialog opens, after
|
|
64
|
+
* which it fades in. Pressing ESC still closes the dialog during the delay.
|
|
65
|
+
* */
|
|
66
|
+
closeButtonShowDelay: {
|
|
67
|
+
type: Number,
|
|
68
|
+
default: 0
|
|
53
69
|
}
|
|
54
70
|
},
|
|
55
71
|
emits: [
|
|
56
72
|
"lightbox-closed"
|
|
57
73
|
],
|
|
58
|
-
setup(
|
|
74
|
+
setup(f, { emit: C }) {
|
|
59
75
|
const {
|
|
60
|
-
visible:
|
|
61
|
-
variant:
|
|
62
|
-
preventClose:
|
|
63
|
-
|
|
64
|
-
|
|
76
|
+
visible: n,
|
|
77
|
+
variant: m,
|
|
78
|
+
preventClose: y,
|
|
79
|
+
preventBackgroundClose: w,
|
|
80
|
+
closeButtonShowDelay: k
|
|
81
|
+
} = L(f), u = o(null), t = o(null), g = o(null), r = o(null), i = o(null);
|
|
82
|
+
b(() => {
|
|
65
83
|
const {
|
|
66
84
|
activate: e,
|
|
67
85
|
deactivate: l
|
|
68
|
-
} =
|
|
69
|
-
|
|
86
|
+
} = K([
|
|
87
|
+
u.value,
|
|
70
88
|
// This lightbox
|
|
71
89
|
'[role="alert"]'
|
|
72
90
|
// Any open toasts/alerts on the page
|
|
@@ -74,44 +92,56 @@ const A = {
|
|
|
74
92
|
allowOutsideClick: !0
|
|
75
93
|
// allow clicking outside the lightbox to close it
|
|
76
94
|
});
|
|
77
|
-
|
|
95
|
+
r.value = e, i.value = l;
|
|
78
96
|
});
|
|
79
|
-
let c = null,
|
|
80
|
-
const
|
|
97
|
+
let s = null, c = null, h = null;
|
|
98
|
+
const v = o(!1), B = p(() => k.value > 0), S = p(() => B.value ? [
|
|
99
|
+
"tw-transition-opacity tw-duration-500 motion-reduce:tw-transition-none",
|
|
100
|
+
{ "tw-invisible tw-opacity-0": !v.value }
|
|
101
|
+
] : null), x = () => {
|
|
102
|
+
if (!B.value) {
|
|
103
|
+
v.value = !0;
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
v.value = !1, h = setTimeout(() => {
|
|
107
|
+
v.value = !0;
|
|
108
|
+
}, k.value);
|
|
109
|
+
}, E = p(() => m.value === "alert" ? "alertdialog" : "dialog"), a = (e = "") => {
|
|
81
110
|
var l;
|
|
82
|
-
|
|
111
|
+
clearTimeout(h), u.value && t.value && ((l = i.value) == null || l.call(i), t.value.scrollTop = 0, _(t.value)), R(), s && (s(), s = null), document.removeEventListener("keyup", c), n.value && C("lightbox-closed", { type: e });
|
|
83
112
|
};
|
|
84
|
-
|
|
85
|
-
e && e.key === "Escape" && !
|
|
113
|
+
c = (e) => {
|
|
114
|
+
e && e.key === "Escape" && !y.value && a();
|
|
86
115
|
};
|
|
87
|
-
const
|
|
88
|
-
|
|
89
|
-
},
|
|
90
|
-
|
|
116
|
+
const D = () => {
|
|
117
|
+
y.value || w.value || a("background-click");
|
|
118
|
+
}, d = () => {
|
|
119
|
+
n.value && (x(), document.addEventListener("keyup", c), b(() => {
|
|
91
120
|
var e;
|
|
92
|
-
if (
|
|
93
|
-
const l =
|
|
121
|
+
if (u.value && t.value && ((e = r.value) == null || e.call(r), s = M(u.value), U(t.value)), O(), m.value === "alert") {
|
|
122
|
+
const l = g.value.querySelector("button");
|
|
94
123
|
l && l.focus();
|
|
95
124
|
}
|
|
96
125
|
}));
|
|
97
126
|
};
|
|
98
|
-
return
|
|
99
|
-
|
|
100
|
-
}),
|
|
101
|
-
|
|
102
|
-
}),
|
|
103
|
-
mdiClose:
|
|
104
|
-
role:
|
|
105
|
-
kvLightbox:
|
|
127
|
+
return T(n, () => {
|
|
128
|
+
n.value ? d() : a();
|
|
129
|
+
}), P(() => {
|
|
130
|
+
n.value && d();
|
|
131
|
+
}), q(() => a()), {
|
|
132
|
+
mdiClose: I,
|
|
133
|
+
role: E,
|
|
134
|
+
kvLightbox: u,
|
|
106
135
|
kvLightboxBody: t,
|
|
107
|
-
onKeyUp:
|
|
108
|
-
onScreenClick:
|
|
109
|
-
hide:
|
|
110
|
-
show:
|
|
111
|
-
controlsRef:
|
|
136
|
+
onKeyUp: c,
|
|
137
|
+
onScreenClick: D,
|
|
138
|
+
hide: a,
|
|
139
|
+
show: d,
|
|
140
|
+
controlsRef: g,
|
|
141
|
+
closeButtonClasses: S
|
|
112
142
|
};
|
|
113
143
|
}
|
|
114
144
|
};
|
|
115
145
|
export {
|
|
116
|
-
|
|
146
|
+
Q as default
|
|
117
147
|
};
|
|
@@ -1,77 +1,151 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import "
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
1
|
+
import { toRefs as f, ref as v, computed as n } from "vue";
|
|
2
|
+
import { gql as p } from "@apollo/client/core";
|
|
3
|
+
import { format as y } from "date-fns";
|
|
4
|
+
import A from "numeral";
|
|
5
|
+
import g from "./KvActivityRow.js";
|
|
6
|
+
import b from "./KvLightbox.js";
|
|
7
|
+
import F from "./KvLendCta2.js";
|
|
8
|
+
const O = p`
|
|
9
|
+
fragment KvLoanActivities on LoanBasic {
|
|
10
|
+
id
|
|
11
|
+
name
|
|
12
|
+
lenders(limit: 0) {
|
|
13
|
+
totalCount
|
|
14
|
+
}
|
|
15
|
+
loanFundraisingInfo {
|
|
16
|
+
id
|
|
17
|
+
fundedAmount
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
`, _ = {
|
|
21
|
+
name: "KvLoanActivities",
|
|
22
|
+
components: {
|
|
23
|
+
KvActivityRow: g,
|
|
24
|
+
KvLightbox: b,
|
|
25
|
+
KvLendCta: F
|
|
26
|
+
},
|
|
27
|
+
props: {
|
|
28
|
+
/**
|
|
29
|
+
* loan object coming from parent component
|
|
30
|
+
*/
|
|
31
|
+
loan: {
|
|
32
|
+
type: Object,
|
|
33
|
+
default: () => ({})
|
|
34
|
+
},
|
|
35
|
+
/**
|
|
36
|
+
* loan combined activities coming from parent component
|
|
37
|
+
*/
|
|
38
|
+
combinedActivities: {
|
|
39
|
+
type: Array,
|
|
40
|
+
default: () => []
|
|
41
|
+
},
|
|
42
|
+
/**
|
|
43
|
+
* isAdding flag coming from parent add to basket method
|
|
44
|
+
*/
|
|
45
|
+
isAdding: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: !1
|
|
48
|
+
},
|
|
49
|
+
/**
|
|
50
|
+
* basketItems array coming from parent component
|
|
51
|
+
*/
|
|
52
|
+
basketItems: {
|
|
53
|
+
type: Array,
|
|
54
|
+
default: () => []
|
|
55
|
+
},
|
|
56
|
+
/**
|
|
57
|
+
* userBalance string coming from parent component
|
|
58
|
+
*/
|
|
59
|
+
userBalance: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: void 0
|
|
62
|
+
},
|
|
63
|
+
/**
|
|
64
|
+
* errorMsg string coming from parent add to basket method
|
|
65
|
+
*/
|
|
66
|
+
errorMsg: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: void 0
|
|
69
|
+
},
|
|
70
|
+
/**
|
|
71
|
+
* kvTrackFunction function to track events from LendCta component
|
|
72
|
+
*/
|
|
73
|
+
kvTrackFunction: {
|
|
74
|
+
type: Function,
|
|
75
|
+
required: !0
|
|
76
|
+
},
|
|
77
|
+
/**
|
|
78
|
+
* getCookie function for LendCta component
|
|
79
|
+
*/
|
|
80
|
+
getCookie: {
|
|
81
|
+
type: Function,
|
|
82
|
+
default: void 0
|
|
83
|
+
},
|
|
84
|
+
/**
|
|
85
|
+
* setCookie function for LendCta component
|
|
86
|
+
*/
|
|
87
|
+
setCookie: {
|
|
88
|
+
type: Function,
|
|
89
|
+
default: void 0
|
|
90
|
+
},
|
|
91
|
+
/**
|
|
92
|
+
* route object for LendCta component
|
|
93
|
+
*/
|
|
94
|
+
route: {
|
|
95
|
+
type: Object,
|
|
96
|
+
default: void 0
|
|
97
|
+
},
|
|
98
|
+
enableFiveDollarsNotes: {
|
|
99
|
+
type: Boolean,
|
|
100
|
+
default: !1
|
|
101
|
+
},
|
|
102
|
+
isVisitor: {
|
|
103
|
+
type: Boolean,
|
|
104
|
+
default: !0
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
emits: [
|
|
108
|
+
"add-to-basket"
|
|
109
|
+
],
|
|
110
|
+
setup(r) {
|
|
111
|
+
const {
|
|
112
|
+
loan: a,
|
|
113
|
+
combinedActivities: l,
|
|
114
|
+
kvTrackFunction: s
|
|
115
|
+
} = f(r), i = v(!1), u = n(() => {
|
|
116
|
+
var t;
|
|
117
|
+
return `Activity for ${((t = a.value) == null ? void 0 : t.name) || ""}`;
|
|
118
|
+
}), d = n(() => {
|
|
119
|
+
var t, e;
|
|
120
|
+
return ((e = (t = a.value) == null ? void 0 : t.lenders) == null ? void 0 : e.totalCount) ?? 0;
|
|
121
|
+
}), c = n(() => {
|
|
122
|
+
var e, o;
|
|
123
|
+
const t = ((o = (e = a.value) == null ? void 0 : e.loanFundraisingInfo) == null ? void 0 : o.fundedAmount) ?? 0;
|
|
124
|
+
return A(parseFloat(t)).format("$0,0");
|
|
125
|
+
}), m = n(() => {
|
|
126
|
+
const t = l.value.find((e) => e.data.some((o) => o.type === "LendingAction"));
|
|
127
|
+
return (t == null ? void 0 : t.data[0]) ?? {};
|
|
128
|
+
});
|
|
129
|
+
return {
|
|
130
|
+
lightboxOpen: i,
|
|
131
|
+
modalTitle: u,
|
|
132
|
+
formattedDate: (t) => {
|
|
133
|
+
const e = new Date(t);
|
|
134
|
+
return y(e, "MMM d, yyyy");
|
|
135
|
+
},
|
|
136
|
+
showActivityModal: () => {
|
|
137
|
+
s.value("loan-card", "click", "see-all-activity"), i.value = !0;
|
|
138
|
+
},
|
|
139
|
+
closeLightbox: () => {
|
|
140
|
+
i.value = !1;
|
|
141
|
+
},
|
|
142
|
+
singleActivity: m,
|
|
143
|
+
lendersNumber: d,
|
|
144
|
+
amountLent: c
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
};
|
|
74
148
|
export {
|
|
75
|
-
|
|
76
|
-
|
|
149
|
+
O as KV_LOAN_ACTIVITIES_FRAGMENT,
|
|
150
|
+
_ as default
|
|
77
151
|
};
|
|
@@ -252,6 +252,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
252
252
|
type: BooleanConstructor;
|
|
253
253
|
default: boolean;
|
|
254
254
|
};
|
|
255
|
+
preventBackgroundClose: {
|
|
256
|
+
type: BooleanConstructor;
|
|
257
|
+
default: boolean;
|
|
258
|
+
};
|
|
259
|
+
closeButtonShowDelay: {
|
|
260
|
+
type: NumberConstructor;
|
|
261
|
+
default: number;
|
|
262
|
+
};
|
|
255
263
|
}>, {
|
|
256
264
|
mdiClose: string;
|
|
257
265
|
role: import('vue').ComputedRef<"alertdialog" | "dialog">;
|
|
@@ -262,6 +270,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
262
270
|
hide: (closedBy?: string) => void;
|
|
263
271
|
show: () => void;
|
|
264
272
|
controlsRef: import('vue').Ref<any, any>;
|
|
273
|
+
closeButtonClasses: import('vue').ComputedRef<(string | {
|
|
274
|
+
'tw-invisible tw-opacity-0': boolean;
|
|
275
|
+
})[]>;
|
|
265
276
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "lightbox-closed"[], "lightbox-closed", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
266
277
|
blurBackground: {
|
|
267
278
|
type: BooleanConstructor;
|
|
@@ -284,6 +295,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
284
295
|
type: BooleanConstructor;
|
|
285
296
|
default: boolean;
|
|
286
297
|
};
|
|
298
|
+
preventBackgroundClose: {
|
|
299
|
+
type: BooleanConstructor;
|
|
300
|
+
default: boolean;
|
|
301
|
+
};
|
|
302
|
+
closeButtonShowDelay: {
|
|
303
|
+
type: NumberConstructor;
|
|
304
|
+
default: number;
|
|
305
|
+
};
|
|
287
306
|
}>> & Readonly<{
|
|
288
307
|
"onLightbox-closed"?: (...args: any[]) => any;
|
|
289
308
|
}>, {
|
|
@@ -291,6 +310,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
291
310
|
visible: boolean;
|
|
292
311
|
preventClose: boolean;
|
|
293
312
|
blurBackground: boolean;
|
|
313
|
+
preventBackgroundClose: boolean;
|
|
314
|
+
closeButtonShowDelay: number;
|
|
294
315
|
}, {}, {
|
|
295
316
|
KvMaterialIcon: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
296
317
|
icon: {
|