@g1cloud/bluesea 5.0.0-alpha.86 → 5.0.0-alpha.88

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.
Files changed (53) hide show
  1. package/css/user-text.scss +5 -0
  2. package/dist/{BSAlertModal-CypVU-TC.js → BSAlertModal-B5tGkY04.js} +1 -1
  3. package/dist/{BSGridColumnSettingModal-DLuK3BLl.js → BSGridColumnSettingModal-BUt4caRa.js} +1 -1
  4. package/dist/{BSYesNoModal-DK9x7PPE.js → BSYesNoModal-DGqh7VUK.js} +1 -1
  5. package/dist/{BSYoutubeInputModal-C3XNuoRt.js → BSYoutubeInputModal-CrUbJbSF.js} +1 -1
  6. package/dist/{ImageInsertModal-DGkf6BYL.js → ImageInsertModal-PtjaQ-tL.js} +13 -54
  7. package/dist/ImageProperties.vue_vue_type_script_setup_true_lang-BPes-zaF.js +170 -0
  8. package/dist/{ImagePropertiesModal-BySz6JBD.js → ImagePropertiesModal-Brh3HoT5.js} +13 -57
  9. package/dist/{LinkPropertiesModal-TQOSjPZJ.js → LinkPropertiesModal-CK5YgiK-.js} +23 -6
  10. package/dist/{TableInsertModal-CapiIi5Y.js → TableInsertModal-AfjPyTRn.js} +1 -1
  11. package/dist/{YoutubeInsertModal-CRvP9uhi.js → YoutubeInsertModal-coMcylhc.js} +17 -38
  12. package/dist/YoutubeProperties.vue_vue_type_script_setup_true_lang-BeA4uS9k.js +171 -0
  13. package/dist/{YoutubePropertiesModal-Bf7xldmD.js → YoutubePropertiesModal-Bbm5ASxv.js} +14 -50
  14. package/dist/bluesea.js +181 -180
  15. package/dist/bluesea.umd.cjs +1701 -1240
  16. package/dist/component/grid/BSDateRangeFilters.vue.d.ts +3 -0
  17. package/dist/component/grid/BSGrid.vue.d.ts +3 -3
  18. package/dist/component/grid/BSGridCell.vue.d.ts +3 -3
  19. package/dist/component/grid/BSGridLookup.vue.d.ts +6 -0
  20. package/dist/component/input/BSDateRangeInputPopup.vue.d.ts +2 -0
  21. package/dist/component/input/BSMultiSelect.vue.d.ts +9 -0
  22. package/dist/component/input/BSSelect.vue.d.ts +3 -0
  23. package/dist/component/input/BSTreeMultiSelect.vue.d.ts +9 -0
  24. package/dist/component/input/BSTreeSelect.vue.d.ts +9 -0
  25. package/dist/component/input/BSYesNoSelect.vue.d.ts +6 -0
  26. package/dist/component/input/DateRangePresetModel.d.ts +1 -1
  27. package/dist/component/layout/BSListControl.vue.d.ts +3 -3
  28. package/dist/component/richtext/BSRichText.vue.d.ts +6 -0
  29. package/dist/component/richtext/RichTextLib.d.ts +14 -0
  30. package/dist/component/richtext/RichTextModel.d.ts +3 -0
  31. package/dist/component/richtext/RichTextToolbar.vue.d.ts +4 -0
  32. package/dist/component/richtext/image/ImageProperties.vue.d.ts +17 -0
  33. package/dist/component/richtext/image/RichTextImageLib.d.ts +4 -9
  34. package/dist/component/richtext/tool/ToolButtonTextAlign.vue.d.ts +19 -0
  35. package/dist/component/richtext/youtube/RichTextYoutubeLib.d.ts +6 -4
  36. package/dist/component/richtext/youtube/YoutubeProperties.vue.d.ts +17 -0
  37. package/dist/component/tree/BSTreeControl.vue.d.ts +3 -3
  38. package/dist/config/config.d.ts +4 -1
  39. package/dist/{index-CHXTAZgw.js → index-DHcVe0Gr.js} +946 -685
  40. package/dist/index.d.ts +2 -0
  41. package/dist/style.css +42 -222
  42. package/dist/util/componentUtil.d.ts +5 -0
  43. package/package.json +1 -1
  44. package/text/bluesea_text_en.json +48 -0
  45. package/text/bluesea_text_ja.json +48 -0
  46. package/text/bluesea_text_ko.json +48 -0
  47. package/text/bluesea_text_zh.json +48 -0
  48. /package/dist/component/richtext/{ToolButtonColor.vue.d.ts → tool/ToolButtonFontColor.vue.d.ts} +0 -0
  49. /package/dist/component/richtext/{ToolButtonFontSize.vue.d.ts → tool/ToolButtonFontSize.vue.d.ts} +0 -0
  50. /package/dist/component/richtext/{ToolButtonFontStyle.vue.d.ts → tool/ToolButtonFontStyle.vue.d.ts} +0 -0
  51. /package/dist/component/richtext/{ToolButtonHeading.vue.d.ts → tool/ToolButtonHeading.vue.d.ts} +0 -0
  52. /package/dist/component/richtext/{ToolButtonAlign.vue.d.ts → tool/ToolButtonListItem.vue.d.ts} +0 -0
  53. /package/dist/component/richtext/{ToolButtonMaximize.vue.d.ts → tool/ToolButtonMaximize.vue.d.ts} +0 -0
@@ -9,6 +9,11 @@
9
9
  margin-bottom: 4px;
10
10
  }
11
11
 
12
+ p:empty:before {
13
+ content: ' ';
14
+ white-space: pre;
15
+ }
16
+
12
17
  pre {
13
18
  background-color: #eee;
14
19
  padding: 8px;
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, openBlock, createBlock, withCtx, createElementVNode, withDirectives, createVNode, unref } from "vue";
2
- import { u as useModalHandle, _ as _sfc_main$1, B as BSButton, v as vFocusOnLoad, i as vT } from "./index-CHXTAZgw.js";
2
+ import { u as useModalHandle, _ as _sfc_main$1, B as BSButton, v as vFocusOnLoad, i as vT } from "./index-DHcVe0Gr.js";
3
3
  const _hoisted_1 = { class: "text-right" };
4
4
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
5
  __name: "BSAlertModal",
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, ref, onMounted, openBlock, createBlock, withCtx, createVNode, mergeProps, unref, toHandlers, createElementVNode, nextTick } from "vue";
2
- import { d as createInputGridHandler, u as useModalHandle, _ as _sfc_main$1, f as _sfc_main$2, g as _sfc_main$3, h as _sfc_main$4, B as BSButton, n as notNull } from "./index-CHXTAZgw.js";
2
+ import { d as createInputGridHandler, u as useModalHandle, _ as _sfc_main$1, f as _sfc_main$2, g as _sfc_main$3, h as _sfc_main$4, B as BSButton, n as notNull } from "./index-DHcVe0Gr.js";
3
3
  const _hoisted_1 = { class: "text-center" };
4
4
  const _hoisted_2 = { class: "text-center" };
5
5
  const _hoisted_3 = { class: "bs-layout-horizontal" };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, openBlock, createBlock, withCtx, createElementVNode, createVNode, withDirectives, unref } from "vue";
2
- import { u as useModalHandle, _ as _sfc_main$1, B as BSButton, i as vT } from "./index-CHXTAZgw.js";
2
+ import { u as useModalHandle, _ as _sfc_main$1, B as BSButton, i as vT } from "./index-DHcVe0Gr.js";
3
3
  const _hoisted_1 = { class: "text-right" };
4
4
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
5
  __name: "BSYesNoModal",
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, useModel, ref, openBlock, createBlock, withCtx, createElementVNode, createVNode, unref, createCommentVNode } from "vue";
2
- import { u as useModalHandle, _ as _sfc_main$1, b as _sfc_main$2, c as _sfc_main$3, B as BSButton, e as extractYoutubeVideoId } from "./index-CHXTAZgw.js";
2
+ import { u as useModalHandle, _ as _sfc_main$1, b as _sfc_main$2, c as _sfc_main$3, B as BSButton, e as extractYoutubeVideoId } from "./index-DHcVe0Gr.js";
3
3
  import YouTube from "vue3-youtube";
4
4
  const _hoisted_1 = { class: "bs-layout-vertical gap-16" };
5
5
  const _hoisted_2 = { class: "bs-layout-horizontal align-items-center" };
@@ -1,11 +1,9 @@
1
1
  import { defineComponent, ref, openBlock, createBlock, withCtx, createVNode, withDirectives, createElementVNode, vShow } from "vue";
2
- import { u as useModalHandle, _ as _sfc_main$1, a as _sfc_main$2, b as _sfc_main$3, c as _sfc_main$4, B as BSButton } from "./index-CHXTAZgw.js";
2
+ import { u as useModalHandle, _ as _sfc_main$1, a as _sfc_main$2, b as _sfc_main$3, c as _sfc_main$4, B as BSButton } from "./index-DHcVe0Gr.js";
3
+ import { _ as _sfc_main$5 } from "./ImageProperties.vue_vue_type_script_setup_true_lang-BPes-zaF.js";
3
4
  const _hoisted_1 = { class: "bs-layout-form title-w-8" };
4
5
  const _hoisted_2 = { class: "title" };
5
- const _hoisted_3 = { class: "title" };
6
- const _hoisted_4 = { class: "title" };
7
- const _hoisted_5 = { class: "title" };
8
- const _hoisted_6 = { class: "bs-layout-horizontal justify-content-end gap-8" };
6
+ const _hoisted_3 = { class: "bs-layout-horizontal justify-content-end gap-8" };
9
7
  const _sfc_main = /* @__PURE__ */ defineComponent({
10
8
  __name: "ImageInsertModal",
11
9
  props: {
@@ -20,31 +18,30 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
20
18
  ];
21
19
  const currentTab = ref("upload");
22
20
  const image = ref();
23
- const data = ref({ url: "" });
21
+ const data = ref({ src: "" });
24
22
  const modalHandle = useModalHandle();
25
23
  const insert = () => {
26
24
  if (currentTab.value === "upload" && (image.value && image.value.fileUrl)) {
27
25
  emit("insertImage", {
28
- url: image.value.fileUrl,
26
+ src: image.value.fileUrl,
29
27
  alt: image.value.altText
30
28
  });
31
29
  modalHandle.close();
32
- } else if (currentTab.value === "input" && data.value.url) {
30
+ } else if (currentTab.value === "input" && data.value.src) {
33
31
  emit("insertImage", data.value);
34
32
  modalHandle.close();
35
33
  }
36
34
  };
37
35
  const close = () => modalHandle.close();
38
36
  modalHandle.setDefaultStyle({
39
- width: "460px",
40
- height: "420px"
37
+ width: "540px"
41
38
  });
42
39
  return (_ctx, _cache) => {
43
40
  return openBlock(), createBlock(_sfc_main$1, { title: { key: "bs.richtext.insertImage" } }, {
44
41
  default: withCtx(() => [
45
42
  createVNode(_sfc_main$2, {
46
43
  "tab-id": currentTab.value,
47
- "onUpdate:tabId": _cache[4] || (_cache[4] = ($event) => currentTab.value = $event),
44
+ "onUpdate:tabId": _cache[1] || (_cache[1] = ($event) => currentTab.value = $event),
48
45
  tabs,
49
46
  class: "compact",
50
47
  "keep-tabs": ""
@@ -60,54 +57,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
60
57
  ]),
61
58
  createElementVNode("div", null, [
62
59
  createVNode(_sfc_main$4, {
63
- modelValue: data.value.url,
64
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => data.value.url = $event),
60
+ modelValue: data.value.src,
61
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => data.value.src = $event),
65
62
  class: "flex-grow-1",
66
63
  name: "url",
64
+ required: "",
67
65
  width: "100%"
68
66
  }, null, 8, ["modelValue"])
69
67
  ])
70
68
  ]),
71
- createElementVNode("div", null, [
72
- createElementVNode("div", _hoisted_3, [
73
- createVNode(_sfc_main$3, { label: { key: "bs.fileupload.alt" } })
74
- ]),
75
- createElementVNode("div", null, [
76
- createVNode(_sfc_main$4, {
77
- modelValue: data.value.alt,
78
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => data.value.alt = $event),
79
- class: "flex-grow-1",
80
- name: "altText",
81
- width: "100%"
82
- }, null, 8, ["modelValue"])
83
- ])
84
- ]),
85
- createElementVNode("div", null, [
86
- createElementVNode("div", _hoisted_4, [
87
- createVNode(_sfc_main$3, { label: { key: "bs.width" } })
88
- ]),
89
- createElementVNode("div", null, [
90
- createVNode(_sfc_main$4, {
91
- modelValue: data.value.width,
92
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => data.value.width = $event),
93
- name: "width",
94
- width: "100px"
95
- }, null, 8, ["modelValue"])
96
- ])
97
- ]),
98
- createElementVNode("div", null, [
99
- createElementVNode("div", _hoisted_5, [
100
- createVNode(_sfc_main$3, { label: { key: "bs.height" } })
101
- ]),
102
- createElementVNode("div", null, [
103
- createVNode(_sfc_main$4, {
104
- modelValue: data.value.height,
105
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => data.value.height = $event),
106
- name: "height",
107
- width: "100px"
108
- }, null, 8, ["modelValue"])
109
- ])
110
- ])
69
+ createVNode(_sfc_main$5, { "image-info": data.value }, null, 8, ["image-info"])
111
70
  ], 512), [
112
71
  [vShow, active]
113
72
  ])
@@ -116,7 +75,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
116
75
  }, 8, ["tab-id"])
117
76
  ]),
118
77
  buttons: withCtx(() => [
119
- createElementVNode("div", _hoisted_6, [
78
+ createElementVNode("div", _hoisted_3, [
120
79
  createVNode(BSButton, {
121
80
  caption: { key: "btn.ok" },
122
81
  "button-color": "blue",
@@ -0,0 +1,170 @@
1
+ import { defineComponent, openBlock, createElementBlock, Fragment, createElementVNode, createVNode, withDirectives, unref, createTextVNode } from "vue";
2
+ import { b as _sfc_main$1, c as _sfc_main$2, i as vT } from "./index-DHcVe0Gr.js";
3
+ const _hoisted_1 = { class: "title" };
4
+ const _hoisted_2 = { class: "title" };
5
+ const _hoisted_3 = { class: "title" };
6
+ const _hoisted_4 = { class: "title" };
7
+ const _hoisted_5 = { class: "bs-layout-horizontal gap-2" };
8
+ const _sfc_main = /* @__PURE__ */ defineComponent({
9
+ __name: "ImageProperties",
10
+ props: {
11
+ imageInfo: {}
12
+ },
13
+ setup(__props) {
14
+ return (_ctx, _cache) => {
15
+ return openBlock(), createElementBlock(Fragment, null, [
16
+ createElementVNode("div", null, [
17
+ createElementVNode("div", _hoisted_1, [
18
+ createVNode(_sfc_main$1, { label: { key: "bs.fileupload.alt" } })
19
+ ]),
20
+ createElementVNode("div", null, [
21
+ createVNode(_sfc_main$2, {
22
+ modelValue: _ctx.imageInfo.alt,
23
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.imageInfo.alt = $event),
24
+ name: "alt",
25
+ width: "100%"
26
+ }, null, 8, ["modelValue"])
27
+ ])
28
+ ]),
29
+ createElementVNode("div", null, [
30
+ createElementVNode("div", _hoisted_2, [
31
+ createVNode(_sfc_main$1, { label: { key: "bs.size" } })
32
+ ]),
33
+ createElementVNode("div", null, [
34
+ withDirectives(createVNode(_sfc_main$2, {
35
+ modelValue: _ctx.imageInfo.width,
36
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.imageInfo.width = $event),
37
+ name: "width",
38
+ prefix: "W",
39
+ width: "100px"
40
+ }, null, 8, ["modelValue"]), [
41
+ [
42
+ unref(vT),
43
+ { key: "bs.width" },
44
+ void 0,
45
+ { title: true }
46
+ ]
47
+ ]),
48
+ _cache[9] || (_cache[9] = createTextVNode(" x ")),
49
+ withDirectives(createVNode(_sfc_main$2, {
50
+ modelValue: _ctx.imageInfo.height,
51
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.imageInfo.height = $event),
52
+ name: "height",
53
+ prefix: "H",
54
+ width: "100px"
55
+ }, null, 8, ["modelValue"]), [
56
+ [
57
+ unref(vT),
58
+ { key: "bs.height" },
59
+ void 0,
60
+ { title: true }
61
+ ]
62
+ ])
63
+ ])
64
+ ]),
65
+ createElementVNode("div", null, [
66
+ createElementVNode("div", _hoisted_3, [
67
+ createVNode(_sfc_main$1, { label: { key: "bs.maxSize" } })
68
+ ]),
69
+ createElementVNode("div", null, [
70
+ withDirectives(createVNode(_sfc_main$2, {
71
+ modelValue: _ctx.imageInfo.maxWidth,
72
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.imageInfo.maxWidth = $event),
73
+ name: "maxWidth",
74
+ prefix: "W",
75
+ width: "100px"
76
+ }, null, 8, ["modelValue"]), [
77
+ [
78
+ unref(vT),
79
+ { key: "bs.maxWidth" },
80
+ void 0,
81
+ { title: true }
82
+ ]
83
+ ]),
84
+ _cache[10] || (_cache[10] = createTextVNode(" x ")),
85
+ withDirectives(createVNode(_sfc_main$2, {
86
+ modelValue: _ctx.imageInfo.maxHeight,
87
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => _ctx.imageInfo.maxHeight = $event),
88
+ name: "maxHeight",
89
+ prefix: "H",
90
+ width: "100px"
91
+ }, null, 8, ["modelValue"]), [
92
+ [
93
+ unref(vT),
94
+ { key: "bs.maxHeight" },
95
+ void 0,
96
+ { title: true }
97
+ ]
98
+ ])
99
+ ])
100
+ ]),
101
+ createElementVNode("div", null, [
102
+ createElementVNode("div", _hoisted_4, [
103
+ createVNode(_sfc_main$1, { label: { key: "bs.margin" } })
104
+ ]),
105
+ createElementVNode("div", _hoisted_5, [
106
+ withDirectives(createVNode(_sfc_main$2, {
107
+ modelValue: _ctx.imageInfo.marginLeft,
108
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => _ctx.imageInfo.marginLeft = $event),
109
+ prefix: { type: "font-icon", value: "keyboard_arrow_left" },
110
+ name: "marginLeft",
111
+ width: "80px"
112
+ }, null, 8, ["modelValue"]), [
113
+ [
114
+ unref(vT),
115
+ { key: "bs.left" },
116
+ void 0,
117
+ { title: true }
118
+ ]
119
+ ]),
120
+ withDirectives(createVNode(_sfc_main$2, {
121
+ modelValue: _ctx.imageInfo.marginTop,
122
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => _ctx.imageInfo.marginTop = $event),
123
+ prefix: { type: "font-icon", value: "keyboard_arrow_up" },
124
+ name: "marginTop",
125
+ width: "80px"
126
+ }, null, 8, ["modelValue"]), [
127
+ [
128
+ unref(vT),
129
+ { key: "bs.top" },
130
+ void 0,
131
+ { title: true }
132
+ ]
133
+ ]),
134
+ withDirectives(createVNode(_sfc_main$2, {
135
+ modelValue: _ctx.imageInfo.marginBottom,
136
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => _ctx.imageInfo.marginBottom = $event),
137
+ prefix: { type: "font-icon", value: "keyboard_arrow_down" },
138
+ name: "marginBottom",
139
+ width: "80px"
140
+ }, null, 8, ["modelValue"]), [
141
+ [
142
+ unref(vT),
143
+ { key: "bs.bottom" },
144
+ void 0,
145
+ { title: true }
146
+ ]
147
+ ]),
148
+ withDirectives(createVNode(_sfc_main$2, {
149
+ modelValue: _ctx.imageInfo.marginRight,
150
+ "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => _ctx.imageInfo.marginRight = $event),
151
+ prefix: { type: "font-icon", value: "keyboard_arrow_right" },
152
+ name: "marginRight",
153
+ width: "80px"
154
+ }, null, 8, ["modelValue"]), [
155
+ [
156
+ unref(vT),
157
+ { key: "bs.right" },
158
+ void 0,
159
+ { title: true }
160
+ ]
161
+ ])
162
+ ])
163
+ ])
164
+ ], 64);
165
+ };
166
+ }
167
+ });
168
+ export {
169
+ _sfc_main as _
170
+ };
@@ -1,10 +1,8 @@
1
1
  import { defineComponent, ref, onMounted, useTemplateRef, openBlock, createBlock, withCtx, createElementBlock, createElementVNode, createVNode, createCommentVNode } from "vue";
2
- import { j as findImageNode, u as useModalHandle, _ as _sfc_main$1, b as _sfc_main$2, c as _sfc_main$3, B as BSButton, k as numberToPixel, l as formValidator } from "./index-CHXTAZgw.js";
2
+ import { j as findImageNode, u as useModalHandle, _ as _sfc_main$1, b as _sfc_main$2, c as _sfc_main$3, B as BSButton, k as imageInfoNumberToPixel, l as formValidator } from "./index-DHcVe0Gr.js";
3
+ import { _ as _sfc_main$4 } from "./ImageProperties.vue_vue_type_script_setup_true_lang-BPes-zaF.js";
3
4
  const _hoisted_1 = { class: "title" };
4
- const _hoisted_2 = { class: "title" };
5
- const _hoisted_3 = { class: "title" };
6
- const _hoisted_4 = { class: "title" };
7
- const _hoisted_5 = { class: "bs-layout-horizontal justify-content-end gap-8" };
5
+ const _hoisted_2 = { class: "bs-layout-horizontal justify-content-end gap-8" };
8
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
9
7
  __name: "ImagePropertiesModal",
10
8
  props: {
@@ -18,10 +16,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
18
16
  const { node } = findImageNode(selection);
19
17
  if (node) {
20
18
  data.value = {
21
- url: node.attrs.src,
22
- alt: node.attrs.alt,
23
- width: node.attrs.width,
24
- height: node.attrs.height
19
+ ...node.attrs,
20
+ src: node.attrs.src
25
21
  };
26
22
  }
27
23
  });
@@ -35,10 +31,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
35
31
  if (node && nodePos && data.value) {
36
32
  tr.setNodeMarkup(nodePos - 1, null, {
37
33
  ...node.attrs,
38
- src: data.value.url,
39
- alt: data.value.alt,
40
- width: numberToPixel(data.value.width),
41
- height: numberToPixel(data.value.height)
34
+ ...imageInfoNumberToPixel(data.value)
42
35
  });
43
36
  }
44
37
  return true;
@@ -47,7 +40,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
47
40
  };
48
41
  const close = () => modalHandle.close();
49
42
  modalHandle.setDefaultStyle({
50
- width: "500px"
43
+ width: "540px"
51
44
  });
52
45
  return (_ctx, _cache) => {
53
46
  return openBlock(), createBlock(_sfc_main$1, { title: { key: "bs.contenteditor.image" } }, {
@@ -64,57 +57,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
64
57
  ]),
65
58
  createElementVNode("div", null, [
66
59
  createVNode(_sfc_main$3, {
67
- modelValue: data.value.url,
68
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => data.value.url = $event),
69
- name: "url",
60
+ modelValue: data.value.src,
61
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => data.value.src = $event),
62
+ disabled: "",
63
+ name: "src",
70
64
  required: "",
71
65
  width: "100%"
72
66
  }, null, 8, ["modelValue"])
73
67
  ])
74
68
  ]),
75
- createElementVNode("div", null, [
76
- createElementVNode("div", _hoisted_2, [
77
- createVNode(_sfc_main$2, { label: { key: "bs.fileupload.alt" } })
78
- ]),
79
- createElementVNode("div", null, [
80
- createVNode(_sfc_main$3, {
81
- modelValue: data.value.alt,
82
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => data.value.alt = $event),
83
- name: "alt",
84
- width: "100%"
85
- }, null, 8, ["modelValue"])
86
- ])
87
- ]),
88
- createElementVNode("div", null, [
89
- createElementVNode("div", _hoisted_3, [
90
- createVNode(_sfc_main$2, { label: { key: "bs.width" } })
91
- ]),
92
- createElementVNode("div", null, [
93
- createVNode(_sfc_main$3, {
94
- modelValue: data.value.width,
95
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => data.value.width = $event),
96
- name: "width",
97
- width: "100px"
98
- }, null, 8, ["modelValue"])
99
- ])
100
- ]),
101
- createElementVNode("div", null, [
102
- createElementVNode("div", _hoisted_4, [
103
- createVNode(_sfc_main$2, { label: { key: "bs.height" } })
104
- ]),
105
- createElementVNode("div", null, [
106
- createVNode(_sfc_main$3, {
107
- modelValue: data.value.height,
108
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => data.value.height = $event),
109
- name: "height",
110
- width: "100px"
111
- }, null, 8, ["modelValue"])
112
- ])
113
- ])
69
+ createVNode(_sfc_main$4, { "image-info": data.value }, null, 8, ["image-info"])
114
70
  ], 512)) : createCommentVNode("", true)
115
71
  ]),
116
72
  buttons: withCtx(() => [
117
- createElementVNode("div", _hoisted_5, [
73
+ createElementVNode("div", _hoisted_2, [
118
74
  createVNode(BSButton, {
119
75
  caption: { key: "btn.ok" },
120
76
  "button-color": "blue",
@@ -1,9 +1,10 @@
1
- import { defineComponent, ref, onMounted, openBlock, createBlock, withCtx, createElementVNode, createVNode } from "vue";
2
- import { u as useModalHandle, _ as _sfc_main$1, b as _sfc_main$2, c as _sfc_main$3, B as BSButton } from "./index-CHXTAZgw.js";
1
+ import { defineComponent, ref, onMounted, openBlock, createBlock, withCtx, createElementVNode, createVNode, createTextVNode, withModifiers } from "vue";
2
+ import { u as useModalHandle, _ as _sfc_main$1, b as _sfc_main$2, c as _sfc_main$3, B as BSButton } from "./index-DHcVe0Gr.js";
3
3
  const _hoisted_1 = { class: "bs-layout-form title-w-8" };
4
4
  const _hoisted_2 = { class: "title" };
5
5
  const _hoisted_3 = { class: "title" };
6
- const _hoisted_4 = { class: "bs-layout-horizontal justify-content-end gap-8" };
6
+ const _hoisted_4 = { class: "ml-8" };
7
+ const _hoisted_5 = { class: "bs-layout-horizontal justify-content-end gap-4" };
7
8
  const _sfc_main = /* @__PURE__ */ defineComponent({
8
9
  __name: "LinkPropertiesModal",
9
10
  props: {
@@ -34,6 +35,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
34
35
  props.editor.chain().focus().extendMarkRange("link").unsetLink().run();
35
36
  modalHandle.close();
36
37
  };
38
+ const setBlank = () => {
39
+ link.value.target = "_blank";
40
+ };
37
41
  const close = () => {
38
42
  modalHandle.close();
39
43
  };
@@ -46,13 +50,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
46
50
  createElementVNode("div", _hoisted_1, [
47
51
  createElementVNode("div", null, [
48
52
  createElementVNode("div", _hoisted_2, [
49
- createVNode(_sfc_main$2, { label: { key: "bs.linkUrl" } })
53
+ createVNode(_sfc_main$2, {
54
+ label: { key: "bs.linkUrl" },
55
+ required: ""
56
+ })
50
57
  ]),
51
58
  createElementVNode("div", null, [
52
59
  createVNode(_sfc_main$3, {
53
60
  modelValue: link.value.url,
54
61
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => link.value.url = $event),
55
62
  name: "url",
63
+ required: "",
56
64
  width: "100%"
57
65
  }, null, 8, ["modelValue"])
58
66
  ])
@@ -67,13 +75,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
67
75
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => link.value.target = $event),
68
76
  name: "target",
69
77
  width: "100px"
70
- }, null, 8, ["modelValue"])
78
+ }, null, 8, ["modelValue"]),
79
+ createElementVNode("span", _hoisted_4, [
80
+ _cache[2] || (_cache[2] = createTextVNode(" (ex: ")),
81
+ createElementVNode("a", {
82
+ class: "text-decoration-none",
83
+ href: "#",
84
+ onClick: withModifiers(setBlank, ["prevent"])
85
+ }, "_blank"),
86
+ _cache[3] || (_cache[3] = createTextVNode(") "))
87
+ ])
71
88
  ])
72
89
  ])
73
90
  ])
74
91
  ]),
75
92
  buttons: withCtx(() => [
76
- createElementVNode("div", _hoisted_4, [
93
+ createElementVNode("div", _hoisted_5, [
77
94
  createVNode(BSButton, {
78
95
  caption: { key: "bs.richtext.removeLink" },
79
96
  "data-id": "removeLinkBtn",
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, ref, openBlock, createBlock, withCtx, createElementVNode, createVNode } from "vue";
2
- import { u as useModalHandle, _ as _sfc_main$1, b as _sfc_main$2, h as _sfc_main$3, B as BSButton } from "./index-CHXTAZgw.js";
2
+ import { u as useModalHandle, _ as _sfc_main$1, b as _sfc_main$2, h as _sfc_main$3, B as BSButton } from "./index-DHcVe0Gr.js";
3
3
  const _hoisted_1 = { class: "bs-layout-form" };
4
4
  const _hoisted_2 = { class: "bs-form-label" };
5
5
  const _hoisted_3 = { class: "bs-form-label" };
@@ -1,10 +1,9 @@
1
1
  import { defineComponent, ref, openBlock, createBlock, withCtx, createElementVNode, createVNode } from "vue";
2
- import { u as useModalHandle, _ as _sfc_main$1, b as _sfc_main$2, c as _sfc_main$3, h as _sfc_main$4, B as BSButton } from "./index-CHXTAZgw.js";
2
+ import { u as useModalHandle, _ as _sfc_main$1, b as _sfc_main$2, c as _sfc_main$3, B as BSButton, y as youtubeInfoNumberToPixel } from "./index-DHcVe0Gr.js";
3
+ import { _ as _sfc_main$4 } from "./YoutubeProperties.vue_vue_type_script_setup_true_lang-BeA4uS9k.js";
3
4
  const _hoisted_1 = { class: "bs-layout-form" };
4
5
  const _hoisted_2 = { class: "title" };
5
- const _hoisted_3 = { class: "title" };
6
- const _hoisted_4 = { class: "title" };
7
- const _hoisted_5 = { class: "bs-layout-horizontal justify-content-end gap-8" };
6
+ const _hoisted_3 = { class: "bs-layout-horizontal justify-content-end gap-8" };
8
7
  const _sfc_main = /* @__PURE__ */ defineComponent({
9
8
  __name: "YoutubeInsertModal",
10
9
  props: {
@@ -12,21 +11,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
12
11
  },
13
12
  setup(__props) {
14
13
  const props = __props;
15
- const data = ref({ url: "" });
14
+ const data = ref({ src: "", aspectRatio: "16/9" });
16
15
  const modalHandle = useModalHandle();
17
16
  const insert = () => {
18
- if (data.value.url) {
19
- props.editor.chain().focus().setYoutubeVideo({
20
- src: data.value.url,
21
- width: data.value.width || 640,
22
- height: data.value.height || 480
17
+ if (data.value.src) {
18
+ props.editor.chain().focus().command(({ commands }) => {
19
+ commands.insertContent({
20
+ type: "youtube",
21
+ attrs: youtubeInfoNumberToPixel(data.value)
22
+ });
23
+ return true;
23
24
  }).run();
24
25
  modalHandle.close();
25
26
  }
26
27
  };
27
28
  const close = () => modalHandle.close();
28
29
  modalHandle.setDefaultStyle({
29
- width: "500px",
30
+ width: "540px",
30
31
  height: "400px"
31
32
  });
32
33
  return (_ctx, _cache) => {
@@ -42,42 +43,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
42
43
  ]),
43
44
  createElementVNode("div", null, [
44
45
  createVNode(_sfc_main$3, {
45
- modelValue: data.value.url,
46
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => data.value.url = $event),
46
+ modelValue: data.value.src,
47
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => data.value.src = $event),
47
48
  name: "youtubeUrl",
48
49
  placeholder: "https://www.youtube.com/watch?v=...",
50
+ required: "",
49
51
  width: "100%"
50
52
  }, null, 8, ["modelValue"])
51
53
  ])
52
54
  ]),
53
- createElementVNode("div", null, [
54
- createElementVNode("div", _hoisted_3, [
55
- createVNode(_sfc_main$2, { label: { key: "bs.width" } })
56
- ]),
57
- createElementVNode("div", null, [
58
- createVNode(_sfc_main$4, {
59
- modelValue: data.value.width,
60
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => data.value.width = $event),
61
- width: "100px"
62
- }, null, 8, ["modelValue"])
63
- ])
64
- ]),
65
- createElementVNode("div", null, [
66
- createElementVNode("div", _hoisted_4, [
67
- createVNode(_sfc_main$2, { label: { key: "bs.height" } })
68
- ]),
69
- createElementVNode("div", null, [
70
- createVNode(_sfc_main$4, {
71
- modelValue: data.value.height,
72
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => data.value.height = $event),
73
- width: "100px"
74
- }, null, 8, ["modelValue"])
75
- ])
76
- ])
55
+ createVNode(_sfc_main$4, { "youtube-info": data.value }, null, 8, ["youtube-info"])
77
56
  ])
78
57
  ]),
79
58
  buttons: withCtx(() => [
80
- createElementVNode("div", _hoisted_5, [
59
+ createElementVNode("div", _hoisted_3, [
81
60
  createVNode(BSButton, {
82
61
  caption: { key: "btn.ok" },
83
62
  "button-color": "blue",