labmaker-plugin 0.0.9 → 0.0.10-dev
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/labmaker-plugin.js +86 -31
- package/dist/labmaker-plugin.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/labmaker-plugin.js
CHANGED
|
@@ -1,11 +1,66 @@
|
|
|
1
|
-
import { openBlock as
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
for (const [
|
|
5
|
-
|
|
6
|
-
return
|
|
1
|
+
import { openBlock as s, createElementBlock as c, Fragment as u, createElementVNode as n, toDisplayString as p, normalizeClass as m, createCommentVNode as l } from "vue";
|
|
2
|
+
const _ = (e, o) => {
|
|
3
|
+
const t = e.__vccOpts || e;
|
|
4
|
+
for (const [i, a] of o)
|
|
5
|
+
t[i] = a;
|
|
6
|
+
return t;
|
|
7
|
+
}, g = {
|
|
8
|
+
props: ["custom-img"],
|
|
9
|
+
data() {
|
|
10
|
+
return {
|
|
11
|
+
imgSRC: this.customImg
|
|
12
|
+
};
|
|
13
|
+
},
|
|
14
|
+
computed: {},
|
|
15
|
+
methods: {
|
|
16
|
+
fileUpload(e) {
|
|
17
|
+
const t = e.target.files[0];
|
|
18
|
+
this.fileProcess(t);
|
|
19
|
+
},
|
|
20
|
+
fileProcess(e) {
|
|
21
|
+
this.imgSRC = URL.createObjectURL(e);
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
mounted() {
|
|
25
|
+
}
|
|
26
|
+
}, h = /* @__PURE__ */ n("h1", null, "File Uploader", -1), f = { class: "image-uploader" }, y = /* @__PURE__ */ n("h1", null, "File Uploader", -1), v = { class: "your-file" }, L = ["src"];
|
|
27
|
+
function H(e, o, t, i, a, r) {
|
|
28
|
+
return s(), c(u, null, [
|
|
29
|
+
h,
|
|
30
|
+
n("div", f, [
|
|
31
|
+
y,
|
|
32
|
+
n("input", {
|
|
33
|
+
onChange: o[0] || (o[0] = (...d) => r.fileUpload && r.fileUpload(...d)),
|
|
34
|
+
type: "file",
|
|
35
|
+
id: "file-upload",
|
|
36
|
+
name: "fileUpload",
|
|
37
|
+
accept: "image/*"
|
|
38
|
+
}, null, 32),
|
|
39
|
+
n("div", v, [
|
|
40
|
+
n("img", {
|
|
41
|
+
src: a.imgSRC,
|
|
42
|
+
alt: "",
|
|
43
|
+
scrset: ""
|
|
44
|
+
}, null, 8, L)
|
|
45
|
+
])
|
|
46
|
+
])
|
|
47
|
+
], 64);
|
|
48
|
+
}
|
|
49
|
+
const U = /* @__PURE__ */ _(g, [["render", H]]);
|
|
50
|
+
const $ = {
|
|
51
|
+
props: ["title"],
|
|
52
|
+
data() {
|
|
53
|
+
return {};
|
|
54
|
+
},
|
|
55
|
+
computed: {}
|
|
7
56
|
};
|
|
8
|
-
|
|
57
|
+
function k(e, o, t, i, a, r) {
|
|
58
|
+
return s(), c("header", null, [
|
|
59
|
+
n("h1", null, p(t.title), 1)
|
|
60
|
+
]);
|
|
61
|
+
}
|
|
62
|
+
const x = /* @__PURE__ */ _($, [["render", k]]);
|
|
63
|
+
const b = {
|
|
9
64
|
props: ["content"],
|
|
10
65
|
data() {
|
|
11
66
|
return {};
|
|
@@ -16,8 +71,8 @@ const d = {
|
|
|
16
71
|
}
|
|
17
72
|
},
|
|
18
73
|
methods: {
|
|
19
|
-
pixelFormat(
|
|
20
|
-
return typeof
|
|
74
|
+
pixelFormat(e) {
|
|
75
|
+
return typeof e == "number" ? e + "px" : e;
|
|
21
76
|
},
|
|
22
77
|
checkStepper() {
|
|
23
78
|
this.$store.dispatch("lastPageFocus", {});
|
|
@@ -26,38 +81,38 @@ const d = {
|
|
|
26
81
|
mounted() {
|
|
27
82
|
this.checkStepper();
|
|
28
83
|
}
|
|
29
|
-
},
|
|
30
|
-
function
|
|
31
|
-
return
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
src:
|
|
35
|
-
alt:
|
|
36
|
-
class:
|
|
37
|
-
}, null, 10,
|
|
38
|
-
|
|
84
|
+
}, S = { class: "image-container" }, C = { class: "image" }, M = ["src", "alt"], P = ["innerHTML"], T = ["innerHTML"], F = ["innerHTML"];
|
|
85
|
+
function R(e, o, t, i, a, r) {
|
|
86
|
+
return s(), c("div", S, [
|
|
87
|
+
n("div", C, [
|
|
88
|
+
n("img", {
|
|
89
|
+
src: t.content.src,
|
|
90
|
+
alt: t.content.alt,
|
|
91
|
+
class: m(t.content.class)
|
|
92
|
+
}, null, 10, M),
|
|
93
|
+
t.content.captionHeader ? (s(), c("span", {
|
|
39
94
|
key: 0,
|
|
40
95
|
class: "captionHeader",
|
|
41
|
-
innerHTML:
|
|
42
|
-
}, null, 8,
|
|
43
|
-
|
|
96
|
+
innerHTML: t.content.captionHeader
|
|
97
|
+
}, null, 8, P)) : l("", !0),
|
|
98
|
+
t.content.caption ? (s(), c("span", {
|
|
44
99
|
key: 1,
|
|
45
100
|
class: "caption",
|
|
46
|
-
innerHTML:
|
|
47
|
-
}, null, 8,
|
|
48
|
-
|
|
101
|
+
innerHTML: t.content.caption
|
|
102
|
+
}, null, 8, T)) : l("", !0),
|
|
103
|
+
t.content.copyright ? (s(), c("span", {
|
|
49
104
|
key: 2,
|
|
50
|
-
innerHTML:
|
|
105
|
+
innerHTML: t.content.copyright,
|
|
51
106
|
class: "copyright"
|
|
52
|
-
}, null, 8,
|
|
107
|
+
}, null, 8, F)) : l("", !0)
|
|
53
108
|
])
|
|
54
109
|
]);
|
|
55
110
|
}
|
|
56
|
-
const
|
|
57
|
-
install: (
|
|
58
|
-
|
|
111
|
+
const I = /* @__PURE__ */ _(b, [["render", R], ["__scopeId", "data-v-6d545532"]]), E = {
|
|
112
|
+
install: (e, o) => {
|
|
113
|
+
e.component("special-uploader", U), e.component("lab-header", x), e.component("lab-image", I);
|
|
59
114
|
}
|
|
60
115
|
};
|
|
61
116
|
export {
|
|
62
|
-
|
|
117
|
+
E as default
|
|
63
118
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,
|
|
1
|
+
(function(e,a){typeof exports=="object"&&typeof module<"u"?module.exports=a(require("vue")):typeof define=="function"&&define.amd?define(["vue"],a):(e=typeof globalThis<"u"?globalThis:e||self,e.LabmakerPlugin=a(e.Vue))})(this,function(e){"use strict";const a="",r=(t,o)=>{const n=t.__vccOpts||t;for(const[s,c]of o)n[s]=c;return n},i={props:["custom-img"],data(){return{imgSRC:this.customImg}},computed:{},methods:{fileUpload(t){const n=t.target.files[0];this.fileProcess(n)},fileProcess(t){this.imgSRC=URL.createObjectURL(t)}},mounted(){}},d=e.createElementVNode("h1",null,"File Uploader",-1),_={class:"image-uploader"},m=e.createElementVNode("h1",null,"File Uploader",-1),p={class:"your-file"},u=["src"];function f(t,o,n,s,c,l){return e.openBlock(),e.createElementBlock(e.Fragment,null,[d,e.createElementVNode("div",_,[m,e.createElementVNode("input",{onChange:o[0]||(o[0]=(...x)=>l.fileUpload&&l.fileUpload(...x)),type:"file",id:"file-upload",name:"fileUpload",accept:"image/*"},null,32),e.createElementVNode("div",p,[e.createElementVNode("img",{src:c.imgSRC,alt:"",scrset:""},null,8,u)])])],64)}const h=r(i,[["render",f]]),C="",g={props:["title"],data(){return{}},computed:{}};function k(t,o,n,s,c,l){return e.openBlock(),e.createElementBlock("header",null,[e.createElementVNode("h1",null,e.toDisplayString(n.title),1)])}const y=r(g,[["render",k]]),P="",E={props:["content"],data(){return{}},computed:{getLastPage(){return!!this.$store.getters.getLastPage}},methods:{pixelFormat(t){return typeof t=="number"?t+"px":t},checkStepper(){this.$store.dispatch("lastPageFocus",{})}},mounted(){this.checkStepper()}},L={class:"image-container"},V={class:"image"},B=["src","alt"],N=["innerHTML"],H=["innerHTML"],U=["innerHTML"];function $(t,o,n,s,c,l){return e.openBlock(),e.createElementBlock("div",L,[e.createElementVNode("div",V,[e.createElementVNode("img",{src:n.content.src,alt:n.content.alt,class:e.normalizeClass(n.content.class)},null,10,B),n.content.captionHeader?(e.openBlock(),e.createElementBlock("span",{key:0,class:"captionHeader",innerHTML:n.content.captionHeader},null,8,N)):e.createCommentVNode("",!0),n.content.caption?(e.openBlock(),e.createElementBlock("span",{key:1,class:"caption",innerHTML:n.content.caption},null,8,H)):e.createCommentVNode("",!0),n.content.copyright?(e.openBlock(),e.createElementBlock("span",{key:2,innerHTML:n.content.copyright,class:"copyright"},null,8,U)):e.createCommentVNode("",!0)])])}const b=r(E,[["render",$],["__scopeId","data-v-6d545532"]]);return{install:(t,o)=>{t.component("special-uploader",h),t.component("lab-header",y),t.component("lab-image",b)}}});
|