@g1cloud/bluesea 5.0.0-alpha.87 → 5.0.0-alpha.89
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/user-text.scss +5 -0
- package/dist/{BSAlertModal-X21XOZQH.js → BSAlertModal-CSAY6m-x.js} +1 -1
- package/dist/{BSGridColumnSettingModal-B5xY515c.js → BSGridColumnSettingModal-DVdSXdMx.js} +1 -1
- package/dist/{BSYesNoModal-amPihhRt.js → BSYesNoModal-_AeoEVxn.js} +1 -1
- package/dist/{BSYoutubeInputModal-DqwD_TDh.js → BSYoutubeInputModal-DyHwlciu.js} +1 -1
- package/dist/{ImageInsertModal-O7_gSVjM.js → ImageInsertModal-Cy0hU-R3.js} +21 -56
- package/dist/ImageProperties.vue_vue_type_script_setup_true_lang-DddzKMfG.js +180 -0
- package/dist/ImagePropertiesModal-BMxxJcB7.js +98 -0
- package/dist/{LinkPropertiesModal-OrgRwFq9.js → LinkPropertiesModal-B7x_jnpK.js} +23 -6
- package/dist/{TableInsertModal-xhx0jflB.js → TableInsertModal-dWhd9ZtU.js} +1 -1
- package/dist/{YoutubeInsertModal-C7zAFv7s.js → YoutubeInsertModal-CgS3KPA9.js} +22 -39
- package/dist/YoutubeProperties.vue_vue_type_script_setup_true_lang-CJu6r-45.js +181 -0
- package/dist/{YoutubePropertiesModal-DQuowlky.js → YoutubePropertiesModal-D9SE-PLP.js} +21 -52
- package/dist/bluesea.js +181 -180
- package/dist/bluesea.umd.cjs +1728 -1232
- package/dist/component/grid/BSGrid.vue.d.ts +3 -3
- package/dist/component/grid/BSGridCell.vue.d.ts +3 -3
- package/dist/component/richtext/BSRichText.vue.d.ts +6 -0
- package/dist/component/richtext/RichTextLib.d.ts +14 -0
- package/dist/component/richtext/RichTextModel.d.ts +3 -0
- package/dist/component/richtext/RichTextToolbar.vue.d.ts +4 -0
- package/dist/component/richtext/image/ImageProperties.vue.d.ts +19 -0
- package/dist/component/richtext/image/RichTextImageLib.d.ts +4 -9
- package/dist/component/richtext/tool/ToolButtonTextAlign.vue.d.ts +19 -0
- package/dist/component/richtext/youtube/RichTextYoutubeLib.d.ts +6 -4
- package/dist/component/richtext/youtube/YoutubeProperties.vue.d.ts +19 -0
- package/dist/config/config.d.ts +2 -0
- package/dist/{index-BpZ4E6SC.js → index-CZ9WU3n0.js} +932 -675
- package/dist/index.d.ts +2 -0
- package/dist/style.css +50 -136
- package/dist/util/componentUtil.d.ts +18 -1
- package/package.json +1 -1
- package/text/bluesea_text_en.json +48 -0
- package/text/bluesea_text_ja.json +48 -0
- package/text/bluesea_text_ko.json +48 -0
- package/text/bluesea_text_zh.json +48 -0
- package/dist/ImagePropertiesModal-C30pqiB6.js +0 -138
- /package/dist/component/richtext/{ToolButtonColor.vue.d.ts → tool/ToolButtonFontColor.vue.d.ts} +0 -0
- /package/dist/component/richtext/{ToolButtonFontSize.vue.d.ts → tool/ToolButtonFontSize.vue.d.ts} +0 -0
- /package/dist/component/richtext/{ToolButtonFontStyle.vue.d.ts → tool/ToolButtonFontStyle.vue.d.ts} +0 -0
- /package/dist/component/richtext/{ToolButtonHeading.vue.d.ts → tool/ToolButtonHeading.vue.d.ts} +0 -0
- /package/dist/component/richtext/{ToolButtonAlign.vue.d.ts → tool/ToolButtonListItem.vue.d.ts} +0 -0
- /package/dist/component/richtext/{ToolButtonMaximize.vue.d.ts → tool/ToolButtonMaximize.vue.d.ts} +0 -0
package/css/user-text.scss
CHANGED
|
@@ -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-
|
|
2
|
+
import { u as useModalHandle, _ as _sfc_main$1, B as BSButton, v as vFocusOnLoad, i as vT } from "./index-CZ9WU3n0.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-
|
|
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-CZ9WU3n0.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-
|
|
2
|
+
import { u as useModalHandle, _ as _sfc_main$1, B as BSButton, i as vT } from "./index-CZ9WU3n0.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-
|
|
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-CZ9WU3n0.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
|
-
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-
|
|
1
|
+
import { defineComponent, computed, 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-CZ9WU3n0.js";
|
|
3
|
+
import { _ as _sfc_main$5 } from "./ImageProperties.vue_vue_type_script_setup_true_lang-DddzKMfG.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: "
|
|
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: {
|
|
@@ -13,6 +11,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13
11
|
},
|
|
14
12
|
emits: ["insertImage"],
|
|
15
13
|
setup(__props, { emit: __emit }) {
|
|
14
|
+
const props = __props;
|
|
15
|
+
const disabled = computed(() => !props.editor.isEditable);
|
|
16
16
|
const emit = __emit;
|
|
17
17
|
const tabs = [
|
|
18
18
|
// {tabId: 'upload', caption: {key: 'Upload'}},
|
|
@@ -20,31 +20,30 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
20
20
|
];
|
|
21
21
|
const currentTab = ref("upload");
|
|
22
22
|
const image = ref();
|
|
23
|
-
const data = ref({
|
|
23
|
+
const data = ref({ src: "" });
|
|
24
24
|
const modalHandle = useModalHandle();
|
|
25
25
|
const insert = () => {
|
|
26
26
|
if (currentTab.value === "upload" && (image.value && image.value.fileUrl)) {
|
|
27
27
|
emit("insertImage", {
|
|
28
|
-
|
|
28
|
+
src: image.value.fileUrl,
|
|
29
29
|
alt: image.value.altText
|
|
30
30
|
});
|
|
31
31
|
modalHandle.close();
|
|
32
|
-
} else if (currentTab.value === "input" && data.value.
|
|
32
|
+
} else if (currentTab.value === "input" && data.value.src) {
|
|
33
33
|
emit("insertImage", data.value);
|
|
34
34
|
modalHandle.close();
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
const close = () => modalHandle.close();
|
|
38
38
|
modalHandle.setDefaultStyle({
|
|
39
|
-
width: "
|
|
40
|
-
height: "420px"
|
|
39
|
+
width: "540px"
|
|
41
40
|
});
|
|
42
41
|
return (_ctx, _cache) => {
|
|
43
42
|
return openBlock(), createBlock(_sfc_main$1, { title: { key: "bs.richtext.insertImage" } }, {
|
|
44
43
|
default: withCtx(() => [
|
|
45
44
|
createVNode(_sfc_main$2, {
|
|
46
45
|
"tab-id": currentTab.value,
|
|
47
|
-
"onUpdate:tabId": _cache[
|
|
46
|
+
"onUpdate:tabId": _cache[1] || (_cache[1] = ($event) => currentTab.value = $event),
|
|
48
47
|
tabs,
|
|
49
48
|
class: "compact",
|
|
50
49
|
"keep-tabs": ""
|
|
@@ -60,54 +59,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
60
59
|
]),
|
|
61
60
|
createElementVNode("div", null, [
|
|
62
61
|
createVNode(_sfc_main$4, {
|
|
63
|
-
modelValue: data.value.
|
|
64
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => data.value.
|
|
62
|
+
modelValue: data.value.src,
|
|
63
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => data.value.src = $event),
|
|
64
|
+
disabled: disabled.value,
|
|
65
65
|
class: "flex-grow-1",
|
|
66
66
|
name: "url",
|
|
67
|
+
required: "",
|
|
67
68
|
width: "100%"
|
|
68
|
-
}, null, 8, ["modelValue"])
|
|
69
|
+
}, null, 8, ["modelValue", "disabled"])
|
|
69
70
|
])
|
|
70
71
|
]),
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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
|
-
])
|
|
72
|
+
createVNode(_sfc_main$5, {
|
|
73
|
+
disabled: disabled.value,
|
|
74
|
+
"image-info": data.value
|
|
75
|
+
}, null, 8, ["disabled", "image-info"])
|
|
111
76
|
], 512), [
|
|
112
77
|
[vShow, active]
|
|
113
78
|
])
|
|
@@ -116,7 +81,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
116
81
|
}, 8, ["tab-id"])
|
|
117
82
|
]),
|
|
118
83
|
buttons: withCtx(() => [
|
|
119
|
-
createElementVNode("div",
|
|
84
|
+
createElementVNode("div", _hoisted_3, [
|
|
120
85
|
createVNode(BSButton, {
|
|
121
86
|
caption: { key: "btn.ok" },
|
|
122
87
|
"button-color": "blue",
|
|
@@ -0,0 +1,180 @@
|
|
|
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-CZ9WU3n0.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
|
+
disabled: { type: Boolean }
|
|
13
|
+
},
|
|
14
|
+
setup(__props) {
|
|
15
|
+
return (_ctx, _cache) => {
|
|
16
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
17
|
+
createElementVNode("div", null, [
|
|
18
|
+
createElementVNode("div", _hoisted_1, [
|
|
19
|
+
createVNode(_sfc_main$1, { label: { key: "bs.fileupload.alt" } })
|
|
20
|
+
]),
|
|
21
|
+
createElementVNode("div", null, [
|
|
22
|
+
createVNode(_sfc_main$2, {
|
|
23
|
+
modelValue: _ctx.imageInfo.alt,
|
|
24
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.imageInfo.alt = $event),
|
|
25
|
+
disabled: _ctx.disabled,
|
|
26
|
+
name: "alt",
|
|
27
|
+
width: "100%"
|
|
28
|
+
}, null, 8, ["modelValue", "disabled"])
|
|
29
|
+
])
|
|
30
|
+
]),
|
|
31
|
+
createElementVNode("div", null, [
|
|
32
|
+
createElementVNode("div", _hoisted_2, [
|
|
33
|
+
createVNode(_sfc_main$1, { label: { key: "bs.size" } })
|
|
34
|
+
]),
|
|
35
|
+
createElementVNode("div", null, [
|
|
36
|
+
withDirectives(createVNode(_sfc_main$2, {
|
|
37
|
+
modelValue: _ctx.imageInfo.width,
|
|
38
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.imageInfo.width = $event),
|
|
39
|
+
disabled: _ctx.disabled,
|
|
40
|
+
name: "width",
|
|
41
|
+
prefix: "W",
|
|
42
|
+
width: "100px"
|
|
43
|
+
}, null, 8, ["modelValue", "disabled"]), [
|
|
44
|
+
[
|
|
45
|
+
unref(vT),
|
|
46
|
+
{ key: "bs.width" },
|
|
47
|
+
void 0,
|
|
48
|
+
{ title: true }
|
|
49
|
+
]
|
|
50
|
+
]),
|
|
51
|
+
_cache[9] || (_cache[9] = createTextVNode(" x ")),
|
|
52
|
+
withDirectives(createVNode(_sfc_main$2, {
|
|
53
|
+
modelValue: _ctx.imageInfo.height,
|
|
54
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.imageInfo.height = $event),
|
|
55
|
+
disabled: _ctx.disabled,
|
|
56
|
+
name: "height",
|
|
57
|
+
prefix: "H",
|
|
58
|
+
width: "100px"
|
|
59
|
+
}, null, 8, ["modelValue", "disabled"]), [
|
|
60
|
+
[
|
|
61
|
+
unref(vT),
|
|
62
|
+
{ key: "bs.height" },
|
|
63
|
+
void 0,
|
|
64
|
+
{ title: true }
|
|
65
|
+
]
|
|
66
|
+
])
|
|
67
|
+
])
|
|
68
|
+
]),
|
|
69
|
+
createElementVNode("div", null, [
|
|
70
|
+
createElementVNode("div", _hoisted_3, [
|
|
71
|
+
createVNode(_sfc_main$1, { label: { key: "bs.maxSize" } })
|
|
72
|
+
]),
|
|
73
|
+
createElementVNode("div", null, [
|
|
74
|
+
withDirectives(createVNode(_sfc_main$2, {
|
|
75
|
+
modelValue: _ctx.imageInfo.maxWidth,
|
|
76
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.imageInfo.maxWidth = $event),
|
|
77
|
+
disabled: _ctx.disabled,
|
|
78
|
+
name: "maxWidth",
|
|
79
|
+
prefix: "W",
|
|
80
|
+
width: "100px"
|
|
81
|
+
}, null, 8, ["modelValue", "disabled"]), [
|
|
82
|
+
[
|
|
83
|
+
unref(vT),
|
|
84
|
+
{ key: "bs.maxWidth" },
|
|
85
|
+
void 0,
|
|
86
|
+
{ title: true }
|
|
87
|
+
]
|
|
88
|
+
]),
|
|
89
|
+
_cache[10] || (_cache[10] = createTextVNode(" x ")),
|
|
90
|
+
withDirectives(createVNode(_sfc_main$2, {
|
|
91
|
+
modelValue: _ctx.imageInfo.maxHeight,
|
|
92
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => _ctx.imageInfo.maxHeight = $event),
|
|
93
|
+
disabled: _ctx.disabled,
|
|
94
|
+
name: "maxHeight",
|
|
95
|
+
prefix: "H",
|
|
96
|
+
width: "100px"
|
|
97
|
+
}, null, 8, ["modelValue", "disabled"]), [
|
|
98
|
+
[
|
|
99
|
+
unref(vT),
|
|
100
|
+
{ key: "bs.maxHeight" },
|
|
101
|
+
void 0,
|
|
102
|
+
{ title: true }
|
|
103
|
+
]
|
|
104
|
+
])
|
|
105
|
+
])
|
|
106
|
+
]),
|
|
107
|
+
createElementVNode("div", null, [
|
|
108
|
+
createElementVNode("div", _hoisted_4, [
|
|
109
|
+
createVNode(_sfc_main$1, { label: { key: "bs.margin" } })
|
|
110
|
+
]),
|
|
111
|
+
createElementVNode("div", _hoisted_5, [
|
|
112
|
+
withDirectives(createVNode(_sfc_main$2, {
|
|
113
|
+
modelValue: _ctx.imageInfo.marginLeft,
|
|
114
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => _ctx.imageInfo.marginLeft = $event),
|
|
115
|
+
disabled: _ctx.disabled,
|
|
116
|
+
prefix: { type: "font-icon", value: "keyboard_arrow_left" },
|
|
117
|
+
name: "marginLeft",
|
|
118
|
+
width: "80px"
|
|
119
|
+
}, null, 8, ["modelValue", "disabled"]), [
|
|
120
|
+
[
|
|
121
|
+
unref(vT),
|
|
122
|
+
{ key: "bs.left" },
|
|
123
|
+
void 0,
|
|
124
|
+
{ title: true }
|
|
125
|
+
]
|
|
126
|
+
]),
|
|
127
|
+
withDirectives(createVNode(_sfc_main$2, {
|
|
128
|
+
modelValue: _ctx.imageInfo.marginTop,
|
|
129
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => _ctx.imageInfo.marginTop = $event),
|
|
130
|
+
disabled: _ctx.disabled,
|
|
131
|
+
prefix: { type: "font-icon", value: "keyboard_arrow_up" },
|
|
132
|
+
name: "marginTop",
|
|
133
|
+
width: "80px"
|
|
134
|
+
}, null, 8, ["modelValue", "disabled"]), [
|
|
135
|
+
[
|
|
136
|
+
unref(vT),
|
|
137
|
+
{ key: "bs.top" },
|
|
138
|
+
void 0,
|
|
139
|
+
{ title: true }
|
|
140
|
+
]
|
|
141
|
+
]),
|
|
142
|
+
withDirectives(createVNode(_sfc_main$2, {
|
|
143
|
+
modelValue: _ctx.imageInfo.marginBottom,
|
|
144
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => _ctx.imageInfo.marginBottom = $event),
|
|
145
|
+
disabled: _ctx.disabled,
|
|
146
|
+
prefix: { type: "font-icon", value: "keyboard_arrow_down" },
|
|
147
|
+
name: "marginBottom",
|
|
148
|
+
width: "80px"
|
|
149
|
+
}, null, 8, ["modelValue", "disabled"]), [
|
|
150
|
+
[
|
|
151
|
+
unref(vT),
|
|
152
|
+
{ key: "bs.bottom" },
|
|
153
|
+
void 0,
|
|
154
|
+
{ title: true }
|
|
155
|
+
]
|
|
156
|
+
]),
|
|
157
|
+
withDirectives(createVNode(_sfc_main$2, {
|
|
158
|
+
modelValue: _ctx.imageInfo.marginRight,
|
|
159
|
+
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => _ctx.imageInfo.marginRight = $event),
|
|
160
|
+
disabled: _ctx.disabled,
|
|
161
|
+
prefix: { type: "font-icon", value: "keyboard_arrow_right" },
|
|
162
|
+
name: "marginRight",
|
|
163
|
+
width: "80px"
|
|
164
|
+
}, null, 8, ["modelValue", "disabled"]), [
|
|
165
|
+
[
|
|
166
|
+
unref(vT),
|
|
167
|
+
{ key: "bs.right" },
|
|
168
|
+
void 0,
|
|
169
|
+
{ title: true }
|
|
170
|
+
]
|
|
171
|
+
])
|
|
172
|
+
])
|
|
173
|
+
])
|
|
174
|
+
], 64);
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
export {
|
|
179
|
+
_sfc_main as _
|
|
180
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { defineComponent, computed, 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 imageInfoNumberToPixel, l as formValidator } from "./index-CZ9WU3n0.js";
|
|
3
|
+
import { _ as _sfc_main$4 } from "./ImageProperties.vue_vue_type_script_setup_true_lang-DddzKMfG.js";
|
|
4
|
+
const _hoisted_1 = { class: "title" };
|
|
5
|
+
const _hoisted_2 = { class: "bs-layout-horizontal justify-content-end gap-8" };
|
|
6
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
+
__name: "ImagePropertiesModal",
|
|
8
|
+
props: {
|
|
9
|
+
editor: {}
|
|
10
|
+
},
|
|
11
|
+
setup(__props) {
|
|
12
|
+
const props = __props;
|
|
13
|
+
const disabled = computed(() => !props.editor.isEditable);
|
|
14
|
+
const data = ref();
|
|
15
|
+
onMounted(() => {
|
|
16
|
+
const selection = props.editor.state.selection;
|
|
17
|
+
const { node } = findImageNode(selection);
|
|
18
|
+
if (node) {
|
|
19
|
+
data.value = {
|
|
20
|
+
...node.attrs,
|
|
21
|
+
src: node.attrs.src
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
const modalHandle = useModalHandle();
|
|
26
|
+
const form = useTemplateRef("form");
|
|
27
|
+
const validator = formValidator({ element: form });
|
|
28
|
+
const save = async () => {
|
|
29
|
+
await validator.validate();
|
|
30
|
+
props.editor.chain().focus().command(({ tr }) => {
|
|
31
|
+
const { node, nodePos } = findImageNode(tr.selection);
|
|
32
|
+
if (node && nodePos && data.value) {
|
|
33
|
+
tr.setNodeMarkup(nodePos - 1, null, {
|
|
34
|
+
...node.attrs,
|
|
35
|
+
...imageInfoNumberToPixel(data.value)
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
return true;
|
|
39
|
+
}).run();
|
|
40
|
+
modalHandle.close();
|
|
41
|
+
};
|
|
42
|
+
const close = () => modalHandle.close();
|
|
43
|
+
modalHandle.setDefaultStyle({
|
|
44
|
+
width: "540px"
|
|
45
|
+
});
|
|
46
|
+
return (_ctx, _cache) => {
|
|
47
|
+
return openBlock(), createBlock(_sfc_main$1, { title: { key: "bs.contenteditor.image" } }, {
|
|
48
|
+
default: withCtx(() => [
|
|
49
|
+
data.value ? (openBlock(), createElementBlock("div", {
|
|
50
|
+
key: 0,
|
|
51
|
+
ref_key: "form",
|
|
52
|
+
ref: form,
|
|
53
|
+
class: "bs-layout-form title-w-8"
|
|
54
|
+
}, [
|
|
55
|
+
createElementVNode("div", null, [
|
|
56
|
+
createElementVNode("div", _hoisted_1, [
|
|
57
|
+
createVNode(_sfc_main$2, { label: { key: "bs.url" } })
|
|
58
|
+
]),
|
|
59
|
+
createElementVNode("div", null, [
|
|
60
|
+
createVNode(_sfc_main$3, {
|
|
61
|
+
modelValue: data.value.src,
|
|
62
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => data.value.src = $event),
|
|
63
|
+
disabled: "",
|
|
64
|
+
name: "src",
|
|
65
|
+
required: "",
|
|
66
|
+
width: "100%"
|
|
67
|
+
}, null, 8, ["modelValue"])
|
|
68
|
+
])
|
|
69
|
+
]),
|
|
70
|
+
createVNode(_sfc_main$4, {
|
|
71
|
+
disabled: disabled.value,
|
|
72
|
+
"image-info": data.value
|
|
73
|
+
}, null, 8, ["disabled", "image-info"])
|
|
74
|
+
], 512)) : createCommentVNode("", true)
|
|
75
|
+
]),
|
|
76
|
+
buttons: withCtx(() => [
|
|
77
|
+
createElementVNode("div", _hoisted_2, [
|
|
78
|
+
createVNode(BSButton, {
|
|
79
|
+
caption: { key: "btn.ok" },
|
|
80
|
+
"button-color": "blue",
|
|
81
|
+
"data-id": "okBtn",
|
|
82
|
+
onClick: save
|
|
83
|
+
}),
|
|
84
|
+
createVNode(BSButton, {
|
|
85
|
+
caption: { key: "btn.cancel" },
|
|
86
|
+
"data-id": "cancelBtn",
|
|
87
|
+
onClick: close
|
|
88
|
+
})
|
|
89
|
+
])
|
|
90
|
+
]),
|
|
91
|
+
_: 1
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
export {
|
|
97
|
+
_sfc_main as default
|
|
98
|
+
};
|
|
@@ -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-
|
|
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-CZ9WU3n0.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: "
|
|
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, {
|
|
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",
|
|
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-
|
|
2
|
+
import { u as useModalHandle, _ as _sfc_main$1, b as _sfc_main$2, h as _sfc_main$3, B as BSButton } from "./index-CZ9WU3n0.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
|
-
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,
|
|
1
|
+
import { defineComponent, computed, 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, B as BSButton, y as youtubeInfoNumberToPixel } from "./index-CZ9WU3n0.js";
|
|
3
|
+
import { _ as _sfc_main$4 } from "./YoutubeProperties.vue_vue_type_script_setup_true_lang-CJu6r-45.js";
|
|
3
4
|
const _hoisted_1 = { class: "bs-layout-form" };
|
|
4
5
|
const _hoisted_2 = { class: "title" };
|
|
5
|
-
const _hoisted_3 = { class: "
|
|
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,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12
11
|
},
|
|
13
12
|
setup(__props) {
|
|
14
13
|
const props = __props;
|
|
15
|
-
const
|
|
14
|
+
const disabled = computed(() => !props.editor.isEditable);
|
|
15
|
+
const data = ref({ src: "", aspectRatio: "16/9" });
|
|
16
16
|
const modalHandle = useModalHandle();
|
|
17
17
|
const insert = () => {
|
|
18
|
-
if (data.value.
|
|
19
|
-
props.editor.chain().focus().
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
if (data.value.src) {
|
|
19
|
+
props.editor.chain().focus().command(({ commands }) => {
|
|
20
|
+
commands.insertContent({
|
|
21
|
+
type: "youtube",
|
|
22
|
+
attrs: youtubeInfoNumberToPixel(data.value)
|
|
23
|
+
});
|
|
24
|
+
return true;
|
|
23
25
|
}).run();
|
|
24
26
|
modalHandle.close();
|
|
25
27
|
}
|
|
26
28
|
};
|
|
27
29
|
const close = () => modalHandle.close();
|
|
28
30
|
modalHandle.setDefaultStyle({
|
|
29
|
-
width: "
|
|
31
|
+
width: "540px",
|
|
30
32
|
height: "400px"
|
|
31
33
|
});
|
|
32
34
|
return (_ctx, _cache) => {
|
|
@@ -42,42 +44,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
42
44
|
]),
|
|
43
45
|
createElementVNode("div", null, [
|
|
44
46
|
createVNode(_sfc_main$3, {
|
|
45
|
-
modelValue: data.value.
|
|
46
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => data.value.
|
|
47
|
+
modelValue: data.value.src,
|
|
48
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => data.value.src = $event),
|
|
47
49
|
name: "youtubeUrl",
|
|
48
50
|
placeholder: "https://www.youtube.com/watch?v=...",
|
|
51
|
+
required: "",
|
|
49
52
|
width: "100%"
|
|
50
53
|
}, null, 8, ["modelValue"])
|
|
51
54
|
])
|
|
52
55
|
]),
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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
|
-
])
|
|
56
|
+
createVNode(_sfc_main$4, {
|
|
57
|
+
disabled: disabled.value,
|
|
58
|
+
"youtube-info": data.value
|
|
59
|
+
}, null, 8, ["disabled", "youtube-info"])
|
|
77
60
|
])
|
|
78
61
|
]),
|
|
79
62
|
buttons: withCtx(() => [
|
|
80
|
-
createElementVNode("div",
|
|
63
|
+
createElementVNode("div", _hoisted_3, [
|
|
81
64
|
createVNode(BSButton, {
|
|
82
65
|
caption: { key: "btn.ok" },
|
|
83
66
|
"button-color": "blue",
|