@g1cloud/page-builder-editor 1.0.0-alpha.2 → 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/css/canvas-block.scss +1 -1
- package/css/canvas-section.scss +1 -1
- package/css/canvas-widget.scss +1 -1
- package/css/canvas.scss +1 -2
- package/css/page-builder-editor.scss +84 -12
- 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-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 +13 -5
- package/dist/PbHtmlEditorModal-aaecwH7V.js +131 -0
- package/dist/PbPropertyEditorColor-BFMkFOYX.js +57 -0
- package/dist/PbPropertyEditorHtml-DZw8qbJH.js +58 -0
- package/dist/{PbPropertyEditorImage-DA92v7AE.js → PbPropertyEditorImage-BQhiQyNM.js} +8 -8
- package/dist/PbPropertyEditorMultilineText-CT3vTbYY.js +67 -0
- package/dist/{PbPropertyEditorReadonlyText-Bk0WJxA0.js → PbPropertyEditorReadonlyText-Dgp_AVOD.js} +1 -1
- package/dist/{PbPropertyEditorSelect-BJovN1su.js → PbPropertyEditorSelect-CWedbXJI.js} +1 -1
- package/dist/{PbPropertyEditorText-DNdXl-Tr.js → PbPropertyEditorText-DmM_LMjC.js} +15 -5
- package/dist/PbScreenSelectModal-DDATc9n1.js +67 -0
- package/dist/{PbWidgetAddModal-CQvFYzfU.js → PbWidgetAddModal-BoYfb0dm.js} +32 -8
- package/dist/components/menu/PbMenu.vue.d.ts +16 -1
- package/dist/components/menu/PbToolbar.vue.d.ts +16 -1
- package/dist/components/modal/PbHtmlEditorModal.vue.d.ts +25 -0
- package/dist/components/modal/PbScreenSelectModal.vue.d.ts +6 -0
- package/dist/components/sidebar/property/{PbPropertyLocalMarketingPart.vue.d.ts → PbPropertyEditorHtml.vue.d.ts} +7 -7
- package/dist/components/sidebar/property/PbPropertyEditorMultilineText.vue.d.ts +6 -4
- package/dist/components/sidebar/property/PbPropertyEditorText.vue.d.ts +5 -4
- package/dist/components/ui/PbColorPicker.vue.d.ts +2 -2
- package/dist/{index-Dwk2ffWe.js → index-Cr-_-n9T.js} +1502 -1167
- package/dist/index.d.ts +1 -0
- package/dist/model/command.d.ts +26 -13
- package/dist/model/context.d.ts +10 -13
- package/dist/model/event.d.ts +0 -56
- package/dist/model/model.d.ts +11 -4
- package/dist/model/page-builder-editor.d.ts +39 -7
- package/dist/model/page-builder-util.d.ts +2 -2
- package/dist/model/part-definintion.d.ts +4 -1
- package/dist/model/part-manager.d.ts +0 -1
- package/dist/model/part-property.d.ts +1 -0
- package/dist/model/plugin.d.ts +10 -0
- package/dist/page-builder-editor.js +23 -19
- package/dist/page-builder-editor.umd.cjs +1910 -1310
- package/package.json +4 -3
- package/dist/PbPartAddModal-DuLpnV4E.js +0 -50
- package/dist/PbPropertyEditorMultilineText-BMeNUGm8.js +0 -42
- package/dist/PbPropertyEditorProduct-CkydxTwD.js +0 -49
- /package/dist/components/sidebar/property/{PbPropertyEditorProduct.vue.d.ts → PbPropertyEditorColor.vue.d.ts} +0 -0
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
|
},
|
|
@@ -16,18 +16,19 @@
|
|
|
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.68"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@ckpack/vue-color": "^1.5.0",
|
|
23
23
|
"dayjs": "^1.11.11",
|
|
24
24
|
"mitt": "^3.0.1",
|
|
25
25
|
"short-unique-id": "^5.0.3",
|
|
26
|
+
"vite-svg-loader": "^5.1.0",
|
|
26
27
|
"vue": "^3.4.26",
|
|
27
28
|
"vue-router": "^4.3.2",
|
|
28
29
|
"vue3-click-away": "^1.2.4",
|
|
29
30
|
"yjs": "^13.6.14",
|
|
30
|
-
"@g1cloud/page-builder-viewer": "1.0.0-alpha.
|
|
31
|
+
"@g1cloud/page-builder-viewer": "1.0.0-alpha.21"
|
|
31
32
|
},
|
|
32
33
|
"devDependencies": {
|
|
33
34
|
"@types/node": "^20.12.7",
|
|
@@ -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,42 +0,0 @@
|
|
|
1
|
-
import { defineComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, createVNode, unref } from "vue";
|
|
2
|
-
import { BSTextArea } from "@g1cloud/bluesea";
|
|
3
|
-
const _hoisted_1 = { class: "property-editor property-editor-multiline-text" };
|
|
4
|
-
const _hoisted_2 = { class: "label" };
|
|
5
|
-
const _hoisted_3 = ["textContent"];
|
|
6
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
-
__name: "PbPropertyEditorMultilineText",
|
|
8
|
-
props: {
|
|
9
|
-
property: {},
|
|
10
|
-
value: {}
|
|
11
|
-
},
|
|
12
|
-
emits: ["update-property-value"],
|
|
13
|
-
setup(__props, { emit: __emit }) {
|
|
14
|
-
const props = __props;
|
|
15
|
-
const emit = __emit;
|
|
16
|
-
const emitUpdatePropertyValue = (value) => {
|
|
17
|
-
const properties = {};
|
|
18
|
-
properties[props.property.propertyName] = value;
|
|
19
|
-
emit("update-property-value", properties);
|
|
20
|
-
};
|
|
21
|
-
return (_ctx, _cache) => {
|
|
22
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
23
|
-
createElementVNode("div", _hoisted_2, [
|
|
24
|
-
createElementVNode("label", {
|
|
25
|
-
textContent: toDisplayString(_ctx.property.caption)
|
|
26
|
-
}, null, 8, _hoisted_3)
|
|
27
|
-
]),
|
|
28
|
-
createElementVNode("div", null, [
|
|
29
|
-
createVNode(unref(BSTextArea), {
|
|
30
|
-
"model-value": _ctx.value,
|
|
31
|
-
height: "60px",
|
|
32
|
-
width: "100%",
|
|
33
|
-
"onUpdate:modelValue": emitUpdatePropertyValue
|
|
34
|
-
}, null, 8, ["model-value"])
|
|
35
|
-
])
|
|
36
|
-
]);
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
export {
|
|
41
|
-
_sfc_main as default
|
|
42
|
-
};
|
|
@@ -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-Dwk2ffWe.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
|
-
};
|
|
File without changes
|