@kiva/kv-components 3.81.0 → 3.82.1
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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.82.1](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@3.82.0...@kiva/kv-components@3.82.1) (2024-06-03)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* loan card button secondary action and destination ([#411](https://github.com/kiva/kv-ui-elements/issues/411)) ([9cf20db](https://github.com/kiva/kv-ui-elements/commit/9cf20dbd9865a685ae19a5a4d553bb3345c680b8))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [3.82.0](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@3.81.0...@kiva/kv-components@3.82.0) (2024-06-03)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* remove amount lent activity feed ([#410](https://github.com/kiva/kv-ui-elements/issues/410)) ([82a2216](https://github.com/kiva/kv-ui-elements/commit/82a22166f70085ad5a725e3e58f2fb3dd7eafa78))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
# [3.81.0](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@3.80.1...@kiva/kv-components@3.81.0) (2024-05-29)
|
|
7
29
|
|
|
8
30
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.82.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"optional": true
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "cde8d379527232294da84dde985729ec92479c65"
|
|
79
79
|
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
class="activity-avatar"
|
|
10
10
|
/>
|
|
11
11
|
<p class="tw-text-base tw-whitespace-nowrap">
|
|
12
|
-
<span class="data-hj-suppress">{{ lenderName }}</span> contributed
|
|
12
|
+
<span class="data-hj-suppress">{{ lenderName }}</span> contributed
|
|
13
13
|
</p>
|
|
14
14
|
</div>
|
|
15
15
|
</template>
|
|
@@ -39,15 +39,10 @@ export default {
|
|
|
39
39
|
|
|
40
40
|
const lenderName = computed(() => activity?.value?.lender?.name ?? '');
|
|
41
41
|
const lenderImageUrl = computed(() => activity?.value?.lender?.image?.url ?? '');
|
|
42
|
-
const amountLent = computed(() => {
|
|
43
|
-
const amount = activity?.value?.amountLent ?? 0;
|
|
44
|
-
return parseFloat(amount).toFixed();
|
|
45
|
-
});
|
|
46
42
|
|
|
47
43
|
return {
|
|
48
44
|
lenderImageUrl,
|
|
49
45
|
lenderName,
|
|
50
|
-
amountLent,
|
|
51
46
|
};
|
|
52
47
|
},
|
|
53
48
|
};
|
package/vue/KvLendCta.vue
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
variant="secondary"
|
|
7
7
|
class="tw-inline-flex tw-flex-1"
|
|
8
8
|
data-testid="bp-lend-cta-checkout-button"
|
|
9
|
-
:to="!externalLinks
|
|
10
|
-
:href="externalLinks
|
|
11
|
-
@click.native="clickSecondaryButton"
|
|
9
|
+
:to="!externalLinks ? '/basket' : undefined"
|
|
10
|
+
:href="externalLinks ? '/basket' : undefined"
|
|
11
|
+
@click.native="clickSecondaryButton($event)"
|
|
12
12
|
>
|
|
13
13
|
{{ loanInBasketButtonText }}
|
|
14
14
|
</kv-ui-button>
|
|
@@ -407,8 +407,10 @@ export default {
|
|
|
407
407
|
clickDropdown() {
|
|
408
408
|
this.kvTrackFunction('Lending', 'click-Modify loan amount', 'open dialog', this.loanId, this.loanId);
|
|
409
409
|
},
|
|
410
|
-
clickSecondaryButton() {
|
|
410
|
+
clickSecondaryButton(event) {
|
|
411
411
|
if (this.secondaryButtonHandler) {
|
|
412
|
+
event.preventDefault();
|
|
413
|
+
event.stopPropagation();
|
|
412
414
|
// Custom secondary button behavior
|
|
413
415
|
this.secondaryButtonHandler();
|
|
414
416
|
} else {
|
|
@@ -23,6 +23,8 @@ const story = (args) => {
|
|
|
23
23
|
:custom-loan-details="customLoanDetails"
|
|
24
24
|
:enable-huge-amount="enableHugeAmount"
|
|
25
25
|
:is-visitor="isVisitor"
|
|
26
|
+
:secondary-button-handler="secondaryButtonHandler"
|
|
27
|
+
:external-links="externalLinks"
|
|
26
28
|
/>
|
|
27
29
|
</div>
|
|
28
30
|
`,
|
|
@@ -33,6 +35,8 @@ const story = (args) => {
|
|
|
33
35
|
|
|
34
36
|
const kvTrackFunction = () => { };
|
|
35
37
|
|
|
38
|
+
const secondaryButtonHandler = () => { console.log('secondary button handler'); };
|
|
39
|
+
|
|
36
40
|
export const Loading = story({ isLoading: true, kvTrackFunction });
|
|
37
41
|
|
|
38
42
|
export const Adding = story({ isLoading: false, isAdding: true, kvTrackFunction });
|
|
@@ -49,6 +53,20 @@ export const Basketed = story({
|
|
|
49
53
|
kvTrackFunction,
|
|
50
54
|
});
|
|
51
55
|
|
|
56
|
+
export const BasketedWithSecondaryAction = story({
|
|
57
|
+
isLoading: false,
|
|
58
|
+
loan: { id: 1 },
|
|
59
|
+
basketItems: [
|
|
60
|
+
{
|
|
61
|
+
__typename: 'LoanReservation',
|
|
62
|
+
id: 1,
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
externalLinks: true,
|
|
66
|
+
kvTrackFunction,
|
|
67
|
+
secondaryButtonHandler,
|
|
68
|
+
});
|
|
69
|
+
|
|
52
70
|
export const Funded = story({
|
|
53
71
|
isLoading: false,
|
|
54
72
|
loan: { status: 'funded' },
|