@g1cloud/page-builder-editor 1.0.0-alpha.17 → 1.0.0-alpha.18
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/canvas.scss +1 -2
- package/dist/PageBuilderEditor.vue.d.ts +0 -2
- package/dist/{PbPropertyEditorColor-DEVkcUND.js → PbPropertyEditorColor-B6_DIy47.js} +1 -1
- package/dist/{PbPropertyEditorHtml-CxPlqBYx.js → PbPropertyEditorHtml-BiMjuW0k.js} +1 -1
- package/dist/{PbPropertyEditorImage-DAEVOkpl.js → PbPropertyEditorImage-BwHm3YZo.js} +2 -2
- package/dist/{PbPropertyEditorMultilineText-zmUCXJQZ.js → PbPropertyEditorMultilineText-JyXSHgdX.js} +1 -1
- package/dist/{PbPropertyEditorText-CleInrev.js → PbPropertyEditorText-dMHwoG4V.js} +1 -1
- package/dist/{PbWidgetAddModal-DoR8HJUd.js → PbWidgetAddModal-eGdqZyZu.js} +1 -1
- package/dist/{index-rPBXWjSz.js → index-C8Vb2KOj.js} +498 -687
- package/dist/model/command.d.ts +10 -13
- package/dist/model/context.d.ts +0 -12
- package/dist/model/event.d.ts +0 -56
- package/dist/model/model.d.ts +7 -2
- package/dist/model/page-builder-editor.d.ts +9 -5
- package/dist/model/part-definintion.d.ts +2 -3
- package/dist/page-builder-editor.js +17 -18
- package/dist/page-builder-editor.umd.cjs +548 -786
- package/package.json +2 -2
- package/dist/PbPartAddModal-DuLpnV4E.js +0 -50
- package/dist/components/sidebar/property/PbPropertyLocalMarketingPart.vue.d.ts +0 -23
|
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
7
|
import { ref, defineComponent, openBlock, createElementBlock, createCommentVNode, computed, mergeProps, toDisplayString, onMounted, onBeforeUnmount, provide, inject, watch, createBlock as createBlock$1, resolveDynamicComponent, normalizeProps, createElementVNode, normalizeClass, Fragment, renderList, reactive, defineAsyncComponent, withDirectives, unref, createVNode, normalizeStyle, resolveComponent, vModelText, resolveDirective, withModifiers, renderSlot, guardReactiveProps, markRaw, Teleport, toHandlers, withCtx } from "vue";
|
|
8
|
-
import { notNull, BSTextInput, vClickOutside,
|
|
8
|
+
import { notNull, BSTextInput, vClickOutside, useModal, useContextMenu, BSSelect, BSTabSheet, BSTree } from "@g1cloud/bluesea";
|
|
9
9
|
const create$5 = () => /* @__PURE__ */ new Map();
|
|
10
10
|
const copy = (m) => {
|
|
11
11
|
const r = create$5();
|
|
@@ -6597,7 +6597,7 @@ var shortUniqueId$1 = { exports: {} };
|
|
|
6597
6597
|
})(shortUniqueId$1);
|
|
6598
6598
|
var shortUniqueIdExports = shortUniqueId$1.exports;
|
|
6599
6599
|
const ShortUniqueId = /* @__PURE__ */ getDefaultExportFromCjs(shortUniqueIdExports);
|
|
6600
|
-
function mitt
|
|
6600
|
+
function mitt(n) {
|
|
6601
6601
|
return { all: n = n || /* @__PURE__ */ new Map(), on: function(t, e) {
|
|
6602
6602
|
var i = n.get(t);
|
|
6603
6603
|
i ? i.push(e) : n.set(t, [e]);
|
|
@@ -6613,57 +6613,30 @@ function mitt$1(n) {
|
|
|
6613
6613
|
});
|
|
6614
6614
|
} };
|
|
6615
6615
|
}
|
|
6616
|
-
const emitter
|
|
6616
|
+
const emitter = mitt();
|
|
6617
6617
|
const PageBuilderEditorEvent = {
|
|
6618
6618
|
on: {
|
|
6619
6619
|
modelUpdated: (listener) => {
|
|
6620
|
-
emitter
|
|
6620
|
+
emitter.on("modelUpdated", listener);
|
|
6621
6621
|
},
|
|
6622
6622
|
modelUpdatedByUI: (listener) => {
|
|
6623
|
-
emitter
|
|
6624
|
-
},
|
|
6625
|
-
requestImage: (listener) => {
|
|
6626
|
-
emitter$1.on("requestImage", listener);
|
|
6627
|
-
},
|
|
6628
|
-
requestProducts: (listener) => {
|
|
6629
|
-
emitter$1.on("requestProducts", listener);
|
|
6630
|
-
},
|
|
6631
|
-
requestLocalMarketingPartSchedule: (listener) => {
|
|
6632
|
-
emitter$1.on("requestLocalMarketingPartSchedule", listener);
|
|
6623
|
+
emitter.on("modelUpdatedByUI", listener);
|
|
6633
6624
|
}
|
|
6634
6625
|
},
|
|
6635
6626
|
off: {
|
|
6636
6627
|
modelUpdated: (listener) => {
|
|
6637
|
-
emitter
|
|
6628
|
+
emitter.off("modelUpdated", listener);
|
|
6638
6629
|
},
|
|
6639
6630
|
modelUpdatedByUI: (listener) => {
|
|
6640
|
-
emitter
|
|
6641
|
-
},
|
|
6642
|
-
requestImage: (listener) => {
|
|
6643
|
-
emitter$1.off("requestImage", listener);
|
|
6644
|
-
},
|
|
6645
|
-
requestProducts: (listener) => {
|
|
6646
|
-
emitter$1.off("requestProducts", listener);
|
|
6647
|
-
},
|
|
6648
|
-
requestLocalMarketingPartSchedule: (listener) => {
|
|
6649
|
-
emitter$1.off("requestLocalMarketingPartSchedule", listener);
|
|
6631
|
+
emitter.off("modelUpdatedByUI", listener);
|
|
6650
6632
|
}
|
|
6651
6633
|
},
|
|
6652
6634
|
emit: {
|
|
6653
6635
|
modelUpdated: (changes) => {
|
|
6654
|
-
emitter
|
|
6636
|
+
emitter.emit("modelUpdated", changes);
|
|
6655
6637
|
},
|
|
6656
6638
|
modelUpdatedByUI: (changes) => {
|
|
6657
|
-
emitter
|
|
6658
|
-
},
|
|
6659
|
-
requestImage: (param) => {
|
|
6660
|
-
emitter$1.emit("requestImage", param);
|
|
6661
|
-
},
|
|
6662
|
-
requestProducts: (param) => {
|
|
6663
|
-
emitter$1.emit("requestProducts", param);
|
|
6664
|
-
},
|
|
6665
|
-
requestLocalMarketingPartSchedule: (param) => {
|
|
6666
|
-
emitter$1.emit("requestLocalMarketingPartSchedule", param);
|
|
6639
|
+
emitter.emit("modelUpdatedByUI", changes);
|
|
6667
6640
|
}
|
|
6668
6641
|
}
|
|
6669
6642
|
};
|
|
@@ -6801,28 +6774,11 @@ class Part {
|
|
|
6801
6774
|
}
|
|
6802
6775
|
return style;
|
|
6803
6776
|
}
|
|
6804
|
-
getPageBuilderId() {
|
|
6805
|
-
if (this.isRoot())
|
|
6806
|
-
return this.pageBuilderId;
|
|
6807
|
-
if (this.parent)
|
|
6808
|
-
return this.parent.getPageBuilderId();
|
|
6809
|
-
}
|
|
6810
|
-
isGlobalDesignPart() {
|
|
6811
|
-
return false;
|
|
6812
|
-
}
|
|
6813
|
-
isLocalDesignPart() {
|
|
6814
|
-
return false;
|
|
6815
|
-
}
|
|
6816
|
-
isLocalMarketingPart() {
|
|
6817
|
-
return false;
|
|
6818
|
-
}
|
|
6819
6777
|
}
|
|
6820
6778
|
class RootPart extends Part {
|
|
6821
6779
|
constructor() {
|
|
6822
6780
|
super();
|
|
6823
|
-
__publicField2(this, "pageBuilderId");
|
|
6824
6781
|
__publicField2(this, "language");
|
|
6825
|
-
this.pageBuilderId = "";
|
|
6826
6782
|
this.language = "en";
|
|
6827
6783
|
this.partType = ROOT_TYPE$1;
|
|
6828
6784
|
this.partName = ROOT_TYPE$1;
|
|
@@ -6850,18 +6806,6 @@ class Section extends Part {
|
|
|
6850
6806
|
isSection() {
|
|
6851
6807
|
return true;
|
|
6852
6808
|
}
|
|
6853
|
-
isGlobalDesignPart() {
|
|
6854
|
-
var _a;
|
|
6855
|
-
return ((_a = this.properties) == null ? void 0 : _a.sectionType) === "GlobalDesignPart";
|
|
6856
|
-
}
|
|
6857
|
-
isLocalDesignPart() {
|
|
6858
|
-
var _a;
|
|
6859
|
-
return ((_a = this.properties) == null ? void 0 : _a.sectionType) === "LocalDesignPart";
|
|
6860
|
-
}
|
|
6861
|
-
isLocalMarketingPart() {
|
|
6862
|
-
var _a;
|
|
6863
|
-
return ((_a = this.properties) == null ? void 0 : _a.sectionType) === "LocalMarketingPart";
|
|
6864
|
-
}
|
|
6865
6809
|
}
|
|
6866
6810
|
class Block extends Part {
|
|
6867
6811
|
constructor() {
|
|
@@ -7018,9 +6962,9 @@ const _hoisted_3$3$1 = {
|
|
|
7018
6962
|
key: 1,
|
|
7019
6963
|
class: "placeholder"
|
|
7020
6964
|
};
|
|
7021
|
-
const _hoisted_4$
|
|
7022
|
-
const _hoisted_5$
|
|
7023
|
-
_hoisted_4$
|
|
6965
|
+
const _hoisted_4$d = /* @__PURE__ */ createElementVNode("span", { class: "font-icon" }, "image", -1);
|
|
6966
|
+
const _hoisted_5$6 = [
|
|
6967
|
+
_hoisted_4$d
|
|
7024
6968
|
];
|
|
7025
6969
|
const _sfc_main$6$1 = /* @__PURE__ */ defineComponent({
|
|
7026
6970
|
__name: "PbImageWidget",
|
|
@@ -7037,7 +6981,7 @@ const _sfc_main$6$1 = /* @__PURE__ */ defineComponent({
|
|
|
7037
6981
|
src: (_b = _ctx.part.properties) == null ? void 0 : _b.image,
|
|
7038
6982
|
alt: "",
|
|
7039
6983
|
class: "image"
|
|
7040
|
-
}, null, 8, _hoisted_2$3$1)) : _ctx.placeholder ? (openBlock(), createElementBlock("div", _hoisted_3$3$1, _hoisted_5$
|
|
6984
|
+
}, null, 8, _hoisted_2$3$1)) : _ctx.placeholder ? (openBlock(), createElementBlock("div", _hoisted_3$3$1, _hoisted_5$6)) : createCommentVNode("", true)
|
|
7041
6985
|
]);
|
|
7042
6986
|
};
|
|
7043
6987
|
}
|
|
@@ -7141,8 +7085,8 @@ ${_html.style}
|
|
|
7141
7085
|
}
|
|
7142
7086
|
});
|
|
7143
7087
|
const _hoisted_1$1$1 = { class: "pb-iframe-widget" };
|
|
7144
|
-
const _hoisted_2$
|
|
7145
|
-
const _hoisted_3$
|
|
7088
|
+
const _hoisted_2$j = ["src"];
|
|
7089
|
+
const _hoisted_3$g = {
|
|
7146
7090
|
key: 1,
|
|
7147
7091
|
class: "placeholder",
|
|
7148
7092
|
textContent: "Empty URL"
|
|
@@ -7189,7 +7133,7 @@ const _sfc_main$3$1 = /* @__PURE__ */ defineComponent({
|
|
|
7189
7133
|
url.value ? (openBlock(), createElementBlock("iframe", mergeProps({
|
|
7190
7134
|
key: 0,
|
|
7191
7135
|
src: url.value
|
|
7192
|
-
}, style.value), null, 16, _hoisted_2$
|
|
7136
|
+
}, style.value), null, 16, _hoisted_2$j)) : _ctx.placeholder ? (openBlock(), createElementBlock("div", _hoisted_3$g)) : createCommentVNode("", true)
|
|
7193
7137
|
]);
|
|
7194
7138
|
};
|
|
7195
7139
|
}
|
|
@@ -7200,21 +7144,6 @@ const defaultPartDefinitions = {
|
|
|
7200
7144
|
partName: "Section",
|
|
7201
7145
|
creator: () => _sfc_main$7$1
|
|
7202
7146
|
},
|
|
7203
|
-
"GlobalDesignPart": {
|
|
7204
|
-
partType: "Section",
|
|
7205
|
-
partName: "GlobalDesignPart",
|
|
7206
|
-
creator: () => _sfc_main$7$1
|
|
7207
|
-
},
|
|
7208
|
-
"LocalDesignPart": {
|
|
7209
|
-
partType: "Section",
|
|
7210
|
-
partName: "LocalDesignPart",
|
|
7211
|
-
creator: () => _sfc_main$7$1
|
|
7212
|
-
},
|
|
7213
|
-
"LocalMarketingPart": {
|
|
7214
|
-
partType: "Section",
|
|
7215
|
-
partName: "LocalMarketingPart",
|
|
7216
|
-
creator: () => _sfc_main$7$1
|
|
7217
|
-
},
|
|
7218
7147
|
"Block": {
|
|
7219
7148
|
partType: "Block",
|
|
7220
7149
|
partName: "Block",
|
|
@@ -7246,9 +7175,10 @@ const PAGE_BUILDER_VIEWER_KEY = "PageBuilderViewer";
|
|
|
7246
7175
|
let partDefinitions$1 = { ...defaultPartDefinitions };
|
|
7247
7176
|
class PageBuilderViewerImpl {
|
|
7248
7177
|
constructor() {
|
|
7249
|
-
__publicField2(this, "instanceId");
|
|
7250
7178
|
__publicField2(this, "model");
|
|
7251
7179
|
__publicField2(this, "locale", ref("en"));
|
|
7180
|
+
__publicField2(this, "watchers", {});
|
|
7181
|
+
__publicField2(this, "providers", {});
|
|
7252
7182
|
this.model = new Model$1();
|
|
7253
7183
|
}
|
|
7254
7184
|
getLocale() {
|
|
@@ -7262,33 +7192,45 @@ class PageBuilderViewerImpl {
|
|
|
7262
7192
|
plugin.widgets.forEach((v) => {
|
|
7263
7193
|
const w = { ...v };
|
|
7264
7194
|
w.partType = "Widget";
|
|
7265
|
-
w.creator = () => _sfc_main$
|
|
7195
|
+
w.creator = () => _sfc_main$p;
|
|
7266
7196
|
partDefinitions$1[v.partName] = w;
|
|
7267
7197
|
});
|
|
7268
7198
|
}
|
|
7199
|
+
if (plugin.watchers) {
|
|
7200
|
+
this.watchers = { ...this.watchers, ...plugin.watchers };
|
|
7201
|
+
}
|
|
7202
|
+
if (plugin.providers) {
|
|
7203
|
+
this.providers = { ...this.providers, ...plugin.providers };
|
|
7204
|
+
}
|
|
7269
7205
|
}
|
|
7270
7206
|
watchCustomWidgetData(part) {
|
|
7271
7207
|
const def = partDefinitions$1[part.partName];
|
|
7272
7208
|
if (!def || !def.dataWatcher)
|
|
7273
7209
|
return false;
|
|
7274
|
-
|
|
7210
|
+
const watcher = this.watchers[def.dataWatcher];
|
|
7211
|
+
if (!watcher)
|
|
7212
|
+
return false;
|
|
7213
|
+
return watcher(part.properties);
|
|
7275
7214
|
}
|
|
7276
7215
|
provideCustomWidgetData(part) {
|
|
7277
7216
|
const def = partDefinitions$1[part.partName];
|
|
7278
7217
|
if (!def || !def.dataProvider)
|
|
7279
7218
|
return Promise.resolve();
|
|
7280
|
-
|
|
7219
|
+
const provider = this.providers[def.dataProvider];
|
|
7220
|
+
if (!provider)
|
|
7221
|
+
return Promise.resolve();
|
|
7222
|
+
return provider(part.properties);
|
|
7281
7223
|
}
|
|
7282
7224
|
render(pageContent) {
|
|
7283
|
-
const rootPart =
|
|
7284
|
-
rootPart
|
|
7285
|
-
|
|
7286
|
-
|
|
7287
|
-
|
|
7288
|
-
|
|
7225
|
+
const rootPart = this.parsePartContent(pageContent);
|
|
7226
|
+
if (rootPart) {
|
|
7227
|
+
if (rootPart.children) {
|
|
7228
|
+
for (let page of rootPart.children) {
|
|
7229
|
+
page.parent = rootPart;
|
|
7230
|
+
}
|
|
7289
7231
|
}
|
|
7232
|
+
this.model.rootPart.value = rootPart;
|
|
7290
7233
|
}
|
|
7291
|
-
this.model.rootPart.value = rootPart;
|
|
7292
7234
|
}
|
|
7293
7235
|
parsePageContent(pageContent) {
|
|
7294
7236
|
return pageContent.map((partContent) => this.parsePartContent(partContent)).filter((part) => !!part);
|
|
@@ -7310,6 +7252,8 @@ class PageBuilderViewerImpl {
|
|
|
7310
7252
|
}
|
|
7311
7253
|
createPart(partType) {
|
|
7312
7254
|
switch (partType) {
|
|
7255
|
+
case "Root":
|
|
7256
|
+
return new RootPart();
|
|
7313
7257
|
case "Page":
|
|
7314
7258
|
return new Page();
|
|
7315
7259
|
case "Section":
|
|
@@ -7393,11 +7337,10 @@ const _sfc_main$2$1 = /* @__PURE__ */ defineComponent({
|
|
|
7393
7337
|
};
|
|
7394
7338
|
}
|
|
7395
7339
|
});
|
|
7396
|
-
const _hoisted_1$
|
|
7340
|
+
const _hoisted_1$t = { class: "pb-viewer" };
|
|
7397
7341
|
const _sfc_main$1$1 = /* @__PURE__ */ defineComponent({
|
|
7398
7342
|
__name: "PageBuilderViewer",
|
|
7399
7343
|
props: {
|
|
7400
|
-
instanceId: {},
|
|
7401
7344
|
pageContent: {},
|
|
7402
7345
|
isMobilePage: { type: Boolean },
|
|
7403
7346
|
language: {},
|
|
@@ -7406,7 +7349,6 @@ const _sfc_main$1$1 = /* @__PURE__ */ defineComponent({
|
|
|
7406
7349
|
setup(__props) {
|
|
7407
7350
|
const props = __props;
|
|
7408
7351
|
const pageBuilderViewer = createPageBuilderViewer();
|
|
7409
|
-
pageBuilderViewer.instanceId = props.instanceId;
|
|
7410
7352
|
pageBuilderViewer.setLocale(props.language);
|
|
7411
7353
|
if (props.plugin)
|
|
7412
7354
|
pageBuilderViewer.registerCustomPlugin(props.plugin);
|
|
@@ -7427,7 +7369,7 @@ const _sfc_main$1$1 = /* @__PURE__ */ defineComponent({
|
|
|
7427
7369
|
}
|
|
7428
7370
|
);
|
|
7429
7371
|
return (_ctx, _cache) => {
|
|
7430
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
7372
|
+
return openBlock(), createElementBlock("div", _hoisted_1$t, [
|
|
7431
7373
|
page.value ? (openBlock(), createBlock$1(_sfc_main$2$1, {
|
|
7432
7374
|
key: 0,
|
|
7433
7375
|
"is-mobile-page": _ctx.isMobilePage,
|
|
@@ -7437,7 +7379,7 @@ const _sfc_main$1$1 = /* @__PURE__ */ defineComponent({
|
|
|
7437
7379
|
};
|
|
7438
7380
|
}
|
|
7439
7381
|
});
|
|
7440
|
-
const _sfc_main$
|
|
7382
|
+
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
7441
7383
|
__name: "PbCustomWidget",
|
|
7442
7384
|
props: {
|
|
7443
7385
|
part: {},
|
|
@@ -7450,7 +7392,6 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
7450
7392
|
const comp = computed(() => pageBuilder.getCustomWidgetComponent(props.part));
|
|
7451
7393
|
const data = ref({});
|
|
7452
7394
|
const bind = computed(() => ({
|
|
7453
|
-
pageBuilderId: pageBuilder.instanceId,
|
|
7454
7395
|
...props.part.properties || {},
|
|
7455
7396
|
placeholder: true,
|
|
7456
7397
|
...data.value || {}
|
|
@@ -7468,40 +7409,6 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
7468
7409
|
};
|
|
7469
7410
|
}
|
|
7470
7411
|
});
|
|
7471
|
-
function mitt(n) {
|
|
7472
|
-
return { all: n = n || /* @__PURE__ */ new Map(), on: function(t, e) {
|
|
7473
|
-
var i = n.get(t);
|
|
7474
|
-
i ? i.push(e) : n.set(t, [e]);
|
|
7475
|
-
}, off: function(t, e) {
|
|
7476
|
-
var i = n.get(t);
|
|
7477
|
-
i && (e ? i.splice(i.indexOf(e) >>> 0, 1) : n.set(t, []));
|
|
7478
|
-
}, emit: function(t, e) {
|
|
7479
|
-
var i = n.get(t);
|
|
7480
|
-
i && i.slice().map(function(n2) {
|
|
7481
|
-
n2(e);
|
|
7482
|
-
}), (i = n.get("*")) && i.slice().map(function(n2) {
|
|
7483
|
-
n2(t, e);
|
|
7484
|
-
});
|
|
7485
|
-
} };
|
|
7486
|
-
}
|
|
7487
|
-
const emitter = mitt();
|
|
7488
|
-
const PageBuilderViewerEvent = {
|
|
7489
|
-
on: {
|
|
7490
|
-
requestProductMapping: (listener) => {
|
|
7491
|
-
emitter.on("requestProductMapping", listener);
|
|
7492
|
-
}
|
|
7493
|
-
},
|
|
7494
|
-
off: {
|
|
7495
|
-
requestProductMapping: (listener) => {
|
|
7496
|
-
emitter.off("requestProductMapping", listener);
|
|
7497
|
-
}
|
|
7498
|
-
},
|
|
7499
|
-
emit: {
|
|
7500
|
-
requestProductMapping: (param) => {
|
|
7501
|
-
emitter.emit("requestProductMapping", param);
|
|
7502
|
-
}
|
|
7503
|
-
}
|
|
7504
|
-
};
|
|
7505
7412
|
const PART_ID_KEY = "partId";
|
|
7506
7413
|
const PART_NAME_KEY = "partName";
|
|
7507
7414
|
const RESERVED_ATTRIBUTES = [PART_ID_KEY, PART_NAME_KEY];
|
|
@@ -7672,6 +7579,9 @@ const findChildById = (part, partId) => {
|
|
|
7672
7579
|
const createPart = (partType, partName, properties) => {
|
|
7673
7580
|
let part;
|
|
7674
7581
|
switch (partType) {
|
|
7582
|
+
case ROOT_TYPE:
|
|
7583
|
+
part = new RootPart();
|
|
7584
|
+
break;
|
|
7675
7585
|
case PAGE_TYPE:
|
|
7676
7586
|
part = new Page();
|
|
7677
7587
|
break;
|
|
@@ -7729,10 +7639,6 @@ class Model2 {
|
|
|
7729
7639
|
__publicField(this, "yjsRoot");
|
|
7730
7640
|
__publicField(this, "undoManager");
|
|
7731
7641
|
__publicField(this, "rootPart");
|
|
7732
|
-
__publicField(this, "serializePageModel", (partIds) => {
|
|
7733
|
-
const parts = this.findPartsByIds(partIds);
|
|
7734
|
-
return partsToJsonString(parts);
|
|
7735
|
-
});
|
|
7736
7642
|
this.yjsDoc = new Doc();
|
|
7737
7643
|
this.yjsRoot = this.yjsDoc.get("root", YXmlElement);
|
|
7738
7644
|
const rootPartId = getNewPartId();
|
|
@@ -7781,7 +7687,30 @@ class Model2 {
|
|
|
7781
7687
|
});
|
|
7782
7688
|
return parts;
|
|
7783
7689
|
}
|
|
7784
|
-
|
|
7690
|
+
serializeModel(mediaExtractor, providerExtractor) {
|
|
7691
|
+
const root = partToJsonObject(this.rootPart);
|
|
7692
|
+
if (mediaExtractor) {
|
|
7693
|
+
root.media = mediaExtractor(this.rootPart);
|
|
7694
|
+
}
|
|
7695
|
+
if (providerExtractor) {
|
|
7696
|
+
providerExtractor(root);
|
|
7697
|
+
}
|
|
7698
|
+
return JSON.stringify(root);
|
|
7699
|
+
}
|
|
7700
|
+
parseModel(json, keepPartId = false) {
|
|
7701
|
+
const root = JSON.parse(json);
|
|
7702
|
+
if (root.partType !== ROOT_TYPE)
|
|
7703
|
+
throw Error("Invalid data format");
|
|
7704
|
+
const rootPart = partFromJsonObject(root, keepPartId);
|
|
7705
|
+
if (!rootPart)
|
|
7706
|
+
throw new Error("Invalid data format");
|
|
7707
|
+
return rootPart;
|
|
7708
|
+
}
|
|
7709
|
+
serializeParts(partIds) {
|
|
7710
|
+
const parts = this.findPartsByIds(partIds);
|
|
7711
|
+
return partsToJsonString(parts);
|
|
7712
|
+
}
|
|
7713
|
+
parseParts(json, keepPartId = false) {
|
|
7785
7714
|
return partsFromJsonString(json, keepPartId);
|
|
7786
7715
|
}
|
|
7787
7716
|
moveElements(partId, destPartId, destIndex, update, doNotChangeIndex) {
|
|
@@ -8072,12 +8001,12 @@ class PartManager {
|
|
|
8072
8001
|
const defaultPartPropertyEditors = () => {
|
|
8073
8002
|
return {
|
|
8074
8003
|
"readonly-text": () => defineAsyncComponent(() => import("./PbPropertyEditorReadonlyText-Dgp_AVOD.js")),
|
|
8075
|
-
"text": () => defineAsyncComponent(() => import("./PbPropertyEditorText-
|
|
8076
|
-
"multiline-text": () => defineAsyncComponent(() => import("./PbPropertyEditorMultilineText-
|
|
8004
|
+
"text": () => defineAsyncComponent(() => import("./PbPropertyEditorText-dMHwoG4V.js")),
|
|
8005
|
+
"multiline-text": () => defineAsyncComponent(() => import("./PbPropertyEditorMultilineText-JyXSHgdX.js")),
|
|
8077
8006
|
"select": () => defineAsyncComponent(() => import("./PbPropertyEditorSelect-CWedbXJI.js")),
|
|
8078
|
-
"color": () => defineAsyncComponent(() => import("./PbPropertyEditorColor-
|
|
8079
|
-
"image": () => defineAsyncComponent(() => import("./PbPropertyEditorImage-
|
|
8080
|
-
"html": () => defineAsyncComponent(() => import("./PbPropertyEditorHtml-
|
|
8007
|
+
"color": () => defineAsyncComponent(() => import("./PbPropertyEditorColor-B6_DIy47.js")),
|
|
8008
|
+
"image": () => defineAsyncComponent(() => import("./PbPropertyEditorImage-BwHm3YZo.js")),
|
|
8009
|
+
"html": () => defineAsyncComponent(() => import("./PbPropertyEditorHtml-BiMjuW0k.js"))
|
|
8081
8010
|
};
|
|
8082
8011
|
};
|
|
8083
8012
|
const getPropertyValueOfParts = (parts, propertyName) => {
|
|
@@ -8307,22 +8236,22 @@ const _export_sfc = (sfc, props) => {
|
|
|
8307
8236
|
}
|
|
8308
8237
|
return target;
|
|
8309
8238
|
};
|
|
8310
|
-
const _sfc_main$
|
|
8311
|
-
const _hoisted_1$
|
|
8312
|
-
const _hoisted_2$
|
|
8313
|
-
const _hoisted_3$
|
|
8314
|
-
const _hoisted_4$
|
|
8315
|
-
_hoisted_2$
|
|
8316
|
-
_hoisted_3$
|
|
8239
|
+
const _sfc_main$o = {};
|
|
8240
|
+
const _hoisted_1$s = { class: "pb-add-widget-button" };
|
|
8241
|
+
const _hoisted_2$i = /* @__PURE__ */ createElementVNode("span", { class: "icon material-icons-outlined" }, "add_box", -1);
|
|
8242
|
+
const _hoisted_3$f = /* @__PURE__ */ createElementVNode("span", { class: "text" }, "Add Widget", -1);
|
|
8243
|
+
const _hoisted_4$c = [
|
|
8244
|
+
_hoisted_2$i,
|
|
8245
|
+
_hoisted_3$f
|
|
8317
8246
|
];
|
|
8318
8247
|
function _sfc_render$1(_ctx, _cache) {
|
|
8319
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
8248
|
+
return openBlock(), createElementBlock("div", _hoisted_1$s, [
|
|
8320
8249
|
createElementVNode("button", {
|
|
8321
8250
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("add-widget", $event))
|
|
8322
|
-
}, _hoisted_4$
|
|
8251
|
+
}, _hoisted_4$c)
|
|
8323
8252
|
]);
|
|
8324
8253
|
}
|
|
8325
|
-
const PbAddWidgetButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
8254
|
+
const PbAddWidgetButton = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$1]]);
|
|
8326
8255
|
const MOUSE_TRACKER_KEY = "mouseTracker";
|
|
8327
8256
|
const MOUSE_TRACKER_NOT_FOUND = "MouseTracker not found";
|
|
8328
8257
|
class MouseTracker {
|
|
@@ -8353,12 +8282,12 @@ const useMouseTracker = () => {
|
|
|
8353
8282
|
throw Error(MOUSE_TRACKER_NOT_FOUND);
|
|
8354
8283
|
return mouseTracker;
|
|
8355
8284
|
};
|
|
8356
|
-
const _hoisted_1$
|
|
8357
|
-
const _hoisted_2$
|
|
8285
|
+
const _hoisted_1$r = ["data-model-id", "draggable"];
|
|
8286
|
+
const _hoisted_2$h = {
|
|
8358
8287
|
key: 1,
|
|
8359
8288
|
class: "children"
|
|
8360
8289
|
};
|
|
8361
|
-
const _sfc_main$
|
|
8290
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
8362
8291
|
__name: "PbWidget",
|
|
8363
8292
|
props: {
|
|
8364
8293
|
part: {}
|
|
@@ -8805,7 +8734,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
8805
8734
|
part: _ctx.part,
|
|
8806
8735
|
placeholder: true
|
|
8807
8736
|
}, null, 8, ["part"])) : createCommentVNode("", true),
|
|
8808
|
-
childComponents.value && childComponents.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
8737
|
+
childComponents.value && childComponents.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_2$h, [
|
|
8809
8738
|
(openBlock(true), createElementBlock(Fragment, null, renderList(childComponents.value, (child) => {
|
|
8810
8739
|
return openBlock(), createBlock$1(resolveDynamicComponent(child.component), {
|
|
8811
8740
|
key: child.part.partId,
|
|
@@ -8824,14 +8753,14 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
8824
8753
|
class: "resize-handle",
|
|
8825
8754
|
onMousedown: _resize_mousedown
|
|
8826
8755
|
}, null, 32)) : createCommentVNode("", true)
|
|
8827
|
-
], 16, _hoisted_1$
|
|
8756
|
+
], 16, _hoisted_1$r)), [
|
|
8828
8757
|
[unref(vPartHandler), { pageBuilder: unref(pageBuilder), part: _ctx.part, droppable: true, locatePositionMark, calculateDropIndex, acceptChildPart }]
|
|
8829
8758
|
]);
|
|
8830
8759
|
};
|
|
8831
8760
|
}
|
|
8832
8761
|
});
|
|
8833
|
-
const _hoisted_1$
|
|
8834
|
-
const _sfc_main$
|
|
8762
|
+
const _hoisted_1$q = ["data-model-id"];
|
|
8763
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
8835
8764
|
__name: "PbBlock",
|
|
8836
8765
|
props: {
|
|
8837
8766
|
part: {}
|
|
@@ -9021,19 +8950,19 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
9021
8950
|
onAddWidget: addWidget
|
|
9022
8951
|
})) : createCommentVNode("", true),
|
|
9023
8952
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.part.children, (child) => {
|
|
9024
|
-
return openBlock(), createBlock$1(_sfc_main$
|
|
8953
|
+
return openBlock(), createBlock$1(_sfc_main$n, {
|
|
9025
8954
|
key: child.partId,
|
|
9026
8955
|
part: child
|
|
9027
8956
|
}, null, 8, ["part"]);
|
|
9028
8957
|
}), 128))
|
|
9029
|
-
], 16, _hoisted_1$
|
|
8958
|
+
], 16, _hoisted_1$q)), [
|
|
9030
8959
|
[unref(vPartHandler), { pageBuilder: unref(pageBuilder), part: _ctx.part, droppable: true, locatePositionMark, calculateDropIndex, acceptChildPart }]
|
|
9031
8960
|
]);
|
|
9032
8961
|
};
|
|
9033
8962
|
}
|
|
9034
8963
|
});
|
|
9035
|
-
const _hoisted_1$
|
|
9036
|
-
const _hoisted_2$
|
|
8964
|
+
const _hoisted_1$p = { class: "pb-block" };
|
|
8965
|
+
const _hoisted_2$g = /* @__PURE__ */ createElementVNode("div", {
|
|
9037
8966
|
class: "pb-widget",
|
|
9038
8967
|
style: { "margin": "0 auto" }
|
|
9039
8968
|
}, [
|
|
@@ -9041,22 +8970,22 @@ const _hoisted_2$h = /* @__PURE__ */ createElementVNode("div", {
|
|
|
9041
8970
|
/* @__PURE__ */ createElementVNode("h3", null, "Login Design Part")
|
|
9042
8971
|
])
|
|
9043
8972
|
], -1);
|
|
9044
|
-
const _hoisted_3$
|
|
9045
|
-
_hoisted_2$
|
|
8973
|
+
const _hoisted_3$e = [
|
|
8974
|
+
_hoisted_2$g
|
|
9046
8975
|
];
|
|
9047
|
-
const _sfc_main$
|
|
8976
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
9048
8977
|
__name: "PbLoginDepart",
|
|
9049
8978
|
props: {
|
|
9050
8979
|
part: {}
|
|
9051
8980
|
},
|
|
9052
8981
|
setup(__props) {
|
|
9053
8982
|
return (_ctx, _cache) => {
|
|
9054
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
8983
|
+
return openBlock(), createElementBlock("div", _hoisted_1$p, _hoisted_3$e);
|
|
9055
8984
|
};
|
|
9056
8985
|
}
|
|
9057
8986
|
});
|
|
9058
|
-
const _hoisted_1$
|
|
9059
|
-
const _sfc_main$
|
|
8987
|
+
const _hoisted_1$o = ["data-model-id"];
|
|
8988
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
9060
8989
|
__name: "PbSection",
|
|
9061
8990
|
props: {
|
|
9062
8991
|
part: {}
|
|
@@ -9075,13 +9004,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
9075
9004
|
const properties = computed(() => ({ style: props.part.getStyles() }));
|
|
9076
9005
|
const disabled = computed(() => {
|
|
9077
9006
|
var _a;
|
|
9078
|
-
|
|
9079
|
-
return true;
|
|
9080
|
-
if (pageBuilder.editMode === "local" && props.part.isGlobalDesignPart())
|
|
9081
|
-
return true;
|
|
9082
|
-
if (pageBuilder.editMode === "global" && (props.part.isLocalDesignPart() || props.part.isLocalMarketingPart()))
|
|
9083
|
-
return true;
|
|
9084
|
-
return false;
|
|
9007
|
+
return ["static"].includes(((_a = props.part.properties) == null ? void 0 : _a.sectionType) || "");
|
|
9085
9008
|
});
|
|
9086
9009
|
const addWidget = () => {
|
|
9087
9010
|
pageBuilder.commandRegistry.executeCommand(OpenAddWidgetModalCommand.COMMAND_ID);
|
|
@@ -9167,13 +9090,13 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
9167
9090
|
style: (_a = _ctx.part.properties) == null ? void 0 : _a.css
|
|
9168
9091
|
}, properties.value), [
|
|
9169
9092
|
((_b = _ctx.part.properties) == null ? void 0 : _b.sectionType) === "static" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
9170
|
-
((_c = _ctx.part.properties) == null ? void 0 : _c.name) === "Login Design Part" ? (openBlock(), createBlock$1(_sfc_main$
|
|
9093
|
+
((_c = _ctx.part.properties) == null ? void 0 : _c.name) === "Login Design Part" ? (openBlock(), createBlock$1(_sfc_main$l, {
|
|
9171
9094
|
key: 0,
|
|
9172
9095
|
part: _ctx.part
|
|
9173
9096
|
}, null, 8, ["part"])) : createCommentVNode("", true)
|
|
9174
9097
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
9175
9098
|
_ctx.part.children && _ctx.part.children.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.part.children, (block) => {
|
|
9176
|
-
return openBlock(), createBlock$1(_sfc_main$
|
|
9099
|
+
return openBlock(), createBlock$1(_sfc_main$m, {
|
|
9177
9100
|
key: block.partId,
|
|
9178
9101
|
part: block
|
|
9179
9102
|
}, null, 8, ["part"]);
|
|
@@ -9182,20 +9105,20 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
9182
9105
|
onAddWidget: addWidget
|
|
9183
9106
|
}))
|
|
9184
9107
|
], 64))
|
|
9185
|
-
], 16, _hoisted_1$
|
|
9108
|
+
], 16, _hoisted_1$o)), [
|
|
9186
9109
|
[unref(vPartHandler), { pageBuilder: unref(pageBuilder), part: _ctx.part, droppable: true, locatePositionMark, calculateDropIndex, acceptChildPart }]
|
|
9187
9110
|
]);
|
|
9188
9111
|
};
|
|
9189
9112
|
}
|
|
9190
9113
|
});
|
|
9191
|
-
const _hoisted_1$
|
|
9192
|
-
const _hoisted_2$
|
|
9193
|
-
const _hoisted_3$
|
|
9114
|
+
const _hoisted_1$n = { class: "group-editor group-editor-position" };
|
|
9115
|
+
const _hoisted_2$f = { class: "flex-align-center" };
|
|
9116
|
+
const _hoisted_3$d = /* @__PURE__ */ createElementVNode("div", { class: "title" }, [
|
|
9194
9117
|
/* @__PURE__ */ createElementVNode("label", { textContent: "Position" })
|
|
9195
9118
|
], -1);
|
|
9196
|
-
const _hoisted_4$
|
|
9197
|
-
const _hoisted_5$
|
|
9198
|
-
const _hoisted_6$
|
|
9119
|
+
const _hoisted_4$b = { class: "flex-grow-1" };
|
|
9120
|
+
const _hoisted_5$5 = { class: "bg-gray-100 py-5 rounded-8" };
|
|
9121
|
+
const _hoisted_6$4 = { class: "text-center" };
|
|
9199
9122
|
const _hoisted_7$4 = { class: "bs-layout-horizontal justify-content-center align-items-center" };
|
|
9200
9123
|
const _hoisted_8$4 = /* @__PURE__ */ createElementVNode("div", {
|
|
9201
9124
|
class: "d-inline-block text-center text-gray-300",
|
|
@@ -9204,7 +9127,7 @@ const _hoisted_8$4 = /* @__PURE__ */ createElementVNode("div", {
|
|
|
9204
9127
|
/* @__PURE__ */ createElementVNode("span", { class: "font-icon" }, "add")
|
|
9205
9128
|
], -1);
|
|
9206
9129
|
const _hoisted_9$4 = { class: "text-center" };
|
|
9207
|
-
const _sfc_main$
|
|
9130
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
9208
9131
|
__name: "PbPropertyGroupEditorPosition",
|
|
9209
9132
|
props: {
|
|
9210
9133
|
group: {},
|
|
@@ -9228,12 +9151,12 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
9228
9151
|
const updateTop = (value) => updatePropertyValue({ top: value });
|
|
9229
9152
|
const updateBottom = (value) => updatePropertyValue({ bottom: value });
|
|
9230
9153
|
return (_ctx, _cache) => {
|
|
9231
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9232
|
-
createElementVNode("div", _hoisted_2$
|
|
9233
|
-
_hoisted_3$
|
|
9234
|
-
createElementVNode("div", _hoisted_4$
|
|
9235
|
-
createElementVNode("div", _hoisted_5$
|
|
9236
|
-
createElementVNode("div", _hoisted_6$
|
|
9154
|
+
return openBlock(), createElementBlock("div", _hoisted_1$n, [
|
|
9155
|
+
createElementVNode("div", _hoisted_2$f, [
|
|
9156
|
+
_hoisted_3$d,
|
|
9157
|
+
createElementVNode("div", _hoisted_4$b, [
|
|
9158
|
+
createElementVNode("div", _hoisted_5$5, [
|
|
9159
|
+
createElementVNode("div", _hoisted_6$4, [
|
|
9237
9160
|
createVNode(unref(BSTextInput), {
|
|
9238
9161
|
"model-value": top.value,
|
|
9239
9162
|
class: "ml-4",
|
|
@@ -9275,13 +9198,13 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
9275
9198
|
};
|
|
9276
9199
|
}
|
|
9277
9200
|
});
|
|
9278
|
-
const _hoisted_1$
|
|
9279
|
-
const _hoisted_2$
|
|
9280
|
-
const _hoisted_3$
|
|
9201
|
+
const _hoisted_1$m = { class: "group-editor group-editor-size" };
|
|
9202
|
+
const _hoisted_2$e = { class: "flex-align-center" };
|
|
9203
|
+
const _hoisted_3$c = /* @__PURE__ */ createElementVNode("div", { class: "title" }, [
|
|
9281
9204
|
/* @__PURE__ */ createElementVNode("label", { textContent: "Size" })
|
|
9282
9205
|
], -1);
|
|
9283
|
-
const _hoisted_4$
|
|
9284
|
-
const _sfc_main$
|
|
9206
|
+
const _hoisted_4$a = { class: "flex-grow-1 bs-layout-horizontal" };
|
|
9207
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
9285
9208
|
__name: "PbPropertyGroupEditorSize",
|
|
9286
9209
|
props: {
|
|
9287
9210
|
group: {},
|
|
@@ -9301,10 +9224,10 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
9301
9224
|
const updateWidth = (value) => updatePropertyValue({ width: value });
|
|
9302
9225
|
const updateHeight = (value) => updatePropertyValue({ height: value });
|
|
9303
9226
|
return (_ctx, _cache) => {
|
|
9304
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9305
|
-
createElementVNode("div", _hoisted_2$
|
|
9306
|
-
_hoisted_3$
|
|
9307
|
-
createElementVNode("div", _hoisted_4$
|
|
9227
|
+
return openBlock(), createElementBlock("div", _hoisted_1$m, [
|
|
9228
|
+
createElementVNode("div", _hoisted_2$e, [
|
|
9229
|
+
_hoisted_3$c,
|
|
9230
|
+
createElementVNode("div", _hoisted_4$a, [
|
|
9308
9231
|
createVNode(unref(BSTextInput), {
|
|
9309
9232
|
"model-value": width.value,
|
|
9310
9233
|
class: "flex-grow-1 mr-2",
|
|
@@ -9480,22 +9403,22 @@ var script$4 = {
|
|
|
9480
9403
|
}
|
|
9481
9404
|
}
|
|
9482
9405
|
};
|
|
9483
|
-
const _hoisted_1$
|
|
9484
|
-
const _hoisted_2$
|
|
9485
|
-
const _hoisted_3$
|
|
9406
|
+
const _hoisted_1$l = { class: "vc-alpha" };
|
|
9407
|
+
const _hoisted_2$d = { class: "vc-alpha-checkboard-wrap" };
|
|
9408
|
+
const _hoisted_3$b = /* @__PURE__ */ createElementVNode(
|
|
9486
9409
|
"div",
|
|
9487
9410
|
{ class: "vc-alpha-picker" },
|
|
9488
9411
|
null,
|
|
9489
9412
|
-1
|
|
9490
9413
|
/* HOISTED */
|
|
9491
9414
|
);
|
|
9492
|
-
const _hoisted_4$
|
|
9493
|
-
_hoisted_3$
|
|
9415
|
+
const _hoisted_4$9 = [
|
|
9416
|
+
_hoisted_3$b
|
|
9494
9417
|
];
|
|
9495
9418
|
function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
9496
9419
|
const _component_Checkboard = resolveComponent("Checkboard");
|
|
9497
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9498
|
-
createElementVNode("div", _hoisted_2$
|
|
9420
|
+
return openBlock(), createElementBlock("div", _hoisted_1$l, [
|
|
9421
|
+
createElementVNode("div", _hoisted_2$d, [
|
|
9499
9422
|
createVNode(_component_Checkboard)
|
|
9500
9423
|
]),
|
|
9501
9424
|
createElementVNode(
|
|
@@ -9524,7 +9447,7 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
9524
9447
|
class: "vc-alpha-pointer",
|
|
9525
9448
|
style: normalizeStyle({ left: `${$options.colors.a * 100}%` })
|
|
9526
9449
|
},
|
|
9527
|
-
_hoisted_4$
|
|
9450
|
+
_hoisted_4$9,
|
|
9528
9451
|
4
|
|
9529
9452
|
/* STYLE */
|
|
9530
9453
|
)
|
|
@@ -10598,12 +10521,12 @@ var script$3 = {
|
|
|
10598
10521
|
// }
|
|
10599
10522
|
}
|
|
10600
10523
|
};
|
|
10601
|
-
const _hoisted_1$
|
|
10602
|
-
const _hoisted_2$
|
|
10603
|
-
const _hoisted_3$
|
|
10604
|
-
const _hoisted_4$
|
|
10524
|
+
const _hoisted_1$k = { class: "vc-editable-input" };
|
|
10525
|
+
const _hoisted_2$c = ["aria-labelledby"];
|
|
10526
|
+
const _hoisted_3$a = ["id", "for"];
|
|
10527
|
+
const _hoisted_4$8 = { class: "vc-input__desc" };
|
|
10605
10528
|
function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
10606
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
10529
|
+
return openBlock(), createElementBlock("div", _hoisted_1$k, [
|
|
10607
10530
|
withDirectives(createElementVNode("input", {
|
|
10608
10531
|
ref: "input",
|
|
10609
10532
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $options.val = $event),
|
|
@@ -10611,17 +10534,17 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
10611
10534
|
class: "vc-input__input",
|
|
10612
10535
|
onKeydown: _cache[1] || (_cache[1] = (...args) => $options.handleKeyDown && $options.handleKeyDown(...args)),
|
|
10613
10536
|
onInput: _cache[2] || (_cache[2] = (...args) => $options.update && $options.update(...args))
|
|
10614
|
-
}, null, 40, _hoisted_2$
|
|
10537
|
+
}, null, 40, _hoisted_2$c), [
|
|
10615
10538
|
[vModelText, $options.val]
|
|
10616
10539
|
]),
|
|
10617
10540
|
createElementVNode("span", {
|
|
10618
10541
|
id: $options.labelId,
|
|
10619
10542
|
for: $props.label,
|
|
10620
10543
|
class: "vc-input__label"
|
|
10621
|
-
}, toDisplayString($options.labelSpanText), 9, _hoisted_3$
|
|
10544
|
+
}, toDisplayString($options.labelSpanText), 9, _hoisted_3$a),
|
|
10622
10545
|
createElementVNode(
|
|
10623
10546
|
"span",
|
|
10624
|
-
_hoisted_4$
|
|
10547
|
+
_hoisted_4$8,
|
|
10625
10548
|
toDisplayString($props.desc),
|
|
10626
10549
|
1
|
|
10627
10550
|
/* TEXT */
|
|
@@ -10698,29 +10621,29 @@ var script$2 = {
|
|
|
10698
10621
|
}
|
|
10699
10622
|
}
|
|
10700
10623
|
};
|
|
10701
|
-
const _hoisted_1$
|
|
10624
|
+
const _hoisted_1$j = /* @__PURE__ */ createElementVNode(
|
|
10702
10625
|
"div",
|
|
10703
10626
|
{ class: "vc-saturation--white" },
|
|
10704
10627
|
null,
|
|
10705
10628
|
-1
|
|
10706
10629
|
/* HOISTED */
|
|
10707
10630
|
);
|
|
10708
|
-
const _hoisted_2$
|
|
10631
|
+
const _hoisted_2$b = /* @__PURE__ */ createElementVNode(
|
|
10709
10632
|
"div",
|
|
10710
10633
|
{ class: "vc-saturation--black" },
|
|
10711
10634
|
null,
|
|
10712
10635
|
-1
|
|
10713
10636
|
/* HOISTED */
|
|
10714
10637
|
);
|
|
10715
|
-
const _hoisted_3$
|
|
10638
|
+
const _hoisted_3$9 = /* @__PURE__ */ createElementVNode(
|
|
10716
10639
|
"div",
|
|
10717
10640
|
{ class: "vc-saturation-circle" },
|
|
10718
10641
|
null,
|
|
10719
10642
|
-1
|
|
10720
10643
|
/* HOISTED */
|
|
10721
10644
|
);
|
|
10722
|
-
const _hoisted_4$
|
|
10723
|
-
_hoisted_3$
|
|
10645
|
+
const _hoisted_4$7 = [
|
|
10646
|
+
_hoisted_3$9
|
|
10724
10647
|
];
|
|
10725
10648
|
function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
10726
10649
|
return openBlock(), createElementBlock(
|
|
@@ -10734,15 +10657,15 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
10734
10657
|
onTouchstart: _cache[2] || (_cache[2] = (...args) => $options.handleChange && $options.handleChange(...args))
|
|
10735
10658
|
},
|
|
10736
10659
|
[
|
|
10737
|
-
_hoisted_1$
|
|
10738
|
-
_hoisted_2$
|
|
10660
|
+
_hoisted_1$j,
|
|
10661
|
+
_hoisted_2$b,
|
|
10739
10662
|
createElementVNode(
|
|
10740
10663
|
"div",
|
|
10741
10664
|
{
|
|
10742
10665
|
class: "vc-saturation-pointer",
|
|
10743
10666
|
style: normalizeStyle({ top: $options.pointerTop, left: $options.pointerLeft })
|
|
10744
10667
|
},
|
|
10745
|
-
_hoisted_4$
|
|
10668
|
+
_hoisted_4$7,
|
|
10746
10669
|
4
|
|
10747
10670
|
/* STYLE */
|
|
10748
10671
|
)
|
|
@@ -10883,16 +10806,16 @@ var script$1 = {
|
|
|
10883
10806
|
}
|
|
10884
10807
|
}
|
|
10885
10808
|
};
|
|
10886
|
-
const _hoisted_1$
|
|
10887
|
-
const _hoisted_2$
|
|
10809
|
+
const _hoisted_1$i = ["aria-valuenow"];
|
|
10810
|
+
const _hoisted_2$a = /* @__PURE__ */ createElementVNode(
|
|
10888
10811
|
"div",
|
|
10889
10812
|
{ class: "vc-hue-picker" },
|
|
10890
10813
|
null,
|
|
10891
10814
|
-1
|
|
10892
10815
|
/* HOISTED */
|
|
10893
10816
|
);
|
|
10894
|
-
const _hoisted_3$
|
|
10895
|
-
_hoisted_2$
|
|
10817
|
+
const _hoisted_3$8 = [
|
|
10818
|
+
_hoisted_2$a
|
|
10896
10819
|
];
|
|
10897
10820
|
function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
10898
10821
|
return openBlock(), createElementBlock(
|
|
@@ -10919,11 +10842,11 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
10919
10842
|
style: normalizeStyle({ top: $options.pointerTop, left: $options.pointerLeft }),
|
|
10920
10843
|
role: "presentation"
|
|
10921
10844
|
},
|
|
10922
|
-
_hoisted_3$
|
|
10845
|
+
_hoisted_3$8,
|
|
10923
10846
|
4
|
|
10924
10847
|
/* STYLE */
|
|
10925
10848
|
)
|
|
10926
|
-
], 40, _hoisted_1$
|
|
10849
|
+
], 40, _hoisted_1$i)
|
|
10927
10850
|
],
|
|
10928
10851
|
2
|
|
10929
10852
|
/* CLASS */
|
|
@@ -11019,15 +10942,15 @@ var script = {
|
|
|
11019
10942
|
}
|
|
11020
10943
|
}
|
|
11021
10944
|
};
|
|
11022
|
-
const _hoisted_1$
|
|
11023
|
-
const _hoisted_2$
|
|
11024
|
-
const _hoisted_3$
|
|
11025
|
-
const _hoisted_4$
|
|
11026
|
-
const _hoisted_5$
|
|
10945
|
+
const _hoisted_1$h = { class: "vc-sketch-saturation-wrap" };
|
|
10946
|
+
const _hoisted_2$9 = { class: "vc-sketch-controls" };
|
|
10947
|
+
const _hoisted_3$7 = { class: "vc-sketch-sliders" };
|
|
10948
|
+
const _hoisted_4$6 = { class: "vc-sketch-hue-wrap" };
|
|
10949
|
+
const _hoisted_5$4 = {
|
|
11027
10950
|
key: 0,
|
|
11028
10951
|
class: "vc-sketch-alpha-wrap"
|
|
11029
10952
|
};
|
|
11030
|
-
const _hoisted_6$
|
|
10953
|
+
const _hoisted_6$3 = { class: "vc-sketch-color-wrap" };
|
|
11031
10954
|
const _hoisted_7$3 = ["aria-label"];
|
|
11032
10955
|
const _hoisted_8$3 = {
|
|
11033
10956
|
key: 0,
|
|
@@ -11062,28 +10985,28 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11062
10985
|
class: normalizeClass(["vc-sketch", [$props.disableAlpha ? "vc-sketch__disable-alpha" : ""]])
|
|
11063
10986
|
},
|
|
11064
10987
|
[
|
|
11065
|
-
createElementVNode("div", _hoisted_1$
|
|
10988
|
+
createElementVNode("div", _hoisted_1$h, [
|
|
11066
10989
|
createVNode(_component_Saturation, {
|
|
11067
10990
|
value: _ctx.colors,
|
|
11068
10991
|
onChange: $options.childChange
|
|
11069
10992
|
}, null, 8, ["value", "onChange"])
|
|
11070
10993
|
]),
|
|
11071
|
-
createElementVNode("div", _hoisted_2$
|
|
11072
|
-
createElementVNode("div", _hoisted_3$
|
|
11073
|
-
createElementVNode("div", _hoisted_4$
|
|
10994
|
+
createElementVNode("div", _hoisted_2$9, [
|
|
10995
|
+
createElementVNode("div", _hoisted_3$7, [
|
|
10996
|
+
createElementVNode("div", _hoisted_4$6, [
|
|
11074
10997
|
createVNode(_component_Hue, {
|
|
11075
10998
|
value: _ctx.colors,
|
|
11076
10999
|
onChange: $options.childChange
|
|
11077
11000
|
}, null, 8, ["value", "onChange"])
|
|
11078
11001
|
]),
|
|
11079
|
-
!$props.disableAlpha ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
11002
|
+
!$props.disableAlpha ? (openBlock(), createElementBlock("div", _hoisted_5$4, [
|
|
11080
11003
|
createVNode(_component_Alpha, {
|
|
11081
11004
|
value: _ctx.colors,
|
|
11082
11005
|
onChange: $options.childChange
|
|
11083
11006
|
}, null, 8, ["value", "onChange"])
|
|
11084
11007
|
])) : createCommentVNode("v-if", true)
|
|
11085
11008
|
]),
|
|
11086
|
-
createElementVNode("div", _hoisted_6$
|
|
11009
|
+
createElementVNode("div", _hoisted_6$3, [
|
|
11087
11010
|
createElementVNode("div", {
|
|
11088
11011
|
"aria-label": `Current color is ${$options.activeColor}`,
|
|
11089
11012
|
class: "vc-sketch-active-color",
|
|
@@ -11174,7 +11097,7 @@ styleInject(css_248z);
|
|
|
11174
11097
|
script.render = render;
|
|
11175
11098
|
script.__file = "src/components/sketch/sketch.vue";
|
|
11176
11099
|
script.install = install;
|
|
11177
|
-
const _sfc_main$
|
|
11100
|
+
const _sfc_main$h = defineComponent({
|
|
11178
11101
|
name: "PbColorPicker",
|
|
11179
11102
|
components: {
|
|
11180
11103
|
Sketch: script
|
|
@@ -11238,12 +11161,12 @@ const _sfc_main$i = defineComponent({
|
|
|
11238
11161
|
};
|
|
11239
11162
|
}
|
|
11240
11163
|
});
|
|
11241
|
-
const _hoisted_1$
|
|
11242
|
-
const _hoisted_2$
|
|
11243
|
-
const _hoisted_3$
|
|
11244
|
-
_hoisted_2$
|
|
11164
|
+
const _hoisted_1$g = { class: "buttons" };
|
|
11165
|
+
const _hoisted_2$8 = /* @__PURE__ */ createElementVNode("i", { class: "material-icons-outlined" }, "delete", -1);
|
|
11166
|
+
const _hoisted_3$6 = [
|
|
11167
|
+
_hoisted_2$8
|
|
11245
11168
|
];
|
|
11246
|
-
const _hoisted_4$
|
|
11169
|
+
const _hoisted_4$5 = { class: "sketch-wrap" };
|
|
11247
11170
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11248
11171
|
const _component_Sketch = resolveComponent("Sketch");
|
|
11249
11172
|
const _directive_click_outside = resolveDirective("click-outside");
|
|
@@ -11252,7 +11175,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11252
11175
|
onKeydown: _cache[3] || (_cache[3] = withModifiers(() => {
|
|
11253
11176
|
}, ["stop"]))
|
|
11254
11177
|
}, [
|
|
11255
|
-
createElementVNode("div", _hoisted_1$
|
|
11178
|
+
createElementVNode("div", _hoisted_1$g, [
|
|
11256
11179
|
renderSlot(_ctx.$slots, "button", normalizeProps(guardReactiveProps({ toggle: _ctx.toggle, color: _ctx.color })), () => [
|
|
11257
11180
|
createElementVNode("button", {
|
|
11258
11181
|
class: normalizeClass([{ none: !_ctx.color }, "pb-button picker-button"]),
|
|
@@ -11264,9 +11187,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11264
11187
|
key: 0,
|
|
11265
11188
|
class: "pb-button",
|
|
11266
11189
|
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.emptyColor && _ctx.emptyColor(...args))
|
|
11267
|
-
}, _hoisted_3$
|
|
11190
|
+
}, _hoisted_3$6)) : createCommentVNode("", true)
|
|
11268
11191
|
]),
|
|
11269
|
-
createElementVNode("div", _hoisted_4$
|
|
11192
|
+
createElementVNode("div", _hoisted_4$5, [
|
|
11270
11193
|
_ctx.isShowColorPicker ? (openBlock(), createBlock$1(_component_Sketch, {
|
|
11271
11194
|
key: 0,
|
|
11272
11195
|
modelValue: _ctx.color,
|
|
@@ -11278,15 +11201,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11278
11201
|
[_directive_click_outside, () => _ctx.toggle(false)]
|
|
11279
11202
|
]);
|
|
11280
11203
|
}
|
|
11281
|
-
const PbColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
11282
|
-
const _hoisted_1$
|
|
11283
|
-
const _hoisted_2$
|
|
11284
|
-
const _hoisted_3$
|
|
11204
|
+
const PbColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render]]);
|
|
11205
|
+
const _hoisted_1$f = { class: "group-editor group-editor-background" };
|
|
11206
|
+
const _hoisted_2$7 = { class: "flex-align-center" };
|
|
11207
|
+
const _hoisted_3$5 = /* @__PURE__ */ createElementVNode("div", { class: "title" }, [
|
|
11285
11208
|
/* @__PURE__ */ createElementVNode("label", { textContent: "Background" })
|
|
11286
11209
|
], -1);
|
|
11287
|
-
const _hoisted_4$
|
|
11288
|
-
const _hoisted_5$
|
|
11289
|
-
const _sfc_main$
|
|
11210
|
+
const _hoisted_4$4 = { class: "bs-layout-horizontal" };
|
|
11211
|
+
const _hoisted_5$3 = { class: "color" };
|
|
11212
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
11290
11213
|
__name: "PbPropertyGroupEditorBackground",
|
|
11291
11214
|
props: {
|
|
11292
11215
|
group: {},
|
|
@@ -11295,6 +11218,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
11295
11218
|
setup(__props) {
|
|
11296
11219
|
const props = __props;
|
|
11297
11220
|
const pageBuilder = usePageBuilderEditor();
|
|
11221
|
+
const modal = useModal();
|
|
11298
11222
|
const color = computed(() => getPropertyValueOfParts(props.selectedParts, "backgroundColor"));
|
|
11299
11223
|
const emptyColor = () => {
|
|
11300
11224
|
};
|
|
@@ -11308,19 +11232,19 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
11308
11232
|
};
|
|
11309
11233
|
const updateColor = (value) => updatePropertyValue({ backgroundColor: value });
|
|
11310
11234
|
const selectImage = () => {
|
|
11311
|
-
|
|
11312
|
-
|
|
11313
|
-
|
|
11235
|
+
const imageProvider = pageBuilder.getProvider("imageProvider");
|
|
11236
|
+
if (imageProvider) {
|
|
11237
|
+
imageProvider({ modal }, (url) => {
|
|
11314
11238
|
updatePropertyValue({ backgroundImage: url });
|
|
11315
|
-
}
|
|
11316
|
-
}
|
|
11239
|
+
});
|
|
11240
|
+
}
|
|
11317
11241
|
};
|
|
11318
11242
|
return (_ctx, _cache) => {
|
|
11319
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
11320
|
-
createElementVNode("div", _hoisted_2$
|
|
11321
|
-
_hoisted_3$
|
|
11322
|
-
createElementVNode("div", _hoisted_4$
|
|
11323
|
-
createElementVNode("div", _hoisted_5$
|
|
11243
|
+
return openBlock(), createElementBlock("div", _hoisted_1$f, [
|
|
11244
|
+
createElementVNode("div", _hoisted_2$7, [
|
|
11245
|
+
_hoisted_3$5,
|
|
11246
|
+
createElementVNode("div", _hoisted_4$4, [
|
|
11247
|
+
createElementVNode("div", _hoisted_5$3, [
|
|
11324
11248
|
createVNode(PbColorPicker, {
|
|
11325
11249
|
value: color.value,
|
|
11326
11250
|
"hide-delete": "",
|
|
@@ -11349,16 +11273,16 @@ const TopLeftCornerIcon = "data:image/svg+xml,%3c!DOCTYPE%20svg%20PUBLIC%20'-//W
|
|
|
11349
11273
|
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";
|
|
11350
11274
|
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";
|
|
11351
11275
|
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";
|
|
11352
|
-
const _hoisted_1$
|
|
11353
|
-
const _hoisted_2$
|
|
11354
|
-
const _hoisted_3$
|
|
11276
|
+
const _hoisted_1$e = { class: "group-editor group-editor-border" };
|
|
11277
|
+
const _hoisted_2$6 = { class: "flex-align-center" };
|
|
11278
|
+
const _hoisted_3$4 = /* @__PURE__ */ createElementVNode("div", { class: "title" }, [
|
|
11355
11279
|
/* @__PURE__ */ createElementVNode("label", { textContent: "Border" })
|
|
11356
11280
|
], -1);
|
|
11357
|
-
const _hoisted_4$
|
|
11358
|
-
const _hoisted_5$
|
|
11281
|
+
const _hoisted_4$3 = { class: "" };
|
|
11282
|
+
const _hoisted_5$2 = /* @__PURE__ */ createElementVNode("div", { class: "sub-title" }, [
|
|
11359
11283
|
/* @__PURE__ */ createElementVNode("label", { textContent: "Color" })
|
|
11360
11284
|
], -1);
|
|
11361
|
-
const _hoisted_6$
|
|
11285
|
+
const _hoisted_6$2 = { class: "color" };
|
|
11362
11286
|
const _hoisted_7$2 = { class: "mt-8" };
|
|
11363
11287
|
const _hoisted_8$2 = /* @__PURE__ */ createElementVNode("div", { class: "sub-title" }, [
|
|
11364
11288
|
/* @__PURE__ */ createElementVNode("label", { textContent: "Border Width" })
|
|
@@ -11382,7 +11306,7 @@ const _hoisted_17 = { class: "flex-grow-1 mt-4" };
|
|
|
11382
11306
|
const _hoisted_18 = { class: "bg-gray-100 py-5 rounded-8" };
|
|
11383
11307
|
const _hoisted_19 = { class: "" };
|
|
11384
11308
|
const _hoisted_20 = { class: "mt-2" };
|
|
11385
|
-
const _sfc_main$
|
|
11309
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
11386
11310
|
__name: "PbPropertyGroupEditorBorder",
|
|
11387
11311
|
props: {
|
|
11388
11312
|
group: {},
|
|
@@ -11420,12 +11344,12 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
11420
11344
|
const updateBorderBottomLeftRadius = (value) => updatePropertyValue({ borderBottomLeftRadius: value });
|
|
11421
11345
|
const updateBorderBottomRightRadius = (value) => updatePropertyValue({ borderBottomRightRadius: value });
|
|
11422
11346
|
return (_ctx, _cache) => {
|
|
11423
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
11424
|
-
createElementVNode("div", _hoisted_2$
|
|
11425
|
-
_hoisted_3$
|
|
11426
|
-
createElementVNode("div", _hoisted_4$
|
|
11427
|
-
_hoisted_5$
|
|
11428
|
-
createElementVNode("div", _hoisted_6$
|
|
11347
|
+
return openBlock(), createElementBlock("div", _hoisted_1$e, [
|
|
11348
|
+
createElementVNode("div", _hoisted_2$6, [
|
|
11349
|
+
_hoisted_3$4,
|
|
11350
|
+
createElementVNode("div", _hoisted_4$3, [
|
|
11351
|
+
_hoisted_5$2,
|
|
11352
|
+
createElementVNode("div", _hoisted_6$2, [
|
|
11429
11353
|
createVNode(PbColorPicker, {
|
|
11430
11354
|
value: color.value,
|
|
11431
11355
|
"hide-delete": "",
|
|
@@ -11529,14 +11453,14 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
11529
11453
|
};
|
|
11530
11454
|
}
|
|
11531
11455
|
});
|
|
11532
|
-
const _hoisted_1$
|
|
11533
|
-
const _hoisted_2$
|
|
11534
|
-
const _hoisted_3$
|
|
11456
|
+
const _hoisted_1$d = { class: "group-editor group-editor-margin" };
|
|
11457
|
+
const _hoisted_2$5 = { class: "flex-align-center" };
|
|
11458
|
+
const _hoisted_3$3 = /* @__PURE__ */ createElementVNode("div", { class: "title" }, [
|
|
11535
11459
|
/* @__PURE__ */ createElementVNode("label", { textContent: "Margin" })
|
|
11536
11460
|
], -1);
|
|
11537
|
-
const _hoisted_4$
|
|
11538
|
-
const _hoisted_5$
|
|
11539
|
-
const _hoisted_6$
|
|
11461
|
+
const _hoisted_4$2 = { class: "flex-grow-1" };
|
|
11462
|
+
const _hoisted_5$1 = { class: "bg-gray-100 py-5 rounded-8" };
|
|
11463
|
+
const _hoisted_6$1 = { class: "text-center" };
|
|
11540
11464
|
const _hoisted_7$1 = { class: "bs-layout-horizontal justify-content-center align-items-center" };
|
|
11541
11465
|
const _hoisted_8$1 = /* @__PURE__ */ createElementVNode("div", {
|
|
11542
11466
|
class: "d-inline-block text-center text-gray-300",
|
|
@@ -11545,7 +11469,7 @@ const _hoisted_8$1 = /* @__PURE__ */ createElementVNode("div", {
|
|
|
11545
11469
|
/* @__PURE__ */ createElementVNode("span", { class: "font-icon" }, "add")
|
|
11546
11470
|
], -1);
|
|
11547
11471
|
const _hoisted_9$1 = { class: "text-center" };
|
|
11548
|
-
const _sfc_main$
|
|
11472
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
11549
11473
|
__name: "PbPropertyGroupEditorMargin",
|
|
11550
11474
|
props: {
|
|
11551
11475
|
group: {},
|
|
@@ -11569,12 +11493,12 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
11569
11493
|
const updateTop = (value) => updatePropertyValue({ marginTop: value });
|
|
11570
11494
|
const updateBottom = (value) => updatePropertyValue({ marginBottom: value });
|
|
11571
11495
|
return (_ctx, _cache) => {
|
|
11572
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
11573
|
-
createElementVNode("div", _hoisted_2$
|
|
11574
|
-
_hoisted_3$
|
|
11575
|
-
createElementVNode("div", _hoisted_4$
|
|
11576
|
-
createElementVNode("div", _hoisted_5$
|
|
11577
|
-
createElementVNode("div", _hoisted_6$
|
|
11496
|
+
return openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
11497
|
+
createElementVNode("div", _hoisted_2$5, [
|
|
11498
|
+
_hoisted_3$3,
|
|
11499
|
+
createElementVNode("div", _hoisted_4$2, [
|
|
11500
|
+
createElementVNode("div", _hoisted_5$1, [
|
|
11501
|
+
createElementVNode("div", _hoisted_6$1, [
|
|
11578
11502
|
createVNode(unref(BSTextInput), {
|
|
11579
11503
|
"model-value": top.value,
|
|
11580
11504
|
class: "ml-4",
|
|
@@ -11616,14 +11540,14 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
11616
11540
|
};
|
|
11617
11541
|
}
|
|
11618
11542
|
});
|
|
11619
|
-
const _hoisted_1$
|
|
11620
|
-
const _hoisted_2$
|
|
11621
|
-
const _hoisted_3$
|
|
11543
|
+
const _hoisted_1$c = { class: "group-editor group-editor-padding" };
|
|
11544
|
+
const _hoisted_2$4 = { class: "flex-align-center" };
|
|
11545
|
+
const _hoisted_3$2 = /* @__PURE__ */ createElementVNode("div", { class: "title" }, [
|
|
11622
11546
|
/* @__PURE__ */ createElementVNode("label", { textContent: "Padding" })
|
|
11623
11547
|
], -1);
|
|
11624
|
-
const _hoisted_4$
|
|
11625
|
-
const _hoisted_5
|
|
11626
|
-
const _hoisted_6
|
|
11548
|
+
const _hoisted_4$1 = { class: "flex-grow-1" };
|
|
11549
|
+
const _hoisted_5 = { class: "bg-gray-100 py-5 rounded-8" };
|
|
11550
|
+
const _hoisted_6 = { class: "text-center" };
|
|
11627
11551
|
const _hoisted_7 = { class: "bs-layout-horizontal justify-content-center align-items-center" };
|
|
11628
11552
|
const _hoisted_8 = /* @__PURE__ */ createElementVNode("div", {
|
|
11629
11553
|
class: "d-inline-block text-center text-gray-300",
|
|
@@ -11632,7 +11556,7 @@ const _hoisted_8 = /* @__PURE__ */ createElementVNode("div", {
|
|
|
11632
11556
|
/* @__PURE__ */ createElementVNode("span", { class: "font-icon" }, "add")
|
|
11633
11557
|
], -1);
|
|
11634
11558
|
const _hoisted_9 = { class: "text-center" };
|
|
11635
|
-
const _sfc_main$
|
|
11559
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
11636
11560
|
__name: "PbPropertyGroupEditorPadding",
|
|
11637
11561
|
props: {
|
|
11638
11562
|
group: {},
|
|
@@ -11656,12 +11580,12 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
11656
11580
|
const updateTop = (value) => updatePropertyValue({ paddingTop: value });
|
|
11657
11581
|
const updateBottom = (value) => updatePropertyValue({ paddingBottom: value });
|
|
11658
11582
|
return (_ctx, _cache) => {
|
|
11659
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
11660
|
-
createElementVNode("div", _hoisted_2$
|
|
11661
|
-
_hoisted_3$
|
|
11662
|
-
createElementVNode("div", _hoisted_4$
|
|
11663
|
-
createElementVNode("div", _hoisted_5
|
|
11664
|
-
createElementVNode("div", _hoisted_6
|
|
11583
|
+
return openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
11584
|
+
createElementVNode("div", _hoisted_2$4, [
|
|
11585
|
+
_hoisted_3$2,
|
|
11586
|
+
createElementVNode("div", _hoisted_4$1, [
|
|
11587
|
+
createElementVNode("div", _hoisted_5, [
|
|
11588
|
+
createElementVNode("div", _hoisted_6, [
|
|
11665
11589
|
createVNode(unref(BSTextInput), {
|
|
11666
11590
|
"model-value": top.value,
|
|
11667
11591
|
class: "ml-4",
|
|
@@ -11729,7 +11653,7 @@ const positionGroup = () => {
|
|
|
11729
11653
|
propertyType: "text"
|
|
11730
11654
|
}
|
|
11731
11655
|
],
|
|
11732
|
-
propertyGroupEditor: () => _sfc_main$
|
|
11656
|
+
propertyGroupEditor: () => _sfc_main$j
|
|
11733
11657
|
};
|
|
11734
11658
|
};
|
|
11735
11659
|
const sizeGroup = () => {
|
|
@@ -11768,7 +11692,7 @@ const sizeGroup = () => {
|
|
|
11768
11692
|
propertyType: "text"
|
|
11769
11693
|
}
|
|
11770
11694
|
],
|
|
11771
|
-
propertyGroupEditor: () => _sfc_main$
|
|
11695
|
+
propertyGroupEditor: () => _sfc_main$i
|
|
11772
11696
|
};
|
|
11773
11697
|
};
|
|
11774
11698
|
const marginGroup = () => {
|
|
@@ -11797,7 +11721,7 @@ const marginGroup = () => {
|
|
|
11797
11721
|
propertyType: "text"
|
|
11798
11722
|
}
|
|
11799
11723
|
],
|
|
11800
|
-
propertyGroupEditor: () => _sfc_main$
|
|
11724
|
+
propertyGroupEditor: () => _sfc_main$e
|
|
11801
11725
|
};
|
|
11802
11726
|
};
|
|
11803
11727
|
const paddingGroup = () => {
|
|
@@ -11826,7 +11750,7 @@ const paddingGroup = () => {
|
|
|
11826
11750
|
propertyType: "text"
|
|
11827
11751
|
}
|
|
11828
11752
|
],
|
|
11829
|
-
propertyGroupEditor: () => _sfc_main$
|
|
11753
|
+
propertyGroupEditor: () => _sfc_main$d
|
|
11830
11754
|
};
|
|
11831
11755
|
};
|
|
11832
11756
|
const commonGroup = () => {
|
|
@@ -11893,7 +11817,7 @@ const backgroundGroup = () => {
|
|
|
11893
11817
|
propertyType: "image"
|
|
11894
11818
|
}
|
|
11895
11819
|
],
|
|
11896
|
-
propertyGroupEditor: () => _sfc_main$
|
|
11820
|
+
propertyGroupEditor: () => _sfc_main$g
|
|
11897
11821
|
};
|
|
11898
11822
|
};
|
|
11899
11823
|
const borderGroup = () => {
|
|
@@ -11947,7 +11871,7 @@ const borderGroup = () => {
|
|
|
11947
11871
|
propertyType: "text"
|
|
11948
11872
|
}
|
|
11949
11873
|
],
|
|
11950
|
-
propertyGroupEditor: () => _sfc_main$
|
|
11874
|
+
propertyGroupEditor: () => _sfc_main$f
|
|
11951
11875
|
};
|
|
11952
11876
|
};
|
|
11953
11877
|
const defaultPropertyGroups = () => {
|
|
@@ -11956,56 +11880,6 @@ const defaultPropertyGroups = () => {
|
|
|
11956
11880
|
const defaultWidgetPropertyGroups = () => {
|
|
11957
11881
|
return [positionGroup(), sizeGroup(), marginGroup(), paddingGroup(), borderGroup(), backgroundGroup(), commonGroup()];
|
|
11958
11882
|
};
|
|
11959
|
-
const designParts = [
|
|
11960
|
-
{
|
|
11961
|
-
partType: "Section",
|
|
11962
|
-
partName: "GlobalDesignPart",
|
|
11963
|
-
caption: "Global Design Part",
|
|
11964
|
-
icon: "rectangle",
|
|
11965
|
-
propertyGroups: [
|
|
11966
|
-
...defaultPropertyGroups()
|
|
11967
|
-
],
|
|
11968
|
-
initialProperties: {
|
|
11969
|
-
sectionType: "globalDesignPart",
|
|
11970
|
-
direction: "horizontal"
|
|
11971
|
-
},
|
|
11972
|
-
localized: false,
|
|
11973
|
-
allowsChild: () => true,
|
|
11974
|
-
creator: () => _sfc_main$l
|
|
11975
|
-
},
|
|
11976
|
-
{
|
|
11977
|
-
partType: "Section",
|
|
11978
|
-
partName: "LocalDesignPart",
|
|
11979
|
-
caption: "Local Design Part",
|
|
11980
|
-
icon: "rectangle",
|
|
11981
|
-
propertyGroups: [
|
|
11982
|
-
...defaultPropertyGroups()
|
|
11983
|
-
],
|
|
11984
|
-
initialProperties: {
|
|
11985
|
-
sectionType: "localDesignPart",
|
|
11986
|
-
direction: "horizontal"
|
|
11987
|
-
},
|
|
11988
|
-
localized: true,
|
|
11989
|
-
allowsChild: () => true,
|
|
11990
|
-
creator: () => _sfc_main$l
|
|
11991
|
-
},
|
|
11992
|
-
{
|
|
11993
|
-
partType: "Section",
|
|
11994
|
-
partName: "LocalMarketingPart",
|
|
11995
|
-
caption: "Local Marketing Part",
|
|
11996
|
-
icon: "rectangle",
|
|
11997
|
-
propertyGroups: [
|
|
11998
|
-
...defaultPropertyGroups()
|
|
11999
|
-
],
|
|
12000
|
-
initialProperties: {
|
|
12001
|
-
sectionType: "localMarketingPart",
|
|
12002
|
-
direction: "horizontal"
|
|
12003
|
-
},
|
|
12004
|
-
localized: true,
|
|
12005
|
-
allowsChild: () => true,
|
|
12006
|
-
creator: () => _sfc_main$l
|
|
12007
|
-
}
|
|
12008
|
-
];
|
|
12009
11883
|
const sectionParts = [
|
|
12010
11884
|
{
|
|
12011
11885
|
partType: "Section",
|
|
@@ -12020,7 +11894,7 @@ const sectionParts = [
|
|
|
12020
11894
|
},
|
|
12021
11895
|
localized: false,
|
|
12022
11896
|
allowsChild: () => true,
|
|
12023
|
-
creator: () => _sfc_main$
|
|
11897
|
+
creator: () => _sfc_main$k
|
|
12024
11898
|
}
|
|
12025
11899
|
];
|
|
12026
11900
|
const blockParts = [
|
|
@@ -12035,7 +11909,7 @@ const blockParts = [
|
|
|
12035
11909
|
initialProperties: {},
|
|
12036
11910
|
localized: false,
|
|
12037
11911
|
allowsChild: () => true,
|
|
12038
|
-
creator: () => _sfc_main$
|
|
11912
|
+
creator: () => _sfc_main$m
|
|
12039
11913
|
}
|
|
12040
11914
|
];
|
|
12041
11915
|
const widgets = [
|
|
@@ -12164,9 +12038,6 @@ const widgets = [
|
|
|
12164
12038
|
}
|
|
12165
12039
|
];
|
|
12166
12040
|
const partDefinitions = {};
|
|
12167
|
-
for (let part of designParts) {
|
|
12168
|
-
partDefinitions[part.partName] = part;
|
|
12169
|
-
}
|
|
12170
12041
|
for (let part of sectionParts) {
|
|
12171
12042
|
partDefinitions[part.partName] = part;
|
|
12172
12043
|
}
|
|
@@ -12176,13 +12047,6 @@ for (let part of blockParts) {
|
|
|
12176
12047
|
for (let part of widgets) {
|
|
12177
12048
|
partDefinitions[part.partName] = part;
|
|
12178
12049
|
}
|
|
12179
|
-
const designPartDefinitions = [
|
|
12180
|
-
{
|
|
12181
|
-
groupName: "DesignParts",
|
|
12182
|
-
caption: "Design Parts",
|
|
12183
|
-
partDefinitions: designParts
|
|
12184
|
-
}
|
|
12185
|
-
];
|
|
12186
12050
|
[
|
|
12187
12051
|
{
|
|
12188
12052
|
groupName: "Layout",
|
|
@@ -12239,19 +12103,6 @@ class CommandRegistryImpl {
|
|
|
12239
12103
|
}
|
|
12240
12104
|
}
|
|
12241
12105
|
}
|
|
12242
|
-
const _OpenAddPartModalCommand = class _OpenAddPartModalCommand {
|
|
12243
|
-
constructor(modal) {
|
|
12244
|
-
__publicField(this, "commandId", _OpenAddPartModalCommand.COMMAND_ID);
|
|
12245
|
-
__publicField(this, "caption", "Add Part");
|
|
12246
|
-
this.modal = modal;
|
|
12247
|
-
}
|
|
12248
|
-
execute(pageBuilder, args) {
|
|
12249
|
-
let partDefinitionGroups = designPartDefinitions;
|
|
12250
|
-
openPartAddModal(this.modal, { pageBuilder, partDefinitionGroups, ...args || {} });
|
|
12251
|
-
}
|
|
12252
|
-
};
|
|
12253
|
-
__publicField(_OpenAddPartModalCommand, "COMMAND_ID", "OpenAddPartModal");
|
|
12254
|
-
let OpenAddPartModalCommand = _OpenAddPartModalCommand;
|
|
12255
12106
|
const _OpenAddWidgetModalCommand = class _OpenAddWidgetModalCommand {
|
|
12256
12107
|
constructor(modal) {
|
|
12257
12108
|
__publicField(this, "commandId", _OpenAddWidgetModalCommand.COMMAND_ID);
|
|
@@ -12265,31 +12116,9 @@ const _OpenAddWidgetModalCommand = class _OpenAddWidgetModalCommand {
|
|
|
12265
12116
|
};
|
|
12266
12117
|
__publicField(_OpenAddWidgetModalCommand, "COMMAND_ID", "OpenAddWidgetModal");
|
|
12267
12118
|
let OpenAddWidgetModalCommand = _OpenAddWidgetModalCommand;
|
|
12268
|
-
const openPartAddModal = (modal, args, callback) => {
|
|
12269
|
-
modal.openModal({
|
|
12270
|
-
component: defineAsyncComponent(() => import("./PbPartAddModal-DuLpnV4E.js")),
|
|
12271
|
-
style: {
|
|
12272
|
-
width: "80%",
|
|
12273
|
-
height: "80%",
|
|
12274
|
-
maxWidth: "800px",
|
|
12275
|
-
minWidth: "500px",
|
|
12276
|
-
maxHeight: "800px"
|
|
12277
|
-
},
|
|
12278
|
-
bind: args,
|
|
12279
|
-
on: {
|
|
12280
|
-
selectHandler: (part) => {
|
|
12281
|
-
if (callback) {
|
|
12282
|
-
callback(part);
|
|
12283
|
-
} else {
|
|
12284
|
-
addPart(args.pageBuilder, part);
|
|
12285
|
-
}
|
|
12286
|
-
}
|
|
12287
|
-
}
|
|
12288
|
-
});
|
|
12289
|
-
};
|
|
12290
12119
|
const openWidgetAddModal = (modal, args, callback) => {
|
|
12291
12120
|
modal.openModal({
|
|
12292
|
-
component: defineAsyncComponent(() => import("./PbWidgetAddModal-
|
|
12121
|
+
component: defineAsyncComponent(() => import("./PbWidgetAddModal-eGdqZyZu.js")),
|
|
12293
12122
|
style: {
|
|
12294
12123
|
width: "80%",
|
|
12295
12124
|
height: "80%",
|
|
@@ -12301,12 +12130,12 @@ const openWidgetAddModal = (modal, args, callback) => {
|
|
|
12301
12130
|
on: {
|
|
12302
12131
|
selectHandler: (part) => {
|
|
12303
12132
|
if (["ImageWidget"].includes(part.partName)) {
|
|
12304
|
-
|
|
12305
|
-
|
|
12306
|
-
|
|
12133
|
+
const imageProvider = args.pageBuilder.getProvider("imageProvider");
|
|
12134
|
+
if (imageProvider) {
|
|
12135
|
+
imageProvider({ modal }, (url) => {
|
|
12307
12136
|
addPart(args.pageBuilder, part, { image: url });
|
|
12308
|
-
}
|
|
12309
|
-
}
|
|
12137
|
+
});
|
|
12138
|
+
}
|
|
12310
12139
|
} else {
|
|
12311
12140
|
if (callback) {
|
|
12312
12141
|
callback(part);
|
|
@@ -12659,7 +12488,7 @@ const _AddSectionAboveCommand = class _AddSectionAboveCommand {
|
|
|
12659
12488
|
}
|
|
12660
12489
|
};
|
|
12661
12490
|
__publicField(_AddSectionAboveCommand, "COMMAND_ID", "AddSectionAbove");
|
|
12662
|
-
__publicField(_AddSectionAboveCommand, "CAPTION", "Add
|
|
12491
|
+
__publicField(_AddSectionAboveCommand, "CAPTION", "Add Section Above");
|
|
12663
12492
|
let AddSectionAboveCommand = _AddSectionAboveCommand;
|
|
12664
12493
|
const _AddSectionBelowCommand = class _AddSectionBelowCommand {
|
|
12665
12494
|
constructor(modal) {
|
|
@@ -12672,7 +12501,7 @@ const _AddSectionBelowCommand = class _AddSectionBelowCommand {
|
|
|
12672
12501
|
}
|
|
12673
12502
|
};
|
|
12674
12503
|
__publicField(_AddSectionBelowCommand, "COMMAND_ID", "AddSectionBelow");
|
|
12675
|
-
__publicField(_AddSectionBelowCommand, "CAPTION", "Add
|
|
12504
|
+
__publicField(_AddSectionBelowCommand, "CAPTION", "Add Section Below");
|
|
12676
12505
|
let AddSectionBelowCommand = _AddSectionBelowCommand;
|
|
12677
12506
|
const _AddBlockLeftCommand = class _AddBlockLeftCommand {
|
|
12678
12507
|
constructor() {
|
|
@@ -12821,6 +12650,20 @@ const _DeletePartCommand = class _DeletePartCommand {
|
|
|
12821
12650
|
__publicField(_DeletePartCommand, "COMMAND_ID", "DeletePart");
|
|
12822
12651
|
__publicField(_DeletePartCommand, "CAPTION", "Delete");
|
|
12823
12652
|
let DeletePartCommand = _DeletePartCommand;
|
|
12653
|
+
const _CopyAllCommand = class _CopyAllCommand {
|
|
12654
|
+
constructor() {
|
|
12655
|
+
__publicField(this, "commandId", _CopyAllCommand.COMMAND_ID);
|
|
12656
|
+
}
|
|
12657
|
+
async execute(pageBuilder) {
|
|
12658
|
+
const json = pageBuilder.model.serializeModel(
|
|
12659
|
+
(part) => pageBuilder.extractMedia(part),
|
|
12660
|
+
(partObject) => pageBuilder.extractProvider(partObject)
|
|
12661
|
+
);
|
|
12662
|
+
await navigator.clipboard.writeText(json);
|
|
12663
|
+
}
|
|
12664
|
+
};
|
|
12665
|
+
__publicField(_CopyAllCommand, "COMMAND_ID", "CopyAll");
|
|
12666
|
+
let CopyAllCommand = _CopyAllCommand;
|
|
12824
12667
|
const _CopyPartCommand = class _CopyPartCommand {
|
|
12825
12668
|
constructor() {
|
|
12826
12669
|
__publicField(this, "commandId", _CopyPartCommand.COMMAND_ID);
|
|
@@ -12828,7 +12671,7 @@ const _CopyPartCommand = class _CopyPartCommand {
|
|
|
12828
12671
|
async execute(pageBuilder) {
|
|
12829
12672
|
const partIds = pageBuilder.context.getSelectedParts().map((part) => part.partId);
|
|
12830
12673
|
if (partIds.length > 0) {
|
|
12831
|
-
const json = pageBuilder.model.
|
|
12674
|
+
const json = pageBuilder.model.serializeParts(partIds);
|
|
12832
12675
|
await navigator.clipboard.writeText(json);
|
|
12833
12676
|
}
|
|
12834
12677
|
}
|
|
@@ -12851,12 +12694,34 @@ const _PastePartCommand = class _PastePartCommand {
|
|
|
12851
12694
|
__publicField(this, "commandId", _PastePartCommand.COMMAND_ID);
|
|
12852
12695
|
}
|
|
12853
12696
|
async execute(pageBuilder) {
|
|
12854
|
-
const
|
|
12855
|
-
|
|
12856
|
-
|
|
12857
|
-
const
|
|
12858
|
-
if (
|
|
12859
|
-
|
|
12697
|
+
const json = await navigator.clipboard.readText();
|
|
12698
|
+
const object = JSON.parse(json);
|
|
12699
|
+
if (object.partType === ROOT_TYPE) {
|
|
12700
|
+
const rootPart = partFromJsonObject(object, true);
|
|
12701
|
+
if (!rootPart)
|
|
12702
|
+
throw new Error("Invalid data format");
|
|
12703
|
+
let partIdsToDelete = void 0;
|
|
12704
|
+
if (pageBuilder.model.rootPart.children && pageBuilder.model.rootPart.children.length) {
|
|
12705
|
+
partIdsToDelete = pageBuilder.model.rootPart.children.map((v) => v.partId);
|
|
12706
|
+
}
|
|
12707
|
+
const param = {
|
|
12708
|
+
delete: partIdsToDelete,
|
|
12709
|
+
insert: [
|
|
12710
|
+
{
|
|
12711
|
+
partId: pageBuilder.model.getRootPartId(),
|
|
12712
|
+
index: 0,
|
|
12713
|
+
parts: rootPart.children || []
|
|
12714
|
+
}
|
|
12715
|
+
]
|
|
12716
|
+
};
|
|
12717
|
+
pageBuilder.model.updateModel(param);
|
|
12718
|
+
} else {
|
|
12719
|
+
const { target, index = 0 } = findInsertTargetAndIndex(pageBuilder);
|
|
12720
|
+
if (target) {
|
|
12721
|
+
const parts = pageBuilder.model.parseParts(json);
|
|
12722
|
+
if (parts) {
|
|
12723
|
+
insertParts(pageBuilder, target.partId, index, parts, false);
|
|
12724
|
+
}
|
|
12860
12725
|
}
|
|
12861
12726
|
}
|
|
12862
12727
|
}
|
|
@@ -12877,7 +12742,6 @@ __publicField(_SelectAllPartsCommand, "COMMAND_ID", "SelectAllParts");
|
|
|
12877
12742
|
let SelectAllPartsCommand = _SelectAllPartsCommand;
|
|
12878
12743
|
const createDefaultCommands = (modal) => {
|
|
12879
12744
|
return [
|
|
12880
|
-
new OpenAddPartModalCommand(modal),
|
|
12881
12745
|
new OpenAddWidgetModalCommand(modal),
|
|
12882
12746
|
new AddPartCommand(modal),
|
|
12883
12747
|
new AddSectionCommand(modal),
|
|
@@ -12895,6 +12759,7 @@ const createDefaultCommands = (modal) => {
|
|
|
12895
12759
|
new AddWidgetInsideCommand(modal),
|
|
12896
12760
|
new ChangePropertyCommand(),
|
|
12897
12761
|
new DeletePartCommand(),
|
|
12762
|
+
new CopyAllCommand(),
|
|
12898
12763
|
new CopyPartCommand(),
|
|
12899
12764
|
new CutPartCommand(),
|
|
12900
12765
|
new PastePartCommand(),
|
|
@@ -13061,15 +12926,6 @@ const createDefaultContextMenus = () => {
|
|
|
13061
12926
|
return enableAddWidgetMenu(pageBuilder, "", AddWidgetInsideCommand.COMMAND_ID, AddWidgetInsideCommand.CAPTION);
|
|
13062
12927
|
}
|
|
13063
12928
|
},
|
|
13064
|
-
{
|
|
13065
|
-
groupId: "core:add",
|
|
13066
|
-
commandId: OpenAddPartModalCommand.COMMAND_ID,
|
|
13067
|
-
precedence: 10,
|
|
13068
|
-
getMenuItem(pageBuilder) {
|
|
13069
|
-
if (pageBuilder.context.getSelectionCount() <= 1)
|
|
13070
|
-
return menuItemForCommand(pageBuilder, OpenAddPartModalCommand.COMMAND_ID);
|
|
13071
|
-
}
|
|
13072
|
-
},
|
|
13073
12929
|
{
|
|
13074
12930
|
groupId: "core:edit",
|
|
13075
12931
|
commandId: DeletePartCommand.COMMAND_ID,
|
|
@@ -13144,6 +13000,12 @@ const createDefaultToolButtonGroups = () => {
|
|
|
13144
13000
|
icon: "redo",
|
|
13145
13001
|
handler: (modeler) => modeler.redo()
|
|
13146
13002
|
},
|
|
13003
|
+
{
|
|
13004
|
+
buttonId: "core:copyAll",
|
|
13005
|
+
caption: "Copy All",
|
|
13006
|
+
icon: "copy_all",
|
|
13007
|
+
handler: (modeler) => modeler.commandRegistry.executeCommand(CopyAllCommand.COMMAND_ID)
|
|
13008
|
+
},
|
|
13147
13009
|
{
|
|
13148
13010
|
buttonId: "core:copy",
|
|
13149
13011
|
caption: "Copy",
|
|
@@ -13389,15 +13251,14 @@ class PageBuilderEditorImpl {
|
|
|
13389
13251
|
__publicField(this, "keyHandlers", new KeyHandlersImpl(this));
|
|
13390
13252
|
__publicField(this, "toolButtonRegistry", new ToolButtonRegistryImpl());
|
|
13391
13253
|
__publicField(this, "title");
|
|
13392
|
-
__publicField(this, "editMode");
|
|
13393
13254
|
__publicField(this, "scale", ref(1));
|
|
13394
13255
|
__publicField(this, "locale", ref("en"));
|
|
13395
13256
|
__publicField(this, "locales", ref(["en"]));
|
|
13396
13257
|
__publicField(this, "customWidgets", []);
|
|
13258
|
+
__publicField(this, "watchers", {});
|
|
13397
13259
|
__publicField(this, "providers", {});
|
|
13398
13260
|
this.model = new Model2();
|
|
13399
13261
|
this.context = new PageBuilderContextImpl(this);
|
|
13400
|
-
this.editMode = "free";
|
|
13401
13262
|
this.scale.value = 1;
|
|
13402
13263
|
this.initPlugins();
|
|
13403
13264
|
}
|
|
@@ -13426,13 +13287,19 @@ class PageBuilderEditorImpl {
|
|
|
13426
13287
|
const def = this.partManager.getPartDefinition(part.partName);
|
|
13427
13288
|
if (!def || !def.dataWatcher)
|
|
13428
13289
|
return false;
|
|
13429
|
-
|
|
13290
|
+
const watcher = this.watchers[def.dataWatcher];
|
|
13291
|
+
if (!watcher)
|
|
13292
|
+
return false;
|
|
13293
|
+
return watcher(part.properties);
|
|
13430
13294
|
}
|
|
13431
13295
|
provideCustomWidgetData(part) {
|
|
13432
13296
|
const def = this.partManager.getPartDefinition(part.partName);
|
|
13433
13297
|
if (!def || !def.dataProvider)
|
|
13434
13298
|
return Promise.resolve();
|
|
13435
|
-
|
|
13299
|
+
const provider = this.providers[def.dataProvider];
|
|
13300
|
+
if (!provider)
|
|
13301
|
+
return Promise.resolve();
|
|
13302
|
+
return provider(part.properties);
|
|
13436
13303
|
}
|
|
13437
13304
|
registerPlugin(plugin) {
|
|
13438
13305
|
if (plugin.partDefinitions)
|
|
@@ -13456,7 +13323,7 @@ class PageBuilderEditorImpl {
|
|
|
13456
13323
|
plugin.widgets.forEach((v) => {
|
|
13457
13324
|
const w = { ...v };
|
|
13458
13325
|
w.partType = "Widget";
|
|
13459
|
-
w.creator = () => _sfc_main$
|
|
13326
|
+
w.creator = () => _sfc_main$p;
|
|
13460
13327
|
w.propertyGroups = [...w.propertyGroups, ...defaultWidgetPropertyGroups()];
|
|
13461
13328
|
partDefinitions2[v.partName] = w;
|
|
13462
13329
|
const found = this.customWidgets.find((x) => x.partName === v.partName);
|
|
@@ -13466,34 +13333,34 @@ class PageBuilderEditorImpl {
|
|
|
13466
13333
|
});
|
|
13467
13334
|
this.partManager.registerPartDefinitions(partDefinitions2);
|
|
13468
13335
|
}
|
|
13336
|
+
if (plugin.watchers) {
|
|
13337
|
+
this.watchers = { ...this.providers, ...plugin.watchers };
|
|
13338
|
+
}
|
|
13469
13339
|
if (plugin.providers) {
|
|
13470
|
-
this.providers = {
|
|
13471
|
-
...this.providers,
|
|
13472
|
-
...plugin.providers
|
|
13473
|
-
};
|
|
13340
|
+
this.providers = { ...this.providers, ...plugin.providers };
|
|
13474
13341
|
}
|
|
13475
13342
|
if (plugin.propertyEditors) {
|
|
13476
13343
|
this.partManager.registerPartPropertyEditors(plugin.propertyEditors);
|
|
13477
13344
|
}
|
|
13478
13345
|
}
|
|
13479
|
-
initData(
|
|
13480
|
-
this.model.rootPart.pageBuilderId = this.instanceId;
|
|
13346
|
+
initData(data) {
|
|
13481
13347
|
this.model.rootPart.language = this.locale.value;
|
|
13482
13348
|
let parts;
|
|
13483
|
-
if (
|
|
13484
|
-
|
|
13485
|
-
|
|
13486
|
-
|
|
13487
|
-
|
|
13488
|
-
parts = [];
|
|
13489
|
-
parts.push(page);
|
|
13490
|
-
}
|
|
13491
|
-
}
|
|
13349
|
+
if (data) {
|
|
13350
|
+
const rootPart = partFromJsonObject(data, true);
|
|
13351
|
+
if (!rootPart)
|
|
13352
|
+
throw new Error("Invalid data format");
|
|
13353
|
+
parts = rootPart.children;
|
|
13492
13354
|
}
|
|
13493
13355
|
if (!parts) {
|
|
13494
13356
|
parts = [this.getEmptyPageContent(), this.getEmptyPageContent()];
|
|
13495
13357
|
}
|
|
13358
|
+
let partIdsToDelete = void 0;
|
|
13359
|
+
if (this.model.rootPart.children && this.model.rootPart.children.length) {
|
|
13360
|
+
partIdsToDelete = this.model.rootPart.children.map((v) => v.partId);
|
|
13361
|
+
}
|
|
13496
13362
|
const param = {
|
|
13363
|
+
delete: partIdsToDelete,
|
|
13497
13364
|
insert: [
|
|
13498
13365
|
{
|
|
13499
13366
|
partId: this.model.getRootPartId(),
|
|
@@ -13533,8 +13400,8 @@ class PageBuilderEditorImpl {
|
|
|
13533
13400
|
if (screenCount !== 1)
|
|
13534
13401
|
return;
|
|
13535
13402
|
const part = this.model.rootPart.children[0];
|
|
13536
|
-
const json = this.model.
|
|
13537
|
-
const copied = this.model.
|
|
13403
|
+
const json = this.model.serializeParts([part.partId]);
|
|
13404
|
+
const copied = this.model.parseParts(json);
|
|
13538
13405
|
if (!copied)
|
|
13539
13406
|
return;
|
|
13540
13407
|
this.model.updateModel({
|
|
@@ -13550,6 +13417,100 @@ class PageBuilderEditorImpl {
|
|
|
13550
13417
|
getCustomWidgets() {
|
|
13551
13418
|
return this.customWidgets;
|
|
13552
13419
|
}
|
|
13420
|
+
extractMedia(part) {
|
|
13421
|
+
const urls = /* @__PURE__ */ new Set();
|
|
13422
|
+
this.extractMediaFromPart(part, urls);
|
|
13423
|
+
return Array.from(urls);
|
|
13424
|
+
}
|
|
13425
|
+
extractProvider(part) {
|
|
13426
|
+
const def = this.partManager.getPartDefinition(part.partName);
|
|
13427
|
+
if (def && (def == null ? void 0 : def.dataProvider)) {
|
|
13428
|
+
part.dataProvider = def.dataProvider;
|
|
13429
|
+
}
|
|
13430
|
+
if (part.children && part.children.length) {
|
|
13431
|
+
for (const child of part.children) {
|
|
13432
|
+
this.extractProvider(child);
|
|
13433
|
+
}
|
|
13434
|
+
}
|
|
13435
|
+
}
|
|
13436
|
+
extractMediaFromPart(part, urls) {
|
|
13437
|
+
if (part.properties) {
|
|
13438
|
+
for (const name in part.properties) {
|
|
13439
|
+
const def = this.partManager.getPropertyDefinition(part.partName, name);
|
|
13440
|
+
if (def && def.propertyType === "image") {
|
|
13441
|
+
const value = part.properties[name];
|
|
13442
|
+
if (value) {
|
|
13443
|
+
urls.add(value);
|
|
13444
|
+
}
|
|
13445
|
+
}
|
|
13446
|
+
}
|
|
13447
|
+
if (part.properties.css) {
|
|
13448
|
+
this.extractMediaFromHtml(part.properties.css, urls);
|
|
13449
|
+
}
|
|
13450
|
+
if (part.partName === "HtmlWidget" && part.properties.html) {
|
|
13451
|
+
for (const locale in part.properties.html) {
|
|
13452
|
+
const html = part.properties.html[locale];
|
|
13453
|
+
if (html.tags)
|
|
13454
|
+
this.extractMediaFromHtml(html.tags, urls);
|
|
13455
|
+
if (html.style)
|
|
13456
|
+
this.extractMediaFromHtml(html.style, urls);
|
|
13457
|
+
}
|
|
13458
|
+
}
|
|
13459
|
+
}
|
|
13460
|
+
if (part.children && part.children.length) {
|
|
13461
|
+
for (const child of part.children) {
|
|
13462
|
+
this.extractMediaFromPart(child, urls);
|
|
13463
|
+
}
|
|
13464
|
+
}
|
|
13465
|
+
}
|
|
13466
|
+
extractMediaFromHtml(html, urls) {
|
|
13467
|
+
const imgSrcMatches = html.match(/<img[^>]+src=["']?([^"'\s>]+)["']?[^>]*>/gi);
|
|
13468
|
+
if (imgSrcMatches) {
|
|
13469
|
+
imgSrcMatches.forEach((match) => {
|
|
13470
|
+
const url = match.match(/src=["']?([^"'\s>]+)["']?/i);
|
|
13471
|
+
if (url && url[1]) {
|
|
13472
|
+
urls.add(url[1]);
|
|
13473
|
+
}
|
|
13474
|
+
});
|
|
13475
|
+
}
|
|
13476
|
+
const sourceSrcsetMatches = html.match(/<source[^>]+srcset=["']?([^"'>]+)["']?[^>]*>/gi);
|
|
13477
|
+
if (sourceSrcsetMatches) {
|
|
13478
|
+
sourceSrcsetMatches.forEach((match) => {
|
|
13479
|
+
const srcset = match.match(/srcset=["']?([^"'>]+)["']?/i);
|
|
13480
|
+
if (srcset && srcset[1]) {
|
|
13481
|
+
const _urls = srcset[1].split(",").map((item) => item.trim().split(/\s+/)[0]);
|
|
13482
|
+
_urls.forEach((url) => urls.add(url));
|
|
13483
|
+
}
|
|
13484
|
+
});
|
|
13485
|
+
}
|
|
13486
|
+
const inputImageMatches = html.match(/<input[^>]+type=["']image["'][^>]+src=["']?([^"'\s>]+)["']?[^>]*>/gi);
|
|
13487
|
+
if (inputImageMatches) {
|
|
13488
|
+
inputImageMatches.forEach((match) => {
|
|
13489
|
+
const url = match.match(/src=["']?([^"'\s>]+)["']?/i);
|
|
13490
|
+
if (url && url[1]) {
|
|
13491
|
+
urls.add(url[1]);
|
|
13492
|
+
}
|
|
13493
|
+
});
|
|
13494
|
+
}
|
|
13495
|
+
const styleUrlMatches = html.match(/style=["']?[^"'>]*(background|background-image|border-image|list-style-image|content):\s*url\(["']?([^"'\)]+)["']?\)/gi);
|
|
13496
|
+
if (styleUrlMatches) {
|
|
13497
|
+
styleUrlMatches.forEach((match) => {
|
|
13498
|
+
const url = match.match(/url\(["']?([^"'\)]+)["']?\)/i);
|
|
13499
|
+
if (url && url[1]) {
|
|
13500
|
+
urls.add(url[1]);
|
|
13501
|
+
}
|
|
13502
|
+
});
|
|
13503
|
+
}
|
|
13504
|
+
const styleTagUrlMatches = html.match(/(background|background-image|border-image|list-style-image|content):\s*url\(["']?([^"'\)]+)["']?\)/gi);
|
|
13505
|
+
if (styleTagUrlMatches) {
|
|
13506
|
+
styleTagUrlMatches.forEach((match) => {
|
|
13507
|
+
const url = match.match(/url\(["']?([^"'\)]+)["']?\)/i);
|
|
13508
|
+
if (url && url[1]) {
|
|
13509
|
+
urls.add(url[1]);
|
|
13510
|
+
}
|
|
13511
|
+
});
|
|
13512
|
+
}
|
|
13513
|
+
}
|
|
13553
13514
|
getEmptyPageContent() {
|
|
13554
13515
|
const block = new Block();
|
|
13555
13516
|
const section = new Section();
|
|
@@ -13570,11 +13531,11 @@ class PageBuilderEditorImpl {
|
|
|
13570
13531
|
});
|
|
13571
13532
|
}
|
|
13572
13533
|
}
|
|
13573
|
-
const _hoisted_1$
|
|
13574
|
-
const _hoisted_2$
|
|
13575
|
-
_hoisted_1$
|
|
13534
|
+
const _hoisted_1$b = /* @__PURE__ */ createElementVNode("i", { class: "material-icons-outlined" }, "add_circle_outline", -1);
|
|
13535
|
+
const _hoisted_2$3 = [
|
|
13536
|
+
_hoisted_1$b
|
|
13576
13537
|
];
|
|
13577
|
-
const _sfc_main$
|
|
13538
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
13578
13539
|
__name: "PbPage",
|
|
13579
13540
|
props: {
|
|
13580
13541
|
page: {},
|
|
@@ -13607,7 +13568,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
13607
13568
|
class: normalizeClass([selected.value && "selected", _ctx.isMobilePage ? "mobile" : "pc", "pb-page-content"])
|
|
13608
13569
|
}, [
|
|
13609
13570
|
(openBlock(true), createElementBlock(Fragment, null, renderList((_a = _ctx.page) == null ? void 0 : _a.children, (section, index) => {
|
|
13610
|
-
return openBlock(), createBlock$1(_sfc_main$
|
|
13571
|
+
return openBlock(), createBlock$1(_sfc_main$k, {
|
|
13611
13572
|
key: section.partId,
|
|
13612
13573
|
part: section
|
|
13613
13574
|
}, null, 8, ["part"]);
|
|
@@ -13619,13 +13580,13 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
13619
13580
|
var _a2, _b;
|
|
13620
13581
|
return insertSection(((_b = (_a2 = _ctx.page) == null ? void 0 : _a2.children) == null ? void 0 : _b.length) || 0);
|
|
13621
13582
|
})
|
|
13622
|
-
}, _hoisted_2$
|
|
13583
|
+
}, _hoisted_2$3)
|
|
13623
13584
|
], 4);
|
|
13624
13585
|
};
|
|
13625
13586
|
}
|
|
13626
13587
|
});
|
|
13627
|
-
const _hoisted_1$
|
|
13628
|
-
const _sfc_main$
|
|
13588
|
+
const _hoisted_1$a = /* @__PURE__ */ createElementVNode("div", { style: { "width": "20px" } }, null, -1);
|
|
13589
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
13629
13590
|
__name: "PbCanvas",
|
|
13630
13591
|
setup(__props) {
|
|
13631
13592
|
const pageBuilder = usePageBuilderEditor();
|
|
@@ -13672,13 +13633,13 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
13672
13633
|
style: normalizeStyle(style.value),
|
|
13673
13634
|
class: "pb-canvas"
|
|
13674
13635
|
}, [
|
|
13675
|
-
createVNode(_sfc_main$
|
|
13636
|
+
createVNode(_sfc_main$c, {
|
|
13676
13637
|
"is-mobile-page": true,
|
|
13677
13638
|
page: pageS.value,
|
|
13678
13639
|
width: 420
|
|
13679
13640
|
}, null, 8, ["page"]),
|
|
13680
|
-
_hoisted_1$
|
|
13681
|
-
createVNode(_sfc_main$
|
|
13641
|
+
_hoisted_1$a,
|
|
13642
|
+
createVNode(_sfc_main$c, {
|
|
13682
13643
|
"is-mobile-page": false,
|
|
13683
13644
|
page: pageL.value,
|
|
13684
13645
|
width: 1024
|
|
@@ -13688,9 +13649,9 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
13688
13649
|
};
|
|
13689
13650
|
}
|
|
13690
13651
|
});
|
|
13691
|
-
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 .placeholder {\n padding: 4px 0;\n font-size: 18px;\n text-align: center;\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 .placeholder {\n padding: 4px 0;\n font-size: 18px;\n text-align: center;\n color: #999;\n}\n.pb-iframe-widget {\n width: 100%;\n height: fit-content;\n}\n.pb-iframe-widget .placeholder {\n padding: 4px 0;\n font-size: 18px;\n text-align: center;\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 padding: 0;\n margin: 0;\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:
|
|
13692
|
-
const _hoisted_1$
|
|
13693
|
-
const _sfc_main$
|
|
13652
|
+
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 .placeholder {\n padding: 4px 0;\n font-size: 18px;\n text-align: center;\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 .placeholder {\n padding: 4px 0;\n font-size: 18px;\n text-align: center;\n color: #999;\n}\n.pb-iframe-widget {\n width: 100%;\n height: fit-content;\n}\n.pb-iframe-widget .placeholder {\n padding: 4px 0;\n font-size: 18px;\n text-align: center;\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 padding: 0;\n margin: 0;\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: 0;\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}';
|
|
13653
|
+
const _hoisted_1$9 = { class: "pb-canvas-frame" };
|
|
13654
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
13694
13655
|
__name: "PbCanvasFrame",
|
|
13695
13656
|
setup(__props) {
|
|
13696
13657
|
const pageBuilderEditor = usePageBuilderEditor();
|
|
@@ -13742,7 +13703,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
13742
13703
|
);
|
|
13743
13704
|
return (_ctx, _cache) => {
|
|
13744
13705
|
var _a, _b, _c, _d;
|
|
13745
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
13706
|
+
return openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
13746
13707
|
createElementVNode("iframe", {
|
|
13747
13708
|
ref_key: "iframeRef",
|
|
13748
13709
|
ref: iframeRef,
|
|
@@ -13752,14 +13713,14 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
13752
13713
|
key: 0,
|
|
13753
13714
|
to: (_d = (_c = iframeRef.value) == null ? void 0 : _c.contentWindow) == null ? void 0 : _d.document.body
|
|
13754
13715
|
}, [
|
|
13755
|
-
createVNode(_sfc_main$
|
|
13716
|
+
createVNode(_sfc_main$b)
|
|
13756
13717
|
], 8, ["to"])) : createCommentVNode("", true)
|
|
13757
13718
|
]);
|
|
13758
13719
|
};
|
|
13759
13720
|
}
|
|
13760
13721
|
});
|
|
13761
|
-
const _hoisted_1$
|
|
13762
|
-
const _sfc_main$
|
|
13722
|
+
const _hoisted_1$8 = { class: "pb-tool-button bs-layout-horizontal flex-align-center" };
|
|
13723
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
13763
13724
|
__name: "PbToolbarButton",
|
|
13764
13725
|
props: {
|
|
13765
13726
|
button: {}
|
|
@@ -13772,7 +13733,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
13772
13733
|
(_b = (_a = props.button).handler) == null ? void 0 : _b.call(_a, pageBuilder);
|
|
13773
13734
|
};
|
|
13774
13735
|
return (_ctx, _cache) => {
|
|
13775
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
13736
|
+
return openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
13776
13737
|
createElementVNode("div", {
|
|
13777
13738
|
class: "tool-button bs-clickable",
|
|
13778
13739
|
onClick: handleClick
|
|
@@ -13787,17 +13748,17 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
13787
13748
|
};
|
|
13788
13749
|
}
|
|
13789
13750
|
});
|
|
13790
|
-
const _hoisted_1$
|
|
13791
|
-
const _sfc_main$
|
|
13751
|
+
const _hoisted_1$7 = { class: "pb-tool-button-group bs-layout-horizontal flex-align-center" };
|
|
13752
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
13792
13753
|
__name: "PbToolbarButtonGroup",
|
|
13793
13754
|
props: {
|
|
13794
13755
|
group: {}
|
|
13795
13756
|
},
|
|
13796
13757
|
setup(__props) {
|
|
13797
13758
|
return (_ctx, _cache) => {
|
|
13798
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
13759
|
+
return openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
13799
13760
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.group.buttons, (button) => {
|
|
13800
|
-
return openBlock(), createBlock$1(_sfc_main$
|
|
13761
|
+
return openBlock(), createBlock$1(_sfc_main$9, {
|
|
13801
13762
|
key: button.buttonId,
|
|
13802
13763
|
button
|
|
13803
13764
|
}, null, 8, ["button"]);
|
|
@@ -13806,11 +13767,11 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
13806
13767
|
};
|
|
13807
13768
|
}
|
|
13808
13769
|
});
|
|
13809
|
-
const _hoisted_1$
|
|
13810
|
-
const _hoisted_2$
|
|
13811
|
-
const _hoisted_3$
|
|
13812
|
-
const _hoisted_4
|
|
13813
|
-
const _sfc_main$
|
|
13770
|
+
const _hoisted_1$6 = { class: "pb-toolbar bs-layout-horizontal align-items-center" };
|
|
13771
|
+
const _hoisted_2$2 = { class: "bs-layout-horizontal align-items-center" };
|
|
13772
|
+
const _hoisted_3$1 = /* @__PURE__ */ createElementVNode("div", { class: "flex-grow-1" }, null, -1);
|
|
13773
|
+
const _hoisted_4 = { class: "mr-8" };
|
|
13774
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
13814
13775
|
__name: "PbToolbar",
|
|
13815
13776
|
props: {
|
|
13816
13777
|
plugin: {}
|
|
@@ -13861,10 +13822,10 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
13861
13822
|
});
|
|
13862
13823
|
return (_ctx, _cache) => {
|
|
13863
13824
|
var _a, _b, _c;
|
|
13864
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
13865
|
-
createElementVNode("div", _hoisted_2$
|
|
13825
|
+
return openBlock(), createElementBlock("div", _hoisted_1$6, [
|
|
13826
|
+
createElementVNode("div", _hoisted_2$2, [
|
|
13866
13827
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(buttonGroups), (group) => {
|
|
13867
|
-
return openBlock(), createBlock$1(_sfc_main$
|
|
13828
|
+
return openBlock(), createBlock$1(_sfc_main$8, {
|
|
13868
13829
|
key: group.groupId,
|
|
13869
13830
|
group
|
|
13870
13831
|
}, null, 8, ["group"]);
|
|
@@ -13886,33 +13847,33 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
13886
13847
|
placeholder: "Scale"
|
|
13887
13848
|
}, null, 8, ["modelValue"])
|
|
13888
13849
|
]),
|
|
13889
|
-
_hoisted_3$
|
|
13890
|
-
createElementVNode("div", _hoisted_4
|
|
13850
|
+
_hoisted_3$1,
|
|
13851
|
+
createElementVNode("div", _hoisted_4, [
|
|
13891
13852
|
_ctx.plugin ? (openBlock(), createBlock$1(resolveDynamicComponent((_a = _ctx.plugin) == null ? void 0 : _a.component), mergeProps({ key: 0 }, (_b = _ctx.plugin) == null ? void 0 : _b.bind, toHandlers((_c = _ctx.plugin) == null ? void 0 : _c.on)), null, 16)) : createCommentVNode("", true)
|
|
13892
13853
|
])
|
|
13893
13854
|
]);
|
|
13894
13855
|
};
|
|
13895
13856
|
}
|
|
13896
13857
|
});
|
|
13897
|
-
const _hoisted_1$
|
|
13898
|
-
const _sfc_main$
|
|
13858
|
+
const _hoisted_1$5 = { class: "pb-menu bs-layout-vertical" };
|
|
13859
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
13899
13860
|
__name: "PbMenu",
|
|
13900
13861
|
props: {
|
|
13901
13862
|
toolbarPlugin: {}
|
|
13902
13863
|
},
|
|
13903
13864
|
setup(__props) {
|
|
13904
13865
|
return (_ctx, _cache) => {
|
|
13905
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
13906
|
-
createVNode(_sfc_main$
|
|
13866
|
+
return openBlock(), createElementBlock("div", _hoisted_1$5, [
|
|
13867
|
+
createVNode(_sfc_main$7, { plugin: _ctx.toolbarPlugin }, null, 8, ["plugin"])
|
|
13907
13868
|
]);
|
|
13908
13869
|
};
|
|
13909
13870
|
}
|
|
13910
13871
|
});
|
|
13911
|
-
const _hoisted_1$
|
|
13872
|
+
const _hoisted_1$4 = {
|
|
13912
13873
|
key: 1,
|
|
13913
13874
|
class: "bs-layout-vertical border"
|
|
13914
13875
|
};
|
|
13915
|
-
const _sfc_main$
|
|
13876
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
13916
13877
|
__name: "PbNavigator",
|
|
13917
13878
|
setup(__props) {
|
|
13918
13879
|
const pageBuilder = usePageBuilderEditor();
|
|
@@ -14138,7 +14099,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
14138
14099
|
], 512)
|
|
14139
14100
|
]),
|
|
14140
14101
|
_: 1
|
|
14141
|
-
}, 8, ["tab-id"])) : (openBlock(), createElementBlock("div", _hoisted_1$
|
|
14102
|
+
}, 8, ["tab-id"])) : (openBlock(), createElementBlock("div", _hoisted_1$4, [
|
|
14142
14103
|
createElementVNode("div", {
|
|
14143
14104
|
ref_key: "treeS",
|
|
14144
14105
|
ref: treeS,
|
|
@@ -14171,7 +14132,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
14171
14132
|
};
|
|
14172
14133
|
}
|
|
14173
14134
|
});
|
|
14174
|
-
const _sfc_main$
|
|
14135
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
14175
14136
|
__name: "PbSidebarPropertyEditor",
|
|
14176
14137
|
props: {
|
|
14177
14138
|
property: {},
|
|
@@ -14182,25 +14143,6 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
14182
14143
|
const pageBuilder = usePageBuilderEditor();
|
|
14183
14144
|
const propertyEditor = computed(() => {
|
|
14184
14145
|
var _a;
|
|
14185
|
-
if (pageBuilder.editMode === "local" && props.selectedParts.length > 0) {
|
|
14186
|
-
const section = pageBuilder.partManager.findNearestSection(props.selectedParts[0]);
|
|
14187
|
-
if (section && section.isGlobalDesignPart()) {
|
|
14188
|
-
return;
|
|
14189
|
-
}
|
|
14190
|
-
if (section && (section.isLocalDesignPart() || section.isLocalMarketingPart())) {
|
|
14191
|
-
if (!props.property.localized) {
|
|
14192
|
-
return;
|
|
14193
|
-
}
|
|
14194
|
-
}
|
|
14195
|
-
}
|
|
14196
|
-
if (pageBuilder.editMode === "template" && props.selectedParts.length > 0) {
|
|
14197
|
-
const section = pageBuilder.partManager.findNearestSection(props.selectedParts[0]);
|
|
14198
|
-
if (section && (section.isLocalDesignPart() || section.isLocalMarketingPart())) {
|
|
14199
|
-
if (props.property.localized) {
|
|
14200
|
-
return;
|
|
14201
|
-
}
|
|
14202
|
-
}
|
|
14203
|
-
}
|
|
14204
14146
|
if (props.property.propertyEditor) {
|
|
14205
14147
|
const editor = props.property.propertyEditor(props.property, props.selectedParts);
|
|
14206
14148
|
if (editor)
|
|
@@ -14226,13 +14168,13 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
14226
14168
|
};
|
|
14227
14169
|
}
|
|
14228
14170
|
});
|
|
14229
|
-
const _hoisted_1$
|
|
14230
|
-
const _hoisted_2$
|
|
14171
|
+
const _hoisted_1$3 = { class: "pb-sidebar-property-group" };
|
|
14172
|
+
const _hoisted_2$1 = {
|
|
14231
14173
|
key: 0,
|
|
14232
14174
|
class: "group-title"
|
|
14233
14175
|
};
|
|
14234
|
-
const _hoisted_3
|
|
14235
|
-
const _sfc_main$
|
|
14176
|
+
const _hoisted_3 = ["textContent"];
|
|
14177
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
14236
14178
|
__name: "PbSidebarPropertyGroupEditor",
|
|
14237
14179
|
props: {
|
|
14238
14180
|
group: {},
|
|
@@ -14241,36 +14183,16 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14241
14183
|
},
|
|
14242
14184
|
setup(__props) {
|
|
14243
14185
|
const props = __props;
|
|
14244
|
-
const pageBuilder = usePageBuilderEditor();
|
|
14245
14186
|
const groupEditor = computed(() => {
|
|
14246
14187
|
var _a, _b;
|
|
14247
|
-
if (pageBuilder.editMode === "local" && props.selectedParts.length > 0) {
|
|
14248
|
-
const section = pageBuilder.partManager.findNearestSection(props.selectedParts[0]);
|
|
14249
|
-
if (section && section.isGlobalDesignPart()) {
|
|
14250
|
-
return;
|
|
14251
|
-
}
|
|
14252
|
-
if (section && (section.isLocalDesignPart() || section.isLocalMarketingPart())) {
|
|
14253
|
-
if (!props.group.localized) {
|
|
14254
|
-
return;
|
|
14255
|
-
}
|
|
14256
|
-
}
|
|
14257
|
-
}
|
|
14258
|
-
if (pageBuilder.editMode === "template" && props.selectedParts.length > 0) {
|
|
14259
|
-
const section = pageBuilder.partManager.findNearestSection(props.selectedParts[0]);
|
|
14260
|
-
if (section && (section.isLocalDesignPart() || section.isLocalMarketingPart())) {
|
|
14261
|
-
if (props.group.localized) {
|
|
14262
|
-
return;
|
|
14263
|
-
}
|
|
14264
|
-
}
|
|
14265
|
-
}
|
|
14266
14188
|
return (_b = (_a = props.group).propertyGroupEditor) == null ? void 0 : _b.call(_a, props.group, props.selectedParts);
|
|
14267
14189
|
});
|
|
14268
14190
|
return (_ctx, _cache) => {
|
|
14269
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
14270
|
-
_ctx.group.showGroupName ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
14191
|
+
return openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
14192
|
+
_ctx.group.showGroupName ? (openBlock(), createElementBlock("div", _hoisted_2$1, [
|
|
14271
14193
|
createElementVNode("label", {
|
|
14272
14194
|
textContent: toDisplayString(_ctx.group.caption)
|
|
14273
|
-
}, null, 8, _hoisted_3
|
|
14195
|
+
}, null, 8, _hoisted_3)
|
|
14274
14196
|
])) : createCommentVNode("", true),
|
|
14275
14197
|
_ctx.partsKey ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
14276
14198
|
groupEditor.value ? (openBlock(), createBlock$1(resolveDynamicComponent(groupEditor.value), {
|
|
@@ -14278,7 +14200,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14278
14200
|
group: _ctx.group,
|
|
14279
14201
|
"selected-parts": _ctx.selectedParts
|
|
14280
14202
|
}, null, 8, ["group", "selected-parts"])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.group.properties, (property) => {
|
|
14281
|
-
return openBlock(), createBlock$1(_sfc_main$
|
|
14203
|
+
return openBlock(), createBlock$1(_sfc_main$4, {
|
|
14282
14204
|
key: `${_ctx.partsKey}_${property.propertyName}`,
|
|
14283
14205
|
property,
|
|
14284
14206
|
"selected-parts": _ctx.selectedParts
|
|
@@ -14289,104 +14211,6 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14289
14211
|
};
|
|
14290
14212
|
}
|
|
14291
14213
|
});
|
|
14292
|
-
const _hoisted_1$3 = { class: "property-editor property-editor-local-part flex-align-center pt-16" };
|
|
14293
|
-
const _hoisted_2$1 = /* @__PURE__ */ createElementVNode("div", { class: "title" }, [
|
|
14294
|
-
/* @__PURE__ */ createElementVNode("label", { textContent: "Display Schedule" })
|
|
14295
|
-
], -1);
|
|
14296
|
-
const _hoisted_3 = { class: "bs-layout-horizontal" };
|
|
14297
|
-
const _hoisted_4 = { class: "mr-2" };
|
|
14298
|
-
const _hoisted_5 = /* @__PURE__ */ createElementVNode("span", { class: "font-icon" }, "more_horiz", -1);
|
|
14299
|
-
const _hoisted_6 = [
|
|
14300
|
-
_hoisted_5
|
|
14301
|
-
];
|
|
14302
|
-
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
14303
|
-
__name: "PbPropertyLocalMarketingPart",
|
|
14304
|
-
props: {
|
|
14305
|
-
selectedPart: {}
|
|
14306
|
-
},
|
|
14307
|
-
emits: ["select-schedule", "update-property-value"],
|
|
14308
|
-
setup(__props, { emit: __emit }) {
|
|
14309
|
-
const props = __props;
|
|
14310
|
-
useModal();
|
|
14311
|
-
const startDt = ref("");
|
|
14312
|
-
const endDt = ref("");
|
|
14313
|
-
const pageBuilder = usePageBuilderEditor();
|
|
14314
|
-
const selectSchedule = () => {
|
|
14315
|
-
PageBuilderEditorEvent.emit.requestLocalMarketingPartSchedule({
|
|
14316
|
-
pageBuilderId: pageBuilder.instanceId,
|
|
14317
|
-
partId: props.selectedPart.partId,
|
|
14318
|
-
callback: (schedule) => {
|
|
14319
|
-
startDt.value = schedule.startDt;
|
|
14320
|
-
endDt.value = schedule.endDt;
|
|
14321
|
-
if (props.selectedPart && props.selectedPart.isSection()) {
|
|
14322
|
-
clearContents(props.selectedPart);
|
|
14323
|
-
if (schedule.data) {
|
|
14324
|
-
for (const partId in schedule.data) {
|
|
14325
|
-
const part = findWidget(props.selectedPart, partId);
|
|
14326
|
-
if (part) {
|
|
14327
|
-
Object.entries(schedule.data[partId]).forEach(([key, value]) => {
|
|
14328
|
-
if (!value)
|
|
14329
|
-
return;
|
|
14330
|
-
part.properties = part.properties || {};
|
|
14331
|
-
part.properties[key] = value;
|
|
14332
|
-
});
|
|
14333
|
-
}
|
|
14334
|
-
}
|
|
14335
|
-
}
|
|
14336
|
-
}
|
|
14337
|
-
}
|
|
14338
|
-
});
|
|
14339
|
-
};
|
|
14340
|
-
const findWidget = (part, partId) => {
|
|
14341
|
-
if (!part)
|
|
14342
|
-
return;
|
|
14343
|
-
if (part.partId === partId)
|
|
14344
|
-
return part;
|
|
14345
|
-
if (part.children) {
|
|
14346
|
-
for (const child of part.children) {
|
|
14347
|
-
const found = findWidget(child, partId);
|
|
14348
|
-
if (found)
|
|
14349
|
-
return found;
|
|
14350
|
-
}
|
|
14351
|
-
}
|
|
14352
|
-
};
|
|
14353
|
-
const clearContents = (part) => {
|
|
14354
|
-
if (!part)
|
|
14355
|
-
return;
|
|
14356
|
-
if (part.properties) {
|
|
14357
|
-
for (const name in part.properties) {
|
|
14358
|
-
const propertyDef = pageBuilder.partManager.getPropertyDefinition(part.partName, name);
|
|
14359
|
-
if (propertyDef && propertyDef.localized) {
|
|
14360
|
-
delete part.properties[name];
|
|
14361
|
-
}
|
|
14362
|
-
}
|
|
14363
|
-
}
|
|
14364
|
-
if (part.children) {
|
|
14365
|
-
for (const child of part.children) {
|
|
14366
|
-
clearContents(child);
|
|
14367
|
-
}
|
|
14368
|
-
}
|
|
14369
|
-
};
|
|
14370
|
-
return (_ctx, _cache) => {
|
|
14371
|
-
return openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
14372
|
-
_hoisted_2$1,
|
|
14373
|
-
createElementVNode("div", _hoisted_3, [
|
|
14374
|
-
createElementVNode("div", _hoisted_4, [
|
|
14375
|
-
createVNode(unref(BSDateRange), {
|
|
14376
|
-
"from-value": startDt.value,
|
|
14377
|
-
"to-value": endDt.value,
|
|
14378
|
-
resolution: "DAY",
|
|
14379
|
-
width: "260px"
|
|
14380
|
-
}, null, 8, ["from-value", "to-value"])
|
|
14381
|
-
]),
|
|
14382
|
-
createElementVNode("div", null, [
|
|
14383
|
-
createElementVNode("button", { onClick: selectSchedule }, _hoisted_6)
|
|
14384
|
-
])
|
|
14385
|
-
])
|
|
14386
|
-
]);
|
|
14387
|
-
};
|
|
14388
|
-
}
|
|
14389
|
-
});
|
|
14390
14214
|
const _hoisted_1$2 = { class: "pb-sidebar-properties" };
|
|
14391
14215
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
14392
14216
|
__name: "PbSidebarProperties",
|
|
@@ -14405,25 +14229,13 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
14405
14229
|
return [];
|
|
14406
14230
|
}
|
|
14407
14231
|
});
|
|
14408
|
-
const showLocalMarketingPart = computed(() => {
|
|
14409
|
-
if (pageBuilder.editMode === "template")
|
|
14410
|
-
return false;
|
|
14411
|
-
if (!selectedParts.length || selectedParts.length !== 1)
|
|
14412
|
-
return false;
|
|
14413
|
-
const part = selectedParts[0];
|
|
14414
|
-
return part.isLocalMarketingPart();
|
|
14415
|
-
});
|
|
14416
14232
|
return (_ctx, _cache) => {
|
|
14417
14233
|
return openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
14418
|
-
showLocalMarketingPart.value ? (openBlock(), createBlock$1(_sfc_main$3, {
|
|
14419
|
-
key: 0,
|
|
14420
|
-
"selected-part": unref(selectedParts)[0]
|
|
14421
|
-
}, null, 8, ["selected-part"])) : createCommentVNode("", true),
|
|
14422
14234
|
(openBlock(true), createElementBlock(Fragment, null, renderList(properties.value, (group) => {
|
|
14423
14235
|
return openBlock(), createElementBlock("div", {
|
|
14424
14236
|
key: `${partsKey.value}_${group.groupName}`
|
|
14425
14237
|
}, [
|
|
14426
|
-
createVNode(_sfc_main$
|
|
14238
|
+
createVNode(_sfc_main$3, {
|
|
14427
14239
|
group,
|
|
14428
14240
|
partsKey: partsKey.value,
|
|
14429
14241
|
"selected-parts": unref(selectedParts)
|
|
@@ -14452,7 +14264,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
14452
14264
|
props: {
|
|
14453
14265
|
instanceId: {},
|
|
14454
14266
|
title: {},
|
|
14455
|
-
editMode: {},
|
|
14456
14267
|
pageContent: {},
|
|
14457
14268
|
locales: {},
|
|
14458
14269
|
locale: {},
|
|
@@ -14465,7 +14276,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
14465
14276
|
const pageBuilderEditor = createPageBuilderEditor();
|
|
14466
14277
|
pageBuilderEditor.instanceId = props.instanceId;
|
|
14467
14278
|
pageBuilderEditor.title = props.title;
|
|
14468
|
-
pageBuilderEditor.editMode = props.editMode || "free";
|
|
14469
14279
|
if (props.locales)
|
|
14470
14280
|
pageBuilderEditor.setLocales(props.locales);
|
|
14471
14281
|
if (props.locale)
|
|
@@ -14489,18 +14299,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
14489
14299
|
const colorHistory = ref([]);
|
|
14490
14300
|
provide("colorHistory", colorHistory);
|
|
14491
14301
|
const getPageContent = () => {
|
|
14492
|
-
|
|
14493
|
-
|
|
14302
|
+
return pageBuilderEditor.model.serializeModel(
|
|
14303
|
+
(part) => pageBuilderEditor.extractMedia(part),
|
|
14304
|
+
(partObject) => pageBuilderEditor.extractProvider(partObject)
|
|
14305
|
+
);
|
|
14494
14306
|
};
|
|
14495
14307
|
__expose({
|
|
14496
14308
|
getPageContent
|
|
14497
14309
|
});
|
|
14498
14310
|
return (_ctx, _cache) => {
|
|
14499
14311
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
14500
|
-
createVNode(_sfc_main$
|
|
14312
|
+
createVNode(_sfc_main$6, { "toolbar-plugin": _ctx.toolbarPlugin }, null, 8, ["toolbar-plugin"]),
|
|
14501
14313
|
createElementVNode("div", _hoisted_2, [
|
|
14502
|
-
createVNode(_sfc_main$
|
|
14503
|
-
createVNode(_sfc_main$
|
|
14314
|
+
createVNode(_sfc_main$5),
|
|
14315
|
+
createVNode(_sfc_main$a, { class: "flex-grow-1" }),
|
|
14504
14316
|
createVNode(_sfc_main$1)
|
|
14505
14317
|
])
|
|
14506
14318
|
]);
|
|
@@ -14521,23 +14333,22 @@ export {
|
|
|
14521
14333
|
PAGE_TYPE$1 as d,
|
|
14522
14334
|
Page as e,
|
|
14523
14335
|
_sfc_main$1$1 as f,
|
|
14524
|
-
|
|
14525
|
-
|
|
14526
|
-
_sfc_main$
|
|
14527
|
-
_sfc_main$
|
|
14528
|
-
_sfc_main$
|
|
14529
|
-
_sfc_main$
|
|
14530
|
-
|
|
14531
|
-
|
|
14532
|
-
|
|
14533
|
-
|
|
14534
|
-
|
|
14535
|
-
|
|
14536
|
-
|
|
14537
|
-
|
|
14336
|
+
Part as g,
|
|
14337
|
+
_sfc_main$p as h,
|
|
14338
|
+
_sfc_main$4$1 as i,
|
|
14339
|
+
_sfc_main$3$1 as j,
|
|
14340
|
+
_sfc_main$6$1 as k,
|
|
14341
|
+
_sfc_main$5$1 as l,
|
|
14342
|
+
RootPart as m,
|
|
14343
|
+
Section as n,
|
|
14344
|
+
Widget as o,
|
|
14345
|
+
createPageBuilderViewer as p,
|
|
14346
|
+
createPartComponent as q,
|
|
14347
|
+
createPartComponents as r,
|
|
14348
|
+
providePageBuilder as s,
|
|
14349
|
+
providePageBuilderViewer as t,
|
|
14538
14350
|
usePageBuilderEditor as u,
|
|
14539
|
-
|
|
14351
|
+
usePageBuilder as v,
|
|
14540
14352
|
widgetPartDefinitions as w,
|
|
14541
|
-
|
|
14542
|
-
usePageBuilderViewer as y
|
|
14353
|
+
usePageBuilderViewer as x
|
|
14543
14354
|
};
|