@kiva/kv-components 3.105.1 → 3.105.3
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 +20 -0
- package/data/ne_110m_admin_0_countries.json +1 -0
- package/package.json +2 -2
- package/vue/KvMap.vue +5 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "3.105.
|
|
3
|
+
"version": "3.105.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"optional": true
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "eed7b2a41aa41399178b8ca95a26f9333a797ac0"
|
|
87
87
|
}
|
package/vue/KvMap.vue
CHANGED
|
@@ -203,7 +203,9 @@ export default {
|
|
|
203
203
|
},
|
|
204
204
|
async mounted() {
|
|
205
205
|
if (this.countriesData) {
|
|
206
|
-
|
|
206
|
+
// current source data is from https://geojson.xyz/ under "admin 0 countries"
|
|
207
|
+
// https://d2ad6b4ur7yvpq.cloudfront.net/naturalearth-3.3.0/ne_110m_admin_0_countries.geojson
|
|
208
|
+
this.countriesBorders = await import('../data/ne_110m_admin_0_countries.json');
|
|
207
209
|
}
|
|
208
210
|
|
|
209
211
|
if (!this.mapLibreReady && !this.leafletReady) {
|
|
@@ -505,7 +507,7 @@ export default {
|
|
|
505
507
|
const countriesFeatures = this.countriesBorders.features ?? [];
|
|
506
508
|
|
|
507
509
|
countriesFeatures.forEach((country, index) => {
|
|
508
|
-
const countryData = this.countriesData.find((data) => data.isoCode === country.properties.
|
|
510
|
+
const countryData = this.countriesData.find((data) => data.isoCode === country.properties.iso_a2);
|
|
509
511
|
if (countryData) {
|
|
510
512
|
countriesFeatures[index].lenderLoans = countryData.value;
|
|
511
513
|
countriesFeatures[index].numLoansFundraising = countryData.numLoansFundraising;
|
|
@@ -526,7 +528,7 @@ export default {
|
|
|
526
528
|
const loansString = feature.lenderLoans
|
|
527
529
|
? `${feature.lenderLoans} loan${feature.lenderLoans > 1 ? 's' : ''}`
|
|
528
530
|
: '0 loans';
|
|
529
|
-
const countryString = `${feature.properties.
|
|
531
|
+
const countryString = `${feature.properties.name} <br/> ${loansString}`;
|
|
530
532
|
|
|
531
533
|
layer.bindTooltip(countryString, {
|
|
532
534
|
sticky: true,
|