@opentiny/tiny-engine-toolbar-setting 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.
Files changed (2) hide show
  1. package/dist/index.js +41 -35
  2. package/package.json +7 -6
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
- import { Popover as y } from "@opentiny/vue";
2
- import { useCanvas as S, useBlock as k, usePage as B, useLayout as h, useModal as C, useNotify as x } from "@opentiny/tiny-engine-controller";
1
+ import { Popover as v } from "@opentiny/vue";
2
+ import { useCanvas as k, useBlock as B, usePage as h, useLayout as C, useModal as b, useNotify as x } from "@opentiny/tiny-engine-meta-register";
3
3
  import { constants as A } from "@opentiny/tiny-engine-utils";
4
- import { resolveComponent as u, openBlock as E, createElementBlock as N, createVNode as d, withCtx as M, createElementVNode as b } from "vue";
4
+ import { resolveComponent as u, openBlock as E, createElementBlock as N, createVNode as d, withCtx as D, createElementVNode as f, toDisplayString as M } from "vue";
5
5
  const {
6
6
  PAGE_STATUS: w
7
7
  } = A, I = {
8
8
  components: {
9
- TinyPopover: y
9
+ TinyPopover: v
10
10
  },
11
11
  props: {
12
12
  icon: {
@@ -18,21 +18,21 @@ const {
18
18
  const {
19
19
  pageState: a,
20
20
  isBlock: e
21
- } = S(), {
22
- getCurrentBlock: o
23
21
  } = k(), {
24
- initCurrentPageData: t,
25
- isChangePageData: c
22
+ getCurrentBlock: o
26
23
  } = B(), {
24
+ initCurrentPageData: t,
25
+ isChangePageData: r
26
+ } = h(), {
27
27
  PLUGIN_NAME: p,
28
- activePlugin: r,
28
+ activePlugin: c,
29
29
  layoutState: g,
30
30
  isEmptyPage: l
31
- } = h(), {
32
- confirm: f,
33
- message: _
34
- } = C(), P = () => {
35
- r(p.BlockManage).then((n) => {
31
+ } = C(), {
32
+ confirm: _,
33
+ message: y
34
+ } = b(), P = () => {
35
+ c(p.BlockManage).then((n) => {
36
36
  n.openSettingPanel({
37
37
  item: o()
38
38
  });
@@ -44,22 +44,22 @@ const {
44
44
  n.openPageSettingPanel();
45
45
  const s = await n.getPageById(i.id);
46
46
  t(s);
47
- }, v = () => {
47
+ }, S = () => {
48
48
  var i;
49
49
  const {
50
50
  pageStatus: n
51
51
  } = g;
52
52
  if (n.state === w.Lock) {
53
53
  const s = ((i = n.data) == null ? void 0 : i.username) || "";
54
- _({
54
+ y({
55
55
  message: `您点击的页面被${s}锁定,暂时无法编辑,请联系解锁`,
56
56
  status: "info"
57
57
  });
58
58
  return;
59
59
  }
60
- r(p.AppManage).then((s) => {
61
- if (c()) {
62
- f({
60
+ c(p.AppManage).then((s) => {
61
+ if (r()) {
62
+ _({
63
63
  title: "提示",
64
64
  message: "当前页面尚未保存,是否要继续切换?",
65
65
  exec: () => {
@@ -84,46 +84,52 @@ const {
84
84
  P();
85
85
  return;
86
86
  }
87
- v();
87
+ S();
88
88
  },
89
89
  isBlock: e
90
90
  };
91
91
  }
92
92
  }, L = (a, e) => {
93
93
  const o = a.__vccOpts || a;
94
- for (const [t, c] of e)
95
- o[t] = c;
94
+ for (const [t, r] of e)
95
+ o[t] = r;
96
96
  return o;
97
97
  }, T = { class: "toolbar-itm-clean" };
98
- function D(a, e, o, t, c, p) {
99
- const r = u("svg-icon"), g = u("tiny-popover");
98
+ function G(a, e, o, t, r, p) {
99
+ const c = u("svg-icon"), g = u("tiny-popover");
100
100
  return E(), N("div", T, [
101
101
  d(g, {
102
102
  trigger: "hover",
103
103
  "open-delay": 1e3,
104
104
  "popper-class": "toolbar-right-popover",
105
105
  "append-to-body": "",
106
- content: t.isBlock() ? "区块设置" : "页面设置"
106
+ content: t.isBlock() ? "区块设置" : "页面设置",
107
+ disabled: !0
107
108
  }, {
108
- reference: M(() => [
109
- b("span", {
110
- class: "icon",
109
+ reference: D(() => [
110
+ f("span", {
111
+ class: "icon-hides",
111
112
  onClick: e[0] || (e[0] = (...l) => t.openSetting && t.openSetting(...l))
112
113
  }, [
113
- d(r, { name: o.icon }, null, 8, ["name"])
114
- ])
114
+ d(c, { name: o.icon }, null, 8, ["name"])
115
+ ]),
116
+ f("span", null, M(t.isBlock() ? "区块设置" : "页面设置"), 1)
115
117
  ]),
116
118
  _: 1
117
119
  }, 8, ["content"])
118
120
  ]);
119
121
  }
120
- const G = /* @__PURE__ */ L(I, [["render", D]]), q = {
121
- id: "setting",
122
+ const U = /* @__PURE__ */ L(I, [["render", G]]), V = {
123
+ id: "engine.toolbars.setting",
122
124
  title: "setting",
123
- icon: "",
125
+ type: "toolbars",
124
126
  align: "right",
125
- component: G
127
+ icon: "",
128
+ collapsed: !0
129
+ }, H = {
130
+ ...V,
131
+ entry: U
126
132
  };
127
133
  export {
128
- q as default
134
+ H as default
129
135
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentiny/tiny-engine-toolbar-setting",
3
- "version": "1.0.3",
3
+ "version": "2.0.0-alpha.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -24,17 +24,18 @@
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/tiny-engine-utils": "1.0.4",
29
- "@opentiny/vue": "~3.10.0"
27
+ "@opentiny/tiny-engine-meta-register": "2.0.0-alpha.1",
28
+ "@opentiny/tiny-engine-utils": "2.0.0-alpha.1"
30
29
  },
31
30
  "devDependencies": {
31
+ "@opentiny/tiny-engine-vite-plugin-meta-comments": "2.0.0-alpha.1",
32
32
  "@vitejs/plugin-vue": "^4.2.3",
33
- "@vitejs/plugin-vue-jsx": "^1.3.10",
33
+ "@vitejs/plugin-vue-jsx": "^3.1.0",
34
34
  "vite": "^4.3.7"
35
35
  },
36
36
  "peerDependencies": {
37
+ "@opentiny/vue": "^3.14.0",
37
38
  "vue": "^3.4.15"
38
39
  },
39
- "gitHead": "9a6cce3988accb39c97a9a21169c022c65a8e27f"
40
+ "gitHead": "f15ccc5dde391288bf4297e3ffc35aab52651f3d"
40
41
  }