@g1cloud/page-builder-editor 1.0.0-alpha.10 → 1.0.0-alpha.12
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/css/page-builder-editor.scss +13 -0
- package/dist/HtmlEditorModal-CRzp6l55.js +131 -0
- package/dist/PageBuilderEditor.vue.d.ts +4 -2
- package/dist/{PbPropertyEditorColor-B9I99uQK.js → PbPropertyEditorColor-DXkzD-V2.js} +1 -1
- package/dist/{PbPropertyEditorHtml-BVT2SwoK.js → PbPropertyEditorHtml-CbEOlq-s.js} +9 -15
- package/dist/{PbPropertyEditorImage-DLwg5dJz.js → PbPropertyEditorImage-5RZoQbLF.js} +1 -1
- package/dist/{PbPropertyEditorMultilineText-Bv4luXWg.js → PbPropertyEditorMultilineText-BMF9jHpy.js} +25 -23
- package/dist/{PbPropertyEditorProduct-6STGd-Zs.js → PbPropertyEditorProduct-Dt5vraZc.js} +1 -1
- package/dist/components/modal/HtmlEditorModal.vue.d.ts +10 -8
- package/dist/components/sidebar/property/PbPropertyEditorMultilineText.vue.d.ts +3 -2
- package/dist/{index-jUNIezk-.js → index-BFtI1jYj.js} +161 -126
- package/dist/model/context.d.ts +4 -4
- package/dist/model/page-builder-editor.d.ts +9 -3
- package/dist/model/part-property.d.ts +1 -0
- package/dist/page-builder-editor.js +1 -1
- package/dist/page-builder-editor.umd.cjs +276 -214
- package/package.json +2 -2
- package/dist/HtmlEditorModal-oXFayeg-.js +0 -100
|
@@ -7062,7 +7062,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7062
7062
|
if (typeof props.part.properties.text === "string") {
|
|
7063
7063
|
return true;
|
|
7064
7064
|
} else {
|
|
7065
|
-
return !props.part.properties.text[pageBuilder.
|
|
7065
|
+
return !props.part.properties.text[pageBuilder.locale.value];
|
|
7066
7066
|
}
|
|
7067
7067
|
} else {
|
|
7068
7068
|
return true;
|
|
@@ -7078,7 +7078,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7078
7078
|
return "Empty text";
|
|
7079
7079
|
}
|
|
7080
7080
|
} else {
|
|
7081
|
-
const t = props.part.properties.text[pageBuilder.
|
|
7081
|
+
const t = props.part.properties.text[pageBuilder.locale.value];
|
|
7082
7082
|
if (props.viewMode) {
|
|
7083
7083
|
return t || "";
|
|
7084
7084
|
} else {
|
|
@@ -7127,11 +7127,14 @@ var __publicField = (obj, key, value) => {
|
|
|
7127
7127
|
return;
|
|
7128
7128
|
if (typeof html2 !== "object")
|
|
7129
7129
|
return;
|
|
7130
|
-
const language = pageBuilder.
|
|
7130
|
+
const language = pageBuilder.locale.value;
|
|
7131
7131
|
let _html = html2[language];
|
|
7132
7132
|
if (!_html && html2.tags) {
|
|
7133
7133
|
_html = html2;
|
|
7134
7134
|
}
|
|
7135
|
+
if (!_html) {
|
|
7136
|
+
return "";
|
|
7137
|
+
}
|
|
7135
7138
|
return `${_html.tags}
|
|
7136
7139
|
<style>
|
|
7137
7140
|
${_html.style}
|
|
@@ -7196,7 +7199,7 @@ ${_html.style}
|
|
|
7196
7199
|
}
|
|
7197
7200
|
};
|
|
7198
7201
|
const _hoisted_1$1$1 = { class: "pb-product-list-widget" };
|
|
7199
|
-
const _hoisted_2$
|
|
7202
|
+
const _hoisted_2$v = { class: "product" };
|
|
7200
7203
|
const _hoisted_3$s = { class: "image" };
|
|
7201
7204
|
const _hoisted_4$i = ["src"];
|
|
7202
7205
|
const _hoisted_5$8 = { class: "name" };
|
|
@@ -7243,7 +7246,7 @@ ${_html.style}
|
|
|
7243
7246
|
key: index,
|
|
7244
7247
|
class: "product-wrapper"
|
|
7245
7248
|
}, [
|
|
7246
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
7249
|
+
vue.createElementVNode("div", _hoisted_2$v, [
|
|
7247
7250
|
products.value[index - 1] ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
7248
7251
|
vue.createElementVNode("div", _hoisted_3$s, [
|
|
7249
7252
|
vue.createElementVNode("img", {
|
|
@@ -7314,14 +7317,14 @@ ${_html.style}
|
|
|
7314
7317
|
constructor() {
|
|
7315
7318
|
__publicField2(this, "instanceId");
|
|
7316
7319
|
__publicField2(this, "model");
|
|
7317
|
-
__publicField2(this, "
|
|
7320
|
+
__publicField2(this, "locale", vue.ref("en"));
|
|
7318
7321
|
this.model = new Model$1();
|
|
7319
7322
|
}
|
|
7320
|
-
|
|
7321
|
-
return this.
|
|
7323
|
+
getLocale() {
|
|
7324
|
+
return this.locale.value;
|
|
7322
7325
|
}
|
|
7323
|
-
|
|
7324
|
-
this.
|
|
7326
|
+
setLocale(locale) {
|
|
7327
|
+
this.locale.value = locale || "en";
|
|
7325
7328
|
}
|
|
7326
7329
|
render(pageContent) {
|
|
7327
7330
|
const rootPart = new RootPart();
|
|
@@ -7431,7 +7434,7 @@ ${_html.style}
|
|
|
7431
7434
|
};
|
|
7432
7435
|
}
|
|
7433
7436
|
});
|
|
7434
|
-
const _hoisted_1$
|
|
7437
|
+
const _hoisted_1$E = { class: "pb-viewer" };
|
|
7435
7438
|
const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
|
|
7436
7439
|
__name: "PageBuilderViewer",
|
|
7437
7440
|
props: {
|
|
@@ -7444,7 +7447,7 @@ ${_html.style}
|
|
|
7444
7447
|
const props = __props;
|
|
7445
7448
|
const pageBuilderViewer = createPageBuilderViewer();
|
|
7446
7449
|
pageBuilderViewer.instanceId = props.instanceId;
|
|
7447
|
-
pageBuilderViewer.
|
|
7450
|
+
pageBuilderViewer.setLocale(props.language);
|
|
7448
7451
|
providePageBuilderViewer(pageBuilderViewer);
|
|
7449
7452
|
providePageBuilder(pageBuilderViewer);
|
|
7450
7453
|
const page = vue.computed(() => pageBuilderViewer.model.rootPart.value.children && pageBuilderViewer.model.rootPart.value.children[props.isMobilePage ? 0 : 1]);
|
|
@@ -7462,7 +7465,7 @@ ${_html.style}
|
|
|
7462
7465
|
}
|
|
7463
7466
|
);
|
|
7464
7467
|
return (_ctx, _cache) => {
|
|
7465
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
7468
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$E, [
|
|
7466
7469
|
page.value ? (vue.openBlock(), vue.createBlock(_sfc_main$1$1, {
|
|
7467
7470
|
key: 0,
|
|
7468
7471
|
"is-mobile-page": _ctx.isMobilePage,
|
|
@@ -8301,15 +8304,15 @@ ${_html.style}
|
|
|
8301
8304
|
return target;
|
|
8302
8305
|
};
|
|
8303
8306
|
const _sfc_main$A = {};
|
|
8304
|
-
const _hoisted_1$
|
|
8305
|
-
const _hoisted_2$
|
|
8307
|
+
const _hoisted_1$D = { class: "pb-add-widget-button" };
|
|
8308
|
+
const _hoisted_2$u = /* @__PURE__ */ vue.createElementVNode("span", { class: "icon material-icons-outlined" }, "add_box", -1);
|
|
8306
8309
|
const _hoisted_3$r = /* @__PURE__ */ vue.createElementVNode("span", { class: "text" }, "Add Widget", -1);
|
|
8307
8310
|
const _hoisted_4$h = [
|
|
8308
|
-
_hoisted_2$
|
|
8311
|
+
_hoisted_2$u,
|
|
8309
8312
|
_hoisted_3$r
|
|
8310
8313
|
];
|
|
8311
8314
|
function _sfc_render$1(_ctx, _cache) {
|
|
8312
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
8315
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$D, [
|
|
8313
8316
|
vue.createElementVNode("button", {
|
|
8314
8317
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("add-widget", $event))
|
|
8315
8318
|
}, _hoisted_4$h)
|
|
@@ -8346,8 +8349,8 @@ ${_html.style}
|
|
|
8346
8349
|
throw Error(MOUSE_TRACKER_NOT_FOUND);
|
|
8347
8350
|
return mouseTracker;
|
|
8348
8351
|
};
|
|
8349
|
-
const _hoisted_1$
|
|
8350
|
-
const _hoisted_2$
|
|
8352
|
+
const _hoisted_1$C = ["data-model-id", "draggable"];
|
|
8353
|
+
const _hoisted_2$t = {
|
|
8351
8354
|
key: 1,
|
|
8352
8355
|
class: "children"
|
|
8353
8356
|
};
|
|
@@ -8797,7 +8800,7 @@ ${_html.style}
|
|
|
8797
8800
|
key: 0,
|
|
8798
8801
|
part: _ctx.part
|
|
8799
8802
|
}, null, 8, ["part"])) : vue.createCommentVNode("", true),
|
|
8800
|
-
childComponents.value && childComponents.value.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
8803
|
+
childComponents.value && childComponents.value.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$t, [
|
|
8801
8804
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(childComponents.value, (child) => {
|
|
8802
8805
|
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(child.component), {
|
|
8803
8806
|
key: child.part.partId,
|
|
@@ -8815,13 +8818,13 @@ ${_html.style}
|
|
|
8815
8818
|
class: "resize-handle",
|
|
8816
8819
|
onMousedown: _resize_mousedown
|
|
8817
8820
|
}, null, 32)) : vue.createCommentVNode("", true)
|
|
8818
|
-
], 16, _hoisted_1$
|
|
8821
|
+
], 16, _hoisted_1$C)), [
|
|
8819
8822
|
[vue.unref(vPartHandler), { pageBuilder: vue.unref(pageBuilder), part: _ctx.part, droppable: true, locatePositionMark, calculateDropIndex, acceptChildPart }]
|
|
8820
8823
|
]);
|
|
8821
8824
|
};
|
|
8822
8825
|
}
|
|
8823
8826
|
});
|
|
8824
|
-
const _hoisted_1$
|
|
8827
|
+
const _hoisted_1$B = ["data-model-id"];
|
|
8825
8828
|
const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
|
|
8826
8829
|
__name: "PbBlock",
|
|
8827
8830
|
props: {
|
|
@@ -9017,14 +9020,14 @@ ${_html.style}
|
|
|
9017
9020
|
part: child
|
|
9018
9021
|
}, null, 8, ["part"]);
|
|
9019
9022
|
}), 128))
|
|
9020
|
-
], 16, _hoisted_1$
|
|
9023
|
+
], 16, _hoisted_1$B)), [
|
|
9021
9024
|
[vue.unref(vPartHandler), { pageBuilder: vue.unref(pageBuilder), part: _ctx.part, droppable: true, locatePositionMark, calculateDropIndex, acceptChildPart }]
|
|
9022
9025
|
]);
|
|
9023
9026
|
};
|
|
9024
9027
|
}
|
|
9025
9028
|
});
|
|
9026
|
-
const _hoisted_1$
|
|
9027
|
-
const _hoisted_2$
|
|
9029
|
+
const _hoisted_1$A = { class: "pb-block" };
|
|
9030
|
+
const _hoisted_2$s = /* @__PURE__ */ vue.createElementVNode("div", {
|
|
9028
9031
|
class: "pb-widget",
|
|
9029
9032
|
style: { "margin": "0 auto" }
|
|
9030
9033
|
}, [
|
|
@@ -9033,7 +9036,7 @@ ${_html.style}
|
|
|
9033
9036
|
])
|
|
9034
9037
|
], -1);
|
|
9035
9038
|
const _hoisted_3$q = [
|
|
9036
|
-
_hoisted_2$
|
|
9039
|
+
_hoisted_2$s
|
|
9037
9040
|
];
|
|
9038
9041
|
const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
|
|
9039
9042
|
__name: "PbLoginDepart",
|
|
@@ -9042,11 +9045,11 @@ ${_html.style}
|
|
|
9042
9045
|
},
|
|
9043
9046
|
setup(__props) {
|
|
9044
9047
|
return (_ctx, _cache) => {
|
|
9045
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
9048
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$A, _hoisted_3$q);
|
|
9046
9049
|
};
|
|
9047
9050
|
}
|
|
9048
9051
|
});
|
|
9049
|
-
const _hoisted_1$
|
|
9052
|
+
const _hoisted_1$z = ["data-model-id"];
|
|
9050
9053
|
const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
|
|
9051
9054
|
__name: "PbSection",
|
|
9052
9055
|
props: {
|
|
@@ -9173,14 +9176,14 @@ ${_html.style}
|
|
|
9173
9176
|
onAddWidget: addWidget
|
|
9174
9177
|
}))
|
|
9175
9178
|
], 64))
|
|
9176
|
-
], 16, _hoisted_1$
|
|
9179
|
+
], 16, _hoisted_1$z)), [
|
|
9177
9180
|
[vue.unref(vPartHandler), { pageBuilder: vue.unref(pageBuilder), part: _ctx.part, droppable: true, locatePositionMark, calculateDropIndex, acceptChildPart }]
|
|
9178
9181
|
]);
|
|
9179
9182
|
};
|
|
9180
9183
|
}
|
|
9181
9184
|
});
|
|
9182
|
-
const _hoisted_1$
|
|
9183
|
-
const _hoisted_2$
|
|
9185
|
+
const _hoisted_1$y = { class: "group-editor group-editor-position" };
|
|
9186
|
+
const _hoisted_2$r = { class: "flex-align-center" };
|
|
9184
9187
|
const _hoisted_3$p = /* @__PURE__ */ vue.createElementVNode("div", { class: "title" }, [
|
|
9185
9188
|
/* @__PURE__ */ vue.createElementVNode("label", { textContent: "Position" })
|
|
9186
9189
|
], -1);
|
|
@@ -9219,8 +9222,8 @@ ${_html.style}
|
|
|
9219
9222
|
const updateTop = (value) => updatePropertyValue({ top: value });
|
|
9220
9223
|
const updateBottom = (value) => updatePropertyValue({ bottom: value });
|
|
9221
9224
|
return (_ctx, _cache) => {
|
|
9222
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
9223
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
9225
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$y, [
|
|
9226
|
+
vue.createElementVNode("div", _hoisted_2$r, [
|
|
9224
9227
|
_hoisted_3$p,
|
|
9225
9228
|
vue.createElementVNode("div", _hoisted_4$g, [
|
|
9226
9229
|
vue.createElementVNode("div", _hoisted_5$7, [
|
|
@@ -9266,8 +9269,8 @@ ${_html.style}
|
|
|
9266
9269
|
};
|
|
9267
9270
|
}
|
|
9268
9271
|
});
|
|
9269
|
-
const _hoisted_1$
|
|
9270
|
-
const _hoisted_2$
|
|
9272
|
+
const _hoisted_1$x = { class: "group-editor group-editor-size" };
|
|
9273
|
+
const _hoisted_2$q = { class: "flex-align-center" };
|
|
9271
9274
|
const _hoisted_3$o = /* @__PURE__ */ vue.createElementVNode("div", { class: "title" }, [
|
|
9272
9275
|
/* @__PURE__ */ vue.createElementVNode("label", { textContent: "Size" })
|
|
9273
9276
|
], -1);
|
|
@@ -9292,8 +9295,8 @@ ${_html.style}
|
|
|
9292
9295
|
const updateWidth = (value) => updatePropertyValue({ width: value });
|
|
9293
9296
|
const updateHeight = (value) => updatePropertyValue({ height: value });
|
|
9294
9297
|
return (_ctx, _cache) => {
|
|
9295
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
9296
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
9298
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$x, [
|
|
9299
|
+
vue.createElementVNode("div", _hoisted_2$q, [
|
|
9297
9300
|
_hoisted_3$o,
|
|
9298
9301
|
vue.createElementVNode("div", _hoisted_4$f, [
|
|
9299
9302
|
vue.createVNode(vue.unref(bluesea.BSTextInput), {
|
|
@@ -9471,8 +9474,8 @@ ${_html.style}
|
|
|
9471
9474
|
}
|
|
9472
9475
|
}
|
|
9473
9476
|
};
|
|
9474
|
-
const _hoisted_1$
|
|
9475
|
-
const _hoisted_2$
|
|
9477
|
+
const _hoisted_1$w = { class: "vc-alpha" };
|
|
9478
|
+
const _hoisted_2$p = { class: "vc-alpha-checkboard-wrap" };
|
|
9476
9479
|
const _hoisted_3$n = /* @__PURE__ */ vue.createElementVNode(
|
|
9477
9480
|
"div",
|
|
9478
9481
|
{ class: "vc-alpha-picker" },
|
|
@@ -9485,8 +9488,8 @@ ${_html.style}
|
|
|
9485
9488
|
];
|
|
9486
9489
|
function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
9487
9490
|
const _component_Checkboard = vue.resolveComponent("Checkboard");
|
|
9488
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
9489
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
9491
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$w, [
|
|
9492
|
+
vue.createElementVNode("div", _hoisted_2$p, [
|
|
9490
9493
|
vue.createVNode(_component_Checkboard)
|
|
9491
9494
|
]),
|
|
9492
9495
|
vue.createElementVNode(
|
|
@@ -10589,12 +10592,12 @@ ${_html.style}
|
|
|
10589
10592
|
// }
|
|
10590
10593
|
}
|
|
10591
10594
|
};
|
|
10592
|
-
const _hoisted_1$
|
|
10593
|
-
const _hoisted_2$
|
|
10595
|
+
const _hoisted_1$v = { class: "vc-editable-input" };
|
|
10596
|
+
const _hoisted_2$o = ["aria-labelledby"];
|
|
10594
10597
|
const _hoisted_3$m = ["id", "for"];
|
|
10595
10598
|
const _hoisted_4$d = { class: "vc-input__desc" };
|
|
10596
10599
|
function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
10597
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
10600
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$v, [
|
|
10598
10601
|
vue.withDirectives(vue.createElementVNode("input", {
|
|
10599
10602
|
ref: "input",
|
|
10600
10603
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $options.val = $event),
|
|
@@ -10602,7 +10605,7 @@ ${_html.style}
|
|
|
10602
10605
|
class: "vc-input__input",
|
|
10603
10606
|
onKeydown: _cache[1] || (_cache[1] = (...args) => $options.handleKeyDown && $options.handleKeyDown(...args)),
|
|
10604
10607
|
onInput: _cache[2] || (_cache[2] = (...args) => $options.update && $options.update(...args))
|
|
10605
|
-
}, null, 40, _hoisted_2$
|
|
10608
|
+
}, null, 40, _hoisted_2$o), [
|
|
10606
10609
|
[vue.vModelText, $options.val]
|
|
10607
10610
|
]),
|
|
10608
10611
|
vue.createElementVNode("span", {
|
|
@@ -10689,14 +10692,14 @@ ${_html.style}
|
|
|
10689
10692
|
}
|
|
10690
10693
|
}
|
|
10691
10694
|
};
|
|
10692
|
-
const _hoisted_1$
|
|
10695
|
+
const _hoisted_1$u = /* @__PURE__ */ vue.createElementVNode(
|
|
10693
10696
|
"div",
|
|
10694
10697
|
{ class: "vc-saturation--white" },
|
|
10695
10698
|
null,
|
|
10696
10699
|
-1
|
|
10697
10700
|
/* HOISTED */
|
|
10698
10701
|
);
|
|
10699
|
-
const _hoisted_2$
|
|
10702
|
+
const _hoisted_2$n = /* @__PURE__ */ vue.createElementVNode(
|
|
10700
10703
|
"div",
|
|
10701
10704
|
{ class: "vc-saturation--black" },
|
|
10702
10705
|
null,
|
|
@@ -10725,8 +10728,8 @@ ${_html.style}
|
|
|
10725
10728
|
onTouchstart: _cache[2] || (_cache[2] = (...args) => $options.handleChange && $options.handleChange(...args))
|
|
10726
10729
|
},
|
|
10727
10730
|
[
|
|
10728
|
-
_hoisted_1$
|
|
10729
|
-
_hoisted_2$
|
|
10731
|
+
_hoisted_1$u,
|
|
10732
|
+
_hoisted_2$n,
|
|
10730
10733
|
vue.createElementVNode(
|
|
10731
10734
|
"div",
|
|
10732
10735
|
{
|
|
@@ -10874,8 +10877,8 @@ ${_html.style}
|
|
|
10874
10877
|
}
|
|
10875
10878
|
}
|
|
10876
10879
|
};
|
|
10877
|
-
const _hoisted_1$
|
|
10878
|
-
const _hoisted_2$
|
|
10880
|
+
const _hoisted_1$t = ["aria-valuenow"];
|
|
10881
|
+
const _hoisted_2$m = /* @__PURE__ */ vue.createElementVNode(
|
|
10879
10882
|
"div",
|
|
10880
10883
|
{ class: "vc-hue-picker" },
|
|
10881
10884
|
null,
|
|
@@ -10883,7 +10886,7 @@ ${_html.style}
|
|
|
10883
10886
|
/* HOISTED */
|
|
10884
10887
|
);
|
|
10885
10888
|
const _hoisted_3$k = [
|
|
10886
|
-
_hoisted_2$
|
|
10889
|
+
_hoisted_2$m
|
|
10887
10890
|
];
|
|
10888
10891
|
function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
10889
10892
|
return vue.openBlock(), vue.createElementBlock(
|
|
@@ -10914,7 +10917,7 @@ ${_html.style}
|
|
|
10914
10917
|
4
|
|
10915
10918
|
/* STYLE */
|
|
10916
10919
|
)
|
|
10917
|
-
], 40, _hoisted_1$
|
|
10920
|
+
], 40, _hoisted_1$t)
|
|
10918
10921
|
],
|
|
10919
10922
|
2
|
|
10920
10923
|
/* CLASS */
|
|
@@ -11010,8 +11013,8 @@ ${_html.style}
|
|
|
11010
11013
|
}
|
|
11011
11014
|
}
|
|
11012
11015
|
};
|
|
11013
|
-
const _hoisted_1$
|
|
11014
|
-
const _hoisted_2$
|
|
11016
|
+
const _hoisted_1$s = { class: "vc-sketch-saturation-wrap" };
|
|
11017
|
+
const _hoisted_2$l = { class: "vc-sketch-controls" };
|
|
11015
11018
|
const _hoisted_3$j = { class: "vc-sketch-sliders" };
|
|
11016
11019
|
const _hoisted_4$b = { class: "vc-sketch-hue-wrap" };
|
|
11017
11020
|
const _hoisted_5$6 = {
|
|
@@ -11053,13 +11056,13 @@ ${_html.style}
|
|
|
11053
11056
|
class: vue.normalizeClass(["vc-sketch", [$props.disableAlpha ? "vc-sketch__disable-alpha" : ""]])
|
|
11054
11057
|
},
|
|
11055
11058
|
[
|
|
11056
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
11059
|
+
vue.createElementVNode("div", _hoisted_1$s, [
|
|
11057
11060
|
vue.createVNode(_component_Saturation, {
|
|
11058
11061
|
value: _ctx.colors,
|
|
11059
11062
|
onChange: $options.childChange
|
|
11060
11063
|
}, null, 8, ["value", "onChange"])
|
|
11061
11064
|
]),
|
|
11062
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
11065
|
+
vue.createElementVNode("div", _hoisted_2$l, [
|
|
11063
11066
|
vue.createElementVNode("div", _hoisted_3$j, [
|
|
11064
11067
|
vue.createElementVNode("div", _hoisted_4$b, [
|
|
11065
11068
|
vue.createVNode(_component_Hue, {
|
|
@@ -11206,7 +11209,7 @@ ${_html.style}
|
|
|
11206
11209
|
() => setTimeout(() => {
|
|
11207
11210
|
if (appliedColor.value)
|
|
11208
11211
|
emit("change-color", appliedColor.value);
|
|
11209
|
-
}),
|
|
11212
|
+
}, 100),
|
|
11210
11213
|
{ deep: true }
|
|
11211
11214
|
);
|
|
11212
11215
|
vue.watch(
|
|
@@ -11229,10 +11232,10 @@ ${_html.style}
|
|
|
11229
11232
|
};
|
|
11230
11233
|
}
|
|
11231
11234
|
});
|
|
11232
|
-
const _hoisted_1$
|
|
11233
|
-
const _hoisted_2$
|
|
11235
|
+
const _hoisted_1$r = { class: "buttons" };
|
|
11236
|
+
const _hoisted_2$k = /* @__PURE__ */ vue.createElementVNode("i", { class: "material-icons-outlined" }, "delete", -1);
|
|
11234
11237
|
const _hoisted_3$i = [
|
|
11235
|
-
_hoisted_2$
|
|
11238
|
+
_hoisted_2$k
|
|
11236
11239
|
];
|
|
11237
11240
|
const _hoisted_4$a = { class: "sketch-wrap" };
|
|
11238
11241
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -11243,7 +11246,7 @@ ${_html.style}
|
|
|
11243
11246
|
onKeydown: _cache[3] || (_cache[3] = vue.withModifiers(() => {
|
|
11244
11247
|
}, ["stop"]))
|
|
11245
11248
|
}, [
|
|
11246
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
11249
|
+
vue.createElementVNode("div", _hoisted_1$r, [
|
|
11247
11250
|
vue.renderSlot(_ctx.$slots, "button", vue.normalizeProps(vue.guardReactiveProps({ toggle: _ctx.toggle, color: _ctx.color })), () => [
|
|
11248
11251
|
vue.createElementVNode("button", {
|
|
11249
11252
|
class: vue.normalizeClass([{ none: !_ctx.color }, "pb-button picker-button"]),
|
|
@@ -11270,8 +11273,8 @@ ${_html.style}
|
|
|
11270
11273
|
]);
|
|
11271
11274
|
}
|
|
11272
11275
|
const PbColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render]]);
|
|
11273
|
-
const _hoisted_1$
|
|
11274
|
-
const _hoisted_2$
|
|
11276
|
+
const _hoisted_1$q = { class: "group-editor group-editor-background" };
|
|
11277
|
+
const _hoisted_2$j = { class: "flex-align-center" };
|
|
11275
11278
|
const _hoisted_3$h = /* @__PURE__ */ vue.createElementVNode("div", { class: "title" }, [
|
|
11276
11279
|
/* @__PURE__ */ vue.createElementVNode("label", { textContent: "Background" })
|
|
11277
11280
|
], -1);
|
|
@@ -11307,8 +11310,8 @@ ${_html.style}
|
|
|
11307
11310
|
});
|
|
11308
11311
|
};
|
|
11309
11312
|
return (_ctx, _cache) => {
|
|
11310
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
11311
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
11313
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$q, [
|
|
11314
|
+
vue.createElementVNode("div", _hoisted_2$j, [
|
|
11312
11315
|
_hoisted_3$h,
|
|
11313
11316
|
vue.createElementVNode("div", _hoisted_4$9, [
|
|
11314
11317
|
vue.createElementVNode("div", _hoisted_5$5, [
|
|
@@ -11340,8 +11343,8 @@ ${_html.style}
|
|
|
11340
11343
|
const TopRightCornerIcon = "data:image/svg+xml,%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Transformed%20by:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23000000'%3e%3cg%20id='SVGRepo_bgCarrier'%20stroke-width='0'/%3e%3cg%20id='SVGRepo_tracerCarrier'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cg%20id='SVGRepo_iconCarrier'%3e%3cg%3e%3cpath%20fill='none'%20d='M0%200H24V24H0z'/%3e%3cpath%20d='M21%2019v2h-2v-2h2zm-4%200v2h-2v-2h2zm-4%200v2h-2v-2h2zm-4%200v2H7v-2h2zm-4%200v2H3v-2h2zm16-4v2h-2v-2h2zM5%2015v2H3v-2h2zm0-4v2H3v-2h2zm11-8c2.687%200%204.882%202.124%204.995%204.783L21%208v5h-2V8c0-1.591-1.255-2.903-2.824-2.995L16%205h-5V3h5zM5%207v2H3V7h2zm0-4v2H3V3h2zm4%200v2H7V3h2z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e";
|
|
11341
11344
|
const BottomLeftCornerIcon = "data:image/svg+xml,%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Transformed%20by:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23000000'%20transform='rotate(180)'%3e%3cg%20id='SVGRepo_bgCarrier'%20stroke-width='0'/%3e%3cg%20id='SVGRepo_tracerCarrier'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cg%20id='SVGRepo_iconCarrier'%3e%3cg%3e%3cpath%20fill='none'%20d='M0%200H24V24H0z'/%3e%3cpath%20d='M21%2019v2h-2v-2h2zm-4%200v2h-2v-2h2zm-4%200v2h-2v-2h2zm-4%200v2H7v-2h2zm-4%200v2H3v-2h2zm16-4v2h-2v-2h2zM5%2015v2H3v-2h2zm0-4v2H3v-2h2zm11-8c2.687%200%204.882%202.124%204.995%204.783L21%208v5h-2V8c0-1.591-1.255-2.903-2.824-2.995L16%205h-5V3h5zM5%207v2H3V7h2zm0-4v2H3V3h2zm4%200v2H7V3h2z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e";
|
|
11342
11345
|
const BottomRightCornerIcon = "data:image/svg+xml,%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Transformed%20by:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23000000'%20transform='rotate(90)'%3e%3cg%20id='SVGRepo_bgCarrier'%20stroke-width='0'/%3e%3cg%20id='SVGRepo_tracerCarrier'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cg%20id='SVGRepo_iconCarrier'%3e%3cg%3e%3cpath%20fill='none'%20d='M0%200H24V24H0z'/%3e%3cpath%20d='M21%2019v2h-2v-2h2zm-4%200v2h-2v-2h2zm-4%200v2h-2v-2h2zm-4%200v2H7v-2h2zm-4%200v2H3v-2h2zm16-4v2h-2v-2h2zM5%2015v2H3v-2h2zm0-4v2H3v-2h2zm11-8c2.687%200%204.882%202.124%204.995%204.783L21%208v5h-2V8c0-1.591-1.255-2.903-2.824-2.995L16%205h-5V3h5zM5%207v2H3V7h2zm0-4v2H3V3h2zm4%200v2H7V3h2z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e";
|
|
11343
|
-
const _hoisted_1$
|
|
11344
|
-
const _hoisted_2$
|
|
11346
|
+
const _hoisted_1$p = { class: "group-editor group-editor-border" };
|
|
11347
|
+
const _hoisted_2$i = { class: "flex-align-center" };
|
|
11345
11348
|
const _hoisted_3$g = /* @__PURE__ */ vue.createElementVNode("div", { class: "title" }, [
|
|
11346
11349
|
/* @__PURE__ */ vue.createElementVNode("label", { textContent: "Border" })
|
|
11347
11350
|
], -1);
|
|
@@ -11411,8 +11414,8 @@ ${_html.style}
|
|
|
11411
11414
|
const updateBorderBottomLeftRadius = (value) => updatePropertyValue({ borderBottomLeftRadius: value });
|
|
11412
11415
|
const updateBorderBottomRightRadius = (value) => updatePropertyValue({ borderBottomRightRadius: value });
|
|
11413
11416
|
return (_ctx, _cache) => {
|
|
11414
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
11415
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
11417
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$p, [
|
|
11418
|
+
vue.createElementVNode("div", _hoisted_2$i, [
|
|
11416
11419
|
_hoisted_3$g,
|
|
11417
11420
|
vue.createElementVNode("div", _hoisted_4$8, [
|
|
11418
11421
|
_hoisted_5$4,
|
|
@@ -11520,8 +11523,8 @@ ${_html.style}
|
|
|
11520
11523
|
};
|
|
11521
11524
|
}
|
|
11522
11525
|
});
|
|
11523
|
-
const _hoisted_1$
|
|
11524
|
-
const _hoisted_2$
|
|
11526
|
+
const _hoisted_1$o = { class: "group-editor group-editor-margin" };
|
|
11527
|
+
const _hoisted_2$h = { class: "flex-align-center" };
|
|
11525
11528
|
const _hoisted_3$f = /* @__PURE__ */ vue.createElementVNode("div", { class: "title" }, [
|
|
11526
11529
|
/* @__PURE__ */ vue.createElementVNode("label", { textContent: "Margin" })
|
|
11527
11530
|
], -1);
|
|
@@ -11560,8 +11563,8 @@ ${_html.style}
|
|
|
11560
11563
|
const updateTop = (value) => updatePropertyValue({ marginTop: value });
|
|
11561
11564
|
const updateBottom = (value) => updatePropertyValue({ marginBottom: value });
|
|
11562
11565
|
return (_ctx, _cache) => {
|
|
11563
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
11564
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
11566
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$o, [
|
|
11567
|
+
vue.createElementVNode("div", _hoisted_2$h, [
|
|
11565
11568
|
_hoisted_3$f,
|
|
11566
11569
|
vue.createElementVNode("div", _hoisted_4$7, [
|
|
11567
11570
|
vue.createElementVNode("div", _hoisted_5$3, [
|
|
@@ -11607,8 +11610,8 @@ ${_html.style}
|
|
|
11607
11610
|
};
|
|
11608
11611
|
}
|
|
11609
11612
|
});
|
|
11610
|
-
const _hoisted_1$
|
|
11611
|
-
const _hoisted_2$
|
|
11613
|
+
const _hoisted_1$n = { class: "group-editor group-editor-padding" };
|
|
11614
|
+
const _hoisted_2$g = { class: "flex-align-center" };
|
|
11612
11615
|
const _hoisted_3$e = /* @__PURE__ */ vue.createElementVNode("div", { class: "title" }, [
|
|
11613
11616
|
/* @__PURE__ */ vue.createElementVNode("label", { textContent: "Padding" })
|
|
11614
11617
|
], -1);
|
|
@@ -11647,8 +11650,8 @@ ${_html.style}
|
|
|
11647
11650
|
const updateTop = (value) => updatePropertyValue({ paddingTop: value });
|
|
11648
11651
|
const updateBottom = (value) => updatePropertyValue({ paddingBottom: value });
|
|
11649
11652
|
return (_ctx, _cache) => {
|
|
11650
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
11651
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
11653
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$n, [
|
|
11654
|
+
vue.createElementVNode("div", _hoisted_2$g, [
|
|
11652
11655
|
_hoisted_3$e,
|
|
11653
11656
|
vue.createElementVNode("div", _hoisted_4$6, [
|
|
11654
11657
|
vue.createElementVNode("div", _hoisted_5$2, [
|
|
@@ -12045,7 +12048,8 @@ ${_html.style}
|
|
|
12045
12048
|
caption: "Text",
|
|
12046
12049
|
propertyType: "multiline-text",
|
|
12047
12050
|
params: "",
|
|
12048
|
-
localized: true
|
|
12051
|
+
localized: true,
|
|
12052
|
+
multiLang: true
|
|
12049
12053
|
},
|
|
12050
12054
|
{
|
|
12051
12055
|
propertyName: "fontSize",
|
|
@@ -12113,7 +12117,8 @@ ${_html.style}
|
|
|
12113
12117
|
caption: "HTML",
|
|
12114
12118
|
propertyType: "html",
|
|
12115
12119
|
params: "",
|
|
12116
|
-
localized: true
|
|
12120
|
+
localized: true,
|
|
12121
|
+
multiLang: true
|
|
12117
12122
|
}
|
|
12118
12123
|
]
|
|
12119
12124
|
},
|
|
@@ -13333,11 +13338,11 @@ ${_html.style}
|
|
|
13333
13338
|
}
|
|
13334
13339
|
}
|
|
13335
13340
|
}
|
|
13336
|
-
addDocumentKeyEventListener(
|
|
13337
|
-
|
|
13341
|
+
addDocumentKeyEventListener(element) {
|
|
13342
|
+
element.addEventListener("keydown", this.handleKeyDownEvent.bind(this));
|
|
13338
13343
|
}
|
|
13339
|
-
removeDocumentKeyEventListener(
|
|
13340
|
-
|
|
13344
|
+
removeDocumentKeyEventListener(element) {
|
|
13345
|
+
element.removeEventListener("keydown", this.handleKeyDownEvent.bind(this));
|
|
13341
13346
|
}
|
|
13342
13347
|
}
|
|
13343
13348
|
const PAGE_BUILDER_EDITOR_KEY = "PageBuilderEditor";
|
|
@@ -13366,18 +13371,25 @@ ${_html.style}
|
|
|
13366
13371
|
__publicField(this, "title");
|
|
13367
13372
|
__publicField(this, "editMode");
|
|
13368
13373
|
__publicField(this, "scale", vue.ref(1));
|
|
13369
|
-
__publicField(this, "
|
|
13374
|
+
__publicField(this, "locale", vue.ref("en"));
|
|
13375
|
+
__publicField(this, "locales", vue.ref(["en"]));
|
|
13370
13376
|
this.model = new Model();
|
|
13371
13377
|
this.context = new PageBuilderContextImpl(this);
|
|
13372
13378
|
this.editMode = "free";
|
|
13373
13379
|
this.scale.value = 1;
|
|
13374
13380
|
this.initPlugins();
|
|
13375
13381
|
}
|
|
13376
|
-
|
|
13377
|
-
return this.
|
|
13382
|
+
getLocale() {
|
|
13383
|
+
return this.locale.value;
|
|
13384
|
+
}
|
|
13385
|
+
setLocale(locale) {
|
|
13386
|
+
this.locale.value = locale || "en";
|
|
13387
|
+
}
|
|
13388
|
+
getLocales() {
|
|
13389
|
+
return this.locales.value;
|
|
13378
13390
|
}
|
|
13379
|
-
|
|
13380
|
-
this.
|
|
13391
|
+
setLocales(locales) {
|
|
13392
|
+
this.locales.value = locales || ["en"];
|
|
13381
13393
|
}
|
|
13382
13394
|
registerPlugin(plugin) {
|
|
13383
13395
|
if (plugin.partDefinitions)
|
|
@@ -13397,7 +13409,7 @@ ${_html.style}
|
|
|
13397
13409
|
}
|
|
13398
13410
|
initData(content) {
|
|
13399
13411
|
this.model.rootPart.pageBuilderId = this.instanceId;
|
|
13400
|
-
this.model.rootPart.language = this.
|
|
13412
|
+
this.model.rootPart.language = this.locale.value;
|
|
13401
13413
|
let parts;
|
|
13402
13414
|
if (content) {
|
|
13403
13415
|
for (const p of content) {
|
|
@@ -13452,9 +13464,9 @@ ${_html.style}
|
|
|
13452
13464
|
});
|
|
13453
13465
|
}
|
|
13454
13466
|
}
|
|
13455
|
-
const _hoisted_1$
|
|
13456
|
-
const _hoisted_2$
|
|
13457
|
-
_hoisted_1$
|
|
13467
|
+
const _hoisted_1$m = /* @__PURE__ */ vue.createElementVNode("i", { class: "material-icons-outlined" }, "add_circle_outline", -1);
|
|
13468
|
+
const _hoisted_2$f = [
|
|
13469
|
+
_hoisted_1$m
|
|
13458
13470
|
];
|
|
13459
13471
|
const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
13460
13472
|
__name: "PbPage",
|
|
@@ -13501,12 +13513,12 @@ ${_html.style}
|
|
|
13501
13513
|
var _a2, _b;
|
|
13502
13514
|
return insertSection(((_b = (_a2 = _ctx.page) == null ? void 0 : _a2.children) == null ? void 0 : _b.length) || 0);
|
|
13503
13515
|
})
|
|
13504
|
-
}, _hoisted_2$
|
|
13516
|
+
}, _hoisted_2$f)
|
|
13505
13517
|
], 4);
|
|
13506
13518
|
};
|
|
13507
13519
|
}
|
|
13508
13520
|
});
|
|
13509
|
-
const _hoisted_1$
|
|
13521
|
+
const _hoisted_1$l = /* @__PURE__ */ vue.createElementVNode("div", { style: { "width": "20px" } }, null, -1);
|
|
13510
13522
|
const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
|
|
13511
13523
|
__name: "PbCanvas",
|
|
13512
13524
|
setup(__props) {
|
|
@@ -13559,7 +13571,7 @@ ${_html.style}
|
|
|
13559
13571
|
page: pageS.value,
|
|
13560
13572
|
width: 420
|
|
13561
13573
|
}, null, 8, ["page"]),
|
|
13562
|
-
_hoisted_1$
|
|
13574
|
+
_hoisted_1$l,
|
|
13563
13575
|
vue.createVNode(_sfc_main$o, {
|
|
13564
13576
|
"is-mobile-page": false,
|
|
13565
13577
|
page: pageL.value,
|
|
@@ -13571,7 +13583,7 @@ ${_html.style}
|
|
|
13571
13583
|
}
|
|
13572
13584
|
});
|
|
13573
13585
|
const canvasStyle = '.pb-page {\n margin: 0 auto;\n margin-top: 20px;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n}\n.pb-page .pb-page-content.selected {\n outline: 2px solid #4998f8;\n outline-offset: 5px;\n}\n.pb-page * {\n box-sizing: border-box;\n}\n.pb-add-widget-button {\n width: 100%;\n height: 100%;\n min-height: 200px;\n position: relative;\n}\n.pb-add-widget-button button {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n padding: 8px;\n background: none;\n border: none;\n cursor: pointer;\n}\n.pb-add-widget-button button:hover {\n background-color: #eeeeee;\n}\n.pb-add-widget-button .icon {\n font-size: 1rem;\n vertical-align: middle;\n}\n.pb-add-widget-button .text {\n font-size: 1rem;\n vertical-align: middle;\n margin-left: 0.4rem;\n}\n.pb-section {\n position: relative;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n outline: 1px dashed #ccc;\n background-color: #fff;\n}\n.pb-section:hover:not(:has(.pb-block:hover)) {\n background-color: #f0f0f0;\n}\n.pb-section.selected {\n outline: 1px solid #e67e22;\n outline-offset: 1px;\n z-index: 999;\n}\n.pb-section.pb-section-static {\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n}\n.pb-section.pb-section-static:after {\n content: "";\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n background-color: rgba(0, 0, 0, 0.2);\n}\n.pb-section-static .pb-widget {\n outline: none;\n}\n.pb-block {\n display: flex;\n min-width: 1px;\n position: relative;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n width: 100%;\n outline: 1px dashed #ccc;\n}\n.pb-block:hover:not(:has(.pb-widget:hover)) {\n background-color: #f0f0f0;\n}\n.pb-block.selected {\n outline: 1px solid #8e44ad;\n outline-offset: 1px;\n z-index: 999;\n}\n.pb-widget {\n position: relative;\n outline: 1px dashed #ccc;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n}\n.pb-widget.selected {\n outline: 2px solid #27ae60;\n outline-offset: 1px;\n z-index: 999;\n}\n.pb-widget .children {\n position: absolute;\n width: 100%;\n height: 100%;\n}\n.pb-widget .pan-handle {\n position: absolute;\n left: -6px;\n top: -6px;\n width: 12px;\n height: 12px;\n background-color: #27ae60;\n cursor: move;\n}\n.pb-widget .resize-handle {\n position: absolute;\n right: -6px;\n bottom: -6px;\n width: 12px;\n height: 12px;\n background-color: #27ae60;\n cursor: nwse-resize;\n}\n.pb-widget {\n position: relative;\n background-position: 50% 50%;\n background-repeat: no-repeat;\n background-size: cover;\n width: 100%;\n}\n.pb-widget .children {\n position: absolute;\n width: 100%;\n height: 100%;\n}\n.pb-text-widget {\n width: 100%;\n height: fit-content;\n}\n.pb-text-widget .text {\n color: #333;\n}\n.pb-text-widget.empty .text {\n color: #999;\n}\n.pb-image-widget {\n width: 100%;\n}\n.pb-image-widget .image {\n width: 100%;\n}\n.pb-image-widget .empty {\n height: 100px;\n background-color: #eee;\n text-align: center;\n}\n.pb-image-widget .empty span {\n font-size: 40px;\n color: #999;\n line-height: 100px;\n vertical-align: middle;\n}\n.pb-html-widget {\n width: 100%;\n height: fit-content;\n}\n.pb-html-widget.empty {\n padding: 4px 0;\n font-size: 18px;\n color: #999;\n}\n.pb-product-list-widget {\n width: 100%;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: flex-start;\n align-items: center;\n}\n.pb-product-list-widget .product-wrapper {\n width: 25%;\n}\n.pb-product-list-widget .product-wrapper .product {\n width: 95%;\n margin: 0 auto;\n padding-top: 8px;\n padding-bottom: 8px;\n}\n.pb-product-list-widget .product-wrapper img {\n width: 100%;\n}\n.pb-product-list-widget .product-wrapper .name {\n margin-top: 8px;\n font-size: 14px;\n}\n.pb-product-list-widget .product-wrapper .price {\n margin-top: 8px;\n font-size: 14px;\n font-weight: bold;\n}\n.pb-product-list-widget .product-wrapper .empty {\n height: 200px;\n background-color: #eee;\n text-align: center;\n}\n.pb-product-list-widget .product-wrapper .empty span {\n font-size: 40px;\n color: #999;\n line-height: 200px;\n vertical-align: middle;\n}\n@media (max-width: 768px) {\n .pb-product-list-widget .product-wrapper {\n width: 50%;\n }\n}\n.mobile .pb-product-list-widget .product-wrapper {\n width: 50%;\n}\n.pb-login-widget {\n height: 200px;\n text-align: center;\n}\n.pb-login-widget h3 {\n font-size: 32px;\n font-weight: bold;\n color: #ccc;\n line-height: 200px;\n vertical-align: middle;\n}\n.font-icon {\n font-family: Material Symbols Outlined, monospace;\n font-size: 1rem;\n max-width: 1em;\n}\nhtml, body {\n font-family: Noto Sans, Noto Sans KR, Noto Sans JP, Arial, sans-serif;\n font-size: 12px;\n}\nbody {\n background-color: white;\n height: 100%;\n margin: 0;\n}\n.pb-canvas-wrapper {\n padding: 32px 40px 56px 40px;\n height: 100%;\n background-color: #aaa;\n overflow: auto;\n}\n.pb-canvas-wrapper .pb-canvas {\n display: flex;\n flex-direction: row;\n transform-origin: top left;\n width: fit-content;\n min-width: 40px;\n min-height: 40px;\n margin: 0 auto;\n}\n.pb-position-mark {\n background-color: #ff3333;\n opacity: 0.5;\n border-radius: 2px;\n}\n.pb-add-section-handle {\n position: relative;\n text-align: center;\n cursor: pointer;\n z-index: 5;\n height: 0;\n}\n.pb-add-section-handle.top::before, .pb-add-section-handle.bottom::before, .pb-add-section-handle.middle::before {\n content: "";\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n opacity: 0;\n pointer-events: none;\n}\n.pb-add-section-handle.bottom {\n left: 50%;\n bottom: -32px;\n}\n.pb-add-section-handle:hover.top::before, .pb-add-section-handle:hover.bottom::before, .pb-add-section-handle:hover.middle::before,\n.pb-add-section-handle:hover > i {\n opacity: 1;\n}\n.pb-add-section-handle > i {\n vertical-align: middle;\n position: absolute;\n top: 50%;\n left: -20px;\n font-size: 2rem;\n transform: translate(-50%, -50%);\n opacity: 0.2;\n}\n.pb-button {\n background: none;\n border: none;\n cursor: pointer;\n vertical-align: middle;\n}\n.pb-guideline {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n.pb-guideline.selected {\n z-index: 3;\n}\n.pb-guideline.preselect {\n z-index: 4;\n}';
|
|
13574
|
-
const _hoisted_1$
|
|
13586
|
+
const _hoisted_1$k = { class: "pb-canvas-frame" };
|
|
13575
13587
|
const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
|
|
13576
13588
|
__name: "PbCanvasFrame",
|
|
13577
13589
|
setup(__props) {
|
|
@@ -13607,14 +13619,14 @@ ${_html.style}
|
|
|
13607
13619
|
<link href="https://fonts.googleapis.com/css2?family=Material+Icons+Outlined" rel="stylesheet" />
|
|
13608
13620
|
<style>${canvasStyle}</style>
|
|
13609
13621
|
`;
|
|
13610
|
-
pageBuilderEditor.keyHandlers.addDocumentKeyEventListener(iframeRef.value.contentWindow.document);
|
|
13622
|
+
pageBuilderEditor.keyHandlers.addDocumentKeyEventListener(iframeRef.value.contentWindow.document.body);
|
|
13611
13623
|
stopIframeWatch();
|
|
13612
13624
|
}
|
|
13613
13625
|
}
|
|
13614
13626
|
);
|
|
13615
13627
|
return (_ctx, _cache) => {
|
|
13616
13628
|
var _a, _b, _c, _d;
|
|
13617
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
13629
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$k, [
|
|
13618
13630
|
vue.createElementVNode("iframe", {
|
|
13619
13631
|
ref_key: "iframeRef",
|
|
13620
13632
|
ref: iframeRef,
|
|
@@ -13630,7 +13642,7 @@ ${_html.style}
|
|
|
13630
13642
|
};
|
|
13631
13643
|
}
|
|
13632
13644
|
});
|
|
13633
|
-
const _hoisted_1$
|
|
13645
|
+
const _hoisted_1$j = { class: "pb-tool-button bs-layout-horizontal flex-align-center" };
|
|
13634
13646
|
const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
|
|
13635
13647
|
__name: "PbToolbarButton",
|
|
13636
13648
|
props: {
|
|
@@ -13644,7 +13656,7 @@ ${_html.style}
|
|
|
13644
13656
|
(_b = (_a = props.button).handler) == null ? void 0 : _b.call(_a, pageBuilder);
|
|
13645
13657
|
};
|
|
13646
13658
|
return (_ctx, _cache) => {
|
|
13647
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
13659
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$j, [
|
|
13648
13660
|
vue.createElementVNode("div", {
|
|
13649
13661
|
class: "tool-button bs-clickable",
|
|
13650
13662
|
onClick: handleClick
|
|
@@ -13659,7 +13671,7 @@ ${_html.style}
|
|
|
13659
13671
|
};
|
|
13660
13672
|
}
|
|
13661
13673
|
});
|
|
13662
|
-
const _hoisted_1$
|
|
13674
|
+
const _hoisted_1$i = { class: "pb-tool-button-group bs-layout-horizontal flex-align-center" };
|
|
13663
13675
|
const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
|
|
13664
13676
|
__name: "PbToolbarButtonGroup",
|
|
13665
13677
|
props: {
|
|
@@ -13667,7 +13679,7 @@ ${_html.style}
|
|
|
13667
13679
|
},
|
|
13668
13680
|
setup(__props) {
|
|
13669
13681
|
return (_ctx, _cache) => {
|
|
13670
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
13682
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$i, [
|
|
13671
13683
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.group.buttons, (button) => {
|
|
13672
13684
|
return vue.openBlock(), vue.createBlock(_sfc_main$l, {
|
|
13673
13685
|
key: button.buttonId,
|
|
@@ -13678,8 +13690,8 @@ ${_html.style}
|
|
|
13678
13690
|
};
|
|
13679
13691
|
}
|
|
13680
13692
|
});
|
|
13681
|
-
const _hoisted_1$
|
|
13682
|
-
const _hoisted_2$
|
|
13693
|
+
const _hoisted_1$h = { class: "pb-toolbar bs-layout-horizontal align-items-center" };
|
|
13694
|
+
const _hoisted_2$e = { class: "bs-layout-horizontal" };
|
|
13683
13695
|
const _hoisted_3$d = /* @__PURE__ */ vue.createElementVNode("div", { class: "flex-grow-1" }, null, -1);
|
|
13684
13696
|
const _hoisted_4$5 = { class: "ml-8 w-64" };
|
|
13685
13697
|
const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -13695,8 +13707,8 @@ ${_html.style}
|
|
|
13695
13707
|
pageBuilder.zoom(scale2);
|
|
13696
13708
|
};
|
|
13697
13709
|
return (_ctx, _cache) => {
|
|
13698
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
13699
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
13710
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$h, [
|
|
13711
|
+
vue.createElementVNode("div", _hoisted_2$e, [
|
|
13700
13712
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(buttonGroups), (group) => {
|
|
13701
13713
|
return vue.openBlock(), vue.createBlock(_sfc_main$k, {
|
|
13702
13714
|
key: group.groupId,
|
|
@@ -13721,23 +13733,31 @@ ${_html.style}
|
|
|
13721
13733
|
};
|
|
13722
13734
|
}
|
|
13723
13735
|
});
|
|
13724
|
-
const _hoisted_1$
|
|
13736
|
+
const _hoisted_1$g = { class: "pb-menu bs-layout-vertical" };
|
|
13725
13737
|
const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
13726
13738
|
__name: "PbMenu",
|
|
13727
13739
|
setup(__props) {
|
|
13728
13740
|
return (_ctx, _cache) => {
|
|
13729
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
13741
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$g, [
|
|
13730
13742
|
vue.createVNode(_sfc_main$j)
|
|
13731
13743
|
]);
|
|
13732
13744
|
};
|
|
13733
13745
|
}
|
|
13734
13746
|
});
|
|
13735
|
-
const _hoisted_1$g = { class: "pb-navigator" };
|
|
13736
|
-
const _hoisted_2$e = { class: "pb-navigator" };
|
|
13737
13747
|
const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
13738
13748
|
__name: "PbNavigator",
|
|
13739
13749
|
setup(__props) {
|
|
13740
13750
|
const pageBuilder = usePageBuilderEditor();
|
|
13751
|
+
const treeS = vue.ref();
|
|
13752
|
+
const treeL = vue.ref();
|
|
13753
|
+
vue.watch(
|
|
13754
|
+
() => treeS.value,
|
|
13755
|
+
() => treeS.value && pageBuilder.keyHandlers.addDocumentKeyEventListener(treeS.value)
|
|
13756
|
+
);
|
|
13757
|
+
vue.watch(
|
|
13758
|
+
() => treeL.value,
|
|
13759
|
+
() => treeL.value && pageBuilder.keyHandlers.addDocumentKeyEventListener(treeL.value)
|
|
13760
|
+
);
|
|
13741
13761
|
const tabs = [
|
|
13742
13762
|
{ tabId: "pageS", caption: "Mobile", icon: "phone_iphone" },
|
|
13743
13763
|
{ tabId: "pageL", caption: "PC", icon: "desktop_windows" }
|
|
@@ -13879,7 +13899,12 @@ ${_html.style}
|
|
|
13879
13899
|
tabs
|
|
13880
13900
|
}, {
|
|
13881
13901
|
pageS: vue.withCtx(() => [
|
|
13882
|
-
vue.createElementVNode("div",
|
|
13902
|
+
vue.createElementVNode("div", {
|
|
13903
|
+
ref_key: "treeS",
|
|
13904
|
+
ref: treeS,
|
|
13905
|
+
class: "pb-navigator",
|
|
13906
|
+
tabindex: "0"
|
|
13907
|
+
}, [
|
|
13883
13908
|
vue.createVNode(vue.unref(bluesea.BSTree), {
|
|
13884
13909
|
expandedRows: expandedRows.value,
|
|
13885
13910
|
"onUpdate:expandedRows": [
|
|
@@ -13901,10 +13926,15 @@ ${_html.style}
|
|
|
13901
13926
|
"show-move-button": "",
|
|
13902
13927
|
onRowMoved: rowMoved
|
|
13903
13928
|
}, null, 8, ["expandedRows", "selectedRows", "data", "key-provider"])
|
|
13904
|
-
])
|
|
13929
|
+
], 512)
|
|
13905
13930
|
]),
|
|
13906
13931
|
pageL: vue.withCtx(() => [
|
|
13907
|
-
vue.createElementVNode("div",
|
|
13932
|
+
vue.createElementVNode("div", {
|
|
13933
|
+
ref_key: "treeL",
|
|
13934
|
+
ref: treeL,
|
|
13935
|
+
class: "pb-navigator",
|
|
13936
|
+
tabindex: "0"
|
|
13937
|
+
}, [
|
|
13908
13938
|
vue.createVNode(vue.unref(bluesea.BSTree), {
|
|
13909
13939
|
expandedRows: expandedRows.value,
|
|
13910
13940
|
"onUpdate:expandedRows": [
|
|
@@ -13926,7 +13956,7 @@ ${_html.style}
|
|
|
13926
13956
|
"show-move-button": "",
|
|
13927
13957
|
onRowMoved: rowMoved
|
|
13928
13958
|
}, null, 8, ["expandedRows", "selectedRows", "data", "key-provider"])
|
|
13929
|
-
])
|
|
13959
|
+
], 512)
|
|
13930
13960
|
]),
|
|
13931
13961
|
_: 1
|
|
13932
13962
|
}, 8, ["tab-id"]);
|
|
@@ -14216,7 +14246,8 @@ ${_html.style}
|
|
|
14216
14246
|
title: {},
|
|
14217
14247
|
editMode: {},
|
|
14218
14248
|
pageContent: {},
|
|
14219
|
-
|
|
14249
|
+
locales: {},
|
|
14250
|
+
locale: {}
|
|
14220
14251
|
},
|
|
14221
14252
|
setup(__props, { expose: __expose }) {
|
|
14222
14253
|
const props = __props;
|
|
@@ -14225,19 +14256,23 @@ ${_html.style}
|
|
|
14225
14256
|
pageBuilderEditor.instanceId = props.instanceId;
|
|
14226
14257
|
pageBuilderEditor.title = props.title;
|
|
14227
14258
|
pageBuilderEditor.editMode = props.editMode || "free";
|
|
14228
|
-
if (props.
|
|
14229
|
-
pageBuilderEditor.
|
|
14259
|
+
if (props.locales)
|
|
14260
|
+
pageBuilderEditor.setLocales(props.locales);
|
|
14261
|
+
if (props.locale)
|
|
14262
|
+
pageBuilderEditor.setLocale(props.locale);
|
|
14230
14263
|
pageBuilderEditor.registerPlugin({
|
|
14231
14264
|
// TODO
|
|
14232
14265
|
commands: createDefaultCommands(modal)
|
|
14233
14266
|
});
|
|
14234
|
-
pageBuilderEditor.keyHandlers.addDocumentKeyEventListener(window.document);
|
|
14235
14267
|
providePageBuilderEditor(pageBuilderEditor);
|
|
14236
14268
|
providePageBuilder(pageBuilderEditor);
|
|
14237
14269
|
vue.onMounted(() => pageBuilderEditor.initData(props.pageContent));
|
|
14238
14270
|
vue.watch(() => props.pageContent, (pageContent) => pageContent && pageBuilderEditor.initData(pageContent));
|
|
14239
|
-
vue.watch(() => props.
|
|
14240
|
-
pageBuilderEditor.
|
|
14271
|
+
vue.watch(() => props.locale, (locale) => {
|
|
14272
|
+
pageBuilderEditor.setLocale(locale);
|
|
14273
|
+
});
|
|
14274
|
+
vue.watch(() => props.locales, (locales) => {
|
|
14275
|
+
pageBuilderEditor.setLocales(locales);
|
|
14241
14276
|
});
|
|
14242
14277
|
const colorHistory = vue.ref([]);
|
|
14243
14278
|
vue.provide("colorHistory", colorHistory);
|
|
@@ -14389,29 +14424,21 @@ ${_html.style}
|
|
|
14389
14424
|
setup(__props, { emit: __emit }) {
|
|
14390
14425
|
const props = __props;
|
|
14391
14426
|
const emit = __emit;
|
|
14392
|
-
const emitUpdatePropertyValue = (value) => {
|
|
14393
|
-
const properties = {};
|
|
14394
|
-
if (props.value && typeof props.value === "object") {
|
|
14395
|
-
properties[props.property.propertyName] = {
|
|
14396
|
-
...props.value,
|
|
14397
|
-
[language.value]: value
|
|
14398
|
-
};
|
|
14399
|
-
} else {
|
|
14400
|
-
properties[props.property.propertyName] = {
|
|
14401
|
-
[language.value]: value
|
|
14402
|
-
};
|
|
14403
|
-
}
|
|
14404
|
-
emit("update-property-value", properties);
|
|
14405
|
-
};
|
|
14406
14427
|
const pageBuilder = usePageBuilderEditor();
|
|
14407
|
-
const
|
|
14428
|
+
const locales = vue.computed(() => pageBuilder.getLocales());
|
|
14408
14429
|
const text = vue.computed({
|
|
14409
14430
|
get() {
|
|
14410
|
-
return props.value
|
|
14431
|
+
return props.value;
|
|
14411
14432
|
},
|
|
14412
|
-
|
|
14433
|
+
// @ts-ignore
|
|
14434
|
+
set(value) {
|
|
14413
14435
|
}
|
|
14414
14436
|
});
|
|
14437
|
+
const emitUpdatePropertyValue = (value) => {
|
|
14438
|
+
const properties = {};
|
|
14439
|
+
properties[props.property.propertyName] = value;
|
|
14440
|
+
emit("update-property-value", properties);
|
|
14441
|
+
};
|
|
14415
14442
|
return (_ctx, _cache) => {
|
|
14416
14443
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$8, [
|
|
14417
14444
|
vue.createElementVNode("div", _hoisted_2$8, [
|
|
@@ -14420,16 +14447,26 @@ ${_html.style}
|
|
|
14420
14447
|
}, null, 8, _hoisted_3$8)
|
|
14421
14448
|
]),
|
|
14422
14449
|
vue.createElementVNode("div", null, [
|
|
14423
|
-
vue.
|
|
14450
|
+
_ctx.property.multiLang ? (vue.openBlock(), vue.createBlock(vue.unref(bluesea.BSMultiLangTextArea), {
|
|
14451
|
+
key: 0,
|
|
14424
14452
|
modelValue: text.value,
|
|
14425
14453
|
"onUpdate:modelValue": [
|
|
14426
14454
|
_cache[0] || (_cache[0] = ($event) => text.value = $event),
|
|
14427
14455
|
emitUpdatePropertyValue
|
|
14428
14456
|
],
|
|
14429
|
-
|
|
14457
|
+
locales: locales.value,
|
|
14430
14458
|
height: "60px",
|
|
14431
14459
|
width: "100%"
|
|
14432
|
-
}, null, 8, ["modelValue", "
|
|
14460
|
+
}, null, 8, ["modelValue", "locales"])) : (vue.openBlock(), vue.createBlock(vue.unref(bluesea.BSTextArea), {
|
|
14461
|
+
key: 1,
|
|
14462
|
+
modelValue: text.value,
|
|
14463
|
+
"onUpdate:modelValue": [
|
|
14464
|
+
_cache[1] || (_cache[1] = ($event) => text.value = $event),
|
|
14465
|
+
emitUpdatePropertyValue
|
|
14466
|
+
],
|
|
14467
|
+
height: "60px",
|
|
14468
|
+
width: "100%"
|
|
14469
|
+
}, null, 8, ["modelValue"]))
|
|
14433
14470
|
])
|
|
14434
14471
|
]);
|
|
14435
14472
|
};
|
|
@@ -14593,11 +14630,8 @@ ${_html.style}
|
|
|
14593
14630
|
const pageBuilder = usePageBuilderEditor();
|
|
14594
14631
|
const emit = __emit;
|
|
14595
14632
|
const editHtml = () => {
|
|
14596
|
-
const
|
|
14597
|
-
|
|
14598
|
-
if (props.value && typeof props.value === "object") {
|
|
14599
|
-
html = props.value[language];
|
|
14600
|
-
}
|
|
14633
|
+
const locales = pageBuilder.getLocales();
|
|
14634
|
+
const localeTabs = locales.map((v) => ({ tabId: `tab-${v}`, caption: v }));
|
|
14601
14635
|
modal.openModal({
|
|
14602
14636
|
component: vue.defineAsyncComponent(() => Promise.resolve().then(() => HtmlEditorModal)),
|
|
14603
14637
|
style: {
|
|
@@ -14607,16 +14641,13 @@ ${_html.style}
|
|
|
14607
14641
|
minHeight: "400px"
|
|
14608
14642
|
},
|
|
14609
14643
|
bind: {
|
|
14610
|
-
html
|
|
14644
|
+
html: JSON.parse(JSON.stringify(props.value || {})),
|
|
14645
|
+
locales,
|
|
14646
|
+
localeTabs
|
|
14611
14647
|
},
|
|
14612
14648
|
on: {
|
|
14613
|
-
updateHtml: (
|
|
14614
|
-
|
|
14615
|
-
const value = {
|
|
14616
|
-
...props.value || {},
|
|
14617
|
-
[language2]: html2
|
|
14618
|
-
};
|
|
14619
|
-
emit("update-property-value", { html: value });
|
|
14649
|
+
updateHtml: (html) => {
|
|
14650
|
+
emit("update-property-value", { html });
|
|
14620
14651
|
}
|
|
14621
14652
|
}
|
|
14622
14653
|
});
|
|
@@ -14789,8 +14820,8 @@ ${_html.style}
|
|
|
14789
14820
|
__proto__: null,
|
|
14790
14821
|
default: _sfc_main$1
|
|
14791
14822
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
14792
|
-
const _hoisted_1 = { class: "bs-layout-vertical
|
|
14793
|
-
const _hoisted_2 = { class: "bs-layout-horizontal
|
|
14823
|
+
const _hoisted_1 = { class: "bs-layout-vertical flex-grow-1 h-full" };
|
|
14824
|
+
const _hoisted_2 = { class: "bs-layout-horizontal h-full pt-8" };
|
|
14794
14825
|
const _hoisted_3 = { class: "preview flex-grow-1" };
|
|
14795
14826
|
const _hoisted_4 = { class: "bs-layout-vertical w-full h-full" };
|
|
14796
14827
|
const _hoisted_5 = /* @__PURE__ */ vue.createElementVNode("div", { class: "title pb-4" }, "Preview", -1);
|
|
@@ -14805,78 +14836,109 @@ ${_html.style}
|
|
|
14805
14836
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
14806
14837
|
__name: "HtmlEditorModal",
|
|
14807
14838
|
props: {
|
|
14808
|
-
html: {}
|
|
14839
|
+
html: {},
|
|
14840
|
+
locales: {},
|
|
14841
|
+
localeTabs: {}
|
|
14809
14842
|
},
|
|
14810
14843
|
emits: ["updateHtml"],
|
|
14811
14844
|
setup(__props, { emit: __emit }) {
|
|
14812
|
-
var _a, _b;
|
|
14813
14845
|
const props = __props;
|
|
14814
14846
|
const emit = __emit;
|
|
14847
|
+
const tabId = vue.ref(props.localeTabs && props.localeTabs[0].tabId);
|
|
14815
14848
|
const modalHandle = bluesea.useModalHandle();
|
|
14816
|
-
const
|
|
14817
|
-
const
|
|
14818
|
-
|
|
14819
|
-
|
|
14820
|
-
|
|
14849
|
+
const html = vue.ref(props.html || {});
|
|
14850
|
+
const preview = vue.computed(() => {
|
|
14851
|
+
var _a;
|
|
14852
|
+
let data = {};
|
|
14853
|
+
(_a = props.locales) == null ? void 0 : _a.forEach((locale) => {
|
|
14854
|
+
const _html = html.value[locale] || { tags: "", style: "" };
|
|
14855
|
+
data[locale] = _html.tags ? `${_html.tags}
|
|
14856
|
+
<style>${_html.style}</style>` : "";
|
|
14857
|
+
});
|
|
14858
|
+
return data;
|
|
14859
|
+
});
|
|
14860
|
+
const updateTags = (locale, value) => {
|
|
14861
|
+
if (!html.value)
|
|
14862
|
+
html.value = {};
|
|
14863
|
+
if (!html.value[locale])
|
|
14864
|
+
html.value[locale] = {};
|
|
14865
|
+
html.value[locale].tags = value;
|
|
14866
|
+
};
|
|
14867
|
+
const updateStyle = (locale, value) => {
|
|
14868
|
+
if (!html.value)
|
|
14869
|
+
html.value = {};
|
|
14870
|
+
if (!html.value[locale])
|
|
14871
|
+
html.value[locale] = {};
|
|
14872
|
+
html.value[locale].style = value;
|
|
14821
14873
|
};
|
|
14822
14874
|
const ok = () => {
|
|
14823
|
-
emit("updateHtml",
|
|
14824
|
-
tags: tags.value || "",
|
|
14825
|
-
style: style.value || ""
|
|
14826
|
-
});
|
|
14875
|
+
emit("updateHtml", html.value);
|
|
14827
14876
|
modalHandle.close();
|
|
14828
14877
|
};
|
|
14829
14878
|
return (_ctx, _cache) => {
|
|
14830
|
-
return vue.openBlock(), vue.createBlock(vue.unref(bluesea.BSModalFrame), {
|
|
14879
|
+
return vue.openBlock(), vue.createBlock(vue.unref(bluesea.BSModalFrame), {
|
|
14880
|
+
class: "pb-html-editor-modal",
|
|
14881
|
+
title: "HTML Editor"
|
|
14882
|
+
}, {
|
|
14831
14883
|
default: vue.withCtx(() => [
|
|
14832
14884
|
vue.createElementVNode("div", _hoisted_1, [
|
|
14833
|
-
vue.
|
|
14834
|
-
|
|
14835
|
-
|
|
14836
|
-
|
|
14837
|
-
|
|
14838
|
-
|
|
14839
|
-
|
|
14840
|
-
|
|
14841
|
-
|
|
14842
|
-
|
|
14843
|
-
|
|
14844
|
-
|
|
14845
|
-
|
|
14846
|
-
|
|
14847
|
-
|
|
14848
|
-
|
|
14849
|
-
|
|
14850
|
-
|
|
14851
|
-
|
|
14852
|
-
],
|
|
14853
|
-
"
|
|
14854
|
-
|
|
14855
|
-
|
|
14885
|
+
vue.createVNode(vue.unref(bluesea.BSTabSheet), {
|
|
14886
|
+
"tab-id": tabId.value,
|
|
14887
|
+
"onUpdate:tabId": _cache[0] || (_cache[0] = ($event) => tabId.value = $event),
|
|
14888
|
+
tabs: _ctx.localeTabs,
|
|
14889
|
+
class: "flex-grow-1"
|
|
14890
|
+
}, vue.createSlots({ _: 2 }, [
|
|
14891
|
+
vue.renderList(_ctx.locales, (locale) => {
|
|
14892
|
+
return {
|
|
14893
|
+
name: `tab-${locale}`,
|
|
14894
|
+
fn: vue.withCtx(() => [
|
|
14895
|
+
vue.createElementVNode("div", _hoisted_2, [
|
|
14896
|
+
vue.createElementVNode("div", _hoisted_3, [
|
|
14897
|
+
vue.createElementVNode("div", _hoisted_4, [
|
|
14898
|
+
_hoisted_5,
|
|
14899
|
+
vue.createElementVNode("div", {
|
|
14900
|
+
class: "content flex-grow-1",
|
|
14901
|
+
innerHTML: preview.value[locale]
|
|
14902
|
+
}, null, 8, _hoisted_6)
|
|
14903
|
+
])
|
|
14904
|
+
]),
|
|
14905
|
+
vue.createElementVNode("div", _hoisted_7, [
|
|
14906
|
+
vue.createElementVNode("div", _hoisted_8, [
|
|
14907
|
+
_hoisted_9,
|
|
14908
|
+
vue.createElementVNode("div", _hoisted_10, [
|
|
14909
|
+
vue.createVNode(vue.unref(bluesea.BSCodeEditor), {
|
|
14910
|
+
"model-value": (html.value[locale] || {}).tags,
|
|
14911
|
+
"editor-height": "100%",
|
|
14912
|
+
lang: "html",
|
|
14913
|
+
"onUpdate:modelValue": (value) => updateTags(locale, value)
|
|
14914
|
+
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
14915
|
+
])
|
|
14916
|
+
]),
|
|
14917
|
+
vue.createElementVNode("div", _hoisted_11, [
|
|
14918
|
+
_hoisted_12,
|
|
14919
|
+
vue.createElementVNode("div", _hoisted_13, [
|
|
14920
|
+
vue.createVNode(vue.unref(bluesea.BSCodeEditor), {
|
|
14921
|
+
"model-value": (html.value[locale] || {}).style,
|
|
14922
|
+
"editor-height": "100%",
|
|
14923
|
+
lang: "css",
|
|
14924
|
+
"onUpdate:modelValue": (value) => updateStyle(locale, value)
|
|
14925
|
+
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
14926
|
+
])
|
|
14927
|
+
])
|
|
14928
|
+
])
|
|
14929
|
+
])
|
|
14856
14930
|
])
|
|
14857
|
-
|
|
14858
|
-
|
|
14859
|
-
|
|
14860
|
-
|
|
14861
|
-
|
|
14862
|
-
|
|
14863
|
-
|
|
14864
|
-
|
|
14865
|
-
|
|
14866
|
-
|
|
14867
|
-
|
|
14868
|
-
lang: "css"
|
|
14869
|
-
}, null, 8, ["modelValue"])
|
|
14870
|
-
])
|
|
14871
|
-
])
|
|
14872
|
-
])
|
|
14873
|
-
]),
|
|
14874
|
-
vue.createElementVNode("div", { class: "buttons pt-24" }, [
|
|
14875
|
-
vue.createElementVNode("button", {
|
|
14876
|
-
class: "mr-4",
|
|
14877
|
-
onClick: ok
|
|
14878
|
-
}, "OK")
|
|
14879
|
-
])
|
|
14931
|
+
};
|
|
14932
|
+
})
|
|
14933
|
+
]), 1032, ["tab-id", "tabs"])
|
|
14934
|
+
])
|
|
14935
|
+
]),
|
|
14936
|
+
buttons: vue.withCtx(() => [
|
|
14937
|
+
vue.createElementVNode("div", { class: "bs-layout-horizontal justify-content-center" }, [
|
|
14938
|
+
vue.createElementVNode("button", {
|
|
14939
|
+
class: "mr-4",
|
|
14940
|
+
onClick: ok
|
|
14941
|
+
}, "OK")
|
|
14880
14942
|
])
|
|
14881
14943
|
]),
|
|
14882
14944
|
_: 1
|