@kiva/kv-components 3.75.0 → 3.75.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,17 @@
|
|
|
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.75.1](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@3.75.0...@kiva/kv-components@3.75.1) (2024-04-26)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* activity removed from clickable tags ([#394](https://github.com/kiva/kv-ui-elements/issues/394)) ([e59496a](https://github.com/kiva/kv-ui-elements/commit/e59496afceb9b7964078452c57dd401cb6b2dab4))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [3.75.0](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@3.74.1...@kiva/kv-components@3.75.0) (2024-04-26)
|
|
7
18
|
|
|
8
19
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "3.75.
|
|
3
|
+
"version": "3.75.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": "550d1048d295b17a7174445a300862fa19d9d2f5"
|
|
79
79
|
}
|
|
@@ -211,10 +211,10 @@ describe('KvClassicLoanCard', () => {
|
|
|
211
211
|
enableClickableTags: true,
|
|
212
212
|
},
|
|
213
213
|
});
|
|
214
|
-
const tagSpan = getByText('
|
|
214
|
+
const tagSpan = getByText('Agriculture');
|
|
215
215
|
|
|
216
216
|
await userEvent.click(tagSpan);
|
|
217
217
|
|
|
218
|
-
expect(emitted()['jump-filter-page']).toEqual([[{ id:
|
|
218
|
+
expect(emitted()['jump-filter-page']).toEqual([[{ id: 1, label: 'Agriculture', type: 'sector' }]]);
|
|
219
219
|
});
|
|
220
220
|
});
|
package/utils/loanCard.js
CHANGED
|
@@ -11,7 +11,7 @@ const SUSTAINABLE_AG_KEY = 'SUSTAINABLE AG';
|
|
|
11
11
|
const SINGLE_PARENT_KEY = 'SINGLE PARENT';
|
|
12
12
|
const REFUGEE_KEY = 'REFUGEES/DISPLACED';
|
|
13
13
|
|
|
14
|
-
const findCalloutData = (tags, tagName) => tags?.find((t) => t.name.toUpperCase() === tagName.toUpperCase()) ?? {};
|
|
14
|
+
const findCalloutData = (tags, tagName) => tags?.find((t) => t.name.replace('#', '').toUpperCase() === tagName.toUpperCase()) ?? {}; // eslint-disable-line max-len
|
|
15
15
|
|
|
16
16
|
export function loanCardComputedProperties(props) {
|
|
17
17
|
const {
|
|
@@ -142,7 +142,7 @@ export function loanCardComputedProperties(props) {
|
|
|
142
142
|
const id = themeData?.id ?? null;
|
|
143
143
|
if (!callouts.filter((c) => c.label.toUpperCase() === theme.toUpperCase()).length
|
|
144
144
|
&& theme.toUpperCase() !== categoryPageName.value?.toUpperCase()) {
|
|
145
|
-
callouts.push({ label: theme, type: '
|
|
145
|
+
callouts.push({ label: theme, type: 'attribute', id });
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
|
package/vue/KvLoanCallouts.vue
CHANGED
|
@@ -60,7 +60,7 @@ export default {
|
|
|
60
60
|
} = toRefs(props);
|
|
61
61
|
|
|
62
62
|
const isClickable = (tag) => {
|
|
63
|
-
const clickableTypes = ['
|
|
63
|
+
const clickableTypes = ['sector', 'tag', 'attribute'];
|
|
64
64
|
const isClickableType = clickableTypes.includes(tag.type);
|
|
65
65
|
|
|
66
66
|
return enableClickable.value && isClickableType && !!tag.id;
|
|
@@ -24,11 +24,10 @@ export const Default = story({ callouts: [{ label: 'callout 1' }, { label: 'call
|
|
|
24
24
|
|
|
25
25
|
export const Clickable = story({
|
|
26
26
|
callouts: [
|
|
27
|
-
{ id: 1, label: 'callout 1', type: 'activity' },
|
|
28
27
|
{ label: 'callout 2' },
|
|
29
28
|
{ id: 33, label: 'callout 3', type: 'sector' },
|
|
30
29
|
{ id: null, label: 'callout 4', type: 'tag' },
|
|
31
|
-
{ id: 12, label: 'callout 5', type: '
|
|
30
|
+
{ id: 12, label: 'callout 5', type: 'attribute' },
|
|
32
31
|
],
|
|
33
32
|
enableClickable: true,
|
|
34
33
|
});
|