kui-crm 0.0.220 → 0.0.222
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/cjs/index.js +13 -1
- package/cjs/index.js.map +1 -1
- package/index.d.ts +5 -2
- package/index.js +13 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/types/index.d.ts +5 -2
package/cjs/index.js
CHANGED
|
@@ -4368,12 +4368,24 @@ var useMetroBlock = function (form, mapStore, metroStore, coords) {
|
|
|
4368
4368
|
control: form.control,
|
|
4369
4369
|
name: "metroStations",
|
|
4370
4370
|
}), fields = _b.fields, append = _b.append, remove = _b.remove, update = _b.update, replace = _b.replace;
|
|
4371
|
-
|
|
4371
|
+
var addMap = function () {
|
|
4372
4372
|
if (!map) {
|
|
4373
4373
|
var div = document.createElement("div");
|
|
4374
4374
|
var createdMap = new window.google.maps.Map(div);
|
|
4375
4375
|
setMap(createdMap);
|
|
4376
4376
|
}
|
|
4377
|
+
};
|
|
4378
|
+
var checkMapLoaded = function () {
|
|
4379
|
+
if (!window.google) {
|
|
4380
|
+
setTimeout(checkMapLoaded, 1);
|
|
4381
|
+
}
|
|
4382
|
+
else
|
|
4383
|
+
addMap();
|
|
4384
|
+
};
|
|
4385
|
+
React.useEffect(function () {
|
|
4386
|
+
if (!map) {
|
|
4387
|
+
checkMapLoaded();
|
|
4388
|
+
}
|
|
4377
4389
|
}, [map]);
|
|
4378
4390
|
var updateMetroStations = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
4379
4391
|
var nearbyStations;
|