@opentiny/tiny-engine-toolbar-collaboration 2.4.0 → 2.5.0-alpha.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/dist/index.js +77 -66
- package/dist/style.css +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1,17 +1,28 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { ToolbarBase as
|
|
6
|
-
const
|
|
7
|
-
|
|
2
|
+
import { useLayout as _, callEntry as S } from "@opentiny/tiny-engine-meta-register";
|
|
3
|
+
import { resolveComponent as p, createBlock as b, openBlock as n, withCtx as i, createElementVNode as s, createVNode as g, createElementBlock as l, Fragment as f, renderList as v, toDisplayString as u, createCommentVNode as y, reactive as w, watchEffect as B } from "vue";
|
|
4
|
+
import { Popover as E } from "@opentiny/vue";
|
|
5
|
+
import { ToolbarBase as h } from "@opentiny/tiny-engine-common";
|
|
6
|
+
const V = {
|
|
7
|
+
id: "engine.toolbars.collaboration",
|
|
8
|
+
type: "toolbars",
|
|
9
|
+
title: "collaboration",
|
|
10
|
+
options: {
|
|
11
|
+
icon: {
|
|
12
|
+
default: "team-collaboration"
|
|
13
|
+
},
|
|
14
|
+
renderType: "slot",
|
|
15
|
+
collapsed: !0
|
|
16
|
+
}
|
|
17
|
+
}, C = (r, o) => {
|
|
18
|
+
const t = r.__vccOpts || r;
|
|
8
19
|
for (const [e, d] of o)
|
|
9
|
-
|
|
10
|
-
return
|
|
11
|
-
},
|
|
20
|
+
t[e] = d;
|
|
21
|
+
return t;
|
|
22
|
+
}, D = {
|
|
12
23
|
components: {
|
|
13
|
-
TinyPopover:
|
|
14
|
-
ToolbarBase:
|
|
24
|
+
TinyPopover: E,
|
|
25
|
+
ToolbarBase: h
|
|
15
26
|
},
|
|
16
27
|
props: {
|
|
17
28
|
options: {
|
|
@@ -20,38 +31,49 @@ const B = (r, o) => {
|
|
|
20
31
|
}
|
|
21
32
|
},
|
|
22
33
|
setup() {
|
|
23
|
-
const {
|
|
34
|
+
const {
|
|
35
|
+
layoutState: r
|
|
36
|
+
} = _(), o = w({
|
|
24
37
|
outsideVisible: !1,
|
|
25
38
|
insideVisible: !1,
|
|
26
39
|
url: "",
|
|
27
40
|
userLists: []
|
|
28
41
|
});
|
|
29
|
-
|
|
42
|
+
B(() => {
|
|
30
43
|
var e;
|
|
31
|
-
o.url = "img/defaultAvator.png", o.userLists = [
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
o.url = "img/defaultAvator.png", o.userLists = [{
|
|
45
|
+
pageName: "当前页",
|
|
46
|
+
users: [{
|
|
47
|
+
userHead: "img/defaultAvator.png",
|
|
48
|
+
userName: (e = r.pageStatus.data) == null ? void 0 : e.username,
|
|
49
|
+
status: "编辑"
|
|
50
|
+
}]
|
|
51
|
+
}];
|
|
52
|
+
});
|
|
53
|
+
const t = S(() => !0, {
|
|
54
|
+
metaData: {
|
|
55
|
+
id: `${V.id}.isSingle`
|
|
56
|
+
},
|
|
57
|
+
ctx: () => ({
|
|
58
|
+
layoutState: r,
|
|
59
|
+
state: o,
|
|
60
|
+
isSingle: t,
|
|
61
|
+
useLayout: _,
|
|
62
|
+
ToolbarBase: h
|
|
63
|
+
})
|
|
64
|
+
});
|
|
65
|
+
return {
|
|
44
66
|
state: o,
|
|
45
|
-
isSingle:
|
|
67
|
+
isSingle: t
|
|
46
68
|
};
|
|
47
69
|
}
|
|
48
|
-
},
|
|
49
|
-
function
|
|
50
|
-
const
|
|
51
|
-
return n(),
|
|
70
|
+
}, T = { class: "collaboration-container" }, A = { class: "collaborators-list" }, H = { class: "page-name" }, O = ["src"], P = { class: "user-item-name" }, j = { class: "user-item-status" }, F = { class: "icon collaboration-wrap" }, U = { class: "icon-hides" }, q = { key: 0 };
|
|
71
|
+
function z(r, o, t, e, d, J) {
|
|
72
|
+
const k = p("svg-icon"), m = p("tiny-popover"), N = p("toolbar-base");
|
|
73
|
+
return n(), b(N, { options: t.options }, {
|
|
52
74
|
default: i(() => [
|
|
53
|
-
|
|
54
|
-
|
|
75
|
+
s("span", T, [
|
|
76
|
+
g(m, {
|
|
55
77
|
modelValue: e.state.outsideVisible,
|
|
56
78
|
"onUpdate:modelValue": o[0] || (o[0] = (a) => e.state.outsideVisible = a),
|
|
57
79
|
trigger: "click",
|
|
@@ -60,7 +82,7 @@ function U(r, o, s, e, d, G) {
|
|
|
60
82
|
"popper-class": "toolbar-right-popover collaborator"
|
|
61
83
|
}, {
|
|
62
84
|
reference: i(() => [
|
|
63
|
-
|
|
85
|
+
g(m, {
|
|
64
86
|
class: "toolbar-right-user",
|
|
65
87
|
trigger: "hover",
|
|
66
88
|
"open-delay": 1e3,
|
|
@@ -71,14 +93,14 @@ function U(r, o, s, e, d, G) {
|
|
|
71
93
|
reference: i(() => {
|
|
72
94
|
var a;
|
|
73
95
|
return [
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
e.state.url ? (n(),
|
|
96
|
+
s("span", F, [
|
|
97
|
+
s("span", U, [
|
|
98
|
+
e.state.url ? (n(), b(k, {
|
|
77
99
|
key: 0,
|
|
78
|
-
name:
|
|
79
|
-
}, null, 8, ["name"])) :
|
|
100
|
+
name: t.options.icon.default || t.options.icon
|
|
101
|
+
}, null, 8, ["name"])) : y("", !0)
|
|
80
102
|
]),
|
|
81
|
-
(a =
|
|
103
|
+
(a = t.options) != null && a.collapsed ? (n(), l("span", q, "多人协作")) : y("", !0)
|
|
82
104
|
])
|
|
83
105
|
];
|
|
84
106
|
}),
|
|
@@ -86,24 +108,24 @@ function U(r, o, s, e, d, G) {
|
|
|
86
108
|
}, 8, ["content"])
|
|
87
109
|
]),
|
|
88
110
|
default: i(() => [
|
|
89
|
-
|
|
90
|
-
(n(!0), l(
|
|
91
|
-
key:
|
|
111
|
+
s("div", A, [
|
|
112
|
+
(n(!0), l(f, null, v(e.state.userLists, (a, x) => (n(), l("div", {
|
|
113
|
+
key: x,
|
|
92
114
|
class: "collaborators-list-group"
|
|
93
115
|
}, [
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
(n(!0), l(
|
|
97
|
-
key:
|
|
116
|
+
s("span", H, u(a.pageName), 1),
|
|
117
|
+
s("ul", null, [
|
|
118
|
+
(n(!0), l(f, null, v(a.users, (c, L) => (n(), l("li", {
|
|
119
|
+
key: L,
|
|
98
120
|
class: "user-item"
|
|
99
121
|
}, [
|
|
100
|
-
|
|
122
|
+
s("img", {
|
|
101
123
|
class: "user-item-head",
|
|
102
124
|
src: c.userHead,
|
|
103
125
|
alt: ""
|
|
104
|
-
}, null, 8,
|
|
105
|
-
|
|
106
|
-
|
|
126
|
+
}, null, 8, O),
|
|
127
|
+
s("span", P, u(c.userName), 1),
|
|
128
|
+
s("span", j, "正在" + u(c.status), 1)
|
|
107
129
|
]))), 128))
|
|
108
130
|
])
|
|
109
131
|
]))), 128))
|
|
@@ -116,21 +138,10 @@ function U(r, o, s, e, d, G) {
|
|
|
116
138
|
_: 1
|
|
117
139
|
}, 8, ["options"]);
|
|
118
140
|
}
|
|
119
|
-
const
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
title: "collaboration",
|
|
123
|
-
options: {
|
|
124
|
-
icon: {
|
|
125
|
-
default: "team-collaboration"
|
|
126
|
-
},
|
|
127
|
-
renderType: "slot",
|
|
128
|
-
collapsed: !0
|
|
129
|
-
}
|
|
130
|
-
}, W = {
|
|
131
|
-
...z,
|
|
132
|
-
entry: q
|
|
141
|
+
const G = /* @__PURE__ */ C(D, [["render", z], ["__scopeId", "data-v-04f54116"]]), X = {
|
|
142
|
+
...V,
|
|
143
|
+
entry: G
|
|
133
144
|
};
|
|
134
145
|
export {
|
|
135
|
-
|
|
146
|
+
X as default
|
|
136
147
|
};
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.collaboration-container[data-v-
|
|
1
|
+
.collaboration-container[data-v-04f54116] .reference-wrapper{display:flex}.toolbar-right-user[data-v-04f54116] .reference-wrapper{padding:0!important}.collaborators-list .page-name[data-v-04f54116]{display:inline-block;width:100%;font-size:14px;padding:12px 20px;color:var(--te-toolbars-collaboration-text-color-secondary);line-height:18px;font-weight:600}.collaborators-list .user-item[data-v-04f54116]{padding:10px 16px;display:flex;align-items:center}.collaborators-list .user-item[data-v-04f54116]:hover{background:var(--te-toolbars-collaboration-bg-color-hover)}.collaborators-list .user-item .user-item-head[data-v-04f54116]{width:26px;height:26px;border-radius:50%}.collaborators-list .user-item .user-item-name[data-v-04f54116]{font-size:14px;color:var(--te-toolbars-collaboration-text-color-primary);line-height:16px;font-weight:400;margin:0 4px 0 8px}.collaborators-list .user-item .user-item-status[data-v-04f54116]{font-size:14px}.collaboration-wrap[data-v-04f54116]{display:flex;align-items:center;cursor:pointer;font-size:12px}.collaboration-wrap .user-head[data-v-04f54116]{width:16px;height:16px;border-radius:50%;margin-right:8px;z-index:9;border:1px solid var(--te-toolbars-collaboration-border-color)}:root{--te-toolbars-collaboration-text-color-primary: var(--te-common-text-primary);--te-toolbars-collaboration-text-color-secondary: var(--te-common-text-secondary);--te-toolbars-collaboration-bg-color-hover: var(--te-common-bg-container);--te-toolbars-collaboration-border-color: var(--te-common-border-default)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentiny/tiny-engine-toolbar-collaboration",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0-alpha.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"homepage": "https://opentiny.design/tiny-engine",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@opentiny/tiny-engine-common": "2.
|
|
29
|
-
"@opentiny/tiny-engine-meta-register": "2.
|
|
28
|
+
"@opentiny/tiny-engine-common": "2.5.0-alpha.0",
|
|
29
|
+
"@opentiny/tiny-engine-meta-register": "2.5.0-alpha.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@opentiny/tiny-engine-vite-plugin-meta-comments": "2.
|
|
32
|
+
"@opentiny/tiny-engine-vite-plugin-meta-comments": "2.5.0-alpha.0",
|
|
33
33
|
"@vitejs/plugin-vue": "^5.1.2",
|
|
34
34
|
"@vitejs/plugin-vue-jsx": "^4.0.1",
|
|
35
35
|
"vite": "^5.4.2"
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"@opentiny/vue": "^3.20.0",
|
|
39
39
|
"vue": "^3.4.15"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "ae59c82734d79f650c9221cb9702714814b099c8"
|
|
42
42
|
}
|