@codernote/record-tree 1.0.9 → 1.1.0
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/README.md +3 -0
- package/dist/index.js +641 -112
- package/package.json +3 -3
package/README.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,58 +1,591 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var M=document.createElement("style");M.appendChild(document.createTextNode(".popper{width:auto;background-color:#fafafa;color:#212121;text-align:center;padding:2px;display:inline-block;border-radius:3px;position:absolute;font-size:14px;font-weight:400;border:1px #ebebeb solid;z-index:200000;box-shadow:#3a3a3a 0 0 6px}.popper .popper__arrow{width:0;height:0;border-style:solid;position:absolute;margin:5px}.popper[x-placement^=top]{margin-bottom:5px}.popper[x-placement^=top] .popper__arrow{border-width:5px 5px 0 5px;border-color:#fafafa transparent transparent transparent;bottom:-5px;left:calc(50% - 5px);margin-top:0;margin-bottom:0}.popper[x-placement^=bottom]{margin-top:5px}.popper[x-placement^=bottom] .popper__arrow{border-width:0 5px 5px 5px;border-color:transparent transparent #fafafa transparent;top:-5px;left:calc(50% - 5px);margin-top:0;margin-bottom:0}.popper[x-placement^=right]{margin-left:5px}.popper[x-placement^=right] .popper__arrow{border-width:5px 5px 5px 0;border-color:transparent #fafafa transparent transparent;left:-5px;top:calc(50% - 5px);margin-left:0;margin-right:0}.popper[x-placement^=left]{margin-right:5px}.popper[x-placement^=left] .popper__arrow{border-width:5px 0 5px 5px;border-color:transparent transparent transparent #fafafa;right:-5px;top:calc(50% - 5px);margin-left:0;margin-right:0}[data-v-7f00d874] .popper{transform:translate3d(0,22px,0)!important}.record-tree-popper-content{display:flex;flex-wrap:wrap;padding:10px;box-shadow:0 2px 12px #1d1c1c1f;border:1px solid rgba(29,28,28,.12);border-radius:5px;overflow:hidden;background:#fff;z-index:9999}.record-tree-popper-content-item{padding:8px 10px;display:flex;align-items:center;justify-content:center;cursor:pointer}.record-tree ul{margin:0;padding:0}.record-tree-svg{display:inline-block;border-radius:9999px;color:#fff;cursor:pointer}.record-tree-title-bar{position:relative;display:flex;margin-bottom:3px}.record-tree-title{padding-left:25px;font-weight:700;outline:none;font-size:1.125rem;line-height:1.5;width:100%}.record-tree-popper-reference{display:flex;position:absolute;top:0px;left:0px;text-align:center;border-radius:9999px;color:#fff}.record-tree-mobile-options{position:fixed;bottom:0px;left:0px;width:100%;display:flex;justify-content:space-between;padding:5px 0;background:rgb(236,236,236)}.record-tree-option-left{display:flex;padding-left:10px}.record-tree-option-right{padding-right:10px}.record-tree-option-item{margin:0 5px;cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.lzx-waiting-move{box-shadow:0 2px 4px #0000001f,0 0 6px #0000000a}.record-tree-empty-icon{display:inline-block;border-radius:9999px}.record-tree-icon{display:inline-block;width:18px;height:18px;margin:0;padding:0!important;line-height:100%;font-size:0;background-position:center;background-repeat:no-repeat;background-size:14px;cursor:pointer}.record-tree-upload-loading{position:absolute;left:0;top:0;bottom:0;right:0;font-size:12px;font-weight:400;color:#666}.record-tree-upload-loading p{display:flex;justify-content:center;align-items:center;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:200px}.record-tree-icon-loading{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNzA2ODY0NzA3OTc0IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjQ0MTYiIHhtbG5zOnhsaW5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DAuMDAyIDE2LjI3Nzk2OC0xMy4xOTM5NzQgMjkuNDcxOTQyLTI5LjQ3MTk0MyAyOS40NzE5NDJ6TTUzMC42MTY5NjQgNTQxLjQ3MDk0Mkg0OTMuMzc5MDM2Yy0xNi4yNzM5NjggMC0yOS40NzE5NDItMTMuMTk1OTc0LTI5LjQ3MTk0Mi0yOS40NzE5NDIgMC0xNi4yNzc5NjggMTMuMTk3OTc0LTI5LjQ3MTk0MiAyOS40NzE5NDItMjkuNDcxOTQyaDM3LjIzNzkyOGMxNi4yNzM5NjggMCAyOS40NzE5NDIgMTMuMTk1OTc0IDI5LjQ3MTk0MiAyOS40NzE5NDIgMCAxNi4yNzc5NjgtMTMuMTkzOTc0IDI5LjQ3MTk0Mi0yOS40NzE5NDIgMjkuNDcxOTQyek02NjkuMTM4NjkzIDU0MS40NzA5NDJoLTM3LjIzNTkyN2MtMTYuMjczOTY4IDAtMjkuNDcxOTQyLTEzLjE5NTk3NC0yOS40NzE5NDMtMjkuNDcxOTQyIDAtMTYuMjc3OTY4IDEzLjE5Nzk3NC0yOS40NzE5NDIgMjkuNDcxOTQzLTI5LjQ3MTk0MmgzNy4yMzU5MjdjMTYuMjczOTY4IDAgMjkuNDcxOTQyIDEzLjE5NTk3NCAyOS40NzE5NDMgMjkuNDcxOTQyIDAuMDAyIDE2LjI3Nzk2OC0xMy4xOTM5NzQgMjkuNDcxOTQyLTI5LjQ3MTk0MyAyOS40NzE5NDJ6IiBmaWxsPSIjMkQ1MjdDIiBwLWlkPSI0NDI0Ij48L3BhdGg+PC9zdmc+);animation:rotate 2s linear infinite}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}")),document.head.appendChild(M)}}catch(T){console.error("vite-plugin-css-injected-by-js",T)}})();
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var M=document.createElement("style");M.appendChild(document.createTextNode('.node-div[data-v-d4b555c8]{display:flex;align-items:center}.node-text[data-v-d4b555c8]{margin-left:10px;flex:1;border:none;outline:none}.node-icon[data-v-d4b555c8]{position:absolute;top:4px;left:-18px;width:17px;height:17px;border-radius:10px;background-color:#fff;cursor:pointer}.node-icon[data-v-d4b555c8]:after{content:"";position:absolute;top:5px;left:5px;width:7px;height:7px;border-radius:10px;background-color:#eee}.node-icon[data-v-d4b555c8]:hover{background-color:#ccc}.node-media[data-v-d4b555c8]{position:relative;align-self:center;justify-self:center;display:inline-block;outline:none}.node-media:hover .node-del[data-v-d4b555c8]{display:block}.node-image img[data-v-d4b555c8]{width:auto;max-height:80px;outline:none}.node-audio[data-v-d4b555c8],.node-video[data-v-d4b555c8]{width:300px}.node-audio audio[data-v-d4b555c8]{width:300px;height:80px}.node-audio video[data-v-d4b555c8]{width:300px;height:80px}.node-del[data-v-d4b555c8]{cursor:pointer;display:none;width:15px;height:15px;position:absolute;top:-3px;right:-3px;background-color:#e6f7ff;background-size:100% 100%;border-radius:50%}.node-del[data-v-d4b555c8]:before,.node-del[data-v-d4b555c8]:after{content:"";position:absolute;top:50%;left:50%;width:2px;height:15px;background-color:#595959}.node-del[data-v-d4b555c8]:before{transform:translate(-50%,-50%) rotate(45deg)}.node-del[data-v-d4b555c8]:after{transform:translate(-50%,-50%) rotate(-45deg)}.node-ul[data-v-b5580425]{background-color:#fff;margin:0;padding:0;list-style:none}.node-li[data-v-b5580425]{padding:0;list-style:none;margin:0 0 0 12px;line-height:1.5;position:relative}[data-v-b5580425] .drag-over-top:before{content:"";width:100%;height:1px;background-color:#ccc;position:absolute}[data-v-b5580425] .drag-over-center{background-color:#ccc}[data-v-b5580425] .drag-over-bottom:after{content:"";width:100%;height:1px;background-color:#ccc;position:absolute;bottom:0}.collapsed>ul[data-v-b5580425]{display:none}.tree-title[data-v-b5580425]{padding-left:25px;font-weight:700;outline:none;font-size:1.125rem;line-height:1.5;width:100%}[data-v-b5580425] .node-li.has-child.collapsed .node-icon:after{background-color:#aaa}.popper{width:auto;background-color:#fafafa;color:#212121;text-align:center;padding:2px;display:inline-block;border-radius:3px;position:absolute;font-size:14px;font-weight:400;border:1px #ebebeb solid;z-index:200000;box-shadow:#3a3a3a 0 0 6px}.popper .popper__arrow{width:0;height:0;border-style:solid;position:absolute;margin:5px}.popper[x-placement^=top]{margin-bottom:5px}.popper[x-placement^=top] .popper__arrow{border-width:5px 5px 0 5px;border-color:#fafafa transparent transparent transparent;bottom:-5px;left:calc(50% - 5px);margin-top:0;margin-bottom:0}.popper[x-placement^=bottom]{margin-top:5px}.popper[x-placement^=bottom] .popper__arrow{border-width:0 5px 5px 5px;border-color:transparent transparent #fafafa transparent;top:-5px;left:calc(50% - 5px);margin-top:0;margin-bottom:0}.popper[x-placement^=right]{margin-left:5px}.popper[x-placement^=right] .popper__arrow{border-width:5px 5px 5px 0;border-color:transparent #fafafa transparent transparent;left:-5px;top:calc(50% - 5px);margin-left:0;margin-right:0}.popper[x-placement^=left]{margin-right:5px}.popper[x-placement^=left] .popper__arrow{border-width:5px 0 5px 5px;border-color:transparent transparent transparent #fafafa;right:-5px;top:calc(50% - 5px);margin-left:0;margin-right:0}[data-v-7f00d874] .popper{transform:translate3d(0,22px,0)!important}.record-tree-popper-content{display:flex;flex-wrap:wrap;padding:10px;box-shadow:0 2px 12px #1d1c1c1f;border:1px solid rgba(29,28,28,.12);border-radius:5px;overflow:hidden;background:#fff;z-index:9999}.record-tree-popper-content-item{padding:8px 10px;display:flex;align-items:center;justify-content:center;cursor:pointer}.record-tree ul{margin:0;padding:0}.record-tree-svg{display:inline-block;border-radius:9999px;color:#fff;cursor:pointer}.record-tree-title-bar{position:relative;display:flex;margin-bottom:3px}.record-tree-title{padding-left:25px;font-weight:700;outline:none;font-size:1.125rem;line-height:1.5;width:100%}.record-tree-popper-reference{display:flex;position:absolute;top:0px;left:0px;text-align:center;border-radius:9999px;color:#fff}.record-tree-mobile-options{position:fixed;bottom:0px;left:0px;width:100%;display:flex;justify-content:space-between;padding:5px 0;background:rgb(236,236,236)}.record-tree-option-left{display:flex;padding-left:10px}.record-tree-option-right{padding-right:10px}.record-tree-option-item{margin:0 5px;cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.lzx-waiting-move{box-shadow:0 2px 4px #0000001f,0 0 6px #0000000a}.record-tree-empty-icon{display:inline-block;border-radius:9999px}.record-tree-icon{display:inline-block;width:18px;height:18px;margin:0;padding:0!important;line-height:100%;font-size:0;background-position:center;background-repeat:no-repeat;background-size:14px;cursor:pointer}.record-tree-upload-loading{position:absolute;left:0;top:0;bottom:0;right:0;font-size:12px;font-weight:400;color:#666}.record-tree-upload-loading p{display:flex;justify-content:center;align-items:center;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:200px}.record-tree-icon-loading{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNzA2ODY0NzA3OTc0IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjQ0MTYiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTc0Mi4yOTQ1NSAzMzQuMjc3MzQ3bC01Mi41NzU4OTctNTIuNTc1ODk3Yy0xMC4wNjk5OC0x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Tc0LTI5LjQ3MTk0Mi0yOS40NzE5NDIgMC0xNi4yNzc5NjggMTMuMTk3OTc0LTI5LjQ3MTk0MiAyOS40NzE5NDItMjkuNDcxOTQyaDM3LjIzNzkyOGMxNi4yNzM5NjggMCAyOS40NzE5NDIgMTMuMTk1OTc0IDI5LjQ3MTk0MiAyOS40NzE5NDIgMCAxNi4yNzc5NjgtMTMuMTkzOTc0IDI5LjQ3MTk0Mi0yOS40NzE5NDIgMjkuNDcxOTQyek02NjkuMTM4NjkzIDU0MS40NzA5NDJoLTM3LjIzNTkyN2MtMTYuMjczOTY4IDAtMjkuNDcxOTQyLTEzLjE5NTk3NC0yOS40NzE5NDMtMjkuNDcxOTQyIDAtMTYuMjc3OTY4IDEzLjE5Nzk3NC0yOS40NzE5NDIgMjkuNDcxOTQzLTI5LjQ3MTk0MmgzNy4yMzU5MjdjMTYuMjczOTY4IDAgMjkuNDcxOTQyIDEzLjE5NTk3NCAyOS40NzE5NDMgMjkuNDcxOTQyIDAuMDAyIDE2LjI3Nzk2OC0xMy4xOTM5NzQgMjkuNDcxOTQyLTI5LjQ3MTk0MyAyOS40NzE5NDJ6IiBmaWxsPSIjMkQ1MjdDIiBwLWlkPSI0NDI0Ij48L3BhdGg+PC9zdmc+);animation:rotate 2s linear infinite}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}')),document.head.appendChild(M)}}catch(T){console.error("vite-plugin-css-injected-by-js",T)}})();
|
|
2
|
+
import { uuid as p, byNameFindIcon as T, oss as w, icons as E } from "@codernote/utils";
|
|
3
|
+
import k from "vue-inline-svg";
|
|
4
|
+
import D from "vue-popperjs";
|
|
5
|
+
class $ {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.events = {};
|
|
8
|
+
}
|
|
9
|
+
set(e, n) {
|
|
10
|
+
this[e] = n;
|
|
11
|
+
}
|
|
12
|
+
get(e) {
|
|
13
|
+
return this[e];
|
|
14
|
+
}
|
|
15
|
+
remove(e) {
|
|
16
|
+
delete this[e];
|
|
17
|
+
}
|
|
18
|
+
on(e, n) {
|
|
19
|
+
this.events[e] = n;
|
|
20
|
+
}
|
|
21
|
+
trigger(e) {
|
|
22
|
+
this.events[e] && (this.events[e](), delete this.events[e]);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const h = new $();
|
|
26
|
+
function f() {
|
|
27
|
+
let t = window.getSelection();
|
|
28
|
+
if (t.rangeCount > 0)
|
|
29
|
+
return t.getRangeAt(0).startOffset;
|
|
30
|
+
}
|
|
31
|
+
function u(t, e = 0, n = !1) {
|
|
32
|
+
if (!t || !t.isContentEditable) {
|
|
33
|
+
console.error("Element is not contenteditable");
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const s = window.getSelection(), i = document.createRange();
|
|
37
|
+
s.removeAllRanges();
|
|
38
|
+
try {
|
|
39
|
+
let o = t;
|
|
40
|
+
if (t.childNodes.length > 0 ? o = t.childNodes[0] : (n || e > 0) && (o = document.createTextNode(""), t.appendChild(o)), n)
|
|
41
|
+
i.selectNodeContents(o), i.collapse(!1);
|
|
42
|
+
else {
|
|
43
|
+
const r = Math.min(e, o.length || 0);
|
|
44
|
+
i.setStart(o, r), i.collapse(!0);
|
|
45
|
+
}
|
|
46
|
+
s.addRange(i);
|
|
47
|
+
} catch (o) {
|
|
48
|
+
console.error("Error setting focus position:", o);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function b(t) {
|
|
52
|
+
let e = t.target.getBoundingClientRect(), n = t.clientY, s = e.top + e.height / 3, i = e.top + e.height / 3 * 2;
|
|
53
|
+
return n < s ? "top" : n < i ? "center" : "bottom";
|
|
54
|
+
}
|
|
55
|
+
function y(t) {
|
|
56
|
+
return /<(img|audio|video)/.test(t.text) || t.type;
|
|
57
|
+
}
|
|
58
|
+
function N(t) {
|
|
59
|
+
const n = new DOMParser().parseFromString(t, "text/html"), s = n.querySelector("img"), i = n.querySelector("video"), o = n.querySelector("audio");
|
|
60
|
+
return s ? {
|
|
61
|
+
type: "image",
|
|
62
|
+
content: s.src
|
|
63
|
+
} : i ? {
|
|
64
|
+
type: "video",
|
|
65
|
+
content: i.src
|
|
66
|
+
} : o ? {
|
|
67
|
+
type: "audio",
|
|
68
|
+
content: o.src
|
|
69
|
+
} : null;
|
|
70
|
+
}
|
|
71
|
+
function C(t, e) {
|
|
72
|
+
var n;
|
|
73
|
+
return (n = e.children) != null && n.length ? e.children.some(
|
|
74
|
+
(s) => s.uuid === t.uuid || C(t, s)
|
|
75
|
+
) : !1;
|
|
76
|
+
}
|
|
77
|
+
function m(t, e, n, s, i, o, r, l) {
|
|
78
|
+
var a = typeof t == "function" ? t.options : t;
|
|
79
|
+
e && (a.render = e, a.staticRenderFns = n, a._compiled = !0), s && (a.functional = !0), o && (a._scopeId = "data-v-" + o);
|
|
80
|
+
var d;
|
|
81
|
+
if (r ? (d = function(c) {
|
|
82
|
+
c = c || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !c && typeof __VUE_SSR_CONTEXT__ < "u" && (c = __VUE_SSR_CONTEXT__), i && i.call(this, c), c && c._registeredComponents && c._registeredComponents.add(r);
|
|
83
|
+
}, a._ssrRegister = d) : i && (d = l ? function() {
|
|
84
|
+
i.call(
|
|
14
85
|
this,
|
|
15
|
-
(
|
|
86
|
+
(a.functional ? this.parent : this).$root.$options.shadowRoot
|
|
16
87
|
);
|
|
17
|
-
} :
|
|
18
|
-
if (
|
|
19
|
-
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
return
|
|
88
|
+
} : i), d)
|
|
89
|
+
if (a.functional) {
|
|
90
|
+
a._injectStyles = d;
|
|
91
|
+
var _ = a.render;
|
|
92
|
+
a.render = function(x, v) {
|
|
93
|
+
return d.call(v), _(x, v);
|
|
23
94
|
};
|
|
24
95
|
} else {
|
|
25
|
-
var
|
|
26
|
-
|
|
96
|
+
var g = a.beforeCreate;
|
|
97
|
+
a.beforeCreate = g ? [].concat(g, d) : [d];
|
|
27
98
|
}
|
|
28
99
|
return {
|
|
29
100
|
exports: t,
|
|
30
|
-
options:
|
|
101
|
+
options: a
|
|
31
102
|
};
|
|
32
103
|
}
|
|
33
|
-
const
|
|
104
|
+
const S = {
|
|
105
|
+
props: {
|
|
106
|
+
node: {
|
|
107
|
+
type: Object,
|
|
108
|
+
default: function() {
|
|
109
|
+
return {};
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
readOnly: {
|
|
113
|
+
type: Boolean,
|
|
114
|
+
default: !1
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
data: function() {
|
|
118
|
+
return {
|
|
119
|
+
disableInput: !0
|
|
120
|
+
};
|
|
121
|
+
},
|
|
122
|
+
computed: {
|
|
123
|
+
isMedia() {
|
|
124
|
+
return y(this.node);
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
methods: {
|
|
128
|
+
formatReadOnly(t) {
|
|
129
|
+
return (t || "").replace("contenteditable", "temp");
|
|
130
|
+
},
|
|
131
|
+
handleCompositionStart() {
|
|
132
|
+
this.disableInput = !1, clearTimeout(this.blurHdl);
|
|
133
|
+
},
|
|
134
|
+
handleCompositionEnd() {
|
|
135
|
+
this.disableInput = !0;
|
|
136
|
+
},
|
|
137
|
+
handleKeyup(t) {
|
|
138
|
+
const e = this.node;
|
|
139
|
+
if (this.isMedia)
|
|
140
|
+
return t.preventDefault(), !1;
|
|
141
|
+
if (this.disableInput || t.which === 32) {
|
|
142
|
+
const s = f(), i = e.text !== t.target.innerHTML;
|
|
143
|
+
e.text = t.target.innerHTML, this.$nextTick(() => {
|
|
144
|
+
u(t.target, s);
|
|
145
|
+
}), i && this.update();
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
handleKeydown(t) {
|
|
149
|
+
switch (t.key) {
|
|
150
|
+
case "Backspace":
|
|
151
|
+
this.handleBackspace(t);
|
|
152
|
+
break;
|
|
153
|
+
case "ArrowUp":
|
|
154
|
+
this.handleArrowUp(t);
|
|
155
|
+
break;
|
|
156
|
+
case "ArrowDown":
|
|
157
|
+
this.handleArrowDown(t);
|
|
158
|
+
break;
|
|
159
|
+
case "ArrowLeft":
|
|
160
|
+
this.handleArrowLeft(t);
|
|
161
|
+
break;
|
|
162
|
+
case "ArrowRight":
|
|
163
|
+
this.handleArrowRight(t);
|
|
164
|
+
break;
|
|
165
|
+
case "Tab":
|
|
166
|
+
this.handleTab(t);
|
|
167
|
+
break;
|
|
168
|
+
case "Enter":
|
|
169
|
+
this.handleEnter(t);
|
|
170
|
+
break;
|
|
171
|
+
default:
|
|
172
|
+
if (this.isMedia)
|
|
173
|
+
return t.preventDefault(), !1;
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
handleBackspace(t) {
|
|
178
|
+
var n;
|
|
179
|
+
const e = this.node;
|
|
180
|
+
if (this.isMedia)
|
|
181
|
+
t.preventDefault(), this.$emit("toPrevFocus", e, !0), this.remove();
|
|
182
|
+
else {
|
|
183
|
+
const s = window.getSelection();
|
|
184
|
+
let i = s.focusOffset - 1;
|
|
185
|
+
if (t.target && s && i < 0) {
|
|
186
|
+
if (t.preventDefault(), (n = e.children) != null && n.length)
|
|
187
|
+
return;
|
|
188
|
+
this.$emit("toPrevFocus", e, !0), this.$emit("remove", e);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
handleTab(t) {
|
|
193
|
+
this.$emit("tab", t, this.node);
|
|
194
|
+
},
|
|
195
|
+
handleEnter(t) {
|
|
196
|
+
const e = this.node;
|
|
197
|
+
if (t.preventDefault(), t.ctrlKey) {
|
|
198
|
+
this.$emit("collapse", e, !1);
|
|
199
|
+
const n = {
|
|
200
|
+
text: "",
|
|
201
|
+
uuid: p()
|
|
202
|
+
};
|
|
203
|
+
e.children ? e.children.unshift(n) : e.children = [n], this.update(), this.$nextTick(() => {
|
|
204
|
+
this.$emit("toFocus", n);
|
|
205
|
+
});
|
|
206
|
+
} else
|
|
207
|
+
this.disableInput && this.$emit("enter", e);
|
|
208
|
+
},
|
|
209
|
+
handleDbClick(t) {
|
|
210
|
+
t.preventDefault();
|
|
211
|
+
const e = window.getSelection();
|
|
212
|
+
e.removeAllRanges();
|
|
213
|
+
const n = document.createRange();
|
|
214
|
+
n.setStart(t.target.childNodes[0], 0), n.setEnd(t.target.childNodes[0], t.target.innerText.length), e.addRange(n);
|
|
215
|
+
},
|
|
216
|
+
handleArrowLeft(t) {
|
|
217
|
+
const e = this.node;
|
|
218
|
+
t.preventDefault();
|
|
219
|
+
const n = t.target, s = window.getSelection();
|
|
220
|
+
if (n && s) {
|
|
221
|
+
const i = s.focusOffset - 1;
|
|
222
|
+
i < 0 ? this.$emit("toPrevFocus", e, !0) : this.$nextTick(() => {
|
|
223
|
+
u(n, i);
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
handleArrowRight(t) {
|
|
228
|
+
const e = this.node;
|
|
229
|
+
t.preventDefault();
|
|
230
|
+
const n = t.target, s = window.getSelection();
|
|
231
|
+
if (n && s) {
|
|
232
|
+
const i = s.focusOffset + 1, o = n.innerText.length;
|
|
233
|
+
s.focusOffset === 0 && e.type ? u(n, i, !0) : i > o ? this.$emit("toNextFocus", e, !0, !0) : u(n, i);
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
handleArrowDown(t) {
|
|
237
|
+
const e = this.node;
|
|
238
|
+
t.preventDefault(), this.$emit("toNextFocus", e, !1, !0);
|
|
239
|
+
},
|
|
240
|
+
handleArrowUp(t) {
|
|
241
|
+
const e = this.node;
|
|
242
|
+
t.preventDefault(), this.$emit("toPrevFocus", e);
|
|
243
|
+
},
|
|
244
|
+
remove() {
|
|
245
|
+
this.$emit("remove", this.node);
|
|
246
|
+
},
|
|
247
|
+
update() {
|
|
248
|
+
this.$emit("change", this.node);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
var P = function() {
|
|
253
|
+
var e = this, n = e._self._c;
|
|
254
|
+
return n("div", { ref: "row", staticClass: "node-div" }, [n("span", { staticClass: "node-icon", on: { click: function(s) {
|
|
255
|
+
return s.stopPropagation(), e.$emit("collapse", e.node);
|
|
256
|
+
} } }), e.node.type ? n("div", { staticClass: "node-text", attrs: { contenteditable: !e.readOnly }, on: { compositionstart: function(s) {
|
|
257
|
+
return s.stopPropagation(), e.handleCompositionStart.apply(null, arguments);
|
|
258
|
+
}, compositionend: function(s) {
|
|
259
|
+
return s.stopPropagation(), e.handleCompositionEnd.apply(null, arguments);
|
|
260
|
+
}, keydown: function(s) {
|
|
261
|
+
return s.stopPropagation(), e.handleKeydown.apply(null, arguments);
|
|
262
|
+
}, dblclick: function(s) {
|
|
263
|
+
return s.stopPropagation(), e.handleDbClick.apply(null, arguments);
|
|
264
|
+
} } }, [n("div", { class: `node-media node-${e.node.type}`, attrs: { contenteditable: !e.readOnly } }, [e.node.type === "image" ? n("img", { attrs: { src: e.node.content, width: "80", height: "80" } }) : e._e(), e.node.type === "audio" ? n("audio", { attrs: { src: e.node.content, controls: "", width: "300", height: "80" } }) : e._e(), e.node.type === "video" ? n("video", { attrs: { src: e.node.content, controls: "", width: "300", height: "80" } }) : e._e(), e.readOnly ? e._e() : n("div", { staticClass: "node-del", on: { click: function(s) {
|
|
265
|
+
return s.stopPropagation(), e.remove.apply(null, arguments);
|
|
266
|
+
} } })])]) : n("div", { staticClass: "node-text", attrs: { contenteditable: !e.readOnly }, domProps: { innerHTML: e._s(e.readOnly ? e.formatReadOnly(e.node.text) : e.node.text) }, on: { compositionstart: function(s) {
|
|
267
|
+
return s.stopPropagation(), e.handleCompositionStart.apply(null, arguments);
|
|
268
|
+
}, compositionend: function(s) {
|
|
269
|
+
return s.stopPropagation(), e.handleCompositionEnd.apply(null, arguments);
|
|
270
|
+
}, keyup: function(s) {
|
|
271
|
+
return s.stopPropagation(), e.handleKeyup.apply(null, arguments);
|
|
272
|
+
}, keydown: function(s) {
|
|
273
|
+
return s.stopPropagation(), e.handleKeydown.apply(null, arguments);
|
|
274
|
+
}, dblclick: function(s) {
|
|
275
|
+
return s.stopPropagation(), e.handleDbClick.apply(null, arguments);
|
|
276
|
+
} } })]);
|
|
277
|
+
}, F = [], O = /* @__PURE__ */ m(
|
|
278
|
+
S,
|
|
279
|
+
P,
|
|
280
|
+
F,
|
|
281
|
+
!1,
|
|
282
|
+
null,
|
|
283
|
+
"d4b555c8",
|
|
284
|
+
null,
|
|
285
|
+
null
|
|
286
|
+
);
|
|
287
|
+
const I = O.exports;
|
|
288
|
+
const R = {
|
|
289
|
+
name: "tree-editor",
|
|
290
|
+
components: { Node: I },
|
|
291
|
+
props: {
|
|
292
|
+
nodes: {
|
|
293
|
+
type: Array,
|
|
294
|
+
default: function() {
|
|
295
|
+
return [];
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
readOnly: {
|
|
299
|
+
type: Boolean,
|
|
300
|
+
default: !1
|
|
301
|
+
},
|
|
302
|
+
allowEmpty: {
|
|
303
|
+
type: Boolean,
|
|
304
|
+
default: !1
|
|
305
|
+
},
|
|
306
|
+
enableDbEnter: {
|
|
307
|
+
type: Boolean,
|
|
308
|
+
default: !1
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
data: function() {
|
|
312
|
+
return {
|
|
313
|
+
status: {},
|
|
314
|
+
timeout: null
|
|
315
|
+
};
|
|
316
|
+
},
|
|
317
|
+
watch: {
|
|
318
|
+
nodes: {
|
|
319
|
+
handler() {
|
|
320
|
+
this.precheck();
|
|
321
|
+
},
|
|
322
|
+
immediate: !0
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
methods: {
|
|
326
|
+
handleDragStart(t, e) {
|
|
327
|
+
t.dataTransfer.setData("dragNode", JSON.stringify(e)), h.on("dragEnd", () => {
|
|
328
|
+
const n = this.nodes.filter((s) => s !== e);
|
|
329
|
+
this.update(n);
|
|
330
|
+
}), h.set("dragId", e.uuid);
|
|
331
|
+
},
|
|
332
|
+
handleDragLeave() {
|
|
333
|
+
this.clearDragClass();
|
|
334
|
+
},
|
|
335
|
+
handleDragOver(t, e) {
|
|
336
|
+
const n = t.currentTarget, s = h.get("dragId") ? document.getElementById(h.get("dragId")) : null;
|
|
337
|
+
if (!n || h.get("dragId") === e.uuid || s != null && s.querySelector(`[id="${e.uuid}"]`)) {
|
|
338
|
+
t.dataTransfer.dropEffect = "none";
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
this.clearDragClass();
|
|
342
|
+
const i = b(t);
|
|
343
|
+
i === "top" ? n.classList.add("drag-over-top") : i === "center" ? n.classList.add("drag-over-center") : n.classList.add("drag-over-bottom");
|
|
344
|
+
},
|
|
345
|
+
handleDrop(t, e) {
|
|
346
|
+
t.stopPropagation();
|
|
347
|
+
const n = t.dataTransfer.files;
|
|
348
|
+
if (this.clearDragClass(), n.length)
|
|
349
|
+
this.addFiles(n, e);
|
|
350
|
+
else {
|
|
351
|
+
let s = t.dataTransfer.getData("dragNode");
|
|
352
|
+
const i = b(t);
|
|
353
|
+
try {
|
|
354
|
+
s = JSON.parse(s);
|
|
355
|
+
} catch {
|
|
356
|
+
}
|
|
357
|
+
if (e.uuid === s.uuid || C(e, s))
|
|
358
|
+
return;
|
|
359
|
+
let o = [...this.nodes];
|
|
360
|
+
if (o.find((r) => r.uuid === s.uuid) ? o = o.filter((r) => r.uuid !== s.uuid) : h.trigger("dragEnd"), h.remove("dragId"), i === "center" && (this.status[e.uuid].collapsed = !1, e.children ? e.children.push(s) : e.children = [s], this.$nextTick(() => {
|
|
361
|
+
this.update(o);
|
|
362
|
+
})), i === "top") {
|
|
363
|
+
const r = o.findIndex((l) => l === e);
|
|
364
|
+
o.splice(r, 0, s), this.update(o);
|
|
365
|
+
}
|
|
366
|
+
if (i === "bottom") {
|
|
367
|
+
const r = o.findIndex((l) => l === e);
|
|
368
|
+
o.splice(r + 1, 0, s), this.update(o);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
handlePaste(t, e) {
|
|
373
|
+
const n = t.clipboardData.files;
|
|
374
|
+
n.length != 0 && (this.addFiles(n, e), t.preventDefault());
|
|
375
|
+
},
|
|
376
|
+
clearDragClass() {
|
|
377
|
+
["drag-over-top", "drag-over-center", "drag-over-bottom"].forEach(
|
|
378
|
+
(t) => {
|
|
379
|
+
document.querySelectorAll(`.${t}`).forEach((e) => e.classList.remove(t));
|
|
380
|
+
}
|
|
381
|
+
);
|
|
382
|
+
},
|
|
383
|
+
handleTab(t, e) {
|
|
384
|
+
var o;
|
|
385
|
+
t.preventDefault();
|
|
386
|
+
const n = [...this.nodes], s = n.findIndex((r) => r === e), i = f();
|
|
387
|
+
if (t.shiftKey)
|
|
388
|
+
this.$emit("transfer", e);
|
|
389
|
+
else if (s > 0) {
|
|
390
|
+
const r = this.nodes[s - 1];
|
|
391
|
+
(o = this.status[r.uuid]) != null && o.collapsed && (this.status[r.uuid].collapsed = !1), r.children ? r.children.push(e) : r.children = [e], n.splice(s, 1), this.update(n);
|
|
392
|
+
} else
|
|
393
|
+
t.target.focus();
|
|
394
|
+
this.$nextTick(() => {
|
|
395
|
+
u(this.getTextElement(e), i);
|
|
396
|
+
});
|
|
397
|
+
},
|
|
398
|
+
handleRemove(t) {
|
|
399
|
+
const e = this.nodes.filter((n) => n.uuid !== t.uuid);
|
|
400
|
+
if (!this.allowEmpty && this.nodes.length === 1) {
|
|
401
|
+
const n = {
|
|
402
|
+
text: "",
|
|
403
|
+
uuid: p()
|
|
404
|
+
};
|
|
405
|
+
e.push(n), setTimeout(() => {
|
|
406
|
+
this.toFocus(n);
|
|
407
|
+
}, 200);
|
|
408
|
+
}
|
|
409
|
+
this.update(e);
|
|
410
|
+
},
|
|
411
|
+
handleTransfer(t, e) {
|
|
412
|
+
const n = [...this.nodes], s = n.findIndex((o) => o === t), i = t.children.findIndex((o) => o === e);
|
|
413
|
+
t.children.splice(i, 1), n.splice(s + 1, 0, e), this.update(n);
|
|
414
|
+
},
|
|
415
|
+
handleEnter(t) {
|
|
416
|
+
this.enableDbEnter ? this.timeout ? (clearTimeout(this.timeout), this.timeout = null, this.$emit("dbEnter")) : this.timeout = setTimeout(() => {
|
|
417
|
+
clearTimeout(this.timeout), this.timeout = null, this.keyEnter(t);
|
|
418
|
+
}, 180) : this.keyEnter(t);
|
|
419
|
+
},
|
|
420
|
+
keyEnter(t) {
|
|
421
|
+
const e = y(t), n = this.nodes.findIndex((r) => r.uuid === t.uuid), s = f(), i = [...this.nodes], o = { text: "", uuid: p() };
|
|
422
|
+
if (e)
|
|
423
|
+
i.splice(n + 1, 0, o);
|
|
424
|
+
else {
|
|
425
|
+
let r = t.text.replace(/ ?/g, " ");
|
|
426
|
+
t.text = r.slice(0, s), o.text = r.slice(s, r.length), i.splice(n + 1, 0, o);
|
|
427
|
+
}
|
|
428
|
+
this.update(i), this.$nextTick(() => {
|
|
429
|
+
const r = this.getTextElement(o);
|
|
430
|
+
r == null || r.focus();
|
|
431
|
+
});
|
|
432
|
+
},
|
|
433
|
+
handleChangeChildren(t, e) {
|
|
434
|
+
t.children = e, this.update();
|
|
435
|
+
},
|
|
436
|
+
toPrevFocus(t, e = !1) {
|
|
437
|
+
var i;
|
|
438
|
+
const n = f(), s = this.nodes.findIndex((o) => o === t);
|
|
439
|
+
if (s === 0)
|
|
440
|
+
this.$emit("focusPrev", e);
|
|
441
|
+
else {
|
|
442
|
+
const o = this.nodes[s - 1], r = ((i = o.children) == null ? void 0 : i.length) && !this.status[o.uuid].collapsed, l = this.getTextElement(this.nodes[s - 1], r);
|
|
443
|
+
u(
|
|
444
|
+
l,
|
|
445
|
+
e ? l.innerText.length : n,
|
|
446
|
+
e
|
|
447
|
+
);
|
|
448
|
+
}
|
|
449
|
+
},
|
|
450
|
+
toNextFocus(t, e = !1, n = !1) {
|
|
451
|
+
var o;
|
|
452
|
+
const s = f(), i = this.nodes.findIndex((r) => r === t);
|
|
453
|
+
if (n && ((o = t.children) != null && o.length) && !this.status[t.uuid].collapsed) {
|
|
454
|
+
const r = this.getTextElement(t.children[0]);
|
|
455
|
+
u(r, e ? 0 : s);
|
|
456
|
+
} else if (i + 1 >= this.nodes.length)
|
|
457
|
+
this.$emit("focusNext", !0);
|
|
458
|
+
else {
|
|
459
|
+
const r = this.getTextElement(this.nodes[i + 1]);
|
|
460
|
+
u(r, e ? 0 : s);
|
|
461
|
+
}
|
|
462
|
+
},
|
|
463
|
+
toFocus(t, e = !1) {
|
|
464
|
+
let n = f();
|
|
465
|
+
const s = this.getTextElement(t);
|
|
466
|
+
u(s, n, e);
|
|
467
|
+
},
|
|
468
|
+
addFiles(t, e, n = 0) {
|
|
469
|
+
if (t) {
|
|
470
|
+
const i = Array.from(t).filter((r) => {
|
|
471
|
+
const l = r.type;
|
|
472
|
+
return l.startsWith("video") || l.startsWith("audio") || l.startsWith("image");
|
|
473
|
+
}).slice(0, 5), o = (r) => {
|
|
474
|
+
const l = [...this.nodes];
|
|
475
|
+
let a = l.findIndex((d) => d === e);
|
|
476
|
+
r.forEach((d, _) => {
|
|
477
|
+
const g = d.type.split("/")[0], c = d.url;
|
|
478
|
+
!e.text && !e.content && _ === 0 ? (e.type = g, e.content = c) : l.splice(a + 1 + n, 0, {
|
|
479
|
+
type: g,
|
|
480
|
+
content: c,
|
|
481
|
+
uuid: p()
|
|
482
|
+
}), a++;
|
|
483
|
+
}), console.log("update.."), this.update(l);
|
|
484
|
+
};
|
|
485
|
+
this.$emit("fileUpload", i, o);
|
|
486
|
+
}
|
|
487
|
+
},
|
|
488
|
+
handleCollapse(t, e) {
|
|
489
|
+
typeof e == "boolean" ? this.status[t.uuid].collapsed = e : this.status[t.uuid].collapsed = !this.status[t.uuid].collapsed;
|
|
490
|
+
},
|
|
491
|
+
getElement(t) {
|
|
492
|
+
return t && t.uuid ? document.getElementById(t.uuid) : null;
|
|
493
|
+
},
|
|
494
|
+
getTextElement(t, e = !1) {
|
|
495
|
+
const n = this.getElement(t);
|
|
496
|
+
if (e) {
|
|
497
|
+
const s = n.querySelectorAll(".node-text");
|
|
498
|
+
return s[s.length - 1];
|
|
499
|
+
}
|
|
500
|
+
return n == null ? void 0 : n.querySelector(".node-text");
|
|
501
|
+
},
|
|
502
|
+
head(t = !1) {
|
|
503
|
+
const e = this.getTextElement(this.nodes[0]);
|
|
504
|
+
return t && e && e.focus(), e;
|
|
505
|
+
},
|
|
506
|
+
// 前置数据处理,旧数据兼容
|
|
507
|
+
precheck() {
|
|
508
|
+
let t = !1;
|
|
509
|
+
this.nodes.forEach((e) => {
|
|
510
|
+
if (e.uuid || (e.uuid = p(), t = !0), y(e) && !e.type) {
|
|
511
|
+
const n = N(e.text);
|
|
512
|
+
n && (e.type = n.type, e.content = n.content), t = !0;
|
|
513
|
+
}
|
|
514
|
+
}), t ? this.update() : this.ensureStatus(this.nodes);
|
|
515
|
+
},
|
|
516
|
+
ensureStatus(t) {
|
|
517
|
+
t.forEach((e) => {
|
|
518
|
+
this.status[e.uuid] || (this.$set ? this.$set(this.status, e.uuid, { collapsed: !1 }) : this.status[e.uuid] = { collapsed: !1 });
|
|
519
|
+
});
|
|
520
|
+
},
|
|
521
|
+
handleNodeChange(t) {
|
|
522
|
+
const e = this.nodes.map((n) => n.uuid === t.uuid ? t : n);
|
|
523
|
+
this.update(e);
|
|
524
|
+
},
|
|
525
|
+
update(t = this.nodes) {
|
|
526
|
+
console.log("==update nodes list=="), this.ensureStatus(t), this.$emit("change", [...t]);
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
};
|
|
530
|
+
var A = function() {
|
|
531
|
+
var e = this, n = e._self._c;
|
|
532
|
+
return e.readOnly ? n("ul", { staticClass: "node-ul readOnly" }, e._l(e.nodes, function(s) {
|
|
533
|
+
return n("li", { key: s.uuid, class: {
|
|
534
|
+
"node-li": !0,
|
|
535
|
+
collapsed: e.status[s.uuid] ? e.status[s.uuid].collapsed : !1,
|
|
536
|
+
"has-child": !!(s.children || []).length
|
|
537
|
+
}, attrs: { id: `${s.uuid}` } }, [n("Node", { attrs: { node: s, readOnly: "" }, on: { collapse: e.handleCollapse } }), (s.children || []).length ? n("tree-editor", { attrs: { nodes: s.children } }) : e._e()], 1);
|
|
538
|
+
}), 0) : n("ul", { staticClass: "node-ul" }, e._l(e.nodes, function(s) {
|
|
539
|
+
return n("li", { key: s.uuid, ref: "elements", refInFor: !0, class: {
|
|
540
|
+
"node-li": !0,
|
|
541
|
+
collapsed: e.status[s.uuid] ? e.status[s.uuid].collapsed : !1,
|
|
542
|
+
"has-child": !!(s.children || []).length
|
|
543
|
+
}, attrs: { id: `${s.uuid}`, draggable: "true" }, on: { dragstart: function(i) {
|
|
544
|
+
return i.stopPropagation(), e.handleDragStart(i, s);
|
|
545
|
+
}, dragover: function(i) {
|
|
546
|
+
return i.stopPropagation(), i.preventDefault(), e.handleDragOver(i, s);
|
|
547
|
+
}, drop: function(i) {
|
|
548
|
+
return i.stopPropagation(), e.handleDrop(i, s);
|
|
549
|
+
}, dragleave: function(i) {
|
|
550
|
+
return i.stopPropagation(), e.handleDragLeave(i, s);
|
|
551
|
+
}, paste: function(i) {
|
|
552
|
+
return i.stopPropagation(), i.preventDefault(), e.handlePaste(i, s);
|
|
553
|
+
} } }, [n("Node", { attrs: { node: s }, on: { change: e.handleNodeChange, toPrevFocus: e.toPrevFocus, toNextFocus: e.toNextFocus, toFocus: e.toFocus, collapse: e.handleCollapse, enter: e.handleEnter, tab: e.handleTab, remove: e.handleRemove } }), (s.children || []).length ? n("tree-editor", { attrs: { nodes: s.children, allowEmpty: !0 }, on: { change: (i) => e.handleChangeChildren(s, i), focusPrev: (i) => e.toFocus(s, i), focusNext: (i) => e.toNextFocus(s, i), transfer: (i) => e.handleTransfer(s, i), fileUpload: (...i) => e.$emit("fileUpload", ...i) } }) : e._e()], 1);
|
|
554
|
+
}), 0);
|
|
555
|
+
}, L = [], B = /* @__PURE__ */ m(
|
|
556
|
+
R,
|
|
557
|
+
A,
|
|
558
|
+
L,
|
|
559
|
+
!1,
|
|
560
|
+
null,
|
|
561
|
+
"b5580425",
|
|
562
|
+
null,
|
|
563
|
+
null
|
|
564
|
+
);
|
|
565
|
+
const U = B.exports;
|
|
566
|
+
const K = {
|
|
34
567
|
components: {
|
|
35
|
-
Popper:
|
|
568
|
+
Popper: D
|
|
36
569
|
}
|
|
37
570
|
};
|
|
38
|
-
var
|
|
39
|
-
var e = this,
|
|
40
|
-
return
|
|
571
|
+
var M = function() {
|
|
572
|
+
var e = this, n = e._self._c;
|
|
573
|
+
return n("Popper", { attrs: { trigger: "hover", options: {
|
|
41
574
|
placement: "bottom",
|
|
42
575
|
modifiers: { offset: { offset: "0px, 22px" } }
|
|
43
|
-
} } }, [e._t("default"),
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
576
|
+
} } }, [e._t("default"), n("span", { attrs: { slot: "reference" }, slot: "reference" }, [e._t("trigger")], 2)], 2);
|
|
577
|
+
}, z = [], H = /* @__PURE__ */ m(
|
|
578
|
+
K,
|
|
579
|
+
M,
|
|
580
|
+
z,
|
|
48
581
|
!1,
|
|
49
582
|
null,
|
|
50
583
|
"7f00d874",
|
|
51
584
|
null,
|
|
52
585
|
null
|
|
53
586
|
);
|
|
54
|
-
const
|
|
55
|
-
const
|
|
587
|
+
const q = H.exports;
|
|
588
|
+
const W = {
|
|
56
589
|
show: !0,
|
|
57
590
|
// tag总开关,false时取消tag所有功能
|
|
58
591
|
tagSize: 20,
|
|
@@ -65,11 +598,12 @@ const N = {
|
|
|
65
598
|
// 图标定位left值
|
|
66
599
|
tagT: "3px"
|
|
67
600
|
// 图标定位top值
|
|
68
|
-
},
|
|
601
|
+
}, J = {
|
|
69
602
|
name: "recordTree",
|
|
70
603
|
components: {
|
|
71
|
-
InlineSvg:
|
|
72
|
-
Picker:
|
|
604
|
+
InlineSvg: k,
|
|
605
|
+
Picker: q,
|
|
606
|
+
TreeEditor: U
|
|
73
607
|
},
|
|
74
608
|
props: {
|
|
75
609
|
note: {
|
|
@@ -78,6 +612,10 @@ const N = {
|
|
|
78
612
|
return { title: "" };
|
|
79
613
|
}
|
|
80
614
|
},
|
|
615
|
+
readOnly: {
|
|
616
|
+
type: Boolean,
|
|
617
|
+
default: !1
|
|
618
|
+
},
|
|
81
619
|
// 图标相关配置
|
|
82
620
|
tags: {
|
|
83
621
|
type: Array,
|
|
@@ -105,68 +643,53 @@ const N = {
|
|
|
105
643
|
},
|
|
106
644
|
data() {
|
|
107
645
|
return {
|
|
108
|
-
treeEditor: null,
|
|
109
646
|
uploadLoading: !1,
|
|
110
647
|
timeout: null,
|
|
111
|
-
tagConfig: { ...
|
|
648
|
+
tagConfig: { ...W },
|
|
649
|
+
curNodes: [{ text: "", uuid: p() }],
|
|
650
|
+
noteId: null
|
|
112
651
|
};
|
|
113
652
|
},
|
|
114
|
-
async created() {
|
|
115
|
-
this.loadNote();
|
|
116
|
-
},
|
|
117
653
|
computed: {
|
|
118
654
|
curTag() {
|
|
119
655
|
var e;
|
|
120
656
|
if (this.note.tag)
|
|
121
657
|
return this.note.tag;
|
|
122
658
|
const t = this.tags.find(
|
|
123
|
-
(
|
|
659
|
+
(n) => n.created_at === this.note.tag_id
|
|
124
660
|
);
|
|
125
661
|
return {
|
|
126
662
|
...t,
|
|
127
|
-
icon: (e =
|
|
663
|
+
icon: t ? (e = T(t.icon)) == null ? void 0 : e.value : ""
|
|
128
664
|
};
|
|
129
|
-
},
|
|
130
|
-
curNodes() {
|
|
131
|
-
const t = this.note.content || '[{"text":""}]';
|
|
132
|
-
try {
|
|
133
|
-
return JSON.parse(t);
|
|
134
|
-
} catch {
|
|
135
|
-
return [
|
|
136
|
-
{
|
|
137
|
-
text: t
|
|
138
|
-
}
|
|
139
|
-
];
|
|
140
|
-
}
|
|
141
665
|
}
|
|
142
666
|
},
|
|
143
667
|
watch: {
|
|
144
|
-
note
|
|
145
|
-
t
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
const n = r.filter((l) => l.code === 0).map((l) => l.data);
|
|
154
|
-
e(n);
|
|
668
|
+
note: {
|
|
669
|
+
handler(t) {
|
|
670
|
+
if (this.note.content && (!this.noteId || this.noteId !== this.note.id || this.note.content !== (t == null ? void 0 : t.content)))
|
|
671
|
+
try {
|
|
672
|
+
this.noteId = this.note.id, this.curNodes = JSON.parse(this.note.content), this.curNodes.length || this.curNodes.push({
|
|
673
|
+
text: "",
|
|
674
|
+
uuid: p()
|
|
675
|
+
});
|
|
676
|
+
} catch {
|
|
155
677
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
...this.note,
|
|
160
|
-
content: JSON.stringify(t)
|
|
161
|
-
});
|
|
162
|
-
}), this.enableDbEnter && this.treeEditor.on("dbEnter", () => {
|
|
163
|
-
this.$emit("dbEnter");
|
|
164
|
-
}), this.treeEditor.loadTree(this.curNodes);
|
|
165
|
-
});
|
|
678
|
+
},
|
|
679
|
+
immediate: !0
|
|
680
|
+
}
|
|
166
681
|
},
|
|
167
682
|
methods: {
|
|
168
|
-
|
|
169
|
-
this.
|
|
683
|
+
handleFileUpload(t, e) {
|
|
684
|
+
this.uploadLoading = !0, w.uploadFile(t, (n, s) => {
|
|
685
|
+
if (s) {
|
|
686
|
+
if (e) {
|
|
687
|
+
const i = s.filter((o) => o.code === 0).map((o) => o.data);
|
|
688
|
+
e(i);
|
|
689
|
+
}
|
|
690
|
+
this.uploadLoading = !1;
|
|
691
|
+
}
|
|
692
|
+
});
|
|
170
693
|
},
|
|
171
694
|
treeChange(t) {
|
|
172
695
|
"content" in this.note && (this.note.content != t.content || this.note.title != t.title) && this.$emit("change", {
|
|
@@ -179,7 +702,7 @@ const N = {
|
|
|
179
702
|
},
|
|
180
703
|
// 根据svg的icon名找到svg实体
|
|
181
704
|
getSvgUrl(t) {
|
|
182
|
-
const e =
|
|
705
|
+
const e = E.find((n) => n.name === t.icon);
|
|
183
706
|
return (e == null ? void 0 : e.value) || "";
|
|
184
707
|
},
|
|
185
708
|
// 选择tag图标
|
|
@@ -207,8 +730,8 @@ const N = {
|
|
|
207
730
|
// 标题enter输入
|
|
208
731
|
handleTitleEnter(t) {
|
|
209
732
|
t.preventDefault(), this.enableDbEnter ? this.timeout ? (clearTimeout(this.timeout), this.timeout = null, this.titleBlur(t), this.$emit("dbEnter")) : this.timeout = setTimeout(() => {
|
|
210
|
-
this.timeout = null, this.
|
|
211
|
-
}, 180) : this.
|
|
733
|
+
this.timeout = null, this.focusContent();
|
|
734
|
+
}, 180) : this.focusContent();
|
|
212
735
|
},
|
|
213
736
|
handleDragoverTitle(t) {
|
|
214
737
|
t.preventDefault(), t.dataTransfer.dropEffect = "none";
|
|
@@ -216,15 +739,22 @@ const N = {
|
|
|
216
739
|
handleTitlePaste(t) {
|
|
217
740
|
if (t.clipboardData) {
|
|
218
741
|
const e = t.clipboardData.items;
|
|
219
|
-
Array.from(e).some((
|
|
220
|
-
{
|
|
221
|
-
target: this.treeEditor.head(!0)
|
|
222
|
-
},
|
|
742
|
+
Array.from(e).some((s) => s.kind === "file") && (t.preventDefault(), this.$refs.treeEditor.addFiles(
|
|
223
743
|
t.clipboardData.files,
|
|
744
|
+
this.curNodes[0],
|
|
224
745
|
-1
|
|
225
746
|
));
|
|
226
747
|
}
|
|
227
748
|
},
|
|
749
|
+
handleChangeNodes(t) {
|
|
750
|
+
this.curNodes = t, this.treeChange({
|
|
751
|
+
...this.note,
|
|
752
|
+
content: JSON.stringify(t)
|
|
753
|
+
});
|
|
754
|
+
},
|
|
755
|
+
focusContent() {
|
|
756
|
+
return this.$refs.treeEditor.head(!0);
|
|
757
|
+
},
|
|
228
758
|
// 移动端=====================
|
|
229
759
|
setToParent() {
|
|
230
760
|
let t = new KeyboardEvent("keydown", {
|
|
@@ -267,50 +797,49 @@ const N = {
|
|
|
267
797
|
}
|
|
268
798
|
}
|
|
269
799
|
};
|
|
270
|
-
var
|
|
271
|
-
var e = this,
|
|
272
|
-
return
|
|
273
|
-
return [
|
|
274
|
-
return
|
|
275
|
-
return e.tagSelect(
|
|
276
|
-
} } }, [e.getSvgUrl(
|
|
800
|
+
var V = function() {
|
|
801
|
+
var e = this, n = e._self._c;
|
|
802
|
+
return n("div", { staticClass: "record-tree", on: { mouseenter: e.hideHoverNote } }, [e._t("default"), n("div", { staticClass: "record-tree-title-bar" }, [e.tagVisible ? n("Picker", { scopedSlots: e._u([e.readOnly ? null : { key: "default", fn: function() {
|
|
803
|
+
return [n("div", { staticClass: "record-tree-popper-content", style: { width: e.tagConfig.popW, height: e.tagConfig.popH } }, e._l(e.tags, function(s, i) {
|
|
804
|
+
return n("span", { key: i, staticClass: "record-tree-popper-content-item", on: { click: function(o) {
|
|
805
|
+
return e.tagSelect(s);
|
|
806
|
+
} } }, [e.getSvgUrl(s) ? n("inline-svg", { staticClass: "record-tree-svg", style: { backgroundColor: s.color }, attrs: { src: e.getSvgUrl(s), width: e.tagConfig.tagSize, height: e.tagConfig.tagSize } }) : n("span", { staticClass: "record-tree-empty-icon", style: {
|
|
277
807
|
width: e.tagConfig.tagSize + "px",
|
|
278
808
|
height: e.tagConfig.tagSize + "px",
|
|
279
|
-
backgroundColor:
|
|
809
|
+
backgroundColor: s.color
|
|
280
810
|
} })], 1);
|
|
281
811
|
}), 0)];
|
|
282
812
|
}, proxy: !0 }, { key: "trigger", fn: function() {
|
|
283
|
-
return [
|
|
813
|
+
return [n("span", { staticClass: "record-tree-popper-reference", style: {
|
|
284
814
|
backgroundColor: e.curTag.color,
|
|
285
815
|
top: e.tagConfig.tagT,
|
|
286
816
|
left: e.tagConfig.tagL
|
|
287
|
-
} }, [e.curTag.icon ?
|
|
817
|
+
} }, [e.curTag.icon ? n("inline-svg", { staticClass: "record-tree-svg", attrs: { src: e.curTag.icon, width: e.tagConfig.tagSize, height: e.tagConfig.tagSize } }) : n("span", { staticClass: "record-tree-svg", style: {
|
|
288
818
|
width: e.tagConfig.tagSize + "px",
|
|
289
819
|
height: e.tagConfig.tagSize + "px",
|
|
290
820
|
backgroundColor: e.curTag.color
|
|
291
821
|
} })], 1)];
|
|
292
|
-
}, proxy: !0 }], null, !
|
|
293
|
-
|
|
294
|
-
}, keydown: function(
|
|
295
|
-
return !
|
|
296
|
-
}, paste: e.handleTitlePaste, dragover: e.handleDragoverTitle } })], 1),
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
}, function() {
|
|
822
|
+
}, proxy: !0 }], null, !0) }) : e._e(), n("div", { staticClass: "record-tree-title", attrs: { contenteditable: !e.readOnly, id: "tree_title" }, domProps: { innerHTML: e._s(e.note.title) }, on: { blur: e.titleBlur, click: function(s) {
|
|
823
|
+
s.stopPropagation();
|
|
824
|
+
}, keydown: function(s) {
|
|
825
|
+
return !s.type.indexOf("key") && e._k(s.keyCode, "enter", 13, s.key, "Enter") ? null : (s.preventDefault(), e.handleTitleEnter.apply(null, arguments));
|
|
826
|
+
}, paste: e.handleTitlePaste, dragover: e.handleDragoverTitle } })], 1), n("div", { staticStyle: { "padding-left": "25px" } }, [n("div", { attrs: { id: "root_tree" } }, [n("TreeEditor", { ref: "treeEditor", attrs: { nodes: e.curNodes, readOnly: e.readOnly, enableDbEnter: e.enableDbEnter }, on: { change: e.handleChangeNodes, fileUpload: e.handleFileUpload, dbEnter: function(s) {
|
|
827
|
+
return e.$emit("dbEnter");
|
|
828
|
+
} } })], 1)]), e.isMobile ? n("div", { staticClass: "record-tree-mobile-options" }, [n("div", { staticClass: "record-tree-option-left" }, [n("div", { staticClass: "record-tree-option-item", on: { click: e.setToParent } }, [e._v("向前")]), n("div", { staticClass: "record-tree-option-item", on: { click: e.setToChild } }, [e._v("向后")]), n("div", { staticClass: "record-tree-option-item", on: { click: e.setToUp } }, [e._v("向上")]), n("div", { staticClass: "record-tree-option-item", on: { click: e.setToDown } }, [e._v("向下")])]), n("div", { staticClass: "record-tree-option-right" }, [e.showComplete ? n("div", { staticClass: "record-tree-option-item", on: { click: e.complete } }, [e._v(" 完成 ")]) : e._e()])]) : e._e(), e.uploadLoading ? n("div", { staticClass: "record-tree-upload-loading" }, [e._m(0)]) : e._e()], 2);
|
|
829
|
+
}, G = [function() {
|
|
301
830
|
var t = this, e = t._self._c;
|
|
302
831
|
return e("p", [e("span", { staticClass: "record-tree-icon record-tree-icon-loading" }), e("b", [t._v("正在上传资源,请稍后...")])]);
|
|
303
|
-
}],
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
832
|
+
}], X = /* @__PURE__ */ m(
|
|
833
|
+
J,
|
|
834
|
+
V,
|
|
835
|
+
G,
|
|
307
836
|
!1,
|
|
308
837
|
null,
|
|
309
838
|
null,
|
|
310
839
|
null,
|
|
311
840
|
null
|
|
312
841
|
);
|
|
313
|
-
const
|
|
842
|
+
const Z = X.exports;
|
|
314
843
|
export {
|
|
315
|
-
|
|
844
|
+
Z as RecordTree
|
|
316
845
|
};
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codernote/record-tree",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"vue-inline-svg": "^2.1.3",
|
|
8
8
|
"vue-popperjs": "^2.3.0",
|
|
9
|
-
"@codernote/tree-editor": "1.0.
|
|
10
|
-
"@codernote/utils": "1.0
|
|
9
|
+
"@codernote/tree-editor": "1.0.8",
|
|
10
|
+
"@codernote/utils": "1.1.0"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"@vitejs/plugin-vue2": "^2.3.1",
|