mhz-ui 1.2.41 → 1.2.42
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/UiEditor/UiEditor.js +18 -13
- package/dist/UiFlex/UiFlex.css +1 -1
- package/dist/UiFlex/UiFlex.js +11 -11
- package/dist/UiModal/UiModal.css +1 -1
- package/dist/UiModal/UiModal.js +1 -1
- package/dist/UiPagination/UiPagination.js +34 -34
- package/dist/UiSearch/UiSearch.js +34 -34
- package/dist/UiUpload/UiUpload.js +30 -30
- package/package.json +16 -16
|
@@ -10277,7 +10277,8 @@ function sh(n, e, t) {
|
|
|
10277
10277
|
}
|
|
10278
10278
|
var Lr = class {
|
|
10279
10279
|
constructor(n) {
|
|
10280
|
-
|
|
10280
|
+
var e;
|
|
10281
|
+
this.find = n.find, this.handler = n.handler, this.undoable = (e = n.undoable) != null ? e : !0;
|
|
10281
10282
|
}
|
|
10282
10283
|
}, oh = (n, e) => {
|
|
10283
10284
|
if (cs(e))
|
|
@@ -10324,7 +10325,7 @@ function Cn(n) {
|
|
|
10324
10325
|
commands: y,
|
|
10325
10326
|
chain: x,
|
|
10326
10327
|
can: E
|
|
10327
|
-
}) === null || !p.steps.length || (p.setMeta(l, {
|
|
10328
|
+
}) === null || !p.steps.length || (f.undoable && p.setMeta(l, {
|
|
10328
10329
|
transform: p,
|
|
10329
10330
|
from: r,
|
|
10330
10331
|
to: i,
|
|
@@ -10669,7 +10670,7 @@ var Br = class {
|
|
|
10669
10670
|
*/
|
|
10670
10671
|
get plugins() {
|
|
10671
10672
|
const { editor: n } = this;
|
|
10672
|
-
return as([...this.extensions].reverse()).
|
|
10673
|
+
return as([...this.extensions].reverse()).flatMap((r) => {
|
|
10673
10674
|
const i = {
|
|
10674
10675
|
name: r.name,
|
|
10675
10676
|
options: r.options,
|
|
@@ -10719,7 +10720,7 @@ var Br = class {
|
|
|
10719
10720
|
s.push(...f);
|
|
10720
10721
|
}
|
|
10721
10722
|
return s;
|
|
10722
|
-
})
|
|
10723
|
+
});
|
|
10723
10724
|
}
|
|
10724
10725
|
/**
|
|
10725
10726
|
* Get all attributes from the extensions.
|
|
@@ -11972,7 +11973,7 @@ var vp = class extends jf {
|
|
|
11972
11973
|
throw new Error(
|
|
11973
11974
|
"[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment."
|
|
11974
11975
|
);
|
|
11975
|
-
this.createView(e), this.emit("mount", { editor: this }), window.setTimeout(() => {
|
|
11976
|
+
this.createView(e), this.emit("mount", { editor: this }), this.css && !document.head.contains(this.css) && document.head.appendChild(this.css), window.setTimeout(() => {
|
|
11976
11977
|
this.isDestroyed || (this.commands.focus(this.options.autofocus), this.emit("create", { editor: this }), this.isInitialized = !0);
|
|
11977
11978
|
}, 0);
|
|
11978
11979
|
}
|
|
@@ -12056,7 +12057,7 @@ var vp = class extends jf {
|
|
|
12056
12057
|
this.editorState = e;
|
|
12057
12058
|
},
|
|
12058
12059
|
dispatch: (e) => {
|
|
12059
|
-
this.
|
|
12060
|
+
this.dispatchTransaction(e);
|
|
12060
12061
|
},
|
|
12061
12062
|
// Stub some commonly accessed properties to prevent errors
|
|
12062
12063
|
composing: !1,
|
|
@@ -12356,7 +12357,8 @@ function Dt(n) {
|
|
|
12356
12357
|
const f = t.from + a + o.length;
|
|
12357
12358
|
s.addMark(t.from + a, f, n.type.create(i || {})), s.removeStoredMark(n.type);
|
|
12358
12359
|
}
|
|
12359
|
-
}
|
|
12360
|
+
},
|
|
12361
|
+
undoable: n.undoable
|
|
12360
12362
|
});
|
|
12361
12363
|
}
|
|
12362
12364
|
function Op(n) {
|
|
@@ -12377,7 +12379,8 @@ function Op(n) {
|
|
|
12377
12379
|
s.insert(c, n.type.create(i)).delete(s.mapping.map(o), s.mapping.map(l));
|
|
12378
12380
|
}
|
|
12379
12381
|
s.scrollIntoView();
|
|
12380
|
-
}
|
|
12382
|
+
},
|
|
12383
|
+
undoable: n.undoable
|
|
12381
12384
|
});
|
|
12382
12385
|
}
|
|
12383
12386
|
function Ai(n) {
|
|
@@ -12388,7 +12391,8 @@ function Ai(n) {
|
|
|
12388
12391
|
if (!i.node(-1).canReplaceWith(i.index(-1), i.indexAfter(-1), n.type))
|
|
12389
12392
|
return null;
|
|
12390
12393
|
e.tr.delete(t.from, t.to).setBlockType(t.from, t.from, n.type, s);
|
|
12391
|
-
}
|
|
12394
|
+
},
|
|
12395
|
+
undoable: n.undoable
|
|
12392
12396
|
});
|
|
12393
12397
|
}
|
|
12394
12398
|
function It(n) {
|
|
@@ -12411,7 +12415,8 @@ function It(n) {
|
|
|
12411
12415
|
}
|
|
12412
12416
|
const u = o.doc.resolve(t.from - 1).nodeBefore;
|
|
12413
12417
|
u && u.type === n.type && Ye(o.doc, t.from - 1) && (!n.joinPredicate || n.joinPredicate(r, u)) && o.join(t.from - 1);
|
|
12414
|
-
}
|
|
12418
|
+
},
|
|
12419
|
+
undoable: n.undoable
|
|
12415
12420
|
});
|
|
12416
12421
|
}
|
|
12417
12422
|
function Ap(n, e) {
|
|
@@ -12544,10 +12549,10 @@ var Dp = class extends vp {
|
|
|
12544
12549
|
const r = n.editor;
|
|
12545
12550
|
r && r.options.element && e.value && vc(() => {
|
|
12546
12551
|
var i;
|
|
12547
|
-
if (!e.value || !((i = r.
|
|
12552
|
+
if (!e.value || !((i = r.view.dom) != null && i.firstChild))
|
|
12548
12553
|
return;
|
|
12549
12554
|
const s = di(e.value);
|
|
12550
|
-
e.value.append(
|
|
12555
|
+
e.value.append(r.view.dom), r.contentComponent = t.ctx._, t && (r.appContext = {
|
|
12551
12556
|
...t.appContext,
|
|
12552
12557
|
// Vue internally uses prototype chain to forward/shadow injects across the entire component chain
|
|
12553
12558
|
// so don't use object spread operator or 'Object.assign' and just set `provides` as is on editor's appContext
|
|
@@ -12620,7 +12625,7 @@ var Rp = (n = {}) => {
|
|
|
12620
12625
|
e.value = new Dp(n);
|
|
12621
12626
|
}), $i(() => {
|
|
12622
12627
|
var t, r, i;
|
|
12623
|
-
const s = (t = e.value) == null ? void 0 : t.
|
|
12628
|
+
const s = (t = e.value) == null ? void 0 : t.view.dom, o = s?.cloneNode(!0);
|
|
12624
12629
|
(r = s?.parentNode) == null || r.replaceChild(o, s), (i = e.value) == null || i.destroy();
|
|
12625
12630
|
}), e;
|
|
12626
12631
|
};
|
package/dist/UiFlex/UiFlex.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._flex_si9vt_1{display:flex;flex-grow:var(--
|
|
1
|
+
._flex_si9vt_1{display:flex;flex-grow:var(--v61824a30);flex-shrink:var(--c7399644);flex-direction:var(--v5bfadb0b);flex-wrap:var(--v3f140fc2);gap:var(--f414cf4a);align-items:var(--v4416f6e0);justify-content:var(--v43cd669e);width:var(--v7076914b)}.dark ._flex_si9vt_1{color:var(--color-white)}
|
package/dist/UiFlex/UiFlex.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./UiFlex.css";
|
|
2
|
-
import { defineComponent as i, useCssVars as f, computed as t, createBlock as m, openBlock as g, resolveDynamicComponent as w, normalizeClass as _, withCtx as
|
|
3
|
-
import { _ as
|
|
2
|
+
import { defineComponent as i, useCssVars as f, computed as t, createBlock as m, openBlock as g, resolveDynamicComponent as w, normalizeClass as _, withCtx as v, renderSlot as y } from "vue";
|
|
3
|
+
import { _ as C } from "../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
const x = "div", h = "normal", k = "normal", A = "8", F = /* @__PURE__ */ i({
|
|
5
5
|
__name: "UiFlex",
|
|
6
6
|
props: {
|
|
@@ -15,14 +15,14 @@ const x = "div", h = "normal", k = "normal", A = "8", F = /* @__PURE__ */ i({
|
|
|
15
15
|
},
|
|
16
16
|
setup(e) {
|
|
17
17
|
f((o) => ({
|
|
18
|
-
|
|
18
|
+
v61824a30: p.value,
|
|
19
19
|
c7399644: c.value,
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
v5bfadb0b: s.value,
|
|
21
|
+
v3f140fc2: r.value,
|
|
22
22
|
f414cf4a: u.value,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
v4416f6e0: n.value,
|
|
24
|
+
v43cd669e: l.value,
|
|
25
|
+
v7076914b: d.value
|
|
26
26
|
}));
|
|
27
27
|
const a = e, s = t(() => a.column ? "column" : "row"), n = t(() => a.align), l = t(() => a.justify), r = t(() => a.wrap ? "wrap" : "nowrap"), u = t(() => a.gap ? `${a.gap}px` : "0"), c = t(() => a.shrink ? "1" : "0"), p = t(() => a.grow ? "1" : "0"), d = t(() => a.grow ? "100%" : "auto");
|
|
28
28
|
return (o, D) => (g(), m(w(a.tag), {
|
|
@@ -35,8 +35,8 @@ const x = "div", h = "normal", k = "normal", A = "8", F = /* @__PURE__ */ i({
|
|
|
35
35
|
"data-shrink": a.shrink,
|
|
36
36
|
"data-grow": a.grow
|
|
37
37
|
}, {
|
|
38
|
-
default:
|
|
39
|
-
|
|
38
|
+
default: v(() => [
|
|
39
|
+
y(o.$slots, "default")
|
|
40
40
|
]),
|
|
41
41
|
_: 3
|
|
42
42
|
}, 8, ["class", "data-column", "data-align", "data-justify", "data-wrap", "data-gap", "data-shrink", "data-grow"]));
|
|
@@ -45,7 +45,7 @@ const x = "div", h = "normal", k = "normal", A = "8", F = /* @__PURE__ */ i({
|
|
|
45
45
|
flex: U
|
|
46
46
|
}, B = {
|
|
47
47
|
$style: j
|
|
48
|
-
}, b = /* @__PURE__ */
|
|
48
|
+
}, b = /* @__PURE__ */ C(F, [["__cssModules", B]]);
|
|
49
49
|
export {
|
|
50
50
|
b as default
|
|
51
51
|
};
|
package/dist/UiModal/UiModal.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._container_130xv_1{position:fixed;inset:0;z-index:999;display:flex;align-items:center;justify-content:center;width:100%;height:100dvh;background-color:var(--color-gray-transparent)}._modal_130xv_13{position:relative;display:flex;flex-direction:column;gap:12px;width:var(--
|
|
1
|
+
._container_130xv_1{position:fixed;inset:0;z-index:999;display:flex;align-items:center;justify-content:center;width:100%;height:100dvh;background-color:var(--color-gray-transparent)}._modal_130xv_13{position:relative;display:flex;flex-direction:column;gap:12px;width:var(--v3713408b);max-width:100%;height:auto;padding:24px;outline:none;background-color:var(--color-white);border-radius:16px;box-shadow:0 0 16px 0 var(--color-gray-transparent)}._modal_130xv_13[data-scrollable=true]{max-height:64dvh;overflow-y:auto}._header_130xv_32{display:flex;justify-content:flex-end}._buttons_130xv_37{display:flex;gap:16px}.dark ._modal_130xv_13{background-color:var(--color-black);box-shadow:0 0 16px 0 var(--color-black-transparent)}.dark ._slot_130xv_46{color:var(--color-white)}
|
package/dist/UiModal/UiModal.js
CHANGED
|
@@ -16,7 +16,7 @@ const U = ["data-scrollable"], T = /* @__PURE__ */ M({
|
|
|
16
16
|
emits: ["update:modelValue", "confirm"],
|
|
17
17
|
setup(C, { emit: V }) {
|
|
18
18
|
S((o) => ({
|
|
19
|
-
|
|
19
|
+
v3713408b: h.value
|
|
20
20
|
}));
|
|
21
21
|
const e = C, s = V, h = $(() => `${e.width}px`), r = document.querySelector("body"), l = k(!1);
|
|
22
22
|
x(
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./UiPagination.css";
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { M as
|
|
4
|
-
import { _ as
|
|
5
|
-
const
|
|
2
|
+
import { defineComponent as g, createElementBlock as m, openBlock as c, normalizeClass as o, createElementVNode as s, toDisplayString as d, unref as p } from "vue";
|
|
3
|
+
import { M as r } from "../index-DajWja1y.js";
|
|
4
|
+
import { _ as y } from "../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
const f = ["disabled"], $ = ["disabled"], k = ["disabled"], v = ["disabled"], C = /* @__PURE__ */ g({
|
|
6
6
|
__name: "UiPagination",
|
|
7
7
|
props: {
|
|
8
8
|
page: {},
|
|
@@ -10,50 +10,50 @@ const $ = ["disabled"], c = ["disabled"], k = ["disabled"], v = ["disabled"], C
|
|
|
10
10
|
lang: { default: "ru" }
|
|
11
11
|
},
|
|
12
12
|
emits: ["update"],
|
|
13
|
-
setup(
|
|
14
|
-
const
|
|
15
|
-
function
|
|
16
|
-
|
|
13
|
+
setup(t, { emit: u }) {
|
|
14
|
+
const a = t, b = u;
|
|
15
|
+
function l(e) {
|
|
16
|
+
b("update", e), document.querySelector("main")?.scrollTo(0, 0);
|
|
17
17
|
}
|
|
18
|
-
return (
|
|
19
|
-
class: o(
|
|
18
|
+
return (e, n) => (c(), m("div", {
|
|
19
|
+
class: o(e.$style.pagination)
|
|
20
20
|
}, [
|
|
21
|
-
|
|
22
|
-
onClick:
|
|
21
|
+
s("button", {
|
|
22
|
+
onClick: n[0] || (n[0] = (i) => l(1)),
|
|
23
23
|
disabled: t.page === 1,
|
|
24
|
-
class: o(
|
|
24
|
+
class: o(e.$style.button),
|
|
25
25
|
type: "button"
|
|
26
|
-
}, " << ", 10,
|
|
27
|
-
|
|
28
|
-
onClick:
|
|
26
|
+
}, " << ", 10, f),
|
|
27
|
+
s("button", {
|
|
28
|
+
onClick: n[1] || (n[1] = (i) => l(a.page - 1)),
|
|
29
29
|
disabled: t.page === 1,
|
|
30
|
-
class: o(
|
|
30
|
+
class: o(e.$style.button),
|
|
31
31
|
type: "button"
|
|
32
|
-
}, " < ", 10,
|
|
33
|
-
|
|
34
|
-
class: o(
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
onClick:
|
|
32
|
+
}, " < ", 10, $),
|
|
33
|
+
s("div", {
|
|
34
|
+
class: o(e.$style.text)
|
|
35
|
+
}, d(t.page) + " " + d(p(r)[a.lang].of) + " " + d(t.total), 3),
|
|
36
|
+
s("button", {
|
|
37
|
+
onClick: n[2] || (n[2] = (i) => l(a.page + 1)),
|
|
38
38
|
disabled: t.page === t.total,
|
|
39
|
-
class: o(
|
|
39
|
+
class: o(e.$style.button),
|
|
40
40
|
type: "button"
|
|
41
41
|
}, " > ", 10, k),
|
|
42
|
-
|
|
43
|
-
onClick:
|
|
42
|
+
s("button", {
|
|
43
|
+
onClick: n[3] || (n[3] = (i) => l(a.total)),
|
|
44
44
|
disabled: t.page === t.total,
|
|
45
|
-
class: o(
|
|
45
|
+
class: o(e.$style.button),
|
|
46
46
|
type: "button"
|
|
47
47
|
}, " >> ", 10, v)
|
|
48
48
|
], 2));
|
|
49
49
|
}
|
|
50
|
-
}),
|
|
51
|
-
pagination:
|
|
52
|
-
button:
|
|
53
|
-
text:
|
|
54
|
-
},
|
|
55
|
-
$style:
|
|
56
|
-
}, z = /* @__PURE__ */
|
|
50
|
+
}), S = "_pagination_1l1i5_1", E = "_button_1l1i5_9", M = "_text_1l1i5_30", U = {
|
|
51
|
+
pagination: S,
|
|
52
|
+
button: E,
|
|
53
|
+
text: M
|
|
54
|
+
}, B = {
|
|
55
|
+
$style: U
|
|
56
|
+
}, z = /* @__PURE__ */ y(C, [["__cssModules", B]]);
|
|
57
57
|
export {
|
|
58
58
|
z as default
|
|
59
59
|
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import "./UiSearch.css";
|
|
2
|
-
import { createElementBlock as r, openBlock as o, createElementVNode as M, defineComponent as N, ref as I, computed as T, normalizeClass as S, createVNode as $, createCommentVNode as
|
|
2
|
+
import { createElementBlock as r, openBlock as o, createElementVNode as M, defineComponent as N, ref as I, computed as T, normalizeClass as S, createVNode as $, createCommentVNode as g, unref as V, withKeys as z, Fragment as p, createTextVNode as w, toDisplayString as v, renderList as C, createBlock as B, resolveDynamicComponent as O, withCtx as R } from "vue";
|
|
3
3
|
import { RouterLink as U } from "vue-router";
|
|
4
4
|
import { o as D } from "../index-D1B6FCCq.js";
|
|
5
5
|
import F from "../UiInput/UiInput.js";
|
|
6
6
|
import { M as E } from "../index-DajWja1y.js";
|
|
7
7
|
import { _ as L } from "../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
8
|
const P = { trailing: !0 };
|
|
9
|
-
function
|
|
9
|
+
function x(d, a = 25, e = {}) {
|
|
10
10
|
if (e = {
|
|
11
11
|
...P,
|
|
12
12
|
...e
|
|
13
13
|
}, !Number.isFinite(a)) throw new TypeError("Expected `wait` to be a finite number");
|
|
14
14
|
let y, n, f = [], c, l;
|
|
15
|
-
const h = (s, t) => (c =
|
|
15
|
+
const h = (s, t) => (c = A(d, s, t), c.finally(() => {
|
|
16
16
|
if (c = null, e.trailing && l && !n) {
|
|
17
17
|
const i = h(s, l);
|
|
18
18
|
return l = null, i;
|
|
19
19
|
}
|
|
20
|
-
}), c),
|
|
20
|
+
}), c), m = function(...s) {
|
|
21
21
|
return e.trailing && (l = s), c || new Promise((t) => {
|
|
22
22
|
const i = !n && e.leading;
|
|
23
23
|
clearTimeout(n), n = setTimeout(() => {
|
|
@@ -28,35 +28,35 @@ function A(p, a = 25, e = {}) {
|
|
|
28
28
|
f = [];
|
|
29
29
|
}, a), i ? (y = h(this, s), t(y)) : f.push(t);
|
|
30
30
|
});
|
|
31
|
-
},
|
|
31
|
+
}, _ = (s) => {
|
|
32
32
|
s && (clearTimeout(s), n = null);
|
|
33
33
|
};
|
|
34
|
-
return
|
|
35
|
-
|
|
36
|
-
},
|
|
37
|
-
if (
|
|
34
|
+
return m.isPending = () => !!n, m.cancel = () => {
|
|
35
|
+
_(n), f = [], l = null;
|
|
36
|
+
}, m.flush = () => {
|
|
37
|
+
if (_(n), !l || c) return;
|
|
38
38
|
const s = l;
|
|
39
39
|
return l = null, h(this, s);
|
|
40
|
-
},
|
|
40
|
+
}, m;
|
|
41
41
|
}
|
|
42
|
-
async function
|
|
43
|
-
return await
|
|
42
|
+
async function A(d, a, e) {
|
|
43
|
+
return await d.apply(a, e);
|
|
44
44
|
}
|
|
45
|
-
const
|
|
45
|
+
const K = {
|
|
46
46
|
xmlns: "http://www.w3.org/2000/svg",
|
|
47
47
|
width: "16",
|
|
48
48
|
height: "16",
|
|
49
49
|
fill: "none"
|
|
50
50
|
};
|
|
51
|
-
function
|
|
52
|
-
return o(), r("svg",
|
|
51
|
+
function j(d, a) {
|
|
52
|
+
return o(), r("svg", K, [...a[0] || (a[0] = [
|
|
53
53
|
M("path", {
|
|
54
54
|
fill: "#bbb",
|
|
55
55
|
d: "M13.5 15.338a.5.5 0 1 0 .737-.676zm.737-.676-1.398-1.523-.737.676 1.399 1.523zM13.5 7.628c0 3.394-2.695 6.129-6 6.129v1c3.875 0 7-3.201 7-7.129zm-6 6.129c-3.305 0-6-2.735-6-6.129h-1c0 3.928 3.125 7.129 7 7.129zm-6-6.129c0-3.393 2.695-6.128 6-6.128v-1C3.625.5.5 3.7.5 7.628zm6-6.128c3.305 0 6 2.735 6 6.128h1C14.5 3.701 11.375.5 7.5.5z"
|
|
56
56
|
}, null, -1)
|
|
57
57
|
])]);
|
|
58
58
|
}
|
|
59
|
-
const G = { render:
|
|
59
|
+
const G = { render: j }, Y = 300, q = /* @__PURE__ */ N({
|
|
60
60
|
__name: "UiSearch",
|
|
61
61
|
props: {
|
|
62
62
|
modelValue: {},
|
|
@@ -66,8 +66,8 @@ const G = { render: x }, Y = 300, q = /* @__PURE__ */ N({
|
|
|
66
66
|
lang: { default: "ru" }
|
|
67
67
|
},
|
|
68
68
|
emits: ["update:modelValue"],
|
|
69
|
-
setup(
|
|
70
|
-
const e =
|
|
69
|
+
setup(d, { emit: a }) {
|
|
70
|
+
const e = d, y = a, n = I(!1), f = x(async (t) => {
|
|
71
71
|
y("update:modelValue", t);
|
|
72
72
|
}, Y);
|
|
73
73
|
function c() {
|
|
@@ -79,15 +79,15 @@ const G = { render: x }, Y = 300, q = /* @__PURE__ */ N({
|
|
|
79
79
|
function h() {
|
|
80
80
|
l(), y("update:modelValue", "");
|
|
81
81
|
}
|
|
82
|
-
const
|
|
83
|
-
D(
|
|
82
|
+
const m = T(() => e.results ? Object.values(e.results).reduce((t, i) => t + (i ? i.length : 0), 0) : !1), _ = I();
|
|
83
|
+
D(_, () => {
|
|
84
84
|
l();
|
|
85
85
|
});
|
|
86
86
|
const s = T(() => window.IS_STORYBOOK ? "a" : U);
|
|
87
87
|
return (t, i) => (o(), r("div", {
|
|
88
88
|
class: S(t.$style.container),
|
|
89
89
|
ref_key: "containerElement",
|
|
90
|
-
ref:
|
|
90
|
+
ref: _
|
|
91
91
|
}, [
|
|
92
92
|
$(F, {
|
|
93
93
|
modelValue: e.modelValue,
|
|
@@ -101,37 +101,37 @@ const G = { render: x }, Y = 300, q = /* @__PURE__ */ N({
|
|
|
101
101
|
key: 0,
|
|
102
102
|
class: S(t.$style.results)
|
|
103
103
|
}, [
|
|
104
|
-
e.modelValue.length < 3 ? (o(), r(
|
|
104
|
+
e.modelValue.length < 3 ? (o(), r(p, { key: 0 }, [
|
|
105
105
|
w(v(V(E)[e.lang].enterMoreSymbols), 1)
|
|
106
|
-
], 64)) :
|
|
107
|
-
e.modelValue.length > 2 && !e.isSuccess ? (o(), r(
|
|
106
|
+
], 64)) : g("", !0),
|
|
107
|
+
e.modelValue.length > 2 && !e.isSuccess ? (o(), r(p, { key: 1 }, [
|
|
108
108
|
w(v(V(E)[e.lang].loading), 1)
|
|
109
|
-
], 64)) :
|
|
110
|
-
e.modelValue.length > 2 && !
|
|
109
|
+
], 64)) : g("", !0),
|
|
110
|
+
e.modelValue.length > 2 && !m.value && e.isSuccess ? (o(), r(p, { key: 2 }, [
|
|
111
111
|
w(v(V(E)[e.lang].noResults), 1)
|
|
112
|
-
], 64)) :
|
|
113
|
-
e.modelValue.length > 2 &&
|
|
112
|
+
], 64)) : g("", !0),
|
|
113
|
+
e.modelValue.length > 2 && m.value && e.isSuccess ? (o(!0), r(p, { key: 3 }, C(e.searchScheme, (u) => (o(), r("div", {
|
|
114
114
|
key: u.type,
|
|
115
115
|
class: S(t.$style.resultsInner)
|
|
116
116
|
}, [
|
|
117
|
-
|
|
117
|
+
d.results?.[u.type]?.length ? (o(), r(p, { key: 0 }, [
|
|
118
118
|
M("div", {
|
|
119
119
|
class: S(t.$style.type)
|
|
120
120
|
}, v(u.type) + ":", 3),
|
|
121
|
-
(o(!0), r(
|
|
121
|
+
(o(!0), r(p, null, C(d.results[u.type], (k) => (o(), B(O(s.value), {
|
|
122
122
|
key: k._id,
|
|
123
123
|
to: `${u.url}/${k._id}`,
|
|
124
124
|
onClick: h,
|
|
125
125
|
class: S(t.$style.link)
|
|
126
126
|
}, {
|
|
127
127
|
default: R(() => [
|
|
128
|
-
(o(!0), r(
|
|
128
|
+
(o(!0), r(p, null, C(u.labels, (b) => (o(), r("span", { key: b }, v(k[b]), 1))), 128))
|
|
129
129
|
]),
|
|
130
130
|
_: 2
|
|
131
131
|
}, 1032, ["to", "class"]))), 128))
|
|
132
|
-
], 64)) :
|
|
133
|
-
], 2))), 128)) :
|
|
134
|
-
], 2)) :
|
|
132
|
+
], 64)) : g("", !0)
|
|
133
|
+
], 2))), 128)) : g("", !0)
|
|
134
|
+
], 2)) : g("", !0)
|
|
135
135
|
], 2));
|
|
136
136
|
}
|
|
137
137
|
}), H = "_container_7y6o9_1", J = "_results_7y6o9_6", Q = "_resultsInner_7y6o9_22", W = "_type_7y6o9_31", X = "_link_7y6o9_36", Z = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./UiUpload.css";
|
|
2
|
-
import { createElementBlock as o, openBlock as s, createStaticVNode as M, defineComponent as z, ref as b, computed as I, normalizeClass as n, createElementVNode as r, withDirectives as D, createCommentVNode as d, toDisplayString as a, createVNode as m, unref as u, withCtx as
|
|
3
|
-
import
|
|
4
|
-
import { M as
|
|
2
|
+
import { createElementBlock as o, openBlock as s, createStaticVNode as M, defineComponent as z, ref as b, computed as I, normalizeClass as n, createElementVNode as r, withDirectives as D, createCommentVNode as d, toDisplayString as a, createVNode as m, unref as u, withCtx as v, createTextVNode as p, Fragment as B, renderList as E, vShow as F } from "vue";
|
|
3
|
+
import y from "../UiButton/UiButton.js";
|
|
4
|
+
import { M as g } from "../index-DajWja1y.js";
|
|
5
5
|
import { _ as N } from "../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
6
|
const V = {
|
|
7
7
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -9,15 +9,15 @@ const V = {
|
|
|
9
9
|
height: "16",
|
|
10
10
|
fill: "none"
|
|
11
11
|
};
|
|
12
|
-
function A(
|
|
13
|
-
return s(), o("svg", V, [...
|
|
12
|
+
function A(_, c) {
|
|
13
|
+
return s(), o("svg", V, [...c[0] || (c[0] = [
|
|
14
14
|
M('<g fill="currentColor" fill-rule="evenodd" clip-path="url(#a)" clip-rule="evenodd"><path d="M12.219 0h.875Q15.532.469 16 2.906v.875a3.6 3.6 0 0 1-.766 1.719l-4.546 4.547q-1.536 1.189-3.376.562a3.55 3.55 0 0 1-1.234-.828q-.37-.747.39-1.078a1 1 0 0 1 .438.031q.3.253.625.47 1.09.563 2.125-.095 2.288-2.241 4.547-4.515.928-1.322-.062-2.594-1.287-1.184-2.735-.203a143 143 0 0 1-2.531 2.5q-.72.3-1.016-.422a.8.8 0 0 1 .094-.562L10.531.733A3.6 3.6 0 0 1 12.22 0"></path><path d="M3.781 16h-.875Q.47 15.532 0 13.094v-.875q.151-.96.766-1.719l4.172-4.172Q6.594 5.062 8.53 5.86q.46.227.844.563a.75.75 0 0 1 .266.797q-.274.609-.922.422l-.688-.5q-1.065-.513-2.062.125-2.1 2.053-4.172 4.14-.94 1.35.094 2.625 1.189 1.08 2.578.266l2.281-2.219q.88-.318 1.031.594a.7.7 0 0 1-.11.39Q6.587 14.15 5.5 15.235A3.6 3.6 0 0 1 3.781 16"></path></g><defs><clipPath id="a"><path fill="currentColor" d="M0 0h16v16H0z"></path></clipPath></defs>', 2)
|
|
15
15
|
])]);
|
|
16
16
|
}
|
|
17
|
-
const L = { render: A },
|
|
17
|
+
const L = { render: A }, h = 10 * 1024 * 1024;
|
|
18
18
|
new File([""], "file1.png");
|
|
19
19
|
new File([""], "file2.png");
|
|
20
|
-
const Q = ["data-error"], U = ["accept", "multiple"],
|
|
20
|
+
const Q = ["data-error"], U = ["accept", "multiple"], x = ["data-label"], P = /* @__PURE__ */ z({
|
|
21
21
|
__name: "UiUpload",
|
|
22
22
|
props: {
|
|
23
23
|
label: { default: void 0 },
|
|
@@ -31,23 +31,23 @@ const Q = ["data-error"], U = ["accept", "multiple"], P = ["data-label"], R = /*
|
|
|
31
31
|
lang: { default: "ru" }
|
|
32
32
|
},
|
|
33
33
|
emits: ["add", "remove", "upload"],
|
|
34
|
-
setup(
|
|
35
|
-
const e =
|
|
34
|
+
setup(_, { emit: c }) {
|
|
35
|
+
const e = _, f = c, $ = b(), k = b(0), j = I(() => e.extensions.map((l) => `.${l}`).join(","));
|
|
36
36
|
function C() {
|
|
37
37
|
$?.value?.click?.();
|
|
38
38
|
}
|
|
39
39
|
async function S(l) {
|
|
40
|
-
l && (
|
|
40
|
+
l && (f("remove", l), k.value++);
|
|
41
41
|
}
|
|
42
42
|
function q(l) {
|
|
43
43
|
if (e.isSingle) {
|
|
44
44
|
const t = l.files?.[0];
|
|
45
|
-
t?.size && t.size <
|
|
45
|
+
t?.size && t.size < h && f("add", t);
|
|
46
46
|
} else {
|
|
47
47
|
const t = l.files;
|
|
48
48
|
if (t === null) return;
|
|
49
49
|
for (const i of t)
|
|
50
|
-
i.size > 0 && i.size <
|
|
50
|
+
i.size > 0 && i.size < h && f("add", i);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
return (l, t) => (s(), o("div", {
|
|
@@ -69,13 +69,13 @@ const Q = ["data-error"], U = ["accept", "multiple"], P = ["data-label"], R = /*
|
|
|
69
69
|
r("div", {
|
|
70
70
|
class: n(l.$style.addButton)
|
|
71
71
|
}, [
|
|
72
|
-
m(
|
|
72
|
+
m(y, {
|
|
73
73
|
onClick: C,
|
|
74
74
|
layout: "secondary",
|
|
75
75
|
isDisabled: e.isDisabled || e.isSingle && e.files.length > 0 || e.isSingle && !!e.file,
|
|
76
76
|
icon: u(L)
|
|
77
77
|
}, {
|
|
78
|
-
default:
|
|
78
|
+
default: v(() => [
|
|
79
79
|
t[3] || (t[3] = p(" Add file", -1)),
|
|
80
80
|
e.isSingle ? d("", !0) : (s(), o(B, { key: 0 }, [
|
|
81
81
|
p("s")
|
|
@@ -86,7 +86,7 @@ const Q = ["data-error"], U = ["accept", "multiple"], P = ["data-label"], R = /*
|
|
|
86
86
|
r("div", {
|
|
87
87
|
class: n(l.$style.text),
|
|
88
88
|
"data-error": !!e.error
|
|
89
|
-
}, " Size up to " + a(u(
|
|
89
|
+
}, " Size up to " + a(u(h) / (1024 * 1024)) + " Mb, " + a(e.extensions.join(", ")) + ". ", 11, Q)
|
|
90
90
|
], 2),
|
|
91
91
|
(s(), o("input", {
|
|
92
92
|
type: "file",
|
|
@@ -98,19 +98,19 @@ const Q = ["data-error"], U = ["accept", "multiple"], P = ["data-label"], R = /*
|
|
|
98
98
|
accept: j.value,
|
|
99
99
|
multiple: !e.isSingle
|
|
100
100
|
}, null, 42, U)),
|
|
101
|
-
e.files?.length && !e.file ? (s(!0), o(B, { key: 1 }, E(
|
|
101
|
+
e.files?.length && !e.file ? (s(!0), o(B, { key: 1 }, E(_.files, (i, w) => (s(), o("div", {
|
|
102
102
|
key: `${i}-${w}`,
|
|
103
103
|
class: n(l.$style.file)
|
|
104
104
|
}, [
|
|
105
105
|
r("div", {
|
|
106
106
|
class: n(l.$style.name)
|
|
107
107
|
}, a(i.name), 3),
|
|
108
|
-
m(
|
|
108
|
+
m(y, {
|
|
109
109
|
onClick: (le) => S(i),
|
|
110
110
|
layout: "plain"
|
|
111
111
|
}, {
|
|
112
|
-
default:
|
|
113
|
-
p(a(u(
|
|
112
|
+
default: v(() => [
|
|
113
|
+
p(a(u(g)[e.lang].remove), 1)
|
|
114
114
|
]),
|
|
115
115
|
_: 1
|
|
116
116
|
}, 8, ["onClick"])
|
|
@@ -122,12 +122,12 @@ const Q = ["data-error"], U = ["accept", "multiple"], P = ["data-label"], R = /*
|
|
|
122
122
|
r("div", {
|
|
123
123
|
class: n(l.$style.name)
|
|
124
124
|
}, a(e.file.name), 3),
|
|
125
|
-
m(
|
|
125
|
+
m(y, {
|
|
126
126
|
onClick: t[1] || (t[1] = (i) => S(e.file)),
|
|
127
127
|
layout: "plain"
|
|
128
128
|
}, {
|
|
129
|
-
default:
|
|
130
|
-
p(a(u(
|
|
129
|
+
default: v(() => [
|
|
130
|
+
p(a(u(g)[e.lang].remove), 1)
|
|
131
131
|
]),
|
|
132
132
|
_: 1
|
|
133
133
|
})
|
|
@@ -137,21 +137,21 @@ const Q = ["data-error"], U = ["accept", "multiple"], P = ["data-label"], R = /*
|
|
|
137
137
|
class: n(l.$style.uploadButton),
|
|
138
138
|
"data-label": !!e.label
|
|
139
139
|
}, [
|
|
140
|
-
m(
|
|
141
|
-
onClick: t[2] || (t[2] = (i) =>
|
|
140
|
+
m(y, {
|
|
141
|
+
onClick: t[2] || (t[2] = (i) => f("upload"))
|
|
142
142
|
}, {
|
|
143
|
-
default:
|
|
144
|
-
p(a(u(
|
|
143
|
+
default: v(() => [
|
|
144
|
+
p(a(u(g)[e.lang].upload), 1)
|
|
145
145
|
]),
|
|
146
146
|
_: 1
|
|
147
147
|
})
|
|
148
|
-
], 10,
|
|
148
|
+
], 10, x), [
|
|
149
149
|
[F, e.isSingle && e.file || e.files.length > 0]
|
|
150
150
|
])
|
|
151
151
|
], 2));
|
|
152
152
|
}
|
|
153
|
-
}),
|
|
154
|
-
container:
|
|
153
|
+
}), R = "_container_10je3_1", G = "_upload_10je3_6", H = "_addButton_10je3_12", K = "_text_10je3_19", Z = "_input_10je3_26", J = "_name_10je3_30", O = "_file_10je3_38", T = "_error_10je3_44", W = "_uploadButton_10je3_48", X = "_label_10je3_52", Y = {
|
|
154
|
+
container: R,
|
|
155
155
|
upload: G,
|
|
156
156
|
addButton: H,
|
|
157
157
|
text: K,
|
|
@@ -163,7 +163,7 @@ const Q = ["data-error"], U = ["accept", "multiple"], P = ["data-label"], R = /*
|
|
|
163
163
|
label: X
|
|
164
164
|
}, ee = {
|
|
165
165
|
$style: Y
|
|
166
|
-
}, se = /* @__PURE__ */ N(
|
|
166
|
+
}, se = /* @__PURE__ */ N(P, [["__cssModules", ee]]);
|
|
167
167
|
export {
|
|
168
168
|
se as default
|
|
169
169
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mhz-ui",
|
|
3
3
|
"description": "Mhz ui kit",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.42",
|
|
5
5
|
"author": "Alexandr Dergunov <dergunovs@mail.ru> (https://github.com/dergunovs)",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
@@ -25,26 +25,26 @@
|
|
|
25
25
|
"test:cov": "vitest run --coverage"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@tiptap/pm": "3.
|
|
29
|
-
"@tiptap/starter-kit": "3.
|
|
30
|
-
"@tiptap/vue-3": "3.
|
|
28
|
+
"@tiptap/pm": "3.6.1",
|
|
29
|
+
"@tiptap/starter-kit": "3.6.1",
|
|
30
|
+
"@tiptap/vue-3": "3.6.1",
|
|
31
31
|
"@vueform/slider": "2.1.10",
|
|
32
32
|
"@vueuse/core": "13.9.0",
|
|
33
33
|
"@vueuse/integrations": "13.9.0",
|
|
34
34
|
"chart.js": "4.5.0",
|
|
35
35
|
"mhz-helpers": "*",
|
|
36
36
|
"perfect-debounce": "2.0.0",
|
|
37
|
-
"vue": "3.5.
|
|
37
|
+
"vue": "3.5.22",
|
|
38
38
|
"vue-cal": "5.0.1-rc.28",
|
|
39
39
|
"vue-chartjs": "5.3.2",
|
|
40
40
|
"vue-router": "4.5.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@eslint/js": "9.36.0",
|
|
44
|
-
"@storybook/addon-docs": "9.1.
|
|
45
|
-
"@storybook/addon-themes": "9.1.
|
|
46
|
-
"@storybook/vue3": "9.1.
|
|
47
|
-
"@storybook/vue3-vite": "9.1.
|
|
44
|
+
"@storybook/addon-docs": "9.1.8",
|
|
45
|
+
"@storybook/addon-themes": "9.1.8",
|
|
46
|
+
"@storybook/vue3": "9.1.8",
|
|
47
|
+
"@storybook/vue3-vite": "9.1.8",
|
|
48
48
|
"@types/node": "24.5.2",
|
|
49
49
|
"@vitejs/plugin-vue": "6.0.1",
|
|
50
50
|
"@vitest/coverage-istanbul": "3.2.4",
|
|
@@ -56,14 +56,14 @@
|
|
|
56
56
|
"eslint-plugin-prettier": "5.5.4",
|
|
57
57
|
"eslint-plugin-sonarjs": "3.0.5",
|
|
58
58
|
"eslint-plugin-unicorn": "61.0.2",
|
|
59
|
-
"eslint-plugin-vue": "10.
|
|
59
|
+
"eslint-plugin-vue": "10.5.0",
|
|
60
60
|
"globals": "16.4.0",
|
|
61
61
|
"happy-dom": "18.0.1",
|
|
62
62
|
"postcss-html": "1.8.0",
|
|
63
63
|
"postcss-scss": "4.0.9",
|
|
64
64
|
"prettier": "3.6.2",
|
|
65
|
-
"sass-embedded": "1.93.
|
|
66
|
-
"storybook": "9.1.
|
|
65
|
+
"sass-embedded": "1.93.2",
|
|
66
|
+
"storybook": "9.1.8",
|
|
67
67
|
"stylelint": "16.24.0",
|
|
68
68
|
"stylelint-config-recess-order": "7.3.0",
|
|
69
69
|
"stylelint-config-recommended-scss": "16.0.1",
|
|
@@ -71,18 +71,18 @@
|
|
|
71
71
|
"stylelint-order": "7.0.0",
|
|
72
72
|
"stylelint-prettier": "5.0.3",
|
|
73
73
|
"typescript": "5.9.2",
|
|
74
|
-
"typescript-eslint": "8.44.
|
|
75
|
-
"vite": "7.1.
|
|
74
|
+
"typescript-eslint": "8.44.1",
|
|
75
|
+
"vite": "7.1.7",
|
|
76
76
|
"vite-plugin-dts": "4.5.4",
|
|
77
77
|
"vite-plugin-static-copy": "3.1.2",
|
|
78
78
|
"vite-svg-loader": "5.1.0",
|
|
79
79
|
"vitest": "3.2.4",
|
|
80
80
|
"vue-eslint-parser": "10.2.0",
|
|
81
81
|
"vue-linters-config": "0.5.4",
|
|
82
|
-
"vue-tsc": "3.0.
|
|
82
|
+
"vue-tsc": "3.0.8"
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|
|
85
|
-
"vue": "3.5.
|
|
85
|
+
"vue": "3.5.22",
|
|
86
86
|
"vue-router": "4.5.1"
|
|
87
87
|
},
|
|
88
88
|
"engines": {
|