prlg-ui 1.8.109 → 1.8.111
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/index.d.ts +1 -1
- package/dist/prlg-ui.cjs.js +1 -1
- package/dist/prlg-ui.css +1 -1
- package/dist/prlg-ui.es.js +55 -37
- package/package.json +1 -1
package/dist/prlg-ui.es.js
CHANGED
|
@@ -1951,14 +1951,15 @@ const vo = {
|
|
|
1951
1951
|
s[2] || (s[2] = w("div", { class: "radio__track" }, [
|
|
1952
1952
|
w("div", { class: "radio__thumb" })
|
|
1953
1953
|
], -1)),
|
|
1954
|
-
|
|
1954
|
+
o.label || o.$slots.default ? (v(), p("label", {
|
|
1955
|
+
key: 0,
|
|
1955
1956
|
for: k(a),
|
|
1956
1957
|
class: "radio__label"
|
|
1957
1958
|
}, [
|
|
1958
1959
|
o.label ? (v(), p(re, { key: 0 }, [
|
|
1959
1960
|
ve(j(o.label), 1)
|
|
1960
1961
|
], 64)) : J(o.$slots, "default", { key: 1 })
|
|
1961
|
-
], 8, Lo)
|
|
1962
|
+
], 8, Lo)) : A("", !0)
|
|
1962
1963
|
], 2));
|
|
1963
1964
|
}
|
|
1964
1965
|
}), Do = {
|
|
@@ -1976,7 +1977,7 @@ const vo = {
|
|
|
1976
1977
|
}, Yo = { class: "dropdown__list" }, jo = {
|
|
1977
1978
|
key: 0,
|
|
1978
1979
|
class: "dropdown__loading"
|
|
1979
|
-
}, Ko = { class: "dropdown__option-
|
|
1980
|
+
}, Ko = { class: "dropdown__option-label" }, Uo = {
|
|
1980
1981
|
key: 0,
|
|
1981
1982
|
class: "dropdown__empty"
|
|
1982
1983
|
}, Zo = {
|
|
@@ -2018,13 +2019,20 @@ const vo = {
|
|
|
2018
2019
|
return (Array.isArray(t.modelValue) ? t.modelValue : [t.modelValue]).map((T) => {
|
|
2019
2020
|
if (typeof T == "object" && T !== null)
|
|
2020
2021
|
return T;
|
|
2021
|
-
const H = t.options?.find(
|
|
2022
|
-
|
|
2022
|
+
const H = t.options?.find(
|
|
2023
|
+
(X) => M(X) === T
|
|
2024
|
+
);
|
|
2025
|
+
return H || {
|
|
2026
|
+
value: T,
|
|
2027
|
+
label: String(T)
|
|
2028
|
+
};
|
|
2023
2029
|
}).filter((T) => T !== void 0);
|
|
2024
2030
|
{
|
|
2025
2031
|
if (typeof t.modelValue == "object" && t.modelValue !== null)
|
|
2026
2032
|
return [t.modelValue];
|
|
2027
|
-
const V = t.options?.find(
|
|
2033
|
+
const V = t.options?.find(
|
|
2034
|
+
(T) => M(T) === t.modelValue
|
|
2035
|
+
);
|
|
2028
2036
|
return V ? [V] : [];
|
|
2029
2037
|
}
|
|
2030
2038
|
}), y = R(() => t.multiple || !h.value.length ? "" : x(h.value[0])), g = R(() => t.multiple ? h.value.length > 0 : !!t.modelValue), $ = R(() => h.value.slice(0, t.maxTags)), S = R(() => Math.max(0, h.value.length - t.maxTags)), O = R(() => i.value ? (t.options || []).filter(
|
|
@@ -2044,7 +2052,10 @@ const vo = {
|
|
|
2044
2052
|
if (t.multiple) {
|
|
2045
2053
|
const T = M(V), H = Array.isArray(t.modelValue) ? [...t.modelValue] : [], Z = H.some((C) => typeof C == "object" && C !== null ? M(C) === T : C === T);
|
|
2046
2054
|
let X;
|
|
2047
|
-
Z ? X = H.filter((C) => typeof C == "object" && C !== null ? M(C) !== T : C !== T) : X = [
|
|
2055
|
+
Z ? X = H.filter((C) => typeof C == "object" && C !== null ? M(C) !== T : C !== T) : X = [
|
|
2056
|
+
...H,
|
|
2057
|
+
t.valueKey && t.valueKey !== "" ? M(V) : V
|
|
2058
|
+
], a("update:modelValue", X), a("change", X);
|
|
2048
2059
|
} else {
|
|
2049
2060
|
const T = t.valueKey && t.valueKey !== "" ? M(V) : V;
|
|
2050
2061
|
a("update:modelValue", T), a("change", T), n.value = !1;
|
|
@@ -2053,7 +2064,10 @@ const vo = {
|
|
|
2053
2064
|
function b(V) {
|
|
2054
2065
|
if (!t.multiple) return;
|
|
2055
2066
|
const T = M(V), Z = (Array.isArray(t.modelValue) ? [...t.modelValue] : []).filter((X) => typeof X == "object" && X !== null ? M(X) !== T : X !== T);
|
|
2056
|
-
a("update:modelValue", Z), a("change", Z), a(
|
|
2067
|
+
a("update:modelValue", Z), a("change", Z), a(
|
|
2068
|
+
"remove-tag",
|
|
2069
|
+
t.valueKey && t.valueKey !== "" ? M(V) : V
|
|
2070
|
+
);
|
|
2057
2071
|
}
|
|
2058
2072
|
function I() {
|
|
2059
2073
|
const V = t.multiple ? [] : void 0;
|
|
@@ -2091,9 +2105,12 @@ const vo = {
|
|
|
2091
2105
|
V ? (q(), t.searchable && fe(() => {
|
|
2092
2106
|
r.value?.focus();
|
|
2093
2107
|
})) : i.value = "";
|
|
2094
|
-
}), ee(
|
|
2095
|
-
|
|
2096
|
-
|
|
2108
|
+
}), ee(
|
|
2109
|
+
() => t.options,
|
|
2110
|
+
() => {
|
|
2111
|
+
n.value && q();
|
|
2112
|
+
}
|
|
2113
|
+
), he(() => {
|
|
2097
2114
|
document.addEventListener("click", F), window.addEventListener("resize", q), window.addEventListener("scroll", q);
|
|
2098
2115
|
}), Ve(() => {
|
|
2099
2116
|
document.removeEventListener("click", F), window.removeEventListener("resize", q), window.removeEventListener("scroll", q);
|
|
@@ -2107,7 +2124,11 @@ const vo = {
|
|
|
2107
2124
|
w("div", {
|
|
2108
2125
|
ref_key: "dropdownTrigger",
|
|
2109
2126
|
ref: o,
|
|
2110
|
-
class: z(["dropdown__trigger", {
|
|
2127
|
+
class: z(["dropdown__trigger", {
|
|
2128
|
+
"dropdown__trigger--active": n.value,
|
|
2129
|
+
"dropdown__trigger--multiple": V.multiple,
|
|
2130
|
+
"dropdown__trigger--error": V.error
|
|
2131
|
+
}]),
|
|
2111
2132
|
onClick: d
|
|
2112
2133
|
}, [
|
|
2113
2134
|
w("div", Ho, [
|
|
@@ -2181,36 +2202,33 @@ const vo = {
|
|
|
2181
2202
|
])
|
|
2182
2203
|
])) : A("", !0),
|
|
2183
2204
|
w("div", Yo, [
|
|
2184
|
-
V.loading ? (v(), p("div", jo, "
|
|
2205
|
+
V.loading ? (v(), p("div", jo, "Загрузка...")) : (v(), p(re, { key: 1 }, [
|
|
2185
2206
|
(v(!0), p(re, null, ge(O.value, (H) => (v(), p("div", {
|
|
2186
2207
|
key: M(H),
|
|
2187
2208
|
class: z(["dropdown__option", {
|
|
2188
2209
|
"dropdown__option--disabled": H.disabled
|
|
2189
2210
|
}])
|
|
2190
2211
|
}, [
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
handleSelect: V.multiple ? () => L(H) : () => D(H)
|
|
2212
|
-
}, void 0, !0)
|
|
2213
|
-
])
|
|
2212
|
+
V.multiple ? (v(), U(at, {
|
|
2213
|
+
key: 0,
|
|
2214
|
+
"model-value": _.value,
|
|
2215
|
+
value: M(H),
|
|
2216
|
+
disabled: H.disabled,
|
|
2217
|
+
onChange: (Z) => L(H)
|
|
2218
|
+
}, null, 8, ["model-value", "value", "disabled", "onChange"])) : (v(), U(Ft, {
|
|
2219
|
+
key: 1,
|
|
2220
|
+
"model-value": B.value,
|
|
2221
|
+
value: M(H),
|
|
2222
|
+
disabled: H.disabled,
|
|
2223
|
+
onChange: (Z) => D(H)
|
|
2224
|
+
}, null, 8, ["model-value", "value", "disabled", "onChange"])),
|
|
2225
|
+
w("span", Ko, j(x(H)), 1),
|
|
2226
|
+
J(V.$slots, "option", {
|
|
2227
|
+
option: H,
|
|
2228
|
+
selected: V.multiple ? _.value.includes(M(H)) : B.value === M(H),
|
|
2229
|
+
multiple: V.multiple,
|
|
2230
|
+
handleSelect: V.multiple ? () => L(H) : () => D(H)
|
|
2231
|
+
}, void 0, !0)
|
|
2214
2232
|
], 2))), 128)),
|
|
2215
2233
|
O.value.length ? A("", !0) : (v(), p("div", Uo, " Ничего не найдено "))
|
|
2216
2234
|
], 64))
|
|
@@ -2222,7 +2240,7 @@ const vo = {
|
|
|
2222
2240
|
V.error && V.errorText ? (v(), p("small", Zo, j(V.errorText), 1)) : A("", !0)
|
|
2223
2241
|
], 2));
|
|
2224
2242
|
}
|
|
2225
|
-
}), Xo = /* @__PURE__ */ ue(Qo, [["__scopeId", "data-v-
|
|
2243
|
+
}), Xo = /* @__PURE__ */ ue(Qo, [["__scopeId", "data-v-337f59b9"]]), Go = {
|
|
2226
2244
|
key: 0,
|
|
2227
2245
|
class: "paginator"
|
|
2228
2246
|
}, Jo = ["disabled"], ea = { class: "paginator__pages" }, ta = ["onClick"], la = ["disabled"], na = {
|