@opentiny/tiny-engine-toolbar-collaboration 1.0.3 → 2.0.0-alpha.1

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