gp-designer 1.0.20 → 1.0.22
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/gp-designer.es.js +19 -18
- package/dist/gp-designer.umd.js +5 -5
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/gp-designer.es.js
CHANGED
@@ -12241,6 +12241,8 @@ const _1 = /* @__PURE__ */ dt(f1, [["render", g1]]), A1 = { class: "p-4 flex fle
|
|
12241
12241
|
emits: ["update:modelValue", "update:element"],
|
12242
12242
|
setup(e, { emit: t }) {
|
12243
12243
|
const a = e, i = t, s = G(a.template), u = G();
|
12244
|
+
let r = Ys("", {}, !1);
|
12245
|
+
const o = G("");
|
12244
12246
|
it(
|
12245
12247
|
() => a.template,
|
12246
12248
|
(A) => {
|
@@ -12264,7 +12266,7 @@ const _1 = /* @__PURE__ */ dt(f1, [["render", g1]]), A1 = { class: "p-4 flex fle
|
|
12264
12266
|
},
|
12265
12267
|
{ immediate: !0 }
|
12266
12268
|
);
|
12267
|
-
const
|
12269
|
+
const c = G(a.mode);
|
12268
12270
|
it(
|
12269
12271
|
() => u.value,
|
12270
12272
|
(A) => {
|
@@ -12272,10 +12274,9 @@ const _1 = /* @__PURE__ */ dt(f1, [["render", g1]]), A1 = { class: "p-4 flex fle
|
|
12272
12274
|
},
|
12273
12275
|
{ immediate: !0 }
|
12274
12276
|
);
|
12275
|
-
const
|
12276
|
-
let d = Ys("", {}, !1);
|
12277
|
+
const d = G("");
|
12277
12278
|
it(
|
12278
|
-
() =>
|
12279
|
+
() => o.value,
|
12279
12280
|
(A) => {
|
12280
12281
|
i("update:modelValue", A);
|
12281
12282
|
},
|
@@ -12350,12 +12351,12 @@ const _1 = /* @__PURE__ */ dt(f1, [["render", g1]]), A1 = { class: "p-4 flex fle
|
|
12350
12351
|
}
|
12351
12352
|
}
|
12352
12353
|
function ne(A) {
|
12353
|
-
|
12354
|
+
o.value = A;
|
12354
12355
|
}
|
12355
12356
|
function Y(A) {
|
12356
|
-
|
12357
|
-
const D =
|
12358
|
-
return
|
12357
|
+
r = Ys(A);
|
12358
|
+
const D = r("body").children().toArray().map((w) => g(r(w)));
|
12359
|
+
return o.value = r("body").html() || "", D[0];
|
12359
12360
|
}
|
12360
12361
|
function g(A, D = "") {
|
12361
12362
|
var de;
|
@@ -12369,7 +12370,7 @@ const _1 = /* @__PURE__ */ dt(f1, [["render", g1]]), A1 = { class: "p-4 flex fle
|
|
12369
12370
|
}
|
12370
12371
|
return "/html/" + _e.join("/");
|
12371
12372
|
}
|
12372
|
-
const q = w(A).replace("/html/body[1]", ""), re = A.children().toArray().map((te) => g(
|
12373
|
+
const q = w(A).replace("/html/body[1]", ""), re = A.children().toArray().map((te) => g(r(te), q)), Ie = (de = a.rules) == null ? void 0 : de.find((te) => te.xpath === q);
|
12373
12374
|
return {
|
12374
12375
|
tag: A[0].tagName,
|
12375
12376
|
text: A.contents().not(A.children()).text().trim(),
|
@@ -12477,7 +12478,7 @@ const _1 = /* @__PURE__ */ dt(f1, [["render", g1]]), A1 = { class: "p-4 flex fle
|
|
12477
12478
|
q.onload = (re) => {
|
12478
12479
|
var de;
|
12479
12480
|
let Ie = (de = re == null ? void 0 : re.target) == null ? void 0 : de.result;
|
12480
|
-
D.attrs.src = Ie, console.log(" element.attrs", D.attrs),
|
12481
|
+
D.attrs.src = Ie, console.log(" element.attrs", D.attrs), d.value = (/* @__PURE__ */ new Date()).getTime().toString();
|
12481
12482
|
}, q.readAsDataURL(w);
|
12482
12483
|
} else
|
12483
12484
|
console.log("e2", A), D.attrs.src = w;
|
@@ -12485,7 +12486,7 @@ const _1 = /* @__PURE__ */ dt(f1, [["render", g1]]), A1 = { class: "p-4 flex fle
|
|
12485
12486
|
function Pe(A) {
|
12486
12487
|
const { icon: D } = A, w = B(u.value, A.element.xpath);
|
12487
12488
|
let q = w.attrs.class.replace(/icon-\S+/g, `icon-${D}`);
|
12488
|
-
w.attrs.class = q,
|
12489
|
+
w.attrs.class = q, d.value = (/* @__PURE__ */ new Date()).getTime().toString();
|
12489
12490
|
}
|
12490
12491
|
const be = G(a.previewWidth), ee = G(375);
|
12491
12492
|
let ye = G(!1), He = G(""), Ze = 0, O = 0;
|
@@ -12511,12 +12512,12 @@ const _1 = /* @__PURE__ */ dt(f1, [["render", g1]]), A1 = { class: "p-4 flex fle
|
|
12511
12512
|
x("span", S1, Se(be.value) + "px", 1)
|
12512
12513
|
])) : H("", !0),
|
12513
12514
|
x("div", null, [
|
12514
|
-
|
12515
|
+
o.value ? (v(), M("div", {
|
12515
12516
|
key: 0,
|
12516
|
-
innerHTML:
|
12517
|
+
innerHTML: o.value
|
12517
12518
|
}, null, 8, x1)) : (v(), M("div", {
|
12518
12519
|
key: 1,
|
12519
|
-
innerHTML: he(
|
12520
|
+
innerHTML: he(r)("body").html()
|
12520
12521
|
}, null, 8, O1))
|
12521
12522
|
])
|
12522
12523
|
], 4)) : H("", !0),
|
@@ -12534,7 +12535,7 @@ const _1 = /* @__PURE__ */ dt(f1, [["render", g1]]), A1 = { class: "p-4 flex fle
|
|
12534
12535
|
icon: E.value,
|
12535
12536
|
mode: A.mode,
|
12536
12537
|
icons: A.icons,
|
12537
|
-
r:
|
12538
|
+
r: d.value,
|
12538
12539
|
element: u.value,
|
12539
12540
|
selectedElement: T.value,
|
12540
12541
|
hoveredElement: _.value,
|
@@ -12548,12 +12549,12 @@ const _1 = /* @__PURE__ */ dt(f1, [["render", g1]]), A1 = { class: "p-4 flex fle
|
|
12548
12549
|
}, null, 8, ["cropper", "icon", "mode", "icons", "r", "element", "selectedElement", "hoveredElement"])) : H("", !0)
|
12549
12550
|
])
|
12550
12551
|
]),
|
12551
|
-
|
12552
|
+
c.value == "design" ? (v(), M("div", {
|
12552
12553
|
key: 2,
|
12553
12554
|
class: "resizer",
|
12554
12555
|
onMousedown: D[1] || (D[1] = (w) => L("structure"))
|
12555
12556
|
}, null, 32)) : H("", !0),
|
12556
|
-
|
12557
|
+
c.value == "design" ? (v(), M("div", {
|
12557
12558
|
key: 3,
|
12558
12559
|
class: "resize-area overflow-auto",
|
12559
12560
|
style: cs({ width: ee.value + "px" })
|
@@ -12583,7 +12584,7 @@ const _1 = /* @__PURE__ */ dt(f1, [["render", g1]]), A1 = { class: "p-4 flex fle
|
|
12583
12584
|
}, null, 8, ["icons"])
|
12584
12585
|
]));
|
12585
12586
|
}
|
12586
|
-
}), k1 = /* @__PURE__ */ dt(P1, [["__scopeId", "data-v-
|
12587
|
+
}), k1 = /* @__PURE__ */ dt(P1, [["__scopeId", "data-v-fe58fd73"]]), Y1 = {
|
12587
12588
|
install(e) {
|
12588
12589
|
e.component("Designer", k1);
|
12589
12590
|
}
|