@kiva/kv-components 3.92.0 → 3.92.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 +11 -0
- package/package.json +2 -2
- package/utils/mapUtils.js +3 -5
- package/vue/KvMap.vue +2 -2
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.92.1](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@3.92.0...@kiva/kv-components@3.92.1) (2024-08-19)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* vite has some complications around importing json ([7a5ced1](https://github.com/kiva/kv-ui-elements/commit/7a5ced1172e319a83b12d674529c81977c95a993))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [3.92.0](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@3.91.1...@kiva/kv-components@3.92.0) (2024-08-16)
|
|
7
18
|
|
|
8
19
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "3.92.
|
|
3
|
+
"version": "3.92.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"optional": true
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "52085aeb1c92162fd732cd3fe4cb9839cdd49b16"
|
|
86
86
|
}
|
package/utils/mapUtils.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import kvTokensPrimitives from '@kiva/kv-tokens/primitives.json';
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
* Code to generate random coordinates
|
|
5
3
|
* */
|
|
@@ -242,8 +240,8 @@ export function animationCoordinator(mapInstance, borrowerPoints) {
|
|
|
242
240
|
|
|
243
241
|
const flyToPoint = (index) => {
|
|
244
242
|
mapInstance.flyTo({
|
|
245
|
-
|
|
246
|
-
|
|
243
|
+
// These options control the ending camera position: centered at
|
|
244
|
+
// the target, at zoom level 9, and north up.
|
|
247
245
|
center: destinationPoints[index],
|
|
248
246
|
zoom: 4,
|
|
249
247
|
bearing: 0,
|
|
@@ -330,7 +328,7 @@ export const getLoansIntervals = (min, max, nbIntervals) => {
|
|
|
330
328
|
* @param {Object} kvTokensPrimitives - kv tokens for colors
|
|
331
329
|
* @returns {String} - color of the country
|
|
332
330
|
* */
|
|
333
|
-
export const getCountryColor = (lenderLoans, countriesData) => {
|
|
331
|
+
export const getCountryColor = (lenderLoans, countriesData, kvTokensPrimitives) => {
|
|
334
332
|
const loanCountsArray = [];
|
|
335
333
|
countriesData.forEach((country) => {
|
|
336
334
|
loanCountsArray.push(country.value);
|
package/vue/KvMap.vue
CHANGED
|
@@ -513,7 +513,7 @@ export default {
|
|
|
513
513
|
countryStyle(feature) {
|
|
514
514
|
return {
|
|
515
515
|
color: kvTokensPrimitives.colors.white,
|
|
516
|
-
fillColor: getCountryColor(feature.lenderLoans, this.countriesData),
|
|
516
|
+
fillColor: getCountryColor(feature.lenderLoans, this.countriesData, kvTokensPrimitives),
|
|
517
517
|
weight: 1,
|
|
518
518
|
fillOpacity: 1,
|
|
519
519
|
};
|
|
@@ -545,7 +545,7 @@ export default {
|
|
|
545
545
|
const { feature } = layer;
|
|
546
546
|
|
|
547
547
|
layer.setStyle({
|
|
548
|
-
fillColor: getCountryColor(feature.lenderLoans, this.countriesData),
|
|
548
|
+
fillColor: getCountryColor(feature.lenderLoans, this.countriesData, kvTokensPrimitives),
|
|
549
549
|
});
|
|
550
550
|
},
|
|
551
551
|
circleMapClicked(countryIso) {
|