@g1cloud/page-builder-editor 1.0.0-alpha.1
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/LICENSE +6 -0
- package/README.md +23 -0
- package/css/bluesea.scss +8244 -0
- package/css/canvas-block.scss +20 -0
- package/css/canvas-page.scss +62 -0
- package/css/canvas-section.scss +51 -0
- package/css/canvas-widget.scss +41 -0
- package/css/canvas.scss +146 -0
- package/css/page-builder-editor.scss +185 -0
- package/css/page-builder-viewer.scss +1 -0
- package/css/property-editor-image.scss +16 -0
- package/css/property-editor-multiline-text.scss +0 -0
- package/css/property-editor-product.scss +17 -0
- package/css/property-editor-readonly-text.scss +0 -0
- package/css/property-editor-select.scss +10 -0
- package/css/property-editor-text.scss +10 -0
- package/css/property-group-editor-background.scss +40 -0
- package/css/property-group-editor-border.scss +25 -0
- package/css/property-group-editor-margin.scss +13 -0
- package/css/property-group-editor-padding.scss +13 -0
- package/css/property-group-editor-position.scss +13 -0
- package/css/property-group-editor-size.scss +13 -0
- package/css/property-localpart.scss +21 -0
- package/css/variable.scss +1 -0
- package/dist/PageBuilderEditor.vue.d.ts +21 -0
- package/dist/PbPartAddModal-DuLpnV4E.js +50 -0
- package/dist/PbPropertyEditorImage-BFIqG-bL.js +42 -0
- package/dist/PbPropertyEditorMultilineText-BMeNUGm8.js +42 -0
- package/dist/PbPropertyEditorProduct--cf9LI2Z.js +49 -0
- package/dist/PbPropertyEditorReadonlyText-Bk0WJxA0.js +31 -0
- package/dist/PbPropertyEditorSelect-BJovN1su.js +44 -0
- package/dist/PbPropertyEditorText-DNdXl-Tr.js +41 -0
- package/dist/PbWidgetAddModal-CQvFYzfU.js +55 -0
- package/dist/components/canvas/PbCanvas.vue.d.ts +2 -0
- package/dist/components/canvas/PbCanvasFrame.vue.d.ts +2 -0
- package/dist/components/depart/PbLoginDepart.vue.d.ts +17 -0
- package/dist/components/menu/PbMenu.vue.d.ts +2 -0
- package/dist/components/menu/PbToolbar.vue.d.ts +2 -0
- package/dist/components/menu/PbToolbarButton.vue.d.ts +17 -0
- package/dist/components/menu/PbToolbarButtonGroup.vue.d.ts +17 -0
- package/dist/components/modal/PbPartAddModal.vue.d.ts +24 -0
- package/dist/components/modal/PbWidgetAddModal.vue.d.ts +24 -0
- package/dist/components/navigator/PbNavigator.vue.d.ts +2 -0
- package/dist/components/part/PbAddWidgetButton.vue.d.ts +2 -0
- package/dist/components/part/PbBlock.vue.d.ts +17 -0
- package/dist/components/part/PbPage.vue.d.ts +21 -0
- package/dist/components/part/PbSection.vue.d.ts +17 -0
- package/dist/components/part/PbWidget.vue.d.ts +17 -0
- package/dist/components/sidebar/PbSidebar.vue.d.ts +2 -0
- package/dist/components/sidebar/PbSidebarProperties.vue.d.ts +2 -0
- package/dist/components/sidebar/PbSidebarPropertyEditor.vue.d.ts +20 -0
- package/dist/components/sidebar/PbSidebarPropertyGroupEditor.vue.d.ts +22 -0
- package/dist/components/sidebar/property/PbPropertyEditorImage.vue.d.ts +23 -0
- package/dist/components/sidebar/property/PbPropertyEditorMultilineText.vue.d.ts +23 -0
- package/dist/components/sidebar/property/PbPropertyEditorProduct.vue.d.ts +23 -0
- package/dist/components/sidebar/property/PbPropertyEditorReadonlyText.vue.d.ts +19 -0
- package/dist/components/sidebar/property/PbPropertyEditorSelect.vue.d.ts +23 -0
- package/dist/components/sidebar/property/PbPropertyEditorText.vue.d.ts +23 -0
- package/dist/components/sidebar/property/PbPropertyGroupEditorBackground.vue.d.ts +20 -0
- package/dist/components/sidebar/property/PbPropertyGroupEditorBorder.vue.d.ts +20 -0
- package/dist/components/sidebar/property/PbPropertyGroupEditorMargin.vue.d.ts +20 -0
- package/dist/components/sidebar/property/PbPropertyGroupEditorPadding.vue.d.ts +20 -0
- package/dist/components/sidebar/property/PbPropertyGroupEditorPosition.vue.d.ts +20 -0
- package/dist/components/sidebar/property/PbPropertyGroupEditorSize.vue.d.ts +20 -0
- package/dist/components/sidebar/property/PbPropertyLocalPart.vue.d.ts +23 -0
- package/dist/components/ui/PbColorPicker.vue.d.ts +24 -0
- package/dist/directives/vPartHandler.d.ts +26 -0
- package/dist/index-BtILenNo.js +13902 -0
- package/dist/index.d.ts +3 -0
- package/dist/model/command.d.ts +188 -0
- package/dist/model/context.d.ts +136 -0
- package/dist/model/default-part-property-editor.d.ts +3 -0
- package/dist/model/default-part-property-group.d.ts +12 -0
- package/dist/model/event.d.ts +71 -0
- package/dist/model/model.d.ts +66 -0
- package/dist/model/page-builder-editor.d.ts +51 -0
- package/dist/model/page-builder-util.d.ts +5 -0
- package/dist/model/part-definintion.d.ts +26 -0
- package/dist/model/part-manager.d.ts +29 -0
- package/dist/model/part-property.d.ts +22 -0
- package/dist/model/plugin.d.ts +15 -0
- package/dist/model/toolbar.d.ts +27 -0
- package/dist/page-builder-editor.js +27 -0
- package/dist/page-builder-editor.umd.cjs +14248 -0
- package/dist/style.css +173 -0
- package/dist/utils/mouse-tracker.d.ts +11 -0
- package/package.json +49 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
.property-editor-local-part {
|
|
2
|
+
|
|
3
|
+
.label {
|
|
4
|
+
font-weight: bold;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
button {
|
|
8
|
+
color: #fff;
|
|
9
|
+
border: none;
|
|
10
|
+
padding: 0 4px;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
line-height: 1;
|
|
13
|
+
//width: 100px;
|
|
14
|
+
height: 24px;
|
|
15
|
+
background-color: #1f8fff;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.input-area {
|
|
19
|
+
height: 24px;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
$color-canvas-frame-bg: #aaa;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
instanceId?: string | undefined;
|
|
3
|
+
title?: string | undefined;
|
|
4
|
+
editMode?: string | undefined;
|
|
5
|
+
pageContent?: any;
|
|
6
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
7
|
+
instanceId?: string | undefined;
|
|
8
|
+
title?: string | undefined;
|
|
9
|
+
editMode?: string | undefined;
|
|
10
|
+
pageContent?: any;
|
|
11
|
+
}>>>, {}, {}>;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
14
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
15
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
16
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
17
|
+
} : {
|
|
18
|
+
type: import('vue').PropType<T[K]>;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
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-BtILenNo.js";
|
|
4
|
+
const _hoisted_1 = { class: "property-editor property-editor-image flex-align-center" };
|
|
5
|
+
const _hoisted_2 = { class: "label" };
|
|
6
|
+
const _hoisted_3 = ["textContent"];
|
|
7
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
+
__name: "PbPropertyEditorImage",
|
|
9
|
+
props: {
|
|
10
|
+
property: {},
|
|
11
|
+
value: {}
|
|
12
|
+
},
|
|
13
|
+
emits: ["update-property-value"],
|
|
14
|
+
setup(__props, { emit: __emit }) {
|
|
15
|
+
useModal();
|
|
16
|
+
const pageBuilder = usePageBuilderEditor();
|
|
17
|
+
const emit = __emit;
|
|
18
|
+
const selectImage = () => {
|
|
19
|
+
PageBuilderEditorEvent.emit.requestImage({
|
|
20
|
+
pageBuilderId: pageBuilder.instanceId,
|
|
21
|
+
callback: (url) => {
|
|
22
|
+
emit("update-property-value", { image: url });
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
return (_ctx, _cache) => {
|
|
27
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
28
|
+
createElementVNode("div", _hoisted_2, [
|
|
29
|
+
createElementVNode("label", {
|
|
30
|
+
textContent: toDisplayString(_ctx.property.caption)
|
|
31
|
+
}, null, 8, _hoisted_3)
|
|
32
|
+
]),
|
|
33
|
+
createElementVNode("div", null, [
|
|
34
|
+
createElementVNode("button", { onClick: selectImage }, "Select Image")
|
|
35
|
+
])
|
|
36
|
+
]);
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
export {
|
|
41
|
+
_sfc_main as default
|
|
42
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
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-BtILenNo.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
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, createElementVNode, toDisplayString } from "vue";
|
|
2
|
+
const _hoisted_1 = { class: "property-editor property-editor-readonly-text" };
|
|
3
|
+
const _hoisted_2 = { class: "label" };
|
|
4
|
+
const _hoisted_3 = ["textContent"];
|
|
5
|
+
const _hoisted_4 = ["textContent"];
|
|
6
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
+
__name: "PbPropertyEditorReadonlyText",
|
|
8
|
+
props: {
|
|
9
|
+
property: {},
|
|
10
|
+
value: {}
|
|
11
|
+
},
|
|
12
|
+
setup(__props) {
|
|
13
|
+
return (_ctx, _cache) => {
|
|
14
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
15
|
+
createElementVNode("div", _hoisted_2, [
|
|
16
|
+
createElementVNode("label", {
|
|
17
|
+
textContent: toDisplayString(_ctx.property.caption)
|
|
18
|
+
}, null, 8, _hoisted_3)
|
|
19
|
+
]),
|
|
20
|
+
createElementVNode("div", null, [
|
|
21
|
+
createElementVNode("div", {
|
|
22
|
+
textContent: toDisplayString(_ctx.value)
|
|
23
|
+
}, null, 8, _hoisted_4)
|
|
24
|
+
])
|
|
25
|
+
]);
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
export {
|
|
30
|
+
_sfc_main as default
|
|
31
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, createElementVNode, toDisplayString, createVNode, unref } from "vue";
|
|
2
|
+
import { BSSelect } from "@g1cloud/bluesea";
|
|
3
|
+
const _hoisted_1 = { class: "property-editor property-editor-select flex-align-center" };
|
|
4
|
+
const _hoisted_2 = { class: "label" };
|
|
5
|
+
const _hoisted_3 = ["textContent"];
|
|
6
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
+
__name: "PbPropertyEditorSelect",
|
|
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 selectItems = computed(() => {
|
|
17
|
+
return (props.property.params || "").split(",");
|
|
18
|
+
});
|
|
19
|
+
const emitUpdatePropertyValue = (value) => {
|
|
20
|
+
const properties = {};
|
|
21
|
+
properties[props.property.propertyName] = value || selectItems.value[0] || "";
|
|
22
|
+
emit("update-property-value", properties);
|
|
23
|
+
};
|
|
24
|
+
return (_ctx, _cache) => {
|
|
25
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
26
|
+
createElementVNode("div", _hoisted_2, [
|
|
27
|
+
createElementVNode("label", {
|
|
28
|
+
textContent: toDisplayString(_ctx.property.caption)
|
|
29
|
+
}, null, 8, _hoisted_3)
|
|
30
|
+
]),
|
|
31
|
+
createElementVNode("div", null, [
|
|
32
|
+
createVNode(unref(BSSelect), {
|
|
33
|
+
items: selectItems.value,
|
|
34
|
+
"model-value": _ctx.value,
|
|
35
|
+
"onUpdate:modelValue": emitUpdatePropertyValue
|
|
36
|
+
}, null, 8, ["items", "model-value"])
|
|
37
|
+
])
|
|
38
|
+
]);
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
export {
|
|
43
|
+
_sfc_main as default
|
|
44
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, createVNode, unref } from "vue";
|
|
2
|
+
import { BSTextInput } from "@g1cloud/bluesea";
|
|
3
|
+
const _hoisted_1 = { class: "property-editor property-editor-text flex-align-center" };
|
|
4
|
+
const _hoisted_2 = { class: "label" };
|
|
5
|
+
const _hoisted_3 = ["textContent"];
|
|
6
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
+
__name: "PbPropertyEditorText",
|
|
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(BSTextInput), {
|
|
30
|
+
"model-value": _ctx.value,
|
|
31
|
+
width: "100%",
|
|
32
|
+
"onUpdate:modelValue": emitUpdatePropertyValue
|
|
33
|
+
}, null, 8, ["model-value"])
|
|
34
|
+
])
|
|
35
|
+
]);
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
export {
|
|
40
|
+
_sfc_main as default
|
|
41
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IPart } from '@g1cloud/page-builder-viewer';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
4
|
+
part: IPart;
|
|
5
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
6
|
+
part: IPart;
|
|
7
|
+
}>>>, {}, {}>;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
10
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
11
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
12
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
13
|
+
} : {
|
|
14
|
+
type: import('vue').PropType<T[K]>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ToolButton } from '../../model/toolbar.ts';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
4
|
+
button: ToolButton;
|
|
5
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
6
|
+
button: ToolButton;
|
|
7
|
+
}>>>, {}, {}>;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
10
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
11
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
12
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
13
|
+
} : {
|
|
14
|
+
type: import('vue').PropType<T[K]>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ToolButtonGroup } from '../../model/toolbar.ts';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
4
|
+
group: ToolButtonGroup;
|
|
5
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
6
|
+
group: ToolButtonGroup;
|
|
7
|
+
}>>>, {}, {}>;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
10
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
11
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
12
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
13
|
+
} : {
|
|
14
|
+
type: import('vue').PropType<T[K]>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { PartDefinition, PartDefinitionGroup } from '../../model/part-definintion.ts';
|
|
2
|
+
import { PageBuilderEditor } from '../../model/page-builder-editor.ts';
|
|
3
|
+
|
|
4
|
+
declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
5
|
+
pageBuilder: PageBuilderEditor;
|
|
6
|
+
partDefinitionGroups: PartDefinitionGroup[];
|
|
7
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
+
selectHandler: (partDefinition: PartDefinition) => void;
|
|
9
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
10
|
+
pageBuilder: PageBuilderEditor;
|
|
11
|
+
partDefinitionGroups: PartDefinitionGroup[];
|
|
12
|
+
}>>> & {
|
|
13
|
+
onSelectHandler?: ((partDefinition: PartDefinition) => any) | undefined;
|
|
14
|
+
}, {}, {}>;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
17
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
18
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
19
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
20
|
+
} : {
|
|
21
|
+
type: import('vue').PropType<T[K]>;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { PartDefinition, PartDefinitionGroup } from '../../model/part-definintion.ts';
|
|
2
|
+
import { PageBuilderEditor } from '../../model/page-builder-editor.ts';
|
|
3
|
+
|
|
4
|
+
declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
5
|
+
pageBuilder: PageBuilderEditor;
|
|
6
|
+
partDefinitionGroups: PartDefinitionGroup[];
|
|
7
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
+
selectHandler: (partDefinition: PartDefinition) => void;
|
|
9
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
10
|
+
pageBuilder: PageBuilderEditor;
|
|
11
|
+
partDefinitionGroups: PartDefinitionGroup[];
|
|
12
|
+
}>>> & {
|
|
13
|
+
onSelectHandler?: ((partDefinition: PartDefinition) => any) | undefined;
|
|
14
|
+
}, {}, {}>;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
17
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
18
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
19
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
20
|
+
} : {
|
|
21
|
+
type: import('vue').PropType<T[K]>;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IPart } from '@g1cloud/page-builder-viewer';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
4
|
+
part: IPart;
|
|
5
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
6
|
+
part: IPart;
|
|
7
|
+
}>>>, {}, {}>;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
10
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
11
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
12
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
13
|
+
} : {
|
|
14
|
+
type: import('vue').PropType<T[K]>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IPart } from '@g1cloud/page-builder-viewer';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
4
|
+
page: IPart | undefined;
|
|
5
|
+
width: number;
|
|
6
|
+
isMobilePage: boolean;
|
|
7
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
8
|
+
page: IPart | undefined;
|
|
9
|
+
width: number;
|
|
10
|
+
isMobilePage: boolean;
|
|
11
|
+
}>>>, {}, {}>;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
14
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
15
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
16
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
17
|
+
} : {
|
|
18
|
+
type: import('vue').PropType<T[K]>;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IPart } from '@g1cloud/page-builder-viewer';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
4
|
+
part: IPart;
|
|
5
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
6
|
+
part: IPart;
|
|
7
|
+
}>>>, {}, {}>;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
10
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
11
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
12
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
13
|
+
} : {
|
|
14
|
+
type: import('vue').PropType<T[K]>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IPart } from '@g1cloud/page-builder-viewer';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
4
|
+
part: IPart;
|
|
5
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
6
|
+
part: IPart;
|
|
7
|
+
}>>>, {}, {}>;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
10
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
11
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
12
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
13
|
+
} : {
|
|
14
|
+
type: import('vue').PropType<T[K]>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { PartProperty } from '../../model/part-property.ts';
|
|
2
|
+
import { IPart } from '@g1cloud/page-builder-viewer';
|
|
3
|
+
|
|
4
|
+
declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
5
|
+
property: PartProperty;
|
|
6
|
+
selectedParts: IPart[];
|
|
7
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
8
|
+
property: PartProperty;
|
|
9
|
+
selectedParts: IPart[];
|
|
10
|
+
}>>>, {}, {}>;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
13
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
14
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
15
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
16
|
+
} : {
|
|
17
|
+
type: import('vue').PropType<T[K]>;
|
|
18
|
+
required: true;
|
|
19
|
+
};
|
|
20
|
+
};
|