@g1cloud/page-builder-editor 1.0.0-alpha.97 → 1.0.0-alpha.98

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.
@@ -216,23 +216,24 @@
216
216
  flex-direction: row;
217
217
  align-items: center;
218
218
  }
219
+ .pb-editor .pb-editor-body .pb-sidebar .pb-sidebar-properties .pb-sidebar-property-group .group-editor-background .color label {
220
+ display: inline-block;
221
+ width: 80px;
222
+ }
219
223
  .pb-editor .pb-editor-body .pb-sidebar .pb-sidebar-properties .pb-sidebar-property-group .group-editor-background .color .bs-text-input {
220
- flex-grow: 1;
224
+ flex-grow: 0;
225
+ width: 104px;
221
226
  }
222
- .pb-editor .pb-editor-body .pb-sidebar .pb-sidebar-properties .pb-sidebar-property-group .group-editor-background .image {
223
- flex: 1;
224
- padding-left: 8px;
227
+ .pb-editor .pb-editor-body .pb-sidebar .pb-sidebar-properties .pb-sidebar-property-group .group-editor-background .image label {
228
+ display: inline-block;
229
+ width: 80px;
225
230
  }
226
- .pb-editor .pb-editor-body .pb-sidebar .pb-sidebar-properties .pb-sidebar-property-group .group-editor-background .image button {
227
- color: #fff;
228
- border: none;
229
- padding: 4px 12px;
230
- cursor: pointer;
231
- line-height: 1;
232
- width: 120px;
233
- height: 26px;
234
- background-color: var(--primary);
235
- border-radius: 2px;
231
+ .pb-editor .pb-editor-body .pb-sidebar .pb-sidebar-properties .pb-sidebar-property-group .group-editor-background .image .bs-button.select-button {
232
+ width: 132px;
233
+ }
234
+ .pb-editor .pb-editor-body .pb-sidebar .pb-sidebar-properties .pb-sidebar-property-group .group-editor-background .image .url {
235
+ word-break: break-word !important;
236
+ word-wrap: break-word !important;
236
237
  }
237
238
  .pb-editor .pb-editor-body .pb-sidebar .pb-sidebar-properties .pb-sidebar-property-group .group-editor-border .color {
238
239
  width: 50%;
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, openBlock, createElementBlock, createElementVNode, withDirectives, unref, createVNode } from "vue";
2
2
  import { vT, BSTextInput } from "@g1cloud/bluesea";
3
- import { P as PbColorPicker } from "./index-CzHVyJKJ.js";
3
+ import { P as PbColorPicker } from "./index-bTsjAv2l.js";
4
4
  const _hoisted_1 = { class: "property-editor property-editor-color" };
5
5
  const _hoisted_2 = { class: "title" };
6
6
  const _hoisted_3 = { class: "bs-layout-horizontal flex-align-center color" };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, openBlock, createElementBlock, createElementVNode, withDirectives, unref, createVNode } from "vue";
2
2
  import { vT, BSTextInput } from "@g1cloud/bluesea";
3
- import { t as toCssLength } from "./index-CzHVyJKJ.js";
3
+ import { t as toCssLength } from "./index-bTsjAv2l.js";
4
4
  const _hoisted_1 = { class: "property-editor property-editor-number flex-align-center" };
5
5
  const _hoisted_2 = { class: "title" };
6
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, openBlock, createElementBlock, createElementVNode, withDirectives, unref, createTextVNode, defineAsyncComponent } from "vue";
2
2
  import { useModal, vT } from "@g1cloud/bluesea";
3
- import { u as usePageBuilderEditor } from "./index-CzHVyJKJ.js";
3
+ import { u as usePageBuilderEditor } from "./index-bTsjAv2l.js";
4
4
  const _hoisted_1 = { class: "property-editor property-editor-html flex-align-center" };
5
5
  const _hoisted_2 = { class: "title" };
6
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, computed, openBlock, createElementBlock, createElementVNode, withDirectives, unref, createTextVNode, toDisplayString, createVNode, createCommentVNode, Fragment } from "vue";
2
- import { u as usePageBuilderEditor, C as ChangePropertyCommand } from "./index-CzHVyJKJ.js";
2
+ import { u as usePageBuilderEditor, C as ChangePropertyCommand } from "./index-bTsjAv2l.js";
3
3
  import { useModal, vT, BSButton, BSMultiLangTextInput, showNotification } from "@g1cloud/bluesea";
4
4
  const _hoisted_1 = { class: "property-editor property-editor-image" };
5
5
  const _hoisted_2 = { class: "title" };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, computed, openBlock, createElementBlock, createElementVNode, withDirectives, unref, createBlock } from "vue";
2
2
  import { vT, BSMultiLangTextArea, BSTextArea } from "@g1cloud/bluesea";
3
- import { u as usePageBuilderEditor } from "./index-CzHVyJKJ.js";
3
+ import { u as usePageBuilderEditor } from "./index-bTsjAv2l.js";
4
4
  const _hoisted_1 = { class: "property-editor property-editor-multiline-text" };
5
5
  const _hoisted_2 = { class: "title" };
6
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, computed, openBlock, createElementBlock, createElementVNode, withDirectives, unref, createBlock } from "vue";
2
2
  import { vT, BSMultiLangTextInput, BSTextInput } from "@g1cloud/bluesea";
3
- import { u as usePageBuilderEditor } from "./index-CzHVyJKJ.js";
3
+ import { u as usePageBuilderEditor } from "./index-bTsjAv2l.js";
4
4
  const _hoisted_1 = { class: "property-editor property-editor-text flex-align-center" };
5
5
  const _hoisted_2 = { class: "title" };
6
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, openBlock, createElementBlock, createElementVNode, withDirectives, unref } from "vue";
2
2
  import { useModal, vT } from "@g1cloud/bluesea";
3
- import { s as selectYoutubeVideo } from "./index-CzHVyJKJ.js";
3
+ import { s as selectYoutubeVideo } from "./index-bTsjAv2l.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 _sfc_main = /* @__PURE__ */ defineComponent({
@@ -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-CzHVyJKJ.js";
3
+ import { w as widgetPartDefinitions } from "./index-bTsjAv2l.js";
4
4
  const _hoisted_1 = { class: "bs-layout-vertical pb-part-add-modal" };
5
5
  const _hoisted_2 = { class: "bs-layout-horizontal-wrap ml-16 mb-8 gap-8" };
6
6
  const _hoisted_3 = ["onClick", "textContent"];
@@ -8592,16 +8592,16 @@ class PartManager {
8592
8592
  const defaultPartPropertyEditors = () => {
8593
8593
  return {
8594
8594
  "readonly-text": () => defineAsyncComponent(() => import("./PbPropertyEditorReadonlyText-BJ5qx69O.js")),
8595
- "text": () => defineAsyncComponent(() => import("./PbPropertyEditorText-B3BdY0s1.js")),
8595
+ "text": () => defineAsyncComponent(() => import("./PbPropertyEditorText-BpLqKfaJ.js")),
8596
8596
  "number": () => defineAsyncComponent(() => import("./PbPropertyEditorNumber-B76ArSb5.js")),
8597
8597
  "boolean": () => defineAsyncComponent(() => import("./PbPropertyEditorBoolean-c5CNiTpt.js")),
8598
- "multiline-text": () => defineAsyncComponent(() => import("./PbPropertyEditorMultilineText-DAsGTyGC.js")),
8598
+ "multiline-text": () => defineAsyncComponent(() => import("./PbPropertyEditorMultilineText-B0JUZw_Q.js")),
8599
8599
  "select": () => defineAsyncComponent(() => import("./PbPropertyEditorSelect-B5sfulvx.js")),
8600
- "css-length": () => defineAsyncComponent(() => import("./PbPropertyEditorCssLength-nk7YdWvQ.js")),
8601
- "color": () => defineAsyncComponent(() => import("./PbPropertyEditorColor-CaSd-97a.js")),
8602
- "image": () => defineAsyncComponent(() => import("./PbPropertyEditorImage-YVF4DEZ7.js")),
8603
- "html": () => defineAsyncComponent(() => import("./PbPropertyEditorHtml-CclJiLCC.js")),
8604
- "youtube": () => defineAsyncComponent(() => import("./PbPropertyEditorYoutube-Qn817R8S.js"))
8600
+ "css-length": () => defineAsyncComponent(() => import("./PbPropertyEditorCssLength-DxcSclK9.js")),
8601
+ "color": () => defineAsyncComponent(() => import("./PbPropertyEditorColor-CpCyIjwS.js")),
8602
+ "image": () => defineAsyncComponent(() => import("./PbPropertyEditorImage-DvjpV1hv.js")),
8603
+ "html": () => defineAsyncComponent(() => import("./PbPropertyEditorHtml-Chtjtv6-.js")),
8604
+ "youtube": () => defineAsyncComponent(() => import("./PbPropertyEditorYoutube-D9rwvL_i.js"))
8605
8605
  };
8606
8606
  };
8607
8607
  const getPropertyValueOfParts = (parts, propertyName) => {
@@ -11898,10 +11898,10 @@ const _sfc_main$i = defineComponent({
11898
11898
  }
11899
11899
  );
11900
11900
  watch(
11901
- () => color.value,
11902
- () => setTimeout(() => {
11901
+ () => appliedColor.value,
11902
+ () => {
11903
11903
  if (appliedColor.value) emit("change-color", appliedColor.value);
11904
- }, 100),
11904
+ },
11905
11905
  { deep: true }
11906
11906
  );
11907
11907
  watch(
@@ -11965,9 +11965,12 @@ const PbColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_
11965
11965
  const _hoisted_1$g = { class: "group-editor group-editor-background" };
11966
11966
  const _hoisted_2$8 = { class: "flex-align-center" };
11967
11967
  const _hoisted_3$5 = { class: "title" };
11968
- const _hoisted_4$4 = { class: "bs-layout-horizontal" };
11969
- const _hoisted_5$4 = { class: "color" };
11970
- const _hoisted_6$4 = { class: "image" };
11968
+ const _hoisted_4$4 = { class: "color" };
11969
+ const _hoisted_5$4 = { class: "image mt-4" };
11970
+ const _hoisted_6$4 = {
11971
+ key: 0,
11972
+ class: "url mt-8"
11973
+ };
11971
11974
  const _sfc_main$h = /* @__PURE__ */ defineComponent({
11972
11975
  __name: "PbPropertyGroupEditorBackground",
11973
11976
  props: {
@@ -11978,18 +11981,20 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
11978
11981
  const props = __props;
11979
11982
  const pageBuilder = usePageBuilderEditor();
11980
11983
  const modal = useModal();
11981
- const color = computed(() => getPropertyValueOfParts(props.selectedParts, "backgroundColor"));
11982
- const emptyColor = () => {
11983
- };
11984
11984
  const updatePropertyValue = (properties) => {
11985
11985
  pageBuilder.commandRegistry.executeCommand(
11986
11986
  ChangePropertyCommand.COMMAND_ID,
11987
11987
  { properties, targetParts: props.selectedParts }
11988
11988
  );
11989
11989
  };
11990
+ const color = computed(() => getPropertyValueOfParts(props.selectedParts, "backgroundColor"));
11991
+ const emptyColor = () => {
11992
+ };
11990
11993
  const saveOriginalColor = () => {
11991
11994
  };
11992
11995
  const updateColor = (value) => updatePropertyValue({ backgroundColor: value });
11996
+ const deleteColor = (value) => updatePropertyValue({ backgroundColor: "" });
11997
+ const image = computed(() => getPropertyValueOfParts(props.selectedParts, "backgroundImage"));
11993
11998
  const selectImage = () => {
11994
11999
  const imageProvider = pageBuilder.getProvider("imageProvider");
11995
12000
  if (imageProvider) {
@@ -12000,6 +12005,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
12000
12005
  });
12001
12006
  }
12002
12007
  };
12008
+ const deleteImage = (value) => updatePropertyValue({ backgroundImage: "" });
12003
12009
  return (_ctx, _cache) => {
12004
12010
  return openBlock(), createElementBlock("div", _hoisted_1$g, [
12005
12011
  createElementVNode("div", _hoisted_2$8, [
@@ -12008,27 +12014,63 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
12008
12014
  [unref(vT), { key: "pb.prop.background" }]
12009
12015
  ])
12010
12016
  ]),
12011
- createElementVNode("div", _hoisted_4$4, [
12012
- createElementVNode("div", _hoisted_5$4, [
12017
+ createElementVNode("div", null, [
12018
+ createElementVNode("div", _hoisted_4$4, [
12019
+ withDirectives(createElementVNode("label", null, null, 512), [
12020
+ [unref(vT), { key: "pb.prop.color" }]
12021
+ ]),
12013
12022
  createVNode(PbColorPicker, {
12014
12023
  value: color.value,
12015
12024
  "hide-delete": "",
12016
12025
  onEmpty: _cache[0] || (_cache[0] = ($event) => emptyColor()),
12017
- onHide: _cache[1] || (_cache[1] = ($event) => updateColor($event)),
12018
12026
  onShow: saveOriginalColor,
12019
- onChangeColor: _cache[2] || (_cache[2] = ($event) => updateColor($event))
12027
+ onChangeColor: _cache[1] || (_cache[1] = ($event) => updateColor($event))
12020
12028
  }, null, 8, ["value"]),
12021
12029
  createVNode(unref(BSTextInput), {
12022
12030
  "model-value": color.value,
12023
12031
  class: "ml-4",
12024
12032
  width: "",
12025
12033
  "onUpdate:modelValue": updateColor
12026
- }, null, 8, ["model-value"])
12034
+ }, null, 8, ["model-value"]),
12035
+ color.value ? withDirectives((openBlock(), createBlock$1(unref(BSButton), {
12036
+ key: 0,
12037
+ class: "ml-4 px-4",
12038
+ "left-icon": "close",
12039
+ onClick: deleteColor
12040
+ }, null, 512)), [
12041
+ [
12042
+ unref(vT),
12043
+ { key: "pb.menu.delete" },
12044
+ void 0,
12045
+ { title: true }
12046
+ ]
12047
+ ]) : createCommentVNode("", true)
12027
12048
  ]),
12028
- createElementVNode("div", _hoisted_6$4, [
12029
- withDirectives(createElementVNode("button", { onClick: selectImage }, null, 512), [
12030
- [unref(vT), { key: "pb.prop.selectImage" }]
12031
- ])
12049
+ createElementVNode("div", _hoisted_5$4, [
12050
+ withDirectives(createElementVNode("label", null, null, 512), [
12051
+ [unref(vT), { key: "pb.prop.image" }]
12052
+ ]),
12053
+ createVNode(unref(BSButton), {
12054
+ caption: { key: "pb.prop.selectImage" },
12055
+ "button-color": "blue",
12056
+ class: "select-button",
12057
+ onClick: selectImage
12058
+ }),
12059
+ image.value ? (openBlock(), createElementBlock("div", _hoisted_6$4, [
12060
+ createTextVNode(toDisplayString(image.value) + " ", 1),
12061
+ withDirectives(createVNode(unref(BSButton), {
12062
+ class: "ml-4 px-4",
12063
+ "left-icon": "close",
12064
+ onClick: deleteImage
12065
+ }, null, 512), [
12066
+ [
12067
+ unref(vT),
12068
+ { key: "pb.menu.delete" },
12069
+ void 0,
12070
+ { title: true }
12071
+ ]
12072
+ ])
12073
+ ])) : createCommentVNode("", true)
12032
12074
  ])
12033
12075
  ])
12034
12076
  ])
@@ -13342,7 +13384,7 @@ __publicField(_OpenAddWidgetModalCommand, "COMMAND_ID", "OpenAddWidgetModal");
13342
13384
  let OpenAddWidgetModalCommand = _OpenAddWidgetModalCommand;
13343
13385
  const openWidgetAddModal = (modal, args, callback) => {
13344
13386
  modal.openModal({
13345
- component: defineAsyncComponent(() => import("./PbWidgetAddModal-D4uBFMPN.js")),
13387
+ component: defineAsyncComponent(() => import("./PbWidgetAddModal-BnF61r3d.js")),
13346
13388
  style: {
13347
13389
  width: "80%",
13348
13390
  height: "80%",
@@ -15779,6 +15821,10 @@ const enTexts = [
15779
15821
  key: "pb.menu.addWidgetInside",
15780
15822
  text: "Add Widget Inside"
15781
15823
  },
15824
+ {
15825
+ key: "pb.menu.delete",
15826
+ text: "Delete"
15827
+ },
15782
15828
  {
15783
15829
  key: "pb.menu.deletePart",
15784
15830
  text: "Delete"
@@ -15835,6 +15881,10 @@ const enTexts = [
15835
15881
  key: "pb.prop.background",
15836
15882
  text: "Background"
15837
15883
  },
15884
+ {
15885
+ key: "pb.prop.color",
15886
+ text: "Color"
15887
+ },
15838
15888
  {
15839
15889
  key: "pb.prop.selectImage",
15840
15890
  text: "Select Image"
@@ -16117,6 +16167,10 @@ const jaTexts = [
16117
16167
  key: "pb.menu.addWidgetInside",
16118
16168
  text: "内側にウィジェットを追加"
16119
16169
  },
16170
+ {
16171
+ key: "pb.menu.delete",
16172
+ text: "削除"
16173
+ },
16120
16174
  {
16121
16175
  key: "pb.menu.deletePart",
16122
16176
  text: "削除"
@@ -16173,6 +16227,10 @@ const jaTexts = [
16173
16227
  key: "pb.prop.background",
16174
16228
  text: "背景"
16175
16229
  },
16230
+ {
16231
+ key: "pb.prop.color",
16232
+ text: "色"
16233
+ },
16176
16234
  {
16177
16235
  key: "pb.prop.selectImage",
16178
16236
  text: "画像を選択"
@@ -16455,6 +16513,10 @@ const koTexts = [
16455
16513
  key: "pb.menu.addWidgetInside",
16456
16514
  text: "안쪽에 위젯 추가"
16457
16515
  },
16516
+ {
16517
+ key: "pb.menu.delete",
16518
+ text: "삭제"
16519
+ },
16458
16520
  {
16459
16521
  key: "pb.menu.deletePart",
16460
16522
  text: "삭제"
@@ -16511,6 +16573,10 @@ const koTexts = [
16511
16573
  key: "pb.prop.background",
16512
16574
  text: "배경"
16513
16575
  },
16576
+ {
16577
+ key: "pb.prop.color",
16578
+ text: "색상"
16579
+ },
16514
16580
  {
16515
16581
  key: "pb.prop.selectImage",
16516
16582
  text: "이미지 선택"
@@ -16793,6 +16859,10 @@ const zhTexts = [
16793
16859
  key: "pb.menu.addWidgetInside",
16794
16860
  text: "在内部添加小部件"
16795
16861
  },
16862
+ {
16863
+ key: "pb.menu.delete",
16864
+ text: "删除"
16865
+ },
16796
16866
  {
16797
16867
  key: "pb.menu.deletePart",
16798
16868
  text: "删除"
@@ -16849,6 +16919,10 @@ const zhTexts = [
16849
16919
  key: "pb.prop.background",
16850
16920
  text: "背景"
16851
16921
  },
16922
+ {
16923
+ key: "pb.prop.color",
16924
+ text: "色"
16925
+ },
16852
16926
  {
16853
16927
  key: "pb.prop.selectImage",
16854
16928
  text: "选择图片"
@@ -17131,6 +17205,10 @@ const frTexts = [
17131
17205
  key: "pb.menu.addWidgetInside",
17132
17206
  text: "Ajouter un widget à l'intérieur"
17133
17207
  },
17208
+ {
17209
+ key: "pb.menu.delete",
17210
+ text: "Supprimer"
17211
+ },
17134
17212
  {
17135
17213
  key: "pb.menu.deletePart",
17136
17214
  text: "Supprimer"
@@ -17187,6 +17265,10 @@ const frTexts = [
17187
17265
  key: "pb.prop.background",
17188
17266
  text: "Arrière-plan"
17189
17267
  },
17268
+ {
17269
+ key: "pb.prop.color",
17270
+ text: "Couleur"
17271
+ },
17190
17272
  {
17191
17273
  key: "pb.prop.selectImage",
17192
17274
  text: "Sélectionner une image"
@@ -1,4 +1,4 @@
1
- import { B, b, M, c, d, e, _, a, f, g, h, i, j, k, l, m, n, R, o, S, p, W, q, r, v, x, y, z, A, D, E } from "./index-CzHVyJKJ.js";
1
+ import { B, b, M, c, d, e, _, a, f, g, h, i, j, k, l, m, n, R, o, S, p, W, q, r, v, x, y, z, A, D, E } from "./index-bTsjAv2l.js";
2
2
  export {
3
3
  B as BLOCK_TYPE,
4
4
  b as Block,
@@ -11899,10 +11899,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
11899
11899
  }
11900
11900
  );
11901
11901
  vue.watch(
11902
- () => color.value,
11903
- () => setTimeout(() => {
11902
+ () => appliedColor.value,
11903
+ () => {
11904
11904
  if (appliedColor.value) emit("change-color", appliedColor.value);
11905
- }, 100),
11905
+ },
11906
11906
  { deep: true }
11907
11907
  );
11908
11908
  vue.watch(
@@ -11966,9 +11966,12 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
11966
11966
  const _hoisted_1$v = { class: "group-editor group-editor-background" };
11967
11967
  const _hoisted_2$m = { class: "flex-align-center" };
11968
11968
  const _hoisted_3$c = { class: "title" };
11969
- const _hoisted_4$8 = { class: "bs-layout-horizontal" };
11970
- const _hoisted_5$7 = { class: "color" };
11971
- const _hoisted_6$6 = { class: "image" };
11969
+ const _hoisted_4$8 = { class: "color" };
11970
+ const _hoisted_5$7 = { class: "image mt-4" };
11971
+ const _hoisted_6$6 = {
11972
+ key: 0,
11973
+ class: "url mt-8"
11974
+ };
11972
11975
  const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
11973
11976
  __name: "PbPropertyGroupEditorBackground",
11974
11977
  props: {
@@ -11979,18 +11982,20 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
11979
11982
  const props = __props;
11980
11983
  const pageBuilder = usePageBuilderEditor();
11981
11984
  const modal = bluesea.useModal();
11982
- const color = vue.computed(() => getPropertyValueOfParts(props.selectedParts, "backgroundColor"));
11983
- const emptyColor = () => {
11984
- };
11985
11985
  const updatePropertyValue = (properties) => {
11986
11986
  pageBuilder.commandRegistry.executeCommand(
11987
11987
  ChangePropertyCommand.COMMAND_ID,
11988
11988
  { properties, targetParts: props.selectedParts }
11989
11989
  );
11990
11990
  };
11991
+ const color = vue.computed(() => getPropertyValueOfParts(props.selectedParts, "backgroundColor"));
11992
+ const emptyColor = () => {
11993
+ };
11991
11994
  const saveOriginalColor = () => {
11992
11995
  };
11993
11996
  const updateColor = (value) => updatePropertyValue({ backgroundColor: value });
11997
+ const deleteColor = (value) => updatePropertyValue({ backgroundColor: "" });
11998
+ const image = vue.computed(() => getPropertyValueOfParts(props.selectedParts, "backgroundImage"));
11994
11999
  const selectImage = () => {
11995
12000
  const imageProvider = pageBuilder.getProvider("imageProvider");
11996
12001
  if (imageProvider) {
@@ -12001,6 +12006,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
12001
12006
  });
12002
12007
  }
12003
12008
  };
12009
+ const deleteImage = (value) => updatePropertyValue({ backgroundImage: "" });
12004
12010
  return (_ctx, _cache) => {
12005
12011
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$v, [
12006
12012
  vue.createElementVNode("div", _hoisted_2$m, [
@@ -12009,27 +12015,63 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
12009
12015
  [vue.unref(bluesea.vT), { key: "pb.prop.background" }]
12010
12016
  ])
12011
12017
  ]),
12012
- vue.createElementVNode("div", _hoisted_4$8, [
12013
- vue.createElementVNode("div", _hoisted_5$7, [
12018
+ vue.createElementVNode("div", null, [
12019
+ vue.createElementVNode("div", _hoisted_4$8, [
12020
+ vue.withDirectives(vue.createElementVNode("label", null, null, 512), [
12021
+ [vue.unref(bluesea.vT), { key: "pb.prop.color" }]
12022
+ ]),
12014
12023
  vue.createVNode(PbColorPicker, {
12015
12024
  value: color.value,
12016
12025
  "hide-delete": "",
12017
12026
  onEmpty: _cache[0] || (_cache[0] = ($event) => emptyColor()),
12018
- onHide: _cache[1] || (_cache[1] = ($event) => updateColor($event)),
12019
12027
  onShow: saveOriginalColor,
12020
- onChangeColor: _cache[2] || (_cache[2] = ($event) => updateColor($event))
12028
+ onChangeColor: _cache[1] || (_cache[1] = ($event) => updateColor($event))
12021
12029
  }, null, 8, ["value"]),
12022
12030
  vue.createVNode(vue.unref(bluesea.BSTextInput), {
12023
12031
  "model-value": color.value,
12024
12032
  class: "ml-4",
12025
12033
  width: "",
12026
12034
  "onUpdate:modelValue": updateColor
12027
- }, null, 8, ["model-value"])
12035
+ }, null, 8, ["model-value"]),
12036
+ color.value ? vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(bluesea.BSButton), {
12037
+ key: 0,
12038
+ class: "ml-4 px-4",
12039
+ "left-icon": "close",
12040
+ onClick: deleteColor
12041
+ }, null, 512)), [
12042
+ [
12043
+ vue.unref(bluesea.vT),
12044
+ { key: "pb.menu.delete" },
12045
+ void 0,
12046
+ { title: true }
12047
+ ]
12048
+ ]) : vue.createCommentVNode("", true)
12028
12049
  ]),
12029
- vue.createElementVNode("div", _hoisted_6$6, [
12030
- vue.withDirectives(vue.createElementVNode("button", { onClick: selectImage }, null, 512), [
12031
- [vue.unref(bluesea.vT), { key: "pb.prop.selectImage" }]
12032
- ])
12050
+ vue.createElementVNode("div", _hoisted_5$7, [
12051
+ vue.withDirectives(vue.createElementVNode("label", null, null, 512), [
12052
+ [vue.unref(bluesea.vT), { key: "pb.prop.image" }]
12053
+ ]),
12054
+ vue.createVNode(vue.unref(bluesea.BSButton), {
12055
+ caption: { key: "pb.prop.selectImage" },
12056
+ "button-color": "blue",
12057
+ class: "select-button",
12058
+ onClick: selectImage
12059
+ }),
12060
+ image.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$6, [
12061
+ vue.createTextVNode(vue.toDisplayString(image.value) + " ", 1),
12062
+ vue.withDirectives(vue.createVNode(vue.unref(bluesea.BSButton), {
12063
+ class: "ml-4 px-4",
12064
+ "left-icon": "close",
12065
+ onClick: deleteImage
12066
+ }, null, 512), [
12067
+ [
12068
+ vue.unref(bluesea.vT),
12069
+ { key: "pb.menu.delete" },
12070
+ void 0,
12071
+ { title: true }
12072
+ ]
12073
+ ])
12074
+ ])) : vue.createCommentVNode("", true)
12033
12075
  ])
12034
12076
  ])
12035
12077
  ])
@@ -15780,6 +15822,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
15780
15822
  key: "pb.menu.addWidgetInside",
15781
15823
  text: "Add Widget Inside"
15782
15824
  },
15825
+ {
15826
+ key: "pb.menu.delete",
15827
+ text: "Delete"
15828
+ },
15783
15829
  {
15784
15830
  key: "pb.menu.deletePart",
15785
15831
  text: "Delete"
@@ -15836,6 +15882,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
15836
15882
  key: "pb.prop.background",
15837
15883
  text: "Background"
15838
15884
  },
15885
+ {
15886
+ key: "pb.prop.color",
15887
+ text: "Color"
15888
+ },
15839
15889
  {
15840
15890
  key: "pb.prop.selectImage",
15841
15891
  text: "Select Image"
@@ -16118,6 +16168,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
16118
16168
  key: "pb.menu.addWidgetInside",
16119
16169
  text: "内側にウィジェットを追加"
16120
16170
  },
16171
+ {
16172
+ key: "pb.menu.delete",
16173
+ text: "削除"
16174
+ },
16121
16175
  {
16122
16176
  key: "pb.menu.deletePart",
16123
16177
  text: "削除"
@@ -16174,6 +16228,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
16174
16228
  key: "pb.prop.background",
16175
16229
  text: "背景"
16176
16230
  },
16231
+ {
16232
+ key: "pb.prop.color",
16233
+ text: "色"
16234
+ },
16177
16235
  {
16178
16236
  key: "pb.prop.selectImage",
16179
16237
  text: "画像を選択"
@@ -16456,6 +16514,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
16456
16514
  key: "pb.menu.addWidgetInside",
16457
16515
  text: "안쪽에 위젯 추가"
16458
16516
  },
16517
+ {
16518
+ key: "pb.menu.delete",
16519
+ text: "삭제"
16520
+ },
16459
16521
  {
16460
16522
  key: "pb.menu.deletePart",
16461
16523
  text: "삭제"
@@ -16512,6 +16574,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
16512
16574
  key: "pb.prop.background",
16513
16575
  text: "배경"
16514
16576
  },
16577
+ {
16578
+ key: "pb.prop.color",
16579
+ text: "색상"
16580
+ },
16515
16581
  {
16516
16582
  key: "pb.prop.selectImage",
16517
16583
  text: "이미지 선택"
@@ -16794,6 +16860,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
16794
16860
  key: "pb.menu.addWidgetInside",
16795
16861
  text: "在内部添加小部件"
16796
16862
  },
16863
+ {
16864
+ key: "pb.menu.delete",
16865
+ text: "删除"
16866
+ },
16797
16867
  {
16798
16868
  key: "pb.menu.deletePart",
16799
16869
  text: "删除"
@@ -16850,6 +16920,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
16850
16920
  key: "pb.prop.background",
16851
16921
  text: "背景"
16852
16922
  },
16923
+ {
16924
+ key: "pb.prop.color",
16925
+ text: "色"
16926
+ },
16853
16927
  {
16854
16928
  key: "pb.prop.selectImage",
16855
16929
  text: "选择图片"
@@ -17132,6 +17206,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
17132
17206
  key: "pb.menu.addWidgetInside",
17133
17207
  text: "Ajouter un widget à l'intérieur"
17134
17208
  },
17209
+ {
17210
+ key: "pb.menu.delete",
17211
+ text: "Supprimer"
17212
+ },
17135
17213
  {
17136
17214
  key: "pb.menu.deletePart",
17137
17215
  text: "Supprimer"
@@ -17188,6 +17266,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
17188
17266
  key: "pb.prop.background",
17189
17267
  text: "Arrière-plan"
17190
17268
  },
17269
+ {
17270
+ key: "pb.prop.color",
17271
+ text: "Couleur"
17272
+ },
17191
17273
  {
17192
17274
  key: "pb.prop.selectImage",
17193
17275
  text: "Sélectionner une image"
package/dist/style.css CHANGED
@@ -216,23 +216,24 @@
216
216
  flex-direction: row;
217
217
  align-items: center;
218
218
  }
219
+ .pb-editor .pb-editor-body .pb-sidebar .pb-sidebar-properties .pb-sidebar-property-group .group-editor-background .color label {
220
+ display: inline-block;
221
+ width: 80px;
222
+ }
219
223
  .pb-editor .pb-editor-body .pb-sidebar .pb-sidebar-properties .pb-sidebar-property-group .group-editor-background .color .bs-text-input {
220
- flex-grow: 1;
224
+ flex-grow: 0;
225
+ width: 104px;
221
226
  }
222
- .pb-editor .pb-editor-body .pb-sidebar .pb-sidebar-properties .pb-sidebar-property-group .group-editor-background .image {
223
- flex: 1;
224
- padding-left: 8px;
227
+ .pb-editor .pb-editor-body .pb-sidebar .pb-sidebar-properties .pb-sidebar-property-group .group-editor-background .image label {
228
+ display: inline-block;
229
+ width: 80px;
225
230
  }
226
- .pb-editor .pb-editor-body .pb-sidebar .pb-sidebar-properties .pb-sidebar-property-group .group-editor-background .image button {
227
- color: #fff;
228
- border: none;
229
- padding: 4px 12px;
230
- cursor: pointer;
231
- line-height: 1;
232
- width: 120px;
233
- height: 26px;
234
- background-color: var(--primary);
235
- border-radius: 2px;
231
+ .pb-editor .pb-editor-body .pb-sidebar .pb-sidebar-properties .pb-sidebar-property-group .group-editor-background .image .bs-button.select-button {
232
+ width: 132px;
233
+ }
234
+ .pb-editor .pb-editor-body .pb-sidebar .pb-sidebar-properties .pb-sidebar-property-group .group-editor-background .image .url {
235
+ word-break: break-word !important;
236
+ word-wrap: break-word !important;
236
237
  }
237
238
  .pb-editor .pb-editor-body .pb-sidebar .pb-sidebar-properties .pb-sidebar-property-group .group-editor-border .color {
238
239
  width: 50%;
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.97",
4
+ "version": "1.0.0-alpha.98",
5
5
  "engins": {
6
6
  "node": ">= 20.0.0"
7
7
  },
@@ -17,7 +17,7 @@
17
17
  "author": "zag@g1project.net",
18
18
  "license": "LicenseRef-LICENSE",
19
19
  "peerDependencies": {
20
- "@g1cloud/bluesea": "5.0.0-beta.3",
20
+ "@g1cloud/bluesea": "5.0.0-beta.21",
21
21
  "vue3-youtube": "^0.1.9"
22
22
  },
23
23
  "dependencies": {
@@ -31,7 +31,7 @@
31
31
  "vue-router": "^4.4.3",
32
32
  "vue3-click-away": "^1.2.4",
33
33
  "yjs": "^13.6.14",
34
- "@g1cloud/page-builder-viewer": "1.0.0-alpha.97"
34
+ "@g1cloud/page-builder-viewer": "1.0.0-alpha.98"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/node": "^20.12.7",
@@ -5,25 +5,35 @@
5
5
  flex-direction: row;
6
6
  align-items: center;
7
7
 
8
+ label {
9
+ display: inline-block;
10
+ width: 80px;
11
+ }
12
+
8
13
  .bs-text-input {
9
- flex-grow: 1;
14
+ flex-grow: 0;
15
+ width: 104px;
10
16
  }
11
17
  }
12
18
 
13
19
  .image {
14
- flex: 1;
15
- padding-left: 8px;
20
+ // flex: 1;
21
+ // display: flex;
22
+ // flex-direction: row;
23
+ // align-items: center;
24
+
25
+ label {
26
+ display: inline-block;
27
+ width: 80px;
28
+ }
29
+
30
+ .bs-button.select-button {
31
+ width: 132px;
32
+ }
16
33
 
17
- button {
18
- color: #fff;
19
- border: none;
20
- padding: 4px 12px;
21
- cursor: pointer;
22
- line-height: 1;
23
- width: 120px;
24
- height: 26px;
25
- background-color: var(--primary);
26
- border-radius: 2px;
34
+ .url {
35
+ word-break: break-word !important;
36
+ word-wrap: break-word !important;
27
37
  }
28
38
  }
29
39
  }