@g1cloud/page-builder-editor 1.0.0-alpha.20 → 1.0.0-alpha.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{PbPropertyEditorColor-BC6HW3q7.js → PbPropertyEditorColor-BFMkFOYX.js} +1 -1
- package/dist/{PbPropertyEditorHtml-DGiHzR3a.js → PbPropertyEditorHtml-DZw8qbJH.js} +1 -1
- package/dist/{PbPropertyEditorImage-BFqppMwa.js → PbPropertyEditorImage-BQhiQyNM.js} +1 -1
- package/dist/{PbPropertyEditorMultilineText-BdgciM4C.js → PbPropertyEditorMultilineText-CT3vTbYY.js} +1 -1
- package/dist/{PbPropertyEditorText-BDKWUgPG.js → PbPropertyEditorText-DmM_LMjC.js} +1 -1
- package/dist/{PbWidgetAddModal-BKP0MLJe.js → PbWidgetAddModal-BoYfb0dm.js} +1 -1
- package/dist/{index-KDwlEwIU.js → index-Cr-_-n9T.js} +106 -142
- package/dist/page-builder-editor.js +1 -1
- package/dist/page-builder-editor.umd.cjs +98 -134
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, createVNode, unref } from "vue";
|
|
2
2
|
import { BSTextInput } from "@g1cloud/bluesea";
|
|
3
|
-
import { P as PbColorPicker } from "./index-
|
|
3
|
+
import { P as PbColorPicker } from "./index-Cr-_-n9T.js";
|
|
4
4
|
const _hoisted_1 = { class: "property-editor property-editor-color" };
|
|
5
5
|
const _hoisted_2 = { class: "title" };
|
|
6
6
|
const _hoisted_3 = ["textContent"];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, defineAsyncComponent } from "vue";
|
|
2
2
|
import { useModal } from "@g1cloud/bluesea";
|
|
3
|
-
import { u as usePageBuilderEditor } from "./index-
|
|
3
|
+
import { u as usePageBuilderEditor } from "./index-Cr-_-n9T.js";
|
|
4
4
|
const _hoisted_1 = { class: "property-editor property-editor-image flex-align-center" };
|
|
5
5
|
const _hoisted_2 = { class: "title" };
|
|
6
6
|
const _hoisted_3 = ["textContent"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createElementBlock, createElementVNode, toDisplayString } from "vue";
|
|
2
|
-
import { u as usePageBuilderEditor } from "./index-
|
|
2
|
+
import { u as usePageBuilderEditor } from "./index-Cr-_-n9T.js";
|
|
3
3
|
import { useModal } from "@g1cloud/bluesea";
|
|
4
4
|
const _hoisted_1 = { class: "property-editor property-editor-image flex-align-center" };
|
|
5
5
|
const _hoisted_2 = { class: "title" };
|
package/dist/{PbPropertyEditorMultilineText-BdgciM4C.js → PbPropertyEditorMultilineText-CT3vTbYY.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, computed, openBlock, createElementBlock, createElementVNode, toDisplayString, createBlock, unref } from "vue";
|
|
2
2
|
import { BSMultiLangTextArea, BSTextArea } from "@g1cloud/bluesea";
|
|
3
|
-
import { u as usePageBuilderEditor } from "./index-
|
|
3
|
+
import { u as usePageBuilderEditor } from "./index-Cr-_-n9T.js";
|
|
4
4
|
const _hoisted_1 = { class: "property-editor property-editor-multiline-text" };
|
|
5
5
|
const _hoisted_2 = { class: "title" };
|
|
6
6
|
const _hoisted_3 = ["textContent"];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, computed, openBlock, createElementBlock, createElementVNode, toDisplayString, createBlock, unref } from "vue";
|
|
2
2
|
import { BSMultiLangTextInput, BSTextInput } from "@g1cloud/bluesea";
|
|
3
|
-
import { u as usePageBuilderEditor } from "./index-
|
|
3
|
+
import { u as usePageBuilderEditor } from "./index-Cr-_-n9T.js";
|
|
4
4
|
const _hoisted_1 = { class: "property-editor property-editor-text flex-align-center" };
|
|
5
5
|
const _hoisted_2 = { class: "title" };
|
|
6
6
|
const _hoisted_3 = ["textContent"];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, computed, openBlock, createBlock, unref, withCtx, createElementVNode, createElementBlock, Fragment, renderList, toDisplayString } from "vue";
|
|
2
2
|
import { useModalHandle, BSModalFrame } from "@g1cloud/bluesea";
|
|
3
|
-
import { w as widgetPartDefinitions } from "./index-
|
|
3
|
+
import { w as widgetPartDefinitions } from "./index-Cr-_-n9T.js";
|
|
4
4
|
const _hoisted_1 = { class: "bs-layout-vertical pb-part-add-modal" };
|
|
5
5
|
const _hoisted_2 = /* @__PURE__ */ createElementVNode("div", {
|
|
6
6
|
class: "mb-8",
|
|
@@ -4,8 +4,8 @@ var __publicField = (obj, key, value) => {
|
|
|
4
4
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
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
|
|
8
|
-
import { notNull, BSTextInput, vClickOutside, useModal, useContextMenu, BSSelect,
|
|
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 } from "vue";
|
|
8
|
+
import { notNull, BSTextInput, vClickOutside, useModal, useContextMenu, BSSelect, BSTree } from "@g1cloud/bluesea";
|
|
9
9
|
const create$5 = () => /* @__PURE__ */ new Map();
|
|
10
10
|
const copy = (m) => {
|
|
11
11
|
const r = create$5();
|
|
@@ -6778,8 +6778,6 @@ class Part {
|
|
|
6778
6778
|
class RootPart extends Part {
|
|
6779
6779
|
constructor() {
|
|
6780
6780
|
super();
|
|
6781
|
-
__publicField2(this, "language");
|
|
6782
|
-
this.language = "en";
|
|
6783
6781
|
this.partType = ROOT_TYPE$1;
|
|
6784
6782
|
this.partName = ROOT_TYPE$1;
|
|
6785
6783
|
}
|
|
@@ -7055,8 +7053,8 @@ const _sfc_main$4$1 = /* @__PURE__ */ defineComponent({
|
|
|
7055
7053
|
return;
|
|
7056
7054
|
if (typeof html2 !== "object")
|
|
7057
7055
|
return;
|
|
7058
|
-
const
|
|
7059
|
-
let _html = html2[
|
|
7056
|
+
const locale = pageBuilder.locale.value;
|
|
7057
|
+
let _html = html2[locale];
|
|
7060
7058
|
if (!_html && html2.tags) {
|
|
7061
7059
|
_html = html2;
|
|
7062
7060
|
}
|
|
@@ -7344,18 +7342,23 @@ const _sfc_main$1$1 = /* @__PURE__ */ defineComponent({
|
|
|
7344
7342
|
props: {
|
|
7345
7343
|
pageContent: {},
|
|
7346
7344
|
isMobilePage: { type: Boolean },
|
|
7347
|
-
|
|
7345
|
+
locale: {},
|
|
7348
7346
|
plugin: {}
|
|
7349
7347
|
},
|
|
7350
7348
|
setup(__props) {
|
|
7351
7349
|
const props = __props;
|
|
7352
7350
|
const pageBuilderViewer = createPageBuilderViewer();
|
|
7353
|
-
pageBuilderViewer.setLocale(props.
|
|
7351
|
+
pageBuilderViewer.setLocale(props.locale);
|
|
7354
7352
|
if (props.plugin)
|
|
7355
7353
|
pageBuilderViewer.registerCustomPlugin(props.plugin);
|
|
7356
7354
|
providePageBuilderViewer(pageBuilderViewer);
|
|
7357
7355
|
providePageBuilder(pageBuilderViewer);
|
|
7358
|
-
const page = computed(() =>
|
|
7356
|
+
const page = computed(() => {
|
|
7357
|
+
const pages = pageBuilderViewer.model.rootPart.value.children;
|
|
7358
|
+
if (!pages || !pages.length)
|
|
7359
|
+
return;
|
|
7360
|
+
return pages[pages.length === 1 || props.isMobilePage ? 0 : 1];
|
|
7361
|
+
});
|
|
7359
7362
|
onMounted(() => {
|
|
7360
7363
|
if (props.pageContent) {
|
|
7361
7364
|
pageBuilderViewer.render(props.pageContent);
|
|
@@ -8002,12 +8005,12 @@ class PartManager {
|
|
|
8002
8005
|
const defaultPartPropertyEditors = () => {
|
|
8003
8006
|
return {
|
|
8004
8007
|
"readonly-text": () => defineAsyncComponent(() => import("./PbPropertyEditorReadonlyText-Dgp_AVOD.js")),
|
|
8005
|
-
"text": () => defineAsyncComponent(() => import("./PbPropertyEditorText-
|
|
8006
|
-
"multiline-text": () => defineAsyncComponent(() => import("./PbPropertyEditorMultilineText-
|
|
8008
|
+
"text": () => defineAsyncComponent(() => import("./PbPropertyEditorText-DmM_LMjC.js")),
|
|
8009
|
+
"multiline-text": () => defineAsyncComponent(() => import("./PbPropertyEditorMultilineText-CT3vTbYY.js")),
|
|
8007
8010
|
"select": () => defineAsyncComponent(() => import("./PbPropertyEditorSelect-CWedbXJI.js")),
|
|
8008
|
-
"color": () => defineAsyncComponent(() => import("./PbPropertyEditorColor-
|
|
8009
|
-
"image": () => defineAsyncComponent(() => import("./PbPropertyEditorImage-
|
|
8010
|
-
"html": () => defineAsyncComponent(() => import("./PbPropertyEditorHtml-
|
|
8011
|
+
"color": () => defineAsyncComponent(() => import("./PbPropertyEditorColor-BFMkFOYX.js")),
|
|
8012
|
+
"image": () => defineAsyncComponent(() => import("./PbPropertyEditorImage-BQhiQyNM.js")),
|
|
8013
|
+
"html": () => defineAsyncComponent(() => import("./PbPropertyEditorHtml-DZw8qbJH.js"))
|
|
8011
8014
|
};
|
|
8012
8015
|
};
|
|
8013
8016
|
const getPropertyValueOfParts = (parts, propertyName) => {
|
|
@@ -11881,6 +11884,23 @@ const defaultPropertyGroups = () => {
|
|
|
11881
11884
|
const defaultWidgetPropertyGroups = () => {
|
|
11882
11885
|
return [positionGroup(), sizeGroup(), marginGroup(), paddingGroup(), borderGroup(), backgroundGroup(), commonGroup()];
|
|
11883
11886
|
};
|
|
11887
|
+
const pageParts = [
|
|
11888
|
+
{
|
|
11889
|
+
partType: "Page",
|
|
11890
|
+
partName: "Page",
|
|
11891
|
+
caption: "Page",
|
|
11892
|
+
icon: "draft",
|
|
11893
|
+
propertyGroups: [
|
|
11894
|
+
paddingGroup(),
|
|
11895
|
+
backgroundGroup(),
|
|
11896
|
+
commonGroup()
|
|
11897
|
+
],
|
|
11898
|
+
initialProperties: {},
|
|
11899
|
+
localized: false,
|
|
11900
|
+
allowsChild: () => true,
|
|
11901
|
+
creator: () => _sfc_main$k
|
|
11902
|
+
}
|
|
11903
|
+
];
|
|
11884
11904
|
const sectionParts = [
|
|
11885
11905
|
{
|
|
11886
11906
|
partType: "Section",
|
|
@@ -12039,13 +12059,16 @@ const widgets = [
|
|
|
12039
12059
|
}
|
|
12040
12060
|
];
|
|
12041
12061
|
const partDefinitions = {};
|
|
12042
|
-
for (
|
|
12062
|
+
for (const part of pageParts) {
|
|
12063
|
+
partDefinitions[part.partName] = part;
|
|
12064
|
+
}
|
|
12065
|
+
for (const part of sectionParts) {
|
|
12043
12066
|
partDefinitions[part.partName] = part;
|
|
12044
12067
|
}
|
|
12045
|
-
for (
|
|
12068
|
+
for (const part of blockParts) {
|
|
12046
12069
|
partDefinitions[part.partName] = part;
|
|
12047
12070
|
}
|
|
12048
|
-
for (
|
|
12071
|
+
for (const part of widgets) {
|
|
12049
12072
|
partDefinitions[part.partName] = part;
|
|
12050
12073
|
}
|
|
12051
12074
|
[
|
|
@@ -12119,7 +12142,7 @@ __publicField(_OpenAddWidgetModalCommand, "COMMAND_ID", "OpenAddWidgetModal");
|
|
|
12119
12142
|
let OpenAddWidgetModalCommand = _OpenAddWidgetModalCommand;
|
|
12120
12143
|
const openWidgetAddModal = (modal, args, callback) => {
|
|
12121
12144
|
modal.openModal({
|
|
12122
|
-
component: defineAsyncComponent(() => import("./PbWidgetAddModal-
|
|
12145
|
+
component: defineAsyncComponent(() => import("./PbWidgetAddModal-BoYfb0dm.js")),
|
|
12123
12146
|
style: {
|
|
12124
12147
|
width: "80%",
|
|
12125
12148
|
height: "80%",
|
|
@@ -13096,7 +13119,11 @@ class PageBuilderContextImpl {
|
|
|
13096
13119
|
}
|
|
13097
13120
|
setSelection(parts) {
|
|
13098
13121
|
this.selection.splice(0, this.selection.length);
|
|
13099
|
-
parts
|
|
13122
|
+
if (parts && parts.length) {
|
|
13123
|
+
parts.forEach((part) => this.selection.push(part));
|
|
13124
|
+
} else if (this.model.rootPart.children && this.model.rootPart.children.length) {
|
|
13125
|
+
this.selection.push(this.model.rootPart.children[0]);
|
|
13126
|
+
}
|
|
13100
13127
|
}
|
|
13101
13128
|
addSelection(parts) {
|
|
13102
13129
|
parts.forEach((part) => this.selection.push(part));
|
|
@@ -13345,7 +13372,6 @@ class PageBuilderEditorImpl {
|
|
|
13345
13372
|
}
|
|
13346
13373
|
}
|
|
13347
13374
|
initData(data) {
|
|
13348
|
-
this.model.rootPart.language = this.locale.value;
|
|
13349
13375
|
const _data = JSON.parse(data || "{}") || {};
|
|
13350
13376
|
let rootPart = partFromJsonObject(_data, true);
|
|
13351
13377
|
if (!rootPart)
|
|
@@ -13353,6 +13379,21 @@ class PageBuilderEditorImpl {
|
|
|
13353
13379
|
let parts = rootPart.children;
|
|
13354
13380
|
if (!parts)
|
|
13355
13381
|
parts = [this.getEmptyPageContent(), this.getEmptyPageContent()];
|
|
13382
|
+
if (parts.length === 1) {
|
|
13383
|
+
parts[0].properties = {
|
|
13384
|
+
...parts[0].properties || {},
|
|
13385
|
+
name: "Page"
|
|
13386
|
+
};
|
|
13387
|
+
} else if (parts.length === 2) {
|
|
13388
|
+
parts[0].properties = {
|
|
13389
|
+
...parts[0].properties || {},
|
|
13390
|
+
name: "Page (Mobile)"
|
|
13391
|
+
};
|
|
13392
|
+
parts[1].properties = {
|
|
13393
|
+
...parts[0].properties || {},
|
|
13394
|
+
name: "Page (PC)"
|
|
13395
|
+
};
|
|
13396
|
+
}
|
|
13356
13397
|
let partIdsToDelete = void 0;
|
|
13357
13398
|
if (this.model.rootPart.children && this.model.rootPart.children.length) {
|
|
13358
13399
|
partIdsToDelete = this.model.rootPart.children.map((v) => v.partId);
|
|
@@ -13385,9 +13426,18 @@ class PageBuilderEditorImpl {
|
|
|
13385
13426
|
const screenCount = ((_a = this.model.rootPart.children) == null ? void 0 : _a.length) || 0;
|
|
13386
13427
|
if (screenCount !== 2)
|
|
13387
13428
|
return;
|
|
13388
|
-
const
|
|
13429
|
+
const remaining = this.model.rootPart.children[screenToKeep === 0 ? 0 : 1];
|
|
13430
|
+
const deleting = this.model.rootPart.children[screenToKeep === 0 ? 1 : 0];
|
|
13389
13431
|
this.model.updateModel({
|
|
13390
|
-
delete: [
|
|
13432
|
+
delete: [deleting.partId],
|
|
13433
|
+
update: [
|
|
13434
|
+
{
|
|
13435
|
+
partId: remaining.partId,
|
|
13436
|
+
properties: {
|
|
13437
|
+
name: "Page"
|
|
13438
|
+
}
|
|
13439
|
+
}
|
|
13440
|
+
]
|
|
13391
13441
|
});
|
|
13392
13442
|
}
|
|
13393
13443
|
makeMultipleScreen() {
|
|
@@ -13402,6 +13452,10 @@ class PageBuilderEditorImpl {
|
|
|
13402
13452
|
const copied = this.model.parseParts(json);
|
|
13403
13453
|
if (!copied)
|
|
13404
13454
|
return;
|
|
13455
|
+
copied[0].properties = {
|
|
13456
|
+
...copied[0].properties || {},
|
|
13457
|
+
name: "Page (PC)"
|
|
13458
|
+
};
|
|
13405
13459
|
this.model.updateModel({
|
|
13406
13460
|
insert: [
|
|
13407
13461
|
{
|
|
@@ -13409,6 +13463,14 @@ class PageBuilderEditorImpl {
|
|
|
13409
13463
|
index: 1,
|
|
13410
13464
|
parts: copied
|
|
13411
13465
|
}
|
|
13466
|
+
],
|
|
13467
|
+
update: [
|
|
13468
|
+
{
|
|
13469
|
+
partId: part.partId,
|
|
13470
|
+
properties: {
|
|
13471
|
+
name: "Page (Mobile)"
|
|
13472
|
+
}
|
|
13473
|
+
}
|
|
13412
13474
|
]
|
|
13413
13475
|
});
|
|
13414
13476
|
}
|
|
@@ -13550,7 +13612,11 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
13550
13612
|
minHeight: ((_b = (_a = props.page) == null ? void 0 : _a.children) == null ? void 0 : _b.length) ? void 0 : "200px"
|
|
13551
13613
|
};
|
|
13552
13614
|
});
|
|
13553
|
-
const
|
|
13615
|
+
const properties = computed(() => {
|
|
13616
|
+
var _a;
|
|
13617
|
+
return { style: ((_a = props.page) == null ? void 0 : _a.getStyles()) || {} };
|
|
13618
|
+
});
|
|
13619
|
+
const selected = computed(() => !!props.page && editor.context.isSelected(props.page));
|
|
13554
13620
|
const insertSection = (index) => {
|
|
13555
13621
|
if (!props.page)
|
|
13556
13622
|
return;
|
|
@@ -13562,16 +13628,16 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
13562
13628
|
style: normalizeStyle(style.value),
|
|
13563
13629
|
class: "pb-page"
|
|
13564
13630
|
}, [
|
|
13565
|
-
createElementVNode("div", {
|
|
13566
|
-
class:
|
|
13567
|
-
}, [
|
|
13631
|
+
createElementVNode("div", mergeProps({
|
|
13632
|
+
class: [selected.value && "selected", _ctx.isMobilePage ? "mobile" : "pc", "pb-page-content"]
|
|
13633
|
+
}, properties.value), [
|
|
13568
13634
|
(openBlock(true), createElementBlock(Fragment, null, renderList((_a = _ctx.page) == null ? void 0 : _a.children, (section, index) => {
|
|
13569
13635
|
return openBlock(), createBlock$1(_sfc_main$k, {
|
|
13570
13636
|
key: section.partId,
|
|
13571
13637
|
part: section
|
|
13572
13638
|
}, null, 8, ["part"]);
|
|
13573
13639
|
}), 128))
|
|
13574
|
-
],
|
|
13640
|
+
], 16),
|
|
13575
13641
|
createElementVNode("div", {
|
|
13576
13642
|
class: "pb-add-section-handle bottom",
|
|
13577
13643
|
onClick: _cache[0] || (_cache[0] = ($event) => {
|
|
@@ -13867,49 +13933,14 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
13867
13933
|
};
|
|
13868
13934
|
}
|
|
13869
13935
|
});
|
|
13870
|
-
const _hoisted_1$4 = {
|
|
13871
|
-
key: 1,
|
|
13872
|
-
class: "bs-layout-vertical border"
|
|
13873
|
-
};
|
|
13936
|
+
const _hoisted_1$4 = { class: "bs-layout-vertical border" };
|
|
13874
13937
|
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
13875
13938
|
__name: "PbNavigator",
|
|
13876
13939
|
setup(__props) {
|
|
13877
13940
|
const pageBuilder = usePageBuilderEditor();
|
|
13878
|
-
const
|
|
13879
|
-
|
|
13880
|
-
|
|
13881
|
-
() => treeS.value,
|
|
13882
|
-
() => treeS.value && pageBuilder.keyHandlers.addDocumentKeyEventListener(treeS.value)
|
|
13883
|
-
);
|
|
13884
|
-
watch(
|
|
13885
|
-
() => treeL.value,
|
|
13886
|
-
() => treeL.value && pageBuilder.keyHandlers.addDocumentKeyEventListener(treeL.value)
|
|
13887
|
-
);
|
|
13888
|
-
const tabs = [
|
|
13889
|
-
{ tabId: "pageS", caption: "Mobile", icon: "phone_iphone" },
|
|
13890
|
-
{ tabId: "pageL", caption: "PC", icon: "desktop_windows" }
|
|
13891
|
-
];
|
|
13892
|
-
const isMultipleScreen = computed(() => {
|
|
13893
|
-
var _a;
|
|
13894
|
-
return (((_a = pageBuilder.model.rootPart.children) == null ? void 0 : _a.length) || 0) >= 2;
|
|
13895
|
-
});
|
|
13896
|
-
const pageS = computed(() => {
|
|
13897
|
-
var _a;
|
|
13898
|
-
return ((_a = (pageBuilder.model.rootPart.children || [])[0]) == null ? void 0 : _a.children) || [];
|
|
13899
|
-
});
|
|
13900
|
-
const pageL = computed(() => {
|
|
13901
|
-
var _a;
|
|
13902
|
-
return ((_a = (pageBuilder.model.rootPart.children || [])[1]) == null ? void 0 : _a.children) || [];
|
|
13903
|
-
});
|
|
13904
|
-
const tabId = computed({
|
|
13905
|
-
get() {
|
|
13906
|
-
const page = pageBuilder.context.getSelectedPage();
|
|
13907
|
-
return page === (pageBuilder.model.rootPart.children || [])[1] ? "pageL" : "pageS";
|
|
13908
|
-
},
|
|
13909
|
-
// @ts-ignore
|
|
13910
|
-
set(value) {
|
|
13911
|
-
}
|
|
13912
|
-
});
|
|
13941
|
+
const tree = ref();
|
|
13942
|
+
watch(() => tree.value, () => tree.value && pageBuilder.keyHandlers.addDocumentKeyEventListener(tree.value));
|
|
13943
|
+
const page = computed(() => pageBuilder.model.rootPart.children || []);
|
|
13913
13944
|
let savedPartSelection = null;
|
|
13914
13945
|
const treeDragAndDropPolicy = {
|
|
13915
13946
|
dropStep: () => 3,
|
|
@@ -13943,8 +13974,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
13943
13974
|
};
|
|
13944
13975
|
const rowMoved = (event) => {
|
|
13945
13976
|
var _a, _b, _c, _d, _e, _f;
|
|
13946
|
-
let
|
|
13947
|
-
const parentPartId = ((_a = event.destParent) == null ? void 0 : _a.partId) || (
|
|
13977
|
+
let page2 = pageBuilder.context.getSelectedPage();
|
|
13978
|
+
const parentPartId = ((_a = event.destParent) == null ? void 0 : _a.partId) || (page2 == null ? void 0 : page2.partId);
|
|
13948
13979
|
if (!parentPartId)
|
|
13949
13980
|
return;
|
|
13950
13981
|
let ok = false;
|
|
@@ -14030,92 +14061,25 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
14030
14061
|
PageBuilderEditorEvent.off.modelUpdatedByUI(modelUpdateHandler);
|
|
14031
14062
|
});
|
|
14032
14063
|
return (_ctx, _cache) => {
|
|
14033
|
-
return
|
|
14034
|
-
key: 0,
|
|
14035
|
-
"tab-id": tabId.value,
|
|
14036
|
-
"onUpdate:tabId": _cache[4] || (_cache[4] = ($event) => tabId.value = $event),
|
|
14037
|
-
tabs
|
|
14038
|
-
}, {
|
|
14039
|
-
pageS: withCtx(() => [
|
|
14040
|
-
createElementVNode("div", {
|
|
14041
|
-
ref_key: "treeS",
|
|
14042
|
-
ref: treeS,
|
|
14043
|
-
class: "pb-navigator",
|
|
14044
|
-
tabindex: "0"
|
|
14045
|
-
}, [
|
|
14046
|
-
createVNode(unref(BSTree), {
|
|
14047
|
-
expandedRows: expandedRows.value,
|
|
14048
|
-
"onUpdate:expandedRows": [
|
|
14049
|
-
_cache[0] || (_cache[0] = ($event) => expandedRows.value = $event),
|
|
14050
|
-
expandedRowsChanged
|
|
14051
|
-
],
|
|
14052
|
-
selectedRows: selectedRows.value,
|
|
14053
|
-
"onUpdate:selectedRows": [
|
|
14054
|
-
_cache[1] || (_cache[1] = ($event) => selectedRows.value = $event),
|
|
14055
|
-
selectedRowsChanged
|
|
14056
|
-
],
|
|
14057
|
-
data: pageS.value,
|
|
14058
|
-
"enable-drag-and-drop": treeDragAndDropPolicy,
|
|
14059
|
-
"icon-provider": iconProvider,
|
|
14060
|
-
"key-provider": (part) => part.partId,
|
|
14061
|
-
"label-provider": labelProvider,
|
|
14062
|
-
class: "max-w-320",
|
|
14063
|
-
"dont-change-data-when-rowmoved": "",
|
|
14064
|
-
"show-move-button": "",
|
|
14065
|
-
onRowMoved: rowMoved
|
|
14066
|
-
}, null, 8, ["expandedRows", "selectedRows", "data", "key-provider"])
|
|
14067
|
-
], 512)
|
|
14068
|
-
]),
|
|
14069
|
-
pageL: withCtx(() => [
|
|
14070
|
-
createElementVNode("div", {
|
|
14071
|
-
ref_key: "treeL",
|
|
14072
|
-
ref: treeL,
|
|
14073
|
-
class: "pb-navigator",
|
|
14074
|
-
tabindex: "0"
|
|
14075
|
-
}, [
|
|
14076
|
-
createVNode(unref(BSTree), {
|
|
14077
|
-
expandedRows: expandedRows.value,
|
|
14078
|
-
"onUpdate:expandedRows": [
|
|
14079
|
-
_cache[2] || (_cache[2] = ($event) => expandedRows.value = $event),
|
|
14080
|
-
expandedRowsChanged
|
|
14081
|
-
],
|
|
14082
|
-
selectedRows: selectedRows.value,
|
|
14083
|
-
"onUpdate:selectedRows": [
|
|
14084
|
-
_cache[3] || (_cache[3] = ($event) => selectedRows.value = $event),
|
|
14085
|
-
selectedRowsChanged
|
|
14086
|
-
],
|
|
14087
|
-
data: pageL.value,
|
|
14088
|
-
"enable-drag-and-drop": treeDragAndDropPolicy,
|
|
14089
|
-
"icon-provider": iconProvider,
|
|
14090
|
-
"key-provider": (part) => part.partId,
|
|
14091
|
-
"label-provider": labelProvider,
|
|
14092
|
-
class: "max-w-320",
|
|
14093
|
-
"dont-change-data-when-rowmoved": "",
|
|
14094
|
-
"show-move-button": "",
|
|
14095
|
-
onRowMoved: rowMoved
|
|
14096
|
-
}, null, 8, ["expandedRows", "selectedRows", "data", "key-provider"])
|
|
14097
|
-
], 512)
|
|
14098
|
-
]),
|
|
14099
|
-
_: 1
|
|
14100
|
-
}, 8, ["tab-id"])) : (openBlock(), createElementBlock("div", _hoisted_1$4, [
|
|
14064
|
+
return openBlock(), createElementBlock("div", _hoisted_1$4, [
|
|
14101
14065
|
createElementVNode("div", {
|
|
14102
|
-
ref_key: "
|
|
14103
|
-
ref:
|
|
14066
|
+
ref_key: "tree",
|
|
14067
|
+
ref: tree,
|
|
14104
14068
|
class: "pb-navigator",
|
|
14105
14069
|
tabindex: "0"
|
|
14106
14070
|
}, [
|
|
14107
14071
|
createVNode(unref(BSTree), {
|
|
14108
14072
|
expandedRows: expandedRows.value,
|
|
14109
14073
|
"onUpdate:expandedRows": [
|
|
14110
|
-
_cache[
|
|
14074
|
+
_cache[0] || (_cache[0] = ($event) => expandedRows.value = $event),
|
|
14111
14075
|
expandedRowsChanged
|
|
14112
14076
|
],
|
|
14113
14077
|
selectedRows: selectedRows.value,
|
|
14114
14078
|
"onUpdate:selectedRows": [
|
|
14115
|
-
_cache[
|
|
14079
|
+
_cache[1] || (_cache[1] = ($event) => selectedRows.value = $event),
|
|
14116
14080
|
selectedRowsChanged
|
|
14117
14081
|
],
|
|
14118
|
-
data:
|
|
14082
|
+
data: page.value,
|
|
14119
14083
|
"enable-drag-and-drop": treeDragAndDropPolicy,
|
|
14120
14084
|
"icon-provider": iconProvider,
|
|
14121
14085
|
"key-provider": (part) => part.partId,
|
|
@@ -14126,7 +14090,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
14126
14090
|
onRowMoved: rowMoved
|
|
14127
14091
|
}, null, 8, ["expandedRows", "selectedRows", "data", "key-provider"])
|
|
14128
14092
|
], 512)
|
|
14129
|
-
])
|
|
14093
|
+
]);
|
|
14130
14094
|
};
|
|
14131
14095
|
}
|
|
14132
14096
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B, b, M, c, d, e, _, a, f, g, h, i, j, k, l, R, m, S, n, W, o, p, q, r, s, t, v, x } from "./index-
|
|
1
|
+
import { B, b, M, c, d, e, _, a, f, g, h, i, j, k, l, R, m, S, n, W, o, p, q, r, s, t, v, x } from "./index-Cr-_-n9T.js";
|
|
2
2
|
export {
|
|
3
3
|
B as BLOCK_TYPE,
|
|
4
4
|
b as Block,
|
|
@@ -6780,8 +6780,6 @@ var __publicField = (obj, key, value) => {
|
|
|
6780
6780
|
class RootPart extends Part {
|
|
6781
6781
|
constructor() {
|
|
6782
6782
|
super();
|
|
6783
|
-
__publicField2(this, "language");
|
|
6784
|
-
this.language = "en";
|
|
6785
6783
|
this.partType = ROOT_TYPE$1;
|
|
6786
6784
|
this.partName = ROOT_TYPE$1;
|
|
6787
6785
|
}
|
|
@@ -7057,8 +7055,8 @@ var __publicField = (obj, key, value) => {
|
|
|
7057
7055
|
return;
|
|
7058
7056
|
if (typeof html2 !== "object")
|
|
7059
7057
|
return;
|
|
7060
|
-
const
|
|
7061
|
-
let _html = html2[
|
|
7058
|
+
const locale = pageBuilder.locale.value;
|
|
7059
|
+
let _html = html2[locale];
|
|
7062
7060
|
if (!_html && html2.tags) {
|
|
7063
7061
|
_html = html2;
|
|
7064
7062
|
}
|
|
@@ -7346,18 +7344,23 @@ ${_html.style}
|
|
|
7346
7344
|
props: {
|
|
7347
7345
|
pageContent: {},
|
|
7348
7346
|
isMobilePage: { type: Boolean },
|
|
7349
|
-
|
|
7347
|
+
locale: {},
|
|
7350
7348
|
plugin: {}
|
|
7351
7349
|
},
|
|
7352
7350
|
setup(__props) {
|
|
7353
7351
|
const props = __props;
|
|
7354
7352
|
const pageBuilderViewer = createPageBuilderViewer();
|
|
7355
|
-
pageBuilderViewer.setLocale(props.
|
|
7353
|
+
pageBuilderViewer.setLocale(props.locale);
|
|
7356
7354
|
if (props.plugin)
|
|
7357
7355
|
pageBuilderViewer.registerCustomPlugin(props.plugin);
|
|
7358
7356
|
providePageBuilderViewer(pageBuilderViewer);
|
|
7359
7357
|
providePageBuilder(pageBuilderViewer);
|
|
7360
|
-
const page = vue.computed(() =>
|
|
7358
|
+
const page = vue.computed(() => {
|
|
7359
|
+
const pages = pageBuilderViewer.model.rootPart.value.children;
|
|
7360
|
+
if (!pages || !pages.length)
|
|
7361
|
+
return;
|
|
7362
|
+
return pages[pages.length === 1 || props.isMobilePage ? 0 : 1];
|
|
7363
|
+
});
|
|
7361
7364
|
vue.onMounted(() => {
|
|
7362
7365
|
if (props.pageContent) {
|
|
7363
7366
|
pageBuilderViewer.render(props.pageContent);
|
|
@@ -11883,6 +11886,23 @@ ${_html.style}
|
|
|
11883
11886
|
const defaultWidgetPropertyGroups = () => {
|
|
11884
11887
|
return [positionGroup(), sizeGroup(), marginGroup(), paddingGroup(), borderGroup(), backgroundGroup(), commonGroup()];
|
|
11885
11888
|
};
|
|
11889
|
+
const pageParts = [
|
|
11890
|
+
{
|
|
11891
|
+
partType: "Page",
|
|
11892
|
+
partName: "Page",
|
|
11893
|
+
caption: "Page",
|
|
11894
|
+
icon: "draft",
|
|
11895
|
+
propertyGroups: [
|
|
11896
|
+
paddingGroup(),
|
|
11897
|
+
backgroundGroup(),
|
|
11898
|
+
commonGroup()
|
|
11899
|
+
],
|
|
11900
|
+
initialProperties: {},
|
|
11901
|
+
localized: false,
|
|
11902
|
+
allowsChild: () => true,
|
|
11903
|
+
creator: () => _sfc_main$u
|
|
11904
|
+
}
|
|
11905
|
+
];
|
|
11886
11906
|
const sectionParts = [
|
|
11887
11907
|
{
|
|
11888
11908
|
partType: "Section",
|
|
@@ -12041,13 +12061,16 @@ ${_html.style}
|
|
|
12041
12061
|
}
|
|
12042
12062
|
];
|
|
12043
12063
|
const partDefinitions = {};
|
|
12044
|
-
for (
|
|
12064
|
+
for (const part of pageParts) {
|
|
12065
|
+
partDefinitions[part.partName] = part;
|
|
12066
|
+
}
|
|
12067
|
+
for (const part of sectionParts) {
|
|
12045
12068
|
partDefinitions[part.partName] = part;
|
|
12046
12069
|
}
|
|
12047
|
-
for (
|
|
12070
|
+
for (const part of blockParts) {
|
|
12048
12071
|
partDefinitions[part.partName] = part;
|
|
12049
12072
|
}
|
|
12050
|
-
for (
|
|
12073
|
+
for (const part of widgets) {
|
|
12051
12074
|
partDefinitions[part.partName] = part;
|
|
12052
12075
|
}
|
|
12053
12076
|
[
|
|
@@ -13098,7 +13121,11 @@ ${_html.style}
|
|
|
13098
13121
|
}
|
|
13099
13122
|
setSelection(parts) {
|
|
13100
13123
|
this.selection.splice(0, this.selection.length);
|
|
13101
|
-
parts
|
|
13124
|
+
if (parts && parts.length) {
|
|
13125
|
+
parts.forEach((part) => this.selection.push(part));
|
|
13126
|
+
} else if (this.model.rootPart.children && this.model.rootPart.children.length) {
|
|
13127
|
+
this.selection.push(this.model.rootPart.children[0]);
|
|
13128
|
+
}
|
|
13102
13129
|
}
|
|
13103
13130
|
addSelection(parts) {
|
|
13104
13131
|
parts.forEach((part) => this.selection.push(part));
|
|
@@ -13347,7 +13374,6 @@ ${_html.style}
|
|
|
13347
13374
|
}
|
|
13348
13375
|
}
|
|
13349
13376
|
initData(data) {
|
|
13350
|
-
this.model.rootPart.language = this.locale.value;
|
|
13351
13377
|
const _data = JSON.parse(data || "{}") || {};
|
|
13352
13378
|
let rootPart = partFromJsonObject(_data, true);
|
|
13353
13379
|
if (!rootPart)
|
|
@@ -13355,6 +13381,21 @@ ${_html.style}
|
|
|
13355
13381
|
let parts = rootPart.children;
|
|
13356
13382
|
if (!parts)
|
|
13357
13383
|
parts = [this.getEmptyPageContent(), this.getEmptyPageContent()];
|
|
13384
|
+
if (parts.length === 1) {
|
|
13385
|
+
parts[0].properties = {
|
|
13386
|
+
...parts[0].properties || {},
|
|
13387
|
+
name: "Page"
|
|
13388
|
+
};
|
|
13389
|
+
} else if (parts.length === 2) {
|
|
13390
|
+
parts[0].properties = {
|
|
13391
|
+
...parts[0].properties || {},
|
|
13392
|
+
name: "Page (Mobile)"
|
|
13393
|
+
};
|
|
13394
|
+
parts[1].properties = {
|
|
13395
|
+
...parts[0].properties || {},
|
|
13396
|
+
name: "Page (PC)"
|
|
13397
|
+
};
|
|
13398
|
+
}
|
|
13358
13399
|
let partIdsToDelete = void 0;
|
|
13359
13400
|
if (this.model.rootPart.children && this.model.rootPart.children.length) {
|
|
13360
13401
|
partIdsToDelete = this.model.rootPart.children.map((v) => v.partId);
|
|
@@ -13387,9 +13428,18 @@ ${_html.style}
|
|
|
13387
13428
|
const screenCount = ((_a = this.model.rootPart.children) == null ? void 0 : _a.length) || 0;
|
|
13388
13429
|
if (screenCount !== 2)
|
|
13389
13430
|
return;
|
|
13390
|
-
const
|
|
13431
|
+
const remaining = this.model.rootPart.children[screenToKeep === 0 ? 0 : 1];
|
|
13432
|
+
const deleting = this.model.rootPart.children[screenToKeep === 0 ? 1 : 0];
|
|
13391
13433
|
this.model.updateModel({
|
|
13392
|
-
delete: [
|
|
13434
|
+
delete: [deleting.partId],
|
|
13435
|
+
update: [
|
|
13436
|
+
{
|
|
13437
|
+
partId: remaining.partId,
|
|
13438
|
+
properties: {
|
|
13439
|
+
name: "Page"
|
|
13440
|
+
}
|
|
13441
|
+
}
|
|
13442
|
+
]
|
|
13393
13443
|
});
|
|
13394
13444
|
}
|
|
13395
13445
|
makeMultipleScreen() {
|
|
@@ -13404,6 +13454,10 @@ ${_html.style}
|
|
|
13404
13454
|
const copied = this.model.parseParts(json);
|
|
13405
13455
|
if (!copied)
|
|
13406
13456
|
return;
|
|
13457
|
+
copied[0].properties = {
|
|
13458
|
+
...copied[0].properties || {},
|
|
13459
|
+
name: "Page (PC)"
|
|
13460
|
+
};
|
|
13407
13461
|
this.model.updateModel({
|
|
13408
13462
|
insert: [
|
|
13409
13463
|
{
|
|
@@ -13411,6 +13465,14 @@ ${_html.style}
|
|
|
13411
13465
|
index: 1,
|
|
13412
13466
|
parts: copied
|
|
13413
13467
|
}
|
|
13468
|
+
],
|
|
13469
|
+
update: [
|
|
13470
|
+
{
|
|
13471
|
+
partId: part.partId,
|
|
13472
|
+
properties: {
|
|
13473
|
+
name: "Page (Mobile)"
|
|
13474
|
+
}
|
|
13475
|
+
}
|
|
13414
13476
|
]
|
|
13415
13477
|
});
|
|
13416
13478
|
}
|
|
@@ -13552,7 +13614,11 @@ ${_html.style}
|
|
|
13552
13614
|
minHeight: ((_b = (_a = props.page) == null ? void 0 : _a.children) == null ? void 0 : _b.length) ? void 0 : "200px"
|
|
13553
13615
|
};
|
|
13554
13616
|
});
|
|
13555
|
-
const
|
|
13617
|
+
const properties = vue.computed(() => {
|
|
13618
|
+
var _a;
|
|
13619
|
+
return { style: ((_a = props.page) == null ? void 0 : _a.getStyles()) || {} };
|
|
13620
|
+
});
|
|
13621
|
+
const selected = vue.computed(() => !!props.page && editor.context.isSelected(props.page));
|
|
13556
13622
|
const insertSection = (index) => {
|
|
13557
13623
|
if (!props.page)
|
|
13558
13624
|
return;
|
|
@@ -13564,16 +13630,16 @@ ${_html.style}
|
|
|
13564
13630
|
style: vue.normalizeStyle(style.value),
|
|
13565
13631
|
class: "pb-page"
|
|
13566
13632
|
}, [
|
|
13567
|
-
vue.createElementVNode("div", {
|
|
13568
|
-
class:
|
|
13569
|
-
}, [
|
|
13633
|
+
vue.createElementVNode("div", vue.mergeProps({
|
|
13634
|
+
class: [selected.value && "selected", _ctx.isMobilePage ? "mobile" : "pc", "pb-page-content"]
|
|
13635
|
+
}, properties.value), [
|
|
13570
13636
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList((_a = _ctx.page) == null ? void 0 : _a.children, (section, index) => {
|
|
13571
13637
|
return vue.openBlock(), vue.createBlock(_sfc_main$u, {
|
|
13572
13638
|
key: section.partId,
|
|
13573
13639
|
part: section
|
|
13574
13640
|
}, null, 8, ["part"]);
|
|
13575
13641
|
}), 128))
|
|
13576
|
-
],
|
|
13642
|
+
], 16),
|
|
13577
13643
|
vue.createElementVNode("div", {
|
|
13578
13644
|
class: "pb-add-section-handle bottom",
|
|
13579
13645
|
onClick: _cache[0] || (_cache[0] = ($event) => {
|
|
@@ -13869,49 +13935,14 @@ ${_html.style}
|
|
|
13869
13935
|
};
|
|
13870
13936
|
}
|
|
13871
13937
|
});
|
|
13872
|
-
const _hoisted_1$e = {
|
|
13873
|
-
key: 1,
|
|
13874
|
-
class: "bs-layout-vertical border"
|
|
13875
|
-
};
|
|
13938
|
+
const _hoisted_1$e = { class: "bs-layout-vertical border" };
|
|
13876
13939
|
const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
13877
13940
|
__name: "PbNavigator",
|
|
13878
13941
|
setup(__props) {
|
|
13879
13942
|
const pageBuilder = usePageBuilderEditor();
|
|
13880
|
-
const
|
|
13881
|
-
|
|
13882
|
-
vue.
|
|
13883
|
-
() => treeS.value,
|
|
13884
|
-
() => treeS.value && pageBuilder.keyHandlers.addDocumentKeyEventListener(treeS.value)
|
|
13885
|
-
);
|
|
13886
|
-
vue.watch(
|
|
13887
|
-
() => treeL.value,
|
|
13888
|
-
() => treeL.value && pageBuilder.keyHandlers.addDocumentKeyEventListener(treeL.value)
|
|
13889
|
-
);
|
|
13890
|
-
const tabs = [
|
|
13891
|
-
{ tabId: "pageS", caption: "Mobile", icon: "phone_iphone" },
|
|
13892
|
-
{ tabId: "pageL", caption: "PC", icon: "desktop_windows" }
|
|
13893
|
-
];
|
|
13894
|
-
const isMultipleScreen = vue.computed(() => {
|
|
13895
|
-
var _a;
|
|
13896
|
-
return (((_a = pageBuilder.model.rootPart.children) == null ? void 0 : _a.length) || 0) >= 2;
|
|
13897
|
-
});
|
|
13898
|
-
const pageS = vue.computed(() => {
|
|
13899
|
-
var _a;
|
|
13900
|
-
return ((_a = (pageBuilder.model.rootPart.children || [])[0]) == null ? void 0 : _a.children) || [];
|
|
13901
|
-
});
|
|
13902
|
-
const pageL = vue.computed(() => {
|
|
13903
|
-
var _a;
|
|
13904
|
-
return ((_a = (pageBuilder.model.rootPart.children || [])[1]) == null ? void 0 : _a.children) || [];
|
|
13905
|
-
});
|
|
13906
|
-
const tabId = vue.computed({
|
|
13907
|
-
get() {
|
|
13908
|
-
const page = pageBuilder.context.getSelectedPage();
|
|
13909
|
-
return page === (pageBuilder.model.rootPart.children || [])[1] ? "pageL" : "pageS";
|
|
13910
|
-
},
|
|
13911
|
-
// @ts-ignore
|
|
13912
|
-
set(value) {
|
|
13913
|
-
}
|
|
13914
|
-
});
|
|
13943
|
+
const tree = vue.ref();
|
|
13944
|
+
vue.watch(() => tree.value, () => tree.value && pageBuilder.keyHandlers.addDocumentKeyEventListener(tree.value));
|
|
13945
|
+
const page = vue.computed(() => pageBuilder.model.rootPart.children || []);
|
|
13915
13946
|
let savedPartSelection = null;
|
|
13916
13947
|
const treeDragAndDropPolicy = {
|
|
13917
13948
|
dropStep: () => 3,
|
|
@@ -13945,8 +13976,8 @@ ${_html.style}
|
|
|
13945
13976
|
};
|
|
13946
13977
|
const rowMoved = (event) => {
|
|
13947
13978
|
var _a, _b, _c, _d, _e, _f;
|
|
13948
|
-
let
|
|
13949
|
-
const parentPartId = ((_a = event.destParent) == null ? void 0 : _a.partId) || (
|
|
13979
|
+
let page2 = pageBuilder.context.getSelectedPage();
|
|
13980
|
+
const parentPartId = ((_a = event.destParent) == null ? void 0 : _a.partId) || (page2 == null ? void 0 : page2.partId);
|
|
13950
13981
|
if (!parentPartId)
|
|
13951
13982
|
return;
|
|
13952
13983
|
let ok = false;
|
|
@@ -14032,92 +14063,25 @@ ${_html.style}
|
|
|
14032
14063
|
PageBuilderEditorEvent.off.modelUpdatedByUI(modelUpdateHandler);
|
|
14033
14064
|
});
|
|
14034
14065
|
return (_ctx, _cache) => {
|
|
14035
|
-
return
|
|
14036
|
-
key: 0,
|
|
14037
|
-
"tab-id": tabId.value,
|
|
14038
|
-
"onUpdate:tabId": _cache[4] || (_cache[4] = ($event) => tabId.value = $event),
|
|
14039
|
-
tabs
|
|
14040
|
-
}, {
|
|
14041
|
-
pageS: vue.withCtx(() => [
|
|
14042
|
-
vue.createElementVNode("div", {
|
|
14043
|
-
ref_key: "treeS",
|
|
14044
|
-
ref: treeS,
|
|
14045
|
-
class: "pb-navigator",
|
|
14046
|
-
tabindex: "0"
|
|
14047
|
-
}, [
|
|
14048
|
-
vue.createVNode(vue.unref(bluesea.BSTree), {
|
|
14049
|
-
expandedRows: expandedRows.value,
|
|
14050
|
-
"onUpdate:expandedRows": [
|
|
14051
|
-
_cache[0] || (_cache[0] = ($event) => expandedRows.value = $event),
|
|
14052
|
-
expandedRowsChanged
|
|
14053
|
-
],
|
|
14054
|
-
selectedRows: selectedRows.value,
|
|
14055
|
-
"onUpdate:selectedRows": [
|
|
14056
|
-
_cache[1] || (_cache[1] = ($event) => selectedRows.value = $event),
|
|
14057
|
-
selectedRowsChanged
|
|
14058
|
-
],
|
|
14059
|
-
data: pageS.value,
|
|
14060
|
-
"enable-drag-and-drop": treeDragAndDropPolicy,
|
|
14061
|
-
"icon-provider": iconProvider,
|
|
14062
|
-
"key-provider": (part) => part.partId,
|
|
14063
|
-
"label-provider": labelProvider,
|
|
14064
|
-
class: "max-w-320",
|
|
14065
|
-
"dont-change-data-when-rowmoved": "",
|
|
14066
|
-
"show-move-button": "",
|
|
14067
|
-
onRowMoved: rowMoved
|
|
14068
|
-
}, null, 8, ["expandedRows", "selectedRows", "data", "key-provider"])
|
|
14069
|
-
], 512)
|
|
14070
|
-
]),
|
|
14071
|
-
pageL: vue.withCtx(() => [
|
|
14072
|
-
vue.createElementVNode("div", {
|
|
14073
|
-
ref_key: "treeL",
|
|
14074
|
-
ref: treeL,
|
|
14075
|
-
class: "pb-navigator",
|
|
14076
|
-
tabindex: "0"
|
|
14077
|
-
}, [
|
|
14078
|
-
vue.createVNode(vue.unref(bluesea.BSTree), {
|
|
14079
|
-
expandedRows: expandedRows.value,
|
|
14080
|
-
"onUpdate:expandedRows": [
|
|
14081
|
-
_cache[2] || (_cache[2] = ($event) => expandedRows.value = $event),
|
|
14082
|
-
expandedRowsChanged
|
|
14083
|
-
],
|
|
14084
|
-
selectedRows: selectedRows.value,
|
|
14085
|
-
"onUpdate:selectedRows": [
|
|
14086
|
-
_cache[3] || (_cache[3] = ($event) => selectedRows.value = $event),
|
|
14087
|
-
selectedRowsChanged
|
|
14088
|
-
],
|
|
14089
|
-
data: pageL.value,
|
|
14090
|
-
"enable-drag-and-drop": treeDragAndDropPolicy,
|
|
14091
|
-
"icon-provider": iconProvider,
|
|
14092
|
-
"key-provider": (part) => part.partId,
|
|
14093
|
-
"label-provider": labelProvider,
|
|
14094
|
-
class: "max-w-320",
|
|
14095
|
-
"dont-change-data-when-rowmoved": "",
|
|
14096
|
-
"show-move-button": "",
|
|
14097
|
-
onRowMoved: rowMoved
|
|
14098
|
-
}, null, 8, ["expandedRows", "selectedRows", "data", "key-provider"])
|
|
14099
|
-
], 512)
|
|
14100
|
-
]),
|
|
14101
|
-
_: 1
|
|
14102
|
-
}, 8, ["tab-id"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$e, [
|
|
14066
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$e, [
|
|
14103
14067
|
vue.createElementVNode("div", {
|
|
14104
|
-
ref_key: "
|
|
14105
|
-
ref:
|
|
14068
|
+
ref_key: "tree",
|
|
14069
|
+
ref: tree,
|
|
14106
14070
|
class: "pb-navigator",
|
|
14107
14071
|
tabindex: "0"
|
|
14108
14072
|
}, [
|
|
14109
14073
|
vue.createVNode(vue.unref(bluesea.BSTree), {
|
|
14110
14074
|
expandedRows: expandedRows.value,
|
|
14111
14075
|
"onUpdate:expandedRows": [
|
|
14112
|
-
_cache[
|
|
14076
|
+
_cache[0] || (_cache[0] = ($event) => expandedRows.value = $event),
|
|
14113
14077
|
expandedRowsChanged
|
|
14114
14078
|
],
|
|
14115
14079
|
selectedRows: selectedRows.value,
|
|
14116
14080
|
"onUpdate:selectedRows": [
|
|
14117
|
-
_cache[
|
|
14081
|
+
_cache[1] || (_cache[1] = ($event) => selectedRows.value = $event),
|
|
14118
14082
|
selectedRowsChanged
|
|
14119
14083
|
],
|
|
14120
|
-
data:
|
|
14084
|
+
data: page.value,
|
|
14121
14085
|
"enable-drag-and-drop": treeDragAndDropPolicy,
|
|
14122
14086
|
"icon-provider": iconProvider,
|
|
14123
14087
|
"key-provider": (part) => part.partId,
|
|
@@ -14128,7 +14092,7 @@ ${_html.style}
|
|
|
14128
14092
|
onRowMoved: rowMoved
|
|
14129
14093
|
}, null, 8, ["expandedRows", "selectedRows", "data", "key-provider"])
|
|
14130
14094
|
], 512)
|
|
14131
|
-
])
|
|
14095
|
+
]);
|
|
14132
14096
|
};
|
|
14133
14097
|
}
|
|
14134
14098
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@g1cloud/page-builder-editor",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.0-alpha.
|
|
4
|
+
"version": "1.0.0-alpha.21",
|
|
5
5
|
"engins": {
|
|
6
6
|
"node": ">= 20.0.0"
|
|
7
7
|
},
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"vue-router": "^4.3.2",
|
|
29
29
|
"vue3-click-away": "^1.2.4",
|
|
30
30
|
"yjs": "^13.6.14",
|
|
31
|
-
"@g1cloud/page-builder-viewer": "1.0.0-alpha.
|
|
31
|
+
"@g1cloud/page-builder-viewer": "1.0.0-alpha.21"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/node": "^20.12.7",
|