@countriesdb/widget 0.1.7 → 0.1.8
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/dist/follow-logic.d.ts +1 -1
- package/dist/follow-logic.js +33 -6
- package/dist/index.esm.js +35 -8
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +35 -8
- package/dist/index.js.map +1 -1
- package/dist/initialization.js +2 -2
- package/package.json +1 -1
package/dist/initialization.js
CHANGED
|
@@ -124,7 +124,7 @@ export async function updateSubdivisionSelect(select, apiKey, backendUrl, state,
|
|
|
124
124
|
reason: 'preselected',
|
|
125
125
|
});
|
|
126
126
|
valueSetByWidget = true;
|
|
127
|
-
await triggerFollowLogic(select, apiKey, backendUrl, state, config.followRelated, config.followUpward, (s, key, code) => updateSubdivisionSelect(s, key, backendUrl, state, config, code));
|
|
127
|
+
await triggerFollowLogic(select, apiKey, backendUrl, state, config.followRelated, config.followUpward, (s, key, code) => updateSubdivisionSelect(s, key, backendUrl, state, config, code), (countrySelect, key) => updateSubdivisions(countrySelect, key, backendUrl, state, config));
|
|
128
128
|
}
|
|
129
129
|
else {
|
|
130
130
|
// Try GeoIP preselect
|
|
@@ -148,7 +148,7 @@ export async function updateSubdivisionSelect(select, apiKey, backendUrl, state,
|
|
|
148
148
|
reason: 'geoip',
|
|
149
149
|
});
|
|
150
150
|
valueSetByWidget = true;
|
|
151
|
-
await triggerFollowLogic(select, apiKey, backendUrl, state, config.followRelated, config.followUpward, (s, key, code) => updateSubdivisionSelect(s, key, backendUrl, state, config, code));
|
|
151
|
+
await triggerFollowLogic(select, apiKey, backendUrl, state, config.followRelated, config.followUpward, (s, key, code) => updateSubdivisionSelect(s, key, backendUrl, state, config, code), (countrySelect, key) => updateSubdivisions(countrySelect, key, backendUrl, state, config));
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@countriesdb/widget",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "Country and state/province select widget with ISO 3166-1 and ISO 3166-2 codes. Auto-populates dropdowns with up-to-date country and subdivision data in multiple languages. Easy integration for forms, location selection, and address validation.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|