@kiva/kv-components 3.44.1 → 3.45.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/CHANGELOG.md CHANGED
@@ -3,6 +3,33 @@
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.45.0](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@3.44.2...@kiva/kv-components@3.45.0) (2023-09-29)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * missed leading words ([1614ebd](https://github.com/kiva/kv-ui-elements/commit/1614ebd5ff3ceccc900a8db24624f5a40d9f17c6))
12
+
13
+
14
+ ### Features
15
+
16
+ * add optional why special string to loan use ([99d20ec](https://github.com/kiva/kv-ui-elements/commit/99d20ecc8e2efd0b9a6de4890335f9f46daf8250))
17
+
18
+
19
+
20
+
21
+
22
+ ## [3.44.2](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@3.44.1...@kiva/kv-components@3.44.2) (2023-09-25)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * bookmark icon position fixed to avoid using z index property ([#301](https://github.com/kiva/kv-ui-elements/issues/301)) ([59287f8](https://github.com/kiva/kv-ui-elements/commit/59287f82e27275a23c6924537a55bdb31f563946))
28
+
29
+
30
+
31
+
32
+
6
33
  ## [3.44.1](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@3.44.0...@kiva/kv-components@3.44.1) (2023-09-20)
7
34
 
8
35
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiva/kv-components",
3
- "version": "3.44.1",
3
+ "version": "3.45.0",
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": "a6e828c2b6a814b53ec26ada42ec6b97e6932660"
78
+ "gitHead": "0cd21a799885e76aa19eb7e32f170ef827450261"
79
79
  }
@@ -19,15 +19,6 @@
19
19
  class="tw-relative"
20
20
  @click="showLoanDetails"
21
21
  >
22
- <kv-loan-bookmark
23
- v-if="!isVisitor"
24
- :loan-id="loanId"
25
- :is-bookmarked="isBookmarked"
26
- class="tw-absolute tw-right-1 tw-z-2"
27
- style="top: -6px;"
28
- data-testid="loan-card-bookmark"
29
- @toggle-bookmark="$emit('toggle-bookmark')"
30
- />
31
22
  <component
32
23
  :is="tag"
33
24
  :to="readMorePath"
@@ -76,6 +67,15 @@
76
67
  </p>
77
68
  </div>
78
69
  </component>
70
+ <kv-loan-bookmark
71
+ v-if="!isVisitor"
72
+ :loan-id="loanId"
73
+ :is-bookmarked="isBookmarked"
74
+ class="tw-absolute tw-right-1"
75
+ style="top: -6px;"
76
+ data-testid="loan-card-bookmark"
77
+ @toggle-bookmark="$emit('toggle-bookmark')"
78
+ />
79
79
  </div>
80
80
 
81
81
  <!-- Loan tag -->
package/vue/KvLoanUse.vue CHANGED
@@ -40,6 +40,10 @@ export default {
40
40
  type: String,
41
41
  default: DIRECT,
42
42
  },
43
+ whySpecial: {
44
+ type: String,
45
+ default: '',
46
+ },
43
47
  },
44
48
  computed: {
45
49
  helpLanguage() {
@@ -51,6 +55,11 @@ export default {
51
55
  isDirect() {
52
56
  return this.distributionModel === DIRECT;
53
57
  },
58
+ whySpecialSentence() {
59
+ return this.whySpecial
60
+ ? ` This loan is special because ${this.whySpecial.charAt(0).toLowerCase() + this.whySpecial.slice(1)}`
61
+ : '';
62
+ },
54
63
  loanUse() {
55
64
  if (this.anonymizationLevel === 'full' || this.use.length === 0) {
56
65
  return 'For the borrower\'s privacy, this loan has been made anonymous.';
@@ -63,7 +72,8 @@ export default {
63
72
  + `${isGroup ? 'a member of ' : ''}`
64
73
  + `${this.name} `
65
74
  + `${this.isDirect ? `${this.helpLanguage} ` : ''}`
66
- + `${this.use.charAt(0).toLowerCase() + this.use.slice(1)}`;
75
+ + `${this.use.charAt(0).toLowerCase() + this.use.slice(1)}`
76
+ + `${this.whySpecialSentence}`;
67
77
  },
68
78
  },
69
79
  };
@@ -18,6 +18,7 @@ const story = (args) => {
18
18
  :borrower-count="borrowerCount"
19
19
  :name="name"
20
20
  :distribution-model="distributionModel"
21
+ :why-special="whySpecial"
21
22
  />
22
23
  `,
23
24
  });
@@ -49,3 +50,11 @@ export const Group = story({
49
50
  name: 'Farm Organization',
50
51
  borrowerCount: 2,
51
52
  });
53
+
54
+ export const WhySpecial = story({
55
+ use: 'buy supplies.',
56
+ loanAmount: '1000.00',
57
+ status: 'fundraising',
58
+ name: 'Bob Smith',
59
+ whySpecial: 'It supports organic farming and includes a lower interest rate.',
60
+ });