@opentiny/tiny-engine-toolbar-collaboration 2.6.0 → 2.7.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 +82 -71
- package/dist/index.js.map +1 -1
- 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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
import { useLayout as _, callEntry as L } 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 S, watchEffect as w } from "vue";
|
|
4
|
+
import { Popover as B } from "@opentiny/vue";
|
|
5
|
+
import { ToolbarBase as h } from "@opentiny/tiny-engine-common";
|
|
6
|
+
const E = {
|
|
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 e = r.__vccOpts || r;
|
|
19
|
+
for (const [t, d] of o)
|
|
20
|
+
e[t] = d;
|
|
21
|
+
return e;
|
|
22
|
+
}, D = {
|
|
12
23
|
components: {
|
|
13
|
-
TinyPopover:
|
|
14
|
-
ToolbarBase:
|
|
24
|
+
TinyPopover: B,
|
|
25
|
+
ToolbarBase: h
|
|
15
26
|
},
|
|
16
27
|
props: {
|
|
17
28
|
options: {
|
|
@@ -20,65 +31,76 @@ const B = (r, o) => {
|
|
|
20
31
|
}
|
|
21
32
|
},
|
|
22
33
|
setup() {
|
|
23
|
-
const {
|
|
34
|
+
const {
|
|
35
|
+
layoutState: r
|
|
36
|
+
} = _(), o = S({
|
|
24
37
|
outsideVisible: !1,
|
|
25
38
|
insideVisible: !1,
|
|
26
39
|
url: "",
|
|
27
40
|
userLists: []
|
|
28
41
|
});
|
|
29
|
-
|
|
30
|
-
var
|
|
31
|
-
o.url = "img/defaultAvator.png", o.userLists = [
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
w(() => {
|
|
43
|
+
var t;
|
|
44
|
+
o.url = "img/defaultAvator.png", o.userLists = [{
|
|
45
|
+
pageName: "当前页",
|
|
46
|
+
users: [{
|
|
47
|
+
userHead: "img/defaultAvator.png",
|
|
48
|
+
userName: (t = r.pageStatus.data) == null ? void 0 : t.username,
|
|
49
|
+
status: "编辑"
|
|
50
|
+
}]
|
|
51
|
+
}];
|
|
52
|
+
});
|
|
53
|
+
const e = L(() => !0, {
|
|
54
|
+
metaData: {
|
|
55
|
+
id: "engine.toolbars.collaboration.Main.isSingle"
|
|
56
|
+
},
|
|
57
|
+
ctx: () => ({
|
|
58
|
+
layoutState: r,
|
|
59
|
+
state: o,
|
|
60
|
+
isSingle: e,
|
|
61
|
+
useLayout: _,
|
|
62
|
+
ToolbarBase: h
|
|
63
|
+
})
|
|
64
|
+
});
|
|
65
|
+
return {
|
|
44
66
|
state: o,
|
|
45
|
-
isSingle:
|
|
67
|
+
isSingle: e
|
|
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" }, M = { class: "icon-hides" }, U = { key: 0 };
|
|
71
|
+
function q(r, o, e, t, d, G) {
|
|
72
|
+
const V = p("svg-icon"), m = p("tiny-popover"), k = p("toolbar-base");
|
|
73
|
+
return n(), b(k, { options: e.options }, {
|
|
52
74
|
default: i(() => [
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
modelValue:
|
|
56
|
-
"onUpdate:modelValue": o[0] || (o[0] = (a) =>
|
|
75
|
+
s("span", T, [
|
|
76
|
+
g(m, {
|
|
77
|
+
modelValue: t.state.outsideVisible,
|
|
78
|
+
"onUpdate:modelValue": o[0] || (o[0] = (a) => t.state.outsideVisible = a),
|
|
57
79
|
trigger: "click",
|
|
58
80
|
width: "260",
|
|
59
81
|
"append-to-body": "",
|
|
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,
|
|
67
89
|
"popper-class": "collaboration-popover toolbar-right-popover",
|
|
68
90
|
"append-to-body": "",
|
|
69
|
-
content: `该项目共有 ${
|
|
91
|
+
content: `该项目共有 ${t.state.userLists.length} 位用户在编辑`
|
|
70
92
|
}, {
|
|
71
93
|
reference: i(() => {
|
|
72
94
|
var a;
|
|
73
95
|
return [
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
96
|
+
s("span", F, [
|
|
97
|
+
s("span", M, [
|
|
98
|
+
t.state.url ? (n(), b(V, {
|
|
77
99
|
key: 0,
|
|
78
|
-
name:
|
|
79
|
-
}, null, 8, ["name"])) :
|
|
100
|
+
name: e.options.icon.default || e.options.icon
|
|
101
|
+
}, null, 8, ["name"])) : y("", !0)
|
|
80
102
|
]),
|
|
81
|
-
(a =
|
|
103
|
+
(a = e.options) != null && a.collapsed ? (n(), l("span", U, "多人协作")) : 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(t.state.userLists, (a, N) => (n(), l("div", {
|
|
113
|
+
key: N,
|
|
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, x) => (n(), l("li", {
|
|
119
|
+
key: x,
|
|
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,22 +138,11 @@ 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 z = /* @__PURE__ */ C(D, [["render", q], ["__scopeId", "data-v-df18a89e"]]), X = {
|
|
142
|
+
...E,
|
|
143
|
+
entry: z
|
|
133
144
|
};
|
|
134
145
|
export {
|
|
135
|
-
|
|
146
|
+
X as default
|
|
136
147
|
};
|
|
137
148
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../meta.js","../index.ts"],"sourcesContent":["export default {\n id: 'engine.toolbars.collaboration',\n type: 'toolbars',\n title: 'collaboration',\n options: {\n icon: {\n default: 'team-collaboration'\n },\n renderType: 'slot',\n collapsed: true\n }\n}\n","/**\n * Copyright (c) 2023 - present TinyEngine Authors.\n * Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.\n *\n * Use of this source code is governed by an MIT-style license.\n *\n * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,\n * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR\n * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.\n *\n */\n\nimport entry from './src/Main.vue'\nimport metaData from './meta'\nimport './src/styles/vars.less'\n\nexport default {\n ...metaData,\n entry\n}\n"],"names":["metaData","index","entry"],"mappings":";;;;;AAAA,MAAeA,IAAA;AAAA,EACb,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,OAAO;AAAA,EACP,SAAS;AAAA,IACP,MAAM;AAAA,MACJ,SAAS;AAAA,IACV;AAAA,IACD,YAAY;AAAA,IACZ,WAAW;AAAA,EACf;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mFCKeC,IAAA;AAAA,EACb,GAAGD;AAAA,EACH,OAAAE;AACF;"}
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.collaboration-container[data-v-
|
|
1
|
+
.collaboration-container[data-v-df18a89e] .reference-wrapper{display:flex}.toolbar-right-user[data-v-df18a89e] .reference-wrapper{padding:0!important}.collaborators-list .page-name[data-v-df18a89e]{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-df18a89e]{padding:10px 16px;display:flex;align-items:center}.collaborators-list .user-item[data-v-df18a89e]:hover{background:var(--te-toolbars-collaboration-bg-color-hover)}.collaborators-list .user-item .user-item-head[data-v-df18a89e]{width:26px;height:26px;border-radius:50%}.collaborators-list .user-item .user-item-name[data-v-df18a89e]{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-df18a89e]{font-size:14px}.collaboration-wrap[data-v-df18a89e]{display:flex;align-items:center;cursor:pointer;font-size:12px}.collaboration-wrap .user-head[data-v-df18a89e]{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.7.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.7.0-alpha.0",
|
|
29
|
+
"@opentiny/tiny-engine-meta-register": "2.7.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.7.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": "d5cbb9c02048aa7d8f8c88ac77e09d4654398d86"
|
|
42
42
|
}
|