@nmorph/nmorph-ui-kit 3.0.5 → 3.0.7
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/assets/icons/hand.svg.js +2 -2
- package/dist/components/basic/nmorph-icon/NmorphIcon.vue2.js +9 -9
- package/dist/components/data/nmorph-audio-preview/NmorphAudioPreview.css +1 -1
- package/dist/components/data/nmorph-calendar/NmorphCalendar.vue.js +34 -36
- package/dist/components/data/nmorph-calendar/NmorphCalendar.vue2.js +80 -78
- package/dist/components/data/nmorph-card/NmorphCard.css +1 -1
- package/dist/components/data/nmorph-card/NmorphCard.vue2.js +18 -15
- package/dist/components/data/nmorph-file-card/NmorphFileCard.css +1 -1
- package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue.js +60 -60
- package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue2.js +118 -94
- package/dist/components/data/nmorph-media-tile/NmorphMediaTile.vue.js +19 -19
- package/dist/components/data/nmorph-media-tile/NmorphMediaTile.vue2.js +72 -39
- package/dist/components/data/nmorph-pagination/NmorphPagination.css +1 -1
- package/dist/components/data/nmorph-pagination/NmorphPagination.vue.js +5 -5
- package/dist/components/data/nmorph-pagination/NmorphPagination.vue2.js +80 -56
- package/dist/components/data/nmorph-table/NmorphTable.css +1 -1
- package/dist/components/data/nmorph-table/NmorphTable.vue.js +114 -162
- package/dist/components/data/nmorph-table/NmorphTable.vue2.js +41 -38
- package/dist/components/data/nmorph-video-preview/NmorphVideoPreview.css +1 -1
- package/dist/components/feedback/nmorph-drawer/NmorphDrawer.vue.js +8 -8
- package/dist/components/feedback/nmorph-drawer/NmorphDrawer.vue2.js +64 -24
- package/dist/components/form/nmorph-select-button/NmorphSelectButton.css +1 -1
- package/dist/components/form/nmorph-select-button/components/nmorph-select-button-item/NmorphSelectButtonItem.css +1 -1
- package/dist/index.umd.js +25 -25
- package/dist/package.json.js +1 -1
- package/dist/src/components/basic/nmorph-icon/NmorphIcon.vue.d.ts +0 -3
- package/dist/src/components/data/nmorph-pagination/NmorphPagination.vue.d.ts +3 -0
- package/dist/src/components/data/nmorph-pagination/types.d.ts +3 -0
- package/dist/src/components/data/nmorph-table/NmorphTable.vue.d.ts +2 -21
- package/dist/src/components/data/nmorph-table/types.d.ts +11 -3
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,96 +1,96 @@
|
|
|
1
1
|
import './NmorphImagePreview.css';
|
|
2
2
|
import _ from "./NmorphImagePreview.vue2.js";
|
|
3
|
-
import { openBlock as n, createElementBlock as a, Fragment as g, normalizeStyle as
|
|
3
|
+
import { openBlock as n, createElementBlock as a, Fragment as g, normalizeStyle as p, normalizeClass as w, createElementVNode as m, renderList as v, withModifiers as k, createVNode as l, createSlots as d, withCtx as o, renderSlot as t, toDisplayString as y, createCommentVNode as c, createBlock as s, resolveDynamicComponent as f } from "vue";
|
|
4
4
|
/* empty css */
|
|
5
5
|
import b from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
6
6
|
const N = ["aria-label", "onClick"], C = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "nmorph-image-preview__trigger-more"
|
|
9
9
|
}, S = { class: "nmorph-image-preview__action-element" };
|
|
10
|
-
function I(
|
|
10
|
+
function I(e, T, B, r, P, z) {
|
|
11
11
|
return n(), a(
|
|
12
12
|
g,
|
|
13
13
|
null,
|
|
14
14
|
[
|
|
15
|
-
|
|
15
|
+
r.props.showTrigger ? (n(), a(
|
|
16
16
|
"div",
|
|
17
17
|
{
|
|
18
18
|
key: 0,
|
|
19
|
-
class: w(
|
|
20
|
-
style:
|
|
19
|
+
class: w(r.modifiers),
|
|
20
|
+
style: p(r.triggerStyle)
|
|
21
21
|
},
|
|
22
22
|
[
|
|
23
|
-
|
|
23
|
+
m("div", {
|
|
24
24
|
class: "nmorph-image-preview__trigger",
|
|
25
|
-
onClick:
|
|
25
|
+
onClick: r.clickHandler
|
|
26
26
|
}, [
|
|
27
|
-
|
|
27
|
+
r.showGalleryTrigger ? (n(!0), a(
|
|
28
28
|
g,
|
|
29
29
|
{ key: 0 },
|
|
30
|
-
|
|
30
|
+
v(r.triggerSources, (i) => (n(), a("button", {
|
|
31
31
|
key: `${i.src}-${i.index}`,
|
|
32
32
|
type: "button",
|
|
33
33
|
class: "nmorph-image-preview__trigger-item",
|
|
34
|
-
"aria-label":
|
|
35
|
-
onClick: k((h) =>
|
|
34
|
+
"aria-label": r.getTriggerLabel(i.index),
|
|
35
|
+
onClick: k((h) => r.openPreviewAt(i.index), ["stop"])
|
|
36
36
|
}, [
|
|
37
|
-
l(
|
|
37
|
+
l(r.NmorphImage, {
|
|
38
38
|
src: i.src,
|
|
39
|
-
alt:
|
|
40
|
-
fit:
|
|
39
|
+
alt: r.getTriggerLabel(i.index),
|
|
40
|
+
fit: r.props.fit,
|
|
41
41
|
design: "plain",
|
|
42
42
|
"frame-border": 0
|
|
43
|
-
},
|
|
43
|
+
}, d({
|
|
44
44
|
_: 2
|
|
45
45
|
/* DYNAMIC */
|
|
46
46
|
}, [
|
|
47
|
-
|
|
47
|
+
e.$slots.loading ? {
|
|
48
48
|
name: "loading",
|
|
49
49
|
fn: o(() => [
|
|
50
|
-
t(
|
|
50
|
+
t(e.$slots, "loading")
|
|
51
51
|
]),
|
|
52
52
|
key: "0"
|
|
53
53
|
} : void 0,
|
|
54
|
-
|
|
54
|
+
e.$slots.error ? {
|
|
55
55
|
name: "error",
|
|
56
56
|
fn: o(() => [
|
|
57
|
-
t(
|
|
57
|
+
t(e.$slots, "error")
|
|
58
58
|
]),
|
|
59
59
|
key: "1"
|
|
60
60
|
} : void 0
|
|
61
61
|
]), 1032, ["src", "alt", "fit"]),
|
|
62
|
-
i.index ===
|
|
62
|
+
i.index === r.lastVisibleTriggerIndex && r.hiddenTriggerCount > 0 ? (n(), a(
|
|
63
63
|
"span",
|
|
64
64
|
C,
|
|
65
|
-
" +" + y(
|
|
65
|
+
" +" + y(r.hiddenTriggerCount),
|
|
66
66
|
1
|
|
67
67
|
/* TEXT */
|
|
68
68
|
)) : c("v-if", !0)
|
|
69
69
|
], 8, N))),
|
|
70
70
|
128
|
|
71
71
|
/* KEYED_FRAGMENT */
|
|
72
|
-
)) : (n(), s(
|
|
72
|
+
)) : (n(), s(r.NmorphImage, {
|
|
73
73
|
key: 1,
|
|
74
|
-
src:
|
|
75
|
-
alt:
|
|
76
|
-
fit:
|
|
74
|
+
src: r.triggerSource,
|
|
75
|
+
alt: r.props.alt,
|
|
76
|
+
fit: r.props.fit,
|
|
77
77
|
design: "plain",
|
|
78
78
|
"frame-border": 0
|
|
79
|
-
},
|
|
79
|
+
}, d({
|
|
80
80
|
_: 2
|
|
81
81
|
/* DYNAMIC */
|
|
82
82
|
}, [
|
|
83
|
-
|
|
83
|
+
e.$slots.loading ? {
|
|
84
84
|
name: "loading",
|
|
85
85
|
fn: o(() => [
|
|
86
|
-
t(
|
|
86
|
+
t(e.$slots, "loading")
|
|
87
87
|
]),
|
|
88
88
|
key: "0"
|
|
89
89
|
} : void 0,
|
|
90
|
-
|
|
90
|
+
e.$slots.error ? {
|
|
91
91
|
name: "error",
|
|
92
92
|
fn: o(() => [
|
|
93
|
-
t(
|
|
93
|
+
t(e.$slots, "error")
|
|
94
94
|
]),
|
|
95
95
|
key: "1"
|
|
96
96
|
} : void 0
|
|
@@ -100,34 +100,34 @@ function I(r, B, T, e, L, P) {
|
|
|
100
100
|
6
|
|
101
101
|
/* CLASS, STYLE */
|
|
102
102
|
)) : c("v-if", !0),
|
|
103
|
-
|
|
103
|
+
r.open ? (n(), s(r.NmorphPreviewPortal, {
|
|
104
104
|
key: 1,
|
|
105
|
-
show:
|
|
106
|
-
"z-index":
|
|
105
|
+
show: r.open,
|
|
106
|
+
"z-index": r.props.zIndex,
|
|
107
107
|
"root-class": "nmorph-image-preview__portal",
|
|
108
|
-
"state-class":
|
|
108
|
+
"state-class": r.modifiers,
|
|
109
109
|
"content-class": "nmorph-image-preview__content",
|
|
110
110
|
"left-class": "nmorph-image-preview__left",
|
|
111
111
|
"right-class": "nmorph-image-preview__right",
|
|
112
112
|
"actions-class": "nmorph-image-preview__actions",
|
|
113
|
-
"navigation-button-margin":
|
|
114
|
-
"content-width":
|
|
115
|
-
"content-height":
|
|
116
|
-
"show-navigation":
|
|
117
|
-
"show-action-bar":
|
|
118
|
-
onClose:
|
|
119
|
-
onPrevious:
|
|
120
|
-
onNext:
|
|
113
|
+
"navigation-button-margin": r.props.navigationButtonMargin,
|
|
114
|
+
"content-width": r.props.previewWidth,
|
|
115
|
+
"content-height": r.props.previewHeight,
|
|
116
|
+
"show-navigation": r.showNavigation,
|
|
117
|
+
"show-action-bar": r.props.showActionBar,
|
|
118
|
+
onClose: r.closeHandler,
|
|
119
|
+
onPrevious: r.previousHandler,
|
|
120
|
+
onNext: r.nextHandler
|
|
121
121
|
}, {
|
|
122
122
|
actions: o(() => [
|
|
123
123
|
(n(), a(
|
|
124
124
|
g,
|
|
125
125
|
null,
|
|
126
|
-
|
|
126
|
+
v(r.actions, (i, h) => m("div", {
|
|
127
127
|
key: h,
|
|
128
128
|
class: "nmorph-image-preview__action-element"
|
|
129
129
|
}, [
|
|
130
|
-
l(
|
|
130
|
+
l(r.NmorphButton, {
|
|
131
131
|
class: "nmorph-preview-portal__control-button",
|
|
132
132
|
design: "plain",
|
|
133
133
|
borderless: "",
|
|
@@ -135,7 +135,7 @@ function I(r, B, T, e, L, P) {
|
|
|
135
135
|
}, {
|
|
136
136
|
default: o(() => [
|
|
137
137
|
l(
|
|
138
|
-
|
|
138
|
+
r.NmorphIcon,
|
|
139
139
|
null,
|
|
140
140
|
{
|
|
141
141
|
default: o(() => [
|
|
@@ -155,18 +155,18 @@ function I(r, B, T, e, L, P) {
|
|
|
155
155
|
64
|
|
156
156
|
/* STABLE_FRAGMENT */
|
|
157
157
|
)),
|
|
158
|
-
|
|
159
|
-
l(
|
|
158
|
+
m("div", S, [
|
|
159
|
+
l(r.NmorphButton, {
|
|
160
160
|
class: "nmorph-preview-portal__control-button",
|
|
161
161
|
design: "plain",
|
|
162
162
|
borderless: "",
|
|
163
|
-
disabled:
|
|
164
|
-
onClick:
|
|
163
|
+
disabled: r.scaleLevel === 1,
|
|
164
|
+
onClick: r.enlargeShrinkActionData.handler
|
|
165
165
|
}, {
|
|
166
166
|
default: o(() => [
|
|
167
|
-
l(
|
|
167
|
+
l(r.NmorphIcon, null, {
|
|
168
168
|
default: o(() => [
|
|
169
|
-
(n(), s(f(
|
|
169
|
+
(n(), s(f(r.enlargeShrinkActionData.icon)))
|
|
170
170
|
]),
|
|
171
171
|
_: 1
|
|
172
172
|
/* STABLE */
|
|
@@ -178,28 +178,28 @@ function I(r, B, T, e, L, P) {
|
|
|
178
178
|
])
|
|
179
179
|
]),
|
|
180
180
|
default: o(() => [
|
|
181
|
-
l(
|
|
182
|
-
src:
|
|
183
|
-
alt:
|
|
181
|
+
l(r.NmorphImage, {
|
|
182
|
+
src: r.triggerSource,
|
|
183
|
+
alt: r.props.alt,
|
|
184
184
|
fit: "contain",
|
|
185
185
|
design: "plain",
|
|
186
186
|
"frame-border": 0,
|
|
187
|
-
style:
|
|
188
|
-
},
|
|
187
|
+
style: p({ transform: r.imageTransform })
|
|
188
|
+
}, d({
|
|
189
189
|
_: 2
|
|
190
190
|
/* DYNAMIC */
|
|
191
191
|
}, [
|
|
192
|
-
|
|
192
|
+
e.$slots.loading ? {
|
|
193
193
|
name: "loading",
|
|
194
194
|
fn: o(() => [
|
|
195
|
-
t(
|
|
195
|
+
t(e.$slots, "loading")
|
|
196
196
|
]),
|
|
197
197
|
key: "0"
|
|
198
198
|
} : void 0,
|
|
199
|
-
|
|
199
|
+
e.$slots.error ? {
|
|
200
200
|
name: "error",
|
|
201
201
|
fn: o(() => [
|
|
202
|
-
t(
|
|
202
|
+
t(e.$slots, "error")
|
|
203
203
|
]),
|
|
204
204
|
key: "1"
|
|
205
205
|
} : void 0
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import './NmorphImagePreview.css';
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { useModifiers as
|
|
4
|
-
import { createCssSizeVariables as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
const
|
|
2
|
+
import { defineComponent as ee, ref as w, watch as I, computed as a, onBeforeUnmount as te } from "vue";
|
|
3
|
+
import { useModifiers as re } from "../../../utils/create-modifiers.js";
|
|
4
|
+
import { createCssSizeVariables as ae } from "../../../utils/common.js";
|
|
5
|
+
import oe from "../nmorph-preview-portal/NmorphPreviewPortal.vue.js";
|
|
6
|
+
import le from "../../../assets/icons/shrink.svg.js";
|
|
7
|
+
import ne from "../../../assets/icons/rotate-right.svg.js";
|
|
8
|
+
import ie from "../../../assets/icons/rotate-left.svg.js";
|
|
9
|
+
import ue from "../../../assets/icons/zoom-in.svg.js";
|
|
10
|
+
import se from "../../../assets/icons/zoom-out.svg.js";
|
|
11
|
+
import me from "../../../assets/icons/enlarge.svg.js";
|
|
12
|
+
import de from "../../basic/nmorph-icon/NmorphIcon.vue.js";
|
|
13
|
+
import ce from "../../basic/nmorph-button/NmorphButton.vue.js";
|
|
14
|
+
import ge from "../nmorph-image/NmorphImage.vue.js";
|
|
15
|
+
const _e = /* @__PURE__ */ ee({
|
|
16
16
|
__name: "NmorphImagePreview",
|
|
17
17
|
props: {
|
|
18
18
|
modelValue: { type: Boolean, required: !1, default: !1 },
|
|
@@ -38,117 +38,141 @@ const Ne = /* @__PURE__ */ $({
|
|
|
38
38
|
triggerGap: { type: [Number, String], required: !1, default: 8 }
|
|
39
39
|
},
|
|
40
40
|
emits: ["update:model-value"],
|
|
41
|
-
setup(
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
() =>
|
|
41
|
+
setup(O, { expose: D, emit: E }) {
|
|
42
|
+
D();
|
|
43
|
+
const t = O, l = w(t.modelValue);
|
|
44
|
+
I(
|
|
45
|
+
() => t.modelValue,
|
|
46
46
|
(e) => l.value = e
|
|
47
47
|
);
|
|
48
|
-
const
|
|
49
|
-
const
|
|
50
|
-
return
|
|
51
|
-
},
|
|
52
|
-
() =>
|
|
53
|
-
index:
|
|
48
|
+
const o = a(() => Array.isArray(t.src) ? t.src : [t.src]), s = (e) => {
|
|
49
|
+
const r = o.value.length - 1;
|
|
50
|
+
return r < 0 || e < 0 ? 0 : e > r ? r : e;
|
|
51
|
+
}, i = w(s(t.initialIndex)), u = a(() => s(i.value)), b = a(() => o.value[u.value] || ""), p = a(() => t.triggerView === "gallery" && o.value.length > 1), q = a(() => !t.triggerLimit || t.triggerLimit < 1 ? o.value.length : Math.min(Math.floor(t.triggerLimit), o.value.length)), d = a(
|
|
52
|
+
() => o.value.slice(0, q.value).map((e, r) => ({
|
|
53
|
+
index: r,
|
|
54
54
|
src: e
|
|
55
55
|
}))
|
|
56
|
-
),
|
|
57
|
-
() =>
|
|
58
|
-
"nmorph-image-preview": [l.value && "opened",
|
|
56
|
+
), G = a(() => o.value.length - d.value.length), j = a(() => d.value[d.value.length - 1]?.index ?? -1), F = a(
|
|
57
|
+
() => re({
|
|
58
|
+
"nmorph-image-preview": [l.value && "opened", p.value && "gallery-trigger"]
|
|
59
59
|
})
|
|
60
|
-
),
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
), c = w(/* @__PURE__ */ new Map()), x = (e, r) => e || `__empty-image-${r}`, f = a(() => x(b.value, u.value)), g = a(
|
|
61
|
+
() => c.value.get(f.value) || {
|
|
62
|
+
rotateLevel: 0,
|
|
63
|
+
scaleLevel: 1
|
|
64
|
+
}
|
|
65
|
+
), v = a(() => g.value.rotateLevel), m = a(() => g.value.scaleLevel), Z = a(() => `rotate(${v.value}deg) scale(${m.value})`), T = (e) => {
|
|
66
|
+
const r = new Map(c.value);
|
|
67
|
+
r.set(f.value, e), c.value = r;
|
|
68
|
+
}, n = (e) => {
|
|
69
|
+
T({
|
|
70
|
+
...g.value,
|
|
71
|
+
...e
|
|
72
|
+
});
|
|
73
|
+
}, h = (e) => {
|
|
74
|
+
const r = e % 360;
|
|
75
|
+
return Object.is(r, -0) ? 0 : r;
|
|
76
|
+
}, y = (e) => parseFloat(Math.min(Math.max(e, t.minScaleLevel), t.maxScaleLevel).toFixed(3));
|
|
77
|
+
I(
|
|
78
|
+
() => [t.initialIndex, o.value.length],
|
|
63
79
|
() => {
|
|
64
|
-
|
|
80
|
+
i.value = s(t.initialIndex);
|
|
65
81
|
}
|
|
66
82
|
);
|
|
67
|
-
const
|
|
68
|
-
|
|
83
|
+
const _ = (e) => {
|
|
84
|
+
i.value = s(e), l.value = !0, S("update:model-value", l.value);
|
|
85
|
+
}, U = () => {
|
|
86
|
+
p.value || _(u.value);
|
|
87
|
+
}, W = () => {
|
|
88
|
+
l.value = !1, S("update:model-value", l.value);
|
|
89
|
+
}, B = () => {
|
|
90
|
+
n({
|
|
91
|
+
rotateLevel: h(v.value + 90)
|
|
92
|
+
});
|
|
93
|
+
}, k = () => {
|
|
94
|
+
n({
|
|
95
|
+
rotateLevel: h(v.value - 90)
|
|
96
|
+
});
|
|
97
|
+
}, M = () => {
|
|
98
|
+
n({
|
|
99
|
+
scaleLevel: y(m.value + t.scaleStep)
|
|
100
|
+
});
|
|
101
|
+
}, A = () => {
|
|
102
|
+
n({
|
|
103
|
+
scaleLevel: y(m.value - t.scaleStep)
|
|
104
|
+
});
|
|
105
|
+
}, C = a(() => m.value < 1), K = () => {
|
|
106
|
+
n({ scaleLevel: 1 });
|
|
107
|
+
}, V = () => {
|
|
108
|
+
n({ scaleLevel: 1 });
|
|
69
109
|
}, z = () => {
|
|
70
|
-
|
|
71
|
-
}, F = () => {
|
|
72
|
-
l.value = !1, f("update:model-value", l.value);
|
|
73
|
-
}, S = () => {
|
|
74
|
-
n.value = n.value + 90, n.value >= 360 && (n.value = 0);
|
|
75
|
-
}, w = () => {
|
|
76
|
-
n.value = n.value - 90, n.value <= -360 && (n.value = 0);
|
|
77
|
-
}, I = () => {
|
|
78
|
-
i.value < r.maxScaleLevel && (i.value += r.scaleStep), i.value = parseFloat(i.value.toFixed(3));
|
|
79
|
-
}, b = () => {
|
|
80
|
-
i.value > r.minScaleLevel && (i.value -= r.scaleStep), i.value = parseFloat(i.value.toFixed(3));
|
|
81
|
-
}, L = t(() => i.value < 1), q = () => {
|
|
82
|
-
i.value = 1;
|
|
83
|
-
}, x = () => {
|
|
84
|
-
i.value = 1;
|
|
85
|
-
}, n = g(0), B = () => {
|
|
86
|
-
const e = a.value.length;
|
|
110
|
+
const e = o.value.length;
|
|
87
111
|
if (!e) return;
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
},
|
|
91
|
-
const e =
|
|
112
|
+
const r = u.value - 1;
|
|
113
|
+
i.value = r < 0 ? e - 1 : r;
|
|
114
|
+
}, H = () => {
|
|
115
|
+
const e = o.value.length;
|
|
92
116
|
if (!e) return;
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
},
|
|
96
|
-
!l.value ||
|
|
97
|
-
},
|
|
98
|
-
typeof document > "u" || document.addEventListener("keydown",
|
|
99
|
-
},
|
|
100
|
-
typeof document > "u" || document.removeEventListener("keydown",
|
|
117
|
+
const r = u.value + 1;
|
|
118
|
+
i.value = r > e - 1 ? 0 : r;
|
|
119
|
+
}, N = (e) => {
|
|
120
|
+
!l.value || o.value.length < 2 || e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || (e.key === "ArrowLeft" && (e.preventDefault(), z()), e.key === "ArrowRight" && (e.preventDefault(), H()));
|
|
121
|
+
}, R = () => {
|
|
122
|
+
typeof document > "u" || document.addEventListener("keydown", N);
|
|
123
|
+
}, L = () => {
|
|
124
|
+
typeof document > "u" || document.removeEventListener("keydown", N);
|
|
101
125
|
};
|
|
102
|
-
|
|
126
|
+
I(
|
|
103
127
|
l,
|
|
104
128
|
(e) => {
|
|
105
|
-
e ?
|
|
129
|
+
e ? R() : L();
|
|
106
130
|
},
|
|
107
131
|
{ immediate: !0 }
|
|
108
|
-
),
|
|
109
|
-
const
|
|
132
|
+
), te(L);
|
|
133
|
+
const J = a(() => {
|
|
110
134
|
let e = {
|
|
111
|
-
icon:
|
|
112
|
-
handler:
|
|
135
|
+
icon: le,
|
|
136
|
+
handler: V
|
|
113
137
|
};
|
|
114
|
-
return
|
|
115
|
-
icon:
|
|
116
|
-
handler:
|
|
138
|
+
return C.value && (e = {
|
|
139
|
+
icon: me,
|
|
140
|
+
handler: K
|
|
117
141
|
}), e;
|
|
118
|
-
}),
|
|
142
|
+
}), Q = [
|
|
119
143
|
{
|
|
120
|
-
icon:
|
|
121
|
-
handler:
|
|
144
|
+
icon: ne,
|
|
145
|
+
handler: B
|
|
122
146
|
},
|
|
123
147
|
{
|
|
124
|
-
icon:
|
|
125
|
-
handler:
|
|
148
|
+
icon: ie,
|
|
149
|
+
handler: k
|
|
126
150
|
},
|
|
127
151
|
{
|
|
128
|
-
icon:
|
|
129
|
-
handler:
|
|
152
|
+
icon: ue,
|
|
153
|
+
handler: M
|
|
130
154
|
},
|
|
131
155
|
{
|
|
132
|
-
icon:
|
|
133
|
-
handler:
|
|
156
|
+
icon: se,
|
|
157
|
+
handler: A
|
|
134
158
|
}
|
|
135
|
-
],
|
|
136
|
-
() =>
|
|
137
|
-
"--nmorph-private-image-preview-trigger-width":
|
|
138
|
-
"--nmorph-private-image-preview-trigger-height":
|
|
139
|
-
"--nmorph-private-image-preview-radius":
|
|
140
|
-
"--nmorph-private-image-preview-trigger-gap":
|
|
159
|
+
], S = E, $ = a(() => o.value.length > 1), X = a(() => t.showNavigationButtons && $.value), Y = a(
|
|
160
|
+
() => ae({
|
|
161
|
+
"--nmorph-private-image-preview-trigger-width": t.width,
|
|
162
|
+
"--nmorph-private-image-preview-trigger-height": t.height,
|
|
163
|
+
"--nmorph-private-image-preview-radius": t.radius,
|
|
164
|
+
"--nmorph-private-image-preview-trigger-gap": t.triggerGap
|
|
141
165
|
})
|
|
142
|
-
),
|
|
143
|
-
return
|
|
166
|
+
), P = { props: t, open: l, sourceList: o, getClampedIndex: s, currentIndex: i, resolvedCurrentIndex: u, triggerSource: b, showGalleryTrigger: p, triggerSourceLimit: q, triggerSources: d, hiddenTriggerCount: G, lastVisibleTriggerIndex: j, modifiers: F, imageTransformStates: c, getImageTransformKey: x, currentTransformKey: f, currentTransformState: g, rotateLevel: v, scaleLevel: m, imageTransform: Z, setCurrentTransformState: T, updateCurrentTransformState: n, normalizeRotateLevel: h, clampScaleLevel: y, openPreviewAt: _, clickHandler: U, closeHandler: W, rotateRight: B, rotateLeft: k, zoomIn: M, zoomOut: A, isLevelChangedToMin: C, enlargeToNormal: K, shrinkToNormal: V, previousHandler: z, nextHandler: H, keyboardNavigationHandler: N, addKeyboardNavigationListener: R, removeKeyboardNavigationListener: L, enlargeShrinkActionData: J, actions: Q, emit: S, multipleSources: $, showNavigation: X, triggerStyle: Y, getTriggerLabel: (e) => t.alt ? `${t.alt} ${e + 1}` : `Image ${e + 1}`, get NmorphImage() {
|
|
167
|
+
return ge;
|
|
144
168
|
}, get NmorphButton() {
|
|
145
|
-
return
|
|
169
|
+
return ce;
|
|
146
170
|
}, get NmorphIcon() {
|
|
147
|
-
return
|
|
148
|
-
}, NmorphPreviewPortal:
|
|
149
|
-
return Object.defineProperty(
|
|
171
|
+
return de;
|
|
172
|
+
}, NmorphPreviewPortal: oe };
|
|
173
|
+
return Object.defineProperty(P, "__isScriptSetup", { enumerable: !1, value: !0 }), P;
|
|
150
174
|
}
|
|
151
175
|
});
|
|
152
176
|
export {
|
|
153
|
-
|
|
177
|
+
_e as default
|
|
154
178
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './NmorphMediaTile.css';
|
|
2
2
|
import s from "./NmorphMediaTile.vue2.js";
|
|
3
|
-
import { openBlock as e, createElementBlock as
|
|
3
|
+
import { openBlock as e, createElementBlock as i, normalizeClass as m, withDirectives as p, createElementVNode as c, vShow as _, createCommentVNode as a, createBlock as r, withCtx as l, createVNode as n, toDisplayString as t, renderSlot as h } from "vue";
|
|
4
4
|
/* empty css */
|
|
5
5
|
import f from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
6
6
|
const v = ["src", "muted", "autoplay", "playsinline"], y = ["muted", "autoplay"], k = {
|
|
@@ -20,13 +20,13 @@ const v = ["src", "muted", "autoplay", "playsinline"], y = ["muted", "autoplay"]
|
|
|
20
20
|
class: "nmorph-media-tile__status"
|
|
21
21
|
};
|
|
22
22
|
function S(d, x, V, o, B, M) {
|
|
23
|
-
return e(),
|
|
23
|
+
return e(), i(
|
|
24
24
|
"div",
|
|
25
25
|
{
|
|
26
26
|
class: m(o.modifiers)
|
|
27
27
|
},
|
|
28
28
|
[
|
|
29
|
-
c(
|
|
29
|
+
p(c("video", {
|
|
30
30
|
ref: "videoRef",
|
|
31
31
|
class: "nmorph-media-tile__video",
|
|
32
32
|
src: o.videoSrc,
|
|
@@ -36,15 +36,15 @@ function S(d, x, V, o, B, M) {
|
|
|
36
36
|
}, null, 8, v), [
|
|
37
37
|
[_, o.videoVisible && !o.props.loading]
|
|
38
38
|
]),
|
|
39
|
-
o.
|
|
39
|
+
o.needsSeparateAudioOutput ? (e(), i("audio", {
|
|
40
40
|
key: 0,
|
|
41
41
|
ref: "audioRef",
|
|
42
42
|
class: "nmorph-media-tile__audio",
|
|
43
43
|
muted: o.props.muted,
|
|
44
44
|
autoplay: o.props.autoplay,
|
|
45
45
|
preload: "auto"
|
|
46
|
-
}, null, 8, y)) :
|
|
47
|
-
o.props.showFallback && (!o.videoVisible || o.props.loading) ? (e(),
|
|
46
|
+
}, null, 8, y)) : a("v-if", !0),
|
|
47
|
+
o.props.showFallback && (!o.videoVisible || o.props.loading) ? (e(), i("div", k, [
|
|
48
48
|
o.props.loading ? (e(), r(o.NmorphIcon, {
|
|
49
49
|
key: 0,
|
|
50
50
|
class: "nmorph-media-tile__loader",
|
|
@@ -61,29 +61,29 @@ function S(d, x, V, o, B, M) {
|
|
|
61
61
|
name: o.props.name,
|
|
62
62
|
size: 72,
|
|
63
63
|
design: "plain"
|
|
64
|
-
}, null, 8, ["src", "name"])) : (e(),
|
|
64
|
+
}, null, 8, ["src", "name"])) : (e(), i(
|
|
65
65
|
"div",
|
|
66
66
|
b,
|
|
67
67
|
t(o.fallbackLabel),
|
|
68
68
|
1
|
|
69
69
|
/* TEXT */
|
|
70
70
|
)),
|
|
71
|
-
o.props.name ? (e(),
|
|
71
|
+
o.props.name ? (e(), i(
|
|
72
72
|
"span",
|
|
73
73
|
N,
|
|
74
74
|
t(o.props.name),
|
|
75
75
|
1
|
|
76
76
|
/* TEXT */
|
|
77
|
-
)) :
|
|
78
|
-
o.props.error && o.props.errorText ? (e(),
|
|
77
|
+
)) : a("v-if", !0),
|
|
78
|
+
o.props.error && o.props.errorText ? (e(), i(
|
|
79
79
|
"span",
|
|
80
80
|
u,
|
|
81
81
|
t(o.props.errorText),
|
|
82
82
|
1
|
|
83
83
|
/* TEXT */
|
|
84
|
-
)) :
|
|
85
|
-
])) :
|
|
86
|
-
o.props.showStatus ? (e(),
|
|
84
|
+
)) : a("v-if", !0)
|
|
85
|
+
])) : a("v-if", !0),
|
|
86
|
+
o.props.showStatus ? (e(), i("div", g, [
|
|
87
87
|
o.props.micMuted ? (e(), r(o.NmorphButton, {
|
|
88
88
|
key: 0,
|
|
89
89
|
class: "nmorph-media-tile__status-item",
|
|
@@ -96,7 +96,7 @@ function S(d, x, V, o, B, M) {
|
|
|
96
96
|
]),
|
|
97
97
|
_: 1
|
|
98
98
|
/* STABLE */
|
|
99
|
-
})) :
|
|
99
|
+
})) : a("v-if", !0),
|
|
100
100
|
o.props.videoOff ? (e(), r(o.NmorphButton, {
|
|
101
101
|
key: 1,
|
|
102
102
|
class: "nmorph-media-tile__status-item",
|
|
@@ -109,7 +109,7 @@ function S(d, x, V, o, B, M) {
|
|
|
109
109
|
]),
|
|
110
110
|
_: 1
|
|
111
111
|
/* STABLE */
|
|
112
|
-
})) :
|
|
112
|
+
})) : a("v-if", !0),
|
|
113
113
|
o.props.screenSharing ? (e(), r(o.NmorphButton, {
|
|
114
114
|
key: 2,
|
|
115
115
|
class: "nmorph-media-tile__status-item",
|
|
@@ -122,15 +122,15 @@ function S(d, x, V, o, B, M) {
|
|
|
122
122
|
]),
|
|
123
123
|
_: 1
|
|
124
124
|
/* STABLE */
|
|
125
|
-
})) :
|
|
126
|
-
])) :
|
|
125
|
+
})) : a("v-if", !0)
|
|
126
|
+
])) : a("v-if", !0),
|
|
127
127
|
h(d.$slots, "overlay")
|
|
128
128
|
],
|
|
129
129
|
2
|
|
130
130
|
/* CLASS */
|
|
131
131
|
);
|
|
132
132
|
}
|
|
133
|
-
const
|
|
133
|
+
const z = /* @__PURE__ */ f(s, [["render", S], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-media-tile/NmorphMediaTile.vue"]]);
|
|
134
134
|
export {
|
|
135
|
-
|
|
135
|
+
z as default
|
|
136
136
|
};
|