@g1cloud/page-builder-editor 1.0.0-alpha.54 → 1.0.0-alpha.56

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.
@@ -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-BrJ6BLmW.js";
3
+ import { P as PbColorPicker } from "./index-DTcGndye.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, createTextVNode, defineAsyncComponent } from "vue";
2
2
  import { useModal, vT } from "@g1cloud/bluesea";
3
- import { u as usePageBuilderEditor } from "./index-BrJ6BLmW.js";
3
+ import { u as usePageBuilderEditor } from "./index-DTcGndye.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,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-BrJ6BLmW.js";
2
+ import { u as usePageBuilderEditor, C as ChangePropertyCommand } from "./index-DTcGndye.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" };
@@ -44,8 +44,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
44
44
  return (_a = media.value) == null ? void 0 : _a.altText;
45
45
  });
46
46
  const copyUrl = () => {
47
- if (!media.value || !media.value.url) return;
48
- navigator.clipboard.writeText(media.value.url);
47
+ if (!media.value || !media.value.fileUrl) return;
48
+ navigator.clipboard.writeText(media.value.fileUrl);
49
49
  showNotification({ key: "pb.prop.copied" });
50
50
  };
51
51
  return (_ctx, _cache) => {
@@ -64,10 +64,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
64
64
  [unref(vT), { key: "pb.prop.selectMedia" }]
65
65
  ])
66
66
  ]),
67
- ((_a = media.value) == null ? void 0 : _a.url) ? (openBlock(), createElementBlock("div", _hoisted_3, [
67
+ ((_a = media.value) == null ? void 0 : _a.fileUrl) ? (openBlock(), createElementBlock("div", _hoisted_3, [
68
68
  _cache[0] || (_cache[0] = createElementVNode("label", null, "URL", -1)),
69
69
  createElementVNode("div", _hoisted_4, [
70
- createTextVNode(toDisplayString((_b = media.value) == null ? void 0 : _b.url) + " ", 1),
70
+ createTextVNode(toDisplayString((_b = media.value) == null ? void 0 : _b.fileUrl) + " ", 1),
71
71
  withDirectives(createVNode(unref(BSButton), {
72
72
  class: "border-0 mb-2 pl-0",
73
73
  "left-icon": "content_copy",
@@ -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-BrJ6BLmW.js";
3
+ import { u as usePageBuilderEditor } from "./index-DTcGndye.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-BrJ6BLmW.js";
3
+ import { u as usePageBuilderEditor } from "./index-DTcGndye.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-BrJ6BLmW.js";
3
+ import { s as selectYoutubeVideo } from "./index-DTcGndye.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-BrJ6BLmW.js";
3
+ import { w as widgetPartDefinitions } from "./index-DTcGndye.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"];
@@ -28,10 +28,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
28
28
  disableFields?: boolean | undefined;
29
29
  }, import('@ckpack/vue-color').Context>;
30
30
  }, {
31
- ClickOutside: {
32
- mounted: (el: HTMLElement, binding: import('vue').DirectiveBinding<any, string, string>) => void;
33
- updated: (el: HTMLElement, binding: import('vue').DirectiveBinding<any, string, string>) => void;
34
- unmounted: (el: HTMLElement) => void;
35
- };
31
+ ClickOutside: import('vue').ObjectDirective<any, any, string, string>;
36
32
  }, string, import('vue').ComponentProvideOptions, true, {}, any>;
37
33
  export default _default;
@@ -7076,14 +7076,14 @@ const _sfc_main$8$1 = /* @__PURE__ */ defineComponent({
7076
7076
  }, [
7077
7077
  createElementVNode("img", {
7078
7078
  alt: altText.value,
7079
- src: ((_d = _ctx.part.properties) == null ? void 0 : _d.media).url,
7079
+ src: ((_d = _ctx.part.properties) == null ? void 0 : _d.media).fileUrl,
7080
7080
  style: normalizeStyle(style.value),
7081
7081
  class: "image"
7082
7082
  }, null, 12, _hoisted_2$4$1)
7083
7083
  ], 8, _hoisted_1$7$1)) : (openBlock(), createElementBlock("img", {
7084
7084
  key: 1,
7085
7085
  alt: altText.value,
7086
- src: ((_e = _ctx.part.properties) == null ? void 0 : _e.media).url,
7086
+ src: ((_e = _ctx.part.properties) == null ? void 0 : _e.media).fileUrl,
7087
7087
  style: normalizeStyle(style.value),
7088
7088
  class: "image"
7089
7089
  }, null, 12, _hoisted_3$d))
@@ -7095,7 +7095,7 @@ const _sfc_main$8$1 = /* @__PURE__ */ defineComponent({
7095
7095
  controls: ""
7096
7096
  }, [
7097
7097
  createElementVNode("source", {
7098
- src: `${media.value.url}#t=0.01`
7098
+ src: `${media.value.fileUrl}#t=0.01`
7099
7099
  }, null, 8, _hoisted_5$8)
7100
7100
  ], 8, _hoisted_4$b)) : createCommentVNode("", true)
7101
7101
  ], 64)) : _ctx.placeholder ? (openBlock(), createElementBlock("div", _hoisted_6$8, [
@@ -8202,15 +8202,15 @@ class PartManager {
8202
8202
  const defaultPartPropertyEditors = () => {
8203
8203
  return {
8204
8204
  "readonly-text": () => defineAsyncComponent(() => import("./PbPropertyEditorReadonlyText-BJ5qx69O.js")),
8205
- "text": () => defineAsyncComponent(() => import("./PbPropertyEditorText-BPFRUHyB.js")),
8205
+ "text": () => defineAsyncComponent(() => import("./PbPropertyEditorText-C0mBiScQ.js")),
8206
8206
  "number": () => defineAsyncComponent(() => import("./PbPropertyEditorNumber-B76ArSb5.js")),
8207
8207
  "boolean": () => defineAsyncComponent(() => import("./PbPropertyEditorBoolean-c5CNiTpt.js")),
8208
- "multiline-text": () => defineAsyncComponent(() => import("./PbPropertyEditorMultilineText-Cpz6njhD.js")),
8208
+ "multiline-text": () => defineAsyncComponent(() => import("./PbPropertyEditorMultilineText-99r8XpLR.js")),
8209
8209
  "select": () => defineAsyncComponent(() => import("./PbPropertyEditorSelect-B5sfulvx.js")),
8210
- "color": () => defineAsyncComponent(() => import("./PbPropertyEditorColor-kyvEt6xI.js")),
8211
- "image": () => defineAsyncComponent(() => import("./PbPropertyEditorImage-CMomDUUw.js")),
8212
- "html": () => defineAsyncComponent(() => import("./PbPropertyEditorHtml-BuKh8j3Z.js")),
8213
- "youtube": () => defineAsyncComponent(() => import("./PbPropertyEditorYoutube-D88m-cfy.js"))
8210
+ "color": () => defineAsyncComponent(() => import("./PbPropertyEditorColor-xMCiBQOw.js")),
8211
+ "image": () => defineAsyncComponent(() => import("./PbPropertyEditorImage-4Zry3AbP.js")),
8212
+ "html": () => defineAsyncComponent(() => import("./PbPropertyEditorHtml-5CiqtEcc.js")),
8213
+ "youtube": () => defineAsyncComponent(() => import("./PbPropertyEditorYoutube-BtgQZsqi.js"))
8214
8214
  };
8215
8215
  };
8216
8216
  const getPropertyValueOfParts = (parts, propertyName) => {
@@ -11477,8 +11477,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
11477
11477
  const imageProvider = pageBuilder.getProvider("imageProvider");
11478
11478
  if (imageProvider) {
11479
11479
  imageProvider({ modal, mediaTypes: ["Image"] }, (media) => {
11480
- if (media.mediaType === "Image") {
11481
- updatePropertyValue({ backgroundImage: media.url });
11480
+ if (media.mediaType === "Image" && media.fileUrl) {
11481
+ updatePropertyValue({ backgroundImage: media.fileUrl });
11482
11482
  }
11483
11483
  });
11484
11484
  }
@@ -12308,8 +12308,8 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
12308
12308
  return (_b = (_a = part == null ? void 0 : part[0]) == null ? void 0 : _a.properties) == null ? void 0 : _b.thumbnail;
12309
12309
  });
12310
12310
  const copyUrl = () => {
12311
- if (!media.value || !media.value.url) return;
12312
- navigator.clipboard.writeText(media.value.url);
12311
+ if (!media.value || !media.value.fileUrl) return;
12312
+ navigator.clipboard.writeText(media.value.fileUrl);
12313
12313
  showNotification({ key: "pb.prop.copied" });
12314
12314
  };
12315
12315
  return (_ctx, _cache) => {
@@ -12328,10 +12328,10 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
12328
12328
  [unref(vT), { key: "pb.prop.selectMedia" }]
12329
12329
  ])
12330
12330
  ]),
12331
- ((_a = media.value) == null ? void 0 : _a.url) ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
12331
+ ((_a = media.value) == null ? void 0 : _a.fileUrl) ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
12332
12332
  _cache[4] || (_cache[4] = createElementVNode("label", null, "URL", -1)),
12333
12333
  createElementVNode("div", _hoisted_4, [
12334
- createTextVNode(toDisplayString((_b = media.value) == null ? void 0 : _b.url) + " ", 1),
12334
+ createTextVNode(toDisplayString((_b = media.value) == null ? void 0 : _b.fileUrl) + " ", 1),
12335
12335
  withDirectives(createVNode(unref(BSButton), {
12336
12336
  class: "border-0 mb-2 pl-0",
12337
12337
  "left-icon": "content_copy",
@@ -12769,7 +12769,7 @@ __publicField(_OpenAddWidgetModalCommand, "COMMAND_ID", "OpenAddWidgetModal");
12769
12769
  let OpenAddWidgetModalCommand = _OpenAddWidgetModalCommand;
12770
12770
  const openWidgetAddModal = (modal, args, callback) => {
12771
12771
  modal.openModal({
12772
- component: defineAsyncComponent(() => import("./PbWidgetAddModal-3npSogG0.js")),
12772
+ component: defineAsyncComponent(() => import("./PbWidgetAddModal-BmdGylBE.js")),
12773
12773
  style: {
12774
12774
  width: "80%",
12775
12775
  height: "80%",
@@ -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, t, v, x, y, z, A, D } from "./index-BrJ6BLmW.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, t, v, x, y, z, A, D } from "./index-DTcGndye.js";
2
2
  export {
3
3
  B as BLOCK_TYPE,
4
4
  b as Block,
@@ -7077,14 +7077,14 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
7077
7077
  }, [
7078
7078
  vue.createElementVNode("img", {
7079
7079
  alt: altText.value,
7080
- src: ((_d = _ctx.part.properties) == null ? void 0 : _d.media).url,
7080
+ src: ((_d = _ctx.part.properties) == null ? void 0 : _d.media).fileUrl,
7081
7081
  style: vue.normalizeStyle(style.value),
7082
7082
  class: "image"
7083
7083
  }, null, 12, _hoisted_2$4$1)
7084
7084
  ], 8, _hoisted_1$7$1)) : (vue.openBlock(), vue.createElementBlock("img", {
7085
7085
  key: 1,
7086
7086
  alt: altText.value,
7087
- src: ((_e = _ctx.part.properties) == null ? void 0 : _e.media).url,
7087
+ src: ((_e = _ctx.part.properties) == null ? void 0 : _e.media).fileUrl,
7088
7088
  style: vue.normalizeStyle(style.value),
7089
7089
  class: "image"
7090
7090
  }, null, 12, _hoisted_3$k))
@@ -7096,7 +7096,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
7096
7096
  controls: ""
7097
7097
  }, [
7098
7098
  vue.createElementVNode("source", {
7099
- src: `${media.value.url}#t=0.01`
7099
+ src: `${media.value.fileUrl}#t=0.01`
7100
7100
  }, null, 8, _hoisted_5$b)
7101
7101
  ], 8, _hoisted_4$f)) : vue.createCommentVNode("", true)
7102
7102
  ], 64)) : _ctx.placeholder ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$a, [
@@ -11478,8 +11478,8 @@ ${_html.style}
11478
11478
  const imageProvider = pageBuilder.getProvider("imageProvider");
11479
11479
  if (imageProvider) {
11480
11480
  imageProvider({ modal, mediaTypes: ["Image"] }, (media) => {
11481
- if (media.mediaType === "Image") {
11482
- updatePropertyValue({ backgroundImage: media.url });
11481
+ if (media.mediaType === "Image" && media.fileUrl) {
11482
+ updatePropertyValue({ backgroundImage: media.fileUrl });
11483
11483
  }
11484
11484
  });
11485
11485
  }
@@ -12309,8 +12309,8 @@ ${_html.style}
12309
12309
  return (_b = (_a = part == null ? void 0 : part[0]) == null ? void 0 : _a.properties) == null ? void 0 : _b.thumbnail;
12310
12310
  });
12311
12311
  const copyUrl = () => {
12312
- if (!media.value || !media.value.url) return;
12313
- navigator.clipboard.writeText(media.value.url);
12312
+ if (!media.value || !media.value.fileUrl) return;
12313
+ navigator.clipboard.writeText(media.value.fileUrl);
12314
12314
  bluesea.showNotification({ key: "pb.prop.copied" });
12315
12315
  };
12316
12316
  return (_ctx, _cache) => {
@@ -12329,10 +12329,10 @@ ${_html.style}
12329
12329
  [vue.unref(bluesea.vT), { key: "pb.prop.selectMedia" }]
12330
12330
  ])
12331
12331
  ]),
12332
- ((_a = media.value) == null ? void 0 : _a.url) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$8, [
12332
+ ((_a = media.value) == null ? void 0 : _a.fileUrl) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$8, [
12333
12333
  _cache[4] || (_cache[4] = vue.createElementVNode("label", null, "URL", -1)),
12334
12334
  vue.createElementVNode("div", _hoisted_4$4, [
12335
- vue.createTextVNode(vue.toDisplayString((_b = media.value) == null ? void 0 : _b.url) + " ", 1),
12335
+ vue.createTextVNode(vue.toDisplayString((_b = media.value) == null ? void 0 : _b.fileUrl) + " ", 1),
12336
12336
  vue.withDirectives(vue.createVNode(vue.unref(bluesea.BSButton), {
12337
12337
  class: "border-0 mb-2 pl-0",
12338
12338
  "left-icon": "content_copy",
@@ -16814,8 +16814,8 @@ ${_html.style}
16814
16814
  return (_a = media.value) == null ? void 0 : _a.altText;
16815
16815
  });
16816
16816
  const copyUrl = () => {
16817
- if (!media.value || !media.value.url) return;
16818
- navigator.clipboard.writeText(media.value.url);
16817
+ if (!media.value || !media.value.fileUrl) return;
16818
+ navigator.clipboard.writeText(media.value.fileUrl);
16819
16819
  bluesea.showNotification({ key: "pb.prop.copied" });
16820
16820
  };
16821
16821
  return (_ctx, _cache) => {
@@ -16834,10 +16834,10 @@ ${_html.style}
16834
16834
  [vue.unref(bluesea.vT), { key: "pb.prop.selectMedia" }]
16835
16835
  ])
16836
16836
  ]),
16837
- ((_a = media.value) == null ? void 0 : _a.url) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$4, [
16837
+ ((_a = media.value) == null ? void 0 : _a.fileUrl) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$4, [
16838
16838
  _cache[0] || (_cache[0] = vue.createElementVNode("label", null, "URL", -1)),
16839
16839
  vue.createElementVNode("div", _hoisted_4$3, [
16840
- vue.createTextVNode(vue.toDisplayString((_b = media.value) == null ? void 0 : _b.url) + " ", 1),
16840
+ vue.createTextVNode(vue.toDisplayString((_b = media.value) == null ? void 0 : _b.fileUrl) + " ", 1),
16841
16841
  vue.withDirectives(vue.createVNode(vue.unref(bluesea.BSButton), {
16842
16842
  class: "border-0 mb-2 pl-0",
16843
16843
  "left-icon": "content_copy",
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.54",
4
+ "version": "1.0.0-alpha.56",
5
5
  "engins": {
6
6
  "node": ">= 20.0.0"
7
7
  },
@@ -16,7 +16,7 @@
16
16
  "author": "zag@g1project.net",
17
17
  "license": "LicenseRef-LICENSE",
18
18
  "peerDependencies": {
19
- "@g1cloud/bluesea": "5.0.0-alpha.92",
19
+ "@g1cloud/bluesea": "5.0.0-alpha.93",
20
20
  "vue3-youtube": "^0.1.9"
21
21
  },
22
22
  "dependencies": {
@@ -30,7 +30,7 @@
30
30
  "vue-router": "^4.4.3",
31
31
  "vue3-click-away": "^1.2.4",
32
32
  "yjs": "^13.6.14",
33
- "@g1cloud/page-builder-viewer": "1.0.0-alpha.54"
33
+ "@g1cloud/page-builder-viewer": "1.0.0-alpha.56"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/node": "^20.12.7",