@g1cloud/page-builder-editor 1.0.0-alpha.4 → 1.0.0-alpha.40
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 +16 -137
- package/css/{canvas-block.scss → page-block.scss} +15 -3
- package/css/page-builder-editor.scss +95 -22
- package/css/{canvas-page.scss → page-page.scss} +24 -16
- package/css/{canvas-section.scss → page-section.scss} +17 -3
- package/css/{canvas-widget.scss → page-widget.scss} +22 -3
- package/css/page.scss +74 -0
- package/css/property-editor-color.scss +5 -0
- package/css/property-editor-html.scss +16 -0
- package/css/property-editor-image.scss +1 -1
- package/css/property-editor-number.scss +10 -0
- package/css/property-editor-youtube.scss +16 -0
- package/css/property-group-editor-background.scss +1 -13
- package/css/property-group-editor-border.scss +6 -12
- package/css/property-group-editor-margin.scss +0 -11
- package/css/property-group-editor-padding.scss +0 -11
- package/css/property-group-editor-position.scss +0 -11
- package/css/property-group-editor-size.scss +0 -11
- package/css/property-localpart.scss +2 -2
- package/dist/PageBuilderEditor.vue.d.ts +15 -11
- package/dist/PbHtmlEditorModal-dDR38rNy.js +187 -0
- package/dist/PbPropertyEditorBoolean-C7-iSAtn.js +38 -0
- package/dist/PbPropertyEditorColor-CxzuXdSU.js +57 -0
- package/dist/PbPropertyEditorHtml-CAwd0B2-.js +59 -0
- package/dist/{PbPropertyEditorImage-EuqsavTF.js → PbPropertyEditorImage-BUrb2xHD.js} +9 -9
- package/dist/{PbPropertyEditorMultilineText-CfRbKELF.js → PbPropertyEditorMultilineText-BZHzQltK.js} +26 -24
- package/dist/{PbPropertyEditorText-DNdXl-Tr.js → PbPropertyEditorNumber-TTgo0zbQ.js} +15 -8
- package/dist/{PbPropertyEditorReadonlyText-Bk0WJxA0.js → PbPropertyEditorReadonlyText-Dgp_AVOD.js} +1 -1
- package/dist/{PbPropertyEditorSelect-BJovN1su.js → PbPropertyEditorSelect-CWedbXJI.js} +1 -1
- package/dist/PbPropertyEditorText-6sglUVrs.js +51 -0
- package/dist/PbPropertyEditorYoutube-D4YwWYvB.js +39 -0
- package/dist/PbScreenSelectModal-CnI1IsvW.js +66 -0
- package/dist/PbWidgetAddModal-B1D1-muE.js +80 -0
- package/dist/PbYoutubeModal-8vQ_IPA0.js +68 -0
- package/dist/components/canvas/PbCanvas.vue.d.ts +1 -1
- package/dist/components/depart/PbLoginDepart.vue.d.ts +3 -3
- package/dist/components/menu/PbMenu.vue.d.ts +16 -1
- package/dist/components/menu/PbToolbar.vue.d.ts +16 -1
- package/dist/components/menu/PbToolbarButton.vue.d.ts +3 -3
- package/dist/components/menu/PbToolbarButtonGroup.vue.d.ts +3 -3
- package/dist/components/modal/PbHtmlEditorModal.vue.d.ts +28 -0
- package/dist/components/modal/PbPartAddModal.vue.d.ts +4 -4
- package/dist/components/modal/PbScreenSelectModal.vue.d.ts +6 -0
- package/dist/components/modal/PbWidgetAddModal.vue.d.ts +4 -4
- package/dist/components/modal/PbYoutubeModal.vue.d.ts +19 -0
- package/dist/components/navigator/PbNavigator.vue.d.ts +1 -1
- package/dist/components/part/PbAddWidgetButton.vue.d.ts +1 -1
- package/dist/components/part/PbBlock.vue.d.ts +7 -3
- package/dist/components/part/PbContainerWidget.vue.d.ts +19 -0
- package/dist/components/part/PbPage.vue.d.ts +5 -5
- package/dist/components/part/PbPageFrame.vue.d.ts +19 -0
- package/dist/components/part/PbSection.vue.d.ts +7 -3
- package/dist/components/part/PbWidget.vue.d.ts +5 -3
- package/dist/components/sidebar/PbSidebar.vue.d.ts +1 -1
- package/dist/components/sidebar/PbSidebarProperties.vue.d.ts +1 -1
- package/dist/components/sidebar/PbSidebarPropertyEditor.vue.d.ts +3 -3
- package/dist/components/sidebar/PbSidebarPropertyGroupEditor.vue.d.ts +3 -3
- package/dist/components/sidebar/property/{PbPropertyEditorProduct.vue.d.ts → PbPropertyEditorBoolean.vue.d.ts} +4 -4
- package/dist/components/sidebar/property/{PbPropertyLocalMarketingPart.vue.d.ts → PbPropertyEditorColor.vue.d.ts} +9 -9
- package/dist/components/sidebar/property/PbPropertyEditorHtml.vue.d.ts +23 -0
- package/dist/components/sidebar/property/PbPropertyEditorImage.vue.d.ts +7 -6
- package/dist/components/sidebar/property/PbPropertyEditorMultilineText.vue.d.ts +7 -6
- package/dist/components/sidebar/property/PbPropertyEditorNumber.vue.d.ts +23 -0
- package/dist/components/sidebar/property/PbPropertyEditorReadonlyText.vue.d.ts +3 -3
- package/dist/components/sidebar/property/PbPropertyEditorSelect.vue.d.ts +4 -4
- package/dist/components/sidebar/property/PbPropertyEditorText.vue.d.ts +9 -8
- package/dist/components/sidebar/property/PbPropertyEditorYoutube.vue.d.ts +23 -0
- package/dist/components/sidebar/property/PbPropertyGroupEditorBackground.vue.d.ts +3 -3
- package/dist/components/sidebar/property/PbPropertyGroupEditorBorder.vue.d.ts +3 -3
- package/dist/components/sidebar/property/PbPropertyGroupEditorMargin.vue.d.ts +3 -3
- package/dist/components/sidebar/property/PbPropertyGroupEditorPadding.vue.d.ts +3 -3
- package/dist/components/sidebar/property/PbPropertyGroupEditorPosition.vue.d.ts +3 -3
- package/dist/components/sidebar/property/PbPropertyGroupEditorSize.vue.d.ts +3 -3
- package/dist/components/ui/PbColorPicker.vue.d.ts +21 -8
- package/dist/directives/vPartHandler.d.ts +1 -0
- package/dist/{index-Mob7K7vK.js → index-CujMrKaK.js} +2777 -2065
- package/dist/index.d.ts +5 -0
- package/dist/model/command.d.ts +26 -13
- package/dist/model/context.d.ts +22 -25
- package/dist/model/default-part-property-group.d.ts +3 -0
- package/dist/model/event.d.ts +0 -56
- package/dist/model/model.d.ts +9 -5
- package/dist/model/page-builder-editor.d.ts +36 -13
- package/dist/model/page-builder-util.d.ts +2 -0
- package/dist/model/part-definintion.d.ts +3 -2
- package/dist/model/part-manager.d.ts +2 -1
- package/dist/model/part-property.d.ts +2 -3
- package/dist/model/plugin.d.ts +15 -0
- package/dist/page-builder-editor.js +26 -19
- package/dist/page-builder-editor.umd.cjs +3435 -2238
- package/package.json +9 -6
- package/dist/PbPartAddModal-DuLpnV4E.js +0 -50
- package/dist/PbPropertyEditorProduct-COnCyYJl.js +0 -49
- package/dist/PbWidgetAddModal-CQvFYzfU.js +0 -55
- package/dist/components/canvas/PbCanvasFrame.vue.d.ts +0 -2
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.40",
|
|
5
5
|
"engins": {
|
|
6
6
|
"node": ">= 20.0.0"
|
|
7
7
|
},
|
|
@@ -16,18 +16,21 @@
|
|
|
16
16
|
"author": "zag@g1project.net",
|
|
17
17
|
"license": "LicenseRef-LICENSE",
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"@g1cloud/bluesea": "5.0.0-alpha.
|
|
19
|
+
"@g1cloud/bluesea": "5.0.0-alpha.80",
|
|
20
|
+
"vue3-youtube": "^0.1.9"
|
|
20
21
|
},
|
|
21
22
|
"dependencies": {
|
|
22
23
|
"@ckpack/vue-color": "^1.5.0",
|
|
24
|
+
"@ctrl/tinycolor": "^3.6.1",
|
|
23
25
|
"dayjs": "^1.11.11",
|
|
24
26
|
"mitt": "^3.0.1",
|
|
25
27
|
"short-unique-id": "^5.0.3",
|
|
26
|
-
"
|
|
27
|
-
"vue
|
|
28
|
+
"vite-svg-loader": "^5.1.0",
|
|
29
|
+
"vue": "^3.5.3",
|
|
30
|
+
"vue-router": "^4.4.3",
|
|
28
31
|
"vue3-click-away": "^1.2.4",
|
|
29
32
|
"yjs": "^13.6.14",
|
|
30
|
-
"@g1cloud/page-builder-viewer": "1.0.0-alpha.
|
|
33
|
+
"@g1cloud/page-builder-viewer": "1.0.0-alpha.40"
|
|
31
34
|
},
|
|
32
35
|
"devDependencies": {
|
|
33
36
|
"@types/node": "^20.12.7",
|
|
@@ -35,7 +38,7 @@
|
|
|
35
38
|
"jsdom": "^24.0.0",
|
|
36
39
|
"sass": "^1.75.0",
|
|
37
40
|
"typescript": "^5.4.5",
|
|
38
|
-
"vite": "^5.
|
|
41
|
+
"vite": "^5.4.3",
|
|
39
42
|
"vite-plugin-dts": "^3.9.0",
|
|
40
43
|
"vitest": "^1.5.0",
|
|
41
44
|
"vitest-canvas-mock": "^0.3.3",
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { defineComponent, openBlock, createBlock, unref, withCtx, createElementVNode, createElementBlock, Fragment, renderList, toDisplayString } from "vue";
|
|
2
|
-
import { useModalHandle, BSModalFrame } from "@g1cloud/bluesea";
|
|
3
|
-
const _hoisted_1 = { class: "bs-layout-vertical pb-part-add-modal" };
|
|
4
|
-
const _hoisted_2 = { class: "bs-layout-horizontal-wrap ml-16 mb-8 gap-8" };
|
|
5
|
-
const _hoisted_3 = ["onClick", "textContent"];
|
|
6
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
-
__name: "PbPartAddModal",
|
|
8
|
-
props: {
|
|
9
|
-
pageBuilder: {},
|
|
10
|
-
partDefinitionGroups: {}
|
|
11
|
-
},
|
|
12
|
-
emits: ["selectHandler"],
|
|
13
|
-
setup(__props, { emit: __emit }) {
|
|
14
|
-
const emit = __emit;
|
|
15
|
-
const modalHandle = useModalHandle();
|
|
16
|
-
const select = (partDefinition) => {
|
|
17
|
-
emit("selectHandler", partDefinition);
|
|
18
|
-
modalHandle.close();
|
|
19
|
-
};
|
|
20
|
-
return (_ctx, _cache) => {
|
|
21
|
-
return openBlock(), createBlock(unref(BSModalFrame), { title: "Add Design Part" }, {
|
|
22
|
-
default: withCtx(() => [
|
|
23
|
-
createElementVNode("div", _hoisted_1, [
|
|
24
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.partDefinitionGroups, (group) => {
|
|
25
|
-
return openBlock(), createElementBlock("div", {
|
|
26
|
-
key: group.groupName,
|
|
27
|
-
class: "group mb-16"
|
|
28
|
-
}, [
|
|
29
|
-
createElementVNode("div", _hoisted_2, [
|
|
30
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(group.partDefinitions, (part) => {
|
|
31
|
-
return openBlock(), createElementBlock("div", {
|
|
32
|
-
key: part.partName,
|
|
33
|
-
class: "part",
|
|
34
|
-
onClick: ($event) => select(part),
|
|
35
|
-
textContent: toDisplayString(part.caption)
|
|
36
|
-
}, null, 8, _hoisted_3);
|
|
37
|
-
}), 128))
|
|
38
|
-
])
|
|
39
|
-
]);
|
|
40
|
-
}), 128))
|
|
41
|
-
])
|
|
42
|
-
]),
|
|
43
|
-
_: 1
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
export {
|
|
49
|
-
_sfc_main as default
|
|
50
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { defineComponent, openBlock, createElementBlock, createElementVNode, toDisplayString } from "vue";
|
|
2
|
-
import { useModal } from "@g1cloud/bluesea";
|
|
3
|
-
import { u as usePageBuilderEditor, P as PageBuilderEditorEvent } from "./index-Mob7K7vK.js";
|
|
4
|
-
const _hoisted_1 = { class: "property-editor property-editor-product flex-align-center" };
|
|
5
|
-
const _hoisted_2 = { class: "label" };
|
|
6
|
-
const _hoisted_3 = ["textContent"];
|
|
7
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
-
__name: "PbPropertyEditorProduct",
|
|
9
|
-
props: {
|
|
10
|
-
property: {},
|
|
11
|
-
value: {}
|
|
12
|
-
},
|
|
13
|
-
emits: ["update-property-value"],
|
|
14
|
-
setup(__props, { emit: __emit }) {
|
|
15
|
-
const pageBuilder = usePageBuilderEditor();
|
|
16
|
-
useModal();
|
|
17
|
-
const emit = __emit;
|
|
18
|
-
const selectProducts = () => {
|
|
19
|
-
var _a;
|
|
20
|
-
let itemCodes = "";
|
|
21
|
-
const selectedParts = pageBuilder.context.getSelectedParts();
|
|
22
|
-
if (selectedParts && selectedParts.length === 1) {
|
|
23
|
-
itemCodes = ((_a = selectedParts[0].properties) == null ? void 0 : _a.products) || "";
|
|
24
|
-
}
|
|
25
|
-
PageBuilderEditorEvent.emit.requestProducts({
|
|
26
|
-
pageBuilderId: pageBuilder.instanceId,
|
|
27
|
-
itemCodes,
|
|
28
|
-
callback: (products) => {
|
|
29
|
-
emit("update-property-value", { products: products.map((v) => v.itemCode).join(",") });
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
return (_ctx, _cache) => {
|
|
34
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
35
|
-
createElementVNode("div", _hoisted_2, [
|
|
36
|
-
createElementVNode("label", {
|
|
37
|
-
textContent: toDisplayString(_ctx.property.caption)
|
|
38
|
-
}, null, 8, _hoisted_3)
|
|
39
|
-
]),
|
|
40
|
-
createElementVNode("div", null, [
|
|
41
|
-
createElementVNode("button", { onClick: selectProducts }, "Select Product")
|
|
42
|
-
])
|
|
43
|
-
]);
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
export {
|
|
48
|
-
_sfc_main as default
|
|
49
|
-
};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { defineComponent, openBlock, createBlock, unref, withCtx, createElementVNode, createElementBlock, Fragment, renderList, toDisplayString } from "vue";
|
|
2
|
-
import { useModalHandle, BSModalFrame } from "@g1cloud/bluesea";
|
|
3
|
-
const _hoisted_1 = { class: "bs-layout-vertical pb-part-add-modal" };
|
|
4
|
-
const _hoisted_2 = ["textContent"];
|
|
5
|
-
const _hoisted_3 = { class: "bs-layout-horizontal-wrap ml-16 mb-8 gap-8" };
|
|
6
|
-
const _hoisted_4 = ["onClick", "textContent"];
|
|
7
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
-
__name: "PbWidgetAddModal",
|
|
9
|
-
props: {
|
|
10
|
-
pageBuilder: {},
|
|
11
|
-
partDefinitionGroups: {}
|
|
12
|
-
},
|
|
13
|
-
emits: ["selectHandler"],
|
|
14
|
-
setup(__props, { emit: __emit }) {
|
|
15
|
-
const emit = __emit;
|
|
16
|
-
const modalHandle = useModalHandle();
|
|
17
|
-
const select = (partDefinition) => {
|
|
18
|
-
emit("selectHandler", partDefinition);
|
|
19
|
-
modalHandle.close();
|
|
20
|
-
};
|
|
21
|
-
return (_ctx, _cache) => {
|
|
22
|
-
return openBlock(), createBlock(unref(BSModalFrame), { title: "Add Block/Widget" }, {
|
|
23
|
-
default: withCtx(() => [
|
|
24
|
-
createElementVNode("div", _hoisted_1, [
|
|
25
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.partDefinitionGroups, (group) => {
|
|
26
|
-
return openBlock(), createElementBlock("div", {
|
|
27
|
-
key: group.groupName,
|
|
28
|
-
class: "group mb-16"
|
|
29
|
-
}, [
|
|
30
|
-
createElementVNode("div", {
|
|
31
|
-
class: "mb-8",
|
|
32
|
-
textContent: toDisplayString(group.caption)
|
|
33
|
-
}, null, 8, _hoisted_2),
|
|
34
|
-
createElementVNode("div", _hoisted_3, [
|
|
35
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(group.partDefinitions, (part) => {
|
|
36
|
-
return openBlock(), createElementBlock("div", {
|
|
37
|
-
key: part.partName,
|
|
38
|
-
class: "part",
|
|
39
|
-
onClick: ($event) => select(part),
|
|
40
|
-
textContent: toDisplayString(part.caption)
|
|
41
|
-
}, null, 8, _hoisted_4);
|
|
42
|
-
}), 128))
|
|
43
|
-
])
|
|
44
|
-
]);
|
|
45
|
-
}), 128))
|
|
46
|
-
])
|
|
47
|
-
]),
|
|
48
|
-
_: 1
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
export {
|
|
54
|
-
_sfc_main as default
|
|
55
|
-
};
|