@kiva/kv-components 3.59.0 → 3.60.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.60.0](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@3.59.1...@kiva/kv-components@3.60.0) (2024-03-04)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * unit test update ([e0e943b](https://github.com/kiva/kv-ui-elements/commit/e0e943bf51a9f7775f9b1279dc449787d7d05055))
12
+
13
+
14
+ ### Features
15
+
16
+ * use new avatar in commenting components ([c707f71](https://github.com/kiva/kv-ui-elements/commit/c707f71e87661feb93486d3b900d4f0a77aff353))
17
+
18
+
19
+
20
+
21
+
22
+ ## [3.59.1](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@3.59.0...@kiva/kv-components@3.59.1) (2024-03-04)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * comments count fixed ([#360](https://github.com/kiva/kv-ui-elements/issues/360)) ([cdbaf2d](https://github.com/kiva/kv-ui-elements/commit/cdbaf2d6e19e556cfb769805307466c24021567e))
28
+
29
+
30
+
31
+
32
+
6
33
  # [3.59.0](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@3.58.0...@kiva/kv-components@3.59.0) (2024-03-04)
7
34
 
8
35
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiva/kv-components",
3
- "version": "3.59.0",
3
+ "version": "3.60.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": "26d0e3f17353ef2a4f9a634a22ea335789a0252d"
78
+ "gitHead": "30d18f082b47330947b701d87edb26ea5e65d4ac"
79
79
  }
@@ -19,7 +19,7 @@ describe('KvCommentsAdd', () => {
19
19
  userImageUrl: 'test.com',
20
20
  userDisplayName: 'User',
21
21
  });
22
- getByAltText('Lender');
22
+ getByAltText('Image of lender');
23
23
  getByText('User');
24
24
  });
25
25
 
@@ -2,20 +2,11 @@
2
2
  <div class="tw-flex tw-flex-col">
3
3
  <div class="tw-flex tw-flex-col md:tw-flex-row md:tw-items-center tw-gap-0.5 md:tw-gap-1">
4
4
  <div class="tw-flex tw-items-center tw-gap-1">
5
- <img
6
- v-if="userImageUrl"
7
- :src="userImageUrl"
8
- alt="Lender"
9
- class="
10
- data-hj-suppress
11
- tw-inline-block
12
- tw-w-3.5
13
- tw-h-3.5
14
- tw-rounded-full
15
- tw-overflow-hidden
16
- tw-object-fill
17
- "
18
- >
5
+ <kv-user-avatar
6
+ :lender-name="userDisplayName"
7
+ :lender-image-url="userImageUrl"
8
+ is-small
9
+ />
19
10
  <div class="data-hj-suppress tw-font-medium">
20
11
  {{ userDisplayName }}
21
12
  </div>
@@ -52,6 +43,7 @@
52
43
  import { computed, ref } from 'vue-demi';
53
44
  import KvButton from './KvButton.vue';
54
45
  import KvTextInput from './KvTextInput.vue';
46
+ import KvUserAvatar from './KvUserAvatar.vue';
55
47
 
56
48
  export const ADD_COMMENT_ID = 'add-comment-value';
57
49
  export const ADD_COMMENT_EVENT = 'add-comment';
@@ -62,6 +54,7 @@ export default {
62
54
  components: {
63
55
  KvButton,
64
56
  KvTextInput,
57
+ KvUserAvatar,
65
58
  },
66
59
  props: {
67
60
  /**
@@ -56,7 +56,7 @@ export default {
56
56
  */
57
57
  comments: {
58
58
  type: Object,
59
- default: () => {},
59
+ default: () => ({}),
60
60
  },
61
61
  },
62
62
  emits: [ADD_REACTION_EVENT],
@@ -52,7 +52,7 @@ export default {
52
52
  */
53
53
  comments: {
54
54
  type: Object,
55
- default: () => {},
55
+ default: () => ({}),
56
56
  },
57
57
  },
58
58
  emits: [ADD_REACTION_EVENT],
@@ -2,23 +2,14 @@
2
2
  <div>
3
3
  <div>
4
4
  <div class="tw-flex tw-items-center tw-gap-1">
5
- <img
6
- v-if="authorImage"
7
- class="
8
- data-hj-suppress
9
- tw-inline-block
10
- tw-w-3.5
11
- tw-h-3.5
12
- tw-rounded-full
13
- tw-overflow-hidden
14
- tw-object-fill
15
- "
16
- :src="authorImage"
17
- alt="picture"
18
- >
5
+ <kv-user-avatar
6
+ :lender-name="authorName"
7
+ :lender-image-url="authorImage"
8
+ is-small
9
+ />
19
10
  <p
20
11
  v-if="authorName"
21
- class="tw-font-medium"
12
+ class="data-hj-suppress tw-font-medium"
22
13
  >
23
14
  {{ authorName }}
24
15
  </p>
@@ -96,6 +87,7 @@ import {
96
87
  import KvCommentsReplyButton from './KvCommentsReplyButton.vue';
97
88
  import KvCommentsHeartButton from './KvCommentsHeartButton.vue';
98
89
  import KvCommentsAdd from './KvCommentsAdd.vue';
90
+ import KvUserAvatar from './KvUserAvatar.vue';
99
91
 
100
92
  export const REPLY_COMMENT_EVENT = 'reply-comment';
101
93
  export const LIKE_COMMENT_EVENT = 'like-comment';
@@ -107,6 +99,7 @@ export default {
107
99
  KvCommentsReplyButton,
108
100
  KvCommentsHeartButton,
109
101
  KvCommentsAdd,
102
+ KvUserAvatar,
110
103
  },
111
104
  props: {
112
105
  /**
@@ -190,7 +183,7 @@ export default {
190
183
 
191
184
  const numberOfLikes = computed(() => comment?.value?.children_counts?.like ?? 0);
192
185
 
193
- const numberOfReplies = computed(() => comment?.value?.children_counts?.like ?? 0);
186
+ const numberOfReplies = computed(() => comment?.value?.children_counts?.comment ?? 0);
194
187
 
195
188
  return {
196
189
  hideInput,
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div
3
- class="data-hj-suppress"
3
+ class="data-hj-suppress tw-flex"
4
4
  :class="{ 'tw-w-3': isSmall, 'tw-w-6': !isSmall }"
5
5
  >
6
6
  <!-- User is anonymous or data is missing -->