@g1cloud/page-builder-editor 1.0.0-alpha.2 → 1.0.0-alpha.4
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/PageBuilderEditor.vue.d.ts +4 -0
- package/dist/{PbPropertyEditorImage-DA92v7AE.js → PbPropertyEditorImage-EuqsavTF.js} +1 -1
- package/dist/PbPropertyEditorMultilineText-CfRbKELF.js +65 -0
- package/dist/{PbPropertyEditorProduct-CkydxTwD.js → PbPropertyEditorProduct-COnCyYJl.js} +1 -1
- package/dist/components/sidebar/property/PbPropertyEditorMultilineText.vue.d.ts +5 -4
- package/dist/{index-Dwk2ffWe.js → index-Mob7K7vK.js} +167 -67
- package/dist/model/context.d.ts +18 -6
- package/dist/model/model.d.ts +4 -2
- package/dist/model/page-builder-editor.d.ts +8 -0
- package/dist/model/page-builder-util.d.ts +2 -2
- package/dist/page-builder-editor.js +1 -1
- package/dist/page-builder-editor.umd.cjs +190 -68
- package/package.json +3 -3
- package/dist/PbPropertyEditorMultilineText-BMeNUGm8.js +0 -42
|
@@ -3,6 +3,8 @@ declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimePr
|
|
|
3
3
|
title?: string | undefined;
|
|
4
4
|
editMode?: string | undefined;
|
|
5
5
|
pageContent?: any;
|
|
6
|
+
locales?: string[] | undefined;
|
|
7
|
+
language?: string | undefined;
|
|
6
8
|
}>, {
|
|
7
9
|
getLocalDesignPartContent: () => any[] | undefined;
|
|
8
10
|
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
@@ -10,6 +12,8 @@ declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimePr
|
|
|
10
12
|
title?: string | undefined;
|
|
11
13
|
editMode?: string | undefined;
|
|
12
14
|
pageContent?: any;
|
|
15
|
+
locales?: string[] | undefined;
|
|
16
|
+
language?: string | undefined;
|
|
13
17
|
}>>>, {}, {}>;
|
|
14
18
|
export default _default;
|
|
15
19
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createElementBlock, createElementVNode, toDisplayString } from "vue";
|
|
2
2
|
import { useModal } from "@g1cloud/bluesea";
|
|
3
|
-
import { u as usePageBuilderEditor, P as PageBuilderEditorEvent } from "./index-
|
|
3
|
+
import { u as usePageBuilderEditor, P as PageBuilderEditorEvent } from "./index-Mob7K7vK.js";
|
|
4
4
|
const _hoisted_1 = { class: "property-editor property-editor-image flex-align-center" };
|
|
5
5
|
const _hoisted_2 = { class: "label" };
|
|
6
6
|
const _hoisted_3 = ["textContent"];
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, createElementVNode, toDisplayString, createVNode, unref } from "vue";
|
|
2
|
+
import { BSTextArea } from "@g1cloud/bluesea";
|
|
3
|
+
import { u as usePageBuilderEditor } from "./index-Mob7K7vK.js";
|
|
4
|
+
const _hoisted_1 = { class: "property-editor property-editor-multiline-text" };
|
|
5
|
+
const _hoisted_2 = { class: "label" };
|
|
6
|
+
const _hoisted_3 = ["textContent"];
|
|
7
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
+
__name: "PbPropertyEditorMultilineText",
|
|
9
|
+
props: {
|
|
10
|
+
property: {},
|
|
11
|
+
value: {}
|
|
12
|
+
},
|
|
13
|
+
emits: ["update-property-value"],
|
|
14
|
+
setup(__props, { emit: __emit }) {
|
|
15
|
+
const props = __props;
|
|
16
|
+
const emit = __emit;
|
|
17
|
+
const emitUpdatePropertyValue = (value) => {
|
|
18
|
+
const properties = {};
|
|
19
|
+
if (props.value && typeof props.value === "object") {
|
|
20
|
+
properties[props.property.propertyName] = {
|
|
21
|
+
...props.value,
|
|
22
|
+
[language.value]: value
|
|
23
|
+
};
|
|
24
|
+
} else {
|
|
25
|
+
properties[props.property.propertyName] = {
|
|
26
|
+
[language.value]: value
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
emit("update-property-value", properties);
|
|
30
|
+
};
|
|
31
|
+
const pageBuilder = usePageBuilderEditor();
|
|
32
|
+
const language = computed(() => pageBuilder.language.value);
|
|
33
|
+
const text = computed({
|
|
34
|
+
get() {
|
|
35
|
+
return props.value && typeof props.value === "object" ? props.value[language.value] : "";
|
|
36
|
+
},
|
|
37
|
+
set() {
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
return (_ctx, _cache) => {
|
|
41
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
42
|
+
createElementVNode("div", _hoisted_2, [
|
|
43
|
+
createElementVNode("label", {
|
|
44
|
+
textContent: toDisplayString(_ctx.property.caption)
|
|
45
|
+
}, null, 8, _hoisted_3)
|
|
46
|
+
]),
|
|
47
|
+
createElementVNode("div", null, [
|
|
48
|
+
createVNode(unref(BSTextArea), {
|
|
49
|
+
modelValue: text.value,
|
|
50
|
+
"onUpdate:modelValue": [
|
|
51
|
+
_cache[0] || (_cache[0] = ($event) => text.value = $event),
|
|
52
|
+
emitUpdatePropertyValue
|
|
53
|
+
],
|
|
54
|
+
prefix: language.value,
|
|
55
|
+
height: "60px",
|
|
56
|
+
width: "100%"
|
|
57
|
+
}, null, 8, ["modelValue", "prefix"])
|
|
58
|
+
])
|
|
59
|
+
]);
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
export {
|
|
64
|
+
_sfc_main as default
|
|
65
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createElementBlock, createElementVNode, toDisplayString } from "vue";
|
|
2
2
|
import { useModal } from "@g1cloud/bluesea";
|
|
3
|
-
import { u as usePageBuilderEditor, P as PageBuilderEditorEvent } from "./index-
|
|
3
|
+
import { u as usePageBuilderEditor, P as PageBuilderEditorEvent } from "./index-Mob7K7vK.js";
|
|
4
4
|
const _hoisted_1 = { class: "property-editor property-editor-product flex-align-center" };
|
|
5
5
|
const _hoisted_2 = { class: "label" };
|
|
6
6
|
const _hoisted_3 = ["textContent"];
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
+
import { MultiLangText } from '@g1cloud/page-builder-viewer';
|
|
1
2
|
import { PartProperty } from '../../../model/part-property.ts';
|
|
2
3
|
|
|
3
4
|
declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
4
5
|
property: PartProperty;
|
|
5
|
-
value?:
|
|
6
|
+
value?: MultiLangText | undefined;
|
|
6
7
|
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
-
"update-property-value": (properties: Record<string,
|
|
8
|
+
"update-property-value": (properties: Record<string, MultiLangText>) => void;
|
|
8
9
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
9
10
|
property: PartProperty;
|
|
10
|
-
value?:
|
|
11
|
+
value?: MultiLangText | undefined;
|
|
11
12
|
}>>> & {
|
|
12
|
-
"onUpdate-property-value"?: ((properties: Record<string,
|
|
13
|
+
"onUpdate-property-value"?: ((properties: Record<string, MultiLangText>) => any) | undefined;
|
|
13
14
|
}, {}, {}>;
|
|
14
15
|
export default _default;
|
|
15
16
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|