@snmt-react-ui/city-select 2.7.1 → 2.7.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/dist/city-select.js +89 -85
- package/package.json +3 -3
package/dist/city-select.js
CHANGED
|
@@ -5805,14 +5805,18 @@ const T5 = ({
|
|
|
5805
5805
|
]
|
|
5806
5806
|
}
|
|
5807
5807
|
);
|
|
5808
|
-
},
|
|
5809
|
-
|
|
5810
|
-
|
|
5811
|
-
|
|
5812
|
-
|
|
5808
|
+
}, Z5 = {
|
|
5809
|
+
small: 20,
|
|
5810
|
+
medium: 28,
|
|
5811
|
+
large: 48
|
|
5812
|
+
}, G1 = ({ size: i = "medium", color: e = "#004ed7" }) => {
|
|
5813
|
+
const t = Z5[i], n = `no-repeat linear-gradient(${e}
|
|
5814
|
+
calc(50% - 10px), #0000 0 calc(50% + 10px), ${e} 0)`, s = {
|
|
5815
|
+
width: t,
|
|
5816
|
+
background: `${n} 0% 100%, ${n} 50% 100%, ${n} 100% 100%`,
|
|
5813
5817
|
backgroundSize: "20% calc(200% + 20px)"
|
|
5814
5818
|
};
|
|
5815
|
-
return /* @__PURE__ */ r("span", { className: "snmt-loader", style:
|
|
5819
|
+
return /* @__PURE__ */ r("span", { className: "snmt-loader", style: s });
|
|
5816
5820
|
}, K1 = k1(
|
|
5817
5821
|
({
|
|
5818
5822
|
value: i,
|
|
@@ -5955,7 +5959,7 @@ const T5 = ({
|
|
|
5955
5959
|
maxTagCount: "responsive",
|
|
5956
5960
|
maxTagPlaceholder: N1,
|
|
5957
5961
|
onPopupScroll: v1,
|
|
5958
|
-
prefix: H && /* @__PURE__ */ r(G1, { size:
|
|
5962
|
+
prefix: H && /* @__PURE__ */ r(G1, { size: "small" }),
|
|
5959
5963
|
suffixIcon: /* @__PURE__ */ r("div", { className: "wrapper-suffix-icon", children: n !== "filter" && /* @__PURE__ */ C(i1, { children: [
|
|
5960
5964
|
O && !!O.length && (n || d) && /* @__PURE__ */ r(
|
|
5961
5965
|
"div",
|
|
@@ -6010,7 +6014,7 @@ const T5 = ({
|
|
|
6010
6014
|
] }),
|
|
6011
6015
|
dropdownRender: (N) => /* @__PURE__ */ C("div", { className: "dropdown-container", children: [
|
|
6012
6016
|
/* @__PURE__ */ r("div", { className: "dropdown-menu", children: b ? b(N) : N }),
|
|
6013
|
-
H && /* @__PURE__ */ r("div", { className: "loading-overlay", children: /* @__PURE__ */ r(G1, {
|
|
6017
|
+
H && /* @__PURE__ */ r("div", { className: "loading-overlay", children: /* @__PURE__ */ r(G1, {}) })
|
|
6014
6018
|
] })
|
|
6015
6019
|
}
|
|
6016
6020
|
),
|
|
@@ -6048,7 +6052,7 @@ const T5 = ({
|
|
|
6048
6052
|
] });
|
|
6049
6053
|
}
|
|
6050
6054
|
);
|
|
6051
|
-
function
|
|
6055
|
+
function D5(i, e = 500) {
|
|
6052
6056
|
const t = Y();
|
|
6053
6057
|
return T(() => () => {
|
|
6054
6058
|
t.current && clearTimeout(t.current);
|
|
@@ -6067,7 +6071,7 @@ function P1(i) {
|
|
|
6067
6071
|
}
|
|
6068
6072
|
const H1 = 100, l1 = {
|
|
6069
6073
|
offset: 0
|
|
6070
|
-
},
|
|
6074
|
+
}, B5 = k1(
|
|
6071
6075
|
({
|
|
6072
6076
|
loadOptions: i,
|
|
6073
6077
|
width: e,
|
|
@@ -6117,7 +6121,7 @@ const H1 = 100, l1 = {
|
|
|
6117
6121
|
}
|
|
6118
6122
|
},
|
|
6119
6123
|
[i]
|
|
6120
|
-
), t1 =
|
|
6124
|
+
), t1 = D5((S) => {
|
|
6121
6125
|
G(S), S || L(l1);
|
|
6122
6126
|
}), u1 = j(
|
|
6123
6127
|
(S) => t1(S),
|
|
@@ -6228,11 +6232,11 @@ const H1 = 100, l1 = {
|
|
|
6228
6232
|
i = n, e = s;
|
|
6229
6233
|
});
|
|
6230
6234
|
return t.resolve = i, t.reject = e, t;
|
|
6231
|
-
}, $1 = (i) => i == null ? "" : "" + i,
|
|
6235
|
+
}, $1 = (i) => i == null ? "" : "" + i, j5 = (i, e, t) => {
|
|
6232
6236
|
i.forEach((n) => {
|
|
6233
6237
|
e[n] && (t[n] = e[n]);
|
|
6234
6238
|
});
|
|
6235
|
-
},
|
|
6239
|
+
}, W5 = /###/g, F1 = (i) => i && i.indexOf("###") > -1 ? i.replace(W5, ".") : i, Y1 = (i) => !i || R(i), m1 = (i, e, t) => {
|
|
6236
6240
|
const n = R(e) ? e.split(".") : e;
|
|
6237
6241
|
let s = 0;
|
|
6238
6242
|
for (; s < n.length - 1; ) {
|
|
@@ -6257,7 +6261,7 @@ const H1 = 100, l1 = {
|
|
|
6257
6261
|
for (; a.obj === void 0 && c.length; )
|
|
6258
6262
|
o = `${c[c.length - 1]}.${o}`, c = c.slice(0, c.length - 1), a = m1(i, c, Object), a && a.obj && typeof a.obj[`${a.k}.${o}`] < "u" && (a.obj = void 0);
|
|
6259
6263
|
a.obj[`${a.k}.${o}`] = t;
|
|
6260
|
-
},
|
|
6264
|
+
}, G5 = (i, e, t, n) => {
|
|
6261
6265
|
const {
|
|
6262
6266
|
obj: s,
|
|
6263
6267
|
k: o
|
|
@@ -6270,7 +6274,7 @@ const H1 = 100, l1 = {
|
|
|
6270
6274
|
} = m1(i, e);
|
|
6271
6275
|
if (t)
|
|
6272
6276
|
return t[n];
|
|
6273
|
-
},
|
|
6277
|
+
}, K5 = (i, e, t) => {
|
|
6274
6278
|
const n = R1(i, t);
|
|
6275
6279
|
return n !== void 0 ? n : R1(e, t);
|
|
6276
6280
|
}, de = (i, e, t) => {
|
|
@@ -6278,7 +6282,7 @@ const H1 = 100, l1 = {
|
|
|
6278
6282
|
n !== "__proto__" && n !== "constructor" && (n in i ? R(i[n]) || i[n] instanceof String || R(e[n]) || e[n] instanceof String ? t && (i[n] = e[n]) : de(i[n], e[n], t) : i[n] = e[n]);
|
|
6279
6283
|
return i;
|
|
6280
6284
|
}, h1 = (i) => i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
|
6281
|
-
var
|
|
6285
|
+
var P5 = {
|
|
6282
6286
|
"&": "&",
|
|
6283
6287
|
"<": "<",
|
|
6284
6288
|
">": ">",
|
|
@@ -6286,8 +6290,8 @@ var K5 = {
|
|
|
6286
6290
|
"'": "'",
|
|
6287
6291
|
"/": "/"
|
|
6288
6292
|
};
|
|
6289
|
-
const
|
|
6290
|
-
class
|
|
6293
|
+
const $5 = (i) => R(i) ? i.replace(/[&<>"'\/]/g, (e) => P5[e]) : i;
|
|
6294
|
+
class F5 {
|
|
6291
6295
|
constructor(e) {
|
|
6292
6296
|
this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
6293
6297
|
}
|
|
@@ -6299,11 +6303,11 @@ class $5 {
|
|
|
6299
6303
|
return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, n), this.regExpQueue.push(e), n;
|
|
6300
6304
|
}
|
|
6301
6305
|
}
|
|
6302
|
-
const
|
|
6306
|
+
const Y5 = [" ", ",", "?", "!", ";"], U5 = new F5(20), z5 = (i, e, t) => {
|
|
6303
6307
|
e = e || "", t = t || "";
|
|
6304
|
-
const n =
|
|
6308
|
+
const n = Y5.filter((c) => e.indexOf(c) < 0 && t.indexOf(c) < 0);
|
|
6305
6309
|
if (n.length === 0) return !0;
|
|
6306
|
-
const s =
|
|
6310
|
+
const s = U5.getRegExp(`(${n.map((c) => c === "?" ? "\\?" : c).join("|")})`);
|
|
6307
6311
|
let o = !s.test(i);
|
|
6308
6312
|
if (!o) {
|
|
6309
6313
|
const c = i.indexOf(t);
|
|
@@ -6330,7 +6334,7 @@ const F5 = [" ", ",", "?", "!", ";"], Y5 = new $5(20), U5 = (i, e, t) => {
|
|
|
6330
6334
|
s = c;
|
|
6331
6335
|
}
|
|
6332
6336
|
return s;
|
|
6333
|
-
}, M1 = (i) => i && i.replace("_", "-"),
|
|
6337
|
+
}, M1 = (i) => i && i.replace("_", "-"), J5 = {
|
|
6334
6338
|
type: "logger",
|
|
6335
6339
|
log(i) {
|
|
6336
6340
|
this.output("log", i);
|
|
@@ -6352,7 +6356,7 @@ class b1 {
|
|
|
6352
6356
|
}
|
|
6353
6357
|
init(e) {
|
|
6354
6358
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
6355
|
-
this.prefix = t.prefix || "i18next:", this.logger = e ||
|
|
6359
|
+
this.prefix = t.prefix || "i18next:", this.logger = e || J5, this.options = t, this.debug = t.debug;
|
|
6356
6360
|
}
|
|
6357
6361
|
log() {
|
|
6358
6362
|
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
@@ -6512,7 +6516,7 @@ const J1 = {};
|
|
|
6512
6516
|
class y1 extends _1 {
|
|
6513
6517
|
constructor(e) {
|
|
6514
6518
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
6515
|
-
super(),
|
|
6519
|
+
super(), j5(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = J.create("translator");
|
|
6516
6520
|
}
|
|
6517
6521
|
changeLanguage(e) {
|
|
6518
6522
|
e && (this.language = e);
|
|
@@ -6531,7 +6535,7 @@ class y1 extends _1 {
|
|
|
6531
6535
|
n === void 0 && (n = ":");
|
|
6532
6536
|
const s = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator;
|
|
6533
6537
|
let o = t.ns || this.options.defaultNS || [];
|
|
6534
|
-
const c = n && e.indexOf(n) > -1, a = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !
|
|
6538
|
+
const c = n && e.indexOf(n) > -1, a = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !z5(e, n, s);
|
|
6535
6539
|
if (c && !a) {
|
|
6536
6540
|
const u = e.match(this.interpolator.nestingRegexp);
|
|
6537
6541
|
if (u && u.length > 0)
|
|
@@ -6821,7 +6825,7 @@ class q1 {
|
|
|
6821
6825
|
}), s;
|
|
6822
6826
|
}
|
|
6823
6827
|
}
|
|
6824
|
-
let
|
|
6828
|
+
let q5 = [{
|
|
6825
6829
|
lngs: ["ach", "ak", "am", "arn", "br", "fil", "gun", "ln", "mfe", "mg", "mi", "oc", "pt", "pt-BR", "tg", "tl", "ti", "tr", "uz", "wa"],
|
|
6826
6830
|
nr: [1, 2],
|
|
6827
6831
|
fc: 1
|
|
@@ -6913,7 +6917,7 @@ let J5 = [{
|
|
|
6913
6917
|
lngs: ["he", "iw"],
|
|
6914
6918
|
nr: [1, 2, 20, 21],
|
|
6915
6919
|
fc: 22
|
|
6916
|
-
}],
|
|
6920
|
+
}], Q5 = {
|
|
6917
6921
|
1: (i) => +(i > 1),
|
|
6918
6922
|
2: (i) => +(i != 1),
|
|
6919
6923
|
3: (i) => 0,
|
|
@@ -6937,28 +6941,28 @@ let J5 = [{
|
|
|
6937
6941
|
21: (i) => i % 100 == 1 ? 1 : i % 100 == 2 ? 2 : i % 100 == 3 || i % 100 == 4 ? 3 : 0,
|
|
6938
6942
|
22: (i) => i == 1 ? 0 : i == 2 ? 1 : (i < 0 || i > 10) && i % 10 == 0 ? 2 : 3
|
|
6939
6943
|
};
|
|
6940
|
-
const
|
|
6944
|
+
const X5 = ["v1", "v2", "v3"], ei = ["v4"], Q1 = {
|
|
6941
6945
|
zero: 0,
|
|
6942
6946
|
one: 1,
|
|
6943
6947
|
two: 2,
|
|
6944
6948
|
few: 3,
|
|
6945
6949
|
many: 4,
|
|
6946
6950
|
other: 5
|
|
6947
|
-
},
|
|
6951
|
+
}, ti = () => {
|
|
6948
6952
|
const i = {};
|
|
6949
|
-
return
|
|
6953
|
+
return q5.forEach((e) => {
|
|
6950
6954
|
e.lngs.forEach((t) => {
|
|
6951
6955
|
i[t] = {
|
|
6952
6956
|
numbers: e.nr,
|
|
6953
|
-
plurals:
|
|
6957
|
+
plurals: Q5[e.fc]
|
|
6954
6958
|
};
|
|
6955
6959
|
});
|
|
6956
6960
|
}), i;
|
|
6957
6961
|
};
|
|
6958
|
-
class
|
|
6962
|
+
class ii {
|
|
6959
6963
|
constructor(e) {
|
|
6960
6964
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
6961
|
-
this.languageUtils = e, this.options = t, this.logger = J.create("pluralResolver"), (!this.options.compatibilityJSON ||
|
|
6965
|
+
this.languageUtils = e, this.options = t, this.logger = J.create("pluralResolver"), (!this.options.compatibilityJSON || ei.includes(this.options.compatibilityJSON)) && (typeof Intl > "u" || !Intl.PluralRules) && (this.options.compatibilityJSON = "v3", this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")), this.rules = ti(), this.pluralRulesCache = {};
|
|
6962
6966
|
}
|
|
6963
6967
|
addRule(e, t) {
|
|
6964
6968
|
this.rules[e] = t;
|
|
@@ -7016,14 +7020,14 @@ class ti {
|
|
|
7016
7020
|
return this.options.compatibilityJSON === "v1" ? s === 1 ? "" : typeof s == "number" ? `_plural_${s.toString()}` : o() : this.options.compatibilityJSON === "v2" || this.options.simplifyPluralSuffix && e.numbers.length === 2 && e.numbers[0] === 1 ? o() : this.options.prepend && n.toString() ? this.options.prepend + n.toString() : n.toString();
|
|
7017
7021
|
}
|
|
7018
7022
|
shouldUseIntlApi() {
|
|
7019
|
-
return !
|
|
7023
|
+
return !X5.includes(this.options.compatibilityJSON);
|
|
7020
7024
|
}
|
|
7021
7025
|
}
|
|
7022
7026
|
const X1 = function(i, e, t) {
|
|
7023
|
-
let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, o =
|
|
7027
|
+
let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, o = K5(i, e, t);
|
|
7024
7028
|
return !o && s && R(t) && (o = V1(i, t, n), o === void 0 && (o = V1(e, t, n))), o;
|
|
7025
7029
|
}, O1 = (i) => i.replace(/\$/g, "$$$$");
|
|
7026
|
-
class
|
|
7030
|
+
class ni {
|
|
7027
7031
|
constructor() {
|
|
7028
7032
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
7029
7033
|
this.logger = J.create("interpolator"), this.options = e, this.format = e.interpolation && e.interpolation.format || ((t) => t), this.init(e);
|
|
@@ -7052,7 +7056,7 @@ class ii {
|
|
|
7052
7056
|
maxReplaces: b,
|
|
7053
7057
|
alwaysFormat: M
|
|
7054
7058
|
} = e.interpolation;
|
|
7055
|
-
this.escape = t !== void 0 ? t :
|
|
7059
|
+
this.escape = t !== void 0 ? t : $5, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = o ? h1(o) : c || "{{", this.suffix = a ? h1(a) : u || "}}", this.formatSeparator = d || ",", this.unescapePrefix = l ? "" : h || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = g ? h1(g) : p || h1("$t("), this.nestingSuffix = w ? h1(w) : v || h1(")"), this.nestingOptionsSeparator = m || ",", this.maxReplaces = b || 1e3, this.alwaysFormat = M !== void 0 ? M : !1, this.resetRegExp();
|
|
7056
7060
|
}
|
|
7057
7061
|
reset() {
|
|
7058
7062
|
this.options && this.init(this.options);
|
|
@@ -7147,7 +7151,7 @@ class ii {
|
|
|
7147
7151
|
return e;
|
|
7148
7152
|
}
|
|
7149
7153
|
}
|
|
7150
|
-
const
|
|
7154
|
+
const si = (i) => {
|
|
7151
7155
|
let e = i.toLowerCase().trim();
|
|
7152
7156
|
const t = {};
|
|
7153
7157
|
if (i.indexOf("(") > -1) {
|
|
@@ -7178,7 +7182,7 @@ const ni = (i) => {
|
|
|
7178
7182
|
return a || (a = i(M1(n), s), e[c] = a), a(t);
|
|
7179
7183
|
};
|
|
7180
7184
|
};
|
|
7181
|
-
class
|
|
7185
|
+
class ri {
|
|
7182
7186
|
constructor() {
|
|
7183
7187
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
7184
7188
|
this.logger = J.create("formatter"), this.options = e, this.formats = {
|
|
@@ -7238,7 +7242,7 @@ class si {
|
|
|
7238
7242
|
const {
|
|
7239
7243
|
formatName: d,
|
|
7240
7244
|
formatOptions: l
|
|
7241
|
-
} =
|
|
7245
|
+
} = si(u);
|
|
7242
7246
|
if (this.formats[d]) {
|
|
7243
7247
|
let h = a;
|
|
7244
7248
|
try {
|
|
@@ -7258,10 +7262,10 @@ class si {
|
|
|
7258
7262
|
}, e);
|
|
7259
7263
|
}
|
|
7260
7264
|
}
|
|
7261
|
-
const
|
|
7265
|
+
const oi = (i, e) => {
|
|
7262
7266
|
i.pending[e] !== void 0 && (delete i.pending[e], i.pendingCount--);
|
|
7263
7267
|
};
|
|
7264
|
-
class
|
|
7268
|
+
class ai extends _1 {
|
|
7265
7269
|
constructor(e, t, n) {
|
|
7266
7270
|
let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
|
7267
7271
|
super(), this.backend = e, this.store = t, this.services = n, this.languageUtils = n.languageUtils, this.options = s, this.logger = J.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = s.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = s.maxRetries >= 0 ? s.maxRetries : 5, this.retryTimeout = s.retryTimeout >= 1 ? s.retryTimeout : 350, this.state = {}, this.queue = [], this.backend && this.backend.init && this.backend.init(n, s.backend, s);
|
|
@@ -7294,7 +7298,7 @@ class oi extends _1 {
|
|
|
7294
7298
|
}), this.state[e] = t ? -1 : 2, t && n && (this.state[e] = 0);
|
|
7295
7299
|
const a = {};
|
|
7296
7300
|
this.queue.forEach((u) => {
|
|
7297
|
-
|
|
7301
|
+
G5(u.loaded, [o], c), oi(u, e), t && u.errors.push(t), u.pendingCount === 0 && !u.done && (Object.keys(u.loaded).forEach((d) => {
|
|
7298
7302
|
a[d] || (a[d] = {});
|
|
7299
7303
|
const l = u.loaded[d];
|
|
7300
7304
|
l.length && l.forEach((h) => {
|
|
@@ -7453,7 +7457,7 @@ const ee = () => ({
|
|
|
7453
7457
|
skipOnVariables: !0
|
|
7454
7458
|
}
|
|
7455
7459
|
}), te = (i) => (R(i.ns) && (i.ns = [i.ns]), R(i.fallbackLng) && (i.fallbackLng = [i.fallbackLng]), R(i.fallbackNS) && (i.fallbackNS = [i.fallbackNS]), i.supportedLngs && i.supportedLngs.indexOf("cimode") < 0 && (i.supportedLngs = i.supportedLngs.concat(["cimode"])), i), x1 = () => {
|
|
7456
|
-
},
|
|
7460
|
+
}, li = (i) => {
|
|
7457
7461
|
Object.getOwnPropertyNames(Object.getPrototypeOf(i)).forEach((t) => {
|
|
7458
7462
|
typeof i[t] == "function" && (i[t] = i[t].bind(i));
|
|
7459
7463
|
});
|
|
@@ -7463,7 +7467,7 @@ class w1 extends _1 {
|
|
|
7463
7467
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 ? arguments[1] : void 0;
|
|
7464
7468
|
if (super(), this.options = te(e), this.services = {}, this.logger = J, this.modules = {
|
|
7465
7469
|
external: []
|
|
7466
|
-
},
|
|
7470
|
+
}, li(this), t && !this.isInitialized && !e.isClone) {
|
|
7467
7471
|
if (!this.options.initImmediate)
|
|
7468
7472
|
return this.init(e, t), this;
|
|
7469
7473
|
setTimeout(() => {
|
|
@@ -7488,17 +7492,17 @@ class w1 extends _1 {
|
|
|
7488
7492
|
if (!this.options.isClone) {
|
|
7489
7493
|
this.modules.logger ? J.init(o(this.modules.logger), this.options) : J.init(null, this.options);
|
|
7490
7494
|
let l;
|
|
7491
|
-
this.modules.formatter ? l = this.modules.formatter : typeof Intl < "u" && (l =
|
|
7495
|
+
this.modules.formatter ? l = this.modules.formatter : typeof Intl < "u" && (l = ri);
|
|
7492
7496
|
const h = new q1(this.options);
|
|
7493
7497
|
this.store = new z1(this.options.resources, this.options);
|
|
7494
7498
|
const g = this.services;
|
|
7495
|
-
g.logger = J, g.resourceStore = this.store, g.languageUtils = h, g.pluralResolver = new
|
|
7499
|
+
g.logger = J, g.resourceStore = this.store, g.languageUtils = h, g.pluralResolver = new ii(h, {
|
|
7496
7500
|
prepend: this.options.pluralSeparator,
|
|
7497
7501
|
compatibilityJSON: this.options.compatibilityJSON,
|
|
7498
7502
|
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
|
7499
|
-
}), l && (!this.options.interpolation.format || this.options.interpolation.format === s.interpolation.format) && (g.formatter = o(l), g.formatter.init(g, this.options), this.options.interpolation.format = g.formatter.format.bind(g.formatter)), g.interpolator = new
|
|
7503
|
+
}), l && (!this.options.interpolation.format || this.options.interpolation.format === s.interpolation.format) && (g.formatter = o(l), g.formatter.init(g, this.options), this.options.interpolation.format = g.formatter.format.bind(g.formatter)), g.interpolator = new ni(this.options), g.utils = {
|
|
7500
7504
|
hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
|
|
7501
|
-
}, g.backendConnector = new
|
|
7505
|
+
}, g.backendConnector = new ai(o(this.modules.backend), g.resourceStore, g, this.options), g.backendConnector.on("*", function(p) {
|
|
7502
7506
|
for (var w = arguments.length, v = new Array(w > 1 ? w - 1 : 0), m = 1; m < w; m++)
|
|
7503
7507
|
v[m - 1] = arguments[m];
|
|
7504
7508
|
e.emit(p, ...v);
|
|
@@ -7712,7 +7716,7 @@ W.setDefaultNamespace;
|
|
|
7712
7716
|
W.hasLoadedNamespace;
|
|
7713
7717
|
W.loadNamespaces;
|
|
7714
7718
|
W.loadLanguages;
|
|
7715
|
-
function
|
|
7719
|
+
function hi() {
|
|
7716
7720
|
if (console && console.warn) {
|
|
7717
7721
|
for (var i = arguments.length, e = new Array(i), t = 0; t < i; t++)
|
|
7718
7722
|
e[t] = arguments[t];
|
|
@@ -7723,7 +7727,7 @@ const ie = {};
|
|
|
7723
7727
|
function A1() {
|
|
7724
7728
|
for (var i = arguments.length, e = new Array(i), t = 0; t < i; t++)
|
|
7725
7729
|
e[t] = arguments[t];
|
|
7726
|
-
s1(e[0]) && ie[e[0]] || (s1(e[0]) && (ie[e[0]] = /* @__PURE__ */ new Date()),
|
|
7730
|
+
s1(e[0]) && ie[e[0]] || (s1(e[0]) && (ie[e[0]] = /* @__PURE__ */ new Date()), hi(...e));
|
|
7727
7731
|
}
|
|
7728
7732
|
const ge = (i, e) => () => {
|
|
7729
7733
|
if (i.isInitialized)
|
|
@@ -7742,7 +7746,7 @@ const ge = (i, e) => () => {
|
|
|
7742
7746
|
s1(t) && (t = [t]), t.forEach((s) => {
|
|
7743
7747
|
i.options.ns.indexOf(s) < 0 && i.options.ns.push(s);
|
|
7744
7748
|
}), i.loadLanguages(e, ge(i, n));
|
|
7745
|
-
},
|
|
7749
|
+
}, ci = function(i, e) {
|
|
7746
7750
|
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
7747
7751
|
const n = e.languages[0], s = e.options ? e.options.fallbackLng : !1, o = e.languages[e.languages.length - 1];
|
|
7748
7752
|
if (n.toLowerCase() === "cimode") return !0;
|
|
@@ -7751,15 +7755,15 @@ const ge = (i, e) => () => {
|
|
|
7751
7755
|
return d === -1 || d === 2;
|
|
7752
7756
|
};
|
|
7753
7757
|
return t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && e.services.backendConnector.backend && e.isLanguageChangingTo && !c(e.isLanguageChangingTo, i) ? !1 : !!(e.hasResourceBundle(n, i) || !e.services.backendConnector.backend || e.options.resources && !e.options.partialBundledLanguages || c(n, i) && (!s || c(o, i)));
|
|
7754
|
-
},
|
|
7758
|
+
}, di = function(i, e) {
|
|
7755
7759
|
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
7756
7760
|
return !e.languages || !e.languages.length ? (A1("i18n.languages were undefined or empty", e.languages), !0) : e.options.ignoreJSONStructure !== void 0 ? e.hasLoadedNamespace(i, {
|
|
7757
7761
|
lng: t.lng,
|
|
7758
7762
|
precheck: (s, o) => {
|
|
7759
7763
|
if (t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && s.services.backendConnector.backend && s.isLanguageChangingTo && !o(s.isLanguageChangingTo, i)) return !1;
|
|
7760
7764
|
}
|
|
7761
|
-
}) :
|
|
7762
|
-
}, s1 = (i) => typeof i == "string",
|
|
7765
|
+
}) : ci(i, e, t);
|
|
7766
|
+
}, s1 = (i) => typeof i == "string", ui = (i) => typeof i == "object" && i !== null, gi = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, Ci = {
|
|
7763
7767
|
"&": "&",
|
|
7764
7768
|
"&": "&",
|
|
7765
7769
|
"<": "<",
|
|
@@ -7780,7 +7784,7 @@ const ge = (i, e) => () => {
|
|
|
7780
7784
|
"…": "…",
|
|
7781
7785
|
"/": "/",
|
|
7782
7786
|
"/": "/"
|
|
7783
|
-
},
|
|
7787
|
+
}, pi = (i) => Ci[i], fi = (i) => i.replace(gi, pi);
|
|
7784
7788
|
let T1 = {
|
|
7785
7789
|
bindI18n: "languageChanged",
|
|
7786
7790
|
bindI18nStore: "",
|
|
@@ -7789,25 +7793,25 @@ let T1 = {
|
|
|
7789
7793
|
transWrapTextNodes: "",
|
|
7790
7794
|
transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
|
|
7791
7795
|
useSuspense: !0,
|
|
7792
|
-
unescape:
|
|
7796
|
+
unescape: fi
|
|
7793
7797
|
};
|
|
7794
|
-
const
|
|
7798
|
+
const mi = function() {
|
|
7795
7799
|
let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
7796
7800
|
T1 = {
|
|
7797
7801
|
...T1,
|
|
7798
7802
|
...i
|
|
7799
7803
|
};
|
|
7800
|
-
},
|
|
7804
|
+
}, wi = () => T1;
|
|
7801
7805
|
let Ce;
|
|
7802
|
-
const
|
|
7806
|
+
const ki = (i) => {
|
|
7803
7807
|
Ce = i;
|
|
7804
|
-
},
|
|
7808
|
+
}, Li = () => Ce, vi = {
|
|
7805
7809
|
type: "3rdParty",
|
|
7806
7810
|
init(i) {
|
|
7807
|
-
|
|
7811
|
+
mi(i.options.react), ki(i);
|
|
7808
7812
|
}
|
|
7809
|
-
},
|
|
7810
|
-
class
|
|
7813
|
+
}, Ni = d1();
|
|
7814
|
+
class xi {
|
|
7811
7815
|
constructor() {
|
|
7812
7816
|
D1(this, "getUsedNamespaces", () => Object.keys(this.usedNamespaces));
|
|
7813
7817
|
this.usedNamespaces = {};
|
|
@@ -7818,27 +7822,27 @@ class Ni {
|
|
|
7818
7822
|
});
|
|
7819
7823
|
}
|
|
7820
7824
|
}
|
|
7821
|
-
const
|
|
7825
|
+
const Ri = (i, e) => {
|
|
7822
7826
|
const t = Y();
|
|
7823
7827
|
return T(() => {
|
|
7824
7828
|
t.current = i;
|
|
7825
7829
|
}, [i, e]), t.current;
|
|
7826
|
-
}, pe = (i, e, t, n) => i.getFixedT(e, t, n),
|
|
7830
|
+
}, pe = (i, e, t, n) => i.getFixedT(e, t, n), Mi = (i, e, t, n) => j(pe(i, e, t, n), [i, e, t, n]), bi = function(i) {
|
|
7827
7831
|
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
7828
7832
|
const {
|
|
7829
7833
|
i18n: t
|
|
7830
7834
|
} = e, {
|
|
7831
7835
|
i18n: n,
|
|
7832
7836
|
defaultNS: s
|
|
7833
|
-
} = r1(
|
|
7834
|
-
if (o && !o.reportNamespaces && (o.reportNamespaces = new
|
|
7837
|
+
} = r1(Ni) || {}, o = t || n || Li();
|
|
7838
|
+
if (o && !o.reportNamespaces && (o.reportNamespaces = new xi()), !o) {
|
|
7835
7839
|
A1("You will need to pass in an i18next instance by using initReactI18next");
|
|
7836
|
-
const f = (x, L) => s1(L) ? L :
|
|
7840
|
+
const f = (x, L) => s1(L) ? L : ui(L) && s1(L.defaultValue) ? L.defaultValue : Array.isArray(x) ? x[x.length - 1] : x, k = [f, {}, !1];
|
|
7837
7841
|
return k.t = f, k.i18n = {}, k.ready = !1, k;
|
|
7838
7842
|
}
|
|
7839
7843
|
o.options.react && o.options.react.wait !== void 0 && A1("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
|
|
7840
7844
|
const c = {
|
|
7841
|
-
...
|
|
7845
|
+
...wi(),
|
|
7842
7846
|
...o.options.react,
|
|
7843
7847
|
...e
|
|
7844
7848
|
}, {
|
|
@@ -7847,10 +7851,10 @@ const xi = (i, e) => {
|
|
|
7847
7851
|
} = c;
|
|
7848
7852
|
let d = i;
|
|
7849
7853
|
d = s1(d) ? [d] : d || ["translation"], o.reportNamespaces.addUsedNamespaces && o.reportNamespaces.addUsedNamespaces(d);
|
|
7850
|
-
const l = (o.isInitialized || o.initializedStoreOnce) && d.every((f) =>
|
|
7854
|
+
const l = (o.isInitialized || o.initializedStoreOnce) && d.every((f) => di(f, o, c)), h = Mi(o, e.lng || null, c.nsMode === "fallback" ? d : d[0], u), g = () => h, p = () => pe(o, e.lng || null, c.nsMode === "fallback" ? d : d[0], u), [w, v] = V(g);
|
|
7851
7855
|
let m = d.join();
|
|
7852
7856
|
e.lng && (m = `${e.lng}${m}`);
|
|
7853
|
-
const b =
|
|
7857
|
+
const b = Ri(m), M = Y(!0);
|
|
7854
7858
|
T(() => {
|
|
7855
7859
|
const {
|
|
7856
7860
|
bindI18n: f,
|
|
@@ -7875,40 +7879,40 @@ const xi = (i, e) => {
|
|
|
7875
7879
|
throw new Promise((f) => {
|
|
7876
7880
|
e.lng ? se(o, e.lng, d, () => f()) : ne(o, d, () => f());
|
|
7877
7881
|
});
|
|
7878
|
-
},
|
|
7879
|
-
placeholder:
|
|
7880
|
-
},
|
|
7881
|
-
placeholder:
|
|
7882
|
+
}, yi = "City", Ei = {
|
|
7883
|
+
placeholder: yi
|
|
7884
|
+
}, _i = "Город", Hi = {
|
|
7885
|
+
placeholder: _i
|
|
7882
7886
|
};
|
|
7883
|
-
function
|
|
7887
|
+
function Ii(i) {
|
|
7884
7888
|
const e = Y(i);
|
|
7885
7889
|
return T(() => {
|
|
7886
7890
|
e.current = i;
|
|
7887
7891
|
}, [i]), e.current;
|
|
7888
7892
|
}
|
|
7889
|
-
W.use(
|
|
7893
|
+
W.use(vi).init({
|
|
7890
7894
|
defaultNS: "common",
|
|
7891
7895
|
lng: "en",
|
|
7892
7896
|
resources: {
|
|
7893
7897
|
en: {
|
|
7894
|
-
common:
|
|
7898
|
+
common: Ei
|
|
7895
7899
|
},
|
|
7896
7900
|
ru: {
|
|
7897
|
-
common:
|
|
7901
|
+
common: Hi
|
|
7898
7902
|
}
|
|
7899
7903
|
}
|
|
7900
7904
|
});
|
|
7901
|
-
const
|
|
7905
|
+
const Di = k1(
|
|
7902
7906
|
({ width: i, selectedCountry: e, onChange: t, value: n, id: s, disabled: o, clearable: c }, a) => {
|
|
7903
7907
|
const [u, d] = V(
|
|
7904
7908
|
[]
|
|
7905
|
-
), [l, h] = V(!1), { locale: g, axiosPeople: p } = r1(ke), w = Y(!1), v = Y(null), m = Y(u), b =
|
|
7909
|
+
), [l, h] = V(!1), { locale: g, axiosPeople: p } = r1(ke), w = Y(!1), v = Y(null), m = Y(u), b = Ii(e);
|
|
7906
7910
|
if (!p)
|
|
7907
7911
|
throw new Error(
|
|
7908
7912
|
`CitySelect requires "axiosPeople" to fetch cities.
|
|
7909
7913
|
Please provide it via SNMTUiContext.`
|
|
7910
7914
|
);
|
|
7911
|
-
const { t: M } =
|
|
7915
|
+
const { t: M } = bi("common", { lng: g }), H = j(
|
|
7912
7916
|
async (k) => {
|
|
7913
7917
|
const x = m.current.find((L) => L.value === k);
|
|
7914
7918
|
if (x)
|
|
@@ -7979,7 +7983,7 @@ const Zi = k1(
|
|
|
7979
7983
|
[p, e]
|
|
7980
7984
|
);
|
|
7981
7985
|
return E1(a, () => v.current), /* @__PURE__ */ r("div", { className: "snmt-city-select", children: /* @__PURE__ */ r(
|
|
7982
|
-
|
|
7986
|
+
B5,
|
|
7983
7987
|
{
|
|
7984
7988
|
id: s,
|
|
7985
7989
|
width: i,
|
|
@@ -7999,5 +8003,5 @@ const Zi = k1(
|
|
|
7999
8003
|
}
|
|
8000
8004
|
);
|
|
8001
8005
|
export {
|
|
8002
|
-
|
|
8006
|
+
Di as CitySelect
|
|
8003
8007
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snmt-react-ui/city-select",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "2.7.
|
|
4
|
+
"version": "2.7.3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/city-select.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"build": "tsc && vite build"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@snmt-react-ui/async-select": "^1.9.
|
|
21
|
+
"@snmt-react-ui/async-select": "^1.9.3",
|
|
22
22
|
"@snmt-react-ui/core": "^2.4.0",
|
|
23
23
|
"i18next": "^23.11.5",
|
|
24
24
|
"react-i18next": "^14.1.1",
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"antd": "^5.22.0"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "1a01a169053a07bad6ab32f44956ad73e10355de"
|
|
31
31
|
}
|