@g1cloud/page-builder-editor 1.0.0-alpha.16 → 1.0.0-alpha.18

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 CHANGED
@@ -114,8 +114,7 @@ body {
114
114
  vertical-align: middle;
115
115
  position: absolute;
116
116
  top: 50%;
117
- // left: 50%;
118
- left: -20px;
117
+ left: 0;
119
118
  font-size: 2rem;
120
119
  transform: translate(-50%, -50%);
121
120
  opacity: 0.2;
@@ -5,7 +5,7 @@
5
5
  padding: 4px 12px;
6
6
  cursor: pointer;
7
7
  line-height: 1;
8
- width: 100px;
8
+ width: 120px;
9
9
  height: 28px;
10
10
  background-color: #1f8fff;
11
11
  }
@@ -20,7 +20,7 @@
20
20
  padding: 4px 12px;
21
21
  cursor: pointer;
22
22
  line-height: 1;
23
- width: 100px;
23
+ width: 120px;
24
24
  height: 28px;
25
25
  background-color: #1f8fff;
26
26
  }
@@ -3,7 +3,6 @@ import { PageBuilderToolbarPlugin } from './model/plugin.ts';
3
3
  declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<{
4
4
  instanceId?: string | undefined;
5
5
  title?: string | undefined;
6
- editMode?: string | undefined;
7
6
  pageContent?: any;
8
7
  locales?: string[] | undefined;
9
8
  locale?: string | undefined;
@@ -14,7 +13,6 @@ declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimePr
14
13
  }, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
15
14
  instanceId?: string | undefined;
16
15
  title?: string | undefined;
17
- editMode?: string | undefined;
18
16
  pageContent?: any;
19
17
  locales?: string[] | undefined;
20
18
  locale?: string | undefined;
@@ -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-BcD7YsdY.js";
3
+ import { P as PbColorPicker } from "./index-C8Vb2KOj.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-BcD7YsdY.js";
3
+ import { u as usePageBuilderEditor } from "./index-C8Vb2KOj.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-BcD7YsdY.js";
2
+ import { u as usePageBuilderEditor } from "./index-C8Vb2KOj.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" };
@@ -16,7 +16,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
16
16
  const modal = useModal();
17
17
  const emit = __emit;
18
18
  const selectImage = () => {
19
- const imageProvider = pageBuilder.getProvider("image");
19
+ const imageProvider = pageBuilder.getProvider("imageProvider");
20
20
  if (imageProvider) {
21
21
  imageProvider({ modal }, (url) => {
22
22
  emit("update-property-value", { image: url });
@@ -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-BcD7YsdY.js";
3
+ import { u as usePageBuilderEditor } from "./index-C8Vb2KOj.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,5 +1,6 @@
1
- import { defineComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, createVNode, unref } from "vue";
2
- import { BSTextInput } from "@g1cloud/bluesea";
1
+ import { defineComponent, computed, openBlock, createElementBlock, createElementVNode, toDisplayString, createBlock, unref } from "vue";
2
+ import { BSMultiLangTextInput, BSTextInput } from "@g1cloud/bluesea";
3
+ import { u as usePageBuilderEditor } from "./index-C8Vb2KOj.js";
3
4
  const _hoisted_1 = { class: "property-editor property-editor-text flex-align-center" };
4
5
  const _hoisted_2 = { class: "title" };
5
6
  const _hoisted_3 = ["textContent"];
@@ -13,6 +14,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
13
14
  setup(__props, { emit: __emit }) {
14
15
  const props = __props;
15
16
  const emit = __emit;
17
+ const pageBuilder = usePageBuilderEditor();
18
+ const locales = computed(() => pageBuilder.getLocales());
16
19
  const emitUpdatePropertyValue = (value) => {
17
20
  const properties = {};
18
21
  properties[props.property.propertyName] = value;
@@ -26,11 +29,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
26
29
  }, null, 8, _hoisted_3)
27
30
  ]),
28
31
  createElementVNode("div", null, [
29
- createVNode(unref(BSTextInput), {
32
+ _ctx.property.multiLang ? (openBlock(), createBlock(unref(BSMultiLangTextInput), {
33
+ key: 0,
34
+ locales: locales.value,
30
35
  "model-value": _ctx.value,
31
36
  width: "100%",
32
37
  "onUpdate:modelValue": emitUpdatePropertyValue
33
- }, null, 8, ["model-value"])
38
+ }, null, 8, ["locales", "model-value"])) : (openBlock(), createBlock(unref(BSTextInput), {
39
+ key: 1,
40
+ "model-value": _ctx.value,
41
+ width: "100%",
42
+ "onUpdate:modelValue": emitUpdatePropertyValue
43
+ }, null, 8, ["model-value"]))
34
44
  ])
35
45
  ]);
36
46
  };
@@ -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-BcD7YsdY.js";
3
+ import { w as widgetPartDefinitions } from "./index-C8Vb2KOj.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",
@@ -1,15 +1,16 @@
1
1
  import { PartProperty } from '../../../model/part-property.ts';
2
+ import { MultiLangString } from '@g1cloud/bluesea';
2
3
 
3
4
  declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<{
4
5
  property: PartProperty;
5
- value?: string | undefined;
6
+ value?: string | MultiLangString | undefined;
6
7
  }>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
- "update-property-value": (properties: Record<string, string>) => void;
8
+ "update-property-value": (properties: Record<string, unknown>) => void;
8
9
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
9
10
  property: PartProperty;
10
- value?: string | undefined;
11
+ value?: string | MultiLangString | undefined;
11
12
  }>>> & {
12
- "onUpdate-property-value"?: ((properties: Record<string, string>) => any) | undefined;
13
+ "onUpdate-property-value"?: ((properties: Record<string, unknown>) => any) | undefined;
13
14
  }, {}, {}>;
14
15
  export default _default;
15
16
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;