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