@g1cloud/bluesea 5.0.0-beta.2 → 5.0.0-beta.3

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 (39) hide show
  1. package/dist/{BSAlertModal-BixCrZDD.js → BSAlertModal-xBi30_WT.js} +1 -1
  2. package/dist/{BSGridColumnSettingModal-CVVenSnr.js → BSGridColumnSettingModal-CGOmNxYg.js} +1 -1
  3. package/dist/{BSRichTextMaximizedModal-BqzE5__U.js → BSRichTextMaximizedModal-bwfs_ETq.js} +1 -1
  4. package/dist/{BSYesNoModal-B5lERw_k.js → BSYesNoModal-g_jspSyV.js} +1 -1
  5. package/dist/{BSYoutubeInputModal-eRBqHjeW.js → BSYoutubeInputModal-gxqSatHw.js} +1 -1
  6. package/dist/{ImageInsertModal-DvKLXL1n.js → ImageInsertModal-BjQMX1aF.js} +2 -2
  7. package/dist/{ImageProperties.vue_vue_type_script_setup_true_lang-DVUZuLfG.js → ImageProperties.vue_vue_type_script_setup_true_lang-DngZdEN7.js} +1 -1
  8. package/dist/{ImagePropertiesModal-Dsg6BS63.js → ImagePropertiesModal-BVMSRdqN.js} +2 -2
  9. package/dist/{LinkPropertiesModal-Ct0ykD4j.js → LinkPropertiesModal-CjQMdxnd.js} +1 -1
  10. package/dist/{TableInsertModal-BhyzkcTU.js → TableInsertModal-W9oMIgb_.js} +1 -1
  11. package/dist/TablePropertiesModal-rKhKzzYG.js +353 -0
  12. package/dist/{VideoInsertModal-BAwRYBzU.js → VideoInsertModal-DMtZM5vy.js} +2 -2
  13. package/dist/{VideoProperties.vue_vue_type_script_setup_true_lang-BfwBHyER.js → VideoProperties.vue_vue_type_script_setup_true_lang-CbE-PZdm.js} +1 -1
  14. package/dist/{VideoPropertiesModal-B2FeEw4W.js → VideoPropertiesModal-CLkvzq3Y.js} +2 -2
  15. package/dist/{YoutubeInsertModal-EU6G-021.js → YoutubeInsertModal-4_qANoY5.js} +3 -3
  16. package/dist/{YoutubeProperties.vue_vue_type_script_setup_true_lang-Ci3ndkZR.js → YoutubeProperties.vue_vue_type_script_setup_true_lang-B-LT9GYf.js} +1 -1
  17. package/dist/{YoutubePropertiesModal-CRy6zJwZ.js → YoutubePropertiesModal-BKwZsK6d.js} +2 -2
  18. package/dist/bluesea.js +21 -21
  19. package/dist/bluesea.umd.cjs +433 -197
  20. package/dist/component/input/BSMultiSelect.vue.d.ts +6 -6
  21. package/dist/component/input/BSSelect.vue.d.ts +6 -6
  22. package/dist/component/input/BSSelectPopup.vue.d.ts +6 -6
  23. package/dist/component/input/BSTreeMultiSelect.vue.d.ts +6 -6
  24. package/dist/component/input/BSTreeSelect.vue.d.ts +6 -6
  25. package/dist/component/richtext/RichTextModel.d.ts +1 -0
  26. package/dist/component/richtext/richTextUtil.d.ts +1 -1
  27. package/dist/component/richtext/table/RichTextTableCell.d.ts +1 -0
  28. package/dist/component/richtext/table/RichTextTableLib.d.ts +7 -1
  29. package/dist/component/tree/BSTree.vue.d.ts +3 -3
  30. package/dist/component/tree/BSTreeRow.vue.d.ts +3 -3
  31. package/dist/directive/vT.d.ts +1 -0
  32. package/dist/{index-CDwzpZX0.js → index-BQZ3zTp7.js} +160 -93
  33. package/package.json +3 -3
  34. package/text/bluesea_text_en.json +12 -0
  35. package/text/bluesea_text_fr.json +12 -0
  36. package/text/bluesea_text_ja.json +12 -0
  37. package/text/bluesea_text_ko.json +12 -0
  38. package/text/bluesea_text_zh.json +12 -0
  39. package/dist/TablePropertiesModal-BAxcByTD.js +0 -184
@@ -1,184 +0,0 @@
1
- import { defineComponent, computed, ref, onMounted, useTemplateRef, createBlock, openBlock, withCtx, createElementVNode, createVNode, createElementBlock, createCommentVNode, withDirectives, createTextVNode, unref } from "vue";
2
- import { k as componentUtil, u as useModalHandle, _ as _sfc_main$1, B as BSButton, b as _sfc_main$2, c as _sfc_main$3, v as vT, l as formValidator } from "./index-CDwzpZX0.js";
3
- const findTableNode = (selection, type) => {
4
- const head = selection.$head;
5
- let depth = head.depth;
6
- let node = head.node(depth);
7
- while (depth > 0 && node && node.type.name !== type) {
8
- node = head.node(--depth);
9
- }
10
- if (node && node.type.name === type) {
11
- const nodePos = head.start(depth);
12
- return { node, nodePos };
13
- } else {
14
- return {};
15
- }
16
- };
17
- const tableInfoNumberToPixel = (data) => {
18
- return {
19
- ...data,
20
- width: componentUtil.numberToPixel(data.width),
21
- height: componentUtil.numberToPixel(data.height),
22
- maxWidth: componentUtil.numberToPixel(data.maxWidth),
23
- maxHeight: componentUtil.numberToPixel(data.maxHeight),
24
- marginLeft: componentUtil.numberToPixel(data.marginLeft),
25
- marginTop: componentUtil.numberToPixel(data.marginTop),
26
- marginRight: componentUtil.numberToPixel(data.marginRight),
27
- marginBottom: componentUtil.numberToPixel(data.marginBottom)
28
- };
29
- };
30
- const _hoisted_1 = { class: "title" };
31
- const _hoisted_2 = { class: "title" };
32
- const _hoisted_3 = { class: "bs-layout-horizontal justify-content-end gap-8" };
33
- const _sfc_main = /* @__PURE__ */ defineComponent({
34
- __name: "TablePropertiesModal",
35
- props: {
36
- editor: {}
37
- },
38
- setup(__props) {
39
- const props = __props;
40
- const disabled = computed(() => !props.editor.isEditable);
41
- const data = ref();
42
- onMounted(() => {
43
- const selection = props.editor.state.selection;
44
- const { node } = findTableNode(selection, "table");
45
- if (node) {
46
- data.value = {
47
- ...node.attrs
48
- };
49
- }
50
- });
51
- const modalHandle = useModalHandle();
52
- const form = useTemplateRef("form");
53
- const validator = formValidator({ element: form });
54
- const save = async () => {
55
- await validator.validate();
56
- props.editor.chain().focus().command(({ tr }) => {
57
- const { node, nodePos } = findTableNode(tr.selection, "table");
58
- if (node && nodePos && data.value) {
59
- tr.setNodeMarkup(nodePos - 1, null, {
60
- ...node.attrs,
61
- ...tableInfoNumberToPixel(data.value)
62
- });
63
- }
64
- return true;
65
- }).run();
66
- modalHandle.close();
67
- };
68
- const close = () => {
69
- modalHandle.close();
70
- };
71
- modalHandle.setDefaultStyle({
72
- width: "500px",
73
- height: "400px"
74
- });
75
- return (_ctx, _cache) => {
76
- return openBlock(), createBlock(_sfc_main$1, { title: { key: "bs.richtext.table" } }, {
77
- default: withCtx(() => [
78
- data.value ? (openBlock(), createElementBlock("div", {
79
- key: 0,
80
- ref_key: "form",
81
- ref: form,
82
- class: "bs-layout-form title-w-8"
83
- }, [
84
- createElementVNode("div", null, [
85
- createElementVNode("div", _hoisted_1, [
86
- createVNode(_sfc_main$2, { label: { key: "bs.size" } })
87
- ]),
88
- createElementVNode("div", null, [
89
- withDirectives(createVNode(_sfc_main$3, {
90
- modelValue: data.value.width,
91
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => data.value.width = $event),
92
- disabled: disabled.value,
93
- name: "width",
94
- prefix: "W",
95
- width: "100px"
96
- }, null, 8, ["modelValue", "disabled"]), [
97
- [
98
- unref(vT),
99
- { key: "bs.width" },
100
- void 0,
101
- { title: true }
102
- ]
103
- ]),
104
- _cache[4] || (_cache[4] = createTextVNode(" x ")),
105
- withDirectives(createVNode(_sfc_main$3, {
106
- modelValue: data.value.height,
107
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => data.value.height = $event),
108
- disabled: disabled.value,
109
- name: "height",
110
- prefix: "H",
111
- width: "100px"
112
- }, null, 8, ["modelValue", "disabled"]), [
113
- [
114
- unref(vT),
115
- { key: "bs.height" },
116
- void 0,
117
- { title: true }
118
- ]
119
- ])
120
- ])
121
- ]),
122
- createElementVNode("div", null, [
123
- createElementVNode("div", _hoisted_2, [
124
- createVNode(_sfc_main$2, { label: { key: "bs.maxSize" } })
125
- ]),
126
- createElementVNode("div", null, [
127
- withDirectives(createVNode(_sfc_main$3, {
128
- modelValue: data.value.maxWidth,
129
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => data.value.maxWidth = $event),
130
- disabled: disabled.value,
131
- name: "maxWidth",
132
- prefix: "W",
133
- width: "100px"
134
- }, null, 8, ["modelValue", "disabled"]), [
135
- [
136
- unref(vT),
137
- { key: "bs.maxWidth" },
138
- void 0,
139
- { title: true }
140
- ]
141
- ]),
142
- _cache[5] || (_cache[5] = createTextVNode(" x ")),
143
- withDirectives(createVNode(_sfc_main$3, {
144
- modelValue: data.value.maxHeight,
145
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => data.value.maxHeight = $event),
146
- disabled: disabled.value,
147
- name: "maxHeight",
148
- prefix: "H",
149
- width: "100px"
150
- }, null, 8, ["modelValue", "disabled"]), [
151
- [
152
- unref(vT),
153
- { key: "bs.maxHeight" },
154
- void 0,
155
- { title: true }
156
- ]
157
- ])
158
- ])
159
- ])
160
- ], 512)) : createCommentVNode("", true)
161
- ]),
162
- buttons: withCtx(() => [
163
- createElementVNode("div", _hoisted_3, [
164
- createVNode(BSButton, {
165
- caption: { key: "bs.ok" },
166
- "button-color": "blue",
167
- "data-id": "okBtn",
168
- onClick: save
169
- }),
170
- createVNode(BSButton, {
171
- caption: { key: "bs.cancel" },
172
- "data-id": "cancelBtn",
173
- onClick: close
174
- })
175
- ])
176
- ]),
177
- _: 1
178
- });
179
- };
180
- }
181
- });
182
- export {
183
- _sfc_main as default
184
- };