mediacube-ui-v2 0.0.266 → 0.0.267
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/components/templates/McDrawer/McDrawerContainer.vue2.js +36 -36
- package/dist/components/templates/McModal/McModalContainer.vue2.js +34 -35
- package/dist/types/components/templates/McModal/McModalContainer.vue.d.ts +6 -2
- package/dist/types/components/templates/McModal/index.d.ts +6 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
const O = /* @__PURE__ */
|
|
1
|
+
import { defineComponent as C, defineAsyncComponent as P, computed as u, onMounted as g, onBeforeUnmount as S, openBlock as a, createElementBlock as f, normalizeStyle as x, Fragment as V, renderList as b, createBlock as i, unref as k, mergeProps as _, withCtx as m, Suspense as D, createVNode as E, resolveDynamicComponent as I } from "vue";
|
|
2
|
+
import M from "./McDrawerSafeComponent.vue.js";
|
|
3
|
+
const O = /* @__PURE__ */ C({
|
|
4
4
|
__name: "McDrawerContainer",
|
|
5
5
|
props: {
|
|
6
6
|
drawerServiceState: {
|
|
@@ -20,61 +20,61 @@ const O = /* @__PURE__ */ h({
|
|
|
20
20
|
default: () => ({})
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
|
-
setup(
|
|
24
|
-
const
|
|
25
|
-
const e =
|
|
23
|
+
setup(y) {
|
|
24
|
+
const w = P(() => import("./McDrawer.vue.js")), l = y, o = u(() => l.reactiveProps.drawers ?? []), n = u(() => o.value.map((r, t) => {
|
|
25
|
+
const e = o.value.length - 1 - t, s = Math.min(e, l.drawersMaxInCascade - 1), d = o.value.findLastIndex(
|
|
26
26
|
// @ts-ignore
|
|
27
27
|
// eslint-disable-next-line no-prototype-builtins
|
|
28
|
-
(
|
|
28
|
+
(v) => !v?.drawerProps.hasOwnProperty("showOverlay") || v.drawerProps?.showOverlay
|
|
29
29
|
);
|
|
30
30
|
return {
|
|
31
|
-
...
|
|
31
|
+
...r,
|
|
32
32
|
indent_coefficient: e,
|
|
33
33
|
real_coefficient: s,
|
|
34
|
-
indent: s *
|
|
35
|
-
can_show_overlay: t ===
|
|
34
|
+
indent: s * l.drawersCascadeIndent,
|
|
35
|
+
can_show_overlay: t === d
|
|
36
36
|
};
|
|
37
|
-
})),
|
|
38
|
-
zIndex:
|
|
39
|
-
visibility:
|
|
40
|
-
})),
|
|
41
|
-
|
|
42
|
-
n.value.every((t) => !t.modelValue) &&
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
if (
|
|
37
|
+
})), h = u(() => ({
|
|
38
|
+
zIndex: o.value.length ? 10004 : -1,
|
|
39
|
+
visibility: o.value.length ? "visible" : "hidden"
|
|
40
|
+
})), c = (r) => {
|
|
41
|
+
r.close(), setTimeout(() => {
|
|
42
|
+
n.value.every((t) => !t.modelValue) && l.drawerServiceState.closeServiceState();
|
|
43
|
+
}, r?.drawerProps?.duration || 300);
|
|
44
|
+
}, p = (r) => {
|
|
45
|
+
if (r.code === "Escape" && n.value?.length) {
|
|
46
46
|
const t = n.value[n.value.length - 1];
|
|
47
47
|
if (t.drawerProps?.disableBgClick) return;
|
|
48
48
|
t.close();
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
|
-
return
|
|
52
|
-
document.addEventListener("keyup",
|
|
53
|
-
}),
|
|
54
|
-
document.removeEventListener("keyup",
|
|
55
|
-
}), (
|
|
51
|
+
return g(() => {
|
|
52
|
+
document.addEventListener("keyup", p);
|
|
53
|
+
}), S(() => {
|
|
54
|
+
document.removeEventListener("keyup", p);
|
|
55
|
+
}), (r, t) => (a(), f("div", {
|
|
56
56
|
class: "mc-drawer-container",
|
|
57
|
-
style:
|
|
57
|
+
style: x(h.value)
|
|
58
58
|
}, [
|
|
59
|
-
(a(!0),
|
|
59
|
+
(a(!0), f(V, null, b(n.value, (e, s) => (a(), i(k(w), _({
|
|
60
60
|
key: e.id,
|
|
61
61
|
modelValue: e.modelValue,
|
|
62
|
-
"onUpdate:modelValue": (
|
|
62
|
+
"onUpdate:modelValue": (d) => e.modelValue = d
|
|
63
63
|
}, { ref_for: !0 }, e.drawerProps, {
|
|
64
64
|
"show-overlay": e.can_show_overlay,
|
|
65
|
-
onClose: () =>
|
|
65
|
+
onClose: () => c(e),
|
|
66
66
|
class: ["mc-drawer-container__item", { "mc-drawer-container__item--multiple": n.value.length - 1 !== s }],
|
|
67
67
|
style: e.indent ? { transform: `translateX(-${e.indent}px)` } : {}
|
|
68
68
|
}), {
|
|
69
|
-
default:
|
|
70
|
-
(a(),
|
|
71
|
-
default:
|
|
72
|
-
|
|
73
|
-
onErrorCaptured: () =>
|
|
69
|
+
default: m(() => [
|
|
70
|
+
(a(), i(D, null, {
|
|
71
|
+
default: m(() => [
|
|
72
|
+
E(M, {
|
|
73
|
+
onErrorCaptured: () => c(e)
|
|
74
74
|
}, {
|
|
75
|
-
default:
|
|
76
|
-
(a(),
|
|
77
|
-
onCloseDrawer: () =>
|
|
75
|
+
default: m(() => [
|
|
76
|
+
(a(), i(I(e.component), _({ ref_for: !0 }, e.componentProps, {
|
|
77
|
+
onCloseDrawer: () => c(e)
|
|
78
78
|
}), null, 16, ["onCloseDrawer"]))
|
|
79
79
|
]),
|
|
80
80
|
_: 2
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as y, computed as d, onMounted as k, watch as C, onBeforeUnmount as _, openBlock as l, createElementBlock as c, normalizeStyle as h, Fragment as S, renderList as B, createBlock as u, Suspense as V, withCtx as i, createVNode as g, resolveDynamicComponent as P, mergeProps as w } from "vue";
|
|
2
|
+
import E from "./McModalSafeComponent.vue.js";
|
|
3
|
+
const b = ["onClose"], L = /* @__PURE__ */ y({
|
|
4
4
|
__name: "McModalContainer",
|
|
5
5
|
props: {
|
|
6
6
|
modalServiceState: {
|
|
@@ -9,54 +9,53 @@ const E = ["onClose"], x = /* @__PURE__ */ v({
|
|
|
9
9
|
},
|
|
10
10
|
reactiveProps: {
|
|
11
11
|
type: Object,
|
|
12
|
-
default: () => ({})
|
|
12
|
+
default: () => ({ modals: [] })
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
setup(p) {
|
|
16
|
-
const
|
|
17
|
-
zIndex:
|
|
18
|
-
visibility:
|
|
19
|
-
})),
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
const a = p, o = d(() => a.reactiveProps?.modals ?? []), m = d(() => ({
|
|
17
|
+
zIndex: o.value.length ? 99999 : -1,
|
|
18
|
+
visibility: o.value.length ? "visible" : "hidden"
|
|
19
|
+
})), r = (t) => {
|
|
20
|
+
t.close(), setTimeout(() => {
|
|
21
|
+
o.value.every((n) => !n.modelValue) && a.modalServiceState.closeServiceState();
|
|
22
22
|
}, 300);
|
|
23
|
-
}, s = (
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
e.close();
|
|
23
|
+
}, s = (t) => {
|
|
24
|
+
if (t.code === "Escape" && o.value.length) {
|
|
25
|
+
const n = o.value[o.value.length - 1];
|
|
26
|
+
if (!(!n?.componentProps?.hasOwnProperty("clickBackdropToClose") || n?.componentProps?.clickBackdropToClose)) return;
|
|
27
|
+
n.close();
|
|
29
28
|
}
|
|
30
|
-
},
|
|
31
|
-
typeof window > "u" || (document.body.style.overflow =
|
|
29
|
+
}, v = (t) => {
|
|
30
|
+
typeof window > "u" || (document.body.style.overflow = t ? "hidden" : "");
|
|
32
31
|
};
|
|
33
|
-
return
|
|
34
|
-
document.addEventListener("keyup", s),
|
|
35
|
-
() =>
|
|
36
|
-
(
|
|
32
|
+
return k(() => {
|
|
33
|
+
document.addEventListener("keyup", s), C(
|
|
34
|
+
() => o.value.length,
|
|
35
|
+
(t) => v(!!t),
|
|
37
36
|
{ immediate: !0 }
|
|
38
37
|
);
|
|
39
|
-
}),
|
|
38
|
+
}), _(() => {
|
|
40
39
|
document.removeEventListener("keyup", s);
|
|
41
|
-
}), (
|
|
40
|
+
}), (t, n) => (l(), c("div", {
|
|
42
41
|
class: "mc-modal-container",
|
|
43
|
-
style:
|
|
42
|
+
style: h(m.value)
|
|
44
43
|
}, [
|
|
45
|
-
(
|
|
44
|
+
(l(!0), c(S, null, B(o.value, (e) => (l(), c("div", {
|
|
46
45
|
key: e.id,
|
|
47
|
-
onClose: () =>
|
|
46
|
+
onClose: () => r(e)
|
|
48
47
|
}, [
|
|
49
|
-
(
|
|
48
|
+
(l(), u(V, null, {
|
|
50
49
|
default: i(() => [
|
|
51
|
-
|
|
52
|
-
onErrorCaptured: () =>
|
|
50
|
+
g(E, {
|
|
51
|
+
onErrorCaptured: () => r(e)
|
|
53
52
|
}, {
|
|
54
53
|
default: i(() => [
|
|
55
|
-
(
|
|
54
|
+
(l(), u(P(e.component), w({
|
|
56
55
|
modelValue: e.modelValue,
|
|
57
|
-
"onUpdate:modelValue": (
|
|
56
|
+
"onUpdate:modelValue": (f) => e.modelValue = f
|
|
58
57
|
}, { ref_for: !0 }, e.componentProps, {
|
|
59
|
-
onClosed: () =>
|
|
58
|
+
onClosed: () => r(e)
|
|
60
59
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "onClosed"]))
|
|
61
60
|
]),
|
|
62
61
|
_: 2
|
|
@@ -64,10 +63,10 @@ const E = ["onClose"], x = /* @__PURE__ */ v({
|
|
|
64
63
|
]),
|
|
65
64
|
_: 2
|
|
66
65
|
}, 1024))
|
|
67
|
-
], 40,
|
|
66
|
+
], 40, b))), 128))
|
|
68
67
|
], 4));
|
|
69
68
|
}
|
|
70
69
|
});
|
|
71
70
|
export {
|
|
72
|
-
|
|
71
|
+
L as default
|
|
73
72
|
};
|
|
@@ -9,7 +9,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
9
9
|
type: () => {
|
|
10
10
|
modals: IModalState[];
|
|
11
11
|
};
|
|
12
|
-
default: () => {
|
|
12
|
+
default: () => {
|
|
13
|
+
modals: IModalState[];
|
|
14
|
+
};
|
|
13
15
|
};
|
|
14
16
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
15
17
|
modalServiceState: {
|
|
@@ -20,7 +22,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
20
22
|
type: () => {
|
|
21
23
|
modals: IModalState[];
|
|
22
24
|
};
|
|
23
|
-
default: () => {
|
|
25
|
+
default: () => {
|
|
26
|
+
modals: IModalState[];
|
|
27
|
+
};
|
|
24
28
|
};
|
|
25
29
|
}>> & Readonly<{}>, {
|
|
26
30
|
reactiveProps: {
|
|
@@ -7,7 +7,9 @@ declare const McModalContainer: import('vue').DefineComponent<import('vue').Extr
|
|
|
7
7
|
type: () => {
|
|
8
8
|
modals: import('../../../types/IModal').IModalState[];
|
|
9
9
|
};
|
|
10
|
-
default: () => {
|
|
10
|
+
default: () => {
|
|
11
|
+
modals: import('../../../types/IModal').IModalState[];
|
|
12
|
+
};
|
|
11
13
|
};
|
|
12
14
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
13
15
|
modalServiceState: {
|
|
@@ -18,7 +20,9 @@ declare const McModalContainer: import('vue').DefineComponent<import('vue').Extr
|
|
|
18
20
|
type: () => {
|
|
19
21
|
modals: import('../../../types/IModal').IModalState[];
|
|
20
22
|
};
|
|
21
|
-
default: () => {
|
|
23
|
+
default: () => {
|
|
24
|
+
modals: import('../../../types/IModal').IModalState[];
|
|
25
|
+
};
|
|
22
26
|
};
|
|
23
27
|
}>> & Readonly<{}>, {
|
|
24
28
|
reactiveProps: {
|