@snmt-react-ui/city-select 1.3.0 → 1.3.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/dist/city-select.js +94 -95
- package/dist/useDebounce.d.ts +3 -0
- package/package.json +3 -3
package/dist/city-select.js
CHANGED
@@ -1238,8 +1238,8 @@ const Q1 = async (e) => {
|
|
1238
1238
|
method: "POST",
|
1239
1239
|
body: r,
|
1240
1240
|
duplex: "half"
|
1241
|
-
}),
|
1242
|
-
w.isFormData(r) && (
|
1241
|
+
}), x;
|
1242
|
+
w.isFormData(r) && (x = R.headers.get("content-type")) && c.setContentType(x), R.body && (r = vr(R.body, Nr, Rr(
|
1243
1243
|
O,
|
1244
1244
|
kt(d)
|
1245
1245
|
), null, yn));
|
@@ -1254,25 +1254,25 @@ const Q1 = async (e) => {
|
|
1254
1254
|
withCredentials: u
|
1255
1255
|
});
|
1256
1256
|
let b = await fetch(L);
|
1257
|
-
const
|
1258
|
-
if (Ln && (a ||
|
1257
|
+
const E = Ln && (l === "stream" || l === "response");
|
1258
|
+
if (Ln && (a || E)) {
|
1259
1259
|
const R = {};
|
1260
1260
|
["status", "statusText", "headers"].forEach((D) => {
|
1261
1261
|
R[D] = b[D];
|
1262
1262
|
});
|
1263
|
-
const
|
1263
|
+
const x = w.toFiniteNumber(b.headers.get("content-length"));
|
1264
1264
|
b = new Response(
|
1265
1265
|
vr(b.body, Nr, a && Rr(
|
1266
|
-
|
1266
|
+
x,
|
1267
1267
|
kt(a, !0)
|
1268
|
-
),
|
1268
|
+
), E && N, yn),
|
1269
1269
|
R
|
1270
1270
|
);
|
1271
1271
|
}
|
1272
1272
|
l = l || "text";
|
1273
1273
|
let S = await yt[w.findKey(yt, l) || "text"](b, e);
|
1274
|
-
return !
|
1275
|
-
Go(R,
|
1274
|
+
return !E && N(), g && g(), await new Promise((R, x) => {
|
1275
|
+
Go(R, x, {
|
1276
1276
|
data: S,
|
1277
1277
|
headers: G.from(b.headers),
|
1278
1278
|
status: b.status,
|
@@ -2923,8 +2923,8 @@ const xl = async (e) => {
|
|
2923
2923
|
method: "POST",
|
2924
2924
|
body: r,
|
2925
2925
|
duplex: "half"
|
2926
|
-
}),
|
2927
|
-
C.isFormData(r) && (
|
2926
|
+
}), x;
|
2927
|
+
C.isFormData(r) && (x = R.headers.get("content-type")) && c.setContentType(x), R.body && (r = Br(R.body, Fr, Dr(
|
2928
2928
|
O,
|
2929
2929
|
Lt(d)
|
2930
2930
|
), null, xn));
|
@@ -2939,25 +2939,25 @@ const xl = async (e) => {
|
|
2939
2939
|
withCredentials: u
|
2940
2940
|
});
|
2941
2941
|
let b = await fetch(L);
|
2942
|
-
const
|
2943
|
-
if (On && (a ||
|
2942
|
+
const E = On && (l === "stream" || l === "response");
|
2943
|
+
if (On && (a || E)) {
|
2944
2944
|
const R = {};
|
2945
2945
|
["status", "statusText", "headers"].forEach((D) => {
|
2946
2946
|
R[D] = b[D];
|
2947
2947
|
});
|
2948
|
-
const
|
2948
|
+
const x = C.toFiniteNumber(b.headers.get("content-length"));
|
2949
2949
|
b = new Response(
|
2950
2950
|
Br(b.body, Fr, a && Dr(
|
2951
|
-
|
2951
|
+
x,
|
2952
2952
|
Lt(a, !0)
|
2953
|
-
),
|
2953
|
+
), E && N, xn),
|
2954
2954
|
R
|
2955
2955
|
);
|
2956
2956
|
}
|
2957
2957
|
l = l || "text";
|
2958
2958
|
let S = await bt[C.findKey(bt, l) || "text"](b, e);
|
2959
|
-
return !
|
2960
|
-
mi(R,
|
2959
|
+
return !E && N(), g && g(), await new Promise((R, x) => {
|
2960
|
+
mi(R, x, {
|
2961
2961
|
data: S,
|
2962
2962
|
headers: Z.from(b.headers),
|
2963
2963
|
status: b.status,
|
@@ -7762,8 +7762,8 @@ const A0 = async (e) => {
|
|
7762
7762
|
method: "POST",
|
7763
7763
|
body: r,
|
7764
7764
|
duplex: "half"
|
7765
|
-
}),
|
7766
|
-
k.isFormData(r) && (
|
7765
|
+
}), x;
|
7766
|
+
k.isFormData(r) && (x = R.headers.get("content-type")) && c.setContentType(x), R.body && (r = zr(R.body, Jr, Yr(
|
7767
7767
|
O,
|
7768
7768
|
vt(d)
|
7769
7769
|
), null, jn));
|
@@ -7778,25 +7778,25 @@ const A0 = async (e) => {
|
|
7778
7778
|
withCredentials: u
|
7779
7779
|
});
|
7780
7780
|
let b = await fetch(L);
|
7781
|
-
const
|
7782
|
-
if (Pn && (a ||
|
7781
|
+
const E = Pn && (l === "stream" || l === "response");
|
7782
|
+
if (Pn && (a || E)) {
|
7783
7783
|
const R = {};
|
7784
7784
|
["status", "statusText", "headers"].forEach((D) => {
|
7785
7785
|
R[D] = b[D];
|
7786
7786
|
});
|
7787
|
-
const
|
7787
|
+
const x = k.toFiniteNumber(b.headers.get("content-length"));
|
7788
7788
|
b = new Response(
|
7789
7789
|
zr(b.body, Jr, a && Yr(
|
7790
|
-
|
7790
|
+
x,
|
7791
7791
|
vt(a, !0)
|
7792
|
-
),
|
7792
|
+
), E && N, jn),
|
7793
7793
|
R
|
7794
7794
|
);
|
7795
7795
|
}
|
7796
7796
|
l = l || "text";
|
7797
7797
|
let S = await Rt[k.findKey(Rt, l) || "text"](b, e);
|
7798
|
-
return !
|
7799
|
-
Ui(R,
|
7798
|
+
return !E && N(), g && g(), await new Promise((R, x) => {
|
7799
|
+
Ui(R, x, {
|
7800
7800
|
data: S,
|
7801
7801
|
headers: $.from(b.headers),
|
7802
7802
|
status: b.status,
|
@@ -12573,8 +12573,8 @@ const Sh = async (e) => {
|
|
12573
12573
|
method: "POST",
|
12574
12574
|
body: r,
|
12575
12575
|
duplex: "half"
|
12576
|
-
}),
|
12577
|
-
y.isFormData(r) && (
|
12576
|
+
}), x;
|
12577
|
+
y.isFormData(r) && (x = R.headers.get("content-type")) && c.setContentType(x), R.body && (r = lo(R.body, ho, co(
|
12578
12578
|
O,
|
12579
12579
|
Nt(d)
|
12580
12580
|
), null, Un));
|
@@ -12589,25 +12589,25 @@ const Sh = async (e) => {
|
|
12589
12589
|
withCredentials: u
|
12590
12590
|
});
|
12591
12591
|
let b = await fetch(L);
|
12592
|
-
const
|
12593
|
-
if (Vn && (a ||
|
12592
|
+
const E = Vn && (l === "stream" || l === "response");
|
12593
|
+
if (Vn && (a || E)) {
|
12594
12594
|
const R = {};
|
12595
12595
|
["status", "statusText", "headers"].forEach((D) => {
|
12596
12596
|
R[D] = b[D];
|
12597
12597
|
});
|
12598
|
-
const
|
12598
|
+
const x = y.toFiniteNumber(b.headers.get("content-length"));
|
12599
12599
|
b = new Response(
|
12600
12600
|
lo(b.body, ho, a && co(
|
12601
|
-
|
12601
|
+
x,
|
12602
12602
|
Nt(a, !0)
|
12603
|
-
),
|
12603
|
+
), E && N, Un),
|
12604
12604
|
R
|
12605
12605
|
);
|
12606
12606
|
}
|
12607
12607
|
l = l || "text";
|
12608
12608
|
let S = await Et[y.findKey(Et, l) || "text"](b, e);
|
12609
|
-
return !
|
12610
|
-
ds(R,
|
12609
|
+
return !E && N(), g && g(), await new Promise((R, x) => {
|
12610
|
+
ds(R, x, {
|
12611
12611
|
data: S,
|
12612
12612
|
headers: q.from(b.headers),
|
12613
12613
|
status: b.status,
|
@@ -13148,14 +13148,14 @@ const ks = ({ children: e, width: t, size: n = "small", onClose: r }) => {
|
|
13148
13148
|
he(() => {
|
13149
13149
|
O(e);
|
13150
13150
|
}, [e]);
|
13151
|
-
const
|
13151
|
+
const E = (B) => {
|
13152
13152
|
p(B);
|
13153
13153
|
}, S = (B, V) => {
|
13154
13154
|
var Y;
|
13155
13155
|
return !!((Y = V == null ? void 0 : V.label) != null && Y.toString().toLowerCase().includes(B.toLowerCase()));
|
13156
13156
|
}, R = () => {
|
13157
13157
|
g(!0);
|
13158
|
-
},
|
13158
|
+
}, x = () => {
|
13159
13159
|
g(!1);
|
13160
13160
|
}, D = (B) => {
|
13161
13161
|
if (O(B), r) {
|
@@ -13192,14 +13192,14 @@ const ks = ({ children: e, width: t, size: n = "small", onClose: r }) => {
|
|
13192
13192
|
ref: c,
|
13193
13193
|
showSearch: !!o,
|
13194
13194
|
filterOption: o && S,
|
13195
|
-
onDropdownVisibleChange:
|
13195
|
+
onDropdownVisibleChange: E,
|
13196
13196
|
placeholder: n ? d ? `${n}*` : n : void 0,
|
13197
13197
|
disabled: a,
|
13198
13198
|
value: N || void 0,
|
13199
13199
|
mode: r === "filter" ? "multiple" : r,
|
13200
13200
|
onChange: D,
|
13201
13201
|
onFocus: R,
|
13202
|
-
onBlur:
|
13202
|
+
onBlur: x,
|
13203
13203
|
onSearch: (B) => L(!B),
|
13204
13204
|
onSelect: () => L(!0),
|
13205
13205
|
onDeselect: () => L(!0),
|
@@ -13631,15 +13631,15 @@ class At extends Qt {
|
|
13631
13631
|
} = this.extractFromKey(t[t.length - 1], n), d = a[a.length - 1], l = n.lng || this.language, c = n.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
13632
13632
|
if (l && l.toLowerCase() === "cimode") {
|
13633
13633
|
if (c) {
|
13634
|
-
const
|
13634
|
+
const E = n.nsSeparator || this.options.nsSeparator;
|
13635
13635
|
return o ? {
|
13636
|
-
res: `${d}${
|
13636
|
+
res: `${d}${E}${s}`,
|
13637
13637
|
usedKey: s,
|
13638
13638
|
exactUsedKey: s,
|
13639
13639
|
usedLng: l,
|
13640
13640
|
usedNS: d,
|
13641
13641
|
usedParams: this.getUsedParamsDetails(n)
|
13642
|
-
} : `${d}${
|
13642
|
+
} : `${d}${E}${s}`;
|
13643
13643
|
}
|
13644
13644
|
return o ? {
|
13645
13645
|
res: s,
|
@@ -13656,35 +13656,35 @@ class At extends Qt {
|
|
13656
13656
|
if (O && p && (typeof p != "string" && typeof p != "boolean" && typeof p != "number") && L.indexOf(v) < 0 && !(typeof N == "string" && Array.isArray(p))) {
|
13657
13657
|
if (!n.returnObjects && !this.options.returnObjects) {
|
13658
13658
|
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
13659
|
-
const
|
13659
|
+
const E = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(f, p, {
|
13660
13660
|
...n,
|
13661
13661
|
ns: a
|
13662
13662
|
}) : `key '${s} (${this.language})' returned an object instead of string.`;
|
13663
|
-
return o ? (u.res =
|
13663
|
+
return o ? (u.res = E, u.usedParams = this.getUsedParamsDetails(n), u) : E;
|
13664
13664
|
}
|
13665
13665
|
if (i) {
|
13666
|
-
const
|
13667
|
-
for (const
|
13668
|
-
if (Object.prototype.hasOwnProperty.call(p,
|
13669
|
-
const D = `${R}${i}${
|
13670
|
-
S[
|
13666
|
+
const E = Array.isArray(p), S = E ? [] : {}, R = E ? g : f;
|
13667
|
+
for (const x in p)
|
13668
|
+
if (Object.prototype.hasOwnProperty.call(p, x)) {
|
13669
|
+
const D = `${R}${i}${x}`;
|
13670
|
+
S[x] = this.translate(D, {
|
13671
13671
|
...n,
|
13672
13672
|
joinArrays: !1,
|
13673
13673
|
ns: a
|
13674
|
-
}), S[
|
13674
|
+
}), S[x] === D && (S[x] = p[x]);
|
13675
13675
|
}
|
13676
13676
|
p = S;
|
13677
13677
|
}
|
13678
13678
|
} else if (O && typeof N == "string" && Array.isArray(p))
|
13679
13679
|
p = p.join(N), p && (p = this.extendTranslation(p, t, n, r));
|
13680
13680
|
else {
|
13681
|
-
let
|
13682
|
-
const R = n.count !== void 0 && typeof n.count != "string",
|
13681
|
+
let E = !1, S = !1;
|
13682
|
+
const R = n.count !== void 0 && typeof n.count != "string", x = At.hasDefaultValue(n), D = R ? this.pluralResolver.getSuffix(l, n.count, n) : "", De = n.ordinal && R ? this.pluralResolver.getSuffix(l, n.count, {
|
13683
13683
|
ordinal: !1
|
13684
13684
|
}) : "", Fe = R && !n.ordinal && n.count === 0 && this.pluralResolver.shouldUseIntlApi(), ge = Fe && n[`defaultValue${this.options.pluralSeparator}zero`] || n[`defaultValue${D}`] || n[`defaultValue${De}`] || n.defaultValue;
|
13685
|
-
!this.isValidLookup(p) &&
|
13686
|
-
const B = (n.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && S ? void 0 : p, V =
|
13687
|
-
if (S ||
|
13685
|
+
!this.isValidLookup(p) && x && (E = !0, p = ge), this.isValidLookup(p) || (S = !0, p = s);
|
13686
|
+
const B = (n.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && S ? void 0 : p, V = x && ge !== p && this.options.updateMissing;
|
13687
|
+
if (S || E || V) {
|
13688
13688
|
if (this.logger.log(V ? "updateKey" : "missingKey", l, d, s, V ? ge : p), i) {
|
13689
13689
|
const z = this.resolve(s, {
|
13690
13690
|
...n,
|
@@ -13700,7 +13700,7 @@ class At extends Qt {
|
|
13700
13700
|
else
|
13701
13701
|
this.options.saveMissingTo === "all" ? Y = this.languageUtils.toResolveHierarchy(n.lng || this.language) : Y.push(n.lng || this.language);
|
13702
13702
|
const pr = (z, me, He) => {
|
13703
|
-
const gr =
|
13703
|
+
const gr = x && He !== p ? He : B;
|
13704
13704
|
this.options.missingKeyHandler ? this.options.missingKeyHandler(z, d, me, gr, V, n) : this.backendConnector && this.backendConnector.saveMissing && this.backendConnector.saveMissing(z, d, me, gr, V, n), this.emit("missingKey", z, d, me, p);
|
13705
13705
|
};
|
13706
13706
|
this.options.saveMissing && (this.options.saveMissingPlurals && R ? Y.forEach((z) => {
|
@@ -13710,7 +13710,7 @@ class At extends Qt {
|
|
13710
13710
|
});
|
13711
13711
|
}) : pr(Y, s, ge));
|
13712
13712
|
}
|
13713
|
-
p = this.extendTranslation(p, t, n, u, r), S && p === s && this.options.appendNamespaceToMissingKey && (p = `${d}:${s}`), (S ||
|
13713
|
+
p = this.extendTranslation(p, t, n, u, r), S && p === s && this.options.appendNamespaceToMissingKey && (p = `${d}:${s}`), (S || E) && this.options.parseMissingKeyHandler && (this.options.compatibilityAPI !== "v1" ? p = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${d}:${s}` : s, E ? p : void 0) : p = this.options.parseMissingKeyHandler(p));
|
13714
13714
|
}
|
13715
13715
|
return o ? (u.res = p, u.usedParams = this.getUsedParamsDetails(n), u) : p;
|
13716
13716
|
}
|
@@ -13779,12 +13779,12 @@ class At extends Qt {
|
|
13779
13779
|
if (this.i18nFormat && this.i18nFormat.addLookupKeys)
|
13780
13780
|
this.i18nFormat.addLookupKeys(O, c, N, L, n);
|
13781
13781
|
else {
|
13782
|
-
let
|
13783
|
-
p && (
|
13782
|
+
let E;
|
13783
|
+
p && (E = this.pluralResolver.getSuffix(N, n.count, n));
|
13784
13784
|
const S = `${this.options.pluralSeparator}zero`, R = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
|
13785
|
-
if (p && (O.push(c +
|
13786
|
-
const
|
13787
|
-
O.push(
|
13785
|
+
if (p && (O.push(c + E), n.ordinal && E.indexOf(R) === 0 && O.push(c + E.replace(R, this.options.pluralSeparator)), f && O.push(c + S)), g) {
|
13786
|
+
const x = `${c}${this.options.contextSeparator}${n.context}`;
|
13787
|
+
O.push(x), p && (O.push(x + E), n.ordinal && E.indexOf(R) === 0 && O.push(x + E.replace(R, this.options.pluralSeparator)), f && O.push(x + S));
|
13788
13788
|
}
|
13789
13789
|
}
|
13790
13790
|
let b;
|
@@ -14985,8 +14985,8 @@ function Ou(e) {
|
|
14985
14985
|
} = Xe(Ru) || {}, i = n || r || bu();
|
14986
14986
|
if (i && !i.reportNamespaces && (i.reportNamespaces = new Nu()), !i) {
|
14987
14987
|
$n("You will need to pass in an i18next instance by using initReactI18next");
|
14988
|
-
const
|
14989
|
-
return S.t =
|
14988
|
+
const E = (R, x) => typeof x == "string" ? x : x && typeof x == "object" && typeof x.defaultValue == "string" ? x.defaultValue : Array.isArray(R) ? R[R.length - 1] : R, S = [E, {}, !1];
|
14989
|
+
return S.t = E, S.i18n = {}, S.ready = !1, S;
|
14990
14990
|
}
|
14991
14991
|
i.options.react && i.options.react.wait !== void 0 && $n("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
|
14992
14992
|
const s = {
|
@@ -14999,13 +14999,13 @@ function Ou(e) {
|
|
14999
14999
|
} = s;
|
15000
15000
|
let l = e;
|
15001
15001
|
l = typeof l == "string" ? [l] : l || ["translation"], i.reportNamespaces.addUsedNamespaces && i.reportNamespaces.addUsedNamespaces(l);
|
15002
|
-
const c = (i.isInitialized || i.initializedStoreOnce) && l.every((
|
15002
|
+
const c = (i.isInitialized || i.initializedStoreOnce) && l.every((E) => pu(E, i, s)), u = xu(i, t.lng || null, s.nsMode === "fallback" ? l : l[0], d), p = () => u, f = () => Ns(i, t.lng || null, s.nsMode === "fallback" ? l : l[0], d), [g, v] = K(p);
|
15003
15003
|
let L = l.join();
|
15004
15004
|
t.lng && (L = `${t.lng}${L}`);
|
15005
15005
|
const N = Eu(L), O = _t(!0);
|
15006
15006
|
he(() => {
|
15007
15007
|
const {
|
15008
|
-
bindI18n:
|
15008
|
+
bindI18n: E,
|
15009
15009
|
bindI18nStore: S
|
15010
15010
|
} = s;
|
15011
15011
|
O.current = !0, !c && !a && (t.lng ? Eo(i, t.lng, l, () => {
|
@@ -15016,8 +15016,8 @@ function Ou(e) {
|
|
15016
15016
|
function R() {
|
15017
15017
|
O.current && v(f);
|
15018
15018
|
}
|
15019
|
-
return
|
15020
|
-
O.current = !1,
|
15019
|
+
return E && i && i.on(E, R), S && i && i.store.on(S, R), () => {
|
15020
|
+
O.current = !1, E && i && E.split(" ").forEach((x) => i.off(x, R)), S && i && S.split(" ").forEach((x) => i.store.off(x, R));
|
15021
15021
|
};
|
15022
15022
|
}, [i, L]), he(() => {
|
15023
15023
|
O.current && c && v(p);
|
@@ -15025,8 +15025,8 @@ function Ou(e) {
|
|
15025
15025
|
const b = [g, i, c];
|
15026
15026
|
if (b.t = g, b.i18n = i, b.ready = c, c || !c && !a)
|
15027
15027
|
return b;
|
15028
|
-
throw new Promise((
|
15029
|
-
t.lng ? Eo(i, t.lng, l, () =>
|
15028
|
+
throw new Promise((E) => {
|
15029
|
+
t.lng ? Eo(i, t.lng, l, () => E()) : No(i, l, () => E());
|
15030
15030
|
});
|
15031
15031
|
}
|
15032
15032
|
const Su = "City", Au = {
|
@@ -15048,50 +15048,49 @@ W.use(vu).init({
|
|
15048
15048
|
});
|
15049
15049
|
const Fu = Tt(
|
15050
15050
|
({ width: e, selectedCountry: t, onChange: n, value: r }, o) => {
|
15051
|
-
const [i, s] = K([]), [a, d] = K([]), [l, c] = K(1), [, u] = K(!1), p = 21e3, f = 100, g = _t(t), { locale: v, axios: L } = Xe(Es), { t: N } = Ou("common", { lng: v }), O = (
|
15052
|
-
const S =
|
15053
|
-
const
|
15051
|
+
const [i, s] = K([]), [a, d] = K([]), [l, c] = K(1), [, u] = K(!1), p = 21e3, f = 100, g = _t(t), { locale: v, axios: L } = Xe(Es), { t: N } = Ou("common", { lng: v }), O = (E) => {
|
15052
|
+
const S = E.map((R) => {
|
15053
|
+
const x = t && t.length > 0 ? R.name : `${R.name}-${R.countryId}`;
|
15054
15054
|
return {
|
15055
15055
|
label: R.name,
|
15056
|
-
value:
|
15056
|
+
value: x
|
15057
15057
|
};
|
15058
15058
|
});
|
15059
15059
|
s((R) => [...R, ...S]);
|
15060
|
-
}
|
15061
|
-
|
15062
|
-
r && n(r);
|
15063
|
-
const x = a.map((S) => {
|
15064
|
-
const R = t && t.length > 0 ? S.name : `${S.name}-${S.countryId}`;
|
15065
|
-
return {
|
15066
|
-
label: S.name,
|
15067
|
-
value: R
|
15068
|
-
};
|
15069
|
-
});
|
15070
|
-
s(x), g.current = t;
|
15071
|
-
}, [t, n, r, a]);
|
15072
|
-
const b = async (x) => {
|
15073
|
-
const S = x ? (x - 1) * f : 1;
|
15060
|
+
}, b = async (E, S) => {
|
15061
|
+
const R = E ? (E - 1) * f : 0;
|
15074
15062
|
try {
|
15075
|
-
const
|
15076
|
-
|
15063
|
+
const x = t && t.length > 0 ? { countryId: t, offset: R, limit: f, search: S } : { offset: R, limit: f, search: S }, D = await (L == null ? void 0 : L.post("/cities/search", x)), De = D == null ? void 0 : D.data.data;
|
15064
|
+
O(De);
|
15077
15065
|
} catch {
|
15078
15066
|
d([]);
|
15079
15067
|
}
|
15080
15068
|
};
|
15081
15069
|
return he(() => {
|
15082
15070
|
b();
|
15083
|
-
}, [t]),
|
15071
|
+
}, [t]), he(() => {
|
15072
|
+
n("");
|
15073
|
+
const E = a.map((S) => {
|
15074
|
+
const R = t && t.length > 0 ? S.name : `${S.name}-${S.countryId}`;
|
15075
|
+
return {
|
15076
|
+
label: S.name,
|
15077
|
+
value: R
|
15078
|
+
};
|
15079
|
+
});
|
15080
|
+
s(E), g.current = t, r && n(r);
|
15081
|
+
}, [t, n, r, a]), /* @__PURE__ */ h("div", { className: "snmt-city-select", children: /* @__PURE__ */ h(
|
15084
15082
|
Vh,
|
15085
15083
|
{
|
15086
15084
|
width: e,
|
15087
15085
|
options: i,
|
15088
15086
|
onChange: n,
|
15089
15087
|
ref: o,
|
15088
|
+
search: !0,
|
15090
15089
|
value: r,
|
15091
15090
|
placeholder: N("placeholder"),
|
15092
|
-
onPopupScroll: async (
|
15093
|
-
const { target: S } =
|
15094
|
-
if (S.scrollTop + S.offsetHeight
|
15091
|
+
onPopupScroll: async (E) => {
|
15092
|
+
const { target: S } = E;
|
15093
|
+
if (S.scrollTop + S.offsetHeight >= S.scrollHeight - 50) {
|
15095
15094
|
u(!0);
|
15096
15095
|
const R = l + 1;
|
15097
15096
|
i.length < p && (await b(R), c(R)), u(!1);
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@snmt-react-ui/city-select",
|
3
3
|
"private": false,
|
4
|
-
"version": "1.3.
|
4
|
+
"version": "1.3.1",
|
5
5
|
"type": "module",
|
6
6
|
"main": "dist/city-select.js",
|
7
7
|
"types": "dist/index.d.ts",
|
@@ -19,12 +19,12 @@
|
|
19
19
|
},
|
20
20
|
"dependencies": {
|
21
21
|
"@snmt-react-ui/core": "^1.5.0",
|
22
|
-
"@snmt-react-ui/select": "^1.3.
|
22
|
+
"@snmt-react-ui/select": "^1.3.38",
|
23
23
|
"i18next": "^23.11.5",
|
24
24
|
"react-i18next": "^14.1.1"
|
25
25
|
},
|
26
26
|
"peerDependencies": {
|
27
27
|
"antd": "^5.18.3"
|
28
28
|
},
|
29
|
-
"gitHead": "
|
29
|
+
"gitHead": "2d4f780f78d01dd2fbec20b08b9f9c7c69292c07"
|
30
30
|
}
|